@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.5
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 +75 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +0 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +2 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +2 -0
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.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/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.d.ts +2 -0
- package/lib/commands/project/domain-routing-sync.js +1 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.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/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.d.ts +2 -0
- package/lib/commands/rule/get.js +1 -0
- package/lib/commands/rule/index.d.ts +2 -0
- package/lib/commands/rule/index.js +1 -0
- package/lib/commands/rule/list.d.ts +2 -0
- package/lib/commands/rule/list.js +1 -0
- package/lib/commands/rule/set.d.ts +2 -0
- package/lib/commands/rule/set.js +1 -0
- package/lib/commands/rule/shared.d.ts +43 -0
- package/lib/commands/rule/shared.js +1 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.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/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +37 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +27 -0
- package/lib/config/project-domain-routing.js +1 -0
- package/lib/config/schema.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +10 -4
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.d.ts +4 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +43 -49
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +37 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.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/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +0 -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.d.ts +83 -0
- package/lib/generated/official-routing.js +1 -0
- package/lib/generated/routing-contract.d.ts +9 -0
- package/lib/generated/routing-contract.js +1 -0
- 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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +16 -13
- package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
- package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
- package/skills/rabetbase/references/rabetbase-config.md +4 -4
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -1
- package/skills/rabetbase/references/rabetbase-init.md +32 -8
- package/skills/rabetbase/references/rabetbase-kb.md +7 -8
- package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
- package/skills/rabetbase/references/rabetbase-rule.md +49 -0
- package/skills/rabetbase.manifest.json +5 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
- package/lib/core/kb-search-client.d.ts +0 -30
- package/lib/core/kb-search-client.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a230_0xae69(){const _0xec0cda=['14FBvaqa','311yhAjoj','11462580SzPhYl','22KacPxf','16251QVUNox','lovrabet','cdn','224EavykF','Official\x20routing\x20for\x20region\x20\x22','12417408eovwOw','\x22\x20is\x20not\x20ready:\x20Lovrabet\x20CDN\x20Domain\x20is\x20not\x20configured.','1119573FbDVhC','8236245VNCTde','4552842ChBjYs','libraries','986zEMCpa'];a230_0xae69=function(){return _0xec0cda;};return a230_0xae69();}(function(_0x3633c1,_0x39e105){const _0x16fc2f=a230_0x4065,_0x2d9af0=_0x3633c1();while(!![]){try{const _0x22f1df=parseInt(_0x16fc2f(0x147))/0x1*(-parseInt(_0x16fc2f(0x145))/0x2)+parseInt(_0x16fc2f(0x14a))/0x3*(parseInt(_0x16fc2f(0x13d))/0x4)+parseInt(_0x16fc2f(0x142))/0x5+parseInt(_0x16fc2f(0x143))/0x6*(-parseInt(_0x16fc2f(0x146))/0x7)+-parseInt(_0x16fc2f(0x13f))/0x8+-parseInt(_0x16fc2f(0x141))/0x9+parseInt(_0x16fc2f(0x148))/0xa*(parseInt(_0x16fc2f(0x149))/0xb);if(_0x22f1df===_0x39e105)break;else _0x2d9af0['push'](_0x2d9af0['shift']());}catch(_0xf71b5){_0x2d9af0['push'](_0x2d9af0['shift']());}}}(a230_0xae69,0xdaa77));function a230_0x4065(_0x47d512,_0x200354){_0x47d512=_0x47d512-0x13b;const _0xae698d=a230_0xae69();let _0x406591=_0xae698d[_0x47d512];return _0x406591;}import{OFFICIAL_ROUTING_PROFILES as a230_0x4c7e3b,ROUTING_CATALOG_DIGEST}from'../generated/official-routing.js';export const OFFICIAL_ROUTING_PROFILES=a230_0x4c7e3b;export{ROUTING_CATALOG_DIGEST};export function getOfficialRoutingProfile(_0xca9170){return OFFICIAL_ROUTING_PROFILES[_0xca9170];}export function getOfficialRoutingCdn(_0x579445){const _0x52f925=a230_0x4065,_0x55c005=getOfficialRoutingProfile(_0x579445)[_0x52f925(0x13c)];if(!_0x55c005[_0x52f925(0x13b)])throw new Error(_0x52f925(0x13e)+_0x579445+_0x52f925(0x140));return{'libraries':_0x55c005[_0x52f925(0x144)],'lovrabet':_0x55c005[_0x52f925(0x13b)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x936cad,_0x3d525d){const _0x1e19c7=a231_0x38ef,_0x46684d=_0x936cad();while(!![]){try{const _0x55973e=-parseInt(_0x1e19c7(0x20c))/0x1+parseInt(_0x1e19c7(0x1ed))/0x2+parseInt(_0x1e19c7(0x1f6))/0x3+-parseInt(_0x1e19c7(0x208))/0x4+-parseInt(_0x1e19c7(0x1eb))/0x5*(-parseInt(_0x1e19c7(0x203))/0x6)+-parseInt(_0x1e19c7(0x1f3))/0x7+-parseInt(_0x1e19c7(0x207))/0x8*(-parseInt(_0x1e19c7(0x1ff))/0x9);if(_0x55973e===_0x3d525d)break;else _0x46684d['push'](_0x46684d['shift']());}catch(_0x416f98){_0x46684d['push'](_0x46684d['shift']());}}}(a231_0x5202,0x812dd));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function stringConfigValue(_0x14eee7){const _0x27c9db=a231_0x38ef;return typeof _0x14eee7===_0x27c9db(0x1f5)&&_0x14eee7['trim']()?_0x14eee7[_0x27c9db(0x202)]():undefined;}function appProfiles(_0x468802){const _0x3546f8=a231_0x38ef;return _0x468802[_0x3546f8(0x1ec)]&&typeof _0x468802[_0x3546f8(0x1ec)]==='object'?_0x468802['apps']:{};}function resolveDefaultAppName(_0x5924aa){const _0x21ef3=a231_0x38ef,_0x583b4d=stringConfigValue(_0x5924aa[_0x21ef3(0x1fe)]);if(_0x583b4d)return _0x583b4d;const _0x55f7f2=Object[_0x21ef3(0x1ef)](appProfiles(_0x5924aa));return _0x55f7f2[_0x21ef3(0x20b)]===0x1?_0x55f7f2[0x0]:undefined;}function a231_0x38ef(_0x508210,_0xccbfad){_0x508210=_0x508210-0x1e5;const _0x5202d1=a231_0x5202();let _0x38ef26=_0x5202d1[_0x508210];return _0x38ef26;}function resolveTopLevelAppCode(_0x534ddf){const _0xe09625=a231_0x38ef;return stringConfigValue(_0x534ddf['appcode'])||stringConfigValue(_0x534ddf[_0xe09625(0x201)]);}function a231_0x5202(){const _0x223ef9=['accessKey','ACCESS_KEY','apiDir','RISK_LEVEL','APP','FORMAT','daily','PAGE_SIZE','65iuwduA','apps','852532JtTiNH','read','keys','pageSize','projectConfig','COOKIE','1824375dYDkgT','projectPath','string','196839DWYWGq','object','format','find','cookie','high-risk-write','write','globalConfig','defaultApp','9artanh','VERBOSE','app','trim','448128VsMlKc','env','locale','appcode','4467352aUTAGy','2267360VAoJny','riskLevel','entries','length','664660BpOBCm'];a231_0x5202=function(){return _0x223ef9;};return a231_0x5202();}function normalizeRiskCeiling(_0x17c599){const _0x17974d=a231_0x38ef;if(_0x17c599===undefined||_0x17c599===null)return undefined;if(_0x17c599===_0x17974d(0x1ee)||_0x17c599===_0x17974d(0x1fc)||_0x17c599===_0x17974d(0x1fb))return _0x17c599;return _0x17974d(0x1ee);}function resolveRiskCeiling(..._0x2c0d59){const _0x4e0318=a231_0x38ef;let _0x2be334;for(const _0x39922d of _0x2c0d59){const _0x263d2d=normalizeRiskCeiling(_0x39922d);_0x263d2d&&(!_0x2be334||riskLevelOrder(_0x263d2d)<riskLevelOrder(_0x2be334))&&(_0x2be334=_0x263d2d);}return _0x2be334??DEFAULT_CONFIG_VALUES[_0x4e0318(0x209)];}export function resolveAppConfig({raw:_0x29dd1f,flags:_0x2b71d4,layers:_0xdc1383,readEnv:_0x17cd4d}){const _0x3b1504=a231_0x38ef,_0x9c6b50=_0xdc1383?.['projectConfig']??{},_0xd7f163=_0xdc1383?.['globalConfig']??{},_0x29a235=!!_0xdc1383?.[_0x3b1504(0x1f4)]||Object[_0x3b1504(0x1ef)](_0x9c6b50)[_0x3b1504(0x20b)]>0x0,_0x1ddcf4=!_0x29a235,_0x109e6c=_0x29a235?resolveDefaultAppName(_0x9c6b50):undefined,_0x5063d2=_0x1ddcf4?resolveDefaultAppName(_0xd7f163):undefined,_0x1bb80f=stringConfigValue(_0x2b71d4[_0x3b1504(0x201)]),_0x2208a5=_0x17cd4d(_0x3b1504(0x1e7)),_0x3e104e={};if(_0x29dd1f[_0x3b1504(0x1ec)]&&typeof _0x29dd1f[_0x3b1504(0x1ec)]===_0x3b1504(0x1f7))for(const [_0x16490b,_0x52c730]of Object[_0x3b1504(0x20a)](_0x29dd1f[_0x3b1504(0x1ec)])){_0x52c730&&typeof _0x52c730==='object'&&_0x52c730['appcode']&&(_0x3e104e[_0x16490b]=_0x52c730);}const _0x553524=_0x109e6c||_0x5063d2||resolveDefaultAppName(_0x29dd1f),_0x40a34f=Object['keys'](_0x3e104e)[_0x3b1504(0x20b)]>0x0,_0x9756c1=_0x1bb80f||_0x109e6c||_0x2208a5||_0x5063d2||_0x553524||undefined,_0x24081b=stringConfigValue(_0x2b71d4['appcode']),_0x2f138e=_0x24081b?Object[_0x3b1504(0x20a)](_0x3e104e)[_0x3b1504(0x1f9)](([,_0x36d372])=>_0x36d372?.[_0x3b1504(0x206)]===_0x24081b):undefined,_0x12dac7=_0x2f138e?.[0x0],_0x396b33=_0x2f138e?.[0x1],_0x53da48=_0x24081b?_0x12dac7:_0x9756c1;let _0x5cfab4=_0x53da48&&_0x3e104e[_0x53da48]?_0x3e104e[_0x53da48]:undefined;_0x24081b&&_0x396b33&&(_0x5cfab4=_0x396b33);const _0x5aece3=_0x24081b?_0x396b33??_0x5cfab4:_0x5cfab4,_0x286e74=!_0x1bb80f&&!_0x109e6c&&_0x2208a5&&_0x53da48===_0x2208a5,_0x1377f2=_0x1bb80f||(_0x286e74?_0x2208a5:undefined)||(_0x24081b?_0x12dac7:undefined),_0x27efaa=_0x5aece3?.['appcode'],_0x420cb7=_0x29a235?resolveTopLevelAppCode(_0x9c6b50):undefined,_0x305d11=_0x1ddcf4?resolveTopLevelAppCode(_0xd7f163):undefined,_0x365ece=_0x1bb80f||_0x109e6c?_0x27efaa:undefined,_0x3f586a=!_0x1bb80f&&!_0x109e6c?_0x27efaa:undefined,_0x5560ea=_0x24081b||_0x365ece||_0x420cb7||_0x3f586a||_0x305d11||undefined,_0x33cc6e=_0x29a235?stringConfigValue(_0x9c6b50[_0x3b1504(0x204)]):undefined,_0x1d14c4=_0x1ddcf4?stringConfigValue(_0xd7f163['env']):undefined,_0x1b82b3=_0x2b71d4[_0x3b1504(0x204)]||_0x5aece3?.['env']||_0x33cc6e||_0x17cd4d('ENV')||_0x1d14c4||_0x29dd1f[_0x3b1504(0x204)]||DEFAULT_CONFIG_VALUES[_0x3b1504(0x204)],_0x3cb194=_0x5aece3?.[_0x3b1504(0x205)]||_0x29dd1f[_0x3b1504(0x205)]||DEFAULT_CONFIG_VALUES['locale'],_0x28dd3b=_0x17cd4d(_0x3b1504(0x1f2))||_0x5aece3?.['cookie']||_0x29dd1f[_0x3b1504(0x1fa)]||undefined,_0x570711=_0x17cd4d(_0x3b1504(0x20e))||_0x5aece3?.[_0x3b1504(0x20d)]||_0x29dd1f[_0x3b1504(0x20d)]||undefined,_0x9c2f9f=_0x2b71d4['format']||_0x17cd4d(_0x3b1504(0x1e8))||_0x5aece3?.[_0x3b1504(0x1f8)]||_0x29dd1f[_0x3b1504(0x1f8)],_0x12c0cf=normalizeLegacyOutputFormat(_0x9c2f9f),_0x4a60a8=_0x17cd4d(_0x3b1504(0x1ea))||_0x5aece3?.[_0x3b1504(0x1f0)]||_0x29dd1f[_0x3b1504(0x1f0)],_0x3208b3=_0x4a60a8?Number(_0x4a60a8)||undefined:undefined,_0x5c4bce=_0xdc1383?[_0xdc1383[_0x3b1504(0x1fd)]['riskLevel'],_0xdc1383[_0x3b1504(0x1f1)][_0x3b1504(0x209)]]:[_0x29dd1f[_0x3b1504(0x209)]],_0x447f4d=resolveRiskCeiling(..._0x5c4bce,_0x5aece3?.[_0x3b1504(0x209)]),_0x5a80be=resolveRiskCeiling(_0x447f4d,_0x17cd4d(_0x3b1504(0x1e6))),_0x2b3317=_0x17cd4d(_0x3b1504(0x200)),_0x3125ac=_0x2b3317==='1'||_0x2b3317==='true',_0x403106=_0x5aece3?.[_0x3b1504(0x1e5)]||_0x29dd1f['apiDir']||DEFAULT_CONFIG_VALUES[_0x3b1504(0x1e5)],_0x3dd9f1=isDaily(normalizeEnv(String(_0x1b82b3)))?_0x3b1504(0x1e9):'production';return{'appCode':typeof _0x5560ea==='string'&&_0x5560ea[_0x3b1504(0x202)]()?_0x5560ea[_0x3b1504(0x202)]():undefined,'env':_0x3dd9f1,'locale':_0x3cb194,'cookie':_0x28dd3b,'accessKey':_0x570711,'format':_0x12c0cf,'pageSize':_0x3208b3,'riskLevel':_0x5a80be,'verbose':_0x3125ac,'apiDir':_0x403106,'apps':_0x3e104e,'defaultApp':_0x553524,'currentApp':_0x40a34f?_0x53da48:undefined,'explicitAppName':_0x1377f2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a232_0x5f09(){const _0x17296=['1598507IjPdYP','1037403SRYPMp','3363296sTxYkD','11550344KkpXoF','3383502waReQx','1678lCvAxM','807NxqBbv','3242005AkzwVc','7gQgzTg','170sAzqlt'];a232_0x5f09=function(){return _0x17296;};return a232_0x5f09();}(function(_0x62210c,_0x561977){const _0x5a2efd=a232_0x2794,_0x48e0dc=_0x62210c();while(!![]){try{const _0x202646=-parseInt(_0x5a2efd(0xbf))/0x1+-parseInt(_0x5a2efd(0xc4))/0x2*(parseInt(_0x5a2efd(0xc5))/0x3)+-parseInt(_0x5a2efd(0xc1))/0x4+parseInt(_0x5a2efd(0xc6))/0x5+-parseInt(_0x5a2efd(0xc3))/0x6*(parseInt(_0x5a2efd(0xc7))/0x7)+parseInt(_0x5a2efd(0xc2))/0x8+-parseInt(_0x5a2efd(0xc0))/0x9*(-parseInt(_0x5a2efd(0xbe))/0xa);if(_0x202646===_0x561977)break;else _0x48e0dc['push'](_0x48e0dc['shift']());}catch(_0x4c91b8){_0x48e0dc['push'](_0x48e0dc['shift']());}}}(a232_0x5f09,0xc8e0a));import{getIsSessionValid}from'../auth/is-session-valid.js';function a232_0x2794(_0x1e5276,_0x5e1d9f){_0x1e5276=_0x1e5276-0xbe;const _0x5f0966=a232_0x5f09();let _0x2794cf=_0x5f0966[_0x1e5276];return _0x2794cf;}import{CliErrors}from'../errors.js';export async function buildAuth(_0x19b191){const {getCookie:_0x8cd804}=await import('../auth/get-cookie.js'),_0x5a895c=_0x19b191['cookie']||_0x8cd804(),_0x170d75=_0x5a895c?await getIsSessionValid():![];return{'cookie':_0x5a895c,'isLoggedIn':_0x170d75,async 'getOrLogin'(){if(_0x5a895c&&_0x170d75)return _0x5a895c;throw CliErrors['authRequired']();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a233_0x4cbaa5=a233_0x56c9;(function(_0x5c14f6,_0x29bfe0){const _0x48a726=a233_0x56c9,_0x236e9f=_0x5c14f6();while(!![]){try{const _0x3c54e8=parseInt(_0x48a726(0x1ad))/0x1+parseInt(_0x48a726(0x1cb))/0x2+parseInt(_0x48a726(0x1d1))/0x3*(parseInt(_0x48a726(0x1d0))/0x4)+parseInt(_0x48a726(0x1c6))/0x5*(-parseInt(_0x48a726(0x1c2))/0x6)+-parseInt(_0x48a726(0x1b0))/0x7+parseInt(_0x48a726(0x1d4))/0x8*(-parseInt(_0x48a726(0x1d7))/0x9)+parseInt(_0x48a726(0x1b5))/0xa;if(_0x3c54e8===_0x29bfe0)break;else _0x236e9f['push'](_0x236e9f['shift']());}catch(_0x171577){_0x236e9f['push'](_0x236e9f['shift']());}}}(a233_0x5bb7,0x84a2c));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a233_0x4cbaa5(0x1ca);export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x198571){for(const _0x4dfb0d of CONFIG_NAMES){const _0x30cdfb=resolve(_0x198571,_0x4dfb0d);if(existsSync(_0x30cdfb))return _0x30cdfb;}return undefined;}export function findProjectRootDirectory(_0xa75412=process[a233_0x4cbaa5(0x1b1)]()){let _0x5b7207=resolve(_0xa75412);const {root:_0x48b83e}=parse(_0x5b7207),_0xa2dbd3=homedir();while(!![]){if(resolveConfigPath(_0x5b7207)){if(_0x5b7207===_0xa2dbd3)break;return _0x5b7207;}if(_0x5b7207===_0x48b83e||_0x5b7207===_0xa2dbd3)break;const _0x146963=dirname(_0x5b7207);if(_0x146963===_0x5b7207)break;_0x5b7207=_0x146963;}return resolve(_0xa75412);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x2f472b){const _0x325a77=a233_0x4cbaa5;if(!existsSync(_0x2f472b))return{'status':'missing'};try{const _0x1c71f3=readFileSync(_0x2f472b,{'encoding':_0x325a77(0x1be)});if(!_0x1c71f3?.[_0x325a77(0x1ba)]())return{'status':_0x325a77(0x1dc)};const _0x2265ae=JSON[_0x325a77(0x1d8)](_0x1c71f3);return{'status':'ok','data':_0x2265ae};}catch(_0x2e4549){return{'status':_0x325a77(0x1b2),'message':_0x2e4549 instanceof Error?_0x2e4549[_0x325a77(0x1b6)]:String(_0x2e4549)};}}function parseCliConfigJsonFile(_0x525298,_0x5ec155,_0x19e053){const _0x230bf2=a233_0x4cbaa5,_0x356095=inspectCliConfigJsonFile(_0x525298);if(_0x356095[_0x230bf2(0x1d2)]===_0x230bf2(0x1e3)||_0x356095['status']===_0x230bf2(0x1dc))return{};if(_0x356095[_0x230bf2(0x1d2)]==='ok')return _0x356095[_0x230bf2(0x1cd)];return _0x5ec155===_0x230bf2(0x1c9)&&_0x19e053&&console[_0x230bf2(0x1b2)](CLI_BIN_NAME+':\x20'+_0x19e053+_0x230bf2(0x1e4)+_0x525298+_0x230bf2(0x1ae)+_0x356095[_0x230bf2(0x1b6)]),{};}function normalizeLegacyConfigShape(_0x430fcb){const _0x81d6b2=a233_0x4cbaa5;if(!_0x430fcb||typeof _0x430fcb!==_0x81d6b2(0x1bf))return{'config':{},'migrated':![]};const _0x5539b6={..._0x430fcb},_0x4cb748=_0x5539b6[_0x81d6b2(0x1e1)]&&typeof _0x5539b6[_0x81d6b2(0x1e1)]===_0x81d6b2(0x1bf)?{..._0x5539b6[_0x81d6b2(0x1e1)]}:{},_0x14f7ad=Object[_0x81d6b2(0x1db)](_0x4cb748)['length'],_0x1d8349=_0x5539b6[_0x81d6b2(0x1ce)]||_0x5539b6[_0x81d6b2(0x1c8)];let _0x32341b=![];if(_0x1d8349&&_0x14f7ad===0x0){const _0x1e306f=typeof _0x5539b6[_0x81d6b2(0x1af)]===_0x81d6b2(0x1d5)&&_0x5539b6[_0x81d6b2(0x1af)][_0x81d6b2(0x1ba)]()?_0x5539b6[_0x81d6b2(0x1af)]:String(_0x1d8349)[_0x81d6b2(0x1ba)]();_0x4cb748[_0x1e306f]={'appcode':String(_0x1d8349)['trim'](),..._0x5539b6[_0x81d6b2(0x1b7)]!=null?{'env':_0x5539b6[_0x81d6b2(0x1b7)]}:{},..._0x5539b6[_0x81d6b2(0x1d9)]!=null?{'apiDir':_0x5539b6[_0x81d6b2(0x1d9)]}:{},..._0x5539b6[_0x81d6b2(0x1d3)]!=null?{'cookie':_0x5539b6['cookie']}:{},..._0x5539b6[_0x81d6b2(0x1dd)]!=null?{'accessKey':_0x5539b6[_0x81d6b2(0x1dd)]}:{},..._0x5539b6[_0x81d6b2(0x1de)]!=null?{'format':_0x5539b6[_0x81d6b2(0x1de)]}:{},..._0x5539b6[_0x81d6b2(0x1c0)]!=null?{'pageSize':_0x5539b6[_0x81d6b2(0x1c0)]}:{},..._0x5539b6[_0x81d6b2(0x1bd)]!=null?{'riskLevel':_0x5539b6[_0x81d6b2(0x1bd)]}:{},..._0x5539b6[_0x81d6b2(0x1e0)]!=null?{'locale':_0x5539b6[_0x81d6b2(0x1e0)]}:{}},_0x5539b6[_0x81d6b2(0x1e1)]=_0x4cb748,delete _0x5539b6['defaultApp'],_0x32341b=!![];}return(_0x81d6b2(0x1ce)in _0x5539b6||_0x81d6b2(0x1c8)in _0x5539b6)&&(delete _0x5539b6['appcode'],delete _0x5539b6['app'],_0x32341b=!![]),{'config':_0x5539b6,'migrated':_0x32341b};}function writeNormalizedConfigIfNeeded(_0x510b66,_0x4c8f8d){const _0x14bcc2=a233_0x4cbaa5,_0x194d54=JSON[_0x14bcc2(0x1cf)](_0x4c8f8d,null,0x2)+'\x0a';if(normalizedWriteCache[_0x14bcc2(0x1bc)](_0x510b66)===_0x194d54)return;writeConfigFile(_0x510b66,_0x4c8f8d),normalizedWriteCache[_0x14bcc2(0x1b8)](_0x510b66,_0x194d54);}function parseAndNormalizeConfig(_0x3bcdb0,_0x340f7a,_0x14f516){const _0x2397f1=a233_0x4cbaa5,_0x5be30a=parseCliConfigJsonFile(_0x3bcdb0,_0x340f7a,_0x14f516),_0xec901a=normalizeLegacyConfigShape(_0x5be30a);if(_0xec901a[_0x2397f1(0x1c3)])try{writeNormalizedConfigIfNeeded(_0x3bcdb0,_0xec901a[_0x2397f1(0x1bb)]);}catch{}return _0xec901a[_0x2397f1(0x1bb)];}export function loadRawConfigLayers(_0x5a22d5){const _0x4e4d7c=a233_0x4cbaa5;let _0x1fd194={},_0x45aeb8={};const _0x4dbaad=resolveConfigPath(homedir());_0x4dbaad&&(_0x1fd194=parseAndNormalizeConfig(_0x4dbaad,_0x4e4d7c(0x1c9),_0x4e4d7c(0x1df)));const _0x23d624=_0x5a22d5??findProjectRootDirectory(),_0x552ebd=resolveConfigPath(_0x23d624);return _0x552ebd&&(_0x45aeb8=parseAndNormalizeConfig(_0x552ebd,_0x4e4d7c(0x1c9),_0x4e4d7c(0x1c1))),{'globalPath':_0x4dbaad,'projectPath':_0x552ebd,'globalConfig':_0x1fd194,'projectConfig':_0x45aeb8};}const INHERIT_WHITELIST=['cookie',a233_0x4cbaa5(0x1dd),a233_0x4cbaa5(0x1e0),a233_0x4cbaa5(0x1de),a233_0x4cbaa5(0x1bd),a233_0x4cbaa5(0x1c0),a233_0x4cbaa5(0x1b9),a233_0x4cbaa5(0x1da),'userDomain',a233_0x4cbaa5(0x1c4),a233_0x4cbaa5(0x1c7),'skillDomain',a233_0x4cbaa5(0x1c5),'appDomain',a233_0x4cbaa5(0x1b3),a233_0x4cbaa5(0x1d6)];export function mergeRawConfigLayers(_0xdf9979){const _0x15cb23=a233_0x4cbaa5,{globalConfig:_0x576cb1,projectConfig:_0x8162c6}=_0xdf9979,_0x174ad9=!!_0xdf9979['projectPath']||Object[_0x15cb23(0x1db)](_0x8162c6)['length']>0x0;if(!_0x174ad9)return mergeGlobalOnly(_0x576cb1);return mergeProjectFirst(_0x576cb1,_0x8162c6);}function mergeGlobalOnly(_0xfd312c){const _0x41ca07=a233_0x4cbaa5,_0x1c1da3={..._0xfd312c};delete _0x1c1da3[_0x41ca07(0x1e2)];const _0x2b53f8=_0xfd312c[_0x41ca07(0x1e1)]&&typeof _0xfd312c[_0x41ca07(0x1e1)]==='object'?_0xfd312c[_0x41ca07(0x1e1)]:{};if(Object[_0x41ca07(0x1db)](_0x2b53f8)[_0x41ca07(0x1b4)]>0x0)_0x1c1da3[_0x41ca07(0x1e1)]=_0x2b53f8;if(_0xfd312c['defaultApp'])_0x1c1da3[_0x41ca07(0x1af)]=_0xfd312c['defaultApp'];return _0x1c1da3;}function a233_0x56c9(_0x193b58,_0x357bbc){_0x193b58=_0x193b58-0x1ad;const _0x5bb7eb=a233_0x5bb7();let _0x56c953=_0x5bb7eb[_0x193b58];return _0x56c953;}function mergeProjectFirst(_0x28c53d,_0x5dfcbe){const _0x33acf5=a233_0x4cbaa5,_0x5d1f33={..._0x5dfcbe};delete _0x5d1f33['inherit'];for(const _0x53b97a of INHERIT_WHITELIST){!(_0x53b97a in _0x5d1f33)&&_0x53b97a in _0x28c53d&&(_0x5d1f33[_0x53b97a]=_0x28c53d[_0x53b97a]);}const _0x5969cf=_0x5dfcbe[_0x33acf5(0x1e1)]&&typeof _0x5dfcbe[_0x33acf5(0x1e1)]==='object'?_0x5dfcbe[_0x33acf5(0x1e1)]:{};return Object[_0x33acf5(0x1db)](_0x5969cf)[_0x33acf5(0x1b4)]>0x0?_0x5d1f33[_0x33acf5(0x1e1)]=_0x5969cf:delete _0x5d1f33['apps'],'defaultApp'in _0x5dfcbe?_0x5d1f33[_0x33acf5(0x1af)]=_0x5dfcbe[_0x33acf5(0x1af)]:delete _0x5d1f33['defaultApp'],_0x5d1f33;}export function readRawConfigWithLayers(_0x56529c){const _0x458d00=loadRawConfigLayers(_0x56529c);return{'config':mergeRawConfigLayers(_0x458d00),'layers':_0x458d00};}function a233_0x5bb7(){const _0x295536=['localDomain','length','16434520NabwcU','message','env','set','region','trim','config','get','riskLevel','utf8','object','pageSize','Project','3375222mcTYUI','migrated','apiDomain','kbDomain','5NWQkrF','runtimeDomain','app','warn','.rabetbase.json','1449582Exepea','silent','data','appcode','stringify','1796MnULWB','54SwJkCX','status','cookie','3869144UDjkct','string','certificateDomain','18DNuMYQ','parse','apiDir','routing','keys','empty','accessKey','format','Global','locale','apps','inherit','missing','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','project','441253SoUPUT','\x0a\x20\x20','defaultApp','5211353VUQBzT','cwd','error'];a233_0x5bb7=function(){return _0x295536;};return a233_0x5bb7();}export function readRawConfig(_0x23af36){return mergeRawConfigLayers(loadRawConfigLayers(_0x23af36));}export function readConfigFile(_0x590e33){const _0x577f02=a233_0x4cbaa5;return parseAndNormalizeConfig(_0x590e33,_0x577f02(0x1cc));}export function writeConfigFile(_0x54ad6e,_0x856226){const _0x5e92cf=a233_0x4cbaa5,_0x2a8a68=dirname(_0x54ad6e);!existsSync(_0x2a8a68)&&mkdirSync(_0x2a8a68,{'recursive':!![]});const _0x5d1760=_0x54ad6e+'.tmp';try{writeFileSync(_0x5d1760,JSON[_0x5e92cf(0x1cf)](_0x856226,null,0x2)+'\x0a',{'encoding':_0x5e92cf(0x1be),'mode':0x180}),renameSync(_0x5d1760,_0x54ad6e);}catch(_0xd24edb){try{unlinkSync(_0x5d1760);}catch{}throw _0xd24edb;}}export function resolveWriteConfigPath(_0x2aa32e){const _0x401edc=a233_0x4cbaa5,_0x5e7b9a=_0x2aa32e===_0x401edc(0x1e5)?process[_0x401edc(0x1b1)]():homedir(),_0x3b2e5e=resolveConfigPath(_0x5e7b9a);return _0x3b2e5e??resolve(_0x5e7b9a,NEW_CONFIG_NAME);}
|
package/lib/context.d.ts
CHANGED
|
@@ -70,6 +70,8 @@ export interface CLIContext {
|
|
|
70
70
|
/** 是否为非交互模式 */
|
|
71
71
|
nonInteractive: boolean;
|
|
72
72
|
}
|
|
73
|
+
/** Config and doctor remain usable when connection routing cannot initialize. */
|
|
74
|
+
export declare function isRoutingRecoveryService(service: string): boolean;
|
|
73
75
|
/**
|
|
74
76
|
* 创建 CLI 共享上下文
|
|
75
77
|
*
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a228_0xcc4a36=a228_0x35b7;function a228_0x35b7(_0x50461c,_0x1a4a54){_0x50461c=_0x50461c-0xa7;const _0x617256=a228_0x6172();let _0x35b7e5=_0x617256[_0x50461c];return _0x35b7e5;}(function(_0x54ade5,_0x48be86){const _0x525df2=a228_0x35b7,_0x7dd170=_0x54ade5();while(!![]){try{const _0x81419e=parseInt(_0x525df2(0xaf))/0x1+-parseInt(_0x525df2(0xbe))/0x2+parseInt(_0x525df2(0xcb))/0x3+-parseInt(_0x525df2(0xc2))/0x4+parseInt(_0x525df2(0xbc))/0x5+parseInt(_0x525df2(0xce))/0x6*(-parseInt(_0x525df2(0xc3))/0x7)+parseInt(_0x525df2(0xae))/0x8;if(_0x81419e===_0x48be86)break;else _0x7dd170['push'](_0x7dd170['shift']());}catch(_0x4edf73){_0x7dd170['push'](_0x7dd170['shift']());}}}(a228_0x6172,0x96eea));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x17beaa){return process.env[`RABETBASE_${_0x17beaa}`]||process.env[`LOVRABET_${_0x17beaa}`]||undefined;}function optionalString(_0x677333){const _0x428a12=a228_0x35b7;return typeof _0x677333===_0x428a12(0xb1)&&_0x677333['trim']()?_0x677333['trim']():undefined;}export async function createContext(_0x274054){const _0x29792e=a228_0x35b7,{config:_0x2fa44c,layers:_0x1aa8d8}=readRawConfigWithLayers(),_0x1e3253=buildConfig(_0x2fa44c,_0x274054,_0x1aa8d8);await initGlobalEnvironment(_0x1e3253);const {getUserDomain:_0x17e9f9,getApiDomain:_0x223e31}=await import(_0x29792e(0xaa)),_0x254013={'apiDomain':_0x223e31(),'userDomain':_0x17e9f9()},_0x39e151=await buildAuth(_0x1e3253);logger[_0x29792e(0xd1)](process[_0x29792e(0xcf)]());const _0xebad60=(CLI_BIN_NAME+'\x20'+process[_0x29792e(0xc9)][_0x29792e(0xd0)](0x2)[_0x29792e(0xc0)]('\x20'))[_0x29792e(0xab)]();logger[_0x29792e(0xbb)](_0xebad60);const {isNonInteractive:_0x379ec6}=await import(_0x29792e(0xd9)),_0x59921f=_0x379ec6(_0x274054);return{'config':_0x1e3253,'auth':_0x39e151,'logger':logger,'env':_0x254013,'nonInteractive':_0x59921f};}export function buildConfigFromFlags(_0x2111af){const {config:_0x4dec42,layers:_0x119932}=readRawConfigWithLayers();return buildConfig(_0x4dec42,_0x2111af,_0x119932);}export async function initGlobalEnvironment(_0x1e55cb){const _0x458be2=a228_0x35b7,{initEnv:_0x4440f3}=await import(_0x458be2(0xa9));_0x4440f3(_0x1e55cb['env']);const {initDomains:_0x33632a}=await import(_0x458be2(0xaa));_0x33632a({'region':normalizeLovrabetRegion(_0x1e55cb['raw']?.['region']),'apiDomain':optionalString(_0x1e55cb['raw']?.[_0x458be2(0xda)]),'userDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xa7)]),'runtimeDomain':optionalString(_0x1e55cb['raw']?.[_0x458be2(0xc8)]),'skillDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xca)])||optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xb0)])||optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xb8)])||optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xc1)]),'kbDomain':optionalString(_0x1e55cb['raw']?.[_0x458be2(0xd5)])||optionalString(_0x1e55cb[_0x458be2(0xb7)]?.['agentDomain'])||optionalString(_0x1e55cb['raw']?.[_0x458be2(0xc1)]),'appDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xb6)]),'localDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xdc)]),'certificateDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.['certificateDomain'])});}export function getConfigAppCode(_0x24bf78){const _0x163f3d=a228_0x35b7,_0xafc5c7=readRawConfig(_0x24bf78);if(_0xafc5c7[_0x163f3d(0xbf)]&&typeof _0xafc5c7[_0x163f3d(0xbf)]===_0x163f3d(0xac)){const _0x32d08d=_0xafc5c7['defaultApp'];if(_0x32d08d)return _0xafc5c7[_0x163f3d(0xbf)][_0x32d08d]?.[_0x163f3d(0xd3)]?String(_0xafc5c7[_0x163f3d(0xbf)][_0x32d08d][_0x163f3d(0xd3)])[_0x163f3d(0xab)]():undefined;const _0x1fab99=Object[_0x163f3d(0xd4)](_0xafc5c7[_0x163f3d(0xbf)]);if(_0x1fab99[_0x163f3d(0xc4)]===0x1&&_0x1fab99[0x0]?.[_0x163f3d(0xd3)])return String(_0x1fab99[0x0]['appcode'])['trim']();}const _0x4c6ab7=_0xafc5c7[_0x163f3d(0xd3)]||_0xafc5c7[_0x163f3d(0xc6)];if(typeof _0x4c6ab7!==_0x163f3d(0xb1)||_0x4c6ab7['trim']()==='')return undefined;return _0x4c6ab7[_0x163f3d(0xab)]();}export function getMultiAppConfigs(_0x55c919=a228_0xcc4a36(0xd7),_0x59df8c){const _0x194611=a228_0xcc4a36,_0x5bee9e=loadRawConfigLayers(_0x59df8c);let _0x2b9c39,_0x466263;if(_0x55c919===_0x194611(0xd6)){const _0xc48f0a=_0x5bee9e[_0x194611(0xcd)][_0x194611(0xbf)]&&typeof _0x5bee9e['globalConfig'][_0x194611(0xbf)]==='object'?_0x5bee9e[_0x194611(0xcd)][_0x194611(0xbf)]:{},_0x2ace35=_0x5bee9e['projectConfig']['apps']&&typeof _0x5bee9e[_0x194611(0xc5)][_0x194611(0xbf)]===_0x194611(0xac)?_0x5bee9e[_0x194611(0xc5)][_0x194611(0xbf)]:{};_0x2b9c39={..._0xc48f0a,..._0x2ace35};const _0xd411e6=readRawConfig(_0x59df8c);_0x466263=_0xd411e6[_0x194611(0xb3)];}else _0x2b9c39=_0x5bee9e['projectConfig'][_0x194611(0xbf)],_0x466263=_0x5bee9e[_0x194611(0xc5)][_0x194611(0xb3)];!_0x466263&&_0x2b9c39&&typeof _0x2b9c39===_0x194611(0xac)&&Object[_0x194611(0xb4)](_0x2b9c39)[_0x194611(0xc4)]===0x1&&(_0x466263=Object[_0x194611(0xb4)](_0x2b9c39)[0x0]);if(!_0x2b9c39||typeof _0x2b9c39!==_0x194611(0xac)||Object['keys'](_0x2b9c39)[_0x194611(0xc4)]===0x0)return null;return Object[_0x194611(0xad)](_0x2b9c39)[_0x194611(0xc7)](([_0x116171,_0x4d52e6])=>({'name':_0x116171,'appcode':_0x4d52e6?.['appcode']||'','isDefault':_0x116171===_0x466263,'env':_0x4d52e6?.[_0x194611(0xd2)],'apiDir':_0x4d52e6?.[_0x194611(0xbd)],'cookie':_0x4d52e6?.[_0x194611(0xdb)]||undefined}))[_0x194611(0xa8)](_0x540534=>_0x540534['appcode']);}export function getTemplateBaseUrl(_0x350e5e){const _0x1cc30c=a228_0xcc4a36,_0x1cfb09=readRawConfig(_0x350e5e);if(_0x1cfb09[_0x1cc30c(0xba)]&&typeof _0x1cfb09[_0x1cc30c(0xba)]===_0x1cc30c(0xb1))return _0x1cfb09[_0x1cc30c(0xba)][_0x1cc30c(0xb2)](/\/$/,'');return _0x1cc30c(0xb9);}function a228_0x6172(){const _0x4dae06=['filter','./constant/env.js','./constant/domain.js','trim','object','entries','14076416SCiJTz','393117wHJqUc','skillHubDomain','string','replace','defaultApp','keys','-api.ts','appDomain','raw','agentDomain','https://g.lovrabet.com/dist/lovrabet-skill','template_base_url','setRawCommand','3836590LSnHfl','apiDir','1330160hkqkSB','apps','join','platformDomain','4732256TgxluG','133oXjrEr','length','projectConfig','app','map','runtimeDomain','argv','skillDomain','7182xLUaii','find','globalConfig','144006iONnBQ','cwd','slice','setLogPath','env','appcode','values','kbDomain','merged','project','api.ts','./utils/is-non-interactive.js','apiDomain','cookie','localDomain','userDomain'];a228_0x6172=function(){return _0x4dae06;};return a228_0x6172();}function buildConfig(_0x10957f,_0x14a4f3,_0x174025){return{...resolveAppConfig({'raw':_0x10957f,'flags':_0x14a4f3,'layers':_0x174025,'readEnv':env}),'raw':_0x10957f};}export function resolveApiFilePath(_0x3f626f,_0x1945c8){const _0x4a2c23=a228_0xcc4a36,_0x388999=resolve(process['cwd'](),_0x3f626f),_0x30fd46=resolve(_0x388999,_0x4a2c23(0xd8));if(!_0x1945c8)return _0x30fd46;const _0x4d3484=readRawConfig(),_0xd62fe4=_0x4d3484['apps']&&typeof _0x4d3484[_0x4a2c23(0xbf)]==='object'?_0x4d3484[_0x4a2c23(0xbf)]:{},_0x10e2cf=Object[_0x4a2c23(0xad)](_0xd62fe4)[_0x4a2c23(0xcc)](([,_0xee922a])=>_0xee922a?.[_0x4a2c23(0xd3)]===_0x1945c8);if(!_0x10e2cf)return _0x30fd46;const [_0x4f9b29,_0x52a315]=_0x10e2cf,_0xcfa9d5=typeof _0x4d3484['defaultApp']==='string'?_0x4d3484['defaultApp']:undefined;if(_0x52a315?.[_0x4a2c23(0xbd)])return _0x30fd46;if(_0xcfa9d5&&_0x4f9b29!==_0xcfa9d5)return resolve(_0x388999,_0x4f9b29+_0x4a2c23(0xb5));return _0x30fd46;}
|
|
1
|
+
const a234_0x25ea0e=a234_0x1c23;(function(_0x3245bc,_0x460bf5){const _0x545abd=a234_0x1c23,_0x875b8c=_0x3245bc();while(!![]){try{const _0x162b86=-parseInt(_0x545abd(0xe3))/0x1*(-parseInt(_0x545abd(0x102))/0x2)+-parseInt(_0x545abd(0x10d))/0x3+parseInt(_0x545abd(0xd6))/0x4*(-parseInt(_0x545abd(0xea))/0x5)+-parseInt(_0x545abd(0x10f))/0x6*(-parseInt(_0x545abd(0xec))/0x7)+-parseInt(_0x545abd(0xf1))/0x8+parseInt(_0x545abd(0x100))/0x9*(-parseInt(_0x545abd(0xdb))/0xa)+parseInt(_0x545abd(0xef))/0xb*(parseInt(_0x545abd(0xf6))/0xc);if(_0x162b86===_0x460bf5)break;else _0x875b8c['push'](_0x875b8c['shift']());}catch(_0x5cf94d){_0x875b8c['push'](_0x875b8c['shift']());}}}(a234_0x1810,0x3dac6));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x4dabba){return process.env[`RABETBASE_${_0x4dabba}`]||process.env[`LOVRABET_${_0x4dabba}`]||undefined;}function optionalString(_0x1de59c){const _0x1bc798=a234_0x1c23;return typeof _0x1de59c===_0x1bc798(0xe7)&&_0x1de59c[_0x1bc798(0xe9)]()?_0x1de59c[_0x1bc798(0xe9)]():undefined;}function describeConfiguredRegion(_0x1b4445){const _0x2ee375=a234_0x1c23;return typeof _0x1b4445==='string'?JSON[_0x2ee375(0xf0)](_0x1b4445):_0x2ee375(0x10c)+(_0x1b4445===null?_0x2ee375(0xdf):typeof _0x1b4445);}function resolveConfiguredRegion(_0x1a5f60){const _0xf15a9f=a234_0x1c23;if(isInvalidLovrabetRegion(_0x1a5f60))throw CliErrors['validation'](_0xf15a9f(0xff)+describeConfiguredRegion(_0x1a5f60)+_0xf15a9f(0xe2),_0xf15a9f(0xf2)+CLI_BIN_NAME+_0xf15a9f(0xda));return normalizeLovrabetRegion(_0x1a5f60)??DEFAULT_LOVRABET_REGION;}export function isRoutingRecoveryService(_0x1b88e8){const _0xc9a88e=a234_0x1c23;return _0x1b88e8===_0xc9a88e(0xfe)||_0x1b88e8==='doctor';}export async function createContext(_0x31f0c2){const _0x29aefd=a234_0x1c23,{config:_0x3e3701,layers:_0x3e9303}=readRawConfigWithLayers(),_0x59606f=buildConfig(_0x3e3701,_0x31f0c2,_0x3e9303);await initGlobalEnvironment(_0x59606f);const {getUserDomain:_0x11ae7a,getApiDomain:_0xe9edbe}=await import(_0x29aefd(0xfc)),_0x77c5c3={'apiDomain':_0xe9edbe(),'userDomain':_0x11ae7a()},_0x544c88=await buildAuth(_0x59606f);logger['setLogPath'](process[_0x29aefd(0xf4)]());const _0xd3542a=(CLI_BIN_NAME+'\x20'+process[_0x29aefd(0xdd)]['slice'](0x2)[_0x29aefd(0xfb)]('\x20'))[_0x29aefd(0xe9)]();logger[_0x29aefd(0xd7)](_0xd3542a);const {isNonInteractive:_0x4a385f}=await import('./utils/is-non-interactive.js'),_0x4718b4=_0x4a385f(_0x31f0c2);return{'config':_0x59606f,'auth':_0x544c88,'logger':logger,'env':_0x77c5c3,'nonInteractive':_0x4718b4};}function a234_0x1c23(_0xb7653a,_0x8ac84e){_0xb7653a=_0xb7653a-0xd5;const _0x181008=a234_0x1810();let _0x1c23b4=_0x181008[_0xb7653a];return _0x1c23b4;}export function buildConfigFromFlags(_0x34e272){const {config:_0x307ddd,layers:_0x559d3f}=readRawConfigWithLayers();return buildConfig(_0x307ddd,_0x34e272,_0x559d3f);}export async function initGlobalEnvironment(_0x2f29ad){const _0x237625=a234_0x1c23,_0x5db1c2=resolveConfiguredRegion(_0x2f29ad['raw']?.['region']),_0x3360e4=resolveEnterpriseRoutingManifest(_0x2f29ad[_0x237625(0x110)]?.[_0x237625(0xf5)]),_0x4dccb8={'region':_0x5db1c2,'apiDomain':_0x3360e4?_0x3360e4[_0x237625(0xee)]['apiDomain']:optionalString(_0x2f29ad[_0x237625(0x110)]?.[_0x237625(0xe0)]),'userDomain':_0x3360e4?_0x3360e4['domains'][_0x237625(0x101)]:optionalString(_0x2f29ad[_0x237625(0x110)]?.['userDomain']),'runtimeDomain':_0x3360e4?_0x3360e4['domains'][_0x237625(0xe6)]:optionalString(_0x2f29ad['raw']?.[_0x237625(0xe6)]),'skillDomain':_0x3360e4?_0x3360e4[_0x237625(0xee)]['skillDomain']:optionalString(_0x2f29ad[_0x237625(0x110)]?.['skillDomain'])||optionalString(_0x2f29ad[_0x237625(0x110)]?.[_0x237625(0xed)])||optionalString(_0x2f29ad['raw']?.[_0x237625(0xde)])||optionalString(_0x2f29ad[_0x237625(0x110)]?.['platformDomain']),'kbDomain':_0x3360e4?_0x3360e4['domains']['kbDomain']:optionalString(_0x2f29ad[_0x237625(0x110)]?.['kbDomain'])||optionalString(_0x2f29ad['raw']?.[_0x237625(0xde)])||optionalString(_0x2f29ad[_0x237625(0x110)]?.[_0x237625(0x10a)]),'appDomain':_0x3360e4?_0x3360e4[_0x237625(0xee)][_0x237625(0xf9)]:optionalString(_0x2f29ad[_0x237625(0x110)]?.[_0x237625(0xf9)]),'localDomain':_0x3360e4?_0x3360e4[_0x237625(0xee)][_0x237625(0xfd)]:optionalString(_0x2f29ad[_0x237625(0x110)]?.[_0x237625(0xfd)]),'certificateDomain':_0x3360e4?_0x3360e4[_0x237625(0xee)][_0x237625(0xe5)]:optionalString(_0x2f29ad[_0x237625(0x110)]?.[_0x237625(0xe5)]),'cdn':_0x3360e4?.[_0x237625(0xd9)]},{initEnv:_0x25f2f4}=await import(_0x237625(0xe1)),{initDomains:_0x55a389}=await import(_0x237625(0xfc));_0x25f2f4(_0x2f29ad[_0x237625(0xe4)]),_0x55a389(_0x4dccb8);}export function getConfigAppCode(_0x114441){const _0xb9c44f=a234_0x1c23,_0x2b8690=readRawConfig(_0x114441);if(_0x2b8690[_0xb9c44f(0x105)]&&typeof _0x2b8690[_0xb9c44f(0x105)]===_0xb9c44f(0xdc)){const _0xf06154=_0x2b8690[_0xb9c44f(0x103)];if(_0xf06154)return _0x2b8690[_0xb9c44f(0x105)][_0xf06154]?.['appcode']?String(_0x2b8690['apps'][_0xf06154][_0xb9c44f(0xfa)])[_0xb9c44f(0xe9)]():undefined;const _0x4f927b=Object[_0xb9c44f(0x10e)](_0x2b8690[_0xb9c44f(0x105)]);if(_0x4f927b[_0xb9c44f(0xd5)]===0x1&&_0x4f927b[0x0]?.[_0xb9c44f(0xfa)])return String(_0x4f927b[0x0]['appcode'])[_0xb9c44f(0xe9)]();}const _0x2bc4ee=_0x2b8690[_0xb9c44f(0xfa)]||_0x2b8690[_0xb9c44f(0x10b)];if(typeof _0x2bc4ee!==_0xb9c44f(0xe7)||_0x2bc4ee[_0xb9c44f(0xe9)]()==='')return undefined;return _0x2bc4ee[_0xb9c44f(0xe9)]();}export function getMultiAppConfigs(_0x3bc9ae=a234_0x25ea0e(0x106),_0x3c0e93){const _0x277ee6=a234_0x25ea0e,_0x48d9a8=loadRawConfigLayers(_0x3c0e93);let _0x19efa5,_0x2bf4a3;if(_0x3bc9ae===_0x277ee6(0xd8)){const _0x57637a=_0x48d9a8[_0x277ee6(0xeb)][_0x277ee6(0x105)]&&typeof _0x48d9a8[_0x277ee6(0xeb)][_0x277ee6(0x105)]===_0x277ee6(0xdc)?_0x48d9a8[_0x277ee6(0xeb)][_0x277ee6(0x105)]:{},_0x1b1004=_0x48d9a8[_0x277ee6(0x109)][_0x277ee6(0x105)]&&typeof _0x48d9a8[_0x277ee6(0x109)][_0x277ee6(0x105)]===_0x277ee6(0xdc)?_0x48d9a8['projectConfig'][_0x277ee6(0x105)]:{};_0x19efa5={..._0x57637a,..._0x1b1004};const _0x5a4e0e=readRawConfig(_0x3c0e93);_0x2bf4a3=_0x5a4e0e[_0x277ee6(0x103)];}else _0x19efa5=_0x48d9a8[_0x277ee6(0x109)][_0x277ee6(0x105)],_0x2bf4a3=_0x48d9a8[_0x277ee6(0x109)]['defaultApp'];!_0x2bf4a3&&_0x19efa5&&typeof _0x19efa5==='object'&&Object[_0x277ee6(0x104)](_0x19efa5)[_0x277ee6(0xd5)]===0x1&&(_0x2bf4a3=Object['keys'](_0x19efa5)[0x0]);if(!_0x19efa5||typeof _0x19efa5!==_0x277ee6(0xdc)||Object[_0x277ee6(0x104)](_0x19efa5)[_0x277ee6(0xd5)]===0x0)return null;return Object['entries'](_0x19efa5)['map'](([_0x2d3419,_0x3bb15b])=>({'name':_0x2d3419,'appcode':_0x3bb15b?.['appcode']||'','isDefault':_0x2d3419===_0x2bf4a3,'env':_0x3bb15b?.[_0x277ee6(0xe4)],'apiDir':_0x3bb15b?.[_0x277ee6(0xf3)],'cookie':_0x3bb15b?.[_0x277ee6(0x107)]||undefined}))[_0x277ee6(0x108)](_0x278e00=>_0x278e00[_0x277ee6(0xfa)]);}export function getTemplateBaseUrl(_0x3da204){const _0x1544d5=a234_0x25ea0e,_0x3e1ce3=readRawConfig(_0x3da204);if(_0x3e1ce3[_0x1544d5(0xe8)]&&typeof _0x3e1ce3[_0x1544d5(0xe8)]===_0x1544d5(0xe7))return _0x3e1ce3['template_base_url']['replace'](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}function buildConfig(_0x350c9c,_0x1aa3e7,_0x56092c){return{...resolveAppConfig({'raw':_0x350c9c,'flags':_0x1aa3e7,'layers':_0x56092c,'readEnv':env}),'raw':_0x350c9c};}function a234_0x1810(){const _0x32c2f5=['localDomain','config','Invalid\x20country/region\x20','207WKryoz','userDomain','140cQbscy','defaultApp','keys','apps','project','cookie','filter','projectConfig','platformDomain','app','a\x20value\x20of\x20type\x20','651504KSindg','values','6Fpcfev','raw','find','length','20akfEXD','setRawCommand','merged','cdn','\x20doctor`\x20to\x20locate\x20and\x20repair\x20the\x20invalid\x20configuration\x20before\x20retrying.','67930TAzaef','object','argv','agentDomain','null','apiDomain','./constant/env.js','\x20in\x20Rabetbase\x20configuration.','6012NwNsYP','env','certificateDomain','runtimeDomain','string','template_base_url','trim','414845FchraE','globalConfig','298620tFUGvf','skillHubDomain','domains','1929818eUWCED','stringify','995088zjydGq','Run\x20`','apiDir','cwd','routing','48hsnRMB','api.ts','entries','appDomain','appcode','join','./constant/domain.js'];a234_0x1810=function(){return _0x32c2f5;};return a234_0x1810();}export function resolveApiFilePath(_0x433d79,_0x836c){const _0xaf0f74=a234_0x25ea0e,_0x2d2d9a=resolve(process[_0xaf0f74(0xf4)](),_0x433d79),_0x22939c=resolve(_0x2d2d9a,_0xaf0f74(0xf7));if(!_0x836c)return _0x22939c;const _0x165baf=readRawConfig(),_0x95eb4b=_0x165baf[_0xaf0f74(0x105)]&&typeof _0x165baf[_0xaf0f74(0x105)]==='object'?_0x165baf[_0xaf0f74(0x105)]:{},_0x41c34e=Object[_0xaf0f74(0xf8)](_0x95eb4b)[_0xaf0f74(0x111)](([,_0x379572])=>_0x379572?.[_0xaf0f74(0xfa)]===_0x836c);if(!_0x41c34e)return _0x22939c;const [_0x13a3d6,_0x42fb90]=_0x41c34e,_0x43371c=typeof _0x165baf['defaultApp']==='string'?_0x165baf[_0xaf0f74(0x103)]:undefined;if(_0x42fb90?.[_0xaf0f74(0xf3)])return _0x22939c;if(_0x43371c&&_0x13a3d6!==_0x43371c)return resolve(_0x2d2d9a,_0x13a3d6+'-api.ts');return _0x22939c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51cab8,_0x1ca1a0){const _0x444eeb=a235_0x1e7f,_0x313b2c=_0x51cab8();while(!![]){try{const _0x33ac54=parseInt(_0x444eeb(0x156))/0x1+parseInt(_0x444eeb(0x147))/0x2+-parseInt(_0x444eeb(0x149))/0x3*(-parseInt(_0x444eeb(0x14c))/0x4)+-parseInt(_0x444eeb(0x157))/0x5*(-parseInt(_0x444eeb(0x148))/0x6)+parseInt(_0x444eeb(0x14e))/0x7+parseInt(_0x444eeb(0x158))/0x8+-parseInt(_0x444eeb(0x150))/0x9;if(_0x33ac54===_0x1ca1a0)break;else _0x313b2c['push'](_0x313b2c['shift']());}catch(_0x50faac){_0x313b2c['push'](_0x313b2c['shift']());}}}(a235_0x112f,0x4f5a3));function a235_0x112f(){const _0x343833=['802376suGjZs','utf-8','571655rqzfWe','push','12685365wDxqtN','api.ts','find','exec','get','set','342417ciruUE','90SgWiGg','2081360apnnqT','datasetCode','340288kSEdyF','92778GPWNuz','9NZkbeM','cwd','has'];a235_0x112f=function(){return _0x343833;};return a235_0x112f();}function a235_0x1e7f(_0x2be429,_0xe01bd1){_0x2be429=_0x2be429-0x147;const _0x112f65=a235_0x112f();let _0x1e7f73=_0x112f65[_0x2be429];return _0x1e7f73;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x2546c6){const _0x17b509=a235_0x1e7f,_0x1ea1b2=[],_0x25378f=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x4a30ab;while((_0x4a30ab=_0x25378f[_0x17b509(0x153)](_0x2546c6))!==null){_0x1ea1b2[_0x17b509(0x14f)]({'datasetCode':_0x4a30ab[0x1],'tableName':_0x4a30ab[0x2],'name':_0x4a30ab[0x3],'alias':_0x4a30ab[0x4]});}return _0x1ea1b2;}export function loadAliasMap(_0x44848a,_0x2a6a64,_0x5e67fd){const _0x371638=a235_0x1e7f,_0x18ca54=_0x5e67fd??resolve(process[_0x371638(0x14a)](),_0x44848a,_0x371638(0x151));if(cache[_0x371638(0x14b)](_0x18ca54))return cache[_0x371638(0x154)](_0x18ca54);if(!existsSync(_0x18ca54))return cache[_0x371638(0x155)](_0x18ca54,[]),[];try{const _0xca5829=readFileSync(_0x18ca54,_0x371638(0x14d)),_0x2a48e8=parseApiFile(_0xca5829);return cache[_0x371638(0x155)](_0x18ca54,_0x2a48e8),_0x2a48e8;}catch{return cache['set'](_0x18ca54,[]),[];}}export function resolveAlias(_0x1486f2,_0x51da37,_0x659b6a,_0x365684){const _0x393ad0=a235_0x1e7f;if(!_0x51da37)return undefined;const _0x407ae2=loadAliasMap(_0x1486f2,_0x659b6a,_0x365684),_0x571817=_0x407ae2[_0x393ad0(0x152)](_0x3cc020=>_0x3cc020['alias']===_0x51da37);return _0x571817?.[_0x393ad0(0x159)];}export function listAliases(_0x3b05cb,_0x158feb,_0x5aa1b1){return loadAliasMap(_0x3b05cb,_0x158feb,_0x5aa1b1);}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -88,12 +88,33 @@ export interface KnowledgeBaseRecord {
|
|
|
88
88
|
createTime?: string | number | null;
|
|
89
89
|
updateTime?: string | number | null;
|
|
90
90
|
}
|
|
91
|
+
export type AppRuleType = "rules" | "database";
|
|
92
|
+
export type AppRuleTitle = "RULES" | "DATABASE";
|
|
93
|
+
export interface AppRuleRecord {
|
|
94
|
+
id: number;
|
|
95
|
+
scope: "rules";
|
|
96
|
+
appCode: string;
|
|
97
|
+
title: AppRuleTitle;
|
|
98
|
+
version: number;
|
|
99
|
+
content: string;
|
|
100
|
+
createTime?: string | number | null;
|
|
101
|
+
updateTime?: string | number | null;
|
|
102
|
+
}
|
|
91
103
|
export interface KnowledgeBaseListFilters {
|
|
92
104
|
currentPage?: number;
|
|
93
105
|
pageSize?: number;
|
|
94
106
|
appCode?: string;
|
|
95
107
|
title?: string;
|
|
96
108
|
}
|
|
109
|
+
export declare function getAppRule(cookie: string, input: {
|
|
110
|
+
appCode: string;
|
|
111
|
+
type: AppRuleType;
|
|
112
|
+
}): Promise<AppRuleRecord | null>;
|
|
113
|
+
export declare function saveAppRule(cookie: string, input: {
|
|
114
|
+
appCode: string;
|
|
115
|
+
type: AppRuleType;
|
|
116
|
+
content: string;
|
|
117
|
+
}): Promise<AppRuleRecord>;
|
|
97
118
|
export declare function listEnterpriseKnowledgeBases(cookie: string, filters?: KnowledgeBaseListFilters): Promise<{
|
|
98
119
|
items: KnowledgeBaseRecord[];
|
|
99
120
|
paging?: Paging;
|
|
@@ -110,6 +131,22 @@ export declare function updateEnterpriseKnowledgeBase(cookie: string, input: {
|
|
|
110
131
|
content?: string;
|
|
111
132
|
}): Promise<KnowledgeBaseRecord>;
|
|
112
133
|
export declare function deleteEnterpriseKnowledgeBase(cookie: string, id: number): Promise<void>;
|
|
134
|
+
export type CompanyPublicKnowledgeScope = "COMPANY" | "PUBLIC";
|
|
135
|
+
export interface CompanyPublicKnowledgeSearchHit {
|
|
136
|
+
scope: CompanyPublicKnowledgeScope;
|
|
137
|
+
title: string | null;
|
|
138
|
+
docId: string | null;
|
|
139
|
+
score: number;
|
|
140
|
+
weightedScore: number;
|
|
141
|
+
content: string | null;
|
|
142
|
+
jsonPath: string | null;
|
|
143
|
+
jsonData: string | null;
|
|
144
|
+
}
|
|
145
|
+
export declare function searchCompanyPublicKnowledge(cookie: string, input: {
|
|
146
|
+
query: string;
|
|
147
|
+
appCode: string;
|
|
148
|
+
topK?: number;
|
|
149
|
+
}): Promise<CompanyPublicKnowledgeSearchHit[]>;
|
|
113
150
|
/**
|
|
114
151
|
* 获取研发态数据集模型列表。
|
|
115
152
|
*/
|