@lovrabet/lovrabet-cli 2.3.6-beta.1 → 2.3.6-beta.3
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/README.md +33 -2
- 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.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.d.ts +3 -3
- 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.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.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 +7 -6
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.d.ts +17 -0
- package/lib/core/kb-management-client.js +1 -0
- 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.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/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 +5 -3
- package/skills/lovrabet/guides/app-resolution.md +2 -0
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +10 -1
- package/skills/lovrabet/references/dataset-discovery-workflow.md +14 -1
- package/skills/lovrabet/references/instant-api-workflow.md +2 -0
- package/skills/lovrabet/references/lovrabet-app.md +2 -0
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +7 -3
- package/skills/lovrabet.manifest.json +3 -3
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x3c0521=a94_0x19a6;function a94_0x3131(){const _0x40166a=['<expr>','format','46990hgIMlL','yes','<name>','production\x20|\x20development\x20|\x20daily','13689mMLGDx','json\x20|\x20pretty\x20|\x20compress','nonInteractive','params','name','string','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','31482AKjqJt','boolean','Name\x20filter','Record\x20ID','148589shAuVg','map','dryRun','dry-run','clear','meowKey','Preview\x20operation\x20without\x20executing','help','Override\x20appcode','cliBinName','Alias\x20for\x20--non-interactive','app','Clear\x20output','Skip\x20confirmation\x20for\x20high-risk\x20writes','6vDznlj','1397cARAbN','fromEntries','verbose','88teoIfu','860785ardXNu','Use\x20global\x20config\x20scope','appcode','<code>','47085sBAEEX','JSON\x20params\x20for\x20execute\x20commands','global','Verbose\x20output','cliDisplayName','872cUWMEA','env','non-interactive','570884jcyryO','Environment','Force\x20non-interactive\x20mode\x20(CI)'];a94_0x3131=function(){return _0x40166a;};return a94_0x3131();}(function(_0x340a79,_0x321f48){const _0xdbf440=a94_0x19a6,_0x2f2168=_0x340a79();while(!![]){try{const _0x39e476=parseInt(_0xdbf440(0xbf))/0x1+-parseInt(_0xdbf440(0xc7))/0x2+parseInt(_0xdbf440(0xd7))/0x3*(-parseInt(_0xdbf440(0xed))/0x4)+parseInt(_0xdbf440(0xbb))/0x5*(parseInt(_0xdbf440(0xe9))/0x6)+parseInt(_0xdbf440(0xdb))/0x7+-parseInt(_0xdbf440(0xc4))/0x8*(parseInt(_0xdbf440(0xd0))/0x9)+parseInt(_0xdbf440(0xcc))/0xa*(parseInt(_0xdbf440(0xea))/0xb);if(_0x39e476===_0x321f48)break;else _0x2f2168['push'](_0x2f2168['shift']());}catch(_0x5373a2){_0x2f2168['push'](_0x2f2168['shift']());}}}(a94_0x3131,0x25e07));import{PRODUCT_CONFIG}from'../constant/product.js';function a94_0x19a6(_0x3bae7f,_0xc6bae4){_0x3bae7f=_0x3bae7f-0xbb;const _0x3131e2=a94_0x3131();let _0x19a67e=_0x3131e2[_0x3bae7f];return _0x19a67e;}import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a94_0x3c0521(0xe4)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a94_0x3c0521(0xc3)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a94_0x3c0521(0xbd),'meowKey':a94_0x3c0521(0xbd),'type':a94_0x3c0521(0xd5),'description':a94_0x3c0521(0xe3),'hint':a94_0x3c0521(0xbe)},{'name':'app','meowKey':'app','type':a94_0x3c0521(0xd5),'description':'Select\x20app\x20profile\x20by\x20name','hint':a94_0x3c0521(0xce)},{'name':a94_0x3c0521(0xc5),'meowKey':a94_0x3c0521(0xc5),'type':a94_0x3c0521(0xd5),'description':a94_0x3c0521(0xc8),'hint':a94_0x3c0521(0xcf)},{'name':'format','meowKey':'format','type':a94_0x3c0521(0xd5),'description':'Output\x20format','hint':a94_0x3c0521(0xd1)},{'name':'jq','meowKey':'jq','type':a94_0x3c0521(0xd5),'description':a94_0x3c0521(0xd6),'hint':a94_0x3c0521(0xca)},{'name':'dry-run','meowKey':a94_0x3c0521(0xdd),'type':a94_0x3c0521(0xd8),'description':a94_0x3c0521(0xe1)},{'name':a94_0x3c0521(0xcd),'meowKey':a94_0x3c0521(0xcd),'type':'boolean','description':a94_0x3c0521(0xe8)},{'name':a94_0x3c0521(0xc6),'meowKey':a94_0x3c0521(0xd2),'type':a94_0x3c0521(0xd8),'description':a94_0x3c0521(0xc9)},{'name':a94_0x3c0521(0xc1),'meowKey':'global','type':a94_0x3c0521(0xd8),'description':a94_0x3c0521(0xbc)},{'name':'ci','meowKey':'ci','type':'boolean','description':a94_0x3c0521(0xe5),'hidden':!![]},{'name':'help','meowKey':a94_0x3c0521(0xe2),'type':a94_0x3c0521(0xd8),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':a94_0x3c0521(0xd5),'description':a94_0x3c0521(0xda),'hidden':!![]},{'name':a94_0x3c0521(0xd4),'meowKey':a94_0x3c0521(0xd4),'type':a94_0x3c0521(0xd5),'description':a94_0x3c0521(0xd9),'hidden':!![]},{'name':'sqlcode','meowKey':'sqlcode','type':a94_0x3c0521(0xd5),'description':'SQL\x20query\x20code','hidden':!![]},{'name':'params','meowKey':a94_0x3c0521(0xd3),'type':a94_0x3c0521(0xd5),'description':a94_0x3c0521(0xc0),'hidden':!![]},{'name':a94_0x3c0521(0xec),'meowKey':a94_0x3c0521(0xec),'type':a94_0x3c0521(0xd8),'description':a94_0x3c0521(0xc2),'hidden':!![]},{'name':a94_0x3c0521(0xdf),'meowKey':a94_0x3c0521(0xdf),'type':a94_0x3c0521(0xd8),'description':a94_0x3c0521(0xe7),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a94_0x3c0521(0xbd),a94_0x3c0521(0xe6),a94_0x3c0521(0xc5),a94_0x3c0521(0xcb),'jq',a94_0x3c0521(0xde),'yes','non-interactive','ci']);export function buildMeowFlags(){const _0xf2dad0=a94_0x3c0521;return Object[_0xf2dad0(0xeb)](GLOBAL_FLAGS[_0xf2dad0(0xdc)](_0x18f91a=>[_0x18f91a[_0xf2dad0(0xe0)],{'type':_0x18f91a['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x4f111b=a95_0xd105;(function(_0x476591,_0x3939b0){const _0x297c49=a95_0xd105,_0x214195=_0x476591();while(!![]){try{const _0x2e1da0=parseInt(_0x297c49(0x175))/0x1*(-parseInt(_0x297c49(0x177))/0x2)+parseInt(_0x297c49(0x17a))/0x3*(-parseInt(_0x297c49(0x16f))/0x4)+-parseInt(_0x297c49(0x17b))/0x5*(parseInt(_0x297c49(0x178))/0x6)+parseInt(_0x297c49(0x16c))/0x7+-parseInt(_0x297c49(0x17c))/0x8+parseInt(_0x297c49(0x16e))/0x9*(parseInt(_0x297c49(0x170))/0xa)+parseInt(_0x297c49(0x176))/0xb*(parseInt(_0x297c49(0x179))/0xc);if(_0x2e1da0===_0x3939b0)break;else _0x214195['push'](_0x214195['shift']());}catch(_0x15967c){_0x214195['push'](_0x214195['shift']());}}}(a95_0x3fd2,0x27dfb));function a95_0xd105(_0x20bddd,_0x412a63){_0x20bddd=_0x20bddd-0x16c;const _0x3fd2f1=a95_0x3fd2();let _0xd105b6=_0x3fd2f1[_0x20bddd];return _0xd105b6;}export const DEFAULT_APP_PROFILE_NAME=a95_0x4f111b(0x171);export const DEFAULT_CONFIG_VALUES={'env':a95_0x4f111b(0x173),'format':a95_0x4f111b(0x16d),'locale':a95_0x4f111b(0x174),'riskLevel':a95_0x4f111b(0x172)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a95_0x4f111b(0x16d);function a95_0x3fd2(){const _0x325933=['compress','378yiuvQh','1256CwQCDq','31210mExaaM','main','write','production','en-US','673lflFcL','3939980Aejxvf','124wzCSxP','1896YNnOSs','12pHsTTA','2559FFDsrm','695AhSzrB','1510488pgKXcp','1514548zSqpAJ'];a95_0x3fd2=function(){return _0x325933;};return a95_0x3fd2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x40e6ce=a96_0x85d2;function a96_0x48fc(){const _0x23c905=['600nmDFwZ','npmRegistryBaseUrl','/dist/lovrabet-cli/config/index.json','3HilDAy','4613016hPlSyp','skillSource','14NrZwhE','30qlsNRQ','140439WMNMKT','14956240MeuYoQ','6305SHJLju','3846468PqPvRw','2088PvkZAR','4TMLiFh','70103QkzovF','1065159wqitkD'];a96_0x48fc=function(){return _0x23c905;};return a96_0x48fc();}(function(_0x557f5d,_0x4bcbf0){const _0x313605=a96_0x85d2,_0x3260ae=_0x557f5d();while(!![]){try{const _0x42d2a8=-parseInt(_0x313605(0x83))/0x1*(parseInt(_0x313605(0x88))/0x2)+-parseInt(_0x313605(0x7e))/0x3*(-parseInt(_0x313605(0x86))/0x4)+-parseInt(_0x313605(0x85))/0x5*(parseInt(_0x313605(0x87))/0x6)+-parseInt(_0x313605(0x81))/0x7*(parseInt(_0x313605(0x7f))/0x8)+parseInt(_0x313605(0x7a))/0x9*(parseInt(_0x313605(0x82))/0xa)+parseInt(_0x313605(0x79))/0xb*(parseInt(_0x313605(0x7b))/0xc)+parseInt(_0x313605(0x84))/0xd;if(_0x42d2a8===_0x4bcbf0)break;else _0x3260ae['push'](_0x3260ae['shift']());}catch(_0x5a9a86){_0x3260ae['push'](_0x3260ae['shift']());}}}(a96_0x48fc,0xdedc8));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a96_0x40e6ce(0x80)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a96_0x40e6ce(0x7c)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG['cliCdnBaseUrl'];function a96_0x85d2(_0x3d7d3c,_0x2cb4dd){_0x3d7d3c=_0x3d7d3c-0x79;const _0x48fc97=a96_0x48fc();let _0x85d2c4=_0x48fc97[_0x3d7d3c];return _0x85d2c4;}export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a96_0x40e6ce(0x7d);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a97_0xb7ed(){const _0x54a0bc=['region','2133257CbAFWO','8QDyVVB','284537xdqzWv','kbService','production','1565912DbzFUY','1256121asgnsd','runtime','user','api','allowOfficialKbServiceDefault','570550ITIpPR','kbServiceDomain','skillDomain','3244518PKcMXQ','2688500kKngIJ','apiDomain'];a97_0xb7ed=function(){return _0x54a0bc;};return a97_0xb7ed();}const a97_0x4fc1a0=a97_0x1049;(function(_0x1dde3e,_0x250bc1){const _0x17c6f0=a97_0x1049,_0x1095bd=_0x1dde3e();while(!![]){try{const _0x38d335=-parseInt(_0x17c6f0(0x128))/0x1+parseInt(_0x17c6f0(0x131))/0x2+-parseInt(_0x17c6f0(0x12c))/0x3+parseInt(_0x17c6f0(0x12b))/0x4+-parseInt(_0x17c6f0(0x135))/0x5+parseInt(_0x17c6f0(0x134))/0x6+parseInt(_0x17c6f0(0x126))/0x7*(parseInt(_0x17c6f0(0x127))/0x8);if(_0x38d335===_0x250bc1)break;else _0x1095bd['push'](_0x1095bd['shift']());}catch(_0x33ea91){_0x1095bd['push'](_0x1095bd['shift']());}}}(a97_0xb7ed,0x44ae1));import{getEnv,isProduction}from'../constant/env.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';function a97_0x1049(_0x5a7c10,_0x4f5474){_0x5a7c10=_0x5a7c10-0x124;const _0xb7ede=a97_0xb7ed();let _0x104932=_0xb7ede[_0x5a7c10];return _0x104932;}let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbServiceDomain,allowOfficialKbServiceDefault=!![],activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x313166){const _0xe6e828=a97_0x1049;customApiDomain=_0x313166?.[_0xe6e828(0x124)],customUserDomain=_0x313166?.['userDomain'],customRuntimeDomain=_0x313166?.['runtimeDomain'],customSkillDomain=_0x313166?.[_0xe6e828(0x133)],customKbServiceDomain=_0x313166?.[_0xe6e828(0x132)],allowOfficialKbServiceDefault=_0x313166?.[_0xe6e828(0x130)]??!![],activeRegion=_0x313166?.[_0xe6e828(0x125)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x46b969=a97_0x1049,_0x441b11=OFFICIAL_ROUTING_PROFILES[activeRegion]['serviceDomains'];return isProduction(getEnv())?_0x441b11[_0x46b969(0x12a)]:'daily'in _0x441b11?_0x441b11['daily']:_0x441b11[_0x46b969(0x12a)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a97_0x4fc1a0(0x12e)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a97_0x4fc1a0(0x12f)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a97_0x4fc1a0(0x12d)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()['skill'];export const getKbServiceDomain=()=>{const _0x22b4ef=a97_0x4fc1a0;if(customKbServiceDomain)return customKbServiceDomain;if(!allowOfficialKbServiceDefault)return undefined;const _0x430849=getActiveRegionDomains();return _0x22b4ef(0x129)in _0x430849?_0x430849[_0x22b4ef(0x129)]:undefined;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x4d8f80=a98_0x3321;(function(_0x403e81,_0x547242){const _0x1956c6=a98_0x3321,_0x333bc6=_0x403e81();while(!![]){try{const _0x56adc3=parseInt(_0x1956c6(0x17a))/0x1+-parseInt(_0x1956c6(0x17f))/0x2*(-parseInt(_0x1956c6(0x177))/0x3)+parseInt(_0x1956c6(0x17d))/0x4*(parseInt(_0x1956c6(0x184))/0x5)+-parseInt(_0x1956c6(0x178))/0x6+parseInt(_0x1956c6(0x182))/0x7+parseInt(_0x1956c6(0x17e))/0x8+parseInt(_0x1956c6(0x179))/0x9*(-parseInt(_0x1956c6(0x180))/0xa);if(_0x56adc3===_0x547242)break;else _0x333bc6['push'](_0x333bc6['shift']());}catch(_0x459559){_0x333bc6['push'](_0x333bc6['shift']());}}}(a98_0x2bf3,0x70845));import{productEnv}from'../constant/product.js';function a98_0x3321(_0x5cfb3a,_0x15eb92){_0x5cfb3a=_0x5cfb3a-0x176;const _0x2bf300=a98_0x2bf3();let _0x332160=_0x2bf300[_0x5cfb3a];return _0x332160;}export const RUNTIME_ENV_VALUES=[a98_0x4d8f80(0x185),a98_0x4d8f80(0x181),a98_0x4d8f80(0x17b)];export function normalizeEnv(_0x576fd2){const _0x5cfa87=a98_0x4d8f80;return _0x576fd2===_0x5cfa87(0x176)?_0x5cfa87(0x185):_0x576fd2;}export function isProduction(_0x2a9e5d){const _0x32cbf0=a98_0x4d8f80;return normalizeEnv(_0x2a9e5d)===_0x32cbf0(0x185);}export function isDaily(_0x5c6b55){const _0x38e23c=a98_0x4d8f80;return normalizeEnv(_0x5c6b55)===_0x38e23c(0x17b);}export function isDev(_0x4f8420){const _0xe16e97=a98_0x4d8f80,_0x12c9fc=normalizeEnv(_0x4f8420);return _0x12c9fc===_0xe16e97(0x181)||_0x12c9fc===_0xe16e97(0x183);}let env=normalizeEnv(productEnv(a98_0x4d8f80(0x17c))||'production');export function getEnv(){return env;}function a98_0x2bf3(){const _0x41df2c=['183774MorQZi','10ruLeoQ','development','5630674BuoHAv','dev','65hMxJmC','production','online','6cdvjKl','3408990FqDtuM','9868302xlnXHn','323387OoKBBl','daily','ENV','90268UArtjp','4164784NTulrY'];a98_0x2bf3=function(){return _0x41df2c;};return a98_0x2bf3();}export function initEnv(_0xc847ed){env=normalizeEnv(_0xc847ed);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x79d528=a99_0x3d35;(function(_0x177750,_0x52f10d){const _0x51727f=a99_0x3d35,_0x425a23=_0x177750();while(!![]){try{const _0x5baddf=-parseInt(_0x51727f(0x189))/0x1*(parseInt(_0x51727f(0x188))/0x2)+parseInt(_0x51727f(0x18a))/0x3+-parseInt(_0x51727f(0x18c))/0x4*(-parseInt(_0x51727f(0x18e))/0x5)+-parseInt(_0x51727f(0x187))/0x6+parseInt(_0x51727f(0x18b))/0x7*(parseInt(_0x51727f(0x184))/0x8)+parseInt(_0x51727f(0x182))/0x9+-parseInt(_0x51727f(0x183))/0xa*(parseInt(_0x51727f(0x185))/0xb);if(_0x5baddf===_0x52f10d)break;else _0x425a23['push'](_0x425a23['shift']());}catch(_0x4ac9e3){_0x425a23['push'](_0x425a23['shift']());}}}(a99_0xceb0,0x75adc));function a99_0x3d35(_0x3b6426,_0x21b55c){_0x3b6426=_0x3b6426-0x182;const _0xceb006=a99_0xceb0();let _0x3d3553=_0xceb006[_0x3b6426];return _0x3d3553;}function a99_0xceb0(){const _0x3082e1=['2098482ZktKkG','23884fVxKJf','161812fDdfYa','pretty','95stsVZo','36711gpFLgi','10hlvdLE','1096JDYVub','2488541DHUNIb','compress','4182690vfIubo','2meqczR','534266HHCpPa'];a99_0xceb0=function(){return _0x3082e1;};return a99_0xceb0();}export const OUTPUT_FORMAT_VALUES=['json',a99_0x79d528(0x18d),a99_0x79d528(0x186)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a100_0x5a38(_0xbd47aa,_0xc45782){_0xbd47aa=_0xbd47aa-0xc4;const _0xdecfe0=a100_0xdecf();let _0x5a3815=_0xdecfe0[_0xbd47aa];return _0x5a3815;}const a100_0x2bc2bb=a100_0x5a38;function a100_0xdecf(){const _0x58e782=['232FsOStU','https://g.lovrabet.com','11089737OmeeYn','611957xBJGzf','.lovrabet','55HRXGiw','2xhqBpj','36gWbCsh','RABETBASE','Lovrabet\x20User\x20Center','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','1020050yBDWJy','legacyEnvPrefixes','SKIP_NPX_SKILLS','map','21897POCcBH','1744JgJiBz','31290HYaxaE','LOVRABET','lovrabet','98560nAdyMT','5146063cklIHU','72JRPqqG','.lovrabet.json'];a100_0xdecf=function(){return _0x58e782;};return a100_0xdecf();}(function(_0x3defa5,_0x92c9eb){const _0x3536de=a100_0x5a38,_0x560998=_0x3defa5();while(!![]){try{const _0x548b99=parseInt(_0x3536de(0xc7))/0x1*(-parseInt(_0x3536de(0xca))/0x2)+parseInt(_0x3536de(0xd3))/0x3*(-parseInt(_0x3536de(0xc4))/0x4)+parseInt(_0x3536de(0xd8))/0x5*(parseInt(_0x3536de(0xda))/0x6)+parseInt(_0x3536de(0xd5))/0x7*(parseInt(_0x3536de(0xd4))/0x8)+parseInt(_0x3536de(0xc6))/0x9+-parseInt(_0x3536de(0xcf))/0xa*(-parseInt(_0x3536de(0xc9))/0xb)+parseInt(_0x3536de(0xcb))/0xc*(-parseInt(_0x3536de(0xd9))/0xd);if(_0x548b99===_0x92c9eb)break;else _0x560998['push'](_0x560998['shift']());}catch(_0xea47d5){_0x560998['push'](_0x560998['shift']());}}}(a100_0xdecf,0xb2502));export const PRODUCT_CONFIG={'cliBinName':a100_0x2bc2bb(0xd7),'cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':'@lovrabet/lovrabet-cli','skillSource':'lovrabet/lovrabet-cli','internalSkillSource':a100_0x2bc2bb(0xce),'globalSkillName':a100_0x2bc2bb(0xd7),'npmRegistryBaseUrl':'https://registry.npmjs.org','cliCdnBaseUrl':a100_0x2bc2bb(0xc5),'envPrefix':a100_0x2bc2bb(0xd6),'legacyEnvPrefixes':[a100_0x2bc2bb(0xcc)],'configFileNames':[a100_0x2bc2bb(0xdb)],'newConfigFileName':a100_0x2bc2bb(0xdb),'homeDirName':a100_0x2bc2bb(0xc8),'logFileName':'.lovrabet-runtime.log','invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':a100_0x2bc2bb(0xcd),'skipNpxSkillsEnvSuffix':a100_0x2bc2bb(0xd1),'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x548c1e){return PRODUCT_CONFIG['envPrefix']+'_'+_0x548c1e;}export function productEnvNames(_0x30c324){const _0x55722d=a100_0x2bc2bb;return[productEnvName(_0x30c324),...PRODUCT_CONFIG[_0x55722d(0xd0)][_0x55722d(0xd2)](_0x33a958=>_0x33a958+'_'+_0x30c324)];}export function productEnv(_0x411795){for(const _0x4ed310 of productEnvNames(_0x411795)){const _0x26fa2f=process.env[_0x4ed310];if(_0x26fa2f!==undefined)return _0x26fa2f;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb95c00,_0x7e11f9){const _0x183612=a101_0x23ec,_0x53d5d8=_0xb95c00();while(!![]){try{const _0x1947e4=parseInt(_0x183612(0x1b4))/0x1*(-parseInt(_0x183612(0x1b8))/0x2)+-parseInt(_0x183612(0x1ad))/0x3*(parseInt(_0x183612(0x1ac))/0x4)+parseInt(_0x183612(0x1bc))/0x5*(parseInt(_0x183612(0x1bf))/0x6)+-parseInt(_0x183612(0x1b3))/0x7+-parseInt(_0x183612(0x1ae))/0x8+-parseInt(_0x183612(0x1bb))/0x9*(parseInt(_0x183612(0x1be))/0xa)+parseInt(_0x183612(0x1b6))/0xb;if(_0x1947e4===_0x7e11f9)break;else _0x53d5d8['push'](_0x53d5d8['shift']());}catch(_0x5c884c){_0x53d5d8['push'](_0x53d5d8['shift']());}}}(a101_0x25d8,0xd755b));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';function a101_0x25d8(){const _0x59e2bf=['54TBaKpq','Available\x20regions:\x20','12460JtoViC','87XgCFwS','11267112ipbPLl','includes','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.','string','282527dDzdIE','2jXaNSa','join','32417836hlRTYG','validation','1332472urUdQu','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','Region\x20\x22','117RVVCfO','959695LblqHC','\x22\x20is\x20not\x20currently\x20available.','708430VwPuiE'];a101_0x25d8=function(){return _0x59e2bf;};return a101_0x25d8();}function a101_0x23ec(_0x2ce537,_0x3339a6){_0x2ce537=_0x2ce537-0x1ab;const _0x25d8b0=a101_0x25d8();let _0x23ec23=_0x25d8b0[_0x2ce537];return _0x23ec23;}import{CliErrors}from'../errors.js';export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x43eb35){const _0xc233f8=a101_0x23ec;return typeof _0x43eb35==='string'&&LOVRABET_REGION_VALUES[_0xc233f8(0x1af)](_0x43eb35);}export function isEnabledLovrabetRegion(_0x277cca){const _0x11c057=a101_0x23ec;return typeof _0x277cca===_0x11c057(0x1b2)&&ENABLED_LOVRABET_REGION_VALUES['includes'](_0x277cca);}export function normalizeLovrabetRegion(_0x25abc3){const _0x47390c=a101_0x23ec;if(_0x25abc3===undefined||_0x25abc3===null||_0x25abc3==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x25abc3!==_0x47390c(0x1b2))throw CliErrors[_0x47390c(0x1b7)](_0x47390c(0x1b9)+typeof _0x25abc3+'.',_0x47390c(0x1b0));const _0x29b658=REGION_ALIASES[_0x25abc3]??_0x25abc3;if(isEnabledLovrabetRegion(_0x29b658))return _0x29b658;throw CliErrors[_0x47390c(0x1b7)](_0x47390c(0x1ba)+_0x25abc3+_0x47390c(0x1bd),_0x47390c(0x1ab)+ENABLED_LOVRABET_REGION_VALUES[_0x47390c(0x1b5)](',\x20')+_0x47390c(0x1b1));}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a102_0x23f1bc=a102_0x39b3;function a102_0x39b3(_0xf7b6dd,_0x55710c){_0xf7b6dd=_0xf7b6dd-0x1a1;const _0x3b590c=a102_0x3b59();let _0x39b372=_0x3b590c[_0xf7b6dd];return _0x39b372;}(function(_0x486cdf,_0x4bbc9d){const _0x103509=a102_0x39b3,_0x5e4e56=_0x486cdf();while(!![]){try{const _0x72fcfc=-parseInt(_0x103509(0x1a1))/0x1*(-parseInt(_0x103509(0x1ae))/0x2)+parseInt(_0x103509(0x1a7))/0x3*(-parseInt(_0x103509(0x1a9))/0x4)+-parseInt(_0x103509(0x1a8))/0x5+-parseInt(_0x103509(0x1aa))/0x6+parseInt(_0x103509(0x1a4))/0x7*(-parseInt(_0x103509(0x1ac))/0x8)+parseInt(_0x103509(0x1ab))/0x9+parseInt(_0x103509(0x1a3))/0xa*(parseInt(_0x103509(0x1a5))/0xb);if(_0x72fcfc===_0x4bbc9d)break;else _0x5e4e56['push'](_0x5e4e56['shift']());}catch(_0x7986e2){_0x5e4e56['push'](_0x5e4e56['shift']());}}}(a102_0x3b59,0x7354d));export const RISK_LEVEL_VALUES=[a102_0x23f1bc(0x1a6),a102_0x23f1bc(0x1ad),a102_0x23f1bc(0x1a2)];function a102_0x3b59(){const _0x130b66=['117176GmPiHi','4084500jhWXeV','5601258bDVFHN','8ygTCvX','write','207908uvpica','6ENLqIN','high-risk-write','20296870ffznjm','6574834OvMfYO','11oaYjZG','read','27aMyDGR','4598590MbtYLa'];a102_0x3b59=function(){return _0x130b66;};return a102_0x3b59();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5df340,_0x415514){const _0x49e3da=a103_0x5db7,_0x4cb9d0=_0x5df340();while(!![]){try{const _0x1581ee=parseInt(_0x49e3da(0x152))/0x1*(-parseInt(_0x49e3da(0x159))/0x2)+parseInt(_0x49e3da(0x15b))/0x3+-parseInt(_0x49e3da(0x156))/0x4*(-parseInt(_0x49e3da(0x14f))/0x5)+parseInt(_0x49e3da(0x157))/0x6+parseInt(_0x49e3da(0x158))/0x7*(parseInt(_0x49e3da(0x151))/0x8)+-parseInt(_0x49e3da(0x153))/0x9*(-parseInt(_0x49e3da(0x155))/0xa)+-parseInt(_0x49e3da(0x14e))/0xb;if(_0x1581ee===_0x415514)break;else _0x4cb9d0['push'](_0x4cb9d0['shift']());}catch(_0x58c6e7){_0x4cb9d0['push'](_0x4cb9d0['shift']());}}}(a103_0x5890,0xb6628));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(_0x488a91=DEFAULT_LOVRABET_REGION){const _0x54ac3c=a103_0x5db7,_0x2ae3aa=OFFICIAL_ROUTING_PROFILES[_0x488a91]['serviceDomains'][_0x54ac3c(0x150)][_0x54ac3c(0x154)];return''+_0x2ae3aa+PRODUCT_CONFIG[_0x54ac3c(0x15a)];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();function a103_0x5db7(_0x3dfc6f,_0x1c829b){_0x3dfc6f=_0x3dfc6f-0x14e;const _0x5890c4=a103_0x5890();let _0x5db76d=_0x5890c4[_0x3dfc6f];return _0x5db76d;}function a103_0x5890(){const _0x14622a=['3114RUebzJ','user','29810IogcxH','1068516qozmOT','2407176lkFTUy','106204KFLDuE','1464376lQLJoe','accessKeyCreatePath','1694124qEgtLT','14602313hJgfau','5xgJJjj','production','672NNXvIp','2bJWWlO'];a103_0x5890=function(){return _0x14622a;};return a103_0x5890();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a104_0x1bc8f2=a104_0x51ae;(function(_0x2e5286,_0x1c739a){const _0xe1551a=a104_0x51ae,_0x3f0295=_0x2e5286();while(!![]){try{const _0x2cb175=-parseInt(_0xe1551a(0x1ab))/0x1+-parseInt(_0xe1551a(0x1cc))/0x2+-parseInt(_0xe1551a(0x1e6))/0x3*(-parseInt(_0xe1551a(0x1d4))/0x4)+-parseInt(_0xe1551a(0x1cf))/0x5+parseInt(_0xe1551a(0x1c8))/0x6*(parseInt(_0xe1551a(0x1a7))/0x7)+-parseInt(_0xe1551a(0x1ad))/0x8+parseInt(_0xe1551a(0x1c6))/0x9;if(_0x2cb175===_0x1c739a)break;else _0x3f0295['push'](_0x3f0295['shift']());}catch(_0x2496a6){_0x3f0295['push'](_0x3f0295['shift']());}}}(a104_0xe5d5,0x3b4d7));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';function a104_0xe5d5(){const _0x1b333e=['isTTY','accessKey','env','kbDomain','development','project','utf8','3603vECXIA','top-level','routing','region','global','locale','stdin','globalConfig','PAGE_SIZE','production','63bEgARY','setLogPath','error','true','251653scIqbH','trim','3442576XwZlew','daily','FORMAT','message','riskLevel','high-risk-write','skillDomain','empty','VERBOSE','runtimeDomain','defaultApp','projectConfig','online','stringify','format','some','code','skillHubDomain','find','kbServiceDomain','values','apiDomain','stdout','nonInteractive','write','10901511QpVMKG','EPERM','71166eukfoc','join','EACCES','raw','862580MibxfO','pageSize','cwd','1340575OOmCDr','argv','apps','newConfigFileName','string','1020IvQZvl','app','missing','agentDomain','./constant/domain.js','appcode','parse','userDomain','host','setRawMode','explicit'];a104_0xe5d5=function(){return _0x1b333e;};return a104_0xe5d5();}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 a104_0x51ae(_0x2780e9,_0x268f05){_0x2780e9=_0x2780e9-0x19e;const _0xe5d5f5=a104_0xe5d5();let _0x51ae34=_0xe5d5f5[_0x2780e9];return _0x51ae34;}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[a104_0x1bc8f2(0x1d2)];function resolveConfigPath(_0x1d97e5){for(const _0x2c6ae2 of CONFIG_NAMES){const _0x4c609e=resolve(_0x1d97e5,_0x2c6ae2);if(existsSync(_0x4c609e))return _0x4c609e;}return undefined;}export function resolveWriteConfigPath(_0x280476){const _0x5bb15f=a104_0x1bc8f2,_0x237671=_0x280476==='project'?process[_0x5bb15f(0x1ce)]():homedir(),_0x5e227f=resolveConfigPath(_0x237671);return _0x5e227f??resolve(_0x237671,NEW_CONFIG_NAME);}export function readConfigFile(_0x1c42e){try{if(existsSync(_0x1c42e)){const _0x338611=readFileSync(_0x1c42e,{'encoding':'utf8'});if(_0x338611){const _0x419ff5=JSON['parse'](_0x338611);return migrateOnlineEnv(_0x1c42e,_0x419ff5),_0x419ff5;}}}catch{}return{};}function migrateOnlineEnv(_0x29a3c4,_0x21e970){const _0x53ab5f=a104_0x1bc8f2;let _0x171963=![];_0x21e970[_0x53ab5f(0x1e1)]===_0x53ab5f(0x1b9)&&(_0x21e970[_0x53ab5f(0x1e1)]=_0x53ab5f(0x1a6),_0x171963=!![]);if(_0x21e970[_0x53ab5f(0x1d1)]&&typeof _0x21e970[_0x53ab5f(0x1d1)]==='object')for(const _0x2928a3 of Object[_0x53ab5f(0x1c1)](_0x21e970[_0x53ab5f(0x1d1)])){_0x2928a3&&_0x2928a3[_0x53ab5f(0x1e1)]===_0x53ab5f(0x1b9)&&(_0x2928a3[_0x53ab5f(0x1e1)]=_0x53ab5f(0x1a6),_0x171963=!![]);}if(_0x171963)try{writeConfigFile(_0x29a3c4,_0x21e970);}catch{}}export function writeConfigFile(_0x7cb6d1,_0x3e825c){const _0x312ea9=a104_0x1bc8f2,_0x1f0991=dirname(_0x7cb6d1);!existsSync(_0x1f0991)&&mkdirSync(_0x1f0991,{'recursive':!![]});const _0x82d9d1=_0x7cb6d1+'.tmp';try{writeFileSync(_0x82d9d1,JSON[_0x312ea9(0x1ba)](_0x3e825c,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x82d9d1,_0x7cb6d1);}catch(_0x4f0942){if(_0x4f0942[_0x312ea9(0x1bd)]===_0x312ea9(0x1c7)||_0x4f0942[_0x312ea9(0x1bd)]==='EXDEV'||_0x4f0942[_0x312ea9(0x1bd)]===_0x312ea9(0x1ca)){writeFileSync(_0x7cb6d1,JSON[_0x312ea9(0x1ba)](_0x3e825c,null,0x2)+'\x0a',{'encoding':_0x312ea9(0x1e5)});try{unlinkSync(_0x82d9d1);}catch{}}else throw _0x4f0942;}}catch(_0x91f02f){try{unlinkSync(_0x82d9d1);}catch{}throw _0x91f02f;}}export function isNonInteractiveMode(_0x128442){const _0x188903=a104_0x1bc8f2;return!!(_0x128442[_0x188903(0x1c4)]||_0x128442['ci']||productEnvNames('CI')[_0x188903(0x1bc)](_0x19d729=>process.env[_0x19d729]===_0x188903(0x1aa))||process.env.CI===_0x188903(0x1aa)||!process[_0x188903(0x1c3)][_0x188903(0x1df)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5a1168=a104_0x1bc8f2;if(!process[_0x5a1168(0x1a3)][_0x5a1168(0x1df)])return![];try{const _0x4b4a3a=process[_0x5a1168(0x1a3)]['isRaw'];return process[_0x5a1168(0x1a3)][_0x5a1168(0x1dd)](!![]),process['stdin']['setRawMode'](_0x4b4a3a??![]),!![];}catch{return![];}}export async function createContext(_0x1cce39){const _0x9c4c47=a104_0x1bc8f2,_0xf064f6=readRawConfig(),_0x31a9fb=buildConfig(_0xf064f6,_0x1cce39);await initGlobalEnvironment(_0x31a9fb);const {getUserDomain:_0x3135c3,getApiDomain:_0x5c964c}=await import(_0x9c4c47(0x1d8)),_0x2d18fc={'apiDomain':_0x5c964c(),'userDomain':_0x3135c3()},_0x580644=await buildAuth(_0x31a9fb);logger[_0x9c4c47(0x1a8)](process[_0x9c4c47(0x1ce)]());const _0x54cf99=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x9c4c47(0x1d0)]['slice'](0x2))[_0x9c4c47(0x1c9)]('\x20'))[_0x9c4c47(0x1ac)]();logger['setRawCommand'](_0x54cf99);const _0x33d28d=isNonInteractiveMode(_0x1cce39);return{'config':_0x31a9fb,'auth':_0x580644,'logger':logger,'env':_0x2d18fc,'nonInteractive':_0x33d28d};}export function buildConfigFromFlags(_0x20194b){return buildConfig(readRawConfig(),_0x20194b);}export function getLocalAppAliases(_0x53da1f){const _0x46dd43=a104_0x1bc8f2;return _0x53da1f[_0x46dd43(0x1d1)]&&typeof _0x53da1f[_0x46dd43(0x1d1)]==='object'?_0x53da1f[_0x46dd43(0x1d1)]:{};}export function resolveLocalAppAliasCode(_0x3c5c63,_0x593961){const _0x46c072=a104_0x1bc8f2;if(!_0x593961)return undefined;const _0x337209=getLocalAppAliases(_0x3c5c63)[_0x593961],_0x5db2b3=_0x337209?.[_0x46c072(0x1d9)];return typeof _0x5db2b3===_0x46c072(0x1d3)&&_0x5db2b3['trim']()?_0x5db2b3[_0x46c072(0x1ac)]():undefined;}export function readAppCodeFromConfig(){const _0x8511b1=a104_0x1bc8f2,_0xb84038=readRawConfig(),_0x208107=_0xb84038[_0x8511b1(0x1d9)]??_0xb84038[_0x8511b1(0x1d5)];if(typeof _0x208107==='string'&&_0x208107[_0x8511b1(0x1ac)]())return _0x208107[_0x8511b1(0x1ac)]();const _0x52cce7=resolveLocalAppAliasCode(_0xb84038,typeof _0xb84038[_0x8511b1(0x1b7)]===_0x8511b1(0x1d3)?_0xb84038['defaultApp']:undefined);if(_0x52cce7)return _0x52cce7;const _0x478af3=normalizeEnv(String(_0xb84038[_0x8511b1(0x1e1)]||_0x8511b1(0x1a6))),_0x1f2ad6=isDaily(_0x478af3)?_0x8511b1(0x1ae):isDev(_0x478af3)?'development':_0x8511b1(0x1a6),_0x2597ea=resolveCachedAppCode(typeof _0xb84038[_0x8511b1(0x1b7)]===_0x8511b1(0x1d3)?_0xb84038[_0x8511b1(0x1b7)]:undefined,_0x1f2ad6,typeof _0xb84038['accessKey']===_0x8511b1(0x1d3)?_0xb84038[_0x8511b1(0x1e0)]:undefined);if(_0x2597ea)return _0x2597ea;const _0x4b7a7b=Object['values'](getLocalAppAliases(_0xb84038))[_0x8511b1(0x1bf)](_0x5c0a64=>_0x5c0a64?.['appcode']);return typeof _0x4b7a7b?.['appcode']===_0x8511b1(0x1d3)&&_0x4b7a7b['appcode'][_0x8511b1(0x1ac)]()?_0x4b7a7b[_0x8511b1(0x1d9)][_0x8511b1(0x1ac)]():undefined;}export function readScopedConfig(_0x11c91e){const _0x4e3d42=a104_0x1bc8f2,_0x169e8b=_0x11c91e[_0x4e3d42(0x1a1)]?_0x4e3d42(0x1a1):_0x4e3d42(0x1e4);return readConfigFile(resolveWriteConfigPath(_0x169e8b));}export function writeScopedConfig(_0x467915,_0x20a3c8){const _0x1ec6c6=a104_0x1bc8f2,_0x1bd53f=_0x20a3c8[_0x1ec6c6(0x1a1)]?_0x1ec6c6(0x1a1):_0x1ec6c6(0x1e4);writeConfigFile(resolveWriteConfigPath(_0x1bd53f),_0x467915);}export async function initGlobalEnvironment(_0x39e482){const _0xeaaf6e=a104_0x1bc8f2,{initEnv:_0x4e481b}=await import('./constant/env.js');_0x4e481b(_0x39e482[_0xeaaf6e(0x1e1)]);const {initDomains:_0x40c6f9}=await import('./constant/domain.js'),_0x1f09ed=resolveEnterpriseRoutingConfig(_0x39e482[_0xeaaf6e(0x1cb)][_0xeaaf6e(0x19f)]),_0x24608d=[_0xeaaf6e(0x1c2),_0xeaaf6e(0x1dc),_0xeaaf6e(0x1db),'runtimeDomain',_0xeaaf6e(0x1b3),_0xeaaf6e(0x1be),_0xeaaf6e(0x1d7),'platformDomain',_0xeaaf6e(0x1e2),'kbServiceDomain'],_0x404578=_0x1f09ed!==undefined||_0x24608d[_0xeaaf6e(0x1bc)](_0x532c97=>Object['prototype']['hasOwnProperty']['call'](_0x39e482['raw'],_0x532c97));_0x40c6f9({'apiDomain':_0x1f09ed?_0x1f09ed[_0xeaaf6e(0x1c2)]:_0x39e482[_0xeaaf6e(0x1cb)][_0xeaaf6e(0x1c2)]||_0x39e482[_0xeaaf6e(0x1cb)][_0xeaaf6e(0x1dc)]||undefined,'userDomain':_0x1f09ed?_0x1f09ed['userDomain']:_0x39e482[_0xeaaf6e(0x1cb)]['userDomain']||undefined,'runtimeDomain':_0x1f09ed?_0x1f09ed[_0xeaaf6e(0x1b6)]:_0x39e482[_0xeaaf6e(0x1cb)]['runtimeDomain']||undefined,'skillDomain':_0x1f09ed?_0x1f09ed[_0xeaaf6e(0x1b3)]:_0x39e482[_0xeaaf6e(0x1cb)][_0xeaaf6e(0x1b3)]||_0x39e482[_0xeaaf6e(0x1cb)]['skillHubDomain']||_0x39e482[_0xeaaf6e(0x1cb)][_0xeaaf6e(0x1d7)]||_0x39e482[_0xeaaf6e(0x1cb)]['platformDomain']||undefined,'kbServiceDomain':_0x1f09ed?_0x1f09ed['kbServiceDomain']:typeof _0x39e482[_0xeaaf6e(0x1cb)][_0xeaaf6e(0x1c0)]===_0xeaaf6e(0x1d3)&&_0x39e482[_0xeaaf6e(0x1cb)][_0xeaaf6e(0x1c0)][_0xeaaf6e(0x1ac)]()?_0x39e482[_0xeaaf6e(0x1cb)]['kbServiceDomain']:undefined,'allowOfficialKbServiceDefault':!_0x404578,'region':normalizeLovrabetRegion(_0x39e482[_0xeaaf6e(0x1cb)][_0xeaaf6e(0x1a0)])});}export function getProjectConfigPath(){const _0x372526=a104_0x1bc8f2;return resolveConfigPath(process[_0x372526(0x1ce)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4815ff){const _0x3120f0=a104_0x1bc8f2;if(!existsSync(_0x4815ff))return{'status':_0x3120f0(0x1d6)};try{const _0xf84a99=readFileSync(_0x4815ff,{'encoding':_0x3120f0(0x1e5)});if(!_0xf84a99?.[_0x3120f0(0x1ac)]())return{'status':_0x3120f0(0x1b4)};const _0x12de9=JSON[_0x3120f0(0x1da)](_0xf84a99);return{'status':'ok','data':_0x12de9};}catch(_0x338d30){return{'status':_0x3120f0(0x1a9),'message':_0x338d30 instanceof Error?_0x338d30[_0x3120f0(0x1b0)]:String(_0x338d30)};}}export function loadRawConfigLayers(_0x22953e){const _0x3a2288=a104_0x1bc8f2;let _0x2bbe83={},_0x4c3ce9={},_0x200ac8,_0x46ca14;try{_0x200ac8=resolveConfigPath(homedir());if(_0x200ac8){const _0x3ae887=readFileSync(_0x200ac8,{'encoding':'utf8'});if(_0x3ae887)_0x2bbe83=JSON[_0x3a2288(0x1da)](_0x3ae887);}}catch{}try{const _0x2a0233=_0x22953e||process[_0x3a2288(0x1ce)]();_0x46ca14=resolveConfigPath(_0x2a0233);if(_0x46ca14){const _0x2f56f6=readFileSync(_0x46ca14,{'encoding':_0x3a2288(0x1e5)});if(_0x2f56f6)_0x4c3ce9=JSON[_0x3a2288(0x1da)](_0x2f56f6);}}catch{}return{'globalPath':_0x200ac8,'projectPath':_0x46ca14,'globalConfig':_0x2bbe83,'projectConfig':_0x4c3ce9};}function mergeRawConfigLayers(_0x45a51d){const _0x9140c5=a104_0x1bc8f2,{globalConfig:_0x299cba,projectConfig:_0x120eaf}=_0x45a51d,_0x20b367={..._0x299cba,..._0x120eaf};delete _0x20b367['inherit'];if(_0x9140c5(0x1b7)in _0x120eaf)_0x20b367[_0x9140c5(0x1b7)]=_0x120eaf[_0x9140c5(0x1b7)];else _0x299cba[_0x9140c5(0x1b7)]&&(_0x20b367[_0x9140c5(0x1b7)]=_0x299cba[_0x9140c5(0x1b7)]);return _0x20b367;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5e7222){return mergeRawConfigLayers(loadRawConfigLayers(_0x5e7222));}export function readRawConfigWithLayers(_0x5f43f1){const _0x1200e3=loadRawConfigLayers(_0x5f43f1);return{'config':mergeRawConfigLayers(_0x1200e3),'layers':_0x1200e3};}export function resolveDefaultAppSource(_0x104c97){const _0xa82879=a104_0x1bc8f2;if(_0xa82879(0x1b7)in _0x104c97[_0xa82879(0x1b8)])return _0xa82879(0x1e4);if(_0x104c97[_0xa82879(0x1a4)]['defaultApp'])return'global';return null;}function buildConfig(_0x5648fd,_0x57fc82){const _0x49eddf=a104_0x1bc8f2,_0xdf8d7a=_0x5648fd[_0x49eddf(0x1b7)]||undefined,_0x33ba96=_0x57fc82[_0x49eddf(0x1d5)]||env('APP')||undefined,_0x4e8203=_0x33ba96||_0xdf8d7a||undefined,_0x18490f=env('ACCESS_KEY')||_0x5648fd[_0x49eddf(0x1e0)]||undefined,_0xab8c9b=_0x57fc82[_0x49eddf(0x1e1)]||env('ENV')||_0x5648fd[_0x49eddf(0x1e1)]||DEFAULT_CONFIG_VALUES[_0x49eddf(0x1e1)],_0x3d1530=normalizeEnv(String(_0xab8c9b)),_0x345b8b=isDaily(_0x3d1530)?_0x49eddf(0x1ae):isDev(_0x3d1530)?_0x49eddf(0x1e3):_0x49eddf(0x1a6),_0x3096cc=typeof _0x57fc82[_0x49eddf(0x1d9)]===_0x49eddf(0x1d3)?_0x57fc82[_0x49eddf(0x1d9)]:undefined,_0x4c5100=env('APPCODE'),_0xff01eb=_0x33ba96?undefined:_0x5648fd[_0x49eddf(0x1d9)]||_0x5648fd[_0x49eddf(0x1d5)]||undefined,_0x40177a=_0x33ba96||(_0xff01eb?undefined:_0xdf8d7a),_0xbd6f7e=resolveLocalAppAliasCode(_0x5648fd,_0x40177a),_0x25c41c=resolveCachedAppCode(_0x40177a,_0x345b8b,_0x18490f),_0x59546a=_0x3096cc||_0x4c5100||_0xff01eb||_0xbd6f7e||_0x25c41c||undefined,_0x1a5539=_0x3096cc?_0x49eddf(0x1de):_0x4c5100?'env':_0xff01eb?_0x49eddf(0x19e):_0xbd6f7e?'local-alias':_0x25c41c?'cache':undefined,_0x1606f9=_0x5648fd[_0x49eddf(0x1a2)]||DEFAULT_CONFIG_VALUES['locale'],_0x2983e4=undefined,_0x331cd0=_0x57fc82[_0x49eddf(0x1bb)]||env(_0x49eddf(0x1af))||_0x5648fd[_0x49eddf(0x1bb)],_0x19a2cf=normalizeLegacyOutputFormat(_0x331cd0),_0x4a31c0=env(_0x49eddf(0x1a5))||_0x5648fd[_0x49eddf(0x1cd)],_0x47bc6d=_0x4a31c0?Number(_0x4a31c0)||undefined:undefined,_0x12d25f=_0x5648fd['riskLevel'],_0x37403e=_0x12d25f==='read'||_0x12d25f===_0x49eddf(0x1c5)||_0x12d25f===_0x49eddf(0x1b2)?_0x12d25f:DEFAULT_CONFIG_VALUES[_0x49eddf(0x1b1)],_0x16f67f=_0x5648fd['nativeToolAvailable']===!![],_0x2d2b9e=env(_0x49eddf(0x1b5)),_0x15bf09=_0x2d2b9e==='1'||_0x2d2b9e===_0x49eddf(0x1aa);return{'appCode':typeof _0x59546a===_0x49eddf(0x1d3)&&_0x59546a['trim']()?_0x59546a['trim']():undefined,'appCodeSource':_0x1a5539,'env':_0x345b8b,'locale':_0x1606f9,'cookie':_0x2983e4,'accessKey':_0x18490f,'format':_0x19a2cf,'pageSize':_0x47bc6d,'riskLevel':_0x37403e,'nativeToolAvailable':_0x16f67f,'verbose':_0x15bf09,'defaultApp':_0xdf8d7a,'currentApp':typeof _0x4e8203===_0x49eddf(0x1d3)?_0x4e8203:undefined,'raw':_0x5648fd};}function env(_0x2d3214){return productEnv(_0x2d3214);}async function buildAuth(_0x5bbbf5){const _0x4a9f0d=a104_0x1bc8f2,_0x248d61='',_0xeed610=!!_0x5bbbf5[_0x4a9f0d(0x1e0)];return{'cookie':_0x248d61,'isLoggedIn':_0xeed610,async 'getOrLogin'(){if(_0xeed610)return _0x248d61;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a104_0x397e46=a104_0x35b4;(function(_0x42f181,_0x200b35){const _0x30fc09=a104_0x35b4,_0x54d34d=_0x42f181();while(!![]){try{const _0x2631ea=-parseInt(_0x30fc09(0x1ca))/0x1+-parseInt(_0x30fc09(0x1a6))/0x2+parseInt(_0x30fc09(0x1b5))/0x3+-parseInt(_0x30fc09(0x185))/0x4+parseInt(_0x30fc09(0x1be))/0x5+parseInt(_0x30fc09(0x1d4))/0x6*(-parseInt(_0x30fc09(0x1bd))/0x7)+parseInt(_0x30fc09(0x1ba))/0x8;if(_0x2631ea===_0x200b35)break;else _0x54d34d['push'](_0x54d34d['shift']());}catch(_0x2c609d){_0x54d34d['push'](_0x54d34d['shift']());}}}(a104_0x3b09,0xc8b69));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';function a104_0x35b4(_0x3c04df,_0x1a0d25){_0x3c04df=_0x3c04df-0x184;const _0x3b0971=a104_0x3b09();let _0x35b4a5=_0x3b0971[_0x3c04df];return _0x35b4a5;}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[a104_0x397e46(0x18d)];function resolveConfigPath(_0x13fc50){for(const _0x40b7ec of CONFIG_NAMES){const _0x523f11=resolve(_0x13fc50,_0x40b7ec);if(existsSync(_0x523f11))return _0x523f11;}return undefined;}export function resolveWriteConfigPath(_0x2e54e1){const _0x46eec5=a104_0x397e46,_0x4c0137=_0x2e54e1==='project'?process[_0x46eec5(0x1bb)]():homedir(),_0x26b80e=resolveConfigPath(_0x4c0137);return _0x26b80e??resolve(_0x4c0137,NEW_CONFIG_NAME);}export function readConfigFile(_0x4a6375){const _0xf17b6b=a104_0x397e46;try{if(existsSync(_0x4a6375)){const _0x6945d6=readFileSync(_0x4a6375,{'encoding':_0xf17b6b(0x1a9)});if(_0x6945d6){const _0x375b09=JSON[_0xf17b6b(0x195)](_0x6945d6);return migrateOnlineEnv(_0x4a6375,_0x375b09),_0x375b09;}}}catch{}return{};}function migrateOnlineEnv(_0x55d004,_0x9b330d){const _0x4a6c01=a104_0x397e46;let _0x2ff621=![];_0x9b330d[_0x4a6c01(0x184)]==='online'&&(_0x9b330d[_0x4a6c01(0x184)]='production',_0x2ff621=!![]);if(_0x9b330d[_0x4a6c01(0x19f)]&&typeof _0x9b330d[_0x4a6c01(0x19f)]==='object')for(const _0x333efe of Object['values'](_0x9b330d[_0x4a6c01(0x19f)])){_0x333efe&&_0x333efe[_0x4a6c01(0x184)]===_0x4a6c01(0x1bf)&&(_0x333efe[_0x4a6c01(0x184)]=_0x4a6c01(0x194),_0x2ff621=!![]);}if(_0x2ff621)try{writeConfigFile(_0x55d004,_0x9b330d);}catch{}}export function writeConfigFile(_0xd4301d,_0x14333f){const _0x69040f=a104_0x397e46,_0x4c13b6=dirname(_0xd4301d);!existsSync(_0x4c13b6)&&mkdirSync(_0x4c13b6,{'recursive':!![]});const _0x4ebf81=_0xd4301d+_0x69040f(0x1d1);try{writeFileSync(_0x4ebf81,JSON[_0x69040f(0x1ac)](_0x14333f,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x4ebf81,_0xd4301d);}catch(_0x3fbc72){if(_0x3fbc72[_0x69040f(0x18a)]===_0x69040f(0x1b4)||_0x3fbc72[_0x69040f(0x18a)]==='EXDEV'||_0x3fbc72['code']==='EACCES'){writeFileSync(_0xd4301d,JSON[_0x69040f(0x1ac)](_0x14333f,null,0x2)+'\x0a',{'encoding':_0x69040f(0x1a9)});try{unlinkSync(_0x4ebf81);}catch{}}else throw _0x3fbc72;}}catch(_0xf36f3b){try{unlinkSync(_0x4ebf81);}catch{}throw _0xf36f3b;}}export function isNonInteractiveMode(_0x3062aa){const _0x351fea=a104_0x397e46;return!!(_0x3062aa[_0x351fea(0x1af)]||_0x3062aa['ci']||productEnvNames('CI')[_0x351fea(0x1b8)](_0x92aafe=>process.env[_0x92aafe]===_0x351fea(0x196))||process.env.CI==='true'||!process[_0x351fea(0x1c6)][_0x351fea(0x1cc)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5997dd=a104_0x397e46;if(!process[_0x5997dd(0x1c0)][_0x5997dd(0x1cc)])return![];try{const _0x4b7529=process[_0x5997dd(0x1c0)]['isRaw'];return process[_0x5997dd(0x1c0)][_0x5997dd(0x19b)](!![]),process[_0x5997dd(0x1c0)][_0x5997dd(0x19b)](_0x4b7529??![]),!![];}catch{return![];}}export async function createContext(_0x261ec5){const _0x2eccd7=a104_0x397e46,_0x30f7f8=readRawConfig(),_0x23ea7c=buildConfig(_0x30f7f8,_0x261ec5);await initGlobalEnvironment(_0x23ea7c);const {getUserDomain:_0x36a3f9,getApiDomain:_0x5cf6e5}=await import(_0x2eccd7(0x1d2)),_0x25af6f={'apiDomain':_0x5cf6e5(),'userDomain':_0x36a3f9()},_0xe2599c=await buildAuth(_0x23ea7c);logger[_0x2eccd7(0x1cd)](process['cwd']());const _0x357230=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x2eccd7(0x1b3)]['slice'](0x2))[_0x2eccd7(0x18b)]('\x20'))[_0x2eccd7(0x1cb)]();logger['setRawCommand'](_0x357230);const _0x16c69a=isNonInteractiveMode(_0x261ec5);return{'config':_0x23ea7c,'auth':_0xe2599c,'logger':logger,'env':_0x25af6f,'nonInteractive':_0x16c69a};}export function buildConfigFromFlags(_0xf0ad08){return buildConfig(readRawConfig(),_0xf0ad08);}export function getLocalAppAliases(_0x299618){const _0x3b170d=a104_0x397e46;return _0x299618[_0x3b170d(0x19f)]&&typeof _0x299618[_0x3b170d(0x19f)]===_0x3b170d(0x1aa)?_0x299618[_0x3b170d(0x19f)]:{};}export function resolveLocalAppAliasCode(_0x582994,_0x1bc7c6){const _0x3d47bc=a104_0x397e46;if(!_0x1bc7c6)return undefined;const _0x1e81f4=getLocalAppAliases(_0x582994)[_0x1bc7c6],_0x4f68ac=_0x1e81f4?.[_0x3d47bc(0x1c2)];return typeof _0x4f68ac===_0x3d47bc(0x1b6)&&_0x4f68ac['trim']()?_0x4f68ac[_0x3d47bc(0x1cb)]():undefined;}export function readAppCodeFromConfig(){const _0x2cba54=a104_0x397e46,_0x3114a7=readRawConfig(),_0x46b22e=_0x3114a7[_0x2cba54(0x1c2)]??_0x3114a7[_0x2cba54(0x1c1)];if(typeof _0x46b22e===_0x2cba54(0x1b6)&&_0x46b22e[_0x2cba54(0x1cb)]())return _0x46b22e[_0x2cba54(0x1cb)]();const _0xf4806e=resolveLocalAppAliasCode(_0x3114a7,typeof _0x3114a7['defaultApp']===_0x2cba54(0x1b6)?_0x3114a7[_0x2cba54(0x1a2)]:undefined);if(_0xf4806e)return _0xf4806e;const _0x14ab04=normalizeEnv(String(_0x3114a7[_0x2cba54(0x184)]||_0x2cba54(0x194))),_0x47e3a9=isDaily(_0x14ab04)?_0x2cba54(0x18e):isDev(_0x14ab04)?_0x2cba54(0x1a4):_0x2cba54(0x194),_0x508b38=resolveCachedAppCode(typeof _0x3114a7[_0x2cba54(0x1a2)]===_0x2cba54(0x1b6)?_0x3114a7['defaultApp']:undefined,_0x47e3a9,typeof _0x3114a7[_0x2cba54(0x19a)]===_0x2cba54(0x1b6)?_0x3114a7[_0x2cba54(0x19a)]:undefined);if(_0x508b38)return _0x508b38;const _0x2618a9=Object[_0x2cba54(0x189)](getLocalAppAliases(_0x3114a7))[_0x2cba54(0x1a7)](_0x101f70=>_0x101f70?.[_0x2cba54(0x1c2)]);return typeof _0x2618a9?.[_0x2cba54(0x1c2)]===_0x2cba54(0x1b6)&&_0x2618a9[_0x2cba54(0x1c2)][_0x2cba54(0x1cb)]()?_0x2618a9[_0x2cba54(0x1c2)][_0x2cba54(0x1cb)]():undefined;}export function readScopedConfig(_0x296fef){const _0x5f28bb=a104_0x397e46,_0x27b3e3=_0x296fef[_0x5f28bb(0x1ce)]?'global':_0x5f28bb(0x1d0);return readConfigFile(resolveWriteConfigPath(_0x27b3e3));}function a104_0x3b09(){const _0x428575=['appcode','agentDomain','hasOwnProperty','./constant/env.js','stdout','ENV','FORMAT','locale','1151866WnLAyi','trim','isTTY','setLogPath','global','write','project','.tmp','./constant/domain.js','message','996baMhke','riskLevel','env','5562328IABOEn','VERBOSE','APPCODE','pageSize','values','code','join','region','newConfigFileName','daily','raw','kbDomain','read','APP','skillDomain','production','parse','true','routing','explicit','cache','accessKey','setRawMode','missing','prototype','error','apps','projectConfig','nativeToolAvailable','defaultApp','call','development','inherit','1201322IUWRuK','find','apiDomain','utf8','object','runtimeDomain','stringify','format','skillHubDomain','nonInteractive','kbServiceDomain','userDomain','platformDomain','argv','EPERM','3569520MpyliY','string','authRequired','some','globalConfig','19978944gNyAGY','cwd','high-risk-write','53543USiPNQ','7738780RcYHIO','online','stdin','app'];a104_0x3b09=function(){return _0x428575;};return a104_0x3b09();}export function writeScopedConfig(_0x458535,_0x392d48){const _0x16fc44=a104_0x397e46,_0x10d9e9=_0x392d48[_0x16fc44(0x1ce)]?_0x16fc44(0x1ce):_0x16fc44(0x1d0);writeConfigFile(resolveWriteConfigPath(_0x10d9e9),_0x458535);}export async function initGlobalEnvironment(_0x21abcf){const _0x2d9700=a104_0x397e46,{initEnv:_0x391e10}=await import(_0x2d9700(0x1c5));_0x391e10(_0x21abcf[_0x2d9700(0x184)]);const {initDomains:_0x2b031f}=await import('./constant/domain.js'),_0x2cdb8d=resolveEnterpriseRoutingConfig(_0x21abcf['raw'][_0x2d9700(0x197)]),_0x4fb4be=['apiDomain','host',_0x2d9700(0x1b1),_0x2d9700(0x1ab),_0x2d9700(0x193),_0x2d9700(0x1ae),_0x2d9700(0x1c3),'platformDomain',_0x2d9700(0x190),_0x2d9700(0x1b0)],_0x18cc46=_0x2cdb8d!==undefined||_0x4fb4be['some'](_0xa5d09d=>Object[_0x2d9700(0x19d)][_0x2d9700(0x1c4)][_0x2d9700(0x1a3)](_0x21abcf[_0x2d9700(0x18f)],_0xa5d09d));_0x2b031f({'apiDomain':_0x2cdb8d?_0x2cdb8d[_0x2d9700(0x1a8)]:_0x21abcf[_0x2d9700(0x18f)][_0x2d9700(0x1a8)]||_0x21abcf[_0x2d9700(0x18f)]['host']||undefined,'userDomain':_0x2cdb8d?_0x2cdb8d[_0x2d9700(0x1b1)]:_0x21abcf['raw'][_0x2d9700(0x1b1)]||undefined,'runtimeDomain':_0x2cdb8d?_0x2cdb8d[_0x2d9700(0x1ab)]:_0x21abcf[_0x2d9700(0x18f)][_0x2d9700(0x1ab)]||undefined,'skillDomain':_0x2cdb8d?_0x2cdb8d[_0x2d9700(0x193)]:_0x21abcf['raw'][_0x2d9700(0x193)]||_0x21abcf['raw'][_0x2d9700(0x1ae)]||_0x21abcf[_0x2d9700(0x18f)][_0x2d9700(0x1c3)]||_0x21abcf['raw'][_0x2d9700(0x1b2)]||undefined,'kbServiceDomain':_0x2cdb8d?_0x2cdb8d[_0x2d9700(0x1b0)]:typeof _0x21abcf[_0x2d9700(0x18f)][_0x2d9700(0x1b0)]===_0x2d9700(0x1b6)&&_0x21abcf['raw']['kbServiceDomain'][_0x2d9700(0x1cb)]()?_0x21abcf[_0x2d9700(0x18f)][_0x2d9700(0x1b0)]:undefined,'allowOfficialKbServiceDefault':!_0x18cc46,'region':normalizeLovrabetRegion(_0x21abcf[_0x2d9700(0x18f)][_0x2d9700(0x18c)])});}export function getProjectConfigPath(){const _0x442870=a104_0x397e46;return resolveConfigPath(process[_0x442870(0x1bb)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x58073e){const _0x28c105=a104_0x397e46;if(!existsSync(_0x58073e))return{'status':_0x28c105(0x19c)};try{const _0x48886f=readFileSync(_0x58073e,{'encoding':_0x28c105(0x1a9)});if(!_0x48886f?.['trim']())return{'status':'empty'};const _0xbbfa47=JSON[_0x28c105(0x195)](_0x48886f);return{'status':'ok','data':_0xbbfa47};}catch(_0x3ac007){return{'status':_0x28c105(0x19e),'message':_0x3ac007 instanceof Error?_0x3ac007[_0x28c105(0x1d3)]:String(_0x3ac007)};}}export function loadRawConfigLayers(_0x23bc91){const _0x1bc406=a104_0x397e46;let _0x89e50c={},_0x185179={},_0x5e9584,_0x5f27ac;try{_0x5e9584=resolveConfigPath(homedir());if(_0x5e9584){const _0x4b0747=readFileSync(_0x5e9584,{'encoding':'utf8'});if(_0x4b0747)_0x89e50c=JSON[_0x1bc406(0x195)](_0x4b0747);}}catch{}try{const _0x270fe5=_0x23bc91||process['cwd']();_0x5f27ac=resolveConfigPath(_0x270fe5);if(_0x5f27ac){const _0x3d52e4=readFileSync(_0x5f27ac,{'encoding':_0x1bc406(0x1a9)});if(_0x3d52e4)_0x185179=JSON[_0x1bc406(0x195)](_0x3d52e4);}}catch{}return{'globalPath':_0x5e9584,'projectPath':_0x5f27ac,'globalConfig':_0x89e50c,'projectConfig':_0x185179};}function mergeRawConfigLayers(_0x7b3f75){const _0x1bdca7=a104_0x397e46,{globalConfig:_0x4025a0,projectConfig:_0x2cb77f}=_0x7b3f75,_0x3fd513={..._0x4025a0,..._0x2cb77f};delete _0x3fd513[_0x1bdca7(0x1a5)];if(_0x1bdca7(0x1a2)in _0x2cb77f)_0x3fd513[_0x1bdca7(0x1a2)]=_0x2cb77f[_0x1bdca7(0x1a2)];else _0x4025a0['defaultApp']&&(_0x3fd513[_0x1bdca7(0x1a2)]=_0x4025a0[_0x1bdca7(0x1a2)]);return _0x3fd513;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5187bc){return mergeRawConfigLayers(loadRawConfigLayers(_0x5187bc));}export function readRawConfigWithLayers(_0x5d540e){const _0xdc4a61=loadRawConfigLayers(_0x5d540e);return{'config':mergeRawConfigLayers(_0xdc4a61),'layers':_0xdc4a61};}export function resolveDefaultAppSource(_0x5f238f){const _0x4fbd30=a104_0x397e46;if(_0x4fbd30(0x1a2)in _0x5f238f[_0x4fbd30(0x1a0)])return _0x4fbd30(0x1d0);if(_0x5f238f[_0x4fbd30(0x1b9)][_0x4fbd30(0x1a2)])return _0x4fbd30(0x1ce);return null;}function buildConfig(_0x28d17d,_0x48584b){const _0x2ed6ac=a104_0x397e46,_0x1be4a4=_0x28d17d[_0x2ed6ac(0x1a2)]||undefined,_0x46ce50=_0x48584b['app']||env(_0x2ed6ac(0x192))||undefined,_0x338017=_0x46ce50||_0x1be4a4||undefined,_0x3b996b=env('ACCESS_KEY')||_0x28d17d[_0x2ed6ac(0x19a)]||undefined,_0xf622e8=_0x48584b[_0x2ed6ac(0x184)]||env(_0x2ed6ac(0x1c7))||_0x28d17d[_0x2ed6ac(0x184)]||DEFAULT_CONFIG_VALUES[_0x2ed6ac(0x184)],_0x41e75c=normalizeEnv(String(_0xf622e8)),_0x50b86a=isDaily(_0x41e75c)?_0x2ed6ac(0x18e):isDev(_0x41e75c)?_0x2ed6ac(0x1a4):_0x2ed6ac(0x194),_0x8e0aa5=typeof _0x48584b['appcode']==='string'?_0x48584b[_0x2ed6ac(0x1c2)]:undefined,_0x516832=env(_0x2ed6ac(0x187)),_0x127742=_0x46ce50?undefined:_0x28d17d[_0x2ed6ac(0x1c2)]||_0x28d17d[_0x2ed6ac(0x1c1)]||undefined,_0x34bd50=_0x46ce50||(_0x127742?undefined:_0x1be4a4),_0x3abe8d=resolveLocalAppAliasCode(_0x28d17d,_0x34bd50),_0x1bf556=resolveCachedAppCode(_0x34bd50,_0x50b86a,_0x3b996b),_0x1f5a1a=_0x8e0aa5||_0x516832||_0x127742||_0x3abe8d||_0x1bf556||undefined,_0x3fa93c=_0x8e0aa5?_0x2ed6ac(0x198):_0x516832?_0x2ed6ac(0x184):_0x127742?'top-level':_0x3abe8d?'local-alias':_0x1bf556?_0x2ed6ac(0x199):undefined,_0x17d2be=_0x28d17d[_0x2ed6ac(0x1c9)]||DEFAULT_CONFIG_VALUES[_0x2ed6ac(0x1c9)],_0x2291e8=undefined,_0x526e25=_0x48584b[_0x2ed6ac(0x1ad)]||env(_0x2ed6ac(0x1c8))||_0x28d17d['format'],_0x2087c6=normalizeLegacyOutputFormat(_0x526e25),_0x35d009=env('PAGE_SIZE')||_0x28d17d[_0x2ed6ac(0x188)],_0x54d606=_0x35d009?Number(_0x35d009)||undefined:undefined,_0x2f7b4e=_0x28d17d[_0x2ed6ac(0x1d5)],_0x3be6c6=_0x2f7b4e===_0x2ed6ac(0x191)||_0x2f7b4e===_0x2ed6ac(0x1cf)||_0x2f7b4e===_0x2ed6ac(0x1bc)?_0x2f7b4e:DEFAULT_CONFIG_VALUES['riskLevel'],_0x1c76ea=_0x28d17d[_0x2ed6ac(0x1a1)]===!![],_0x434a13=env(_0x2ed6ac(0x186)),_0x3539d8=_0x434a13==='1'||_0x434a13===_0x2ed6ac(0x196);return{'appCode':typeof _0x1f5a1a===_0x2ed6ac(0x1b6)&&_0x1f5a1a['trim']()?_0x1f5a1a[_0x2ed6ac(0x1cb)]():undefined,'appCodeSource':_0x3fa93c,'env':_0x50b86a,'locale':_0x17d2be,'cookie':_0x2291e8,'accessKey':_0x3b996b,'format':_0x2087c6,'pageSize':_0x54d606,'riskLevel':_0x3be6c6,'nativeToolAvailable':_0x1c76ea,'verbose':_0x3539d8,'defaultApp':_0x1be4a4,'currentApp':typeof _0x338017===_0x2ed6ac(0x1b6)?_0x338017:undefined,'raw':_0x28d17d};}function env(_0x593f5a){return productEnv(_0x593f5a);}async function buildAuth(_0x283cdd){const _0x4d0d09='',_0x25119d=!!_0x283cdd['accessKey'];return{'cookie':_0x4d0d09,'isLoggedIn':_0x25119d,async 'getOrLogin'(){const _0x72a623=a104_0x35b4;if(_0x25119d)return _0x4d0d09;throw CliErrors[_0x72a623(0x1b7)]();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -496,6 +496,7 @@ export declare function runRuntimeSchedule(appCode: string, scheduleId: string):
|
|
|
496
496
|
export declare function listDatasets(appCode: string, options?: {
|
|
497
497
|
code?: string;
|
|
498
498
|
name?: string;
|
|
499
|
+
tableName?: string;
|
|
499
500
|
}): Promise<DatasetItem[]>;
|
|
500
501
|
/**
|
|
501
502
|
* Fetches complete dataset driven data by code.
|
|
@@ -559,14 +560,14 @@ export declare function getPersonalBff(id: number, appCode: string): Promise<Per
|
|
|
559
560
|
export declare function createPersonalBff(appCode: string, input: PersonalBffUpsertInput): Promise<PersonalBffItem>;
|
|
560
561
|
export declare function updatePersonalBff(id: number, appCode: string, input: PersonalBffUpsertInput): Promise<PersonalBffItem>;
|
|
561
562
|
export declare function executePersonalBff(id: number, appCode: string, params: Record<string, any>): Promise<unknown>;
|
|
562
|
-
/** Lists
|
|
563
|
-
export declare function listPersonalKnowledgeBaseItems(appCode: string): Promise<PersonalKnowledgeBaseItem[]>;
|
|
563
|
+
/** Lists all personal entries through the KB Service page contract. */
|
|
564
|
+
export declare function listPersonalKnowledgeBaseItems(appCode: string, signal?: AbortSignal): Promise<PersonalKnowledgeBaseItem[]>;
|
|
564
565
|
/** Fetches one personal knowledge-base entry by numeric ID. */
|
|
565
|
-
export declare function getPersonalKnowledgeBaseItem(id: number, appCode: string): Promise<PersonalKnowledgeBaseItem>;
|
|
566
|
-
/** Creates a personal knowledge-base entry
|
|
567
|
-
export declare function createPersonalKnowledgeBaseItem(appCode: string, input: PersonalKnowledgeBaseUpsertInput): Promise<PersonalKnowledgeBaseItem>;
|
|
566
|
+
export declare function getPersonalKnowledgeBaseItem(id: number, appCode: string, signal?: AbortSignal): Promise<PersonalKnowledgeBaseItem>;
|
|
567
|
+
/** Creates a personal knowledge-base entry without retrying a write. */
|
|
568
|
+
export declare function createPersonalKnowledgeBaseItem(appCode: string, input: PersonalKnowledgeBaseUpsertInput, signal?: AbortSignal): Promise<PersonalKnowledgeBaseItem>;
|
|
568
569
|
/** Updates a personal knowledge-base entry. The backend requires POST. */
|
|
569
|
-
export declare function updatePersonalKnowledgeBaseItem(id: number, appCode: string, input: PersonalKnowledgeBaseUpsertInput): Promise<PersonalKnowledgeBaseItem>;
|
|
570
|
+
export declare function updatePersonalKnowledgeBaseItem(id: number, appCode: string, input: PersonalKnowledgeBaseUpsertInput, signal?: AbortSignal): Promise<PersonalKnowledgeBaseItem>;
|
|
570
571
|
export type RuntimeSkillRemoteScope = "all" | "personal" | "company";
|
|
571
572
|
/** Fetches one SkillHub native Skill by exact namespace and slug. */
|
|
572
573
|
export declare function getRuntimeSkillByCode(appCode: string, skillCode: string): Promise<RuntimeSkillItem | undefined>;
|