@lovrabet/rabetbase-cli 2.5.0 → 2.5.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) 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.d.ts +7 -0
  7. package/lib/auth/auth-server.js +1 -1
  8. package/lib/auth/constant.js +1 -1
  9. package/lib/auth/get-cookie.js +1 -1
  10. package/lib/auth/get-session-user.js +1 -1
  11. package/lib/auth/is-session-valid.js +1 -1
  12. package/lib/auth/login-success-html.js +1 -1
  13. package/lib/auth/logout.js +1 -1
  14. package/lib/cli-flags.js +1 -1
  15. package/lib/cli.js +1 -1
  16. package/lib/commands/api/generate.js +1 -1
  17. package/lib/commands/api/index.js +1 -1
  18. package/lib/commands/api/list.js +1 -1
  19. package/lib/commands/api/pull.js +1 -1
  20. package/lib/commands/api/shared.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/members-list.js +1 -1
  24. package/lib/commands/app/remote-directory.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/delete.js +1 -1
  54. package/lib/commands/config/get.js +1 -1
  55. package/lib/commands/config/index.js +1 -1
  56. package/lib/commands/config/init.d.ts +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/business-groups.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-restore.d.ts +107 -0
  68. package/lib/commands/dataset/field-restore.js +1 -0
  69. package/lib/commands/dataset/field-update.js +1 -1
  70. package/lib/commands/dataset/generate.js +1 -1
  71. package/lib/commands/dataset/index.js +1 -1
  72. package/lib/commands/dataset/list.js +1 -1
  73. package/lib/commands/dataset/operations.js +1 -1
  74. package/lib/commands/dataset/relation-audit.js +1 -1
  75. package/lib/commands/dataset/relation-create.js +1 -1
  76. package/lib/commands/dataset/relation-delete.js +1 -1
  77. package/lib/commands/dataset/relation-shared.js +1 -1
  78. package/lib/commands/dataset/relation-update.js +1 -1
  79. package/lib/commands/dataset/relations.js +1 -1
  80. package/lib/commands/dataset/rename.js +1 -1
  81. package/lib/commands/dataset/restore.js +1 -1
  82. package/lib/commands/dataset/user-deleted-field-list.d.ts +36 -0
  83. package/lib/commands/dataset/user-deleted-field-list.js +1 -0
  84. package/lib/commands/db/analysis-batching.js +1 -1
  85. package/lib/commands/db/analyze-batch-plan.js +1 -1
  86. package/lib/commands/db/analyze-cancel.js +1 -1
  87. package/lib/commands/db/analyze-start.js +1 -1
  88. package/lib/commands/db/analyze-status.js +1 -1
  89. package/lib/commands/db/create.js +1 -1
  90. package/lib/commands/db/delete.js +1 -1
  91. package/lib/commands/db/detail.js +1 -1
  92. package/lib/commands/db/diff-refresh-start.js +1 -1
  93. package/lib/commands/db/diff-refresh-status.js +1 -1
  94. package/lib/commands/db/diff.js +1 -1
  95. package/lib/commands/db/index.js +1 -1
  96. package/lib/commands/db/list.js +1 -1
  97. package/lib/commands/db/shared.js +1 -1
  98. package/lib/commands/db/table-diff-shared.js +1 -1
  99. package/lib/commands/db/tables.js +1 -1
  100. package/lib/commands/db/test.js +1 -1
  101. package/lib/commands/db/update.js +1 -1
  102. package/lib/commands/deployment/auto-sync.d.ts +28 -0
  103. package/lib/commands/deployment/auto-sync.js +1 -0
  104. package/lib/commands/deployment/index.d.ts +2 -0
  105. package/lib/commands/deployment/index.js +1 -0
  106. package/lib/commands/deployment/sync.d.ts +2 -0
  107. package/lib/commands/deployment/sync.js +1 -0
  108. package/lib/commands/doctor.js +1 -1
  109. package/lib/commands/file/index.js +1 -1
  110. package/lib/commands/issue/index.js +1 -1
  111. package/lib/commands/issue/nudge.js +1 -1
  112. package/lib/commands/issue/report.js +1 -1
  113. package/lib/commands/issue/shared.js +1 -1
  114. package/lib/commands/kb/create.js +1 -1
  115. package/lib/commands/kb/delete.js +1 -1
  116. package/lib/commands/kb/detail.js +1 -1
  117. package/lib/commands/kb/index.js +1 -1
  118. package/lib/commands/kb/list.js +1 -1
  119. package/lib/commands/kb/search.js +1 -1
  120. package/lib/commands/kb/shared.js +1 -1
  121. package/lib/commands/kb/update.js +1 -1
  122. package/lib/commands/logs/index.js +1 -1
  123. package/lib/commands/menu/asset-update.js +1 -1
  124. package/lib/commands/menu/delete.js +1 -1
  125. package/lib/commands/menu/external-link-create.js +1 -1
  126. package/lib/commands/menu/external-link-update.js +1 -1
  127. package/lib/commands/menu/group-create.js +1 -1
  128. package/lib/commands/menu/group-update.js +1 -1
  129. package/lib/commands/menu/index.js +1 -1
  130. package/lib/commands/menu/list.js +1 -1
  131. package/lib/commands/menu/move.js +1 -1
  132. package/lib/commands/menu/regroup-start.js +1 -1
  133. package/lib/commands/menu/rename.js +1 -1
  134. package/lib/commands/menu/shared/compare-table.js +1 -1
  135. package/lib/commands/menu/shared/delete-plan.js +1 -1
  136. package/lib/commands/menu/shared/facts.js +1 -1
  137. package/lib/commands/menu/shared/index.js +1 -1
  138. package/lib/commands/menu/shared/inquirer.js +1 -1
  139. package/lib/commands/menu/shared/local-pages.js +1 -1
  140. package/lib/commands/menu/shared/logic.js +1 -1
  141. package/lib/commands/menu/shared/mutations.js +1 -1
  142. package/lib/commands/menu/shared/service.js +1 -1
  143. package/lib/commands/menu/shared/sync-core.js +1 -1
  144. package/lib/commands/menu/shared/update-core.js +1 -1
  145. package/lib/commands/menu/shared/valid-url.js +1 -1
  146. package/lib/commands/menu/sync.js +1 -1
  147. package/lib/commands/menu/visibility-update.js +1 -1
  148. package/lib/commands/notification/config-create.js +1 -1
  149. package/lib/commands/notification/config-delete.js +1 -1
  150. package/lib/commands/notification/config-list.js +1 -1
  151. package/lib/commands/notification/config-update.js +1 -1
  152. package/lib/commands/notification/index.js +1 -1
  153. package/lib/commands/notification/shared.js +1 -1
  154. package/lib/commands/ocr/index.js +1 -1
  155. package/lib/commands/page/create.js +1 -1
  156. package/lib/commands/page/custom/detail.js +1 -1
  157. package/lib/commands/page/custom/list.js +1 -1
  158. package/lib/commands/page/custom/publish.js +1 -1
  159. package/lib/commands/page/custom/shared.js +1 -1
  160. package/lib/commands/page/custom/syntax.js +1 -1
  161. package/lib/commands/page/custom/template.js +1 -1
  162. package/lib/commands/page/custom/update.js +1 -1
  163. package/lib/commands/page/data-list-status.js +1 -1
  164. package/lib/commands/page/generate-start.js +1 -1
  165. package/lib/commands/page/generate-status.js +1 -1
  166. package/lib/commands/page/index.js +1 -1
  167. package/lib/commands/page/pull.js +1 -1
  168. package/lib/commands/page/push.js +1 -1
  169. package/lib/commands/page/relation-audit.js +1 -1
  170. package/lib/commands/page/restore.js +1 -1
  171. package/lib/commands/page/shared.js +1 -1
  172. package/lib/commands/page/sync.js +1 -1
  173. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  174. package/lib/commands/project/create/format-elapsed.js +1 -1
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.js +1 -1
  177. package/lib/commands/project/create/project-name.js +1 -1
  178. package/lib/commands/project/create/project-template-archive.js +1 -1
  179. package/lib/commands/project/create/project-template-path.js +1 -1
  180. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  181. package/lib/commands/project/create/use-format-code.js +1 -1
  182. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  183. package/lib/commands/project/index.js +1 -1
  184. package/lib/commands/project/upgrade.js +1 -1
  185. package/lib/commands/registry.js +1 -1
  186. package/lib/commands/role/delete.js +1 -1
  187. package/lib/commands/role/detail.js +1 -1
  188. package/lib/commands/role/index.js +1 -1
  189. package/lib/commands/role/list.js +1 -1
  190. package/lib/commands/role/shared.js +1 -1
  191. package/lib/commands/role/update.js +1 -1
  192. package/lib/commands/role/user-add.js +1 -1
  193. package/lib/commands/role/user-remove.js +1 -1
  194. package/lib/commands/role/user-resolve.js +1 -1
  195. package/lib/commands/run/index.js +1 -1
  196. package/lib/commands/schema.js +1 -1
  197. package/lib/commands/sql/create.js +1 -1
  198. package/lib/commands/sql/delete.js +1 -1
  199. package/lib/commands/sql/detail.js +1 -1
  200. package/lib/commands/sql/exec.js +1 -1
  201. package/lib/commands/sql/index.js +1 -1
  202. package/lib/commands/sql/list.js +1 -1
  203. package/lib/commands/sql/pull.js +1 -1
  204. package/lib/commands/sql/push.js +1 -1
  205. package/lib/commands/sql/shared.js +1 -1
  206. package/lib/commands/sql/status.js +1 -1
  207. package/lib/commands/sql/validate.js +1 -1
  208. package/lib/commands/task/index.js +1 -1
  209. package/lib/commands/task/status.js +1 -1
  210. package/lib/commands/tenant/index.js +1 -1
  211. package/lib/commands/tenant/members-list.js +1 -1
  212. package/lib/commands/tenant/shared.js +1 -1
  213. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  214. package/lib/commands/user-account/index.js +1 -1
  215. package/lib/commands/workspace/add.js +1 -1
  216. package/lib/commands/workspace/index.js +1 -1
  217. package/lib/commands/workspace/remove.js +1 -1
  218. package/lib/config/deployment-sync.d.ts +10 -0
  219. package/lib/config/deployment-sync.js +1 -0
  220. package/lib/config/domain-config.d.ts +1 -1
  221. package/lib/config/domain-config.js +1 -1
  222. package/lib/config/project-routing.d.ts +30 -0
  223. package/lib/config/project-routing.js +1 -0
  224. package/lib/config/schema.d.ts +1 -1
  225. package/lib/config/schema.js +1 -1
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.d.ts +7 -2
  230. package/lib/constant/domain.js +1 -1
  231. package/lib/constant/env.js +1 -1
  232. package/lib/constant/output.js +1 -1
  233. package/lib/constant/paths.js +1 -1
  234. package/lib/constant/region.d.ts +2 -2
  235. package/lib/constant/region.js +1 -1
  236. package/lib/constant/risk.js +1 -1
  237. package/lib/constant/routing-profile.d.ts +115 -0
  238. package/lib/constant/routing-profile.js +1 -0
  239. package/lib/context/app-resolver.d.ts +2 -0
  240. package/lib/context/app-resolver.js +1 -1
  241. package/lib/context/auth-resolver.js +1 -1
  242. package/lib/context/config-loader.js +1 -1
  243. package/lib/context.js +1 -1
  244. package/lib/core/alias-resolver.js +1 -1
  245. package/lib/core/api-client.d.ts +35 -0
  246. package/lib/core/api-client.js +1 -1
  247. package/lib/core/bff/config.js +1 -1
  248. package/lib/core/bff/file-system.js +1 -1
  249. package/lib/core/bff/hash.js +1 -1
  250. package/lib/core/bff/lock.js +1 -1
  251. package/lib/core/bff/utils.js +1 -1
  252. package/lib/core/db-resolver.js +1 -1
  253. package/lib/core/page/file-system.js +1 -1
  254. package/lib/core/page/hash.js +1 -1
  255. package/lib/core/page/lock.js +1 -1
  256. package/lib/core/sql-index-auditor.js +1 -1
  257. package/lib/core/sql-sync/config.js +1 -1
  258. package/lib/core/sql-sync/file-system.js +1 -1
  259. package/lib/core/sql-sync/hash.js +1 -1
  260. package/lib/core/sql-sync/lock.js +1 -1
  261. package/lib/core/sql-sync/utils.js +1 -1
  262. package/lib/core/sql-validator.js +1 -1
  263. package/lib/errors.js +1 -1
  264. package/lib/framework/build-all-flags.js +1 -1
  265. package/lib/framework/error-output.js +1 -1
  266. package/lib/framework/explicit-yes.js +1 -1
  267. package/lib/framework/flags.js +1 -1
  268. package/lib/framework/help.js +1 -1
  269. package/lib/framework/index.js +1 -1
  270. package/lib/framework/output.js +1 -1
  271. package/lib/framework/response.js +1 -1
  272. package/lib/framework/runner-alias.js +1 -1
  273. package/lib/framework/runner.js +1 -1
  274. package/lib/framework/schema-export.js +1 -1
  275. package/lib/framework/types.d.ts +4 -0
  276. package/lib/framework/types.js +1 -1
  277. package/lib/generated/build-info.d.ts +4 -4
  278. package/lib/generated/build-info.js +1 -1
  279. package/lib/help.js +1 -1
  280. package/lib/postinstall.js +1 -1
  281. package/lib/runtime/confirmation.js +1 -1
  282. package/lib/runtime/event.js +1 -1
  283. package/lib/runtime/index.js +1 -1
  284. package/lib/runtime/queue.js +1 -1
  285. package/lib/runtime/resolve.js +1 -1
  286. package/lib/skills/builtin-skill.js +1 -1
  287. package/lib/skills/main.js +1 -1
  288. package/lib/skills/npx-skills-add.js +1 -1
  289. package/lib/skills/skill-presence.js +1 -1
  290. package/lib/telemetry/cli-command-trace.js +1 -1
  291. package/lib/telemetry/cli-help-trace.js +1 -1
  292. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  293. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  294. package/lib/telemetry/send-cli-trace-log.js +1 -1
  295. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  296. package/lib/utils/ai_config.js +1 -1
  297. package/lib/utils/apply-jq-filter.js +1 -1
  298. package/lib/utils/cdn-config.js +1 -1
  299. package/lib/utils/check-sdk-version.js +1 -1
  300. package/lib/utils/cli-version-check.js +1 -1
  301. package/lib/utils/cli-version-policy.js +1 -1
  302. package/lib/utils/config.js +1 -1
  303. package/lib/utils/entity-with-id.js +1 -1
  304. package/lib/utils/file-utils.js +1 -1
  305. package/lib/utils/guides-cdn.js +1 -1
  306. package/lib/utils/http-client.js +1 -1
  307. package/lib/utils/is-non-interactive.js +1 -1
  308. package/lib/utils/logger.js +1 -1
  309. package/lib/utils/params.js +1 -1
  310. package/lib/utils/platform.js +1 -1
  311. package/lib/utils/sleep.js +1 -1
  312. package/lib/utils/template-replacer.js +1 -1
  313. package/lib/utils/update-notice.js +1 -1
  314. package/lib/utils/version.js +1 -1
  315. package/lib/utils/with-active-cookie.js +1 -1
  316. package/lib/utils/write-cli-side-channel.js +1 -1
  317. package/package.json +1 -2
  318. package/skills/rabetbase/SKILL.md +20 -9
  319. package/skills/rabetbase/guides/frontend-development.md +2 -0
  320. package/skills/rabetbase/guides/sdk-client-generation.md +3 -2
  321. package/skills/rabetbase/guides/typescript-sdk.md +42 -0
  322. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -3
  323. package/skills/rabetbase/references/rabetbase-config.md +9 -5
  324. package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +9 -9
  325. package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +1 -1
  326. package/skills/rabetbase/references/rabetbase-dataset-field-restore.md +59 -0
  327. package/skills/rabetbase/references/rabetbase-dataset-user-deleted-field-list.md +47 -0
  328. package/skills/rabetbase/references/rabetbase-deployment-sync.md +92 -0
  329. package/skills/rabetbase/references/rabetbase-init.md +11 -5
  330. package/skills/rabetbase/references/rabetbase-project-create.md +6 -5
  331. package/skills/rabetbase.manifest.json +6 -3
  332. package/templates/README.md +13 -17
@@ -1 +1 @@
1
- const a81_0x15554e=a81_0x208d;(function(_0xf09c,_0x142fd8){const _0x2314b1=a81_0x208d,_0x1963dd=_0xf09c();while(!![]){try{const _0x5d3e7e=-parseInt(_0x2314b1(0xc0))/0x1*(parseInt(_0x2314b1(0xbf))/0x2)+-parseInt(_0x2314b1(0xc2))/0x3*(parseInt(_0x2314b1(0xb3))/0x4)+parseInt(_0x2314b1(0xcd))/0x5+-parseInt(_0x2314b1(0xd2))/0x6+parseInt(_0x2314b1(0xb4))/0x7+parseInt(_0x2314b1(0xdb))/0x8*(-parseInt(_0x2314b1(0xbc))/0x9)+parseInt(_0x2314b1(0xbb))/0xa*(parseInt(_0x2314b1(0xc6))/0xb);if(_0x5d3e7e===_0x142fd8)break;else _0x1963dd['push'](_0x1963dd['shift']());}catch(_0xa83414){_0x1963dd['push'](_0x1963dd['shift']());}}}(a81_0x43d6,0x2c285));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([a81_0x15554e(0xcf),a81_0x15554e(0xbd),'FAILED',a81_0x15554e(0xc3)]);function a81_0x43d6(){const _0x5efa7e=['costTimeMs','length','string','object','6376RNIlZl','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','parse','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','analyze-status','TARGETED','startTime','appCode','accumulatedErrorTypeCounts','1378964orwFOa','745017hnijMv','read','jobContext','str','firstStartTime','RETRYING','Analysis\x20status\x20for\x20','3810VNmzuo','1125qGIXyz','PARTIAL_SUCCESS','plan','4cKWcZP','179579lPtLAq','isArray','3PVKMux','CANCELLED','isFinite','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','31053FTlttF','tableNames','now','every','number','inputParams\x20is\x20not\x20an\x20object','inputParams','23550NExXup','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','SUCCESS','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','trim','1213866sNPZNb','endTime','status','keys','UNKNOWN'];a81_0x43d6=function(){return _0x5efa7e;};return a81_0x43d6();}export const dbAnalyzeStatus={'service':'db','command':a81_0x15554e(0xae),'description':a81_0x15554e(0xab),'risk':a81_0x15554e(0xb5),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x15554e(0xbe),'type':a81_0x15554e(0xd9),'required':!![],'description':a81_0x15554e(0xad)}],async 'execute'(_0x1b86b3){const _0x50a515=a81_0x15554e,_0x55f239=_0x1b86b3['num']('id'),_0x562c43=_0x1b86b3[_0x50a515(0xb7)](_0x50a515(0xbe)),_0x511dc7=await getDbAnalysisStatus(_0x562c43),_0x3e8fba=TERMINAL_STATUSES['has'](_0x511dc7[_0x50a515(0xd4)]??''),{parsedJobContext:_0x1c196f,jobContextParseWarning:_0x51bc6a}=parseJobContext(_0x511dc7[_0x50a515(0xb6)]),{requestedAnalysis:_0x599914,requestedAnalysisParseWarning:_0x1521dc}=parseRequestedAnalysis(_0x511dc7[_0x50a515(0xcc)]),_0xd1745a=readAccumulatedErrorTypeCounts(_0x1c196f),_0x4fe4ee=calculateAttemptElapsedMs(_0x511dc7,_0x3e8fba),_0x4c5636=calculateElapsedFromStart(_0x511dc7[_0x50a515(0xb8)],_0x511dc7[_0x50a515(0xd3)],_0x3e8fba),_0x381a0f=detectMultipleAttempts(_0x511dc7),_0x38e06d=buildDbPageLinks(_0x1b86b3[_0x50a515(0xb1)],_0x55f239);return{'ok':!![],'data':{'dbLinkId':_0x55f239,'planId':_0x562c43,'status':_0x511dc7,'requestedAnalysis':_0x599914,'requestedAnalysisParseWarning':_0x1521dc,'parsedJobContext':_0x1c196f,'accumulatedErrorTypeCounts':_0xd1745a,'accumulatedErrorTypeCountsAdvisory':_0xd1745a?'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.':_0x50a515(0xce),'isTerminal':_0x3e8fba,'isRetrying':_0x511dc7[_0x50a515(0xd4)]===_0x50a515(0xb9),'attemptElapsedMs':_0x4fe4ee,'totalElapsedMs':_0x4c5636,'hasMultipleAttempts':_0x381a0f,'jobContextParseWarning':_0x51bc6a,..._0x38e06d?{'links':_0x38e06d}:{}},'message':_0x50a515(0xba)+_0x562c43};}};function parseRequestedAnalysis(_0x18913d){const _0x2914ba=a81_0x15554e,_0xc1e52c={'mode':_0x2914ba(0xd6),'tableCount':null,'tableNames':null};if(!_0x18913d?.['trim']())return{'requestedAnalysis':_0xc1e52c,'requestedAnalysisParseWarning':_0x2914ba(0xd0)};try{const _0x16a16f=JSON['parse'](_0x18913d);if(!_0x16a16f||typeof _0x16a16f!=='object'||Array[_0x2914ba(0xc1)](_0x16a16f))throw new Error(_0x2914ba(0xcb));const _0x235b05=_0x16a16f[_0x2914ba(0xc7)];if(_0x235b05===undefined||_0x235b05===null)return{'requestedAnalysis':{'mode':'FULL','tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array['isArray'](_0x235b05)&&_0x235b05[_0x2914ba(0xc9)](_0x2923f2=>typeof _0x2923f2===_0x2914ba(0xd9)))return{'requestedAnalysis':{'mode':_0x235b05[_0x2914ba(0xd8)]>0x0?_0x2914ba(0xaf):'FULL','tableCount':_0x235b05[_0x2914ba(0xd8)],'tableNames':_0x235b05},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0xc1e52c,'requestedAnalysisParseWarning':'inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.'};}function readAccumulatedErrorTypeCounts(_0x22f46f){const _0x56c646=a81_0x15554e,_0x18c367=_0x22f46f?.[_0x56c646(0xb2)];if(!_0x18c367||typeof _0x18c367!==_0x56c646(0xda)||Array[_0x56c646(0xc1)](_0x18c367))return null;if(Object[_0x56c646(0xd5)](_0x18c367)['length']===0x0)return null;return _0x18c367;}function parseJobContext(_0x574314){const _0x303346=a81_0x15554e;if(!_0x574314?.[_0x303346(0xd1)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x2440d1=JSON[_0x303346(0xac)](_0x574314);if(_0x2440d1&&typeof _0x2440d1===_0x303346(0xda)&&!Array[_0x303346(0xc1)](_0x2440d1))return{'parsedJobContext':_0x2440d1,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x303346(0xc5)};}function a81_0x208d(_0x2a8dc7,_0x28ada3){_0x2a8dc7=_0x2a8dc7-0xab;const _0x43d654=a81_0x43d6();let _0x208def=_0x43d654[_0x2a8dc7];return _0x208def;}function calculateAttemptElapsedMs(_0x109f9e,_0x5cfabd){const _0x53a9e5=a81_0x15554e;if(typeof _0x109f9e['costTimeMs']===_0x53a9e5(0xca)&&Number['isFinite'](_0x109f9e[_0x53a9e5(0xd7)])&&_0x109f9e[_0x53a9e5(0xd7)]>=0x0)return _0x109f9e['costTimeMs'];return calculateElapsedFromStart(_0x109f9e[_0x53a9e5(0xb0)],_0x109f9e['endTime'],_0x5cfabd);}function calculateElapsedFromStart(_0x4501cf,_0x5465ab,_0x15d873){const _0x1203a1=a81_0x15554e,_0x47c7e0=toTimestamp(_0x4501cf);if(_0x47c7e0===null)return null;const _0x2fb8cb=toTimestamp(_0x5465ab),_0x5732e6=_0x2fb8cb??(_0x15d873?null:Date[_0x1203a1(0xc8)]());if(_0x5732e6===null||_0x5732e6<_0x47c7e0)return null;return _0x5732e6-_0x47c7e0;}function detectMultipleAttempts(_0x34df1c){const _0x23b354=a81_0x15554e,_0x5b19ac=toTimestamp(_0x34df1c[_0x23b354(0xb8)]),_0x42aed6=toTimestamp(_0x34df1c[_0x23b354(0xb0)]);return _0x5b19ac!==null&&_0x42aed6!==null&&_0x5b19ac!==_0x42aed6;}function toTimestamp(_0x11abde){const _0x4cc0cb=a81_0x15554e;if(typeof _0x11abde===_0x4cc0cb(0xca))return Number[_0x4cc0cb(0xc4)](_0x11abde)?_0x11abde:null;if(typeof _0x11abde!==_0x4cc0cb(0xd9)||_0x11abde['trim']()==='')return null;const _0x6b5886=Number(_0x11abde);if(Number[_0x4cc0cb(0xc4)](_0x6b5886))return _0x6b5886;const _0x3706cf=Date[_0x4cc0cb(0xac)](_0x11abde);return Number['isNaN'](_0x3706cf)?null:_0x3706cf;}
1
+ const a83_0x2fac81=a83_0x8d47;(function(_0x571a75,_0x9c6187){const _0xda677e=a83_0x8d47,_0x1b5984=_0x571a75();while(!![]){try{const _0x2f52ec=parseInt(_0xda677e(0x1b6))/0x1+parseInt(_0xda677e(0x1a5))/0x2+-parseInt(_0xda677e(0x1a3))/0x3+-parseInt(_0xda677e(0x1a4))/0x4*(parseInt(_0xda677e(0x1b2))/0x5)+parseInt(_0xda677e(0x1ad))/0x6+-parseInt(_0xda677e(0x1b8))/0x7+parseInt(_0xda677e(0x1be))/0x8*(parseInt(_0xda677e(0x1c9))/0x9);if(_0x2f52ec===_0x9c6187)break;else _0x1b5984['push'](_0x1b5984['shift']());}catch(_0x255c59){_0x1b5984['push'](_0x1b5984['shift']());}}}(a83_0xbddd,0xbbcca));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a83_0x8d47(_0x20cbf4,_0x256d7f){_0x20cbf4=_0x20cbf4-0x1a0;const _0xbddd65=a83_0xbddd();let _0x8d474d=_0xbddd65[_0x20cbf4];return _0x8d474d;}import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a83_0x2fac81(0x1a6),a83_0x2fac81(0x1a1),a83_0x2fac81(0x1b0),a83_0x2fac81(0x1c2)]);export const dbAnalyzeStatus={'service':'db','command':a83_0x2fac81(0x1bb),'description':a83_0x2fac81(0x1aa),'risk':a83_0x2fac81(0x1af),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a83_0x2fac81(0x1b9),'type':a83_0x2fac81(0x1c6),'required':!![],'description':a83_0x2fac81(0x1c1)}],async 'execute'(_0x318f12){const _0xf68257=a83_0x2fac81,_0x2b28fc=_0x318f12['num']('id'),_0x211b85=_0x318f12[_0xf68257(0x1bc)]('plan'),_0x433865=await getDbAnalysisStatus(_0x211b85),_0x4dc459=TERMINAL_STATUSES[_0xf68257(0x1c7)](_0x433865[_0xf68257(0x1a0)]??''),{parsedJobContext:_0x159008,jobContextParseWarning:_0x6faf53}=parseJobContext(_0x433865['jobContext']),{requestedAnalysis:_0x1f2571,requestedAnalysisParseWarning:_0x4a0ecb}=parseRequestedAnalysis(_0x433865['inputParams']),_0x32c23c=readAccumulatedErrorTypeCounts(_0x159008),_0x203e07=calculateAttemptElapsedMs(_0x433865,_0x4dc459),_0x157a3d=calculateElapsedFromStart(_0x433865[_0xf68257(0x1ac)],_0x433865[_0xf68257(0x1b3)],_0x4dc459),_0x1fa74a=detectMultipleAttempts(_0x433865),_0x59ce91=buildDbPageLinks(_0x318f12['appCode'],_0x2b28fc);return{'ok':!![],'data':{'dbLinkId':_0x2b28fc,'planId':_0x211b85,'status':_0x433865,'requestedAnalysis':_0x1f2571,'requestedAnalysisParseWarning':_0x4a0ecb,'parsedJobContext':_0x159008,'accumulatedErrorTypeCounts':_0x32c23c,'accumulatedErrorTypeCountsAdvisory':_0x32c23c?_0xf68257(0x1bd):'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','isTerminal':_0x4dc459,'isRetrying':_0x433865[_0xf68257(0x1a0)]===_0xf68257(0x1a9),'attemptElapsedMs':_0x203e07,'totalElapsedMs':_0x157a3d,'hasMultipleAttempts':_0x1fa74a,'jobContextParseWarning':_0x6faf53,..._0x59ce91?{'links':_0x59ce91}:{}},'message':'Analysis\x20status\x20for\x20'+_0x211b85};}};function parseRequestedAnalysis(_0x5c2d6a){const _0x49733f=a83_0x2fac81,_0x145145={'mode':_0x49733f(0x1b5),'tableCount':null,'tableNames':null};if(!_0x5c2d6a?.[_0x49733f(0x1a8)]())return{'requestedAnalysis':_0x145145,'requestedAnalysisParseWarning':_0x49733f(0x1bf)};try{const _0x1f36d3=JSON[_0x49733f(0x1c8)](_0x5c2d6a);if(!_0x1f36d3||typeof _0x1f36d3!=='object'||Array[_0x49733f(0x1c4)](_0x1f36d3))throw new Error('inputParams\x20is\x20not\x20an\x20object');const _0x23e14f=_0x1f36d3[_0x49733f(0x1c3)];if(_0x23e14f===undefined||_0x23e14f===null)return{'requestedAnalysis':{'mode':'FULL','tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x49733f(0x1c4)](_0x23e14f)&&_0x23e14f['every'](_0xe259f2=>typeof _0xe259f2===_0x49733f(0x1c6)))return{'requestedAnalysis':{'mode':_0x23e14f['length']>0x0?_0x49733f(0x1a2):_0x49733f(0x1b7),'tableCount':_0x23e14f[_0x49733f(0x1ca)],'tableNames':_0x23e14f},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x145145,'requestedAnalysisParseWarning':'inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.'};}function readAccumulatedErrorTypeCounts(_0x239f8e){const _0x38a38c=a83_0x2fac81,_0x52c2bd=_0x239f8e?.['accumulatedErrorTypeCounts'];if(!_0x52c2bd||typeof _0x52c2bd!==_0x38a38c(0x1b1)||Array[_0x38a38c(0x1c4)](_0x52c2bd))return null;if(Object[_0x38a38c(0x1ae)](_0x52c2bd)['length']===0x0)return null;return _0x52c2bd;}function a83_0xbddd(){const _0x5097e6=['2760314yEhZIi','SUCCESS','isNaN','trim','RETRYING','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','costTimeMs','firstStartTime','5357604hcXwQb','keys','read','FAILED','object','6100qCaano','endTime','isFinite','UNKNOWN','35061duHceO','FULL','3286878nhTNoP','plan','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','analyze-status','str','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','8472aFFhVR','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','number','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','CANCELLED','tableNames','isArray','now','string','has','parse','6597ZsIjdX','length','startTime','status','PARTIAL_SUCCESS','TARGETED','4178997XbZljX','1484qegeIn'];a83_0xbddd=function(){return _0x5097e6;};return a83_0xbddd();}function parseJobContext(_0x47d112){const _0x2a7548=a83_0x2fac81;if(!_0x47d112?.[_0x2a7548(0x1a8)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x38a3b5=JSON[_0x2a7548(0x1c8)](_0x47d112);if(_0x38a3b5&&typeof _0x38a3b5==='object'&&!Array[_0x2a7548(0x1c4)](_0x38a3b5))return{'parsedJobContext':_0x38a3b5,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x2a7548(0x1ba)};}function calculateAttemptElapsedMs(_0x2be27b,_0x16f9fd){const _0x45bc7c=a83_0x2fac81;if(typeof _0x2be27b['costTimeMs']==='number'&&Number[_0x45bc7c(0x1b4)](_0x2be27b[_0x45bc7c(0x1ab)])&&_0x2be27b['costTimeMs']>=0x0)return _0x2be27b['costTimeMs'];return calculateElapsedFromStart(_0x2be27b[_0x45bc7c(0x1cb)],_0x2be27b[_0x45bc7c(0x1b3)],_0x16f9fd);}function calculateElapsedFromStart(_0x5ef30e,_0x5d7b1c,_0xff866c){const _0x11d7b0=a83_0x2fac81,_0x9e80d0=toTimestamp(_0x5ef30e);if(_0x9e80d0===null)return null;const _0x5d42b1=toTimestamp(_0x5d7b1c),_0x26a9f4=_0x5d42b1??(_0xff866c?null:Date[_0x11d7b0(0x1c5)]());if(_0x26a9f4===null||_0x26a9f4<_0x9e80d0)return null;return _0x26a9f4-_0x9e80d0;}function detectMultipleAttempts(_0x2a51be){const _0x4dea4c=a83_0x2fac81,_0x357ca5=toTimestamp(_0x2a51be[_0x4dea4c(0x1ac)]),_0x253416=toTimestamp(_0x2a51be[_0x4dea4c(0x1cb)]);return _0x357ca5!==null&&_0x253416!==null&&_0x357ca5!==_0x253416;}function toTimestamp(_0x3467d0){const _0x7ecfed=a83_0x2fac81;if(typeof _0x3467d0===_0x7ecfed(0x1c0))return Number[_0x7ecfed(0x1b4)](_0x3467d0)?_0x3467d0:null;if(typeof _0x3467d0!==_0x7ecfed(0x1c6)||_0x3467d0[_0x7ecfed(0x1a8)]()==='')return null;const _0x47fb6e=Number(_0x3467d0);if(Number[_0x7ecfed(0x1b4)](_0x47fb6e))return _0x47fb6e;const _0x317c11=Date[_0x7ecfed(0x1c8)](_0x3467d0);return Number[_0x7ecfed(0x1a7)](_0x317c11)?null:_0x317c11;}
@@ -1 +1 @@
1
- const a82_0x405aed=a82_0x2859;(function(_0x36d51b,_0x5ae63e){const _0x93372d=a82_0x2859,_0x53828e=_0x36d51b();while(!![]){try{const _0x4fce3d=-parseInt(_0x93372d(0x180))/0x1*(-parseInt(_0x93372d(0x176))/0x2)+parseInt(_0x93372d(0x18f))/0x3+-parseInt(_0x93372d(0x190))/0x4*(parseInt(_0x93372d(0x19a))/0x5)+-parseInt(_0x93372d(0x177))/0x6+parseInt(_0x93372d(0x183))/0x7+parseInt(_0x93372d(0x19c))/0x8*(parseInt(_0x93372d(0x1a3))/0x9)+parseInt(_0x93372d(0x17a))/0xa*(-parseInt(_0x93372d(0x1a0))/0xb);if(_0x4fce3d===_0x5ae63e)break;else _0x53828e['push'](_0x53828e['shift']());}catch(_0x4b7c0b){_0x53828e['push'](_0x53828e['shift']());}}}(a82_0x5db4,0x6b0ee));function a82_0x5db4(){const _0x9c3354=['Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','dbname','1nCurkD','dbtype','password','786611eKgDWa','POST','planId','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','validation','bool','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','boolean','join','Created\x20db\x20link\x20','/smartapi/dblink/create','create','1375047reJXKz','48308rbbwUP','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','\x20and\x20started\x20analysis','8.0','databasePage','dburl','Extra\x20JDBC-style\x20connection\x20parameters\x20string','trim','Database\x20username','write','40SoUiZV','skip-connection-test','32njcUfy','username','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','appCode','286dofTtD','message','autostart','1792557fHWkGL','string','Create\x20dblink','dbparam','After\x20create,\x20start\x20schema\x20analysis','740446SuRpGV','3564510rkvDYg','No\x20follow-up\x20analysis','[redacted]','234010azGeZZ','str','dbversion','dbdesc'];a82_0x5db4=function(){return _0x9c3354;};return a82_0x5db4();}import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a82_0x2859(_0x357534,_0x3f1b08){_0x357534=_0x357534-0x176;const _0x5db44b=a82_0x5db4();let _0x2859cc=_0x5db44b[_0x357534];return _0x2859cc;}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a82_0x405aed(0x18e),'description':a82_0x405aed(0x17e),'risk':a82_0x405aed(0x199),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a82_0x405aed(0x17f),'type':a82_0x405aed(0x1a4),'required':!![],'description':a82_0x405aed(0x19e)},DB_TYPE_FLAG,{'name':a82_0x405aed(0x17c),'type':a82_0x405aed(0x1a4),'description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':'8.0'},{'name':a82_0x405aed(0x195),'type':a82_0x405aed(0x1a4),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a82_0x405aed(0x19d),'type':a82_0x405aed(0x1a4),'required':!![],'description':a82_0x405aed(0x198)},{'name':'password','type':'string','required':!![],'description':'Database\x20password'},{'name':'dbparam','type':a82_0x405aed(0x1a4),'description':a82_0x405aed(0x196)},{'name':a82_0x405aed(0x17d),'type':'string','description':'Human-readable\x20description'},{'name':a82_0x405aed(0x1a2),'type':a82_0x405aed(0x18a),'description':a82_0x405aed(0x1a7),'default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x3b347e){const _0x59e1d4=a82_0x405aed,_0x1e1ae6=_0x3b347e['str'](_0x59e1d4(0x195))['trim']();if(!validateDbUrl(_0x1e1ae6))throw CliErrors[_0x59e1d4(0x187)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x1e1ae6+'\x22',_0x59e1d4(0x191));},async 'dryRun'(_0x4d7f82){const _0xe02952=a82_0x405aed,_0x524a4e={'appCode':_0x4d7f82[_0xe02952(0x19f)],'dbName':_0x4d7f82[_0xe02952(0x17b)](_0xe02952(0x17f)),'dbType':_0x4d7f82[_0xe02952(0x17b)](_0xe02952(0x181)),'dbVersion':_0x4d7f82[_0xe02952(0x17b)](_0xe02952(0x17c))||_0xe02952(0x193),'dbUrl':_0x4d7f82[_0xe02952(0x17b)]('dburl')[_0xe02952(0x197)](),'username':_0x4d7f82[_0xe02952(0x17b)]('username'),'password':_0xe02952(0x179),..._0x4d7f82[_0xe02952(0x17b)](_0xe02952(0x1a6))?{'dbParam':_0x4d7f82[_0xe02952(0x17b)](_0xe02952(0x1a6))}:{},..._0x4d7f82[_0xe02952(0x17b)]('dbdesc')?{'dbDesc':_0x4d7f82[_0xe02952(0x17b)](_0xe02952(0x17d))}:{}};return{'method':_0xe02952(0x184),'url':_0xe02952(0x18d),'body':_0x524a4e,'description':[_0xe02952(0x1a5),_0x4d7f82[_0xe02952(0x188)](_0xe02952(0x1a2))?_0xe02952(0x189):_0xe02952(0x178)][_0xe02952(0x18b)]('\x0a'),'connectionPreflight':{'enabled':!_0x4d7f82[_0xe02952(0x188)](_0xe02952(0x19b)),'executed':![]}};},async 'execute'(_0x956afb){const _0xcad3d4=a82_0x405aed,_0x47b5cf={'appCode':_0x956afb['appCode'],'dbName':_0x956afb[_0xcad3d4(0x17b)](_0xcad3d4(0x17f)),'dbType':_0x956afb[_0xcad3d4(0x17b)](_0xcad3d4(0x181)),'dbVersion':_0x956afb[_0xcad3d4(0x17b)]('dbversion')||_0xcad3d4(0x193),'dbUrl':_0x956afb[_0xcad3d4(0x17b)](_0xcad3d4(0x195))['trim'](),'username':_0x956afb[_0xcad3d4(0x17b)]('username'),'password':_0x956afb[_0xcad3d4(0x17b)](_0xcad3d4(0x182)),..._0x956afb['str'](_0xcad3d4(0x1a6))?{'dbParam':_0x956afb[_0xcad3d4(0x17b)](_0xcad3d4(0x1a6))}:{},..._0x956afb[_0xcad3d4(0x17b)]('dbdesc')?{'dbDesc':_0x956afb[_0xcad3d4(0x17b)](_0xcad3d4(0x17d))}:{}};!_0x956afb['bool'](_0xcad3d4(0x19b))&&await assertDbLinkConnectionPreflight(_0x47b5cf);const {id:_0x39aab6,entity:_0x1e33c2}=normalizeEntityWithIdResponse(await createDbLink(_0x47b5cf));if(!_0x39aab6)return{'ok':![],'message':_0xcad3d4(0x186),'data':sanitizeDbLinkForOutput(_0x1e33c2)};let _0x364a53,_0x3d77e1;if(_0x956afb['bool']('autostart'))try{_0x364a53=(await startDbAnalysis(_0x39aab6))[_0xcad3d4(0x185)];}catch(_0x47ab94){_0x3d77e1=_0x47ab94 instanceof Error?_0x47ab94[_0xcad3d4(0x1a1)]:String(_0x47ab94);}const _0x5c8efd=buildDbPageLinks(_0x956afb[_0xcad3d4(0x19f)],_0x39aab6),_0x37dee8={'connection':sanitizeDbLinkForOutput(_0x1e33c2),..._0x5c8efd?{'links':{'databasePage':_0x5c8efd[_0xcad3d4(0x194)]}}:{},..._0x364a53?{'analysisPlanId':_0x364a53}:{},..._0x3d77e1?{'analysisStartWarning':_0x3d77e1}:{}};let _0x34fe1b;return _0x956afb[_0xcad3d4(0x188)](_0xcad3d4(0x1a2))?_0x3d77e1?_0x34fe1b=_0xcad3d4(0x18c)+_0x39aab6+';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning':_0x34fe1b='Created\x20db\x20link\x20'+_0x39aab6+_0xcad3d4(0x192):_0x34fe1b=_0xcad3d4(0x18c)+_0x39aab6,{'ok':!![],'data':_0x37dee8,'message':_0x34fe1b};}};
1
+ const a84_0x35e30c=a84_0x1fa4;function a84_0x1fa4(_0x6cff9f,_0x35dffb){_0x6cff9f=_0x6cff9f-0xc1;const _0x1db143=a84_0x1db1();let _0x1fa4e9=_0x1db143[_0x6cff9f];return _0x1fa4e9;}(function(_0x282783,_0x39a4fd){const _0x20e343=a84_0x1fa4,_0x5db369=_0x282783();while(!![]){try{const _0x1ab814=parseInt(_0x20e343(0xd2))/0x1+-parseInt(_0x20e343(0xd8))/0x2+-parseInt(_0x20e343(0xe3))/0x3*(-parseInt(_0x20e343(0xda))/0x4)+-parseInt(_0x20e343(0xec))/0x5*(parseInt(_0x20e343(0xcc))/0x6)+-parseInt(_0x20e343(0xc4))/0x7+parseInt(_0x20e343(0xcd))/0x8*(parseInt(_0x20e343(0xdc))/0x9)+-parseInt(_0x20e343(0xea))/0xa;if(_0x1ab814===_0x39a4fd)break;else _0x5db369['push'](_0x5db369['shift']());}catch(_0x13a1c9){_0x5db369['push'](_0x5db369['shift']());}}}(a84_0x1db1,0xec3d2));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';function a84_0x1db1(){const _0x4b2a56=['write','1146630DCftrn','Created\x20db\x20link\x20','validation','Create\x20dblink','Extra\x20JDBC-style\x20connection\x20parameters\x20string','appCode','2540470XaVyYq','No\x20follow-up\x20analysis','556OhcfBM','boolean','16951014jwdopR','bool','dbversion','trim','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','password','dbdesc','37803kvEVBi','After\x20create,\x20start\x20schema\x20analysis','dburl','join','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','skip-connection-test','[redacted]','47680Khathy','username','8646845sovlSu','dbparam','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','autostart','5667263KZbssB','string','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','8.0',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','message','Database\x20username','dbtype','6dINNKa','8bsZEyG','dbname','Database\x20password','str'];a84_0x1db1=function(){return _0x4b2a56;};return a84_0x1db1();}export const dbCreate={'service':'db','command':'create','description':a84_0x35e30c(0xe0),'risk':a84_0x35e30c(0xd1),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a84_0x35e30c(0xc5),'required':!![],'description':a84_0x35e30c(0xc6)},DB_TYPE_FLAG,{'name':a84_0x35e30c(0xde),'type':a84_0x35e30c(0xc5),'description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':a84_0x35e30c(0xc7)},{'name':a84_0x35e30c(0xe5),'type':a84_0x35e30c(0xc5),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a84_0x35e30c(0xeb),'type':'string','required':!![],'description':a84_0x35e30c(0xca)},{'name':'password','type':a84_0x35e30c(0xc5),'required':!![],'description':a84_0x35e30c(0xcf)},{'name':'dbparam','type':a84_0x35e30c(0xc5),'description':a84_0x35e30c(0xd6)},{'name':a84_0x35e30c(0xe2),'type':'string','description':'Human-readable\x20description'},{'name':a84_0x35e30c(0xc3),'type':a84_0x35e30c(0xdb),'description':a84_0x35e30c(0xe4),'default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x41251d){const _0x6ee597=a84_0x35e30c,_0x3dc4b7=_0x41251d[_0x6ee597(0xd0)](_0x6ee597(0xe5))[_0x6ee597(0xdf)]();if(!validateDbUrl(_0x3dc4b7))throw CliErrors[_0x6ee597(0xd4)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x3dc4b7+'\x22',_0x6ee597(0xc2));},async 'dryRun'(_0x5e6b4d){const _0x4230f3=a84_0x35e30c,_0x2c2a05={'appCode':_0x5e6b4d['appCode'],'dbName':_0x5e6b4d[_0x4230f3(0xd0)]('dbname'),'dbType':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xcb)),'dbVersion':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xde))||_0x4230f3(0xc7),'dbUrl':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xe5))[_0x4230f3(0xdf)](),'username':_0x5e6b4d['str'](_0x4230f3(0xeb)),'password':_0x4230f3(0xe9),..._0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xc1))?{'dbParam':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xc1))}:{},..._0x5e6b4d[_0x4230f3(0xd0)]('dbdesc')?{'dbDesc':_0x5e6b4d[_0x4230f3(0xd0)](_0x4230f3(0xe2))}:{}};return{'method':'POST','url':'/smartapi/dblink/create','body':_0x2c2a05,'description':[_0x4230f3(0xd5),_0x5e6b4d[_0x4230f3(0xdd)](_0x4230f3(0xc3))?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':_0x4230f3(0xd9)][_0x4230f3(0xe6)]('\x0a'),'connectionPreflight':{'enabled':!_0x5e6b4d[_0x4230f3(0xdd)](_0x4230f3(0xe8)),'executed':![]}};},async 'execute'(_0x382e82){const _0x5012fe=a84_0x35e30c,_0x1acfc7={'appCode':_0x382e82[_0x5012fe(0xd7)],'dbName':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xce)),'dbType':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xcb)),'dbVersion':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xde))||_0x5012fe(0xc7),'dbUrl':_0x382e82['str'](_0x5012fe(0xe5))[_0x5012fe(0xdf)](),'username':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xeb)),'password':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xe1)),..._0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xc1))?{'dbParam':_0x382e82['str'](_0x5012fe(0xc1))}:{},..._0x382e82[_0x5012fe(0xd0)]('dbdesc')?{'dbDesc':_0x382e82[_0x5012fe(0xd0)](_0x5012fe(0xe2))}:{}};!_0x382e82[_0x5012fe(0xdd)]('skip-connection-test')&&await assertDbLinkConnectionPreflight(_0x1acfc7);const {id:_0x251441,entity:_0x10a715}=normalizeEntityWithIdResponse(await createDbLink(_0x1acfc7));if(!_0x251441)return{'ok':![],'message':_0x5012fe(0xe7),'data':sanitizeDbLinkForOutput(_0x10a715)};let _0x41fb53,_0x41e79c;if(_0x382e82[_0x5012fe(0xdd)]('autostart'))try{_0x41fb53=(await startDbAnalysis(_0x251441))['planId'];}catch(_0xc70be5){_0x41e79c=_0xc70be5 instanceof Error?_0xc70be5[_0x5012fe(0xc9)]:String(_0xc70be5);}const _0x42aa32=buildDbPageLinks(_0x382e82[_0x5012fe(0xd7)],_0x251441),_0x3546de={'connection':sanitizeDbLinkForOutput(_0x10a715),..._0x42aa32?{'links':{'databasePage':_0x42aa32['databasePage']}}:{},..._0x41fb53?{'analysisPlanId':_0x41fb53}:{},..._0x41e79c?{'analysisStartWarning':_0x41e79c}:{}};let _0x1f24d3;return _0x382e82[_0x5012fe(0xdd)](_0x5012fe(0xc3))?_0x41e79c?_0x1f24d3=_0x5012fe(0xd3)+_0x251441+_0x5012fe(0xc8):_0x1f24d3='Created\x20db\x20link\x20'+_0x251441+'\x20and\x20started\x20analysis':_0x1f24d3='Created\x20db\x20link\x20'+_0x251441,{'ok':!![],'data':_0x3546de,'message':_0x1f24d3};}};
@@ -1 +1 @@
1
- const a83_0x36e6be=a83_0x3efb;(function(_0x31de07,_0x3ff870){const _0x28c06d=a83_0x3efb,_0x2d3a73=_0x31de07();while(!![]){try{const _0x504cd1=-parseInt(_0x28c06d(0x131))/0x1+parseInt(_0x28c06d(0x122))/0x2+parseInt(_0x28c06d(0x138))/0x3*(-parseInt(_0x28c06d(0x130))/0x4)+parseInt(_0x28c06d(0x125))/0x5+-parseInt(_0x28c06d(0x136))/0x6*(-parseInt(_0x28c06d(0x128))/0x7)+parseInt(_0x28c06d(0x145))/0x8+parseInt(_0x28c06d(0x13a))/0x9*(-parseInt(_0x28c06d(0x13b))/0xa);if(_0x504cd1===_0x3ff870)break;else _0x2d3a73['push'](_0x2d3a73['shift']());}catch(_0x501a59){_0x2d3a73['push'](_0x2d3a73['shift']());}}}(a83_0x58f1,0xf15b0));import{deleteDbLink,getDbLinkInfo,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';const CONFIRM_FLAG={'name':a83_0x36e6be(0x13d),'type':a83_0x36e6be(0x12d),'description':a83_0x36e6be(0x149)},EXPECTED_DATASET_COUNT_FLAG={'name':a83_0x36e6be(0x144),'type':'number','description':a83_0x36e6be(0x143)};function a83_0x58f1(){const _0x1fe7c4=['72443BtdAep','Database\x20connection\x20','all','num','validation','boolean','\x20active\x20Dataset(s),\x20but\x20found\x20','--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.','8884XRdzuN','1245736RdsLBY','\x20still\x20has\x20','datasetDependency','isInteger','Expected\x20','918FterPQ','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','549tTLYYY','Deleted\x20db\x20link\x20','20259cFsAVr','9400AIUCmc','bool','confirm','datasets','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.','flag','Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.','delete','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value','expected-dataset-count','7055728BFjPZV','DB_TABLE','\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.','Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.','Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count','1033096oodnWM','appCode','activeDatasetCount','8874000WZQaAv','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.','Deletion\x20is\x20blocked\x20by\x20'];a83_0x58f1=function(){return _0x1fe7c4;};return a83_0x58f1();}function a83_0x3efb(_0x1cf9d9,_0x43bc31){_0x1cf9d9=_0x1cf9d9-0x122;const _0x58f15b=a83_0x58f1();let _0x3efbf0=_0x58f15b[_0x1cf9d9];return _0x3efbf0;}export const dbDelete={'service':'db','command':a83_0x36e6be(0x142),'description':a83_0x36e6be(0x137),'risk':'high-risk-write','flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1befae){const _0x27441e=a83_0x36e6be,_0xf269c0=await loadDeleteImpact(_0x1befae);return assertExpectedDatasetCount(_0x1befae,_0xf269c0[_0x27441e(0x133)][_0x27441e(0x124)]),{'method':'POST','url':'/smartapi/dblink/delete','body':{'id':_0xf269c0['id']},'description':_0xf269c0[_0x27441e(0x133)][_0x27441e(0x124)]>0x0?_0x27441e(0x127)+_0xf269c0[_0x27441e(0x133)][_0x27441e(0x124)]+'\x20active\x20DB_TABLE\x20Dataset(s).':_0x27441e(0x148),..._0xf269c0};},async 'execute'(_0x31c194){const _0x429219=a83_0x36e6be;if(!_0x31c194[_0x429219(0x13c)](_0x429219(0x13d)))throw CliErrors[_0x429219(0x12c)]('--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.',_0x429219(0x13f));const _0x3b1f5a=_0x31c194[_0x429219(0x12b)]('id'),_0x5a6395=await loadDeleteImpact(_0x31c194),_0x100cf4=_0x5a6395[_0x429219(0x133)]['activeDatasetCount'];assertExpectedDatasetCount(_0x31c194,_0x100cf4);if(_0x100cf4>0x0)throw CliErrors['validation'](_0x429219(0x129)+_0x3b1f5a+_0x429219(0x132)+_0x100cf4+_0x429219(0x147),_0x429219(0x141));return await deleteDbLink(_0x3b1f5a),{'ok':!![],'data':{'id':_0x3b1f5a,'deleted':!![],'activeDatasetCount':_0x100cf4},'message':_0x429219(0x139)+_0x3b1f5a};}};async function loadDeleteImpact(_0x4dbe54){const _0x3eb494=a83_0x36e6be,_0x361825=_0x4dbe54[_0x3eb494(0x12b)]('id'),[_0x32ffef,_0x1b845a]=await Promise[_0x3eb494(0x12a)]([getDbLinkInfo(_0x361825),listDatasets(_0x4dbe54[_0x3eb494(0x123)],{'source':_0x3eb494(0x146)})]),_0x21a8ee=buildDbDatasetDependency(_0x32ffef,_0x1b845a);return{'id':_0x361825,'connection':sanitizeDbLinkForOutput(_0x32ffef),'datasetDependency':_0x21a8ee[_0x3eb494(0x133)],'activeDatasetCount':_0x21a8ee[_0x3eb494(0x133)][_0x3eb494(0x124)],'datasets':_0x21a8ee[_0x3eb494(0x13e)]};}function assertExpectedDatasetCount(_0x3bd71f,_0x52d5f5){const _0x5f2d7e=a83_0x36e6be,_0x60c582=_0x3bd71f[_0x5f2d7e(0x140)](_0x5f2d7e(0x144));if(_0x60c582===undefined||_0x60c582==='')return;const _0x5bef16=_0x3bd71f[_0x5f2d7e(0x12b)](_0x5f2d7e(0x144));if(!Number[_0x5f2d7e(0x134)](_0x5bef16)||_0x5bef16<0x0)throw CliErrors[_0x5f2d7e(0x12c)](_0x5f2d7e(0x12f));if(_0x5bef16!==_0x52d5f5)throw CliErrors[_0x5f2d7e(0x12c)](_0x5f2d7e(0x135)+_0x5bef16+_0x5f2d7e(0x12e)+_0x52d5f5+'.',_0x5f2d7e(0x126));}
1
+ const a85_0x16c08b=a85_0x1f60;(function(_0x46ad3b,_0x316a96){const _0x2d237c=a85_0x1f60,_0x223404=_0x46ad3b();while(!![]){try{const _0x1bc8ff=parseInt(_0x2d237c(0x1e6))/0x1+parseInt(_0x2d237c(0x1e9))/0x2+-parseInt(_0x2d237c(0x200))/0x3+parseInt(_0x2d237c(0x1f5))/0x4*(parseInt(_0x2d237c(0x1f8))/0x5)+-parseInt(_0x2d237c(0x1f6))/0x6+parseInt(_0x2d237c(0x201))/0x7*(-parseInt(_0x2d237c(0x1ef))/0x8)+-parseInt(_0x2d237c(0x1fe))/0x9;if(_0x1bc8ff===_0x316a96)break;else _0x223404['push'](_0x223404['shift']());}catch(_0x5792ad){_0x223404['push'](_0x223404['shift']());}}}(a85_0x4a43,0x53e6a));import{deleteDbLink,getDbLinkInfo,listDatasets}from'../../core/api-client.js';function a85_0x1f60(_0x15998c,_0x45fbe7){_0x15998c=_0x15998c-0x1e2;const _0x4a4331=a85_0x4a43();let _0x1f600=_0x4a4331[_0x15998c];return _0x1f600;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';const CONFIRM_FLAG={'name':a85_0x16c08b(0x202),'type':a85_0x16c08b(0x1f3),'description':a85_0x16c08b(0x1fb)},EXPECTED_DATASET_COUNT_FLAG={'name':'expected-dataset-count','type':'number','description':a85_0x16c08b(0x1f9)};function a85_0x4a43(){const _0x24c2cf=['594314IwutOX','isInteger','Deletion\x20is\x20blocked\x20by\x20','439338xedIfs','--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20still\x20has\x20','datasetDependency','Database\x20connection\x20','num','687640NDpVBb','validation','activeDatasetCount','high-risk-write','boolean','expected-dataset-count','8NsvQbC','1079772OSSDXE','all','1212055cUdGxE','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value','appCode','Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count','\x20active\x20DB_TABLE\x20Dataset(s).','/smartapi/dblink/delete','343917JEVpll','\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.','921591xyzjis','35uXntbS','confirm','DB_TABLE','delete','datasets','Deleted\x20db\x20link\x20','flag','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.'];a85_0x4a43=function(){return _0x24c2cf;};return a85_0x4a43();}export const dbDelete={'service':'db','command':a85_0x16c08b(0x204),'description':'Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','risk':a85_0x16c08b(0x1f2),'flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x28ae74){const _0x13fad3=a85_0x16c08b,_0x210ac0=await loadDeleteImpact(_0x28ae74);return assertExpectedDatasetCount(_0x28ae74,_0x210ac0[_0x13fad3(0x1ec)][_0x13fad3(0x1f1)]),{'method':'POST','url':_0x13fad3(0x1fd),'body':{'id':_0x210ac0['id']},'description':_0x210ac0[_0x13fad3(0x1ec)][_0x13fad3(0x1f1)]>0x0?_0x13fad3(0x1e8)+_0x210ac0[_0x13fad3(0x1ec)][_0x13fad3(0x1f1)]+_0x13fad3(0x1fc):'Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.',..._0x210ac0};},async 'execute'(_0x250e23){const _0x28dd10=a85_0x16c08b;if(!_0x250e23['bool'](_0x28dd10(0x202)))throw CliErrors[_0x28dd10(0x1f0)]('--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.',_0x28dd10(0x1e5));const _0x2ccb7f=_0x250e23[_0x28dd10(0x1ee)]('id'),_0x2f3cdf=await loadDeleteImpact(_0x250e23),_0x583036=_0x2f3cdf[_0x28dd10(0x1ec)][_0x28dd10(0x1f1)];assertExpectedDatasetCount(_0x250e23,_0x583036);if(_0x583036>0x0)throw CliErrors['validation'](_0x28dd10(0x1ed)+_0x2ccb7f+_0x28dd10(0x1eb)+_0x583036+_0x28dd10(0x1ff),'Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.');return await deleteDbLink(_0x2ccb7f),{'ok':!![],'data':{'id':_0x2ccb7f,'deleted':!![],'activeDatasetCount':_0x583036},'message':_0x28dd10(0x1e3)+_0x2ccb7f};}};async function loadDeleteImpact(_0x40ff5f){const _0x4a8352=a85_0x16c08b,_0x29230b=_0x40ff5f[_0x4a8352(0x1ee)]('id'),[_0x543463,_0x26fb92]=await Promise[_0x4a8352(0x1f7)]([getDbLinkInfo(_0x29230b),listDatasets(_0x40ff5f[_0x4a8352(0x1fa)],{'source':_0x4a8352(0x203)})]),_0x370084=buildDbDatasetDependency(_0x543463,_0x26fb92);return{'id':_0x29230b,'connection':sanitizeDbLinkForOutput(_0x543463),'datasetDependency':_0x370084[_0x4a8352(0x1ec)],'activeDatasetCount':_0x370084[_0x4a8352(0x1ec)][_0x4a8352(0x1f1)],'datasets':_0x370084[_0x4a8352(0x1e2)]};}function assertExpectedDatasetCount(_0x53e84a,_0x5aad91){const _0x14b1f1=a85_0x16c08b,_0x50f3ca=_0x53e84a[_0x14b1f1(0x1e4)](_0x14b1f1(0x1f4));if(_0x50f3ca===undefined||_0x50f3ca==='')return;const _0x53075f=_0x53e84a['num'](_0x14b1f1(0x1f4));if(!Number[_0x14b1f1(0x1e7)](_0x53075f)||_0x53075f<0x0)throw CliErrors[_0x14b1f1(0x1f0)](_0x14b1f1(0x1ea));if(_0x53075f!==_0x5aad91)throw CliErrors['validation']('Expected\x20'+_0x53075f+'\x20active\x20Dataset(s),\x20but\x20found\x20'+_0x5aad91+'.','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.');}
@@ -1 +1 @@
1
- const a84_0x3ecb4a=a84_0x38bf;(function(_0x23d80d,_0x1fae19){const _0x4b3f20=a84_0x38bf,_0x5ba556=_0x23d80d();while(!![]){try{const _0x5d3353=parseInt(_0x4b3f20(0x1e0))/0x1+parseInt(_0x4b3f20(0x1dc))/0x2+-parseInt(_0x4b3f20(0x1eb))/0x3*(parseInt(_0x4b3f20(0x1e8))/0x4)+parseInt(_0x4b3f20(0x1ea))/0x5+-parseInt(_0x4b3f20(0x1e6))/0x6+parseInt(_0x4b3f20(0x1dd))/0x7+parseInt(_0x4b3f20(0x1e2))/0x8;if(_0x5d3353===_0x1fae19)break;else _0x5ba556['push'](_0x5ba556['shift']());}catch(_0x4f0eac){_0x5ba556['push'](_0x5ba556['shift']());}}}(a84_0xdab0,0x30787));function a84_0x38bf(_0x38a2af,_0xdffe4b){_0x38a2af=_0x38a2af-0x1dc;const _0xdab0ad=a84_0xdab0();let _0x38bf3c=_0xdab0ad[_0x38a2af];return _0x38bf3c;}function a84_0xdab0(){const _0x2e0fb7=['read','55199PIeXcf','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','2102360UXASSW','DB_TABLE','detail','dbName','2171112zxOEig','appCode','28ZMmlpI','num','137760nWdCrZ','63453ZzzqeW','127954agjUxk','2092447GWEtXf','db\x20link\x20'];a84_0xdab0=function(){return _0x2e0fb7;};return a84_0xdab0();}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':a84_0x3ecb4a(0x1e4),'description':a84_0x3ecb4a(0x1e1),'risk':a84_0x3ecb4a(0x1df),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2f53c1){const _0x5b1385=a84_0x3ecb4a,_0x2c7253=_0x2f53c1[_0x5b1385(0x1e9)]('id'),_0x2ea82c=await getDbLinkInfo(_0x2c7253),_0x5c5d18=await listDatasets(_0x2ea82c[_0x5b1385(0x1e7)]||_0x2f53c1[_0x5b1385(0x1e7)],{'source':_0x5b1385(0x1e3)}),_0x561366=buildDbDatasetDependency(_0x2ea82c,_0x5c5d18);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0x2ea82c),'datasetDependency':_0x561366['datasetDependency']},'message':_0x5b1385(0x1de)+_0x2c7253+':\x20'+_0x2ea82c[_0x5b1385(0x1e5)]};}};
1
+ const a86_0xb408d1=a86_0x2387;(function(_0x5b3bec,_0x5bb864){const _0x1299ac=a86_0x2387,_0x37bb29=_0x5b3bec();while(!![]){try{const _0x175a5e=parseInt(_0x1299ac(0x8b))/0x1+parseInt(_0x1299ac(0x97))/0x2*(parseInt(_0x1299ac(0x8f))/0x3)+-parseInt(_0x1299ac(0x8a))/0x4*(-parseInt(_0x1299ac(0x8d))/0x5)+-parseInt(_0x1299ac(0x95))/0x6+-parseInt(_0x1299ac(0x8e))/0x7*(parseInt(_0x1299ac(0x8c))/0x8)+-parseInt(_0x1299ac(0x9a))/0x9*(parseInt(_0x1299ac(0x90))/0xa)+parseInt(_0x1299ac(0x92))/0xb;if(_0x175a5e===_0x5bb864)break;else _0x37bb29['push'](_0x37bb29['shift']());}catch(_0x2468cd){_0x37bb29['push'](_0x37bb29['shift']());}}}(a86_0xcbbb,0x86173));function a86_0x2387(_0x43c461,_0x36476c){_0x43c461=_0x43c461-0x8a;const _0xcbbb01=a86_0xcbbb();let _0x2387c3=_0xcbbb01[_0x43c461];return _0x2387c3;}import{getDbLinkInfo,listDatasets}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a86_0xcbbb(){const _0x143b3c=['appCode','15776BGqlsw','351020dSVqyV','16AzHONA','815SrRdcy','3006136eepVlG','21nprhjv','7225390OqlcUp','datasetDependency','13031689XKUasE','read','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','633480HyDdCK','detail','16474MIUjFC','num','db\x20link\x20','9dsXNQL','dbName'];a86_0xcbbb=function(){return _0x143b3c;};return a86_0xcbbb();}export const dbDetail={'service':'db','command':a86_0xb408d1(0x96),'description':a86_0xb408d1(0x94),'risk':a86_0xb408d1(0x93),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x519e55){const _0x41a1f1=a86_0xb408d1,_0x34d203=_0x519e55[_0x41a1f1(0x98)]('id'),_0x12c655=await getDbLinkInfo(_0x34d203),_0x4ecacb=await listDatasets(_0x12c655[_0x41a1f1(0x9c)]||_0x519e55[_0x41a1f1(0x9c)],{'source':'DB_TABLE'}),_0x2cbbee=buildDbDatasetDependency(_0x12c655,_0x4ecacb);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0x12c655),'datasetDependency':_0x2cbbee[_0x41a1f1(0x91)]},'message':_0x41a1f1(0x99)+_0x34d203+':\x20'+_0x12c655[_0x41a1f1(0x9b)]};}};
@@ -1 +1 @@
1
- const a85_0x31e0b4=a85_0xfedb;(function(_0x2d1122,_0x487428){const _0x38eef4=a85_0xfedb,_0x4b1270=_0x2d1122();while(!![]){try{const _0xe01349=-parseInt(_0x38eef4(0xf0))/0x1*(-parseInt(_0x38eef4(0xe4))/0x2)+parseInt(_0x38eef4(0xde))/0x3+-parseInt(_0x38eef4(0xe2))/0x4*(parseInt(_0x38eef4(0xee))/0x5)+-parseInt(_0x38eef4(0xdc))/0x6+-parseInt(_0x38eef4(0xe9))/0x7+-parseInt(_0x38eef4(0xdd))/0x8*(parseInt(_0x38eef4(0xe7))/0x9)+parseInt(_0x38eef4(0xec))/0xa;if(_0xe01349===_0x487428)break;else _0x4b1270['push'](_0x4b1270['shift']());}catch(_0x5db91c){_0x4b1270['push'](_0x4b1270['shift']());}}}(a85_0x4ed1,0xdab8c));function a85_0xfedb(_0xbbb502,_0x47c935){_0xbbb502=_0xbbb502-0xdc;const _0x4ed1b4=a85_0x4ed1();let _0xfedb29=_0x4ed1b4[_0xbbb502];return _0xfedb29;}import{startDbTableDiffRefresh}from'../../core/api-client.js';function a85_0x4ed1(){const _0xce5f31=['num','\x20db\x20diff-refresh-status\x20--id\x20','36223260qSqDFs','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','28795eOonAi','Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','615pxhees','\x20--plan\x20','8956944fWQCxe','6168160KTEOnZ','601737HSWTIm','write','diff-refresh-start','traceId','244yQTnCS','status','4022SwLTnA','\x20--format\x20compress','appCode','18DoyEwF','trim','5443361stCzfy'];a85_0x4ed1=function(){return _0xce5f31;};return a85_0x4ed1();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbDiffRefreshStart={'service':'db','command':a85_0x31e0b4(0xe0),'description':a85_0x31e0b4(0xef),'risk':a85_0x31e0b4(0xdf),'flags':[DBLINK_ID_FLAG],async 'execute'(_0x4f0cc1){const _0x50b3e3=a85_0x31e0b4,_0x1a9bf=_0x4f0cc1[_0x50b3e3(0xea)]('id'),_0x2b4fbb=await startDbTableDiffRefresh(_0x4f0cc1[_0x50b3e3(0xe6)],_0x1a9bf),_0x97eb07=_0x2b4fbb[_0x50b3e3(0xe1)]?.[_0x50b3e3(0xe8)]();if(!_0x97eb07)throw CliErrors['validation'](_0x50b3e3(0xed));return{'ok':!![],'data':{'dbLinkId':_0x1a9bf,'traceId':_0x97eb07,'status':_0x2b4fbb[_0x50b3e3(0xe3)]??null,'query':{'command':CLI_BIN_NAME+_0x50b3e3(0xeb)+_0x1a9bf+_0x50b3e3(0xf1)+_0x97eb07+_0x50b3e3(0xe5)}},'message':'Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20'+_0x1a9bf};}};
1
+ const a87_0xd94f0=a87_0x18e0;(function(_0x172263,_0x18f678){const _0x4f7e2f=a87_0x18e0,_0x878a88=_0x172263();while(!![]){try{const _0x2df211=-parseInt(_0x4f7e2f(0x1f2))/0x1*(parseInt(_0x4f7e2f(0x200))/0x2)+parseInt(_0x4f7e2f(0x1f0))/0x3+parseInt(_0x4f7e2f(0x1f7))/0x4*(-parseInt(_0x4f7e2f(0x1fa))/0x5)+parseInt(_0x4f7e2f(0x1f9))/0x6+parseInt(_0x4f7e2f(0x1f4))/0x7+-parseInt(_0x4f7e2f(0x1f6))/0x8*(parseInt(_0x4f7e2f(0x1fe))/0x9)+-parseInt(_0x4f7e2f(0x1fd))/0xa;if(_0x2df211===_0x18f678)break;else _0x878a88['push'](_0x878a88['shift']());}catch(_0x5c37f5){_0x878a88['push'](_0x878a88['shift']());}}}(a87_0x1fd2,0xc113e));import{startDbTableDiffRefresh}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a87_0x18e0(_0x214519,_0x79991d){_0x214519=_0x214519-0x1f0;const _0x1fd28d=a87_0x1fd2();let _0x18e084=_0x1fd28d[_0x214519];return _0x18e084;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbDiffRefreshStart={'service':'db','command':a87_0xd94f0(0x201),'description':a87_0xd94f0(0x1fc),'risk':a87_0xd94f0(0x1ff),'flags':[DBLINK_ID_FLAG],async 'execute'(_0x1c222f){const _0x324abe=a87_0xd94f0,_0xfbcb02=_0x1c222f[_0x324abe(0x1fb)]('id'),_0x175910=await startDbTableDiffRefresh(_0x1c222f['appCode'],_0xfbcb02),_0x10d582=_0x175910['traceId']?.[_0x324abe(0x1f5)]();if(!_0x10d582)throw CliErrors[_0x324abe(0x202)](_0x324abe(0x1f1));return{'ok':!![],'data':{'dbLinkId':_0xfbcb02,'traceId':_0x10d582,'status':_0x175910['status']??null,'query':{'command':CLI_BIN_NAME+'\x20db\x20diff-refresh-status\x20--id\x20'+_0xfbcb02+_0x324abe(0x1f8)+_0x10d582+_0x324abe(0x1f3)}},'message':'Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20'+_0xfbcb02};}};function a87_0x1fd2(){const _0x2dba56=['\x20--plan\x20','3068784NMWWFp','189990rLqrfU','num','Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','2245000IlEfle','270AgElEx','write','9014MBXLcl','diff-refresh-start','validation','3305568RUkcDq','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','29gnYzXI','\x20--format\x20compress','5372157PUDEfR','trim','238064bkJqKB','36KpTixl'];a87_0x1fd2=function(){return _0x2dba56;};return a87_0x1fd2();}
@@ -1 +1 @@
1
- const a86_0x2dd2f0=a86_0x457e;(function(_0x4890de,_0xb0224f){const _0x4ce6a1=a86_0x457e,_0x5c3f6b=_0x4890de();while(!![]){try{const _0x43a466=-parseInt(_0x4ce6a1(0x1e2))/0x1*(-parseInt(_0x4ce6a1(0x1e5))/0x2)+parseInt(_0x4ce6a1(0x1e1))/0x3*(parseInt(_0x4ce6a1(0x1ea))/0x4)+parseInt(_0x4ce6a1(0x1ee))/0x5*(parseInt(_0x4ce6a1(0x1e9))/0x6)+-parseInt(_0x4ce6a1(0x1e0))/0x7+parseInt(_0x4ce6a1(0x1f2))/0x8+parseInt(_0x4ce6a1(0x1ed))/0x9+-parseInt(_0x4ce6a1(0x1ec))/0xa;if(_0x43a466===_0xb0224f)break;else _0x5c3f6b['push'](_0x5c3f6b['shift']());}catch(_0x5864fa){_0x5c3f6b['push'](_0x5c3f6b['shift']());}}}(a86_0x1b92,0x2c13a));function a86_0x457e(_0x43dda7,_0x48b4ea){_0x43dda7=_0x43dda7-0x1da;const _0x1b9265=a86_0x1b92();let _0x457eac=_0x1b9265[_0x43dda7];return _0x457eac;}import{getDbAnalysisStatus}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const TERMINAL_STATUSES=new Set([a86_0x2dd2f0(0x1f3),a86_0x2dd2f0(0x1e8),a86_0x2dd2f0(0x1eb)]),RUNNING_STATUSES=new Set([a86_0x2dd2f0(0x1ef),a86_0x2dd2f0(0x1df),a86_0x2dd2f0(0x1f1)]);function a86_0x1b92(){const _0x26a39e=['diff-refresh-status','str','UNKNOWN','\x20db\x20diff-refresh-status\x20--id\x20','RUNNING','941675NwPQmD','22602CrahmB','11WVhbZl','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','Table-diff\x20refresh\x20status\x20for\x20','13102qOboVi','Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start','plan','FAILED','1404XYsnhU','4Ozjfjd','CANCELLED','3304530nmTDRH','132777vACuFM','4245ZCICSE','PENDING','status','RETRYING','2820016exVLUE','SUCCESS','has','num'];a86_0x1b92=function(){return _0x26a39e;};return a86_0x1b92();}export const dbDiffRefreshStatus={'service':'db','command':a86_0x2dd2f0(0x1db),'description':a86_0x2dd2f0(0x1e3),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x2dd2f0(0x1e7),'type':'string','required':!![],'description':a86_0x2dd2f0(0x1e6)}],async 'execute'(_0x118731){const _0x3bfe15=a86_0x2dd2f0,_0x8e6009=_0x118731[_0x3bfe15(0x1da)]('id'),_0xd51b48=_0x118731[_0x3bfe15(0x1dc)](_0x3bfe15(0x1e7)),_0x1f0fd9=await getDbAnalysisStatus(_0xd51b48),_0x6959bc=_0x1f0fd9[_0x3bfe15(0x1f0)]??null,_0x386410=TERMINAL_STATUSES[_0x3bfe15(0x1f4)](_0x6959bc??''),_0x525776=_0x6959bc==='SUCCESS',_0x4354b8=_0x386410||RUNNING_STATUSES['has'](_0x6959bc??'');return{'ok':!![],'data':{'dbLinkId':_0x8e6009,'planId':_0xd51b48,'status':_0x1f0fd9,'knownStatus':_0x4354b8,'isTerminal':_0x386410,'isSuccessful':_0x525776,'query':_0x4354b8&&!_0x386410?{'command':CLI_BIN_NAME+_0x3bfe15(0x1de)+_0x8e6009+'\x20--plan\x20'+_0xd51b48+'\x20--format\x20compress'}:null},'message':_0x3bfe15(0x1e4)+_0xd51b48+':\x20'+(_0x6959bc??_0x3bfe15(0x1dd))};}};
1
+ const a88_0x2cb39b=a88_0x34e4;(function(_0x76edc7,_0x49a3a4){const _0x4a44d6=a88_0x34e4,_0x1083fe=_0x76edc7();while(!![]){try{const _0x2a1354=parseInt(_0x4a44d6(0x10e))/0x1+parseInt(_0x4a44d6(0x10d))/0x2+parseInt(_0x4a44d6(0xfb))/0x3+-parseInt(_0x4a44d6(0x114))/0x4*(parseInt(_0x4a44d6(0x105))/0x5)+parseInt(_0x4a44d6(0x102))/0x6*(-parseInt(_0x4a44d6(0x101))/0x7)+parseInt(_0x4a44d6(0x10f))/0x8+parseInt(_0x4a44d6(0x107))/0x9*(parseInt(_0x4a44d6(0xfe))/0xa);if(_0x2a1354===_0x49a3a4)break;else _0x1083fe['push'](_0x1083fe['shift']());}catch(_0xac2196){_0x1083fe['push'](_0x1083fe['shift']());}}}(a88_0x6314,0x1a49f));function a88_0x6314(){const _0x12b56a=['Table-diff\x20refresh\x20status\x20for\x20','\x20--plan\x20','64683AolAYs','diff-refresh-status','PENDING','20KXTNrK','read','Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start','296751XWdcaX','12bOdJiC','string','\x20--format\x20compress','331860yxESRg','SUCCESS','12195efNVoE','FAILED','RUNNING','status','\x20db\x20diff-refresh-status\x20--id\x20','plan','279616upEQVn','118802shmzXo','869600kleOKX','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','has','UNKNOWN','str','12KnbYVs'];a88_0x6314=function(){return _0x12b56a;};return a88_0x6314();}import{getDbAnalysisStatus}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a88_0x2cb39b(0x108),'CANCELLED']),RUNNING_STATUSES=new Set([a88_0x2cb39b(0xfd),a88_0x2cb39b(0x109),'RETRYING']);function a88_0x34e4(_0x5e3d3c,_0x555a38){_0x5e3d3c=_0x5e3d3c-0xfb;const _0x631441=a88_0x6314();let _0x34e434=_0x631441[_0x5e3d3c];return _0x34e434;}export const dbDiffRefreshStatus={'service':'db','command':a88_0x2cb39b(0xfc),'description':a88_0x2cb39b(0x110),'risk':a88_0x2cb39b(0xff),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'plan','type':a88_0x2cb39b(0x103),'required':!![],'description':a88_0x2cb39b(0x100)}],async 'execute'(_0x24c96a){const _0x5e8d38=a88_0x2cb39b,_0x1c1f6e=_0x24c96a['num']('id'),_0x129214=_0x24c96a[_0x5e8d38(0x113)](_0x5e8d38(0x10c)),_0x3069d8=await getDbAnalysisStatus(_0x129214),_0x28bacb=_0x3069d8[_0x5e8d38(0x10a)]??null,_0x51033f=TERMINAL_STATUSES[_0x5e8d38(0x111)](_0x28bacb??''),_0x8df9ab=_0x28bacb===_0x5e8d38(0x106),_0xd6de61=_0x51033f||RUNNING_STATUSES[_0x5e8d38(0x111)](_0x28bacb??'');return{'ok':!![],'data':{'dbLinkId':_0x1c1f6e,'planId':_0x129214,'status':_0x3069d8,'knownStatus':_0xd6de61,'isTerminal':_0x51033f,'isSuccessful':_0x8df9ab,'query':_0xd6de61&&!_0x51033f?{'command':CLI_BIN_NAME+_0x5e8d38(0x10b)+_0x1c1f6e+_0x5e8d38(0x116)+_0x129214+_0x5e8d38(0x104)}:null},'message':_0x5e8d38(0x115)+_0x129214+':\x20'+(_0x28bacb??_0x5e8d38(0x112))};}};
@@ -1 +1 @@
1
- const a87_0x375c51=a87_0x4361;(function(_0x261f09,_0x2b9c97){const _0x2177de=a87_0x4361,_0x2a8d4f=_0x261f09();while(!![]){try{const _0x5b0093=-parseInt(_0x2177de(0x181))/0x1+-parseInt(_0x2177de(0x17b))/0x2*(parseInt(_0x2177de(0x162))/0x3)+parseInt(_0x2177de(0x16e))/0x4+-parseInt(_0x2177de(0x159))/0x5*(-parseInt(_0x2177de(0x17c))/0x6)+parseInt(_0x2177de(0x160))/0x7+parseInt(_0x2177de(0x16a))/0x8+parseInt(_0x2177de(0x15e))/0x9*(-parseInt(_0x2177de(0x164))/0xa);if(_0x5b0093===_0x2b9c97)break;else _0x2a8d4f['push'](_0x2a8d4f['shift']());}catch(_0x17f2c1){_0x2a8d4f['push'](_0x2a8d4f['shift']());}}}(a87_0x2567,0x5e3c3));function a87_0x4361(_0x48a230,_0x4bdb26){_0x48a230=_0x48a230-0x159;const _0x25679d=a87_0x2567();let _0x436178=_0x25679d[_0x48a230];return _0x436178;}import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a87_0x2567(){const _0x49c54e=['bool','addedColumns','appCode','\x20(db\x20link\x20','454615EXQLvl','5ZYxpmM','length','page','MODIFIED_TABLE','map','603uovVoT','deletedColumns','4698806eBMIee','number','507531TxKbMh','table','157390rhCrLp','pagesize','totalCount','string','num','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','5851504vCklsw','NEW_TABLE','physicalTableCount','modifiedColumns','1906088BZoFZT','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','diffType','tableName','DELETED_TABLE','datasetTableCount','Page\x20size','all','diff','tableList','summary','filter','fieldDiff','4xFlYMX','2125506fbUnke'];a87_0x2567=function(){return _0x49c54e;};return a87_0x2567();}import{DB_TABLE_PAGE_SIZE,getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbDiff={'service':'db','command':a87_0x375c51(0x176),'description':a87_0x375c51(0x16f),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a87_0x375c51(0x163),'type':a87_0x375c51(0x167),'description':a87_0x375c51(0x169)},{'name':a87_0x375c51(0x15b),'type':'number','description':'Page\x20index\x20(1-based)','default':0x1},{'name':'pagesize','type':'number','description':a87_0x375c51(0x174),'default':0x14},{'name':a87_0x375c51(0x175),'type':'boolean','description':'Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)'}],async 'execute'(_0x21e472){const _0x381d0e=a87_0x375c51,_0x53cf34=_0x21e472[_0x381d0e(0x168)]('id'),_0x129939=_0x21e472[_0x381d0e(0x17d)](_0x381d0e(0x175)),_0x410171=_0x129939?0x1:_0x21e472[_0x381d0e(0x168)]('page',0x1)||0x1,_0x3a2c0a=_0x129939?DB_TABLE_PAGE_SIZE:_0x21e472[_0x381d0e(0x168)](_0x381d0e(0x165),0x14)||0x14,_0x51412f=_0x21e472['str'](_0x381d0e(0x163))||undefined,_0x2ae1ca=_0x129939?await getAllDbTableDiff(getDbTableDiff,_0x21e472['appCode'],_0x53cf34,_0x51412f):await getDbTableDiff(_0x21e472[_0x381d0e(0x17f)],_0x53cf34,{'pageIndex':_0x410171,'pageSize':_0x3a2c0a,'tableName':_0x51412f}),_0x3f5ed1=_0x2ae1ca[_0x381d0e(0x177)],_0x3e944a=summarizeDbTableDiff(_0x3f5ed1),_0x278a25=_0x3f5ed1[_0x381d0e(0x179)](_0x11ece4=>_0x11ece4['diffType']===_0x381d0e(0x16b)||_0x11ece4[_0x381d0e(0x170)]===_0x381d0e(0x15c))[_0x381d0e(0x15d)](_0x272509=>_0x272509[_0x381d0e(0x171)]),_0x3b6176=_0x3f5ed1[_0x381d0e(0x179)](_0xfedad3=>_0xfedad3[_0x381d0e(0x170)]===_0x381d0e(0x172))['map'](_0x21ccb9=>_0x21ccb9['tableName']),_0x2bb5a5=_0x3f5ed1[_0x381d0e(0x179)](_0x5e315f=>_0x5e315f[_0x381d0e(0x170)]===_0x381d0e(0x15c))[_0x381d0e(0x15d)](_0x58e685=>({'tableName':_0x58e685[_0x381d0e(0x171)],'addedColumns':_0x58e685[_0x381d0e(0x17a)]?.[_0x381d0e(0x17e)]??[],'deletedColumns':_0x58e685['fieldDiff']?.[_0x381d0e(0x15f)]??[],'modifiedColumns':_0x58e685[_0x381d0e(0x17a)]?.[_0x381d0e(0x16d)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x53cf34,'page':_0x410171,'pageSize':_0x3a2c0a,'totalCount':_0x2ae1ca[_0x381d0e(0x166)],...typeof _0x2ae1ca[_0x381d0e(0x16c)]===_0x381d0e(0x161)?{'physicalTableCount':_0x2ae1ca['physicalTableCount']}:{},...typeof _0x2ae1ca['datasetTableCount']===_0x381d0e(0x161)?{'datasetTableCount':_0x2ae1ca[_0x381d0e(0x173)]}:{},..._0x2ae1ca[_0x381d0e(0x178)]?{'summary':_0x2ae1ca['summary']}:{},'summaryByType':_0x3e944a,'toAnalyzeTables':_0x278a25,'deletedTables':_0x3b6176,'modifiedFieldDiffs':_0x2bb5a5,'tables':_0x3f5ed1},'message':_0x3f5ed1[_0x381d0e(0x15a)]+'\x20changed\x20table\x20row(s),\x20total\x20'+_0x2ae1ca[_0x381d0e(0x166)]+_0x381d0e(0x180)+_0x53cf34+')'};}};
1
+ const a89_0x1471a6=a89_0x4a74;function a89_0x2c1b(){const _0x56cd6f=['pagesize','num','tableName','3786376fqAGrL','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','115208vcHpBv','5849330Bvavbl','diffType','totalCount','string','NEW_TABLE','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','deletedColumns','appCode','datasetTableCount','MODIFIED_TABLE','4PpmHit','physicalTableCount','read','addedColumns','407419gavEHB','fieldDiff','boolean','tableList','252TbDjfR','filter','3334646MBzdlW','table','DELETED_TABLE','6yrSZdg','Page\x20size','\x20(db\x20link\x20','modifiedColumns','4157145ZDHOYJ','1953980mmdWWo','\x20changed\x20table\x20row(s),\x20total\x20','Page\x20index\x20(1-based)','summary','map','number','page'];a89_0x2c1b=function(){return _0x56cd6f;};return a89_0x2c1b();}function a89_0x4a74(_0x22b914,_0x20973f){_0x22b914=_0x22b914-0x7b;const _0x2c1b96=a89_0x2c1b();let _0x4a7459=_0x2c1b96[_0x22b914];return _0x4a7459;}(function(_0x4c2517,_0x33a932){const _0x3515ed=a89_0x4a74,_0x3fdbe9=_0x4c2517();while(!![]){try{const _0x61e6e=parseInt(_0x3515ed(0x8e))/0x1+-parseInt(_0x3515ed(0x7d))/0x2+parseInt(_0x3515ed(0x9b))/0x3*(parseInt(_0x3515ed(0x8a))/0x4)+-parseInt(_0x3515ed(0x80))/0x5*(-parseInt(_0x3515ed(0x97))/0x6)+parseInt(_0x3515ed(0x94))/0x7+parseInt(_0x3515ed(0x7f))/0x8*(-parseInt(_0x3515ed(0x92))/0x9)+-parseInt(_0x3515ed(0x9c))/0xa;if(_0x61e6e===_0x33a932)break;else _0x3fdbe9['push'](_0x3fdbe9['shift']());}catch(_0x418943){_0x3fdbe9['push'](_0x3fdbe9['shift']());}}}(a89_0x2c1b,0xe756c));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{DB_TABLE_PAGE_SIZE,getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbDiff={'service':'db','command':'diff','description':'Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','risk':a89_0x1471a6(0x8c),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':a89_0x1471a6(0x83),'description':a89_0x1471a6(0x7e)},{'name':a89_0x1471a6(0xa2),'type':a89_0x1471a6(0xa1),'description':a89_0x1471a6(0x9e),'default':0x1},{'name':a89_0x1471a6(0xa3),'type':a89_0x1471a6(0xa1),'description':a89_0x1471a6(0x98),'default':0x14},{'name':'all','type':a89_0x1471a6(0x90),'description':a89_0x1471a6(0x85)}],async 'execute'(_0x509663){const _0x46f946=a89_0x1471a6,_0x1ff8ef=_0x509663[_0x46f946(0x7b)]('id'),_0x13c14c=_0x509663['bool']('all'),_0x11f821=_0x13c14c?0x1:_0x509663['num'](_0x46f946(0xa2),0x1)||0x1,_0x2713a5=_0x13c14c?DB_TABLE_PAGE_SIZE:_0x509663[_0x46f946(0x7b)](_0x46f946(0xa3),0x14)||0x14,_0xc3c056=_0x509663['str'](_0x46f946(0x95))||undefined,_0x52df2b=_0x13c14c?await getAllDbTableDiff(getDbTableDiff,_0x509663[_0x46f946(0x87)],_0x1ff8ef,_0xc3c056):await getDbTableDiff(_0x509663[_0x46f946(0x87)],_0x1ff8ef,{'pageIndex':_0x11f821,'pageSize':_0x2713a5,'tableName':_0xc3c056}),_0x2d6360=_0x52df2b[_0x46f946(0x91)],_0x28108f=summarizeDbTableDiff(_0x2d6360),_0x1b4bce=_0x2d6360[_0x46f946(0x93)](_0x4c7db6=>_0x4c7db6['diffType']===_0x46f946(0x84)||_0x4c7db6[_0x46f946(0x81)]===_0x46f946(0x89))[_0x46f946(0xa0)](_0xca1c5c=>_0xca1c5c[_0x46f946(0x7c)]),_0x253e38=_0x2d6360['filter'](_0x20587c=>_0x20587c[_0x46f946(0x81)]===_0x46f946(0x96))['map'](_0xa41abd=>_0xa41abd['tableName']),_0x5c162b=_0x2d6360[_0x46f946(0x93)](_0x4086fb=>_0x4086fb[_0x46f946(0x81)]===_0x46f946(0x89))[_0x46f946(0xa0)](_0x5071c8=>({'tableName':_0x5071c8[_0x46f946(0x7c)],'addedColumns':_0x5071c8[_0x46f946(0x8f)]?.[_0x46f946(0x8d)]??[],'deletedColumns':_0x5071c8[_0x46f946(0x8f)]?.[_0x46f946(0x86)]??[],'modifiedColumns':_0x5071c8['fieldDiff']?.[_0x46f946(0x9a)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x1ff8ef,'page':_0x11f821,'pageSize':_0x2713a5,'totalCount':_0x52df2b['totalCount'],...typeof _0x52df2b[_0x46f946(0x8b)]===_0x46f946(0xa1)?{'physicalTableCount':_0x52df2b[_0x46f946(0x8b)]}:{},...typeof _0x52df2b[_0x46f946(0x88)]===_0x46f946(0xa1)?{'datasetTableCount':_0x52df2b[_0x46f946(0x88)]}:{},..._0x52df2b[_0x46f946(0x9f)]?{'summary':_0x52df2b[_0x46f946(0x9f)]}:{},'summaryByType':_0x28108f,'toAnalyzeTables':_0x1b4bce,'deletedTables':_0x253e38,'modifiedFieldDiffs':_0x5c162b,'tables':_0x2d6360},'message':_0x2d6360['length']+_0x46f946(0x9d)+_0x52df2b[_0x46f946(0x82)]+_0x46f946(0x99)+_0x1ff8ef+')'};}};
@@ -1 +1 @@
1
- (function(_0x1a4461,_0x19542b){const _0x2f8751=a88_0x4505,_0x5bae37=_0x1a4461();while(!![]){try{const _0x42f8bb=-parseInt(_0x2f8751(0x145))/0x1*(parseInt(_0x2f8751(0x144))/0x2)+-parseInt(_0x2f8751(0x147))/0x3+parseInt(_0x2f8751(0x149))/0x4+parseInt(_0x2f8751(0x14b))/0x5*(-parseInt(_0x2f8751(0x148))/0x6)+-parseInt(_0x2f8751(0x14a))/0x7+parseInt(_0x2f8751(0x146))/0x8+parseInt(_0x2f8751(0x143))/0x9;if(_0x42f8bb===_0x19542b)break;else _0x5bae37['push'](_0x5bae37['shift']());}catch(_0x2304a9){_0x5bae37['push'](_0x5bae37['shift']());}}}(a88_0x33e7,0xd4c17));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_0x33e7(){const _0x548d82=['2562OvflKF','4648140cNnrcJ','2238509KBOqFS','7450flNAWX','2932938NkLloN','2312yMlUSN','845Bgxwgo','13238008hLaMRK','1015152DncYnn'];a88_0x33e7=function(){return _0x548d82;};return a88_0x33e7();}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';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';function a88_0x4505(_0x15660e,_0x4e0d56){_0x15660e=_0x15660e-0x143;const _0x33e7d5=a88_0x33e7();let _0x45054d=_0x33e7d5[_0x15660e];return _0x45054d;}export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
1
+ (function(_0x3e7ff6,_0x4b5e1d){const _0x5aa27d=a90_0x37b5,_0x18ff5f=_0x3e7ff6();while(!![]){try{const _0x4c384b=-parseInt(_0x5aa27d(0x1d7))/0x1+-parseInt(_0x5aa27d(0x1d9))/0x2+parseInt(_0x5aa27d(0x1d8))/0x3*(-parseInt(_0x5aa27d(0x1dd))/0x4)+parseInt(_0x5aa27d(0x1de))/0x5*(-parseInt(_0x5aa27d(0x1dc))/0x6)+parseInt(_0x5aa27d(0x1d6))/0x7+parseInt(_0x5aa27d(0x1db))/0x8+parseInt(_0x5aa27d(0x1da))/0x9;if(_0x4c384b===_0x4b5e1d)break;else _0x18ff5f['push'](_0x18ff5f['shift']());}catch(_0x54e806){_0x18ff5f['push'](_0x18ff5f['shift']());}}}(a90_0x1ce5,0xad31b));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';function a90_0x37b5(_0x1eb99c,_0x2a5bf9){_0x1eb99c=_0x1eb99c-0x1d6;const _0x1ce50e=a90_0x1ce5();let _0x37b5cb=_0x1ce50e[_0x1eb99c];return _0x37b5cb;}import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';function a90_0x1ce5(){const _0x591202=['3blxbbp','568064MwFMAs','17202051JzdqFa','3677552XiaPbr','6izoinJ','5309404nGYfnu','932365swqAYt','6789076UWDbkx','833642PhpcZl'];a90_0x1ce5=function(){return _0x591202;};return a90_0x1ce5();}import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
@@ -1 +1 @@
1
- const a89_0x180b90=a89_0x5e85;(function(_0x4d1f19,_0x12ad43){const _0x4a67e2=a89_0x5e85,_0x5ee4e0=_0x4d1f19();while(!![]){try{const _0x3c27a6=-parseInt(_0x4a67e2(0xfd))/0x1*(parseInt(_0x4a67e2(0xff))/0x2)+-parseInt(_0x4a67e2(0x105))/0x3*(-parseInt(_0x4a67e2(0xfc))/0x4)+parseInt(_0x4a67e2(0x103))/0x5*(parseInt(_0x4a67e2(0x101))/0x6)+-parseInt(_0x4a67e2(0x102))/0x7*(parseInt(_0x4a67e2(0xfa))/0x8)+parseInt(_0x4a67e2(0xf6))/0x9*(-parseInt(_0x4a67e2(0x104))/0xa)+-parseInt(_0x4a67e2(0x107))/0xb+-parseInt(_0x4a67e2(0xfe))/0xc*(-parseInt(_0x4a67e2(0x10a))/0xd);if(_0x3c27a6===_0x12ad43)break;else _0x5ee4e0['push'](_0x5ee4e0['shift']());}catch(_0x725113){_0x5ee4e0['push'](_0x5ee4e0['shift']());}}}(a89_0x4bf3,0x6ba9b));function a89_0x5e85(_0x5c3bbc,_0x3bdf49){_0x5c3bbc=_0x5c3bbc-0xf2;const _0x4bf392=a89_0x4bf3();let _0x5e85b8=_0x4bf392[_0x5c3bbc];return _0x5e85b8;}import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a89_0x4bf3(){const _0x5d8d73=['6SgZrby','14HgfCnr','1632985fxWIRX','49850lSUMKW','3JYzSqT','Page\x20index\x20(1-based)','2934096kdQZwP','Found\x20','map','39JOHZTD','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','page','length','DB_TABLE','read','number','387IdaxDo','num','pagesize','Page\x20size','1499296evYWIl','appCode','2971372dWnmNC','1odSCGf','1981404zijZfZ','535778wRGRjg','all'];a89_0x4bf3=function(){return _0x5d8d73;};return a89_0x4bf3();}import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':'list','description':a89_0x180b90(0x10b),'risk':a89_0x180b90(0xf4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a89_0x180b90(0x10c),'type':a89_0x180b90(0xf5),'description':a89_0x180b90(0x106),'default':0x1},{'name':'pagesize','type':a89_0x180b90(0xf5),'description':a89_0x180b90(0xf9),'default':0x64}],async 'execute'(_0x3588e5){const _0xeca1bd=a89_0x180b90,_0x17af98=_0x3588e5[_0xeca1bd(0xf7)](_0xeca1bd(0x10c),0x1)||0x1,_0x12ab67=_0x3588e5[_0xeca1bd(0xf7)](_0xeca1bd(0xf8),0x64)||0x64,[{items:_0x1cb562,paging:_0x49b749},_0x16386f]=await Promise[_0xeca1bd(0x100)]([listDbLinks(_0x3588e5[_0xeca1bd(0xfb)],{'currentPage':_0x17af98,'pageSize':_0x12ab67}),listDatasets(_0x3588e5[_0xeca1bd(0xfb)],{'source':_0xeca1bd(0xf3)})]),_0x58c562=_0x1cb562[_0xeca1bd(0x109)](_0x5bc98f=>({...sanitizeDbLinkForOutput(_0x5bc98f),'datasetDependency':buildDbDatasetDependency(_0x5bc98f,_0x16386f)['datasetDependency']})),_0x2185c0=_0x49b749?_0x49b749:{'currentPage':_0x17af98,'pageSize':_0x12ab67,'rowsOnPage':_0x58c562[_0xeca1bd(0xf2)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x58c562,'paging':_0x2185c0},'message':_0xeca1bd(0x108)+_0x58c562[_0xeca1bd(0xf2)]+'\x20database\x20connection(s)'};}};
1
+ function a91_0x3082(){const _0x5ec856=['Page\x20size','\x20database\x20connection(s)','Page\x20index\x20(1-based)','num','number','list','map','1714167XiJCVc','Found\x20','DB_TABLE','read','6261880gQPekq','3VGLvsD','5eyBQWn','3411333sxelzO','length','1103756XRbyrT','all','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','544907kDjIPQ','628014RsEMRG','page','datasetDependency','List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','20OboRQO','pagesize','348wgyfEt','54TYhhHW','16858XxImwI'];a91_0x3082=function(){return _0x5ec856;};return a91_0x3082();}function a91_0x5ecd(_0xd8b21e,_0x50290d){_0xd8b21e=_0xd8b21e-0x7b;const _0x308261=a91_0x3082();let _0x5ecd3b=_0x308261[_0xd8b21e];return _0x5ecd3b;}const a91_0x564ead=a91_0x5ecd;(function(_0x4643a6,_0x517826){const _0x5c570d=a91_0x5ecd,_0x2f5593=_0x4643a6();while(!![]){try{const _0x1219f1=-parseInt(_0x5c570d(0x8d))/0x1*(-parseInt(_0x5c570d(0x8c))/0x2)+-parseInt(_0x5c570d(0x7d))/0x3*(parseInt(_0x5c570d(0x81))/0x4)+parseInt(_0x5c570d(0x7e))/0x5*(-parseInt(_0x5c570d(0x85))/0x6)+parseInt(_0x5c570d(0x95))/0x7+parseInt(_0x5c570d(0x7c))/0x8+parseInt(_0x5c570d(0x7f))/0x9*(parseInt(_0x5c570d(0x89))/0xa)+parseInt(_0x5c570d(0x84))/0xb*(-parseInt(_0x5c570d(0x8b))/0xc);if(_0x1219f1===_0x517826)break;else _0x2f5593['push'](_0x2f5593['shift']());}catch(_0x2afc81){_0x2f5593['push'](_0x2f5593['shift']());}}}(a91_0x3082,0x676fb));import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a91_0x564ead(0x93),'description':a91_0x564ead(0x88),'risk':a91_0x564ead(0x7b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a91_0x564ead(0x86),'type':'number','description':a91_0x564ead(0x90),'default':0x1},{'name':'pagesize','type':a91_0x564ead(0x92),'description':a91_0x564ead(0x8e),'default':0x64}],async 'execute'(_0x3baa85){const _0x15f14b=a91_0x564ead,_0x57dddc=_0x3baa85[_0x15f14b(0x91)](_0x15f14b(0x86),0x1)||0x1,_0x2dd82e=_0x3baa85[_0x15f14b(0x91)](_0x15f14b(0x8a),0x64)||0x64,[{items:_0x4fe2e1,paging:_0x2c0c4d},_0xd61fe2]=await Promise[_0x15f14b(0x82)]([listDbLinks(_0x3baa85['appCode'],{'currentPage':_0x57dddc,'pageSize':_0x2dd82e}),listDatasets(_0x3baa85['appCode'],{'source':_0x15f14b(0x97)})]),_0x443b99=_0x4fe2e1[_0x15f14b(0x94)](_0x3c83bd=>({...sanitizeDbLinkForOutput(_0x3c83bd),'datasetDependency':buildDbDatasetDependency(_0x3c83bd,_0xd61fe2)[_0x15f14b(0x87)]})),_0x28c19a=_0x2c0c4d?_0x2c0c4d:{'currentPage':_0x57dddc,'pageSize':_0x2dd82e,'rowsOnPage':_0x443b99[_0x15f14b(0x80)],'totalCount':null,'note':_0x15f14b(0x83)};return{'ok':!![],'data':{'connections':_0x443b99,'paging':_0x28c19a},'message':_0x15f14b(0x96)+_0x443b99[_0x15f14b(0x80)]+_0x15f14b(0x8f)};}};
@@ -1 +1 @@
1
- (function(_0x36e39d,_0x182ee3){const _0x1231dd=a90_0xec12,_0x79e9cf=_0x36e39d();while(!![]){try{const _0x19ada2=-parseInt(_0x1231dd(0x1a3))/0x1+-parseInt(_0x1231dd(0x19d))/0x2+parseInt(_0x1231dd(0x1a1))/0x3+-parseInt(_0x1231dd(0x197))/0x4*(-parseInt(_0x1231dd(0x1a7))/0x5)+-parseInt(_0x1231dd(0x185))/0x6*(parseInt(_0x1231dd(0x18a))/0x7)+parseInt(_0x1231dd(0x195))/0x8*(-parseInt(_0x1231dd(0x194))/0x9)+parseInt(_0x1231dd(0x189))/0xa;if(_0x19ada2===_0x182ee3)break;else _0x79e9cf['push'](_0x79e9cf['shift']());}catch(_0x26283e){_0x79e9cf['push'](_0x79e9cf['shift']());}}}(a90_0xada0,0x45697));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0xc7d0e3){const _0x18c1d1=a90_0xec12,_0x2a280a=_0xc7d0e3['toLowerCase']();if(_0x2a280a===_0x18c1d1(0x192)||_0x2a280a===_0x18c1d1(0x193)||_0x2a280a===_0x18c1d1(0x1a5))return!![];if(_0x2a280a['includes'](_0x18c1d1(0x18f))||_0x2a280a[_0x18c1d1(0x18d)](_0x18c1d1(0x188))||_0x2a280a[_0x18c1d1(0x18d)]('credential'))return!![];if(_0x2a280a['includes'](_0x18c1d1(0x18b))||_0x2a280a[_0x18c1d1(0x18d)](_0x18c1d1(0x1a6)))return!![];if(_0x2a280a===_0x18c1d1(0x18c)||_0x2a280a===_0x18c1d1(0x184)||_0x2a280a===_0x18c1d1(0x19c))return!![];return![];}export function sanitizeDbLinkForOutput(_0x19c93a){const _0x1f5908=a90_0xec12,_0x58ca32={..._0x19c93a};delete _0x58ca32[_0x1f5908(0x19f)];for(const _0x31923e of Object[_0x1f5908(0x199)](_0x58ca32)){if(!shouldRedactKey(_0x31923e))continue;const _0x36673d=_0x58ca32[_0x31923e];_0x36673d!=null&&String(_0x36673d)[_0x1f5908(0x1a0)]>0x0&&(_0x58ca32[_0x31923e]=_0x1f5908(0x190));}return _0x58ca32;}export function sanitizeDbLinkList(_0x20455d){const _0x3bd5a0=a90_0xec12;return _0x20455d[_0x3bd5a0(0x187)](_0x58b008=>sanitizeDbLinkForOutput(_0x58b008));}export function buildDbDatasetDependency(_0x2e55e7,_0x7510d2){const _0x2046c5=a90_0xec12,_0x267062=_0x7510d2[_0x2046c5(0x18e)](_0x10d8b1=>Number(_0x10d8b1[_0x2046c5(0x186)]?.['dbId'])===Number(_0x2e55e7['id']))['map'](_0x238b00=>({'id':_0x238b00['id'],'code':_0x238b00[_0x2046c5(0x19a)],'name':_0x238b00['name'],..._0x238b00['dbtableConfig']?.[_0x2046c5(0x198)]?{'tableName':_0x238b00[_0x2046c5(0x186)][_0x2046c5(0x198)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x267062[_0x2046c5(0x1a0)]>0x0,'activeDatasetCount':_0x267062[_0x2046c5(0x1a0)]},'datasets':_0x267062};}function a90_0xec12(_0x405df3,_0x51cb6f){_0x405df3=_0x405df3-0x184;const _0xada026=a90_0xada0();let _0xec12a6=_0xada026[_0x405df3];return _0xec12a6;}export async function assertDbLinkConnectionPreflight(_0x51e96d){const _0x186028=a90_0xec12,_0xa620d8=await testDbLinkConfigConnect(_0x51e96d);if(_0xa620d8!==!![])throw CliErrors[_0x186028(0x1a2)]('Database\x20connection\x20preflight\x20failed.','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.');}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;function a90_0xada0(){const _0x3ded1d=['10KfhkBY','connectionstring','240330IQDarQ','dbtableConfig','map','token','10650380VzCpaj','49IVpbYF','privatekey','authorization','includes','filter','secret','[redacted]','/data/database','password','passwd','17523dKXdys','600SuCmaL','test','203228elQCtG','tableName','keys','code','number','jdbcurl','1079114PYDiVw','/data/er?dbId=','hasAvailableDo','length','462297zNSxvp','apiError','70473wbJzyh','trim','dbpassword','accesskey'];a90_0xada0=function(){return _0x3ded1d;};return a90_0xada0();}export function validateDbUrl(_0x5d973c){const _0x260572=a90_0xec12,_0x4bae84=_0x5d973c['trim']();if(!_0x4bae84)return![];return DB_URL_PATTERN[_0x260572(0x196)](_0x4bae84);}export function buildDbPageLinks(_0x10f10a,_0x4a556e){const _0x3c62fb=a90_0xec12,_0x34eac3=_0x10f10a?.[_0x3c62fb(0x1a4)]();if(!_0x34eac3)return undefined;const _0x13a29a=typeof _0x4a556e===_0x3c62fb(0x19b)?String(_0x4a556e):String(_0x4a556e??'')[_0x3c62fb(0x1a4)]();if(!_0x13a29a)return undefined;const _0x41a581=Number(_0x13a29a);if(!Number['isFinite'](_0x41a581)||_0x41a581<=0x0)return undefined;const _0x6330f7=getAppBaseUrl(_0x34eac3),_0x59cc72=encodeURIComponent(String(_0x41a581));return{'databasePage':_0x6330f7+_0x3c62fb(0x191),'erPage':_0x6330f7+_0x3c62fb(0x19e)+_0x59cc72};}
1
+ (function(_0x3d4b1b,_0x1eac68){const _0x1b32ba=a92_0x217d,_0x39da9a=_0x3d4b1b();while(!![]){try{const _0x24335c=parseInt(_0x1b32ba(0x1d1))/0x1*(parseInt(_0x1b32ba(0x1e0))/0x2)+-parseInt(_0x1b32ba(0x1d5))/0x3+-parseInt(_0x1b32ba(0x1ca))/0x4*(-parseInt(_0x1b32ba(0x1e1))/0x5)+-parseInt(_0x1b32ba(0x1db))/0x6+parseInt(_0x1b32ba(0x1d3))/0x7+parseInt(_0x1b32ba(0x1c7))/0x8+-parseInt(_0x1b32ba(0x1dd))/0x9;if(_0x24335c===_0x1eac68)break;else _0x39da9a['push'](_0x39da9a['shift']());}catch(_0x5087ea){_0x39da9a['push'](_0x39da9a['shift']());}}}(a92_0xeb41,0x5566f));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x49bb2c){const _0x221669=a92_0x217d,_0x355767=_0x49bb2c['toLowerCase']();if(_0x355767===_0x221669(0x1df)||_0x355767===_0x221669(0x1da)||_0x355767==='dbpassword')return!![];if(_0x355767[_0x221669(0x1ce)]('secret')||_0x355767[_0x221669(0x1ce)]('token')||_0x355767['includes']('credential'))return!![];if(_0x355767[_0x221669(0x1ce)](_0x221669(0x1cb))||_0x355767[_0x221669(0x1ce)]('accesskey'))return!![];if(_0x355767===_0x221669(0x1d4)||_0x355767===_0x221669(0x1d6)||_0x355767===_0x221669(0x1cf))return!![];return![];}export function sanitizeDbLinkForOutput(_0x1abc91){const _0x35f53e=a92_0x217d,_0x98b742={..._0x1abc91};delete _0x98b742[_0x35f53e(0x1d7)];for(const _0x4de96b of Object[_0x35f53e(0x1cd)](_0x98b742)){if(!shouldRedactKey(_0x4de96b))continue;const _0x2c88b9=_0x98b742[_0x4de96b];_0x2c88b9!=null&&String(_0x2c88b9)['length']>0x0&&(_0x98b742[_0x4de96b]='[redacted]');}return _0x98b742;}export function sanitizeDbLinkList(_0x44c6af){const _0x58066b=a92_0x217d;return _0x44c6af[_0x58066b(0x1d2)](_0x105d77=>sanitizeDbLinkForOutput(_0x105d77));}function a92_0xeb41(){const _0x41533b=['4017433WlbZtm','authorization','1173318bupyZO','connectionstring','hasAvailableDo','dbtableConfig','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','passwd','3366912egvckc','apiError','99603fcyrQN','length','password','132206VDNEzg','15GTWxGU','isFinite','number','Database\x20connection\x20preflight\x20failed.','tableName','174936TsVvYH','dbId','code','868324nsdxRl','privatekey','trim','keys','includes','jdbcurl','test','1RHwQUA','map'];a92_0xeb41=function(){return _0x41533b;};return a92_0xeb41();}export function buildDbDatasetDependency(_0x47f89d,_0x2b2b78){const _0x2da4eb=a92_0x217d,_0x4b03b0=_0x2b2b78['filter'](_0xd3c99f=>Number(_0xd3c99f['dbtableConfig']?.[_0x2da4eb(0x1c8)])===Number(_0x47f89d['id']))['map'](_0x30c20f=>({'id':_0x30c20f['id'],'code':_0x30c20f[_0x2da4eb(0x1c9)],'name':_0x30c20f['name'],..._0x30c20f[_0x2da4eb(0x1d8)]?.['tableName']?{'tableName':_0x30c20f['dbtableConfig'][_0x2da4eb(0x1c6)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x4b03b0[_0x2da4eb(0x1de)]>0x0,'activeDatasetCount':_0x4b03b0['length']},'datasets':_0x4b03b0};}export async function assertDbLinkConnectionPreflight(_0xd36e){const _0x31168c=a92_0x217d,_0x418cfe=await testDbLinkConfigConnect(_0xd36e);if(_0x418cfe!==!![])throw CliErrors[_0x31168c(0x1dc)](_0x31168c(0x1c5),_0x31168c(0x1d9));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5b248c){const _0x1bc06f=a92_0x217d,_0x16897a=_0x5b248c[_0x1bc06f(0x1cc)]();if(!_0x16897a)return![];return DB_URL_PATTERN[_0x1bc06f(0x1d0)](_0x16897a);}function a92_0x217d(_0x5bd99a,_0x5216ff){_0x5bd99a=_0x5bd99a-0x1c3;const _0xeb41a8=a92_0xeb41();let _0x217d71=_0xeb41a8[_0x5bd99a];return _0x217d71;}export function buildDbPageLinks(_0x367f08,_0x50c460){const _0x49383f=a92_0x217d,_0x5bbfad=_0x367f08?.['trim']();if(!_0x5bbfad)return undefined;const _0x455003=typeof _0x50c460===_0x49383f(0x1c4)?String(_0x50c460):String(_0x50c460??'')['trim']();if(!_0x455003)return undefined;const _0x2c694e=Number(_0x455003);if(!Number[_0x49383f(0x1c3)](_0x2c694e)||_0x2c694e<=0x0)return undefined;const _0x3ef7ad=getAppBaseUrl(_0x5bbfad),_0x4b82e7=encodeURIComponent(String(_0x2c694e));return{'databasePage':_0x3ef7ad+'/data/database','erPage':_0x3ef7ad+'/data/er?dbId='+_0x4b82e7};}
@@ -1 +1 @@
1
- const a91_0x8462ac=a91_0x31d5;(function(_0x11c770,_0x1737c7){const _0x578e64=a91_0x31d5,_0x5878dc=_0x11c770();while(!![]){try{const _0x4ac6b0=-parseInt(_0x578e64(0x9d))/0x1+-parseInt(_0x578e64(0xaa))/0x2+parseInt(_0x578e64(0xa9))/0x3*(parseInt(_0x578e64(0xac))/0x4)+-parseInt(_0x578e64(0x9e))/0x5+-parseInt(_0x578e64(0xae))/0x6*(-parseInt(_0x578e64(0xa2))/0x7)+-parseInt(_0x578e64(0xa4))/0x8*(-parseInt(_0x578e64(0x97))/0x9)+parseInt(_0x578e64(0x98))/0xa;if(_0x4ac6b0===_0x1737c7)break;else _0x5878dc['push'](_0x5878dc['shift']());}catch(_0x353d37){_0x5878dc['push'](_0x5878dc['shift']());}}}(a91_0x4188,0xd552d));import{CliErrors}from'../../errors.js';function a91_0x31d5(_0x3d8246,_0x2105ec){_0x3d8246=_0x3d8246-0x96;const _0x4188ac=a91_0x4188();let _0x31d59f=_0x4188ac[_0x3d8246];return _0x31d59f;}function a91_0x4188(){const _0x5c2830=['\x20row(s).','13363saUKEf','length','166312jCjgFK','set','validation','\x20of\x20','physicalTableCount','462885iYpXww','2552222EhODJT','summary','36SFgdcY','number','4350pCtOzv','fromEntries','NEW_TABLE','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','198Xahdyb','3932480UIqjWV','filter','size','tableList','tableName','1037197ioftuv','2181025Woeruu','values','totalCount'];a91_0x4188=function(){return _0x5c2830;};return a91_0x4188();}export const DB_TABLE_PAGE_SIZE=0x64;export const DB_TABLE_DIFF_TYPES=[a91_0x8462ac(0xb0),'MODIFIED_TABLE','DELETED_TABLE','ALREADY_ANALYZED'];export function summarizeDbTableDiff(_0x32163e){const _0x6e6144=a91_0x8462ac;return Object[_0x6e6144(0xaf)](DB_TABLE_DIFF_TYPES['map'](_0x3537a7=>[_0x3537a7,_0x32163e[_0x6e6144(0x99)](_0x190b96=>_0x190b96['diffType']===_0x3537a7)[_0x6e6144(0xa3)]]));}export async function getAllDbTableDiff(_0x241260,_0x1ee6cc,_0x3e83e6,_0x4de5cb){const _0x2df665=a91_0x8462ac,_0x1e04c0=new Map();let _0x53a0bf=0x1,_0x425b1c=null;while(!![]){_0x425b1c=await _0x241260(_0x1ee6cc,_0x3e83e6,{'pageIndex':_0x53a0bf,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x4de5cb});const _0x22256b=_0x1e04c0['size'];for(const _0x3a9dd2 of _0x425b1c[_0x2df665(0x9b)]){_0x1e04c0[_0x2df665(0xa5)](_0x3a9dd2[_0x2df665(0x9c)],_0x3a9dd2);}if(_0x1e04c0[_0x2df665(0x9a)]>=_0x425b1c[_0x2df665(0xa0)])break;if(_0x425b1c[_0x2df665(0x9b)][_0x2df665(0xa3)]===0x0||_0x1e04c0['size']===_0x22256b)throw CliErrors[_0x2df665(0xa6)](_0x2df665(0x96)+_0x1e04c0['size']+_0x2df665(0xa7)+_0x425b1c[_0x2df665(0xa0)]+_0x2df665(0xa1));_0x53a0bf+=0x1;}return{'totalCount':_0x425b1c?.[_0x2df665(0xa0)]??0x0,...typeof _0x425b1c?.[_0x2df665(0xa8)]===_0x2df665(0xad)?{'physicalTableCount':_0x425b1c[_0x2df665(0xa8)]}:{},...typeof _0x425b1c?.['datasetTableCount']===_0x2df665(0xad)?{'datasetTableCount':_0x425b1c['datasetTableCount']}:{},..._0x425b1c?.[_0x2df665(0xab)]?{'summary':_0x425b1c[_0x2df665(0xab)]}:{},'tableList':[..._0x1e04c0[_0x2df665(0x9f)]()]};}
1
+ const a93_0x17cd87=a93_0x52ff;(function(_0x44f2d4,_0xa9ef20){const _0xb97f81=a93_0x52ff,_0x1beb06=_0x44f2d4();while(!![]){try{const _0x454acd=-parseInt(_0xb97f81(0xdc))/0x1+parseInt(_0xb97f81(0xe6))/0x2+parseInt(_0xb97f81(0xdd))/0x3*(parseInt(_0xb97f81(0xe7))/0x4)+parseInt(_0xb97f81(0xd6))/0x5*(-parseInt(_0xb97f81(0xe4))/0x6)+parseInt(_0xb97f81(0xeb))/0x7*(parseInt(_0xb97f81(0xe8))/0x8)+-parseInt(_0xb97f81(0xe1))/0x9*(parseInt(_0xb97f81(0xe9))/0xa)+parseInt(_0xb97f81(0xd3))/0xb*(parseInt(_0xb97f81(0xd1))/0xc);if(_0x454acd===_0xa9ef20)break;else _0x1beb06['push'](_0x1beb06['shift']());}catch(_0x57f6ff){_0x1beb06['push'](_0x1beb06['shift']());}}}(a93_0x1044,0x94556));import{CliErrors}from'../../errors.js';function a93_0x52ff(_0x572fc4,_0xa85faa){_0x572fc4=_0x572fc4-0xd0;const _0x104433=a93_0x1044();let _0x52fff2=_0x104433[_0x572fc4];return _0x52fff2;}export const DB_TABLE_PAGE_SIZE=0x64;export const DB_TABLE_DIFF_TYPES=['NEW_TABLE',a93_0x17cd87(0xd5),a93_0x17cd87(0xec),'ALREADY_ANALYZED'];export function summarizeDbTableDiff(_0x4387ad){const _0x161e4b=a93_0x17cd87;return Object[_0x161e4b(0xea)](DB_TABLE_DIFF_TYPES[_0x161e4b(0xe2)](_0xcbc5c2=>[_0xcbc5c2,_0x4387ad[_0x161e4b(0xd8)](_0x5afc4b=>_0x5afc4b['diffType']===_0xcbc5c2)[_0x161e4b(0xd9)]]));}export async function getAllDbTableDiff(_0x429ac5,_0x4db978,_0x4edc03,_0x4a1930){const _0x26ae5d=a93_0x17cd87,_0x4462b9=new Map();let _0x39b808=0x1,_0x421194=null;while(!![]){_0x421194=await _0x429ac5(_0x4db978,_0x4edc03,{'pageIndex':_0x39b808,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x4a1930});const _0x16684d=_0x4462b9[_0x26ae5d(0xda)];for(const _0x2f00f1 of _0x421194[_0x26ae5d(0xd7)]){_0x4462b9[_0x26ae5d(0xdb)](_0x2f00f1[_0x26ae5d(0xd2)],_0x2f00f1);}if(_0x4462b9[_0x26ae5d(0xda)]>=_0x421194[_0x26ae5d(0xd4)])break;if(_0x421194[_0x26ae5d(0xd7)][_0x26ae5d(0xd9)]===0x0||_0x4462b9['size']===_0x16684d)throw CliErrors['validation'](_0x26ae5d(0xdf)+_0x4462b9[_0x26ae5d(0xda)]+'\x20of\x20'+_0x421194['totalCount']+'\x20row(s).');_0x39b808+=0x1;}return{'totalCount':_0x421194?.[_0x26ae5d(0xd4)]??0x0,...typeof _0x421194?.[_0x26ae5d(0xe3)]===_0x26ae5d(0xde)?{'physicalTableCount':_0x421194[_0x26ae5d(0xe3)]}:{},...typeof _0x421194?.['datasetTableCount']===_0x26ae5d(0xde)?{'datasetTableCount':_0x421194[_0x26ae5d(0xe0)]}:{},..._0x421194?.[_0x26ae5d(0xe5)]?{'summary':_0x421194['summary']}:{},'tableList':[..._0x4462b9[_0x26ae5d(0xd0)]()]};}function a93_0x1044(){const _0x39a06c=['totalCount','MODIFIED_TABLE','40DkmLAC','tableList','filter','length','size','set','852538MOTLAu','3643203KQztkC','number','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','datasetTableCount','4437513nGLEgE','map','physicalTableCount','512352wJiwvk','summary','833916LpgTUx','4jIaKjE','8tFdAzb','20PpYnlJ','fromEntries','4638697vGfqlA','DELETED_TABLE','values','24YDaGhh','tableName','4594326sqJuVJ'];a93_0x1044=function(){return _0x39a06c;};return a93_0x1044();}
@@ -1 +1 @@
1
- const a92_0x51e80a=a92_0x4d41;(function(_0x107215,_0x1082f0){const _0x51f06a=a92_0x4d41,_0x3cb079=_0x107215();while(!![]){try{const _0x35de33=-parseInt(_0x51f06a(0xde))/0x1+-parseInt(_0x51f06a(0xe6))/0x2*(parseInt(_0x51f06a(0xea))/0x3)+parseInt(_0x51f06a(0xe8))/0x4*(parseInt(_0x51f06a(0xf1))/0x5)+-parseInt(_0x51f06a(0xeb))/0x6*(parseInt(_0x51f06a(0xe1))/0x7)+parseInt(_0x51f06a(0xe7))/0x8+-parseInt(_0x51f06a(0xdf))/0x9*(-parseInt(_0x51f06a(0xda))/0xa)+parseInt(_0x51f06a(0xe4))/0xb;if(_0x35de33===_0x1082f0)break;else _0x3cb079['push'](_0x3cb079['shift']());}catch(_0x44afa2){_0x3cb079['push'](_0x3cb079['shift']());}}}(a92_0xaba0,0xce9bf));function a92_0x4d41(_0x1f38c1,_0xd8c44e){_0x1f38c1=_0x1f38c1-0xd8;const _0xaba058=a92_0xaba0();let _0x4d41a2=_0xaba058[_0x1f38c1];return _0x4d41a2;}function a92_0xaba0(){const _0x5e6116=['3405652wMDsuS','length','9021OlbEAt','313260TDixOP','string','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','totalCount','tableList','summary','5YPxbul','num','physicalTableCount','4106090upnpqh','str','tables','number','1495073wBuHZZ','9rRCpGi','appCode','112hokzxc','read','datasetTableCount','27298513UPasxj','table','674loxcCo','3570864XvMAfI'];a92_0xaba0=function(){return _0x5e6116;};return a92_0xaba0();}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_0x51e80a(0xdc),'description':'List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','risk':a92_0x51e80a(0xe2),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a92_0x51e80a(0xe5),'type':a92_0x51e80a(0xec),'description':a92_0x51e80a(0xed)}],async 'execute'(_0x29bcd2){const _0x4d6c26=a92_0x51e80a,_0x4790b3=_0x29bcd2[_0x4d6c26(0xd8)]('id'),_0xe0f74c=_0x29bcd2[_0x4d6c26(0xdb)](_0x4d6c26(0xe5))||undefined,_0x2234fb=await getAllDbTableDiff(getDbTableComparisonPage,_0x29bcd2[_0x4d6c26(0xe0)],_0x4790b3,_0xe0f74c),_0x348bf4=_0x2234fb[_0x4d6c26(0xef)];return{'ok':!![],'data':{'dbLinkId':_0x4790b3,'totalCount':_0x2234fb[_0x4d6c26(0xee)],...typeof _0x2234fb[_0x4d6c26(0xd9)]===_0x4d6c26(0xdd)?{'physicalTableCount':_0x2234fb[_0x4d6c26(0xd9)]}:{},...typeof _0x2234fb['datasetTableCount']===_0x4d6c26(0xdd)?{'datasetTableCount':_0x2234fb[_0x4d6c26(0xe3)]}:{},..._0x2234fb[_0x4d6c26(0xf0)]?{'summary':_0x2234fb[_0x4d6c26(0xf0)]}:{},'summaryByType':summarizeDbTableDiff(_0x348bf4),'tables':_0x348bf4},'message':_0x348bf4[_0x4d6c26(0xe9)]+'\x20table\x20comparison\x20row(s),\x20total\x20'+_0x2234fb[_0x4d6c26(0xee)]+'\x20(db\x20link\x20'+_0x4790b3+')'};}};
1
+ function a94_0x1b96(_0x3808a0,_0x2da71b){_0x3808a0=_0x3808a0-0x119;const _0x442432=a94_0x4424();let _0x1b96c7=_0x442432[_0x3808a0];return _0x1b96c7;}const a94_0x1a51c5=a94_0x1b96;function a94_0x4424(){const _0x186919=['30vooNRc','table','summary','List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','2324472RnWcnz','335062RwqmGC','8seBBwR','datasetTableCount','physicalTableCount','52245CIwDVB','957HDptQM','56184PVREyv','660WqcPsd','79084NZrIfW','\x20(db\x20link\x20','\x20table\x20comparison\x20row(s),\x20total\x20','read','3ZArnne','num','number','length','346210yrOGLJ','totalCount','appCode','1749824vwqxuY'];a94_0x4424=function(){return _0x186919;};return a94_0x4424();}(function(_0x549490,_0x513432){const _0x2319f0=a94_0x1b96,_0x4e218c=_0x549490();while(!![]){try{const _0x2da7c2=parseInt(_0x2319f0(0x11c))/0x1*(-parseInt(_0x2319f0(0x123))/0x2)+-parseInt(_0x2319f0(0x127))/0x3*(-parseInt(_0x2319f0(0x12e))/0x4)+-parseInt(_0x2319f0(0x12b))/0x5*(-parseInt(_0x2319f0(0x12f))/0x6)+parseInt(_0x2319f0(0x11b))/0x7+-parseInt(_0x2319f0(0x11a))/0x8+parseInt(_0x2319f0(0x11f))/0x9*(-parseInt(_0x2319f0(0x122))/0xa)+parseInt(_0x2319f0(0x120))/0xb*(parseInt(_0x2319f0(0x121))/0xc);if(_0x2da7c2===_0x513432)break;else _0x4e218c['push'](_0x4e218c['shift']());}catch(_0x2c36bd){_0x4e218c['push'](_0x4e218c['shift']());}}}(a94_0x4424,0x3cc09));import{getDbTableComparisonPage}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbTables={'service':'db','command':'tables','description':a94_0x1a51c5(0x119),'risk':a94_0x1a51c5(0x126),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':'string','description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'}],async 'execute'(_0x563578){const _0xc736d2=a94_0x1a51c5,_0x4b903a=_0x563578[_0xc736d2(0x128)]('id'),_0x14a8aa=_0x563578['str'](_0xc736d2(0x130))||undefined,_0x4cd154=await getAllDbTableDiff(getDbTableComparisonPage,_0x563578[_0xc736d2(0x12d)],_0x4b903a,_0x14a8aa),_0x1bc5ee=_0x4cd154['tableList'];return{'ok':!![],'data':{'dbLinkId':_0x4b903a,'totalCount':_0x4cd154[_0xc736d2(0x12c)],...typeof _0x4cd154[_0xc736d2(0x11e)]===_0xc736d2(0x129)?{'physicalTableCount':_0x4cd154[_0xc736d2(0x11e)]}:{},...typeof _0x4cd154[_0xc736d2(0x11d)]==='number'?{'datasetTableCount':_0x4cd154[_0xc736d2(0x11d)]}:{},..._0x4cd154[_0xc736d2(0x131)]?{'summary':_0x4cd154['summary']}:{},'summaryByType':summarizeDbTableDiff(_0x1bc5ee),'tables':_0x1bc5ee},'message':_0x1bc5ee[_0xc736d2(0x12a)]+_0xc736d2(0x125)+_0x4cd154[_0xc736d2(0x12c)]+_0xc736d2(0x124)+_0x4b903a+')'};}};
@@ -1 +1 @@
1
- const a93_0x13fa0b=a93_0x3585;(function(_0x306fb5,_0x13d8c3){const _0x425d20=a93_0x3585,_0x4e99dd=_0x306fb5();while(!![]){try{const _0x5167ee=parseInt(_0x425d20(0xfb))/0x1+parseInt(_0x425d20(0x10c))/0x2+-parseInt(_0x425d20(0xff))/0x3*(parseInt(_0x425d20(0xfd))/0x4)+-parseInt(_0x425d20(0x105))/0x5*(-parseInt(_0x425d20(0x109))/0x6)+parseInt(_0x425d20(0x10a))/0x7+parseInt(_0x425d20(0xfa))/0x8*(-parseInt(_0x425d20(0xf8))/0x9)+parseInt(_0x425d20(0x102))/0xa*(-parseInt(_0x425d20(0xf6))/0xb);if(_0x5167ee===_0x13d8c3)break;else _0x4e99dd['push'](_0x4e99dd['shift']());}catch(_0x4e41a3){_0x4e99dd['push'](_0x4e99dd['shift']());}}}(a93_0x37db,0x3f091));import{testDbLinkConnect}from'../../core/api-client.js';function a93_0x3585(_0x5ca0c0,_0x34a529){_0x5ca0c0=_0x5ca0c0-0xf6;const _0x37db51=a93_0x37db();let _0x358519=_0x37db51[_0x5ca0c0];return _0x358519;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a93_0x37db(){const _0x3cfea3=['23488jjSyNK','479219wMDxbV','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','4792luxQbd','msg','1263ifHRrl','error','Connection\x20check\x20finished\x20for\x20db\x20link\x20','66630tPOpRO','keys','success','10WvENJq','code','message','data','551322IXiySJ','2272977GUTmyf','object','934844dQEYqU','Connection\x20OK\x20for\x20db\x20link\x20','test','363CAkCqa','slice','1449nsHPZw','length'];a93_0x37db=function(){return _0x3cfea3;};return a93_0x37db();}function summarizeTestConnectResult(_0x2a529a){const _0x2392cd=a93_0x3585;if(_0x2a529a===!![]||_0x2a529a===![])return{'success':_0x2a529a};if(_0x2a529a===null||_0x2a529a===undefined)return{'type':typeof _0x2a529a};if(typeof _0x2a529a!==_0x2392cd(0x10b))return{'type':typeof _0x2a529a};const _0x5ce534=_0x2a529a,_0x360689=[_0x2392cd(0x104),_0x2392cd(0x107),_0x2392cd(0x106),_0x2392cd(0x100),_0x2392cd(0xfe),_0x2392cd(0x108)],_0x2d8230={};for(const _0x2eebc2 of _0x360689){if(_0x2eebc2 in _0x5ce534)_0x2d8230[_0x2eebc2]=_0x5ce534[_0x2eebc2];}return Object['keys'](_0x2d8230)[_0x2392cd(0xf9)]===0x0&&(_0x2d8230[_0x2392cd(0x103)]=Object[_0x2392cd(0x103)](_0x5ce534)[_0x2392cd(0xf7)](0x0,0x14)),_0x2d8230;}export const dbTest={'service':'db','command':a93_0x13fa0b(0x10e),'description':a93_0x13fa0b(0xfc),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x34e619){const _0x3eff35=a93_0x13fa0b,_0x336087=_0x34e619['num']('id'),_0x569861=await testDbLinkConnect(_0x336087),_0x4df67f=_0x569861===!![]||typeof _0x569861===_0x3eff35(0x10b)&&_0x569861!==null&&_0x569861[_0x3eff35(0x104)]===!![],_0x7f1e9=summarizeTestConnectResult(_0x569861);return{'ok':!![],'data':{'id':_0x336087,'connected':Boolean(_0x4df67f),'result':_0x7f1e9},'message':_0x4df67f?_0x3eff35(0x10d)+_0x336087:_0x3eff35(0x101)+_0x336087+'\x20(see\x20data.result)'};}};
1
+ const a95_0x192aa2=a95_0x3759;(function(_0x59ed28,_0x4b9f67){const _0x44ea8f=a95_0x3759,_0x591069=_0x59ed28();while(!![]){try{const _0x125dc=parseInt(_0x44ea8f(0x1cf))/0x1*(parseInt(_0x44ea8f(0x1d5))/0x2)+-parseInt(_0x44ea8f(0x1e2))/0x3+-parseInt(_0x44ea8f(0x1e1))/0x4*(parseInt(_0x44ea8f(0x1d3))/0x5)+parseInt(_0x44ea8f(0x1da))/0x6+parseInt(_0x44ea8f(0x1df))/0x7+parseInt(_0x44ea8f(0x1de))/0x8*(-parseInt(_0x44ea8f(0x1cd))/0x9)+-parseInt(_0x44ea8f(0x1d6))/0xa;if(_0x125dc===_0x4b9f67)break;else _0x591069['push'](_0x591069['shift']());}catch(_0x15881f){_0x591069['push'](_0x591069['shift']());}}}(a95_0x47d9,0x95db1));function a95_0x47d9(){const _0x452263=['read','4516200woXWhB','\x20(see\x20data.result)','data','num','122104aXrIAN','4349058HctFxf','success','4OTMQwC','2359485KlwOCl','object','90oDBKNO','Connection\x20check\x20finished\x20for\x20db\x20link\x20','198149OWPLTz','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','error','slice','3793745HGQvLU','Connection\x20OK\x20for\x20db\x20link\x20','10LYsqYE','530560yCAYrl','keys','length'];a95_0x47d9=function(){return _0x452263;};return a95_0x47d9();}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x281023){const _0x4cb92d=a95_0x3759;if(_0x281023===!![]||_0x281023===![])return{'success':_0x281023};if(_0x281023===null||_0x281023===undefined)return{'type':typeof _0x281023};if(typeof _0x281023!==_0x4cb92d(0x1cc))return{'type':typeof _0x281023};const _0x5b6400=_0x281023,_0x227d2f=[_0x4cb92d(0x1e0),'message','code',_0x4cb92d(0x1d1),'msg',_0x4cb92d(0x1dc)],_0x258db4={};for(const _0xa84ac0 of _0x227d2f){if(_0xa84ac0 in _0x5b6400)_0x258db4[_0xa84ac0]=_0x5b6400[_0xa84ac0];}return Object[_0x4cb92d(0x1d7)](_0x258db4)[_0x4cb92d(0x1d8)]===0x0&&(_0x258db4[_0x4cb92d(0x1d7)]=Object[_0x4cb92d(0x1d7)](_0x5b6400)[_0x4cb92d(0x1d2)](0x0,0x14)),_0x258db4;}function a95_0x3759(_0x510543,_0x3f643e){_0x510543=_0x510543-0x1cc;const _0x47d9bc=a95_0x47d9();let _0x3759ea=_0x47d9bc[_0x510543];return _0x3759ea;}export const dbTest={'service':'db','command':'test','description':a95_0x192aa2(0x1d0),'risk':a95_0x192aa2(0x1d9),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xda27f1){const _0x5d88b9=a95_0x192aa2,_0x4825d4=_0xda27f1[_0x5d88b9(0x1dd)]('id'),_0x551a81=await testDbLinkConnect(_0x4825d4),_0xdb60e7=_0x551a81===!![]||typeof _0x551a81===_0x5d88b9(0x1cc)&&_0x551a81!==null&&_0x551a81[_0x5d88b9(0x1e0)]===!![],_0x47683d=summarizeTestConnectResult(_0x551a81);return{'ok':!![],'data':{'id':_0x4825d4,'connected':Boolean(_0xdb60e7),'result':_0x47683d},'message':_0xdb60e7?_0x5d88b9(0x1d4)+_0x4825d4:_0x5d88b9(0x1ce)+_0x4825d4+_0x5d88b9(0x1db)};}};
@@ -1 +1 @@
1
- const a94_0xdc2d7c=a94_0x2902;function a94_0x2902(_0x6325f0,_0x3f1906){_0x6325f0=_0x6325f0-0x19d;const _0x2974ed=a94_0x2974();let _0x2902f9=_0x2974ed[_0x6325f0];return _0x2902f9;}(function(_0x5ed21e,_0x1c61bb){const _0xb1bc78=a94_0x2902,_0x2304db=_0x5ed21e();while(!![]){try{const _0x354996=-parseInt(_0xb1bc78(0x1ae))/0x1+-parseInt(_0xb1bc78(0x1bf))/0x2+parseInt(_0xb1bc78(0x1c0))/0x3*(parseInt(_0xb1bc78(0x1a6))/0x4)+parseInt(_0xb1bc78(0x1ab))/0x5*(parseInt(_0xb1bc78(0x1b9))/0x6)+-parseInt(_0xb1bc78(0x1b2))/0x7*(parseInt(_0xb1bc78(0x1bb))/0x8)+parseInt(_0xb1bc78(0x1b6))/0x9*(-parseInt(_0xb1bc78(0x1c1))/0xa)+-parseInt(_0xb1bc78(0x1a8))/0xb*(-parseInt(_0xb1bc78(0x1b4))/0xc);if(_0x354996===_0x1c61bb)break;else _0x2304db['push'](_0x2304db['shift']());}catch(_0x42abed){_0x2304db['push'](_0x2304db['shift']());}}}(a94_0x2974,0x4b389));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a94_0x2974(){const _0x1f0328=['dbparam','string','26304MuWpZM','dbParam','675448WDPOzx','dbdesc','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','New\x20username','216306HIVAXm','498nzHDjs','4191270pnbnnB','dbDesc','New\x20host:port','password','dbUrl','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','update','bool','dbname','******','trim','/smartapi/dblink/update','num','dburl','validation','10980sWKhyo','POST','11xINXqk','username','[redacted]','265nTHVlo','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','New\x20connection\x20parameter\x20string','463631AaVCxA','skip-connection-test','has','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','28HMrxEf','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','11384616fmbNwK','str','9igSkwn'];a94_0x2974=function(){return _0x1f0328;};return a94_0x2974();}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_0xdc2d7c(0x1a0),a94_0xdc2d7c(0x1aa)]);function mergeDbLinkUpdate(_0x23d818,_0x51489e){const _0x1716db=a94_0xdc2d7c,_0x35c179={..._0x23d818},_0x5b2c15=_0x51489e[_0x1716db(0x1b5)](_0x1716db(0x1c4));if(_0x5b2c15&&MASKED_PASSWORD_VALUES['has'](_0x5b2c15))throw CliErrors[_0x1716db(0x1a5)](_0x1716db(0x1c6));if(!_0x5b2c15&&MASKED_PASSWORD_VALUES[_0x1716db(0x1b0)](String(_0x23d818[_0x1716db(0x1c4)]??'')))throw CliErrors['validation'](_0x1716db(0x1bd));const _0x421d60=_0x51489e[_0x1716db(0x1b5)](_0x1716db(0x19f));if(_0x421d60)_0x35c179['dbName']=_0x421d60;const _0xcf6a1f=_0x51489e['str'](_0x1716db(0x1a4));if(_0xcf6a1f)_0x35c179[_0x1716db(0x1c5)]=_0xcf6a1f[_0x1716db(0x1a1)]();const _0x52b35f=_0x51489e['str'](_0x1716db(0x1a9));if(_0x52b35f)_0x35c179[_0x1716db(0x1a9)]=_0x52b35f;if(_0x5b2c15)_0x35c179[_0x1716db(0x1c4)]=_0x5b2c15;const _0x220b60=_0x51489e[_0x1716db(0x1b5)](_0x1716db(0x1b7));if(_0x220b60)_0x35c179[_0x1716db(0x1ba)]=_0x220b60;const _0x5dc1c1=_0x51489e[_0x1716db(0x1b5)](_0x1716db(0x1bc));if(_0x5dc1c1)_0x35c179[_0x1716db(0x1c2)]=_0x5dc1c1;return _0x35c179;}export const dbUpdate={'service':'db','command':a94_0xdc2d7c(0x19d),'description':a94_0xdc2d7c(0x1b1),'risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a94_0xdc2d7c(0x19f),'type':a94_0xdc2d7c(0x1b8),'description':'New\x20database\x20name'},{'name':a94_0xdc2d7c(0x1a4),'type':a94_0xdc2d7c(0x1b8),'description':a94_0xdc2d7c(0x1c3)},{'name':a94_0xdc2d7c(0x1a9),'type':'string','description':a94_0xdc2d7c(0x1be)},{'name':'password','type':a94_0xdc2d7c(0x1b8),'description':a94_0xdc2d7c(0x1ac)},{'name':a94_0xdc2d7c(0x1b7),'type':a94_0xdc2d7c(0x1b8),'description':a94_0xdc2d7c(0x1ad)},{'name':a94_0xdc2d7c(0x1bc),'type':a94_0xdc2d7c(0x1b8),'description':'New\x20description'},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x5645d6){const _0x18aab4=a94_0xdc2d7c,_0x5ad0e1=_0x5645d6[_0x18aab4(0x1b5)](_0x18aab4(0x1a4));if(_0x5ad0e1&&!validateDbUrl(_0x5ad0e1[_0x18aab4(0x1a1)]()))throw CliErrors[_0x18aab4(0x1a5)]('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0x5ad0e1+'\x22');},async 'dryRun'(_0x1e83ea){const _0x27a2e2=a94_0xdc2d7c,_0x2c777b=_0x1e83ea[_0x27a2e2(0x1a3)]('id'),_0x457885=await getDbLinkInfo(_0x2c777b),_0x3cea90=mergeDbLinkUpdate(_0x457885,_0x1e83ea),_0x4be92f=sanitizeDbLinkForOutput(_0x3cea90);return{'method':_0x27a2e2(0x1a7),'url':_0x27a2e2(0x1a2),'body':_0x4be92f,'description':_0x27a2e2(0x1b3),'connectionPreflight':{'enabled':!_0x1e83ea[_0x27a2e2(0x19e)](_0x27a2e2(0x1af)),'executed':![]}};},async 'execute'(_0x117db5){const _0x27c93e=a94_0xdc2d7c,_0x1ea4dc=_0x117db5['num']('id'),_0x15d93e=await getDbLinkInfo(_0x1ea4dc),_0x27d3b2=mergeDbLinkUpdate(_0x15d93e,_0x117db5);!_0x117db5[_0x27c93e(0x19e)]('skip-connection-test')&&await assertDbLinkConnectionPreflight(_0x27d3b2);const {id:_0x5ebbc7,entity:_0x5ef8c2}=normalizeEntityWithIdResponse(await updateDbLink(_0x27d3b2));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x5ef8c2),'message':'Updated\x20db\x20link\x20'+(_0x5ebbc7??_0x1ea4dc)};}};
1
+ const a96_0x2fbd10=a96_0x1d18;(function(_0x336bdb,_0x2e1f12){const _0x47edc1=a96_0x1d18,_0x1fdd71=_0x336bdb();while(!![]){try{const _0x10cf6c=-parseInt(_0x47edc1(0x104))/0x1+-parseInt(_0x47edc1(0x119))/0x2+-parseInt(_0x47edc1(0x111))/0x3+parseInt(_0x47edc1(0xfb))/0x4+parseInt(_0x47edc1(0x10c))/0x5*(-parseInt(_0x47edc1(0x116))/0x6)+parseInt(_0x47edc1(0x11a))/0x7+parseInt(_0x47edc1(0x113))/0x8;if(_0x10cf6c===_0x2e1f12)break;else _0x1fdd71['push'](_0x1fdd71['shift']());}catch(_0x3f8428){_0x1fdd71['push'](_0x1fdd71['shift']());}}}(a96_0x51d3,0x4ca69));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a96_0x1d18(_0xce3474,_0x3f5670){_0xce3474=_0xce3474-0xfb;const _0x51d361=a96_0x51d3();let _0x1d188b=_0x51d361[_0xce3474];return _0x1d188b;}function a96_0x51d3(){const _0xae39b7=['8628512HdLxoK','dbName','write','2761644jLViZU','New\x20host:port','dbparam','908578sDEFnh','3060610BsqHrn','dbdesc','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','has','[redacted]','dbParam','New\x20connection\x20parameter\x20string','validation','str','username','2055364XSBCGz','string','New\x20database\x20name','dbUrl','num','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','skip-connection-test','bool','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','387922gFWMVy','New\x20description','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','password','******','dburl','dbDesc','update','5gsoQro','Updated\x20db\x20link\x20','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','trim','1239567UYuwoL','dbname'];a96_0x51d3=function(){return _0xae39b7;};return a96_0x51d3();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a96_0x2fbd10(0x108),a96_0x2fbd10(0x11e)]);function mergeDbLinkUpdate(_0x5874ff,_0x590b3a){const _0x5e5b16=a96_0x2fbd10,_0x1c6432={..._0x5874ff},_0x52607c=_0x590b3a['str'](_0x5e5b16(0x107));if(_0x52607c&&MASKED_PASSWORD_VALUES['has'](_0x52607c))throw CliErrors[_0x5e5b16(0x121)](_0x5e5b16(0x103));if(!_0x52607c&&MASKED_PASSWORD_VALUES[_0x5e5b16(0x11d)](String(_0x5874ff[_0x5e5b16(0x107)]??'')))throw CliErrors[_0x5e5b16(0x121)](_0x5e5b16(0x106));const _0x23e888=_0x590b3a[_0x5e5b16(0x122)](_0x5e5b16(0x112));if(_0x23e888)_0x1c6432[_0x5e5b16(0x114)]=_0x23e888;const _0x5b2860=_0x590b3a['str'](_0x5e5b16(0x109));if(_0x5b2860)_0x1c6432[_0x5e5b16(0xfe)]=_0x5b2860[_0x5e5b16(0x110)]();const _0x5536f5=_0x590b3a['str'](_0x5e5b16(0x123));if(_0x5536f5)_0x1c6432['username']=_0x5536f5;if(_0x52607c)_0x1c6432[_0x5e5b16(0x107)]=_0x52607c;const _0x3a54f1=_0x590b3a[_0x5e5b16(0x122)](_0x5e5b16(0x118));if(_0x3a54f1)_0x1c6432[_0x5e5b16(0x11f)]=_0x3a54f1;const _0x22c82c=_0x590b3a['str'](_0x5e5b16(0x11b));if(_0x22c82c)_0x1c6432[_0x5e5b16(0x10a)]=_0x22c82c;return _0x1c6432;}export const dbUpdate={'service':'db','command':a96_0x2fbd10(0x10b),'description':a96_0x2fbd10(0x10f),'risk':a96_0x2fbd10(0x115),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a96_0x2fbd10(0xfc),'description':a96_0x2fbd10(0xfd)},{'name':'dburl','type':a96_0x2fbd10(0xfc),'description':a96_0x2fbd10(0x117)},{'name':'username','type':'string','description':'New\x20username'},{'name':a96_0x2fbd10(0x107),'type':'string','description':a96_0x2fbd10(0x10e)},{'name':a96_0x2fbd10(0x118),'type':'string','description':a96_0x2fbd10(0x120)},{'name':a96_0x2fbd10(0x11b),'type':a96_0x2fbd10(0xfc),'description':a96_0x2fbd10(0x105)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x9fc16c){const _0x2b07b3=a96_0x2fbd10,_0x446cf0=_0x9fc16c['str']('dburl');if(_0x446cf0&&!validateDbUrl(_0x446cf0[_0x2b07b3(0x110)]()))throw CliErrors[_0x2b07b3(0x121)](_0x2b07b3(0x11c)+_0x446cf0+'\x22');},async 'dryRun'(_0x2d55eb){const _0x407df3=a96_0x2fbd10,_0x48f893=_0x2d55eb[_0x407df3(0xff)]('id'),_0x1258ea=await getDbLinkInfo(_0x48f893),_0x28b7e1=mergeDbLinkUpdate(_0x1258ea,_0x2d55eb),_0x260e46=sanitizeDbLinkForOutput(_0x28b7e1);return{'method':'POST','url':'/smartapi/dblink/update','body':_0x260e46,'description':_0x407df3(0x100),'connectionPreflight':{'enabled':!_0x2d55eb[_0x407df3(0x102)]('skip-connection-test'),'executed':![]}};},async 'execute'(_0x2339eb){const _0x4780a2=a96_0x2fbd10,_0x2740e8=_0x2339eb[_0x4780a2(0xff)]('id'),_0x475b01=await getDbLinkInfo(_0x2740e8),_0x58d642=mergeDbLinkUpdate(_0x475b01,_0x2339eb);!_0x2339eb['bool'](_0x4780a2(0x101))&&await assertDbLinkConnectionPreflight(_0x58d642);const {id:_0x4320d7,entity:_0x1f7df4}=normalizeEntityWithIdResponse(await updateDbLink(_0x58d642));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x1f7df4),'message':_0x4780a2(0x10d)+(_0x4320d7??_0x2740e8)};}};
@@ -0,0 +1,28 @@
1
+ import { type DeploymentSyncItem, type DeploymentSyncType } from "../../core/api-client.js";
2
+ import type { RuntimeContext } from "../../framework/types.js";
3
+ export type AutomaticDeploymentSyncStatus = "not_configured" | "not_needed" | "skipped_primary_failed" | "succeeded" | "partial_failure" | "failed" | "outcome_unknown";
4
+ export interface AutomaticDeploymentSyncResult {
5
+ configured: boolean;
6
+ attempted: boolean;
7
+ status: AutomaticDeploymentSyncStatus;
8
+ bizType: DeploymentSyncType;
9
+ bizCodes: string[];
10
+ dbLinkId?: number;
11
+ targetEnv?: "dev" | "test" | "pre";
12
+ items?: DeploymentSyncItem[];
13
+ recoveryCommand?: string;
14
+ error?: string;
15
+ }
16
+ export interface AutomaticDeploymentSyncPreview {
17
+ configured: boolean;
18
+ wouldAttempt: boolean;
19
+ status: "not_configured" | "not_needed" | "would_sync";
20
+ bizType: DeploymentSyncType;
21
+ bizCodes: string[];
22
+ dbLinkId?: number;
23
+ targetEnv?: "dev" | "test" | "pre";
24
+ }
25
+ export declare function validateAutomaticDeploymentSync(ctx: RuntimeContext): void;
26
+ export declare function buildAutomaticDeploymentSyncPreview(ctx: RuntimeContext, bizType: DeploymentSyncType, rawCodes: string[]): AutomaticDeploymentSyncPreview;
27
+ export declare function runAutomaticDeploymentSync(ctx: RuntimeContext, bizType: DeploymentSyncType, rawCodes: string[], primarySucceeded: boolean): Promise<AutomaticDeploymentSyncResult>;
28
+ export declare function automaticDeploymentSyncSucceeded(result: AutomaticDeploymentSyncResult): boolean;
@@ -0,0 +1 @@
1
+ (function(_0x33ae01,_0x1ca9f6){const _0x327a03=a97_0x2e4a,_0x562925=_0x33ae01();while(!![]){try{const _0x2253ef=parseInt(_0x327a03(0x1d9))/0x1+parseInt(_0x327a03(0x1e9))/0x2*(-parseInt(_0x327a03(0x205))/0x3)+parseInt(_0x327a03(0x1e2))/0x4+parseInt(_0x327a03(0x1f3))/0x5*(-parseInt(_0x327a03(0x1e6))/0x6)+-parseInt(_0x327a03(0x1f1))/0x7*(-parseInt(_0x327a03(0x1d6))/0x8)+parseInt(_0x327a03(0x1e8))/0x9*(parseInt(_0x327a03(0x1fc))/0xa)+parseInt(_0x327a03(0x1f5))/0xb*(-parseInt(_0x327a03(0x1e0))/0xc);if(_0x2253ef===_0x1ca9f6)break;else _0x562925['push'](_0x562925['shift']());}catch(_0x30f8f7){_0x562925['push'](_0x562925['shift']());}}}(a97_0x37ea,0x18af1));import{CLI_BIN_NAME}from'../../constant/cli.js';function a97_0x2e4a(_0x2f7962,_0x599f32){_0x2f7962=_0x2f7962-0x1d4;const _0x37ea19=a97_0x37ea();let _0x2e4a61=_0x37ea19[_0x2f7962];return _0x2e4a61;}import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';import{validateDeploymentSyncProfile}from'../../config/deployment-sync.js';const MAX_SYNC_CODES=0x64;export function validateAutomaticDeploymentSync(_0x11a9e7){const _0x3a399e=resolveRawDeploymentSyncProfile(_0x11a9e7);if(_0x3a399e!==undefined)validateDeploymentSyncProfile(_0x3a399e);}export function buildAutomaticDeploymentSyncPreview(_0x24a5d9,_0x14a8a9,_0xf89eb9){const _0x140b60=a97_0x2e4a,_0x1e043c=resolveRawDeploymentSyncProfile(_0x24a5d9),_0x2b4235=normalizeCodes(_0xf89eb9);if(_0x1e043c===undefined)return{'configured':![],'wouldAttempt':![],'status':'not_configured','bizType':_0x14a8a9,'bizCodes':_0x2b4235};const _0x314d1a=validateDeploymentSyncProfile(_0x1e043c),_0x488142=_0x2b4235[_0x140b60(0x200)]>0x0;return{'configured':!![],'wouldAttempt':_0x488142,'status':_0x488142?_0x140b60(0x204):'not_needed','bizType':_0x14a8a9,'bizCodes':_0x2b4235,'dbLinkId':_0x314d1a[_0x140b60(0x1ea)],'targetEnv':_0x314d1a['targetEnv']};}export async function runAutomaticDeploymentSync(_0x2f7c5a,_0x52f72f,_0x56c333,_0x50e847){const _0x111c19=a97_0x2e4a,_0x464b24=resolveRawDeploymentSyncProfile(_0x2f7c5a),_0x4e94de=normalizeCodes(_0x56c333);if(_0x464b24===undefined)return{'configured':![],'attempted':![],'status':'not_configured','bizType':_0x52f72f,'bizCodes':_0x4e94de};const _0x578bfe=validateDeploymentSyncProfile(_0x464b24),_0x3a4303={'configured':!![],'bizType':_0x52f72f,'bizCodes':_0x4e94de,'dbLinkId':_0x578bfe[_0x111c19(0x1ea)],'targetEnv':_0x578bfe['targetEnv']};if(!_0x50e847)return{..._0x3a4303,'attempted':![],'status':_0x111c19(0x1de)};if(_0x4e94de[_0x111c19(0x200)]===0x0)return{..._0x3a4303,'attempted':![],'status':_0x111c19(0x1dd)};if(_0x4e94de[_0x111c19(0x200)]>MAX_SYNC_CODES)return{..._0x3a4303,'attempted':![],'status':_0x111c19(0x1e3),'error':_0x111c19(0x1fe)+MAX_SYNC_CODES+_0x111c19(0x1f9)};try{const {items:_0x44fc16}=await syncDeploymentMetadata({'appCode':_0x2f7c5a['appCode'],'dbLinkId':_0x578bfe[_0x111c19(0x1ea)],'env':_0x578bfe[_0x111c19(0x1f7)],'bizType':_0x52f72f,'bizCodes':_0x4e94de}),_0x3028dc=_0x44fc16[_0x111c19(0x1fa)](_0x1bee44=>_0x1bee44[_0x111c19(0x1d8)]==='FAILED'),_0x11bbc0=new Set(_0x44fc16['filter'](_0x3179fc=>_0x3179fc[_0x111c19(0x1d8)]==='FAILED')['map'](_0x42f832=>_0x42f832[_0x111c19(0x1fb)])),_0x233d4b=_0x4e94de['filter'](_0x408898=>_0x11bbc0[_0x111c19(0x1ef)](_0x408898));return{..._0x3a4303,'attempted':!![],'status':_0x3028dc?_0x111c19(0x1f8):_0x111c19(0x1da),'items':_0x44fc16,..._0x3028dc&&_0x233d4b[_0x111c19(0x200)]>0x0?{'recoveryCommand':buildRecoveryCommand(_0x2f7c5a['appCode'],_0x578bfe[_0x111c19(0x1ea)],_0x578bfe[_0x111c19(0x1f7)],_0x52f72f,_0x233d4b)}:{}};}catch(_0x1a9ec5){return{..._0x3a4303,'attempted':!![],'status':isPlatformTransportFailure(_0x1a9ec5)?'outcome_unknown':_0x111c19(0x1e3),'recoveryCommand':buildRecoveryCommand(_0x2f7c5a[_0x111c19(0x1f6)],_0x578bfe[_0x111c19(0x1ea)],_0x578bfe[_0x111c19(0x1f7)],_0x52f72f,_0x4e94de),'error':_0x1a9ec5 instanceof Error?_0x1a9ec5[_0x111c19(0x1df)]:String(_0x1a9ec5)};}}function normalizeCodes(_0x7dab9){const _0x5beae4=a97_0x2e4a;return[...new Set(_0x7dab9[_0x5beae4(0x1d5)](_0x10c147=>_0x10c147[_0x5beae4(0x1e1)]())[_0x5beae4(0x201)](Boolean))];}export function automaticDeploymentSyncSucceeded(_0xee8de4){const _0x3dc703=a97_0x2e4a;return!_0xee8de4[_0x3dc703(0x1dc)]||_0xee8de4[_0x3dc703(0x1ec)]===_0x3dc703(0x1dd)||_0xee8de4['status']===_0x3dc703(0x1de)||_0xee8de4[_0x3dc703(0x1ec)]==='succeeded';}function resolveRawDeploymentSyncProfile(_0x49b821){const _0x18b1bf=a97_0x2e4a,_0x144d24=_0x49b821[_0x18b1bf(0x1f2)]?.[_0x18b1bf(0x1ee)]??{},_0x2fdb91=_0x49b821[_0x18b1bf(0x1e4)]||_0x49b821[_0x18b1bf(0x1f2)]?.[_0x18b1bf(0x1db)]||_0x49b821[_0x18b1bf(0x1f2)]?.[_0x18b1bf(0x1e7)];if(_0x2fdb91&&_0x144d24[_0x2fdb91]?.['appcode']===_0x49b821['appCode'])return _0x144d24[_0x2fdb91]?.[_0x18b1bf(0x202)];const _0x3998c5=Object[_0x18b1bf(0x1d7)](_0x144d24)[_0x18b1bf(0x203)](_0xa200d8=>_0xa200d8?.[_0x18b1bf(0x1f4)]===_0x49b821[_0x18b1bf(0x1f6)]);return _0x3998c5?.['deploymentSync'];}function buildRecoveryCommand(_0x17ddac,_0x4e023a,_0x3d01c9,_0x443828,_0x1d3ad8){const _0x3e6f9b=a97_0x2e4a;return[CLI_BIN_NAME,_0x3e6f9b(0x206),'sync',_0x3e6f9b(0x1f0),shellArg(_0x17ddac),'--db-id',String(_0x4e023a),_0x3e6f9b(0x1ed),shellArg(_0x3d01c9),_0x3e6f9b(0x1e5),shellArg(_0x443828),_0x3e6f9b(0x1ff),shellArg(_0x1d3ad8[_0x3e6f9b(0x1d4)](',')),'--confirm'][_0x3e6f9b(0x1d4)]('\x20');}function shellArg(_0x3ea04d){const _0xc25e7=a97_0x2e4a;return/^[A-Za-z0-9._:/,-]+$/[_0xc25e7(0x1eb)](_0x3ea04d)?_0x3ea04d:'\x27'+_0x3ea04d[_0xc25e7(0x1fd)](/'/g,'\x27\x5c\x27\x27')+'\x27';}function a97_0x37ea(){const _0xd8bbbf=['find','would_sync','597UxCfUY','deployment','join','map','8qtMRNR','values','action','184711hmciez','succeeded','currentApp','configured','not_needed','skipped_primary_failed','message','2685588QGfaoY','trim','661216XiweyQ','failed','selectedAppName','--type','328254QHrwhn','defaultApp','1341kMSMMd','248WXYkWm','dbLinkId','test','status','--target-env','apps','has','--appcode','489615ORjine','mergedCli','10nsHTJf','appcode','11CANVul','appCode','targetEnv','partial_failure','\x20codes;\x20run\x20deployment\x20sync\x20manually\x20in\x20batches.','some','bizCode','2620lXOhYq','replace','Automatic\x20deployment\x20sync\x20supports\x20at\x20most\x20','--codes','length','filter','deploymentSync'];a97_0x37ea=function(){return _0xd8bbbf;};return a97_0x37ea();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const deploymentDefinitions: CommandDefinition[];
@@ -0,0 +1 @@
1
+ function a98_0x311d(_0x271d30,_0x48473b){_0x271d30=_0x271d30-0x134;const _0x36d347=a98_0x36d3();let _0x311dc3=_0x36d347[_0x271d30];return _0x311dc3;}(function(_0x1a36ad,_0x617067){const _0x2be7a0=a98_0x311d,_0xc233be=_0x1a36ad();while(!![]){try{const _0x2e04c9=parseInt(_0x2be7a0(0x13c))/0x1*(-parseInt(_0x2be7a0(0x13d))/0x2)+-parseInt(_0x2be7a0(0x136))/0x3*(parseInt(_0x2be7a0(0x13a))/0x4)+parseInt(_0x2be7a0(0x134))/0x5*(parseInt(_0x2be7a0(0x13e))/0x6)+parseInt(_0x2be7a0(0x139))/0x7+-parseInt(_0x2be7a0(0x135))/0x8+parseInt(_0x2be7a0(0x138))/0x9*(parseInt(_0x2be7a0(0x137))/0xa)+-parseInt(_0x2be7a0(0x13b))/0xb;if(_0x2e04c9===_0x617067)break;else _0xc233be['push'](_0xc233be['shift']());}catch(_0x2a495e){_0xc233be['push'](_0xc233be['shift']());}}}(a98_0x36d3,0x94083));import{deploymentSync}from'../../commands/deployment/sync.js';export const deploymentDefinitions=[deploymentSync];function a98_0x36d3(){const _0x4af7db=['190BiqlyY','542187iwRIio','5994317ipQizI','4cnCSEc','6857510lqHMrw','223103fYmaAs','4XZfHDq','3930cngogj','1925geAhto','1647528XpNoZw','1113681zCgqDI'];a98_0x36d3=function(){return _0x4af7db;};return a98_0x36d3();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const deploymentSync: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a99_0x35902a=a99_0x359f;(function(_0x30ea5f,_0x607a1c){const _0x5a427f=a99_0x359f,_0x2a184c=_0x30ea5f();while(!![]){try{const _0x502c03=parseInt(_0x5a427f(0x1aa))/0x1*(-parseInt(_0x5a427f(0x1a6))/0x2)+-parseInt(_0x5a427f(0x1a7))/0x3*(parseInt(_0x5a427f(0x1ba))/0x4)+-parseInt(_0x5a427f(0x1ad))/0x5*(-parseInt(_0x5a427f(0x1b7))/0x6)+-parseInt(_0x5a427f(0x1a9))/0x7+-parseInt(_0x5a427f(0x1a1))/0x8*(parseInt(_0x5a427f(0x193))/0x9)+parseInt(_0x5a427f(0x18c))/0xa*(parseInt(_0x5a427f(0x1a5))/0xb)+parseInt(_0x5a427f(0x184))/0xc;if(_0x502c03===_0x607a1c)break;else _0x2a184c['push'](_0x2a184c['shift']());}catch(_0x2e6069){_0x2a184c['push'](_0x2a184c['shift']());}}}(a99_0x2c55,0x1ecaa));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';const SYNC_PATH=a99_0x35902a(0x17e),TARGET_ENVS=[a99_0x35902a(0x18f),a99_0x35902a(0x18b),a99_0x35902a(0x191),a99_0x35902a(0x16d)],SYNC_TYPES=[a99_0x35902a(0x17d),a99_0x35902a(0x18a),'sql'],DB_ID_FLAG={'name':a99_0x35902a(0x17f),'type':a99_0x35902a(0x173),'required':!![],'description':a99_0x35902a(0x194)},TARGET_ENV_FLAG={'name':a99_0x35902a(0x1b5),'type':a99_0x35902a(0x1b0),'enum':[...TARGET_ENVS],'description':a99_0x35902a(0x192)},DIRECT_FLAG={'name':a99_0x35902a(0x170),'type':a99_0x35902a(0x19f),'description':a99_0x35902a(0x17b)},TYPE_FLAG={'name':a99_0x35902a(0x17c),'type':a99_0x35902a(0x1b0),'required':!![],'enum':[...SYNC_TYPES],'description':a99_0x35902a(0x19a)},CODES_FLAG={'name':a99_0x35902a(0x175),'type':a99_0x35902a(0x1b0),'required':!![],'description':a99_0x35902a(0x1b8)},CONFIRM_FLAG={'name':a99_0x35902a(0x16e),'type':a99_0x35902a(0x19f),'description':a99_0x35902a(0x18d)};function a99_0x2c55(){const _0x1ea5a2=['Synchronize\x20selected\x20development\x20metadata\x20into\x20one\x20deployment\x20database\x20connection.','bff','test','30iUvIbV','Confirm\x20the\x20target\x20connection\x20and\x20metadata\x20codes','--codes\x20must\x20contain\x20at\x20least\x20one\x20non-blank\x20code.','dev','bizCodes','pre','Deployment\x20target\x20selected\x20by\x20the\x20server-side\x20environment\x20mapping','19017ofWwDq','Base\x20dblink\x20ID\x20for\x20direct\x20or\x20server-side\x20environment-mapped\x20deployment\x20sync','deployment_sync_outcome_unknown','succeeded','\x20item(s).','POST','FAILED','Metadata\x20type\x20to\x20synchronize','action','filter','deployment_sync_partial_failure','bool','boolean','str','24AMWalh','num','includes','--target-env\x20must\x20be\x20one\x20of:\x20','532807jVwrLU','262Jwrdkx','3NoWLOe','appCode','868189ZZrxns','1171WTViFl','Synchronize\x20selected\x20development\x20metadata\x20to\x20a\x20deployment\x20database','--type\x20must\x20be\x20one\x20of:\x20','19535bnBJMe','input','unknown','string','CREATED','Run\x20with\x20--dry-run\x20first,\x20verify\x20the\x20target\x20and\x20codes,\x20then\x20add\x20--confirm.','Choose\x20exactly\x20one\x20target\x20mode:\x20--target-env\x20or\x20--direct.','bizType','target-env','partial_failure','336VSygEV','Comma-separated\x20Dataset,\x20Backend\x20Function,\x20or\x20SQL\x20codes\x20(maximum\x20100)','deployment_metadata_sync','226360BVtHYK','target_read_api_unavailable','\x20failed\x20item(s).','Dataset\x20sync\x20may\x20commit\x20the\x20target\x20dblink\x20before\x20item\x20synchronization;\x20that\x20dblink\x20change\x20is\x20not\x20rolled\x20back\x20when\x20later\x20items\x20fail.','prod','confirm','deployment','direct','data','Deployment\x20sync\x20completed\x20with\x20','number','UPDATED','codes','trim','reduce','defineProperty','not_submitted','--db-id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Use\x20the\x20base\x20dblink\x20connection\x20directly,\x20without\x20environment\x20mapping','type','dataset','/smartapi/data-sync/sync','db-id','Target\x20state\x20is\x20not\x20read\x20back\x20because\x20no\x20target\x20metadata\x20read\x20API\x20is\x20available.','join','Deployment\x20sync\x20response\x20was\x20unavailable;\x20the\x20target\x20outcome\x20is\x20unknown.','length','1228512PHNoEU','validation','\x20deployment\x20metadata\x20item(s).','write','sync'];a99_0x2c55=function(){return _0x1ea5a2;};return a99_0x2c55();}function a99_0x359f(_0x2a11a7,_0x49ad20){_0x2a11a7=_0x2a11a7-0x16a;const _0x2c556c=a99_0x2c55();let _0x359f83=_0x2c556c[_0x2a11a7];return _0x359f83;}export const deploymentSync={'service':a99_0x35902a(0x16f),'command':a99_0x35902a(0x188),'description':a99_0x35902a(0x1ab),'risk':a99_0x35902a(0x187),'structuredErrors':!![],'confirmationDescription':a99_0x35902a(0x189),'flags':[DB_ID_FLAG,TARGET_ENV_FLAG,DIRECT_FLAG,TYPE_FLAG,CODES_FLAG,CONFIRM_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54722f){buildSyncPlan(_0x54722f);},async 'dryRun'(_0x51eff4){const _0x40fb55=a99_0x35902a,_0x218e0d=buildSyncPlan(_0x51eff4);return asDryRunResult(buildOutput(_0x218e0d,[],!![],_0x40fb55(0x179)),{'method':_0x40fb55(0x198),'url':SYNC_PATH,'description':'Would\x20synchronize\x20'+_0x218e0d['input'][_0x40fb55(0x190)][_0x40fb55(0x183)]+'\x20'+_0x218e0d[_0x40fb55(0x1ae)][_0x40fb55(0x1b4)]+_0x40fb55(0x197)});},async 'execute'(_0x2bc5a5){const _0x45f4bf=a99_0x35902a,_0x797342=buildSyncPlan(_0x2bc5a5);if(!_0x2bc5a5[_0x45f4bf(0x19e)]('confirm'))throw CliErrors['validation']('--confirm\x20is\x20required\x20to\x20synchronize\x20deployment\x20metadata.',_0x45f4bf(0x1b2));let _0x298d52;try{_0x298d52=(await syncDeploymentMetadata(_0x797342[_0x45f4bf(0x1ae)]))['items'];}catch(_0x408dca){if(!isPlatformTransportFailure(_0x408dca))throw _0x408dca;const _0x2e2758=new CliError(_0x45f4bf(0x195),0x2,_0x45f4bf(0x182),'Inspect\x20the\x20target\x20database\x20before\x20retrying.\x20Do\x20not\x20resubmit\x20automatically.');attachErrorData(_0x2e2758,buildOutput(_0x797342,[],![],_0x45f4bf(0x1af)));throw _0x2e2758;}const _0x6bddc7=_0x298d52[_0x45f4bf(0x19c)](_0x35ea89=>_0x35ea89[_0x45f4bf(0x19b)]===_0x45f4bf(0x199)),_0x5d4032=_0x6bddc7[_0x45f4bf(0x183)]>0x0?_0x45f4bf(0x1b6):_0x45f4bf(0x196),_0x4fe553=buildOutput(_0x797342,_0x298d52,![],_0x5d4032);if(_0x6bddc7[_0x45f4bf(0x183)]>0x0){const _0x1aa7dc=new CliError(_0x45f4bf(0x19d),0x1,_0x45f4bf(0x172)+_0x6bddc7[_0x45f4bf(0x183)]+'/'+_0x298d52[_0x45f4bf(0x183)]+_0x45f4bf(0x16b),'Review\x20data.items\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20before\x20deciding\x20whether\x20to\x20retry\x20failed\x20codes.');attachErrorData(_0x1aa7dc,_0x4fe553);throw _0x1aa7dc;}return{'ok':!![],'data':_0x4fe553,'message':'Synchronized\x20'+_0x298d52[_0x45f4bf(0x183)]+_0x45f4bf(0x186)};}};function buildSyncPlan(_0x12f39b){const _0x3bbeb8=a99_0x35902a,_0x573716=_0x12f39b[_0x3bbeb8(0x1a2)]('db-id');if(!Number['isSafeInteger'](_0x573716)||_0x573716<=0x0)throw CliErrors['validation'](_0x3bbeb8(0x17a));const _0x476c25=_0x12f39b[_0x3bbeb8(0x1a0)](_0x3bbeb8(0x1b5))[_0x3bbeb8(0x176)](),_0x30716f=_0x12f39b[_0x3bbeb8(0x19e)](_0x3bbeb8(0x170));if(Boolean(_0x476c25)===_0x30716f)throw CliErrors[_0x3bbeb8(0x185)](_0x3bbeb8(0x1b3));if(_0x476c25&&!TARGET_ENVS[_0x3bbeb8(0x1a3)](_0x476c25))throw CliErrors[_0x3bbeb8(0x185)](_0x3bbeb8(0x1a4)+TARGET_ENVS[_0x3bbeb8(0x181)](',\x20')+'.');const _0x1a1aae=_0x12f39b[_0x3bbeb8(0x1a0)](_0x3bbeb8(0x17c))[_0x3bbeb8(0x176)]();if(!SYNC_TYPES[_0x3bbeb8(0x1a3)](_0x1a1aae))throw CliErrors[_0x3bbeb8(0x185)](_0x3bbeb8(0x1ac)+SYNC_TYPES[_0x3bbeb8(0x181)](',\x20')+'.');const _0x5a82a5=normalizeCodes(_0x12f39b[_0x3bbeb8(0x1a0)](_0x3bbeb8(0x175)));if(_0x5a82a5[_0x3bbeb8(0x183)]===0x0)throw CliErrors[_0x3bbeb8(0x185)](_0x3bbeb8(0x18e));if(_0x5a82a5['length']>0x64)throw CliErrors[_0x3bbeb8(0x185)]('--codes\x20supports\x20at\x20most\x20100\x20unique\x20codes.');const _0x4d4dbc={'appCode':_0x12f39b[_0x3bbeb8(0x1a8)],'dbLinkId':_0x573716,..._0x476c25?{'env':_0x476c25}:{},'bizType':_0x1a1aae,'bizCodes':_0x5a82a5},_0x2a4932=[_0x3bbeb8(0x180),'Do\x20not\x20retry\x20automatically\x20when\x20the\x20request\x20outcome\x20is\x20unknown.'];return _0x1a1aae===_0x3bbeb8(0x17d)&&_0x2a4932['unshift'](_0x3bbeb8(0x16c)),{'input':_0x4d4dbc,'selector':{'appCode':_0x12f39b[_0x3bbeb8(0x1a8)],'dbLinkId':_0x573716,'targetMode':_0x476c25?'environment':_0x3bbeb8(0x170),..._0x476c25?{'targetEnv':_0x476c25}:{},'bizType':_0x1a1aae,'bizCodes':_0x5a82a5},'warnings':_0x2a4932};}function normalizeCodes(_0xb559d2){const _0x579e3f=a99_0x35902a;return[...new Set(_0xb559d2['split'](',')['map'](_0x4b9a50=>_0x4b9a50[_0x579e3f(0x176)]())['filter'](Boolean))];}function buildOutput(_0x37abe3,_0x5e2f12,_0x564bc3,_0x2a3616){const _0x361f87=a99_0x35902a,_0xf15db2=_0x2a3616===_0x361f87(0x196)||_0x2a3616===_0x361f87(0x1b6),_0x1845af=_0x5e2f12[_0x361f87(0x177)]((_0x244b29,_0x4bb379)=>{const _0x12c17c=_0x361f87;return _0x244b29[_0x4bb379[_0x12c17c(0x19b)]]=(_0x244b29[_0x4bb379['action']]??0x0)+0x1,_0x244b29;},{});return{'operation':_0x361f87(0x1b9),'selector':_0x37abe3['selector'],'before':null,'after':null,'dryRun':_0x564bc3,'backend':{'submitted':_0x2a3616!==_0x361f87(0x179),'method':_0x361f87(0x198),'path':SYNC_PATH,'outcome':_0x2a3616,'body':_0x37abe3[_0x361f87(0x1ae)]},'summary':{'requested':_0x37abe3[_0x361f87(0x1ae)][_0x361f87(0x190)][_0x361f87(0x183)],'total':_0xf15db2?_0x5e2f12[_0x361f87(0x183)]:_0x37abe3[_0x361f87(0x1ae)][_0x361f87(0x190)]['length'],'created':_0x5e2f12[_0x361f87(0x19c)](_0x4b96c7=>_0x4b96c7['action']===_0x361f87(0x1b1))[_0x361f87(0x183)],'updated':_0x5e2f12[_0x361f87(0x19c)](_0x30d4ba=>_0x30d4ba[_0x361f87(0x19b)]===_0x361f87(0x174))[_0x361f87(0x183)],'failed':_0x5e2f12[_0x361f87(0x19c)](_0xf8c021=>_0xf8c021[_0x361f87(0x19b)]===_0x361f87(0x199))[_0x361f87(0x183)],'byAction':_0x1845af},'items':_0x5e2f12,'verification':{'performed':![],'reason':_0x361f87(0x16a)},'warnings':_0x37abe3['warnings']};}function attachErrorData(_0x3c398f,_0x256a9a){const _0x54c80e=a99_0x35902a;Object[_0x54c80e(0x178)](_0x3c398f,_0x54c80e(0x171),{'value':_0x256a9a,'enumerable':!![]});}