@lovrabet/rabetbase-cli 2.5.2-beta.1 → 2.5.2-beta.2
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.js +1 -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/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.d.ts +2 -0
- package/lib/commands/deployment/sync-all.js +1 -0
- package/lib/commands/deployment/sync-jobs.d.ts +2 -0
- package/lib/commands/deployment/sync-jobs.js +1 -0
- package/lib/commands/deployment/sync-status.d.ts +2 -0
- package/lib/commands/deployment/sync-status.js +1 -0
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.d.ts +2 -0
- package/lib/commands/instant-api-policy/current.js +1 -0
- package/lib/commands/instant-api-policy/index.d.ts +2 -0
- package/lib/commands/instant-api-policy/index.js +1 -0
- package/lib/commands/instant-api-policy/init.d.ts +2 -0
- package/lib/commands/instant-api-policy/init.js +1 -0
- package/lib/commands/instant-api-policy/publish.d.ts +2 -0
- package/lib/commands/instant-api-policy/publish.js +1 -0
- package/lib/commands/instant-api-policy/pull.d.ts +2 -0
- package/lib/commands/instant-api-policy/pull.js +1 -0
- package/lib/commands/instant-api-policy/revision.d.ts +2 -0
- package/lib/commands/instant-api-policy/revision.js +1 -0
- package/lib/commands/instant-api-policy/revisions.d.ts +2 -0
- package/lib/commands/instant-api-policy/revisions.js +1 -0
- package/lib/commands/instant-api-policy/rollback.d.ts +2 -0
- package/lib/commands/instant-api-policy/rollback.js +1 -0
- package/lib/commands/instant-api-policy/shared.d.ts +82 -0
- package/lib/commands/instant-api-policy/shared.js +1 -0
- package/lib/commands/instant-api-policy/validate.d.ts +2 -0
- package/lib/commands/instant-api-policy/validate.js +1 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.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/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.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +113 -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.d.ts +23 -0
- package/lib/core/instant-api-policy/config.js +1 -0
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/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/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +11 -5
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +41 -5
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +92 -0
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a219_0x7538(){const _0x31e208=['Provide\x20--file\x20or\x20--sql','utf-8','trim','toLowerCase','read','sql','2uiAJkp','pkField','push','836202YtdfCj','\x22\x20not\x20found\x20or\x20not\x20accessible','schemas','dataset','index_columns','flatMap','get','1200OOsmdL','dbtableConfig','isDangerous','map','cwd','length','name','reason','schemaWarnings','string','tableName','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','indexes','isSelectOnly','Dataset\x20\x22','appCode','primary','size','str','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','file','isArray','columnNames','130932XXzpbI','167354mopRXi','bool','joinAudit','find','576705yzZYKq','flagMissing','SQL\x20schema\x20validation','--check-indexes\x20requires\x20--schemas.','1176570VAWVPP','from','filter','check-indexes','index_type','File\x20not\x20found:\x20','sqlType','columns','type','validation','parameters','4479587ngzFQq','tables','message','3228360ELRPbK','split','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'];a219_0x7538=function(){return _0x31e208;};return a219_0x7538();}function a219_0x3249(_0x36407d,_0x2d9515){_0x36407d=_0x36407d-0x9b;const _0x75387=a219_0x7538();let _0x3249d5=_0x75387[_0x36407d];return _0x3249d5;}const a219_0x51d7f7=a219_0x3249;(function(_0x3841dc,_0x42ea79){const _0x5cb61e=a219_0x3249,_0x51ea41=_0x3841dc();while(!![]){try{const _0x215a01=-parseInt(_0x5cb61e(0xae))/0x1*(parseInt(_0x5cb61e(0xd0))/0x2)+-parseInt(_0x5cb61e(0xd8))/0x3+-parseInt(_0x5cb61e(0xa5))/0x4+parseInt(_0x5cb61e(0xd4))/0x5+parseInt(_0x5cb61e(0xb1))/0x6+-parseInt(_0x5cb61e(0xa2))/0x7+parseInt(_0x5cb61e(0xb8))/0x8*(parseInt(_0x5cb61e(0xcf))/0x9);if(_0x215a01===_0x42ea79)break;else _0x51ea41['push'](_0x51ea41['shift']());}catch(_0xbd24b5){_0x51ea41['push'](_0x51ea41['shift']());}}}(a219_0x7538,0x690fd));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';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':'sql','command':'validate','description':a219_0x51d7f7(0xc3),'risk':a219_0x51d7f7(0xac),'flags':[{'name':a219_0x51d7f7(0xcc),'type':a219_0x51d7f7(0xc1),'description':a219_0x51d7f7(0xcb)},{'name':a219_0x51d7f7(0xad),'type':a219_0x51d7f7(0xc1),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a219_0x51d7f7(0xb3),'type':a219_0x51d7f7(0xc1),'description':'Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against'},{'name':'check-indexes','type':'boolean','description':a219_0x51d7f7(0xa7)}],async 'execute'(_0x40194e){const _0x3870d9=a219_0x51d7f7,_0x4ab81e=_0x40194e[_0x3870d9(0xca)](_0x3870d9(0xcc)),_0x4e1a55=_0x40194e[_0x3870d9(0xca)](_0x3870d9(0xad)),_0x5d80fc=_0x40194e[_0x3870d9(0xca)](_0x3870d9(0xb3)),_0x4a06f3=_0x40194e[_0x3870d9(0xd1)](_0x3870d9(0xdb));if(!_0x4ab81e&&!_0x4e1a55)throw CliErrors[_0x3870d9(0xd5)]('file',_0x3870d9(0xa8));if(_0x4a06f3&&!_0x5d80fc)throw CliErrors['validation'](_0x3870d9(0xd7));let _0xfe84af;if(_0x4ab81e){const _0x345482=resolve(process[_0x3870d9(0xbc)](),_0x4ab81e);if(!existsSync(_0x345482))throw CliErrors[_0x3870d9(0xa0)](_0x3870d9(0x9c)+_0x345482);_0xfe84af=readFileSync(_0x345482,_0x3870d9(0xa9));}else _0xfe84af=_0x4e1a55;const _0x218677=validateSql(_0xfe84af),_0x361a66={'valid':_0x218677['valid'],'sqlType':_0x218677[_0x3870d9(0x9d)][_0x3870d9(0x9f)],'isSelectOnly':_0x218677[_0x3870d9(0x9d)][_0x3870d9(0xc5)],'isDangerous':_0x218677[_0x3870d9(0x9d)][_0x3870d9(0xba)],'tables':_0x218677[_0x3870d9(0xa3)],'parameters':_0x218677[_0x3870d9(0xa1)],'message':_0x218677[_0x3870d9(0xa4)]};_0x218677[_0x3870d9(0x9d)][_0x3870d9(0xbf)]&&(_0x361a66[_0x3870d9(0xbf)]=_0x218677['sqlType'][_0x3870d9(0xbf)]);if(_0x5d80fc&&_0x218677['valid']){const _0x5f0d7c=_0x5d80fc[_0x3870d9(0xa6)](',')[_0x3870d9(0xbb)](_0x33d09f=>_0x33d09f[_0x3870d9(0xaa)]())['filter'](Boolean),_0x1b7ae3=[],_0x1388dc=[],_0x984e2d=filterDbTableBackedDatasets(await listDatasets(_0x40194e[_0x3870d9(0xc7)])),_0xca91ff=new Map(_0x984e2d[_0x3870d9(0xbb)](_0x13e741=>[_0x13e741[_0x3870d9(0xb9)]?.[_0x3870d9(0xc2)]?.[_0x3870d9(0xab)](),_0x13e741]));for(const _0x37d9fe of _0x218677[_0x3870d9(0xa3)]){const _0x54b753=_0xca91ff[_0x3870d9(0xb7)](_0x37d9fe[_0x3870d9(0xab)]());!_0x54b753&&_0x1b7ae3[_0x3870d9(0xb0)]('Table\x20\x22'+_0x37d9fe+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x1670fc of _0x5f0d7c){let _0x47cfca;try{_0x47cfca=await getDatasetDetail(_0x1670fc);}catch{_0x1b7ae3[_0x3870d9(0xb0)](_0x3870d9(0xc6)+_0x1670fc+_0x3870d9(0xb2));continue;}assertDatasetIsDbTableBacked(_0x47cfca,_0x3870d9(0xd6));const _0x3e5546=Array[_0x3870d9(0xcd)](_0x47cfca['fields'])?_0x47cfca['fields']:[],_0x46f5f1=new Set(_0x3e5546['map'](_0x534139=>_0x534139[_0x3870d9(0xbe)]?.[_0x3870d9(0xab)]())),_0x47bab3=_0x47cfca[_0x3870d9(0xb9)]?.['tableName']||_0x47cfca['tableName']||_0x1670fc;_0x361a66['schema:'+_0x47bab3]={'code':_0x1670fc,'tableName':_0x47bab3,'fieldCount':_0x46f5f1[_0x3870d9(0xc9)],'fields':Array[_0x3870d9(0xd9)](_0x46f5f1)};if(_0x4a06f3){const _0x9ad2bd=normalizeDatasetIndexes(_0x47cfca);_0x1388dc['push']({'tableName':_0x47bab3,..._0x9ad2bd});}}_0x1b7ae3[_0x3870d9(0xbd)]>0x0&&(_0x361a66[_0x3870d9(0xc0)]=_0x1b7ae3),_0x4a06f3&&(_0x361a66[_0x3870d9(0xd2)]=auditSqlJoinIndexes(_0xfe84af,_0x1388dc));}return{'ok':_0x218677['valid'],'data':_0x361a66,'message':_0x218677[_0x3870d9(0xa4)]};}};function normalizeDatasetIndexes(_0x590e23){const _0x4b8ac4=a219_0x51d7f7,_0x51d12b=Array[_0x4b8ac4(0xcd)](_0x590e23?.['dataset']?.[_0x4b8ac4(0xc4)])?_0x590e23[_0x4b8ac4(0xb4)]['indexes']:Array[_0x4b8ac4(0xcd)](_0x590e23?.[_0x4b8ac4(0xc4)])?_0x590e23[_0x4b8ac4(0xc4)]:[],_0x1197b9=_0x51d12b[_0x4b8ac4(0xb6)](_0x1b8c1d=>{const _0x1873ec=_0x4b8ac4,_0x1a4d76=Array[_0x1873ec(0xcd)](_0x1b8c1d?.[_0x1873ec(0xb5)])?_0x1b8c1d[_0x1873ec(0xb5)]:Array[_0x1873ec(0xcd)](_0x1b8c1d?.[_0x1873ec(0xce)])?_0x1b8c1d[_0x1873ec(0xce)]:Array[_0x1873ec(0xcd)](_0x1b8c1d?.[_0x1873ec(0x9e)])?_0x1b8c1d[_0x1873ec(0x9e)]:[],_0x18eee3=_0x1a4d76[_0x1873ec(0xda)](_0x2357cb=>typeof _0x2357cb==='string')['map'](_0x25caaa=>_0x25caaa[_0x1873ec(0xaa)]())[_0x1873ec(0xda)](Boolean);if(_0x18eee3[_0x1873ec(0xbd)]===0x0)return[];const _0x5879df=[_0x1b8c1d?.['indexName'],_0x1b8c1d?.['index_name'],_0x1b8c1d?.[_0x1873ec(0xbe)]][_0x1873ec(0xd3)](_0x2866da=>typeof _0x2866da===_0x1873ec(0xc1)&&_0x2866da[_0x1873ec(0xaa)]()),_0x4035b9=[_0x1b8c1d?.[_0x1873ec(0x9b)],_0x1b8c1d?.[_0x1873ec(0x9f)]]['find'](_0xeb891c=>typeof _0xeb891c===_0x1873ec(0xc1)&&_0xeb891c['trim']());return[{..._0x5879df?{'name':_0x5879df[_0x1873ec(0xaa)]()}:{},..._0x4035b9?{'type':_0x4035b9[_0x1873ec(0xaa)]()}:{},'columns':_0x18eee3}];}),_0x530df5=[..._0x1197b9],_0x1f7d43=typeof _0x590e23?.[_0x4b8ac4(0xb9)]?.[_0x4b8ac4(0xaf)]===_0x4b8ac4(0xc1)?_0x590e23[_0x4b8ac4(0xb9)]['pkField'][_0x4b8ac4(0xa6)](',')[_0x4b8ac4(0xbb)](_0x1ec925=>_0x1ec925[_0x4b8ac4(0xaa)]())[_0x4b8ac4(0xda)](Boolean):[];return _0x1f7d43[_0x4b8ac4(0xbd)]>0x0&&_0x530df5['unshift']({'type':_0x4b8ac4(0xc8),'columns':_0x1f7d43}),{'indexes':_0x530df5,'metadataAvailable':_0x1197b9[_0x4b8ac4(0xbd)]>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a220_0x33dd(_0x42f53d,_0xd4a873){_0x42f53d=_0x42f53d-0xa0;const _0x68f3e9=a220_0x68f3();let _0x33ddca=_0x68f3e9[_0x42f53d];return _0x33ddca;}(function(_0x581520,_0x1b57a9){const _0x36ea39=a220_0x33dd,_0x596f86=_0x581520();while(!![]){try{const _0x2c686a=parseInt(_0x36ea39(0xa7))/0x1+parseInt(_0x36ea39(0xa6))/0x2+-parseInt(_0x36ea39(0xa5))/0x3*(parseInt(_0x36ea39(0xa3))/0x4)+parseInt(_0x36ea39(0xa2))/0x5+-parseInt(_0x36ea39(0xa4))/0x6+-parseInt(_0x36ea39(0xa1))/0x7+-parseInt(_0x36ea39(0xa0))/0x8*(-parseInt(_0x36ea39(0xa8))/0x9);if(_0x2c686a===_0x1b57a9)break;else _0x596f86['push'](_0x596f86['shift']());}catch(_0xa1d838){_0x596f86['push'](_0x596f86['shift']());}}}(a220_0x68f3,0xe9ce8));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a220_0x68f3(){const _0xea36d3=['4556316Flyxys','602061sIkodo','2697852yauTNO','617964DLxkAV','9lVktVG','1410392vmaDsf','3695755TJPnur','1512605GDGyzP','4ostBkz'];a220_0x68f3=function(){return _0xea36d3;};return a220_0x68f3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a221_0x3a397a=a221_0x5a7e;(function(_0x49f7e3,_0x3c53cb){const _0x51b849=a221_0x5a7e,_0x4829f2=_0x49f7e3();while(!![]){try{const _0x5456d0=-parseInt(_0x51b849(0x15c))/0x1*(-parseInt(_0x51b849(0x162))/0x2)+-parseInt(_0x51b849(0x171))/0x3+parseInt(_0x51b849(0x166))/0x4*(parseInt(_0x51b849(0x173))/0x5)+-parseInt(_0x51b849(0x16d))/0x6+parseInt(_0x51b849(0x170))/0x7+-parseInt(_0x51b849(0x161))/0x8*(parseInt(_0x51b849(0x169))/0x9)+-parseInt(_0x51b849(0x15b))/0xa*(-parseInt(_0x51b849(0x16c))/0xb);if(_0x5456d0===_0x3c53cb)break;else _0x4829f2['push'](_0x4829f2['shift']());}catch(_0x20178d){_0x4829f2['push'](_0x4829f2['shift']());}}}(a221_0x4ab0,0x55807));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a221_0x4ab0(){const _0xd87af6=['1889055yxYRaw','1475754GuryAV','read','61810xFmtEv','appCode','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','890wNxzED','15QHBYEp','trim','flagMissing','task-id','task','437608yKGuVc','40252AwYRZb','cookie','str','string','48rMAQTH',',\x20received\x20','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','99ZPMwqN','compress','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','100353TPOuDO','529212CuWfiJ','isTerminal','apiError'];a221_0x4ab0=function(){return _0xd87af6;};return a221_0x4ab0();}import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';function a221_0x5a7e(_0x2fa801,_0x4da748){_0x2fa801=_0x2fa801-0x15b;const _0x4ab0f2=a221_0x4ab0();let _0x5a7ecb=_0x4ab0f2[_0x2fa801];return _0x5a7ecb;}import{CliErrors}from'../../errors.js';export const taskStatus={'service':a221_0x3a397a(0x160),'command':'status','description':a221_0x3a397a(0x16b),'risk':a221_0x3a397a(0x172),'defaultOutputFormat':a221_0x3a397a(0x16a),'structuredErrors':!![],'flags':[{'name':'task-id','type':a221_0x3a397a(0x165),'required':!![],'description':a221_0x3a397a(0x175)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xcb93db){const _0x3e3e9b=a221_0x3a397a;if(!_0xcb93db[_0x3e3e9b(0x164)](_0x3e3e9b(0x15f))[_0x3e3e9b(0x15d)]())throw CliErrors[_0x3e3e9b(0x15e)](_0x3e3e9b(0x15f));},async 'execute'(_0x332f96){const _0x2f6fe6=a221_0x3a397a,_0x11e8a6=_0x332f96['str'](_0x2f6fe6(0x15f))['trim'](),_0x4458d7=normalizeAsyncTask(await getAsyncTaskStatus(_0x11e8a6,_0x332f96[_0x2f6fe6(0x174)],_0x332f96[_0x2f6fe6(0x163)]));if(_0x4458d7['taskId']!==_0x11e8a6)throw CliErrors[_0x2f6fe6(0x16f)](_0x2f6fe6(0x168)+_0x11e8a6+_0x2f6fe6(0x167)+_0x4458d7['taskId']+'.');const _0x5afb3f=buildAsyncTaskStatusCommand(_0x4458d7['taskId'],_0x332f96[_0x2f6fe6(0x174)]);return{'ok':!![],'message':asyncTaskMessage(_0x4458d7),'data':{'appCode':_0x332f96[_0x2f6fe6(0x174)],..._0x4458d7,'query':_0x4458d7[_0x2f6fe6(0x16e)]?null:{'command':_0x5afb3f}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a222_0x2416(){const _0x4164c7=['9uDcXxT','5238255xYBJen','2295294xBueHU','8853992IkYJDy','3885728scsnWq','1271939xZLTYB','6045473mpglRQ','74454tdmCyb'];a222_0x2416=function(){return _0x4164c7;};return a222_0x2416();}function a222_0x41a6(_0x12e018,_0xc40571){_0x12e018=_0x12e018-0x1c5;const _0x241675=a222_0x2416();let _0x41a68b=_0x241675[_0x12e018];return _0x41a68b;}(function(_0x5ecf34,_0x16aea6){const _0x527ebe=a222_0x41a6,_0x40febe=_0x5ecf34();while(!![]){try{const _0x5471a2=parseInt(_0x527ebe(0x1c9))/0x1+-parseInt(_0x527ebe(0x1cb))/0x2*(-parseInt(_0x527ebe(0x1cc))/0x3)+parseInt(_0x527ebe(0x1c8))/0x4+-parseInt(_0x527ebe(0x1c5))/0x5+-parseInt(_0x527ebe(0x1c6))/0x6+parseInt(_0x527ebe(0x1ca))/0x7+-parseInt(_0x527ebe(0x1c7))/0x8;if(_0x5471a2===_0x16aea6)break;else _0x40febe['push'](_0x40febe['shift']());}catch(_0x352b7e){_0x40febe['push'](_0x40febe['shift']());}}}(a222_0x2416,0xa670e));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a223_0x46ac1f=a223_0x59b3;(function(_0x35850f,_0x264ec8){const _0x2170b2=a223_0x59b3,_0x48738a=_0x35850f();while(!![]){try{const _0xf1debc=-parseInt(_0x2170b2(0x1a1))/0x1*(-parseInt(_0x2170b2(0x1af))/0x2)+parseInt(_0x2170b2(0x1a9))/0x3+parseInt(_0x2170b2(0x1a6))/0x4*(-parseInt(_0x2170b2(0x1a7))/0x5)+-parseInt(_0x2170b2(0x1aa))/0x6+-parseInt(_0x2170b2(0x1b0))/0x7+parseInt(_0x2170b2(0x1a2))/0x8+-parseInt(_0x2170b2(0x1a8))/0x9*(parseInt(_0x2170b2(0x1a3))/0xa);if(_0xf1debc===_0x264ec8)break;else _0x48738a['push'](_0x48738a['shift']());}catch(_0x40fc51){_0x48738a['push'](_0x48738a['shift']());}}}(a223_0x1b70,0xdcd2d));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a223_0x59b3(_0x145f54,_0x8462b4){_0x145f54=_0x145f54-0x19e;const _0x1b7040=a223_0x1b70();let _0x59b39a=_0x1b7040[_0x145f54];return _0x59b39a;}import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':a223_0x46ac1f(0x1a0),'command':'members-list','description':a223_0x46ac1f(0x19e),'risk':a223_0x46ac1f(0x1ab),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a223_0x46ac1f(0x1a4),'type':'string','required':!![],'description':a223_0x46ac1f(0x1ae)}],async 'validate'(_0x276a09){const _0x3e11d5=a223_0x46ac1f;if(!_0x276a09[_0x3e11d5(0x1ad)](_0x3e11d5(0x1a4))[_0x3e11d5(0x1a5)]())throw CliErrors[_0x3e11d5(0x1ac)](_0x3e11d5(0x1a4),_0x3e11d5(0x1b1));},async 'execute'(_0x3b7bc4){const _0x5a4c24=a223_0x46ac1f,_0x5eed7f=_0x3b7bc4['str'](_0x5a4c24(0x1a4))[_0x5a4c24(0x1a5)](),_0x3900a4=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x5eed7f,_0x3900a4);const _0x52806b=projectTenantMembers(await listTenantDirectoryMembers(_0x5eed7f));return{'ok':!![],'data':{'tenantCode':_0x5eed7f,'items':_0x52806b,'totalCount':_0x52806b[_0x5a4c24(0x19f)]},'message':'Found\x20'+_0x52806b[_0x5a4c24(0x19f)]+'\x20tenant\x20member(s)'};}};function a223_0x1b70(){const _0x4d04a2=['trim','37984VRejzz','45oVkdmP','2545659rQfvWz','4193868haSzAN','4953444sHOLrL','read','flagMissing','str','Exact\x20tenant\x20code','26fzuYOK','5165657EPSyFG','Pass\x20--tenant-code\x20<code>.','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','length','tenant','13754ltOyoX','10076600osUrRe','10dmAYrA','tenant-code'];a223_0x1b70=function(){return _0x4d04a2;};return a223_0x1b70();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fa559,_0x3342c8){const _0x175745=a224_0xabaa,_0x3bc25c=_0x3fa559();while(!![]){try{const _0x38c9aa=-parseInt(_0x175745(0x14a))/0x1*(parseInt(_0x175745(0x13f))/0x2)+parseInt(_0x175745(0x13a))/0x3*(-parseInt(_0x175745(0x132))/0x4)+parseInt(_0x175745(0x147))/0x5+-parseInt(_0x175745(0x136))/0x6*(-parseInt(_0x175745(0x145))/0x7)+parseInt(_0x175745(0x133))/0x8*(parseInt(_0x175745(0x12f))/0x9)+-parseInt(_0x175745(0x13c))/0xa+-parseInt(_0x175745(0x146))/0xb*(-parseInt(_0x175745(0x137))/0xc);if(_0x38c9aa===_0x3342c8)break;else _0x3bc25c['push'](_0x3bc25c['shift']());}catch(_0x54ce58){_0x3bc25c['push'](_0x3bc25c['shift']());}}}(a224_0x27de,0xa2595));function a224_0x27de(){const _0x66e0e8=['values','3042WqIeTt','40884qCydIC','tenantCode','displayName','6ALBZsX','validation','9635880UhsGGE','sort','set','366tpGlOo','status','role','get','nickname','some','4417kYigXK','880mKIBrH','6112315okmiXx','ADMIN','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','1221XxcHWI','Tenant\x20\x22','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','userId','207Lgbrix','trim','isFinite','762872aoHYHi','145568ixAwft','username'];a224_0x27de=function(){return _0x66e0e8;};return a224_0x27de();}function a224_0xabaa(_0x5d7962,_0x4f4753){_0x5d7962=_0x5d7962-0x12c;const _0x27ded0=a224_0x27de();let _0xabaaac=_0x27ded0[_0x5d7962];return _0xabaaac;}import{CliErrors}from'../../errors.js';function textOrNull(_0x213854){const _0x545aab=a224_0xabaa,_0x1861c2=_0x213854?.[_0x545aab(0x130)]();return _0x1861c2?_0x1861c2:null;}export function projectTenantMembers(_0x252f3a){const _0x2cda25=a224_0xabaa,_0x99c9=new Map();for(const _0x30b6ce of _0x252f3a){const _0x46e8cc=Number(_0x30b6ce['userId']);if(!Number[_0x2cda25(0x131)](_0x46e8cc)||_0x46e8cc<=0x0)continue;const _0x2c2563={'userId':_0x46e8cc,'username':textOrNull(_0x30b6ce['username']),'displayName':textOrNull(_0x30b6ce[_0x2cda25(0x143)]),'role':_0x30b6ce['adminFlag']===!![]?_0x2cda25(0x148):'MEMBER','status':textOrNull(_0x30b6ce['status'])},_0x53b5b1=_0x99c9[_0x2cda25(0x142)](_0x46e8cc);if(!_0x53b5b1){_0x99c9[_0x2cda25(0x13e)](_0x46e8cc,_0x2c2563);continue;}_0x53b5b1[_0x2cda25(0x134)]??=_0x2c2563[_0x2cda25(0x134)],_0x53b5b1[_0x2cda25(0x139)]??=_0x2c2563[_0x2cda25(0x139)],_0x53b5b1[_0x2cda25(0x140)]??=_0x2c2563[_0x2cda25(0x140)];if(_0x2c2563[_0x2cda25(0x141)]===_0x2cda25(0x148))_0x53b5b1[_0x2cda25(0x141)]=_0x2cda25(0x148);}return[..._0x99c9[_0x2cda25(0x135)]()][_0x2cda25(0x13d)]((_0x4404dd,_0x171271)=>_0x4404dd[_0x2cda25(0x12e)]-_0x171271[_0x2cda25(0x12e)]);}export function assertTenantAccessible(_0x441fa1,_0x491a8e){const _0x18b011=a224_0xabaa;if(_0x491a8e[_0x18b011(0x144)](_0x21d8c=>_0x21d8c[_0x18b011(0x138)]===_0x441fa1))return;throw CliErrors[_0x18b011(0x13b)](_0x18b011(0x12c)+_0x441fa1+_0x18b011(0x149),_0x18b011(0x12d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a225_0x2da18a=a225_0x5722;(function(_0x5b69c4,_0x45f867){const _0x25b0ec=a225_0x5722,_0x1042f5=_0x5b69c4();while(!![]){try{const _0x48aa0e=parseInt(_0x25b0ec(0x8b))/0x1+-parseInt(_0x25b0ec(0x84))/0x2*(-parseInt(_0x25b0ec(0x85))/0x3)+parseInt(_0x25b0ec(0x7e))/0x4*(parseInt(_0x25b0ec(0x88))/0x5)+parseInt(_0x25b0ec(0x75))/0x6*(parseInt(_0x25b0ec(0x79))/0x7)+parseInt(_0x25b0ec(0x7a))/0x8*(-parseInt(_0x25b0ec(0x77))/0x9)+parseInt(_0x25b0ec(0x7b))/0xa+-parseInt(_0x25b0ec(0x8c))/0xb;if(_0x48aa0e===_0x45f867)break;else _0x1042f5['push'](_0x1042f5['shift']());}catch(_0x402f5f){_0x1042f5['push'](_0x1042f5['shift']());}}}(a225_0x312f,0x66c28));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';function a225_0x5722(_0xdf8c45,_0x4dfabd){_0xdf8c45=_0xdf8c45-0x74;const _0x312fa5=a225_0x312f();let _0x572204=_0x312fa5[_0xdf8c45];return _0x572204;}import{CliErrors}from'../../errors.js';const PROVIDER_ID=a225_0x2da18a(0x8d),CURRENT_BINDING_WARNING=a225_0x2da18a(0x76);function readDingTalkUserId(_0x2cadf3){const _0x481a9b=a225_0x2da18a,_0x2ec45c=_0x2cadf3[_0x481a9b(0x86)](_0x481a9b(0x80))['trim']();if(!_0x2ec45c)throw CliErrors[_0x481a9b(0x83)](_0x481a9b(0x7c),_0x481a9b(0x7f));return _0x2ec45c;}function a225_0x312f(){const _0x1b5c82=['943422AyObSo','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','46449mjCBwF','user-account','7aWCARR','8FBTixp','7672030Rvgaut','--ding-talk-user-id\x20cannot\x20be\x20empty.','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','75356heIHTe','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','ding-talk-user-id','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','POST','validation','178626FwkVRR','9TcygJO','str','DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','80xMzbQN','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','string','622652FKlaWO','18594290hsTFqF','dingtalk','dingding-sandbox-bind'];a225_0x312f=function(){return _0x1b5c82;};return a225_0x312f();}function buildBindingData(_0x316c20,_0x88d06a){const _0x5a5c33=a225_0x2da18a;return{'operation':'bind','selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x316c20},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x316c20,'bound':!![]},'dryRun':_0x88d06a,'backend':{'method':_0x5a5c33(0x82),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a225_0x2da18a(0x78),'command':a225_0x2da18a(0x74),'description':a225_0x2da18a(0x81),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a225_0x2da18a(0x80),'type':a225_0x2da18a(0x8a),'required':!![],'description':'DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox'}],async 'validate'(_0x2030e6){readDingTalkUserId(_0x2030e6);},async 'dryRun'(_0x498e78){const _0x1e532d=a225_0x2da18a,_0x56fd5a=readDingTalkUserId(_0x498e78);return asDryRunResult(buildBindingData(_0x56fd5a,!![]),{'method':_0x1e532d(0x82),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x1a9e1b){const _0x9476b2=a225_0x2da18a,_0x4e42f2=readDingTalkUserId(_0x1a9e1b),_0x46bac9=await bindDingTalkSandboxAccount(_0x4e42f2);if(_0x46bac9!==!![])throw CliErrors['apiError'](_0x9476b2(0x87),_0x9476b2(0x89));return{'ok':!![],'data':buildBindingData(_0x4e42f2,![]),'message':_0x9476b2(0x7d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a226_0x1d49(){const _0xcbc8cd=['522935QuXEeL','227028hoWOkX','138826lQwZUW','6QhoNmG','536wrTsOu','164582pPTkdH','759610EheThT','22023bXWTmC','159856YqCwWE'];a226_0x1d49=function(){return _0xcbc8cd;};return a226_0x1d49();}(function(_0x5de297,_0x5159fc){const _0x21fd79=a226_0x1e9b,_0x3d87d7=_0x5de297();while(!![]){try{const _0x861868=-parseInt(_0x21fd79(0xce))/0x1+-parseInt(_0x21fd79(0xd4))/0x2+parseInt(_0x21fd79(0xd3))/0x3+parseInt(_0x21fd79(0xd1))/0x4+parseInt(_0x21fd79(0xcf))/0x5+parseInt(_0x21fd79(0xd5))/0x6*(-parseInt(_0x21fd79(0xd2))/0x7)+-parseInt(_0x21fd79(0xd6))/0x8*(-parseInt(_0x21fd79(0xd0))/0x9);if(_0x861868===_0x5159fc)break;else _0x3d87d7['push'](_0x3d87d7['shift']());}catch(_0x5b016e){_0x3d87d7['push'](_0x3d87d7['shift']());}}}(a226_0x1d49,0x1dfbb));function a226_0x1e9b(_0x13d235,_0x274731){_0x13d235=_0x13d235-0xce;const _0x1d49f3=a226_0x1d49();let _0x1e9ba5=_0x1d49f3[_0x13d235];return _0x1e9ba5;}import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a227_0x42da(){const _0x441049=['4PMLFvg','App\x20profile\x20name','12HAspAD','195548PoePLs','2221515nkaYfc','45hsrUyj','912BKLTJN','3346350zMIsht','write','workspace\x20add','workspace','527580TaJMCt','1682752SdHQJO','16IXoeSw','35530zSqnfd','9593370ruOoip','add','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)'];a227_0x42da=function(){return _0x441049;};return a227_0x42da();}const a227_0x3a6b2d=a227_0x26d0;(function(_0x358ef4,_0x35389d){const _0x42d66f=a227_0x26d0,_0x1dd1c1=_0x358ef4();while(!![]){try{const _0x121b58=-parseInt(_0x42d66f(0x1d1))/0x1*(-parseInt(_0x42d66f(0x1c7))/0x2)+parseInt(_0x42d66f(0x1cf))/0x3*(parseInt(_0x42d66f(0x1c4))/0x4)+parseInt(_0x42d66f(0x1c8))/0x5*(parseInt(_0x42d66f(0x1c6))/0x6)+parseInt(_0x42d66f(0x1cb))/0x7+-parseInt(_0x42d66f(0x1d0))/0x8*(parseInt(_0x42d66f(0x1c9))/0x9)+-parseInt(_0x42d66f(0x1c1))/0xa+parseInt(_0x42d66f(0x1c0))/0xb*(-parseInt(_0x42d66f(0x1ca))/0xc);if(_0x121b58===_0x35389d)break;else _0x1dd1c1['push'](_0x1dd1c1['shift']());}catch(_0x4f9bbc){_0x1dd1c1['push'](_0x1dd1c1['shift']());}}}(a227_0x42da,0xcf9bb));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a227_0x26d0(_0xe3f5e3,_0x4540e4){_0xe3f5e3=_0xe3f5e3-0x1c0;const _0x42da1c=a227_0x42da();let _0x26d094=_0x42da1c[_0xe3f5e3];return _0x26d094;}export const workspaceAddDefinition={'service':a227_0x3a6b2d(0x1ce),'command':a227_0x3a6b2d(0x1c2),'description':a227_0x3a6b2d(0x1c3),'risk':a227_0x3a6b2d(0x1cc),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a227_0x3a6b2d(0x1c5),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x2bed53=>validateAppName(_0x2bed53,a227_0x3a6b2d(0x1cd)),'execute':_0x5f21f9=>runAppAdd(_0x5f21f9,a227_0x3a6b2d(0x1cd))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a228_0x41349a=a228_0x13c5;(function(_0x590c90,_0x5b9f0a){const _0x264a6f=a228_0x13c5,_0x3fe30b=_0x590c90();while(!![]){try{const _0x5329c4=parseInt(_0x264a6f(0x20f))/0x1+-parseInt(_0x264a6f(0x1e3))/0x2+-parseInt(_0x264a6f(0x1f6))/0x3*(parseInt(_0x264a6f(0x1ed))/0x4)+parseInt(_0x264a6f(0x208))/0x5*(parseInt(_0x264a6f(0x20d))/0x6)+parseInt(_0x264a6f(0x1ef))/0x7+-parseInt(_0x264a6f(0x213))/0x8+parseInt(_0x264a6f(0x1e6))/0x9;if(_0x5329c4===_0x5b9f0a)break;else _0x3fe30b['push'](_0x3fe30b['shift']());}catch(_0x46c21e){_0x3fe30b['push'](_0x3fe30b['shift']());}}}(a228_0x29fb,0x2de9f));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';function a228_0x13c5(_0x3828ae,_0x495868){_0x3828ae=_0x3828ae-0x1df;const _0x29fbac=a228_0x29fb();let _0x13c5e8=_0x29fbac[_0x3828ae];return _0x13c5e8;}import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';import{normalizeStoredDefaultApp}from'../../config/schema.js';const WORKSPACE_USAGE=CLI_BIN_NAME+'\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]',SAFE_PROFILE_KEYS=[a228_0x41349a(0x1e8),a228_0x41349a(0x1f2),a228_0x41349a(0x203),'format',a228_0x41349a(0x1f3),a228_0x41349a(0x20e),a228_0x41349a(0x204)],workspaceFlags=[{'name':a228_0x41349a(0x1e4),'type':a228_0x41349a(0x209),'description':a228_0x41349a(0x1e7)},{'name':a228_0x41349a(0x1e8),'type':a228_0x41349a(0x209),'description':a228_0x41349a(0x214)},{'name':a228_0x41349a(0x1f2),'type':a228_0x41349a(0x209),'description':a228_0x41349a(0x1e2),'enum':[...RABETBASE_ENV_VALUES]},{'name':a228_0x41349a(0x203),'type':a228_0x41349a(0x209),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'defaultFormat','type':a228_0x41349a(0x209),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a228_0x41349a(0x1f3),'type':a228_0x41349a(0x206),'description':a228_0x41349a(0x1f5)},{'name':'riskLevel','type':a228_0x41349a(0x209),'description':a228_0x41349a(0x1f1),'enum':[...RISK_LEVEL_VALUES]},{'name':a228_0x41349a(0x204),'type':a228_0x41349a(0x209),'description':a228_0x41349a(0x1ee)}];function isRecord(_0xe343eb){const _0x759e75=a228_0x41349a;return!!_0xe343eb&&typeof _0xe343eb===_0x759e75(0x1fe)&&!Array['isArray'](_0xe343eb);}function assertValidAppcode(_0x650a13){const _0x433310=a228_0x41349a,{valid:_0x32373c,message:_0x3edfdb}=validateAppcode(_0x650a13);if(!_0x32373c)throw CliErrors[_0x433310(0x1eb)](_0x433310(0x200)+_0x650a13,_0x3edfdb);}function sanitizeProfile(_0x5f5a03){if(!isRecord(_0x5f5a03))return{};const _0x2ccbf2={};for(const _0x54e29e of SAFE_PROFILE_KEYS){if(_0x5f5a03[_0x54e29e]!==undefined)_0x2ccbf2[_0x54e29e]=_0x5f5a03[_0x54e29e];}return _0x2ccbf2;}function cloneProfile(_0x56696f){return isRecord(_0x56696f)?{..._0x56696f}:{};}function a228_0x29fb(){const _0x3b8674=['114893AREkcA','str','\x20--app\x20','use','2691248tOSndT','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','Workspace\x20','workspace','\x20--appcode\x20<code>`.','App\x20\x22','Target\x20environment','619014QRinwd','app','Switch\x20the\x20current\x20workspace\x20app\x20binding','5894271YmAUNc','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','appcode','project','keys','validation','Use\x20`','146960LiYgkQ','App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','1003674XiXHfi','\x20workspace\x20','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','env','pageSize','Missing\x20workspace\x20app\x20selector.','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','15zMrrUI','initialized','write','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','workspace.','join','\x20workspace\x20use\x20--app\x20<name>`.','trim','object',').\x20Config:\x20','Invalid\x20appcode:\x20','init','format','apiDir','locale','defaultFormat','number','globalConfig','30730DpTohe','string','.\x20Credentials:\x20not\x20written.','apps','\x22\x20not\x20found.','102CFlOGm','riskLevel'];a228_0x29fb=function(){return _0x3b8674;};return a228_0x29fb();}function collectWorkspaceProfileOverrides(_0x51d0dc){const _0x5bad37=a228_0x41349a,_0xca2d91={},_0x280fa0=_0x51d0dc['str'](_0x5bad37(0x1f2)),_0x1dcd83=_0x51d0dc[_0x5bad37(0x210)](_0x5bad37(0x203)),_0x5deb5b=_0x51d0dc[_0x5bad37(0x210)](_0x5bad37(0x205)),_0x58332e=_0x51d0dc['flag'](_0x5bad37(0x1f3)),_0x5c14a7=_0x51d0dc[_0x5bad37(0x210)](_0x5bad37(0x20e)),_0x2e8e0c=_0x51d0dc[_0x5bad37(0x210)](_0x5bad37(0x204));if(_0x280fa0)_0xca2d91[_0x5bad37(0x1f2)]=_0x280fa0;if(_0x1dcd83)_0xca2d91[_0x5bad37(0x203)]=_0x1dcd83;if(_0x5deb5b)_0xca2d91[_0x5bad37(0x202)]=_0x5deb5b;if(_0x58332e!==undefined&&_0x58332e!=='')_0xca2d91['pageSize']=Number(_0x58332e);if(_0x5c14a7)_0xca2d91[_0x5bad37(0x20e)]=_0x5c14a7;if(_0x2e8e0c)_0xca2d91[_0x5bad37(0x204)]=_0x2e8e0c;return _0xca2d91;}async function validateWorkspaceArgs(_0x3b34ad){const _0x1fb4bf=a228_0x41349a,_0x14d35d=_0x3b34ad[_0x1fb4bf(0x210)](_0x1fb4bf(0x1e4))[_0x1fb4bf(0x1fd)](),_0x2dbf58=_0x3b34ad['str'](_0x1fb4bf(0x1e8))[_0x1fb4bf(0x1fd)]();if(!_0x14d35d&&!_0x2dbf58)throw CliErrors['validation'](_0x1fb4bf(0x1f4),_0x1fb4bf(0x1ec)+CLI_BIN_NAME+_0x1fb4bf(0x1f9)+CLI_BIN_NAME+_0x1fb4bf(0x1fc));if(_0x2dbf58)assertValidAppcode(_0x2dbf58);}function resolveKnownApps(){const _0x518a2a=a228_0x41349a,{config:_0xe1d240,layers:_0x3ef6f}=readRawConfigWithLayers(),_0x2ee4ea=isRecord(_0xe1d240['apps'])?_0xe1d240['apps']:{},_0x7a7145=isRecord(_0x3ef6f[_0x518a2a(0x207)]['apps'])?_0x3ef6f['globalConfig']['apps']:{};return{..._0x7a7145,..._0x2ee4ea};}async function configureWorkspace(_0x3ba9d5,_0xe66db3){const _0x3bed8b=a228_0x41349a,_0x387f53=_0x3ba9d5['str'](_0x3bed8b(0x1e4))['trim'](),_0x132f3c=_0x3ba9d5['str'](_0x3bed8b(0x1e8))[_0x3bed8b(0x1fd)](),_0x59f870=_0x387f53||_0x132f3c;if(!_0x59f870)throw CliErrors[_0x3bed8b(0x1eb)](_0x3bed8b(0x1f4),_0x3bed8b(0x1ec)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x3bed8b(0x1fc));if(_0x132f3c)assertValidAppcode(_0x132f3c);const _0x5449b7=resolveWriteConfigPath(_0x3bed8b(0x1e9)),_0xbbf573=readConfigFile(_0x5449b7),_0x4c718e=resolveKnownApps(),_0x12b20e=isRecord(_0xbbf573['apps'])?{..._0xbbf573['apps']}:{},_0x339df5=cloneProfile(_0x12b20e[_0x59f870]),_0x78ff33=sanitizeProfile(_0x4c718e[_0x59f870]),_0xd6dab1=_0x132f3c?{}:_0x78ff33,_0x118a30=_0x132f3c||_0xd6dab1[_0x3bed8b(0x1e8)];if(!_0x118a30){const _0x3561e9=Object[_0x3bed8b(0x1ea)](_0x4c718e),_0x1702bc=_0x3561e9['length']===0x0?_0x3bed8b(0x1ec)+CLI_BIN_NAME+_0x3bed8b(0x1f0)+_0xe66db3+_0x3bed8b(0x211)+_0x59f870+_0x3bed8b(0x1e0):'Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20'+_0x3561e9[_0x3bed8b(0x1fb)](',\x20');throw CliErrors[_0x3bed8b(0x1eb)](_0x3bed8b(0x1e1)+_0x59f870+_0x3bed8b(0x20c),_0x1702bc);}assertValidAppcode(String(_0x118a30));const _0x2d8480={..._0xd6dab1,..._0x339df5,'appcode':String(_0x118a30),...collectWorkspaceProfileOverrides(_0x3ba9d5)};return _0x12b20e[_0x59f870]=_0x2d8480,_0xbbf573[_0x3bed8b(0x20b)]=_0x12b20e,normalizeStoredDefaultApp(_0xbbf573,_0x59f870),delete _0xbbf573[_0x3bed8b(0x1e8)],delete _0xbbf573['app'],_0x2d8480[_0x3bed8b(0x1f2)]&&(_0xbbf573[_0x3bed8b(0x1f2)]=_0x2d8480[_0x3bed8b(0x1f2)]),writeConfigFile(_0x5449b7,_0xbbf573),{'ok':!![],'message':_0x3bed8b(0x215)+(_0xe66db3===_0x3bed8b(0x201)?_0x3bed8b(0x1f7):'updated')+':\x20'+_0x59f870+'\x20(appcode:\x20'+_0x2d8480[_0x3bed8b(0x1e8)]+_0x3bed8b(0x1ff)+_0x5449b7+_0x3bed8b(0x20a),'data':{'operation':_0x3bed8b(0x1fa)+_0xe66db3,'configPath':_0x5449b7,'app':_0x59f870,'appcode':_0x2d8480[_0x3bed8b(0x1e8)],'env':_0x2d8480['env']??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a228_0x41349a(0x1df),'command':a228_0x41349a(0x201),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a228_0x41349a(0x1f8),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x27e29d=>configureWorkspace(_0x27e29d,a228_0x41349a(0x201))},workspaceUseDefinition={'service':a228_0x41349a(0x1df),'command':'use','description':a228_0x41349a(0x1e5),'risk':a228_0x41349a(0x1f8),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x6a65e=>configureWorkspace(_0x6a65e,a228_0x41349a(0x212))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a229_0x4bf4ea=a229_0xf3fe;function a229_0x1588(){const _0x232043=['6268505FPfThn','2ibHcOq','1144201KjJrbR','remove','1609278YrenHI','workspace\x20remove','225XQWhLN','write','848720HeIkvW','workspace','10339469jkdFHa','App\x20profile\x20name\x20to\x20remove','2702160VdBLMJ','1608570yenGVt','name'];a229_0x1588=function(){return _0x232043;};return a229_0x1588();}(function(_0xef76fa,_0x4929bd){const _0x1f15c7=a229_0xf3fe,_0x167c8a=_0xef76fa();while(!![]){try{const _0x3b5502=-parseInt(_0x1f15c7(0x131))/0x1*(parseInt(_0x1f15c7(0x130))/0x2)+parseInt(_0x1f15c7(0x12d))/0x3+-parseInt(_0x1f15c7(0x12c))/0x4+parseInt(_0x1f15c7(0x12f))/0x5+-parseInt(_0x1f15c7(0x133))/0x6+-parseInt(_0x1f15c7(0x12a))/0x7+parseInt(_0x1f15c7(0x137))/0x8*(parseInt(_0x1f15c7(0x135))/0x9);if(_0x3b5502===_0x4929bd)break;else _0x167c8a['push'](_0x167c8a['shift']());}catch(_0x7256eb){_0x167c8a['push'](_0x167c8a['shift']());}}}(a229_0x1588,0xd6240));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a229_0xf3fe(_0x110ecb,_0x4dcec9){_0x110ecb=_0x110ecb-0x129;const _0x1588e4=a229_0x1588();let _0xf3fe66=_0x1588e4[_0x110ecb];return _0xf3fe66;}export const workspaceRemoveDefinition={'service':a229_0x4bf4ea(0x129),'command':a229_0x4bf4ea(0x132),'description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a229_0x4bf4ea(0x136),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a229_0x4bf4ea(0x12e),'description':a229_0x4bf4ea(0x12b),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x28f39d=>validateAppName(_0x28f39d,a229_0x4bf4ea(0x134)),'execute':_0xd745b2=>runAppRemove(_0xd745b2,a229_0x4bf4ea(0x134))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a217_0x1a17b2=a217_0x5513;(function(_0x4a4c9b,_0x33e751){const _0x1995ed=a217_0x5513,_0x360a4c=_0x4a4c9b();while(!![]){try{const _0x2fdfdd=-parseInt(_0x1995ed(0x1bf))/0x1+-parseInt(_0x1995ed(0x1be))/0x2+parseInt(_0x1995ed(0x1d9))/0x3+-parseInt(_0x1995ed(0x1d3))/0x4+parseInt(_0x1995ed(0x1c9))/0x5*(-parseInt(_0x1995ed(0x1d7))/0x6)+parseInt(_0x1995ed(0x1cd))/0x7*(-parseInt(_0x1995ed(0x1f4))/0x8)+parseInt(_0x1995ed(0x1fb))/0x9*(parseInt(_0x1995ed(0x1bb))/0xa);if(_0x2fdfdd===_0x33e751)break;else _0x360a4c['push'](_0x360a4c['shift']());}catch(_0x540884){_0x360a4c['push'](_0x360a4c['shift']());}}}(a217_0x2d2f,0xe35a0));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS,ENTERPRISE_ROUTING_CONSUMERS,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a217_0x1a17b2(0x1ba),'apiDomain','runtimeDomain',a217_0x1a17b2(0x1fc),a217_0x1a17b2(0x1b6),a217_0x1a17b2(0x1cc),a217_0x1a17b2(0x1b5),a217_0x1a17b2(0x1c5)];const DOMAIN_FLAGS={'userDomain':a217_0x1a17b2(0x1b2),'apiDomain':a217_0x1a17b2(0x1e6),'runtimeDomain':a217_0x1a17b2(0x1de),'skillDomain':a217_0x1a17b2(0x1ae),'kbDomain':'kb-domain','appDomain':a217_0x1a17b2(0x1ad),'localDomain':'local-domain','certificateDomain':a217_0x1a17b2(0x1da)};function a217_0x5513(_0x9594c7,_0x20a6ea){_0x9594c7=_0x9594c7-0x1ad;const _0x2d2f07=a217_0x2d2f();let _0x551354=_0x2d2f07[_0x9594c7];return _0x551354;}export const LEGACY_DOMAIN_CONFIG_FIELDS=[a217_0x1a17b2(0x1e1),a217_0x1a17b2(0x1f6),a217_0x1a17b2(0x1b0)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a217_0x1a17b2(0x1ba),'apiDomain':a217_0x1a17b2(0x200),'runtimeDomain':a217_0x1a17b2(0x1f5),'skillDomain':a217_0x1a17b2(0x1fc),'kbDomain':a217_0x1a17b2(0x1b6),'appDomain':a217_0x1a17b2(0x1cc),'localDomain':a217_0x1a17b2(0x1b5),'certificateDomain':a217_0x1a17b2(0x1c5)},ROUTING_CONSUMER=a217_0x1a17b2(0x1ca);export function normalizeDomainOrigin(_0x2c7ae8,_0x222d45){const _0x4289b5=a217_0x1a17b2;if(typeof _0x222d45!==_0x4289b5(0x1fe)||!_0x222d45[_0x4289b5(0x1b1)]())throw CliErrors[_0x4289b5(0x1e5)](_0x4289b5(0x1d8)+_0x2c7ae8+_0x4289b5(0x1ff));let _0x1e0260;try{_0x1e0260=new URL(_0x222d45['trim']());}catch{throw CliErrors[_0x4289b5(0x1e5)](_0x4289b5(0x1d8)+_0x2c7ae8+_0x4289b5(0x1db)+_0x222d45+_0x4289b5(0x1e3));}if(_0x1e0260[_0x4289b5(0x1e0)]!==_0x4289b5(0x1f9)||_0x1e0260[_0x4289b5(0x1e9)]||_0x1e0260['password']||_0x1e0260[_0x4289b5(0x1c4)]!=='/'&&_0x1e0260[_0x4289b5(0x1c4)]!==''||_0x1e0260[_0x4289b5(0x1b3)]||_0x1e0260[_0x4289b5(0x1c8)])throw CliErrors['validation'](_0x4289b5(0x1d8)+_0x2c7ae8+_0x4289b5(0x1d2),_0x4289b5(0x1d4));return _0x1e0260[_0x4289b5(0x1f0)];}export function normalizeRoutingDomainValue(_0x18c457,_0x17592b){const _0x3be6bb=a217_0x1a17b2;if(typeof _0x17592b===_0x3be6bb(0x1fe))return normalizeDomainOrigin(_0x18c457,_0x17592b);if(!_0x17592b||typeof _0x17592b!==_0x3be6bb(0x1c3)||Array['isArray'](_0x17592b))throw CliErrors[_0x3be6bb(0x1e5)](_0x3be6bb(0x1d8)+_0x18c457+_0x3be6bb(0x1f7));const _0x36fb75=_0x17592b,_0xaee8e3=Object['keys'](_0x36fb75),_0x1917ab=[_0x3be6bb(0x1cf),...ENTERPRISE_ROUTING_CONSUMERS],_0x4acd83=_0xaee8e3['filter'](_0x2ea4bb=>!_0x1917ab[_0x3be6bb(0x1ed)](_0x2ea4bb));if(_0x4acd83['length']>0x0)throw CliErrors[_0x3be6bb(0x1e5)]('Unsupported\x20'+_0x18c457+_0x3be6bb(0x1cb)+_0x4acd83['join'](',\x20'),_0x3be6bb(0x1dc)+_0x1917ab['join'](',\x20'));if(_0xaee8e3['length']===0x0)throw CliErrors[_0x3be6bb(0x1e5)](_0x3be6bb(0x1d8)+_0x18c457+_0x3be6bb(0x1eb));const _0x529b44={};for(const _0x3cfa33 of _0xaee8e3){const _0x49f64b=_0x3cfa33;_0x529b44[_0x49f64b]=normalizeDomainOrigin(_0x18c457,_0x36fb75[_0x3cfa33]);}return _0x529b44;}export function normalizeCdnBaseUrl(_0x25249a,_0x44788d){const _0x698760=a217_0x1a17b2;if(typeof _0x44788d!==_0x698760(0x1fe)||!_0x44788d[_0x698760(0x1b1)]())throw CliErrors['validation']('Invalid\x20cdn.'+_0x25249a+':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.');const _0x3d9f79=_0x44788d['trim']()[_0x698760(0x1bc)](/\/$/,'');let _0x5b96e4;try{_0x5b96e4=new URL(_0x3d9f79);}catch{throw CliErrors[_0x698760(0x1e5)](_0x698760(0x202)+_0x25249a+_0x698760(0x1db)+_0x44788d+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x5b96e4['protocol']!==_0x698760(0x1f9)||_0x5b96e4[_0x698760(0x1e9)]||_0x5b96e4[_0x698760(0x1af)]||_0x5b96e4[_0x698760(0x1b3)]||_0x5b96e4[_0x698760(0x1c8)]||_0x5b96e4['href'][_0x698760(0x1bc)](/\/$/,'')!==_0x3d9f79||_0x25249a==='lovrabet'&&_0x5b96e4[_0x698760(0x1f0)]!==_0x3d9f79)throw CliErrors['validation'](_0x698760(0x202)+_0x25249a+_0x698760(0x1e2)+(_0x25249a===_0x698760(0x1ef)?_0x698760(0x1f0):_0x698760(0x1f2))+_0x698760(0x1e4));return _0x3d9f79;}export function resolveEnterpriseRoutingConfig(_0x35eb4b){return resolveEnterpriseRoutingManifest(_0x35eb4b)?.['domains'];}export function resolveEnterpriseRoutingManifest(_0x3e0f3f){const _0x33c77c=a217_0x1a17b2;if(_0x3e0f3f===undefined)return undefined;if(!_0x3e0f3f||typeof _0x3e0f3f!=='object'||Array['isArray'](_0x3e0f3f))throw CliErrors[_0x33c77c(0x1e5)](_0x33c77c(0x1b9));return parseEnterpriseRoutingManifest(_0x3e0f3f);}export function resolveRoutingDomainValue(_0x16b793,_0x28bcca,_0x4fd0fa){const _0x18db5a=a217_0x1a17b2;if(typeof _0x28bcca===_0x18db5a(0x1fe))return _0x28bcca;const _0x2661be=_0x28bcca[_0x4fd0fa]??_0x28bcca['default'];if(!_0x2661be)throw CliErrors[_0x18db5a(0x1e5)](_0x18db5a(0x201)+_0x16b793+'\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'+_0x4fd0fa+_0x18db5a(0x1b4));return _0x2661be;}function a217_0x2d2f(){const _0x563b82=['apiDomain','Enterprise\x20','Invalid\x20cdn.','app-domain','skill-domain','password','skillHubDomain','trim','user-domain','search','\x20and\x20has\x20no\x20default.','localDomain','kbDomain','domains','enterprise-v1','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.','userDomain','65590wagjEa','replace','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','1638036lIJbsa','1372765SYeOsC','Unsupported\x20domain\x20config\x20field(s):\x20','legacy','cdn','object','pathname','certificateDomain','\x22\x20and\x20kind\x20\x22','isArray','hash','370uaEzjV','rabetbase-cli','\x20consumer(s):\x20','appDomain','100772ohaoDl','join','default','kind','Unsupported\x20enterprise\x20routing\x20field(s):\x20',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','338196ZKjhkb','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','keys','56412QVJjSE','Invalid\x20','2186109UUADLU','certificate-domain',':\x20\x22','Allowed\x20consumers:\x20','str','runtime-domain','filter','protocol','agentDomain',':\x20expected\x20an\x20HTTPS\x20','\x22\x20is\x20not\x20a\x20valid\x20URL.','\x20without\x20credentials,\x20query,\x20or\x20fragment.','validation','api-domain','length','domain-config','username','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22',':\x20consumer\x20Domain\x20object\x20cannot\x20be\x20empty.','Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','includes','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','lovrabet','origin','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','base\x20URL','Unsupported\x20enterprise\x20Domain\x20field(s):\x20','944ATGJak','runtimeDomain','platformDomain',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','utf8','https:','Allowed\x20fields:\x20','6687LWPJUL','skillDomain','Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.','string',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.'];a217_0x2d2f=function(){return _0x563b82;};return a217_0x2d2f();}export function readDomainConfigInput(_0x4a4021){const _0x25a008=a217_0x1a17b2,_0x1bdb18=isAbsolute(_0x4a4021)?_0x4a4021:resolve(process['cwd'](),_0x4a4021);if(!existsSync(_0x1bdb18))throw CliErrors['validation']('Domain\x20config\x20file\x20not\x20found:\x20'+_0x1bdb18);let _0x2f490b;try{_0x2f490b=JSON['parse'](readFileSync(_0x1bdb18,_0x25a008(0x1f8)));}catch{throw CliErrors[_0x25a008(0x1e5)]('Invalid\x20domain\x20config\x20JSON:\x20'+_0x1bdb18);}if(!_0x2f490b||typeof _0x2f490b!==_0x25a008(0x1c3)||Array['isArray'](_0x2f490b))throw CliErrors[_0x25a008(0x1e5)]('Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.');const _0x37ddfa=_0x2f490b;if(_0x25a008(0x1e0)in _0x37ddfa)return parseEnterpriseRoutingManifest(_0x37ddfa);const _0x29952d=Object['keys'](_0x37ddfa)[_0x25a008(0x1df)](_0x1a431f=>!DOMAIN_CONFIG_FIELDS[_0x25a008(0x1ed)](_0x1a431f));if(_0x29952d[_0x25a008(0x1e7)]>0x0)throw CliErrors[_0x25a008(0x1e5)](_0x25a008(0x1c0)+_0x29952d['join'](',\x20'),_0x25a008(0x1fa)+DOMAIN_CONFIG_FIELDS[_0x25a008(0x1ce)](',\x20'));const _0x428eb8={};for(const _0x315e49 of DOMAIN_CONFIG_FIELDS){_0x37ddfa[_0x315e49]!==undefined&&(_0x428eb8[_0x315e49]=normalizeDomainOrigin(_0x315e49,_0x37ddfa[_0x315e49]));}if(Object['keys'](_0x428eb8)[_0x25a008(0x1e7)]===0x0)throw CliErrors['validation'](_0x25a008(0x1bd));return{'mode':_0x25a008(0x1c1),'domains':_0x428eb8};}export function readDomainConfig(_0x27a855){return readDomainConfigInput(_0x27a855)['domains'];}export function resolveDomainConfigInput(_0x1d0034){const _0x442237=a217_0x1a17b2,_0x14d5bd=(_0x1d0034[_0x442237(0x1dd)](_0x442237(0x1e8))||'')[_0x442237(0x1b1)](),_0x513239=_0x14d5bd?readDomainConfigInput(_0x14d5bd):{'mode':_0x442237(0x1c1),'domains':{}},_0x3ec4d8=DOMAIN_CONFIG_FIELDS[_0x442237(0x1df)](_0xeb6cfb=>Boolean((_0x1d0034[_0x442237(0x1dd)](DOMAIN_FLAGS[_0xeb6cfb])||'')[_0x442237(0x1b1)]()));if(_0x513239['mode']===_0x442237(0x1b8)&&_0x3ec4d8[_0x442237(0x1e7)]>0x0)throw CliErrors[_0x442237(0x1e5)](_0x442237(0x1d5),_0x442237(0x1ee));for(const _0x148655 of DOMAIN_CONFIG_FIELDS){const _0x2ff73d=(_0x1d0034['str'](DOMAIN_FLAGS[_0x148655])||'')['trim']();if(_0x2ff73d)_0x513239[_0x442237(0x1b7)][_0x148655]=normalizeDomainOrigin(_0x148655,_0x2ff73d);}return _0x513239;}export function resolveDomainFlags(_0xac7357){const _0x39d324=a217_0x1a17b2;return resolveDomainConfigInput(_0xac7357)[_0x39d324(0x1b7)];}export function parseEnterpriseRoutingManifest(_0x1c78b8){const _0x2158b0=a217_0x1a17b2,_0x30f198=Object[_0x2158b0(0x1d6)](_0x1c78b8)[_0x2158b0(0x1df)](_0x11e397=>!ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS['includes'](_0x11e397));if(_0x30f198[_0x2158b0(0x1e7)]>0x0)throw CliErrors[_0x2158b0(0x1e5)](_0x2158b0(0x1d1)+_0x30f198[_0x2158b0(0x1ce)](',\x20'));if(_0x1c78b8[_0x2158b0(0x1e0)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x1c78b8[_0x2158b0(0x1d0)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x2158b0(0x1e5)](_0x2158b0(0x1ea)+ENTERPRISE_ROUTING_PROTOCOL+_0x2158b0(0x1c6)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x1c78b8[_0x2158b0(0x1b7)]||typeof _0x1c78b8[_0x2158b0(0x1b7)]!==_0x2158b0(0x1c3)||Array[_0x2158b0(0x1c7)](_0x1c78b8['domains']))throw CliErrors[_0x2158b0(0x1e5)]('Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.');if(!_0x1c78b8[_0x2158b0(0x1c2)]||typeof _0x1c78b8[_0x2158b0(0x1c2)]!=='object'||Array[_0x2158b0(0x1c7)](_0x1c78b8[_0x2158b0(0x1c2)]))throw CliErrors[_0x2158b0(0x1e5)](_0x2158b0(0x1fd));const _0x3ed0f9=_0x1c78b8['domains'],_0x406fad=Object['keys'](_0x3ed0f9)[_0x2158b0(0x1df)](_0x309191=>!ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x2158b0(0x1ed)](_0x309191));if(_0x406fad[_0x2158b0(0x1e7)]>0x0)throw CliErrors[_0x2158b0(0x1e5)](_0x2158b0(0x1f3)+_0x406fad[_0x2158b0(0x1ce)](',\x20'),_0x2158b0(0x1fa)+ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x2158b0(0x1ce)](',\x20'));const _0x373c35=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x2158b0(0x1df)](_0x44c664=>_0x3ed0f9[_0x44c664]===undefined);if(_0x373c35[_0x2158b0(0x1e7)]>0x0)throw CliErrors[_0x2158b0(0x1e5)]('Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20'+_0x373c35['join'](',\x20'));if(_0x3ed0f9['localDomain']===undefined!==(_0x3ed0f9[_0x2158b0(0x1c5)]===undefined))throw CliErrors[_0x2158b0(0x1e5)](_0x2158b0(0x1ec));const _0x188b30=_0x1c78b8[_0x2158b0(0x1c2)],_0x10fc81=Object[_0x2158b0(0x1d6)](_0x188b30)[_0x2158b0(0x1df)](_0x5a2b2b=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x2158b0(0x1ed)](_0x5a2b2b));if(_0x10fc81[_0x2158b0(0x1e7)]>0x0)throw CliErrors['validation']('Unsupported\x20enterprise\x20CDN\x20field(s):\x20'+_0x10fc81[_0x2158b0(0x1ce)](',\x20'),_0x2158b0(0x1fa)+ENTERPRISE_ROUTING_CDN_FIELDS[_0x2158b0(0x1ce)](',\x20'));const _0x5c6000=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS[_0x2158b0(0x1df)](_0x1e6969=>_0x188b30[_0x1e6969]===undefined);if(_0x5c6000[_0x2158b0(0x1e7)]>0x0)throw CliErrors[_0x2158b0(0x1e5)](_0x2158b0(0x1f1)+_0x5c6000[_0x2158b0(0x1ce)](',\x20'));const _0x1283aa={};for(const _0x183e2b of ENTERPRISE_ROUTING_CDN_FIELDS){_0x1283aa[_0x183e2b]=normalizeCdnBaseUrl(_0x183e2b,_0x188b30[_0x183e2b]);}const _0x2ed3b6={},_0x4d45fa={};for(const _0x46053c of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x73982e=_0x3ed0f9[_0x46053c];if(_0x73982e===undefined)continue;const _0x4d5539=normalizeRoutingDomainValue(_0x46053c,_0x73982e);_0x2ed3b6[_0x46053c]=_0x4d5539;const _0x3a5d05=ENTERPRISE_TO_LOCAL_FIELD[_0x46053c];_0x3a5d05&&(_0x4d45fa[_0x3a5d05]=resolveRoutingDomainValue(_0x46053c,_0x4d5539,ROUTING_CONSUMER));}return{'mode':_0x2158b0(0x1b8),'domains':_0x4d45fa,'manifestDomains':_0x2ed3b6,'cdn':_0x1283aa};}
|
|
1
|
+
const a230_0xbaf8f5=a230_0x1794;function a230_0x4a83(){const _0x3d4f11=[':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','username','Allowed\x20consumers:\x20','isArray','default','replace','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','362958gqLnwy','enterprise-v1','Allowed\x20fields:\x20','certificateDomain','origin','certificate-domain','\x22\x20is\x20not\x20a\x20valid\x20URL.','skill-domain','platformDomain','124xhgNBG','32761160JjuvFA','includes','domains','Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.',':\x20consumer\x20Domain\x20object\x20cannot\x20be\x20empty.','lovrabet','domain-config','Unsupported\x20','appDomain','pathname','https:','utf8','rabetbase-cli','mode','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','protocol','keys','runtimeDomain','localDomain','apiDomain','runtime-domain','href',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','kbDomain','Enterprise\x20',':\x20expected\x20an\x20HTTPS\x20','password','Domain\x20config\x20file\x20not\x20found:\x20','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.',':\x20\x22','\x20without\x20credentials,\x20query,\x20or\x20fragment.','join','10550qbTWGB','kb-domain','filter','agentDomain','object','52210xmbyjt','str','userDomain','cdn','legacy','length','base\x20URL','kind','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','skillHubDomain','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','string','1730772wdUZHw','Unsupported\x20enterprise\x20Domain\x20field(s):\x20','6623480CXUuAt','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','Invalid\x20cdn.','133IGVvgm','trim','cwd','user-domain','local-domain','Invalid\x20','api-domain','222kiNzBV','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','hash','app-domain','validation','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','\x20consumer(s):\x20','812196iWokQy'];a230_0x4a83=function(){return _0x3d4f11;};return a230_0x4a83();}(function(_0x1afba4,_0x2bd393){const _0x38b551=a230_0x1794,_0x3fa707=_0x1afba4();while(!![]){try{const _0x260d6f=-parseInt(_0x38b551(0xb2))/0x1*(-parseInt(_0x38b551(0x94))/0x2)+parseInt(_0x38b551(0xb9))/0x3+-parseInt(_0x38b551(0xca))/0x4*(-parseInt(_0x38b551(0x99))/0x5)+parseInt(_0x38b551(0xc1))/0x6*(parseInt(_0x38b551(0xab))/0x7)+parseInt(_0x38b551(0xa7))/0x8+parseInt(_0x38b551(0xa5))/0x9+-parseInt(_0x38b551(0x73))/0xa;if(_0x260d6f===_0x2bd393)break;else _0x3fa707['push'](_0x3fa707['shift']());}catch(_0x54d956){_0x3fa707['push'](_0x3fa707['shift']());}}}(a230_0x4a83,0xa0e22));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS,ENTERPRISE_ROUTING_CONSUMERS,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a230_0xbaf8f5(0x9b),'apiDomain',a230_0xbaf8f5(0x85),'skillDomain',a230_0xbaf8f5(0x8b),a230_0xbaf8f5(0x7c),a230_0xbaf8f5(0x86),a230_0xbaf8f5(0xc4)];const DOMAIN_FLAGS={'userDomain':a230_0xbaf8f5(0xae),'apiDomain':a230_0xbaf8f5(0xb1),'runtimeDomain':a230_0xbaf8f5(0x88),'skillDomain':a230_0xbaf8f5(0xc8),'kbDomain':a230_0xbaf8f5(0x95),'appDomain':a230_0xbaf8f5(0xb5),'localDomain':a230_0xbaf8f5(0xaf),'certificateDomain':a230_0xbaf8f5(0xc6)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a230_0xbaf8f5(0x97),a230_0xbaf8f5(0xc9),a230_0xbaf8f5(0xa2)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':'userDomain','apiDomain':a230_0xbaf8f5(0x87),'runtimeDomain':a230_0xbaf8f5(0x85),'skillDomain':'skillDomain','kbDomain':a230_0xbaf8f5(0x8b),'appDomain':a230_0xbaf8f5(0x7c),'localDomain':a230_0xbaf8f5(0x86),'certificateDomain':a230_0xbaf8f5(0xc4)},ROUTING_CONSUMER=a230_0xbaf8f5(0x80);export function normalizeDomainOrigin(_0x5b5132,_0x3f4dcb){const _0x49633a=a230_0xbaf8f5;if(typeof _0x3f4dcb!==_0x49633a(0xa4)||!_0x3f4dcb[_0x49633a(0xac)]())throw CliErrors[_0x49633a(0xb6)](_0x49633a(0xb0)+_0x5b5132+_0x49633a(0xba));let _0x777c9a;try{_0x777c9a=new URL(_0x3f4dcb[_0x49633a(0xac)]());}catch{throw CliErrors['validation'](_0x49633a(0xb0)+_0x5b5132+_0x49633a(0x91)+_0x3f4dcb+_0x49633a(0xc7));}if(_0x777c9a[_0x49633a(0x83)]!==_0x49633a(0x7e)||_0x777c9a[_0x49633a(0xbb)]||_0x777c9a[_0x49633a(0x8e)]||_0x777c9a[_0x49633a(0x7d)]!=='/'&&_0x777c9a['pathname']!==''||_0x777c9a['search']||_0x777c9a[_0x49633a(0xb4)])throw CliErrors[_0x49633a(0xb6)](_0x49633a(0xb0)+_0x5b5132+_0x49633a(0x77),_0x49633a(0xb7));return _0x777c9a[_0x49633a(0xc5)];}export function normalizeRoutingDomainValue(_0x2fa5a1,_0x182e96){const _0x175c2f=a230_0xbaf8f5;if(typeof _0x182e96===_0x175c2f(0xa4))return normalizeDomainOrigin(_0x2fa5a1,_0x182e96);if(!_0x182e96||typeof _0x182e96!==_0x175c2f(0x98)||Array[_0x175c2f(0xbd)](_0x182e96))throw CliErrors[_0x175c2f(0xb6)](_0x175c2f(0xb0)+_0x2fa5a1+':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.');const _0xd76280=_0x182e96,_0x37e25b=Object['keys'](_0xd76280),_0x5e0105=[_0x175c2f(0xbe),...ENTERPRISE_ROUTING_CONSUMERS],_0x5a31d0=_0x37e25b[_0x175c2f(0x96)](_0x135d2c=>!_0x5e0105[_0x175c2f(0x74)](_0x135d2c));if(_0x5a31d0['length']>0x0)throw CliErrors[_0x175c2f(0xb6)](_0x175c2f(0x7b)+_0x2fa5a1+_0x175c2f(0xb8)+_0x5a31d0[_0x175c2f(0x93)](',\x20'),_0x175c2f(0xbc)+_0x5e0105['join'](',\x20'));if(_0x37e25b[_0x175c2f(0x9e)]===0x0)throw CliErrors[_0x175c2f(0xb6)](_0x175c2f(0xb0)+_0x2fa5a1+_0x175c2f(0x78));const _0x58af52={};for(const _0x2f19b0 of _0x37e25b){const _0x5198cb=_0x2f19b0;_0x58af52[_0x5198cb]=normalizeDomainOrigin(_0x2fa5a1,_0xd76280[_0x2f19b0]);}return _0x58af52;}export function normalizeCdnBaseUrl(_0x564141,_0x206653){const _0x392b30=a230_0xbaf8f5;if(typeof _0x206653!==_0x392b30(0xa4)||!_0x206653[_0x392b30(0xac)]())throw CliErrors[_0x392b30(0xb6)]('Invalid\x20cdn.'+_0x564141+_0x392b30(0x8a));const _0x189eb6=_0x206653[_0x392b30(0xac)]()[_0x392b30(0xbf)](/\/$/,'');let _0x2e7e91;try{_0x2e7e91=new URL(_0x189eb6);}catch{throw CliErrors['validation'](_0x392b30(0xaa)+_0x564141+':\x20\x22'+_0x206653+_0x392b30(0xc7));}if(_0x2e7e91[_0x392b30(0x83)]!==_0x392b30(0x7e)||_0x2e7e91[_0x392b30(0xbb)]||_0x2e7e91[_0x392b30(0x8e)]||_0x2e7e91['search']||_0x2e7e91[_0x392b30(0xb4)]||_0x2e7e91[_0x392b30(0x89)][_0x392b30(0xbf)](/\/$/,'')!==_0x189eb6||_0x564141===_0x392b30(0x79)&&_0x2e7e91[_0x392b30(0xc5)]!==_0x189eb6)throw CliErrors[_0x392b30(0xb6)](_0x392b30(0xaa)+_0x564141+_0x392b30(0x8d)+(_0x564141===_0x392b30(0x79)?_0x392b30(0xc5):_0x392b30(0x9f))+_0x392b30(0x92));return _0x189eb6;}export function resolveEnterpriseRoutingConfig(_0x349794){const _0x51feb4=a230_0xbaf8f5;return resolveEnterpriseRoutingManifest(_0x349794)?.[_0x51feb4(0x75)];}export function resolveEnterpriseRoutingManifest(_0x56571e){const _0xa9298=a230_0xbaf8f5;if(_0x56571e===undefined)return undefined;if(!_0x56571e||typeof _0x56571e!==_0xa9298(0x98)||Array[_0xa9298(0xbd)](_0x56571e))throw CliErrors[_0xa9298(0xb6)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x56571e);}export function resolveRoutingDomainValue(_0x4253b6,_0x531d27,_0x3f7d75){const _0x56a7ea=a230_0xbaf8f5;if(typeof _0x531d27===_0x56a7ea(0xa4))return _0x531d27;const _0x515a0a=_0x531d27[_0x3f7d75]??_0x531d27['default'];if(!_0x515a0a)throw CliErrors[_0x56a7ea(0xb6)](_0x56a7ea(0x8c)+_0x4253b6+_0x56a7ea(0xc0)+_0x3f7d75+'\x20and\x20has\x20no\x20default.');return _0x515a0a;}export function readDomainConfigInput(_0x5e4392){const _0x461f7d=a230_0xbaf8f5,_0x4862e9=isAbsolute(_0x5e4392)?_0x5e4392:resolve(process[_0x461f7d(0xad)](),_0x5e4392);if(!existsSync(_0x4862e9))throw CliErrors[_0x461f7d(0xb6)](_0x461f7d(0x8f)+_0x4862e9);let _0x639ba6;try{_0x639ba6=JSON['parse'](readFileSync(_0x4862e9,_0x461f7d(0x7f)));}catch{throw CliErrors['validation']('Invalid\x20domain\x20config\x20JSON:\x20'+_0x4862e9);}if(!_0x639ba6||typeof _0x639ba6!==_0x461f7d(0x98)||Array['isArray'](_0x639ba6))throw CliErrors[_0x461f7d(0xb6)](_0x461f7d(0xa1));const _0x13f104=_0x639ba6;if('protocol'in _0x13f104)return parseEnterpriseRoutingManifest(_0x13f104);const _0x353da2=Object['keys'](_0x13f104)[_0x461f7d(0x96)](_0x2ce49d=>!DOMAIN_CONFIG_FIELDS[_0x461f7d(0x74)](_0x2ce49d));if(_0x353da2[_0x461f7d(0x9e)]>0x0)throw CliErrors['validation']('Unsupported\x20domain\x20config\x20field(s):\x20'+_0x353da2[_0x461f7d(0x93)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS[_0x461f7d(0x93)](',\x20'));const _0x25905b={};for(const _0x4cf122 of DOMAIN_CONFIG_FIELDS){_0x13f104[_0x4cf122]!==undefined&&(_0x25905b[_0x4cf122]=normalizeDomainOrigin(_0x4cf122,_0x13f104[_0x4cf122]));}if(Object[_0x461f7d(0x84)](_0x25905b)[_0x461f7d(0x9e)]===0x0)throw CliErrors[_0x461f7d(0xb6)](_0x461f7d(0x82));return{'mode':_0x461f7d(0x9d),'domains':_0x25905b};}export function readDomainConfig(_0x5d7fe0){return readDomainConfigInput(_0x5d7fe0)['domains'];}export function resolveDomainConfigInput(_0x1175d5){const _0x1f52b4=a230_0xbaf8f5,_0xb3d986=(_0x1175d5['str'](_0x1f52b4(0x7a))||'')[_0x1f52b4(0xac)](),_0x4822bd=_0xb3d986?readDomainConfigInput(_0xb3d986):{'mode':_0x1f52b4(0x9d),'domains':{}},_0x11840e=DOMAIN_CONFIG_FIELDS[_0x1f52b4(0x96)](_0xb0e778=>Boolean((_0x1175d5[_0x1f52b4(0x9a)](DOMAIN_FLAGS[_0xb0e778])||'')[_0x1f52b4(0xac)]()));if(_0x4822bd[_0x1f52b4(0x81)]===_0x1f52b4(0xc2)&&_0x11840e[_0x1f52b4(0x9e)]>0x0)throw CliErrors['validation']('Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.');for(const _0x218285 of DOMAIN_CONFIG_FIELDS){const _0x4e51cf=(_0x1175d5[_0x1f52b4(0x9a)](DOMAIN_FLAGS[_0x218285])||'')[_0x1f52b4(0xac)]();if(_0x4e51cf)_0x4822bd[_0x1f52b4(0x75)][_0x218285]=normalizeDomainOrigin(_0x218285,_0x4e51cf);}return _0x4822bd;}function a230_0x1794(_0x19532b,_0x4c737c){_0x19532b=_0x19532b-0x73;const _0x4a83bf=a230_0x4a83();let _0x179456=_0x4a83bf[_0x19532b];return _0x179456;}export function resolveDomainFlags(_0x566409){return resolveDomainConfigInput(_0x566409)['domains'];}export function parseEnterpriseRoutingManifest(_0x5ab4f0){const _0x49103b=a230_0xbaf8f5,_0x36fd79=Object[_0x49103b(0x84)](_0x5ab4f0)[_0x49103b(0x96)](_0x4adf51=>!ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS[_0x49103b(0x74)](_0x4adf51));if(_0x36fd79['length']>0x0)throw CliErrors['validation']('Unsupported\x20enterprise\x20routing\x20field(s):\x20'+_0x36fd79[_0x49103b(0x93)](',\x20'));if(_0x5ab4f0[_0x49103b(0x83)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x5ab4f0[_0x49103b(0xa0)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xa8)+ENTERPRISE_ROUTING_PROTOCOL+'\x22\x20and\x20kind\x20\x22'+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x5ab4f0[_0x49103b(0x75)]||typeof _0x5ab4f0[_0x49103b(0x75)]!=='object'||Array[_0x49103b(0xbd)](_0x5ab4f0[_0x49103b(0x75)]))throw CliErrors['validation'](_0x49103b(0x90));if(!_0x5ab4f0['cdn']||typeof _0x5ab4f0['cdn']!==_0x49103b(0x98)||Array[_0x49103b(0xbd)](_0x5ab4f0[_0x49103b(0x9c)]))throw CliErrors[_0x49103b(0xb6)](_0x49103b(0x76));const _0x433697=_0x5ab4f0['domains'],_0x4887fb=Object['keys'](_0x433697)[_0x49103b(0x96)](_0x2b7149=>!ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x49103b(0x74)](_0x2b7149));if(_0x4887fb[_0x49103b(0x9e)]>0x0)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xa6)+_0x4887fb[_0x49103b(0x93)](',\x20'),_0x49103b(0xc3)+ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x49103b(0x93)](',\x20'));const _0x3c528b=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x49103b(0x96)](_0x2d1372=>_0x433697[_0x2d1372]===undefined);if(_0x3c528b[_0x49103b(0x9e)]>0x0)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xa3)+_0x3c528b[_0x49103b(0x93)](',\x20'));if(_0x433697[_0x49103b(0x86)]===undefined!==(_0x433697[_0x49103b(0xc4)]===undefined))throw CliErrors['validation']('Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.');const _0x11c563=_0x5ab4f0[_0x49103b(0x9c)],_0x443e00=Object['keys'](_0x11c563)[_0x49103b(0x96)](_0x348575=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x49103b(0x74)](_0x348575));if(_0x443e00['length']>0x0)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xb3)+_0x443e00['join'](',\x20'),_0x49103b(0xc3)+ENTERPRISE_ROUTING_CDN_FIELDS[_0x49103b(0x93)](',\x20'));const _0xb3df30=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS['filter'](_0x194218=>_0x11c563[_0x194218]===undefined);if(_0xb3df30[_0x49103b(0x9e)]>0x0)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xa9)+_0xb3df30[_0x49103b(0x93)](',\x20'));const _0xb9d289={};for(const _0x365aad of ENTERPRISE_ROUTING_CDN_FIELDS){_0xb9d289[_0x365aad]=normalizeCdnBaseUrl(_0x365aad,_0x11c563[_0x365aad]);}const _0xbd5a4={},_0x312f30={};for(const _0x380d87 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x479d92=_0x433697[_0x380d87];if(_0x479d92===undefined)continue;const _0x30940d=normalizeRoutingDomainValue(_0x380d87,_0x479d92);_0xbd5a4[_0x380d87]=_0x30940d;const _0xeb04c8=ENTERPRISE_TO_LOCAL_FIELD[_0x380d87];_0xeb04c8&&(_0x312f30[_0xeb04c8]=resolveRoutingDomainValue(_0x380d87,_0x30940d,ROUTING_CONSUMER));}return{'mode':_0x49103b(0xc2),'domains':_0x312f30,'manifestDomains':_0xbd5a4,'cdn':_0xb9d289};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a231_0x41ec67=a231_0x44ee;(function(_0x5a7ae8,_0x230552){const _0x5aab4a=a231_0x44ee,_0x498d2b=_0x5a7ae8();while(!![]){try{const _0x39700a=-parseInt(_0x5aab4a(0x1e6))/0x1+-parseInt(_0x5aab4a(0x1ec))/0x2+parseInt(_0x5aab4a(0x1f1))/0x3*(-parseInt(_0x5aab4a(0x1f2))/0x4)+-parseInt(_0x5aab4a(0x1f3))/0x5*(parseInt(_0x5aab4a(0x1ef))/0x6)+-parseInt(_0x5aab4a(0x1e7))/0x7*(-parseInt(_0x5aab4a(0x1e8))/0x8)+parseInt(_0x5aab4a(0x1e3))/0x9*(-parseInt(_0x5aab4a(0x1e9))/0xa)+parseInt(_0x5aab4a(0x1f4))/0xb;if(_0x39700a===_0x230552)break;else _0x498d2b['push'](_0x498d2b['shift']());}catch(_0x20608f){_0x498d2b['push'](_0x498d2b['shift']());}}}(a231_0x72b7,0x5e682));import{renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getAppDomain,getCertificateDomain,getLocalDomain,getRuntimeDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a231_0x41ec67(0x1ed);export const PROJECT_DOMAIN_ROUTING_PROTOCOL=a231_0x41ec67(0x1f9);export function getProjectDomainRoutingManifest(){const _0x532fd2=a231_0x41ec67,_0x5b09f4=getActiveRegion(),_0x1779dc=isIndependentDeployment(),_0x436f99=getOfficialRoutingProfile(_0x5b09f4),_0x84013e=getLocalDomain(),_0x322b26=getCertificateDomain(),_0xd8349c=getActiveCdn();if(!!_0x84013e!==!!_0x322b26)throw new Error(_0x532fd2(0x1ea));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x1779dc?_0x532fd2(0x1ee):_0x532fd2(0x1f0),'region':_0x1779dc?null:_0x5b09f4,'domains':{'user':getUserDomain(),'app':getAppDomain(),'runtime':getRuntimeDomain()},'cdn':_0xd8349c,'local':_0x84013e&&_0x322b26?{'origin':_0x84013e,'certificateUrl':_0x322b26+_0x532fd2(0x1e5)}:_0x1779dc?{'origin':_0x532fd2(0x1fa)}:{'origin':_0x436f99['local'][_0x532fd2(0x1f5)],'certificateUrl':_0xd8349c[_0x532fd2(0x1f8)]+'/cert/lovrabet-dev.json'}};}function a231_0x44ee(_0x17384c,_0x426b45){_0x17384c=_0x17384c-0x1e3;const _0x72b705=a231_0x72b7();let _0x44eec1=_0x72b705[_0x17384c];return _0x44eec1;}export function writeProjectDomainRoutingManifest(_0x1efcfc){const _0x29ef68=a231_0x41ec67,_0xe7bd90=getProjectDomainRoutingManifest(),_0x594dac=join(_0x1efcfc,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x382cb1=_0x594dac+'.'+process[_0x29ef68(0x1eb)]+'.'+Date[_0x29ef68(0x1f7)]()+'.tmp';try{writeFileSync(_0x382cb1,JSON[_0x29ef68(0x1f6)](_0xe7bd90,null,0x2)+'\x0a',{'encoding':_0x29ef68(0x1e4),'mode':0x1a4}),renameSync(_0x382cb1,_0x594dac);}catch(_0x5f114b){try{unlinkSync(_0x382cb1);}catch{}throw _0x5f114b;}return{'path':_0x594dac,'manifest':_0xe7bd90};}function a231_0x72b7(){const _0x323693=['40nQTLIu','28206123vxixjm','origin','stringify','now','lovrabet','lovrabet-project-domain-routing/v1','http://localhost','60948DKLTiI','utf8','/cert/lovrabet-dev.json','737049RJDyow','7GXEYAY','2404936AUZvpQ','370lfRZKt','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','pid','351232WqUiSt','rabetbase.domain-routing.json','independent','557154XQFrbr','official','9cdgWxx','762692tevzUQ'];a231_0x72b7=function(){return _0x323693;};return a231_0x72b7();}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a232_0x5a9312=a232_0x210f;(function(_0x51e59c,_0x494cfe){const _0x4f9445=a232_0x210f,_0x195945=_0x51e59c();while(!![]){try{const _0x246609=parseInt(_0x4f9445(0x99))/0x1*(parseInt(_0x4f9445(0x9a))/0x2)+parseInt(_0x4f9445(0x7c))/0x3*(-parseInt(_0x4f9445(0x87))/0x4)+parseInt(_0x4f9445(0x82))/0x5+parseInt(_0x4f9445(0xa3))/0x6+parseInt(_0x4f9445(0x90))/0x7*(-parseInt(_0x4f9445(0x72))/0x8)+parseInt(_0x4f9445(0x98))/0x9+-parseInt(_0x4f9445(0x8e))/0xa;if(_0x246609===_0x494cfe)break;else _0x195945['push'](_0x195945['shift']());}catch(_0x21b6af){_0x195945['push'](_0x195945['shift']());}}}(a232_0x30ac,0x43d60));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';function a232_0x210f(_0x7edee9,_0x30f52d){_0x7edee9=_0x7edee9-0x71;const _0x30ac29=a232_0x30ac();let _0x210f1a=_0x30ac29[_0x7edee9];return _0x210f1a;}import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';function a232_0x30ac(){const _0x1b17e6=['certificateDomain','135093LtuxaK','locale','length','format','map','pageSize','1527230ZqPVKz','inherit','app','apps','filter','24iCwHXa','region','Target\x20environment','defaultApp','apiDomain','string','accessKey','2791700dnATCG','riskLevel','105WLbQin','toLowerCase','appDomain','runtimeDomain','defaultFormat','kbDomain','keys','cookie','4188411YHjinq','122SAEjiR','4074eoOMmq','join','appcode','env','has','en-US','Auth\x20cookie','entries','zh-CN','897708hLrYkG','apiDir','182264vjqjZE','Default\x20page\x20size','userDomain','skillDomain','Config\x20key\x20(','number','object','API\x20directory\x20path','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)'];a232_0x30ac=function(){return _0x1b17e6;};return a232_0x30ac();}import{ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a232_0x5a9312(0x97),a232_0x5a9312(0x8d),a232_0x5a9312(0x7d),a232_0x5a9312(0x7f),'riskLevel',a232_0x5a9312(0x88),'routing',a232_0x5a9312(0x74),a232_0x5a9312(0x8b),a232_0x5a9312(0x93),a232_0x5a9312(0x75),a232_0x5a9312(0x95),a232_0x5a9312(0x92),'localDomain',a232_0x5a9312(0x7b)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a232_0x5a9312(0x9c),a232_0x5a9312(0x9d),a232_0x5a9312(0x7d),a232_0x5a9312(0x7f),'cookie',a232_0x5a9312(0x8d),a232_0x5a9312(0x71),a232_0x5a9312(0x88),'userDomain',a232_0x5a9312(0x8b),'runtimeDomain',a232_0x5a9312(0x75),a232_0x5a9312(0x95),a232_0x5a9312(0x92),'localDomain',a232_0x5a9312(0x7b)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(_0x350805){const _0x535915=a232_0x5a9312;return[..._0x350805][_0x535915(0x9b)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x5b1236){const _0xbf3af2=a232_0x5a9312;return TOP_LEVEL_CONFIG_KEYS[_0xbf3af2(0x9e)](_0x5b1236);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x536edd=a232_0x5a9312;return _0x536edd(0x76)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a232_0x5a9312(0x9d),'apiDir':a232_0x5a9312(0x71),'cookie':a232_0x5a9312(0x97),'accessKey':a232_0x5a9312(0x8d),'defaultFormat':'format','pageSize':'pageSize','riskLevel':a232_0x5a9312(0x8f),'locale':a232_0x5a9312(0x7d)};export function getAppProfileFlagDefs(){const _0x448ae3=a232_0x5a9312;return[{'name':_0x448ae3(0x9d),'type':_0x448ae3(0x8c),'description':_0x448ae3(0x89),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x448ae3(0x71),'type':_0x448ae3(0x8c),'description':_0x448ae3(0x79)},{'name':'cookie','type':_0x448ae3(0x8c),'description':_0x448ae3(0xa0),'hidden':!![]},{'name':_0x448ae3(0x8d),'type':_0x448ae3(0x8c),'description':'Access\x20key','hidden':!![]},{'name':_0x448ae3(0x94),'type':_0x448ae3(0x8c),'description':_0x448ae3(0x7a),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x448ae3(0x77),'description':_0x448ae3(0x73)},{'name':_0x448ae3(0x8f),'type':'string','description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x448ae3(0x7d),'type':_0x448ae3(0x8c),'description':'App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)'}];}export function collectAppProfileOverrides(_0x4a979d){const _0x34cac1=a232_0x5a9312,_0x5d1ec9={};for(const [_0x169419,_0x6529b2]of Object[_0x34cac1(0xa1)](APP_PROFILE_FLAG_KEY_MAP)){const _0x37083b=_0x4a979d(_0x169419);if(!_0x37083b)continue;_0x5d1ec9[_0x6529b2]=_0x6529b2===_0x34cac1(0x81)?Number(_0x37083b):_0x37083b;}return _0x5d1ec9;}export function buildAppProfileListFields(_0x4a6a2f){const _0x1df911=a232_0x5a9312;return{'env':_0x4a6a2f[_0x1df911(0x9d)]??null,'apiDir':_0x4a6a2f[_0x1df911(0x71)]??null,'hasCookie':!!_0x4a6a2f['cookie'],'hasAccessKey':!!_0x4a6a2f[_0x1df911(0x8d)],'format':_0x4a6a2f['format']??null,'pageSize':_0x4a6a2f['pageSize']??null,'riskLevel':_0x4a6a2f[_0x1df911(0x8f)]??null,'locale':_0x4a6a2f['locale']??null};}export function buildAppDoctorFields(_0xfd2896,_0x4470b1){const _0x473e79=a232_0x5a9312;return{'env':{'value':_0xfd2896[_0x473e79(0x9d)]||_0x4470b1['env'],'source':_0xfd2896[_0x473e79(0x9d)]?_0x473e79(0x84):_0x473e79(0x83)},'apiDir':{'value':_0xfd2896[_0x473e79(0x71)]||_0x4470b1['apiDir'],'source':_0xfd2896[_0x473e79(0x71)]?_0x473e79(0x84):_0x473e79(0x83)},'cookie':{'value':_0xfd2896[_0x473e79(0x97)]||_0x4470b1[_0x473e79(0x97)],'source':_0xfd2896[_0x473e79(0x97)]?'app':'inherit'},'accessKey':{'value':_0xfd2896[_0x473e79(0x8d)]||_0x4470b1[_0x473e79(0x8d)],'source':_0xfd2896['accessKey']?_0x473e79(0x84):'inherit'}};}export function buildCanonicalAppConfig(_0x1c5d22,_0x330c12){const _0x5647ab=a232_0x5a9312,_0x38dbfd=_0x1c5d22[_0x5647ab(0x80)](_0x147cc1=>String(_0x147cc1||'')['trim']())[_0x5647ab(0x86)](Boolean);if(_0x38dbfd[_0x5647ab(0x7e)]===0x0)return{};const _0x26eb16={};for(const _0x292da9 of _0x38dbfd){_0x26eb16[_0x292da9]=_0x330c12?{'appcode':_0x292da9,'env':_0x330c12}:{'appcode':_0x292da9};}return _0x38dbfd[_0x5647ab(0x7e)]>0x1?{'apps':_0x26eb16,'defaultApp':_0x38dbfd[0x0]}:{'apps':_0x26eb16};}export function normalizeStoredDefaultApp(_0x4aa524,_0x4c68ff){const _0x3467c4=a232_0x5a9312,_0x34dc10=_0x4aa524[_0x3467c4(0x85)]&&typeof _0x4aa524[_0x3467c4(0x85)]===_0x3467c4(0x78)?_0x4aa524[_0x3467c4(0x85)]:{},_0xb9e646=Object[_0x3467c4(0x96)](_0x34dc10);if(_0xb9e646[_0x3467c4(0x7e)]<=0x1)return delete _0x4aa524[_0x3467c4(0x8a)],undefined;const _0x224eff=typeof _0x4aa524['defaultApp']===_0x3467c4(0x8c)&&_0x34dc10[_0x4aa524[_0x3467c4(0x8a)]]?_0x4aa524['defaultApp']:undefined,_0x5e1c93=_0x4c68ff&&_0x34dc10[_0x4c68ff]?_0x4c68ff:_0x224eff;if(_0x5e1c93)return _0x4aa524['defaultApp']=_0x5e1c93,_0x5e1c93;return delete _0x4aa524['defaultApp'],undefined;}export function buildCanonicalProjectConfig(_0x347cb1,_0x2553a3){const _0x46646a=a232_0x5a9312,{appCodes:appCodes=[],env:_0x55880c,metadata:_0x2df6d7}=_0x2553a3,_0xfedb53={..._0x347cb1,..._0x2df6d7||{}};delete _0xfedb53[_0x46646a(0x9c)],delete _0xfedb53[_0x46646a(0x84)];if(_0x55880c)_0xfedb53[_0x46646a(0x9d)]=_0x55880c;else!_0xfedb53['env']&&(_0xfedb53[_0x46646a(0x9d)]=DEFAULT_CONFIG_VALUES['env']);const _0xa543a5=buildCanonicalAppConfig(appCodes,_0xfedb53['env']);if(Object[_0x46646a(0x96)](_0xa543a5)[_0x46646a(0x7e)]>0x0){_0xfedb53[_0x46646a(0x85)]=_0xa543a5['apps'];if(_0xa543a5[_0x46646a(0x8a)])_0xfedb53[_0x46646a(0x8a)]=_0xa543a5[_0x46646a(0x8a)];else delete _0xfedb53[_0x46646a(0x8a)];}return _0xfedb53;}const LOCALE_MAP={'zh':a232_0x5a9312(0xa2),'zh-cn':a232_0x5a9312(0xa2),'zh_cn':a232_0x5a9312(0xa2),'en':a232_0x5a9312(0x9f),'en-us':'en-US','en_us':'en-US'};export function normalizeLocale(_0xa6f529){const _0x2d85db=a232_0x5a9312;if(!_0xa6f529)return null;return LOCALE_MAP[_0xa6f529[_0x2d85db(0x91)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a233_0x501322=a233_0x2862;function a233_0x2862(_0xb3538e,_0x175450){_0xb3538e=_0xb3538e-0x1a9;const _0x5bd1c4=a233_0x5bd1();let _0x2862d4=_0x5bd1c4[_0xb3538e];return _0x2862d4;}(function(_0x28d0d3,_0x4ee15c){const _0x4b27c0=a233_0x2862,_0x40249f=_0x28d0d3();while(!![]){try{const _0x3a1b7f=parseInt(_0x4b27c0(0x1b4))/0x1+parseInt(_0x4b27c0(0x1a9))/0x2*(parseInt(_0x4b27c0(0x1ab))/0x3)+-parseInt(_0x4b27c0(0x1aa))/0x4*(-parseInt(_0x4b27c0(0x1ac))/0x5)+-parseInt(_0x4b27c0(0x1b0))/0x6+-parseInt(_0x4b27c0(0x1af))/0x7*(-parseInt(_0x4b27c0(0x1b2))/0x8)+-parseInt(_0x4b27c0(0x1ad))/0x9+parseInt(_0x4b27c0(0x1b5))/0xa;if(_0x3a1b7f===_0x4ee15c)break;else _0x40249f['push'](_0x40249f['shift']());}catch(_0x1de415){_0x40249f['push'](_0x40249f['shift']());}}}(a233_0x5bd1,0x2b6ab));export const RABETBASE_CDN_BASE_URL=a233_0x501322(0x1ae);export const CLI_VERSION_POLICY_URL=RABETBASE_CDN_BASE_URL+a233_0x501322(0x1b3);export const PROJECT_TEMPLATE_ASSET_BASE_URL=RABETBASE_CDN_BASE_URL+a233_0x501322(0x1b1);function a233_0x5bd1(){const _0x211feb=['/config/index.json','341526PSHItV','511370byvQyY','644glsPeY','4816AUruIE','210nTosLV','665qwTViQ','1409247tRWtNI','https://g.lovrabet.com/dist/rabetbase-cli','63eggbGR','1696440YtGPUv','/templates/projects','37176cilwfV'];a233_0x5bd1=function(){return _0x211feb;};return a233_0x5bd1();}
|