@lovrabet/rabetbase-cli 2.3.11-beta.1 → 2.3.12-beta.1

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 (260) 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/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.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/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.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/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- const a76_0x3f84a6=a76_0x40d6;(function(_0x464367,_0x3dbebe){const _0x1d75c3=a76_0x40d6,_0x5d3018=_0x464367();while(!![]){try{const _0x1e173c=parseInt(_0x1d75c3(0x107))/0x1*(-parseInt(_0x1d75c3(0xf3))/0x2)+-parseInt(_0x1d75c3(0xf9))/0x3+-parseInt(_0x1d75c3(0x10a))/0x4+-parseInt(_0x1d75c3(0xf4))/0x5+parseInt(_0x1d75c3(0x118))/0x6+-parseInt(_0x1d75c3(0xfd))/0x7+parseInt(_0x1d75c3(0x111))/0x8;if(_0x1e173c===_0x3dbebe)break;else _0x5d3018['push'](_0x5d3018['shift']());}catch(_0x3b7539){_0x5d3018['push'](_0x5d3018['shift']());}}}(a76_0x3b73,0x86d55));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';export async function buildDatasetRenameResult({input:_0x3b03bf,dryRun:_0x49ab33}){const _0x3cf66f=a76_0x40d6;validateInput(_0x3b03bf);const _0x1322f4=await getDatasetDetail(_0x3b03bf[_0x3cf66f(0x110)]),_0x1d7012=resolveCurrentName(_0x1322f4);if(_0x1d7012!==_0x3b03bf[_0x3cf66f(0x119)])throw CliErrors[_0x3cf66f(0x100)](_0x3cf66f(0xf2),_0x3cf66f(0x106)+JSON[_0x3cf66f(0x10f)](_0x3b03bf[_0x3cf66f(0x119)])+_0x3cf66f(0x101)+JSON[_0x3cf66f(0x10f)](_0x1d7012));const _0x4394ab=buildRenameRequest(_0x1322f4,_0x3b03bf),_0x21e3b8=_0x1d7012!==_0x3b03bf['name'];let _0x5b3f44;return _0x21e3b8&&!_0x49ab33&&(_0x5b3f44=await updateDrivenData(_0x4394ab)),{'ok':!![],'data':{'dataset':{'id':_0x4394ab['modelId'],'code':_0x4394ab[_0x3cf66f(0x11a)]},'dryRun':_0x49ab33,'changed':_0x21e3b8,'before':{'name':_0x1d7012},'after':{'name':_0x3b03bf[_0x3cf66f(0xf8)]},'request':_0x4394ab,'submitted':_0x21e3b8&&!_0x49ab33,..._0x5b3f44!==undefined?{'version':_0x5b3f44}:{}},'message':_0x21e3b8?_0x49ab33?_0x3cf66f(0x115)+_0x4394ab[_0x3cf66f(0x11a)]+_0x3cf66f(0xfe)+_0x3b03bf[_0x3cf66f(0xf8)]:'Renamed\x20dataset\x20'+_0x4394ab[_0x3cf66f(0x11a)]+'\x20to\x20'+_0x3b03bf['name']:_0x3cf66f(0x10c)+_0x4394ab['modelCode']};}export const datasetRename={'service':a76_0x3f84a6(0x116),'command':a76_0x3f84a6(0xf1),'description':a76_0x3f84a6(0x112),'risk':a76_0x3f84a6(0x10b),'flags':[CODE_FLAG,{'name':a76_0x3f84a6(0xf8),'type':a76_0x3f84a6(0xf6),'required':!![],'description':a76_0x3f84a6(0x104)},{'name':a76_0x3f84a6(0x117),'type':a76_0x3f84a6(0xf6),'required':!![],'description':a76_0x3f84a6(0xf5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x12d83d){validateInput(readDatasetRenameInput(_0x12d83d));},async 'dryRun'(_0x4cc547){const _0x304309=a76_0x3f84a6,_0x45abab=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x4cc547),'dryRun':!![]});return{'method':_0x304309(0xfb),'url':_0x304309(0xf7),'body':_0x45abab[_0x304309(0x108)][_0x304309(0xf0)],'description':_0x45abab[_0x304309(0xfa)],..._0x45abab['data']};},async 'execute'(_0x4280d5){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x4280d5),'dryRun':![]});}};function readDatasetRenameInput(_0x4ed847){const _0x3cc57d=a76_0x3f84a6;return{'code':trim(_0x4ed847[_0x3cc57d(0xff)](_0x3cc57d(0x110))),'name':trim(_0x4ed847['str']('name')),'expectName':trim(_0x4ed847[_0x3cc57d(0xff)]('expect-name'))};}function a76_0x40d6(_0x8da424,_0x359b47){_0x8da424=_0x8da424-0xf0;const _0x3b738e=a76_0x3b73();let _0x40d672=_0x3b738e[_0x8da424];return _0x40d672;}function a76_0x3b73(){const _0x5c59b4=['Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','string','/smartapi/dataset/update-driven-data','name','1522482NfVich','message','POST','trim','3850273LSmYYq','\x20would\x20be\x20renamed\x20to\x20','str','validation',',\x20actual\x20','--name\x20is\x20required','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id','New\x20dataset\x20display\x20name','datasetName','Expected\x20','67TgpxLf','data','object','4417992flqsOD','write','No\x20changes\x20for\x20dataset\x20','isArray','--expect-name\x20is\x20required','stringify','code','28387496WdDgCj','Rename\x20dataset\x20display\x20name\x20safely','modelId','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code','Dry-run:\x20dataset\x20','dataset','expect-name','5647440sqagcb','expectName','modelCode','datasetId','request','rename','Expectation\x20mismatch\x20at\x20dataset.name','31572GPYDNr','3588535kEqrxk'];a76_0x3b73=function(){return _0x5c59b4;};return a76_0x3b73();}function validateInput(_0x1392bc){const _0x147641=a76_0x3f84a6;if(!_0x1392bc[_0x147641(0x110)])throw CliErrors[_0x147641(0x100)]('--code\x20is\x20required');if(!_0x1392bc[_0x147641(0xf8)])throw CliErrors[_0x147641(0x100)](_0x147641(0x102));if(!_0x1392bc[_0x147641(0x119)])throw CliErrors[_0x147641(0x100)](_0x147641(0x10e));}function resolveCurrentName(_0x5c5e57){const _0xc7f45c=a76_0x3f84a6;return String(_0x5c5e57[_0xc7f45c(0x116)]?.[_0xc7f45c(0x105)]??_0x5c5e57[_0xc7f45c(0xf8)]??'')[_0xc7f45c(0xfc)]();}function buildRenameRequest(_0x1ae680,_0x35aa92){const _0x377e2b=a76_0x3f84a6,_0x1ab521=isPlainObject(_0x1ae680[_0x377e2b(0x116)])?_0x1ae680[_0x377e2b(0x116)]:{},_0x8810d3=_0x1ae680[_0x377e2b(0x113)]??_0x1ae680['id']??_0x1ab521[_0x377e2b(0x11b)];if(_0x8810d3===undefined||_0x8810d3===null||_0x8810d3==='')throw CliErrors['validation'](_0x377e2b(0x103));const _0x5f173e=String(_0x1ae680[_0x377e2b(0x11a)]??_0x1ae680[_0x377e2b(0x110)]??_0x1ab521['datasetCode']??_0x35aa92[_0x377e2b(0x110)])[_0x377e2b(0xfc)]();if(!_0x5f173e)throw CliErrors[_0x377e2b(0x100)](_0x377e2b(0x114));return{'modelId':_0x8810d3,'modelCode':_0x5f173e,'name':_0x35aa92[_0x377e2b(0xf8)],'dataset':{'datasetId':_0x8810d3,'datasetCode':_0x5f173e,'datasetName':_0x35aa92[_0x377e2b(0xf8)]}};}function isPlainObject(_0x452299){const _0x5bb46b=a76_0x3f84a6;return Boolean(_0x452299)&&typeof _0x452299===_0x5bb46b(0x109)&&!Array[_0x5bb46b(0x10d)](_0x452299);}function trim(_0x14faea){return String(_0x14faea||'')['trim']();}
1
+ const a76_0x3e085d=a76_0x2ce4;(function(_0x31bf52,_0x2459b2){const _0x4a5632=a76_0x2ce4,_0x4f3095=_0x31bf52();while(!![]){try{const _0x38d8e5=parseInt(_0x4a5632(0x126))/0x1*(-parseInt(_0x4a5632(0x136))/0x2)+parseInt(_0x4a5632(0x143))/0x3+-parseInt(_0x4a5632(0x141))/0x4*(parseInt(_0x4a5632(0x148))/0x5)+parseInt(_0x4a5632(0x127))/0x6*(-parseInt(_0x4a5632(0x133))/0x7)+parseInt(_0x4a5632(0x124))/0x8+parseInt(_0x4a5632(0x142))/0x9*(parseInt(_0x4a5632(0x128))/0xa)+parseInt(_0x4a5632(0x122))/0xb*(-parseInt(_0x4a5632(0x12d))/0xc);if(_0x38d8e5===_0x2459b2)break;else _0x4f3095['push'](_0x4f3095['shift']());}catch(_0x5f56c5){_0x4f3095['push'](_0x4f3095['shift']());}}}(a76_0x47b2,0x95587));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a76_0x47b2(){const _0x5f4706=['expect-name','trim',',\x20actual\x20','Dry-run:\x20dataset\x20','8029747FeRbtk','expectName','8665672xJwnAy','stringify','501PepHcp','11004hUbXCe','630BGBivl','isArray','name','string','object','12OAjNSq','datasetName','\x20to\x20','validation','datasetId','Expectation\x20mismatch\x20at\x20dataset.name','133SxhIsg','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code','--name\x20is\x20required','434lobZhA','write','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id','--code\x20is\x20required','\x20would\x20be\x20renamed\x20to\x20','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','modelId','No\x20changes\x20for\x20dataset\x20','modelCode','dataset','message','1648YhhJWb','130968MAxuBL','383982ZtKcVt','str','rename','data','request','7800ssvsBw','code','datasetCode'];a76_0x47b2=function(){return _0x5f4706;};return a76_0x47b2();}import{CliErrors}from'../../errors.js';function a76_0x2ce4(_0x4787dc,_0x36cfae){_0x4787dc=_0x4787dc-0x11d;const _0x47b26c=a76_0x47b2();let _0x2ce4d4=_0x47b26c[_0x4787dc];return _0x2ce4d4;}export async function buildDatasetRenameResult({input:_0x39dcf9,dryRun:_0x536c40}){const _0x4ae75a=a76_0x2ce4;validateInput(_0x39dcf9);const _0x2cf93d=await getDatasetDetail(_0x39dcf9['code']),_0x47ec5a=resolveCurrentName(_0x2cf93d);if(_0x47ec5a!==_0x39dcf9[_0x4ae75a(0x123)])throw CliErrors['validation'](_0x4ae75a(0x132),'Expected\x20'+JSON['stringify'](_0x39dcf9[_0x4ae75a(0x123)])+_0x4ae75a(0x120)+JSON[_0x4ae75a(0x125)](_0x47ec5a));const _0x21b9a9=buildRenameRequest(_0x2cf93d,_0x39dcf9),_0x415f62=_0x47ec5a!==_0x39dcf9[_0x4ae75a(0x12a)];let _0x3fe578;return _0x415f62&&!_0x536c40&&(_0x3fe578=await updateDrivenData(_0x21b9a9)),{'ok':!![],'data':{'dataset':{'id':_0x21b9a9[_0x4ae75a(0x13c)],'code':_0x21b9a9[_0x4ae75a(0x13e)]},'dryRun':_0x536c40,'changed':_0x415f62,'before':{'name':_0x47ec5a},'after':{'name':_0x39dcf9[_0x4ae75a(0x12a)]},'request':_0x21b9a9,'submitted':_0x415f62&&!_0x536c40,..._0x3fe578!==undefined?{'version':_0x3fe578}:{}},'message':_0x415f62?_0x536c40?_0x4ae75a(0x121)+_0x21b9a9[_0x4ae75a(0x13e)]+_0x4ae75a(0x13a)+_0x39dcf9[_0x4ae75a(0x12a)]:'Renamed\x20dataset\x20'+_0x21b9a9[_0x4ae75a(0x13e)]+_0x4ae75a(0x12f)+_0x39dcf9[_0x4ae75a(0x12a)]:_0x4ae75a(0x13d)+_0x21b9a9[_0x4ae75a(0x13e)]};}export const datasetRename={'service':a76_0x3e085d(0x13f),'command':a76_0x3e085d(0x145),'description':'Rename\x20dataset\x20display\x20name\x20safely','risk':a76_0x3e085d(0x137),'flags':[CODE_FLAG,{'name':'name','type':a76_0x3e085d(0x12b),'required':!![],'description':'New\x20dataset\x20display\x20name'},{'name':a76_0x3e085d(0x11e),'type':a76_0x3e085d(0x12b),'required':!![],'description':a76_0x3e085d(0x13b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49d6f9){validateInput(readDatasetRenameInput(_0x49d6f9));},async 'dryRun'(_0x399a12){const _0x3ee7cf=a76_0x3e085d,_0x80467f=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x399a12),'dryRun':!![]});return{'method':'POST','url':'/smartapi/dataset/update-driven-data','body':_0x80467f[_0x3ee7cf(0x146)][_0x3ee7cf(0x147)],'description':_0x80467f[_0x3ee7cf(0x140)],..._0x80467f[_0x3ee7cf(0x146)]};},async 'execute'(_0x213f1b){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x213f1b),'dryRun':![]});}};function readDatasetRenameInput(_0x10188f){const _0x393c3a=a76_0x3e085d;return{'code':trim(_0x10188f['str'](_0x393c3a(0x149))),'name':trim(_0x10188f['str']('name')),'expectName':trim(_0x10188f[_0x393c3a(0x144)](_0x393c3a(0x11e)))};}function validateInput(_0x539e17){const _0x1bac6c=a76_0x3e085d;if(!_0x539e17[_0x1bac6c(0x149)])throw CliErrors[_0x1bac6c(0x130)](_0x1bac6c(0x139));if(!_0x539e17[_0x1bac6c(0x12a)])throw CliErrors[_0x1bac6c(0x130)](_0x1bac6c(0x135));if(!_0x539e17['expectName'])throw CliErrors[_0x1bac6c(0x130)]('--expect-name\x20is\x20required');}function resolveCurrentName(_0x421515){const _0xbf9bed=a76_0x3e085d;return String(_0x421515['dataset']?.[_0xbf9bed(0x12e)]??_0x421515[_0xbf9bed(0x12a)]??'')[_0xbf9bed(0x11f)]();}function buildRenameRequest(_0x1554c6,_0x3dfb19){const _0x38e203=a76_0x3e085d,_0x2d57bc=isPlainObject(_0x1554c6[_0x38e203(0x13f)])?_0x1554c6['dataset']:{},_0xbc7fc3=_0x1554c6[_0x38e203(0x13c)]??_0x1554c6['id']??_0x2d57bc[_0x38e203(0x131)];if(_0xbc7fc3===undefined||_0xbc7fc3===null||_0xbc7fc3==='')throw CliErrors['validation'](_0x38e203(0x138));const _0x5b2fa2=String(_0x1554c6[_0x38e203(0x13e)]??_0x1554c6['code']??_0x2d57bc[_0x38e203(0x11d)]??_0x3dfb19[_0x38e203(0x149)])[_0x38e203(0x11f)]();if(!_0x5b2fa2)throw CliErrors[_0x38e203(0x130)](_0x38e203(0x134));return{'modelId':_0xbc7fc3,'modelCode':_0x5b2fa2,'name':_0x3dfb19['name'],'dataset':{'datasetId':_0xbc7fc3,'datasetCode':_0x5b2fa2,'datasetName':_0x3dfb19[_0x38e203(0x12a)]}};}function isPlainObject(_0x4b94e2){const _0x524ea9=a76_0x3e085d;return Boolean(_0x4b94e2)&&typeof _0x4b94e2===_0x524ea9(0x12c)&&!Array[_0x524ea9(0x129)](_0x4b94e2);}function trim(_0x5b1e7d){const _0x9246a0=a76_0x3e085d;return String(_0x5b1e7d||'')[_0x9246a0(0x11f)]();}
@@ -1 +1 @@
1
- const a77_0x2b0a93=a77_0x3572;(function(_0x2d910b,_0x51f515){const _0x61672b=a77_0x3572,_0x3782e9=_0x2d910b();while(!![]){try{const _0x50d9f3=-parseInt(_0x61672b(0x20f))/0x1*(parseInt(_0x61672b(0x1f8))/0x2)+parseInt(_0x61672b(0x1ee))/0x3+parseInt(_0x61672b(0x20c))/0x4*(parseInt(_0x61672b(0x1f0))/0x5)+-parseInt(_0x61672b(0x1f3))/0x6*(parseInt(_0x61672b(0x1f5))/0x7)+parseInt(_0x61672b(0x1ed))/0x8*(-parseInt(_0x61672b(0x1f7))/0x9)+-parseInt(_0x61672b(0x1f2))/0xa*(parseInt(_0x61672b(0x1f6))/0xb)+parseInt(_0x61672b(0x1fc))/0xc*(parseInt(_0x61672b(0x20b))/0xd);if(_0x50d9f3===_0x51f515)break;else _0x3782e9['push'](_0x3782e9['shift']());}catch(_0x203166){_0x3782e9['push'](_0x3782e9['shift']());}}}(a77_0x7d46,0xdff72));import{listDatasets,restoreDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a77_0x2b0a93(0x1e9),'description':a77_0x2b0a93(0x1e1)},DBID_FLAG={'name':a77_0x2b0a93(0x1e2),'type':a77_0x2b0a93(0x1e9),'description':a77_0x2b0a93(0x1f1)},CONFIRM_FLAG={'name':'confirm','type':a77_0x2b0a93(0x211),'description':a77_0x2b0a93(0x1ff)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':'number','description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetRestore={'service':'dataset','command':'restore','description':a77_0x2b0a93(0x208),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x503f58){const _0x5da220=a77_0x2b0a93,_0x17bd65=_0x503f58[_0x5da220(0x1ec)]('id'),_0x427d53=_0x503f58[_0x5da220(0x213)]('code'),_0x49a20a=_0x503f58[_0x5da220(0x1ec)](_0x5da220(0x1e2)),_0xa93b6c=[_0x17bd65>0x0,Boolean(_0x427d53),_0x49a20a>0x0][_0x5da220(0x1e4)](Boolean);if(_0xa93b6c[_0x5da220(0x20d)]===0x0)throw CliErrors[_0x5da220(0x20e)](_0x5da220(0x1e5));if(_0xa93b6c[_0x5da220(0x20d)]>0x1)throw CliErrors[_0x5da220(0x20e)](_0x5da220(0x1eb));},async 'dryRun'(_0x69a457){const _0x2659f8=a77_0x2b0a93,_0x2eb393=await resolveTargets(_0x69a457);return{'method':_0x2659f8(0x210),'url':_0x2659f8(0x1fb),'body':{'appCode':_0x69a457['appCode'],'count':_0x2eb393['length'],'datasets':_0x2eb393},'description':_0x2659f8(0x1f4)+_0x2eb393['length']+_0x2659f8(0x1e6)};},async 'execute'(_0x41bdab){const _0xcb717b=a77_0x2b0a93;if(!_0x41bdab[_0xcb717b(0x212)](_0xcb717b(0x203)))throw CliErrors[_0xcb717b(0x20e)]('--confirm\x20is\x20required\x20to\x20restore\x20datasets.','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x51bc60=await resolveTargets(_0x41bdab),_0x375289=[],_0x170174=[];for(const _0x1837c0 of _0x51bc60){try{await restoreDataset(_0x41bdab['appCode'],_0x1837c0['id']),_0x375289['push'](_0x1837c0);}catch(_0x21c727){_0x170174['push']({..._0x1837c0,'error':_0x21c727 instanceof Error?_0x21c727[_0xcb717b(0x205)]:String(_0x21c727)});}}if(_0x170174[_0xcb717b(0x20d)]>0x0)return{'ok':![],'data':{'requested':_0x51bc60[_0xcb717b(0x20d)],'restoredCount':_0x375289[_0xcb717b(0x20d)],'failedCount':_0x170174['length'],'restored':_0x375289,'failed':_0x170174},'message':_0xcb717b(0x1e3)+_0x375289['length']+'/'+_0x51bc60[_0xcb717b(0x20d)]+_0xcb717b(0x200)+_0x170174['length']+_0xcb717b(0x206)};return{'ok':!![],'data':{'requested':_0x51bc60['length'],'restoredCount':_0x375289[_0xcb717b(0x20d)],'restored':_0x375289},'message':_0xcb717b(0x1e3)+_0x375289[_0xcb717b(0x20d)]+_0xcb717b(0x1fa)};}};function a77_0x7d46(){const _0x529a75=['source','dbId','Required\x20to\x20execute\x20dataset\x20restore','\x20dataset(s);\x20','tableName','code','confirm','name','message','\x20failed','expected-count','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','relationPages','dbid=','1105FXrnQh','8HRfOpo','length','validation','61rObWUH','POST','boolean','bool','str','Dataset\x20id','dbid','Restored\x20','filter','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.','id=','dbtableConfig','number','isArray','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','num','328RDkTPw','1377099YZdAqt','description','1578365UfeEoT','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','2216830zIskNI','6BAhkRE','Would\x20restore\x20','7785239vYaety','33JfrTTc','138249duSdPK','4990eajmVy','appCode','\x20dataset(s)','/smartapi/dataset/restore-dataset','336876ETcGzB'];a77_0x7d46=function(){return _0x529a75;};return a77_0x7d46();}function a77_0x3572(_0x374584,_0x186518){_0x374584=_0x374584-0x1e1;const _0x7d4643=a77_0x7d46();let _0x357270=_0x7d4643[_0x374584];return _0x357270;}async function resolveTargets(_0x24b238){const _0x2e783f=a77_0x2b0a93,_0x31f3e0=_0x24b238[_0x2e783f(0x1ec)]('id'),_0x2f83f0=_0x24b238[_0x2e783f(0x213)](_0x2e783f(0x202)),_0x4ca7fb=_0x24b238[_0x2e783f(0x1ec)](_0x2e783f(0x1e2));let _0x4bcf72;_0x2f83f0?(_0x4bcf72=await listDatasets(_0x24b238[_0x2e783f(0x1f9)],{'code':_0x2f83f0,'deleted':!![]}),_0x4bcf72=_0x4bcf72[_0x2e783f(0x1e4)](_0x2ae3ae=>_0x2ae3ae[_0x2e783f(0x202)]===_0x2f83f0)):(_0x4bcf72=await listDatasets(_0x24b238[_0x2e783f(0x1f9)],{'deleted':!![]}),_0x31f3e0>0x0&&(_0x4bcf72=_0x4bcf72[_0x2e783f(0x1e4)](_0x4a39d1=>_0x4a39d1['id']===_0x31f3e0)),_0x4ca7fb>0x0&&(_0x4bcf72=_0x4bcf72[_0x2e783f(0x1e4)](_0x118ba3=>_0x118ba3[_0x2e783f(0x1e8)]?.['dbId']===_0x4ca7fb)));const _0x1262c7=_0x4bcf72['map'](normalizeTarget);if(_0x1262c7[_0x2e783f(0x20d)]===0x0){const _0x50f0f5=_0x2f83f0||(_0x31f3e0>0x0?_0x2e783f(0x1e7)+_0x31f3e0:_0x2e783f(0x20a)+_0x4ca7fb);throw CliErrors[_0x2e783f(0x20e)]('No\x20deleted\x20dataset\x20found\x20for\x20'+_0x50f0f5+'.');}const _0xc7fb7f=_0x24b238['num'](_0x2e783f(0x207));if(_0xc7fb7f>0x0&&_0x1262c7[_0x2e783f(0x20d)]!==_0xc7fb7f)throw CliErrors[_0x2e783f(0x20e)]('Matched\x20'+_0x1262c7[_0x2e783f(0x20d)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0xc7fb7f+'.');return _0x1262c7;}function normalizeTarget(_0x2a8c05){const _0x4945d4=a77_0x2b0a93,_0x263e13=_0x2a8c05['dbtableConfig']??{};return{'id':_0x2a8c05['id'],'code':_0x2a8c05[_0x4945d4(0x202)],'name':_0x2a8c05[_0x4945d4(0x204)],'description':_0x2a8c05[_0x4945d4(0x1ef)],'source':_0x2a8c05[_0x4945d4(0x1fd)],'dbId':_0x263e13[_0x4945d4(0x1fe)],'dbName':_0x263e13['dbName'],'tableName':_0x263e13[_0x4945d4(0x201)],'relatedPageCount':Array[_0x4945d4(0x1ea)](_0x2a8c05[_0x4945d4(0x209)])?_0x2a8c05[_0x4945d4(0x209)][_0x4945d4(0x20d)]:undefined};}
1
+ const a77_0x3dc73a=a77_0x42a1;(function(_0x5c60d9,_0x2d044f){const _0x3df32b=a77_0x42a1,_0x4ae589=_0x5c60d9();while(!![]){try{const _0xb92a18=parseInt(_0x3df32b(0x20b))/0x1+parseInt(_0x3df32b(0x20f))/0x2+-parseInt(_0x3df32b(0x216))/0x3+-parseInt(_0x3df32b(0x210))/0x4*(parseInt(_0x3df32b(0x212))/0x5)+-parseInt(_0x3df32b(0x1ed))/0x6+parseInt(_0x3df32b(0x20c))/0x7+-parseInt(_0x3df32b(0x1f3))/0x8;if(_0xb92a18===_0x2d044f)break;else _0x4ae589['push'](_0x4ae589['shift']());}catch(_0x440438){_0x4ae589['push'](_0x4ae589['shift']());}}}(a77_0x5cab,0x8eabd));import{listDatasets,restoreDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a77_0x5cab(){const _0x39f7d1=['Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','dbName','high-risk-write','Restored\x20','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','/smartapi/dataset/restore-dataset','Required\x20to\x20execute\x20dataset\x20restore','Dataset\x20id','isArray','781005GByMJI','3162495ZAuypT','push','num','1982806CziSoL','78124PvZqlE','confirm','190XctvFg','dbid','message','number','1171296LxSwiO','bool','dbid=','POST','expected-count','679698DFgfdI','filter','appCode','Would\x20restore\x20','length','No\x20deleted\x20dataset\x20found\x20for\x20','3151352Mahqjp','restore','\x20dataset(s);\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','dbId','tableName','code','source','validation','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','relationPages','str','id=','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','dbtableConfig'];a77_0x5cab=function(){return _0x39f7d1;};return a77_0x5cab();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':'number','description':a77_0x3dc73a(0x209)},DBID_FLAG={'name':a77_0x3dc73a(0x213),'type':a77_0x3dc73a(0x215),'description':a77_0x3dc73a(0x1fc)},CONFIRM_FLAG={'name':'confirm','type':'boolean','description':a77_0x3dc73a(0x208)},EXPECTED_COUNT_FLAG={'name':a77_0x3dc73a(0x21a),'type':a77_0x3dc73a(0x215),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetRestore={'service':'dataset','command':a77_0x3dc73a(0x1f4),'description':'Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','risk':a77_0x3dc73a(0x204),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4e4f17){const _0x57699b=a77_0x3dc73a,_0x3c859e=_0x4e4f17[_0x57699b(0x20e)]('id'),_0x21d27d=_0x4e4f17[_0x57699b(0x1fe)]('code'),_0x1609fc=_0x4e4f17[_0x57699b(0x20e)]('dbid'),_0x19c462=[_0x3c859e>0x0,Boolean(_0x21d27d),_0x1609fc>0x0][_0x57699b(0x1ee)](Boolean);if(_0x19c462[_0x57699b(0x1f1)]===0x0)throw CliErrors[_0x57699b(0x1fb)](_0x57699b(0x1f6));if(_0x19c462[_0x57699b(0x1f1)]>0x1)throw CliErrors['validation'](_0x57699b(0x200));},async 'dryRun'(_0x1c93cc){const _0x1be4a6=a77_0x3dc73a,_0x5cb68c=await resolveTargets(_0x1c93cc);return{'method':_0x1be4a6(0x219),'url':_0x1be4a6(0x207),'body':{'appCode':_0x1c93cc[_0x1be4a6(0x1ef)],'count':_0x5cb68c[_0x1be4a6(0x1f1)],'datasets':_0x5cb68c},'description':_0x1be4a6(0x1f0)+_0x5cb68c[_0x1be4a6(0x1f1)]+'\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.'};},async 'execute'(_0x1556f8){const _0x37c132=a77_0x3dc73a;if(!_0x1556f8[_0x37c132(0x217)](_0x37c132(0x211)))throw CliErrors[_0x37c132(0x1fb)]('--confirm\x20is\x20required\x20to\x20restore\x20datasets.',_0x37c132(0x202));const _0x4bb9eb=await resolveTargets(_0x1556f8),_0x3da283=[],_0x17cfdd=[];for(const _0x356bed of _0x4bb9eb){try{await restoreDataset(_0x1556f8['appCode'],_0x356bed['id']),_0x3da283[_0x37c132(0x20d)](_0x356bed);}catch(_0x6415aa){_0x17cfdd['push']({..._0x356bed,'error':_0x6415aa instanceof Error?_0x6415aa[_0x37c132(0x214)]:String(_0x6415aa)});}}if(_0x17cfdd['length']>0x0)return{'ok':![],'data':{'requested':_0x4bb9eb[_0x37c132(0x1f1)],'restoredCount':_0x3da283['length'],'failedCount':_0x17cfdd[_0x37c132(0x1f1)],'restored':_0x3da283,'failed':_0x17cfdd},'message':_0x37c132(0x205)+_0x3da283[_0x37c132(0x1f1)]+'/'+_0x4bb9eb['length']+_0x37c132(0x1f5)+_0x17cfdd[_0x37c132(0x1f1)]+'\x20failed'};return{'ok':!![],'data':{'requested':_0x4bb9eb[_0x37c132(0x1f1)],'restoredCount':_0x3da283[_0x37c132(0x1f1)],'restored':_0x3da283},'message':'Restored\x20'+_0x3da283['length']+'\x20dataset(s)'};}};function a77_0x42a1(_0x460c69,_0x3c783f){_0x460c69=_0x460c69-0x1ed;const _0x5cabb5=a77_0x5cab();let _0x42a1bb=_0x5cabb5[_0x460c69];return _0x42a1bb;}async function resolveTargets(_0x2adaee){const _0x16d3e8=a77_0x3dc73a,_0x4c60f9=_0x2adaee[_0x16d3e8(0x20e)]('id'),_0x3049f3=_0x2adaee[_0x16d3e8(0x1fe)](_0x16d3e8(0x1f9)),_0x2db069=_0x2adaee['num'](_0x16d3e8(0x213));let _0x1354a0;_0x3049f3?(_0x1354a0=await listDatasets(_0x2adaee[_0x16d3e8(0x1ef)],{'code':_0x3049f3,'deleted':!![]}),_0x1354a0=_0x1354a0['filter'](_0x30868a=>_0x30868a[_0x16d3e8(0x1f9)]===_0x3049f3)):(_0x1354a0=await listDatasets(_0x2adaee[_0x16d3e8(0x1ef)],{'deleted':!![]}),_0x4c60f9>0x0&&(_0x1354a0=_0x1354a0['filter'](_0x4e6cd6=>_0x4e6cd6['id']===_0x4c60f9)),_0x2db069>0x0&&(_0x1354a0=_0x1354a0[_0x16d3e8(0x1ee)](_0x354ae2=>_0x354ae2[_0x16d3e8(0x201)]?.[_0x16d3e8(0x1f7)]===_0x2db069)));const _0x42737e=_0x1354a0['map'](normalizeTarget);if(_0x42737e[_0x16d3e8(0x1f1)]===0x0){const _0x4cc128=_0x3049f3||(_0x4c60f9>0x0?_0x16d3e8(0x1ff)+_0x4c60f9:_0x16d3e8(0x218)+_0x2db069);throw CliErrors[_0x16d3e8(0x1fb)](_0x16d3e8(0x1f2)+_0x4cc128+'.');}const _0x5e8ade=_0x2adaee[_0x16d3e8(0x20e)](_0x16d3e8(0x21a));if(_0x5e8ade>0x0&&_0x42737e[_0x16d3e8(0x1f1)]!==_0x5e8ade)throw CliErrors['validation']('Matched\x20'+_0x42737e[_0x16d3e8(0x1f1)]+_0x16d3e8(0x206)+_0x5e8ade+'.');return _0x42737e;}function normalizeTarget(_0x462ee9){const _0x49957e=a77_0x3dc73a,_0x293927=_0x462ee9[_0x49957e(0x201)]??{};return{'id':_0x462ee9['id'],'code':_0x462ee9[_0x49957e(0x1f9)],'name':_0x462ee9['name'],'description':_0x462ee9['description'],'source':_0x462ee9[_0x49957e(0x1fa)],'dbId':_0x293927[_0x49957e(0x1f7)],'dbName':_0x293927[_0x49957e(0x203)],'tableName':_0x293927[_0x49957e(0x1f8)],'relatedPageCount':Array[_0x49957e(0x20a)](_0x462ee9[_0x49957e(0x1fd)])?_0x462ee9['relationPages'][_0x49957e(0x1f1)]:undefined};}
@@ -1 +1 @@
1
- (function(_0xf687da,_0x9c916e){const _0x4b96e2=a78_0x2b4f,_0x18173d=_0xf687da();while(!![]){try{const _0x104a59=-parseInt(_0x4b96e2(0x1b7))/0x1+-parseInt(_0x4b96e2(0x1c8))/0x2+-parseInt(_0x4b96e2(0x1c0))/0x3*(-parseInt(_0x4b96e2(0x1bc))/0x4)+parseInt(_0x4b96e2(0x1ce))/0x5*(-parseInt(_0x4b96e2(0x1c3))/0x6)+-parseInt(_0x4b96e2(0x1c7))/0x7*(parseInt(_0x4b96e2(0x1bf))/0x8)+-parseInt(_0x4b96e2(0x1ca))/0x9+parseInt(_0x4b96e2(0x1cd))/0xa;if(_0x104a59===_0x9c916e)break;else _0x18173d['push'](_0x18173d['shift']());}catch(_0x38f826){_0x18173d['push'](_0x18173d['shift']());}}}(a78_0x3377,0x3e2b8));function a78_0x2b4f(_0x56db81,_0x2fb4fc){_0x56db81=_0x56db81-0x1b7;const _0x337732=a78_0x3377();let _0x2b4f86=_0x337732[_0x56db81];return _0x2b4f86;}function a78_0x3377(){const _0x1d8908=['79190LoqzPP','trim','430466yUknGu','\x20bytes,\x20limit\x20','ceil','add','validation','1789524xVPkPa','utf8','length','87944JMlyqh','3ioisFP','Table\x20\x22','\x20bytes.','150aHujuL','heuristic','byteLength','push','203TkxxXI','922622EVmUSP','has','2942757phTxXu','split','stringify','17407640SuRYpc'];a78_0x3377=function(){return _0x1d8908;};return a78_0x3377();}import{CliErrors}from'../../errors.js';export const DB_ANALYSIS_MAX_TABLES_PER_BATCH=0xa;export const DB_ANALYSIS_BATCH_TARGET_BYTES=0x3c0;export const DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES=0x400;export const DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE=0x3c;export function normalizeAnalysisTableNames(_0x585d48){const _0x22fa7b=a78_0x2b4f,_0x55ecb7=new Set(),_0x48497f=[];for(const _0x36696b of _0x585d48[_0x22fa7b(0x1cb)](',')){const _0x2544ed=_0x36696b[_0x22fa7b(0x1cf)]();if(!_0x2544ed||_0x55ecb7[_0x22fa7b(0x1c9)](_0x2544ed))continue;_0x55ecb7[_0x22fa7b(0x1ba)](_0x2544ed),_0x48497f[_0x22fa7b(0x1c6)](_0x2544ed);}return _0x48497f;}export function measureAnalysisInputParamsBytes(_0x201a81,_0x3ef8b8){const _0x2bcb5d=a78_0x2b4f;return Buffer[_0x2bcb5d(0x1c5)](JSON[_0x2bcb5d(0x1cc)]({'dbLinkId':_0x201a81,'tableNames':_0x3ef8b8}),_0x2bcb5d(0x1bd));}export function buildAnalysisBatchPlan(_0xbd57a,_0x416823){const _0x316d3e=a78_0x2b4f;if(_0x416823[_0x316d3e(0x1be)]===0x0)throw CliErrors[_0x316d3e(0x1bb)]('At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.');const _0x5749b2=[];let _0x4d3aa8=[];for(const _0x152e12 of _0x416823){const _0x2162cf=[..._0x4d3aa8,_0x152e12],_0x4a4e33=_0x2162cf['length']>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0xbd57a,_0x2162cf)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x4a4e33&&_0x4d3aa8[_0x316d3e(0x1be)]>0x0?(_0x5749b2['push'](_0x4d3aa8),_0x4d3aa8=[_0x152e12]):_0x4d3aa8=_0x2162cf;const _0x495d15=measureAnalysisInputParamsBytes(_0xbd57a,_0x4d3aa8);if(_0x495d15>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors[_0x316d3e(0x1bb)](_0x316d3e(0x1c1)+_0x152e12+'\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20'+_0x495d15+_0x316d3e(0x1b8)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x316d3e(0x1c2));}_0x4d3aa8[_0x316d3e(0x1be)]>0x0&&_0x5749b2[_0x316d3e(0x1c6)](_0x4d3aa8);const _0x4a481e=_0x5749b2['map']((_0x470e6d,_0x34b5cb)=>({'index':_0x34b5cb+0x1,'tableCount':_0x470e6d[_0x316d3e(0x1be)],'inputParamsBytes':measureAnalysisInputParamsBytes(_0xbd57a,_0x470e6d),'estimatedDurationSeconds':_0x470e6d[_0x316d3e(0x1be)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x470e6d})),_0x485918=_0x416823[_0x316d3e(0x1be)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0xbd57a,'tableCount':_0x416823['length'],'batchCount':_0x4a481e[_0x316d3e(0x1be)],'maxTablesPerBatch':DB_ANALYSIS_MAX_TABLES_PER_BATCH,'maxSerializedBytesPerBatch':DB_ANALYSIS_BATCH_TARGET_BYTES,'serverInputParamsLimitBytes':DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,'planningEstimate':{'basis':_0x316d3e(0x1c4),'assumedSecondsPerTable':DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'estimatedTotalSeconds':_0x485918,'estimatedTotalMinutes':Math[_0x316d3e(0x1b9)](_0x485918/0x3c)},'batches':_0x4a481e};}
1
+ (function(_0xc7d577,_0xb60fd2){const _0x310081=a78_0x434c,_0x3993e1=_0xc7d577();while(!![]){try{const _0x2eb5b1=-parseInt(_0x310081(0xec))/0x1*(-parseInt(_0x310081(0xea))/0x2)+parseInt(_0x310081(0xf0))/0x3+parseInt(_0x310081(0xff))/0x4*(parseInt(_0x310081(0xf8))/0x5)+-parseInt(_0x310081(0xf5))/0x6+parseInt(_0x310081(0xf7))/0x7+parseInt(_0x310081(0x101))/0x8*(-parseInt(_0x310081(0xfc))/0x9)+-parseInt(_0x310081(0xf1))/0xa;if(_0x2eb5b1===_0xb60fd2)break;else _0x3993e1['push'](_0x3993e1['shift']());}catch(_0x1a6999){_0x3993e1['push'](_0x3993e1['shift']());}}}(a78_0x196e,0xcab32));function a78_0x196e(){const _0x452419=['split','84792PqjznV','46148WnJYWl','byteLength','44uEgbEs','has','utf8','length','246753mQkXsV','9541710VoEtTg','push','stringify','ceil','8583144CgJfFz','\x20bytes.','10534832HGmcBG','5WEeIsE','trim','\x20bytes,\x20limit\x20','validation','693yfaUHb','At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.','add','5714372PExLEo'];a78_0x196e=function(){return _0x452419;};return a78_0x196e();}function a78_0x434c(_0x2d7981,_0x57d19c){_0x2d7981=_0x2d7981-0xea;const _0x196e6e=a78_0x196e();let _0x434ce2=_0x196e6e[_0x2d7981];return _0x434ce2;}import{CliErrors}from'../../errors.js';export const DB_ANALYSIS_MAX_TABLES_PER_BATCH=0xa;export const DB_ANALYSIS_BATCH_TARGET_BYTES=0x3c0;export const DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES=0x400;export const DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE=0x3c;export function normalizeAnalysisTableNames(_0x461a99){const _0x50d4a7=a78_0x434c,_0xc49b6b=new Set(),_0x1d7e99=[];for(const _0x298dbb of _0x461a99[_0x50d4a7(0x100)](',')){const _0xf9cc7e=_0x298dbb[_0x50d4a7(0xf9)]();if(!_0xf9cc7e||_0xc49b6b[_0x50d4a7(0xed)](_0xf9cc7e))continue;_0xc49b6b[_0x50d4a7(0xfe)](_0xf9cc7e),_0x1d7e99[_0x50d4a7(0xf2)](_0xf9cc7e);}return _0x1d7e99;}export function measureAnalysisInputParamsBytes(_0x5c8c51,_0x3458c2){const _0x3b5320=a78_0x434c;return Buffer[_0x3b5320(0xeb)](JSON[_0x3b5320(0xf3)]({'dbLinkId':_0x5c8c51,'tableNames':_0x3458c2}),_0x3b5320(0xee));}export function buildAnalysisBatchPlan(_0x5795e7,_0x19a814){const _0x38914b=a78_0x434c;if(_0x19a814['length']===0x0)throw CliErrors['validation'](_0x38914b(0xfd));const _0x59c059=[];let _0x33f7a9=[];for(const _0x3fb17c of _0x19a814){const _0x35cc90=[..._0x33f7a9,_0x3fb17c],_0x22206e=_0x35cc90['length']>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0x5795e7,_0x35cc90)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x22206e&&_0x33f7a9['length']>0x0?(_0x59c059['push'](_0x33f7a9),_0x33f7a9=[_0x3fb17c]):_0x33f7a9=_0x35cc90;const _0x46da47=measureAnalysisInputParamsBytes(_0x5795e7,_0x33f7a9);if(_0x46da47>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors[_0x38914b(0xfb)]('Table\x20\x22'+_0x3fb17c+'\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20'+_0x46da47+_0x38914b(0xfa)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x38914b(0xf6));}_0x33f7a9[_0x38914b(0xef)]>0x0&&_0x59c059[_0x38914b(0xf2)](_0x33f7a9);const _0x2ca3fa=_0x59c059['map']((_0x116a83,_0x3372a2)=>({'index':_0x3372a2+0x1,'tableCount':_0x116a83[_0x38914b(0xef)],'inputParamsBytes':measureAnalysisInputParamsBytes(_0x5795e7,_0x116a83),'estimatedDurationSeconds':_0x116a83[_0x38914b(0xef)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x116a83})),_0x28b024=_0x19a814[_0x38914b(0xef)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0x5795e7,'tableCount':_0x19a814[_0x38914b(0xef)],'batchCount':_0x2ca3fa[_0x38914b(0xef)],'maxTablesPerBatch':DB_ANALYSIS_MAX_TABLES_PER_BATCH,'maxSerializedBytesPerBatch':DB_ANALYSIS_BATCH_TARGET_BYTES,'serverInputParamsLimitBytes':DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,'planningEstimate':{'basis':'heuristic','assumedSecondsPerTable':DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'estimatedTotalSeconds':_0x28b024,'estimatedTotalMinutes':Math[_0x38914b(0xf4)](_0x28b024/0x3c)},'batches':_0x2ca3fa};}
@@ -1 +1 @@
1
- function a79_0x20b9(){const _0x1342f1=['2387413dDUGNT','num','Prepared\x20local\x20batch\x20plan\x20for\x20','92184ycMCJl','\x20table(s)\x20in\x20','tables','str','planningEstimate','230GPzeSX','3533160XPRMLK','batchCount','tableCount','22674RTqlNo','13717363ImTFqc','analyze-batch-plan','assumedSecondsPerTable','Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','read','6072444kVjOAs','estimatedTotalMinutes','12lPZgnl',';\x20estimated\x20about\x20','15BSHAMZ','189324LkitLz','string','16PqRTym','Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','\x20minute(s)\x20at\x20','19lSLYit'];a79_0x20b9=function(){return _0x1342f1;};return a79_0x20b9();}const a79_0x59d33a=a79_0x12c2;(function(_0x38c80f,_0x5eaf95){const _0x5096be=a79_0x12c2,_0x3d57c5=_0x38c80f();while(!![]){try{const _0x1b226a=-parseInt(_0x5096be(0x140))/0x1*(parseInt(_0x5096be(0x12f))/0x2)+parseInt(_0x5096be(0x13a))/0x3*(-parseInt(_0x5096be(0x13b))/0x4)+-parseInt(_0x5096be(0x149))/0x5*(parseInt(_0x5096be(0x144))/0x6)+-parseInt(_0x5096be(0x141))/0x7*(-parseInt(_0x5096be(0x13d))/0x8)+-parseInt(_0x5096be(0x136))/0x9+parseInt(_0x5096be(0x12c))/0xa+parseInt(_0x5096be(0x130))/0xb*(parseInt(_0x5096be(0x138))/0xc);if(_0x1b226a===_0x5eaf95)break;else _0x3d57c5['push'](_0x3d57c5['shift']());}catch(_0xbc0948){_0x3d57c5['push'](_0x3d57c5['shift']());}}}(a79_0x20b9,0x6d9b5));import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a79_0x12c2(_0x3f3dd6,_0x40f168){_0x3f3dd6=_0x3f3dd6-0x12c;const _0x20b94e=a79_0x20b9();let _0x12c2f6=_0x20b94e[_0x3f3dd6];return _0x12c2f6;}import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';export const dbAnalyzeBatchPlan={'service':'db','command':a79_0x59d33a(0x131),'description':a79_0x59d33a(0x13e),'risk':a79_0x59d33a(0x135),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a79_0x59d33a(0x13c),'required':!![],'description':a79_0x59d33a(0x133)}],async 'execute'(_0x4bf2f6){const _0x523b4c=a79_0x59d33a,_0x5141ed=_0x4bf2f6[_0x523b4c(0x142)]('id'),_0x2f592c=normalizeAnalysisTableNames(_0x4bf2f6[_0x523b4c(0x147)](_0x523b4c(0x146))),_0x48debf=buildAnalysisBatchPlan(_0x5141ed,_0x2f592c);return{'ok':!![],'data':_0x48debf,'message':_0x523b4c(0x143)+_0x48debf[_0x523b4c(0x12e)]+_0x523b4c(0x145)+_0x48debf[_0x523b4c(0x12d)]+'\x20serial\x20batch(es)\x20for\x20db\x20link\x20'+_0x5141ed+_0x523b4c(0x139)+_0x48debf[_0x523b4c(0x148)][_0x523b4c(0x137)]+_0x523b4c(0x13f)+_0x48debf[_0x523b4c(0x148)][_0x523b4c(0x132)]+_0x523b4c(0x134)};}};
1
+ const a79_0x4f710d=a79_0x58e5;(function(_0x245e80,_0x258632){const _0x5af6ca=a79_0x58e5,_0x8ea055=_0x245e80();while(!![]){try{const _0x358e01=-parseInt(_0x5af6ca(0x95))/0x1*(parseInt(_0x5af6ca(0x7f))/0x2)+-parseInt(_0x5af6ca(0x8a))/0x3+-parseInt(_0x5af6ca(0x88))/0x4*(parseInt(_0x5af6ca(0x80))/0x5)+-parseInt(_0x5af6ca(0x96))/0x6+-parseInt(_0x5af6ca(0x86))/0x7+-parseInt(_0x5af6ca(0x83))/0x8*(-parseInt(_0x5af6ca(0x85))/0x9)+-parseInt(_0x5af6ca(0x81))/0xa*(-parseInt(_0x5af6ca(0x7e))/0xb);if(_0x358e01===_0x258632)break;else _0x8ea055['push'](_0x8ea055['shift']());}catch(_0x658801){_0x8ea055['push'](_0x8ea055['shift']());}}}(a79_0x3ad4,0x8eb82));function a79_0x58e5(_0xd78ac5,_0x4f16bd){_0xd78ac5=_0xd78ac5-0x7e;const _0x3ad412=a79_0x3ad4();let _0x58e513=_0x3ad412[_0xd78ac5];return _0x58e513;}function a79_0x3ad4(){const _0x49cd5b=['string','num','read','analyze-batch-plan','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','planningEstimate','Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','4SldZmh','342264UqagMB','tables','tableCount','55Jqlhwy','49682nXqVZA','20SrjbJM','5199470MkauDh','Prepared\x20local\x20batch\x20plan\x20for\x20','264RAwaoU','\x20serial\x20batch(es)\x20for\x20db\x20link\x20','112797bMghZn','3028571vyTLqa','str','906080DKCAGa','\x20minute(s)\x20at\x20','2800815wyejhF','batchCount','assumedSecondsPerTable','\x20table(s)\x20in\x20'];a79_0x3ad4=function(){return _0x49cd5b;};return a79_0x3ad4();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';export const dbAnalyzeBatchPlan={'service':'db','command':a79_0x4f710d(0x91),'description':a79_0x4f710d(0x94),'risk':a79_0x4f710d(0x90),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a79_0x4f710d(0x97),'type':a79_0x4f710d(0x8e),'required':!![],'description':'Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches'}],async 'execute'(_0x58f6ac){const _0x29c415=a79_0x4f710d,_0x21a94d=_0x58f6ac[_0x29c415(0x8f)]('id'),_0x31c9b0=normalizeAnalysisTableNames(_0x58f6ac[_0x29c415(0x87)](_0x29c415(0x97))),_0x5004d5=buildAnalysisBatchPlan(_0x21a94d,_0x31c9b0);return{'ok':!![],'data':_0x5004d5,'message':_0x29c415(0x82)+_0x5004d5[_0x29c415(0x98)]+_0x29c415(0x8d)+_0x5004d5[_0x29c415(0x8b)]+_0x29c415(0x84)+_0x21a94d+';\x20estimated\x20about\x20'+_0x5004d5[_0x29c415(0x93)]['estimatedTotalMinutes']+_0x29c415(0x89)+_0x5004d5[_0x29c415(0x93)][_0x29c415(0x8c)]+_0x29c415(0x92)};}};
@@ -1 +1 @@
1
- function a80_0x51e9(){const _0x5ad78d=['630BIwwJV','write','90990gvqzxV','705858lGVFUP','analyze-cancel','plan','Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','271289oFwnzm','34253758pbzPLh','string','2934690MuuQhW','Cancel\x20requested\x20for\x20plan\x20','1066144ZhJToW','7zIjiMF','5013256MWoSwt','Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel','num','5CWLpJG','4xLbgPT'];a80_0x51e9=function(){return _0x5ad78d;};return a80_0x51e9();}const a80_0x18be33=a80_0x4f27;(function(_0x5b6ab4,_0x472e9b){const _0x3112ff=a80_0x4f27,_0x16ce61=_0x5b6ab4();while(!![]){try{const _0x4ee98a=-parseInt(_0x3112ff(0x11d))/0x1+parseInt(_0x3112ff(0x128))/0x2*(-parseInt(_0x3112ff(0x119))/0x3)+-parseInt(_0x3112ff(0x122))/0x4*(parseInt(_0x3112ff(0x127))/0x5)+-parseInt(_0x3112ff(0x120))/0x6+-parseInt(_0x3112ff(0x123))/0x7*(parseInt(_0x3112ff(0x124))/0x8)+-parseInt(_0x3112ff(0x12b))/0x9*(parseInt(_0x3112ff(0x129))/0xa)+parseInt(_0x3112ff(0x11e))/0xb;if(_0x4ee98a===_0x472e9b)break;else _0x16ce61['push'](_0x16ce61['shift']());}catch(_0x5cc4ff){_0x16ce61['push'](_0x16ce61['shift']());}}}(a80_0x51e9,0x5626f));function a80_0x4f27(_0x5e2911,_0x2ec1d2){_0x5e2911=_0x5e2911-0x119;const _0x51e9b3=a80_0x51e9();let _0x4f27c0=_0x51e9b3[_0x5e2911];return _0x4f27c0;}import{cancelDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a80_0x18be33(0x11a),'description':a80_0x18be33(0x11c),'risk':a80_0x18be33(0x12a),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a80_0x18be33(0x11f),'required':!![],'description':a80_0x18be33(0x125)}],async 'execute'(_0x151f53){const _0x2f11f6=a80_0x18be33,_0x465e2b=_0x151f53[_0x2f11f6(0x126)]('id'),_0x5dfcd8=_0x151f53['str'](_0x2f11f6(0x11b));return await cancelDbAnalysis(_0x5dfcd8),{'ok':!![],'data':{'dbLinkId':_0x465e2b,'planId':_0x5dfcd8},'message':_0x2f11f6(0x121)+_0x5dfcd8};}};
1
+ const a80_0xa5c5ab=a80_0x1a0a;(function(_0x58e0c6,_0x16152a){const _0x4039d4=a80_0x1a0a,_0x51d741=_0x58e0c6();while(!![]){try{const _0x2f8256=-parseInt(_0x4039d4(0x1ce))/0x1+parseInt(_0x4039d4(0x1d3))/0x2*(-parseInt(_0x4039d4(0x1e0))/0x3)+parseInt(_0x4039d4(0x1d2))/0x4+parseInt(_0x4039d4(0x1db))/0x5*(-parseInt(_0x4039d4(0x1d9))/0x6)+parseInt(_0x4039d4(0x1d4))/0x7*(-parseInt(_0x4039d4(0x1da))/0x8)+-parseInt(_0x4039d4(0x1d7))/0x9*(-parseInt(_0x4039d4(0x1d5))/0xa)+parseInt(_0x4039d4(0x1df))/0xb*(parseInt(_0x4039d4(0x1d6))/0xc);if(_0x2f8256===_0x16152a)break;else _0x51d741['push'](_0x51d741['shift']());}catch(_0x229a07){_0x51d741['push'](_0x51d741['shift']());}}}(a80_0x9d48,0xc69f0));import{cancelDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':'analyze-cancel','description':a80_0xa5c5ab(0x1d0),'risk':a80_0xa5c5ab(0x1cd),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a80_0xa5c5ab(0x1de),'required':!![],'description':a80_0xa5c5ab(0x1cf)}],async 'execute'(_0x5efb88){const _0x454be3=a80_0xa5c5ab,_0x40fa64=_0x5efb88[_0x454be3(0x1d8)]('id'),_0x1b1bc3=_0x5efb88[_0x454be3(0x1dc)](_0x454be3(0x1d1));return await cancelDbAnalysis(_0x1b1bc3),{'ok':!![],'data':{'dbLinkId':_0x40fa64,'planId':_0x1b1bc3},'message':_0x454be3(0x1dd)+_0x1b1bc3};}};function a80_0x1a0a(_0x2d7b1e,_0x2396d7){_0x2d7b1e=_0x2d7b1e-0x1cd;const _0x9d48a6=a80_0x9d48();let _0x1a0a21=_0x9d48a6[_0x2d7b1e];return _0x1a0a21;}function a80_0x9d48(){const _0x2121cc=['47457RjUWqF','num','6EEvLbJ','539464brarNl','4844870RYwesq','str','Cancel\x20requested\x20for\x20plan\x20','string','3608BRRZSI','3neaDrl','write','539878PbSuSz','Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel','Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','plan','1371764pooibh','2661202iJFclX','77lhJmEg','2510iPuaop','99816PhnfVr'];a80_0x9d48=function(){return _0x2121cc;};return a80_0x9d48();}
@@ -1 +1 @@
1
- const a81_0x43182a=a81_0x1a19;(function(_0x4fa1cb,_0x31402b){const _0x2026fd=a81_0x1a19,_0x4c699=_0x4fa1cb();while(!![]){try{const _0x4ee3b1=-parseInt(_0x2026fd(0x1b8))/0x1+parseInt(_0x2026fd(0x1b7))/0x2*(-parseInt(_0x2026fd(0x1c4))/0x3)+parseInt(_0x2026fd(0x1b4))/0x4+-parseInt(_0x2026fd(0x1c9))/0x5+-parseInt(_0x2026fd(0x1b6))/0x6*(-parseInt(_0x2026fd(0x1c2))/0x7)+-parseInt(_0x2026fd(0x1b9))/0x8+parseInt(_0x2026fd(0x1bd))/0x9;if(_0x4ee3b1===_0x31402b)break;else _0x4c699['push'](_0x4c699['shift']());}catch(_0x4b3de9){_0x4c699['push'](_0x4c699['shift']());}}}(a81_0x50a6,0x6a536));import{startDbAnalysis}from'../../core/api-client.js';function a81_0x1a19(_0x651fdb,_0x59798c){_0x651fdb=_0x651fdb-0x1b4;const _0x50a6df=a81_0x50a6();let _0x1a1941=_0x50a6df[_0x651fdb];return _0x1a1941;}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a81_0x50a6(){const _0x35d3b8=['24jYkIGZ','2wqDppX','519938OPgfjo','4575936vKbOJt','\x20bytes.\x20Run\x20`','validation','analyze-start','11161350rmuNzA','\x20db\x20analyze-batch-plan\x20--id\x20','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20','\x20bytes,\x20limit\x20','1175111OVvrJE','Started\x20analysis\x20for\x20db\x20link\x20','1368273ZQwLKz','\x20table(s),\x20','appCode','string','tables','441735oNKtYJ','str','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','length','\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.','At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','flag','640944pkhIhw','num'];a81_0x50a6=function(){return _0x35d3b8;};return a81_0x50a6();}import{DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,measureAnalysisInputParamsBytes,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbAnalyzeStart={'service':'db','command':a81_0x43182a(0x1bc),'description':a81_0x43182a(0x1cb),'risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x43182a(0x1c8),'type':a81_0x43182a(0x1c7),'description':a81_0x43182a(0x1bf)}],async 'execute'(_0x4ec58d){const _0x1fa8e4=a81_0x43182a,_0x5b726f=_0x4ec58d[_0x1fa8e4(0x1b5)]('id'),_0x5d850d=_0x4ec58d[_0x1fa8e4(0x1ca)](_0x1fa8e4(0x1c8)),_0x5743c9=_0x4ec58d[_0x1fa8e4(0x1cf)](_0x1fa8e4(0x1c8))!==undefined,_0x7075fc=_0x5743c9?normalizeAnalysisTableNames(_0x5d850d):undefined;if(_0x7075fc&&_0x7075fc[_0x1fa8e4(0x1cc)]===0x0)throw CliErrors[_0x1fa8e4(0x1bb)](_0x1fa8e4(0x1ce));if(_0x7075fc&&_0x7075fc[_0x1fa8e4(0x1cc)]>0x0){const _0x10774e=measureAnalysisInputParamsBytes(_0x5b726f,_0x7075fc);if(_0x10774e>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors['validation'](_0x1fa8e4(0x1c0)+_0x7075fc['length']+_0x1fa8e4(0x1c5)+_0x10774e+_0x1fa8e4(0x1c1)+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x1fa8e4(0x1ba)+CLI_BIN_NAME+_0x1fa8e4(0x1be)+_0x5b726f+_0x1fa8e4(0x1cd));}const {planId:_0x521281,estimatedMinutes:_0xeaa779,estimatedDurationDesc:_0xc0950b}=await startDbAnalysis(_0x5b726f,_0x7075fc),_0x3f4d13=buildDbPageLinks(_0x4ec58d[_0x1fa8e4(0x1c6)],_0x5b726f);return{'ok':!![],'data':{'dbLinkId':_0x5b726f,'planId':_0x521281,'tableNames':_0x7075fc??[],'serverEstimate':{'estimatedMinutes':_0xeaa779,'estimatedDurationDesc':_0xc0950b},..._0x3f4d13?{'links':_0x3f4d13}:{}},'message':_0x1fa8e4(0x1c3)+_0x5b726f};}};
1
+ const a81_0x247ad9=a81_0x201a;(function(_0x30c413,_0x3291aa){const _0x16ee4a=a81_0x201a,_0x4a6889=_0x30c413();while(!![]){try{const _0x46096d=-parseInt(_0x16ee4a(0x1d0))/0x1+parseInt(_0x16ee4a(0x1d4))/0x2*(-parseInt(_0x16ee4a(0x1ce))/0x3)+parseInt(_0x16ee4a(0x1dd))/0x4*(-parseInt(_0x16ee4a(0x1cb))/0x5)+parseInt(_0x16ee4a(0x1c9))/0x6+parseInt(_0x16ee4a(0x1df))/0x7+parseInt(_0x16ee4a(0x1d7))/0x8+parseInt(_0x16ee4a(0x1da))/0x9;if(_0x46096d===_0x3291aa)break;else _0x4a6889['push'](_0x4a6889['shift']());}catch(_0x540052){_0x4a6889['push'](_0x4a6889['shift']());}}}(a81_0x3590,0x64300));import{startDbAnalysis}from'../../core/api-client.js';function a81_0x201a(_0x43a9ff,_0x20c47a){_0x43a9ff=_0x43a9ff-0x1c9;const _0x359011=a81_0x3590();let _0x201a1c=_0x359011[_0x43a9ff];return _0x201a1c;}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';import{DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,measureAnalysisInputParamsBytes,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbAnalyzeStart={'service':'db','command':a81_0x247ad9(0x1d5),'description':'Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','risk':a81_0x247ad9(0x1cd),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x247ad9(0x1cc),'type':a81_0x247ad9(0x1d9),'description':'Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)'}],async 'execute'(_0x3a0de2){const _0x5480f7=a81_0x247ad9,_0x1033eb=_0x3a0de2[_0x5480f7(0x1e0)]('id'),_0x5b240d=_0x3a0de2[_0x5480f7(0x1d6)](_0x5480f7(0x1cc)),_0x21255d=_0x3a0de2['flag'](_0x5480f7(0x1cc))!==undefined,_0x5d2a14=_0x21255d?normalizeAnalysisTableNames(_0x5b240d):undefined;if(_0x5d2a14&&_0x5d2a14[_0x5480f7(0x1d1)]===0x0)throw CliErrors[_0x5480f7(0x1ca)](_0x5480f7(0x1db));if(_0x5d2a14&&_0x5d2a14[_0x5480f7(0x1d1)]>0x0){const _0x42fe78=measureAnalysisInputParamsBytes(_0x1033eb,_0x5d2a14);if(_0x42fe78>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors[_0x5480f7(0x1ca)](_0x5480f7(0x1d8)+_0x5d2a14[_0x5480f7(0x1d1)]+_0x5480f7(0x1cf)+_0x42fe78+_0x5480f7(0x1dc)+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x5480f7(0x1d2)+CLI_BIN_NAME+_0x5480f7(0x1de)+_0x1033eb+_0x5480f7(0x1d3));}const {planId:_0x48f464,estimatedMinutes:_0xe5043,estimatedDurationDesc:_0x43d39a}=await startDbAnalysis(_0x1033eb,_0x5d2a14),_0x32fd6a=buildDbPageLinks(_0x3a0de2['appCode'],_0x1033eb);return{'ok':!![],'data':{'dbLinkId':_0x1033eb,'planId':_0x48f464,'tableNames':_0x5d2a14??[],'serverEstimate':{'estimatedMinutes':_0xe5043,'estimatedDurationDesc':_0x43d39a},..._0x32fd6a?{'links':_0x32fd6a}:{}},'message':_0x5480f7(0x1e1)+_0x1033eb};}};function a81_0x3590(){const _0x59006d=['tables','write','3QyafXo','\x20table(s),\x20','520767LgosZu','length','\x20bytes.\x20Run\x20`','\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.','91444fUMYkN','analyze-start','str','3725064LrhBgg','Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20','string','3876174Juefoi','At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','\x20bytes,\x20limit\x20','44qkUjsm','\x20db\x20analyze-batch-plan\x20--id\x20','924469oFbVtg','num','Started\x20analysis\x20for\x20db\x20link\x20','3725406xtfrxd','validation','305650hxWZSV'];a81_0x3590=function(){return _0x59006d;};return a81_0x3590();}
@@ -1 +1 @@
1
- const a82_0x860f39=a82_0x81d8;(function(_0x577738,_0x474dcf){const _0x1187e6=a82_0x81d8,_0x5aa60f=_0x577738();while(!![]){try{const _0x2b4072=parseInt(_0x1187e6(0x167))/0x1+-parseInt(_0x1187e6(0x163))/0x2+parseInt(_0x1187e6(0x165))/0x3*(-parseInt(_0x1187e6(0x14c))/0x4)+parseInt(_0x1187e6(0x15e))/0x5*(parseInt(_0x1187e6(0x155))/0x6)+parseInt(_0x1187e6(0x153))/0x7*(parseInt(_0x1187e6(0x16b))/0x8)+parseInt(_0x1187e6(0x14b))/0x9+-parseInt(_0x1187e6(0x14a))/0xa;if(_0x2b4072===_0x474dcf)break;else _0x5aa60f['push'](_0x5aa60f['shift']());}catch(_0x46c374){_0x5aa60f['push'](_0x5aa60f['shift']());}}}(a82_0x37e8,0xd4bab));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a82_0x81d8(_0x7380c1,_0x18c207){_0x7380c1=_0x7380c1-0x14a;const _0x37e823=a82_0x37e8();let _0x81d8b0=_0x37e823[_0x7380c1];return _0x81d8b0;}const TERMINAL_STATUSES=new Set(['SUCCESS',a82_0x860f39(0x169),a82_0x860f39(0x16a),a82_0x860f39(0x161)]);export const dbAnalyzeStatus={'service':'db','command':a82_0x860f39(0x170),'description':a82_0x860f39(0x14e),'risk':a82_0x860f39(0x14f),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a82_0x860f39(0x15c),'type':a82_0x860f39(0x15b),'required':!![],'description':a82_0x860f39(0x159)}],async 'execute'(_0x532e0f){const _0x27d8e6=a82_0x860f39,_0x182537=_0x532e0f[_0x27d8e6(0x150)]('id'),_0x3b90e3=_0x532e0f[_0x27d8e6(0x16f)](_0x27d8e6(0x15c)),_0x3e7473=await getDbAnalysisStatus(_0x3b90e3),_0x32c5b2=TERMINAL_STATUSES[_0x27d8e6(0x164)](_0x3e7473[_0x27d8e6(0x171)]??''),{parsedJobContext:_0x3b7e50,jobContextParseWarning:_0x2a5a82}=parseJobContext(_0x3e7473['jobContext']),_0x4a85ab=readAccumulatedErrorTypeCounts(_0x3b7e50),_0xb6a1b7=buildDbPageLinks(_0x532e0f[_0x27d8e6(0x15f)],_0x182537);return{'ok':!![],'data':{'dbLinkId':_0x182537,'planId':_0x3b90e3,'status':_0x3e7473,'parsedJobContext':_0x3b7e50,'accumulatedErrorTypeCounts':_0x4a85ab,'accumulatedErrorTypeCountsAdvisory':_0x4a85ab?_0x27d8e6(0x168):_0x27d8e6(0x15a),'isTerminal':_0x32c5b2,'isRetrying':_0x3e7473[_0x27d8e6(0x171)]===_0x27d8e6(0x156),'elapsedMs':calculateElapsedMs(_0x3e7473,_0x32c5b2),'jobContextParseWarning':_0x2a5a82,..._0xb6a1b7?{'links':_0xb6a1b7}:{}},'message':'Analysis\x20status\x20for\x20'+_0x3b90e3};}};function readAccumulatedErrorTypeCounts(_0x491ae0){const _0x7fb202=a82_0x860f39,_0x58fee7=_0x491ae0?.[_0x7fb202(0x166)];if(!_0x58fee7||typeof _0x58fee7!==_0x7fb202(0x154)||Array[_0x7fb202(0x152)](_0x58fee7))return null;if(Object[_0x7fb202(0x158)](_0x58fee7)[_0x7fb202(0x16c)]===0x0)return null;return _0x58fee7;}function a82_0x37e8(){const _0x2528fb=['2714379RlOmUV','accumulatedErrorTypeCounts','1576493VqJHJG','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','PARTIAL_SUCCESS','FAILED','118288JvQgnR','length','parse','costTimeMs','str','analyze-status','status','11241520lROqYx','12423735ahAfZO','4KdTgQE','trim','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','read','num','isFinite','isArray','329jcTHSB','object','324ZivdHg','RETRYING','endTime','keys','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','string','plan','now','67790iUbJfN','appCode','number','CANCELLED','startTime','2967396dJqnKe','has'];a82_0x37e8=function(){return _0x2528fb;};return a82_0x37e8();}function parseJobContext(_0x2c3b15){const _0x55f8e4=a82_0x860f39;if(!_0x2c3b15?.['trim']())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x411f73=JSON[_0x55f8e4(0x16d)](_0x2c3b15);if(_0x411f73&&typeof _0x411f73==='object'&&!Array[_0x55f8e4(0x152)](_0x411f73))return{'parsedJobContext':_0x411f73,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':'jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.'};}function calculateElapsedMs(_0x22949d,_0x28d5f6){const _0x177d1e=a82_0x860f39;if(typeof _0x22949d[_0x177d1e(0x16e)]==='number'&&Number[_0x177d1e(0x151)](_0x22949d[_0x177d1e(0x16e)])&&_0x22949d[_0x177d1e(0x16e)]>=0x0)return _0x22949d[_0x177d1e(0x16e)];const _0x5dced5=toTimestamp(_0x22949d[_0x177d1e(0x162)]);if(_0x5dced5===null)return null;const _0x6a485e=toTimestamp(_0x22949d[_0x177d1e(0x157)]),_0x715cd7=_0x6a485e??(_0x28d5f6?null:Date[_0x177d1e(0x15d)]());if(_0x715cd7===null||_0x715cd7<_0x5dced5)return null;return _0x715cd7-_0x5dced5;}function toTimestamp(_0x24e0d2){const _0x24f864=a82_0x860f39;if(typeof _0x24e0d2===_0x24f864(0x160))return Number['isFinite'](_0x24e0d2)?_0x24e0d2:null;if(typeof _0x24e0d2!==_0x24f864(0x15b)||_0x24e0d2[_0x24f864(0x14d)]()==='')return null;const _0x5c23d8=Number(_0x24e0d2);if(Number[_0x24f864(0x151)](_0x5c23d8))return _0x5c23d8;const _0x4dc47e=Date['parse'](_0x24e0d2);return Number['isNaN'](_0x4dc47e)?null:_0x4dc47e;}
1
+ function a82_0x3de3(){const _0x12f09c=['FAILED','4tVtfBH','costTimeMs','accumulatedErrorTypeCounts','object','RETRYING','startTime','SUCCESS','327327FfVmNC','isNaN','isFinite','528042ZEhnDX','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','20sBaLxn','status','jobContext','length','number','Analysis\x20status\x20for\x20','8fecdhB','endTime','analyze-status','keys','202938fvldNi','12038661OKQAcC','CANCELLED','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','parse','str','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','read','6284901WkiChg','1417908HMKjmr','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','12677280TyrHVm','plan','isArray','trim'];a82_0x3de3=function(){return _0x12f09c;};return a82_0x3de3();}const a82_0x1654a6=a82_0x18cb;(function(_0x2b48de,_0xbec2bf){const _0x389231=a82_0x18cb,_0x1be15d=_0x2b48de();while(!![]){try{const _0x3cd0d8=parseInt(_0x389231(0xda))/0x1+-parseInt(_0x389231(0xc3))/0x2*(parseInt(_0x389231(0xca))/0x3)+parseInt(_0x389231(0xbc))/0x4+-parseInt(_0x389231(0xd0))/0x5*(parseInt(_0x389231(0xcd))/0x6)+parseInt(_0x389231(0xbb))/0x7*(parseInt(_0x389231(0xd6))/0x8)+parseInt(_0x389231(0xdb))/0x9+-parseInt(_0x389231(0xbe))/0xa;if(_0x3cd0d8===_0xbec2bf)break;else _0x1be15d['push'](_0x1be15d['shift']());}catch(_0x4bc890){_0x1be15d['push'](_0x1be15d['shift']());}}}(a82_0x3de3,0xe9221));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([a82_0x1654a6(0xc9),'PARTIAL_SUCCESS',a82_0x1654a6(0xc2),a82_0x1654a6(0xdc)]);export const dbAnalyzeStatus={'service':'db','command':a82_0x1654a6(0xd8),'description':a82_0x1654a6(0xce),'risk':a82_0x1654a6(0xe1),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a82_0x1654a6(0xbf),'type':'string','required':!![],'description':a82_0x1654a6(0xe0)}],async 'execute'(_0x6aa2fa){const _0x46e55a=a82_0x1654a6,_0x572535=_0x6aa2fa['num']('id'),_0x3f60a3=_0x6aa2fa[_0x46e55a(0xdf)](_0x46e55a(0xbf)),_0x463325=await getDbAnalysisStatus(_0x3f60a3),_0x324fbf=TERMINAL_STATUSES['has'](_0x463325['status']??''),{parsedJobContext:_0x4d97e4,jobContextParseWarning:_0x2f5319}=parseJobContext(_0x463325[_0x46e55a(0xd2)]),_0x19e76d=readAccumulatedErrorTypeCounts(_0x4d97e4),_0x1ec98e=buildDbPageLinks(_0x6aa2fa['appCode'],_0x572535);return{'ok':!![],'data':{'dbLinkId':_0x572535,'planId':_0x3f60a3,'status':_0x463325,'parsedJobContext':_0x4d97e4,'accumulatedErrorTypeCounts':_0x19e76d,'accumulatedErrorTypeCountsAdvisory':_0x19e76d?_0x46e55a(0xcf):_0x46e55a(0xdd),'isTerminal':_0x324fbf,'isRetrying':_0x463325[_0x46e55a(0xd1)]===_0x46e55a(0xc7),'elapsedMs':calculateElapsedMs(_0x463325,_0x324fbf),'jobContextParseWarning':_0x2f5319,..._0x1ec98e?{'links':_0x1ec98e}:{}},'message':_0x46e55a(0xd5)+_0x3f60a3};}};function readAccumulatedErrorTypeCounts(_0x1fc5b2){const _0x2c3012=a82_0x1654a6,_0x2d7637=_0x1fc5b2?.[_0x2c3012(0xc5)];if(!_0x2d7637||typeof _0x2d7637!==_0x2c3012(0xc6)||Array['isArray'](_0x2d7637))return null;if(Object[_0x2c3012(0xd9)](_0x2d7637)[_0x2c3012(0xd3)]===0x0)return null;return _0x2d7637;}function parseJobContext(_0x112a9d){const _0x51e38a=a82_0x1654a6;if(!_0x112a9d?.[_0x51e38a(0xc1)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x2eae82=JSON['parse'](_0x112a9d);if(_0x2eae82&&typeof _0x2eae82==='object'&&!Array[_0x51e38a(0xc0)](_0x2eae82))return{'parsedJobContext':_0x2eae82,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x51e38a(0xbd)};}function a82_0x18cb(_0x13e25d,_0xea9376){_0x13e25d=_0x13e25d-0xbb;const _0x3de3bc=a82_0x3de3();let _0x18cb01=_0x3de3bc[_0x13e25d];return _0x18cb01;}function calculateElapsedMs(_0x2071e1,_0x152e99){const _0x2aab42=a82_0x1654a6;if(typeof _0x2071e1[_0x2aab42(0xc4)]===_0x2aab42(0xd4)&&Number[_0x2aab42(0xcc)](_0x2071e1[_0x2aab42(0xc4)])&&_0x2071e1['costTimeMs']>=0x0)return _0x2071e1[_0x2aab42(0xc4)];const _0xa86200=toTimestamp(_0x2071e1[_0x2aab42(0xc8)]);if(_0xa86200===null)return null;const _0x4d9b9c=toTimestamp(_0x2071e1[_0x2aab42(0xd7)]),_0x566d66=_0x4d9b9c??(_0x152e99?null:Date['now']());if(_0x566d66===null||_0x566d66<_0xa86200)return null;return _0x566d66-_0xa86200;}function toTimestamp(_0x1e685d){const _0x20b4ab=a82_0x1654a6;if(typeof _0x1e685d===_0x20b4ab(0xd4))return Number[_0x20b4ab(0xcc)](_0x1e685d)?_0x1e685d:null;if(typeof _0x1e685d!=='string'||_0x1e685d[_0x20b4ab(0xc1)]()==='')return null;const _0x321212=Number(_0x1e685d);if(Number[_0x20b4ab(0xcc)](_0x321212))return _0x321212;const _0x382711=Date[_0x20b4ab(0xde)](_0x1e685d);return Number[_0x20b4ab(0xcb)](_0x382711)?null:_0x382711;}
@@ -1 +1 @@
1
- const a83_0x298ebf=a83_0x2a43;(function(_0x4456e3,_0x4f8b3e){const _0x2739d8=a83_0x2a43,_0x3215b7=_0x4456e3();while(!![]){try{const _0x432830=-parseInt(_0x2739d8(0x160))/0x1*(parseInt(_0x2739d8(0x156))/0x2)+-parseInt(_0x2739d8(0x178))/0x3*(-parseInt(_0x2739d8(0x16b))/0x4)+-parseInt(_0x2739d8(0x176))/0x5*(parseInt(_0x2739d8(0x161))/0x6)+parseInt(_0x2739d8(0x168))/0x7+parseInt(_0x2739d8(0x155))/0x8*(parseInt(_0x2739d8(0x15e))/0x9)+-parseInt(_0x2739d8(0x15f))/0xa*(-parseInt(_0x2739d8(0x157))/0xb)+-parseInt(_0x2739d8(0x150))/0xc*(parseInt(_0x2739d8(0x17d))/0xd);if(_0x432830===_0x4f8b3e)break;else _0x3215b7['push'](_0x3215b7['shift']());}catch(_0x3a57e1){_0x3215b7['push'](_0x3215b7['shift']());}}}(a83_0x8690,0xed59d));function a83_0x2a43(_0x5c7d50,_0x739704){_0x5c7d50=_0x5c7d50-0x150;const _0x8690ad=a83_0x8690();let _0x2a43b7=_0x8690ad[_0x5c7d50];return _0x2a43b7;}import{createDbLink,startDbAnalysis}from'../../core/api-client.js';function a83_0x8690(){const _0x2748e9=['Created\x20db\x20link\x20','Database\x20password','boolean','write','message','9546271lqbTGF','bool','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','28XuzxzV','join','/smartapi/dblink/create','autostart','No\x20follow-up\x20analysis','dbtype','username','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','[redacted]','Extra\x20JDBC-style\x20connection\x20parameters\x20string','dbparam','5YFOXmc','dbname','344391rUiAIP','dbversion','validation','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','Create\x20dblink','1677zYtAxr','string','8.0','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','planId','password','195864mSSyTL','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','databasePage','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','dburl','8sTvPdP','1562yTmkxp','2354BxBLKn','Database\x20username','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','appCode','dbdesc','trim',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','15299469ahcUci','68510JaUkVB','1627KOyEyp','5909838jjqAIX','str'];a83_0x8690=function(){return _0x2748e9;};return a83_0x8690();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':'create','description':a83_0x298ebf(0x172),'risk':a83_0x298ebf(0x166),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a83_0x298ebf(0x177),'type':a83_0x298ebf(0x17e),'required':!![],'description':a83_0x298ebf(0x159)},DB_TYPE_FLAG,{'name':a83_0x298ebf(0x179),'type':a83_0x298ebf(0x17e),'description':a83_0x298ebf(0x180),'default':a83_0x298ebf(0x17f)},{'name':a83_0x298ebf(0x154),'type':a83_0x298ebf(0x17e),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':'username','type':'string','required':!![],'description':a83_0x298ebf(0x158)},{'name':a83_0x298ebf(0x182),'type':a83_0x298ebf(0x17e),'required':!![],'description':a83_0x298ebf(0x164)},{'name':'dbparam','type':a83_0x298ebf(0x17e),'description':a83_0x298ebf(0x174)},{'name':a83_0x298ebf(0x15b),'type':a83_0x298ebf(0x17e),'description':'Human-readable\x20description'},{'name':a83_0x298ebf(0x16e),'type':a83_0x298ebf(0x165),'description':'After\x20create,\x20start\x20schema\x20analysis','default':![]}],async 'validate'(_0x537cc3){const _0x306f61=a83_0x298ebf,_0x3bc53f=_0x537cc3[_0x306f61(0x162)]('dburl')[_0x306f61(0x15c)]();if(!validateDbUrl(_0x3bc53f))throw CliErrors[_0x306f61(0x17a)](_0x306f61(0x153)+_0x3bc53f+'\x22',_0x306f61(0x17b));},async 'dryRun'(_0x4b04d8){const _0x3f1169=a83_0x298ebf,_0x1b4d18={'appCode':_0x4b04d8['appCode'],'dbName':_0x4b04d8[_0x3f1169(0x162)](_0x3f1169(0x177)),'dbType':_0x4b04d8['str'](_0x3f1169(0x170)),'dbVersion':_0x4b04d8[_0x3f1169(0x162)](_0x3f1169(0x179))||_0x3f1169(0x17f),'dbUrl':_0x4b04d8[_0x3f1169(0x162)](_0x3f1169(0x154))[_0x3f1169(0x15c)](),'username':_0x4b04d8['str'](_0x3f1169(0x171)),'password':_0x3f1169(0x173),..._0x4b04d8['str']('dbparam')?{'dbParam':_0x4b04d8[_0x3f1169(0x162)]('dbparam')}:{},..._0x4b04d8[_0x3f1169(0x162)]('dbdesc')?{'dbDesc':_0x4b04d8[_0x3f1169(0x162)]('dbdesc')}:{}};return{'method':'POST','url':_0x3f1169(0x16d),'body':_0x1b4d18,'description':[_0x3f1169(0x17c),_0x4b04d8[_0x3f1169(0x169)](_0x3f1169(0x16e))?_0x3f1169(0x151):_0x3f1169(0x16f)][_0x3f1169(0x16c)]('\x0a')};},async 'execute'(_0x262dc5){const _0x1abc7c=a83_0x298ebf,_0x4a5a36={'appCode':_0x262dc5[_0x1abc7c(0x15a)],'dbName':_0x262dc5[_0x1abc7c(0x162)](_0x1abc7c(0x177)),'dbType':_0x262dc5[_0x1abc7c(0x162)](_0x1abc7c(0x170)),'dbVersion':_0x262dc5[_0x1abc7c(0x162)](_0x1abc7c(0x179))||'8.0','dbUrl':_0x262dc5['str'](_0x1abc7c(0x154))[_0x1abc7c(0x15c)](),'username':_0x262dc5['str'](_0x1abc7c(0x171)),'password':_0x262dc5[_0x1abc7c(0x162)](_0x1abc7c(0x182)),..._0x262dc5['str'](_0x1abc7c(0x175))?{'dbParam':_0x262dc5['str']('dbparam')}:{},..._0x262dc5['str'](_0x1abc7c(0x15b))?{'dbDesc':_0x262dc5[_0x1abc7c(0x162)](_0x1abc7c(0x15b))}:{}},{id:_0x20a91d,entity:_0x1ac30c}=normalizeEntityWithIdResponse(await createDbLink(_0x4a5a36));if(!_0x20a91d)return{'ok':![],'message':_0x1abc7c(0x16a),'data':sanitizeDbLinkForOutput(_0x1ac30c)};let _0x533227,_0x32d0c7;if(_0x262dc5[_0x1abc7c(0x169)]('autostart'))try{_0x533227=(await startDbAnalysis(_0x20a91d))[_0x1abc7c(0x181)];}catch(_0x3fcc2d){_0x32d0c7=_0x3fcc2d instanceof Error?_0x3fcc2d[_0x1abc7c(0x167)]:String(_0x3fcc2d);}const _0x49d66c=buildDbPageLinks(_0x262dc5['appCode'],_0x20a91d),_0x30781f={'connection':sanitizeDbLinkForOutput(_0x1ac30c),..._0x49d66c?{'links':{'databasePage':_0x49d66c[_0x1abc7c(0x152)]}}:{},..._0x533227?{'analysisPlanId':_0x533227}:{},..._0x32d0c7?{'analysisStartWarning':_0x32d0c7}:{}};let _0x1a01b9;return _0x262dc5[_0x1abc7c(0x169)](_0x1abc7c(0x16e))?_0x32d0c7?_0x1a01b9=_0x1abc7c(0x163)+_0x20a91d+_0x1abc7c(0x15d):_0x1a01b9=_0x1abc7c(0x163)+_0x20a91d+'\x20and\x20started\x20analysis':_0x1a01b9=_0x1abc7c(0x163)+_0x20a91d,{'ok':!![],'data':_0x30781f,'message':_0x1a01b9};}};
1
+ function a83_0x1169(_0x2f222e,_0x42a7b4){_0x2f222e=_0x2f222e-0x87;const _0x618c31=a83_0x618c();let _0x116950=_0x618c31[_0x2f222e];return _0x116950;}const a83_0x47a9b6=a83_0x1169;(function(_0x5814cd,_0x5074d5){const _0x4943f3=a83_0x1169,_0x145dca=_0x5814cd();while(!![]){try{const _0x464546=parseInt(_0x4943f3(0x9c))/0x1+-parseInt(_0x4943f3(0x99))/0x2*(parseInt(_0x4943f3(0x8d))/0x3)+parseInt(_0x4943f3(0x98))/0x4*(-parseInt(_0x4943f3(0x9b))/0x5)+-parseInt(_0x4943f3(0x88))/0x6+parseInt(_0x4943f3(0xb1))/0x7*(-parseInt(_0x4943f3(0x89))/0x8)+-parseInt(_0x4943f3(0xaa))/0x9*(-parseInt(_0x4943f3(0x91))/0xa)+-parseInt(_0x4943f3(0xa3))/0xb*(-parseInt(_0x4943f3(0xb6))/0xc);if(_0x464546===_0x5074d5)break;else _0x145dca['push'](_0x145dca['shift']());}catch(_0x5bb84d){_0x145dca['push'](_0x145dca['shift']());}}}(a83_0x618c,0x4ed3f));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a83_0x618c(){const _0xcac4b4=['8.0','message','dburl','11HxcDqI','Human-readable\x20description','appCode','validation','bool','boolean','autostart','180045BTQsWk','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','dbparam','Created\x20db\x20link\x20','create','str','71218SLjrMR','Database\x20password',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','trim','dbtype','2224308MNeRbj','No\x20follow-up\x20analysis','256416qbUxwF','200BPBtrz','dbversion','string','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','10731JFXZwp','planId','/smartapi/dblink/create','password','300OHHfyB','username','Database\x20username','dbdesc','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','After\x20create,\x20start\x20schema\x20analysis','databasePage','330944xpUdnN','172WAjcEs','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','30TPnnGj','638494OkcFDM','join','dbname','POST'];a83_0x618c=function(){return _0xcac4b4;};return a83_0x618c();}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a83_0x47a9b6(0xaf),'description':a83_0x47a9b6(0x8c),'risk':'write','flags':[APPCODE_FLAG_OPTIONAL,{'name':a83_0x47a9b6(0x9e),'type':a83_0x47a9b6(0x8b),'required':!![],'description':a83_0x47a9b6(0xab)},DB_TYPE_FLAG,{'name':a83_0x47a9b6(0x8a),'type':a83_0x47a9b6(0x8b),'description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':'8.0'},{'name':a83_0x47a9b6(0xa2),'type':a83_0x47a9b6(0x8b),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a83_0x47a9b6(0x92),'type':'string','required':!![],'description':a83_0x47a9b6(0x93)},{'name':a83_0x47a9b6(0x90),'type':a83_0x47a9b6(0x8b),'required':!![],'description':a83_0x47a9b6(0xb2)},{'name':a83_0x47a9b6(0xad),'type':a83_0x47a9b6(0x8b),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':'dbdesc','type':'string','description':a83_0x47a9b6(0xa4)},{'name':a83_0x47a9b6(0xa9),'type':a83_0x47a9b6(0xa8),'description':a83_0x47a9b6(0x96),'default':![]}],async 'validate'(_0x2590b0){const _0xf2ad03=a83_0x47a9b6,_0x147924=_0x2590b0[_0xf2ad03(0xb0)](_0xf2ad03(0xa2))[_0xf2ad03(0xb4)]();if(!validateDbUrl(_0x147924))throw CliErrors[_0xf2ad03(0xa6)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x147924+'\x22',_0xf2ad03(0x95));},async 'dryRun'(_0x4e7883){const _0x4d1679=a83_0x47a9b6,_0x2c0b05={'appCode':_0x4e7883[_0x4d1679(0xa5)],'dbName':_0x4e7883['str'](_0x4d1679(0x9e)),'dbType':_0x4e7883[_0x4d1679(0xb0)]('dbtype'),'dbVersion':_0x4e7883[_0x4d1679(0xb0)]('dbversion')||_0x4d1679(0xa0),'dbUrl':_0x4e7883[_0x4d1679(0xb0)](_0x4d1679(0xa2))[_0x4d1679(0xb4)](),'username':_0x4e7883[_0x4d1679(0xb0)]('username'),'password':'[redacted]',..._0x4e7883[_0x4d1679(0xb0)](_0x4d1679(0xad))?{'dbParam':_0x4e7883['str'](_0x4d1679(0xad))}:{},..._0x4e7883[_0x4d1679(0xb0)]('dbdesc')?{'dbDesc':_0x4e7883[_0x4d1679(0xb0)](_0x4d1679(0x94))}:{}};return{'method':_0x4d1679(0x9f),'url':_0x4d1679(0x8f),'body':_0x2c0b05,'description':['Create\x20dblink',_0x4e7883[_0x4d1679(0xa7)](_0x4d1679(0xa9))?_0x4d1679(0x9a):_0x4d1679(0x87)][_0x4d1679(0x9d)]('\x0a')};},async 'execute'(_0x2a2a6a){const _0xd3ee3c=a83_0x47a9b6,_0x1ee76c={'appCode':_0x2a2a6a[_0xd3ee3c(0xa5)],'dbName':_0x2a2a6a['str']('dbname'),'dbType':_0x2a2a6a[_0xd3ee3c(0xb0)](_0xd3ee3c(0xb5)),'dbVersion':_0x2a2a6a[_0xd3ee3c(0xb0)](_0xd3ee3c(0x8a))||_0xd3ee3c(0xa0),'dbUrl':_0x2a2a6a[_0xd3ee3c(0xb0)](_0xd3ee3c(0xa2))[_0xd3ee3c(0xb4)](),'username':_0x2a2a6a['str'](_0xd3ee3c(0x92)),'password':_0x2a2a6a[_0xd3ee3c(0xb0)](_0xd3ee3c(0x90)),..._0x2a2a6a[_0xd3ee3c(0xb0)](_0xd3ee3c(0xad))?{'dbParam':_0x2a2a6a[_0xd3ee3c(0xb0)]('dbparam')}:{},..._0x2a2a6a[_0xd3ee3c(0xb0)](_0xd3ee3c(0x94))?{'dbDesc':_0x2a2a6a['str'](_0xd3ee3c(0x94))}:{}},{id:_0x55fadc,entity:_0x1b0ae0}=normalizeEntityWithIdResponse(await createDbLink(_0x1ee76c));if(!_0x55fadc)return{'ok':![],'message':_0xd3ee3c(0xac),'data':sanitizeDbLinkForOutput(_0x1b0ae0)};let _0x3080e6,_0x379084;if(_0x2a2a6a[_0xd3ee3c(0xa7)](_0xd3ee3c(0xa9)))try{_0x3080e6=(await startDbAnalysis(_0x55fadc))[_0xd3ee3c(0x8e)];}catch(_0x2fdfbe){_0x379084=_0x2fdfbe instanceof Error?_0x2fdfbe[_0xd3ee3c(0xa1)]:String(_0x2fdfbe);}const _0x467f96=buildDbPageLinks(_0x2a2a6a[_0xd3ee3c(0xa5)],_0x55fadc),_0x3bb22c={'connection':sanitizeDbLinkForOutput(_0x1b0ae0),..._0x467f96?{'links':{'databasePage':_0x467f96[_0xd3ee3c(0x97)]}}:{},..._0x3080e6?{'analysisPlanId':_0x3080e6}:{},..._0x379084?{'analysisStartWarning':_0x379084}:{}};let _0x482f75;return _0x2a2a6a[_0xd3ee3c(0xa7)](_0xd3ee3c(0xa9))?_0x379084?_0x482f75=_0xd3ee3c(0xae)+_0x55fadc+_0xd3ee3c(0xb3):_0x482f75='Created\x20db\x20link\x20'+_0x55fadc+'\x20and\x20started\x20analysis':_0x482f75=_0xd3ee3c(0xae)+_0x55fadc,{'ok':!![],'data':_0x3bb22c,'message':_0x482f75};}};
@@ -1 +1 @@
1
- const a84_0x55e4c8=a84_0x5417;(function(_0x282e1a,_0x4eef3f){const _0x16a37a=a84_0x5417,_0x54c0b1=_0x282e1a();while(!![]){try{const _0x225bdc=parseInt(_0x16a37a(0x175))/0x1+-parseInt(_0x16a37a(0x174))/0x2+parseInt(_0x16a37a(0x16f))/0x3*(parseInt(_0x16a37a(0x172))/0x4)+parseInt(_0x16a37a(0x16c))/0x5+-parseInt(_0x16a37a(0x16e))/0x6+parseInt(_0x16a37a(0x171))/0x7+-parseInt(_0x16a37a(0x170))/0x8;if(_0x225bdc===_0x4eef3f)break;else _0x54c0b1['push'](_0x54c0b1['shift']());}catch(_0x565439){_0x54c0b1['push'](_0x54c0b1['shift']());}}}(a84_0x15f5,0x193f0));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a84_0x15f5(){const _0x47ca89=['1001840lAivVv','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','39510SXvRyX','3ZfAUOJ','2952232VbGSvC','1135764FQehbW','107236jKQZPJ','num','56056eAglpS','117621dZvbgF','delete'];a84_0x15f5=function(){return _0x47ca89;};return a84_0x15f5();}function a84_0x5417(_0x4aa137,_0x2f3f87){_0x4aa137=_0x4aa137-0x16b;const _0x15f568=a84_0x15f5();let _0x5417b8=_0x15f568[_0x4aa137];return _0x5417b8;}export const dbDelete={'service':'db','command':a84_0x55e4c8(0x16b),'description':a84_0x55e4c8(0x16d),'risk':'high-risk-write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5e95f6){const _0xa67f41=a84_0x55e4c8,_0x525a3f=_0x5e95f6[_0xa67f41(0x173)]('id');return await deleteDbLink(_0x525a3f),{'ok':!![],'data':{'id':_0x525a3f,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x525a3f};}};
1
+ const a84_0xb53f3d=a84_0x45eb;function a84_0x45eb(_0x1a6dda,_0x500181){_0x1a6dda=_0x1a6dda-0x134;const _0x10ea08=a84_0x10ea();let _0x45eb0a=_0x10ea08[_0x1a6dda];return _0x45eb0a;}(function(_0x31563e,_0x155010){const _0x556cea=a84_0x45eb,_0x55527a=_0x31563e();while(!![]){try{const _0x58faa7=-parseInt(_0x556cea(0x13a))/0x1+parseInt(_0x556cea(0x134))/0x2+parseInt(_0x556cea(0x135))/0x3+-parseInt(_0x556cea(0x13c))/0x4*(-parseInt(_0x556cea(0x136))/0x5)+parseInt(_0x556cea(0x13f))/0x6*(-parseInt(_0x556cea(0x137))/0x7)+parseInt(_0x556cea(0x13d))/0x8+-parseInt(_0x556cea(0x139))/0x9*(-parseInt(_0x556cea(0x138))/0xa);if(_0x58faa7===_0x155010)break;else _0x55527a['push'](_0x55527a['shift']());}catch(_0x29f07a){_0x55527a['push'](_0x55527a['shift']());}}}(a84_0x10ea,0x8da26));import{deleteDbLink}from'../../core/api-client.js';function a84_0x10ea(){const _0x4d0bac=['940954UqRJKB','num','4zahWlS','3719504kYKcHS','high-risk-write','1552098tauESK','784854NDrLTb','33603fWZMhK','2433985HiraCc','7sjdDYM','530510HOyTEe','72bHMWgs'];a84_0x10ea=function(){return _0x4d0bac;};return a84_0x10ea();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':'delete','description':'Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','risk':a84_0xb53f3d(0x13e),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2e4421){const _0x49649e=a84_0xb53f3d,_0x4d3fcd=_0x2e4421[_0x49649e(0x13b)]('id');return await deleteDbLink(_0x4d3fcd),{'ok':!![],'data':{'id':_0x4d3fcd,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x4d3fcd};}};
@@ -1 +1 @@
1
- const a85_0x5bd127=a85_0x1429;function a85_0x1429(_0x81fc19,_0x38c12d){_0x81fc19=_0x81fc19-0x19a;const _0x3ddad6=a85_0x3dda();let _0x142948=_0x3ddad6[_0x81fc19];return _0x142948;}(function(_0xd7824a,_0x3a0f6d){const _0x132d38=a85_0x1429,_0x4a6800=_0xd7824a();while(!![]){try{const _0x4e82e6=-parseInt(_0x132d38(0x1a1))/0x1*(-parseInt(_0x132d38(0x1a5))/0x2)+parseInt(_0x132d38(0x1a4))/0x3*(-parseInt(_0x132d38(0x1a6))/0x4)+parseInt(_0x132d38(0x19c))/0x5+-parseInt(_0x132d38(0x19e))/0x6+parseInt(_0x132d38(0x1a7))/0x7*(-parseInt(_0x132d38(0x1a3))/0x8)+-parseInt(_0x132d38(0x19d))/0x9+parseInt(_0x132d38(0x1a0))/0xa;if(_0x4e82e6===_0x3a0f6d)break;else _0x4a6800['push'](_0x4a6800['shift']());}catch(_0x12f629){_0x4a6800['push'](_0x4a6800['shift']());}}}(a85_0x3dda,0x3cb61));import{getDbLinkInfo}from'../../core/api-client.js';function a85_0x3dda(){const _0x382e72=['num','722380pnWzve','1nfZJNi','detail','1384rpHQSy','3BCGcBY','328046XQDCqD','175588ajpcHA','3591LnOozJ','db\x20link\x20','dbName','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','2269700wYIulS','1535895UnnTyl','829362OTZCqU'];a85_0x3dda=function(){return _0x382e72;};return a85_0x3dda();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a85_0x5bd127(0x1a2),'description':a85_0x5bd127(0x19b),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x59c2ac){const _0x2e7fe1=a85_0x5bd127,_0x3fcc02=_0x59c2ac[_0x2e7fe1(0x19f)]('id'),_0x111d07=await getDbLinkInfo(_0x3fcc02);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x111d07),'message':_0x2e7fe1(0x1a8)+_0x3fcc02+':\x20'+_0x111d07[_0x2e7fe1(0x19a)]};}};
1
+ const a85_0x351fea=a85_0x1f58;(function(_0x2d7cf9,_0x983797){const _0x340cf9=a85_0x1f58,_0x2f3209=_0x2d7cf9();while(!![]){try{const _0x559880=-parseInt(_0x340cf9(0x1f1))/0x1*(-parseInt(_0x340cf9(0x1f2))/0x2)+parseInt(_0x340cf9(0x1f0))/0x3+parseInt(_0x340cf9(0x1ea))/0x4*(parseInt(_0x340cf9(0x1e8))/0x5)+parseInt(_0x340cf9(0x1ef))/0x6*(-parseInt(_0x340cf9(0x1eb))/0x7)+parseInt(_0x340cf9(0x1f3))/0x8+parseInt(_0x340cf9(0x1ec))/0x9+-parseInt(_0x340cf9(0x1ed))/0xa;if(_0x559880===_0x983797)break;else _0x2f3209['push'](_0x2f3209['shift']());}catch(_0x19fc49){_0x2f3209['push'](_0x2f3209['shift']());}}}(a85_0x2c38,0x81eda));function a85_0x1f58(_0x4f16b9,_0x20f4af){_0x4f16b9=_0x4f16b9-0x1e7;const _0x2c38ff=a85_0x2c38();let _0x1f588a=_0x2c38ff[_0x4f16b9];return _0x1f588a;}import{getDbLinkInfo}from'../../core/api-client.js';function a85_0x2c38(){const _0x171528=['3745091BuDhds','1234251qHKjey','11406030ZAmEKv','db\x20link\x20','6tHkpxA','3101211mQBHnQ','1CaaGnA','1593380YrymdF','1914112NtwyPq','read','detail','num','45qqJojs','dbName','432bBIIWo'];a85_0x2c38=function(){return _0x171528;};return a85_0x2c38();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a85_0x351fea(0x1f5),'description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':a85_0x351fea(0x1f4),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x49646f){const _0x344861=a85_0x351fea,_0x14d5c9=_0x49646f[_0x344861(0x1e7)]('id'),_0x175759=await getDbLinkInfo(_0x14d5c9);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x175759),'message':_0x344861(0x1ee)+_0x14d5c9+':\x20'+_0x175759[_0x344861(0x1e9)]};}};
@@ -1 +1 @@
1
- const a86_0x5b560f=a86_0x27a0;(function(_0x2b9981,_0x3c0d78){const _0x38ca9f=a86_0x27a0,_0x425205=_0x2b9981();while(!![]){try{const _0x524d3f=parseInt(_0x38ca9f(0x1c6))/0x1+-parseInt(_0x38ca9f(0x1ce))/0x2+parseInt(_0x38ca9f(0x1d1))/0x3+-parseInt(_0x38ca9f(0x1e7))/0x4+-parseInt(_0x38ca9f(0x1cf))/0x5*(-parseInt(_0x38ca9f(0x1cb))/0x6)+parseInt(_0x38ca9f(0x1e9))/0x7*(-parseInt(_0x38ca9f(0x1df))/0x8)+-parseInt(_0x38ca9f(0x1d0))/0x9*(-parseInt(_0x38ca9f(0x1d9))/0xa);if(_0x524d3f===_0x3c0d78)break;else _0x425205['push'](_0x425205['shift']());}catch(_0x289dda){_0x425205['push'](_0x425205['shift']());}}}(a86_0x4913,0xd3d53));function a86_0x4913(){const _0x281717=['map','size','4735880DPtJoa','appCode','diffType','\x20(db\x20link\x20','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','tableName','56HfbUTW','all','datasetTableCount','fromEntries','str','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','Page\x20size','filter','136688uMpNUC','physicalTableCount','1617119YzrwKl','values','pagesize','num','number','\x20of\x20','page','table','DELETED_TABLE','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','read','length','1130269pabrut','MODIFIED_TABLE','tableList','set','totalCount','6369078bCZPAX','changed-only','NEW_TABLE','2075444lzkVLs','5ETvLYA','18FtkPlg','1253166wsEblh','string','\x20row(s),\x20total\x20','summary','addedColumns','boolean'];a86_0x4913=function(){return _0x281717;};return a86_0x4913();}import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a86_0x5b560f(0x1cd),'MODIFIED_TABLE',a86_0x5b560f(0x1c2),'ALREADY_ANALYZED'];function a86_0x27a0(_0x42cf50,_0x225e95){_0x42cf50=_0x42cf50-0x1c2;const _0x4913c3=a86_0x4913();let _0x27a00b=_0x4913c3[_0x42cf50];return _0x27a00b;}export const dbDiff={'service':'db','command':'diff','description':a86_0x5b560f(0x1c3),'risk':a86_0x5b560f(0x1c4),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x5b560f(0x1f0),'type':a86_0x5b560f(0x1d2),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a86_0x5b560f(0x1ef),'type':a86_0x5b560f(0x1ed),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a86_0x5b560f(0x1eb),'type':a86_0x5b560f(0x1ed),'description':a86_0x5b560f(0x1e5),'default':0x14},{'name':a86_0x5b560f(0x1e0),'type':a86_0x5b560f(0x1d6),'description':a86_0x5b560f(0x1e4)},{'name':a86_0x5b560f(0x1cc),'type':a86_0x5b560f(0x1d6),'description':'Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables'}],async 'execute'(_0x3b3a52){const _0x343c73=a86_0x5b560f,_0x5ef06e=_0x3b3a52[_0x343c73(0x1ec)]('id'),_0x3760a7=_0x3b3a52['bool'](_0x343c73(0x1e0)),_0x3d7041=_0x3b3a52['bool'](_0x343c73(0x1cc)),_0x6d8763=_0x3760a7?0x1:_0x3b3a52[_0x343c73(0x1ec)](_0x343c73(0x1ef),0x1)||0x1,_0x16cd42=_0x3760a7?ALL_PAGE_SIZE:_0x3b3a52[_0x343c73(0x1ec)](_0x343c73(0x1eb),0x14)||0x14,_0x4f7f37=_0x3b3a52[_0x343c73(0x1e3)]('table')||undefined,_0x5ddafb=_0x3760a7?await getAllDbTableDiff(_0x3b3a52[_0x343c73(0x1da)],_0x5ef06e,_0x4f7f37):await getDbTableDiff(_0x3b3a52['appCode'],_0x5ef06e,{'pageIndex':_0x6d8763,'pageSize':_0x16cd42,'tableName':_0x4f7f37}),_0x52bae0=_0x5ddafb[_0x343c73(0x1c8)],_0x5eca68=_0x3d7041?_0x52bae0['filter'](_0x4b6d39=>_0x4b6d39[_0x343c73(0x1db)]!=='ALREADY_ANALYZED'):_0x52bae0,_0x1f0ef9=Object[_0x343c73(0x1e2)](DIFF_TYPES['map'](_0xd6f99b=>[_0xd6f99b,_0x52bae0[_0x343c73(0x1e6)](_0x1f5322=>_0x1f5322[_0x343c73(0x1db)]===_0xd6f99b)['length']])),_0xb6ea36=_0x52bae0[_0x343c73(0x1e6)](_0x552213=>_0x552213[_0x343c73(0x1db)]===_0x343c73(0x1cd)||_0x552213[_0x343c73(0x1db)]===_0x343c73(0x1c7))['map'](_0x6b80aa=>_0x6b80aa[_0x343c73(0x1de)]),_0x346cc7=_0x52bae0[_0x343c73(0x1e6)](_0x4fb356=>_0x4fb356[_0x343c73(0x1db)]===_0x343c73(0x1c2))[_0x343c73(0x1d7)](_0x94401d=>_0x94401d[_0x343c73(0x1de)]),_0x6aa4f8=_0x52bae0['filter'](_0x15fc10=>_0x15fc10[_0x343c73(0x1db)]===_0x343c73(0x1c7))[_0x343c73(0x1d7)](_0x2b972a=>({'tableName':_0x2b972a['tableName'],'addedColumns':_0x2b972a['fieldDiff']?.[_0x343c73(0x1d5)]??[],'deletedColumns':_0x2b972a['fieldDiff']?.['deletedColumns']??[],'modifiedColumns':_0x2b972a['fieldDiff']?.['modifiedColumns']??[]}));return{'ok':!![],'data':{'dbLinkId':_0x5ef06e,'page':_0x6d8763,'pageSize':_0x16cd42,'totalCount':_0x5ddafb[_0x343c73(0x1ca)],'physicalTableCount':_0x5ddafb['physicalTableCount'],'datasetTableCount':_0x5ddafb[_0x343c73(0x1e1)],..._0x5ddafb['summary']?{'summary':_0x5ddafb['summary']}:{},'summaryByType':_0x1f0ef9,'toAnalyzeTables':_0xb6ea36,'deletedTables':_0x346cc7,'modifiedFieldDiffs':_0x6aa4f8,'tables':_0x5eca68,'tableList':_0x5eca68},'message':_0x5eca68[_0x343c73(0x1c5)]+_0x343c73(0x1d3)+_0x5ddafb[_0x343c73(0x1ca)]+_0x343c73(0x1dc)+_0x5ef06e+')'};}};async function getAllDbTableDiff(_0x158090,_0x770560,_0x474ab2){const _0xf882bf=a86_0x5b560f,_0x5c88a7=new Map();let _0x48094d=0x1,_0x441f08=null;while(!![]){_0x441f08=await getDbTableDiff(_0x158090,_0x770560,{'pageIndex':_0x48094d,'pageSize':ALL_PAGE_SIZE,'tableName':_0x474ab2});const _0x1903be=_0x5c88a7[_0xf882bf(0x1d8)];for(const _0x423ea2 of _0x441f08[_0xf882bf(0x1c8)]){_0x5c88a7[_0xf882bf(0x1c9)](_0x423ea2[_0xf882bf(0x1de)],_0x423ea2);}if(_0x5c88a7[_0xf882bf(0x1d8)]>=_0x441f08[_0xf882bf(0x1ca)])break;if(_0x441f08[_0xf882bf(0x1c8)][_0xf882bf(0x1c5)]===0x0||_0x5c88a7[_0xf882bf(0x1d8)]===_0x1903be)throw CliErrors['validation'](_0xf882bf(0x1dd)+_0x5c88a7[_0xf882bf(0x1d8)]+_0xf882bf(0x1ee)+_0x441f08[_0xf882bf(0x1ca)]+'\x20row(s).');_0x48094d+=0x1;}return{'totalCount':_0x441f08?.['totalCount']??0x0,'physicalTableCount':_0x441f08?.[_0xf882bf(0x1e8)]??0x0,'datasetTableCount':_0x441f08?.[_0xf882bf(0x1e1)]??0x0,..._0x441f08?.[_0xf882bf(0x1d4)]?{'summary':_0x441f08[_0xf882bf(0x1d4)]}:{},'tableList':[..._0x5c88a7[_0xf882bf(0x1ea)]()]};}
1
+ const a86_0x3d2ae1=a86_0x7ac5;(function(_0x5d3e4a,_0x38f5b7){const _0x301a18=a86_0x7ac5,_0x26a997=_0x5d3e4a();while(!![]){try{const _0x1a4e7d=parseInt(_0x301a18(0x7c))/0x1+parseInt(_0x301a18(0x7f))/0x2+parseInt(_0x301a18(0x8f))/0x3*(-parseInt(_0x301a18(0xa1))/0x4)+parseInt(_0x301a18(0x8c))/0x5+parseInt(_0x301a18(0x96))/0x6+parseInt(_0x301a18(0xa3))/0x7+-parseInt(_0x301a18(0x9f))/0x8*(parseInt(_0x301a18(0x7b))/0x9);if(_0x1a4e7d===_0x38f5b7)break;else _0x26a997['push'](_0x26a997['shift']());}catch(_0x2d293f){_0x26a997['push'](_0x26a997['shift']());}}}(a86_0x138d,0x8df34));import{getDbTableDiff}from'../../core/api-client.js';function a86_0x138d(){const _0x55c2d4=['MODIFIED_TABLE','filter','\x20of\x20','diffType','datasetTableCount','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','length','set','validation','2795180KrtNvU','size','values','3sPyZOM','appCode','bool','table','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','pagesize','\x20row(s),\x20total\x20','6503544mjIrCS','totalCount','tableName','addedColumns','changed-only','summary','page','tableList','\x20(db\x20link\x20','56Nacadh','map','247652KOpnnY','read','2368569kIOocP','num','string','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','str','DELETED_TABLE','all','2507337BxBcgz','525564LdWSLA','Page\x20size','ALREADY_ANALYZED','173202YGVtfT','fieldDiff','number'];a86_0x138d=function(){return _0x55c2d4;};return a86_0x138d();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=['NEW_TABLE',a86_0x3d2ae1(0x82),a86_0x3d2ae1(0x79),'ALREADY_ANALYZED'];export const dbDiff={'service':'db','command':'diff','description':'Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','risk':a86_0x3d2ae1(0xa2),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x3d2ae1(0x92),'type':a86_0x3d2ae1(0xa5),'description':a86_0x3d2ae1(0x87)},{'name':a86_0x3d2ae1(0x9c),'type':a86_0x3d2ae1(0x81),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':'pagesize','type':'number','description':a86_0x3d2ae1(0x7d),'default':0x14},{'name':a86_0x3d2ae1(0x7a),'type':'boolean','description':a86_0x3d2ae1(0x93)},{'name':a86_0x3d2ae1(0x9a),'type':'boolean','description':a86_0x3d2ae1(0xa6)}],async 'execute'(_0x254bd8){const _0x581154=a86_0x3d2ae1,_0x3937a9=_0x254bd8[_0x581154(0xa4)]('id'),_0x5495ca=_0x254bd8[_0x581154(0x91)]('all'),_0x3e9655=_0x254bd8[_0x581154(0x91)](_0x581154(0x9a)),_0x60f933=_0x5495ca?0x1:_0x254bd8['num'](_0x581154(0x9c),0x1)||0x1,_0x3e4a00=_0x5495ca?ALL_PAGE_SIZE:_0x254bd8['num'](_0x581154(0x94),0x14)||0x14,_0x21251c=_0x254bd8[_0x581154(0xa7)]('table')||undefined,_0x7a83eb=_0x5495ca?await getAllDbTableDiff(_0x254bd8[_0x581154(0x90)],_0x3937a9,_0x21251c):await getDbTableDiff(_0x254bd8[_0x581154(0x90)],_0x3937a9,{'pageIndex':_0x60f933,'pageSize':_0x3e4a00,'tableName':_0x21251c}),_0x4bcb83=_0x7a83eb[_0x581154(0x9d)],_0x43f1cd=_0x3e9655?_0x4bcb83[_0x581154(0x83)](_0x2cfb37=>_0x2cfb37[_0x581154(0x85)]!==_0x581154(0x7e)):_0x4bcb83,_0x1f1af6=Object['fromEntries'](DIFF_TYPES[_0x581154(0xa0)](_0x1d2796=>[_0x1d2796,_0x4bcb83[_0x581154(0x83)](_0x35c28a=>_0x35c28a[_0x581154(0x85)]===_0x1d2796)[_0x581154(0x89)]])),_0x4d4219=_0x4bcb83['filter'](_0x27957b=>_0x27957b[_0x581154(0x85)]==='NEW_TABLE'||_0x27957b[_0x581154(0x85)]==='MODIFIED_TABLE')[_0x581154(0xa0)](_0x17a946=>_0x17a946[_0x581154(0x98)]),_0x560b58=_0x4bcb83['filter'](_0x2c74d8=>_0x2c74d8[_0x581154(0x85)]==='DELETED_TABLE')[_0x581154(0xa0)](_0x449700=>_0x449700['tableName']),_0x340877=_0x4bcb83[_0x581154(0x83)](_0x33bacb=>_0x33bacb[_0x581154(0x85)]==='MODIFIED_TABLE')['map'](_0x186f11=>({'tableName':_0x186f11[_0x581154(0x98)],'addedColumns':_0x186f11[_0x581154(0x80)]?.[_0x581154(0x99)]??[],'deletedColumns':_0x186f11[_0x581154(0x80)]?.['deletedColumns']??[],'modifiedColumns':_0x186f11[_0x581154(0x80)]?.['modifiedColumns']??[]}));return{'ok':!![],'data':{'dbLinkId':_0x3937a9,'page':_0x60f933,'pageSize':_0x3e4a00,'totalCount':_0x7a83eb['totalCount'],'physicalTableCount':_0x7a83eb['physicalTableCount'],'datasetTableCount':_0x7a83eb[_0x581154(0x86)],..._0x7a83eb[_0x581154(0x9b)]?{'summary':_0x7a83eb[_0x581154(0x9b)]}:{},'summaryByType':_0x1f1af6,'toAnalyzeTables':_0x4d4219,'deletedTables':_0x560b58,'modifiedFieldDiffs':_0x340877,'tables':_0x43f1cd,'tableList':_0x43f1cd},'message':_0x43f1cd['length']+_0x581154(0x95)+_0x7a83eb[_0x581154(0x97)]+_0x581154(0x9e)+_0x3937a9+')'};}};function a86_0x7ac5(_0x3af37a,_0x5ef2cb){_0x3af37a=_0x3af37a-0x79;const _0x138d24=a86_0x138d();let _0x7ac548=_0x138d24[_0x3af37a];return _0x7ac548;}async function getAllDbTableDiff(_0x514209,_0xaaf5f9,_0x3344e8){const _0x391971=a86_0x3d2ae1,_0x4a3b73=new Map();let _0x2b1be3=0x1,_0x58b0a7=null;while(!![]){_0x58b0a7=await getDbTableDiff(_0x514209,_0xaaf5f9,{'pageIndex':_0x2b1be3,'pageSize':ALL_PAGE_SIZE,'tableName':_0x3344e8});const _0x2b63ab=_0x4a3b73[_0x391971(0x8d)];for(const _0x15d08d of _0x58b0a7[_0x391971(0x9d)]){_0x4a3b73[_0x391971(0x8a)](_0x15d08d['tableName'],_0x15d08d);}if(_0x4a3b73[_0x391971(0x8d)]>=_0x58b0a7[_0x391971(0x97)])break;if(_0x58b0a7[_0x391971(0x9d)][_0x391971(0x89)]===0x0||_0x4a3b73[_0x391971(0x8d)]===_0x2b63ab)throw CliErrors[_0x391971(0x8b)](_0x391971(0x88)+_0x4a3b73[_0x391971(0x8d)]+_0x391971(0x84)+_0x58b0a7[_0x391971(0x97)]+'\x20row(s).');_0x2b1be3+=0x1;}return{'totalCount':_0x58b0a7?.[_0x391971(0x97)]??0x0,'physicalTableCount':_0x58b0a7?.['physicalTableCount']??0x0,'datasetTableCount':_0x58b0a7?.[_0x391971(0x86)]??0x0,..._0x58b0a7?.[_0x391971(0x9b)]?{'summary':_0x58b0a7[_0x391971(0x9b)]}:{},'tableList':[..._0x4a3b73[_0x391971(0x8e)]()]};}
@@ -1 +1 @@
1
- (function(_0x37706b,_0x1633d1){const _0x2613e4=a87_0x1d2c,_0x15b9ff=_0x37706b();while(!![]){try{const _0x5c8844=-parseInt(_0x2613e4(0x1de))/0x1*(parseInt(_0x2613e4(0x1dd))/0x2)+-parseInt(_0x2613e4(0x1e0))/0x3*(parseInt(_0x2613e4(0x1e1))/0x4)+-parseInt(_0x2613e4(0x1e6))/0x5+-parseInt(_0x2613e4(0x1db))/0x6*(parseInt(_0x2613e4(0x1e2))/0x7)+-parseInt(_0x2613e4(0x1e3))/0x8*(parseInt(_0x2613e4(0x1e5))/0x9)+-parseInt(_0x2613e4(0x1e4))/0xa*(-parseInt(_0x2613e4(0x1df))/0xb)+parseInt(_0x2613e4(0x1dc))/0xc;if(_0x5c8844===_0x1633d1)break;else _0x15b9ff['push'](_0x15b9ff['shift']());}catch(_0x532f74){_0x15b9ff['push'](_0x15b9ff['shift']());}}}(a87_0x4582,0x26da0));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 a87_0x4582(){const _0x54eff7=['7FWSfsE','8YQiMCC','40NFDKap','521523dfOKMA','392895vidLYo','268110RaWpfM','5807400LhGkwe','914rfxmGC','163KSsgwZ','382085HuGyjt','312078aMlydo','8SbsjAP'];a87_0x4582=function(){return _0x54eff7;};return a87_0x4582();}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';function a87_0x1d2c(_0x3a306c,_0x22c309){_0x3a306c=_0x3a306c-0x1db;const _0x458285=a87_0x4582();let _0x1d2ca7=_0x458285[_0x3a306c];return _0x1d2ca7;}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';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
1
+ (function(_0x1565b4,_0x5e9de4){const _0x3b0000=a87_0x8589,_0x253410=_0x1565b4();while(!![]){try{const _0x885e81=-parseInt(_0x3b0000(0x6a))/0x1*(-parseInt(_0x3b0000(0x6c))/0x2)+parseInt(_0x3b0000(0x68))/0x3*(-parseInt(_0x3b0000(0x6b))/0x4)+-parseInt(_0x3b0000(0x6f))/0x5+-parseInt(_0x3b0000(0x69))/0x6+parseInt(_0x3b0000(0x66))/0x7*(-parseInt(_0x3b0000(0x6e))/0x8)+-parseInt(_0x3b0000(0x6d))/0x9*(parseInt(_0x3b0000(0x65))/0xa)+parseInt(_0x3b0000(0x67))/0xb;if(_0x885e81===_0x5e9de4)break;else _0x253410['push'](_0x253410['shift']());}catch(_0x3984b3){_0x253410['push'](_0x253410['shift']());}}}(a87_0x45d6,0x4feb3));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';function a87_0x45d6(){const _0xf9a3fc=['18914445kTxgQP','9XrMQwR','2099610dceTHX','1JNaBEG','859944VYGxov','1270122cyUibF','9ZSbcDW','3824GndzKr','350120KRNrPH','5574260tpiTwM','5929JDvxZG'];a87_0x45d6=function(){return _0xf9a3fc;};return a87_0x45d6();}import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';function a87_0x8589(_0x7c2e50,_0x56b9dd){_0x7c2e50=_0x7c2e50-0x65;const _0x45d672=a87_0x45d6();let _0x85894=_0x45d672[_0x7c2e50];return _0x85894;}import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
@@ -1 +1 @@
1
- function a88_0xb941(){const _0x33b11f=['310160aMTNkf','Page\x20index\x20(1-based)','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','num','Page\x20size','13lPFZwA','Found\x20','17bypXkI','11468OaZNNm','1812DYTgkH','list','4836816urIIwk','6vZLQkD','62279ebcAps','page','112dKJVcp','pagesize','read','number','478257TbPifJ','44YhwOqd','length','109413bRtOOs','640mhdwre'];a88_0xb941=function(){return _0x33b11f;};return a88_0xb941();}const a88_0x455ed7=a88_0x5ab6;(function(_0x1be0d4,_0xa2fefd){const _0x326eac=a88_0x5ab6,_0x5ed805=_0x1be0d4();while(!![]){try{const _0x417122=parseInt(_0x326eac(0x1f9))/0x1*(-parseInt(_0x326eac(0x1fa))/0x2)+-parseInt(_0x326eac(0x205))/0x3+parseInt(_0x326eac(0x1fb))/0x4*(-parseInt(_0x326eac(0x1f1))/0x5)+-parseInt(_0x326eac(0x1fe))/0x6*(-parseInt(_0x326eac(0x1ff))/0x7)+-parseInt(_0x326eac(0x201))/0x8*(-parseInt(_0x326eac(0x208))/0x9)+parseInt(_0x326eac(0x1f2))/0xa*(-parseInt(_0x326eac(0x206))/0xb)+parseInt(_0x326eac(0x1fd))/0xc*(parseInt(_0x326eac(0x1f7))/0xd);if(_0x417122===_0xa2fefd)break;else _0x5ed805['push'](_0x5ed805['shift']());}catch(_0x5f5daa){_0x5ed805['push'](_0x5ed805['shift']());}}}(a88_0xb941,0x22f72));import{listDbLinks}from'../../core/api-client.js';function a88_0x5ab6(_0x5a6de6,_0x2b21e9){_0x5a6de6=_0x5a6de6-0x1f1;const _0xb941af=a88_0xb941();let _0x5ab64c=_0xb941af[_0x5a6de6];return _0x5ab64c;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a88_0x455ed7(0x1fc),'description':'List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','risk':a88_0x455ed7(0x203),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a88_0x455ed7(0x200),'type':a88_0x455ed7(0x204),'description':a88_0x455ed7(0x1f3),'default':0x1},{'name':a88_0x455ed7(0x202),'type':a88_0x455ed7(0x204),'description':a88_0x455ed7(0x1f6),'default':0x64}],async 'execute'(_0x2499ae){const _0x484b10=a88_0x455ed7,_0x5e6dc4=_0x2499ae[_0x484b10(0x1f5)](_0x484b10(0x200),0x1)||0x1,_0x21a1a3=_0x2499ae['num'](_0x484b10(0x202),0x64)||0x64,{items:_0x511b8b,paging:_0x2682d7}=await listDbLinks(_0x2499ae['appCode'],{'currentPage':_0x5e6dc4,'pageSize':_0x21a1a3}),_0x5aebdc=sanitizeDbLinkList(_0x511b8b),_0x439d61=_0x2682d7?_0x2682d7:{'currentPage':_0x5e6dc4,'pageSize':_0x21a1a3,'rowsOnPage':_0x5aebdc[_0x484b10(0x207)],'totalCount':null,'note':_0x484b10(0x1f4)};return{'ok':!![],'data':{'connections':_0x5aebdc,'paging':_0x439d61},'message':_0x484b10(0x1f8)+_0x5aebdc[_0x484b10(0x207)]+'\x20database\x20connection(s)'};}};
1
+ const a88_0x161050=a88_0x1c39;function a88_0x45d0(){const _0x11777a=['page','2827ViOYRQ','read','length','3987248GmEYHH','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','\x20database\x20connection(s)','Page\x20index\x20(1-based)','751570qDOCKV','Page\x20size','1132881PAUvgT','10fncUqK','Found\x20','595441wdiGWa','pagesize','list','number','1420488VwfuZU','623040kjKBHZ','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','num'];a88_0x45d0=function(){return _0x11777a;};return a88_0x45d0();}(function(_0x458c95,_0x66782){const _0x4bb511=a88_0x1c39,_0x2293b2=_0x458c95();while(!![]){try{const _0x3c0441=-parseInt(_0x4bb511(0x126))/0x1*(-parseInt(_0x4bb511(0x130))/0x2)+parseInt(_0x4bb511(0x12f))/0x3+-parseInt(_0x4bb511(0x121))/0x4+-parseInt(_0x4bb511(0x12d))/0x5+-parseInt(_0x4bb511(0x122))/0x6+-parseInt(_0x4bb511(0x11d))/0x7+parseInt(_0x4bb511(0x129))/0x8;if(_0x3c0441===_0x66782)break;else _0x2293b2['push'](_0x2293b2['shift']());}catch(_0x1c6e8f){_0x2293b2['push'](_0x2293b2['shift']());}}}(a88_0x45d0,0x2fcf5));import{listDbLinks}from'../../core/api-client.js';function a88_0x1c39(_0x56399a,_0x5982bc){_0x56399a=_0x56399a-0x11c;const _0x45d0f2=a88_0x45d0();let _0x1c3982=_0x45d0f2[_0x56399a];return _0x1c3982;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a88_0x161050(0x11f),'description':a88_0x161050(0x123),'risk':a88_0x161050(0x127),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a88_0x161050(0x125),'type':a88_0x161050(0x120),'description':a88_0x161050(0x12c),'default':0x1},{'name':a88_0x161050(0x11e),'type':a88_0x161050(0x120),'description':a88_0x161050(0x12e),'default':0x64}],async 'execute'(_0x38583e){const _0x3017e0=a88_0x161050,_0x588cf0=_0x38583e[_0x3017e0(0x124)](_0x3017e0(0x125),0x1)||0x1,_0x408873=_0x38583e[_0x3017e0(0x124)](_0x3017e0(0x11e),0x64)||0x64,{items:_0x29808b,paging:_0x3dc75f}=await listDbLinks(_0x38583e['appCode'],{'currentPage':_0x588cf0,'pageSize':_0x408873}),_0x234979=sanitizeDbLinkList(_0x29808b),_0x33bdcf=_0x3dc75f?_0x3dc75f:{'currentPage':_0x588cf0,'pageSize':_0x408873,'rowsOnPage':_0x234979[_0x3017e0(0x128)],'totalCount':null,'note':_0x3017e0(0x12a)};return{'ok':!![],'data':{'connections':_0x234979,'paging':_0x33bdcf},'message':_0x3017e0(0x11c)+_0x234979[_0x3017e0(0x128)]+_0x3017e0(0x12b)};}};
@@ -1 +1 @@
1
- function a89_0x3275(_0x33b781,_0x22d7d3){_0x33b781=_0x33b781-0x13a;const _0x5f20fe=a89_0x5f20();let _0x327545=_0x5f20fe[_0x33b781];return _0x327545;}(function(_0xc5cef1,_0x153d05){const _0x55521e=a89_0x3275,_0x14ed7c=_0xc5cef1();while(!![]){try{const _0x154b8e=-parseInt(_0x55521e(0x153))/0x1+parseInt(_0x55521e(0x154))/0x2*(parseInt(_0x55521e(0x14c))/0x3)+parseInt(_0x55521e(0x151))/0x4*(parseInt(_0x55521e(0x144))/0x5)+parseInt(_0x55521e(0x14e))/0x6+-parseInt(_0x55521e(0x13f))/0x7+parseInt(_0x55521e(0x150))/0x8+-parseInt(_0x55521e(0x145))/0x9;if(_0x154b8e===_0x153d05)break;else _0x14ed7c['push'](_0x14ed7c['shift']());}catch(_0x26b4f3){_0x14ed7c['push'](_0x14ed7c['shift']());}}}(a89_0x5f20,0xa582e));import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0xeea611){const _0xeb8c18=a89_0x3275,_0x4cc85c=_0xeea611[_0xeb8c18(0x152)]();if(_0x4cc85c===_0xeb8c18(0x147)||_0x4cc85c===_0xeb8c18(0x140)||_0x4cc85c==='dbpassword')return!![];if(_0x4cc85c['includes']('secret')||_0x4cc85c['includes'](_0xeb8c18(0x13b))||_0x4cc85c['includes'](_0xeb8c18(0x14a)))return!![];if(_0x4cc85c['includes'](_0xeb8c18(0x143))||_0x4cc85c['includes']('accesskey'))return!![];if(_0x4cc85c===_0xeb8c18(0x148)||_0x4cc85c===_0xeb8c18(0x14f)||_0x4cc85c==='jdbcurl')return!![];return![];}export function sanitizeDbLinkForOutput(_0x143133){const _0x209da8=a89_0x3275,_0xdaa6d7={..._0x143133};for(const _0x32a834 of Object[_0x209da8(0x13e)](_0xdaa6d7)){if(!shouldRedactKey(_0x32a834))continue;const _0x54212b=_0xdaa6d7[_0x32a834];_0x54212b!=null&&String(_0x54212b)[_0x209da8(0x14d)]>0x0&&(_0xdaa6d7[_0x32a834]=_0x209da8(0x13c));}return _0xdaa6d7;}export function sanitizeDbLinkList(_0x5f3777){const _0x849689=a89_0x3275;return _0x5f3777[_0x849689(0x13a)](_0x44f043=>sanitizeDbLinkForOutput(_0x44f043));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x72372a){const _0x12a177=a89_0x3275,_0x104aa6=_0x72372a['trim']();if(!_0x104aa6)return![];return DB_URL_PATTERN[_0x12a177(0x13d)](_0x104aa6);}export function buildDbPageLinks(_0x24e248,_0xdbc717){const _0x8d76e5=a89_0x3275,_0x1d085f=_0x24e248?.[_0x8d76e5(0x14b)]();if(!_0x1d085f)return undefined;const _0x23c8e9=typeof _0xdbc717===_0x8d76e5(0x141)?String(_0xdbc717):String(_0xdbc717??'')[_0x8d76e5(0x14b)]();if(!_0x23c8e9)return undefined;const _0x276739=Number(_0x23c8e9);if(!Number[_0x8d76e5(0x142)](_0x276739)||_0x276739<=0x0)return undefined;const _0x1442e4=getAppBaseUrl(_0x1d085f),_0x35015f=encodeURIComponent(String(_0x276739));return{'databasePage':_0x1442e4+_0x8d76e5(0x149),'erPage':_0x1442e4+_0x8d76e5(0x146)+_0x35015f};}function a89_0x5f20(){const _0x457065=['2204046BSZFXX','connectionstring','6411592qZwPZX','977720lZbpME','toLowerCase','1341809JpBfYQ','4PMxTqM','map','token','[redacted]','test','keys','5055239ZPqGwf','passwd','number','isFinite','privatekey','25QmxiLh','3360078FQOAcy','/data/er?dbId=','password','authorization','/data/database','credential','trim','1086483nsxqXs','length'];a89_0x5f20=function(){return _0x457065;};return a89_0x5f20();}
1
+ (function(_0x433d7e,_0x57ab95){const _0x24f437=a89_0x3e46,_0x1df17c=_0x433d7e();while(!![]){try{const _0x37d4a7=-parseInt(_0x24f437(0xef))/0x1+parseInt(_0x24f437(0xea))/0x2*(parseInt(_0x24f437(0xf8))/0x3)+-parseInt(_0x24f437(0xf9))/0x4+-parseInt(_0x24f437(0xee))/0x5+-parseInt(_0x24f437(0xf5))/0x6+-parseInt(_0x24f437(0xfa))/0x7*(parseInt(_0x24f437(0xeb))/0x8)+parseInt(_0x24f437(0xe5))/0x9;if(_0x37d4a7===_0x57ab95)break;else _0x1df17c['push'](_0x1df17c['shift']());}catch(_0x5f0806){_0x1df17c['push'](_0x1df17c['shift']());}}}(a89_0x4291,0xc9d69));import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0xf8c248){const _0x4feac3=a89_0x3e46,_0x8dee6a=_0xf8c248[_0x4feac3(0xec)]();if(_0x8dee6a===_0x4feac3(0xe1)||_0x8dee6a===_0x4feac3(0xe7)||_0x8dee6a===_0x4feac3(0xf4))return!![];if(_0x8dee6a[_0x4feac3(0xe8)]('secret')||_0x8dee6a[_0x4feac3(0xe8)](_0x4feac3(0xf3))||_0x8dee6a['includes'](_0x4feac3(0xe0)))return!![];if(_0x8dee6a[_0x4feac3(0xe8)](_0x4feac3(0xf1))||_0x8dee6a[_0x4feac3(0xe8)](_0x4feac3(0xe6)))return!![];if(_0x8dee6a===_0x4feac3(0xf6)||_0x8dee6a===_0x4feac3(0xe2)||_0x8dee6a===_0x4feac3(0xe9))return!![];return![];}export function sanitizeDbLinkForOutput(_0x5f277a){const _0x29544e=a89_0x3e46,_0x54bc1e={..._0x5f277a};for(const _0x34b5d5 of Object[_0x29544e(0xf7)](_0x54bc1e)){if(!shouldRedactKey(_0x34b5d5))continue;const _0x40d9fa=_0x54bc1e[_0x34b5d5];_0x40d9fa!=null&&String(_0x40d9fa)['length']>0x0&&(_0x54bc1e[_0x34b5d5]='[redacted]');}return _0x54bc1e;}export function sanitizeDbLinkList(_0x989fde){const _0x4ad1b6=a89_0x3e46;return _0x989fde[_0x4ad1b6(0xe4)](_0x3e34b2=>sanitizeDbLinkForOutput(_0x3e34b2));}function a89_0x4291(){const _0xe67a22=['3552110fadLZx','456134cHxMkd','/data/er?dbId=','privatekey','trim','token','dbpassword','5584464qlqZUM','authorization','keys','89772lmTkYN','3458932IyetTo','2165373etvxEo','credential','password','connectionstring','number','map','30688641cXhiZY','accesskey','passwd','includes','jdbcurl','46AgRpeY','8pxYLYZ','toLowerCase','test'];a89_0x4291=function(){return _0xe67a22;};return a89_0x4291();}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x38520a){const _0x264dee=a89_0x3e46,_0xbf38d8=_0x38520a[_0x264dee(0xf2)]();if(!_0xbf38d8)return![];return DB_URL_PATTERN[_0x264dee(0xed)](_0xbf38d8);}function a89_0x3e46(_0x4b8f48,_0x2fb26b){_0x4b8f48=_0x4b8f48-0xe0;const _0x42914f=a89_0x4291();let _0x3e460b=_0x42914f[_0x4b8f48];return _0x3e460b;}export function buildDbPageLinks(_0x4cc52f,_0x22b708){const _0x5a5088=a89_0x3e46,_0x38cce1=_0x4cc52f?.[_0x5a5088(0xf2)]();if(!_0x38cce1)return undefined;const _0x212235=typeof _0x22b708===_0x5a5088(0xe3)?String(_0x22b708):String(_0x22b708??'')[_0x5a5088(0xf2)]();if(!_0x212235)return undefined;const _0x30e829=Number(_0x212235);if(!Number['isFinite'](_0x30e829)||_0x30e829<=0x0)return undefined;const _0x40b30a=getAppBaseUrl(_0x38cce1),_0xa4d2da=encodeURIComponent(String(_0x30e829));return{'databasePage':_0x40b30a+'/data/database','erPage':_0x40b30a+_0x5a5088(0xf0)+_0xa4d2da};}
@@ -1 +1 @@
1
- const a90_0x42e86c=a90_0x92a6;function a90_0x1c55(){const _0x59235b=['624SzzVMK','read','num','65113nEIcNP','290896OmQXhz','3533247nOtdFt','28rUmHzy','tables','appCode','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','4739yXvfOv','482559qKkJIC','\x20table(s)\x20on\x20db\x20link\x20','length','16900txAOmM','1751648VVtYiY'];a90_0x1c55=function(){return _0x59235b;};return a90_0x1c55();}function a90_0x92a6(_0x31763b,_0x52e264){_0x31763b=_0x31763b-0xbe;const _0x1c558b=a90_0x1c55();let _0x92a6a6=_0x1c558b[_0x31763b];return _0x92a6a6;}(function(_0x37246f,_0x16fcce){const _0x52a0e7=a90_0x92a6,_0x392e3d=_0x37246f();while(!![]){try{const _0x2271c4=-parseInt(_0x52a0e7(0xc7))/0x1+parseInt(_0x52a0e7(0xc8))/0x2+parseInt(_0x52a0e7(0xbf))/0x3+-parseInt(_0x52a0e7(0xca))/0x4*(parseInt(_0x52a0e7(0xc2))/0x5)+parseInt(_0x52a0e7(0xc4))/0x6*(parseInt(_0x52a0e7(0xbe))/0x7)+parseInt(_0x52a0e7(0xc3))/0x8+-parseInt(_0x52a0e7(0xc9))/0x9;if(_0x2271c4===_0x16fcce)break;else _0x392e3d['push'](_0x392e3d['shift']());}catch(_0x58c9cf){_0x392e3d['push'](_0x392e3d['shift']());}}}(a90_0x1c55,0x1be85));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a90_0x42e86c(0xcb),'description':a90_0x42e86c(0xcd),'risk':a90_0x42e86c(0xc5),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x438cb0){const _0xf880a3=a90_0x42e86c,_0x277d02=_0x438cb0[_0xf880a3(0xc6)]('id'),_0x31c3fd=await getDbAllTableList(_0x438cb0[_0xf880a3(0xcc)],_0x277d02);return{'ok':!![],'data':{'dbLinkId':_0x277d02,'total':_0x31c3fd[_0xf880a3(0xc1)],'tables':_0x31c3fd},'message':_0x31c3fd[_0xf880a3(0xc1)]+_0xf880a3(0xc0)+_0x277d02};}};
1
+ function a90_0x399d(){const _0x2c0b34=['657360rbvGJm','1432545qcULuP','799390OGMAHw','appCode','read','3116600kCrCHK','num','\x20table(s)\x20on\x20db\x20link\x20','18MaloGf','35anhJhI','853953qikRJT','2ATTdwo','length','4172952abbQpm','4643835CRhoxm'];a90_0x399d=function(){return _0x2c0b34;};return a90_0x399d();}const a90_0x3f6ffd=a90_0x2fbd;(function(_0x3e9de2,_0x2d2682){const _0x1aeafd=a90_0x2fbd,_0x2b701c=_0x3e9de2();while(!![]){try{const _0xcc3bfc=parseInt(_0x1aeafd(0x8a))/0x1*(-parseInt(_0x1aeafd(0x8b))/0x2)+parseInt(_0x1aeafd(0x90))/0x3+-parseInt(_0x1aeafd(0x8d))/0x4+parseInt(_0x1aeafd(0x89))/0x5*(parseInt(_0x1aeafd(0x8f))/0x6)+parseInt(_0x1aeafd(0x8e))/0x7+parseInt(_0x1aeafd(0x94))/0x8+-parseInt(_0x1aeafd(0x88))/0x9*(-parseInt(_0x1aeafd(0x91))/0xa);if(_0xcc3bfc===_0x2d2682)break;else _0x2b701c['push'](_0x2b701c['shift']());}catch(_0x169e1f){_0x2b701c['push'](_0x2b701c['shift']());}}}(a90_0x399d,0x88be6));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a90_0x2fbd(_0x386355,_0x5c1954){_0x386355=_0x386355-0x88;const _0x399d3f=a90_0x399d();let _0x2fbd81=_0x399d3f[_0x386355];return _0x2fbd81;}export const dbTables={'service':'db','command':'tables','description':'List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','risk':a90_0x3f6ffd(0x93),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x23c80b){const _0x39241d=a90_0x3f6ffd,_0xbdaf3d=_0x23c80b[_0x39241d(0x95)]('id'),_0x30644a=await getDbAllTableList(_0x23c80b[_0x39241d(0x92)],_0xbdaf3d);return{'ok':!![],'data':{'dbLinkId':_0xbdaf3d,'total':_0x30644a[_0x39241d(0x8c)],'tables':_0x30644a},'message':_0x30644a[_0x39241d(0x8c)]+_0x39241d(0x96)+_0xbdaf3d};}};
@@ -1 +1 @@
1
- const a91_0x19e24c=a91_0x200b;(function(_0x54e509,_0x35f9fe){const _0x24fca9=a91_0x200b,_0x26f245=_0x54e509();while(!![]){try{const _0x36e9dd=-parseInt(_0x24fca9(0x187))/0x1+-parseInt(_0x24fca9(0x18d))/0x2+parseInt(_0x24fca9(0x18e))/0x3*(parseInt(_0x24fca9(0x18a))/0x4)+parseInt(_0x24fca9(0x195))/0x5*(parseInt(_0x24fca9(0x19a))/0x6)+-parseInt(_0x24fca9(0x18c))/0x7*(parseInt(_0x24fca9(0x194))/0x8)+-parseInt(_0x24fca9(0x199))/0x9*(parseInt(_0x24fca9(0x191))/0xa)+-parseInt(_0x24fca9(0x185))/0xb*(-parseInt(_0x24fca9(0x192))/0xc);if(_0x36e9dd===_0x35f9fe)break;else _0x26f245['push'](_0x26f245['shift']());}catch(_0x13f506){_0x26f245['push'](_0x26f245['shift']());}}}(a91_0xae76,0xe900c));import{testDbLinkConnect}from'../../core/api-client.js';function a91_0x200b(_0x30200c,_0x44751b){_0x30200c=_0x30200c-0x184;const _0xae7606=a91_0xae76();let _0x200bd9=_0xae7606[_0x30200c];return _0x200bd9;}function a91_0xae76(){const _0x4b0c18=['4152175eGCnQa','error','test','success','8317017KNTJNC','12lWJAYj','length','slice','22rppizu','message','1276886GRAeVG','Connection\x20OK\x20for\x20db\x20link\x20','data','88qmUleD','keys','685391csooCo','1446972rnhwkx','43620PcEKpH','Connection\x20check\x20finished\x20for\x20db\x20link\x20','object','10BYHaum','17850948KKFSoV','read','88FSzaPz'];a91_0xae76=function(){return _0x4b0c18;};return a91_0xae76();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x198643){const _0x3a89a4=a91_0x200b;if(_0x198643===!![]||_0x198643===![])return{'success':_0x198643};if(_0x198643===null||_0x198643===undefined)return{'type':typeof _0x198643};if(typeof _0x198643!==_0x3a89a4(0x190))return{'type':typeof _0x198643};const _0x34e899=_0x198643,_0x5a0ff1=[_0x3a89a4(0x198),_0x3a89a4(0x186),'code',_0x3a89a4(0x196),'msg',_0x3a89a4(0x189)],_0x4223ad={};for(const _0x104e63 of _0x5a0ff1){if(_0x104e63 in _0x34e899)_0x4223ad[_0x104e63]=_0x34e899[_0x104e63];}return Object['keys'](_0x4223ad)[_0x3a89a4(0x19b)]===0x0&&(_0x4223ad[_0x3a89a4(0x18b)]=Object['keys'](_0x34e899)[_0x3a89a4(0x184)](0x0,0x14)),_0x4223ad;}export const dbTest={'service':'db','command':a91_0x19e24c(0x197),'description':'Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','risk':a91_0x19e24c(0x193),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5a69f4){const _0x13d361=a91_0x19e24c,_0x18aba6=_0x5a69f4['num']('id'),_0x585c18=await testDbLinkConnect(_0x18aba6),_0x29cd71=_0x585c18===!![]||typeof _0x585c18===_0x13d361(0x190)&&_0x585c18!==null&&_0x585c18['success']===!![],_0x1c235e=summarizeTestConnectResult(_0x585c18);return{'ok':!![],'data':{'id':_0x18aba6,'connected':Boolean(_0x29cd71),'result':_0x1c235e},'message':_0x29cd71?_0x13d361(0x188)+_0x18aba6:_0x13d361(0x18f)+_0x18aba6+'\x20(see\x20data.result)'};}};
1
+ const a91_0x321279=a91_0x32c9;(function(_0x5e864b,_0x5518e9){const _0x20bc13=a91_0x32c9,_0x3f5040=_0x5e864b();while(!![]){try{const _0x472a7e=-parseInt(_0x20bc13(0x1e1))/0x1*(parseInt(_0x20bc13(0x1d9))/0x2)+-parseInt(_0x20bc13(0x1e4))/0x3+-parseInt(_0x20bc13(0x1e6))/0x4*(-parseInt(_0x20bc13(0x1e7))/0x5)+-parseInt(_0x20bc13(0x1de))/0x6*(-parseInt(_0x20bc13(0x1ea))/0x7)+parseInt(_0x20bc13(0x1e2))/0x8+parseInt(_0x20bc13(0x1dc))/0x9+-parseInt(_0x20bc13(0x1e9))/0xa*(parseInt(_0x20bc13(0x1db))/0xb);if(_0x472a7e===_0x5518e9)break;else _0x3f5040['push'](_0x3f5040['shift']());}catch(_0x31ae99){_0x3f5040['push'](_0x3f5040['shift']());}}}(a91_0x48c3,0xa81c9));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x97559e){const _0xfc73ed=a91_0x32c9;if(_0x97559e===!![]||_0x97559e===![])return{'success':_0x97559e};if(_0x97559e===null||_0x97559e===undefined)return{'type':typeof _0x97559e};if(typeof _0x97559e!=='object')return{'type':typeof _0x97559e};const _0x3ca864=_0x97559e,_0x6d5fa9=['success','message',_0xfc73ed(0x1df),'error',_0xfc73ed(0x1e8),_0xfc73ed(0x1e3)],_0x447b15={};for(const _0xffb8dc of _0x6d5fa9){if(_0xffb8dc in _0x3ca864)_0x447b15[_0xffb8dc]=_0x3ca864[_0xffb8dc];}return Object[_0xfc73ed(0x1e0)](_0x447b15)['length']===0x0&&(_0x447b15[_0xfc73ed(0x1e0)]=Object[_0xfc73ed(0x1e0)](_0x3ca864)[_0xfc73ed(0x1d8)](0x0,0x14)),_0x447b15;}export const dbTest={'service':'db','command':a91_0x321279(0x1e5),'description':a91_0x321279(0x1eb),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3bbf2c){const _0x526813=a91_0x321279,_0x928b70=_0x3bbf2c[_0x526813(0x1dd)]('id'),_0x358fd8=await testDbLinkConnect(_0x928b70),_0x36e0e1=_0x358fd8===!![]||typeof _0x358fd8===_0x526813(0x1ec)&&_0x358fd8!==null&&_0x358fd8['success']===!![],_0x1e93e4=summarizeTestConnectResult(_0x358fd8);return{'ok':!![],'data':{'id':_0x928b70,'connected':Boolean(_0x36e0e1),'result':_0x1e93e4},'message':_0x36e0e1?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x928b70:_0x526813(0x1da)+_0x928b70+'\x20(see\x20data.result)'};}};function a91_0x32c9(_0x4ccd52,_0x5464d6){_0x4ccd52=_0x4ccd52-0x1d8;const _0x48c392=a91_0x48c3();let _0x32c9d2=_0x48c392[_0x4ccd52];return _0x32c9d2;}function a91_0x48c3(){const _0x52ed59=['object','slice','2Mhgcxa','Connection\x20check\x20finished\x20for\x20db\x20link\x20','11881738qlOGeL','9814833ZBQdPl','num','24gPVDzE','code','keys','821071FRjlkF','7185952GETOIH','data','2995050spdwQq','test','2186620xniBFr','5oNskuI','msg','10ikKKfx','1842274kIVkTl','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)'];a91_0x48c3=function(){return _0x52ed59;};return a91_0x48c3();}
@@ -1 +1 @@
1
- const a92_0xd60892=a92_0x2a1a;(function(_0x2ddc79,_0x38035b){const _0x5138cc=a92_0x2a1a,_0x443cb6=_0x2ddc79();while(!![]){try{const _0x3e0685=-parseInt(_0x5138cc(0x127))/0x1+-parseInt(_0x5138cc(0x11b))/0x2+-parseInt(_0x5138cc(0x111))/0x3*(parseInt(_0x5138cc(0x112))/0x4)+parseInt(_0x5138cc(0x12d))/0x5*(-parseInt(_0x5138cc(0x10c))/0x6)+parseInt(_0x5138cc(0x120))/0x7+-parseInt(_0x5138cc(0x11e))/0x8*(-parseInt(_0x5138cc(0x129))/0x9)+parseInt(_0x5138cc(0x10d))/0xa*(parseInt(_0x5138cc(0x128))/0xb);if(_0x3e0685===_0x38035b)break;else _0x443cb6['push'](_0x443cb6['shift']());}catch(_0x1145c8){_0x443cb6['push'](_0x443cb6['shift']());}}}(a92_0xfcfd,0xcb6ca));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a92_0xfcfd(){const _0x30bc0d=['write','3418373AvbVUb','******','has','trim','validation','New\x20connection\x20parameter\x20string','str','1211701asSXLO','11hXfKHN','299151seLxkb','dbname','/smartapi/dblink/update','New\x20host:port','168240SsTrpY','dbName','[redacted]','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','POST','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','Updated\x20db\x20link\x20','30JkGnkp','12394310KftCHK','password','New\x20database\x20name','dbparam','119694OJCOUG','8pcQVsP','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','New\x20description','username','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','string','dburl','dbdesc','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','1595212nalDBQ','num','dbDesc','328fbdpZL'];a92_0xfcfd=function(){return _0x30bc0d;};return a92_0xfcfd();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';function a92_0x2a1a(_0x3f8947,_0x40b80f){_0x3f8947=_0x3f8947-0x107;const _0xfcfd=a92_0xfcfd();let _0x2a1a50=_0xfcfd[_0x3f8947];return _0x2a1a50;}const MASKED_PASSWORD_VALUES=new Set([a92_0xd60892(0x121),a92_0xd60892(0x107)]);function mergeDbLinkUpdate(_0xb26a8d,_0x59bba6){const _0x4d3540=a92_0xd60892,_0x3337a8={..._0xb26a8d},_0x36c2bd=_0x59bba6[_0x4d3540(0x126)](_0x4d3540(0x10e));if(_0x36c2bd&&MASKED_PASSWORD_VALUES[_0x4d3540(0x122)](_0x36c2bd))throw CliErrors['validation'](_0x4d3540(0x108));if(!_0x36c2bd&&MASKED_PASSWORD_VALUES[_0x4d3540(0x122)](String(_0xb26a8d[_0x4d3540(0x10e)]??'')))throw CliErrors[_0x4d3540(0x124)](_0x4d3540(0x11a));const _0x5d921a=_0x59bba6[_0x4d3540(0x126)](_0x4d3540(0x12a));if(_0x5d921a)_0x3337a8[_0x4d3540(0x12e)]=_0x5d921a;const _0x4fb52c=_0x59bba6[_0x4d3540(0x126)](_0x4d3540(0x118));if(_0x4fb52c)_0x3337a8['dbUrl']=_0x4fb52c[_0x4d3540(0x123)]();const _0x37ad35=_0x59bba6[_0x4d3540(0x126)](_0x4d3540(0x115));if(_0x37ad35)_0x3337a8[_0x4d3540(0x115)]=_0x37ad35;if(_0x36c2bd)_0x3337a8[_0x4d3540(0x10e)]=_0x36c2bd;const _0x43d8b8=_0x59bba6[_0x4d3540(0x126)](_0x4d3540(0x110));if(_0x43d8b8)_0x3337a8['dbParam']=_0x43d8b8;const _0x45d93c=_0x59bba6['str']('dbdesc');if(_0x45d93c)_0x3337a8[_0x4d3540(0x11d)]=_0x45d93c;return _0x3337a8;}export const dbUpdate={'service':'db','command':'update','description':a92_0xd60892(0x113),'risk':a92_0xd60892(0x11f),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a92_0xd60892(0x117),'description':a92_0xd60892(0x10f)},{'name':a92_0xd60892(0x118),'type':a92_0xd60892(0x117),'description':a92_0xd60892(0x12c)},{'name':a92_0xd60892(0x115),'type':'string','description':'New\x20username'},{'name':'password','type':a92_0xd60892(0x117),'description':a92_0xd60892(0x10a)},{'name':a92_0xd60892(0x110),'type':a92_0xd60892(0x117),'description':a92_0xd60892(0x125)},{'name':a92_0xd60892(0x119),'type':a92_0xd60892(0x117),'description':a92_0xd60892(0x114)}],async 'validate'(_0x1c685a){const _0xf2c87f=a92_0xd60892,_0xa23369=_0x1c685a[_0xf2c87f(0x126)]('dburl');if(_0xa23369&&!validateDbUrl(_0xa23369[_0xf2c87f(0x123)]()))throw CliErrors[_0xf2c87f(0x124)](_0xf2c87f(0x116)+_0xa23369+'\x22');},async 'dryRun'(_0x176f05){const _0x12ede6=a92_0xd60892,_0x3653e4=_0x176f05[_0x12ede6(0x11c)]('id'),_0x44122a=await getDbLinkInfo(_0x3653e4),_0x34c7bc=mergeDbLinkUpdate(_0x44122a,_0x176f05),_0x29b2c4=sanitizeDbLinkForOutput(_0x34c7bc);return{'method':_0x12ede6(0x109),'url':_0x12ede6(0x12b),'body':_0x29b2c4,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0xc46d6e){const _0x2c7f5b=a92_0xd60892,_0x2f62d5=_0xc46d6e['num']('id'),_0x3180d0=await getDbLinkInfo(_0x2f62d5),_0x1dd0a8=mergeDbLinkUpdate(_0x3180d0,_0xc46d6e),{id:_0x4a4446,entity:_0x5e957d}=normalizeEntityWithIdResponse(await updateDbLink(_0x1dd0a8));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x5e957d),'message':_0x2c7f5b(0x10b)+(_0x4a4446??_0x2f62d5)};}};
1
+ const a92_0x27713d=a92_0x2404;(function(_0x227a43,_0x52f5e8){const _0x449f6f=a92_0x2404,_0x7bd3bc=_0x227a43();while(!![]){try{const _0x37f824=-parseInt(_0x449f6f(0xf6))/0x1*(parseInt(_0x449f6f(0xf0))/0x2)+-parseInt(_0x449f6f(0xf3))/0x3+parseInt(_0x449f6f(0xed))/0x4*(-parseInt(_0x449f6f(0x100))/0x5)+parseInt(_0x449f6f(0xec))/0x6*(-parseInt(_0x449f6f(0x10c))/0x7)+parseInt(_0x449f6f(0x107))/0x8*(-parseInt(_0x449f6f(0x103))/0x9)+parseInt(_0x449f6f(0x102))/0xa+parseInt(_0x449f6f(0xfe))/0xb;if(_0x37f824===_0x52f5e8)break;else _0x7bd3bc['push'](_0x7bd3bc['shift']());}catch(_0x31d978){_0x7bd3bc['push'](_0x7bd3bc['shift']());}}}(a92_0x2534,0x68893));function a92_0x2404(_0xccc470,_0x41b58c){_0xccc470=_0xccc470-0xeb;const _0x25341f=a92_0x2534();let _0x240437=_0x25341f[_0xccc470];return _0x240437;}import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';function a92_0x2534(){const _0x201a01=['Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','validation','update','534lIVFqU','24XqEBwy','dbParam','dbUrl','452XMqBoN','New\x20username','string','276549yOUkvt','username','[redacted]','3182UfKpdY','dbname','New\x20host:port','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','dbDesc','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','trim','New\x20description','25123736RnsOBM','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','371405aedISO','num','3422970UQymCR','3593718dbSXWs','/smartapi/dblink/update','Updated\x20db\x20link\x20','write','16SZixEl','password','dburl','dbparam','dbName','11207SfLMvz','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','str','dbdesc'];a92_0x2534=function(){return _0x201a01;};return a92_0x2534();}const MASKED_PASSWORD_VALUES=new Set(['******',a92_0x27713d(0xf5)]);function mergeDbLinkUpdate(_0x4635d8,_0x339892){const _0x36e2c7=a92_0x27713d,_0x3ebae4={..._0x4635d8},_0x466ee3=_0x339892[_0x36e2c7(0x10e)](_0x36e2c7(0x108));if(_0x466ee3&&MASKED_PASSWORD_VALUES['has'](_0x466ee3))throw CliErrors[_0x36e2c7(0x111)](_0x36e2c7(0xff));if(!_0x466ee3&&MASKED_PASSWORD_VALUES['has'](String(_0x4635d8['password']??'')))throw CliErrors[_0x36e2c7(0x111)](_0x36e2c7(0x10d));const _0x24ba7b=_0x339892[_0x36e2c7(0x10e)](_0x36e2c7(0xf7));if(_0x24ba7b)_0x3ebae4[_0x36e2c7(0x10b)]=_0x24ba7b;const _0x147ebb=_0x339892[_0x36e2c7(0x10e)](_0x36e2c7(0x109));if(_0x147ebb)_0x3ebae4[_0x36e2c7(0xef)]=_0x147ebb['trim']();const _0x31f35d=_0x339892[_0x36e2c7(0x10e)](_0x36e2c7(0xf4));if(_0x31f35d)_0x3ebae4['username']=_0x31f35d;if(_0x466ee3)_0x3ebae4[_0x36e2c7(0x108)]=_0x466ee3;const _0x2cfb98=_0x339892[_0x36e2c7(0x10e)](_0x36e2c7(0x10a));if(_0x2cfb98)_0x3ebae4[_0x36e2c7(0xee)]=_0x2cfb98;const _0x165f6c=_0x339892[_0x36e2c7(0x10e)](_0x36e2c7(0x10f));if(_0x165f6c)_0x3ebae4[_0x36e2c7(0xfa)]=_0x165f6c;return _0x3ebae4;}export const dbUpdate={'service':'db','command':a92_0x27713d(0xeb),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':a92_0x27713d(0x106),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a92_0x27713d(0xf7),'type':a92_0x27713d(0xf2),'description':'New\x20database\x20name'},{'name':a92_0x27713d(0x109),'type':a92_0x27713d(0xf2),'description':a92_0x27713d(0xf8)},{'name':a92_0x27713d(0xf4),'type':'string','description':a92_0x27713d(0xf1)},{'name':a92_0x27713d(0x108),'type':'string','description':a92_0x27713d(0xfb)},{'name':a92_0x27713d(0x10a),'type':a92_0x27713d(0xf2),'description':'New\x20connection\x20parameter\x20string'},{'name':'dbdesc','type':a92_0x27713d(0xf2),'description':a92_0x27713d(0xfd)}],async 'validate'(_0x1ecb52){const _0xdd2e60=a92_0x27713d,_0x3885fb=_0x1ecb52[_0xdd2e60(0x10e)]('dburl');if(_0x3885fb&&!validateDbUrl(_0x3885fb[_0xdd2e60(0xfc)]()))throw CliErrors[_0xdd2e60(0x111)](_0xdd2e60(0xf9)+_0x3885fb+'\x22');},async 'dryRun'(_0x10643a){const _0x522a3f=a92_0x27713d,_0x4b1a64=_0x10643a[_0x522a3f(0x101)]('id'),_0x49fe41=await getDbLinkInfo(_0x4b1a64),_0x78bbaa=mergeDbLinkUpdate(_0x49fe41,_0x10643a),_0x2e5d0f=sanitizeDbLinkForOutput(_0x78bbaa);return{'method':'POST','url':_0x522a3f(0x104),'body':_0x2e5d0f,'description':_0x522a3f(0x110)};},async 'execute'(_0x544cf5){const _0x3bc8ae=a92_0x27713d,_0x517556=_0x544cf5[_0x3bc8ae(0x101)]('id'),_0x21ca3c=await getDbLinkInfo(_0x517556),_0x2595cb=mergeDbLinkUpdate(_0x21ca3c,_0x544cf5),{id:_0x4f119f,entity:_0x21011c}=normalizeEntityWithIdResponse(await updateDbLink(_0x2595cb));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x21011c),'message':_0x3bc8ae(0x105)+(_0x4f119f??_0x517556)};}};