@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -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.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.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/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/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.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.js +1 -1
- 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.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- 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/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- 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.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.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +6 -0
- 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 +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -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/instant-api-policy/config.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/page/lr-smart-jsx.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- 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/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/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 +1 -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.d.ts +2 -8
- 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.d.ts +2 -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 +1 -1
- package/skills/rabetbase/SKILL.md +6 -5
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/generate-api/client.ts.tpl +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a216_0x4ff32a=a216_0x250d;function a216_0x250d(_0x1b16ed,_0x2582ff){_0x1b16ed=_0x1b16ed-0x6d;const _0x391c1b=a216_0x391c();let _0x250d14=_0x391c1b[_0x1b16ed];return _0x250d14;}(function(_0x248243,_0x2ecc70){const _0x7025b2=a216_0x250d,_0x32cc1b=_0x248243();while(!![]){try{const _0xbd4c80=parseInt(_0x7025b2(0x92))/0x1*(parseInt(_0x7025b2(0x97))/0x2)+parseInt(_0x7025b2(0x72))/0x3*(-parseInt(_0x7025b2(0x6d))/0x4)+-parseInt(_0x7025b2(0x78))/0x5*(-parseInt(_0x7025b2(0x6f))/0x6)+parseInt(_0x7025b2(0xa9))/0x7+parseInt(_0x7025b2(0x83))/0x8*(-parseInt(_0x7025b2(0x86))/0x9)+parseInt(_0x7025b2(0x8a))/0xa*(parseInt(_0x7025b2(0x7b))/0xb)+parseInt(_0x7025b2(0x90))/0xc*(parseInt(_0x7025b2(0xab))/0xd);if(_0xbd4c80===_0x2ecc70)break;else _0x32cc1b['push'](_0x32cc1b['shift']());}catch(_0x5de944){_0x32cc1b['push'](_0x32cc1b['shift']());}}}(a216_0x391c,0x3078c));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';function a216_0x391c(){const _0x363a3a=['bool','validation','trim','660JNpllx','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','\x22\x20not\x20found\x20in\x20any\x20dataset','type','read','valid','11844vZbgIf','columns','111811QibuHE','Dataset\x20\x22','sqlType','validate','dbtableConfig','2GQFymq','isArray','filter','dataset','name','find','columnNames','parameters','toLowerCase','check-indexes','indexName','fields','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','push','tableName','flatMap','indexes','tables','368809GAoOwF','str','4745EuAzWd','--check-indexes\x20requires\x20--schemas.','flagMissing','split','get','unshift','reason','appCode','357288Wuxpdy','pkField','269538wKmJAa','index_name','sql','9eoQBpU','from','Table\x20\x22','string','message','size','5TRKLnp','length','Provide\x20--file\x20or\x20--sql','46673BNZtXF','utf-8','schema:','\x22\x20not\x20found\x20or\x20not\x20accessible','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','isDangerous','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','file','54744NJjNWM','isSelectOnly','map','504lDzGFm'];a216_0x391c=function(){return _0x363a3a;};return a216_0x391c();}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a216_0x4ff32a(0x71),'command':a216_0x4ff32a(0x95),'description':a216_0x4ff32a(0xa3),'risk':a216_0x4ff32a(0x8e),'flags':[{'name':a216_0x4ff32a(0x82),'type':a216_0x4ff32a(0x75),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a216_0x4ff32a(0x71),'type':a216_0x4ff32a(0x75),'description':a216_0x4ff32a(0x7f)},{'name':'schemas','type':'string','description':a216_0x4ff32a(0x8b)},{'name':a216_0x4ff32a(0xa0),'type':'boolean','description':a216_0x4ff32a(0x81)}],async 'execute'(_0xe82334){const _0x215afb=a216_0x4ff32a,_0x1c6d6b=_0xe82334[_0x215afb(0xaa)]('file'),_0x290d86=_0xe82334[_0x215afb(0xaa)](_0x215afb(0x71)),_0x1bb209=_0xe82334[_0x215afb(0xaa)]('schemas'),_0x576759=_0xe82334[_0x215afb(0x87)]('check-indexes');if(!_0x1c6d6b&&!_0x290d86)throw CliErrors[_0x215afb(0xad)]('file',_0x215afb(0x7a));if(_0x576759&&!_0x1bb209)throw CliErrors['validation'](_0x215afb(0xac));let _0x264901;if(_0x1c6d6b){const _0x3f4bfb=resolve(process['cwd'](),_0x1c6d6b);if(!existsSync(_0x3f4bfb))throw CliErrors[_0x215afb(0x88)]('File\x20not\x20found:\x20'+_0x3f4bfb);_0x264901=readFileSync(_0x3f4bfb,_0x215afb(0x7c));}else _0x264901=_0x290d86;const _0x92ac9e=validateSql(_0x264901),_0x46e684={'valid':_0x92ac9e[_0x215afb(0x8f)],'sqlType':_0x92ac9e[_0x215afb(0x94)][_0x215afb(0x8d)],'isSelectOnly':_0x92ac9e[_0x215afb(0x94)][_0x215afb(0x84)],'isDangerous':_0x92ac9e['sqlType'][_0x215afb(0x80)],'tables':_0x92ac9e[_0x215afb(0xa8)],'parameters':_0x92ac9e[_0x215afb(0x9e)],'message':_0x92ac9e[_0x215afb(0x76)]};_0x92ac9e[_0x215afb(0x94)][_0x215afb(0xb1)]&&(_0x46e684[_0x215afb(0xb1)]=_0x92ac9e[_0x215afb(0x94)][_0x215afb(0xb1)]);if(_0x1bb209&&_0x92ac9e[_0x215afb(0x8f)]){const _0x54bed3=_0x1bb209[_0x215afb(0xae)](',')[_0x215afb(0x85)](_0x113dad=>_0x113dad[_0x215afb(0x89)]())[_0x215afb(0x99)](Boolean),_0x1897b6=[],_0x3ee826=[],_0xc83c1f=filterDbTableBackedDatasets(await listDatasets(_0xe82334[_0x215afb(0xb2)])),_0x242fee=new Map(_0xc83c1f[_0x215afb(0x85)](_0x479649=>[_0x479649['dbtableConfig']?.['tableName']?.[_0x215afb(0x9f)](),_0x479649]));for(const _0x28e9ba of _0x92ac9e[_0x215afb(0xa8)]){const _0x475ab8=_0x242fee[_0x215afb(0xaf)](_0x28e9ba[_0x215afb(0x9f)]());!_0x475ab8&&_0x1897b6[_0x215afb(0xa4)](_0x215afb(0x74)+_0x28e9ba+_0x215afb(0x8c));}for(const _0x139093 of _0x54bed3){let _0x16e825;try{_0x16e825=await getDatasetDetail(_0x139093);}catch{_0x1897b6[_0x215afb(0xa4)](_0x215afb(0x93)+_0x139093+_0x215afb(0x7e));continue;}assertDatasetIsDbTableBacked(_0x16e825,'SQL\x20schema\x20validation');const _0xd2f3fc=Array[_0x215afb(0x98)](_0x16e825[_0x215afb(0xa2)])?_0x16e825[_0x215afb(0xa2)]:[],_0x1d6560=new Set(_0xd2f3fc['map'](_0x483336=>_0x483336[_0x215afb(0x9b)]?.[_0x215afb(0x9f)]())),_0x7620b9=_0x16e825[_0x215afb(0x96)]?.[_0x215afb(0xa5)]||_0x16e825['tableName']||_0x139093;_0x46e684[_0x215afb(0x7d)+_0x7620b9]={'code':_0x139093,'tableName':_0x7620b9,'fieldCount':_0x1d6560[_0x215afb(0x77)],'fields':Array[_0x215afb(0x73)](_0x1d6560)};if(_0x576759){const _0x258e3c=normalizeDatasetIndexes(_0x16e825);_0x3ee826[_0x215afb(0xa4)]({'tableName':_0x7620b9,..._0x258e3c});}}_0x1897b6[_0x215afb(0x79)]>0x0&&(_0x46e684['schemaWarnings']=_0x1897b6),_0x576759&&(_0x46e684['joinAudit']=auditSqlJoinIndexes(_0x264901,_0x3ee826));}return{'ok':_0x92ac9e[_0x215afb(0x8f)],'data':_0x46e684,'message':_0x92ac9e[_0x215afb(0x76)]};}};function normalizeDatasetIndexes(_0x226184){const _0x9928c8=a216_0x4ff32a,_0x11274e=Array[_0x9928c8(0x98)](_0x226184?.[_0x9928c8(0x9a)]?.['indexes'])?_0x226184[_0x9928c8(0x9a)][_0x9928c8(0xa7)]:Array[_0x9928c8(0x98)](_0x226184?.[_0x9928c8(0xa7)])?_0x226184[_0x9928c8(0xa7)]:[],_0x2a10de=_0x11274e[_0x9928c8(0xa6)](_0x24cf14=>{const _0x5845b6=_0x9928c8,_0x14d714=Array[_0x5845b6(0x98)](_0x24cf14?.['index_columns'])?_0x24cf14['index_columns']:Array[_0x5845b6(0x98)](_0x24cf14?.['columnNames'])?_0x24cf14[_0x5845b6(0x9d)]:Array[_0x5845b6(0x98)](_0x24cf14?.[_0x5845b6(0x91)])?_0x24cf14['columns']:[],_0x2f4c1e=_0x14d714[_0x5845b6(0x99)](_0x47c60a=>typeof _0x47c60a===_0x5845b6(0x75))[_0x5845b6(0x85)](_0x377d36=>_0x377d36['trim']())[_0x5845b6(0x99)](Boolean);if(_0x2f4c1e[_0x5845b6(0x79)]===0x0)return[];const _0x441ce2=[_0x24cf14?.[_0x5845b6(0xa1)],_0x24cf14?.[_0x5845b6(0x70)],_0x24cf14?.['name']][_0x5845b6(0x9c)](_0x203825=>typeof _0x203825===_0x5845b6(0x75)&&_0x203825[_0x5845b6(0x89)]()),_0xce7956=[_0x24cf14?.['index_type'],_0x24cf14?.[_0x5845b6(0x8d)]][_0x5845b6(0x9c)](_0x4f3d96=>typeof _0x4f3d96===_0x5845b6(0x75)&&_0x4f3d96['trim']());return[{..._0x441ce2?{'name':_0x441ce2[_0x5845b6(0x89)]()}:{},..._0xce7956?{'type':_0xce7956[_0x5845b6(0x89)]()}:{},'columns':_0x2f4c1e}];}),_0x130940=[..._0x2a10de],_0x31d7cc=typeof _0x226184?.[_0x9928c8(0x96)]?.[_0x9928c8(0x6e)]===_0x9928c8(0x75)?_0x226184['dbtableConfig'][_0x9928c8(0x6e)][_0x9928c8(0xae)](',')[_0x9928c8(0x85)](_0x2271d5=>_0x2271d5[_0x9928c8(0x89)]())[_0x9928c8(0x99)](Boolean):[];return _0x31d7cc[_0x9928c8(0x79)]>0x0&&_0x130940[_0x9928c8(0xb0)]({'type':'primary','columns':_0x31d7cc}),{'indexes':_0x130940,'metadataAvailable':_0x2a10de[_0x9928c8(0x79)]>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ad525,_0x183560){const _0x1d9020=a217_0x5500,_0x4f2075=_0x1ad525();while(!![]){try{const _0x28553c=parseInt(_0x1d9020(0x10b))/0x1+parseInt(_0x1d9020(0x10d))/0x2+-parseInt(_0x1d9020(0x112))/0x3+-parseInt(_0x1d9020(0x113))/0x4+-parseInt(_0x1d9020(0x10f))/0x5*(parseInt(_0x1d9020(0x10c))/0x6)+-parseInt(_0x1d9020(0x10e))/0x7+-parseInt(_0x1d9020(0x110))/0x8*(-parseInt(_0x1d9020(0x111))/0x9);if(_0x28553c===_0x183560)break;else _0x4f2075['push'](_0x4f2075['shift']());}catch(_0x4641a2){_0x4f2075['push'](_0x4f2075['shift']());}}}(a217_0x3252,0x1fb08));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a217_0x5500(_0x535a96,_0x560409){_0x535a96=_0x535a96-0x10b;const _0x32525d=a217_0x3252();let _0x55007a=_0x32525d[_0x535a96];return _0x55007a;}function a217_0x3252(){const _0x22b0f2=['1334522TcoyMA','5riQKpf','4014272ShMBbh','9pvEbSH','476676Ihumfi','722444efvqxd','49816Tqgzgx','341826meYTsn','330640TAuvxr'];a217_0x3252=function(){return _0x22b0f2;};return a217_0x3252();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a218_0x1ad049=a218_0x7e26;function a218_0x7e26(_0x403449,_0x17514e){_0x403449=_0x403449-0xfc;const _0xbc8bcd=a218_0xbc8b();let _0x7e26b0=_0xbc8bcd[_0x403449];return _0x7e26b0;}(function(_0x32c42c,_0x428528){const _0x164ff6=a218_0x7e26,_0x4a01c1=_0x32c42c();while(!![]){try{const _0x48e1ef=-parseInt(_0x164ff6(0x10a))/0x1*(-parseInt(_0x164ff6(0x105))/0x2)+-parseInt(_0x164ff6(0x109))/0x3*(parseInt(_0x164ff6(0x116))/0x4)+parseInt(_0x164ff6(0x114))/0x5*(-parseInt(_0x164ff6(0x10c))/0x6)+-parseInt(_0x164ff6(0xfd))/0x7*(parseInt(_0x164ff6(0x115))/0x8)+parseInt(_0x164ff6(0x10d))/0x9*(-parseInt(_0x164ff6(0x100))/0xa)+parseInt(_0x164ff6(0x106))/0xb*(-parseInt(_0x164ff6(0x10b))/0xc)+-parseInt(_0x164ff6(0x117))/0xd*(-parseInt(_0x164ff6(0x113))/0xe);if(_0x48e1ef===_0x428528)break;else _0x4a01c1['push'](_0x4a01c1['shift']());}catch(_0x6454a6){_0x4a01c1['push'](_0x4a01c1['shift']());}}}(a218_0xbc8b,0x50553));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a218_0xbc8b(){const _0x4236cc=['Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','112238KrNbeB','305100wZuGZJ','40wacQHM','2504BMkrvg','1599WLhkzS','taskId','483273JvrLoY','status','trim','161360hdKRDh','string','flagMissing','isTerminal','apiError','361668MpoYNz','11PbgNbn','task-id','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','1878sLFwxh','3kJNMOm','4430244dKJUKg','6ICHDEf','18kkCiwX','str','appCode','compress'];a218_0xbc8b=function(){return _0x4236cc;};return a218_0xbc8b();}export const taskStatus={'service':'task','command':a218_0x1ad049(0xfe),'description':a218_0x1ad049(0x108),'risk':'read','defaultOutputFormat':a218_0x1ad049(0x110),'structuredErrors':!![],'flags':[{'name':'task-id','type':a218_0x1ad049(0x101),'required':!![],'description':a218_0x1ad049(0x112)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b0fff){const _0x2e5bb2=a218_0x1ad049;if(!_0x1b0fff[_0x2e5bb2(0x10e)](_0x2e5bb2(0x107))[_0x2e5bb2(0xff)]())throw CliErrors[_0x2e5bb2(0x102)](_0x2e5bb2(0x107));},async 'execute'(_0x546699){const _0x3a65e8=a218_0x1ad049,_0x52f38f=_0x546699[_0x3a65e8(0x10e)](_0x3a65e8(0x107))[_0x3a65e8(0xff)](),_0x278cf8=normalizeAsyncTask(await getAsyncTaskStatus(_0x52f38f,_0x546699[_0x3a65e8(0x10f)],_0x546699['cookie']));if(_0x278cf8[_0x3a65e8(0xfc)]!==_0x52f38f)throw CliErrors[_0x3a65e8(0x104)](_0x3a65e8(0x111)+_0x52f38f+',\x20received\x20'+_0x278cf8['taskId']+'.');const _0x140472=buildAsyncTaskStatusCommand(_0x278cf8[_0x3a65e8(0xfc)],_0x546699['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x278cf8),'data':{'appCode':_0x546699[_0x3a65e8(0x10f)],..._0x278cf8,'query':_0x278cf8[_0x3a65e8(0x103)]?null:{'command':_0x140472}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a219_0x3118(){const _0x3333f7=['11FuOOZx','750651aOsqwy','2913ItkvxH','2360430pQZVGr','5702988tFvsOf','4muXeUs','1174435IEEMyp','138RxFwME','308HvYhbp','8fwTzki','36048dZdpcO','1580733xQPSMC'];a219_0x3118=function(){return _0x3333f7;};return a219_0x3118();}(function(_0x3c6d8e,_0x16c66b){const _0x136700=a219_0x4f21,_0x2b8c3a=_0x3c6d8e();while(!![]){try{const _0x4ee0ad=parseInt(_0x136700(0x14e))/0x1*(-parseInt(_0x136700(0x147))/0x2)+parseInt(_0x136700(0x14d))/0x3*(parseInt(_0x136700(0x145))/0x4)+-parseInt(_0x136700(0x146))/0x5+parseInt(_0x136700(0x14a))/0x6*(parseInt(_0x136700(0x148))/0x7)+parseInt(_0x136700(0x149))/0x8*(-parseInt(_0x136700(0x14b))/0x9)+-parseInt(_0x136700(0x14f))/0xa*(parseInt(_0x136700(0x14c))/0xb)+parseInt(_0x136700(0x144))/0xc;if(_0x4ee0ad===_0x16c66b)break;else _0x2b8c3a['push'](_0x2b8c3a['shift']());}catch(_0x100f03){_0x2b8c3a['push'](_0x2b8c3a['shift']());}}}(a219_0x3118,0x22bae));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';function a219_0x4f21(_0x4e28b2,_0x48c19d){_0x4e28b2=_0x4e28b2-0x144;const _0x3118d8=a219_0x3118();let _0x4f21b3=_0x3118d8[_0x4e28b2];return _0x4f21b3;}export const tenantDefinitions=[tenantMembersListDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a220_0x5dad(){const _0x5a7be7=['Exact\x20tenant\x20code','length','1196ZczyUf','16kKoGMt','501083NyWwzh','36358BSDDlD','190qrQiAt','591806Fgvmbr','read','tenant','205735CwXoTd','str','trim','3489QcXXnD','\x20tenant\x20member(s)','flagMissing','members-list','288NeNIvl','2127525MlsCNI','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','Pass\x20--tenant-code\x20<code>.','tenant-code','Found\x20','1386963nXIWeF'];a220_0x5dad=function(){return _0x5a7be7;};return a220_0x5dad();}const a220_0x220cce=a220_0x5597;(function(_0xe3424,_0x420d08){const _0x28236f=a220_0x5597,_0x31f2de=_0xe3424();while(!![]){try{const _0x3d8204=-parseInt(_0x28236f(0x100))/0x1+parseInt(_0x28236f(0xfd))/0x2+parseInt(_0x28236f(0x103))/0x3*(-parseInt(_0x28236f(0xf8))/0x4)+-parseInt(_0x28236f(0x108))/0x5+-parseInt(_0x28236f(0x107))/0x6*(parseInt(_0x28236f(0xfb))/0x7)+parseInt(_0x28236f(0xf9))/0x8*(parseInt(_0x28236f(0xf5))/0x9)+-parseInt(_0x28236f(0xfc))/0xa*(-parseInt(_0x28236f(0xfa))/0xb);if(_0x3d8204===_0x420d08)break;else _0x31f2de['push'](_0x31f2de['shift']());}catch(_0x464c14){_0x31f2de['push'](_0x31f2de['shift']());}}}(a220_0x5dad,0x3aeb7));function a220_0x5597(_0x546f2d,_0xca27b3){_0x546f2d=_0x546f2d-0xf2;const _0x5dadda=a220_0x5dad();let _0x55974b=_0x5dadda[_0x546f2d];return _0x55974b;}import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':a220_0x220cce(0xff),'command':a220_0x220cce(0x106),'description':a220_0x220cce(0x109),'risk':a220_0x220cce(0xfe),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a220_0x220cce(0xf3),'type':'string','required':!![],'description':a220_0x220cce(0xf6)}],async 'validate'(_0x38bf16){const _0x46cd1d=a220_0x220cce;if(!_0x38bf16[_0x46cd1d(0x101)](_0x46cd1d(0xf3))['trim']())throw CliErrors[_0x46cd1d(0x105)](_0x46cd1d(0xf3),_0x46cd1d(0xf2));},async 'execute'(_0x554496){const _0x235fd9=a220_0x220cce,_0x95ced=_0x554496[_0x235fd9(0x101)]('tenant-code')[_0x235fd9(0x102)](),_0x269f5c=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x95ced,_0x269f5c);const _0x411662=projectTenantMembers(await listTenantDirectoryMembers(_0x95ced));return{'ok':!![],'data':{'tenantCode':_0x95ced,'items':_0x411662,'totalCount':_0x411662[_0x235fd9(0xf7)]},'message':_0x235fd9(0xf4)+_0x411662[_0x235fd9(0xf7)]+_0x235fd9(0x104)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x371c5d,_0x5350b5){const _0x562487=a221_0xdc69,_0x409eb9=_0x371c5d();while(!![]){try{const _0x1c226f=parseInt(_0x562487(0x136))/0x1+parseInt(_0x562487(0x13f))/0x2*(-parseInt(_0x562487(0x12e))/0x3)+-parseInt(_0x562487(0x144))/0x4*(-parseInt(_0x562487(0x131))/0x5)+parseInt(_0x562487(0x13b))/0x6+parseInt(_0x562487(0x149))/0x7+parseInt(_0x562487(0x147))/0x8*(parseInt(_0x562487(0x13e))/0x9)+parseInt(_0x562487(0x137))/0xa*(-parseInt(_0x562487(0x13a))/0xb);if(_0x1c226f===_0x5350b5)break;else _0x409eb9['push'](_0x409eb9['shift']());}catch(_0x96e2e1){_0x409eb9['push'](_0x409eb9['shift']());}}}(a221_0x2a9e,0x2f7c3));function a221_0x2a9e(){const _0x52bdb6=['ADMIN','status','1749yYUxoS','sort','adminFlag','35aRfCQP','Tenant\x20\x22','userId','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','displayName','336608fJIWiQ','510BvaVgs','tenantCode','values','111991dgXqym','799686ipWyAg','isFinite','trim','9iqzNir','652LfPlTQ','role','nickname','validation','set','133412fqZrvd','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','username','872232REOayL','some','639793LxARVA'];a221_0x2a9e=function(){return _0x52bdb6;};return a221_0x2a9e();}function a221_0xdc69(_0x5320fb,_0x1e8141){_0x5320fb=_0x5320fb-0x12c;const _0x2a9e34=a221_0x2a9e();let _0xdc69c0=_0x2a9e34[_0x5320fb];return _0xdc69c0;}import{CliErrors}from'../../errors.js';function textOrNull(_0x296b59){const _0xba809e=a221_0xdc69,_0x1db228=_0x296b59?.[_0xba809e(0x13d)]();return _0x1db228?_0x1db228:null;}export function projectTenantMembers(_0x17fa34){const _0x348bce=a221_0xdc69,_0x38f1bf=new Map();for(const _0x3a9df0 of _0x17fa34){const _0x5cbe42=Number(_0x3a9df0[_0x348bce(0x133)]);if(!Number[_0x348bce(0x13c)](_0x5cbe42)||_0x5cbe42<=0x0)continue;const _0x19f2da={'userId':_0x5cbe42,'username':textOrNull(_0x3a9df0[_0x348bce(0x146)]),'displayName':textOrNull(_0x3a9df0[_0x348bce(0x141)]),'role':_0x3a9df0[_0x348bce(0x130)]===!![]?'ADMIN':'MEMBER','status':textOrNull(_0x3a9df0[_0x348bce(0x12d)])},_0x4ac9ec=_0x38f1bf['get'](_0x5cbe42);if(!_0x4ac9ec){_0x38f1bf[_0x348bce(0x143)](_0x5cbe42,_0x19f2da);continue;}_0x4ac9ec[_0x348bce(0x146)]??=_0x19f2da[_0x348bce(0x146)],_0x4ac9ec['displayName']??=_0x19f2da[_0x348bce(0x135)],_0x4ac9ec[_0x348bce(0x12d)]??=_0x19f2da[_0x348bce(0x12d)];if(_0x19f2da[_0x348bce(0x140)]===_0x348bce(0x12c))_0x4ac9ec[_0x348bce(0x140)]='ADMIN';}return[..._0x38f1bf[_0x348bce(0x139)]()][_0x348bce(0x12f)]((_0x30a22b,_0x1fad7f)=>_0x30a22b[_0x348bce(0x133)]-_0x1fad7f['userId']);}export function assertTenantAccessible(_0x3fb6e6,_0x34bd11){const _0x1971b2=a221_0xdc69;if(_0x34bd11[_0x1971b2(0x148)](_0x4a0143=>_0x4a0143[_0x1971b2(0x138)]===_0x3fb6e6))return;throw CliErrors[_0x1971b2(0x142)](_0x1971b2(0x132)+_0x3fb6e6+_0x1971b2(0x145),_0x1971b2(0x134));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a222_0xb52d8=a222_0x583d;function a222_0x583d(_0x270747,_0x4d6ccd){_0x270747=_0x270747-0x78;const _0xc8a9e7=a222_0xc8a9();let _0x583d29=_0xc8a9e7[_0x270747];return _0x583d29;}function a222_0xc8a9(){const _0x333ca3=['1278968mJpsTs','dingtalk','bind','49SSXqIh','user-account','string','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','32pFPqoW','5fdqpws','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','5360580KHGbYB','write','1169464uQgUlO','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','POST','trim','validation','60NitRDO','48010WUKbVg','ding-talk-user-id','26098127TdKwpS','241578sRrsbP','4793874BRwXlJ','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox','str','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','apiError'];a222_0xc8a9=function(){return _0x333ca3;};return a222_0xc8a9();}(function(_0x21efad,_0x31700c){const _0x28329a=a222_0x583d,_0x5d2391=_0x21efad();while(!![]){try{const _0x2b86e6=-parseInt(_0x28329a(0x7d))/0x1*(parseInt(_0x28329a(0x8e))/0x2)+parseInt(_0x28329a(0x81))/0x3+-parseInt(_0x28329a(0x87))/0x4*(parseInt(_0x28329a(0x8f))/0x5)+-parseInt(_0x28329a(0x91))/0x6+parseInt(_0x28329a(0x8a))/0x7*(-parseInt(_0x28329a(0x93))/0x8)+-parseInt(_0x28329a(0x80))/0x9*(parseInt(_0x28329a(0x7c))/0xa)+parseInt(_0x28329a(0x7f))/0xb;if(_0x2b86e6===_0x31700c)break;else _0x5d2391['push'](_0x5d2391['shift']());}catch(_0x287b5b){_0x5d2391['push'](_0x5d2391['shift']());}}}(a222_0xc8a9,0xc47f2));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID=a222_0xb52d8(0x88),CURRENT_BINDING_WARNING=a222_0xb52d8(0x90);function readDingTalkUserId(_0xcab41f){const _0x2d429f=a222_0xb52d8,_0x2352a1=_0xcab41f[_0x2d429f(0x84)](_0x2d429f(0x7e))[_0x2d429f(0x7a)]();if(!_0x2352a1)throw CliErrors[_0x2d429f(0x7b)]('--ding-talk-user-id\x20cannot\x20be\x20empty.',_0x2d429f(0x78));return _0x2352a1;}function buildBindingData(_0x170302,_0x58b46e){const _0x5a59a2=a222_0xb52d8;return{'operation':_0x5a59a2(0x89),'selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x170302},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x170302,'bound':!![]},'dryRun':_0x58b46e,'backend':{'method':_0x5a59a2(0x79),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a222_0xb52d8(0x8b),'command':'dingding-sandbox-bind','description':a222_0xb52d8(0x8d),'risk':a222_0xb52d8(0x92),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a222_0xb52d8(0x7e),'type':a222_0xb52d8(0x8c),'required':!![],'description':a222_0xb52d8(0x83)}],async 'validate'(_0x5c6b7b){readDingTalkUserId(_0x5c6b7b);},async 'dryRun'(_0x54fe83){const _0x5df6fd=a222_0xb52d8,_0xff1cbc=readDingTalkUserId(_0x54fe83);return asDryRunResult(buildBindingData(_0xff1cbc,!![]),{'method':_0x5df6fd(0x79),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x2988bf){const _0x270422=a222_0xb52d8,_0x4e9d24=readDingTalkUserId(_0x2988bf),_0x46c798=await bindDingTalkSandboxAccount(_0x4e9d24);if(_0x46c798!==!![])throw CliErrors[_0x270422(0x86)]('DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.',_0x270422(0x82));return{'ok':!![],'data':buildBindingData(_0x4e9d24,![]),'message':_0x270422(0x85)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x401c3c,_0x31c807){const _0x219296=a223_0x468d,_0x115187=_0x401c3c();while(!![]){try{const _0x180b33=-parseInt(_0x219296(0x71))/0x1+-parseInt(_0x219296(0x6c))/0x2*(parseInt(_0x219296(0x72))/0x3)+-parseInt(_0x219296(0x70))/0x4*(parseInt(_0x219296(0x6d))/0x5)+-parseInt(_0x219296(0x78))/0x6*(parseInt(_0x219296(0x75))/0x7)+-parseInt(_0x219296(0x6f))/0x8*(parseInt(_0x219296(0x6e))/0x9)+parseInt(_0x219296(0x77))/0xa*(parseInt(_0x219296(0x73))/0xb)+-parseInt(_0x219296(0x76))/0xc*(-parseInt(_0x219296(0x74))/0xd);if(_0x180b33===_0x31c807)break;else _0x115187['push'](_0x115187['shift']());}catch(_0x5a7181){_0x115187['push'](_0x115187['shift']());}}}(a223_0xc3d2,0xc6141));import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind];function a223_0x468d(_0x1b52a9,_0x499f8b){_0x1b52a9=_0x1b52a9-0x6c;const _0xc3d2b6=a223_0xc3d2();let _0x468db2=_0xc3d2b6[_0x1b52a9];return _0x468db2;}function a223_0xc3d2(){const _0x23f601=['7122SBjOOV','24TtGxtn','139520mfItIE','8798247IvWVVv','8KViXKD','104CCguUi','958015ZgCTvw','75963fvWniu','8426352nIWqcu','813683lCjySz','5502FkigKG','756PEzyrq','10SChxxD'];a223_0xc3d2=function(){return _0x23f601;};return a223_0xc3d2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a224_0x556a(){const _0x1a5ee0=['workspace','10141576KhOtKz','name','382vTjAkz','96219hasdld','18Ezqykw','10630DqPsAb','25639042JlhrzU','84meLBFZ','1671745uWRyNJ','App\x20profile\x20name','workspace\x20add','write','666xUobWl','4166FFxPvs','1919001nAzSid'];a224_0x556a=function(){return _0x1a5ee0;};return a224_0x556a();}const a224_0x22e9b0=a224_0x55c4;(function(_0xc01b36,_0x4a0d58){const _0x666928=a224_0x55c4,_0x245ee8=_0xc01b36();while(!![]){try{const _0x5fc72d=-parseInt(_0x666928(0x1e2))/0x1*(parseInt(_0x666928(0x1e7))/0x2)+-parseInt(_0x666928(0x1e8))/0x3*(parseInt(_0x666928(0x1ec))/0x4)+-parseInt(_0x666928(0x1dd))/0x5*(parseInt(_0x666928(0x1e9))/0x6)+-parseInt(_0x666928(0x1e3))/0x7+parseInt(_0x666928(0x1e5))/0x8+parseInt(_0x666928(0x1e1))/0x9*(-parseInt(_0x666928(0x1ea))/0xa)+parseInt(_0x666928(0x1eb))/0xb;if(_0x5fc72d===_0x4a0d58)break;else _0x245ee8['push'](_0x245ee8['shift']());}catch(_0x57da78){_0x245ee8['push'](_0x245ee8['shift']());}}}(a224_0x556a,0xbcd34));function a224_0x55c4(_0x2fc823,_0x2dfaa7){_0x2fc823=_0x2fc823-0x1dd;const _0x556ae2=a224_0x556a();let _0x55c4b9=_0x556ae2[_0x2fc823];return _0x55c4b9;}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a224_0x22e9b0(0x1e4),'command':'add','description':'Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a224_0x22e9b0(0x1e0),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a224_0x22e9b0(0x1e6),'description':a224_0x22e9b0(0x1de),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x18fdc1=>validateAppName(_0x18fdc1,a224_0x22e9b0(0x1df)),'execute':_0x233b08=>runAppAdd(_0x233b08,a224_0x22e9b0(0x1df))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a225_0x282953=a225_0x437c;(function(_0x3391e9,_0x133f4f){const _0x5680f3=a225_0x437c,_0x201144=_0x3391e9();while(!![]){try{const _0x56e25e=-parseInt(_0x5680f3(0x16f))/0x1+parseInt(_0x5680f3(0x156))/0x2+-parseInt(_0x5680f3(0x17d))/0x3+-parseInt(_0x5680f3(0x16d))/0x4+parseInt(_0x5680f3(0x183))/0x5+parseInt(_0x5680f3(0x16e))/0x6+parseInt(_0x5680f3(0x164))/0x7;if(_0x56e25e===_0x133f4f)break;else _0x201144['push'](_0x201144['shift']());}catch(_0x22b6ec){_0x201144['push'](_0x201144['shift']());}}}(a225_0x2730,0x33fdd));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.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';function a225_0x437c(_0xf1defc,_0x4cf832){_0xf1defc=_0xf1defc-0x150;const _0x273059=a225_0x2730();let _0x437c12=_0x273059[_0xf1defc];return _0x437c12;}import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';function a225_0x2730(){const _0x5d4338=['500712dhbFvV','346351jnNHum','region','init','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','defaultFormat','initialized','Switch\x20the\x20current\x20workspace\x20app\x20binding','apiDir','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','validation','length','app','workspace.','App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','513927HzMtGz','\x20--appcode\x20<code>`.','number','\x20workspace\x20use\x20--app\x20<name>`.','project','.\x20Credentials:\x20not\x20written.','1776610mIawQq','write','\x22\x20not\x20found.','trim','isArray','pageSize','Use\x20`','App\x20\x22','object','apps','appcode','Target\x20environment','Invalid\x20appcode:\x20','577142cpzxlF','updated','keys','string','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','riskLevel','use','\x20(appcode:\x20','env','Missing\x20workspace\x20app\x20selector.','globalConfig','workspace','locale','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','122675kxBmXg','format','\x20--app\x20','str','join','\x20workspace\x20',').\x20Config:\x20','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','flag','57012pHYsnr'];a225_0x2730=function(){return _0x5d4338;};return a225_0x2730();}import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';import{normalizeStoredDefaultApp}from'../../config/schema.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../../constant/region.js';const WORKSPACE_USAGE=CLI_BIN_NAME+'\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]',SAFE_PROFILE_KEYS=[a225_0x282953(0x153),a225_0x282953(0x170),a225_0x282953(0x15e),a225_0x282953(0x176),a225_0x282953(0x165),'pageSize',a225_0x282953(0x15b),'locale'],workspaceFlags=[{'name':a225_0x282953(0x17a),'type':a225_0x282953(0x159),'description':a225_0x282953(0x172)},{'name':a225_0x282953(0x153),'type':'string','description':a225_0x282953(0x163)},{'name':a225_0x282953(0x170),'type':a225_0x282953(0x159),'description':'Country/region\x20for\x20this\x20workspace\x20app\x20profile','enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a225_0x282953(0x15e),'type':a225_0x282953(0x159),'description':a225_0x282953(0x154),'enum':[...RABETBASE_ENV_VALUES]},{'name':a225_0x282953(0x176),'type':a225_0x282953(0x159),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a225_0x282953(0x173),'type':a225_0x282953(0x159),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a225_0x282953(0x188),'type':a225_0x282953(0x17f),'description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'riskLevel','type':a225_0x282953(0x159),'description':a225_0x282953(0x177),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':a225_0x282953(0x159),'description':a225_0x282953(0x17c)}];function isRecord(_0x1b0735){const _0x5d638e=a225_0x282953;return!!_0x1b0735&&typeof _0x1b0735===_0x5d638e(0x151)&&!Array[_0x5d638e(0x187)](_0x1b0735);}function assertValidAppcode(_0x3528ac){const _0x2c481b=a225_0x282953,{valid:_0x2a41d8,message:_0x48e385}=validateAppcode(_0x3528ac);if(!_0x2a41d8)throw CliErrors[_0x2c481b(0x178)](_0x2c481b(0x155)+_0x3528ac,_0x48e385);}function sanitizeProfile(_0xec1a4c){if(!isRecord(_0xec1a4c))return{};const _0x48a199={};for(const _0x3eec74 of SAFE_PROFILE_KEYS){if(_0xec1a4c[_0x3eec74]!==undefined)_0x48a199[_0x3eec74]=_0xec1a4c[_0x3eec74];}return _0x48a199;}function cloneProfile(_0x4f29d4){return isRecord(_0x4f29d4)?{..._0x4f29d4}:{};}function collectWorkspaceProfileOverrides(_0x44f8df){const _0xd7305=a225_0x282953,_0x142b93={},_0x3e58a7=_0x44f8df['str'](_0xd7305(0x170)),_0x462da8=_0x44f8df[_0xd7305(0x167)]('env'),_0x47a861=_0x44f8df[_0xd7305(0x167)]('apiDir'),_0x2ba09f=_0x44f8df['str'](_0xd7305(0x173)),_0x54b048=_0x44f8df[_0xd7305(0x16c)](_0xd7305(0x188)),_0xf901b9=_0x44f8df['str'](_0xd7305(0x15b)),_0x263100=_0x44f8df[_0xd7305(0x167)](_0xd7305(0x162));if(_0x3e58a7)_0x142b93['region']=_0x3e58a7;if(_0x462da8)_0x142b93[_0xd7305(0x15e)]=_0x462da8;if(_0x47a861)_0x142b93['apiDir']=_0x47a861;if(_0x2ba09f)_0x142b93[_0xd7305(0x165)]=_0x2ba09f;if(_0x54b048!==undefined&&_0x54b048!=='')_0x142b93['pageSize']=Number(_0x54b048);if(_0xf901b9)_0x142b93[_0xd7305(0x15b)]=_0xf901b9;if(_0x263100)_0x142b93[_0xd7305(0x162)]=_0x263100;return _0x142b93;}async function validateWorkspaceArgs(_0x275c5d){const _0x5f342d=a225_0x282953,_0x260fa6=_0x275c5d[_0x5f342d(0x167)](_0x5f342d(0x17a))[_0x5f342d(0x186)](),_0xe8f7ea=_0x275c5d[_0x5f342d(0x167)](_0x5f342d(0x153))['trim']();if(!_0x260fa6&&!_0xe8f7ea)throw CliErrors['validation'](_0x5f342d(0x15f),'Use\x20`'+CLI_BIN_NAME+_0x5f342d(0x15a)+CLI_BIN_NAME+_0x5f342d(0x180));if(_0xe8f7ea)assertValidAppcode(_0xe8f7ea);}function resolveKnownApps(){const _0x57e0c8=a225_0x282953,{config:_0x3490ed,layers:_0x252dcf}=readRawConfigWithLayers(),_0xf62704=isRecord(_0x3490ed[_0x57e0c8(0x152)])?_0x3490ed[_0x57e0c8(0x152)]:{},_0x405136=isRecord(_0x252dcf[_0x57e0c8(0x160)][_0x57e0c8(0x152)])?_0x252dcf[_0x57e0c8(0x160)][_0x57e0c8(0x152)]:{};return{..._0x405136,..._0xf62704};}async function configureWorkspace(_0x3413cb,_0x5ce85e){const _0x453777=a225_0x282953,_0x562f92=_0x3413cb[_0x453777(0x167)](_0x453777(0x17a))[_0x453777(0x186)](),_0x5994a7=_0x3413cb['str'](_0x453777(0x153))['trim'](),_0x3554fa=_0x562f92||_0x5994a7;if(!_0x3554fa)throw CliErrors['validation'](_0x453777(0x15f),_0x453777(0x189)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x453777(0x180));if(_0x5994a7)assertValidAppcode(_0x5994a7);const _0x88c23c=resolveWriteConfigPath(_0x453777(0x181)),_0x1ecbd4=readConfigFile(_0x88c23c),_0x2de1f3=resolveKnownApps(),_0x520267=isRecord(_0x1ecbd4['apps'])?{..._0x1ecbd4['apps']}:{},_0x255bc0=cloneProfile(_0x520267[_0x3554fa]),_0x3f877b=sanitizeProfile(_0x2de1f3[_0x3554fa]),_0x2a3e93=_0x5994a7?{}:_0x3f877b,_0x2cb30f=_0x5994a7||_0x2a3e93['appcode'];if(!_0x2cb30f){const _0x3a70f4=Object[_0x453777(0x158)](_0x2de1f3),_0xb63761=_0x3a70f4[_0x453777(0x179)]===0x0?_0x453777(0x189)+CLI_BIN_NAME+_0x453777(0x169)+_0x5ce85e+_0x453777(0x166)+_0x3554fa+_0x453777(0x17e):_0x453777(0x16b)+_0x3a70f4[_0x453777(0x168)](',\x20');throw CliErrors['validation'](_0x453777(0x150)+_0x3554fa+_0x453777(0x185),_0xb63761);}assertValidAppcode(String(_0x2cb30f));const _0xf83b37={..._0x2a3e93,..._0x255bc0,'appcode':String(_0x2cb30f),...collectWorkspaceProfileOverrides(_0x3413cb)};return _0x520267[_0x3554fa]=_0xf83b37,_0x1ecbd4[_0x453777(0x152)]=_0x520267,normalizeStoredDefaultApp(_0x1ecbd4,_0x3554fa),delete _0x1ecbd4[_0x453777(0x153)],delete _0x1ecbd4[_0x453777(0x17a)],_0xf83b37[_0x453777(0x15e)]&&(_0x1ecbd4['env']=_0xf83b37['env']),writeConfigFile(_0x88c23c,_0x1ecbd4),{'ok':!![],'message':'Workspace\x20'+(_0x5ce85e===_0x453777(0x171)?_0x453777(0x174):_0x453777(0x157))+':\x20'+_0x3554fa+_0x453777(0x15d)+_0xf83b37[_0x453777(0x153)]+_0x453777(0x16a)+_0x88c23c+_0x453777(0x182),'data':{'operation':_0x453777(0x17b)+_0x5ce85e,'configPath':_0x88c23c,'app':_0x3554fa,'appcode':_0xf83b37[_0x453777(0x153)],'region':_0xf83b37[_0x453777(0x170)]??null,'env':_0xf83b37[_0x453777(0x15e)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a225_0x282953(0x171),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a225_0x282953(0x184),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x42d4a6=>configureWorkspace(_0x42d4a6,'init')},workspaceUseDefinition={'service':a225_0x282953(0x161),'command':a225_0x282953(0x15c),'description':a225_0x282953(0x175),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x3e776a=>configureWorkspace(_0x3e776a,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a226_0x164d(_0x4f59aa,_0x229396){_0x4f59aa=_0x4f59aa-0x93;const _0x5a3215=a226_0x5a32();let _0x164d25=_0x5a3215[_0x4f59aa];return _0x164d25;}const a226_0x2df0a1=a226_0x164d;function a226_0x5a32(){const _0x261393=['5604foLLbj','177380QsqAGP','160556UMXvVe','9XwQGms','36051RdTBhc','18RhnSrH','name','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','workspace\x20remove','20317EQwKpv','1398072oeGNJd','66pwWXPx','150888MbuDYn','35gYUDEh','764940fPQxiB'];a226_0x5a32=function(){return _0x261393;};return a226_0x5a32();}(function(_0x243e45,_0x350ae5){const _0x4d4f5d=a226_0x164d,_0x333d5c=_0x243e45();while(!![]){try{const _0x5c613c=-parseInt(_0x4d4f5d(0x97))/0x1+-parseInt(_0x4d4f5d(0x9f))/0x2*(-parseInt(_0x4d4f5d(0x96))/0x3)+parseInt(_0x4d4f5d(0x95))/0x4*(parseInt(_0x4d4f5d(0xa0))/0x5)+-parseInt(_0x4d4f5d(0x9e))/0x6*(-parseInt(_0x4d4f5d(0x94))/0x7)+parseInt(_0x4d4f5d(0x9d))/0x8+-parseInt(_0x4d4f5d(0x98))/0x9*(-parseInt(_0x4d4f5d(0xa1))/0xa)+-parseInt(_0x4d4f5d(0x9c))/0xb*(parseInt(_0x4d4f5d(0x93))/0xc);if(_0x5c613c===_0x350ae5)break;else _0x333d5c['push'](_0x333d5c['shift']());}catch(_0xe3d1fc){_0x333d5c['push'](_0x333d5c['shift']());}}}(a226_0x5a32,0x34898));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':'workspace','command':'remove','description':a226_0x2df0a1(0x9a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a226_0x2df0a1(0x99),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x302c74=>validateAppName(_0x302c74,'workspace\x20remove'),'execute':_0x58c56e=>runAppRemove(_0x58c56e,a226_0x2df0a1(0x9b))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a227_0x5e968d=a227_0x3b6b;(function(_0x2183b9,_0x581c8a){const _0x174a59=a227_0x3b6b,_0x28d7cd=_0x2183b9();while(!![]){try{const _0x31ad91=parseInt(_0x174a59(0x175))/0x1*(parseInt(_0x174a59(0x168))/0x2)+parseInt(_0x174a59(0x157))/0x3*(-parseInt(_0x174a59(0x152))/0x4)+-parseInt(_0x174a59(0x16d))/0x5+parseInt(_0x174a59(0x158))/0x6+-parseInt(_0x174a59(0x165))/0x7*(parseInt(_0x174a59(0x172))/0x8)+-parseInt(_0x174a59(0x159))/0x9+parseInt(_0x174a59(0x134))/0xa;if(_0x31ad91===_0x581c8a)break;else _0x28d7cd['push'](_0x28d7cd['shift']());}catch(_0x35bd93){_0x28d7cd['push'](_0x28d7cd['shift']());}}}(a227_0x46cb,0xe9b5a));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,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=['userDomain','apiDomain',a227_0x5e968d(0x15f),a227_0x5e968d(0x167),'kbDomain',a227_0x5e968d(0x163),a227_0x5e968d(0x178),a227_0x5e968d(0x15a)];function a227_0x3b6b(_0x13ca8d,_0xc04f8a){_0x13ca8d=_0x13ca8d-0x132;const _0x46cb85=a227_0x46cb();let _0x3b6b15=_0x46cb85[_0x13ca8d];return _0x3b6b15;}const DOMAIN_FLAGS={'userDomain':a227_0x5e968d(0x15d),'apiDomain':a227_0x5e968d(0x177),'runtimeDomain':a227_0x5e968d(0x156),'skillDomain':a227_0x5e968d(0x169),'kbDomain':a227_0x5e968d(0x173),'appDomain':a227_0x5e968d(0x13b),'localDomain':a227_0x5e968d(0x16e),'certificateDomain':a227_0x5e968d(0x13e)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a227_0x5e968d(0x13c),a227_0x5e968d(0x17d),'skillHubDomain'];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a227_0x5e968d(0x14f),'apiDomain':a227_0x5e968d(0x160),'runtimeDomain':a227_0x5e968d(0x15f),'skillDomain':'skillDomain','kbDomain':a227_0x5e968d(0x144),'appDomain':'appDomain','localDomain':'localDomain','certificateDomain':a227_0x5e968d(0x15a)},ROUTING_CONSUMER='rabetbase-cli';export function normalizeDomainOrigin(_0x1ef3e9,_0x1ed134){const _0x812d89=a227_0x5e968d;if(typeof _0x1ed134!==_0x812d89(0x16b)||!_0x1ed134[_0x812d89(0x17f)]())throw CliErrors['validation'](_0x812d89(0x17c)+_0x1ef3e9+_0x812d89(0x170));let _0x5b96aa;try{_0x5b96aa=new URL(_0x1ed134['trim']());}catch{throw CliErrors['validation']('Invalid\x20'+_0x1ef3e9+_0x812d89(0x162)+_0x1ed134+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x5b96aa[_0x812d89(0x174)]!==_0x812d89(0x180)||_0x5b96aa[_0x812d89(0x14d)]||_0x5b96aa[_0x812d89(0x176)]||_0x5b96aa[_0x812d89(0x13f)]!=='/'&&_0x5b96aa[_0x812d89(0x13f)]!==''||_0x5b96aa[_0x812d89(0x16c)]||_0x5b96aa[_0x812d89(0x139)])throw CliErrors[_0x812d89(0x15b)](_0x812d89(0x17c)+_0x1ef3e9+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.');return _0x5b96aa[_0x812d89(0x141)];}export function normalizeRoutingDomainValue(_0x52b481,_0x4f0f69){const _0x480055=a227_0x5e968d;if(typeof _0x4f0f69===_0x480055(0x16b))return normalizeDomainOrigin(_0x52b481,_0x4f0f69);if(!_0x4f0f69||typeof _0x4f0f69!==_0x480055(0x148)||Array[_0x480055(0x15e)](_0x4f0f69))throw CliErrors['validation']('Invalid\x20'+_0x52b481+_0x480055(0x14c));const _0x1e08f2=_0x4f0f69,_0x1a33c4=_0x1e08f2[ROUTING_CONSUMER]??_0x1e08f2[_0x480055(0x154)];if(_0x1a33c4===undefined)throw CliErrors[_0x480055(0x15b)](_0x480055(0x13d)+_0x52b481+'\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'+ROUTING_CONSUMER+_0x480055(0x164));return normalizeDomainOrigin(_0x52b481,_0x1a33c4);}export function normalizeCdnBaseUrl(_0x40f83d,_0x4f1229){const _0x49fb6e=a227_0x5e968d;if(typeof _0x4f1229!=='string'||!_0x4f1229[_0x49fb6e(0x17f)]())throw CliErrors[_0x49fb6e(0x15b)](_0x49fb6e(0x145)+_0x40f83d+_0x49fb6e(0x147));const _0x2635b5=_0x4f1229['trim']()[_0x49fb6e(0x155)](/\/$/,'');let _0x39d02d;try{_0x39d02d=new URL(_0x2635b5);}catch{throw CliErrors[_0x49fb6e(0x15b)](_0x49fb6e(0x145)+_0x40f83d+':\x20\x22'+_0x4f1229+_0x49fb6e(0x142));}if(_0x39d02d[_0x49fb6e(0x174)]!=='https:'||_0x39d02d['username']||_0x39d02d[_0x49fb6e(0x176)]||_0x39d02d['search']||_0x39d02d[_0x49fb6e(0x139)]||_0x39d02d[_0x49fb6e(0x14e)]['replace'](/\/$/,'')!==_0x2635b5||_0x40f83d===_0x49fb6e(0x146)&&_0x39d02d[_0x49fb6e(0x141)]!==_0x2635b5)throw CliErrors[_0x49fb6e(0x15b)](_0x49fb6e(0x145)+_0x40f83d+_0x49fb6e(0x153)+(_0x40f83d===_0x49fb6e(0x146)?'origin':_0x49fb6e(0x17a))+_0x49fb6e(0x13a));return _0x2635b5;}export function resolveEnterpriseRoutingConfig(_0x13ef87){const _0x4d33a5=a227_0x5e968d;return resolveEnterpriseRoutingManifest(_0x13ef87)?.[_0x4d33a5(0x171)];}function a227_0x46cb(){const _0x5c4fe3=['Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','trim','https:','Domain\x20config\x20file\x20not\x20found:\x20','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','28278210uUOtOp','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','Invalid\x20domain\x20config\x20JSON:\x20','length','keys','hash','\x20without\x20credentials,\x20query,\x20or\x20fragment.','app-domain','agentDomain','Enterprise\x20','certificate-domain','pathname','enterprise-v1','origin','\x22\x20is\x20not\x20a\x20valid\x20URL.','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','kbDomain','Invalid\x20cdn.','lovrabet',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','object','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','includes','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','username','href','userDomain','mode','Unsupported\x20domain\x20config\x20field(s):\x20','129036tTaRGf',':\x20expected\x20an\x20HTTPS\x20','default','replace','runtime-domain','27tyhHaT','3752454OzYJdP','1516851xSoCtm','certificateDomain','validation','join','user-domain','isArray','runtimeDomain','apiDomain','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.',':\x20\x22','appDomain','\x20and\x20has\x20no\x20default.','12817574sGyffK','cdn','skillDomain','1318SNNJZX','skill-domain','legacy','string','search','8223005obMOqC','local-domain','str',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','domains','8GeQOLJ','kb-domain','protocol','2183dzCZrs','password','api-domain','localDomain','filter','base\x20URL','\x22\x20and\x20kind\x20\x22','Invalid\x20','platformDomain'];a227_0x46cb=function(){return _0x5c4fe3;};return a227_0x46cb();}export function resolveEnterpriseRoutingManifest(_0x39e7c4){const _0x5118e3=a227_0x5e968d;if(_0x39e7c4===undefined)return undefined;if(!_0x39e7c4||typeof _0x39e7c4!==_0x5118e3(0x148)||Array[_0x5118e3(0x15e)](_0x39e7c4))throw CliErrors['validation'](_0x5118e3(0x161));return parseEnterpriseRoutingManifest(_0x39e7c4);}export function readDomainConfigInput(_0xd95063){const _0x492189=a227_0x5e968d,_0x32b6ac=isAbsolute(_0xd95063)?_0xd95063:resolve(process['cwd'](),_0xd95063);if(!existsSync(_0x32b6ac))throw CliErrors[_0x492189(0x15b)](_0x492189(0x132)+_0x32b6ac);let _0x5d5758;try{_0x5d5758=JSON['parse'](readFileSync(_0x32b6ac,'utf8'));}catch{throw CliErrors[_0x492189(0x15b)](_0x492189(0x136)+_0x32b6ac);}if(!_0x5d5758||typeof _0x5d5758!=='object'||Array[_0x492189(0x15e)](_0x5d5758))throw CliErrors['validation']('Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.');const _0x7d4919=_0x5d5758;if('protocol'in _0x7d4919)return parseEnterpriseRoutingManifest(_0x7d4919);const _0x1d0732=Object['keys'](_0x7d4919)[_0x492189(0x179)](_0x24ffd4=>!DOMAIN_CONFIG_FIELDS[_0x492189(0x14a)](_0x24ffd4));if(_0x1d0732[_0x492189(0x137)]>0x0)throw CliErrors['validation'](_0x492189(0x151)+_0x1d0732['join'](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS[_0x492189(0x15c)](',\x20'));const _0x4d652e={};for(const _0x170950 of DOMAIN_CONFIG_FIELDS){_0x7d4919[_0x170950]!==undefined&&(_0x4d652e[_0x170950]=normalizeDomainOrigin(_0x170950,_0x7d4919[_0x170950]));}if(Object[_0x492189(0x138)](_0x4d652e)[_0x492189(0x137)]===0x0)throw CliErrors['validation'](_0x492189(0x17e));return{'mode':'legacy','domains':_0x4d652e};}export function readDomainConfig(_0x265aad){return readDomainConfigInput(_0x265aad)['domains'];}export function resolveDomainConfigInput(_0x18102a){const _0x19cc5b=a227_0x5e968d,_0x4f12ba=(_0x18102a[_0x19cc5b(0x16f)]('domain-config')||'')[_0x19cc5b(0x17f)](),_0x106087=_0x4f12ba?readDomainConfigInput(_0x4f12ba):{'mode':_0x19cc5b(0x16a),'domains':{}},_0x40cdbd=DOMAIN_CONFIG_FIELDS[_0x19cc5b(0x179)](_0x651d37=>Boolean((_0x18102a[_0x19cc5b(0x16f)](DOMAIN_FLAGS[_0x651d37])||'')[_0x19cc5b(0x17f)]()));if(_0x106087[_0x19cc5b(0x150)]==='enterprise-v1'&&_0x40cdbd[_0x19cc5b(0x137)]>0x0)throw CliErrors['validation'](_0x19cc5b(0x143),_0x19cc5b(0x14b));for(const _0x1f2bea of DOMAIN_CONFIG_FIELDS){const _0xe4724e=(_0x18102a['str'](DOMAIN_FLAGS[_0x1f2bea])||'')[_0x19cc5b(0x17f)]();if(_0xe4724e)_0x106087[_0x19cc5b(0x171)][_0x1f2bea]=normalizeDomainOrigin(_0x1f2bea,_0xe4724e);}return _0x106087;}export function resolveDomainFlags(_0x255b86){const _0x50d0e5=a227_0x5e968d;return resolveDomainConfigInput(_0x255b86)[_0x50d0e5(0x171)];}export function parseEnterpriseRoutingManifest(_0x5dddfe){const _0x48a5b3=a227_0x5e968d;if(_0x5dddfe['protocol']!==ENTERPRISE_ROUTING_PROTOCOL||_0x5dddfe['kind']!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x48a5b3(0x15b)](_0x48a5b3(0x135)+ENTERPRISE_ROUTING_PROTOCOL+_0x48a5b3(0x17b)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x5dddfe[_0x48a5b3(0x171)]||typeof _0x5dddfe[_0x48a5b3(0x171)]!==_0x48a5b3(0x148)||Array[_0x48a5b3(0x15e)](_0x5dddfe[_0x48a5b3(0x171)]))throw CliErrors[_0x48a5b3(0x15b)]('Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.');if(!_0x5dddfe[_0x48a5b3(0x166)]||typeof _0x5dddfe[_0x48a5b3(0x166)]!==_0x48a5b3(0x148)||Array[_0x48a5b3(0x15e)](_0x5dddfe[_0x48a5b3(0x166)]))throw CliErrors[_0x48a5b3(0x15b)]('Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.');const _0x4b682c=_0x5dddfe[_0x48a5b3(0x171)],_0x50d362=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x48a5b3(0x179)](_0x557b1f=>_0x4b682c[_0x557b1f]===undefined);if(_0x50d362['length']>0x0)throw CliErrors[_0x48a5b3(0x15b)](_0x48a5b3(0x149)+_0x50d362[_0x48a5b3(0x15c)](',\x20'));if(_0x4b682c[_0x48a5b3(0x178)]===undefined!==(_0x4b682c[_0x48a5b3(0x15a)]===undefined))throw CliErrors[_0x48a5b3(0x15b)]('Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.');const _0x2952af=_0x5dddfe[_0x48a5b3(0x166)],_0x25fa34=Object[_0x48a5b3(0x138)](_0x2952af)[_0x48a5b3(0x179)](_0x66861=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x48a5b3(0x14a)](_0x66861));if(_0x25fa34[_0x48a5b3(0x137)]>0x0)throw CliErrors[_0x48a5b3(0x15b)]('Unsupported\x20enterprise\x20CDN\x20field(s):\x20'+_0x25fa34[_0x48a5b3(0x15c)](',\x20'),'Allowed\x20fields:\x20'+ENTERPRISE_ROUTING_CDN_FIELDS[_0x48a5b3(0x15c)](',\x20'));const _0xb61257=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS['filter'](_0x341722=>_0x2952af[_0x341722]===undefined);if(_0xb61257[_0x48a5b3(0x137)]>0x0)throw CliErrors[_0x48a5b3(0x15b)](_0x48a5b3(0x133)+_0xb61257[_0x48a5b3(0x15c)](',\x20'));const _0x2441ac={};for(const _0x479310 of ENTERPRISE_ROUTING_CDN_FIELDS){_0x2441ac[_0x479310]=normalizeCdnBaseUrl(_0x479310,_0x2952af[_0x479310]);}const _0x28a9c0={},_0x1718c1={};for(const _0x49ed51 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x779f36=_0x4b682c[_0x49ed51];if(_0x779f36===undefined)continue;const _0x3c962c=normalizeRoutingDomainValue(_0x49ed51,_0x779f36);_0x28a9c0[_0x49ed51]=_0x3c962c;const _0x2385aa=ENTERPRISE_TO_LOCAL_FIELD[_0x49ed51];_0x2385aa&&(_0x1718c1[_0x2385aa]=_0x3c962c);}return{'mode':_0x48a5b3(0x140),'domains':_0x1718c1,'manifestDomains':_0x28a9c0,'cdn':_0x2441ac};}
|
|
1
|
+
const a227_0x23a198=a227_0x43f2;function a227_0x4bfc(){const _0x380e61=['platformDomain','121995nWIQbw','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','userDomain','apiDomain','origin','732606tTeRbn','certificate-domain','certificateDomain','kb-domain','enterprise-v1','localDomain','string','lovrabet','pathname','skill-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','cdn','filter','length','href','user-domain','legacy','skillDomain','kind','Invalid\x20cdn.','\x22\x20and\x20kind\x20\x22','https:','local-domain','1859050vLUcgj','utf8','25557whuBGu','1566474MQguGO','object','Invalid\x20','join','runtimeDomain','agentDomain','Allowed\x20fields:\x20','\x20and\x20has\x20no\x20default.',':\x20\x22','hash','\x22\x20is\x20not\x20a\x20valid\x20URL.','api-domain','Unsupported\x20domain\x20config\x20field(s):\x20',':\x20expected\x20an\x20HTTPS\x20','35lbYiHz','str','domains','kbDomain','includes','default',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','\x20without\x20credentials,\x20query,\x20or\x20fragment.','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','search','skillHubDomain','app-domain','100MDvmuC','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','isArray','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','trim','cwd','appDomain','parse','protocol','Domain\x20config\x20file\x20not\x20found:\x20','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','1982936TKixAY','username','validation','replace','25921026aDEWeU'];a227_0x4bfc=function(){return _0x380e61;};return a227_0x4bfc();}(function(_0x5d53d5,_0x2c5fa5){const _0x539e39=a227_0x43f2,_0x2360bd=_0x5d53d5();while(!![]){try{const _0x108e54=parseInt(_0x539e39(0xb9))/0x1+-parseInt(_0x539e39(0xb7))/0x2+-parseInt(_0x539e39(0xba))/0x3+parseInt(_0x539e39(0xd4))/0x4*(-parseInt(_0x539e39(0xe8))/0x5)+parseInt(_0x539e39(0xee))/0x6*(-parseInt(_0x539e39(0xc8))/0x7)+parseInt(_0x539e39(0xe2))/0x8+parseInt(_0x539e39(0xe6))/0x9;if(_0x108e54===_0x2c5fa5)break;else _0x2360bd['push'](_0x2360bd['shift']());}catch(_0xfd5d27){_0x2360bd['push'](_0x2360bd['shift']());}}}(a227_0x4bfc,0x7585f));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,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a227_0x23a198(0xeb),'apiDomain',a227_0x23a198(0xbe),'skillDomain',a227_0x23a198(0xcb),a227_0x23a198(0xdb),a227_0x23a198(0xf3),a227_0x23a198(0xf0)];const DOMAIN_FLAGS={'userDomain':a227_0x23a198(0xaf),'apiDomain':a227_0x23a198(0xc5),'runtimeDomain':'runtime-domain','skillDomain':a227_0x23a198(0xf7),'kbDomain':a227_0x23a198(0xf1),'appDomain':a227_0x23a198(0xd3),'localDomain':a227_0x23a198(0xb6),'certificateDomain':a227_0x23a198(0xef)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a227_0x23a198(0xbf),a227_0x23a198(0xe7),a227_0x23a198(0xd2)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':'userDomain','apiDomain':a227_0x23a198(0xec),'runtimeDomain':'runtimeDomain','skillDomain':a227_0x23a198(0xb1),'kbDomain':'kbDomain','appDomain':a227_0x23a198(0xdb),'localDomain':'localDomain','certificateDomain':a227_0x23a198(0xf0)},ROUTING_CONSUMER='rabetbase-cli';export function normalizeDomainOrigin(_0x1738e9,_0x1b596f){const _0x32b60d=a227_0x23a198;if(typeof _0x1b596f!==_0x32b60d(0xf4)||!_0x1b596f['trim']())throw CliErrors[_0x32b60d(0xe4)](_0x32b60d(0xbc)+_0x1738e9+':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.');let _0x507cce;try{_0x507cce=new URL(_0x1b596f[_0x32b60d(0xd9)]());}catch{throw CliErrors[_0x32b60d(0xe4)](_0x32b60d(0xbc)+_0x1738e9+_0x32b60d(0xc2)+_0x1b596f+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x507cce['protocol']!=='https:'||_0x507cce[_0x32b60d(0xe3)]||_0x507cce['password']||_0x507cce[_0x32b60d(0xf6)]!=='/'&&_0x507cce[_0x32b60d(0xf6)]!==''||_0x507cce[_0x32b60d(0xd1)]||_0x507cce[_0x32b60d(0xc3)])throw CliErrors[_0x32b60d(0xe4)](_0x32b60d(0xbc)+_0x1738e9+_0x32b60d(0xce),_0x32b60d(0xe1));return _0x507cce[_0x32b60d(0xed)];}export function normalizeRoutingDomainValue(_0x438dda,_0x364cf5){const _0x4256fa=a227_0x23a198;if(typeof _0x364cf5===_0x4256fa(0xf4))return normalizeDomainOrigin(_0x438dda,_0x364cf5);if(!_0x364cf5||typeof _0x364cf5!==_0x4256fa(0xbb)||Array[_0x4256fa(0xd6)](_0x364cf5))throw CliErrors['validation']('Invalid\x20'+_0x438dda+':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.');const _0x57dd16=_0x364cf5,_0x26142b=_0x57dd16[ROUTING_CONSUMER]??_0x57dd16[_0x4256fa(0xcd)];if(_0x26142b===undefined)throw CliErrors[_0x4256fa(0xe4)]('Enterprise\x20'+_0x438dda+_0x4256fa(0xd5)+ROUTING_CONSUMER+_0x4256fa(0xc1));return normalizeDomainOrigin(_0x438dda,_0x26142b);}export function normalizeCdnBaseUrl(_0x213f3e,_0xdb04e6){const _0x53936b=a227_0x23a198;if(typeof _0xdb04e6!=='string'||!_0xdb04e6[_0x53936b(0xd9)]())throw CliErrors[_0x53936b(0xe4)](_0x53936b(0xb3)+_0x213f3e+_0x53936b(0xf8));const _0x3a61be=_0xdb04e6[_0x53936b(0xd9)]()['replace'](/\/$/,'');let _0x513898;try{_0x513898=new URL(_0x3a61be);}catch{throw CliErrors[_0x53936b(0xe4)](_0x53936b(0xb3)+_0x213f3e+':\x20\x22'+_0xdb04e6+_0x53936b(0xc4));}if(_0x513898[_0x53936b(0xdd)]!==_0x53936b(0xb5)||_0x513898[_0x53936b(0xe3)]||_0x513898['password']||_0x513898['search']||_0x513898[_0x53936b(0xc3)]||_0x513898[_0x53936b(0xfc)][_0x53936b(0xe5)](/\/$/,'')!==_0x3a61be||_0x213f3e===_0x53936b(0xf5)&&_0x513898[_0x53936b(0xed)]!==_0x3a61be)throw CliErrors[_0x53936b(0xe4)]('Invalid\x20cdn.'+_0x213f3e+_0x53936b(0xc7)+(_0x213f3e===_0x53936b(0xf5)?'origin':'base\x20URL')+_0x53936b(0xcf));return _0x3a61be;}export function resolveEnterpriseRoutingConfig(_0x202ba9){const _0xdc0af4=a227_0x23a198;return resolveEnterpriseRoutingManifest(_0x202ba9)?.[_0xdc0af4(0xca)];}export function resolveEnterpriseRoutingManifest(_0x5dce97){const _0x257758=a227_0x23a198;if(_0x5dce97===undefined)return undefined;if(!_0x5dce97||typeof _0x5dce97!==_0x257758(0xbb)||Array[_0x257758(0xd6)](_0x5dce97))throw CliErrors[_0x257758(0xe4)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x5dce97);}function a227_0x43f2(_0x166356,_0x12823a){_0x166356=_0x166356-0xaf;const _0x4bfc68=a227_0x4bfc();let _0x43f2cd=_0x4bfc68[_0x166356];return _0x43f2cd;}export function readDomainConfigInput(_0x5aa124){const _0x4dbf48=a227_0x23a198,_0x23ec38=isAbsolute(_0x5aa124)?_0x5aa124:resolve(process[_0x4dbf48(0xda)](),_0x5aa124);if(!existsSync(_0x23ec38))throw CliErrors[_0x4dbf48(0xe4)](_0x4dbf48(0xde)+_0x23ec38);let _0x4eb89c;try{_0x4eb89c=JSON[_0x4dbf48(0xdc)](readFileSync(_0x23ec38,_0x4dbf48(0xb8)));}catch{throw CliErrors[_0x4dbf48(0xe4)]('Invalid\x20domain\x20config\x20JSON:\x20'+_0x23ec38);}if(!_0x4eb89c||typeof _0x4eb89c!==_0x4dbf48(0xbb)||Array['isArray'](_0x4eb89c))throw CliErrors[_0x4dbf48(0xe4)](_0x4dbf48(0xe9));const _0x496192=_0x4eb89c;if(_0x4dbf48(0xdd)in _0x496192)return parseEnterpriseRoutingManifest(_0x496192);const _0x1faa7a=Object['keys'](_0x496192)[_0x4dbf48(0xfa)](_0x20d9aa=>!DOMAIN_CONFIG_FIELDS[_0x4dbf48(0xcc)](_0x20d9aa));if(_0x1faa7a[_0x4dbf48(0xfb)]>0x0)throw CliErrors['validation'](_0x4dbf48(0xc6)+_0x1faa7a[_0x4dbf48(0xbd)](',\x20'),_0x4dbf48(0xc0)+DOMAIN_CONFIG_FIELDS[_0x4dbf48(0xbd)](',\x20'));const _0x16b64d={};for(const _0x1ca3b1 of DOMAIN_CONFIG_FIELDS){_0x496192[_0x1ca3b1]!==undefined&&(_0x16b64d[_0x1ca3b1]=normalizeDomainOrigin(_0x1ca3b1,_0x496192[_0x1ca3b1]));}if(Object['keys'](_0x16b64d)['length']===0x0)throw CliErrors['validation']('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':_0x4dbf48(0xb0),'domains':_0x16b64d};}export function readDomainConfig(_0x17c735){const _0x37aeb3=a227_0x23a198;return readDomainConfigInput(_0x17c735)[_0x37aeb3(0xca)];}export function resolveDomainConfigInput(_0x36e685){const _0x5b2a9d=a227_0x23a198,_0x3b56d1=(_0x36e685[_0x5b2a9d(0xc9)]('domain-config')||'')['trim'](),_0x2ad8fd=_0x3b56d1?readDomainConfigInput(_0x3b56d1):{'mode':_0x5b2a9d(0xb0),'domains':{}},_0x2dcb9b=DOMAIN_CONFIG_FIELDS[_0x5b2a9d(0xfa)](_0x4721c8=>Boolean((_0x36e685[_0x5b2a9d(0xc9)](DOMAIN_FLAGS[_0x4721c8])||'')[_0x5b2a9d(0xd9)]()));if(_0x2ad8fd['mode']==='enterprise-v1'&&_0x2dcb9b['length']>0x0)throw CliErrors[_0x5b2a9d(0xe4)](_0x5b2a9d(0xd8),_0x5b2a9d(0xdf));for(const _0x151efc of DOMAIN_CONFIG_FIELDS){const _0xab4b92=(_0x36e685[_0x5b2a9d(0xc9)](DOMAIN_FLAGS[_0x151efc])||'')[_0x5b2a9d(0xd9)]();if(_0xab4b92)_0x2ad8fd[_0x5b2a9d(0xca)][_0x151efc]=normalizeDomainOrigin(_0x151efc,_0xab4b92);}return _0x2ad8fd;}export function resolveDomainFlags(_0xe67466){return resolveDomainConfigInput(_0xe67466)['domains'];}export function parseEnterpriseRoutingManifest(_0x8fbe15){const _0x48475f=a227_0x23a198;if(_0x8fbe15[_0x48475f(0xdd)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x8fbe15[_0x48475f(0xb2)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors['validation']('Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22'+ENTERPRISE_ROUTING_PROTOCOL+_0x48475f(0xb4)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x8fbe15['domains']||typeof _0x8fbe15[_0x48475f(0xca)]!==_0x48475f(0xbb)||Array[_0x48475f(0xd6)](_0x8fbe15[_0x48475f(0xca)]))throw CliErrors[_0x48475f(0xe4)](_0x48475f(0xd7));if(!_0x8fbe15[_0x48475f(0xf9)]||typeof _0x8fbe15[_0x48475f(0xf9)]!==_0x48475f(0xbb)||Array['isArray'](_0x8fbe15[_0x48475f(0xf9)]))throw CliErrors[_0x48475f(0xe4)](_0x48475f(0xe0));const _0x454159=_0x8fbe15['domains'],_0x412797=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x48475f(0xfa)](_0x59805a=>_0x454159[_0x59805a]===undefined);if(_0x412797[_0x48475f(0xfb)]>0x0)throw CliErrors['validation']('Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20'+_0x412797['join'](',\x20'));if(_0x454159['localDomain']===undefined!==(_0x454159['certificateDomain']===undefined))throw CliErrors[_0x48475f(0xe4)]('Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.');const _0x351a6d=_0x8fbe15[_0x48475f(0xf9)],_0x1e66b4=Object['keys'](_0x351a6d)[_0x48475f(0xfa)](_0x4df9c3=>!ENTERPRISE_ROUTING_CDN_FIELDS['includes'](_0x4df9c3));if(_0x1e66b4[_0x48475f(0xfb)]>0x0)throw CliErrors[_0x48475f(0xe4)](_0x48475f(0xea)+_0x1e66b4[_0x48475f(0xbd)](',\x20'),_0x48475f(0xc0)+ENTERPRISE_ROUTING_CDN_FIELDS[_0x48475f(0xbd)](',\x20'));const _0x38c997=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS[_0x48475f(0xfa)](_0x4b1164=>_0x351a6d[_0x4b1164]===undefined);if(_0x38c997[_0x48475f(0xfb)]>0x0)throw CliErrors[_0x48475f(0xe4)](_0x48475f(0xd0)+_0x38c997['join'](',\x20'));const _0x56b5de={};for(const _0x4222d2 of ENTERPRISE_ROUTING_CDN_FIELDS){_0x56b5de[_0x4222d2]=normalizeCdnBaseUrl(_0x4222d2,_0x351a6d[_0x4222d2]);}const _0x2d82fe={},_0x374a14={};for(const _0x57488f of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x4d36d2=_0x454159[_0x57488f];if(_0x4d36d2===undefined)continue;const _0x2d08ee=normalizeRoutingDomainValue(_0x57488f,_0x4d36d2);_0x2d82fe[_0x57488f]=_0x2d08ee;const _0x4386c6=ENTERPRISE_TO_LOCAL_FIELD[_0x57488f];_0x4386c6&&(_0x374a14[_0x4386c6]=_0x2d08ee);}return{'mode':_0x48475f(0xf2),'domains':_0x374a14,'manifestDomains':_0x2d82fe,'cdn':_0x56b5de};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a228_0x4b25(){const _0x2370a8=['1818894ysUclY','1778073GMSTNu','.tmp','utf8','996dhUxvW','2117591mCthyO','1882815NYFuyA','3470AIgEsM','110mtupom','rabetbase.domain-routing.json','8Ooexht','6923997MDxKqu','/cert/lovrabet-dev.json','official','origin','292RLYasl','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','lovrabet-project-domain-routing/v1','now','independent','9630HCzUZE','http://localhost','pid','lovrabet'];a228_0x4b25=function(){return _0x2370a8;};return a228_0x4b25();}const a228_0xdf784d=a228_0x4c58;(function(_0x514f72,_0x33abae){const _0x199bbb=a228_0x4c58,_0x3b7f44=_0x514f72();while(!![]){try{const _0x4f545c=-parseInt(_0x199bbb(0x1c0))/0x1*(-parseInt(_0x199bbb(0x1b0))/0x2)+-parseInt(_0x199bbb(0x1bf))/0x3+-parseInt(_0x199bbb(0x1bd))/0x4*(parseInt(_0x199bbb(0x1b5))/0x5)+parseInt(_0x199bbb(0x1b9))/0x6+-parseInt(_0x199bbb(0x1be))/0x7*(parseInt(_0x199bbb(0x1c3))/0x8)+-parseInt(_0x199bbb(0x1ac))/0x9+parseInt(_0x199bbb(0x1c1))/0xa*(parseInt(_0x199bbb(0x1ba))/0xb);if(_0x4f545c===_0x33abae)break;else _0x3b7f44['push'](_0x3b7f44['shift']());}catch(_0x1d1c66){_0x3b7f44['push'](_0x3b7f44['shift']());}}}(a228_0x4b25,0x63cf1));import{readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getApiDomain,getAppDomain,getCertificateDomain,getKbDomain,getLocalDomain,getRuntimeDomain,getSkillDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a228_0xdf784d(0x1c2);export const PROJECT_DOMAIN_ROUTING_PROTOCOL=a228_0xdf784d(0x1b2);function a228_0x4c58(_0xea6968,_0xe5db3e){_0xea6968=_0xea6968-0x1ac;const _0x4b25be=a228_0x4b25();let _0x4c58b8=_0x4b25be[_0xea6968];return _0x4c58b8;}export function getProjectDomainRoutingManifest(){const _0x117440=a228_0xdf784d,_0x182126=getActiveRegion(),_0x4052ae=isIndependentDeployment(),_0x3caa5c=getOfficialRoutingProfile(_0x182126),_0x44d3bb=getLocalDomain(),_0x600d32=getCertificateDomain(),_0x483b9f=getActiveCdn();if(!!_0x44d3bb!==!!_0x600d32)throw new Error(_0x117440(0x1b1));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x4052ae?_0x117440(0x1b4):_0x117440(0x1ae),'region':_0x4052ae?null:_0x182126,'domains':{'api':getApiDomain(),'runtime':getRuntimeDomain(),'user':getUserDomain(),'app':getAppDomain(),'skill':getSkillDomain(),'kb':getKbDomain()},'cdn':_0x483b9f,'local':_0x44d3bb&&_0x600d32?{'origin':_0x44d3bb,'certificateUrl':_0x600d32+_0x117440(0x1ad)}:_0x4052ae?{'origin':_0x117440(0x1b6)}:{'origin':_0x3caa5c['local'][_0x117440(0x1af)],'certificateUrl':_0x483b9f[_0x117440(0x1b8)]+_0x117440(0x1ad)}};}export function writeProjectDomainRoutingManifest(_0x287c63){const _0x1dc179=a228_0xdf784d,_0x13bbe8=getProjectDomainRoutingManifest(),_0x4e497d=join(_0x287c63,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x399c44=JSON['stringify'](_0x13bbe8,null,0x2)+'\x0a';try{if(readFileSync(_0x4e497d,_0x1dc179(0x1bc))===_0x399c44)return{'path':_0x4e497d,'manifest':_0x13bbe8,'changed':![]};}catch{}const _0x27fc5e=_0x4e497d+'.'+process[_0x1dc179(0x1b7)]+'.'+Date[_0x1dc179(0x1b3)]()+_0x1dc179(0x1bb);try{writeFileSync(_0x27fc5e,_0x399c44,{'encoding':_0x1dc179(0x1bc),'mode':0x1a4}),renameSync(_0x27fc5e,_0x4e497d);}catch(_0x13fd9c){try{unlinkSync(_0x27fc5e);}catch{}throw _0x13fd9c;}return{'path':_0x4e497d,'manifest':_0x13bbe8,'changed':!![]};}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type LovrabetRegion } from "../constant/region.js";
|
|
2
|
+
export type RegionConfigSource = "app" | "project" | "global" | "config" | "default";
|
|
3
|
+
export declare function selectConfiguredRegion(options: {
|
|
4
|
+
appRegion?: unknown;
|
|
5
|
+
projectRegion?: unknown;
|
|
6
|
+
globalRegion?: unknown;
|
|
7
|
+
mergedRegion?: unknown;
|
|
8
|
+
}): {
|
|
9
|
+
value: unknown;
|
|
10
|
+
source: RegionConfigSource;
|
|
11
|
+
};
|
|
12
|
+
/** Resolve one stored region value without silently accepting unknown spellings. */
|
|
13
|
+
export declare function resolveConfiguredRegion(value: unknown, location?: string): LovrabetRegion;
|
|
14
|
+
export declare function resolveEffectiveRegion(options: {
|
|
15
|
+
appRegion?: unknown;
|
|
16
|
+
projectRegion?: unknown;
|
|
17
|
+
globalRegion?: unknown;
|
|
18
|
+
mergedRegion?: unknown;
|
|
19
|
+
appName?: string;
|
|
20
|
+
}): {
|
|
21
|
+
region: LovrabetRegion;
|
|
22
|
+
source: RegionConfigSource;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a229_0x484c(_0x1f666e,_0xb88bb6){_0x1f666e=_0x1f666e-0x1aa;const _0x23eb29=a229_0x23eb();let _0x484cf5=_0x23eb29[_0x1f666e];return _0x484cf5;}const a229_0x3d6050=a229_0x484c;(function(_0x3e82f6,_0x29d493){const _0x39e59a=a229_0x484c,_0x568290=_0x3e82f6();while(!![]){try{const _0x37008b=parseInt(_0x39e59a(0x1b8))/0x1+-parseInt(_0x39e59a(0x1b2))/0x2+-parseInt(_0x39e59a(0x1c4))/0x3*(-parseInt(_0x39e59a(0x1af))/0x4)+parseInt(_0x39e59a(0x1bb))/0x5+parseInt(_0x39e59a(0x1b0))/0x6*(parseInt(_0x39e59a(0x1b5))/0x7)+parseInt(_0x39e59a(0x1bd))/0x8+-parseInt(_0x39e59a(0x1ac))/0x9;if(_0x37008b===_0x29d493)break;else _0x568290['push'](_0x568290['shift']());}catch(_0x1c226f){_0x568290['push'](_0x568290['shift']());}}}(a229_0x23eb,0x7812f));import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from'../constant/region.js';import{CliErrors}from'../errors.js';export function selectConfiguredRegion(_0x3c6c7a){const _0x394ac3=a229_0x484c;if(_0x3c6c7a[_0x394ac3(0x1b1)]!==undefined&&_0x3c6c7a[_0x394ac3(0x1b1)]!==null&&_0x3c6c7a[_0x394ac3(0x1b1)]!=='')return{'value':_0x3c6c7a[_0x394ac3(0x1b1)],'source':'app'};if(_0x3c6c7a['projectRegion']!==undefined&&_0x3c6c7a['projectRegion']!==null&&_0x3c6c7a[_0x394ac3(0x1ba)]!=='')return{'value':_0x3c6c7a[_0x394ac3(0x1ba)],'source':_0x394ac3(0x1b3)};if(_0x3c6c7a['globalRegion']!==undefined&&_0x3c6c7a['globalRegion']!==null&&_0x3c6c7a['globalRegion']!=='')return{'value':_0x3c6c7a[_0x394ac3(0x1b7)],'source':_0x394ac3(0x1c1)};if(_0x3c6c7a[_0x394ac3(0x1bc)]!==undefined&&_0x3c6c7a[_0x394ac3(0x1bc)]!==null&&_0x3c6c7a['mergedRegion']!=='')return{'value':_0x3c6c7a[_0x394ac3(0x1bc)],'source':'config'};return{'value':undefined,'source':'default'};}function describeConfiguredRegion(_0xb73fcb){const _0x572ce1=a229_0x484c;return typeof _0xb73fcb===_0x572ce1(0x1ab)?JSON['stringify'](_0xb73fcb):'a\x20value\x20of\x20type\x20'+(_0xb73fcb===null?_0x572ce1(0x1bf):typeof _0xb73fcb);}function a229_0x23eb(){const _0x46172d=['null','\x20doctor`\x20to\x20locate\x20and\x20repair\x20the\x20invalid\x20configuration\x20before\x20retrying.','global','project\x20Rabetbase\x20configuration','source','6SYsadL','Invalid\x20country/region\x20','\x20in\x20','appName','string','5924574CaMEnb','Run\x20`','app','1713336OPICbm','132EGCneA','appRegion','979488ABTddT','project','Rabetbase\x20configuration','125594JvxKXh','global\x20Rabetbase\x20configuration','globalRegion','112423wutDZv','app\x20profile\x20\x22','projectRegion','987365aRBfQY','mergedRegion','628520eoMHmj','selected\x20app\x20profile'];a229_0x23eb=function(){return _0x46172d;};return a229_0x23eb();}export function resolveConfiguredRegion(_0x3e97b4,_0x400215=a229_0x3d6050(0x1b4)){const _0x29c894=a229_0x3d6050;if(isInvalidLovrabetRegion(_0x3e97b4))throw CliErrors['validation'](_0x29c894(0x1c5)+describeConfiguredRegion(_0x3e97b4)+_0x29c894(0x1c6)+_0x400215+'.',_0x29c894(0x1ad)+CLI_BIN_NAME+_0x29c894(0x1c0));return normalizeLovrabetRegion(_0x3e97b4)??DEFAULT_LOVRABET_REGION;}export function resolveEffectiveRegion(_0x2942ec){const _0x21d7ba=a229_0x3d6050,_0x3ac51f=selectConfiguredRegion(_0x2942ec),_0x3af841=_0x3ac51f['source']===_0x21d7ba(0x1ae)?_0x2942ec[_0x21d7ba(0x1aa)]?_0x21d7ba(0x1b9)+_0x2942ec[_0x21d7ba(0x1aa)]+'\x22':_0x21d7ba(0x1be):_0x3ac51f[_0x21d7ba(0x1c3)]===_0x21d7ba(0x1b3)?_0x21d7ba(0x1c2):_0x3ac51f[_0x21d7ba(0x1c3)]==='global'?_0x21d7ba(0x1b6):_0x21d7ba(0x1b4);return{'region':resolveConfiguredRegion(_0x3ac51f['value'],_0x3af841),'source':_0x3ac51f['source']};}
|
package/lib/config/schema.d.ts
CHANGED
|
@@ -19,11 +19,16 @@ export declare function getAppProfileFlagDefs(): FlagDef[];
|
|
|
19
19
|
export declare function collectAppProfileOverrides(getFlagValue: (name: string) => string): Record<string, any>;
|
|
20
20
|
export declare function buildAppProfileListFields(profile: Record<string, any>): Record<string, unknown>;
|
|
21
21
|
export declare function buildAppDoctorFields(profile: Record<string, any>, effective: {
|
|
22
|
+
region: string;
|
|
22
23
|
env: string;
|
|
23
24
|
apiDir: string;
|
|
24
25
|
cookie?: string;
|
|
25
26
|
accessKey?: string;
|
|
26
27
|
}): {
|
|
28
|
+
region: {
|
|
29
|
+
value: string;
|
|
30
|
+
source: "app" | "inherit";
|
|
31
|
+
};
|
|
27
32
|
env: {
|
|
28
33
|
value: string;
|
|
29
34
|
source: "app" | "inherit";
|
|
@@ -49,4 +54,14 @@ export declare function buildCanonicalProjectConfig(base: Record<string, unknown
|
|
|
49
54
|
env?: string;
|
|
50
55
|
metadata?: ConfigMetadataFields;
|
|
51
56
|
}): Record<string, any>;
|
|
57
|
+
/**
|
|
58
|
+
* Return the public on-disk configuration without persisting the default
|
|
59
|
+
* internal routing mode. Historical files remain readable; every CLI write
|
|
60
|
+
* converges them to the minimal representation.
|
|
61
|
+
*
|
|
62
|
+
* When a non-default top-level value coexists with an explicit default app
|
|
63
|
+
* override, move the inherited value into the other profiles first. This
|
|
64
|
+
* preserves effective routing while still removing every default marker.
|
|
65
|
+
*/
|
|
66
|
+
export declare function normalizeConfigForWrite(input: Record<string, any>): Record<string, any>;
|
|
52
67
|
export declare function normalizeLocale(value: string): "zh-CN" | "en-US" | null;
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a230_0xa77104=a230_0x4ff9;(function(_0x4c83f2,_0xd2be60){const _0x3795bf=a230_0x4ff9,_0x2a46a7=_0x4c83f2();while(!![]){try{const _0x309952=parseInt(_0x3795bf(0x1bf))/0x1+parseInt(_0x3795bf(0x1b3))/0x2+parseInt(_0x3795bf(0x1bd))/0x3+-parseInt(_0x3795bf(0x1a0))/0x4+parseInt(_0x3795bf(0x1ba))/0x5+-parseInt(_0x3795bf(0x190))/0x6+-parseInt(_0x3795bf(0x1c4))/0x7;if(_0x309952===_0xd2be60)break;else _0x2a46a7['push'](_0x2a46a7['shift']());}catch(_0xb8a6a2){_0x2a46a7['push'](_0x2a46a7['shift']());}}}(a230_0x1c90,0xbef5c));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,isProduction,RABETBASE_ENV_VALUES}from'../constant/env.js';function a230_0x1c90(){const _0x2b83e6=['number','en-US','867020rtPaxl','pageSize','Target\x20environment','8434830OUUUSo','kbDomain','string','env','riskLevel','join','cookie','entries','some','inherit','toLowerCase','trim','app','isArray','object','certificateDomain','2925468EMTPVW','defaultApp','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','Auth\x20cookie','zh-CN','appDomain','accessKey','length','region','userDomain','format','map','API\x20directory\x20path','Config\x20key\x20(','Risk\x20level','apps','skillDomain','keys','Access\x20key','1167828Mynlqq','runtimeDomain','values','apiDomain','filter','Default\x20page\x20size','localDomain','6570745VMIddl','has','defaultFormat','2817321EekmXr','apiDir','206034SfJqKw','fromEntries','locale'];a230_0x1c90=function(){return _0x2b83e6;};return a230_0x1c90();}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';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a230_0xa77104(0x1a6),a230_0xa77104(0x1c1),a230_0xa77104(0x1aa),'riskLevel',a230_0xa77104(0x1a8),'routing',a230_0xa77104(0x1a9),'apiDomain',a230_0xa77104(0x1b4),a230_0xa77104(0x1b0),'kbDomain','appDomain',a230_0xa77104(0x1b9),a230_0xa77104(0x19f)];export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode','env',a230_0xa77104(0x1c1),a230_0xa77104(0x1aa),'cookie',a230_0xa77104(0x1a6),a230_0xa77104(0x1be),'region','userDomain',a230_0xa77104(0x1b6),a230_0xa77104(0x1b4),a230_0xa77104(0x1b0),a230_0xa77104(0x191),a230_0xa77104(0x1a5),a230_0xa77104(0x1b9),a230_0xa77104(0x19f)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(_0x25f9f6){const _0x498d24=a230_0xa77104;return[..._0x25f9f6][_0x498d24(0x195)](',\x20');}function a230_0x4ff9(_0x3dc027,_0x2fbadb){_0x3dc027=_0x3dc027-0x18e;const _0x1c908d=a230_0x1c90();let _0x4ff954=_0x1c908d[_0x3dc027];return _0x4ff954;}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x276069){const _0x6fe5be=a230_0xa77104;return TOP_LEVEL_CONFIG_KEYS[_0x6fe5be(0x1bb)](_0x276069);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x1faac2=a230_0xa77104;return _0x1faac2(0x1ad)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'region':'region','env':a230_0xa77104(0x193),'apiDir':a230_0xa77104(0x1be),'cookie':a230_0xa77104(0x196),'accessKey':'accessKey','defaultFormat':'format','pageSize':a230_0xa77104(0x18e),'riskLevel':a230_0xa77104(0x194),'locale':a230_0xa77104(0x1c1)};export function getAppProfileFlagDefs(){const _0x33769c=a230_0xa77104;return[{'name':_0x33769c(0x1a8),'type':_0x33769c(0x192),'description':'Country/region\x20for\x20this\x20app\x20profile','enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'env','type':_0x33769c(0x192),'description':_0x33769c(0x18f),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x33769c(0x1be),'type':_0x33769c(0x192),'description':_0x33769c(0x1ac)},{'name':'cookie','type':'string','description':_0x33769c(0x1a3),'hidden':!![]},{'name':_0x33769c(0x1a6),'type':'string','description':_0x33769c(0x1b2),'hidden':!![]},{'name':_0x33769c(0x1bc),'type':_0x33769c(0x192),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x33769c(0x18e),'type':_0x33769c(0x1c2),'description':_0x33769c(0x1b8)},{'name':_0x33769c(0x194),'type':_0x33769c(0x192),'description':_0x33769c(0x1ae),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':_0x33769c(0x192),'description':_0x33769c(0x1a2)}];}export function collectAppProfileOverrides(_0x1536b0){const _0x44aae8=a230_0xa77104,_0x8cfa19={};for(const [_0x37e8b1,_0x4412e4]of Object[_0x44aae8(0x197)](APP_PROFILE_FLAG_KEY_MAP)){const _0x3e4756=_0x1536b0(_0x37e8b1);if(!_0x3e4756)continue;_0x8cfa19[_0x4412e4]=_0x4412e4==='pageSize'?Number(_0x3e4756):_0x3e4756;}return _0x8cfa19;}export function buildAppProfileListFields(_0x53278d){const _0x317944=a230_0xa77104;return{'region':_0x53278d[_0x317944(0x1a8)]??null,'env':_0x53278d['env']??null,'apiDir':_0x53278d[_0x317944(0x1be)]??null,'hasCookie':!!_0x53278d['cookie'],'hasAccessKey':!!_0x53278d[_0x317944(0x1a6)],'format':_0x53278d[_0x317944(0x1aa)]??null,'pageSize':_0x53278d['pageSize']??null,'riskLevel':_0x53278d[_0x317944(0x194)]??null,'locale':_0x53278d[_0x317944(0x1c1)]??null};}export function buildAppDoctorFields(_0x40442e,_0x209e8f){const _0x5a873d=a230_0xa77104;return{'region':{'value':_0x40442e[_0x5a873d(0x1a8)]||_0x209e8f[_0x5a873d(0x1a8)],'source':_0x40442e[_0x5a873d(0x1a8)]?'app':_0x5a873d(0x199)},'env':{'value':_0x40442e[_0x5a873d(0x193)]||_0x209e8f[_0x5a873d(0x193)],'source':_0x40442e[_0x5a873d(0x193)]?_0x5a873d(0x19c):_0x5a873d(0x199)},'apiDir':{'value':_0x40442e['apiDir']||_0x209e8f[_0x5a873d(0x1be)],'source':_0x40442e[_0x5a873d(0x1be)]?_0x5a873d(0x19c):_0x5a873d(0x199)},'cookie':{'value':_0x40442e[_0x5a873d(0x196)]||_0x209e8f[_0x5a873d(0x196)],'source':_0x40442e[_0x5a873d(0x196)]?_0x5a873d(0x19c):_0x5a873d(0x199)},'accessKey':{'value':_0x40442e[_0x5a873d(0x1a6)]||_0x209e8f[_0x5a873d(0x1a6)],'source':_0x40442e[_0x5a873d(0x1a6)]?_0x5a873d(0x19c):_0x5a873d(0x199)}};}export function buildCanonicalAppConfig(_0x421625,_0x59e579){const _0xb0df4a=a230_0xa77104,_0x2c7559=_0x421625['map'](_0x28a78f=>String(_0x28a78f||'')[_0xb0df4a(0x19b)]())[_0xb0df4a(0x1b7)](Boolean);if(_0x2c7559[_0xb0df4a(0x1a7)]===0x0)return{};const _0x4bc7d3={};for(const _0xae9f3 of _0x2c7559){_0x4bc7d3[_0xae9f3]=_0x59e579&&!isProduction(_0x59e579)?{'appcode':_0xae9f3,'env':_0x59e579}:{'appcode':_0xae9f3};}return _0x2c7559[_0xb0df4a(0x1a7)]>0x1?{'apps':_0x4bc7d3,'defaultApp':_0x2c7559[0x0]}:{'apps':_0x4bc7d3};}export function normalizeStoredDefaultApp(_0x1ceee3,_0x26d3c0){const _0x2bb82e=a230_0xa77104,_0x11af60=_0x1ceee3[_0x2bb82e(0x1af)]&&typeof _0x1ceee3[_0x2bb82e(0x1af)]===_0x2bb82e(0x19e)?_0x1ceee3[_0x2bb82e(0x1af)]:{},_0x446d9d=Object[_0x2bb82e(0x1b1)](_0x11af60);if(_0x446d9d['length']<=0x1)return delete _0x1ceee3[_0x2bb82e(0x1a1)],undefined;const _0xcc543c=typeof _0x1ceee3['defaultApp']===_0x2bb82e(0x192)&&_0x11af60[_0x1ceee3[_0x2bb82e(0x1a1)]]?_0x1ceee3[_0x2bb82e(0x1a1)]:undefined,_0x4948d8=_0x26d3c0&&_0x11af60[_0x26d3c0]?_0x26d3c0:_0xcc543c;if(_0x4948d8)return _0x1ceee3[_0x2bb82e(0x1a1)]=_0x4948d8,_0x4948d8;return delete _0x1ceee3[_0x2bb82e(0x1a1)],undefined;}export function buildCanonicalProjectConfig(_0x5e5e1d,_0x397eec){const _0x5b4687=a230_0xa77104,{appCodes:appCodes=[],env:_0x5734c2,metadata:_0x18963f}=_0x397eec,_0xba0724={..._0x5e5e1d,..._0x18963f||{}};delete _0xba0724['appcode'],delete _0xba0724['app'];const _0x189f8d=_0x5734c2||(typeof _0xba0724[_0x5b4687(0x193)]===_0x5b4687(0x192)?_0xba0724[_0x5b4687(0x193)]:'')||DEFAULT_CONFIG_VALUES['env'];if(isProduction(_0x189f8d))delete _0xba0724[_0x5b4687(0x193)];else _0xba0724['env']=_0x189f8d;const _0x2ea018=buildCanonicalAppConfig(appCodes,_0x189f8d);if(Object[_0x5b4687(0x1b1)](_0x2ea018)['length']>0x0){_0xba0724['apps']=_0x2ea018[_0x5b4687(0x1af)];if(_0x2ea018['defaultApp'])_0xba0724[_0x5b4687(0x1a1)]=_0x2ea018['defaultApp'];else delete _0xba0724['defaultApp'];}return normalizeConfigForWrite(_0xba0724);}function isRecord(_0x185de6){const _0xce06a9=a230_0xa77104;return!!_0x185de6&&typeof _0x185de6===_0xce06a9(0x19e)&&!Array[_0xce06a9(0x19d)](_0x185de6);}export function normalizeConfigForWrite(_0x55e1ac){const _0xfd7fe0=a230_0xa77104,_0x34e03d={..._0x55e1ac},_0xe95c70=isRecord(_0x55e1ac[_0xfd7fe0(0x1af)])?_0x55e1ac['apps']:undefined,_0x421f14=_0xe95c70?Object[_0xfd7fe0(0x1c0)](Object['entries'](_0xe95c70)[_0xfd7fe0(0x1ab)](([_0x1f4a83,_0x1dc2be])=>[_0x1f4a83,isRecord(_0x1dc2be)?{..._0x1dc2be}:_0x1dc2be])):undefined;if(_0x421f14){const _0x552a50=typeof _0x34e03d[_0xfd7fe0(0x193)]===_0xfd7fe0(0x192)?_0x34e03d[_0xfd7fe0(0x193)]:undefined,_0x34f05c=Object[_0xfd7fe0(0x1b5)](_0x421f14)[_0xfd7fe0(0x198)](_0x3478fb=>isRecord(_0x3478fb)&&typeof _0x3478fb[_0xfd7fe0(0x193)]===_0xfd7fe0(0x192)&&isProduction(_0x3478fb[_0xfd7fe0(0x193)]));if(_0x552a50&&isDaily(_0x552a50)&&_0x34f05c){for(const _0x468e0f of Object[_0xfd7fe0(0x1b5)](_0x421f14)){if(!isRecord(_0x468e0f))continue;if(_0x468e0f[_0xfd7fe0(0x193)]===undefined)_0x468e0f[_0xfd7fe0(0x193)]=_0x552a50;}delete _0x34e03d['env'];}for(const _0x33bbfb of Object[_0xfd7fe0(0x1b5)](_0x421f14)){isRecord(_0x33bbfb)&&typeof _0x33bbfb[_0xfd7fe0(0x193)]==='string'&&isProduction(_0x33bbfb[_0xfd7fe0(0x193)])&&delete _0x33bbfb[_0xfd7fe0(0x193)];}_0x34e03d[_0xfd7fe0(0x1af)]=_0x421f14;}return typeof _0x34e03d[_0xfd7fe0(0x193)]===_0xfd7fe0(0x192)&&isProduction(_0x34e03d[_0xfd7fe0(0x193)])&&delete _0x34e03d['env'],_0x34e03d;}const LOCALE_MAP={'zh':a230_0xa77104(0x1a4),'zh-cn':a230_0xa77104(0x1a4),'zh_cn':a230_0xa77104(0x1a4),'en':'en-US','en-us':a230_0xa77104(0x1c3),'en_us':a230_0xa77104(0x1c3)};export function normalizeLocale(_0x235ecc){const _0x5902d9=a230_0xa77104;if(!_0x235ecc)return null;return LOCALE_MAP[_0x235ecc[_0x5902d9(0x19a)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a231_0x242356=a231_0x254b;function a231_0x254b(_0x2ce6a9,_0x410b0c){_0x2ce6a9=_0x2ce6a9-0x6d;const _0x17e7ec=a231_0x17e7();let _0x254be8=_0x17e7ec[_0x2ce6a9];return _0x254be8;}function a231_0x17e7(){const _0x1fac67=['19540kjUymr','1OlehoX','102zwrcFy','30926HvneVd','3660428IWkYvX','2195457jrwyyW','/templates/projects','3088owzSZg','47739288wEJXCG','152270YbKdtk','36zeGkqo','3TELRQU','1434234nTwwPt'];a231_0x17e7=function(){return _0x1fac67;};return a231_0x17e7();}(function(_0x1c0f7f,_0x3485d7){const _0x399abb=a231_0x254b,_0x42dda9=_0x1c0f7f();while(!![]){try{const _0x3eb204=-parseInt(_0x399abb(0x6f))/0x1*(parseInt(_0x399abb(0x6d))/0x2)+parseInt(_0x399abb(0x79))/0x3*(-parseInt(_0x399abb(0x72))/0x4)+-parseInt(_0x399abb(0x6e))/0x5*(-parseInt(_0x399abb(0x70))/0x6)+parseInt(_0x399abb(0x71))/0x7*(-parseInt(_0x399abb(0x75))/0x8)+parseInt(_0x399abb(0x78))/0x9*(parseInt(_0x399abb(0x77))/0xa)+parseInt(_0x399abb(0x73))/0xb+parseInt(_0x399abb(0x76))/0xc;if(_0x3eb204===_0x3485d7)break;else _0x42dda9['push'](_0x42dda9['shift']());}catch(_0x1a8b96){_0x42dda9['push'](_0x42dda9['shift']());}}}(a231_0x17e7,0xec3d1));export const RABETBASE_CDN_BASE_URL='https://g.lovrabet.com/dist/rabetbase-cli';export const CLI_VERSION_POLICY_URL=RABETBASE_CDN_BASE_URL+'/config/index.json';export const PROJECT_TEMPLATE_ASSET_BASE_URL=RABETBASE_CDN_BASE_URL+a231_0x242356(0x74);
|