@lovrabet/rabetbase-cli 2.5.1-beta.1 → 2.5.1-beta.3

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.
Files changed (326) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.d.ts +1 -1
  56. package/lib/commands/config/init.js +1 -1
  57. package/lib/commands/config/list.js +1 -1
  58. package/lib/commands/config/set.js +1 -1
  59. package/lib/commands/config/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-restore.d.ts +107 -0
  67. package/lib/commands/dataset/field-restore.js +1 -0
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/dataset/user-deleted-field-list.d.ts +36 -0
  82. package/lib/commands/dataset/user-deleted-field-list.js +1 -0
  83. package/lib/commands/db/analysis-batching.js +1 -1
  84. package/lib/commands/db/analyze-batch-plan.js +1 -1
  85. package/lib/commands/db/analyze-cancel.js +1 -1
  86. package/lib/commands/db/analyze-start.js +1 -1
  87. package/lib/commands/db/analyze-status.js +1 -1
  88. package/lib/commands/db/create.js +1 -1
  89. package/lib/commands/db/delete.js +1 -1
  90. package/lib/commands/db/detail.js +1 -1
  91. package/lib/commands/db/diff-refresh-start.js +1 -1
  92. package/lib/commands/db/diff-refresh-status.js +1 -1
  93. package/lib/commands/db/diff.js +1 -1
  94. package/lib/commands/db/index.js +1 -1
  95. package/lib/commands/db/list.js +1 -1
  96. package/lib/commands/db/shared.js +1 -1
  97. package/lib/commands/db/table-diff-shared.js +1 -1
  98. package/lib/commands/db/tables.js +1 -1
  99. package/lib/commands/db/test.js +1 -1
  100. package/lib/commands/db/update.js +1 -1
  101. package/lib/commands/deployment/auto-sync.d.ts +28 -0
  102. package/lib/commands/deployment/auto-sync.js +1 -0
  103. package/lib/commands/deployment/index.d.ts +2 -0
  104. package/lib/commands/deployment/index.js +1 -0
  105. package/lib/commands/deployment/sync.d.ts +2 -0
  106. package/lib/commands/deployment/sync.js +1 -0
  107. package/lib/commands/doctor.js +1 -1
  108. package/lib/commands/file/index.js +1 -1
  109. package/lib/commands/issue/index.js +1 -1
  110. package/lib/commands/issue/nudge.js +1 -1
  111. package/lib/commands/issue/report.js +1 -1
  112. package/lib/commands/issue/shared.js +1 -1
  113. package/lib/commands/kb/create.js +1 -1
  114. package/lib/commands/kb/delete.js +1 -1
  115. package/lib/commands/kb/detail.js +1 -1
  116. package/lib/commands/kb/index.js +1 -1
  117. package/lib/commands/kb/list.js +1 -1
  118. package/lib/commands/kb/search.js +1 -1
  119. package/lib/commands/kb/shared.js +1 -1
  120. package/lib/commands/kb/update.js +1 -1
  121. package/lib/commands/logs/index.js +1 -1
  122. package/lib/commands/menu/asset-update.js +1 -1
  123. package/lib/commands/menu/delete.js +1 -1
  124. package/lib/commands/menu/external-link-create.js +1 -1
  125. package/lib/commands/menu/external-link-update.js +1 -1
  126. package/lib/commands/menu/group-create.js +1 -1
  127. package/lib/commands/menu/group-update.js +1 -1
  128. package/lib/commands/menu/index.js +1 -1
  129. package/lib/commands/menu/list.js +1 -1
  130. package/lib/commands/menu/move.js +1 -1
  131. package/lib/commands/menu/regroup-start.js +1 -1
  132. package/lib/commands/menu/rename.js +1 -1
  133. package/lib/commands/menu/shared/compare-table.js +1 -1
  134. package/lib/commands/menu/shared/delete-plan.js +1 -1
  135. package/lib/commands/menu/shared/facts.js +1 -1
  136. package/lib/commands/menu/shared/index.js +1 -1
  137. package/lib/commands/menu/shared/inquirer.js +1 -1
  138. package/lib/commands/menu/shared/local-pages.js +1 -1
  139. package/lib/commands/menu/shared/logic.js +1 -1
  140. package/lib/commands/menu/shared/mutations.js +1 -1
  141. package/lib/commands/menu/shared/service.js +1 -1
  142. package/lib/commands/menu/shared/sync-core.js +1 -1
  143. package/lib/commands/menu/shared/update-core.js +1 -1
  144. package/lib/commands/menu/shared/valid-url.js +1 -1
  145. package/lib/commands/menu/sync.js +1 -1
  146. package/lib/commands/menu/visibility-update.js +1 -1
  147. package/lib/commands/notification/config-create.js +1 -1
  148. package/lib/commands/notification/config-delete.js +1 -1
  149. package/lib/commands/notification/config-list.js +1 -1
  150. package/lib/commands/notification/config-update.js +1 -1
  151. package/lib/commands/notification/index.js +1 -1
  152. package/lib/commands/notification/shared.js +1 -1
  153. package/lib/commands/ocr/index.js +1 -1
  154. package/lib/commands/page/create.js +1 -1
  155. package/lib/commands/page/custom/detail.js +1 -1
  156. package/lib/commands/page/custom/list.js +1 -1
  157. package/lib/commands/page/custom/publish.js +1 -1
  158. package/lib/commands/page/custom/shared.js +1 -1
  159. package/lib/commands/page/custom/syntax.js +1 -1
  160. package/lib/commands/page/custom/template.js +1 -1
  161. package/lib/commands/page/custom/update.js +1 -1
  162. package/lib/commands/page/data-list-status.js +1 -1
  163. package/lib/commands/page/generate-start.js +1 -1
  164. package/lib/commands/page/generate-status.js +1 -1
  165. package/lib/commands/page/index.js +1 -1
  166. package/lib/commands/page/pull.js +1 -1
  167. package/lib/commands/page/push.js +1 -1
  168. package/lib/commands/page/relation-audit.js +1 -1
  169. package/lib/commands/page/restore.js +1 -1
  170. package/lib/commands/page/shared.js +1 -1
  171. package/lib/commands/page/sync.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.js +1 -1
  175. package/lib/commands/project/create/materialize-project-template.js +1 -1
  176. package/lib/commands/project/create/project-name.js +1 -1
  177. package/lib/commands/project/create/project-template-archive.js +1 -1
  178. package/lib/commands/project/create/project-template-path.js +1 -1
  179. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  180. package/lib/commands/project/create/use-format-code.js +1 -1
  181. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  182. package/lib/commands/project/index.js +1 -1
  183. package/lib/commands/project/upgrade.js +1 -1
  184. package/lib/commands/registry.js +1 -1
  185. package/lib/commands/role/delete.js +1 -1
  186. package/lib/commands/role/detail.js +1 -1
  187. package/lib/commands/role/index.js +1 -1
  188. package/lib/commands/role/list.js +1 -1
  189. package/lib/commands/role/shared.js +1 -1
  190. package/lib/commands/role/update.js +1 -1
  191. package/lib/commands/role/user-add.js +1 -1
  192. package/lib/commands/role/user-remove.js +1 -1
  193. package/lib/commands/role/user-resolve.js +1 -1
  194. package/lib/commands/run/index.js +1 -1
  195. package/lib/commands/schema.js +1 -1
  196. package/lib/commands/sql/create.js +1 -1
  197. package/lib/commands/sql/delete.js +1 -1
  198. package/lib/commands/sql/detail.js +1 -1
  199. package/lib/commands/sql/exec.js +1 -1
  200. package/lib/commands/sql/index.js +1 -1
  201. package/lib/commands/sql/list.js +1 -1
  202. package/lib/commands/sql/pull.js +1 -1
  203. package/lib/commands/sql/push.js +1 -1
  204. package/lib/commands/sql/shared.js +1 -1
  205. package/lib/commands/sql/status.js +1 -1
  206. package/lib/commands/sql/validate.js +1 -1
  207. package/lib/commands/task/index.js +1 -1
  208. package/lib/commands/task/status.js +1 -1
  209. package/lib/commands/tenant/index.js +1 -1
  210. package/lib/commands/tenant/members-list.js +1 -1
  211. package/lib/commands/tenant/shared.js +1 -1
  212. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  213. package/lib/commands/user-account/index.js +1 -1
  214. package/lib/commands/workspace/add.js +1 -1
  215. package/lib/commands/workspace/index.js +1 -1
  216. package/lib/commands/workspace/remove.js +1 -1
  217. package/lib/config/deployment-sync.d.ts +10 -0
  218. package/lib/config/deployment-sync.js +1 -0
  219. package/lib/config/domain-config.d.ts +1 -1
  220. package/lib/config/domain-config.js +1 -1
  221. package/lib/config/project-routing.js +1 -1
  222. package/lib/config/schema.d.ts +1 -1
  223. package/lib/config/schema.js +1 -1
  224. package/lib/constant/cdn.js +1 -1
  225. package/lib/constant/cli.js +1 -1
  226. package/lib/constant/defaults.js +1 -1
  227. package/lib/constant/domain.d.ts +2 -0
  228. package/lib/constant/domain.js +1 -1
  229. package/lib/constant/env.js +1 -1
  230. package/lib/constant/output.js +1 -1
  231. package/lib/constant/paths.js +1 -1
  232. package/lib/constant/region.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/constant/routing-profile.js +1 -1
  235. package/lib/context/app-resolver.d.ts +2 -0
  236. package/lib/context/app-resolver.js +1 -1
  237. package/lib/context/auth-resolver.js +1 -1
  238. package/lib/context/config-loader.js +1 -1
  239. package/lib/context.js +1 -1
  240. package/lib/core/alias-resolver.js +1 -1
  241. package/lib/core/api-client.d.ts +35 -16
  242. package/lib/core/api-client.js +1 -1
  243. package/lib/core/bff/config.js +1 -1
  244. package/lib/core/bff/file-system.js +1 -1
  245. package/lib/core/bff/hash.js +1 -1
  246. package/lib/core/bff/lock.js +1 -1
  247. package/lib/core/bff/utils.js +1 -1
  248. package/lib/core/db-resolver.js +1 -1
  249. package/lib/core/kb-search-client.d.ts +30 -0
  250. package/lib/core/kb-search-client.js +1 -0
  251. package/lib/core/page/file-system.js +1 -1
  252. package/lib/core/page/hash.js +1 -1
  253. package/lib/core/page/lock.js +1 -1
  254. package/lib/core/sql-index-auditor.js +1 -1
  255. package/lib/core/sql-sync/config.js +1 -1
  256. package/lib/core/sql-sync/file-system.js +1 -1
  257. package/lib/core/sql-sync/hash.js +1 -1
  258. package/lib/core/sql-sync/lock.js +1 -1
  259. package/lib/core/sql-sync/utils.js +1 -1
  260. package/lib/core/sql-validator.js +1 -1
  261. package/lib/errors.js +1 -1
  262. package/lib/framework/build-all-flags.js +1 -1
  263. package/lib/framework/error-output.js +1 -1
  264. package/lib/framework/explicit-yes.js +1 -1
  265. package/lib/framework/flags.js +1 -1
  266. package/lib/framework/help.js +1 -1
  267. package/lib/framework/index.js +1 -1
  268. package/lib/framework/output.js +1 -1
  269. package/lib/framework/response.js +1 -1
  270. package/lib/framework/runner-alias.js +1 -1
  271. package/lib/framework/runner.js +1 -1
  272. package/lib/framework/schema-export.js +1 -1
  273. package/lib/framework/types.d.ts +5 -0
  274. package/lib/framework/types.js +1 -1
  275. package/lib/generated/build-info.d.ts +4 -4
  276. package/lib/generated/build-info.js +1 -1
  277. package/lib/help.js +1 -1
  278. package/lib/postinstall.js +1 -1
  279. package/lib/runtime/confirmation.js +1 -1
  280. package/lib/runtime/event.js +1 -1
  281. package/lib/runtime/index.js +1 -1
  282. package/lib/runtime/queue.js +1 -1
  283. package/lib/runtime/resolve.js +1 -1
  284. package/lib/skills/builtin-skill.js +1 -1
  285. package/lib/skills/main.js +1 -1
  286. package/lib/skills/npx-skills-add.js +1 -1
  287. package/lib/skills/skill-presence.js +1 -1
  288. package/lib/telemetry/cli-command-trace.js +1 -1
  289. package/lib/telemetry/cli-help-trace.js +1 -1
  290. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  291. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  292. package/lib/telemetry/send-cli-trace-log.js +1 -1
  293. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  294. package/lib/utils/ai_config.js +1 -1
  295. package/lib/utils/apply-jq-filter.js +1 -1
  296. package/lib/utils/cdn-config.js +1 -1
  297. package/lib/utils/check-sdk-version.js +1 -1
  298. package/lib/utils/cli-version-check.js +1 -1
  299. package/lib/utils/cli-version-policy.js +1 -1
  300. package/lib/utils/config.js +1 -1
  301. package/lib/utils/entity-with-id.js +1 -1
  302. package/lib/utils/file-utils.js +1 -1
  303. package/lib/utils/guides-cdn.js +1 -1
  304. package/lib/utils/http-client.js +1 -1
  305. package/lib/utils/is-non-interactive.js +1 -1
  306. package/lib/utils/logger.js +1 -1
  307. package/lib/utils/params.js +1 -1
  308. package/lib/utils/platform.js +1 -1
  309. package/lib/utils/sleep.js +1 -1
  310. package/lib/utils/template-replacer.js +1 -1
  311. package/lib/utils/update-notice.js +1 -1
  312. package/lib/utils/version.js +1 -1
  313. package/lib/utils/with-active-cookie.js +1 -1
  314. package/lib/utils/write-cli-side-channel.js +1 -1
  315. package/package.json +1 -1
  316. package/skills/rabetbase/SKILL.md +12 -6
  317. package/skills/rabetbase/references/rabetbase-config.md +4 -1
  318. package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +9 -9
  319. package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +1 -1
  320. package/skills/rabetbase/references/rabetbase-dataset-field-restore.md +59 -0
  321. package/skills/rabetbase/references/rabetbase-dataset-user-deleted-field-list.md +47 -0
  322. package/skills/rabetbase/references/rabetbase-deployment-sync.md +92 -0
  323. package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
  324. package/skills/rabetbase/references/rabetbase-init.md +2 -0
  325. package/skills/rabetbase/references/rabetbase-kb.md +7 -7
  326. package/skills/rabetbase.manifest.json +6 -3
@@ -1 +1 @@
1
- function a81_0x30f4(){const _0x3480bf=['isFinite','object','1424396KTwFRW','accumulatedErrorTypeCounts','Analysis\x20status\x20for\x20','FULL','plan','PARTIAL_SUCCESS','parse','length','1110594bYdanz','tableNames','keys','number','endTime','TARGETED','firstStartTime','CANCELLED','has','isNaN','inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.','appCode','trim','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','string','RETRYING','3974598cqwubq','363817AswKeB','str','1764460cWptLO','analyze-status','isArray','now','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','costTimeMs','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','6332928ttsqeY','status','1329136xpLRTk','num','UNKNOWN','inputParams'];a81_0x30f4=function(){return _0x3480bf;};return a81_0x30f4();}const a81_0x463c9a=a81_0x4c0a;function a81_0x4c0a(_0x5c83f3,_0x209863){_0x5c83f3=_0x5c83f3-0x164;const _0x30f41e=a81_0x30f4();let _0x4c0a89=_0x30f41e[_0x5c83f3];return _0x4c0a89;}(function(_0x340255,_0x58c2ee){const _0x3e523f=a81_0x4c0a,_0x45bd4d=_0x340255();while(!![]){try{const _0x149949=parseInt(_0x3e523f(0x175))/0x1+-parseInt(_0x3e523f(0x186))/0x2+-parseInt(_0x3e523f(0x164))/0x3+-parseInt(_0x3e523f(0x180))/0x4+parseInt(_0x3e523f(0x177))/0x5+parseInt(_0x3e523f(0x174))/0x6+parseInt(_0x3e523f(0x17e))/0x7;if(_0x149949===_0x58c2ee)break;else _0x45bd4d['push'](_0x45bd4d['shift']());}catch(_0x441ee4){_0x45bd4d['push'](_0x45bd4d['shift']());}}}(a81_0x30f4,0xd432e));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(['SUCCESS',a81_0x463c9a(0x18b),'FAILED',a81_0x463c9a(0x16b)]);export const dbAnalyzeStatus={'service':'db','command':a81_0x463c9a(0x178),'description':'Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x463c9a(0x18a),'type':a81_0x463c9a(0x172),'required':!![],'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)'}],async 'execute'(_0x1f8203){const _0x48e8a2=a81_0x463c9a,_0x3e3d63=_0x1f8203[_0x48e8a2(0x181)]('id'),_0x249c34=_0x1f8203[_0x48e8a2(0x176)](_0x48e8a2(0x18a)),_0x7e7b4d=await getDbAnalysisStatus(_0x249c34),_0x3edb5f=TERMINAL_STATUSES[_0x48e8a2(0x16c)](_0x7e7b4d[_0x48e8a2(0x17f)]??''),{parsedJobContext:_0x251515,jobContextParseWarning:_0x468f43}=parseJobContext(_0x7e7b4d['jobContext']),{requestedAnalysis:_0x7a5958,requestedAnalysisParseWarning:_0x3697cb}=parseRequestedAnalysis(_0x7e7b4d[_0x48e8a2(0x183)]),_0x2cb56c=readAccumulatedErrorTypeCounts(_0x251515),_0x505184=calculateAttemptElapsedMs(_0x7e7b4d,_0x3edb5f),_0x73adfa=calculateElapsedFromStart(_0x7e7b4d['firstStartTime'],_0x7e7b4d[_0x48e8a2(0x168)],_0x3edb5f),_0x266ffa=detectMultipleAttempts(_0x7e7b4d),_0x5d55ef=buildDbPageLinks(_0x1f8203[_0x48e8a2(0x16f)],_0x3e3d63);return{'ok':!![],'data':{'dbLinkId':_0x3e3d63,'planId':_0x249c34,'status':_0x7e7b4d,'requestedAnalysis':_0x7a5958,'requestedAnalysisParseWarning':_0x3697cb,'parsedJobContext':_0x251515,'accumulatedErrorTypeCounts':_0x2cb56c,'accumulatedErrorTypeCountsAdvisory':_0x2cb56c?_0x48e8a2(0x17d):'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','isTerminal':_0x3edb5f,'isRetrying':_0x7e7b4d[_0x48e8a2(0x17f)]===_0x48e8a2(0x173),'attemptElapsedMs':_0x505184,'totalElapsedMs':_0x73adfa,'hasMultipleAttempts':_0x266ffa,'jobContextParseWarning':_0x468f43,..._0x5d55ef?{'links':_0x5d55ef}:{}},'message':_0x48e8a2(0x188)+_0x249c34};}};function parseRequestedAnalysis(_0x296efc){const _0x3cbf14=a81_0x463c9a,_0x57f968={'mode':_0x3cbf14(0x182),'tableCount':null,'tableNames':null};if(!_0x296efc?.[_0x3cbf14(0x170)]())return{'requestedAnalysis':_0x57f968,'requestedAnalysisParseWarning':_0x3cbf14(0x17b)};try{const _0x1cba48=JSON[_0x3cbf14(0x18c)](_0x296efc);if(!_0x1cba48||typeof _0x1cba48!==_0x3cbf14(0x185)||Array[_0x3cbf14(0x179)](_0x1cba48))throw new Error('inputParams\x20is\x20not\x20an\x20object');const _0x50e971=_0x1cba48[_0x3cbf14(0x165)];if(_0x50e971===undefined||_0x50e971===null)return{'requestedAnalysis':{'mode':'FULL','tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x3cbf14(0x179)](_0x50e971)&&_0x50e971['every'](_0x3d4ad7=>typeof _0x3d4ad7===_0x3cbf14(0x172)))return{'requestedAnalysis':{'mode':_0x50e971[_0x3cbf14(0x18d)]>0x0?_0x3cbf14(0x169):_0x3cbf14(0x189),'tableCount':_0x50e971[_0x3cbf14(0x18d)],'tableNames':_0x50e971},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x57f968,'requestedAnalysisParseWarning':_0x3cbf14(0x16e)};}function readAccumulatedErrorTypeCounts(_0x384184){const _0x511d80=a81_0x463c9a,_0x5672a8=_0x384184?.[_0x511d80(0x187)];if(!_0x5672a8||typeof _0x5672a8!==_0x511d80(0x185)||Array['isArray'](_0x5672a8))return null;if(Object[_0x511d80(0x166)](_0x5672a8)[_0x511d80(0x18d)]===0x0)return null;return _0x5672a8;}function parseJobContext(_0x3844fc){const _0x21ef3c=a81_0x463c9a;if(!_0x3844fc?.[_0x21ef3c(0x170)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x27f3e6=JSON['parse'](_0x3844fc);if(_0x27f3e6&&typeof _0x27f3e6===_0x21ef3c(0x185)&&!Array[_0x21ef3c(0x179)](_0x27f3e6))return{'parsedJobContext':_0x27f3e6,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x21ef3c(0x171)};}function calculateAttemptElapsedMs(_0x321ac6,_0x35e666){const _0x19dc7c=a81_0x463c9a;if(typeof _0x321ac6[_0x19dc7c(0x17c)]===_0x19dc7c(0x167)&&Number['isFinite'](_0x321ac6[_0x19dc7c(0x17c)])&&_0x321ac6[_0x19dc7c(0x17c)]>=0x0)return _0x321ac6['costTimeMs'];return calculateElapsedFromStart(_0x321ac6['startTime'],_0x321ac6[_0x19dc7c(0x168)],_0x35e666);}function calculateElapsedFromStart(_0x531bc8,_0x154b85,_0x12d11b){const _0x2a8c72=a81_0x463c9a,_0x346d01=toTimestamp(_0x531bc8);if(_0x346d01===null)return null;const _0xa59a4d=toTimestamp(_0x154b85),_0x45f5ae=_0xa59a4d??(_0x12d11b?null:Date[_0x2a8c72(0x17a)]());if(_0x45f5ae===null||_0x45f5ae<_0x346d01)return null;return _0x45f5ae-_0x346d01;}function detectMultipleAttempts(_0x1ce683){const _0xe8bd55=a81_0x463c9a,_0x59322c=toTimestamp(_0x1ce683[_0xe8bd55(0x16a)]),_0x14c375=toTimestamp(_0x1ce683['startTime']);return _0x59322c!==null&&_0x14c375!==null&&_0x59322c!==_0x14c375;}function toTimestamp(_0x2235a9){const _0x451c66=a81_0x463c9a;if(typeof _0x2235a9===_0x451c66(0x167))return Number[_0x451c66(0x184)](_0x2235a9)?_0x2235a9:null;if(typeof _0x2235a9!==_0x451c66(0x172)||_0x2235a9[_0x451c66(0x170)]()==='')return null;const _0x5c8557=Number(_0x2235a9);if(Number[_0x451c66(0x184)](_0x5c8557))return _0x5c8557;const _0x111c55=Date[_0x451c66(0x18c)](_0x2235a9);return Number[_0x451c66(0x16d)](_0x111c55)?null:_0x111c55;}
1
+ function a83_0x46e3(_0x56afad,_0x594149){_0x56afad=_0x56afad-0x11b;const _0x4c2bf2=a83_0x4c2b();let _0x46e362=_0x4c2bf2[_0x56afad];return _0x46e362;}const a83_0x46aa92=a83_0x46e3;(function(_0x479a74,_0x3de969){const _0x55161a=a83_0x46e3,_0x2f33ad=_0x479a74();while(!![]){try{const _0x348e38=-parseInt(_0x55161a(0x12e))/0x1+-parseInt(_0x55161a(0x122))/0x2+-parseInt(_0x55161a(0x136))/0x3*(parseInt(_0x55161a(0x131))/0x4)+-parseInt(_0x55161a(0x130))/0x5+-parseInt(_0x55161a(0x123))/0x6+-parseInt(_0x55161a(0x145))/0x7+parseInt(_0x55161a(0x141))/0x8;if(_0x348e38===_0x3de969)break;else _0x2f33ad['push'](_0x2f33ad['shift']());}catch(_0x47c931){_0x2f33ad['push'](_0x2f33ad['shift']());}}}(a83_0x4c2b,0x323ba));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(['SUCCESS',a83_0x46aa92(0x121),a83_0x46aa92(0x120),a83_0x46aa92(0x135)]);export const dbAnalyzeStatus={'service':'db','command':a83_0x46aa92(0x11b),'description':a83_0x46aa92(0x11c),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a83_0x46aa92(0x137),'type':'string','required':!![],'description':a83_0x46aa92(0x132)}],async 'execute'(_0x2f8907){const _0x29d242=a83_0x46aa92,_0x4a7114=_0x2f8907[_0x29d242(0x13f)]('id'),_0x28f383=_0x2f8907[_0x29d242(0x144)](_0x29d242(0x137)),_0x4c866d=await getDbAnalysisStatus(_0x28f383),_0x493706=TERMINAL_STATUSES[_0x29d242(0x11f)](_0x4c866d[_0x29d242(0x12c)]??''),{parsedJobContext:_0x1a273b,jobContextParseWarning:_0xcf510a}=parseJobContext(_0x4c866d['jobContext']),{requestedAnalysis:_0xf3eaa4,requestedAnalysisParseWarning:_0x5f45bb}=parseRequestedAnalysis(_0x4c866d[_0x29d242(0x142)]),_0x5102d5=readAccumulatedErrorTypeCounts(_0x1a273b),_0x279748=calculateAttemptElapsedMs(_0x4c866d,_0x493706),_0x5a4df1=calculateElapsedFromStart(_0x4c866d[_0x29d242(0x149)],_0x4c866d[_0x29d242(0x11d)],_0x493706),_0xdf4cf4=detectMultipleAttempts(_0x4c866d),_0x4701eb=buildDbPageLinks(_0x2f8907[_0x29d242(0x13a)],_0x4a7114);return{'ok':!![],'data':{'dbLinkId':_0x4a7114,'planId':_0x28f383,'status':_0x4c866d,'requestedAnalysis':_0xf3eaa4,'requestedAnalysisParseWarning':_0x5f45bb,'parsedJobContext':_0x1a273b,'accumulatedErrorTypeCounts':_0x5102d5,'accumulatedErrorTypeCountsAdvisory':_0x5102d5?_0x29d242(0x147):_0x29d242(0x13c),'isTerminal':_0x493706,'isRetrying':_0x4c866d[_0x29d242(0x12c)]==='RETRYING','attemptElapsedMs':_0x279748,'totalElapsedMs':_0x5a4df1,'hasMultipleAttempts':_0xdf4cf4,'jobContextParseWarning':_0xcf510a,..._0x4701eb?{'links':_0x4701eb}:{}},'message':_0x29d242(0x12f)+_0x28f383};}};function parseRequestedAnalysis(_0x10f587){const _0x33800c=a83_0x46aa92,_0x428843={'mode':_0x33800c(0x143),'tableCount':null,'tableNames':null};if(!_0x10f587?.[_0x33800c(0x11e)]())return{'requestedAnalysis':_0x428843,'requestedAnalysisParseWarning':_0x33800c(0x134)};try{const _0x4b5516=JSON[_0x33800c(0x148)](_0x10f587);if(!_0x4b5516||typeof _0x4b5516!==_0x33800c(0x12b)||Array[_0x33800c(0x13e)](_0x4b5516))throw new Error(_0x33800c(0x125));const _0x42e369=_0x4b5516[_0x33800c(0x128)];if(_0x42e369===undefined||_0x42e369===null)return{'requestedAnalysis':{'mode':_0x33800c(0x13b),'tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x33800c(0x13e)](_0x42e369)&&_0x42e369[_0x33800c(0x146)](_0x573292=>typeof _0x573292===_0x33800c(0x12d)))return{'requestedAnalysis':{'mode':_0x42e369[_0x33800c(0x127)]>0x0?_0x33800c(0x140):_0x33800c(0x13b),'tableCount':_0x42e369[_0x33800c(0x127)],'tableNames':_0x42e369},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x428843,'requestedAnalysisParseWarning':_0x33800c(0x133)};}function readAccumulatedErrorTypeCounts(_0x2b9500){const _0x1b99af=a83_0x46aa92,_0x30e782=_0x2b9500?.['accumulatedErrorTypeCounts'];if(!_0x30e782||typeof _0x30e782!==_0x1b99af(0x12b)||Array[_0x1b99af(0x13e)](_0x30e782))return null;if(Object['keys'](_0x30e782)[_0x1b99af(0x127)]===0x0)return null;return _0x30e782;}function parseJobContext(_0x3c9e66){const _0x32fcf2=a83_0x46aa92;if(!_0x3c9e66?.[_0x32fcf2(0x11e)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x4087bf=JSON[_0x32fcf2(0x148)](_0x3c9e66);if(_0x4087bf&&typeof _0x4087bf===_0x32fcf2(0x12b)&&!Array[_0x32fcf2(0x13e)](_0x4087bf))return{'parsedJobContext':_0x4087bf,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x32fcf2(0x124)};}function calculateAttemptElapsedMs(_0x51c2b8,_0x58159b){const _0x15cdf7=a83_0x46aa92;if(typeof _0x51c2b8[_0x15cdf7(0x138)]===_0x15cdf7(0x13d)&&Number[_0x15cdf7(0x126)](_0x51c2b8[_0x15cdf7(0x138)])&&_0x51c2b8[_0x15cdf7(0x138)]>=0x0)return _0x51c2b8[_0x15cdf7(0x138)];return calculateElapsedFromStart(_0x51c2b8['startTime'],_0x51c2b8['endTime'],_0x58159b);}function calculateElapsedFromStart(_0x1fa382,_0x54e2f5,_0x5c45ef){const _0x1ecf19=a83_0x46aa92,_0x41c186=toTimestamp(_0x1fa382);if(_0x41c186===null)return null;const _0x5f066b=toTimestamp(_0x54e2f5),_0x584522=_0x5f066b??(_0x5c45ef?null:Date[_0x1ecf19(0x12a)]());if(_0x584522===null||_0x584522<_0x41c186)return null;return _0x584522-_0x41c186;}function a83_0x4c2b(){const _0x3aba16=['endTime','trim','has','FAILED','PARTIAL_SUCCESS','426690JdnwWZ','1094568aNeWOv','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','inputParams\x20is\x20not\x20an\x20object','isFinite','length','tableNames','startTime','now','object','status','string','48060vkFDFr','Analysis\x20status\x20for\x20','144630zNEYeo','165052gvJQWX','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','CANCELLED','18uufTDo','plan','costTimeMs','isNaN','appCode','FULL','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','number','isArray','num','TARGETED','7974352zwpHXt','inputParams','UNKNOWN','str','494921fBlpkE','every','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','parse','firstStartTime','analyze-status','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id'];a83_0x4c2b=function(){return _0x3aba16;};return a83_0x4c2b();}function detectMultipleAttempts(_0x12dfc8){const _0x3e42e2=a83_0x46aa92,_0x31b05b=toTimestamp(_0x12dfc8[_0x3e42e2(0x149)]),_0x4aad01=toTimestamp(_0x12dfc8[_0x3e42e2(0x129)]);return _0x31b05b!==null&&_0x4aad01!==null&&_0x31b05b!==_0x4aad01;}function toTimestamp(_0x30f040){const _0x5d996a=a83_0x46aa92;if(typeof _0x30f040===_0x5d996a(0x13d))return Number[_0x5d996a(0x126)](_0x30f040)?_0x30f040:null;if(typeof _0x30f040!==_0x5d996a(0x12d)||_0x30f040[_0x5d996a(0x11e)]()==='')return null;const _0x3b4aee=Number(_0x30f040);if(Number[_0x5d996a(0x126)](_0x3b4aee))return _0x3b4aee;const _0x38f66a=Date[_0x5d996a(0x148)](_0x30f040);return Number[_0x5d996a(0x139)](_0x38f66a)?null:_0x38f66a;}
@@ -1 +1 @@
1
- const a82_0x17c2cd=a82_0x4e5a;(function(_0x53b91e,_0x140fc0){const _0x46fd83=a82_0x4e5a,_0x588e53=_0x53b91e();while(!![]){try{const _0x482abc=-parseInt(_0x46fd83(0x142))/0x1+parseInt(_0x46fd83(0x13a))/0x2*(parseInt(_0x46fd83(0x141))/0x3)+-parseInt(_0x46fd83(0x11f))/0x4*(-parseInt(_0x46fd83(0x143))/0x5)+-parseInt(_0x46fd83(0x147))/0x6*(parseInt(_0x46fd83(0x11d))/0x7)+-parseInt(_0x46fd83(0x12d))/0x8*(-parseInt(_0x46fd83(0x12c))/0x9)+parseInt(_0x46fd83(0x13e))/0xa+-parseInt(_0x46fd83(0x126))/0xb;if(_0x482abc===_0x140fc0)break;else _0x588e53['push'](_0x588e53['shift']());}catch(_0x3b7171){_0x588e53['push'](_0x588e53['shift']());}}}(a82_0x2574,0xb628e));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';function a82_0x4e5a(_0x60604b,_0x4807e4){_0x60604b=_0x60604b-0x11b;const _0x257407=a82_0x2574();let _0x4e5a67=_0x257407[_0x60604b];return _0x4e5a67;}function a82_0x2574(){const _0x253aea=['5814uEDbaI','Extra\x20JDBC-style\x20connection\x20parameters\x20string','validation','skip-connection-test','After\x20create,\x20start\x20schema\x20analysis','4634fPtlxL','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','907652KLqlYt','dbtype','dbversion','8.0','databasePage','dbparam','create','4192496XmkNJJ','string','Created\x20db\x20link\x20','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','message','\x20and\x20started\x20analysis','16209tWdSph','4144WyvddE','dburl','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','str','username','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','Create\x20dblink','dbdesc','password','POST','No\x20follow-up\x20analysis','autostart','trim','25886QRoXrr',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','/smartapi/dblink/create','1982320tNGAqA','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','bool','228fjFHfx','572991vUJUes','5ypRvct','write','dbname','[redacted]'];a82_0x2574=function(){return _0x253aea;};return a82_0x2574();}import{buildDbPageLinks,assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a82_0x17c2cd(0x125),'description':a82_0x17c2cd(0x129),'risk':a82_0x17c2cd(0x144),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a82_0x17c2cd(0x145),'type':a82_0x17c2cd(0x127),'required':!![],'description':a82_0x17c2cd(0x11e)},DB_TYPE_FLAG,{'name':a82_0x17c2cd(0x121),'type':a82_0x17c2cd(0x127),'description':a82_0x17c2cd(0x12f),'default':'8.0'},{'name':a82_0x17c2cd(0x12e),'type':a82_0x17c2cd(0x127),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a82_0x17c2cd(0x131),'type':'string','required':!![],'description':'Database\x20username'},{'name':a82_0x17c2cd(0x135),'type':'string','required':!![],'description':'Database\x20password'},{'name':a82_0x17c2cd(0x124),'type':a82_0x17c2cd(0x127),'description':a82_0x17c2cd(0x148)},{'name':a82_0x17c2cd(0x134),'type':a82_0x17c2cd(0x127),'description':'Human-readable\x20description'},{'name':a82_0x17c2cd(0x138),'type':'boolean','description':a82_0x17c2cd(0x11c),'default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x5f53c6){const _0x203ca5=a82_0x17c2cd,_0x538798=_0x5f53c6[_0x203ca5(0x130)](_0x203ca5(0x12e))['trim']();if(!validateDbUrl(_0x538798))throw CliErrors[_0x203ca5(0x149)](_0x203ca5(0x13c)+_0x538798+'\x22',_0x203ca5(0x132));},async 'dryRun'(_0x3715a4){const _0x48dc61=a82_0x17c2cd,_0x54c1d6={'appCode':_0x3715a4['appCode'],'dbName':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x145)),'dbType':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x120)),'dbVersion':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x121))||_0x48dc61(0x122),'dbUrl':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x12e))[_0x48dc61(0x139)](),'username':_0x3715a4['str'](_0x48dc61(0x131)),'password':_0x48dc61(0x146),..._0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x124))?{'dbParam':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x124))}:{},..._0x3715a4['str'](_0x48dc61(0x134))?{'dbDesc':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x134))}:{}};return{'method':_0x48dc61(0x136),'url':_0x48dc61(0x13d),'body':_0x54c1d6,'description':[_0x48dc61(0x133),_0x3715a4[_0x48dc61(0x140)](_0x48dc61(0x138))?_0x48dc61(0x13f):_0x48dc61(0x137)]['join']('\x0a'),'connectionPreflight':{'enabled':!_0x3715a4[_0x48dc61(0x140)](_0x48dc61(0x11b)),'executed':![]}};},async 'execute'(_0x3af88c){const _0x3e1c5f=a82_0x17c2cd,_0x27008e={'appCode':_0x3af88c['appCode'],'dbName':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x145)),'dbType':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x120)),'dbVersion':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x121))||_0x3e1c5f(0x122),'dbUrl':_0x3af88c['str'](_0x3e1c5f(0x12e))[_0x3e1c5f(0x139)](),'username':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x131)),'password':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x135)),..._0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x124))?{'dbParam':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x124))}:{},..._0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x134))?{'dbDesc':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x134))}:{}};!_0x3af88c[_0x3e1c5f(0x140)](_0x3e1c5f(0x11b))&&await assertDbLinkConnectionPreflight(_0x27008e);const {id:_0x39e38b,entity:_0x142193}=normalizeEntityWithIdResponse(await createDbLink(_0x27008e));if(!_0x39e38b)return{'ok':![],'message':'Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','data':sanitizeDbLinkForOutput(_0x142193)};let _0x46503c,_0x228d51;if(_0x3af88c['bool'](_0x3e1c5f(0x138)))try{_0x46503c=(await startDbAnalysis(_0x39e38b))['planId'];}catch(_0x1dafd2){_0x228d51=_0x1dafd2 instanceof Error?_0x1dafd2[_0x3e1c5f(0x12a)]:String(_0x1dafd2);}const _0x381beb=buildDbPageLinks(_0x3af88c['appCode'],_0x39e38b),_0x246837={'connection':sanitizeDbLinkForOutput(_0x142193),..._0x381beb?{'links':{'databasePage':_0x381beb[_0x3e1c5f(0x123)]}}:{},..._0x46503c?{'analysisPlanId':_0x46503c}:{},..._0x228d51?{'analysisStartWarning':_0x228d51}:{}};let _0x2e8255;return _0x3af88c[_0x3e1c5f(0x140)](_0x3e1c5f(0x138))?_0x228d51?_0x2e8255=_0x3e1c5f(0x128)+_0x39e38b+_0x3e1c5f(0x13b):_0x2e8255=_0x3e1c5f(0x128)+_0x39e38b+_0x3e1c5f(0x12b):_0x2e8255=_0x3e1c5f(0x128)+_0x39e38b,{'ok':!![],'data':_0x246837,'message':_0x2e8255};}};
1
+ const a84_0x5932a3=a84_0xae70;function a84_0x2710(){const _0x5a3b61=['8400904slvApE','skip-connection-test','6578050YozHFo','username','14pTyYKP','8.0','dbparam','planId','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','password','Created\x20db\x20link\x20',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','23594197aMjjWP','dbname','Database\x20username','dbdesc','31797IOigzJ','str','Database\x20password','7lizNPy','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','appCode','dburl','148424WFyGoC','POST','[redacted]','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','string','560eKNOMa','dbtype','join','message','9swyANC','\x20and\x20started\x20analysis','bool','boolean','create','12HsDoam','1329956eRZaWZ','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','trim','Host\x20and\x20port:\x20host:port','write','No\x20follow-up\x20analysis','dbversion','autostart','After\x20create,\x20start\x20schema\x20analysis','8622426IEmZLj','validation'];a84_0x2710=function(){return _0x5a3b61;};return a84_0x2710();}(function(_0x4b32d9,_0x4f7f4f){const _0xdefdb9=a84_0xae70,_0xbcccef=_0x4b32d9();while(!![]){try{const _0x22efce=-parseInt(_0xdefdb9(0x129))/0x1*(-parseInt(_0xdefdb9(0x13c))/0x2)+parseInt(_0xdefdb9(0x145))/0x3*(-parseInt(_0xdefdb9(0x14b))/0x4)+parseInt(_0xdefdb9(0x158))/0x5+-parseInt(_0xdefdb9(0x154))/0x6+parseInt(_0xdefdb9(0x138))/0x7*(-parseInt(_0xdefdb9(0x156))/0x8)+parseInt(_0xdefdb9(0x135))/0x9*(-parseInt(_0xdefdb9(0x141))/0xa)+parseInt(_0xdefdb9(0x131))/0xb*(parseInt(_0xdefdb9(0x14a))/0xc);if(_0x22efce===_0x4f7f4f)break;else _0xbcccef['push'](_0xbcccef['shift']());}catch(_0x19a28d){_0xbcccef['push'](_0xbcccef['shift']());}}}(a84_0x2710,0xc776e));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';function a84_0xae70(_0x1ad8ed,_0x3c2dd7){_0x1ad8ed=_0x1ad8ed-0x128;const _0x2710f4=a84_0x2710();let _0xae707e=_0x2710f4[_0x1ad8ed];return _0xae707e;}import{buildDbPageLinks,assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a84_0x5932a3(0x149),'description':a84_0x5932a3(0x13f),'risk':a84_0x5932a3(0x14f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a84_0x5932a3(0x132),'type':a84_0x5932a3(0x140),'required':!![],'description':'Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server'},DB_TYPE_FLAG,{'name':a84_0x5932a3(0x151),'type':a84_0x5932a3(0x140),'description':a84_0x5932a3(0x12d),'default':a84_0x5932a3(0x12a)},{'name':a84_0x5932a3(0x13b),'type':'string','required':!![],'description':a84_0x5932a3(0x14e)},{'name':a84_0x5932a3(0x128),'type':a84_0x5932a3(0x140),'required':!![],'description':a84_0x5932a3(0x133)},{'name':a84_0x5932a3(0x12e),'type':'string','required':!![],'description':a84_0x5932a3(0x137)},{'name':'dbparam','type':'string','description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a84_0x5932a3(0x134),'type':a84_0x5932a3(0x140),'description':'Human-readable\x20description'},{'name':'autostart','type':a84_0x5932a3(0x148),'description':a84_0x5932a3(0x153),'default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x1582c8){const _0x9bde58=a84_0x5932a3,_0x561a23=_0x1582c8[_0x9bde58(0x136)](_0x9bde58(0x13b))[_0x9bde58(0x14d)]();if(!validateDbUrl(_0x561a23))throw CliErrors[_0x9bde58(0x155)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x561a23+'\x22','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.');},async 'dryRun'(_0x4e6893){const _0x146fc8=a84_0x5932a3,_0x4c5745={'appCode':_0x4e6893['appCode'],'dbName':_0x4e6893[_0x146fc8(0x136)](_0x146fc8(0x132)),'dbType':_0x4e6893['str'](_0x146fc8(0x142)),'dbVersion':_0x4e6893[_0x146fc8(0x136)](_0x146fc8(0x151))||_0x146fc8(0x12a),'dbUrl':_0x4e6893[_0x146fc8(0x136)]('dburl')[_0x146fc8(0x14d)](),'username':_0x4e6893[_0x146fc8(0x136)](_0x146fc8(0x128)),'password':_0x146fc8(0x13e),..._0x4e6893[_0x146fc8(0x136)](_0x146fc8(0x12b))?{'dbParam':_0x4e6893['str']('dbparam')}:{},..._0x4e6893['str'](_0x146fc8(0x134))?{'dbDesc':_0x4e6893[_0x146fc8(0x136)](_0x146fc8(0x134))}:{}};return{'method':_0x146fc8(0x13d),'url':'/smartapi/dblink/create','body':_0x4c5745,'description':['Create\x20dblink',_0x4e6893[_0x146fc8(0x147)](_0x146fc8(0x152))?_0x146fc8(0x14c):_0x146fc8(0x150)][_0x146fc8(0x143)]('\x0a'),'connectionPreflight':{'enabled':!_0x4e6893[_0x146fc8(0x147)](_0x146fc8(0x157)),'executed':![]}};},async 'execute'(_0x3b74aa){const _0xdb77cb=a84_0x5932a3,_0x198bf6={'appCode':_0x3b74aa['appCode'],'dbName':_0x3b74aa[_0xdb77cb(0x136)]('dbname'),'dbType':_0x3b74aa[_0xdb77cb(0x136)](_0xdb77cb(0x142)),'dbVersion':_0x3b74aa[_0xdb77cb(0x136)](_0xdb77cb(0x151))||_0xdb77cb(0x12a),'dbUrl':_0x3b74aa[_0xdb77cb(0x136)](_0xdb77cb(0x13b))[_0xdb77cb(0x14d)](),'username':_0x3b74aa[_0xdb77cb(0x136)](_0xdb77cb(0x128)),'password':_0x3b74aa['str'](_0xdb77cb(0x12e)),..._0x3b74aa[_0xdb77cb(0x136)](_0xdb77cb(0x12b))?{'dbParam':_0x3b74aa[_0xdb77cb(0x136)](_0xdb77cb(0x12b))}:{},..._0x3b74aa['str'](_0xdb77cb(0x134))?{'dbDesc':_0x3b74aa['str'](_0xdb77cb(0x134))}:{}};!_0x3b74aa['bool'](_0xdb77cb(0x157))&&await assertDbLinkConnectionPreflight(_0x198bf6);const {id:_0x223d66,entity:_0x18b9f2}=normalizeEntityWithIdResponse(await createDbLink(_0x198bf6));if(!_0x223d66)return{'ok':![],'message':_0xdb77cb(0x139),'data':sanitizeDbLinkForOutput(_0x18b9f2)};let _0x2a2dbc,_0x235c95;if(_0x3b74aa['bool'](_0xdb77cb(0x152)))try{_0x2a2dbc=(await startDbAnalysis(_0x223d66))[_0xdb77cb(0x12c)];}catch(_0x50a061){_0x235c95=_0x50a061 instanceof Error?_0x50a061[_0xdb77cb(0x144)]:String(_0x50a061);}const _0x54257c=buildDbPageLinks(_0x3b74aa[_0xdb77cb(0x13a)],_0x223d66),_0x5a68dc={'connection':sanitizeDbLinkForOutput(_0x18b9f2),..._0x54257c?{'links':{'databasePage':_0x54257c['databasePage']}}:{},..._0x2a2dbc?{'analysisPlanId':_0x2a2dbc}:{},..._0x235c95?{'analysisStartWarning':_0x235c95}:{}};let _0xc0d758;return _0x3b74aa['bool'](_0xdb77cb(0x152))?_0x235c95?_0xc0d758=_0xdb77cb(0x12f)+_0x223d66+_0xdb77cb(0x130):_0xc0d758='Created\x20db\x20link\x20'+_0x223d66+_0xdb77cb(0x146):_0xc0d758=_0xdb77cb(0x12f)+_0x223d66,{'ok':!![],'data':_0x5a68dc,'message':_0xc0d758};}};
@@ -1 +1 @@
1
- const a83_0x3d3b5d=a83_0x763d;(function(_0x367a9e,_0x2e2b35){const _0x5ac678=a83_0x763d,_0x4ae6de=_0x367a9e();while(!![]){try{const _0x363a41=parseInt(_0x5ac678(0x14f))/0x1+-parseInt(_0x5ac678(0x150))/0x2*(-parseInt(_0x5ac678(0x156))/0x3)+parseInt(_0x5ac678(0x155))/0x4*(-parseInt(_0x5ac678(0x159))/0x5)+-parseInt(_0x5ac678(0x154))/0x6*(-parseInt(_0x5ac678(0x139))/0x7)+parseInt(_0x5ac678(0x13a))/0x8+-parseInt(_0x5ac678(0x14c))/0x9+parseInt(_0x5ac678(0x149))/0xa*(-parseInt(_0x5ac678(0x14a))/0xb);if(_0x363a41===_0x2e2b35)break;else _0x4ae6de['push'](_0x4ae6de['shift']());}catch(_0x1be226){_0x4ae6de['push'](_0x4ae6de['shift']());}}}(a83_0x3609,0xc92a9));import{deleteDbLink,getDbLinkInfo,listDatasets}from'../../core/api-client.js';function a83_0x763d(_0x140599,_0x128fe8){_0x140599=_0x140599-0x136;const _0x36097f=a83_0x3609();let _0x763d5=_0x36097f[_0x140599];return _0x763d5;}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':a83_0x3d3b5d(0x142),'type':'boolean','description':'Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count'},EXPECTED_DATASET_COUNT_FLAG={'name':'expected-dataset-count','type':'number','description':a83_0x3d3b5d(0x143)};export const dbDelete={'service':'db','command':a83_0x3d3b5d(0x13b),'description':a83_0x3d3b5d(0x158),'risk':a83_0x3d3b5d(0x147),'flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xea135f){const _0x24c5b2=a83_0x3d3b5d,_0x925a35=await loadDeleteImpact(_0xea135f);return assertExpectedDatasetCount(_0xea135f,_0x925a35[_0x24c5b2(0x157)][_0x24c5b2(0x152)]),{'method':_0x24c5b2(0x13d),'url':_0x24c5b2(0x137),'body':{'id':_0x925a35['id']},'description':_0x925a35['datasetDependency']['activeDatasetCount']>0x0?_0x24c5b2(0x148)+_0x925a35[_0x24c5b2(0x157)][_0x24c5b2(0x152)]+_0x24c5b2(0x13e):'Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.',..._0x925a35};},async 'execute'(_0xb57519){const _0x1b6ae0=a83_0x3d3b5d;if(!_0xb57519[_0x1b6ae0(0x138)](_0x1b6ae0(0x142)))throw CliErrors[_0x1b6ae0(0x141)](_0x1b6ae0(0x14d),_0x1b6ae0(0x136));const _0xb92ff8=_0xb57519[_0x1b6ae0(0x14b)]('id'),_0x209a16=await loadDeleteImpact(_0xb57519),_0x308fa5=_0x209a16['datasetDependency'][_0x1b6ae0(0x152)];assertExpectedDatasetCount(_0xb57519,_0x308fa5);if(_0x308fa5>0x0)throw CliErrors[_0x1b6ae0(0x141)](_0x1b6ae0(0x145)+_0xb92ff8+'\x20still\x20has\x20'+_0x308fa5+_0x1b6ae0(0x153),'Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.');return await deleteDbLink(_0xb92ff8),{'ok':!![],'data':{'id':_0xb92ff8,'deleted':!![],'activeDatasetCount':_0x308fa5},'message':'Deleted\x20db\x20link\x20'+_0xb92ff8};}};async function loadDeleteImpact(_0x15ab77){const _0x36ef88=a83_0x3d3b5d,_0x560ac4=_0x15ab77[_0x36ef88(0x14b)]('id'),[_0x2ae605,_0x2eda5a]=await Promise[_0x36ef88(0x13f)]([getDbLinkInfo(_0x560ac4),listDatasets(_0x15ab77[_0x36ef88(0x144)],{'source':_0x36ef88(0x15a)})]),_0x1ad1e0=buildDbDatasetDependency(_0x2ae605,_0x2eda5a);return{'id':_0x560ac4,'connection':sanitizeDbLinkForOutput(_0x2ae605),'datasetDependency':_0x1ad1e0[_0x36ef88(0x157)],'activeDatasetCount':_0x1ad1e0[_0x36ef88(0x157)][_0x36ef88(0x152)],'datasets':_0x1ad1e0[_0x36ef88(0x14e)]};}function a83_0x3609(){const _0x21b763=['appCode','Database\x20connection\x20','Expected\x20','high-risk-write','Deletion\x20is\x20blocked\x20by\x20','14033930iJjcVT','11OHskZk','num','13571586fhiVzW','--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.','datasets','1088235WpEocG','538lmIpKC','expected-dataset-count','activeDatasetCount','\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.','12MrSRxg','32236kzEgYQ','11745UVxHVb','datasetDependency','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','305fUKAiM','DB_TABLE','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.','/smartapi/dblink/delete','bool','1609580EFUAuV','13005384ygTuXr','delete','isInteger','POST','\x20active\x20DB_TABLE\x20Dataset(s).','all','flag','validation','confirm','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value'];a83_0x3609=function(){return _0x21b763;};return a83_0x3609();}function assertExpectedDatasetCount(_0xb44d67,_0x5081e8){const _0x3e30a7=a83_0x3d3b5d,_0x3772ae=_0xb44d67[_0x3e30a7(0x140)]('expected-dataset-count');if(_0x3772ae===undefined||_0x3772ae==='')return;const _0x251cde=_0xb44d67[_0x3e30a7(0x14b)](_0x3e30a7(0x151));if(!Number[_0x3e30a7(0x13c)](_0x251cde)||_0x251cde<0x0)throw CliErrors['validation']('--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x251cde!==_0x5081e8)throw CliErrors[_0x3e30a7(0x141)](_0x3e30a7(0x146)+_0x251cde+'\x20active\x20Dataset(s),\x20but\x20found\x20'+_0x5081e8+'.','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.');}
1
+ const a85_0x49c557=a85_0x4127;(function(_0x52a9fe,_0xd49b1d){const _0x5680e9=a85_0x4127,_0x226b37=_0x52a9fe();while(!![]){try{const _0x3882c4=parseInt(_0x5680e9(0x13e))/0x1*(parseInt(_0x5680e9(0x136))/0x2)+-parseInt(_0x5680e9(0x135))/0x3*(-parseInt(_0x5680e9(0x131))/0x4)+-parseInt(_0x5680e9(0x14d))/0x5+parseInt(_0x5680e9(0x150))/0x6+parseInt(_0x5680e9(0x14a))/0x7*(-parseInt(_0x5680e9(0x152))/0x8)+parseInt(_0x5680e9(0x142))/0x9*(-parseInt(_0x5680e9(0x138))/0xa)+-parseInt(_0x5680e9(0x133))/0xb*(-parseInt(_0x5680e9(0x158))/0xc);if(_0x3882c4===_0xd49b1d)break;else _0x226b37['push'](_0x226b37['shift']());}catch(_0x540cb5){_0x226b37['push'](_0x226b37['shift']());}}}(a85_0x4ee9,0xc45eb));import{deleteDbLink,getDbLinkInfo,listDatasets}from'../../core/api-client.js';function a85_0x4ee9(){const _0x1790ce=['appCode','1rifIFq','Expected\x20','high-risk-write','bool','325278eRyuiO','isInteger','Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count','\x20active\x20Dataset(s),\x20but\x20found\x20','Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.','Deletion\x20is\x20blocked\x20by\x20','/smartapi/dblink/delete','expected-dataset-count','159306xxfitm','confirm','Database\x20connection\x20','6282750mHdoHW','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value','--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.','1889898IcUCSC','datasets','392FJqler','\x20active\x20DB_TABLE\x20Dataset(s).','delete','flag','boolean','DB_TABLE','785412GBxcWu','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.','\x20still\x20has\x20','activeDatasetCount','number','658480JJjAMH','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','308rMvKwl','Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.','21CHsjyq','2715788mJEObG','num','410lUHtHB','all','Deleted\x20db\x20link\x20','datasetDependency','validation'];a85_0x4ee9=function(){return _0x1790ce;};return a85_0x4ee9();}import{CliErrors}from'../../errors.js';function a85_0x4127(_0x4db8ac,_0x3dd257){_0x4db8ac=_0x4db8ac-0x131;const _0x4ee9c6=a85_0x4ee9();let _0x4127a1=_0x4ee9c6[_0x4db8ac];return _0x4127a1;}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_0x49c557(0x14b),'type':a85_0x49c557(0x156),'description':a85_0x49c557(0x144)},EXPECTED_DATASET_COUNT_FLAG={'name':a85_0x49c557(0x149),'type':a85_0x49c557(0x15c),'description':a85_0x49c557(0x14e)};export const dbDelete={'service':'db','command':a85_0x49c557(0x154),'description':a85_0x49c557(0x132),'risk':a85_0x49c557(0x140),'flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x12ab5f){const _0x510c06=a85_0x49c557,_0x5a64e1=await loadDeleteImpact(_0x12ab5f);return assertExpectedDatasetCount(_0x12ab5f,_0x5a64e1[_0x510c06(0x13b)]['activeDatasetCount']),{'method':'POST','url':_0x510c06(0x148),'body':{'id':_0x5a64e1['id']},'description':_0x5a64e1[_0x510c06(0x13b)][_0x510c06(0x15b)]>0x0?_0x510c06(0x147)+_0x5a64e1[_0x510c06(0x13b)][_0x510c06(0x15b)]+_0x510c06(0x153):_0x510c06(0x134),..._0x5a64e1};},async 'execute'(_0xa33cc0){const _0x5092ef=a85_0x49c557;if(!_0xa33cc0[_0x5092ef(0x141)](_0x5092ef(0x14b)))throw CliErrors[_0x5092ef(0x13c)]('--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.');const _0x17b082=_0xa33cc0['num']('id'),_0x52112b=await loadDeleteImpact(_0xa33cc0),_0x397070=_0x52112b[_0x5092ef(0x13b)][_0x5092ef(0x15b)];assertExpectedDatasetCount(_0xa33cc0,_0x397070);if(_0x397070>0x0)throw CliErrors[_0x5092ef(0x13c)](_0x5092ef(0x14c)+_0x17b082+_0x5092ef(0x15a)+_0x397070+'\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.',_0x5092ef(0x146));return await deleteDbLink(_0x17b082),{'ok':!![],'data':{'id':_0x17b082,'deleted':!![],'activeDatasetCount':_0x397070},'message':_0x5092ef(0x13a)+_0x17b082};}};async function loadDeleteImpact(_0x5d9b32){const _0x3abf58=a85_0x49c557,_0x271f5c=_0x5d9b32[_0x3abf58(0x137)]('id'),[_0x3ccc7f,_0x113d19]=await Promise[_0x3abf58(0x139)]([getDbLinkInfo(_0x271f5c),listDatasets(_0x5d9b32[_0x3abf58(0x13d)],{'source':_0x3abf58(0x157)})]),_0x56ff01=buildDbDatasetDependency(_0x3ccc7f,_0x113d19);return{'id':_0x271f5c,'connection':sanitizeDbLinkForOutput(_0x3ccc7f),'datasetDependency':_0x56ff01[_0x3abf58(0x13b)],'activeDatasetCount':_0x56ff01[_0x3abf58(0x13b)][_0x3abf58(0x15b)],'datasets':_0x56ff01[_0x3abf58(0x151)]};}function assertExpectedDatasetCount(_0x252ba4,_0x162ea2){const _0x232e71=a85_0x49c557,_0x45899e=_0x252ba4[_0x232e71(0x155)](_0x232e71(0x149));if(_0x45899e===undefined||_0x45899e==='')return;const _0x21fdf5=_0x252ba4[_0x232e71(0x137)]('expected-dataset-count');if(!Number[_0x232e71(0x143)](_0x21fdf5)||_0x21fdf5<0x0)throw CliErrors['validation'](_0x232e71(0x14f));if(_0x21fdf5!==_0x162ea2)throw CliErrors[_0x232e71(0x13c)](_0x232e71(0x13f)+_0x21fdf5+_0x232e71(0x145)+_0x162ea2+'.',_0x232e71(0x159));}
@@ -1 +1 @@
1
- function a84_0x3afd(){const _0x1b7f07=['15LxeNuy','45151ghIlwB','db\x20link\x20','3202905OonaCR','dbName','12184464EXBbgp','3397506PoKpwL','2036772kHxeHr','2430491FAWhXy','301838olTfTb','num','DB_TABLE','appCode'];a84_0x3afd=function(){return _0x1b7f07;};return a84_0x3afd();}(function(_0x2be743,_0x1f122d){const _0x4f00ba=a84_0x31e4,_0x316e66=_0x2be743();while(!![]){try{const _0x3041b5=parseInt(_0x4f00ba(0x1de))/0x1+parseInt(_0x4f00ba(0x1d9))/0x2*(-parseInt(_0x4f00ba(0x1dd))/0x3)+parseInt(_0x4f00ba(0x1e4))/0x4+-parseInt(_0x4f00ba(0x1e0))/0x5+-parseInt(_0x4f00ba(0x1e3))/0x6+parseInt(_0x4f00ba(0x1d8))/0x7+parseInt(_0x4f00ba(0x1e2))/0x8;if(_0x3041b5===_0x1f122d)break;else _0x316e66['push'](_0x316e66['shift']());}catch(_0x1db346){_0x316e66['push'](_0x316e66['shift']());}}}(a84_0x3afd,0x71154));import{getDbLinkInfo,listDatasets}from'../../core/api-client.js';function a84_0x31e4(_0xf2338e,_0x2d5bad){_0xf2338e=_0xf2338e-0x1d8;const _0x3afd05=a84_0x3afd();let _0x31e43d=_0x3afd05[_0xf2338e];return _0x31e43d;}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':'detail','description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x14969e){const _0x3b6de6=a84_0x31e4,_0x59307b=_0x14969e[_0x3b6de6(0x1da)]('id'),_0x3ce5f8=await getDbLinkInfo(_0x59307b),_0x1cfe97=await listDatasets(_0x3ce5f8[_0x3b6de6(0x1dc)]||_0x14969e['appCode'],{'source':_0x3b6de6(0x1db)}),_0x2e144e=buildDbDatasetDependency(_0x3ce5f8,_0x1cfe97);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0x3ce5f8),'datasetDependency':_0x2e144e['datasetDependency']},'message':_0x3b6de6(0x1df)+_0x59307b+':\x20'+_0x3ce5f8[_0x3b6de6(0x1e1)]};}};
1
+ function a86_0x2514(_0x1cc346,_0x1a5373){_0x1cc346=_0x1cc346-0x145;const _0x168a87=a86_0x168a();let _0x2514b0=_0x168a87[_0x1cc346];return _0x2514b0;}const a86_0x4400b9=a86_0x2514;function a86_0x168a(){const _0x2e0c90=['9827964wjEjSW','2927004bQscIK','8bMhbSr','2225458AkVkPb','detail','4934531phAoBX','appCode','12sgtrSM','read','1596282yvkRck','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','946345SDvmJo','20PeAnmM','db\x20link\x20','DB_TABLE','datasetDependency','573504rdECyz','num'];a86_0x168a=function(){return _0x2e0c90;};return a86_0x168a();}(function(_0x1ed1a6,_0x365c97){const _0x1caafd=a86_0x2514,_0x427aa8=_0x1ed1a6();while(!![]){try{const _0x572b30=-parseInt(_0x1caafd(0x154))/0x1+-parseInt(_0x1caafd(0x147))/0x2+-parseInt(_0x1caafd(0x14d))/0x3+parseInt(_0x1caafd(0x14b))/0x4*(-parseInt(_0x1caafd(0x14f))/0x5)+parseInt(_0x1caafd(0x145))/0x6+parseInt(_0x1caafd(0x149))/0x7*(parseInt(_0x1caafd(0x146))/0x8)+-parseInt(_0x1caafd(0x156))/0x9*(-parseInt(_0x1caafd(0x150))/0xa);if(_0x572b30===_0x365c97)break;else _0x427aa8['push'](_0x427aa8['shift']());}catch(_0x4214f6){_0x427aa8['push'](_0x427aa8['shift']());}}}(a86_0x168a,0x90321));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_0x4400b9(0x148),'description':a86_0x4400b9(0x14e),'risk':a86_0x4400b9(0x14c),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1f7ba4){const _0x44f31d=a86_0x4400b9,_0x32c03c=_0x1f7ba4[_0x44f31d(0x155)]('id'),_0x59c89f=await getDbLinkInfo(_0x32c03c),_0x438461=await listDatasets(_0x59c89f['appCode']||_0x1f7ba4[_0x44f31d(0x14a)],{'source':_0x44f31d(0x152)}),_0x4e687a=buildDbDatasetDependency(_0x59c89f,_0x438461);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0x59c89f),'datasetDependency':_0x4e687a[_0x44f31d(0x153)]},'message':_0x44f31d(0x151)+_0x32c03c+':\x20'+_0x59c89f['dbName']};}};
@@ -1 +1 @@
1
- const a85_0x37696b=a85_0x42e9;(function(_0x2800dd,_0x388049){const _0x3a34a6=a85_0x42e9,_0x3fd359=_0x2800dd();while(!![]){try{const _0x3ebc0c=-parseInt(_0x3a34a6(0x96))/0x1*(parseInt(_0x3a34a6(0x9c))/0x2)+parseInt(_0x3a34a6(0x8b))/0x3+parseInt(_0x3a34a6(0x99))/0x4*(-parseInt(_0x3a34a6(0x92))/0x5)+parseInt(_0x3a34a6(0x91))/0x6*(-parseInt(_0x3a34a6(0x93))/0x7)+parseInt(_0x3a34a6(0xa0))/0x8+parseInt(_0x3a34a6(0x97))/0x9+parseInt(_0x3a34a6(0x9b))/0xa*(parseInt(_0x3a34a6(0x8c))/0xb);if(_0x3ebc0c===_0x388049)break;else _0x3fd359['push'](_0x3fd359['shift']());}catch(_0x17f5db){_0x3fd359['push'](_0x3fd359['shift']());}}}(a85_0x4ed6,0x272e4));import{startDbTableDiffRefresh}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a85_0x4ed6(){const _0x93a32f=['8925haZYrE','294613ehJMzv','num','diff-refresh-start','traceId','\x20--plan\x20','6aVRyra','630655ciGznA','2222892xEephu','trim','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','982YuvtPL','392301btiKSa','write','4KershZ','\x20db\x20diff-refresh-status\x20--id\x20','230VDwdcb','620MrJHAS','validation','\x20--format\x20compress','Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20','1968144kubLpe'];a85_0x4ed6=function(){return _0x93a32f;};return a85_0x4ed6();}function a85_0x42e9(_0x11552b,_0x2140a0){_0x11552b=_0x11552b-0x8b;const _0x4ed677=a85_0x4ed6();let _0x42e983=_0x4ed677[_0x11552b];return _0x42e983;}export const dbDiffRefreshStart={'service':'db','command':a85_0x37696b(0x8e),'description':'Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','risk':a85_0x37696b(0x98),'flags':[DBLINK_ID_FLAG],async 'execute'(_0x2409d8){const _0x531d63=a85_0x37696b,_0x45c13e=_0x2409d8[_0x531d63(0x8d)]('id'),_0x4c6680=await startDbTableDiffRefresh(_0x2409d8['appCode'],_0x45c13e),_0x5b3ed4=_0x4c6680[_0x531d63(0x8f)]?.[_0x531d63(0x94)]();if(!_0x5b3ed4)throw CliErrors[_0x531d63(0x9d)](_0x531d63(0x95));return{'ok':!![],'data':{'dbLinkId':_0x45c13e,'traceId':_0x5b3ed4,'status':_0x4c6680['status']??null,'query':{'command':CLI_BIN_NAME+_0x531d63(0x9a)+_0x45c13e+_0x531d63(0x90)+_0x5b3ed4+_0x531d63(0x9e)}},'message':_0x531d63(0x9f)+_0x45c13e};}};
1
+ const a87_0x46f1a4=a87_0x4d23;(function(_0x4b2f8e,_0x2bcfc3){const _0x1117e3=a87_0x4d23,_0x10056c=_0x4b2f8e();while(!![]){try{const _0x217d71=-parseInt(_0x1117e3(0x140))/0x1*(parseInt(_0x1117e3(0x139))/0x2)+parseInt(_0x1117e3(0x13e))/0x3*(parseInt(_0x1117e3(0x13c))/0x4)+parseInt(_0x1117e3(0x13b))/0x5+-parseInt(_0x1117e3(0x13a))/0x6*(parseInt(_0x1117e3(0x141))/0x7)+parseInt(_0x1117e3(0x137))/0x8+parseInt(_0x1117e3(0x144))/0x9+parseInt(_0x1117e3(0x142))/0xa*(-parseInt(_0x1117e3(0x143))/0xb);if(_0x217d71===_0x2bcfc3)break;else _0x10056c['push'](_0x10056c['shift']());}catch(_0x32a100){_0x10056c['push'](_0x10056c['shift']());}}}(a87_0x154e,0x6e12b));import{startDbTableDiffRefresh}from'../../core/api-client.js';function a87_0x4d23(_0x10e627,_0x39af3f){_0x10e627=_0x10e627-0x135;const _0x154eb0=a87_0x154e();let _0x4d23f9=_0x154eb0[_0x10e627];return _0x4d23f9;}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a87_0x154e(){const _0x214d9c=['831020STPtBU','77LwVMPW','7207659RAgzbc','Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','\x20--format\x20compress','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','\x20--plan\x20','4447400DArSpr','trim','2fOgHTK','121866LmGtFO','1691905vzQKKy','825168CrscoB','Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20','3wBrvdT','num','807943ZIYncn','21kIjiSD'];a87_0x154e=function(){return _0x214d9c;};return a87_0x154e();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbDiffRefreshStart={'service':'db','command':'diff-refresh-start','description':a87_0x46f1a4(0x145),'risk':'write','flags':[DBLINK_ID_FLAG],async 'execute'(_0x3eb587){const _0x3593e1=a87_0x46f1a4,_0x286a89=_0x3eb587[_0x3593e1(0x13f)]('id'),_0x270402=await startDbTableDiffRefresh(_0x3eb587['appCode'],_0x286a89),_0x4fdc57=_0x270402['traceId']?.[_0x3593e1(0x138)]();if(!_0x4fdc57)throw CliErrors['validation'](_0x3593e1(0x135));return{'ok':!![],'data':{'dbLinkId':_0x286a89,'traceId':_0x4fdc57,'status':_0x270402['status']??null,'query':{'command':CLI_BIN_NAME+'\x20db\x20diff-refresh-status\x20--id\x20'+_0x286a89+_0x3593e1(0x136)+_0x4fdc57+_0x3593e1(0x146)}},'message':_0x3593e1(0x13d)+_0x286a89};}};
@@ -1 +1 @@
1
- const a86_0x2e63de=a86_0x2501;(function(_0x4fb2d9,_0x7ea36d){const _0xc5d3c=a86_0x2501,_0x1132fb=_0x4fb2d9();while(!![]){try{const _0x59550b=-parseInt(_0xc5d3c(0x18d))/0x1+parseInt(_0xc5d3c(0x183))/0x2*(parseInt(_0xc5d3c(0x18b))/0x3)+parseInt(_0xc5d3c(0x195))/0x4+-parseInt(_0xc5d3c(0x192))/0x5*(parseInt(_0xc5d3c(0x182))/0x6)+parseInt(_0xc5d3c(0x18e))/0x7*(parseInt(_0xc5d3c(0x199))/0x8)+-parseInt(_0xc5d3c(0x184))/0x9*(-parseInt(_0xc5d3c(0x19c))/0xa)+-parseInt(_0xc5d3c(0x193))/0xb;if(_0x59550b===_0x7ea36d)break;else _0x1132fb['push'](_0x1132fb['shift']());}catch(_0x2cf2f5){_0x1132fb['push'](_0x1132fb['shift']());}}}(a86_0x5aa9,0x7471f));import{getDbAnalysisStatus}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a86_0x5aa9(){const _0x42d252=['15440hNQCHG','plan','str','264VLlkKb','86ZgTgoz','4833VUovRz','\x20--plan\x20','string','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','num','has','status','48333KLwaSz','UNKNOWN','487367MzmNKZ','241577pbJOrY','SUCCESS','RUNNING','read','290YRRzkm','14290892qSRqRY','CANCELLED','629848KxThEh','RETRYING','\x20db\x20diff-refresh-status\x20--id\x20','FAILED','136BAczSc','\x20--format\x20compress','Table-diff\x20refresh\x20status\x20for\x20'];a86_0x5aa9=function(){return _0x42d252;};return a86_0x5aa9();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a86_0x2501(_0x567fbf,_0x32ea74){_0x567fbf=_0x567fbf-0x182;const _0x5aa9bd=a86_0x5aa9();let _0x2501fd=_0x5aa9bd[_0x567fbf];return _0x2501fd;}const TERMINAL_STATUSES=new Set([a86_0x2e63de(0x18f),a86_0x2e63de(0x198),a86_0x2e63de(0x194)]),RUNNING_STATUSES=new Set(['PENDING',a86_0x2e63de(0x190),a86_0x2e63de(0x196)]);export const dbDiffRefreshStatus={'service':'db','command':'diff-refresh-status','description':a86_0x2e63de(0x187),'risk':a86_0x2e63de(0x191),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x2e63de(0x19d),'type':a86_0x2e63de(0x186),'required':!![],'description':'Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start'}],async 'execute'(_0x3fadad){const _0x2927dd=a86_0x2e63de,_0x4b6873=_0x3fadad[_0x2927dd(0x188)]('id'),_0x11570d=_0x3fadad[_0x2927dd(0x19e)](_0x2927dd(0x19d)),_0x830cbb=await getDbAnalysisStatus(_0x11570d),_0x47dfe8=_0x830cbb[_0x2927dd(0x18a)]??null,_0x516156=TERMINAL_STATUSES['has'](_0x47dfe8??''),_0xefcfcf=_0x47dfe8===_0x2927dd(0x18f),_0x1dd231=_0x516156||RUNNING_STATUSES[_0x2927dd(0x189)](_0x47dfe8??'');return{'ok':!![],'data':{'dbLinkId':_0x4b6873,'planId':_0x11570d,'status':_0x830cbb,'knownStatus':_0x1dd231,'isTerminal':_0x516156,'isSuccessful':_0xefcfcf,'query':_0x1dd231&&!_0x516156?{'command':CLI_BIN_NAME+_0x2927dd(0x197)+_0x4b6873+_0x2927dd(0x185)+_0x11570d+_0x2927dd(0x19a)}:null},'message':_0x2927dd(0x19b)+_0x11570d+':\x20'+(_0x47dfe8??_0x2927dd(0x18c))};}};
1
+ const a88_0x4756b9=a88_0x14db;(function(_0xd567b4,_0x38d304){const _0xe5d0ce=a88_0x14db,_0x143aec=_0xd567b4();while(!![]){try{const _0x4ba20a=parseInt(_0xe5d0ce(0x1e5))/0x1+-parseInt(_0xe5d0ce(0x1e0))/0x2*(-parseInt(_0xe5d0ce(0x1e3))/0x3)+parseInt(_0xe5d0ce(0x1f1))/0x4+parseInt(_0xe5d0ce(0x1ed))/0x5*(-parseInt(_0xe5d0ce(0x1e1))/0x6)+parseInt(_0xe5d0ce(0x1da))/0x7*(-parseInt(_0xe5d0ce(0x1de))/0x8)+parseInt(_0xe5d0ce(0x1f2))/0x9*(-parseInt(_0xe5d0ce(0x1f5))/0xa)+parseInt(_0xe5d0ce(0x1f4))/0xb*(parseInt(_0xe5d0ce(0x1e9))/0xc);if(_0x4ba20a===_0x38d304)break;else _0x143aec['push'](_0x143aec['shift']());}catch(_0x565d8f){_0x143aec['push'](_0x143aec['shift']());}}}(a88_0x5eab,0x9a02d));function a88_0x14db(_0x3d5559,_0x113900){_0x3d5559=_0x3d5559-0x1d9;const _0x5eabfd=a88_0x5eab();let _0x14db08=_0x5eabfd[_0x3d5559];return _0x14db08;}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';function a88_0x5eab(){const _0x10a6ca=['3ANCvWV','\x20--format\x20compress','623953fjECzg','string','num','has','6399924SdFhPx','CANCELLED','Table-diff\x20refresh\x20status\x20for\x20','UNKNOWN','853740zoWstJ','read','RETRYING','FAILED','2680340CvZNOY','1557TOdIdv','diff-refresh-status','11kbUFYg','44290Vrkoyf','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','SUCCESS','1981JBgpCQ','PENDING','plan','RUNNING','11872ibBkuw','status','1686786fvWyrr','30eZKDGq','\x20--plan\x20'];a88_0x5eab=function(){return _0x10a6ca;};return a88_0x5eab();}const TERMINAL_STATUSES=new Set([a88_0x4756b9(0x1d9),a88_0x4756b9(0x1f0),a88_0x4756b9(0x1ea)]),RUNNING_STATUSES=new Set([a88_0x4756b9(0x1db),a88_0x4756b9(0x1dd),a88_0x4756b9(0x1ef)]);export const dbDiffRefreshStatus={'service':'db','command':a88_0x4756b9(0x1f3),'description':a88_0x4756b9(0x1f6),'risk':a88_0x4756b9(0x1ee),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a88_0x4756b9(0x1dc),'type':a88_0x4756b9(0x1e6),'required':!![],'description':'Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start'}],async 'execute'(_0x4ed94f){const _0x423960=a88_0x4756b9,_0x44b0a3=_0x4ed94f[_0x423960(0x1e7)]('id'),_0x22564f=_0x4ed94f['str']('plan'),_0x5ad5c8=await getDbAnalysisStatus(_0x22564f),_0x545bed=_0x5ad5c8[_0x423960(0x1df)]??null,_0x304889=TERMINAL_STATUSES[_0x423960(0x1e8)](_0x545bed??''),_0x579000=_0x545bed==='SUCCESS',_0x574db5=_0x304889||RUNNING_STATUSES[_0x423960(0x1e8)](_0x545bed??'');return{'ok':!![],'data':{'dbLinkId':_0x44b0a3,'planId':_0x22564f,'status':_0x5ad5c8,'knownStatus':_0x574db5,'isTerminal':_0x304889,'isSuccessful':_0x579000,'query':_0x574db5&&!_0x304889?{'command':CLI_BIN_NAME+'\x20db\x20diff-refresh-status\x20--id\x20'+_0x44b0a3+_0x423960(0x1e2)+_0x22564f+_0x423960(0x1e4)}:null},'message':_0x423960(0x1eb)+_0x22564f+':\x20'+(_0x545bed??_0x423960(0x1ec))};}};
@@ -1 +1 @@
1
- function a87_0xbd22(){const _0x3db9d7=['summary','tableName','pagesize','55041zgZcRu','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','201340hNGgSr','234dmfyjd','2705096POThxA','totalCount','appCode','length','363490EFzVoS','910686aWlHbz','datasetTableCount','Page\x20size','table','MODIFIED_TABLE','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','all','filter','\x20(db\x20link\x20','fieldDiff','num','map','134leuWPd','81266aLIbzz','tableList','diff','boolean','read','28hTDKFt','addedColumns','page','\x20changed\x20table\x20row(s),\x20total\x20','string','Page\x20index\x20(1-based)','diffType','number','NEW_TABLE','str','2584538SVMwMv','55vIJFCX','DELETED_TABLE'];a87_0xbd22=function(){return _0x3db9d7;};return a87_0xbd22();}const a87_0x56f5ac=a87_0x4e53;(function(_0x35e730,_0x102e2c){const _0x27065a=a87_0x4e53,_0xa6fba7=_0x35e730();while(!![]){try{const _0x4c17e1=-parseInt(_0x27065a(0x19a))/0x1+-parseInt(_0x27065a(0x199))/0x2*(parseInt(_0x27065a(0x184))/0x3)+-parseInt(_0x27065a(0x186))/0x4*(parseInt(_0x27065a(0x17f))/0x5)+parseInt(_0x27065a(0x18d))/0x6+parseInt(_0x27065a(0x19f))/0x7*(parseInt(_0x27065a(0x188))/0x8)+-parseInt(_0x27065a(0x187))/0x9*(-parseInt(_0x27065a(0x18c))/0xa)+parseInt(_0x27065a(0x17e))/0xb;if(_0x4c17e1===_0x102e2c)break;else _0xa6fba7['push'](_0xa6fba7['shift']());}catch(_0x20f92f){_0xa6fba7['push'](_0xa6fba7['shift']());}}}(a87_0xbd22,0xc83c1));import{getDbTableDiff}from'../../core/api-client.js';function a87_0x4e53(_0x54d306,_0x50e3ac){_0x54d306=_0x54d306-0x178;const _0xbd222c=a87_0xbd22();let _0x4e5367=_0xbd222c[_0x54d306];return _0x4e5367;}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':a87_0x56f5ac(0x19c),'description':a87_0x56f5ac(0x192),'risk':a87_0x56f5ac(0x19e),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a87_0x56f5ac(0x190),'type':a87_0x56f5ac(0x178),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a87_0x56f5ac(0x1a1),'type':a87_0x56f5ac(0x17b),'description':a87_0x56f5ac(0x179),'default':0x1},{'name':a87_0x56f5ac(0x183),'type':a87_0x56f5ac(0x17b),'description':a87_0x56f5ac(0x18f),'default':0x14},{'name':a87_0x56f5ac(0x193),'type':a87_0x56f5ac(0x19d),'description':a87_0x56f5ac(0x185)}],async 'execute'(_0x3e917c){const _0x3a5dbe=a87_0x56f5ac,_0x18b425=_0x3e917c[_0x3a5dbe(0x197)]('id'),_0x18594f=_0x3e917c['bool'](_0x3a5dbe(0x193)),_0x485962=_0x18594f?0x1:_0x3e917c['num'](_0x3a5dbe(0x1a1),0x1)||0x1,_0x3fc832=_0x18594f?DB_TABLE_PAGE_SIZE:_0x3e917c['num'](_0x3a5dbe(0x183),0x14)||0x14,_0x464eb9=_0x3e917c[_0x3a5dbe(0x17d)](_0x3a5dbe(0x190))||undefined,_0x1d56d5=_0x18594f?await getAllDbTableDiff(getDbTableDiff,_0x3e917c['appCode'],_0x18b425,_0x464eb9):await getDbTableDiff(_0x3e917c[_0x3a5dbe(0x18a)],_0x18b425,{'pageIndex':_0x485962,'pageSize':_0x3fc832,'tableName':_0x464eb9}),_0x164582=_0x1d56d5[_0x3a5dbe(0x19b)],_0x1fe874=summarizeDbTableDiff(_0x164582),_0x277a22=_0x164582[_0x3a5dbe(0x194)](_0x233b76=>_0x233b76[_0x3a5dbe(0x17a)]===_0x3a5dbe(0x17c)||_0x233b76[_0x3a5dbe(0x17a)]===_0x3a5dbe(0x191))[_0x3a5dbe(0x198)](_0x225001=>_0x225001[_0x3a5dbe(0x182)]),_0x5bf47b=_0x164582[_0x3a5dbe(0x194)](_0x351aa3=>_0x351aa3[_0x3a5dbe(0x17a)]===_0x3a5dbe(0x180))['map'](_0xf91997=>_0xf91997['tableName']),_0x3b356a=_0x164582[_0x3a5dbe(0x194)](_0x3dd7c3=>_0x3dd7c3[_0x3a5dbe(0x17a)]===_0x3a5dbe(0x191))[_0x3a5dbe(0x198)](_0x1baf4d=>({'tableName':_0x1baf4d['tableName'],'addedColumns':_0x1baf4d[_0x3a5dbe(0x196)]?.[_0x3a5dbe(0x1a0)]??[],'deletedColumns':_0x1baf4d['fieldDiff']?.['deletedColumns']??[],'modifiedColumns':_0x1baf4d['fieldDiff']?.['modifiedColumns']??[]}));return{'ok':!![],'data':{'dbLinkId':_0x18b425,'page':_0x485962,'pageSize':_0x3fc832,'totalCount':_0x1d56d5[_0x3a5dbe(0x189)],...typeof _0x1d56d5['physicalTableCount']===_0x3a5dbe(0x17b)?{'physicalTableCount':_0x1d56d5['physicalTableCount']}:{},...typeof _0x1d56d5[_0x3a5dbe(0x18e)]===_0x3a5dbe(0x17b)?{'datasetTableCount':_0x1d56d5[_0x3a5dbe(0x18e)]}:{},..._0x1d56d5[_0x3a5dbe(0x181)]?{'summary':_0x1d56d5[_0x3a5dbe(0x181)]}:{},'summaryByType':_0x1fe874,'toAnalyzeTables':_0x277a22,'deletedTables':_0x5bf47b,'modifiedFieldDiffs':_0x3b356a,'tables':_0x164582},'message':_0x164582[_0x3a5dbe(0x18b)]+_0x3a5dbe(0x1a2)+_0x1d56d5['totalCount']+_0x3a5dbe(0x195)+_0x18b425+')'};}};
1
+ const a89_0x44a567=a89_0x564f;(function(_0x278db6,_0x3fae80){const _0x5cb72c=a89_0x564f,_0x188b6b=_0x278db6();while(!![]){try{const _0x36d3c8=parseInt(_0x5cb72c(0x1a8))/0x1*(parseInt(_0x5cb72c(0x1a9))/0x2)+parseInt(_0x5cb72c(0x1ad))/0x3*(-parseInt(_0x5cb72c(0x1c1))/0x4)+-parseInt(_0x5cb72c(0x1a1))/0x5+parseInt(_0x5cb72c(0x1b0))/0x6*(-parseInt(_0x5cb72c(0x1b8))/0x7)+-parseInt(_0x5cb72c(0x1bd))/0x8*(-parseInt(_0x5cb72c(0x1a4))/0x9)+-parseInt(_0x5cb72c(0x1c5))/0xa+-parseInt(_0x5cb72c(0x19f))/0xb*(-parseInt(_0x5cb72c(0x1bb))/0xc);if(_0x36d3c8===_0x3fae80)break;else _0x188b6b['push'](_0x188b6b['shift']());}catch(_0x265f7e){_0x188b6b['push'](_0x188b6b['shift']());}}}(a89_0x210e,0x4babf));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':a89_0x44a567(0x1c6),'description':a89_0x44a567(0x1be),'risk':a89_0x44a567(0x1b9),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a89_0x44a567(0x1c4),'type':a89_0x44a567(0x1c9),'description':a89_0x44a567(0x1a5)},{'name':'page','type':a89_0x44a567(0x19c),'description':a89_0x44a567(0x1b5),'default':0x1},{'name':a89_0x44a567(0x1bc),'type':a89_0x44a567(0x19c),'description':a89_0x44a567(0x1a3),'default':0x14},{'name':a89_0x44a567(0x1af),'type':a89_0x44a567(0x19e),'description':a89_0x44a567(0x1b4)}],async 'execute'(_0x3e2477){const _0x554ed6=a89_0x44a567,_0x7171b9=_0x3e2477[_0x554ed6(0x1a7)]('id'),_0x5ac218=_0x3e2477[_0x554ed6(0x1c0)](_0x554ed6(0x1af)),_0xe65377=_0x5ac218?0x1:_0x3e2477[_0x554ed6(0x1a7)](_0x554ed6(0x1c7),0x1)||0x1,_0x40f575=_0x5ac218?DB_TABLE_PAGE_SIZE:_0x3e2477[_0x554ed6(0x1a7)](_0x554ed6(0x1bc),0x14)||0x14,_0x123949=_0x3e2477[_0x554ed6(0x1ab)](_0x554ed6(0x1c4))||undefined,_0x454f62=_0x5ac218?await getAllDbTableDiff(getDbTableDiff,_0x3e2477[_0x554ed6(0x1b2)],_0x7171b9,_0x123949):await getDbTableDiff(_0x3e2477[_0x554ed6(0x1b2)],_0x7171b9,{'pageIndex':_0xe65377,'pageSize':_0x40f575,'tableName':_0x123949}),_0x286246=_0x454f62['tableList'],_0x5e6d91=summarizeDbTableDiff(_0x286246),_0x49c251=_0x286246[_0x554ed6(0x1a2)](_0x2e9b57=>_0x2e9b57[_0x554ed6(0x1c3)]==='NEW_TABLE'||_0x2e9b57[_0x554ed6(0x1c3)]===_0x554ed6(0x1a0))['map'](_0x3bf2bf=>_0x3bf2bf['tableName']),_0x4305f5=_0x286246['filter'](_0x5cf96f=>_0x5cf96f[_0x554ed6(0x1c3)]===_0x554ed6(0x1aa))[_0x554ed6(0x1ba)](_0xacc09=>_0xacc09[_0x554ed6(0x1c2)]),_0x32f744=_0x286246[_0x554ed6(0x1a2)](_0x11b674=>_0x11b674[_0x554ed6(0x1c3)]===_0x554ed6(0x1a0))['map'](_0x1af34b=>({'tableName':_0x1af34b[_0x554ed6(0x1c2)],'addedColumns':_0x1af34b[_0x554ed6(0x1ae)]?.['addedColumns']??[],'deletedColumns':_0x1af34b[_0x554ed6(0x1ae)]?.[_0x554ed6(0x1ac)]??[],'modifiedColumns':_0x1af34b['fieldDiff']?.[_0x554ed6(0x1a6)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x7171b9,'page':_0xe65377,'pageSize':_0x40f575,'totalCount':_0x454f62[_0x554ed6(0x1b6)],...typeof _0x454f62['physicalTableCount']===_0x554ed6(0x19c)?{'physicalTableCount':_0x454f62[_0x554ed6(0x1c8)]}:{},...typeof _0x454f62[_0x554ed6(0x1bf)]===_0x554ed6(0x19c)?{'datasetTableCount':_0x454f62[_0x554ed6(0x1bf)]}:{},..._0x454f62[_0x554ed6(0x1b3)]?{'summary':_0x454f62[_0x554ed6(0x1b3)]}:{},'summaryByType':_0x5e6d91,'toAnalyzeTables':_0x49c251,'deletedTables':_0x4305f5,'modifiedFieldDiffs':_0x32f744,'tables':_0x286246},'message':_0x286246[_0x554ed6(0x1b7)]+_0x554ed6(0x1b1)+_0x454f62[_0x554ed6(0x1b6)]+_0x554ed6(0x19d)+_0x7171b9+')'};}};function a89_0x564f(_0x2ea2d3,_0x17a6c3){_0x2ea2d3=_0x2ea2d3-0x19c;const _0x210e68=a89_0x210e();let _0x564f2f=_0x210e68[_0x2ea2d3];return _0x564f2f;}function a89_0x210e(){const _0x288fcc=['211034KAyEnb','DELETED_TABLE','str','deletedColumns','546591TaNKAa','fieldDiff','all','6RJPbyx','\x20changed\x20table\x20row(s),\x20total\x20','appCode','summary','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','Page\x20index\x20(1-based)','totalCount','length','787591crOwyX','read','map','1812gyXcPj','pagesize','48296jAlLOL','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','datasetTableCount','bool','12GwJWQL','tableName','diffType','table','3117980lbKOLh','diff','page','physicalTableCount','string','number','\x20(db\x20link\x20','boolean','109417QToECy','MODIFIED_TABLE','1995525RjmGOv','filter','Page\x20size','108sKBXsD','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','modifiedColumns','num','1juItMu'];a89_0x210e=function(){return _0x288fcc;};return a89_0x210e();}
@@ -1 +1 @@
1
- (function(_0x300956,_0x3cdb3e){const _0x2e901=a88_0x41fd,_0x5ecc7c=_0x300956();while(!![]){try{const _0x2da352=parseInt(_0x2e901(0xb5))/0x1*(-parseInt(_0x2e901(0xb2))/0x2)+parseInt(_0x2e901(0xb4))/0x3*(-parseInt(_0x2e901(0xb9))/0x4)+parseInt(_0x2e901(0xb6))/0x5+-parseInt(_0x2e901(0xba))/0x6*(parseInt(_0x2e901(0xb3))/0x7)+parseInt(_0x2e901(0xb8))/0x8+parseInt(_0x2e901(0xb7))/0x9+parseInt(_0x2e901(0xbb))/0xa;if(_0x2da352===_0x3cdb3e)break;else _0x5ecc7c['push'](_0x5ecc7c['shift']());}catch(_0x34ed08){_0x5ecc7c['push'](_0x5ecc7c['shift']());}}}(a88_0x5130,0xeff07));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';function a88_0x41fd(_0x4f8c1b,_0x25dca6){_0x4f8c1b=_0x4f8c1b-0xb2;const _0x5130a1=a88_0x5130();let _0x41fd7b=_0x5130a1[_0x4f8c1b];return _0x41fd7b;}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';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';function a88_0x5130(){const _0x32c415=['107lkWAOG','6539190tZcNAN','750195fSlstH','11399568VZBUct','4XicXya','2212806pPxSwm','29680950pLNrRe','29678BPkzZI','28hNikIq','5215398drFEQN'];a88_0x5130=function(){return _0x32c415;};return a88_0x5130();}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];
1
+ (function(_0x608fba,_0x796728){const _0x4e4224=a90_0x5b55,_0x2c1489=_0x608fba();while(!![]){try{const _0x523ced=-parseInt(_0x4e4224(0x195))/0x1*(-parseInt(_0x4e4224(0x192))/0x2)+-parseInt(_0x4e4224(0x191))/0x3+-parseInt(_0x4e4224(0x193))/0x4+parseInt(_0x4e4224(0x197))/0x5+-parseInt(_0x4e4224(0x194))/0x6+parseInt(_0x4e4224(0x190))/0x7+parseInt(_0x4e4224(0x196))/0x8;if(_0x523ced===_0x796728)break;else _0x2c1489['push'](_0x2c1489['shift']());}catch(_0x31b605){_0x2c1489['push'](_0x2c1489['shift']());}}}(a90_0x54ff,0xee03e));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_0x5b55(_0x2ca789,_0x209bd1){_0x2ca789=_0x2ca789-0x190;const _0x54ff21=a90_0x54ff();let _0x5b5558=_0x54ff21[_0x2ca789];return _0x5b5558;}import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';function a90_0x54ff(){const _0x274bc7=['1WtWwqZ','19501200uYeHky','326605SMbxHu','2080022CtUOFB','3770451CpMdXY','266222ZxhzeY','2578444PxEVly','341340fPbHzT'];a90_0x54ff=function(){return _0x274bc7;};return a90_0x54ff();}import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
@@ -1 +1 @@
1
- function a89_0x29b2(_0x3c13b9,_0x5c4c8d){_0x3c13b9=_0x3c13b9-0x77;const _0x24b229=a89_0x24b2();let _0x29b220=_0x24b229[_0x3c13b9];return _0x29b220;}const a89_0x180b31=a89_0x29b2;(function(_0x522bb4,_0xd04dfe){const _0x33f7ee=a89_0x29b2,_0x3db2ba=_0x522bb4();while(!![]){try{const _0x3ff399=-parseInt(_0x33f7ee(0x80))/0x1+-parseInt(_0x33f7ee(0x7e))/0x2+-parseInt(_0x33f7ee(0x7a))/0x3*(parseInt(_0x33f7ee(0x82))/0x4)+parseInt(_0x33f7ee(0x86))/0x5*(parseInt(_0x33f7ee(0x7b))/0x6)+parseInt(_0x33f7ee(0x88))/0x7+-parseInt(_0x33f7ee(0x85))/0x8*(-parseInt(_0x33f7ee(0x8b))/0x9)+parseInt(_0x33f7ee(0x77))/0xa;if(_0x3ff399===_0xd04dfe)break;else _0x3db2ba['push'](_0x3db2ba['shift']());}catch(_0x307bc9){_0x3db2ba['push'](_0x3db2ba['shift']());}}}(a89_0x24b2,0x60fd8));import{listDatasets,listDbLinks}from'../../core/api-client.js';function a89_0x24b2(){const _0x44afcb=['page','4448038lGBGmA','DB_TABLE','length','3627279luWdJR','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','1202380SzwmRd','number','read','92628jLlQtJ','12lviQnp','all','Page\x20size','1256972ovjAvd','num','48587IERHTX','pagesize','76ruahSI','appCode','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','8Sjpfri','1255715vaNAzl'];a89_0x24b2=function(){return _0x44afcb;};return a89_0x24b2();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':'list','description':a89_0x180b31(0x8d),'risk':a89_0x180b31(0x79),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a89_0x180b31(0x87),'type':a89_0x180b31(0x78),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a89_0x180b31(0x81),'type':a89_0x180b31(0x78),'description':a89_0x180b31(0x7d),'default':0x64}],async 'execute'(_0x594f9e){const _0x311cc5=a89_0x180b31,_0x2b3a7d=_0x594f9e[_0x311cc5(0x7f)](_0x311cc5(0x87),0x1)||0x1,_0x389804=_0x594f9e['num'](_0x311cc5(0x81),0x64)||0x64,[{items:_0xd93519,paging:_0x34961c},_0x4dd51f]=await Promise[_0x311cc5(0x7c)]([listDbLinks(_0x594f9e['appCode'],{'currentPage':_0x2b3a7d,'pageSize':_0x389804}),listDatasets(_0x594f9e[_0x311cc5(0x83)],{'source':_0x311cc5(0x89)})]),_0x453409=_0xd93519['map'](_0x5e3a7d=>({...sanitizeDbLinkForOutput(_0x5e3a7d),'datasetDependency':buildDbDatasetDependency(_0x5e3a7d,_0x4dd51f)[_0x311cc5(0x8c)]})),_0x469555=_0x34961c?_0x34961c:{'currentPage':_0x2b3a7d,'pageSize':_0x389804,'rowsOnPage':_0x453409[_0x311cc5(0x8a)],'totalCount':null,'note':_0x311cc5(0x84)};return{'ok':!![],'data':{'connections':_0x453409,'paging':_0x469555},'message':'Found\x20'+_0x453409['length']+'\x20database\x20connection(s)'};}};
1
+ function a91_0x2661(_0x22bd79,_0x4575ca){_0x22bd79=_0x22bd79-0x134;const _0xf22667=a91_0xf226();let _0x266185=_0xf22667[_0x22bd79];return _0x266185;}const a91_0x133e4e=a91_0x2661;(function(_0x114ab8,_0x15565c){const _0x5aaefc=a91_0x2661,_0x30cd86=_0x114ab8();while(!![]){try{const _0x332b06=parseInt(_0x5aaefc(0x143))/0x1*(parseInt(_0x5aaefc(0x136))/0x2)+parseInt(_0x5aaefc(0x14e))/0x3*(-parseInt(_0x5aaefc(0x144))/0x4)+parseInt(_0x5aaefc(0x147))/0x5*(parseInt(_0x5aaefc(0x13d))/0x6)+-parseInt(_0x5aaefc(0x13c))/0x7*(parseInt(_0x5aaefc(0x14c))/0x8)+-parseInt(_0x5aaefc(0x13e))/0x9+parseInt(_0x5aaefc(0x137))/0xa*(-parseInt(_0x5aaefc(0x13a))/0xb)+parseInt(_0x5aaefc(0x148))/0xc*(parseInt(_0x5aaefc(0x13f))/0xd);if(_0x332b06===_0x15565c)break;else _0x30cd86['push'](_0x30cd86['shift']());}catch(_0x3becd4){_0x30cd86['push'](_0x30cd86['shift']());}}}(a91_0xf226,0xf222a));function a91_0xf226(){const _0x59e697=['list','1958603goRXob','288DttGUa','appCode','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','2414745zRGPFE','18497148VlsVNN','Page\x20size','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','map','128872CThTwN','DB_TABLE','76500qzNist','all','\x20database\x20connection(s)','2AoTUgc','183390ZBQifs','pagesize','number','803CPurGC','datasetDependency','63LbiXgJ','6AEAyAq','10916064iYVell','26JNCUtk','length','num'];a91_0xf226=function(){return _0x59e697;};return a91_0xf226();}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_0x133e4e(0x142),'description':a91_0x133e4e(0x146),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':a91_0x133e4e(0x139),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a91_0x133e4e(0x138),'type':a91_0x133e4e(0x139),'description':a91_0x133e4e(0x149),'default':0x64}],async 'execute'(_0x39193b){const _0x3083f8=a91_0x133e4e,_0x203ed2=_0x39193b[_0x3083f8(0x141)]('page',0x1)||0x1,_0x2863f0=_0x39193b[_0x3083f8(0x141)](_0x3083f8(0x138),0x64)||0x64,[{items:_0x1d2f2b,paging:_0x5d5a20},_0x5c4f43]=await Promise[_0x3083f8(0x134)]([listDbLinks(_0x39193b['appCode'],{'currentPage':_0x203ed2,'pageSize':_0x2863f0}),listDatasets(_0x39193b[_0x3083f8(0x145)],{'source':_0x3083f8(0x14d)})]),_0x309cac=_0x1d2f2b[_0x3083f8(0x14b)](_0xe050d2=>({...sanitizeDbLinkForOutput(_0xe050d2),'datasetDependency':buildDbDatasetDependency(_0xe050d2,_0x5c4f43)[_0x3083f8(0x13b)]})),_0x211546=_0x5d5a20?_0x5d5a20:{'currentPage':_0x203ed2,'pageSize':_0x2863f0,'rowsOnPage':_0x309cac[_0x3083f8(0x140)],'totalCount':null,'note':_0x3083f8(0x14a)};return{'ok':!![],'data':{'connections':_0x309cac,'paging':_0x211546},'message':'Found\x20'+_0x309cac[_0x3083f8(0x140)]+_0x3083f8(0x135)};}};
@@ -1 +1 @@
1
- (function(_0x33911e,_0x97a544){const _0x27f614=a90_0x3c61,_0x1e8cdc=_0x33911e();while(!![]){try{const _0x26b84f=-parseInt(_0x27f614(0x1cd))/0x1+parseInt(_0x27f614(0x1c8))/0x2*(parseInt(_0x27f614(0x1d8))/0x3)+parseInt(_0x27f614(0x1d7))/0x4*(-parseInt(_0x27f614(0x1eb))/0x5)+-parseInt(_0x27f614(0x1e9))/0x6*(-parseInt(_0x27f614(0x1e0))/0x7)+-parseInt(_0x27f614(0x1db))/0x8+parseInt(_0x27f614(0x1e8))/0x9+-parseInt(_0x27f614(0x1e4))/0xa*(-parseInt(_0x27f614(0x1dc))/0xb);if(_0x26b84f===_0x97a544)break;else _0x1e8cdc['push'](_0x1e8cdc['shift']());}catch(_0x14c799){_0x1e8cdc['push'](_0x1e8cdc['shift']());}}}(a90_0xa583,0x928ee));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x71ae9){const _0x2d00a1=a90_0x3c61,_0x355c93=_0x71ae9['toLowerCase']();if(_0x355c93===_0x2d00a1(0x1d6)||_0x355c93===_0x2d00a1(0x1cb)||_0x355c93==='dbpassword')return!![];if(_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1e5))||_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1e1))||_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1e7)))return!![];if(_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1c9))||_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1d4)))return!![];if(_0x355c93===_0x2d00a1(0x1ca)||_0x355c93===_0x2d00a1(0x1cc)||_0x355c93===_0x2d00a1(0x1d9))return!![];return![];}export function sanitizeDbLinkForOutput(_0x7e9ce1){const _0x5b5751=a90_0x3c61,_0x4963c7={..._0x7e9ce1};delete _0x4963c7[_0x5b5751(0x1d1)];for(const _0xcea8b5 of Object[_0x5b5751(0x1ec)](_0x4963c7)){if(!shouldRedactKey(_0xcea8b5))continue;const _0x3b37c7=_0x4963c7[_0xcea8b5];_0x3b37c7!=null&&String(_0x3b37c7)[_0x5b5751(0x1da)]>0x0&&(_0x4963c7[_0xcea8b5]='[redacted]');}return _0x4963c7;}function a90_0xa583(){const _0x516e5b=['includes','2296706AtEvrS','privatekey','authorization','passwd','connectionstring','817847BrwCNi','map','/data/database','filter','hasAvailableDo','code','dbtableConfig','accesskey','/data/er?dbId=','password','79268MvohLG','3WcnFgq','jdbcurl','length','7158480nzGHri','5124449RUhfJF','Database\x20connection\x20preflight\x20failed.','dbId','trim','7gDgZHM','token','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','test','30YmVUEq','secret','name','credential','1565991cTsxps','1006338QlrcOb','isFinite','145bbelZn','keys'];a90_0xa583=function(){return _0x516e5b;};return a90_0xa583();}export function sanitizeDbLinkList(_0x301546){const _0x4f2bec=a90_0x3c61;return _0x301546[_0x4f2bec(0x1ce)](_0x4c4265=>sanitizeDbLinkForOutput(_0x4c4265));}export function buildDbDatasetDependency(_0x27d9ab,_0x640e5c){const _0x518222=a90_0x3c61,_0x1d22db=_0x640e5c[_0x518222(0x1d0)](_0x144c72=>Number(_0x144c72[_0x518222(0x1d3)]?.[_0x518222(0x1de)])===Number(_0x27d9ab['id']))['map'](_0x524896=>({'id':_0x524896['id'],'code':_0x524896[_0x518222(0x1d2)],'name':_0x524896[_0x518222(0x1e6)],..._0x524896[_0x518222(0x1d3)]?.['tableName']?{'tableName':_0x524896['dbtableConfig']['tableName']}:{}}));return{'datasetDependency':{'hasDependencies':_0x1d22db[_0x518222(0x1da)]>0x0,'activeDatasetCount':_0x1d22db[_0x518222(0x1da)]},'datasets':_0x1d22db};}export async function assertDbLinkConnectionPreflight(_0x363361){const _0x1bb55c=a90_0x3c61,_0xba18b8=await testDbLinkConfigConnect(_0x363361);if(_0xba18b8!==!![])throw CliErrors['apiError'](_0x1bb55c(0x1dd),_0x1bb55c(0x1e2));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;function a90_0x3c61(_0x533d4c,_0x12dc92){_0x533d4c=_0x533d4c-0x1c7;const _0xa58394=a90_0xa583();let _0x3c61a8=_0xa58394[_0x533d4c];return _0x3c61a8;}export function validateDbUrl(_0xe34e3f){const _0x562e5c=a90_0x3c61,_0x251890=_0xe34e3f[_0x562e5c(0x1df)]();if(!_0x251890)return![];return DB_URL_PATTERN[_0x562e5c(0x1e3)](_0x251890);}export function buildDbPageLinks(_0x2fcfb4,_0x15787e){const _0x17aeb6=a90_0x3c61,_0x25ef3b=_0x2fcfb4?.[_0x17aeb6(0x1df)]();if(!_0x25ef3b)return undefined;const _0x39ad57=typeof _0x15787e==='number'?String(_0x15787e):String(_0x15787e??'')['trim']();if(!_0x39ad57)return undefined;const _0x16700d=Number(_0x39ad57);if(!Number[_0x17aeb6(0x1ea)](_0x16700d)||_0x16700d<=0x0)return undefined;const _0x423f59=getAppBaseUrl(_0x25ef3b),_0x1862a9=encodeURIComponent(String(_0x16700d));return{'databasePage':_0x423f59+_0x17aeb6(0x1cf),'erPage':_0x423f59+_0x17aeb6(0x1d5)+_0x1862a9};}
1
+ (function(_0x1320af,_0x194945){const _0xde6178=a92_0x2af0,_0x121c2d=_0x1320af();while(!![]){try{const _0xefeb59=-parseInt(_0xde6178(0x1f6))/0x1*(-parseInt(_0xde6178(0x20b))/0x2)+-parseInt(_0xde6178(0x1f0))/0x3+-parseInt(_0xde6178(0x201))/0x4+parseInt(_0xde6178(0x203))/0x5*(parseInt(_0xde6178(0x20e))/0x6)+-parseInt(_0xde6178(0x1fb))/0x7+-parseInt(_0xde6178(0x206))/0x8+parseInt(_0xde6178(0x1fe))/0x9;if(_0xefeb59===_0x194945)break;else _0x121c2d['push'](_0x121c2d['shift']());}catch(_0x4e2d32){_0x121c2d['push'](_0x121c2d['shift']());}}}(a92_0x1551,0xec705));import{testDbLinkConfigConnect}from'../../core/api-client.js';function a92_0x1551(){const _0xc1dc98=['map','6383456lUQwOH','dbId','credential','filter','hasAvailableDo','2CEOPMy','token','jdbcurl','72OcAeht','secret','toLowerCase','name','696177osvUse','trim','privatekey','authorization','includes','accesskey','755169IOvwOP','isFinite','[redacted]','connectionstring','dbtableConfig','1319388yNZkNn','tableName','passwd','11388843mIfPtF','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','length','4985088abCqpW','Database\x20connection\x20preflight\x20failed.','588585gBeFKN','keys'];a92_0x1551=function(){return _0xc1dc98;};return a92_0x1551();}import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x3a90bd){const _0x2b4665=a92_0x2af0,_0x14f929=_0x3a90bd[_0x2b4665(0x1ee)]();if(_0x14f929==='password'||_0x14f929===_0x2b4665(0x1fd)||_0x14f929==='dbpassword')return!![];if(_0x14f929[_0x2b4665(0x1f4)](_0x2b4665(0x1ed))||_0x14f929[_0x2b4665(0x1f4)](_0x2b4665(0x20c))||_0x14f929[_0x2b4665(0x1f4)](_0x2b4665(0x208)))return!![];if(_0x14f929[_0x2b4665(0x1f4)](_0x2b4665(0x1f2))||_0x14f929['includes'](_0x2b4665(0x1f5)))return!![];if(_0x14f929===_0x2b4665(0x1f3)||_0x14f929===_0x2b4665(0x1f9)||_0x14f929===_0x2b4665(0x20d))return!![];return![];}export function sanitizeDbLinkForOutput(_0x2a83c6){const _0x1410bc=a92_0x2af0,_0x308c7e={..._0x2a83c6};delete _0x308c7e[_0x1410bc(0x20a)];for(const _0x18ae33 of Object[_0x1410bc(0x204)](_0x308c7e)){if(!shouldRedactKey(_0x18ae33))continue;const _0xa4a7b8=_0x308c7e[_0x18ae33];_0xa4a7b8!=null&&String(_0xa4a7b8)[_0x1410bc(0x200)]>0x0&&(_0x308c7e[_0x18ae33]=_0x1410bc(0x1f8));}return _0x308c7e;}export function sanitizeDbLinkList(_0xd3bcfd){return _0xd3bcfd['map'](_0x3fc8ea=>sanitizeDbLinkForOutput(_0x3fc8ea));}function a92_0x2af0(_0x5bc355,_0x36c192){_0x5bc355=_0x5bc355-0x1ed;const _0x155121=a92_0x1551();let _0x2af056=_0x155121[_0x5bc355];return _0x2af056;}export function buildDbDatasetDependency(_0x560104,_0x417eec){const _0x5da6fe=a92_0x2af0,_0x4f8534=_0x417eec[_0x5da6fe(0x209)](_0x1bb30e=>Number(_0x1bb30e[_0x5da6fe(0x1fa)]?.[_0x5da6fe(0x207)])===Number(_0x560104['id']))[_0x5da6fe(0x205)](_0x292f59=>({'id':_0x292f59['id'],'code':_0x292f59['code'],'name':_0x292f59[_0x5da6fe(0x1ef)],..._0x292f59[_0x5da6fe(0x1fa)]?.[_0x5da6fe(0x1fc)]?{'tableName':_0x292f59['dbtableConfig'][_0x5da6fe(0x1fc)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x4f8534[_0x5da6fe(0x200)]>0x0,'activeDatasetCount':_0x4f8534[_0x5da6fe(0x200)]},'datasets':_0x4f8534};}export async function assertDbLinkConnectionPreflight(_0x1d05e5){const _0x5e6d1a=a92_0x2af0,_0x5c27f7=await testDbLinkConfigConnect(_0x1d05e5);if(_0x5c27f7!==!![])throw CliErrors['apiError'](_0x5e6d1a(0x202),_0x5e6d1a(0x1ff));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x241fe6){const _0x396d5e=a92_0x2af0,_0x720228=_0x241fe6[_0x396d5e(0x1f1)]();if(!_0x720228)return![];return DB_URL_PATTERN['test'](_0x720228);}export function buildDbPageLinks(_0x248ec7,_0xe99d73){const _0x28df2c=a92_0x2af0,_0x580310=_0x248ec7?.[_0x28df2c(0x1f1)]();if(!_0x580310)return undefined;const _0x287ed6=typeof _0xe99d73==='number'?String(_0xe99d73):String(_0xe99d73??'')['trim']();if(!_0x287ed6)return undefined;const _0x293f95=Number(_0x287ed6);if(!Number[_0x28df2c(0x1f7)](_0x293f95)||_0x293f95<=0x0)return undefined;const _0x239f70=getAppBaseUrl(_0x580310),_0x3f6714=encodeURIComponent(String(_0x293f95));return{'databasePage':_0x239f70+'/data/database','erPage':_0x239f70+'/data/er?dbId='+_0x3f6714};}
@@ -1 +1 @@
1
- const a91_0x4d7456=a91_0x2f5f;(function(_0x593bbc,_0x5924d8){const _0x4e4906=a91_0x2f5f,_0xe995b9=_0x593bbc();while(!![]){try{const _0x51f826=parseInt(_0x4e4906(0x1bb))/0x1*(-parseInt(_0x4e4906(0x1c5))/0x2)+-parseInt(_0x4e4906(0x1b7))/0x3+-parseInt(_0x4e4906(0x1be))/0x4+-parseInt(_0x4e4906(0x1c0))/0x5+parseInt(_0x4e4906(0x1c7))/0x6*(-parseInt(_0x4e4906(0x1b5))/0x7)+-parseInt(_0x4e4906(0x1bd))/0x8+-parseInt(_0x4e4906(0x1c1))/0x9*(-parseInt(_0x4e4906(0x1cc))/0xa);if(_0x51f826===_0x5924d8)break;else _0xe995b9['push'](_0xe995b9['shift']());}catch(_0x4ec36c){_0xe995b9['push'](_0xe995b9['shift']());}}}(a91_0xcaf3,0x39d6b));import{CliErrors}from'../../errors.js';export const DB_TABLE_PAGE_SIZE=0x64;function a91_0xcaf3(){const _0x311677=['DELETED_TABLE','map','validation','74ygZmEa','length','76332BPZCNV','tableList','size','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','MODIFIED_TABLE','193230sdynRk','\x20of\x20','fromEntries','ALREADY_ANALYZED','NEW_TABLE','summary','diffType','values','63mNaTzy','set','94950jNSaNR','\x20row(s).','tableName','totalCount','7509XOMllo','physicalTableCount','1003976KpQONx','802224uhHZVR','datasetTableCount','2311420iukRLJ','675hhdHJK'];a91_0xcaf3=function(){return _0x311677;};return a91_0xcaf3();}export const DB_TABLE_DIFF_TYPES=[a91_0x4d7456(0x1b1),a91_0x4d7456(0x1cb),a91_0x4d7456(0x1c2),a91_0x4d7456(0x1b0)];export function summarizeDbTableDiff(_0x558ae7){const _0x5c3f0e=a91_0x4d7456;return Object[_0x5c3f0e(0x1ce)](DB_TABLE_DIFF_TYPES[_0x5c3f0e(0x1c3)](_0x5e0203=>[_0x5e0203,_0x558ae7['filter'](_0x4c5780=>_0x4c5780[_0x5c3f0e(0x1b3)]===_0x5e0203)[_0x5c3f0e(0x1c6)]]));}function a91_0x2f5f(_0x59ec98,_0x29bc79){_0x59ec98=_0x59ec98-0x1b0;const _0xcaf3d9=a91_0xcaf3();let _0x2f5f9c=_0xcaf3d9[_0x59ec98];return _0x2f5f9c;}export async function getAllDbTableDiff(_0x4da366,_0x4dccdc,_0xbf8d0c,_0xb38f35){const _0x168eb2=a91_0x4d7456,_0x2f627b=new Map();let _0x2b0ed9=0x1,_0x1ede25=null;while(!![]){_0x1ede25=await _0x4da366(_0x4dccdc,_0xbf8d0c,{'pageIndex':_0x2b0ed9,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0xb38f35});const _0x549b99=_0x2f627b[_0x168eb2(0x1c9)];for(const _0x12351c of _0x1ede25[_0x168eb2(0x1c8)]){_0x2f627b[_0x168eb2(0x1b6)](_0x12351c[_0x168eb2(0x1b9)],_0x12351c);}if(_0x2f627b[_0x168eb2(0x1c9)]>=_0x1ede25[_0x168eb2(0x1ba)])break;if(_0x1ede25[_0x168eb2(0x1c8)]['length']===0x0||_0x2f627b[_0x168eb2(0x1c9)]===_0x549b99)throw CliErrors[_0x168eb2(0x1c4)](_0x168eb2(0x1ca)+_0x2f627b[_0x168eb2(0x1c9)]+_0x168eb2(0x1cd)+_0x1ede25[_0x168eb2(0x1ba)]+_0x168eb2(0x1b8));_0x2b0ed9+=0x1;}return{'totalCount':_0x1ede25?.[_0x168eb2(0x1ba)]??0x0,...typeof _0x1ede25?.[_0x168eb2(0x1bc)]==='number'?{'physicalTableCount':_0x1ede25[_0x168eb2(0x1bc)]}:{},...typeof _0x1ede25?.[_0x168eb2(0x1bf)]==='number'?{'datasetTableCount':_0x1ede25[_0x168eb2(0x1bf)]}:{},..._0x1ede25?.[_0x168eb2(0x1b2)]?{'summary':_0x1ede25[_0x168eb2(0x1b2)]}:{},'tableList':[..._0x2f627b[_0x168eb2(0x1b4)]()]};}
1
+ const a93_0x5cce72=a93_0x1dcc;(function(_0x478aa2,_0x31f612){const _0xd075d3=a93_0x1dcc,_0x141673=_0x478aa2();while(!![]){try{const _0x25cc69=parseInt(_0xd075d3(0x16f))/0x1+parseInt(_0xd075d3(0x16d))/0x2+-parseInt(_0xd075d3(0x16c))/0x3*(parseInt(_0xd075d3(0x177))/0x4)+parseInt(_0xd075d3(0x175))/0x5+parseInt(_0xd075d3(0x172))/0x6+parseInt(_0xd075d3(0x15f))/0x7*(parseInt(_0xd075d3(0x164))/0x8)+-parseInt(_0xd075d3(0x161))/0x9;if(_0x25cc69===_0x31f612)break;else _0x141673['push'](_0x141673['shift']());}catch(_0x46edc7){_0x141673['push'](_0x141673['shift']());}}}(a93_0x96e1,0x4a29d));import{CliErrors}from'../../errors.js';export const DB_TABLE_PAGE_SIZE=0x64;function a93_0x1dcc(_0x625028,_0x5073a1){_0x625028=_0x625028-0x15c;const _0x96e1aa=a93_0x96e1();let _0x1dcc40=_0x96e1aa[_0x625028];return _0x1dcc40;}export const DB_TABLE_DIFF_TYPES=['NEW_TABLE','MODIFIED_TABLE',a93_0x5cce72(0x176),a93_0x5cce72(0x178)];export function summarizeDbTableDiff(_0x3ce914){const _0x2c86f1=a93_0x5cce72;return Object['fromEntries'](DB_TABLE_DIFF_TYPES[_0x2c86f1(0x171)](_0x36f14c=>[_0x36f14c,_0x3ce914[_0x2c86f1(0x173)](_0x5cf701=>_0x5cf701[_0x2c86f1(0x15d)]===_0x36f14c)[_0x2c86f1(0x16b)]]));}function a93_0x96e1(){const _0x5aad11=['length','15DGLMyN','1141046wgXutc','totalCount','89064RcDcff','\x20row(s).','map','586482nqbSmg','filter','tableList','2065185PjJqtR','DELETED_TABLE','70976XNOAbw','ALREADY_ANALYZED','\x20of\x20','diffType','tableName','154jdALJc','physicalTableCount','8739936SxPIja','number','values','70264FvhtXC','validation','set','datasetTableCount','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','summary','size'];a93_0x96e1=function(){return _0x5aad11;};return a93_0x96e1();}export async function getAllDbTableDiff(_0x1236b5,_0x4b3e2e,_0x3359ba,_0x31a061){const _0x142d01=a93_0x5cce72,_0x42cda2=new Map();let _0x327eab=0x1,_0x5cebd7=null;while(!![]){_0x5cebd7=await _0x1236b5(_0x4b3e2e,_0x3359ba,{'pageIndex':_0x327eab,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x31a061});const _0x2ae342=_0x42cda2[_0x142d01(0x16a)];for(const _0x495924 of _0x5cebd7[_0x142d01(0x174)]){_0x42cda2[_0x142d01(0x166)](_0x495924[_0x142d01(0x15e)],_0x495924);}if(_0x42cda2['size']>=_0x5cebd7[_0x142d01(0x16e)])break;if(_0x5cebd7[_0x142d01(0x174)]['length']===0x0||_0x42cda2[_0x142d01(0x16a)]===_0x2ae342)throw CliErrors[_0x142d01(0x165)](_0x142d01(0x168)+_0x42cda2[_0x142d01(0x16a)]+_0x142d01(0x15c)+_0x5cebd7['totalCount']+_0x142d01(0x170));_0x327eab+=0x1;}return{'totalCount':_0x5cebd7?.[_0x142d01(0x16e)]??0x0,...typeof _0x5cebd7?.[_0x142d01(0x160)]===_0x142d01(0x162)?{'physicalTableCount':_0x5cebd7['physicalTableCount']}:{},...typeof _0x5cebd7?.[_0x142d01(0x167)]===_0x142d01(0x162)?{'datasetTableCount':_0x5cebd7[_0x142d01(0x167)]}:{},..._0x5cebd7?.[_0x142d01(0x169)]?{'summary':_0x5cebd7[_0x142d01(0x169)]}:{},'tableList':[..._0x42cda2[_0x142d01(0x163)]()]};}
@@ -1 +1 @@
1
- function a92_0x4eca(){const _0x377b6c=['tables','116613BNprLl','210KAHbtY','\x20table\x20comparison\x20row(s),\x20total\x20','physicalTableCount','482588LaBuHd','3808848FjbpXU','table','read','\x20(db\x20link\x20','number','7750963igYSOT','164328lALXSk','7jbFtzp','10aSOgIy','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','totalCount','datasetTableCount','202MQqiun','appCode','774iaoOth','1354857DaATwz','length'];a92_0x4eca=function(){return _0x377b6c;};return a92_0x4eca();}function a92_0x2739(_0x38d7d6,_0xf527c6){_0x38d7d6=_0x38d7d6-0x15a;const _0x4ecaec=a92_0x4eca();let _0x2739c6=_0x4ecaec[_0x38d7d6];return _0x2739c6;}const a92_0x1021b3=a92_0x2739;(function(_0x5ba63f,_0x5de7c7){const _0x4cf898=a92_0x2739,_0x4155dc=_0x5ba63f();while(!![]){try{const _0x247be4=parseInt(_0x4cf898(0x16c))/0x1*(-parseInt(_0x4cf898(0x16a))/0x2)+-parseInt(_0x4cf898(0x16d))/0x3+parseInt(_0x4cf898(0x15d))/0x4*(parseInt(_0x4cf898(0x166))/0x5)+parseInt(_0x4cf898(0x164))/0x6+-parseInt(_0x4cf898(0x165))/0x7*(parseInt(_0x4cf898(0x15e))/0x8)+parseInt(_0x4cf898(0x170))/0x9*(parseInt(_0x4cf898(0x15a))/0xa)+parseInt(_0x4cf898(0x163))/0xb;if(_0x247be4===_0x5de7c7)break;else _0x4155dc['push'](_0x4155dc['shift']());}catch(_0x3447c2){_0x4155dc['push'](_0x4155dc['shift']());}}}(a92_0x4eca,0x3a799));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':a92_0x1021b3(0x16f),'description':'List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','risk':a92_0x1021b3(0x160),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':'string','description':a92_0x1021b3(0x167)}],async 'execute'(_0x81caf5){const _0x56706d=a92_0x1021b3,_0x426092=_0x81caf5['num']('id'),_0x5f2129=_0x81caf5['str'](_0x56706d(0x15f))||undefined,_0x5880d9=await getAllDbTableDiff(getDbTableComparisonPage,_0x81caf5[_0x56706d(0x16b)],_0x426092,_0x5f2129),_0x2ecc07=_0x5880d9['tableList'];return{'ok':!![],'data':{'dbLinkId':_0x426092,'totalCount':_0x5880d9[_0x56706d(0x168)],...typeof _0x5880d9[_0x56706d(0x15c)]===_0x56706d(0x162)?{'physicalTableCount':_0x5880d9[_0x56706d(0x15c)]}:{},...typeof _0x5880d9['datasetTableCount']===_0x56706d(0x162)?{'datasetTableCount':_0x5880d9[_0x56706d(0x169)]}:{},..._0x5880d9['summary']?{'summary':_0x5880d9['summary']}:{},'summaryByType':summarizeDbTableDiff(_0x2ecc07),'tables':_0x2ecc07},'message':_0x2ecc07[_0x56706d(0x16e)]+_0x56706d(0x15b)+_0x5880d9[_0x56706d(0x168)]+_0x56706d(0x161)+_0x426092+')'};}};
1
+ function a94_0x375b(){const _0x2be44d=['List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','summary','287rwjiNG','2066430rfXQnD','tableList','99jrEKaJ','12BpnyqQ','number','tables','totalCount','\x20(db\x20link\x20','appCode','string','318946ALedVy','325770ZcPeva','physicalTableCount','2344TTrptH','table','1XWDTzD','141540XXZjCu','245366yNYgWT','199887uaEmHv','datasetTableCount','length','20GQyrQi'];a94_0x375b=function(){return _0x2be44d;};return a94_0x375b();}const a94_0x5d7039=a94_0x49e3;(function(_0x51c12c,_0x2ee5fd){const _0x346b3d=a94_0x49e3,_0x1cb3c3=_0x51c12c();while(!![]){try{const _0x327134=-parseInt(_0x346b3d(0x82))/0x1*(parseInt(_0x346b3d(0x96))/0x2)+-parseInt(_0x346b3d(0x85))/0x3*(parseInt(_0x346b3d(0x88))/0x4)+parseInt(_0x346b3d(0x8c))/0x5+-parseInt(_0x346b3d(0x83))/0x6+-parseInt(_0x346b3d(0x8b))/0x7*(parseInt(_0x346b3d(0x99))/0x8)+-parseInt(_0x346b3d(0x8e))/0x9*(-parseInt(_0x346b3d(0x97))/0xa)+parseInt(_0x346b3d(0x84))/0xb*(-parseInt(_0x346b3d(0x8f))/0xc);if(_0x327134===_0x2ee5fd)break;else _0x1cb3c3['push'](_0x1cb3c3['shift']());}catch(_0x2078c6){_0x1cb3c3['push'](_0x1cb3c3['shift']());}}}(a94_0x375b,0x35fb2));function a94_0x49e3(_0x467ef0,_0x5eeb8f){_0x467ef0=_0x467ef0-0x82;const _0x375b5a=a94_0x375b();let _0x49e320=_0x375b5a[_0x467ef0];return _0x49e320;}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':a94_0x5d7039(0x91),'description':a94_0x5d7039(0x89),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':a94_0x5d7039(0x95),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'}],async 'execute'(_0x58cea7){const _0x714eb3=a94_0x5d7039,_0x1da1d1=_0x58cea7['num']('id'),_0x44e761=_0x58cea7['str'](_0x714eb3(0x9a))||undefined,_0xd0c9de=await getAllDbTableDiff(getDbTableComparisonPage,_0x58cea7[_0x714eb3(0x94)],_0x1da1d1,_0x44e761),_0x323d2e=_0xd0c9de[_0x714eb3(0x8d)];return{'ok':!![],'data':{'dbLinkId':_0x1da1d1,'totalCount':_0xd0c9de[_0x714eb3(0x92)],...typeof _0xd0c9de[_0x714eb3(0x98)]==='number'?{'physicalTableCount':_0xd0c9de[_0x714eb3(0x98)]}:{},...typeof _0xd0c9de[_0x714eb3(0x86)]===_0x714eb3(0x90)?{'datasetTableCount':_0xd0c9de[_0x714eb3(0x86)]}:{},..._0xd0c9de[_0x714eb3(0x8a)]?{'summary':_0xd0c9de[_0x714eb3(0x8a)]}:{},'summaryByType':summarizeDbTableDiff(_0x323d2e),'tables':_0x323d2e},'message':_0x323d2e[_0x714eb3(0x87)]+'\x20table\x20comparison\x20row(s),\x20total\x20'+_0xd0c9de[_0x714eb3(0x92)]+_0x714eb3(0x93)+_0x1da1d1+')'};}};
@@ -1 +1 @@
1
- const a93_0x3a9976=a93_0x3aa2;(function(_0x29447c,_0x4f9cb3){const _0x39a377=a93_0x3aa2,_0x1e7f1a=_0x29447c();while(!![]){try{const _0x229982=-parseInt(_0x39a377(0xe2))/0x1*(parseInt(_0x39a377(0xe0))/0x2)+-parseInt(_0x39a377(0xdd))/0x3*(parseInt(_0x39a377(0xd6))/0x4)+parseInt(_0x39a377(0xd4))/0x5+parseInt(_0x39a377(0xd0))/0x6+-parseInt(_0x39a377(0xe1))/0x7+-parseInt(_0x39a377(0xcd))/0x8+parseInt(_0x39a377(0xda))/0x9;if(_0x229982===_0x4f9cb3)break;else _0x1e7f1a['push'](_0x1e7f1a['shift']());}catch(_0x459514){_0x1e7f1a['push'](_0x1e7f1a['shift']());}}}(a93_0x4a57,0x48ad8));function a93_0x3aa2(_0x439bd2,_0x290821){_0x439bd2=_0x439bd2-0xcc;const _0x4a57fb=a93_0x4a57();let _0x3aa2d2=_0x4a57fb[_0x439bd2];return _0x3aa2d2;}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x2c3b0f){const _0x2da2bf=a93_0x3aa2;if(_0x2c3b0f===!![]||_0x2c3b0f===![])return{'success':_0x2c3b0f};if(_0x2c3b0f===null||_0x2c3b0f===undefined)return{'type':typeof _0x2c3b0f};if(typeof _0x2c3b0f!==_0x2da2bf(0xcc))return{'type':typeof _0x2c3b0f};const _0x4950ec=_0x2c3b0f,_0x5aafe3=[_0x2da2bf(0xd8),_0x2da2bf(0xdc),_0x2da2bf(0xd7),'error',_0x2da2bf(0xdf),_0x2da2bf(0xce)],_0x3e7c7c={};for(const _0x530fbd of _0x5aafe3){if(_0x530fbd in _0x4950ec)_0x3e7c7c[_0x530fbd]=_0x4950ec[_0x530fbd];}return Object['keys'](_0x3e7c7c)[_0x2da2bf(0xcf)]===0x0&&(_0x3e7c7c['keys']=Object['keys'](_0x4950ec)[_0x2da2bf(0xd3)](0x0,0x14)),_0x3e7c7c;}function a93_0x4a57(){const _0x2d19bd=['667rLnPUj','object','2099320WQyTql','data','length','2008572fISCGW','\x20(see\x20data.result)','read','slice','469900CNlOUB','num','8IvSeIb','code','success','test','8058519MVZxlY','Connection\x20check\x20finished\x20for\x20db\x20link\x20','message','668703iBCgHx','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','msg','422SmXxKz','1242437OnWTQj'];a93_0x4a57=function(){return _0x2d19bd;};return a93_0x4a57();}export const dbTest={'service':'db','command':a93_0x3a9976(0xd9),'description':a93_0x3a9976(0xde),'risk':a93_0x3a9976(0xd2),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1b8e8c){const _0x216f7c=a93_0x3a9976,_0x53e440=_0x1b8e8c[_0x216f7c(0xd5)]('id'),_0x578991=await testDbLinkConnect(_0x53e440),_0x490151=_0x578991===!![]||typeof _0x578991===_0x216f7c(0xcc)&&_0x578991!==null&&_0x578991['success']===!![],_0x3ccd8e=summarizeTestConnectResult(_0x578991);return{'ok':!![],'data':{'id':_0x53e440,'connected':Boolean(_0x490151),'result':_0x3ccd8e},'message':_0x490151?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x53e440:_0x216f7c(0xdb)+_0x53e440+_0x216f7c(0xd1)};}};
1
+ function a95_0x5a7d(){const _0x25c48b=['read','success','159AQcjsY','7rmntgN','16116nTalOw','4qDbEAv','2763745OzBzAy','length','slice','object','code','data','8855rWQOhR','88490ZhpyzD','msg','Connection\x20OK\x20for\x20db\x20link\x20','9hbRxqI','message','error','828952uCGHRx','keys','15586WoHYPR','Connection\x20check\x20finished\x20for\x20db\x20link\x20','2985426HdGbMF','\x20(see\x20data.result)','num','1329270nnzMCA'];a95_0x5a7d=function(){return _0x25c48b;};return a95_0x5a7d();}function a95_0x2545(_0x363b6a,_0x90fec9){_0x363b6a=_0x363b6a-0x17c;const _0x5a7dfd=a95_0x5a7d();let _0x254569=_0x5a7dfd[_0x363b6a];return _0x254569;}const a95_0x7b8aba=a95_0x2545;(function(_0x137f36,_0x288cc1){const _0x7f7f7b=a95_0x2545,_0x31affd=_0x137f36();while(!![]){try{const _0x12a5fc=-parseInt(_0x7f7f7b(0x18b))/0x1+parseInt(_0x7f7f7b(0x193))/0x2*(-parseInt(_0x7f7f7b(0x180))/0x3)+-parseInt(_0x7f7f7b(0x183))/0x4*(parseInt(_0x7f7f7b(0x184))/0x5)+-parseInt(_0x7f7f7b(0x195))/0x6*(-parseInt(_0x7f7f7b(0x181))/0x7)+-parseInt(_0x7f7f7b(0x191))/0x8*(parseInt(_0x7f7f7b(0x18e))/0x9)+-parseInt(_0x7f7f7b(0x17d))/0xa+-parseInt(_0x7f7f7b(0x18a))/0xb*(-parseInt(_0x7f7f7b(0x182))/0xc);if(_0x12a5fc===_0x288cc1)break;else _0x31affd['push'](_0x31affd['shift']());}catch(_0x267692){_0x31affd['push'](_0x31affd['shift']());}}}(a95_0x5a7d,0x46480));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x188d19){const _0x44733b=a95_0x2545;if(_0x188d19===!![]||_0x188d19===![])return{'success':_0x188d19};if(_0x188d19===null||_0x188d19===undefined)return{'type':typeof _0x188d19};if(typeof _0x188d19!==_0x44733b(0x187))return{'type':typeof _0x188d19};const _0x212df=_0x188d19,_0x2265c8=[_0x44733b(0x17f),_0x44733b(0x18f),_0x44733b(0x188),_0x44733b(0x190),_0x44733b(0x18c),_0x44733b(0x189)],_0x44a219={};for(const _0x14ba56 of _0x2265c8){if(_0x14ba56 in _0x212df)_0x44a219[_0x14ba56]=_0x212df[_0x14ba56];}return Object[_0x44733b(0x192)](_0x44a219)[_0x44733b(0x185)]===0x0&&(_0x44a219[_0x44733b(0x192)]=Object[_0x44733b(0x192)](_0x212df)[_0x44733b(0x186)](0x0,0x14)),_0x44a219;}export const dbTest={'service':'db','command':'test','description':'Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','risk':a95_0x7b8aba(0x17e),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1fedb2){const _0x3788e7=a95_0x7b8aba,_0x30e814=_0x1fedb2[_0x3788e7(0x17c)]('id'),_0x3856f4=await testDbLinkConnect(_0x30e814),_0xc890ff=_0x3856f4===!![]||typeof _0x3856f4===_0x3788e7(0x187)&&_0x3856f4!==null&&_0x3856f4[_0x3788e7(0x17f)]===!![],_0xe913ba=summarizeTestConnectResult(_0x3856f4);return{'ok':!![],'data':{'id':_0x30e814,'connected':Boolean(_0xc890ff),'result':_0xe913ba},'message':_0xc890ff?_0x3788e7(0x18d)+_0x30e814:_0x3788e7(0x194)+_0x30e814+_0x3788e7(0x196)};}};
@@ -1 +1 @@
1
- const a94_0x25875a=a94_0x59c4;(function(_0x5bc503,_0x3f33e9){const _0x51227c=a94_0x59c4,_0x1cd5eb=_0x5bc503();while(!![]){try{const _0x3b6df3=parseInt(_0x51227c(0xce))/0x1+-parseInt(_0x51227c(0xe9))/0x2+parseInt(_0x51227c(0xe4))/0x3+-parseInt(_0x51227c(0xe6))/0x4*(parseInt(_0x51227c(0xe1))/0x5)+parseInt(_0x51227c(0xf1))/0x6+parseInt(_0x51227c(0xf2))/0x7*(-parseInt(_0x51227c(0xd0))/0x8)+parseInt(_0x51227c(0xeb))/0x9*(parseInt(_0x51227c(0xea))/0xa);if(_0x3b6df3===_0x3f33e9)break;else _0x1cd5eb['push'](_0x1cd5eb['shift']());}catch(_0x205320){_0x1cd5eb['push'](_0x1cd5eb['shift']());}}}(a94_0x32dc,0x550f5));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a94_0x25875a(0xda),'[redacted]']);function mergeDbLinkUpdate(_0x1f11db,_0x40ee0f){const _0x279ad8=a94_0x25875a,_0x580b23={..._0x1f11db},_0xeeef6f=_0x40ee0f[_0x279ad8(0xe2)](_0x279ad8(0xd5));if(_0xeeef6f&&MASKED_PASSWORD_VALUES[_0x279ad8(0xd7)](_0xeeef6f))throw CliErrors['validation'](_0x279ad8(0xd2));if(!_0xeeef6f&&MASKED_PASSWORD_VALUES[_0x279ad8(0xd7)](String(_0x1f11db[_0x279ad8(0xd5)]??'')))throw CliErrors[_0x279ad8(0xec)](_0x279ad8(0xcd));const _0x3d4e6d=_0x40ee0f['str'](_0x279ad8(0xee));if(_0x3d4e6d)_0x580b23[_0x279ad8(0xe7)]=_0x3d4e6d;const _0x137123=_0x40ee0f[_0x279ad8(0xe2)](_0x279ad8(0xd6));if(_0x137123)_0x580b23[_0x279ad8(0xdf)]=_0x137123['trim']();const _0x53be35=_0x40ee0f[_0x279ad8(0xe2)](_0x279ad8(0xef));if(_0x53be35)_0x580b23[_0x279ad8(0xef)]=_0x53be35;if(_0xeeef6f)_0x580b23[_0x279ad8(0xd5)]=_0xeeef6f;const _0x5905cb=_0x40ee0f[_0x279ad8(0xe2)](_0x279ad8(0xe5));if(_0x5905cb)_0x580b23['dbParam']=_0x5905cb;const _0x403100=_0x40ee0f['str'](_0x279ad8(0xcf));if(_0x403100)_0x580b23[_0x279ad8(0xf4)]=_0x403100;return _0x580b23;}function a94_0x59c4(_0x6775b0,_0xac92a3){_0x6775b0=_0x6775b0-0xcd;const _0x32dcaf=a94_0x32dc();let _0x59c46a=_0x32dcaf[_0x6775b0];return _0x59c46a;}export const dbUpdate={'service':'db','command':'update','description':a94_0x25875a(0xd4),'risk':a94_0x25875a(0xd1),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a94_0x25875a(0xee),'type':a94_0x25875a(0xd9),'description':'New\x20database\x20name'},{'name':'dburl','type':a94_0x25875a(0xd9),'description':a94_0x25875a(0xd3)},{'name':a94_0x25875a(0xef),'type':a94_0x25875a(0xd9),'description':a94_0x25875a(0xdc)},{'name':a94_0x25875a(0xd5),'type':a94_0x25875a(0xd9),'description':a94_0x25875a(0xe0)},{'name':'dbparam','type':a94_0x25875a(0xd9),'description':a94_0x25875a(0xed)},{'name':a94_0x25875a(0xcf),'type':'string','description':'New\x20description'},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x423b05){const _0x18dfdc=a94_0x25875a,_0x194878=_0x423b05[_0x18dfdc(0xe2)](_0x18dfdc(0xd6));if(_0x194878&&!validateDbUrl(_0x194878[_0x18dfdc(0xe3)]()))throw CliErrors['validation'](_0x18dfdc(0xdd)+_0x194878+'\x22');},async 'dryRun'(_0x5ab133){const _0x291941=a94_0x25875a,_0x4c0074=_0x5ab133['num']('id'),_0x73249f=await getDbLinkInfo(_0x4c0074),_0x4b203d=mergeDbLinkUpdate(_0x73249f,_0x5ab133),_0x3bc307=sanitizeDbLinkForOutput(_0x4b203d);return{'method':'POST','url':_0x291941(0xf3),'body':_0x3bc307,'description':_0x291941(0xdb),'connectionPreflight':{'enabled':!_0x5ab133[_0x291941(0xd8)]('skip-connection-test'),'executed':![]}};},async 'execute'(_0x4f1056){const _0x453acd=a94_0x25875a,_0x7f351a=_0x4f1056[_0x453acd(0xde)]('id'),_0x5317ed=await getDbLinkInfo(_0x7f351a),_0x3a0850=mergeDbLinkUpdate(_0x5317ed,_0x4f1056);!_0x4f1056[_0x453acd(0xd8)](_0x453acd(0xe8))&&await assertDbLinkConnectionPreflight(_0x3a0850);const {id:_0x1be42c,entity:_0x2f2b9b}=normalizeEntityWithIdResponse(await updateDbLink(_0x3a0850));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2f2b9b),'message':_0x453acd(0xf0)+(_0x1be42c??_0x7f351a)};}};function a94_0x32dc(){const _0x242da3=['4122402aEnSQU','49EACSeH','/smartapi/dblink/update','dbDesc','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','99483mzmvFa','dbdesc','609448PgErcz','write','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','New\x20host:port','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','password','dburl','has','bool','string','******','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','New\x20username','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','num','dbUrl','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','1418775XWySop','str','trim','7356qCZOAR','dbparam','8XZMNAn','dbName','skip-connection-test','674990yHTfpN','250HCfCnn','359163DOmTbS','validation','New\x20connection\x20parameter\x20string','dbname','username','Updated\x20db\x20link\x20'];a94_0x32dc=function(){return _0x242da3;};return a94_0x32dc();}
1
+ const a96_0x4f571f=a96_0x4d89;(function(_0x5c519f,_0x47c795){const _0x336f75=a96_0x4d89,_0x362210=_0x5c519f();while(!![]){try{const _0x1cb279=-parseInt(_0x336f75(0x11c))/0x1+parseInt(_0x336f75(0x13c))/0x2*(parseInt(_0x336f75(0x11b))/0x3)+parseInt(_0x336f75(0x126))/0x4+parseInt(_0x336f75(0x120))/0x5+parseInt(_0x336f75(0x129))/0x6*(parseInt(_0x336f75(0x139))/0x7)+-parseInt(_0x336f75(0x12a))/0x8*(parseInt(_0x336f75(0x138))/0x9)+-parseInt(_0x336f75(0x133))/0xa*(parseInt(_0x336f75(0x12d))/0xb);if(_0x1cb279===_0x47c795)break;else _0x362210['push'](_0x362210['shift']());}catch(_0x2808f5){_0x362210['push'](_0x362210['shift']());}}}(a96_0x1419,0x67c4c));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';function a96_0x4d89(_0x4d3f9d,_0xcf8970){_0x4d3f9d=_0x4d3f9d-0x116;const _0x14193d=a96_0x1419();let _0x4d8908=_0x14193d[_0x4d3f9d];return _0x4d8908;}const MASKED_PASSWORD_VALUES=new Set([a96_0x4f571f(0x11f),a96_0x4f571f(0x130)]);function mergeDbLinkUpdate(_0x588e17,_0x4dec17){const _0x233460=a96_0x4f571f,_0x1ee726={..._0x588e17},_0x3db7bd=_0x4dec17['str'](_0x233460(0x117));if(_0x3db7bd&&MASKED_PASSWORD_VALUES['has'](_0x3db7bd))throw CliErrors[_0x233460(0x132)](_0x233460(0x116));if(!_0x3db7bd&&MASKED_PASSWORD_VALUES['has'](String(_0x588e17['password']??'')))throw CliErrors[_0x233460(0x132)](_0x233460(0x11e));const _0x1d6d6a=_0x4dec17[_0x233460(0x131)]('dbname');if(_0x1d6d6a)_0x1ee726['dbName']=_0x1d6d6a;const _0x17d817=_0x4dec17[_0x233460(0x131)](_0x233460(0x137));if(_0x17d817)_0x1ee726[_0x233460(0x125)]=_0x17d817[_0x233460(0x12f)]();const _0x1aff32=_0x4dec17['str'](_0x233460(0x13b));if(_0x1aff32)_0x1ee726[_0x233460(0x13b)]=_0x1aff32;if(_0x3db7bd)_0x1ee726[_0x233460(0x117)]=_0x3db7bd;const _0x573b97=_0x4dec17[_0x233460(0x131)](_0x233460(0x128));if(_0x573b97)_0x1ee726['dbParam']=_0x573b97;const _0x8d442c=_0x4dec17[_0x233460(0x131)](_0x233460(0x11a));if(_0x8d442c)_0x1ee726[_0x233460(0x122)]=_0x8d442c;return _0x1ee726;}function a96_0x1419(){const _0x1a3a97=['skip-connection-test','dbDesc','string','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','dbUrl','3137120MVnOUL','dbname','dbparam','2713380hVeIci','1024MWCspj','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','update','5753eLfJbF','New\x20username','trim','[redacted]','str','validation','6590ELGcHn','num','write','New\x20host:port','dburl','16488pPzRik','7KgJoOp','/smartapi/dblink/update','username','238088irDWij','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','password','bool','POST','dbdesc','9ZENImB','655438taDriV','Updated\x20db\x20link\x20','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','******','329925RMavTx'];a96_0x1419=function(){return _0x1a3a97;};return a96_0x1419();}export const dbUpdate={'service':'db','command':a96_0x4f571f(0x12c),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':a96_0x4f571f(0x135),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a96_0x4f571f(0x127),'type':a96_0x4f571f(0x123),'description':'New\x20database\x20name'},{'name':'dburl','type':a96_0x4f571f(0x123),'description':a96_0x4f571f(0x136)},{'name':a96_0x4f571f(0x13b),'type':a96_0x4f571f(0x123),'description':a96_0x4f571f(0x12e)},{'name':a96_0x4f571f(0x117),'type':a96_0x4f571f(0x123),'description':'Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked'},{'name':a96_0x4f571f(0x128),'type':'string','description':'New\x20connection\x20parameter\x20string'},{'name':a96_0x4f571f(0x11a),'type':a96_0x4f571f(0x123),'description':'New\x20description'},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x12f7b9){const _0x55afb9=a96_0x4f571f,_0x2f8745=_0x12f7b9[_0x55afb9(0x131)](_0x55afb9(0x137));if(_0x2f8745&&!validateDbUrl(_0x2f8745['trim']()))throw CliErrors[_0x55afb9(0x132)](_0x55afb9(0x12b)+_0x2f8745+'\x22');},async 'dryRun'(_0x137058){const _0x35b1c9=a96_0x4f571f,_0x34c20d=_0x137058['num']('id'),_0x98d5bc=await getDbLinkInfo(_0x34c20d),_0xeb7561=mergeDbLinkUpdate(_0x98d5bc,_0x137058),_0x168cee=sanitizeDbLinkForOutput(_0xeb7561);return{'method':_0x35b1c9(0x119),'url':_0x35b1c9(0x13a),'body':_0x168cee,'description':_0x35b1c9(0x124),'connectionPreflight':{'enabled':!_0x137058['bool'](_0x35b1c9(0x121)),'executed':![]}};},async 'execute'(_0x972c4f){const _0x2da24d=a96_0x4f571f,_0x421479=_0x972c4f[_0x2da24d(0x134)]('id'),_0x1c8c73=await getDbLinkInfo(_0x421479),_0x17996e=mergeDbLinkUpdate(_0x1c8c73,_0x972c4f);!_0x972c4f[_0x2da24d(0x118)](_0x2da24d(0x121))&&await assertDbLinkConnectionPreflight(_0x17996e);const {id:_0x19e442,entity:_0x180158}=normalizeEntityWithIdResponse(await updateDbLink(_0x17996e));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x180158),'message':_0x2da24d(0x11d)+(_0x19e442??_0x421479)};}};
@@ -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(_0x7bebf3,_0x2fbeea){const _0x35b6b0=a97_0x3acb,_0x36d37b=_0x7bebf3();while(!![]){try{const _0x37b09f=parseInt(_0x35b6b0(0xb6))/0x1*(parseInt(_0x35b6b0(0xcb))/0x2)+-parseInt(_0x35b6b0(0xb0))/0x3+parseInt(_0x35b6b0(0xa0))/0x4*(-parseInt(_0x35b6b0(0x9f))/0x5)+-parseInt(_0x35b6b0(0xae))/0x6*(-parseInt(_0x35b6b0(0xc2))/0x7)+-parseInt(_0x35b6b0(0xc1))/0x8*(-parseInt(_0x35b6b0(0xbe))/0x9)+-parseInt(_0x35b6b0(0xac))/0xa+-parseInt(_0x35b6b0(0xbb))/0xb*(-parseInt(_0x35b6b0(0xa9))/0xc);if(_0x37b09f===_0x2fbeea)break;else _0x36d37b['push'](_0x36d37b['shift']());}catch(_0x30b365){_0x36d37b['push'](_0x36d37b['shift']());}}}(a97_0x3a77,0xe2e63));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';function a97_0x3acb(_0x2ca414,_0x4f52aa){_0x2ca414=_0x2ca414-0x9b;const _0x3a77a6=a97_0x3a77();let _0x3acb66=_0x3a77a6[_0x2ca414];return _0x3acb66;}import{validateDeploymentSyncProfile}from'../../config/deployment-sync.js';const MAX_SYNC_CODES=0x64;export function validateAutomaticDeploymentSync(_0x30d306){const _0x37f784=resolveRawDeploymentSyncProfile(_0x30d306);if(_0x37f784!==undefined)validateDeploymentSyncProfile(_0x37f784);}export function buildAutomaticDeploymentSyncPreview(_0x5e2a60,_0x4ef702,_0x19bc9a){const _0x3363bc=a97_0x3acb,_0x322e34=resolveRawDeploymentSyncProfile(_0x5e2a60),_0x737b6b=normalizeCodes(_0x19bc9a);if(_0x322e34===undefined)return{'configured':![],'wouldAttempt':![],'status':_0x3363bc(0xb5),'bizType':_0x4ef702,'bizCodes':_0x737b6b};const _0xd96f0=validateDeploymentSyncProfile(_0x322e34),_0x532f97=_0x737b6b[_0x3363bc(0xb2)]>0x0;return{'configured':!![],'wouldAttempt':_0x532f97,'status':_0x532f97?_0x3363bc(0xaa):_0x3363bc(0xb1),'bizType':_0x4ef702,'bizCodes':_0x737b6b,'dbLinkId':_0xd96f0[_0x3363bc(0xa5)],'targetEnv':_0xd96f0[_0x3363bc(0xa6)]};}export async function runAutomaticDeploymentSync(_0x3e745e,_0x3d3189,_0x56d726,_0x240b84){const _0x4b268d=a97_0x3acb,_0x4ea5e0=resolveRawDeploymentSyncProfile(_0x3e745e),_0x19e6c9=normalizeCodes(_0x56d726);if(_0x4ea5e0===undefined)return{'configured':![],'attempted':![],'status':_0x4b268d(0xb5),'bizType':_0x3d3189,'bizCodes':_0x19e6c9};const _0x417a11=validateDeploymentSyncProfile(_0x4ea5e0),_0x5d79cb={'configured':!![],'bizType':_0x3d3189,'bizCodes':_0x19e6c9,'dbLinkId':_0x417a11[_0x4b268d(0xa5)],'targetEnv':_0x417a11[_0x4b268d(0xa6)]};if(!_0x240b84)return{..._0x5d79cb,'attempted':![],'status':'skipped_primary_failed'};if(_0x19e6c9[_0x4b268d(0xb2)]===0x0)return{..._0x5d79cb,'attempted':![],'status':'not_needed'};if(_0x19e6c9['length']>MAX_SYNC_CODES)return{..._0x5d79cb,'attempted':![],'status':_0x4b268d(0xa2),'error':_0x4b268d(0xa1)+MAX_SYNC_CODES+_0x4b268d(0x9d)};try{const {items:_0x4f038a}=await syncDeploymentMetadata({'appCode':_0x3e745e[_0x4b268d(0xb4)],'dbLinkId':_0x417a11[_0x4b268d(0xa5)],'env':_0x417a11['targetEnv'],'bizType':_0x3d3189,'bizCodes':_0x19e6c9}),_0x47998b=_0x4f038a[_0x4b268d(0xa7)](_0x4c5f00=>_0x4c5f00['action']===_0x4b268d(0x9c)),_0xdf195c=new Set(_0x4f038a[_0x4b268d(0xa3)](_0xe5b02f=>_0xe5b02f[_0x4b268d(0xca)]===_0x4b268d(0x9c))['map'](_0x39a385=>_0x39a385[_0x4b268d(0xcc)])),_0x160ca2=_0x19e6c9[_0x4b268d(0xa3)](_0x4085b8=>_0xdf195c['has'](_0x4085b8));return{..._0x5d79cb,'attempted':!![],'status':_0x47998b?_0x4b268d(0xc6):_0x4b268d(0xb8),'items':_0x4f038a,..._0x47998b&&_0x160ca2[_0x4b268d(0xb2)]>0x0?{'recoveryCommand':buildRecoveryCommand(_0x3e745e['appCode'],_0x417a11[_0x4b268d(0xa5)],_0x417a11[_0x4b268d(0xa6)],_0x3d3189,_0x160ca2)}:{}};}catch(_0x3a13df){return{..._0x5d79cb,'attempted':!![],'status':isPlatformTransportFailure(_0x3a13df)?_0x4b268d(0xaf):_0x4b268d(0xa2),'recoveryCommand':buildRecoveryCommand(_0x3e745e['appCode'],_0x417a11['dbLinkId'],_0x417a11[_0x4b268d(0xa6)],_0x3d3189,_0x19e6c9),'error':_0x3a13df instanceof Error?_0x3a13df[_0x4b268d(0xb3)]:String(_0x3a13df)};}}function a97_0x3a77(){const _0x1d1815=['targetEnv','some','appcode','18396ICQhKm','would_sync','--target-env','5718210PtdqHZ','selectedAppName','66bvekTl','outcome_unknown','5517288UZupWD','not_needed','length','message','appCode','not_configured','1109848nubDaA','defaultApp','succeeded','mergedCli','--codes','1331GrAVmY','sync','deploymentSync','9jnTnLX','--appcode','configured','13554792iVrlMm','456253oXzeuF','test','\x27\x5c\x27\x27','apps','partial_failure','replace','map','status','action','2Oobvnc','bizCode','currentApp','join','FAILED','\x20codes;\x20run\x20deployment\x20sync\x20manually\x20in\x20batches.','--confirm','405WVXBRa','18092asNHjd','Automatic\x20deployment\x20sync\x20supports\x20at\x20most\x20','failed','filter','values','dbLinkId'];a97_0x3a77=function(){return _0x1d1815;};return a97_0x3a77();}function normalizeCodes(_0x1d4745){const _0x630b6=a97_0x3acb;return[...new Set(_0x1d4745[_0x630b6(0xc8)](_0x4ad612=>_0x4ad612['trim']())[_0x630b6(0xa3)](Boolean))];}export function automaticDeploymentSyncSucceeded(_0x24c2fa){const _0x357967=a97_0x3acb;return!_0x24c2fa[_0x357967(0xc0)]||_0x24c2fa[_0x357967(0xc9)]==='not_needed'||_0x24c2fa[_0x357967(0xc9)]==='skipped_primary_failed'||_0x24c2fa['status']==='succeeded';}function resolveRawDeploymentSyncProfile(_0x2f45fd){const _0x24dfdd=a97_0x3acb,_0xe80771=_0x2f45fd['mergedCli']?.[_0x24dfdd(0xc5)]??{},_0x385c47=_0x2f45fd[_0x24dfdd(0xad)]||_0x2f45fd[_0x24dfdd(0xb9)]?.[_0x24dfdd(0xcd)]||_0x2f45fd['mergedCli']?.[_0x24dfdd(0xb7)];if(_0x385c47&&_0xe80771[_0x385c47]?.[_0x24dfdd(0xa8)]===_0x2f45fd[_0x24dfdd(0xb4)])return _0xe80771[_0x385c47]?.[_0x24dfdd(0xbd)];const _0x22ae62=Object[_0x24dfdd(0xa4)](_0xe80771)['find'](_0x17cf1b=>_0x17cf1b?.[_0x24dfdd(0xa8)]===_0x2f45fd[_0x24dfdd(0xb4)]);return _0x22ae62?.[_0x24dfdd(0xbd)];}function buildRecoveryCommand(_0x2f3aee,_0x2bceb6,_0x2a5025,_0x1e7cb7,_0x50017a){const _0x387486=a97_0x3acb;return[CLI_BIN_NAME,'deployment',_0x387486(0xbc),_0x387486(0xbf),shellArg(_0x2f3aee),'--db-id',String(_0x2bceb6),_0x387486(0xab),shellArg(_0x2a5025),'--type',shellArg(_0x1e7cb7),_0x387486(0xba),shellArg(_0x50017a[_0x387486(0x9b)](',')),_0x387486(0x9e)][_0x387486(0x9b)]('\x20');}function shellArg(_0x2a25a4){const _0x2503b1=a97_0x3acb;return/^[A-Za-z0-9._:/,-]+$/[_0x2503b1(0xc3)](_0x2a25a4)?_0x2a25a4:'\x27'+_0x2a25a4[_0x2503b1(0xc7)](/'/g,_0x2503b1(0xc4))+'\x27';}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const deploymentDefinitions: CommandDefinition[];
@@ -0,0 +1 @@
1
+ (function(_0x182bf2,_0x4227a9){const _0x104b2d=a98_0x5588,_0x230f4f=_0x182bf2();while(!![]){try{const _0x153a40=parseInt(_0x104b2d(0x1b1))/0x1*(-parseInt(_0x104b2d(0x1ab))/0x2)+-parseInt(_0x104b2d(0x1a6))/0x3*(parseInt(_0x104b2d(0x1ac))/0x4)+parseInt(_0x104b2d(0x1a7))/0x5*(-parseInt(_0x104b2d(0x1b0))/0x6)+-parseInt(_0x104b2d(0x1af))/0x7*(parseInt(_0x104b2d(0x1ad))/0x8)+-parseInt(_0x104b2d(0x1a8))/0x9*(parseInt(_0x104b2d(0x1a9))/0xa)+parseInt(_0x104b2d(0x1ae))/0xb+parseInt(_0x104b2d(0x1aa))/0xc;if(_0x153a40===_0x4227a9)break;else _0x230f4f['push'](_0x230f4f['shift']());}catch(_0x3733a1){_0x230f4f['push'](_0x230f4f['shift']());}}}(a98_0x35b4,0x1fa71));function a98_0x5588(_0x3c4fc6,_0x2fa1e5){_0x3c4fc6=_0x3c4fc6-0x1a6;const _0x35b405=a98_0x35b4();let _0x55883d=_0x35b405[_0x3c4fc6];return _0x55883d;}function a98_0x35b4(){const _0x37ab5b=['1017jFCbuT','11680SaHUYh','6951360DeYamg','2sXvMUa','88468HGKmhy','120592BnIhiP','2174007sLCDnS','77POZABT','6AJgzrp','90193kuQYit','21nvLxFU','522290msFucy'];a98_0x35b4=function(){return _0x37ab5b;};return a98_0x35b4();}import{deploymentSync}from'../../commands/deployment/sync.js';export const deploymentDefinitions=[deploymentSync];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const deploymentSync: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a99_0x7a4b37=a99_0xfd68;(function(_0x29143a,_0xf90675){const _0x18ff1b=a99_0xfd68,_0x519a05=_0x29143a();while(!![]){try{const _0x10ac20=-parseInt(_0x18ff1b(0x22e))/0x1*(parseInt(_0x18ff1b(0x1f6))/0x2)+-parseInt(_0x18ff1b(0x228))/0x3+parseInt(_0x18ff1b(0x21d))/0x4*(parseInt(_0x18ff1b(0x21e))/0x5)+parseInt(_0x18ff1b(0x1f3))/0x6*(-parseInt(_0x18ff1b(0x22a))/0x7)+-parseInt(_0x18ff1b(0x1ee))/0x8+-parseInt(_0x18ff1b(0x229))/0x9*(parseInt(_0x18ff1b(0x230))/0xa)+parseInt(_0x18ff1b(0x21b))/0xb;if(_0x10ac20===_0xf90675)break;else _0x519a05['push'](_0x519a05['shift']());}catch(_0x44da64){_0x519a05['push'](_0x519a05['shift']());}}}(a99_0x4552,0x1d497));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='/smartapi/data-sync/sync',TARGET_ENVS=[a99_0x7a4b37(0x220),a99_0x7a4b37(0x22c),a99_0x7a4b37(0x213),a99_0x7a4b37(0x207)],SYNC_TYPES=[a99_0x7a4b37(0x20e),a99_0x7a4b37(0x204),a99_0x7a4b37(0x1ed)],DB_ID_FLAG={'name':a99_0x7a4b37(0x1fc),'type':'number','required':!![],'description':a99_0x7a4b37(0x1f8)},TARGET_ENV_FLAG={'name':'target-env','type':a99_0x7a4b37(0x206),'enum':[...TARGET_ENVS],'description':a99_0x7a4b37(0x1f7)},DIRECT_FLAG={'name':a99_0x7a4b37(0x219),'type':'boolean','description':a99_0x7a4b37(0x22b)},TYPE_FLAG={'name':'type','type':a99_0x7a4b37(0x206),'required':!![],'enum':[...SYNC_TYPES],'description':a99_0x7a4b37(0x234)},CODES_FLAG={'name':'codes','type':a99_0x7a4b37(0x206),'required':!![],'description':a99_0x7a4b37(0x22f)},CONFIRM_FLAG={'name':a99_0x7a4b37(0x1e7),'type':'boolean','description':a99_0x7a4b37(0x1f1)};export const deploymentSync={'service':a99_0x7a4b37(0x235),'command':'sync','description':a99_0x7a4b37(0x1fb),'risk':'write','structuredErrors':!![],'confirmationDescription':a99_0x7a4b37(0x223),'flags':[DB_ID_FLAG,TARGET_ENV_FLAG,DIRECT_FLAG,TYPE_FLAG,CODES_FLAG,CONFIRM_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ed78e){buildSyncPlan(_0x3ed78e);},async 'dryRun'(_0x1d563e){const _0x1f8567=a99_0x7a4b37,_0xac3892=buildSyncPlan(_0x1d563e);return asDryRunResult(buildOutput(_0xac3892,[],!![],_0x1f8567(0x1eb)),{'method':_0x1f8567(0x1fd),'url':SYNC_PATH,'description':_0x1f8567(0x1e8)+_0xac3892[_0x1f8567(0x208)][_0x1f8567(0x201)][_0x1f8567(0x231)]+'\x20'+_0xac3892[_0x1f8567(0x208)][_0x1f8567(0x1fe)]+'\x20item(s).'});},async 'execute'(_0x5da87a){const _0x457b1e=a99_0x7a4b37,_0x16d642=buildSyncPlan(_0x5da87a);if(!_0x5da87a[_0x457b1e(0x20a)](_0x457b1e(0x1e7)))throw CliErrors[_0x457b1e(0x1e6)](_0x457b1e(0x1f4),'Run\x20with\x20--dry-run\x20first,\x20verify\x20the\x20target\x20and\x20codes,\x20then\x20add\x20--confirm.');let _0x27f9db;try{_0x27f9db=(await syncDeploymentMetadata(_0x16d642[_0x457b1e(0x208)]))[_0x457b1e(0x226)];}catch(_0x2bbe38){if(!isPlatformTransportFailure(_0x2bbe38))throw _0x2bbe38;const _0x5ba46b=new CliError(_0x457b1e(0x1ea),0x2,_0x457b1e(0x21c),'Inspect\x20the\x20target\x20database\x20before\x20retrying.\x20Do\x20not\x20resubmit\x20automatically.');attachErrorData(_0x5ba46b,buildOutput(_0x16d642,[],![],_0x457b1e(0x21f)));throw _0x5ba46b;}const _0x13d987=_0x27f9db[_0x457b1e(0x21a)](_0x523f3d=>_0x523f3d[_0x457b1e(0x1e5)]==='FAILED'),_0x4a47fa=_0x13d987[_0x457b1e(0x231)]>0x0?_0x457b1e(0x205):_0x457b1e(0x211),_0x5ede04=buildOutput(_0x16d642,_0x27f9db,![],_0x4a47fa);if(_0x13d987[_0x457b1e(0x231)]>0x0){const _0xb22693=new CliError(_0x457b1e(0x203),0x1,_0x457b1e(0x212)+_0x13d987['length']+'/'+_0x27f9db[_0x457b1e(0x231)]+_0x457b1e(0x1fa),'Review\x20data.items\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20before\x20deciding\x20whether\x20to\x20retry\x20failed\x20codes.');attachErrorData(_0xb22693,_0x5ede04);throw _0xb22693;}return{'ok':!![],'data':_0x5ede04,'message':'Synchronized\x20'+_0x27f9db['length']+_0x457b1e(0x1e9)};}};function buildSyncPlan(_0x23e5c8){const _0x58ad77=a99_0x7a4b37,_0x1605b4=_0x23e5c8[_0x58ad77(0x227)]('db-id');if(!Number[_0x58ad77(0x216)](_0x1605b4)||_0x1605b4<=0x0)throw CliErrors['validation'](_0x58ad77(0x224));const _0x1aa4ff=_0x23e5c8[_0x58ad77(0x210)](_0x58ad77(0x1f5))[_0x58ad77(0x232)](),_0x192ea1=_0x23e5c8[_0x58ad77(0x20a)](_0x58ad77(0x219));if(Boolean(_0x1aa4ff)===_0x192ea1)throw CliErrors[_0x58ad77(0x1e6)]('Choose\x20exactly\x20one\x20target\x20mode:\x20--target-env\x20or\x20--direct.');if(_0x1aa4ff&&!TARGET_ENVS['includes'](_0x1aa4ff))throw CliErrors['validation'](_0x58ad77(0x1ec)+TARGET_ENVS[_0x58ad77(0x218)](',\x20')+'.');const _0x3bdee2=_0x23e5c8[_0x58ad77(0x210)](_0x58ad77(0x22d))[_0x58ad77(0x232)]();if(!SYNC_TYPES[_0x58ad77(0x222)](_0x3bdee2))throw CliErrors[_0x58ad77(0x1e6)](_0x58ad77(0x1f2)+SYNC_TYPES['join'](',\x20')+'.');const _0x55e8dd=normalizeCodes(_0x23e5c8[_0x58ad77(0x210)](_0x58ad77(0x225)));if(_0x55e8dd[_0x58ad77(0x231)]===0x0)throw CliErrors[_0x58ad77(0x1e6)](_0x58ad77(0x233));if(_0x55e8dd[_0x58ad77(0x231)]>0x64)throw CliErrors[_0x58ad77(0x1e6)]('--codes\x20supports\x20at\x20most\x20100\x20unique\x20codes.');const _0x39cff7={'appCode':_0x23e5c8[_0x58ad77(0x202)],'dbLinkId':_0x1605b4,..._0x1aa4ff?{'env':_0x1aa4ff}:{},'bizType':_0x3bdee2,'bizCodes':_0x55e8dd},_0x2d8476=[_0x58ad77(0x217),_0x58ad77(0x20f)];return _0x3bdee2===_0x58ad77(0x20e)&&_0x2d8476[_0x58ad77(0x209)](_0x58ad77(0x20c)),{'input':_0x39cff7,'selector':{'appCode':_0x23e5c8[_0x58ad77(0x202)],'dbLinkId':_0x1605b4,'targetMode':_0x1aa4ff?_0x58ad77(0x20b):_0x58ad77(0x219),..._0x1aa4ff?{'targetEnv':_0x1aa4ff}:{},'bizType':_0x3bdee2,'bizCodes':_0x55e8dd},'warnings':_0x2d8476};}function normalizeCodes(_0x503a9c){const _0x43fba6=a99_0x7a4b37;return[...new Set(_0x503a9c[_0x43fba6(0x1f9)](',')[_0x43fba6(0x214)](_0x2f2765=>_0x2f2765[_0x43fba6(0x232)]())[_0x43fba6(0x21a)](Boolean))];}function a99_0xfd68(_0x4f4887,_0x3c0889){_0x4f4887=_0x4f4887-0x1e4;const _0x455228=a99_0x4552();let _0xfd687d=_0x455228[_0x4f4887];return _0xfd687d;}function a99_0x4552(){const _0x433ed5=['Metadata\x20type\x20to\x20synchronize','deployment','defineProperty','action','validation','confirm','Would\x20synchronize\x20','\x20deployment\x20metadata\x20item(s).','deployment_sync_outcome_unknown','not_submitted','--target-env\x20must\x20be\x20one\x20of:\x20','sql','1603472Zvsgxx','UPDATED','selector','Confirm\x20the\x20target\x20connection\x20and\x20metadata\x20codes','--type\x20must\x20be\x20one\x20of:\x20','12UmJxXS','--confirm\x20is\x20required\x20to\x20synchronize\x20deployment\x20metadata.','target-env','10iTZnfx','Deployment\x20target\x20selected\x20by\x20the\x20server-side\x20environment\x20mapping','Base\x20dblink\x20ID\x20for\x20direct\x20or\x20server-side\x20environment-mapped\x20deployment\x20sync','split','\x20failed\x20item(s).','Synchronize\x20selected\x20development\x20metadata\x20to\x20a\x20deployment\x20database','db-id','POST','bizType','warnings','deployment_metadata_sync','bizCodes','appCode','deployment_sync_partial_failure','bff','partial_failure','string','prod','input','unshift','bool','environment','Dataset\x20sync\x20may\x20commit\x20the\x20target\x20dblink\x20before\x20item\x20synchronization;\x20that\x20dblink\x20change\x20is\x20not\x20rolled\x20back\x20when\x20later\x20items\x20fail.','target_read_api_unavailable','dataset','Do\x20not\x20retry\x20automatically\x20when\x20the\x20request\x20outcome\x20is\x20unknown.','str','succeeded','Deployment\x20sync\x20completed\x20with\x20','pre','map','CREATED','isSafeInteger','Target\x20state\x20is\x20not\x20read\x20back\x20because\x20no\x20target\x20metadata\x20read\x20API\x20is\x20available.','join','direct','filter','10572430IDyqoU','Deployment\x20sync\x20response\x20was\x20unavailable;\x20the\x20target\x20outcome\x20is\x20unknown.','332vPjVav','2525MzEXgG','unknown','dev','FAILED','includes','Synchronize\x20selected\x20development\x20metadata\x20into\x20one\x20deployment\x20database\x20connection.','--db-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','codes','items','num','362505HZwZgM','155007JyTBRM','678748PpTNEw','Use\x20the\x20base\x20dblink\x20connection\x20directly,\x20without\x20environment\x20mapping','test','type','46021gqWTef','Comma-separated\x20Dataset,\x20Backend\x20Function,\x20or\x20SQL\x20codes\x20(maximum\x20100)','80rvHXUp','length','trim','--codes\x20must\x20contain\x20at\x20least\x20one\x20non-blank\x20code.'];a99_0x4552=function(){return _0x433ed5;};return a99_0x4552();}function buildOutput(_0x5a0b9d,_0x3fecb6,_0x5d3d05,_0xd4acf1){const _0x13ff26=a99_0x7a4b37,_0x3e24e5=_0xd4acf1===_0x13ff26(0x211)||_0xd4acf1===_0x13ff26(0x205),_0x1e7b53=_0x3fecb6['reduce']((_0x85b797,_0x1087bb)=>{const _0x321a72=_0x13ff26;return _0x85b797[_0x1087bb[_0x321a72(0x1e5)]]=(_0x85b797[_0x1087bb[_0x321a72(0x1e5)]]??0x0)+0x1,_0x85b797;},{});return{'operation':_0x13ff26(0x200),'selector':_0x5a0b9d[_0x13ff26(0x1f0)],'before':null,'after':null,'dryRun':_0x5d3d05,'backend':{'submitted':_0xd4acf1!==_0x13ff26(0x1eb),'method':_0x13ff26(0x1fd),'path':SYNC_PATH,'outcome':_0xd4acf1,'body':_0x5a0b9d['input']},'summary':{'requested':_0x5a0b9d[_0x13ff26(0x208)]['bizCodes'][_0x13ff26(0x231)],'total':_0x3e24e5?_0x3fecb6['length']:_0x5a0b9d[_0x13ff26(0x208)][_0x13ff26(0x201)][_0x13ff26(0x231)],'created':_0x3fecb6[_0x13ff26(0x21a)](_0x101717=>_0x101717[_0x13ff26(0x1e5)]===_0x13ff26(0x215))[_0x13ff26(0x231)],'updated':_0x3fecb6['filter'](_0x322d9e=>_0x322d9e[_0x13ff26(0x1e5)]===_0x13ff26(0x1ef))[_0x13ff26(0x231)],'failed':_0x3fecb6[_0x13ff26(0x21a)](_0x1e394c=>_0x1e394c[_0x13ff26(0x1e5)]===_0x13ff26(0x221))[_0x13ff26(0x231)],'byAction':_0x1e7b53},'items':_0x3fecb6,'verification':{'performed':![],'reason':_0x13ff26(0x20d)},'warnings':_0x5a0b9d[_0x13ff26(0x1ff)]};}function attachErrorData(_0x514dc4,_0x59e74e){const _0xfa79f8=a99_0x7a4b37;Object[_0xfa79f8(0x1e4)](_0x514dc4,'data',{'value':_0x59e74e,'enumerable':!![]});}