@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.6
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 +21 -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/kb-search-client.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.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 +15 -12
- 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 +3 -3
- package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -0
- package/skills/rabetbase/references/rabetbase-init.md +32 -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 +64 -0
- package/skills/rabetbase.manifest.json +6 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function a212_0x4d47(_0x549e6b,_0x247198){_0x549e6b=_0x549e6b-0xf8;const _0x3854ef=a212_0x3854();let _0x4d47c8=_0x3854ef[_0x549e6b];return _0x4d47c8;}const a212_0x34d0df=a212_0x4d47;(function(_0x64ba59,_0x2eb68a){const _0x2b8d28=a212_0x4d47,_0x1a1496=_0x64ba59();while(!![]){try{const _0xf7b6f1=-parseInt(_0x2b8d28(0xfd))/0x1*(-parseInt(_0x2b8d28(0xfc))/0x2)+-parseInt(_0x2b8d28(0x109))/0x3*(-parseInt(_0x2b8d28(0x10b))/0x4)+parseInt(_0x2b8d28(0x129))/0x5+parseInt(_0x2b8d28(0x126))/0x6+-parseInt(_0x2b8d28(0x103))/0x7+-parseInt(_0x2b8d28(0x127))/0x8+parseInt(_0x2b8d28(0x106))/0x9;if(_0xf7b6f1===_0x2eb68a)break;else _0x1a1496['push'](_0x1a1496['shift']());}catch(_0xfd88a1){_0x1a1496['push'](_0x1a1496['shift']());}}}(a212_0x3854,0x567a9));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';export const DOMAIN_CONFIG_FIELDS=[a212_0x34d0df(0x124),'apiDomain','runtimeDomain',a212_0x34d0df(0x114),a212_0x34d0df(0x116),a212_0x34d0df(0x10f),a212_0x34d0df(0x101),a212_0x34d0df(0x111)];const DOMAIN_FLAGS={'userDomain':a212_0x34d0df(0x10c),'apiDomain':a212_0x34d0df(0x110),'runtimeDomain':'runtime-domain','skillDomain':a212_0x34d0df(0x12a),'kbDomain':a212_0x34d0df(0x105),'appDomain':'app-domain','localDomain':'local-domain','certificateDomain':'certificate-domain'};function a212_0x3854(){const _0x2bb1d1=['Unsupported\x20domain\x20config\x20field(s):\x20','search','isArray','localDomain','skillHubDomain','3475010jTrNjm','https:','kb-domain','3758247aHPfbl','parse','includes','6knkFMG','Allowed\x20fields:\x20','1155128EeVpgT','user-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','appDomain','api-domain','certificateDomain','Domain\x20config\x20file\x20not\x20found:\x20','cwd','skillDomain','join','kbDomain','utf8',':\x20\x22','platformDomain','string','filter','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','origin','object','length','validation','Invalid\x20domain\x20config\x20JSON:\x20','trim','domain-config','userDomain','Invalid\x20','2194488BkUNrN','5212440pkCFjm','hash','315705eIlXFY','skill-domain',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','pathname','str','keys','agentDomain','8228GwMNEH','19taBwup'];a212_0x3854=function(){return _0x2bb1d1;};return a212_0x3854();}export const LEGACY_DOMAIN_CONFIG_FIELDS=[a212_0x34d0df(0xfb),a212_0x34d0df(0x119),a212_0x34d0df(0x102)];export function normalizeDomainOrigin(_0x30de5a,_0x2f048b){const _0x48a53f=a212_0x34d0df;if(typeof _0x2f048b!==_0x48a53f(0x11a)||!_0x2f048b['trim']())throw CliErrors[_0x48a53f(0x120)](_0x48a53f(0x125)+_0x30de5a+_0x48a53f(0x10d));let _0x4167e9;try{_0x4167e9=new URL(_0x2f048b[_0x48a53f(0x122)]());}catch{throw CliErrors[_0x48a53f(0x120)](_0x48a53f(0x125)+_0x30de5a+_0x48a53f(0x118)+_0x2f048b+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x4167e9['protocol']!==_0x48a53f(0x104)||_0x4167e9['username']||_0x4167e9['password']||_0x4167e9[_0x48a53f(0xf8)]!=='/'&&_0x4167e9[_0x48a53f(0xf8)]!==''||_0x4167e9[_0x48a53f(0xff)]||_0x4167e9[_0x48a53f(0x128)])throw CliErrors[_0x48a53f(0x120)](_0x48a53f(0x125)+_0x30de5a+_0x48a53f(0x12b),_0x48a53f(0x10e));return _0x4167e9[_0x48a53f(0x11d)];}export function readDomainConfig(_0x4faed2){const _0x3e3790=a212_0x34d0df,_0x43c6e5=isAbsolute(_0x4faed2)?_0x4faed2:resolve(process[_0x3e3790(0x113)](),_0x4faed2);if(!existsSync(_0x43c6e5))throw CliErrors[_0x3e3790(0x120)](_0x3e3790(0x112)+_0x43c6e5);let _0x258c29;try{_0x258c29=JSON[_0x3e3790(0x107)](readFileSync(_0x43c6e5,_0x3e3790(0x117)));}catch{throw CliErrors[_0x3e3790(0x120)](_0x3e3790(0x121)+_0x43c6e5);}if(!_0x258c29||typeof _0x258c29!==_0x3e3790(0x11e)||Array[_0x3e3790(0x100)](_0x258c29))throw CliErrors['validation']('Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.');const _0x148ca0=_0x258c29,_0x2a3152=Object[_0x3e3790(0xfa)](_0x148ca0)[_0x3e3790(0x11b)](_0x31ee20=>!DOMAIN_CONFIG_FIELDS[_0x3e3790(0x108)](_0x31ee20));if(_0x2a3152['length']>0x0)throw CliErrors['validation'](_0x3e3790(0xfe)+_0x2a3152['join'](',\x20'),_0x3e3790(0x10a)+DOMAIN_CONFIG_FIELDS[_0x3e3790(0x115)](',\x20'));const _0x46f819={};for(const _0x65b41c of DOMAIN_CONFIG_FIELDS){_0x148ca0[_0x65b41c]!==undefined&&(_0x46f819[_0x65b41c]=normalizeDomainOrigin(_0x65b41c,_0x148ca0[_0x65b41c]));}if(Object[_0x3e3790(0xfa)](_0x46f819)[_0x3e3790(0x11f)]===0x0)throw CliErrors[_0x3e3790(0x120)](_0x3e3790(0x11c));return _0x46f819;}export function resolveDomainFlags(_0x18214e){const _0x516e81=a212_0x34d0df,_0x306e25=(_0x18214e[_0x516e81(0xf9)](_0x516e81(0x123))||'')[_0x516e81(0x122)](),_0x5ca1d2=_0x306e25?readDomainConfig(_0x306e25):{};for(const _0x539be6 of DOMAIN_CONFIG_FIELDS){const _0x24403d=(_0x18214e[_0x516e81(0xf9)](DOMAIN_FLAGS[_0x539be6])||'')[_0x516e81(0x122)]();if(_0x24403d)_0x5ca1d2[_0x539be6]=normalizeDomainOrigin(_0x539be6,_0x24403d);}return _0x5ca1d2;}
|
|
1
|
+
const a218_0x579d38=a218_0x4f69;(function(_0x1b2fdc,_0xa2fa5c){const _0xc7a901=a218_0x4f69,_0x30dfd5=_0x1b2fdc();while(!![]){try{const _0x2e430f=-parseInt(_0xc7a901(0x185))/0x1*(parseInt(_0xc7a901(0x17c))/0x2)+-parseInt(_0xc7a901(0x197))/0x3*(parseInt(_0xc7a901(0x19d))/0x4)+-parseInt(_0xc7a901(0x19c))/0x5+parseInt(_0xc7a901(0x190))/0x6*(-parseInt(_0xc7a901(0x1a4))/0x7)+parseInt(_0xc7a901(0x166))/0x8+parseInt(_0xc7a901(0x1b2))/0x9*(-parseInt(_0xc7a901(0x1b3))/0xa)+parseInt(_0xc7a901(0x163))/0xb;if(_0x2e430f===_0xa2fa5c)break;else _0x30dfd5['push'](_0x30dfd5['shift']());}catch(_0x50f9cf){_0x30dfd5['push'](_0x30dfd5['shift']());}}}(a218_0x323d,0x73c20));function a218_0x4f69(_0x720a62,_0x59b18d){_0x720a62=_0x720a62-0x161;const _0x323d13=a218_0x323d();let _0x4f6945=_0x323d13[_0x720a62];return _0x4f6945;}import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS,ENTERPRISE_ROUTING_CONSUMERS,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=['userDomain',a218_0x579d38(0x16a),a218_0x579d38(0x1aa),'skillDomain','kbDomain',a218_0x579d38(0x1b1),a218_0x579d38(0x1a2),a218_0x579d38(0x192)];const DOMAIN_FLAGS={'userDomain':a218_0x579d38(0x1b0),'apiDomain':'api-domain','runtimeDomain':a218_0x579d38(0x18a),'skillDomain':a218_0x579d38(0x176),'kbDomain':a218_0x579d38(0x1a9),'appDomain':a218_0x579d38(0x169),'localDomain':a218_0x579d38(0x194),'certificateDomain':'certificate-domain'};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a218_0x579d38(0x19b),a218_0x579d38(0x191),'skillHubDomain'];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a218_0x579d38(0x17d),'apiDomain':a218_0x579d38(0x16a),'runtimeDomain':'runtimeDomain','skillDomain':a218_0x579d38(0x1a6),'kbDomain':a218_0x579d38(0x1a5),'appDomain':a218_0x579d38(0x1b1),'localDomain':a218_0x579d38(0x1a2),'certificateDomain':a218_0x579d38(0x192)},ROUTING_CONSUMER=a218_0x579d38(0x1b6);export function normalizeDomainOrigin(_0x220876,_0x5c37e8){const _0x5dbf64=a218_0x579d38;if(typeof _0x5c37e8!==_0x5dbf64(0x183)||!_0x5c37e8[_0x5dbf64(0x199)]())throw CliErrors[_0x5dbf64(0x18f)](_0x5dbf64(0x17b)+_0x220876+_0x5dbf64(0x172));let _0x265060;try{_0x265060=new URL(_0x5c37e8[_0x5dbf64(0x199)]());}catch{throw CliErrors[_0x5dbf64(0x18f)](_0x5dbf64(0x17b)+_0x220876+_0x5dbf64(0x171)+_0x5c37e8+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x265060[_0x5dbf64(0x196)]!=='https:'||_0x265060[_0x5dbf64(0x19f)]||_0x265060[_0x5dbf64(0x17e)]||_0x265060[_0x5dbf64(0x165)]!=='/'&&_0x265060['pathname']!==''||_0x265060['search']||_0x265060[_0x5dbf64(0x1ae)])throw CliErrors[_0x5dbf64(0x18f)](_0x5dbf64(0x17b)+_0x220876+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.',_0x5dbf64(0x1a7));return _0x265060[_0x5dbf64(0x184)];}function a218_0x323d(){const _0x34e21a=['skill-domain','utf8','lovrabet','str','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','Invalid\x20','1486xyQdJq','userDomain','password','default','\x22\x20and\x20kind\x20\x22','\x20consumer(s):\x20','mode','string','origin','109xdjYdH','base\x20URL','parse','Allowed\x20consumers:\x20','filter','runtime-domain','legacy','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.','cwd',':\x20expected\x20an\x20HTTPS\x20','validation','78jXLzHm','platformDomain','certificateDomain','includes','local-domain','replace','protocol','65613LtiUxG','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','trim','Invalid\x20domain\x20config\x20JSON:\x20','agentDomain','1439380DgKiRn','152lyIddo','Allowed\x20fields:\x20','username','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','localDomain','object','337330aYyGas','kbDomain','skillDomain','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','kb-domain','runtimeDomain','domains','keys','Unsupported\x20','hash','\x22\x20is\x20not\x20a\x20valid\x20URL.','user-domain','appDomain','18idGtIk','3607490LYffAV','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','length','rabetbase-cli','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','join','Enterprise\x20','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','32928357AupjXU','Unsupported\x20enterprise\x20Domain\x20field(s):\x20','pathname','228688lCnFeY','enterprise-v1','domain-config','app-domain','apiDomain','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','search','href','Invalid\x20cdn.','\x20and\x20has\x20no\x20default.','cdn',':\x20\x22',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','isArray','Unsupported\x20enterprise\x20routing\x20field(s):\x20','https:'];a218_0x323d=function(){return _0x34e21a;};return a218_0x323d();}export function normalizeRoutingDomainValue(_0x661f38,_0x5f03f8){const _0x7c6055=a218_0x579d38;if(typeof _0x5f03f8==='string')return normalizeDomainOrigin(_0x661f38,_0x5f03f8);if(!_0x5f03f8||typeof _0x5f03f8!==_0x7c6055(0x1a3)||Array[_0x7c6055(0x173)](_0x5f03f8))throw CliErrors[_0x7c6055(0x18f)]('Invalid\x20'+_0x661f38+':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.');const _0x200c4d=_0x5f03f8,_0x36350f=Object[_0x7c6055(0x1ac)](_0x200c4d),_0x345819=[_0x7c6055(0x17f),...ENTERPRISE_ROUTING_CONSUMERS],_0x583d89=_0x36350f[_0x7c6055(0x189)](_0x32637b=>!_0x345819[_0x7c6055(0x193)](_0x32637b));if(_0x583d89['length']>0x0)throw CliErrors[_0x7c6055(0x18f)](_0x7c6055(0x1ad)+_0x661f38+_0x7c6055(0x181)+_0x583d89[_0x7c6055(0x1b8)](',\x20'),_0x7c6055(0x188)+_0x345819[_0x7c6055(0x1b8)](',\x20'));if(_0x36350f['length']===0x0)throw CliErrors[_0x7c6055(0x18f)]('Invalid\x20'+_0x661f38+':\x20consumer\x20Domain\x20object\x20cannot\x20be\x20empty.');const _0x389838={};for(const _0x4105e4 of _0x36350f){const _0x4c16a6=_0x4105e4;_0x389838[_0x4c16a6]=normalizeDomainOrigin(_0x661f38,_0x200c4d[_0x4105e4]);}return _0x389838;}export function normalizeCdnBaseUrl(_0x2f1eab,_0x490c13){const _0x511fe1=a218_0x579d38;if(typeof _0x490c13!==_0x511fe1(0x183)||!_0x490c13[_0x511fe1(0x199)]())throw CliErrors[_0x511fe1(0x18f)](_0x511fe1(0x16e)+_0x2f1eab+':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.');const _0x224bb0=_0x490c13[_0x511fe1(0x199)]()[_0x511fe1(0x195)](/\/$/,'');let _0x14a1a1;try{_0x14a1a1=new URL(_0x224bb0);}catch{throw CliErrors[_0x511fe1(0x18f)](_0x511fe1(0x16e)+_0x2f1eab+':\x20\x22'+_0x490c13+_0x511fe1(0x1af));}if(_0x14a1a1['protocol']!==_0x511fe1(0x175)||_0x14a1a1[_0x511fe1(0x19f)]||_0x14a1a1[_0x511fe1(0x17e)]||_0x14a1a1[_0x511fe1(0x16c)]||_0x14a1a1['hash']||_0x14a1a1[_0x511fe1(0x16d)][_0x511fe1(0x195)](/\/$/,'')!==_0x224bb0||_0x2f1eab===_0x511fe1(0x178)&&_0x14a1a1[_0x511fe1(0x184)]!==_0x224bb0)throw CliErrors[_0x511fe1(0x18f)](_0x511fe1(0x16e)+_0x2f1eab+_0x511fe1(0x18e)+(_0x2f1eab===_0x511fe1(0x178)?_0x511fe1(0x184):_0x511fe1(0x186))+'\x20without\x20credentials,\x20query,\x20or\x20fragment.');return _0x224bb0;}export function resolveEnterpriseRoutingConfig(_0x2e29f8){return resolveEnterpriseRoutingManifest(_0x2e29f8)?.['domains'];}export function resolveEnterpriseRoutingManifest(_0x10875e){const _0x40a586=a218_0x579d38;if(_0x10875e===undefined)return undefined;if(!_0x10875e||typeof _0x10875e!==_0x40a586(0x1a3)||Array[_0x40a586(0x173)](_0x10875e))throw CliErrors[_0x40a586(0x18f)](_0x40a586(0x18c));return parseEnterpriseRoutingManifest(_0x10875e);}export function resolveRoutingDomainValue(_0x138898,_0x4400e5,_0x4f9b54){const _0xbbf3dc=a218_0x579d38;if(typeof _0x4400e5===_0xbbf3dc(0x183))return _0x4400e5;const _0x3d58da=_0x4400e5[_0x4f9b54]??_0x4400e5[_0xbbf3dc(0x17f)];if(!_0x3d58da)throw CliErrors[_0xbbf3dc(0x18f)](_0xbbf3dc(0x161)+_0x138898+_0xbbf3dc(0x17a)+_0x4f9b54+_0xbbf3dc(0x16f));return _0x3d58da;}export function readDomainConfigInput(_0x2ea6bb){const _0x42dbc9=a218_0x579d38,_0x14a612=isAbsolute(_0x2ea6bb)?_0x2ea6bb:resolve(process[_0x42dbc9(0x18d)](),_0x2ea6bb);if(!existsSync(_0x14a612))throw CliErrors['validation']('Domain\x20config\x20file\x20not\x20found:\x20'+_0x14a612);let _0x2bd3f5;try{_0x2bd3f5=JSON[_0x42dbc9(0x187)](readFileSync(_0x14a612,_0x42dbc9(0x177)));}catch{throw CliErrors['validation'](_0x42dbc9(0x19a)+_0x14a612);}if(!_0x2bd3f5||typeof _0x2bd3f5!==_0x42dbc9(0x1a3)||Array[_0x42dbc9(0x173)](_0x2bd3f5))throw CliErrors['validation']('Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.');const _0x539d52=_0x2bd3f5;if(_0x42dbc9(0x196)in _0x539d52)return parseEnterpriseRoutingManifest(_0x539d52);const _0x4ee96a=Object[_0x42dbc9(0x1ac)](_0x539d52)[_0x42dbc9(0x189)](_0x236fbe=>!DOMAIN_CONFIG_FIELDS[_0x42dbc9(0x193)](_0x236fbe));if(_0x4ee96a[_0x42dbc9(0x1b5)]>0x0)throw CliErrors[_0x42dbc9(0x18f)]('Unsupported\x20domain\x20config\x20field(s):\x20'+_0x4ee96a[_0x42dbc9(0x1b8)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS['join'](',\x20'));const _0x36b868={};for(const _0x3540d9 of DOMAIN_CONFIG_FIELDS){_0x539d52[_0x3540d9]!==undefined&&(_0x36b868[_0x3540d9]=normalizeDomainOrigin(_0x3540d9,_0x539d52[_0x3540d9]));}if(Object[_0x42dbc9(0x1ac)](_0x36b868)[_0x42dbc9(0x1b5)]===0x0)throw CliErrors[_0x42dbc9(0x18f)]('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':_0x42dbc9(0x18b),'domains':_0x36b868};}export function readDomainConfig(_0x4d0706){return readDomainConfigInput(_0x4d0706)['domains'];}export function resolveDomainConfigInput(_0x380fe9){const _0xf6f8e=a218_0x579d38,_0x20036d=(_0x380fe9[_0xf6f8e(0x179)](_0xf6f8e(0x168))||'')['trim'](),_0x5e6de0=_0x20036d?readDomainConfigInput(_0x20036d):{'mode':_0xf6f8e(0x18b),'domains':{}},_0x5e6b8b=DOMAIN_CONFIG_FIELDS[_0xf6f8e(0x189)](_0x4e1e51=>Boolean((_0x380fe9[_0xf6f8e(0x179)](DOMAIN_FLAGS[_0x4e1e51])||'')[_0xf6f8e(0x199)]()));if(_0x5e6de0[_0xf6f8e(0x182)]===_0xf6f8e(0x167)&&_0x5e6b8b[_0xf6f8e(0x1b5)]>0x0)throw CliErrors[_0xf6f8e(0x18f)](_0xf6f8e(0x16b),_0xf6f8e(0x1b4));for(const _0x5e98f4 of DOMAIN_CONFIG_FIELDS){const _0x1c26c0=(_0x380fe9[_0xf6f8e(0x179)](DOMAIN_FLAGS[_0x5e98f4])||'')[_0xf6f8e(0x199)]();if(_0x1c26c0)_0x5e6de0['domains'][_0x5e98f4]=normalizeDomainOrigin(_0x5e98f4,_0x1c26c0);}return _0x5e6de0;}export function resolveDomainFlags(_0x2dfa47){const _0x5cc631=a218_0x579d38;return resolveDomainConfigInput(_0x2dfa47)[_0x5cc631(0x1ab)];}export function parseEnterpriseRoutingManifest(_0x4afa37){const _0x37f5e3=a218_0x579d38,_0x3871fd=Object[_0x37f5e3(0x1ac)](_0x4afa37)['filter'](_0x238b29=>!ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS[_0x37f5e3(0x193)](_0x238b29));if(_0x3871fd['length']>0x0)throw CliErrors['validation'](_0x37f5e3(0x174)+_0x3871fd[_0x37f5e3(0x1b8)](',\x20'));if(_0x4afa37['protocol']!==ENTERPRISE_ROUTING_PROTOCOL||_0x4afa37['kind']!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x37f5e3(0x18f)](_0x37f5e3(0x1a8)+ENTERPRISE_ROUTING_PROTOCOL+_0x37f5e3(0x180)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x4afa37['domains']||typeof _0x4afa37[_0x37f5e3(0x1ab)]!==_0x37f5e3(0x1a3)||Array[_0x37f5e3(0x173)](_0x4afa37[_0x37f5e3(0x1ab)]))throw CliErrors[_0x37f5e3(0x18f)](_0x37f5e3(0x1b7));if(!_0x4afa37[_0x37f5e3(0x170)]||typeof _0x4afa37[_0x37f5e3(0x170)]!==_0x37f5e3(0x1a3)||Array[_0x37f5e3(0x173)](_0x4afa37[_0x37f5e3(0x170)]))throw CliErrors['validation']('Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.');const _0x23f19d=_0x4afa37[_0x37f5e3(0x1ab)],_0x2be0b8=Object[_0x37f5e3(0x1ac)](_0x23f19d)[_0x37f5e3(0x189)](_0x1c580a=>!ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x37f5e3(0x193)](_0x1c580a));if(_0x2be0b8[_0x37f5e3(0x1b5)]>0x0)throw CliErrors['validation'](_0x37f5e3(0x164)+_0x2be0b8[_0x37f5e3(0x1b8)](',\x20'),'Allowed\x20fields:\x20'+ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x37f5e3(0x1b8)](',\x20'));const _0x12db66=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x37f5e3(0x189)](_0xe76f38=>_0x23f19d[_0xe76f38]===undefined);if(_0x12db66[_0x37f5e3(0x1b5)]>0x0)throw CliErrors[_0x37f5e3(0x18f)](_0x37f5e3(0x162)+_0x12db66[_0x37f5e3(0x1b8)](',\x20'));if(_0x23f19d[_0x37f5e3(0x1a2)]===undefined!==(_0x23f19d[_0x37f5e3(0x192)]===undefined))throw CliErrors['validation'](_0x37f5e3(0x1a1));const _0x5526a4=_0x4afa37[_0x37f5e3(0x170)],_0x4273ea=Object['keys'](_0x5526a4)[_0x37f5e3(0x189)](_0x489076=>!ENTERPRISE_ROUTING_CDN_FIELDS['includes'](_0x489076));if(_0x4273ea[_0x37f5e3(0x1b5)]>0x0)throw CliErrors[_0x37f5e3(0x18f)](_0x37f5e3(0x1a0)+_0x4273ea[_0x37f5e3(0x1b8)](',\x20'),_0x37f5e3(0x19e)+ENTERPRISE_ROUTING_CDN_FIELDS[_0x37f5e3(0x1b8)](',\x20'));const _0x5290fb=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS[_0x37f5e3(0x189)](_0x45d90e=>_0x5526a4[_0x45d90e]===undefined);if(_0x5290fb['length']>0x0)throw CliErrors[_0x37f5e3(0x18f)](_0x37f5e3(0x198)+_0x5290fb[_0x37f5e3(0x1b8)](',\x20'));const _0x316969={};for(const _0x252a7b of ENTERPRISE_ROUTING_CDN_FIELDS){_0x316969[_0x252a7b]=normalizeCdnBaseUrl(_0x252a7b,_0x5526a4[_0x252a7b]);}const _0x84a085={},_0x4a59ff={};for(const _0x48c6f9 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x46e782=_0x23f19d[_0x48c6f9];if(_0x46e782===undefined)continue;const _0xddfe92=normalizeRoutingDomainValue(_0x48c6f9,_0x46e782);_0x84a085[_0x48c6f9]=_0xddfe92;const _0x1f1738=ENTERPRISE_TO_LOCAL_FIELD[_0x48c6f9];_0x1f1738&&(_0x4a59ff[_0x1f1738]=resolveRoutingDomainValue(_0x48c6f9,_0xddfe92,ROUTING_CONSUMER));}return{'mode':_0x37f5e3(0x167),'domains':_0x4a59ff,'manifestDomains':_0x84a085,'cdn':_0x316969};}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { LovrabetRegion } from "../constant/region.js";
|
|
2
|
+
export declare const PROJECT_DOMAIN_ROUTING_FILE_NAME = "rabetbase.domain-routing.json";
|
|
3
|
+
export declare const PROJECT_DOMAIN_ROUTING_PROTOCOL = "lovrabet-project-domain-routing/v1";
|
|
4
|
+
export interface ProjectDomainRoutingManifest {
|
|
5
|
+
protocol: typeof PROJECT_DOMAIN_ROUTING_PROTOCOL;
|
|
6
|
+
mode: "official" | "independent";
|
|
7
|
+
region: LovrabetRegion | null;
|
|
8
|
+
domains: {
|
|
9
|
+
user: string;
|
|
10
|
+
app: string;
|
|
11
|
+
runtime: string;
|
|
12
|
+
};
|
|
13
|
+
cdn: {
|
|
14
|
+
libraries: string;
|
|
15
|
+
lovrabet: string;
|
|
16
|
+
};
|
|
17
|
+
local: {
|
|
18
|
+
origin: string;
|
|
19
|
+
certificateUrl?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Resolves only public, final Domain routing facts for generated browser projects. */
|
|
23
|
+
export declare function getProjectDomainRoutingManifest(): ProjectDomainRoutingManifest;
|
|
24
|
+
export declare function writeProjectDomainRoutingManifest(projectRoot: string): {
|
|
25
|
+
path: string;
|
|
26
|
+
manifest: ProjectDomainRoutingManifest;
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a219_0x525a75=a219_0x181e;(function(_0xe39cd5,_0x27adc7){const _0x59c1d4=a219_0x181e,_0x1b52b8=_0xe39cd5();while(!![]){try{const _0x13855f=parseInt(_0x59c1d4(0xa0))/0x1*(parseInt(_0x59c1d4(0x94))/0x2)+-parseInt(_0x59c1d4(0x97))/0x3+parseInt(_0x59c1d4(0x9e))/0x4+parseInt(_0x59c1d4(0x8c))/0x5+-parseInt(_0x59c1d4(0x99))/0x6+-parseInt(_0x59c1d4(0x9f))/0x7+-parseInt(_0x59c1d4(0x98))/0x8*(-parseInt(_0x59c1d4(0x8d))/0x9);if(_0x13855f===_0x27adc7)break;else _0x1b52b8['push'](_0x1b52b8['shift']());}catch(_0x36c7db){_0x1b52b8['push'](_0x1b52b8['shift']());}}}(a219_0x49b9,0x8924e));import{renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getAppDomain,getCertificateDomain,getLocalDomain,getRuntimeDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a219_0x525a75(0x95);function a219_0x181e(_0x3f2b30,_0x33f201){_0x3f2b30=_0x3f2b30-0x8c;const _0x49b9f2=a219_0x49b9();let _0x181e2a=_0x49b9f2[_0x3f2b30];return _0x181e2a;}export const PROJECT_DOMAIN_ROUTING_PROTOCOL=a219_0x525a75(0x9a);function a219_0x49b9(){const _0x1a1e0e=['official','origin','/cert/lovrabet-dev.json','pid','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','utf8','110hBltDk','rabetbase.domain-routing.json','independent','3365394DuCcfO','8041032vqkRbs','1434486dpHAnE','lovrabet-project-domain-routing/v1','local','http://localhost','.tmp','2577908CrRLwV','5576424QQIuqh','5050HeHNYm','3959485bOBPZp','9HbxVpq'];a219_0x49b9=function(){return _0x1a1e0e;};return a219_0x49b9();}export function getProjectDomainRoutingManifest(){const _0x539ca2=a219_0x525a75,_0xed99c2=getActiveRegion(),_0x8eb5e0=isIndependentDeployment(),_0x2ceb26=getOfficialRoutingProfile(_0xed99c2),_0x1fa67e=getLocalDomain(),_0x218b12=getCertificateDomain(),_0x3cf313=getActiveCdn();if(!!_0x1fa67e!==!!_0x218b12)throw new Error(_0x539ca2(0x92));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x8eb5e0?_0x539ca2(0x96):_0x539ca2(0x8e),'region':_0x8eb5e0?null:_0xed99c2,'domains':{'user':getUserDomain(),'app':getAppDomain(),'runtime':getRuntimeDomain()},'cdn':_0x3cf313,'local':_0x1fa67e&&_0x218b12?{'origin':_0x1fa67e,'certificateUrl':_0x218b12+'/cert/lovrabet-dev.json'}:_0x8eb5e0?{'origin':_0x539ca2(0x9c)}:{'origin':_0x2ceb26[_0x539ca2(0x9b)][_0x539ca2(0x8f)],'certificateUrl':_0x3cf313['lovrabet']+_0x539ca2(0x90)}};}export function writeProjectDomainRoutingManifest(_0x24480e){const _0x6c2100=a219_0x525a75,_0xe9fa8a=getProjectDomainRoutingManifest(),_0x11dc71=join(_0x24480e,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x3b9aa8=_0x11dc71+'.'+process[_0x6c2100(0x91)]+'.'+Date['now']()+_0x6c2100(0x9d);try{writeFileSync(_0x3b9aa8,JSON['stringify'](_0xe9fa8a,null,0x2)+'\x0a',{'encoding':_0x6c2100(0x93),'mode':0x1a4}),renameSync(_0x3b9aa8,_0x11dc71);}catch(_0x355729){try{unlinkSync(_0x3b9aa8);}catch{}throw _0x355729;}return{'path':_0x11dc71,'manifest':_0xe9fa8a};}
|
package/lib/config/schema.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FlagDef } from "../framework/types.js";
|
|
2
2
|
export { DEFAULT_CONFIG_VALUES } from "../constant/defaults.js";
|
|
3
|
-
export declare const PROJECT_CREATE_INHERITABLE_KEYS: readonly ["cookie", "accessKey", "locale", "format", "riskLevel", "region", "userDomain", "apiDomain", "runtimeDomain", "skillDomain", "kbDomain", "appDomain", "localDomain", "certificateDomain"];
|
|
3
|
+
export declare const PROJECT_CREATE_INHERITABLE_KEYS: readonly ["cookie", "accessKey", "locale", "format", "riskLevel", "region", "routing", "userDomain", "apiDomain", "runtimeDomain", "skillDomain", "kbDomain", "appDomain", "localDomain", "certificateDomain"];
|
|
4
4
|
export interface ConfigMetadataFields {
|
|
5
5
|
version?: string;
|
|
6
6
|
createdAt?: string;
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a220_0x2e65(){const _0x4913f7=['runtimeDomain','format','object','inherit','userDomain','apiDir','keys','apps','1971230TwNQWO','riskLevel','deploymentSync','zh-CN','Config\x20key\x20(','pageSize','889200veKGNT','app','167926belSzO','entries','699223QZhVEw','routing','map','length','Auth\x20cookie','Target\x20environment','defaultFormat','region','appDomain','appcode','string','trim','toLowerCase','kbDomain','Access\x20key','API\x20directory\x20path','skillDomain','locale','2682792rcCCnx','cookie','apiDomain','accessKey','2638980ofaPKC','en-US','env','localDomain','certificateDomain','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','622740swsfpI','Default\x20page\x20size','defaultApp'];a220_0x2e65=function(){return _0x4913f7;};return a220_0x2e65();}const a220_0x2e1394=a220_0x5ecc;(function(_0x386ca0,_0x2ebf64){const _0x48a455=a220_0x5ecc,_0x46280d=_0x386ca0();while(!![]){try{const _0x4e8aa4=parseInt(_0x48a455(0x125))/0x1+-parseInt(_0x48a455(0x138))/0x2+parseInt(_0x48a455(0x11b))/0x3+-parseInt(_0x48a455(0x136))/0x4+-parseInt(_0x48a455(0x130))/0x5+-parseInt(_0x48a455(0x11f))/0x6+parseInt(_0x48a455(0x13a))/0x7;if(_0x4e8aa4===_0x2ebf64)break;else _0x46280d['push'](_0x46280d['shift']());}catch(_0x594582){_0x46280d['push'](_0x46280d['shift']());}}}(a220_0x2e65,0x7458a));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';import{collectDeploymentSyncProfile,getDeploymentSyncProfileFlagDefs}from'../config/deployment-sync.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a220_0x2e1394(0x11c),'accessKey','locale',a220_0x2e1394(0x129),'riskLevel','region',a220_0x2e1394(0x13b),a220_0x2e1394(0x12c),a220_0x2e1394(0x11d),a220_0x2e1394(0x128),a220_0x2e1394(0x119),a220_0x2e1394(0x116),a220_0x2e1394(0x142),a220_0x2e1394(0x122),a220_0x2e1394(0x123)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a220_0x2e1394(0x143),a220_0x2e1394(0x121),a220_0x2e1394(0x11a),a220_0x2e1394(0x129),a220_0x2e1394(0x11c),'accessKey',a220_0x2e1394(0x12d),a220_0x2e1394(0x141),a220_0x2e1394(0x12c),a220_0x2e1394(0x11d),a220_0x2e1394(0x128),a220_0x2e1394(0x119),'kbDomain',a220_0x2e1394(0x142),a220_0x2e1394(0x122),a220_0x2e1394(0x123)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(_0x16fd1f){return[..._0x16fd1f]['join'](',\x20');}function a220_0x5ecc(_0x48c354,_0x1b9d1b){_0x48c354=_0x48c354-0x116;const _0x2e6532=a220_0x2e65();let _0x5ecc9d=_0x2e6532[_0x48c354];return _0x5ecc9d;}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x1f561a){return TOP_LEVEL_CONFIG_KEYS['has'](_0x1f561a);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x5a7a1e=a220_0x2e1394;return _0x5a7a1e(0x134)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a220_0x2e1394(0x12d),'cookie':a220_0x2e1394(0x11c),'accessKey':'accessKey','defaultFormat':a220_0x2e1394(0x129),'pageSize':a220_0x2e1394(0x135),'riskLevel':'riskLevel','locale':a220_0x2e1394(0x11a)};export function getAppProfileFlagDefs(){const _0x5694ee=a220_0x2e1394;return[{'name':_0x5694ee(0x121),'type':_0x5694ee(0x144),'description':_0x5694ee(0x13f),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x5694ee(0x12d),'type':_0x5694ee(0x144),'description':_0x5694ee(0x118)},{'name':'cookie','type':_0x5694ee(0x144),'description':_0x5694ee(0x13e),'hidden':!![]},{'name':'accessKey','type':_0x5694ee(0x144),'description':_0x5694ee(0x117),'hidden':!![]},{'name':_0x5694ee(0x140),'type':_0x5694ee(0x144),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':'number','description':_0x5694ee(0x126)},{'name':_0x5694ee(0x131),'type':_0x5694ee(0x144),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x5694ee(0x11a),'type':_0x5694ee(0x144),'description':_0x5694ee(0x124)},...getDeploymentSyncProfileFlagDefs()];}export function collectAppProfileOverrides(_0x2f998a){const _0x4d4740=a220_0x2e1394,_0x3a6742={};for(const [_0x3712e9,_0x4da004]of Object[_0x4d4740(0x139)](APP_PROFILE_FLAG_KEY_MAP)){const _0x452abe=_0x2f998a(_0x3712e9);if(!_0x452abe)continue;_0x3a6742[_0x4da004]=_0x4da004===_0x4d4740(0x135)?Number(_0x452abe):_0x452abe;}const _0x39b84e=collectDeploymentSyncProfile(_0x2f998a);if(_0x39b84e)_0x3a6742[_0x4d4740(0x132)]=_0x39b84e;return _0x3a6742;}export function buildAppProfileListFields(_0x563203){const _0x503695=a220_0x2e1394;return{'env':_0x563203[_0x503695(0x121)]??null,'apiDir':_0x563203[_0x503695(0x12d)]??null,'hasCookie':!!_0x563203[_0x503695(0x11c)],'hasAccessKey':!!_0x563203[_0x503695(0x11e)],'format':_0x563203[_0x503695(0x129)]??null,'pageSize':_0x563203[_0x503695(0x135)]??null,'riskLevel':_0x563203[_0x503695(0x131)]??null,'locale':_0x563203[_0x503695(0x11a)]??null,'deploymentSync':_0x563203[_0x503695(0x132)]??null};}export function buildAppDoctorFields(_0x296a6c,_0x525ec5){const _0x4d906e=a220_0x2e1394;return{'env':{'value':_0x296a6c[_0x4d906e(0x121)]||_0x525ec5['env'],'source':_0x296a6c[_0x4d906e(0x121)]?_0x4d906e(0x137):_0x4d906e(0x12b)},'apiDir':{'value':_0x296a6c['apiDir']||_0x525ec5['apiDir'],'source':_0x296a6c[_0x4d906e(0x12d)]?_0x4d906e(0x137):_0x4d906e(0x12b)},'cookie':{'value':_0x296a6c[_0x4d906e(0x11c)]||_0x525ec5['cookie'],'source':_0x296a6c['cookie']?_0x4d906e(0x137):_0x4d906e(0x12b)},'accessKey':{'value':_0x296a6c[_0x4d906e(0x11e)]||_0x525ec5['accessKey'],'source':_0x296a6c[_0x4d906e(0x11e)]?'app':_0x4d906e(0x12b)}};}export function buildCanonicalAppConfig(_0x40a9f9,_0x3640ef){const _0x3bee27=a220_0x2e1394,_0x38f3e4=_0x40a9f9[_0x3bee27(0x13c)](_0x5c2b40=>String(_0x5c2b40||'')[_0x3bee27(0x145)]())['filter'](Boolean);if(_0x38f3e4[_0x3bee27(0x13d)]===0x0)return{};const _0x417606={};for(const _0x546e75 of _0x38f3e4){_0x417606[_0x546e75]=_0x3640ef?{'appcode':_0x546e75,'env':_0x3640ef}:{'appcode':_0x546e75};}return _0x38f3e4[_0x3bee27(0x13d)]>0x1?{'apps':_0x417606,'defaultApp':_0x38f3e4[0x0]}:{'apps':_0x417606};}export function normalizeStoredDefaultApp(_0x480051,_0x1a181f){const _0x2f3570=a220_0x2e1394,_0x909af9=_0x480051[_0x2f3570(0x12f)]&&typeof _0x480051[_0x2f3570(0x12f)]===_0x2f3570(0x12a)?_0x480051['apps']:{},_0x51c3b3=Object[_0x2f3570(0x12e)](_0x909af9);if(_0x51c3b3[_0x2f3570(0x13d)]<=0x1)return delete _0x480051[_0x2f3570(0x127)],undefined;const _0x504296=typeof _0x480051['defaultApp']===_0x2f3570(0x144)&&_0x909af9[_0x480051[_0x2f3570(0x127)]]?_0x480051[_0x2f3570(0x127)]:undefined,_0x242727=_0x1a181f&&_0x909af9[_0x1a181f]?_0x1a181f:_0x504296;if(_0x242727)return _0x480051[_0x2f3570(0x127)]=_0x242727,_0x242727;return delete _0x480051['defaultApp'],undefined;}export function buildCanonicalProjectConfig(_0x278b61,_0x425e1c){const _0x4d373f=a220_0x2e1394,{appCodes:appCodes=[],env:_0x2cf7ec,metadata:_0x33be8b}=_0x425e1c,_0x7c00f2={..._0x278b61,..._0x33be8b||{}};delete _0x7c00f2['appcode'],delete _0x7c00f2[_0x4d373f(0x137)];if(_0x2cf7ec)_0x7c00f2[_0x4d373f(0x121)]=_0x2cf7ec;else!_0x7c00f2[_0x4d373f(0x121)]&&(_0x7c00f2[_0x4d373f(0x121)]=DEFAULT_CONFIG_VALUES[_0x4d373f(0x121)]);const _0x33fe90=buildCanonicalAppConfig(appCodes,_0x7c00f2['env']);if(Object[_0x4d373f(0x12e)](_0x33fe90)[_0x4d373f(0x13d)]>0x0){_0x7c00f2[_0x4d373f(0x12f)]=_0x33fe90[_0x4d373f(0x12f)];if(_0x33fe90[_0x4d373f(0x127)])_0x7c00f2['defaultApp']=_0x33fe90['defaultApp'];else delete _0x7c00f2[_0x4d373f(0x127)];}return _0x7c00f2;}const LOCALE_MAP={'zh':a220_0x2e1394(0x133),'zh-cn':a220_0x2e1394(0x133),'zh_cn':a220_0x2e1394(0x133),'en':a220_0x2e1394(0x120),'en-us':'en-US','en_us':'en-US'};export function normalizeLocale(_0x1f81e7){const _0x2e18a2=a220_0x2e1394;if(!_0x1f81e7)return null;return LOCALE_MAP[_0x1f81e7[_0x2e18a2(0x146)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a221_0xb07bc5=a221_0x27c0;(function(_0x1842db,_0x49cd2d){const _0x41725e=a221_0x27c0,_0x3acdf1=_0x1842db();while(!![]){try{const _0x446edd=-parseInt(_0x41725e(0x1d0))/0x1*(parseInt(_0x41725e(0x1cd))/0x2)+-parseInt(_0x41725e(0x1cf))/0x3*(-parseInt(_0x41725e(0x1d4))/0x4)+-parseInt(_0x41725e(0x1d5))/0x5+-parseInt(_0x41725e(0x1cc))/0x6+-parseInt(_0x41725e(0x1ca))/0x7*(-parseInt(_0x41725e(0x1d6))/0x8)+parseInt(_0x41725e(0x1d7))/0x9*(-parseInt(_0x41725e(0x1d1))/0xa)+parseInt(_0x41725e(0x1d2))/0xb*(parseInt(_0x41725e(0x1cb))/0xc);if(_0x446edd===_0x49cd2d)break;else _0x3acdf1['push'](_0x3acdf1['shift']());}catch(_0x5ebdd1){_0x3acdf1['push'](_0x3acdf1['shift']());}}}(a221_0x721d,0x3fcf3));export const RABETBASE_CDN_BASE_URL=a221_0xb07bc5(0x1d3);export const CLI_VERSION_POLICY_URL=RABETBASE_CDN_BASE_URL+a221_0xb07bc5(0x1ce);function a221_0x27c0(_0x162aaf,_0x130371){_0x162aaf=_0x162aaf-0x1ca;const _0x721d78=a221_0x721d();let _0x27c0eb=_0x721d78[_0x162aaf];return _0x27c0eb;}function a221_0x721d(){const _0x4213bd=['432672KKKdMy','38zGduWs','/config/index.json','26145nELfdB','14947SuxkXR','3173790WXdALR','79013bWmoGV','https://g.lovrabet.com/dist/rabetbase-cli','16izVnlb','1336750LhlVSt','16ZJkBTk','9JwnjlM','792274TdXrvm','1572Yeizmt'];a221_0x721d=function(){return _0x4213bd;};return a221_0x721d();}export const PROJECT_TEMPLATE_ASSET_BASE_URL=RABETBASE_CDN_BASE_URL+'/templates/projects';
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a216_0x103f(){const _0x41e149=['key','sqlName','expect-path','Environment','zh-CN\x20|\x20en-US','query','Read\x20value\x20from\x20stdin','Verbose\x20output','sort','global','10ebxTNv','format','Expected\x20current\x20child\x20count','expectedChildrenCount','menuIds','function-node','8310HItgei','Parent\x20menu\x20id','790516DcpbpS','meowKey','watch','fromEnv','Page\x20number','Expected\x20current\x20parent\x20menu\x20id','Description','326725BRZrsL','Force\x20non-interactive\x20mode\x20(CI)','task-id','201UXTMsd','page','target-env','Title','Enable\x20Backend\x20Function\x20save','Apply\x20to\x20all','non-interactive','Asynchronous\x20task\x20ID','SQL\x20string','description-file','topk','output','force','Select\x20app\x20profile\x20by\x20name','expectPath','Name','Comma-separated\x20metadata\x20codes','parentId','title','expectedCount','SQL\x20name','Read\x20value\x20from\x20environment\x20variable','<code>','env','app','dry-run','reveal','Show\x20help','267719wAKLrj','appcode','all','rabetbase','Description\x20file','dryRun','sql','DB\x20ID','project','remote','File\x20path','value','yes','fromEntries','keyword','Target\x20path','<expr>','operationType','verbose','parent-id','functionNode','production\x20|\x20daily','Use\x20the\x20base\x20database\x20connection','Confirm\x20destructive\x20action','Use\x20project\x20config\x20scope','operation-type','Target\x20connection\x20environment','sql-name','Config\x20value','Expected\x20current\x20menu\x20path','Expected\x20affected\x20count','Use\x20global\x20config\x20scope','Preview\x20operation\x20without\x20executing','Menu\x20sort\x20value','descriptionFile','Tags','Comma-separated\x20menu\x20IDs','tags','enable-bff-save','Reveal\x20sensitive\x20value','stdin','Output\x20path','Skip\x20confirmation\x20for\x20high-risk\x20writes','Menu\x20label','Rabetbase\x20CLI','help','Watch\x20mode','Record\x20ID','schemas','type','Type\x20filter','sqlname','nonInteractive','json\x20|\x20pretty\x20|\x20compress','operation','codes','label','514071zTXHKp','Clear','file','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Skip\x20import\x20generation','code','confirm','766521YjdlXb','8PoxeqP','12278541HzNkyU','App\x20locale\x20(workspace\x20pass-through;\x20not\x20CLI\x20language)','clear','skipImports','target','Operation\x20type','Override\x20appcode','datasetcode','boolean','direct','skip-imports','6ZUSMus','taskId','Page\x20size','sqlcode','Config\x20key','dbid','string'];a216_0x103f=function(){return _0x41e149;};return a216_0x103f();}const a216_0xc0d985=a216_0x5b89;(function(_0x3ff459,_0x9cf16e){const _0x403191=a216_0x5b89,_0x20ecb3=_0x3ff459();while(!![]){try{const _0xd76a50=-parseInt(_0x403191(0x182))/0x1+-parseInt(_0x403191(0x1e6))/0x2*(parseInt(_0x403191(0x1f2))/0x3)+-parseInt(_0x403191(0x1e8))/0x4+-parseInt(_0x403191(0x1ef))/0x5+-parseInt(_0x403191(0x1cf))/0x6*(parseInt(_0x403191(0x1c2))/0x7)+parseInt(_0x403191(0x1c3))/0x8*(-parseInt(_0x403191(0x1bb))/0x9)+-parseInt(_0x403191(0x1e0))/0xa*(-parseInt(_0x403191(0x1c4))/0xb);if(_0xd76a50===_0x9cf16e)break;else _0x20ecb3['push'](_0x20ecb3['shift']());}catch(_0x388f24){_0x20ecb3['push'](_0x20ecb3['shift']());}}}(a216_0x103f,0x224f3));export const CLI_BIN_NAME=a216_0xc0d985(0x185);export const CLI_DISPLAY_NAME=a216_0xc0d985(0x1ae);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a216_0xc0d985(0x183),'meowKey':a216_0xc0d985(0x183),'type':'string','description':a216_0xc0d985(0x1ca),'hint':a216_0xc0d985(0x17c)},{'name':'app','meowKey':a216_0xc0d985(0x17e),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x173),'hint':'<name>'},{'name':a216_0xc0d985(0x17d),'meowKey':a216_0xc0d985(0x17d),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1d9),'hint':a216_0xc0d985(0x197)},{'name':a216_0xc0d985(0x1e1),'meowKey':a216_0xc0d985(0x1e1),'type':a216_0xc0d985(0x1d5),'description':'Output\x20format','hint':a216_0xc0d985(0x1b7)},{'name':'jq','meowKey':'jq','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1be),'hint':a216_0xc0d985(0x192)},{'name':a216_0xc0d985(0x17f),'meowKey':a216_0xc0d985(0x187),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1a2)},{'name':a216_0xc0d985(0x18e),'meowKey':a216_0xc0d985(0x18e),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1ac)},{'name':a216_0xc0d985(0x1f8),'meowKey':a216_0xc0d985(0x1b6),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1f0)},{'name':a216_0xc0d985(0x1df),'meowKey':'global','type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1a1)},{'name':a216_0xc0d985(0x18a),'meowKey':a216_0xc0d985(0x18a),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x19a)},{'name':'ci','meowKey':'ci','type':a216_0xc0d985(0x1cc),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a216_0xc0d985(0x1af),'meowKey':a216_0xc0d985(0x1af),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x181)},{'name':'locale','meowKey':'locale','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1c5),'hidden':!![],'hint':a216_0xc0d985(0x1da)},{'name':'name','meowKey':'name','type':'string','description':a216_0xc0d985(0x175),'hidden':!![]},{'name':'title','meowKey':a216_0xc0d985(0x178),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1f5),'hidden':!![]},{'name':a216_0xc0d985(0x1db),'meowKey':'query','type':a216_0xc0d985(0x1d5),'description':'Search\x20query','hidden':!![]},{'name':'topk','meowKey':a216_0xc0d985(0x170),'type':a216_0xc0d985(0x1d5),'description':'Maximum\x20search\x20hits','hidden':!![]},{'name':'clear','meowKey':a216_0xc0d985(0x1c6),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1bc),'hidden':!![]},{'name':a216_0xc0d985(0x1ea),'meowKey':a216_0xc0d985(0x1ea),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1b0),'hidden':!![]},{'name':a216_0xc0d985(0x171),'meowKey':'output','type':'string','description':a216_0xc0d985(0x1ab),'hidden':!![]},{'name':'params','meowKey':'params','type':'string','description':'JSON\x20params','hidden':!![]},{'name':a216_0xc0d985(0x1cb),'meowKey':a216_0xc0d985(0x1cb),'type':a216_0xc0d985(0x1d5),'description':'Dataset\x20code','hidden':!![]},{'name':'all','meowKey':a216_0xc0d985(0x184),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1f7),'hidden':!![]},{'name':a216_0xc0d985(0x1a8),'meowKey':'enableBffSave','type':'boolean','description':a216_0xc0d985(0x1f6),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a216_0xc0d985(0x1b1),'hidden':!![]},{'name':'type','meowKey':a216_0xc0d985(0x1b3),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1b4),'hidden':!![]},{'name':'file','meowKey':a216_0xc0d985(0x1bd),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x18c),'hidden':!![]},{'name':a216_0xc0d985(0x1d2),'meowKey':a216_0xc0d985(0x1d2),'type':a216_0xc0d985(0x1d5),'description':'SQL\x20code','hidden':!![]},{'name':a216_0xc0d985(0x19d),'meowKey':a216_0xc0d985(0x1d7),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':'sqlname','meowKey':a216_0xc0d985(0x1b5),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x17a),'hidden':!![]},{'name':'db-id','meowKey':'dbId','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x189),'hidden':!![]},{'name':a216_0xc0d985(0x1d4),'meowKey':a216_0xc0d985(0x1d4),'type':'string','description':a216_0xc0d985(0x189),'hidden':!![]},{'name':'description','meowKey':'description','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1ee),'hidden':!![]},{'name':a216_0xc0d985(0x16f),'meowKey':a216_0xc0d985(0x1a4),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x186),'hidden':!![]},{'name':a216_0xc0d985(0x1f3),'meowKey':a216_0xc0d985(0x1f3),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1ec),'hidden':!![]},{'name':'pagesize','meowKey':'pagesize','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1d1),'hidden':!![]},{'name':a216_0xc0d985(0x190),'meowKey':a216_0xc0d985(0x190),'type':a216_0xc0d985(0x1d5),'description':'Keyword\x20filter','hidden':!![]},{'name':a216_0xc0d985(0x1c0),'meowKey':a216_0xc0d985(0x1c0),'type':a216_0xc0d985(0x1d5),'description':'Code\x20filter','hidden':!![]},{'name':a216_0xc0d985(0x188),'meowKey':'sql','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1fa),'hidden':!![]},{'name':'schemas','meowKey':a216_0xc0d985(0x1b2),'type':a216_0xc0d985(0x1d5),'description':'Schemas','hidden':!![]},{'name':a216_0xc0d985(0x1b8),'meowKey':'operation','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1c9),'hidden':!![]},{'name':a216_0xc0d985(0x1c8),'meowKey':a216_0xc0d985(0x1c8),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x191),'hidden':!![]},{'name':a216_0xc0d985(0x1ce),'meowKey':a216_0xc0d985(0x1c7),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1bf),'hidden':!![]},{'name':a216_0xc0d985(0x1d6),'meowKey':'key','type':'string','description':a216_0xc0d985(0x1d3),'hidden':!![]},{'name':a216_0xc0d985(0x18d),'meowKey':a216_0xc0d985(0x18d),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x19e),'hidden':!![]},{'name':a216_0xc0d985(0x1a7),'meowKey':a216_0xc0d985(0x1a7),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1a5),'hidden':!![]},{'name':a216_0xc0d985(0x1aa),'meowKey':a216_0xc0d985(0x1aa),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1dc),'hidden':!![]},{'name':'from-env','meowKey':a216_0xc0d985(0x1eb),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x17b),'hidden':!![]},{'name':a216_0xc0d985(0x180),'meowKey':'reveal','type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x1a9),'hidden':!![]},{'name':a216_0xc0d985(0x172),'meowKey':a216_0xc0d985(0x172),'type':a216_0xc0d985(0x1cc),'description':'Force\x20overwrite','hidden':!![]},{'name':a216_0xc0d985(0x1c1),'meowKey':a216_0xc0d985(0x1c1),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x199),'hidden':!![]},{'name':a216_0xc0d985(0x18b),'meowKey':a216_0xc0d985(0x18b),'type':a216_0xc0d985(0x1cc),'description':'Use\x20remote','hidden':!![]},{'name':a216_0xc0d985(0x194),'meowKey':'verbose','type':'boolean','description':a216_0xc0d985(0x1dd),'hidden':!![]},{'name':'expected-count','meowKey':a216_0xc0d985(0x179),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1a0),'hidden':!![]},{'name':a216_0xc0d985(0x1ba),'meowKey':a216_0xc0d985(0x1ba),'type':'string','description':a216_0xc0d985(0x1ad),'hidden':!![]},{'name':a216_0xc0d985(0x195),'meowKey':a216_0xc0d985(0x177),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1e7),'hidden':!![]},{'name':a216_0xc0d985(0x1de),'meowKey':a216_0xc0d985(0x1de),'type':'string','description':a216_0xc0d985(0x1a3),'hidden':!![]},{'name':'expect-parent-id','meowKey':'expectParentId','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1ed),'hidden':!![]},{'name':a216_0xc0d985(0x1d8),'meowKey':a216_0xc0d985(0x174),'type':'string','description':a216_0xc0d985(0x19f),'hidden':!![]},{'name':'expected-children-count','meowKey':a216_0xc0d985(0x1e3),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1e2),'hidden':!![]},{'name':'menu-ids','meowKey':a216_0xc0d985(0x1e4),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1a6),'hidden':!![]},{'name':a216_0xc0d985(0x1f1),'meowKey':a216_0xc0d985(0x1d0),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1f9),'hidden':!![]},{'name':a216_0xc0d985(0x19b),'meowKey':a216_0xc0d985(0x193),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x1c9),'hidden':!![]},{'name':a216_0xc0d985(0x1e5),'meowKey':a216_0xc0d985(0x196),'type':a216_0xc0d985(0x1d5),'description':'Function\x20node','hidden':!![]},{'name':a216_0xc0d985(0x1f4),'meowKey':'targetEnv','type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x19c),'hidden':!![]},{'name':'direct','meowKey':a216_0xc0d985(0x1cd),'type':a216_0xc0d985(0x1cc),'description':a216_0xc0d985(0x198),'hidden':!![]},{'name':a216_0xc0d985(0x1b9),'meowKey':a216_0xc0d985(0x1b9),'type':a216_0xc0d985(0x1d5),'description':a216_0xc0d985(0x176),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a216_0xc0d985(0x183),a216_0xc0d985(0x17e),a216_0xc0d985(0x17d),a216_0xc0d985(0x1e1),'jq',a216_0xc0d985(0x17f),a216_0xc0d985(0x18e),a216_0xc0d985(0x1f8),'ci']);function a216_0x5b89(_0x45cda0,_0x540268){_0x45cda0=_0x45cda0-0x16f;const _0x103f2e=a216_0x103f();let _0x5b8928=_0x103f2e[_0x45cda0];return _0x5b8928;}export function buildMeowFlags(){const _0x2cad73=a216_0xc0d985;return Object[_0x2cad73(0x18f)](GLOBAL_FLAGS['map'](_0x46c130=>[_0x46c130[_0x2cad73(0x1e9)],{'type':_0x46c130[_0x2cad73(0x1b3)]}]));}
|
|
1
|
+
const a222_0x2d8722=a222_0x453c;function a222_0x393a(){const _0x160991=['pagesize','2ZriMhT','boolean','Menu\x20sort\x20value','Config\x20value','sort','767524gRYaPa','470LnZCTj','sql','DB\x20ID','codes','sqlcode','Use\x20the\x20base\x20database\x20connection','type','<expr>','operation-type','datasetcode','Page\x20number','Rabetbase\x20CLI','Function\x20node','Config\x20key','parent-id','Title','Schemas','Operation\x20type','code','project','format','json\x20|\x20pretty\x20|\x20compress','production\x20|\x20daily','force','remote','Tags','nonInteractive','Apply\x20to\x20all','Expected\x20current\x20menu\x20path','all','page','expectParentId','query','topk','Parent\x20menu\x20id','Reveal\x20sensitive\x20value','global','name','tags','watch','descriptionFile','SQL\x20string','Target\x20connection\x20environment','non-interactive','SQL\x20name','sql-name','dbid','Comma-separated\x20metadata\x20codes','10668UUxsUG','title','label','File\x20path','map','182736pEYenh','string','functionNode','Use\x20remote','key','targetEnv','<code>','Select\x20app\x20profile\x20by\x20name','Description\x20file','db-id','target','Watch\x20mode','direct','appcode','menu-ids','value','Show\x20help','Search\x20query','skip-imports','Read\x20value\x20from\x20stdin','help','enableBffSave','function-node','JSON\x20params','operation','output','40390350QfnCFt','expected-children-count','Name','dryRun','file','Type\x20filter','description-file','SQL\x20code','env','expectedChildrenCount','Keyword\x20filter','keyword','schemas','2053842HPcdxf','stdin','Expected\x20current\x20parent\x20menu\x20id','fromEnv','Description','operationType','Read\x20value\x20from\x20environment\x20variable','Enable\x20Backend\x20Function\x20save','parentId','yes','Code\x20filter','Dataset\x20code','expectPath','@lovrabet/rabetbase-cli','dry-run','verbose','reveal','5hAKoKV','target-env','task-id','Use\x20project\x20config\x20scope','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','clear','Expected\x20affected\x20count','taskId','344838bqcokq','app','16OSNadg','Confirm\x20destructive\x20action','Force\x20non-interactive\x20mode\x20(CI)','sqlName','expect-path','App\x20locale\x20(workspace\x20pass-through;\x20not\x20CLI\x20language)','params','Comma-separated\x20menu\x20IDs','Page\x20size','confirm','from-env','menuIds','sqlname','meowKey','1776453xtZNwZ','locale','Output\x20path','fromEntries','zh-CN\x20|\x20en-US','description'];a222_0x393a=function(){return _0x160991;};return a222_0x393a();}(function(_0x323740,_0x2362a1){const _0x3c551c=a222_0x453c,_0x2626fe=_0x323740();while(!![]){try{const _0x4ee162=-parseInt(_0x3c551c(0x15e))/0x1*(parseInt(_0x3c551c(0x159))/0x2)+-parseInt(_0x3c551c(0x129))/0x3+-parseInt(_0x3c551c(0x18f))/0x4+-parseInt(_0x3c551c(0x13a))/0x5*(parseInt(_0x3c551c(0x142))/0x6)+parseInt(_0x3c551c(0x152))/0x7*(-parseInt(_0x3c551c(0x144))/0x8)+-parseInt(_0x3c551c(0x194))/0x9*(parseInt(_0x3c551c(0x15f))/0xa)+parseInt(_0x3c551c(0x1ae))/0xb;if(_0x4ee162===_0x2362a1)break;else _0x2626fe['push'](_0x2626fe['shift']());}catch(_0x4eac15){_0x2626fe['push'](_0x2626fe['shift']());}}}(a222_0x393a,0xaa57e));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a222_0x2d8722(0x16a);export const NPM_PACKAGE_NAME=a222_0x2d8722(0x136);function a222_0x453c(_0x5d2b97,_0x4b3099){_0x5d2b97=_0x5d2b97-0x122;const _0x393a4a=a222_0x393a();let _0x453c30=_0x393a4a[_0x5d2b97];return _0x453c30;}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a222_0x2d8722(0x1a1),'type':a222_0x2d8722(0x195),'description':'Override\x20appcode','hint':a222_0x2d8722(0x19a)},{'name':a222_0x2d8722(0x143),'meowKey':a222_0x2d8722(0x143),'type':'string','description':a222_0x2d8722(0x19b),'hint':'<name>'},{'name':a222_0x2d8722(0x124),'meowKey':'env','type':a222_0x2d8722(0x195),'description':'Environment','hint':a222_0x2d8722(0x175)},{'name':a222_0x2d8722(0x173),'meowKey':'format','type':a222_0x2d8722(0x195),'description':'Output\x20format','hint':a222_0x2d8722(0x174)},{'name':'jq','meowKey':'jq','type':'string','description':a222_0x2d8722(0x13e),'hint':a222_0x2d8722(0x166)},{'name':a222_0x2d8722(0x137),'meowKey':a222_0x2d8722(0x1b1),'type':a222_0x2d8722(0x15a),'description':'Preview\x20operation\x20without\x20executing'},{'name':a222_0x2d8722(0x132),'meowKey':a222_0x2d8722(0x132),'type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a222_0x2d8722(0x18a),'meowKey':a222_0x2d8722(0x179),'type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x146)},{'name':a222_0x2d8722(0x183),'meowKey':a222_0x2d8722(0x183),'type':'boolean','description':'Use\x20global\x20config\x20scope'},{'name':a222_0x2d8722(0x172),'meowKey':'project','type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x13d)},{'name':'ci','meowKey':'ci','type':a222_0x2d8722(0x15a),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a222_0x2d8722(0x1a8),'meowKey':'help','type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x1a4)},{'name':'locale','meowKey':a222_0x2d8722(0x153),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x149),'hidden':!![],'hint':a222_0x2d8722(0x156)},{'name':a222_0x2d8722(0x184),'meowKey':a222_0x2d8722(0x184),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x1b0),'hidden':!![]},{'name':a222_0x2d8722(0x190),'meowKey':'title','type':'string','description':a222_0x2d8722(0x16e),'hidden':!![]},{'name':a222_0x2d8722(0x17f),'meowKey':a222_0x2d8722(0x17f),'type':'string','description':a222_0x2d8722(0x1a5),'hidden':!![]},{'name':a222_0x2d8722(0x180),'meowKey':a222_0x2d8722(0x180),'type':a222_0x2d8722(0x195),'description':'Maximum\x20search\x20hits','hidden':!![]},{'name':a222_0x2d8722(0x13f),'meowKey':a222_0x2d8722(0x13f),'type':'boolean','description':'Clear','hidden':!![]},{'name':'watch','meowKey':a222_0x2d8722(0x186),'type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x19f),'hidden':!![]},{'name':a222_0x2d8722(0x1ad),'meowKey':a222_0x2d8722(0x1ad),'type':'string','description':a222_0x2d8722(0x154),'hidden':!![]},{'name':'params','meowKey':a222_0x2d8722(0x14a),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x1ab),'hidden':!![]},{'name':a222_0x2d8722(0x168),'meowKey':'datasetcode','type':'string','description':a222_0x2d8722(0x134),'hidden':!![]},{'name':a222_0x2d8722(0x17c),'meowKey':a222_0x2d8722(0x17c),'type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x17a),'hidden':!![]},{'name':'enable-bff-save','meowKey':a222_0x2d8722(0x1a9),'type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x130),'hidden':!![]},{'name':'id','meowKey':'id','type':a222_0x2d8722(0x195),'description':'Record\x20ID','hidden':!![]},{'name':a222_0x2d8722(0x165),'meowKey':a222_0x2d8722(0x165),'type':'string','description':a222_0x2d8722(0x1b3),'hidden':!![]},{'name':a222_0x2d8722(0x1b2),'meowKey':a222_0x2d8722(0x1b2),'type':'string','description':a222_0x2d8722(0x192),'hidden':!![]},{'name':a222_0x2d8722(0x163),'meowKey':a222_0x2d8722(0x163),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x123),'hidden':!![]},{'name':a222_0x2d8722(0x18c),'meowKey':a222_0x2d8722(0x147),'type':'string','description':a222_0x2d8722(0x18b),'hidden':!![]},{'name':a222_0x2d8722(0x150),'meowKey':a222_0x2d8722(0x150),'type':'string','description':a222_0x2d8722(0x18b),'hidden':!![]},{'name':a222_0x2d8722(0x19d),'meowKey':'dbId','type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x161),'hidden':!![]},{'name':a222_0x2d8722(0x18d),'meowKey':a222_0x2d8722(0x18d),'type':'string','description':a222_0x2d8722(0x161),'hidden':!![]},{'name':a222_0x2d8722(0x157),'meowKey':a222_0x2d8722(0x157),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x12d),'hidden':!![]},{'name':a222_0x2d8722(0x122),'meowKey':a222_0x2d8722(0x187),'type':'string','description':a222_0x2d8722(0x19c),'hidden':!![]},{'name':a222_0x2d8722(0x17d),'meowKey':'page','type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x169),'hidden':!![]},{'name':a222_0x2d8722(0x158),'meowKey':'pagesize','type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x14c),'hidden':!![]},{'name':a222_0x2d8722(0x127),'meowKey':a222_0x2d8722(0x127),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x126),'hidden':!![]},{'name':a222_0x2d8722(0x171),'meowKey':a222_0x2d8722(0x171),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x133),'hidden':!![]},{'name':a222_0x2d8722(0x160),'meowKey':a222_0x2d8722(0x160),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x188),'hidden':!![]},{'name':a222_0x2d8722(0x128),'meowKey':'schemas','type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x16f),'hidden':!![]},{'name':'operation','meowKey':a222_0x2d8722(0x1ac),'type':'string','description':a222_0x2d8722(0x170),'hidden':!![]},{'name':a222_0x2d8722(0x19e),'meowKey':a222_0x2d8722(0x19e),'type':'string','description':'Target\x20path','hidden':!![]},{'name':a222_0x2d8722(0x1a6),'meowKey':'skipImports','type':'boolean','description':'Skip\x20import\x20generation','hidden':!![]},{'name':a222_0x2d8722(0x198),'meowKey':a222_0x2d8722(0x198),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x16c),'hidden':!![]},{'name':a222_0x2d8722(0x1a3),'meowKey':a222_0x2d8722(0x1a3),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x15c),'hidden':!![]},{'name':a222_0x2d8722(0x185),'meowKey':a222_0x2d8722(0x185),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x178),'hidden':!![]},{'name':a222_0x2d8722(0x12a),'meowKey':a222_0x2d8722(0x12a),'type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x1a7),'hidden':!![]},{'name':a222_0x2d8722(0x14e),'meowKey':a222_0x2d8722(0x12c),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x12f),'hidden':!![]},{'name':a222_0x2d8722(0x139),'meowKey':a222_0x2d8722(0x139),'type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x182),'hidden':!![]},{'name':a222_0x2d8722(0x176),'meowKey':a222_0x2d8722(0x176),'type':a222_0x2d8722(0x15a),'description':'Force\x20overwrite','hidden':!![]},{'name':'confirm','meowKey':a222_0x2d8722(0x14d),'type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x145),'hidden':!![]},{'name':a222_0x2d8722(0x177),'meowKey':a222_0x2d8722(0x177),'type':a222_0x2d8722(0x15a),'description':a222_0x2d8722(0x197),'hidden':!![]},{'name':a222_0x2d8722(0x138),'meowKey':'verbose','type':a222_0x2d8722(0x15a),'description':'Verbose\x20output','hidden':!![]},{'name':'expected-count','meowKey':'expectedCount','type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x140),'hidden':!![]},{'name':a222_0x2d8722(0x191),'meowKey':'label','type':a222_0x2d8722(0x195),'description':'Menu\x20label','hidden':!![]},{'name':a222_0x2d8722(0x16d),'meowKey':a222_0x2d8722(0x131),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x181),'hidden':!![]},{'name':a222_0x2d8722(0x15d),'meowKey':a222_0x2d8722(0x15d),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x15b),'hidden':!![]},{'name':'expect-parent-id','meowKey':a222_0x2d8722(0x17e),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x12b),'hidden':!![]},{'name':a222_0x2d8722(0x148),'meowKey':a222_0x2d8722(0x135),'type':'string','description':a222_0x2d8722(0x17b),'hidden':!![]},{'name':a222_0x2d8722(0x1af),'meowKey':a222_0x2d8722(0x125),'type':a222_0x2d8722(0x195),'description':'Expected\x20current\x20child\x20count','hidden':!![]},{'name':a222_0x2d8722(0x1a2),'meowKey':a222_0x2d8722(0x14f),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x14b),'hidden':!![]},{'name':a222_0x2d8722(0x13c),'meowKey':a222_0x2d8722(0x141),'type':'string','description':'Asynchronous\x20task\x20ID','hidden':!![]},{'name':a222_0x2d8722(0x167),'meowKey':a222_0x2d8722(0x12e),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x170),'hidden':!![]},{'name':a222_0x2d8722(0x1aa),'meowKey':a222_0x2d8722(0x196),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x16b),'hidden':!![]},{'name':a222_0x2d8722(0x13b),'meowKey':a222_0x2d8722(0x199),'type':a222_0x2d8722(0x195),'description':a222_0x2d8722(0x189),'hidden':!![]},{'name':a222_0x2d8722(0x1a0),'meowKey':a222_0x2d8722(0x1a0),'type':'boolean','description':a222_0x2d8722(0x164),'hidden':!![]},{'name':'codes','meowKey':a222_0x2d8722(0x162),'type':'string','description':a222_0x2d8722(0x18e),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a222_0x2d8722(0x1a1),a222_0x2d8722(0x143),'env',a222_0x2d8722(0x173),'jq',a222_0x2d8722(0x137),'yes',a222_0x2d8722(0x18a),'ci']);export function buildMeowFlags(){const _0x3ef87c=a222_0x2d8722;return Object[_0x3ef87c(0x155)](GLOBAL_FLAGS[_0x3ef87c(0x193)](_0x35c40b=>[_0x35c40b[_0x3ef87c(0x151)],{'type':_0x35c40b[_0x3ef87c(0x165)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a223_0x2a2aa0=a223_0x4ed0;(function(_0x1b6d89,_0x5c936c){const _0x23dc9e=a223_0x4ed0,_0x5911fe=_0x1b6d89();while(!![]){try{const _0x11687c=parseInt(_0x23dc9e(0x110))/0x1*(-parseInt(_0x23dc9e(0x11a))/0x2)+-parseInt(_0x23dc9e(0x114))/0x3*(parseInt(_0x23dc9e(0x112))/0x4)+parseInt(_0x23dc9e(0x119))/0x5+parseInt(_0x23dc9e(0x117))/0x6+-parseInt(_0x23dc9e(0x111))/0x7*(parseInt(_0x23dc9e(0x118))/0x8)+-parseInt(_0x23dc9e(0x10f))/0x9*(-parseInt(_0x23dc9e(0x11b))/0xa)+parseInt(_0x23dc9e(0x10e))/0xb;if(_0x11687c===_0x5c936c)break;else _0x5911fe['push'](_0x5911fe['shift']());}catch(_0x11cbc7){_0x5911fe['push'](_0x5911fe['shift']());}}}(a223_0x3c46,0x59af7));function a223_0x4ed0(_0x108e2d,_0x457d96){_0x108e2d=_0x108e2d-0x10e;const _0x3c4613=a223_0x3c46();let _0x4ed069=_0x3c4613[_0x108e2d];return _0x4ed069;}function a223_0x3c46(){const _0x206005=['9784786ZCaabG','9YXViAh','1WvcLyR','4274627dWnRhn','796GnWiEH','production','8571aJchTZ','compress','en-US','1149360zfUpTb','8gSqDgd','2719880DsNJNF','1334734uLAZQF','5888600cxkgNd'];a223_0x3c46=function(){return _0x206005;};return a223_0x3c46();}import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a223_0x2a2aa0(0x113),'format':a223_0x2a2aa0(0x115),'locale':a223_0x2a2aa0(0x116),'riskLevel':'write','apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a223_0x2a2aa0(0x115);
|
package/lib/constant/domain.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ export declare function initDomains(domains?: {
|
|
|
12
12
|
appDomain?: string;
|
|
13
13
|
localDomain?: string;
|
|
14
14
|
certificateDomain?: string;
|
|
15
|
+
cdn?: {
|
|
16
|
+
libraries: string;
|
|
17
|
+
lovrabet: string;
|
|
18
|
+
};
|
|
15
19
|
region?: LovrabetRegion;
|
|
16
20
|
}): void;
|
|
17
21
|
export declare const getUserDomain: () => string;
|
|
@@ -23,17 +27,19 @@ export declare const getAppDomain: () => string;
|
|
|
23
27
|
export declare const getActiveRegion: () => "global" | "id" | "cn";
|
|
24
28
|
export declare const getLocalDomain: () => string | undefined;
|
|
25
29
|
export declare const getCertificateDomain: () => string | undefined;
|
|
30
|
+
export declare const getActiveCdn: () => {
|
|
31
|
+
libraries: string;
|
|
32
|
+
lovrabet: string;
|
|
33
|
+
};
|
|
26
34
|
export declare function isIndependentDeployment(): boolean;
|
|
27
35
|
/**
|
|
28
36
|
* 生成到浏览器项目中的 SDK 路由白名单。
|
|
29
37
|
*
|
|
30
38
|
* - 企业独立部署只下发显式 runtimeDomain;
|
|
31
|
-
* -
|
|
32
|
-
* -
|
|
33
|
-
* - Global 在 SDK 原生支持前下发当前完整地址。
|
|
39
|
+
* - 默认节点由 SDK 默认路由解析,无需写入生成文件;
|
|
40
|
+
* - 其他官方节点统一下发最终 runtimeDomain,不增加节点特例。
|
|
34
41
|
*/
|
|
35
42
|
export declare function getSdkClientRoutingConfig(): {
|
|
36
|
-
region?: "id";
|
|
37
43
|
runtimeDomain?: string;
|
|
38
44
|
};
|
|
39
45
|
export declare const getAppBaseUrl: (appCode: string) => string;
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a224_0x49b7e7=a224_0x1bd0;(function(_0x360e0b,_0x5874fa){const _0x5c49c8=a224_0x1bd0,_0x59994c=_0x360e0b();while(!![]){try{const _0xd20c1a=-parseInt(_0x5c49c8(0x73))/0x1+parseInt(_0x5c49c8(0x70))/0x2*(parseInt(_0x5c49c8(0x7b))/0x3)+parseInt(_0x5c49c8(0x77))/0x4*(parseInt(_0x5c49c8(0x74))/0x5)+parseInt(_0x5c49c8(0x6b))/0x6*(-parseInt(_0x5c49c8(0x7a))/0x7)+parseInt(_0x5c49c8(0x6a))/0x8+parseInt(_0x5c49c8(0x86))/0x9*(-parseInt(_0x5c49c8(0x7d))/0xa)+-parseInt(_0x5c49c8(0x81))/0xb;if(_0xd20c1a===_0x5874fa)break;else _0x59994c['push'](_0x59994c['shift']());}catch(_0xad7a95){_0x59994c['push'](_0x59994c['shift']());}}}(a224_0xfe80,0x77285));function a224_0xfe80(){const _0x2a6286=['93TlaJWc','cdn','11290nFybdv','kbDomain','userDomain','runtime','5875683qOQWdb','hostname','localDomain','user','serviceDomains','207wtWkTT','origin','daily','apiDomain','runtimeDomain','2486640RecQXk','42EqSjQP','skillDomain','api','trim','/web-app/app/','62294rGiuvU','app','certificateDomain','306780vflDdS','3065QjsoJz','appDomain','/app/','756HpPOfA','production','skill','37275OMDqbc'];a224_0xfe80=function(){return _0x2a6286;};return a224_0xfe80();}import{getEnv,isProduction}from'../constant/env.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbDomain,customAppDomain,customLocalDomain,customCertificateDomain,customCdn,activeRegion=DEFAULT_LOVRABET_REGION;function getActiveRegionDomains(){const _0x359487=a224_0x1bd0,_0x5ed6a6=getOfficialRoutingProfile(activeRegion);return isProduction(getEnv())?_0x5ed6a6['serviceDomains'][_0x359487(0x78)]:_0x5ed6a6[_0x359487(0x85)][_0x359487(0x67)]??_0x5ed6a6[_0x359487(0x85)][_0x359487(0x78)];}export function initDomains(_0x4554bb){const _0x485188=a224_0x1bd0;customApiDomain=_0x4554bb?.[_0x485188(0x68)],customUserDomain=_0x4554bb?.[_0x485188(0x7f)],customRuntimeDomain=_0x4554bb?.[_0x485188(0x69)],customSkillDomain=_0x4554bb?.[_0x485188(0x6c)],customKbDomain=_0x4554bb?.[_0x485188(0x7e)],customAppDomain=_0x4554bb?.[_0x485188(0x75)],customLocalDomain=_0x4554bb?.[_0x485188(0x83)],customCertificateDomain=_0x4554bb?.[_0x485188(0x72)],customCdn=_0x4554bb?.[_0x485188(0x7c)],activeRegion=_0x4554bb?.['region']??DEFAULT_LOVRABET_REGION;}export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a224_0x49b7e7(0x84)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a224_0x49b7e7(0x6d)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()['runtime'];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a224_0x49b7e7(0x79)];export const getKbDomain=()=>customKbDomain||customApiDomain||getActiveRegionDomains()['kb'];export const getAppDomain=()=>customAppDomain||getActiveRegionDomains()[a224_0x49b7e7(0x71)];export const getActiveRegion=()=>activeRegion;function a224_0x1bd0(_0x20120e,_0x2c8a6e){_0x20120e=_0x20120e-0x67;const _0xfe8012=a224_0xfe80();let _0x1bd04f=_0xfe8012[_0x20120e];return _0x1bd04f;}export const getLocalDomain=()=>customLocalDomain;export const getCertificateDomain=()=>customCertificateDomain;export const getActiveCdn=()=>customCdn||getOfficialRoutingCdn(activeRegion);export function isIndependentDeployment(){return!!(customApiDomain||customUserDomain||customRuntimeDomain||customSkillDomain||customKbDomain||customAppDomain||customLocalDomain||customCertificateDomain);}export function getSdkClientRoutingConfig(){const _0x28b886=a224_0x49b7e7;if(customRuntimeDomain&&customRuntimeDomain!==getActiveRegionDomains()[_0x28b886(0x80)])return{'runtimeDomain':customRuntimeDomain};if(activeRegion!==DEFAULT_LOVRABET_REGION)return{'runtimeDomain':getRuntimeDomain()};return{};}export const getAppBaseUrl=_0x2110b1=>{const _0x4133b4=a224_0x49b7e7,_0x46e7a0=encodeURIComponent(_0x2110b1[_0x4133b4(0x6e)]());return isProduction(getEnv())?getAppDomain()+_0x4133b4(0x76)+_0x46e7a0:getAppDomain()+_0x4133b4(0x6f)+_0x46e7a0;};export const getPublishedAppDomain=_0x74684d=>{const _0x237cec=a224_0x49b7e7,_0x176dc5=new URL(getAppDomain());return _0x176dc5[_0x237cec(0x82)]=_0x74684d['trim']()+'.'+_0x176dc5[_0x237cec(0x82)],_0x176dc5[_0x237cec(0x87)];};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a225_0x560cc3=a225_0x40a1;function a225_0x40a1(_0x31e217,_0xc66f5b){_0x31e217=_0x31e217-0x1de;const _0x332f45=a225_0x332f();let _0x40a1c3=_0x332f45[_0x31e217];return _0x40a1c3;}(function(_0x12dd57,_0x5b76b0){const _0x463315=a225_0x40a1,_0x29013c=_0x12dd57();while(!![]){try{const _0x21f94f=parseInt(_0x463315(0x1ea))/0x1+parseInt(_0x463315(0x1e1))/0x2+-parseInt(_0x463315(0x1eb))/0x3*(-parseInt(_0x463315(0x1de))/0x4)+parseInt(_0x463315(0x1e0))/0x5+-parseInt(_0x463315(0x1e4))/0x6*(parseInt(_0x463315(0x1e5))/0x7)+parseInt(_0x463315(0x1e7))/0x8+-parseInt(_0x463315(0x1df))/0x9*(parseInt(_0x463315(0x1e2))/0xa);if(_0x21f94f===_0x5b76b0)break;else _0x29013c['push'](_0x29013c['shift']());}catch(_0x5c214f){_0x29013c['push'](_0x29013c['shift']());}}}(a225_0x332f,0x9c805));function a225_0x332f(){const _0x40c3ff=['online','development','485498JJljlP','76572DlqnIq','36rzwaPO','27Vllrsh','4278590Kwkqbc','1438566GHmgMt','6604680ZAGUfk','dev','4036254IcopLb','7YzxYXo','daily','8039416CydxnQ'];a225_0x332f=function(){return _0x40c3ff;};return a225_0x332f();}export const RABETBASE_ENV_VALUES=['production',a225_0x560cc3(0x1e6)];export function normalizeEnv(_0x1b8e02){const _0x13adde=a225_0x560cc3;return _0x1b8e02===_0x13adde(0x1e8)?'production':_0x1b8e02;}export function isProduction(_0x306b65){return normalizeEnv(_0x306b65)==='production';}export function isDaily(_0x7ebf32){const _0x507d35=a225_0x560cc3;return normalizeEnv(_0x7ebf32)===_0x507d35(0x1e6);}export function isDev(_0x345837){const _0x31307f=a225_0x560cc3,_0x9cfca4=normalizeEnv(_0x345837);return _0x9cfca4===_0x31307f(0x1e9)||_0x9cfca4===_0x31307f(0x1e3);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0xff6315){env=normalizeEnv(_0xff6315);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a226_0x43bd0a=a226_0x3794;function a226_0x3794(_0x5a7fa1,_0xa0b7d1){_0x5a7fa1=_0x5a7fa1-0x1b5;const _0x550cbe=a226_0x550c();let _0x379468=_0x550cbe[_0x5a7fa1];return _0x379468;}(function(_0xfba1c8,_0x19ea1a){const _0x53c080=a226_0x3794,_0x5cc41f=_0xfba1c8();while(!![]){try{const _0x923339=-parseInt(_0x53c080(0x1c0))/0x1*(-parseInt(_0x53c080(0x1bf))/0x2)+-parseInt(_0x53c080(0x1b5))/0x3*(parseInt(_0x53c080(0x1b9))/0x4)+parseInt(_0x53c080(0x1ba))/0x5*(-parseInt(_0x53c080(0x1be))/0x6)+parseInt(_0x53c080(0x1c1))/0x7+parseInt(_0x53c080(0x1bb))/0x8+parseInt(_0x53c080(0x1bd))/0x9*(parseInt(_0x53c080(0x1c2))/0xa)+-parseInt(_0x53c080(0x1b7))/0xb*(parseInt(_0x53c080(0x1b6))/0xc);if(_0x923339===_0x19ea1a)break;else _0x5cc41f['push'](_0x5cc41f['shift']());}catch(_0x4651b7){_0x5cc41f['push'](_0x5cc41f['shift']());}}}(a226_0x550c,0xd449a));function a226_0x550c(){const _0x4be654=['pretty','369dZUnWE','6yxENuJ','826466msyKXr','3piGGVP','7818867CSTMWd','248590SrySdg','605541UZbpEd','1141644FbKYNS','242NBMXWv','json','12nvlzHB','5179305yXxwuh','9824376mtigyT'];a226_0x550c=function(){return _0x4be654;};return a226_0x550c();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a226_0x43bd0a(0x1b8),a226_0x43bd0a(0x1bc),'compress'];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5ac086,_0x39522c){const _0x4b1786=a227_0x5464,_0x1d556d=_0x5ac086();while(!![]){try{const _0x2f9714=parseInt(_0x4b1786(0x163))/0x1*(-parseInt(_0x4b1786(0x161))/0x2)+parseInt(_0x4b1786(0x167))/0x3*(parseInt(_0x4b1786(0x16a))/0x4)+parseInt(_0x4b1786(0x165))/0x5+parseInt(_0x4b1786(0x16b))/0x6+parseInt(_0x4b1786(0x168))/0x7*(-parseInt(_0x4b1786(0x164))/0x8)+parseInt(_0x4b1786(0x162))/0x9*(-parseInt(_0x4b1786(0x169))/0xa)+parseInt(_0x4b1786(0x166))/0xb;if(_0x2f9714===_0x39522c)break;else _0x1d556d['push'](_0x1d556d['shift']());}catch(_0x1cba1e){_0x1d556d['push'](_0x1d556d['shift']());}}}(a227_0x5c27,0xaed75));export const DEFAULT_API_DIR='./src/api';function a227_0x5464(_0x596e83,_0x55e74f){_0x596e83=_0x596e83-0x161;const _0x5c27c1=a227_0x5c27();let _0x5464a5=_0x5c27c1[_0x596e83];return _0x5464a5;}function a227_0x5c27(){const _0x4e2be2=['175127ADLfIr','7597592hhOrIO','6016850pajgZX','1958583bHLcqI','792xofsro','7UrPNyK','79270aLbBJv','5276EncnOy','3474174Zlvaxn','2hGDDPG','531YwXCCP'];a227_0x5c27=function(){return _0x4e2be2;};return a227_0x5c27();}
|
package/lib/constant/region.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Every official routing profile known to this CLI, including reserved profiles. */
|
|
1
2
|
export declare const LOVRABET_REGION_VALUES: readonly ["cn", "id", "global"];
|
|
2
3
|
/** Regions currently available for new CLI configuration. */
|
|
3
4
|
export declare const ENABLED_LOVRABET_REGION_VALUES: readonly ["cn", "id"];
|
|
@@ -6,4 +7,6 @@ export declare const DEFAULT_LOVRABET_REGION: LovrabetRegion;
|
|
|
6
7
|
export declare function isLovrabetRegion(value: unknown): value is LovrabetRegion;
|
|
7
8
|
export declare function isEnabledLovrabetRegion(value: unknown): value is LovrabetRegion;
|
|
8
9
|
/** Keeps legacy long names readable; new writes use canonical short values. */
|
|
9
|
-
export declare function normalizeLovrabetRegion(value: unknown): LovrabetRegion;
|
|
10
|
+
export declare function normalizeLovrabetRegion(value: unknown): LovrabetRegion | undefined;
|
|
11
|
+
/** Missing values use the default profile; explicit unknown values are invalid. */
|
|
12
|
+
export declare function isInvalidLovrabetRegion(value: unknown): boolean;
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2dce58,_0x9b7247){const _0x540655=a228_0x4110,_0x2d9652=_0x2dce58();while(!![]){try{const _0x31f67f=parseInt(_0x540655(0x1f3))/0x1+parseInt(_0x540655(0x1f2))/0x2+-parseInt(_0x540655(0x1fc))/0x3*(parseInt(_0x540655(0x1f6))/0x4)+-parseInt(_0x540655(0x1f4))/0x5*(parseInt(_0x540655(0x1f9))/0x6)+parseInt(_0x540655(0x1f7))/0x7+parseInt(_0x540655(0x1f1))/0x8*(-parseInt(_0x540655(0x1fa))/0x9)+-parseInt(_0x540655(0x1fb))/0xa;if(_0x31f67f===_0x9b7247)break;else _0x2d9652['push'](_0x2d9652['shift']());}catch(_0x3f29af){_0x2d9652['push'](_0x2d9652['shift']());}}}(a228_0x5ca8,0x7a63f));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';export const LOVRABET_REGION_VALUES=REGION_VALUES;function a228_0x5ca8(){const _0x2046b9=['4HqcBPT','6092373qGlrWS','string','594pZNUll','333hwzCqL','714900oCpuiB','133023lmusVW','159992ODbfKf','1243516IVUSUw','795014czxuyM','46970YKMFRn','includes'];a228_0x5ca8=function(){return _0x2046b9;};return a228_0x5ca8();}export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;function a228_0x4110(_0x44ff85,_0x4b4af4){_0x44ff85=_0x44ff85-0x1f1;const _0x5ca89e=a228_0x5ca8();let _0x4110d7=_0x5ca89e[_0x44ff85];return _0x4110d7;}export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x35481f){const _0x1e840c=a228_0x4110;return typeof _0x35481f===_0x1e840c(0x1f8)&&LOVRABET_REGION_VALUES[_0x1e840c(0x1f5)](_0x35481f);}export function isEnabledLovrabetRegion(_0xfd3dc8){const _0x4b7761=a228_0x4110;return typeof _0xfd3dc8===_0x4b7761(0x1f8)&&ENABLED_LOVRABET_REGION_VALUES[_0x4b7761(0x1f5)](_0xfd3dc8);}export function normalizeLovrabetRegion(_0x583dbf){if(typeof _0x583dbf!=='string')return undefined;const _0x4c7c57=REGION_ALIASES[_0x583dbf]??_0x583dbf;return isLovrabetRegion(_0x4c7c57)?_0x4c7c57:undefined;}export function isInvalidLovrabetRegion(_0x52c955){return _0x52c955!==undefined&&_0x52c955!==null&&_0x52c955!==''&&normalizeLovrabetRegion(_0x52c955)===undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a229_0x54c82f=a229_0x5980;(function(_0x2b444b,_0x272e40){const _0x4a9f09=a229_0x5980,_0xa7ceaf=_0x2b444b();while(!![]){try{const _0xedb322=-parseInt(_0x4a9f09(0xb7))/0x1+-parseInt(_0x4a9f09(0xba))/0x2*(parseInt(_0x4a9f09(0xb2))/0x3)+parseInt(_0x4a9f09(0xb5))/0x4*(parseInt(_0x4a9f09(0xb8))/0x5)+parseInt(_0x4a9f09(0xb3))/0x6+parseInt(_0x4a9f09(0xbc))/0x7+-parseInt(_0x4a9f09(0xbd))/0x8*(-parseInt(_0x4a9f09(0xb6))/0x9)+parseInt(_0x4a9f09(0xb4))/0xa;if(_0xedb322===_0x272e40)break;else _0xa7ceaf['push'](_0xa7ceaf['shift']());}catch(_0x98dceb){_0xa7ceaf['push'](_0xa7ceaf['shift']());}}}(a229_0x5f4e,0x304a6));function a229_0x5980(_0x3e48f9,_0x1bf5bb){_0x3e48f9=_0x3e48f9-0xb2;const _0x5f4e9d=a229_0x5f4e();let _0x5980f5=_0x5f4e9d[_0x3e48f9];return _0x5980f5;}export const RISK_LEVEL_VALUES=['read',a229_0x54c82f(0xbb),a229_0x54c82f(0xb9)];function a229_0x5f4e(){const _0x3113b6=['1500422RLkoeu','8RNgpjI','240RNXgbt','1093434HLSUDu','564070PyBmyZ','4QUnmaj','315963nWttBD','127236cLUwTm','787875jnwKoT','high-risk-write','8016peCzpq','write'];a229_0x5f4e=function(){return _0x3113b6;};return a229_0x5f4e();}
|
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
import type { LovrabetRegion } from "../constant/region.js";
|
|
2
|
+
import { ROUTING_CATALOG_DIGEST } from "../generated/official-routing.js";
|
|
2
3
|
export interface LovrabetServiceDomains {
|
|
3
|
-
user: string;
|
|
4
|
-
api: string;
|
|
5
|
-
runtime: string;
|
|
6
|
-
skill: string;
|
|
7
|
-
kb: string;
|
|
8
|
-
app: string;
|
|
4
|
+
readonly user: string;
|
|
5
|
+
readonly api: string;
|
|
6
|
+
readonly runtime: string;
|
|
7
|
+
readonly skill: string;
|
|
8
|
+
readonly kb: string;
|
|
9
|
+
readonly app: string;
|
|
9
10
|
}
|
|
10
11
|
export interface OfficialRoutingProfile {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
readonly enabled: boolean;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
readonly aliases: readonly string[];
|
|
15
|
+
readonly serviceDomains: {
|
|
16
|
+
readonly production: LovrabetServiceDomains;
|
|
17
|
+
readonly daily?: LovrabetServiceDomains;
|
|
15
18
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
readonly cdn: {
|
|
20
|
+
readonly libraries: string;
|
|
21
|
+
readonly lovrabet?: string;
|
|
19
22
|
};
|
|
20
|
-
local: {
|
|
21
|
-
origin: string;
|
|
22
|
-
certificateUrl: string;
|
|
23
|
+
readonly local: {
|
|
24
|
+
readonly origin: string;
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
|
-
/**
|
|
27
|
+
/** Generated projection of the canonical official routing catalog. */
|
|
26
28
|
export declare const OFFICIAL_ROUTING_PROFILES: {
|
|
27
29
|
readonly cn: {
|
|
30
|
+
readonly enabled: true;
|
|
28
31
|
readonly label: "Mainland China";
|
|
32
|
+
readonly aliases: readonly ["china"];
|
|
29
33
|
readonly serviceDomains: {
|
|
30
|
-
readonly
|
|
34
|
+
readonly production: {
|
|
31
35
|
readonly user: "https://user.lovrabet.com";
|
|
32
36
|
readonly api: "https://api.lovrabet.com";
|
|
33
37
|
readonly runtime: "https://runtime.lovrabet.com";
|
|
@@ -35,7 +39,7 @@ export declare const OFFICIAL_ROUTING_PROFILES: {
|
|
|
35
39
|
readonly kb: "https://api.lovrabet.com";
|
|
36
40
|
readonly app: "https://app.lovrabet.com";
|
|
37
41
|
};
|
|
38
|
-
readonly
|
|
42
|
+
readonly daily: {
|
|
39
43
|
readonly user: "https://user-daily.lovrabet.com";
|
|
40
44
|
readonly api: "https://daily-api.lovrabet.com";
|
|
41
45
|
readonly runtime: "https://daily-runtime.lovrabet.com";
|
|
@@ -44,19 +48,20 @@ export declare const OFFICIAL_ROUTING_PROFILES: {
|
|
|
44
48
|
readonly app: "https://daily.lovrabet.com";
|
|
45
49
|
};
|
|
46
50
|
};
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
51
|
+
readonly cdn: {
|
|
52
|
+
readonly libraries: "https://g.alicdn.com/code/lib";
|
|
53
|
+
readonly lovrabet: "https://g.lovrabet.com";
|
|
50
54
|
};
|
|
51
55
|
readonly local: {
|
|
52
56
|
readonly origin: "https://dev.lovrabet.com";
|
|
53
|
-
readonly certificateUrl: "https://g.lovrabet.com/cert/lovrabet-dev.json";
|
|
54
57
|
};
|
|
55
58
|
};
|
|
56
59
|
readonly id: {
|
|
60
|
+
readonly enabled: true;
|
|
57
61
|
readonly label: "Indonesia";
|
|
62
|
+
readonly aliases: readonly ["indonesia"];
|
|
58
63
|
readonly serviceDomains: {
|
|
59
|
-
readonly
|
|
64
|
+
readonly production: {
|
|
60
65
|
readonly user: "https://user.lovrabet.id";
|
|
61
66
|
readonly api: "https://api.lovrabet.id";
|
|
62
67
|
readonly runtime: "https://runtime.lovrabet.id";
|
|
@@ -64,28 +69,21 @@ export declare const OFFICIAL_ROUTING_PROFILES: {
|
|
|
64
69
|
readonly kb: "https://api.lovrabet.id";
|
|
65
70
|
readonly app: "https://app.lovrabet.id";
|
|
66
71
|
};
|
|
67
|
-
readonly preview: {
|
|
68
|
-
readonly user: "https://user-daily.lovrabet.id";
|
|
69
|
-
readonly api: "https://daily-api.lovrabet.id";
|
|
70
|
-
readonly runtime: "https://daily-runtime.lovrabet.id";
|
|
71
|
-
readonly skill: "https://skills-daily.lovrabet.id";
|
|
72
|
-
readonly kb: "https://daily-api.lovrabet.id";
|
|
73
|
-
readonly app: "https://daily.lovrabet.id";
|
|
74
|
-
};
|
|
75
72
|
};
|
|
76
|
-
readonly
|
|
77
|
-
readonly
|
|
78
|
-
readonly
|
|
73
|
+
readonly cdn: {
|
|
74
|
+
readonly libraries: "https://cdnjs.cloudflare.com/ajax/libs";
|
|
75
|
+
readonly lovrabet: "https://g.lovrabet.id";
|
|
79
76
|
};
|
|
80
77
|
readonly local: {
|
|
81
78
|
readonly origin: "https://dev.lovrabet.id";
|
|
82
|
-
readonly certificateUrl: "https://g.lovrabet.id/cert/lovrabet-dev.json";
|
|
83
79
|
};
|
|
84
80
|
};
|
|
85
81
|
readonly global: {
|
|
82
|
+
readonly enabled: false;
|
|
86
83
|
readonly label: "Global";
|
|
84
|
+
readonly aliases: readonly [];
|
|
87
85
|
readonly serviceDomains: {
|
|
88
|
-
readonly
|
|
86
|
+
readonly production: {
|
|
89
87
|
readonly user: "https://user.lovrabet.ai";
|
|
90
88
|
readonly api: "https://api.lovrabet.ai";
|
|
91
89
|
readonly runtime: "https://runtime.lovrabet.ai";
|
|
@@ -93,23 +91,19 @@ export declare const OFFICIAL_ROUTING_PROFILES: {
|
|
|
93
91
|
readonly kb: "https://api.lovrabet.ai";
|
|
94
92
|
readonly app: "https://app.lovrabet.ai";
|
|
95
93
|
};
|
|
96
|
-
readonly preview: {
|
|
97
|
-
readonly user: "https://user-daily.lovrabet.ai";
|
|
98
|
-
readonly api: "https://daily-api.lovrabet.ai";
|
|
99
|
-
readonly runtime: "https://daily-runtime.lovrabet.ai";
|
|
100
|
-
readonly skill: "https://skills-daily.lovrabet.ai";
|
|
101
|
-
readonly kb: "https://daily-api.lovrabet.ai";
|
|
102
|
-
readonly app: "https://daily.lovrabet.ai";
|
|
103
|
-
};
|
|
104
94
|
};
|
|
105
|
-
readonly
|
|
106
|
-
readonly
|
|
107
|
-
readonly origin: "https://g.alicdn.com";
|
|
95
|
+
readonly cdn: {
|
|
96
|
+
readonly libraries: "https://cdnjs.cloudflare.com/ajax/libs";
|
|
108
97
|
};
|
|
109
98
|
readonly local: {
|
|
110
99
|
readonly origin: "https://dev.lovrabet.ai";
|
|
111
|
-
readonly certificateUrl: "https://g.lovrabet.ai/cert/lovrabet-dev.json";
|
|
112
100
|
};
|
|
113
101
|
};
|
|
114
102
|
};
|
|
103
|
+
export { ROUTING_CATALOG_DIGEST };
|
|
115
104
|
export declare function getOfficialRoutingProfile(region: LovrabetRegion): OfficialRoutingProfile;
|
|
105
|
+
/** Returns the complete CDN route required by an available official region. */
|
|
106
|
+
export declare function getOfficialRoutingCdn(region: LovrabetRegion): {
|
|
107
|
+
libraries: string;
|
|
108
|
+
lovrabet: string;
|
|
109
|
+
};
|