@lovrabet/rabetbase-cli 2.5.2-beta.3 → 2.5.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.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.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.d.ts +0 -8
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.d.ts +4 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +5 -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 +0 -26
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.d.ts +43 -0
- 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 +2 -1
- package/skills/rabetbase/SKILL.md +5 -5
- package/skills/rabetbase/guides/custom-page-workflow.md +35 -17
- package/skills/rabetbase/guides/page-development-workflow.md +1 -1
- package/skills/rabetbase/knowledge/components.md +292 -0
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +74 -4
- package/skills/rabetbase/knowledge/custom-page/page-templates.md +68 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +21 -9
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-update.md +13 -9
- package/skills/rabetbase/references/rabetbase-project-create.md +5 -2
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +2 -2
- package/skills/rabetbase/references/rabetbase-run.md +1 -0
- package/skills/rabetbase.manifest.json +5 -4
- package/templates/README.md +10 -4
- package/templates/custom-pages/blank.json +5 -0
- package/templates/custom-pages/dashboard.json +5 -0
- package/templates/custom-pages/onepage.json +5 -0
- package/templates/generate-api/api.ts.tpl +1 -1
- package/lib/commands/page/custom/template.d.ts +0 -8
- package/lib/commands/page/custom/template.js +0 -1
- package/skills/rabetbase/knowledge/custom-page/components.md +0 -225
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a218_0x1bcb39=a218_0x2128;(function(_0x40ec9c,_0x3b0c6a){const _0x562122=a218_0x2128,_0xcb11cd=_0x40ec9c();while(!![]){try{const _0x37c632=-parseInt(_0x562122(0x139))/0x1*(-parseInt(_0x562122(0x167))/0x2)+parseInt(_0x562122(0x131))/0x3*(parseInt(_0x562122(0x135))/0x4)+-parseInt(_0x562122(0x164))/0x5+-parseInt(_0x562122(0x147))/0x6*(-parseInt(_0x562122(0x13f))/0x7)+-parseInt(_0x562122(0x175))/0x8*(parseInt(_0x562122(0x142))/0x9)+parseInt(_0x562122(0x158))/0xa+-parseInt(_0x562122(0x159))/0xb*(parseInt(_0x562122(0x15d))/0xc);if(_0x37c632===_0x3b0c6a)break;else _0xcb11cd['push'](_0xcb11cd['shift']());}catch(_0x5b94c1){_0xcb11cd['push'](_0xcb11cd['shift']());}}}(a218_0x72fd,0x50a09));import{readFileSync,existsSync}from'node:fs';function a218_0x2128(_0x380862,_0x229117){_0x380862=_0x380862-0x131;const _0x72fd90=a218_0x72fd();let _0x212891=_0x72fd90[_0x380862];return _0x212891;}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';function a218_0x72fd(){const _0x155e73=['18ZWESkn','message','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','read','check-indexes','str','pkField','boolean','tables','bool','index_name','Provide\x20--file\x20or\x20--sql','File\x20not\x20found:\x20','dataset','tableName','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','sqlType','4914670DQsAWC','2888204rVSvng','validate','isDangerous','length','48VyeMtS','flatMap','Table\x20\x22','index_type','flagMissing','valid','get','2248620MqBGVl','schema:','SQL\x20schema\x20validation','166jRaHEA','sql','\x22\x20not\x20found\x20or\x20not\x20accessible','map','indexName','isSelectOnly','from','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','reason','\x22\x20not\x20found\x20in\x20any\x20dataset','fields','index_columns','schemas','isArray','4384aroRqA','type','columnNames','toLowerCase','50067ImSByl','dbtableConfig','indexes','filter','88ZSPrix','file','size','validation','5958QFlfph','Dataset\x20\x22','cwd','find','name','trim','1443106juqMAD','parameters','string','2322CTStgD','--check-indexes\x20requires\x20--schemas.','push','columns','schemaWarnings'];a218_0x72fd=function(){return _0x155e73;};return a218_0x72fd();}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a218_0x1bcb39(0x168),'command':a218_0x1bcb39(0x15a),'description':a218_0x1bcb39(0x149),'risk':a218_0x1bcb39(0x14a),'flags':[{'name':'file','type':a218_0x1bcb39(0x141),'description':a218_0x1bcb39(0x16e)},{'name':a218_0x1bcb39(0x168),'type':a218_0x1bcb39(0x141),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a218_0x1bcb39(0x173),'type':a218_0x1bcb39(0x141),'description':'Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against'},{'name':a218_0x1bcb39(0x14b),'type':a218_0x1bcb39(0x14e),'description':a218_0x1bcb39(0x156)}],async 'execute'(_0x309b61){const _0x3d63db=a218_0x1bcb39,_0x806643=_0x309b61[_0x3d63db(0x14c)](_0x3d63db(0x136)),_0x3179a1=_0x309b61[_0x3d63db(0x14c)](_0x3d63db(0x168)),_0x18e782=_0x309b61[_0x3d63db(0x14c)](_0x3d63db(0x173)),_0x4226c8=_0x309b61[_0x3d63db(0x150)](_0x3d63db(0x14b));if(!_0x806643&&!_0x3179a1)throw CliErrors[_0x3d63db(0x161)](_0x3d63db(0x136),_0x3d63db(0x152));if(_0x4226c8&&!_0x18e782)throw CliErrors[_0x3d63db(0x138)](_0x3d63db(0x143));let _0x497498;if(_0x806643){const _0x49d98d=resolve(process[_0x3d63db(0x13b)](),_0x806643);if(!existsSync(_0x49d98d))throw CliErrors['validation'](_0x3d63db(0x153)+_0x49d98d);_0x497498=readFileSync(_0x49d98d,'utf-8');}else _0x497498=_0x3179a1;const _0x5f223d=validateSql(_0x497498),_0x4902c0={'valid':_0x5f223d[_0x3d63db(0x162)],'sqlType':_0x5f223d[_0x3d63db(0x157)][_0x3d63db(0x176)],'isSelectOnly':_0x5f223d[_0x3d63db(0x157)][_0x3d63db(0x16c)],'isDangerous':_0x5f223d[_0x3d63db(0x157)][_0x3d63db(0x15b)],'tables':_0x5f223d[_0x3d63db(0x14f)],'parameters':_0x5f223d[_0x3d63db(0x140)],'message':_0x5f223d[_0x3d63db(0x148)]};_0x5f223d[_0x3d63db(0x157)][_0x3d63db(0x16f)]&&(_0x4902c0[_0x3d63db(0x16f)]=_0x5f223d[_0x3d63db(0x157)][_0x3d63db(0x16f)]);if(_0x18e782&&_0x5f223d[_0x3d63db(0x162)]){const _0x76aa7a=_0x18e782['split'](',')['map'](_0x2f0bba=>_0x2f0bba[_0x3d63db(0x13e)]())[_0x3d63db(0x134)](Boolean),_0x2944e0=[],_0x67bc44=[],_0x5a56ee=filterDbTableBackedDatasets(await listDatasets(_0x309b61['appCode'])),_0x5b0d76=new Map(_0x5a56ee[_0x3d63db(0x16a)](_0x4037df=>[_0x4037df[_0x3d63db(0x132)]?.[_0x3d63db(0x155)]?.[_0x3d63db(0x178)](),_0x4037df]));for(const _0x1393af of _0x5f223d[_0x3d63db(0x14f)]){const _0x881bef=_0x5b0d76[_0x3d63db(0x163)](_0x1393af[_0x3d63db(0x178)]());!_0x881bef&&_0x2944e0[_0x3d63db(0x144)](_0x3d63db(0x15f)+_0x1393af+_0x3d63db(0x170));}for(const _0x257e75 of _0x76aa7a){let _0x4cc1b5;try{_0x4cc1b5=await getDatasetDetail(_0x257e75);}catch{_0x2944e0[_0x3d63db(0x144)](_0x3d63db(0x13a)+_0x257e75+_0x3d63db(0x169));continue;}assertDatasetIsDbTableBacked(_0x4cc1b5,_0x3d63db(0x166));const _0x45bbc3=Array[_0x3d63db(0x174)](_0x4cc1b5['fields'])?_0x4cc1b5[_0x3d63db(0x171)]:[],_0x5f3e8f=new Set(_0x45bbc3[_0x3d63db(0x16a)](_0x410b3a=>_0x410b3a[_0x3d63db(0x13d)]?.[_0x3d63db(0x178)]())),_0x40df26=_0x4cc1b5[_0x3d63db(0x132)]?.[_0x3d63db(0x155)]||_0x4cc1b5[_0x3d63db(0x155)]||_0x257e75;_0x4902c0[_0x3d63db(0x165)+_0x40df26]={'code':_0x257e75,'tableName':_0x40df26,'fieldCount':_0x5f3e8f[_0x3d63db(0x137)],'fields':Array[_0x3d63db(0x16d)](_0x5f3e8f)};if(_0x4226c8){const _0x1b3218=normalizeDatasetIndexes(_0x4cc1b5);_0x67bc44[_0x3d63db(0x144)]({'tableName':_0x40df26,..._0x1b3218});}}_0x2944e0[_0x3d63db(0x15c)]>0x0&&(_0x4902c0[_0x3d63db(0x146)]=_0x2944e0),_0x4226c8&&(_0x4902c0['joinAudit']=auditSqlJoinIndexes(_0x497498,_0x67bc44));}return{'ok':_0x5f223d[_0x3d63db(0x162)],'data':_0x4902c0,'message':_0x5f223d[_0x3d63db(0x148)]};}};function normalizeDatasetIndexes(_0x4faa2b){const _0x2b970e=a218_0x1bcb39,_0x57a3ef=Array['isArray'](_0x4faa2b?.[_0x2b970e(0x154)]?.['indexes'])?_0x4faa2b[_0x2b970e(0x154)][_0x2b970e(0x133)]:Array[_0x2b970e(0x174)](_0x4faa2b?.['indexes'])?_0x4faa2b[_0x2b970e(0x133)]:[],_0xc827f=_0x57a3ef[_0x2b970e(0x15e)](_0x5a52dd=>{const _0x331be6=_0x2b970e,_0x442e21=Array[_0x331be6(0x174)](_0x5a52dd?.['index_columns'])?_0x5a52dd[_0x331be6(0x172)]:Array[_0x331be6(0x174)](_0x5a52dd?.['columnNames'])?_0x5a52dd[_0x331be6(0x177)]:Array[_0x331be6(0x174)](_0x5a52dd?.[_0x331be6(0x145)])?_0x5a52dd[_0x331be6(0x145)]:[],_0xfe056d=_0x442e21[_0x331be6(0x134)](_0x5bba8a=>typeof _0x5bba8a===_0x331be6(0x141))[_0x331be6(0x16a)](_0x57f0b9=>_0x57f0b9[_0x331be6(0x13e)]())[_0x331be6(0x134)](Boolean);if(_0xfe056d['length']===0x0)return[];const _0x549c37=[_0x5a52dd?.[_0x331be6(0x16b)],_0x5a52dd?.[_0x331be6(0x151)],_0x5a52dd?.[_0x331be6(0x13d)]][_0x331be6(0x13c)](_0x31100f=>typeof _0x31100f==='string'&&_0x31100f[_0x331be6(0x13e)]()),_0x4c4101=[_0x5a52dd?.[_0x331be6(0x160)],_0x5a52dd?.[_0x331be6(0x176)]][_0x331be6(0x13c)](_0x224cba=>typeof _0x224cba===_0x331be6(0x141)&&_0x224cba[_0x331be6(0x13e)]());return[{..._0x549c37?{'name':_0x549c37[_0x331be6(0x13e)]()}:{},..._0x4c4101?{'type':_0x4c4101[_0x331be6(0x13e)]()}:{},'columns':_0xfe056d}];}),_0x5bda0b=[..._0xc827f],_0x196035=typeof _0x4faa2b?.[_0x2b970e(0x132)]?.[_0x2b970e(0x14d)]===_0x2b970e(0x141)?_0x4faa2b['dbtableConfig'][_0x2b970e(0x14d)]['split'](',')['map'](_0x2410e6=>_0x2410e6[_0x2b970e(0x13e)]())['filter'](Boolean):[];return _0x196035[_0x2b970e(0x15c)]>0x0&&_0x5bda0b['unshift']({'type':'primary','columns':_0x196035}),{'indexes':_0x5bda0b,'metadataAvailable':_0xc827f[_0x2b970e(0x15c)]>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a219_0x42b1(){const _0x56ab2a=['8LLvhpE','951928kDFNdI','3aMqlUN','1392906Krwfep','3771940RKnOlf','795472LNVfjo','2796TwVHAi','3020444AWqIXe','5fSpfAv','2645181xanxBI'];a219_0x42b1=function(){return _0x56ab2a;};return a219_0x42b1();}function a219_0x3c47(_0x23c90a,_0x457a89){_0x23c90a=_0x23c90a-0x1c9;const _0x42b110=a219_0x42b1();let _0x3c472d=_0x42b110[_0x23c90a];return _0x3c472d;}(function(_0x1e2e9a,_0x3cff39){const _0x25e8b7=a219_0x3c47,_0x573867=_0x1e2e9a();while(!![]){try{const _0x353bb3=-parseInt(_0x25e8b7(0x1cf))/0x1*(parseInt(_0x25e8b7(0x1cb))/0x2)+-parseInt(_0x25e8b7(0x1d1))/0x3*(parseInt(_0x25e8b7(0x1d0))/0x4)+-parseInt(_0x25e8b7(0x1cd))/0x5*(-parseInt(_0x25e8b7(0x1d2))/0x6)+parseInt(_0x25e8b7(0x1cc))/0x7+-parseInt(_0x25e8b7(0x1ca))/0x8+parseInt(_0x25e8b7(0x1ce))/0x9+-parseInt(_0x25e8b7(0x1c9))/0xa;if(_0x353bb3===_0x3cff39)break;else _0x573867['push'](_0x573867['shift']());}catch(_0x3a313c){_0x573867['push'](_0x573867['shift']());}}}(a219_0x42b1,0x3894e));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a220_0x60eaa4=a220_0xedc1;(function(_0x2fed75,_0x32cfae){const _0x1cdc76=a220_0xedc1,_0x3496c6=_0x2fed75();while(!![]){try{const _0x48ddd6=parseInt(_0x1cdc76(0x14a))/0x1+parseInt(_0x1cdc76(0x151))/0x2*(parseInt(_0x1cdc76(0x15b))/0x3)+parseInt(_0x1cdc76(0x148))/0x4*(parseInt(_0x1cdc76(0x14d))/0x5)+parseInt(_0x1cdc76(0x150))/0x6+parseInt(_0x1cdc76(0x14c))/0x7*(parseInt(_0x1cdc76(0x152))/0x8)+-parseInt(_0x1cdc76(0x153))/0x9*(-parseInt(_0x1cdc76(0x156))/0xa)+-parseInt(_0x1cdc76(0x15d))/0xb*(parseInt(_0x1cdc76(0x149))/0xc);if(_0x48ddd6===_0x32cfae)break;else _0x3496c6['push'](_0x3496c6['shift']());}catch(_0x15c8bb){_0x3496c6['push'](_0x3496c6['shift']());}}}(a220_0x3a3a,0x20c66));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const taskStatus={'service':'task','command':a220_0x60eaa4(0x147),'description':'Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','risk':a220_0x60eaa4(0x15a),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[{'name':a220_0x60eaa4(0x159),'type':'string','required':!![],'description':a220_0x60eaa4(0x154)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x24abfa){const _0x4314e2=a220_0x60eaa4;if(!_0x24abfa['str'](_0x4314e2(0x159))[_0x4314e2(0x15e)]())throw CliErrors[_0x4314e2(0x14e)](_0x4314e2(0x159));},async 'execute'(_0x4ca566){const _0xe5f366=a220_0x60eaa4,_0x27f913=_0x4ca566['str'](_0xe5f366(0x159))[_0xe5f366(0x15e)](),_0x5874d=normalizeAsyncTask(await getAsyncTaskStatus(_0x27f913,_0x4ca566['appCode'],_0x4ca566[_0xe5f366(0x15c)]));if(_0x5874d[_0xe5f366(0x14f)]!==_0x27f913)throw CliErrors['apiError'](_0xe5f366(0x157)+_0x27f913+_0xe5f366(0x158)+_0x5874d[_0xe5f366(0x14f)]+'.');const _0x2ee6c5=buildAsyncTaskStatusCommand(_0x5874d['taskId'],_0x4ca566[_0xe5f366(0x14b)]);return{'ok':!![],'message':asyncTaskMessage(_0x5874d),'data':{'appCode':_0x4ca566[_0xe5f366(0x14b)],..._0x5874d,'query':_0x5874d[_0xe5f366(0x155)]?null:{'command':_0x2ee6c5}}};}};function a220_0xedc1(_0x308a38,_0x512ec5){_0x308a38=_0x308a38-0x147;const _0x3a3aea=a220_0x3a3a();let _0xedc172=_0x3a3aea[_0x308a38];return _0xedc172;}function a220_0x3a3a(){const _0x87f0c0=['498699DVVOAZ','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','isTerminal','40bSrWIJ','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20',',\x20received\x20','task-id','read','482892bhdvmN','cookie','22gwgCyW','trim','status','16164cMtPlf','3699492YFYkbE','2628orviXJ','appCode','7MdjrKQ','185NdSzBy','flagMissing','taskId','485844GnMVwu','2YascyW','1080808klbhdu'];a220_0x3a3a=function(){return _0x87f0c0;};return a220_0x3a3a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a221_0x41bd(_0x1b7725,_0x369b33){_0x1b7725=_0x1b7725-0x1b1;const _0x52e8a8=a221_0x52e8();let _0x41bd75=_0x52e8a8[_0x1b7725];return _0x41bd75;}function a221_0x52e8(){const _0x589061=['1974049HaTCKP','264705iqnySb','1WsbVlx','279711wgBvIW','1990160QbbHUk','3194194Tufjzd','9947730lwJjcG','4vRrZdJ','3803555vHCJjS'];a221_0x52e8=function(){return _0x589061;};return a221_0x52e8();}(function(_0x4f5e6b,_0x1a9b65){const _0x2c114f=a221_0x41bd,_0x5c70bb=_0x4f5e6b();while(!![]){try{const _0x458cf8=-parseInt(_0x2c114f(0x1b1))/0x1*(parseInt(_0x2c114f(0x1b4))/0x2)+-parseInt(_0x2c114f(0x1b9))/0x3*(-parseInt(_0x2c114f(0x1b6))/0x4)+parseInt(_0x2c114f(0x1b7))/0x5+parseInt(_0x2c114f(0x1b5))/0x6+-parseInt(_0x2c114f(0x1b8))/0x7+parseInt(_0x2c114f(0x1b3))/0x8+-parseInt(_0x2c114f(0x1b2))/0x9;if(_0x458cf8===_0x1a9b65)break;else _0x5c70bb['push'](_0x5c70bb['shift']());}catch(_0x5d89e2){_0x5c70bb['push'](_0x5c70bb['shift']());}}}(a221_0x52e8,0xce6b0));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a222_0x520cf6=a222_0x1aa4;(function(_0x1e24d0,_0x433fda){const _0x389436=a222_0x1aa4,_0x5aefc7=_0x1e24d0();while(!![]){try{const _0x24d698=parseInt(_0x389436(0x93))/0x1+-parseInt(_0x389436(0x97))/0x2*(-parseInt(_0x389436(0x8d))/0x3)+parseInt(_0x389436(0x9a))/0x4+-parseInt(_0x389436(0x99))/0x5+parseInt(_0x389436(0x8a))/0x6*(-parseInt(_0x389436(0x91))/0x7)+-parseInt(_0x389436(0x9e))/0x8*(parseInt(_0x389436(0x94))/0x9)+-parseInt(_0x389436(0x9c))/0xa*(parseInt(_0x389436(0x96))/0xb);if(_0x24d698===_0x433fda)break;else _0x5aefc7['push'](_0x5aefc7['shift']());}catch(_0x1ac5c1){_0x5aefc7['push'](_0x5aefc7['shift']());}}}(a222_0x418a,0x52a0d));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';function a222_0x1aa4(_0x1a5ee3,_0x1da0b7){_0x1a5ee3=_0x1a5ee3-0x8a;const _0x418a1f=a222_0x418a();let _0x1aa446=_0x418a1f[_0x1a5ee3];return _0x1aa446;}function a222_0x418a(){const _0x368581=['760832UZHPKN','string','71930AqgzVo','trim','40fpIqut','Exact\x20tenant\x20code','12nckNKb','tenant','str','1875cwoLtX','Found\x20','tenant-code','members-list','34153HJjKvh','flagMissing','285591wpBnRW','27819eefEdu','length','242vukJTz','1718zGPycq','\x20tenant\x20member(s)','2453850XsrVHG'];a222_0x418a=function(){return _0x368581;};return a222_0x418a();}export const tenantMembersListDefinition={'service':a222_0x520cf6(0x8b),'command':a222_0x520cf6(0x90),'description':'List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','risk':'read','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a222_0x520cf6(0x8f),'type':a222_0x520cf6(0x9b),'required':!![],'description':a222_0x520cf6(0x9f)}],async 'validate'(_0x580f18){const _0x17b69c=a222_0x520cf6;if(!_0x580f18['str'](_0x17b69c(0x8f))[_0x17b69c(0x9d)]())throw CliErrors[_0x17b69c(0x92)]('tenant-code','Pass\x20--tenant-code\x20<code>.');},async 'execute'(_0x59f8bf){const _0x158fb0=a222_0x520cf6,_0x10a9ca=_0x59f8bf[_0x158fb0(0x8c)](_0x158fb0(0x8f))[_0x158fb0(0x9d)](),_0x31f7cb=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x10a9ca,_0x31f7cb);const _0x3e3364=projectTenantMembers(await listTenantDirectoryMembers(_0x10a9ca));return{'ok':!![],'data':{'tenantCode':_0x10a9ca,'items':_0x3e3364,'totalCount':_0x3e3364[_0x158fb0(0x95)]},'message':_0x158fb0(0x8e)+_0x3e3364['length']+_0x158fb0(0x98)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51375d,_0x2af8e3){const _0x1e8f6f=a223_0xc19b,_0x27b480=_0x51375d();while(!![]){try{const _0x50b4be=parseInt(_0x1e8f6f(0x179))/0x1+-parseInt(_0x1e8f6f(0x185))/0x2*(-parseInt(_0x1e8f6f(0x176))/0x3)+parseInt(_0x1e8f6f(0x181))/0x4+parseInt(_0x1e8f6f(0x173))/0x5*(parseInt(_0x1e8f6f(0x184))/0x6)+-parseInt(_0x1e8f6f(0x182))/0x7*(parseInt(_0x1e8f6f(0x178))/0x8)+parseInt(_0x1e8f6f(0x171))/0x9*(parseInt(_0x1e8f6f(0x188))/0xa)+-parseInt(_0x1e8f6f(0x17c))/0xb;if(_0x50b4be===_0x2af8e3)break;else _0x27b480['push'](_0x27b480['shift']());}catch(_0x168df8){_0x27b480['push'](_0x27b480['shift']());}}}(a223_0x18f5,0xa44c7));function a223_0xc19b(_0x1b3164,_0x211e4c){_0x1b3164=_0x1b3164-0x170;const _0x18f55e=a223_0x18f5();let _0xc19ba0=_0x18f55e[_0x1b3164];return _0xc19ba0;}import{CliErrors}from'../../errors.js';function a223_0x18f5(){const _0x533f01=['ADMIN','24TLfVJz','2dqpsDs','username','tenantCode','9743570ZXOGVB','displayName','validation','isFinite','9puxzCZ','values','748885szsyxR','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','trim','151374ioeSfY','status','112QkvqpB','858274zWJsru','role','some','32214677VMxXFT','sort','userId','nickname','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','5049996BwwRLc','71561vGRubR'];a223_0x18f5=function(){return _0x533f01;};return a223_0x18f5();}function textOrNull(_0x5dada5){const _0x2cb214=a223_0xc19b,_0x2c6a48=_0x5dada5?.[_0x2cb214(0x175)]();return _0x2c6a48?_0x2c6a48:null;}export function projectTenantMembers(_0x53eae1){const _0x2ed378=a223_0xc19b,_0x85b554=new Map();for(const _0x2485a0 of _0x53eae1){const _0x271da9=Number(_0x2485a0[_0x2ed378(0x17e)]);if(!Number[_0x2ed378(0x170)](_0x271da9)||_0x271da9<=0x0)continue;const _0x40ff7b={'userId':_0x271da9,'username':textOrNull(_0x2485a0[_0x2ed378(0x186)]),'displayName':textOrNull(_0x2485a0[_0x2ed378(0x17f)]),'role':_0x2485a0['adminFlag']===!![]?'ADMIN':'MEMBER','status':textOrNull(_0x2485a0[_0x2ed378(0x177)])},_0x5444a2=_0x85b554['get'](_0x271da9);if(!_0x5444a2){_0x85b554['set'](_0x271da9,_0x40ff7b);continue;}_0x5444a2[_0x2ed378(0x186)]??=_0x40ff7b[_0x2ed378(0x186)],_0x5444a2[_0x2ed378(0x189)]??=_0x40ff7b[_0x2ed378(0x189)],_0x5444a2[_0x2ed378(0x177)]??=_0x40ff7b['status'];if(_0x40ff7b[_0x2ed378(0x17a)]===_0x2ed378(0x183))_0x5444a2[_0x2ed378(0x17a)]=_0x2ed378(0x183);}return[..._0x85b554[_0x2ed378(0x172)]()][_0x2ed378(0x17d)]((_0x51f87e,_0x3df4ef)=>_0x51f87e[_0x2ed378(0x17e)]-_0x3df4ef[_0x2ed378(0x17e)]);}export function assertTenantAccessible(_0x594eb9,_0x4968a2){const _0x2d32f1=a223_0xc19b;if(_0x4968a2[_0x2d32f1(0x17b)](_0x2d655c=>_0x2d655c[_0x2d32f1(0x187)]===_0x594eb9))return;throw CliErrors[_0x2d32f1(0x18a)]('Tenant\x20\x22'+_0x594eb9+_0x2d32f1(0x174),_0x2d32f1(0x180));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a224_0x2d2455=a224_0x931e;(function(_0x392a62,_0x23558d){const _0x5d5d32=a224_0x931e,_0x4c7c13=_0x392a62();while(!![]){try{const _0x200596=parseInt(_0x5d5d32(0x10d))/0x1*(parseInt(_0x5d5d32(0x10c))/0x2)+parseInt(_0x5d5d32(0xfa))/0x3*(parseInt(_0x5d5d32(0x10a))/0x4)+-parseInt(_0x5d5d32(0x10e))/0x5+parseInt(_0x5d5d32(0xff))/0x6*(-parseInt(_0x5d5d32(0x106))/0x7)+parseInt(_0x5d5d32(0x105))/0x8*(parseInt(_0x5d5d32(0xfb))/0x9)+-parseInt(_0x5d5d32(0x10f))/0xa*(parseInt(_0x5d5d32(0xfc))/0xb)+parseInt(_0x5d5d32(0x100))/0xc*(parseInt(_0x5d5d32(0x110))/0xd);if(_0x200596===_0x23558d)break;else _0x4c7c13['push'](_0x4c7c13['shift']());}catch(_0x2947e8){_0x4c7c13['push'](_0x4c7c13['shift']());}}}(a224_0x2cbd,0xdd32d));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a224_0x931e(_0x4c3ecd,_0x1df021){_0x4c3ecd=_0x4c3ecd-0xf5;const _0x2cbd98=a224_0x2cbd();let _0x931e49=_0x2cbd98[_0x4c3ecd];return _0x931e49;}const PROVIDER_ID=a224_0x2d2455(0x10b),CURRENT_BINDING_WARNING='The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.';function readDingTalkUserId(_0x2805ae){const _0x4c414d=a224_0x2d2455,_0x4fb845=_0x2805ae[_0x4c414d(0x101)](_0x4c414d(0x103))[_0x4c414d(0xf6)]();if(!_0x4fb845)throw CliErrors['validation']('--ding-talk-user-id\x20cannot\x20be\x20empty.',_0x4c414d(0x104));return _0x4fb845;}function a224_0x2cbd(){const _0x567f49=['274800sUFMTC','430UvpLZy','4715204jHFBJl','DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox','trim','dingding-sandbox-bind','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','write','12AQfgvV','3569661frBnRx','54373VsGdCS','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','930FHHLZr','12oOGtLe','str','bind','ding-talk-user-id','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','8nZHARl','77637OZlrKC','POST','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','string','1331292ZyKQtX','dingtalk','1604028maoScQ','1NXdpei'];a224_0x2cbd=function(){return _0x567f49;};return a224_0x2cbd();}function buildBindingData(_0x4e0039,_0x50377f){const _0x47d86c=a224_0x2d2455;return{'operation':_0x47d86c(0x102),'selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x4e0039},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x4e0039,'bound':!![]},'dryRun':_0x50377f,'backend':{'method':_0x47d86c(0x107),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':'user-account','command':a224_0x2d2455(0xf7),'description':a224_0x2d2455(0xfd),'risk':a224_0x2d2455(0xf9),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a224_0x2d2455(0x103),'type':a224_0x2d2455(0x109),'required':!![],'description':a224_0x2d2455(0xf5)}],async 'validate'(_0x335790){readDingTalkUserId(_0x335790);},async 'dryRun'(_0xbb8bf5){const _0x21f045=a224_0x2d2455,_0x513a6b=readDingTalkUserId(_0xbb8bf5);return asDryRunResult(buildBindingData(_0x513a6b,!![]),{'method':_0x21f045(0x107),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x494d95){const _0x515131=a224_0x2d2455,_0x16605b=readDingTalkUserId(_0x494d95),_0x866cca=await bindDingTalkSandboxAccount(_0x16605b);if(_0x866cca!==!![])throw CliErrors['apiError'](_0x515131(0xfe),_0x515131(0xf8));return{'ok':!![],'data':buildBindingData(_0x16605b,![]),'message':_0x515131(0x108)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a225_0x3efc(){const _0x594fad=['451AUtEFV','1388byyeia','89285dSQFGp','16XsrnQZ','8cGrHqA','156474XiUgEI','94200msnczv','455245rsKWkI','5355sTxweu','1219680VAVQjg','7HLyfKR','69sfXcDN'];a225_0x3efc=function(){return _0x594fad;};return a225_0x3efc();}(function(_0x4453b4,_0x3d74ee){const _0x52ecd9=a225_0x833d,_0x2fdbbe=_0x4453b4();while(!![]){try{const _0x1d4148=parseInt(_0x52ecd9(0x7f))/0x1+-parseInt(_0x52ecd9(0x7e))/0x2*(parseInt(_0x52ecd9(0x7c))/0x3)+parseInt(_0x52ecd9(0x81))/0x4*(-parseInt(_0x52ecd9(0x84))/0x5)+parseInt(_0x52ecd9(0x82))/0x6*(parseInt(_0x52ecd9(0x7b))/0x7)+parseInt(_0x52ecd9(0x80))/0x8*(parseInt(_0x52ecd9(0x85))/0x9)+-parseInt(_0x52ecd9(0x86))/0xa+parseInt(_0x52ecd9(0x7d))/0xb*(parseInt(_0x52ecd9(0x83))/0xc);if(_0x1d4148===_0x3d74ee)break;else _0x2fdbbe['push'](_0x2fdbbe['shift']());}catch(_0x41c73d){_0x2fdbbe['push'](_0x2fdbbe['shift']());}}}(a225_0x3efc,0x1ce68));import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';function a225_0x833d(_0x54678e,_0x37408b){_0x54678e=_0x54678e-0x7b;const _0x3efcbe=a225_0x3efc();let _0x833dd9=_0x3efcbe[_0x54678e];return _0x833dd9;}export const userAccountDefinitions=[dingTalkSandboxBind];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a226_0x41596b=a226_0x5a32;function a226_0x5a32(_0x15edd6,_0x1aa24b){_0x15edd6=_0x15edd6-0x80;const _0x206691=a226_0x2066();let _0x5a3275=_0x206691[_0x15edd6];return _0x5a3275;}function a226_0x2066(){const _0x1fbfab=['759766PWYQzy','945858AtPHXy','12XTnJQT','932370NLaarR','2911464gSUVNb','App\x20profile\x20name','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','name','write','30539FkKcCU','7582520abMRjp','19664676DVuYZL','workspace\x20add','10ZaXiOV','workspace'];a226_0x2066=function(){return _0x1fbfab;};return a226_0x2066();}(function(_0x1ae530,_0x31f465){const _0x3b1f1a=a226_0x5a32,_0x281a03=_0x1ae530();while(!![]){try{const _0x5d14d4=parseInt(_0x3b1f1a(0x8e))/0x1*(parseInt(_0x3b1f1a(0x87))/0x2)+parseInt(_0x3b1f1a(0x86))/0x3+-parseInt(_0x3b1f1a(0x89))/0x4+-parseInt(_0x3b1f1a(0x83))/0x5*(parseInt(_0x3b1f1a(0x88))/0x6)+-parseInt(_0x3b1f1a(0x85))/0x7+-parseInt(_0x3b1f1a(0x80))/0x8+parseInt(_0x3b1f1a(0x81))/0x9;if(_0x5d14d4===_0x31f465)break;else _0x281a03['push'](_0x281a03['shift']());}catch(_0x559a96){_0x281a03['push'](_0x281a03['shift']());}}}(a226_0x2066,0x8fabb));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a226_0x41596b(0x84),'command':'add','description':a226_0x41596b(0x8b),'risk':a226_0x41596b(0x8d),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a226_0x41596b(0x8c),'description':a226_0x41596b(0x8a),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x237ebf=>validateAppName(_0x237ebf,a226_0x41596b(0x82)),'execute':_0xdb60f6=>runAppAdd(_0xdb60f6,a226_0x41596b(0x82))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a227_0x58dc0e=a227_0x14d0;(function(_0x3fd965,_0x3931a1){const _0x23e0d7=a227_0x14d0,_0x3f11d1=_0x3fd965();while(!![]){try{const _0x5b73aa=parseInt(_0x23e0d7(0xfa))/0x1+parseInt(_0x23e0d7(0x12c))/0x2*(parseInt(_0x23e0d7(0x107))/0x3)+-parseInt(_0x23e0d7(0xf7))/0x4+parseInt(_0x23e0d7(0x10d))/0x5*(parseInt(_0x23e0d7(0xf0))/0x6)+parseInt(_0x23e0d7(0x11c))/0x7*(parseInt(_0x23e0d7(0x106))/0x8)+parseInt(_0x23e0d7(0x119))/0x9*(-parseInt(_0x23e0d7(0x129))/0xa)+parseInt(_0x23e0d7(0x11d))/0xb*(-parseInt(_0x23e0d7(0x103))/0xc);if(_0x5b73aa===_0x3931a1)break;else _0x3f11d1['push'](_0x3f11d1['shift']());}catch(_0x1eb62e){_0x3f11d1['push'](_0x3f11d1['shift']());}}}(a227_0x1f99,0xdf4a6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';function a227_0x14d0(_0x597cb4,_0x2d202a){_0x597cb4=_0x597cb4-0xf0;const _0x1f9922=a227_0x1f99();let _0x14d097=_0x1f9922[_0x597cb4];return _0x14d097;}import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';import{normalizeStoredDefaultApp}from'../../config/schema.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a227_0x58dc0e(0x108),SAFE_PROFILE_KEYS=[a227_0x58dc0e(0xf1),'env','apiDir',a227_0x58dc0e(0x128),a227_0x58dc0e(0x111),a227_0x58dc0e(0x105),a227_0x58dc0e(0xf8)],workspaceFlags=[{'name':a227_0x58dc0e(0x122),'type':a227_0x58dc0e(0x11b),'description':a227_0x58dc0e(0x112)},{'name':a227_0x58dc0e(0xf1),'type':a227_0x58dc0e(0x11b),'description':a227_0x58dc0e(0x124)},{'name':a227_0x58dc0e(0x10a),'type':'string','description':a227_0x58dc0e(0x121),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':a227_0x58dc0e(0x11b),'description':a227_0x58dc0e(0x115)},{'name':a227_0x58dc0e(0x12b),'type':a227_0x58dc0e(0x11b),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a227_0x58dc0e(0x111),'type':a227_0x58dc0e(0xf2),'description':a227_0x58dc0e(0x102)},{'name':a227_0x58dc0e(0x105),'type':a227_0x58dc0e(0x11b),'description':a227_0x58dc0e(0xf4),'enum':[...RISK_LEVEL_VALUES]},{'name':a227_0x58dc0e(0xf8),'type':a227_0x58dc0e(0x11b),'description':a227_0x58dc0e(0x109)}];function isRecord(_0x4306fc){const _0x447f3f=a227_0x58dc0e;return!!_0x4306fc&&typeof _0x4306fc===_0x447f3f(0xfd)&&!Array[_0x447f3f(0x127)](_0x4306fc);}function assertValidAppcode(_0x3af91b){const _0x1ca531=a227_0x58dc0e,{valid:_0x32efd0,message:_0x11fe4f}=validateAppcode(_0x3af91b);if(!_0x32efd0)throw CliErrors['validation'](_0x1ca531(0xfe)+_0x3af91b,_0x11fe4f);}function sanitizeProfile(_0x4fc48b){if(!isRecord(_0x4fc48b))return{};const _0x1f1895={};for(const _0x3e1dc6 of SAFE_PROFILE_KEYS){if(_0x4fc48b[_0x3e1dc6]!==undefined)_0x1f1895[_0x3e1dc6]=_0x4fc48b[_0x3e1dc6];}return _0x1f1895;}function cloneProfile(_0x2d41c8){return isRecord(_0x2d41c8)?{..._0x2d41c8}:{};}function collectWorkspaceProfileOverrides(_0x567946){const _0x581eb7=a227_0x58dc0e,_0x20501b={},_0x535272=_0x567946[_0x581eb7(0x110)]('env'),_0x264e62=_0x567946[_0x581eb7(0x110)](_0x581eb7(0x104)),_0x548ba3=_0x567946['str'](_0x581eb7(0x12b)),_0x1f83d8=_0x567946[_0x581eb7(0x117)]('pageSize'),_0x346e12=_0x567946[_0x581eb7(0x110)](_0x581eb7(0x105)),_0x2ad186=_0x567946[_0x581eb7(0x110)](_0x581eb7(0xf8));if(_0x535272)_0x20501b[_0x581eb7(0x10a)]=_0x535272;if(_0x264e62)_0x20501b[_0x581eb7(0x104)]=_0x264e62;if(_0x548ba3)_0x20501b[_0x581eb7(0x128)]=_0x548ba3;if(_0x1f83d8!==undefined&&_0x1f83d8!=='')_0x20501b[_0x581eb7(0x111)]=Number(_0x1f83d8);if(_0x346e12)_0x20501b[_0x581eb7(0x105)]=_0x346e12;if(_0x2ad186)_0x20501b[_0x581eb7(0xf8)]=_0x2ad186;return _0x20501b;}async function validateWorkspaceArgs(_0x3dd5a0){const _0x161396=a227_0x58dc0e,_0x5bd621=_0x3dd5a0['str'](_0x161396(0x122))['trim'](),_0x12d886=_0x3dd5a0[_0x161396(0x110)](_0x161396(0xf1))[_0x161396(0x113)]();if(!_0x5bd621&&!_0x12d886)throw CliErrors['validation'](_0x161396(0xf9),_0x161396(0xfc)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x161396(0xf6));if(_0x12d886)assertValidAppcode(_0x12d886);}function resolveKnownApps(){const _0x28ca51=a227_0x58dc0e,{config:_0x33a195,layers:_0x41e47c}=readRawConfigWithLayers(),_0x1e8bde=isRecord(_0x33a195['apps'])?_0x33a195[_0x28ca51(0x116)]:{},_0x30581f=isRecord(_0x41e47c[_0x28ca51(0x118)][_0x28ca51(0x116)])?_0x41e47c[_0x28ca51(0x118)]['apps']:{};return{..._0x30581f,..._0x1e8bde};}async function configureWorkspace(_0x1417da,_0x2ed48e){const _0x23c2c0=a227_0x58dc0e,_0x9aa072=_0x1417da[_0x23c2c0(0x110)]('app')['trim'](),_0x2f5ab8=_0x1417da[_0x23c2c0(0x110)]('appcode')[_0x23c2c0(0x113)](),_0x4522a4=_0x9aa072||_0x2f5ab8;if(!_0x4522a4)throw CliErrors[_0x23c2c0(0x11f)](_0x23c2c0(0xf9),'Use\x20`'+CLI_BIN_NAME+_0x23c2c0(0x10f)+CLI_BIN_NAME+_0x23c2c0(0xf6));if(_0x2f5ab8)assertValidAppcode(_0x2f5ab8);const _0x186612=resolveWriteConfigPath(_0x23c2c0(0x10b)),_0x174966=readConfigFile(_0x186612),_0x3f851d=resolveKnownApps(),_0x5ca0bb=isRecord(_0x174966[_0x23c2c0(0x116)])?{..._0x174966[_0x23c2c0(0x116)]}:{},_0x1e3872=cloneProfile(_0x5ca0bb[_0x4522a4]),_0x5c1ef8=sanitizeProfile(_0x3f851d[_0x4522a4]),_0x154f35=_0x2f5ab8?{}:_0x5c1ef8,_0x55cddb=_0x2f5ab8||_0x154f35[_0x23c2c0(0xf1)];if(!_0x55cddb){const _0x15533b=Object['keys'](_0x3f851d),_0xbf52dd=_0x15533b[_0x23c2c0(0x10e)]===0x0?_0x23c2c0(0xfc)+CLI_BIN_NAME+_0x23c2c0(0x100)+_0x2ed48e+_0x23c2c0(0x11e)+_0x4522a4+_0x23c2c0(0x12a):_0x23c2c0(0x125)+_0x15533b['join'](',\x20');throw CliErrors['validation']('App\x20\x22'+_0x4522a4+'\x22\x20not\x20found.',_0xbf52dd);}assertValidAppcode(String(_0x55cddb));const _0x4e033b={..._0x154f35,..._0x1e3872,'appcode':String(_0x55cddb),...collectWorkspaceProfileOverrides(_0x1417da)};return _0x5ca0bb[_0x4522a4]=_0x4e033b,_0x174966[_0x23c2c0(0x116)]=_0x5ca0bb,normalizeStoredDefaultApp(_0x174966,_0x4522a4),delete _0x174966[_0x23c2c0(0xf1)],delete _0x174966[_0x23c2c0(0x122)],_0x4e033b[_0x23c2c0(0x10a)]&&(_0x174966[_0x23c2c0(0x10a)]=_0x4e033b['env']),writeConfigFile(_0x186612,_0x174966),{'ok':!![],'message':_0x23c2c0(0x10c)+(_0x2ed48e===_0x23c2c0(0x126)?_0x23c2c0(0x101):_0x23c2c0(0x123))+':\x20'+_0x4522a4+'\x20(appcode:\x20'+_0x4e033b['appcode']+_0x23c2c0(0x114)+_0x186612+_0x23c2c0(0x11a),'data':{'operation':_0x23c2c0(0xff)+_0x2ed48e,'configPath':_0x186612,'app':_0x4522a4,'appcode':_0x4e033b['appcode'],'env':_0x4e033b['env']??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a227_0x58dc0e(0xf3),'command':'init','description':a227_0x58dc0e(0xfb),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x314bf2=>configureWorkspace(_0x314bf2,a227_0x58dc0e(0x126))},workspaceUseDefinition={'service':a227_0x58dc0e(0xf3),'command':'use','description':'Switch\x20the\x20current\x20workspace\x20app\x20binding','risk':a227_0x58dc0e(0x120),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x31b544=>configureWorkspace(_0x31b544,a227_0x58dc0e(0xf5))};function a227_0x1f99(){const _0x1da58f=['riskLevel','7689112UsMugx','30642wlOZGH','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','env','project','Workspace\x20','5JkAuUh','length','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','str','pageSize','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','trim',').\x20Config:\x20','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','apps','flag','globalConfig','9moJNVy','.\x20Credentials:\x20not\x20written.','string','7vTPMxl','10564367WyHBpr','\x20--app\x20','validation','write','Target\x20environment','app','updated','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','init','isArray','format','13609230LCbaWl','\x20--appcode\x20<code>`.','defaultFormat','184MzdfKv','3887148CTsJXy','appcode','number','workspace','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','use','\x20workspace\x20use\x20--app\x20<name>`.','2570412DJpteZ','locale','Missing\x20workspace\x20app\x20selector.','1329836jxhnNX','Initialize\x20the\x20current\x20workspace\x20app\x20binding','Use\x20`','object','Invalid\x20appcode:\x20','workspace.','\x20workspace\x20','initialized','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','12nktCUA','apiDir'];a227_0x1f99=function(){return _0x1da58f;};return a227_0x1f99();}export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a228_0x1b8673=a228_0x4529;(function(_0x1ed512,_0x36e514){const _0x24bb27=a228_0x4529,_0x1cac70=_0x1ed512();while(!![]){try{const _0xd7d03d=-parseInt(_0x24bb27(0x170))/0x1+parseInt(_0x24bb27(0x171))/0x2+parseInt(_0x24bb27(0x168))/0x3*(parseInt(_0x24bb27(0x16f))/0x4)+parseInt(_0x24bb27(0x173))/0x5+-parseInt(_0x24bb27(0x166))/0x6+parseInt(_0x24bb27(0x16e))/0x7*(-parseInt(_0x24bb27(0x16b))/0x8)+-parseInt(_0x24bb27(0x16c))/0x9;if(_0xd7d03d===_0x36e514)break;else _0x1cac70['push'](_0x1cac70['shift']());}catch(_0x2cd306){_0x1cac70['push'](_0x1cac70['shift']());}}}(a228_0x1be6,0x2d9a9));function a228_0x4529(_0x495b8b,_0x13f5d1){_0x495b8b=_0x495b8b-0x166;const _0x1be69b=a228_0x1be6();let _0x452919=_0x1be69b[_0x495b8b];return _0x452919;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a228_0x1be6(){const _0x3e2cd7=['name','1770285Wrhiho','write','633030udFoqX','App\x20profile\x20name\x20to\x20remove','97401VidXYk','workspace','remove','8QjSzkT','744561ivIKbl','workspace\x20remove','970914yiAeZY','8HVBvDY','240023qnsrJd','669522ouQSmN'];a228_0x1be6=function(){return _0x3e2cd7;};return a228_0x1be6();}export const workspaceRemoveDefinition={'service':a228_0x1b8673(0x169),'command':a228_0x1b8673(0x16a),'description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a228_0x1b8673(0x174),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a228_0x1b8673(0x172),'description':a228_0x1b8673(0x167),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x1f0090=>validateAppName(_0x1f0090,'workspace\x20remove'),'execute':_0xd0ce9a=>runAppRemove(_0xd0ce9a,a228_0x1b8673(0x16d))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a230_0x23b41d=a230_0x2a3a;(function(_0xefaa6d,_0x5e21c6){const _0x2e4ebe=a230_0x2a3a,_0x234687=_0xefaa6d();while(!![]){try{const _0x2c6d9e=parseInt(_0x2e4ebe(0x141))/0x1*(parseInt(_0x2e4ebe(0x185))/0x2)+parseInt(_0x2e4ebe(0x17c))/0x3*(parseInt(_0x2e4ebe(0x152))/0x4)+-parseInt(_0x2e4ebe(0x175))/0x5+parseInt(_0x2e4ebe(0x13d))/0x6+parseInt(_0x2e4ebe(0x142))/0x7*(parseInt(_0x2e4ebe(0x148))/0x8)+parseInt(_0x2e4ebe(0x164))/0x9*(-parseInt(_0x2e4ebe(0x13b))/0xa)+parseInt(_0x2e4ebe(0x13e))/0xb*(parseInt(_0x2e4ebe(0x137))/0xc);if(_0x2c6d9e===_0x5e21c6)break;else _0x234687['push'](_0x234687['shift']());}catch(_0x7358a0){_0x234687['push'](_0x234687['shift']());}}}(a230_0x3966,0x2f24a));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a230_0x23b41d(0x15a),a230_0x23b41d(0x160),a230_0x23b41d(0x154),'skillDomain',a230_0x23b41d(0x17d),a230_0x23b41d(0x15c),'localDomain',a230_0x23b41d(0x136)];const DOMAIN_FLAGS={'userDomain':a230_0x23b41d(0x162),'apiDomain':a230_0x23b41d(0x144),'runtimeDomain':a230_0x23b41d(0x15e),'skillDomain':a230_0x23b41d(0x157),'kbDomain':a230_0x23b41d(0x138),'appDomain':a230_0x23b41d(0x187),'localDomain':a230_0x23b41d(0x14f),'certificateDomain':a230_0x23b41d(0x13c)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a230_0x23b41d(0x183),a230_0x23b41d(0x147),a230_0x23b41d(0x16a)];function a230_0x3966(){const _0x593703=['kbDomain','localDomain','join','validation','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','object','agentDomain','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','2oXtvUv','skillDomain','app-domain','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','trim','string','Domain\x20config\x20file\x20not\x20found:\x20','enterprise-v1','domain-config','\x20without\x20credentials,\x20query,\x20or\x20fragment.','certificateDomain','12gaVGWP','kb-domain','Invalid\x20cdn.','keys','2327530TnFIdM','certificate-domain','66648Ysoper','5620109hoCTZp','cdn','str','85061ZSIUJu','14gmmIRF','isArray','api-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','kind','platformDomain','157088xyQIwu','search','default','filter',':\x20\x22','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','password','local-domain','utf8','mode','4528SagHTZ','Unsupported\x20domain\x20config\x20field(s):\x20','runtimeDomain',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','username','skill-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','origin','userDomain','Invalid\x20domain\x20config\x20JSON:\x20','appDomain','hash','runtime-domain','https:','apiDomain','Enterprise\x20','user-domain','lovrabet','9lXrsRm','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','length','replace','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','skillHubDomain','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','domains','Invalid\x20','legacy','href','cwd','protocol','base\x20URL','pathname','1719485UgXcMf',':\x20expected\x20an\x20HTTPS\x20','Allowed\x20fields:\x20','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','includes','\x22\x20and\x20kind\x20\x22','327qyUrEE'];a230_0x3966=function(){return _0x593703;};return a230_0x3966();}function a230_0x2a3a(_0x30b01d,_0x3efd6e){_0x30b01d=_0x30b01d-0x133;const _0x3966e6=a230_0x3966();let _0x2a3a22=_0x3966e6[_0x30b01d];return _0x2a3a22;}const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a230_0x23b41d(0x15a),'apiDomain':'apiDomain','runtimeDomain':a230_0x23b41d(0x154),'skillDomain':a230_0x23b41d(0x186),'kbDomain':a230_0x23b41d(0x17d),'appDomain':a230_0x23b41d(0x15c),'localDomain':a230_0x23b41d(0x17e),'certificateDomain':a230_0x23b41d(0x136)},ROUTING_CONSUMER='rabetbase-cli';export function normalizeDomainOrigin(_0x472502,_0x532670){const _0x577969=a230_0x23b41d;if(typeof _0x532670!=='string'||!_0x532670[_0x577969(0x189)]())throw CliErrors['validation'](_0x577969(0x16e)+_0x472502+_0x577969(0x158));let _0x273cb0;try{_0x273cb0=new URL(_0x532670[_0x577969(0x189)]());}catch{throw CliErrors[_0x577969(0x180)](_0x577969(0x16e)+_0x472502+_0x577969(0x14c)+_0x532670+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x273cb0[_0x577969(0x172)]!==_0x577969(0x15f)||_0x273cb0[_0x577969(0x156)]||_0x273cb0[_0x577969(0x14e)]||_0x273cb0[_0x577969(0x174)]!=='/'&&_0x273cb0[_0x577969(0x174)]!==''||_0x273cb0[_0x577969(0x149)]||_0x273cb0[_0x577969(0x15d)])throw CliErrors[_0x577969(0x180)](_0x577969(0x16e)+_0x472502+_0x577969(0x155),_0x577969(0x178));return _0x273cb0[_0x577969(0x159)];}export function normalizeRoutingDomainValue(_0x3be143,_0x4fb57f){const _0x59f696=a230_0x23b41d;if(typeof _0x4fb57f==='string')return normalizeDomainOrigin(_0x3be143,_0x4fb57f);if(!_0x4fb57f||typeof _0x4fb57f!==_0x59f696(0x182)||Array[_0x59f696(0x143)](_0x4fb57f))throw CliErrors[_0x59f696(0x180)](_0x59f696(0x16e)+_0x3be143+_0x59f696(0x179));const _0x8b9945=_0x4fb57f,_0x56bca4=_0x8b9945[ROUTING_CONSUMER]??_0x8b9945[_0x59f696(0x14a)];if(_0x56bca4===undefined)throw CliErrors['validation'](_0x59f696(0x161)+_0x3be143+_0x59f696(0x169)+ROUTING_CONSUMER+'\x20and\x20has\x20no\x20default.');return normalizeDomainOrigin(_0x3be143,_0x56bca4);}export function normalizeCdnBaseUrl(_0x11d5d2,_0x10359c){const _0x10423d=a230_0x23b41d;if(typeof _0x10359c!==_0x10423d(0x18a)||!_0x10359c[_0x10423d(0x189)]())throw CliErrors[_0x10423d(0x180)](_0x10423d(0x139)+_0x11d5d2+_0x10423d(0x145));const _0x281169=_0x10359c[_0x10423d(0x189)]()[_0x10423d(0x167)](/\/$/,'');let _0x4abcb4;try{_0x4abcb4=new URL(_0x281169);}catch{throw CliErrors[_0x10423d(0x180)](_0x10423d(0x139)+_0x11d5d2+_0x10423d(0x14c)+_0x10359c+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x4abcb4[_0x10423d(0x172)]!==_0x10423d(0x15f)||_0x4abcb4['username']||_0x4abcb4[_0x10423d(0x14e)]||_0x4abcb4[_0x10423d(0x149)]||_0x4abcb4['hash']||_0x4abcb4[_0x10423d(0x170)]['replace'](/\/$/,'')!==_0x281169||_0x11d5d2==='lovrabet'&&_0x4abcb4['origin']!==_0x281169)throw CliErrors['validation'](_0x10423d(0x139)+_0x11d5d2+_0x10423d(0x176)+(_0x11d5d2===_0x10423d(0x163)?_0x10423d(0x159):_0x10423d(0x173))+_0x10423d(0x135));return _0x281169;}export function resolveEnterpriseRoutingConfig(_0x15c4bf){const _0x41e498=a230_0x23b41d;return resolveEnterpriseRoutingManifest(_0x15c4bf)?.[_0x41e498(0x16d)];}export function resolveEnterpriseRoutingManifest(_0x187b74){const _0xb384ed=a230_0x23b41d;if(_0x187b74===undefined)return undefined;if(!_0x187b74||typeof _0x187b74!==_0xb384ed(0x182)||Array[_0xb384ed(0x143)](_0x187b74))throw CliErrors[_0xb384ed(0x180)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x187b74);}export function readDomainConfigInput(_0x4edaec){const _0x2e81ed=a230_0x23b41d,_0x27d228=isAbsolute(_0x4edaec)?_0x4edaec:resolve(process[_0x2e81ed(0x171)](),_0x4edaec);if(!existsSync(_0x27d228))throw CliErrors[_0x2e81ed(0x180)](_0x2e81ed(0x18b)+_0x27d228);let _0x3ff8ea;try{_0x3ff8ea=JSON['parse'](readFileSync(_0x27d228,_0x2e81ed(0x150)));}catch{throw CliErrors[_0x2e81ed(0x180)](_0x2e81ed(0x15b)+_0x27d228);}if(!_0x3ff8ea||typeof _0x3ff8ea!=='object'||Array[_0x2e81ed(0x143)](_0x3ff8ea))throw CliErrors[_0x2e81ed(0x180)](_0x2e81ed(0x165));const _0x3fc8af=_0x3ff8ea;if(_0x2e81ed(0x172)in _0x3fc8af)return parseEnterpriseRoutingManifest(_0x3fc8af);const _0x19c649=Object[_0x2e81ed(0x13a)](_0x3fc8af)[_0x2e81ed(0x14b)](_0x387fec=>!DOMAIN_CONFIG_FIELDS[_0x2e81ed(0x17a)](_0x387fec));if(_0x19c649['length']>0x0)throw CliErrors[_0x2e81ed(0x180)](_0x2e81ed(0x153)+_0x19c649[_0x2e81ed(0x17f)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS['join'](',\x20'));const _0x5eb843={};for(const _0xfa5e5b of DOMAIN_CONFIG_FIELDS){_0x3fc8af[_0xfa5e5b]!==undefined&&(_0x5eb843[_0xfa5e5b]=normalizeDomainOrigin(_0xfa5e5b,_0x3fc8af[_0xfa5e5b]));}if(Object[_0x2e81ed(0x13a)](_0x5eb843)['length']===0x0)throw CliErrors[_0x2e81ed(0x180)]('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':'legacy','domains':_0x5eb843};}export function readDomainConfig(_0xf0954d){const _0x2749f0=a230_0x23b41d;return readDomainConfigInput(_0xf0954d)[_0x2749f0(0x16d)];}export function resolveDomainConfigInput(_0x36a413){const _0xe7484a=a230_0x23b41d,_0x5da317=(_0x36a413[_0xe7484a(0x140)](_0xe7484a(0x134))||'')['trim'](),_0x49faf1=_0x5da317?readDomainConfigInput(_0x5da317):{'mode':_0xe7484a(0x16f),'domains':{}},_0xca544f=DOMAIN_CONFIG_FIELDS[_0xe7484a(0x14b)](_0x45fb22=>Boolean((_0x36a413['str'](DOMAIN_FLAGS[_0x45fb22])||'')[_0xe7484a(0x189)]()));if(_0x49faf1[_0xe7484a(0x151)]===_0xe7484a(0x133)&&_0xca544f[_0xe7484a(0x166)]>0x0)throw CliErrors[_0xe7484a(0x180)]('Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.',_0xe7484a(0x16b));for(const _0xb9c147 of DOMAIN_CONFIG_FIELDS){const _0xf581e3=(_0x36a413['str'](DOMAIN_FLAGS[_0xb9c147])||'')['trim']();if(_0xf581e3)_0x49faf1[_0xe7484a(0x16d)][_0xb9c147]=normalizeDomainOrigin(_0xb9c147,_0xf581e3);}return _0x49faf1;}export function resolveDomainFlags(_0x324cb4){const _0xa4eff4=a230_0x23b41d;return resolveDomainConfigInput(_0x324cb4)[_0xa4eff4(0x16d)];}export function parseEnterpriseRoutingManifest(_0x2fb93b){const _0x5976a0=a230_0x23b41d;if(_0x2fb93b[_0x5976a0(0x172)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x2fb93b[_0x5976a0(0x146)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x5976a0(0x180)](_0x5976a0(0x188)+ENTERPRISE_ROUTING_PROTOCOL+_0x5976a0(0x17b)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x2fb93b[_0x5976a0(0x16d)]||typeof _0x2fb93b[_0x5976a0(0x16d)]!==_0x5976a0(0x182)||Array[_0x5976a0(0x143)](_0x2fb93b[_0x5976a0(0x16d)]))throw CliErrors['validation'](_0x5976a0(0x184));if(!_0x2fb93b[_0x5976a0(0x13f)]||typeof _0x2fb93b[_0x5976a0(0x13f)]!==_0x5976a0(0x182)||Array[_0x5976a0(0x143)](_0x2fb93b[_0x5976a0(0x13f)]))throw CliErrors[_0x5976a0(0x180)]('Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.');const _0x3e67c5=_0x2fb93b[_0x5976a0(0x16d)],_0x2f0134=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x5976a0(0x14b)](_0x2c469a=>_0x3e67c5[_0x2c469a]===undefined);if(_0x2f0134[_0x5976a0(0x166)]>0x0)throw CliErrors['validation'](_0x5976a0(0x168)+_0x2f0134[_0x5976a0(0x17f)](',\x20'));if(_0x3e67c5[_0x5976a0(0x17e)]===undefined!==(_0x3e67c5['certificateDomain']===undefined))throw CliErrors['validation'](_0x5976a0(0x16c));const _0x272374=_0x2fb93b[_0x5976a0(0x13f)],_0x2cb74b=Object[_0x5976a0(0x13a)](_0x272374)['filter'](_0x42cf5e=>!ENTERPRISE_ROUTING_CDN_FIELDS['includes'](_0x42cf5e));if(_0x2cb74b[_0x5976a0(0x166)]>0x0)throw CliErrors[_0x5976a0(0x180)](_0x5976a0(0x14d)+_0x2cb74b[_0x5976a0(0x17f)](',\x20'),_0x5976a0(0x177)+ENTERPRISE_ROUTING_CDN_FIELDS['join'](',\x20'));const _0x2822fc=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS[_0x5976a0(0x14b)](_0x159166=>_0x272374[_0x159166]===undefined);if(_0x2822fc['length']>0x0)throw CliErrors['validation'](_0x5976a0(0x181)+_0x2822fc[_0x5976a0(0x17f)](',\x20'));const _0x505bcc={};for(const _0x35ee0b of ENTERPRISE_ROUTING_CDN_FIELDS){_0x505bcc[_0x35ee0b]=normalizeCdnBaseUrl(_0x35ee0b,_0x272374[_0x35ee0b]);}const _0x879f66={},_0x1e8bea={};for(const _0x2a5e05 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x2722e7=_0x3e67c5[_0x2a5e05];if(_0x2722e7===undefined)continue;const _0x6776cf=normalizeRoutingDomainValue(_0x2a5e05,_0x2722e7);_0x879f66[_0x2a5e05]=_0x6776cf;const _0x13b685=ENTERPRISE_TO_LOCAL_FIELD[_0x2a5e05];_0x13b685&&(_0x1e8bea[_0x13b685]=_0x6776cf);}return{'mode':_0x5976a0(0x133),'domains':_0x1e8bea,'manifestDomains':_0x879f66,'cdn':_0x505bcc};}
|
|
1
|
+
const a229_0x3594a9=a229_0x4ce4;(function(_0x348713,_0x222111){const _0x209d41=a229_0x4ce4,_0x33b2b1=_0x348713();while(!![]){try{const _0x54a531=-parseInt(_0x209d41(0xc7))/0x1+-parseInt(_0x209d41(0xa8))/0x2+parseInt(_0x209d41(0xd0))/0x3*(-parseInt(_0x209d41(0xa2))/0x4)+parseInt(_0x209d41(0xc5))/0x5+-parseInt(_0x209d41(0xcb))/0x6+-parseInt(_0x209d41(0xc8))/0x7*(-parseInt(_0x209d41(0xc6))/0x8)+-parseInt(_0x209d41(0x93))/0x9*(-parseInt(_0x209d41(0x90))/0xa);if(_0x54a531===_0x222111)break;else _0x33b2b1['push'](_0x33b2b1['shift']());}catch(_0x316778){_0x33b2b1['push'](_0x33b2b1['shift']());}}}(a229_0x9e64,0xd458c));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=['userDomain','apiDomain','runtimeDomain',a229_0x3594a9(0xb7),a229_0x3594a9(0xac),a229_0x3594a9(0xd6),a229_0x3594a9(0xae),a229_0x3594a9(0xb5)];const DOMAIN_FLAGS={'userDomain':a229_0x3594a9(0xba),'apiDomain':a229_0x3594a9(0xa0),'runtimeDomain':a229_0x3594a9(0xaa),'skillDomain':'skill-domain','kbDomain':a229_0x3594a9(0xd2),'appDomain':a229_0x3594a9(0xad),'localDomain':a229_0x3594a9(0xcd),'certificateDomain':a229_0x3594a9(0xdd)};export const LEGACY_DOMAIN_CONFIG_FIELDS=['agentDomain','platformDomain',a229_0x3594a9(0xaf)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':'userDomain','apiDomain':'apiDomain','runtimeDomain':a229_0x3594a9(0x97),'skillDomain':a229_0x3594a9(0xb7),'kbDomain':a229_0x3594a9(0xac),'appDomain':a229_0x3594a9(0xd6),'localDomain':a229_0x3594a9(0xae),'certificateDomain':a229_0x3594a9(0xb5)},ROUTING_CONSUMER=a229_0x3594a9(0xc2);export function normalizeDomainOrigin(_0x22f210,_0x50f747){const _0x2b983b=a229_0x3594a9;if(typeof _0x50f747!==_0x2b983b(0xc1)||!_0x50f747[_0x2b983b(0xb1)]())throw CliErrors[_0x2b983b(0x9b)]('Invalid\x20'+_0x22f210+_0x2b983b(0xd3));let _0xd0eb1;try{_0xd0eb1=new URL(_0x50f747[_0x2b983b(0xb1)]());}catch{throw CliErrors['validation']('Invalid\x20'+_0x22f210+_0x2b983b(0xbd)+_0x50f747+_0x2b983b(0xd5));}if(_0xd0eb1['protocol']!==_0x2b983b(0x8f)||_0xd0eb1['username']||_0xd0eb1['password']||_0xd0eb1[_0x2b983b(0xd9)]!=='/'&&_0xd0eb1['pathname']!==''||_0xd0eb1[_0x2b983b(0xbb)]||_0xd0eb1[_0x2b983b(0xb3)])throw CliErrors[_0x2b983b(0x9b)](_0x2b983b(0x99)+_0x22f210+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.',_0x2b983b(0xd4));return _0xd0eb1[_0x2b983b(0xb6)];}function a229_0x9e64(){const _0x3ad518=[':\x20expected\x20an\x20HTTPS\x20','runtimeDomain','domains','Invalid\x20','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','validation','Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.','Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','utf8','api-domain','Domain\x20config\x20file\x20not\x20found:\x20','4188VDvXol','\x20without\x20credentials,\x20query,\x20or\x20fragment.','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','legacy','\x20and\x20has\x20no\x20default.','replace','3453954ahSYgy','Invalid\x20domain\x20config\x20JSON:\x20','runtime-domain','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','kbDomain','app-domain','localDomain','skillHubDomain','Unsupported\x20domain\x20config\x20field(s):\x20','trim','join','hash','length','certificateDomain','origin','skillDomain','filter','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','user-domain','search','kind',':\x20\x22','str','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','isArray','string','rabetbase-cli','password','Allowed\x20fields:\x20','3588580RAMLDf','176WXxEfk','484304lWntsQ','482377ZdntAH','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','2513634awSRzx',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','local-domain','cdn','default','1815ZmogkA','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','kb-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','\x22\x20is\x20not\x20a\x20valid\x20URL.','appDomain','keys','username','pathname','includes','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','object','certificate-domain','domain-config','https:','10VMDhWA','Invalid\x20cdn.','enterprise-v1','17097021MoAEea','protocol','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'];a229_0x9e64=function(){return _0x3ad518;};return a229_0x9e64();}export function normalizeRoutingDomainValue(_0x1b4c08,_0x2fb806){const _0x5dabde=a229_0x3594a9;if(typeof _0x2fb806===_0x5dabde(0xc1))return normalizeDomainOrigin(_0x1b4c08,_0x2fb806);if(!_0x2fb806||typeof _0x2fb806!==_0x5dabde(0xdc)||Array[_0x5dabde(0xc0)](_0x2fb806))throw CliErrors[_0x5dabde(0x9b)](_0x5dabde(0x99)+_0x1b4c08+_0x5dabde(0xcc));const _0x4e0978=_0x2fb806,_0x21b63e=_0x4e0978[ROUTING_CONSUMER]??_0x4e0978[_0x5dabde(0xcf)];if(_0x21b63e===undefined)throw CliErrors['validation']('Enterprise\x20'+_0x1b4c08+_0x5dabde(0x95)+ROUTING_CONSUMER+_0x5dabde(0xa6));return normalizeDomainOrigin(_0x1b4c08,_0x21b63e);}export function normalizeCdnBaseUrl(_0x18ae0b,_0x2ed440){const _0x5cb66c=a229_0x3594a9;if(typeof _0x2ed440!==_0x5cb66c(0xc1)||!_0x2ed440[_0x5cb66c(0xb1)]())throw CliErrors[_0x5cb66c(0x9b)]('Invalid\x20cdn.'+_0x18ae0b+_0x5cb66c(0xca));const _0x5d3fc4=_0x2ed440[_0x5cb66c(0xb1)]()[_0x5cb66c(0xa7)](/\/$/,'');let _0x2b1d42;try{_0x2b1d42=new URL(_0x5d3fc4);}catch{throw CliErrors['validation']('Invalid\x20cdn.'+_0x18ae0b+':\x20\x22'+_0x2ed440+_0x5cb66c(0xd5));}if(_0x2b1d42['protocol']!==_0x5cb66c(0x8f)||_0x2b1d42[_0x5cb66c(0xd8)]||_0x2b1d42[_0x5cb66c(0xc3)]||_0x2b1d42['search']||_0x2b1d42[_0x5cb66c(0xb3)]||_0x2b1d42['href'][_0x5cb66c(0xa7)](/\/$/,'')!==_0x5d3fc4||_0x18ae0b==='lovrabet'&&_0x2b1d42[_0x5cb66c(0xb6)]!==_0x5d3fc4)throw CliErrors['validation'](_0x5cb66c(0x91)+_0x18ae0b+_0x5cb66c(0x96)+(_0x18ae0b==='lovrabet'?'origin':'base\x20URL')+_0x5cb66c(0xa3));return _0x5d3fc4;}export function resolveEnterpriseRoutingConfig(_0x4f008e){const _0x3455a4=a229_0x3594a9;return resolveEnterpriseRoutingManifest(_0x4f008e)?.[_0x3455a4(0x98)];}export function resolveEnterpriseRoutingManifest(_0x6c4296){const _0xc55661=a229_0x3594a9;if(_0x6c4296===undefined)return undefined;if(!_0x6c4296||typeof _0x6c4296!==_0xc55661(0xdc)||Array[_0xc55661(0xc0)](_0x6c4296))throw CliErrors[_0xc55661(0x9b)](_0xc55661(0xc9));return parseEnterpriseRoutingManifest(_0x6c4296);}export function readDomainConfigInput(_0x399904){const _0x5af6b8=a229_0x3594a9,_0x15e393=isAbsolute(_0x399904)?_0x399904:resolve(process['cwd'](),_0x399904);if(!existsSync(_0x15e393))throw CliErrors['validation'](_0x5af6b8(0xa1)+_0x15e393);let _0x41a592;try{_0x41a592=JSON['parse'](readFileSync(_0x15e393,_0x5af6b8(0x9f)));}catch{throw CliErrors[_0x5af6b8(0x9b)](_0x5af6b8(0xa9)+_0x15e393);}if(!_0x41a592||typeof _0x41a592!=='object'||Array['isArray'](_0x41a592))throw CliErrors['validation'](_0x5af6b8(0xd1));const _0xf0f21f=_0x41a592;if(_0x5af6b8(0x94)in _0xf0f21f)return parseEnterpriseRoutingManifest(_0xf0f21f);const _0x6fc0a4=Object[_0x5af6b8(0xd7)](_0xf0f21f)[_0x5af6b8(0xb8)](_0x568470=>!DOMAIN_CONFIG_FIELDS[_0x5af6b8(0xda)](_0x568470));if(_0x6fc0a4[_0x5af6b8(0xb4)]>0x0)throw CliErrors[_0x5af6b8(0x9b)](_0x5af6b8(0xb0)+_0x6fc0a4['join'](',\x20'),_0x5af6b8(0xc4)+DOMAIN_CONFIG_FIELDS[_0x5af6b8(0xb2)](',\x20'));const _0x82b60b={};for(const _0x1f336b of DOMAIN_CONFIG_FIELDS){_0xf0f21f[_0x1f336b]!==undefined&&(_0x82b60b[_0x1f336b]=normalizeDomainOrigin(_0x1f336b,_0xf0f21f[_0x1f336b]));}if(Object[_0x5af6b8(0xd7)](_0x82b60b)[_0x5af6b8(0xb4)]===0x0)throw CliErrors[_0x5af6b8(0x9b)]('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':_0x5af6b8(0xa5),'domains':_0x82b60b};}export function readDomainConfig(_0x5a7f85){return readDomainConfigInput(_0x5a7f85)['domains'];}export function resolveDomainConfigInput(_0x37c58d){const _0x50138c=a229_0x3594a9,_0x5bd5d6=(_0x37c58d['str'](_0x50138c(0xde))||'')[_0x50138c(0xb1)](),_0x10c2f9=_0x5bd5d6?readDomainConfigInput(_0x5bd5d6):{'mode':_0x50138c(0xa5),'domains':{}},_0x2a8a41=DOMAIN_CONFIG_FIELDS[_0x50138c(0xb8)](_0x2aa610=>Boolean((_0x37c58d[_0x50138c(0xbe)](DOMAIN_FLAGS[_0x2aa610])||'')['trim']()));if(_0x10c2f9['mode']===_0x50138c(0x92)&&_0x2a8a41[_0x50138c(0xb4)]>0x0)throw CliErrors[_0x50138c(0x9b)](_0x50138c(0xab),_0x50138c(0xdb));for(const _0x47654e of DOMAIN_CONFIG_FIELDS){const _0x436951=(_0x37c58d['str'](DOMAIN_FLAGS[_0x47654e])||'')[_0x50138c(0xb1)]();if(_0x436951)_0x10c2f9['domains'][_0x47654e]=normalizeDomainOrigin(_0x47654e,_0x436951);}return _0x10c2f9;}function a229_0x4ce4(_0x8847e7,_0x25b470){_0x8847e7=_0x8847e7-0x8f;const _0x9e646b=a229_0x9e64();let _0x4ce4b2=_0x9e646b[_0x8847e7];return _0x4ce4b2;}export function resolveDomainFlags(_0x124299){const _0x2a892e=a229_0x3594a9;return resolveDomainConfigInput(_0x124299)[_0x2a892e(0x98)];}export function parseEnterpriseRoutingManifest(_0x5e7a28){const _0x260aa5=a229_0x3594a9;if(_0x5e7a28[_0x260aa5(0x94)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x5e7a28[_0x260aa5(0xbc)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x260aa5(0x9b)](_0x260aa5(0xb9)+ENTERPRISE_ROUTING_PROTOCOL+'\x22\x20and\x20kind\x20\x22'+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x5e7a28[_0x260aa5(0x98)]||typeof _0x5e7a28['domains']!==_0x260aa5(0xdc)||Array[_0x260aa5(0xc0)](_0x5e7a28['domains']))throw CliErrors[_0x260aa5(0x9b)](_0x260aa5(0xbf));if(!_0x5e7a28[_0x260aa5(0xce)]||typeof _0x5e7a28[_0x260aa5(0xce)]!=='object'||Array['isArray'](_0x5e7a28[_0x260aa5(0xce)]))throw CliErrors[_0x260aa5(0x9b)](_0x260aa5(0x9c));const _0x367d74=_0x5e7a28[_0x260aa5(0x98)],_0xf43e10=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x260aa5(0xb8)](_0x58659f=>_0x367d74[_0x58659f]===undefined);if(_0xf43e10[_0x260aa5(0xb4)]>0x0)throw CliErrors['validation'](_0x260aa5(0x9e)+_0xf43e10[_0x260aa5(0xb2)](',\x20'));if(_0x367d74[_0x260aa5(0xae)]===undefined!==(_0x367d74['certificateDomain']===undefined))throw CliErrors['validation'](_0x260aa5(0x9d));const _0x1ad36f=_0x5e7a28[_0x260aa5(0xce)],_0xf7518c=Object['keys'](_0x1ad36f)[_0x260aa5(0xb8)](_0x4e28c6=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x260aa5(0xda)](_0x4e28c6));if(_0xf7518c[_0x260aa5(0xb4)]>0x0)throw CliErrors[_0x260aa5(0x9b)](_0x260aa5(0x9a)+_0xf7518c[_0x260aa5(0xb2)](',\x20'),'Allowed\x20fields:\x20'+ENTERPRISE_ROUTING_CDN_FIELDS[_0x260aa5(0xb2)](',\x20'));const _0x2b319e=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS['filter'](_0x33fd1f=>_0x1ad36f[_0x33fd1f]===undefined);if(_0x2b319e[_0x260aa5(0xb4)]>0x0)throw CliErrors[_0x260aa5(0x9b)](_0x260aa5(0xa4)+_0x2b319e[_0x260aa5(0xb2)](',\x20'));const _0x5359ab={};for(const _0x13beee of ENTERPRISE_ROUTING_CDN_FIELDS){_0x5359ab[_0x13beee]=normalizeCdnBaseUrl(_0x13beee,_0x1ad36f[_0x13beee]);}const _0x19b184={},_0x4190bd={};for(const _0x2908a1 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x19a55e=_0x367d74[_0x2908a1];if(_0x19a55e===undefined)continue;const _0x5e055e=normalizeRoutingDomainValue(_0x2908a1,_0x19a55e);_0x19b184[_0x2908a1]=_0x5e055e;const _0x40b66e=ENTERPRISE_TO_LOCAL_FIELD[_0x2908a1];_0x40b66e&&(_0x4190bd[_0x40b66e]=_0x5e055e);}return{'mode':'enterprise-v1','domains':_0x4190bd,'manifestDomains':_0x19b184,'cdn':_0x5359ab};}
|
|
@@ -6,9 +6,12 @@ export interface ProjectDomainRoutingManifest {
|
|
|
6
6
|
mode: "official" | "independent";
|
|
7
7
|
region: LovrabetRegion | null;
|
|
8
8
|
domains: {
|
|
9
|
+
api: string;
|
|
10
|
+
runtime: string;
|
|
9
11
|
user: string;
|
|
10
12
|
app: string;
|
|
11
|
-
|
|
13
|
+
skill: string;
|
|
14
|
+
kb: string;
|
|
12
15
|
};
|
|
13
16
|
cdn: {
|
|
14
17
|
libraries: string;
|
|
@@ -24,4 +27,5 @@ export declare function getProjectDomainRoutingManifest(): ProjectDomainRoutingM
|
|
|
24
27
|
export declare function writeProjectDomainRoutingManifest(projectRoot: string): {
|
|
25
28
|
path: string;
|
|
26
29
|
manifest: ProjectDomainRoutingManifest;
|
|
30
|
+
changed: boolean;
|
|
27
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a230_0x22571b=a230_0x1ace;(function(_0x21515b,_0x31c366){const _0x52318c=a230_0x1ace,_0x5eb8fd=_0x21515b();while(!![]){try{const _0x466abc=parseInt(_0x52318c(0xcf))/0x1*(parseInt(_0x52318c(0xbe))/0x2)+-parseInt(_0x52318c(0xb7))/0x3*(-parseInt(_0x52318c(0xc8))/0x4)+-parseInt(_0x52318c(0xbd))/0x5+-parseInt(_0x52318c(0xcc))/0x6*(-parseInt(_0x52318c(0xc6))/0x7)+parseInt(_0x52318c(0xc0))/0x8*(parseInt(_0x52318c(0xc4))/0x9)+parseInt(_0x52318c(0xbc))/0xa+-parseInt(_0x52318c(0xca))/0xb;if(_0x466abc===_0x31c366)break;else _0x5eb8fd['push'](_0x5eb8fd['shift']());}catch(_0xb6fd07){_0x5eb8fd['push'](_0x5eb8fd['shift']());}}}(a230_0x429e,0xad0e6));import{readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getApiDomain,getAppDomain,getCertificateDomain,getKbDomain,getLocalDomain,getRuntimeDomain,getSkillDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a230_0x22571b(0xbf);export const PROJECT_DOMAIN_ROUTING_PROTOCOL=a230_0x22571b(0xba);function a230_0x1ace(_0x52ea97,_0x1e277f){_0x52ea97=_0x52ea97-0xb6;const _0x429e3a=a230_0x429e();let _0x1ace05=_0x429e3a[_0x52ea97];return _0x1ace05;}export function getProjectDomainRoutingManifest(){const _0x583dc6=a230_0x22571b,_0x6f2297=getActiveRegion(),_0x50a3d2=isIndependentDeployment(),_0x5067fc=getOfficialRoutingProfile(_0x6f2297),_0x2eec02=getLocalDomain(),_0x3415a9=getCertificateDomain(),_0x144a1c=getActiveCdn();if(!!_0x2eec02!==!!_0x3415a9)throw new Error(_0x583dc6(0xc5));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x50a3d2?_0x583dc6(0xcd):_0x583dc6(0xc2),'region':_0x50a3d2?null:_0x6f2297,'domains':{'api':getApiDomain(),'runtime':getRuntimeDomain(),'user':getUserDomain(),'app':getAppDomain(),'skill':getSkillDomain(),'kb':getKbDomain()},'cdn':_0x144a1c,'local':_0x2eec02&&_0x3415a9?{'origin':_0x2eec02,'certificateUrl':_0x3415a9+_0x583dc6(0xc1)}:_0x50a3d2?{'origin':_0x583dc6(0xc3)}:{'origin':_0x5067fc[_0x583dc6(0xb6)][_0x583dc6(0xb8)],'certificateUrl':_0x144a1c[_0x583dc6(0xcb)]+_0x583dc6(0xc1)}};}export function writeProjectDomainRoutingManifest(_0x1da7af){const _0x14b976=a230_0x22571b,_0x50bfb5=getProjectDomainRoutingManifest(),_0x5eeeb6=join(_0x1da7af,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x2e0bec=JSON[_0x14b976(0xc9)](_0x50bfb5,null,0x2)+'\x0a';try{if(readFileSync(_0x5eeeb6,_0x14b976(0xce))===_0x2e0bec)return{'path':_0x5eeeb6,'manifest':_0x50bfb5,'changed':![]};}catch{}const _0x44db29=_0x5eeeb6+'.'+process[_0x14b976(0xc7)]+'.'+Date[_0x14b976(0xb9)]()+_0x14b976(0xbb);try{writeFileSync(_0x44db29,_0x2e0bec,{'encoding':_0x14b976(0xce),'mode':0x1a4}),renameSync(_0x44db29,_0x5eeeb6);}catch(_0x4417f6){try{unlinkSync(_0x44db29);}catch{}throw _0x4417f6;}return{'path':_0x5eeeb6,'manifest':_0x50bfb5,'changed':!![]};}function a230_0x429e(){const _0x31576a=['utf8','165839XOvgMP','local','584913UAhCDW','origin','now','lovrabet-project-domain-routing/v1','.tmp','535860FaTbLQ','6508175XICiKG','6ZxORGW','rabetbase.domain-routing.json','34616iaqRmn','/cert/lovrabet-dev.json','official','http://localhost','711gMNhng','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','35fpbmZI','pid','8OJdDcN','stringify','732325krRbRG','lovrabet','953004CdSeau','independent'];a230_0x429e=function(){return _0x31576a;};return a230_0x429e();}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a231_0x133f63=a231_0x1a38;(function(_0x94b100,_0x3f5990){const _0x27337c=a231_0x1a38,_0x5813d5=_0x94b100();while(!![]){try{const _0x3db99c=-parseInt(_0x27337c(0x208))/0x1+parseInt(_0x27337c(0x1e4))/0x2+-parseInt(_0x27337c(0x1db))/0x3+-parseInt(_0x27337c(0x202))/0x4+-parseInt(_0x27337c(0x1ff))/0x5+parseInt(_0x27337c(0x20d))/0x6+-parseInt(_0x27337c(0x1e1))/0x7*(-parseInt(_0x27337c(0x1e3))/0x8);if(_0x3db99c===_0x3f5990)break;else _0x5813d5['push'](_0x5813d5['shift']());}catch(_0x158153){_0x5813d5['push'](_0x5813d5['shift']());}}}(a231_0x1630,0x8371c));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a231_0x133f63(0x20c),'accessKey','locale',a231_0x133f63(0x203),a231_0x133f63(0x1f1),a231_0x133f63(0x1dc),a231_0x133f63(0x20a),a231_0x133f63(0x1fb),'apiDomain',a231_0x133f63(0x1ec),a231_0x133f63(0x1df),a231_0x133f63(0x1ea),a231_0x133f63(0x1e9),a231_0x133f63(0x1f6),a231_0x133f63(0x1e6)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a231_0x133f63(0x1e0),a231_0x133f63(0x205),a231_0x133f63(0x20b),a231_0x133f63(0x203),a231_0x133f63(0x20c),'accessKey','apiDir',a231_0x133f63(0x1dc),'userDomain',a231_0x133f63(0x1dd),a231_0x133f63(0x1ec),'skillDomain',a231_0x133f63(0x1ea),a231_0x133f63(0x1e9),a231_0x133f63(0x1f6),a231_0x133f63(0x1e6)]);function a231_0x1a38(_0x445366,_0x2d8260){_0x445366=_0x445366-0x1db;const _0x1630e9=a231_0x1630();let _0x1a3828=_0x1630e9[_0x445366];return _0x1a3828;}export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(_0x484f05){const _0x294437=a231_0x133f63;return[..._0x484f05][_0x294437(0x1ee)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x5e491b){const _0x9a96e8=a231_0x133f63;return TOP_LEVEL_CONFIG_KEYS[_0x9a96e8(0x204)](_0x5e491b);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x285e63=a231_0x133f63;return _0x285e63(0x1f7)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a231_0x133f63(0x1f0),'cookie':a231_0x133f63(0x20c),'accessKey':a231_0x133f63(0x1f5),'defaultFormat':a231_0x133f63(0x203),'pageSize':a231_0x133f63(0x1e5),'riskLevel':'riskLevel','locale':a231_0x133f63(0x20b)};export function getAppProfileFlagDefs(){const _0x307fc9=a231_0x133f63;return[{'name':_0x307fc9(0x205),'type':_0x307fc9(0x1de),'description':_0x307fc9(0x1fe),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x307fc9(0x1f0),'type':_0x307fc9(0x1de),'description':'API\x20directory\x20path'},{'name':'cookie','type':_0x307fc9(0x1de),'description':'Auth\x20cookie','hidden':!![]},{'name':_0x307fc9(0x1f5),'type':_0x307fc9(0x1de),'description':_0x307fc9(0x1f4),'hidden':!![]},{'name':_0x307fc9(0x1f3),'type':'string','description':_0x307fc9(0x1fd),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x307fc9(0x1e5),'type':_0x307fc9(0x1e2),'description':_0x307fc9(0x1e8)},{'name':_0x307fc9(0x1f1),'type':_0x307fc9(0x1de),'description':_0x307fc9(0x1e7),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':'string','description':_0x307fc9(0x206)}];}function a231_0x1630(){const _0x23dafe=['length','userDomain','zh-CN','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','Target\x20environment','2076940MpfYqh','inherit','trim','3012348YThCaT','format','has','env','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','keys','131795FTQhys','map','routing','locale','cookie','2844552aNHWbW','1229313MEvVed','region','apiDomain','string','skillDomain','appcode','11435830Pkeyyh','number','8YSdLDI','281310hvbsBS','pageSize','certificateDomain','Risk\x20level','Default\x20page\x20size','appDomain','kbDomain','app','runtimeDomain','en-US','join','filter','apiDir','riskLevel','defaultApp','defaultFormat','Access\x20key','accessKey','localDomain','Config\x20key\x20(','toLowerCase','apps'];a231_0x1630=function(){return _0x23dafe;};return a231_0x1630();}export function collectAppProfileOverrides(_0x208418){const _0x5ad1bc=a231_0x133f63,_0x187588={};for(const [_0x9edb64,_0x283d61]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x5090bb=_0x208418(_0x9edb64);if(!_0x5090bb)continue;_0x187588[_0x283d61]=_0x283d61===_0x5ad1bc(0x1e5)?Number(_0x5090bb):_0x5090bb;}return _0x187588;}export function buildAppProfileListFields(_0x281d3f){const _0x42d0ac=a231_0x133f63;return{'env':_0x281d3f[_0x42d0ac(0x205)]??null,'apiDir':_0x281d3f['apiDir']??null,'hasCookie':!!_0x281d3f[_0x42d0ac(0x20c)],'hasAccessKey':!!_0x281d3f[_0x42d0ac(0x1f5)],'format':_0x281d3f[_0x42d0ac(0x203)]??null,'pageSize':_0x281d3f[_0x42d0ac(0x1e5)]??null,'riskLevel':_0x281d3f[_0x42d0ac(0x1f1)]??null,'locale':_0x281d3f['locale']??null};}export function buildAppDoctorFields(_0x4c6817,_0x2720dd){const _0x112123=a231_0x133f63;return{'env':{'value':_0x4c6817[_0x112123(0x205)]||_0x2720dd[_0x112123(0x205)],'source':_0x4c6817[_0x112123(0x205)]?'app':'inherit'},'apiDir':{'value':_0x4c6817[_0x112123(0x1f0)]||_0x2720dd[_0x112123(0x1f0)],'source':_0x4c6817['apiDir']?_0x112123(0x1eb):'inherit'},'cookie':{'value':_0x4c6817['cookie']||_0x2720dd[_0x112123(0x20c)],'source':_0x4c6817[_0x112123(0x20c)]?_0x112123(0x1eb):_0x112123(0x200)},'accessKey':{'value':_0x4c6817['accessKey']||_0x2720dd[_0x112123(0x1f5)],'source':_0x4c6817[_0x112123(0x1f5)]?_0x112123(0x1eb):'inherit'}};}export function buildCanonicalAppConfig(_0x332ed7,_0x3737d6){const _0x490ed2=a231_0x133f63,_0x247039=_0x332ed7[_0x490ed2(0x209)](_0x390f60=>String(_0x390f60||'')[_0x490ed2(0x201)]())[_0x490ed2(0x1ef)](Boolean);if(_0x247039['length']===0x0)return{};const _0x19990d={};for(const _0xf9c322 of _0x247039){_0x19990d[_0xf9c322]=_0x3737d6?{'appcode':_0xf9c322,'env':_0x3737d6}:{'appcode':_0xf9c322};}return _0x247039['length']>0x1?{'apps':_0x19990d,'defaultApp':_0x247039[0x0]}:{'apps':_0x19990d};}export function normalizeStoredDefaultApp(_0x3640bb,_0xdc75c0){const _0x5ab335=a231_0x133f63,_0x55b766=_0x3640bb[_0x5ab335(0x1f9)]&&typeof _0x3640bb[_0x5ab335(0x1f9)]==='object'?_0x3640bb[_0x5ab335(0x1f9)]:{},_0x1710b4=Object[_0x5ab335(0x207)](_0x55b766);if(_0x1710b4[_0x5ab335(0x1fa)]<=0x1)return delete _0x3640bb[_0x5ab335(0x1f2)],undefined;const _0x1522ad=typeof _0x3640bb[_0x5ab335(0x1f2)]===_0x5ab335(0x1de)&&_0x55b766[_0x3640bb[_0x5ab335(0x1f2)]]?_0x3640bb['defaultApp']:undefined,_0x44a1db=_0xdc75c0&&_0x55b766[_0xdc75c0]?_0xdc75c0:_0x1522ad;if(_0x44a1db)return _0x3640bb[_0x5ab335(0x1f2)]=_0x44a1db,_0x44a1db;return delete _0x3640bb[_0x5ab335(0x1f2)],undefined;}export function buildCanonicalProjectConfig(_0x3c0a13,_0x160023){const _0x26d82d=a231_0x133f63,{appCodes:appCodes=[],env:_0x2bafbe,metadata:_0x16d9ed}=_0x160023,_0x3eb86c={..._0x3c0a13,..._0x16d9ed||{}};delete _0x3eb86c['appcode'],delete _0x3eb86c[_0x26d82d(0x1eb)];if(_0x2bafbe)_0x3eb86c['env']=_0x2bafbe;else!_0x3eb86c[_0x26d82d(0x205)]&&(_0x3eb86c[_0x26d82d(0x205)]=DEFAULT_CONFIG_VALUES[_0x26d82d(0x205)]);const _0x354f58=buildCanonicalAppConfig(appCodes,_0x3eb86c[_0x26d82d(0x205)]);if(Object[_0x26d82d(0x207)](_0x354f58)[_0x26d82d(0x1fa)]>0x0){_0x3eb86c[_0x26d82d(0x1f9)]=_0x354f58[_0x26d82d(0x1f9)];if(_0x354f58[_0x26d82d(0x1f2)])_0x3eb86c['defaultApp']=_0x354f58[_0x26d82d(0x1f2)];else delete _0x3eb86c[_0x26d82d(0x1f2)];}return _0x3eb86c;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a231_0x133f63(0x1fc),'zh_cn':a231_0x133f63(0x1fc),'en':'en-US','en-us':a231_0x133f63(0x1ed),'en_us':a231_0x133f63(0x1ed)};export function normalizeLocale(_0xb4deb1){const _0x2d941f=a231_0x133f63;if(!_0xb4deb1)return null;return LOCALE_MAP[_0xb4deb1[_0x2d941f(0x1f8)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a232_0x53535d=a232_0x539e;function a232_0x3fe5(){const _0x49b3ba=['3219549oTQWZn','4GObjYG','610956rXRDBP','1135OcTUEO','521270EpdsAX','https://g.lovrabet.com/dist/rabetbase-cli','80RSsDxc','/config/index.json','327360bDvmAW','37962EGmKBL','2218540QsIVWC','2342858XwGhEO'];a232_0x3fe5=function(){return _0x49b3ba;};return a232_0x3fe5();}(function(_0x3743df,_0x48681a){const _0x4b34ed=a232_0x539e,_0x53f5b2=_0x3743df();while(!![]){try{const _0x154836=-parseInt(_0x4b34ed(0x6a))/0x1+parseInt(_0x4b34ed(0x6e))/0x2+-parseInt(_0x4b34ed(0x66))/0x3*(parseInt(_0x4b34ed(0x67))/0x4)+-parseInt(_0x4b34ed(0x69))/0x5*(-parseInt(_0x4b34ed(0x6f))/0x6)+parseInt(_0x4b34ed(0x71))/0x7+-parseInt(_0x4b34ed(0x6c))/0x8*(-parseInt(_0x4b34ed(0x68))/0x9)+-parseInt(_0x4b34ed(0x70))/0xa;if(_0x154836===_0x48681a)break;else _0x53f5b2['push'](_0x53f5b2['shift']());}catch(_0x202e43){_0x53f5b2['push'](_0x53f5b2['shift']());}}}(a232_0x3fe5,0xc29d0));export const RABETBASE_CDN_BASE_URL=a232_0x53535d(0x6b);export const CLI_VERSION_POLICY_URL=RABETBASE_CDN_BASE_URL+a232_0x53535d(0x6d);function a232_0x539e(_0x26b810,_0x17e805){_0x26b810=_0x26b810-0x66;const _0x3fe569=a232_0x3fe5();let _0x539e20=_0x3fe569[_0x26b810];return _0x539e20;}export const PROJECT_TEMPLATE_ASSET_BASE_URL=RABETBASE_CDN_BASE_URL+'/templates/projects';
|