@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-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/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- 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/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +7 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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/batch-design.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/cross-relation-create.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- 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.d.ts +30 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +5 -3
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +2 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +6 -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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.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.d.ts +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.d.ts +0 -10
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +11 -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.d.ts +19 -0
- 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 +6 -1
- package/skills/rabetbase/SKILL.md +16 -10
- package/skills/rabetbase/guides/backend-function.md +5 -1
- package/skills/rabetbase/guides/bff-creation-workflow.md +3 -1
- package/skills/rabetbase/guides/cross-database-bff.md +70 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +35 -33
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -0
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +64 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +5 -3
- package/templates/README.md +46 -6
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a101_0x3aa3(){const _0x382a82=['page','modifiedColumns','37004bLcVow','table','map','181148juUgNT','tableList','filter','MODIFIED_TABLE','3dySQQo','1071147JYqkIv','datasetTableCount','length','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','appCode','deletedColumns','11204820zsOULp','addedColumns','2243790rLjmWw','79072mXVVcD','245547iMSNGg','NEW_TABLE','bool','diffType','string','totalCount','48KXenLH','tableName','all','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','num','Page\x20size','summary','DELETED_TABLE','\x20changed\x20table\x20row(s),\x20total\x20','pagesize','\x20(db\x20link\x20','number','204QKIkMb','fieldDiff'];a101_0x3aa3=function(){return _0x382a82;};return a101_0x3aa3();}const a101_0x554998=a101_0x2344;(function(_0x1f9527,_0x41932d){const _0x54f2f3=a101_0x2344,_0x638472=_0x1f9527();while(!![]){try{const _0x2097b1=-parseInt(_0x54f2f3(0x1ff))/0x1*(-parseInt(_0x54f2f3(0x1f8))/0x2)+parseInt(_0x54f2f3(0x200))/0x3+-parseInt(_0x54f2f3(0x1fb))/0x4+parseInt(_0x54f2f3(0x208))/0x5+parseInt(_0x54f2f3(0x1f4))/0x6*(parseInt(_0x54f2f3(0x209))/0x7)+parseInt(_0x54f2f3(0x1e8))/0x8*(parseInt(_0x54f2f3(0x20a))/0x9)+-parseInt(_0x54f2f3(0x206))/0xa;if(_0x2097b1===_0x41932d)break;else _0x638472['push'](_0x638472['shift']());}catch(_0x21cfe9){_0x638472['push'](_0x638472['shift']());}}}(a101_0x3aa3,0x3b66a));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{DB_TABLE_PAGE_SIZE,getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';function a101_0x2344(_0x463464,_0x448d17){_0x463464=_0x463464-0x1e8;const _0x3aa375=a101_0x3aa3();let _0x234408=_0x3aa375[_0x463464];return _0x234408;}export const dbDiff={'service':'db','command':'diff','description':a101_0x554998(0x1eb),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a101_0x554998(0x1f9),'type':a101_0x554998(0x20e),'description':a101_0x554998(0x203)},{'name':a101_0x554998(0x1f6),'type':a101_0x554998(0x1f3),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a101_0x554998(0x1f1),'type':a101_0x554998(0x1f3),'description':a101_0x554998(0x1ed),'default':0x14},{'name':a101_0x554998(0x1ea),'type':'boolean','description':'Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)'}],async 'execute'(_0x53522b){const _0x58f9ea=a101_0x554998,_0x4f3287=_0x53522b[_0x58f9ea(0x1ec)]('id'),_0x2ae637=_0x53522b[_0x58f9ea(0x20c)]('all'),_0x1d5bb9=_0x2ae637?0x1:_0x53522b['num'](_0x58f9ea(0x1f6),0x1)||0x1,_0x3204e5=_0x2ae637?DB_TABLE_PAGE_SIZE:_0x53522b[_0x58f9ea(0x1ec)]('pagesize',0x14)||0x14,_0xffee6c=_0x53522b['str'](_0x58f9ea(0x1f9))||undefined,_0x1aa0b0=_0x2ae637?await getAllDbTableDiff(getDbTableDiff,_0x53522b[_0x58f9ea(0x204)],_0x4f3287,_0xffee6c):await getDbTableDiff(_0x53522b['appCode'],_0x4f3287,{'pageIndex':_0x1d5bb9,'pageSize':_0x3204e5,'tableName':_0xffee6c}),_0x312b10=_0x1aa0b0[_0x58f9ea(0x1fc)],_0x47bde8=summarizeDbTableDiff(_0x312b10),_0x38eca6=_0x312b10[_0x58f9ea(0x1fd)](_0x3e9a26=>_0x3e9a26[_0x58f9ea(0x20d)]===_0x58f9ea(0x20b)||_0x3e9a26[_0x58f9ea(0x20d)]===_0x58f9ea(0x1fe))[_0x58f9ea(0x1fa)](_0x23eaaf=>_0x23eaaf[_0x58f9ea(0x1e9)]),_0x566f0e=_0x312b10['filter'](_0x9fd673=>_0x9fd673['diffType']===_0x58f9ea(0x1ef))[_0x58f9ea(0x1fa)](_0x1d3150=>_0x1d3150[_0x58f9ea(0x1e9)]),_0x1a5fb3=_0x312b10['filter'](_0x31f9fb=>_0x31f9fb[_0x58f9ea(0x20d)]==='MODIFIED_TABLE')['map'](_0x3e66e5=>({'tableName':_0x3e66e5[_0x58f9ea(0x1e9)],'addedColumns':_0x3e66e5[_0x58f9ea(0x1f5)]?.[_0x58f9ea(0x207)]??[],'deletedColumns':_0x3e66e5[_0x58f9ea(0x1f5)]?.[_0x58f9ea(0x205)]??[],'modifiedColumns':_0x3e66e5[_0x58f9ea(0x1f5)]?.[_0x58f9ea(0x1f7)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x4f3287,'page':_0x1d5bb9,'pageSize':_0x3204e5,'totalCount':_0x1aa0b0[_0x58f9ea(0x20f)],...typeof _0x1aa0b0['physicalTableCount']===_0x58f9ea(0x1f3)?{'physicalTableCount':_0x1aa0b0['physicalTableCount']}:{},...typeof _0x1aa0b0['datasetTableCount']===_0x58f9ea(0x1f3)?{'datasetTableCount':_0x1aa0b0[_0x58f9ea(0x201)]}:{},..._0x1aa0b0[_0x58f9ea(0x1ee)]?{'summary':_0x1aa0b0[_0x58f9ea(0x1ee)]}:{},'summaryByType':_0x47bde8,'toAnalyzeTables':_0x38eca6,'deletedTables':_0x566f0e,'modifiedFieldDiffs':_0x1a5fb3,'tables':_0x312b10},'message':_0x312b10[_0x58f9ea(0x202)]+_0x58f9ea(0x1f0)+_0x1aa0b0[_0x58f9ea(0x20f)]+_0x58f9ea(0x1f2)+_0x4f3287+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10038a,_0xd08063){const _0x15e859=a102_0x12d5,_0x2b837f=_0x10038a();while(!![]){try{const _0x371271=parseInt(_0x15e859(0x1ee))/0x1*(parseInt(_0x15e859(0x1ea))/0x2)+parseInt(_0x15e859(0x1f0))/0x3*(parseInt(_0x15e859(0x1f1))/0x4)+parseInt(_0x15e859(0x1ef))/0x5+parseInt(_0x15e859(0x1ec))/0x6*(-parseInt(_0x15e859(0x1e7))/0x7)+-parseInt(_0x15e859(0x1e9))/0x8+-parseInt(_0x15e859(0x1e8))/0x9*(parseInt(_0x15e859(0x1ed))/0xa)+parseInt(_0x15e859(0x1eb))/0xb;if(_0x371271===_0xd08063)break;else _0x2b837f['push'](_0x2b837f['shift']());}catch(_0x4dbfba){_0x2b837f['push'](_0x2b837f['shift']());}}}(a102_0x38fe,0xe15a6));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';function a102_0x12d5(_0x5eef96,_0x24d8c7){_0x5eef96=_0x5eef96-0x1e7;const _0x38fe25=a102_0x38fe();let _0x12d598=_0x38fe25[_0x5eef96];return _0x12d598;}import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';function a102_0x38fe(){const _0x47fa7d=['2KBJvFX','10775996HWIGvC','3822186zzCZes','1720570dbtiaz','141832uilval','8772560tamPcE','2709807CsifPj','4ZtqvWN','14BMIRXy','54LNVTAw','4398392LPFokg'];a102_0x38fe=function(){return _0x47fa7d;};return a102_0x38fe();}import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x2f5e70=a103_0x4e64;(function(_0x2d1136,_0x20ce06){const _0x3ba1c3=a103_0x4e64,_0x47a828=_0x2d1136();while(!![]){try{const _0x4f0b24=parseInt(_0x3ba1c3(0x99))/0x1+-parseInt(_0x3ba1c3(0x94))/0x2+parseInt(_0x3ba1c3(0xa6))/0x3+parseInt(_0x3ba1c3(0xa0))/0x4*(-parseInt(_0x3ba1c3(0x98))/0x5)+parseInt(_0x3ba1c3(0x9d))/0x6+-parseInt(_0x3ba1c3(0xa2))/0x7*(parseInt(_0x3ba1c3(0xa1))/0x8)+-parseInt(_0x3ba1c3(0x93))/0x9*(-parseInt(_0x3ba1c3(0xa5))/0xa);if(_0x4f0b24===_0x20ce06)break;else _0x47a828['push'](_0x47a828['shift']());}catch(_0x2e62ff){_0x47a828['push'](_0x47a828['shift']());}}}(a103_0x9e57,0x6a029));import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a103_0x4e64(_0x46d0eb,_0xf5647f){_0x46d0eb=_0x46d0eb-0x92;const _0x9e575d=a103_0x9e57();let _0x4e6464=_0x9e575d[_0x46d0eb];return _0x4e6464;}import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a103_0x9e57(){const _0x10e7f0=['1635524tztErg','8UGVmoA','5365430xFdaqv','read','\x20database\x20connection(s)','370TacRBx','2492232VfHeyM','appCode','254655abbrnW','1279878xhhoJA','length','map','list','10sMrZly','541980CgbTqH','num','Page\x20index\x20(1-based)','List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','1432614lhgpvf','Page\x20size','number'];a103_0x9e57=function(){return _0x10e7f0;};return a103_0x9e57();}export const dbList={'service':'db','command':a103_0x2f5e70(0x97),'description':a103_0x2f5e70(0x9c),'risk':a103_0x2f5e70(0xa3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':a103_0x2f5e70(0x9f),'description':a103_0x2f5e70(0x9b),'default':0x1},{'name':'pagesize','type':'number','description':a103_0x2f5e70(0x9e),'default':0x64}],async 'execute'(_0x347fab){const _0x4f296b=a103_0x2f5e70,_0x1a0aee=_0x347fab[_0x4f296b(0x9a)]('page',0x1)||0x1,_0x42fc4c=_0x347fab[_0x4f296b(0x9a)]('pagesize',0x64)||0x64,[{items:_0x99c32a,paging:_0x46c936},_0x2e18ef]=await Promise['all']([listDbLinks(_0x347fab['appCode'],{'currentPage':_0x1a0aee,'pageSize':_0x42fc4c}),listDatasets(_0x347fab[_0x4f296b(0x92)],{'source':'DB_TABLE'})]),_0x5e1037=_0x99c32a[_0x4f296b(0x96)](_0x5422cd=>({...sanitizeDbLinkForOutput(_0x5422cd),'datasetDependency':buildDbDatasetDependency(_0x5422cd,_0x2e18ef)['datasetDependency']})),_0x3bef89=_0x46c936?_0x46c936:{'currentPage':_0x1a0aee,'pageSize':_0x42fc4c,'rowsOnPage':_0x5e1037[_0x4f296b(0x95)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x5e1037,'paging':_0x3bef89},'message':'Found\x20'+_0x5e1037[_0x4f296b(0x95)]+_0x4f296b(0xa4)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fa5af,_0x26803a){const _0xdf04=a104_0x433c,_0x7e030=_0x3fa5af();while(!![]){try{const _0x47bb43=parseInt(_0xdf04(0x11d))/0x1+-parseInt(_0xdf04(0x119))/0x2+-parseInt(_0xdf04(0x11a))/0x3+parseInt(_0xdf04(0x11e))/0x4+parseInt(_0xdf04(0x122))/0x5*(parseInt(_0xdf04(0x112))/0x6)+-parseInt(_0xdf04(0x127))/0x7+parseInt(_0xdf04(0x10a))/0x8*(parseInt(_0xdf04(0x108))/0x9);if(_0x47bb43===_0x26803a)break;else _0x7e030['push'](_0x7e030['shift']());}catch(_0x4feaca){_0x7e030['push'](_0x7e030['shift']());}}}(a104_0x2e8b,0x2d380));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function a104_0x433c(_0x243f8f,_0x56f715){_0x243f8f=_0x243f8f-0x105;const _0x2e8beb=a104_0x2e8b();let _0x433c86=_0x2e8beb[_0x243f8f];return _0x433c86;}function shouldRedactKey(_0x535e8f){const _0xb9be9b=a104_0x433c,_0xdf0ba4=_0x535e8f[_0xb9be9b(0x11b)]();if(_0xdf0ba4===_0xb9be9b(0x113)||_0xdf0ba4===_0xb9be9b(0x11f)||_0xdf0ba4===_0xb9be9b(0x11c))return!![];if(_0xdf0ba4[_0xb9be9b(0x10f)](_0xb9be9b(0x125))||_0xdf0ba4[_0xb9be9b(0x10f)](_0xb9be9b(0x120))||_0xdf0ba4[_0xb9be9b(0x10f)]('credential'))return!![];if(_0xdf0ba4[_0xb9be9b(0x10f)](_0xb9be9b(0x128))||_0xdf0ba4[_0xb9be9b(0x10f)](_0xb9be9b(0x114)))return!![];if(_0xdf0ba4===_0xb9be9b(0x10d)||_0xdf0ba4==='connectionstring'||_0xdf0ba4===_0xb9be9b(0x10b))return!![];return![];}export function sanitizeDbLinkForOutput(_0x3150de){const _0x4d55ed=a104_0x433c,_0xdc619c={..._0x3150de};delete _0xdc619c[_0x4d55ed(0x109)];for(const _0x359abe of Object['keys'](_0xdc619c)){if(!shouldRedactKey(_0x359abe))continue;const _0x1d33a1=_0xdc619c[_0x359abe];_0x1d33a1!=null&&String(_0x1d33a1)['length']>0x0&&(_0xdc619c[_0x359abe]=_0x4d55ed(0x10c));}return _0xdc619c;}function a104_0x2e8b(){const _0x407ff7=['/data/database','6FFjJBk','password','accesskey','length','map','dbId','/data/er?dbId=','532224jhlxGd','461724mhQOol','toLowerCase','dbpassword','79293cUqIMW','565032AMrTOg','passwd','token','code','936005UgRjox','filter','trim','secret','test','1031520qPvxZj','privatekey','name','isFinite','tableName','243yPohRO','hasAvailableDo','102176pCFRMJ','jdbcurl','[redacted]','authorization','dbtableConfig','includes','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.'];a104_0x2e8b=function(){return _0x407ff7;};return a104_0x2e8b();}export function sanitizeDbLinkList(_0xef6ae5){const _0x39db80=a104_0x433c;return _0xef6ae5[_0x39db80(0x116)](_0x36a8e8=>sanitizeDbLinkForOutput(_0x36a8e8));}export function buildDbDatasetDependency(_0x1a72c7,_0x57c6e9){const _0x93d6ee=a104_0x433c,_0x88ac8a=_0x57c6e9[_0x93d6ee(0x123)](_0x5b204e=>Number(_0x5b204e['dbtableConfig']?.[_0x93d6ee(0x117)])===Number(_0x1a72c7['id']))[_0x93d6ee(0x116)](_0x5e8ee0=>({'id':_0x5e8ee0['id'],'code':_0x5e8ee0[_0x93d6ee(0x121)],'name':_0x5e8ee0[_0x93d6ee(0x105)],..._0x5e8ee0[_0x93d6ee(0x10e)]?.[_0x93d6ee(0x107)]?{'tableName':_0x5e8ee0[_0x93d6ee(0x10e)]['tableName']}:{}}));return{'datasetDependency':{'hasDependencies':_0x88ac8a['length']>0x0,'activeDatasetCount':_0x88ac8a[_0x93d6ee(0x115)]},'datasets':_0x88ac8a};}export async function assertDbLinkConnectionPreflight(_0x239275){const _0x5dc4dd=a104_0x433c,_0x32359b=await testDbLinkConfigConnect(_0x239275);if(_0x32359b!==!![])throw CliErrors['apiError']('Database\x20connection\x20preflight\x20failed.',_0x5dc4dd(0x110));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x503601){const _0x3767d8=a104_0x433c,_0x3ecd8c=_0x503601[_0x3767d8(0x124)]();if(!_0x3ecd8c)return![];return DB_URL_PATTERN[_0x3767d8(0x126)](_0x3ecd8c);}export function buildDbPageLinks(_0x42451e,_0x5ef263){const _0x45e610=a104_0x433c,_0x40a93d=_0x42451e?.[_0x45e610(0x124)]();if(!_0x40a93d)return undefined;const _0x5a7a7b=typeof _0x5ef263==='number'?String(_0x5ef263):String(_0x5ef263??'')[_0x45e610(0x124)]();if(!_0x5a7a7b)return undefined;const _0x458ad0=Number(_0x5a7a7b);if(!Number[_0x45e610(0x106)](_0x458ad0)||_0x458ad0<=0x0)return undefined;const _0x380a3d=getAppBaseUrl(_0x40a93d),_0x5bf9bc=encodeURIComponent(String(_0x458ad0));return{'databasePage':_0x380a3d+_0x45e610(0x111),'erPage':_0x380a3d+_0x45e610(0x118)+_0x5bf9bc};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x5a732c=a105_0x2655;(function(_0x478576,_0x14d1c2){const _0x269813=a105_0x2655,_0x253209=_0x478576();while(!![]){try{const _0x506631=parseInt(_0x269813(0x158))/0x1*(parseInt(_0x269813(0x163))/0x2)+-parseInt(_0x269813(0x159))/0x3*(-parseInt(_0x269813(0x14b))/0x4)+-parseInt(_0x269813(0x154))/0x5+parseInt(_0x269813(0x144))/0x6*(parseInt(_0x269813(0x15f))/0x7)+-parseInt(_0x269813(0x150))/0x8+parseInt(_0x269813(0x14a))/0x9+-parseInt(_0x269813(0x15a))/0xa*(parseInt(_0x269813(0x149))/0xb);if(_0x506631===_0x14d1c2)break;else _0x253209['push'](_0x253209['shift']());}catch(_0x5eb9df){_0x253209['push'](_0x253209['shift']());}}}(a105_0x4d18,0x79590));function a105_0x4d18(){const _0x5446c5=['fromEntries','6MNKLWw','804MTvllm','totalCount','physicalTableCount','\x20of\x20','number','77oaRvft','8881812fXUaVM','6124kKDqEf','values','\x20row(s).','length','size','4134536HfbzWk','MODIFIED_TABLE','datasetTableCount','DELETED_TABLE','4919045PLBLdm','filter','summary','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','234388fVXcCi','975LWFfkZ','1601390YBpjZH','map','set','ALREADY_ANALYZED','validation','48636DJJoRe','NEW_TABLE','diffType'];a105_0x4d18=function(){return _0x5446c5;};return a105_0x4d18();}import{CliErrors}from'../../errors.js';export const DB_TABLE_PAGE_SIZE=0x64;export const DB_TABLE_DIFF_TYPES=[a105_0x5a732c(0x160),a105_0x5a732c(0x151),a105_0x5a732c(0x153),a105_0x5a732c(0x15d)];function a105_0x2655(_0xf1cba2,_0x51cf0b){_0xf1cba2=_0xf1cba2-0x144;const _0x4d186e=a105_0x4d18();let _0x26552e=_0x4d186e[_0xf1cba2];return _0x26552e;}export function summarizeDbTableDiff(_0x46386d){const _0x1f3f68=a105_0x5a732c;return Object[_0x1f3f68(0x162)](DB_TABLE_DIFF_TYPES[_0x1f3f68(0x15b)](_0x43b9a9=>[_0x43b9a9,_0x46386d[_0x1f3f68(0x155)](_0x594e64=>_0x594e64[_0x1f3f68(0x161)]===_0x43b9a9)[_0x1f3f68(0x14e)]]));}export async function getAllDbTableDiff(_0x4e6d7b,_0x69d0b1,_0x3a9b03,_0x5cf6d6){const _0x160cf5=a105_0x5a732c,_0x455383=new Map();let _0x43748e=0x1,_0x48ffa2=null;while(!![]){_0x48ffa2=await _0x4e6d7b(_0x69d0b1,_0x3a9b03,{'pageIndex':_0x43748e,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x5cf6d6});const _0x429538=_0x455383[_0x160cf5(0x14f)];for(const _0x51a000 of _0x48ffa2['tableList']){_0x455383[_0x160cf5(0x15c)](_0x51a000['tableName'],_0x51a000);}if(_0x455383[_0x160cf5(0x14f)]>=_0x48ffa2[_0x160cf5(0x145)])break;if(_0x48ffa2['tableList'][_0x160cf5(0x14e)]===0x0||_0x455383[_0x160cf5(0x14f)]===_0x429538)throw CliErrors[_0x160cf5(0x15e)](_0x160cf5(0x157)+_0x455383[_0x160cf5(0x14f)]+_0x160cf5(0x147)+_0x48ffa2[_0x160cf5(0x145)]+_0x160cf5(0x14d));_0x43748e+=0x1;}return{'totalCount':_0x48ffa2?.[_0x160cf5(0x145)]??0x0,...typeof _0x48ffa2?.['physicalTableCount']==='number'?{'physicalTableCount':_0x48ffa2[_0x160cf5(0x146)]}:{},...typeof _0x48ffa2?.[_0x160cf5(0x152)]===_0x160cf5(0x148)?{'datasetTableCount':_0x48ffa2[_0x160cf5(0x152)]}:{},..._0x48ffa2?.[_0x160cf5(0x156)]?{'summary':_0x48ffa2[_0x160cf5(0x156)]}:{},'tableList':[..._0x455383[_0x160cf5(0x14c)]()]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x16bff4=a106_0x38d8;function a106_0x480d(){const _0x4d784b=['27905usAVII','summary','7441035iLcWFA','string','str','5260THddqX','\x20table\x20comparison\x20row(s),\x20total\x20','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','10790429ZmpAgN','6102cudUmi','physicalTableCount','6309CYRhYV','totalCount','table','12sdBFrd','datasetTableCount','210mUELZz','15268407VCtkJN','\x20(db\x20link\x20','List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','486OBVGKO','length','number','8HxZRzm','33717zlPhNd','236cWRXEu','appCode'];a106_0x480d=function(){return _0x4d784b;};return a106_0x480d();}(function(_0x266d58,_0x1df9e1){const _0x241767=a106_0x38d8,_0x432091=_0x266d58();while(!![]){try{const _0x53b591=parseInt(_0x241767(0x12c))/0x1*(parseInt(_0x241767(0x116))/0x2)+parseInt(_0x241767(0x11e))/0x3*(parseInt(_0x241767(0x11f))/0x4)+parseInt(_0x241767(0x121))/0x5*(-parseInt(_0x241767(0x11a))/0x6)+parseInt(_0x241767(0x123))/0x7*(-parseInt(_0x241767(0x11d))/0x8)+-parseInt(_0x241767(0x12a))/0x9*(-parseInt(_0x241767(0x126))/0xa)+parseInt(_0x241767(0x117))/0xb+parseInt(_0x241767(0x114))/0xc*(-parseInt(_0x241767(0x129))/0xd);if(_0x53b591===_0x1df9e1)break;else _0x432091['push'](_0x432091['shift']());}catch(_0x131870){_0x432091['push'](_0x432091['shift']());}}}(a106_0x480d,0xb1078));import{getDbTableComparisonPage}from'../../core/api-client.js';function a106_0x38d8(_0x2a4c70,_0x4b332f){_0x2a4c70=_0x2a4c70-0x114;const _0x480d42=a106_0x480d();let _0x38d810=_0x480d42[_0x2a4c70];return _0x38d810;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbTables={'service':'db','command':'tables','description':a106_0x16bff4(0x119),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a106_0x16bff4(0x12e),'type':a106_0x16bff4(0x124),'description':a106_0x16bff4(0x128)}],async 'execute'(_0x6cca4a){const _0x2d5128=a106_0x16bff4,_0x3bf7a5=_0x6cca4a['num']('id'),_0x558cca=_0x6cca4a[_0x2d5128(0x125)](_0x2d5128(0x12e))||undefined,_0x2b84f5=await getAllDbTableDiff(getDbTableComparisonPage,_0x6cca4a[_0x2d5128(0x120)],_0x3bf7a5,_0x558cca),_0x550174=_0x2b84f5['tableList'];return{'ok':!![],'data':{'dbLinkId':_0x3bf7a5,'totalCount':_0x2b84f5[_0x2d5128(0x12d)],...typeof _0x2b84f5[_0x2d5128(0x12b)]===_0x2d5128(0x11c)?{'physicalTableCount':_0x2b84f5[_0x2d5128(0x12b)]}:{},...typeof _0x2b84f5[_0x2d5128(0x115)]==='number'?{'datasetTableCount':_0x2b84f5[_0x2d5128(0x115)]}:{},..._0x2b84f5['summary']?{'summary':_0x2b84f5[_0x2d5128(0x122)]}:{},'summaryByType':summarizeDbTableDiff(_0x550174),'tables':_0x550174},'message':_0x550174[_0x2d5128(0x11b)]+_0x2d5128(0x127)+_0x2b84f5[_0x2d5128(0x12d)]+_0x2d5128(0x118)+_0x3bf7a5+')'};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a107_0x398000=a107_0x4398;function a107_0x4af9(){const _0x259ba6=['error','\x20(see\x20data.result)','Connection\x20check\x20finished\x20for\x20db\x20link\x20','50WXvxwj','keys','success','4163472wSXVEY','length','25875HfuVHQ','2280fWAqqy','6127506lzHQbn','num','slice','8659178uglkfJ','118462tCiDhe','Connection\x20OK\x20for\x20db\x20link\x20','data','334113CxysOK','15lDyMVg','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','52VMYxSC','652815LINMiD','object'];a107_0x4af9=function(){return _0x259ba6;};return a107_0x4af9();}(function(_0x2e6904,_0x208404){const _0xc3755d=a107_0x4398,_0x287615=_0x2e6904();while(!![]){try{const _0x1a95e3=-parseInt(_0xc3755d(0x195))/0x1*(parseInt(_0xc3755d(0x191))/0x2)+parseInt(_0xc3755d(0x194))/0x3*(-parseInt(_0xc3755d(0x197))/0x4)+parseInt(_0xc3755d(0x198))/0x5+parseInt(_0xc3755d(0x1a0))/0x6+-parseInt(_0xc3755d(0x18d))/0x7+-parseInt(_0xc3755d(0x18c))/0x8*(parseInt(_0xc3755d(0x18b))/0x9)+-parseInt(_0xc3755d(0x19d))/0xa*(-parseInt(_0xc3755d(0x190))/0xb);if(_0x1a95e3===_0x208404)break;else _0x287615['push'](_0x287615['shift']());}catch(_0x5c9a66){_0x287615['push'](_0x287615['shift']());}}}(a107_0x4af9,0xb2164));import{testDbLinkConnect}from'../../core/api-client.js';function a107_0x4398(_0x458dfb,_0x1a7220){_0x458dfb=_0x458dfb-0x18b;const _0x4af957=a107_0x4af9();let _0x4398b7=_0x4af957[_0x458dfb];return _0x4398b7;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x5f4151){const _0x4a8a74=a107_0x4398;if(_0x5f4151===!![]||_0x5f4151===![])return{'success':_0x5f4151};if(_0x5f4151===null||_0x5f4151===undefined)return{'type':typeof _0x5f4151};if(typeof _0x5f4151!==_0x4a8a74(0x199))return{'type':typeof _0x5f4151};const _0x501f89=_0x5f4151,_0xed1b91=[_0x4a8a74(0x19f),'message','code',_0x4a8a74(0x19a),'msg',_0x4a8a74(0x193)],_0x31ec4a={};for(const _0x49fd94 of _0xed1b91){if(_0x49fd94 in _0x501f89)_0x31ec4a[_0x49fd94]=_0x501f89[_0x49fd94];}return Object[_0x4a8a74(0x19e)](_0x31ec4a)[_0x4a8a74(0x1a1)]===0x0&&(_0x31ec4a[_0x4a8a74(0x19e)]=Object['keys'](_0x501f89)[_0x4a8a74(0x18f)](0x0,0x14)),_0x31ec4a;}export const dbTest={'service':'db','command':'test','description':a107_0x398000(0x196),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x446e64){const _0x47431f=a107_0x398000,_0x185ed3=_0x446e64[_0x47431f(0x18e)]('id'),_0x179ec3=await testDbLinkConnect(_0x185ed3),_0x28b37c=_0x179ec3===!![]||typeof _0x179ec3===_0x47431f(0x199)&&_0x179ec3!==null&&_0x179ec3[_0x47431f(0x19f)]===!![],_0x5a5099=summarizeTestConnectResult(_0x179ec3);return{'ok':!![],'data':{'id':_0x185ed3,'connected':Boolean(_0x28b37c),'result':_0x5a5099},'message':_0x28b37c?_0x47431f(0x192)+_0x185ed3:_0x47431f(0x19c)+_0x185ed3+_0x47431f(0x19b)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a108_0x4e5355=a108_0x41e8;(function(_0x4ed6f4,_0x5c8a7c){const _0x81887a=a108_0x41e8,_0x3f5ef4=_0x4ed6f4();while(!![]){try{const _0x24d11f=-parseInt(_0x81887a(0x119))/0x1*(-parseInt(_0x81887a(0x114))/0x2)+parseInt(_0x81887a(0xf7))/0x3*(parseInt(_0x81887a(0x10e))/0x4)+-parseInt(_0x81887a(0xf6))/0x5*(parseInt(_0x81887a(0x108))/0x6)+parseInt(_0x81887a(0x117))/0x7*(parseInt(_0x81887a(0xf3))/0x8)+-parseInt(_0x81887a(0x10a))/0x9+parseInt(_0x81887a(0x102))/0xa*(-parseInt(_0x81887a(0xf8))/0xb)+-parseInt(_0x81887a(0x10b))/0xc*(-parseInt(_0x81887a(0x10d))/0xd);if(_0x24d11f===_0x5c8a7c)break;else _0x3f5ef4['push'](_0x3f5ef4['shift']());}catch(_0x2dcc35){_0x3f5ef4['push'](_0x3f5ef4['shift']());}}}(a108_0xe803,0x9847a));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a108_0x4e5355(0x101),a108_0x4e5355(0x107)]);function a108_0xe803(){const _0x23c4ba=['1822365MQoFCY','182076GSzfmO','New\x20connection\x20parameter\x20string','481pEDSIY','1126408TnZxde','dbdesc','dbName','trim','New\x20host:port','dbUrl','55718fFJYmr','skip-connection-test','dburl','891569IvEDfE','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','15nLPaCT','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','New\x20description','8ycsDkP','password','New\x20username','5yTEtCA','3IdmOaY','4056679gthtVi','bool','has','New\x20database\x20name','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','Updated\x20db\x20link\x20','validation','update','username','******','10eJtCQT','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','dbparam','str','string','[redacted]','1159458wGfdxD','num'];a108_0xe803=function(){return _0x23c4ba;};return a108_0xe803();}function a108_0x41e8(_0x1e7250,_0x4dc10c){_0x1e7250=_0x1e7250-0xf2;const _0xe803d9=a108_0xe803();let _0x41e8cf=_0xe803d9[_0x1e7250];return _0x41e8cf;}function mergeDbLinkUpdate(_0x3d01d9,_0x1bf29e){const _0x2ab8dd=a108_0x4e5355,_0xe6f70b={..._0x3d01d9},_0x1913ef=_0x1bf29e['str'](_0x2ab8dd(0xf4));if(_0x1913ef&&MASKED_PASSWORD_VALUES[_0x2ab8dd(0xfa)](_0x1913ef))throw CliErrors[_0x2ab8dd(0xfe)]('--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.');if(!_0x1913ef&&MASKED_PASSWORD_VALUES[_0x2ab8dd(0xfa)](String(_0x3d01d9[_0x2ab8dd(0xf4)]??'')))throw CliErrors[_0x2ab8dd(0xfe)]('The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.');const _0x456e89=_0x1bf29e[_0x2ab8dd(0x105)]('dbname');if(_0x456e89)_0xe6f70b[_0x2ab8dd(0x110)]=_0x456e89;const _0x4bcf34=_0x1bf29e[_0x2ab8dd(0x105)](_0x2ab8dd(0x116));if(_0x4bcf34)_0xe6f70b[_0x2ab8dd(0x113)]=_0x4bcf34[_0x2ab8dd(0x111)]();const _0x294bd3=_0x1bf29e[_0x2ab8dd(0x105)](_0x2ab8dd(0x100));if(_0x294bd3)_0xe6f70b[_0x2ab8dd(0x100)]=_0x294bd3;if(_0x1913ef)_0xe6f70b[_0x2ab8dd(0xf4)]=_0x1913ef;const _0x5690ed=_0x1bf29e[_0x2ab8dd(0x105)](_0x2ab8dd(0x104));if(_0x5690ed)_0xe6f70b['dbParam']=_0x5690ed;const _0x5754a=_0x1bf29e['str'](_0x2ab8dd(0x10f));if(_0x5754a)_0xe6f70b['dbDesc']=_0x5754a;return _0xe6f70b;}export const dbUpdate={'service':'db','command':a108_0x4e5355(0xff),'description':a108_0x4e5355(0x103),'risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':'string','description':a108_0x4e5355(0xfb)},{'name':a108_0x4e5355(0x116),'type':a108_0x4e5355(0x106),'description':a108_0x4e5355(0x112)},{'name':a108_0x4e5355(0x100),'type':a108_0x4e5355(0x106),'description':a108_0x4e5355(0xf5)},{'name':a108_0x4e5355(0xf4),'type':a108_0x4e5355(0x106),'description':a108_0x4e5355(0x11a)},{'name':a108_0x4e5355(0x104),'type':a108_0x4e5355(0x106),'description':a108_0x4e5355(0x10c)},{'name':a108_0x4e5355(0x10f),'type':a108_0x4e5355(0x106),'description':a108_0x4e5355(0xf2)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x276d78){const _0xb91bc2=a108_0x4e5355,_0x51e280=_0x276d78[_0xb91bc2(0x105)](_0xb91bc2(0x116));if(_0x51e280&&!validateDbUrl(_0x51e280[_0xb91bc2(0x111)]()))throw CliErrors[_0xb91bc2(0xfe)](_0xb91bc2(0x118)+_0x51e280+'\x22');},async 'dryRun'(_0x385360){const _0x582fdc=a108_0x4e5355,_0xc9f117=_0x385360[_0x582fdc(0x109)]('id'),_0x4ef47e=await getDbLinkInfo(_0xc9f117),_0x2d9728=mergeDbLinkUpdate(_0x4ef47e,_0x385360),_0x3c9174=sanitizeDbLinkForOutput(_0x2d9728);return{'method':'POST','url':'/smartapi/dblink/update','body':_0x3c9174,'description':_0x582fdc(0xfc),'connectionPreflight':{'enabled':!_0x385360[_0x582fdc(0xf9)](_0x582fdc(0x115)),'executed':![]}};},async 'execute'(_0x2a25fb){const _0x59c612=a108_0x4e5355,_0x4845b8=_0x2a25fb['num']('id'),_0x2af2ac=await getDbLinkInfo(_0x4845b8),_0x19a696=mergeDbLinkUpdate(_0x2af2ac,_0x2a25fb);!_0x2a25fb[_0x59c612(0xf9)](_0x59c612(0x115))&&await assertDbLinkConnectionPreflight(_0x19a696);const {id:_0x270a95,entity:_0x21f774}=normalizeEntityWithIdResponse(await updateDbLink(_0x19a696));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x21f774),'message':_0x59c612(0xfd)+(_0x270a95??_0x4845b8)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a109_0x383b(){const _0x5a25cc=['40qmvkiv','559956AKQhzn','704NTNJEa','2463950rbZGET','165SVGNWv','117008eheqPs','1113495uPMwMp','28494PCHmhL','117327ZCdjmr','48qzIsPt','2qsUony','35759OluxaG'];a109_0x383b=function(){return _0x5a25cc;};return a109_0x383b();}(function(_0x59a25f,_0x20349c){const _0x1277e2=a109_0x27fa,_0x2ce6d2=_0x59a25f();while(!![]){try{const _0x2613f8=parseInt(_0x1277e2(0xbc))/0x1*(parseInt(_0x1277e2(0xbb))/0x2)+-parseInt(_0x1277e2(0xc3))/0x3+-parseInt(_0x1277e2(0xc2))/0x4*(-parseInt(_0x1277e2(0xbd))/0x5)+-parseInt(_0x1277e2(0xba))/0x6*(-parseInt(_0x1277e2(0xc5))/0x7)+parseInt(_0x1277e2(0xbf))/0x8*(-parseInt(_0x1277e2(0xc4))/0x9)+-parseInt(_0x1277e2(0xc0))/0xa+-parseInt(_0x1277e2(0xc1))/0xb*(-parseInt(_0x1277e2(0xbe))/0xc);if(_0x2613f8===_0x20349c)break;else _0x2ce6d2['push'](_0x2ce6d2['shift']());}catch(_0x2beb26){_0x2ce6d2['push'](_0x2ce6d2['shift']());}}}(a109_0x383b,0x32b18));import{deploymentSyncAll}from'../../commands/deployment/sync-all.js';function a109_0x27fa(_0x29340c,_0x152ead){_0x29340c=_0x29340c-0xba;const _0x383b16=a109_0x383b();let _0x27fa1c=_0x383b16[_0x29340c];return _0x27fa1c;}import{deploymentSyncStatus}from'../../commands/deployment/sync-status.js';import{deploymentSyncJobs}from'../../commands/deployment/sync-jobs.js';export const deploymentDefinitions=[deploymentSyncAll,deploymentSyncStatus,deploymentSyncJobs];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a110_0x2e8c5a=a110_0x32e9;(function(_0x36ba14,_0x19df49){const _0x4c3897=a110_0x32e9,_0x110764=_0x36ba14();while(!![]){try{const _0x466813=-parseInt(_0x4c3897(0x16f))/0x1*(-parseInt(_0x4c3897(0x156))/0x2)+parseInt(_0x4c3897(0x177))/0x3+-parseInt(_0x4c3897(0x163))/0x4*(parseInt(_0x4c3897(0x168))/0x5)+parseInt(_0x4c3897(0x159))/0x6+-parseInt(_0x4c3897(0x170))/0x7*(-parseInt(_0x4c3897(0x16d))/0x8)+parseInt(_0x4c3897(0x167))/0x9+-parseInt(_0x4c3897(0x160))/0xa;if(_0x466813===_0x19df49)break;else _0x110764['push'](_0x110764['shift']());}catch(_0x5ea311){_0x110764['push'](_0x110764['shift']());}}}(a110_0x28c9,0x5d2f1));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{isPlatformTransportFailure,submitDeploymentMetadataSyncAll}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';function a110_0x32e9(_0x3c23a2,_0x5335e5){_0x3c23a2=_0x3c23a2-0x152;const _0x28c9f3=a110_0x28c9();let _0x32e915=_0x28c9f3[_0x3c23a2];return _0x32e915;}const SUBMIT_PATH=a110_0x2e8c5a(0x15a),CONFIRM_FLAG={'name':a110_0x2e8c5a(0x16b),'type':a110_0x2e8c5a(0x16e),'description':a110_0x2e8c5a(0x155)};export const deploymentSyncAll={'service':a110_0x2e8c5a(0x16a),'command':a110_0x2e8c5a(0x15d),'description':'Backfill\x20or\x20recover\x20all\x20server-supported\x20application\x20metadata','risk':a110_0x2e8c5a(0x15f),'strictFlags':!![],'structuredErrors':!![],'confirmationDescription':a110_0x2e8c5a(0x166),'flags':[CONFIRM_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x21ee5e){const _0x33f99b=a110_0x2e8c5a;return asDryRunResult(buildPreview(_0x21ee5e[_0x33f99b(0x162)]),{'method':_0x33f99b(0x16c),'url':SUBMIT_PATH,'description':_0x33f99b(0x178)});},async 'execute'(_0x4cacab){const _0x3e1aff=a110_0x2e8c5a;if(!_0x4cacab['bool'](_0x3e1aff(0x16b)))throw CliErrors['validation'](_0x3e1aff(0x153),_0x3e1aff(0x176));try{const _0x151338=await submitDeploymentMetadataSyncAll({'appCode':_0x4cacab['appCode']});if(_0x151338['outcome']==='not_needed')return{'ok':!![],'data':{'operation':_0x3e1aff(0x175),'appCode':_0x4cacab[_0x3e1aff(0x162)],'submitted':![],'outcome':_0x3e1aff(0x165)},'message':_0x3e1aff(0x15b)};return{'ok':!![],'data':{'operation':'application_deployment_sync','appCode':_0x4cacab[_0x3e1aff(0x162)],'submitted':!![],'outcome':_0x3e1aff(0x154),'jobId':_0x151338[_0x3e1aff(0x15c)][_0x3e1aff(0x157)],'status':_0x151338[_0x3e1aff(0x15c)][_0x3e1aff(0x173)]},'message':_0x3e1aff(0x152)+_0x151338[_0x3e1aff(0x15c)]['jobId']+'.'};}catch(_0x2d8d3e){if(!isPlatformTransportFailure(_0x2d8d3e))throw _0x2d8d3e;const _0x173cc3=new CliError(_0x3e1aff(0x174),0x2,_0x3e1aff(0x158),_0x3e1aff(0x15e));Object[_0x3e1aff(0x161)](_0x173cc3,_0x3e1aff(0x164),{'enumerable':!![],'value':{'operation':'application_deployment_sync','appCode':_0x4cacab[_0x3e1aff(0x162)],'submitted':null,'outcome':_0x3e1aff(0x172)}});throw _0x173cc3;}}};function buildPreview(_0x57e3ef){const _0x4a0263=a110_0x2e8c5a;return{'operation':'application_deployment_sync','selector':{'appCode':_0x57e3ef,'scope':_0x4a0263(0x169)},'before':null,'after':null,'dryRun':!![],'backend':{'submitted':![],'outcome':_0x4a0263(0x171)},'warnings':[]};}function a110_0x28c9(){const _0x1a16b2=['sync-all','List\x20recent\x20deployment\x20sync\x20jobs\x20before\x20deciding\x20whether\x20to\x20submit\x20again.','write','7506760osSTUR','defineProperty','appCode','11084DlreLx','data','not_needed','Submit\x20an\x20administrative\x20metadata\x20backfill\x20or\x20recovery\x20synchronization.','6857820PqheWO','1275fmRqzo','all_server_supported_metadata','deployment','confirm','POST','40bhyeQS','boolean','5CDILJs','228277oLUBbz','not_submitted','unknown','status','deployment_sync_submit_outcome_unknown','application_deployment_sync','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm.','697956xuQCCl','Would\x20submit\x20an\x20administrative\x20deployment\x20metadata\x20backfill\x20or\x20recovery\x20job.','Submitted\x20deployment\x20synchronization\x20job\x20','--confirm\x20is\x20required\x20to\x20synchronize\x20all\x20application\x20metadata.','submitted','Confirm\x20the\x20administrative\x20backfill\x20or\x20recovery\x20synchronization','39842egidIi','jobId','Deployment\x20sync\x20submission\x20response\x20was\x20unavailable;\x20job\x20creation\x20is\x20unknown.','3490020hiRLTB','/smartapi/data-sync/submit','No\x20deployment\x20synchronization\x20was\x20needed\x20for\x20this\x20app.','job'];a110_0x28c9=function(){return _0x1a16b2;};return a110_0x28c9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a111_0x2d5cce=a111_0x52de;(function(_0x19f897,_0x53a581){const _0x48068c=a111_0x52de,_0x584b50=_0x19f897();while(!![]){try{const _0x310f0e=parseInt(_0x48068c(0x1dd))/0x1*(parseInt(_0x48068c(0x1e1))/0x2)+parseInt(_0x48068c(0x1d0))/0x3*(-parseInt(_0x48068c(0x1d5))/0x4)+-parseInt(_0x48068c(0x1d3))/0x5+-parseInt(_0x48068c(0x1d6))/0x6+parseInt(_0x48068c(0x1e0))/0x7+-parseInt(_0x48068c(0x1df))/0x8+parseInt(_0x48068c(0x1d9))/0x9;if(_0x310f0e===_0x53a581)break;else _0x584b50['push'](_0x584b50['shift']());}catch(_0x21846c){_0x584b50['push'](_0x584b50['shift']());}}}(a111_0x34f8,0x577ca));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listDeploymentMetadataSyncJobs}from'../../core/api-client.js';function a111_0x52de(_0x5c9ea9,_0x3fbb4f){_0x5c9ea9=_0x5c9ea9-0x1c7;const _0x34f8fb=a111_0x34f8();let _0x52ded=_0x34f8fb[_0x5c9ea9];return _0x52ded;}import{CliErrors}from'../../errors.js';export const deploymentSyncJobs={'service':'deployment','command':'sync-jobs','description':a111_0x2d5cce(0x1cb),'risk':a111_0x2d5cce(0x1d8),'strictFlags':!![],'structuredErrors':!![],'flags':[{'name':'current-page','type':a111_0x2d5cce(0x1db),'default':0x1,'description':a111_0x2d5cce(0x1c8)},{'name':'page-size','type':a111_0x2d5cce(0x1db),'default':0xa,'description':a111_0x2d5cce(0x1da)},{'name':a111_0x2d5cce(0x1ce),'type':a111_0x2d5cce(0x1d1),'description':a111_0x2d5cce(0x1c9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x8790e8){const _0x182dbc=a111_0x2d5cce;readPaging(_0x8790e8[_0x182dbc(0x1e2)](_0x182dbc(0x1cc),0x1),_0x8790e8[_0x182dbc(0x1e2)](_0x182dbc(0x1d7),0xa));},async 'execute'(_0xfdb2ef){const _0x14e7b2=a111_0x2d5cce,{currentPage:_0x444998,pageSize:_0x19fa9b}=readPaging(_0xfdb2ef['num'](_0x14e7b2(0x1cc),0x1),_0xfdb2ef['num'](_0x14e7b2(0x1d7),0xa)),_0x23f0f8=_0xfdb2ef[_0x14e7b2(0x1c7)]('status')[_0x14e7b2(0x1cf)](),_0x1d4669=await listDeploymentMetadataSyncJobs({'appCode':_0xfdb2ef[_0x14e7b2(0x1de)],'currentPage':_0x444998,'pageSize':_0x19fa9b,..._0x23f0f8?{'status':_0x23f0f8}:{}});return{'ok':!![],'data':{'appCode':_0xfdb2ef['appCode'],..._0x1d4669},'message':_0x14e7b2(0x1d2)+_0x1d4669['items']['length']+_0x14e7b2(0x1cd)};}};function readPaging(_0xb10e35,_0x2af61b){const _0x2011a0=a111_0x2d5cce;if(!Number[_0x2011a0(0x1dc)](_0xb10e35)||_0xb10e35<0x1)throw CliErrors[_0x2011a0(0x1ca)](_0x2011a0(0x1d4));if(!Number[_0x2011a0(0x1dc)](_0x2af61b)||_0x2af61b<0x1||_0x2af61b>0x64)throw CliErrors[_0x2011a0(0x1ca)]('--page-size\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');return{'currentPage':_0xb10e35,'pageSize':_0x2af61b};}function a111_0x34f8(){const _0x4eebb5=['status','trim','39nZXkjK','string','Found\x20','1417615XmTmoE','--current-page\x20must\x20be\x20a\x20positive\x20integer.','66996UReZDI','4152102PPjpZB','page-size','read','11037456iuRbtd','Items\x20per\x20page\x20(maximum\x20100)','number','isSafeInteger','382406QnPmZf','appCode','4069456zfXiMw','3160605Vyqemb','2CuWTsw','num','str','Page\x20number','Optional\x20server-defined\x20job\x20status\x20filter','validation','List\x20application\x20deployment\x20synchronization\x20jobs','current-page','\x20deployment\x20synchronization\x20job(s).'];a111_0x34f8=function(){return _0x4eebb5;};return a111_0x34f8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a112_0x226309=a112_0x3860;(function(_0x4022ec,_0x4da928){const _0x2244e5=a112_0x3860,_0xb37eb8=_0x4022ec();while(!![]){try{const _0x238012=-parseInt(_0x2244e5(0x1ee))/0x1*(parseInt(_0x2244e5(0x1f5))/0x2)+-parseInt(_0x2244e5(0x1ef))/0x3+-parseInt(_0x2244e5(0x1f1))/0x4*(-parseInt(_0x2244e5(0x1fa))/0x5)+-parseInt(_0x2244e5(0x1de))/0x6+-parseInt(_0x2244e5(0x1e0))/0x7*(parseInt(_0x2244e5(0x1da))/0x8)+-parseInt(_0x2244e5(0x1ea))/0x9*(-parseInt(_0x2244e5(0x1e7))/0xa)+-parseInt(_0x2244e5(0x1f6))/0xb*(-parseInt(_0x2244e5(0x1e6))/0xc);if(_0x238012===_0x4da928)break;else _0xb37eb8['push'](_0xb37eb8['shift']());}catch(_0x29d84f){_0xb37eb8['push'](_0xb37eb8['shift']());}}}(a112_0x128d,0x24be3));import{getDeploymentMetadataSyncStatus}from'../../core/api-client.js';function a112_0x3860(_0x432001,_0x4e770c){_0x432001=_0x432001-0x1da;const _0x128d29=a112_0x128d();let _0x3860b6=_0x128d29[_0x432001];return _0x3860b6;}import{CliErrors}from'../../errors.js';function a112_0x128d(){const _0x41f63f=['440yluKwY','SUCCESS','Preserved\x20server-defined\x20status\x20','13059dohPHo','\x20is\x20',';\x20terminal\x20state\x20is\x20unknown\x20to\x20this\x20CLI\x20version.','has','143UnDBVl','278325LCiCXr','FAILED','2020fpFPvl','sync-status','results','bizType','3486BofABE','11weuIQp','PARTIAL_SUCCESS','filter','deployment','2105HmqLeS','Get\x20application\x20deployment\x20synchronization\x20job\x20status','8fQQwCh','number','map','num','750036PqebYo','reduce','1985571MzpmZe','length','status','job-id','action','read','7496796CVvkmk'];a112_0x128d=function(){return _0x41f63f;};return a112_0x128d();}const TERMINAL_STATUSES=new Set([a112_0x226309(0x1e8),a112_0x226309(0x1f7),'FAILED']),ACTIVE_STATUSES=new Set(['PENDING','RUNNING']);export const deploymentSyncStatus={'service':a112_0x226309(0x1f9),'command':a112_0x226309(0x1f2),'description':a112_0x226309(0x1fb),'risk':a112_0x226309(0x1e5),'requiresAppCode':!![],'strictFlags':!![],'structuredErrors':!![],'flags':[{'name':a112_0x226309(0x1e3),'type':a112_0x226309(0x1db),'required':!![],'description':'Deployment\x20synchronization\x20job\x20ID'}],async 'validate'(_0x36eeeb){const _0x3fcdf8=a112_0x226309;readJobId(_0x36eeeb[_0x3fcdf8(0x1dd)](_0x3fcdf8(0x1e3)));},async 'execute'(_0xf42e9b){const _0x4cf2ac=a112_0x226309,_0x14be3c=readJobId(_0xf42e9b[_0x4cf2ac(0x1dd)]('job-id')),_0x2d4c18=await getDeploymentMetadataSyncStatus({'jobId':_0x14be3c,'appCode':_0xf42e9b['appCode']}),_0x16d820=TERMINAL_STATUSES[_0x4cf2ac(0x1ed)](_0x2d4c18[_0x4cf2ac(0x1e2)])?!![]:ACTIVE_STATUSES['has'](_0x2d4c18[_0x4cf2ac(0x1e2)])?![]:null,_0x395c27=countBy(_0x2d4c18[_0x4cf2ac(0x1f3)][_0x4cf2ac(0x1dc)](_0x4ddeb6=>_0x4ddeb6[_0x4cf2ac(0x1f4)])),_0x7b32e7=countBy(_0x2d4c18[_0x4cf2ac(0x1f3)][_0x4cf2ac(0x1dc)](_0x373479=>_0x373479[_0x4cf2ac(0x1e4)])),_0x21639f=_0x16d820===null?[_0x4cf2ac(0x1e9)+_0x2d4c18[_0x4cf2ac(0x1e2)]+_0x4cf2ac(0x1ec)]:[];return{'ok':!![],'data':{'job':_0x2d4c18,'isTerminal':_0x16d820,'summary':{'total':_0x2d4c18[_0x4cf2ac(0x1f3)]['length'],'failed':_0x2d4c18[_0x4cf2ac(0x1f3)][_0x4cf2ac(0x1f8)](_0x355e0a=>_0x355e0a[_0x4cf2ac(0x1e4)]===_0x4cf2ac(0x1f0))[_0x4cf2ac(0x1e1)],'byBizType':_0x395c27,'byAction':_0x7b32e7},'warnings':_0x21639f},'message':'Deployment\x20synchronization\x20job\x20'+_0x14be3c+_0x4cf2ac(0x1eb)+_0x2d4c18[_0x4cf2ac(0x1e2)]+'.'};}};function readJobId(_0xa3926c){if(!Number['isSafeInteger'](_0xa3926c)||_0xa3926c<=0x0)throw CliErrors['validation']('--job-id\x20must\x20be\x20a\x20positive\x20integer.');return _0xa3926c;}function countBy(_0x4f4ca6){const _0x292357=a112_0x226309;return _0x4f4ca6[_0x292357(0x1df)]((_0x3bf1b9,_0x4db0f5)=>{return _0x3bf1b9[_0x4db0f5]=(_0x3bf1b9[_0x4db0f5]??0x0)+0x1,_0x3bf1b9;},{});}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a103_0x517102=a103_0x35f9;(function(_0x49451b,_0x483568){const _0x306c44=a103_0x35f9,_0x13533d=_0x49451b();while(!![]){try{const _0x7cb3f4=-parseInt(_0x306c44(0x1e0))/0x1+parseInt(_0x306c44(0x1d5))/0x2+-parseInt(_0x306c44(0x1bb))/0x3*(parseInt(_0x306c44(0x205))/0x4)+parseInt(_0x306c44(0x18c))/0x5*(parseInt(_0x306c44(0x1fa))/0x6)+-parseInt(_0x306c44(0x20d))/0x7+-parseInt(_0x306c44(0x1fd))/0x8+parseInt(_0x306c44(0x1cf))/0x9;if(_0x7cb3f4===_0x483568)break;else _0x13533d['push'](_0x13533d['shift']());}catch(_0x348692){_0x13533d['push'](_0x13533d['shift']());}}}(a103_0x412e,0xd4fdc));import a103_0x2d1d31 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a103_0x35f9(_0x1c7893,_0x44f446){_0x1c7893=_0x1c7893-0x181;const _0x412e85=a103_0x412e();let _0x35f90b=_0x412e85[_0x1c7893];return _0x35f90b;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getActiveRegion,getApiDomain,getAppDomain,getKbDomain,getSkillDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,initGlobalEnvironment,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';function a103_0x412e(){const _0x395439=['inherit','1019975QvnWnr','project','\x20\x20skillDomain:\x20\x20\x20\x20\x20','repeat','bold','Not\x20checked\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20Auth','\x20\x20Apps','Repair\x20','reason','region','toLowerCase','(set\x20via\x20file,\x20length=','(unknown)','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(set,\x20length=','join','\x20app\x20\x22','(none)','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','(not\x20set)','\x20\x20explicitAppName:\x20','message','red','pageSize','803646gHQHtm','appcode','check','841448WtleiH','\x20config\x20delete\x20region','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','source','projectConfig','platform','regionConfiguredValue','unknown','228sVmOkV','\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20','explicitAppName','version','\x20\x20API\x20Endpoints','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Expired','\x20\x20Repair\x20project:\x20\x20\x20','6418013JiKEdT','missing','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','arch','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20\x20Repair\x20project:\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','read','ignored\x20in\x20','5AtZYUc','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','apiDir','apps','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','global','green','✓\x20Valid','prototype','\x20doctor','label','object','(not\x20found)','cookie','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','raw','Set\x20apps.','\x20\x20Package\x20Version:\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','hasOwnProperty','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(default)','\x20\x20Merged\x20Config','accessKey','format','state','value','\x20config\x20delete\x20inherit','✗\x20Invalid\x20JSON','yellow','gray','filter','routing','\x20\x20\x20\x20region:\x20\x20\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','installedPath','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','includes','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','71166KeVNvy','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20runtimeDomain:\x20\x20\x20','length','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20\x20Routing\x20Configuration','push','riskLevel','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Legacy\x20inherit:\x20\x20\x20','call','(no\x20file)','\x20\x20Config\x20Files','\x20config\x20delete\x20routing\x20--global','\x20config','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','globalConfig','empty','✗\x20Invalid','keys','34119738nZRycC','\x20config\x20delete\x20routing','slice','log','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','683116pZGSNK','locale','defaultApp','\x20\x20─','\x20+\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','packageVersion','Project','padEnd','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a103_0x412e=function(){return _0x395439;};return a103_0x412e();}import{resolveEffectiveRegion}from'../config/region-config.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion}from'../constant/region.js';function describeRegionValue(_0x26b0d1){return typeof _0x26b0d1==='string'?JSON['stringify'](_0x26b0d1):'<'+(_0x26b0d1===null?'null':typeof _0x26b0d1)+'>';}async function execute(_0x2b0a8a){const _0x2221f4=a103_0x35f9,_0x569a22=GIT_COMMIT!==_0x2221f4(0x204)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2221f4(0x1d1)](0x0,0xa)+')':VERSION,_0xe2b283=buildConfigFromFlags({}),_0x2c85c7=getCookie();let _0x103541;try{await initGlobalEnvironment(_0xe2b283);}catch(_0x531295){_0x103541=_0x531295 instanceof Error?_0x531295:new Error(String(_0x531295));}console[_0x2221f4(0x1d2)](),console['log'](a103_0x2d1d31[_0x2221f4(0x1e4)](CLI_BIN_NAME+_0x2221f4(0x19a))),console['log'](a103_0x2d1d31[_0x2221f4(0x1b0)]('─'[_0x2221f4(0x1e3)](0x32))),console[_0x2221f4(0x1d2)](_0x2221f4(0x182)+_0x569a22),console[_0x2221f4(0x1d2)](_0x2221f4(0x1a3)+process[_0x2221f4(0x208)]),console[_0x2221f4(0x1d2)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x2221f4(0x202)]+'\x20'+process[_0x2221f4(0x183)]);const _0x3b81cc=inspectBuiltinSkill();console[_0x2221f4(0x1d2)](),console[_0x2221f4(0x1d2)](a103_0x2d1d31[_0x2221f4(0x1e4)](_0x2221f4(0x1b6))),console[_0x2221f4(0x1d2)](a103_0x2d1d31['gray'](_0x2221f4(0x1d8)[_0x2221f4(0x1e3)](0x1e)));const _0x4ff3db=_0x3b81cc[_0x2221f4(0x1ab)]==='current'?a103_0x2d1d31['green']('✓\x20'+_0x3b81cc[_0x2221f4(0x1ab)]):a103_0x2d1d31[_0x2221f4(0x1f8)]('✗\x20'+_0x3b81cc[_0x2221f4(0x1ab)]);console[_0x2221f4(0x1d2)](_0x2221f4(0x194)+_0x4ff3db),console[_0x2221f4(0x1d2)](_0x2221f4(0x1a2)+_0x3b81cc[_0x2221f4(0x1db)]),console[_0x2221f4(0x1d2)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x3b81cc['skillVersion']||a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1ed)))),console['log']('\x20\x20Installed\x20Path:\x20\x20'+(_0x3b81cc[_0x2221f4(0x1b7)]||a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x19d))));if(_0x3b81cc['reason'])console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3b81cc[_0x2221f4(0x1e9)]);_0x3b81cc[_0x2221f4(0x1ab)]!=='current'&&console[_0x2221f4(0x1d2)](_0x2221f4(0x184)+_0x3b81cc['repairCommand']);console[_0x2221f4(0x1d2)](),console['log'](a103_0x2d1d31[_0x2221f4(0x1e4)](_0x2221f4(0x1c7))),console[_0x2221f4(0x1d2)](a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1d8)[_0x2221f4(0x1e3)](0x1e)));const _0x1c4405=getGlobalConfigPath(),_0x12d6ac=getProjectConfigPath();console['log'](_0x2221f4(0x1ba)+(_0x1c4405||a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x19d)))),console[_0x2221f4(0x1d2)](_0x2221f4(0x1c3)+(_0x12d6ac||a103_0x2d1d31['gray'](_0x2221f4(0x19d)))),console[_0x2221f4(0x1d2)](),console[_0x2221f4(0x1d2)](a103_0x2d1d31['bold'](_0x2221f4(0x18f))),console[_0x2221f4(0x1d2)](a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1d8)[_0x2221f4(0x1e3)](0x1e)));const _0x2061a2=(_0xe567e5,_0x286bd9)=>{const _0x1f631c=_0x2221f4;if(!_0x286bd9){console[_0x1f631c(0x1d2)]('\x20\x20'+_0xe567e5[_0x1f631c(0x1dd)](0x11)+'\x20'+a103_0x2d1d31[_0x1f631c(0x1b0)](_0x1f631c(0x1c6)));return;}const _0x49aa4d=inspectCliConfigJsonFile(_0x286bd9);if(_0x49aa4d['status']==='ok')console[_0x1f631c(0x1d2)]('\x20\x20'+_0xe567e5[_0x1f631c(0x1dd)](0x11)+'\x20'+a103_0x2d1d31['green']('✓\x20Valid\x20JSON'));else{if(_0x49aa4d['status']===_0x1f631c(0x1cc))console['log']('\x20\x20'+_0xe567e5[_0x1f631c(0x1dd)](0x11)+'\x20'+a103_0x2d1d31['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x49aa4d['status']===_0x1f631c(0x181)?console[_0x1f631c(0x1d2)]('\x20\x20'+_0xe567e5[_0x1f631c(0x1dd)](0x11)+'\x20'+a103_0x2d1d31[_0x1f631c(0x1b0)]('(missing)')):(console['log']('\x20\x20'+_0xe567e5['padEnd'](0x11)+'\x20'+a103_0x2d1d31['red'](_0x1f631c(0x1ae))),console[_0x1f631c(0x1d2)]('\x20\x20'+''[_0x1f631c(0x1dd)](0x11)+'\x20'+a103_0x2d1d31[_0x1f631c(0x1f8)](_0x49aa4d['message'])));}};_0x2061a2(_0x2221f4(0x195),_0x1c4405),_0x2061a2(_0x2221f4(0x1dc),_0x12d6ac);const _0x44c915=loadRawConfigLayers(),_0xeeee8a=[{'label':_0x2221f4(0x1dc),'value':_0x44c915['projectConfig']['region'],'present':Object['prototype'][_0x2221f4(0x1a5)][_0x2221f4(0x1c5)](_0x44c915[_0x2221f4(0x201)],'region'),'repairCommand':CLI_BIN_NAME+_0x2221f4(0x1fe)},{'label':_0x2221f4(0x195),'value':_0x44c915['globalConfig']['region'],'present':Object[_0x2221f4(0x199)][_0x2221f4(0x1a5)][_0x2221f4(0x1c5)](_0x44c915[_0x2221f4(0x1cb)],'region'),'repairCommand':CLI_BIN_NAME+'\x20config\x20delete\x20region\x20--global'}][_0x2221f4(0x1b1)](_0x2ed67d=>_0x2ed67d['present']&&isInvalidLovrabetRegion(_0x2ed67d[_0x2221f4(0x1ac)]));for(const [_0x46a882,_0x14b4fb]of[['Project',_0x44c915[_0x2221f4(0x201)]],[_0x2221f4(0x195),_0x44c915[_0x2221f4(0x1cb)]]]){const _0x4b5d55=_0x14b4fb[_0x2221f4(0x193)]&&typeof _0x14b4fb[_0x2221f4(0x193)]==='object'?_0x14b4fb[_0x2221f4(0x193)]:{};for(const [_0x5dc942,_0x213296]of Object['entries'](_0x4b5d55)){if(!_0x213296||typeof _0x213296!==_0x2221f4(0x19c)||!Object['prototype'][_0x2221f4(0x1a5)][_0x2221f4(0x1c5)](_0x213296,_0x2221f4(0x1ea)))continue;isInvalidLovrabetRegion(_0x213296['region'])&&_0xeeee8a[_0x2221f4(0x1c1)]({'label':_0x46a882+_0x2221f4(0x1f1)+_0x5dc942+'\x22','value':_0x213296[_0x2221f4(0x1ea)],'present':!![],'repairCommand':_0x2221f4(0x1a1)+_0x5dc942+'.region\x20to\x20cn\x20or\x20id\x20in\x20'+_0x46a882[_0x2221f4(0x1eb)]()+_0x2221f4(0x1c9)});}}if(_0xeeee8a['length']>0x0){console[_0x2221f4(0x1d2)](),console[_0x2221f4(0x1d2)](a103_0x2d1d31[_0x2221f4(0x1e4)]('\x20\x20Country/Region\x20Configuration')),console[_0x2221f4(0x1d2)](a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1d8)[_0x2221f4(0x1e3)](0x1e)));for(const _0x46d957 of _0xeeee8a){console[_0x2221f4(0x1d2)]('\x20\x20'+_0x46d957[_0x2221f4(0x19b)]['padEnd'](0x11)+'\x20'+a103_0x2d1d31[_0x2221f4(0x1f8)]('✗\x20Invalid\x20'+describeRegionValue(_0x46d957['value']))),console[_0x2221f4(0x1d2)]('\x20\x20'+(_0x2221f4(0x1e8)+_0x46d957[_0x2221f4(0x19b)][_0x2221f4(0x1eb)]()+':')[_0x2221f4(0x1dd)](0x10)+'\x20'+_0x46d957['repairCommand']);}}const _0x5a3530=[Object['prototype'][_0x2221f4(0x1a5)][_0x2221f4(0x1c5)](_0x44c915[_0x2221f4(0x1cb)],_0x2221f4(0x1df))?_0x2221f4(0x196):null,Object['prototype'][_0x2221f4(0x1a5)][_0x2221f4(0x1c5)](_0x44c915[_0x2221f4(0x201)],_0x2221f4(0x1df))?_0x2221f4(0x1e1):null][_0x2221f4(0x1b1)](Boolean);_0x5a3530['length']>0x0&&(console[_0x2221f4(0x1d2)](_0x2221f4(0x1c4)+a103_0x2d1d31[_0x2221f4(0x1af)](_0x2221f4(0x18b)+_0x5a3530[_0x2221f4(0x1f0)](_0x2221f4(0x1d9))+_0x2221f4(0x1c9))),_0x5a3530[_0x2221f4(0x1b9)](_0x2221f4(0x1e1))&&console[_0x2221f4(0x1d2)](_0x2221f4(0x20c)+CLI_BIN_NAME+_0x2221f4(0x1ad)),_0x5a3530[_0x2221f4(0x1b9)](_0x2221f4(0x196))&&console['log'](_0x2221f4(0x188)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));const _0x3dd910=isInvalidLovrabetRegion(_0xe2b283['regionConfiguredValue']??_0xe2b283[_0x2221f4(0x1a0)]?.['region']);_0x103541&&!_0x3dd910&&(console[_0x2221f4(0x1d2)](),console[_0x2221f4(0x1d2)](a103_0x2d1d31['bold'](_0x2221f4(0x1c0))),console[_0x2221f4(0x1d2)](a103_0x2d1d31[_0x2221f4(0x1b0)]('\x20\x20─'[_0x2221f4(0x1e3)](0x1e))),console[_0x2221f4(0x1d2)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a103_0x2d1d31[_0x2221f4(0x1f8)](_0x2221f4(0x1cd))),console[_0x2221f4(0x1d2)](_0x2221f4(0x1de)+_0x103541[_0x2221f4(0x1f7)]),Object[_0x2221f4(0x199)][_0x2221f4(0x1a5)][_0x2221f4(0x1c5)](_0x44c915['projectConfig'],'routing')&&console['log'](_0x2221f4(0x186)+CLI_BIN_NAME+_0x2221f4(0x1d0)),Object['prototype'][_0x2221f4(0x1a5)][_0x2221f4(0x1c5)](_0x44c915['globalConfig'],_0x2221f4(0x1b2))&&console[_0x2221f4(0x1d2)](_0x2221f4(0x1b4)+CLI_BIN_NAME+_0x2221f4(0x1c8)));console[_0x2221f4(0x1d2)](),console['log'](a103_0x2d1d31[_0x2221f4(0x1e4)](_0x2221f4(0x1a8))),console[_0x2221f4(0x1d2)](a103_0x2d1d31[_0x2221f4(0x1b0)]('\x20\x20─'[_0x2221f4(0x1e3)](0x1e))),console[_0x2221f4(0x1d2)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xe2b283['appCode']||a103_0x2d1d31['red'](_0x2221f4(0x1f5))));const _0x375264=_0x3dd910?a103_0x2d1d31[_0x2221f4(0x1f8)](describeRegionValue(_0xe2b283[_0x2221f4(0x203)]??_0xe2b283[_0x2221f4(0x1a0)]?.[_0x2221f4(0x1ea)])+'\x20(invalid)'):(_0xe2b283['region']??DEFAULT_LOVRABET_REGION)+'\x20('+(_0xe2b283['regionSource']??'default')+')';console[_0x2221f4(0x1d2)](_0x2221f4(0x189)+_0x375264),console[_0x2221f4(0x1d2)](_0x2221f4(0x1da)+_0xe2b283['env']),console[_0x2221f4(0x1d2)](_0x2221f4(0x1bf)+_0xe2b283[_0x2221f4(0x1d6)]),console['log'](_0x2221f4(0x1ca)+_0xe2b283[_0x2221f4(0x192)]),console[_0x2221f4(0x1d2)](_0x2221f4(0x191)+(_0xe2b283[_0x2221f4(0x1d7)]||a103_0x2d1d31[_0x2221f4(0x1b0)]('(none)'))),console[_0x2221f4(0x1d2)](_0x2221f4(0x1d3)+(_0xe2b283[_0x2221f4(0x185)]||a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1f2)))),console[_0x2221f4(0x1d2)](_0x2221f4(0x1f6)+(_0xe2b283[_0x2221f4(0x207)]||a103_0x2d1d31['gray'](_0x2221f4(0x1f2)))),console[_0x2221f4(0x1d2)](_0x2221f4(0x18e)+(_0xe2b283[_0x2221f4(0x1aa)]||a103_0x2d1d31[_0x2221f4(0x1b0)]('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x2221f4(0x1a6)+(_0xe2b283[_0x2221f4(0x1f9)]??a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1a7)))),console[_0x2221f4(0x1d2)](_0x2221f4(0x1ff)+_0xe2b283[_0x2221f4(0x1c2)]),console['log'](_0x2221f4(0x1b8)+_0xe2b283['verbose']),console['log'](_0x2221f4(0x1f3)+(_0xe2b283[_0x2221f4(0x19e)]?a103_0x2d1d31[_0x2221f4(0x197)](_0x2221f4(0x1ef)+_0xe2b283[_0x2221f4(0x19e)][_0x2221f4(0x1be)]+')'):_0x2c85c7?a103_0x2d1d31[_0x2221f4(0x197)](_0x2221f4(0x1ec)+_0x2c85c7['length']+')'):a103_0x2d1d31['gray'](_0x2221f4(0x1f2))));const _0x45b01c=Object[_0x2221f4(0x1ce)](_0xe2b283['apps']);if(_0x45b01c[_0x2221f4(0x1be)]>0x0){console[_0x2221f4(0x1d2)](),console[_0x2221f4(0x1d2)](a103_0x2d1d31['bold'](_0x2221f4(0x1e7))),console['log'](a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1d8)[_0x2221f4(0x1e3)](0x1e)));for(const _0x2627ef of _0x45b01c){const _0x89fc64=_0xe2b283['apps'][_0x2627ef],_0x34a0a9=_0x2627ef===_0xe2b283[_0x2221f4(0x1d7)],_0x359038=_0x2627ef===_0xe2b283[_0x2221f4(0x185)],_0x5b5878=_0x359038?a103_0x2d1d31[_0x2221f4(0x197)]('\x20←\x20current'):'',_0x31dddd=_0x34a0a9?'\x20(default)':'';console[_0x2221f4(0x1d2)]('\x20\x20'+_0x2627ef+_0x31dddd+_0x5b5878),console['log'](_0x2221f4(0x1ee)+_0x89fc64[_0x2221f4(0x1fb)]);const _0x1690b9=_0x44c915['projectConfig'][_0x2221f4(0x193)]&&typeof _0x44c915[_0x2221f4(0x201)][_0x2221f4(0x193)]==='object'?_0x44c915[_0x2221f4(0x201)]['apps']:{},_0x3f9c58=Object[_0x2221f4(0x199)][_0x2221f4(0x1a5)]['call'](_0x1690b9,_0x2627ef),_0x32d52a=isInvalidLovrabetRegion(_0x89fc64[_0x2221f4(0x1ea)])?{'region':_0xe2b283['region']??DEFAULT_LOVRABET_REGION}:resolveEffectiveRegion({'appRegion':_0x89fc64[_0x2221f4(0x1ea)],'projectRegion':_0x3f9c58?_0x44c915[_0x2221f4(0x201)][_0x2221f4(0x1ea)]:undefined,'globalRegion':_0x44c915['globalConfig']['region'],'mergedRegion':_0xe2b283['raw'][_0x2221f4(0x1ea)],'appName':_0x2627ef}),_0x3b8caf=buildAppDoctorFields(_0x89fc64,{'region':_0x32d52a[_0x2221f4(0x1ea)],'env':_0xe2b283['env'],'apiDir':_0xe2b283[_0x2221f4(0x1a0)][_0x2221f4(0x192)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0xe2b283[_0x2221f4(0x19e)]||_0x2c85c7||undefined,'accessKey':_0xe2b283[_0x2221f4(0x1a9)]});console[_0x2221f4(0x1d2)](_0x2221f4(0x1b3)+_0x3b8caf[_0x2221f4(0x1ea)][_0x2221f4(0x1ac)]+'\x20\x20'+a103_0x2d1d31[_0x2221f4(0x1b0)]('('+_0x3b8caf[_0x2221f4(0x1ea)]['source']+')')),console[_0x2221f4(0x1d2)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3b8caf[_0x2221f4(0x1f4)][_0x2221f4(0x1ac)]+'\x20\x20'+a103_0x2d1d31[_0x2221f4(0x1b0)]('('+_0x3b8caf[_0x2221f4(0x1f4)][_0x2221f4(0x200)]+')')),console[_0x2221f4(0x1d2)](_0x2221f4(0x18d)+_0x3b8caf['apiDir']['value']+'\x20\x20'+a103_0x2d1d31['gray']('('+_0x3b8caf['apiDir'][_0x2221f4(0x200)]+')'));const _0x594602=_0x3b8caf['cookie'][_0x2221f4(0x1ac)]?a103_0x2d1d31[_0x2221f4(0x197)](_0x2221f4(0x1ef)+_0x3b8caf['cookie'][_0x2221f4(0x1ac)][_0x2221f4(0x1be)]+')'):a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1f2));console[_0x2221f4(0x1d2)](_0x2221f4(0x19f)+_0x594602+'\x20\x20'+a103_0x2d1d31[_0x2221f4(0x1b0)]('('+_0x3b8caf['cookie']['source']+')'));const _0x12e18c=_0x3b8caf[_0x2221f4(0x1a9)]['value']?a103_0x2d1d31['green'](_0x2221f4(0x1ef)+_0x3b8caf[_0x2221f4(0x1a9)][_0x2221f4(0x1ac)][_0x2221f4(0x1be)]+')'):a103_0x2d1d31[_0x2221f4(0x1b0)](_0x2221f4(0x1f2));console['log']('\x20\x20\x20\x20accessKey:\x20\x20'+_0x12e18c+'\x20\x20'+a103_0x2d1d31['gray']('('+_0x3b8caf[_0x2221f4(0x1a9)][_0x2221f4(0x200)]+')'));}}console['log'](),console[_0x2221f4(0x1d2)](a103_0x2d1d31[_0x2221f4(0x1e4)](_0x2221f4(0x209))),console[_0x2221f4(0x1d2)](a103_0x2d1d31['gray'](_0x2221f4(0x1d8)[_0x2221f4(0x1e3)](0x1e)));_0x103541?console[_0x2221f4(0x1d2)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a103_0x2d1d31['red'](_0x2221f4(0x190))):(console[_0x2221f4(0x1d2)]('\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+getActiveRegion()),console[_0x2221f4(0x1d2)](_0x2221f4(0x187)+getApiDomain()),console['log'](_0x2221f4(0x1b5)+getUserDomain()),console[_0x2221f4(0x1d2)](_0x2221f4(0x1bd)+getRuntimeDomain()),console[_0x2221f4(0x1d2)](_0x2221f4(0x1e2)+getSkillDomain()),console[_0x2221f4(0x1d2)](_0x2221f4(0x1d4)+getKbDomain()),console['log'](_0x2221f4(0x206)+getAppDomain()));console[_0x2221f4(0x1d2)](),console['log'](a103_0x2d1d31[_0x2221f4(0x1e4)](_0x2221f4(0x1e6))),console[_0x2221f4(0x1d2)](a103_0x2d1d31['gray'](_0x2221f4(0x1d8)['repeat'](0x1e)));if(_0x103541)console[_0x2221f4(0x1d2)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a103_0x2d1d31['yellow'](_0x2221f4(0x1e5)));else{if(_0x2c85c7){const _0x9a93f7=await getIsSessionValid();console[_0x2221f4(0x1d2)](_0x2221f4(0x20a)+(_0x9a93f7?a103_0x2d1d31['green'](_0x2221f4(0x198)):a103_0x2d1d31[_0x2221f4(0x1f8)](_0x2221f4(0x20b))));}else console[_0x2221f4(0x1d2)](_0x2221f4(0x20a)+a103_0x2d1d31[_0x2221f4(0x1f8)](_0x2221f4(0x1a4)));}return console[_0x2221f4(0x1d2)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a103_0x517102(0x1fc),'description':a103_0x517102(0x1bc),'risk':a103_0x517102(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a113_0x74ab21=a113_0x2ef9;(function(_0x4e0ec7,_0x169a18){const _0x9b5a69=a113_0x2ef9,_0x1b078b=_0x4e0ec7();while(!![]){try{const _0x5c3f39=-parseInt(_0x9b5a69(0x134))/0x1*(-parseInt(_0x9b5a69(0xf7))/0x2)+parseInt(_0x9b5a69(0xfe))/0x3*(-parseInt(_0x9b5a69(0x13d))/0x4)+parseInt(_0x9b5a69(0xc5))/0x5*(-parseInt(_0x9b5a69(0x116))/0x6)+-parseInt(_0x9b5a69(0xdb))/0x7*(-parseInt(_0x9b5a69(0x136))/0x8)+parseInt(_0x9b5a69(0xeb))/0x9+-parseInt(_0x9b5a69(0x128))/0xa*(-parseInt(_0x9b5a69(0xda))/0xb)+-parseInt(_0x9b5a69(0x13b))/0xc;if(_0x5c3f39===_0x169a18)break;else _0x1b078b['push'](_0x1b078b['shift']());}catch(_0x2f6a4e){_0x1b078b['push'](_0x1b078b['shift']());}}}(a113_0x646f,0x74a77));import a113_0x1a158a from'chalk';function a113_0x646f(){const _0x51cae3=['call','\x20\x20Merged\x20Config','ignored\x20in\x20','\x20←\x20current','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','unknown','Set\x20apps.','inherit','\x20config\x20delete\x20routing','581964GECKFs','(default)','missing','apps','✗\x20Not\x20logged\x20in','cookie','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2133IzGqiB','\x20\x20runtimeDomain:\x20\x20\x20','regionSource','read','accessKey','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(default)','stringify','log','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','includes','appCode','routing','push','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid','\x20config','installedPath','raw','Project','hasOwnProperty','\x20\x20skillDomain:\x20\x20\x20\x20\x20','label','248898klxuOP','explicitAppName','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','(none)','(set,\x20length=','.region\x20to\x20cn\x20or\x20id\x20in\x20','platform','region','\x20\x20Legacy\x20inherit:\x20\x20\x20','(no\x20file)','value','doctor','join','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','Global','510fgFCHF','\x20\x20\x20\x20region:\x20\x20\x20\x20\x20','defaultApp','\x20\x20─','\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','green','\x20\x20Skill\x20Version:\x20\x20\x20','(set\x20via\x20file,\x20length=','\x20app\x20\x22','state','(missing)','2uEfNQx','currentApp','196424YIyvwA','globalConfig','gray','\x20\x20Repair\x20global:\x20\x20\x20\x20','status','2542536XPMHNq','present','1712IvMfUu','(unknown)','\x20config\x20delete\x20inherit\x20--global','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','Not\x20checked\x20until\x20routing\x20configuration\x20is\x20repaired','✓\x20Valid\x20JSON','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','current','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20region','apiDir','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20config\x20delete\x20inherit','bold','toLowerCase','format','env','prototype','Repair\x20','skillVersion','default','\x20\x20Routing\x20Configuration','length','version','✗\x20Invalid\x20JSON','filter','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','string','\x20\x20Auth','20JwqABW','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20accessKey:\x20\x20','\x20+\x20','source','arch','reason','✗\x20Invalid','padEnd','null','entries','locale','⚠\x20Empty\x20(treated\x20as\x20{})','(default:\x20','appcode','red','object','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20explicitAppName:\x20','riskLevel','13233lwYQcv','7ceaCSW','\x20config\x20delete\x20region\x20--global','(not\x20set)','projectConfig','✗\x20Invalid\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','keys','empty','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','message','global','verbose','repeat','regionConfiguredValue','4428567JuxTvW','yellow','\x20\x20Country/Region\x20Configuration'];a113_0x646f=function(){return _0x51cae3;};return a113_0x646f();}function a113_0x2ef9(_0x3ea3d1,_0x336ffb){_0x3ea3d1=_0x3ea3d1-0xc0;const _0x646faa=a113_0x646f();let _0x2ef99f=_0x646faa[_0x3ea3d1];return _0x2ef99f;}import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getActiveRegion,getApiDomain,getAppDomain,getKbDomain,getSkillDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,initGlobalEnvironment,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';import{resolveEffectiveRegion}from'../config/region-config.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion}from'../constant/region.js';function describeRegionValue(_0x1a6116){const _0xa4b0aa=a113_0x2ef9;return typeof _0x1a6116===_0xa4b0aa(0xc3)?JSON[_0xa4b0aa(0x106)](_0x1a6116):'<'+(_0x1a6116===null?_0xa4b0aa(0xcf):typeof _0x1a6116)+'>';}async function execute(_0x3d06af){const _0x7296d9=a113_0x2ef9,_0x2e89d5=GIT_COMMIT!==_0x7296d9(0xf3)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0x1340d9=buildConfigFromFlags({}),_0x228c72=getCookie();let _0x26b09f;try{await initGlobalEnvironment(_0x1340d9);}catch(_0x1193f2){_0x26b09f=_0x1193f2 instanceof Error?_0x1193f2:new Error(String(_0x1193f2));}console[_0x7296d9(0x107)](),console['log'](a113_0x1a158a[_0x7296d9(0x14b)](CLI_BIN_NAME+'\x20doctor')),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x138)]('─'['repeat'](0x32))),console['log'](_0x7296d9(0xc2)+_0x2e89d5),console['log'](_0x7296d9(0xfd)+process[_0x7296d9(0x155)]),console[_0x7296d9(0x107)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x7296d9(0x11d)]+'\x20'+process[_0x7296d9(0xcb)]);const _0x37f5cb=inspectBuiltinSkill();console[_0x7296d9(0x107)](),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x14b)]('\x20\x20Built-in\x20Skill')),console['log'](a113_0x1a158a['gray'](_0x7296d9(0x12b)[_0x7296d9(0xe9)](0x1e)));const _0x4d21e6=_0x37f5cb[_0x7296d9(0x132)]===_0x7296d9(0x145)?a113_0x1a158a[_0x7296d9(0x12e)]('✓\x20'+_0x37f5cb[_0x7296d9(0x132)]):a113_0x1a158a[_0x7296d9(0xd5)]('✗\x20'+_0x37f5cb[_0x7296d9(0x132)]);console['log'](_0x7296d9(0xe4)+_0x4d21e6),console[_0x7296d9(0x107)]('\x20\x20Package\x20Version:\x20'+_0x37f5cb['packageVersion']),console[_0x7296d9(0x107)](_0x7296d9(0x12f)+(_0x37f5cb[_0x7296d9(0x151)]||a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x13e)))),console[_0x7296d9(0x107)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x37f5cb[_0x7296d9(0x110)]||a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0xe5))));if(_0x37f5cb[_0x7296d9(0xcc)])console[_0x7296d9(0x107)](_0x7296d9(0x146)+_0x37f5cb[_0x7296d9(0xcc)]);_0x37f5cb[_0x7296d9(0x132)]!==_0x7296d9(0x145)&&console[_0x7296d9(0x107)](_0x7296d9(0x124)+_0x37f5cb['repairCommand']);console[_0x7296d9(0x107)](),console[_0x7296d9(0x107)](a113_0x1a158a['bold']('\x20\x20Config\x20Files')),console[_0x7296d9(0x107)](a113_0x1a158a['gray'](_0x7296d9(0x12b)[_0x7296d9(0xe9)](0x1e)));const _0xe900f9=getGlobalConfigPath(),_0x2f44d8=getProjectConfigPath();console[_0x7296d9(0x107)](_0x7296d9(0xc7)+(_0xe900f9||a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0xe5)))),console[_0x7296d9(0x107)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2f44d8||a113_0x1a158a[_0x7296d9(0x138)]('(not\x20found)'))),console[_0x7296d9(0x107)](),console['log'](a113_0x1a158a[_0x7296d9(0x14b)]('\x20\x20Config\x20JSON')),console['log'](a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x12b)[_0x7296d9(0xe9)](0x1e)));const _0x28c64f=(_0xd14d6d,_0x2b91ce)=>{const _0x1f5bcf=_0x7296d9;if(!_0x2b91ce){console[_0x1f5bcf(0x107)]('\x20\x20'+_0xd14d6d[_0x1f5bcf(0xce)](0x11)+'\x20'+a113_0x1a158a[_0x1f5bcf(0x138)](_0x1f5bcf(0x120)));return;}const _0x473fcc=inspectCliConfigJsonFile(_0x2b91ce);if(_0x473fcc[_0x1f5bcf(0x13a)]==='ok')console[_0x1f5bcf(0x107)]('\x20\x20'+_0xd14d6d[_0x1f5bcf(0xce)](0x11)+'\x20'+a113_0x1a158a['green'](_0x1f5bcf(0x142)));else{if(_0x473fcc[_0x1f5bcf(0x13a)]===_0x1f5bcf(0xe2))console[_0x1f5bcf(0x107)]('\x20\x20'+_0xd14d6d[_0x1f5bcf(0xce)](0x11)+'\x20'+a113_0x1a158a[_0x1f5bcf(0xec)](_0x1f5bcf(0xd2)));else _0x473fcc[_0x1f5bcf(0x13a)]===_0x1f5bcf(0xf9)?console[_0x1f5bcf(0x107)]('\x20\x20'+_0xd14d6d['padEnd'](0x11)+'\x20'+a113_0x1a158a[_0x1f5bcf(0x138)](_0x1f5bcf(0x133))):(console['log']('\x20\x20'+_0xd14d6d[_0x1f5bcf(0xce)](0x11)+'\x20'+a113_0x1a158a[_0x1f5bcf(0xd5)](_0x1f5bcf(0xc0))),console[_0x1f5bcf(0x107)]('\x20\x20'+''[_0x1f5bcf(0xce)](0x11)+'\x20'+a113_0x1a158a[_0x1f5bcf(0xd5)](_0x473fcc[_0x1f5bcf(0xe6)])));}};_0x28c64f(_0x7296d9(0x127),_0xe900f9),_0x28c64f(_0x7296d9(0x112),_0x2f44d8);const _0x550e93=loadRawConfigLayers(),_0x3647e1=[{'label':_0x7296d9(0x112),'value':_0x550e93[_0x7296d9(0xde)][_0x7296d9(0x11e)],'present':Object[_0x7296d9(0x14f)]['hasOwnProperty']['call'](_0x550e93['projectConfig'],_0x7296d9(0x11e)),'repairCommand':CLI_BIN_NAME+_0x7296d9(0x147)},{'label':_0x7296d9(0x127),'value':_0x550e93[_0x7296d9(0x137)][_0x7296d9(0x11e)],'present':Object[_0x7296d9(0x14f)]['hasOwnProperty'][_0x7296d9(0xee)](_0x550e93['globalConfig'],_0x7296d9(0x11e)),'repairCommand':CLI_BIN_NAME+_0x7296d9(0xdc)}][_0x7296d9(0xc1)](_0x552c69=>_0x552c69[_0x7296d9(0x13c)]&&isInvalidLovrabetRegion(_0x552c69[_0x7296d9(0x121)]));for(const [_0x506e68,_0x306af5]of[[_0x7296d9(0x112),_0x550e93[_0x7296d9(0xde)]],[_0x7296d9(0x127),_0x550e93['globalConfig']]]){const _0x1bb244=_0x306af5[_0x7296d9(0xfa)]&&typeof _0x306af5['apps']===_0x7296d9(0xd6)?_0x306af5['apps']:{};for(const [_0x428d1d,_0x51720c]of Object[_0x7296d9(0xd0)](_0x1bb244)){if(!_0x51720c||typeof _0x51720c!==_0x7296d9(0xd6)||!Object[_0x7296d9(0x14f)]['hasOwnProperty']['call'](_0x51720c,_0x7296d9(0x11e)))continue;isInvalidLovrabetRegion(_0x51720c[_0x7296d9(0x11e)])&&_0x3647e1[_0x7296d9(0x10c)]({'label':_0x506e68+_0x7296d9(0x131)+_0x428d1d+'\x22','value':_0x51720c[_0x7296d9(0x11e)],'present':!![],'repairCommand':_0x7296d9(0xf4)+_0x428d1d+_0x7296d9(0x11c)+_0x506e68[_0x7296d9(0x14c)]()+_0x7296d9(0x10f)});}}if(_0x3647e1[_0x7296d9(0x154)]>0x0){console[_0x7296d9(0x107)](),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x14b)](_0x7296d9(0xed))),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x12b)[_0x7296d9(0xe9)](0x1e)));for(const _0x4c2e9d of _0x3647e1){console['log']('\x20\x20'+_0x4c2e9d[_0x7296d9(0x115)][_0x7296d9(0xce)](0x11)+'\x20'+a113_0x1a158a['red'](_0x7296d9(0xdf)+describeRegionValue(_0x4c2e9d[_0x7296d9(0x121)]))),console[_0x7296d9(0x107)]('\x20\x20'+(_0x7296d9(0x150)+_0x4c2e9d[_0x7296d9(0x115)]['toLowerCase']()+':')['padEnd'](0x10)+'\x20'+_0x4c2e9d['repairCommand']);}}const _0x515ea2=[Object[_0x7296d9(0x14f)][_0x7296d9(0x113)][_0x7296d9(0xee)](_0x550e93[_0x7296d9(0x137)],_0x7296d9(0xf5))?_0x7296d9(0xe7):null,Object[_0x7296d9(0x14f)][_0x7296d9(0x113)][_0x7296d9(0xee)](_0x550e93[_0x7296d9(0xde)],_0x7296d9(0xf5))?'project':null]['filter'](Boolean);_0x515ea2[_0x7296d9(0x154)]>0x0&&(console[_0x7296d9(0x107)](_0x7296d9(0x11f)+a113_0x1a158a[_0x7296d9(0xec)](_0x7296d9(0xf0)+_0x515ea2[_0x7296d9(0x123)](_0x7296d9(0xc9))+_0x7296d9(0x10f))),_0x515ea2[_0x7296d9(0x109)]('project')&&console[_0x7296d9(0x107)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+_0x7296d9(0x14a)),_0x515ea2[_0x7296d9(0x109)](_0x7296d9(0xe7))&&console[_0x7296d9(0x107)](_0x7296d9(0x139)+CLI_BIN_NAME+_0x7296d9(0x13f)));const _0x10ec14=isInvalidLovrabetRegion(_0x1340d9[_0x7296d9(0xea)]??_0x1340d9[_0x7296d9(0x111)]?.['region']);_0x26b09f&&!_0x10ec14&&(console[_0x7296d9(0x107)](),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x14b)](_0x7296d9(0x153))),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x12b)[_0x7296d9(0xe9)](0x1e))),console[_0x7296d9(0x107)](_0x7296d9(0x144)+a113_0x1a158a[_0x7296d9(0xd5)](_0x7296d9(0xcd))),console[_0x7296d9(0x107)](_0x7296d9(0x146)+_0x26b09f[_0x7296d9(0xe6)]),Object[_0x7296d9(0x14f)][_0x7296d9(0x113)][_0x7296d9(0xee)](_0x550e93[_0x7296d9(0xde)],_0x7296d9(0x10b))&&console[_0x7296d9(0x107)]('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x7296d9(0xf6)),Object[_0x7296d9(0x14f)]['hasOwnProperty'][_0x7296d9(0xee)](_0x550e93[_0x7296d9(0x137)],_0x7296d9(0x10b))&&console[_0x7296d9(0x107)](_0x7296d9(0x125)+CLI_BIN_NAME+'\x20config\x20delete\x20routing\x20--global'));console[_0x7296d9(0x107)](),console['log'](a113_0x1a158a[_0x7296d9(0x14b)](_0x7296d9(0xef))),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x12b)[_0x7296d9(0xe9)](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1340d9[_0x7296d9(0x10a)]||a113_0x1a158a[_0x7296d9(0xd5)](_0x7296d9(0xdd))));const _0x5c8b0e=_0x10ec14?a113_0x1a158a[_0x7296d9(0xd5)](describeRegionValue(_0x1340d9[_0x7296d9(0xea)]??_0x1340d9[_0x7296d9(0x111)]?.['region'])+'\x20(invalid)'):(_0x1340d9[_0x7296d9(0x11e)]??DEFAULT_LOVRABET_REGION)+'\x20('+(_0x1340d9[_0x7296d9(0x100)]??_0x7296d9(0x152))+')';console['log']('\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5c8b0e),console[_0x7296d9(0x107)](_0x7296d9(0x108)+_0x1340d9[_0x7296d9(0x14e)]),console[_0x7296d9(0x107)]('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x1340d9[_0x7296d9(0xd1)]),console[_0x7296d9(0x107)](_0x7296d9(0x143)+_0x1340d9[_0x7296d9(0x148)]),console['log'](_0x7296d9(0xe3)+(_0x1340d9['defaultApp']||a113_0x1a158a['gray'](_0x7296d9(0x11a)))),console[_0x7296d9(0x107)](_0x7296d9(0x118)+(_0x1340d9[_0x7296d9(0x135)]||a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x11a)))),console[_0x7296d9(0x107)](_0x7296d9(0xd8)+(_0x1340d9[_0x7296d9(0x117)]||a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x11a)))),console[_0x7296d9(0x107)](_0x7296d9(0x104)+(_0x1340d9[_0x7296d9(0x14d)]||a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0xd3)+DEFAULT_CONFIG_VALUES[_0x7296d9(0x14d)]+')'))),console[_0x7296d9(0x107)](_0x7296d9(0x12d)+(_0x1340d9['pageSize']??a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0xf8)))),console[_0x7296d9(0x107)](_0x7296d9(0xe0)+_0x1340d9[_0x7296d9(0xd9)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1340d9[_0x7296d9(0xe8)]),console[_0x7296d9(0x107)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1340d9['cookie']?a113_0x1a158a['green'](_0x7296d9(0x11b)+_0x1340d9[_0x7296d9(0xfc)][_0x7296d9(0x154)]+')'):_0x228c72?a113_0x1a158a[_0x7296d9(0x12e)](_0x7296d9(0x130)+_0x228c72[_0x7296d9(0x154)]+')'):a113_0x1a158a['gray']('(none)')));const _0x3dbd3e=Object[_0x7296d9(0xe1)](_0x1340d9['apps']);if(_0x3dbd3e[_0x7296d9(0x154)]>0x0){console['log'](),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x14b)]('\x20\x20Apps')),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x138)]('\x20\x20─'['repeat'](0x1e)));for(const _0x4c764d of _0x3dbd3e){const _0x2e16a2=_0x1340d9[_0x7296d9(0xfa)][_0x4c764d],_0xc3bf7e=_0x4c764d===_0x1340d9[_0x7296d9(0x12a)],_0x14981e=_0x4c764d===_0x1340d9[_0x7296d9(0x135)],_0x197beb=_0x14981e?a113_0x1a158a['green'](_0x7296d9(0xf1)):'',_0x226113=_0xc3bf7e?_0x7296d9(0x105):'';console['log']('\x20\x20'+_0x4c764d+_0x226113+_0x197beb),console[_0x7296d9(0x107)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x2e16a2[_0x7296d9(0xd4)]);const _0x4a6317=_0x550e93['projectConfig'][_0x7296d9(0xfa)]&&typeof _0x550e93[_0x7296d9(0xde)]['apps']===_0x7296d9(0xd6)?_0x550e93[_0x7296d9(0xde)][_0x7296d9(0xfa)]:{},_0x990df1=Object['prototype'][_0x7296d9(0x113)][_0x7296d9(0xee)](_0x4a6317,_0x4c764d),_0x102eab=isInvalidLovrabetRegion(_0x2e16a2['region'])?{'region':_0x1340d9[_0x7296d9(0x11e)]??DEFAULT_LOVRABET_REGION}:resolveEffectiveRegion({'appRegion':_0x2e16a2[_0x7296d9(0x11e)],'projectRegion':_0x990df1?_0x550e93[_0x7296d9(0xde)][_0x7296d9(0x11e)]:undefined,'globalRegion':_0x550e93[_0x7296d9(0x137)][_0x7296d9(0x11e)],'mergedRegion':_0x1340d9[_0x7296d9(0x111)]['region'],'appName':_0x4c764d}),_0x1f5aa8=buildAppDoctorFields(_0x2e16a2,{'region':_0x102eab['region'],'env':_0x1340d9['env'],'apiDir':_0x1340d9[_0x7296d9(0x111)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x7296d9(0x148)],'cookie':_0x1340d9[_0x7296d9(0xfc)]||_0x228c72||undefined,'accessKey':_0x1340d9[_0x7296d9(0x102)]});console['log'](_0x7296d9(0x129)+_0x1f5aa8['region'][_0x7296d9(0x121)]+'\x20\x20'+a113_0x1a158a[_0x7296d9(0x138)]('('+_0x1f5aa8[_0x7296d9(0x11e)]['source']+')')),console[_0x7296d9(0x107)](_0x7296d9(0x10d)+_0x1f5aa8[_0x7296d9(0x14e)]['value']+'\x20\x20'+a113_0x1a158a[_0x7296d9(0x138)]('('+_0x1f5aa8[_0x7296d9(0x14e)][_0x7296d9(0xca)]+')')),console[_0x7296d9(0x107)](_0x7296d9(0x103)+_0x1f5aa8[_0x7296d9(0x148)][_0x7296d9(0x121)]+'\x20\x20'+a113_0x1a158a[_0x7296d9(0x138)]('('+_0x1f5aa8[_0x7296d9(0x148)][_0x7296d9(0xca)]+')'));const _0x880079=_0x1f5aa8[_0x7296d9(0xfc)][_0x7296d9(0x121)]?a113_0x1a158a[_0x7296d9(0x12e)](_0x7296d9(0x11b)+_0x1f5aa8[_0x7296d9(0xfc)]['value'][_0x7296d9(0x154)]+')'):a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x11a));console[_0x7296d9(0x107)](_0x7296d9(0x119)+_0x880079+'\x20\x20'+a113_0x1a158a[_0x7296d9(0x138)]('('+_0x1f5aa8['cookie'][_0x7296d9(0xca)]+')'));const _0x268ea2=_0x1f5aa8['accessKey'][_0x7296d9(0x121)]?a113_0x1a158a['green'](_0x7296d9(0x11b)+_0x1f5aa8[_0x7296d9(0x102)][_0x7296d9(0x121)][_0x7296d9(0x154)]+')'):a113_0x1a158a[_0x7296d9(0x138)](_0x7296d9(0x11a));console[_0x7296d9(0x107)](_0x7296d9(0xc8)+_0x268ea2+'\x20\x20'+a113_0x1a158a[_0x7296d9(0x138)]('('+_0x1f5aa8[_0x7296d9(0x102)][_0x7296d9(0xca)]+')'));}}console[_0x7296d9(0x107)](),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x14b)]('\x20\x20API\x20Endpoints')),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x138)]('\x20\x20─'[_0x7296d9(0xe9)](0x1e)));_0x26b09f?console[_0x7296d9(0x107)](_0x7296d9(0x144)+a113_0x1a158a[_0x7296d9(0xd5)](_0x7296d9(0x140))):(console[_0x7296d9(0x107)](_0x7296d9(0xd7)+getActiveRegion()),console[_0x7296d9(0x107)](_0x7296d9(0xc6)+getApiDomain()),console[_0x7296d9(0x107)](_0x7296d9(0xf2)+getUserDomain()),console['log'](_0x7296d9(0xff)+getRuntimeDomain()),console[_0x7296d9(0x107)](_0x7296d9(0x114)+getSkillDomain()),console[_0x7296d9(0x107)](_0x7296d9(0x126)+getKbDomain()),console['log'](_0x7296d9(0x12c)+getAppDomain()));console['log'](),console[_0x7296d9(0x107)](a113_0x1a158a[_0x7296d9(0x14b)](_0x7296d9(0xc4))),console['log'](a113_0x1a158a[_0x7296d9(0x138)]('\x20\x20─'[_0x7296d9(0xe9)](0x1e)));if(_0x26b09f)console[_0x7296d9(0x107)](_0x7296d9(0x144)+a113_0x1a158a[_0x7296d9(0xec)](_0x7296d9(0x141)));else{if(_0x228c72){const _0x1f8785=await getIsSessionValid();console['log'](_0x7296d9(0x144)+(_0x1f8785?a113_0x1a158a[_0x7296d9(0x12e)](_0x7296d9(0x10e)):a113_0x1a158a[_0x7296d9(0xd5)]('✗\x20Expired')));}else console[_0x7296d9(0x107)](_0x7296d9(0x144)+a113_0x1a158a[_0x7296d9(0xd5)](_0x7296d9(0xfb)));}return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a113_0x74ab21(0x122),'command':'check','description':a113_0x74ab21(0x149),'risk':a113_0x74ab21(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x28b995=a114_0x329f;(function(_0x547f2b,_0x5788d8){const _0x385821=a114_0x329f,_0x1b6412=_0x547f2b();while(!![]){try{const _0x4e5c58=-parseInt(_0x385821(0x19a))/0x1+parseInt(_0x385821(0x1a1))/0x2*(parseInt(_0x385821(0x19c))/0x3)+parseInt(_0x385821(0x18c))/0x4+-parseInt(_0x385821(0x1a2))/0x5+parseInt(_0x385821(0x198))/0x6+-parseInt(_0x385821(0x194))/0x7+parseInt(_0x385821(0x199))/0x8;if(_0x4e5c58===_0x5788d8)break;else _0x1b6412['push'](_0x1b6412['shift']());}catch(_0x1ee62d){_0x1b6412['push'](_0x1b6412['shift']());}}}(a114_0x2aa7,0x9d006));function a114_0x2aa7(){const _0x402995=['File','Uploaded\x20file:\x20','Path\x20to\x20the\x20local\x20file\x20to\x20upload','/smartapi/common/uploadFile','3673971ELzyKz','upload','bool','str','1320336XtjDPl','2573600jVCGtv','97070pckTBD','string','278793EaAUVp','filePath\x20is\x20required.','Preview:\x20upload\x20','validation','query-url','8uTACbh','3057060MLSOeO','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','\x20to\x20development\x20app\x20','filePath','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','file','boolean','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','filepath','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','path','3851732JVYlCI','long-term','read','appCode'];a114_0x2aa7=function(){return _0x402995;};return a114_0x2aa7();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a114_0x28b995(0x1a7),'type':a114_0x28b995(0x19b),'required':!![],'description':a114_0x28b995(0x192)},FILEPATH_FLAG={'name':a114_0x28b995(0x1aa),'type':a114_0x28b995(0x19b),'required':!![],'description':a114_0x28b995(0x1a3)},DOWNLOAD_FLAG={'name':'download','type':a114_0x28b995(0x1a8),'description':a114_0x28b995(0x1a6)},LONG_TERM_FLAG={'name':'long-term','type':'boolean','description':a114_0x28b995(0x1a9)};function a114_0x329f(_0x426bf0,_0x23b6d4){_0x426bf0=_0x426bf0-0x189;const _0x2aa7d7=a114_0x2aa7();let _0x329f48=_0x2aa7d7[_0x426bf0];return _0x329f48;}function requireFilePath(_0x3f2f9a){const _0x145b06=a114_0x28b995,_0x4ebfe5=_0x3f2f9a['trim']();if(!_0x4ebfe5)throw CliErrors[_0x145b06(0x19f)](_0x145b06(0x19d));return _0x4ebfe5;}const fileUpload={'service':'file','command':a114_0x28b995(0x195),'description':a114_0x28b995(0x189),'risk':a114_0x28b995(0x18e),'flags':[FILE_FLAG],async 'dryRun'(_0x315405){const _0x110e87=a114_0x28b995,_0x261397=requireDevelopmentUploadFile(_0x315405[_0x110e87(0x197)](_0x110e87(0x1a7)),'File');return{'method':'POST','url':_0x110e87(0x193),'body':{'appCode':_0x315405[_0x110e87(0x18f)],'multipart':{'file':_0x261397}},'description':_0x110e87(0x19e)+_0x261397[_0x110e87(0x18b)]+_0x110e87(0x1a4)+_0x315405['appCode']};},async 'execute'(_0x3a9db5){const _0x4fceb0=a114_0x28b995,_0x15d98a=requireDevelopmentUploadFile(_0x3a9db5[_0x4fceb0(0x197)](_0x4fceb0(0x1a7)),_0x4fceb0(0x190)),_0x34433b=await uploadDevelopmentFile(_0x3a9db5[_0x4fceb0(0x18f)],_0x15d98a[_0x4fceb0(0x18b)]);return{'ok':!![],'data':_0x34433b,'message':_0x34433b[_0x4fceb0(0x1a5)]?_0x4fceb0(0x191)+_0x34433b[_0x4fceb0(0x1a5)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x4fceb0(0x18a)};}},fileQueryUrl={'service':a114_0x28b995(0x1a7),'command':a114_0x28b995(0x1a0),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x840ce0){const _0x5db043=a114_0x28b995,_0x367773=requireFilePath(_0x840ce0[_0x5db043(0x197)]('filepath')),_0x465e2b=await queryDevelopmentFileUrl(_0x367773,{'download':_0x840ce0[_0x5db043(0x196)]('download'),'longTerm':_0x840ce0[_0x5db043(0x196)](_0x5db043(0x18d))});return{'ok':!![],'data':_0x465e2b};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a115_0x2289d1=a115_0x9b3f;(function(_0xc7616a,_0x28cd60){const _0x31f7c6=a115_0x9b3f,_0x5999b5=_0xc7616a();while(!![]){try{const _0x19e539=parseInt(_0x31f7c6(0xd5))/0x1+parseInt(_0x31f7c6(0xe2))/0x2+parseInt(_0x31f7c6(0xdc))/0x3+parseInt(_0x31f7c6(0xdf))/0x4+parseInt(_0x31f7c6(0xe4))/0x5*(parseInt(_0x31f7c6(0xd7))/0x6)+parseInt(_0x31f7c6(0xd8))/0x7+-parseInt(_0x31f7c6(0xe0))/0x8;if(_0x19e539===_0x28cd60)break;else _0x5999b5['push'](_0x5999b5['shift']());}catch(_0x56a414){_0x5999b5['push'](_0x5999b5['shift']());}}}(a115_0x4b1d,0x4bca3));function a115_0x9b3f(_0x54e528,_0x6b068b){_0x54e528=_0x54e528-0xd4;const _0x4b1d61=a115_0x4b1d();let _0x9b3fd1=_0x4b1d61[_0x54e528];return _0x9b3fd1;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{createFlowDefinition}from'../../core/api-client.js';function a115_0x4b1d(){const _0x50be50=['14805840IhZbCc','write','614908pHqirG','datasetCode','195WyemgV','POST','\x20(id=','98575qOTKLx','Created\x20flow\x20','48036yGjkAD','3068583daUuCf','appCode','flowName','flow','1261491bHjSrK','Create\x20a\x20draft\x20flow\x20definition\x20from\x20a\x20local\x20FlowConfig\x20file','create','2336144PQfDac'];a115_0x4b1d=function(){return _0x50be50;};return a115_0x4b1d();}import{FLOW_FILE_FLAG,FLOW_PATHS,confirmFlowWrite,flowSelector,prepareFlowWrite,readFlowFilePath}from'../../commands/flow/shared.js';export const flowCreate={'service':a115_0x2289d1(0xdb),'command':a115_0x2289d1(0xde),'description':a115_0x2289d1(0xdd),'risk':a115_0x2289d1(0xe1),'flags':[FLOW_FILE_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x51753f){readFlowFilePath(_0x51753f);},async 'dryRun'(_0x17db10){const _0x44a607=a115_0x2289d1,{request:_0xf46f5c,warnings:_0x399bd9}=await prepareFlowWrite(readFlowFilePath(_0x17db10),_0x17db10['appCode']);return asDryRunResult({'operation':_0x44a607(0xde),'selector':{'appCode':_0x17db10[_0x44a607(0xd9)],'flowName':_0xf46f5c['flowName'],..._0xf46f5c[_0x44a607(0xe3)]?{'datasetCode':_0xf46f5c[_0x44a607(0xe3)]}:{}},'before':null,'after':_0xf46f5c,'request':_0xf46f5c,'dryRun':!![],'backend':{'method':'POST','path':FLOW_PATHS[_0x44a607(0xde)]},'warnings':_0x399bd9},{'method':_0x44a607(0xe5),'url':FLOW_PATHS[_0x44a607(0xde)]});},async 'execute'(_0x34ad0f){const _0x584c2e=a115_0x2289d1,{request:_0x26ead8,warnings:_0x4bc0a6}=await prepareFlowWrite(readFlowFilePath(_0x34ad0f),_0x34ad0f[_0x584c2e(0xd9)]);await confirmFlowWrite(_0x34ad0f,'create',_0x26ead8);const _0x4a9685=await createFlowDefinition(_0x26ead8);return{'ok':!![],'data':{'operation':_0x584c2e(0xde),'selector':flowSelector(_0x34ad0f[_0x584c2e(0xd9)],_0x4a9685['id'],_0x4a9685),'before':null,'after':_0x4a9685,'dryRun':![],'backend':{'method':_0x584c2e(0xe5),'path':FLOW_PATHS[_0x584c2e(0xde)]},'warnings':_0x4bc0a6},'message':_0x584c2e(0xd6)+(_0x4a9685[_0x584c2e(0xda)]||_0x26ead8[_0x584c2e(0xda)])+(_0x4a9685['id']?_0x584c2e(0xd4)+_0x4a9685['id']+')':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a116_0xcbd777=a116_0x549d;(function(_0x401439,_0x5259db){const _0x36d515=a116_0x549d,_0x4955c6=_0x401439();while(!![]){try{const _0x356299=-parseInt(_0x36d515(0x148))/0x1*(parseInt(_0x36d515(0x160))/0x2)+-parseInt(_0x36d515(0x156))/0x3+parseInt(_0x36d515(0x15d))/0x4+parseInt(_0x36d515(0x159))/0x5+-parseInt(_0x36d515(0x157))/0x6*(parseInt(_0x36d515(0x151))/0x7)+-parseInt(_0x36d515(0x15a))/0x8+parseInt(_0x36d515(0x15b))/0x9;if(_0x356299===_0x5259db)break;else _0x4955c6['push'](_0x4955c6['shift']());}catch(_0x5c8bb4){_0x4955c6['push'](_0x4955c6['shift']());}}}(a116_0x2243,0x93820));import{mkdir,stat}from'node:fs/promises';import{dirname,resolve}from'node:path';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a116_0x549d(_0x480471,_0x51334e){_0x480471=_0x480471-0x148;const _0x2243be=a116_0x2243();let _0x549d8a=_0x2243be[_0x480471];return _0x549d8a;}function a116_0x2243(){const _0x2dca50=['warnings','output','flowCode','Get\x20one\x20design-time\x20flow\x20definition','187449WTwVXd','bool','path','str','FlowConfig\x20output\x20already\x20exists:\x20','Pass\x20--force\x20to\x20overwrite\x20it.','code','validation','flow','707VvvEdf','trim','Wrote\x20FlowConfig\x20for\x20','EEXIST','Write\x20a\x20portable\x20normalized\x20FlowConfig\x20JSON\x20file','3196302zbDsxw','14754suiYju','Flow\x20','5207555BSuyhL','6609064ZxTLZG','18015975FIdAdc','force','302920aKGizw','config','flowName','4UnKMyz'];a116_0x2243=function(){return _0x2dca50;};return a116_0x2243();}import{getFlowDefinition}from'../../core/api-client.js';import{writeNormalizedFlowConfig}from'../../core/flow-config.js';import{CliErrors}from'../../errors.js';import{FLOW_ID_FLAG,flowDefinitionToConfig,readFlowId}from'../../commands/flow/shared.js';export const flowDetail={'service':a116_0xcbd777(0x150),'command':'detail','description':a116_0xcbd777(0x164),'risk':'read','flags':[FLOW_ID_FLAG,{'name':a116_0xcbd777(0x162),'type':'string','description':a116_0xcbd777(0x155)},{'name':a116_0xcbd777(0x15c),'type':'boolean','description':'Overwrite\x20an\x20existing\x20output\x20file'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2d0856){readFlowId(_0x2d0856);},async 'execute'(_0x331289){const _0x2a1513=a116_0xcbd777,_0x406cc6=readFlowId(_0x331289),_0x25e63a=_0x331289[_0x2a1513(0x14b)](_0x2a1513(0x162))[_0x2a1513(0x152)](),_0x16986a=_0x25e63a?resolve(_0x25e63a):undefined;if(_0x16986a&&!_0x331289[_0x2a1513(0x149)]('force')&&await fileExists(_0x16986a))throw CliErrors[_0x2a1513(0x14f)](_0x2a1513(0x14c)+_0x16986a,_0x2a1513(0x14d));const _0x5853c2=await getFlowDefinition(_0x331289['appCode'],_0x406cc6);let _0x239846;if(_0x16986a){const _0x447e26=flowDefinitionToConfig(_0x5853c2);await mkdir(dirname(_0x16986a),{'recursive':!![]});try{await writeNormalizedFlowConfig(_0x16986a,_0x447e26[_0x2a1513(0x15e)],{'overwrite':_0x331289[_0x2a1513(0x149)](_0x2a1513(0x15c))});}catch(_0x2ce170){if(isAlreadyExistsError(_0x2ce170))throw CliErrors['validation']('FlowConfig\x20output\x20already\x20exists:\x20'+_0x16986a,_0x2a1513(0x14d));throw _0x2ce170;}_0x239846={'path':_0x16986a,'warnings':_0x447e26[_0x2a1513(0x161)]};}return{'ok':!![],'data':{'flow':_0x5853c2,..._0x239846?{'output':_0x239846}:{}},'message':_0x239846?_0x2a1513(0x153)+(_0x5853c2['flowName']||_0x5853c2[_0x2a1513(0x163)]||_0x406cc6)+'\x20to\x20'+_0x239846[_0x2a1513(0x14a)]:_0x2a1513(0x158)+(_0x5853c2[_0x2a1513(0x15f)]||_0x5853c2['flowCode']||_0x406cc6)};}};async function fileExists(_0x2f884c){try{return await stat(_0x2f884c),!![];}catch(_0x732395){return!isNotFoundError(_0x732395);}}function isNotFoundError(_0x1e121e){const _0x1c6f26=a116_0xcbd777;return _0x1e121e?.[_0x1c6f26(0x14e)]==='ENOENT';}function isAlreadyExistsError(_0x4f5f9e){const _0x41f8d5=a116_0xcbd777;return _0x4f5f9e?.[_0x41f8d5(0x14e)]===_0x41f8d5(0x154);}
|