@lovrabet/lovrabet-cli 2.3.12-beta.1 → 2.3.13-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/README.md +18 -1
- 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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/metric/contract.d.ts +8 -0
- package/lib/commands/metric/contract.js +1 -0
- package/lib/commands/metric/definition.d.ts +35 -0
- package/lib/commands/metric/definition.js +1 -0
- package/lib/commands/metric/detail.d.ts +2 -0
- package/lib/commands/metric/detail.js +1 -0
- package/lib/commands/metric/exec.d.ts +2 -0
- package/lib/commands/metric/exec.js +1 -0
- package/lib/commands/metric/index.d.ts +1 -0
- package/lib/commands/metric/index.js +1 -0
- package/lib/commands/metric/list.d.ts +2 -0
- package/lib/commands/metric/list.js +1 -0
- package/lib/commands/metric/shared.d.ts +17 -0
- package/lib/commands/metric/shared.js +1 -0
- 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 +4 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.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 +5 -2
- package/skills/lovrabet/SKILL.md +12 -4
- package/skills/lovrabet/guides/app-resolution.md +2 -0
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +2 -0
- package/skills/lovrabet/guides/development-intent-handoff.md +19 -3
- package/skills/lovrabet/guides/metric-consumption.md +134 -0
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +2 -0
- package/skills/lovrabet/references/lovrabet-auth.md +4 -0
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +16 -0
- package/skills/lovrabet/references/lovrabet-skill-authoring.md +27 -0
- package/skills/lovrabet-report-generation/SKILL.md +28 -0
- package/skills/lovrabet-report-generation/references/business-skill-reuse.md +19 -0
- package/skills/lovrabet-report-generation/references/quality-checks.md +16 -0
- package/skills/lovrabet-report-generation/references/report-workflow.md +42 -0
- package/skills/lovrabet-report-generation/templates/report-outline.md +10 -0
- package/skills/lovrabet.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x55af42=a99_0x30d6;(function(_0x5a760b,_0x3c193a){const _0x4e85ab=a99_0x30d6,_0x1234c2=_0x5a760b();while(!![]){try{const _0x4ba61d=parseInt(_0x4e85ab(0x116))/0x1+-parseInt(_0x4e85ab(0x110))/0x2*(-parseInt(_0x4e85ab(0x108))/0x3)+-parseInt(_0x4e85ab(0x118))/0x4+parseInt(_0x4e85ab(0xec))/0x5+-parseInt(_0x4e85ab(0xe4))/0x6*(-parseInt(_0x4e85ab(0xdf))/0x7)+parseInt(_0x4e85ab(0xf9))/0x8+-parseInt(_0x4e85ab(0xdc))/0x9;if(_0x4ba61d===_0x3c193a)break;else _0x1234c2['push'](_0x1234c2['shift']());}catch(_0xeb9b0a){_0x1234c2['push'](_0x1234c2['shift']());}}}(a99_0x45f6,0x64e02));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':'app','type':'string','description':a99_0x55af42(0x117)},{'name':a99_0x55af42(0x105),'type':a99_0x55af42(0x10f),'description':a99_0x55af42(0x11a)},{'name':a99_0x55af42(0xee),'type':'string','description':'Internal\x20development:\x20set\x20and\x20save\x20the\x20workspace\x20environment;\x20normally\x20omit','enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x4f975e,_0x547339){const _0xbe0f72=a99_0x55af42,_0x368c7d=_0x4f975e[_0xbe0f72(0xe9)](_0xbe0f72(0xde))['trim'](),_0x550109=_0x4f975e[_0xbe0f72(0xe9)](_0xbe0f72(0x105))[_0xbe0f72(0xf4)](),_0x2a67dc=_0x4f975e[_0xbe0f72(0xe9)](_0xbe0f72(0xee))[_0xbe0f72(0xf4)](),_0x3c8041=resolveWorkspaceEnv(_0x2a67dc||_0x4f975e[_0xbe0f72(0xe3)]||DEFAULT_CONFIG_VALUES[_0xbe0f72(0xee)]);if(!_0x368c7d&&!_0x550109)throw CliErrors[_0xbe0f72(0xe8)](_0xbe0f72(0x114),_0xbe0f72(0x10b)+CLI_BIN_NAME+_0xbe0f72(0xfe)+_0x547339+_0xbe0f72(0xed)+CLI_BIN_NAME+'\x20workspace\x20'+_0x547339+_0xbe0f72(0x100));if(_0x368c7d&&_0x550109)throw CliErrors[_0xbe0f72(0xe8)]('Conflicting\x20workspace\x20app\x20selectors.',_0xbe0f72(0xf5));const _0xf035d4=resolveWriteConfigPath(_0xbe0f72(0x112)),_0x219520=readConfigFile(_0xf035d4);assertWorkspaceCommandState(_0x547339,_0x219520);const _0x1406e3=_0x550109||await resolveRemoteAppCode({'command':_0x547339,'appName':_0x368c7d,'env':_0x3c8041,'accessKey':_0x4f975e[_0xbe0f72(0xf2)]});return writeWorkspaceConfig({'command':_0x547339,'appName':_0x368c7d,'appcode':_0x1406e3,'env':_0x3c8041,'shouldWriteEnv':!!_0x2a67dc,'accessKey':_0x4f975e[_0xbe0f72(0xf2)]},_0xf035d4,_0x219520),{'ok':!![],'data':{'configPath':_0xf035d4,'app':_0x368c7d||null,'appcode':_0x1406e3,'env':_0x2a67dc?_0x3c8041:null,'accessKeyWritten':![],'command':_0xbe0f72(0x119)+_0x547339},'message':buildWorkspaceMessage(_0xf035d4,_0x368c7d,_0x1406e3,_0x2a67dc?_0x3c8041:undefined)};}async function resolveRemoteAppCode(_0x23e12a){const _0x155c21=a99_0x55af42;if(!_0x23e12a['accessKey'])throw CliErrors[_0x155c21(0x10c)]('Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20'+CLI_BIN_NAME+_0x155c21(0xfe)+_0x23e12a[_0x155c21(0x115)]+'.');const {setActiveAK:_0x37c123}=await import(_0x155c21(0x113)),{getRemoteAppList:_0x45b494}=await import(_0x155c21(0xfb));_0x37c123(_0x23e12a[_0x155c21(0xf2)]);const _0x247c51=await _0x45b494({'env':_0x23e12a[_0x155c21(0xee)],'accessKey':_0x23e12a[_0x155c21(0xf2)],'noCache':![]}),_0x5201e9=findAppByName(_0x247c51[_0x155c21(0xf8)],_0x23e12a[_0x155c21(0xe7)]);if(_0x5201e9&&!isRuntimeAccessibleApp(_0x5201e9))throw runtimeInaccessibleAppError(_0x5201e9,'\x22'+_0x23e12a[_0x155c21(0xe7)]+'\x22');const _0x5c9cc6=_0x5201e9?.[_0x155c21(0xea)]?.['trim']();if(_0x5c9cc6)return _0x5c9cc6;const _0x1d7acc=_0x247c51['items'][_0x155c21(0xf1)](_0x53d175=>_0x53d175['appName'])[_0x155c21(0xe5)](Boolean),_0x45e6cf=_0x1d7acc[_0x155c21(0x103)]?_0x155c21(0x109)+Array[_0x155c21(0xfc)](new Set(_0x1d7acc))['join'](',\x20')+'.':_0x155c21(0xf3)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.';throw CliErrors[_0x155c21(0xe8)](_0x155c21(0xfd)+_0x23e12a[_0x155c21(0xe7)]+'\x22\x20not\x20found.',_0x45e6cf);}function writeWorkspaceConfig(_0x2190e1,_0x539e5d,_0x2d17bf){const _0x47af3a=a99_0x55af42;_0x2190e1['shouldWriteEnv']&&(_0x2d17bf[_0x47af3a(0xee)]=_0x2190e1[_0x47af3a(0xee)]);if(_0x2190e1[_0x47af3a(0xe7)]){const _0x10c666=isRecord(_0x2d17bf['apps'])?{..._0x2d17bf[_0x47af3a(0x10d)]}:{},_0x1289d0=isRecord(_0x10c666[_0x2190e1['appName']])?_0x10c666[_0x2190e1[_0x47af3a(0xe7)]]:{};return _0x10c666[_0x2190e1['appName']]={..._0x1289d0,'appcode':_0x2190e1[_0x47af3a(0x105)]},_0x2d17bf[_0x47af3a(0x10d)]=_0x10c666,_0x2d17bf[_0x47af3a(0x10a)]=_0x2190e1[_0x47af3a(0xe7)],delete _0x2d17bf['appcode'],delete _0x2d17bf[_0x47af3a(0xde)],writeAndReturn(_0x539e5d,_0x2d17bf);}return _0x2d17bf[_0x47af3a(0x105)]=_0x2190e1['appcode'],delete _0x2d17bf[_0x47af3a(0x10a)],delete _0x2d17bf['app'],writeAndReturn(_0x539e5d,_0x2d17bf);}function a99_0x30d6(_0x219b4d,_0x162198){_0x219b4d=_0x219b4d-0xdb;const _0x45f63b=a99_0x45f6();let _0x30d67c=_0x45f63b[_0x219b4d];return _0x30d67c;}function writeAndReturn(_0x3fc399,_0x2ab07a){return writeConfigFile(_0x3fc399,_0x2ab07a),_0x3fc399;}function resolveWorkspaceEnv(_0xc6453){const _0x4695b3=a99_0x55af42;if(RUNTIME_ENV_VALUES[_0x4695b3(0xdb)](_0xc6453))return _0xc6453;throw CliErrors[_0x4695b3(0xe8)](_0x4695b3(0xff)+_0xc6453+_0x4695b3(0xe0)+RUNTIME_ENV_VALUES[_0x4695b3(0xeb)](',\x20'));}function buildWorkspaceMessage(_0x4d3fe0,_0x12c681,_0x485f93,_0x16940b){const _0x1da42e=a99_0x55af42,_0x4f706f=_0x12c681?_0x12c681+'\x20('+_0x485f93+')':_0x485f93,_0x1b4a45=_0x16940b?_0x1da42e(0xfa)+_0x16940b:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0x4d3fe0+_0x1da42e(0x106)+_0x4f706f+_0x1b4a45+_0x1da42e(0xe6);}function a99_0x45f6(){const _0x575a5a=['appCode','join','2904565AfyfmR','\x20--app\x20<name>\x20or\x20','env','Workspace\x20app\x20context\x20is\x20not\x20initialized.','init','map','accessKey','Run\x20`','trim','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','isArray','Use\x20`','items','1283088zNEKWI','\x0aEnv:\x20','../../commands/app/remote-source.js','from','App\x20\x22','\x20workspace\x20','Invalid\x20env\x20\x22','\x20--appcode\x20<code>','workspace','Writes\x20Lovrabet\x20project\x20config\x20in\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet,\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','length','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','appcode','\x0aDefault\x20app:\x20','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','88581zXXbbN','Available\x20apps:\x20','defaultApp','Usage:\x20','authRequired','apps','use','string','28LSKXpX','Workspace\x20app\x20context\x20is\x20already\x20initialized.','project','../../core/api-client.js','Missing\x20workspace\x20app\x20selector.','command','812862pjUOMt','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','1187864SIQdii','workspace\x20','App\x20code\x20to\x20bind\x20directly','write','includes','14880888cwwuCv','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','app','42651Yylilm','\x22.\x20Allowed:\x20','object','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','envName','390QDaEul','filter','\x0aAccessKey:\x20not\x20written','appName','validation','str'];a99_0x45f6=function(){return _0x575a5a;};return a99_0x45f6();}function isRecord(_0x34ee2a){const _0x4032db=a99_0x55af42;return typeof _0x34ee2a===_0x4032db(0xe1)&&_0x34ee2a!==null&&!Array[_0x4032db(0xf6)](_0x34ee2a);}function hasWorkspaceAppBinding(_0x12b4a0){const _0x3754c7=a99_0x55af42;if(typeof _0x12b4a0[_0x3754c7(0x105)]===_0x3754c7(0x10f)&&_0x12b4a0[_0x3754c7(0x105)][_0x3754c7(0xf4)]()[_0x3754c7(0x103)]>0x0)return!![];if(typeof _0x12b4a0['defaultApp']!==_0x3754c7(0x10f)||!_0x12b4a0['defaultApp'][_0x3754c7(0xf4)]())return![];if(!isRecord(_0x12b4a0['apps']))return![];const _0x7b2f4f=_0x12b4a0[_0x3754c7(0x10d)][_0x12b4a0[_0x3754c7(0x10a)][_0x3754c7(0xf4)]()];return isRecord(_0x7b2f4f)&&typeof _0x7b2f4f[_0x3754c7(0x105)]==='string'&&_0x7b2f4f[_0x3754c7(0x105)]['trim']()[_0x3754c7(0x103)]>0x0;}function assertWorkspaceCommandState(_0x1bab36,_0x3a536a){const _0x4860d5=a99_0x55af42,_0x4097bd=hasWorkspaceAppBinding(_0x3a536a);if(_0x1bab36===_0x4860d5(0xf0)&&_0x4097bd)throw CliErrors[_0x4860d5(0xe8)](_0x4860d5(0x111),_0x4860d5(0xf7)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0x4860d5(0xdd));if(_0x1bab36===_0x4860d5(0x10e)&&!_0x4097bd)throw CliErrors[_0x4860d5(0xe8)](_0x4860d5(0xef),_0x4860d5(0xf3)+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0x4860d5(0x104));}function makeWorkspaceCommand(_0xc1e21d){const _0x56da97=a99_0x55af42;return{'service':_0x56da97(0x101),'command':_0xc1e21d,'description':_0xc1e21d===_0x56da97(0xf0)?_0x56da97(0x107):_0x56da97(0xe2),'risk':_0x56da97(0x11b),'confirmationDescription':_0xc1e21d===_0x56da97(0xf0)?_0x56da97(0x102):'Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x17025f){return executeWorkspaceUse(_0x17025f,_0xc1e21d);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a99_0x55af42(0xf0)),makeWorkspaceCommand(a99_0x55af42(0x10e))];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x176055=a100_0xda19;(function(_0x5b0ab3,_0x40a58c){const _0x428f50=a100_0xda19,_0x10158e=_0x5b0ab3();while(!![]){try{const _0x4d3948=parseInt(_0x428f50(0x1e5))/0x1*(-parseInt(_0x428f50(0x1c2))/0x2)+-parseInt(_0x428f50(0x1b5))/0x3*(parseInt(_0x428f50(0x1f4))/0x4)+-parseInt(_0x428f50(0x1c7))/0x5+-parseInt(_0x428f50(0x1d9))/0x6*(parseInt(_0x428f50(0x1f3))/0x7)+-parseInt(_0x428f50(0x1d0))/0x8+parseInt(_0x428f50(0x1bb))/0x9*(parseInt(_0x428f50(0x1e0))/0xa)+parseInt(_0x428f50(0x1da))/0xb;if(_0x4d3948===_0x40a58c)break;else _0x10158e['push'](_0x10158e['shift']());}catch(_0x302a00){_0x10158e['push'](_0x10158e['shift']());}}}(a100_0x39e3,0x91206));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a100_0x176055(0x1cc),a100_0x176055(0x1b3),a100_0x176055(0x1e2),a100_0x176055(0x1e1),a100_0x176055(0x1e6),a100_0x176055(0x1ec)];const DOMAIN_FLAGS={'userDomain':a100_0x176055(0x1bd),'apiDomain':a100_0x176055(0x1db),'runtimeDomain':a100_0x176055(0x1b6),'skillDomain':'skill-domain','kbServiceDomain':'kb-service-domain','harnessDomain':a100_0x176055(0x1b8)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a100_0x176055(0x1be),a100_0x176055(0x1b4),a100_0x176055(0x1c4),a100_0x176055(0x1f5),a100_0x176055(0x1d8)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a100_0x176055(0x1cc),'apiDomain':a100_0x176055(0x1b3),'runtimeDomain':'runtimeDomain','skillDomain':a100_0x176055(0x1e1),'kbServiceDomain':a100_0x176055(0x1e6),'harnessDomain':a100_0x176055(0x1ec)},ROUTING_CONSUMER=a100_0x176055(0x1f7);function a100_0x39e3(){const _0x23e41e=['api-domain','mode','isArray','filter','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','10mABdqb','skillDomain','runtimeDomain',':\x20\x22','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','1naVfQH','kbServiceDomain',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','search','join','domain-config','\x20and\x20has\x20no\x20default.','harnessDomain','\x22\x20is\x20not\x20a\x20valid\x20URL.','Unsupported\x20domain\x20config\x20field(s):\x20','pathname',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','str','\x22\x20and\x20kind\x20\x22','30681sjRZyu','82048WwsRrc','skillHubDomain','length','lovrabet-cli','enterprise-v1','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','https:','apiDomain','agentDomain','21KDmTWv','runtime-domain','password','harness-domain','default','legacy','6994827uwiHKG','keys','user-domain','host',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','domains','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','1724924waEyry','validation','platformDomain','parse','Domain\x20config\x20file\x20not\x20found:\x20','2679495tVcUyk','Invalid\x20domain\x20config\x20JSON:\x20','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','utf8','Invalid\x20','userDomain','kind','Enterprise\x20','includes','1318832HKyNPo','string','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','Allowed\x20fields:\x20','object','trim','cwd','protocol','kbDomain','510BLLFfi','20862479QmMkgO'];a100_0x39e3=function(){return _0x23e41e;};return a100_0x39e3();}export function normalizeDomainOrigin(_0x3244ef,_0x4aff6c){const _0xf53260=a100_0x176055;if(typeof _0x4aff6c!=='string'||!_0x4aff6c[_0xf53260(0x1d5)]())throw CliErrors[_0xf53260(0x1c3)](_0xf53260(0x1cb)+_0x3244ef+_0xf53260(0x1bf));let _0xe92358;try{_0xe92358=new URL(_0x4aff6c[_0xf53260(0x1d5)]());}catch{throw CliErrors[_0xf53260(0x1c3)](_0xf53260(0x1cb)+_0x3244ef+_0xf53260(0x1e3)+_0x4aff6c+_0xf53260(0x1ed));}if(_0xe92358['protocol']!==_0xf53260(0x1b2)||_0xe92358['username']||_0xe92358[_0xf53260(0x1b7)]||_0xe92358[_0xf53260(0x1ef)]!=='/'&&_0xe92358['pathname']!==''||_0xe92358[_0xf53260(0x1e8)]||_0xe92358['hash'])throw CliErrors['validation'](_0xf53260(0x1cb)+_0x3244ef+_0xf53260(0x1e7),_0xf53260(0x1c9));return _0xe92358['origin'];}function a100_0xda19(_0x38b02f,_0x28c34e){_0x38b02f=_0x38b02f-0x1b2;const _0x39e3e9=a100_0x39e3();let _0xda19c9=_0x39e3e9[_0x38b02f];return _0xda19c9;}export function normalizeRoutingDomainValue(_0xfd7fb1,_0x1ae4fe){const _0x2645ac=a100_0x176055;if(typeof _0x1ae4fe===_0x2645ac(0x1d1))return normalizeDomainOrigin(_0xfd7fb1,_0x1ae4fe);if(!_0x1ae4fe||typeof _0x1ae4fe!==_0x2645ac(0x1d4)||Array['isArray'](_0x1ae4fe))throw CliErrors[_0x2645ac(0x1c3)](_0x2645ac(0x1cb)+_0xfd7fb1+_0x2645ac(0x1f0));const _0x3541bc=_0x1ae4fe,_0x391cec=_0x3541bc[ROUTING_CONSUMER]??_0x3541bc[_0x2645ac(0x1b9)];if(_0x391cec===undefined)throw CliErrors[_0x2645ac(0x1c3)](_0x2645ac(0x1ce)+_0xfd7fb1+'\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'+ROUTING_CONSUMER+_0x2645ac(0x1eb));return normalizeDomainOrigin(_0xfd7fb1,_0x391cec);}export function resolveEnterpriseRoutingConfig(_0x1cd503){const _0x14d9c8=a100_0x176055;if(_0x1cd503===undefined)return undefined;if(!_0x1cd503||typeof _0x1cd503!=='object'||Array[_0x14d9c8(0x1dd)](_0x1cd503))throw CliErrors[_0x14d9c8(0x1c3)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x1cd503)[_0x14d9c8(0x1c0)];}export function readDomainConfigInput(_0x9a1c0c){const _0x269d5a=a100_0x176055,_0x546520=isAbsolute(_0x9a1c0c)?_0x9a1c0c:resolve(process[_0x269d5a(0x1d6)](),_0x9a1c0c);if(!existsSync(_0x546520))throw CliErrors[_0x269d5a(0x1c3)](_0x269d5a(0x1c6)+_0x546520);let _0xd627f;try{_0xd627f=JSON[_0x269d5a(0x1c5)](readFileSync(_0x546520,_0x269d5a(0x1ca)));}catch{throw CliErrors[_0x269d5a(0x1c3)](_0x269d5a(0x1c8)+_0x546520);}if(!_0xd627f||typeof _0xd627f!==_0x269d5a(0x1d4)||Array[_0x269d5a(0x1dd)](_0xd627f))throw CliErrors[_0x269d5a(0x1c3)](_0x269d5a(0x1df));const _0x16e3b6=_0xd627f;if('protocol'in _0x16e3b6)return parseEnterpriseRoutingManifest(_0x16e3b6);const _0x5a1e3a=Object[_0x269d5a(0x1bc)](_0x16e3b6)[_0x269d5a(0x1de)](_0x26d93d=>!DOMAIN_CONFIG_FIELDS[_0x269d5a(0x1cf)](_0x26d93d));if(_0x5a1e3a[_0x269d5a(0x1f6)]>0x0)throw CliErrors[_0x269d5a(0x1c3)](_0x269d5a(0x1ee)+_0x5a1e3a[_0x269d5a(0x1e9)](',\x20'),_0x269d5a(0x1d3)+DOMAIN_CONFIG_FIELDS[_0x269d5a(0x1e9)](',\x20'));const _0x3a2285={};for(const _0x274fdc of DOMAIN_CONFIG_FIELDS){_0x16e3b6[_0x274fdc]!==undefined&&(_0x3a2285[_0x274fdc]=normalizeDomainOrigin(_0x274fdc,_0x16e3b6[_0x274fdc]));}if(Object['keys'](_0x3a2285)['length']===0x0)throw CliErrors[_0x269d5a(0x1c3)]('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':_0x269d5a(0x1ba),'domains':_0x3a2285};}export function readDomainConfig(_0x27f8fc){return readDomainConfigInput(_0x27f8fc)['domains'];}export function resolveDomainConfigInput(_0x20ebf2){const _0x5a4397=a100_0x176055,_0x390348=(_0x20ebf2[_0x5a4397(0x1f1)](_0x5a4397(0x1ea))||'')['trim'](),_0x224aff=_0x390348?readDomainConfigInput(_0x390348):{'mode':_0x5a4397(0x1ba),'domains':{}},_0x438f37=DOMAIN_CONFIG_FIELDS['filter'](_0x15c687=>Boolean((_0x20ebf2[_0x5a4397(0x1f1)](DOMAIN_FLAGS[_0x15c687])||'')[_0x5a4397(0x1d5)]()));if(_0x224aff[_0x5a4397(0x1dc)]==='enterprise-v1'&&_0x438f37[_0x5a4397(0x1f6)]>0x0)throw CliErrors[_0x5a4397(0x1c3)](_0x5a4397(0x1f9),_0x5a4397(0x1d2));for(const _0x42f9ee of DOMAIN_CONFIG_FIELDS){const _0x54575e=(_0x20ebf2['str'](DOMAIN_FLAGS[_0x42f9ee])||'')[_0x5a4397(0x1d5)]();if(_0x54575e)_0x224aff[_0x5a4397(0x1c0)][_0x42f9ee]=normalizeDomainOrigin(_0x42f9ee,_0x54575e);}return _0x224aff;}export function resolveDomainFlags(_0x2663ac){const _0x2dbd20=a100_0x176055;return resolveDomainConfigInput(_0x2663ac)[_0x2dbd20(0x1c0)];}export function parseEnterpriseRoutingManifest(_0xe7a12){const _0x5bc58e=a100_0x176055;if(_0xe7a12[_0x5bc58e(0x1d7)]!==ENTERPRISE_ROUTING_PROTOCOL||_0xe7a12[_0x5bc58e(0x1cd)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors['validation'](_0x5bc58e(0x1e4)+ENTERPRISE_ROUTING_PROTOCOL+_0x5bc58e(0x1f2)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0xe7a12[_0x5bc58e(0x1c0)]||typeof _0xe7a12[_0x5bc58e(0x1c0)]!==_0x5bc58e(0x1d4)||Array[_0x5bc58e(0x1dd)](_0xe7a12[_0x5bc58e(0x1c0)]))throw CliErrors[_0x5bc58e(0x1c3)](_0x5bc58e(0x1c1));const _0x24d97a=_0xe7a12[_0x5bc58e(0x1c0)],_0x1decb6=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x5bc58e(0x1de)](_0x2915d7=>_0x24d97a[_0x2915d7]===undefined);if(_0x1decb6['length']>0x0)throw CliErrors[_0x5bc58e(0x1c3)]('Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20'+_0x1decb6[_0x5bc58e(0x1e9)](',\x20'));const _0xf7e2d0={},_0x294424={};for(const _0x2396a9 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x9534d9=_0x24d97a[_0x2396a9];if(_0x9534d9===undefined)continue;const _0x4029e3=normalizeRoutingDomainValue(_0x2396a9,_0x9534d9);_0xf7e2d0[_0x2396a9]=_0x4029e3;const _0x5b3f6b=ENTERPRISE_TO_LOCAL_FIELD[_0x2396a9];_0x5b3f6b&&(_0x294424[_0x5b3f6b]=_0x4029e3);}return{'mode':_0x5bc58e(0x1f8),'domains':_0x294424,'manifestDomains':_0xf7e2d0};}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a101_0x1589(){const _0x2c0f70=['enumValues','zh-CN','Default\x20page\x20size','toLowerCase','5nrpnzr','3180qfUfnW','160596UGMcRG','Lovrabet\x20region','21872npduTT','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','2246827fTpvox','env','2637KfMtxH','141925TPwYBM','filter','join','Config\x20key.\x20Top-level:\x20','entries','Override\x20user\x20domain','Native\x20Lovrabet\x20tool\x20availability\x20in\x20the\x20current\x20execution\x20host','importable','locale','6770FMQQKE','Override\x20KB\x20Service\x20domain','en-US','90rjqJOI','fromEntries','legacyCompatOnly','riskLevel','Target\x20environment','Override\x20SkillHub\x20domain',';\x20local\x20alias:\x20apps.<alias>.appcode','defaultValue','map','has','8XGHrXc','Override\x20runtime\x20domain','nativeToolAvailable','1063434NTwEDR'];a101_0x1589=function(){return _0x2c0f70;};return a101_0x1589();}const a101_0x558c02=a101_0x44a3;(function(_0x1908f6,_0x23f410){const _0xf448f3=a101_0x44a3,_0x56050a=_0x1908f6();while(!![]){try{const _0x13d7cf=-parseInt(_0xf448f3(0x150))/0x1+-parseInt(_0xf448f3(0x160))/0x2+parseInt(_0xf448f3(0x13c))/0x3*(-parseInt(_0xf448f3(0x152))/0x4)+parseInt(_0xf448f3(0x14e))/0x5*(parseInt(_0xf448f3(0x149))/0x6)+-parseInt(_0xf448f3(0x157))/0x7*(parseInt(_0xf448f3(0x146))/0x8)+-parseInt(_0xf448f3(0x156))/0x9*(-parseInt(_0xf448f3(0x14f))/0xa)+parseInt(_0xf448f3(0x154))/0xb;if(_0x13d7cf===_0x23f410)break;else _0x56050a['push'](_0x56050a['shift']());}catch(_0x3df6c0){_0x56050a['push'](_0x56050a['shift']());}}}(a101_0x1589,0x1eda6));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';function a101_0x44a3(_0x41611b,_0x4c4278){_0x41611b=_0x41611b-0x13a;const _0x158944=a101_0x1589();let _0x44a340=_0x158944[_0x41611b];return _0x44a340;}export const CONFIG_FIELD_SCHEMAS={'routing':{'description':'Versioned\x20enterprise\x20routing\x20manifest','topLevel':!![]},'region':{'description':a101_0x558c02(0x151),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a101_0x558c02(0x140),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a101_0x558c02(0x155)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':a101_0x558c02(0x14c),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a101_0x558c02(0x15c),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a101_0x558c02(0x147),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a101_0x558c02(0x141),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbServiceDomain':{'description':a101_0x558c02(0x13a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'harnessDomain':{'description':'Override\x20Harness\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':'Risk\x20level','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a101_0x558c02(0x13f)],'importable':!![]},'nativeToolAvailable':{'description':a101_0x558c02(0x15d),'topLevel':!![],'defaultValue':![]},'locale':{'description':a101_0x558c02(0x153),'topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a101_0x558c02(0x15f)],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a101_0x558c02(0x15b)](CONFIG_FIELD_SCHEMAS)[a101_0x558c02(0x158)](([,_0x52a97c])=>_0x52a97c['cliSettableTopLevel'])[a101_0x558c02(0x144)](([_0x2b1e9f])=>_0x2b1e9f));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a101_0x558c02(0x13f),a101_0x558c02(0x148)]);export const CONFIG_ENUM_VALUES=Object[a101_0x558c02(0x13d)](Object[a101_0x558c02(0x15b)](CONFIG_FIELD_SCHEMAS)[a101_0x558c02(0x158)](([,_0x4185cb])=>_0x4185cb[a101_0x558c02(0x14a)])['map'](([_0x4b885c,_0x3c0876])=>[_0x4b885c,[..._0x3c0876[a101_0x558c02(0x14a)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object['entries'](CONFIG_FIELD_SCHEMAS)[a101_0x558c02(0x158)](([,_0x39f0dd])=>_0x39f0dd[a101_0x558c02(0x15e)])['map'](([_0x2d8532])=>_0x2d8532);export function getConfigFieldSchema(_0x34cb60){return CONFIG_FIELD_SCHEMAS[_0x34cb60];}export function getConfigEnumValues(_0x3cfa0c){const _0x1c6e6b=a101_0x558c02;return getConfigFieldSchema(_0x3cfa0c)?.[_0x1c6e6b(0x14a)];}export function getConfigDefaultValue(_0x283478){const _0x525b88=a101_0x558c02;return getConfigFieldSchema(_0x283478)?.[_0x525b88(0x143)];}export function isTopLevelConfigKey(_0x202f21){const _0x4271e6=a101_0x558c02;return TOP_LEVEL_CONFIG_KEYS[_0x4271e6(0x145)](_0x202f21);}export function isCliProtectedConfigKey(_0x2b1b5d){const _0x58c8ab=a101_0x558c02;return CLI_PROTECTED_CONFIG_KEYS[_0x58c8ab(0x145)](_0x2b1b5d);}const LOCALE_MAP={'zh':a101_0x558c02(0x14b),'zh-cn':a101_0x558c02(0x14b),'zh_cn':a101_0x558c02(0x14b),'en':'en-US','en-us':'en-US','en_us':a101_0x558c02(0x13b)};export function normalizeLocale(_0x134d4c){const _0x2d121d=a101_0x558c02;if(!_0x134d4c)return null;return LOCALE_MAP[_0x134d4c[_0x2d121d(0x14d)]()]??null;}export function isLegacyCompatConfigKey(_0x2fc1aa){const _0xd2f050=a101_0x558c02;return getConfigFieldSchema(_0x2fc1aa)?.[_0xd2f050(0x13e)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x3a3499){const _0x357309=a101_0x558c02;return[..._0x3a3499][_0x357309(0x159)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x20b923=a101_0x558c02;return _0x20b923(0x15a)+getTopLevelConfigKeySummary()+_0x20b923(0x142);}export function buildAppProfileListFields(_0x3ee629){return{'env':_0x3ee629,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x6867ec=a102_0x16dd;(function(_0x53f9e3,_0x1c71ce){const _0x412f90=a102_0x16dd,_0x4fb76c=_0x53f9e3();while(!![]){try{const _0x1b8666=parseInt(_0x412f90(0x18b))/0x1*(parseInt(_0x412f90(0x18d))/0x2)+parseInt(_0x412f90(0x188))/0x3*(parseInt(_0x412f90(0x182))/0x4)+-parseInt(_0x412f90(0x189))/0x5+parseInt(_0x412f90(0x187))/0x6*(-parseInt(_0x412f90(0x18a))/0x7)+-parseInt(_0x412f90(0x180))/0x8*(-parseInt(_0x412f90(0x18c))/0x9)+parseInt(_0x412f90(0x186))/0xa*(-parseInt(_0x412f90(0x184))/0xb)+parseInt(_0x412f90(0x18e))/0xc;if(_0x1b8666===_0x1c71ce)break;else _0x4fb76c['push'](_0x4fb76c['shift']());}catch(_0x292368){_0x4fb76c['push'](_0x4fb76c['shift']());}}}(a102_0x40cf,0xbb2e4));function a102_0x16dd(_0x5468f4,_0x1e3cbe){_0x5468f4=_0x5468f4-0x180;const _0x40cfc1=a102_0x40cf();let _0x16dd68=_0x40cfc1[_0x5468f4];return _0x16dd68;}export const APP_PUBLISH_STATUS={'Published':a102_0x6867ec(0x181),'Unpublished':a102_0x6867ec(0x185)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a102_0x6867ec(0x183)];function a102_0x40cf(){const _0x54458b=['56147KZrfJC','314721aguMGG','14wFFanH','24046356CAZuWQ','56mItPzI','PUBLISHED','28NKhasP','Published','3538865mSRgCJ','UNPUBLISH','40QeJkxg','44706ggAMDU','264741nIpLGp','3086115otmFao','553JrILJy'];a102_0x40cf=function(){return _0x54458b;};return a102_0x40cf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x3ccb1a=a103_0x2c31;(function(_0x25d359,_0x31aa2e){const _0x10eaf2=a103_0x2c31,_0x54009b=_0x25d359();while(!![]){try{const _0x41b260=-parseInt(_0x10eaf2(0x18c))/0x1+parseInt(_0x10eaf2(0x184))/0x2*(-parseInt(_0x10eaf2(0x18b))/0x3)+-parseInt(_0x10eaf2(0x187))/0x4*(-parseInt(_0x10eaf2(0x18a))/0x5)+parseInt(_0x10eaf2(0x182))/0x6*(parseInt(_0x10eaf2(0x188))/0x7)+-parseInt(_0x10eaf2(0x181))/0x8*(parseInt(_0x10eaf2(0x18d))/0x9)+-parseInt(_0x10eaf2(0x18e))/0xa*(-parseInt(_0x10eaf2(0x186))/0xb)+parseInt(_0x10eaf2(0x189))/0xc*(parseInt(_0x10eaf2(0x18f))/0xd);if(_0x41b260===_0x31aa2e)break;else _0x54009b['push'](_0x54009b['shift']());}catch(_0x23158d){_0x54009b['push'](_0x54009b['shift']());}}}(a103_0x38e1,0x1cf49));export const AUTH_MODE={'ClientAk':a103_0x3ccb1a(0x183)};function a103_0x2c31(_0x2f0631,_0x334503){_0x2f0631=_0x2f0631-0x181;const _0x38e17d=a103_0x38e1();let _0x2c312b=_0x38e17d[_0x2f0631];return _0x2c312b;}export function isAuthMode(_0x4f2c57){const _0x12e21b=a103_0x3ccb1a;return _0x4f2c57===AUTH_MODE[_0x12e21b(0x185)];}function a103_0x38e1(){const _0x2c7915=['client-ak','48WcJbLl','ClientAk','704858OWesSA','8BHVCoI','27398zFzWZA','132udnaik','535155JNYYAR','2784vqGsMG','236293dGWisn','27KhbfWv','30NNzLgm','12038RQLEYs','553648bjyejw','258moBVSe'];a103_0x38e1=function(){return _0x2c7915;};return a103_0x38e1();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a104_0x59f0e4=a104_0x1e87;function a104_0x1e87(_0x312902,_0x18e8df){_0x312902=_0x312902-0x1ba;const _0x23b7d2=a104_0x23b7();let _0x1e875a=_0x23b7d2[_0x312902];return _0x1e875a;}(function(_0x312098,_0x10b72f){const _0x48cbd3=a104_0x1e87,_0x183264=_0x312098();while(!![]){try{const _0x7875ff=-parseInt(_0x48cbd3(0x1cb))/0x1*(-parseInt(_0x48cbd3(0x1ce))/0x2)+parseInt(_0x48cbd3(0x1bc))/0x3+parseInt(_0x48cbd3(0x1c4))/0x4+parseInt(_0x48cbd3(0x1c6))/0x5*(parseInt(_0x48cbd3(0x1e8))/0x6)+-parseInt(_0x48cbd3(0x1e5))/0x7*(-parseInt(_0x48cbd3(0x1d6))/0x8)+-parseInt(_0x48cbd3(0x1da))/0x9*(parseInt(_0x48cbd3(0x1d9))/0xa)+-parseInt(_0x48cbd3(0x1d7))/0xb;if(_0x7875ff===_0x10b72f)break;else _0x183264['push'](_0x183264['shift']());}catch(_0x359a8){_0x183264['push'](_0x183264['shift']());}}}(a104_0x23b7,0xa1fe0));import{PRODUCT_CONFIG}from'../constant/product.js';function a104_0x23b7(){const _0x4945f5=['4544632yGiwbI','map','5DiOoox','fromEntries','<code>','env','Preview\x20operation\x20without\x20executing','1mjjPkV','sqlcode','clear','770406MsDmVU','type','non-interactive','json\x20|\x20pretty\x20|\x20compress','cliDisplayName','Show\x20help','nonInteractive','app','8YprlxN','27101382tzNFGL','string','70GTNVQW','160713PEBhJf','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','<name>','Force\x20non-interactive\x20mode\x20(CI)','JSON\x20params\x20for\x20execute\x20commands','format','Name\x20filter','help','Clear\x20output','dry-run','params','441518VzqDxg','Override\x20appcode','name','5614386bvnkKG','Record\x20ID','SQL\x20query\x20code','Output\x20format','2196345OPeDeX','cliBinName','appcode','boolean','yes','Use\x20global\x20config\x20scope','verbose','global'];a104_0x23b7=function(){return _0x4945f5;};return a104_0x23b7();}import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a104_0x59f0e4(0x1bd)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a104_0x59f0e4(0x1d2)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a104_0x59f0e4(0x1be),'meowKey':a104_0x59f0e4(0x1be),'type':a104_0x59f0e4(0x1d8),'description':a104_0x59f0e4(0x1e6),'hint':a104_0x59f0e4(0x1c8)},{'name':a104_0x59f0e4(0x1d5),'meowKey':a104_0x59f0e4(0x1d5),'type':a104_0x59f0e4(0x1d8),'description':'Select\x20app\x20profile\x20by\x20name','hint':a104_0x59f0e4(0x1dc)},{'name':'env','meowKey':a104_0x59f0e4(0x1c9),'type':'string','description':'Environment','hint':'production\x20|\x20development\x20|\x20daily'},{'name':a104_0x59f0e4(0x1df),'meowKey':'format','type':a104_0x59f0e4(0x1d8),'description':a104_0x59f0e4(0x1bb),'hint':a104_0x59f0e4(0x1d1)},{'name':'jq','meowKey':'jq','type':a104_0x59f0e4(0x1d8),'description':a104_0x59f0e4(0x1db),'hint':'<expr>'},{'name':a104_0x59f0e4(0x1e3),'meowKey':'dryRun','type':a104_0x59f0e4(0x1bf),'description':a104_0x59f0e4(0x1ca)},{'name':a104_0x59f0e4(0x1c0),'meowKey':a104_0x59f0e4(0x1c0),'type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a104_0x59f0e4(0x1d0),'meowKey':a104_0x59f0e4(0x1d4),'type':'boolean','description':a104_0x59f0e4(0x1dd)},{'name':a104_0x59f0e4(0x1c3),'meowKey':'global','type':'boolean','description':a104_0x59f0e4(0x1c1)},{'name':'ci','meowKey':'ci','type':a104_0x59f0e4(0x1bf),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':a104_0x59f0e4(0x1e1),'type':a104_0x59f0e4(0x1bf),'description':a104_0x59f0e4(0x1d3)},{'name':'id','meowKey':'id','type':a104_0x59f0e4(0x1d8),'description':a104_0x59f0e4(0x1e9),'hidden':!![]},{'name':a104_0x59f0e4(0x1e7),'meowKey':a104_0x59f0e4(0x1e7),'type':a104_0x59f0e4(0x1d8),'description':a104_0x59f0e4(0x1e0),'hidden':!![]},{'name':'sqlcode','meowKey':a104_0x59f0e4(0x1cc),'type':a104_0x59f0e4(0x1d8),'description':a104_0x59f0e4(0x1ba),'hidden':!![]},{'name':'params','meowKey':a104_0x59f0e4(0x1e4),'type':a104_0x59f0e4(0x1d8),'description':a104_0x59f0e4(0x1de),'hidden':!![]},{'name':a104_0x59f0e4(0x1c2),'meowKey':a104_0x59f0e4(0x1c2),'type':a104_0x59f0e4(0x1bf),'description':'Verbose\x20output','hidden':!![]},{'name':a104_0x59f0e4(0x1cd),'meowKey':a104_0x59f0e4(0x1cd),'type':a104_0x59f0e4(0x1bf),'description':a104_0x59f0e4(0x1e2),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a104_0x59f0e4(0x1be),a104_0x59f0e4(0x1d5),a104_0x59f0e4(0x1c9),'format','jq',a104_0x59f0e4(0x1e3),a104_0x59f0e4(0x1c0),'non-interactive','ci']);export function buildMeowFlags(){const _0x126e05=a104_0x59f0e4;return Object[_0x126e05(0x1c7)](GLOBAL_FLAGS[_0x126e05(0x1c5)](_0x23a904=>[_0x23a904['meowKey'],{'type':_0x23a904[_0x126e05(0x1cf)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x4ba1e3=a105_0x1ad2;function a105_0x1a6b(){const _0x5b6961=['compress','136916andfog','427326pDtYBH','2363368XLNhPX','824937nUNyRG','2439bvNKHw','924995NEuZhA','write','main','154yEkESI','en-US','1612394ZAZWjf'];a105_0x1a6b=function(){return _0x5b6961;};return a105_0x1a6b();}(function(_0x508455,_0x4fcbe3){const _0x2bf3c8=a105_0x1ad2,_0x2d10e3=_0x508455();while(!![]){try{const _0x419ef7=parseInt(_0x2bf3c8(0x140))/0x1*(parseInt(_0x2bf3c8(0x144))/0x2)+-parseInt(_0x2bf3c8(0x13f))/0x3+parseInt(_0x2bf3c8(0x148))/0x4+parseInt(_0x2bf3c8(0x141))/0x5+parseInt(_0x2bf3c8(0x149))/0x6+parseInt(_0x2bf3c8(0x146))/0x7+-parseInt(_0x2bf3c8(0x13e))/0x8;if(_0x419ef7===_0x4fcbe3)break;else _0x2d10e3['push'](_0x2d10e3['shift']());}catch(_0x44dee1){_0x2d10e3['push'](_0x2d10e3['shift']());}}}(a105_0x1a6b,0x21bd2));function a105_0x1ad2(_0x3936a7,_0x2d8bb4){_0x3936a7=_0x3936a7-0x13e;const _0x1a6b2f=a105_0x1a6b();let _0x1ad27a=_0x1a6b2f[_0x3936a7];return _0x1ad27a;}export const DEFAULT_APP_PROFILE_NAME=a105_0x4ba1e3(0x143);export const DEFAULT_CONFIG_VALUES={'env':'production','format':a105_0x4ba1e3(0x147),'locale':a105_0x4ba1e3(0x145),'riskLevel':a105_0x4ba1e3(0x142)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x4dd8e4=a106_0x2572;(function(_0x16e3f8,_0x2c94a9){const _0x41e59f=a106_0x2572,_0x39383d=_0x16e3f8();while(!![]){try{const _0x341089=-parseInt(_0x41e59f(0x182))/0x1+parseInt(_0x41e59f(0x184))/0x2+-parseInt(_0x41e59f(0x180))/0x3+parseInt(_0x41e59f(0x17d))/0x4+parseInt(_0x41e59f(0x187))/0x5+parseInt(_0x41e59f(0x186))/0x6*(parseInt(_0x41e59f(0x183))/0x7)+-parseInt(_0x41e59f(0x17e))/0x8*(-parseInt(_0x41e59f(0x17f))/0x9);if(_0x341089===_0x2c94a9)break;else _0x39383d['push'](_0x39383d['shift']());}catch(_0x5d6d78){_0x39383d['push'](_0x39383d['shift']());}}}(a106_0x5f15,0x6a99b));function a106_0x2572(_0x3cae40,_0x379328){_0x3cae40=_0x3cae40-0x17c;const _0x5f156d=a106_0x5f15();let _0x25726c=_0x5f156d[_0x3cae40];return _0x25726c;}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a106_0x4dd8e4(0x181)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a106_0x4dd8e4(0x17c)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a106_0x4dd8e4(0x185)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG['cliCdnBaseUrl'];function a106_0x5f15(){const _0x520d2d=['npmRegistryBaseUrl','78SjZRvW','2381480hHMquP','skillSource','3265680JYTRxM','8OjdsUB','177426IodLja','2110614OMiimX','npmPackageName','857125NKlEEQ','23786vwRlqv','1281388izZqZA'];a106_0x5f15=function(){return _0x520d2d;};return a106_0x5f15();}export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+'/dist/lovrabet-cli/config/index.json';
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a107_0x20ef(_0x1e1e32,_0x22d636){_0x1e1e32=_0x1e1e32-0xe7;const _0x4fe9cf=a107_0x4fe9();let _0x20ef44=_0x4fe9cf[_0x1e1e32];return _0x20ef44;}const a107_0x3707bd=a107_0x20ef;function a107_0x4fe9(){const _0x6e5941=['harnessDomain','api','457701uqobRa','1081920wwpjay','1687656uAHqCR','1000554fsXSPj','9aoswqp','6928030XwkdlA','validation','daily','kbService','apiDomain','3igtkAu','production','runtimeDomain','skillDomain','region','Harness\x20is\x20not\x20configured.','64118NhjLvq','1039435uVmYrD','harness','4ARhoUB','skill','runtime'];a107_0x4fe9=function(){return _0x6e5941;};return a107_0x4fe9();}(function(_0x23fdc6,_0x2daca6){const _0x17697e=a107_0x20ef,_0x8d31ff=_0x23fdc6();while(!![]){try{const _0x1d5c14=parseInt(_0x17697e(0xfe))/0x1*(-parseInt(_0x17697e(0xec))/0x2)+-parseInt(_0x17697e(0xf4))/0x3*(parseInt(_0x17697e(0xef))/0x4)+-parseInt(_0x17697e(0xed))/0x5+-parseInt(_0x17697e(0xf7))/0x6+-parseInt(_0x17697e(0xf5))/0x7+-parseInt(_0x17697e(0xf6))/0x8*(-parseInt(_0x17697e(0xf8))/0x9)+parseInt(_0x17697e(0xf9))/0xa;if(_0x1d5c14===_0x2daca6)break;else _0x8d31ff['push'](_0x8d31ff['shift']());}catch(_0x269007){_0x8d31ff['push'](_0x8d31ff['shift']());}}}(a107_0x4fe9,0x1eb72));import{CliErrors}from'../errors.js';import{getEnv,isProduction}from'../constant/env.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbServiceDomain,customHarnessDomain,activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x7c957d){const _0x50e8a1=a107_0x20ef;customApiDomain=_0x7c957d?.[_0x50e8a1(0xfd)],customUserDomain=_0x7c957d?.['userDomain'],customRuntimeDomain=_0x7c957d?.[_0x50e8a1(0xe8)],customSkillDomain=_0x7c957d?.[_0x50e8a1(0xe9)],customKbServiceDomain=_0x7c957d?.['kbServiceDomain'],customHarnessDomain=_0x7c957d?.[_0x50e8a1(0xf2)],activeRegion=_0x7c957d?.[_0x50e8a1(0xea)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x5a91f6=a107_0x20ef,_0x5eee19=OFFICIAL_ROUTING_PROFILES[activeRegion]['serviceDomains'];return isProduction(getEnv())?_0x5eee19[_0x5a91f6(0xe7)]:_0x5a91f6(0xfb)in _0x5eee19?_0x5eee19['daily']:_0x5eee19[_0x5a91f6(0xe7)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()['user'];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a107_0x3707bd(0xf3)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a107_0x3707bd(0xf1)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a107_0x3707bd(0xf0)];export const getKbServiceDomain=()=>{const _0x470f19=a107_0x3707bd;if(customKbServiceDomain)return customKbServiceDomain;const _0xf65f4d=getActiveRegionDomains();return _0x470f19(0xfc)in _0xf65f4d?_0xf65f4d[_0x470f19(0xfc)]:undefined;};export const getHarnessDomain=()=>{const _0x55fcd7=a107_0x3707bd;if(customHarnessDomain)return customHarnessDomain;const _0x403036=getActiveRegionDomains();return _0x55fcd7(0xee)in _0x403036?_0x403036['harness']:undefined;};export function requireHarnessDomain(){const _0x40fe63=a107_0x3707bd,_0x212bb2=getHarnessDomain();if(!_0x212bb2)throw CliErrors[_0x40fe63(0xfa)](_0x40fe63(0xeb),'Configure\x20a\x20trusted\x20harnessDomain\x20HTTPS\x20origin\x20in\x20the\x20connection\x20settings.');return _0x212bb2;}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a108_0x23e593=a108_0x23e0;(function(_0x125246,_0x50011f){const _0x20caf5=a108_0x23e0,_0xcf87d1=_0x125246();while(!![]){try{const _0x1ef141=-parseInt(_0x20caf5(0x109))/0x1*(-parseInt(_0x20caf5(0x104))/0x2)+parseInt(_0x20caf5(0x10d))/0x3*(parseInt(_0x20caf5(0x10b))/0x4)+-parseInt(_0x20caf5(0x105))/0x5+parseInt(_0x20caf5(0x10a))/0x6*(-parseInt(_0x20caf5(0x116))/0x7)+parseInt(_0x20caf5(0x113))/0x8*(parseInt(_0x20caf5(0x10e))/0x9)+-parseInt(_0x20caf5(0x10f))/0xa+parseInt(_0x20caf5(0x108))/0xb*(-parseInt(_0x20caf5(0x114))/0xc);if(_0x1ef141===_0x50011f)break;else _0xcf87d1['push'](_0xcf87d1['shift']());}catch(_0x5c1159){_0xcf87d1['push'](_0xcf87d1['shift']());}}}(a108_0x188e,0xa1686));import{productEnv}from'../constant/product.js';function a108_0x23e0(_0x102081,_0x5ba16e){_0x102081=_0x102081-0x104;const _0x188e11=a108_0x188e();let _0x23e000=_0x188e11[_0x102081];return _0x23e000;}export const RUNTIME_ENV_VALUES=[a108_0x23e593(0x106),a108_0x23e593(0x107),a108_0x23e593(0x10c)];export function normalizeEnv(_0x3232a9){const _0x1bb336=a108_0x23e593;return _0x3232a9===_0x1bb336(0x115)||_0x3232a9===_0x1bb336(0x112)?_0x1bb336(0x106):_0x3232a9;}export function isProduction(_0x26c038){const _0xe3fb9d=a108_0x23e593;return normalizeEnv(_0x26c038)===_0xe3fb9d(0x106);}export function isDaily(_0x3c4a7e){return normalizeEnv(_0x3c4a7e)==='daily';}export function isDev(_0x11a5e1){const _0x43c6a6=a108_0x23e593,_0x40d83e=normalizeEnv(_0x11a5e1);return _0x40d83e===_0x43c6a6(0x107)||_0x40d83e===_0x43c6a6(0x110);}function a108_0x188e(){const _0x35674b=['online','1218OmJbNK','2PTyato','2388235SArPGS','production','development','6905492YBhcuC','838723ljromR','8538egzOjh','44cMzfqn','daily','96537qhfkUG','9aMxbyA','2800470iwiSQC','dev','ENV','prod','8812016IJGgUG','12OfBQpa'];a108_0x188e=function(){return _0x35674b;};return a108_0x188e();}let env=normalizeEnv(productEnv(a108_0x23e593(0x111))||'production');export function getEnv(){return env;}export function initEnv(_0x28ce1b){env=normalizeEnv(_0x28ce1b);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a109_0x55ab(_0x525e53,_0x558591){_0x525e53=_0x525e53-0xf8;const _0x29d87b=a109_0x29d8();let _0x55abaa=_0x29d87b[_0x525e53];return _0x55abaa;}const a109_0x484ab4=a109_0x55ab;(function(_0x465743,_0x2ee994){const _0x4b47e9=a109_0x55ab,_0x5cc3d1=_0x465743();while(!![]){try{const _0x4f3307=-parseInt(_0x4b47e9(0xf9))/0x1*(parseInt(_0x4b47e9(0xfa))/0x2)+parseInt(_0x4b47e9(0x103))/0x3*(-parseInt(_0x4b47e9(0x100))/0x4)+parseInt(_0x4b47e9(0xfc))/0x5*(-parseInt(_0x4b47e9(0x102))/0x6)+parseInt(_0x4b47e9(0xfd))/0x7+parseInt(_0x4b47e9(0x101))/0x8+parseInt(_0x4b47e9(0xfb))/0x9+parseInt(_0x4b47e9(0xfe))/0xa;if(_0x4f3307===_0x2ee994)break;else _0x5cc3d1['push'](_0x5cc3d1['shift']());}catch(_0x5532b0){_0x5cc3d1['push'](_0x5cc3d1['shift']());}}}(a109_0x29d8,0x20cfa));export const OUTPUT_FORMAT_VALUES=['json',a109_0x484ab4(0xff),a109_0x484ab4(0xf8)];function a109_0x29d8(){const _0x425d0d=['535507OpsAAm','2268610AwkHAJ','pretty','8588mRCQRc','1310864SzfazS','20994ZJXupS','300vjvMcV','compress','1ETWQUW','223564BvWYiH','1454472oWyPcT','240HPrmFd'];a109_0x29d8=function(){return _0x425d0d;};return a109_0x29d8();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a110_0x999a(){const _0x5acee0=['SKIP_NPX_SKILLS','105juOEDG','3732695IyaeJS','LOVRABET','869628zJrbbW','map','706671vdLpRE','260632pDevAi','.lovrabet-runtime.log','359842MEqfAA','https://registry.npmjs.org','.lovrabet.json','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','lovrabet','61564aETDRp','Lovrabet\x20User\x20Center','/user/ak','440256MmXuDE','lovrabet/lovrabet-cli','cli:lovrabet-runtime','21hRociX','legacyEnvPrefixes'];a110_0x999a=function(){return _0x5acee0;};return a110_0x999a();}function a110_0x5bd0(_0x325743,_0x3c355a){_0x325743=_0x325743-0xb5;const _0x999aac=a110_0x999a();let _0x5bd0b9=_0x999aac[_0x325743];return _0x5bd0b9;}const a110_0x3e25d7=a110_0x5bd0;(function(_0x171efc,_0xfdd5b6){const _0x15900d=a110_0x5bd0,_0x18bb2a=_0x171efc();while(!![]){try{const _0x4ec0a9=parseInt(_0x15900d(0xc1))/0x1+-parseInt(_0x15900d(0xc9))/0x2+-parseInt(_0x15900d(0xb9))/0x3*(parseInt(_0x15900d(0xc6))/0x4)+parseInt(_0x15900d(0xba))/0x5+-parseInt(_0x15900d(0xbc))/0x6+parseInt(_0x15900d(0xb6))/0x7*(parseInt(_0x15900d(0xbf))/0x8)+parseInt(_0x15900d(0xbe))/0x9;if(_0x4ec0a9===_0xfdd5b6)break;else _0x18bb2a['push'](_0x18bb2a['shift']());}catch(_0x13a1e8){_0x18bb2a['push'](_0x18bb2a['shift']());}}}(a110_0x999a,0x5c806));export const PRODUCT_CONFIG={'cliBinName':a110_0x3e25d7(0xc5),'cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a110_0x3e25d7(0xca),'internalSkillSource':a110_0x3e25d7(0xc4),'globalSkillName':a110_0x3e25d7(0xc5),'npmRegistryBaseUrl':a110_0x3e25d7(0xc2),'cliCdnBaseUrl':'https://g.lovrabet.com','envPrefix':a110_0x3e25d7(0xbb),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':[a110_0x3e25d7(0xc3)],'newConfigFileName':'.lovrabet.json','homeDirName':'.lovrabet','logFileName':a110_0x3e25d7(0xc0),'invokeSource':a110_0x3e25d7(0xb5),'userCenterDisplayName':a110_0x3e25d7(0xc7),'skipNpxSkillsEnvSuffix':a110_0x3e25d7(0xb8),'accessKeyCreatePath':a110_0x3e25d7(0xc8)};export function productEnvName(_0x3b5ff7){return PRODUCT_CONFIG['envPrefix']+'_'+_0x3b5ff7;}export function productEnvNames(_0x46a550){const _0x45ef02=a110_0x3e25d7;return[productEnvName(_0x46a550),...PRODUCT_CONFIG[_0x45ef02(0xb7)][_0x45ef02(0xbd)](_0x4febc3=>_0x4febc3+'_'+_0x46a550)];}export function productEnv(_0x35a09f){for(const _0x3f8721 of productEnvNames(_0x35a09f)){const _0x90f9f=process.env[_0x3f8721];if(_0x90f9f!==undefined)return _0x90f9f;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x45a04f,_0x42dd88){const _0x5389d1=a111_0xc4d5,_0x4d3956=_0x45a04f();while(!![]){try{const _0x32e35c=parseInt(_0x5389d1(0x130))/0x1+-parseInt(_0x5389d1(0x12d))/0x2*(-parseInt(_0x5389d1(0x12a))/0x3)+parseInt(_0x5389d1(0x131))/0x4+-parseInt(_0x5389d1(0x139))/0x5+-parseInt(_0x5389d1(0x136))/0x6+-parseInt(_0x5389d1(0x132))/0x7*(parseInt(_0x5389d1(0x12b))/0x8)+parseInt(_0x5389d1(0x128))/0x9*(parseInt(_0x5389d1(0x12c))/0xa);if(_0x32e35c===_0x42dd88)break;else _0x4d3956['push'](_0x4d3956['shift']());}catch(_0x21ac84){_0x4d3956['push'](_0x4d3956['shift']());}}}(a111_0x13d3,0x2c637));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 a111_0x13d3(){const _0x41b909=['960040yNrxuX','join','9sFCZZt','includes','1926GAYipW','48tPmbbq','3089990QajGVA','96hBoxaz','Region\x20\x22','.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.','351970HhnLju','28752XfLhEy','206983PjeSPc','string','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','validation','886416cgPyKA','\x22\x20is\x20not\x20currently\x20available.','Available\x20regions:\x20'];a111_0x13d3=function(){return _0x41b909;};return a111_0x13d3();}export function isLovrabetRegion(_0xfd9891){const _0x4d79f1=a111_0xc4d5;return typeof _0xfd9891==='string'&&LOVRABET_REGION_VALUES[_0x4d79f1(0x129)](_0xfd9891);}function a111_0xc4d5(_0x3b018f,_0x2ff356){_0x3b018f=_0x3b018f-0x127;const _0x13d329=a111_0x13d3();let _0xc4d587=_0x13d329[_0x3b018f];return _0xc4d587;}export function isEnabledLovrabetRegion(_0x30e0f8){const _0x1a4797=a111_0xc4d5;return typeof _0x30e0f8===_0x1a4797(0x133)&&ENABLED_LOVRABET_REGION_VALUES[_0x1a4797(0x129)](_0x30e0f8);}export function normalizeLovrabetRegion(_0x2f6f70){const _0x227e32=a111_0xc4d5;if(_0x2f6f70===undefined||_0x2f6f70===null||_0x2f6f70==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x2f6f70!==_0x227e32(0x133))throw CliErrors[_0x227e32(0x135)](_0x227e32(0x134)+typeof _0x2f6f70+'.','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.');const _0x2e3516=REGION_ALIASES[_0x2f6f70]??_0x2f6f70;if(isEnabledLovrabetRegion(_0x2e3516))return _0x2e3516;throw CliErrors[_0x227e32(0x135)](_0x227e32(0x12e)+_0x2f6f70+_0x227e32(0x137),_0x227e32(0x138)+ENABLED_LOVRABET_REGION_VALUES[_0x227e32(0x127)](',\x20')+_0x227e32(0x12f));}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a112_0x2749(_0x2abd66,_0x36b23d){_0x2abd66=_0x2abd66-0xb2;const _0x569084=a112_0x5690();let _0x2749a9=_0x569084[_0x2abd66];return _0x2749a9;}const a112_0x136743=a112_0x2749;(function(_0x308c0a,_0x1d9f39){const _0xd4a98d=a112_0x2749,_0x91b618=_0x308c0a();while(!![]){try{const _0x3f07de=parseInt(_0xd4a98d(0xbc))/0x1+parseInt(_0xd4a98d(0xb7))/0x2*(parseInt(_0xd4a98d(0xbf))/0x3)+-parseInt(_0xd4a98d(0xb2))/0x4*(parseInt(_0xd4a98d(0xb4))/0x5)+-parseInt(_0xd4a98d(0xb3))/0x6*(-parseInt(_0xd4a98d(0xb6))/0x7)+-parseInt(_0xd4a98d(0xba))/0x8*(parseInt(_0xd4a98d(0xb8))/0x9)+parseInt(_0xd4a98d(0xbe))/0xa+-parseInt(_0xd4a98d(0xbb))/0xb*(parseInt(_0xd4a98d(0xbd))/0xc);if(_0x3f07de===_0x1d9f39)break;else _0x91b618['push'](_0x91b618['shift']());}catch(_0x19edb7){_0x91b618['push'](_0x91b618['shift']());}}}(a112_0x5690,0xec46b));function a112_0x5690(){const _0x578a3b=['12Prikrk','17315120mFtKvc','18GlutyB','read','84gcYdtE','1290AneoHZ','277055pFDhYv','write','57148pjOQVw','404578QadiST','36gpGzjU','high-risk-write','490328DWXQNZ','35167143vgfBOP','873089UYglCR'];a112_0x5690=function(){return _0x578a3b;};return a112_0x5690();}export const RISK_LEVEL_VALUES=[a112_0x136743(0xc0),a112_0x136743(0xb5),a112_0x136743(0xb9)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d5866,_0x2e5413){const _0x442681=a113_0x4347,_0x395aa3=_0x2d5866();while(!![]){try{const _0x91492a=parseInt(_0x442681(0x11a))/0x1+-parseInt(_0x442681(0x110))/0x2*(-parseInt(_0x442681(0x11d))/0x3)+parseInt(_0x442681(0x11b))/0x4+-parseInt(_0x442681(0x11c))/0x5+parseInt(_0x442681(0x111))/0x6+parseInt(_0x442681(0x116))/0x7*(-parseInt(_0x442681(0x117))/0x8)+parseInt(_0x442681(0x114))/0x9*(-parseInt(_0x442681(0x113))/0xa);if(_0x91492a===_0x2e5413)break;else _0x395aa3['push'](_0x395aa3['shift']());}catch(_0x4d2cc9){_0x395aa3['push'](_0x395aa3['shift']());}}}(a113_0x4fa4,0x93b0f));import{PRODUCT_CONFIG}from'../constant/product.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';function a113_0x4347(_0x231fc5,_0x5bc1bf){_0x231fc5=_0x231fc5-0x110;const _0x4fa4c4=a113_0x4fa4();let _0x4347c4=_0x4fa4c4[_0x231fc5];return _0x4347c4;}import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';function a113_0x4fa4(){const _0x50f6d5=['728318OhzGIK','2047904hjpndK','1854070mXOFSn','159xdFaNu','17170myUDzA','4681308DUCwPW','serviceDomains','240230adzJII','558mRrvZz','user','36169zHKFMe','16RGaLUh','accessKeyCreatePath','production'];a113_0x4fa4=function(){return _0x50f6d5;};return a113_0x4fa4();}export function getUserAccessKeyCreateUrl(_0x3d1d6b=DEFAULT_LOVRABET_REGION){const _0x2adc31=a113_0x4347,_0x1305ac=OFFICIAL_ROUTING_PROFILES[_0x3d1d6b][_0x2adc31(0x112)][_0x2adc31(0x119)][_0x2adc31(0x115)];return''+_0x1305ac+PRODUCT_CONFIG[_0x2adc31(0x118)];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a107_0x2477f2=a107_0x3bba;(function(_0xaf4d3a,_0x32212e){const _0x12aff0=a107_0x3bba,_0x5802b0=_0xaf4d3a();while(!![]){try{const _0x44c816=parseInt(_0x12aff0(0x9c))/0x1*(parseInt(_0x12aff0(0x90))/0x2)+parseInt(_0x12aff0(0xc0))/0x3+-parseInt(_0x12aff0(0xb6))/0x4*(-parseInt(_0x12aff0(0xc7))/0x5)+-parseInt(_0x12aff0(0x93))/0x6+parseInt(_0x12aff0(0xc6))/0x7*(parseInt(_0x12aff0(0xb4))/0x8)+-parseInt(_0x12aff0(0x8a))/0x9*(-parseInt(_0x12aff0(0xb2))/0xa)+-parseInt(_0x12aff0(0x95))/0xb;if(_0x44c816===_0x32212e)break;else _0x5802b0['push'](_0x5802b0['shift']());}catch(_0x3dac){_0x5802b0['push'](_0x5802b0['shift']());}}}(a107_0xefb6,0x4f614));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a107_0x3bba(_0x476d7c,_0x4bc80c){_0x476d7c=_0x476d7c-0x7f;const _0xefb625=a107_0xefb6();let _0x3bba24=_0xefb625[_0x476d7c];return _0x3bba24;}import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{redactCommandArgv}from'./utils/redaction.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';function a107_0xefb6(){const _0x457836=['EPERM','EXDEV','app','./constant/env.js','isTTY','values','join','runtimeDomain','8901aUdMAn','configFileNames','stdin','object','nonInteractive','error','1215512jHaeAc','trim','pageSize','881532UmOskQ','online','25528151zUkUdH','write','skillHubDomain','message','accessKey','userDomain','harnessDomain','1sjgsZJ','riskLevel','raw','routing','global','missing','locale','apps','production','skillDomain','parse','utf8','cwd','explicit','defaultApp','kbServiceDomain','projectConfig','setRawMode','string','isRaw','format','globalConfig','5410YpcuML','apiDomain','144RTPmkR','local-alias','4652nhJabS','stdout','.tmp','true','PAGE_SIZE','empty','nativeToolAvailable','platformDomain','host','stringify','1663515vOaOvj','cache','ENV','project','agentDomain','env','250089GDCxVW','1945FdTZjY','find','high-risk-write','appCode','setLogPath','code','slice','appcode','./constant/domain.js','development','setRawCommand'];a107_0xefb6=function(){return _0x457836;};return a107_0xefb6();}import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{normalizeDomainOrigin,resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a107_0x2477f2(0x8b)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x398e84){for(const _0x3067a6 of CONFIG_NAMES){const _0x242e48=resolve(_0x398e84,_0x3067a6);if(existsSync(_0x242e48))return _0x242e48;}return undefined;}export function resolveWriteConfigPath(_0x2f4a29){const _0xeaf3e1=a107_0x2477f2,_0x490e1a=_0x2f4a29===_0xeaf3e1(0xc3)?process[_0xeaf3e1(0xa8)]():homedir(),_0x56a2c1=resolveConfigPath(_0x490e1a);return _0x56a2c1??resolve(_0x490e1a,NEW_CONFIG_NAME);}export function readConfigFile(_0x49006c){const _0x21e0d7=a107_0x2477f2;try{if(existsSync(_0x49006c)){const _0x1509b7=readFileSync(_0x49006c,{'encoding':_0x21e0d7(0xa7)});if(_0x1509b7){const _0x1c25c5=JSON['parse'](_0x1509b7);return migrateOnlineEnv(_0x49006c,_0x1c25c5),_0x1c25c5;}}}catch{}return{};}function migrateOnlineEnv(_0x4617d0,_0x1c930b){const _0x4069d7=a107_0x2477f2;let _0x7a1105=![];_0x1c930b[_0x4069d7(0xc5)]===_0x4069d7(0x94)&&(_0x1c930b[_0x4069d7(0xc5)]=_0x4069d7(0xa4),_0x7a1105=!![]);if(_0x1c930b['apps']&&typeof _0x1c930b[_0x4069d7(0xa3)]===_0x4069d7(0x8d))for(const _0x23c315 of Object[_0x4069d7(0x87)](_0x1c930b[_0x4069d7(0xa3)])){_0x23c315&&_0x23c315['env']==='online'&&(_0x23c315[_0x4069d7(0xc5)]='production',_0x7a1105=!![]);}if(_0x7a1105)try{writeConfigFile(_0x4617d0,_0x1c930b);}catch{}}export function writeConfigFile(_0x25dc6a,_0x34573e){const _0x2d2845=a107_0x2477f2,_0xaa8688=dirname(_0x25dc6a);!existsSync(_0xaa8688)&&mkdirSync(_0xaa8688,{'recursive':!![]});const _0x3ec359=_0x25dc6a+_0x2d2845(0xb8);try{writeFileSync(_0x3ec359,JSON['stringify'](_0x34573e,null,0x2)+'\x0a',{'encoding':_0x2d2845(0xa7),'mode':0x180});try{renameSync(_0x3ec359,_0x25dc6a);}catch(_0x3c7f73){if(_0x3c7f73[_0x2d2845(0xcc)]===_0x2d2845(0x82)||_0x3c7f73['code']===_0x2d2845(0x83)||_0x3c7f73[_0x2d2845(0xcc)]==='EACCES'){writeFileSync(_0x25dc6a,JSON[_0x2d2845(0xbf)](_0x34573e,null,0x2)+'\x0a',{'encoding':_0x2d2845(0xa7)});try{unlinkSync(_0x3ec359);}catch{}}else throw _0x3c7f73;}}catch(_0x46a6a4){try{unlinkSync(_0x3ec359);}catch{}throw _0x46a6a4;}}export function isNonInteractiveMode(_0x294c96){const _0x4a826f=a107_0x2477f2;return!!(_0x294c96[_0x4a826f(0x8e)]||_0x294c96['ci']||productEnvNames('CI')['some'](_0x5ded2b=>process.env[_0x5ded2b]===_0x4a826f(0xb9))||process.env.CI==='true'||!process[_0x4a826f(0xb7)][_0x4a826f(0x86)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xbf8622=a107_0x2477f2;if(!process[_0xbf8622(0x8c)][_0xbf8622(0x86)])return![];try{const _0x58d82e=process[_0xbf8622(0x8c)][_0xbf8622(0xaf)];return process['stdin'][_0xbf8622(0xad)](!![]),process[_0xbf8622(0x8c)][_0xbf8622(0xad)](_0x58d82e??![]),!![];}catch{return![];}}export async function createContext(_0x3d0dad){const _0xcbc421=a107_0x2477f2,_0x3f178a=buildConfigFromFlags(_0x3d0dad);await initGlobalEnvironment(_0x3f178a);const {getUserDomain:_0x154729,getApiDomain:_0xc42829}=await import(_0xcbc421(0x7f)),_0x26b6de={'apiDomain':_0xc42829(),'userDomain':_0x154729()},_0x276600=await buildAuth(_0x3f178a);logger[_0xcbc421(0xcb)](process[_0xcbc421(0xa8)]());const _0x30a00b=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process['argv'][_0xcbc421(0xcd)](0x2))[_0xcbc421(0x88)]('\x20'))[_0xcbc421(0x91)]();logger[_0xcbc421(0x81)](_0x30a00b);const _0x190a03=isNonInteractiveMode(_0x3d0dad);return{'config':_0x3f178a,'auth':_0x276600,'logger':logger,'env':_0x26b6de,'nonInteractive':_0x190a03};}export function buildConfigFromFlags(_0x59c9f7){return buildConfig(loadRawConfigLayers(),_0x59c9f7);}export function getLocalAppAliases(_0x4ccff8){const _0x50366=a107_0x2477f2;return _0x4ccff8[_0x50366(0xa3)]&&typeof _0x4ccff8[_0x50366(0xa3)]===_0x50366(0x8d)?_0x4ccff8[_0x50366(0xa3)]:{};}export function resolveLocalAppAliasCode(_0x2413d2,_0x367b47){const _0x1fb66f=a107_0x2477f2;if(!_0x367b47)return undefined;const _0x428645=getLocalAppAliases(_0x2413d2)[_0x367b47],_0xa85a30=_0x428645?.[_0x1fb66f(0xce)];return typeof _0xa85a30===_0x1fb66f(0xae)&&_0xa85a30[_0x1fb66f(0x91)]()?_0xa85a30['trim']():undefined;}export function readAppCodeFromConfig(){const _0x30091c=a107_0x2477f2;return buildConfigFromFlags({})[_0x30091c(0xca)];}export function readScopedConfig(_0x30fc86){const _0x1c5222=a107_0x2477f2,_0x2a907a=_0x30fc86['global']?_0x1c5222(0xa0):_0x1c5222(0xc3);return readConfigFile(resolveWriteConfigPath(_0x2a907a));}export function writeScopedConfig(_0x32ca88,_0x10695b){const _0x3bbbc0=a107_0x2477f2,_0x1018f2=_0x10695b['global']?'global':_0x3bbbc0(0xc3);writeConfigFile(resolveWriteConfigPath(_0x1018f2),_0x32ca88);}export async function initGlobalEnvironment(_0x5ba5e4){const _0x38e37a=a107_0x2477f2,{initEnv:_0x2459ac}=await import(_0x38e37a(0x85));_0x2459ac(_0x5ba5e4[_0x38e37a(0xc5)]);const {initDomains:_0x5ac3b2}=await import(_0x38e37a(0x7f)),_0x488588=resolveEnterpriseRoutingConfig(_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x9f)]);_0x5ac3b2({'apiDomain':_0x488588?_0x488588[_0x38e37a(0xb3)]:_0x5ba5e4['raw'][_0x38e37a(0xb3)]||_0x5ba5e4['raw'][_0x38e37a(0xbe)]||undefined,'userDomain':_0x488588?_0x488588['userDomain']:_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x9a)]||undefined,'runtimeDomain':_0x488588?_0x488588[_0x38e37a(0x89)]:_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x89)]||undefined,'skillDomain':_0x488588?_0x488588['skillDomain']:_0x5ba5e4['raw'][_0x38e37a(0xa5)]||_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x97)]||_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0xc4)]||_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0xbd)]||undefined,'kbServiceDomain':_0x488588?_0x488588[_0x38e37a(0xab)]:typeof _0x5ba5e4[_0x38e37a(0x9e)]['kbServiceDomain']===_0x38e37a(0xae)&&_0x5ba5e4[_0x38e37a(0x9e)]['kbServiceDomain']['trim']()?_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0xab)]:undefined,'harnessDomain':_0x488588?_0x488588['harnessDomain']:_0x5ba5e4[_0x38e37a(0x9e)]['harnessDomain']===undefined?undefined:normalizeDomainOrigin('harnessDomain',_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x9b)]),'region':normalizeLovrabetRegion(_0x5ba5e4[_0x38e37a(0x9e)]['region'])});}export function getProjectConfigPath(){const _0x4b46e1=a107_0x2477f2;return resolveConfigPath(process[_0x4b46e1(0xa8)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3691f9){const _0x5ddec7=a107_0x2477f2;if(!existsSync(_0x3691f9))return{'status':_0x5ddec7(0xa1)};try{const _0xc975ec=readFileSync(_0x3691f9,{'encoding':_0x5ddec7(0xa7)});if(!_0xc975ec?.[_0x5ddec7(0x91)]())return{'status':_0x5ddec7(0xbb)};const _0x21b123=JSON[_0x5ddec7(0xa6)](_0xc975ec);return{'status':'ok','data':_0x21b123};}catch(_0x2ef2f1){return{'status':_0x5ddec7(0x8f),'message':_0x2ef2f1 instanceof Error?_0x2ef2f1[_0x5ddec7(0x98)]:String(_0x2ef2f1)};}}export function loadRawConfigLayers(_0x197144){const _0x2197aa=a107_0x2477f2;let _0x271aa7={},_0x5f20cb={},_0x28b01b,_0x8cda97;try{_0x28b01b=resolveConfigPath(homedir());if(_0x28b01b){const _0x4823c3=readFileSync(_0x28b01b,{'encoding':_0x2197aa(0xa7)});if(_0x4823c3)_0x271aa7=JSON[_0x2197aa(0xa6)](_0x4823c3);}}catch{}try{const _0x5eec75=_0x197144||process[_0x2197aa(0xa8)]();_0x8cda97=resolveConfigPath(_0x5eec75);if(_0x8cda97){const _0x85ad1e=readFileSync(_0x8cda97,{'encoding':_0x2197aa(0xa7)});if(_0x85ad1e)_0x5f20cb=JSON['parse'](_0x85ad1e);}}catch{}return{'globalPath':_0x28b01b,'projectPath':_0x8cda97,'globalConfig':_0x271aa7,'projectConfig':_0x5f20cb};}function mergeRawConfigLayers(_0x3827bc){const _0x286f42=a107_0x2477f2,{globalConfig:_0xb936b1,projectConfig:_0x1e7a53}=_0x3827bc,_0x57656c={..._0xb936b1,..._0x1e7a53};delete _0x57656c['inherit'];if(_0x286f42(0xaa)in _0x1e7a53)_0x57656c[_0x286f42(0xaa)]=_0x1e7a53[_0x286f42(0xaa)];else _0xb936b1[_0x286f42(0xaa)]&&(_0x57656c[_0x286f42(0xaa)]=_0xb936b1[_0x286f42(0xaa)]);return _0x57656c;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x21a2a5){return mergeRawConfigLayers(loadRawConfigLayers(_0x21a2a5));}export function readRawConfigWithLayers(_0x41c735){const _0xd93784=loadRawConfigLayers(_0x41c735);return{'config':mergeRawConfigLayers(_0xd93784),'layers':_0xd93784};}export function resolveDefaultAppSource(_0x569c4d){const _0x2eafb4=a107_0x2477f2;if('defaultApp'in _0x569c4d[_0x2eafb4(0xac)])return'project';if(_0x569c4d[_0x2eafb4(0xb1)]['defaultApp'])return _0x2eafb4(0xa0);return null;}function buildConfig(_0x57bf03,_0x44a57b){const _0x36242f=a107_0x2477f2,_0x40bab4=mergeRawConfigLayers(_0x57bf03),{projectConfig:_0x3cff0c}=_0x57bf03,_0x42f0cb=_0x40bab4[_0x36242f(0xaa)]||undefined,_0x2b2cfc=typeof _0x44a57b['appcode']===_0x36242f(0xae)?_0x44a57b['appcode']:undefined,_0x5116cd=_0x3cff0c['appcode']||_0x3cff0c[_0x36242f(0x84)],_0xce8da5=!_0x2b2cfc&&!_0x44a57b[_0x36242f(0x84)]&&!_0x5116cd&&!_0x3cff0c[_0x36242f(0xaa)],_0x2767ea=_0xce8da5?env('APPCODE'):undefined,_0x303e14=_0x44a57b[_0x36242f(0x84)]||(_0xce8da5&&!_0x2767ea?env('APP'):undefined),_0x3a8415=_0x303e14||_0x42f0cb||undefined,_0x41427e=_0x303e14||_0x2767ea?undefined:_0x5116cd||(_0x3cff0c['defaultApp']?undefined:_0x40bab4[_0x36242f(0xce)]||_0x40bab4[_0x36242f(0x84)]||undefined),_0x486ad9=_0x303e14||(_0x41427e?undefined:_0x42f0cb),_0x419450=resolveLocalAppAliasCode(_0x40bab4,_0x486ad9),_0x5eae5e=productEnvNames('ACCESS_KEY')[_0x36242f(0xc8)](_0x279560=>process.env[_0x279560]!==undefined),_0x522ee2=_0x5eae5e?process.env[_0x5eae5e]:undefined,_0x57eee4=_0x3cff0c['accessKey']||_0x522ee2||_0x40bab4[_0x36242f(0x99)]||undefined,_0x317471=_0x3cff0c['accessKey']?'project\x20config':_0x522ee2?_0x5eae5e:_0x40bab4['accessKey']?'global\x20config':undefined,_0x2a55f7=_0x44a57b[_0x36242f(0xc5)]||_0x40bab4['env']||env(_0x36242f(0xc2))||DEFAULT_CONFIG_VALUES[_0x36242f(0xc5)],_0x47eb90=normalizeEnv(String(_0x2a55f7)),_0x194653=isDaily(_0x47eb90)?'daily':isDev(_0x47eb90)?_0x36242f(0x80):_0x36242f(0xa4),_0x42aff4=_0x2b2cfc||_0x2767ea||_0x41427e||_0x419450?undefined:resolveCachedAppCode(_0x486ad9,_0x194653,_0x57eee4),_0x139df5=_0x2b2cfc||_0x2767ea||_0x41427e||_0x419450||_0x42aff4||undefined,_0x50190c=_0x2b2cfc?_0x36242f(0xa9):_0x2767ea?_0x36242f(0xc5):_0x41427e?'top-level':_0x419450?_0x36242f(0xb5):_0x42aff4?_0x36242f(0xc1):undefined,_0x57a54b=_0x40bab4['locale']||DEFAULT_CONFIG_VALUES[_0x36242f(0xa2)],_0x2a9377=undefined,_0x23fd05=_0x44a57b[_0x36242f(0xb0)]||env('FORMAT')||_0x40bab4[_0x36242f(0xb0)],_0x15d4cd=normalizeLegacyOutputFormat(_0x23fd05),_0x4bde6b=env(_0x36242f(0xba))||_0x40bab4[_0x36242f(0x92)],_0x5375ff=_0x4bde6b?Number(_0x4bde6b)||undefined:undefined,_0x20cbfe=_0x40bab4[_0x36242f(0x9d)],_0x33567c=_0x20cbfe==='read'||_0x20cbfe===_0x36242f(0x96)||_0x20cbfe===_0x36242f(0xc9)?_0x20cbfe:DEFAULT_CONFIG_VALUES['riskLevel'],_0x9a1dc7=_0x40bab4[_0x36242f(0xbc)]===!![],_0x3997bd=env('VERBOSE'),_0x3215a9=_0x3997bd==='1'||_0x3997bd===_0x36242f(0xb9);return{'appCode':typeof _0x139df5===_0x36242f(0xae)&&_0x139df5[_0x36242f(0x91)]()?_0x139df5[_0x36242f(0x91)]():undefined,'appCodeSource':_0x50190c,'env':_0x194653,'locale':_0x57a54b,'cookie':_0x2a9377,'accessKey':_0x57eee4,'accessKeySource':_0x317471,'format':_0x15d4cd,'pageSize':_0x5375ff,'riskLevel':_0x33567c,'nativeToolAvailable':_0x9a1dc7,'verbose':_0x3215a9,'defaultApp':_0x42f0cb,'currentApp':typeof _0x3a8415===_0x36242f(0xae)?_0x3a8415:undefined,'raw':_0x40bab4};}function env(_0x66492b){return productEnv(_0x66492b);}async function buildAuth(_0x319186){const _0x28c023=a107_0x2477f2,_0x4b3402='',_0x48b31c=!!_0x319186[_0x28c023(0x99)];return{'cookie':_0x4b3402,'isLoggedIn':_0x48b31c,async 'getOrLogin'(){if(_0x48b31c)return _0x4b3402;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a114_0x214e4e=a114_0x10cd;(function(_0x10b867,_0x956ee4){const _0xb3abef=a114_0x10cd,_0x3ffe53=_0x10b867();while(!![]){try{const _0x2e2974=-parseInt(_0xb3abef(0x107))/0x1+parseInt(_0xb3abef(0x14c))/0x2+-parseInt(_0xb3abef(0x10a))/0x3*(-parseInt(_0xb3abef(0x118))/0x4)+-parseInt(_0xb3abef(0x108))/0x5*(parseInt(_0xb3abef(0x128))/0x6)+parseInt(_0xb3abef(0x12c))/0x7+-parseInt(_0xb3abef(0x151))/0x8*(-parseInt(_0xb3abef(0x11f))/0x9)+-parseInt(_0xb3abef(0x143))/0xa;if(_0x2e2974===_0x956ee4)break;else _0x3ffe53['push'](_0x3ffe53['shift']());}catch(_0x2169d1){_0x3ffe53['push'](_0x3ffe53['shift']());}}}(a114_0x5871,0x8ab2a));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{redactCommandArgv}from'./utils/redaction.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';function a114_0x5871(){const _0x3c4cd2=['cwd','EACCES','join','globalConfig','platformDomain','project','cache','true','nativeToolAvailable','high-risk-write','find','harnessDomain','raw','configFileNames','trim','some','project\x20config','host','inherit','10902660cGQCZi','isTTY','online','write','missing','VERBOSE','code','app','accessKey','220172EkOeEw','read','top-level','EPERM','message','107704dyVPZJ','argv','./constant/env.js','local-alias','projectConfig','PAGE_SIZE','./constant/domain.js','436914dLBdif','5VMLqBp','defaultApp','2430567CcafFQ','agentDomain','runtimeDomain','parse','env','locale','stdin','pageSize','appcode','newConfigFileName','APPCODE','development','kbServiceDomain','error','4odgdYh','string','skillDomain','ENV','global','nonInteractive','isRaw','648vQcKPr','utf8','empty','stringify','.tmp','explicit','ACCESS_KEY','stdout','authRequired','3131322YjJCqO','production','object','apps','5092934lpLKSI','format','riskLevel','apiDomain'];a114_0x5871=function(){return _0x3c4cd2;};return a114_0x5871();}import{normalizeLovrabetRegion}from'./constant/region.js';import{normalizeDomainOrigin,resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a114_0x214e4e(0x13d)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a114_0x214e4e(0x113)];function resolveConfigPath(_0x4b926f){for(const _0xbd318b of CONFIG_NAMES){const _0xd17e6=resolve(_0x4b926f,_0xbd318b);if(existsSync(_0xd17e6))return _0xd17e6;}return undefined;}export function resolveWriteConfigPath(_0x110200){const _0x2a5b4c=a114_0x214e4e,_0x1fadfa=_0x110200===_0x2a5b4c(0x135)?process[_0x2a5b4c(0x130)]():homedir(),_0x5b060b=resolveConfigPath(_0x1fadfa);return _0x5b060b??resolve(_0x1fadfa,NEW_CONFIG_NAME);}export function readConfigFile(_0x5b5f28){const _0x54c25b=a114_0x214e4e;try{if(existsSync(_0x5b5f28)){const _0x48bafd=readFileSync(_0x5b5f28,{'encoding':_0x54c25b(0x120)});if(_0x48bafd){const _0x6caec3=JSON[_0x54c25b(0x10d)](_0x48bafd);return migrateOnlineEnv(_0x5b5f28,_0x6caec3),_0x6caec3;}}}catch{}return{};}function a114_0x10cd(_0x2f4231,_0x4f94c8){_0x2f4231=_0x2f4231-0x103;const _0x58717c=a114_0x5871();let _0x10cd19=_0x58717c[_0x2f4231];return _0x10cd19;}function migrateOnlineEnv(_0x344fb1,_0x5dac9e){const _0x10143a=a114_0x214e4e;let _0xf928e6=![];_0x5dac9e[_0x10143a(0x10e)]===_0x10143a(0x145)&&(_0x5dac9e[_0x10143a(0x10e)]=_0x10143a(0x129),_0xf928e6=!![]);if(_0x5dac9e[_0x10143a(0x12b)]&&typeof _0x5dac9e[_0x10143a(0x12b)]===_0x10143a(0x12a))for(const _0x37dbd8 of Object['values'](_0x5dac9e[_0x10143a(0x12b)])){_0x37dbd8&&_0x37dbd8['env']===_0x10143a(0x145)&&(_0x37dbd8[_0x10143a(0x10e)]=_0x10143a(0x129),_0xf928e6=!![]);}if(_0xf928e6)try{writeConfigFile(_0x344fb1,_0x5dac9e);}catch{}}export function writeConfigFile(_0x19ce33,_0x43593e){const _0x4f915e=a114_0x214e4e,_0x46b1eb=dirname(_0x19ce33);!existsSync(_0x46b1eb)&&mkdirSync(_0x46b1eb,{'recursive':!![]});const _0x4866b3=_0x19ce33+_0x4f915e(0x123);try{writeFileSync(_0x4866b3,JSON[_0x4f915e(0x122)](_0x43593e,null,0x2)+'\x0a',{'encoding':_0x4f915e(0x120),'mode':0x180});try{renameSync(_0x4866b3,_0x19ce33);}catch(_0x54fc99){if(_0x54fc99[_0x4f915e(0x149)]===_0x4f915e(0x14f)||_0x54fc99[_0x4f915e(0x149)]==='EXDEV'||_0x54fc99[_0x4f915e(0x149)]===_0x4f915e(0x131)){writeFileSync(_0x19ce33,JSON['stringify'](_0x43593e,null,0x2)+'\x0a',{'encoding':_0x4f915e(0x120)});try{unlinkSync(_0x4866b3);}catch{}}else throw _0x54fc99;}}catch(_0x1c4e6f){try{unlinkSync(_0x4866b3);}catch{}throw _0x1c4e6f;}}export function isNonInteractiveMode(_0xa29abd){const _0x30d5a2=a114_0x214e4e;return!!(_0xa29abd[_0x30d5a2(0x11d)]||_0xa29abd['ci']||productEnvNames('CI')[_0x30d5a2(0x13f)](_0x17643c=>process.env[_0x17643c]===_0x30d5a2(0x137))||process.env.CI===_0x30d5a2(0x137)||!process[_0x30d5a2(0x126)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x198bbe=a114_0x214e4e;if(!process[_0x198bbe(0x110)][_0x198bbe(0x144)])return![];try{const _0xc657e9=process[_0x198bbe(0x110)][_0x198bbe(0x11e)];return process[_0x198bbe(0x110)]['setRawMode'](!![]),process[_0x198bbe(0x110)]['setRawMode'](_0xc657e9??![]),!![];}catch{return![];}}export async function createContext(_0x33aaad){const _0x199651=a114_0x214e4e,_0x576fcb=buildConfigFromFlags(_0x33aaad);await initGlobalEnvironment(_0x576fcb);const {getUserDomain:_0xc19005,getApiDomain:_0x598b56}=await import(_0x199651(0x106)),_0x278508={'apiDomain':_0x598b56(),'userDomain':_0xc19005()},_0x178339=await buildAuth(_0x576fcb);logger['setLogPath'](process[_0x199651(0x130)]());const _0x2b4392=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x199651(0x152)]['slice'](0x2))[_0x199651(0x132)]('\x20'))[_0x199651(0x13e)]();logger['setRawCommand'](_0x2b4392);const _0x56a3c5=isNonInteractiveMode(_0x33aaad);return{'config':_0x576fcb,'auth':_0x178339,'logger':logger,'env':_0x278508,'nonInteractive':_0x56a3c5};}export function buildConfigFromFlags(_0x4e4606){return buildConfig(loadRawConfigLayers(),_0x4e4606);}export function getLocalAppAliases(_0x2fce43){const _0x43cc9c=a114_0x214e4e;return _0x2fce43[_0x43cc9c(0x12b)]&&typeof _0x2fce43[_0x43cc9c(0x12b)]===_0x43cc9c(0x12a)?_0x2fce43[_0x43cc9c(0x12b)]:{};}export function resolveLocalAppAliasCode(_0x556d72,_0x5e33b2){const _0x12d63a=a114_0x214e4e;if(!_0x5e33b2)return undefined;const _0x4962cc=getLocalAppAliases(_0x556d72)[_0x5e33b2],_0xad6d3d=_0x4962cc?.[_0x12d63a(0x112)];return typeof _0xad6d3d===_0x12d63a(0x119)&&_0xad6d3d['trim']()?_0xad6d3d[_0x12d63a(0x13e)]():undefined;}export function readAppCodeFromConfig(){return buildConfigFromFlags({})['appCode'];}export function readScopedConfig(_0xb5d892){const _0x5aaab2=a114_0x214e4e,_0x1c8c06=_0xb5d892[_0x5aaab2(0x11c)]?_0x5aaab2(0x11c):'project';return readConfigFile(resolveWriteConfigPath(_0x1c8c06));}export function writeScopedConfig(_0x14c464,_0x435dbd){const _0x654de9=a114_0x214e4e,_0x360024=_0x435dbd[_0x654de9(0x11c)]?_0x654de9(0x11c):_0x654de9(0x135);writeConfigFile(resolveWriteConfigPath(_0x360024),_0x14c464);}export async function initGlobalEnvironment(_0x54ea7a){const _0x3f3347=a114_0x214e4e,{initEnv:_0x5bd659}=await import(_0x3f3347(0x153));_0x5bd659(_0x54ea7a[_0x3f3347(0x10e)]);const {initDomains:_0x5102b2}=await import(_0x3f3347(0x106)),_0x311f6a=resolveEnterpriseRoutingConfig(_0x54ea7a[_0x3f3347(0x13c)]['routing']);_0x5102b2({'apiDomain':_0x311f6a?_0x311f6a['apiDomain']:_0x54ea7a[_0x3f3347(0x13c)][_0x3f3347(0x12f)]||_0x54ea7a[_0x3f3347(0x13c)][_0x3f3347(0x141)]||undefined,'userDomain':_0x311f6a?_0x311f6a['userDomain']:_0x54ea7a[_0x3f3347(0x13c)]['userDomain']||undefined,'runtimeDomain':_0x311f6a?_0x311f6a[_0x3f3347(0x10c)]:_0x54ea7a['raw'][_0x3f3347(0x10c)]||undefined,'skillDomain':_0x311f6a?_0x311f6a[_0x3f3347(0x11a)]:_0x54ea7a[_0x3f3347(0x13c)][_0x3f3347(0x11a)]||_0x54ea7a[_0x3f3347(0x13c)]['skillHubDomain']||_0x54ea7a[_0x3f3347(0x13c)][_0x3f3347(0x10b)]||_0x54ea7a[_0x3f3347(0x13c)][_0x3f3347(0x134)]||undefined,'kbServiceDomain':_0x311f6a?_0x311f6a['kbServiceDomain']:typeof _0x54ea7a[_0x3f3347(0x13c)][_0x3f3347(0x116)]==='string'&&_0x54ea7a[_0x3f3347(0x13c)][_0x3f3347(0x116)][_0x3f3347(0x13e)]()?_0x54ea7a[_0x3f3347(0x13c)]['kbServiceDomain']:undefined,'harnessDomain':_0x311f6a?_0x311f6a[_0x3f3347(0x13b)]:_0x54ea7a[_0x3f3347(0x13c)][_0x3f3347(0x13b)]===undefined?undefined:normalizeDomainOrigin(_0x3f3347(0x13b),_0x54ea7a[_0x3f3347(0x13c)]['harnessDomain']),'region':normalizeLovrabetRegion(_0x54ea7a[_0x3f3347(0x13c)]['region'])});}export function getProjectConfigPath(){const _0x3c23ee=a114_0x214e4e;return resolveConfigPath(process[_0x3c23ee(0x130)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x54114c){const _0x4a60a9=a114_0x214e4e;if(!existsSync(_0x54114c))return{'status':_0x4a60a9(0x147)};try{const _0x9baf69=readFileSync(_0x54114c,{'encoding':_0x4a60a9(0x120)});if(!_0x9baf69?.[_0x4a60a9(0x13e)]())return{'status':_0x4a60a9(0x121)};const _0x4992ca=JSON['parse'](_0x9baf69);return{'status':'ok','data':_0x4992ca};}catch(_0x5dd213){return{'status':_0x4a60a9(0x117),'message':_0x5dd213 instanceof Error?_0x5dd213[_0x4a60a9(0x150)]:String(_0x5dd213)};}}export function loadRawConfigLayers(_0x248d93){const _0x27b501=a114_0x214e4e;let _0x15d597={},_0x4fbcc1={},_0x630f13,_0x2c9718;try{_0x630f13=resolveConfigPath(homedir());if(_0x630f13){const _0x53d457=readFileSync(_0x630f13,{'encoding':_0x27b501(0x120)});if(_0x53d457)_0x15d597=JSON[_0x27b501(0x10d)](_0x53d457);}}catch{}try{const _0x2b772e=_0x248d93||process[_0x27b501(0x130)]();_0x2c9718=resolveConfigPath(_0x2b772e);if(_0x2c9718){const _0x597530=readFileSync(_0x2c9718,{'encoding':_0x27b501(0x120)});if(_0x597530)_0x4fbcc1=JSON[_0x27b501(0x10d)](_0x597530);}}catch{}return{'globalPath':_0x630f13,'projectPath':_0x2c9718,'globalConfig':_0x15d597,'projectConfig':_0x4fbcc1};}function mergeRawConfigLayers(_0x2b3223){const _0xa12043=a114_0x214e4e,{globalConfig:_0x86d227,projectConfig:_0x291b27}=_0x2b3223,_0xbf28a0={..._0x86d227,..._0x291b27};delete _0xbf28a0[_0xa12043(0x142)];if(_0xa12043(0x109)in _0x291b27)_0xbf28a0[_0xa12043(0x109)]=_0x291b27[_0xa12043(0x109)];else _0x86d227[_0xa12043(0x109)]&&(_0xbf28a0[_0xa12043(0x109)]=_0x86d227[_0xa12043(0x109)]);return _0xbf28a0;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x26eea9){return mergeRawConfigLayers(loadRawConfigLayers(_0x26eea9));}export function readRawConfigWithLayers(_0x44e5c5){const _0x4a6297=loadRawConfigLayers(_0x44e5c5);return{'config':mergeRawConfigLayers(_0x4a6297),'layers':_0x4a6297};}export function resolveDefaultAppSource(_0x6f63d6){const _0x416366=a114_0x214e4e;if(_0x416366(0x109)in _0x6f63d6[_0x416366(0x104)])return _0x416366(0x135);if(_0x6f63d6[_0x416366(0x133)]['defaultApp'])return _0x416366(0x11c);return null;}function buildConfig(_0x307b1c,_0xdb4a7b){const _0x3b5e13=a114_0x214e4e,_0x2afa1c=mergeRawConfigLayers(_0x307b1c),{projectConfig:_0x2170b2}=_0x307b1c,_0x11d469=_0x2afa1c[_0x3b5e13(0x109)]||undefined,_0x372a8c=typeof _0xdb4a7b['appcode']===_0x3b5e13(0x119)?_0xdb4a7b[_0x3b5e13(0x112)]:undefined,_0x2cfefe=_0x2170b2[_0x3b5e13(0x112)]||_0x2170b2[_0x3b5e13(0x14a)],_0x389ec2=!_0x372a8c&&!_0xdb4a7b[_0x3b5e13(0x14a)]&&!_0x2cfefe&&!_0x2170b2[_0x3b5e13(0x109)],_0x31dae8=_0x389ec2?env(_0x3b5e13(0x114)):undefined,_0x543b24=_0xdb4a7b[_0x3b5e13(0x14a)]||(_0x389ec2&&!_0x31dae8?env('APP'):undefined),_0x2ef1b3=_0x543b24||_0x11d469||undefined,_0x52bf2b=_0x543b24||_0x31dae8?undefined:_0x2cfefe||(_0x2170b2[_0x3b5e13(0x109)]?undefined:_0x2afa1c[_0x3b5e13(0x112)]||_0x2afa1c['app']||undefined),_0x17045e=_0x543b24||(_0x52bf2b?undefined:_0x11d469),_0x3e2c41=resolveLocalAppAliasCode(_0x2afa1c,_0x17045e),_0x46200f=productEnvNames(_0x3b5e13(0x125))[_0x3b5e13(0x13a)](_0x585232=>process.env[_0x585232]!==undefined),_0x41bf39=_0x46200f?process.env[_0x46200f]:undefined,_0x2f1b8a=_0x2170b2[_0x3b5e13(0x14b)]||_0x41bf39||_0x2afa1c[_0x3b5e13(0x14b)]||undefined,_0xc2e3e=_0x2170b2['accessKey']?_0x3b5e13(0x140):_0x41bf39?_0x46200f:_0x2afa1c[_0x3b5e13(0x14b)]?'global\x20config':undefined,_0x544c31=_0xdb4a7b[_0x3b5e13(0x10e)]||_0x2afa1c['env']||env(_0x3b5e13(0x11b))||DEFAULT_CONFIG_VALUES[_0x3b5e13(0x10e)],_0x1a6e22=normalizeEnv(String(_0x544c31)),_0x5ac157=isDaily(_0x1a6e22)?'daily':isDev(_0x1a6e22)?_0x3b5e13(0x115):_0x3b5e13(0x129),_0x1ee07f=_0x372a8c||_0x31dae8||_0x52bf2b||_0x3e2c41?undefined:resolveCachedAppCode(_0x17045e,_0x5ac157,_0x2f1b8a),_0x2a470a=_0x372a8c||_0x31dae8||_0x52bf2b||_0x3e2c41||_0x1ee07f||undefined,_0xf7c5f7=_0x372a8c?_0x3b5e13(0x124):_0x31dae8?'env':_0x52bf2b?_0x3b5e13(0x14e):_0x3e2c41?_0x3b5e13(0x103):_0x1ee07f?_0x3b5e13(0x136):undefined,_0x5a4fc8=_0x2afa1c['locale']||DEFAULT_CONFIG_VALUES[_0x3b5e13(0x10f)],_0x3c709a=undefined,_0x94ef4e=_0xdb4a7b[_0x3b5e13(0x12d)]||env('FORMAT')||_0x2afa1c[_0x3b5e13(0x12d)],_0x4afefd=normalizeLegacyOutputFormat(_0x94ef4e),_0x16a164=env(_0x3b5e13(0x105))||_0x2afa1c[_0x3b5e13(0x111)],_0x38ffae=_0x16a164?Number(_0x16a164)||undefined:undefined,_0x1f662f=_0x2afa1c[_0x3b5e13(0x12e)],_0x57581a=_0x1f662f===_0x3b5e13(0x14d)||_0x1f662f===_0x3b5e13(0x146)||_0x1f662f===_0x3b5e13(0x139)?_0x1f662f:DEFAULT_CONFIG_VALUES[_0x3b5e13(0x12e)],_0x594999=_0x2afa1c[_0x3b5e13(0x138)]===!![],_0x38bb58=env(_0x3b5e13(0x148)),_0x2c75e7=_0x38bb58==='1'||_0x38bb58==='true';return{'appCode':typeof _0x2a470a===_0x3b5e13(0x119)&&_0x2a470a[_0x3b5e13(0x13e)]()?_0x2a470a[_0x3b5e13(0x13e)]():undefined,'appCodeSource':_0xf7c5f7,'env':_0x5ac157,'locale':_0x5a4fc8,'cookie':_0x3c709a,'accessKey':_0x2f1b8a,'accessKeySource':_0xc2e3e,'format':_0x4afefd,'pageSize':_0x38ffae,'riskLevel':_0x57581a,'nativeToolAvailable':_0x594999,'verbose':_0x2c75e7,'defaultApp':_0x11d469,'currentApp':typeof _0x2ef1b3==='string'?_0x2ef1b3:undefined,'raw':_0x2afa1c};}function env(_0x314917){return productEnv(_0x314917);}async function buildAuth(_0x50fe5e){const _0x197509=a114_0x214e4e,_0x53b0a9='',_0x1615e9=!!_0x50fe5e[_0x197509(0x14b)];return{'cookie':_0x53b0a9,'isLoggedIn':_0x1615e9,async 'getOrLogin'(){const _0xb496aa=_0x197509;if(_0x1615e9)return _0x53b0a9;throw CliErrors[_0xb496aa(0x127)]();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -327,6 +327,10 @@ export declare function queryRuntimeFileUrl(filePath: string, options?: {
|
|
|
327
327
|
}): Promise<RuntimeFileUrlResponse>;
|
|
328
328
|
export declare function recognizeRuntimeOcr(appCode: string, input: import("@lovrabet/sdk").OcrRecognizeRequest): Promise<RuntimeOcrResponse>;
|
|
329
329
|
export declare function getRuntimeAppConfigByKey(appCode: string, key: string): Promise<string>;
|
|
330
|
+
/** Read a complete metric through the SDK-owned runtime metric endpoint. */
|
|
331
|
+
export declare function getRuntimeMetricDetail(appCode: string, name: string): Promise<unknown>;
|
|
332
|
+
/** Read the complete metric category through the runtime client API. */
|
|
333
|
+
export declare function listRuntimeMetricConfigs(appCode: string, key?: string): Promise<import("@lovrabet/sdk").RuntimeAppConfigEntry[]>;
|
|
330
334
|
export type NotificationChannelType = "EMAIL" | "FEISHU" | "DINGTALK" | "WECOM" | "WEBHOOK";
|
|
331
335
|
/** Lists app-level notification configs without using the development Cookie flow. */
|
|
332
336
|
export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
|