@lovrabet/lovrabet-cli 2.3.8-beta.1 → 2.3.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/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/approval/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/init.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +32 -6
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.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/diagram.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.d.ts +2 -4
- 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/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.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/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +20 -340
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.d.ts +7 -10
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.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/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.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/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.d.ts +2 -0
- package/lib/utils/runtime-user-id.js +1 -0
- 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 +2 -2
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet/guides/role-and-permission-workflow.md +3 -2
- package/skills/lovrabet.manifest.json +3 -3
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a92_0x4e1bc7=a92_0x5d2a;(function(_0x5d6897,_0x2b5409){const _0x5e00dc=a92_0x5d2a,_0x2f47d5=_0x5d6897();while(!![]){try{const _0x219aa3=parseInt(_0x5e00dc(0x113))/0x1+parseInt(_0x5e00dc(0x112))/0x2*(-parseInt(_0x5e00dc(0x111))/0x3)+parseInt(_0x5e00dc(0x10e))/0x4+parseInt(_0x5e00dc(0x119))/0x5+-parseInt(_0x5e00dc(0x114))/0x6*(parseInt(_0x5e00dc(0x11a))/0x7)+-parseInt(_0x5e00dc(0x115))/0x8*(-parseInt(_0x5e00dc(0x110))/0x9)+parseInt(_0x5e00dc(0x10d))/0xa*(-parseInt(_0x5e00dc(0x118))/0xb);if(_0x219aa3===_0x2b5409)break;else _0x2f47d5['push'](_0x2f47d5['shift']());}catch(_0x1568c5){_0x2f47d5['push'](_0x2f47d5['shift']());}}}(a92_0x14a8,0xc9c1e));export const APP_PUBLISH_STATUS={'Published':a92_0x4e1bc7(0x116),'Unpublished':a92_0x4e1bc7(0x10f)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a92_0x4e1bc7(0x117)];function a92_0x5d2a(_0x397d26,_0x30ed98){_0x397d26=_0x397d26-0x10d;const _0x14a88c=a92_0x14a8();let _0x5d2af3=_0x14a88c[_0x397d26];return _0x5d2af3;}function a92_0x14a8(){const _0x2715e3=['PUBLISHED','Published','374YZoDYZ','8027010FOHZBB','6314sHefbI','278590hyNQnp','5867292PyzHEP','UNPUBLISH','207GqhphS','4876329NtWjBH','2yatIGO','102339BlRohJ','4302cesluh','303032aMYobU'];a92_0x14a8=function(){return _0x2715e3;};return a92_0x14a8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a93_0x4275(){const _0xe21a6c=['121nLqRAd','3HPWwAC','217bjAAYB','66776LMXkSg','120xDQWAc','40120uTcVxX','187412USnrVo','238010JIMiUH','153594lIQktH','client-ak','800022pgCRKO','1674711rieBns'];a93_0x4275=function(){return _0xe21a6c;};return a93_0x4275();}function a93_0x5c13(_0x3dbdac,_0x3633fe){_0x3dbdac=_0x3dbdac-0x11a;const _0x4275dc=a93_0x4275();let _0x5c13f0=_0x4275dc[_0x3dbdac];return _0x5c13f0;}const a93_0x1ea72a=a93_0x5c13;(function(_0x434c1d,_0x566605){const _0x43d174=a93_0x5c13,_0x5c9185=_0x434c1d();while(!![]){try{const _0x2dee7f=parseInt(_0x43d174(0x125))/0x1+parseInt(_0x43d174(0x123))/0x2*(-parseInt(_0x43d174(0x11e))/0x3)+parseInt(_0x43d174(0x121))/0x4*(-parseInt(_0x43d174(0x122))/0x5)+parseInt(_0x43d174(0x11b))/0x6+-parseInt(_0x43d174(0x11f))/0x7*(parseInt(_0x43d174(0x120))/0x8)+parseInt(_0x43d174(0x11c))/0x9+parseInt(_0x43d174(0x124))/0xa*(parseInt(_0x43d174(0x11d))/0xb);if(_0x2dee7f===_0x566605)break;else _0x5c9185['push'](_0x5c9185['shift']());}catch(_0x1e413d){_0x5c9185['push'](_0x5c9185['shift']());}}}(a93_0x4275,0x22946));export const AUTH_MODE={'ClientAk':a93_0x1ea72a(0x11a)};export function isAuthMode(_0x14694b){return _0x14694b===AUTH_MODE['ClientAk'];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x492ce6=a94_0x2426;(function(_0x4c449e,_0x2b391f){const _0x4ffc4f=a94_0x2426,_0x57cc24=_0x4c449e();while(!![]){try{const _0x5b65af=-parseInt(_0x4ffc4f(0x15f))/0x1*(-parseInt(_0x4ffc4f(0x172))/0x2)+-parseInt(_0x4ffc4f(0x17d))/0x3+parseInt(_0x4ffc4f(0x168))/0x4*(parseInt(_0x4ffc4f(0x169))/0x5)+-parseInt(_0x4ffc4f(0x176))/0x6*(parseInt(_0x4ffc4f(0x15c))/0x7)+-parseInt(_0x4ffc4f(0x16e))/0x8+parseInt(_0x4ffc4f(0x15b))/0x9+parseInt(_0x4ffc4f(0x158))/0xa;if(_0x5b65af===_0x2b391f)break;else _0x57cc24['push'](_0x57cc24['shift']());}catch(_0x4c752d){_0x57cc24['push'](_0x57cc24['shift']());}}}(a94_0x5d3d,0xf0a2e));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a94_0x2426(_0x27ea2d,_0x2cdc7b){_0x27ea2d=_0x27ea2d-0x151;const _0x5d3d29=a94_0x5d3d();let _0x242640=_0x5d3d29[_0x27ea2d];return _0x242640;}export const CLI_BIN_NAME=PRODUCT_CONFIG[a94_0x492ce6(0x160)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a94_0x492ce6(0x167)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a94_0x492ce6(0x161),'meowKey':a94_0x492ce6(0x161),'type':a94_0x492ce6(0x170),'description':'Override\x20appcode','hint':a94_0x492ce6(0x153)},{'name':a94_0x492ce6(0x178),'meowKey':a94_0x492ce6(0x178),'type':a94_0x492ce6(0x170),'description':a94_0x492ce6(0x154),'hint':a94_0x492ce6(0x155)},{'name':'env','meowKey':a94_0x492ce6(0x15d),'type':a94_0x492ce6(0x170),'description':'Environment','hint':a94_0x492ce6(0x162)},{'name':a94_0x492ce6(0x16c),'meowKey':a94_0x492ce6(0x16c),'type':a94_0x492ce6(0x170),'description':a94_0x492ce6(0x157),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a94_0x492ce6(0x170),'description':a94_0x492ce6(0x16a),'hint':a94_0x492ce6(0x17c)},{'name':a94_0x492ce6(0x163),'meowKey':a94_0x492ce6(0x166),'type':a94_0x492ce6(0x15e),'description':'Preview\x20operation\x20without\x20executing'},{'name':a94_0x492ce6(0x17e),'meowKey':a94_0x492ce6(0x17e),'type':a94_0x492ce6(0x15e),'description':a94_0x492ce6(0x173)},{'name':a94_0x492ce6(0x177),'meowKey':a94_0x492ce6(0x175),'type':a94_0x492ce6(0x15e),'description':a94_0x492ce6(0x171)},{'name':a94_0x492ce6(0x16b),'meowKey':a94_0x492ce6(0x16b),'type':'boolean','description':a94_0x492ce6(0x152)},{'name':'ci','meowKey':'ci','type':a94_0x492ce6(0x15e),'description':a94_0x492ce6(0x165),'hidden':!![]},{'name':a94_0x492ce6(0x15a),'meowKey':a94_0x492ce6(0x15a),'type':a94_0x492ce6(0x15e),'description':a94_0x492ce6(0x16f)},{'name':'id','meowKey':'id','type':a94_0x492ce6(0x170),'description':a94_0x492ce6(0x17b),'hidden':!![]},{'name':'name','meowKey':a94_0x492ce6(0x159),'type':'string','description':a94_0x492ce6(0x179),'hidden':!![]},{'name':'sqlcode','meowKey':a94_0x492ce6(0x174),'type':a94_0x492ce6(0x170),'description':a94_0x492ce6(0x17f),'hidden':!![]},{'name':'params','meowKey':'params','type':a94_0x492ce6(0x170),'description':a94_0x492ce6(0x180),'hidden':!![]},{'name':a94_0x492ce6(0x17a),'meowKey':a94_0x492ce6(0x17a),'type':a94_0x492ce6(0x15e),'description':'Verbose\x20output','hidden':!![]},{'name':a94_0x492ce6(0x164),'meowKey':a94_0x492ce6(0x164),'type':a94_0x492ce6(0x15e),'description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a94_0x492ce6(0x178),'env',a94_0x492ce6(0x16c),'jq',a94_0x492ce6(0x163),'yes',a94_0x492ce6(0x177),'ci']);function a94_0x5d3d(){const _0x5e6e74=['Alias\x20for\x20--non-interactive','dryRun','cliDisplayName','613720WkdNyo','40qGOcnq','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','global','format','meowKey','6968688OiWdpu','Show\x20help','string','Force\x20non-interactive\x20mode\x20(CI)','8vJWYAP','Skip\x20confirmation\x20for\x20high-risk\x20writes','sqlcode','nonInteractive','6uldXJT','non-interactive','app','Name\x20filter','verbose','Record\x20ID','<expr>','2623878naFPaa','yes','SQL\x20query\x20code','JSON\x20params\x20for\x20execute\x20commands','fromEntries','Use\x20global\x20config\x20scope','<code>','Select\x20app\x20profile\x20by\x20name','<name>','map','Output\x20format','4670600mUXCoR','name','help','11483667AaSPpr','5625515wcEyNp','env','boolean','141135yOmpol','cliBinName','appcode','production\x20|\x20development\x20|\x20daily','dry-run','clear'];a94_0x5d3d=function(){return _0x5e6e74;};return a94_0x5d3d();}export function buildMeowFlags(){const _0x1895f3=a94_0x492ce6;return Object[_0x1895f3(0x151)](GLOBAL_FLAGS[_0x1895f3(0x156)](_0x521024=>[_0x521024[_0x1895f3(0x16d)],{'type':_0x521024['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a95_0x2415d3=a95_0x6b84;(function(_0x10345f,_0x4817a0){const _0x2633e9=a95_0x6b84,_0x2dfd51=_0x10345f();while(!![]){try{const _0x4fc869=parseInt(_0x2633e9(0x1f2))/0x1*(parseInt(_0x2633e9(0x1e7))/0x2)+parseInt(_0x2633e9(0x1f0))/0x3+-parseInt(_0x2633e9(0x1f5))/0x4+-parseInt(_0x2633e9(0x1f1))/0x5*(-parseInt(_0x2633e9(0x1f3))/0x6)+-parseInt(_0x2633e9(0x1ec))/0x7*(-parseInt(_0x2633e9(0x1e8))/0x8)+parseInt(_0x2633e9(0x1eb))/0x9+-parseInt(_0x2633e9(0x1ef))/0xa;if(_0x4fc869===_0x4817a0)break;else _0x2dfd51['push'](_0x2dfd51['shift']());}catch(_0x4ac70a){_0x2dfd51['push'](_0x2dfd51['shift']());}}}(a95_0x21cd,0x9aa3a));export const DEFAULT_APP_PROFILE_NAME=a95_0x2415d3(0x1e9);function a95_0x21cd(){const _0x554540=['12CVwxaF','compress','4346820rqznJj','482GUvRPN','8FHrPBs','main','production','9416871TuldkI','2905399ZvoTyg','en-US','write','16296660txUpti','1409055eYFroD','827095HJXlok','4514TFvFDt'];a95_0x21cd=function(){return _0x554540;};return a95_0x21cd();}export const DEFAULT_CONFIG_VALUES={'env':a95_0x2415d3(0x1ea),'format':a95_0x2415d3(0x1f4),'locale':a95_0x2415d3(0x1ed),'riskLevel':a95_0x2415d3(0x1ee)};function a95_0x6b84(_0x2f85ea,_0x30db5e){_0x2f85ea=_0x2f85ea-0x1e7;const _0x21cd12=a95_0x21cd();let _0x6b84b4=_0x21cd12[_0x2f85ea];return _0x6b84b4;}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a96_0xea137f=a96_0x2b3e;(function(_0x40a985,_0x7bc218){const _0x53152f=a96_0x2b3e,_0x3e54b7=_0x40a985();while(!![]){try{const _0x24b423=parseInt(_0x53152f(0x194))/0x1+-parseInt(_0x53152f(0x19b))/0x2*(parseInt(_0x53152f(0x191))/0x3)+-parseInt(_0x53152f(0x192))/0x4*(parseInt(_0x53152f(0x19a))/0x5)+parseInt(_0x53152f(0x19d))/0x6*(-parseInt(_0x53152f(0x19c))/0x7)+parseInt(_0x53152f(0x199))/0x8*(parseInt(_0x53152f(0x18f))/0x9)+parseInt(_0x53152f(0x190))/0xa+parseInt(_0x53152f(0x195))/0xb*(parseInt(_0x53152f(0x198))/0xc);if(_0x24b423===_0x7bc218)break;else _0x3e54b7['push'](_0x3e54b7['shift']());}catch(_0x2b276f){_0x3e54b7['push'](_0x3e54b7['shift']());}}}(a96_0x3be4,0xa9e41));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a96_0xea137f(0x197)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a96_0xea137f(0x193)];function a96_0x3be4(){const _0xa77471=['330516oxgvGr','7352RsoXzw','13435FXRGob','2518prOHjy','2959299oacavr','12fAZDfk','2538etlKmy','8177810HhSEtt','1770TDVKyH','1556IMawBK','npmRegistryBaseUrl','737636jkgebN','605OlztoI','/dist/lovrabet-cli/config/index.json','skillSource'];a96_0x3be4=function(){return _0xa77471;};return a96_0x3be4();}function a96_0x2b3e(_0x14cfe6,_0x56af16){_0x14cfe6=_0x14cfe6-0x18f;const _0x3be472=a96_0x3be4();let _0x2b3ebe=_0x3be472[_0x14cfe6];return _0x2b3ebe;}export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG['cliCdnBaseUrl'];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a96_0xea137f(0x196);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x19bf25=a97_0x44cc;(function(_0x2827ba,_0x34197f){const _0x420749=a97_0x44cc,_0x56d3bf=_0x2827ba();while(!![]){try{const _0x29743f=-parseInt(_0x420749(0x136))/0x1*(parseInt(_0x420749(0x141))/0x2)+parseInt(_0x420749(0x14b))/0x3*(parseInt(_0x420749(0x148))/0x4)+-parseInt(_0x420749(0x14d))/0x5+-parseInt(_0x420749(0x143))/0x6*(-parseInt(_0x420749(0x14c))/0x7)+parseInt(_0x420749(0x137))/0x8*(-parseInt(_0x420749(0x146))/0x9)+parseInt(_0x420749(0x13b))/0xa*(parseInt(_0x420749(0x13e))/0xb)+-parseInt(_0x420749(0x13c))/0xc;if(_0x29743f===_0x34197f)break;else _0x56d3bf['push'](_0x56d3bf['shift']());}catch(_0x2e896e){_0x56d3bf['push'](_0x56d3bf['shift']());}}}(a97_0x4447,0xc322a));import{getEnv,isProduction}from'../constant/env.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbServiceDomain,allowOfficialKbServiceDefault=!![],activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x4c48b4){const _0x267ce7=a97_0x44cc;customApiDomain=_0x4c48b4?.[_0x267ce7(0x13a)],customUserDomain=_0x4c48b4?.[_0x267ce7(0x139)],customRuntimeDomain=_0x4c48b4?.['runtimeDomain'],customSkillDomain=_0x4c48b4?.[_0x267ce7(0x149)],customKbServiceDomain=_0x4c48b4?.[_0x267ce7(0x147)],allowOfficialKbServiceDefault=_0x4c48b4?.['allowOfficialKbServiceDefault']??!![],activeRegion=_0x4c48b4?.[_0x267ce7(0x138)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x4b1b9b=a97_0x44cc,_0x18c3be=OFFICIAL_ROUTING_PROFILES[activeRegion][_0x4b1b9b(0x14a)];return isProduction(getEnv())?_0x18c3be['production']:_0x4b1b9b(0x142)in _0x18c3be?_0x18c3be[_0x4b1b9b(0x142)]:_0x18c3be['production'];};function a97_0x4447(){const _0x5c1b1b=['6075532sWlYfZ','skillDomain','serviceDomains','3jSrhOV','170716zlYuDI','1259380KlvceQ','12115zFhhib','119024HpLmGJ','region','userDomain','apiDomain','134690JjYjxt','2667156YZwlow','kbService','341xIuBUN','user','skill','178vJUunE','daily','384vrAVLl','api','runtime','693NlArpL','kbServiceDomain'];a97_0x4447=function(){return _0x5c1b1b;};return a97_0x4447();}export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a97_0x19bf25(0x13f)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a97_0x19bf25(0x144)];function a97_0x44cc(_0x10b118,_0x40e63a){_0x10b118=_0x10b118-0x136;const _0x44474=a97_0x4447();let _0x44cc60=_0x44474[_0x10b118];return _0x44cc60;}export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a97_0x19bf25(0x145)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a97_0x19bf25(0x140)];export const getKbServiceDomain=()=>{const _0x42dcce=a97_0x19bf25;if(customKbServiceDomain)return customKbServiceDomain;if(!allowOfficialKbServiceDefault)return undefined;const _0x2d02aa=getActiveRegionDomains();return _0x42dcce(0x13d)in _0x2d02aa?_0x2d02aa['kbService']:undefined;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x4cc11d=a98_0x124b;function a98_0x2593(){const _0x43420b=['272834oNGJmc','daily','21241440lgLunz','1074949qZlDjN','4KifPji','dev','2918181iDeQLt','development','3786405ZvOfjL','5717370ErVXGE','2839704sXMgvP','production'];a98_0x2593=function(){return _0x43420b;};return a98_0x2593();}(function(_0x17d3d8,_0x5a4984){const _0x4ac511=a98_0x124b,_0x45484c=_0x17d3d8();while(!![]){try{const _0x42ff3f=-parseInt(_0x4ac511(0x143))/0x1+parseInt(_0x4ac511(0x140))/0x2+-parseInt(_0x4ac511(0x13c))/0x3+-parseInt(_0x4ac511(0x144))/0x4*(-parseInt(_0x4ac511(0x13d))/0x5)+-parseInt(_0x4ac511(0x13e))/0x6+-parseInt(_0x4ac511(0x13a))/0x7+parseInt(_0x4ac511(0x142))/0x8;if(_0x42ff3f===_0x5a4984)break;else _0x45484c['push'](_0x45484c['shift']());}catch(_0x349751){_0x45484c['push'](_0x45484c['shift']());}}}(a98_0x2593,0xaccec));function a98_0x124b(_0x24ece1,_0x246f00){_0x24ece1=_0x24ece1-0x139;const _0x259395=a98_0x2593();let _0x124bec=_0x259395[_0x24ece1];return _0x124bec;}import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a98_0x4cc11d(0x13f),a98_0x4cc11d(0x13b),a98_0x4cc11d(0x141)];export function normalizeEnv(_0x34840e){return _0x34840e==='online'?'production':_0x34840e;}export function isProduction(_0x8985e4){return normalizeEnv(_0x8985e4)==='production';}export function isDaily(_0x575b54){const _0x43249e=a98_0x4cc11d;return normalizeEnv(_0x575b54)===_0x43249e(0x141);}export function isDev(_0x3c6ae0){const _0xbd8236=a98_0x4cc11d,_0x529061=normalizeEnv(_0x3c6ae0);return _0x529061===_0xbd8236(0x13b)||_0x529061===_0xbd8236(0x139);}let env=normalizeEnv(productEnv('ENV')||a98_0x4cc11d(0x13f));export function getEnv(){return env;}export function initEnv(_0x16a8e6){env=normalizeEnv(_0x16a8e6);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a99_0x3bd685=a99_0x4faf;(function(_0x481192,_0x786720){const _0x451f6b=a99_0x4faf,_0x4da99e=_0x481192();while(!![]){try{const _0x214518=parseInt(_0x451f6b(0x6c))/0x1+parseInt(_0x451f6b(0x66))/0x2*(-parseInt(_0x451f6b(0x70))/0x3)+parseInt(_0x451f6b(0x67))/0x4+parseInt(_0x451f6b(0x6a))/0x5+parseInt(_0x451f6b(0x68))/0x6*(parseInt(_0x451f6b(0x6d))/0x7)+-parseInt(_0x451f6b(0x69))/0x8+-parseInt(_0x451f6b(0x6f))/0x9*(-parseInt(_0x451f6b(0x71))/0xa);if(_0x214518===_0x786720)break;else _0x4da99e['push'](_0x4da99e['shift']());}catch(_0x106c86){_0x4da99e['push'](_0x4da99e['shift']());}}}(a99_0x406e,0x40e53));function a99_0x4faf(_0x44990b,_0x2d0cd6){_0x44990b=_0x44990b-0x66;const _0x406ed2=a99_0x406e();let _0x4faf52=_0x406ed2[_0x44990b];return _0x4faf52;}export const OUTPUT_FORMAT_VALUES=[a99_0x3bd685(0x6b),a99_0x3bd685(0x72),a99_0x3bd685(0x6e)];function a99_0x406e(){const _0x491182=['1364377hYuIvu','compress','306cOeGfA','64053IvusbV','30170YRkMWO','pretty','36rLKFvL','1244996XumXUi','12TnUqll','3477104QtStOS','340880AIERgU','json','212942PeizrS'];a99_0x406e=function(){return _0x491182;};return a99_0x406e();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x15c9ca=a100_0x1135;(function(_0xa3113,_0x4a19bd){const _0x4512e8=a100_0x1135,_0x2958cf=_0xa3113();while(!![]){try{const _0xd9848a=parseInt(_0x4512e8(0xbf))/0x1*(-parseInt(_0x4512e8(0xb9))/0x2)+-parseInt(_0x4512e8(0xb0))/0x3+parseInt(_0x4512e8(0xa4))/0x4*(parseInt(_0x4512e8(0xb1))/0x5)+parseInt(_0x4512e8(0xb8))/0x6*(-parseInt(_0x4512e8(0xa7))/0x7)+-parseInt(_0x4512e8(0xad))/0x8+parseInt(_0x4512e8(0xaa))/0x9*(parseInt(_0x4512e8(0xbd))/0xa)+parseInt(_0x4512e8(0xb3))/0xb;if(_0xd9848a===_0x4a19bd)break;else _0x2958cf['push'](_0x2958cf['shift']());}catch(_0x8c5ed1){_0x2958cf['push'](_0x2958cf['shift']());}}}(a100_0x403c,0xcbe91));function a100_0x1135(_0x271abf,_0x3baf59){_0x271abf=_0x271abf-0xa4;const _0x403c40=a100_0x403c();let _0x1135f7=_0x403c40[_0x271abf];return _0x1135f7;}export const PRODUCT_CONFIG={'cliBinName':a100_0x15c9ca(0xb2),'cliDisplayName':a100_0x15c9ca(0xbb),'npmPackageName':a100_0x15c9ca(0xa5),'skillSource':a100_0x15c9ca(0xaf),'internalSkillSource':a100_0x15c9ca(0xab),'globalSkillName':a100_0x15c9ca(0xb2),'npmRegistryBaseUrl':a100_0x15c9ca(0xb7),'cliCdnBaseUrl':a100_0x15c9ca(0xa6),'envPrefix':a100_0x15c9ca(0xb4),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':['.lovrabet.json'],'newConfigFileName':a100_0x15c9ca(0xae),'homeDirName':a100_0x15c9ca(0xba),'logFileName':a100_0x15c9ca(0xb6),'invokeSource':a100_0x15c9ca(0xbc),'userCenterDisplayName':a100_0x15c9ca(0xa8),'skipNpxSkillsEnvSuffix':a100_0x15c9ca(0xbe),'accessKeyCreatePath':a100_0x15c9ca(0xa9)};export function productEnvName(_0xe2e457){const _0xa1a28f=a100_0x15c9ca;return PRODUCT_CONFIG[_0xa1a28f(0xb5)]+'_'+_0xe2e457;}export function productEnvNames(_0x58ec75){const _0x505600=a100_0x15c9ca;return[productEnvName(_0x58ec75),...PRODUCT_CONFIG[_0x505600(0xac)][_0x505600(0xc0)](_0x54417d=>_0x54417d+'_'+_0x58ec75)];}function a100_0x403c(){const _0x577ab0=['https://g.lovrabet.com','35AwakqN','Lovrabet\x20User\x20Center','/user/ak','180tGNYwk','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','legacyEnvPrefixes','4827520bbdoKa','.lovrabet.json','lovrabet/lovrabet-cli','3994950mbTANC','840615kLexCr','lovrabet','18526354zPfZcs','LOVRABET','envPrefix','.lovrabet-runtime.log','https://registry.npmjs.org','498558JvueAT','6472qskdUA','.lovrabet','Lovrabet\x20Runtime\x20CLI','cli:lovrabet-runtime','448660vjPBJf','SKIP_NPX_SKILLS','125yyfllI','map','24IjSWbR','@lovrabet/lovrabet-cli'];a100_0x403c=function(){return _0x577ab0;};return a100_0x403c();}export function productEnv(_0x61ee54){for(const _0x1eab58 of productEnvNames(_0x61ee54)){const _0x1e00ba=process.env[_0x1eab58];if(_0x1e00ba!==undefined)return _0x1e00ba;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a9848,_0xa7d5a3){const _0x21c30f=a101_0x20c5,_0xdcf804=_0x3a9848();while(!![]){try{const _0x55ff64=parseInt(_0x21c30f(0x7b))/0x1+-parseInt(_0x21c30f(0x78))/0x2+parseInt(_0x21c30f(0x79))/0x3+parseInt(_0x21c30f(0x72))/0x4*(parseInt(_0x21c30f(0x77))/0x5)+parseInt(_0x21c30f(0x6e))/0x6+-parseInt(_0x21c30f(0x71))/0x7+-parseInt(_0x21c30f(0x7c))/0x8;if(_0x55ff64===_0xa7d5a3)break;else _0xdcf804['push'](_0xdcf804['shift']());}catch(_0x37fbb0){_0xdcf804['push'](_0xdcf804['shift']());}}}(a101_0x3699,0x4b02c));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';import{CliErrors}from'../errors.js';export const LOVRABET_REGION_VALUES=REGION_VALUES;function a101_0x20c5(_0x2e941b,_0xa9911d){_0x2e941b=_0x2e941b-0x6e;const _0x3699ff=a101_0x3699();let _0x20c5b3=_0x3699ff[_0x2e941b];return _0x20c5b3;}export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x5738a1){const _0x1e0837=a101_0x20c5;return typeof _0x5738a1==='string'&&LOVRABET_REGION_VALUES[_0x1e0837(0x74)](_0x5738a1);}export function isEnabledLovrabetRegion(_0x391b8c){const _0x1b30db=a101_0x20c5;return typeof _0x391b8c==='string'&&ENABLED_LOVRABET_REGION_VALUES[_0x1b30db(0x74)](_0x391b8c);}function a101_0x3699(){const _0x212aad=['1182351zPeFYs','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','151898JvzDUl','2706160jWLgUB','\x22\x20is\x20not\x20currently\x20available.','3242244HSgXZs','Available\x20regions:\x20','join','650468BNDJnY','3268IReppM','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','includes','string','validation','1160KGeEUV','1074990SiIpbq'];a101_0x3699=function(){return _0x212aad;};return a101_0x3699();}export function normalizeLovrabetRegion(_0x4d5a41){const _0x1eed20=a101_0x20c5;if(_0x4d5a41===undefined||_0x4d5a41===null||_0x4d5a41==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x4d5a41!==_0x1eed20(0x75))throw CliErrors[_0x1eed20(0x76)](_0x1eed20(0x73)+typeof _0x4d5a41+'.',_0x1eed20(0x7a));const _0x4d74a4=REGION_ALIASES[_0x4d5a41]??_0x4d5a41;if(isEnabledLovrabetRegion(_0x4d74a4))return _0x4d74a4;throw CliErrors[_0x1eed20(0x76)]('Region\x20\x22'+_0x4d5a41+_0x1eed20(0x7d),_0x1eed20(0x6f)+ENABLED_LOVRABET_REGION_VALUES[_0x1eed20(0x70)](',\x20')+'.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.');}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x354479=a102_0x447c;function a102_0x447c(_0x5ef46a,_0x263b06){_0x5ef46a=_0x5ef46a-0x147;const _0x546c7f=a102_0x546c();let _0x447ca4=_0x546c7f[_0x5ef46a];return _0x447ca4;}(function(_0x3b7574,_0x45155b){const _0x10267b=a102_0x447c,_0x5cce69=_0x3b7574();while(!![]){try{const _0x2d0d8c=parseInt(_0x10267b(0x14c))/0x1+parseInt(_0x10267b(0x147))/0x2+-parseInt(_0x10267b(0x148))/0x3+-parseInt(_0x10267b(0x149))/0x4+-parseInt(_0x10267b(0x151))/0x5*(-parseInt(_0x10267b(0x14d))/0x6)+parseInt(_0x10267b(0x150))/0x7*(-parseInt(_0x10267b(0x14b))/0x8)+-parseInt(_0x10267b(0x14e))/0x9;if(_0x2d0d8c===_0x45155b)break;else _0x5cce69['push'](_0x5cce69['shift']());}catch(_0xe8ac63){_0x5cce69['push'](_0x5cce69['shift']());}}}(a102_0x546c,0x59868));export const RISK_LEVEL_VALUES=[a102_0x354479(0x14f),a102_0x354479(0x14a),'high-risk-write'];function a102_0x546c(){const _0x4afd36=['540273VTjKhp','246OHhQCB','1534185YwZORb','read','1589343FvKBBN','68895bWpbrQ','474754RkfLQu','1267671KicTfN','623288NYCper','write','8GBshhD'];a102_0x546c=function(){return _0x4afd36;};return a102_0x546c();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x529ac8,_0x244c96){const _0x403483=a103_0x4538,_0x54bd98=_0x529ac8();while(!![]){try{const _0x5534c9=parseInt(_0x403483(0x118))/0x1+-parseInt(_0x403483(0x11d))/0x2+parseInt(_0x403483(0x11a))/0x3*(parseInt(_0x403483(0x11e))/0x4)+-parseInt(_0x403483(0x119))/0x5+parseInt(_0x403483(0x121))/0x6+-parseInt(_0x403483(0x11f))/0x7+-parseInt(_0x403483(0x11c))/0x8*(-parseInt(_0x403483(0x122))/0x9);if(_0x5534c9===_0x244c96)break;else _0x54bd98['push'](_0x54bd98['shift']());}catch(_0x8d076b){_0x54bd98['push'](_0x54bd98['shift']());}}}(a103_0x596a,0xe7d6b));import{PRODUCT_CONFIG}from'../constant/product.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';export function getUserAccessKeyCreateUrl(_0x235340=DEFAULT_LOVRABET_REGION){const _0x541fbb=a103_0x4538,_0x40293a=OFFICIAL_ROUTING_PROFILES[_0x235340][_0x541fbb(0x120)]['production'][_0x541fbb(0x123)];return''+_0x40293a+PRODUCT_CONFIG[_0x541fbb(0x11b)];}function a103_0x4538(_0xd37a23,_0x50d141){_0xd37a23=_0xd37a23-0x118;const _0x596abc=a103_0x596a();let _0x4538e6=_0x596abc[_0xd37a23];return _0x4538e6;}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();function a103_0x596a(){const _0x44cf3b=['140rrbsLq','3976056tUGafV','serviceDomains','9889236FIotzW','9OOTtyD','user','275872zwjPxP','2678850QxkvlT','37659sSVRWL','accessKeyCreatePath','5563496txqguP','2010962OoLkio'];a103_0x596a=function(){return _0x44cf3b;};return a103_0x596a();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x52b2bf,_0x5e9d80){const _0x4b883d=a104_0x5427,_0x3d581a=_0x52b2bf();while(!![]){try{const _0x56f44e=parseInt(_0x4b883d(0x1e3))/0x1+parseInt(_0x4b883d(0x1e1))/0x2+parseInt(_0x4b883d(0x1ea))/0x3+parseInt(_0x4b883d(0x1f7))/0x4+-parseInt(_0x4b883d(0x216))/0x5*(parseInt(_0x4b883d(0x209))/0x6)+parseInt(_0x4b883d(0x1de))/0x7*(parseInt(_0x4b883d(0x1ff))/0x8)+-parseInt(_0x4b883d(0x205))/0x9*(parseInt(_0x4b883d(0x1fa))/0xa);if(_0x56f44e===_0x5e9d80)break;else _0x3d581a['push'](_0x3d581a['shift']());}catch(_0x13681e){_0x3d581a['push'](_0x3d581a['shift']());}}}(a104_0x1168,0x1e7a3));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{redactCommandArgv}from'./utils/redaction.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';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x4adef4){for(const _0x1ace04 of CONFIG_NAMES){const _0x13f052=resolve(_0x4adef4,_0x1ace04);if(existsSync(_0x13f052))return _0x13f052;}return undefined;}export function resolveWriteConfigPath(_0x31561d){const _0xee5845=a104_0x5427,_0x35e322=_0x31561d===_0xee5845(0x20f)?process['cwd']():homedir(),_0x33e113=resolveConfigPath(_0x35e322);return _0x33e113??resolve(_0x35e322,NEW_CONFIG_NAME);}export function readConfigFile(_0xd2ad98){const _0x9ab62b=a104_0x5427;try{if(existsSync(_0xd2ad98)){const _0x1a5dfe=readFileSync(_0xd2ad98,{'encoding':_0x9ab62b(0x21a)});if(_0x1a5dfe){const _0x4caa1c=JSON['parse'](_0x1a5dfe);return migrateOnlineEnv(_0xd2ad98,_0x4caa1c),_0x4caa1c;}}}catch{}return{};}function migrateOnlineEnv(_0x55fd44,_0x2e691e){const _0x5297cf=a104_0x5427;let _0x4ebab2=![];_0x2e691e[_0x5297cf(0x1dc)]===_0x5297cf(0x1f3)&&(_0x2e691e['env']=_0x5297cf(0x1f5),_0x4ebab2=!![]);if(_0x2e691e[_0x5297cf(0x1db)]&&typeof _0x2e691e[_0x5297cf(0x1db)]===_0x5297cf(0x1d6))for(const _0xb67865 of Object[_0x5297cf(0x1fb)](_0x2e691e[_0x5297cf(0x1db)])){_0xb67865&&_0xb67865[_0x5297cf(0x1dc)]==='online'&&(_0xb67865[_0x5297cf(0x1dc)]='production',_0x4ebab2=!![]);}if(_0x4ebab2)try{writeConfigFile(_0x55fd44,_0x2e691e);}catch{}}export function writeConfigFile(_0x5275db,_0x56519c){const _0x90eac2=a104_0x5427,_0x5c76a2=dirname(_0x5275db);!existsSync(_0x5c76a2)&&mkdirSync(_0x5c76a2,{'recursive':!![]});const _0x5f8ae0=_0x5275db+_0x90eac2(0x1f2);try{writeFileSync(_0x5f8ae0,JSON['stringify'](_0x56519c,null,0x2)+'\x0a',{'encoding':_0x90eac2(0x21a),'mode':0x180});try{renameSync(_0x5f8ae0,_0x5275db);}catch(_0x410af9){if(_0x410af9[_0x90eac2(0x213)]===_0x90eac2(0x1fc)||_0x410af9[_0x90eac2(0x213)]===_0x90eac2(0x208)||_0x410af9[_0x90eac2(0x213)]===_0x90eac2(0x203)){writeFileSync(_0x5275db,JSON[_0x90eac2(0x200)](_0x56519c,null,0x2)+'\x0a',{'encoding':_0x90eac2(0x21a)});try{unlinkSync(_0x5f8ae0);}catch{}}else throw _0x410af9;}}catch(_0x43881c){try{unlinkSync(_0x5f8ae0);}catch{}throw _0x43881c;}}export function isNonInteractiveMode(_0x14d8e2){const _0x41159a=a104_0x5427;return!!(_0x14d8e2[_0x41159a(0x210)]||_0x14d8e2['ci']||productEnvNames('CI')['some'](_0x5d7f8a=>process.env[_0x5d7f8a]===_0x41159a(0x1e2))||process.env.CI===_0x41159a(0x1e2)||!process[_0x41159a(0x1cf)][_0x41159a(0x1f9)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x57c394=a104_0x5427;if(!process[_0x57c394(0x1ed)][_0x57c394(0x1f9)])return![];try{const _0x2c74db=process[_0x57c394(0x1ed)]['isRaw'];return process[_0x57c394(0x1ed)]['setRawMode'](!![]),process[_0x57c394(0x1ed)][_0x57c394(0x1e0)](_0x2c74db??![]),!![];}catch{return![];}}export async function createContext(_0x63b0b5){const _0x59fd08=a104_0x5427,_0x19e3dc=readRawConfig(),_0x46ebb2=buildConfig(_0x19e3dc,_0x63b0b5);await initGlobalEnvironment(_0x46ebb2);const {getUserDomain:_0x204cdd,getApiDomain:_0x4e6d9c}=await import(_0x59fd08(0x1d7)),_0x194b5d={'apiDomain':_0x4e6d9c(),'userDomain':_0x204cdd()},_0x50faaf=await buildAuth(_0x46ebb2);logger[_0x59fd08(0x20b)](process['cwd']());const _0x1e73d8=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x59fd08(0x1eb)]['slice'](0x2))['join']('\x20'))[_0x59fd08(0x214)]();logger[_0x59fd08(0x1d0)](_0x1e73d8);const _0x3a73ef=isNonInteractiveMode(_0x63b0b5);return{'config':_0x46ebb2,'auth':_0x50faaf,'logger':logger,'env':_0x194b5d,'nonInteractive':_0x3a73ef};}function a104_0x5427(_0x527295,_0x1f47b6){_0x527295=_0x527295-0x1cd;const _0x11689c=a104_0x1168();let _0x542724=_0x11689c[_0x527295];return _0x542724;}export function buildConfigFromFlags(_0xba2d94){return buildConfig(readRawConfig(),_0xba2d94);}export function getLocalAppAliases(_0x4ba4e6){const _0x1a658c=a104_0x5427;return _0x4ba4e6[_0x1a658c(0x1db)]&&typeof _0x4ba4e6['apps']==='object'?_0x4ba4e6['apps']:{};}export function resolveLocalAppAliasCode(_0x1ad79f,_0x5a6919){const _0x2df7c8=a104_0x5427;if(!_0x5a6919)return undefined;const _0x203d24=getLocalAppAliases(_0x1ad79f)[_0x5a6919],_0x601665=_0x203d24?.[_0x2df7c8(0x21b)];return typeof _0x601665===_0x2df7c8(0x1ee)&&_0x601665[_0x2df7c8(0x214)]()?_0x601665[_0x2df7c8(0x214)]():undefined;}export function readAppCodeFromConfig(){const _0xc1be62=a104_0x5427,_0x34e116=readRawConfig(),_0x3f5633=_0x34e116[_0xc1be62(0x21b)]??_0x34e116[_0xc1be62(0x204)];if(typeof _0x3f5633===_0xc1be62(0x1ee)&&_0x3f5633[_0xc1be62(0x214)]())return _0x3f5633['trim']();const _0xdf7aea=resolveLocalAppAliasCode(_0x34e116,typeof _0x34e116[_0xc1be62(0x218)]==='string'?_0x34e116[_0xc1be62(0x218)]:undefined);if(_0xdf7aea)return _0xdf7aea;const _0x3f6884=normalizeEnv(String(_0x34e116['env']||_0xc1be62(0x1f5))),_0x3267d4=isDaily(_0x3f6884)?_0xc1be62(0x1d2):isDev(_0x3f6884)?_0xc1be62(0x1d8):'production',_0x1d3461=resolveCachedAppCode(typeof _0x34e116['defaultApp']==='string'?_0x34e116[_0xc1be62(0x218)]:undefined,_0x3267d4,typeof _0x34e116[_0xc1be62(0x1fe)]===_0xc1be62(0x1ee)?_0x34e116[_0xc1be62(0x1fe)]:undefined);if(_0x1d3461)return _0x1d3461;const _0x3fb6ad=Object['values'](getLocalAppAliases(_0x34e116))[_0xc1be62(0x1e4)](_0x348c40=>_0x348c40?.[_0xc1be62(0x21b)]);return typeof _0x3fb6ad?.[_0xc1be62(0x21b)]===_0xc1be62(0x1ee)&&_0x3fb6ad['appcode'][_0xc1be62(0x214)]()?_0x3fb6ad[_0xc1be62(0x21b)]['trim']():undefined;}export function readScopedConfig(_0x12e8eb){const _0x260f8f=a104_0x5427,_0x29e0f3=_0x12e8eb['global']?_0x260f8f(0x20c):_0x260f8f(0x20f);return readConfigFile(resolveWriteConfigPath(_0x29e0f3));}export function writeScopedConfig(_0x5dfd5,_0x96d89b){const _0x34e7ec=a104_0x5427,_0x5e9209=_0x96d89b[_0x34e7ec(0x20c)]?'global':_0x34e7ec(0x20f);writeConfigFile(resolveWriteConfigPath(_0x5e9209),_0x5dfd5);}export async function initGlobalEnvironment(_0x186a40){const _0x24f92a=a104_0x5427,{initEnv:_0x8b8f71}=await import('./constant/env.js');_0x8b8f71(_0x186a40[_0x24f92a(0x1dc)]);const {initDomains:_0x5dddfe}=await import(_0x24f92a(0x1d7)),_0x312751=resolveEnterpriseRoutingConfig(_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x1e6)]),_0x2526af=['apiDomain',_0x24f92a(0x21d),_0x24f92a(0x202),'runtimeDomain',_0x24f92a(0x1d1),_0x24f92a(0x21c),_0x24f92a(0x1f6),'platformDomain',_0x24f92a(0x1fd),_0x24f92a(0x1df)],_0x262a8f=_0x312751!==undefined||_0x2526af[_0x24f92a(0x20d)](_0x36a857=>Object[_0x24f92a(0x21e)][_0x24f92a(0x1d5)][_0x24f92a(0x1f1)](_0x186a40[_0x24f92a(0x1e5)],_0x36a857));_0x5dddfe({'apiDomain':_0x312751?_0x312751['apiDomain']:_0x186a40['raw'][_0x24f92a(0x206)]||_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x21d)]||undefined,'userDomain':_0x312751?_0x312751[_0x24f92a(0x202)]:_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x202)]||undefined,'runtimeDomain':_0x312751?_0x312751['runtimeDomain']:_0x186a40['raw']['runtimeDomain']||undefined,'skillDomain':_0x312751?_0x312751['skillDomain']:_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x1d1)]||_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x21c)]||_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x1f6)]||_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x1d9)]||undefined,'kbServiceDomain':_0x312751?_0x312751[_0x24f92a(0x1df)]:typeof _0x186a40[_0x24f92a(0x1e5)]['kbServiceDomain']===_0x24f92a(0x1ee)&&_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x1df)][_0x24f92a(0x214)]()?_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x1df)]:undefined,'allowOfficialKbServiceDefault':!_0x262a8f,'region':normalizeLovrabetRegion(_0x186a40[_0x24f92a(0x1e5)][_0x24f92a(0x1ec)])});}export function getProjectConfigPath(){const _0x559a47=a104_0x5427;return resolveConfigPath(process[_0x559a47(0x1e7)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5f1d42){const _0x318421=a104_0x5427;if(!existsSync(_0x5f1d42))return{'status':_0x318421(0x1e8)};try{const _0x41ad50=readFileSync(_0x5f1d42,{'encoding':_0x318421(0x21a)});if(!_0x41ad50?.[_0x318421(0x214)]())return{'status':_0x318421(0x217)};const _0x505870=JSON[_0x318421(0x207)](_0x41ad50);return{'status':'ok','data':_0x505870};}catch(_0x321e0a){return{'status':_0x318421(0x1f8),'message':_0x321e0a instanceof Error?_0x321e0a[_0x318421(0x215)]:String(_0x321e0a)};}}export function loadRawConfigLayers(_0x169393){const _0x4dfc19=a104_0x5427;let _0xc63d7a={},_0x4975b5={},_0x3a1652,_0x4c24fc;try{_0x3a1652=resolveConfigPath(homedir());if(_0x3a1652){const _0x533ba4=readFileSync(_0x3a1652,{'encoding':'utf8'});if(_0x533ba4)_0xc63d7a=JSON['parse'](_0x533ba4);}}catch{}try{const _0x5f01e1=_0x169393||process[_0x4dfc19(0x1e7)]();_0x4c24fc=resolveConfigPath(_0x5f01e1);if(_0x4c24fc){const _0x2a962f=readFileSync(_0x4c24fc,{'encoding':'utf8'});if(_0x2a962f)_0x4975b5=JSON[_0x4dfc19(0x207)](_0x2a962f);}}catch{}return{'globalPath':_0x3a1652,'projectPath':_0x4c24fc,'globalConfig':_0xc63d7a,'projectConfig':_0x4975b5};}function mergeRawConfigLayers(_0x215466){const _0x187067=a104_0x5427,{globalConfig:_0xa8f8a2,projectConfig:_0x2419d3}=_0x215466,_0x5284ab={..._0xa8f8a2,..._0x2419d3};delete _0x5284ab['inherit'];if('defaultApp'in _0x2419d3)_0x5284ab[_0x187067(0x218)]=_0x2419d3[_0x187067(0x218)];else _0xa8f8a2[_0x187067(0x218)]&&(_0x5284ab[_0x187067(0x218)]=_0xa8f8a2[_0x187067(0x218)]);return _0x5284ab;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x40c8aa){return mergeRawConfigLayers(loadRawConfigLayers(_0x40c8aa));}export function readRawConfigWithLayers(_0x8c3a35){const _0x55fec9=loadRawConfigLayers(_0x8c3a35);return{'config':mergeRawConfigLayers(_0x55fec9),'layers':_0x55fec9};}export function resolveDefaultAppSource(_0x4eba62){const _0x2eac48=a104_0x5427;if('defaultApp'in _0x4eba62[_0x2eac48(0x1e9)])return _0x2eac48(0x20f);if(_0x4eba62[_0x2eac48(0x20a)]['defaultApp'])return _0x2eac48(0x20c);return null;}function buildConfig(_0x3dde12,_0x471cb5){const _0x1e4433=a104_0x5427,_0x299e1e=_0x3dde12[_0x1e4433(0x218)]||undefined,_0x5def75=_0x471cb5[_0x1e4433(0x204)]||env(_0x1e4433(0x1f4))||undefined,_0x1b4491=_0x5def75||_0x299e1e||undefined,_0x1588a5=env(_0x1e4433(0x1f0))||_0x3dde12[_0x1e4433(0x1fe)]||undefined,_0x1d4943=_0x471cb5[_0x1e4433(0x1dc)]||env('ENV')||_0x3dde12[_0x1e4433(0x1dc)]||DEFAULT_CONFIG_VALUES[_0x1e4433(0x1dc)],_0x31a7b8=normalizeEnv(String(_0x1d4943)),_0x437be5=isDaily(_0x31a7b8)?'daily':isDev(_0x31a7b8)?_0x1e4433(0x1d8):_0x1e4433(0x1f5),_0x4956b5=typeof _0x471cb5[_0x1e4433(0x21b)]===_0x1e4433(0x1ee)?_0x471cb5[_0x1e4433(0x21b)]:undefined,_0x1aeea7=env(_0x1e4433(0x219)),_0x588bda=_0x5def75?undefined:_0x3dde12[_0x1e4433(0x21b)]||_0x3dde12[_0x1e4433(0x204)]||undefined,_0x160f6d=_0x5def75||(_0x588bda?undefined:_0x299e1e),_0x4cacaa=resolveLocalAppAliasCode(_0x3dde12,_0x160f6d),_0x97cb1=resolveCachedAppCode(_0x160f6d,_0x437be5,_0x1588a5),_0x4f4493=_0x4956b5||_0x1aeea7||_0x588bda||_0x4cacaa||_0x97cb1||undefined,_0x536185=_0x4956b5?'explicit':_0x1aeea7?'env':_0x588bda?_0x1e4433(0x1dd):_0x4cacaa?_0x1e4433(0x1d3):_0x97cb1?_0x1e4433(0x1da):undefined,_0xdee71a=_0x3dde12['locale']||DEFAULT_CONFIG_VALUES[_0x1e4433(0x21f)],_0x171d64=undefined,_0x18861d=_0x471cb5[_0x1e4433(0x20e)]||env(_0x1e4433(0x211))||_0x3dde12[_0x1e4433(0x20e)],_0x5d01e3=normalizeLegacyOutputFormat(_0x18861d),_0x3487be=env(_0x1e4433(0x1ef))||_0x3dde12[_0x1e4433(0x1ce)],_0x497df1=_0x3487be?Number(_0x3487be)||undefined:undefined,_0x6dd684=_0x3dde12['riskLevel'],_0x6cc665=_0x6dd684===_0x1e4433(0x1cd)||_0x6dd684===_0x1e4433(0x1d4)||_0x6dd684==='high-risk-write'?_0x6dd684:DEFAULT_CONFIG_VALUES[_0x1e4433(0x212)],_0x3b67ae=_0x3dde12['nativeToolAvailable']===!![],_0x364394=env(_0x1e4433(0x201)),_0x59f56c=_0x364394==='1'||_0x364394===_0x1e4433(0x1e2);return{'appCode':typeof _0x4f4493==='string'&&_0x4f4493[_0x1e4433(0x214)]()?_0x4f4493[_0x1e4433(0x214)]():undefined,'appCodeSource':_0x536185,'env':_0x437be5,'locale':_0xdee71a,'cookie':_0x171d64,'accessKey':_0x1588a5,'format':_0x5d01e3,'pageSize':_0x497df1,'riskLevel':_0x6cc665,'nativeToolAvailable':_0x3b67ae,'verbose':_0x59f56c,'defaultApp':_0x299e1e,'currentApp':typeof _0x1b4491===_0x1e4433(0x1ee)?_0x1b4491:undefined,'raw':_0x3dde12};}function env(_0x4c08c3){return productEnv(_0x4c08c3);}async function buildAuth(_0x2f6ef3){const _0x4af259='',_0x37beb5=!!_0x2f6ef3['accessKey'];return{'cookie':_0x4af259,'isLoggedIn':_0x37beb5,async 'getOrLogin'(){if(_0x37beb5)return _0x4af259;throw CliErrors['authRequired']();}};}function a104_0x1168(){const _0x34ef73=['VERBOSE','userDomain','EACCES','app','4749039gRGqLz','apiDomain','parse','EXDEV','6MevAPi','globalConfig','setLogPath','global','some','format','project','nonInteractive','FORMAT','riskLevel','code','trim','message','44035EprDiz','empty','defaultApp','APPCODE','utf8','appcode','skillHubDomain','host','prototype','locale','read','pageSize','stdout','setRawCommand','skillDomain','daily','local-alias','write','hasOwnProperty','object','./constant/domain.js','development','platformDomain','cache','apps','env','top-level','3094tXgnco','kbServiceDomain','setRawMode','438812sMVHKU','true','2873GUObWP','find','raw','routing','cwd','missing','projectConfig','512793brkhFI','argv','region','stdin','string','PAGE_SIZE','ACCESS_KEY','call','.tmp','online','APP','production','agentDomain','252060dpgvGi','error','isTTY','10WKqcLF','values','EPERM','kbDomain','accessKey','3712kYDCYx','stringify'];a104_0x1168=function(){return _0x34ef73;};return a104_0x1168();}
|
|
1
|
+
const a104_0x2fe605=a104_0x147b;(function(_0x181609,_0x41e45f){const _0x2f790c=a104_0x147b,_0x108693=_0x181609();while(!![]){try{const _0x1c1938=parseInt(_0x2f790c(0xba))/0x1*(-parseInt(_0x2f790c(0x84))/0x2)+parseInt(_0x2f790c(0xb2))/0x3+-parseInt(_0x2f790c(0xa5))/0x4*(-parseInt(_0x2f790c(0xd2))/0x5)+-parseInt(_0x2f790c(0x94))/0x6*(-parseInt(_0x2f790c(0x82))/0x7)+parseInt(_0x2f790c(0xbf))/0x8+-parseInt(_0x2f790c(0xc0))/0x9+-parseInt(_0x2f790c(0x99))/0xa*(parseInt(_0x2f790c(0xbe))/0xb);if(_0x1c1938===_0x41e45f)break;else _0x108693['push'](_0x108693['shift']());}catch(_0x2c8927){_0x108693['push'](_0x108693['shift']());}}}(a104_0x111a,0xc4c37));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{redactCommandArgv}from'./utils/redaction.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';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a104_0x2fe605(0xa9)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a104_0x2fe605(0xae)];function resolveConfigPath(_0x213bdc){for(const _0x10a07a of CONFIG_NAMES){const _0x4d3fa1=resolve(_0x213bdc,_0x10a07a);if(existsSync(_0x4d3fa1))return _0x4d3fa1;}return undefined;}function a104_0x111a(){const _0x3f0089=['object','stringify','argv','stdin','platformDomain','values','production','app','7212SguVzr','raw','authRequired','routing','configFileNames','high-risk-write','code','project','.tmp','newConfigFileName','ACCESS_KEY','userDomain','kbDomain','2133888wTmQnV','setRawMode','message','cwd','defaultApp','./constant/env.js','./constant/domain.js','region','330016Clgmyb','locale','isRaw','missing','110693QBAdOR','6679880KMYcjq','10062387IVEoGu','string','explicit','APPCODE','runtimeDomain','appcode','call','host','development','join','globalConfig','projectConfig','skillHubDomain','agentDomain','find','setLogPath','ENV','utf8','1535XRNXDf','online','env','apiDomain','FORMAT','77oVeACU','isTTY','2zCszIS','write','some','EACCES','top-level','APP','setRawCommand','riskLevel','skillDomain','cache','accessKey','parse','prototype','global','true','EXDEV','210354KyxefD','daily','VERBOSE','kbServiceDomain','format','230fOEhus','trim','apps','inherit'];a104_0x111a=function(){return _0x3f0089;};return a104_0x111a();}export function resolveWriteConfigPath(_0x25a8a6){const _0x29e2e4=a104_0x2fe605,_0x31b112=_0x25a8a6===_0x29e2e4(0xac)?process[_0x29e2e4(0xb5)]():homedir(),_0x38da25=resolveConfigPath(_0x31b112);return _0x38da25??resolve(_0x31b112,NEW_CONFIG_NAME);}export function readConfigFile(_0x256c1c){const _0x26f08d=a104_0x2fe605;try{if(existsSync(_0x256c1c)){const _0x156e6f=readFileSync(_0x256c1c,{'encoding':_0x26f08d(0xd1)});if(_0x156e6f){const _0x58e73d=JSON[_0x26f08d(0x8f)](_0x156e6f);return migrateOnlineEnv(_0x256c1c,_0x58e73d),_0x58e73d;}}}catch{}return{};}function migrateOnlineEnv(_0x617f0a,_0x575364){const _0x56d9f0=a104_0x2fe605;let _0x1fb32a=![];_0x575364[_0x56d9f0(0xd4)]===_0x56d9f0(0xd3)&&(_0x575364[_0x56d9f0(0xd4)]='production',_0x1fb32a=!![]);if(_0x575364['apps']&&typeof _0x575364['apps']===_0x56d9f0(0x9d))for(const _0x32f44c of Object[_0x56d9f0(0xa2)](_0x575364[_0x56d9f0(0x9b)])){_0x32f44c&&_0x32f44c[_0x56d9f0(0xd4)]===_0x56d9f0(0xd3)&&(_0x32f44c['env']=_0x56d9f0(0xa3),_0x1fb32a=!![]);}if(_0x1fb32a)try{writeConfigFile(_0x617f0a,_0x575364);}catch{}}export function writeConfigFile(_0x5d972a,_0x219260){const _0x33f81d=a104_0x2fe605,_0x22d60e=dirname(_0x5d972a);!existsSync(_0x22d60e)&&mkdirSync(_0x22d60e,{'recursive':!![]});const _0x1fad63=_0x5d972a+_0x33f81d(0xad);try{writeFileSync(_0x1fad63,JSON[_0x33f81d(0x9e)](_0x219260,null,0x2)+'\x0a',{'encoding':_0x33f81d(0xd1),'mode':0x180});try{renameSync(_0x1fad63,_0x5d972a);}catch(_0x1480b3){if(_0x1480b3[_0x33f81d(0xab)]==='EPERM'||_0x1480b3[_0x33f81d(0xab)]===_0x33f81d(0x93)||_0x1480b3[_0x33f81d(0xab)]===_0x33f81d(0x87)){writeFileSync(_0x5d972a,JSON['stringify'](_0x219260,null,0x2)+'\x0a',{'encoding':_0x33f81d(0xd1)});try{unlinkSync(_0x1fad63);}catch{}}else throw _0x1480b3;}}catch(_0x476da1){try{unlinkSync(_0x1fad63);}catch{}throw _0x476da1;}}export function isNonInteractiveMode(_0x13527e){const _0x2e48f6=a104_0x2fe605;return!!(_0x13527e['nonInteractive']||_0x13527e['ci']||productEnvNames('CI')[_0x2e48f6(0x86)](_0x5d9b3e=>process.env[_0x5d9b3e]===_0x2e48f6(0x92))||process.env.CI===_0x2e48f6(0x92)||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x2688ba=a104_0x2fe605;if(!process[_0x2688ba(0xa0)][_0x2688ba(0x83)])return![];try{const _0x4223a3=process[_0x2688ba(0xa0)][_0x2688ba(0xbc)];return process['stdin']['setRawMode'](!![]),process['stdin'][_0x2688ba(0xb3)](_0x4223a3??![]),!![];}catch{return![];}}export async function createContext(_0x5503a1){const _0x5add6f=a104_0x2fe605,_0xe7060b=readRawConfig(),_0x2aeaf7=buildConfig(_0xe7060b,_0x5503a1);await initGlobalEnvironment(_0x2aeaf7);const {getUserDomain:_0x340ebf,getApiDomain:_0x5d27af}=await import(_0x5add6f(0xb8)),_0x460c35={'apiDomain':_0x5d27af(),'userDomain':_0x340ebf()},_0x3c0fa3=await buildAuth(_0x2aeaf7);logger[_0x5add6f(0xcf)](process[_0x5add6f(0xb5)]());const _0x155968=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x5add6f(0x9f)]['slice'](0x2))[_0x5add6f(0xc9)]('\x20'))[_0x5add6f(0x9a)]();logger[_0x5add6f(0x8a)](_0x155968);const _0x44475c=isNonInteractiveMode(_0x5503a1);return{'config':_0x2aeaf7,'auth':_0x3c0fa3,'logger':logger,'env':_0x460c35,'nonInteractive':_0x44475c};}export function buildConfigFromFlags(_0xe7f70a){return buildConfig(readRawConfig(),_0xe7f70a);}export function getLocalAppAliases(_0x2acfe8){const _0x33a0c1=a104_0x2fe605;return _0x2acfe8[_0x33a0c1(0x9b)]&&typeof _0x2acfe8[_0x33a0c1(0x9b)]===_0x33a0c1(0x9d)?_0x2acfe8[_0x33a0c1(0x9b)]:{};}export function resolveLocalAppAliasCode(_0x426a92,_0x294670){const _0xa9e30d=a104_0x2fe605;if(!_0x294670)return undefined;const _0x51b582=getLocalAppAliases(_0x426a92)[_0x294670],_0xe2d049=_0x51b582?.[_0xa9e30d(0xc5)];return typeof _0xe2d049===_0xa9e30d(0xc1)&&_0xe2d049[_0xa9e30d(0x9a)]()?_0xe2d049[_0xa9e30d(0x9a)]():undefined;}export function readAppCodeFromConfig(){const _0x4da38e=a104_0x2fe605,_0x385b29=readRawConfig(),_0x2af518=_0x385b29['appcode']??_0x385b29[_0x4da38e(0xa4)];if(typeof _0x2af518==='string'&&_0x2af518[_0x4da38e(0x9a)]())return _0x2af518['trim']();const _0x55bc4b=resolveLocalAppAliasCode(_0x385b29,typeof _0x385b29['defaultApp']===_0x4da38e(0xc1)?_0x385b29['defaultApp']:undefined);if(_0x55bc4b)return _0x55bc4b;const _0x347f1=normalizeEnv(String(_0x385b29[_0x4da38e(0xd4)]||_0x4da38e(0xa3))),_0x32ab79=isDaily(_0x347f1)?'daily':isDev(_0x347f1)?_0x4da38e(0xc8):_0x4da38e(0xa3),_0x9f9e08=resolveCachedAppCode(typeof _0x385b29[_0x4da38e(0xb6)]===_0x4da38e(0xc1)?_0x385b29['defaultApp']:undefined,_0x32ab79,typeof _0x385b29[_0x4da38e(0x8e)]===_0x4da38e(0xc1)?_0x385b29[_0x4da38e(0x8e)]:undefined);if(_0x9f9e08)return _0x9f9e08;const _0x393ff0=Object['values'](getLocalAppAliases(_0x385b29))[_0x4da38e(0xce)](_0x50e397=>_0x50e397?.[_0x4da38e(0xc5)]);return typeof _0x393ff0?.[_0x4da38e(0xc5)]==='string'&&_0x393ff0['appcode'][_0x4da38e(0x9a)]()?_0x393ff0[_0x4da38e(0xc5)][_0x4da38e(0x9a)]():undefined;}export function readScopedConfig(_0x2acc39){const _0xcf89bf=a104_0x2fe605,_0x350555=_0x2acc39['global']?_0xcf89bf(0x91):_0xcf89bf(0xac);return readConfigFile(resolveWriteConfigPath(_0x350555));}export function writeScopedConfig(_0x41acf6,_0x23e127){const _0x9b2f2=a104_0x2fe605,_0x52e457=_0x23e127[_0x9b2f2(0x91)]?_0x9b2f2(0x91):_0x9b2f2(0xac);writeConfigFile(resolveWriteConfigPath(_0x52e457),_0x41acf6);}export async function initGlobalEnvironment(_0x535422){const _0x4a0e59=a104_0x2fe605,{initEnv:_0x1160a5}=await import(_0x4a0e59(0xb7));_0x1160a5(_0x535422[_0x4a0e59(0xd4)]);const {initDomains:_0x3ccc13}=await import(_0x4a0e59(0xb8)),_0x589b05=resolveEnterpriseRoutingConfig(_0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0xa8)]),_0x23856f=[_0x4a0e59(0x80),_0x4a0e59(0xc7),_0x4a0e59(0xb0),'runtimeDomain',_0x4a0e59(0x8c),_0x4a0e59(0xcc),_0x4a0e59(0xcd),_0x4a0e59(0xa1),_0x4a0e59(0xb1),_0x4a0e59(0x97)],_0x24bc7f=_0x589b05!==undefined||_0x23856f[_0x4a0e59(0x86)](_0x3d0a11=>Object[_0x4a0e59(0x90)]['hasOwnProperty'][_0x4a0e59(0xc6)](_0x535422[_0x4a0e59(0xa6)],_0x3d0a11));_0x3ccc13({'apiDomain':_0x589b05?_0x589b05['apiDomain']:_0x535422['raw'][_0x4a0e59(0x80)]||_0x535422[_0x4a0e59(0xa6)]['host']||undefined,'userDomain':_0x589b05?_0x589b05[_0x4a0e59(0xb0)]:_0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0xb0)]||undefined,'runtimeDomain':_0x589b05?_0x589b05[_0x4a0e59(0xc4)]:_0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0xc4)]||undefined,'skillDomain':_0x589b05?_0x589b05[_0x4a0e59(0x8c)]:_0x535422[_0x4a0e59(0xa6)]['skillDomain']||_0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0xcc)]||_0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0xcd)]||_0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0xa1)]||undefined,'kbServiceDomain':_0x589b05?_0x589b05['kbServiceDomain']:typeof _0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0x97)]===_0x4a0e59(0xc1)&&_0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0x97)][_0x4a0e59(0x9a)]()?_0x535422['raw']['kbServiceDomain']:undefined,'allowOfficialKbServiceDefault':!_0x24bc7f,'region':normalizeLovrabetRegion(_0x535422[_0x4a0e59(0xa6)][_0x4a0e59(0xb9)])});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x1f24cf){const _0x212f6f=a104_0x2fe605;if(!existsSync(_0x1f24cf))return{'status':_0x212f6f(0xbd)};try{const _0x56f4f1=readFileSync(_0x1f24cf,{'encoding':_0x212f6f(0xd1)});if(!_0x56f4f1?.[_0x212f6f(0x9a)]())return{'status':'empty'};const _0x2065e4=JSON[_0x212f6f(0x8f)](_0x56f4f1);return{'status':'ok','data':_0x2065e4};}catch(_0x13f23e){return{'status':'error','message':_0x13f23e instanceof Error?_0x13f23e[_0x212f6f(0xb4)]:String(_0x13f23e)};}}export function loadRawConfigLayers(_0x3dd495){const _0x1352ba=a104_0x2fe605;let _0x22f648={},_0x420355={},_0x530a15,_0x3a9eb6;try{_0x530a15=resolveConfigPath(homedir());if(_0x530a15){const _0x4dca60=readFileSync(_0x530a15,{'encoding':_0x1352ba(0xd1)});if(_0x4dca60)_0x22f648=JSON[_0x1352ba(0x8f)](_0x4dca60);}}catch{}try{const _0x2aeb00=_0x3dd495||process[_0x1352ba(0xb5)]();_0x3a9eb6=resolveConfigPath(_0x2aeb00);if(_0x3a9eb6){const _0x42f78a=readFileSync(_0x3a9eb6,{'encoding':_0x1352ba(0xd1)});if(_0x42f78a)_0x420355=JSON[_0x1352ba(0x8f)](_0x42f78a);}}catch{}return{'globalPath':_0x530a15,'projectPath':_0x3a9eb6,'globalConfig':_0x22f648,'projectConfig':_0x420355};}function mergeRawConfigLayers(_0x2d64ef){const _0x3d1d57=a104_0x2fe605,{globalConfig:_0x56b5aa,projectConfig:_0x5229e0}=_0x2d64ef,_0x3b5039={..._0x56b5aa,..._0x5229e0};delete _0x3b5039[_0x3d1d57(0x9c)];if('defaultApp'in _0x5229e0)_0x3b5039[_0x3d1d57(0xb6)]=_0x5229e0[_0x3d1d57(0xb6)];else _0x56b5aa[_0x3d1d57(0xb6)]&&(_0x3b5039[_0x3d1d57(0xb6)]=_0x56b5aa[_0x3d1d57(0xb6)]);return _0x3b5039;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x53b55a){return mergeRawConfigLayers(loadRawConfigLayers(_0x53b55a));}export function readRawConfigWithLayers(_0x1847f3){const _0x1323a8=loadRawConfigLayers(_0x1847f3);return{'config':mergeRawConfigLayers(_0x1323a8),'layers':_0x1323a8};}export function resolveDefaultAppSource(_0x16d790){const _0x236425=a104_0x2fe605;if(_0x236425(0xb6)in _0x16d790[_0x236425(0xcb)])return _0x236425(0xac);if(_0x16d790[_0x236425(0xca)]['defaultApp'])return _0x236425(0x91);return null;}function buildConfig(_0x587581,_0x2347dc){const _0x36288a=a104_0x2fe605,_0x84bc98=_0x587581[_0x36288a(0xb6)]||undefined,_0x56ff33=_0x2347dc[_0x36288a(0xa4)]||env(_0x36288a(0x89))||undefined,_0x67eddf=_0x56ff33||_0x84bc98||undefined,_0x1e23cc=env(_0x36288a(0xaf))||_0x587581['accessKey']||undefined,_0x5d46c1=_0x2347dc['env']||env(_0x36288a(0xd0))||_0x587581[_0x36288a(0xd4)]||DEFAULT_CONFIG_VALUES[_0x36288a(0xd4)],_0x104f9a=normalizeEnv(String(_0x5d46c1)),_0x2ea3c7=isDaily(_0x104f9a)?_0x36288a(0x95):isDev(_0x104f9a)?_0x36288a(0xc8):_0x36288a(0xa3),_0x3b3a5b=typeof _0x2347dc[_0x36288a(0xc5)]===_0x36288a(0xc1)?_0x2347dc['appcode']:undefined,_0x5f0537=env(_0x36288a(0xc3)),_0x5cfd06=_0x56ff33?undefined:_0x587581[_0x36288a(0xc5)]||_0x587581['app']||undefined,_0x1898a5=_0x56ff33||(_0x5cfd06?undefined:_0x84bc98),_0xea97a0=resolveLocalAppAliasCode(_0x587581,_0x1898a5),_0x20936e=resolveCachedAppCode(_0x1898a5,_0x2ea3c7,_0x1e23cc),_0x52c45d=_0x3b3a5b||_0x5f0537||_0x5cfd06||_0xea97a0||_0x20936e||undefined,_0x5bb7fc=_0x3b3a5b?_0x36288a(0xc2):_0x5f0537?'env':_0x5cfd06?_0x36288a(0x88):_0xea97a0?'local-alias':_0x20936e?_0x36288a(0x8d):undefined,_0x5bff10=_0x587581[_0x36288a(0xbb)]||DEFAULT_CONFIG_VALUES[_0x36288a(0xbb)],_0x30bb25=undefined,_0x495240=_0x2347dc[_0x36288a(0x98)]||env(_0x36288a(0x81))||_0x587581[_0x36288a(0x98)],_0x40e587=normalizeLegacyOutputFormat(_0x495240),_0x2e2171=env('PAGE_SIZE')||_0x587581['pageSize'],_0x4bec6c=_0x2e2171?Number(_0x2e2171)||undefined:undefined,_0x33e171=_0x587581[_0x36288a(0x8b)],_0x4bfd7c=_0x33e171==='read'||_0x33e171===_0x36288a(0x85)||_0x33e171===_0x36288a(0xaa)?_0x33e171:DEFAULT_CONFIG_VALUES[_0x36288a(0x8b)],_0x567bad=_0x587581['nativeToolAvailable']===!![],_0x4f31cb=env(_0x36288a(0x96)),_0x12cc24=_0x4f31cb==='1'||_0x4f31cb===_0x36288a(0x92);return{'appCode':typeof _0x52c45d==='string'&&_0x52c45d['trim']()?_0x52c45d[_0x36288a(0x9a)]():undefined,'appCodeSource':_0x5bb7fc,'env':_0x2ea3c7,'locale':_0x5bff10,'cookie':_0x30bb25,'accessKey':_0x1e23cc,'format':_0x40e587,'pageSize':_0x4bec6c,'riskLevel':_0x4bfd7c,'nativeToolAvailable':_0x567bad,'verbose':_0x12cc24,'defaultApp':_0x84bc98,'currentApp':typeof _0x67eddf==='string'?_0x67eddf:undefined,'raw':_0x587581};}function a104_0x147b(_0x509aee,_0x58ce94){_0x509aee=_0x509aee-0x80;const _0x111ae0=a104_0x111a();let _0x147b6e=_0x111ae0[_0x509aee];return _0x147b6e;}function env(_0x21e902){return productEnv(_0x21e902);}async function buildAuth(_0x553bb4){const _0x2b2459=a104_0x2fe605,_0x3cabe2='',_0x49c635=!!_0x553bb4[_0x2b2459(0x8e)];return{'cookie':_0x3cabe2,'isLoggedIn':_0x49c635,async 'getOrLogin'(){const _0x1c3388=_0x2b2459;if(_0x49c635)return _0x3cabe2;throw CliErrors[_0x1c3388(0xa7)]();}};}
|