@lovrabet/rabetbase-cli 2.5.1-beta.2 → 2.5.1-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/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- 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.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -16
- 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/kb-search-client.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +1 -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 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-config.md +1 -1
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +8 -7
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x50ec45=a83_0x5af5;(function(_0x109880,_0x154dd6){const _0x44718a=a83_0x5af5,_0x225dc6=_0x109880();while(!![]){try{const _0xc35acc=parseInt(_0x44718a(0xe4))/0x1+-parseInt(_0x44718a(0xe0))/0x2*(-parseInt(_0x44718a(0xca))/0x3)+parseInt(_0x44718a(0xde))/0x4+-parseInt(_0x44718a(0xd4))/0x5+parseInt(_0x44718a(0xdf))/0x6+parseInt(_0x44718a(0xc4))/0x7+parseInt(_0x44718a(0xbd))/0x8*(-parseInt(_0x44718a(0xd3))/0x9);if(_0xc35acc===_0x154dd6)break;else _0x225dc6['push'](_0x225dc6['shift']());}catch(_0x5df587){_0x225dc6['push'](_0x225dc6['shift']());}}}(a83_0x4b9c,0x90e75));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a83_0x50ec45(0xc0),a83_0x50ec45(0xd0),a83_0x50ec45(0xc8),'CANCELLED']);export const dbAnalyzeStatus={'service':'db','command':a83_0x50ec45(0xcf),'description':a83_0x50ec45(0xce),'risk':a83_0x50ec45(0xcc),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a83_0x50ec45(0xd9),'type':a83_0x50ec45(0xd7),'required':!![],'description':a83_0x50ec45(0xc1)}],async 'execute'(_0x47523a){const _0x22d97d=a83_0x50ec45,_0x3b943c=_0x47523a['num']('id'),_0x3495eb=_0x47523a['str'](_0x22d97d(0xd9)),_0x201f46=await getDbAnalysisStatus(_0x3495eb),_0x10531f=TERMINAL_STATUSES[_0x22d97d(0xe1)](_0x201f46[_0x22d97d(0xd1)]??''),{parsedJobContext:_0x7ecd71,jobContextParseWarning:_0x7dcd53}=parseJobContext(_0x201f46[_0x22d97d(0xc2)]),{requestedAnalysis:_0x1305b6,requestedAnalysisParseWarning:_0x119cf8}=parseRequestedAnalysis(_0x201f46[_0x22d97d(0xdc)]),_0x24db71=readAccumulatedErrorTypeCounts(_0x7ecd71),_0x19d7bb=calculateAttemptElapsedMs(_0x201f46,_0x10531f),_0x17c281=calculateElapsedFromStart(_0x201f46['firstStartTime'],_0x201f46[_0x22d97d(0xe6)],_0x10531f),_0x18500f=detectMultipleAttempts(_0x201f46),_0x41fd6a=buildDbPageLinks(_0x47523a[_0x22d97d(0xe2)],_0x3b943c);return{'ok':!![],'data':{'dbLinkId':_0x3b943c,'planId':_0x3495eb,'status':_0x201f46,'requestedAnalysis':_0x1305b6,'requestedAnalysisParseWarning':_0x119cf8,'parsedJobContext':_0x7ecd71,'accumulatedErrorTypeCounts':_0x24db71,'accumulatedErrorTypeCountsAdvisory':_0x24db71?'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.':_0x22d97d(0xbc),'isTerminal':_0x10531f,'isRetrying':_0x201f46[_0x22d97d(0xd1)]===_0x22d97d(0xe3),'attemptElapsedMs':_0x19d7bb,'totalElapsedMs':_0x17c281,'hasMultipleAttempts':_0x18500f,'jobContextParseWarning':_0x7dcd53,..._0x41fd6a?{'links':_0x41fd6a}:{}},'message':'Analysis\x20status\x20for\x20'+_0x3495eb};}};function a83_0x4b9c(){const _0x193606=['Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','jobContext','inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.','6602092BcvboE','now','every','accumulatedErrorTypeCounts','FAILED','isFinite','1263GgADYE','isNaN','read','isArray','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','analyze-status','PARTIAL_SUCCESS','status','length','9OSXxLg','5100610WZguMX','TARGETED','firstStartTime','string','startTime','plan','object','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','inputParams','FULL','1855440PrAdnZ','2164950kyvmil','3962gkUDUq','has','appCode','RETRYING','592276HKSghB','inputParams\x20is\x20not\x20an\x20object','endTime','UNKNOWN','keys','parse','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','12643768ISgBnT','trim','costTimeMs','SUCCESS'];a83_0x4b9c=function(){return _0x193606;};return a83_0x4b9c();}function parseRequestedAnalysis(_0x44ef43){const _0x4d5669=a83_0x50ec45,_0x2fa882={'mode':_0x4d5669(0xb9),'tableCount':null,'tableNames':null};if(!_0x44ef43?.[_0x4d5669(0xbe)]())return{'requestedAnalysis':_0x2fa882,'requestedAnalysisParseWarning':'Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.'};try{const _0x13ef5c=JSON[_0x4d5669(0xbb)](_0x44ef43);if(!_0x13ef5c||typeof _0x13ef5c!=='object'||Array[_0x4d5669(0xcd)](_0x13ef5c))throw new Error(_0x4d5669(0xe5));const _0x47ca8c=_0x13ef5c['tableNames'];if(_0x47ca8c===undefined||_0x47ca8c===null)return{'requestedAnalysis':{'mode':_0x4d5669(0xdd),'tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array['isArray'](_0x47ca8c)&&_0x47ca8c[_0x4d5669(0xc6)](_0x323d91=>typeof _0x323d91==='string'))return{'requestedAnalysis':{'mode':_0x47ca8c[_0x4d5669(0xd2)]>0x0?_0x4d5669(0xd5):_0x4d5669(0xdd),'tableCount':_0x47ca8c['length'],'tableNames':_0x47ca8c},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x2fa882,'requestedAnalysisParseWarning':_0x4d5669(0xc3)};}function readAccumulatedErrorTypeCounts(_0x491327){const _0x2fe6c6=a83_0x50ec45,_0x29f657=_0x491327?.[_0x2fe6c6(0xc7)];if(!_0x29f657||typeof _0x29f657!==_0x2fe6c6(0xda)||Array[_0x2fe6c6(0xcd)](_0x29f657))return null;if(Object[_0x2fe6c6(0xba)](_0x29f657)['length']===0x0)return null;return _0x29f657;}function parseJobContext(_0x1c9a89){const _0xf6322d=a83_0x50ec45;if(!_0x1c9a89?.[_0xf6322d(0xbe)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x4236f7=JSON[_0xf6322d(0xbb)](_0x1c9a89);if(_0x4236f7&&typeof _0x4236f7==='object'&&!Array[_0xf6322d(0xcd)](_0x4236f7))return{'parsedJobContext':_0x4236f7,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0xf6322d(0xdb)};}function a83_0x5af5(_0x5689d1,_0x357fa5){_0x5689d1=_0x5689d1-0xb9;const _0x4b9c8e=a83_0x4b9c();let _0x5af5d4=_0x4b9c8e[_0x5689d1];return _0x5af5d4;}function calculateAttemptElapsedMs(_0x354e20,_0x4a18b6){const _0x1df1d2=a83_0x50ec45;if(typeof _0x354e20[_0x1df1d2(0xbf)]==='number'&&Number[_0x1df1d2(0xc9)](_0x354e20[_0x1df1d2(0xbf)])&&_0x354e20[_0x1df1d2(0xbf)]>=0x0)return _0x354e20['costTimeMs'];return calculateElapsedFromStart(_0x354e20[_0x1df1d2(0xd8)],_0x354e20[_0x1df1d2(0xe6)],_0x4a18b6);}function calculateElapsedFromStart(_0x10cc41,_0x42c0fb,_0x5100f4){const _0x2691ec=a83_0x50ec45,_0x5b3f2c=toTimestamp(_0x10cc41);if(_0x5b3f2c===null)return null;const _0x115200=toTimestamp(_0x42c0fb),_0xcb3660=_0x115200??(_0x5100f4?null:Date[_0x2691ec(0xc5)]());if(_0xcb3660===null||_0xcb3660<_0x5b3f2c)return null;return _0xcb3660-_0x5b3f2c;}function detectMultipleAttempts(_0x52ce0b){const _0x340760=a83_0x50ec45,_0x56d075=toTimestamp(_0x52ce0b[_0x340760(0xd6)]),_0x1936f4=toTimestamp(_0x52ce0b['startTime']);return _0x56d075!==null&&_0x1936f4!==null&&_0x56d075!==_0x1936f4;}function toTimestamp(_0x19d8d0){const _0x1a75dc=a83_0x50ec45;if(typeof _0x19d8d0==='number')return Number[_0x1a75dc(0xc9)](_0x19d8d0)?_0x19d8d0:null;if(typeof _0x19d8d0!==_0x1a75dc(0xd7)||_0x19d8d0[_0x1a75dc(0xbe)]()==='')return null;const _0x202657=Number(_0x19d8d0);if(Number[_0x1a75dc(0xc9)](_0x202657))return _0x202657;const _0x373284=Date[_0x1a75dc(0xbb)](_0x19d8d0);return Number[_0x1a75dc(0xcb)](_0x373284)?null:_0x373284;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x1ab20c=a84_0xfcf6;function a84_0x463b(){const _0x244f9b=['Database\x20password','dbdesc','\x20and\x20started\x20analysis','skip-connection-test','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','trim',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','bool','590271YIQqAf','validation','join','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','4svArgG','username','Create\x20dblink','dburl','8.0','message','dbtype','/smartapi/dblink/create','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','string','write','9494010NzRyCG','27ETfKOP','208383sWrfdo','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','create','dbname','dbparam','dbversion','[redacted]','appCode','1543385MrimBa','POST','1123544mOZAvn','No\x20follow-up\x20analysis','Extra\x20JDBC-style\x20connection\x20parameters\x20string','901960rEkNDM','autostart','316673nTVxRn','30rseQVD','planId','Created\x20db\x20link\x20','str'];a84_0x463b=function(){return _0x244f9b;};return a84_0x463b();}(function(_0x2b0839,_0x5c345e){const _0x33fe14=a84_0xfcf6,_0x44dd70=_0x2b0839();while(!![]){try{const _0x35bfc1=-parseInt(_0x33fe14(0x16b))/0x1+-parseInt(_0x33fe14(0x169))/0x2+parseInt(_0x33fe14(0x179))/0x3*(-parseInt(_0x33fe14(0x14f))/0x4)+-parseInt(_0x33fe14(0x164))/0x5+parseInt(_0x33fe14(0x16c))/0x6*(parseInt(_0x33fe14(0x15c))/0x7)+-parseInt(_0x33fe14(0x166))/0x8*(-parseInt(_0x33fe14(0x15b))/0x9)+parseInt(_0x33fe14(0x15a))/0xa;if(_0x35bfc1===_0x5c345e)break;else _0x44dd70['push'](_0x44dd70['shift']());}catch(_0x5ada64){_0x44dd70['push'](_0x44dd70['shift']());}}}(a84_0x463b,0x3c2d8));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_0xfcf6(_0x4be0da,_0xa719ea){_0x4be0da=_0x4be0da-0x14f;const _0x463b8b=a84_0x463b();let _0xfcf6f4=_0x463b8b[_0x4be0da];return _0xfcf6f4;}export const dbCreate={'service':'db','command':a84_0x1ab20c(0x15e),'description':a84_0x1ab20c(0x17c),'risk':a84_0x1ab20c(0x159),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a84_0x1ab20c(0x158),'required':!![],'description':'Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server'},DB_TYPE_FLAG,{'name':'dbversion','type':a84_0x1ab20c(0x158),'description':a84_0x1ab20c(0x177),'default':a84_0x1ab20c(0x153)},{'name':a84_0x1ab20c(0x152),'type':a84_0x1ab20c(0x158),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a84_0x1ab20c(0x150),'type':a84_0x1ab20c(0x158),'required':!![],'description':'Database\x20username'},{'name':'password','type':a84_0x1ab20c(0x158),'required':!![],'description':a84_0x1ab20c(0x170)},{'name':a84_0x1ab20c(0x160),'type':a84_0x1ab20c(0x158),'description':a84_0x1ab20c(0x168)},{'name':a84_0x1ab20c(0x171),'type':'string','description':'Human-readable\x20description'},{'name':a84_0x1ab20c(0x16a),'type':'boolean','description':'After\x20create,\x20start\x20schema\x20analysis','default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x142bec){const _0x259d49=a84_0x1ab20c,_0x526b0b=_0x142bec[_0x259d49(0x16f)](_0x259d49(0x152))['trim']();if(!validateDbUrl(_0x526b0b))throw CliErrors[_0x259d49(0x17a)](_0x259d49(0x17d)+_0x526b0b+'\x22',_0x259d49(0x174));},async 'dryRun'(_0x2e8fc8){const _0x4ec458=a84_0x1ab20c,_0xfcc819={'appCode':_0x2e8fc8['appCode'],'dbName':_0x2e8fc8[_0x4ec458(0x16f)](_0x4ec458(0x15f)),'dbType':_0x2e8fc8[_0x4ec458(0x16f)](_0x4ec458(0x155)),'dbVersion':_0x2e8fc8[_0x4ec458(0x16f)](_0x4ec458(0x161))||_0x4ec458(0x153),'dbUrl':_0x2e8fc8[_0x4ec458(0x16f)]('dburl')[_0x4ec458(0x175)](),'username':_0x2e8fc8['str'](_0x4ec458(0x150)),'password':_0x4ec458(0x162),..._0x2e8fc8[_0x4ec458(0x16f)](_0x4ec458(0x160))?{'dbParam':_0x2e8fc8[_0x4ec458(0x16f)](_0x4ec458(0x160))}:{},..._0x2e8fc8[_0x4ec458(0x16f)](_0x4ec458(0x171))?{'dbDesc':_0x2e8fc8['str'](_0x4ec458(0x171))}:{}};return{'method':_0x4ec458(0x165),'url':_0x4ec458(0x156),'body':_0xfcc819,'description':[_0x4ec458(0x151),_0x2e8fc8['bool'](_0x4ec458(0x16a))?_0x4ec458(0x157):_0x4ec458(0x167)][_0x4ec458(0x17b)]('\x0a'),'connectionPreflight':{'enabled':!_0x2e8fc8['bool']('skip-connection-test'),'executed':![]}};},async 'execute'(_0x4b5cd){const _0x3b6c94=a84_0x1ab20c,_0x2a780f={'appCode':_0x4b5cd[_0x3b6c94(0x163)],'dbName':_0x4b5cd[_0x3b6c94(0x16f)](_0x3b6c94(0x15f)),'dbType':_0x4b5cd[_0x3b6c94(0x16f)](_0x3b6c94(0x155)),'dbVersion':_0x4b5cd[_0x3b6c94(0x16f)]('dbversion')||'8.0','dbUrl':_0x4b5cd[_0x3b6c94(0x16f)](_0x3b6c94(0x152))['trim'](),'username':_0x4b5cd[_0x3b6c94(0x16f)](_0x3b6c94(0x150)),'password':_0x4b5cd[_0x3b6c94(0x16f)]('password'),..._0x4b5cd[_0x3b6c94(0x16f)]('dbparam')?{'dbParam':_0x4b5cd[_0x3b6c94(0x16f)]('dbparam')}:{},..._0x4b5cd[_0x3b6c94(0x16f)]('dbdesc')?{'dbDesc':_0x4b5cd[_0x3b6c94(0x16f)](_0x3b6c94(0x171))}:{}};!_0x4b5cd[_0x3b6c94(0x178)](_0x3b6c94(0x173))&&await assertDbLinkConnectionPreflight(_0x2a780f);const {id:_0x54a21d,entity:_0x40148d}=normalizeEntityWithIdResponse(await createDbLink(_0x2a780f));if(!_0x54a21d)return{'ok':![],'message':_0x3b6c94(0x15d),'data':sanitizeDbLinkForOutput(_0x40148d)};let _0xcaac0d,_0x33a39b;if(_0x4b5cd['bool']('autostart'))try{_0xcaac0d=(await startDbAnalysis(_0x54a21d))[_0x3b6c94(0x16d)];}catch(_0x43eebe){_0x33a39b=_0x43eebe instanceof Error?_0x43eebe[_0x3b6c94(0x154)]:String(_0x43eebe);}const _0x49a67a=buildDbPageLinks(_0x4b5cd[_0x3b6c94(0x163)],_0x54a21d),_0x22abb4={'connection':sanitizeDbLinkForOutput(_0x40148d),..._0x49a67a?{'links':{'databasePage':_0x49a67a['databasePage']}}:{},..._0xcaac0d?{'analysisPlanId':_0xcaac0d}:{},..._0x33a39b?{'analysisStartWarning':_0x33a39b}:{}};let _0x1ea2f8;return _0x4b5cd[_0x3b6c94(0x178)](_0x3b6c94(0x16a))?_0x33a39b?_0x1ea2f8='Created\x20db\x20link\x20'+_0x54a21d+_0x3b6c94(0x176):_0x1ea2f8='Created\x20db\x20link\x20'+_0x54a21d+_0x3b6c94(0x172):_0x1ea2f8=_0x3b6c94(0x16e)+_0x54a21d,{'ok':!![],'data':_0x22abb4,'message':_0x1ea2f8};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0x11789c=a85_0x633a;(function(_0x1259e3,_0x1afe1f){const _0x3ee308=a85_0x633a,_0x5b4505=_0x1259e3();while(!![]){try{const _0xf0d288=parseInt(_0x3ee308(0x73))/0x1*(-parseInt(_0x3ee308(0x78))/0x2)+-parseInt(_0x3ee308(0x76))/0x3+parseInt(_0x3ee308(0x81))/0x4*(parseInt(_0x3ee308(0x8b))/0x5)+-parseInt(_0x3ee308(0x74))/0x6+-parseInt(_0x3ee308(0x84))/0x7*(-parseInt(_0x3ee308(0x91))/0x8)+parseInt(_0x3ee308(0x75))/0x9*(parseInt(_0x3ee308(0x85))/0xa)+parseInt(_0x3ee308(0x90))/0xb*(parseInt(_0x3ee308(0x94))/0xc);if(_0xf0d288===_0x1afe1f)break;else _0x5b4505['push'](_0x5b4505['shift']());}catch(_0xa84bc7){_0x5b4505['push'](_0x5b4505['shift']());}}}(a85_0x557e,0x2612f));import{deleteDbLink,getDbLinkInfo,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a85_0x633a(_0x447608,_0x5051e6){_0x447608=_0x447608-0x70;const _0x557e48=a85_0x557e();let _0x633ae5=_0x557e48[_0x447608];return _0x633ae5;}function a85_0x557e(){const _0xdb220f=['5692LgGQFk','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.','188167RSzhAD','395580MJLSWK','datasets','\x20active\x20DB_TABLE\x20Dataset(s).','/smartapi/dblink/delete','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value','Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count','645UlIVJZ','Expected\x20','confirm','\x20active\x20Dataset(s),\x20but\x20found\x20','\x20still\x20has\x20','11XirJWo','24BYnxGN','expected-dataset-count','number','4053732arogOc','DB_TABLE','num','isInteger','5484srHMLk','1099338VlwmWW','18ZrgGpS','302001FXPzHT','datasetDependency','88PbELoe','POST','Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.','all','validation','activeDatasetCount','appCode','Deleted\x20db\x20link\x20','bool'];a85_0x557e=function(){return _0xdb220f;};return a85_0x557e();}import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';const CONFIRM_FLAG={'name':a85_0x11789c(0x8d),'type':'boolean','description':a85_0x11789c(0x8a)},EXPECTED_DATASET_COUNT_FLAG={'name':a85_0x11789c(0x92),'type':a85_0x11789c(0x93),'description':a85_0x11789c(0x89)};export const dbDelete={'service':'db','command':'delete','description':'Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','risk':'high-risk-write','flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x23fa76){const _0xd1ccbc=a85_0x11789c,_0x25ff1a=await loadDeleteImpact(_0x23fa76);return assertExpectedDatasetCount(_0x23fa76,_0x25ff1a[_0xd1ccbc(0x77)]['activeDatasetCount']),{'method':_0xd1ccbc(0x79),'url':_0xd1ccbc(0x88),'body':{'id':_0x25ff1a['id']},'description':_0x25ff1a[_0xd1ccbc(0x77)]['activeDatasetCount']>0x0?'Deletion\x20is\x20blocked\x20by\x20'+_0x25ff1a[_0xd1ccbc(0x77)][_0xd1ccbc(0x7d)]+_0xd1ccbc(0x87):_0xd1ccbc(0x7a),..._0x25ff1a};},async 'execute'(_0x22e4e1){const _0x3c212f=a85_0x11789c;if(!_0x22e4e1[_0x3c212f(0x80)]('confirm'))throw CliErrors['validation']('--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.',_0x3c212f(0x82));const _0x121362=_0x22e4e1[_0x3c212f(0x71)]('id'),_0x51d8c4=await loadDeleteImpact(_0x22e4e1),_0x4c0323=_0x51d8c4['datasetDependency'][_0x3c212f(0x7d)];assertExpectedDatasetCount(_0x22e4e1,_0x4c0323);if(_0x4c0323>0x0)throw CliErrors[_0x3c212f(0x7c)]('Database\x20connection\x20'+_0x121362+_0x3c212f(0x8f)+_0x4c0323+'\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.','Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.');return await deleteDbLink(_0x121362),{'ok':!![],'data':{'id':_0x121362,'deleted':!![],'activeDatasetCount':_0x4c0323},'message':_0x3c212f(0x7f)+_0x121362};}};async function loadDeleteImpact(_0x1bc2e0){const _0x1ba782=a85_0x11789c,_0x33fe4d=_0x1bc2e0['num']('id'),[_0x339252,_0x2bf127]=await Promise[_0x1ba782(0x7b)]([getDbLinkInfo(_0x33fe4d),listDatasets(_0x1bc2e0[_0x1ba782(0x7e)],{'source':_0x1ba782(0x70)})]),_0x1756ee=buildDbDatasetDependency(_0x339252,_0x2bf127);return{'id':_0x33fe4d,'connection':sanitizeDbLinkForOutput(_0x339252),'datasetDependency':_0x1756ee['datasetDependency'],'activeDatasetCount':_0x1756ee[_0x1ba782(0x77)][_0x1ba782(0x7d)],'datasets':_0x1756ee[_0x1ba782(0x86)]};}function assertExpectedDatasetCount(_0x101b73,_0x31a987){const _0x568583=a85_0x11789c,_0x230ae1=_0x101b73['flag'](_0x568583(0x92));if(_0x230ae1===undefined||_0x230ae1==='')return;const _0xf5e955=_0x101b73['num'](_0x568583(0x92));if(!Number[_0x568583(0x72)](_0xf5e955)||_0xf5e955<0x0)throw CliErrors[_0x568583(0x7c)]('--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0xf5e955!==_0x31a987)throw CliErrors[_0x568583(0x7c)](_0x568583(0x8c)+_0xf5e955+_0x568583(0x8e)+_0x31a987+'.',_0x568583(0x83));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x30c28d=a86_0x4ef0;(function(_0x4b5ec4,_0x3e5030){const _0x4a9014=a86_0x4ef0,_0x3ed350=_0x4b5ec4();while(!![]){try{const _0x365014=-parseInt(_0x4a9014(0x137))/0x1*(parseInt(_0x4a9014(0x13c))/0x2)+parseInt(_0x4a9014(0x140))/0x3*(parseInt(_0x4a9014(0x142))/0x4)+parseInt(_0x4a9014(0x13d))/0x5+parseInt(_0x4a9014(0x135))/0x6*(parseInt(_0x4a9014(0x136))/0x7)+parseInt(_0x4a9014(0x13e))/0x8*(-parseInt(_0x4a9014(0x143))/0x9)+-parseInt(_0x4a9014(0x13f))/0xa+parseInt(_0x4a9014(0x134))/0xb;if(_0x365014===_0x3e5030)break;else _0x3ed350['push'](_0x3ed350['shift']());}catch(_0x569fee){_0x3ed350['push'](_0x3ed350['shift']());}}}(a86_0x18b5,0xa6d37));function a86_0x4ef0(_0xb01499,_0x26c39f){_0xb01499=_0xb01499-0x134;const _0x18b54e=a86_0x18b5();let _0x4ef002=_0x18b54e[_0xb01499];return _0x4ef002;}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';export const dbDetail={'service':'db','command':a86_0x30c28d(0x144),'description':a86_0x30c28d(0x13b),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x26b61f){const _0xc54b90=a86_0x30c28d,_0x3ec9ae=_0x26b61f[_0xc54b90(0x138)]('id'),_0x2033bd=await getDbLinkInfo(_0x3ec9ae),_0x4ebc08=await listDatasets(_0x2033bd[_0xc54b90(0x139)]||_0x26b61f['appCode'],{'source':'DB_TABLE'}),_0x2e2f87=buildDbDatasetDependency(_0x2033bd,_0x4ebc08);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0x2033bd),'datasetDependency':_0x2e2f87[_0xc54b90(0x13a)]},'message':_0xc54b90(0x141)+_0x3ec9ae+':\x20'+_0x2033bd['dbName']};}};function a86_0x18b5(){const _0x29b857=['166aTQFDE','633460IUoLaX','524496TkmKCg','8232610fDcHyo','3ghbHDe','db\x20link\x20','487660VbZViP','18kXzHXp','detail','19956321Shaumr','179202zfdLCM','217ppQqRB','16277yNslEZ','num','appCode','datasetDependency','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)'];a86_0x18b5=function(){return _0x29b857;};return a86_0x18b5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x1a6093=a87_0x1947;(function(_0x34e8b8,_0x436f7f){const _0xf2d1a4=a87_0x1947,_0x4c61e0=_0x34e8b8();while(!![]){try{const _0x5c541b=parseInt(_0xf2d1a4(0x12a))/0x1*(-parseInt(_0xf2d1a4(0x131))/0x2)+-parseInt(_0xf2d1a4(0x132))/0x3*(-parseInt(_0xf2d1a4(0x134))/0x4)+parseInt(_0xf2d1a4(0x12f))/0x5*(-parseInt(_0xf2d1a4(0x12e))/0x6)+parseInt(_0xf2d1a4(0x139))/0x7*(parseInt(_0xf2d1a4(0x138))/0x8)+-parseInt(_0xf2d1a4(0x137))/0x9+parseInt(_0xf2d1a4(0x128))/0xa*(parseInt(_0xf2d1a4(0x12d))/0xb)+parseInt(_0xf2d1a4(0x12c))/0xc;if(_0x5c541b===_0x436f7f)break;else _0x4c61e0['push'](_0x4c61e0['shift']());}catch(_0x292b4c){_0x4c61e0['push'](_0x4c61e0['shift']());}}}(a87_0x5276,0x9331f));import{startDbTableDiffRefresh}from'../../core/api-client.js';function a87_0x1947(_0x2fd642,_0x409c47){_0x2fd642=_0x2fd642-0x125;const _0x52769d=a87_0x5276();let _0x19472e=_0x52769d[_0x2fd642];return _0x19472e;}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a87_0x5276(){const _0x26eee9=['4TYuzBq','write','11477772cIGvpu','110DoARQF','129366nCbIOx','190EhrcUA','\x20--plan\x20','90080pYIlXt','118809XpWeyZ','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','8LCmIiO','Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','diff-refresh-start','4360689cbolQo','8URkMCM','227731sCVdeN','status','\x20db\x20diff-refresh-status\x20--id\x20','appCode','1018690ndnrYb','validation'];a87_0x5276=function(){return _0x26eee9;};return a87_0x5276();}import{CliErrors}from'../../errors.js';export const dbDiffRefreshStart={'service':'db','command':a87_0x1a6093(0x136),'description':a87_0x1a6093(0x135),'risk':a87_0x1a6093(0x12b),'flags':[DBLINK_ID_FLAG],async 'execute'(_0x1a4d35){const _0x3fbe55=a87_0x1a6093,_0x560a6f=_0x1a4d35['num']('id'),_0x406dc6=await startDbTableDiffRefresh(_0x1a4d35[_0x3fbe55(0x127)],_0x560a6f),_0x10c830=_0x406dc6['traceId']?.['trim']();if(!_0x10c830)throw CliErrors[_0x3fbe55(0x129)](_0x3fbe55(0x133));return{'ok':!![],'data':{'dbLinkId':_0x560a6f,'traceId':_0x10c830,'status':_0x406dc6[_0x3fbe55(0x125)]??null,'query':{'command':CLI_BIN_NAME+_0x3fbe55(0x126)+_0x560a6f+_0x3fbe55(0x130)+_0x10c830+'\x20--format\x20compress'}},'message':'Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20'+_0x560a6f};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x1a1da1=a88_0x5ba5;(function(_0x29e37b,_0xfa14d3){const _0x53a79e=a88_0x5ba5,_0x548055=_0x29e37b();while(!![]){try{const _0x4c1699=parseInt(_0x53a79e(0x158))/0x1+-parseInt(_0x53a79e(0x13d))/0x2+parseInt(_0x53a79e(0x142))/0x3+-parseInt(_0x53a79e(0x157))/0x4*(-parseInt(_0x53a79e(0x155))/0x5)+parseInt(_0x53a79e(0x13e))/0x6*(parseInt(_0x53a79e(0x144))/0x7)+parseInt(_0x53a79e(0x146))/0x8+-parseInt(_0x53a79e(0x14b))/0x9;if(_0x4c1699===_0xfa14d3)break;else _0x548055['push'](_0x548055['shift']());}catch(_0x269099){_0x548055['push'](_0x548055['shift']());}}}(a88_0x3fb0,0x41b5b));function a88_0x5ba5(_0x554fde,_0x5710dd){_0x554fde=_0x554fde-0x13d;const _0x3fb0c3=a88_0x3fb0();let _0x5ba5e7=_0x3fb0c3[_0x554fde];return _0x5ba5e7;}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([a88_0x1a1da1(0x14d),a88_0x1a1da1(0x143),a88_0x1a1da1(0x153)]),RUNNING_STATUSES=new Set([a88_0x1a1da1(0x140),a88_0x1a1da1(0x150),a88_0x1a1da1(0x14f)]);export const dbDiffRefreshStatus={'service':'db','command':a88_0x1a1da1(0x14c),'description':a88_0x1a1da1(0x159),'risk':a88_0x1a1da1(0x151),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a88_0x1a1da1(0x147),'type':a88_0x1a1da1(0x145),'required':!![],'description':a88_0x1a1da1(0x148)}],async 'execute'(_0x3fa636){const _0x1e5fbc=a88_0x1a1da1,_0x13b214=_0x3fa636[_0x1e5fbc(0x14e)]('id'),_0x50f3a2=_0x3fa636['str'](_0x1e5fbc(0x147)),_0x2603e1=await getDbAnalysisStatus(_0x50f3a2),_0x5a1aea=_0x2603e1[_0x1e5fbc(0x154)]??null,_0x527c54=TERMINAL_STATUSES[_0x1e5fbc(0x149)](_0x5a1aea??''),_0x288f51=_0x5a1aea===_0x1e5fbc(0x14d),_0x3fe93d=_0x527c54||RUNNING_STATUSES[_0x1e5fbc(0x149)](_0x5a1aea??'');return{'ok':!![],'data':{'dbLinkId':_0x13b214,'planId':_0x50f3a2,'status':_0x2603e1,'knownStatus':_0x3fe93d,'isTerminal':_0x527c54,'isSuccessful':_0x288f51,'query':_0x3fe93d&&!_0x527c54?{'command':CLI_BIN_NAME+_0x1e5fbc(0x14a)+_0x13b214+_0x1e5fbc(0x156)+_0x50f3a2+_0x1e5fbc(0x13f)}:null},'message':_0x1e5fbc(0x152)+_0x50f3a2+':\x20'+(_0x5a1aea??_0x1e5fbc(0x141))};}};function a88_0x3fb0(){const _0x419fdd=['SUCCESS','num','RETRYING','RUNNING','read','Table-diff\x20refresh\x20status\x20for\x20','CANCELLED','status','463585KlZNKC','\x20--plan\x20','12EUKgBn','531490wJOrem','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','552134eAdGKp','42nqEgkG','\x20--format\x20compress','PENDING','UNKNOWN','1309668XDpeiB','FAILED','498351dSeGQc','string','2851528eGcsQQ','plan','Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start','has','\x20db\x20diff-refresh-status\x20--id\x20','14001975vOBSKw','diff-refresh-status'];a88_0x3fb0=function(){return _0x419fdd;};return a88_0x3fb0();}
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x5e6482=a89_0x1d51;(function(_0xe80504,_0x4fe568){const _0x50917d=a89_0x1d51,_0x243c43=_0xe80504();while(!![]){try{const _0x8f028f=-parseInt(_0x50917d(0x119))/0x1+-parseInt(_0x50917d(0x103))/0x2*(-parseInt(_0x50917d(0x121))/0x3)+-parseInt(_0x50917d(0x101))/0x4+-parseInt(_0x50917d(0x107))/0x5*(parseInt(_0x50917d(0x10a))/0x6)+-parseInt(_0x50917d(0x124))/0x7*(parseInt(_0x50917d(0x116))/0x8)+-parseInt(_0x50917d(0x122))/0x9*(-parseInt(_0x50917d(0x108))/0xa)+parseInt(_0x50917d(0x12c))/0xb;if(_0x8f028f===_0x4fe568)break;else _0x243c43['push'](_0x243c43['shift']());}catch(_0x340fd6){_0x243c43['push'](_0x243c43['shift']());}}}(a89_0x5171,0xbf76c));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a89_0x5171(){const _0x3041ae=['boolean','20903454rzzAdV','fieldDiff','3567272kPYUME','string','296196xPeWrn','\x20(db\x20link\x20','bool','\x20changed\x20table\x20row(s),\x20total\x20','4285vtpQGM','10mfzaAd','datasetTableCount','8598uNfIwz','read','all','diffType','table','pagesize','page','filter','Page\x20size','map','summary','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','32xRHWri','appCode','Page\x20index\x20(1-based)','5818wkXPcr','deletedColumns','diff','num','totalCount','length','modifiedColumns','tableName','9DbKFAo','13026861fjvFvo','MODIFIED_TABLE','1543647yfmLYM','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','number','physicalTableCount','addedColumns','str','NEW_TABLE'];a89_0x5171=function(){return _0x3041ae;};return a89_0x5171();}function a89_0x1d51(_0x515c74,_0x50be93){_0x515c74=_0x515c74-0x101;const _0x51718c=a89_0x5171();let _0x1d5167=_0x51718c[_0x515c74];return _0x1d5167;}import{DB_TABLE_PAGE_SIZE,getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbDiff={'service':'db','command':a89_0x5e6482(0x11b),'description':a89_0x5e6482(0x125),'risk':a89_0x5e6482(0x10b),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a89_0x5e6482(0x10e),'type':a89_0x5e6482(0x102),'description':a89_0x5e6482(0x115)},{'name':a89_0x5e6482(0x110),'type':a89_0x5e6482(0x126),'description':a89_0x5e6482(0x118),'default':0x1},{'name':'pagesize','type':a89_0x5e6482(0x126),'description':a89_0x5e6482(0x112),'default':0x14},{'name':a89_0x5e6482(0x10c),'type':a89_0x5e6482(0x12b),'description':'Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)'}],async 'execute'(_0x41a1a5){const _0x10b620=a89_0x5e6482,_0x585b15=_0x41a1a5[_0x10b620(0x11c)]('id'),_0x29d970=_0x41a1a5[_0x10b620(0x105)](_0x10b620(0x10c)),_0x2e2c3e=_0x29d970?0x1:_0x41a1a5['num'](_0x10b620(0x110),0x1)||0x1,_0x14ba20=_0x29d970?DB_TABLE_PAGE_SIZE:_0x41a1a5['num'](_0x10b620(0x10f),0x14)||0x14,_0x175a79=_0x41a1a5[_0x10b620(0x129)](_0x10b620(0x10e))||undefined,_0x5b58d7=_0x29d970?await getAllDbTableDiff(getDbTableDiff,_0x41a1a5[_0x10b620(0x117)],_0x585b15,_0x175a79):await getDbTableDiff(_0x41a1a5[_0x10b620(0x117)],_0x585b15,{'pageIndex':_0x2e2c3e,'pageSize':_0x14ba20,'tableName':_0x175a79}),_0x19535c=_0x5b58d7['tableList'],_0x1ae457=summarizeDbTableDiff(_0x19535c),_0x4e9950=_0x19535c[_0x10b620(0x111)](_0x39442f=>_0x39442f[_0x10b620(0x10d)]===_0x10b620(0x12a)||_0x39442f[_0x10b620(0x10d)]==='MODIFIED_TABLE')[_0x10b620(0x113)](_0x12ba31=>_0x12ba31[_0x10b620(0x120)]),_0x3fc7cd=_0x19535c[_0x10b620(0x111)](_0x4e6285=>_0x4e6285[_0x10b620(0x10d)]==='DELETED_TABLE')[_0x10b620(0x113)](_0x40aadb=>_0x40aadb[_0x10b620(0x120)]),_0x4741e6=_0x19535c[_0x10b620(0x111)](_0x440386=>_0x440386[_0x10b620(0x10d)]===_0x10b620(0x123))['map'](_0x4786a0=>({'tableName':_0x4786a0[_0x10b620(0x120)],'addedColumns':_0x4786a0[_0x10b620(0x12d)]?.[_0x10b620(0x128)]??[],'deletedColumns':_0x4786a0[_0x10b620(0x12d)]?.[_0x10b620(0x11a)]??[],'modifiedColumns':_0x4786a0[_0x10b620(0x12d)]?.[_0x10b620(0x11f)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x585b15,'page':_0x2e2c3e,'pageSize':_0x14ba20,'totalCount':_0x5b58d7[_0x10b620(0x11d)],...typeof _0x5b58d7[_0x10b620(0x127)]==='number'?{'physicalTableCount':_0x5b58d7[_0x10b620(0x127)]}:{},...typeof _0x5b58d7[_0x10b620(0x109)]===_0x10b620(0x126)?{'datasetTableCount':_0x5b58d7['datasetTableCount']}:{},..._0x5b58d7[_0x10b620(0x114)]?{'summary':_0x5b58d7[_0x10b620(0x114)]}:{},'summaryByType':_0x1ae457,'toAnalyzeTables':_0x4e9950,'deletedTables':_0x3fc7cd,'modifiedFieldDiffs':_0x4741e6,'tables':_0x19535c},'message':_0x19535c[_0x10b620(0x11e)]+_0x10b620(0x106)+_0x5b58d7[_0x10b620(0x11d)]+_0x10b620(0x104)+_0x585b15+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x324d40,_0x232988){const _0x436d99=a90_0x3c43,_0x201369=_0x324d40();while(!![]){try{const _0x42e693=parseInt(_0x436d99(0x157))/0x1+-parseInt(_0x436d99(0x14f))/0x2*(-parseInt(_0x436d99(0x153))/0x3)+-parseInt(_0x436d99(0x150))/0x4+parseInt(_0x436d99(0x155))/0x5*(parseInt(_0x436d99(0x151))/0x6)+parseInt(_0x436d99(0x156))/0x7+-parseInt(_0x436d99(0x152))/0x8+-parseInt(_0x436d99(0x158))/0x9*(parseInt(_0x436d99(0x154))/0xa);if(_0x42e693===_0x232988)break;else _0x201369['push'](_0x201369['shift']());}catch(_0x3e0b28){_0x201369['push'](_0x201369['shift']());}}}(a90_0x2269,0x18afb));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';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';function a90_0x3c43(_0x8a9d6c,_0x367192){_0x8a9d6c=_0x8a9d6c-0x14f;const _0x2269c2=a90_0x2269();let _0x3c43ed=_0x2269c2[_0x8a9d6c];return _0x3c43ed;}function a90_0x2269(){const _0x404866=['640164KwzgLt','166448uuQxiV','477VuyJfV','494RYIhUq','82832RXCfwt','22566NVXjjZ','1297328zHhiWW','858JZzmmY','38920QKcuJm','215GGvtlD'];a90_0x2269=function(){return _0x404866;};return a90_0x2269();}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
|
-
function
|
|
1
|
+
function a91_0x473d(_0xf445d,_0x28e29d){_0xf445d=_0xf445d-0xf4;const _0x17dbe4=a91_0x17db();let _0x473d93=_0x17dbe4[_0xf445d];return _0x473d93;}const a91_0x26a3ce=a91_0x473d;(function(_0x25f1e7,_0x3e5bc3){const _0x57eb24=a91_0x473d,_0x171f8=_0x25f1e7();while(!![]){try{const _0x26baa5=-parseInt(_0x57eb24(0x107))/0x1+-parseInt(_0x57eb24(0x102))/0x2+parseInt(_0x57eb24(0x10a))/0x3+-parseInt(_0x57eb24(0xfb))/0x4*(parseInt(_0x57eb24(0x100))/0x5)+parseInt(_0x57eb24(0xfd))/0x6*(-parseInt(_0x57eb24(0x106))/0x7)+parseInt(_0x57eb24(0x109))/0x8*(-parseInt(_0x57eb24(0x105))/0x9)+parseInt(_0x57eb24(0xfc))/0xa;if(_0x26baa5===_0x3e5bc3)break;else _0x171f8['push'](_0x171f8['shift']());}catch(_0x25284d){_0x171f8['push'](_0x171f8['shift']());}}}(a91_0x17db,0x80f21));import{listDatasets,listDbLinks}from'../../core/api-client.js';function a91_0x17db(){const _0x485bb3=['158265rjSYJC','Page\x20size','52456xECoFZ','2132580AGoRje','length','num','Page\x20index\x20(1-based)','list','appCode','\x20database\x20connection(s)','Found\x20','number','8UANjGA','19369120HbysIR','150762JiXzLb','DB_TABLE','page','1300465OaNPER','datasetDependency','8544JhQSPo','read','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','1179CkpldR','161TcmREA'];a91_0x17db=function(){return _0x485bb3;};return a91_0x17db();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a91_0x26a3ce(0xf6),'description':'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','risk':a91_0x26a3ce(0x103),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':a91_0x26a3ce(0xfa),'description':a91_0x26a3ce(0xf5),'default':0x1},{'name':'pagesize','type':a91_0x26a3ce(0xfa),'description':a91_0x26a3ce(0x108),'default':0x64}],async 'execute'(_0x570d49){const _0x363076=a91_0x26a3ce,_0x1e7836=_0x570d49[_0x363076(0xf4)](_0x363076(0xff),0x1)||0x1,_0x5483ea=_0x570d49['num']('pagesize',0x64)||0x64,[{items:_0x2ef1be,paging:_0x3cd21c},_0x5249e8]=await Promise['all']([listDbLinks(_0x570d49['appCode'],{'currentPage':_0x1e7836,'pageSize':_0x5483ea}),listDatasets(_0x570d49[_0x363076(0xf7)],{'source':_0x363076(0xfe)})]),_0x39b2d4=_0x2ef1be['map'](_0x221512=>({...sanitizeDbLinkForOutput(_0x221512),'datasetDependency':buildDbDatasetDependency(_0x221512,_0x5249e8)[_0x363076(0x101)]})),_0x4cace5=_0x3cd21c?_0x3cd21c:{'currentPage':_0x1e7836,'pageSize':_0x5483ea,'rowsOnPage':_0x39b2d4['length'],'totalCount':null,'note':_0x363076(0x104)};return{'ok':!![],'data':{'connections':_0x39b2d4,'paging':_0x4cace5},'message':_0x363076(0xf9)+_0x39b2d4[_0x363076(0x10b)]+_0x363076(0xf8)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b2a55,_0x29952f){const _0xfc1586=a92_0x161b,_0x3ef856=_0x1b2a55();while(!![]){try{const _0x2c9953=parseInt(_0xfc1586(0x16c))/0x1+-parseInt(_0xfc1586(0x186))/0x2+parseInt(_0xfc1586(0x171))/0x3+-parseInt(_0xfc1586(0x181))/0x4+-parseInt(_0xfc1586(0x172))/0x5*(parseInt(_0xfc1586(0x18c))/0x6)+-parseInt(_0xfc1586(0x182))/0x7*(parseInt(_0xfc1586(0x17d))/0x8)+parseInt(_0xfc1586(0x173))/0x9*(parseInt(_0xfc1586(0x17b))/0xa);if(_0x2c9953===_0x29952f)break;else _0x3ef856['push'](_0x3ef856['shift']());}catch(_0x5872fe){_0x3ef856['push'](_0x3ef856['shift']());}}}(a92_0x3d7a,0xeb497));function a92_0x161b(_0x3a1142,_0x551bfd){_0x3a1142=_0x3a1142-0x16a;const _0x3d7aea=a92_0x3d7a();let _0x161bd4=_0x3d7aea[_0x3a1142];return _0x161bd4;}import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x33b97a){const _0x438a66=a92_0x161b,_0x194aca=_0x33b97a[_0x438a66(0x174)]();if(_0x194aca===_0x438a66(0x187)||_0x194aca===_0x438a66(0x177)||_0x194aca===_0x438a66(0x17c))return!![];if(_0x194aca['includes'](_0x438a66(0x18a))||_0x194aca[_0x438a66(0x176)]('token')||_0x194aca['includes'](_0x438a66(0x183)))return!![];if(_0x194aca[_0x438a66(0x176)](_0x438a66(0x184))||_0x194aca[_0x438a66(0x176)](_0x438a66(0x16a)))return!![];if(_0x194aca==='authorization'||_0x194aca===_0x438a66(0x18e)||_0x194aca===_0x438a66(0x175))return!![];return![];}export function sanitizeDbLinkForOutput(_0x225189){const _0x504f6d=a92_0x161b,_0x4e703f={..._0x225189};delete _0x4e703f[_0x504f6d(0x178)];for(const _0x5a93cc of Object[_0x504f6d(0x188)](_0x4e703f)){if(!shouldRedactKey(_0x5a93cc))continue;const _0x275b3e=_0x4e703f[_0x5a93cc];_0x275b3e!=null&&String(_0x275b3e)['length']>0x0&&(_0x4e703f[_0x5a93cc]='[redacted]');}return _0x4e703f;}function a92_0x3d7a(){const _0x43847f=['connectionstring','accesskey','/data/er?dbId=','758985FnTGXd','code','map','name','test','5597808icgcIW','770155sqdnka','9djZJcu','toLowerCase','jdbcurl','includes','passwd','hasAvailableDo','Database\x20connection\x20preflight\x20failed.','filter','23073850IGzsNx','dbpassword','179112lLCEIr','dbId','number','dbtableConfig','2894420BWzYrr','161kmwOQk','credential','privatekey','trim','2687480kfsFjZ','password','keys','isFinite','secret','apiError','54FxlHvG','/data/database'];a92_0x3d7a=function(){return _0x43847f;};return a92_0x3d7a();}export function sanitizeDbLinkList(_0x528de6){return _0x528de6['map'](_0x19b2fb=>sanitizeDbLinkForOutput(_0x19b2fb));}export function buildDbDatasetDependency(_0x4221dc,_0x25d5e6){const _0x4aeb07=a92_0x161b,_0x105932=_0x25d5e6[_0x4aeb07(0x17a)](_0x3f6e6c=>Number(_0x3f6e6c[_0x4aeb07(0x180)]?.[_0x4aeb07(0x17e)])===Number(_0x4221dc['id']))[_0x4aeb07(0x16e)](_0x239e55=>({'id':_0x239e55['id'],'code':_0x239e55[_0x4aeb07(0x16d)],'name':_0x239e55[_0x4aeb07(0x16f)],..._0x239e55[_0x4aeb07(0x180)]?.['tableName']?{'tableName':_0x239e55[_0x4aeb07(0x180)]['tableName']}:{}}));return{'datasetDependency':{'hasDependencies':_0x105932['length']>0x0,'activeDatasetCount':_0x105932['length']},'datasets':_0x105932};}export async function assertDbLinkConnectionPreflight(_0x5cb3da){const _0x2f9702=a92_0x161b,_0x431ad1=await testDbLinkConfigConnect(_0x5cb3da);if(_0x431ad1!==!![])throw CliErrors[_0x2f9702(0x18b)](_0x2f9702(0x179),'The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.');}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5442b7){const _0x235acd=a92_0x161b,_0x37ccf3=_0x5442b7['trim']();if(!_0x37ccf3)return![];return DB_URL_PATTERN[_0x235acd(0x170)](_0x37ccf3);}export function buildDbPageLinks(_0x27889e,_0xfbddb4){const _0x3680bc=a92_0x161b,_0x48eb85=_0x27889e?.['trim']();if(!_0x48eb85)return undefined;const _0x588099=typeof _0xfbddb4===_0x3680bc(0x17f)?String(_0xfbddb4):String(_0xfbddb4??'')[_0x3680bc(0x185)]();if(!_0x588099)return undefined;const _0x51ba94=Number(_0x588099);if(!Number[_0x3680bc(0x189)](_0x51ba94)||_0x51ba94<=0x0)return undefined;const _0x408215=getAppBaseUrl(_0x48eb85),_0x57b347=encodeURIComponent(String(_0x51ba94));return{'databasePage':_0x408215+_0x3680bc(0x18d),'erPage':_0x408215+_0x3680bc(0x16b)+_0x57b347};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x3c893b=a93_0x332a;(function(_0x49f807,_0x3c3c46){const _0x5b0a68=a93_0x332a,_0x2046b8=_0x49f807();while(!![]){try{const _0x435320=parseInt(_0x5b0a68(0x154))/0x1*(parseInt(_0x5b0a68(0x150))/0x2)+parseInt(_0x5b0a68(0x168))/0x3+parseInt(_0x5b0a68(0x164))/0x4*(parseInt(_0x5b0a68(0x14b))/0x5)+parseInt(_0x5b0a68(0x15d))/0x6*(-parseInt(_0x5b0a68(0x160))/0x7)+-parseInt(_0x5b0a68(0x155))/0x8*(parseInt(_0x5b0a68(0x153))/0x9)+-parseInt(_0x5b0a68(0x156))/0xa+parseInt(_0x5b0a68(0x163))/0xb;if(_0x435320===_0x3c3c46)break;else _0x2046b8['push'](_0x2046b8['shift']());}catch(_0x36f1ad){_0x2046b8['push'](_0x2046b8['shift']());}}}(a93_0x4d6b,0xc8e4b));import{CliErrors}from'../../errors.js';export const DB_TABLE_PAGE_SIZE=0x64;export const DB_TABLE_DIFF_TYPES=[a93_0x3c893b(0x166),a93_0x3c893b(0x159),a93_0x3c893b(0x162),a93_0x3c893b(0x165)];export function summarizeDbTableDiff(_0x4fe66b){const _0x3eae60=a93_0x3c893b;return Object[_0x3eae60(0x152)](DB_TABLE_DIFF_TYPES['map'](_0x481ce9=>[_0x481ce9,_0x4fe66b['filter'](_0x132f3=>_0x132f3[_0x3eae60(0x161)]===_0x481ce9)[_0x3eae60(0x15f)]]));}function a93_0x4d6b(){const _0x3292c8=['Incomplete\x20db\x20table\x20pagination:\x20collected\x20','MODIFIED_TABLE','physicalTableCount','set','\x20of\x20','12LstKHN','number','length','4873183Myudkw','diffType','DELETED_TABLE','28286170FgZtiP','10828HExOLv','ALREADY_ANALYZED','NEW_TABLE','values','3901683FrpjVa','375AHFuZi','tableName','totalCount','datasetTableCount','size','94IfWqdM','validation','fromEntries','36ieHuWo','12883tryrSw','2009104smJvxJ','14608080nwpEDJ','summary'];a93_0x4d6b=function(){return _0x3292c8;};return a93_0x4d6b();}function a93_0x332a(_0x51ff41,_0x582cf7){_0x51ff41=_0x51ff41-0x14b;const _0x4d6ba8=a93_0x4d6b();let _0x332aee=_0x4d6ba8[_0x51ff41];return _0x332aee;}export async function getAllDbTableDiff(_0x2440cb,_0x208c7c,_0x1b50a0,_0x54e4f0){const _0xd6fc7a=a93_0x3c893b,_0x35a4df=new Map();let _0x5d3954=0x1,_0xa96d20=null;while(!![]){_0xa96d20=await _0x2440cb(_0x208c7c,_0x1b50a0,{'pageIndex':_0x5d3954,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x54e4f0});const _0x2fa7f1=_0x35a4df[_0xd6fc7a(0x14f)];for(const _0x4be75e of _0xa96d20['tableList']){_0x35a4df[_0xd6fc7a(0x15b)](_0x4be75e[_0xd6fc7a(0x14c)],_0x4be75e);}if(_0x35a4df[_0xd6fc7a(0x14f)]>=_0xa96d20[_0xd6fc7a(0x14d)])break;if(_0xa96d20['tableList'][_0xd6fc7a(0x15f)]===0x0||_0x35a4df[_0xd6fc7a(0x14f)]===_0x2fa7f1)throw CliErrors[_0xd6fc7a(0x151)](_0xd6fc7a(0x158)+_0x35a4df[_0xd6fc7a(0x14f)]+_0xd6fc7a(0x15c)+_0xa96d20['totalCount']+'\x20row(s).');_0x5d3954+=0x1;}return{'totalCount':_0xa96d20?.['totalCount']??0x0,...typeof _0xa96d20?.[_0xd6fc7a(0x15a)]===_0xd6fc7a(0x15e)?{'physicalTableCount':_0xa96d20['physicalTableCount']}:{},...typeof _0xa96d20?.['datasetTableCount']===_0xd6fc7a(0x15e)?{'datasetTableCount':_0xa96d20[_0xd6fc7a(0x14e)]}:{},..._0xa96d20?.['summary']?{'summary':_0xa96d20[_0xd6fc7a(0x157)]}:{},'tableList':[..._0x35a4df[_0xd6fc7a(0x167)]()]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a94_0x299509=a94_0x4a31;function a94_0x4a31(_0x5c57c4,_0x4fdb6e){_0x5c57c4=_0x5c57c4-0x1c4;const _0x212090=a94_0x2120();let _0x4a3182=_0x212090[_0x5c57c4];return _0x4a3182;}(function(_0x426752,_0x47ac3d){const _0x143a5e=a94_0x4a31,_0x33eeba=_0x426752();while(!![]){try{const _0x57df53=parseInt(_0x143a5e(0x1c4))/0x1*(-parseInt(_0x143a5e(0x1c6))/0x2)+parseInt(_0x143a5e(0x1d5))/0x3+-parseInt(_0x143a5e(0x1d9))/0x4*(-parseInt(_0x143a5e(0x1d2))/0x5)+-parseInt(_0x143a5e(0x1c7))/0x6+-parseInt(_0x143a5e(0x1db))/0x7*(parseInt(_0x143a5e(0x1cd))/0x8)+parseInt(_0x143a5e(0x1c8))/0x9+parseInt(_0x143a5e(0x1d7))/0xa*(parseInt(_0x143a5e(0x1c5))/0xb);if(_0x57df53===_0x47ac3d)break;else _0x33eeba['push'](_0x33eeba['shift']());}catch(_0x30f800){_0x33eeba['push'](_0x33eeba['shift']());}}}(a94_0x2120,0x98785));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_0x299509(0x1d1),'risk':a94_0x299509(0x1dc),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a94_0x299509(0x1c9),'type':a94_0x299509(0x1cc),'description':a94_0x299509(0x1d0)}],async 'execute'(_0x4ad5d5){const _0x424094=a94_0x299509,_0x4f49f6=_0x4ad5d5[_0x424094(0x1d3)]('id'),_0x4d6fda=_0x4ad5d5[_0x424094(0x1ce)](_0x424094(0x1c9))||undefined,_0x252973=await getAllDbTableDiff(getDbTableComparisonPage,_0x4ad5d5[_0x424094(0x1d6)],_0x4f49f6,_0x4d6fda),_0x73d53d=_0x252973['tableList'];return{'ok':!![],'data':{'dbLinkId':_0x4f49f6,'totalCount':_0x252973[_0x424094(0x1d8)],...typeof _0x252973[_0x424094(0x1d4)]===_0x424094(0x1dd)?{'physicalTableCount':_0x252973[_0x424094(0x1d4)]}:{},...typeof _0x252973[_0x424094(0x1da)]===_0x424094(0x1dd)?{'datasetTableCount':_0x252973[_0x424094(0x1da)]}:{},..._0x252973['summary']?{'summary':_0x252973[_0x424094(0x1ca)]}:{},'summaryByType':summarizeDbTableDiff(_0x73d53d),'tables':_0x73d53d},'message':_0x73d53d[_0x424094(0x1cf)]+'\x20table\x20comparison\x20row(s),\x20total\x20'+_0x252973['totalCount']+_0x424094(0x1cb)+_0x4f49f6+')'};}};function a94_0x2120(){const _0x46801a=['number','20IobQDu','22TBnnwM','57066NCnyjB','6425976WaQKGM','5701590KCxeLb','table','summary','\x20(db\x20link\x20','string','8rsxDOt','str','length','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','75ltZVgS','num','physicalTableCount','2796897tdHGlP','appCode','1843130CaBgQu','totalCount','299060OwRtxF','datasetTableCount','5528159KWWBwY','read'];a94_0x2120=function(){return _0x46801a;};return a94_0x2120();}
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x20087a=a95_0xbf3f;function a95_0xbf3f(_0x4c8eb4,_0x334b9f){_0x4c8eb4=_0x4c8eb4-0xd7;const _0x4f0a8f=a95_0x4f0a();let _0xbf3f28=_0x4f0a8f[_0x4c8eb4];return _0xbf3f28;}(function(_0x106e32,_0x43718d){const _0x10efcd=a95_0xbf3f,_0x149017=_0x106e32();while(!![]){try{const _0xd2282d=-parseInt(_0x10efcd(0xee))/0x1*(parseInt(_0x10efcd(0xf0))/0x2)+parseInt(_0x10efcd(0xe1))/0x3*(-parseInt(_0x10efcd(0xec))/0x4)+parseInt(_0x10efcd(0xf1))/0x5*(parseInt(_0x10efcd(0xe2))/0x6)+parseInt(_0x10efcd(0xef))/0x7*(-parseInt(_0x10efcd(0xe5))/0x8)+parseInt(_0x10efcd(0xe7))/0x9+-parseInt(_0x10efcd(0xd9))/0xa*(-parseInt(_0x10efcd(0xe6))/0xb)+parseInt(_0x10efcd(0xda))/0xc;if(_0xd2282d===_0x43718d)break;else _0x149017['push'](_0x149017['shift']());}catch(_0x22d0d4){_0x149017['push'](_0x149017['shift']());}}}(a95_0x4f0a,0x61f7c));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a95_0x4f0a(){const _0x15a37e=['7147eUUqGy','10182CrwMWC','3870305bolaag','message','success','155160HkCUnE','7364904WrdzhG','test','object','msg','error','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','num','18djFbhw','6ejMiGc','length','\x20(see\x20data.result)','1832MsxvaE','495UrULgt','393633yOSjcv','Connection\x20check\x20finished\x20for\x20db\x20link\x20','keys','code','Connection\x20OK\x20for\x20db\x20link\x20','490744aDKKpC','slice','149iEoeWt'];a95_0x4f0a=function(){return _0x15a37e;};return a95_0x4f0a();}function summarizeTestConnectResult(_0x4bccc5){const _0x29fc82=a95_0xbf3f;if(_0x4bccc5===!![]||_0x4bccc5===![])return{'success':_0x4bccc5};if(_0x4bccc5===null||_0x4bccc5===undefined)return{'type':typeof _0x4bccc5};if(typeof _0x4bccc5!==_0x29fc82(0xdc))return{'type':typeof _0x4bccc5};const _0x15729d=_0x4bccc5,_0x410152=[_0x29fc82(0xd8),_0x29fc82(0xd7),_0x29fc82(0xea),_0x29fc82(0xde),_0x29fc82(0xdd),'data'],_0x2a0038={};for(const _0x2d2821 of _0x410152){if(_0x2d2821 in _0x15729d)_0x2a0038[_0x2d2821]=_0x15729d[_0x2d2821];}return Object[_0x29fc82(0xe9)](_0x2a0038)[_0x29fc82(0xe3)]===0x0&&(_0x2a0038['keys']=Object[_0x29fc82(0xe9)](_0x15729d)[_0x29fc82(0xed)](0x0,0x14)),_0x2a0038;}export const dbTest={'service':'db','command':a95_0x20087a(0xdb),'description':a95_0x20087a(0xdf),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1f1456){const _0xa5c8d5=a95_0x20087a,_0x58e57e=_0x1f1456[_0xa5c8d5(0xe0)]('id'),_0xdaba38=await testDbLinkConnect(_0x58e57e),_0x48be3f=_0xdaba38===!![]||typeof _0xdaba38==='object'&&_0xdaba38!==null&&_0xdaba38[_0xa5c8d5(0xd8)]===!![],_0x20424a=summarizeTestConnectResult(_0xdaba38);return{'ok':!![],'data':{'id':_0x58e57e,'connected':Boolean(_0x48be3f),'result':_0x20424a},'message':_0x48be3f?_0xa5c8d5(0xeb)+_0x58e57e:_0xa5c8d5(0xe8)+_0x58e57e+_0xa5c8d5(0xe4)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x2b46dd=a96_0x9f37;(function(_0x16551d,_0x521323){const _0x28cefd=a96_0x9f37,_0x21ea4d=_0x16551d();while(!![]){try{const _0x280938=parseInt(_0x28cefd(0xd4))/0x1*(parseInt(_0x28cefd(0xf9))/0x2)+-parseInt(_0x28cefd(0xed))/0x3*(-parseInt(_0x28cefd(0xd7))/0x4)+-parseInt(_0x28cefd(0xf1))/0x5*(-parseInt(_0x28cefd(0xe2))/0x6)+-parseInt(_0x28cefd(0xe6))/0x7*(parseInt(_0x28cefd(0xec))/0x8)+parseInt(_0x28cefd(0xfd))/0x9+-parseInt(_0x28cefd(0xe8))/0xa*(parseInt(_0x28cefd(0xe9))/0xb)+parseInt(_0x28cefd(0xef))/0xc*(-parseInt(_0x28cefd(0xdb))/0xd);if(_0x280938===_0x521323)break;else _0x21ea4d['push'](_0x21ea4d['shift']());}catch(_0x5e486d){_0x21ea4d['push'](_0x21ea4d['shift']());}}}(a96_0x44be,0xf1d3d));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';function a96_0x44be(){const _0xd34e3d=['trim','[redacted]','write','password','2305182pNjbdx','validation','POST','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','5123944yuqGJm','dbdesc','277580kPTRWe','638qTvsHX','New\x20description','dbname','16ZfaPGa','12639JhllGG','username','888XGVVGy','has','20yqARaD','Updated\x20db\x20link\x20','bool','string','New\x20username','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','dburl','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','183926Qilijl','num','dbparam','dbDesc','3836601YwJjvg','19tZCpig','str','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','940zzYWAm','dbParam','New\x20database\x20name','skip-connection-test','111722btsVSi','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','/smartapi/dblink/update'];a96_0x44be=function(){return _0xd34e3d;};return a96_0x44be();}import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';function a96_0x9f37(_0x1b6f16,_0x72dee8){_0x1b6f16=_0x1b6f16-0xd4;const _0x44befd=a96_0x44be();let _0x9f37cb=_0x44befd[_0x1b6f16];return _0x9f37cb;}const MASKED_PASSWORD_VALUES=new Set(['******',a96_0x2b46dd(0xdf)]);function mergeDbLinkUpdate(_0x5dd60d,_0x5105dc){const _0x2bbabc=a96_0x2b46dd,_0x5bb9bf={..._0x5dd60d},_0x6c8c38=_0x5105dc[_0x2bbabc(0xd5)]('password');if(_0x6c8c38&&MASKED_PASSWORD_VALUES['has'](_0x6c8c38))throw CliErrors[_0x2bbabc(0xe3)](_0x2bbabc(0xe5));if(!_0x6c8c38&&MASKED_PASSWORD_VALUES[_0x2bbabc(0xf0)](String(_0x5dd60d[_0x2bbabc(0xe1)]??'')))throw CliErrors['validation'](_0x2bbabc(0xf6));const _0x745ecf=_0x5105dc[_0x2bbabc(0xd5)]('dbname');if(_0x745ecf)_0x5bb9bf['dbName']=_0x745ecf;const _0x24b690=_0x5105dc[_0x2bbabc(0xd5)](_0x2bbabc(0xf7));if(_0x24b690)_0x5bb9bf['dbUrl']=_0x24b690[_0x2bbabc(0xde)]();const _0x1b2156=_0x5105dc[_0x2bbabc(0xd5)](_0x2bbabc(0xee));if(_0x1b2156)_0x5bb9bf['username']=_0x1b2156;if(_0x6c8c38)_0x5bb9bf[_0x2bbabc(0xe1)]=_0x6c8c38;const _0x19145f=_0x5105dc[_0x2bbabc(0xd5)](_0x2bbabc(0xfb));if(_0x19145f)_0x5bb9bf[_0x2bbabc(0xd8)]=_0x19145f;const _0x209819=_0x5105dc[_0x2bbabc(0xd5)](_0x2bbabc(0xe7));if(_0x209819)_0x5bb9bf[_0x2bbabc(0xfc)]=_0x209819;return _0x5bb9bf;}export const dbUpdate={'service':'db','command':'update','description':a96_0x2b46dd(0xf8),'risk':a96_0x2b46dd(0xe0),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a96_0x2b46dd(0xeb),'type':a96_0x2b46dd(0xf4),'description':a96_0x2b46dd(0xd9)},{'name':'dburl','type':a96_0x2b46dd(0xf4),'description':'New\x20host:port'},{'name':a96_0x2b46dd(0xee),'type':a96_0x2b46dd(0xf4),'description':a96_0x2b46dd(0xf5)},{'name':a96_0x2b46dd(0xe1),'type':a96_0x2b46dd(0xf4),'description':a96_0x2b46dd(0xd6)},{'name':'dbparam','type':a96_0x2b46dd(0xf4),'description':'New\x20connection\x20parameter\x20string'},{'name':'dbdesc','type':a96_0x2b46dd(0xf4),'description':a96_0x2b46dd(0xea)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x2b9b1a){const _0x1e1695=a96_0x2b46dd,_0xfa5274=_0x2b9b1a[_0x1e1695(0xd5)](_0x1e1695(0xf7));if(_0xfa5274&&!validateDbUrl(_0xfa5274[_0x1e1695(0xde)]()))throw CliErrors[_0x1e1695(0xe3)]('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0xfa5274+'\x22');},async 'dryRun'(_0x364ebd){const _0x46a55b=a96_0x2b46dd,_0x154bc4=_0x364ebd[_0x46a55b(0xfa)]('id'),_0x381eae=await getDbLinkInfo(_0x154bc4),_0x206a63=mergeDbLinkUpdate(_0x381eae,_0x364ebd),_0x3930bb=sanitizeDbLinkForOutput(_0x206a63);return{'method':_0x46a55b(0xe4),'url':_0x46a55b(0xdd),'body':_0x3930bb,'description':_0x46a55b(0xdc),'connectionPreflight':{'enabled':!_0x364ebd[_0x46a55b(0xf3)]('skip-connection-test'),'executed':![]}};},async 'execute'(_0x3881ca){const _0x598117=a96_0x2b46dd,_0x9a4bf7=_0x3881ca[_0x598117(0xfa)]('id'),_0x3ace2d=await getDbLinkInfo(_0x9a4bf7),_0x31ae5a=mergeDbLinkUpdate(_0x3ace2d,_0x3881ca);!_0x3881ca[_0x598117(0xf3)](_0x598117(0xda))&&await assertDbLinkConnectionPreflight(_0x31ae5a);const {id:_0x3a3c61,entity:_0x334092}=normalizeEntityWithIdResponse(await updateDbLink(_0x31ae5a));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x334092),'message':_0x598117(0xf2)+(_0x3a3c61??_0x9a4bf7)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f7da8,_0x24d158){const _0x3a1710=a97_0x58ee,_0x41d130=_0x1f7da8();while(!![]){try{const _0x11e237=-parseInt(_0x3a1710(0x11d))/0x1+parseInt(_0x3a1710(0x104))/0x2*(-parseInt(_0x3a1710(0x101))/0x3)+parseInt(_0x3a1710(0x10e))/0x4+-parseInt(_0x3a1710(0x124))/0x5+-parseInt(_0x3a1710(0xfb))/0x6+parseInt(_0x3a1710(0x11b))/0x7+-parseInt(_0x3a1710(0x107))/0x8*(-parseInt(_0x3a1710(0xf9))/0x9);if(_0x11e237===_0x24d158)break;else _0x41d130['push'](_0x41d130['shift']());}catch(_0x425378){_0x41d130['push'](_0x41d130['shift']());}}}(a97_0x1540,0x2b5de));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';import{validateDeploymentSyncProfile}from'../../config/deployment-sync.js';const MAX_SYNC_CODES=0x64;export function validateAutomaticDeploymentSync(_0x415b02){const _0x476e66=resolveRawDeploymentSyncProfile(_0x415b02);if(_0x476e66!==undefined)validateDeploymentSyncProfile(_0x476e66);}export function buildAutomaticDeploymentSyncPreview(_0x47d770,_0x4a93fb,_0x5d4673){const _0x39d3de=a97_0x58ee,_0x2baf20=resolveRawDeploymentSyncProfile(_0x47d770),_0x590f08=normalizeCodes(_0x5d4673);if(_0x2baf20===undefined)return{'configured':![],'wouldAttempt':![],'status':_0x39d3de(0x105),'bizType':_0x4a93fb,'bizCodes':_0x590f08};const _0x4c3d38=validateDeploymentSyncProfile(_0x2baf20),_0x59c825=_0x590f08[_0x39d3de(0x110)]>0x0;return{'configured':!![],'wouldAttempt':_0x59c825,'status':_0x59c825?_0x39d3de(0x10a):_0x39d3de(0x106),'bizType':_0x4a93fb,'bizCodes':_0x590f08,'dbLinkId':_0x4c3d38[_0x39d3de(0x111)],'targetEnv':_0x4c3d38[_0x39d3de(0x10f)]};}function a97_0x1540(){const _0x123989=['--db-id','status','map','some','filter','action','134071jtUNei','outcome_unknown','260005qiXnrP','find','deploymentSync','skipped_primary_failed','FAILED','deployment','--codes','487920slgYDf','replace','message','Automatic\x20deployment\x20sync\x20supports\x20at\x20most\x20','11349aHmSbx','apps','281286kLtwXp','join','appcode','\x20codes;\x20run\x20deployment\x20sync\x20manually\x20in\x20batches.','--confirm','configured','1278Glquol','partial_failure','mergedCli','1608sMCJJn','not_configured','not_needed','5360kDQFyW','currentApp','\x27\x5c\x27\x27','would_sync','trim','appCode','--target-env','242324GjCiQq','targetEnv','length','dbLinkId','failed','selectedAppName','--type'];a97_0x1540=function(){return _0x123989;};return a97_0x1540();}export async function runAutomaticDeploymentSync(_0x3ea1c3,_0x5d41cd,_0x4303c2,_0x3e73bc){const _0x487340=a97_0x58ee,_0x23f374=resolveRawDeploymentSyncProfile(_0x3ea1c3),_0x539db8=normalizeCodes(_0x4303c2);if(_0x23f374===undefined)return{'configured':![],'attempted':![],'status':'not_configured','bizType':_0x5d41cd,'bizCodes':_0x539db8};const _0x285fe6=validateDeploymentSyncProfile(_0x23f374),_0x2e8970={'configured':!![],'bizType':_0x5d41cd,'bizCodes':_0x539db8,'dbLinkId':_0x285fe6[_0x487340(0x111)],'targetEnv':_0x285fe6['targetEnv']};if(!_0x3e73bc)return{..._0x2e8970,'attempted':![],'status':_0x487340(0x120)};if(_0x539db8[_0x487340(0x110)]===0x0)return{..._0x2e8970,'attempted':![],'status':_0x487340(0x106)};if(_0x539db8[_0x487340(0x110)]>MAX_SYNC_CODES)return{..._0x2e8970,'attempted':![],'status':'failed','error':_0x487340(0x127)+MAX_SYNC_CODES+_0x487340(0xfe)};try{const {items:_0x198773}=await syncDeploymentMetadata({'appCode':_0x3ea1c3['appCode'],'dbLinkId':_0x285fe6['dbLinkId'],'env':_0x285fe6['targetEnv'],'bizType':_0x5d41cd,'bizCodes':_0x539db8}),_0x29ce3a=_0x198773[_0x487340(0x118)](_0x5bdf2a=>_0x5bdf2a[_0x487340(0x11a)]===_0x487340(0x121)),_0x2d6d12=new Set(_0x198773[_0x487340(0x119)](_0x32524a=>_0x32524a[_0x487340(0x11a)]===_0x487340(0x121))['map'](_0x2840ae=>_0x2840ae['bizCode'])),_0x28f0c9=_0x539db8[_0x487340(0x119)](_0x5a2742=>_0x2d6d12['has'](_0x5a2742));return{..._0x2e8970,'attempted':!![],'status':_0x29ce3a?_0x487340(0x102):'succeeded','items':_0x198773,..._0x29ce3a&&_0x28f0c9[_0x487340(0x110)]>0x0?{'recoveryCommand':buildRecoveryCommand(_0x3ea1c3[_0x487340(0x10c)],_0x285fe6[_0x487340(0x111)],_0x285fe6[_0x487340(0x10f)],_0x5d41cd,_0x28f0c9)}:{}};}catch(_0x46cbb4){return{..._0x2e8970,'attempted':!![],'status':isPlatformTransportFailure(_0x46cbb4)?_0x487340(0x11c):_0x487340(0x112),'recoveryCommand':buildRecoveryCommand(_0x3ea1c3[_0x487340(0x10c)],_0x285fe6[_0x487340(0x111)],_0x285fe6[_0x487340(0x10f)],_0x5d41cd,_0x539db8),'error':_0x46cbb4 instanceof Error?_0x46cbb4[_0x487340(0x126)]:String(_0x46cbb4)};}}function normalizeCodes(_0x1eca76){const _0x4b953e=a97_0x58ee;return[...new Set(_0x1eca76[_0x4b953e(0x117)](_0x499776=>_0x499776[_0x4b953e(0x10b)]())[_0x4b953e(0x119)](Boolean))];}export function automaticDeploymentSyncSucceeded(_0x53fe97){const _0xb830c7=a97_0x58ee;return!_0x53fe97[_0xb830c7(0x100)]||_0x53fe97[_0xb830c7(0x116)]===_0xb830c7(0x106)||_0x53fe97[_0xb830c7(0x116)]===_0xb830c7(0x120)||_0x53fe97[_0xb830c7(0x116)]==='succeeded';}function a97_0x58ee(_0x4ee329,_0x2ee485){_0x4ee329=_0x4ee329-0xf9;const _0x154003=a97_0x1540();let _0x58ee22=_0x154003[_0x4ee329];return _0x58ee22;}function resolveRawDeploymentSyncProfile(_0x3a087a){const _0x43af1d=a97_0x58ee,_0x3418b1=_0x3a087a['mergedCli']?.[_0x43af1d(0xfa)]??{},_0x563d02=_0x3a087a[_0x43af1d(0x113)]||_0x3a087a[_0x43af1d(0x103)]?.[_0x43af1d(0x108)]||_0x3a087a[_0x43af1d(0x103)]?.['defaultApp'];if(_0x563d02&&_0x3418b1[_0x563d02]?.['appcode']===_0x3a087a[_0x43af1d(0x10c)])return _0x3418b1[_0x563d02]?.[_0x43af1d(0x11f)];const _0x16de89=Object['values'](_0x3418b1)[_0x43af1d(0x11e)](_0x579d09=>_0x579d09?.[_0x43af1d(0xfd)]===_0x3a087a[_0x43af1d(0x10c)]);return _0x16de89?.[_0x43af1d(0x11f)];}function buildRecoveryCommand(_0x43be4e,_0x19b25e,_0xc3e128,_0x23c95d,_0x436617){const _0x2aef4e=a97_0x58ee;return[CLI_BIN_NAME,_0x2aef4e(0x122),'sync','--appcode',shellArg(_0x43be4e),_0x2aef4e(0x115),String(_0x19b25e),_0x2aef4e(0x10d),shellArg(_0xc3e128),_0x2aef4e(0x114),shellArg(_0x23c95d),_0x2aef4e(0x123),shellArg(_0x436617[_0x2aef4e(0xfc)](',')),_0x2aef4e(0xff)]['join']('\x20');}function shellArg(_0x2c17a7){const _0x1067bb=a97_0x58ee;return/^[A-Za-z0-9._:/,-]+$/['test'](_0x2c17a7)?_0x2c17a7:'\x27'+_0x2c17a7[_0x1067bb(0x125)](/'/g,_0x1067bb(0x109))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a98_0x4905(){const _0x30d6e0=['194929nFuKCa','226032HxUMtb','7dNXxmZ','221835NMQsWN','800628VIRqDX','5ziLkWF','302570YxBhNi','1598058JpQaBw','1330290UhQBgO'];a98_0x4905=function(){return _0x30d6e0;};return a98_0x4905();}function a98_0x509f(_0x204c27,_0x38cd60){_0x204c27=_0x204c27-0xd1;const _0x490527=a98_0x4905();let _0x509fdd=_0x490527[_0x204c27];return _0x509fdd;}(function(_0x40373d,_0x105860){const _0x12e22b=a98_0x509f,_0x3dcc1c=_0x40373d();while(!![]){try{const _0x1e3ec6=-parseInt(_0x12e22b(0xd2))/0x1+parseInt(_0x12e22b(0xd8))/0x2+-parseInt(_0x12e22b(0xd5))/0x3+parseInt(_0x12e22b(0xd6))/0x4+parseInt(_0x12e22b(0xd7))/0x5*(parseInt(_0x12e22b(0xd1))/0x6)+-parseInt(_0x12e22b(0xd4))/0x7*(-parseInt(_0x12e22b(0xd3))/0x8)+-parseInt(_0x12e22b(0xd9))/0x9;if(_0x1e3ec6===_0x105860)break;else _0x3dcc1c['push'](_0x3dcc1c['shift']());}catch(_0x56c117){_0x3dcc1c['push'](_0x3dcc1c['shift']());}}}(a98_0x4905,0x25d5f));import{deploymentSync}from'../../commands/deployment/sync.js';export const deploymentDefinitions=[deploymentSync];
|