@lovrabet/rabetbase-cli 2.5.0 → 2.5.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +7 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.d.ts +107 -0
- package/lib/commands/dataset/field-restore.js +1 -0
- 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.d.ts +36 -0
- package/lib/commands/dataset/user-deleted-field-list.js +1 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.d.ts +28 -0
- package/lib/commands/deployment/auto-sync.js +1 -0
- package/lib/commands/deployment/index.d.ts +2 -0
- package/lib/commands/deployment/index.js +1 -0
- package/lib/commands/deployment/sync.d.ts +2 -0
- package/lib/commands/deployment/sync.js +1 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.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/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/deployment-sync.d.ts +10 -0
- package/lib/config/deployment-sync.js +1 -0
- package/lib/config/domain-config.d.ts +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-routing.d.ts +30 -0
- package/lib/config/project-routing.js +1 -0
- package/lib/config/schema.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +7 -2
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.d.ts +2 -2
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +115 -0
- package/lib/constant/routing-profile.js +1 -0
- 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.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +35 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +4 -0
- 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/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -2
- package/skills/rabetbase/SKILL.md +20 -9
- package/skills/rabetbase/guides/frontend-development.md +2 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +3 -2
- package/skills/rabetbase/guides/typescript-sdk.md +42 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -3
- package/skills/rabetbase/references/rabetbase-config.md +9 -5
- package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +9 -9
- package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +1 -1
- package/skills/rabetbase/references/rabetbase-dataset-field-restore.md +59 -0
- package/skills/rabetbase/references/rabetbase-dataset-user-deleted-field-list.md +47 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +92 -0
- package/skills/rabetbase/references/rabetbase-init.md +11 -5
- package/skills/rabetbase/references/rabetbase-project-create.md +6 -5
- package/skills/rabetbase.manifest.json +6 -3
- package/templates/README.md +13 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x2fac81=a83_0x8d47;(function(_0x571a75,_0x9c6187){const _0xda677e=a83_0x8d47,_0x1b5984=_0x571a75();while(!![]){try{const _0x2f52ec=parseInt(_0xda677e(0x1b6))/0x1+parseInt(_0xda677e(0x1a5))/0x2+-parseInt(_0xda677e(0x1a3))/0x3+-parseInt(_0xda677e(0x1a4))/0x4*(parseInt(_0xda677e(0x1b2))/0x5)+parseInt(_0xda677e(0x1ad))/0x6+-parseInt(_0xda677e(0x1b8))/0x7+parseInt(_0xda677e(0x1be))/0x8*(parseInt(_0xda677e(0x1c9))/0x9);if(_0x2f52ec===_0x9c6187)break;else _0x1b5984['push'](_0x1b5984['shift']());}catch(_0x255c59){_0x1b5984['push'](_0x1b5984['shift']());}}}(a83_0xbddd,0xbbcca));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a83_0x8d47(_0x20cbf4,_0x256d7f){_0x20cbf4=_0x20cbf4-0x1a0;const _0xbddd65=a83_0xbddd();let _0x8d474d=_0xbddd65[_0x20cbf4];return _0x8d474d;}import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a83_0x2fac81(0x1a6),a83_0x2fac81(0x1a1),a83_0x2fac81(0x1b0),a83_0x2fac81(0x1c2)]);export const dbAnalyzeStatus={'service':'db','command':a83_0x2fac81(0x1bb),'description':a83_0x2fac81(0x1aa),'risk':a83_0x2fac81(0x1af),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a83_0x2fac81(0x1b9),'type':a83_0x2fac81(0x1c6),'required':!![],'description':a83_0x2fac81(0x1c1)}],async 'execute'(_0x318f12){const _0xf68257=a83_0x2fac81,_0x2b28fc=_0x318f12['num']('id'),_0x211b85=_0x318f12[_0xf68257(0x1bc)]('plan'),_0x433865=await getDbAnalysisStatus(_0x211b85),_0x4dc459=TERMINAL_STATUSES[_0xf68257(0x1c7)](_0x433865[_0xf68257(0x1a0)]??''),{parsedJobContext:_0x159008,jobContextParseWarning:_0x6faf53}=parseJobContext(_0x433865['jobContext']),{requestedAnalysis:_0x1f2571,requestedAnalysisParseWarning:_0x4a0ecb}=parseRequestedAnalysis(_0x433865['inputParams']),_0x32c23c=readAccumulatedErrorTypeCounts(_0x159008),_0x203e07=calculateAttemptElapsedMs(_0x433865,_0x4dc459),_0x157a3d=calculateElapsedFromStart(_0x433865[_0xf68257(0x1ac)],_0x433865[_0xf68257(0x1b3)],_0x4dc459),_0x1fa74a=detectMultipleAttempts(_0x433865),_0x59ce91=buildDbPageLinks(_0x318f12['appCode'],_0x2b28fc);return{'ok':!![],'data':{'dbLinkId':_0x2b28fc,'planId':_0x211b85,'status':_0x433865,'requestedAnalysis':_0x1f2571,'requestedAnalysisParseWarning':_0x4a0ecb,'parsedJobContext':_0x159008,'accumulatedErrorTypeCounts':_0x32c23c,'accumulatedErrorTypeCountsAdvisory':_0x32c23c?_0xf68257(0x1bd):'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','isTerminal':_0x4dc459,'isRetrying':_0x433865[_0xf68257(0x1a0)]===_0xf68257(0x1a9),'attemptElapsedMs':_0x203e07,'totalElapsedMs':_0x157a3d,'hasMultipleAttempts':_0x1fa74a,'jobContextParseWarning':_0x6faf53,..._0x59ce91?{'links':_0x59ce91}:{}},'message':'Analysis\x20status\x20for\x20'+_0x211b85};}};function parseRequestedAnalysis(_0x5c2d6a){const _0x49733f=a83_0x2fac81,_0x145145={'mode':_0x49733f(0x1b5),'tableCount':null,'tableNames':null};if(!_0x5c2d6a?.[_0x49733f(0x1a8)]())return{'requestedAnalysis':_0x145145,'requestedAnalysisParseWarning':_0x49733f(0x1bf)};try{const _0x1f36d3=JSON[_0x49733f(0x1c8)](_0x5c2d6a);if(!_0x1f36d3||typeof _0x1f36d3!=='object'||Array[_0x49733f(0x1c4)](_0x1f36d3))throw new Error('inputParams\x20is\x20not\x20an\x20object');const _0x23e14f=_0x1f36d3[_0x49733f(0x1c3)];if(_0x23e14f===undefined||_0x23e14f===null)return{'requestedAnalysis':{'mode':'FULL','tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x49733f(0x1c4)](_0x23e14f)&&_0x23e14f['every'](_0xe259f2=>typeof _0xe259f2===_0x49733f(0x1c6)))return{'requestedAnalysis':{'mode':_0x23e14f['length']>0x0?_0x49733f(0x1a2):_0x49733f(0x1b7),'tableCount':_0x23e14f[_0x49733f(0x1ca)],'tableNames':_0x23e14f},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x145145,'requestedAnalysisParseWarning':'inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.'};}function readAccumulatedErrorTypeCounts(_0x239f8e){const _0x38a38c=a83_0x2fac81,_0x52c2bd=_0x239f8e?.['accumulatedErrorTypeCounts'];if(!_0x52c2bd||typeof _0x52c2bd!==_0x38a38c(0x1b1)||Array[_0x38a38c(0x1c4)](_0x52c2bd))return null;if(Object[_0x38a38c(0x1ae)](_0x52c2bd)['length']===0x0)return null;return _0x52c2bd;}function a83_0xbddd(){const _0x5097e6=['2760314yEhZIi','SUCCESS','isNaN','trim','RETRYING','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','costTimeMs','firstStartTime','5357604hcXwQb','keys','read','FAILED','object','6100qCaano','endTime','isFinite','UNKNOWN','35061duHceO','FULL','3286878nhTNoP','plan','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','analyze-status','str','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','8472aFFhVR','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','number','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','CANCELLED','tableNames','isArray','now','string','has','parse','6597ZsIjdX','length','startTime','status','PARTIAL_SUCCESS','TARGETED','4178997XbZljX','1484qegeIn'];a83_0xbddd=function(){return _0x5097e6;};return a83_0xbddd();}function parseJobContext(_0x47d112){const _0x2a7548=a83_0x2fac81;if(!_0x47d112?.[_0x2a7548(0x1a8)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x38a3b5=JSON[_0x2a7548(0x1c8)](_0x47d112);if(_0x38a3b5&&typeof _0x38a3b5==='object'&&!Array[_0x2a7548(0x1c4)](_0x38a3b5))return{'parsedJobContext':_0x38a3b5,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x2a7548(0x1ba)};}function calculateAttemptElapsedMs(_0x2be27b,_0x16f9fd){const _0x45bc7c=a83_0x2fac81;if(typeof _0x2be27b['costTimeMs']==='number'&&Number[_0x45bc7c(0x1b4)](_0x2be27b[_0x45bc7c(0x1ab)])&&_0x2be27b['costTimeMs']>=0x0)return _0x2be27b['costTimeMs'];return calculateElapsedFromStart(_0x2be27b[_0x45bc7c(0x1cb)],_0x2be27b[_0x45bc7c(0x1b3)],_0x16f9fd);}function calculateElapsedFromStart(_0x5ef30e,_0x5d7b1c,_0xff866c){const _0x11d7b0=a83_0x2fac81,_0x9e80d0=toTimestamp(_0x5ef30e);if(_0x9e80d0===null)return null;const _0x5d42b1=toTimestamp(_0x5d7b1c),_0x26a9f4=_0x5d42b1??(_0xff866c?null:Date[_0x11d7b0(0x1c5)]());if(_0x26a9f4===null||_0x26a9f4<_0x9e80d0)return null;return _0x26a9f4-_0x9e80d0;}function detectMultipleAttempts(_0x2a51be){const _0x4dea4c=a83_0x2fac81,_0x357ca5=toTimestamp(_0x2a51be[_0x4dea4c(0x1ac)]),_0x253416=toTimestamp(_0x2a51be[_0x4dea4c(0x1cb)]);return _0x357ca5!==null&&_0x253416!==null&&_0x357ca5!==_0x253416;}function toTimestamp(_0x3467d0){const _0x7ecfed=a83_0x2fac81;if(typeof _0x3467d0===_0x7ecfed(0x1c0))return Number[_0x7ecfed(0x1b4)](_0x3467d0)?_0x3467d0:null;if(typeof _0x3467d0!==_0x7ecfed(0x1c6)||_0x3467d0[_0x7ecfed(0x1a8)]()==='')return null;const _0x47fb6e=Number(_0x3467d0);if(Number[_0x7ecfed(0x1b4)](_0x47fb6e))return _0x47fb6e;const _0x317c11=Date[_0x7ecfed(0x1c8)](_0x3467d0);return Number[_0x7ecfed(0x1a7)](_0x317c11)?null:_0x317c11;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x35e30c=a84_0x1fa4;function a84_0x1fa4(_0x6cff9f,_0x35dffb){_0x6cff9f=_0x6cff9f-0xc1;const _0x1db143=a84_0x1db1();let _0x1fa4e9=_0x1db143[_0x6cff9f];return _0x1fa4e9;}(function(_0x282783,_0x39a4fd){const _0x20e343=a84_0x1fa4,_0x5db369=_0x282783();while(!![]){try{const _0x1ab814=parseInt(_0x20e343(0xd2))/0x1+-parseInt(_0x20e343(0xd8))/0x2+-parseInt(_0x20e343(0xe3))/0x3*(-parseInt(_0x20e343(0xda))/0x4)+-parseInt(_0x20e343(0xec))/0x5*(parseInt(_0x20e343(0xcc))/0x6)+-parseInt(_0x20e343(0xc4))/0x7+parseInt(_0x20e343(0xcd))/0x8*(parseInt(_0x20e343(0xdc))/0x9)+-parseInt(_0x20e343(0xea))/0xa;if(_0x1ab814===_0x39a4fd)break;else _0x5db369['push'](_0x5db369['shift']());}catch(_0x13a1c9){_0x5db369['push'](_0x5db369['shift']());}}}(a84_0x1db1,0xec3d2));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';function a84_0x1db1(){const _0x4b2a56=['write','1146630DCftrn','Created\x20db\x20link\x20','validation','Create\x20dblink','Extra\x20JDBC-style\x20connection\x20parameters\x20string','appCode','2540470XaVyYq','No\x20follow-up\x20analysis','556OhcfBM','boolean','16951014jwdopR','bool','dbversion','trim','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','password','dbdesc','37803kvEVBi','After\x20create,\x20start\x20schema\x20analysis','dburl','join','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','skip-connection-test','[redacted]','47680Khathy','username','8646845sovlSu','dbparam','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','autostart','5667263KZbssB','string','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','8.0',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','message','Database\x20username','dbtype','6dINNKa','8bsZEyG','dbname','Database\x20password','str'];a84_0x1db1=function(){return _0x4b2a56;};return a84_0x1db1();}export const dbCreate={'service':'db','command':'create','description':a84_0x35e30c(0xe0),'risk':a84_0x35e30c(0xd1),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a84_0x35e30c(0xc5),'required':!![],'description':a84_0x35e30c(0xc6)},DB_TYPE_FLAG,{'name':a84_0x35e30c(0xde),'type':a84_0x35e30c(0xc5),'description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':a84_0x35e30c(0xc7)},{'name':a84_0x35e30c(0xe5),'type':a84_0x35e30c(0xc5),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a84_0x35e30c(0xeb),'type':'string','required':!![],'description':a84_0x35e30c(0xca)},{'name':'password','type':a84_0x35e30c(0xc5),'required':!![],'description':a84_0x35e30c(0xcf)},{'name':'dbparam','type':a84_0x35e30c(0xc5),'description':a84_0x35e30c(0xd6)},{'name':a84_0x35e30c(0xe2),'type':'string','description':'Human-readable\x20description'},{'name':a84_0x35e30c(0xc3),'type':a84_0x35e30c(0xdb),'description':a84_0x35e30c(0xe4),'default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x41251d){const _0x6ee597=a84_0x35e30c,_0x3dc4b7=_0x41251d[_0x6ee597(0xd0)](_0x6ee597(0xe5))[_0x6ee597(0xdf)]();if(!validateDbUrl(_0x3dc4b7))throw CliErrors[_0x6ee597(0xd4)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x3dc4b7+'\x22',_0x6ee597(0xc2));},async 'dryRun'(_0x5e6b4d){const _0x4230f3=a84_0x35e30c,_0x2c2a05={'appCode':_0x5e6b4d['appCode'],'dbName':_0x5e6b4d[_0x4230f3(0xd0)]('dbname'),'dbType':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xcb)),'dbVersion':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xde))||_0x4230f3(0xc7),'dbUrl':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xe5))[_0x4230f3(0xdf)](),'username':_0x5e6b4d['str'](_0x4230f3(0xeb)),'password':_0x4230f3(0xe9),..._0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xc1))?{'dbParam':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xc1))}:{},..._0x5e6b4d[_0x4230f3(0xd0)]('dbdesc')?{'dbDesc':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xe2))}:{}};return{'method':'POST','url':'/smartapi/dblink/create','body':_0x2c2a05,'description':[_0x4230f3(0xd5),_0x5e6b4d[_0x4230f3(0xdd)](_0x4230f3(0xc3))?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':_0x4230f3(0xd9)][_0x4230f3(0xe6)]('\x0a'),'connectionPreflight':{'enabled':!_0x5e6b4d[_0x4230f3(0xdd)](_0x4230f3(0xe8)),'executed':![]}};},async 'execute'(_0x382e82){const _0x5012fe=a84_0x35e30c,_0x1acfc7={'appCode':_0x382e82[_0x5012fe(0xd7)],'dbName':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xce)),'dbType':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xcb)),'dbVersion':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xde))||_0x5012fe(0xc7),'dbUrl':_0x382e82['str'](_0x5012fe(0xe5))[_0x5012fe(0xdf)](),'username':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xeb)),'password':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xe1)),..._0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xc1))?{'dbParam':_0x382e82['str'](_0x5012fe(0xc1))}:{},..._0x382e82[_0x5012fe(0xd0)]('dbdesc')?{'dbDesc':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xe2))}:{}};!_0x382e82[_0x5012fe(0xdd)]('skip-connection-test')&&await assertDbLinkConnectionPreflight(_0x1acfc7);const {id:_0x251441,entity:_0x10a715}=normalizeEntityWithIdResponse(await createDbLink(_0x1acfc7));if(!_0x251441)return{'ok':![],'message':_0x5012fe(0xe7),'data':sanitizeDbLinkForOutput(_0x10a715)};let _0x41fb53,_0x41e79c;if(_0x382e82[_0x5012fe(0xdd)]('autostart'))try{_0x41fb53=(await startDbAnalysis(_0x251441))['planId'];}catch(_0xc70be5){_0x41e79c=_0xc70be5 instanceof Error?_0xc70be5[_0x5012fe(0xc9)]:String(_0xc70be5);}const _0x42aa32=buildDbPageLinks(_0x382e82[_0x5012fe(0xd7)],_0x251441),_0x3546de={'connection':sanitizeDbLinkForOutput(_0x10a715),..._0x42aa32?{'links':{'databasePage':_0x42aa32['databasePage']}}:{},..._0x41fb53?{'analysisPlanId':_0x41fb53}:{},..._0x41e79c?{'analysisStartWarning':_0x41e79c}:{}};let _0x1f24d3;return _0x382e82[_0x5012fe(0xdd)](_0x5012fe(0xc3))?_0x41e79c?_0x1f24d3=_0x5012fe(0xd3)+_0x251441+_0x5012fe(0xc8):_0x1f24d3='Created\x20db\x20link\x20'+_0x251441+'\x20and\x20started\x20analysis':_0x1f24d3='Created\x20db\x20link\x20'+_0x251441,{'ok':!![],'data':_0x3546de,'message':_0x1f24d3};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0x16c08b=a85_0x1f60;(function(_0x46ad3b,_0x316a96){const _0x2d237c=a85_0x1f60,_0x223404=_0x46ad3b();while(!![]){try{const _0x1bc8ff=parseInt(_0x2d237c(0x1e6))/0x1+parseInt(_0x2d237c(0x1e9))/0x2+-parseInt(_0x2d237c(0x200))/0x3+parseInt(_0x2d237c(0x1f5))/0x4*(parseInt(_0x2d237c(0x1f8))/0x5)+-parseInt(_0x2d237c(0x1f6))/0x6+parseInt(_0x2d237c(0x201))/0x7*(-parseInt(_0x2d237c(0x1ef))/0x8)+-parseInt(_0x2d237c(0x1fe))/0x9;if(_0x1bc8ff===_0x316a96)break;else _0x223404['push'](_0x223404['shift']());}catch(_0x5792ad){_0x223404['push'](_0x223404['shift']());}}}(a85_0x4a43,0x53e6a));import{deleteDbLink,getDbLinkInfo,listDatasets}from'../../core/api-client.js';function a85_0x1f60(_0x15998c,_0x45fbe7){_0x15998c=_0x15998c-0x1e2;const _0x4a4331=a85_0x4a43();let _0x1f600=_0x4a4331[_0x15998c];return _0x1f600;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';const CONFIRM_FLAG={'name':a85_0x16c08b(0x202),'type':a85_0x16c08b(0x1f3),'description':a85_0x16c08b(0x1fb)},EXPECTED_DATASET_COUNT_FLAG={'name':'expected-dataset-count','type':'number','description':a85_0x16c08b(0x1f9)};function a85_0x4a43(){const _0x24c2cf=['594314IwutOX','isInteger','Deletion\x20is\x20blocked\x20by\x20','439338xedIfs','--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20still\x20has\x20','datasetDependency','Database\x20connection\x20','num','687640NDpVBb','validation','activeDatasetCount','high-risk-write','boolean','expected-dataset-count','8NsvQbC','1079772OSSDXE','all','1212055cUdGxE','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value','appCode','Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count','\x20active\x20DB_TABLE\x20Dataset(s).','/smartapi/dblink/delete','343917JEVpll','\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.','921591xyzjis','35uXntbS','confirm','DB_TABLE','delete','datasets','Deleted\x20db\x20link\x20','flag','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.'];a85_0x4a43=function(){return _0x24c2cf;};return a85_0x4a43();}export const dbDelete={'service':'db','command':a85_0x16c08b(0x204),'description':'Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','risk':a85_0x16c08b(0x1f2),'flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x28ae74){const _0x13fad3=a85_0x16c08b,_0x210ac0=await loadDeleteImpact(_0x28ae74);return assertExpectedDatasetCount(_0x28ae74,_0x210ac0[_0x13fad3(0x1ec)][_0x13fad3(0x1f1)]),{'method':'POST','url':_0x13fad3(0x1fd),'body':{'id':_0x210ac0['id']},'description':_0x210ac0[_0x13fad3(0x1ec)][_0x13fad3(0x1f1)]>0x0?_0x13fad3(0x1e8)+_0x210ac0[_0x13fad3(0x1ec)][_0x13fad3(0x1f1)]+_0x13fad3(0x1fc):'Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.',..._0x210ac0};},async 'execute'(_0x250e23){const _0x28dd10=a85_0x16c08b;if(!_0x250e23['bool'](_0x28dd10(0x202)))throw CliErrors[_0x28dd10(0x1f0)]('--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.',_0x28dd10(0x1e5));const _0x2ccb7f=_0x250e23[_0x28dd10(0x1ee)]('id'),_0x2f3cdf=await loadDeleteImpact(_0x250e23),_0x583036=_0x2f3cdf[_0x28dd10(0x1ec)][_0x28dd10(0x1f1)];assertExpectedDatasetCount(_0x250e23,_0x583036);if(_0x583036>0x0)throw CliErrors['validation'](_0x28dd10(0x1ed)+_0x2ccb7f+_0x28dd10(0x1eb)+_0x583036+_0x28dd10(0x1ff),'Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.');return await deleteDbLink(_0x2ccb7f),{'ok':!![],'data':{'id':_0x2ccb7f,'deleted':!![],'activeDatasetCount':_0x583036},'message':_0x28dd10(0x1e3)+_0x2ccb7f};}};async function loadDeleteImpact(_0x40ff5f){const _0x4a8352=a85_0x16c08b,_0x29230b=_0x40ff5f[_0x4a8352(0x1ee)]('id'),[_0x543463,_0x26fb92]=await Promise[_0x4a8352(0x1f7)]([getDbLinkInfo(_0x29230b),listDatasets(_0x40ff5f[_0x4a8352(0x1fa)],{'source':_0x4a8352(0x203)})]),_0x370084=buildDbDatasetDependency(_0x543463,_0x26fb92);return{'id':_0x29230b,'connection':sanitizeDbLinkForOutput(_0x543463),'datasetDependency':_0x370084[_0x4a8352(0x1ec)],'activeDatasetCount':_0x370084[_0x4a8352(0x1ec)][_0x4a8352(0x1f1)],'datasets':_0x370084[_0x4a8352(0x1e2)]};}function assertExpectedDatasetCount(_0x53e84a,_0x5aad91){const _0x14b1f1=a85_0x16c08b,_0x50f3ca=_0x53e84a[_0x14b1f1(0x1e4)](_0x14b1f1(0x1f4));if(_0x50f3ca===undefined||_0x50f3ca==='')return;const _0x53075f=_0x53e84a['num'](_0x14b1f1(0x1f4));if(!Number[_0x14b1f1(0x1e7)](_0x53075f)||_0x53075f<0x0)throw CliErrors[_0x14b1f1(0x1f0)](_0x14b1f1(0x1ea));if(_0x53075f!==_0x5aad91)throw CliErrors['validation']('Expected\x20'+_0x53075f+'\x20active\x20Dataset(s),\x20but\x20found\x20'+_0x5aad91+'.','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0xb408d1=a86_0x2387;(function(_0x5b3bec,_0x5bb864){const _0x1299ac=a86_0x2387,_0x37bb29=_0x5b3bec();while(!![]){try{const _0x175a5e=parseInt(_0x1299ac(0x8b))/0x1+parseInt(_0x1299ac(0x97))/0x2*(parseInt(_0x1299ac(0x8f))/0x3)+-parseInt(_0x1299ac(0x8a))/0x4*(-parseInt(_0x1299ac(0x8d))/0x5)+-parseInt(_0x1299ac(0x95))/0x6+-parseInt(_0x1299ac(0x8e))/0x7*(parseInt(_0x1299ac(0x8c))/0x8)+-parseInt(_0x1299ac(0x9a))/0x9*(parseInt(_0x1299ac(0x90))/0xa)+parseInt(_0x1299ac(0x92))/0xb;if(_0x175a5e===_0x5bb864)break;else _0x37bb29['push'](_0x37bb29['shift']());}catch(_0x2468cd){_0x37bb29['push'](_0x37bb29['shift']());}}}(a86_0xcbbb,0x86173));function a86_0x2387(_0x43c461,_0x36476c){_0x43c461=_0x43c461-0x8a;const _0xcbbb01=a86_0xcbbb();let _0x2387c3=_0xcbbb01[_0x43c461];return _0x2387c3;}import{getDbLinkInfo,listDatasets}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a86_0xcbbb(){const _0x143b3c=['appCode','15776BGqlsw','351020dSVqyV','16AzHONA','815SrRdcy','3006136eepVlG','21nprhjv','7225390OqlcUp','datasetDependency','13031689XKUasE','read','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','633480HyDdCK','detail','16474MIUjFC','num','db\x20link\x20','9dsXNQL','dbName'];a86_0xcbbb=function(){return _0x143b3c;};return a86_0xcbbb();}export const dbDetail={'service':'db','command':a86_0xb408d1(0x96),'description':a86_0xb408d1(0x94),'risk':a86_0xb408d1(0x93),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x519e55){const _0x41a1f1=a86_0xb408d1,_0x34d203=_0x519e55[_0x41a1f1(0x98)]('id'),_0x12c655=await getDbLinkInfo(_0x34d203),_0x4ecacb=await listDatasets(_0x12c655[_0x41a1f1(0x9c)]||_0x519e55[_0x41a1f1(0x9c)],{'source':'DB_TABLE'}),_0x2cbbee=buildDbDatasetDependency(_0x12c655,_0x4ecacb);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0x12c655),'datasetDependency':_0x2cbbee[_0x41a1f1(0x91)]},'message':_0x41a1f1(0x99)+_0x34d203+':\x20'+_0x12c655[_0x41a1f1(0x9b)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0xd94f0=a87_0x18e0;(function(_0x172263,_0x18f678){const _0x4f7e2f=a87_0x18e0,_0x878a88=_0x172263();while(!![]){try{const _0x2df211=-parseInt(_0x4f7e2f(0x1f2))/0x1*(parseInt(_0x4f7e2f(0x200))/0x2)+parseInt(_0x4f7e2f(0x1f0))/0x3+parseInt(_0x4f7e2f(0x1f7))/0x4*(-parseInt(_0x4f7e2f(0x1fa))/0x5)+parseInt(_0x4f7e2f(0x1f9))/0x6+parseInt(_0x4f7e2f(0x1f4))/0x7+-parseInt(_0x4f7e2f(0x1f6))/0x8*(parseInt(_0x4f7e2f(0x1fe))/0x9)+-parseInt(_0x4f7e2f(0x1fd))/0xa;if(_0x2df211===_0x18f678)break;else _0x878a88['push'](_0x878a88['shift']());}catch(_0x5c37f5){_0x878a88['push'](_0x878a88['shift']());}}}(a87_0x1fd2,0xc113e));import{startDbTableDiffRefresh}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a87_0x18e0(_0x214519,_0x79991d){_0x214519=_0x214519-0x1f0;const _0x1fd28d=a87_0x1fd2();let _0x18e084=_0x1fd28d[_0x214519];return _0x18e084;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbDiffRefreshStart={'service':'db','command':a87_0xd94f0(0x201),'description':a87_0xd94f0(0x1fc),'risk':a87_0xd94f0(0x1ff),'flags':[DBLINK_ID_FLAG],async 'execute'(_0x1c222f){const _0x324abe=a87_0xd94f0,_0xfbcb02=_0x1c222f[_0x324abe(0x1fb)]('id'),_0x175910=await startDbTableDiffRefresh(_0x1c222f['appCode'],_0xfbcb02),_0x10d582=_0x175910['traceId']?.[_0x324abe(0x1f5)]();if(!_0x10d582)throw CliErrors[_0x324abe(0x202)](_0x324abe(0x1f1));return{'ok':!![],'data':{'dbLinkId':_0xfbcb02,'traceId':_0x10d582,'status':_0x175910['status']??null,'query':{'command':CLI_BIN_NAME+'\x20db\x20diff-refresh-status\x20--id\x20'+_0xfbcb02+_0x324abe(0x1f8)+_0x10d582+_0x324abe(0x1f3)}},'message':'Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20'+_0xfbcb02};}};function a87_0x1fd2(){const _0x2dba56=['\x20--plan\x20','3068784NMWWFp','189990rLqrfU','num','Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','2245000IlEfle','270AgElEx','write','9014MBXLcl','diff-refresh-start','validation','3305568RUkcDq','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','29gnYzXI','\x20--format\x20compress','5372157PUDEfR','trim','238064bkJqKB','36KpTixl'];a87_0x1fd2=function(){return _0x2dba56;};return a87_0x1fd2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x2cb39b=a88_0x34e4;(function(_0x76edc7,_0x49a3a4){const _0x4a44d6=a88_0x34e4,_0x1083fe=_0x76edc7();while(!![]){try{const _0x2a1354=parseInt(_0x4a44d6(0x10e))/0x1+parseInt(_0x4a44d6(0x10d))/0x2+parseInt(_0x4a44d6(0xfb))/0x3+-parseInt(_0x4a44d6(0x114))/0x4*(parseInt(_0x4a44d6(0x105))/0x5)+parseInt(_0x4a44d6(0x102))/0x6*(-parseInt(_0x4a44d6(0x101))/0x7)+parseInt(_0x4a44d6(0x10f))/0x8+parseInt(_0x4a44d6(0x107))/0x9*(parseInt(_0x4a44d6(0xfe))/0xa);if(_0x2a1354===_0x49a3a4)break;else _0x1083fe['push'](_0x1083fe['shift']());}catch(_0xac2196){_0x1083fe['push'](_0x1083fe['shift']());}}}(a88_0x6314,0x1a49f));function a88_0x6314(){const _0x12b56a=['Table-diff\x20refresh\x20status\x20for\x20','\x20--plan\x20','64683AolAYs','diff-refresh-status','PENDING','20KXTNrK','read','Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start','296751XWdcaX','12bOdJiC','string','\x20--format\x20compress','331860yxESRg','SUCCESS','12195efNVoE','FAILED','RUNNING','status','\x20db\x20diff-refresh-status\x20--id\x20','plan','279616upEQVn','118802shmzXo','869600kleOKX','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','has','UNKNOWN','str','12KnbYVs'];a88_0x6314=function(){return _0x12b56a;};return a88_0x6314();}import{getDbAnalysisStatus}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a88_0x2cb39b(0x108),'CANCELLED']),RUNNING_STATUSES=new Set([a88_0x2cb39b(0xfd),a88_0x2cb39b(0x109),'RETRYING']);function a88_0x34e4(_0x5e3d3c,_0x555a38){_0x5e3d3c=_0x5e3d3c-0xfb;const _0x631441=a88_0x6314();let _0x34e434=_0x631441[_0x5e3d3c];return _0x34e434;}export const dbDiffRefreshStatus={'service':'db','command':a88_0x2cb39b(0xfc),'description':a88_0x2cb39b(0x110),'risk':a88_0x2cb39b(0xff),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'plan','type':a88_0x2cb39b(0x103),'required':!![],'description':a88_0x2cb39b(0x100)}],async 'execute'(_0x24c96a){const _0x5e8d38=a88_0x2cb39b,_0x1c1f6e=_0x24c96a['num']('id'),_0x129214=_0x24c96a[_0x5e8d38(0x113)](_0x5e8d38(0x10c)),_0x3069d8=await getDbAnalysisStatus(_0x129214),_0x28bacb=_0x3069d8[_0x5e8d38(0x10a)]??null,_0x51033f=TERMINAL_STATUSES[_0x5e8d38(0x111)](_0x28bacb??''),_0x8df9ab=_0x28bacb===_0x5e8d38(0x106),_0xd6de61=_0x51033f||RUNNING_STATUSES[_0x5e8d38(0x111)](_0x28bacb??'');return{'ok':!![],'data':{'dbLinkId':_0x1c1f6e,'planId':_0x129214,'status':_0x3069d8,'knownStatus':_0xd6de61,'isTerminal':_0x51033f,'isSuccessful':_0x8df9ab,'query':_0xd6de61&&!_0x51033f?{'command':CLI_BIN_NAME+_0x5e8d38(0x10b)+_0x1c1f6e+_0x5e8d38(0x116)+_0x129214+_0x5e8d38(0x104)}:null},'message':_0x5e8d38(0x115)+_0x129214+':\x20'+(_0x28bacb??_0x5e8d38(0x112))};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x1471a6=a89_0x4a74;function a89_0x2c1b(){const _0x56cd6f=['pagesize','num','tableName','3786376fqAGrL','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','115208vcHpBv','5849330Bvavbl','diffType','totalCount','string','NEW_TABLE','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','deletedColumns','appCode','datasetTableCount','MODIFIED_TABLE','4PpmHit','physicalTableCount','read','addedColumns','407419gavEHB','fieldDiff','boolean','tableList','252TbDjfR','filter','3334646MBzdlW','table','DELETED_TABLE','6yrSZdg','Page\x20size','\x20(db\x20link\x20','modifiedColumns','4157145ZDHOYJ','1953980mmdWWo','\x20changed\x20table\x20row(s),\x20total\x20','Page\x20index\x20(1-based)','summary','map','number','page'];a89_0x2c1b=function(){return _0x56cd6f;};return a89_0x2c1b();}function a89_0x4a74(_0x22b914,_0x20973f){_0x22b914=_0x22b914-0x7b;const _0x2c1b96=a89_0x2c1b();let _0x4a7459=_0x2c1b96[_0x22b914];return _0x4a7459;}(function(_0x4c2517,_0x33a932){const _0x3515ed=a89_0x4a74,_0x3fdbe9=_0x4c2517();while(!![]){try{const _0x61e6e=parseInt(_0x3515ed(0x8e))/0x1+-parseInt(_0x3515ed(0x7d))/0x2+parseInt(_0x3515ed(0x9b))/0x3*(parseInt(_0x3515ed(0x8a))/0x4)+-parseInt(_0x3515ed(0x80))/0x5*(-parseInt(_0x3515ed(0x97))/0x6)+parseInt(_0x3515ed(0x94))/0x7+parseInt(_0x3515ed(0x7f))/0x8*(-parseInt(_0x3515ed(0x92))/0x9)+-parseInt(_0x3515ed(0x9c))/0xa;if(_0x61e6e===_0x33a932)break;else _0x3fdbe9['push'](_0x3fdbe9['shift']());}catch(_0x418943){_0x3fdbe9['push'](_0x3fdbe9['shift']());}}}(a89_0x2c1b,0xe756c));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';export const dbDiff={'service':'db','command':'diff','description':'Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','risk':a89_0x1471a6(0x8c),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':a89_0x1471a6(0x83),'description':a89_0x1471a6(0x7e)},{'name':a89_0x1471a6(0xa2),'type':a89_0x1471a6(0xa1),'description':a89_0x1471a6(0x9e),'default':0x1},{'name':a89_0x1471a6(0xa3),'type':a89_0x1471a6(0xa1),'description':a89_0x1471a6(0x98),'default':0x14},{'name':'all','type':a89_0x1471a6(0x90),'description':a89_0x1471a6(0x85)}],async 'execute'(_0x509663){const _0x46f946=a89_0x1471a6,_0x1ff8ef=_0x509663[_0x46f946(0x7b)]('id'),_0x13c14c=_0x509663['bool']('all'),_0x11f821=_0x13c14c?0x1:_0x509663['num'](_0x46f946(0xa2),0x1)||0x1,_0x2713a5=_0x13c14c?DB_TABLE_PAGE_SIZE:_0x509663[_0x46f946(0x7b)](_0x46f946(0xa3),0x14)||0x14,_0xc3c056=_0x509663['str'](_0x46f946(0x95))||undefined,_0x52df2b=_0x13c14c?await getAllDbTableDiff(getDbTableDiff,_0x509663[_0x46f946(0x87)],_0x1ff8ef,_0xc3c056):await getDbTableDiff(_0x509663[_0x46f946(0x87)],_0x1ff8ef,{'pageIndex':_0x11f821,'pageSize':_0x2713a5,'tableName':_0xc3c056}),_0x2d6360=_0x52df2b[_0x46f946(0x91)],_0x28108f=summarizeDbTableDiff(_0x2d6360),_0x1b4bce=_0x2d6360[_0x46f946(0x93)](_0x4c7db6=>_0x4c7db6['diffType']===_0x46f946(0x84)||_0x4c7db6[_0x46f946(0x81)]===_0x46f946(0x89))[_0x46f946(0xa0)](_0xca1c5c=>_0xca1c5c[_0x46f946(0x7c)]),_0x253e38=_0x2d6360['filter'](_0x20587c=>_0x20587c[_0x46f946(0x81)]===_0x46f946(0x96))['map'](_0xa41abd=>_0xa41abd['tableName']),_0x5c162b=_0x2d6360[_0x46f946(0x93)](_0x4086fb=>_0x4086fb[_0x46f946(0x81)]===_0x46f946(0x89))[_0x46f946(0xa0)](_0x5071c8=>({'tableName':_0x5071c8[_0x46f946(0x7c)],'addedColumns':_0x5071c8[_0x46f946(0x8f)]?.[_0x46f946(0x8d)]??[],'deletedColumns':_0x5071c8[_0x46f946(0x8f)]?.[_0x46f946(0x86)]??[],'modifiedColumns':_0x5071c8['fieldDiff']?.[_0x46f946(0x9a)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x1ff8ef,'page':_0x11f821,'pageSize':_0x2713a5,'totalCount':_0x52df2b['totalCount'],...typeof _0x52df2b[_0x46f946(0x8b)]===_0x46f946(0xa1)?{'physicalTableCount':_0x52df2b[_0x46f946(0x8b)]}:{},...typeof _0x52df2b[_0x46f946(0x88)]===_0x46f946(0xa1)?{'datasetTableCount':_0x52df2b[_0x46f946(0x88)]}:{},..._0x52df2b[_0x46f946(0x9f)]?{'summary':_0x52df2b[_0x46f946(0x9f)]}:{},'summaryByType':_0x28108f,'toAnalyzeTables':_0x1b4bce,'deletedTables':_0x253e38,'modifiedFieldDiffs':_0x5c162b,'tables':_0x2d6360},'message':_0x2d6360['length']+_0x46f946(0x9d)+_0x52df2b[_0x46f946(0x82)]+_0x46f946(0x99)+_0x1ff8ef+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e7ff6,_0x4b5e1d){const _0x5aa27d=a90_0x37b5,_0x18ff5f=_0x3e7ff6();while(!![]){try{const _0x4c384b=-parseInt(_0x5aa27d(0x1d7))/0x1+-parseInt(_0x5aa27d(0x1d9))/0x2+parseInt(_0x5aa27d(0x1d8))/0x3*(-parseInt(_0x5aa27d(0x1dd))/0x4)+parseInt(_0x5aa27d(0x1de))/0x5*(-parseInt(_0x5aa27d(0x1dc))/0x6)+parseInt(_0x5aa27d(0x1d6))/0x7+parseInt(_0x5aa27d(0x1db))/0x8+parseInt(_0x5aa27d(0x1da))/0x9;if(_0x4c384b===_0x4b5e1d)break;else _0x18ff5f['push'](_0x18ff5f['shift']());}catch(_0x54e806){_0x18ff5f['push'](_0x18ff5f['shift']());}}}(a90_0x1ce5,0xad31b));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';function a90_0x37b5(_0x1eb99c,_0x2a5bf9){_0x1eb99c=_0x1eb99c-0x1d6;const _0x1ce50e=a90_0x1ce5();let _0x37b5cb=_0x1ce50e[_0x1eb99c];return _0x37b5cb;}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';function a90_0x1ce5(){const _0x591202=['3blxbbp','568064MwFMAs','17202051JzdqFa','3677552XiaPbr','6izoinJ','5309404nGYfnu','932365swqAYt','6789076UWDbkx','833642PhpcZl'];a90_0x1ce5=function(){return _0x591202;};return a90_0x1ce5();}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
|
+
function a91_0x3082(){const _0x5ec856=['Page\x20size','\x20database\x20connection(s)','Page\x20index\x20(1-based)','num','number','list','map','1714167XiJCVc','Found\x20','DB_TABLE','read','6261880gQPekq','3VGLvsD','5eyBQWn','3411333sxelzO','length','1103756XRbyrT','all','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','544907kDjIPQ','628014RsEMRG','page','datasetDependency','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','20OboRQO','pagesize','348wgyfEt','54TYhhHW','16858XxImwI'];a91_0x3082=function(){return _0x5ec856;};return a91_0x3082();}function a91_0x5ecd(_0xd8b21e,_0x50290d){_0xd8b21e=_0xd8b21e-0x7b;const _0x308261=a91_0x3082();let _0x5ecd3b=_0x308261[_0xd8b21e];return _0x5ecd3b;}const a91_0x564ead=a91_0x5ecd;(function(_0x4643a6,_0x517826){const _0x5c570d=a91_0x5ecd,_0x2f5593=_0x4643a6();while(!![]){try{const _0x1219f1=-parseInt(_0x5c570d(0x8d))/0x1*(-parseInt(_0x5c570d(0x8c))/0x2)+-parseInt(_0x5c570d(0x7d))/0x3*(parseInt(_0x5c570d(0x81))/0x4)+parseInt(_0x5c570d(0x7e))/0x5*(-parseInt(_0x5c570d(0x85))/0x6)+parseInt(_0x5c570d(0x95))/0x7+parseInt(_0x5c570d(0x7c))/0x8+parseInt(_0x5c570d(0x7f))/0x9*(parseInt(_0x5c570d(0x89))/0xa)+parseInt(_0x5c570d(0x84))/0xb*(-parseInt(_0x5c570d(0x8b))/0xc);if(_0x1219f1===_0x517826)break;else _0x2f5593['push'](_0x2f5593['shift']());}catch(_0x2afc81){_0x2f5593['push'](_0x2f5593['shift']());}}}(a91_0x3082,0x676fb));import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a91_0x564ead(0x93),'description':a91_0x564ead(0x88),'risk':a91_0x564ead(0x7b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a91_0x564ead(0x86),'type':'number','description':a91_0x564ead(0x90),'default':0x1},{'name':'pagesize','type':a91_0x564ead(0x92),'description':a91_0x564ead(0x8e),'default':0x64}],async 'execute'(_0x3baa85){const _0x15f14b=a91_0x564ead,_0x57dddc=_0x3baa85[_0x15f14b(0x91)](_0x15f14b(0x86),0x1)||0x1,_0x2dd82e=_0x3baa85[_0x15f14b(0x91)](_0x15f14b(0x8a),0x64)||0x64,[{items:_0x4fe2e1,paging:_0x2c0c4d},_0xd61fe2]=await Promise[_0x15f14b(0x82)]([listDbLinks(_0x3baa85['appCode'],{'currentPage':_0x57dddc,'pageSize':_0x2dd82e}),listDatasets(_0x3baa85['appCode'],{'source':_0x15f14b(0x97)})]),_0x443b99=_0x4fe2e1[_0x15f14b(0x94)](_0x3c83bd=>({...sanitizeDbLinkForOutput(_0x3c83bd),'datasetDependency':buildDbDatasetDependency(_0x3c83bd,_0xd61fe2)[_0x15f14b(0x87)]})),_0x28c19a=_0x2c0c4d?_0x2c0c4d:{'currentPage':_0x57dddc,'pageSize':_0x2dd82e,'rowsOnPage':_0x443b99[_0x15f14b(0x80)],'totalCount':null,'note':_0x15f14b(0x83)};return{'ok':!![],'data':{'connections':_0x443b99,'paging':_0x28c19a},'message':_0x15f14b(0x96)+_0x443b99[_0x15f14b(0x80)]+_0x15f14b(0x8f)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d4b1b,_0x1eac68){const _0x1b32ba=a92_0x217d,_0x39da9a=_0x3d4b1b();while(!![]){try{const _0x24335c=parseInt(_0x1b32ba(0x1d1))/0x1*(parseInt(_0x1b32ba(0x1e0))/0x2)+-parseInt(_0x1b32ba(0x1d5))/0x3+-parseInt(_0x1b32ba(0x1ca))/0x4*(-parseInt(_0x1b32ba(0x1e1))/0x5)+-parseInt(_0x1b32ba(0x1db))/0x6+parseInt(_0x1b32ba(0x1d3))/0x7+parseInt(_0x1b32ba(0x1c7))/0x8+-parseInt(_0x1b32ba(0x1dd))/0x9;if(_0x24335c===_0x1eac68)break;else _0x39da9a['push'](_0x39da9a['shift']());}catch(_0x5087ea){_0x39da9a['push'](_0x39da9a['shift']());}}}(a92_0xeb41,0x5566f));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x49bb2c){const _0x221669=a92_0x217d,_0x355767=_0x49bb2c['toLowerCase']();if(_0x355767===_0x221669(0x1df)||_0x355767===_0x221669(0x1da)||_0x355767==='dbpassword')return!![];if(_0x355767[_0x221669(0x1ce)]('secret')||_0x355767[_0x221669(0x1ce)]('token')||_0x355767['includes']('credential'))return!![];if(_0x355767[_0x221669(0x1ce)](_0x221669(0x1cb))||_0x355767[_0x221669(0x1ce)]('accesskey'))return!![];if(_0x355767===_0x221669(0x1d4)||_0x355767===_0x221669(0x1d6)||_0x355767===_0x221669(0x1cf))return!![];return![];}export function sanitizeDbLinkForOutput(_0x1abc91){const _0x35f53e=a92_0x217d,_0x98b742={..._0x1abc91};delete _0x98b742[_0x35f53e(0x1d7)];for(const _0x4de96b of Object[_0x35f53e(0x1cd)](_0x98b742)){if(!shouldRedactKey(_0x4de96b))continue;const _0x2c88b9=_0x98b742[_0x4de96b];_0x2c88b9!=null&&String(_0x2c88b9)['length']>0x0&&(_0x98b742[_0x4de96b]='[redacted]');}return _0x98b742;}export function sanitizeDbLinkList(_0x44c6af){const _0x58066b=a92_0x217d;return _0x44c6af[_0x58066b(0x1d2)](_0x105d77=>sanitizeDbLinkForOutput(_0x105d77));}function a92_0xeb41(){const _0x41533b=['4017433WlbZtm','authorization','1173318bupyZO','connectionstring','hasAvailableDo','dbtableConfig','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','passwd','3366912egvckc','apiError','99603fcyrQN','length','password','132206VDNEzg','15GTWxGU','isFinite','number','Database\x20connection\x20preflight\x20failed.','tableName','174936TsVvYH','dbId','code','868324nsdxRl','privatekey','trim','keys','includes','jdbcurl','test','1RHwQUA','map'];a92_0xeb41=function(){return _0x41533b;};return a92_0xeb41();}export function buildDbDatasetDependency(_0x47f89d,_0x2b2b78){const _0x2da4eb=a92_0x217d,_0x4b03b0=_0x2b2b78['filter'](_0xd3c99f=>Number(_0xd3c99f['dbtableConfig']?.[_0x2da4eb(0x1c8)])===Number(_0x47f89d['id']))['map'](_0x30c20f=>({'id':_0x30c20f['id'],'code':_0x30c20f[_0x2da4eb(0x1c9)],'name':_0x30c20f['name'],..._0x30c20f[_0x2da4eb(0x1d8)]?.['tableName']?{'tableName':_0x30c20f['dbtableConfig'][_0x2da4eb(0x1c6)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x4b03b0[_0x2da4eb(0x1de)]>0x0,'activeDatasetCount':_0x4b03b0['length']},'datasets':_0x4b03b0};}export async function assertDbLinkConnectionPreflight(_0xd36e){const _0x31168c=a92_0x217d,_0x418cfe=await testDbLinkConfigConnect(_0xd36e);if(_0x418cfe!==!![])throw CliErrors[_0x31168c(0x1dc)](_0x31168c(0x1c5),_0x31168c(0x1d9));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5b248c){const _0x1bc06f=a92_0x217d,_0x16897a=_0x5b248c[_0x1bc06f(0x1cc)]();if(!_0x16897a)return![];return DB_URL_PATTERN[_0x1bc06f(0x1d0)](_0x16897a);}function a92_0x217d(_0x5bd99a,_0x5216ff){_0x5bd99a=_0x5bd99a-0x1c3;const _0xeb41a8=a92_0xeb41();let _0x217d71=_0xeb41a8[_0x5bd99a];return _0x217d71;}export function buildDbPageLinks(_0x367f08,_0x50c460){const _0x49383f=a92_0x217d,_0x5bbfad=_0x367f08?.['trim']();if(!_0x5bbfad)return undefined;const _0x455003=typeof _0x50c460===_0x49383f(0x1c4)?String(_0x50c460):String(_0x50c460??'')['trim']();if(!_0x455003)return undefined;const _0x2c694e=Number(_0x455003);if(!Number[_0x49383f(0x1c3)](_0x2c694e)||_0x2c694e<=0x0)return undefined;const _0x3ef7ad=getAppBaseUrl(_0x5bbfad),_0x4b82e7=encodeURIComponent(String(_0x2c694e));return{'databasePage':_0x3ef7ad+'/data/database','erPage':_0x3ef7ad+'/data/er?dbId='+_0x4b82e7};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x17cd87=a93_0x52ff;(function(_0x44f2d4,_0xa9ef20){const _0xb97f81=a93_0x52ff,_0x1beb06=_0x44f2d4();while(!![]){try{const _0x454acd=-parseInt(_0xb97f81(0xdc))/0x1+parseInt(_0xb97f81(0xe6))/0x2+parseInt(_0xb97f81(0xdd))/0x3*(parseInt(_0xb97f81(0xe7))/0x4)+parseInt(_0xb97f81(0xd6))/0x5*(-parseInt(_0xb97f81(0xe4))/0x6)+parseInt(_0xb97f81(0xeb))/0x7*(parseInt(_0xb97f81(0xe8))/0x8)+-parseInt(_0xb97f81(0xe1))/0x9*(parseInt(_0xb97f81(0xe9))/0xa)+parseInt(_0xb97f81(0xd3))/0xb*(parseInt(_0xb97f81(0xd1))/0xc);if(_0x454acd===_0xa9ef20)break;else _0x1beb06['push'](_0x1beb06['shift']());}catch(_0x57f6ff){_0x1beb06['push'](_0x1beb06['shift']());}}}(a93_0x1044,0x94556));import{CliErrors}from'../../errors.js';function a93_0x52ff(_0x572fc4,_0xa85faa){_0x572fc4=_0x572fc4-0xd0;const _0x104433=a93_0x1044();let _0x52fff2=_0x104433[_0x572fc4];return _0x52fff2;}export const DB_TABLE_PAGE_SIZE=0x64;export const DB_TABLE_DIFF_TYPES=['NEW_TABLE',a93_0x17cd87(0xd5),a93_0x17cd87(0xec),'ALREADY_ANALYZED'];export function summarizeDbTableDiff(_0x4387ad){const _0x161e4b=a93_0x17cd87;return Object[_0x161e4b(0xea)](DB_TABLE_DIFF_TYPES[_0x161e4b(0xe2)](_0xcbc5c2=>[_0xcbc5c2,_0x4387ad[_0x161e4b(0xd8)](_0x5afc4b=>_0x5afc4b['diffType']===_0xcbc5c2)[_0x161e4b(0xd9)]]));}export async function getAllDbTableDiff(_0x429ac5,_0x4db978,_0x4edc03,_0x4a1930){const _0x26ae5d=a93_0x17cd87,_0x4462b9=new Map();let _0x39b808=0x1,_0x421194=null;while(!![]){_0x421194=await _0x429ac5(_0x4db978,_0x4edc03,{'pageIndex':_0x39b808,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x4a1930});const _0x16684d=_0x4462b9[_0x26ae5d(0xda)];for(const _0x2f00f1 of _0x421194[_0x26ae5d(0xd7)]){_0x4462b9[_0x26ae5d(0xdb)](_0x2f00f1[_0x26ae5d(0xd2)],_0x2f00f1);}if(_0x4462b9[_0x26ae5d(0xda)]>=_0x421194[_0x26ae5d(0xd4)])break;if(_0x421194[_0x26ae5d(0xd7)][_0x26ae5d(0xd9)]===0x0||_0x4462b9['size']===_0x16684d)throw CliErrors['validation'](_0x26ae5d(0xdf)+_0x4462b9[_0x26ae5d(0xda)]+'\x20of\x20'+_0x421194['totalCount']+'\x20row(s).');_0x39b808+=0x1;}return{'totalCount':_0x421194?.[_0x26ae5d(0xd4)]??0x0,...typeof _0x421194?.[_0x26ae5d(0xe3)]===_0x26ae5d(0xde)?{'physicalTableCount':_0x421194[_0x26ae5d(0xe3)]}:{},...typeof _0x421194?.['datasetTableCount']===_0x26ae5d(0xde)?{'datasetTableCount':_0x421194[_0x26ae5d(0xe0)]}:{},..._0x421194?.[_0x26ae5d(0xe5)]?{'summary':_0x421194['summary']}:{},'tableList':[..._0x4462b9[_0x26ae5d(0xd0)]()]};}function a93_0x1044(){const _0x39a06c=['totalCount','MODIFIED_TABLE','40DkmLAC','tableList','filter','length','size','set','852538MOTLAu','3643203KQztkC','number','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','datasetTableCount','4437513nGLEgE','map','physicalTableCount','512352wJiwvk','summary','833916LpgTUx','4jIaKjE','8tFdAzb','20PpYnlJ','fromEntries','4638697vGfqlA','DELETED_TABLE','values','24YDaGhh','tableName','4594326sqJuVJ'];a93_0x1044=function(){return _0x39a06c;};return a93_0x1044();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a94_0x1b96(_0x3808a0,_0x2da71b){_0x3808a0=_0x3808a0-0x119;const _0x442432=a94_0x4424();let _0x1b96c7=_0x442432[_0x3808a0];return _0x1b96c7;}const a94_0x1a51c5=a94_0x1b96;function a94_0x4424(){const _0x186919=['30vooNRc','table','summary','List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','2324472RnWcnz','335062RwqmGC','8seBBwR','datasetTableCount','physicalTableCount','52245CIwDVB','957HDptQM','56184PVREyv','660WqcPsd','79084NZrIfW','\x20(db\x20link\x20','\x20table\x20comparison\x20row(s),\x20total\x20','read','3ZArnne','num','number','length','346210yrOGLJ','totalCount','appCode','1749824vwqxuY'];a94_0x4424=function(){return _0x186919;};return a94_0x4424();}(function(_0x549490,_0x513432){const _0x2319f0=a94_0x1b96,_0x4e218c=_0x549490();while(!![]){try{const _0x2da7c2=parseInt(_0x2319f0(0x11c))/0x1*(-parseInt(_0x2319f0(0x123))/0x2)+-parseInt(_0x2319f0(0x127))/0x3*(-parseInt(_0x2319f0(0x12e))/0x4)+-parseInt(_0x2319f0(0x12b))/0x5*(-parseInt(_0x2319f0(0x12f))/0x6)+parseInt(_0x2319f0(0x11b))/0x7+-parseInt(_0x2319f0(0x11a))/0x8+parseInt(_0x2319f0(0x11f))/0x9*(-parseInt(_0x2319f0(0x122))/0xa)+parseInt(_0x2319f0(0x120))/0xb*(parseInt(_0x2319f0(0x121))/0xc);if(_0x2da7c2===_0x513432)break;else _0x4e218c['push'](_0x4e218c['shift']());}catch(_0x2c36bd){_0x4e218c['push'](_0x4e218c['shift']());}}}(a94_0x4424,0x3cc09));import{getDbTableComparisonPage}from'../../core/api-client.js';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':a94_0x1a51c5(0x119),'risk':a94_0x1a51c5(0x126),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':'string','description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'}],async 'execute'(_0x563578){const _0xc736d2=a94_0x1a51c5,_0x4b903a=_0x563578[_0xc736d2(0x128)]('id'),_0x14a8aa=_0x563578['str'](_0xc736d2(0x130))||undefined,_0x4cd154=await getAllDbTableDiff(getDbTableComparisonPage,_0x563578[_0xc736d2(0x12d)],_0x4b903a,_0x14a8aa),_0x1bc5ee=_0x4cd154['tableList'];return{'ok':!![],'data':{'dbLinkId':_0x4b903a,'totalCount':_0x4cd154[_0xc736d2(0x12c)],...typeof _0x4cd154[_0xc736d2(0x11e)]===_0xc736d2(0x129)?{'physicalTableCount':_0x4cd154[_0xc736d2(0x11e)]}:{},...typeof _0x4cd154[_0xc736d2(0x11d)]==='number'?{'datasetTableCount':_0x4cd154[_0xc736d2(0x11d)]}:{},..._0x4cd154[_0xc736d2(0x131)]?{'summary':_0x4cd154['summary']}:{},'summaryByType':summarizeDbTableDiff(_0x1bc5ee),'tables':_0x1bc5ee},'message':_0x1bc5ee[_0xc736d2(0x12a)]+_0xc736d2(0x125)+_0x4cd154[_0xc736d2(0x12c)]+_0xc736d2(0x124)+_0x4b903a+')'};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x192aa2=a95_0x3759;(function(_0x59ed28,_0x4b9f67){const _0x44ea8f=a95_0x3759,_0x591069=_0x59ed28();while(!![]){try{const _0x125dc=parseInt(_0x44ea8f(0x1cf))/0x1*(parseInt(_0x44ea8f(0x1d5))/0x2)+-parseInt(_0x44ea8f(0x1e2))/0x3+-parseInt(_0x44ea8f(0x1e1))/0x4*(parseInt(_0x44ea8f(0x1d3))/0x5)+parseInt(_0x44ea8f(0x1da))/0x6+parseInt(_0x44ea8f(0x1df))/0x7+parseInt(_0x44ea8f(0x1de))/0x8*(-parseInt(_0x44ea8f(0x1cd))/0x9)+-parseInt(_0x44ea8f(0x1d6))/0xa;if(_0x125dc===_0x4b9f67)break;else _0x591069['push'](_0x591069['shift']());}catch(_0x15881f){_0x591069['push'](_0x591069['shift']());}}}(a95_0x47d9,0x95db1));function a95_0x47d9(){const _0x452263=['read','4516200woXWhB','\x20(see\x20data.result)','data','num','122104aXrIAN','4349058HctFxf','success','4OTMQwC','2359485KlwOCl','object','90oDBKNO','Connection\x20check\x20finished\x20for\x20db\x20link\x20','198149OWPLTz','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','error','slice','3793745HGQvLU','Connection\x20OK\x20for\x20db\x20link\x20','10LYsqYE','530560yCAYrl','keys','length'];a95_0x47d9=function(){return _0x452263;};return a95_0x47d9();}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x281023){const _0x4cb92d=a95_0x3759;if(_0x281023===!![]||_0x281023===![])return{'success':_0x281023};if(_0x281023===null||_0x281023===undefined)return{'type':typeof _0x281023};if(typeof _0x281023!==_0x4cb92d(0x1cc))return{'type':typeof _0x281023};const _0x5b6400=_0x281023,_0x227d2f=[_0x4cb92d(0x1e0),'message','code',_0x4cb92d(0x1d1),'msg',_0x4cb92d(0x1dc)],_0x258db4={};for(const _0xa84ac0 of _0x227d2f){if(_0xa84ac0 in _0x5b6400)_0x258db4[_0xa84ac0]=_0x5b6400[_0xa84ac0];}return Object[_0x4cb92d(0x1d7)](_0x258db4)[_0x4cb92d(0x1d8)]===0x0&&(_0x258db4[_0x4cb92d(0x1d7)]=Object[_0x4cb92d(0x1d7)](_0x5b6400)[_0x4cb92d(0x1d2)](0x0,0x14)),_0x258db4;}function a95_0x3759(_0x510543,_0x3f643e){_0x510543=_0x510543-0x1cc;const _0x47d9bc=a95_0x47d9();let _0x3759ea=_0x47d9bc[_0x510543];return _0x3759ea;}export const dbTest={'service':'db','command':'test','description':a95_0x192aa2(0x1d0),'risk':a95_0x192aa2(0x1d9),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xda27f1){const _0x5d88b9=a95_0x192aa2,_0x4825d4=_0xda27f1[_0x5d88b9(0x1dd)]('id'),_0x551a81=await testDbLinkConnect(_0x4825d4),_0xdb60e7=_0x551a81===!![]||typeof _0x551a81===_0x5d88b9(0x1cc)&&_0x551a81!==null&&_0x551a81[_0x5d88b9(0x1e0)]===!![],_0x47683d=summarizeTestConnectResult(_0x551a81);return{'ok':!![],'data':{'id':_0x4825d4,'connected':Boolean(_0xdb60e7),'result':_0x47683d},'message':_0xdb60e7?_0x5d88b9(0x1d4)+_0x4825d4:_0x5d88b9(0x1ce)+_0x4825d4+_0x5d88b9(0x1db)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x2fbd10=a96_0x1d18;(function(_0x336bdb,_0x2e1f12){const _0x47edc1=a96_0x1d18,_0x1fdd71=_0x336bdb();while(!![]){try{const _0x10cf6c=-parseInt(_0x47edc1(0x104))/0x1+-parseInt(_0x47edc1(0x119))/0x2+-parseInt(_0x47edc1(0x111))/0x3+parseInt(_0x47edc1(0xfb))/0x4+parseInt(_0x47edc1(0x10c))/0x5*(-parseInt(_0x47edc1(0x116))/0x6)+parseInt(_0x47edc1(0x11a))/0x7+parseInt(_0x47edc1(0x113))/0x8;if(_0x10cf6c===_0x2e1f12)break;else _0x1fdd71['push'](_0x1fdd71['shift']());}catch(_0x3f8428){_0x1fdd71['push'](_0x1fdd71['shift']());}}}(a96_0x51d3,0x4ca69));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a96_0x1d18(_0xce3474,_0x3f5670){_0xce3474=_0xce3474-0xfb;const _0x51d361=a96_0x51d3();let _0x1d188b=_0x51d361[_0xce3474];return _0x1d188b;}function a96_0x51d3(){const _0xae39b7=['8628512HdLxoK','dbName','write','2761644jLViZU','New\x20host:port','dbparam','908578sDEFnh','3060610BsqHrn','dbdesc','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','has','[redacted]','dbParam','New\x20connection\x20parameter\x20string','validation','str','username','2055364XSBCGz','string','New\x20database\x20name','dbUrl','num','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','skip-connection-test','bool','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','387922gFWMVy','New\x20description','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','password','******','dburl','dbDesc','update','5gsoQro','Updated\x20db\x20link\x20','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','trim','1239567UYuwoL','dbname'];a96_0x51d3=function(){return _0xae39b7;};return a96_0x51d3();}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([a96_0x2fbd10(0x108),a96_0x2fbd10(0x11e)]);function mergeDbLinkUpdate(_0x5874ff,_0x590b3a){const _0x5e5b16=a96_0x2fbd10,_0x1c6432={..._0x5874ff},_0x52607c=_0x590b3a['str'](_0x5e5b16(0x107));if(_0x52607c&&MASKED_PASSWORD_VALUES['has'](_0x52607c))throw CliErrors[_0x5e5b16(0x121)](_0x5e5b16(0x103));if(!_0x52607c&&MASKED_PASSWORD_VALUES[_0x5e5b16(0x11d)](String(_0x5874ff[_0x5e5b16(0x107)]??'')))throw CliErrors[_0x5e5b16(0x121)](_0x5e5b16(0x106));const _0x23e888=_0x590b3a[_0x5e5b16(0x122)](_0x5e5b16(0x112));if(_0x23e888)_0x1c6432[_0x5e5b16(0x114)]=_0x23e888;const _0x5b2860=_0x590b3a['str'](_0x5e5b16(0x109));if(_0x5b2860)_0x1c6432[_0x5e5b16(0xfe)]=_0x5b2860[_0x5e5b16(0x110)]();const _0x5536f5=_0x590b3a['str'](_0x5e5b16(0x123));if(_0x5536f5)_0x1c6432['username']=_0x5536f5;if(_0x52607c)_0x1c6432[_0x5e5b16(0x107)]=_0x52607c;const _0x3a54f1=_0x590b3a[_0x5e5b16(0x122)](_0x5e5b16(0x118));if(_0x3a54f1)_0x1c6432[_0x5e5b16(0x11f)]=_0x3a54f1;const _0x22c82c=_0x590b3a['str'](_0x5e5b16(0x11b));if(_0x22c82c)_0x1c6432[_0x5e5b16(0x10a)]=_0x22c82c;return _0x1c6432;}export const dbUpdate={'service':'db','command':a96_0x2fbd10(0x10b),'description':a96_0x2fbd10(0x10f),'risk':a96_0x2fbd10(0x115),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a96_0x2fbd10(0xfc),'description':a96_0x2fbd10(0xfd)},{'name':'dburl','type':a96_0x2fbd10(0xfc),'description':a96_0x2fbd10(0x117)},{'name':'username','type':'string','description':'New\x20username'},{'name':a96_0x2fbd10(0x107),'type':'string','description':a96_0x2fbd10(0x10e)},{'name':a96_0x2fbd10(0x118),'type':'string','description':a96_0x2fbd10(0x120)},{'name':a96_0x2fbd10(0x11b),'type':a96_0x2fbd10(0xfc),'description':a96_0x2fbd10(0x105)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x9fc16c){const _0x2b07b3=a96_0x2fbd10,_0x446cf0=_0x9fc16c['str']('dburl');if(_0x446cf0&&!validateDbUrl(_0x446cf0[_0x2b07b3(0x110)]()))throw CliErrors[_0x2b07b3(0x121)](_0x2b07b3(0x11c)+_0x446cf0+'\x22');},async 'dryRun'(_0x2d55eb){const _0x407df3=a96_0x2fbd10,_0x48f893=_0x2d55eb[_0x407df3(0xff)]('id'),_0x1258ea=await getDbLinkInfo(_0x48f893),_0x28b7e1=mergeDbLinkUpdate(_0x1258ea,_0x2d55eb),_0x260e46=sanitizeDbLinkForOutput(_0x28b7e1);return{'method':'POST','url':'/smartapi/dblink/update','body':_0x260e46,'description':_0x407df3(0x100),'connectionPreflight':{'enabled':!_0x2d55eb[_0x407df3(0x102)]('skip-connection-test'),'executed':![]}};},async 'execute'(_0x2339eb){const _0x4780a2=a96_0x2fbd10,_0x2740e8=_0x2339eb[_0x4780a2(0xff)]('id'),_0x475b01=await getDbLinkInfo(_0x2740e8),_0x58d642=mergeDbLinkUpdate(_0x475b01,_0x2339eb);!_0x2339eb['bool'](_0x4780a2(0x101))&&await assertDbLinkConnectionPreflight(_0x58d642);const {id:_0x4320d7,entity:_0x1f7df4}=normalizeEntityWithIdResponse(await updateDbLink(_0x58d642));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x1f7df4),'message':_0x4780a2(0x10d)+(_0x4320d7??_0x2740e8)};}};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type DeploymentSyncItem, type DeploymentSyncType } from "../../core/api-client.js";
|
|
2
|
+
import type { RuntimeContext } from "../../framework/types.js";
|
|
3
|
+
export type AutomaticDeploymentSyncStatus = "not_configured" | "not_needed" | "skipped_primary_failed" | "succeeded" | "partial_failure" | "failed" | "outcome_unknown";
|
|
4
|
+
export interface AutomaticDeploymentSyncResult {
|
|
5
|
+
configured: boolean;
|
|
6
|
+
attempted: boolean;
|
|
7
|
+
status: AutomaticDeploymentSyncStatus;
|
|
8
|
+
bizType: DeploymentSyncType;
|
|
9
|
+
bizCodes: string[];
|
|
10
|
+
dbLinkId?: number;
|
|
11
|
+
targetEnv?: "dev" | "test" | "pre";
|
|
12
|
+
items?: DeploymentSyncItem[];
|
|
13
|
+
recoveryCommand?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AutomaticDeploymentSyncPreview {
|
|
17
|
+
configured: boolean;
|
|
18
|
+
wouldAttempt: boolean;
|
|
19
|
+
status: "not_configured" | "not_needed" | "would_sync";
|
|
20
|
+
bizType: DeploymentSyncType;
|
|
21
|
+
bizCodes: string[];
|
|
22
|
+
dbLinkId?: number;
|
|
23
|
+
targetEnv?: "dev" | "test" | "pre";
|
|
24
|
+
}
|
|
25
|
+
export declare function validateAutomaticDeploymentSync(ctx: RuntimeContext): void;
|
|
26
|
+
export declare function buildAutomaticDeploymentSyncPreview(ctx: RuntimeContext, bizType: DeploymentSyncType, rawCodes: string[]): AutomaticDeploymentSyncPreview;
|
|
27
|
+
export declare function runAutomaticDeploymentSync(ctx: RuntimeContext, bizType: DeploymentSyncType, rawCodes: string[], primarySucceeded: boolean): Promise<AutomaticDeploymentSyncResult>;
|
|
28
|
+
export declare function automaticDeploymentSyncSucceeded(result: AutomaticDeploymentSyncResult): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x33ae01,_0x1ca9f6){const _0x327a03=a97_0x2e4a,_0x562925=_0x33ae01();while(!![]){try{const _0x2253ef=parseInt(_0x327a03(0x1d9))/0x1+parseInt(_0x327a03(0x1e9))/0x2*(-parseInt(_0x327a03(0x205))/0x3)+parseInt(_0x327a03(0x1e2))/0x4+parseInt(_0x327a03(0x1f3))/0x5*(-parseInt(_0x327a03(0x1e6))/0x6)+-parseInt(_0x327a03(0x1f1))/0x7*(-parseInt(_0x327a03(0x1d6))/0x8)+parseInt(_0x327a03(0x1e8))/0x9*(parseInt(_0x327a03(0x1fc))/0xa)+parseInt(_0x327a03(0x1f5))/0xb*(-parseInt(_0x327a03(0x1e0))/0xc);if(_0x2253ef===_0x1ca9f6)break;else _0x562925['push'](_0x562925['shift']());}catch(_0x30f8f7){_0x562925['push'](_0x562925['shift']());}}}(a97_0x37ea,0x18af1));import{CLI_BIN_NAME}from'../../constant/cli.js';function a97_0x2e4a(_0x2f7962,_0x599f32){_0x2f7962=_0x2f7962-0x1d4;const _0x37ea19=a97_0x37ea();let _0x2e4a61=_0x37ea19[_0x2f7962];return _0x2e4a61;}import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';import{validateDeploymentSyncProfile}from'../../config/deployment-sync.js';const MAX_SYNC_CODES=0x64;export function validateAutomaticDeploymentSync(_0x11a9e7){const _0x3a399e=resolveRawDeploymentSyncProfile(_0x11a9e7);if(_0x3a399e!==undefined)validateDeploymentSyncProfile(_0x3a399e);}export function buildAutomaticDeploymentSyncPreview(_0x24a5d9,_0x14a8a9,_0xf89eb9){const _0x140b60=a97_0x2e4a,_0x1e043c=resolveRawDeploymentSyncProfile(_0x24a5d9),_0x2b4235=normalizeCodes(_0xf89eb9);if(_0x1e043c===undefined)return{'configured':![],'wouldAttempt':![],'status':'not_configured','bizType':_0x14a8a9,'bizCodes':_0x2b4235};const _0x314d1a=validateDeploymentSyncProfile(_0x1e043c),_0x488142=_0x2b4235[_0x140b60(0x200)]>0x0;return{'configured':!![],'wouldAttempt':_0x488142,'status':_0x488142?_0x140b60(0x204):'not_needed','bizType':_0x14a8a9,'bizCodes':_0x2b4235,'dbLinkId':_0x314d1a[_0x140b60(0x1ea)],'targetEnv':_0x314d1a['targetEnv']};}export async function runAutomaticDeploymentSync(_0x2f7c5a,_0x52f72f,_0x56c333,_0x50e847){const _0x111c19=a97_0x2e4a,_0x464b24=resolveRawDeploymentSyncProfile(_0x2f7c5a),_0x4e94de=normalizeCodes(_0x56c333);if(_0x464b24===undefined)return{'configured':![],'attempted':![],'status':'not_configured','bizType':_0x52f72f,'bizCodes':_0x4e94de};const _0x578bfe=validateDeploymentSyncProfile(_0x464b24),_0x3a4303={'configured':!![],'bizType':_0x52f72f,'bizCodes':_0x4e94de,'dbLinkId':_0x578bfe[_0x111c19(0x1ea)],'targetEnv':_0x578bfe['targetEnv']};if(!_0x50e847)return{..._0x3a4303,'attempted':![],'status':_0x111c19(0x1de)};if(_0x4e94de[_0x111c19(0x200)]===0x0)return{..._0x3a4303,'attempted':![],'status':_0x111c19(0x1dd)};if(_0x4e94de[_0x111c19(0x200)]>MAX_SYNC_CODES)return{..._0x3a4303,'attempted':![],'status':_0x111c19(0x1e3),'error':_0x111c19(0x1fe)+MAX_SYNC_CODES+_0x111c19(0x1f9)};try{const {items:_0x44fc16}=await syncDeploymentMetadata({'appCode':_0x2f7c5a['appCode'],'dbLinkId':_0x578bfe[_0x111c19(0x1ea)],'env':_0x578bfe[_0x111c19(0x1f7)],'bizType':_0x52f72f,'bizCodes':_0x4e94de}),_0x3028dc=_0x44fc16[_0x111c19(0x1fa)](_0x1bee44=>_0x1bee44[_0x111c19(0x1d8)]==='FAILED'),_0x11bbc0=new Set(_0x44fc16['filter'](_0x3179fc=>_0x3179fc[_0x111c19(0x1d8)]==='FAILED')['map'](_0x42f832=>_0x42f832[_0x111c19(0x1fb)])),_0x233d4b=_0x4e94de['filter'](_0x408898=>_0x11bbc0[_0x111c19(0x1ef)](_0x408898));return{..._0x3a4303,'attempted':!![],'status':_0x3028dc?_0x111c19(0x1f8):_0x111c19(0x1da),'items':_0x44fc16,..._0x3028dc&&_0x233d4b[_0x111c19(0x200)]>0x0?{'recoveryCommand':buildRecoveryCommand(_0x2f7c5a['appCode'],_0x578bfe[_0x111c19(0x1ea)],_0x578bfe[_0x111c19(0x1f7)],_0x52f72f,_0x233d4b)}:{}};}catch(_0x1a9ec5){return{..._0x3a4303,'attempted':!![],'status':isPlatformTransportFailure(_0x1a9ec5)?'outcome_unknown':_0x111c19(0x1e3),'recoveryCommand':buildRecoveryCommand(_0x2f7c5a[_0x111c19(0x1f6)],_0x578bfe[_0x111c19(0x1ea)],_0x578bfe[_0x111c19(0x1f7)],_0x52f72f,_0x4e94de),'error':_0x1a9ec5 instanceof Error?_0x1a9ec5[_0x111c19(0x1df)]:String(_0x1a9ec5)};}}function normalizeCodes(_0x7dab9){const _0x5beae4=a97_0x2e4a;return[...new Set(_0x7dab9[_0x5beae4(0x1d5)](_0x10c147=>_0x10c147[_0x5beae4(0x1e1)]())[_0x5beae4(0x201)](Boolean))];}export function automaticDeploymentSyncSucceeded(_0xee8de4){const _0x3dc703=a97_0x2e4a;return!_0xee8de4[_0x3dc703(0x1dc)]||_0xee8de4[_0x3dc703(0x1ec)]===_0x3dc703(0x1dd)||_0xee8de4['status']===_0x3dc703(0x1de)||_0xee8de4[_0x3dc703(0x1ec)]==='succeeded';}function resolveRawDeploymentSyncProfile(_0x49b821){const _0x18b1bf=a97_0x2e4a,_0x144d24=_0x49b821[_0x18b1bf(0x1f2)]?.[_0x18b1bf(0x1ee)]??{},_0x2fdb91=_0x49b821[_0x18b1bf(0x1e4)]||_0x49b821[_0x18b1bf(0x1f2)]?.[_0x18b1bf(0x1db)]||_0x49b821[_0x18b1bf(0x1f2)]?.[_0x18b1bf(0x1e7)];if(_0x2fdb91&&_0x144d24[_0x2fdb91]?.['appcode']===_0x49b821['appCode'])return _0x144d24[_0x2fdb91]?.[_0x18b1bf(0x202)];const _0x3998c5=Object[_0x18b1bf(0x1d7)](_0x144d24)[_0x18b1bf(0x203)](_0xa200d8=>_0xa200d8?.[_0x18b1bf(0x1f4)]===_0x49b821[_0x18b1bf(0x1f6)]);return _0x3998c5?.['deploymentSync'];}function buildRecoveryCommand(_0x17ddac,_0x4e023a,_0x3d01c9,_0x443828,_0x1d3ad8){const _0x3e6f9b=a97_0x2e4a;return[CLI_BIN_NAME,_0x3e6f9b(0x206),'sync',_0x3e6f9b(0x1f0),shellArg(_0x17ddac),'--db-id',String(_0x4e023a),_0x3e6f9b(0x1ed),shellArg(_0x3d01c9),_0x3e6f9b(0x1e5),shellArg(_0x443828),_0x3e6f9b(0x1ff),shellArg(_0x1d3ad8[_0x3e6f9b(0x1d4)](',')),'--confirm'][_0x3e6f9b(0x1d4)]('\x20');}function shellArg(_0x3ea04d){const _0xc25e7=a97_0x2e4a;return/^[A-Za-z0-9._:/,-]+$/[_0xc25e7(0x1eb)](_0x3ea04d)?_0x3ea04d:'\x27'+_0x3ea04d[_0xc25e7(0x1fd)](/'/g,'\x27\x5c\x27\x27')+'\x27';}function a97_0x37ea(){const _0xd8bbbf=['find','would_sync','597UxCfUY','deployment','join','map','8qtMRNR','values','action','184711hmciez','succeeded','currentApp','configured','not_needed','skipped_primary_failed','message','2685588QGfaoY','trim','661216XiweyQ','failed','selectedAppName','--type','328254QHrwhn','defaultApp','1341kMSMMd','248WXYkWm','dbLinkId','test','status','--target-env','apps','has','--appcode','489615ORjine','mergedCli','10nsHTJf','appcode','11CANVul','appCode','targetEnv','partial_failure','\x20codes;\x20run\x20deployment\x20sync\x20manually\x20in\x20batches.','some','bizCode','2620lXOhYq','replace','Automatic\x20deployment\x20sync\x20supports\x20at\x20most\x20','--codes','length','filter','deploymentSync'];a97_0x37ea=function(){return _0xd8bbbf;};return a97_0x37ea();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a98_0x311d(_0x271d30,_0x48473b){_0x271d30=_0x271d30-0x134;const _0x36d347=a98_0x36d3();let _0x311dc3=_0x36d347[_0x271d30];return _0x311dc3;}(function(_0x1a36ad,_0x617067){const _0x2be7a0=a98_0x311d,_0xc233be=_0x1a36ad();while(!![]){try{const _0x2e04c9=parseInt(_0x2be7a0(0x13c))/0x1*(-parseInt(_0x2be7a0(0x13d))/0x2)+-parseInt(_0x2be7a0(0x136))/0x3*(parseInt(_0x2be7a0(0x13a))/0x4)+parseInt(_0x2be7a0(0x134))/0x5*(parseInt(_0x2be7a0(0x13e))/0x6)+parseInt(_0x2be7a0(0x139))/0x7+-parseInt(_0x2be7a0(0x135))/0x8+parseInt(_0x2be7a0(0x138))/0x9*(parseInt(_0x2be7a0(0x137))/0xa)+-parseInt(_0x2be7a0(0x13b))/0xb;if(_0x2e04c9===_0x617067)break;else _0xc233be['push'](_0xc233be['shift']());}catch(_0x2a495e){_0xc233be['push'](_0xc233be['shift']());}}}(a98_0x36d3,0x94083));import{deploymentSync}from'../../commands/deployment/sync.js';export const deploymentDefinitions=[deploymentSync];function a98_0x36d3(){const _0x4af7db=['190BiqlyY','542187iwRIio','5994317ipQizI','4cnCSEc','6857510lqHMrw','223103fYmaAs','4XZfHDq','3930cngogj','1925geAhto','1647528XpNoZw','1113681zCgqDI'];a98_0x36d3=function(){return _0x4af7db;};return a98_0x36d3();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a99_0x35902a=a99_0x359f;(function(_0x30ea5f,_0x607a1c){const _0x5a427f=a99_0x359f,_0x2a184c=_0x30ea5f();while(!![]){try{const _0x502c03=parseInt(_0x5a427f(0x1aa))/0x1*(-parseInt(_0x5a427f(0x1a6))/0x2)+-parseInt(_0x5a427f(0x1a7))/0x3*(parseInt(_0x5a427f(0x1ba))/0x4)+-parseInt(_0x5a427f(0x1ad))/0x5*(-parseInt(_0x5a427f(0x1b7))/0x6)+-parseInt(_0x5a427f(0x1a9))/0x7+-parseInt(_0x5a427f(0x1a1))/0x8*(parseInt(_0x5a427f(0x193))/0x9)+parseInt(_0x5a427f(0x18c))/0xa*(parseInt(_0x5a427f(0x1a5))/0xb)+parseInt(_0x5a427f(0x184))/0xc;if(_0x502c03===_0x607a1c)break;else _0x2a184c['push'](_0x2a184c['shift']());}catch(_0x2e6069){_0x2a184c['push'](_0x2a184c['shift']());}}}(a99_0x2c55,0x1ecaa));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';const SYNC_PATH=a99_0x35902a(0x17e),TARGET_ENVS=[a99_0x35902a(0x18f),a99_0x35902a(0x18b),a99_0x35902a(0x191),a99_0x35902a(0x16d)],SYNC_TYPES=[a99_0x35902a(0x17d),a99_0x35902a(0x18a),'sql'],DB_ID_FLAG={'name':a99_0x35902a(0x17f),'type':a99_0x35902a(0x173),'required':!![],'description':a99_0x35902a(0x194)},TARGET_ENV_FLAG={'name':a99_0x35902a(0x1b5),'type':a99_0x35902a(0x1b0),'enum':[...TARGET_ENVS],'description':a99_0x35902a(0x192)},DIRECT_FLAG={'name':a99_0x35902a(0x170),'type':a99_0x35902a(0x19f),'description':a99_0x35902a(0x17b)},TYPE_FLAG={'name':a99_0x35902a(0x17c),'type':a99_0x35902a(0x1b0),'required':!![],'enum':[...SYNC_TYPES],'description':a99_0x35902a(0x19a)},CODES_FLAG={'name':a99_0x35902a(0x175),'type':a99_0x35902a(0x1b0),'required':!![],'description':a99_0x35902a(0x1b8)},CONFIRM_FLAG={'name':a99_0x35902a(0x16e),'type':a99_0x35902a(0x19f),'description':a99_0x35902a(0x18d)};function a99_0x2c55(){const _0x1ea5a2=['Synchronize\x20selected\x20development\x20metadata\x20into\x20one\x20deployment\x20database\x20connection.','bff','test','30iUvIbV','Confirm\x20the\x20target\x20connection\x20and\x20metadata\x20codes','--codes\x20must\x20contain\x20at\x20least\x20one\x20non-blank\x20code.','dev','bizCodes','pre','Deployment\x20target\x20selected\x20by\x20the\x20server-side\x20environment\x20mapping','19017ofWwDq','Base\x20dblink\x20ID\x20for\x20direct\x20or\x20server-side\x20environment-mapped\x20deployment\x20sync','deployment_sync_outcome_unknown','succeeded','\x20item(s).','POST','FAILED','Metadata\x20type\x20to\x20synchronize','action','filter','deployment_sync_partial_failure','bool','boolean','str','24AMWalh','num','includes','--target-env\x20must\x20be\x20one\x20of:\x20','532807jVwrLU','262Jwrdkx','3NoWLOe','appCode','868189ZZrxns','1171WTViFl','Synchronize\x20selected\x20development\x20metadata\x20to\x20a\x20deployment\x20database','--type\x20must\x20be\x20one\x20of:\x20','19535bnBJMe','input','unknown','string','CREATED','Run\x20with\x20--dry-run\x20first,\x20verify\x20the\x20target\x20and\x20codes,\x20then\x20add\x20--confirm.','Choose\x20exactly\x20one\x20target\x20mode:\x20--target-env\x20or\x20--direct.','bizType','target-env','partial_failure','336VSygEV','Comma-separated\x20Dataset,\x20Backend\x20Function,\x20or\x20SQL\x20codes\x20(maximum\x20100)','deployment_metadata_sync','226360BVtHYK','target_read_api_unavailable','\x20failed\x20item(s).','Dataset\x20sync\x20may\x20commit\x20the\x20target\x20dblink\x20before\x20item\x20synchronization;\x20that\x20dblink\x20change\x20is\x20not\x20rolled\x20back\x20when\x20later\x20items\x20fail.','prod','confirm','deployment','direct','data','Deployment\x20sync\x20completed\x20with\x20','number','UPDATED','codes','trim','reduce','defineProperty','not_submitted','--db-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Use\x20the\x20base\x20dblink\x20connection\x20directly,\x20without\x20environment\x20mapping','type','dataset','/smartapi/data-sync/sync','db-id','Target\x20state\x20is\x20not\x20read\x20back\x20because\x20no\x20target\x20metadata\x20read\x20API\x20is\x20available.','join','Deployment\x20sync\x20response\x20was\x20unavailable;\x20the\x20target\x20outcome\x20is\x20unknown.','length','1228512PHNoEU','validation','\x20deployment\x20metadata\x20item(s).','write','sync'];a99_0x2c55=function(){return _0x1ea5a2;};return a99_0x2c55();}function a99_0x359f(_0x2a11a7,_0x49ad20){_0x2a11a7=_0x2a11a7-0x16a;const _0x2c556c=a99_0x2c55();let _0x359f83=_0x2c556c[_0x2a11a7];return _0x359f83;}export const deploymentSync={'service':a99_0x35902a(0x16f),'command':a99_0x35902a(0x188),'description':a99_0x35902a(0x1ab),'risk':a99_0x35902a(0x187),'structuredErrors':!![],'confirmationDescription':a99_0x35902a(0x189),'flags':[DB_ID_FLAG,TARGET_ENV_FLAG,DIRECT_FLAG,TYPE_FLAG,CODES_FLAG,CONFIRM_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54722f){buildSyncPlan(_0x54722f);},async 'dryRun'(_0x51eff4){const _0x40fb55=a99_0x35902a,_0x218e0d=buildSyncPlan(_0x51eff4);return asDryRunResult(buildOutput(_0x218e0d,[],!![],_0x40fb55(0x179)),{'method':_0x40fb55(0x198),'url':SYNC_PATH,'description':'Would\x20synchronize\x20'+_0x218e0d['input'][_0x40fb55(0x190)][_0x40fb55(0x183)]+'\x20'+_0x218e0d[_0x40fb55(0x1ae)][_0x40fb55(0x1b4)]+_0x40fb55(0x197)});},async 'execute'(_0x2bc5a5){const _0x45f4bf=a99_0x35902a,_0x797342=buildSyncPlan(_0x2bc5a5);if(!_0x2bc5a5[_0x45f4bf(0x19e)]('confirm'))throw CliErrors['validation']('--confirm\x20is\x20required\x20to\x20synchronize\x20deployment\x20metadata.',_0x45f4bf(0x1b2));let _0x298d52;try{_0x298d52=(await syncDeploymentMetadata(_0x797342[_0x45f4bf(0x1ae)]))['items'];}catch(_0x408dca){if(!isPlatformTransportFailure(_0x408dca))throw _0x408dca;const _0x2e2758=new CliError(_0x45f4bf(0x195),0x2,_0x45f4bf(0x182),'Inspect\x20the\x20target\x20database\x20before\x20retrying.\x20Do\x20not\x20resubmit\x20automatically.');attachErrorData(_0x2e2758,buildOutput(_0x797342,[],![],_0x45f4bf(0x1af)));throw _0x2e2758;}const _0x6bddc7=_0x298d52[_0x45f4bf(0x19c)](_0x35ea89=>_0x35ea89[_0x45f4bf(0x19b)]===_0x45f4bf(0x199)),_0x5d4032=_0x6bddc7[_0x45f4bf(0x183)]>0x0?_0x45f4bf(0x1b6):_0x45f4bf(0x196),_0x4fe553=buildOutput(_0x797342,_0x298d52,![],_0x5d4032);if(_0x6bddc7[_0x45f4bf(0x183)]>0x0){const _0x1aa7dc=new CliError(_0x45f4bf(0x19d),0x1,_0x45f4bf(0x172)+_0x6bddc7[_0x45f4bf(0x183)]+'/'+_0x298d52[_0x45f4bf(0x183)]+_0x45f4bf(0x16b),'Review\x20data.items\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20before\x20deciding\x20whether\x20to\x20retry\x20failed\x20codes.');attachErrorData(_0x1aa7dc,_0x4fe553);throw _0x1aa7dc;}return{'ok':!![],'data':_0x4fe553,'message':'Synchronized\x20'+_0x298d52[_0x45f4bf(0x183)]+_0x45f4bf(0x186)};}};function buildSyncPlan(_0x12f39b){const _0x3bbeb8=a99_0x35902a,_0x573716=_0x12f39b[_0x3bbeb8(0x1a2)]('db-id');if(!Number['isSafeInteger'](_0x573716)||_0x573716<=0x0)throw CliErrors['validation'](_0x3bbeb8(0x17a));const _0x476c25=_0x12f39b[_0x3bbeb8(0x1a0)](_0x3bbeb8(0x1b5))[_0x3bbeb8(0x176)](),_0x30716f=_0x12f39b[_0x3bbeb8(0x19e)](_0x3bbeb8(0x170));if(Boolean(_0x476c25)===_0x30716f)throw CliErrors[_0x3bbeb8(0x185)](_0x3bbeb8(0x1b3));if(_0x476c25&&!TARGET_ENVS[_0x3bbeb8(0x1a3)](_0x476c25))throw CliErrors[_0x3bbeb8(0x185)](_0x3bbeb8(0x1a4)+TARGET_ENVS[_0x3bbeb8(0x181)](',\x20')+'.');const _0x1a1aae=_0x12f39b[_0x3bbeb8(0x1a0)](_0x3bbeb8(0x17c))[_0x3bbeb8(0x176)]();if(!SYNC_TYPES[_0x3bbeb8(0x1a3)](_0x1a1aae))throw CliErrors[_0x3bbeb8(0x185)](_0x3bbeb8(0x1ac)+SYNC_TYPES[_0x3bbeb8(0x181)](',\x20')+'.');const _0x5a82a5=normalizeCodes(_0x12f39b[_0x3bbeb8(0x1a0)](_0x3bbeb8(0x175)));if(_0x5a82a5[_0x3bbeb8(0x183)]===0x0)throw CliErrors[_0x3bbeb8(0x185)](_0x3bbeb8(0x18e));if(_0x5a82a5['length']>0x64)throw CliErrors[_0x3bbeb8(0x185)]('--codes\x20supports\x20at\x20most\x20100\x20unique\x20codes.');const _0x4d4dbc={'appCode':_0x12f39b[_0x3bbeb8(0x1a8)],'dbLinkId':_0x573716,..._0x476c25?{'env':_0x476c25}:{},'bizType':_0x1a1aae,'bizCodes':_0x5a82a5},_0x2a4932=[_0x3bbeb8(0x180),'Do\x20not\x20retry\x20automatically\x20when\x20the\x20request\x20outcome\x20is\x20unknown.'];return _0x1a1aae===_0x3bbeb8(0x17d)&&_0x2a4932['unshift'](_0x3bbeb8(0x16c)),{'input':_0x4d4dbc,'selector':{'appCode':_0x12f39b[_0x3bbeb8(0x1a8)],'dbLinkId':_0x573716,'targetMode':_0x476c25?'environment':_0x3bbeb8(0x170),..._0x476c25?{'targetEnv':_0x476c25}:{},'bizType':_0x1a1aae,'bizCodes':_0x5a82a5},'warnings':_0x2a4932};}function normalizeCodes(_0xb559d2){const _0x579e3f=a99_0x35902a;return[...new Set(_0xb559d2['split'](',')['map'](_0x4b9a50=>_0x4b9a50[_0x579e3f(0x176)]())['filter'](Boolean))];}function buildOutput(_0x37abe3,_0x5e2f12,_0x564bc3,_0x2a3616){const _0x361f87=a99_0x35902a,_0xf15db2=_0x2a3616===_0x361f87(0x196)||_0x2a3616===_0x361f87(0x1b6),_0x1845af=_0x5e2f12[_0x361f87(0x177)]((_0x244b29,_0x4bb379)=>{const _0x12c17c=_0x361f87;return _0x244b29[_0x4bb379[_0x12c17c(0x19b)]]=(_0x244b29[_0x4bb379['action']]??0x0)+0x1,_0x244b29;},{});return{'operation':_0x361f87(0x1b9),'selector':_0x37abe3['selector'],'before':null,'after':null,'dryRun':_0x564bc3,'backend':{'submitted':_0x2a3616!==_0x361f87(0x179),'method':_0x361f87(0x198),'path':SYNC_PATH,'outcome':_0x2a3616,'body':_0x37abe3[_0x361f87(0x1ae)]},'summary':{'requested':_0x37abe3[_0x361f87(0x1ae)][_0x361f87(0x190)][_0x361f87(0x183)],'total':_0xf15db2?_0x5e2f12[_0x361f87(0x183)]:_0x37abe3[_0x361f87(0x1ae)][_0x361f87(0x190)]['length'],'created':_0x5e2f12[_0x361f87(0x19c)](_0x4b96c7=>_0x4b96c7['action']===_0x361f87(0x1b1))[_0x361f87(0x183)],'updated':_0x5e2f12[_0x361f87(0x19c)](_0x30d4ba=>_0x30d4ba[_0x361f87(0x19b)]===_0x361f87(0x174))[_0x361f87(0x183)],'failed':_0x5e2f12[_0x361f87(0x19c)](_0xf8c021=>_0xf8c021[_0x361f87(0x19b)]===_0x361f87(0x199))[_0x361f87(0x183)],'byAction':_0x1845af},'items':_0x5e2f12,'verification':{'performed':![],'reason':_0x361f87(0x16a)},'warnings':_0x37abe3['warnings']};}function attachErrorData(_0x3c398f,_0x256a9a){const _0x54c80e=a99_0x35902a;Object[_0x54c80e(0x178)](_0x3c398f,_0x54c80e(0x171),{'value':_0x256a9a,'enumerable':!![]});}
|