@lovrabet/lovrabet-cli 2.3.9-beta.1 → 2.3.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/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.d.ts +2 -3
- 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.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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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.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.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.d.ts +5 -6
- 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.d.ts +3 -13
- 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/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- 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.d.ts +2 -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.d.ts +2 -0
- 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.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/skills/lovrabet/SKILL.md +31 -132
- package/skills/lovrabet/guides/app-resolution.md +39 -139
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +4 -3
- package/skills/lovrabet/guides/development-intent-handoff.md +7 -5
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +12 -27
- package/skills/lovrabet/guides/troubleshooting.md +11 -31
- package/skills/lovrabet/references/dataset-discovery-workflow.md +10 -48
- package/skills/lovrabet/references/instant-api-workflow.md +4 -11
- package/skills/lovrabet/references/lovrabet-app.md +6 -33
- package/skills/lovrabet/references/lovrabet-auth.md +16 -9
- package/skills/lovrabet/references/lovrabet-bff-workflow.md +9 -34
- package/skills/lovrabet/references/lovrabet-config.md +49 -31
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +2 -2
- package/skills/lovrabet/references/lovrabet-service-tree.md +11 -9
- package/skills/lovrabet/references/lovrabet-sql-workflow.md +9 -34
- package/skills/lovrabet/references/lovrabet-workspace.md +12 -11
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a96_0x34830f=a96_0x20e3;function a96_0x20e3(_0x31474a,_0x1e9863){_0x31474a=_0x31474a-0x94;const _0x32880a=a96_0x3288();let _0x20e3b0=_0x32880a[_0x31474a];return _0x20e3b0;}(function(_0x23f45d,_0x236131){const _0x56bfdb=a96_0x20e3,_0x301ccf=_0x23f45d();while(!![]){try{const _0x115882=-parseInt(_0x56bfdb(0x98))/0x1+parseInt(_0x56bfdb(0x9c))/0x2*(-parseInt(_0x56bfdb(0x9f))/0x3)+parseInt(_0x56bfdb(0x9e))/0x4+parseInt(_0x56bfdb(0x9b))/0x5*(-parseInt(_0x56bfdb(0x94))/0x6)+-parseInt(_0x56bfdb(0xa0))/0x7*(-parseInt(_0x56bfdb(0x95))/0x8)+parseInt(_0x56bfdb(0x99))/0x9*(parseInt(_0x56bfdb(0x9d))/0xa)+parseInt(_0x56bfdb(0x96))/0xb;if(_0x115882===_0x236131)break;else _0x301ccf['push'](_0x301ccf['shift']());}catch(_0x4eac47){_0x301ccf['push'](_0x301ccf['shift']());}}}(a96_0x3288,0x512dd));export const AUTH_MODE={'ClientAk':a96_0x34830f(0x9a)};function a96_0x3288(){const _0x35ca81=['ClientAk','420830NQyPkz','909OTmbDp','client-ak','15OkRFxe','626uPlZkg','11870QRbXft','1529152vzGYsI','2913VvDyxm','9793fNDGac','1192206XdRGSk','1888kkByfU','9031286KpQvOz'];a96_0x3288=function(){return _0x35ca81;};return a96_0x3288();}export function isAuthMode(_0x36b742){const _0x26339d=a96_0x34830f;return _0x36b742===AUTH_MODE[_0x26339d(0x97)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x904786=a97_0x3a5a;(function(_0xd5e45a,_0x14aae0){const _0x1f504b=a97_0x3a5a,_0x5a0513=_0xd5e45a();while(!![]){try{const _0x307b9a=parseInt(_0x1f504b(0xf8))/0x1+parseInt(_0x1f504b(0xfb))/0x2+parseInt(_0x1f504b(0xd6))/0x3*(parseInt(_0x1f504b(0xe8))/0x4)+-parseInt(_0x1f504b(0xee))/0x5+parseInt(_0x1f504b(0xd0))/0x6*(parseInt(_0x1f504b(0xf0))/0x7)+-parseInt(_0x1f504b(0xe1))/0x8*(parseInt(_0x1f504b(0xfd))/0x9)+-parseInt(_0x1f504b(0xdd))/0xa;if(_0x307b9a===_0x14aae0)break;else _0x5a0513['push'](_0x5a0513['shift']());}catch(_0xf67a86){_0x5a0513['push'](_0x5a0513['shift']());}}}(a97_0xdef0,0xe920d));function a97_0xdef0(){const _0x1a4c4d=['params','format','boolean','type','17163720xdJsJl','help','SQL\x20query\x20code','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','32NavgZO','Skip\x20confirmation\x20for\x20high-risk\x20writes','global','<expr>','clear','meowKey','dry-run','1485956vBEdcb','verbose','production\x20|\x20development\x20|\x20daily','fromEntries','<code>','Use\x20global\x20config\x20scope','9539290Atejcn','Clear\x20output','2531487UqJTeK','Show\x20help','json\x20|\x20pretty\x20|\x20compress','yes','dryRun','app','env','Record\x20ID','1870819PQtFTM','non-interactive','JSON\x20params\x20for\x20execute\x20commands','3430722hJCNxX','string','251271vQltlA','map','nonInteractive','sqlcode','6MrQBbf','<name>','Verbose\x20output','cliDisplayName','Output\x20format','name','6xIgAGN','appcode','Preview\x20operation\x20without\x20executing'];a97_0xdef0=function(){return _0x1a4c4d;};return a97_0xdef0();}import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a97_0x3a5a(_0x31bda9,_0x2d5e47){_0x31bda9=_0x31bda9-0xcd;const _0xdef07b=a97_0xdef0();let _0x3a5a61=_0xdef07b[_0x31bda9];return _0x3a5a61;}export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a97_0x904786(0xd3)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a97_0x904786(0xd7),'meowKey':'appcode','type':'string','description':'Override\x20appcode','hint':a97_0x904786(0xec)},{'name':a97_0x904786(0xf5),'meowKey':a97_0x904786(0xf5),'type':a97_0x904786(0xfc),'description':'Select\x20app\x20profile\x20by\x20name','hint':a97_0x904786(0xd1)},{'name':a97_0x904786(0xf6),'meowKey':a97_0x904786(0xf6),'type':'string','description':'Environment','hint':a97_0x904786(0xea)},{'name':a97_0x904786(0xda),'meowKey':'format','type':'string','description':a97_0x904786(0xd4),'hint':a97_0x904786(0xf2)},{'name':'jq','meowKey':'jq','type':a97_0x904786(0xfc),'description':a97_0x904786(0xe0),'hint':a97_0x904786(0xe4)},{'name':a97_0x904786(0xe7),'meowKey':a97_0x904786(0xf4),'type':a97_0x904786(0xdb),'description':a97_0x904786(0xd8)},{'name':a97_0x904786(0xf3),'meowKey':a97_0x904786(0xf3),'type':'boolean','description':a97_0x904786(0xe2)},{'name':'non-interactive','meowKey':a97_0x904786(0xce),'type':a97_0x904786(0xdb),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a97_0x904786(0xe3),'meowKey':a97_0x904786(0xe3),'type':a97_0x904786(0xdb),'description':a97_0x904786(0xed)},{'name':'ci','meowKey':'ci','type':a97_0x904786(0xdb),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':a97_0x904786(0xde),'type':a97_0x904786(0xdb),'description':a97_0x904786(0xf1)},{'name':'id','meowKey':'id','type':a97_0x904786(0xfc),'description':a97_0x904786(0xf7),'hidden':!![]},{'name':a97_0x904786(0xd5),'meowKey':'name','type':a97_0x904786(0xfc),'description':'Name\x20filter','hidden':!![]},{'name':a97_0x904786(0xcf),'meowKey':a97_0x904786(0xcf),'type':a97_0x904786(0xfc),'description':a97_0x904786(0xdf),'hidden':!![]},{'name':a97_0x904786(0xd9),'meowKey':a97_0x904786(0xd9),'type':a97_0x904786(0xfc),'description':a97_0x904786(0xfa),'hidden':!![]},{'name':a97_0x904786(0xe9),'meowKey':'verbose','type':'boolean','description':a97_0x904786(0xd2),'hidden':!![]},{'name':a97_0x904786(0xe5),'meowKey':'clear','type':a97_0x904786(0xdb),'description':a97_0x904786(0xef),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode','app',a97_0x904786(0xf6),'format','jq',a97_0x904786(0xe7),a97_0x904786(0xf3),a97_0x904786(0xf9),'ci']);export function buildMeowFlags(){const _0x2a9939=a97_0x904786;return Object[_0x2a9939(0xeb)](GLOBAL_FLAGS[_0x2a9939(0xcd)](_0xd3313b=>[_0xd3313b[_0x2a9939(0xe6)],{'type':_0xd3313b[_0x2a9939(0xdc)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x37189c=a98_0x145b;(function(_0x4bac1e,_0x8f4b9e){const _0x4eb85c=a98_0x145b,_0x474e82=_0x4bac1e();while(!![]){try{const _0x35f67e=-parseInt(_0x4eb85c(0x104))/0x1*(-parseInt(_0x4eb85c(0xff))/0x2)+parseInt(_0x4eb85c(0xfc))/0x3+-parseInt(_0x4eb85c(0x105))/0x4*(-parseInt(_0x4eb85c(0x100))/0x5)+-parseInt(_0x4eb85c(0xfd))/0x6+parseInt(_0x4eb85c(0x101))/0x7*(parseInt(_0x4eb85c(0xfe))/0x8)+-parseInt(_0x4eb85c(0x10a))/0x9+-parseInt(_0x4eb85c(0x108))/0xa*(-parseInt(_0x4eb85c(0x106))/0xb);if(_0x35f67e===_0x8f4b9e)break;else _0x474e82['push'](_0x474e82['shift']());}catch(_0x2cd2f7){_0x474e82['push'](_0x474e82['shift']());}}}(a98_0xabdd,0x711b4));function a98_0x145b(_0x3ec745,_0xdc2b37){_0x3ec745=_0x3ec745-0xfc;const _0xabddad=a98_0xabdd();let _0x145b54=_0xabddad[_0x3ec745];return _0x145b54;}export const DEFAULT_APP_PROFILE_NAME=a98_0x37189c(0x102);export const DEFAULT_CONFIG_VALUES={'env':a98_0x37189c(0x109),'format':a98_0x37189c(0x107),'locale':'en-US','riskLevel':a98_0x37189c(0x103)};function a98_0xabdd(){const _0x12a825=['1787394vXsVaI','401608ibadMK','104ovhUUZ','5NgXYQw','14lqKvDk','main','write','9475SbqeIO','381764PdWrqF','11zcKMxc','compress','1967320ePAWNg','production','3876750zweTZq','919974PuuNbN'];a98_0xabdd=function(){return _0x12a825;};return a98_0xabdd();}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a98_0x37189c(0x107);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x183971=a99_0x4b51;function a99_0x1133(){const _0x3b39ae=['6779232jNdgUs','skillSource','5046876qcWPzn','5NoLcMO','npmRegistryBaseUrl','9eoMXhX','npmPackageName','2535394YVbFxp','3927090XhqmFO','/dist/lovrabet-cli/config/index.json','5669852TqKXzZ','14oacXrk','46735940WSAyMr','1008024HTZYHi'];a99_0x1133=function(){return _0x3b39ae;};return a99_0x1133();}(function(_0x57cbb1,_0x39b180){const _0x22c02b=a99_0x4b51,_0x3688c3=_0x57cbb1();while(!![]){try{const _0x5dcbb9=-parseInt(_0x22c02b(0x1d7))/0x1+parseInt(_0x22c02b(0x1d1))/0x2+parseInt(_0x22c02b(0x1cc))/0x3+parseInt(_0x22c02b(0x1d4))/0x4*(parseInt(_0x22c02b(0x1cd))/0x5)+parseInt(_0x22c02b(0x1d2))/0x6*(parseInt(_0x22c02b(0x1d5))/0x7)+parseInt(_0x22c02b(0x1d8))/0x8+-parseInt(_0x22c02b(0x1cf))/0x9*(parseInt(_0x22c02b(0x1d6))/0xa);if(_0x5dcbb9===_0x39b180)break;else _0x3688c3['push'](_0x3688c3['shift']());}catch(_0x555e37){_0x3688c3['push'](_0x3688c3['shift']());}}}(a99_0x1133,0xcda1c));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a99_0x183971(0x1d0)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a99_0x183971(0x1cb)];function a99_0x4b51(_0x19c672,_0x135e4e){_0x19c672=_0x19c672-0x1cb;const _0x11336d=a99_0x1133();let _0x4b5180=_0x11336d[_0x19c672];return _0x4b5180;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a99_0x183971(0x1ce)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG['cliCdnBaseUrl'];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a99_0x183971(0x1d3);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x22d381=a100_0x4074;(function(_0x465b30,_0x47db70){const _0x23e751=a100_0x4074,_0x3936f6=_0x465b30();while(!![]){try{const _0xaecb47=-parseInt(_0x23e751(0x193))/0x1+-parseInt(_0x23e751(0x19b))/0x2+-parseInt(_0x23e751(0x1a1))/0x3*(parseInt(_0x23e751(0x19a))/0x4)+parseInt(_0x23e751(0x1a0))/0x5*(parseInt(_0x23e751(0x19d))/0x6)+-parseInt(_0x23e751(0x197))/0x7+-parseInt(_0x23e751(0x192))/0x8+parseInt(_0x23e751(0x194))/0x9;if(_0xaecb47===_0x47db70)break;else _0x3936f6['push'](_0x3936f6['shift']());}catch(_0x2e6be2){_0x3936f6['push'](_0x3936f6['shift']());}}}(a100_0x12c5,0x5aadb));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(_0x19af12){const _0x21e77f=a100_0x4074;customApiDomain=_0x19af12?.[_0x21e77f(0x196)],customUserDomain=_0x19af12?.[_0x21e77f(0x1a3)],customRuntimeDomain=_0x19af12?.[_0x21e77f(0x198)],customSkillDomain=_0x19af12?.[_0x21e77f(0x1a2)],customKbServiceDomain=_0x19af12?.['kbServiceDomain'],allowOfficialKbServiceDefault=_0x19af12?.[_0x21e77f(0x195)]??!![],activeRegion=_0x19af12?.[_0x21e77f(0x19c)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x4482ae=a100_0x4074,_0x19fad=OFFICIAL_ROUTING_PROFILES[activeRegion]['serviceDomains'];return isProduction(getEnv())?_0x19fad[_0x4482ae(0x19f)]:_0x4482ae(0x19e)in _0x19fad?_0x19fad[_0x4482ae(0x19e)]:_0x19fad[_0x4482ae(0x19f)];};function a100_0x4074(_0x25ff02,_0x3eab85){_0x25ff02=_0x25ff02-0x192;const _0x12c571=a100_0x12c5();let _0x407488=_0x12c571[_0x25ff02];return _0x407488;}export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a100_0x22d381(0x199)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a100_0x22d381(0x1a4)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()['runtime'];function a100_0x12c5(){const _0x3f2242=['apiDomain','2002910ZBIUKH','runtimeDomain','user','184312DgsBQZ','489674SzJNbx','region','8550KWcpLy','daily','production','1375pXAnyw','3uveDfK','skillDomain','userDomain','api','kbService','640368RyFPbW','148504DjnNfv','7066251GygaER','allowOfficialKbServiceDefault'];a100_0x12c5=function(){return _0x3f2242;};return a100_0x12c5();}export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()['skill'];export const getKbServiceDomain=()=>{const _0x507fcd=a100_0x22d381;if(customKbServiceDomain)return customKbServiceDomain;if(!allowOfficialKbServiceDefault)return undefined;const _0x41ea58=getActiveRegionDomains();return _0x507fcd(0x1a5)in _0x41ea58?_0x41ea58[_0x507fcd(0x1a5)]:undefined;};
|
package/lib/constant/env.d.ts
CHANGED
|
@@ -20,16 +20,15 @@ export declare const RUNTIME_ENV_VALUES: readonly ["production", "development",
|
|
|
20
20
|
/**
|
|
21
21
|
* Normalizes a user-supplied environment string to the canonical form.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
* `.
|
|
25
|
-
*
|
|
26
|
-
* reaching downstream code that only knows the canonical set.
|
|
23
|
+
* Legacy configs use `"online"`; published Service Tree examples also use
|
|
24
|
+
* `"prod"`. Both identify production and must compare as the same environment.
|
|
25
|
+
* Unknown values stay unchanged so callers can reject unsupported bindings.
|
|
27
26
|
*
|
|
28
27
|
* @param e - Any string (including legacy aliases).
|
|
29
|
-
* @returns
|
|
28
|
+
* @returns The normalized production alias, or the original value.
|
|
30
29
|
*/
|
|
31
30
|
export declare function normalizeEnv(e: string): string;
|
|
32
|
-
/** Checks
|
|
31
|
+
/** Checks production and its legacy aliases. */
|
|
33
32
|
export declare function isProduction(e: string): boolean;
|
|
34
33
|
/** Checks whether the normalized environment is `daily`. */
|
|
35
34
|
export declare function isDaily(e: string): boolean;
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x29bd9d=a101_0x2acc;(function(_0x5482e4,_0x1382aa){const _0x49a265=a101_0x2acc,_0x200ba1=_0x5482e4();while(!![]){try{const _0x151982=parseInt(_0x49a265(0x79))/0x1+parseInt(_0x49a265(0x7a))/0x2+-parseInt(_0x49a265(0x7c))/0x3+parseInt(_0x49a265(0x82))/0x4*(parseInt(_0x49a265(0x78))/0x5)+-parseInt(_0x49a265(0x7f))/0x6+-parseInt(_0x49a265(0x77))/0x7+parseInt(_0x49a265(0x80))/0x8*(-parseInt(_0x49a265(0x75))/0x9);if(_0x151982===_0x1382aa)break;else _0x200ba1['push'](_0x200ba1['shift']());}catch(_0x1d776d){_0x200ba1['push'](_0x200ba1['shift']());}}}(a101_0x5913,0xa92c2));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a101_0x29bd9d(0x7b),a101_0x29bd9d(0x73),a101_0x29bd9d(0x81)];export function normalizeEnv(_0x195749){const _0x58eada=a101_0x29bd9d;return _0x195749===_0x58eada(0x74)||_0x195749===_0x58eada(0x76)?_0x58eada(0x7b):_0x195749;}export function isProduction(_0x28db17){const _0x2f3253=a101_0x29bd9d;return normalizeEnv(_0x28db17)===_0x2f3253(0x7b);}export function isDaily(_0x493f49){return normalizeEnv(_0x493f49)==='daily';}function a101_0x2acc(_0x6613a6,_0x4a8a02){_0x6613a6=_0x6613a6-0x73;const _0x5913c7=a101_0x5913();let _0x2acc79=_0x5913c7[_0x6613a6];return _0x2acc79;}export function isDev(_0x42d22d){const _0x2b311e=a101_0x29bd9d,_0x4c0289=normalizeEnv(_0x42d22d);return _0x4c0289===_0x2b311e(0x73)||_0x4c0289===_0x2b311e(0x7d);}let env=normalizeEnv(productEnv(a101_0x29bd9d(0x7e))||a101_0x29bd9d(0x7b));export function getEnv(){return env;}export function initEnv(_0x10dc84){env=normalizeEnv(_0x10dc84);}function a101_0x5913(){const _0x2f7110=['online','954zVwHDJ','prod','2342011xGHkzE','40SvKxyd','1301149KyfERE','1348948gVhAvK','production','2460330oUjUNv','dev','ENV','3149112fBUxYv','65752mtSkvu','daily','634028KKyTQx','development'];a101_0x5913=function(){return _0x2f7110;};return a101_0x5913();}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x122859=a102_0x1fe4;(function(_0x373d53,_0x261ddd){const _0x3bf501=a102_0x1fe4,_0x435cab=_0x373d53();while(!![]){try{const _0x362e85=parseInt(_0x3bf501(0x86))/0x1+parseInt(_0x3bf501(0x89))/0x2*(-parseInt(_0x3bf501(0x81))/0x3)+parseInt(_0x3bf501(0x8a))/0x4+parseInt(_0x3bf501(0x88))/0x5+-parseInt(_0x3bf501(0x8b))/0x6*(-parseInt(_0x3bf501(0x82))/0x7)+-parseInt(_0x3bf501(0x87))/0x8+-parseInt(_0x3bf501(0x85))/0x9;if(_0x362e85===_0x261ddd)break;else _0x435cab['push'](_0x435cab['shift']());}catch(_0x55f19b){_0x435cab['push'](_0x435cab['shift']());}}}(a102_0x4f47,0x7c659));export const OUTPUT_FORMAT_VALUES=[a102_0x122859(0x83),a102_0x122859(0x84),'compress'];function a102_0x1fe4(_0xcf587d,_0x25dea2){_0xcf587d=_0xcf587d-0x81;const _0x4f477e=a102_0x4f47();let _0x1fe47e=_0x4f477e[_0xcf587d];return _0x1fe47e;}function a102_0x4f47(){const _0x3c493f=['912OPRCRa','1702389eQzQmu','28007BZipdm','json','pretty','4540896FMiVIp','780186ecSLFi','6661232nlFfXU','1862950uwnXLk','2hjjCAr','2613048JdcOhw'];a102_0x4f47=function(){return _0x3c493f;};return a102_0x4f47();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x262d9a=a103_0x1b8a;function a103_0x5ebf(){const _0x25d526=['SKIP_NPX_SKILLS','998368ybngaR','691025DfxgNM','LOVRABET','@lovrabet/lovrabet-cli','.lovrabet-runtime.log','89419aPwqbU','Lovrabet\x20User\x20Center','174528kOhRmA','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','Lovrabet\x20Runtime\x20CLI','30638853gBUolt','/user/ak','168xoUTCY','262938VQAYps','cli:lovrabet-runtime','.lovrabet.json','envPrefix','8VLHxzq','RABETBASE','legacyEnvPrefixes','1874991LrWDoX'];a103_0x5ebf=function(){return _0x25d526;};return a103_0x5ebf();}(function(_0x204960,_0xc1b096){const _0x58970e=a103_0x1b8a,_0x507d8d=_0x204960();while(!![]){try{const _0x7d91cb=-parseInt(_0x58970e(0xaa))/0x1+-parseInt(_0x58970e(0xa5))/0x2+-parseInt(_0x58970e(0xa3))/0x3*(parseInt(_0x58970e(0xa0))/0x4)+parseInt(_0x58970e(0xa6))/0x5+-parseInt(_0x58970e(0x9c))/0x6*(parseInt(_0x58970e(0x9b))/0x7)+parseInt(_0x58970e(0xac))/0x8+parseInt(_0x58970e(0x99))/0x9;if(_0x7d91cb===_0xc1b096)break;else _0x507d8d['push'](_0x507d8d['shift']());}catch(_0x4774d4){_0x507d8d['push'](_0x507d8d['shift']());}}}(a103_0x5ebf,0xa48c5));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a103_0x262d9a(0x98),'npmPackageName':a103_0x262d9a(0xa8),'skillSource':'lovrabet/lovrabet-cli','internalSkillSource':a103_0x262d9a(0x97),'globalSkillName':'lovrabet','npmRegistryBaseUrl':'https://registry.npmjs.org','cliCdnBaseUrl':'https://g.lovrabet.com','envPrefix':a103_0x262d9a(0xa7),'legacyEnvPrefixes':[a103_0x262d9a(0xa1)],'configFileNames':[a103_0x262d9a(0x9e)],'newConfigFileName':a103_0x262d9a(0x9e),'homeDirName':'.lovrabet','logFileName':a103_0x262d9a(0xa9),'invokeSource':a103_0x262d9a(0x9d),'userCenterDisplayName':a103_0x262d9a(0xab),'skipNpxSkillsEnvSuffix':a103_0x262d9a(0xa4),'accessKeyCreatePath':a103_0x262d9a(0x9a)};export function productEnvName(_0x3e25b7){const _0xfde8c6=a103_0x262d9a;return PRODUCT_CONFIG[_0xfde8c6(0x9f)]+'_'+_0x3e25b7;}function a103_0x1b8a(_0x2fe210,_0x5758ce){_0x2fe210=_0x2fe210-0x97;const _0x5ebf4a=a103_0x5ebf();let _0x1b8a71=_0x5ebf4a[_0x2fe210];return _0x1b8a71;}export function productEnvNames(_0x535735){const _0x41a0c5=a103_0x262d9a;return[productEnvName(_0x535735),...PRODUCT_CONFIG[_0x41a0c5(0xa2)]['map'](_0x5a10ba=>_0x5a10ba+'_'+_0x535735)];}export function productEnv(_0x3243b5){for(const _0x3fdb0d of productEnvNames(_0x3243b5)){const _0x33eefb=process.env[_0x3fdb0d];if(_0x33eefb!==undefined)return _0x33eefb;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d5cac,_0x47b13f){const _0x564085=a104_0x4918,_0x813902=_0x1d5cac();while(!![]){try{const _0x152781=parseInt(_0x564085(0x93))/0x1+-parseInt(_0x564085(0x9b))/0x2+-parseInt(_0x564085(0x8f))/0x3*(-parseInt(_0x564085(0x94))/0x4)+parseInt(_0x564085(0x98))/0x5+parseInt(_0x564085(0x8d))/0x6*(-parseInt(_0x564085(0x8c))/0x7)+parseInt(_0x564085(0x95))/0x8+parseInt(_0x564085(0x99))/0x9*(-parseInt(_0x564085(0x9d))/0xa);if(_0x152781===_0x47b13f)break;else _0x813902['push'](_0x813902['shift']());}catch(_0x3c220a){_0x813902['push'](_0x813902['shift']());}}}(a104_0x4378,0x56b1a));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';import{CliErrors}from'../errors.js';function a104_0x4918(_0x287c52,_0x37367e){_0x287c52=_0x287c52-0x8b;const _0x43787b=a104_0x4378();let _0x491816=_0x43787b[_0x287c52];return _0x491816;}export const LOVRABET_REGION_VALUES=REGION_VALUES;function a104_0x4378(){const _0x1d3e67=['Region\x20\x22','650030fptacE','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','299089XJoCAk','90TzsKfS','.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.','18eJZQdI','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','includes','validation','465241BkkZaQ','422912oJrzli','4994144InHHdH','string','\x22\x20is\x20not\x20currently\x20available.','3482270lUMlsv','171iByQBI','join','378542KoNikn'];a104_0x4378=function(){return _0x1d3e67;};return a104_0x4378();}export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x2a7fd7){const _0x11688=a104_0x4918;return typeof _0x2a7fd7===_0x11688(0x96)&&LOVRABET_REGION_VALUES[_0x11688(0x91)](_0x2a7fd7);}export function isEnabledLovrabetRegion(_0x4c3657){const _0x435d86=a104_0x4918;return typeof _0x4c3657===_0x435d86(0x96)&&ENABLED_LOVRABET_REGION_VALUES['includes'](_0x4c3657);}export function normalizeLovrabetRegion(_0xbb43f7){const _0x194def=a104_0x4918;if(_0xbb43f7===undefined||_0xbb43f7===null||_0xbb43f7==='')return DEFAULT_LOVRABET_REGION;if(typeof _0xbb43f7!==_0x194def(0x96))throw CliErrors[_0x194def(0x92)](_0x194def(0x90)+typeof _0xbb43f7+'.',_0x194def(0x8b));const _0x279666=REGION_ALIASES[_0xbb43f7]??_0xbb43f7;if(isEnabledLovrabetRegion(_0x279666))return _0x279666;throw CliErrors['validation'](_0x194def(0x9c)+_0xbb43f7+_0x194def(0x97),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x194def(0x9a)](',\x20')+_0x194def(0x8e));}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x347dd6=a105_0x243c;(function(_0x57bd0d,_0x17c18c){const _0x1eb0a4=a105_0x243c,_0x579b13=_0x57bd0d();while(!![]){try{const _0x297b81=-parseInt(_0x1eb0a4(0x1e8))/0x1+-parseInt(_0x1eb0a4(0x1e4))/0x2+-parseInt(_0x1eb0a4(0x1ea))/0x3*(parseInt(_0x1eb0a4(0x1e7))/0x4)+-parseInt(_0x1eb0a4(0x1eb))/0x5+parseInt(_0x1eb0a4(0x1e2))/0x6+-parseInt(_0x1eb0a4(0x1e3))/0x7+parseInt(_0x1eb0a4(0x1e6))/0x8;if(_0x297b81===_0x17c18c)break;else _0x579b13['push'](_0x579b13['shift']());}catch(_0x4e4a2b){_0x579b13['push'](_0x579b13['shift']());}}}(a105_0x4203,0x3b83a));function a105_0x4203(){const _0x5130f1=['945620zXwzXZ','high-risk-write','1029120lPkvVZ','833896LWOlWt','515762VVyfdl','write','12518672iPxMzt','52bXruRf','450196qKwiux','read','109905Xdkplq'];a105_0x4203=function(){return _0x5130f1;};return a105_0x4203();}function a105_0x243c(_0x4a7373,_0x219ec1){_0x4a7373=_0x4a7373-0x1e2;const _0x42034f=a105_0x4203();let _0x243c53=_0x42034f[_0x4a7373];return _0x243c53;}export const RISK_LEVEL_VALUES=[a105_0x347dd6(0x1e9),a105_0x347dd6(0x1e5),a105_0x347dd6(0x1ec)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x61ea88,_0x3784be){const _0x2507c0=a106_0x32b3,_0x414157=_0x61ea88();while(!![]){try{const _0x725b13=-parseInt(_0x2507c0(0x1ac))/0x1*(-parseInt(_0x2507c0(0x1ae))/0x2)+-parseInt(_0x2507c0(0x1b3))/0x3+parseInt(_0x2507c0(0x1b6))/0x4*(parseInt(_0x2507c0(0x1ad))/0x5)+-parseInt(_0x2507c0(0x1b5))/0x6+-parseInt(_0x2507c0(0x1b0))/0x7+-parseInt(_0x2507c0(0x1a9))/0x8*(parseInt(_0x2507c0(0x1b2))/0x9)+parseInt(_0x2507c0(0x1b1))/0xa;if(_0x725b13===_0x3784be)break;else _0x414157['push'](_0x414157['shift']());}catch(_0x3614df){_0x414157['push'](_0x414157['shift']());}}}(a106_0x349b,0xd3c00));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(_0x4a8409=DEFAULT_LOVRABET_REGION){const _0x43d743=a106_0x32b3,_0xc8f698=OFFICIAL_ROUTING_PROFILES[_0x4a8409][_0x43d743(0x1af)][_0x43d743(0x1aa)][_0x43d743(0x1b4)];return''+_0xc8f698+PRODUCT_CONFIG[_0x43d743(0x1ab)];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();function a106_0x32b3(_0x3f6878,_0x13c3a3){_0x3f6878=_0x3f6878-0x1a9;const _0x349bac=a106_0x349b();let _0x32b314=_0x349bac[_0x3f6878];return _0x32b314;}function a106_0x349b(){const _0x2d821c=['accessKeyCreatePath','1HQcTzT','5RAVVns','1659596tmdOYn','serviceDomains','940415jtFkOI','15957990iUZLbP','34119WIorJj','501573DJcZVz','user','3467898badBzR','3896504hrAxYY','3488QUFbtu','production'];a106_0x349b=function(){return _0x2d821c;};return a106_0x349b();}
|
package/lib/context.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export interface CLIConfig {
|
|
|
61
61
|
locale: string;
|
|
62
62
|
cookie: string | undefined;
|
|
63
63
|
accessKey: string | undefined;
|
|
64
|
+
/** Credential location only; never includes credential content. */
|
|
65
|
+
accessKeySource?: string;
|
|
64
66
|
format: OutputFormat | undefined;
|
|
65
67
|
pageSize: number | undefined;
|
|
66
68
|
riskLevel: Risk;
|
|
@@ -180,19 +182,7 @@ export declare function getLocalAppAliases(raw: Record<string, any>): Record<str
|
|
|
180
182
|
* @returns App code from `apps.<name>.appcode`, or undefined when not configured.
|
|
181
183
|
*/
|
|
182
184
|
export declare function resolveLocalAppAliasCode(raw: Record<string, any>, name: string | undefined): string | undefined;
|
|
183
|
-
/**
|
|
184
|
-
* Reads the appCode from the config file (fallback path, used when no flag is provided).
|
|
185
|
-
*
|
|
186
|
-
* Resolution order:
|
|
187
|
-
* 1. Top-level `appcode` or `app` field
|
|
188
|
-
* 2. `defaultApp` local alias profile's `appcode`
|
|
189
|
-
* 3. Cached remote app list (resolved by app name)
|
|
190
|
-
* 4. First local alias profile's `appcode`
|
|
191
|
-
*
|
|
192
|
-
* Why this fallback exists: commands that don't receive `--appcode` can still
|
|
193
|
-
* resolve it from the config. This enables the "just run `lovrabet dataset list`"
|
|
194
|
-
* UX where the active app is implied by the config.
|
|
195
|
-
*/
|
|
185
|
+
/** Reads the current app using the same selection rules as command execution. */
|
|
196
186
|
export declare function readAppCodeFromConfig(): string | undefined;
|
|
197
187
|
/**
|
|
198
188
|
* Reads the config file for a specific scope (global or project).
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a107_0x5136b4=a107_0x3646;(function(_0x57c679,_0x73631d){const _0x82daaa=a107_0x3646,_0x17eedb=_0x57c679();while(!![]){try{const _0x245556=parseInt(_0x82daaa(0x157))/0x1+-parseInt(_0x82daaa(0x18f))/0x2+-parseInt(_0x82daaa(0x174))/0x3*(-parseInt(_0x82daaa(0x186))/0x4)+parseInt(_0x82daaa(0x18d))/0x5+-parseInt(_0x82daaa(0x19e))/0x6+parseInt(_0x82daaa(0x196))/0x7+-parseInt(_0x82daaa(0x18e))/0x8*(-parseInt(_0x82daaa(0x16d))/0x9);if(_0x245556===_0x73631d)break;else _0x17eedb['push'](_0x17eedb['shift']());}catch(_0x22bed8){_0x17eedb['push'](_0x17eedb['shift']());}}}(a107_0x2b2b,0xa720b));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';function a107_0x3646(_0x51026f,_0x3f8260){_0x51026f=_0x51026f-0x151;const _0x2b2b12=a107_0x2b2b();let _0x36464a=_0x2b2b12[_0x51026f];return _0x36464a;}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[a107_0x5136b4(0x15c)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a107_0x5136b4(0x16f)];function resolveConfigPath(_0x192a6d){for(const _0x5948fe of CONFIG_NAMES){const _0x2ff5a3=resolve(_0x192a6d,_0x5948fe);if(existsSync(_0x2ff5a3))return _0x2ff5a3;}return undefined;}function a107_0x2b2b(){const _0x126052=['development','globalConfig','accessKey','ACCESS_KEY','read','project','runtimeDomain','daily','production','58809LrqjFY','online','skillHubDomain','inherit','global','configFileNames','FORMAT','apps','high-risk-write','trim','./constant/env.js','APPCODE','authRequired','defaultApp','stringify','locale','setRawMode','cache','apiDomain','VERBOSE','userDomain','object','292716UMwcsK','host','newConfigFileName','call','find','hasOwnProperty','routing','3PzOEYI','values','appcode','setLogPath','stdin','parse','argv','riskLevel','cwd','raw','isRaw','kbServiceDomain','.tmp','nativeToolAvailable','platformDomain','skillDomain','local-alias','EXDEV','905956aGLdMj','some','agentDomain','EACCES','prototype','nonInteractive','true','4549870jWuAuH','8QkoByo','1022420bfNaFf','message','format','env','code','missing','app','8859298fNsfFG','utf8','EPERM','ENV','APP','isTTY','kbDomain','string','7785870CspWKF','stdout'];a107_0x2b2b=function(){return _0x126052;};return a107_0x2b2b();}export function resolveWriteConfigPath(_0x33d9ff){const _0x24ae3e=a107_0x5136b4,_0x5387ef=_0x33d9ff===_0x24ae3e(0x153)?process[_0x24ae3e(0x17c)]():homedir(),_0x55c9f2=resolveConfigPath(_0x5387ef);return _0x55c9f2??resolve(_0x5387ef,NEW_CONFIG_NAME);}export function readConfigFile(_0x4e60f2){const _0x1182a7=a107_0x5136b4;try{if(existsSync(_0x4e60f2)){const _0xc7e21=readFileSync(_0x4e60f2,{'encoding':_0x1182a7(0x197)});if(_0xc7e21){const _0x9a130d=JSON[_0x1182a7(0x179)](_0xc7e21);return migrateOnlineEnv(_0x4e60f2,_0x9a130d),_0x9a130d;}}}catch{}return{};}function migrateOnlineEnv(_0x9d1db4,_0x444d00){const _0x3126df=a107_0x5136b4;let _0x1f1a63=![];_0x444d00['env']===_0x3126df(0x158)&&(_0x444d00['env']=_0x3126df(0x156),_0x1f1a63=!![]);if(_0x444d00[_0x3126df(0x15e)]&&typeof _0x444d00['apps']===_0x3126df(0x16c))for(const _0x5d30e7 of Object[_0x3126df(0x175)](_0x444d00[_0x3126df(0x15e)])){_0x5d30e7&&_0x5d30e7[_0x3126df(0x192)]===_0x3126df(0x158)&&(_0x5d30e7[_0x3126df(0x192)]=_0x3126df(0x156),_0x1f1a63=!![]);}if(_0x1f1a63)try{writeConfigFile(_0x9d1db4,_0x444d00);}catch{}}export function writeConfigFile(_0x32cdc9,_0x429e0e){const _0x2db8a8=a107_0x5136b4,_0x1084f5=dirname(_0x32cdc9);!existsSync(_0x1084f5)&&mkdirSync(_0x1084f5,{'recursive':!![]});const _0x1536a3=_0x32cdc9+_0x2db8a8(0x180);try{writeFileSync(_0x1536a3,JSON[_0x2db8a8(0x165)](_0x429e0e,null,0x2)+'\x0a',{'encoding':_0x2db8a8(0x197),'mode':0x180});try{renameSync(_0x1536a3,_0x32cdc9);}catch(_0x3f8e4c){if(_0x3f8e4c[_0x2db8a8(0x193)]===_0x2db8a8(0x198)||_0x3f8e4c[_0x2db8a8(0x193)]===_0x2db8a8(0x185)||_0x3f8e4c['code']===_0x2db8a8(0x189)){writeFileSync(_0x32cdc9,JSON[_0x2db8a8(0x165)](_0x429e0e,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x1536a3);}catch{}}else throw _0x3f8e4c;}}catch(_0x1eb6e7){try{unlinkSync(_0x1536a3);}catch{}throw _0x1eb6e7;}}export function isNonInteractiveMode(_0xf9d206){const _0x275226=a107_0x5136b4;return!!(_0xf9d206[_0x275226(0x18b)]||_0xf9d206['ci']||productEnvNames('CI')['some'](_0xc4b197=>process.env[_0xc4b197]===_0x275226(0x18c))||process.env.CI===_0x275226(0x18c)||!process[_0x275226(0x19f)][_0x275226(0x19b)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x381e9c=a107_0x5136b4;if(!process[_0x381e9c(0x178)]['isTTY'])return![];try{const _0x918126=process[_0x381e9c(0x178)][_0x381e9c(0x17e)];return process[_0x381e9c(0x178)][_0x381e9c(0x167)](!![]),process[_0x381e9c(0x178)]['setRawMode'](_0x918126??![]),!![];}catch{return![];}}export async function createContext(_0xc138cd){const _0x1704f0=a107_0x5136b4,_0x8367de=readRawConfig(),_0x8fc7aa=buildConfig(_0x8367de,_0xc138cd);await initGlobalEnvironment(_0x8fc7aa);const {getUserDomain:_0x2ef87f,getApiDomain:_0x5cb61a}=await import('./constant/domain.js'),_0x100d74={'apiDomain':_0x5cb61a(),'userDomain':_0x2ef87f()},_0x16a832=await buildAuth(_0x8fc7aa);logger[_0x1704f0(0x177)](process[_0x1704f0(0x17c)]());const _0x3fa51f=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x1704f0(0x17a)]['slice'](0x2))['join']('\x20'))[_0x1704f0(0x160)]();logger['setRawCommand'](_0x3fa51f);const _0x4d6c68=isNonInteractiveMode(_0xc138cd);return{'config':_0x8fc7aa,'auth':_0x16a832,'logger':logger,'env':_0x100d74,'nonInteractive':_0x4d6c68};}export function buildConfigFromFlags(_0x5aaaf0){return buildConfig(readRawConfig(),_0x5aaaf0);}export function getLocalAppAliases(_0x1e28ec){const _0x3e8486=a107_0x5136b4;return _0x1e28ec[_0x3e8486(0x15e)]&&typeof _0x1e28ec[_0x3e8486(0x15e)]===_0x3e8486(0x16c)?_0x1e28ec[_0x3e8486(0x15e)]:{};}export function resolveLocalAppAliasCode(_0x3bddda,_0x2a16b5){const _0x5f00ae=a107_0x5136b4;if(!_0x2a16b5)return undefined;const _0x9b5842=getLocalAppAliases(_0x3bddda)[_0x2a16b5],_0x3ddb34=_0x9b5842?.[_0x5f00ae(0x176)];return typeof _0x3ddb34===_0x5f00ae(0x19d)&&_0x3ddb34['trim']()?_0x3ddb34[_0x5f00ae(0x160)]():undefined;}export function readAppCodeFromConfig(){const _0x14a1cc=a107_0x5136b4,_0x5341bc=readRawConfig(),_0x6a1504=_0x5341bc['appcode']??_0x5341bc[_0x14a1cc(0x195)];if(typeof _0x6a1504===_0x14a1cc(0x19d)&&_0x6a1504['trim']())return _0x6a1504['trim']();const _0x3b2180=resolveLocalAppAliasCode(_0x5341bc,typeof _0x5341bc['defaultApp']===_0x14a1cc(0x19d)?_0x5341bc[_0x14a1cc(0x164)]:undefined);if(_0x3b2180)return _0x3b2180;const _0x1e34b3=normalizeEnv(String(_0x5341bc[_0x14a1cc(0x192)]||'production')),_0x207c26=isDaily(_0x1e34b3)?_0x14a1cc(0x155):isDev(_0x1e34b3)?'development':'production',_0x374322=resolveCachedAppCode(typeof _0x5341bc[_0x14a1cc(0x164)]==='string'?_0x5341bc[_0x14a1cc(0x164)]:undefined,_0x207c26,typeof _0x5341bc[_0x14a1cc(0x1a2)]==='string'?_0x5341bc[_0x14a1cc(0x1a2)]:undefined);if(_0x374322)return _0x374322;const _0x5e5075=Object[_0x14a1cc(0x175)](getLocalAppAliases(_0x5341bc))[_0x14a1cc(0x171)](_0x33ae6e=>_0x33ae6e?.['appcode']);return typeof _0x5e5075?.[_0x14a1cc(0x176)]===_0x14a1cc(0x19d)&&_0x5e5075[_0x14a1cc(0x176)][_0x14a1cc(0x160)]()?_0x5e5075[_0x14a1cc(0x176)][_0x14a1cc(0x160)]():undefined;}export function readScopedConfig(_0xb1b60f){const _0x49664a=a107_0x5136b4,_0x562c98=_0xb1b60f[_0x49664a(0x15b)]?_0x49664a(0x15b):'project';return readConfigFile(resolveWriteConfigPath(_0x562c98));}export function writeScopedConfig(_0xb7a4da,_0xfc54b7){const _0x41b6cb=a107_0x5136b4,_0x2f59e8=_0xfc54b7[_0x41b6cb(0x15b)]?_0x41b6cb(0x15b):_0x41b6cb(0x153);writeConfigFile(resolveWriteConfigPath(_0x2f59e8),_0xb7a4da);}export async function initGlobalEnvironment(_0x19ddac){const _0x54e58a=a107_0x5136b4,{initEnv:_0x3b944b}=await import(_0x54e58a(0x161));_0x3b944b(_0x19ddac[_0x54e58a(0x192)]);const {initDomains:_0x3bd099}=await import('./constant/domain.js'),_0xbc4f54=resolveEnterpriseRoutingConfig(_0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x173)]),_0x2dd210=[_0x54e58a(0x169),_0x54e58a(0x16e),_0x54e58a(0x16b),_0x54e58a(0x154),_0x54e58a(0x183),'skillHubDomain',_0x54e58a(0x188),_0x54e58a(0x182),_0x54e58a(0x19c),'kbServiceDomain'],_0x10ae98=_0xbc4f54!==undefined||_0x2dd210[_0x54e58a(0x187)](_0x426e45=>Object[_0x54e58a(0x18a)][_0x54e58a(0x172)][_0x54e58a(0x170)](_0x19ddac['raw'],_0x426e45));_0x3bd099({'apiDomain':_0xbc4f54?_0xbc4f54[_0x54e58a(0x169)]:_0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x169)]||_0x19ddac['raw']['host']||undefined,'userDomain':_0xbc4f54?_0xbc4f54['userDomain']:_0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x16b)]||undefined,'runtimeDomain':_0xbc4f54?_0xbc4f54['runtimeDomain']:_0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x154)]||undefined,'skillDomain':_0xbc4f54?_0xbc4f54[_0x54e58a(0x183)]:_0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x183)]||_0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x159)]||_0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x188)]||_0x19ddac['raw'][_0x54e58a(0x182)]||undefined,'kbServiceDomain':_0xbc4f54?_0xbc4f54[_0x54e58a(0x17f)]:typeof _0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x17f)]===_0x54e58a(0x19d)&&_0x19ddac[_0x54e58a(0x17d)][_0x54e58a(0x17f)][_0x54e58a(0x160)]()?_0x19ddac['raw'][_0x54e58a(0x17f)]:undefined,'allowOfficialKbServiceDefault':!_0x10ae98,'region':normalizeLovrabetRegion(_0x19ddac[_0x54e58a(0x17d)]['region'])});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x123094){const _0x5d6f5e=a107_0x5136b4;if(!existsSync(_0x123094))return{'status':_0x5d6f5e(0x194)};try{const _0x4ad50a=readFileSync(_0x123094,{'encoding':_0x5d6f5e(0x197)});if(!_0x4ad50a?.[_0x5d6f5e(0x160)]())return{'status':'empty'};const _0x21983e=JSON[_0x5d6f5e(0x179)](_0x4ad50a);return{'status':'ok','data':_0x21983e};}catch(_0x1b3d76){return{'status':'error','message':_0x1b3d76 instanceof Error?_0x1b3d76[_0x5d6f5e(0x190)]:String(_0x1b3d76)};}}export function loadRawConfigLayers(_0x5717ff){const _0xf36567=a107_0x5136b4;let _0x15334c={},_0x51205f={},_0x37904c,_0x1c5e1c;try{_0x37904c=resolveConfigPath(homedir());if(_0x37904c){const _0x11df9f=readFileSync(_0x37904c,{'encoding':_0xf36567(0x197)});if(_0x11df9f)_0x15334c=JSON[_0xf36567(0x179)](_0x11df9f);}}catch{}try{const _0x603fa8=_0x5717ff||process['cwd']();_0x1c5e1c=resolveConfigPath(_0x603fa8);if(_0x1c5e1c){const _0x137c41=readFileSync(_0x1c5e1c,{'encoding':_0xf36567(0x197)});if(_0x137c41)_0x51205f=JSON[_0xf36567(0x179)](_0x137c41);}}catch{}return{'globalPath':_0x37904c,'projectPath':_0x1c5e1c,'globalConfig':_0x15334c,'projectConfig':_0x51205f};}function mergeRawConfigLayers(_0x103137){const _0x3585d8=a107_0x5136b4,{globalConfig:_0x5239ae,projectConfig:_0x19318a}=_0x103137,_0x52f68b={..._0x5239ae,..._0x19318a};delete _0x52f68b[_0x3585d8(0x15a)];if(_0x3585d8(0x164)in _0x19318a)_0x52f68b[_0x3585d8(0x164)]=_0x19318a[_0x3585d8(0x164)];else _0x5239ae['defaultApp']&&(_0x52f68b[_0x3585d8(0x164)]=_0x5239ae[_0x3585d8(0x164)]);return _0x52f68b;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x17d2d2){return mergeRawConfigLayers(loadRawConfigLayers(_0x17d2d2));}export function readRawConfigWithLayers(_0x16e105){const _0x5afc29=loadRawConfigLayers(_0x16e105);return{'config':mergeRawConfigLayers(_0x5afc29),'layers':_0x5afc29};}export function resolveDefaultAppSource(_0x5b4381){const _0x5e0b8d=a107_0x5136b4;if('defaultApp'in _0x5b4381['projectConfig'])return _0x5e0b8d(0x153);if(_0x5b4381[_0x5e0b8d(0x1a1)][_0x5e0b8d(0x164)])return _0x5e0b8d(0x15b);return null;}function buildConfig(_0x5541c1,_0x46ee5c){const _0x3277c9=a107_0x5136b4,_0x11adc0=_0x5541c1[_0x3277c9(0x164)]||undefined,_0x4d8047=_0x46ee5c['app']||env(_0x3277c9(0x19a))||undefined,_0x5a6910=_0x4d8047||_0x11adc0||undefined,_0x1bdd4d=env(_0x3277c9(0x151))||_0x5541c1[_0x3277c9(0x1a2)]||undefined,_0x222f4f=_0x46ee5c[_0x3277c9(0x192)]||env(_0x3277c9(0x199))||_0x5541c1['env']||DEFAULT_CONFIG_VALUES['env'],_0x8ce653=normalizeEnv(String(_0x222f4f)),_0x2819e1=isDaily(_0x8ce653)?_0x3277c9(0x155):isDev(_0x8ce653)?_0x3277c9(0x1a0):'production',_0x3951b6=typeof _0x46ee5c[_0x3277c9(0x176)]===_0x3277c9(0x19d)?_0x46ee5c[_0x3277c9(0x176)]:undefined,_0x47017e=env(_0x3277c9(0x162)),_0x129a22=_0x4d8047?undefined:_0x5541c1[_0x3277c9(0x176)]||_0x5541c1[_0x3277c9(0x195)]||undefined,_0x13e0d7=_0x4d8047||(_0x129a22?undefined:_0x11adc0),_0x3cdf72=resolveLocalAppAliasCode(_0x5541c1,_0x13e0d7),_0x16bc9e=resolveCachedAppCode(_0x13e0d7,_0x2819e1,_0x1bdd4d),_0x21a288=_0x3951b6||_0x47017e||_0x129a22||_0x3cdf72||_0x16bc9e||undefined,_0x5851e3=_0x3951b6?'explicit':_0x47017e?_0x3277c9(0x192):_0x129a22?'top-level':_0x3cdf72?_0x3277c9(0x184):_0x16bc9e?_0x3277c9(0x168):undefined,_0x3ece9b=_0x5541c1[_0x3277c9(0x166)]||DEFAULT_CONFIG_VALUES['locale'],_0x2295fe=undefined,_0x35abf9=_0x46ee5c['format']||env(_0x3277c9(0x15d))||_0x5541c1[_0x3277c9(0x191)],_0x4228a2=normalizeLegacyOutputFormat(_0x35abf9),_0x542863=env('PAGE_SIZE')||_0x5541c1['pageSize'],_0x4ec204=_0x542863?Number(_0x542863)||undefined:undefined,_0x5725aa=_0x5541c1[_0x3277c9(0x17b)],_0x28588e=_0x5725aa===_0x3277c9(0x152)||_0x5725aa==='write'||_0x5725aa===_0x3277c9(0x15f)?_0x5725aa:DEFAULT_CONFIG_VALUES[_0x3277c9(0x17b)],_0x1cabcb=_0x5541c1[_0x3277c9(0x181)]===!![],_0x221655=env(_0x3277c9(0x16a)),_0x37e8a9=_0x221655==='1'||_0x221655===_0x3277c9(0x18c);return{'appCode':typeof _0x21a288===_0x3277c9(0x19d)&&_0x21a288[_0x3277c9(0x160)]()?_0x21a288[_0x3277c9(0x160)]():undefined,'appCodeSource':_0x5851e3,'env':_0x2819e1,'locale':_0x3ece9b,'cookie':_0x2295fe,'accessKey':_0x1bdd4d,'format':_0x4228a2,'pageSize':_0x4ec204,'riskLevel':_0x28588e,'nativeToolAvailable':_0x1cabcb,'verbose':_0x37e8a9,'defaultApp':_0x11adc0,'currentApp':typeof _0x5a6910===_0x3277c9(0x19d)?_0x5a6910:undefined,'raw':_0x5541c1};}function env(_0x533fbf){return productEnv(_0x533fbf);}async function buildAuth(_0xbf0221){const _0x465375=a107_0x5136b4,_0x7fae33='',_0x4062b6=!!_0xbf0221[_0x465375(0x1a2)];return{'cookie':_0x7fae33,'isLoggedIn':_0x4062b6,async 'getOrLogin'(){const _0xb1fe28=_0x465375;if(_0x4062b6)return _0x7fae33;throw CliErrors[_0xb1fe28(0x163)]();}};}
|
|
1
|
+
(function(_0x242c76,_0x4acd4f){const _0x25a74b=a107_0x445c,_0x3ae2a4=_0x242c76();while(!![]){try{const _0x57253d=-parseInt(_0x25a74b(0xbc))/0x1+parseInt(_0x25a74b(0xf1))/0x2+parseInt(_0x25a74b(0xe9))/0x3*(-parseInt(_0x25a74b(0xb8))/0x4)+parseInt(_0x25a74b(0xdf))/0x5*(-parseInt(_0x25a74b(0xac))/0x6)+parseInt(_0x25a74b(0xdb))/0x7+parseInt(_0x25a74b(0xd1))/0x8+-parseInt(_0x25a74b(0xc8))/0x9*(parseInt(_0x25a74b(0xb4))/0xa);if(_0x57253d===_0x4acd4f)break;else _0x3ae2a4['push'](_0x3ae2a4['shift']());}catch(_0x27f5d1){_0x3ae2a4['push'](_0x3ae2a4['shift']());}}}(a107_0x5907,0x354bf));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(_0x182920){for(const _0x3a480a of CONFIG_NAMES){const _0x468190=resolve(_0x182920,_0x3a480a);if(existsSync(_0x468190))return _0x468190;}return undefined;}export function resolveWriteConfigPath(_0x5bf8eb){const _0x1dbea4=a107_0x445c,_0x438a4c=_0x5bf8eb==='project'?process[_0x1dbea4(0xf2)]():homedir(),_0x2fe2b0=resolveConfigPath(_0x438a4c);return _0x2fe2b0??resolve(_0x438a4c,NEW_CONFIG_NAME);}export function readConfigFile(_0x45a5eb){const _0x1ab691=a107_0x445c;try{if(existsSync(_0x45a5eb)){const _0x412255=readFileSync(_0x45a5eb,{'encoding':_0x1ab691(0xb0)});if(_0x412255){const _0x238e9f=JSON[_0x1ab691(0xb6)](_0x412255);return migrateOnlineEnv(_0x45a5eb,_0x238e9f),_0x238e9f;}}}catch{}return{};}function migrateOnlineEnv(_0x497c62,_0xd02858){const _0x19eb0c=a107_0x445c;let _0x47770d=![];_0xd02858['env']===_0x19eb0c(0xc3)&&(_0xd02858[_0x19eb0c(0xbb)]=_0x19eb0c(0xe1),_0x47770d=!![]);if(_0xd02858[_0x19eb0c(0xe8)]&&typeof _0xd02858[_0x19eb0c(0xe8)]===_0x19eb0c(0xce))for(const _0x213df6 of Object[_0x19eb0c(0xf6)](_0xd02858[_0x19eb0c(0xe8)])){_0x213df6&&_0x213df6['env']===_0x19eb0c(0xc3)&&(_0x213df6[_0x19eb0c(0xbb)]=_0x19eb0c(0xe1),_0x47770d=!![]);}if(_0x47770d)try{writeConfigFile(_0x497c62,_0xd02858);}catch{}}function a107_0x5907(){const _0x5937ee=['riskLevel','stdout','format','5070maviMF','host','production','isRaw','app','global','top-level','stringify','find','apps','438612buMmzA','code','inherit','kbServiceDomain','runtimeDomain','project','userDomain','.tmp','858734QdRspc','cwd','defaultApp','routing','hasOwnProperty','values','raw','prototype','accessKey','EACCES','APPCODE','./constant/domain.js','skillDomain','696GjqYCH','project\x20config','locale','EPERM','utf8','./constant/env.js','read','pageSize','1338630GsCYWq','slice','parse','cache','4qfuLIP','isTTY','write','env','98680dbOLwF','argv','setRawMode','setRawCommand','apiDomain','appCode','kbDomain','online','call','string','message','true','36fSzJHF','trim','setLogPath','region','daily','empty','object','VERBOSE','appcode','2120776BzViIV','local-alias','platformDomain','explicit','high-risk-write','some','skillHubDomain','projectConfig','nativeToolAvailable','stdin','2952593eyxQFG'];a107_0x5907=function(){return _0x5937ee;};return a107_0x5907();}export function writeConfigFile(_0x83dcca,_0x4633e){const _0x5adc8d=a107_0x445c,_0x3e7d93=dirname(_0x83dcca);!existsSync(_0x3e7d93)&&mkdirSync(_0x3e7d93,{'recursive':!![]});const _0x48c791=_0x83dcca+_0x5adc8d(0xf0);try{writeFileSync(_0x48c791,JSON[_0x5adc8d(0xe6)](_0x4633e,null,0x2)+'\x0a',{'encoding':_0x5adc8d(0xb0),'mode':0x180});try{renameSync(_0x48c791,_0x83dcca);}catch(_0x630870){if(_0x630870[_0x5adc8d(0xea)]===_0x5adc8d(0xaf)||_0x630870[_0x5adc8d(0xea)]==='EXDEV'||_0x630870[_0x5adc8d(0xea)]===_0x5adc8d(0xfa)){writeFileSync(_0x83dcca,JSON[_0x5adc8d(0xe6)](_0x4633e,null,0x2)+'\x0a',{'encoding':_0x5adc8d(0xb0)});try{unlinkSync(_0x48c791);}catch{}}else throw _0x630870;}}catch(_0x1548ed){try{unlinkSync(_0x48c791);}catch{}throw _0x1548ed;}}export function isNonInteractiveMode(_0xcd61ef){const _0x1952af=a107_0x445c;return!!(_0xcd61ef['nonInteractive']||_0xcd61ef['ci']||productEnvNames('CI')[_0x1952af(0xd6)](_0x306de0=>process.env[_0x306de0]===_0x1952af(0xc7))||process.env.CI==='true'||!process[_0x1952af(0xdd)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x3f4a11=a107_0x445c;if(!process[_0x3f4a11(0xda)][_0x3f4a11(0xb9)])return![];try{const _0x3b415e=process[_0x3f4a11(0xda)][_0x3f4a11(0xe2)];return process[_0x3f4a11(0xda)][_0x3f4a11(0xbe)](!![]),process[_0x3f4a11(0xda)][_0x3f4a11(0xbe)](_0x3b415e??![]),!![];}catch{return![];}}export async function createContext(_0x4c1fc1){const _0x42ef57=a107_0x445c,_0x59fe2a=buildConfigFromFlags(_0x4c1fc1);await initGlobalEnvironment(_0x59fe2a);const {getUserDomain:_0x3f7b99,getApiDomain:_0x22772a}=await import(_0x42ef57(0xfc)),_0x14b598={'apiDomain':_0x22772a(),'userDomain':_0x3f7b99()},_0x2a0885=await buildAuth(_0x59fe2a);logger[_0x42ef57(0xca)](process[_0x42ef57(0xf2)]());const _0x105d30=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x42ef57(0xbd)][_0x42ef57(0xb5)](0x2))['join']('\x20'))[_0x42ef57(0xc9)]();logger[_0x42ef57(0xbf)](_0x105d30);const _0x4f64c2=isNonInteractiveMode(_0x4c1fc1);return{'config':_0x59fe2a,'auth':_0x2a0885,'logger':logger,'env':_0x14b598,'nonInteractive':_0x4f64c2};}export function buildConfigFromFlags(_0x15dfdf){return buildConfig(loadRawConfigLayers(),_0x15dfdf);}export function getLocalAppAliases(_0x491a0b){const _0x4ae39b=a107_0x445c;return _0x491a0b['apps']&&typeof _0x491a0b[_0x4ae39b(0xe8)]===_0x4ae39b(0xce)?_0x491a0b[_0x4ae39b(0xe8)]:{};}function a107_0x445c(_0x474850,_0x3f4f44){_0x474850=_0x474850-0xac;const _0x5907f7=a107_0x5907();let _0x445cd6=_0x5907f7[_0x474850];return _0x445cd6;}export function resolveLocalAppAliasCode(_0x2ebca6,_0x3a311e){const _0x17167b=a107_0x445c;if(!_0x3a311e)return undefined;const _0x12d892=getLocalAppAliases(_0x2ebca6)[_0x3a311e],_0x30f4a5=_0x12d892?.[_0x17167b(0xd0)];return typeof _0x30f4a5===_0x17167b(0xc5)&&_0x30f4a5[_0x17167b(0xc9)]()?_0x30f4a5[_0x17167b(0xc9)]():undefined;}export function readAppCodeFromConfig(){const _0x58b679=a107_0x445c;return buildConfigFromFlags({})[_0x58b679(0xc1)];}export function readScopedConfig(_0x1582a1){const _0x4c0a70=a107_0x445c,_0x1eee50=_0x1582a1['global']?_0x4c0a70(0xe4):'project';return readConfigFile(resolveWriteConfigPath(_0x1eee50));}export function writeScopedConfig(_0x26bbe3,_0x51216f){const _0x3ef56e=a107_0x445c,_0x4ba298=_0x51216f[_0x3ef56e(0xe4)]?_0x3ef56e(0xe4):_0x3ef56e(0xee);writeConfigFile(resolveWriteConfigPath(_0x4ba298),_0x26bbe3);}export async function initGlobalEnvironment(_0x2f3ae9){const _0x5353db=a107_0x445c,{initEnv:_0x2c3210}=await import(_0x5353db(0xb1));_0x2c3210(_0x2f3ae9[_0x5353db(0xbb)]);const {initDomains:_0x41aa77}=await import(_0x5353db(0xfc)),_0x2eb709=resolveEnterpriseRoutingConfig(_0x2f3ae9[_0x5353db(0xf7)][_0x5353db(0xf4)]),_0x3f792b=[_0x5353db(0xc0),_0x5353db(0xe0),_0x5353db(0xef),_0x5353db(0xed),_0x5353db(0xfd),_0x5353db(0xd7),'agentDomain',_0x5353db(0xd3),_0x5353db(0xc2),_0x5353db(0xec)],_0x453e8f=_0x2eb709!==undefined||_0x3f792b[_0x5353db(0xd6)](_0x18db0c=>Object[_0x5353db(0xf8)][_0x5353db(0xf5)][_0x5353db(0xc4)](_0x2f3ae9[_0x5353db(0xf7)],_0x18db0c));_0x41aa77({'apiDomain':_0x2eb709?_0x2eb709[_0x5353db(0xc0)]:_0x2f3ae9['raw'][_0x5353db(0xc0)]||_0x2f3ae9[_0x5353db(0xf7)][_0x5353db(0xe0)]||undefined,'userDomain':_0x2eb709?_0x2eb709[_0x5353db(0xef)]:_0x2f3ae9[_0x5353db(0xf7)][_0x5353db(0xef)]||undefined,'runtimeDomain':_0x2eb709?_0x2eb709[_0x5353db(0xed)]:_0x2f3ae9['raw'][_0x5353db(0xed)]||undefined,'skillDomain':_0x2eb709?_0x2eb709[_0x5353db(0xfd)]:_0x2f3ae9[_0x5353db(0xf7)]['skillDomain']||_0x2f3ae9['raw'][_0x5353db(0xd7)]||_0x2f3ae9[_0x5353db(0xf7)]['agentDomain']||_0x2f3ae9['raw'][_0x5353db(0xd3)]||undefined,'kbServiceDomain':_0x2eb709?_0x2eb709[_0x5353db(0xec)]:typeof _0x2f3ae9[_0x5353db(0xf7)]['kbServiceDomain']==='string'&&_0x2f3ae9[_0x5353db(0xf7)][_0x5353db(0xec)][_0x5353db(0xc9)]()?_0x2f3ae9[_0x5353db(0xf7)][_0x5353db(0xec)]:undefined,'allowOfficialKbServiceDefault':!_0x453e8f,'region':normalizeLovrabetRegion(_0x2f3ae9[_0x5353db(0xf7)][_0x5353db(0xcb)])});}export function getProjectConfigPath(){const _0x1614d9=a107_0x445c;return resolveConfigPath(process[_0x1614d9(0xf2)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x6f9146){const _0x2f6208=a107_0x445c;if(!existsSync(_0x6f9146))return{'status':'missing'};try{const _0x54af02=readFileSync(_0x6f9146,{'encoding':_0x2f6208(0xb0)});if(!_0x54af02?.[_0x2f6208(0xc9)]())return{'status':_0x2f6208(0xcd)};const _0x3ecf9e=JSON[_0x2f6208(0xb6)](_0x54af02);return{'status':'ok','data':_0x3ecf9e};}catch(_0x548eb3){return{'status':'error','message':_0x548eb3 instanceof Error?_0x548eb3[_0x2f6208(0xc6)]:String(_0x548eb3)};}}export function loadRawConfigLayers(_0x3451f2){const _0x6b3208=a107_0x445c;let _0x197673={},_0x5be2ed={},_0x584dde,_0x206bce;try{_0x584dde=resolveConfigPath(homedir());if(_0x584dde){const _0x201a1c=readFileSync(_0x584dde,{'encoding':_0x6b3208(0xb0)});if(_0x201a1c)_0x197673=JSON['parse'](_0x201a1c);}}catch{}try{const _0xfcd2e5=_0x3451f2||process['cwd']();_0x206bce=resolveConfigPath(_0xfcd2e5);if(_0x206bce){const _0x3a2e2d=readFileSync(_0x206bce,{'encoding':'utf8'});if(_0x3a2e2d)_0x5be2ed=JSON[_0x6b3208(0xb6)](_0x3a2e2d);}}catch{}return{'globalPath':_0x584dde,'projectPath':_0x206bce,'globalConfig':_0x197673,'projectConfig':_0x5be2ed};}function mergeRawConfigLayers(_0x523681){const _0x19b5c2=a107_0x445c,{globalConfig:_0x5c8ee1,projectConfig:_0x5ece78}=_0x523681,_0x55bff6={..._0x5c8ee1,..._0x5ece78};delete _0x55bff6[_0x19b5c2(0xeb)];if(_0x19b5c2(0xf3)in _0x5ece78)_0x55bff6[_0x19b5c2(0xf3)]=_0x5ece78['defaultApp'];else _0x5c8ee1[_0x19b5c2(0xf3)]&&(_0x55bff6[_0x19b5c2(0xf3)]=_0x5c8ee1[_0x19b5c2(0xf3)]);return _0x55bff6;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x9e964c){return mergeRawConfigLayers(loadRawConfigLayers(_0x9e964c));}export function readRawConfigWithLayers(_0x4bc556){const _0x4dda29=loadRawConfigLayers(_0x4bc556);return{'config':mergeRawConfigLayers(_0x4dda29),'layers':_0x4dda29};}export function resolveDefaultAppSource(_0x466f06){const _0x267e62=a107_0x445c;if(_0x267e62(0xf3)in _0x466f06[_0x267e62(0xd8)])return _0x267e62(0xee);if(_0x466f06['globalConfig']['defaultApp'])return'global';return null;}function buildConfig(_0x1b6150,_0x2da30c){const _0x2bbfaf=a107_0x445c,_0xd99854=mergeRawConfigLayers(_0x1b6150),{projectConfig:_0x55e5af}=_0x1b6150,_0x332334=_0xd99854[_0x2bbfaf(0xf3)]||undefined,_0x3ece36=typeof _0x2da30c[_0x2bbfaf(0xd0)]==='string'?_0x2da30c['appcode']:undefined,_0x2abbde=_0x55e5af[_0x2bbfaf(0xd0)]||_0x55e5af[_0x2bbfaf(0xe3)],_0x216efc=!_0x3ece36&&!_0x2da30c[_0x2bbfaf(0xe3)]&&!_0x2abbde&&!_0x55e5af['defaultApp'],_0x5c0414=_0x216efc?env(_0x2bbfaf(0xfb)):undefined,_0x21438a=_0x2da30c[_0x2bbfaf(0xe3)]||(_0x216efc&&!_0x5c0414?env('APP'):undefined),_0x3adaf3=_0x21438a||_0x332334||undefined,_0x28c166=_0x21438a||_0x5c0414?undefined:_0x2abbde||(_0x55e5af[_0x2bbfaf(0xf3)]?undefined:_0xd99854['appcode']||_0xd99854['app']||undefined),_0x3d067b=_0x21438a||(_0x28c166?undefined:_0x332334),_0x26389a=resolveLocalAppAliasCode(_0xd99854,_0x3d067b),_0x14dfbf=productEnvNames('ACCESS_KEY')[_0x2bbfaf(0xe7)](_0x250e43=>process.env[_0x250e43]!==undefined),_0x8ad22c=_0x14dfbf?process.env[_0x14dfbf]:undefined,_0x2360eb=_0x55e5af[_0x2bbfaf(0xf9)]||_0x8ad22c||_0xd99854['accessKey']||undefined,_0x3a827a=_0x55e5af[_0x2bbfaf(0xf9)]?_0x2bbfaf(0xad):_0x8ad22c?_0x14dfbf:_0xd99854['accessKey']?'global\x20config':undefined,_0x27a984=_0x2da30c[_0x2bbfaf(0xbb)]||_0xd99854[_0x2bbfaf(0xbb)]||env('ENV')||DEFAULT_CONFIG_VALUES[_0x2bbfaf(0xbb)],_0x304353=normalizeEnv(String(_0x27a984)),_0x7f5c4a=isDaily(_0x304353)?_0x2bbfaf(0xcc):isDev(_0x304353)?'development':_0x2bbfaf(0xe1),_0x1eb0ab=_0x3ece36||_0x5c0414||_0x28c166||_0x26389a?undefined:resolveCachedAppCode(_0x3d067b,_0x7f5c4a,_0x2360eb),_0x20e393=_0x3ece36||_0x5c0414||_0x28c166||_0x26389a||_0x1eb0ab||undefined,_0x176867=_0x3ece36?_0x2bbfaf(0xd4):_0x5c0414?_0x2bbfaf(0xbb):_0x28c166?_0x2bbfaf(0xe5):_0x26389a?_0x2bbfaf(0xd2):_0x1eb0ab?_0x2bbfaf(0xb7):undefined,_0x494cfc=_0xd99854[_0x2bbfaf(0xae)]||DEFAULT_CONFIG_VALUES[_0x2bbfaf(0xae)],_0xceb05c=undefined,_0x2a0a0f=_0x2da30c[_0x2bbfaf(0xde)]||env('FORMAT')||_0xd99854['format'],_0x2cdf32=normalizeLegacyOutputFormat(_0x2a0a0f),_0x4d8fca=env('PAGE_SIZE')||_0xd99854[_0x2bbfaf(0xb3)],_0x2114d2=_0x4d8fca?Number(_0x4d8fca)||undefined:undefined,_0x1b3718=_0xd99854[_0x2bbfaf(0xdc)],_0x929ec8=_0x1b3718===_0x2bbfaf(0xb2)||_0x1b3718===_0x2bbfaf(0xba)||_0x1b3718===_0x2bbfaf(0xd5)?_0x1b3718:DEFAULT_CONFIG_VALUES[_0x2bbfaf(0xdc)],_0x4c5503=_0xd99854[_0x2bbfaf(0xd9)]===!![],_0x39c37b=env(_0x2bbfaf(0xcf)),_0x52116e=_0x39c37b==='1'||_0x39c37b===_0x2bbfaf(0xc7);return{'appCode':typeof _0x20e393===_0x2bbfaf(0xc5)&&_0x20e393[_0x2bbfaf(0xc9)]()?_0x20e393['trim']():undefined,'appCodeSource':_0x176867,'env':_0x7f5c4a,'locale':_0x494cfc,'cookie':_0xceb05c,'accessKey':_0x2360eb,'accessKeySource':_0x3a827a,'format':_0x2cdf32,'pageSize':_0x2114d2,'riskLevel':_0x929ec8,'nativeToolAvailable':_0x4c5503,'verbose':_0x52116e,'defaultApp':_0x332334,'currentApp':typeof _0x3adaf3===_0x2bbfaf(0xc5)?_0x3adaf3:undefined,'raw':_0xd99854};}function env(_0x10a6b3){return productEnv(_0x10a6b3);}async function buildAuth(_0x2a62ce){const _0x4e6aa4=a107_0x445c,_0x4006ea='',_0x56f97b=!!_0x2a62ce[_0x4e6aa4(0xf9)];return{'cookie':_0x4006ea,'isLoggedIn':_0x56f97b,async 'getOrLogin'(){if(_0x56f97b)return _0x4006ea;throw CliErrors['authRequired']();}};}
|