@lovrabet/rabetbase-cli 2.5.1-beta.1 → 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 (316) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-restore.d.ts +107 -0
  66. package/lib/commands/dataset/field-restore.js +1 -0
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/dataset/user-deleted-field-list.d.ts +36 -0
  81. package/lib/commands/dataset/user-deleted-field-list.js +1 -0
  82. package/lib/commands/db/analysis-batching.js +1 -1
  83. package/lib/commands/db/analyze-batch-plan.js +1 -1
  84. package/lib/commands/db/analyze-cancel.js +1 -1
  85. package/lib/commands/db/analyze-start.js +1 -1
  86. package/lib/commands/db/analyze-status.js +1 -1
  87. package/lib/commands/db/create.js +1 -1
  88. package/lib/commands/db/delete.js +1 -1
  89. package/lib/commands/db/detail.js +1 -1
  90. package/lib/commands/db/diff-refresh-start.js +1 -1
  91. package/lib/commands/db/diff-refresh-status.js +1 -1
  92. package/lib/commands/db/diff.js +1 -1
  93. package/lib/commands/db/index.js +1 -1
  94. package/lib/commands/db/list.js +1 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/table-diff-shared.js +1 -1
  97. package/lib/commands/db/tables.js +1 -1
  98. package/lib/commands/db/test.js +1 -1
  99. package/lib/commands/db/update.js +1 -1
  100. package/lib/commands/deployment/auto-sync.d.ts +28 -0
  101. package/lib/commands/deployment/auto-sync.js +1 -0
  102. package/lib/commands/deployment/index.d.ts +2 -0
  103. package/lib/commands/deployment/index.js +1 -0
  104. package/lib/commands/deployment/sync.d.ts +2 -0
  105. package/lib/commands/deployment/sync.js +1 -0
  106. package/lib/commands/doctor.js +1 -1
  107. package/lib/commands/file/index.js +1 -1
  108. package/lib/commands/issue/index.js +1 -1
  109. package/lib/commands/issue/nudge.js +1 -1
  110. package/lib/commands/issue/report.js +1 -1
  111. package/lib/commands/issue/shared.js +1 -1
  112. package/lib/commands/kb/create.js +1 -1
  113. package/lib/commands/kb/delete.js +1 -1
  114. package/lib/commands/kb/detail.js +1 -1
  115. package/lib/commands/kb/index.js +1 -1
  116. package/lib/commands/kb/list.js +1 -1
  117. package/lib/commands/kb/search.js +1 -1
  118. package/lib/commands/kb/shared.js +1 -1
  119. package/lib/commands/kb/update.js +1 -1
  120. package/lib/commands/logs/index.js +1 -1
  121. package/lib/commands/menu/asset-update.js +1 -1
  122. package/lib/commands/menu/delete.js +1 -1
  123. package/lib/commands/menu/external-link-create.js +1 -1
  124. package/lib/commands/menu/external-link-update.js +1 -1
  125. package/lib/commands/menu/group-create.js +1 -1
  126. package/lib/commands/menu/group-update.js +1 -1
  127. package/lib/commands/menu/index.js +1 -1
  128. package/lib/commands/menu/list.js +1 -1
  129. package/lib/commands/menu/move.js +1 -1
  130. package/lib/commands/menu/regroup-start.js +1 -1
  131. package/lib/commands/menu/rename.js +1 -1
  132. package/lib/commands/menu/shared/compare-table.js +1 -1
  133. package/lib/commands/menu/shared/delete-plan.js +1 -1
  134. package/lib/commands/menu/shared/facts.js +1 -1
  135. package/lib/commands/menu/shared/index.js +1 -1
  136. package/lib/commands/menu/shared/inquirer.js +1 -1
  137. package/lib/commands/menu/shared/local-pages.js +1 -1
  138. package/lib/commands/menu/shared/logic.js +1 -1
  139. package/lib/commands/menu/shared/mutations.js +1 -1
  140. package/lib/commands/menu/shared/service.js +1 -1
  141. package/lib/commands/menu/shared/sync-core.js +1 -1
  142. package/lib/commands/menu/shared/update-core.js +1 -1
  143. package/lib/commands/menu/shared/valid-url.js +1 -1
  144. package/lib/commands/menu/sync.js +1 -1
  145. package/lib/commands/menu/visibility-update.js +1 -1
  146. package/lib/commands/notification/config-create.js +1 -1
  147. package/lib/commands/notification/config-delete.js +1 -1
  148. package/lib/commands/notification/config-list.js +1 -1
  149. package/lib/commands/notification/config-update.js +1 -1
  150. package/lib/commands/notification/index.js +1 -1
  151. package/lib/commands/notification/shared.js +1 -1
  152. package/lib/commands/ocr/index.js +1 -1
  153. package/lib/commands/page/create.js +1 -1
  154. package/lib/commands/page/custom/detail.js +1 -1
  155. package/lib/commands/page/custom/list.js +1 -1
  156. package/lib/commands/page/custom/publish.js +1 -1
  157. package/lib/commands/page/custom/shared.js +1 -1
  158. package/lib/commands/page/custom/syntax.js +1 -1
  159. package/lib/commands/page/custom/template.js +1 -1
  160. package/lib/commands/page/custom/update.js +1 -1
  161. package/lib/commands/page/data-list-status.js +1 -1
  162. package/lib/commands/page/generate-start.js +1 -1
  163. package/lib/commands/page/generate-status.js +1 -1
  164. package/lib/commands/page/index.js +1 -1
  165. package/lib/commands/page/pull.js +1 -1
  166. package/lib/commands/page/push.js +1 -1
  167. package/lib/commands/page/relation-audit.js +1 -1
  168. package/lib/commands/page/restore.js +1 -1
  169. package/lib/commands/page/shared.js +1 -1
  170. package/lib/commands/page/sync.js +1 -1
  171. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  172. package/lib/commands/project/create/format-elapsed.js +1 -1
  173. package/lib/commands/project/create/main.js +1 -1
  174. package/lib/commands/project/create/materialize-project-template.js +1 -1
  175. package/lib/commands/project/create/project-name.js +1 -1
  176. package/lib/commands/project/create/project-template-archive.js +1 -1
  177. package/lib/commands/project/create/project-template-path.js +1 -1
  178. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  179. package/lib/commands/project/create/use-format-code.js +1 -1
  180. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  181. package/lib/commands/project/index.js +1 -1
  182. package/lib/commands/project/upgrade.js +1 -1
  183. package/lib/commands/registry.js +1 -1
  184. package/lib/commands/role/delete.js +1 -1
  185. package/lib/commands/role/detail.js +1 -1
  186. package/lib/commands/role/index.js +1 -1
  187. package/lib/commands/role/list.js +1 -1
  188. package/lib/commands/role/shared.js +1 -1
  189. package/lib/commands/role/update.js +1 -1
  190. package/lib/commands/role/user-add.js +1 -1
  191. package/lib/commands/role/user-remove.js +1 -1
  192. package/lib/commands/role/user-resolve.js +1 -1
  193. package/lib/commands/run/index.js +1 -1
  194. package/lib/commands/schema.js +1 -1
  195. package/lib/commands/sql/create.js +1 -1
  196. package/lib/commands/sql/delete.js +1 -1
  197. package/lib/commands/sql/detail.js +1 -1
  198. package/lib/commands/sql/exec.js +1 -1
  199. package/lib/commands/sql/index.js +1 -1
  200. package/lib/commands/sql/list.js +1 -1
  201. package/lib/commands/sql/pull.js +1 -1
  202. package/lib/commands/sql/push.js +1 -1
  203. package/lib/commands/sql/shared.js +1 -1
  204. package/lib/commands/sql/status.js +1 -1
  205. package/lib/commands/sql/validate.js +1 -1
  206. package/lib/commands/task/index.js +1 -1
  207. package/lib/commands/task/status.js +1 -1
  208. package/lib/commands/tenant/index.js +1 -1
  209. package/lib/commands/tenant/members-list.js +1 -1
  210. package/lib/commands/tenant/shared.js +1 -1
  211. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  212. package/lib/commands/user-account/index.js +1 -1
  213. package/lib/commands/workspace/add.js +1 -1
  214. package/lib/commands/workspace/index.js +1 -1
  215. package/lib/commands/workspace/remove.js +1 -1
  216. package/lib/config/deployment-sync.d.ts +10 -0
  217. package/lib/config/deployment-sync.js +1 -0
  218. package/lib/config/domain-config.js +1 -1
  219. package/lib/config/project-routing.js +1 -1
  220. package/lib/config/schema.js +1 -1
  221. package/lib/constant/cdn.js +1 -1
  222. package/lib/constant/cli.js +1 -1
  223. package/lib/constant/defaults.js +1 -1
  224. package/lib/constant/domain.js +1 -1
  225. package/lib/constant/env.js +1 -1
  226. package/lib/constant/output.js +1 -1
  227. package/lib/constant/paths.js +1 -1
  228. package/lib/constant/region.js +1 -1
  229. package/lib/constant/risk.js +1 -1
  230. package/lib/constant/routing-profile.js +1 -1
  231. package/lib/context/app-resolver.d.ts +2 -0
  232. package/lib/context/app-resolver.js +1 -1
  233. package/lib/context/auth-resolver.js +1 -1
  234. package/lib/context/config-loader.js +1 -1
  235. package/lib/context.js +1 -1
  236. package/lib/core/alias-resolver.js +1 -1
  237. package/lib/core/api-client.d.ts +35 -0
  238. package/lib/core/api-client.js +1 -1
  239. package/lib/core/bff/config.js +1 -1
  240. package/lib/core/bff/file-system.js +1 -1
  241. package/lib/core/bff/hash.js +1 -1
  242. package/lib/core/bff/lock.js +1 -1
  243. package/lib/core/bff/utils.js +1 -1
  244. package/lib/core/db-resolver.js +1 -1
  245. package/lib/core/page/file-system.js +1 -1
  246. package/lib/core/page/hash.js +1 -1
  247. package/lib/core/page/lock.js +1 -1
  248. package/lib/core/sql-index-auditor.js +1 -1
  249. package/lib/core/sql-sync/config.js +1 -1
  250. package/lib/core/sql-sync/file-system.js +1 -1
  251. package/lib/core/sql-sync/hash.js +1 -1
  252. package/lib/core/sql-sync/lock.js +1 -1
  253. package/lib/core/sql-sync/utils.js +1 -1
  254. package/lib/core/sql-validator.js +1 -1
  255. package/lib/errors.js +1 -1
  256. package/lib/framework/build-all-flags.js +1 -1
  257. package/lib/framework/error-output.js +1 -1
  258. package/lib/framework/explicit-yes.js +1 -1
  259. package/lib/framework/flags.js +1 -1
  260. package/lib/framework/help.js +1 -1
  261. package/lib/framework/index.js +1 -1
  262. package/lib/framework/output.js +1 -1
  263. package/lib/framework/response.js +1 -1
  264. package/lib/framework/runner-alias.js +1 -1
  265. package/lib/framework/runner.js +1 -1
  266. package/lib/framework/schema-export.js +1 -1
  267. package/lib/framework/types.d.ts +4 -0
  268. package/lib/framework/types.js +1 -1
  269. package/lib/generated/build-info.d.ts +4 -4
  270. package/lib/generated/build-info.js +1 -1
  271. package/lib/help.js +1 -1
  272. package/lib/postinstall.js +1 -1
  273. package/lib/runtime/confirmation.js +1 -1
  274. package/lib/runtime/event.js +1 -1
  275. package/lib/runtime/index.js +1 -1
  276. package/lib/runtime/queue.js +1 -1
  277. package/lib/runtime/resolve.js +1 -1
  278. package/lib/skills/builtin-skill.js +1 -1
  279. package/lib/skills/main.js +1 -1
  280. package/lib/skills/npx-skills-add.js +1 -1
  281. package/lib/skills/skill-presence.js +1 -1
  282. package/lib/telemetry/cli-command-trace.js +1 -1
  283. package/lib/telemetry/cli-help-trace.js +1 -1
  284. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  285. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  286. package/lib/telemetry/send-cli-trace-log.js +1 -1
  287. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  288. package/lib/utils/ai_config.js +1 -1
  289. package/lib/utils/apply-jq-filter.js +1 -1
  290. package/lib/utils/cdn-config.js +1 -1
  291. package/lib/utils/check-sdk-version.js +1 -1
  292. package/lib/utils/cli-version-check.js +1 -1
  293. package/lib/utils/cli-version-policy.js +1 -1
  294. package/lib/utils/config.js +1 -1
  295. package/lib/utils/entity-with-id.js +1 -1
  296. package/lib/utils/file-utils.js +1 -1
  297. package/lib/utils/guides-cdn.js +1 -1
  298. package/lib/utils/http-client.js +1 -1
  299. package/lib/utils/is-non-interactive.js +1 -1
  300. package/lib/utils/logger.js +1 -1
  301. package/lib/utils/params.js +1 -1
  302. package/lib/utils/platform.js +1 -1
  303. package/lib/utils/sleep.js +1 -1
  304. package/lib/utils/template-replacer.js +1 -1
  305. package/lib/utils/update-notice.js +1 -1
  306. package/lib/utils/version.js +1 -1
  307. package/lib/utils/with-active-cookie.js +1 -1
  308. package/lib/utils/write-cli-side-channel.js +1 -1
  309. package/package.json +1 -1
  310. package/skills/rabetbase/SKILL.md +11 -5
  311. package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +9 -9
  312. package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +1 -1
  313. package/skills/rabetbase/references/rabetbase-dataset-field-restore.md +59 -0
  314. package/skills/rabetbase/references/rabetbase-dataset-user-deleted-field-list.md +47 -0
  315. package/skills/rabetbase/references/rabetbase-deployment-sync.md +92 -0
  316. package/skills/rabetbase.manifest.json +6 -3
@@ -1 +1 @@
1
- function a81_0x30f4(){const _0x3480bf=['isFinite','object','1424396KTwFRW','accumulatedErrorTypeCounts','Analysis\x20status\x20for\x20','FULL','plan','PARTIAL_SUCCESS','parse','length','1110594bYdanz','tableNames','keys','number','endTime','TARGETED','firstStartTime','CANCELLED','has','isNaN','inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.','appCode','trim','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','string','RETRYING','3974598cqwubq','363817AswKeB','str','1764460cWptLO','analyze-status','isArray','now','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','costTimeMs','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','6332928ttsqeY','status','1329136xpLRTk','num','UNKNOWN','inputParams'];a81_0x30f4=function(){return _0x3480bf;};return a81_0x30f4();}const a81_0x463c9a=a81_0x4c0a;function a81_0x4c0a(_0x5c83f3,_0x209863){_0x5c83f3=_0x5c83f3-0x164;const _0x30f41e=a81_0x30f4();let _0x4c0a89=_0x30f41e[_0x5c83f3];return _0x4c0a89;}(function(_0x340255,_0x58c2ee){const _0x3e523f=a81_0x4c0a,_0x45bd4d=_0x340255();while(!![]){try{const _0x149949=parseInt(_0x3e523f(0x175))/0x1+-parseInt(_0x3e523f(0x186))/0x2+-parseInt(_0x3e523f(0x164))/0x3+-parseInt(_0x3e523f(0x180))/0x4+parseInt(_0x3e523f(0x177))/0x5+parseInt(_0x3e523f(0x174))/0x6+parseInt(_0x3e523f(0x17e))/0x7;if(_0x149949===_0x58c2ee)break;else _0x45bd4d['push'](_0x45bd4d['shift']());}catch(_0x441ee4){_0x45bd4d['push'](_0x45bd4d['shift']());}}}(a81_0x30f4,0xd432e));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a81_0x463c9a(0x18b),'FAILED',a81_0x463c9a(0x16b)]);export const dbAnalyzeStatus={'service':'db','command':a81_0x463c9a(0x178),'description':'Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x463c9a(0x18a),'type':a81_0x463c9a(0x172),'required':!![],'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)'}],async 'execute'(_0x1f8203){const _0x48e8a2=a81_0x463c9a,_0x3e3d63=_0x1f8203[_0x48e8a2(0x181)]('id'),_0x249c34=_0x1f8203[_0x48e8a2(0x176)](_0x48e8a2(0x18a)),_0x7e7b4d=await getDbAnalysisStatus(_0x249c34),_0x3edb5f=TERMINAL_STATUSES[_0x48e8a2(0x16c)](_0x7e7b4d[_0x48e8a2(0x17f)]??''),{parsedJobContext:_0x251515,jobContextParseWarning:_0x468f43}=parseJobContext(_0x7e7b4d['jobContext']),{requestedAnalysis:_0x7a5958,requestedAnalysisParseWarning:_0x3697cb}=parseRequestedAnalysis(_0x7e7b4d[_0x48e8a2(0x183)]),_0x2cb56c=readAccumulatedErrorTypeCounts(_0x251515),_0x505184=calculateAttemptElapsedMs(_0x7e7b4d,_0x3edb5f),_0x73adfa=calculateElapsedFromStart(_0x7e7b4d['firstStartTime'],_0x7e7b4d[_0x48e8a2(0x168)],_0x3edb5f),_0x266ffa=detectMultipleAttempts(_0x7e7b4d),_0x5d55ef=buildDbPageLinks(_0x1f8203[_0x48e8a2(0x16f)],_0x3e3d63);return{'ok':!![],'data':{'dbLinkId':_0x3e3d63,'planId':_0x249c34,'status':_0x7e7b4d,'requestedAnalysis':_0x7a5958,'requestedAnalysisParseWarning':_0x3697cb,'parsedJobContext':_0x251515,'accumulatedErrorTypeCounts':_0x2cb56c,'accumulatedErrorTypeCountsAdvisory':_0x2cb56c?_0x48e8a2(0x17d):'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','isTerminal':_0x3edb5f,'isRetrying':_0x7e7b4d[_0x48e8a2(0x17f)]===_0x48e8a2(0x173),'attemptElapsedMs':_0x505184,'totalElapsedMs':_0x73adfa,'hasMultipleAttempts':_0x266ffa,'jobContextParseWarning':_0x468f43,..._0x5d55ef?{'links':_0x5d55ef}:{}},'message':_0x48e8a2(0x188)+_0x249c34};}};function parseRequestedAnalysis(_0x296efc){const _0x3cbf14=a81_0x463c9a,_0x57f968={'mode':_0x3cbf14(0x182),'tableCount':null,'tableNames':null};if(!_0x296efc?.[_0x3cbf14(0x170)]())return{'requestedAnalysis':_0x57f968,'requestedAnalysisParseWarning':_0x3cbf14(0x17b)};try{const _0x1cba48=JSON[_0x3cbf14(0x18c)](_0x296efc);if(!_0x1cba48||typeof _0x1cba48!==_0x3cbf14(0x185)||Array[_0x3cbf14(0x179)](_0x1cba48))throw new Error('inputParams\x20is\x20not\x20an\x20object');const _0x50e971=_0x1cba48[_0x3cbf14(0x165)];if(_0x50e971===undefined||_0x50e971===null)return{'requestedAnalysis':{'mode':'FULL','tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x3cbf14(0x179)](_0x50e971)&&_0x50e971['every'](_0x3d4ad7=>typeof _0x3d4ad7===_0x3cbf14(0x172)))return{'requestedAnalysis':{'mode':_0x50e971[_0x3cbf14(0x18d)]>0x0?_0x3cbf14(0x169):_0x3cbf14(0x189),'tableCount':_0x50e971[_0x3cbf14(0x18d)],'tableNames':_0x50e971},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x57f968,'requestedAnalysisParseWarning':_0x3cbf14(0x16e)};}function readAccumulatedErrorTypeCounts(_0x384184){const _0x511d80=a81_0x463c9a,_0x5672a8=_0x384184?.[_0x511d80(0x187)];if(!_0x5672a8||typeof _0x5672a8!==_0x511d80(0x185)||Array['isArray'](_0x5672a8))return null;if(Object[_0x511d80(0x166)](_0x5672a8)[_0x511d80(0x18d)]===0x0)return null;return _0x5672a8;}function parseJobContext(_0x3844fc){const _0x21ef3c=a81_0x463c9a;if(!_0x3844fc?.[_0x21ef3c(0x170)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x27f3e6=JSON['parse'](_0x3844fc);if(_0x27f3e6&&typeof _0x27f3e6===_0x21ef3c(0x185)&&!Array[_0x21ef3c(0x179)](_0x27f3e6))return{'parsedJobContext':_0x27f3e6,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x21ef3c(0x171)};}function calculateAttemptElapsedMs(_0x321ac6,_0x35e666){const _0x19dc7c=a81_0x463c9a;if(typeof _0x321ac6[_0x19dc7c(0x17c)]===_0x19dc7c(0x167)&&Number['isFinite'](_0x321ac6[_0x19dc7c(0x17c)])&&_0x321ac6[_0x19dc7c(0x17c)]>=0x0)return _0x321ac6['costTimeMs'];return calculateElapsedFromStart(_0x321ac6['startTime'],_0x321ac6[_0x19dc7c(0x168)],_0x35e666);}function calculateElapsedFromStart(_0x531bc8,_0x154b85,_0x12d11b){const _0x2a8c72=a81_0x463c9a,_0x346d01=toTimestamp(_0x531bc8);if(_0x346d01===null)return null;const _0xa59a4d=toTimestamp(_0x154b85),_0x45f5ae=_0xa59a4d??(_0x12d11b?null:Date[_0x2a8c72(0x17a)]());if(_0x45f5ae===null||_0x45f5ae<_0x346d01)return null;return _0x45f5ae-_0x346d01;}function detectMultipleAttempts(_0x1ce683){const _0xe8bd55=a81_0x463c9a,_0x59322c=toTimestamp(_0x1ce683[_0xe8bd55(0x16a)]),_0x14c375=toTimestamp(_0x1ce683['startTime']);return _0x59322c!==null&&_0x14c375!==null&&_0x59322c!==_0x14c375;}function toTimestamp(_0x2235a9){const _0x451c66=a81_0x463c9a;if(typeof _0x2235a9===_0x451c66(0x167))return Number[_0x451c66(0x184)](_0x2235a9)?_0x2235a9:null;if(typeof _0x2235a9!==_0x451c66(0x172)||_0x2235a9[_0x451c66(0x170)]()==='')return null;const _0x5c8557=Number(_0x2235a9);if(Number[_0x451c66(0x184)](_0x5c8557))return _0x5c8557;const _0x111c55=Date[_0x451c66(0x18c)](_0x2235a9);return Number[_0x451c66(0x16d)](_0x111c55)?null:_0x111c55;}
1
+ 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_0x17c2cd=a82_0x4e5a;(function(_0x53b91e,_0x140fc0){const _0x46fd83=a82_0x4e5a,_0x588e53=_0x53b91e();while(!![]){try{const _0x482abc=-parseInt(_0x46fd83(0x142))/0x1+parseInt(_0x46fd83(0x13a))/0x2*(parseInt(_0x46fd83(0x141))/0x3)+-parseInt(_0x46fd83(0x11f))/0x4*(-parseInt(_0x46fd83(0x143))/0x5)+-parseInt(_0x46fd83(0x147))/0x6*(parseInt(_0x46fd83(0x11d))/0x7)+-parseInt(_0x46fd83(0x12d))/0x8*(-parseInt(_0x46fd83(0x12c))/0x9)+parseInt(_0x46fd83(0x13e))/0xa+-parseInt(_0x46fd83(0x126))/0xb;if(_0x482abc===_0x140fc0)break;else _0x588e53['push'](_0x588e53['shift']());}catch(_0x3b7171){_0x588e53['push'](_0x588e53['shift']());}}}(a82_0x2574,0xb628e));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';function a82_0x4e5a(_0x60604b,_0x4807e4){_0x60604b=_0x60604b-0x11b;const _0x257407=a82_0x2574();let _0x4e5a67=_0x257407[_0x60604b];return _0x4e5a67;}function a82_0x2574(){const _0x253aea=['5814uEDbaI','Extra\x20JDBC-style\x20connection\x20parameters\x20string','validation','skip-connection-test','After\x20create,\x20start\x20schema\x20analysis','4634fPtlxL','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','907652KLqlYt','dbtype','dbversion','8.0','databasePage','dbparam','create','4192496XmkNJJ','string','Created\x20db\x20link\x20','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','message','\x20and\x20started\x20analysis','16209tWdSph','4144WyvddE','dburl','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','str','username','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','Create\x20dblink','dbdesc','password','POST','No\x20follow-up\x20analysis','autostart','trim','25886QRoXrr',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','/smartapi/dblink/create','1982320tNGAqA','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','bool','228fjFHfx','572991vUJUes','5ypRvct','write','dbname','[redacted]'];a82_0x2574=function(){return _0x253aea;};return a82_0x2574();}import{buildDbPageLinks,assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a82_0x17c2cd(0x125),'description':a82_0x17c2cd(0x129),'risk':a82_0x17c2cd(0x144),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a82_0x17c2cd(0x145),'type':a82_0x17c2cd(0x127),'required':!![],'description':a82_0x17c2cd(0x11e)},DB_TYPE_FLAG,{'name':a82_0x17c2cd(0x121),'type':a82_0x17c2cd(0x127),'description':a82_0x17c2cd(0x12f),'default':'8.0'},{'name':a82_0x17c2cd(0x12e),'type':a82_0x17c2cd(0x127),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a82_0x17c2cd(0x131),'type':'string','required':!![],'description':'Database\x20username'},{'name':a82_0x17c2cd(0x135),'type':'string','required':!![],'description':'Database\x20password'},{'name':a82_0x17c2cd(0x124),'type':a82_0x17c2cd(0x127),'description':a82_0x17c2cd(0x148)},{'name':a82_0x17c2cd(0x134),'type':a82_0x17c2cd(0x127),'description':'Human-readable\x20description'},{'name':a82_0x17c2cd(0x138),'type':'boolean','description':a82_0x17c2cd(0x11c),'default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x5f53c6){const _0x203ca5=a82_0x17c2cd,_0x538798=_0x5f53c6[_0x203ca5(0x130)](_0x203ca5(0x12e))['trim']();if(!validateDbUrl(_0x538798))throw CliErrors[_0x203ca5(0x149)](_0x203ca5(0x13c)+_0x538798+'\x22',_0x203ca5(0x132));},async 'dryRun'(_0x3715a4){const _0x48dc61=a82_0x17c2cd,_0x54c1d6={'appCode':_0x3715a4['appCode'],'dbName':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x145)),'dbType':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x120)),'dbVersion':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x121))||_0x48dc61(0x122),'dbUrl':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x12e))[_0x48dc61(0x139)](),'username':_0x3715a4['str'](_0x48dc61(0x131)),'password':_0x48dc61(0x146),..._0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x124))?{'dbParam':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x124))}:{},..._0x3715a4['str'](_0x48dc61(0x134))?{'dbDesc':_0x3715a4[_0x48dc61(0x130)](_0x48dc61(0x134))}:{}};return{'method':_0x48dc61(0x136),'url':_0x48dc61(0x13d),'body':_0x54c1d6,'description':[_0x48dc61(0x133),_0x3715a4[_0x48dc61(0x140)](_0x48dc61(0x138))?_0x48dc61(0x13f):_0x48dc61(0x137)]['join']('\x0a'),'connectionPreflight':{'enabled':!_0x3715a4[_0x48dc61(0x140)](_0x48dc61(0x11b)),'executed':![]}};},async 'execute'(_0x3af88c){const _0x3e1c5f=a82_0x17c2cd,_0x27008e={'appCode':_0x3af88c['appCode'],'dbName':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x145)),'dbType':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x120)),'dbVersion':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x121))||_0x3e1c5f(0x122),'dbUrl':_0x3af88c['str'](_0x3e1c5f(0x12e))[_0x3e1c5f(0x139)](),'username':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x131)),'password':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x135)),..._0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x124))?{'dbParam':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x124))}:{},..._0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x134))?{'dbDesc':_0x3af88c[_0x3e1c5f(0x130)](_0x3e1c5f(0x134))}:{}};!_0x3af88c[_0x3e1c5f(0x140)](_0x3e1c5f(0x11b))&&await assertDbLinkConnectionPreflight(_0x27008e);const {id:_0x39e38b,entity:_0x142193}=normalizeEntityWithIdResponse(await createDbLink(_0x27008e));if(!_0x39e38b)return{'ok':![],'message':'Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','data':sanitizeDbLinkForOutput(_0x142193)};let _0x46503c,_0x228d51;if(_0x3af88c['bool'](_0x3e1c5f(0x138)))try{_0x46503c=(await startDbAnalysis(_0x39e38b))['planId'];}catch(_0x1dafd2){_0x228d51=_0x1dafd2 instanceof Error?_0x1dafd2[_0x3e1c5f(0x12a)]:String(_0x1dafd2);}const _0x381beb=buildDbPageLinks(_0x3af88c['appCode'],_0x39e38b),_0x246837={'connection':sanitizeDbLinkForOutput(_0x142193),..._0x381beb?{'links':{'databasePage':_0x381beb[_0x3e1c5f(0x123)]}}:{},..._0x46503c?{'analysisPlanId':_0x46503c}:{},..._0x228d51?{'analysisStartWarning':_0x228d51}:{}};let _0x2e8255;return _0x3af88c[_0x3e1c5f(0x140)](_0x3e1c5f(0x138))?_0x228d51?_0x2e8255=_0x3e1c5f(0x128)+_0x39e38b+_0x3e1c5f(0x13b):_0x2e8255=_0x3e1c5f(0x128)+_0x39e38b+_0x3e1c5f(0x12b):_0x2e8255=_0x3e1c5f(0x128)+_0x39e38b,{'ok':!![],'data':_0x246837,'message':_0x2e8255};}};
1
+ const a84_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_0x3d3b5d=a83_0x763d;(function(_0x367a9e,_0x2e2b35){const _0x5ac678=a83_0x763d,_0x4ae6de=_0x367a9e();while(!![]){try{const _0x363a41=parseInt(_0x5ac678(0x14f))/0x1+-parseInt(_0x5ac678(0x150))/0x2*(-parseInt(_0x5ac678(0x156))/0x3)+parseInt(_0x5ac678(0x155))/0x4*(-parseInt(_0x5ac678(0x159))/0x5)+-parseInt(_0x5ac678(0x154))/0x6*(-parseInt(_0x5ac678(0x139))/0x7)+parseInt(_0x5ac678(0x13a))/0x8+-parseInt(_0x5ac678(0x14c))/0x9+parseInt(_0x5ac678(0x149))/0xa*(-parseInt(_0x5ac678(0x14a))/0xb);if(_0x363a41===_0x2e2b35)break;else _0x4ae6de['push'](_0x4ae6de['shift']());}catch(_0x1be226){_0x4ae6de['push'](_0x4ae6de['shift']());}}}(a83_0x3609,0xc92a9));import{deleteDbLink,getDbLinkInfo,listDatasets}from'../../core/api-client.js';function a83_0x763d(_0x140599,_0x128fe8){_0x140599=_0x140599-0x136;const _0x36097f=a83_0x3609();let _0x763d5=_0x36097f[_0x140599];return _0x763d5;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';const CONFIRM_FLAG={'name':a83_0x3d3b5d(0x142),'type':'boolean','description':'Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count'},EXPECTED_DATASET_COUNT_FLAG={'name':'expected-dataset-count','type':'number','description':a83_0x3d3b5d(0x143)};export const dbDelete={'service':'db','command':a83_0x3d3b5d(0x13b),'description':a83_0x3d3b5d(0x158),'risk':a83_0x3d3b5d(0x147),'flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xea135f){const _0x24c5b2=a83_0x3d3b5d,_0x925a35=await loadDeleteImpact(_0xea135f);return assertExpectedDatasetCount(_0xea135f,_0x925a35[_0x24c5b2(0x157)][_0x24c5b2(0x152)]),{'method':_0x24c5b2(0x13d),'url':_0x24c5b2(0x137),'body':{'id':_0x925a35['id']},'description':_0x925a35['datasetDependency']['activeDatasetCount']>0x0?_0x24c5b2(0x148)+_0x925a35[_0x24c5b2(0x157)][_0x24c5b2(0x152)]+_0x24c5b2(0x13e):'Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.',..._0x925a35};},async 'execute'(_0xb57519){const _0x1b6ae0=a83_0x3d3b5d;if(!_0xb57519[_0x1b6ae0(0x138)](_0x1b6ae0(0x142)))throw CliErrors[_0x1b6ae0(0x141)](_0x1b6ae0(0x14d),_0x1b6ae0(0x136));const _0xb92ff8=_0xb57519[_0x1b6ae0(0x14b)]('id'),_0x209a16=await loadDeleteImpact(_0xb57519),_0x308fa5=_0x209a16['datasetDependency'][_0x1b6ae0(0x152)];assertExpectedDatasetCount(_0xb57519,_0x308fa5);if(_0x308fa5>0x0)throw CliErrors[_0x1b6ae0(0x141)](_0x1b6ae0(0x145)+_0xb92ff8+'\x20still\x20has\x20'+_0x308fa5+_0x1b6ae0(0x153),'Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.');return await deleteDbLink(_0xb92ff8),{'ok':!![],'data':{'id':_0xb92ff8,'deleted':!![],'activeDatasetCount':_0x308fa5},'message':'Deleted\x20db\x20link\x20'+_0xb92ff8};}};async function loadDeleteImpact(_0x15ab77){const _0x36ef88=a83_0x3d3b5d,_0x560ac4=_0x15ab77[_0x36ef88(0x14b)]('id'),[_0x2ae605,_0x2eda5a]=await Promise[_0x36ef88(0x13f)]([getDbLinkInfo(_0x560ac4),listDatasets(_0x15ab77[_0x36ef88(0x144)],{'source':_0x36ef88(0x15a)})]),_0x1ad1e0=buildDbDatasetDependency(_0x2ae605,_0x2eda5a);return{'id':_0x560ac4,'connection':sanitizeDbLinkForOutput(_0x2ae605),'datasetDependency':_0x1ad1e0[_0x36ef88(0x157)],'activeDatasetCount':_0x1ad1e0[_0x36ef88(0x157)][_0x36ef88(0x152)],'datasets':_0x1ad1e0[_0x36ef88(0x14e)]};}function a83_0x3609(){const _0x21b763=['appCode','Database\x20connection\x20','Expected\x20','high-risk-write','Deletion\x20is\x20blocked\x20by\x20','14033930iJjcVT','11OHskZk','num','13571586fhiVzW','--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.','datasets','1088235WpEocG','538lmIpKC','expected-dataset-count','activeDatasetCount','\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.','12MrSRxg','32236kzEgYQ','11745UVxHVb','datasetDependency','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','305fUKAiM','DB_TABLE','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.','/smartapi/dblink/delete','bool','1609580EFUAuV','13005384ygTuXr','delete','isInteger','POST','\x20active\x20DB_TABLE\x20Dataset(s).','all','flag','validation','confirm','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value'];a83_0x3609=function(){return _0x21b763;};return a83_0x3609();}function assertExpectedDatasetCount(_0xb44d67,_0x5081e8){const _0x3e30a7=a83_0x3d3b5d,_0x3772ae=_0xb44d67[_0x3e30a7(0x140)]('expected-dataset-count');if(_0x3772ae===undefined||_0x3772ae==='')return;const _0x251cde=_0xb44d67[_0x3e30a7(0x14b)](_0x3e30a7(0x151));if(!Number[_0x3e30a7(0x13c)](_0x251cde)||_0x251cde<0x0)throw CliErrors['validation']('--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x251cde!==_0x5081e8)throw CliErrors[_0x3e30a7(0x141)](_0x3e30a7(0x146)+_0x251cde+'\x20active\x20Dataset(s),\x20but\x20found\x20'+_0x5081e8+'.','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.');}
1
+ const a85_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
- function a84_0x3afd(){const _0x1b7f07=['15LxeNuy','45151ghIlwB','db\x20link\x20','3202905OonaCR','dbName','12184464EXBbgp','3397506PoKpwL','2036772kHxeHr','2430491FAWhXy','301838olTfTb','num','DB_TABLE','appCode'];a84_0x3afd=function(){return _0x1b7f07;};return a84_0x3afd();}(function(_0x2be743,_0x1f122d){const _0x4f00ba=a84_0x31e4,_0x316e66=_0x2be743();while(!![]){try{const _0x3041b5=parseInt(_0x4f00ba(0x1de))/0x1+parseInt(_0x4f00ba(0x1d9))/0x2*(-parseInt(_0x4f00ba(0x1dd))/0x3)+parseInt(_0x4f00ba(0x1e4))/0x4+-parseInt(_0x4f00ba(0x1e0))/0x5+-parseInt(_0x4f00ba(0x1e3))/0x6+parseInt(_0x4f00ba(0x1d8))/0x7+parseInt(_0x4f00ba(0x1e2))/0x8;if(_0x3041b5===_0x1f122d)break;else _0x316e66['push'](_0x316e66['shift']());}catch(_0x1db346){_0x316e66['push'](_0x316e66['shift']());}}}(a84_0x3afd,0x71154));import{getDbLinkInfo,listDatasets}from'../../core/api-client.js';function a84_0x31e4(_0xf2338e,_0x2d5bad){_0xf2338e=_0xf2338e-0x1d8;const _0x3afd05=a84_0x3afd();let _0x31e43d=_0x3afd05[_0xf2338e];return _0x31e43d;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':'detail','description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x14969e){const _0x3b6de6=a84_0x31e4,_0x59307b=_0x14969e[_0x3b6de6(0x1da)]('id'),_0x3ce5f8=await getDbLinkInfo(_0x59307b),_0x1cfe97=await listDatasets(_0x3ce5f8[_0x3b6de6(0x1dc)]||_0x14969e['appCode'],{'source':_0x3b6de6(0x1db)}),_0x2e144e=buildDbDatasetDependency(_0x3ce5f8,_0x1cfe97);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0x3ce5f8),'datasetDependency':_0x2e144e['datasetDependency']},'message':_0x3b6de6(0x1df)+_0x59307b+':\x20'+_0x3ce5f8[_0x3b6de6(0x1e1)]};}};
1
+ 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_0x37696b=a85_0x42e9;(function(_0x2800dd,_0x388049){const _0x3a34a6=a85_0x42e9,_0x3fd359=_0x2800dd();while(!![]){try{const _0x3ebc0c=-parseInt(_0x3a34a6(0x96))/0x1*(parseInt(_0x3a34a6(0x9c))/0x2)+parseInt(_0x3a34a6(0x8b))/0x3+parseInt(_0x3a34a6(0x99))/0x4*(-parseInt(_0x3a34a6(0x92))/0x5)+parseInt(_0x3a34a6(0x91))/0x6*(-parseInt(_0x3a34a6(0x93))/0x7)+parseInt(_0x3a34a6(0xa0))/0x8+parseInt(_0x3a34a6(0x97))/0x9+parseInt(_0x3a34a6(0x9b))/0xa*(parseInt(_0x3a34a6(0x8c))/0xb);if(_0x3ebc0c===_0x388049)break;else _0x3fd359['push'](_0x3fd359['shift']());}catch(_0x17f5db){_0x3fd359['push'](_0x3fd359['shift']());}}}(a85_0x4ed6,0x272e4));import{startDbTableDiffRefresh}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a85_0x4ed6(){const _0x93a32f=['8925haZYrE','294613ehJMzv','num','diff-refresh-start','traceId','\x20--plan\x20','6aVRyra','630655ciGznA','2222892xEephu','trim','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','982YuvtPL','392301btiKSa','write','4KershZ','\x20db\x20diff-refresh-status\x20--id\x20','230VDwdcb','620MrJHAS','validation','\x20--format\x20compress','Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20','1968144kubLpe'];a85_0x4ed6=function(){return _0x93a32f;};return a85_0x4ed6();}function a85_0x42e9(_0x11552b,_0x2140a0){_0x11552b=_0x11552b-0x8b;const _0x4ed677=a85_0x4ed6();let _0x42e983=_0x4ed677[_0x11552b];return _0x42e983;}export const dbDiffRefreshStart={'service':'db','command':a85_0x37696b(0x8e),'description':'Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','risk':a85_0x37696b(0x98),'flags':[DBLINK_ID_FLAG],async 'execute'(_0x2409d8){const _0x531d63=a85_0x37696b,_0x45c13e=_0x2409d8[_0x531d63(0x8d)]('id'),_0x4c6680=await startDbTableDiffRefresh(_0x2409d8['appCode'],_0x45c13e),_0x5b3ed4=_0x4c6680[_0x531d63(0x8f)]?.[_0x531d63(0x94)]();if(!_0x5b3ed4)throw CliErrors[_0x531d63(0x9d)](_0x531d63(0x95));return{'ok':!![],'data':{'dbLinkId':_0x45c13e,'traceId':_0x5b3ed4,'status':_0x4c6680['status']??null,'query':{'command':CLI_BIN_NAME+_0x531d63(0x9a)+_0x45c13e+_0x531d63(0x90)+_0x5b3ed4+_0x531d63(0x9e)}},'message':_0x531d63(0x9f)+_0x45c13e};}};
1
+ const a87_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_0x2e63de=a86_0x2501;(function(_0x4fb2d9,_0x7ea36d){const _0xc5d3c=a86_0x2501,_0x1132fb=_0x4fb2d9();while(!![]){try{const _0x59550b=-parseInt(_0xc5d3c(0x18d))/0x1+parseInt(_0xc5d3c(0x183))/0x2*(parseInt(_0xc5d3c(0x18b))/0x3)+parseInt(_0xc5d3c(0x195))/0x4+-parseInt(_0xc5d3c(0x192))/0x5*(parseInt(_0xc5d3c(0x182))/0x6)+parseInt(_0xc5d3c(0x18e))/0x7*(parseInt(_0xc5d3c(0x199))/0x8)+-parseInt(_0xc5d3c(0x184))/0x9*(-parseInt(_0xc5d3c(0x19c))/0xa)+-parseInt(_0xc5d3c(0x193))/0xb;if(_0x59550b===_0x7ea36d)break;else _0x1132fb['push'](_0x1132fb['shift']());}catch(_0x2cf2f5){_0x1132fb['push'](_0x1132fb['shift']());}}}(a86_0x5aa9,0x7471f));import{getDbAnalysisStatus}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a86_0x5aa9(){const _0x42d252=['15440hNQCHG','plan','str','264VLlkKb','86ZgTgoz','4833VUovRz','\x20--plan\x20','string','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','num','has','status','48333KLwaSz','UNKNOWN','487367MzmNKZ','241577pbJOrY','SUCCESS','RUNNING','read','290YRRzkm','14290892qSRqRY','CANCELLED','629848KxThEh','RETRYING','\x20db\x20diff-refresh-status\x20--id\x20','FAILED','136BAczSc','\x20--format\x20compress','Table-diff\x20refresh\x20status\x20for\x20'];a86_0x5aa9=function(){return _0x42d252;};return a86_0x5aa9();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a86_0x2501(_0x567fbf,_0x32ea74){_0x567fbf=_0x567fbf-0x182;const _0x5aa9bd=a86_0x5aa9();let _0x2501fd=_0x5aa9bd[_0x567fbf];return _0x2501fd;}const TERMINAL_STATUSES=new Set([a86_0x2e63de(0x18f),a86_0x2e63de(0x198),a86_0x2e63de(0x194)]),RUNNING_STATUSES=new Set(['PENDING',a86_0x2e63de(0x190),a86_0x2e63de(0x196)]);export const dbDiffRefreshStatus={'service':'db','command':'diff-refresh-status','description':a86_0x2e63de(0x187),'risk':a86_0x2e63de(0x191),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x2e63de(0x19d),'type':a86_0x2e63de(0x186),'required':!![],'description':'Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start'}],async 'execute'(_0x3fadad){const _0x2927dd=a86_0x2e63de,_0x4b6873=_0x3fadad[_0x2927dd(0x188)]('id'),_0x11570d=_0x3fadad[_0x2927dd(0x19e)](_0x2927dd(0x19d)),_0x830cbb=await getDbAnalysisStatus(_0x11570d),_0x47dfe8=_0x830cbb[_0x2927dd(0x18a)]??null,_0x516156=TERMINAL_STATUSES['has'](_0x47dfe8??''),_0xefcfcf=_0x47dfe8===_0x2927dd(0x18f),_0x1dd231=_0x516156||RUNNING_STATUSES[_0x2927dd(0x189)](_0x47dfe8??'');return{'ok':!![],'data':{'dbLinkId':_0x4b6873,'planId':_0x11570d,'status':_0x830cbb,'knownStatus':_0x1dd231,'isTerminal':_0x516156,'isSuccessful':_0xefcfcf,'query':_0x1dd231&&!_0x516156?{'command':CLI_BIN_NAME+_0x2927dd(0x197)+_0x4b6873+_0x2927dd(0x185)+_0x11570d+_0x2927dd(0x19a)}:null},'message':_0x2927dd(0x19b)+_0x11570d+':\x20'+(_0x47dfe8??_0x2927dd(0x18c))};}};
1
+ const a88_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
- function a87_0xbd22(){const _0x3db9d7=['summary','tableName','pagesize','55041zgZcRu','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','201340hNGgSr','234dmfyjd','2705096POThxA','totalCount','appCode','length','363490EFzVoS','910686aWlHbz','datasetTableCount','Page\x20size','table','MODIFIED_TABLE','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','all','filter','\x20(db\x20link\x20','fieldDiff','num','map','134leuWPd','81266aLIbzz','tableList','diff','boolean','read','28hTDKFt','addedColumns','page','\x20changed\x20table\x20row(s),\x20total\x20','string','Page\x20index\x20(1-based)','diffType','number','NEW_TABLE','str','2584538SVMwMv','55vIJFCX','DELETED_TABLE'];a87_0xbd22=function(){return _0x3db9d7;};return a87_0xbd22();}const a87_0x56f5ac=a87_0x4e53;(function(_0x35e730,_0x102e2c){const _0x27065a=a87_0x4e53,_0xa6fba7=_0x35e730();while(!![]){try{const _0x4c17e1=-parseInt(_0x27065a(0x19a))/0x1+-parseInt(_0x27065a(0x199))/0x2*(parseInt(_0x27065a(0x184))/0x3)+-parseInt(_0x27065a(0x186))/0x4*(parseInt(_0x27065a(0x17f))/0x5)+parseInt(_0x27065a(0x18d))/0x6+parseInt(_0x27065a(0x19f))/0x7*(parseInt(_0x27065a(0x188))/0x8)+-parseInt(_0x27065a(0x187))/0x9*(-parseInt(_0x27065a(0x18c))/0xa)+parseInt(_0x27065a(0x17e))/0xb;if(_0x4c17e1===_0x102e2c)break;else _0xa6fba7['push'](_0xa6fba7['shift']());}catch(_0x20f92f){_0xa6fba7['push'](_0xa6fba7['shift']());}}}(a87_0xbd22,0xc83c1));import{getDbTableDiff}from'../../core/api-client.js';function a87_0x4e53(_0x54d306,_0x50e3ac){_0x54d306=_0x54d306-0x178;const _0xbd222c=a87_0xbd22();let _0x4e5367=_0xbd222c[_0x54d306];return _0x4e5367;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{DB_TABLE_PAGE_SIZE,getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbDiff={'service':'db','command':a87_0x56f5ac(0x19c),'description':a87_0x56f5ac(0x192),'risk':a87_0x56f5ac(0x19e),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a87_0x56f5ac(0x190),'type':a87_0x56f5ac(0x178),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a87_0x56f5ac(0x1a1),'type':a87_0x56f5ac(0x17b),'description':a87_0x56f5ac(0x179),'default':0x1},{'name':a87_0x56f5ac(0x183),'type':a87_0x56f5ac(0x17b),'description':a87_0x56f5ac(0x18f),'default':0x14},{'name':a87_0x56f5ac(0x193),'type':a87_0x56f5ac(0x19d),'description':a87_0x56f5ac(0x185)}],async 'execute'(_0x3e917c){const _0x3a5dbe=a87_0x56f5ac,_0x18b425=_0x3e917c[_0x3a5dbe(0x197)]('id'),_0x18594f=_0x3e917c['bool'](_0x3a5dbe(0x193)),_0x485962=_0x18594f?0x1:_0x3e917c['num'](_0x3a5dbe(0x1a1),0x1)||0x1,_0x3fc832=_0x18594f?DB_TABLE_PAGE_SIZE:_0x3e917c['num'](_0x3a5dbe(0x183),0x14)||0x14,_0x464eb9=_0x3e917c[_0x3a5dbe(0x17d)](_0x3a5dbe(0x190))||undefined,_0x1d56d5=_0x18594f?await getAllDbTableDiff(getDbTableDiff,_0x3e917c['appCode'],_0x18b425,_0x464eb9):await getDbTableDiff(_0x3e917c[_0x3a5dbe(0x18a)],_0x18b425,{'pageIndex':_0x485962,'pageSize':_0x3fc832,'tableName':_0x464eb9}),_0x164582=_0x1d56d5[_0x3a5dbe(0x19b)],_0x1fe874=summarizeDbTableDiff(_0x164582),_0x277a22=_0x164582[_0x3a5dbe(0x194)](_0x233b76=>_0x233b76[_0x3a5dbe(0x17a)]===_0x3a5dbe(0x17c)||_0x233b76[_0x3a5dbe(0x17a)]===_0x3a5dbe(0x191))[_0x3a5dbe(0x198)](_0x225001=>_0x225001[_0x3a5dbe(0x182)]),_0x5bf47b=_0x164582[_0x3a5dbe(0x194)](_0x351aa3=>_0x351aa3[_0x3a5dbe(0x17a)]===_0x3a5dbe(0x180))['map'](_0xf91997=>_0xf91997['tableName']),_0x3b356a=_0x164582[_0x3a5dbe(0x194)](_0x3dd7c3=>_0x3dd7c3[_0x3a5dbe(0x17a)]===_0x3a5dbe(0x191))[_0x3a5dbe(0x198)](_0x1baf4d=>({'tableName':_0x1baf4d['tableName'],'addedColumns':_0x1baf4d[_0x3a5dbe(0x196)]?.[_0x3a5dbe(0x1a0)]??[],'deletedColumns':_0x1baf4d['fieldDiff']?.['deletedColumns']??[],'modifiedColumns':_0x1baf4d['fieldDiff']?.['modifiedColumns']??[]}));return{'ok':!![],'data':{'dbLinkId':_0x18b425,'page':_0x485962,'pageSize':_0x3fc832,'totalCount':_0x1d56d5[_0x3a5dbe(0x189)],...typeof _0x1d56d5['physicalTableCount']===_0x3a5dbe(0x17b)?{'physicalTableCount':_0x1d56d5['physicalTableCount']}:{},...typeof _0x1d56d5[_0x3a5dbe(0x18e)]===_0x3a5dbe(0x17b)?{'datasetTableCount':_0x1d56d5[_0x3a5dbe(0x18e)]}:{},..._0x1d56d5[_0x3a5dbe(0x181)]?{'summary':_0x1d56d5[_0x3a5dbe(0x181)]}:{},'summaryByType':_0x1fe874,'toAnalyzeTables':_0x277a22,'deletedTables':_0x5bf47b,'modifiedFieldDiffs':_0x3b356a,'tables':_0x164582},'message':_0x164582[_0x3a5dbe(0x18b)]+_0x3a5dbe(0x1a2)+_0x1d56d5['totalCount']+_0x3a5dbe(0x195)+_0x18b425+')'};}};
1
+ const a89_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(_0x300956,_0x3cdb3e){const _0x2e901=a88_0x41fd,_0x5ecc7c=_0x300956();while(!![]){try{const _0x2da352=parseInt(_0x2e901(0xb5))/0x1*(-parseInt(_0x2e901(0xb2))/0x2)+parseInt(_0x2e901(0xb4))/0x3*(-parseInt(_0x2e901(0xb9))/0x4)+parseInt(_0x2e901(0xb6))/0x5+-parseInt(_0x2e901(0xba))/0x6*(parseInt(_0x2e901(0xb3))/0x7)+parseInt(_0x2e901(0xb8))/0x8+parseInt(_0x2e901(0xb7))/0x9+parseInt(_0x2e901(0xbb))/0xa;if(_0x2da352===_0x3cdb3e)break;else _0x5ecc7c['push'](_0x5ecc7c['shift']());}catch(_0x34ed08){_0x5ecc7c['push'](_0x5ecc7c['shift']());}}}(a88_0x5130,0xeff07));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';function a88_0x41fd(_0x4f8c1b,_0x25dca6){_0x4f8c1b=_0x4f8c1b-0xb2;const _0x5130a1=a88_0x5130();let _0x41fd7b=_0x5130a1[_0x4f8c1b];return _0x41fd7b;}import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';function a88_0x5130(){const _0x32c415=['107lkWAOG','6539190tZcNAN','750195fSlstH','11399568VZBUct','4XicXya','2212806pPxSwm','29680950pLNrRe','29678BPkzZI','28hNikIq','5215398drFEQN'];a88_0x5130=function(){return _0x32c415;};return a88_0x5130();}import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
1
+ (function(_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
- function a89_0x29b2(_0x3c13b9,_0x5c4c8d){_0x3c13b9=_0x3c13b9-0x77;const _0x24b229=a89_0x24b2();let _0x29b220=_0x24b229[_0x3c13b9];return _0x29b220;}const a89_0x180b31=a89_0x29b2;(function(_0x522bb4,_0xd04dfe){const _0x33f7ee=a89_0x29b2,_0x3db2ba=_0x522bb4();while(!![]){try{const _0x3ff399=-parseInt(_0x33f7ee(0x80))/0x1+-parseInt(_0x33f7ee(0x7e))/0x2+-parseInt(_0x33f7ee(0x7a))/0x3*(parseInt(_0x33f7ee(0x82))/0x4)+parseInt(_0x33f7ee(0x86))/0x5*(parseInt(_0x33f7ee(0x7b))/0x6)+parseInt(_0x33f7ee(0x88))/0x7+-parseInt(_0x33f7ee(0x85))/0x8*(-parseInt(_0x33f7ee(0x8b))/0x9)+parseInt(_0x33f7ee(0x77))/0xa;if(_0x3ff399===_0xd04dfe)break;else _0x3db2ba['push'](_0x3db2ba['shift']());}catch(_0x307bc9){_0x3db2ba['push'](_0x3db2ba['shift']());}}}(a89_0x24b2,0x60fd8));import{listDatasets,listDbLinks}from'../../core/api-client.js';function a89_0x24b2(){const _0x44afcb=['page','4448038lGBGmA','DB_TABLE','length','3627279luWdJR','datasetDependency','List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','1202380SzwmRd','number','read','92628jLlQtJ','12lviQnp','all','Page\x20size','1256972ovjAvd','num','48587IERHTX','pagesize','76ruahSI','appCode','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','8Sjpfri','1255715vaNAzl'];a89_0x24b2=function(){return _0x44afcb;};return a89_0x24b2();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':'list','description':a89_0x180b31(0x8d),'risk':a89_0x180b31(0x79),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a89_0x180b31(0x87),'type':a89_0x180b31(0x78),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a89_0x180b31(0x81),'type':a89_0x180b31(0x78),'description':a89_0x180b31(0x7d),'default':0x64}],async 'execute'(_0x594f9e){const _0x311cc5=a89_0x180b31,_0x2b3a7d=_0x594f9e[_0x311cc5(0x7f)](_0x311cc5(0x87),0x1)||0x1,_0x389804=_0x594f9e['num'](_0x311cc5(0x81),0x64)||0x64,[{items:_0xd93519,paging:_0x34961c},_0x4dd51f]=await Promise[_0x311cc5(0x7c)]([listDbLinks(_0x594f9e['appCode'],{'currentPage':_0x2b3a7d,'pageSize':_0x389804}),listDatasets(_0x594f9e[_0x311cc5(0x83)],{'source':_0x311cc5(0x89)})]),_0x453409=_0xd93519['map'](_0x5e3a7d=>({...sanitizeDbLinkForOutput(_0x5e3a7d),'datasetDependency':buildDbDatasetDependency(_0x5e3a7d,_0x4dd51f)[_0x311cc5(0x8c)]})),_0x469555=_0x34961c?_0x34961c:{'currentPage':_0x2b3a7d,'pageSize':_0x389804,'rowsOnPage':_0x453409[_0x311cc5(0x8a)],'totalCount':null,'note':_0x311cc5(0x84)};return{'ok':!![],'data':{'connections':_0x453409,'paging':_0x469555},'message':'Found\x20'+_0x453409['length']+'\x20database\x20connection(s)'};}};
1
+ function a91_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(_0x33911e,_0x97a544){const _0x27f614=a90_0x3c61,_0x1e8cdc=_0x33911e();while(!![]){try{const _0x26b84f=-parseInt(_0x27f614(0x1cd))/0x1+parseInt(_0x27f614(0x1c8))/0x2*(parseInt(_0x27f614(0x1d8))/0x3)+parseInt(_0x27f614(0x1d7))/0x4*(-parseInt(_0x27f614(0x1eb))/0x5)+-parseInt(_0x27f614(0x1e9))/0x6*(-parseInt(_0x27f614(0x1e0))/0x7)+-parseInt(_0x27f614(0x1db))/0x8+parseInt(_0x27f614(0x1e8))/0x9+-parseInt(_0x27f614(0x1e4))/0xa*(-parseInt(_0x27f614(0x1dc))/0xb);if(_0x26b84f===_0x97a544)break;else _0x1e8cdc['push'](_0x1e8cdc['shift']());}catch(_0x14c799){_0x1e8cdc['push'](_0x1e8cdc['shift']());}}}(a90_0xa583,0x928ee));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x71ae9){const _0x2d00a1=a90_0x3c61,_0x355c93=_0x71ae9['toLowerCase']();if(_0x355c93===_0x2d00a1(0x1d6)||_0x355c93===_0x2d00a1(0x1cb)||_0x355c93==='dbpassword')return!![];if(_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1e5))||_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1e1))||_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1e7)))return!![];if(_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1c9))||_0x355c93[_0x2d00a1(0x1c7)](_0x2d00a1(0x1d4)))return!![];if(_0x355c93===_0x2d00a1(0x1ca)||_0x355c93===_0x2d00a1(0x1cc)||_0x355c93===_0x2d00a1(0x1d9))return!![];return![];}export function sanitizeDbLinkForOutput(_0x7e9ce1){const _0x5b5751=a90_0x3c61,_0x4963c7={..._0x7e9ce1};delete _0x4963c7[_0x5b5751(0x1d1)];for(const _0xcea8b5 of Object[_0x5b5751(0x1ec)](_0x4963c7)){if(!shouldRedactKey(_0xcea8b5))continue;const _0x3b37c7=_0x4963c7[_0xcea8b5];_0x3b37c7!=null&&String(_0x3b37c7)[_0x5b5751(0x1da)]>0x0&&(_0x4963c7[_0xcea8b5]='[redacted]');}return _0x4963c7;}function a90_0xa583(){const _0x516e5b=['includes','2296706AtEvrS','privatekey','authorization','passwd','connectionstring','817847BrwCNi','map','/data/database','filter','hasAvailableDo','code','dbtableConfig','accesskey','/data/er?dbId=','password','79268MvohLG','3WcnFgq','jdbcurl','length','7158480nzGHri','5124449RUhfJF','Database\x20connection\x20preflight\x20failed.','dbId','trim','7gDgZHM','token','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','test','30YmVUEq','secret','name','credential','1565991cTsxps','1006338QlrcOb','isFinite','145bbelZn','keys'];a90_0xa583=function(){return _0x516e5b;};return a90_0xa583();}export function sanitizeDbLinkList(_0x301546){const _0x4f2bec=a90_0x3c61;return _0x301546[_0x4f2bec(0x1ce)](_0x4c4265=>sanitizeDbLinkForOutput(_0x4c4265));}export function buildDbDatasetDependency(_0x27d9ab,_0x640e5c){const _0x518222=a90_0x3c61,_0x1d22db=_0x640e5c[_0x518222(0x1d0)](_0x144c72=>Number(_0x144c72[_0x518222(0x1d3)]?.[_0x518222(0x1de)])===Number(_0x27d9ab['id']))['map'](_0x524896=>({'id':_0x524896['id'],'code':_0x524896[_0x518222(0x1d2)],'name':_0x524896[_0x518222(0x1e6)],..._0x524896[_0x518222(0x1d3)]?.['tableName']?{'tableName':_0x524896['dbtableConfig']['tableName']}:{}}));return{'datasetDependency':{'hasDependencies':_0x1d22db[_0x518222(0x1da)]>0x0,'activeDatasetCount':_0x1d22db[_0x518222(0x1da)]},'datasets':_0x1d22db};}export async function assertDbLinkConnectionPreflight(_0x363361){const _0x1bb55c=a90_0x3c61,_0xba18b8=await testDbLinkConfigConnect(_0x363361);if(_0xba18b8!==!![])throw CliErrors['apiError'](_0x1bb55c(0x1dd),_0x1bb55c(0x1e2));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;function a90_0x3c61(_0x533d4c,_0x12dc92){_0x533d4c=_0x533d4c-0x1c7;const _0xa58394=a90_0xa583();let _0x3c61a8=_0xa58394[_0x533d4c];return _0x3c61a8;}export function validateDbUrl(_0xe34e3f){const _0x562e5c=a90_0x3c61,_0x251890=_0xe34e3f[_0x562e5c(0x1df)]();if(!_0x251890)return![];return DB_URL_PATTERN[_0x562e5c(0x1e3)](_0x251890);}export function buildDbPageLinks(_0x2fcfb4,_0x15787e){const _0x17aeb6=a90_0x3c61,_0x25ef3b=_0x2fcfb4?.[_0x17aeb6(0x1df)]();if(!_0x25ef3b)return undefined;const _0x39ad57=typeof _0x15787e==='number'?String(_0x15787e):String(_0x15787e??'')['trim']();if(!_0x39ad57)return undefined;const _0x16700d=Number(_0x39ad57);if(!Number[_0x17aeb6(0x1ea)](_0x16700d)||_0x16700d<=0x0)return undefined;const _0x423f59=getAppBaseUrl(_0x25ef3b),_0x1862a9=encodeURIComponent(String(_0x16700d));return{'databasePage':_0x423f59+_0x17aeb6(0x1cf),'erPage':_0x423f59+_0x17aeb6(0x1d5)+_0x1862a9};}
1
+ (function(_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_0x4d7456=a91_0x2f5f;(function(_0x593bbc,_0x5924d8){const _0x4e4906=a91_0x2f5f,_0xe995b9=_0x593bbc();while(!![]){try{const _0x51f826=parseInt(_0x4e4906(0x1bb))/0x1*(-parseInt(_0x4e4906(0x1c5))/0x2)+-parseInt(_0x4e4906(0x1b7))/0x3+-parseInt(_0x4e4906(0x1be))/0x4+-parseInt(_0x4e4906(0x1c0))/0x5+parseInt(_0x4e4906(0x1c7))/0x6*(-parseInt(_0x4e4906(0x1b5))/0x7)+-parseInt(_0x4e4906(0x1bd))/0x8+-parseInt(_0x4e4906(0x1c1))/0x9*(-parseInt(_0x4e4906(0x1cc))/0xa);if(_0x51f826===_0x5924d8)break;else _0xe995b9['push'](_0xe995b9['shift']());}catch(_0x4ec36c){_0xe995b9['push'](_0xe995b9['shift']());}}}(a91_0xcaf3,0x39d6b));import{CliErrors}from'../../errors.js';export const DB_TABLE_PAGE_SIZE=0x64;function a91_0xcaf3(){const _0x311677=['DELETED_TABLE','map','validation','74ygZmEa','length','76332BPZCNV','tableList','size','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','MODIFIED_TABLE','193230sdynRk','\x20of\x20','fromEntries','ALREADY_ANALYZED','NEW_TABLE','summary','diffType','values','63mNaTzy','set','94950jNSaNR','\x20row(s).','tableName','totalCount','7509XOMllo','physicalTableCount','1003976KpQONx','802224uhHZVR','datasetTableCount','2311420iukRLJ','675hhdHJK'];a91_0xcaf3=function(){return _0x311677;};return a91_0xcaf3();}export const DB_TABLE_DIFF_TYPES=[a91_0x4d7456(0x1b1),a91_0x4d7456(0x1cb),a91_0x4d7456(0x1c2),a91_0x4d7456(0x1b0)];export function summarizeDbTableDiff(_0x558ae7){const _0x5c3f0e=a91_0x4d7456;return Object[_0x5c3f0e(0x1ce)](DB_TABLE_DIFF_TYPES[_0x5c3f0e(0x1c3)](_0x5e0203=>[_0x5e0203,_0x558ae7['filter'](_0x4c5780=>_0x4c5780[_0x5c3f0e(0x1b3)]===_0x5e0203)[_0x5c3f0e(0x1c6)]]));}function a91_0x2f5f(_0x59ec98,_0x29bc79){_0x59ec98=_0x59ec98-0x1b0;const _0xcaf3d9=a91_0xcaf3();let _0x2f5f9c=_0xcaf3d9[_0x59ec98];return _0x2f5f9c;}export async function getAllDbTableDiff(_0x4da366,_0x4dccdc,_0xbf8d0c,_0xb38f35){const _0x168eb2=a91_0x4d7456,_0x2f627b=new Map();let _0x2b0ed9=0x1,_0x1ede25=null;while(!![]){_0x1ede25=await _0x4da366(_0x4dccdc,_0xbf8d0c,{'pageIndex':_0x2b0ed9,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0xb38f35});const _0x549b99=_0x2f627b[_0x168eb2(0x1c9)];for(const _0x12351c of _0x1ede25[_0x168eb2(0x1c8)]){_0x2f627b[_0x168eb2(0x1b6)](_0x12351c[_0x168eb2(0x1b9)],_0x12351c);}if(_0x2f627b[_0x168eb2(0x1c9)]>=_0x1ede25[_0x168eb2(0x1ba)])break;if(_0x1ede25[_0x168eb2(0x1c8)]['length']===0x0||_0x2f627b[_0x168eb2(0x1c9)]===_0x549b99)throw CliErrors[_0x168eb2(0x1c4)](_0x168eb2(0x1ca)+_0x2f627b[_0x168eb2(0x1c9)]+_0x168eb2(0x1cd)+_0x1ede25[_0x168eb2(0x1ba)]+_0x168eb2(0x1b8));_0x2b0ed9+=0x1;}return{'totalCount':_0x1ede25?.[_0x168eb2(0x1ba)]??0x0,...typeof _0x1ede25?.[_0x168eb2(0x1bc)]==='number'?{'physicalTableCount':_0x1ede25[_0x168eb2(0x1bc)]}:{},...typeof _0x1ede25?.[_0x168eb2(0x1bf)]==='number'?{'datasetTableCount':_0x1ede25[_0x168eb2(0x1bf)]}:{},..._0x1ede25?.[_0x168eb2(0x1b2)]?{'summary':_0x1ede25[_0x168eb2(0x1b2)]}:{},'tableList':[..._0x2f627b[_0x168eb2(0x1b4)]()]};}
1
+ const a93_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
- function a92_0x4eca(){const _0x377b6c=['tables','116613BNprLl','210KAHbtY','\x20table\x20comparison\x20row(s),\x20total\x20','physicalTableCount','482588LaBuHd','3808848FjbpXU','table','read','\x20(db\x20link\x20','number','7750963igYSOT','164328lALXSk','7jbFtzp','10aSOgIy','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','totalCount','datasetTableCount','202MQqiun','appCode','774iaoOth','1354857DaATwz','length'];a92_0x4eca=function(){return _0x377b6c;};return a92_0x4eca();}function a92_0x2739(_0x38d7d6,_0xf527c6){_0x38d7d6=_0x38d7d6-0x15a;const _0x4ecaec=a92_0x4eca();let _0x2739c6=_0x4ecaec[_0x38d7d6];return _0x2739c6;}const a92_0x1021b3=a92_0x2739;(function(_0x5ba63f,_0x5de7c7){const _0x4cf898=a92_0x2739,_0x4155dc=_0x5ba63f();while(!![]){try{const _0x247be4=parseInt(_0x4cf898(0x16c))/0x1*(-parseInt(_0x4cf898(0x16a))/0x2)+-parseInt(_0x4cf898(0x16d))/0x3+parseInt(_0x4cf898(0x15d))/0x4*(parseInt(_0x4cf898(0x166))/0x5)+parseInt(_0x4cf898(0x164))/0x6+-parseInt(_0x4cf898(0x165))/0x7*(parseInt(_0x4cf898(0x15e))/0x8)+parseInt(_0x4cf898(0x170))/0x9*(parseInt(_0x4cf898(0x15a))/0xa)+parseInt(_0x4cf898(0x163))/0xb;if(_0x247be4===_0x5de7c7)break;else _0x4155dc['push'](_0x4155dc['shift']());}catch(_0x3447c2){_0x4155dc['push'](_0x4155dc['shift']());}}}(a92_0x4eca,0x3a799));import{getDbTableComparisonPage}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbTables={'service':'db','command':a92_0x1021b3(0x16f),'description':'List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','risk':a92_0x1021b3(0x160),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':'string','description':a92_0x1021b3(0x167)}],async 'execute'(_0x81caf5){const _0x56706d=a92_0x1021b3,_0x426092=_0x81caf5['num']('id'),_0x5f2129=_0x81caf5['str'](_0x56706d(0x15f))||undefined,_0x5880d9=await getAllDbTableDiff(getDbTableComparisonPage,_0x81caf5[_0x56706d(0x16b)],_0x426092,_0x5f2129),_0x2ecc07=_0x5880d9['tableList'];return{'ok':!![],'data':{'dbLinkId':_0x426092,'totalCount':_0x5880d9[_0x56706d(0x168)],...typeof _0x5880d9[_0x56706d(0x15c)]===_0x56706d(0x162)?{'physicalTableCount':_0x5880d9[_0x56706d(0x15c)]}:{},...typeof _0x5880d9['datasetTableCount']===_0x56706d(0x162)?{'datasetTableCount':_0x5880d9[_0x56706d(0x169)]}:{},..._0x5880d9['summary']?{'summary':_0x5880d9['summary']}:{},'summaryByType':summarizeDbTableDiff(_0x2ecc07),'tables':_0x2ecc07},'message':_0x2ecc07[_0x56706d(0x16e)]+_0x56706d(0x15b)+_0x5880d9[_0x56706d(0x168)]+_0x56706d(0x161)+_0x426092+')'};}};
1
+ function a94_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_0x3a9976=a93_0x3aa2;(function(_0x29447c,_0x4f9cb3){const _0x39a377=a93_0x3aa2,_0x1e7f1a=_0x29447c();while(!![]){try{const _0x229982=-parseInt(_0x39a377(0xe2))/0x1*(parseInt(_0x39a377(0xe0))/0x2)+-parseInt(_0x39a377(0xdd))/0x3*(parseInt(_0x39a377(0xd6))/0x4)+parseInt(_0x39a377(0xd4))/0x5+parseInt(_0x39a377(0xd0))/0x6+-parseInt(_0x39a377(0xe1))/0x7+-parseInt(_0x39a377(0xcd))/0x8+parseInt(_0x39a377(0xda))/0x9;if(_0x229982===_0x4f9cb3)break;else _0x1e7f1a['push'](_0x1e7f1a['shift']());}catch(_0x459514){_0x1e7f1a['push'](_0x1e7f1a['shift']());}}}(a93_0x4a57,0x48ad8));function a93_0x3aa2(_0x439bd2,_0x290821){_0x439bd2=_0x439bd2-0xcc;const _0x4a57fb=a93_0x4a57();let _0x3aa2d2=_0x4a57fb[_0x439bd2];return _0x3aa2d2;}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x2c3b0f){const _0x2da2bf=a93_0x3aa2;if(_0x2c3b0f===!![]||_0x2c3b0f===![])return{'success':_0x2c3b0f};if(_0x2c3b0f===null||_0x2c3b0f===undefined)return{'type':typeof _0x2c3b0f};if(typeof _0x2c3b0f!==_0x2da2bf(0xcc))return{'type':typeof _0x2c3b0f};const _0x4950ec=_0x2c3b0f,_0x5aafe3=[_0x2da2bf(0xd8),_0x2da2bf(0xdc),_0x2da2bf(0xd7),'error',_0x2da2bf(0xdf),_0x2da2bf(0xce)],_0x3e7c7c={};for(const _0x530fbd of _0x5aafe3){if(_0x530fbd in _0x4950ec)_0x3e7c7c[_0x530fbd]=_0x4950ec[_0x530fbd];}return Object['keys'](_0x3e7c7c)[_0x2da2bf(0xcf)]===0x0&&(_0x3e7c7c['keys']=Object['keys'](_0x4950ec)[_0x2da2bf(0xd3)](0x0,0x14)),_0x3e7c7c;}function a93_0x4a57(){const _0x2d19bd=['667rLnPUj','object','2099320WQyTql','data','length','2008572fISCGW','\x20(see\x20data.result)','read','slice','469900CNlOUB','num','8IvSeIb','code','success','test','8058519MVZxlY','Connection\x20check\x20finished\x20for\x20db\x20link\x20','message','668703iBCgHx','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','msg','422SmXxKz','1242437OnWTQj'];a93_0x4a57=function(){return _0x2d19bd;};return a93_0x4a57();}export const dbTest={'service':'db','command':a93_0x3a9976(0xd9),'description':a93_0x3a9976(0xde),'risk':a93_0x3a9976(0xd2),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1b8e8c){const _0x216f7c=a93_0x3a9976,_0x53e440=_0x1b8e8c[_0x216f7c(0xd5)]('id'),_0x578991=await testDbLinkConnect(_0x53e440),_0x490151=_0x578991===!![]||typeof _0x578991===_0x216f7c(0xcc)&&_0x578991!==null&&_0x578991['success']===!![],_0x3ccd8e=summarizeTestConnectResult(_0x578991);return{'ok':!![],'data':{'id':_0x53e440,'connected':Boolean(_0x490151),'result':_0x3ccd8e},'message':_0x490151?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x53e440:_0x216f7c(0xdb)+_0x53e440+_0x216f7c(0xd1)};}};
1
+ 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_0x25875a=a94_0x59c4;(function(_0x5bc503,_0x3f33e9){const _0x51227c=a94_0x59c4,_0x1cd5eb=_0x5bc503();while(!![]){try{const _0x3b6df3=parseInt(_0x51227c(0xce))/0x1+-parseInt(_0x51227c(0xe9))/0x2+parseInt(_0x51227c(0xe4))/0x3+-parseInt(_0x51227c(0xe6))/0x4*(parseInt(_0x51227c(0xe1))/0x5)+parseInt(_0x51227c(0xf1))/0x6+parseInt(_0x51227c(0xf2))/0x7*(-parseInt(_0x51227c(0xd0))/0x8)+parseInt(_0x51227c(0xeb))/0x9*(parseInt(_0x51227c(0xea))/0xa);if(_0x3b6df3===_0x3f33e9)break;else _0x1cd5eb['push'](_0x1cd5eb['shift']());}catch(_0x205320){_0x1cd5eb['push'](_0x1cd5eb['shift']());}}}(a94_0x32dc,0x550f5));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a94_0x25875a(0xda),'[redacted]']);function mergeDbLinkUpdate(_0x1f11db,_0x40ee0f){const _0x279ad8=a94_0x25875a,_0x580b23={..._0x1f11db},_0xeeef6f=_0x40ee0f[_0x279ad8(0xe2)](_0x279ad8(0xd5));if(_0xeeef6f&&MASKED_PASSWORD_VALUES[_0x279ad8(0xd7)](_0xeeef6f))throw CliErrors['validation'](_0x279ad8(0xd2));if(!_0xeeef6f&&MASKED_PASSWORD_VALUES[_0x279ad8(0xd7)](String(_0x1f11db[_0x279ad8(0xd5)]??'')))throw CliErrors[_0x279ad8(0xec)](_0x279ad8(0xcd));const _0x3d4e6d=_0x40ee0f['str'](_0x279ad8(0xee));if(_0x3d4e6d)_0x580b23[_0x279ad8(0xe7)]=_0x3d4e6d;const _0x137123=_0x40ee0f[_0x279ad8(0xe2)](_0x279ad8(0xd6));if(_0x137123)_0x580b23[_0x279ad8(0xdf)]=_0x137123['trim']();const _0x53be35=_0x40ee0f[_0x279ad8(0xe2)](_0x279ad8(0xef));if(_0x53be35)_0x580b23[_0x279ad8(0xef)]=_0x53be35;if(_0xeeef6f)_0x580b23[_0x279ad8(0xd5)]=_0xeeef6f;const _0x5905cb=_0x40ee0f[_0x279ad8(0xe2)](_0x279ad8(0xe5));if(_0x5905cb)_0x580b23['dbParam']=_0x5905cb;const _0x403100=_0x40ee0f['str'](_0x279ad8(0xcf));if(_0x403100)_0x580b23[_0x279ad8(0xf4)]=_0x403100;return _0x580b23;}function a94_0x59c4(_0x6775b0,_0xac92a3){_0x6775b0=_0x6775b0-0xcd;const _0x32dcaf=a94_0x32dc();let _0x59c46a=_0x32dcaf[_0x6775b0];return _0x59c46a;}export const dbUpdate={'service':'db','command':'update','description':a94_0x25875a(0xd4),'risk':a94_0x25875a(0xd1),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a94_0x25875a(0xee),'type':a94_0x25875a(0xd9),'description':'New\x20database\x20name'},{'name':'dburl','type':a94_0x25875a(0xd9),'description':a94_0x25875a(0xd3)},{'name':a94_0x25875a(0xef),'type':a94_0x25875a(0xd9),'description':a94_0x25875a(0xdc)},{'name':a94_0x25875a(0xd5),'type':a94_0x25875a(0xd9),'description':a94_0x25875a(0xe0)},{'name':'dbparam','type':a94_0x25875a(0xd9),'description':a94_0x25875a(0xed)},{'name':a94_0x25875a(0xcf),'type':'string','description':'New\x20description'},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x423b05){const _0x18dfdc=a94_0x25875a,_0x194878=_0x423b05[_0x18dfdc(0xe2)](_0x18dfdc(0xd6));if(_0x194878&&!validateDbUrl(_0x194878[_0x18dfdc(0xe3)]()))throw CliErrors['validation'](_0x18dfdc(0xdd)+_0x194878+'\x22');},async 'dryRun'(_0x5ab133){const _0x291941=a94_0x25875a,_0x4c0074=_0x5ab133['num']('id'),_0x73249f=await getDbLinkInfo(_0x4c0074),_0x4b203d=mergeDbLinkUpdate(_0x73249f,_0x5ab133),_0x3bc307=sanitizeDbLinkForOutput(_0x4b203d);return{'method':'POST','url':_0x291941(0xf3),'body':_0x3bc307,'description':_0x291941(0xdb),'connectionPreflight':{'enabled':!_0x5ab133[_0x291941(0xd8)]('skip-connection-test'),'executed':![]}};},async 'execute'(_0x4f1056){const _0x453acd=a94_0x25875a,_0x7f351a=_0x4f1056[_0x453acd(0xde)]('id'),_0x5317ed=await getDbLinkInfo(_0x7f351a),_0x3a0850=mergeDbLinkUpdate(_0x5317ed,_0x4f1056);!_0x4f1056[_0x453acd(0xd8)](_0x453acd(0xe8))&&await assertDbLinkConnectionPreflight(_0x3a0850);const {id:_0x1be42c,entity:_0x2f2b9b}=normalizeEntityWithIdResponse(await updateDbLink(_0x3a0850));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2f2b9b),'message':_0x453acd(0xf0)+(_0x1be42c??_0x7f351a)};}};function a94_0x32dc(){const _0x242da3=['4122402aEnSQU','49EACSeH','/smartapi/dblink/update','dbDesc','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','99483mzmvFa','dbdesc','609448PgErcz','write','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','New\x20host:port','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','password','dburl','has','bool','string','******','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','New\x20username','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','num','dbUrl','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','1418775XWySop','str','trim','7356qCZOAR','dbparam','8XZMNAn','dbName','skip-connection-test','674990yHTfpN','250HCfCnn','359163DOmTbS','validation','New\x20connection\x20parameter\x20string','dbname','username','Updated\x20db\x20link\x20'];a94_0x32dc=function(){return _0x242da3;};return a94_0x32dc();}
1
+ const a96_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':!![]});}