@lovrabet/lovrabet-cli 2.1.2 → 2.1.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -0
- package/lib/commands/skill/commands/install.js +1 -0
- package/lib/commands/skill/commands/list.js +1 -0
- package/lib/commands/skill/commands/push.js +1 -0
- package/lib/commands/skill/commands/validate.js +1 -0
- package/lib/commands/skill/flags.js +1 -0
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -0
- package/lib/commands/skill/scopes.js +1 -0
- package/lib/commands/skill/summary.js +1 -0
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -0
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -0
- package/lib/skills/runtime-skill-sync/hashing.js +1 -0
- package/lib/skills/runtime-skill-sync/links.js +1 -0
- package/lib/skills/runtime-skill-sync/list-local.js +1 -0
- package/lib/skills/runtime-skill-sync/local-files.js +1 -0
- package/lib/skills/runtime-skill-sync/materialize.js +1 -0
- package/lib/skills/runtime-skill-sync/metadata.js +1 -0
- package/lib/skills/runtime-skill-sync/paths.js +1 -0
- package/lib/skills/runtime-skill-sync/push.js +1 -0
- package/lib/skills/runtime-skill-sync/scopes.js +1 -0
- package/lib/skills/runtime-skill-sync/types.js +1 -0
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -0
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -0
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +4 -1
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x4e562c=a59_0x63cd;(function(_0x385265,_0x4678c6){const _0x199d95=a59_0x63cd,_0x2bb3e6=_0x385265();while(!![]){try{const _0x24cbcc=-parseInt(_0x199d95(0x19f))/0x1+-parseInt(_0x199d95(0x19b))/0x2+-parseInt(_0x199d95(0x19a))/0x3*(-parseInt(_0x199d95(0x1a1))/0x4)+parseInt(_0x199d95(0x19d))/0x5+parseInt(_0x199d95(0x1a6))/0x6+parseInt(_0x199d95(0x1a2))/0x7+parseInt(_0x199d95(0x19c))/0x8*(parseInt(_0x199d95(0x1a3))/0x9);if(_0x24cbcc===_0x4678c6)break;else _0x2bb3e6['push'](_0x2bb3e6['shift']());}catch(_0x46f36f){_0x2bb3e6['push'](_0x2bb3e6['shift']());}}}(a59_0x12d0,0x73aca));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a59_0x4e562c(0x1a7),'daily'];function a59_0x12d0(){const _0x2394b0=['2188935nBJKcW','9CeQQGP','production','ENV','1466310LtpuSj','development','1782273QFnAez','1683908EQwQWG','2278952JTDdHf','3629605OclxPL','dev','846215JBhdUi','daily','4CVjkfg'];a59_0x12d0=function(){return _0x2394b0;};return a59_0x12d0();}export function normalizeEnv(_0x2f319b){const _0x47ce74=a59_0x4e562c;return _0x2f319b==='online'?_0x47ce74(0x1a4):_0x2f319b;}export function isProduction(_0x228a58){const _0x3c865e=a59_0x4e562c;return normalizeEnv(_0x228a58)===_0x3c865e(0x1a4);}export function isDaily(_0x3528ed){const _0x24130a=a59_0x4e562c;return normalizeEnv(_0x3528ed)===_0x24130a(0x1a0);}export function isDev(_0x37bb9d){const _0x3e55e3=a59_0x4e562c,_0x2a696e=normalizeEnv(_0x37bb9d);return _0x2a696e==='development'||_0x2a696e===_0x3e55e3(0x19e);}let env=normalizeEnv(productEnv(a59_0x4e562c(0x1a5))||a59_0x4e562c(0x1a4));function a59_0x63cd(_0x2f0a5f,_0x371528){_0x2f0a5f=_0x2f0a5f-0x19a;const _0x12d051=a59_0x12d0();let _0x63cd66=_0x12d051[_0x2f0a5f];return _0x63cd66;}export function getEnv(){return env;}export function initEnv(_0x10b870){env=normalizeEnv(_0x10b870);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x1b5d37=a60_0x40f5;function a60_0x19cd(){const _0x187151=['2597xXryje','226684EvuHUA','pretty','10LlgFOj','14496lgFHXm','2336mlBQPY','33DYVqeh','compress','1482477uRAGek','40krYiDE','788997xpyzeP','3195516RViRda','45901224hakCVj','5679ExyZMF'];a60_0x19cd=function(){return _0x187151;};return a60_0x19cd();}(function(_0xc631eb,_0x1bc98e){const _0x352440=a60_0x40f5,_0x260573=_0xc631eb();while(!![]){try{const _0xfbcab=-parseInt(_0x352440(0xde))/0x1+parseInt(_0x352440(0xd7))/0x2*(parseInt(_0x352440(0xdc))/0x3)+parseInt(_0x352440(0xe1))/0x4*(-parseInt(_0x352440(0xd9))/0x5)+-parseInt(_0x352440(0xda))/0x6*(parseInt(_0x352440(0xd6))/0x7)+parseInt(_0x352440(0xdb))/0x8*(parseInt(_0x352440(0xd5))/0x9)+parseInt(_0x352440(0xdf))/0xa*(-parseInt(_0x352440(0xe0))/0xb)+parseInt(_0x352440(0xe2))/0xc;if(_0xfbcab===_0x1bc98e)break;else _0x260573['push'](_0x260573['shift']());}catch(_0x3a65af){_0x260573['push'](_0x260573['shift']());}}}(a60_0x19cd,0xf257d));function a60_0x40f5(_0x35acdb,_0x3a4e56){_0x35acdb=_0x35acdb-0xd5;const _0x19cddc=a60_0x19cd();let _0x40f5e6=_0x19cddc[_0x35acdb];return _0x40f5e6;}export const OUTPUT_FORMAT_VALUES=['json',a60_0x1b5d37(0xd8),a60_0x1b5d37(0xdd)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x5818a5=a61_0x1ff5;function a61_0x1ff5(_0x2eaca4,_0x24f409){_0x2eaca4=_0x2eaca4-0x1c0;const _0x3fee74=a61_0x3fee();let _0x1ff51f=_0x3fee74[_0x2eaca4];return _0x1ff51f;}(function(_0x119ed6,_0x45d1d7){const _0x3ee5c1=a61_0x1ff5,_0x1629e6=_0x119ed6();while(!![]){try{const _0x485159=parseInt(_0x3ee5c1(0x1c9))/0x1+-parseInt(_0x3ee5c1(0x1d7))/0x2*(parseInt(_0x3ee5c1(0x1cb))/0x3)+-parseInt(_0x3ee5c1(0x1d3))/0x4*(-parseInt(_0x3ee5c1(0x1d1))/0x5)+parseInt(_0x3ee5c1(0x1c1))/0x6+-parseInt(_0x3ee5c1(0x1d0))/0x7+parseInt(_0x3ee5c1(0x1c6))/0x8*(parseInt(_0x3ee5c1(0x1d8))/0x9)+-parseInt(_0x3ee5c1(0x1cc))/0xa*(parseInt(_0x3ee5c1(0x1c7))/0xb);if(_0x485159===_0x45d1d7)break;else _0x1629e6['push'](_0x1629e6['shift']());}catch(_0x559fcf){_0x1629e6['push'](_0x1629e6['shift']());}}}(a61_0x3fee,0x34170));export const PRODUCT_CONFIG={'cliBinName':a61_0x5818a5(0x1ca),'cliDisplayName':a61_0x5818a5(0x1cf),'npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a61_0x5818a5(0x1c2),'npmRegistryBaseUrl':'https://registry.npmjs.org','envPrefix':a61_0x5818a5(0x1ce),'legacyEnvPrefixes':[a61_0x5818a5(0x1d2)],'configFileNames':[a61_0x5818a5(0x1c0),a61_0x5818a5(0x1d5)],'newConfigFileName':'.lovrabet.json','homeDirName':'.lovrabet','logFileName':'.lovrabet-runtime.log','invokeSource':a61_0x5818a5(0x1cd),'userCenterDisplayName':'Lovrabet\x20User\x20Center','skipNpxSkillsEnvSuffix':'SKIP_NPX_SKILLS','domains':{'production':{'user':'https://user.lovrabet.com','api':'https://api.lovrabet.com','runtime':a61_0x5818a5(0x1c4),'skillhub':a61_0x5818a5(0x1c5)},'nonProduction':{'user':a61_0x5818a5(0x1c3),'api':a61_0x5818a5(0x1d4),'runtime':'https://daily-runtime.lovrabet.com','skillhub':a61_0x5818a5(0x1c8)}},'accessKeyCreatePath':a61_0x5818a5(0x1d9)};export function productEnvName(_0x40d079){return PRODUCT_CONFIG['envPrefix']+'_'+_0x40d079;}export function productEnvNames(_0x1f41f4){const _0x44cdcc=a61_0x5818a5;return[productEnvName(_0x1f41f4),...PRODUCT_CONFIG['legacyEnvPrefixes'][_0x44cdcc(0x1d6)](_0x5627c7=>_0x5627c7+'_'+_0x1f41f4)];}function a61_0x3fee(){const _0x8214ba=['1370901XnlGnw','5465pcHfrp','RABETBASE','808sDZAzT','https://daily-api.lovrabet.com','.lovrabetrc','map','198706SzlTlN','288iJFDGo','/user/ak','.lovrabet.json','2430036IqzsAC','lovrabet/lovrabet-cli','https://user-daily.lovrabet.com','https://runtime.lovrabet.com','https://skills.lovrabet.com','103432KdYIUQ','11pkQWHV','https://skills-daily.lovrabet.com','250165wchssy','lovrabet','3ahAayg','7811290mKvLZR','cli:lovrabet-runtime','LOVRABET','Lovrabet\x20Runtime\x20CLI'];a61_0x3fee=function(){return _0x8214ba;};return a61_0x3fee();}export function productEnv(_0x3cda6e){for(const _0x257a85 of productEnvNames(_0x3cda6e)){const _0x95213=process.env[_0x257a85];if(_0x95213!==undefined)return _0x95213;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x1024a2=a62_0x4715;function a62_0x423b(){const _0x208442=['9wJhlqr','56YJqEPb','3844884lDWHid','792402HaNMGf','10HHmNCS','12430140yAUYvS','1011766okRDbo','high-risk-write','158005luOnpa','17725nqbZfw','6745136gSbDzx'];a62_0x423b=function(){return _0x208442;};return a62_0x423b();}function a62_0x4715(_0x565a49,_0x11c6d6){_0x565a49=_0x565a49-0x189;const _0x423ba5=a62_0x423b();let _0x471506=_0x423ba5[_0x565a49];return _0x471506;}(function(_0x5df835,_0x61674c){const _0x24b954=a62_0x4715,_0x43d132=_0x5df835();while(!![]){try{const _0x4d7966=parseInt(_0x24b954(0x18a))/0x1*(-parseInt(_0x24b954(0x191))/0x2)+parseInt(_0x24b954(0x18f))/0x3+parseInt(_0x24b954(0x18e))/0x4*(-parseInt(_0x24b954(0x18b))/0x5)+-parseInt(_0x24b954(0x190))/0x6+parseInt(_0x24b954(0x193))/0x7+parseInt(_0x24b954(0x18c))/0x8*(-parseInt(_0x24b954(0x18d))/0x9)+parseInt(_0x24b954(0x192))/0xa;if(_0x4d7966===_0x61674c)break;else _0x43d132['push'](_0x43d132['shift']());}catch(_0x8ab695){_0x43d132['push'](_0x43d132['shift']());}}}(a62_0x423b,0xd092c));export const RISK_LEVEL_VALUES=['read','write',a62_0x1024a2(0x189)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x46c1a5=a63_0x3ea4;function a63_0x5696(){const _0x1c5a5e=['432808SwATlf','202668Bhmzsj','2398990QMsgTe','10IIcITw','user','60454VwvjME','production','3451459HgHftO','accessKeyCreatePath','77OjIKJB','2998458VPvgVo','2000274JjkOSS','45ZyLnvT','20KBVquX'];a63_0x5696=function(){return _0x1c5a5e;};return a63_0x5696();}(function(_0x37e927,_0x41022a){const _0x352bfa=a63_0x3ea4,_0x218bac=_0x37e927();while(!![]){try{const _0x42b75c=parseInt(_0x352bfa(0x188))/0x1*(-parseInt(_0x352bfa(0x18e))/0x2)+parseInt(_0x352bfa(0x193))/0x3+parseInt(_0x352bfa(0x18a))/0x4+-parseInt(_0x352bfa(0x18c))/0x5*(parseInt(_0x352bfa(0x186))/0x6)+parseInt(_0x352bfa(0x192))/0x7*(-parseInt(_0x352bfa(0x189))/0x8)+-parseInt(_0x352bfa(0x187))/0x9*(-parseInt(_0x352bfa(0x18b))/0xa)+parseInt(_0x352bfa(0x190))/0xb;if(_0x42b75c===_0x41022a)break;else _0x218bac['push'](_0x218bac['shift']());}catch(_0x291cbe){_0x218bac['push'](_0x218bac['shift']());}}}(a63_0x5696,0xaa2b0));function a63_0x3ea4(_0x4925e,_0x4d472e){_0x4925e=_0x4925e-0x186;const _0x5696ce=a63_0x5696();let _0x3ea45b=_0x5696ce[_0x4925e];return _0x3ea45b;}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG['domains'][a63_0x46c1a5(0x18f)][a63_0x46c1a5(0x18d)]+PRODUCT_CONFIG[a63_0x46c1a5(0x191)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x5bd78c=a55_0x38b0;(function(_0x2d2160,_0x457ca9){const _0x47a824=a55_0x38b0,_0x457ec0=_0x2d2160();while(!![]){try{const _0x44ae22=parseInt(_0x47a824(0x1ca))/0x1+-parseInt(_0x47a824(0x1b4))/0x2+-parseInt(_0x47a824(0x1a6))/0x3*(parseInt(_0x47a824(0x1cf))/0x4)+parseInt(_0x47a824(0x1c6))/0x5+parseInt(_0x47a824(0x1b6))/0x6*(parseInt(_0x47a824(0x1bb))/0x7)+parseInt(_0x47a824(0x1d6))/0x8*(parseInt(_0x47a824(0x1ae))/0x9)+parseInt(_0x47a824(0x1e9))/0xa*(-parseInt(_0x47a824(0x1ce))/0xb);if(_0x44ae22===_0x457ca9)break;else _0x457ec0['push'](_0x457ec0['shift']());}catch(_0x4c8b45){_0x457ec0['push'](_0x457ec0['shift']());}}}(a55_0x59d3,0xa3756));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[a55_0x5bd78c(0x1e6)];function a55_0x38b0(_0x2e9fdf,_0x1a4984){_0x2e9fdf=_0x2e9fdf-0x1a4;const _0x59d3cf=a55_0x59d3();let _0x38b0db=_0x59d3cf[_0x2e9fdf];return _0x38b0db;}export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x57749e){for(const _0x48911a of CONFIG_NAMES){const _0x27e651=resolve(_0x57749e,_0x48911a);if(existsSync(_0x27e651))return _0x27e651;}return undefined;}export function resolveWriteConfigPath(_0x5c4964){const _0x2b64ac=a55_0x5bd78c,_0x31c2ad=_0x5c4964===_0x2b64ac(0x1c3)?process[_0x2b64ac(0x1d5)]():homedir(),_0x52c852=resolveConfigPath(_0x31c2ad);return _0x52c852??resolve(_0x31c2ad,NEW_CONFIG_NAME);}export function readConfigFile(_0x383dcf){const _0x3c4e69=a55_0x5bd78c;try{if(existsSync(_0x383dcf)){const _0x12b757=readFileSync(_0x383dcf,{'encoding':_0x3c4e69(0x1b3)});if(_0x12b757){const _0x25d6d1=JSON[_0x3c4e69(0x1ab)](_0x12b757);return migrateOnlineEnv(_0x383dcf,_0x25d6d1),_0x25d6d1;}}}catch{}return{};}function migrateOnlineEnv(_0x21b49a,_0x121e49){const _0x41aacd=a55_0x5bd78c;let _0x40e6ba=![];_0x121e49[_0x41aacd(0x1a8)]===_0x41aacd(0x1ac)&&(_0x121e49[_0x41aacd(0x1a8)]=_0x41aacd(0x1e4),_0x40e6ba=!![]);if(_0x121e49[_0x41aacd(0x1a9)]&&typeof _0x121e49[_0x41aacd(0x1a9)]===_0x41aacd(0x1b1))for(const _0x5f042b of Object[_0x41aacd(0x1e3)](_0x121e49[_0x41aacd(0x1a9)])){_0x5f042b&&_0x5f042b[_0x41aacd(0x1a8)]==='online'&&(_0x5f042b['env']=_0x41aacd(0x1e4),_0x40e6ba=!![]);}if(_0x40e6ba)try{writeConfigFile(_0x21b49a,_0x121e49);}catch{}}export function writeConfigFile(_0x2c1534,_0x657183){const _0x2a0edc=a55_0x5bd78c,_0x4ec266=dirname(_0x2c1534);!existsSync(_0x4ec266)&&mkdirSync(_0x4ec266,{'recursive':!![]});const _0x2b580d=_0x2c1534+_0x2a0edc(0x1bf);try{writeFileSync(_0x2b580d,JSON[_0x2a0edc(0x1de)](_0x657183,null,0x2)+'\x0a',{'encoding':_0x2a0edc(0x1b3),'mode':0x180});try{renameSync(_0x2b580d,_0x2c1534);}catch(_0x539f7b){if(_0x539f7b[_0x2a0edc(0x1dd)]==='EPERM'||_0x539f7b[_0x2a0edc(0x1dd)]===_0x2a0edc(0x1af)||_0x539f7b[_0x2a0edc(0x1dd)]===_0x2a0edc(0x1c9)){writeFileSync(_0x2c1534,JSON[_0x2a0edc(0x1de)](_0x657183,null,0x2)+'\x0a',{'encoding':_0x2a0edc(0x1b3)});try{unlinkSync(_0x2b580d);}catch{}}else throw _0x539f7b;}}catch(_0x53ac6c){try{unlinkSync(_0x2b580d);}catch{}throw _0x53ac6c;}}export function isNonInteractiveMode(_0x5b22a8){const _0x2c272b=a55_0x5bd78c;return!!(_0x5b22a8['nonInteractive']||_0x5b22a8['ci']||productEnvNames('CI')[_0x2c272b(0x1e1)](_0x2a62dd=>process.env[_0x2a62dd]==='true')||process.env.CI==='true'||!process[_0x2c272b(0x1c2)][_0x2c272b(0x1cc)]||!isStdinRawModeSupported());}function a55_0x59d3(){const _0x89c8ca=['some','APP','values','production','error','configFileNames','setRawCommand','authRequired','8330PLXJMr','raw','setLogPath','stdin','appcode','39EfatlJ','setRawMode','env','apps','top-level','parse','online','write','2133UQCcZN','EXDEV','isRaw','object','FORMAT','utf8','2479658DfZwwb','skillHubDomain','339114bAdyXV','riskLevel','trim','local-alias','join','105xnbCSW','string','defaultApp','ENV','.tmp','read','ACCESS_KEY','stdout','project','inherit','missing','2845605CDhHVB','./constant/domain.js','projectConfig','EACCES','1192524OLBNxh','accessKey','isTTY','empty','18359nUKmqI','80708PvvoRc','APPCODE','global','format','VERBOSE','apiDomain','cwd','32152cIhNoC','development','pageSize','true','userDomain','locale','host','code','stringify','app','runtimeDomain'];a55_0x59d3=function(){return _0x89c8ca;};return a55_0x59d3();}function isStdinRawModeSupported(){const _0x34c9f3=a55_0x5bd78c;if(!process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1cc)])return![];try{const _0x5ac4c0=process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1b0)];return process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1a7)](!![]),process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1a7)](_0x5ac4c0??![]),!![];}catch{return![];}}export async function createContext(_0x3f0a5b){const _0x44294a=a55_0x5bd78c,_0x5cb873=readRawConfig(),_0x423527=buildConfig(_0x5cb873,_0x3f0a5b);await initGlobalEnvironment(_0x423527);const {getUserDomain:_0x236f4d,getApiDomain:_0x257e92}=await import(_0x44294a(0x1c7)),_0x4180a5={'apiDomain':_0x257e92(),'userDomain':_0x236f4d()},_0xfa8401=await buildAuth(_0x423527);logger[_0x44294a(0x1eb)](process['cwd']());const _0x327b8c=(CLI_BIN_NAME+'\x20'+process['argv']['slice'](0x2)[_0x44294a(0x1ba)]('\x20'))[_0x44294a(0x1b8)]();logger[_0x44294a(0x1e7)](_0x327b8c);const _0x3f9eb8=isNonInteractiveMode(_0x3f0a5b);return{'config':_0x423527,'auth':_0xfa8401,'logger':logger,'env':_0x4180a5,'nonInteractive':_0x3f9eb8};}export function buildConfigFromFlags(_0x2eb9df){return buildConfig(readRawConfig(),_0x2eb9df);}export function getLocalAppAliases(_0x283332){const _0x1a0333=a55_0x5bd78c;return _0x283332[_0x1a0333(0x1a9)]&&typeof _0x283332[_0x1a0333(0x1a9)]===_0x1a0333(0x1b1)?_0x283332[_0x1a0333(0x1a9)]:{};}export function resolveLocalAppAliasCode(_0x31f23a,_0x169eae){const _0x5f43d9=a55_0x5bd78c;if(!_0x169eae)return undefined;const _0xe01e5b=getLocalAppAliases(_0x31f23a)[_0x169eae],_0x3de728=_0xe01e5b?.['appcode'];return typeof _0x3de728===_0x5f43d9(0x1bc)&&_0x3de728['trim']()?_0x3de728['trim']():undefined;}export function readAppCodeFromConfig(){const _0x3737fc=a55_0x5bd78c,_0x4ff1d6=readRawConfig(),_0x197ed7=_0x4ff1d6[_0x3737fc(0x1a5)]??_0x4ff1d6['app'];if(typeof _0x197ed7===_0x3737fc(0x1bc)&&_0x197ed7[_0x3737fc(0x1b8)]())return _0x197ed7[_0x3737fc(0x1b8)]();const _0xf4336b=resolveLocalAppAliasCode(_0x4ff1d6,typeof _0x4ff1d6[_0x3737fc(0x1bd)]===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1bd)]:undefined);if(_0xf4336b)return _0xf4336b;const _0xd86128=normalizeEnv(String(_0x4ff1d6['env']||_0x3737fc(0x1e4))),_0x3091aa=isDaily(_0xd86128)?'daily':isDev(_0xd86128)?_0x3737fc(0x1d7):'production',_0x10eb9e=resolveCachedAppCode(typeof _0x4ff1d6[_0x3737fc(0x1bd)]===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1bd)]:undefined,_0x3091aa,typeof _0x4ff1d6['accessKey']===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1cb)]:undefined);if(_0x10eb9e)return _0x10eb9e;const _0x5baab2=Object[_0x3737fc(0x1e3)](getLocalAppAliases(_0x4ff1d6))['find'](_0x4ca6ec=>_0x4ca6ec?.[_0x3737fc(0x1a5)]);return typeof _0x5baab2?.[_0x3737fc(0x1a5)]===_0x3737fc(0x1bc)&&_0x5baab2[_0x3737fc(0x1a5)]['trim']()?_0x5baab2['appcode'][_0x3737fc(0x1b8)]():undefined;}export function readScopedConfig(_0x3bec9a){const _0x472c0e=a55_0x5bd78c,_0x127178=_0x3bec9a[_0x472c0e(0x1d1)]?_0x472c0e(0x1d1):_0x472c0e(0x1c3);return readConfigFile(resolveWriteConfigPath(_0x127178));}export function writeScopedConfig(_0x4d2550,_0x5847e6){const _0x24b6f9=a55_0x5bd78c,_0x15b8e7=_0x5847e6[_0x24b6f9(0x1d1)]?_0x24b6f9(0x1d1):_0x24b6f9(0x1c3);writeConfigFile(resolveWriteConfigPath(_0x15b8e7),_0x4d2550);}export async function initGlobalEnvironment(_0x53caec){const _0xbec364=a55_0x5bd78c,{initEnv:_0x110c31}=await import('./constant/env.js');_0x110c31(_0x53caec[_0xbec364(0x1a8)]);const {initDomains:_0x2199ba}=await import(_0xbec364(0x1c7));_0x2199ba({'apiDomain':_0x53caec['raw'][_0xbec364(0x1d4)]||_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1dc)]||undefined,'userDomain':_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1da)]||undefined,'runtimeDomain':_0x53caec['raw'][_0xbec364(0x1e0)]||undefined,'skillHubDomain':_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1b5)]||undefined});}export function getProjectConfigPath(){const _0x5e5384=a55_0x5bd78c;return resolveConfigPath(process[_0x5e5384(0x1d5)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x311174){const _0x15b770=a55_0x5bd78c;if(!existsSync(_0x311174))return{'status':_0x15b770(0x1c5)};try{const _0x2c85e7=readFileSync(_0x311174,{'encoding':'utf8'});if(!_0x2c85e7?.[_0x15b770(0x1b8)]())return{'status':_0x15b770(0x1cd)};const _0x2e08d9=JSON[_0x15b770(0x1ab)](_0x2c85e7);return{'status':'ok','data':_0x2e08d9};}catch(_0x435e57){return{'status':_0x15b770(0x1e5),'message':_0x435e57 instanceof Error?_0x435e57['message']:String(_0x435e57)};}}export function loadRawConfigLayers(_0x60bd4a){const _0x246201=a55_0x5bd78c;let _0x3d2a5e={},_0x6a692={},_0x108ef1,_0x48ed78;try{_0x108ef1=resolveConfigPath(homedir());if(_0x108ef1){const _0x9f1175=readFileSync(_0x108ef1,{'encoding':'utf8'});if(_0x9f1175)_0x3d2a5e=JSON['parse'](_0x9f1175);}}catch{}try{const _0x21f366=_0x60bd4a||process[_0x246201(0x1d5)]();_0x48ed78=resolveConfigPath(_0x21f366);if(_0x48ed78){const _0x3963d0=readFileSync(_0x48ed78,{'encoding':'utf8'});if(_0x3963d0)_0x6a692=JSON[_0x246201(0x1ab)](_0x3963d0);}}catch{}return{'globalPath':_0x108ef1,'projectPath':_0x48ed78,'globalConfig':_0x3d2a5e,'projectConfig':_0x6a692};}function mergeRawConfigLayers(_0x3b10f7){const _0x5d7f21=a55_0x5bd78c,{globalConfig:_0xd4c498,projectConfig:_0x3df642}=_0x3b10f7;if(_0x3df642['inherit']===![]){const _0x761b95={..._0x3df642};return delete _0x761b95['inherit'],_0x761b95;}const _0xc1c185={..._0xd4c498,..._0x3df642};if(_0x5d7f21(0x1bd)in _0x3df642)_0xc1c185[_0x5d7f21(0x1bd)]=_0x3df642['defaultApp'];else _0xd4c498['defaultApp']&&(_0xc1c185[_0x5d7f21(0x1bd)]=_0xd4c498[_0x5d7f21(0x1bd)]);return _0xc1c185;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5f7a43){return mergeRawConfigLayers(loadRawConfigLayers(_0x5f7a43));}export function readRawConfigWithLayers(_0xd24261){const _0x4edf22=loadRawConfigLayers(_0xd24261);return{'config':mergeRawConfigLayers(_0x4edf22),'layers':_0x4edf22};}export function resolveDefaultAppSource(_0x308636){const _0x14ec0b=a55_0x5bd78c;if(_0x14ec0b(0x1bd)in _0x308636['projectConfig'])return'project';if(_0x308636[_0x14ec0b(0x1c8)][_0x14ec0b(0x1c4)]===![])return null;if(_0x308636['globalConfig'][_0x14ec0b(0x1bd)])return _0x14ec0b(0x1d1);return null;}function buildConfig(_0x20f903,_0x1f5880){const _0x17c6aa=a55_0x5bd78c,_0x561969=_0x20f903['defaultApp']||undefined,_0x4f417d=_0x1f5880['app']||env(_0x17c6aa(0x1e2))||undefined,_0x39c038=_0x4f417d||_0x561969||undefined,_0x519704=env(_0x17c6aa(0x1c1))||_0x20f903[_0x17c6aa(0x1cb)]||undefined,_0x4fb5a7=_0x1f5880[_0x17c6aa(0x1a8)]||env(_0x17c6aa(0x1be))||_0x20f903['env']||DEFAULT_CONFIG_VALUES[_0x17c6aa(0x1a8)],_0x22189a=normalizeEnv(String(_0x4fb5a7)),_0x3643e1=isDaily(_0x22189a)?'daily':isDev(_0x22189a)?_0x17c6aa(0x1d7):'production',_0xf4212c=resolveLocalAppAliasCode(_0x20f903,_0x39c038),_0x4cd0d6=resolveCachedAppCode(_0x39c038,_0x3643e1,_0x519704),_0x5704e0=typeof _0x1f5880[_0x17c6aa(0x1a5)]===_0x17c6aa(0x1bc)?_0x1f5880[_0x17c6aa(0x1a5)]:undefined,_0xd89bde=env(_0x17c6aa(0x1d0)),_0x2a7c46=_0x4f417d?undefined:_0x20f903[_0x17c6aa(0x1a5)]||_0x20f903[_0x17c6aa(0x1df)]||undefined,_0x42b288=_0x5704e0||_0xd89bde||_0xf4212c||_0x4cd0d6||_0x2a7c46||undefined,_0x22bcc3=_0x5704e0?'explicit':_0xd89bde?_0x17c6aa(0x1a8):_0xf4212c?_0x17c6aa(0x1b9):_0x4cd0d6?'cache':_0x2a7c46?_0x17c6aa(0x1aa):undefined,_0x28bfc5=_0x20f903[_0x17c6aa(0x1db)]||DEFAULT_CONFIG_VALUES[_0x17c6aa(0x1db)],_0x49b2eb=undefined,_0x454fa4=_0x1f5880[_0x17c6aa(0x1d2)]||env(_0x17c6aa(0x1b2))||_0x20f903['format'],_0x285ffb=normalizeLegacyOutputFormat(_0x454fa4),_0x64f038=env('PAGE_SIZE')||_0x20f903[_0x17c6aa(0x1d8)],_0x2d46ae=_0x64f038?Number(_0x64f038)||undefined:undefined,_0x50abc4=_0x20f903[_0x17c6aa(0x1b7)]||_0x20f903['maxRisk'],_0x74166c=_0x50abc4===_0x17c6aa(0x1c0)||_0x50abc4===_0x17c6aa(0x1ad)||_0x50abc4==='high-risk-write'?_0x50abc4:DEFAULT_CONFIG_VALUES['riskLevel'],_0x15c2ba=env(_0x17c6aa(0x1d3)),_0x2067c3=_0x15c2ba==='1'||_0x15c2ba===_0x17c6aa(0x1d9);return{'appCode':typeof _0x42b288===_0x17c6aa(0x1bc)&&_0x42b288['trim']()?_0x42b288[_0x17c6aa(0x1b8)]():undefined,'appCodeSource':_0x22bcc3,'env':_0x3643e1,'locale':_0x28bfc5,'cookie':_0x49b2eb,'accessKey':_0x519704,'format':_0x285ffb,'pageSize':_0x2d46ae,'riskLevel':_0x74166c,'verbose':_0x2067c3,'defaultApp':_0x561969,'currentApp':typeof _0x39c038===_0x17c6aa(0x1bc)?_0x39c038:undefined,'raw':_0x20f903};}function env(_0x2a2734){return productEnv(_0x2a2734);}async function buildAuth(_0x105e25){const _0xf31c58=a55_0x5bd78c,_0x54e32a='',_0x5a11cd=!!_0x105e25[_0xf31c58(0x1cb)];return{'cookie':_0x54e32a,'isLoggedIn':_0x5a11cd,async 'getOrLogin'(){const _0x1afc56=_0xf31c58;if(_0x5a11cd)return _0x54e32a;throw CliErrors[_0x1afc56(0x1e8)]();}};}
|
|
1
|
+
const a64_0x134bfe=a64_0x2380;(function(_0xbb0fee,_0x288843){const _0x556e58=a64_0x2380,_0x1c97c2=_0xbb0fee();while(!![]){try{const _0x26c055=parseInt(_0x556e58(0x1e5))/0x1+-parseInt(_0x556e58(0x1db))/0x2*(parseInt(_0x556e58(0x1e1))/0x3)+-parseInt(_0x556e58(0x1d7))/0x4*(parseInt(_0x556e58(0x1d6))/0x5)+parseInt(_0x556e58(0x1f5))/0x6+parseInt(_0x556e58(0x1d5))/0x7*(parseInt(_0x556e58(0x1ec))/0x8)+-parseInt(_0x556e58(0x1cb))/0x9*(parseInt(_0x556e58(0x206))/0xa)+-parseInt(_0x556e58(0x1f7))/0xb*(-parseInt(_0x556e58(0x1fb))/0xc);if(_0x26c055===_0x288843)break;else _0x1c97c2['push'](_0x1c97c2['shift']());}catch(_0x25d709){_0x1c97c2['push'](_0x1c97c2['shift']());}}}(a64_0x25de,0x84b8f));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[a64_0x134bfe(0x1d2)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a64_0x134bfe(0x1ca)];function resolveConfigPath(_0x5c9523){for(const _0x462b29 of CONFIG_NAMES){const _0x369bda=resolve(_0x5c9523,_0x462b29);if(existsSync(_0x369bda))return _0x369bda;}return undefined;}export function resolveWriteConfigPath(_0x119ed3){const _0x21c5a8=a64_0x134bfe,_0x5cb701=_0x119ed3===_0x21c5a8(0x205)?process['cwd']():homedir(),_0x2089d9=resolveConfigPath(_0x5cb701);return _0x2089d9??resolve(_0x5cb701,NEW_CONFIG_NAME);}export function readConfigFile(_0x59f5dc){const _0x344f20=a64_0x134bfe;try{if(existsSync(_0x59f5dc)){const _0x321860=readFileSync(_0x59f5dc,{'encoding':_0x344f20(0x1e7)});if(_0x321860){const _0x373453=JSON[_0x344f20(0x1d8)](_0x321860);return migrateOnlineEnv(_0x59f5dc,_0x373453),_0x373453;}}}catch{}return{};}function migrateOnlineEnv(_0xc54196,_0x530ccc){const _0x217b7b=a64_0x134bfe;let _0x537afa=![];_0x530ccc['env']===_0x217b7b(0x1e3)&&(_0x530ccc['env']=_0x217b7b(0x207),_0x537afa=!![]);if(_0x530ccc[_0x217b7b(0x1d4)]&&typeof _0x530ccc['apps']===_0x217b7b(0x1f8))for(const _0x16ed85 of Object[_0x217b7b(0x1da)](_0x530ccc[_0x217b7b(0x1d4)])){_0x16ed85&&_0x16ed85[_0x217b7b(0x1f9)]===_0x217b7b(0x1e3)&&(_0x16ed85[_0x217b7b(0x1f9)]=_0x217b7b(0x207),_0x537afa=!![]);}if(_0x537afa)try{writeConfigFile(_0xc54196,_0x530ccc);}catch{}}export function writeConfigFile(_0x4a6fc1,_0x42ba80){const _0x131604=a64_0x134bfe,_0x2c3f9c=dirname(_0x4a6fc1);!existsSync(_0x2c3f9c)&&mkdirSync(_0x2c3f9c,{'recursive':!![]});const _0x5f2bc6=_0x4a6fc1+_0x131604(0x1d9);try{writeFileSync(_0x5f2bc6,JSON[_0x131604(0x1d3)](_0x42ba80,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x5f2bc6,_0x4a6fc1);}catch(_0x1fb318){if(_0x1fb318[_0x131604(0x1c9)]===_0x131604(0x1f6)||_0x1fb318[_0x131604(0x1c9)]===_0x131604(0x1fc)||_0x1fb318[_0x131604(0x1c9)]===_0x131604(0x1ce)){writeFileSync(_0x4a6fc1,JSON[_0x131604(0x1d3)](_0x42ba80,null,0x2)+'\x0a',{'encoding':_0x131604(0x1e7)});try{unlinkSync(_0x5f2bc6);}catch{}}else throw _0x1fb318;}}catch(_0x1effde){try{unlinkSync(_0x5f2bc6);}catch{}throw _0x1effde;}}export function isNonInteractiveMode(_0x214ce0){const _0x4b87e9=a64_0x134bfe;return!!(_0x214ce0['nonInteractive']||_0x214ce0['ci']||productEnvNames('CI')[_0x4b87e9(0x1ea)](_0x54876f=>process.env[_0x54876f]==='true')||process.env.CI==='true'||!process['stdout'][_0x4b87e9(0x1e8)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x586b77=a64_0x134bfe;if(!process['stdin'][_0x586b77(0x1e8)])return![];try{const _0x339ecc=process['stdin'][_0x586b77(0x1dd)];return process[_0x586b77(0x1d0)][_0x586b77(0x210)](!![]),process[_0x586b77(0x1d0)][_0x586b77(0x210)](_0x339ecc??![]),!![];}catch{return![];}}export async function createContext(_0x2e6a09){const _0x3bf38a=a64_0x134bfe,_0x23da54=readRawConfig(),_0x2be228=buildConfig(_0x23da54,_0x2e6a09);await initGlobalEnvironment(_0x2be228);const {getUserDomain:_0x3afaaf,getApiDomain:_0x3526b7}=await import(_0x3bf38a(0x1fe)),_0x4d22a5={'apiDomain':_0x3526b7(),'userDomain':_0x3afaaf()},_0x4d300f=await buildAuth(_0x2be228);logger[_0x3bf38a(0x1e0)](process[_0x3bf38a(0x1cc)]());const _0x1fac15=(CLI_BIN_NAME+'\x20'+process[_0x3bf38a(0x204)][_0x3bf38a(0x1ff)](0x2)['join']('\x20'))[_0x3bf38a(0x201)]();logger[_0x3bf38a(0x1f1)](_0x1fac15);const _0x10bcc5=isNonInteractiveMode(_0x2e6a09);return{'config':_0x2be228,'auth':_0x4d300f,'logger':logger,'env':_0x4d22a5,'nonInteractive':_0x10bcc5};}export function buildConfigFromFlags(_0x5020dd){return buildConfig(readRawConfig(),_0x5020dd);}export function getLocalAppAliases(_0x143e3a){const _0x97c49=a64_0x134bfe;return _0x143e3a[_0x97c49(0x1d4)]&&typeof _0x143e3a[_0x97c49(0x1d4)]===_0x97c49(0x1f8)?_0x143e3a[_0x97c49(0x1d4)]:{};}export function resolveLocalAppAliasCode(_0x23268f,_0x2bcad6){const _0x175042=a64_0x134bfe;if(!_0x2bcad6)return undefined;const _0x49b219=getLocalAppAliases(_0x23268f)[_0x2bcad6],_0x3c772d=_0x49b219?.[_0x175042(0x1d1)];return typeof _0x3c772d==='string'&&_0x3c772d[_0x175042(0x201)]()?_0x3c772d[_0x175042(0x201)]():undefined;}function a64_0x25de(){const _0x49f52a=['globalConfig','setLogPath','3vBykMU','skillHubDomain','online','runtimeDomain','185773ZKYSTr','raw','utf8','isTTY','daily','some','find','7256bzMdaF','top-level','read','local-alias','host','setRawCommand','VERBOSE','projectConfig','PAGE_SIZE','5161356bWUcwA','EPERM','512479OoNCMo','object','env','ENV','360ZZcdkP','EXDEV','cache','./constant/domain.js','slice','authRequired','trim','write','app','argv','project','10HJbZXP','production','riskLevel','high-risk-write','accessKey','userDomain','pageSize','message','empty','defaultApp','setRawMode','true','global','apiDomain','format','inherit','missing','APPCODE','code','newConfigFileName','6405939jWFiMZ','cwd','development','EACCES','./constant/env.js','stdin','appcode','configFileNames','stringify','apps','3409KUlPaw','205nHQojr','59884nWNUpg','parse','.tmp','values','2032330mEEMjg','string','isRaw','locale'];a64_0x25de=function(){return _0x49f52a;};return a64_0x25de();}export function readAppCodeFromConfig(){const _0x3005ae=a64_0x134bfe,_0x5126d0=readRawConfig(),_0x5326fc=_0x5126d0[_0x3005ae(0x1d1)]??_0x5126d0[_0x3005ae(0x203)];if(typeof _0x5326fc===_0x3005ae(0x1dc)&&_0x5326fc['trim']())return _0x5326fc['trim']();const _0x3c32ab=resolveLocalAppAliasCode(_0x5126d0,typeof _0x5126d0[_0x3005ae(0x20f)]===_0x3005ae(0x1dc)?_0x5126d0['defaultApp']:undefined);if(_0x3c32ab)return _0x3c32ab;const _0x3e4ce7=normalizeEnv(String(_0x5126d0[_0x3005ae(0x1f9)]||_0x3005ae(0x207))),_0x274952=isDaily(_0x3e4ce7)?_0x3005ae(0x1e9):isDev(_0x3e4ce7)?'development':_0x3005ae(0x207),_0x2938ca=resolveCachedAppCode(typeof _0x5126d0['defaultApp']===_0x3005ae(0x1dc)?_0x5126d0[_0x3005ae(0x20f)]:undefined,_0x274952,typeof _0x5126d0[_0x3005ae(0x20a)]===_0x3005ae(0x1dc)?_0x5126d0[_0x3005ae(0x20a)]:undefined);if(_0x2938ca)return _0x2938ca;const _0x33af18=Object[_0x3005ae(0x1da)](getLocalAppAliases(_0x5126d0))[_0x3005ae(0x1eb)](_0x17b424=>_0x17b424?.[_0x3005ae(0x1d1)]);return typeof _0x33af18?.[_0x3005ae(0x1d1)]===_0x3005ae(0x1dc)&&_0x33af18[_0x3005ae(0x1d1)]['trim']()?_0x33af18[_0x3005ae(0x1d1)][_0x3005ae(0x201)]():undefined;}export function readScopedConfig(_0x267fdb){const _0x4d2d6a=a64_0x134bfe,_0x1bf91f=_0x267fdb[_0x4d2d6a(0x212)]?_0x4d2d6a(0x212):_0x4d2d6a(0x205);return readConfigFile(resolveWriteConfigPath(_0x1bf91f));}export function writeScopedConfig(_0x1c76d5,_0x4ebeaa){const _0x136955=a64_0x134bfe,_0xf1d083=_0x4ebeaa[_0x136955(0x212)]?'global':_0x136955(0x205);writeConfigFile(resolveWriteConfigPath(_0xf1d083),_0x1c76d5);}export async function initGlobalEnvironment(_0xe2486){const _0x55b6a4=a64_0x134bfe,{initEnv:_0x575bf7}=await import(_0x55b6a4(0x1cf));_0x575bf7(_0xe2486['env']);const {initDomains:_0x4ac16f}=await import(_0x55b6a4(0x1fe));_0x4ac16f({'apiDomain':_0xe2486[_0x55b6a4(0x1e6)][_0x55b6a4(0x213)]||_0xe2486[_0x55b6a4(0x1e6)][_0x55b6a4(0x1f0)]||undefined,'userDomain':_0xe2486['raw'][_0x55b6a4(0x20b)]||undefined,'runtimeDomain':_0xe2486[_0x55b6a4(0x1e6)][_0x55b6a4(0x1e4)]||undefined,'skillHubDomain':_0xe2486['raw'][_0x55b6a4(0x1e2)]||undefined});}export function getProjectConfigPath(){const _0x2bc1a1=a64_0x134bfe;return resolveConfigPath(process[_0x2bc1a1(0x1cc)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x252253){const _0x1dbcd3=a64_0x134bfe;if(!existsSync(_0x252253))return{'status':_0x1dbcd3(0x1c7)};try{const _0x36ef4a=readFileSync(_0x252253,{'encoding':_0x1dbcd3(0x1e7)});if(!_0x36ef4a?.[_0x1dbcd3(0x201)]())return{'status':_0x1dbcd3(0x20e)};const _0x4cfeae=JSON[_0x1dbcd3(0x1d8)](_0x36ef4a);return{'status':'ok','data':_0x4cfeae};}catch(_0x1b13ec){return{'status':'error','message':_0x1b13ec instanceof Error?_0x1b13ec[_0x1dbcd3(0x20d)]:String(_0x1b13ec)};}}export function loadRawConfigLayers(_0x2314f7){const _0xf743ba=a64_0x134bfe;let _0x18a894={},_0x14a908={},_0x4d89be,_0x5e8b03;try{_0x4d89be=resolveConfigPath(homedir());if(_0x4d89be){const _0x41c997=readFileSync(_0x4d89be,{'encoding':_0xf743ba(0x1e7)});if(_0x41c997)_0x18a894=JSON[_0xf743ba(0x1d8)](_0x41c997);}}catch{}try{const _0x47d3cc=_0x2314f7||process[_0xf743ba(0x1cc)]();_0x5e8b03=resolveConfigPath(_0x47d3cc);if(_0x5e8b03){const _0x3e103a=readFileSync(_0x5e8b03,{'encoding':_0xf743ba(0x1e7)});if(_0x3e103a)_0x14a908=JSON['parse'](_0x3e103a);}}catch{}return{'globalPath':_0x4d89be,'projectPath':_0x5e8b03,'globalConfig':_0x18a894,'projectConfig':_0x14a908};}function mergeRawConfigLayers(_0x51aa80){const _0x32983e=a64_0x134bfe,{globalConfig:_0x26767d,projectConfig:_0xecc879}=_0x51aa80;if(_0xecc879[_0x32983e(0x215)]===![]){const _0x39835c={..._0xecc879};return delete _0x39835c['inherit'],_0x39835c;}const _0x1e8dd9={..._0x26767d,..._0xecc879};if(_0x32983e(0x20f)in _0xecc879)_0x1e8dd9[_0x32983e(0x20f)]=_0xecc879[_0x32983e(0x20f)];else _0x26767d['defaultApp']&&(_0x1e8dd9[_0x32983e(0x20f)]=_0x26767d[_0x32983e(0x20f)]);return _0x1e8dd9;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x2dc4ba){return mergeRawConfigLayers(loadRawConfigLayers(_0x2dc4ba));}export function readRawConfigWithLayers(_0x2c8092){const _0x97d772=loadRawConfigLayers(_0x2c8092);return{'config':mergeRawConfigLayers(_0x97d772),'layers':_0x97d772};}export function resolveDefaultAppSource(_0x392b35){const _0x2af65d=a64_0x134bfe;if(_0x2af65d(0x20f)in _0x392b35[_0x2af65d(0x1f3)])return _0x2af65d(0x205);if(_0x392b35[_0x2af65d(0x1f3)][_0x2af65d(0x215)]===![])return null;if(_0x392b35[_0x2af65d(0x1df)][_0x2af65d(0x20f)])return _0x2af65d(0x212);return null;}function buildConfig(_0xaea59b,_0x51fe15){const _0xd9c07b=a64_0x134bfe,_0x46d04a=_0xaea59b[_0xd9c07b(0x20f)]||undefined,_0x1c56f6=_0x51fe15[_0xd9c07b(0x203)]||env('APP')||undefined,_0x27e037=_0x1c56f6||_0x46d04a||undefined,_0x4cdd94=env('ACCESS_KEY')||_0xaea59b[_0xd9c07b(0x20a)]||undefined,_0x2b317e=_0x51fe15[_0xd9c07b(0x1f9)]||env(_0xd9c07b(0x1fa))||_0xaea59b[_0xd9c07b(0x1f9)]||DEFAULT_CONFIG_VALUES[_0xd9c07b(0x1f9)],_0x5794b9=normalizeEnv(String(_0x2b317e)),_0x42c3ab=isDaily(_0x5794b9)?_0xd9c07b(0x1e9):isDev(_0x5794b9)?_0xd9c07b(0x1cd):_0xd9c07b(0x207),_0xf901b7=resolveLocalAppAliasCode(_0xaea59b,_0x27e037),_0x2d928d=resolveCachedAppCode(_0x27e037,_0x42c3ab,_0x4cdd94),_0x11aaa5=typeof _0x51fe15[_0xd9c07b(0x1d1)]===_0xd9c07b(0x1dc)?_0x51fe15[_0xd9c07b(0x1d1)]:undefined,_0x49014d=env(_0xd9c07b(0x1c8)),_0x40fb28=_0x1c56f6?undefined:_0xaea59b[_0xd9c07b(0x1d1)]||_0xaea59b[_0xd9c07b(0x203)]||undefined,_0x36d481=_0x11aaa5||_0x49014d||_0xf901b7||_0x2d928d||_0x40fb28||undefined,_0x2e345a=_0x11aaa5?'explicit':_0x49014d?'env':_0xf901b7?_0xd9c07b(0x1ef):_0x2d928d?_0xd9c07b(0x1fd):_0x40fb28?_0xd9c07b(0x1ed):undefined,_0x551bd9=_0xaea59b['locale']||DEFAULT_CONFIG_VALUES[_0xd9c07b(0x1de)],_0x5b7a28=undefined,_0x329224=_0x51fe15[_0xd9c07b(0x214)]||env('FORMAT')||_0xaea59b['format'],_0x129bc5=normalizeLegacyOutputFormat(_0x329224),_0x465895=env(_0xd9c07b(0x1f4))||_0xaea59b[_0xd9c07b(0x20c)],_0x42064d=_0x465895?Number(_0x465895)||undefined:undefined,_0xf0adbb=_0xaea59b[_0xd9c07b(0x208)]||_0xaea59b['maxRisk'],_0x5c2aa2=_0xf0adbb===_0xd9c07b(0x1ee)||_0xf0adbb===_0xd9c07b(0x202)||_0xf0adbb===_0xd9c07b(0x209)?_0xf0adbb:DEFAULT_CONFIG_VALUES[_0xd9c07b(0x208)],_0x1078cf=env(_0xd9c07b(0x1f2)),_0x34a21e=_0x1078cf==='1'||_0x1078cf===_0xd9c07b(0x211);return{'appCode':typeof _0x36d481===_0xd9c07b(0x1dc)&&_0x36d481['trim']()?_0x36d481[_0xd9c07b(0x201)]():undefined,'appCodeSource':_0x2e345a,'env':_0x42c3ab,'locale':_0x551bd9,'cookie':_0x5b7a28,'accessKey':_0x4cdd94,'format':_0x129bc5,'pageSize':_0x42064d,'riskLevel':_0x5c2aa2,'verbose':_0x34a21e,'defaultApp':_0x46d04a,'currentApp':typeof _0x27e037==='string'?_0x27e037:undefined,'raw':_0xaea59b};}function env(_0x27d9b7){return productEnv(_0x27d9b7);}function a64_0x2380(_0x15253a,_0x587308){_0x15253a=_0x15253a-0x1c7;const _0x25dec9=a64_0x25de();let _0x238076=_0x25dec9[_0x15253a];return _0x238076;}async function buildAuth(_0x45bc2f){const _0x2015ca=a64_0x134bfe,_0x5950b7='',_0x1517f2=!!_0x45bc2f[_0x2015ca(0x20a)];return{'cookie':_0x5950b7,'isLoggedIn':_0x1517f2,async 'getOrLogin'(){const _0x2ff1bc=_0x2015ca;if(_0x1517f2)return _0x5950b7;throw CliErrors[_0x2ff1bc(0x200)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a56_0xbb16(){const _0x54e8d6=['Configure\x20accessKey\x20in\x20','sqlCode','favorite','1hVxSyQ','/client/knowledge-base/search','Toolbox\x20API\x20error:\x20','values','object','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','api-doc-generator','summary','application/zip','/client/artifact/list?','success','/client/dataset/list','/client/artifact/create','company','source','/client/knowledge-base/personal/','description','1087504adasCM','/api/runtime/v1/namespaces/','SkillHub\x20API\x20error:\x20','all','name','tableData','filter','Download\x20failed:\x20','appCode','status','replace','slug','BFF\x20script\x20not\x20found:\x20id=','1390065nVTlke','topK','validation','appName','937300giyeGC','invokeSource','538030SePrjr','effective','56JCFSpX','SkillHub\x20error\x20code:\x20','/client/dataset/query?','file','Check\x20your\x20credentials\x20and\x20try\x20again.','2937612xGkLfW','Toolbox\x20error\x20code:\x20','/client/bff/query/','/update','apiError','trim','189483ZYvPYf','/client/app/my-apps','personal','API\x20error:\x20','skillCode','SQL\x20query\x20not\x20found:\x20','markdown','application/json','/api/cli/v1/skills/','packageBase64','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','artifactType','toString','POST','PRIVATE','text','/download','data','Request\x20timeout:\x20','undefined','AbortError','Personal\x20BFF\x20not\x20found:\x20id=','7465779HLCRGK','abort','GET','/client/artifact/','code','/client/user/loginUserInfo','/api/node-toolbox/','application/octet-stream','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/execute?appCode=','?appCode=','NAMESPACE_ONLY','skill','test','signal','/client/runtime-bff/personal/','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','displayName','headlineVersion','catch','scope','boolean','arrayBuffer','visibility','/versions/','json','msg','query','authRequired','/client/runtime-bff/personal/list?appCode=','stringify','string','namespace','/skills','from','message','isArray','version','newConfigFileName','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','errorCode','entries','.zip','/client/sql/query','set','/client/runtime-bff/personal/create','tags','errorMsg','searchParams','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'];a56_0xbb16=function(){return _0x54e8d6;};return a56_0xbb16();}(function(_0x30da45,_0x1084da){const _0x2092c7=a56_0x34e1,_0x1612b2=_0x30da45();while(!![]){try{const _0x5ce51b=parseInt(_0x2092c7(0xe7))/0x1*(-parseInt(_0x2092c7(0x10b))/0x2)+-parseInt(_0x2092c7(0x105))/0x3+parseInt(_0x2092c7(0xf8))/0x4+parseInt(_0x2092c7(0x109))/0x5+-parseInt(_0x2092c7(0x112))/0x6+-parseInt(_0x2092c7(0x118))/0x7*(-parseInt(_0x2092c7(0x10d))/0x8)+parseInt(_0x2092c7(0x12e))/0x9;if(_0x5ce51b===_0x1084da)break;else _0x1612b2['push'](_0x1612b2['shift']());}catch(_0x20cb14){_0x1612b2['push'](_0x1612b2['shift']());}}}(a56_0xbb16,0x3e97a));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}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(_0x593804){_activeAK=_0x593804||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x1757a3,_0x2b4d53={}){const _0x138fa0=a56_0x34e1,{method:method='GET',body:_0x3cbe68,headers:headers={},timeout:timeout=0x7530}=_0x2b4d53,_0x12b332=_activeAK,_0xec45a0=getRuntimeDomain();if(!_0x12b332)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x138fa0(0xd8)]+'.');const _0x431e73=''+_0xec45a0+_0x1757a3,_0x3324e2={'X-User-AK':_0x12b332},_0x4b7a6f=new AbortController(),_0x49d415=setTimeout(()=>_0x4b7a6f[_0x138fa0(0x12f)](),timeout);try{const _0x15223c=await fetch(_0x431e73,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x138fa0(0x10a)],..._0x3324e2,...headers},'body':_0x3cbe68?JSON[_0x138fa0(0xd0)](_0x3cbe68):undefined,'signal':_0x4b7a6f['signal']});let _0x4a4bb0;try{_0x4a4bb0=await _0x15223c[_0x138fa0(0xcb)]();}catch{throw CliErrors[_0x138fa0(0x116)](_0x138fa0(0xc2)+_0x15223c['status']+')',_0x15223c['status']>=0x190?_0x138fa0(0x111):undefined);}if(!_0x15223c['ok']||_0x4a4bb0[_0x138fa0(0xf1)]===![])throw CliErrors[_0x138fa0(0x116)](_0x4a4bb0['errorMsg']||_0x4a4bb0[_0x138fa0(0xd5)]||_0x138fa0(0x11b)+_0x15223c[_0x138fa0(0x101)],_0x4a4bb0['errorCode']?'API\x20error\x20code:\x20'+_0x4a4bb0[_0x138fa0(0xda)]:undefined);return _0x4a4bb0;}catch(_0x29ea41){if(_0x29ea41 instanceof Error&&_0x29ea41['name']==='AbortError')throw CliErrors[_0x138fa0(0x116)](_0x138fa0(0x12a)+_0x431e73);throw _0x29ea41;}finally{clearTimeout(_0x49d415);}}async function apiBinaryRequest(_0x41105a,_0x2b5f68={}){const _0x53d0bb=a56_0x34e1,{method:method=_0x53d0bb(0x130),headers:headers={},timeout:timeout=0x7530}=_0x2b5f68,_0x2cd4aa=_activeAK,_0x1285b1=getRuntimeDomain();if(!_0x2cd4aa)throw CliErrors['authRequired'](_0x53d0bb(0xe4)+PRODUCT_CONFIG[_0x53d0bb(0xd8)]+'.');const _0x4d0d49=''+_0x1285b1+_0x41105a,_0x2a7bdc=new AbortController(),_0x5d2f4d=setTimeout(()=>_0x2a7bdc[_0x53d0bb(0x12f)](),timeout);try{const _0x3f2082=await fetch(_0x4d0d49,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x53d0bb(0x10a)],'X-User-AK':_0x2cd4aa,...headers},'signal':_0x2a7bdc[_0x53d0bb(0xc0)]});if(!_0x3f2082['ok']){let _0x3bf50c;try{const _0x2603ab=await _0x3f2082[_0x53d0bb(0xcb)]();_0x3bf50c=_0x2603ab[_0x53d0bb(0xe1)]||_0x2603ab['message']||_0x2603ab[_0x53d0bb(0xda)];}catch{_0x3bf50c=await _0x3f2082[_0x53d0bb(0x127)]()[_0x53d0bb(0xc5)](()=>undefined);}throw CliErrors['apiError'](_0x3bf50c||_0x53d0bb(0x11b)+_0x3f2082[_0x53d0bb(0x101)],_0x53d0bb(0xff)+_0x4d0d49);}return Buffer['from'](await _0x3f2082[_0x53d0bb(0xc8)]());}catch(_0x4740ad){if(_0x4740ad instanceof Error&&_0x4740ad[_0x53d0bb(0xfc)]==='AbortError')throw CliErrors[_0x53d0bb(0x116)](_0x53d0bb(0x12a)+_0x4d0d49);throw _0x4740ad;}finally{clearTimeout(_0x5d2f4d);}}async function toolboxRequest(_0x14a5e6,_0x526518,_0x392079={}){const _0x1aff50=a56_0x34e1,{method:method=_0x1aff50(0x130),headers:headers={},timeout:timeout=0x7530}=_0x392079,_0x279b56=_activeAK;if(!_0x279b56)throw CliErrors['authRequired'](_0x1aff50(0xe4)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x531d61=getApiDomain()[_0x1aff50(0x102)](/\/$/,''),_0x3dca85=new URL(_0x14a5e6,_0x531d61+_0x1aff50(0x134));if(_0x526518)for(const [_0x506709,_0x3b15af]of Object[_0x1aff50(0xdb)](_0x526518)){_0x3b15af!==undefined&&_0x3b15af!==null&&_0x3dca85[_0x1aff50(0xe2)][_0x1aff50(0xde)](_0x506709,String(_0x3b15af));}const _0x51e879=new AbortController(),_0x5664c7=setTimeout(()=>_0x51e879[_0x1aff50(0x12f)](),timeout);try{const _0x4ec8ae=await fetch(_0x3dca85,{'method':method,'headers':{'Content-Type':_0x1aff50(0x11f),'X-Invoke-Source':PRODUCT_CONFIG[_0x1aff50(0x10a)],'X-User-AK':_0x279b56,...headers},'signal':_0x51e879[_0x1aff50(0xc0)]});let _0x60768d;try{_0x60768d=await _0x4ec8ae[_0x1aff50(0xcb)]();}catch{throw CliErrors[_0x1aff50(0x116)](_0x1aff50(0xd9)+_0x4ec8ae['status']+')',_0x4ec8ae[_0x1aff50(0x101)]>=0x190?_0x1aff50(0x111):undefined);}if(!_0x4ec8ae['ok']){const _0x2934e3=_0x60768d&&typeof _0x60768d===_0x1aff50(0xeb)?_0x60768d:{};throw CliErrors[_0x1aff50(0x116)](_0x2934e3['errorMsg']||_0x2934e3[_0x1aff50(0xd5)]||_0x1aff50(0xe9)+_0x4ec8ae['status'],_0x2934e3['errorCode']?_0x1aff50(0x113)+_0x2934e3[_0x1aff50(0xda)]:undefined);}if(_0x60768d&&typeof _0x60768d==='object'&&_0x1aff50(0xf1)in _0x60768d&&typeof _0x60768d[_0x1aff50(0xf1)]===_0x1aff50(0xc7)){const _0x325fed=_0x60768d;if(!_0x325fed[_0x1aff50(0xf1)])throw CliErrors['apiError'](_0x325fed[_0x1aff50(0xe1)]||_0x325fed['message']||'Toolbox\x20API\x20error',_0x325fed[_0x1aff50(0xda)]?_0x1aff50(0x113)+_0x325fed[_0x1aff50(0xda)]:undefined);return _0x325fed[_0x1aff50(0x129)];}return _0x60768d;}catch(_0xbeab2){if(_0xbeab2 instanceof Error&&_0xbeab2[_0x1aff50(0xfc)]===_0x1aff50(0x12c))throw CliErrors[_0x1aff50(0x116)](_0x1aff50(0x12a)+_0x3dca85['toString']());throw _0xbeab2;}finally{clearTimeout(_0x5664c7);}}async function skillHubJsonRequest(_0x3cc935,_0x4f1fac={}){const _0x354bfd=a56_0x34e1,{method:method=_0x354bfd(0x130),query:_0x22e9b1,body:_0x44a5a2,headers:headers={},timeout:timeout=0x7530}=_0x4f1fac,_0x35e3d3=_activeAK;if(!_0x35e3d3)throw CliErrors[_0x354bfd(0xce)](_0x354bfd(0xe4)+PRODUCT_CONFIG[_0x354bfd(0xd8)]+'.');const _0x584909=getSkillHubDomain()[_0x354bfd(0x102)](/\/$/,''),_0x2bd661=new URL(_0x3cc935,_0x584909+'/');if(_0x22e9b1)for(const [_0x1c2cdf,_0x1b390b]of Object[_0x354bfd(0xdb)](_0x22e9b1)){_0x1b390b!==undefined&&_0x1b390b!==null&&_0x2bd661[_0x354bfd(0xe2)][_0x354bfd(0xde)](_0x1c2cdf,String(_0x1b390b));}const _0x3191fd=new AbortController(),_0x467495=setTimeout(()=>_0x3191fd[_0x354bfd(0x12f)](),timeout);try{const _0x32841c=await fetch(_0x2bd661['toString'](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x35e3d3,...headers},'body':_0x44a5a2,'signal':_0x3191fd['signal']});let _0x28ee75;try{_0x28ee75=await _0x32841c['json']();}catch{throw CliErrors[_0x354bfd(0x116)](_0x354bfd(0xe3)+_0x32841c['status']+')',_0x32841c[_0x354bfd(0x101)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x3188b9=!_0x32841c['ok']||_0x28ee75?.['success']===![]||typeof _0x28ee75?.[_0x354bfd(0x132)]==='number'&&_0x28ee75['code']>=0x190;if(_0x3188b9)throw CliErrors[_0x354bfd(0x116)](_0x28ee75?.[_0x354bfd(0xe1)]||_0x28ee75?.[_0x354bfd(0xd5)]||_0x28ee75?.['msg']||_0x354bfd(0xfa)+_0x32841c[_0x354bfd(0x101)],_0x28ee75?.[_0x354bfd(0xda)]?_0x354bfd(0x10e)+_0x28ee75['errorCode']:undefined);return _0x28ee75?.[_0x354bfd(0x129)]??_0x28ee75;}catch(_0x44645e){if(_0x44645e instanceof Error&&_0x44645e[_0x354bfd(0xfc)]==='AbortError')throw CliErrors[_0x354bfd(0x116)](_0x354bfd(0x12a)+_0x2bd661['toString']());throw _0x44645e;}finally{clearTimeout(_0x467495);}}async function skillHubBinaryRequest(_0x38a4bd,_0x2bb6bd={}){const _0x5930e2=a56_0x34e1,{query:_0x3be6a8,headers:headers={},timeout:timeout=0x7530}=_0x2bb6bd,_0x5c55b8=_activeAK;if(!_0x5c55b8)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5930e2(0xd8)]+'.');const _0x1d5589=getSkillHubDomain()['replace'](/\/$/,''),_0x7e0df0=new URL(_0x38a4bd,_0x1d5589+'/');if(_0x3be6a8)for(const [_0x2beb0a,_0x21603d]of Object['entries'](_0x3be6a8)){_0x21603d!==undefined&&_0x21603d!==null&&_0x7e0df0[_0x5930e2(0xe2)][_0x5930e2(0xde)](_0x2beb0a,String(_0x21603d));}const _0x1cc824=new AbortController(),_0x411c1e=setTimeout(()=>_0x1cc824[_0x5930e2(0x12f)](),timeout);try{const _0x49899f=await fetch(_0x7e0df0[_0x5930e2(0x124)](),{'method':'GET','headers':{'Accept':_0x5930e2(0x135),'X-Invoke-Source':PRODUCT_CONFIG[_0x5930e2(0x10a)],'X-User-AK':_0x5c55b8,...headers},'signal':_0x1cc824['signal']});if(!_0x49899f['ok']){let _0x2d5a19;try{const _0x1d8ab0=await _0x49899f[_0x5930e2(0xcb)]();_0x2d5a19=_0x1d8ab0['errorMsg']||_0x1d8ab0[_0x5930e2(0xd5)]||_0x1d8ab0[_0x5930e2(0xcc)]||_0x1d8ab0['errorCode'];}catch{_0x2d5a19=await _0x49899f[_0x5930e2(0x127)]()[_0x5930e2(0xc5)](()=>undefined);}throw CliErrors[_0x5930e2(0x116)](_0x2d5a19||_0x5930e2(0xfa)+_0x49899f[_0x5930e2(0x101)],_0x5930e2(0xff)+_0x7e0df0['toString']());}return Buffer[_0x5930e2(0xd4)](await _0x49899f['arrayBuffer']());}catch(_0x6ffa4c){if(_0x6ffa4c instanceof Error&&_0x6ffa4c[_0x5930e2(0xfc)]===_0x5930e2(0x12c))throw CliErrors[_0x5930e2(0x116)]('Request\x20timeout:\x20'+_0x7e0df0[_0x5930e2(0x124)]());throw _0x6ffa4c;}finally{clearTimeout(_0x411c1e);}}export async function getBffScriptInfo(_0x2a304f){const _0x3316f4=a56_0x34e1,_0x335810=await apiRequest(_0x3316f4(0x114)+_0x2a304f);if(!_0x335810[_0x3316f4(0x129)])throw CliErrors[_0x3316f4(0x107)](_0x3316f4(0x104)+_0x2a304f);return _0x335810[_0x3316f4(0x129)];}export async function getSqlQueryInfo(_0x5c0748,_0x31f092){const _0x1a68c2=a56_0x34e1,_0x2bb477=await apiRequest(_0x1a68c2(0xdd),{'method':_0x1a68c2(0x125),'body':{'appCode':_0x5c0748,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x31f092}}),_0x390f30=_0x2bb477[_0x1a68c2(0x129)],_0x59fda8=_0x390f30&&typeof _0x390f30===_0x1a68c2(0xeb)&&_0x1a68c2(0xfd)in _0x390f30?_0x390f30['tableData']?.[0x0]:_0x390f30&&typeof _0x390f30===_0x1a68c2(0xeb)&&_0x1a68c2(0xe5)in _0x390f30?_0x390f30:undefined;if(!_0x59fda8)throw CliErrors[_0x1a68c2(0x107)](_0x1a68c2(0x11d)+_0x31f092);return _0x59fda8;}function isRemoteAppItem(_0x3e1661){const _0x40a2b0=a56_0x34e1;return!!_0x3e1661&&typeof _0x3e1661===_0x40a2b0(0xeb)&&typeof _0x3e1661[_0x40a2b0(0x100)]===_0x40a2b0(0xd1)&&typeof _0x3e1661[_0x40a2b0(0x108)]==='string';}function extractRemoteAppItems(_0x1857a9){const _0x39e4aa=a56_0x34e1;if(Array['isArray'](_0x1857a9))return _0x1857a9[_0x39e4aa(0xfe)](isRemoteAppItem);if(!_0x1857a9||typeof _0x1857a9!==_0x39e4aa(0xeb))throw CliErrors[_0x39e4aa(0x116)](_0x39e4aa(0x136));const _0x59e77d=_0x1857a9;if(Array[_0x39e4aa(0xd6)](_0x59e77d[_0x39e4aa(0xfd)]))return _0x59e77d['tableData']['filter'](isRemoteAppItem);if(_0x59e77d[_0x39e4aa(0x129)]&&typeof _0x59e77d[_0x39e4aa(0x129)]===_0x39e4aa(0xeb)){const _0x435f8e=_0x59e77d[_0x39e4aa(0x129)];if(Array[_0x39e4aa(0xd6)](_0x435f8e['tableData']))return _0x435f8e['tableData'][_0x39e4aa(0xfe)](isRemoteAppItem);}throw CliErrors[_0x39e4aa(0x116)](_0x39e4aa(0x122));}export async function getMyApps(){const _0x3b1cb9=a56_0x34e1,_0x48e573=await apiRequest(_0x3b1cb9(0x119));return extractRemoteAppItems(_0x48e573[_0x3b1cb9(0x129)]);}export async function getLoginUserInfo(){const _0x4afc7c=a56_0x34e1,_0xe0468f=await apiRequest(_0x4afc7c(0x133));if(!_0xe0468f[_0x4afc7c(0x129)]||typeof _0xe0468f[_0x4afc7c(0x129)]!==_0x4afc7c(0xeb)||Array[_0x4afc7c(0xd6)](_0xe0468f['data']))throw CliErrors[_0x4afc7c(0x116)](_0x4afc7c(0xec));return _0xe0468f[_0x4afc7c(0x129)];}export async function listDatasets(_0x10731f,_0x30d706){const _0x4682e4=a56_0x34e1,_0xd251f5=await apiRequest(_0x4682e4(0xf2),{'method':_0x4682e4(0x125),'body':{'appCode':_0x10731f,..._0x30d706?.[_0x4682e4(0x132)]&&{'code':_0x30d706['code']},..._0x30d706?.['name']&&{'name':_0x30d706[_0x4682e4(0xfc)]}}});return extractList(_0xd251f5[_0x4682e4(0x129)]);}export async function getDatasetDetail(_0x4b4f45){const _0x3b38f3=a56_0x34e1,_0x724913=/^\d+$/[_0x3b38f3(0xbf)](_0x4b4f45)?'id':_0x3b38f3(0x132),_0x5114a2=await apiRequest(_0x3b38f3(0x10f)+_0x724913+'='+_0x4b4f45);return _0x5114a2['data'];}export async function getDatasetSdkUsageDoc(_0x28eee9,_0x57a1ab){const _0x5914b7=a56_0x34e1,_0x526e79=await toolboxRequest(_0x5914b7(0xed),{'datasetCode':_0x28eee9,'appCode':_0x57a1ab});return typeof _0x526e79?.[_0x5914b7(0x11e)]===_0x5914b7(0xd1)?_0x526e79['markdown']:'';}export async function listRuntimeArtifacts(_0x118418,_0x3e21f2){const _0x323f67=a56_0x34e1,_0x4189c6=new URLSearchParams({'appCode':_0x118418});if(_0x3e21f2?.['artifactType'])_0x4189c6[_0x323f67(0xde)](_0x323f67(0x123),_0x3e21f2['artifactType']);if(_0x3e21f2?.[_0x323f67(0xf5)])_0x4189c6[_0x323f67(0xde)]('source',_0x3e21f2[_0x323f67(0xf5)]);if(_0x3e21f2?.[_0x323f67(0xe6)]!==undefined)_0x4189c6[_0x323f67(0xde)]('favorite',String(_0x3e21f2[_0x323f67(0xe6)]));const _0x13f053=await apiRequest(_0x323f67(0xf0)+_0x4189c6[_0x323f67(0x124)]());return Array['isArray'](_0x13f053[_0x323f67(0x129)])?_0x13f053[_0x323f67(0x129)]:[];}export async function getRuntimeArtifact(_0x3415e9,_0x227433){const _0x29afe0=a56_0x34e1,_0x3c7f96=await apiRequest(_0x29afe0(0x131)+_0x3415e9+'?appCode='+encodeURIComponent(_0x227433));if(!_0x3c7f96[_0x29afe0(0x129)])throw CliErrors[_0x29afe0(0x107)]('Artifact\x20not\x20found:\x20id='+_0x3415e9);return _0x3c7f96[_0x29afe0(0x129)];}export async function createRuntimeArtifact(_0x2d1784,_0xc8cb75){const _0x44c76f=a56_0x34e1,_0x1118af=await apiRequest(_0x44c76f(0xf3),{'method':_0x44c76f(0x125),'body':{'appCode':_0x2d1784,..._0xc8cb75}});return _0x1118af[_0x44c76f(0x129)];}export async function updateRuntimeArtifact(_0x41a0d7,_0xaa20e,_0x20dce9){const _0x311508=a56_0x34e1,_0x5b7bf0=await apiRequest(_0x311508(0x131)+_0x41a0d7+_0x311508(0x115),{'method':'POST','body':{'appCode':_0xaa20e,..._0x20dce9}});return _0x5b7bf0['data'];}export async function listPersonalBffs(_0x2342db){const _0x24506c=a56_0x34e1,_0x75d4d8=await apiRequest(_0x24506c(0xcf)+encodeURIComponent(_0x2342db));return Array[_0x24506c(0xd6)](_0x75d4d8[_0x24506c(0x129)])?_0x75d4d8[_0x24506c(0x129)]:[];}export async function getPersonalBff(_0x2f8477,_0x286b85){const _0x189461=a56_0x34e1,_0x124739=await apiRequest('/client/runtime-bff/personal/'+_0x2f8477+_0x189461(0x138)+encodeURIComponent(_0x286b85));if(!_0x124739['data'])throw CliErrors[_0x189461(0x107)](_0x189461(0x12d)+_0x2f8477);return _0x124739['data'];}export async function createPersonalBff(_0x49373c,_0x14a474){const _0xf2e72e=a56_0x34e1,_0x408120=await apiRequest(_0xf2e72e(0xdf),{'method':'POST','body':{'appCode':_0x49373c,..._0x14a474}});return _0x408120['data'];}export async function updatePersonalBff(_0x2ac998,_0x5bd6ca,_0x1dc5b9){const _0x1bf540=a56_0x34e1,_0x566ba8=await apiRequest(_0x1bf540(0xc1)+_0x2ac998+'/update',{'method':_0x1bf540(0x125),'body':{'appCode':_0x5bd6ca,..._0x1dc5b9}});return _0x566ba8[_0x1bf540(0x129)];}export async function executePersonalBff(_0x25f096,_0x3068b0,_0x1e4e62){const _0x1d1a66=a56_0x34e1,_0x46a98d=await apiRequest('/client/runtime-bff/personal/'+_0x25f096+_0x1d1a66(0x137)+encodeURIComponent(_0x3068b0),{'method':'POST','body':_0x1e4e62});return _0x46a98d[_0x1d1a66(0x129)];}export async function listPersonalKnowledgeBaseItems(_0x343976){const _0x3f1f4a=a56_0x34e1,_0x2ccabe=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x343976));return Array['isArray'](_0x2ccabe[_0x3f1f4a(0x129)])?_0x2ccabe[_0x3f1f4a(0x129)]:[];}export async function getPersonalKnowledgeBaseItem(_0xb8e9a3,_0x23b409){const _0x133f57=a56_0x34e1,_0x1d94af=await apiRequest(_0x133f57(0xf6)+_0xb8e9a3+_0x133f57(0x138)+encodeURIComponent(_0x23b409));if(!_0x1d94af[_0x133f57(0x129)])throw CliErrors['validation']('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0xb8e9a3);return _0x1d94af[_0x133f57(0x129)];}export async function createPersonalKnowledgeBaseItem(_0xcaac07,_0x40c6d5){const _0x4f072a=a56_0x34e1,_0x4cf085=await apiRequest('/client/knowledge-base/personal/create',{'method':_0x4f072a(0x125),'body':{'appCode':_0xcaac07,..._0x40c6d5}});return _0x4cf085[_0x4f072a(0x129)];}function a56_0x34e1(_0x5f430d,_0x218187){_0x5f430d=_0x5f430d-0xbd;const _0xbb1635=a56_0xbb16();let _0x34e1e9=_0xbb1635[_0x5f430d];return _0x34e1e9;}export async function updatePersonalKnowledgeBaseItem(_0x7b8781,_0x336db6,_0x55d74c){const _0x17fb0e=a56_0x34e1,_0xcb164=await apiRequest(_0x17fb0e(0xf6)+_0x7b8781+_0x17fb0e(0x115),{'method':_0x17fb0e(0x125),'body':{'appCode':_0x336db6,..._0x55d74c}});return _0xcb164['data'];}export async function searchKnowledgeBase(_0xa20f21,_0x48ea7b){const _0x5af233=a56_0x34e1,_0x7a93d9=await apiRequest(_0x5af233(0xe8),{'method':_0x5af233(0x125),'body':{'appCode':_0xa20f21,'query':_0x48ea7b[_0x5af233(0xcd)],..._0x48ea7b[_0x5af233(0x106)]!==undefined?{'topK':_0x48ea7b[_0x5af233(0x106)]}:{}}});return Array[_0x5af233(0xd6)](_0x7a93d9[_0x5af233(0x129)])?_0x7a93d9[_0x5af233(0x129)]:[];}export async function listRuntimeSkills(_0x348665){const _0x450f2e=a56_0x34e1,_0x52de8d=await skillHubJsonRequest(_0x450f2e(0xf9)+encodeURIComponent(_0x348665[_0x450f2e(0x100)])+_0x450f2e(0xd3),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x348665[_0x450f2e(0x100)],_0x52de8d,_0x348665['scope']??_0x450f2e(0xfb),_0x348665[_0x450f2e(0x132)]);}export async function listPersonalRuntimeSkills(_0x557e7e){const _0x4afb04=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x557e7e,'scope':_0x4afb04(0x11a)}))['personal'];}export async function listCompanyRuntimeSkills(_0x503040){const _0x17079c=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x503040,'scope':_0x17079c(0xf4)}))[_0x17079c(0xf4)];}export async function listVisibleRuntimeSkills(_0x2d388b){const _0x28a2d3=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x2d388b,'scope':_0x28a2d3(0xfb)}))[_0x28a2d3(0x10c)];}export async function createPersonalRuntimeSkill(_0x51ad25,_0x5996e0){return publishRuntimeSkill(_0x51ad25,_0x5996e0);}export async function updatePersonalRuntimeSkill(_0x316277,_0x31aec0,_0x1653ec){const _0x4ca2da=a56_0x34e1;return publishRuntimeSkill(_0x31aec0,{..._0x1653ec,'skillCode':_0x1653ec[_0x4ca2da(0x11c)]??_0x316277});}export async function downloadRuntimeSkillPackage(_0x219684,_0x3cca20,_0x54bce9,_0x2f7ff4){const _0x5b9b4d=a56_0x34e1;void _0x219684;const _0x35b476=_0x2f7ff4?'/api/cli/v1/skills/'+encodeURIComponent(_0x54bce9)+'/'+encodeURIComponent(_0x3cca20)+_0x5b9b4d(0xca)+encodeURIComponent(_0x2f7ff4)+_0x5b9b4d(0x128):_0x5b9b4d(0x120)+encodeURIComponent(_0x54bce9)+'/'+encodeURIComponent(_0x3cca20)+_0x5b9b4d(0x128);return skillHubBinaryRequest(_0x35b476);}async function publishRuntimeSkill(_0x14f6f7,_0x2905e7){const _0x370678=a56_0x34e1,_0x1ccf8a=new FormData();_0x1ccf8a['set'](_0x370678(0x110),runtimeSkillPackageFile(_0x2905e7)),_0x1ccf8a[_0x370678(0xde)](_0x370678(0xc9),'PRIVATE');const _0x3b4fa4=await skillHubJsonRequest(_0x370678(0x120)+encodeURIComponent(_0x14f6f7)+'/publish',{'method':_0x370678(0x125),'body':_0x1ccf8a});return{'appCode':_0x3b4fa4[_0x370678(0xd2)]??_0x14f6f7,'skillCode':_0x3b4fa4[_0x370678(0x103)]??_0x2905e7['skillCode']??'','skillName':_0x2905e7['skillName']??_0x3b4fa4[_0x370678(0x103)]??_0x2905e7['skillCode'],'description':_0x2905e7[_0x370678(0xf7)],'scope':skillHubVisibilityToScope(_0x3b4fa4[_0x370678(0xc9)])??'personal','version':_0x3b4fa4[_0x370678(0xd7)]??_0x2905e7['version'],'tags':_0x2905e7[_0x370678(0xe0)],'content':_0x2905e7['content']};}function runtimeSkillPackageFile(_0x3fb6d3){const _0x5b56d9=a56_0x34e1;if(!_0x3fb6d3[_0x5b56d9(0x121)])throw CliErrors['validation']('Missing\x20Skill\x20package\x20payload.');const _0x9a1e44=Buffer[_0x5b56d9(0xd4)](_0x3fb6d3[_0x5b56d9(0x121)],'base64'),_0x4abe89=new Blob([_0x9a1e44],{'type':_0x5b56d9(0xef)}),_0x534ab9=(_0x3fb6d3[_0x5b56d9(0x11c)]||_0x5b56d9(0xbe))+_0x5b56d9(0xdc);if(typeof File!==_0x5b56d9(0x12b))return new File([_0x4abe89],_0x534ab9,{'type':'application/zip'});return _0x4abe89;}function normalizeSkillHubRuntimeListResponse(_0x20e50b,_0x1e599c,_0x24182a,_0x134e5d){const _0x42571f=a56_0x34e1,_0x33dc38=Array['isArray'](_0x1e599c)?_0x1e599c:Array[_0x42571f(0xd6)](_0x1e599c?.['items'])?_0x1e599c['items']:[],_0x1fd70a=_0x134e5d?.['trim'](),_0x3b3b5a=_0x33dc38['filter'](_0xb95798=>!_0x1fd70a||_0xb95798['slug']===_0x1fd70a)['map'](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x48d2d2=>Boolean(_0x48d2d2)),_0x1e4d63=_0x3b3b5a[_0x42571f(0xfe)](_0xb699f1=>_0xb699f1[_0x42571f(0xc6)]==='personal'),_0x131176=_0x3b3b5a['filter'](_0x3e6fd6=>_0x3e6fd6['scope']==='company');return{'appCode':_0x20e50b,'personal':_0x24182a==='company'?[]:_0x1e4d63,'company':_0x24182a==='personal'?[]:_0x131176,'effective':buildEffectiveRuntimeSkills(_0x1e4d63,_0x131176,_0x24182a)};}function skillHubRuntimeItemToRuntimeSkill(_0x402ba9){const _0x53d690=a56_0x34e1,_0x31207c=_0x402ba9[_0x53d690(0x103)]?.[_0x53d690(0x117)](),_0x286339=skillHubVisibilityToScope(_0x402ba9[_0x53d690(0xc9)]);if(!_0x31207c||!_0x286339)return undefined;return{'id':_0x402ba9['id'],'appCode':_0x402ba9[_0x53d690(0xd2)],'skillCode':_0x31207c,'skillName':_0x402ba9[_0x53d690(0xc3)]??_0x31207c,'description':_0x402ba9[_0x53d690(0xee)],'scope':_0x286339,'version':skillHubRuntimeItemVersion(_0x402ba9),'status':_0x402ba9[_0x53d690(0x101)]};}function skillHubVisibilityToScope(_0x441c90){const _0x59f258=a56_0x34e1;if(_0x441c90===_0x59f258(0x126))return _0x59f258(0x11a);if(_0x441c90===_0x59f258(0xbd))return _0x59f258(0xf4);return undefined;}function skillHubRuntimeItemVersion(_0x137ebe){const _0x582430=a56_0x34e1;return _0x137ebe['publishedVersion']?.[_0x582430(0xd7)]??_0x137ebe[_0x582430(0xc4)]?.[_0x582430(0xd7)]??_0x137ebe['ownerPreviewVersion']?.[_0x582430(0xd7)];}function buildEffectiveRuntimeSkills(_0x24f145,_0x458cc5,_0x390ece){const _0x2b898c=a56_0x34e1;if(_0x390ece===_0x2b898c(0x11a))return _0x24f145;if(_0x390ece===_0x2b898c(0xf4))return _0x458cc5;const _0x49a9e2=new Map();for(const _0x13a5d1 of _0x458cc5){_0x49a9e2[_0x2b898c(0xde)](_0x13a5d1[_0x2b898c(0x11c)],_0x13a5d1);}for(const _0x524a70 of _0x24f145){_0x49a9e2[_0x2b898c(0xde)](_0x524a70['skillCode'],_0x524a70);}return Array[_0x2b898c(0xd4)](_0x49a9e2[_0x2b898c(0xea)]());}function normalizeRuntimeSkillListResponse(_0x544989,_0x55377f){const _0x11f06b=a56_0x34e1;if(Array[_0x11f06b(0xd6)](_0x55377f)){const _0x3e6f9f=_0x55377f[_0x11f06b(0xfe)](_0x1a8ded=>_0x1a8ded[_0x11f06b(0xc6)]===_0x11f06b(0x11a)),_0x2f8d19=_0x55377f[_0x11f06b(0xfe)](_0x27f8d3=>_0x27f8d3['scope']===_0x11f06b(0xf4));return{'appCode':_0x544989,'personal':_0x3e6f9f,'company':_0x2f8d19,'effective':[..._0x2f8d19,..._0x3e6f9f]};}return{'appCode':_0x55377f?.[_0x11f06b(0x100)]??_0x544989,'personal':Array[_0x11f06b(0xd6)](_0x55377f?.[_0x11f06b(0x11a)])?_0x55377f[_0x11f06b(0x11a)]:[],'company':Array[_0x11f06b(0xd6)](_0x55377f?.['company'])?_0x55377f[_0x11f06b(0xf4)]:[],'effective':Array[_0x11f06b(0xd6)](_0x55377f?.['effective'])?_0x55377f['effective']:[]};}
|
|
1
|
+
(function(_0x1b7495,_0x2c98b6){const _0x4a23d1=a65_0x236b,_0x38dbb5=_0x1b7495();while(!![]){try{const _0x5de3fe=parseInt(_0x4a23d1(0x177))/0x1*(parseInt(_0x4a23d1(0x161))/0x2)+parseInt(_0x4a23d1(0x1b6))/0x3+parseInt(_0x4a23d1(0x18c))/0x4+-parseInt(_0x4a23d1(0x1aa))/0x5*(parseInt(_0x4a23d1(0x1a8))/0x6)+parseInt(_0x4a23d1(0x185))/0x7*(parseInt(_0x4a23d1(0x1c4))/0x8)+parseInt(_0x4a23d1(0x1c0))/0x9*(parseInt(_0x4a23d1(0x1ce))/0xa)+-parseInt(_0x4a23d1(0x1be))/0xb;if(_0x5de3fe===_0x2c98b6)break;else _0x38dbb5['push'](_0x38dbb5['shift']());}catch(_0x5ec26f){_0x38dbb5['push'](_0x38dbb5['shift']());}}}(a65_0x4ce4,0x6e7ea));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}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(_0x55a2fb){_activeAK=_0x55a2fb||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x3c1f32,_0x1b66e7={}){const _0x418328=a65_0x236b,{method:method=_0x418328(0x16a),body:_0x108b7e,headers:headers={},timeout:timeout=0x7530}=_0x1b66e7,_0x2f537f=_activeAK,_0x4a220a=getRuntimeDomain();if(!_0x2f537f)throw CliErrors[_0x418328(0x196)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x418328(0x1a4)]+'.');const _0x4e1ec9=''+_0x4a220a+_0x3c1f32,_0x577271={'X-User-AK':_0x2f537f},_0x38d36c=new AbortController(),_0x845947=setTimeout(()=>_0x38d36c['abort'](),timeout);try{const _0x3fb1e1=await fetch(_0x4e1ec9,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x577271,...headers},'body':_0x108b7e?JSON['stringify'](_0x108b7e):undefined,'signal':_0x38d36c['signal']});let _0x199a36;try{_0x199a36=await _0x3fb1e1['json']();}catch{throw CliErrors[_0x418328(0x18b)](_0x418328(0x19f)+_0x3fb1e1[_0x418328(0x1cc)]+')',_0x3fb1e1[_0x418328(0x1cc)]>=0x190?_0x418328(0x1c5):undefined);}if(!_0x3fb1e1['ok']||_0x199a36[_0x418328(0x1d2)]===![])throw CliErrors['apiError'](_0x199a36[_0x418328(0x168)]||_0x199a36[_0x418328(0x1d4)]||_0x418328(0x190)+_0x3fb1e1[_0x418328(0x1cc)],_0x199a36['errorCode']?_0x418328(0x198)+_0x199a36['errorCode']:undefined);return _0x199a36;}catch(_0x2576b1){if(_0x2576b1 instanceof Error&&_0x2576b1[_0x418328(0x172)]===_0x418328(0x193))throw CliErrors['apiError'](_0x418328(0x1c8)+_0x4e1ec9);throw _0x2576b1;}finally{clearTimeout(_0x845947);}}async function apiBinaryRequest(_0x56f56a,_0x473374={}){const _0x23b751=a65_0x236b,{method:method=_0x23b751(0x16a),headers:headers={},timeout:timeout=0x7530}=_0x473374,_0x807c99=_activeAK,_0x2594e5=getRuntimeDomain();if(!_0x807c99)throw CliErrors['authRequired'](_0x23b751(0x19e)+PRODUCT_CONFIG[_0x23b751(0x1a4)]+'.');const _0x1e8d2e=''+_0x2594e5+_0x56f56a,_0x4c114d=new AbortController(),_0x5200fe=setTimeout(()=>_0x4c114d[_0x23b751(0x1cd)](),timeout);try{const _0x7f33d2=await fetch(_0x1e8d2e,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x23b751(0x1b3)],'X-User-AK':_0x807c99,...headers},'signal':_0x4c114d[_0x23b751(0x173)]});if(!_0x7f33d2['ok']){let _0x377819;try{const _0x5d11f4=await _0x7f33d2[_0x23b751(0x15b)]();_0x377819=_0x5d11f4['errorMsg']||_0x5d11f4[_0x23b751(0x1d4)]||_0x5d11f4[_0x23b751(0x175)];}catch{_0x377819=await _0x7f33d2['text']()['catch'](()=>undefined);}throw CliErrors[_0x23b751(0x18b)](_0x377819||'API\x20error:\x20'+_0x7f33d2['status'],_0x23b751(0x165)+_0x1e8d2e);}return Buffer[_0x23b751(0x17d)](await _0x7f33d2[_0x23b751(0x17b)]());}catch(_0x2d5da0){if(_0x2d5da0 instanceof Error&&_0x2d5da0[_0x23b751(0x172)]===_0x23b751(0x193))throw CliErrors[_0x23b751(0x18b)](_0x23b751(0x1c8)+_0x1e8d2e);throw _0x2d5da0;}finally{clearTimeout(_0x5200fe);}}async function toolboxRequest(_0x397e43,_0x4bdc5f,_0x5c2fa1={}){const _0x2eec76=a65_0x236b,{method:method=_0x2eec76(0x16a),headers:headers={},timeout:timeout=0x7530}=_0x5c2fa1,_0x2e7994=_activeAK;if(!_0x2e7994)throw CliErrors[_0x2eec76(0x196)](_0x2eec76(0x19e)+PRODUCT_CONFIG[_0x2eec76(0x1a4)]+'.');const _0x27580e=getApiDomain()[_0x2eec76(0x188)](/\/$/,''),_0x3348b6=new URL(_0x397e43,_0x27580e+_0x2eec76(0x1a1));if(_0x4bdc5f)for(const [_0x36935f,_0x113e0f]of Object['entries'](_0x4bdc5f)){_0x113e0f!==undefined&&_0x113e0f!==null&&_0x3348b6[_0x2eec76(0x1c6)]['set'](_0x36935f,String(_0x113e0f));}const _0x167619=new AbortController(),_0x39c1e6=setTimeout(()=>_0x167619['abort'](),timeout);try{const _0x5f31c4=await fetch(_0x3348b6,{'method':method,'headers':{'Content-Type':_0x2eec76(0x166),'X-Invoke-Source':PRODUCT_CONFIG[_0x2eec76(0x1b3)],'X-User-AK':_0x2e7994,...headers},'signal':_0x167619[_0x2eec76(0x173)]});let _0x4d5998;try{_0x4d5998=await _0x5f31c4['json']();}catch{throw CliErrors[_0x2eec76(0x18b)](_0x2eec76(0x160)+_0x5f31c4[_0x2eec76(0x1cc)]+')',_0x5f31c4[_0x2eec76(0x1cc)]>=0x190?_0x2eec76(0x1c5):undefined);}if(!_0x5f31c4['ok']){const _0x19ebbc=_0x4d5998&&typeof _0x4d5998===_0x2eec76(0x1cb)?_0x4d5998:{};throw CliErrors['apiError'](_0x19ebbc[_0x2eec76(0x168)]||_0x19ebbc[_0x2eec76(0x1d4)]||_0x2eec76(0x1b9)+_0x5f31c4[_0x2eec76(0x1cc)],_0x19ebbc[_0x2eec76(0x175)]?_0x2eec76(0x1ca)+_0x19ebbc['errorCode']:undefined);}if(_0x4d5998&&typeof _0x4d5998==='object'&&_0x2eec76(0x1d2)in _0x4d5998&&typeof _0x4d5998['success']===_0x2eec76(0x176)){const _0x41c173=_0x4d5998;if(!_0x41c173[_0x2eec76(0x1d2)])throw CliErrors[_0x2eec76(0x18b)](_0x41c173[_0x2eec76(0x168)]||_0x41c173[_0x2eec76(0x1d4)]||_0x2eec76(0x180),_0x41c173[_0x2eec76(0x175)]?'Toolbox\x20error\x20code:\x20'+_0x41c173[_0x2eec76(0x175)]:undefined);return _0x41c173[_0x2eec76(0x16c)];}return _0x4d5998;}catch(_0x1498ee){if(_0x1498ee instanceof Error&&_0x1498ee[_0x2eec76(0x172)]===_0x2eec76(0x193))throw CliErrors[_0x2eec76(0x18b)](_0x2eec76(0x1c8)+_0x3348b6[_0x2eec76(0x187)]());throw _0x1498ee;}finally{clearTimeout(_0x39c1e6);}}async function skillHubJsonRequest(_0xa4fb2e,_0x3433aa={}){const _0xee6eb0=a65_0x236b,{method:method=_0xee6eb0(0x16a),query:_0x10acb9,body:_0x355ce2,headers:headers={},timeout:timeout=0x7530}=_0x3433aa,_0x82476c=_activeAK;if(!_0x82476c)throw CliErrors[_0xee6eb0(0x196)](_0xee6eb0(0x19e)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4ee29a=getSkillHubDomain()[_0xee6eb0(0x188)](/\/$/,''),_0x128c65=new URL(_0xa4fb2e,_0x4ee29a+'/');if(_0x10acb9)for(const [_0x4eb204,_0xa90d2b]of Object[_0xee6eb0(0x1a2)](_0x10acb9)){_0xa90d2b!==undefined&&_0xa90d2b!==null&&_0x128c65[_0xee6eb0(0x1c6)]['set'](_0x4eb204,String(_0xa90d2b));}const _0x5a1889=new AbortController(),_0x26c7e4=setTimeout(()=>_0x5a1889['abort'](),timeout);try{const _0xff64cc=await fetch(_0x128c65['toString'](),{'method':method,'headers':{'Accept':_0xee6eb0(0x166),'X-Invoke-Source':PRODUCT_CONFIG[_0xee6eb0(0x1b3)],'X-User-AK':_0x82476c,...headers},'body':_0x355ce2,'signal':_0x5a1889[_0xee6eb0(0x173)]});let _0x20f13f;try{_0x20f13f=await _0xff64cc['json']();}catch{throw CliErrors['apiError'](_0xee6eb0(0x170)+_0xff64cc['status']+')',_0xff64cc[_0xee6eb0(0x1cc)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x3dc007=!_0xff64cc['ok']||_0x20f13f?.[_0xee6eb0(0x1d2)]===![]||typeof _0x20f13f?.['code']===_0xee6eb0(0x1bb)&&_0x20f13f[_0xee6eb0(0x17e)]>=0x190;if(_0x3dc007)throw CliErrors[_0xee6eb0(0x18b)](_0x20f13f?.[_0xee6eb0(0x168)]||_0x20f13f?.['message']||_0x20f13f?.[_0xee6eb0(0x171)]||_0xee6eb0(0x1ba)+_0xff64cc['status'],_0x20f13f?.[_0xee6eb0(0x175)]?'SkillHub\x20error\x20code:\x20'+_0x20f13f['errorCode']:undefined);return _0x20f13f?.[_0xee6eb0(0x16c)]??_0x20f13f;}catch(_0x321ed8){if(_0x321ed8 instanceof Error&&_0x321ed8[_0xee6eb0(0x172)]===_0xee6eb0(0x193))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x128c65[_0xee6eb0(0x187)]());throw _0x321ed8;}finally{clearTimeout(_0x26c7e4);}}async function skillHubBinaryRequest(_0x1d850a,_0x156faf={}){const _0x2299c5=a65_0x236b,{query:_0x2cfca9,headers:headers={},timeout:timeout=0x7530}=_0x156faf,_0x205f2e=_activeAK;if(!_0x205f2e)throw CliErrors[_0x2299c5(0x196)](_0x2299c5(0x19e)+PRODUCT_CONFIG[_0x2299c5(0x1a4)]+'.');const _0x5b797a=getSkillHubDomain()['replace'](/\/$/,''),_0x4611e1=new URL(_0x1d850a,_0x5b797a+'/');if(_0x2cfca9)for(const [_0x4b2f6a,_0x2e5e70]of Object[_0x2299c5(0x1a2)](_0x2cfca9)){_0x2e5e70!==undefined&&_0x2e5e70!==null&&_0x4611e1[_0x2299c5(0x1c6)][_0x2299c5(0x1bd)](_0x4b2f6a,String(_0x2e5e70));}const _0xf8e82f=new AbortController(),_0x2e3128=setTimeout(()=>_0xf8e82f[_0x2299c5(0x1cd)](),timeout);try{const _0x424391=await fetch(_0x4611e1[_0x2299c5(0x187)](),{'method':_0x2299c5(0x16a),'headers':{'Accept':_0x2299c5(0x1d3),'X-Invoke-Source':PRODUCT_CONFIG[_0x2299c5(0x1b3)],'X-User-AK':_0x205f2e,...headers},'signal':_0xf8e82f[_0x2299c5(0x173)]});if(!_0x424391['ok']){let _0x7acfac;try{const _0x2084b7=await _0x424391[_0x2299c5(0x15b)]();_0x7acfac=_0x2084b7[_0x2299c5(0x168)]||_0x2084b7[_0x2299c5(0x1d4)]||_0x2084b7['msg']||_0x2084b7['errorCode'];}catch{_0x7acfac=await _0x424391[_0x2299c5(0x18f)]()['catch'](()=>undefined);}throw CliErrors[_0x2299c5(0x18b)](_0x7acfac||_0x2299c5(0x1ba)+_0x424391[_0x2299c5(0x1cc)],_0x2299c5(0x165)+_0x4611e1[_0x2299c5(0x187)]());}return Buffer[_0x2299c5(0x17d)](await _0x424391[_0x2299c5(0x17b)]());}catch(_0x5db4f1){if(_0x5db4f1 instanceof Error&&_0x5db4f1[_0x2299c5(0x172)]===_0x2299c5(0x193))throw CliErrors[_0x2299c5(0x18b)](_0x2299c5(0x1c8)+_0x4611e1[_0x2299c5(0x187)]());throw _0x5db4f1;}finally{clearTimeout(_0x2e3128);}}export async function getBffScriptInfo(_0x54ea48){const _0x23da14=a65_0x236b,_0x394fe0=await apiRequest(_0x23da14(0x1bc)+_0x54ea48);if(!_0x394fe0['data'])throw CliErrors[_0x23da14(0x1c2)](_0x23da14(0x164)+_0x54ea48);return _0x394fe0['data'];}export async function getSqlQueryInfo(_0x114671,_0x3a1f75){const _0x57a7c1=a65_0x236b,_0x524a4f=await apiRequest('/client/sql/query',{'method':_0x57a7c1(0x1ad),'body':{'appCode':_0x114671,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x3a1f75}}),_0x966469=_0x524a4f[_0x57a7c1(0x16c)],_0x2f2e82=_0x966469&&typeof _0x966469===_0x57a7c1(0x1cb)&&_0x57a7c1(0x159)in _0x966469?_0x966469[_0x57a7c1(0x159)]?.[0x0]:_0x966469&&typeof _0x966469===_0x57a7c1(0x1cb)&&_0x57a7c1(0x1b5)in _0x966469?_0x966469:undefined;if(!_0x2f2e82)throw CliErrors[_0x57a7c1(0x1c2)](_0x57a7c1(0x1a5)+_0x3a1f75);return _0x2f2e82;}function isRemoteAppItem(_0x2af084){const _0x20ea02=a65_0x236b;return!!_0x2af084&&typeof _0x2af084===_0x20ea02(0x1cb)&&typeof _0x2af084[_0x20ea02(0x1ab)]===_0x20ea02(0x1a7)&&typeof _0x2af084[_0x20ea02(0x186)]===_0x20ea02(0x1a7);}function extractRemoteAppItems(_0x4a5d86){const _0x441a7c=a65_0x236b;if(Array['isArray'](_0x4a5d86))return _0x4a5d86['filter'](isRemoteAppItem);if(!_0x4a5d86||typeof _0x4a5d86!==_0x441a7c(0x1cb))throw CliErrors[_0x441a7c(0x18b)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x2d0ce5=_0x4a5d86;if(Array[_0x441a7c(0x17c)](_0x2d0ce5[_0x441a7c(0x159)]))return _0x2d0ce5[_0x441a7c(0x159)][_0x441a7c(0x1c7)](isRemoteAppItem);if(_0x2d0ce5[_0x441a7c(0x16c)]&&typeof _0x2d0ce5[_0x441a7c(0x16c)]==='object'){const _0x1e9365=_0x2d0ce5['data'];if(Array['isArray'](_0x1e9365[_0x441a7c(0x159)]))return _0x1e9365[_0x441a7c(0x159)][_0x441a7c(0x1c7)](isRemoteAppItem);}throw CliErrors[_0x441a7c(0x18b)](_0x441a7c(0x184));}export async function getMyApps(){const _0x1d3712=a65_0x236b,_0x37cd36=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x37cd36[_0x1d3712(0x16c)]);}export async function getLoginUserInfo(){const _0x1f445d=a65_0x236b,_0x58a00f=await apiRequest(_0x1f445d(0x1d6));if(!_0x58a00f[_0x1f445d(0x16c)]||typeof _0x58a00f['data']!==_0x1f445d(0x1cb)||Array[_0x1f445d(0x17c)](_0x58a00f['data']))throw CliErrors[_0x1f445d(0x18b)](_0x1f445d(0x192));return _0x58a00f[_0x1f445d(0x16c)];}export async function listDatasets(_0x307bf2,_0x2a1d56){const _0x3cac51=a65_0x236b,_0x56fa4f=await apiRequest(_0x3cac51(0x1d7),{'method':_0x3cac51(0x1ad),'body':{'appCode':_0x307bf2,..._0x2a1d56?.[_0x3cac51(0x17e)]&&{'code':_0x2a1d56[_0x3cac51(0x17e)]},..._0x2a1d56?.[_0x3cac51(0x172)]&&{'name':_0x2a1d56[_0x3cac51(0x172)]}}});return extractList(_0x56fa4f[_0x3cac51(0x16c)]);}export async function getDatasetDetail(_0x1f9587){const _0x168d39=a65_0x236b,_0x3fab31=/^\d+$/[_0x168d39(0x1bf)](_0x1f9587)?'id':_0x168d39(0x17e),_0x582993=await apiRequest(_0x168d39(0x15a)+_0x3fab31+'='+_0x1f9587);return _0x582993['data'];}export async function getDatasetSdkUsageDoc(_0x3d6969,_0x5a706f){const _0x3e108c=a65_0x236b,_0x3ef212=await toolboxRequest(_0x3e108c(0x15d),{'datasetCode':_0x3d6969,'appCode':_0x5a706f});return typeof _0x3ef212?.[_0x3e108c(0x1ae)]===_0x3e108c(0x1a7)?_0x3ef212[_0x3e108c(0x1ae)]:'';}export async function listRuntimeArtifacts(_0x5bab21,_0x279fa6){const _0x219483=a65_0x236b,_0x2d5158=new URLSearchParams({'appCode':_0x5bab21});if(_0x279fa6?.['artifactType'])_0x2d5158[_0x219483(0x1bd)]('artifactType',_0x279fa6['artifactType']);if(_0x279fa6?.[_0x219483(0x199)])_0x2d5158[_0x219483(0x1bd)](_0x219483(0x199),_0x279fa6[_0x219483(0x199)]);if(_0x279fa6?.[_0x219483(0x1b8)]!==undefined)_0x2d5158['set'](_0x219483(0x1b8),String(_0x279fa6[_0x219483(0x1b8)]));const _0x78ac5b=await apiRequest(_0x219483(0x1a0)+_0x2d5158[_0x219483(0x187)]());return Array['isArray'](_0x78ac5b['data'])?_0x78ac5b[_0x219483(0x16c)]:[];}export async function getRuntimeArtifact(_0x1f9789,_0x2e1d70){const _0x422826=a65_0x236b,_0x11ddfb=await apiRequest(_0x422826(0x174)+_0x1f9789+'?appCode='+encodeURIComponent(_0x2e1d70));if(!_0x11ddfb[_0x422826(0x16c)])throw CliErrors['validation'](_0x422826(0x179)+_0x1f9789);return _0x11ddfb[_0x422826(0x16c)];}export async function createRuntimeArtifact(_0x34a2f2,_0x443112){const _0x245e86=a65_0x236b,_0x405d80=await apiRequest(_0x245e86(0x16f),{'method':_0x245e86(0x1ad),'body':{'appCode':_0x34a2f2,..._0x443112}});return _0x405d80[_0x245e86(0x16c)];}export async function updateRuntimeArtifact(_0x2c530e,_0x2e8eff,_0x368155){const _0x26dd90=a65_0x236b,_0x49e738=await apiRequest(_0x26dd90(0x174)+_0x2c530e+_0x26dd90(0x181),{'method':_0x26dd90(0x1ad),'body':{'appCode':_0x2e8eff,..._0x368155}});return _0x49e738[_0x26dd90(0x16c)];}export async function listPersonalBffs(_0x1ae0fa){const _0x32789e=a65_0x236b,_0x2ff3c3=await apiRequest(_0x32789e(0x16d)+encodeURIComponent(_0x1ae0fa));return Array['isArray'](_0x2ff3c3['data'])?_0x2ff3c3[_0x32789e(0x16c)]:[];}function a65_0x236b(_0x588903,_0x4aa2c3){_0x588903=_0x588903-0x158;const _0x4ce405=a65_0x4ce4();let _0x236b97=_0x4ce405[_0x588903];return _0x236b97;}export async function getPersonalBff(_0x5851c4,_0xa5ad84){const _0x285631=a65_0x236b,_0x3bf151=await apiRequest(_0x285631(0x1c1)+_0x5851c4+_0x285631(0x178)+encodeURIComponent(_0xa5ad84));if(!_0x3bf151['data'])throw CliErrors[_0x285631(0x1c2)](_0x285631(0x19d)+_0x5851c4);return _0x3bf151[_0x285631(0x16c)];}export async function createPersonalBff(_0x4a4d43,_0x41e877){const _0x4beabf=a65_0x236b,_0x561fdd=await apiRequest(_0x4beabf(0x195),{'method':'POST','body':{'appCode':_0x4a4d43,..._0x41e877}});return _0x561fdd[_0x4beabf(0x16c)];}export async function updatePersonalBff(_0x427f00,_0x262673,_0x392d3e){const _0x47e7f6=a65_0x236b,_0x1dac32=await apiRequest(_0x47e7f6(0x1c1)+_0x427f00+_0x47e7f6(0x181),{'method':_0x47e7f6(0x1ad),'body':{'appCode':_0x262673,..._0x392d3e}});return _0x1dac32[_0x47e7f6(0x16c)];}export async function executePersonalBff(_0x1c480a,_0x427d2e,_0x168f52){const _0x317700=a65_0x236b,_0xe2ffc9=await apiRequest(_0x317700(0x1c1)+_0x1c480a+_0x317700(0x18e)+encodeURIComponent(_0x427d2e),{'method':'POST','body':_0x168f52});return _0xe2ffc9[_0x317700(0x16c)];}export async function listPersonalKnowledgeBaseItems(_0x2b9940){const _0x5709ee=a65_0x236b,_0x39c4df=await apiRequest(_0x5709ee(0x1a6)+encodeURIComponent(_0x2b9940));return Array[_0x5709ee(0x17c)](_0x39c4df[_0x5709ee(0x16c)])?_0x39c4df[_0x5709ee(0x16c)]:[];}export async function getPersonalKnowledgeBaseItem(_0x41038e,_0x3e422d){const _0x379b3d=a65_0x236b,_0x4c9100=await apiRequest(_0x379b3d(0x1b0)+_0x41038e+_0x379b3d(0x178)+encodeURIComponent(_0x3e422d));if(!_0x4c9100[_0x379b3d(0x16c)])throw CliErrors[_0x379b3d(0x1c2)](_0x379b3d(0x18a)+_0x41038e);return _0x4c9100[_0x379b3d(0x16c)];}export async function createPersonalKnowledgeBaseItem(_0x396955,_0x212ea4){const _0x375b2a=await apiRequest('/client/knowledge-base/personal/create',{'method':'POST','body':{'appCode':_0x396955,..._0x212ea4}});return _0x375b2a['data'];}export async function updatePersonalKnowledgeBaseItem(_0x528c4d,_0x21916d,_0x58109d){const _0x54efd6=a65_0x236b,_0x135172=await apiRequest(_0x54efd6(0x1b0)+_0x528c4d+_0x54efd6(0x181),{'method':_0x54efd6(0x1ad),'body':{'appCode':_0x21916d,..._0x58109d}});return _0x135172[_0x54efd6(0x16c)];}export async function searchKnowledgeBase(_0x29455c,_0x4f4899){const _0x21f42f=a65_0x236b,_0x40057f=await apiRequest(_0x21f42f(0x16b),{'method':_0x21f42f(0x1ad),'body':{'appCode':_0x29455c,'query':_0x4f4899[_0x21f42f(0x1ac)],..._0x4f4899[_0x21f42f(0x15c)]!==undefined?{'topK':_0x4f4899[_0x21f42f(0x15c)]}:{}}});return Array['isArray'](_0x40057f[_0x21f42f(0x16c)])?_0x40057f[_0x21f42f(0x16c)]:[];}export async function listRuntimeSkills(_0x278485){const _0x3f07b1=a65_0x236b,_0x43d23a=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x278485['appCode'])+_0x3f07b1(0x183),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x278485[_0x3f07b1(0x1ab)],_0x43d23a,_0x278485[_0x3f07b1(0x1d5)]??_0x3f07b1(0x19c),_0x278485['code']);}export async function listPersonalRuntimeSkills(_0x210020){const _0x174b77=a65_0x236b;return(await listRuntimeSkills({'appCode':_0x210020,'scope':'personal'}))[_0x174b77(0x1c3)];}export async function listCompanyRuntimeSkills(_0x3c37bc){const _0x58a236=a65_0x236b;return(await listRuntimeSkills({'appCode':_0x3c37bc,'scope':'company'}))[_0x58a236(0x17a)];}export async function listVisibleRuntimeSkills(_0x228648){const _0x20dc5a=a65_0x236b;return(await listRuntimeSkills({'appCode':_0x228648,'scope':_0x20dc5a(0x19c)}))[_0x20dc5a(0x169)];}function a65_0x4ce4(){const _0x2bcb07=['SQL\x20query\x20not\x20found:\x20','/client/knowledge-base/personal/list?appCode=','string','6maBJtU','tags','3516055aOImWc','appCode','query','POST','markdown','.zip','/client/knowledge-base/personal/','description','displayName','invokeSource','visibility','sqlCode','1470573xoRdnX','publishedVersion','favorite','Toolbox\x20API\x20error:\x20','SkillHub\x20API\x20error:\x20','number','/client/bff/query/','set','12742928zcZQdl','test','711279MKWGtK','/client/runtime-bff/personal/','validation','personal','454232dsBEOc','Check\x20your\x20credentials\x20and\x20try\x20again.','searchParams','filter','Request\x20timeout:\x20','summary','Toolbox\x20error\x20code:\x20','object','status','abort','50TJjnUz','items','map','skillCode','success','application/octet-stream','message','scope','/client/user/loginUserInfo','/client/dataset/list','application/zip','tableData','/client/dataset/query?','json','topK','api-doc-generator','skill','base64','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','2102ZFgbEa','/api/cli/v1/skills/','packageBase64','BFF\x20script\x20not\x20found:\x20id=','Download\x20failed:\x20','application/json','/versions/','errorMsg','effective','GET','/client/knowledge-base/search','data','/client/runtime-bff/personal/list?appCode=','ownerPreviewVersion','/client/artifact/create','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','msg','name','signal','/client/artifact/','errorCode','boolean','599WcOLea','?appCode=','Artifact\x20not\x20found:\x20id=','company','arrayBuffer','isArray','from','code','Missing\x20Skill\x20package\x20payload.','Toolbox\x20API\x20error','/update','values','/skills','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','14QmYeus','appName','toString','replace','slug','Knowledge-base\x20entry\x20not\x20found:\x20id=','apiError','2743168shhkiw','version','/execute?appCode=','text','API\x20error:\x20','/publish','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','AbortError','namespace','/client/runtime-bff/personal/create','authRequired','trim','API\x20error\x20code:\x20','source','skillName','/download','all','Personal\x20BFF\x20not\x20found:\x20id=','Configure\x20accessKey\x20in\x20','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/artifact/list?','/api/node-toolbox/','entries','content','newConfigFileName'];a65_0x4ce4=function(){return _0x2bcb07;};return a65_0x4ce4();}export async function createPersonalRuntimeSkill(_0x13c09d,_0x306b60){return publishRuntimeSkill(_0x13c09d,_0x306b60);}export async function updatePersonalRuntimeSkill(_0x524c84,_0x41f866,_0xf702ad){const _0x4f98f7=a65_0x236b;return publishRuntimeSkill(_0x41f866,{..._0xf702ad,'skillCode':_0xf702ad[_0x4f98f7(0x1d1)]??_0x524c84});}export async function downloadRuntimeSkillPackage(_0x1d9a03,_0x54a5fb,_0x1ea7ff,_0x28947a){const _0x4e1357=a65_0x236b;void _0x1d9a03;const _0x2c48df=_0x28947a?_0x4e1357(0x162)+encodeURIComponent(_0x1ea7ff)+'/'+encodeURIComponent(_0x54a5fb)+_0x4e1357(0x167)+encodeURIComponent(_0x28947a)+_0x4e1357(0x19b):'/api/cli/v1/skills/'+encodeURIComponent(_0x1ea7ff)+'/'+encodeURIComponent(_0x54a5fb)+_0x4e1357(0x19b);return skillHubBinaryRequest(_0x2c48df);}async function publishRuntimeSkill(_0x43a2fc,_0x72f440){const _0x36d51c=a65_0x236b,_0x2eaf9d=new FormData();_0x2eaf9d[_0x36d51c(0x1bd)]('file',runtimeSkillPackageFile(_0x72f440)),_0x2eaf9d[_0x36d51c(0x1bd)](_0x36d51c(0x1b4),'PRIVATE');const _0x898728=await skillHubJsonRequest(_0x36d51c(0x162)+encodeURIComponent(_0x43a2fc)+_0x36d51c(0x191),{'method':'POST','body':_0x2eaf9d});return{'appCode':_0x898728[_0x36d51c(0x194)]??_0x43a2fc,'skillCode':_0x898728[_0x36d51c(0x189)]??_0x72f440[_0x36d51c(0x1d1)]??'','skillName':_0x72f440[_0x36d51c(0x19a)]??_0x898728[_0x36d51c(0x189)]??_0x72f440[_0x36d51c(0x1d1)],'description':_0x72f440[_0x36d51c(0x1b1)],'scope':skillHubVisibilityToScope(_0x898728[_0x36d51c(0x1b4)])??_0x36d51c(0x1c3),'version':_0x898728['version']??_0x72f440['version'],'tags':_0x72f440[_0x36d51c(0x1a9)],'content':_0x72f440[_0x36d51c(0x1a3)]};}function runtimeSkillPackageFile(_0x30c872){const _0x4617e1=a65_0x236b;if(!_0x30c872['packageBase64'])throw CliErrors[_0x4617e1(0x1c2)](_0x4617e1(0x17f));const _0x2be40f=Buffer['from'](_0x30c872[_0x4617e1(0x163)],_0x4617e1(0x15f)),_0x248dcd=new Blob([_0x2be40f],{'type':_0x4617e1(0x158)}),_0x3bd965=(_0x30c872[_0x4617e1(0x1d1)]||_0x4617e1(0x15e))+_0x4617e1(0x1af);if(typeof File!=='undefined')return new File([_0x248dcd],_0x3bd965,{'type':_0x4617e1(0x158)});return _0x248dcd;}function normalizeSkillHubRuntimeListResponse(_0x21bc7d,_0x229127,_0x5cb28d,_0x56e577){const _0x391b6f=a65_0x236b,_0x49d0f5=Array[_0x391b6f(0x17c)](_0x229127)?_0x229127:Array['isArray'](_0x229127?.[_0x391b6f(0x1cf)])?_0x229127[_0x391b6f(0x1cf)]:[],_0x243a78=_0x56e577?.[_0x391b6f(0x197)](),_0x4385cd=_0x49d0f5[_0x391b6f(0x1c7)](_0x27c271=>!_0x243a78||_0x27c271['slug']===_0x243a78)[_0x391b6f(0x1d0)](skillHubRuntimeItemToRuntimeSkill)[_0x391b6f(0x1c7)](_0x52e34c=>Boolean(_0x52e34c)),_0x15fe71=_0x4385cd['filter'](_0x2c31c3=>_0x2c31c3[_0x391b6f(0x1d5)]===_0x391b6f(0x1c3)),_0x52d0d6=_0x4385cd[_0x391b6f(0x1c7)](_0x5a13d1=>_0x5a13d1[_0x391b6f(0x1d5)]===_0x391b6f(0x17a));return{'appCode':_0x21bc7d,'personal':_0x5cb28d==='company'?[]:_0x15fe71,'company':_0x5cb28d===_0x391b6f(0x1c3)?[]:_0x52d0d6,'effective':buildEffectiveRuntimeSkills(_0x15fe71,_0x52d0d6,_0x5cb28d)};}function skillHubRuntimeItemToRuntimeSkill(_0x5711d8){const _0x32ecfd=a65_0x236b,_0x5ad612=_0x5711d8[_0x32ecfd(0x189)]?.[_0x32ecfd(0x197)](),_0x4bd902=skillHubVisibilityToScope(_0x5711d8[_0x32ecfd(0x1b4)]);if(!_0x5ad612||!_0x4bd902)return undefined;return{'id':_0x5711d8['id'],'appCode':_0x5711d8[_0x32ecfd(0x194)],'skillCode':_0x5ad612,'skillName':_0x5711d8[_0x32ecfd(0x1b2)]??_0x5ad612,'description':_0x5711d8[_0x32ecfd(0x1c9)],'scope':_0x4bd902,'version':skillHubRuntimeItemVersion(_0x5711d8),'status':_0x5711d8[_0x32ecfd(0x1cc)]};}function skillHubVisibilityToScope(_0xbf8019){const _0x1bb535=a65_0x236b;if(_0xbf8019==='PRIVATE')return _0x1bb535(0x1c3);if(_0xbf8019==='NAMESPACE_ONLY')return'company';return undefined;}function skillHubRuntimeItemVersion(_0x34db91){const _0x31562f=a65_0x236b;return _0x34db91[_0x31562f(0x1b7)]?.[_0x31562f(0x18d)]??_0x34db91['headlineVersion']?.['version']??_0x34db91[_0x31562f(0x16e)]?.[_0x31562f(0x18d)];}function buildEffectiveRuntimeSkills(_0x135f68,_0x22eb20,_0x1687bc){const _0x44c873=a65_0x236b;if(_0x1687bc==='personal')return _0x135f68;if(_0x1687bc===_0x44c873(0x17a))return _0x22eb20;const _0xb7f162=new Map();for(const _0x5150c6 of _0x22eb20){_0xb7f162[_0x44c873(0x1bd)](_0x5150c6['skillCode'],_0x5150c6);}for(const _0x3e55a7 of _0x135f68){_0xb7f162['set'](_0x3e55a7[_0x44c873(0x1d1)],_0x3e55a7);}return Array['from'](_0xb7f162[_0x44c873(0x182)]());}function normalizeRuntimeSkillListResponse(_0x1e71c3,_0x27e20f){const _0x309e42=a65_0x236b;if(Array[_0x309e42(0x17c)](_0x27e20f)){const _0x577266=_0x27e20f[_0x309e42(0x1c7)](_0x321d20=>_0x321d20[_0x309e42(0x1d5)]===_0x309e42(0x1c3)),_0x3f416f=_0x27e20f[_0x309e42(0x1c7)](_0x51c915=>_0x51c915['scope']===_0x309e42(0x17a));return{'appCode':_0x1e71c3,'personal':_0x577266,'company':_0x3f416f,'effective':[..._0x3f416f,..._0x577266]};}return{'appCode':_0x27e20f?.[_0x309e42(0x1ab)]??_0x1e71c3,'personal':Array[_0x309e42(0x17c)](_0x27e20f?.[_0x309e42(0x1c3)])?_0x27e20f[_0x309e42(0x1c3)]:[],'company':Array[_0x309e42(0x17c)](_0x27e20f?.[_0x309e42(0x17a)])?_0x27e20f[_0x309e42(0x17a)]:[],'effective':Array['isArray'](_0x27e20f?.['effective'])?_0x27e20f[_0x309e42(0x169)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16c9d9,_0x3c8687){const _0x3adeaa=a66_0x3099,_0x2eede1=_0x16c9d9();while(!![]){try{const _0x2f522a=parseInt(_0x3adeaa(0xf1))/0x1+parseInt(_0x3adeaa(0xec))/0x2+-parseInt(_0x3adeaa(0xf8))/0x3*(-parseInt(_0x3adeaa(0xf7))/0x4)+-parseInt(_0x3adeaa(0xf2))/0x5*(parseInt(_0x3adeaa(0xef))/0x6)+parseInt(_0x3adeaa(0xed))/0x7+parseInt(_0x3adeaa(0xf4))/0x8*(-parseInt(_0x3adeaa(0xf5))/0x9)+-parseInt(_0x3adeaa(0xea))/0xa*(parseInt(_0x3adeaa(0xf6))/0xb);if(_0x2f522a===_0x3c8687)break;else _0x2eede1['push'](_0x2eede1['shift']());}catch(_0x3c7794){_0x2eede1['push'](_0x2eede1['shift']());}}}(a66_0x4ec6,0x41e3c));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x34873a){const _0x47ae14=a66_0x3099;if(cache['has'](_0x34873a))return cache['get'](_0x34873a);const _0x229b59=await listDatasets(_0x34873a),_0x57ab94=new Map();for(const _0x5acce4 of _0x229b59){const _0x15a011=_0x5acce4[_0x47ae14(0xf0)];_0x15a011?.[_0x47ae14(0xee)]!=null&&_0x57ab94['set'](_0x15a011[_0x47ae14(0xee)],_0x15a011[_0x47ae14(0xf3)]??'db-'+_0x15a011['dbId']);}const _0x21ee6e=[..._0x57ab94[_0x47ae14(0xeb)]()][_0x47ae14(0xe9)](([_0x17d6d4,_0xf0950d])=>({'dbId':_0x17d6d4,'dbName':_0xf0950d}));return cache['set'](_0x34873a,_0x21ee6e),_0x21ee6e;}export async function getDbName(_0x2ac872,_0x17b341){const _0x3adabe=a66_0x3099;try{const _0x5d780b=await listDatabases(_0x2ac872);return _0x5d780b['find'](_0xccd58f=>_0xccd58f[_0x3adabe(0xee)]===_0x17b341)?.[_0x3adabe(0xf3)];}catch{return undefined;}}function a66_0x3099(_0x2cf4e8,_0x14cb91){_0x2cf4e8=_0x2cf4e8-0xe9;const _0x4ec61b=a66_0x4ec6();let _0x30993b=_0x4ec61b[_0x2cf4e8];return _0x30993b;}function a66_0x4ec6(){const _0xd2a6cc=['dbId','36DnTRye','dbtableConfig','210809CRKkJp','169810AvduYv','dbName','8LxVRVQ','1116387ezTjgL','143mVvwvK','88TccHzr','25716WXWPna','map','178810LsjHex','entries','293780ExbRbd','1987083kgGQZs'];a66_0x4ec6=function(){return _0xd2a6cc;};return a66_0x4ec6();}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59b93f,_0x3e64e5){const _0x4caf26=a67_0x3968,_0x224170=_0x59b93f();while(!![]){try{const _0x2c60fa=parseInt(_0x4caf26(0x16f))/0x1+parseInt(_0x4caf26(0x16d))/0x2+-parseInt(_0x4caf26(0x184))/0x3*(parseInt(_0x4caf26(0x185))/0x4)+-parseInt(_0x4caf26(0x188))/0x5*(-parseInt(_0x4caf26(0x170))/0x6)+parseInt(_0x4caf26(0x18a))/0x7+parseInt(_0x4caf26(0x16b))/0x8+-parseInt(_0x4caf26(0x179))/0x9*(parseInt(_0x4caf26(0x187))/0xa);if(_0x2c60fa===_0x3e64e5)break;else _0x224170['push'](_0x224170['shift']());}catch(_0x35508d){_0x224170['push'](_0x224170['shift']());}}}(a67_0x2221,0x592c8));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';function a67_0x2221(){const _0x4d2291=['accessKey','invokeSource','map','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','3oBftrV','2834552TYFiIE','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','10358990lCxCcH','34025NXngEO','trim','2644138vGYIhg','\x22.\x20','column','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','string',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','dataset_','sql','isArray','2282368GkEJDA','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','459556Rrjwgm','field','570510nYIVXZ','570hEjQpa','appCode','env','data\x20aggregate\x20--params.aggregate[','authMode','object','update','batchCreate','models','9ECjYDO','execute','delete','validation','getOne',']\x20must\x20be\x20an\x20object.','aggregate'];a67_0x2221=function(){return _0x4d2291;};return a67_0x2221();}let _client;export function initSdkClient(_0xe118f7){const _0x38ae91=a67_0x3968;_client=createClient({'appCode':_0xe118f7[_0x38ae91(0x171)],'env':_0xe118f7[_0x38ae91(0x172)],'authMode':_0xe118f7[_0x38ae91(0x174)],..._0xe118f7['accessKey']?{'accessKey':_0xe118f7[_0x38ae91(0x180)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x38ae91(0x181)]}}});}function ensureClient(){const _0x184076=a67_0x3968;if(!_client)throw new Error(_0x184076(0x183));return _client;}function normalizeAggregateParams(_0x358e31){const _0x26d1dc=a67_0x3968,_0x8ebe47=_0x358e31['aggregate'];if(_0x8ebe47===undefined)return _0x358e31;if(!Array[_0x26d1dc(0x192)](_0x8ebe47))throw CliErrors[_0x26d1dc(0x17c)]('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x358e31,'aggregate':_0x8ebe47[_0x26d1dc(0x182)]((_0x115f2b,_0x97db96)=>{const _0x4f6ab4=_0x26d1dc;if(!_0x115f2b||typeof _0x115f2b!==_0x4f6ab4(0x175)||Array[_0x4f6ab4(0x192)](_0x115f2b))throw CliErrors['validation'](_0x4f6ab4(0x173)+_0x97db96+_0x4f6ab4(0x17e));const _0xaafeac=_0x115f2b[_0x4f6ab4(0x18c)]??_0x115f2b[_0x4f6ab4(0x16e)];if(typeof _0xaafeac!==_0x4f6ab4(0x18e)||_0xaafeac[_0x4f6ab4(0x189)]()==='')throw CliErrors['validation'](_0x4f6ab4(0x173)+_0x97db96+_0x4f6ab4(0x18f));const _0x3ffd7a={..._0x115f2b,'column':_0xaafeac};return delete _0x3ffd7a[_0x4f6ab4(0x16e)],_0x3ffd7a;})};}function a67_0x3968(_0x9ca982,_0x17cd35){_0x9ca982=_0x9ca982-0x16b;const _0x222147=a67_0x2221();let _0x3968a7=_0x222147[_0x9ca982];return _0x3968a7;}export async function executeData(_0x33de49,_0x6074b7,_0x118cc7){const _0x519281=a67_0x3968,_0xf95827=ensureClient(),_0x56fb5f=_0x519281(0x190)+_0x33de49,_0x907f19=_0xf95827[_0x519281(0x178)][_0x56fb5f];if(!_0x907f19||typeof _0x907f19[_0x6074b7]!=='function')throw new Error(_0x519281(0x18d)+_0x6074b7+_0x519281(0x18b)+'Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.');if(_0x6074b7==='batchCreate')return _0x907f19[_0x519281(0x177)](parseBatchCreateItemsFromParams(_0x118cc7));const _0x1ef577=_0x118cc7!==undefined&&_0x118cc7!==null&&!Array[_0x519281(0x192)](_0x118cc7)?_0x118cc7:{};switch(_0x6074b7){case _0x519281(0x17d):{const _0x2ddcd6=_0x1ef577['id'];if(_0x2ddcd6===undefined||_0x2ddcd6===null)throw new Error(_0x519281(0x186));return _0x907f19['getOne'](_0x2ddcd6);}case _0x519281(0x176):{const {id:_0x337902,..._0x3825db}=_0x1ef577;if(_0x337902===undefined||_0x337902===null)throw new Error('update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27');return _0x907f19['update'](_0x337902,_0x3825db);}case _0x519281(0x17b):{const _0x1726b2=_0x1ef577['id'];if(_0x1726b2===undefined||_0x1726b2===null)throw new Error(_0x519281(0x16c));return _0x907f19['delete'](_0x1726b2);}case _0x519281(0x17f):return _0x907f19[_0x519281(0x17f)](normalizeAggregateParams(_0x1ef577));default:return _0x907f19[_0x6074b7](_0x1ef577);}}export async function executeSdkSql(_0x34db3a,_0x3db1de){const _0xa9e91c=a67_0x3968,_0x398ace=ensureClient();return _0x398ace[_0xa9e91c(0x191)]['execute']({'sqlCode':_0x34db3a,'params':_0x3db1de});}export async function executeSdkBff(_0x163d91,_0x5caba2){const _0x88cbdb=a67_0x3968,_0x58e181=ensureClient();return _0x58e181['bff'][_0x88cbdb(0x17a)]({'scriptName':_0x163d91,'params':_0x5caba2});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a68_0x35d296=a68_0x2c15;(function(_0x45955e,_0x4ca67e){const _0x30283e=a68_0x2c15,_0x24d9fa=_0x45955e();while(!![]){try{const _0x27c941=parseInt(_0x30283e(0xfb))/0x1+parseInt(_0x30283e(0xf2))/0x2*(parseInt(_0x30283e(0xfa))/0x3)+parseInt(_0x30283e(0xed))/0x4*(parseInt(_0x30283e(0xef))/0x5)+parseInt(_0x30283e(0xf8))/0x6*(-parseInt(_0x30283e(0xee))/0x7)+parseInt(_0x30283e(0xf5))/0x8*(parseInt(_0x30283e(0xf3))/0x9)+-parseInt(_0x30283e(0xf6))/0xa+-parseInt(_0x30283e(0xeb))/0xb*(parseInt(_0x30283e(0xea))/0xc);if(_0x27c941===_0x4ca67e)break;else _0x24d9fa['push'](_0x24d9fa['shift']());}catch(_0x1399db){_0x24d9fa['push'](_0x24d9fa['shift']());}}}(a68_0x3ffb,0x54eb9));import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a68_0x2c15(_0x35d1aa,_0xa22183){_0x35d1aa=_0x35d1aa-0xea;const _0x3ffbb1=a68_0x3ffb();let _0x2c15f0=_0x3ffbb1[_0x35d1aa];return _0x2c15f0;}import{CLI_BIN_NAME}from'./constant/cli.js';function a68_0x3ffb(){const _0x3ff3cb=['44HeuTzZ','\x20or\x20run\x20`','120076ngXubw','840eUhzOM','105oVxBgm','Set\x20appcode\x20via\x20--appcode\x20or\x20','newConfigFileName','4tZVbsA','9hOYqJM','Configure\x20accessKey\x20in\x20','2396816sldXUG','600000jjkvME','\x20auth\x20login`.','11112KuHXYY','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','295905UqymBy','139806iPFkPT','1911012IwWjnJ'];a68_0x3ffb=function(){return _0x3ff3cb;};return a68_0x3ffb();}import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a68_0x35d296(0xf4)+PRODUCT_CONFIG[a68_0x35d296(0xf1)]+a68_0x35d296(0xec)+CLI_BIN_NAME+a68_0x35d296(0xf7),'configMissingHint':a68_0x35d296(0xf0)+PRODUCT_CONFIG[a68_0x35d296(0xf1)]+'.','notInProjectHint':a68_0x35d296(0xf9)+PRODUCT_CONFIG['newConfigFileName']+'\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a69_0x45f4(_0x22a81b,_0x76d285){_0x22a81b=_0x22a81b-0x1e3;var _0x323a6f=a69_0x323a();var _0x45f4ba=_0x323a6f[_0x22a81b];return _0x45f4ba;}(function(_0x4dcb05,_0x348177){var _0x291919=a69_0x45f4,_0x5af68d=_0x4dcb05();while(!![]){try{var _0x27e6e2=-parseInt(_0x291919(0x1e4))/0x1*(parseInt(_0x291919(0x1ec))/0x2)+-parseInt(_0x291919(0x1e9))/0x3*(-parseInt(_0x291919(0x1e8))/0x4)+parseInt(_0x291919(0x1e7))/0x5+parseInt(_0x291919(0x1e6))/0x6*(-parseInt(_0x291919(0x1e3))/0x7)+parseInt(_0x291919(0x1eb))/0x8+-parseInt(_0x291919(0x1ea))/0x9+parseInt(_0x291919(0x1e5))/0xa;if(_0x27e6e2===_0x348177)break;else _0x5af68d['push'](_0x5af68d['shift']());}catch(_0x55a829){_0x5af68d['push'](_0x5af68d['shift']());}}}(a69_0x323a,0x7a208));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a69_0x323a(){var _0x278c00=['4801745diwILX','3696fQxwHx','432dwShEG','630549HjpGNN','333272lnvdux','468HoMisU','14XfHFUM','233WfDTeK','926690TYaeFy','1808754eChDMQ'];a69_0x323a=function(){return _0x278c00;};return a69_0x323a();}import{buildAllFlags as a69_0x44f378}from'@lovrabet/cli-framework';export function buildAllFlags(_0x556d8d){return a69_0x44f378(_0x556d8d,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a70_0x5892(){const _0x1ba867=['3829164wgMIqp','7275065pHnKfM','2342784OxqBVD','301318xEwtUH','18DcarLf','790220KnQNMy','body','6310674FnvAAr','10gWfAzN','3832150mvnbxV','35jXzYKr'];a70_0x5892=function(){return _0x1ba867;};return a70_0x5892();}(function(_0x159e96,_0x496230){const _0x1c886e=a70_0xfd01,_0x275e4f=_0x159e96();while(!![]){try{const _0x15597a=-parseInt(_0x1c886e(0xe8))/0x1*(parseInt(_0x1c886e(0xee))/0x2)+-parseInt(_0x1c886e(0xef))/0x3*(-parseInt(_0x1c886e(0xf0))/0x4)+parseInt(_0x1c886e(0xec))/0x5+-parseInt(_0x1c886e(0xeb))/0x6+-parseInt(_0x1c886e(0xea))/0x7*(-parseInt(_0x1c886e(0xed))/0x8)+-parseInt(_0x1c886e(0xe7))/0x9+-parseInt(_0x1c886e(0xe9))/0xa;if(_0x15597a===_0x496230)break;else _0x275e4f['push'](_0x275e4f['shift']());}catch(_0x391499){_0x275e4f['push'](_0x275e4f['shift']());}}}(a70_0x5892,0xd5b86));function a70_0xfd01(_0x218010,_0xedd0b4){_0x218010=_0x218010-0xe6;const _0x589254=a70_0x5892();let _0xfd0135=_0x589254[_0x218010];return _0xfd0135;}export function dryRun(_0x4f8537,_0x374f72){const _0x4a631f={'method':_0x4f8537,'url':_0x374f72},_0x4c3a3b={'body'(_0x307c20){const _0x3e7006=a70_0xfd01;return _0x4a631f[_0x3e7006(0xe6)]=_0x307c20,_0x4c3a3b;},'description'(_0x354a44){return _0x4a631f['description']=_0x354a44,_0x4c3a3b;},'build'(){return{..._0x4a631f};}};return _0x4c3a3b;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a71_0x2cc57d=a71_0x5d3a;(function(_0x1dd386,_0x2de4cb){const _0x265342=a71_0x5d3a,_0x1656cf=_0x1dd386();while(!![]){try{const _0x5b0188=parseInt(_0x265342(0x19b))/0x1*(parseInt(_0x265342(0x19d))/0x2)+-parseInt(_0x265342(0x1a4))/0x3+-parseInt(_0x265342(0x1a1))/0x4+parseInt(_0x265342(0x19f))/0x5*(parseInt(_0x265342(0x1a0))/0x6)+parseInt(_0x265342(0x1a3))/0x7*(-parseInt(_0x265342(0x19a))/0x8)+parseInt(_0x265342(0x19c))/0x9+-parseInt(_0x265342(0x199))/0xa;if(_0x5b0188===_0x2de4cb)break;else _0x1656cf['push'](_0x1656cf['shift']());}catch(_0x5827e2){_0x1656cf['push'](_0x1656cf['shift']());}}}(a71_0x32a5,0x661eb));import{createFlagHelpers}from'@lovrabet/cli-framework';function a71_0x32a5(){const _0x446e89=['816834YxQiJc','parseFlags','785mvBRhp','30486FoWtsH','2110488cNcoCF','validateFlags','5243357sOdyrg','584553TjMhnO','4372660cDAuij','8nxlwUj','2UhFArD','6412698Yufyhf'];a71_0x32a5=function(){return _0x446e89;};return a71_0x32a5();}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a71_0x2cc57d(0x19e)];function a71_0x5d3a(_0x4d378a,_0x961b43){_0x4d378a=_0x4d378a-0x199;const _0x32a5ba=a71_0x32a5();let _0x5d3a78=_0x32a5ba[_0x4d378a];return _0x5d3a78;}export const validateFlags=helpers[a71_0x2cc57d(0x1a2)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3bc3b1,_0x4d9f29){const _0x2160aa=a72_0x263e,_0xd4f598=_0x3bc3b1();while(!![]){try{const _0x1bde8a=-parseInt(_0x2160aa(0x1d7))/0x1+-parseInt(_0x2160aa(0x1ce))/0x2+parseInt(_0x2160aa(0x1e1))/0x3*(-parseInt(_0x2160aa(0x1d1))/0x4)+-parseInt(_0x2160aa(0x1d9))/0x5*(parseInt(_0x2160aa(0x1db))/0x6)+-parseInt(_0x2160aa(0x1cf))/0x7*(-parseInt(_0x2160aa(0x1e2))/0x8)+-parseInt(_0x2160aa(0x1df))/0x9*(-parseInt(_0x2160aa(0x1d2))/0xa)+parseInt(_0x2160aa(0x1d0))/0xb*(parseInt(_0x2160aa(0x1dc))/0xc);if(_0x1bde8a===_0x4d9f29)break;else _0xd4f598['push'](_0xd4f598['shift']());}catch(_0x495f99){_0xd4f598['push'](_0xd4f598['shift']());}}}(a72_0x4175,0x85950));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{getDynamicServiceDefinitions,getDynamicServiceEntry,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a72_0x4175(){const _0x22d9d1=['\x20or\x20--appcode).','Requires\x20appcode\x20(set\x20via\x20','generateServiceHelp','newConfigFileName','992099mLznSY','service','410UgMgeH','has','17922ovUUhR','13096740yRPvjd','map','generateFullHelp','3937014FvPBbK','generateCommandHelp','908907dQGjMs','3424992xroaMR','595870HvPnPB','14pKWHXY','11SsCQRJ','4LhgmnW','10AWDxcV'];a72_0x4175=function(){return _0x22d9d1;};return a72_0x4175();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';function createGenerators(){const _0x4aa3e5=a72_0x263e;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[...serviceRegistry,...safeListDynamicServiceEntries()],'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x4aa3e5(0x1d4)+PRODUCT_CONFIG[_0x4aa3e5(0x1d6)]+_0x4aa3e5(0x1d3)});}export function generateCommandHelp(_0x5085c0){const _0x41cf37=a72_0x263e;return createGenerators()[_0x41cf37(0x1e0)](_0x5085c0);}export function generateServiceHelp(_0x497f5e){const _0x5c1e58=a72_0x263e;return createGenerators()[_0x5c1e58(0x1d5)](_0x497f5e);}export function generateFullHelp(){const _0x5a799c=a72_0x263e;return createGenerators()[_0x5a799c(0x1de)]();}function a72_0x263e(_0x36dd46,_0x9c7331){_0x36dd46=_0x36dd46-0x1ce;const _0x417550=a72_0x4175();let _0x263e7a=_0x417550[_0x36dd46];return _0x263e7a;}function getAnyServiceEntry(_0x171f83){const _0xb339cd=getServiceEntry(_0x171f83);if(_0xb339cd)return _0xb339cd;try{return getDynamicServiceEntry(_0x171f83);}catch{return undefined;}}function getAnyServiceDefinitions(_0x306252){const _0x34e397=serviceGroups['get'](_0x306252);if(_0x34e397)return _0x34e397;try{return getDynamicServiceDefinitions(_0x306252);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x395bdb=a72_0x263e,_0x4b4907=new Set(serviceRegistry[_0x395bdb(0x1dd)](_0x5dac6c=>_0x5dac6c[_0x395bdb(0x1d8)]));try{return listDynamicServiceEntries()['filter'](_0x5cdcfa=>!_0x4b4907[_0x395bdb(0x1da)](_0x5cdcfa[_0x395bdb(0x1d8)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x449cd8,_0x4f0313){var _0x374c54=a73_0x2fa0,_0x428837=_0x449cd8();while(!![]){try{var _0x3c3215=parseInt(_0x374c54(0x1ac))/0x1*(parseInt(_0x374c54(0x1a9))/0x2)+parseInt(_0x374c54(0x1a5))/0x3+-parseInt(_0x374c54(0x1a8))/0x4+-parseInt(_0x374c54(0x1a6))/0x5+-parseInt(_0x374c54(0x1aa))/0x6+-parseInt(_0x374c54(0x1a4))/0x7*(-parseInt(_0x374c54(0x1ab))/0x8)+-parseInt(_0x374c54(0x1a3))/0x9*(-parseInt(_0x374c54(0x1a7))/0xa);if(_0x3c3215===_0x4f0313)break;else _0x428837['push'](_0x428837['shift']());}catch(_0x1f6f35){_0x428837['push'](_0x428837['shift']());}}}(a73_0xce20,0xcf311));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';function a73_0xce20(){var _0x330610=['56XluahW','310711mltJQp','70605dhgMOb','510608WarWOy','1695996wbXIUt','473925qDslzC','2370tqITwg','4359936JwNuOu','4tOLvCo','9139206guEmSQ'];a73_0xce20=function(){return _0x330610;};return a73_0xce20();}export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';function a73_0x2fa0(_0x49b32d,_0x46e1cd){_0x49b32d=_0x49b32d-0x1a3;var _0xce20c2=a73_0xce20();var _0x2fa032=_0xce20c2[_0x49b32d];return _0x2fa032;}export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a9a20,_0x2c0d74){const _0x1d65fc=a74_0x4fb1,_0x2fff3b=_0x4a9a20();while(!![]){try{const _0x2c74d9=parseInt(_0x1d65fc(0x1e3))/0x1+parseInt(_0x1d65fc(0x1e7))/0x2+-parseInt(_0x1d65fc(0x1e8))/0x3*(parseInt(_0x1d65fc(0x1e5))/0x4)+-parseInt(_0x1d65fc(0x1dd))/0x5*(parseInt(_0x1d65fc(0x1de))/0x6)+parseInt(_0x1d65fc(0x1e4))/0x7+parseInt(_0x1d65fc(0x1df))/0x8*(parseInt(_0x1d65fc(0x1dc))/0x9)+parseInt(_0x1d65fc(0x1e1))/0xa;if(_0x2c74d9===_0x2c0d74)break;else _0x2fff3b['push'](_0x2fff3b['shift']());}catch(_0x4ac159){_0x2fff3b['push'](_0x2fff3b['shift']());}}}(a74_0xece0,0x7fe51));function a74_0x4fb1(_0x4b031d,_0x32e75f){_0x4b031d=_0x4b031d-0x1dc;const _0xece08=a74_0xece0();let _0x4fb123=_0xece08[_0x4b031d];return _0x4fb123;}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a74_0xece0(){const _0x1570ef=['2485FIdWiL','8070fkTPSL','8IJOACG','error','91610lUzuMY','_notice','216368KKLiZT','3522463lGSjAt','688444nVwadf','format','1546264sFcDlx','9pceBQT','url','update','pretty','1861065gtUEjP'];a74_0xece0=function(){return _0x1570ef;};return a74_0xece0();}export function formatOutput(_0x461aa6,_0x52dfe1){const _0x3c4ec4=a74_0x4fb1,_0x445e9b=_0x461aa6[_0x3c4ec4(0x1e2)],{_notice:_0x4f2eb4,..._0x448caf}=_0x461aa6;void _0x4f2eb4,baseFormatOutput(_0x448caf,_0x52dfe1),_0x52dfe1[_0x3c4ec4(0x1e6)]===_0x3c4ec4(0x1eb)&&printPrettyNotice(_0x445e9b);}function printPrettyNotice(_0x36e5e9){const _0x9aef9c=a74_0x4fb1;if(!_0x36e5e9?.[_0x9aef9c(0x1ea)])return;console[_0x9aef9c(0x1e0)](_0x36e5e9['update']['message']+'\x20('+_0x36e5e9[_0x9aef9c(0x1ea)][_0x9aef9c(0x1e9)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5479af,_0x2cd58a){const _0x555594=a75_0x531a,_0x41cca8=_0x5479af();while(!![]){try{const _0x5e65a3=-parseInt(_0x555594(0xdf))/0x1+-parseInt(_0x555594(0xd2))/0x2+-parseInt(_0x555594(0xcf))/0x3+-parseInt(_0x555594(0xdc))/0x4+-parseInt(_0x555594(0xd8))/0x5*(-parseInt(_0x555594(0xc9))/0x6)+parseInt(_0x555594(0xc8))/0x7*(parseInt(_0x555594(0xd9))/0x8)+-parseInt(_0x555594(0xc7))/0x9*(-parseInt(_0x555594(0xd5))/0xa);if(_0x5e65a3===_0x2cd58a)break;else _0x41cca8['push'](_0x41cca8['shift']());}catch(_0xde1fff){_0x41cca8['push'](_0x41cca8['shift']());}}}(a75_0x1995,0x6235a));function toKebab(_0x3f01a3){const _0x1e1a24=a75_0x531a;return _0x3f01a3[_0x1e1a24(0xe3)](/_/g,'-')[_0x1e1a24(0xe3)](/-([A-Z]+)/g,(_0x2602a0,_0x46a92d)=>'-'+_0x46a92d[_0x1e1a24(0xd3)]())['replace'](/([a-z0-9])([A-Z])/g,(_0x3abd09,_0x1aa2c7,_0xd9e0e1)=>_0x1aa2c7+'-'+_0xd9e0e1)[_0x1e1a24(0xd3)]();}function buildKnownFlags(_0x50cc44){const _0xa3d879=a75_0x531a,_0x47fc22=new Set();for(const _0x5b82af of _0x50cc44){_0x47fc22[_0xa3d879(0xc3)](_0x5b82af[_0xa3d879(0xc4)]),_0x47fc22[_0xa3d879(0xc3)](toCamelCase(_0x5b82af[_0xa3d879(0xc4)]));}for(const _0x46dabf of[_0xa3d879(0xce),_0xa3d879(0xd0),_0xa3d879(0xe1),_0xa3d879(0xe0)]){_0x47fc22[_0xa3d879(0xc3)](_0x46dabf);}for(const _0x4dc3e8 of[_0xa3d879(0xd6),_0xa3d879(0xc0),'appcode','app','nonInteractive',_0xa3d879(0xbd),'ci','global','version']){_0x47fc22['add'](_0x4dc3e8);}return _0x47fc22;}function buildFlagTypeMap(_0x205cae){const _0xbc504c=a75_0x531a,_0x5b1117=new Map();for(const _0x4756a3 of _0x205cae){_0x5b1117[_0xbc504c(0xc2)](_0x4756a3['name'],_0x4756a3['type']),_0x5b1117[_0xbc504c(0xc2)](toCamelCase(_0x4756a3[_0xbc504c(0xc4)]),_0x4756a3[_0xbc504c(0xcc)]);}return _0x5b1117;}function a75_0x531a(_0xf006b5,_0x1aeef5){_0xf006b5=_0xf006b5-0xbd;const _0x199525=a75_0x1995();let _0x531a1d=_0x199525[_0xf006b5];return _0x531a1d;}function toCamelCase(_0x52452d){const _0x6a9d9e=a75_0x531a;return _0x52452d[_0x6a9d9e(0xe3)](/-([a-z])/g,(_0x58ff6b,_0xfb5735)=>_0xfb5735[_0x6a9d9e(0xca)]());}function aliasHandler(_0x27549f,_0x23f2be){const _0x189b52=a75_0x531a,_0x317473=[];for(const _0x42ebe2 of Object[_0x189b52(0xd1)](_0x27549f)){if(_0x23f2be[_0x189b52(0xd7)](_0x42ebe2))continue;const _0x1b81e4=toKebab(_0x42ebe2);_0x1b81e4!==_0x42ebe2&&_0x23f2be[_0x189b52(0xd7)](_0x1b81e4)&&_0x317473['push']({'original':_0x42ebe2,'corrected':_0x1b81e4,'handler':_0x189b52(0xc1)});}return _0x317473;}function stickyHandler(_0x50162d,_0x8bd466,_0x217a4d){const _0x2ac3ba=a75_0x531a,_0x2279f9=[];for(const [_0x443d42,_0x23bfcb]of Object[_0x2ac3ba(0xdd)](_0x50162d)){if(_0x23bfcb!==!![])continue;for(let _0x480b9d=_0x443d42[_0x2ac3ba(0xde)]-0x1;_0x480b9d>0x0;_0x480b9d--){const _0xece0b3=_0x443d42['slice'](0x0,_0x480b9d),_0x307e07=_0x443d42[_0x2ac3ba(0xc6)](_0x480b9d),_0x5e8da2=toKebab(_0xece0b3),_0x5bc7fe=toCamelCase(_0xece0b3),_0x263600=_0x8bd466[_0x2ac3ba(0xd7)](_0xece0b3)?_0xece0b3:_0x8bd466['has'](_0x5e8da2)?_0x5e8da2:_0x8bd466[_0x2ac3ba(0xd7)](_0x5bc7fe)?_0x5bc7fe:null;if(!_0x263600)continue;const _0x239399=_0x217a4d[_0x2ac3ba(0xd4)](_0x263600)??_0x2ac3ba(0xe2);let _0x330501;if(_0x239399===_0x2ac3ba(0xbf)){const _0x359f01=Number(_0x307e07);if(isNaN(_0x359f01)||_0x307e07==='')continue;_0x330501=_0x359f01;}else{if(_0x239399===_0x2ac3ba(0xcd))continue;else{if(_0x307e07==='')continue;_0x330501=_0x307e07;}}_0x2279f9[_0x2ac3ba(0xda)]({'original':_0x443d42,'corrected':_0x263600+'='+_0x330501,'handler':_0x2ac3ba(0xdb)});break;}}return _0x2279f9;}function a75_0x1995(){const _0x4dace1=['entries','length','456439wHbEqt','format','yes','string','replace','non-interactive','original','number','env','alias','set','add','name','corrected','slice','747477uFRvtI','194383MSGRWG','2406822PiPCIH','toUpperCase','indexOf','type','boolean','dry-run','1255200UrbuBJ','dryRun','keys','1248876tdfIxa','toLowerCase','get','160PhThjo','help','has','10lpHtJB','104NrRHsD','push','sticky','2362304IHXanK'];a75_0x1995=function(){return _0x4dace1;};return a75_0x1995();}export function correctFlags(_0x5d73c2,_0x137609){const _0x56ceff=a75_0x531a,_0x2122fb=buildKnownFlags(_0x137609),_0x54aa64=buildFlagTypeMap(_0x137609),_0xe92641=aliasHandler(_0x5d73c2,_0x2122fb),_0x1ee1a9=stickyHandler(_0x5d73c2,_0x2122fb,_0x54aa64),_0x128e93=[..._0xe92641,..._0x1ee1a9];if(_0x128e93[_0x56ceff(0xde)]===0x0)return{'flags':_0x5d73c2,'corrections':[]};const _0x3ee135={..._0x5d73c2},_0x451634=new Set();for(const _0x5c2e7f of _0xe92641){_0x3ee135[_0x5c2e7f[_0x56ceff(0xc5)]]=_0x5d73c2[_0x5c2e7f['original']],_0x451634[_0x56ceff(0xc3)](_0x5c2e7f[_0x56ceff(0xbe)]);}for(const _0x295bfd of _0x1ee1a9){const _0x57a37d=_0x295bfd[_0x56ceff(0xc5)][_0x56ceff(0xcb)]('='),_0x7fb804=_0x295bfd[_0x56ceff(0xc5)]['slice'](0x0,_0x57a37d),_0x4677ba=_0x295bfd[_0x56ceff(0xc5)][_0x56ceff(0xc6)](_0x57a37d+0x1),_0x130f93=_0x54aa64[_0x56ceff(0xd4)](_0x7fb804)??_0x56ceff(0xe2);_0x130f93===_0x56ceff(0xbf)?_0x3ee135[_0x7fb804]=Number(_0x4677ba):_0x3ee135[_0x7fb804]=_0x4677ba,_0x451634[_0x56ceff(0xc3)](_0x295bfd[_0x56ceff(0xbe)]);}for(const _0x5d1931 of _0x451634){delete _0x3ee135[_0x5d1931];}return{'flags':_0x3ee135,'corrections':_0x128e93};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39c04f,_0x9481e4){var _0x361698=a76_0x5364,_0x4ff602=_0x39c04f();while(!![]){try{var _0x478f20=parseInt(_0x361698(0x108))/0x1*(-parseInt(_0x361698(0xff))/0x2)+-parseInt(_0x361698(0x106))/0x3*(-parseInt(_0x361698(0x105))/0x4)+parseInt(_0x361698(0x102))/0x5+-parseInt(_0x361698(0x101))/0x6+-parseInt(_0x361698(0x103))/0x7+parseInt(_0x361698(0x100))/0x8*(-parseInt(_0x361698(0x107))/0x9)+parseInt(_0x361698(0x104))/0xa;if(_0x478f20===_0x9481e4)break;else _0x4ff602['push'](_0x4ff602['shift']());}catch(_0x5447f1){_0x4ff602['push'](_0x4ff602['shift']());}}}(a76_0x1677,0x2b4f6));function a76_0x5364(_0x45ca97,_0x2fc990){_0x45ca97=_0x45ca97-0xff;var _0x1677c0=a76_0x1677();var _0x536409=_0x1677c0[_0x45ca97];return _0x536409;}export{extractList,extractPaging}from'@lovrabet/cli-framework';function a76_0x1677(){var _0x4abcdf=['216fvBDjj','31523jaTxID','22QORMiB','68200gzFqpN','1197264gfxpeW','1239420fnQPwo','140987wbdeqA','6840850hwoNsj','21956yTTNwX','9lCXwzE'];a76_0x1677=function(){return _0x4abcdf;};return a76_0x1677();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xea5a8c,_0x4a0219){const _0xd36aa5=a77_0x326a,_0xd52f50=_0xea5a8c();while(!![]){try{const _0x5baa4b=parseInt(_0xd36aa5(0x142))/0x1*(-parseInt(_0xd36aa5(0x12c))/0x2)+parseInt(_0xd36aa5(0x130))/0x3+parseInt(_0xd36aa5(0x141))/0x4+parseInt(_0xd36aa5(0x12f))/0x5*(-parseInt(_0xd36aa5(0x146))/0x6)+parseInt(_0xd36aa5(0x136))/0x7*(parseInt(_0xd36aa5(0x13c))/0x8)+parseInt(_0xd36aa5(0x12d))/0x9*(-parseInt(_0xd36aa5(0x13a))/0xa)+parseInt(_0xd36aa5(0x137))/0xb*(parseInt(_0xd36aa5(0x13e))/0xc);if(_0x5baa4b===_0x4a0219)break;else _0xd52f50['push'](_0xd52f50['shift']());}catch(_0x336243){_0xd52f50['push'](_0xd52f50['shift']());}}}(a77_0x1b88,0x37fa6));function a77_0x1b88(){const _0xefea77=['905619VWvwHk','code','code=','params=','--yes','name','161wYIsST','729355ajwwbR','\x20\x20\x20Continue?\x20[y/N]\x20','params','26550bEYefJ','affectedRecords','55456jQRsRQ','join','120RrjknV','\x20\x20\x20Affected:\x20','commandLabel','572672jPClba','293zmthxW','stringify','service','entries','94968kTZhOD','length','push','command','name=','description','2566kvNBlP','1494XPEddX','\x20\x20\x20','70JlVaQd'];a77_0x1b88=function(){return _0xefea77;};return a77_0x1b88();}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x581f2e,_0x2015fb,_0x5c68e9){const _0x45d522=a77_0x326a,_0x25c900=buildConfirmationContext(_0x581f2e,_0x2015fb,_0x5c68e9),_0xe725ab=['⚠\x20\x20High-risk\x20operation:\x20'+_0x25c900[_0x45d522(0x140)]];return _0x25c900[_0x45d522(0x12b)]&&_0xe725ab[_0x45d522(0x128)](_0x45d522(0x12e)+_0x25c900[_0x45d522(0x12b)]),_0x25c900[_0x45d522(0x13b)]&&_0xe725ab[_0x45d522(0x128)](_0x45d522(0x13f)+_0x25c900[_0x45d522(0x13b)]),_0xe725ab['push'](_0x45d522(0x138)),_0xe725ab;}export function reconstructCommandArgv(_0x3ce6b4,_0x3f5f8e){const _0x27e7ae=a77_0x326a,_0x1d9158=[CLI_BIN_NAME,_0x3ce6b4[_0x27e7ae(0x144)],_0x3ce6b4[_0x27e7ae(0x129)]];for(const [_0x5353ae,_0x204669]of Object[_0x27e7ae(0x145)](_0x3f5f8e)){if(_0x204669===!![])_0x1d9158[_0x27e7ae(0x128)]('--'+_0x5353ae);else _0x204669!==![]&&_0x204669!==undefined&&_0x204669!==''&&_0x1d9158[_0x27e7ae(0x128)]('--'+_0x5353ae+'\x20'+JSON[_0x27e7ae(0x143)](_0x204669));}return _0x1d9158[_0x27e7ae(0x128)](_0x27e7ae(0x134)),_0x1d9158['join']('\x20');}function buildConfirmationContext(_0x7f3033,_0x426206,_0x50fa75){const _0x4c8148=a77_0x326a,_0x2842b6=extractAffectedRecords(_0x50fa75);return{'commandLabel':_0x426206,'description':_0x7f3033[_0x4c8148(0x12b)],'affectedRecords':_0x2842b6};}function a77_0x326a(_0x2df05b,_0x4338c4){_0x2df05b=_0x2df05b-0x127;const _0x1b883d=a77_0x1b88();let _0x326aba=_0x1b883d[_0x2df05b];return _0x326aba;}function extractAffectedRecords(_0x107c61){const _0x11d7b6=a77_0x326a,_0x1fd8e7=[];if(_0x107c61[_0x11d7b6(0x131)])_0x1fd8e7[_0x11d7b6(0x128)](_0x11d7b6(0x132)+_0x107c61[_0x11d7b6(0x131)]);if(_0x107c61['id'])_0x1fd8e7[_0x11d7b6(0x128)]('id='+_0x107c61['id']);if(_0x107c61[_0x11d7b6(0x135)])_0x1fd8e7[_0x11d7b6(0x128)](_0x11d7b6(0x12a)+_0x107c61[_0x11d7b6(0x135)]);if(_0x107c61[_0x11d7b6(0x139)])_0x1fd8e7[_0x11d7b6(0x128)](_0x11d7b6(0x133)+_0x107c61[_0x11d7b6(0x139)]);return _0x1fd8e7[_0x11d7b6(0x127)]>0x0?_0x1fd8e7[_0x11d7b6(0x13d)](',\x20'):undefined;}
|