@lovrabet/lovrabet-cli 2.3.5-beta.2 → 2.3.6-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.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/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 +10 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.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.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.d.ts +3 -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.d.ts +3 -0
- package/lib/services/dataset-import/image-bytes.js +1 -0
- package/lib/services/dataset-import/image-ooxml.d.ts +10 -0
- package/lib/services/dataset-import/image-ooxml.js +1 -0
- package/lib/services/dataset-import/image-runner.d.ts +48 -0
- package/lib/services/dataset-import/image-runner.js +1 -0
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.d.ts +10 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/services/dataset-import/types.d.ts +28 -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 +4 -1
- package/skills/lovrabet/SKILL.md +3 -1
- package/skills/lovrabet/references/lovrabet-excel-import.md +19 -0
- package/skills/lovrabet.manifest.json +3 -3
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x5912c7=a94_0x1855;(function(_0x49bcde,_0x501383){const _0x456b1e=a94_0x1855,_0x13106f=_0x49bcde();while(!![]){try{const _0x555d61=parseInt(_0x456b1e(0xa1))/0x1+-parseInt(_0x456b1e(0x7f))/0x2*(-parseInt(_0x456b1e(0x7b))/0x3)+parseInt(_0x456b1e(0xa7))/0x4+-parseInt(_0x456b1e(0x98))/0x5+-parseInt(_0x456b1e(0x9b))/0x6*(parseInt(_0x456b1e(0xa3))/0x7)+-parseInt(_0x456b1e(0xa4))/0x8*(parseInt(_0x456b1e(0x91))/0x9)+parseInt(_0x456b1e(0x89))/0xa;if(_0x555d61===_0x501383)break;else _0x13106f['push'](_0x13106f['shift']());}catch(_0x2f0069){_0x13106f['push'](_0x13106f['shift']());}}}(a94_0x32f0,0x2cb35));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a94_0x5912c7(0x97)];function a94_0x32f0(){const _0x230c6c=['format','222629bUJEbC','Record\x20ID','116333uRxkvn','66488ujJvjB','SQL\x20query\x20code','verbose','1496aTXUWq','JSON\x20params\x20for\x20execute\x20commands','Show\x20help','global','type','22728HDRkZY','Preview\x20operation\x20without\x20executing','app','nonInteractive','62iWNKgx','boolean','Environment','name','cliDisplayName','non-interactive','params','sqlcode','<code>','yes','2858100lrgtpc','help','Name\x20filter','dry-run','<expr>','Alias\x20for\x20--non-interactive','appcode','string','9JwVCAG','clear','dryRun','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','fromEntries','<name>','cliBinName','933235qXHvgL','Force\x20non-interactive\x20mode\x20(CI)','json\x20|\x20pretty\x20|\x20compress','132cOoEjT','Clear\x20output','env','Skip\x20confirmation\x20for\x20high-risk\x20writes','Select\x20app\x20profile\x20by\x20name'];a94_0x32f0=function(){return _0x230c6c;};return a94_0x32f0();}export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a94_0x5912c7(0x83)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a94_0x5912c7(0x8f),'type':a94_0x5912c7(0x90),'description':'Override\x20appcode','hint':a94_0x5912c7(0x87)},{'name':a94_0x5912c7(0x7d),'meowKey':a94_0x5912c7(0x7d),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0x9f),'hint':a94_0x5912c7(0x96)},{'name':a94_0x5912c7(0x9d),'meowKey':a94_0x5912c7(0x9d),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0x81),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':a94_0x5912c7(0xa0),'meowKey':a94_0x5912c7(0xa0),'type':a94_0x5912c7(0x90),'description':'Output\x20format','hint':a94_0x5912c7(0x9a)},{'name':'jq','meowKey':'jq','type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0x94),'hint':a94_0x5912c7(0x8d)},{'name':'dry-run','meowKey':a94_0x5912c7(0x93),'type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x7c)},{'name':a94_0x5912c7(0x88),'meowKey':a94_0x5912c7(0x88),'type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x9e)},{'name':a94_0x5912c7(0x84),'meowKey':a94_0x5912c7(0x7e),'type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x99)},{'name':a94_0x5912c7(0xaa),'meowKey':'global','type':a94_0x5912c7(0x80),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x8e),'hidden':!![]},{'name':'help','meowKey':a94_0x5912c7(0x8a),'type':'boolean','description':a94_0x5912c7(0xa9)},{'name':'id','meowKey':'id','type':'string','description':a94_0x5912c7(0xa2),'hidden':!![]},{'name':a94_0x5912c7(0x82),'meowKey':a94_0x5912c7(0x82),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0x8b),'hidden':!![]},{'name':'sqlcode','meowKey':a94_0x5912c7(0x86),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0xa5),'hidden':!![]},{'name':a94_0x5912c7(0x85),'meowKey':a94_0x5912c7(0x85),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0xa8),'hidden':!![]},{'name':a94_0x5912c7(0xa6),'meowKey':a94_0x5912c7(0xa6),'type':'boolean','description':'Verbose\x20output','hidden':!![]},{'name':a94_0x5912c7(0x92),'meowKey':a94_0x5912c7(0x92),'type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x9c),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a94_0x5912c7(0x8f),a94_0x5912c7(0x7d),a94_0x5912c7(0x9d),a94_0x5912c7(0xa0),'jq',a94_0x5912c7(0x8c),a94_0x5912c7(0x88),'non-interactive','ci']);function a94_0x1855(_0x38dbaa,_0x1e795f){_0x38dbaa=_0x38dbaa-0x7b;const _0x32f063=a94_0x32f0();let _0x185523=_0x32f063[_0x38dbaa];return _0x185523;}export function buildMeowFlags(){const _0x36981d=a94_0x5912c7;return Object[_0x36981d(0x95)](GLOBAL_FLAGS['map'](_0x238bd6=>[_0x238bd6['meowKey'],{'type':_0x238bd6[_0x36981d(0xab)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x542f74=a95_0x1051;function a95_0x1051(_0x2f274f,_0x3a2855){_0x2f274f=_0x2f274f-0x1e7;const _0x399e90=a95_0x399e();let _0x105153=_0x399e90[_0x2f274f];return _0x105153;}(function(_0x1b4f6f,_0x5a7632){const _0x411590=a95_0x1051,_0x4d0a84=_0x1b4f6f();while(!![]){try{const _0x3d6809=-parseInt(_0x411590(0x1ed))/0x1*(-parseInt(_0x411590(0x1e9))/0x2)+parseInt(_0x411590(0x1ee))/0x3*(-parseInt(_0x411590(0x1f7))/0x4)+-parseInt(_0x411590(0x1ea))/0x5*(parseInt(_0x411590(0x1f1))/0x6)+parseInt(_0x411590(0x1e7))/0x7*(parseInt(_0x411590(0x1f2))/0x8)+-parseInt(_0x411590(0x1f5))/0x9+-parseInt(_0x411590(0x1ef))/0xa*(-parseInt(_0x411590(0x1f3))/0xb)+parseInt(_0x411590(0x1e8))/0xc*(parseInt(_0x411590(0x1f6))/0xd);if(_0x3d6809===_0x5a7632)break;else _0x4d0a84['push'](_0x4d0a84['shift']());}catch(_0x9a19c){_0x4d0a84['push'](_0x4d0a84['shift']());}}}(a95_0x399e,0x9090a));function a95_0x399e(){const _0x5301b3=['main','10601739epGUVM','31928xnxJhk','2073516BFFndi','8939TmqHyF','9132uqTkSv','6780OQctVg','86155COnDdY','en-US','production','204JltHAS','3QmfuOP','135010EQAZzV','compress','324UyjqWA','4040RvKpzw','11akCjuk'];a95_0x399e=function(){return _0x5301b3;};return a95_0x399e();}export const DEFAULT_APP_PROFILE_NAME=a95_0x542f74(0x1f4);export const DEFAULT_CONFIG_VALUES={'env':a95_0x542f74(0x1ec),'format':a95_0x542f74(0x1f0),'locale':a95_0x542f74(0x1eb),'riskLevel':'write'};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x1e887a=a96_0x5258;function a96_0x5258(_0x386184,_0x134207){_0x386184=_0x386184-0x176;const _0x5097a6=a96_0x5097();let _0x5258ad=_0x5097a6[_0x386184];return _0x5258ad;}(function(_0x2cf710,_0x17cb99){const _0x1237cf=a96_0x5258,_0x50b548=_0x2cf710();while(!![]){try{const _0x290f17=parseInt(_0x1237cf(0x180))/0x1*(-parseInt(_0x1237cf(0x179))/0x2)+parseInt(_0x1237cf(0x17e))/0x3*(parseInt(_0x1237cf(0x17f))/0x4)+-parseInt(_0x1237cf(0x185))/0x5*(-parseInt(_0x1237cf(0x17d))/0x6)+parseInt(_0x1237cf(0x177))/0x7+parseInt(_0x1237cf(0x17c))/0x8*(parseInt(_0x1237cf(0x17b))/0x9)+-parseInt(_0x1237cf(0x181))/0xa+-parseInt(_0x1237cf(0x183))/0xb*(parseInt(_0x1237cf(0x182))/0xc);if(_0x290f17===_0x17cb99)break;else _0x50b548['push'](_0x50b548['shift']());}catch(_0x5a0784){_0x50b548['push'](_0x50b548['shift']());}}}(a96_0x5097,0x3353e));import{PRODUCT_CONFIG}from'../constant/product.js';function a96_0x5097(){const _0x5632f9=['4306iGvvqw','npmRegistryBaseUrl','9djMPIN','774256DIdPot','102jTQpYL','588318qIQNfg','8tZbIzv','31IrUkgg','2585960iBciOz','12vgMfUJ','1870066dmCARs','/dist/lovrabet-cli/config/index.json','56825KqGXoX','skillSource','163688clmMHY','npmPackageName'];a96_0x5097=function(){return _0x5632f9;};return a96_0x5097();}export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a96_0x1e887a(0x178)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a96_0x1e887a(0x176)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a96_0x1e887a(0x17a)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG['cliCdnBaseUrl'];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a96_0x1e887a(0x184);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x2c2971=a97_0x18e4;(function(_0x423cc4,_0x454579){const _0x2418f8=a97_0x18e4,_0x239734=_0x423cc4();while(!![]){try{const _0x5088de=-parseInt(_0x2418f8(0x128))/0x1+parseInt(_0x2418f8(0x11c))/0x2*(-parseInt(_0x2418f8(0x11b))/0x3)+parseInt(_0x2418f8(0x114))/0x4*(parseInt(_0x2418f8(0x11f))/0x5)+parseInt(_0x2418f8(0x121))/0x6*(-parseInt(_0x2418f8(0x116))/0x7)+-parseInt(_0x2418f8(0x111))/0x8+-parseInt(_0x2418f8(0x120))/0x9*(-parseInt(_0x2418f8(0x127))/0xa)+parseInt(_0x2418f8(0x117))/0xb;if(_0x5088de===_0x454579)break;else _0x239734['push'](_0x239734['shift']());}catch(_0x131a77){_0x239734['push'](_0x239734['shift']());}}}(a97_0x45f1,0x68f3d));import{getEnv,isProduction}from'../constant/env.js';function a97_0x18e4(_0x1112e3,_0xda6f41){_0x1112e3=_0x1112e3-0x111;const _0x45f1bd=a97_0x45f1();let _0x18e4c=_0x45f1bd[_0x1112e3];return _0x18e4c;}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(_0x169885){const _0x4214ed=a97_0x18e4;customApiDomain=_0x169885?.['apiDomain'],customUserDomain=_0x169885?.[_0x4214ed(0x119)],customRuntimeDomain=_0x169885?.['runtimeDomain'],customSkillDomain=_0x169885?.[_0x4214ed(0x125)],customKbServiceDomain=_0x169885?.[_0x4214ed(0x118)],allowOfficialKbServiceDefault=_0x169885?.[_0x4214ed(0x126)]??!![],activeRegion=_0x169885?.[_0x4214ed(0x123)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x49f9cc=a97_0x18e4,_0x12b7b8=OFFICIAL_ROUTING_PROFILES[activeRegion][_0x49f9cc(0x11a)];return isProduction(getEnv())?_0x12b7b8[_0x49f9cc(0x113)]:'daily'in _0x12b7b8?_0x12b7b8[_0x49f9cc(0x124)]:_0x12b7b8[_0x49f9cc(0x113)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a97_0x2c2971(0x112)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a97_0x2c2971(0x122)];function a97_0x45f1(){const _0x4340d6=['region','daily','skillDomain','allowOfficialKbServiceDefault','1309300jNtQHh','354344LvgAKT','1713528qcijop','user','production','5012QoCxMN','kbService','126ZiLjZh','3022734kQthFi','kbServiceDomain','userDomain','serviceDomains','709221nTHieH','2xLwdyW','runtime','skill','1905wNZCmu','54AxYyzc','100980eOEIbi','api'];a97_0x45f1=function(){return _0x4340d6;};return a97_0x45f1();}export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a97_0x2c2971(0x11d)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a97_0x2c2971(0x11e)];export const getKbServiceDomain=()=>{const _0x19ec00=a97_0x2c2971;if(customKbServiceDomain)return customKbServiceDomain;if(!allowOfficialKbServiceDefault)return undefined;const _0x5661a4=getActiveRegionDomains();return _0x19ec00(0x115)in _0x5661a4?_0x5661a4['kbService']:undefined;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x5320db=a98_0x269b;(function(_0x54e03b,_0xb31d67){const _0x4f712f=a98_0x269b,_0x3425a9=_0x54e03b();while(!![]){try{const _0x2c0b21=-parseInt(_0x4f712f(0x1e3))/0x1+parseInt(_0x4f712f(0x1e2))/0x2+parseInt(_0x4f712f(0x1de))/0x3+-parseInt(_0x4f712f(0x1db))/0x4+-parseInt(_0x4f712f(0x1d7))/0x5*(-parseInt(_0x4f712f(0x1d6))/0x6)+-parseInt(_0x4f712f(0x1e0))/0x7*(-parseInt(_0x4f712f(0x1dc))/0x8)+-parseInt(_0x4f712f(0x1da))/0x9;if(_0x2c0b21===_0xb31d67)break;else _0x3425a9['push'](_0x3425a9['shift']());}catch(_0x9f095e){_0x3425a9['push'](_0x3425a9['shift']());}}}(a98_0x17af,0xf1792));import{productEnv}from'../constant/product.js';function a98_0x17af(){const _0x55b2b8=['3581162NElkwW','1294287KJPoVc','18ctKelt','1700155jiDPYB','dev','daily','5700528iJUlND','5184212YPioPL','3504WyiEqN','online','3587502uqgBDY','development','3297UnPJjr','production'];a98_0x17af=function(){return _0x55b2b8;};return a98_0x17af();}export const RUNTIME_ENV_VALUES=[a98_0x5320db(0x1e1),'development',a98_0x5320db(0x1d9)];export function normalizeEnv(_0x3d1079){const _0x21e8e6=a98_0x5320db;return _0x3d1079===_0x21e8e6(0x1dd)?_0x21e8e6(0x1e1):_0x3d1079;}function a98_0x269b(_0x17c2b5,_0x1bc533){_0x17c2b5=_0x17c2b5-0x1d6;const _0x17afcb=a98_0x17af();let _0x269b3f=_0x17afcb[_0x17c2b5];return _0x269b3f;}export function isProduction(_0x50e47e){return normalizeEnv(_0x50e47e)==='production';}export function isDaily(_0x1d60b5){return normalizeEnv(_0x1d60b5)==='daily';}export function isDev(_0x550435){const _0x43de59=a98_0x5320db,_0x262140=normalizeEnv(_0x550435);return _0x262140===_0x43de59(0x1df)||_0x262140===_0x43de59(0x1d8);}let env=normalizeEnv(productEnv('ENV')||a98_0x5320db(0x1e1));export function getEnv(){return env;}export function initEnv(_0x1a3e63){env=normalizeEnv(_0x1a3e63);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x1d5e52=a99_0x15fb;function a99_0x7f3b(){const _0x411cc3=['460317fXmJyh','compress','1210380sDeTrx','pretty','1082934LrFLoW','12456621SEQIfH','1622185aHCQQD','2689456SrBHDM','json','35yzaGFC','1qyUbej','520818prFmlU','10eSrKOH'];a99_0x7f3b=function(){return _0x411cc3;};return a99_0x7f3b();}(function(_0x5d9a4a,_0x192b51){const _0x19a206=a99_0x15fb,_0x4d2097=_0x5d9a4a();while(!![]){try{const _0x32c705=parseInt(_0x19a206(0x102))/0x1*(-parseInt(_0x19a206(0x109))/0x2)+parseInt(_0x19a206(0x105))/0x3+-parseInt(_0x19a206(0x107))/0x4+-parseInt(_0x19a206(0xfe))/0x5+-parseInt(_0x19a206(0x103))/0x6*(parseInt(_0x19a206(0x101))/0x7)+parseInt(_0x19a206(0xff))/0x8+-parseInt(_0x19a206(0xfd))/0x9*(-parseInt(_0x19a206(0x104))/0xa);if(_0x32c705===_0x192b51)break;else _0x4d2097['push'](_0x4d2097['shift']());}catch(_0x5afe3b){_0x4d2097['push'](_0x4d2097['shift']());}}}(a99_0x7f3b,0x42348));function a99_0x15fb(_0x1007b9,_0x32abf4){_0x1007b9=_0x1007b9-0xfd;const _0x7f3b50=a99_0x7f3b();let _0x15fbd5=_0x7f3b50[_0x1007b9];return _0x15fbd5;}export const OUTPUT_FORMAT_VALUES=[a99_0x1d5e52(0x100),a99_0x1d5e52(0x108),a99_0x1d5e52(0x106)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x4156bc=a100_0x5177;(function(_0x48498c,_0x39c2c9){const _0x36abd5=a100_0x5177,_0x33632c=_0x48498c();while(!![]){try{const _0x48145e=parseInt(_0x36abd5(0xdb))/0x1*(-parseInt(_0x36abd5(0xe9))/0x2)+-parseInt(_0x36abd5(0xd8))/0x3*(parseInt(_0x36abd5(0xd5))/0x4)+parseInt(_0x36abd5(0xd4))/0x5*(parseInt(_0x36abd5(0xe1))/0x6)+-parseInt(_0x36abd5(0xe6))/0x7*(-parseInt(_0x36abd5(0xea))/0x8)+-parseInt(_0x36abd5(0xda))/0x9*(-parseInt(_0x36abd5(0xdc))/0xa)+parseInt(_0x36abd5(0xe3))/0xb*(parseInt(_0x36abd5(0xe0))/0xc)+-parseInt(_0x36abd5(0xd2))/0xd;if(_0x48145e===_0x39c2c9)break;else _0x33632c['push'](_0x33632c['shift']());}catch(_0xc2dc19){_0x33632c['push'](_0x33632c['shift']());}}}(a100_0x1975,0xedbbe));export const PRODUCT_CONFIG={'cliBinName':a100_0x4156bc(0xec),'cliDisplayName':a100_0x4156bc(0xd1),'npmPackageName':a100_0x4156bc(0xd7),'skillSource':'lovrabet/lovrabet-cli','internalSkillSource':'git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','globalSkillName':a100_0x4156bc(0xec),'npmRegistryBaseUrl':'https://registry.npmjs.org','cliCdnBaseUrl':a100_0x4156bc(0xd6),'envPrefix':a100_0x4156bc(0xe4),'legacyEnvPrefixes':[a100_0x4156bc(0xe2)],'configFileNames':['.lovrabet.json'],'newConfigFileName':'.lovrabet.json','homeDirName':a100_0x4156bc(0xdf),'logFileName':a100_0x4156bc(0xe7),'invokeSource':a100_0x4156bc(0xd9),'userCenterDisplayName':a100_0x4156bc(0xeb),'skipNpxSkillsEnvSuffix':a100_0x4156bc(0xd3),'accessKeyCreatePath':a100_0x4156bc(0xde)};export function productEnvName(_0x6e1231){const _0x26fe1b=a100_0x4156bc;return PRODUCT_CONFIG[_0x26fe1b(0xe8)]+'_'+_0x6e1231;}export function productEnvNames(_0x2c83c2){const _0xe7d168=a100_0x4156bc;return[productEnvName(_0x2c83c2),...PRODUCT_CONFIG[_0xe7d168(0xe5)][_0xe7d168(0xdd)](_0x38ed57=>_0x38ed57+'_'+_0x2c83c2)];}function a100_0x5177(_0x145e0d,_0x7c9ef8){_0x145e0d=_0x145e0d-0xd1;const _0x1975d6=a100_0x1975();let _0x51771c=_0x1975d6[_0x145e0d];return _0x51771c;}function a100_0x1975(){const _0x5386f8=['8382Mxndus','LOVRABET','legacyEnvPrefixes','5018552lWaxCW','.lovrabet-runtime.log','envPrefix','2knJzBd','16PwpHbc','Lovrabet\x20User\x20Center','lovrabet','Lovrabet\x20Runtime\x20CLI','37363235WacGkT','SKIP_NPX_SKILLS','110eHtHmX','4VNZuEF','https://g.lovrabet.com','@lovrabet/lovrabet-cli','2512611WPSiaR','cli:lovrabet-runtime','3639141hxnYsD','246027ceNinu','10nbJSqn','map','/user/ak','.lovrabet','26340fkwSHB','387438NcKoag','RABETBASE'];a100_0x1975=function(){return _0x5386f8;};return a100_0x1975();}export function productEnv(_0xd67f73){for(const _0x5eefcc of productEnvNames(_0xd67f73)){const _0x286b10=process.env[_0x5eefcc];if(_0x286b10!==undefined)return _0x286b10;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53201a,_0xd3f549){const _0xfdd57e=a101_0x5b12,_0x1c0087=_0x53201a();while(!![]){try{const _0x17f5e1=-parseInt(_0xfdd57e(0xed))/0x1+parseInt(_0xfdd57e(0xf0))/0x2*(-parseInt(_0xfdd57e(0xe3))/0x3)+parseInt(_0xfdd57e(0xe8))/0x4+-parseInt(_0xfdd57e(0xef))/0x5*(-parseInt(_0xfdd57e(0xea))/0x6)+parseInt(_0xfdd57e(0xee))/0x7*(parseInt(_0xfdd57e(0xf1))/0x8)+parseInt(_0xfdd57e(0xe9))/0x9+-parseInt(_0xfdd57e(0xe0))/0xa;if(_0x17f5e1===_0xd3f549)break;else _0x1c0087['push'](_0x1c0087['shift']());}catch(_0x3e19ec){_0x1c0087['push'](_0x1c0087['shift']());}}}(a101_0x5397,0x21f33));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';import{CliErrors}from'../errors.js';export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;function a101_0x5b12(_0x1f5c2f,_0x5ab082){_0x1f5c2f=_0x1f5c2f-0xde;const _0x539781=a101_0x5397();let _0x5b12ab=_0x539781[_0x1f5c2f];return _0x5b12ab;}function a101_0x5397(){const _0x4cd4bb=['3567520pdCZue','Available\x20regions:\x20','includes','641133hrNdGx','join','validation','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','951352LoPTdM','2051541BKjcIt','38892nLSwZQ','\x22\x20is\x20not\x20currently\x20available.','string','196849creOCM','238SfITId','165CQiGQY','2CMskEv','53336zLrVec','.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.','Region\x20\x22'];a101_0x5397=function(){return _0x4cd4bb;};return a101_0x5397();}export function isLovrabetRegion(_0x4276ce){const _0xdd355f=a101_0x5b12;return typeof _0x4276ce===_0xdd355f(0xec)&&LOVRABET_REGION_VALUES['includes'](_0x4276ce);}export function isEnabledLovrabetRegion(_0x27f42e){const _0x5585f3=a101_0x5b12;return typeof _0x27f42e===_0x5585f3(0xec)&&ENABLED_LOVRABET_REGION_VALUES[_0x5585f3(0xe2)](_0x27f42e);}export function normalizeLovrabetRegion(_0x26b904){const _0x100808=a101_0x5b12;if(_0x26b904===undefined||_0x26b904===null||_0x26b904==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x26b904!=='string')throw CliErrors[_0x100808(0xe5)](_0x100808(0xe7)+typeof _0x26b904+'.',_0x100808(0xe6));const _0x55a46e=REGION_ALIASES[_0x26b904]??_0x26b904;if(isEnabledLovrabetRegion(_0x55a46e))return _0x55a46e;throw CliErrors[_0x100808(0xe5)](_0x100808(0xdf)+_0x26b904+_0x100808(0xeb),_0x100808(0xe1)+ENABLED_LOVRABET_REGION_VALUES[_0x100808(0xe4)](',\x20')+_0x100808(0xde));}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a102_0x14c3(_0x34def0,_0xfeab7e){_0x34def0=_0x34def0-0x154;const _0x103e01=a102_0x103e();let _0x14c3fd=_0x103e01[_0x34def0];return _0x14c3fd;}function a102_0x103e(){const _0x3c4934=['read','4326718dukzyl','2EaBpkT','287tCGeTk','1086267jPuTYg','43932xtcOhs','1924340evsawK','302591fhoJBd','468PMbiks','8ndjBgu','write','22768chXGBs','4277760JaZvlS'];a102_0x103e=function(){return _0x3c4934;};return a102_0x103e();}const a102_0x256000=a102_0x14c3;(function(_0x43e233,_0x15ecb7){const _0x72f9bf=a102_0x14c3,_0x3a8fc7=_0x43e233();while(!![]){try{const _0x388c0a=parseInt(_0x72f9bf(0x155))/0x1*(parseInt(_0x72f9bf(0x15d))/0x2)+-parseInt(_0x72f9bf(0x15f))/0x3+parseInt(_0x72f9bf(0x157))/0x4*(-parseInt(_0x72f9bf(0x154))/0x5)+parseInt(_0x72f9bf(0x160))/0x6*(parseInt(_0x72f9bf(0x15e))/0x7)+-parseInt(_0x72f9bf(0x159))/0x8*(-parseInt(_0x72f9bf(0x156))/0x9)+parseInt(_0x72f9bf(0x15a))/0xa+parseInt(_0x72f9bf(0x15c))/0xb;if(_0x388c0a===_0x15ecb7)break;else _0x3a8fc7['push'](_0x3a8fc7['shift']());}catch(_0x24bb58){_0x3a8fc7['push'](_0x3a8fc7['shift']());}}}(a102_0x103e,0x6b70a));export const RISK_LEVEL_VALUES=[a102_0x256000(0x15b),a102_0x256000(0x158),'high-risk-write'];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e0f2c,_0x23520e){const _0xe7b4f4=a103_0x4494,_0x1fd870=_0x3e0f2c();while(!![]){try{const _0x5035c2=-parseInt(_0xe7b4f4(0xf4))/0x1*(-parseInt(_0xe7b4f4(0xf0))/0x2)+-parseInt(_0xe7b4f4(0xef))/0x3+-parseInt(_0xe7b4f4(0xee))/0x4+-parseInt(_0xe7b4f4(0xf9))/0x5+-parseInt(_0xe7b4f4(0xf1))/0x6*(parseInt(_0xe7b4f4(0xf6))/0x7)+-parseInt(_0xe7b4f4(0xed))/0x8*(-parseInt(_0xe7b4f4(0xfa))/0x9)+parseInt(_0xe7b4f4(0xf8))/0xa;if(_0x5035c2===_0x23520e)break;else _0x1fd870['push'](_0x1fd870['shift']());}catch(_0x262556){_0x1fd870['push'](_0x1fd870['shift']());}}}(a103_0x52ad,0xc3261));import{PRODUCT_CONFIG}from'../constant/product.js';function a103_0x52ad(){const _0x21bbb3=['135664HrTGja','3388336CZraYF','1714734JBIHsN','1463292ufoHBV','8466270cCWOVr','accessKeyCreatePath','user','1qMBCJL','production','7WSvbmg','serviceDomains','29914990mksBxT','894495uaZPBV','45AZeDJt'];a103_0x52ad=function(){return _0x21bbb3;};return a103_0x52ad();}import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';export function getUserAccessKeyCreateUrl(_0x396a17=DEFAULT_LOVRABET_REGION){const _0x3d01d0=a103_0x4494,_0x2e8c44=OFFICIAL_ROUTING_PROFILES[_0x396a17][_0x3d01d0(0xf7)][_0x3d01d0(0xf5)][_0x3d01d0(0xf3)];return''+_0x2e8c44+PRODUCT_CONFIG[_0x3d01d0(0xf2)];}function a103_0x4494(_0x1f54ad,_0x410e86){_0x1f54ad=_0x1f54ad-0xed;const _0x52ad26=a103_0x52ad();let _0x4494ec=_0x52ad26[_0x1f54ad];return _0x4494ec;}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a104_0x2ef08a=a104_0x1e89;(function(_0x183a5d,_0x2c9231){const _0x3aa59f=a104_0x1e89,_0x4ee1ee=_0x183a5d();while(!![]){try{const _0x18d9fd=parseInt(_0x3aa59f(0x148))/0x1+-parseInt(_0x3aa59f(0x123))/0x2+parseInt(_0x3aa59f(0x13b))/0x3+parseInt(_0x3aa59f(0x120))/0x4+-parseInt(_0x3aa59f(0x125))/0x5+parseInt(_0x3aa59f(0x156))/0x6*(parseInt(_0x3aa59f(0x127))/0x7)+-parseInt(_0x3aa59f(0x122))/0x8;if(_0x18d9fd===_0x2c9231)break;else _0x4ee1ee['push'](_0x4ee1ee['shift']());}catch(_0x3690f1){_0x4ee1ee['push'](_0x4ee1ee['shift']());}}}(a104_0x5968,0xc2606));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_0x5968(){const _0x5c4630=['1448352pPUWct','PAGE_SIZE','13183824LSGXix','1202520qXuUEt','slice','2922115PXAeXg','configFileNames','42HDSrGz','runtimeDomain','setLogPath','skillHubDomain','write','nativeToolAvailable','stdout','error','inherit','code','empty','raw','true','some','authRequired','format','kbServiceDomain','high-risk-write','string','env','4037244SbwXfI','VERBOSE','.tmp','find','ENV','APP','stringify','production','globalConfig','EPERM','values','local-alias','isTTY','1459925ACqyAr','host','skillDomain','region','nonInteractive','riskLevel','apiDomain','parse','project','global','app','accessKey','stdin','development','462066kMpRml','daily','platformDomain','utf8','userDomain','cache','call','online','hasOwnProperty','EXDEV','explicit','setRawMode','defaultApp','./constant/env.js','./constant/domain.js','cwd','apps','agentDomain','kbDomain','pageSize','isRaw','appcode','trim','locale','APPCODE'];a104_0x5968=function(){return _0x5c4630;};return a104_0x5968();}import{redactCommandArgv}from'./utils/redaction.js';import{CliErrors}from'./errors.js';function a104_0x1e89(_0x581504,_0x4ae9c2){_0x581504=_0x581504-0x11c;const _0x596888=a104_0x5968();let _0x1e8976=_0x596888[_0x581504];return _0x1e8976;}import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a104_0x2ef08a(0x126)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x5d9a48){for(const _0xc43969 of CONFIG_NAMES){const _0x36289e=resolve(_0x5d9a48,_0xc43969);if(existsSync(_0x36289e))return _0x36289e;}return undefined;}export function resolveWriteConfigPath(_0x524e68){const _0x25b65e=a104_0x2ef08a,_0x39f8b5=_0x524e68===_0x25b65e(0x150)?process['cwd']():homedir(),_0x38d5aa=resolveConfigPath(_0x39f8b5);return _0x38d5aa??resolve(_0x39f8b5,NEW_CONFIG_NAME);}export function readConfigFile(_0x50700d){const _0x1fb9c6=a104_0x2ef08a;try{if(existsSync(_0x50700d)){const _0x4c51a0=readFileSync(_0x50700d,{'encoding':_0x1fb9c6(0x159)});if(_0x4c51a0){const _0x43db09=JSON[_0x1fb9c6(0x14f)](_0x4c51a0);return migrateOnlineEnv(_0x50700d,_0x43db09),_0x43db09;}}}catch{}return{};}function migrateOnlineEnv(_0x4c72f6,_0x295a8b){const _0x25d23b=a104_0x2ef08a;let _0x305651=![];_0x295a8b[_0x25d23b(0x13a)]===_0x25d23b(0x15d)&&(_0x295a8b[_0x25d23b(0x13a)]=_0x25d23b(0x142),_0x305651=!![]);if(_0x295a8b[_0x25d23b(0x166)]&&typeof _0x295a8b[_0x25d23b(0x166)]==='object')for(const _0xa1b223 of Object[_0x25d23b(0x145)](_0x295a8b[_0x25d23b(0x166)])){_0xa1b223&&_0xa1b223['env']==='online'&&(_0xa1b223[_0x25d23b(0x13a)]=_0x25d23b(0x142),_0x305651=!![]);}if(_0x305651)try{writeConfigFile(_0x4c72f6,_0x295a8b);}catch{}}export function writeConfigFile(_0x17e5cf,_0x54f27a){const _0x557f72=a104_0x2ef08a,_0x23a95f=dirname(_0x17e5cf);!existsSync(_0x23a95f)&&mkdirSync(_0x23a95f,{'recursive':!![]});const _0x1ffb41=_0x17e5cf+_0x557f72(0x13d);try{writeFileSync(_0x1ffb41,JSON[_0x557f72(0x141)](_0x54f27a,null,0x2)+'\x0a',{'encoding':_0x557f72(0x159),'mode':0x180});try{renameSync(_0x1ffb41,_0x17e5cf);}catch(_0x23c12e){if(_0x23c12e['code']===_0x557f72(0x144)||_0x23c12e[_0x557f72(0x130)]===_0x557f72(0x15f)||_0x23c12e['code']==='EACCES'){writeFileSync(_0x17e5cf,JSON[_0x557f72(0x141)](_0x54f27a,null,0x2)+'\x0a',{'encoding':_0x557f72(0x159)});try{unlinkSync(_0x1ffb41);}catch{}}else throw _0x23c12e;}}catch(_0xed3089){try{unlinkSync(_0x1ffb41);}catch{}throw _0xed3089;}}export function isNonInteractiveMode(_0x1dc5f3){const _0xb9364d=a104_0x2ef08a;return!!(_0x1dc5f3[_0xb9364d(0x14c)]||_0x1dc5f3['ci']||productEnvNames('CI')['some'](_0x185ff8=>process.env[_0x185ff8]==='true')||process.env.CI===_0xb9364d(0x133)||!process[_0xb9364d(0x12d)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x33e2dc=a104_0x2ef08a;if(!process[_0x33e2dc(0x154)][_0x33e2dc(0x147)])return![];try{const _0x4233ee=process[_0x33e2dc(0x154)][_0x33e2dc(0x16a)];return process[_0x33e2dc(0x154)][_0x33e2dc(0x161)](!![]),process[_0x33e2dc(0x154)][_0x33e2dc(0x161)](_0x4233ee??![]),!![];}catch{return![];}}export async function createContext(_0x218a45){const _0x38715f=a104_0x2ef08a,_0x240733=readRawConfig(),_0x903d95=buildConfig(_0x240733,_0x218a45);await initGlobalEnvironment(_0x903d95);const {getUserDomain:_0x4aa8f8,getApiDomain:_0x3731d9}=await import(_0x38715f(0x164)),_0x336b12={'apiDomain':_0x3731d9(),'userDomain':_0x4aa8f8()},_0x51d63b=await buildAuth(_0x903d95);logger[_0x38715f(0x129)](process[_0x38715f(0x165)]());const _0x55b14c=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process['argv'][_0x38715f(0x124)](0x2))['join']('\x20'))['trim']();logger['setRawCommand'](_0x55b14c);const _0x54c781=isNonInteractiveMode(_0x218a45);return{'config':_0x903d95,'auth':_0x51d63b,'logger':logger,'env':_0x336b12,'nonInteractive':_0x54c781};}export function buildConfigFromFlags(_0x1f4036){return buildConfig(readRawConfig(),_0x1f4036);}export function getLocalAppAliases(_0x426182){const _0x10abaa=a104_0x2ef08a;return _0x426182['apps']&&typeof _0x426182[_0x10abaa(0x166)]==='object'?_0x426182[_0x10abaa(0x166)]:{};}export function resolveLocalAppAliasCode(_0x585667,_0x62d077){const _0x21ad74=a104_0x2ef08a;if(!_0x62d077)return undefined;const _0x4e58e8=getLocalAppAliases(_0x585667)[_0x62d077],_0x44f464=_0x4e58e8?.[_0x21ad74(0x11c)];return typeof _0x44f464===_0x21ad74(0x139)&&_0x44f464['trim']()?_0x44f464[_0x21ad74(0x11d)]():undefined;}export function readAppCodeFromConfig(){const _0x344a7a=a104_0x2ef08a,_0x4e0b9a=readRawConfig(),_0x810b0a=_0x4e0b9a[_0x344a7a(0x11c)]??_0x4e0b9a[_0x344a7a(0x152)];if(typeof _0x810b0a===_0x344a7a(0x139)&&_0x810b0a['trim']())return _0x810b0a[_0x344a7a(0x11d)]();const _0x5f10a2=resolveLocalAppAliasCode(_0x4e0b9a,typeof _0x4e0b9a[_0x344a7a(0x162)]==='string'?_0x4e0b9a[_0x344a7a(0x162)]:undefined);if(_0x5f10a2)return _0x5f10a2;const _0x4fd0d5=normalizeEnv(String(_0x4e0b9a[_0x344a7a(0x13a)]||_0x344a7a(0x142))),_0x4284e4=isDaily(_0x4fd0d5)?'daily':isDev(_0x4fd0d5)?_0x344a7a(0x155):_0x344a7a(0x142),_0xd97740=resolveCachedAppCode(typeof _0x4e0b9a[_0x344a7a(0x162)]===_0x344a7a(0x139)?_0x4e0b9a[_0x344a7a(0x162)]:undefined,_0x4284e4,typeof _0x4e0b9a['accessKey']===_0x344a7a(0x139)?_0x4e0b9a['accessKey']:undefined);if(_0xd97740)return _0xd97740;const _0x3bee4a=Object[_0x344a7a(0x145)](getLocalAppAliases(_0x4e0b9a))[_0x344a7a(0x13e)](_0x4256d1=>_0x4256d1?.['appcode']);return typeof _0x3bee4a?.[_0x344a7a(0x11c)]===_0x344a7a(0x139)&&_0x3bee4a[_0x344a7a(0x11c)][_0x344a7a(0x11d)]()?_0x3bee4a['appcode'][_0x344a7a(0x11d)]():undefined;}export function readScopedConfig(_0x3d7227){const _0x18f0d4=a104_0x2ef08a,_0x542357=_0x3d7227[_0x18f0d4(0x151)]?'global':_0x18f0d4(0x150);return readConfigFile(resolveWriteConfigPath(_0x542357));}export function writeScopedConfig(_0x380e96,_0x2dbb3e){const _0x4c6c42=a104_0x2ef08a,_0x24df12=_0x2dbb3e[_0x4c6c42(0x151)]?'global':_0x4c6c42(0x150);writeConfigFile(resolveWriteConfigPath(_0x24df12),_0x380e96);}export async function initGlobalEnvironment(_0x2ee707){const _0x2c0776=a104_0x2ef08a,{initEnv:_0x2d4e28}=await import(_0x2c0776(0x163));_0x2d4e28(_0x2ee707['env']);const {initDomains:_0x399f6b}=await import(_0x2c0776(0x164)),_0xb285b2=resolveEnterpriseRoutingConfig(_0x2ee707[_0x2c0776(0x132)]['routing']),_0x5388e3=[_0x2c0776(0x14e),'host','userDomain',_0x2c0776(0x128),_0x2c0776(0x14a),_0x2c0776(0x12a),_0x2c0776(0x167),_0x2c0776(0x158),_0x2c0776(0x168),_0x2c0776(0x137)],_0x1f611a=_0xb285b2!==undefined||_0x5388e3[_0x2c0776(0x134)](_0x12bd16=>Object['prototype'][_0x2c0776(0x15e)][_0x2c0776(0x15c)](_0x2ee707[_0x2c0776(0x132)],_0x12bd16));_0x399f6b({'apiDomain':_0xb285b2?_0xb285b2[_0x2c0776(0x14e)]:_0x2ee707[_0x2c0776(0x132)][_0x2c0776(0x14e)]||_0x2ee707[_0x2c0776(0x132)][_0x2c0776(0x149)]||undefined,'userDomain':_0xb285b2?_0xb285b2[_0x2c0776(0x15a)]:_0x2ee707[_0x2c0776(0x132)]['userDomain']||undefined,'runtimeDomain':_0xb285b2?_0xb285b2[_0x2c0776(0x128)]:_0x2ee707['raw']['runtimeDomain']||undefined,'skillDomain':_0xb285b2?_0xb285b2['skillDomain']:_0x2ee707[_0x2c0776(0x132)][_0x2c0776(0x14a)]||_0x2ee707['raw'][_0x2c0776(0x12a)]||_0x2ee707[_0x2c0776(0x132)][_0x2c0776(0x167)]||_0x2ee707[_0x2c0776(0x132)][_0x2c0776(0x158)]||undefined,'kbServiceDomain':_0xb285b2?_0xb285b2[_0x2c0776(0x137)]:typeof _0x2ee707[_0x2c0776(0x132)][_0x2c0776(0x137)]===_0x2c0776(0x139)&&_0x2ee707['raw'][_0x2c0776(0x137)][_0x2c0776(0x11d)]()?_0x2ee707['raw'][_0x2c0776(0x137)]:undefined,'allowOfficialKbServiceDefault':!_0x1f611a,'region':normalizeLovrabetRegion(_0x2ee707[_0x2c0776(0x132)][_0x2c0776(0x14b)])});}export function getProjectConfigPath(){const _0x136b46=a104_0x2ef08a;return resolveConfigPath(process[_0x136b46(0x165)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x33fb0b){const _0x367737=a104_0x2ef08a;if(!existsSync(_0x33fb0b))return{'status':'missing'};try{const _0x1097fd=readFileSync(_0x33fb0b,{'encoding':_0x367737(0x159)});if(!_0x1097fd?.[_0x367737(0x11d)]())return{'status':_0x367737(0x131)};const _0x1e24a2=JSON[_0x367737(0x14f)](_0x1097fd);return{'status':'ok','data':_0x1e24a2};}catch(_0x2392cc){return{'status':_0x367737(0x12e),'message':_0x2392cc instanceof Error?_0x2392cc['message']:String(_0x2392cc)};}}export function loadRawConfigLayers(_0x57256f){const _0x10736c=a104_0x2ef08a;let _0x482fa5={},_0x26a626={},_0x3153a0,_0x1547b4;try{_0x3153a0=resolveConfigPath(homedir());if(_0x3153a0){const _0x6845f3=readFileSync(_0x3153a0,{'encoding':_0x10736c(0x159)});if(_0x6845f3)_0x482fa5=JSON[_0x10736c(0x14f)](_0x6845f3);}}catch{}try{const _0x219718=_0x57256f||process[_0x10736c(0x165)]();_0x1547b4=resolveConfigPath(_0x219718);if(_0x1547b4){const _0x84ed90=readFileSync(_0x1547b4,{'encoding':_0x10736c(0x159)});if(_0x84ed90)_0x26a626=JSON[_0x10736c(0x14f)](_0x84ed90);}}catch{}return{'globalPath':_0x3153a0,'projectPath':_0x1547b4,'globalConfig':_0x482fa5,'projectConfig':_0x26a626};}function mergeRawConfigLayers(_0x2da80a){const _0xf1637b=a104_0x2ef08a,{globalConfig:_0x2c36d6,projectConfig:_0x50e60e}=_0x2da80a,_0x40646b={..._0x2c36d6,..._0x50e60e};delete _0x40646b[_0xf1637b(0x12f)];if(_0xf1637b(0x162)in _0x50e60e)_0x40646b['defaultApp']=_0x50e60e[_0xf1637b(0x162)];else _0x2c36d6['defaultApp']&&(_0x40646b[_0xf1637b(0x162)]=_0x2c36d6[_0xf1637b(0x162)]);return _0x40646b;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x2fdeb7){return mergeRawConfigLayers(loadRawConfigLayers(_0x2fdeb7));}export function readRawConfigWithLayers(_0xad9e23){const _0x56df13=loadRawConfigLayers(_0xad9e23);return{'config':mergeRawConfigLayers(_0x56df13),'layers':_0x56df13};}export function resolveDefaultAppSource(_0x39787e){const _0x582261=a104_0x2ef08a;if(_0x582261(0x162)in _0x39787e['projectConfig'])return _0x582261(0x150);if(_0x39787e[_0x582261(0x143)][_0x582261(0x162)])return'global';return null;}function buildConfig(_0xdb90c1,_0x1d387b){const _0x91ded0=a104_0x2ef08a,_0x5fcfa1=_0xdb90c1[_0x91ded0(0x162)]||undefined,_0x4e5aea=_0x1d387b[_0x91ded0(0x152)]||env(_0x91ded0(0x140))||undefined,_0x407c9b=_0x4e5aea||_0x5fcfa1||undefined,_0x1b39fc=env('ACCESS_KEY')||_0xdb90c1['accessKey']||undefined,_0x26b155=_0x1d387b[_0x91ded0(0x13a)]||env(_0x91ded0(0x13f))||_0xdb90c1['env']||DEFAULT_CONFIG_VALUES[_0x91ded0(0x13a)],_0xce95fa=normalizeEnv(String(_0x26b155)),_0x343c4d=isDaily(_0xce95fa)?_0x91ded0(0x157):isDev(_0xce95fa)?_0x91ded0(0x155):'production',_0x4799f3=typeof _0x1d387b[_0x91ded0(0x11c)]===_0x91ded0(0x139)?_0x1d387b[_0x91ded0(0x11c)]:undefined,_0x4c8c94=env(_0x91ded0(0x11f)),_0x75f911=_0x4e5aea?undefined:_0xdb90c1[_0x91ded0(0x11c)]||_0xdb90c1[_0x91ded0(0x152)]||undefined,_0xe46165=_0x4e5aea||(_0x75f911?undefined:_0x5fcfa1),_0x15c220=resolveLocalAppAliasCode(_0xdb90c1,_0xe46165),_0x189bd9=resolveCachedAppCode(_0xe46165,_0x343c4d,_0x1b39fc),_0x2934d9=_0x4799f3||_0x4c8c94||_0x75f911||_0x15c220||_0x189bd9||undefined,_0x567736=_0x4799f3?_0x91ded0(0x160):_0x4c8c94?_0x91ded0(0x13a):_0x75f911?'top-level':_0x15c220?_0x91ded0(0x146):_0x189bd9?_0x91ded0(0x15b):undefined,_0x3337b7=_0xdb90c1[_0x91ded0(0x11e)]||DEFAULT_CONFIG_VALUES['locale'],_0x367cde=undefined,_0x468f6b=_0x1d387b[_0x91ded0(0x136)]||env('FORMAT')||_0xdb90c1[_0x91ded0(0x136)],_0x5b4c43=normalizeLegacyOutputFormat(_0x468f6b),_0x15263b=env(_0x91ded0(0x121))||_0xdb90c1[_0x91ded0(0x169)],_0x35603b=_0x15263b?Number(_0x15263b)||undefined:undefined,_0x1a0969=_0xdb90c1[_0x91ded0(0x14d)],_0x3f96ad=_0x1a0969==='read'||_0x1a0969===_0x91ded0(0x12b)||_0x1a0969===_0x91ded0(0x138)?_0x1a0969:DEFAULT_CONFIG_VALUES['riskLevel'],_0x3e8488=_0xdb90c1[_0x91ded0(0x12c)]===!![],_0x5c062c=env(_0x91ded0(0x13c)),_0x648a8=_0x5c062c==='1'||_0x5c062c===_0x91ded0(0x133);return{'appCode':typeof _0x2934d9==='string'&&_0x2934d9[_0x91ded0(0x11d)]()?_0x2934d9[_0x91ded0(0x11d)]():undefined,'appCodeSource':_0x567736,'env':_0x343c4d,'locale':_0x3337b7,'cookie':_0x367cde,'accessKey':_0x1b39fc,'format':_0x5b4c43,'pageSize':_0x35603b,'riskLevel':_0x3f96ad,'nativeToolAvailable':_0x3e8488,'verbose':_0x648a8,'defaultApp':_0x5fcfa1,'currentApp':typeof _0x407c9b===_0x91ded0(0x139)?_0x407c9b:undefined,'raw':_0xdb90c1};}function env(_0x3d2c68){return productEnv(_0x3d2c68);}async function buildAuth(_0x51c07c){const _0x20e637=a104_0x2ef08a,_0x58fd97='',_0x194625=!!_0x51c07c[_0x20e637(0x153)];return{'cookie':_0x58fd97,'isLoggedIn':_0x194625,async 'getOrLogin'(){const _0x1d58c1=_0x20e637;if(_0x194625)return _0x58fd97;throw CliErrors[_0x1d58c1(0x135)]();}};}
|
|
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']();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -516,6 +516,16 @@ export declare function createDatasetImportBatch(appCode: string, datasetCode: s
|
|
|
516
516
|
}>;
|
|
517
517
|
export declare function readDatasetImportRows(appCode: string, datasetCode: string, ids: number[]): Promise<Record<string, unknown>[]>;
|
|
518
518
|
export declare function readDatasetImportTaskRows(appCode: string, datasetCode: string, taskId: number): Promise<Record<string, unknown>[]>;
|
|
519
|
+
export declare function uploadDatasetImportImage(appCode: string, datasetCode: string, importId: string, media: {
|
|
520
|
+
contentHash: string;
|
|
521
|
+
type: string;
|
|
522
|
+
bytes: Buffer;
|
|
523
|
+
}): Promise<import("../services/dataset-import/image-runner.js").ImageImportResponse>;
|
|
524
|
+
export declare function readDatasetImportImage(appCode: string, datasetCode: string, importId: string, media: {
|
|
525
|
+
contentHash: string;
|
|
526
|
+
type: string;
|
|
527
|
+
size: number;
|
|
528
|
+
}): Promise<import("../services/dataset-import/image-runner.js").ImageImportResponse>;
|
|
519
529
|
export declare function getDatasetSdkUsageDoc(datasetCode: string, appCode: string): Promise<string>;
|
|
520
530
|
export declare function uploadRuntimeFile(appCode: string, filePath: string): Promise<RuntimeFileUploadResponse>;
|
|
521
531
|
export declare function queryRuntimeFileUrl(filePath: string, options?: {
|