@lovrabet/lovrabet-cli 2.1.19-beta.1 → 2.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +2 -2
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a66_0x5a41e2=a66_0x23d1;(function(_0x24ff81,_0x3d455e){const _0x4e1670=a66_0x23d1,_0x4739fc=_0x24ff81();while(!![]){try{const _0x171eca=parseInt(_0x4e1670(0x15b))/0x1+-parseInt(_0x4e1670(0x176))/0x2+parseInt(_0x4e1670(0x165))/0x3*(parseInt(_0x4e1670(0x158))/0x4)+parseInt(_0x4e1670(0x177))/0x5+parseInt(_0x4e1670(0x179))/0x6+parseInt(_0x4e1670(0x15e))/0x7*(parseInt(_0x4e1670(0x16f))/0x8)+-parseInt(_0x4e1670(0x17a))/0x9*(parseInt(_0x4e1670(0x167))/0xa);if(_0x171eca===_0x3d455e)break;else _0x4739fc['push'](_0x4739fc['shift']());}catch(_0x50bb59){_0x4739fc['push'](_0x4739fc['shift']());}}}(a66_0x2892,0xae571));import{PRODUCT_CONFIG}from'../constant/product.js';function a66_0x23d1(_0x84cae5,_0x59479f){_0x84cae5=_0x84cae5-0x155;const _0x289218=a66_0x2892();let _0x23d16a=_0x289218[_0x84cae5];return _0x23d16a;}function a66_0x2892(){const _0x59ed0b=['Use\x20global\x20config\x20scope','JSON\x20params\x20for\x20execute\x20commands','json\x20|\x20pretty\x20|\x20compress','nonInteractive','40OBgnAF','non-interactive','appcode','Name\x20filter','boolean','meowKey','global','692874KLWVrY','102595TTHBNH','string','7676058DMSJNb','254088oiqBaY','fromEntries','clear','format','env','Select\x20app\x20profile\x20by\x20name','type','Override\x20appcode','<name>','4aLXEFg','production\x20|\x20development\x20|\x20daily','Alias\x20for\x20--non-interactive','408622YaCNkH','Output\x20format','name','120113KesEFC','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','sqlcode','yes','app','Skip\x20confirmation\x20for\x20high-risk\x20writes','Verbose\x20output','1271301AxVjwK','dry-run','410MCSRUF','help','<expr>','verbose'];a66_0x2892=function(){return _0x59ed0b;};return a66_0x2892();}import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a66_0x5a41e2(0x171),'type':a66_0x5a41e2(0x178),'description':a66_0x5a41e2(0x156),'hint':'<code>'},{'name':a66_0x5a41e2(0x162),'meowKey':a66_0x5a41e2(0x162),'type':a66_0x5a41e2(0x178),'description':a66_0x5a41e2(0x17f),'hint':a66_0x5a41e2(0x157)},{'name':a66_0x5a41e2(0x17e),'meowKey':a66_0x5a41e2(0x17e),'type':a66_0x5a41e2(0x178),'description':'Environment','hint':a66_0x5a41e2(0x159)},{'name':a66_0x5a41e2(0x17d),'meowKey':a66_0x5a41e2(0x17d),'type':a66_0x5a41e2(0x178),'description':a66_0x5a41e2(0x15c),'hint':a66_0x5a41e2(0x16d)},{'name':'jq','meowKey':'jq','type':a66_0x5a41e2(0x178),'description':a66_0x5a41e2(0x15f),'hint':a66_0x5a41e2(0x169)},{'name':'dry-run','meowKey':'dryRun','type':'boolean','description':'Preview\x20operation\x20without\x20executing'},{'name':'yes','meowKey':a66_0x5a41e2(0x161),'type':a66_0x5a41e2(0x173),'description':a66_0x5a41e2(0x163)},{'name':a66_0x5a41e2(0x170),'meowKey':a66_0x5a41e2(0x16e),'type':'boolean','description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a66_0x5a41e2(0x175),'meowKey':'global','type':a66_0x5a41e2(0x173),'description':a66_0x5a41e2(0x16b)},{'name':'ci','meowKey':'ci','type':a66_0x5a41e2(0x173),'description':a66_0x5a41e2(0x15a),'hidden':!![]},{'name':a66_0x5a41e2(0x168),'meowKey':a66_0x5a41e2(0x168),'type':a66_0x5a41e2(0x173),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':a66_0x5a41e2(0x178),'description':'Record\x20ID','hidden':!![]},{'name':a66_0x5a41e2(0x15d),'meowKey':a66_0x5a41e2(0x15d),'type':a66_0x5a41e2(0x178),'description':a66_0x5a41e2(0x172),'hidden':!![]},{'name':a66_0x5a41e2(0x160),'meowKey':a66_0x5a41e2(0x160),'type':a66_0x5a41e2(0x178),'description':'SQL\x20query\x20code','hidden':!![]},{'name':'params','meowKey':'params','type':'string','description':a66_0x5a41e2(0x16c),'hidden':!![]},{'name':a66_0x5a41e2(0x16a),'meowKey':a66_0x5a41e2(0x16a),'type':a66_0x5a41e2(0x173),'description':a66_0x5a41e2(0x164),'hidden':!![]},{'name':'clear','meowKey':a66_0x5a41e2(0x17c),'type':a66_0x5a41e2(0x173),'description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a66_0x5a41e2(0x171),a66_0x5a41e2(0x162),a66_0x5a41e2(0x17e),a66_0x5a41e2(0x17d),'jq',a66_0x5a41e2(0x166),a66_0x5a41e2(0x161),a66_0x5a41e2(0x170),'ci']);export function buildMeowFlags(){const _0x166501=a66_0x5a41e2;return Object[_0x166501(0x17b)](GLOBAL_FLAGS['map'](_0x1a3846=>[_0x1a3846[_0x166501(0x174)],{'type':_0x1a3846[_0x166501(0x155)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a67_0x4db123=a67_0x12ee;function a67_0x12ee(_0x4036bc,_0x5530e1){_0x4036bc=_0x4036bc-0xcc;const _0x358e35=a67_0x358e();let _0x12ee63=_0x358e35[_0x4036bc];return _0x12ee63;}function a67_0x358e(){const _0x32d863=['136BvifVy','en-US','10LkLSTy','292338tPhgxN','1257378kdwEAH','11511PEREkl','136367KOvdpy','main','11040796EoUTEW','compress','12WGzVuR','24452hLeGvf','14TvmHrf','60hSYQWb','150qjkEFq','write','184948xmPMxN'];a67_0x358e=function(){return _0x32d863;};return a67_0x358e();}(function(_0x5cf7a3,_0x1e9fd6){const _0x4f28e5=a67_0x12ee,_0x410935=_0x5cf7a3();while(!![]){try{const _0x39ba0b=parseInt(_0x4f28e5(0xd8))/0x1+-parseInt(_0x4f28e5(0xcf))/0x2*(-parseInt(_0x4f28e5(0xd1))/0x3)+parseInt(_0x4f28e5(0xd4))/0x4*(-parseInt(_0x4f28e5(0xd7))/0x5)+-parseInt(_0x4f28e5(0xd9))/0x6*(-parseInt(_0x4f28e5(0xd0))/0x7)+parseInt(_0x4f28e5(0xd5))/0x8*(parseInt(_0x4f28e5(0xda))/0x9)+parseInt(_0x4f28e5(0xd2))/0xa*(parseInt(_0x4f28e5(0xdb))/0xb)+parseInt(_0x4f28e5(0xce))/0xc*(-parseInt(_0x4f28e5(0xcc))/0xd);if(_0x39ba0b===_0x1e9fd6)break;else _0x410935['push'](_0x410935['shift']());}catch(_0x1967d0){_0x410935['push'](_0x410935['shift']());}}}(a67_0x358e,0x362dc));export const DEFAULT_APP_PROFILE_NAME=a67_0x4db123(0xdc);export const DEFAULT_CONFIG_VALUES={'env':'production','format':a67_0x4db123(0xcd),'locale':a67_0x4db123(0xd6),'riskLevel':a67_0x4db123(0xd3)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x48161d=a68_0x42a2;function a68_0x42a2(_0x225eb2,_0x1270a4){_0x225eb2=_0x225eb2-0xfd;const _0x497dcc=a68_0x497d();let _0x42a211=_0x497dcc[_0x225eb2];return _0x42a211;}(function(_0x161d67,_0x58cfda){const _0x14ba4d=a68_0x42a2,_0x129f68=_0x161d67();while(!![]){try{const _0x10e2c8=-parseInt(_0x14ba4d(0xff))/0x1+parseInt(_0x14ba4d(0x108))/0x2+parseInt(_0x14ba4d(0x106))/0x3+parseInt(_0x14ba4d(0x101))/0x4+parseInt(_0x14ba4d(0x104))/0x5*(-parseInt(_0x14ba4d(0x100))/0x6)+parseInt(_0x14ba4d(0x107))/0x7*(-parseInt(_0x14ba4d(0x105))/0x8)+parseInt(_0x14ba4d(0xfd))/0x9;if(_0x10e2c8===_0x58cfda)break;else _0x129f68['push'](_0x129f68['shift']());}catch(_0x1a9daf){_0x129f68['push'](_0x129f68['shift']());}}}(a68_0x497d,0xbb7d1));import{PRODUCT_CONFIG}from'../constant/product.js';function a68_0x497d(){const _0x288bd4=['skillSource','npmPackageName','4422760mMkKyL','4691240TsPRGH','4070484qXEdrA','7XkyzBs','294678uPTqci','11637171gamhex','npmRegistryBaseUrl','668943sYNYeK','6ymJqrx','442668nyibug'];a68_0x497d=function(){return _0x288bd4;};return a68_0x497d();}export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a68_0x48161d(0x103)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a68_0x48161d(0x102)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a68_0x48161d(0xfe)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x127b98=a69_0x2ce2;(function(_0x21f920,_0x20f166){const _0x1a1c70=a69_0x2ce2,_0x1d569e=_0x21f920();while(!![]){try{const _0x181437=-parseInt(_0x1a1c70(0x1f2))/0x1+parseInt(_0x1a1c70(0x1fd))/0x2+-parseInt(_0x1a1c70(0x1ee))/0x3*(-parseInt(_0x1a1c70(0x1f6))/0x4)+-parseInt(_0x1a1c70(0x1f4))/0x5+-parseInt(_0x1a1c70(0x1f1))/0x6+-parseInt(_0x1a1c70(0x1f3))/0x7*(parseInt(_0x1a1c70(0x1fa))/0x8)+-parseInt(_0x1a1c70(0x1fc))/0x9*(-parseInt(_0x1a1c70(0x1ef))/0xa);if(_0x181437===_0x20f166)break;else _0x1d569e['push'](_0x1d569e['shift']());}catch(_0x15882a){_0x1d569e['push'](_0x1d569e['shift']());}}}(a69_0x856c,0x50472));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x262401){const _0x5e8243=a69_0x2ce2;customApiDomain=_0x262401?.['apiDomain'],customUserDomain=_0x262401?.['userDomain'],customRuntimeDomain=_0x262401?.[_0x5e8243(0x1f7)],customSkillHubDomain=_0x262401?.[_0x5e8243(0x1f8)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x127b98(0x1f5)][a69_0x127b98(0x1ed)][a69_0x127b98(0x1fe)]:PRODUCT_CONFIG[a69_0x127b98(0x1f5)][a69_0x127b98(0x1f9)][a69_0x127b98(0x1fe)]);function a69_0x2ce2(_0x33b619,_0xb7c44f){_0x33b619=_0x33b619-0x1ec;const _0x856c1b=a69_0x856c();let _0x2ce26f=_0x856c1b[_0x33b619];return _0x2ce26f;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x127b98(0x1f5)]['production'][a69_0x127b98(0x1f0)]:PRODUCT_CONFIG[a69_0x127b98(0x1f5)]['nonProduction'][a69_0x127b98(0x1f0)]);function a69_0x856c(){const _0x552e0b=['421454EmZKVJ','user','skillhub','production','24sKjlkR','20KdekxQ','api','3682188nsHBNq','133642PlcdFt','1393BHUbqt','2704870RTIatg','domains','128408gRlAEJ','runtimeDomain','skillHubDomain','nonProduction','15928CVaXAm','runtime','6956091Njpzih'];a69_0x856c=function(){return _0x552e0b;};return a69_0x856c();}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a69_0x127b98(0x1ed)][a69_0x127b98(0x1fb)]:PRODUCT_CONFIG['domains'][a69_0x127b98(0x1f9)][a69_0x127b98(0x1fb)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x127b98(0x1f5)][a69_0x127b98(0x1ed)]['skillhub']:PRODUCT_CONFIG['domains'][a69_0x127b98(0x1f9)][a69_0x127b98(0x1ec)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x20f7d6=a70_0x1797;(function(_0x3124b0,_0x209a4e){const _0x20daee=a70_0x1797,_0x358e8b=_0x3124b0();while(!![]){try{const _0x213b3a=parseInt(_0x20daee(0x109))/0x1+parseInt(_0x20daee(0xff))/0x2+parseInt(_0x20daee(0xfe))/0x3+parseInt(_0x20daee(0x106))/0x4*(-parseInt(_0x20daee(0x105))/0x5)+-parseInt(_0x20daee(0x104))/0x6*(-parseInt(_0x20daee(0xfc))/0x7)+parseInt(_0x20daee(0xfb))/0x8*(-parseInt(_0x20daee(0x101))/0x9)+-parseInt(_0x20daee(0x108))/0xa*(-parseInt(_0x20daee(0x100))/0xb);if(_0x213b3a===_0x209a4e)break;else _0x358e8b['push'](_0x358e8b['shift']());}catch(_0x5bda0b){_0x358e8b['push'](_0x358e8b['shift']());}}}(a70_0x19fb,0xa0b28));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a70_0x20f7d6(0xfd),a70_0x20f7d6(0x103),a70_0x20f7d6(0x102)];export function normalizeEnv(_0x2df6e7){return _0x2df6e7==='online'?'production':_0x2df6e7;}export function isProduction(_0x58d8ae){return normalizeEnv(_0x58d8ae)==='production';}export function isDaily(_0x21d11e){return normalizeEnv(_0x21d11e)==='daily';}export function isDev(_0x13ad65){const _0xa87686=a70_0x20f7d6,_0xebdcee=normalizeEnv(_0x13ad65);return _0xebdcee===_0xa87686(0x103)||_0xebdcee===_0xa87686(0x107);}let env=normalizeEnv(productEnv(a70_0x20f7d6(0x10a))||a70_0x20f7d6(0xfd));export function getEnv(){return env;}function a70_0x19fb(){const _0x39bc0e=['499688ChbWEy','434IiEtPJ','production','900942PMUieO','43590TgEJrc','209913vhFohW','153WTezXM','daily','development','462jEOXcm','10gKMyYF','495716eDvTPx','dev','220siraIi','1221202SPfooO','ENV'];a70_0x19fb=function(){return _0x39bc0e;};return a70_0x19fb();}function a70_0x1797(_0x313dd1,_0x4eaa78){_0x313dd1=_0x313dd1-0xfb;const _0x19fb6e=a70_0x19fb();let _0x179708=_0x19fb6e[_0x313dd1];return _0x179708;}export function initEnv(_0x37c938){env=normalizeEnv(_0x37c938);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x1fd23c=a71_0x53e4;(function(_0xf116b9,_0x429c2e){const _0x29799f=a71_0x53e4,_0x21238e=_0xf116b9();while(!![]){try{const _0x333627=parseInt(_0x29799f(0x19b))/0x1*(-parseInt(_0x29799f(0x19c))/0x2)+parseInt(_0x29799f(0x19f))/0x3*(parseInt(_0x29799f(0x1a4))/0x4)+parseInt(_0x29799f(0x199))/0x5+-parseInt(_0x29799f(0x1a5))/0x6+-parseInt(_0x29799f(0x1a0))/0x7*(-parseInt(_0x29799f(0x198))/0x8)+parseInt(_0x29799f(0x1a2))/0x9+-parseInt(_0x29799f(0x19d))/0xa*(parseInt(_0x29799f(0x1a1))/0xb);if(_0x333627===_0x429c2e)break;else _0x21238e['push'](_0x21238e['shift']());}catch(_0x275a44){_0x21238e['push'](_0x21238e['shift']());}}}(a71_0x457d,0xdb1fe));function a71_0x53e4(_0x154ae0,_0x1f71f1){_0x154ae0=_0x154ae0-0x198;const _0x457d17=a71_0x457d();let _0x53e437=_0x457d17[_0x154ae0];return _0x53e437;}export const OUTPUT_FORMAT_VALUES=[a71_0x1fd23c(0x19a),a71_0x1fd23c(0x19e),a71_0x1fd23c(0x1a3)];function a71_0x457d(){const _0x43cf7d=['6366035nRlDkA','json','493761hHmQOG','2fHrpQm','2324010ImrGvC','pretty','51SyFToh','3555937wTXDUH','77cYwpOV','15573231yJtYBX','compress','103652FtxxHt','8651802vGyuPi','16dxIFVG'];a71_0x457d=function(){return _0x43cf7d;};return a71_0x457d();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x3c9c9d=a72_0xad35;(function(_0x44106e,_0x29e7dc){const _0x17e6ee=a72_0xad35,_0x5cbc26=_0x44106e();while(!![]){try{const _0x1abdca=parseInt(_0x17e6ee(0x91))/0x1*(-parseInt(_0x17e6ee(0x96))/0x2)+parseInt(_0x17e6ee(0x86))/0x3+parseInt(_0x17e6ee(0x94))/0x4+parseInt(_0x17e6ee(0x83))/0x5+-parseInt(_0x17e6ee(0x8b))/0x6+parseInt(_0x17e6ee(0x80))/0x7*(parseInt(_0x17e6ee(0x90))/0x8)+-parseInt(_0x17e6ee(0x82))/0x9;if(_0x1abdca===_0x29e7dc)break;else _0x5cbc26['push'](_0x5cbc26['shift']());}catch(_0x11101b){_0x5cbc26['push'](_0x5cbc26['shift']());}}}(a72_0xfce1,0x248e5));export const PRODUCT_CONFIG={'cliBinName':a72_0x3c9c9d(0x8e),'cliDisplayName':a72_0x3c9c9d(0x85),'npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a72_0x3c9c9d(0x89),'npmRegistryBaseUrl':'https://registry.npmjs.org','envPrefix':'LOVRABET','legacyEnvPrefixes':['RABETBASE'],'configFileNames':[a72_0x3c9c9d(0x95),a72_0x3c9c9d(0x88)],'newConfigFileName':a72_0x3c9c9d(0x95),'homeDirName':'.lovrabet','logFileName':a72_0x3c9c9d(0x84),'invokeSource':a72_0x3c9c9d(0x93),'userCenterDisplayName':'Lovrabet\x20User\x20Center','skipNpxSkillsEnvSuffix':a72_0x3c9c9d(0x92),'domains':{'production':{'user':a72_0x3c9c9d(0x8c),'api':a72_0x3c9c9d(0x81),'runtime':a72_0x3c9c9d(0x8f),'skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':a72_0x3c9c9d(0x7f),'api':'https://daily-api.lovrabet.com','runtime':a72_0x3c9c9d(0x87),'skillhub':a72_0x3c9c9d(0x8d)}},'accessKeyCreatePath':'/user/ak'};function a72_0xfce1(){const _0xfaa077=['lovrabet/lovrabet-cli','envPrefix','559062TlSnGE','https://user.lovrabet.com','https://skills-daily.lovrabet.com','lovrabet','https://runtime.lovrabet.com','32VIslys','1zFFBZa','SKIP_NPX_SKILLS','cli:lovrabet-runtime','605040RYqqhG','.lovrabet.json','45104ZPVWlN','https://user-daily.lovrabet.com','148183mgoSgY','https://api.lovrabet.com','4104927RpcLSk','1494460yTzRAm','.lovrabet-runtime.log','Lovrabet\x20Runtime\x20CLI','560211yTsNfX','https://daily-runtime.lovrabet.com','.lovrabetrc'];a72_0xfce1=function(){return _0xfaa077;};return a72_0xfce1();}function a72_0xad35(_0x397905,_0x41b590){_0x397905=_0x397905-0x7f;const _0xfce11e=a72_0xfce1();let _0xad3552=_0xfce11e[_0x397905];return _0xad3552;}export function productEnvName(_0x18590e){const _0x38bcdc=a72_0x3c9c9d;return PRODUCT_CONFIG[_0x38bcdc(0x8a)]+'_'+_0x18590e;}export function productEnvNames(_0x598485){return[productEnvName(_0x598485),...PRODUCT_CONFIG['legacyEnvPrefixes']['map'](_0x585cc9=>_0x585cc9+'_'+_0x598485)];}export function productEnv(_0x1e37ab){for(const _0x32502c of productEnvNames(_0x1e37ab)){const _0x464950=process.env[_0x32502c];if(_0x464950!==undefined)return _0x464950;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a73_0x1c483d=a73_0x22e7;(function(_0x5aaa6b,_0x3627fc){const _0x3e469e=a73_0x22e7,_0x41b3c7=_0x5aaa6b();while(!![]){try{const _0xe714c9=-parseInt(_0x3e469e(0x1ad))/0x1*(-parseInt(_0x3e469e(0x1a6))/0x2)+parseInt(_0x3e469e(0x1ab))/0x3+parseInt(_0x3e469e(0x1ae))/0x4*(-parseInt(_0x3e469e(0x1a5))/0x5)+parseInt(_0x3e469e(0x1b0))/0x6+parseInt(_0x3e469e(0x1a9))/0x7*(-parseInt(_0x3e469e(0x1a7))/0x8)+-parseInt(_0x3e469e(0x1ac))/0x9+-parseInt(_0x3e469e(0x1af))/0xa*(-parseInt(_0x3e469e(0x1a4))/0xb);if(_0xe714c9===_0x3627fc)break;else _0x41b3c7['push'](_0x41b3c7['shift']());}catch(_0x49118d){_0x41b3c7['push'](_0x41b3c7['shift']());}}}(a73_0x4e03,0x601ba));function a73_0x4e03(){const _0x259215=['176tKnzXD','high-risk-write','207382RDEcDX','read','471483WKmgCI','881217eDHben','89894NaLfqo','3356zfsAXE','846250sHDbEU','1862052huASoz','154BNqllQ','4640TAngPz','6YvwxGW'];a73_0x4e03=function(){return _0x259215;};return a73_0x4e03();}function a73_0x22e7(_0x2a9bee,_0x3ed1de){_0x2a9bee=_0x2a9bee-0x1a4;const _0x4e038e=a73_0x4e03();let _0x22e7fd=_0x4e038e[_0x2a9bee];return _0x22e7fd;}export const RISK_LEVEL_VALUES=[a73_0x1c483d(0x1aa),'write',a73_0x1c483d(0x1a8)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a74_0x24a2(_0x115471,_0x540f47){_0x115471=_0x115471-0x180;const _0x12a96e=a74_0x12a9();let _0x24a25d=_0x12a96e[_0x115471];return _0x24a25d;}const a74_0x59e6a5=a74_0x24a2;(function(_0x24b50c,_0x552a08){const _0x4acb33=a74_0x24a2,_0x2db1fd=_0x24b50c();while(!![]){try{const _0x2c9d33=-parseInt(_0x4acb33(0x186))/0x1+parseInt(_0x4acb33(0x189))/0x2+parseInt(_0x4acb33(0x180))/0x3*(-parseInt(_0x4acb33(0x184))/0x4)+parseInt(_0x4acb33(0x183))/0x5+parseInt(_0x4acb33(0x18a))/0x6*(parseInt(_0x4acb33(0x18b))/0x7)+-parseInt(_0x4acb33(0x187))/0x8+parseInt(_0x4acb33(0x182))/0x9;if(_0x2c9d33===_0x552a08)break;else _0x2db1fd['push'](_0x2db1fd['shift']());}catch(_0x1bebbb){_0x2db1fd['push'](_0x2db1fd['shift']());}}}(a74_0x12a9,0x37bc5));import{PRODUCT_CONFIG}from'../constant/product.js';function a74_0x12a9(){const _0x2e0c64=['production','120796YnPbEa','1809952XRNsBu','domains','269336VTYOXe','6UaFvxz','1299046TMCKJb','6xSYcnN','accessKeyCreatePath','1712313TUjlTA','1548180AChTKN','489612SPufEU'];a74_0x12a9=function(){return _0x2e0c64;};return a74_0x12a9();}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a74_0x59e6a5(0x188)][a74_0x59e6a5(0x185)]['user']+PRODUCT_CONFIG[a74_0x59e6a5(0x181)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a75_0x3422f2=a75_0x220b;(function(_0x11a4a9,_0x31d6b1){const _0x1fd36b=a75_0x220b,_0x38e52c=_0x11a4a9();while(!![]){try{const _0x92d3fe=-parseInt(_0x1fd36b(0x1e4))/0x1+parseInt(_0x1fd36b(0x1b4))/0x2+parseInt(_0x1fd36b(0x1d3))/0x3+-parseInt(_0x1fd36b(0x1e1))/0x4*(parseInt(_0x1fd36b(0x1de))/0x5)+-parseInt(_0x1fd36b(0x1da))/0x6*(-parseInt(_0x1fd36b(0x1c3))/0x7)+parseInt(_0x1fd36b(0x1e7))/0x8+parseInt(_0x1fd36b(0x1e3))/0x9;if(_0x92d3fe===_0x31d6b1)break;else _0x38e52c['push'](_0x38e52c['shift']());}catch(_0x35016a){_0x38e52c['push'](_0x38e52c['shift']());}}}(a75_0x4329,0x638a5));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['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a75_0x3422f2(0x1cb)];function resolveConfigPath(_0x5f59d9){for(const _0x47662c of CONFIG_NAMES){const _0x4d98f4=resolve(_0x5f59d9,_0x47662c);if(existsSync(_0x4d98f4))return _0x4d98f4;}return undefined;}function a75_0x220b(_0x5a3039,_0x5cb7db){_0x5a3039=_0x5a3039-0x1ad;const _0x432960=a75_0x4329();let _0x220b52=_0x432960[_0x5a3039];return _0x220b52;}export function resolveWriteConfigPath(_0xd9be7c){const _0x5f278d=a75_0x3422f2,_0x5881cb=_0xd9be7c===_0x5f278d(0x1b9)?process[_0x5f278d(0x1ee)]():homedir(),_0x26014a=resolveConfigPath(_0x5881cb);return _0x26014a??resolve(_0x5881cb,NEW_CONFIG_NAME);}export function readConfigFile(_0x5c27a6){const _0x449701=a75_0x3422f2;try{if(existsSync(_0x5c27a6)){const _0x30a507=readFileSync(_0x5c27a6,{'encoding':_0x449701(0x1d4)});if(_0x30a507){const _0xfcd769=JSON[_0x449701(0x1bc)](_0x30a507);return migrateOnlineEnv(_0x5c27a6,_0xfcd769),_0xfcd769;}}}catch{}return{};}function migrateOnlineEnv(_0x33f013,_0x3f6cb5){const _0x3f5627=a75_0x3422f2;let _0x110ea8=![];_0x3f6cb5[_0x3f5627(0x1cc)]===_0x3f5627(0x1cd)&&(_0x3f6cb5[_0x3f5627(0x1cc)]=_0x3f5627(0x1ae),_0x110ea8=!![]);if(_0x3f6cb5[_0x3f5627(0x1dd)]&&typeof _0x3f6cb5[_0x3f5627(0x1dd)]===_0x3f5627(0x1d7))for(const _0x3e6577 of Object[_0x3f5627(0x1d0)](_0x3f6cb5['apps'])){_0x3e6577&&_0x3e6577['env']==='online'&&(_0x3e6577['env']=_0x3f5627(0x1ae),_0x110ea8=!![]);}if(_0x110ea8)try{writeConfigFile(_0x33f013,_0x3f6cb5);}catch{}}export function writeConfigFile(_0x482c17,_0x4b36b1){const _0x247603=a75_0x3422f2,_0x133256=dirname(_0x482c17);!existsSync(_0x133256)&&mkdirSync(_0x133256,{'recursive':!![]});const _0x46f76d=_0x482c17+_0x247603(0x1c9);try{writeFileSync(_0x46f76d,JSON[_0x247603(0x1b3)](_0x4b36b1,null,0x2)+'\x0a',{'encoding':_0x247603(0x1d4),'mode':0x180});try{renameSync(_0x46f76d,_0x482c17);}catch(_0x5196ac){if(_0x5196ac[_0x247603(0x1d8)]==='EPERM'||_0x5196ac[_0x247603(0x1d8)]==='EXDEV'||_0x5196ac[_0x247603(0x1d8)]===_0x247603(0x1b1)){writeFileSync(_0x482c17,JSON[_0x247603(0x1b3)](_0x4b36b1,null,0x2)+'\x0a',{'encoding':_0x247603(0x1d4)});try{unlinkSync(_0x46f76d);}catch{}}else throw _0x5196ac;}}catch(_0x87425){try{unlinkSync(_0x46f76d);}catch{}throw _0x87425;}}export function isNonInteractiveMode(_0x33f442){const _0x55741e=a75_0x3422f2;return!!(_0x33f442['nonInteractive']||_0x33f442['ci']||productEnvNames('CI')[_0x55741e(0x1ba)](_0x28584f=>process.env[_0x28584f]==='true')||process.env.CI===_0x55741e(0x1ca)||!process['stdout'][_0x55741e(0x1df)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5a16a2=a75_0x3422f2;if(!process[_0x5a16a2(0x1c4)][_0x5a16a2(0x1df)])return![];try{const _0x32e0ab=process['stdin'][_0x5a16a2(0x1ce)];return process[_0x5a16a2(0x1c4)][_0x5a16a2(0x1e6)](!![]),process[_0x5a16a2(0x1c4)][_0x5a16a2(0x1e6)](_0x32e0ab??![]),!![];}catch{return![];}}export async function createContext(_0x321d3d){const _0xc06bcc=a75_0x3422f2,_0x1ed843=readRawConfig(),_0x4cc9fe=buildConfig(_0x1ed843,_0x321d3d);await initGlobalEnvironment(_0x4cc9fe);const {getUserDomain:_0x5cfae1,getApiDomain:_0x5dc7cf}=await import(_0xc06bcc(0x1eb)),_0x466c07={'apiDomain':_0x5dc7cf(),'userDomain':_0x5cfae1()},_0x139e86=await buildAuth(_0x4cc9fe);logger[_0xc06bcc(0x1c8)](process[_0xc06bcc(0x1ee)]());const _0x43ffee=(CLI_BIN_NAME+'\x20'+process['argv'][_0xc06bcc(0x1d1)](0x2)['join']('\x20'))['trim']();logger['setRawCommand'](_0x43ffee);const _0x245c7a=isNonInteractiveMode(_0x321d3d);return{'config':_0x4cc9fe,'auth':_0x139e86,'logger':logger,'env':_0x466c07,'nonInteractive':_0x245c7a};}export function buildConfigFromFlags(_0x3ab9eb){return buildConfig(readRawConfig(),_0x3ab9eb);}export function getLocalAppAliases(_0x50f72c){const _0x5d6242=a75_0x3422f2;return _0x50f72c[_0x5d6242(0x1dd)]&&typeof _0x50f72c[_0x5d6242(0x1dd)]==='object'?_0x50f72c[_0x5d6242(0x1dd)]:{};}export function resolveLocalAppAliasCode(_0x149cff,_0x5e83fa){const _0x173364=a75_0x3422f2;if(!_0x5e83fa)return undefined;const _0x769a86=getLocalAppAliases(_0x149cff)[_0x5e83fa],_0x2b9e6f=_0x769a86?.[_0x173364(0x1b7)];return typeof _0x2b9e6f===_0x173364(0x1bb)&&_0x2b9e6f[_0x173364(0x1f1)]()?_0x2b9e6f[_0x173364(0x1f1)]():undefined;}export function readAppCodeFromConfig(){const _0x4252a8=a75_0x3422f2,_0x1dd0fe=readRawConfig(),_0x17c012=_0x1dd0fe['appcode']??_0x1dd0fe['app'];if(typeof _0x17c012===_0x4252a8(0x1bb)&&_0x17c012['trim']())return _0x17c012[_0x4252a8(0x1f1)]();const _0x14296c=resolveLocalAppAliasCode(_0x1dd0fe,typeof _0x1dd0fe[_0x4252a8(0x1b5)]===_0x4252a8(0x1bb)?_0x1dd0fe['defaultApp']:undefined);if(_0x14296c)return _0x14296c;const _0x384973=normalizeEnv(String(_0x1dd0fe[_0x4252a8(0x1cc)]||'production')),_0x2d057c=isDaily(_0x384973)?_0x4252a8(0x1cf):isDev(_0x384973)?_0x4252a8(0x1d5):_0x4252a8(0x1ae),_0x50c928=resolveCachedAppCode(typeof _0x1dd0fe['defaultApp']===_0x4252a8(0x1bb)?_0x1dd0fe[_0x4252a8(0x1b5)]:undefined,_0x2d057c,typeof _0x1dd0fe[_0x4252a8(0x1bf)]===_0x4252a8(0x1bb)?_0x1dd0fe[_0x4252a8(0x1bf)]:undefined);if(_0x50c928)return _0x50c928;const _0x34859b=Object['values'](getLocalAppAliases(_0x1dd0fe))[_0x4252a8(0x1af)](_0x2e571f=>_0x2e571f?.['appcode']);return typeof _0x34859b?.['appcode']===_0x4252a8(0x1bb)&&_0x34859b[_0x4252a8(0x1b7)][_0x4252a8(0x1f1)]()?_0x34859b[_0x4252a8(0x1b7)][_0x4252a8(0x1f1)]():undefined;}export function readScopedConfig(_0x4f78d2){const _0x26ebdb=a75_0x3422f2,_0x24fa20=_0x4f78d2[_0x26ebdb(0x1dc)]?_0x26ebdb(0x1dc):_0x26ebdb(0x1b9);return readConfigFile(resolveWriteConfigPath(_0x24fa20));}export function writeScopedConfig(_0x2e7b8d,_0x109f57){const _0x39130d=a75_0x3422f2,_0x3140f0=_0x109f57[_0x39130d(0x1dc)]?'global':_0x39130d(0x1b9);writeConfigFile(resolveWriteConfigPath(_0x3140f0),_0x2e7b8d);}export async function initGlobalEnvironment(_0xdd0670){const _0x8c8ff4=a75_0x3422f2,{initEnv:_0x5eacb8}=await import('./constant/env.js');_0x5eacb8(_0xdd0670[_0x8c8ff4(0x1cc)]);const {initDomains:_0x4d3fcc}=await import(_0x8c8ff4(0x1eb));_0x4d3fcc({'apiDomain':_0xdd0670[_0x8c8ff4(0x1b2)][_0x8c8ff4(0x1e5)]||_0xdd0670[_0x8c8ff4(0x1b2)][_0x8c8ff4(0x1ef)]||undefined,'userDomain':_0xdd0670[_0x8c8ff4(0x1b2)]['userDomain']||undefined,'runtimeDomain':_0xdd0670[_0x8c8ff4(0x1b2)][_0x8c8ff4(0x1ec)]||undefined,'skillHubDomain':_0xdd0670[_0x8c8ff4(0x1b2)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x218db4=a75_0x3422f2;return resolveConfigPath(process[_0x218db4(0x1ee)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x1a1111){const _0x2228f3=a75_0x3422f2;if(!existsSync(_0x1a1111))return{'status':'missing'};try{const _0x110f5d=readFileSync(_0x1a1111,{'encoding':_0x2228f3(0x1d4)});if(!_0x110f5d?.[_0x2228f3(0x1f1)]())return{'status':_0x2228f3(0x1f0)};const _0x4cb893=JSON[_0x2228f3(0x1bc)](_0x110f5d);return{'status':'ok','data':_0x4cb893};}catch(_0x3da844){return{'status':_0x2228f3(0x1c7),'message':_0x3da844 instanceof Error?_0x3da844[_0x2228f3(0x1d6)]:String(_0x3da844)};}}export function loadRawConfigLayers(_0x290a10){const _0x2b04ec=a75_0x3422f2;let _0x1ba93a={},_0x2a53ce={},_0x34ae3e,_0x25b23d;try{_0x34ae3e=resolveConfigPath(homedir());if(_0x34ae3e){const _0x541a80=readFileSync(_0x34ae3e,{'encoding':'utf8'});if(_0x541a80)_0x1ba93a=JSON[_0x2b04ec(0x1bc)](_0x541a80);}}catch{}try{const _0x2f88d4=_0x290a10||process[_0x2b04ec(0x1ee)]();_0x25b23d=resolveConfigPath(_0x2f88d4);if(_0x25b23d){const _0x360c97=readFileSync(_0x25b23d,{'encoding':_0x2b04ec(0x1d4)});if(_0x360c97)_0x2a53ce=JSON[_0x2b04ec(0x1bc)](_0x360c97);}}catch{}return{'globalPath':_0x34ae3e,'projectPath':_0x25b23d,'globalConfig':_0x1ba93a,'projectConfig':_0x2a53ce};}function mergeRawConfigLayers(_0x1738b5){const _0x3f39bc=a75_0x3422f2,{globalConfig:_0xa93c6a,projectConfig:_0x1126c5}=_0x1738b5;if(_0x1126c5[_0x3f39bc(0x1be)]===![]){const _0x4a06b6={..._0x1126c5};return delete _0x4a06b6['inherit'],_0x4a06b6;}const _0x2e7c17={..._0xa93c6a,..._0x1126c5};if('defaultApp'in _0x1126c5)_0x2e7c17[_0x3f39bc(0x1b5)]=_0x1126c5[_0x3f39bc(0x1b5)];else _0xa93c6a[_0x3f39bc(0x1b5)]&&(_0x2e7c17[_0x3f39bc(0x1b5)]=_0xa93c6a['defaultApp']);return _0x2e7c17;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x26e34e){return mergeRawConfigLayers(loadRawConfigLayers(_0x26e34e));}export function readRawConfigWithLayers(_0x31b63a){const _0x3ee610=loadRawConfigLayers(_0x31b63a);return{'config':mergeRawConfigLayers(_0x3ee610),'layers':_0x3ee610};}export function resolveDefaultAppSource(_0x333460){const _0xf125f9=a75_0x3422f2;if(_0xf125f9(0x1b5)in _0x333460[_0xf125f9(0x1ea)])return'project';if(_0x333460['projectConfig'][_0xf125f9(0x1be)]===![])return null;if(_0x333460[_0xf125f9(0x1e0)][_0xf125f9(0x1b5)])return _0xf125f9(0x1dc);return null;}function buildConfig(_0x6137a5,_0x27fb40){const _0x453df4=a75_0x3422f2,_0x3b84be=_0x6137a5[_0x453df4(0x1b5)]||undefined,_0x1dab16=_0x27fb40[_0x453df4(0x1e2)]||env(_0x453df4(0x1d2))||undefined,_0x2dad64=_0x1dab16||_0x3b84be||undefined,_0x46576a=env(_0x453df4(0x1c1))||_0x6137a5[_0x453df4(0x1bf)]||undefined,_0x3ff219=_0x27fb40[_0x453df4(0x1cc)]||env(_0x453df4(0x1b8))||_0x6137a5['env']||DEFAULT_CONFIG_VALUES[_0x453df4(0x1cc)],_0x3b73be=normalizeEnv(String(_0x3ff219)),_0x26701d=isDaily(_0x3b73be)?'daily':isDev(_0x3b73be)?_0x453df4(0x1d5):_0x453df4(0x1ae),_0x233e06=typeof _0x27fb40['appcode']===_0x453df4(0x1bb)?_0x27fb40[_0x453df4(0x1b7)]:undefined,_0x3f8fd7=env('APPCODE'),_0x369f1e=_0x1dab16?undefined:_0x6137a5[_0x453df4(0x1b7)]||_0x6137a5['app']||undefined,_0x3d150d=_0x1dab16||(_0x369f1e?undefined:_0x3b84be),_0xaecc35=resolveLocalAppAliasCode(_0x6137a5,_0x3d150d),_0x57c319=resolveCachedAppCode(_0x3d150d,_0x26701d,_0x46576a),_0x418dfa=_0x233e06||_0x3f8fd7||_0x369f1e||_0xaecc35||_0x57c319||undefined,_0x3d873c=_0x233e06?'explicit':_0x3f8fd7?'env':_0x369f1e?_0x453df4(0x1c5):_0xaecc35?_0x453df4(0x1ed):_0x57c319?_0x453df4(0x1e9):undefined,_0x566320=_0x6137a5[_0x453df4(0x1d9)]||DEFAULT_CONFIG_VALUES[_0x453df4(0x1d9)],_0x2a0362=undefined,_0x41376a=_0x27fb40['format']||env(_0x453df4(0x1c6))||_0x6137a5[_0x453df4(0x1bd)],_0x56d62d=normalizeLegacyOutputFormat(_0x41376a),_0x105ef1=env(_0x453df4(0x1b0))||_0x6137a5[_0x453df4(0x1c2)],_0x3bccf0=_0x105ef1?Number(_0x105ef1)||undefined:undefined,_0x8934ee=_0x6137a5[_0x453df4(0x1c0)]||_0x6137a5[_0x453df4(0x1e8)],_0x492a3d=_0x8934ee==='read'||_0x8934ee==='write'||_0x8934ee===_0x453df4(0x1db)?_0x8934ee:DEFAULT_CONFIG_VALUES[_0x453df4(0x1c0)],_0x51d617=env(_0x453df4(0x1ad)),_0x1de312=_0x51d617==='1'||_0x51d617==='true';return{'appCode':typeof _0x418dfa==='string'&&_0x418dfa[_0x453df4(0x1f1)]()?_0x418dfa['trim']():undefined,'appCodeSource':_0x3d873c,'env':_0x26701d,'locale':_0x566320,'cookie':_0x2a0362,'accessKey':_0x46576a,'format':_0x56d62d,'pageSize':_0x3bccf0,'riskLevel':_0x492a3d,'verbose':_0x1de312,'defaultApp':_0x3b84be,'currentApp':typeof _0x2dad64===_0x453df4(0x1bb)?_0x2dad64:undefined,'raw':_0x6137a5};}function a75_0x4329(){const _0x4f72e0=['message','object','code','locale','1079826yCTYOW','high-risk-write','global','apps','425gqtzyq','isTTY','globalConfig','33388GBSelD','app','4009554GlzWNn','790440xAdBDR','apiDomain','setRawMode','4911008uRSbGE','maxRisk','cache','projectConfig','./constant/domain.js','runtimeDomain','local-alias','cwd','host','empty','trim','VERBOSE','production','find','PAGE_SIZE','EACCES','raw','stringify','457754WtmhaC','defaultApp','authRequired','appcode','ENV','project','some','string','parse','format','inherit','accessKey','riskLevel','ACCESS_KEY','pageSize','21rqTvIL','stdin','top-level','FORMAT','error','setLogPath','.tmp','true','newConfigFileName','env','online','isRaw','daily','values','slice','APP','238440muwbcO','utf8','development'];a75_0x4329=function(){return _0x4f72e0;};return a75_0x4329();}function env(_0x26fabd){return productEnv(_0x26fabd);}async function buildAuth(_0x476a97){const _0x26851c=a75_0x3422f2,_0x38c029='',_0x165cbf=!!_0x476a97[_0x26851c(0x1bf)];return{'cookie':_0x38c029,'isLoggedIn':_0x165cbf,async 'getOrLogin'(){const _0xe3d6bb=_0x26851c;if(_0x165cbf)return _0x38c029;throw CliErrors[_0xe3d6bb(0x1b6)]();}};}
|
|
1
|
+
const a75_0x4c5faa=a75_0x1f2e;(function(_0x3f039e,_0x38d72e){const _0x36482b=a75_0x1f2e,_0x4620f0=_0x3f039e();while(!![]){try{const _0x141d98=parseInt(_0x36482b(0x17e))/0x1*(-parseInt(_0x36482b(0x160))/0x2)+-parseInt(_0x36482b(0x14f))/0x3+parseInt(_0x36482b(0x13d))/0x4*(-parseInt(_0x36482b(0x135))/0x5)+-parseInt(_0x36482b(0x178))/0x6*(parseInt(_0x36482b(0x162))/0x7)+-parseInt(_0x36482b(0x158))/0x8+parseInt(_0x36482b(0x132))/0x9*(-parseInt(_0x36482b(0x168))/0xa)+parseInt(_0x36482b(0x16f))/0xb*(parseInt(_0x36482b(0x17d))/0xc);if(_0x141d98===_0x38d72e)break;else _0x4620f0['push'](_0x4620f0['shift']());}catch(_0x497db1){_0x4620f0['push'](_0x4620f0['shift']());}}}(a75_0x16a1,0x328ff));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[a75_0x4c5faa(0x138)];function a75_0x1f2e(_0x4835d6,_0x458870){_0x4835d6=_0x4835d6-0x132;const _0x16a1d8=a75_0x16a1();let _0x1f2e93=_0x16a1d8[_0x4835d6];return _0x1f2e93;}export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a75_0x4c5faa(0x170)];function resolveConfigPath(_0x551e4c){for(const _0x569e73 of CONFIG_NAMES){const _0x550ab6=resolve(_0x551e4c,_0x569e73);if(existsSync(_0x550ab6))return _0x550ab6;}return undefined;}export function resolveWriteConfigPath(_0x15c4a6){const _0x440697=a75_0x4c5faa,_0x9fefbb=_0x15c4a6===_0x440697(0x141)?process['cwd']():homedir(),_0x5f3422=resolveConfigPath(_0x9fefbb);return _0x5f3422??resolve(_0x9fefbb,NEW_CONFIG_NAME);}export function readConfigFile(_0x427c8d){const _0x46aea9=a75_0x4c5faa;try{if(existsSync(_0x427c8d)){const _0x7a9f11=readFileSync(_0x427c8d,{'encoding':_0x46aea9(0x15f)});if(_0x7a9f11){const _0x10cca9=JSON['parse'](_0x7a9f11);return migrateOnlineEnv(_0x427c8d,_0x10cca9),_0x10cca9;}}}catch{}return{};}function migrateOnlineEnv(_0xe510ab,_0x366a1d){const _0x6b3542=a75_0x4c5faa;let _0xc8a6e3=![];_0x366a1d[_0x6b3542(0x16b)]==='online'&&(_0x366a1d['env']=_0x6b3542(0x14e),_0xc8a6e3=!![]);if(_0x366a1d['apps']&&typeof _0x366a1d['apps']===_0x6b3542(0x16e))for(const _0x494c0d of Object[_0x6b3542(0x145)](_0x366a1d[_0x6b3542(0x16a)])){_0x494c0d&&_0x494c0d[_0x6b3542(0x16b)]===_0x6b3542(0x15a)&&(_0x494c0d[_0x6b3542(0x16b)]=_0x6b3542(0x14e),_0xc8a6e3=!![]);}if(_0xc8a6e3)try{writeConfigFile(_0xe510ab,_0x366a1d);}catch{}}export function writeConfigFile(_0x120b74,_0x5afd66){const _0x4411c2=a75_0x4c5faa,_0x18500a=dirname(_0x120b74);!existsSync(_0x18500a)&&mkdirSync(_0x18500a,{'recursive':!![]});const _0x3cedf5=_0x120b74+'.tmp';try{writeFileSync(_0x3cedf5,JSON['stringify'](_0x5afd66,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x3cedf5,_0x120b74);}catch(_0xc90843){if(_0xc90843[_0x4411c2(0x133)]===_0x4411c2(0x153)||_0xc90843['code']===_0x4411c2(0x172)||_0xc90843[_0x4411c2(0x133)]==='EACCES'){writeFileSync(_0x120b74,JSON[_0x4411c2(0x14d)](_0x5afd66,null,0x2)+'\x0a',{'encoding':_0x4411c2(0x15f)});try{unlinkSync(_0x3cedf5);}catch{}}else throw _0xc90843;}}catch(_0xbb1691){try{unlinkSync(_0x3cedf5);}catch{}throw _0xbb1691;}}export function isNonInteractiveMode(_0x329bc9){const _0x4ef3f3=a75_0x4c5faa;return!!(_0x329bc9[_0x4ef3f3(0x156)]||_0x329bc9['ci']||productEnvNames('CI')[_0x4ef3f3(0x174)](_0x4f5651=>process.env[_0x4f5651]===_0x4ef3f3(0x137))||process.env.CI===_0x4ef3f3(0x137)||!process[_0x4ef3f3(0x159)]['isTTY']||!isStdinRawModeSupported());}function a75_0x16a1(){const _0x4c5e90=['find','values','appcode','PAGE_SIZE','isRaw','high-risk-write','missing','maxRisk','riskLevel','stringify','production','471402azvFzv','string','ENV','message','EPERM','argv','apiDomain','nonInteractive','app','1173984IQQFNT','stdout','online','FORMAT','defaultApp','development','explicit','utf8','4klPtHP','isTTY','252KOijpq','setLogPath','setRawMode','local-alias','setRawCommand','APPCODE','435170nxWGOa','empty','apps','env','join','cwd','object','22CevtmN','newConfigFileName','./constant/domain.js','EXDEV','accessKey','some','daily','parse','globalConfig','24018jzddYc','global','trim','read','VERBOSE','7562196XdaMPX','104729knRHkf','runtimeDomain','projectConfig','45GBkIRQ','code','stdin','6855dwnTGP','format','true','configFileNames','error','inherit','top-level','host','520UcPyMI','cache','write','ACCESS_KEY','project','./constant/env.js','raw'];a75_0x16a1=function(){return _0x4c5e90;};return a75_0x16a1();}function isStdinRawModeSupported(){const _0x3a5047=a75_0x4c5faa;if(!process[_0x3a5047(0x134)][_0x3a5047(0x161)])return![];try{const _0x287572=process['stdin'][_0x3a5047(0x148)];return process[_0x3a5047(0x134)][_0x3a5047(0x164)](!![]),process[_0x3a5047(0x134)][_0x3a5047(0x164)](_0x287572??![]),!![];}catch{return![];}}export async function createContext(_0x285173){const _0x1e040c=a75_0x4c5faa,_0x2773d2=readRawConfig(),_0x34f513=buildConfig(_0x2773d2,_0x285173);await initGlobalEnvironment(_0x34f513);const {getUserDomain:_0x2ea83a,getApiDomain:_0x59d74d}=await import('./constant/domain.js'),_0x1601f0={'apiDomain':_0x59d74d(),'userDomain':_0x2ea83a()},_0x51dfc3=await buildAuth(_0x34f513);logger[_0x1e040c(0x163)](process['cwd']());const _0x381634=(CLI_BIN_NAME+'\x20'+process[_0x1e040c(0x154)]['slice'](0x2)[_0x1e040c(0x16c)]('\x20'))[_0x1e040c(0x17a)]();logger[_0x1e040c(0x166)](_0x381634);const _0x16d8ac=isNonInteractiveMode(_0x285173);return{'config':_0x34f513,'auth':_0x51dfc3,'logger':logger,'env':_0x1601f0,'nonInteractive':_0x16d8ac};}export function buildConfigFromFlags(_0x4909bf){return buildConfig(readRawConfig(),_0x4909bf);}export function getLocalAppAliases(_0x322e99){const _0x232630=a75_0x4c5faa;return _0x322e99['apps']&&typeof _0x322e99[_0x232630(0x16a)]===_0x232630(0x16e)?_0x322e99[_0x232630(0x16a)]:{};}export function resolveLocalAppAliasCode(_0xf79516,_0x20d0c9){const _0x195039=a75_0x4c5faa;if(!_0x20d0c9)return undefined;const _0x3b42c9=getLocalAppAliases(_0xf79516)[_0x20d0c9],_0x532ddb=_0x3b42c9?.[_0x195039(0x146)];return typeof _0x532ddb==='string'&&_0x532ddb[_0x195039(0x17a)]()?_0x532ddb[_0x195039(0x17a)]():undefined;}export function readAppCodeFromConfig(){const _0x377ca4=a75_0x4c5faa,_0x1538a1=readRawConfig(),_0x5bff94=_0x1538a1[_0x377ca4(0x146)]??_0x1538a1[_0x377ca4(0x157)];if(typeof _0x5bff94===_0x377ca4(0x150)&&_0x5bff94[_0x377ca4(0x17a)]())return _0x5bff94[_0x377ca4(0x17a)]();const _0x150af4=resolveLocalAppAliasCode(_0x1538a1,typeof _0x1538a1[_0x377ca4(0x15c)]===_0x377ca4(0x150)?_0x1538a1[_0x377ca4(0x15c)]:undefined);if(_0x150af4)return _0x150af4;const _0x40add3=normalizeEnv(String(_0x1538a1[_0x377ca4(0x16b)]||_0x377ca4(0x14e))),_0x3288ef=isDaily(_0x40add3)?_0x377ca4(0x175):isDev(_0x40add3)?_0x377ca4(0x15d):_0x377ca4(0x14e),_0x2d5d0b=resolveCachedAppCode(typeof _0x1538a1[_0x377ca4(0x15c)]===_0x377ca4(0x150)?_0x1538a1[_0x377ca4(0x15c)]:undefined,_0x3288ef,typeof _0x1538a1[_0x377ca4(0x173)]===_0x377ca4(0x150)?_0x1538a1['accessKey']:undefined);if(_0x2d5d0b)return _0x2d5d0b;const _0x35f54f=Object[_0x377ca4(0x145)](getLocalAppAliases(_0x1538a1))[_0x377ca4(0x144)](_0x129f3e=>_0x129f3e?.[_0x377ca4(0x146)]);return typeof _0x35f54f?.[_0x377ca4(0x146)]===_0x377ca4(0x150)&&_0x35f54f['appcode'][_0x377ca4(0x17a)]()?_0x35f54f[_0x377ca4(0x146)][_0x377ca4(0x17a)]():undefined;}export function readScopedConfig(_0x522b0c){const _0x251948=a75_0x4c5faa,_0x3b5c10=_0x522b0c['global']?_0x251948(0x179):_0x251948(0x141);return readConfigFile(resolveWriteConfigPath(_0x3b5c10));}export function writeScopedConfig(_0x18ee65,_0x1d6874){const _0x2a371c=a75_0x4c5faa,_0x370bdb=_0x1d6874[_0x2a371c(0x179)]?_0x2a371c(0x179):_0x2a371c(0x141);writeConfigFile(resolveWriteConfigPath(_0x370bdb),_0x18ee65);}export async function initGlobalEnvironment(_0x293626){const _0x40f19c=a75_0x4c5faa,{initEnv:_0x226552}=await import(_0x40f19c(0x142));_0x226552(_0x293626[_0x40f19c(0x16b)]);const {initDomains:_0x4d4d4d}=await import(_0x40f19c(0x171));_0x4d4d4d({'apiDomain':_0x293626[_0x40f19c(0x143)][_0x40f19c(0x155)]||_0x293626[_0x40f19c(0x143)][_0x40f19c(0x13c)]||undefined,'userDomain':_0x293626[_0x40f19c(0x143)]['userDomain']||undefined,'runtimeDomain':_0x293626[_0x40f19c(0x143)][_0x40f19c(0x17f)]||undefined,'skillHubDomain':_0x293626[_0x40f19c(0x143)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x17390e=a75_0x4c5faa;return resolveConfigPath(process[_0x17390e(0x16d)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3eaaec){const _0x1e63c7=a75_0x4c5faa;if(!existsSync(_0x3eaaec))return{'status':_0x1e63c7(0x14a)};try{const _0x2f90a7=readFileSync(_0x3eaaec,{'encoding':_0x1e63c7(0x15f)});if(!_0x2f90a7?.[_0x1e63c7(0x17a)]())return{'status':_0x1e63c7(0x169)};const _0x596af8=JSON[_0x1e63c7(0x176)](_0x2f90a7);return{'status':'ok','data':_0x596af8};}catch(_0x3043f3){return{'status':_0x1e63c7(0x139),'message':_0x3043f3 instanceof Error?_0x3043f3[_0x1e63c7(0x152)]:String(_0x3043f3)};}}export function loadRawConfigLayers(_0x21b64e){const _0x59a286=a75_0x4c5faa;let _0x149156={},_0x2eed6d={},_0x2ca446,_0x58052e;try{_0x2ca446=resolveConfigPath(homedir());if(_0x2ca446){const _0x3bbbc8=readFileSync(_0x2ca446,{'encoding':'utf8'});if(_0x3bbbc8)_0x149156=JSON['parse'](_0x3bbbc8);}}catch{}try{const _0x5b5c68=_0x21b64e||process[_0x59a286(0x16d)]();_0x58052e=resolveConfigPath(_0x5b5c68);if(_0x58052e){const _0x5974fa=readFileSync(_0x58052e,{'encoding':_0x59a286(0x15f)});if(_0x5974fa)_0x2eed6d=JSON[_0x59a286(0x176)](_0x5974fa);}}catch{}return{'globalPath':_0x2ca446,'projectPath':_0x58052e,'globalConfig':_0x149156,'projectConfig':_0x2eed6d};}function mergeRawConfigLayers(_0x21174c){const _0x6dc57d=a75_0x4c5faa,{globalConfig:_0x5a21a4,projectConfig:_0x39fb1b}=_0x21174c;if(_0x39fb1b[_0x6dc57d(0x13a)]===![]){const _0x38bd91={..._0x39fb1b};return delete _0x38bd91[_0x6dc57d(0x13a)],_0x38bd91;}const _0x51e679={..._0x5a21a4,..._0x39fb1b};if('defaultApp'in _0x39fb1b)_0x51e679['defaultApp']=_0x39fb1b[_0x6dc57d(0x15c)];else _0x5a21a4[_0x6dc57d(0x15c)]&&(_0x51e679[_0x6dc57d(0x15c)]=_0x5a21a4[_0x6dc57d(0x15c)]);return _0x51e679;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x17d282){return mergeRawConfigLayers(loadRawConfigLayers(_0x17d282));}export function readRawConfigWithLayers(_0x5b8369){const _0x3347f1=loadRawConfigLayers(_0x5b8369);return{'config':mergeRawConfigLayers(_0x3347f1),'layers':_0x3347f1};}export function resolveDefaultAppSource(_0x39fb87){const _0x43a9c5=a75_0x4c5faa;if(_0x43a9c5(0x15c)in _0x39fb87[_0x43a9c5(0x180)])return'project';if(_0x39fb87['projectConfig'][_0x43a9c5(0x13a)]===![])return null;if(_0x39fb87[_0x43a9c5(0x177)][_0x43a9c5(0x15c)])return _0x43a9c5(0x179);return null;}function buildConfig(_0x377e9d,_0x3b4fb0){const _0x80601a=a75_0x4c5faa,_0x3ffab8=_0x377e9d[_0x80601a(0x15c)]||undefined,_0x1342f9=_0x3b4fb0[_0x80601a(0x157)]||env('APP')||undefined,_0x35a1c8=_0x1342f9||_0x3ffab8||undefined,_0x38ea11=env(_0x80601a(0x140))||_0x377e9d[_0x80601a(0x173)]||undefined,_0x6287a8=_0x3b4fb0[_0x80601a(0x16b)]||env(_0x80601a(0x151))||_0x377e9d['env']||DEFAULT_CONFIG_VALUES[_0x80601a(0x16b)],_0x100a9d=normalizeEnv(String(_0x6287a8)),_0x530fce=isDaily(_0x100a9d)?_0x80601a(0x175):isDev(_0x100a9d)?'development':_0x80601a(0x14e),_0xaca557=typeof _0x3b4fb0[_0x80601a(0x146)]===_0x80601a(0x150)?_0x3b4fb0[_0x80601a(0x146)]:undefined,_0x9616e2=env(_0x80601a(0x167)),_0xa23a6=_0x1342f9?undefined:_0x377e9d[_0x80601a(0x146)]||_0x377e9d[_0x80601a(0x157)]||undefined,_0x1aabf1=_0x1342f9||(_0xa23a6?undefined:_0x3ffab8),_0x168e91=resolveLocalAppAliasCode(_0x377e9d,_0x1aabf1),_0x35d9e3=resolveCachedAppCode(_0x1aabf1,_0x530fce,_0x38ea11),_0x3d01d2=_0xaca557||_0x9616e2||_0xa23a6||_0x168e91||_0x35d9e3||undefined,_0x3231a9=_0xaca557?_0x80601a(0x15e):_0x9616e2?_0x80601a(0x16b):_0xa23a6?_0x80601a(0x13b):_0x168e91?_0x80601a(0x165):_0x35d9e3?_0x80601a(0x13e):undefined,_0x7a7aaf=_0x377e9d['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x178b9f=undefined,_0x57d1bc=_0x3b4fb0[_0x80601a(0x136)]||env(_0x80601a(0x15b))||_0x377e9d[_0x80601a(0x136)],_0x4f06f4=normalizeLegacyOutputFormat(_0x57d1bc),_0x65f1ce=env(_0x80601a(0x147))||_0x377e9d['pageSize'],_0x166e61=_0x65f1ce?Number(_0x65f1ce)||undefined:undefined,_0x565769=_0x377e9d[_0x80601a(0x14c)]||_0x377e9d[_0x80601a(0x14b)],_0x3b964f=_0x565769===_0x80601a(0x17b)||_0x565769===_0x80601a(0x13f)||_0x565769===_0x80601a(0x149)?_0x565769:DEFAULT_CONFIG_VALUES[_0x80601a(0x14c)],_0x3e97a1=env(_0x80601a(0x17c)),_0x497e97=_0x3e97a1==='1'||_0x3e97a1===_0x80601a(0x137);return{'appCode':typeof _0x3d01d2===_0x80601a(0x150)&&_0x3d01d2[_0x80601a(0x17a)]()?_0x3d01d2[_0x80601a(0x17a)]():undefined,'appCodeSource':_0x3231a9,'env':_0x530fce,'locale':_0x7a7aaf,'cookie':_0x178b9f,'accessKey':_0x38ea11,'format':_0x4f06f4,'pageSize':_0x166e61,'riskLevel':_0x3b964f,'verbose':_0x497e97,'defaultApp':_0x3ffab8,'currentApp':typeof _0x35a1c8===_0x80601a(0x150)?_0x35a1c8:undefined,'raw':_0x377e9d};}function env(_0x366f6a){return productEnv(_0x366f6a);}async function buildAuth(_0x15f496){const _0x47276e='',_0x17ed3c=!!_0x15f496['accessKey'];return{'cookie':_0x47276e,'isLoggedIn':_0x17ed3c,async 'getOrLogin'(){if(_0x17ed3c)return _0x47276e;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x199c0e,_0x301aa0){const _0x35513d=a76_0x3c27,_0x1f1c27=_0x199c0e();while(!![]){try{const _0x3c9200=-parseInt(_0x35513d(0x158))/0x1+-parseInt(_0x35513d(0x118))/0x2*(parseInt(_0x35513d(0x15f))/0x3)+-parseInt(_0x35513d(0x165))/0x4+-parseInt(_0x35513d(0x18e))/0x5+-parseInt(_0x35513d(0x169))/0x6+parseInt(_0x35513d(0x14d))/0x7*(-parseInt(_0x35513d(0x157))/0x8)+parseInt(_0x35513d(0x17f))/0x9;if(_0x3c9200===_0x301aa0)break;else _0x1f1c27['push'](_0x1f1c27['shift']());}catch(_0x3e8d9b){_0x1f1c27['push'](_0x1f1c27['shift']());}}}(a76_0x50a4,0x8ad48));import{readFile}from'node:fs/promises';import{basename}from'node:path';function a76_0x3c27(_0x21edbc,_0x2ec288){_0x21edbc=_0x21edbc-0x10a;const _0x50a472=a76_0x50a4();let _0x3c27a5=_0x50a472[_0x21edbc];return _0x3c27a5;}import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x340eb3){_activeAK=_0x340eb3||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x3b1837){const _0x3a3cd7=a76_0x3c27;for(const _0x567407 of _0x3b1837){if(typeof _0x567407===_0x3a3cd7(0x184)&&_0x567407['trim']())return _0x567407[_0x3a3cd7(0x128)]();}return undefined;}async function decodeResponseBody(_0x4a9898){const _0x4a0564=a76_0x3c27;if(typeof _0x4a9898['text']===_0x4a0564(0x167))try{const _0xe490b6=await _0x4a9898[_0x4a0564(0x12e)]();try{return{'isJson':!![],'data':parseLosslessJson(_0xe490b6),'text':_0xe490b6};}catch{return{'isJson':![],'text':_0xe490b6[_0x4a0564(0x128)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x4a9898[_0x4a0564(0x131)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x117aac,_0xdbbdfd,_0x49c255){const _0x6c70a0=a76_0x3c27,_0x3f1144=_0xdbbdfd&&typeof _0xdbbdfd===_0x6c70a0(0x17e)?_0xdbbdfd:{},_0x2e45f7=[_0x3f1144[_0x6c70a0(0x136)],_0x3f1144['code']][_0x6c70a0(0x159)](_0x4bfa97=>Number(_0x4bfa97)===0x1ad),_0x57c58c=createRateLimitError({'status':_0x117aac['status']===0x1ad?_0x117aac[_0x6c70a0(0x136)]:_0x2e45f7??_0x117aac['status'],'errorCode':firstString(_0x3f1144[_0x6c70a0(0x17c)],typeof _0x3f1144[_0x6c70a0(0x17d)]===_0x6c70a0(0x184)?_0x3f1144[_0x6c70a0(0x17d)]:undefined),'message':firstString(_0x3f1144[_0x6c70a0(0x124)],_0x3f1144['message'],_0x3f1144['msg'],_0x49c255),'retryAfter':readRetryAfter(_0x117aac['headers'])??readRetryAfterSeconds(_0xdbbdfd)});if(_0x57c58c)throw _0x57c58c;}async function apiRequest(_0x2eeca9,_0x4ce880={}){const _0x149ecb=a76_0x3c27,{method:method=_0x149ecb(0x183),body:_0x36f40a,headers:headers={},timeout:timeout=0x7530}=_0x4ce880,_0x483282=_activeAK,_0x3d3390=getRuntimeDomain();if(!_0x483282)throw CliErrors['authRequired'](_0x149ecb(0x10c)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x1c91d9=''+_0x3d3390+_0x2eeca9,_0x5b4aec={'X-User-AK':_0x483282},_0x3d9fc1=new AbortController(),_0x5c6ad9=setTimeout(()=>_0x3d9fc1[_0x149ecb(0x16f)](),timeout);try{const _0x2df125=await fetch(_0x1c91d9,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x149ecb(0x13b)],..._0x5b4aec,...headers},'body':_0x36f40a?JSON[_0x149ecb(0x181)](_0x36f40a):undefined,'signal':_0x3d9fc1[_0x149ecb(0x160)]}),_0x4b23ea=await decodeResponseBody(_0x2df125);if(!_0x4b23ea[_0x149ecb(0x174)]){throwIfRateLimited(_0x2df125,undefined,_0x4b23ea[_0x149ecb(0x12e)]);throw CliErrors[_0x149ecb(0x19b)](_0x149ecb(0x14e)+_0x2df125[_0x149ecb(0x136)]+')',_0x2df125[_0x149ecb(0x136)]>=0x190?_0x149ecb(0x132):undefined);}const _0x2ae8fe=_0x4b23ea[_0x149ecb(0x15e)];throwIfRateLimited(_0x2df125,_0x2ae8fe);if(!_0x2df125['ok']||_0x2ae8fe[_0x149ecb(0x117)]===![])throw CliErrors[_0x149ecb(0x19b)](_0x2ae8fe[_0x149ecb(0x124)]||_0x2ae8fe['message']||_0x149ecb(0x18c)+_0x2df125[_0x149ecb(0x136)],_0x2ae8fe[_0x149ecb(0x17c)]?_0x149ecb(0x115)+_0x2ae8fe[_0x149ecb(0x17c)]:undefined);return _0x2ae8fe;}catch(_0x5e5b77){if(_0x5e5b77 instanceof Error&&_0x5e5b77[_0x149ecb(0x146)]===_0x149ecb(0x163))throw CliErrors[_0x149ecb(0x19b)](_0x149ecb(0x196)+_0x1c91d9);throw _0x5e5b77;}finally{clearTimeout(_0x5c6ad9);}}async function apiBinaryRequest(_0x5fdc87,_0x1506e4={}){const _0x315386=a76_0x3c27,{method:method=_0x315386(0x183),headers:headers={},timeout:timeout=0x7530}=_0x1506e4,_0x539a01=_activeAK,_0x2d2d59=getRuntimeDomain();if(!_0x539a01)throw CliErrors[_0x315386(0x130)](_0x315386(0x10c)+PRODUCT_CONFIG[_0x315386(0x18b)]+'.');const _0xedf77e=''+_0x2d2d59+_0x5fdc87,_0x313dd3=new AbortController(),_0x1f49d4=setTimeout(()=>_0x313dd3[_0x315386(0x16f)](),timeout);try{const _0x31a5dd=await fetch(_0xedf77e,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x315386(0x13b)],'X-User-AK':_0x539a01,...headers},'signal':_0x313dd3['signal']});if(!_0x31a5dd['ok']){const _0x6dc15=await decodeResponseBody(_0x31a5dd),_0x74e91c=_0x6dc15[_0x315386(0x15e)]&&typeof _0x6dc15[_0x315386(0x15e)]===_0x315386(0x17e)?_0x6dc15[_0x315386(0x15e)]:{},_0x44752d=firstString(_0x74e91c['errorMsg'],_0x74e91c[_0x315386(0x187)],_0x74e91c['errorCode'],_0x6dc15[_0x315386(0x12e)]);throwIfRateLimited(_0x31a5dd,_0x6dc15[_0x315386(0x15e)],_0x44752d);throw CliErrors['apiError'](_0x44752d||_0x315386(0x18c)+_0x31a5dd[_0x315386(0x136)],_0x315386(0x11c)+_0xedf77e);}return Buffer[_0x315386(0x142)](await _0x31a5dd[_0x315386(0x122)]());}catch(_0x52a7aa){if(_0x52a7aa instanceof Error&&_0x52a7aa[_0x315386(0x146)]===_0x315386(0x163))throw CliErrors[_0x315386(0x19b)]('Request\x20timeout:\x20'+_0xedf77e);throw _0x52a7aa;}finally{clearTimeout(_0x1f49d4);}}async function apiFormRequest(_0x12b25b,_0x22ed57,_0x4c5bea={}){const _0x280de2=a76_0x3c27,{timeout:timeout=0x7530}=_0x4c5bea,_0x3b4128=_activeAK,_0x9449bc=getRuntimeDomain();if(!_0x3b4128)throw CliErrors[_0x280de2(0x130)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x280de2(0x18b)]+'.');const _0xcece6c=''+_0x9449bc+_0x12b25b,_0x5baae6=new AbortController(),_0x5cf358=setTimeout(()=>_0x5baae6[_0x280de2(0x16f)](),timeout);try{const _0xeffcac=await fetch(_0xcece6c,{'method':'POST','headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x280de2(0x13b)],'X-User-AK':_0x3b4128},'body':_0x22ed57,'signal':_0x5baae6['signal']}),_0x3b0c64=await decodeResponseBody(_0xeffcac);if(!_0x3b0c64[_0x280de2(0x174)]){throwIfRateLimited(_0xeffcac,undefined,_0x3b0c64['text']);throw CliErrors[_0x280de2(0x19b)](_0x280de2(0x14e)+_0xeffcac[_0x280de2(0x136)]+')',_0xeffcac['status']>=0x190?_0x280de2(0x132):undefined);}const _0x3d727e=_0x3b0c64[_0x280de2(0x15e)];throwIfRateLimited(_0xeffcac,_0x3d727e);if(!_0xeffcac['ok']||_0x3d727e[_0x280de2(0x117)]===![])throw CliErrors[_0x280de2(0x19b)](_0x3d727e[_0x280de2(0x124)]||_0x3d727e[_0x280de2(0x187)]||_0x280de2(0x18c)+_0xeffcac[_0x280de2(0x136)],_0x3d727e[_0x280de2(0x17c)]?_0x280de2(0x115)+_0x3d727e[_0x280de2(0x17c)]:undefined);return _0x3d727e;}catch(_0x34abde){if(_0x34abde instanceof Error&&_0x34abde[_0x280de2(0x146)]===_0x280de2(0x163))throw CliErrors[_0x280de2(0x19b)](_0x280de2(0x196)+_0xcece6c);throw _0x34abde;}finally{clearTimeout(_0x5cf358);}}async function toolboxRequest(_0x1855ab,_0x4cb256,_0x455f21={}){const _0xc8f6bd=a76_0x3c27,{method:method=_0xc8f6bd(0x183),headers:headers={},timeout:timeout=0x7530}=_0x455f21,_0x210510=_activeAK;if(!_0x210510)throw CliErrors[_0xc8f6bd(0x130)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0xc8f6bd(0x18b)]+'.');const _0x30d5eb=getApiDomain()['replace'](/\/$/,''),_0x498dcb=new URL(_0x1855ab,_0x30d5eb+_0xc8f6bd(0x14c));if(_0x4cb256)for(const [_0x115b7b,_0x2808ba]of Object[_0xc8f6bd(0x13a)](_0x4cb256)){_0x2808ba!==undefined&&_0x2808ba!==null&&_0x498dcb[_0xc8f6bd(0x17b)][_0xc8f6bd(0x15b)](_0x115b7b,String(_0x2808ba));}const _0x552364=new AbortController(),_0x134371=setTimeout(()=>_0x552364[_0xc8f6bd(0x16f)](),timeout);try{const _0x2671c6=await fetch(_0x498dcb,{'method':method,'headers':{'Content-Type':_0xc8f6bd(0x120),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x210510,...headers},'signal':_0x552364[_0xc8f6bd(0x160)]}),_0x259cd7=await decodeResponseBody(_0x2671c6);if(!_0x259cd7['isJson']){throwIfRateLimited(_0x2671c6,undefined,_0x259cd7['text']);throw CliErrors[_0xc8f6bd(0x19b)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x2671c6['status']+')',_0x2671c6[_0xc8f6bd(0x136)]>=0x190?_0xc8f6bd(0x132):undefined);}const _0x2b3d4f=_0x259cd7[_0xc8f6bd(0x15e)];throwIfRateLimited(_0x2671c6,_0x2b3d4f);if(!_0x2671c6['ok']){const _0x57b7a1=_0x2b3d4f&&typeof _0x2b3d4f===_0xc8f6bd(0x17e)?_0x2b3d4f:{};throw CliErrors[_0xc8f6bd(0x19b)](_0x57b7a1['errorMsg']||_0x57b7a1[_0xc8f6bd(0x187)]||_0xc8f6bd(0x11d)+_0x2671c6[_0xc8f6bd(0x136)],_0x57b7a1[_0xc8f6bd(0x17c)]?'Toolbox\x20error\x20code:\x20'+_0x57b7a1['errorCode']:undefined);}if(_0x2b3d4f&&typeof _0x2b3d4f===_0xc8f6bd(0x17e)&&_0xc8f6bd(0x117)in _0x2b3d4f&&typeof _0x2b3d4f[_0xc8f6bd(0x117)]==='boolean'){const _0x5485e2=_0x2b3d4f;if(!_0x5485e2[_0xc8f6bd(0x117)])throw CliErrors['apiError'](_0x5485e2[_0xc8f6bd(0x124)]||_0x5485e2['message']||_0xc8f6bd(0x134),_0x5485e2[_0xc8f6bd(0x17c)]?_0xc8f6bd(0x19c)+_0x5485e2[_0xc8f6bd(0x17c)]:undefined);return _0x5485e2[_0xc8f6bd(0x15e)];}return _0x2b3d4f;}catch(_0x57a514){if(_0x57a514 instanceof Error&&_0x57a514['name']==='AbortError')throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x498dcb[_0xc8f6bd(0x192)]());throw _0x57a514;}finally{clearTimeout(_0x134371);}}async function skillHubJsonRequest(_0x1fecae,_0x3e56e4={}){const _0x4b9784=a76_0x3c27,{method:method=_0x4b9784(0x183),query:_0x4a94d0,body:_0x515ea1,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x3e56e4,_0x30817a=_activeAK;if(!_0x30817a)throw CliErrors[_0x4b9784(0x130)](_0x4b9784(0x10c)+PRODUCT_CONFIG[_0x4b9784(0x18b)]+'.');const _0xdf36e9=getSkillHubDomain()[_0x4b9784(0x12f)](/\/$/,''),_0x19befa=new URL(_0x1fecae,_0xdf36e9+'/');if(_0x4a94d0)for(const [_0x2a18de,_0x3c47d7]of Object['entries'](_0x4a94d0)){_0x3c47d7!==undefined&&_0x3c47d7!==null&&_0x19befa['searchParams']['set'](_0x2a18de,String(_0x3c47d7));}const _0x54b56c=new AbortController(),_0x29ce20=setTimeout(()=>_0x54b56c[_0x4b9784(0x16f)](),timeout);try{const _0x285bcc=await fetch(_0x19befa[_0x4b9784(0x192)](),{'method':method,'headers':{'Accept':_0x4b9784(0x120),'X-Invoke-Source':PRODUCT_CONFIG[_0x4b9784(0x13b)],'X-User-AK':_0x30817a,...headers},'body':_0x515ea1,'signal':_0x54b56c[_0x4b9784(0x160)]}),_0x1aee9a=await decodeResponseBody(_0x285bcc);if(!_0x1aee9a[_0x4b9784(0x174)]){if(allowNotFound&&_0x285bcc[_0x4b9784(0x136)]===0x194)return undefined;throwIfRateLimited(_0x285bcc,undefined,_0x1aee9a[_0x4b9784(0x12e)]);throw CliErrors['apiError']('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x285bcc[_0x4b9784(0x136)]+')',_0x285bcc[_0x4b9784(0x136)]>=0x190?_0x4b9784(0x132):undefined);}const _0x16fa32=_0x1aee9a['data'];throwIfRateLimited(_0x285bcc,_0x16fa32);if(allowNotFound&&isSkillHubNotFoundResponse(_0x285bcc[_0x4b9784(0x136)],_0x16fa32))return undefined;const _0x76ff66=!_0x285bcc['ok']||_0x16fa32?.['success']===![]||typeof _0x16fa32?.[_0x4b9784(0x17d)]===_0x4b9784(0x113)&&_0x16fa32[_0x4b9784(0x17d)]>=0x190;if(_0x76ff66)throw CliErrors['apiError'](_0x16fa32?.[_0x4b9784(0x124)]||_0x16fa32?.['message']||_0x16fa32?.[_0x4b9784(0x17a)]||_0x4b9784(0x199)+_0x285bcc['status'],_0x16fa32?.['errorCode']?_0x4b9784(0x11a)+_0x16fa32['errorCode']:undefined);return _0x16fa32?.[_0x4b9784(0x15e)]??_0x16fa32;}catch(_0x5db24c){if(_0x5db24c instanceof Error&&_0x5db24c[_0x4b9784(0x146)]===_0x4b9784(0x163))throw CliErrors[_0x4b9784(0x19b)](_0x4b9784(0x196)+_0x19befa['toString']());throw _0x5db24c;}finally{clearTimeout(_0x29ce20);}}function isSkillHubNotFoundResponse(_0x182a29,_0x5a0d3d){const _0xde533f=a76_0x3c27;if(_0x182a29===0x194||_0x5a0d3d?.[_0xde533f(0x17d)]===0x194)return!![];if(_0x182a29!==0x190&&_0x5a0d3d?.[_0xde533f(0x17d)]!==0x190)return![];const _0x32b8aa=[_0x5a0d3d?.[_0xde533f(0x17a)],_0x5a0d3d?.[_0xde533f(0x187)],_0x5a0d3d?.[_0xde533f(0x124)],_0x5a0d3d?.[_0xde533f(0x19d)]][_0xde533f(0x16c)](_0x4cb942=>typeof _0x4cb942===_0xde533f(0x184))['join']('\x20');return/skill not found\b/i[_0xde533f(0x179)](_0x32b8aa);}async function skillHubBinaryRequest(_0x3d745a,_0x265a35={}){const _0x5e2128=a76_0x3c27,{query:_0x319e5f,headers:headers={},timeout:timeout=0x7530}=_0x265a35,_0x2a5633=_activeAK;if(!_0x2a5633)throw CliErrors[_0x5e2128(0x130)](_0x5e2128(0x10c)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0xae4b03=getSkillHubDomain()[_0x5e2128(0x12f)](/\/$/,''),_0x234bc9=new URL(_0x3d745a,_0xae4b03+'/');if(_0x319e5f)for(const [_0x28a74c,_0x2a25e5]of Object[_0x5e2128(0x13a)](_0x319e5f)){_0x2a25e5!==undefined&&_0x2a25e5!==null&&_0x234bc9['searchParams'][_0x5e2128(0x15b)](_0x28a74c,String(_0x2a25e5));}const _0x130e05=new AbortController(),_0x1814fb=setTimeout(()=>_0x130e05[_0x5e2128(0x16f)](),timeout);try{const _0x254bbf=await fetch(_0x234bc9[_0x5e2128(0x192)](),{'method':'GET','headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x5e2128(0x13b)],'X-User-AK':_0x2a5633,...headers},'signal':_0x130e05[_0x5e2128(0x160)]});if(!_0x254bbf['ok']){const _0x58254f=await decodeResponseBody(_0x254bbf),_0xf85287=_0x58254f['data']&&typeof _0x58254f[_0x5e2128(0x15e)]==='object'?_0x58254f[_0x5e2128(0x15e)]:{},_0x5c7576=firstString(_0xf85287[_0x5e2128(0x124)],_0xf85287[_0x5e2128(0x187)],_0xf85287[_0x5e2128(0x17a)],_0xf85287[_0x5e2128(0x17c)],_0x58254f['text']);throwIfRateLimited(_0x254bbf,_0x58254f[_0x5e2128(0x15e)],_0x5c7576);throw CliErrors[_0x5e2128(0x19b)](_0x5c7576||_0x5e2128(0x199)+_0x254bbf[_0x5e2128(0x136)],'Download\x20failed:\x20'+_0x234bc9['toString']());}return Buffer[_0x5e2128(0x142)](await _0x254bbf[_0x5e2128(0x122)]());}catch(_0x49473b){if(_0x49473b instanceof Error&&_0x49473b[_0x5e2128(0x146)]===_0x5e2128(0x163))throw CliErrors[_0x5e2128(0x19b)](_0x5e2128(0x196)+_0x234bc9[_0x5e2128(0x192)]());throw _0x49473b;}finally{clearTimeout(_0x1814fb);}}export async function getBffEndpointContract(_0xd38eb,_0x21519b){const _0x512509=a76_0x3c27;if(_0x21519b===_0x512509(0x149))throw CliErrors[_0x512509(0x12c)](_0x512509(0x14a)+_0xd38eb+_0x512509(0x171)+_0x21519b);const _0x4a29a0=await apiRequest(_0x512509(0x15c)+encodeURIComponent(_0xd38eb)+'/'+encodeURIComponent(_0x21519b)),_0x38a87d=_0x4a29a0[_0x512509(0x15e)];if(!_0x38a87d||typeof _0x38a87d!==_0x512509(0x17e)||Array[_0x512509(0x16a)](_0x38a87d)||_0x38a87d['appCode']!==_0xd38eb||_0x38a87d[_0x512509(0x116)]!==_0x21519b)throw CliErrors[_0x512509(0x12c)](_0x512509(0x14a)+_0xd38eb+',\x20name='+_0x21519b);return{'appCode':_0x38a87d[_0x512509(0x166)],'functionName':_0x38a87d[_0x512509(0x116)],'description':_0x38a87d['description'],'version':_0x38a87d[_0x512509(0x126)],'gmtModified':_0x38a87d[_0x512509(0x13e)]};}export async function getSqlQueryInfo(_0x7f5de6,_0x4c1f18){const _0x228573=a76_0x3c27,_0x2678ab=await apiRequest(_0x228573(0x18d),{'method':'POST','body':{'appCode':_0x7f5de6,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x4c1f18}}),_0xf23a35=_0x2678ab[_0x228573(0x15e)],_0x4a46d7=_0xf23a35&&typeof _0xf23a35==='object'&&_0x228573(0x185)in _0xf23a35?_0xf23a35[_0x228573(0x185)]?.[0x0]:_0xf23a35&&typeof _0xf23a35===_0x228573(0x17e)&&_0x228573(0x18a)in _0xf23a35?_0xf23a35:undefined;if(!_0x4a46d7)throw CliErrors[_0x228573(0x12c)]('SQL\x20query\x20not\x20found:\x20'+_0x4c1f18);return _0x4a46d7;}function isRemoteAppItem(_0x1b04f9){const _0x45cc61=a76_0x3c27;return!!_0x1b04f9&&typeof _0x1b04f9===_0x45cc61(0x17e)&&typeof _0x1b04f9[_0x45cc61(0x166)]===_0x45cc61(0x184)&&typeof _0x1b04f9['appName']===_0x45cc61(0x184);}function extractRemoteAppItems(_0x50a166){const _0x159948=a76_0x3c27;if(Array[_0x159948(0x16a)](_0x50a166))return _0x50a166['filter'](isRemoteAppItem);if(!_0x50a166||typeof _0x50a166!=='object')throw CliErrors[_0x159948(0x19b)](_0x159948(0x189));const _0x517399=_0x50a166;if(Array[_0x159948(0x16a)](_0x517399[_0x159948(0x185)]))return _0x517399['tableData']['filter'](isRemoteAppItem);if(_0x517399['data']&&typeof _0x517399[_0x159948(0x15e)]===_0x159948(0x17e)){const _0x371c38=_0x517399[_0x159948(0x15e)];if(Array[_0x159948(0x16a)](_0x371c38[_0x159948(0x185)]))return _0x371c38[_0x159948(0x185)][_0x159948(0x16c)](isRemoteAppItem);}throw CliErrors[_0x159948(0x19b)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x1ad2d3=a76_0x3c27,_0x282134=await apiRequest(_0x1ad2d3(0x152));return extractRemoteAppItems(_0x282134[_0x1ad2d3(0x15e)]);}export async function getLoginUserInfo(){const _0x30ea96=a76_0x3c27,_0x341800=await apiRequest(_0x30ea96(0x173));if(!_0x341800[_0x30ea96(0x15e)]||typeof _0x341800[_0x30ea96(0x15e)]!==_0x30ea96(0x17e)||Array['isArray'](_0x341800[_0x30ea96(0x15e)]))throw CliErrors[_0x30ea96(0x19b)](_0x30ea96(0x11b));return _0x341800[_0x30ea96(0x15e)];}function runtimeSchedulePath(_0x5a9294,_0xee4b19=''){const _0x559acd=a76_0x3c27;return _0x559acd(0x170)+encodeURIComponent(_0x5a9294)+_0x559acd(0x18f)+_0xee4b19;}export async function validateRuntimeSchedule(_0x4afdbf,_0x10aa4f){const _0x1fb43c=a76_0x3c27,_0x41be81=await apiRequest(runtimeSchedulePath(_0x4afdbf,_0x1fb43c(0x198)),{'method':_0x1fb43c(0x16b),'body':_0x10aa4f});return _0x41be81[_0x1fb43c(0x15e)];}export async function createRuntimeSchedule(_0x5b6be8,_0x53e458){const _0x2680a3=a76_0x3c27,_0x569f90=await apiRequest(runtimeSchedulePath(_0x5b6be8),{'method':_0x2680a3(0x16b),'body':_0x53e458});return _0x569f90['data'];}export async function listRuntimeSchedules(_0x3868cf,_0xa13a16={}){const _0x287fe1=a76_0x3c27,_0x8a88ac=new URLSearchParams();if(_0xa13a16['limit']!==undefined)_0x8a88ac[_0x287fe1(0x15b)](_0x287fe1(0x10d),String(_0xa13a16[_0x287fe1(0x10d)]));if(_0xa13a16['cursor'])_0x8a88ac[_0x287fe1(0x15b)]('cursor',_0xa13a16[_0x287fe1(0x13d)]);const _0x1afd62=_0x8a88ac[_0x287fe1(0x147)]>0x0?'?'+_0x8a88ac[_0x287fe1(0x192)]():'',_0x55e264=await apiRequest(''+runtimeSchedulePath(_0x3868cf)+_0x1afd62);return _0x55e264[_0x287fe1(0x15e)];}export async function getRuntimeSchedule(_0x3daf3c,_0x4ce9e0){const _0x1c7f45=a76_0x3c27,_0x12353e=await apiRequest(runtimeSchedulePath(_0x3daf3c,'/'+encodeURIComponent(_0x4ce9e0)));return _0x12353e[_0x1c7f45(0x15e)];}export async function deleteRuntimeSchedule(_0x3cfce2,_0x5b5e10){const _0x25d21c=a76_0x3c27,_0x4a8fea=await apiRequest(runtimeSchedulePath(_0x3cfce2,'/'+encodeURIComponent(_0x5b5e10)),{'method':'DELETE'});return _0x4a8fea[_0x25d21c(0x15e)];}export async function runRuntimeSchedule(_0x174dc2,_0x5aca31){const _0x25557b=a76_0x3c27,_0x12a256=await apiRequest(runtimeSchedulePath(_0x174dc2,'/'+encodeURIComponent(_0x5aca31)+_0x25557b(0x151)),{'method':'POST'});return _0x12a256[_0x25557b(0x15e)];}export async function listDatasets(_0x1232d5,_0x29a778){const _0x31c0b3=a76_0x3c27,_0x3cf25c=await apiRequest(_0x31c0b3(0x11f),{'method':_0x31c0b3(0x16b),'body':{'appCode':_0x1232d5,..._0x29a778?.['code']&&{'code':_0x29a778[_0x31c0b3(0x17d)]},..._0x29a778?.[_0x31c0b3(0x146)]&&{'name':_0x29a778['name']}}});return extractList(_0x3cf25c['data']);}function a76_0x50a4(){const _0x35113c=['API\x20error\x20code:\x20','functionName','success','1168402UfAirp','valid','SkillHub\x20error\x20code:\x20','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','Download\x20failed:\x20','Toolbox\x20API\x20error:\x20','source','/client/dataset/list','application/json','publishedVersion','arrayBuffer','tags','errorMsg','undefined','version','/client/artifact/create','trim','scope','warnings','file','validation','/download','text','replace','authRequired','json','Check\x20your\x20credentials\x20and\x20try\x20again.','all','Toolbox\x20API\x20error','toLowerCase','status','visibility','/client/runtime-bff/personal/create','ownerPreviewVersion','entries','invokeSource','namespace','cursor','gmtModified','slug','Knowledge-base\x20entry\x20not\x20found:\x20id=','base64','from','map','/client/runtime-bff/personal/','/client/queryFileUrl','name','size','?appCode=','functions','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','effective','/api/node-toolbox/','7xkczIf','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','errors','url','/run','/client/app/my-apps','api-doc-generator','append','summary','skillCode','4037904KiLEne','897304JohEUR','find','skillName','set','/client/bff/endpoint/','company','data','3BHTSWY','signal','example','items','AbortError','skill','3191132oWCTHx','appCode','function','confirmWarnings','6744450RfmiQo','isArray','POST','filter','/client/knowledge-base/personal/','Personal\x20BFF\x20not\x20found:\x20id=','abort','/api/harness/apps/',',\x20name=','packageBase64','/client/user/loginUserInfo','isJson','/update','displayName','/publish/validate','/versions/','test','msg','searchParams','errorCode','code','object','49460895jNgbii','/client/artifact/','stringify','/execute?appCode=','GET','string','tableData','PRIVATE','message','/api/cli/v1/skills/','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','sqlCode','newConfigFileName','API\x20error:\x20','/client/sql/query','5094530IpzQJu','/schedules','/client/app-config/getByKey?','resolvedVersion','toString','/publish','type','query','Request\x20timeout:\x20','topK','/validate','SkillHub\x20API\x20error:\x20','favorite','apiError','Toolbox\x20error\x20code:\x20','error','/api/runtime/v1/namespaces/','/client/knowledge-base/personal/create','Configure\x20accessKey\x20in\x20','limit','artifactType','/client/uploadFile','personal','NAMESPACE_ONLY','content','number','application/zip'];a76_0x50a4=function(){return _0x35113c;};return a76_0x50a4();}export async function getDatasetDetail(_0x3eb5c8){const _0x510b08=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x3eb5c8));return _0x510b08['data'];}export async function getDatasetSdkUsageDoc(_0x2c6d63,_0x21c6d8){const _0x6b13e4=a76_0x3c27,_0x59a263=await toolboxRequest(_0x6b13e4(0x153),{'datasetCode':_0x2c6d63,'appCode':_0x21c6d8});return typeof _0x59a263?.['markdown']===_0x6b13e4(0x184)?_0x59a263['markdown']:'';}export async function uploadRuntimeFile(_0x481ed8,_0x51a06d){const _0x4e2550=a76_0x3c27,_0x20c6d3=await readFile(_0x51a06d),_0x4f934b=new FormData();_0x4f934b[_0x4e2550(0x154)](_0x4e2550(0x166),_0x481ed8),_0x4f934b[_0x4e2550(0x154)]('file',new Blob([new Uint8Array(_0x20c6d3)]),basename(_0x51a06d));const _0xc01cad=await apiFormRequest(_0x4e2550(0x10f),_0x4f934b);return _0xc01cad[_0x4e2550(0x15e)];}export async function queryRuntimeFileUrl(_0x238b34,_0x30616c={}){const _0x36dbe6=a76_0x3c27,_0x3e6e1b=await apiRequest(_0x36dbe6(0x145),{'method':'POST','body':{'filePath':_0x238b34,'downloadFlag':_0x30616c['download']??![],..._0x30616c['longTerm']?{'longTerm':!![]}:{}}});return _0x3e6e1b[_0x36dbe6(0x15e)];}export async function recognizeRuntimeOcr(_0x39c44f,_0x550da9){const _0x8c2fbb=a76_0x3c27,_0x2fe80d=await apiRequest('/client/ocr',{'method':_0x8c2fbb(0x16b),'body':{'appCode':_0x39c44f,'url':_0x550da9[_0x8c2fbb(0x150)],'type':_0x550da9[_0x8c2fbb(0x194)]}});return _0x2fe80d['data'];}export async function getRuntimeAppConfigByKey(_0x20f98e,_0x325daf){const _0x3c6a26=a76_0x3c27,_0x33ad0f=new URLSearchParams({'appCode':_0x20f98e,'key':_0x325daf}),_0x5f30d2=await apiRequest(_0x3c6a26(0x190)+_0x33ad0f['toString']());if(typeof _0x5f30d2[_0x3c6a26(0x15e)]!==_0x3c6a26(0x184))throw CliErrors['validation']('Invalid\x20app\x20config\x20value:\x20key='+_0x325daf);return _0x5f30d2[_0x3c6a26(0x15e)];}export async function listRuntimeArtifacts(_0x456f5b,_0x58591e){const _0x1bc843=a76_0x3c27,_0x46eaee=new URLSearchParams({'appCode':_0x456f5b});if(_0x58591e?.[_0x1bc843(0x10e)])_0x46eaee[_0x1bc843(0x15b)](_0x1bc843(0x10e),_0x58591e[_0x1bc843(0x10e)]);if(_0x58591e?.[_0x1bc843(0x11e)])_0x46eaee[_0x1bc843(0x15b)](_0x1bc843(0x11e),_0x58591e[_0x1bc843(0x11e)]);if(_0x58591e?.['favorite']!==undefined)_0x46eaee[_0x1bc843(0x15b)](_0x1bc843(0x19a),String(_0x58591e[_0x1bc843(0x19a)]));const _0x495ea4=await apiRequest('/client/artifact/list?'+_0x46eaee[_0x1bc843(0x192)]());return Array[_0x1bc843(0x16a)](_0x495ea4[_0x1bc843(0x15e)])?_0x495ea4[_0x1bc843(0x15e)]:[];}export async function getRuntimeArtifact(_0x26752f,_0x54bfcb){const _0x48ea21=a76_0x3c27,_0x365726=await apiRequest('/client/artifact/'+_0x26752f+_0x48ea21(0x148)+encodeURIComponent(_0x54bfcb));if(!_0x365726[_0x48ea21(0x15e)])throw CliErrors[_0x48ea21(0x12c)]('Artifact\x20not\x20found:\x20id='+_0x26752f);return _0x365726['data'];}export async function createRuntimeArtifact(_0x2d1a53,_0xa3e973){const _0x5c9918=a76_0x3c27,_0x2cf418=await apiRequest(_0x5c9918(0x127),{'method':'POST','body':{'appCode':_0x2d1a53,..._0xa3e973}});return _0x2cf418['data'];}export async function updateRuntimeArtifact(_0x31bc9d,_0x16d092,_0x9ba4ef){const _0x30b614=a76_0x3c27,_0x41364e=await apiRequest(_0x30b614(0x180)+_0x31bc9d+'/update',{'method':_0x30b614(0x16b),'body':{'appCode':_0x16d092,..._0x9ba4ef}});return _0x41364e[_0x30b614(0x15e)];}export async function listPersonalBffs(_0x3da16e){const _0x4d52d7=a76_0x3c27,_0x20fed0=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x3da16e));return Array['isArray'](_0x20fed0[_0x4d52d7(0x15e)])?_0x20fed0[_0x4d52d7(0x15e)]:[];}export async function getPersonalBff(_0x159fc0,_0x3455fa){const _0x53cf68=a76_0x3c27,_0x23c65c=await apiRequest('/client/runtime-bff/personal/'+_0x159fc0+_0x53cf68(0x148)+encodeURIComponent(_0x3455fa));if(!_0x23c65c['data'])throw CliErrors[_0x53cf68(0x12c)](_0x53cf68(0x16e)+_0x159fc0);return _0x23c65c[_0x53cf68(0x15e)];}export async function createPersonalBff(_0x5d4fd0,_0x430387){const _0x5ef7b1=a76_0x3c27,_0x6030ea=await apiRequest(_0x5ef7b1(0x138),{'method':'POST','body':{'appCode':_0x5d4fd0,..._0x430387}});return _0x6030ea[_0x5ef7b1(0x15e)];}export async function updatePersonalBff(_0x38318a,_0x35d2e7,_0x50d98c){const _0x359301=a76_0x3c27,_0x2ab131=await apiRequest('/client/runtime-bff/personal/'+_0x38318a+_0x359301(0x175),{'method':_0x359301(0x16b),'body':{'appCode':_0x35d2e7,..._0x50d98c}});return _0x2ab131[_0x359301(0x15e)];}export async function executePersonalBff(_0x4f77ec,_0x352e6f,_0x43f162){const _0xa6df51=a76_0x3c27,_0x5b68f7=await apiRequest(_0xa6df51(0x144)+_0x4f77ec+_0xa6df51(0x182)+encodeURIComponent(_0x352e6f),{'method':_0xa6df51(0x16b),'body':_0x43f162});return _0x5b68f7[_0xa6df51(0x15e)];}export async function listPersonalKnowledgeBaseItems(_0x493d41){const _0x350539=a76_0x3c27,_0x4dc84a=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x493d41));return Array[_0x350539(0x16a)](_0x4dc84a[_0x350539(0x15e)])?_0x4dc84a[_0x350539(0x15e)]:[];}export async function getPersonalKnowledgeBaseItem(_0xc9fccd,_0x10e6ed){const _0x9f072c=a76_0x3c27,_0xb1c347=await apiRequest(_0x9f072c(0x16d)+_0xc9fccd+_0x9f072c(0x148)+encodeURIComponent(_0x10e6ed));if(!_0xb1c347[_0x9f072c(0x15e)])throw CliErrors[_0x9f072c(0x12c)](_0x9f072c(0x140)+_0xc9fccd);return _0xb1c347[_0x9f072c(0x15e)];}export async function createPersonalKnowledgeBaseItem(_0x1f3794,_0x3d40ca){const _0x5d9bfe=a76_0x3c27,_0x5dcfd8=await apiRequest(_0x5d9bfe(0x10b),{'method':_0x5d9bfe(0x16b),'body':{'appCode':_0x1f3794,..._0x3d40ca}});return _0x5dcfd8[_0x5d9bfe(0x15e)];}export async function updatePersonalKnowledgeBaseItem(_0x224bb2,_0x18b92a,_0x39db0d){const _0x1defbf=a76_0x3c27,_0x522fce=await apiRequest(_0x1defbf(0x16d)+_0x224bb2+'/update',{'method':_0x1defbf(0x16b),'body':{'appCode':_0x18b92a,..._0x39db0d}});return _0x522fce['data'];}export async function searchKnowledgeBase(_0x3fc21d,_0x4afa06){const _0x284d3e=a76_0x3c27,_0x5daf04=await apiRequest('/client/knowledge-base/search',{'method':'POST','body':{'appCode':_0x3fc21d,'query':_0x4afa06[_0x284d3e(0x195)],..._0x4afa06[_0x284d3e(0x197)]!==undefined?{'topK':_0x4afa06[_0x284d3e(0x197)]}:{}}});return Array['isArray'](_0x5daf04[_0x284d3e(0x15e)])?_0x5daf04['data']:[];}export async function getRuntimeSkillByCode(_0x2b8b85,_0x2b0318){const _0x4f324e=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x2b8b85)+'/'+encodeURIComponent(_0x2b0318),{'allowNotFound':!![]});return _0x4f324e?skillHubRuntimeDetailToRuntimeSkill(_0x4f324e):undefined;}export async function listRuntimeSkills(_0x3efa14){const _0x212196=a76_0x3c27,_0x46766f=await skillHubJsonRequest(_0x212196(0x10a)+encodeURIComponent(_0x3efa14[_0x212196(0x166)])+'/skills',{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x3efa14[_0x212196(0x166)],_0x46766f,_0x3efa14[_0x212196(0x129)]??_0x212196(0x133),_0x3efa14[_0x212196(0x17d)]);}export async function listPersonalRuntimeSkills(_0x40f970){const _0xa67af4=a76_0x3c27;return(await listRuntimeSkills({'appCode':_0x40f970,'scope':'personal'}))[_0xa67af4(0x110)];}export async function listCompanyRuntimeSkills(_0x2f3e86){const _0xbff72a=a76_0x3c27;return(await listRuntimeSkills({'appCode':_0x2f3e86,'scope':_0xbff72a(0x15d)}))['company'];}export async function listVisibleRuntimeSkills(_0x813fcb){const _0x1a49b3=a76_0x3c27;return(await listRuntimeSkills({'appCode':_0x813fcb,'scope':_0x1a49b3(0x133)}))[_0x1a49b3(0x14b)];}export async function createPersonalRuntimeSkill(_0x16b1b2,_0x56217e,_0xcc06ee={}){const _0x4101ad=a76_0x3c27;return publishRuntimeSkill(_0x16b1b2,_0x56217e,{'visibility':_0x4101ad(0x186),'confirmWarnings':_0xcc06ee[_0x4101ad(0x168)]});}export async function updatePersonalRuntimeSkill(_0x216387,_0x339b1b,_0x42f96,_0x3df40d={}){const _0xc5792f=a76_0x3c27;return publishRuntimeSkill(_0x339b1b,{..._0x42f96,'skillCode':_0x42f96[_0xc5792f(0x156)]??_0x216387},{'visibility':_0xc5792f(0x186),'confirmWarnings':_0x3df40d['confirmWarnings']});}export async function publishCompanyRuntimeSkill(_0x35fb8f,_0x38667,_0x133dad={}){const _0x4367b1=a76_0x3c27;return publishRuntimeSkill(_0x35fb8f,_0x38667,{'visibility':_0x4367b1(0x111),'confirmWarnings':_0x133dad[_0x4367b1(0x168)]});}export async function validateRuntimeSkillPublish(_0x15658d,_0x671977,_0xd7a9bb){const _0x16ef1e=a76_0x3c27,_0x486a29=buildRuntimeSkillPublishForm(_0x671977,_0xd7a9bb[_0x16ef1e(0x137)]),_0x53b87d=await skillHubJsonRequest(_0x16ef1e(0x188)+encodeURIComponent(_0x15658d)+_0x16ef1e(0x177),{'method':_0x16ef1e(0x16b),'body':_0x486a29});return{'valid':_0x53b87d[_0x16ef1e(0x119)]===!![],'errors':Array[_0x16ef1e(0x16a)](_0x53b87d[_0x16ef1e(0x14f)])?_0x53b87d[_0x16ef1e(0x14f)]:[],'warnings':Array[_0x16ef1e(0x16a)](_0x53b87d[_0x16ef1e(0x12a)])?_0x53b87d[_0x16ef1e(0x12a)]:[],'resolvedSlug':_0x53b87d['resolvedSlug'],'resolvedVersion':_0x53b87d[_0x16ef1e(0x191)]};}export async function downloadRuntimeSkillPackage(_0xdb3f5c,_0x5937da,_0x253a89,_0x5ee604){const _0x9578df=a76_0x3c27;void _0xdb3f5c;const _0xfd5e5b=_0x5ee604?_0x9578df(0x188)+encodeURIComponent(_0x253a89)+'/'+encodeURIComponent(_0x5937da)+_0x9578df(0x178)+encodeURIComponent(_0x5ee604)+_0x9578df(0x12d):_0x9578df(0x188)+encodeURIComponent(_0x253a89)+'/'+encodeURIComponent(_0x5937da)+_0x9578df(0x12d);return skillHubBinaryRequest(_0xfd5e5b);}async function publishRuntimeSkill(_0x2ccd12,_0x1ad609,_0x4386b7){const _0x339aac=a76_0x3c27,_0x3d537a=buildRuntimeSkillPublishForm(_0x1ad609,_0x4386b7[_0x339aac(0x137)]),_0x1e088e=await skillHubJsonRequest(_0x339aac(0x188)+encodeURIComponent(_0x2ccd12)+_0x339aac(0x193),{'method':_0x339aac(0x16b),'query':{'confirmWarnings':_0x4386b7[_0x339aac(0x168)]===!![]?!![]:undefined},'body':_0x3d537a});return{'appCode':_0x1e088e[_0x339aac(0x13c)]??_0x2ccd12,'skillCode':_0x1e088e['slug']??_0x1ad609[_0x339aac(0x156)]??'','skillName':_0x1ad609['skillName']??_0x1e088e[_0x339aac(0x13f)]??_0x1ad609[_0x339aac(0x156)],'description':_0x1ad609['description'],'scope':skillHubVisibilityToScope(_0x1e088e[_0x339aac(0x137)]??_0x4386b7[_0x339aac(0x137)])??_0x339aac(0x110),'version':_0x1e088e[_0x339aac(0x126)]??_0x1ad609['version'],'tags':_0x1ad609[_0x339aac(0x123)],'content':_0x1ad609[_0x339aac(0x112)]};}function buildRuntimeSkillPublishForm(_0x3e41ae,_0xbb54a){const _0x37f5f8=a76_0x3c27,_0x8edbf8=new FormData();return _0x8edbf8[_0x37f5f8(0x15b)](_0x37f5f8(0x12b),runtimeSkillPackageFile(_0x3e41ae)),_0x3e41ae[_0x37f5f8(0x15a)]?.['trim']()&&_0x8edbf8[_0x37f5f8(0x15b)](_0x37f5f8(0x176),_0x3e41ae[_0x37f5f8(0x15a)][_0x37f5f8(0x128)]()),_0x8edbf8[_0x37f5f8(0x15b)]('visibility',_0xbb54a),_0x8edbf8;}function runtimeSkillPackageFile(_0x5df007){const _0x135cdd=a76_0x3c27;if(!_0x5df007[_0x135cdd(0x172)])throw CliErrors[_0x135cdd(0x12c)]('Missing\x20Skill\x20package\x20payload.');const _0x517afe=Buffer[_0x135cdd(0x142)](_0x5df007[_0x135cdd(0x172)],_0x135cdd(0x141)),_0x152627=new Blob([_0x517afe],{'type':_0x135cdd(0x114)}),_0x3ea88b=(_0x5df007['skillCode']||_0x135cdd(0x164))+'.zip';if(typeof File!==_0x135cdd(0x125))return new File([_0x152627],_0x3ea88b,{'type':_0x135cdd(0x114)});return _0x152627;}function normalizeSkillHubRuntimeListResponse(_0x53fa3e,_0x1e8c90,_0x27739b,_0x2f785a){const _0x3596f8=a76_0x3c27,_0x580c5c=Array[_0x3596f8(0x16a)](_0x1e8c90)?_0x1e8c90:Array[_0x3596f8(0x16a)](_0x1e8c90?.[_0x3596f8(0x162)])?_0x1e8c90['items']:[],_0x5cdcb8=_0x2f785a?.[_0x3596f8(0x128)](),_0xe05172=_0x580c5c[_0x3596f8(0x16c)](_0x519154=>!_0x5cdcb8||_0x519154[_0x3596f8(0x13f)]===_0x5cdcb8)[_0x3596f8(0x143)](skillHubRuntimeItemToRuntimeSkill)[_0x3596f8(0x16c)](_0x30085f=>Boolean(_0x30085f)),_0x185d58=_0xe05172[_0x3596f8(0x16c)](_0x3ec997=>_0x3ec997[_0x3596f8(0x129)]===_0x3596f8(0x110)),_0x14a2c9=_0xe05172[_0x3596f8(0x16c)](_0x2c2db1=>_0x2c2db1[_0x3596f8(0x129)]===_0x3596f8(0x15d));return{'appCode':_0x53fa3e,'personal':_0x27739b===_0x3596f8(0x15d)?[]:_0x185d58,'company':_0x27739b===_0x3596f8(0x110)?[]:_0x14a2c9,'effective':buildEffectiveRuntimeSkills(_0x185d58,_0x14a2c9,_0x27739b)};}function skillHubRuntimeItemToRuntimeSkill(_0x4069a5){const _0x3a58f5=a76_0x3c27,_0x19e540=_0x4069a5[_0x3a58f5(0x13f)]?.['trim'](),_0x1d3e85=skillHubVisibilityToScope(_0x4069a5[_0x3a58f5(0x137)]);if(!_0x19e540||!_0x1d3e85)return undefined;return{'id':_0x4069a5['id'],'appCode':_0x4069a5[_0x3a58f5(0x13c)],'skillCode':_0x19e540,'skillName':_0x4069a5['displayName']??_0x19e540,'description':_0x4069a5[_0x3a58f5(0x155)],'scope':_0x1d3e85,'version':skillHubRuntimeItemVersion(_0x4069a5),'status':_0x4069a5[_0x3a58f5(0x136)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x482279){const _0x425a94=a76_0x3c27,_0x423e39=_0x482279[_0x425a94(0x13f)]?.[_0x425a94(0x128)]();if(!_0x423e39)return undefined;return{'id':_0x482279['id'],'appCode':_0x482279[_0x425a94(0x13c)],'skillCode':_0x423e39,'skillName':_0x482279[_0x425a94(0x176)]??_0x423e39,'description':_0x482279['summary'],'example':_0x482279[_0x425a94(0x161)],'scope':skillHubVisibilityToScope(_0x482279[_0x425a94(0x137)])??_0x482279['visibility']?.[_0x425a94(0x135)](),'version':skillHubRuntimeItemVersion(_0x482279),'status':_0x482279[_0x425a94(0x136)]};}function skillHubVisibilityToScope(_0x1a4715){const _0x1e24d0=a76_0x3c27;if(_0x1a4715==='PRIVATE')return _0x1e24d0(0x110);if(_0x1a4715===_0x1e24d0(0x111))return _0x1e24d0(0x15d);return undefined;}function skillHubRuntimeItemVersion(_0x427dfa){const _0x108be7=a76_0x3c27;return _0x427dfa[_0x108be7(0x121)]?.['version']??_0x427dfa['headlineVersion']?.[_0x108be7(0x126)]??_0x427dfa[_0x108be7(0x139)]?.[_0x108be7(0x126)];}function buildEffectiveRuntimeSkills(_0x2ab333,_0xe418d1,_0x3952d7){const _0x2cf852=a76_0x3c27;if(_0x3952d7===_0x2cf852(0x110))return _0x2ab333;if(_0x3952d7===_0x2cf852(0x15d))return _0xe418d1;const _0x252ed4=new Map();for(const _0xaf80c of _0xe418d1){_0x252ed4[_0x2cf852(0x15b)](_0xaf80c[_0x2cf852(0x156)],_0xaf80c);}for(const _0x5a5e37 of _0x2ab333){_0x252ed4[_0x2cf852(0x15b)](_0x5a5e37['skillCode'],_0x5a5e37);}return Array[_0x2cf852(0x142)](_0x252ed4['values']());}function normalizeRuntimeSkillListResponse(_0x5aaa2c,_0x210f17){const _0x4dc7b1=a76_0x3c27;if(Array[_0x4dc7b1(0x16a)](_0x210f17)){const _0x9b05e9=_0x210f17['filter'](_0x30373b=>_0x30373b[_0x4dc7b1(0x129)]===_0x4dc7b1(0x110)),_0x572237=_0x210f17[_0x4dc7b1(0x16c)](_0x4aa73a=>_0x4aa73a['scope']===_0x4dc7b1(0x15d));return{'appCode':_0x5aaa2c,'personal':_0x9b05e9,'company':_0x572237,'effective':[..._0x572237,..._0x9b05e9]};}return{'appCode':_0x210f17?.[_0x4dc7b1(0x166)]??_0x5aaa2c,'personal':Array['isArray'](_0x210f17?.[_0x4dc7b1(0x110)])?_0x210f17[_0x4dc7b1(0x110)]:[],'company':Array['isArray'](_0x210f17?.['company'])?_0x210f17[_0x4dc7b1(0x15d)]:[],'effective':Array[_0x4dc7b1(0x16a)](_0x210f17?.[_0x4dc7b1(0x14b)])?_0x210f17['effective']:[]};}
|
|
1
|
+
(function(_0x4e7e3b,_0x41016c){const _0x39d45e=a76_0x348a,_0x5e25aa=_0x4e7e3b();while(!![]){try{const _0x946e99=parseInt(_0x39d45e(0xb3))/0x1+parseInt(_0x39d45e(0xf2))/0x2+-parseInt(_0x39d45e(0x127))/0x3*(parseInt(_0x39d45e(0xcc))/0x4)+-parseInt(_0x39d45e(0x118))/0x5*(-parseInt(_0x39d45e(0x14b))/0x6)+parseInt(_0x39d45e(0xcf))/0x7+-parseInt(_0x39d45e(0x101))/0x8*(parseInt(_0x39d45e(0x12d))/0x9)+parseInt(_0x39d45e(0x125))/0xa*(parseInt(_0x39d45e(0xcb))/0xb);if(_0x946e99===_0x41016c)break;else _0x5e25aa['push'](_0x5e25aa['shift']());}catch(_0x164b8f){_0x5e25aa['push'](_0x5e25aa['shift']());}}}(a76_0x1c5e,0xf3cfa));import{readFile}from'node:fs/promises';import{basename}from'node:path';function a76_0x1c5e(){const _0x21a97c=['?appCode=','url','scope','/api/cli/v1/skills/',',\x20name=','Request\x20timeout:\x20','6orSMMc','download','gmtModified','abort','status','805356qMgBBx','Configure\x20accessKey\x20in\x20','json','/run','topK','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','application/octet-stream','/client/sql/query','example','authRequired','isJson','NAMESPACE_ONLY','description','toString','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','skillName','Personal\x20BFF\x20not\x20found:\x20id=','warnings','/schedules','API\x20error\x20code:\x20','all','apiError','packageBase64','test','22ihggcP','4DwlLJW','/client/runtime-bff/personal/create','favorite','12031922caRYsw','PRIVATE','file','Toolbox\x20API\x20error','/versions/','trim','stringify','searchParams','/client/app/my-apps','string','resolvedSlug','tags','/client/queryFileUrl','/publish','summary','/client/artifact/','content','GET','Knowledge-base\x20entry\x20not\x20found:\x20id=','/update','valid','query','personal','visibility','appName','object','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','data','invokeSource','effective','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','ownerPreviewVersion','text','skillCode','values','1648742ablQCb','success','/validate','/client/dataset/list','longTerm','type','Toolbox\x20API\x20error:\x20','/download','markdown','application/json','function','signal','Toolbox\x20error\x20code:\x20','/client/ocr','cursor','14529320OQMteQ','replace','arrayBuffer','/client/runtime-bff/personal/list?appCode=','set','boolean','/api/runtime/v1/namespaces/','company','/client/knowledge-base/personal/','skill','Check\x20your\x20credentials\x20and\x20try\x20again.','/client/dataset/get-driven-data?code=','AbortError','/client/artifact/list?','artifactType','isArray','Invalid\x20app\x20config\x20value:\x20key=','SkillHub\x20error\x20code:\x20','version','/client/knowledge-base/personal/create','API\x20error:\x20','/client/bff/endpoint/','/api/v1/skills/','1615430LUcZtD','/execute?appCode=','tableData','SkillHub\x20API\x20error:\x20','displayName','confirmWarnings','name','/client/uploadFile','SQL\x20query\x20not\x20found:\x20','errors','msg','POST','validation','911110VvJujs','/client/user/loginUserInfo','3117198rdKyZN','/api/node-toolbox/','errorMsg','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','Artifact\x20not\x20found:\x20id=','resolvedVersion','9OiPmJm','limit','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/runtime-bff/personal/','application/zip','source','code','errorCode','from','entries','slug','error','items','base64','append','filter','message','namespace','size','appCode','Download\x20failed:\x20','find','newConfigFileName','functionName'];a76_0x1c5e=function(){return _0x21a97c;};return a76_0x1c5e();}import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x32f37e){_activeAK=_0x32f37e||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x34b914){const _0x2ea6a7=a76_0x348a;for(const _0x215902 of _0x34b914){if(typeof _0x215902==='string'&&_0x215902[_0x2ea6a7(0xd4)]())return _0x215902['trim']();}return undefined;}async function decodeResponseBody(_0x45ea53){const _0x543c50=a76_0x348a;if(typeof _0x45ea53[_0x543c50(0xef)]===_0x543c50(0xfc))try{const _0x12c8f4=await _0x45ea53[_0x543c50(0xef)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x12c8f4),'text':_0x12c8f4};}catch{return{'isJson':![],'text':_0x12c8f4[_0x543c50(0xd4)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x45ea53[_0x543c50(0xb5)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x3a60f3,_0x18d813,_0x54514a){const _0x31146c=a76_0x348a,_0x495360=_0x18d813&&typeof _0x18d813==='object'?_0x18d813:{},_0x2903d7=[_0x495360[_0x31146c(0x14f)],_0x495360[_0x31146c(0x133)]][_0x31146c(0x142)](_0x264514=>Number(_0x264514)===0x1ad),_0x174cef=createRateLimitError({'status':_0x3a60f3[_0x31146c(0x14f)]===0x1ad?_0x3a60f3[_0x31146c(0x14f)]:_0x2903d7??_0x3a60f3['status'],'errorCode':firstString(_0x495360['errorCode'],typeof _0x495360['code']===_0x31146c(0xd8)?_0x495360['code']:undefined),'message':firstString(_0x495360[_0x31146c(0x129)],_0x495360[_0x31146c(0x13d)],_0x495360[_0x31146c(0x122)],_0x54514a),'retryAfter':readRetryAfter(_0x3a60f3['headers'])??readRetryAfterSeconds(_0x18d813)});if(_0x174cef)throw _0x174cef;}async function apiRequest(_0x192f21,_0x3bd26f={}){const _0x167c3d=a76_0x348a,{method:method=_0x167c3d(0xe0),body:_0x1203de,headers:headers={},timeout:timeout=0x7530}=_0x3bd26f,_0x427208=_activeAK,_0x127530=getRuntimeDomain();if(!_0x427208)throw CliErrors[_0x167c3d(0xbc)](_0x167c3d(0xb4)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x16cbb4=''+_0x127530+_0x192f21,_0x9b50d1={'X-User-AK':_0x427208},_0xd43ac6=new AbortController(),_0x3c5296=setTimeout(()=>_0xd43ac6[_0x167c3d(0x14e)](),timeout);try{const _0x2e6797=await fetch(_0x16cbb4,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x9b50d1,...headers},'body':_0x1203de?JSON[_0x167c3d(0xd5)](_0x1203de):undefined,'signal':_0xd43ac6[_0x167c3d(0xfd)]}),_0x5b5200=await decodeResponseBody(_0x2e6797);if(!_0x5b5200['isJson']){throwIfRateLimited(_0x2e6797,undefined,_0x5b5200[_0x167c3d(0xef)]);throw CliErrors[_0x167c3d(0xc8)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x2e6797[_0x167c3d(0x14f)]+')',_0x2e6797[_0x167c3d(0x14f)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x34870d=_0x5b5200['data'];throwIfRateLimited(_0x2e6797,_0x34870d);if(!_0x2e6797['ok']||_0x34870d[_0x167c3d(0xf3)]===![])throw CliErrors['apiError'](_0x34870d[_0x167c3d(0x129)]||_0x34870d[_0x167c3d(0x13d)]||_0x167c3d(0x115)+_0x2e6797['status'],_0x34870d[_0x167c3d(0x134)]?_0x167c3d(0xc6)+_0x34870d[_0x167c3d(0x134)]:undefined);return _0x34870d;}catch(_0x44005d){if(_0x44005d instanceof Error&&_0x44005d[_0x167c3d(0x11e)]==='AbortError')throw CliErrors[_0x167c3d(0xc8)]('Request\x20timeout:\x20'+_0x16cbb4);throw _0x44005d;}finally{clearTimeout(_0x3c5296);}}async function apiBinaryRequest(_0x4bcb9d,_0x312268={}){const _0x1ac044=a76_0x348a,{method:method=_0x1ac044(0xe0),headers:headers={},timeout:timeout=0x7530}=_0x312268,_0x3235e3=_activeAK,_0x2cc7dd=getRuntimeDomain();if(!_0x3235e3)throw CliErrors[_0x1ac044(0xbc)](_0x1ac044(0xb4)+PRODUCT_CONFIG[_0x1ac044(0x143)]+'.');const _0x531028=''+_0x2cc7dd+_0x4bcb9d,_0x38003d=new AbortController(),_0x1cec00=setTimeout(()=>_0x38003d[_0x1ac044(0x14e)](),timeout);try{const _0x265be6=await fetch(_0x531028,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1ac044(0xeb)],'X-User-AK':_0x3235e3,...headers},'signal':_0x38003d[_0x1ac044(0xfd)]});if(!_0x265be6['ok']){const _0x2aa605=await decodeResponseBody(_0x265be6),_0x3ec31c=_0x2aa605[_0x1ac044(0xea)]&&typeof _0x2aa605[_0x1ac044(0xea)]===_0x1ac044(0xe8)?_0x2aa605[_0x1ac044(0xea)]:{},_0x4bb853=firstString(_0x3ec31c['errorMsg'],_0x3ec31c[_0x1ac044(0x13d)],_0x3ec31c[_0x1ac044(0x134)],_0x2aa605[_0x1ac044(0xef)]);throwIfRateLimited(_0x265be6,_0x2aa605['data'],_0x4bb853);throw CliErrors['apiError'](_0x4bb853||_0x1ac044(0x115)+_0x265be6['status'],_0x1ac044(0x141)+_0x531028);}return Buffer[_0x1ac044(0x135)](await _0x265be6[_0x1ac044(0x103)]());}catch(_0x3d96fb){if(_0x3d96fb instanceof Error&&_0x3d96fb[_0x1ac044(0x11e)]===_0x1ac044(0x10d))throw CliErrors[_0x1ac044(0xc8)]('Request\x20timeout:\x20'+_0x531028);throw _0x3d96fb;}finally{clearTimeout(_0x1cec00);}}async function apiFormRequest(_0x12c646,_0x15997e,_0xbdbb7a={}){const _0x23f683=a76_0x348a,{timeout:timeout=0x7530}=_0xbdbb7a,_0x3b0d23=_activeAK,_0x2779c3=getRuntimeDomain();if(!_0x3b0d23)throw CliErrors['authRequired'](_0x23f683(0xb4)+PRODUCT_CONFIG[_0x23f683(0x143)]+'.');const _0x405c96=''+_0x2779c3+_0x12c646,_0x3aab82=new AbortController(),_0x270057=setTimeout(()=>_0x3aab82[_0x23f683(0x14e)](),timeout);try{const _0x42547f=await fetch(_0x405c96,{'method':_0x23f683(0x123),'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x3b0d23},'body':_0x15997e,'signal':_0x3aab82['signal']}),_0x580e98=await decodeResponseBody(_0x42547f);if(!_0x580e98['isJson']){throwIfRateLimited(_0x42547f,undefined,_0x580e98['text']);throw CliErrors['apiError'](_0x23f683(0xb8)+_0x42547f['status']+')',_0x42547f['status']>=0x190?_0x23f683(0x10b):undefined);}const _0x598a32=_0x580e98['data'];throwIfRateLimited(_0x42547f,_0x598a32);if(!_0x42547f['ok']||_0x598a32[_0x23f683(0xf3)]===![])throw CliErrors[_0x23f683(0xc8)](_0x598a32[_0x23f683(0x129)]||_0x598a32[_0x23f683(0x13d)]||_0x23f683(0x115)+_0x42547f[_0x23f683(0x14f)],_0x598a32[_0x23f683(0x134)]?_0x23f683(0xc6)+_0x598a32[_0x23f683(0x134)]:undefined);return _0x598a32;}catch(_0x5bb074){if(_0x5bb074 instanceof Error&&_0x5bb074[_0x23f683(0x11e)]===_0x23f683(0x10d))throw CliErrors[_0x23f683(0xc8)](_0x23f683(0x14a)+_0x405c96);throw _0x5bb074;}finally{clearTimeout(_0x270057);}}async function toolboxRequest(_0x4a899e,_0x376f8e,_0x6028f3={}){const _0x562b13=a76_0x348a,{method:method=_0x562b13(0xe0),headers:headers={},timeout:timeout=0x7530}=_0x6028f3,_0x29c462=_activeAK;if(!_0x29c462)throw CliErrors[_0x562b13(0xbc)](_0x562b13(0xb4)+PRODUCT_CONFIG[_0x562b13(0x143)]+'.');const _0x23dc21=getApiDomain()[_0x562b13(0x102)](/\/$/,''),_0x20670a=new URL(_0x4a899e,_0x23dc21+_0x562b13(0x128));if(_0x376f8e)for(const [_0x5047f6,_0xf7a627]of Object[_0x562b13(0x136)](_0x376f8e)){_0xf7a627!==undefined&&_0xf7a627!==null&&_0x20670a[_0x562b13(0xd6)][_0x562b13(0x105)](_0x5047f6,String(_0xf7a627));}const _0x33b4de=new AbortController(),_0x24bdb8=setTimeout(()=>_0x33b4de[_0x562b13(0x14e)](),timeout);try{const _0x122bf4=await fetch(_0x20670a,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x562b13(0xeb)],'X-User-AK':_0x29c462,...headers},'signal':_0x33b4de[_0x562b13(0xfd)]}),_0x77299f=await decodeResponseBody(_0x122bf4);if(!_0x77299f['isJson']){throwIfRateLimited(_0x122bf4,undefined,_0x77299f[_0x562b13(0xef)]);throw CliErrors[_0x562b13(0xc8)](_0x562b13(0xc1)+_0x122bf4['status']+')',_0x122bf4['status']>=0x190?_0x562b13(0x10b):undefined);}const _0x4360ea=_0x77299f[_0x562b13(0xea)];throwIfRateLimited(_0x122bf4,_0x4360ea);if(!_0x122bf4['ok']){const _0x15f90f=_0x4360ea&&typeof _0x4360ea==='object'?_0x4360ea:{};throw CliErrors[_0x562b13(0xc8)](_0x15f90f[_0x562b13(0x129)]||_0x15f90f[_0x562b13(0x13d)]||_0x562b13(0xf8)+_0x122bf4[_0x562b13(0x14f)],_0x15f90f[_0x562b13(0x134)]?_0x562b13(0xfe)+_0x15f90f[_0x562b13(0x134)]:undefined);}if(_0x4360ea&&typeof _0x4360ea===_0x562b13(0xe8)&&_0x562b13(0xf3)in _0x4360ea&&typeof _0x4360ea[_0x562b13(0xf3)]===_0x562b13(0x106)){const _0x46b946=_0x4360ea;if(!_0x46b946['success'])throw CliErrors[_0x562b13(0xc8)](_0x46b946['errorMsg']||_0x46b946[_0x562b13(0x13d)]||_0x562b13(0xd2),_0x46b946['errorCode']?'Toolbox\x20error\x20code:\x20'+_0x46b946['errorCode']:undefined);return _0x46b946['data'];}return _0x4360ea;}catch(_0x139e35){if(_0x139e35 instanceof Error&&_0x139e35[_0x562b13(0x11e)]==='AbortError')throw CliErrors[_0x562b13(0xc8)](_0x562b13(0x14a)+_0x20670a[_0x562b13(0xc0)]());throw _0x139e35;}finally{clearTimeout(_0x24bdb8);}}async function skillHubJsonRequest(_0x95f971,_0x16318e={}){const _0x332bb6=a76_0x348a,{method:method=_0x332bb6(0xe0),query:_0xaa663e,body:_0x3f89a6,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x16318e,_0x267754=_activeAK;if(!_0x267754)throw CliErrors['authRequired'](_0x332bb6(0xb4)+PRODUCT_CONFIG[_0x332bb6(0x143)]+'.');const _0x5d7c77=getSkillHubDomain()[_0x332bb6(0x102)](/\/$/,''),_0x340d0d=new URL(_0x95f971,_0x5d7c77+'/');if(_0xaa663e)for(const [_0xc28e17,_0x108b64]of Object[_0x332bb6(0x136)](_0xaa663e)){_0x108b64!==undefined&&_0x108b64!==null&&_0x340d0d[_0x332bb6(0xd6)][_0x332bb6(0x105)](_0xc28e17,String(_0x108b64));}const _0x2c3989=new AbortController(),_0x38f53a=setTimeout(()=>_0x2c3989[_0x332bb6(0x14e)](),timeout);try{const _0x5ab75b=await fetch(_0x340d0d[_0x332bb6(0xc0)](),{'method':method,'headers':{'Accept':_0x332bb6(0xfb),'X-Invoke-Source':PRODUCT_CONFIG[_0x332bb6(0xeb)],'X-User-AK':_0x267754,...headers},'body':_0x3f89a6,'signal':_0x2c3989[_0x332bb6(0xfd)]}),_0x1a462f=await decodeResponseBody(_0x5ab75b);if(!_0x1a462f[_0x332bb6(0xbd)]){if(allowNotFound&&_0x5ab75b['status']===0x194)return undefined;throwIfRateLimited(_0x5ab75b,undefined,_0x1a462f['text']);throw CliErrors[_0x332bb6(0xc8)](_0x332bb6(0x12f)+_0x5ab75b[_0x332bb6(0x14f)]+')',_0x5ab75b[_0x332bb6(0x14f)]>=0x190?_0x332bb6(0x10b):undefined);}const _0xe6ebfd=_0x1a462f['data'];throwIfRateLimited(_0x5ab75b,_0xe6ebfd);if(allowNotFound&&isSkillHubNotFoundResponse(_0x5ab75b['status'],_0xe6ebfd))return undefined;const _0x98d461=!_0x5ab75b['ok']||_0xe6ebfd?.[_0x332bb6(0xf3)]===![]||typeof _0xe6ebfd?.[_0x332bb6(0x133)]==='number'&&_0xe6ebfd['code']>=0x190;if(_0x98d461)throw CliErrors[_0x332bb6(0xc8)](_0xe6ebfd?.['errorMsg']||_0xe6ebfd?.[_0x332bb6(0x13d)]||_0xe6ebfd?.[_0x332bb6(0x122)]||_0x332bb6(0x11b)+_0x5ab75b[_0x332bb6(0x14f)],_0xe6ebfd?.[_0x332bb6(0x134)]?_0x332bb6(0x112)+_0xe6ebfd[_0x332bb6(0x134)]:undefined);return _0xe6ebfd?.[_0x332bb6(0xea)]??_0xe6ebfd;}catch(_0x10333c){if(_0x10333c instanceof Error&&_0x10333c[_0x332bb6(0x11e)]===_0x332bb6(0x10d))throw CliErrors[_0x332bb6(0xc8)](_0x332bb6(0x14a)+_0x340d0d[_0x332bb6(0xc0)]());throw _0x10333c;}finally{clearTimeout(_0x38f53a);}}function isSkillHubNotFoundResponse(_0x2c1d56,_0x286ab0){const _0xe6fe21=a76_0x348a;if(_0x2c1d56===0x194||_0x286ab0?.['code']===0x194)return!![];if(_0x2c1d56!==0x190&&_0x286ab0?.['code']!==0x190)return![];const _0x3a45ae=[_0x286ab0?.[_0xe6fe21(0x122)],_0x286ab0?.[_0xe6fe21(0x13d)],_0x286ab0?.[_0xe6fe21(0x129)],_0x286ab0?.[_0xe6fe21(0x138)]][_0xe6fe21(0x13c)](_0x5803b0=>typeof _0x5803b0===_0xe6fe21(0xd8))['join']('\x20');return/skill not found\b/i[_0xe6fe21(0xca)](_0x3a45ae);}async function skillHubBinaryRequest(_0x2160e4,_0x297e63={}){const _0x4f6d5e=a76_0x348a,{query:_0x5abef6,headers:headers={},timeout:timeout=0x7530}=_0x297e63,_0x5ae00d=_activeAK;if(!_0x5ae00d)throw CliErrors[_0x4f6d5e(0xbc)](_0x4f6d5e(0xb4)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x57eb01=getSkillHubDomain()[_0x4f6d5e(0x102)](/\/$/,''),_0x14cdd5=new URL(_0x2160e4,_0x57eb01+'/');if(_0x5abef6)for(const [_0x11f3a1,_0x5e6638]of Object[_0x4f6d5e(0x136)](_0x5abef6)){_0x5e6638!==undefined&&_0x5e6638!==null&&_0x14cdd5[_0x4f6d5e(0xd6)][_0x4f6d5e(0x105)](_0x11f3a1,String(_0x5e6638));}const _0x13b758=new AbortController(),_0xa3559d=setTimeout(()=>_0x13b758['abort'](),timeout);try{const _0x4c9d3d=await fetch(_0x14cdd5[_0x4f6d5e(0xc0)](),{'method':'GET','headers':{'Accept':_0x4f6d5e(0xb9),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x5ae00d,...headers},'signal':_0x13b758['signal']});if(!_0x4c9d3d['ok']){const _0x2ef289=await decodeResponseBody(_0x4c9d3d),_0x3483b1=_0x2ef289[_0x4f6d5e(0xea)]&&typeof _0x2ef289[_0x4f6d5e(0xea)]===_0x4f6d5e(0xe8)?_0x2ef289[_0x4f6d5e(0xea)]:{},_0x5af3bf=firstString(_0x3483b1[_0x4f6d5e(0x129)],_0x3483b1[_0x4f6d5e(0x13d)],_0x3483b1['msg'],_0x3483b1[_0x4f6d5e(0x134)],_0x2ef289[_0x4f6d5e(0xef)]);throwIfRateLimited(_0x4c9d3d,_0x2ef289['data'],_0x5af3bf);throw CliErrors[_0x4f6d5e(0xc8)](_0x5af3bf||'SkillHub\x20API\x20error:\x20'+_0x4c9d3d[_0x4f6d5e(0x14f)],'Download\x20failed:\x20'+_0x14cdd5['toString']());}return Buffer['from'](await _0x4c9d3d['arrayBuffer']());}catch(_0x1a9194){if(_0x1a9194 instanceof Error&&_0x1a9194[_0x4f6d5e(0x11e)]===_0x4f6d5e(0x10d))throw CliErrors[_0x4f6d5e(0xc8)](_0x4f6d5e(0x14a)+_0x14cdd5[_0x4f6d5e(0xc0)]());throw _0x1a9194;}finally{clearTimeout(_0xa3559d);}}export async function getBffEndpointContract(_0x5b5d8c,_0x4a6b69){const _0x39a13b=a76_0x348a;if(_0x4a6b69==='functions')throw CliErrors[_0x39a13b(0x124)](_0x39a13b(0xed)+_0x5b5d8c+',\x20name='+_0x4a6b69);const _0x1f81c2=await apiRequest(_0x39a13b(0x116)+encodeURIComponent(_0x5b5d8c)+'/'+encodeURIComponent(_0x4a6b69)),_0x17c2ab=_0x1f81c2[_0x39a13b(0xea)];if(!_0x17c2ab||typeof _0x17c2ab!==_0x39a13b(0xe8)||Array[_0x39a13b(0x110)](_0x17c2ab)||_0x17c2ab[_0x39a13b(0x140)]!==_0x5b5d8c||_0x17c2ab[_0x39a13b(0x144)]!==_0x4a6b69)throw CliErrors[_0x39a13b(0x124)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x5b5d8c+_0x39a13b(0x149)+_0x4a6b69);return{'appCode':_0x17c2ab[_0x39a13b(0x140)],'functionName':_0x17c2ab[_0x39a13b(0x144)],'description':_0x17c2ab[_0x39a13b(0xbf)],'version':_0x17c2ab[_0x39a13b(0x113)],'gmtModified':_0x17c2ab[_0x39a13b(0x14d)]};}export async function getSqlQueryInfo(_0x1ac951,_0x515cb8){const _0x4934d8=a76_0x348a,_0x4f889b=await apiRequest(_0x4934d8(0xba),{'method':'POST','body':{'appCode':_0x1ac951,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x515cb8}}),_0x68dc8=_0x4f889b[_0x4934d8(0xea)],_0x1032b6=_0x68dc8&&typeof _0x68dc8===_0x4934d8(0xe8)&&_0x4934d8(0x11a)in _0x68dc8?_0x68dc8[_0x4934d8(0x11a)]?.[0x0]:_0x68dc8&&typeof _0x68dc8===_0x4934d8(0xe8)&&'sqlCode'in _0x68dc8?_0x68dc8:undefined;if(!_0x1032b6)throw CliErrors[_0x4934d8(0x124)](_0x4934d8(0x120)+_0x515cb8);return _0x1032b6;}function isRemoteAppItem(_0x16cf66){const _0xcf7fcf=a76_0x348a;return!!_0x16cf66&&typeof _0x16cf66===_0xcf7fcf(0xe8)&&typeof _0x16cf66[_0xcf7fcf(0x140)]===_0xcf7fcf(0xd8)&&typeof _0x16cf66[_0xcf7fcf(0xe7)]===_0xcf7fcf(0xd8);}function extractRemoteAppItems(_0x2d5598){const _0x287582=a76_0x348a;if(Array[_0x287582(0x110)](_0x2d5598))return _0x2d5598['filter'](isRemoteAppItem);if(!_0x2d5598||typeof _0x2d5598!==_0x287582(0xe8))throw CliErrors[_0x287582(0xc8)](_0x287582(0xe9));const _0x358307=_0x2d5598;if(Array[_0x287582(0x110)](_0x358307[_0x287582(0x11a)]))return _0x358307[_0x287582(0x11a)][_0x287582(0x13c)](isRemoteAppItem);if(_0x358307['data']&&typeof _0x358307[_0x287582(0xea)]===_0x287582(0xe8)){const _0x281e2f=_0x358307[_0x287582(0xea)];if(Array['isArray'](_0x281e2f[_0x287582(0x11a)]))return _0x281e2f[_0x287582(0x11a)][_0x287582(0x13c)](isRemoteAppItem);}throw CliErrors[_0x287582(0xc8)](_0x287582(0x12a));}export async function getMyApps(){const _0x48533b=a76_0x348a,_0x3975e8=await apiRequest(_0x48533b(0xd7));return extractRemoteAppItems(_0x3975e8[_0x48533b(0xea)]);}export async function getLoginUserInfo(){const _0x575bdd=a76_0x348a,_0x437100=await apiRequest(_0x575bdd(0x126));if(!_0x437100['data']||typeof _0x437100['data']!=='object'||Array[_0x575bdd(0x110)](_0x437100[_0x575bdd(0xea)]))throw CliErrors[_0x575bdd(0xc8)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x437100[_0x575bdd(0xea)];}function runtimeSchedulePath(_0x3de173,_0x1b57a1=''){const _0x2a0b5e=a76_0x348a;return'/api/harness/apps/'+encodeURIComponent(_0x3de173)+_0x2a0b5e(0xc5)+_0x1b57a1;}export async function validateRuntimeSchedule(_0x1b1a08,_0x1ae5e1){const _0x54700a=a76_0x348a,_0x46377b=await apiRequest(runtimeSchedulePath(_0x1b1a08,_0x54700a(0xf4)),{'method':'POST','body':_0x1ae5e1});return _0x46377b['data'];}export async function createRuntimeSchedule(_0x8f60f0,_0x99a3c3){const _0x6e4434=a76_0x348a,_0x2f522c=await apiRequest(runtimeSchedulePath(_0x8f60f0),{'method':_0x6e4434(0x123),'body':_0x99a3c3});return _0x2f522c['data'];}export async function listRuntimeSchedules(_0x556617,_0x251345={}){const _0x26bde4=a76_0x348a,_0x33d762=new URLSearchParams();if(_0x251345[_0x26bde4(0x12e)]!==undefined)_0x33d762[_0x26bde4(0x105)](_0x26bde4(0x12e),String(_0x251345[_0x26bde4(0x12e)]));if(_0x251345[_0x26bde4(0x100)])_0x33d762[_0x26bde4(0x105)](_0x26bde4(0x100),_0x251345[_0x26bde4(0x100)]);const _0x25c55d=_0x33d762[_0x26bde4(0x13f)]>0x0?'?'+_0x33d762[_0x26bde4(0xc0)]():'',_0x2c26c2=await apiRequest(''+runtimeSchedulePath(_0x556617)+_0x25c55d);return _0x2c26c2['data'];}export async function getRuntimeSchedule(_0x1bfea1,_0x503df9){const _0x1440c8=a76_0x348a,_0xba976f=await apiRequest(runtimeSchedulePath(_0x1bfea1,'/'+encodeURIComponent(_0x503df9)));return _0xba976f[_0x1440c8(0xea)];}export async function deleteRuntimeSchedule(_0x51aa55,_0x2772bc){const _0x3d6ead=a76_0x348a,_0x4d4d8b=await apiRequest(runtimeSchedulePath(_0x51aa55,'/'+encodeURIComponent(_0x2772bc)),{'method':'DELETE'});return _0x4d4d8b[_0x3d6ead(0xea)];}export async function runRuntimeSchedule(_0x29ff6b,_0x594ae5){const _0x32f233=a76_0x348a,_0x26e8d7=await apiRequest(runtimeSchedulePath(_0x29ff6b,'/'+encodeURIComponent(_0x594ae5)+_0x32f233(0xb6)),{'method':_0x32f233(0x123)});return _0x26e8d7[_0x32f233(0xea)];}export async function listDatasets(_0xc89535,_0x48a978){const _0x4c45c9=a76_0x348a,_0x3854c8=await apiRequest(_0x4c45c9(0xf5),{'method':_0x4c45c9(0x123),'body':{'appCode':_0xc89535,..._0x48a978?.[_0x4c45c9(0x133)]&&{'code':_0x48a978['code']},..._0x48a978?.[_0x4c45c9(0x11e)]&&{'name':_0x48a978[_0x4c45c9(0x11e)]}}});return extractList(_0x3854c8[_0x4c45c9(0xea)]);}export async function getDatasetDetail(_0x1a0e1e){const _0x3b79bc=a76_0x348a,_0x324c76=await apiRequest(_0x3b79bc(0x10c)+encodeURIComponent(_0x1a0e1e));return _0x324c76[_0x3b79bc(0xea)];}export async function getDatasetSdkUsageDoc(_0x428edc,_0x22e08f){const _0x17a54a=a76_0x348a,_0x1240fd=await toolboxRequest('api-doc-generator',{'datasetCode':_0x428edc,'appCode':_0x22e08f});return typeof _0x1240fd?.[_0x17a54a(0xfa)]===_0x17a54a(0xd8)?_0x1240fd[_0x17a54a(0xfa)]:'';}export async function uploadRuntimeFile(_0x45f202,_0x22740d){const _0x17a372=a76_0x348a,_0x4c8ba7=await readFile(_0x22740d),_0x3b848b=new FormData();_0x3b848b[_0x17a372(0x13b)]('appCode',_0x45f202),_0x3b848b[_0x17a372(0x13b)]('file',new Blob([new Uint8Array(_0x4c8ba7)]),basename(_0x22740d));const _0x1b7a20=await apiFormRequest(_0x17a372(0x11f),_0x3b848b);return _0x1b7a20[_0x17a372(0xea)];}export async function queryRuntimeFileUrl(_0x271978,_0x16a838={}){const _0x534a1c=a76_0x348a,_0x3bac6d=await apiRequest(_0x534a1c(0xdb),{'method':'POST','body':{'filePath':_0x271978,'downloadFlag':_0x16a838[_0x534a1c(0x14c)]??![],..._0x16a838[_0x534a1c(0xf6)]?{'longTerm':!![]}:{}}});return _0x3bac6d[_0x534a1c(0xea)];}export async function recognizeRuntimeOcr(_0x38e077,_0x734268){const _0x8bf6d6=a76_0x348a,_0x584d0c=await apiRequest(_0x8bf6d6(0xff),{'method':_0x8bf6d6(0x123),'body':{'appCode':_0x38e077,'url':_0x734268[_0x8bf6d6(0x146)],'type':_0x734268[_0x8bf6d6(0xf7)]}});return _0x584d0c[_0x8bf6d6(0xea)];}export async function getRuntimeAppConfigByKey(_0x2ccbd4,_0x2a1bb0){const _0x16e522=a76_0x348a,_0x5d1b63=new URLSearchParams({'appCode':_0x2ccbd4,'key':_0x2a1bb0}),_0x3759fc=await apiRequest('/client/app-config/getByKey?'+_0x5d1b63[_0x16e522(0xc0)]());if(typeof _0x3759fc[_0x16e522(0xea)]!==_0x16e522(0xd8))throw CliErrors[_0x16e522(0x124)](_0x16e522(0x111)+_0x2a1bb0);return _0x3759fc[_0x16e522(0xea)];}export async function listRuntimeArtifacts(_0x4ff1ec,_0xd11178){const _0xc539f6=a76_0x348a,_0x4cad2d=new URLSearchParams({'appCode':_0x4ff1ec});if(_0xd11178?.[_0xc539f6(0x10f)])_0x4cad2d[_0xc539f6(0x105)]('artifactType',_0xd11178['artifactType']);if(_0xd11178?.['source'])_0x4cad2d[_0xc539f6(0x105)](_0xc539f6(0x132),_0xd11178[_0xc539f6(0x132)]);if(_0xd11178?.[_0xc539f6(0xce)]!==undefined)_0x4cad2d['set'](_0xc539f6(0xce),String(_0xd11178['favorite']));const _0x20f9e0=await apiRequest(_0xc539f6(0x10e)+_0x4cad2d[_0xc539f6(0xc0)]());return Array['isArray'](_0x20f9e0[_0xc539f6(0xea)])?_0x20f9e0[_0xc539f6(0xea)]:[];}export async function getRuntimeArtifact(_0x2e020b,_0x1f1670){const _0x3e939d=a76_0x348a,_0x300610=await apiRequest(_0x3e939d(0xde)+_0x2e020b+_0x3e939d(0x145)+encodeURIComponent(_0x1f1670));if(!_0x300610['data'])throw CliErrors['validation'](_0x3e939d(0x12b)+_0x2e020b);return _0x300610['data'];}export async function createRuntimeArtifact(_0x11ae8c,_0x2cb669){const _0x546758=a76_0x348a,_0x4ad341=await apiRequest('/client/artifact/create',{'method':'POST','body':{'appCode':_0x11ae8c,..._0x2cb669}});return _0x4ad341[_0x546758(0xea)];}export async function updateRuntimeArtifact(_0x5cb3a9,_0xd95cd9,_0x499bad){const _0x2ffb7f=a76_0x348a,_0xe4499=await apiRequest(_0x2ffb7f(0xde)+_0x5cb3a9+_0x2ffb7f(0xe2),{'method':'POST','body':{'appCode':_0xd95cd9,..._0x499bad}});return _0xe4499[_0x2ffb7f(0xea)];}export async function listPersonalBffs(_0x2cd13e){const _0x580096=a76_0x348a,_0x58408b=await apiRequest(_0x580096(0x104)+encodeURIComponent(_0x2cd13e));return Array[_0x580096(0x110)](_0x58408b[_0x580096(0xea)])?_0x58408b[_0x580096(0xea)]:[];}export async function getPersonalBff(_0x59edce,_0x17e909){const _0x1b85b9=a76_0x348a,_0x4e543a=await apiRequest(_0x1b85b9(0x130)+_0x59edce+_0x1b85b9(0x145)+encodeURIComponent(_0x17e909));if(!_0x4e543a[_0x1b85b9(0xea)])throw CliErrors[_0x1b85b9(0x124)](_0x1b85b9(0xc3)+_0x59edce);return _0x4e543a['data'];}export async function createPersonalBff(_0x2725d1,_0x12dabf){const _0x4791fd=a76_0x348a,_0xc29333=await apiRequest(_0x4791fd(0xcd),{'method':'POST','body':{'appCode':_0x2725d1,..._0x12dabf}});return _0xc29333[_0x4791fd(0xea)];}export async function updatePersonalBff(_0x463cf2,_0x35dfdd,_0x411fc5){const _0x58a638=a76_0x348a,_0x17a05a=await apiRequest(_0x58a638(0x130)+_0x463cf2+_0x58a638(0xe2),{'method':_0x58a638(0x123),'body':{'appCode':_0x35dfdd,..._0x411fc5}});return _0x17a05a[_0x58a638(0xea)];}export async function executePersonalBff(_0x54ba65,_0x1dfd76,_0x1f4180){const _0x495743=a76_0x348a,_0x40073a=await apiRequest(_0x495743(0x130)+_0x54ba65+_0x495743(0x119)+encodeURIComponent(_0x1dfd76),{'method':_0x495743(0x123),'body':_0x1f4180});return _0x40073a['data'];}export async function listPersonalKnowledgeBaseItems(_0x445a77){const _0x149c8a=a76_0x348a,_0x837a51=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x445a77));return Array[_0x149c8a(0x110)](_0x837a51[_0x149c8a(0xea)])?_0x837a51['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x34c7cb,_0x51f589){const _0x489c46=a76_0x348a,_0xaaf16=await apiRequest('/client/knowledge-base/personal/'+_0x34c7cb+'?appCode='+encodeURIComponent(_0x51f589));if(!_0xaaf16['data'])throw CliErrors[_0x489c46(0x124)](_0x489c46(0xe1)+_0x34c7cb);return _0xaaf16['data'];}export async function createPersonalKnowledgeBaseItem(_0x24a505,_0x42fe71){const _0x15aab6=a76_0x348a,_0xa1d67a=await apiRequest(_0x15aab6(0x114),{'method':_0x15aab6(0x123),'body':{'appCode':_0x24a505,..._0x42fe71}});return _0xa1d67a[_0x15aab6(0xea)];}export async function updatePersonalKnowledgeBaseItem(_0x37aa51,_0x41c9a5,_0x14153e){const _0x5a8d9d=a76_0x348a,_0x305e9d=await apiRequest(_0x5a8d9d(0x109)+_0x37aa51+_0x5a8d9d(0xe2),{'method':_0x5a8d9d(0x123),'body':{'appCode':_0x41c9a5,..._0x14153e}});return _0x305e9d['data'];}export async function searchKnowledgeBase(_0xd1351c,_0x842e48){const _0x112a90=a76_0x348a,_0x108aaa=await apiRequest('/client/knowledge-base/search',{'method':_0x112a90(0x123),'body':{'appCode':_0xd1351c,'query':_0x842e48[_0x112a90(0xe4)],..._0x842e48[_0x112a90(0xb7)]!==undefined?{'topK':_0x842e48['topK']}:{}}});return Array['isArray'](_0x108aaa['data'])?_0x108aaa[_0x112a90(0xea)]:[];}export async function getRuntimeSkillByCode(_0x3a1f82,_0x376894){const _0x17b8e4=a76_0x348a,_0x1ee45e=await skillHubJsonRequest(_0x17b8e4(0x117)+encodeURIComponent(_0x3a1f82)+'/'+encodeURIComponent(_0x376894),{'allowNotFound':!![]});return _0x1ee45e?skillHubRuntimeDetailToRuntimeSkill(_0x1ee45e):undefined;}export async function listRuntimeSkills(_0x18fa91){const _0x541833=a76_0x348a,_0x25ac76=await skillHubJsonRequest(_0x541833(0x107)+encodeURIComponent(_0x18fa91[_0x541833(0x140)])+'/skills',{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x18fa91['appCode'],_0x25ac76,_0x18fa91[_0x541833(0x147)]??'all',_0x18fa91[_0x541833(0x133)]);}export async function listPersonalRuntimeSkills(_0x221d52){const _0x1759da=a76_0x348a;return(await listRuntimeSkills({'appCode':_0x221d52,'scope':_0x1759da(0xe5)}))[_0x1759da(0xe5)];}export async function listCompanyRuntimeSkills(_0x2afa31){const _0x4ddc7e=a76_0x348a;return(await listRuntimeSkills({'appCode':_0x2afa31,'scope':_0x4ddc7e(0x108)}))[_0x4ddc7e(0x108)];}export async function listVisibleRuntimeSkills(_0x10e74d){const _0x452c08=a76_0x348a;return(await listRuntimeSkills({'appCode':_0x10e74d,'scope':_0x452c08(0xc7)}))['effective'];}export async function createPersonalRuntimeSkill(_0xc9026d,_0x2a4f21,_0x23d2fa={}){const _0x37f570=a76_0x348a;return publishRuntimeSkill(_0xc9026d,_0x2a4f21,{'visibility':_0x37f570(0xd0),'confirmWarnings':_0x23d2fa[_0x37f570(0x11d)]});}export async function updatePersonalRuntimeSkill(_0x2c186e,_0xd958a2,_0x4d6ec4,_0x2fb8e2={}){const _0x2cffb7=a76_0x348a;return publishRuntimeSkill(_0xd958a2,{..._0x4d6ec4,'skillCode':_0x4d6ec4['skillCode']??_0x2c186e},{'visibility':_0x2cffb7(0xd0),'confirmWarnings':_0x2fb8e2[_0x2cffb7(0x11d)]});}export async function publishCompanyRuntimeSkill(_0x1d88f7,_0x173a38,_0x7b5eb9={}){const _0x5507af=a76_0x348a;return publishRuntimeSkill(_0x1d88f7,_0x173a38,{'visibility':_0x5507af(0xbe),'confirmWarnings':_0x7b5eb9['confirmWarnings']});}export async function validateRuntimeSkillPublish(_0x6ad483,_0x313ccc,_0x27d9c6){const _0x270886=a76_0x348a,_0x105d73=buildRuntimeSkillPublishForm(_0x313ccc,_0x27d9c6[_0x270886(0xe6)]),_0x14b663=await skillHubJsonRequest(_0x270886(0x148)+encodeURIComponent(_0x6ad483)+'/publish/validate',{'method':_0x270886(0x123),'body':_0x105d73});return{'valid':_0x14b663[_0x270886(0xe3)]===!![],'errors':Array[_0x270886(0x110)](_0x14b663[_0x270886(0x121)])?_0x14b663['errors']:[],'warnings':Array[_0x270886(0x110)](_0x14b663[_0x270886(0xc4)])?_0x14b663['warnings']:[],'resolvedSlug':_0x14b663[_0x270886(0xd9)],'resolvedVersion':_0x14b663[_0x270886(0x12c)]};}export async function downloadRuntimeSkillPackage(_0x5f5573,_0x241e96,_0x3ed19c,_0x284a79){const _0x2c95ee=a76_0x348a;void _0x5f5573;const _0x44f6fa=_0x284a79?_0x2c95ee(0x148)+encodeURIComponent(_0x3ed19c)+'/'+encodeURIComponent(_0x241e96)+_0x2c95ee(0xd3)+encodeURIComponent(_0x284a79)+'/download':'/api/cli/v1/skills/'+encodeURIComponent(_0x3ed19c)+'/'+encodeURIComponent(_0x241e96)+_0x2c95ee(0xf9);return skillHubBinaryRequest(_0x44f6fa);}async function publishRuntimeSkill(_0x318463,_0x5e9f48,_0x15a785){const _0x1a023b=a76_0x348a,_0x50b635=buildRuntimeSkillPublishForm(_0x5e9f48,_0x15a785[_0x1a023b(0xe6)]),_0x454fc2=await skillHubJsonRequest(_0x1a023b(0x148)+encodeURIComponent(_0x318463)+_0x1a023b(0xdc),{'method':_0x1a023b(0x123),'query':{'confirmWarnings':_0x15a785[_0x1a023b(0x11d)]===!![]?!![]:undefined},'body':_0x50b635});return{'appCode':_0x454fc2[_0x1a023b(0x13e)]??_0x318463,'skillCode':_0x454fc2[_0x1a023b(0x137)]??_0x5e9f48[_0x1a023b(0xf0)]??'','skillName':_0x5e9f48[_0x1a023b(0xc2)]??_0x454fc2[_0x1a023b(0x137)]??_0x5e9f48[_0x1a023b(0xf0)],'description':_0x5e9f48[_0x1a023b(0xbf)],'scope':skillHubVisibilityToScope(_0x454fc2[_0x1a023b(0xe6)]??_0x15a785[_0x1a023b(0xe6)])??_0x1a023b(0xe5),'version':_0x454fc2['version']??_0x5e9f48[_0x1a023b(0x113)],'tags':_0x5e9f48[_0x1a023b(0xda)],'content':_0x5e9f48[_0x1a023b(0xdf)]};}function buildRuntimeSkillPublishForm(_0x453c2c,_0x2512d9){const _0x4f7d93=a76_0x348a,_0x50ab86=new FormData();return _0x50ab86[_0x4f7d93(0x105)](_0x4f7d93(0xd1),runtimeSkillPackageFile(_0x453c2c)),_0x453c2c[_0x4f7d93(0xc2)]?.[_0x4f7d93(0xd4)]()&&_0x50ab86['set'](_0x4f7d93(0x11c),_0x453c2c[_0x4f7d93(0xc2)][_0x4f7d93(0xd4)]()),_0x50ab86[_0x4f7d93(0x105)](_0x4f7d93(0xe6),_0x2512d9),_0x50ab86;}function a76_0x348a(_0x23f2cc,_0xb3bd53){_0x23f2cc=_0x23f2cc-0xb3;const _0x1c5e11=a76_0x1c5e();let _0x348ab8=_0x1c5e11[_0x23f2cc];return _0x348ab8;}function runtimeSkillPackageFile(_0x58b117){const _0x207db5=a76_0x348a;if(!_0x58b117[_0x207db5(0xc9)])throw CliErrors[_0x207db5(0x124)]('Missing\x20Skill\x20package\x20payload.');const _0x4fb919=Buffer[_0x207db5(0x135)](_0x58b117[_0x207db5(0xc9)],_0x207db5(0x13a)),_0x18fa26=new Blob([_0x4fb919],{'type':_0x207db5(0x131)}),_0x50c7ce=(_0x58b117[_0x207db5(0xf0)]||_0x207db5(0x10a))+'.zip';if(typeof File!=='undefined')return new File([_0x18fa26],_0x50c7ce,{'type':_0x207db5(0x131)});return _0x18fa26;}function normalizeSkillHubRuntimeListResponse(_0x4e9168,_0x5b8196,_0x31b135,_0x31f7a1){const _0xf20d33=a76_0x348a,_0x5769d1=Array[_0xf20d33(0x110)](_0x5b8196)?_0x5b8196:Array[_0xf20d33(0x110)](_0x5b8196?.[_0xf20d33(0x139)])?_0x5b8196[_0xf20d33(0x139)]:[],_0x427192=_0x31f7a1?.['trim'](),_0x32dd05=_0x5769d1[_0xf20d33(0x13c)](_0x2229ee=>!_0x427192||_0x2229ee[_0xf20d33(0x137)]===_0x427192)['map'](skillHubRuntimeItemToRuntimeSkill)[_0xf20d33(0x13c)](_0x1336fb=>Boolean(_0x1336fb)),_0x53b4e0=_0x32dd05[_0xf20d33(0x13c)](_0x39bb32=>_0x39bb32[_0xf20d33(0x147)]==='personal'),_0x2da9b1=_0x32dd05['filter'](_0x25bfe4=>_0x25bfe4[_0xf20d33(0x147)]===_0xf20d33(0x108));return{'appCode':_0x4e9168,'personal':_0x31b135===_0xf20d33(0x108)?[]:_0x53b4e0,'company':_0x31b135===_0xf20d33(0xe5)?[]:_0x2da9b1,'effective':buildEffectiveRuntimeSkills(_0x53b4e0,_0x2da9b1,_0x31b135)};}function skillHubRuntimeItemToRuntimeSkill(_0x181374){const _0x17dce6=a76_0x348a,_0x597f5d=_0x181374[_0x17dce6(0x137)]?.['trim'](),_0x4ede1e=skillHubVisibilityToScope(_0x181374['visibility']);if(!_0x597f5d||!_0x4ede1e)return undefined;return{'id':_0x181374['id'],'appCode':_0x181374[_0x17dce6(0x13e)],'skillCode':_0x597f5d,'skillName':_0x181374[_0x17dce6(0x11c)]??_0x597f5d,'description':_0x181374[_0x17dce6(0xdd)],'scope':_0x4ede1e,'version':skillHubRuntimeItemVersion(_0x181374),'status':_0x181374[_0x17dce6(0x14f)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x2f6235){const _0x404ca8=a76_0x348a,_0x44dd0a=_0x2f6235[_0x404ca8(0x137)]?.['trim']();if(!_0x44dd0a)return undefined;return{'id':_0x2f6235['id'],'appCode':_0x2f6235[_0x404ca8(0x13e)],'skillCode':_0x44dd0a,'skillName':_0x2f6235[_0x404ca8(0x11c)]??_0x44dd0a,'description':_0x2f6235[_0x404ca8(0xdd)],'example':_0x2f6235[_0x404ca8(0xbb)],'scope':skillHubVisibilityToScope(_0x2f6235[_0x404ca8(0xe6)])??_0x2f6235[_0x404ca8(0xe6)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x2f6235),'status':_0x2f6235[_0x404ca8(0x14f)]};}function skillHubVisibilityToScope(_0x3d61af){const _0x18c131=a76_0x348a;if(_0x3d61af==='PRIVATE')return _0x18c131(0xe5);if(_0x3d61af==='NAMESPACE_ONLY')return'company';return undefined;}function skillHubRuntimeItemVersion(_0x53923d){const _0x4f82d0=a76_0x348a;return _0x53923d['publishedVersion']?.['version']??_0x53923d['headlineVersion']?.['version']??_0x53923d[_0x4f82d0(0xee)]?.[_0x4f82d0(0x113)];}function buildEffectiveRuntimeSkills(_0x3478ff,_0x5d42cc,_0x5c1051){const _0x59a8fd=a76_0x348a;if(_0x5c1051===_0x59a8fd(0xe5))return _0x3478ff;if(_0x5c1051===_0x59a8fd(0x108))return _0x5d42cc;const _0x564678=new Map();for(const _0x5d0cf0 of _0x5d42cc){_0x564678[_0x59a8fd(0x105)](_0x5d0cf0[_0x59a8fd(0xf0)],_0x5d0cf0);}for(const _0x1e63a7 of _0x3478ff){_0x564678[_0x59a8fd(0x105)](_0x1e63a7[_0x59a8fd(0xf0)],_0x1e63a7);}return Array['from'](_0x564678[_0x59a8fd(0xf1)]());}function normalizeRuntimeSkillListResponse(_0x48a737,_0x20aac1){const _0x2f4485=a76_0x348a;if(Array[_0x2f4485(0x110)](_0x20aac1)){const _0xed7b18=_0x20aac1[_0x2f4485(0x13c)](_0x210a4d=>_0x210a4d[_0x2f4485(0x147)]===_0x2f4485(0xe5)),_0x56fe78=_0x20aac1[_0x2f4485(0x13c)](_0xa61f2=>_0xa61f2[_0x2f4485(0x147)]==='company');return{'appCode':_0x48a737,'personal':_0xed7b18,'company':_0x56fe78,'effective':[..._0x56fe78,..._0xed7b18]};}return{'appCode':_0x20aac1?.[_0x2f4485(0x140)]??_0x48a737,'personal':Array[_0x2f4485(0x110)](_0x20aac1?.[_0x2f4485(0xe5)])?_0x20aac1['personal']:[],'company':Array[_0x2f4485(0x110)](_0x20aac1?.[_0x2f4485(0x108)])?_0x20aac1[_0x2f4485(0x108)]:[],'effective':Array[_0x2f4485(0x110)](_0x20aac1?.['effective'])?_0x20aac1[_0x2f4485(0xec)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x55a170,_0x237200){const _0x2b7356=a77_0x218d,_0x441dd1=_0x55a170();while(!![]){try{const _0x58b8f9=-parseInt(_0x2b7356(0xff))/0x1+-parseInt(_0x2b7356(0xf5))/0x2+-parseInt(_0x2b7356(0xfe))/0x3*(-parseInt(_0x2b7356(0xf1))/0x4)+-parseInt(_0x2b7356(0xf8))/0x5*(parseInt(_0x2b7356(0xfc))/0x6)+parseInt(_0x2b7356(0xf0))/0x7*(parseInt(_0x2b7356(0xf6))/0x8)+parseInt(_0x2b7356(0xfa))/0x9*(parseInt(_0x2b7356(0xf9))/0xa)+parseInt(_0x2b7356(0xf2))/0xb*(parseInt(_0x2b7356(0x103))/0xc);if(_0x58b8f9===_0x237200)break;else _0x441dd1['push'](_0x441dd1['shift']());}catch(_0x47a3ea){_0x441dd1['push'](_0x441dd1['shift']());}}}(a77_0x3caf,0x7ae1d));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x51b7df){const _0x123f0a=a77_0x218d;if(cache['has'](_0x51b7df))return cache[_0x123f0a(0xf3)](_0x51b7df);const _0x896260=await listDatasets(_0x51b7df),_0x47ca9c=new Map();for(const _0x165593 of _0x896260){const _0x5630e3=_0x165593[_0x123f0a(0x100)];_0x5630e3?.[_0x123f0a(0x102)]!=null&&_0x47ca9c[_0x123f0a(0xf7)](_0x5630e3[_0x123f0a(0x102)],_0x5630e3[_0x123f0a(0x104)]??_0x123f0a(0xf4)+_0x5630e3[_0x123f0a(0x102)]);}const _0x504124=[..._0x47ca9c[_0x123f0a(0xfb)]()][_0x123f0a(0x101)](([_0x2595b8,_0x3868e7])=>({'dbId':_0x2595b8,'dbName':_0x3868e7}));return cache[_0x123f0a(0xf7)](_0x51b7df,_0x504124),_0x504124;}function a77_0x3caf(){const _0x82840d=['set','3401590jpzQLd','230kISGxc','115389VvyHsz','entries','6ZiKYPh','find','1029RRoust','211570CdSBGo','dbtableConfig','map','dbId','264QqrOnX','dbName','40124NvdUFw','6568LllsdJ','445544zaPNVx','get','db-','1510408xYRagQ','560PVDpjs'];a77_0x3caf=function(){return _0x82840d;};return a77_0x3caf();}function a77_0x218d(_0x49f124,_0x195cfc){_0x49f124=_0x49f124-0xf0;const _0x3caf1e=a77_0x3caf();let _0x218d73=_0x3caf1e[_0x49f124];return _0x218d73;}export async function getDbName(_0x40da2f,_0x36c9b3){const _0x12f03e=a77_0x218d;try{const _0x43ea9b=await listDatabases(_0x40da2f);return _0x43ea9b[_0x12f03e(0xfd)](_0x5c9b40=>_0x5c9b40[_0x12f03e(0x102)]===_0x36c9b3)?.[_0x12f03e(0x104)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x369bee,_0x40c748){const _0x2c4ced=a78_0x2552,_0x3fc911=_0x369bee();while(!![]){try{const _0x297883=-parseInt(_0x2c4ced(0x18e))/0x1*(-parseInt(_0x2c4ced(0x197))/0x2)+-parseInt(_0x2c4ced(0x19f))/0x3+-parseInt(_0x2c4ced(0x1b0))/0x4*(parseInt(_0x2c4ced(0x196))/0x5)+parseInt(_0x2c4ced(0x19d))/0x6+parseInt(_0x2c4ced(0x193))/0x7+-parseInt(_0x2c4ced(0x1b1))/0x8*(parseInt(_0x2c4ced(0x19a))/0x9)+-parseInt(_0x2c4ced(0x1ac))/0xa*(-parseInt(_0x2c4ced(0x19e))/0xb);if(_0x297883===_0x40c748)break;else _0x3fc911['push'](_0x3fc911['shift']());}catch(_0x3b7be2){_0x3fc911['push'](_0x3fc911['shift']());}}}(a78_0x2aa9,0xa8727));function a78_0x2aa9(){const _0x4c9272=['accessKey','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','dataset_','10234880nDrEJW','aggregate','\x22.\x20','column','785548HgfhHt','2699568mkTeVZ','validation','appCode','18ETbiYw','trim','models','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','update','8778763HVVIuh','string','batchCreate','35ZdGJWe','7516mKsnkY','isArray','field','27tqrjBe','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','map','1329294SFeAOT','22rumVWv','1539816xrbXxc','data\x20aggregate\x20--params.aggregate[','env','delete','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27\x20or\x20\x27{\x22id\x22:[1,2,3],\x22name\x22:\x22new\x22}\x27','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','invokeSource','object','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','getOne'];a78_0x2aa9=function(){return _0x4c9272;};return a78_0x2aa9();}import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';function a78_0x2552(_0x2c579a,_0x2e8b3a){_0x2c579a=_0x2c579a-0x18e;const _0x2aa90f=a78_0x2aa9();let _0x255256=_0x2aa90f[_0x2c579a];return _0x255256;}import{parseBatchCreateItemsFromParams}from'../utils/params.js';import{installLosslessJsonResponseParser}from'../utils/lossless-json.js';let _client,restoreResponseJsonParser;export function initSdkClient(_0x379c0c){const _0x3698e9=a78_0x2552;restoreResponseJsonParser??=installLosslessJsonResponseParser();try{_client=createClient({'appCode':_0x379c0c[_0x3698e9(0x1b3)],'env':_0x379c0c[_0x3698e9(0x1a1)],'authMode':_0x379c0c['authMode'],..._0x379c0c['accessKey']?{'accessKey':_0x379c0c[_0x3698e9(0x1a9)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x3698e9(0x1a5)]}}});}catch(_0xfed32d){clearSdkClient();throw _0xfed32d;}}export function clearSdkClient(){_client=undefined,restoreResponseJsonParser?.(),restoreResponseJsonParser=undefined;}function ensureClient(){const _0x3469f5=a78_0x2552;if(!_client)throw new Error(_0x3469f5(0x19b));return _client;}function normalizeAggregateParams(_0x5c3b52){const _0x4a94ca=a78_0x2552,_0x177802=_0x5c3b52['aggregate'];if(_0x177802===undefined)return _0x5c3b52;if(!Array[_0x4a94ca(0x198)](_0x177802))throw CliErrors[_0x4a94ca(0x1b2)]('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x5c3b52,'aggregate':_0x177802[_0x4a94ca(0x19c)]((_0xec478a,_0x1835ae)=>{const _0x25bdda=_0x4a94ca;if(!_0xec478a||typeof _0xec478a!==_0x25bdda(0x1a6)||Array[_0x25bdda(0x198)](_0xec478a))throw CliErrors['validation'](_0x25bdda(0x1a0)+_0x1835ae+']\x20must\x20be\x20an\x20object.');const _0x4c25f7=_0xec478a[_0x25bdda(0x1af)]??_0xec478a[_0x25bdda(0x199)];if(typeof _0x4c25f7!==_0x25bdda(0x194)||_0x4c25f7[_0x25bdda(0x18f)]()==='')throw CliErrors[_0x25bdda(0x1b2)](_0x25bdda(0x1a0)+_0x1835ae+']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.');const _0x1237dc={..._0xec478a,'column':_0x4c25f7};return delete _0x1237dc['field'],_0x1237dc;})};}export async function executeData(_0x402959,_0x183a4d,_0x50d1d5){const _0x325647=a78_0x2552,_0x18072a=ensureClient(),_0x1c5b03=_0x325647(0x1ab)+_0x402959,_0x559646=_0x18072a[_0x325647(0x190)][_0x1c5b03];if(!_0x559646||typeof _0x559646[_0x183a4d]!=='function')throw new Error(_0x325647(0x1aa)+_0x183a4d+_0x325647(0x1ae)+_0x325647(0x191));if(_0x183a4d===_0x325647(0x195))return _0x559646[_0x325647(0x195)](parseBatchCreateItemsFromParams(_0x50d1d5));const _0x3a80cb=_0x50d1d5!==undefined&&_0x50d1d5!==null&&!Array['isArray'](_0x50d1d5)?_0x50d1d5:{};switch(_0x183a4d){case _0x325647(0x1a8):{const _0x228269=_0x3a80cb['id'];if(_0x228269===undefined||_0x228269===null)throw new Error(_0x325647(0x1a7));return _0x559646[_0x325647(0x1a8)](_0x228269);}case _0x325647(0x192):{const {id:_0x18d118,..._0xd0b147}=_0x3a80cb;if(_0x18d118===undefined||_0x18d118===null)throw new Error(_0x325647(0x1a3));return _0x559646[_0x325647(0x192)](_0x18d118,_0xd0b147);}case _0x325647(0x1a2):{const _0x4044da=_0x3a80cb['id'];if(_0x4044da===undefined||_0x4044da===null)throw new Error(_0x325647(0x1a4));return _0x559646[_0x325647(0x1a2)](_0x4044da);}case'aggregate':return _0x559646[_0x325647(0x1ad)](normalizeAggregateParams(_0x3a80cb));default:return _0x559646[_0x183a4d](_0x3a80cb);}}export async function executeSdkSql(_0x41273d,_0xfc9c85){const _0xbe4d9a=ensureClient();return _0xbe4d9a['sql']['execute']({'sqlCode':_0x41273d,'params':_0xfc9c85});}export async function executeSdkBff(_0x47c2fd,_0x393a90){const _0x3408ce=ensureClient();return _0x3408ce['bff']['execute']({'scriptName':_0x47c2fd,'params':_0x393a90});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x552a3b=a79_0x53c1;(function(_0x57616d,_0x451776){const _0x501ae6=a79_0x53c1,_0x2e0782=_0x57616d();while(!![]){try{const _0x4d4e4c=parseInt(_0x501ae6(0xf1))/0x1*(-parseInt(_0x501ae6(0xe4))/0x2)+parseInt(_0x501ae6(0xe3))/0x3+-parseInt(_0x501ae6(0xf0))/0x4*(-parseInt(_0x501ae6(0xee))/0x5)+parseInt(_0x501ae6(0xf4))/0x6+-parseInt(_0x501ae6(0xe7))/0x7+parseInt(_0x501ae6(0xf2))/0x8*(-parseInt(_0x501ae6(0xed))/0x9)+-parseInt(_0x501ae6(0xe6))/0xa*(-parseInt(_0x501ae6(0xe5))/0xb);if(_0x4d4e4c===_0x451776)break;else _0x2e0782['push'](_0x2e0782['shift']());}catch(_0x5f5cbc){_0x2e0782['push'](_0x2e0782['shift']());}}}(a79_0x3807,0xdac25));import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a79_0x53c1(_0x198b6f,_0x5ecede){_0x198b6f=_0x198b6f-0xe3;const _0x380790=a79_0x3807();let _0x53c147=_0x380790[_0x198b6f];return _0x53c147;}import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a79_0x552a3b(0xeb)+PRODUCT_CONFIG[a79_0x552a3b(0xec)]+a79_0x552a3b(0xe8)+CLI_BIN_NAME+a79_0x552a3b(0xf3),'configMissingHint':a79_0x552a3b(0xe9)+PRODUCT_CONFIG[a79_0x552a3b(0xec)]+'.','notInProjectHint':a79_0x552a3b(0xea)+PRODUCT_CONFIG[a79_0x552a3b(0xec)]+a79_0x552a3b(0xef)});export const CliErrors={...baseCliErrors,'rateLimited':(_0x3ebcd3,_0x21637d)=>new CliError('rate_limited',0x2,_0x3ebcd3,_0x21637d)};function a79_0x3807(){const _0xc68097=['38579sxQknV','104UvvrcS','\x20auth\x20login`.','1880130StrRsn','1566795qrQcpp','2sQFYmZ','55RjYOpd','3360550gGPhaC','4427185GoYkVb','\x20or\x20run\x20`','Set\x20appcode\x20via\x20--appcode\x20or\x20','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','Configure\x20accessKey\x20in\x20','newConfigFileName','761517snzfcE','151145dGEowq','\x20file.','20MRPyJj'];a79_0x3807=function(){return _0xc68097;};return a79_0x3807();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17dc58,_0x4f86a3){var _0x4fcc0d=a80_0x13e3,_0x48b066=_0x17dc58();while(!![]){try{var _0x68f36=-parseInt(_0x4fcc0d(0x111))/0x1+parseInt(_0x4fcc0d(0x110))/0x2*(-parseInt(_0x4fcc0d(0x10f))/0x3)+-parseInt(_0x4fcc0d(0x109))/0x4+parseInt(_0x4fcc0d(0x10c))/0x5*(parseInt(_0x4fcc0d(0x10b))/0x6)+parseInt(_0x4fcc0d(0x10e))/0x7+parseInt(_0x4fcc0d(0x10a))/0x8+-parseInt(_0x4fcc0d(0x10d))/0x9;if(_0x68f36===_0x4f86a3)break;else _0x48b066['push'](_0x48b066['shift']());}catch(_0x5baa49){_0x48b066['push'](_0x48b066['shift']());}}}(a80_0x5164,0x3d165));function a80_0x13e3(_0x5a11f1,_0x2e4f7f){_0x5a11f1=_0x5a11f1-0x109;var _0x516424=a80_0x5164();var _0x13e3e7=_0x516424[_0x5a11f1];return _0x13e3e7;}function a80_0x5164(){var _0x4813e6=['20XKkIjn','67860PdZOEh','3157140CGPPdo','906JYfaKd','1902kOZyBL','104345HVSRIL','1277804kqGsdA','3300184BuKJYy','157812urDCMB'];a80_0x5164=function(){return _0x4813e6;};return a80_0x5164();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a80_0x3d28a0}from'@lovrabet/cli-framework';export function buildAllFlags(_0x452b81){return a80_0x3d28a0(_0x452b81,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a81_0x1a79(){const _0x7e75df=['258FqaSmp','1841cTTzLb','6528zUDiCZ','1285446muNSpk','968ntGbUq','body','1964mSWSbb','description','4137195lOxicG','12490090AIpwrH','5757YBZojT','7203492vbYgBS'];a81_0x1a79=function(){return _0x7e75df;};return a81_0x1a79();}function a81_0x341b(_0x208240,_0x2f602c){_0x208240=_0x208240-0xff;const _0x1a79ae=a81_0x1a79();let _0x341b01=_0x1a79ae[_0x208240];return _0x341b01;}(function(_0x1ff17b,_0x4d9ae8){const _0x103e5e=a81_0x341b,_0x317597=_0x1ff17b();while(!![]){try{const _0x45b364=parseInt(_0x103e5e(0x105))/0x1*(parseInt(_0x103e5e(0x103))/0x2)+-parseInt(_0x103e5e(0x101))/0x3*(parseInt(_0x103e5e(0x109))/0x4)+parseInt(_0x103e5e(0xff))/0x5+parseInt(_0x103e5e(0x106))/0x6+-parseInt(_0x103e5e(0x104))/0x7*(-parseInt(_0x103e5e(0x107))/0x8)+parseInt(_0x103e5e(0x102))/0x9+-parseInt(_0x103e5e(0x100))/0xa;if(_0x45b364===_0x4d9ae8)break;else _0x317597['push'](_0x317597['shift']());}catch(_0x291237){_0x317597['push'](_0x317597['shift']());}}}(a81_0x1a79,0x801dd));export function dryRun(_0x47f2ff,_0x4e7ec8){const _0x263e7e={'method':_0x47f2ff,'url':_0x4e7ec8},_0x54b97d={'body'(_0x4f4519){const _0x43490c=a81_0x341b;return _0x263e7e[_0x43490c(0x108)]=_0x4f4519,_0x54b97d;},'description'(_0x13128e){const _0x173304=a81_0x341b;return _0x263e7e[_0x173304(0x10a)]=_0x13128e,_0x54b97d;},'build'(){return{..._0x263e7e};}};return _0x54b97d;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a82_0x21fa(_0x2b1a09,_0x39725d){_0x2b1a09=_0x2b1a09-0x74;const _0x238c73=a82_0x238c();let _0x21fab7=_0x238c73[_0x2b1a09];return _0x21fab7;}const a82_0x3eeb88=a82_0x21fa;(function(_0x4fb458,_0x21285e){const _0x569347=a82_0x21fa,_0xdbb4d1=_0x4fb458();while(!![]){try{const _0x3a067f=-parseInt(_0x569347(0x7c))/0x1+parseInt(_0x569347(0x74))/0x2*(parseInt(_0x569347(0x7e))/0x3)+parseInt(_0x569347(0x77))/0x4+-parseInt(_0x569347(0x7a))/0x5*(parseInt(_0x569347(0x7b))/0x6)+-parseInt(_0x569347(0x7f))/0x7+parseInt(_0x569347(0x7d))/0x8*(parseInt(_0x569347(0x78))/0x9)+-parseInt(_0x569347(0x76))/0xa*(-parseInt(_0x569347(0x75))/0xb);if(_0x3a067f===_0x21285e)break;else _0xdbb4d1['push'](_0xdbb4d1['shift']());}catch(_0x58b2fb){_0xdbb4d1['push'](_0xdbb4d1['shift']());}}}(a82_0x238c,0x95d14));import{createFlagHelpers}from'@lovrabet/cli-framework';function a82_0x238c(){const _0x1ece9f=['743034rXlUeV','8xHgYpR','3454419WXxLRU','864381Jgmmot','parseFlags','2SJQBrS','9889aoPyJL','530VqLcQU','701964vLzXpp','1807596tXqbZJ','validateFlags','10yJiEPx','285858hjKOld'];a82_0x238c=function(){return _0x1ece9f;};return a82_0x238c();}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a82_0x3eeb88(0x80)];export const validateFlags=helpers[a82_0x3eeb88(0x79)];
|