@lovrabet/lovrabet-cli 2.0.13 → 2.0.14-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/templates.js +1 -0
- package/lib/commands/skill/validate.js +1 -0
- 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/config/schema.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a43_0x4762(){const _0x1de6b0=['141684xzEqSf','production','15177DkJWtf','development','4BMURWO','950306NcOnOw','1029360NoyGlo','14cPWgZG','1sMGkMe','2580075UuDLky','dev','392816pTBZPt','2082380muaIxu','online','daily'];a43_0x4762=function(){return _0x1de6b0;};return a43_0x4762();}function a43_0x3c4e(_0x3763b9,_0x57cb35){_0x3763b9=_0x3763b9-0x155;const _0x4762b6=a43_0x4762();let _0x3c4eed=_0x4762b6[_0x3763b9];return _0x3c4eed;}const a43_0x299e4e=a43_0x3c4e;(function(_0x48da7a,_0x44305d){const _0x3f8db7=a43_0x3c4e,_0x4c37b6=_0x48da7a();while(!![]){try{const _0x177c33=parseInt(_0x3f8db7(0x157))/0x1*(parseInt(_0x3f8db7(0x163))/0x2)+-parseInt(_0x3f8db7(0x160))/0x3+parseInt(_0x3f8db7(0x162))/0x4*(-parseInt(_0x3f8db7(0x15b))/0x5)+-parseInt(_0x3f8db7(0x15e))/0x6*(parseInt(_0x3f8db7(0x156))/0x7)+parseInt(_0x3f8db7(0x15a))/0x8+parseInt(_0x3f8db7(0x158))/0x9+-parseInt(_0x3f8db7(0x155))/0xa;if(_0x177c33===_0x44305d)break;else _0x4c37b6['push'](_0x4c37b6['shift']());}catch(_0x59f0af){_0x4c37b6['push'](_0x4c37b6['shift']());}}}(a43_0x4762,0x3a67f));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a43_0x299e4e(0x15f),'development',a43_0x299e4e(0x15d)];export function normalizeEnv(_0x1da1a0){const _0xfe130e=a43_0x299e4e;return _0x1da1a0===_0xfe130e(0x15c)?_0xfe130e(0x15f):_0x1da1a0;}export function isProduction(_0x5825e4){return normalizeEnv(_0x5825e4)==='production';}export function isDaily(_0x510487){const _0x5c4bdf=a43_0x299e4e;return normalizeEnv(_0x510487)===_0x5c4bdf(0x15d);}export function isDev(_0x3b264b){const _0x5d44c2=a43_0x299e4e,_0x3fe137=normalizeEnv(_0x3b264b);return _0x3fe137===_0x5d44c2(0x161)||_0x3fe137===_0x5d44c2(0x159);}let env=normalizeEnv(productEnv('ENV')||a43_0x299e4e(0x15f));export function getEnv(){return env;}export function initEnv(_0x534a3c){env=normalizeEnv(_0x534a3c);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0xb12484=a44_0x295c;(function(_0x1ff91a,_0xeb572b){const _0x54af82=a44_0x295c,_0x574a75=_0x1ff91a();while(!![]){try{const _0xcb586f=-parseInt(_0x54af82(0x1f3))/0x1*(-parseInt(_0x54af82(0x1e9))/0x2)+parseInt(_0x54af82(0x1ec))/0x3*(parseInt(_0x54af82(0x1f1))/0x4)+-parseInt(_0x54af82(0x1f2))/0x5+parseInt(_0x54af82(0x1f4))/0x6+-parseInt(_0x54af82(0x1ea))/0x7+parseInt(_0x54af82(0x1ef))/0x8*(-parseInt(_0x54af82(0x1ed))/0x9)+parseInt(_0x54af82(0x1f0))/0xa;if(_0xcb586f===_0xeb572b)break;else _0x574a75['push'](_0x574a75['shift']());}catch(_0x4688b5){_0x574a75['push'](_0x574a75['shift']());}}}(a44_0x3a0f,0xc4a6a));function a44_0x3a0f(){const _0x2f81ac=['pretty','64569BUtRzl','9DpHkXQ','json','3035336tVyBFt','14389660aJWSpz','80hNndTK','3495315KNcJom','2164GLiCnL','2613732xSlZAR','832vGuCQZ','9249170dEtLnH'];a44_0x3a0f=function(){return _0x2f81ac;};return a44_0x3a0f();}function a44_0x295c(_0x40113e,_0x3628be){_0x40113e=_0x40113e-0x1e9;const _0x3a0f81=a44_0x3a0f();let _0x295c28=_0x3a0f81[_0x40113e];return _0x295c28;}export const OUTPUT_FORMAT_VALUES=[a44_0xb12484(0x1ee),a44_0xb12484(0x1eb),'compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a45_0x1a0eaf=a45_0x3237;(function(_0x41335c,_0x353c35){const _0x2536c7=a45_0x3237,_0x22ab4c=_0x41335c();while(!![]){try{const _0x2e5616=-parseInt(_0x2536c7(0x18d))/0x1+-parseInt(_0x2536c7(0x193))/0x2*(parseInt(_0x2536c7(0x19c))/0x3)+parseInt(_0x2536c7(0x199))/0x4+-parseInt(_0x2536c7(0x19e))/0x5*(parseInt(_0x2536c7(0x18b))/0x6)+-parseInt(_0x2536c7(0x192))/0x7+parseInt(_0x2536c7(0x196))/0x8+-parseInt(_0x2536c7(0x18c))/0x9*(-parseInt(_0x2536c7(0x190))/0xa);if(_0x2e5616===_0x353c35)break;else _0x22ab4c['push'](_0x22ab4c['shift']());}catch(_0x132037){_0x22ab4c['push'](_0x22ab4c['shift']());}}}(a45_0x49a9,0x5be99));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a45_0x1a0eaf(0x18e),'npmRegistryBaseUrl':'https://registry.npmjs.org','envPrefix':a45_0x1a0eaf(0x194),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':[a45_0x1a0eaf(0x186),a45_0x1a0eaf(0x185)],'newConfigFileName':a45_0x1a0eaf(0x186),'homeDirName':a45_0x1a0eaf(0x19a),'logFileName':a45_0x1a0eaf(0x19b),'invokeSource':a45_0x1a0eaf(0x198),'userCenterDisplayName':'Lovrabet\x20User\x20Center','skipNpxSkillsEnvSuffix':a45_0x1a0eaf(0x188),'domains':{'production':{'user':'https://user.lovrabet.com','api':a45_0x1a0eaf(0x195),'runtime':a45_0x1a0eaf(0x191)},'nonProduction':{'user':a45_0x1a0eaf(0x197),'api':a45_0x1a0eaf(0x189),'runtime':a45_0x1a0eaf(0x18a)}},'accessKeyCreatePath':a45_0x1a0eaf(0x187)};function a45_0x3237(_0x136bc1,_0x229aea){_0x136bc1=_0x136bc1-0x185;const _0x49a993=a45_0x49a9();let _0x32379f=_0x49a993[_0x136bc1];return _0x32379f;}export function productEnvName(_0x556df5){return PRODUCT_CONFIG['envPrefix']+'_'+_0x556df5;}export function productEnvNames(_0x3fff85){const _0x4bd030=a45_0x1a0eaf;return[productEnvName(_0x3fff85),...PRODUCT_CONFIG[_0x4bd030(0x19d)][_0x4bd030(0x18f)](_0x5a2ccd=>_0x5a2ccd+'_'+_0x3fff85)];}export function productEnv(_0x210b70){for(const _0xac3dda of productEnvNames(_0x210b70)){const _0x438042=process.env[_0xac3dda];if(_0x438042!==undefined)return _0x438042;}return undefined;}function a45_0x49a9(){const _0xe39c3=['.lovrabet.json','/user/ak','SKIP_NPX_SKILLS','https://daily-api.lovrabet.com','https://daily-runtime.lovrabet.com','87996FVNbpO','47268YnbdZp','313779QNLvsi','lovrabet/lovrabet-cli','map','1520frqEie','https://runtime.lovrabet.com','5058823XJspTh','1048706fFAUMK','LOVRABET','https://api.lovrabet.com','3412416MALZQh','https://user-daily.lovrabet.com','cli:lovrabet-runtime','2967080JhbPJK','.lovrabet','.lovrabet-runtime.log','3YKkZEe','legacyEnvPrefixes','10neXtOS','.lovrabetrc'];a45_0x49a9=function(){return _0xe39c3;};return a45_0x49a9();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a46_0x1238f9=a46_0x34f2;function a46_0x34f2(_0xbeb753,_0x3362a6){_0xbeb753=_0xbeb753-0x188;const _0x73e21f=a46_0x73e2();let _0x34f20a=_0x73e21f[_0xbeb753];return _0x34f20a;}function a46_0x73e2(){const _0x29062b=['691244ZEhqWP','461622VnBLqP','read','6462333bJikxV','7088ByTyaV','8312aAlgiz','5663tssWPi','796379rhzRId','25YzeuUu','6792660aMXqKp','171AacMhD','write'];a46_0x73e2=function(){return _0x29062b;};return a46_0x73e2();}(function(_0x1eae83,_0x57f5ed){const _0x6712db=a46_0x34f2,_0x237e39=_0x1eae83();while(!![]){try{const _0x31f37a=parseInt(_0x6712db(0x18a))/0x1+parseInt(_0x6712db(0x188))/0x2*(-parseInt(_0x6712db(0x18d))/0x3)+parseInt(_0x6712db(0x18f))/0x4+-parseInt(_0x6712db(0x18b))/0x5*(-parseInt(_0x6712db(0x190))/0x6)+-parseInt(_0x6712db(0x189))/0x7*(parseInt(_0x6712db(0x193))/0x8)+parseInt(_0x6712db(0x192))/0x9+-parseInt(_0x6712db(0x18c))/0xa;if(_0x31f37a===_0x57f5ed)break;else _0x237e39['push'](_0x237e39['shift']());}catch(_0x335316){_0x237e39['push'](_0x237e39['shift']());}}}(a46_0x73e2,0x6b2c4));export const RISK_LEVEL_VALUES=[a46_0x1238f9(0x191),a46_0x1238f9(0x18e),'high-risk-write'];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x53ef0d=a47_0x5a49;function a47_0x5a49(_0x33029a,_0x57a19f){_0x33029a=_0x33029a-0x126;const _0x358793=a47_0x3587();let _0x5a49da=_0x358793[_0x33029a];return _0x5a49da;}(function(_0x27949f,_0x71186e){const _0x1088e4=a47_0x5a49,_0xf8acc5=_0x27949f();while(!![]){try{const _0x5360ea=parseInt(_0x1088e4(0x126))/0x1+parseInt(_0x1088e4(0x130))/0x2*(parseInt(_0x1088e4(0x127))/0x3)+-parseInt(_0x1088e4(0x12d))/0x4+parseInt(_0x1088e4(0x131))/0x5+-parseInt(_0x1088e4(0x12c))/0x6*(-parseInt(_0x1088e4(0x12b))/0x7)+parseInt(_0x1088e4(0x129))/0x8+-parseInt(_0x1088e4(0x12e))/0x9;if(_0x5360ea===_0x71186e)break;else _0xf8acc5['push'](_0xf8acc5['shift']());}catch(_0x29638b){_0xf8acc5['push'](_0xf8acc5['shift']());}}}(a47_0x3587,0x847b8));import{PRODUCT_CONFIG}from'../constant/product.js';function a47_0x3587(){const _0x43537f=['144970aeKkGR','864830mUXBoj','19515yqgSXu','domains','7713248SsQRzD','production','2191NCBKdQ','20058FUNMhL','2940092hvSTmM','18445437ydrMIj','accessKeyCreatePath','130RBIDuK'];a47_0x3587=function(){return _0x43537f;};return a47_0x3587();}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a47_0x53ef0d(0x128)][a47_0x53ef0d(0x12a)]['user']+PRODUCT_CONFIG[a47_0x53ef0d(0x12f)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x3b8187=a46_0x5509;(function(_0x5e6f94,_0x53291a){const _0x2d5575=a46_0x5509,_0x22cca8=_0x5e6f94();while(!![]){try{const _0x32ec48=parseInt(_0x2d5575(0x1c3))/0x1*(-parseInt(_0x2d5575(0x1c6))/0x2)+-parseInt(_0x2d5575(0x1ac))/0x3+-parseInt(_0x2d5575(0x1d2))/0x4*(-parseInt(_0x2d5575(0x1ce))/0x5)+-parseInt(_0x2d5575(0x1a4))/0x6+-parseInt(_0x2d5575(0x1d3))/0x7+-parseInt(_0x2d5575(0x1b5))/0x8+parseInt(_0x2d5575(0x1e2))/0x9*(parseInt(_0x2d5575(0x1a3))/0xa);if(_0x32ec48===_0x53291a)break;else _0x22cca8['push'](_0x22cca8['shift']());}catch(_0x28b55f){_0x22cca8['push'](_0x22cca8['shift']());}}}(a46_0x3f05,0x9e138));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a46_0x3b8187(0x1df)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x4b4e64){for(const _0x31ce4b of CONFIG_NAMES){const _0x20adae=resolve(_0x4b4e64,_0x31ce4b);if(existsSync(_0x20adae))return _0x20adae;}return undefined;}function a46_0x5509(_0x35a75c,_0x2c59f2){_0x35a75c=_0x35a75c-0x19d;const _0x3f05e6=a46_0x3f05();let _0x550912=_0x3f05e6[_0x35a75c];return _0x550912;}export function resolveWriteConfigPath(_0x114cd1){const _0x345ef4=a46_0x3b8187,_0x458f76=_0x114cd1==='project'?process[_0x345ef4(0x1cf)]():homedir(),_0x501304=resolveConfigPath(_0x458f76);return _0x501304??resolve(_0x458f76,NEW_CONFIG_NAME);}export function readConfigFile(_0x429061){const _0x2a35f4=a46_0x3b8187;try{if(existsSync(_0x429061)){const _0xe7acee=readFileSync(_0x429061,{'encoding':_0x2a35f4(0x1d5)});if(_0xe7acee){const _0x3eb58b=JSON['parse'](_0xe7acee);return migrateOnlineEnv(_0x429061,_0x3eb58b),_0x3eb58b;}}}catch{}return{};}function migrateOnlineEnv(_0x14a561,_0x29061c){const _0x4cd226=a46_0x3b8187;let _0x261921=![];_0x29061c[_0x4cd226(0x1bb)]===_0x4cd226(0x1bf)&&(_0x29061c[_0x4cd226(0x1bb)]=_0x4cd226(0x19d),_0x261921=!![]);if(_0x29061c[_0x4cd226(0x1aa)]&&typeof _0x29061c['apps']==='object')for(const _0x62b946 of Object['values'](_0x29061c[_0x4cd226(0x1aa)])){_0x62b946&&_0x62b946[_0x4cd226(0x1bb)]==='online'&&(_0x62b946[_0x4cd226(0x1bb)]=_0x4cd226(0x19d),_0x261921=!![]);}if(_0x261921)try{writeConfigFile(_0x14a561,_0x29061c);}catch{}}export function writeConfigFile(_0x36b5d4,_0x3df95d){const _0x2d41fc=a46_0x3b8187,_0x36a7b2=dirname(_0x36b5d4);!existsSync(_0x36a7b2)&&mkdirSync(_0x36a7b2,{'recursive':!![]});const _0x2b7bde=_0x36b5d4+'.tmp';try{writeFileSync(_0x2b7bde,JSON[_0x2d41fc(0x1ab)](_0x3df95d,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x2b7bde,_0x36b5d4);}catch(_0x3a8df7){if(_0x3a8df7[_0x2d41fc(0x1cb)]===_0x2d41fc(0x1b9)||_0x3a8df7[_0x2d41fc(0x1cb)]==='EXDEV'||_0x3a8df7[_0x2d41fc(0x1cb)]==='EACCES'){writeFileSync(_0x36b5d4,JSON['stringify'](_0x3df95d,null,0x2)+'\x0a',{'encoding':_0x2d41fc(0x1d5)});try{unlinkSync(_0x2b7bde);}catch{}}else throw _0x3a8df7;}}catch(_0x20d807){try{unlinkSync(_0x2b7bde);}catch{}throw _0x20d807;}}export function isNonInteractiveMode(_0x52bb0d){const _0xf178c1=a46_0x3b8187;return!!(_0x52bb0d[_0xf178c1(0x1a8)]||_0x52bb0d['ci']||productEnvNames('CI')[_0xf178c1(0x1db)](_0x1e1696=>process.env[_0x1e1696]===_0xf178c1(0x1cd))||process.env.CI===_0xf178c1(0x1cd)||!process[_0xf178c1(0x1cc)][_0xf178c1(0x1e0)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x312147=a46_0x3b8187;if(!process[_0x312147(0x1c4)][_0x312147(0x1e0)])return![];try{const _0x3804ab=process[_0x312147(0x1c4)][_0x312147(0x1a7)];return process[_0x312147(0x1c4)][_0x312147(0x19f)](!![]),process['stdin'][_0x312147(0x19f)](_0x3804ab??![]),!![];}catch{return![];}}function a46_0x3f05(){const _0x1aceae=['string','missing','./constant/env.js','app','project','306560yEbfJn','globalConfig','message','global','EPERM','setRawCommand','env','pageSize','daily','slice','online','runtimeDomain','explicit','ENV','2153UsYMKF','stdin','inherit','1010whoBHF','local-alias','top-level','object','cache','code','stdout','true','5PeYTwN','cwd','values','defaultApp','1438724ijVNKr','8675884IetNQk','raw','utf8','development','appcode','maxRisk','join','riskLevel','some','./constant/domain.js','trim','accessKey','configFileNames','isTTY','userDomain','15507jaSnwd','production','projectConfig','setRawMode','format','parse','read','26500nHhLrQ','6323136NoZnWZ','error','ACCESS_KEY','isRaw','nonInteractive','locale','apps','stringify','2577894KNDkPQ','VERBOSE','apiDomain','setLogPath'];a46_0x3f05=function(){return _0x1aceae;};return a46_0x3f05();}export async function createContext(_0x5f003){const _0x50c712=a46_0x3b8187,_0x528023=readRawConfig(),_0x16a33d=buildConfig(_0x528023,_0x5f003);await initGlobalEnvironment(_0x16a33d);const {getUserDomain:_0x19c236,getApiDomain:_0x4a7e51}=await import(_0x50c712(0x1dc)),_0x306ac0={'apiDomain':_0x4a7e51(),'userDomain':_0x19c236()},_0x380903=await buildAuth(_0x16a33d);logger[_0x50c712(0x1af)](process[_0x50c712(0x1cf)]());const _0x44e54d=(CLI_BIN_NAME+'\x20'+process['argv'][_0x50c712(0x1be)](0x2)[_0x50c712(0x1d9)]('\x20'))[_0x50c712(0x1dd)]();logger[_0x50c712(0x1ba)](_0x44e54d);const _0x3d6ac2=isNonInteractiveMode(_0x5f003);return{'config':_0x16a33d,'auth':_0x380903,'logger':logger,'env':_0x306ac0,'nonInteractive':_0x3d6ac2};}export function buildConfigFromFlags(_0x3fdbca){return buildConfig(readRawConfig(),_0x3fdbca);}export function getLocalAppAliases(_0x3796f4){const _0x1debd9=a46_0x3b8187;return _0x3796f4[_0x1debd9(0x1aa)]&&typeof _0x3796f4[_0x1debd9(0x1aa)]===_0x1debd9(0x1c9)?_0x3796f4[_0x1debd9(0x1aa)]:{};}export function resolveLocalAppAliasCode(_0x225051,_0x49d345){const _0x6b76ec=a46_0x3b8187;if(!_0x49d345)return undefined;const _0x49a54a=getLocalAppAliases(_0x225051)[_0x49d345],_0xc11bdc=_0x49a54a?.['appcode'];return typeof _0xc11bdc==='string'&&_0xc11bdc[_0x6b76ec(0x1dd)]()?_0xc11bdc['trim']():undefined;}export function readAppCodeFromConfig(){const _0x58318d=a46_0x3b8187,_0x3d90dd=readRawConfig(),_0xa0fefc=_0x3d90dd[_0x58318d(0x1d7)]??_0x3d90dd['app'];if(typeof _0xa0fefc==='string'&&_0xa0fefc[_0x58318d(0x1dd)]())return _0xa0fefc[_0x58318d(0x1dd)]();const _0x2140e6=resolveLocalAppAliasCode(_0x3d90dd,typeof _0x3d90dd[_0x58318d(0x1d1)]===_0x58318d(0x1b0)?_0x3d90dd['defaultApp']:undefined);if(_0x2140e6)return _0x2140e6;const _0x19f027=normalizeEnv(String(_0x3d90dd[_0x58318d(0x1bb)]||_0x58318d(0x19d))),_0x22910f=isDaily(_0x19f027)?_0x58318d(0x1bd):isDev(_0x19f027)?'development':'production',_0x1a48cc=resolveCachedAppCode(typeof _0x3d90dd[_0x58318d(0x1d1)]==='string'?_0x3d90dd[_0x58318d(0x1d1)]:undefined,_0x22910f,typeof _0x3d90dd['accessKey']===_0x58318d(0x1b0)?_0x3d90dd['accessKey']:undefined);if(_0x1a48cc)return _0x1a48cc;const _0x329144=Object[_0x58318d(0x1d0)](getLocalAppAliases(_0x3d90dd))['find'](_0x349ba=>_0x349ba?.['appcode']);return typeof _0x329144?.[_0x58318d(0x1d7)]===_0x58318d(0x1b0)&&_0x329144[_0x58318d(0x1d7)]['trim']()?_0x329144[_0x58318d(0x1d7)][_0x58318d(0x1dd)]():undefined;}export function readScopedConfig(_0x13e9b5){const _0x42c78d=a46_0x3b8187,_0x296cc4=_0x13e9b5[_0x42c78d(0x1b8)]?_0x42c78d(0x1b8):_0x42c78d(0x1b4);return readConfigFile(resolveWriteConfigPath(_0x296cc4));}export function writeScopedConfig(_0x272bad,_0x40a7af){const _0x2d4e46=a46_0x3b8187,_0x277a16=_0x40a7af[_0x2d4e46(0x1b8)]?_0x2d4e46(0x1b8):'project';writeConfigFile(resolveWriteConfigPath(_0x277a16),_0x272bad);}export async function initGlobalEnvironment(_0xa91412){const _0x2f053d=a46_0x3b8187,{initEnv:_0x10f610}=await import(_0x2f053d(0x1b2));_0x10f610(_0xa91412[_0x2f053d(0x1bb)]);const {initDomains:_0x482129}=await import('./constant/domain.js');_0x482129({'apiDomain':_0xa91412['raw'][_0x2f053d(0x1ae)]||_0xa91412['raw']['host']||undefined,'userDomain':_0xa91412['raw'][_0x2f053d(0x1e1)]||undefined,'runtimeDomain':_0xa91412[_0x2f053d(0x1d4)][_0x2f053d(0x1c0)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x40e03f){const _0xd3957a=a46_0x3b8187;if(!existsSync(_0x40e03f))return{'status':_0xd3957a(0x1b1)};try{const _0x23b7a4=readFileSync(_0x40e03f,{'encoding':'utf8'});if(!_0x23b7a4?.[_0xd3957a(0x1dd)]())return{'status':'empty'};const _0x20f685=JSON['parse'](_0x23b7a4);return{'status':'ok','data':_0x20f685};}catch(_0x46830a){return{'status':_0xd3957a(0x1a5),'message':_0x46830a instanceof Error?_0x46830a[_0xd3957a(0x1b7)]:String(_0x46830a)};}}export function loadRawConfigLayers(_0x403c8e){const _0x4ead6e=a46_0x3b8187;let _0x13b1a0={},_0x2b1328={},_0x446b03,_0x4ed505;try{_0x446b03=resolveConfigPath(homedir());if(_0x446b03){const _0x903dc1=readFileSync(_0x446b03,{'encoding':_0x4ead6e(0x1d5)});if(_0x903dc1)_0x13b1a0=JSON[_0x4ead6e(0x1a1)](_0x903dc1);}}catch{}try{const _0x3f996f=_0x403c8e||process['cwd']();_0x4ed505=resolveConfigPath(_0x3f996f);if(_0x4ed505){const _0x28800d=readFileSync(_0x4ed505,{'encoding':_0x4ead6e(0x1d5)});if(_0x28800d)_0x2b1328=JSON[_0x4ead6e(0x1a1)](_0x28800d);}}catch{}return{'globalPath':_0x446b03,'projectPath':_0x4ed505,'globalConfig':_0x13b1a0,'projectConfig':_0x2b1328};}function mergeRawConfigLayers(_0x303cbd){const _0x90091f=a46_0x3b8187,{globalConfig:_0x336c5f,projectConfig:_0x416140}=_0x303cbd;if(_0x416140['inherit']===![]){const _0x6d6022={..._0x416140};return delete _0x6d6022[_0x90091f(0x1c5)],_0x6d6022;}const _0x58d49d={..._0x336c5f,..._0x416140};if('defaultApp'in _0x416140)_0x58d49d['defaultApp']=_0x416140[_0x90091f(0x1d1)];else _0x336c5f[_0x90091f(0x1d1)]&&(_0x58d49d['defaultApp']=_0x336c5f['defaultApp']);return _0x58d49d;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5a55b3){return mergeRawConfigLayers(loadRawConfigLayers(_0x5a55b3));}export function readRawConfigWithLayers(_0xe95ac5){const _0x59d5f4=loadRawConfigLayers(_0xe95ac5);return{'config':mergeRawConfigLayers(_0x59d5f4),'layers':_0x59d5f4};}export function resolveDefaultAppSource(_0x25f43e){const _0x3675f8=a46_0x3b8187;if(_0x3675f8(0x1d1)in _0x25f43e[_0x3675f8(0x19e)])return _0x3675f8(0x1b4);if(_0x25f43e['projectConfig'][_0x3675f8(0x1c5)]===![])return null;if(_0x25f43e[_0x3675f8(0x1b6)]['defaultApp'])return'global';return null;}function buildConfig(_0x4fccef,_0x254a5e){const _0x2f1f28=a46_0x3b8187,_0x209416=_0x4fccef['defaultApp']||undefined,_0x54581a=_0x254a5e['app']||env('APP')||undefined,_0x293bcd=_0x54581a||_0x209416||undefined,_0x57a64f=env(_0x2f1f28(0x1a6))||_0x4fccef[_0x2f1f28(0x1de)]||undefined,_0x2772c6=_0x254a5e[_0x2f1f28(0x1bb)]||env(_0x2f1f28(0x1c2))||_0x4fccef[_0x2f1f28(0x1bb)]||DEFAULT_CONFIG_VALUES[_0x2f1f28(0x1bb)],_0x48633e=normalizeEnv(String(_0x2772c6)),_0x1e33e6=isDaily(_0x48633e)?_0x2f1f28(0x1bd):isDev(_0x48633e)?_0x2f1f28(0x1d6):_0x2f1f28(0x19d),_0x341dc2=resolveLocalAppAliasCode(_0x4fccef,_0x293bcd),_0x359d30=resolveCachedAppCode(_0x293bcd,_0x1e33e6,_0x57a64f),_0x39c9ef=typeof _0x254a5e[_0x2f1f28(0x1d7)]===_0x2f1f28(0x1b0)?_0x254a5e[_0x2f1f28(0x1d7)]:undefined,_0xdfd940=env('APPCODE'),_0x39de4d=_0x54581a?undefined:_0x4fccef[_0x2f1f28(0x1d7)]||_0x4fccef[_0x2f1f28(0x1b3)]||undefined,_0x5eddae=_0x39c9ef||_0xdfd940||_0x341dc2||_0x359d30||_0x39de4d||undefined,_0x1a1765=_0x39c9ef?_0x2f1f28(0x1c1):_0xdfd940?_0x2f1f28(0x1bb):_0x341dc2?_0x2f1f28(0x1c7):_0x359d30?_0x2f1f28(0x1ca):_0x39de4d?_0x2f1f28(0x1c8):undefined,_0x2c6cd2=_0x4fccef[_0x2f1f28(0x1a9)]||DEFAULT_CONFIG_VALUES[_0x2f1f28(0x1a9)],_0x209336=undefined,_0x5941ca=_0x254a5e[_0x2f1f28(0x1a0)]||env('FORMAT')||_0x4fccef[_0x2f1f28(0x1a0)],_0x224ff0=normalizeLegacyOutputFormat(_0x5941ca),_0x2d5b5e=env('PAGE_SIZE')||_0x4fccef[_0x2f1f28(0x1bc)],_0x44e407=_0x2d5b5e?Number(_0x2d5b5e)||undefined:undefined,_0x282bbc=_0x4fccef[_0x2f1f28(0x1da)]||_0x4fccef[_0x2f1f28(0x1d8)],_0x353747=_0x282bbc===_0x2f1f28(0x1a2)||_0x282bbc==='write'||_0x282bbc==='high-risk-write'?_0x282bbc:DEFAULT_CONFIG_VALUES[_0x2f1f28(0x1da)],_0x2594d3=env(_0x2f1f28(0x1ad)),_0x10f733=_0x2594d3==='1'||_0x2594d3==='true';return{'appCode':typeof _0x5eddae===_0x2f1f28(0x1b0)&&_0x5eddae[_0x2f1f28(0x1dd)]()?_0x5eddae['trim']():undefined,'appCodeSource':_0x1a1765,'env':_0x1e33e6,'locale':_0x2c6cd2,'cookie':_0x209336,'accessKey':_0x57a64f,'format':_0x224ff0,'pageSize':_0x44e407,'riskLevel':_0x353747,'verbose':_0x10f733,'defaultApp':_0x209416,'currentApp':typeof _0x293bcd===_0x2f1f28(0x1b0)?_0x293bcd:undefined,'raw':_0x4fccef};}function env(_0x3bdc0e){return productEnv(_0x3bdc0e);}async function buildAuth(_0x47bb18){const _0x468bda=a46_0x3b8187,_0x494bf9='',_0x39bcfa=!!_0x47bb18[_0x468bda(0x1de)];return{'cookie':_0x494bf9,'isLoggedIn':_0x39bcfa,async 'getOrLogin'(){if(_0x39bcfa)return _0x494bf9;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a48_0x3ae05f=a48_0x2d35;(function(_0x595852,_0x3fb7ab){const _0x15f271=a48_0x2d35,_0x4cc253=_0x595852();while(!![]){try{const _0x199d04=parseInt(_0x15f271(0x1eb))/0x1*(parseInt(_0x15f271(0x1e3))/0x2)+parseInt(_0x15f271(0x1cc))/0x3+-parseInt(_0x15f271(0x1f5))/0x4*(-parseInt(_0x15f271(0x1bc))/0x5)+parseInt(_0x15f271(0x1d8))/0x6*(parseInt(_0x15f271(0x1fa))/0x7)+-parseInt(_0x15f271(0x1ed))/0x8+parseInt(_0x15f271(0x1f9))/0x9*(parseInt(_0x15f271(0x1fb))/0xa)+-parseInt(_0x15f271(0x1c0))/0xb;if(_0x199d04===_0x3fb7ab)break;else _0x4cc253['push'](_0x4cc253['shift']());}catch(_0x3f2982){_0x4cc253['push'](_0x4cc253['shift']());}}}(a48_0x3535,0x89b71));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';function a48_0x3535(){const _0x348a87=['runtimeDomain','values','message','setRawMode','online','join','accessKey','95636mywMoH','true','projectConfig','userDomain','stdin','apiDomain','./constant/domain.js','stdout','5mqDanI','locale','1878832EywOjA','EACCES','isTTY','project','format','missing','nonInteractive','daily','2324ODlulq','high-risk-write','empty','parse','58518pOnLBu','830627MxRdLc','340BVFNVC','argv','inherit','object','host','pageSize','env','configFileNames','maxRisk','setLogPath','./constant/env.js','8320xqQJDg','development','isRaw','apps','20604738Lvethl','riskLevel','string','APP','ACCESS_KEY','raw','code','ENV','defaultApp','global','FORMAT','production','3379470ibcevV','authRequired','cwd','cache','appcode','trim','local-alias','find','utf8','stringify','app','read','6ZShvOp','.tmp','EPERM','error'];a48_0x3535=function(){return _0x348a87;};return a48_0x3535();}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[a48_0x3ae05f(0x202)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x4aecdf){for(const _0x40a396 of CONFIG_NAMES){const _0x2d3ea4=resolve(_0x4aecdf,_0x40a396);if(existsSync(_0x2d3ea4))return _0x2d3ea4;}return undefined;}export function resolveWriteConfigPath(_0x30b423){const _0x3ba5e0=a48_0x3ae05f,_0x49ca4a=_0x30b423==='project'?process[_0x3ba5e0(0x1ce)]():homedir(),_0x1a2107=resolveConfigPath(_0x49ca4a);return _0x1a2107??resolve(_0x49ca4a,NEW_CONFIG_NAME);}export function readConfigFile(_0x180be6){const _0x43c319=a48_0x3ae05f;try{if(existsSync(_0x180be6)){const _0x54b034=readFileSync(_0x180be6,{'encoding':'utf8'});if(_0x54b034){const _0x1ad8d0=JSON[_0x43c319(0x1f8)](_0x54b034);return migrateOnlineEnv(_0x180be6,_0x1ad8d0),_0x1ad8d0;}}}catch{}return{};}function migrateOnlineEnv(_0x5c576f,_0x1c6d99){const _0x10bd81=a48_0x3ae05f;let _0x30e61b=![];_0x1c6d99[_0x10bd81(0x201)]===_0x10bd81(0x1e0)&&(_0x1c6d99[_0x10bd81(0x201)]=_0x10bd81(0x1cb),_0x30e61b=!![]);if(_0x1c6d99[_0x10bd81(0x1bf)]&&typeof _0x1c6d99[_0x10bd81(0x1bf)]===_0x10bd81(0x1fe))for(const _0x27b5ec of Object[_0x10bd81(0x1dd)](_0x1c6d99[_0x10bd81(0x1bf)])){_0x27b5ec&&_0x27b5ec[_0x10bd81(0x201)]===_0x10bd81(0x1e0)&&(_0x27b5ec['env']=_0x10bd81(0x1cb),_0x30e61b=!![]);}if(_0x30e61b)try{writeConfigFile(_0x5c576f,_0x1c6d99);}catch{}}export function writeConfigFile(_0x2394fb,_0x28b0c7){const _0x4c6ad6=a48_0x3ae05f,_0x1512c7=dirname(_0x2394fb);!existsSync(_0x1512c7)&&mkdirSync(_0x1512c7,{'recursive':!![]});const _0x289aee=_0x2394fb+_0x4c6ad6(0x1d9);try{writeFileSync(_0x289aee,JSON[_0x4c6ad6(0x1d5)](_0x28b0c7,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x289aee,_0x2394fb);}catch(_0x15b525){if(_0x15b525['code']===_0x4c6ad6(0x1da)||_0x15b525[_0x4c6ad6(0x1c6)]==='EXDEV'||_0x15b525['code']===_0x4c6ad6(0x1ee)){writeFileSync(_0x2394fb,JSON[_0x4c6ad6(0x1d5)](_0x28b0c7,null,0x2)+'\x0a',{'encoding':_0x4c6ad6(0x1d4)});try{unlinkSync(_0x289aee);}catch{}}else throw _0x15b525;}}catch(_0x1c367b){try{unlinkSync(_0x289aee);}catch{}throw _0x1c367b;}}export function isNonInteractiveMode(_0x5886f5){const _0x24fb34=a48_0x3ae05f;return!!(_0x5886f5[_0x24fb34(0x1f3)]||_0x5886f5['ci']||productEnvNames('CI')['some'](_0x3c93f0=>process.env[_0x3c93f0]===_0x24fb34(0x1e4))||process.env.CI===_0x24fb34(0x1e4)||!process[_0x24fb34(0x1ea)][_0x24fb34(0x1ef)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x467b16=a48_0x3ae05f;if(!process[_0x467b16(0x1e7)][_0x467b16(0x1ef)])return![];try{const _0x5dbd79=process[_0x467b16(0x1e7)][_0x467b16(0x1be)];return process[_0x467b16(0x1e7)][_0x467b16(0x1df)](!![]),process[_0x467b16(0x1e7)]['setRawMode'](_0x5dbd79??![]),!![];}catch{return![];}}export async function createContext(_0xc6fcc4){const _0xe22a3=a48_0x3ae05f,_0x406a2f=readRawConfig(),_0x234f73=buildConfig(_0x406a2f,_0xc6fcc4);await initGlobalEnvironment(_0x234f73);const {getUserDomain:_0x259919,getApiDomain:_0x3d537f}=await import(_0xe22a3(0x1e9)),_0x5c1632={'apiDomain':_0x3d537f(),'userDomain':_0x259919()},_0x2f7b3b=await buildAuth(_0x234f73);logger[_0xe22a3(0x204)](process[_0xe22a3(0x1ce)]());const _0x52793a=(CLI_BIN_NAME+'\x20'+process[_0xe22a3(0x1fc)]['slice'](0x2)[_0xe22a3(0x1e1)]('\x20'))[_0xe22a3(0x1d1)]();logger['setRawCommand'](_0x52793a);const _0x2d6d56=isNonInteractiveMode(_0xc6fcc4);return{'config':_0x234f73,'auth':_0x2f7b3b,'logger':logger,'env':_0x5c1632,'nonInteractive':_0x2d6d56};}export function buildConfigFromFlags(_0x20a95c){return buildConfig(readRawConfig(),_0x20a95c);}export function getLocalAppAliases(_0x82b480){const _0x1eab1c=a48_0x3ae05f;return _0x82b480[_0x1eab1c(0x1bf)]&&typeof _0x82b480[_0x1eab1c(0x1bf)]===_0x1eab1c(0x1fe)?_0x82b480[_0x1eab1c(0x1bf)]:{};}export function resolveLocalAppAliasCode(_0x4ae456,_0x4b2bdf){const _0x2aa6d3=a48_0x3ae05f;if(!_0x4b2bdf)return undefined;const _0x12f2d6=getLocalAppAliases(_0x4ae456)[_0x4b2bdf],_0x187c3c=_0x12f2d6?.[_0x2aa6d3(0x1d0)];return typeof _0x187c3c===_0x2aa6d3(0x1c2)&&_0x187c3c[_0x2aa6d3(0x1d1)]()?_0x187c3c['trim']():undefined;}export function readAppCodeFromConfig(){const _0x205555=a48_0x3ae05f,_0x18999c=readRawConfig(),_0x32ccc3=_0x18999c[_0x205555(0x1d0)]??_0x18999c['app'];if(typeof _0x32ccc3===_0x205555(0x1c2)&&_0x32ccc3['trim']())return _0x32ccc3[_0x205555(0x1d1)]();const _0x457d8c=resolveLocalAppAliasCode(_0x18999c,typeof _0x18999c[_0x205555(0x1c8)]==='string'?_0x18999c[_0x205555(0x1c8)]:undefined);if(_0x457d8c)return _0x457d8c;const _0x4cac45=normalizeEnv(String(_0x18999c[_0x205555(0x201)]||_0x205555(0x1cb))),_0x3c97ac=isDaily(_0x4cac45)?_0x205555(0x1f4):isDev(_0x4cac45)?_0x205555(0x1bd):'production',_0xb4aa21=resolveCachedAppCode(typeof _0x18999c[_0x205555(0x1c8)]==='string'?_0x18999c[_0x205555(0x1c8)]:undefined,_0x3c97ac,typeof _0x18999c[_0x205555(0x1e2)]==='string'?_0x18999c['accessKey']:undefined);if(_0xb4aa21)return _0xb4aa21;const _0xcdc95e=Object[_0x205555(0x1dd)](getLocalAppAliases(_0x18999c))[_0x205555(0x1d3)](_0x591d76=>_0x591d76?.[_0x205555(0x1d0)]);return typeof _0xcdc95e?.[_0x205555(0x1d0)]===_0x205555(0x1c2)&&_0xcdc95e[_0x205555(0x1d0)][_0x205555(0x1d1)]()?_0xcdc95e['appcode'][_0x205555(0x1d1)]():undefined;}export function readScopedConfig(_0x3ee63c){const _0x32bc07=a48_0x3ae05f,_0x463f28=_0x3ee63c[_0x32bc07(0x1c9)]?_0x32bc07(0x1c9):_0x32bc07(0x1f0);return readConfigFile(resolveWriteConfigPath(_0x463f28));}export function writeScopedConfig(_0x36483a,_0x3352e5){const _0x343e90=a48_0x3ae05f,_0x4aab9b=_0x3352e5[_0x343e90(0x1c9)]?_0x343e90(0x1c9):_0x343e90(0x1f0);writeConfigFile(resolveWriteConfigPath(_0x4aab9b),_0x36483a);}export async function initGlobalEnvironment(_0x2fdca5){const _0x581bcf=a48_0x3ae05f,{initEnv:_0x2c3b9c}=await import(_0x581bcf(0x1bb));_0x2c3b9c(_0x2fdca5[_0x581bcf(0x201)]);const {initDomains:_0x8c6555}=await import(_0x581bcf(0x1e9));_0x8c6555({'apiDomain':_0x2fdca5[_0x581bcf(0x1c5)][_0x581bcf(0x1e8)]||_0x2fdca5[_0x581bcf(0x1c5)][_0x581bcf(0x1ff)]||undefined,'userDomain':_0x2fdca5[_0x581bcf(0x1c5)][_0x581bcf(0x1e6)]||undefined,'runtimeDomain':_0x2fdca5[_0x581bcf(0x1c5)][_0x581bcf(0x1dc)]||undefined});}export function getProjectConfigPath(){const _0x2096b7=a48_0x3ae05f;return resolveConfigPath(process[_0x2096b7(0x1ce)]());}function a48_0x2d35(_0x5bf09f,_0x1b58f8){_0x5bf09f=_0x5bf09f-0x1bb;const _0x353524=a48_0x3535();let _0x2d354d=_0x353524[_0x5bf09f];return _0x2d354d;}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3332f2){const _0x5cc68f=a48_0x3ae05f;if(!existsSync(_0x3332f2))return{'status':_0x5cc68f(0x1f2)};try{const _0x474f18=readFileSync(_0x3332f2,{'encoding':'utf8'});if(!_0x474f18?.['trim']())return{'status':_0x5cc68f(0x1f7)};const _0x4d44d4=JSON[_0x5cc68f(0x1f8)](_0x474f18);return{'status':'ok','data':_0x4d44d4};}catch(_0x1f81af){return{'status':_0x5cc68f(0x1db),'message':_0x1f81af instanceof Error?_0x1f81af[_0x5cc68f(0x1de)]:String(_0x1f81af)};}}export function loadRawConfigLayers(_0x5c9a37){const _0x2dd26b=a48_0x3ae05f;let _0x32be04={},_0x3a0846={},_0x38fdd0,_0x5df360;try{_0x38fdd0=resolveConfigPath(homedir());if(_0x38fdd0){const _0x2deaf7=readFileSync(_0x38fdd0,{'encoding':_0x2dd26b(0x1d4)});if(_0x2deaf7)_0x32be04=JSON[_0x2dd26b(0x1f8)](_0x2deaf7);}}catch{}try{const _0x36e493=_0x5c9a37||process[_0x2dd26b(0x1ce)]();_0x5df360=resolveConfigPath(_0x36e493);if(_0x5df360){const _0x27a601=readFileSync(_0x5df360,{'encoding':'utf8'});if(_0x27a601)_0x3a0846=JSON[_0x2dd26b(0x1f8)](_0x27a601);}}catch{}return{'globalPath':_0x38fdd0,'projectPath':_0x5df360,'globalConfig':_0x32be04,'projectConfig':_0x3a0846};}function mergeRawConfigLayers(_0x269521){const _0x54d3c6=a48_0x3ae05f,{globalConfig:_0x35b626,projectConfig:_0x2e234d}=_0x269521;if(_0x2e234d[_0x54d3c6(0x1fd)]===![]){const _0x1985b6={..._0x2e234d};return delete _0x1985b6[_0x54d3c6(0x1fd)],_0x1985b6;}const _0x1bf6a2={..._0x35b626,..._0x2e234d};if(_0x54d3c6(0x1c8)in _0x2e234d)_0x1bf6a2['defaultApp']=_0x2e234d[_0x54d3c6(0x1c8)];else _0x35b626[_0x54d3c6(0x1c8)]&&(_0x1bf6a2[_0x54d3c6(0x1c8)]=_0x35b626[_0x54d3c6(0x1c8)]);return _0x1bf6a2;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5acaf3){return mergeRawConfigLayers(loadRawConfigLayers(_0x5acaf3));}export function readRawConfigWithLayers(_0x4b37aa){const _0x49b2fa=loadRawConfigLayers(_0x4b37aa);return{'config':mergeRawConfigLayers(_0x49b2fa),'layers':_0x49b2fa};}export function resolveDefaultAppSource(_0x9ad674){const _0x425aaf=a48_0x3ae05f;if('defaultApp'in _0x9ad674[_0x425aaf(0x1e5)])return _0x425aaf(0x1f0);if(_0x9ad674[_0x425aaf(0x1e5)][_0x425aaf(0x1fd)]===![])return null;if(_0x9ad674['globalConfig'][_0x425aaf(0x1c8)])return _0x425aaf(0x1c9);return null;}function buildConfig(_0x545f26,_0x5d708d){const _0x5b973a=a48_0x3ae05f,_0x500184=_0x545f26['defaultApp']||undefined,_0x3e010c=_0x5d708d[_0x5b973a(0x1d6)]||env(_0x5b973a(0x1c3))||undefined,_0x16223b=_0x3e010c||_0x500184||undefined,_0x35085f=env(_0x5b973a(0x1c4))||_0x545f26[_0x5b973a(0x1e2)]||undefined,_0xa73d50=_0x5d708d[_0x5b973a(0x201)]||env(_0x5b973a(0x1c7))||_0x545f26[_0x5b973a(0x201)]||DEFAULT_CONFIG_VALUES['env'],_0x347fd=normalizeEnv(String(_0xa73d50)),_0x2e341b=isDaily(_0x347fd)?_0x5b973a(0x1f4):isDev(_0x347fd)?_0x5b973a(0x1bd):'production',_0x56ff22=resolveLocalAppAliasCode(_0x545f26,_0x16223b),_0x2acf67=resolveCachedAppCode(_0x16223b,_0x2e341b,_0x35085f),_0x278b50=typeof _0x5d708d['appcode']==='string'?_0x5d708d[_0x5b973a(0x1d0)]:undefined,_0x4c3aaa=env('APPCODE'),_0x3a82d9=_0x3e010c?undefined:_0x545f26[_0x5b973a(0x1d0)]||_0x545f26[_0x5b973a(0x1d6)]||undefined,_0x2b4318=_0x278b50||_0x4c3aaa||_0x56ff22||_0x2acf67||_0x3a82d9||undefined,_0x8fe430=_0x278b50?'explicit':_0x4c3aaa?_0x5b973a(0x201):_0x56ff22?_0x5b973a(0x1d2):_0x2acf67?_0x5b973a(0x1cf):_0x3a82d9?'top-level':undefined,_0x2b784c=_0x545f26[_0x5b973a(0x1ec)]||DEFAULT_CONFIG_VALUES[_0x5b973a(0x1ec)],_0x56764a=undefined,_0x45df5b=_0x5d708d[_0x5b973a(0x1f1)]||env(_0x5b973a(0x1ca))||_0x545f26[_0x5b973a(0x1f1)],_0x401adb=normalizeLegacyOutputFormat(_0x45df5b),_0xa32ccb=env('PAGE_SIZE')||_0x545f26[_0x5b973a(0x200)],_0x24c5fa=_0xa32ccb?Number(_0xa32ccb)||undefined:undefined,_0x274922=_0x545f26[_0x5b973a(0x1c1)]||_0x545f26[_0x5b973a(0x203)],_0x424b51=_0x274922===_0x5b973a(0x1d7)||_0x274922==='write'||_0x274922===_0x5b973a(0x1f6)?_0x274922:DEFAULT_CONFIG_VALUES['riskLevel'],_0x455c2d=env('VERBOSE'),_0x2110ef=_0x455c2d==='1'||_0x455c2d===_0x5b973a(0x1e4);return{'appCode':typeof _0x2b4318==='string'&&_0x2b4318['trim']()?_0x2b4318['trim']():undefined,'appCodeSource':_0x8fe430,'env':_0x2e341b,'locale':_0x2b784c,'cookie':_0x56764a,'accessKey':_0x35085f,'format':_0x401adb,'pageSize':_0x24c5fa,'riskLevel':_0x424b51,'verbose':_0x2110ef,'defaultApp':_0x500184,'currentApp':typeof _0x16223b===_0x5b973a(0x1c2)?_0x16223b:undefined,'raw':_0x545f26};}function env(_0x5bc148){return productEnv(_0x5bc148);}async function buildAuth(_0xd9506a){const _0x4e863c=a48_0x3ae05f,_0x39634b='',_0x2510e6=!!_0xd9506a[_0x4e863c(0x1e2)];return{'cookie':_0x39634b,'isLoggedIn':_0x2510e6,async 'getOrLogin'(){const _0xe67784=_0x4e863c;if(_0x2510e6)return _0x39634b;throw CliErrors[_0xe67784(0x1cd)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1321f8,_0x29d4a1){const _0x44083c=a47_0xf6fa,_0x18d2c0=_0x1321f8();while(!![]){try{const _0x310407=-parseInt(_0x44083c(0x1b3))/0x1+parseInt(_0x44083c(0x17c))/0x2+-parseInt(_0x44083c(0x17e))/0x3*(parseInt(_0x44083c(0x1aa))/0x4)+parseInt(_0x44083c(0x1ba))/0x5*(parseInt(_0x44083c(0x1b7))/0x6)+-parseInt(_0x44083c(0x1a2))/0x7+-parseInt(_0x44083c(0x1b8))/0x8+parseInt(_0x44083c(0x178))/0x9;if(_0x310407===_0x29d4a1)break;else _0x18d2c0['push'](_0x18d2c0['shift']());}catch(_0x121489){_0x18d2c0['push'](_0x18d2c0['shift']());}}}(a47_0x4822,0x74287));import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x5666aa){_activeAK=_0x5666aa||undefined;}function a47_0xf6fa(_0x3781e0,_0x21ae43){_0x3781e0=_0x3781e0-0x16a;const _0x4822ea=a47_0x4822();let _0xf6fa2a=_0x4822ea[_0x3781e0];return _0xf6fa2a;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x11f558,_0x3c8246={}){const _0xa4347=a47_0xf6fa,{method:method='GET',body:_0x4039be,headers:headers={},timeout:timeout=0x7530}=_0x3c8246,_0x33db34=_activeAK,_0x3271ec=getRuntimeDomain();if(!_0x33db34)throw CliErrors['authRequired'](_0xa4347(0x18e)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x431bea=''+_0x3271ec+_0x11f558,_0x80c9a3={'X-User-AK':_0x33db34},_0x5b45a6=new AbortController(),_0x1f7acd=setTimeout(()=>_0x5b45a6['abort'](),timeout);try{const _0x5106a2=await fetch(_0x431bea,{'method':method,'headers':{'Content-Type':_0xa4347(0x1a1),'X-Invoke-Source':PRODUCT_CONFIG[_0xa4347(0x190)],..._0x80c9a3,...headers},'body':_0x4039be?JSON['stringify'](_0x4039be):undefined,'signal':_0x5b45a6[_0xa4347(0x18b)]});let _0xf82526;try{_0xf82526=await _0x5106a2[_0xa4347(0x1b2)]();}catch{throw CliErrors[_0xa4347(0x1ad)](_0xa4347(0x195)+_0x5106a2[_0xa4347(0x176)]+')',_0x5106a2[_0xa4347(0x176)]>=0x190?_0xa4347(0x16d):undefined);}if(!_0x5106a2['ok']||_0xf82526[_0xa4347(0x1a8)]===![])throw CliErrors['apiError'](_0xf82526[_0xa4347(0x16c)]||_0xf82526[_0xa4347(0x1a4)]||_0xa4347(0x186)+_0x5106a2[_0xa4347(0x176)],_0xf82526[_0xa4347(0x16f)]?'API\x20error\x20code:\x20'+_0xf82526[_0xa4347(0x16f)]:undefined);return _0xf82526;}catch(_0x4a00dd){if(_0x4a00dd instanceof Error&&_0x4a00dd['name']==='AbortError')throw CliErrors[_0xa4347(0x1ad)](_0xa4347(0x19c)+_0x431bea);throw _0x4a00dd;}finally{clearTimeout(_0x1f7acd);}}async function apiBinaryRequest(_0xa6802a,_0x3f25be={}){const _0x46fe54=a47_0xf6fa,{method:method=_0x46fe54(0x174),headers:headers={},timeout:timeout=0x7530}=_0x3f25be,_0x19aaac=_activeAK,_0x2d6c36=getRuntimeDomain();if(!_0x19aaac)throw CliErrors[_0x46fe54(0x19f)](_0x46fe54(0x18e)+PRODUCT_CONFIG[_0x46fe54(0x170)]+'.');const _0x2b12ed=''+_0x2d6c36+_0xa6802a,_0x550e86=new AbortController(),_0x48bd72=setTimeout(()=>_0x550e86[_0x46fe54(0x185)](),timeout);try{const _0x454fa1=await fetch(_0x2b12ed,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x46fe54(0x190)],'X-User-AK':_0x19aaac,...headers},'signal':_0x550e86[_0x46fe54(0x18b)]});if(!_0x454fa1['ok']){let _0x145775;try{const _0x3c30aa=await _0x454fa1['json']();_0x145775=_0x3c30aa[_0x46fe54(0x16c)]||_0x3c30aa['message']||_0x3c30aa[_0x46fe54(0x16f)];}catch{_0x145775=await _0x454fa1[_0x46fe54(0x192)]()['catch'](()=>undefined);}throw CliErrors[_0x46fe54(0x1ad)](_0x145775||_0x46fe54(0x186)+_0x454fa1['status'],_0x46fe54(0x198)+_0x2b12ed);}return Buffer[_0x46fe54(0x187)](await _0x454fa1[_0x46fe54(0x181)]());}catch(_0x243fa6){if(_0x243fa6 instanceof Error&&_0x243fa6['name']==='AbortError')throw CliErrors[_0x46fe54(0x1ad)](_0x46fe54(0x19c)+_0x2b12ed);throw _0x243fa6;}finally{clearTimeout(_0x48bd72);}}async function toolboxRequest(_0x25a4da,_0x586f77,_0x4952b7={}){const _0x43c334=a47_0xf6fa,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x4952b7,_0x31b287=_activeAK;if(!_0x31b287)throw CliErrors[_0x43c334(0x19f)](_0x43c334(0x18e)+PRODUCT_CONFIG[_0x43c334(0x170)]+'.');const _0x4d7e94=getApiDomain()['replace'](/\/$/,''),_0x26b6fb=new URL(_0x25a4da,_0x4d7e94+_0x43c334(0x19b));if(_0x586f77)for(const [_0x330545,_0x550154]of Object['entries'](_0x586f77)){_0x550154!==undefined&&_0x550154!==null&&_0x26b6fb[_0x43c334(0x18a)]['set'](_0x330545,String(_0x550154));}const _0x48cf24=new AbortController(),_0x3f7c68=setTimeout(()=>_0x48cf24['abort'](),timeout);try{const _0x18b79f=await fetch(_0x26b6fb,{'method':method,'headers':{'Content-Type':_0x43c334(0x1a1),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x31b287,...headers},'signal':_0x48cf24[_0x43c334(0x18b)]});let _0x8e95ed;try{_0x8e95ed=await _0x18b79f[_0x43c334(0x1b2)]();}catch{throw CliErrors[_0x43c334(0x1ad)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x18b79f[_0x43c334(0x176)]+')',_0x18b79f[_0x43c334(0x176)]>=0x190?_0x43c334(0x16d):undefined);}if(!_0x18b79f['ok']){const _0x36f0c8=_0x8e95ed&&typeof _0x8e95ed===_0x43c334(0x175)?_0x8e95ed:{};throw CliErrors['apiError'](_0x36f0c8[_0x43c334(0x16c)]||_0x36f0c8[_0x43c334(0x1a4)]||'Toolbox\x20API\x20error:\x20'+_0x18b79f['status'],_0x36f0c8[_0x43c334(0x16f)]?_0x43c334(0x19d)+_0x36f0c8[_0x43c334(0x16f)]:undefined);}if(_0x8e95ed&&typeof _0x8e95ed===_0x43c334(0x175)&&'success'in _0x8e95ed&&typeof _0x8e95ed[_0x43c334(0x1a8)]===_0x43c334(0x1ae)){const _0x1f01a4=_0x8e95ed;if(!_0x1f01a4[_0x43c334(0x1a8)])throw CliErrors[_0x43c334(0x1ad)](_0x1f01a4[_0x43c334(0x16c)]||_0x1f01a4[_0x43c334(0x1a4)]||_0x43c334(0x1a5),_0x1f01a4[_0x43c334(0x16f)]?_0x43c334(0x19d)+_0x1f01a4['errorCode']:undefined);return _0x1f01a4['data'];}return _0x8e95ed;}catch(_0x63b918){if(_0x63b918 instanceof Error&&_0x63b918[_0x43c334(0x1b4)]===_0x43c334(0x1a9))throw CliErrors['apiError'](_0x43c334(0x19c)+_0x26b6fb[_0x43c334(0x179)]());throw _0x63b918;}finally{clearTimeout(_0x3f7c68);}}export async function getBffScriptInfo(_0x3ebf5f){const _0x5123c9=a47_0xf6fa,_0x10cb4c=await apiRequest(_0x5123c9(0x18d)+_0x3ebf5f);if(!_0x10cb4c[_0x5123c9(0x180)])throw CliErrors[_0x5123c9(0x184)](_0x5123c9(0x199)+_0x3ebf5f);return _0x10cb4c[_0x5123c9(0x180)];}export async function getSqlQueryInfo(_0x4df2d7,_0x2e51e1){const _0x1fdfea=a47_0xf6fa,_0xb39ceb=await apiRequest(_0x1fdfea(0x1bd),{'method':_0x1fdfea(0x172),'body':{'appCode':_0x4df2d7,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2e51e1}}),_0x59819c=_0xb39ceb[_0x1fdfea(0x180)],_0x4e16d6=_0x59819c&&typeof _0x59819c===_0x1fdfea(0x175)&&_0x1fdfea(0x1ac)in _0x59819c?_0x59819c[_0x1fdfea(0x1ac)]?.[0x0]:_0x59819c&&typeof _0x59819c===_0x1fdfea(0x175)&&_0x1fdfea(0x193)in _0x59819c?_0x59819c:undefined;if(!_0x4e16d6)throw CliErrors[_0x1fdfea(0x184)](_0x1fdfea(0x1af)+_0x2e51e1);return _0x4e16d6;}function isRemoteAppItem(_0x20aa3b){const _0xe48fcc=a47_0xf6fa;return!!_0x20aa3b&&typeof _0x20aa3b===_0xe48fcc(0x175)&&typeof _0x20aa3b[_0xe48fcc(0x17d)]===_0xe48fcc(0x1b6)&&typeof _0x20aa3b[_0xe48fcc(0x183)]===_0xe48fcc(0x1b6);}function extractRemoteAppItems(_0x1f2091){const _0x4c9f12=a47_0xf6fa;if(Array[_0x4c9f12(0x16b)](_0x1f2091))return _0x1f2091[_0x4c9f12(0x1b5)](isRemoteAppItem);if(!_0x1f2091||typeof _0x1f2091!=='object')throw CliErrors[_0x4c9f12(0x1ad)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x185e21=_0x1f2091;if(Array['isArray'](_0x185e21[_0x4c9f12(0x1ac)]))return _0x185e21[_0x4c9f12(0x1ac)][_0x4c9f12(0x1b5)](isRemoteAppItem);if(_0x185e21[_0x4c9f12(0x180)]&&typeof _0x185e21[_0x4c9f12(0x180)]===_0x4c9f12(0x175)){const _0x16b8b3=_0x185e21[_0x4c9f12(0x180)];if(Array[_0x4c9f12(0x16b)](_0x16b8b3[_0x4c9f12(0x1ac)]))return _0x16b8b3[_0x4c9f12(0x1ac)][_0x4c9f12(0x1b5)](isRemoteAppItem);}throw CliErrors['apiError']('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x4a2d37=a47_0xf6fa,_0xc37bfb=await apiRequest(_0x4a2d37(0x197));return extractRemoteAppItems(_0xc37bfb[_0x4a2d37(0x180)]);}export async function getLoginUserInfo(){const _0x3af202=a47_0xf6fa,_0x25525f=await apiRequest('/client/user/loginUserInfo');if(!_0x25525f[_0x3af202(0x180)]||typeof _0x25525f[_0x3af202(0x180)]!==_0x3af202(0x175)||Array['isArray'](_0x25525f[_0x3af202(0x180)]))throw CliErrors[_0x3af202(0x1ad)](_0x3af202(0x1a6));return _0x25525f[_0x3af202(0x180)];}export async function listDatasets(_0x335c8a,_0x3eafd8){const _0x3e82ab=a47_0xf6fa,_0x485d3c=await apiRequest(_0x3e82ab(0x19a),{'method':'POST','body':{'appCode':_0x335c8a,..._0x3eafd8?.[_0x3e82ab(0x1b0)]&&{'code':_0x3eafd8['code']},..._0x3eafd8?.[_0x3e82ab(0x1b4)]&&{'name':_0x3eafd8[_0x3e82ab(0x1b4)]}}});return extractList(_0x485d3c['data']);}export async function getDatasetDetail(_0x137e12){const _0x39fb3b=a47_0xf6fa,_0x4e3eb3=/^\d+$/[_0x39fb3b(0x17a)](_0x137e12)?'id':_0x39fb3b(0x1b0),_0x215477=await apiRequest('/client/dataset/query?'+_0x4e3eb3+'='+_0x137e12);return _0x215477[_0x39fb3b(0x180)];}export async function getDatasetSdkUsageDoc(_0x1f21ff,_0x263f9a){const _0x8cec96=a47_0xf6fa,_0x56101e=await toolboxRequest(_0x8cec96(0x18f),{'datasetCode':_0x1f21ff,'appCode':_0x263f9a});return typeof _0x56101e?.[_0x8cec96(0x191)]===_0x8cec96(0x1b6)?_0x56101e[_0x8cec96(0x191)]:'';}export async function listRuntimeArtifacts(_0x32cdb6,_0x5549aa){const _0x9cc7b7=a47_0xf6fa,_0x409b5d=new URLSearchParams({'appCode':_0x32cdb6});if(_0x5549aa?.[_0x9cc7b7(0x1bf)])_0x409b5d[_0x9cc7b7(0x1a3)](_0x9cc7b7(0x1bf),_0x5549aa[_0x9cc7b7(0x1bf)]);if(_0x5549aa?.[_0x9cc7b7(0x189)])_0x409b5d[_0x9cc7b7(0x1a3)](_0x9cc7b7(0x189),_0x5549aa[_0x9cc7b7(0x189)]);if(_0x5549aa?.[_0x9cc7b7(0x17f)]!==undefined)_0x409b5d[_0x9cc7b7(0x1a3)]('favorite',String(_0x5549aa[_0x9cc7b7(0x17f)]));const _0x37cc33=await apiRequest(_0x9cc7b7(0x171)+_0x409b5d[_0x9cc7b7(0x179)]());return Array['isArray'](_0x37cc33[_0x9cc7b7(0x180)])?_0x37cc33[_0x9cc7b7(0x180)]:[];}export async function getRuntimeArtifact(_0x56ecb4,_0x42d123){const _0x5f4929=a47_0xf6fa,_0x56b1ad=await apiRequest(_0x5f4929(0x173)+_0x56ecb4+'?appCode='+encodeURIComponent(_0x42d123));if(!_0x56b1ad['data'])throw CliErrors['validation'](_0x5f4929(0x1be)+_0x56ecb4);return _0x56b1ad[_0x5f4929(0x180)];}export async function createRuntimeArtifact(_0x3af4af,_0xe52b98){const _0x278214=a47_0xf6fa,_0x11efa9=await apiRequest('/client/artifact/create',{'method':_0x278214(0x172),'body':{'appCode':_0x3af4af,..._0xe52b98}});return _0x11efa9[_0x278214(0x180)];}export async function updateRuntimeArtifact(_0x4f4a25,_0x3f0e8f,_0x3ac1cf){const _0xafd501=a47_0xf6fa,_0x3f55fe=await apiRequest(_0xafd501(0x173)+_0x4f4a25+_0xafd501(0x16a),{'method':'POST','body':{'appCode':_0x3f0e8f,..._0x3ac1cf}});return _0x3f55fe[_0xafd501(0x180)];}export async function listPersonalBffs(_0x293b78){const _0x45cb83=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x293b78));return Array['isArray'](_0x45cb83['data'])?_0x45cb83['data']:[];}export async function getPersonalBff(_0x153cf5,_0x3a53af){const _0x4f5ae8=a47_0xf6fa,_0x59e566=await apiRequest('/client/runtime-bff/personal/'+_0x153cf5+_0x4f5ae8(0x1a7)+encodeURIComponent(_0x3a53af));if(!_0x59e566[_0x4f5ae8(0x180)])throw CliErrors['validation'](_0x4f5ae8(0x182)+_0x153cf5);return _0x59e566[_0x4f5ae8(0x180)];}export async function createPersonalBff(_0x409333,_0x5af0f7){const _0x268af6=a47_0xf6fa,_0x2ccd06=await apiRequest(_0x268af6(0x1ab),{'method':'POST','body':{'appCode':_0x409333,..._0x5af0f7}});return _0x2ccd06[_0x268af6(0x180)];}export async function updatePersonalBff(_0x4f7f99,_0x29d6e9,_0x9f7db8){const _0x343940=a47_0xf6fa,_0x4b4994=await apiRequest('/client/runtime-bff/personal/'+_0x4f7f99+_0x343940(0x16a),{'method':_0x343940(0x172),'body':{'appCode':_0x29d6e9,..._0x9f7db8}});return _0x4b4994['data'];}export async function executePersonalBff(_0xae5cb3,_0xb0dfa3,_0x52f495){const _0x12f525=a47_0xf6fa,_0x27ffcc=await apiRequest(_0x12f525(0x1bc)+_0xae5cb3+_0x12f525(0x1bb)+encodeURIComponent(_0xb0dfa3),{'method':'POST','body':_0x52f495});return _0x27ffcc['data'];}export async function listPersonalKnowledgeBaseItems(_0x2f54e9){const _0x3892e4=a47_0xf6fa,_0x23b157=await apiRequest(_0x3892e4(0x19e)+encodeURIComponent(_0x2f54e9));return Array['isArray'](_0x23b157['data'])?_0x23b157['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x56bacd,_0x29c6c3){const _0x80e60c=a47_0xf6fa,_0x39a986=await apiRequest(_0x80e60c(0x17b)+_0x56bacd+_0x80e60c(0x1a7)+encodeURIComponent(_0x29c6c3));if(!_0x39a986['data'])throw CliErrors['validation']('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x56bacd);return _0x39a986[_0x80e60c(0x180)];}export async function createPersonalKnowledgeBaseItem(_0x5b6d59,_0x2fc603){const _0x2b8ead=a47_0xf6fa,_0x26db51=await apiRequest(_0x2b8ead(0x1a0),{'method':_0x2b8ead(0x172),'body':{'appCode':_0x5b6d59,..._0x2fc603}});return _0x26db51['data'];}export async function updatePersonalKnowledgeBaseItem(_0x566cc2,_0x20f34b,_0x34ae36){const _0x42a888=a47_0xf6fa,_0xae356d=await apiRequest(_0x42a888(0x17b)+_0x566cc2+'/update',{'method':'POST','body':{'appCode':_0x20f34b,..._0x34ae36}});return _0xae356d[_0x42a888(0x180)];}export async function searchKnowledgeBase(_0x33b0df,_0x526bdd){const _0x1d5db1=a47_0xf6fa,_0x469eef=await apiRequest(_0x1d5db1(0x196),{'method':_0x1d5db1(0x172),'body':{'appCode':_0x33b0df,'query':_0x526bdd[_0x1d5db1(0x1b9)],..._0x526bdd[_0x1d5db1(0x177)]!==undefined?{'topK':_0x526bdd[_0x1d5db1(0x177)]}:{}}});return Array[_0x1d5db1(0x16b)](_0x469eef[_0x1d5db1(0x180)])?_0x469eef[_0x1d5db1(0x180)]:[];}export async function listPersonalRuntimeSkills(_0x1c2db5){const _0x317659=a47_0xf6fa,_0x1da863=await apiRequest('/client/skill/personal/list?appCode='+encodeURIComponent(_0x1c2db5));return Array[_0x317659(0x16b)](_0x1da863[_0x317659(0x180)])?_0x1da863[_0x317659(0x180)]:[];}export async function listCompanyRuntimeSkills(_0x19cd73){const _0x33bd63=a47_0xf6fa,_0x4a787a=await apiRequest(_0x33bd63(0x188)+encodeURIComponent(_0x19cd73));return Array['isArray'](_0x4a787a[_0x33bd63(0x180)])?_0x4a787a[_0x33bd63(0x180)]:[];}function a47_0x4822(){const _0x218f82=['arrayBuffer','Personal\x20BFF\x20not\x20found:\x20id=','appName','validation','abort','API\x20error:\x20','from','/client/skill/company/list?appCode=','source','searchParams','signal','/client/skill/list?appCode=','/client/bff/query/','Configure\x20accessKey\x20in\x20','api-doc-generator','invokeSource','markdown','text','sqlCode','/client/skill/personal/create','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/knowledge-base/search','/client/app/my-apps','Download\x20failed:\x20','BFF\x20script\x20not\x20found:\x20id=','/client/dataset/list','/api/node-toolbox/','Request\x20timeout:\x20','Toolbox\x20error\x20code:\x20','/client/knowledge-base/personal/list?appCode=','authRequired','/client/knowledge-base/personal/create','application/json','4990643bqEjkz','set','message','Toolbox\x20API\x20error','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','?appCode=','success','AbortError','83768qUqpDv','/client/runtime-bff/personal/create','tableData','apiError','boolean','SQL\x20query\x20not\x20found:\x20','code','/client/skill/','json','494716tfrIqP','name','filter','string','2083098lkQVZs','7466296NTijQw','query','5qsKrjv','/execute?appCode=','/client/runtime-bff/personal/','/client/sql/query','Artifact\x20not\x20found:\x20id=','artifactType','/update','isArray','errorMsg','Check\x20your\x20credentials\x20and\x20try\x20again.','/client/skill/personal/','errorCode','newConfigFileName','/client/artifact/list?','POST','/client/artifact/','GET','object','status','topK','22687200fhDoxE','toString','test','/client/knowledge-base/personal/','1256632wwfcXU','appCode','126yxwSZl','favorite','data'];a47_0x4822=function(){return _0x218f82;};return a47_0x4822();}export async function listVisibleRuntimeSkills(_0xedef57){const _0x72fa97=a47_0xf6fa,_0x6bb0f1=await apiRequest(_0x72fa97(0x18c)+encodeURIComponent(_0xedef57));return Array[_0x72fa97(0x16b)](_0x6bb0f1[_0x72fa97(0x180)])?_0x6bb0f1[_0x72fa97(0x180)]:[];}export async function createPersonalRuntimeSkill(_0x39c0e0,_0x454032){const _0x11ab51=a47_0xf6fa,_0x4c5319=await apiRequest(_0x11ab51(0x194),{'method':_0x11ab51(0x172),'body':{'appCode':_0x39c0e0,..._0x454032}});return _0x4c5319[_0x11ab51(0x180)];}export async function updatePersonalRuntimeSkill(_0x3d8330,_0x3e2a23,_0x196e39){const _0x3ca7ee=a47_0xf6fa,_0x214d54=await apiRequest(_0x3ca7ee(0x16e)+encodeURIComponent(_0x3d8330)+'/update',{'method':_0x3ca7ee(0x172),'body':{'appCode':_0x3e2a23,..._0x196e39}});return _0x214d54[_0x3ca7ee(0x180)];}export async function downloadRuntimeSkillPackage(_0x15c4b9,_0x4cff49,_0x1644c6){const _0x339852=a47_0xf6fa;return apiBinaryRequest(_0x339852(0x1b1)+encodeURIComponent(_0x15c4b9)+'/'+encodeURIComponent(_0x4cff49)+'/package?appCode='+encodeURIComponent(_0x1644c6));}
|
|
1
|
+
(function(_0x373eea,_0x1a9337){const _0xfc5813=a49_0x1a65,_0x21c16c=_0x373eea();while(!![]){try{const _0x3d5b40=parseInt(_0xfc5813(0x22c))/0x1*(-parseInt(_0xfc5813(0x1f8))/0x2)+parseInt(_0xfc5813(0x1f2))/0x3+parseInt(_0xfc5813(0x224))/0x4+-parseInt(_0xfc5813(0x227))/0x5*(-parseInt(_0xfc5813(0x1dc))/0x6)+-parseInt(_0xfc5813(0x1fe))/0x7+parseInt(_0xfc5813(0x20f))/0x8+-parseInt(_0xfc5813(0x1f5))/0x9;if(_0x3d5b40===_0x1a9337)break;else _0x21c16c['push'](_0x21c16c['shift']());}catch(_0x3d2697){_0x21c16c['push'](_0x21c16c['shift']());}}}(a49_0x5165,0x3a4f8));import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a49_0x1a65(_0x1cd177,_0xbfe0f5){_0x1cd177=_0x1cd177-0x1da;const _0x516506=a49_0x5165();let _0x1a6589=_0x516506[_0x1cd177];return _0x1a6589;}function a49_0x5165(){const _0x317049=['authRequired','status','object','586392RfVMaH','/client/user/loginUserInfo','errorCode','3211461IoRMyN','POST','isArray','4rGzFEN','Artifact\x20not\x20found:\x20id=','API\x20error\x20code:\x20','set','/client/artifact/','API\x20error:\x20','582253bMZuuf','artifactType','Request\x20timeout:\x20','/client/knowledge-base/search','newConfigFileName','errorMsg','Toolbox\x20API\x20error','/client/runtime-bff/personal/list?appCode=','Download\x20failed:\x20','filter','message','/client/skill/','markdown','/execute?appCode=','success','source','signal','3186096UUOLbi','searchParams','AbortError','invokeSource','Toolbox\x20error\x20code:\x20','replace','favorite','?appCode=','from','/client/skill/personal/create','/client/skill/company/list?appCode=','Knowledge-base\x20entry\x20not\x20found:\x20id=','GET','tableData','catch','/client/bff/query/','string','code','apiError','/client/skill/personal/list?appCode=','/client/knowledge-base/personal/','936644jYnRXR','boolean','/client/skill/personal/','572195YxbaVl','application/json','json','SQL\x20query\x20not\x20found:\x20','data','131739JUcTaL','/update','Configure\x20accessKey\x20in\x20','6hWzzSW','toString','/client/artifact/create','appName','test','/client/skill/list?appCode=','/api/node-toolbox/','sqlCode','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','stringify','Check\x20your\x20credentials\x20and\x20try\x20again.','/client/dataset/list','/client/dataset/query?','name','entries','/client/runtime-bff/personal/','abort','validation'];a49_0x5165=function(){return _0x317049;};return a49_0x5165();}import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x30191c){_activeAK=_0x30191c||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x452ebe,_0x1ef48a={}){const _0x44bba6=a49_0x1a65,{method:method=_0x44bba6(0x21b),body:_0x5d711d,headers:headers={},timeout:timeout=0x7530}=_0x1ef48a,_0x258f64=_activeAK,_0x30a815=getRuntimeDomain();if(!_0x258f64)throw CliErrors[_0x44bba6(0x1ef)](_0x44bba6(0x1db)+PRODUCT_CONFIG[_0x44bba6(0x202)]+'.');const _0x42c441=''+_0x30a815+_0x452ebe,_0x50be89={'X-User-AK':_0x258f64},_0x321403=new AbortController(),_0x249e70=setTimeout(()=>_0x321403[_0x44bba6(0x1ed)](),timeout);try{const _0x4eff4c=await fetch(_0x42c441,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x44bba6(0x212)],..._0x50be89,...headers},'body':_0x5d711d?JSON[_0x44bba6(0x1e6)](_0x5d711d):undefined,'signal':_0x321403['signal']});let _0x3b4d56;try{_0x3b4d56=await _0x4eff4c[_0x44bba6(0x229)]();}catch{throw CliErrors[_0x44bba6(0x221)](_0x44bba6(0x1e4)+_0x4eff4c[_0x44bba6(0x1f0)]+')',_0x4eff4c[_0x44bba6(0x1f0)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x4eff4c['ok']||_0x3b4d56['success']===![])throw CliErrors[_0x44bba6(0x221)](_0x3b4d56['errorMsg']||_0x3b4d56[_0x44bba6(0x208)]||'API\x20error:\x20'+_0x4eff4c[_0x44bba6(0x1f0)],_0x3b4d56[_0x44bba6(0x1f4)]?_0x44bba6(0x1fa)+_0x3b4d56[_0x44bba6(0x1f4)]:undefined);return _0x3b4d56;}catch(_0xc6be6f){if(_0xc6be6f instanceof Error&&_0xc6be6f['name']===_0x44bba6(0x211))throw CliErrors[_0x44bba6(0x221)](_0x44bba6(0x200)+_0x42c441);throw _0xc6be6f;}finally{clearTimeout(_0x249e70);}}async function apiBinaryRequest(_0x59e841,_0x1dff2a={}){const _0x5e079c=a49_0x1a65,{method:method=_0x5e079c(0x21b),headers:headers={},timeout:timeout=0x7530}=_0x1dff2a,_0x172e6a=_activeAK,_0x2d806b=getRuntimeDomain();if(!_0x172e6a)throw CliErrors[_0x5e079c(0x1ef)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x2b76d1=''+_0x2d806b+_0x59e841,_0x1b0c4a=new AbortController(),_0x25e631=setTimeout(()=>_0x1b0c4a[_0x5e079c(0x1ed)](),timeout);try{const _0x21d0b6=await fetch(_0x2b76d1,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x5e079c(0x212)],'X-User-AK':_0x172e6a,...headers},'signal':_0x1b0c4a['signal']});if(!_0x21d0b6['ok']){let _0x15fe4f;try{const _0x2be038=await _0x21d0b6[_0x5e079c(0x229)]();_0x15fe4f=_0x2be038[_0x5e079c(0x203)]||_0x2be038[_0x5e079c(0x208)]||_0x2be038[_0x5e079c(0x1f4)];}catch{_0x15fe4f=await _0x21d0b6['text']()[_0x5e079c(0x21d)](()=>undefined);}throw CliErrors[_0x5e079c(0x221)](_0x15fe4f||_0x5e079c(0x1fd)+_0x21d0b6['status'],_0x5e079c(0x206)+_0x2b76d1);}return Buffer[_0x5e079c(0x217)](await _0x21d0b6['arrayBuffer']());}catch(_0x251080){if(_0x251080 instanceof Error&&_0x251080[_0x5e079c(0x1ea)]==='AbortError')throw CliErrors[_0x5e079c(0x221)](_0x5e079c(0x200)+_0x2b76d1);throw _0x251080;}finally{clearTimeout(_0x25e631);}}async function toolboxRequest(_0x4152d9,_0x12a13b,_0x77b5={}){const _0x2ff66a=a49_0x1a65,{method:method=_0x2ff66a(0x21b),headers:headers={},timeout:timeout=0x7530}=_0x77b5,_0x18f5e6=_activeAK;if(!_0x18f5e6)throw CliErrors[_0x2ff66a(0x1ef)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x2ff66a(0x202)]+'.');const _0x5e7c64=getApiDomain()[_0x2ff66a(0x214)](/\/$/,''),_0xa98b0d=new URL(_0x4152d9,_0x5e7c64+_0x2ff66a(0x1e2));if(_0x12a13b)for(const [_0xf2036d,_0x365450]of Object[_0x2ff66a(0x1eb)](_0x12a13b)){_0x365450!==undefined&&_0x365450!==null&&_0xa98b0d[_0x2ff66a(0x210)][_0x2ff66a(0x1fb)](_0xf2036d,String(_0x365450));}const _0x3cac2b=new AbortController(),_0x1a96d6=setTimeout(()=>_0x3cac2b[_0x2ff66a(0x1ed)](),timeout);try{const _0x21f815=await fetch(_0xa98b0d,{'method':method,'headers':{'Content-Type':_0x2ff66a(0x228),'X-Invoke-Source':PRODUCT_CONFIG[_0x2ff66a(0x212)],'X-User-AK':_0x18f5e6,...headers},'signal':_0x3cac2b[_0x2ff66a(0x20e)]});let _0x17b7bb;try{_0x17b7bb=await _0x21f815[_0x2ff66a(0x229)]();}catch{throw CliErrors[_0x2ff66a(0x221)](_0x2ff66a(0x1e5)+_0x21f815[_0x2ff66a(0x1f0)]+')',_0x21f815['status']>=0x190?_0x2ff66a(0x1e7):undefined);}if(!_0x21f815['ok']){const _0x2a7c15=_0x17b7bb&&typeof _0x17b7bb===_0x2ff66a(0x1f1)?_0x17b7bb:{};throw CliErrors[_0x2ff66a(0x221)](_0x2a7c15['errorMsg']||_0x2a7c15['message']||'Toolbox\x20API\x20error:\x20'+_0x21f815['status'],_0x2a7c15[_0x2ff66a(0x1f4)]?_0x2ff66a(0x213)+_0x2a7c15['errorCode']:undefined);}if(_0x17b7bb&&typeof _0x17b7bb===_0x2ff66a(0x1f1)&&_0x2ff66a(0x20c)in _0x17b7bb&&typeof _0x17b7bb['success']===_0x2ff66a(0x225)){const _0x2320ee=_0x17b7bb;if(!_0x2320ee['success'])throw CliErrors[_0x2ff66a(0x221)](_0x2320ee[_0x2ff66a(0x203)]||_0x2320ee[_0x2ff66a(0x208)]||_0x2ff66a(0x204),_0x2320ee[_0x2ff66a(0x1f4)]?'Toolbox\x20error\x20code:\x20'+_0x2320ee['errorCode']:undefined);return _0x2320ee['data'];}return _0x17b7bb;}catch(_0x415b5f){if(_0x415b5f instanceof Error&&_0x415b5f[_0x2ff66a(0x1ea)]===_0x2ff66a(0x211))throw CliErrors[_0x2ff66a(0x221)]('Request\x20timeout:\x20'+_0xa98b0d['toString']());throw _0x415b5f;}finally{clearTimeout(_0x1a96d6);}}export async function getBffScriptInfo(_0x532df4){const _0x15a2d9=a49_0x1a65,_0x49cede=await apiRequest(_0x15a2d9(0x21e)+_0x532df4);if(!_0x49cede[_0x15a2d9(0x22b)])throw CliErrors['validation']('BFF\x20script\x20not\x20found:\x20id='+_0x532df4);return _0x49cede[_0x15a2d9(0x22b)];}export async function getSqlQueryInfo(_0x33192a,_0x564fca){const _0x564895=a49_0x1a65,_0x514ff0=await apiRequest('/client/sql/query',{'method':_0x564895(0x1f6),'body':{'appCode':_0x33192a,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x564fca}}),_0x1d81df=_0x514ff0['data'],_0x4e1aff=_0x1d81df&&typeof _0x1d81df===_0x564895(0x1f1)&&'tableData'in _0x1d81df?_0x1d81df[_0x564895(0x21c)]?.[0x0]:_0x1d81df&&typeof _0x1d81df===_0x564895(0x1f1)&&_0x564895(0x1e3)in _0x1d81df?_0x1d81df:undefined;if(!_0x4e1aff)throw CliErrors[_0x564895(0x1ee)](_0x564895(0x22a)+_0x564fca);return _0x4e1aff;}function isRemoteAppItem(_0x225ba9){const _0x1244ac=a49_0x1a65;return!!_0x225ba9&&typeof _0x225ba9===_0x1244ac(0x1f1)&&typeof _0x225ba9['appCode']===_0x1244ac(0x21f)&&typeof _0x225ba9[_0x1244ac(0x1df)]===_0x1244ac(0x21f);}function extractRemoteAppItems(_0x574129){const _0x9235b0=a49_0x1a65;if(Array[_0x9235b0(0x1f7)](_0x574129))return _0x574129[_0x9235b0(0x207)](isRemoteAppItem);if(!_0x574129||typeof _0x574129!=='object')throw CliErrors[_0x9235b0(0x221)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0xe63c2b=_0x574129;if(Array[_0x9235b0(0x1f7)](_0xe63c2b[_0x9235b0(0x21c)]))return _0xe63c2b[_0x9235b0(0x21c)][_0x9235b0(0x207)](isRemoteAppItem);if(_0xe63c2b[_0x9235b0(0x22b)]&&typeof _0xe63c2b[_0x9235b0(0x22b)]==='object'){const _0x5202f1=_0xe63c2b['data'];if(Array['isArray'](_0x5202f1[_0x9235b0(0x21c)]))return _0x5202f1[_0x9235b0(0x21c)][_0x9235b0(0x207)](isRemoteAppItem);}throw CliErrors['apiError']('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x385930=a49_0x1a65,_0x3e6c6a=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x3e6c6a[_0x385930(0x22b)]);}export async function getLoginUserInfo(){const _0x371cff=a49_0x1a65,_0x511d18=await apiRequest(_0x371cff(0x1f3));if(!_0x511d18[_0x371cff(0x22b)]||typeof _0x511d18['data']!=='object'||Array[_0x371cff(0x1f7)](_0x511d18[_0x371cff(0x22b)]))throw CliErrors['apiError']('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x511d18['data'];}export async function listDatasets(_0x2a57b4,_0x43ebf8){const _0x4ef380=a49_0x1a65,_0x1d51ae=await apiRequest(_0x4ef380(0x1e8),{'method':_0x4ef380(0x1f6),'body':{'appCode':_0x2a57b4,..._0x43ebf8?.['code']&&{'code':_0x43ebf8['code']},..._0x43ebf8?.['name']&&{'name':_0x43ebf8[_0x4ef380(0x1ea)]}}});return extractList(_0x1d51ae[_0x4ef380(0x22b)]);}export async function getDatasetDetail(_0x5dccd8){const _0x230984=a49_0x1a65,_0x13f8f3=/^\d+$/[_0x230984(0x1e0)](_0x5dccd8)?'id':_0x230984(0x220),_0x205a83=await apiRequest(_0x230984(0x1e9)+_0x13f8f3+'='+_0x5dccd8);return _0x205a83[_0x230984(0x22b)];}export async function getDatasetSdkUsageDoc(_0x46661e,_0x24cd1f){const _0x343ea3=a49_0x1a65,_0x24d3e9=await toolboxRequest('api-doc-generator',{'datasetCode':_0x46661e,'appCode':_0x24cd1f});return typeof _0x24d3e9?.[_0x343ea3(0x20a)]==='string'?_0x24d3e9[_0x343ea3(0x20a)]:'';}export async function listRuntimeArtifacts(_0x31af39,_0x2c5403){const _0x4ede6a=a49_0x1a65,_0x34aa60=new URLSearchParams({'appCode':_0x31af39});if(_0x2c5403?.['artifactType'])_0x34aa60[_0x4ede6a(0x1fb)](_0x4ede6a(0x1ff),_0x2c5403[_0x4ede6a(0x1ff)]);if(_0x2c5403?.[_0x4ede6a(0x20d)])_0x34aa60[_0x4ede6a(0x1fb)]('source',_0x2c5403[_0x4ede6a(0x20d)]);if(_0x2c5403?.['favorite']!==undefined)_0x34aa60[_0x4ede6a(0x1fb)](_0x4ede6a(0x215),String(_0x2c5403[_0x4ede6a(0x215)]));const _0x3c3d79=await apiRequest('/client/artifact/list?'+_0x34aa60[_0x4ede6a(0x1dd)]());return Array[_0x4ede6a(0x1f7)](_0x3c3d79[_0x4ede6a(0x22b)])?_0x3c3d79[_0x4ede6a(0x22b)]:[];}export async function getRuntimeArtifact(_0x1782f1,_0x1d25cd){const _0x3ae85c=a49_0x1a65,_0x476d75=await apiRequest('/client/artifact/'+_0x1782f1+_0x3ae85c(0x216)+encodeURIComponent(_0x1d25cd));if(!_0x476d75['data'])throw CliErrors[_0x3ae85c(0x1ee)](_0x3ae85c(0x1f9)+_0x1782f1);return _0x476d75[_0x3ae85c(0x22b)];}export async function createRuntimeArtifact(_0x68c0ba,_0x56a9cd){const _0x13aa40=a49_0x1a65,_0x4d663e=await apiRequest(_0x13aa40(0x1de),{'method':_0x13aa40(0x1f6),'body':{'appCode':_0x68c0ba,..._0x56a9cd}});return _0x4d663e[_0x13aa40(0x22b)];}export async function updateRuntimeArtifact(_0x5589ca,_0x18be39,_0x126482){const _0x5d4ef5=a49_0x1a65,_0x45e4e4=await apiRequest(_0x5d4ef5(0x1fc)+_0x5589ca+_0x5d4ef5(0x1da),{'method':_0x5d4ef5(0x1f6),'body':{'appCode':_0x18be39,..._0x126482}});return _0x45e4e4[_0x5d4ef5(0x22b)];}export async function listPersonalBffs(_0x2825d0){const _0x1da5ba=a49_0x1a65,_0x33c488=await apiRequest(_0x1da5ba(0x205)+encodeURIComponent(_0x2825d0));return Array[_0x1da5ba(0x1f7)](_0x33c488['data'])?_0x33c488['data']:[];}export async function getPersonalBff(_0x945544,_0x3771c2){const _0x49ec00=a49_0x1a65,_0xb8673b=await apiRequest(_0x49ec00(0x1ec)+_0x945544+'?appCode='+encodeURIComponent(_0x3771c2));if(!_0xb8673b[_0x49ec00(0x22b)])throw CliErrors[_0x49ec00(0x1ee)]('Personal\x20BFF\x20not\x20found:\x20id='+_0x945544);return _0xb8673b['data'];}export async function createPersonalBff(_0xa8cf5a,_0x3ac9ac){const _0x9329b4=a49_0x1a65,_0xb487a4=await apiRequest('/client/runtime-bff/personal/create',{'method':'POST','body':{'appCode':_0xa8cf5a,..._0x3ac9ac}});return _0xb487a4[_0x9329b4(0x22b)];}export async function updatePersonalBff(_0x3addeb,_0x108599,_0x51d005){const _0x35c1bd=a49_0x1a65,_0x3cc4f2=await apiRequest(_0x35c1bd(0x1ec)+_0x3addeb+_0x35c1bd(0x1da),{'method':_0x35c1bd(0x1f6),'body':{'appCode':_0x108599,..._0x51d005}});return _0x3cc4f2[_0x35c1bd(0x22b)];}export async function executePersonalBff(_0x1a45d9,_0x33064d,_0x43d8d8){const _0x4d9e3a=a49_0x1a65,_0x19da7e=await apiRequest(_0x4d9e3a(0x1ec)+_0x1a45d9+_0x4d9e3a(0x20b)+encodeURIComponent(_0x33064d),{'method':_0x4d9e3a(0x1f6),'body':_0x43d8d8});return _0x19da7e[_0x4d9e3a(0x22b)];}export async function listPersonalKnowledgeBaseItems(_0x5b54c9){const _0x526279=a49_0x1a65,_0x3b0be3=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x5b54c9));return Array['isArray'](_0x3b0be3[_0x526279(0x22b)])?_0x3b0be3[_0x526279(0x22b)]:[];}export async function getPersonalKnowledgeBaseItem(_0x300a02,_0x5d958f){const _0x436fed=a49_0x1a65,_0x1bea23=await apiRequest(_0x436fed(0x223)+_0x300a02+'?appCode='+encodeURIComponent(_0x5d958f));if(!_0x1bea23[_0x436fed(0x22b)])throw CliErrors[_0x436fed(0x1ee)](_0x436fed(0x21a)+_0x300a02);return _0x1bea23['data'];}export async function createPersonalKnowledgeBaseItem(_0x303177,_0x3f0c2e){const _0x1b7704=a49_0x1a65,_0x313300=await apiRequest('/client/knowledge-base/personal/create',{'method':'POST','body':{'appCode':_0x303177,..._0x3f0c2e}});return _0x313300[_0x1b7704(0x22b)];}export async function updatePersonalKnowledgeBaseItem(_0x1ba665,_0x5d8797,_0x2c8a05){const _0x45424e=a49_0x1a65,_0x86ca91=await apiRequest(_0x45424e(0x223)+_0x1ba665+'/update',{'method':_0x45424e(0x1f6),'body':{'appCode':_0x5d8797,..._0x2c8a05}});return _0x86ca91[_0x45424e(0x22b)];}export async function searchKnowledgeBase(_0x2b4a2f,_0x34e75a){const _0x5beaba=a49_0x1a65,_0x2fe0bd=await apiRequest(_0x5beaba(0x201),{'method':'POST','body':{'appCode':_0x2b4a2f,'query':_0x34e75a['query'],..._0x34e75a['topK']!==undefined?{'topK':_0x34e75a['topK']}:{}}});return Array[_0x5beaba(0x1f7)](_0x2fe0bd[_0x5beaba(0x22b)])?_0x2fe0bd[_0x5beaba(0x22b)]:[];}export async function listPersonalRuntimeSkills(_0x4fa61a){const _0x14adfe=a49_0x1a65,_0x3eccb2=await apiRequest(_0x14adfe(0x222)+encodeURIComponent(_0x4fa61a));return Array[_0x14adfe(0x1f7)](_0x3eccb2[_0x14adfe(0x22b)])?_0x3eccb2[_0x14adfe(0x22b)]:[];}export async function listCompanyRuntimeSkills(_0x5a3b67){const _0x3bb903=a49_0x1a65,_0x4d13e8=await apiRequest(_0x3bb903(0x219)+encodeURIComponent(_0x5a3b67));return Array['isArray'](_0x4d13e8[_0x3bb903(0x22b)])?_0x4d13e8['data']:[];}export async function listVisibleRuntimeSkills(_0x110a2b){const _0x4cfbc4=a49_0x1a65,_0x3b617f=await apiRequest(_0x4cfbc4(0x1e1)+encodeURIComponent(_0x110a2b));return Array[_0x4cfbc4(0x1f7)](_0x3b617f[_0x4cfbc4(0x22b)])?_0x3b617f['data']:[];}export async function createPersonalRuntimeSkill(_0x2d1bed,_0x2c46ca){const _0x116cb2=a49_0x1a65,_0x5e8b87=await apiRequest(_0x116cb2(0x218),{'method':_0x116cb2(0x1f6),'body':{'appCode':_0x2d1bed,..._0x2c46ca}});return _0x5e8b87[_0x116cb2(0x22b)];}export async function updatePersonalRuntimeSkill(_0x29acb7,_0x41e222,_0x1a2c4d){const _0x2b8f95=a49_0x1a65,_0x217004=await apiRequest(_0x2b8f95(0x226)+encodeURIComponent(_0x29acb7)+_0x2b8f95(0x1da),{'method':_0x2b8f95(0x1f6),'body':{'appCode':_0x41e222,..._0x1a2c4d}});return _0x217004['data'];}export async function downloadRuntimeSkillPackage(_0x1f977d,_0x2e46bb,_0x489019){const _0x252763=a49_0x1a65;return apiBinaryRequest(_0x252763(0x209)+encodeURIComponent(_0x1f977d)+'/'+encodeURIComponent(_0x2e46bb)+'/package?appCode='+encodeURIComponent(_0x489019));}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c8a28,_0x5b06e8){const _0x4d9714=a50_0x2579,_0x3212f5=_0x1c8a28();while(!![]){try{const _0x138a32=parseInt(_0x4d9714(0x157))/0x1+parseInt(_0x4d9714(0x165))/0x2*(-parseInt(_0x4d9714(0x161))/0x3)+parseInt(_0x4d9714(0x160))/0x4+-parseInt(_0x4d9714(0x15a))/0x5*(parseInt(_0x4d9714(0x15f))/0x6)+-parseInt(_0x4d9714(0x15d))/0x7*(-parseInt(_0x4d9714(0x162))/0x8)+parseInt(_0x4d9714(0x155))/0x9+parseInt(_0x4d9714(0x158))/0xa;if(_0x138a32===_0x5b06e8)break;else _0x3212f5['push'](_0x3212f5['shift']());}catch(_0x949e4b){_0x3212f5['push'](_0x3212f5['shift']());}}}(a50_0xb1b3,0xe74cc));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x136e2e){const _0x3eda4d=a50_0x2579;if(cache[_0x3eda4d(0x15b)](_0x136e2e))return cache[_0x3eda4d(0x159)](_0x136e2e);const _0x161ba9=await listDatasets(_0x136e2e),_0x2211fa=new Map();for(const _0x5009da of _0x161ba9){const _0x22389d=_0x5009da[_0x3eda4d(0x15e)];_0x22389d?.[_0x3eda4d(0x166)]!=null&&_0x2211fa['set'](_0x22389d[_0x3eda4d(0x166)],_0x22389d[_0x3eda4d(0x156)]??_0x3eda4d(0x15c)+_0x22389d['dbId']);}const _0x37dc5a=[..._0x2211fa[_0x3eda4d(0x163)]()]['map'](([_0x3ed88c,_0x1f3c66])=>({'dbId':_0x3ed88c,'dbName':_0x1f3c66}));return cache[_0x3eda4d(0x164)](_0x136e2e,_0x37dc5a),_0x37dc5a;}export async function getDbName(_0x5a07d8,_0x34e0ea){const _0x19750f=a50_0x2579;try{const _0x3d3983=await listDatabases(_0x5a07d8);return _0x3d3983[_0x19750f(0x167)](_0x5de82b=>_0x5de82b[_0x19750f(0x166)]===_0x34e0ea)?.[_0x19750f(0x156)];}catch{return undefined;}}function a50_0x2579(_0x3187f4,_0x5c81ae){_0x3187f4=_0x3187f4-0x155;const _0xb1b31=a50_0xb1b3();let _0x257971=_0xb1b31[_0x3187f4];return _0x257971;}function a50_0xb1b3(){const _0x1e4993=['24aiaUJb','entries','set','2LAXXIV','dbId','find','3814632HRbhcf','dbName','1136164lQMdqS','5410220bEZEUd','get','7093595JUJOYs','has','db-','2783179dsoIHb','dbtableConfig','6nlLGwR','1903228WKZweL','4210527NaFExy'];a50_0xb1b3=function(){return _0x1e4993;};return a50_0xb1b3();}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32b9e6,_0x35587f){const _0x195a15=a51_0x4489,_0x25b1d0=_0x32b9e6();while(!![]){try{const _0x4c6db2=parseInt(_0x195a15(0x174))/0x1*(parseInt(_0x195a15(0x17c))/0x2)+parseInt(_0x195a15(0x17d))/0x3+-parseInt(_0x195a15(0x176))/0x4+parseInt(_0x195a15(0x16d))/0x5*(-parseInt(_0x195a15(0x16b))/0x6)+parseInt(_0x195a15(0x170))/0x7+parseInt(_0x195a15(0x177))/0x8+parseInt(_0x195a15(0x175))/0x9*(-parseInt(_0x195a15(0x16f))/0xa);if(_0x4c6db2===_0x35587f)break;else _0x25b1d0['push'](_0x25b1d0['shift']());}catch(_0x2ec49f){_0x25b1d0['push'](_0x25b1d0['shift']());}}}(a51_0x1a3a,0x68149));function a51_0x4489(_0x227d16,_0x2e9a43){_0x227d16=_0x227d16-0x168;const _0x1a3a25=a51_0x1a3a();let _0x4489e3=_0x1a3a25[_0x227d16];return _0x4489e3;}function a51_0x1a3a(){const _0x528ba7=['update','sql','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','execute','bff','env','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','accessKey','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','function','858bupwVT','dataset_','6285GOkSaJ','batchCreate','20aBnmRh','4610228OCpdyX','appCode','getOne','authMode','2377JWoCqJ','1465632areUOF','2316272LxejNL','995928xOrhEu','invokeSource','delete','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','models','470KOZrSw','507414rCNZZN','isArray'];a51_0x1a3a=function(){return _0x528ba7;};return a51_0x1a3a();}import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x52ea45){const _0x3d19ef=a51_0x4489;_client=createClient({'appCode':_0x52ea45[_0x3d19ef(0x171)],'env':_0x52ea45[_0x3d19ef(0x184)],'authMode':_0x52ea45[_0x3d19ef(0x173)],..._0x52ea45[_0x3d19ef(0x186)]?{'accessKey':_0x52ea45[_0x3d19ef(0x186)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x3d19ef(0x178)]}}});}function ensureClient(){const _0x259088=a51_0x4489;if(!_client)throw new Error(_0x259088(0x169));return _client;}export async function executeData(_0x1ffcd9,_0x1bf903,_0x7c973){const _0x3a1bf4=a51_0x4489,_0x49ac18=ensureClient(),_0x53d572=_0x3a1bf4(0x16c)+_0x1ffcd9,_0x133b8a=_0x49ac18[_0x3a1bf4(0x17b)][_0x53d572];if(!_0x133b8a||typeof _0x133b8a[_0x1bf903]!==_0x3a1bf4(0x16a))throw new Error('SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22'+_0x1bf903+'\x22.\x20'+_0x3a1bf4(0x181));if(_0x1bf903===_0x3a1bf4(0x16e))return _0x133b8a[_0x3a1bf4(0x16e)](parseBatchCreateItemsFromParams(_0x7c973));const _0x2a6f1b=_0x7c973!==undefined&&_0x7c973!==null&&!Array[_0x3a1bf4(0x17e)](_0x7c973)?_0x7c973:{};switch(_0x1bf903){case'getOne':{const _0x53c230=_0x2a6f1b['id'];if(_0x53c230===undefined||_0x53c230===null)throw new Error(_0x3a1bf4(0x168));return _0x133b8a[_0x3a1bf4(0x172)](_0x53c230);}case _0x3a1bf4(0x17f):{const {id:_0x3d9030,..._0x2ac3e5}=_0x2a6f1b;if(_0x3d9030===undefined||_0x3d9030===null)throw new Error(_0x3a1bf4(0x17a));return _0x133b8a['update'](_0x3d9030,_0x2ac3e5);}case _0x3a1bf4(0x179):{const _0x5385dc=_0x2a6f1b['id'];if(_0x5385dc===undefined||_0x5385dc===null)throw new Error(_0x3a1bf4(0x185));return _0x133b8a['delete'](_0x5385dc);}default:return _0x133b8a[_0x1bf903](_0x2a6f1b);}}export async function executeSdkSql(_0x49a357,_0x49766f){const _0x3d2576=a51_0x4489,_0x1ad61a=ensureClient();return _0x1ad61a[_0x3d2576(0x180)][_0x3d2576(0x182)]({'sqlCode':_0x49a357,'params':_0x49766f});}export async function executeSdkBff(_0x1159ef,_0x11dc4c){const _0x3b3c77=a51_0x4489,_0x29e650=ensureClient();return _0x29e650[_0x3b3c77(0x183)][_0x3b3c77(0x182)]({'scriptName':_0x1159ef,'params':_0x11dc4c});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x286026=a52_0x22d3;function a52_0xb614(){const _0x39366c=['5416IEyXBG','33902sGHXjN','574740DWsqPy','\x20auth\x20login`.','newConfigFileName','47790950HUOUtq','8287911dUdVmT','2513GIYtRo','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','Configure\x20accessKey\x20in\x20','\x20or\x20run\x20`','2182115BUjEUf','2372BPUpYa','5703MOlvFP','\x20file.','98tERiEm'];a52_0xb614=function(){return _0x39366c;};return a52_0xb614();}(function(_0x73dacc,_0x506549){const _0x32ad5d=a52_0x22d3,_0x477859=_0x73dacc();while(!![]){try{const _0x5ce08f=-parseInt(_0x32ad5d(0x1f6))/0x1*(parseInt(_0x32ad5d(0x1f4))/0x2)+parseInt(_0x32ad5d(0x1f2))/0x3*(-parseInt(_0x32ad5d(0x1f1))/0x4)+-parseInt(_0x32ad5d(0x1f0))/0x5+parseInt(_0x32ad5d(0x1e7))/0x6+-parseInt(_0x32ad5d(0x1ec))/0x7*(-parseInt(_0x32ad5d(0x1f5))/0x8)+-parseInt(_0x32ad5d(0x1eb))/0x9+parseInt(_0x32ad5d(0x1ea))/0xa;if(_0x5ce08f===_0x506549)break;else _0x477859['push'](_0x477859['shift']());}catch(_0x4f5009){_0x477859['push'](_0x477859['shift']());}}}(a52_0xb614,0xed567));function a52_0x22d3(_0x3ad854,_0x534af4){_0x3ad854=_0x3ad854-0x1e7;const _0xb6148b=a52_0xb614();let _0x22d36a=_0xb6148b[_0x3ad854];return _0x22d36a;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a52_0x286026(0x1ee)+PRODUCT_CONFIG[a52_0x286026(0x1e9)]+a52_0x286026(0x1ef)+CLI_BIN_NAME+a52_0x286026(0x1e8),'configMissingHint':'Set\x20appcode\x20via\x20--appcode\x20or\x20'+PRODUCT_CONFIG[a52_0x286026(0x1e9)]+'.','notInProjectHint':a52_0x286026(0x1ed)+PRODUCT_CONFIG[a52_0x286026(0x1e9)]+a52_0x286026(0x1f3)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2fc435,_0x3a6b8d){var _0x519918=a53_0x4f25,_0xb29055=_0x2fc435();while(!![]){try{var _0x267c18=-parseInt(_0x519918(0xcc))/0x1+parseInt(_0x519918(0xca))/0x2+parseInt(_0x519918(0xc5))/0x3+parseInt(_0x519918(0xc3))/0x4*(parseInt(_0x519918(0xc6))/0x5)+parseInt(_0x519918(0xc7))/0x6+-parseInt(_0x519918(0xc9))/0x7*(parseInt(_0x519918(0xc4))/0x8)+parseInt(_0x519918(0xcb))/0x9*(-parseInt(_0x519918(0xc8))/0xa);if(_0x267c18===_0x3a6b8d)break;else _0xb29055['push'](_0xb29055['shift']());}catch(_0x5f016d){_0xb29055['push'](_0xb29055['shift']());}}}(a53_0x42de,0xc19cd));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a53_0x4f25(_0x14b13a,_0x531c58){_0x14b13a=_0x14b13a-0xc3;var _0x42de33=a53_0x42de();var _0x4f2523=_0x42de33[_0x14b13a];return _0x4f2523;}import{buildAllFlags as a53_0x31cbbf}from'@lovrabet/cli-framework';function a53_0x42de(){var _0xfaca31=['8Svfwwf','2087232BUoAjH','20aVnyJH','1453938VninaI','10LwbRey','2778881qGOsZq','2540122YCYkvQ','20675673kGkItr','140167xmiTso','1419356iJscQv'];a53_0x42de=function(){return _0xfaca31;};return a53_0x42de();}export function buildAllFlags(_0x2ae3b0){return a53_0x31cbbf(_0x2ae3b0,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0xd37a(){const _0x2435b9=['1091770KXjuna','66232dBnxml','description','261HEAUoI','504820turHhk','154041seCBzG','3886330MncjGZ','75GDgWAY','12XiCbUz','117618gIgNEO','2076250cXwcUz','body'];a54_0xd37a=function(){return _0x2435b9;};return a54_0xd37a();}function a54_0x3e6a(_0x37787c,_0x2cbb7e){_0x37787c=_0x37787c-0xbe;const _0xd37abf=a54_0xd37a();let _0x3e6a70=_0xd37abf[_0x37787c];return _0x3e6a70;}(function(_0x404c3a,_0x305dc8){const _0x52f528=a54_0x3e6a,_0x4f8ea8=_0x404c3a();while(!![]){try{const _0x4994cd=-parseInt(_0x52f528(0xc2))/0x1+parseInt(_0x52f528(0xbe))/0x2+parseInt(_0x52f528(0xc3))/0x3*(parseInt(_0x52f528(0xc6))/0x4)+parseInt(_0x52f528(0xc5))/0x5*(parseInt(_0x52f528(0xc7))/0x6)+-parseInt(_0x52f528(0xc4))/0x7+-parseInt(_0x52f528(0xbf))/0x8*(-parseInt(_0x52f528(0xc1))/0x9)+parseInt(_0x52f528(0xc8))/0xa;if(_0x4994cd===_0x305dc8)break;else _0x4f8ea8['push'](_0x4f8ea8['shift']());}catch(_0x459fdc){_0x4f8ea8['push'](_0x4f8ea8['shift']());}}}(a54_0xd37a,0x5d2ed));export function dryRun(_0x2fb264,_0x12502d){const _0x4285ef={'method':_0x2fb264,'url':_0x12502d},_0x55fc65={'body'(_0x33cf14){const _0x292692=a54_0x3e6a;return _0x4285ef[_0x292692(0xc9)]=_0x33cf14,_0x55fc65;},'description'(_0x5a0e4){const _0x4723ba=a54_0x3e6a;return _0x4285ef[_0x4723ba(0xc0)]=_0x5a0e4,_0x55fc65;},'build'(){return{..._0x4285ef};}};return _0x55fc65;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x38217c=a55_0x2a0f;function a55_0x2a0f(_0x3b0869,_0x5394f2){_0x3b0869=_0x3b0869-0x10c;const _0x5e0ee=a55_0x5e0e();let _0x2a0f6f=_0x5e0ee[_0x3b0869];return _0x2a0f6f;}(function(_0x4150eb,_0x5e5fba){const _0x84b657=a55_0x2a0f,_0x2216bb=_0x4150eb();while(!![]){try{const _0x307806=parseInt(_0x84b657(0x114))/0x1*(parseInt(_0x84b657(0x116))/0x2)+-parseInt(_0x84b657(0x117))/0x3+-parseInt(_0x84b657(0x10d))/0x4+-parseInt(_0x84b657(0x111))/0x5*(parseInt(_0x84b657(0x115))/0x6)+-parseInt(_0x84b657(0x10e))/0x7*(-parseInt(_0x84b657(0x10c))/0x8)+parseInt(_0x84b657(0x110))/0x9+parseInt(_0x84b657(0x112))/0xa;if(_0x307806===_0x5e5fba)break;else _0x2216bb['push'](_0x2216bb['shift']());}catch(_0x5f4226){_0x2216bb['push'](_0x2216bb['shift']());}}}(a55_0x5e0e,0x35fbc));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a55_0x5e0e(){const _0x181448=['parseFlags','514NfjxMn','6OZWzaK','874PLyDdS','920661VmnSPD','376LiYagD','1034896NyQlaW','65429GTIiPX','validateFlags','1328346iiTwgF','1001825zrnJRr','1755710gFZLDD'];a55_0x5e0e=function(){return _0x181448;};return a55_0x5e0e();}export const parseFlags=helpers[a55_0x38217c(0x113)];export const validateFlags=helpers[a55_0x38217c(0x10f)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x478269=a56_0x3b5f;(function(_0x129b70,_0xbcd6e9){const _0x4adbaa=a56_0x3b5f,_0x30eb17=_0x129b70();while(!![]){try{const _0x3446ee=-parseInt(_0x4adbaa(0x155))/0x1*(-parseInt(_0x4adbaa(0x15c))/0x2)+parseInt(_0x4adbaa(0x157))/0x3+parseInt(_0x4adbaa(0x154))/0x4*(-parseInt(_0x4adbaa(0x159))/0x5)+-parseInt(_0x4adbaa(0x161))/0x6*(-parseInt(_0x4adbaa(0x15a))/0x7)+parseInt(_0x4adbaa(0x15b))/0x8+parseInt(_0x4adbaa(0x160))/0x9+parseInt(_0x4adbaa(0x15d))/0xa*(-parseInt(_0x4adbaa(0x158))/0xb);if(_0x3446ee===_0xbcd6e9)break;else _0x30eb17['push'](_0x30eb17['shift']());}catch(_0x23ad9d){_0x30eb17['push'](_0x30eb17['shift']());}}}(a56_0x3fb0,0xaf615));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';function a56_0x3b5f(_0x340d02,_0x4d2931){_0x340d02=_0x340d02-0x153;const _0x3fb021=a56_0x3fb0();let _0x3b5fdc=_0x3fb021[_0x340d02];return _0x3b5fdc;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x42de36=>serviceGroups[a56_0x478269(0x156)](_0x42de36),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20'+PRODUCT_CONFIG[a56_0x478269(0x15f)]+a56_0x478269(0x15e)});function a56_0x3fb0(){const _0x222cbc=['42730JpCHhA','\x20or\x20--appcode).','newConfigFileName','471690uzkqiX','2105046mOwonZ','generateCommandHelp','16NnUbPO','1nxizdX','get','2055792TKNTjA','2893ZNkSny','1575475ImfgyT','28qZwnYm','136408zgcMhD','1888894ZkbJrz'];a56_0x3fb0=function(){return _0x222cbc;};return a56_0x3fb0();}export function generateCommandHelp(_0x414aab){const _0x478931=a56_0x478269;return generators[_0x478931(0x153)](_0x414aab);}export const generateServiceHelp=generators['generateServiceHelp'];export const generateFullHelp=generators['generateFullHelp'];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5137a8,_0x5f5d67){var _0x4a4090=a57_0xfb49,_0x50dded=_0x5137a8();while(!![]){try{var _0xc02acf=-parseInt(_0x4a4090(0x1ab))/0x1+parseInt(_0x4a4090(0x1ad))/0x2+parseInt(_0x4a4090(0x1b1))/0x3+parseInt(_0x4a4090(0x1af))/0x4+parseInt(_0x4a4090(0x1ac))/0x5+parseInt(_0x4a4090(0x1b0))/0x6+-parseInt(_0x4a4090(0x1ae))/0x7*(parseInt(_0x4a4090(0x1aa))/0x8);if(_0xc02acf===_0x5f5d67)break;else _0x50dded['push'](_0x50dded['shift']());}catch(_0x2606bf){_0x50dded['push'](_0x50dded['shift']());}}}(a57_0x56ed,0x72dca));function a57_0x56ed(){var _0x7f7ab8=['374161XDrVgX','283755BEsnMR','1104708YQbZNj','17696svKBXq','920148xUcbBj','1640592SadaVj','2191863lmYlJr','3160vvKbWe'];a57_0x56ed=function(){return _0x7f7ab8;};return a57_0x56ed();}export{runCommand}from'../framework/runner.js';function a57_0xfb49(_0xe13bdb,_0x5da940){_0xe13bdb=_0xe13bdb-0x1aa;var _0x56edaf=a57_0x56ed();var _0xfb49d8=_0x56edaf[_0xe13bdb];return _0xfb49d8;}export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x491379,_0x2b03ef){const _0x45ccf3=a58_0x5c34,_0x57b485=_0x491379();while(!![]){try{const _0x43fafd=parseInt(_0x45ccf3(0xcb))/0x1*(-parseInt(_0x45ccf3(0xc2))/0x2)+parseInt(_0x45ccf3(0xc4))/0x3+parseInt(_0x45ccf3(0xc6))/0x4*(-parseInt(_0x45ccf3(0xc1))/0x5)+-parseInt(_0x45ccf3(0xbd))/0x6*(parseInt(_0x45ccf3(0xc3))/0x7)+parseInt(_0x45ccf3(0xcd))/0x8+parseInt(_0x45ccf3(0xca))/0x9*(parseInt(_0x45ccf3(0xc9))/0xa)+-parseInt(_0x45ccf3(0xc0))/0xb*(-parseInt(_0x45ccf3(0xc8))/0xc);if(_0x43fafd===_0x2b03ef)break;else _0x57b485['push'](_0x57b485['shift']());}catch(_0x502127){_0x57b485['push'](_0x57b485['shift']());}}}(a58_0x22f0,0x33972));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a58_0x22f0(){const _0x5997cd=['10218bUTmTH','format','update','352RXJAPA','125fyVWPi','2VGHLBP','448CuAIYm','498534IHCdaC','url','56300TcLLDF','message','200220XhydVY','480QfbEjA','13977HzRuIV','412787fPmwuH','_notice','2482608YfLZmn','error'];a58_0x22f0=function(){return _0x5997cd;};return a58_0x22f0();}function a58_0x5c34(_0x4d0280,_0x252460){_0x4d0280=_0x4d0280-0xbd;const _0x22f0cc=a58_0x22f0();let _0x5c34d8=_0x22f0cc[_0x4d0280];return _0x5c34d8;}import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x3211e4,_0x46d4c8){const _0x8f5c9e=a58_0x5c34,_0x11a3ee=_0x3211e4[_0x8f5c9e(0xcc)],{_notice:_0x4ba6c5,..._0x3ab9c0}=_0x3211e4;void _0x4ba6c5,baseFormatOutput(_0x3ab9c0,_0x46d4c8),_0x46d4c8[_0x8f5c9e(0xbe)]==='pretty'&&printPrettyNotice(_0x11a3ee);}function printPrettyNotice(_0x407b92){const _0x14977b=a58_0x5c34;if(!_0x407b92?.[_0x14977b(0xbf)])return;console[_0x14977b(0xce)](_0x407b92['update'][_0x14977b(0xc7)]+'\x20('+_0x407b92[_0x14977b(0xbf)][_0x14977b(0xc5)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x508a9a,_0x585766){const _0x31888b=a59_0x3300,_0x45bba5=_0x508a9a();while(!![]){try{const _0x577674=parseInt(_0x31888b(0x1ef))/0x1*(-parseInt(_0x31888b(0x20b))/0x2)+parseInt(_0x31888b(0x1f2))/0x3*(-parseInt(_0x31888b(0x20d))/0x4)+-parseInt(_0x31888b(0x207))/0x5+-parseInt(_0x31888b(0x1f5))/0x6+-parseInt(_0x31888b(0x204))/0x7+-parseInt(_0x31888b(0x1fc))/0x8+parseInt(_0x31888b(0x1e7))/0x9*(parseInt(_0x31888b(0x1fd))/0xa);if(_0x577674===_0x585766)break;else _0x45bba5['push'](_0x45bba5['shift']());}catch(_0x21450d){_0x45bba5['push'](_0x45bba5['shift']());}}}(a59_0x5195,0x3d2ce));function toKebab(_0x5968ac){const _0x277881=a59_0x3300;return _0x5968ac[_0x277881(0x1ea)](/_/g,'-')[_0x277881(0x1ea)](/-([A-Z]+)/g,(_0x29c61e,_0xe6210)=>'-'+_0xe6210[_0x277881(0x1ee)]())['replace'](/([a-z0-9])([A-Z])/g,(_0x23e3b0,_0x193c90,_0xc85203)=>_0x193c90+'-'+_0xc85203)[_0x277881(0x1ee)]();}function buildKnownFlags(_0x4890d2){const _0x50a010=a59_0x3300,_0x507ce5=new Set();for(const _0x563d70 of _0x4890d2){_0x507ce5['add'](_0x563d70[_0x50a010(0x209)]),_0x507ce5['add'](toCamelCase(_0x563d70['name']));}for(const _0x16ac41 of[_0x50a010(0x1f8),'dryRun','yes',_0x50a010(0x20a)]){_0x507ce5[_0x50a010(0x1f3)](_0x16ac41);}for(const _0x1f33ed of[_0x50a010(0x1ec),'env',_0x50a010(0x208),_0x50a010(0x1f4),'nonInteractive',_0x50a010(0x206),'ci',_0x50a010(0x203),_0x50a010(0x1e6)]){_0x507ce5[_0x50a010(0x1f3)](_0x1f33ed);}return _0x507ce5;}function buildFlagTypeMap(_0x4fdd42){const _0x1e5e65=a59_0x3300,_0x296ee6=new Map();for(const _0x56cd48 of _0x4fdd42){_0x296ee6[_0x1e5e65(0x20c)](_0x56cd48[_0x1e5e65(0x209)],_0x56cd48[_0x1e5e65(0x1f9)]),_0x296ee6[_0x1e5e65(0x20c)](toCamelCase(_0x56cd48[_0x1e5e65(0x209)]),_0x56cd48['type']);}return _0x296ee6;}function toCamelCase(_0x193bc4){const _0x206583=a59_0x3300;return _0x193bc4[_0x206583(0x1ea)](/-([a-z])/g,(_0x490937,_0x2736f5)=>_0x2736f5[_0x206583(0x1e9)]());}function aliasHandler(_0x1c8a95,_0x488fac){const _0x7394c0=a59_0x3300,_0x141647=[];for(const _0x3a65be of Object[_0x7394c0(0x1f0)](_0x1c8a95)){if(_0x488fac['has'](_0x3a65be))continue;const _0x3088ce=toKebab(_0x3a65be);_0x3088ce!==_0x3a65be&&_0x488fac[_0x7394c0(0x205)](_0x3088ce)&&_0x141647['push']({'original':_0x3a65be,'corrected':_0x3088ce,'handler':_0x7394c0(0x1f7)});}return _0x141647;}function a59_0x5195(){const _0x3624e6=['entries','toUpperCase','replace','push','help','get','toLowerCase','255775dAgGsQ','keys','indexOf','7338wIdgmI','add','app','253752rCMaSt','string','alias','dry-run','type','sticky','boolean','2791064UwNLEA','10DldZSL','length','original','number','corrected','slice','global','1170799VuSunf','has','non-interactive','972410TDVNkG','appcode','name','format','2MZLwrv','set','412vMaSlE','version','13600809LvOJmb'];a59_0x5195=function(){return _0x3624e6;};return a59_0x5195();}function stickyHandler(_0x426535,_0xbff457,_0xebf45c){const _0x49fecb=a59_0x3300,_0x17b591=[];for(const [_0x5c0ad2,_0x21f147]of Object[_0x49fecb(0x1e8)](_0x426535)){if(_0x21f147!==!![])continue;for(let _0x3c752a=_0x5c0ad2[_0x49fecb(0x1fe)]-0x1;_0x3c752a>0x0;_0x3c752a--){const _0x17ccb5=_0x5c0ad2[_0x49fecb(0x202)](0x0,_0x3c752a),_0x11b3ad=_0x5c0ad2[_0x49fecb(0x202)](_0x3c752a),_0x5c7486=toKebab(_0x17ccb5),_0x4f273b=toCamelCase(_0x17ccb5),_0x452ac2=_0xbff457['has'](_0x17ccb5)?_0x17ccb5:_0xbff457[_0x49fecb(0x205)](_0x5c7486)?_0x5c7486:_0xbff457[_0x49fecb(0x205)](_0x4f273b)?_0x4f273b:null;if(!_0x452ac2)continue;const _0x1269b6=_0xebf45c['get'](_0x452ac2)??_0x49fecb(0x1f6);let _0x3d531c;if(_0x1269b6===_0x49fecb(0x200)){const _0x3d8605=Number(_0x11b3ad);if(isNaN(_0x3d8605)||_0x11b3ad==='')continue;_0x3d531c=_0x3d8605;}else{if(_0x1269b6===_0x49fecb(0x1fb))continue;else{if(_0x11b3ad==='')continue;_0x3d531c=_0x11b3ad;}}_0x17b591[_0x49fecb(0x1eb)]({'original':_0x5c0ad2,'corrected':_0x452ac2+'='+_0x3d531c,'handler':_0x49fecb(0x1fa)});break;}}return _0x17b591;}function a59_0x3300(_0xeacf2,_0x364a29){_0xeacf2=_0xeacf2-0x1e6;const _0x5195c6=a59_0x5195();let _0x33004d=_0x5195c6[_0xeacf2];return _0x33004d;}export function correctFlags(_0x676df7,_0x3386b9){const _0x164199=a59_0x3300,_0x505e05=buildKnownFlags(_0x3386b9),_0x377a09=buildFlagTypeMap(_0x3386b9),_0x445b4c=aliasHandler(_0x676df7,_0x505e05),_0x85ee66=stickyHandler(_0x676df7,_0x505e05,_0x377a09),_0x49bd7e=[..._0x445b4c,..._0x85ee66];if(_0x49bd7e[_0x164199(0x1fe)]===0x0)return{'flags':_0x676df7,'corrections':[]};const _0x277cbb={..._0x676df7},_0x4e45a3=new Set();for(const _0x31abd2 of _0x445b4c){_0x277cbb[_0x31abd2[_0x164199(0x201)]]=_0x676df7[_0x31abd2[_0x164199(0x1ff)]],_0x4e45a3[_0x164199(0x1f3)](_0x31abd2[_0x164199(0x1ff)]);}for(const _0x16baa7 of _0x85ee66){const _0x1699f1=_0x16baa7['corrected'][_0x164199(0x1f1)]('='),_0x1ca0bd=_0x16baa7[_0x164199(0x201)][_0x164199(0x202)](0x0,_0x1699f1),_0x347541=_0x16baa7[_0x164199(0x201)][_0x164199(0x202)](_0x1699f1+0x1),_0xdd83e3=_0x377a09[_0x164199(0x1ed)](_0x1ca0bd)??'string';_0xdd83e3===_0x164199(0x200)?_0x277cbb[_0x1ca0bd]=Number(_0x347541):_0x277cbb[_0x1ca0bd]=_0x347541,_0x4e45a3[_0x164199(0x1f3)](_0x16baa7[_0x164199(0x1ff)]);}for(const _0x5d00e2 of _0x4e45a3){delete _0x277cbb[_0x5d00e2];}return{'flags':_0x277cbb,'corrections':_0x49bd7e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x245c09,_0x24e603){var _0x3b30d9=a60_0x1b7e,_0x28bd98=_0x245c09();while(!![]){try{var _0x32e143=-parseInt(_0x3b30d9(0x18d))/0x1+-parseInt(_0x3b30d9(0x18b))/0x2+parseInt(_0x3b30d9(0x18a))/0x3+parseInt(_0x3b30d9(0x191))/0x4*(-parseInt(_0x3b30d9(0x18c))/0x5)+-parseInt(_0x3b30d9(0x190))/0x6+-parseInt(_0x3b30d9(0x193))/0x7*(-parseInt(_0x3b30d9(0x18e))/0x8)+parseInt(_0x3b30d9(0x192))/0x9*(parseInt(_0x3b30d9(0x18f))/0xa);if(_0x32e143===_0x24e603)break;else _0x28bd98['push'](_0x28bd98['shift']());}catch(_0x22b7ab){_0x28bd98['push'](_0x28bd98['shift']());}}}(a60_0x2aca,0xdfca9));function a60_0x1b7e(_0x435c35,_0x2a1243){_0x435c35=_0x435c35-0x18a;var _0x2acac6=a60_0x2aca();var _0x1b7ed1=_0x2acac6[_0x435c35];return _0x1b7ed1;}function a60_0x2aca(){var _0x532887=['922947lDNkqk','178560KxyLxF','1323130dKnQfI','972133AGHoKo','104VFOnAq','9507470KQLLwQ','1073328QDAuUF','4RNvLHJ','18ZCnMqy','114387QulthQ'];a60_0x2aca=function(){return _0x532887;};return a60_0x2aca();}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41ac53,_0x40b9b7){const _0x4dea66=a61_0x5a27,_0x5c64e1=_0x41ac53();while(!![]){try{const _0x53f005=-parseInt(_0x4dea66(0xe5))/0x1+parseInt(_0x4dea66(0xee))/0x2+-parseInt(_0x4dea66(0xe4))/0x3+-parseInt(_0x4dea66(0xed))/0x4+-parseInt(_0x4dea66(0xeb))/0x5*(parseInt(_0x4dea66(0xe9))/0x6)+-parseInt(_0x4dea66(0xe3))/0x7+parseInt(_0x4dea66(0xe8))/0x8;if(_0x53f005===_0x40b9b7)break;else _0x5c64e1['push'](_0x5c64e1['shift']());}catch(_0x1e8cee){_0x5c64e1['push'](_0x5c64e1['shift']());}}}(a61_0x2cef,0x9a5b9));import{CLI_BIN_NAME}from'../constant/cli.js';function a61_0x2cef(){const _0x225831=['20125840WSpgVk','6owrQQP','code=','2729910uOPsPN','--yes','2574672wohgNj','2258470MsxvqH','code','name','⚠\x20\x20High-risk\x20operation:\x20','join','\x20\x20\x20Affected:\x20','name=','\x20\x20\x20Continue?\x20[y/N]\x20','command','length','params=','service','affectedRecords','description','params','\x20\x20\x20','7876680DeTLbb','362250LcMsmG','577076hrIdrD','push','stringify'];a61_0x2cef=function(){return _0x225831;};return a61_0x2cef();}export function buildConfirmationLines(_0x34d9f9,_0x204ea4,_0x56aa6d){const _0x5a2713=a61_0x5a27,_0x2bb9d3=buildConfirmationContext(_0x34d9f9,_0x204ea4,_0x56aa6d),_0x3e4236=[_0x5a2713(0xd6)+_0x2bb9d3['commandLabel']];return _0x2bb9d3['description']&&_0x3e4236['push'](_0x5a2713(0xe2)+_0x2bb9d3['description']),_0x2bb9d3[_0x5a2713(0xdf)]&&_0x3e4236['push'](_0x5a2713(0xd8)+_0x2bb9d3[_0x5a2713(0xdf)]),_0x3e4236['push'](_0x5a2713(0xda)),_0x3e4236;}export function reconstructCommandArgv(_0x326f75,_0x1e7a02){const _0x4b997d=a61_0x5a27,_0x4400ef=[CLI_BIN_NAME,_0x326f75[_0x4b997d(0xde)],_0x326f75[_0x4b997d(0xdb)]];for(const [_0x3fd21f,_0x4035ec]of Object['entries'](_0x1e7a02)){if(_0x4035ec===!![])_0x4400ef[_0x4b997d(0xe6)]('--'+_0x3fd21f);else _0x4035ec!==![]&&_0x4035ec!==undefined&&_0x4035ec!==''&&_0x4400ef[_0x4b997d(0xe6)]('--'+_0x3fd21f+'\x20'+JSON[_0x4b997d(0xe7)](_0x4035ec));}return _0x4400ef[_0x4b997d(0xe6)](_0x4b997d(0xec)),_0x4400ef[_0x4b997d(0xd7)]('\x20');}function a61_0x5a27(_0x80ba7c,_0x57aa62){_0x80ba7c=_0x80ba7c-0xd6;const _0x2cef7f=a61_0x2cef();let _0x5a27f8=_0x2cef7f[_0x80ba7c];return _0x5a27f8;}function buildConfirmationContext(_0x1fd6a6,_0x5c3de1,_0x2548a6){const _0x102c08=a61_0x5a27,_0x2230ac=extractAffectedRecords(_0x2548a6);return{'commandLabel':_0x5c3de1,'description':_0x1fd6a6[_0x102c08(0xe0)],'affectedRecords':_0x2230ac};}function extractAffectedRecords(_0x228321){const _0x48bd02=a61_0x5a27,_0x332183=[];if(_0x228321[_0x48bd02(0xef)])_0x332183[_0x48bd02(0xe6)](_0x48bd02(0xea)+_0x228321[_0x48bd02(0xef)]);if(_0x228321['id'])_0x332183[_0x48bd02(0xe6)]('id='+_0x228321['id']);if(_0x228321['name'])_0x332183[_0x48bd02(0xe6)](_0x48bd02(0xd9)+_0x228321[_0x48bd02(0xf0)]);if(_0x228321['params'])_0x332183[_0x48bd02(0xe6)](_0x48bd02(0xdd)+_0x228321[_0x48bd02(0xe1)]);return _0x332183[_0x48bd02(0xdc)]>0x0?_0x332183[_0x48bd02(0xd7)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x50499a,_0x363cb9){const _0x1f396c=a62_0x218d,_0x31a93c=_0x50499a();while(!![]){try{const _0x28479e=parseInt(_0x1f396c(0x1f2))/0x1+-parseInt(_0x1f396c(0x1f5))/0x2*(-parseInt(_0x1f396c(0x1f7))/0x3)+parseInt(_0x1f396c(0x1ed))/0x4+parseInt(_0x1f396c(0x1f0))/0x5+parseInt(_0x1f396c(0x1f4))/0x6+parseInt(_0x1f396c(0x1fa))/0x7+-parseInt(_0x1f396c(0x1f6))/0x8*(parseInt(_0x1f396c(0x1f1))/0x9);if(_0x28479e===_0x363cb9)break;else _0x31a93c['push'](_0x31a93c['shift']());}catch(_0x51b3c7){_0x31a93c['push'](_0x31a93c['shift']());}}}(a62_0x332c,0x5cd04));function a62_0x218d(_0x39b6d6,_0x274ef5){_0x39b6d6=_0x39b6d6-0x1ed;const _0x332c8f=a62_0x332c();let _0x218d75=_0x332c8f[_0x39b6d6];return _0x218d75;}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x51f8c8){const _0x209f21=a62_0x218d;if(_0x51f8c8 instanceof LovrabetError)return CliErrors[_0x209f21(0x1ef)](userFacingLovrabetMessage(_0x51f8c8));return _0x51f8c8;}function a62_0x332c(){const _0x1e77d2=['1405535RYFqPh','3555UATOuz','39397jZKxiT','message','4333632bCEDzO','1002vguOic','27064SNJWTF','2328YTHNKj','trim','stringify','1627164zsZXbG','209780NtVhMf','description','validation'];a62_0x332c=function(){return _0x1e77d2;};return a62_0x332c();}function userFacingLovrabetMessage(_0x796377){const _0x390c37=a62_0x218d,_0x22ece6=_0x796377[_0x390c37(0x1ee)];if(_0x22ece6!==undefined&&_0x22ece6!==null){if(typeof _0x22ece6==='string'&&_0x22ece6[_0x390c37(0x1f8)]())return _0x22ece6[_0x390c37(0x1f8)]();try{return JSON[_0x390c37(0x1f9)](_0x22ece6);}catch{}}return _0x796377[_0x390c37(0x1f3)];}
|