@lovrabet/rabetbase-cli 2.3.16-beta.2 → 2.3.16-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/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/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/react/create.js +1 -0
  142. package/lib/commands/page/react/detail.js +1 -0
  143. package/lib/commands/page/react/list.js +1 -0
  144. package/lib/commands/page/react/publish.js +1 -0
  145. package/lib/commands/page/react/shared.js +1 -0
  146. package/lib/commands/page/react/syntax.js +1 -0
  147. package/lib/commands/page/react/template.js +1 -0
  148. package/lib/commands/page/react/update.js +1 -0
  149. package/lib/commands/page/relation-audit.js +1 -1
  150. package/lib/commands/page/restore.js +1 -1
  151. package/lib/commands/page/shared.js +1 -1
  152. package/lib/commands/page/standard-page-status.js +1 -1
  153. package/lib/commands/page/sync.js +1 -1
  154. package/lib/commands/permit/index.js +1 -1
  155. package/lib/commands/permit/page-get.js +1 -1
  156. package/lib/commands/permit/page-set.js +1 -1
  157. package/lib/commands/permit/role-apis-set.js +1 -1
  158. package/lib/commands/permit/role-menus-set.js +1 -1
  159. package/lib/commands/permit/role-menus.js +1 -1
  160. package/lib/commands/permit/shared.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/non-interactive.js +1 -1
  165. package/lib/commands/project/create/project-template-path.js +1 -1
  166. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  167. package/lib/commands/project/create/use-format-code.js +1 -1
  168. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  169. package/lib/commands/project/index.js +1 -1
  170. package/lib/commands/project/upgrade.js +1 -1
  171. package/lib/commands/registry.js +1 -1
  172. package/lib/commands/role/create.js +1 -1
  173. package/lib/commands/role/delete.js +1 -1
  174. package/lib/commands/role/detail.js +1 -1
  175. package/lib/commands/role/index.js +1 -1
  176. package/lib/commands/role/list.js +1 -1
  177. package/lib/commands/role/shared.js +1 -1
  178. package/lib/commands/role/update.js +1 -1
  179. package/lib/commands/role/user-add.js +1 -1
  180. package/lib/commands/role/user-remove.js +1 -1
  181. package/lib/commands/role/user-resolve.js +1 -1
  182. package/lib/commands/run/index.js +1 -1
  183. package/lib/commands/schema.js +1 -1
  184. package/lib/commands/sql/create.js +1 -1
  185. package/lib/commands/sql/delete.js +1 -1
  186. package/lib/commands/sql/detail.js +1 -1
  187. package/lib/commands/sql/exec.js +1 -1
  188. package/lib/commands/sql/index.js +1 -1
  189. package/lib/commands/sql/list.js +1 -1
  190. package/lib/commands/sql/pull.js +1 -1
  191. package/lib/commands/sql/push.js +1 -1
  192. package/lib/commands/sql/shared.js +1 -1
  193. package/lib/commands/sql/status.js +1 -1
  194. package/lib/commands/sql/validate.js +1 -1
  195. package/lib/commands/task/index.js +1 -1
  196. package/lib/commands/task/status.js +1 -1
  197. package/lib/commands/tenant/index.js +1 -1
  198. package/lib/commands/tenant/members-list.js +1 -1
  199. package/lib/commands/tenant/shared.js +1 -1
  200. package/lib/commands/workspace/add.js +1 -1
  201. package/lib/commands/workspace/index.js +1 -1
  202. package/lib/commands/workspace/remove.js +1 -1
  203. package/lib/config/schema.js +1 -1
  204. package/lib/constant/cdn.js +1 -1
  205. package/lib/constant/cli.js +1 -1
  206. package/lib/constant/defaults.js +1 -1
  207. package/lib/constant/domain.js +1 -1
  208. package/lib/constant/env.js +1 -1
  209. package/lib/constant/output.js +1 -1
  210. package/lib/constant/paths.js +1 -1
  211. package/lib/constant/risk.js +1 -1
  212. package/lib/context/app-resolver.js +1 -1
  213. package/lib/context/auth-resolver.js +1 -1
  214. package/lib/context/config-loader.js +1 -1
  215. package/lib/context.js +1 -1
  216. package/lib/core/alias-resolver.js +1 -1
  217. package/lib/core/api-client.js +1 -1
  218. package/lib/core/bff/config.js +1 -1
  219. package/lib/core/bff/file-system.js +1 -1
  220. package/lib/core/bff/hash.js +1 -1
  221. package/lib/core/bff/lock.js +1 -1
  222. package/lib/core/bff/utils.js +1 -1
  223. package/lib/core/db-resolver.js +1 -1
  224. package/lib/core/page/file-system.js +1 -1
  225. package/lib/core/page/hash.js +1 -1
  226. package/lib/core/page/lock.js +1 -1
  227. package/lib/core/sql-index-auditor.js +1 -1
  228. package/lib/core/sql-sync/config.js +1 -1
  229. package/lib/core/sql-sync/file-system.js +1 -1
  230. package/lib/core/sql-sync/hash.js +1 -1
  231. package/lib/core/sql-sync/lock.js +1 -1
  232. package/lib/core/sql-sync/utils.js +1 -1
  233. package/lib/core/sql-validator.js +1 -1
  234. package/lib/errors.js +1 -1
  235. package/lib/framework/build-all-flags.js +1 -1
  236. package/lib/framework/error-output.js +1 -1
  237. package/lib/framework/explicit-yes.js +1 -1
  238. package/lib/framework/flags.js +1 -1
  239. package/lib/framework/help.js +1 -1
  240. package/lib/framework/index.js +1 -1
  241. package/lib/framework/output.js +1 -1
  242. package/lib/framework/response.js +1 -1
  243. package/lib/framework/runner-alias.js +1 -1
  244. package/lib/framework/runner.js +1 -1
  245. package/lib/framework/schema-export.js +1 -1
  246. package/lib/framework/types.js +1 -1
  247. package/lib/generated/build-info.js +1 -1
  248. package/lib/help.js +1 -1
  249. package/lib/skills/main.js +1 -1
  250. package/lib/skills/npx-skills-add.js +1 -1
  251. package/lib/skills/skill-presence.js +1 -1
  252. package/lib/telemetry/cli-command-trace.js +1 -1
  253. package/lib/telemetry/cli-help-trace.js +1 -1
  254. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  255. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  256. package/lib/telemetry/send-cli-trace-log.js +1 -1
  257. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  258. package/lib/utils/ai_config.js +1 -1
  259. package/lib/utils/apply-jq-filter.js +1 -1
  260. package/lib/utils/cdn-config.js +1 -1
  261. package/lib/utils/check-sdk-version.js +1 -1
  262. package/lib/utils/cli-version-check.js +1 -1
  263. package/lib/utils/cli-version-policy.js +1 -1
  264. package/lib/utils/config.js +1 -1
  265. package/lib/utils/copy-directory.js +1 -1
  266. package/lib/utils/entity-with-id.js +1 -1
  267. package/lib/utils/file-utils.js +1 -1
  268. package/lib/utils/guides-cdn.js +1 -1
  269. package/lib/utils/http-client.js +1 -1
  270. package/lib/utils/is-non-interactive.js +1 -1
  271. package/lib/utils/logger.js +1 -1
  272. package/lib/utils/params.js +1 -1
  273. package/lib/utils/platform.js +1 -1
  274. package/lib/utils/rules-cdn.js +1 -1
  275. package/lib/utils/sleep.js +1 -1
  276. package/lib/utils/template-replacer.js +1 -1
  277. package/lib/utils/update-notice.js +1 -1
  278. package/lib/utils/version.js +1 -1
  279. package/lib/utils/with-active-cookie.js +1 -1
  280. package/lib/utils/write-cli-side-channel.js +1 -1
  281. package/package.json +1 -1
  282. package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
  283. package/templates/projects/sub-app-react-demo/README.md +1 -1
  284. package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
  285. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
  286. package/lib/commands/project/init.js +0 -1
  287. package/lib/commands/sql/save.js +0 -1
@@ -1 +1 @@
1
- const a75_0x729e8e=a75_0x1202;(function(_0x236cdd,_0xd635ba){const _0x3a3d39=a75_0x1202,_0x5eec98=_0x236cdd();while(!![]){try{const _0x32a647=-parseInt(_0x3a3d39(0xdc))/0x1*(parseInt(_0x3a3d39(0xe8))/0x2)+-parseInt(_0x3a3d39(0xd6))/0x3+-parseInt(_0x3a3d39(0xf5))/0x4+parseInt(_0x3a3d39(0xf1))/0x5+parseInt(_0x3a3d39(0xef))/0x6*(parseInt(_0x3a3d39(0xe3))/0x7)+parseInt(_0x3a3d39(0xde))/0x8*(parseInt(_0x3a3d39(0xfb))/0x9)+parseInt(_0x3a3d39(0xe4))/0xa;if(_0x32a647===_0xd635ba)break;else _0x5eec98['push'](_0x5eec98['shift']());}catch(_0x45bb0c){_0x5eec98['push'](_0x5eec98['shift']());}}}(a75_0xe778,0x8ea49));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:_0x8efe0a,dryRun:_0x327942}){const _0x1cbea1=a75_0x1202;validateInput(_0x8efe0a);const _0x48ec02=await getDatasetDetail(_0x8efe0a['code']),_0xaf04ac=resolveCurrentName(_0x48ec02);if(_0xaf04ac!==_0x8efe0a['expectName'])throw CliErrors[_0x1cbea1(0xfa)](_0x1cbea1(0xdd),_0x1cbea1(0xe1)+JSON[_0x1cbea1(0xfc)](_0x8efe0a[_0x1cbea1(0xee)])+_0x1cbea1(0xf2)+JSON[_0x1cbea1(0xfc)](_0xaf04ac));const _0xd51249=buildRenameRequest(_0x48ec02,_0x8efe0a),_0x1d5bca=_0xaf04ac!==_0x8efe0a['name'];let _0x32511c;return _0x1d5bca&&!_0x327942&&(_0x32511c=await updateDrivenData(_0xd51249)),{'ok':!![],'data':{'dataset':{'id':_0xd51249[_0x1cbea1(0xf6)],'code':_0xd51249[_0x1cbea1(0xf4)]},'dryRun':_0x327942,'changed':_0x1d5bca,'before':{'name':_0xaf04ac},'after':{'name':_0x8efe0a['name']},'request':_0xd51249,'submitted':_0x1d5bca&&!_0x327942,..._0x32511c!==undefined?{'version':_0x32511c}:{}},'message':_0x1d5bca?_0x327942?_0x1cbea1(0xf7)+_0xd51249[_0x1cbea1(0xf4)]+'\x20would\x20be\x20renamed\x20to\x20'+_0x8efe0a[_0x1cbea1(0xf9)]:_0x1cbea1(0xed)+_0xd51249['modelCode']+_0x1cbea1(0xd4)+_0x8efe0a['name']:_0x1cbea1(0xe2)+_0xd51249[_0x1cbea1(0xf4)]};}export const datasetRename={'service':a75_0x729e8e(0xe6),'command':a75_0x729e8e(0xd8),'description':a75_0x729e8e(0xec),'risk':a75_0x729e8e(0xda),'flags':[CODE_FLAG,{'name':a75_0x729e8e(0xf9),'type':'string','required':!![],'description':a75_0x729e8e(0xf0)},{'name':a75_0x729e8e(0xf3),'type':a75_0x729e8e(0xea),'required':!![],'description':'Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x95b769){validateInput(readDatasetRenameInput(_0x95b769));},async 'dryRun'(_0x5ec481){const _0x903c0f=a75_0x729e8e,_0x369ee2=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x5ec481),'dryRun':!![]});return{'method':_0x903c0f(0xd7),'url':_0x903c0f(0xd5),'body':_0x369ee2[_0x903c0f(0xdb)]['request'],'description':_0x369ee2[_0x903c0f(0xeb)],..._0x369ee2[_0x903c0f(0xdb)]};},async 'execute'(_0xf7269b){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0xf7269b),'dryRun':![]});}};function a75_0x1202(_0x282e97,_0x24ae63){_0x282e97=_0x282e97-0xd3;const _0xe778a5=a75_0xe778();let _0x1202b8=_0xe778a5[_0x282e97];return _0x1202b8;}function readDatasetRenameInput(_0x451c5e){const _0xace1f1=a75_0x729e8e;return{'code':trim(_0x451c5e['str'](_0xace1f1(0xd3))),'name':trim(_0x451c5e[_0xace1f1(0xe0)]('name')),'expectName':trim(_0x451c5e[_0xace1f1(0xe0)]('expect-name'))};}function validateInput(_0x4ef36d){const _0x2bff44=a75_0x729e8e;if(!_0x4ef36d[_0x2bff44(0xd3)])throw CliErrors[_0x2bff44(0xfa)]('--code\x20is\x20required');if(!_0x4ef36d[_0x2bff44(0xf9)])throw CliErrors[_0x2bff44(0xfa)]('--name\x20is\x20required');if(!_0x4ef36d['expectName'])throw CliErrors[_0x2bff44(0xfa)](_0x2bff44(0xe9));}function a75_0xe778(){const _0x36d9d7=['datasetName','code','\x20to\x20','/smartapi/dataset/update-driven-data','1712250abrGIn','POST','rename','datasetId','write','data','1ZcxLOk','Expectation\x20mismatch\x20at\x20dataset.name','53904stSCRQ','object','str','Expected\x20','No\x20changes\x20for\x20dataset\x20','28vyHSjn','507220sGBjcT','isArray','dataset','trim','1058534cjnoUy','--expect-name\x20is\x20required','string','message','Rename\x20dataset\x20display\x20name\x20safely','Renamed\x20dataset\x20','expectName','861606CcLVPs','New\x20dataset\x20display\x20name','5770755AmNfyH',',\x20actual\x20','expect-name','modelCode','676452RiNcCh','modelId','Dry-run:\x20dataset\x20','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code','name','validation','99ZVWFSl','stringify'];a75_0xe778=function(){return _0x36d9d7;};return a75_0xe778();}function resolveCurrentName(_0x52f534){const _0xf8ffa4=a75_0x729e8e;return String(_0x52f534[_0xf8ffa4(0xe6)]?.[_0xf8ffa4(0xfd)]??_0x52f534[_0xf8ffa4(0xf9)]??'')[_0xf8ffa4(0xe7)]();}function buildRenameRequest(_0x1bf0c2,_0x526a8c){const _0x3ac092=a75_0x729e8e,_0x1e240d=isPlainObject(_0x1bf0c2[_0x3ac092(0xe6)])?_0x1bf0c2[_0x3ac092(0xe6)]:{},_0x32ea86=_0x1bf0c2[_0x3ac092(0xf6)]??_0x1bf0c2['id']??_0x1e240d[_0x3ac092(0xd9)];if(_0x32ea86===undefined||_0x32ea86===null||_0x32ea86==='')throw CliErrors['validation']('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id');const _0x3fb4ea=String(_0x1bf0c2[_0x3ac092(0xf4)]??_0x1bf0c2[_0x3ac092(0xd3)]??_0x1e240d['datasetCode']??_0x526a8c[_0x3ac092(0xd3)])[_0x3ac092(0xe7)]();if(!_0x3fb4ea)throw CliErrors[_0x3ac092(0xfa)](_0x3ac092(0xf8));return{'modelId':_0x32ea86,'modelCode':_0x3fb4ea,'name':_0x526a8c[_0x3ac092(0xf9)],'dataset':{'datasetId':_0x32ea86,'datasetCode':_0x3fb4ea,'datasetName':_0x526a8c[_0x3ac092(0xf9)]}};}function isPlainObject(_0x5c24de){const _0x256570=a75_0x729e8e;return Boolean(_0x5c24de)&&typeof _0x5c24de===_0x256570(0xdf)&&!Array[_0x256570(0xe5)](_0x5c24de);}function trim(_0x40bf34){return String(_0x40bf34||'')['trim']();}
1
+ const a75_0x27a56e=a75_0x3b05;(function(_0x1f6ad1,_0x3dfcac){const _0x3f9e8f=a75_0x3b05,_0x49e806=_0x1f6ad1();while(!![]){try{const _0x4d9508=-parseInt(_0x3f9e8f(0x18d))/0x1+parseInt(_0x3f9e8f(0x1ad))/0x2+parseInt(_0x3f9e8f(0x1b6))/0x3+parseInt(_0x3f9e8f(0x1a7))/0x4+-parseInt(_0x3f9e8f(0x1b2))/0x5*(-parseInt(_0x3f9e8f(0x193))/0x6)+-parseInt(_0x3f9e8f(0x1a9))/0x7+-parseInt(_0x3f9e8f(0x190))/0x8;if(_0x4d9508===_0x3dfcac)break;else _0x49e806['push'](_0x49e806['shift']());}catch(_0x17caa5){_0x49e806['push'](_0x49e806['shift']());}}}(a75_0x143e,0x31482));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a75_0x143e(){const _0x1f7016=['string','trim',',\x20actual\x20','Rename\x20dataset\x20display\x20name\x20safely','\x20would\x20be\x20renamed\x20to\x20','write','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','No\x20changes\x20for\x20dataset\x20','Expectation\x20mismatch\x20at\x20dataset.name','--name\x20is\x20required','rename','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code','189588LfTpuo','name','1184841OxFbqJ','code','\x20to\x20','str','559322lybtdg','isArray','object','datasetName','Renamed\x20dataset\x20','5bEvWmc','/smartapi/dataset/update-driven-data','expect-name','dataset','219126MEKYmV','131708UniUsc','validation','New\x20dataset\x20display\x20name','160968aZzviR','modelCode','modelId','737100EQQROx','message','datasetCode','Dry-run:\x20dataset\x20','--expect-name\x20is\x20required','request','expectName','stringify'];a75_0x143e=function(){return _0x1f7016;};return a75_0x143e();}function a75_0x3b05(_0x3960b9,_0x15aa18){_0x3960b9=_0x3960b9-0x18d;const _0x143e98=a75_0x143e();let _0x3b0531=_0x143e98[_0x3960b9];return _0x3b0531;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';export async function buildDatasetRenameResult({input:_0x5a0b86,dryRun:_0x1757c6}){const _0x5c96ee=a75_0x3b05;validateInput(_0x5a0b86);const _0x6876e3=await getDatasetDetail(_0x5a0b86[_0x5c96ee(0x1aa)]),_0x416a4e=resolveCurrentName(_0x6876e3);if(_0x416a4e!==_0x5a0b86[_0x5c96ee(0x199)])throw CliErrors[_0x5c96ee(0x18e)](_0x5c96ee(0x1a3),'Expected\x20'+JSON[_0x5c96ee(0x19a)](_0x5a0b86[_0x5c96ee(0x199)])+_0x5c96ee(0x19d)+JSON[_0x5c96ee(0x19a)](_0x416a4e));const _0x37587e=buildRenameRequest(_0x6876e3,_0x5a0b86),_0x3997fe=_0x416a4e!==_0x5a0b86[_0x5c96ee(0x1a8)];let _0x14e511;return _0x3997fe&&!_0x1757c6&&(_0x14e511=await updateDrivenData(_0x37587e)),{'ok':!![],'data':{'dataset':{'id':_0x37587e[_0x5c96ee(0x192)],'code':_0x37587e[_0x5c96ee(0x191)]},'dryRun':_0x1757c6,'changed':_0x3997fe,'before':{'name':_0x416a4e},'after':{'name':_0x5a0b86['name']},'request':_0x37587e,'submitted':_0x3997fe&&!_0x1757c6,..._0x14e511!==undefined?{'version':_0x14e511}:{}},'message':_0x3997fe?_0x1757c6?_0x5c96ee(0x196)+_0x37587e[_0x5c96ee(0x191)]+_0x5c96ee(0x19f)+_0x5a0b86[_0x5c96ee(0x1a8)]:_0x5c96ee(0x1b1)+_0x37587e[_0x5c96ee(0x191)]+_0x5c96ee(0x1ab)+_0x5a0b86[_0x5c96ee(0x1a8)]:_0x5c96ee(0x1a2)+_0x37587e[_0x5c96ee(0x191)]};}export const datasetRename={'service':'dataset','command':a75_0x27a56e(0x1a5),'description':a75_0x27a56e(0x19e),'risk':a75_0x27a56e(0x1a0),'flags':[CODE_FLAG,{'name':a75_0x27a56e(0x1a8),'type':a75_0x27a56e(0x19b),'required':!![],'description':a75_0x27a56e(0x18f)},{'name':a75_0x27a56e(0x1b4),'type':'string','required':!![],'description':a75_0x27a56e(0x1a1)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1e7a5d){validateInput(readDatasetRenameInput(_0x1e7a5d));},async 'dryRun'(_0x5b8d5f){const _0xfe680e=a75_0x27a56e,_0x5e58be=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x5b8d5f),'dryRun':!![]});return{'method':'POST','url':_0xfe680e(0x1b3),'body':_0x5e58be['data'][_0xfe680e(0x198)],'description':_0x5e58be[_0xfe680e(0x194)],..._0x5e58be['data']};},async 'execute'(_0x2e17b1){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x2e17b1),'dryRun':![]});}};function readDatasetRenameInput(_0x43d68e){const _0x43cc4e=a75_0x27a56e;return{'code':trim(_0x43d68e[_0x43cc4e(0x1ac)](_0x43cc4e(0x1aa))),'name':trim(_0x43d68e[_0x43cc4e(0x1ac)](_0x43cc4e(0x1a8))),'expectName':trim(_0x43d68e[_0x43cc4e(0x1ac)](_0x43cc4e(0x1b4)))};}function validateInput(_0x1c4dd3){const _0x23a7d0=a75_0x27a56e;if(!_0x1c4dd3[_0x23a7d0(0x1aa)])throw CliErrors['validation']('--code\x20is\x20required');if(!_0x1c4dd3['name'])throw CliErrors['validation'](_0x23a7d0(0x1a4));if(!_0x1c4dd3['expectName'])throw CliErrors[_0x23a7d0(0x18e)](_0x23a7d0(0x197));}function resolveCurrentName(_0x1c5900){const _0x548c02=a75_0x27a56e;return String(_0x1c5900['dataset']?.[_0x548c02(0x1b0)]??_0x1c5900[_0x548c02(0x1a8)]??'')[_0x548c02(0x19c)]();}function buildRenameRequest(_0x143cc8,_0x418ebc){const _0x42551e=a75_0x27a56e,_0x5e6a15=isPlainObject(_0x143cc8[_0x42551e(0x1b5)])?_0x143cc8[_0x42551e(0x1b5)]:{},_0x65324c=_0x143cc8[_0x42551e(0x192)]??_0x143cc8['id']??_0x5e6a15['datasetId'];if(_0x65324c===undefined||_0x65324c===null||_0x65324c==='')throw CliErrors[_0x42551e(0x18e)]('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id');const _0x4b9070=String(_0x143cc8[_0x42551e(0x191)]??_0x143cc8[_0x42551e(0x1aa)]??_0x5e6a15[_0x42551e(0x195)]??_0x418ebc[_0x42551e(0x1aa)])['trim']();if(!_0x4b9070)throw CliErrors['validation'](_0x42551e(0x1a6));return{'modelId':_0x65324c,'modelCode':_0x4b9070,'name':_0x418ebc[_0x42551e(0x1a8)],'dataset':{'datasetId':_0x65324c,'datasetCode':_0x4b9070,'datasetName':_0x418ebc[_0x42551e(0x1a8)]}};}function isPlainObject(_0x3947bc){const _0x15d378=a75_0x27a56e;return Boolean(_0x3947bc)&&typeof _0x3947bc===_0x15d378(0x1af)&&!Array[_0x15d378(0x1ae)](_0x3947bc);}function trim(_0x9ca690){const _0x4bb1c2=a75_0x27a56e;return String(_0x9ca690||'')[_0x4bb1c2(0x19c)]();}
@@ -1 +1 @@
1
- const a76_0x3de9a1=a76_0x4e42;(function(_0x4ca006,_0x1b4c7a){const _0x219bee=a76_0x4e42,_0x1def51=_0x4ca006();while(!![]){try{const _0x1e4315=parseInt(_0x219bee(0x1b2))/0x1*(parseInt(_0x219bee(0x1ac))/0x2)+parseInt(_0x219bee(0x1ad))/0x3*(-parseInt(_0x219bee(0x1d6))/0x4)+-parseInt(_0x219bee(0x19e))/0x5*(-parseInt(_0x219bee(0x1a6))/0x6)+-parseInt(_0x219bee(0x1d4))/0x7*(-parseInt(_0x219bee(0x1ae))/0x8)+-parseInt(_0x219bee(0x1c6))/0x9+-parseInt(_0x219bee(0x1b0))/0xa*(parseInt(_0x219bee(0x1ca))/0xb)+-parseInt(_0x219bee(0x1bc))/0xc*(-parseInt(_0x219bee(0x1cb))/0xd);if(_0x1e4315===_0x1b4c7a)break;else _0x1def51['push'](_0x1def51['shift']());}catch(_0x57054e){_0x1def51['push'](_0x1def51['shift']());}}}(a76_0xd009,0x98441));import{listDatasets,listDeletedPages,restoreDataset}from'../../core/api-client.js';function a76_0x4e42(_0x293712,_0x4ca8e3){_0x293712=_0x293712-0x19d;const _0xd009=a76_0xd009();let _0x4e427d=_0xd009[_0x293712];return _0x4e427d;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':'number','description':a76_0x3de9a1(0x1a0)},DBID_FLAG={'name':a76_0x3de9a1(0x1bb),'type':a76_0x3de9a1(0x1cc),'description':'Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':a76_0x3de9a1(0x1a4),'type':a76_0x3de9a1(0x1d3),'description':a76_0x3de9a1(0x19f)},EXPECTED_COUNT_FLAG={'name':a76_0x3de9a1(0x1dd),'type':a76_0x3de9a1(0x1cc),'description':a76_0x3de9a1(0x1c0)},DELETED_PAGE_SIZE=0x64;function a76_0xd009(){const _0x19af45=['\x20dataset(s)','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','confirm','isArray','1772616mcMynZ','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','bool','Restored\x20','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','high-risk-write','2gFWYXy','33xGojGF','97840AXcjAK','Matched\x20','60roIyev','push','413137dlTUUl','validation','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','tableData','set','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','num','filter','datasetIds','dbid','276rUTPtB','currentPage','length','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','id=','Would\x20restore\x20','tableName','dbId','str','3129678MEeQZe','map','\x20failed','code','1840014aIHldH','789113eywmgV','number','restore','name','paging','dbtableConfig','appCode','\x20dataset(s);\x20','boolean','56LhmBey','dbid=','82716zKgLWQ','pageSize','\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.','message','description','dbName','get','expected-count','/smartapi/dataset/restore-dataset','source','5OaZZHh','Required\x20to\x20execute\x20dataset\x20restore','Dataset\x20id','dataset'];a76_0xd009=function(){return _0x19af45;};return a76_0xd009();}export const datasetRestore={'service':a76_0x3de9a1(0x1a1),'command':a76_0x3de9a1(0x1cd),'description':a76_0x3de9a1(0x1bf),'risk':a76_0x3de9a1(0x1ab),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x50c306){const _0x5e4f10=a76_0x3de9a1,_0x51158c=_0x50c306['num']('id'),_0x372c10=_0x50c306[_0x5e4f10(0x1c5)]('code'),_0x597ed6=_0x50c306[_0x5e4f10(0x1b8)](_0x5e4f10(0x1bb)),_0xd7902e=[_0x51158c>0x0,Boolean(_0x372c10),_0x597ed6>0x0]['filter'](Boolean);if(_0xd7902e['length']===0x0)throw CliErrors['validation'](_0x5e4f10(0x1b4));if(_0xd7902e['length']>0x1)throw CliErrors['validation'](_0x5e4f10(0x1a3));},async 'dryRun'(_0x3e7552){const _0x3959f5=a76_0x3de9a1,_0x2fee87=await resolveTargets(_0x3e7552);return{'method':'POST','url':_0x3959f5(0x1de),'body':{'appCode':_0x3e7552[_0x3959f5(0x1d1)],'count':_0x2fee87[_0x3959f5(0x1be)],'datasets':_0x2fee87},'description':_0x3959f5(0x1c2)+_0x2fee87['length']+_0x3959f5(0x1d8)};},async 'execute'(_0x368e87){const _0x553962=a76_0x3de9a1;if(!_0x368e87[_0x553962(0x1a8)](_0x553962(0x1a4)))throw CliErrors[_0x553962(0x1b3)](_0x553962(0x1a7),_0x553962(0x1aa));const _0x33abfa=await resolveTargets(_0x368e87),_0x1c3b02=[],_0x3a9d81=[];for(const _0x313ffe of _0x33abfa){try{await restoreDataset(_0x368e87[_0x553962(0x1d1)],_0x313ffe['id']),_0x1c3b02[_0x553962(0x1b1)](_0x313ffe);}catch(_0x2abd94){_0x3a9d81[_0x553962(0x1b1)]({..._0x313ffe,'error':_0x2abd94 instanceof Error?_0x2abd94[_0x553962(0x1d9)]:String(_0x2abd94)});}}if(_0x3a9d81['length']>0x0)return{'ok':![],'data':{'requested':_0x33abfa[_0x553962(0x1be)],'restoredCount':_0x1c3b02[_0x553962(0x1be)],'failedCount':_0x3a9d81[_0x553962(0x1be)],'restored':_0x1c3b02,'failed':_0x3a9d81},'message':_0x553962(0x1a9)+_0x1c3b02[_0x553962(0x1be)]+'/'+_0x33abfa['length']+_0x553962(0x1d2)+_0x3a9d81[_0x553962(0x1be)]+_0x553962(0x1c8)};return{'ok':!![],'data':{'requested':_0x33abfa[_0x553962(0x1be)],'restoredCount':_0x1c3b02[_0x553962(0x1be)],'restored':_0x1c3b02},'message':_0x553962(0x1a9)+_0x1c3b02[_0x553962(0x1be)]+_0x553962(0x1a2)};}};async function resolveTargets(_0x9072d5){const _0x2e0665=a76_0x3de9a1,_0x34a2b1=_0x9072d5[_0x2e0665(0x1b8)]('id'),_0x2ec50c=_0x9072d5[_0x2e0665(0x1c5)](_0x2e0665(0x1c9)),_0x13ac1e=_0x9072d5['num']('dbid');let _0x48f6c8;_0x2ec50c?(_0x48f6c8=await listDatasets(_0x9072d5[_0x2e0665(0x1d1)],{'code':_0x2ec50c,'deleted':!![]}),_0x48f6c8=_0x48f6c8['filter'](_0x2a77d1=>_0x2a77d1[_0x2e0665(0x1c9)]===_0x2ec50c)):(_0x48f6c8=await listDatasets(_0x9072d5[_0x2e0665(0x1d1)],{'deleted':!![]}),_0x34a2b1>0x0&&(_0x48f6c8=_0x48f6c8[_0x2e0665(0x1b9)](_0x4596db=>_0x4596db['id']===_0x34a2b1)),_0x13ac1e>0x0&&(_0x48f6c8=_0x48f6c8[_0x2e0665(0x1b9)](_0xe8618c=>_0xe8618c[_0x2e0665(0x1d0)]?.['dbId']===_0x13ac1e)));const _0x291fed=await loadDeletedRelatedPageCounts(_0x9072d5[_0x2e0665(0x1d1)]),_0x308fc9=_0x48f6c8[_0x2e0665(0x1c7)](_0x6f9547=>normalizeTarget(_0x6f9547,_0x291fed[_0x2e0665(0x1dc)](_0x6f9547['id'])??0x0));if(_0x308fc9[_0x2e0665(0x1be)]===0x0){const _0x11a281=_0x2ec50c||(_0x34a2b1>0x0?_0x2e0665(0x1c1)+_0x34a2b1:_0x2e0665(0x1d5)+_0x13ac1e);throw CliErrors[_0x2e0665(0x1b3)]('No\x20deleted\x20dataset\x20found\x20for\x20'+_0x11a281+'.');}const _0x4feaca=_0x9072d5[_0x2e0665(0x1b8)](_0x2e0665(0x1dd));if(_0x4feaca>0x0&&_0x308fc9['length']!==_0x4feaca)throw CliErrors[_0x2e0665(0x1b3)](_0x2e0665(0x1af)+_0x308fc9['length']+_0x2e0665(0x1b7)+_0x4feaca+'.');return _0x308fc9;}async function loadDeletedRelatedPageCounts(_0x47facf){const _0x3941f9=a76_0x3de9a1,_0x151d4a=new Map();let _0x2e3153=0x1;while(!![]){const _0x45331e=await listDeletedPages(_0x47facf,'STANDARD',{'currentPage':_0x2e3153,'pageSize':DELETED_PAGE_SIZE}),_0x4d371a=Array[_0x3941f9(0x1a5)](_0x45331e[_0x3941f9(0x1b5)])?_0x45331e[_0x3941f9(0x1b5)]:[];for(const _0x472a26 of _0x4d371a){const _0x41b0ca=Array['isArray'](_0x472a26[_0x3941f9(0x1ba)])?new Set(_0x472a26['datasetIds'][_0x3941f9(0x1c7)](_0x569456=>Number(_0x569456))[_0x3941f9(0x1b9)](_0x49723e=>Number['isFinite'](_0x49723e))):new Set();for(const _0x34007a of _0x41b0ca){_0x151d4a[_0x3941f9(0x1b6)](_0x34007a,(_0x151d4a[_0x3941f9(0x1dc)](_0x34007a)??0x0)+0x1);}}const _0x59d14d=_0x45331e[_0x3941f9(0x1cf)]?.[_0x3941f9(0x1bd)]??_0x2e3153,_0x1956ea=_0x45331e[_0x3941f9(0x1cf)]?.[_0x3941f9(0x1d7)]??DELETED_PAGE_SIZE,_0x2d27a6=_0x45331e[_0x3941f9(0x1cf)]?.['totalCount']??0x0;if(_0x4d371a['length']===0x0||_0x1956ea<=0x0||_0x59d14d*_0x1956ea>=_0x2d27a6)return _0x151d4a;const _0x1ff6ee=_0x59d14d+0x1;if(_0x1ff6ee<=_0x2e3153)return _0x151d4a;_0x2e3153=_0x1ff6ee;}}function normalizeTarget(_0x3a3825,_0x1b5503){const _0x2f82a2=a76_0x3de9a1,_0xa86c15=_0x3a3825[_0x2f82a2(0x1d0)]??{};return{'id':_0x3a3825['id'],'code':_0x3a3825[_0x2f82a2(0x1c9)],'name':_0x3a3825[_0x2f82a2(0x1ce)],'description':_0x3a3825[_0x2f82a2(0x1da)],'source':_0x3a3825[_0x2f82a2(0x19d)],'dbId':_0xa86c15[_0x2f82a2(0x1c4)],'dbName':_0xa86c15[_0x2f82a2(0x1db)],'tableName':_0xa86c15[_0x2f82a2(0x1c3)],'relatedPageCount':_0x1b5503};}
1
+ const a76_0x4d3cd5=a76_0x1602;(function(_0x4e4a72,_0x532ff0){const _0x338598=a76_0x1602,_0x52b825=_0x4e4a72();while(!![]){try{const _0x1958bc=parseInt(_0x338598(0x115))/0x1+-parseInt(_0x338598(0x103))/0x2*(-parseInt(_0x338598(0xfc))/0x3)+parseInt(_0x338598(0x112))/0x4+-parseInt(_0x338598(0xe5))/0x5*(-parseInt(_0x338598(0xef))/0x6)+-parseInt(_0x338598(0xe2))/0x7*(parseInt(_0x338598(0x109))/0x8)+parseInt(_0x338598(0xeb))/0x9+-parseInt(_0x338598(0xe4))/0xa;if(_0x1958bc===_0x532ff0)break;else _0x52b825['push'](_0x52b825['shift']());}catch(_0x42b915){_0x52b825['push'](_0x52b825['shift']());}}}(a76_0x5384,0xd0d4d));import{listDatasets,listDeletedPages,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':a76_0x4d3cd5(0x118),'description':a76_0x4d3cd5(0xda)},DBID_FLAG={'name':'dbid','type':a76_0x4d3cd5(0x118),'description':a76_0x4d3cd5(0x10b)},CONFIRM_FLAG={'name':a76_0x4d3cd5(0x107),'type':a76_0x4d3cd5(0xf3),'description':a76_0x4d3cd5(0xed)},EXPECTED_COUNT_FLAG={'name':a76_0x4d3cd5(0xf8),'type':a76_0x4d3cd5(0x118),'description':a76_0x4d3cd5(0xdc)},DELETED_PAGE_SIZE=0x64;export const datasetRestore={'service':a76_0x4d3cd5(0xfa),'command':a76_0x4d3cd5(0x11a),'description':a76_0x4d3cd5(0x113),'risk':a76_0x4d3cd5(0x10d),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2ac2f9){const _0x3cdfb5=a76_0x4d3cd5,_0x50f060=_0x2ac2f9[_0x3cdfb5(0xf9)]('id'),_0x429b69=_0x2ac2f9[_0x3cdfb5(0xf1)](_0x3cdfb5(0x116)),_0x3f50d2=_0x2ac2f9[_0x3cdfb5(0xf9)](_0x3cdfb5(0xe1)),_0x442d58=[_0x50f060>0x0,Boolean(_0x429b69),_0x3f50d2>0x0][_0x3cdfb5(0x105)](Boolean);if(_0x442d58[_0x3cdfb5(0xde)]===0x0)throw CliErrors[_0x3cdfb5(0xea)](_0x3cdfb5(0x10c));if(_0x442d58['length']>0x1)throw CliErrors[_0x3cdfb5(0xea)](_0x3cdfb5(0x110));},async 'dryRun'(_0x45ae81){const _0x39d0a1=a76_0x4d3cd5,_0x24e7a6=await resolveTargets(_0x45ae81);return{'method':'POST','url':_0x39d0a1(0x102),'body':{'appCode':_0x45ae81[_0x39d0a1(0x10e)],'count':_0x24e7a6[_0x39d0a1(0xde)],'datasets':_0x24e7a6},'description':_0x39d0a1(0xff)+_0x24e7a6['length']+_0x39d0a1(0xdd)};},async 'execute'(_0x6829a){const _0x32366b=a76_0x4d3cd5;if(!_0x6829a[_0x32366b(0x100)](_0x32366b(0x107)))throw CliErrors[_0x32366b(0xea)](_0x32366b(0xf4),_0x32366b(0xf0));const _0x460380=await resolveTargets(_0x6829a),_0x1f15e7=[],_0x203c07=[];for(const _0x3da6a5 of _0x460380){try{await restoreDataset(_0x6829a[_0x32366b(0x10e)],_0x3da6a5['id']),_0x1f15e7[_0x32366b(0xe0)](_0x3da6a5);}catch(_0x458268){_0x203c07[_0x32366b(0xe0)]({..._0x3da6a5,'error':_0x458268 instanceof Error?_0x458268[_0x32366b(0xfe)]:String(_0x458268)});}}if(_0x203c07['length']>0x0)return{'ok':![],'data':{'requested':_0x460380[_0x32366b(0xde)],'restoredCount':_0x1f15e7['length'],'failedCount':_0x203c07[_0x32366b(0xde)],'restored':_0x1f15e7,'failed':_0x203c07},'message':_0x32366b(0xe6)+_0x1f15e7['length']+'/'+_0x460380['length']+_0x32366b(0xfb)+_0x203c07['length']+_0x32366b(0x119)};return{'ok':!![],'data':{'requested':_0x460380[_0x32366b(0xde)],'restoredCount':_0x1f15e7['length'],'restored':_0x1f15e7},'message':_0x32366b(0xe6)+_0x1f15e7[_0x32366b(0xde)]+_0x32366b(0xdf)};}};function a76_0x5384(){const _0x204398=['Restored\x20','tableData','STANDARD','set','validation','13290750fRbxrn','isArray','Required\x20to\x20execute\x20dataset\x20restore','dbId','15378pQDRjZ','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','str','name','boolean','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','paging','dbName','expected-count','num','dataset','\x20dataset(s);\x20','3OJoVop','id=','message','Would\x20restore\x20','bool','tableName','/smartapi/dataset/restore-dataset','897802GcPmlq','isFinite','filter','datasetIds','confirm','totalCount','5788312MrxTOP','get','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','high-risk-write','appCode','Matched\x20','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','No\x20deleted\x20dataset\x20found\x20for\x20','5282424xoCjEM','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','map','716252gYLGOI','code','pageSize','number','\x20failed','restore','Dataset\x20id','currentPage','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.','length','\x20dataset(s)','push','dbid','7DwqcnC','dbtableConfig','27654840mUcBXX','745tttPrH'];a76_0x5384=function(){return _0x204398;};return a76_0x5384();}async function resolveTargets(_0x1751c0){const _0x355ee2=a76_0x4d3cd5,_0x2d09fd=_0x1751c0['num']('id'),_0xa19818=_0x1751c0[_0x355ee2(0xf1)](_0x355ee2(0x116)),_0x180096=_0x1751c0[_0x355ee2(0xf9)](_0x355ee2(0xe1));let _0x59e955;_0xa19818?(_0x59e955=await listDatasets(_0x1751c0[_0x355ee2(0x10e)],{'code':_0xa19818,'deleted':!![]}),_0x59e955=_0x59e955['filter'](_0x1143a9=>_0x1143a9[_0x355ee2(0x116)]===_0xa19818)):(_0x59e955=await listDatasets(_0x1751c0[_0x355ee2(0x10e)],{'deleted':!![]}),_0x2d09fd>0x0&&(_0x59e955=_0x59e955['filter'](_0x4a77aa=>_0x4a77aa['id']===_0x2d09fd)),_0x180096>0x0&&(_0x59e955=_0x59e955[_0x355ee2(0x105)](_0x2631c0=>_0x2631c0[_0x355ee2(0xe3)]?.[_0x355ee2(0xee)]===_0x180096)));const _0x496d5b=await loadDeletedRelatedPageCounts(_0x1751c0['appCode']),_0x55d629=_0x59e955['map'](_0x592ef4=>normalizeTarget(_0x592ef4,_0x496d5b[_0x355ee2(0x10a)](_0x592ef4['id'])??0x0));if(_0x55d629[_0x355ee2(0xde)]===0x0){const _0x4d45a5=_0xa19818||(_0x2d09fd>0x0?_0x355ee2(0xfd)+_0x2d09fd:'dbid='+_0x180096);throw CliErrors[_0x355ee2(0xea)](_0x355ee2(0x111)+_0x4d45a5+'.');}const _0x3d40df=_0x1751c0[_0x355ee2(0xf9)](_0x355ee2(0xf8));if(_0x3d40df>0x0&&_0x55d629[_0x355ee2(0xde)]!==_0x3d40df)throw CliErrors[_0x355ee2(0xea)](_0x355ee2(0x10f)+_0x55d629['length']+_0x355ee2(0xf5)+_0x3d40df+'.');return _0x55d629;}async function loadDeletedRelatedPageCounts(_0x243c9d){const _0x2af1b6=a76_0x4d3cd5,_0x3d7c78=new Map();let _0x3dba9e=0x1;while(!![]){const _0x45727e=await listDeletedPages(_0x243c9d,_0x2af1b6(0xe8),{'currentPage':_0x3dba9e,'pageSize':DELETED_PAGE_SIZE}),_0x22476a=Array[_0x2af1b6(0xec)](_0x45727e[_0x2af1b6(0xe7)])?_0x45727e[_0x2af1b6(0xe7)]:[];for(const _0x1fd165 of _0x22476a){const _0x281401=Array[_0x2af1b6(0xec)](_0x1fd165[_0x2af1b6(0x106)])?new Set(_0x1fd165[_0x2af1b6(0x106)][_0x2af1b6(0x114)](_0x486d16=>Number(_0x486d16))[_0x2af1b6(0x105)](_0x420777=>Number[_0x2af1b6(0x104)](_0x420777))):new Set();for(const _0x53c673 of _0x281401){_0x3d7c78[_0x2af1b6(0xe9)](_0x53c673,(_0x3d7c78['get'](_0x53c673)??0x0)+0x1);}}const _0x5920fc=_0x45727e[_0x2af1b6(0xf6)]?.[_0x2af1b6(0xdb)]??_0x3dba9e,_0x3ff50c=_0x45727e[_0x2af1b6(0xf6)]?.[_0x2af1b6(0x117)]??DELETED_PAGE_SIZE,_0x1f57ee=_0x45727e[_0x2af1b6(0xf6)]?.[_0x2af1b6(0x108)]??0x0;if(_0x22476a[_0x2af1b6(0xde)]===0x0||_0x3ff50c<=0x0||_0x5920fc*_0x3ff50c>=_0x1f57ee)return _0x3d7c78;const _0x781913=_0x5920fc+0x1;if(_0x781913<=_0x3dba9e)return _0x3d7c78;_0x3dba9e=_0x781913;}}function a76_0x1602(_0x41d586,_0x5cc7ae){_0x41d586=_0x41d586-0xda;const _0x538499=a76_0x5384();let _0x160223=_0x538499[_0x41d586];return _0x160223;}function normalizeTarget(_0x4be86b,_0x1e5f64){const _0x172ad5=a76_0x4d3cd5,_0x3a3e34=_0x4be86b['dbtableConfig']??{};return{'id':_0x4be86b['id'],'code':_0x4be86b[_0x172ad5(0x116)],'name':_0x4be86b[_0x172ad5(0xf2)],'description':_0x4be86b['description'],'source':_0x4be86b['source'],'dbId':_0x3a3e34[_0x172ad5(0xee)],'dbName':_0x3a3e34[_0x172ad5(0xf7)],'tableName':_0x3a3e34[_0x172ad5(0x101)],'relatedPageCount':_0x1e5f64};}
@@ -1 +1 @@
1
- function a77_0xcbc8(_0x4738c7,_0x286728){_0x4738c7=_0x4738c7-0xe0;const _0x35f2bf=a77_0x35f2();let _0xcbc889=_0x35f2bf[_0x4738c7];return _0xcbc889;}(function(_0x9f225d,_0x4153ad){const _0x2b9c07=a77_0xcbc8,_0x415583=_0x9f225d();while(!![]){try{const _0xe5fefd=-parseInt(_0x2b9c07(0xe6))/0x1+parseInt(_0x2b9c07(0xf5))/0x2+-parseInt(_0x2b9c07(0xe2))/0x3+parseInt(_0x2b9c07(0xe0))/0x4*(-parseInt(_0x2b9c07(0xee))/0x5)+-parseInt(_0x2b9c07(0xf3))/0x6+-parseInt(_0x2b9c07(0xe1))/0x7+parseInt(_0x2b9c07(0xf1))/0x8;if(_0xe5fefd===_0x4153ad)break;else _0x415583['push'](_0x415583['shift']());}catch(_0x35512d){_0x415583['push'](_0x415583['shift']());}}}(a77_0x35f2,0x4cf1a));import{CliErrors}from'../../errors.js';function a77_0x35f2(){const _0x20d053=['stringify','790GJhNRC','\x20bytes,\x20limit\x20','byteLength','12421832nXuBSC','trim','2769660swXTVZ','push','1237868SNJFDO','15212xDDGZG','3528224MkciIN','645699EbrXMa','validation','map','ceil','74752EEKuHm','length','\x20bytes.','\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20','At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.','heuristic','split'];a77_0x35f2=function(){return _0x20d053;};return a77_0x35f2();}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(_0x6e9071){const _0x529a0b=a77_0xcbc8,_0x408d93=new Set(),_0x2110bf=[];for(const _0x1cf1b6 of _0x6e9071[_0x529a0b(0xec)](',')){const _0x392056=_0x1cf1b6[_0x529a0b(0xf2)]();if(!_0x392056||_0x408d93['has'](_0x392056))continue;_0x408d93['add'](_0x392056),_0x2110bf[_0x529a0b(0xf4)](_0x392056);}return _0x2110bf;}export function measureAnalysisInputParamsBytes(_0x14160c,_0x713ad7){const _0x48fb42=a77_0xcbc8;return Buffer[_0x48fb42(0xf0)](JSON[_0x48fb42(0xed)]({'dbLinkId':_0x14160c,'tableNames':_0x713ad7}),'utf8');}export function buildAnalysisBatchPlan(_0xfa4dcd,_0x1129b8){const _0x59f1aa=a77_0xcbc8;if(_0x1129b8[_0x59f1aa(0xe7)]===0x0)throw CliErrors[_0x59f1aa(0xe3)](_0x59f1aa(0xea));const _0xaca1e8=[];let _0x345056=[];for(const _0x41608c of _0x1129b8){const _0x56a844=[..._0x345056,_0x41608c],_0x5c66b6=_0x56a844['length']>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0xfa4dcd,_0x56a844)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x5c66b6&&_0x345056['length']>0x0?(_0xaca1e8[_0x59f1aa(0xf4)](_0x345056),_0x345056=[_0x41608c]):_0x345056=_0x56a844;const _0x1e269a=measureAnalysisInputParamsBytes(_0xfa4dcd,_0x345056);if(_0x1e269a>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors[_0x59f1aa(0xe3)]('Table\x20\x22'+_0x41608c+_0x59f1aa(0xe9)+_0x1e269a+_0x59f1aa(0xef)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x59f1aa(0xe8));}_0x345056[_0x59f1aa(0xe7)]>0x0&&_0xaca1e8[_0x59f1aa(0xf4)](_0x345056);const _0x3ebb67=_0xaca1e8[_0x59f1aa(0xe4)]((_0x475592,_0x3e34c6)=>({'index':_0x3e34c6+0x1,'tableCount':_0x475592['length'],'inputParamsBytes':measureAnalysisInputParamsBytes(_0xfa4dcd,_0x475592),'estimatedDurationSeconds':_0x475592[_0x59f1aa(0xe7)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x475592})),_0x48010f=_0x1129b8[_0x59f1aa(0xe7)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0xfa4dcd,'tableCount':_0x1129b8[_0x59f1aa(0xe7)],'batchCount':_0x3ebb67[_0x59f1aa(0xe7)],'maxTablesPerBatch':DB_ANALYSIS_MAX_TABLES_PER_BATCH,'maxSerializedBytesPerBatch':DB_ANALYSIS_BATCH_TARGET_BYTES,'serverInputParamsLimitBytes':DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,'planningEstimate':{'basis':_0x59f1aa(0xeb),'assumedSecondsPerTable':DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'estimatedTotalSeconds':_0x48010f,'estimatedTotalMinutes':Math[_0x59f1aa(0xe5)](_0x48010f/0x3c)},'batches':_0x3ebb67};}
1
+ (function(_0x4bb7a7,_0x2e8409){const _0x34cf44=a77_0x5328,_0x2c1ce4=_0x4bb7a7();while(!![]){try{const _0x88307b=-parseInt(_0x34cf44(0x110))/0x1*(-parseInt(_0x34cf44(0x10c))/0x2)+-parseInt(_0x34cf44(0x11b))/0x3*(-parseInt(_0x34cf44(0x119))/0x4)+-parseInt(_0x34cf44(0x11e))/0x5+parseInt(_0x34cf44(0x109))/0x6*(parseInt(_0x34cf44(0x121))/0x7)+-parseInt(_0x34cf44(0x10b))/0x8+parseInt(_0x34cf44(0x11c))/0x9+-parseInt(_0x34cf44(0x112))/0xa;if(_0x88307b===_0x2e8409)break;else _0x2c1ce4['push'](_0x2c1ce4['shift']());}catch(_0x21bb53){_0x2c1ce4['push'](_0x2c1ce4['shift']());}}}(a77_0x3d9e,0xe85a3));function a77_0x5328(_0x283f60,_0x2b3649){_0x283f60=_0x283f60-0x108;const _0x3d9ef3=a77_0x3d9e();let _0x53287b=_0x3d9ef3[_0x283f60];return _0x53287b;}import{CliErrors}from'../../errors.js';function a77_0x3d9e(){const _0x52183a=['7pFrABF','map','10625052RvcTFb','\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20','4975200uLMpjt','519890RcRFju','split','push','byteLength','1leMRXF','At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.','17556450pEMVyy','has','\x20bytes,\x20limit\x20','length','add','stringify','trim','33772TzpTCU','Table\x20\x22','339uegWkw','3225213tdtukx','ceil','69715rLwJYz','validation','\x20bytes.'];a77_0x3d9e=function(){return _0x52183a;};return a77_0x3d9e();}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(_0x3f3961){const _0x34341c=a77_0x5328,_0x1cece0=new Set(),_0x2d6c92=[];for(const _0x15b593 of _0x3f3961[_0x34341c(0x10d)](',')){const _0x590bd0=_0x15b593[_0x34341c(0x118)]();if(!_0x590bd0||_0x1cece0[_0x34341c(0x113)](_0x590bd0))continue;_0x1cece0[_0x34341c(0x116)](_0x590bd0),_0x2d6c92['push'](_0x590bd0);}return _0x2d6c92;}export function measureAnalysisInputParamsBytes(_0x2a981b,_0x262c79){const _0x16b666=a77_0x5328;return Buffer[_0x16b666(0x10f)](JSON[_0x16b666(0x117)]({'dbLinkId':_0x2a981b,'tableNames':_0x262c79}),'utf8');}export function buildAnalysisBatchPlan(_0x726b7e,_0x26e015){const _0x2b8589=a77_0x5328;if(_0x26e015[_0x2b8589(0x115)]===0x0)throw CliErrors[_0x2b8589(0x11f)](_0x2b8589(0x111));const _0x598f2b=[];let _0x596af4=[];for(const _0x9d0924 of _0x26e015){const _0x2e86f5=[..._0x596af4,_0x9d0924],_0x2b9d0a=_0x2e86f5[_0x2b8589(0x115)]>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0x726b7e,_0x2e86f5)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x2b9d0a&&_0x596af4[_0x2b8589(0x115)]>0x0?(_0x598f2b[_0x2b8589(0x10e)](_0x596af4),_0x596af4=[_0x9d0924]):_0x596af4=_0x2e86f5;const _0x3ecfe9=measureAnalysisInputParamsBytes(_0x726b7e,_0x596af4);if(_0x3ecfe9>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors[_0x2b8589(0x11f)](_0x2b8589(0x11a)+_0x9d0924+_0x2b8589(0x10a)+_0x3ecfe9+_0x2b8589(0x114)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x2b8589(0x120));}_0x596af4[_0x2b8589(0x115)]>0x0&&_0x598f2b[_0x2b8589(0x10e)](_0x596af4);const _0x11a8be=_0x598f2b[_0x2b8589(0x108)]((_0x197107,_0x49c4af)=>({'index':_0x49c4af+0x1,'tableCount':_0x197107[_0x2b8589(0x115)],'inputParamsBytes':measureAnalysisInputParamsBytes(_0x726b7e,_0x197107),'estimatedDurationSeconds':_0x197107[_0x2b8589(0x115)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x197107})),_0x1db80b=_0x26e015[_0x2b8589(0x115)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0x726b7e,'tableCount':_0x26e015[_0x2b8589(0x115)],'batchCount':_0x11a8be[_0x2b8589(0x115)],'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':_0x1db80b,'estimatedTotalMinutes':Math[_0x2b8589(0x11d)](_0x1db80b/0x3c)},'batches':_0x11a8be};}
@@ -1 +1 @@
1
- const a78_0x15fef7=a78_0x55d8;function a78_0x2e66(){const _0x430cca=['Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','4060450dwOcNn','2HSFOxL','3227245OmdIGs','analyze-batch-plan','batchCount','estimatedTotalMinutes','read','179793hSNIrg','assumedSecondsPerTable','string','17247bTWBUh','\x20table(s)\x20in\x20','216882xVggav','num','1104489QocQpr','983300XfSSGb','8PVSmln','45qreJGK','str','\x20minute(s)\x20at\x20','planningEstimate','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches'];a78_0x2e66=function(){return _0x430cca;};return a78_0x2e66();}(function(_0x48352b,_0x1efb3e){const _0x40c1fa=a78_0x55d8,_0x45586c=_0x48352b();while(!![]){try{const _0x424258=parseInt(_0x40c1fa(0x101))/0x1*(parseInt(_0x40c1fa(0x113))/0x2)+-parseInt(_0x40c1fa(0x104))/0x3+parseInt(_0x40c1fa(0x109))/0x4+parseInt(_0x40c1fa(0x10b))/0x5*(-parseInt(_0x40c1fa(0x106))/0x6)+parseInt(_0x40c1fa(0x114))/0x7*(parseInt(_0x40c1fa(0x10a))/0x8)+parseInt(_0x40c1fa(0x108))/0x9+-parseInt(_0x40c1fa(0x112))/0xa;if(_0x424258===_0x1efb3e)break;else _0x45586c['push'](_0x45586c['shift']());}catch(_0x2f2009){_0x45586c['push'](_0x45586c['shift']());}}}(a78_0x2e66,0x42781));function a78_0x55d8(_0x2b7b87,_0x5533b1){_0x2b7b87=_0x2b7b87-0x100;const _0x2e66b3=a78_0x2e66();let _0x55d867=_0x2e66b3[_0x2b7b87];return _0x55d867;}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';export const dbAnalyzeBatchPlan={'service':'db','command':a78_0x15fef7(0x115),'description':a78_0x15fef7(0x111),'risk':a78_0x15fef7(0x100),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a78_0x15fef7(0x103),'required':!![],'description':a78_0x15fef7(0x110)}],async 'execute'(_0x4303a3){const _0x5ca835=a78_0x15fef7,_0x2157d2=_0x4303a3[_0x5ca835(0x107)]('id'),_0x1c4d68=normalizeAnalysisTableNames(_0x4303a3[_0x5ca835(0x10c)]('tables')),_0x197b48=buildAnalysisBatchPlan(_0x2157d2,_0x1c4d68);return{'ok':!![],'data':_0x197b48,'message':'Prepared\x20local\x20batch\x20plan\x20for\x20'+_0x197b48['tableCount']+_0x5ca835(0x105)+_0x197b48[_0x5ca835(0x116)]+'\x20serial\x20batch(es)\x20for\x20db\x20link\x20'+_0x2157d2+';\x20estimated\x20about\x20'+_0x197b48[_0x5ca835(0x10e)][_0x5ca835(0x117)]+_0x5ca835(0x10d)+_0x197b48[_0x5ca835(0x10e)][_0x5ca835(0x102)]+_0x5ca835(0x10f)};}};
1
+ const a78_0x1d502d=a78_0x49ee;(function(_0x578950,_0xd306d4){const _0x91796f=a78_0x49ee,_0x2766d4=_0x578950();while(!![]){try{const _0x4f631e=-parseInt(_0x91796f(0x97))/0x1*(-parseInt(_0x91796f(0xa1))/0x2)+-parseInt(_0x91796f(0x95))/0x3*(parseInt(_0x91796f(0x9a))/0x4)+parseInt(_0x91796f(0xa3))/0x5*(parseInt(_0x91796f(0x9e))/0x6)+-parseInt(_0x91796f(0xa4))/0x7+-parseInt(_0x91796f(0xa5))/0x8*(parseInt(_0x91796f(0x98))/0x9)+-parseInt(_0x91796f(0x9f))/0xa+parseInt(_0x91796f(0xa7))/0xb;if(_0x4f631e===_0xd306d4)break;else _0x2766d4['push'](_0x2766d4['shift']());}catch(_0x1b4bab){_0x2766d4['push'](_0x2766d4['shift']());}}}(a78_0x3f55,0xb2a13));import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a78_0x3f55(){const _0x36bc17=['batchCount','num','Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','477kFAykw','read','72542CTkCka','18xLKKIf','planningEstimate','35936HJKzGf','tables','\x20table(s)\x20in\x20',';\x20estimated\x20about\x20','6WiHrxu','13565560aPkfrj','\x20serial\x20batch(es)\x20for\x20db\x20link\x20','12ViwzFV','str','4760155gBdlQw','8533210VpwshR','1026680mnsVhm','assumedSecondsPerTable','39656056amLeaV'];a78_0x3f55=function(){return _0x36bc17;};return a78_0x3f55();}import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';function a78_0x49ee(_0xfed977,_0x3e8693){_0xfed977=_0xfed977-0x94;const _0x3f55ea=a78_0x3f55();let _0x49ee45=_0x3f55ea[_0xfed977];return _0x49ee45;}export const dbAnalyzeBatchPlan={'service':'db','command':'analyze-batch-plan','description':a78_0x1d502d(0x94),'risk':a78_0x1d502d(0x96),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a78_0x1d502d(0x9b),'type':'string','required':!![],'description':'Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches'}],async 'execute'(_0xa532e3){const _0x597fa8=a78_0x1d502d,_0x50f361=_0xa532e3[_0x597fa8(0xa9)]('id'),_0x3470ba=normalizeAnalysisTableNames(_0xa532e3[_0x597fa8(0xa2)]('tables')),_0x47e719=buildAnalysisBatchPlan(_0x50f361,_0x3470ba);return{'ok':!![],'data':_0x47e719,'message':'Prepared\x20local\x20batch\x20plan\x20for\x20'+_0x47e719['tableCount']+_0x597fa8(0x9c)+_0x47e719[_0x597fa8(0xa8)]+_0x597fa8(0xa0)+_0x50f361+_0x597fa8(0x9d)+_0x47e719['planningEstimate']['estimatedTotalMinutes']+'\x20minute(s)\x20at\x20'+_0x47e719[_0x597fa8(0x99)][_0x597fa8(0xa6)]+'\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created'};}};
@@ -1 +1 @@
1
- const a79_0xc570cc=a79_0x1391;(function(_0x3bac45,_0x35cda9){const _0x24aa9c=a79_0x1391,_0x1e8350=_0x3bac45();while(!![]){try{const _0xa8ebf=-parseInt(_0x24aa9c(0xe0))/0x1+-parseInt(_0x24aa9c(0xe4))/0x2*(-parseInt(_0x24aa9c(0xed))/0x3)+-parseInt(_0x24aa9c(0xea))/0x4*(-parseInt(_0x24aa9c(0xe8))/0x5)+-parseInt(_0x24aa9c(0xec))/0x6*(-parseInt(_0x24aa9c(0xe6))/0x7)+parseInt(_0x24aa9c(0xee))/0x8*(parseInt(_0x24aa9c(0xe1))/0x9)+parseInt(_0x24aa9c(0xe7))/0xa*(parseInt(_0x24aa9c(0xe3))/0xb)+-parseInt(_0x24aa9c(0xeb))/0xc;if(_0xa8ebf===_0x35cda9)break;else _0x1e8350['push'](_0x1e8350['shift']());}catch(_0x436e85){_0x1e8350['push'](_0x1e8350['shift']());}}}(a79_0x561d,0x3bf6f));function a79_0x561d(){const _0x456551=['9dUXgJz','write','14377npLnjH','2gUSotf','Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','283717rfQEyJ','1210aSFUfe','25195MnrieU','plan','56DgDNgz','8361960yfynsd','42JbkmWD','1446297LKLskV','2307296XnbMDX','num','Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel','340476KGmOVZ'];a79_0x561d=function(){return _0x456551;};return a79_0x561d();}import{cancelDbAnalysis}from'../../core/api-client.js';function a79_0x1391(_0x4d386f,_0xa28a77){_0x4d386f=_0x4d386f-0xde;const _0x561de0=a79_0x561d();let _0x13910a=_0x561de0[_0x4d386f];return _0x13910a;}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':'analyze-cancel','description':a79_0xc570cc(0xe5),'risk':a79_0xc570cc(0xe2),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':'string','required':!![],'description':a79_0xc570cc(0xdf)}],async 'execute'(_0x414e6b){const _0x40c7a8=a79_0xc570cc,_0x223e31=_0x414e6b[_0x40c7a8(0xde)]('id'),_0x52c50b=_0x414e6b['str'](_0x40c7a8(0xe9));return await cancelDbAnalysis(_0x52c50b),{'ok':!![],'data':{'dbLinkId':_0x223e31,'planId':_0x52c50b},'message':'Cancel\x20requested\x20for\x20plan\x20'+_0x52c50b};}};
1
+ const a79_0x45f0c5=a79_0x4262;function a79_0x4262(_0x223b89,_0x12a6f3){_0x223b89=_0x223b89-0x1e7;const _0x47f1e7=a79_0x47f1();let _0x42620e=_0x47f1e7[_0x223b89];return _0x42620e;}(function(_0x2ba0b2,_0x45181d){const _0x4941a6=a79_0x4262,_0x3eadc2=_0x2ba0b2();while(!![]){try{const _0x3ad784=-parseInt(_0x4941a6(0x1f5))/0x1*(parseInt(_0x4941a6(0x1f4))/0x2)+parseInt(_0x4941a6(0x1f1))/0x3+-parseInt(_0x4941a6(0x1ee))/0x4+-parseInt(_0x4941a6(0x1e9))/0x5*(-parseInt(_0x4941a6(0x1f6))/0x6)+parseInt(_0x4941a6(0x1f0))/0x7+-parseInt(_0x4941a6(0x1ec))/0x8+parseInt(_0x4941a6(0x1e8))/0x9;if(_0x3ad784===_0x45181d)break;else _0x3eadc2['push'](_0x3eadc2['shift']());}catch(_0x3e2a48){_0x3eadc2['push'](_0x3eadc2['shift']());}}}(a79_0x47f1,0xe5c76));import{cancelDbAnalysis}from'../../core/api-client.js';function a79_0x47f1(){const _0x89c1e1=['192hcnhSs','Cancel\x20requested\x20for\x20plan\x20','16459299HCJCXc','129065wVqrAn','plan','string','5202056PxyBwi','str','6833376kfmwkp','num','2260167rScjfj','2223114xppJjZ','Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel','analyze-cancel','39902APahlc','21Dtoemf'];a79_0x47f1=function(){return _0x89c1e1;};return a79_0x47f1();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a79_0x45f0c5(0x1f3),'description':'Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a79_0x45f0c5(0x1ea),'type':a79_0x45f0c5(0x1eb),'required':!![],'description':a79_0x45f0c5(0x1f2)}],async 'execute'(_0x3c691f){const _0x4588c2=a79_0x45f0c5,_0x2803a5=_0x3c691f[_0x4588c2(0x1ef)]('id'),_0x3e5a90=_0x3c691f[_0x4588c2(0x1ed)](_0x4588c2(0x1ea));return await cancelDbAnalysis(_0x3e5a90),{'ok':!![],'data':{'dbLinkId':_0x2803a5,'planId':_0x3e5a90},'message':_0x4588c2(0x1e7)+_0x3e5a90};}};
@@ -1 +1 @@
1
- const a80_0x151e94=a80_0x32f0;(function(_0x18d65d,_0x3c8ebb){const _0x12ca08=a80_0x32f0,_0x585ae2=_0x18d65d();while(!![]){try{const _0x24c06a=parseInt(_0x12ca08(0xb9))/0x1*(-parseInt(_0x12ca08(0xb2))/0x2)+parseInt(_0x12ca08(0xb4))/0x3+parseInt(_0x12ca08(0xa3))/0x4*(parseInt(_0x12ca08(0xac))/0x5)+parseInt(_0x12ca08(0xab))/0x6+-parseInt(_0x12ca08(0xa2))/0x7+parseInt(_0x12ca08(0xa4))/0x8+-parseInt(_0x12ca08(0xb7))/0x9*(parseInt(_0x12ca08(0xba))/0xa);if(_0x24c06a===_0x3c8ebb)break;else _0x585ae2['push'](_0x585ae2['shift']());}catch(_0x2eab85){_0x585ae2['push'](_0x585ae2['shift']());}}}(a80_0x235d,0xed442));import{startDbAnalysis}from'../../core/api-client.js';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';function a80_0x32f0(_0x22e14c,_0x44b7f8){_0x22e14c=_0x22e14c-0xa2;const _0x235de1=a80_0x235d();let _0x32f07d=_0x235de1[_0x22e14c];return _0x32f07d;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a80_0x235d(){const _0x5f1780=['At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20','2210016JrhQbs','3294960lprDAt','num','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','flag','str','validation','16ywidWL','analyze-start','3824229Jhdqyd','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','tables','1863dSCOGu','\x20db\x20analyze-batch-plan\x20--id\x20','66412ieyvZg','23500oMSVKk','\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.','appCode','5836481kjXJFc','4vVPtRs','4170400kTWlIi','length','string','\x20bytes.\x20Run\x20`','write'];a80_0x235d=function(){return _0x5f1780;};return a80_0x235d();}export const dbAnalyzeStart={'service':'db','command':a80_0x151e94(0xb3),'description':a80_0x151e94(0xb5),'risk':a80_0x151e94(0xa8),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a80_0x151e94(0xb6),'type':a80_0x151e94(0xa6),'description':a80_0x151e94(0xae)}],async 'execute'(_0x1b980a){const _0x256c43=a80_0x151e94,_0x22f38f=_0x1b980a[_0x256c43(0xad)]('id'),_0x32358c=_0x1b980a[_0x256c43(0xb0)](_0x256c43(0xb6)),_0x2d372b=_0x1b980a[_0x256c43(0xaf)](_0x256c43(0xb6))!==undefined,_0x49d22a=_0x2d372b?normalizeAnalysisTableNames(_0x32358c):undefined;if(_0x49d22a&&_0x49d22a[_0x256c43(0xa5)]===0x0)throw CliErrors[_0x256c43(0xb1)](_0x256c43(0xa9));if(_0x49d22a&&_0x49d22a[_0x256c43(0xa5)]>0x0){const _0x31bf22=measureAnalysisInputParamsBytes(_0x22f38f,_0x49d22a);if(_0x31bf22>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors[_0x256c43(0xb1)](_0x256c43(0xaa)+_0x49d22a[_0x256c43(0xa5)]+'\x20table(s),\x20'+_0x31bf22+'\x20bytes,\x20limit\x20'+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x256c43(0xa7)+CLI_BIN_NAME+_0x256c43(0xb8)+_0x22f38f+_0x256c43(0xbb));}const {planId:_0x54fa48,estimatedMinutes:_0x4c83ec,estimatedDurationDesc:_0x3e6b00}=await startDbAnalysis(_0x22f38f,_0x49d22a),_0x319b44=buildDbPageLinks(_0x1b980a[_0x256c43(0xbc)],_0x22f38f);return{'ok':!![],'data':{'dbLinkId':_0x22f38f,'planId':_0x54fa48,'tableNames':_0x49d22a??[],'serverEstimate':{'estimatedMinutes':_0x4c83ec,'estimatedDurationDesc':_0x3e6b00},..._0x319b44?{'links':_0x319b44}:{}},'message':'Started\x20analysis\x20for\x20db\x20link\x20'+_0x22f38f};}};
1
+ function a80_0x5385(_0x2c7607,_0x5c9055){_0x2c7607=_0x2c7607-0xd1;const _0x21b076=a80_0x21b0();let _0x538590=_0x21b076[_0x2c7607];return _0x538590;}const a80_0x50d49b=a80_0x5385;(function(_0x19ceac,_0x591460){const _0x1e7d96=a80_0x5385,_0x4dabfc=_0x19ceac();while(!![]){try{const _0x3386cb=parseInt(_0x1e7d96(0xdc))/0x1*(-parseInt(_0x1e7d96(0xe3))/0x2)+-parseInt(_0x1e7d96(0xe1))/0x3+-parseInt(_0x1e7d96(0xdf))/0x4+-parseInt(_0x1e7d96(0xe5))/0x5+parseInt(_0x1e7d96(0xda))/0x6*(-parseInt(_0x1e7d96(0xdb))/0x7)+-parseInt(_0x1e7d96(0xe0))/0x8*(parseInt(_0x1e7d96(0xde))/0x9)+parseInt(_0x1e7d96(0xd3))/0xa*(parseInt(_0x1e7d96(0xd2))/0xb);if(_0x3386cb===_0x591460)break;else _0x4dabfc['push'](_0x4dabfc['shift']());}catch(_0x2ff9f4){_0x4dabfc['push'](_0x4dabfc['shift']());}}}(a80_0x21b0,0xa7473));function a80_0x21b0(){const _0x52262f=['analyze-start','At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','length','36432407nCNAqv','20fBWiKU','appCode','num','str','string','tables','\x20bytes.\x20Run\x20`','5830338YlSnEa','7ZQGWHb','12kKZMKf','write','3413493eXIYnq','3723860LXgfqV','24fcqAuw','1759707BooHvt','validation','158596nCetIP','Started\x20analysis\x20for\x20db\x20link\x20','6801195YSPWES','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)'];a80_0x21b0=function(){return _0x52262f;};return a80_0x21b0();}import{startDbAnalysis}from'../../core/api-client.js';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':a80_0x50d49b(0xe7),'description':'Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','risk':a80_0x50d49b(0xdd),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a80_0x50d49b(0xd7),'description':a80_0x50d49b(0xe6)}],async 'execute'(_0x5ddd60){const _0x32caed=a80_0x50d49b,_0x22ceb2=_0x5ddd60[_0x32caed(0xd5)]('id'),_0x387141=_0x5ddd60[_0x32caed(0xd6)]('tables'),_0x361063=_0x5ddd60['flag'](_0x32caed(0xd8))!==undefined,_0x12c4f6=_0x361063?normalizeAnalysisTableNames(_0x387141):undefined;if(_0x12c4f6&&_0x12c4f6[_0x32caed(0xd1)]===0x0)throw CliErrors[_0x32caed(0xe2)](_0x32caed(0xe8));if(_0x12c4f6&&_0x12c4f6['length']>0x0){const _0x375600=measureAnalysisInputParamsBytes(_0x22ceb2,_0x12c4f6);if(_0x375600>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors[_0x32caed(0xe2)]('Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20'+_0x12c4f6['length']+'\x20table(s),\x20'+_0x375600+'\x20bytes,\x20limit\x20'+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x32caed(0xd9)+CLI_BIN_NAME+'\x20db\x20analyze-batch-plan\x20--id\x20'+_0x22ceb2+'\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.');}const {planId:_0x421741,estimatedMinutes:_0xced5b0,estimatedDurationDesc:_0x220537}=await startDbAnalysis(_0x22ceb2,_0x12c4f6),_0x9361a7=buildDbPageLinks(_0x5ddd60[_0x32caed(0xd4)],_0x22ceb2);return{'ok':!![],'data':{'dbLinkId':_0x22ceb2,'planId':_0x421741,'tableNames':_0x12c4f6??[],'serverEstimate':{'estimatedMinutes':_0xced5b0,'estimatedDurationDesc':_0x220537},..._0x9361a7?{'links':_0x9361a7}:{}},'message':_0x32caed(0xe4)+_0x22ceb2};}};
@@ -1 +1 @@
1
- const a81_0x3f4b2e=a81_0x7f3d;(function(_0x27c3d5,_0x2a5540){const _0x128f41=a81_0x7f3d,_0x2e1034=_0x27c3d5();while(!![]){try{const _0xb58342=parseInt(_0x128f41(0x196))/0x1+-parseInt(_0x128f41(0x1a2))/0x2*(-parseInt(_0x128f41(0x1a3))/0x3)+parseInt(_0x128f41(0x18e))/0x4*(parseInt(_0x128f41(0x1a4))/0x5)+-parseInt(_0x128f41(0x183))/0x6*(parseInt(_0x128f41(0x180))/0x7)+-parseInt(_0x128f41(0x1a7))/0x8*(parseInt(_0x128f41(0x181))/0x9)+parseInt(_0x128f41(0x19c))/0xa+-parseInt(_0x128f41(0x194))/0xb;if(_0xb58342===_0x2a5540)break;else _0x2e1034['push'](_0x2e1034['shift']());}catch(_0x24ad9a){_0x2e1034['push'](_0x2e1034['shift']());}}}(a81_0x4edd,0x56806));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a81_0x3f4b2e(0x1a1),a81_0x3f4b2e(0x1a8),'FAILED','CANCELLED']);export const dbAnalyzeStatus={'service':'db','command':a81_0x3f4b2e(0x193),'description':'Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x3f4b2e(0x1a9),'type':'string','required':!![],'description':a81_0x3f4b2e(0x195)}],async 'execute'(_0x300f9b){const _0xe223=a81_0x3f4b2e,_0x260875=_0x300f9b[_0xe223(0x19d)]('id'),_0x2cc8fd=_0x300f9b[_0xe223(0x18a)](_0xe223(0x1a9)),_0x27406a=await getDbAnalysisStatus(_0x2cc8fd),_0x4e3c87=TERMINAL_STATUSES[_0xe223(0x184)](_0x27406a[_0xe223(0x188)]??''),{parsedJobContext:_0x769af,jobContextParseWarning:_0x30624c}=parseJobContext(_0x27406a[_0xe223(0x18c)]),{requestedAnalysis:_0x1d6bc0,requestedAnalysisParseWarning:_0x4f2c25}=parseRequestedAnalysis(_0x27406a[_0xe223(0x189)]),_0x54ea65=readAccumulatedErrorTypeCounts(_0x769af),_0x3f327e=calculateAttemptElapsedMs(_0x27406a,_0x4e3c87),_0x4dc415=calculateElapsedFromStart(_0x27406a[_0xe223(0x185)],_0x27406a['endTime'],_0x4e3c87),_0x5be93c=detectMultipleAttempts(_0x27406a),_0x58c208=buildDbPageLinks(_0x300f9b[_0xe223(0x19e)],_0x260875);return{'ok':!![],'data':{'dbLinkId':_0x260875,'planId':_0x2cc8fd,'status':_0x27406a,'requestedAnalysis':_0x1d6bc0,'requestedAnalysisParseWarning':_0x4f2c25,'parsedJobContext':_0x769af,'accumulatedErrorTypeCounts':_0x54ea65,'accumulatedErrorTypeCountsAdvisory':_0x54ea65?_0xe223(0x190):_0xe223(0x1a6),'isTerminal':_0x4e3c87,'isRetrying':_0x27406a['status']===_0xe223(0x187),'attemptElapsedMs':_0x3f327e,'totalElapsedMs':_0x4dc415,'hasMultipleAttempts':_0x5be93c,'jobContextParseWarning':_0x30624c,..._0x58c208?{'links':_0x58c208}:{}},'message':'Analysis\x20status\x20for\x20'+_0x2cc8fd};}};function parseRequestedAnalysis(_0x22da93){const _0x39f58c=a81_0x3f4b2e,_0x579a82={'mode':_0x39f58c(0x1a5),'tableCount':null,'tableNames':null};if(!_0x22da93?.[_0x39f58c(0x186)]())return{'requestedAnalysis':_0x579a82,'requestedAnalysisParseWarning':'Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.'};try{const _0x40a49f=JSON[_0x39f58c(0x197)](_0x22da93);if(!_0x40a49f||typeof _0x40a49f!==_0x39f58c(0x1aa)||Array[_0x39f58c(0x182)](_0x40a49f))throw new Error(_0x39f58c(0x18d));const _0x45d1c2=_0x40a49f['tableNames'];if(_0x45d1c2===undefined||_0x45d1c2===null)return{'requestedAnalysis':{'mode':_0x39f58c(0x191),'tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x39f58c(0x182)](_0x45d1c2)&&_0x45d1c2['every'](_0x525dc2=>typeof _0x525dc2===_0x39f58c(0x199)))return{'requestedAnalysis':{'mode':_0x45d1c2['length']>0x0?'TARGETED':_0x39f58c(0x191),'tableCount':_0x45d1c2['length'],'tableNames':_0x45d1c2},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x579a82,'requestedAnalysisParseWarning':'inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.'};}function a81_0x7f3d(_0x57088e,_0x23cc4b){_0x57088e=_0x57088e-0x180;const _0x4edda5=a81_0x4edd();let _0x7f3dfa=_0x4edda5[_0x57088e];return _0x7f3dfa;}function readAccumulatedErrorTypeCounts(_0x469dc1){const _0x3f01a0=a81_0x3f4b2e,_0x41edb4=_0x469dc1?.[_0x3f01a0(0x192)];if(!_0x41edb4||typeof _0x41edb4!=='object'||Array[_0x3f01a0(0x182)](_0x41edb4))return null;if(Object[_0x3f01a0(0x18b)](_0x41edb4)['length']===0x0)return null;return _0x41edb4;}function parseJobContext(_0xc06298){const _0x592c91=a81_0x3f4b2e;if(!_0xc06298?.[_0x592c91(0x186)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x3ef4ed=JSON[_0x592c91(0x197)](_0xc06298);if(_0x3ef4ed&&typeof _0x3ef4ed==='object'&&!Array[_0x592c91(0x182)](_0x3ef4ed))return{'parsedJobContext':_0x3ef4ed,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x592c91(0x18f)};}function calculateAttemptElapsedMs(_0x289573,_0x581903){const _0x99a013=a81_0x3f4b2e;if(typeof _0x289573['costTimeMs']==='number'&&Number['isFinite'](_0x289573[_0x99a013(0x19b)])&&_0x289573[_0x99a013(0x19b)]>=0x0)return _0x289573[_0x99a013(0x19b)];return calculateElapsedFromStart(_0x289573['startTime'],_0x289573['endTime'],_0x581903);}function a81_0x4edd(){const _0x2183f7=['inputParams','str','keys','jobContext','inputParams\x20is\x20not\x20an\x20object','504wEeNkE','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','FULL','accumulatedErrorTypeCounts','analyze-status','1564299rbbWqw','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','69754ZwXwqv','parse','isFinite','string','number','costTimeMs','414830kgyYGx','num','appCode','startTime','isNaN','SUCCESS','1192670aTJiJz','3mKxsSx','16385oqtUqQ','UNKNOWN','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','4376FyLgKG','PARTIAL_SUCCESS','plan','object','674429xGgMwW','2340ykTSMG','isArray','30aUjdcL','has','firstStartTime','trim','RETRYING','status'];a81_0x4edd=function(){return _0x2183f7;};return a81_0x4edd();}function calculateElapsedFromStart(_0x176639,_0x592109,_0x140e15){const _0x458a20=toTimestamp(_0x176639);if(_0x458a20===null)return null;const _0x54300f=toTimestamp(_0x592109),_0x51e767=_0x54300f??(_0x140e15?null:Date['now']());if(_0x51e767===null||_0x51e767<_0x458a20)return null;return _0x51e767-_0x458a20;}function detectMultipleAttempts(_0x4a6234){const _0x220afb=a81_0x3f4b2e,_0x2fc834=toTimestamp(_0x4a6234['firstStartTime']),_0x3cf1c7=toTimestamp(_0x4a6234[_0x220afb(0x19f)]);return _0x2fc834!==null&&_0x3cf1c7!==null&&_0x2fc834!==_0x3cf1c7;}function toTimestamp(_0x388bcc){const _0xdaca27=a81_0x3f4b2e;if(typeof _0x388bcc===_0xdaca27(0x19a))return Number['isFinite'](_0x388bcc)?_0x388bcc:null;if(typeof _0x388bcc!==_0xdaca27(0x199)||_0x388bcc['trim']()==='')return null;const _0x18a5aa=Number(_0x388bcc);if(Number[_0xdaca27(0x198)](_0x18a5aa))return _0x18a5aa;const _0x5e729b=Date[_0xdaca27(0x197)](_0x388bcc);return Number[_0xdaca27(0x1a0)](_0x5e729b)?null:_0x5e729b;}
1
+ const a81_0x9a474e=a81_0x36dd;(function(_0x231a08,_0x32a999){const _0x174ce9=a81_0x36dd,_0x5e7239=_0x231a08();while(!![]){try{const _0x4640f8=-parseInt(_0x174ce9(0x151))/0x1*(-parseInt(_0x174ce9(0x15f))/0x2)+-parseInt(_0x174ce9(0x15d))/0x3*(-parseInt(_0x174ce9(0x17c))/0x4)+parseInt(_0x174ce9(0x163))/0x5*(parseInt(_0x174ce9(0x16d))/0x6)+parseInt(_0x174ce9(0x16c))/0x7+parseInt(_0x174ce9(0x155))/0x8*(-parseInt(_0x174ce9(0x16b))/0x9)+parseInt(_0x174ce9(0x176))/0xa*(parseInt(_0x174ce9(0x15b))/0xb)+parseInt(_0x174ce9(0x150))/0xc*(-parseInt(_0x174ce9(0x171))/0xd);if(_0x4640f8===_0x32a999)break;else _0x5e7239['push'](_0x5e7239['shift']());}catch(_0xba362c){_0x5e7239['push'](_0x5e7239['shift']());}}}(a81_0x5c1f,0xd20cc));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a81_0x9a474e(0x178),a81_0x9a474e(0x165),'FAILED','CANCELLED']);export const dbAnalyzeStatus={'service':'db','command':a81_0x9a474e(0x15e),'description':a81_0x9a474e(0x158),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':'string','required':!![],'description':a81_0x9a474e(0x16e)}],async 'execute'(_0x33f06b){const _0x5c63b2=a81_0x9a474e,_0x1548e4=_0x33f06b['num']('id'),_0xe26993=_0x33f06b['str'](_0x5c63b2(0x153)),_0x243bc5=await getDbAnalysisStatus(_0xe26993),_0x1152f2=TERMINAL_STATUSES[_0x5c63b2(0x159)](_0x243bc5['status']??''),{parsedJobContext:_0x3d57c6,jobContextParseWarning:_0x1d63f7}=parseJobContext(_0x243bc5[_0x5c63b2(0x170)]),{requestedAnalysis:_0x4277de,requestedAnalysisParseWarning:_0x47ed4b}=parseRequestedAnalysis(_0x243bc5[_0x5c63b2(0x162)]),_0x18e7ad=readAccumulatedErrorTypeCounts(_0x3d57c6),_0x499302=calculateAttemptElapsedMs(_0x243bc5,_0x1152f2),_0x163ced=calculateElapsedFromStart(_0x243bc5['firstStartTime'],_0x243bc5[_0x5c63b2(0x173)],_0x1152f2),_0x2f4f90=detectMultipleAttempts(_0x243bc5),_0x4fb3d4=buildDbPageLinks(_0x33f06b[_0x5c63b2(0x16a)],_0x1548e4);return{'ok':!![],'data':{'dbLinkId':_0x1548e4,'planId':_0xe26993,'status':_0x243bc5,'requestedAnalysis':_0x4277de,'requestedAnalysisParseWarning':_0x47ed4b,'parsedJobContext':_0x3d57c6,'accumulatedErrorTypeCounts':_0x18e7ad,'accumulatedErrorTypeCountsAdvisory':_0x18e7ad?'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.':_0x5c63b2(0x161),'isTerminal':_0x1152f2,'isRetrying':_0x243bc5[_0x5c63b2(0x17a)]===_0x5c63b2(0x172),'attemptElapsedMs':_0x499302,'totalElapsedMs':_0x163ced,'hasMultipleAttempts':_0x2f4f90,'jobContextParseWarning':_0x1d63f7,..._0x4fb3d4?{'links':_0x4fb3d4}:{}},'message':_0x5c63b2(0x160)+_0xe26993};}};function parseRequestedAnalysis(_0x236ba9){const _0x48f3ee=a81_0x9a474e,_0x2a609a={'mode':_0x48f3ee(0x152),'tableCount':null,'tableNames':null};if(!_0x236ba9?.[_0x48f3ee(0x177)]())return{'requestedAnalysis':_0x2a609a,'requestedAnalysisParseWarning':_0x48f3ee(0x169)};try{const _0x3159f7=JSON[_0x48f3ee(0x174)](_0x236ba9);if(!_0x3159f7||typeof _0x3159f7!==_0x48f3ee(0x17d)||Array['isArray'](_0x3159f7))throw new Error(_0x48f3ee(0x179));const _0x1929aa=_0x3159f7[_0x48f3ee(0x154)];if(_0x1929aa===undefined||_0x1929aa===null)return{'requestedAnalysis':{'mode':_0x48f3ee(0x166),'tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x48f3ee(0x168)](_0x1929aa)&&_0x1929aa[_0x48f3ee(0x15a)](_0x10bff4=>typeof _0x10bff4===_0x48f3ee(0x164)))return{'requestedAnalysis':{'mode':_0x1929aa['length']>0x0?'TARGETED':_0x48f3ee(0x166),'tableCount':_0x1929aa[_0x48f3ee(0x175)],'tableNames':_0x1929aa},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x2a609a,'requestedAnalysisParseWarning':_0x48f3ee(0x16f)};}function a81_0x5c1f(){const _0xbb3bea=['Analysis\x20status\x20for\x20','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','inputParams','355vcoTjM','string','PARTIAL_SUCCESS','FULL','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','isArray','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','appCode','2268GsCVgD','5377589ZKYhrb','48972GmQHes','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.','jobContext','13zlzMco','RETRYING','endTime','parse','length','1421180msCcxD','trim','SUCCESS','inputParams\x20is\x20not\x20an\x20object','status','now','8ZbLXRk','object','isFinite','startTime','53922828wRNUZI','21XbToyx','UNKNOWN','plan','tableNames','1640ZIJWLk','keys','costTimeMs','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','has','every','110ReZnYc','number','2385633oPprxU','analyze-status','99644MzfpLV'];a81_0x5c1f=function(){return _0xbb3bea;};return a81_0x5c1f();}function a81_0x36dd(_0xb127c9,_0x30528f){_0xb127c9=_0xb127c9-0x14f;const _0x5c1f62=a81_0x5c1f();let _0x36dd38=_0x5c1f62[_0xb127c9];return _0x36dd38;}function readAccumulatedErrorTypeCounts(_0x3fdf63){const _0x30da69=a81_0x9a474e,_0x3f159c=_0x3fdf63?.['accumulatedErrorTypeCounts'];if(!_0x3f159c||typeof _0x3f159c!==_0x30da69(0x17d)||Array[_0x30da69(0x168)](_0x3f159c))return null;if(Object[_0x30da69(0x156)](_0x3f159c)[_0x30da69(0x175)]===0x0)return null;return _0x3f159c;}function parseJobContext(_0x13c4a6){const _0x4fe81f=a81_0x9a474e;if(!_0x13c4a6?.[_0x4fe81f(0x177)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x557afc=JSON['parse'](_0x13c4a6);if(_0x557afc&&typeof _0x557afc==='object'&&!Array['isArray'](_0x557afc))return{'parsedJobContext':_0x557afc,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x4fe81f(0x167)};}function calculateAttemptElapsedMs(_0x582e7b,_0x141ee4){const _0xc45b7d=a81_0x9a474e;if(typeof _0x582e7b[_0xc45b7d(0x157)]==='number'&&Number[_0xc45b7d(0x17e)](_0x582e7b[_0xc45b7d(0x157)])&&_0x582e7b[_0xc45b7d(0x157)]>=0x0)return _0x582e7b[_0xc45b7d(0x157)];return calculateElapsedFromStart(_0x582e7b[_0xc45b7d(0x14f)],_0x582e7b[_0xc45b7d(0x173)],_0x141ee4);}function calculateElapsedFromStart(_0x1b32cc,_0x17c57b,_0x535ed4){const _0x574e30=a81_0x9a474e,_0x3cd315=toTimestamp(_0x1b32cc);if(_0x3cd315===null)return null;const _0x2abcb9=toTimestamp(_0x17c57b),_0x1d9398=_0x2abcb9??(_0x535ed4?null:Date[_0x574e30(0x17b)]());if(_0x1d9398===null||_0x1d9398<_0x3cd315)return null;return _0x1d9398-_0x3cd315;}function detectMultipleAttempts(_0x4d7bbf){const _0x5f0230=a81_0x9a474e,_0x7dd9f7=toTimestamp(_0x4d7bbf['firstStartTime']),_0x54462f=toTimestamp(_0x4d7bbf[_0x5f0230(0x14f)]);return _0x7dd9f7!==null&&_0x54462f!==null&&_0x7dd9f7!==_0x54462f;}function toTimestamp(_0x2db3db){const _0x91bc11=a81_0x9a474e;if(typeof _0x2db3db===_0x91bc11(0x15c))return Number['isFinite'](_0x2db3db)?_0x2db3db:null;if(typeof _0x2db3db!==_0x91bc11(0x164)||_0x2db3db['trim']()==='')return null;const _0x49677c=Number(_0x2db3db);if(Number[_0x91bc11(0x17e)](_0x49677c))return _0x49677c;const _0x20a1fe=Date[_0x91bc11(0x174)](_0x2db3db);return Number['isNaN'](_0x20a1fe)?null:_0x20a1fe;}
@@ -1 +1 @@
1
- function a82_0x2811(){const _0x1701e6=['/smartapi/dblink/create','63934vJdIGW','trim','autostart','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','12sZgkNB','Database\x20password','Host\x20and\x20port:\x20host:port','planId','No\x20follow-up\x20analysis',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','str','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','username','dbversion','7777310qrrAuf','databasePage','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','Database\x20username','174608HdGTzo','Created\x20db\x20link\x20','dburl','9UCICuF','383716qLMTEL','\x20and\x20started\x20analysis','dbparam','validation','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','Create\x20dblink','join','dbdesc','8.0','Extra\x20JDBC-style\x20connection\x20parameters\x20string','appCode','password','dbtype','Human-readable\x20description','573468oaLCzU','message','bool','2775160WfsrDf','2023890xHAIBF','write','6pBEoNX','dbname','string'];a82_0x2811=function(){return _0x1701e6;};return a82_0x2811();}function a82_0x8401(_0x5f1e3a,_0x5d9095){_0x5f1e3a=_0x5f1e3a-0xd2;const _0x28116a=a82_0x2811();let _0x84010e=_0x28116a[_0x5f1e3a];return _0x84010e;}const a82_0x290b7d=a82_0x8401;(function(_0x827b49,_0x28e80c){const _0x28f91b=a82_0x8401,_0x30fa52=_0x827b49();while(!![]){try{const _0x241a3b=parseInt(_0x28f91b(0xfa))/0x1*(-parseInt(_0x28f91b(0xf6))/0x2)+parseInt(_0x28f91b(0xf2))/0x3*(-parseInt(_0x28f91b(0xde))/0x4)+-parseInt(_0x28f91b(0xf0))/0x5+parseInt(_0x28f91b(0xec))/0x6+-parseInt(_0x28f91b(0xda))/0x7+parseInt(_0x28f91b(0xef))/0x8+-parseInt(_0x28f91b(0xdd))/0x9*(-parseInt(_0x28f91b(0xd6))/0xa);if(_0x241a3b===_0x28e80c)break;else _0x30fa52['push'](_0x30fa52['shift']());}catch(_0x6574c1){_0x30fa52['push'](_0x30fa52['shift']());}}}(a82_0x2811,0x347ec));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';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':a82_0x290b7d(0xf9),'risk':a82_0x290b7d(0xf1),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a82_0x290b7d(0xf3),'type':'string','required':!![],'description':a82_0x290b7d(0xd3)},DB_TYPE_FLAG,{'name':'dbversion','type':'string','description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':a82_0x290b7d(0xe6)},{'name':a82_0x290b7d(0xdc),'type':a82_0x290b7d(0xf4),'required':!![],'description':a82_0x290b7d(0xfc)},{'name':a82_0x290b7d(0xd4),'type':'string','required':!![],'description':a82_0x290b7d(0xd9)},{'name':a82_0x290b7d(0xe9),'type':a82_0x290b7d(0xf4),'required':!![],'description':a82_0x290b7d(0xfb)},{'name':'dbparam','type':a82_0x290b7d(0xf4),'description':a82_0x290b7d(0xe7)},{'name':a82_0x290b7d(0xe5),'type':a82_0x290b7d(0xf4),'description':a82_0x290b7d(0xeb)},{'name':'autostart','type':'boolean','description':'After\x20create,\x20start\x20schema\x20analysis','default':![]}],async 'validate'(_0x1a54cd){const _0x307520=a82_0x290b7d,_0x2e0c7f=_0x1a54cd['str'](_0x307520(0xdc))[_0x307520(0xf7)]();if(!validateDbUrl(_0x2e0c7f))throw CliErrors[_0x307520(0xe1)](_0x307520(0xe2)+_0x2e0c7f+'\x22',_0x307520(0xd8));},async 'dryRun'(_0x1a6548){const _0x1a1d67=a82_0x290b7d,_0x757dd2={'appCode':_0x1a6548[_0x1a1d67(0xe8)],'dbName':_0x1a6548[_0x1a1d67(0x100)](_0x1a1d67(0xf3)),'dbType':_0x1a6548['str'](_0x1a1d67(0xea)),'dbVersion':_0x1a6548[_0x1a1d67(0x100)](_0x1a1d67(0xd5))||'8.0','dbUrl':_0x1a6548[_0x1a1d67(0x100)](_0x1a1d67(0xdc))[_0x1a1d67(0xf7)](),'username':_0x1a6548['str'](_0x1a1d67(0xd4)),'password':'[redacted]',..._0x1a6548[_0x1a1d67(0x100)](_0x1a1d67(0xe0))?{'dbParam':_0x1a6548[_0x1a1d67(0x100)](_0x1a1d67(0xe0))}:{},..._0x1a6548[_0x1a1d67(0x100)](_0x1a1d67(0xe5))?{'dbDesc':_0x1a6548[_0x1a1d67(0x100)](_0x1a1d67(0xe5))}:{}};return{'method':'POST','url':_0x1a1d67(0xf5),'body':_0x757dd2,'description':[_0x1a1d67(0xe3),_0x1a6548[_0x1a1d67(0xee)](_0x1a1d67(0xf8))?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':_0x1a1d67(0xfe)][_0x1a1d67(0xe4)]('\x0a')};},async 'execute'(_0x461ae5){const _0x3a6ee1=a82_0x290b7d,_0x80cd69={'appCode':_0x461ae5[_0x3a6ee1(0xe8)],'dbName':_0x461ae5[_0x3a6ee1(0x100)]('dbname'),'dbType':_0x461ae5[_0x3a6ee1(0x100)]('dbtype'),'dbVersion':_0x461ae5['str'](_0x3a6ee1(0xd5))||_0x3a6ee1(0xe6),'dbUrl':_0x461ae5[_0x3a6ee1(0x100)]('dburl')[_0x3a6ee1(0xf7)](),'username':_0x461ae5[_0x3a6ee1(0x100)](_0x3a6ee1(0xd4)),'password':_0x461ae5[_0x3a6ee1(0x100)](_0x3a6ee1(0xe9)),..._0x461ae5[_0x3a6ee1(0x100)](_0x3a6ee1(0xe0))?{'dbParam':_0x461ae5['str']('dbparam')}:{},..._0x461ae5[_0x3a6ee1(0x100)]('dbdesc')?{'dbDesc':_0x461ae5[_0x3a6ee1(0x100)](_0x3a6ee1(0xe5))}:{}},{id:_0x412de7,entity:_0x35471}=normalizeEntityWithIdResponse(await createDbLink(_0x80cd69));if(!_0x412de7)return{'ok':![],'message':_0x3a6ee1(0xd2),'data':sanitizeDbLinkForOutput(_0x35471)};let _0x3b3996,_0x5f4bc1;if(_0x461ae5[_0x3a6ee1(0xee)]('autostart'))try{_0x3b3996=(await startDbAnalysis(_0x412de7))[_0x3a6ee1(0xfd)];}catch(_0x58a3f4){_0x5f4bc1=_0x58a3f4 instanceof Error?_0x58a3f4[_0x3a6ee1(0xed)]:String(_0x58a3f4);}const _0x2d7b41=buildDbPageLinks(_0x461ae5[_0x3a6ee1(0xe8)],_0x412de7),_0x3c5f25={'connection':sanitizeDbLinkForOutput(_0x35471),..._0x2d7b41?{'links':{'databasePage':_0x2d7b41[_0x3a6ee1(0xd7)]}}:{},..._0x3b3996?{'analysisPlanId':_0x3b3996}:{},..._0x5f4bc1?{'analysisStartWarning':_0x5f4bc1}:{}};let _0x2207a7;return _0x461ae5['bool']('autostart')?_0x5f4bc1?_0x2207a7=_0x3a6ee1(0xdb)+_0x412de7+_0x3a6ee1(0xff):_0x2207a7=_0x3a6ee1(0xdb)+_0x412de7+_0x3a6ee1(0xdf):_0x2207a7=_0x3a6ee1(0xdb)+_0x412de7,{'ok':!![],'data':_0x3c5f25,'message':_0x2207a7};}};
1
+ const a82_0x50062f=a82_0x63fb;function a82_0x48b6(){const _0x2b6182=['bool','8.0','Host\x20and\x20port:\x20host:port','739906qJhdMN','autostart','No\x20follow-up\x20analysis','password','15gkuwnb','Database\x20password','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','Database\x20username','write','20496iZpRaI','join','19020879irzAVb','POST','dbname','477UPqXUP','dbdesc','planId','[redacted]','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','/smartapi/dblink/create','str','dburl','Create\x20dblink','databasePage','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','3260916Dxstlj','235365jRxGoW','Human-readable\x20description','Created\x20db\x20link\x20','username','message','dbversion','trim','dbtype','create','Extra\x20JDBC-style\x20connection\x20parameters\x20string','5982284jHjFMl','validation','9825504baPOaO','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','string','appCode','dbparam'];a82_0x48b6=function(){return _0x2b6182;};return a82_0x48b6();}(function(_0x2e99aa,_0x136c11){const _0x359bb2=a82_0x63fb,_0x23fecf=_0x2e99aa();while(!![]){try{const _0x4bcf2d=-parseInt(_0x359bb2(0x154))/0x1+parseInt(_0x359bb2(0x168))/0x2+parseInt(_0x359bb2(0x176))/0x3*(-parseInt(_0x359bb2(0x171))/0x4)+-parseInt(_0x359bb2(0x16c))/0x5*(-parseInt(_0x359bb2(0x153))/0x6)+-parseInt(_0x359bb2(0x15e))/0x7+-parseInt(_0x359bb2(0x160))/0x8+parseInt(_0x359bb2(0x173))/0x9;if(_0x4bcf2d===_0x136c11)break;else _0x23fecf['push'](_0x23fecf['shift']());}catch(_0x39ccd1){_0x23fecf['push'](_0x23fecf['shift']());}}}(a82_0x48b6,0xef7e1));function a82_0x63fb(_0x334fa3,_0x2de066){_0x334fa3=_0x334fa3-0x14d;const _0x48b6a5=a82_0x48b6();let _0x63fb6a=_0x48b6a5[_0x334fa3];return _0x63fb6a;}import{createDbLink,startDbAnalysis}from'../../core/api-client.js';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':a82_0x50062f(0x15c),'description':a82_0x50062f(0x17b),'risk':a82_0x50062f(0x170),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a82_0x50062f(0x175),'type':'string','required':!![],'description':'Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server'},DB_TYPE_FLAG,{'name':'dbversion','type':a82_0x50062f(0x162),'description':'Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','default':a82_0x50062f(0x166)},{'name':'dburl','type':'string','required':!![],'description':a82_0x50062f(0x167)},{'name':a82_0x50062f(0x157),'type':a82_0x50062f(0x162),'required':!![],'description':a82_0x50062f(0x16f)},{'name':a82_0x50062f(0x16b),'type':a82_0x50062f(0x162),'required':!![],'description':a82_0x50062f(0x16d)},{'name':a82_0x50062f(0x164),'type':a82_0x50062f(0x162),'description':a82_0x50062f(0x15d)},{'name':a82_0x50062f(0x177),'type':a82_0x50062f(0x162),'description':a82_0x50062f(0x155)},{'name':a82_0x50062f(0x169),'type':'boolean','description':'After\x20create,\x20start\x20schema\x20analysis','default':![]}],async 'validate'(_0x394c03){const _0x3430bb=a82_0x50062f,_0x37be01=_0x394c03['str'](_0x3430bb(0x14f))[_0x3430bb(0x15a)]();if(!validateDbUrl(_0x37be01))throw CliErrors[_0x3430bb(0x15f)](_0x3430bb(0x161)+_0x37be01+'\x22',_0x3430bb(0x17a));},async 'dryRun'(_0xf155c1){const _0x39ce31=a82_0x50062f,_0x5797ef={'appCode':_0xf155c1[_0x39ce31(0x163)],'dbName':_0xf155c1[_0x39ce31(0x14e)](_0x39ce31(0x175)),'dbType':_0xf155c1[_0x39ce31(0x14e)](_0x39ce31(0x15b)),'dbVersion':_0xf155c1[_0x39ce31(0x14e)](_0x39ce31(0x159))||_0x39ce31(0x166),'dbUrl':_0xf155c1[_0x39ce31(0x14e)](_0x39ce31(0x14f))[_0x39ce31(0x15a)](),'username':_0xf155c1['str'](_0x39ce31(0x157)),'password':_0x39ce31(0x179),..._0xf155c1[_0x39ce31(0x14e)]('dbparam')?{'dbParam':_0xf155c1[_0x39ce31(0x14e)](_0x39ce31(0x164))}:{},..._0xf155c1[_0x39ce31(0x14e)]('dbdesc')?{'dbDesc':_0xf155c1[_0x39ce31(0x14e)](_0x39ce31(0x177))}:{}};return{'method':_0x39ce31(0x174),'url':_0x39ce31(0x14d),'body':_0x5797ef,'description':[_0x39ce31(0x150),_0xf155c1['bool'](_0x39ce31(0x169))?_0x39ce31(0x152):_0x39ce31(0x16a)][_0x39ce31(0x172)]('\x0a')};},async 'execute'(_0x2775d5){const _0x1b556f=a82_0x50062f,_0x2bb307={'appCode':_0x2775d5['appCode'],'dbName':_0x2775d5[_0x1b556f(0x14e)](_0x1b556f(0x175)),'dbType':_0x2775d5['str'](_0x1b556f(0x15b)),'dbVersion':_0x2775d5[_0x1b556f(0x14e)](_0x1b556f(0x159))||_0x1b556f(0x166),'dbUrl':_0x2775d5[_0x1b556f(0x14e)](_0x1b556f(0x14f))['trim'](),'username':_0x2775d5[_0x1b556f(0x14e)](_0x1b556f(0x157)),'password':_0x2775d5[_0x1b556f(0x14e)](_0x1b556f(0x16b)),..._0x2775d5['str'](_0x1b556f(0x164))?{'dbParam':_0x2775d5[_0x1b556f(0x14e)](_0x1b556f(0x164))}:{},..._0x2775d5['str'](_0x1b556f(0x177))?{'dbDesc':_0x2775d5[_0x1b556f(0x14e)](_0x1b556f(0x177))}:{}},{id:_0x151505,entity:_0x225b21}=normalizeEntityWithIdResponse(await createDbLink(_0x2bb307));if(!_0x151505)return{'ok':![],'message':_0x1b556f(0x16e),'data':sanitizeDbLinkForOutput(_0x225b21)};let _0xf007a4,_0x6eeb26;if(_0x2775d5[_0x1b556f(0x165)](_0x1b556f(0x169)))try{_0xf007a4=(await startDbAnalysis(_0x151505))[_0x1b556f(0x178)];}catch(_0x449936){_0x6eeb26=_0x449936 instanceof Error?_0x449936[_0x1b556f(0x158)]:String(_0x449936);}const _0x5a01f1=buildDbPageLinks(_0x2775d5[_0x1b556f(0x163)],_0x151505),_0x57ac20={'connection':sanitizeDbLinkForOutput(_0x225b21),..._0x5a01f1?{'links':{'databasePage':_0x5a01f1[_0x1b556f(0x151)]}}:{},..._0xf007a4?{'analysisPlanId':_0xf007a4}:{},..._0x6eeb26?{'analysisStartWarning':_0x6eeb26}:{}};let _0x23f501;return _0x2775d5[_0x1b556f(0x165)]('autostart')?_0x6eeb26?_0x23f501='Created\x20db\x20link\x20'+_0x151505+';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning':_0x23f501=_0x1b556f(0x156)+_0x151505+'\x20and\x20started\x20analysis':_0x23f501=_0x1b556f(0x156)+_0x151505,{'ok':!![],'data':_0x57ac20,'message':_0x23f501};}};
@@ -1 +1 @@
1
- function a83_0x3157(_0x29d4d0,_0x497528){_0x29d4d0=_0x29d4d0-0x18c;const _0x1bcb01=a83_0x1bcb();let _0x3157e7=_0x1bcb01[_0x29d4d0];return _0x3157e7;}const a83_0x15c0be=a83_0x3157;(function(_0x56c7ed,_0x13be23){const _0x13e672=a83_0x3157,_0x10ac03=_0x56c7ed();while(!![]){try{const _0x4d9596=parseInt(_0x13e672(0x194))/0x1+-parseInt(_0x13e672(0x18f))/0x2+parseInt(_0x13e672(0x192))/0x3+-parseInt(_0x13e672(0x196))/0x4+-parseInt(_0x13e672(0x193))/0x5+parseInt(_0x13e672(0x191))/0x6*(parseInt(_0x13e672(0x18d))/0x7)+-parseInt(_0x13e672(0x190))/0x8;if(_0x4d9596===_0x13be23)break;else _0x10ac03['push'](_0x10ac03['shift']());}catch(_0x4b869f){_0x10ac03['push'](_0x10ac03['shift']());}}}(a83_0x1bcb,0x21ebd));import{deleteDbLink}from'../../core/api-client.js';function a83_0x1bcb(){const _0xc7ef59=['num','499328RhvXhQ','delete','7uzlcpg','Deleted\x20db\x20link\x20','69236rQmtVt','724712sfimAI','1374084tlYTZl','93945exYBsX','96735HEwbrP','147998ysIMua'];a83_0x1bcb=function(){return _0xc7ef59;};return a83_0x1bcb();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':a83_0x15c0be(0x18c),'description':'Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','risk':'high-risk-write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x339a2d){const _0x8706b7=a83_0x15c0be,_0x5ec71c=_0x339a2d[_0x8706b7(0x195)]('id');return await deleteDbLink(_0x5ec71c),{'ok':!![],'data':{'id':_0x5ec71c,'deleted':!![]},'message':_0x8706b7(0x18e)+_0x5ec71c};}};
1
+ function a83_0x4898(_0x58f53d,_0xbda178){_0x58f53d=_0x58f53d-0xc8;const _0x37158b=a83_0x3715();let _0x4898a3=_0x37158b[_0x58f53d];return _0x4898a3;}const a83_0x56566e=a83_0x4898;(function(_0x139892,_0x4d5832){const _0x5b95bb=a83_0x4898,_0x138474=_0x139892();while(!![]){try{const _0x13487e=parseInt(_0x5b95bb(0xcb))/0x1*(parseInt(_0x5b95bb(0xcc))/0x2)+parseInt(_0x5b95bb(0xd3))/0x3+parseInt(_0x5b95bb(0xcf))/0x4+parseInt(_0x5b95bb(0xd2))/0x5+parseInt(_0x5b95bb(0xce))/0x6+-parseInt(_0x5b95bb(0xc9))/0x7*(-parseInt(_0x5b95bb(0xd0))/0x8)+parseInt(_0x5b95bb(0xd1))/0x9*(-parseInt(_0x5b95bb(0xca))/0xa);if(_0x13487e===_0x4d5832)break;else _0x138474['push'](_0x138474['shift']());}catch(_0x1384c0){_0x138474['push'](_0x138474['shift']());}}}(a83_0x3715,0x7abac));function a83_0x3715(){const _0x577ccf=['2174840GPrdhI','4888TjgoAj','33525621YRDzwD','4519780YJpiLx','1758237UecpmG','delete','10339LrrZlH','10rCiFha','681247kvCsOR','2sBEVnh','high-risk-write','3661980zxZRXb'];a83_0x3715=function(){return _0x577ccf;};return a83_0x3715();}import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':a83_0x56566e(0xc8),'description':'Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','risk':a83_0x56566e(0xcd),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x491e96){const _0x1672ee=_0x491e96['num']('id');return await deleteDbLink(_0x1672ee),{'ok':!![],'data':{'id':_0x1672ee,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x1672ee};}};
@@ -1 +1 @@
1
- const a84_0x384868=a84_0x1ff2;(function(_0x40cffb,_0x271fab){const _0x45dfda=a84_0x1ff2,_0x5a304e=_0x40cffb();while(!![]){try{const _0x426c1e=parseInt(_0x45dfda(0x179))/0x1+-parseInt(_0x45dfda(0x184))/0x2*(parseInt(_0x45dfda(0x183))/0x3)+-parseInt(_0x45dfda(0x17d))/0x4*(-parseInt(_0x45dfda(0x181))/0x5)+parseInt(_0x45dfda(0x17f))/0x6*(-parseInt(_0x45dfda(0x17a))/0x7)+parseInt(_0x45dfda(0x17e))/0x8*(-parseInt(_0x45dfda(0x17c))/0x9)+parseInt(_0x45dfda(0x188))/0xa*(parseInt(_0x45dfda(0x189))/0xb)+parseInt(_0x45dfda(0x186))/0xc*(parseInt(_0x45dfda(0x180))/0xd);if(_0x426c1e===_0x271fab)break;else _0x5a304e['push'](_0x5a304e['shift']());}catch(_0x2b0a5f){_0x5a304e['push'](_0x5a304e['shift']());}}}(a84_0x199f,0xc49c7));function a84_0x1ff2(_0x22c101,_0x6c555a){_0x22c101=_0x22c101-0x179;const _0x199fa5=a84_0x199f();let _0x1ff251=_0x199fa5[_0x22c101];return _0x1ff251;}import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a84_0x199f(){const _0xba0d0b=['1446516IMZmef','9176258urUWeB','read','18XqZLfA','12cRfjrI','2843240EpjVxG','6pyzdOj','13djBTPA','1016105vkxJsN','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','2019RQGbrS','1546tHwRIa','detail','751668SGuiZl','num','30mOhYCl','4504258ilhSgo'];a84_0x199f=function(){return _0xba0d0b;};return a84_0x199f();}export const dbDetail={'service':'db','command':a84_0x384868(0x185),'description':a84_0x384868(0x182),'risk':a84_0x384868(0x17b),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x529ad){const _0x5e8afb=a84_0x384868,_0x21cd6d=_0x529ad[_0x5e8afb(0x187)]('id'),_0x42a4cf=await getDbLinkInfo(_0x21cd6d);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x42a4cf),'message':'db\x20link\x20'+_0x21cd6d+':\x20'+_0x42a4cf['dbName']};}};
1
+ function a84_0x10ad(_0x46c646,_0x4f86c6){_0x46c646=_0x46c646-0x1a4;const _0x49f285=a84_0x49f2();let _0x10ad18=_0x49f285[_0x46c646];return _0x10ad18;}const a84_0x4743b6=a84_0x10ad;(function(_0x43a526,_0x91d4af){const _0x29cf91=a84_0x10ad,_0x42b1a4=_0x43a526();while(!![]){try{const _0x2b1459=-parseInt(_0x29cf91(0x1b3))/0x1*(-parseInt(_0x29cf91(0x1a6))/0x2)+parseInt(_0x29cf91(0x1b0))/0x3*(parseInt(_0x29cf91(0x1a4))/0x4)+-parseInt(_0x29cf91(0x1ae))/0x5*(parseInt(_0x29cf91(0x1b2))/0x6)+-parseInt(_0x29cf91(0x1a9))/0x7*(-parseInt(_0x29cf91(0x1a5))/0x8)+-parseInt(_0x29cf91(0x1a7))/0x9*(parseInt(_0x29cf91(0x1aa))/0xa)+parseInt(_0x29cf91(0x1ad))/0xb*(parseInt(_0x29cf91(0x1b1))/0xc)+parseInt(_0x29cf91(0x1a8))/0xd;if(_0x2b1459===_0x91d4af)break;else _0x42b1a4['push'](_0x42b1a4['shift']());}catch(_0x40793b){_0x42b1a4['push'](_0x42b1a4['shift']());}}}(a84_0x49f2,0xafa20));import{getDbLinkInfo}from'../../core/api-client.js';function a84_0x49f2(){const _0x4026fc=['52eauDYk','3359392FyIgZA','18566TNLUAu','3524706UBPdxl','12075908TnsMrC','14MeCBAH','20ArkZhb','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','detail','275VvLlTu','4689865MajiyY','read','63519lvbmRA','123540FLzXQy','6TBnHst','15AAZtUY'];a84_0x49f2=function(){return _0x4026fc;};return a84_0x49f2();}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':a84_0x4743b6(0x1ac),'description':a84_0x4743b6(0x1ab),'risk':a84_0x4743b6(0x1af),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x70a7b6){const _0x4a6429=_0x70a7b6['num']('id'),_0x4a6f98=await getDbLinkInfo(_0x4a6429);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x4a6f98),'message':'db\x20link\x20'+_0x4a6429+':\x20'+_0x4a6f98['dbName']};}};
@@ -1 +1 @@
1
- const a85_0x45115f=a85_0x49c9;(function(_0x4f04fa,_0x58f5bf){const _0x4066a4=a85_0x49c9,_0x4958ef=_0x4f04fa();while(!![]){try{const _0x2b8684=parseInt(_0x4066a4(0x21e))/0x1*(parseInt(_0x4066a4(0x214))/0x2)+parseInt(_0x4066a4(0x1fe))/0x3+parseInt(_0x4066a4(0x20a))/0x4+parseInt(_0x4066a4(0x203))/0x5*(parseInt(_0x4066a4(0x201))/0x6)+parseInt(_0x4066a4(0x205))/0x7*(parseInt(_0x4066a4(0x220))/0x8)+parseInt(_0x4066a4(0x219))/0x9+-parseInt(_0x4066a4(0x216))/0xa;if(_0x2b8684===_0x58f5bf)break;else _0x4958ef['push'](_0x4958ef['shift']());}catch(_0x49f814){_0x4958ef['push'](_0x4958ef['shift']());}}}(a85_0x5ddc,0xb3462));function a85_0x5ddc(){const _0x3251ab=['4010964EVGUjr','set','pagesize','validation','addedColumns','Page\x20index\x20(1-based)','totalCount','tableList','changed-only','\x20of\x20','2tudZYg','diffType','37080120PYeVYW','Page\x20size','ALREADY_ANALYZED','1165068EhLgLe','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','fieldDiff','all','boolean','1021203InkOFH','fromEntries','1136DgUIuP','str','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','DELETED_TABLE','tableName','bool','datasetTableCount','diff','filter','MODIFIED_TABLE','read','map','NEW_TABLE','summary','\x20row(s),\x20total\x20','number','2764074IeVyCw','num','length','1770brLJUM','\x20(db\x20link\x20','3210bofhuj','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','58079VZHWQC','size','physicalTableCount','page','appCode'];a85_0x5ddc=function(){return _0x3251ab;};return a85_0x5ddc();}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=['NEW_TABLE',a85_0x45115f(0x1f7),a85_0x45115f(0x223),a85_0x45115f(0x218)];function a85_0x49c9(_0x42038f,_0x5215c6){_0x42038f=_0x42038f-0x1f2;const _0x5ddcae=a85_0x5ddc();let _0x49c951=_0x5ddcae[_0x42038f];return _0x49c951;}export const dbDiff={'service':'db','command':a85_0x45115f(0x1f5),'description':a85_0x45115f(0x222),'risk':a85_0x45115f(0x1f8),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':'string','description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a85_0x45115f(0x208),'type':a85_0x45115f(0x1fd),'description':a85_0x45115f(0x20f),'default':0x1},{'name':'pagesize','type':a85_0x45115f(0x1fd),'description':a85_0x45115f(0x217),'default':0x14},{'name':'all','type':a85_0x45115f(0x21d),'description':'Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)'},{'name':a85_0x45115f(0x212),'type':a85_0x45115f(0x21d),'description':a85_0x45115f(0x204)}],async 'execute'(_0x1936be){const _0x43e7be=a85_0x45115f,_0x3dbd46=_0x1936be[_0x43e7be(0x1ff)]('id'),_0x3ca5d6=_0x1936be[_0x43e7be(0x1f3)](_0x43e7be(0x21c)),_0x1b6ad6=_0x1936be[_0x43e7be(0x1f3)]('changed-only'),_0xb006ac=_0x3ca5d6?0x1:_0x1936be[_0x43e7be(0x1ff)](_0x43e7be(0x208),0x1)||0x1,_0x1e9fee=_0x3ca5d6?ALL_PAGE_SIZE:_0x1936be[_0x43e7be(0x1ff)](_0x43e7be(0x20c),0x14)||0x14,_0x30c9a3=_0x1936be[_0x43e7be(0x221)]('table')||undefined,_0x5279ea=_0x3ca5d6?await getAllDbTableDiff(_0x1936be[_0x43e7be(0x209)],_0x3dbd46,_0x30c9a3):await getDbTableDiff(_0x1936be[_0x43e7be(0x209)],_0x3dbd46,{'pageIndex':_0xb006ac,'pageSize':_0x1e9fee,'tableName':_0x30c9a3}),_0x11b606=_0x5279ea[_0x43e7be(0x211)],_0x385bcf=_0x1b6ad6?_0x11b606[_0x43e7be(0x1f6)](_0x1072ed=>_0x1072ed[_0x43e7be(0x215)]!==_0x43e7be(0x218)):_0x11b606,_0x16bab9=Object[_0x43e7be(0x21f)](DIFF_TYPES[_0x43e7be(0x1f9)](_0x2ad485=>[_0x2ad485,_0x11b606[_0x43e7be(0x1f6)](_0x2c89e3=>_0x2c89e3[_0x43e7be(0x215)]===_0x2ad485)[_0x43e7be(0x200)]])),_0x574d44=_0x11b606[_0x43e7be(0x1f6)](_0x56de6f=>_0x56de6f[_0x43e7be(0x215)]===_0x43e7be(0x1fa)||_0x56de6f[_0x43e7be(0x215)]===_0x43e7be(0x1f7))['map'](_0x6ef4a9=>_0x6ef4a9['tableName']),_0x2e473e=_0x11b606[_0x43e7be(0x1f6)](_0x487f58=>_0x487f58[_0x43e7be(0x215)]===_0x43e7be(0x223))[_0x43e7be(0x1f9)](_0x3d9614=>_0x3d9614[_0x43e7be(0x1f2)]),_0x479ff9=_0x11b606[_0x43e7be(0x1f6)](_0x406024=>_0x406024[_0x43e7be(0x215)]===_0x43e7be(0x1f7))[_0x43e7be(0x1f9)](_0x1b260c=>({'tableName':_0x1b260c[_0x43e7be(0x1f2)],'addedColumns':_0x1b260c['fieldDiff']?.[_0x43e7be(0x20e)]??[],'deletedColumns':_0x1b260c['fieldDiff']?.['deletedColumns']??[],'modifiedColumns':_0x1b260c[_0x43e7be(0x21b)]?.['modifiedColumns']??[]}));return{'ok':!![],'data':{'dbLinkId':_0x3dbd46,'page':_0xb006ac,'pageSize':_0x1e9fee,'totalCount':_0x5279ea[_0x43e7be(0x210)],'physicalTableCount':_0x5279ea[_0x43e7be(0x207)],'datasetTableCount':_0x5279ea[_0x43e7be(0x1f4)],..._0x5279ea['summary']?{'summary':_0x5279ea[_0x43e7be(0x1fb)]}:{},'summaryByType':_0x16bab9,'toAnalyzeTables':_0x574d44,'deletedTables':_0x2e473e,'modifiedFieldDiffs':_0x479ff9,'tables':_0x385bcf,'tableList':_0x385bcf},'message':_0x385bcf[_0x43e7be(0x200)]+_0x43e7be(0x1fc)+_0x5279ea[_0x43e7be(0x210)]+_0x43e7be(0x202)+_0x3dbd46+')'};}};async function getAllDbTableDiff(_0xf4a9b7,_0x541849,_0x1ca2ae){const _0x4a7493=a85_0x45115f,_0xfe39a9=new Map();let _0x5b0aed=0x1,_0x743cce=null;while(!![]){_0x743cce=await getDbTableDiff(_0xf4a9b7,_0x541849,{'pageIndex':_0x5b0aed,'pageSize':ALL_PAGE_SIZE,'tableName':_0x1ca2ae});const _0x2d4e53=_0xfe39a9[_0x4a7493(0x206)];for(const _0x137e42 of _0x743cce['tableList']){_0xfe39a9[_0x4a7493(0x20b)](_0x137e42[_0x4a7493(0x1f2)],_0x137e42);}if(_0xfe39a9[_0x4a7493(0x206)]>=_0x743cce[_0x4a7493(0x210)])break;if(_0x743cce[_0x4a7493(0x211)][_0x4a7493(0x200)]===0x0||_0xfe39a9['size']===_0x2d4e53)throw CliErrors[_0x4a7493(0x20d)](_0x4a7493(0x21a)+_0xfe39a9[_0x4a7493(0x206)]+_0x4a7493(0x213)+_0x743cce[_0x4a7493(0x210)]+'\x20row(s).');_0x5b0aed+=0x1;}return{'totalCount':_0x743cce?.[_0x4a7493(0x210)]??0x0,'physicalTableCount':_0x743cce?.[_0x4a7493(0x207)]??0x0,'datasetTableCount':_0x743cce?.['datasetTableCount']??0x0,..._0x743cce?.[_0x4a7493(0x1fb)]?{'summary':_0x743cce[_0x4a7493(0x1fb)]}:{},'tableList':[..._0xfe39a9['values']()]};}
1
+ function a85_0x1acc(){const _0x34f166=['Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','boolean','filter','diff','\x20of\x20','50595bLDyDD','totalCount','validation','Page\x20size','DELETED_TABLE','all','map','3441384UYmRoU','size','set','770422zJSvvK','page','table','pagesize','\x20row(s),\x20total\x20','128WzowHq','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','\x20(db\x20link\x20','str','length','fromEntries','values','summary','4930888NUtJJA','\x20row(s).','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','number','3854995xbxjJb','diffType','datasetTableCount','physicalTableCount','1fLowTi','read','1408326uNzRGc','string','MODIFIED_TABLE','24394220CfRvwE','bool','NEW_TABLE','num','changed-only','tableList','7NvgKod','fieldDiff','ALREADY_ANALYZED','tableName','appCode'];a85_0x1acc=function(){return _0x34f166;};return a85_0x1acc();}const a85_0x23cd52=a85_0x3000;(function(_0x48e197,_0x20d162){const _0x4c6e22=a85_0x3000,_0x4810a0=_0x48e197();while(!![]){try{const _0x3d5288=-parseInt(_0x4c6e22(0x131))/0x1*(-parseInt(_0x4c6e22(0x150))/0x2)+-parseInt(_0x4c6e22(0x146))/0x3*(-parseInt(_0x4c6e22(0x121))/0x4)+parseInt(_0x4c6e22(0x12d))/0x5+parseInt(_0x4c6e22(0x133))/0x6*(parseInt(_0x4c6e22(0x13c))/0x7)+parseInt(_0x4c6e22(0x129))/0x8+parseInt(_0x4c6e22(0x14d))/0x9+-parseInt(_0x4c6e22(0x136))/0xa;if(_0x3d5288===_0x20d162)break;else _0x4810a0['push'](_0x4810a0['shift']());}catch(_0x495181){_0x4810a0['push'](_0x4810a0['shift']());}}}(a85_0x1acc,0x779c6));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=[a85_0x23cd52(0x138),a85_0x23cd52(0x135),a85_0x23cd52(0x14a),'ALREADY_ANALYZED'];export const dbDiff={'service':'db','command':a85_0x23cd52(0x144),'description':a85_0x23cd52(0x12b),'risk':a85_0x23cd52(0x132),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':a85_0x23cd52(0x134),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a85_0x23cd52(0x11d),'type':a85_0x23cd52(0x12c),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a85_0x23cd52(0x11f),'type':a85_0x23cd52(0x12c),'description':a85_0x23cd52(0x149),'default':0x14},{'name':'all','type':a85_0x23cd52(0x142),'description':a85_0x23cd52(0x122)},{'name':a85_0x23cd52(0x13a),'type':a85_0x23cd52(0x142),'description':a85_0x23cd52(0x141)}],async 'execute'(_0x298ed1){const _0x4e3b4b=a85_0x23cd52,_0x3e8d6b=_0x298ed1['num']('id'),_0x4ea8bc=_0x298ed1['bool'](_0x4e3b4b(0x14b)),_0x45a9ce=_0x298ed1[_0x4e3b4b(0x137)](_0x4e3b4b(0x13a)),_0x200af7=_0x4ea8bc?0x1:_0x298ed1[_0x4e3b4b(0x139)](_0x4e3b4b(0x11d),0x1)||0x1,_0x26601f=_0x4ea8bc?ALL_PAGE_SIZE:_0x298ed1[_0x4e3b4b(0x139)](_0x4e3b4b(0x11f),0x14)||0x14,_0x22a076=_0x298ed1[_0x4e3b4b(0x124)](_0x4e3b4b(0x11e))||undefined,_0x41a9d2=_0x4ea8bc?await getAllDbTableDiff(_0x298ed1['appCode'],_0x3e8d6b,_0x22a076):await getDbTableDiff(_0x298ed1[_0x4e3b4b(0x140)],_0x3e8d6b,{'pageIndex':_0x200af7,'pageSize':_0x26601f,'tableName':_0x22a076}),_0x4d52a6=_0x41a9d2[_0x4e3b4b(0x13b)],_0x1cbdb3=_0x45a9ce?_0x4d52a6[_0x4e3b4b(0x143)](_0x22cd77=>_0x22cd77['diffType']!==_0x4e3b4b(0x13e)):_0x4d52a6,_0x157049=Object[_0x4e3b4b(0x126)](DIFF_TYPES[_0x4e3b4b(0x14c)](_0x22f588=>[_0x22f588,_0x4d52a6[_0x4e3b4b(0x143)](_0x43827d=>_0x43827d[_0x4e3b4b(0x12e)]===_0x22f588)[_0x4e3b4b(0x125)]])),_0x215f48=_0x4d52a6['filter'](_0x1363d6=>_0x1363d6['diffType']==='NEW_TABLE'||_0x1363d6[_0x4e3b4b(0x12e)]===_0x4e3b4b(0x135))[_0x4e3b4b(0x14c)](_0x2225e3=>_0x2225e3[_0x4e3b4b(0x13f)]),_0x1db386=_0x4d52a6[_0x4e3b4b(0x143)](_0x5774c3=>_0x5774c3[_0x4e3b4b(0x12e)]==='DELETED_TABLE')[_0x4e3b4b(0x14c)](_0x5b685d=>_0x5b685d[_0x4e3b4b(0x13f)]),_0x3b9bd3=_0x4d52a6[_0x4e3b4b(0x143)](_0x4b7cba=>_0x4b7cba[_0x4e3b4b(0x12e)]===_0x4e3b4b(0x135))['map'](_0x2161fd=>({'tableName':_0x2161fd[_0x4e3b4b(0x13f)],'addedColumns':_0x2161fd[_0x4e3b4b(0x13d)]?.['addedColumns']??[],'deletedColumns':_0x2161fd[_0x4e3b4b(0x13d)]?.['deletedColumns']??[],'modifiedColumns':_0x2161fd['fieldDiff']?.['modifiedColumns']??[]}));return{'ok':!![],'data':{'dbLinkId':_0x3e8d6b,'page':_0x200af7,'pageSize':_0x26601f,'totalCount':_0x41a9d2[_0x4e3b4b(0x147)],'physicalTableCount':_0x41a9d2[_0x4e3b4b(0x130)],'datasetTableCount':_0x41a9d2[_0x4e3b4b(0x12f)],..._0x41a9d2[_0x4e3b4b(0x128)]?{'summary':_0x41a9d2['summary']}:{},'summaryByType':_0x157049,'toAnalyzeTables':_0x215f48,'deletedTables':_0x1db386,'modifiedFieldDiffs':_0x3b9bd3,'tables':_0x1cbdb3,'tableList':_0x1cbdb3},'message':_0x1cbdb3[_0x4e3b4b(0x125)]+_0x4e3b4b(0x120)+_0x41a9d2['totalCount']+_0x4e3b4b(0x123)+_0x3e8d6b+')'};}};function a85_0x3000(_0x5f99d2,_0x5a8ca6){_0x5f99d2=_0x5f99d2-0x11d;const _0x1acc6f=a85_0x1acc();let _0x3000fc=_0x1acc6f[_0x5f99d2];return _0x3000fc;}async function getAllDbTableDiff(_0x4165f0,_0x1c223c,_0x3195bb){const _0x4d2682=a85_0x23cd52,_0x34e06a=new Map();let _0x3370cc=0x1,_0x1592de=null;while(!![]){_0x1592de=await getDbTableDiff(_0x4165f0,_0x1c223c,{'pageIndex':_0x3370cc,'pageSize':ALL_PAGE_SIZE,'tableName':_0x3195bb});const _0xa11111=_0x34e06a['size'];for(const _0x5589de of _0x1592de[_0x4d2682(0x13b)]){_0x34e06a[_0x4d2682(0x14f)](_0x5589de[_0x4d2682(0x13f)],_0x5589de);}if(_0x34e06a['size']>=_0x1592de[_0x4d2682(0x147)])break;if(_0x1592de[_0x4d2682(0x13b)]['length']===0x0||_0x34e06a[_0x4d2682(0x14e)]===_0xa11111)throw CliErrors[_0x4d2682(0x148)]('Incomplete\x20db\x20diff\x20pagination:\x20collected\x20'+_0x34e06a[_0x4d2682(0x14e)]+_0x4d2682(0x145)+_0x1592de[_0x4d2682(0x147)]+_0x4d2682(0x12a));_0x3370cc+=0x1;}return{'totalCount':_0x1592de?.['totalCount']??0x0,'physicalTableCount':_0x1592de?.[_0x4d2682(0x130)]??0x0,'datasetTableCount':_0x1592de?.[_0x4d2682(0x12f)]??0x0,..._0x1592de?.[_0x4d2682(0x128)]?{'summary':_0x1592de[_0x4d2682(0x128)]}:{},'tableList':[..._0x34e06a[_0x4d2682(0x127)]()]};}
@@ -1 +1 @@
1
- (function(_0x889d52,_0x532df8){const _0xabf729=a86_0x4b86,_0x5ada45=_0x889d52();while(!![]){try{const _0x797b04=-parseInt(_0xabf729(0x19f))/0x1*(-parseInt(_0xabf729(0x19b))/0x2)+-parseInt(_0xabf729(0x1a2))/0x3*(parseInt(_0xabf729(0x1a3))/0x4)+-parseInt(_0xabf729(0x1a0))/0x5+parseInt(_0xabf729(0x1a4))/0x6+parseInt(_0xabf729(0x1a1))/0x7*(parseInt(_0xabf729(0x1a5))/0x8)+-parseInt(_0xabf729(0x19c))/0x9+-parseInt(_0xabf729(0x19d))/0xa*(-parseInt(_0xabf729(0x19e))/0xb);if(_0x797b04===_0x532df8)break;else _0x5ada45['push'](_0x5ada45['shift']());}catch(_0x3d9d1f){_0x5ada45['push'](_0x5ada45['shift']());}}}(a86_0x4595,0xaaef3));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';function a86_0x4595(){const _0x17b710=['5292396IIOxit','10TetCsA','3605162DPFpRG','5TWMUfA','5479910eOTMuE','9769795XdnJLT','1279107CmwhUr','12RNaUDH','5803608CRayTf','8BdUyaW','389034COKXRZ'];a86_0x4595=function(){return _0x17b710;};return a86_0x4595();}import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';function a86_0x4b86(_0x1290db,_0x33874b){_0x1290db=_0x1290db-0x19b;const _0x459575=a86_0x4595();let _0x4b8635=_0x459575[_0x1290db];return _0x4b8635;}import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
1
+ (function(_0x5e9566,_0x567537){const _0x3fde3a=a86_0x1507,_0x31eeb8=_0x5e9566();while(!![]){try{const _0x532c23=parseInt(_0x3fde3a(0xa1))/0x1*(-parseInt(_0x3fde3a(0x9d))/0x2)+parseInt(_0x3fde3a(0x9f))/0x3+-parseInt(_0x3fde3a(0xa2))/0x4*(parseInt(_0x3fde3a(0xa3))/0x5)+-parseInt(_0x3fde3a(0xa4))/0x6*(parseInt(_0x3fde3a(0xa7))/0x7)+-parseInt(_0x3fde3a(0xa6))/0x8+parseInt(_0x3fde3a(0xa5))/0x9*(-parseInt(_0x3fde3a(0xa0))/0xa)+parseInt(_0x3fde3a(0x9e))/0xb;if(_0x532c23===_0x567537)break;else _0x31eeb8['push'](_0x31eeb8['shift']());}catch(_0x4ca70f){_0x31eeb8['push'](_0x31eeb8['shift']());}}}(a86_0x1a9f,0xb438f));import{dbList}from'../../commands/db/list.js';function a86_0x1a9f(){const _0x4641de=['477Ylohtp','1888984RrQTuM','7SEVucF','221734VlfEou','31321719fxupnd','2250960nLrBcK','43150pDqTDg','11FKBDGP','552544fmtpih','35ZxOdAG','1249506WiQbcy'];a86_0x1a9f=function(){return _0x4641de;};return a86_0x1a9f();}import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';function a86_0x1507(_0x2cc231,_0x200e81){_0x2cc231=_0x2cc231-0x9d;const _0x1a9f60=a86_0x1a9f();let _0x150784=_0x1a9f60[_0x2cc231];return _0x150784;}import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
@@ -1 +1 @@
1
- const a87_0xc6f0e1=a87_0x51a1;function a87_0x71c5(){const _0x3e487b=['list','read','pagesize','267336VAlXow','num','682200fHlnUX','page','3415064WHdmRv','\x20database\x20connection(s)','number','252PWZRRD','40465TXalak','10289152dVYZyr','1530796XHUipE','Found\x20','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','8712410fVDwcF','length'];a87_0x71c5=function(){return _0x3e487b;};return a87_0x71c5();}(function(_0x491073,_0x12b6b8){const _0x3d5e84=a87_0x51a1,_0x2234c1=_0x491073();while(!![]){try{const _0x1f8ef4=-parseInt(_0x3d5e84(0x1eb))/0x1+parseInt(_0x3d5e84(0x1ef))/0x2+parseInt(_0x3d5e84(0x1ed))/0x3+-parseInt(_0x3d5e84(0x1e3))/0x4+parseInt(_0x3d5e84(0x1e1))/0x5*(-parseInt(_0x3d5e84(0x1e0))/0x6)+-parseInt(_0x3d5e84(0x1e6))/0x7+parseInt(_0x3d5e84(0x1e2))/0x8;if(_0x1f8ef4===_0x12b6b8)break;else _0x2234c1['push'](_0x2234c1['shift']());}catch(_0x3b5a4d){_0x2234c1['push'](_0x2234c1['shift']());}}}(a87_0x71c5,0xf0d89));function a87_0x51a1(_0xb26044,_0x448a4c){_0xb26044=_0xb26044-0x1e0;const _0x71c547=a87_0x71c5();let _0x51a158=_0x71c547[_0xb26044];return _0x51a158;}import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a87_0xc6f0e1(0x1e8),'description':a87_0xc6f0e1(0x1e5),'risk':a87_0xc6f0e1(0x1e9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a87_0xc6f0e1(0x1ee),'type':a87_0xc6f0e1(0x1f1),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a87_0xc6f0e1(0x1ea),'type':'number','description':'Page\x20size','default':0x64}],async 'execute'(_0x77eea0){const _0x401b17=a87_0xc6f0e1,_0x588741=_0x77eea0[_0x401b17(0x1ec)](_0x401b17(0x1ee),0x1)||0x1,_0xa6018d=_0x77eea0[_0x401b17(0x1ec)](_0x401b17(0x1ea),0x64)||0x64,{items:_0x5adb2f,paging:_0x26794e}=await listDbLinks(_0x77eea0['appCode'],{'currentPage':_0x588741,'pageSize':_0xa6018d}),_0x3f1729=sanitizeDbLinkList(_0x5adb2f),_0x5aaf69=_0x26794e?_0x26794e:{'currentPage':_0x588741,'pageSize':_0xa6018d,'rowsOnPage':_0x3f1729[_0x401b17(0x1e7)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x3f1729,'paging':_0x5aaf69},'message':_0x401b17(0x1e4)+_0x3f1729['length']+_0x401b17(0x1f0)};}};
1
+ function a87_0x5ceb(){const _0x4749f8=['Page\x20index\x20(1-based)','page','length','24ELJrid','num','188910adbhSJ','230xZWFbM','5519644ezAdIV','48ythfjV','8425230sxgXtY','Page\x20size','1704241EwjjZN','list','read','number','Found\x20','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','269200hrUiXE','3113964Nhrtxm','pagesize','5057LApwky'];a87_0x5ceb=function(){return _0x4749f8;};return a87_0x5ceb();}const a87_0x18e172=a87_0x5e0b;(function(_0x424b20,_0x3e2189){const _0x301a0f=a87_0x5e0b,_0x26fa95=_0x424b20();while(!![]){try{const _0x3c224d=parseInt(_0x301a0f(0x79))/0x1*(parseInt(_0x301a0f(0x80))/0x2)+parseInt(_0x301a0f(0x7f))/0x3+-parseInt(_0x301a0f(0x81))/0x4+parseInt(_0x301a0f(0x76))/0x5*(-parseInt(_0x301a0f(0x82))/0x6)+parseInt(_0x301a0f(0x70))/0x7*(parseInt(_0x301a0f(0x7d))/0x8)+parseInt(_0x301a0f(0x77))/0x9+parseInt(_0x301a0f(0x6e))/0xa;if(_0x3c224d===_0x3e2189)break;else _0x26fa95['push'](_0x26fa95['shift']());}catch(_0x389231){_0x26fa95['push'](_0x26fa95['shift']());}}}(a87_0x5ceb,0xb7ca2));import{listDbLinks}from'../../core/api-client.js';function a87_0x5e0b(_0x401830,_0x10aed1){_0x401830=_0x401830-0x6e;const _0x5ceb0d=a87_0x5ceb();let _0x5e0b1e=_0x5ceb0d[_0x401830];return _0x5e0b1e;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a87_0x18e172(0x71),'description':a87_0x18e172(0x75),'risk':a87_0x18e172(0x72),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a87_0x18e172(0x7b),'type':a87_0x18e172(0x73),'description':a87_0x18e172(0x7a),'default':0x1},{'name':a87_0x18e172(0x78),'type':a87_0x18e172(0x73),'description':a87_0x18e172(0x6f),'default':0x64}],async 'execute'(_0x347c5d){const _0x443ad2=a87_0x18e172,_0x579439=_0x347c5d[_0x443ad2(0x7e)](_0x443ad2(0x7b),0x1)||0x1,_0x43b402=_0x347c5d[_0x443ad2(0x7e)](_0x443ad2(0x78),0x64)||0x64,{items:_0x1932fa,paging:_0x18fba3}=await listDbLinks(_0x347c5d['appCode'],{'currentPage':_0x579439,'pageSize':_0x43b402}),_0x131557=sanitizeDbLinkList(_0x1932fa),_0x258184=_0x18fba3?_0x18fba3:{'currentPage':_0x579439,'pageSize':_0x43b402,'rowsOnPage':_0x131557[_0x443ad2(0x7c)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x131557,'paging':_0x258184},'message':_0x443ad2(0x74)+_0x131557[_0x443ad2(0x7c)]+'\x20database\x20connection(s)'};}};
@@ -1 +1 @@
1
- function a88_0x1ee1(){const _0x4cc43a=['4116lMDKKx','password','trim','credential','connectionstring','jdbcurl','number','token','1596553bqRSOc','16rEsBmR','33936oMFWpL','authorization','454137SCdqLF','4dbCXCx','/data/er?dbId=','2038360MLVFov','test','isFinite','425TFREEM','/data/database','length','accesskey','308488XzKhZa','[redacted]','20757pzUshJ','280HDSmnR','includes','dbpassword','passwd','keys','map','801iDVSvD'];a88_0x1ee1=function(){return _0x4cc43a;};return a88_0x1ee1();}(function(_0x3c78b3,_0x60174a){const _0x563723=a88_0x1bd9,_0x314795=_0x3c78b3();while(!![]){try{const _0x277c75=-parseInt(_0x563723(0xc3))/0x1*(parseInt(_0x563723(0xba))/0x2)+-parseInt(_0x563723(0xb9))/0x3*(parseInt(_0x563723(0xb6))/0x4)+-parseInt(_0x563723(0xbf))/0x5*(-parseInt(_0x563723(0xb7))/0x6)+parseInt(_0x563723(0xb5))/0x7+-parseInt(_0x563723(0xa6))/0x8*(parseInt(_0x563723(0xac))/0x9)+parseInt(_0x563723(0xbc))/0xa+parseInt(_0x563723(0xa5))/0xb*(parseInt(_0x563723(0xad))/0xc);if(_0x277c75===_0x60174a)break;else _0x314795['push'](_0x314795['shift']());}catch(_0x3b1124){_0x314795['push'](_0x314795['shift']());}}}(a88_0x1ee1,0x519e5));function a88_0x1bd9(_0x27b25a,_0x26e650){_0x27b25a=_0x27b25a-0xa4;const _0x1ee1fb=a88_0x1ee1();let _0x1bd963=_0x1ee1fb[_0x27b25a];return _0x1bd963;}import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0x16bafd){const _0x41be9f=a88_0x1bd9,_0xcd1c14=_0x16bafd['toLowerCase']();if(_0xcd1c14===_0x41be9f(0xae)||_0xcd1c14===_0x41be9f(0xa9)||_0xcd1c14===_0x41be9f(0xa8))return!![];if(_0xcd1c14[_0x41be9f(0xa7)]('secret')||_0xcd1c14['includes'](_0x41be9f(0xb4))||_0xcd1c14['includes'](_0x41be9f(0xb0)))return!![];if(_0xcd1c14[_0x41be9f(0xa7)]('privatekey')||_0xcd1c14[_0x41be9f(0xa7)](_0x41be9f(0xc2)))return!![];if(_0xcd1c14===_0x41be9f(0xb8)||_0xcd1c14===_0x41be9f(0xb1)||_0xcd1c14===_0x41be9f(0xb2))return!![];return![];}export function sanitizeDbLinkForOutput(_0x3f3522){const _0x182e66=a88_0x1bd9,_0x1535b5={..._0x3f3522};for(const _0x4f4eee of Object[_0x182e66(0xaa)](_0x1535b5)){if(!shouldRedactKey(_0x4f4eee))continue;const _0xe7760c=_0x1535b5[_0x4f4eee];_0xe7760c!=null&&String(_0xe7760c)[_0x182e66(0xc1)]>0x0&&(_0x1535b5[_0x4f4eee]=_0x182e66(0xa4));}return _0x1535b5;}export function sanitizeDbLinkList(_0x356ea2){const _0x3e7b27=a88_0x1bd9;return _0x356ea2[_0x3e7b27(0xab)](_0x156df1=>sanitizeDbLinkForOutput(_0x156df1));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x267673){const _0x3f4690=a88_0x1bd9,_0x42d15a=_0x267673[_0x3f4690(0xaf)]();if(!_0x42d15a)return![];return DB_URL_PATTERN[_0x3f4690(0xbd)](_0x42d15a);}export function buildDbPageLinks(_0x5c7260,_0x23b738){const _0x529b36=a88_0x1bd9,_0x4856dd=_0x5c7260?.['trim']();if(!_0x4856dd)return undefined;const _0x4cc013=typeof _0x23b738===_0x529b36(0xb3)?String(_0x23b738):String(_0x23b738??'')['trim']();if(!_0x4cc013)return undefined;const _0x31dc08=Number(_0x4cc013);if(!Number[_0x529b36(0xbe)](_0x31dc08)||_0x31dc08<=0x0)return undefined;const _0x3fc226=getAppBaseUrl(_0x4856dd),_0x524f32=encodeURIComponent(String(_0x31dc08));return{'databasePage':_0x3fc226+_0x529b36(0xc0),'erPage':_0x3fc226+_0x529b36(0xbb)+_0x524f32};}
1
+ (function(_0x2e5c4c,_0x2fa732){const _0x2d62e7=a88_0x5bfd,_0x5623b3=_0x2e5c4c();while(!![]){try{const _0x12262a=-parseInt(_0x2d62e7(0x12f))/0x1*(-parseInt(_0x2d62e7(0x143))/0x2)+parseInt(_0x2d62e7(0x131))/0x3+parseInt(_0x2d62e7(0x12d))/0x4+parseInt(_0x2d62e7(0x142))/0x5*(-parseInt(_0x2d62e7(0x136))/0x6)+parseInt(_0x2d62e7(0x12c))/0x7*(parseInt(_0x2d62e7(0x13e))/0x8)+-parseInt(_0x2d62e7(0x144))/0x9*(parseInt(_0x2d62e7(0x135))/0xa)+-parseInt(_0x2d62e7(0x13a))/0xb;if(_0x12262a===_0x2fa732)break;else _0x5623b3['push'](_0x5623b3['shift']());}catch(_0x3c78a1){_0x5623b3['push'](_0x5623b3['shift']());}}}(a88_0x1315,0xca8a9));function a88_0x5bfd(_0x2d6f05,_0xa1cbd7){_0x2d6f05=_0x2d6f05-0x129;const _0x1315ae=a88_0x1315();let _0x5bfd51=_0x1315ae[_0x2d6f05];return _0x5bfd51;}function a88_0x1315(){const _0x5535fb=['4779036tXBJzd','includes','1aqubmQ','accesskey','3275568uNdmQT','isFinite','/data/database','test','1290SFtVsG','822HXxRWN','credential','keys','toLowerCase','31395067BrqWhc','password','trim','number','16UycUyt','dbpassword','connectionstring','length','12305bxfbiT','1054318kEfMwt','2385sQXHBw','authorization','secret','token','4344459JQfGgo'];a88_0x1315=function(){return _0x5535fb;};return a88_0x1315();}import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0x215a50){const _0x4caf0a=a88_0x5bfd,_0x188d4f=_0x215a50[_0x4caf0a(0x139)]();if(_0x188d4f===_0x4caf0a(0x13b)||_0x188d4f==='passwd'||_0x188d4f===_0x4caf0a(0x13f))return!![];if(_0x188d4f[_0x4caf0a(0x12e)](_0x4caf0a(0x12a))||_0x188d4f[_0x4caf0a(0x12e)](_0x4caf0a(0x12b))||_0x188d4f[_0x4caf0a(0x12e)](_0x4caf0a(0x137)))return!![];if(_0x188d4f[_0x4caf0a(0x12e)]('privatekey')||_0x188d4f[_0x4caf0a(0x12e)](_0x4caf0a(0x130)))return!![];if(_0x188d4f===_0x4caf0a(0x129)||_0x188d4f===_0x4caf0a(0x140)||_0x188d4f==='jdbcurl')return!![];return![];}export function sanitizeDbLinkForOutput(_0x55c3d7){const _0x4dfa23=a88_0x5bfd,_0xaac8e4={..._0x55c3d7};for(const _0x4640cd of Object[_0x4dfa23(0x138)](_0xaac8e4)){if(!shouldRedactKey(_0x4640cd))continue;const _0x211df=_0xaac8e4[_0x4640cd];_0x211df!=null&&String(_0x211df)[_0x4dfa23(0x141)]>0x0&&(_0xaac8e4[_0x4640cd]='[redacted]');}return _0xaac8e4;}export function sanitizeDbLinkList(_0x477c48){return _0x477c48['map'](_0x45732b=>sanitizeDbLinkForOutput(_0x45732b));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x397f58){const _0x1b64be=a88_0x5bfd,_0x3d09e4=_0x397f58[_0x1b64be(0x13c)]();if(!_0x3d09e4)return![];return DB_URL_PATTERN[_0x1b64be(0x134)](_0x3d09e4);}export function buildDbPageLinks(_0xb898d6,_0x107503){const _0x9dcb88=a88_0x5bfd,_0x88822f=_0xb898d6?.[_0x9dcb88(0x13c)]();if(!_0x88822f)return undefined;const _0x55a077=typeof _0x107503===_0x9dcb88(0x13d)?String(_0x107503):String(_0x107503??'')[_0x9dcb88(0x13c)]();if(!_0x55a077)return undefined;const _0x663f49=Number(_0x55a077);if(!Number[_0x9dcb88(0x132)](_0x663f49)||_0x663f49<=0x0)return undefined;const _0x312e14=getAppBaseUrl(_0x88822f),_0x162b99=encodeURIComponent(String(_0x663f49));return{'databasePage':_0x312e14+_0x9dcb88(0x133),'erPage':_0x312e14+'/data/er?dbId='+_0x162b99};}
@@ -1 +1 @@
1
- const a89_0x4a4450=a89_0x3c1f;(function(_0x1b80a8,_0x32d8ec){const _0x19687e=a89_0x3c1f,_0xa2bc4c=_0x1b80a8();while(!![]){try{const _0x1c3060=-parseInt(_0x19687e(0x12c))/0x1*(-parseInt(_0x19687e(0x13b))/0x2)+parseInt(_0x19687e(0x131))/0x3+-parseInt(_0x19687e(0x137))/0x4+parseInt(_0x19687e(0x135))/0x5*(-parseInt(_0x19687e(0x12e))/0x6)+parseInt(_0x19687e(0x13c))/0x7*(parseInt(_0x19687e(0x133))/0x8)+parseInt(_0x19687e(0x138))/0x9+parseInt(_0x19687e(0x12f))/0xa*(-parseInt(_0x19687e(0x134))/0xb);if(_0x1c3060===_0x32d8ec)break;else _0xa2bc4c['push'](_0xa2bc4c['shift']());}catch(_0x168a43){_0xa2bc4c['push'](_0xa2bc4c['shift']());}}}(a89_0x366e,0xbbc1b));import{getDbAllTableList}from'../../core/api-client.js';function a89_0x3c1f(_0x29aec7,_0x5e2f7a){_0x29aec7=_0x29aec7-0x12c;const _0x366ea8=a89_0x366e();let _0x3c1f84=_0x366ea8[_0x29aec7];return _0x3c1f84;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a89_0x366e(){const _0x3fa0ee=['4404318DSZxFW','read','13240WdXsTo','12220043FsIXsl','6185NbhUTR','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','3314148ellTcj','3369456nsVppN','tables','length','104zqBOPu','1309EfJiNE','21883VOqDdq','appCode','2820RZDnSJ','10WSTbtP','num'];a89_0x366e=function(){return _0x3fa0ee;};return a89_0x366e();}export const dbTables={'service':'db','command':a89_0x4a4450(0x139),'description':a89_0x4a4450(0x136),'risk':a89_0x4a4450(0x132),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x259a71){const _0x4a3e17=a89_0x4a4450,_0xd30cc9=_0x259a71[_0x4a3e17(0x130)]('id'),_0x3871a3=await getDbAllTableList(_0x259a71[_0x4a3e17(0x12d)],_0xd30cc9);return{'ok':!![],'data':{'dbLinkId':_0xd30cc9,'total':_0x3871a3['length'],'tables':_0x3871a3},'message':_0x3871a3[_0x4a3e17(0x13a)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0xd30cc9};}};
1
+ function a89_0xc495(_0x4d2d3a,_0x278a2a){_0x4d2d3a=_0x4d2d3a-0xe3;const _0x53d449=a89_0x53d4();let _0xc49590=_0x53d449[_0x4d2d3a];return _0xc49590;}const a89_0x131834=a89_0xc495;(function(_0x547ab0,_0x2fd34d){const _0x39de64=a89_0xc495,_0x3c2a67=_0x547ab0();while(!![]){try{const _0x42e937=-parseInt(_0x39de64(0xe6))/0x1*(parseInt(_0x39de64(0xea))/0x2)+-parseInt(_0x39de64(0xe5))/0x3+parseInt(_0x39de64(0xed))/0x4+parseInt(_0x39de64(0xe8))/0x5*(-parseInt(_0x39de64(0xe7))/0x6)+-parseInt(_0x39de64(0xe4))/0x7+parseInt(_0x39de64(0xf0))/0x8+parseInt(_0x39de64(0xe9))/0x9;if(_0x42e937===_0x2fd34d)break;else _0x3c2a67['push'](_0x3c2a67['shift']());}catch(_0x3f5703){_0x3c2a67['push'](_0x3c2a67['shift']());}}}(a89_0x53d4,0x99c25));import{getDbAllTableList}from'../../core/api-client.js';function a89_0x53d4(){const _0x404106=['read','1723788EYqxtv','appCode','num','5670432hxqpqD','\x20table(s)\x20on\x20db\x20link\x20','6444907XbRgdF','115083ANXOHc','1251EJzpEM','2124LoADDq','6625LCMvvs','16077168FWhrcQ','1388hXYeFc','length'];a89_0x53d4=function(){return _0x404106;};return a89_0x53d4();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':'tables','description':'List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','risk':a89_0x131834(0xec),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x18581b){const _0x206ed0=a89_0x131834,_0x147ab2=_0x18581b[_0x206ed0(0xef)]('id'),_0x3b20ad=await getDbAllTableList(_0x18581b[_0x206ed0(0xee)],_0x147ab2);return{'ok':!![],'data':{'dbLinkId':_0x147ab2,'total':_0x3b20ad[_0x206ed0(0xeb)],'tables':_0x3b20ad},'message':_0x3b20ad[_0x206ed0(0xeb)]+_0x206ed0(0xe3)+_0x147ab2};}};
@@ -1 +1 @@
1
- const a90_0xf1b0d8=a90_0x3feb;(function(_0x4243fd,_0xd96909){const _0x209bcf=a90_0x3feb,_0x319911=_0x4243fd();while(!![]){try{const _0x238589=parseInt(_0x209bcf(0x10a))/0x1+-parseInt(_0x209bcf(0x10d))/0x2+-parseInt(_0x209bcf(0x101))/0x3*(-parseInt(_0x209bcf(0x107))/0x4)+parseInt(_0x209bcf(0x111))/0x5*(-parseInt(_0x209bcf(0xfd))/0x6)+parseInt(_0x209bcf(0x108))/0x7+-parseInt(_0x209bcf(0xfc))/0x8+parseInt(_0x209bcf(0x10f))/0x9*(parseInt(_0x209bcf(0x100))/0xa);if(_0x238589===_0xd96909)break;else _0x319911['push'](_0x319911['shift']());}catch(_0x3fbe30){_0x319911['push'](_0x319911['shift']());}}}(a90_0x2882,0x36c0b));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a90_0x2882(){const _0x200c48=['Connection\x20check\x20finished\x20for\x20db\x20link\x20','3081408NNcDlU','6wEFIVM','test','read','310cwsGsS','3LeBdRS','length','\x20(see\x20data.result)','error','slice','keys','325068zsekyo','200774HMfxMs','code','290054LJBFur','msg','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','585054ExorHR','success','251919DNOOih','object','1828770NcLQBb'];a90_0x2882=function(){return _0x200c48;};return a90_0x2882();}function summarizeTestConnectResult(_0x251820){const _0x13fb4a=a90_0x3feb;if(_0x251820===!![]||_0x251820===![])return{'success':_0x251820};if(_0x251820===null||_0x251820===undefined)return{'type':typeof _0x251820};if(typeof _0x251820!=='object')return{'type':typeof _0x251820};const _0x59dd48=_0x251820,_0x54eeb1=[_0x13fb4a(0x10e),'message',_0x13fb4a(0x109),_0x13fb4a(0x104),_0x13fb4a(0x10b),'data'],_0x459e6d={};for(const _0x4154c8 of _0x54eeb1){if(_0x4154c8 in _0x59dd48)_0x459e6d[_0x4154c8]=_0x59dd48[_0x4154c8];}return Object[_0x13fb4a(0x106)](_0x459e6d)[_0x13fb4a(0x102)]===0x0&&(_0x459e6d[_0x13fb4a(0x106)]=Object['keys'](_0x59dd48)[_0x13fb4a(0x105)](0x0,0x14)),_0x459e6d;}function a90_0x3feb(_0x4d77b4,_0x1c7458){_0x4d77b4=_0x4d77b4-0xfc;const _0x288224=a90_0x2882();let _0x3feb86=_0x288224[_0x4d77b4];return _0x3feb86;}export const dbTest={'service':'db','command':a90_0xf1b0d8(0xfe),'description':a90_0xf1b0d8(0x10c),'risk':a90_0xf1b0d8(0xff),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x393fac){const _0x6f9412=a90_0xf1b0d8,_0x5052c=_0x393fac['num']('id'),_0x584e0f=await testDbLinkConnect(_0x5052c),_0x243d00=_0x584e0f===!![]||typeof _0x584e0f===_0x6f9412(0x110)&&_0x584e0f!==null&&_0x584e0f['success']===!![],_0x4a098f=summarizeTestConnectResult(_0x584e0f);return{'ok':!![],'data':{'id':_0x5052c,'connected':Boolean(_0x243d00),'result':_0x4a098f},'message':_0x243d00?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x5052c:_0x6f9412(0x112)+_0x5052c+_0x6f9412(0x103)};}};
1
+ function a90_0x297a(_0x61e8d0,_0x5dedb5){_0x61e8d0=_0x61e8d0-0x181;const _0x289173=a90_0x2891();let _0x297ab8=_0x289173[_0x61e8d0];return _0x297ab8;}const a90_0x4c1461=a90_0x297a;(function(_0x3f00c1,_0x1cead6){const _0x2c0ef2=a90_0x297a,_0x15671a=_0x3f00c1();while(!![]){try{const _0x9c321=-parseInt(_0x2c0ef2(0x188))/0x1+parseInt(_0x2c0ef2(0x195))/0x2*(-parseInt(_0x2c0ef2(0x192))/0x3)+parseInt(_0x2c0ef2(0x18f))/0x4*(-parseInt(_0x2c0ef2(0x186))/0x5)+parseInt(_0x2c0ef2(0x189))/0x6*(-parseInt(_0x2c0ef2(0x182))/0x7)+parseInt(_0x2c0ef2(0x190))/0x8+parseInt(_0x2c0ef2(0x18a))/0x9*(parseInt(_0x2c0ef2(0x197))/0xa)+-parseInt(_0x2c0ef2(0x196))/0xb*(-parseInt(_0x2c0ef2(0x18c))/0xc);if(_0x9c321===_0x1cead6)break;else _0x15671a['push'](_0x15671a['shift']());}catch(_0x2f11a4){_0x15671a['push'](_0x15671a['shift']());}}}(a90_0x2891,0xa7411));import{testDbLinkConnect}from'../../core/api-client.js';function a90_0x2891(){const _0x6ede8=['error','length','4ILopHT','7027688SRpRXW','num','274191MAoXmt','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','slice','4mABSsG','135080SaBoYz','1595790FlWANb','test','7ByvcVj','data','success','message','768060oHehVJ','keys','1219280KLmhqy','4645068CAHcZy','36gRIzGS','object','1464hIEPLD'];a90_0x2891=function(){return _0x6ede8;};return a90_0x2891();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x27ca8f){const _0x6b3680=a90_0x297a;if(_0x27ca8f===!![]||_0x27ca8f===![])return{'success':_0x27ca8f};if(_0x27ca8f===null||_0x27ca8f===undefined)return{'type':typeof _0x27ca8f};if(typeof _0x27ca8f!==_0x6b3680(0x18b))return{'type':typeof _0x27ca8f};const _0x28e620=_0x27ca8f,_0x2c6c7a=[_0x6b3680(0x184),_0x6b3680(0x185),'code',_0x6b3680(0x18d),'msg',_0x6b3680(0x183)],_0x53a21b={};for(const _0x5b79f2 of _0x2c6c7a){if(_0x5b79f2 in _0x28e620)_0x53a21b[_0x5b79f2]=_0x28e620[_0x5b79f2];}return Object[_0x6b3680(0x187)](_0x53a21b)[_0x6b3680(0x18e)]===0x0&&(_0x53a21b[_0x6b3680(0x187)]=Object['keys'](_0x28e620)[_0x6b3680(0x194)](0x0,0x14)),_0x53a21b;}export const dbTest={'service':'db','command':a90_0x4c1461(0x181),'description':a90_0x4c1461(0x193),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x53d73a){const _0x1f3034=a90_0x4c1461,_0x219805=_0x53d73a[_0x1f3034(0x191)]('id'),_0xc632bc=await testDbLinkConnect(_0x219805),_0x54654d=_0xc632bc===!![]||typeof _0xc632bc===_0x1f3034(0x18b)&&_0xc632bc!==null&&_0xc632bc['success']===!![],_0x19cb1e=summarizeTestConnectResult(_0xc632bc);return{'ok':!![],'data':{'id':_0x219805,'connected':Boolean(_0x54654d),'result':_0x19cb1e},'message':_0x54654d?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x219805:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x219805+'\x20(see\x20data.result)'};}};