@lovrabet/rabetbase-cli 2.3.9-beta.3 → 2.3.10-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/group-create.js +1 -1
  104. package/lib/commands/menu/group-update.js +1 -1
  105. package/lib/commands/menu/index.js +1 -1
  106. package/lib/commands/menu/list.js +1 -1
  107. package/lib/commands/menu/regroup-start.js +1 -1
  108. package/lib/commands/menu/shared/compare-table.js +1 -1
  109. package/lib/commands/menu/shared/delete-plan.js +1 -1
  110. package/lib/commands/menu/shared/facts.js +1 -1
  111. package/lib/commands/menu/shared/index.js +1 -1
  112. package/lib/commands/menu/shared/inquirer.js +1 -1
  113. package/lib/commands/menu/shared/local-pages.js +1 -1
  114. package/lib/commands/menu/shared/logic.js +1 -1
  115. package/lib/commands/menu/shared/mutations.js +1 -1
  116. package/lib/commands/menu/shared/service.js +1 -1
  117. package/lib/commands/menu/shared/sync-core.js +1 -1
  118. package/lib/commands/menu/shared/update-core.js +1 -1
  119. package/lib/commands/menu/shared/valid-url.js +1 -1
  120. package/lib/commands/menu/sync.js +1 -1
  121. package/lib/commands/menu/update.js +1 -1
  122. package/lib/commands/notification/config-list.js +1 -1
  123. package/lib/commands/notification/index.js +1 -1
  124. package/lib/commands/page/generate-start.js +1 -1
  125. package/lib/commands/page/generate-status.js +1 -1
  126. package/lib/commands/page/index.js +1 -1
  127. package/lib/commands/page/pull.js +1 -1
  128. package/lib/commands/page/push.js +1 -1
  129. package/lib/commands/page/relation-audit.js +1 -1
  130. package/lib/commands/page/shared.js +1 -1
  131. package/lib/commands/page/standard-page-status.js +1 -1
  132. package/lib/commands/page/sync.js +1 -1
  133. package/lib/commands/permit/index.js +1 -1
  134. package/lib/commands/permit/page-get.js +1 -1
  135. package/lib/commands/permit/page-set.js +1 -1
  136. package/lib/commands/permit/role-apis-set.js +1 -1
  137. package/lib/commands/permit/role-menus-set.js +1 -1
  138. package/lib/commands/permit/role-menus.js +1 -1
  139. package/lib/commands/permit/shared.js +1 -1
  140. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  141. package/lib/commands/project/create/format-elapsed.js +1 -1
  142. package/lib/commands/project/create/main.js +1 -1
  143. package/lib/commands/project/create/non-interactive.js +1 -1
  144. package/lib/commands/project/create/project-template-path.js +1 -1
  145. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  146. package/lib/commands/project/create/use-format-code.js +1 -1
  147. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  148. package/lib/commands/project/index.js +1 -1
  149. package/lib/commands/project/init.js +1 -1
  150. package/lib/commands/project/upgrade.js +1 -1
  151. package/lib/commands/registry.js +1 -1
  152. package/lib/commands/role/create.js +1 -1
  153. package/lib/commands/role/delete.js +1 -1
  154. package/lib/commands/role/detail.js +1 -1
  155. package/lib/commands/role/index.js +1 -1
  156. package/lib/commands/role/list.js +1 -1
  157. package/lib/commands/role/shared.js +1 -1
  158. package/lib/commands/role/update.js +1 -1
  159. package/lib/commands/role/user-add.js +1 -1
  160. package/lib/commands/role/user-remove.js +1 -1
  161. package/lib/commands/role/user-resolve.js +1 -1
  162. package/lib/commands/run/index.js +1 -1
  163. package/lib/commands/schema.js +1 -1
  164. package/lib/commands/sql/create.js +1 -1
  165. package/lib/commands/sql/delete.js +1 -1
  166. package/lib/commands/sql/detail.js +1 -1
  167. package/lib/commands/sql/exec.js +1 -1
  168. package/lib/commands/sql/index.js +1 -1
  169. package/lib/commands/sql/list.js +1 -1
  170. package/lib/commands/sql/pull.js +1 -1
  171. package/lib/commands/sql/push.js +1 -1
  172. package/lib/commands/sql/save.js +1 -1
  173. package/lib/commands/sql/shared.js +1 -1
  174. package/lib/commands/sql/status.js +1 -1
  175. package/lib/commands/sql/validate.js +1 -1
  176. package/lib/commands/task/index.js +1 -1
  177. package/lib/commands/task/status.js +1 -1
  178. package/lib/commands/workspace/add.js +1 -1
  179. package/lib/commands/workspace/index.js +1 -1
  180. package/lib/commands/workspace/remove.js +1 -1
  181. package/lib/config/schema.js +1 -1
  182. package/lib/constant/cdn.js +1 -1
  183. package/lib/constant/cli.js +1 -1
  184. package/lib/constant/defaults.js +1 -1
  185. package/lib/constant/domain.js +1 -1
  186. package/lib/constant/env.js +1 -1
  187. package/lib/constant/output.js +1 -1
  188. package/lib/constant/paths.js +1 -1
  189. package/lib/constant/risk.js +1 -1
  190. package/lib/context/app-resolver.js +1 -1
  191. package/lib/context/auth-resolver.js +1 -1
  192. package/lib/context/config-loader.js +1 -1
  193. package/lib/context.js +1 -1
  194. package/lib/core/alias-resolver.js +1 -1
  195. package/lib/core/api-client.js +1 -1
  196. package/lib/core/bff/config.js +1 -1
  197. package/lib/core/bff/file-system.js +1 -1
  198. package/lib/core/bff/hash.js +1 -1
  199. package/lib/core/bff/lock.js +1 -1
  200. package/lib/core/bff/utils.js +1 -1
  201. package/lib/core/db-resolver.js +1 -1
  202. package/lib/core/page/file-system.js +1 -1
  203. package/lib/core/page/hash.js +1 -1
  204. package/lib/core/page/lock.js +1 -1
  205. package/lib/core/sql-index-auditor.js +1 -1
  206. package/lib/core/sql-sync/config.js +1 -1
  207. package/lib/core/sql-sync/file-system.js +1 -1
  208. package/lib/core/sql-sync/hash.js +1 -1
  209. package/lib/core/sql-sync/lock.js +1 -1
  210. package/lib/core/sql-sync/utils.js +1 -1
  211. package/lib/core/sql-validator.js +1 -1
  212. package/lib/errors.js +1 -1
  213. package/lib/framework/build-all-flags.js +1 -1
  214. package/lib/framework/error-output.js +1 -1
  215. package/lib/framework/explicit-yes.js +1 -1
  216. package/lib/framework/flags.js +1 -1
  217. package/lib/framework/help.js +1 -1
  218. package/lib/framework/index.js +1 -1
  219. package/lib/framework/output.js +1 -1
  220. package/lib/framework/response.js +1 -1
  221. package/lib/framework/runner-alias.js +1 -1
  222. package/lib/framework/runner.js +1 -1
  223. package/lib/framework/schema-export.js +1 -1
  224. package/lib/framework/types.js +1 -1
  225. package/lib/generated/build-info.js +1 -1
  226. package/lib/help.js +1 -1
  227. package/lib/skills/main.js +1 -1
  228. package/lib/skills/npx-skills-add.js +1 -1
  229. package/lib/telemetry/cli-command-trace.js +1 -1
  230. package/lib/telemetry/cli-help-trace.js +1 -1
  231. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  232. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  233. package/lib/telemetry/send-cli-trace-log.js +1 -1
  234. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  235. package/lib/utils/ai_config.js +1 -1
  236. package/lib/utils/apply-jq-filter.js +1 -1
  237. package/lib/utils/cdn-config.js +1 -1
  238. package/lib/utils/check-sdk-version.js +1 -1
  239. package/lib/utils/cli-version-check.js +1 -1
  240. package/lib/utils/cli-version-policy.js +1 -1
  241. package/lib/utils/config.js +1 -1
  242. package/lib/utils/copy-directory.js +1 -1
  243. package/lib/utils/entity-with-id.js +1 -1
  244. package/lib/utils/file-utils.js +1 -1
  245. package/lib/utils/guides-cdn.js +1 -1
  246. package/lib/utils/http-client.js +1 -1
  247. package/lib/utils/is-non-interactive.js +1 -1
  248. package/lib/utils/logger.js +1 -1
  249. package/lib/utils/params.js +1 -1
  250. package/lib/utils/platform.js +1 -1
  251. package/lib/utils/rules-cdn.js +1 -1
  252. package/lib/utils/sleep.js +1 -1
  253. package/lib/utils/template-replacer.js +1 -1
  254. package/lib/utils/update-notice.js +1 -1
  255. package/lib/utils/version.js +1 -1
  256. package/lib/utils/with-active-cookie.js +1 -1
  257. package/lib/utils/write-cli-side-channel.js +1 -1
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- function a76_0x3737(){const _0x506379=['8826251XuJKgo','\x20to\x20','dataset','No\x20changes\x20for\x20dataset\x20','111372jPAbIN','--code\x20is\x20required','Rename\x20dataset\x20display\x20name\x20safely','modelId','isArray','write','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','str','--name\x20is\x20required','name','code','stringify','2766356wdQjWB','4282300xhXtrQ','trim','4437390OwMZRH','18mNmRLL','Expectation\x20mismatch\x20at\x20dataset.name','3STpQph','expectName','New\x20dataset\x20display\x20name','2223414qLIhJt','string','datasetCode','expect-name','Expected\x20','data','5234584fajVkH',',\x20actual\x20','modelCode','validation','POST','Renamed\x20dataset\x20'];a76_0x3737=function(){return _0x506379;};return a76_0x3737();}const a76_0x322d96=a76_0x45d4;(function(_0x369c83,_0x200912){const _0x2656b4=a76_0x45d4,_0x42ff34=_0x369c83();while(!![]){try{const _0x152314=parseInt(_0x2656b4(0xab))/0x1+-parseInt(_0x2656b4(0x9b))/0x2+parseInt(_0x2656b4(0x98))/0x3*(parseInt(_0x2656b4(0x92))/0x4)+-parseInt(_0x2656b4(0x93))/0x5+-parseInt(_0x2656b4(0x95))/0x6+parseInt(_0x2656b4(0xa7))/0x7+-parseInt(_0x2656b4(0xa1))/0x8*(-parseInt(_0x2656b4(0x96))/0x9);if(_0x152314===_0x200912)break;else _0x42ff34['push'](_0x42ff34['shift']());}catch(_0x174fc0){_0x42ff34['push'](_0x42ff34['shift']());}}}(a76_0x3737,0xa24c0));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:_0xbe21bf,dryRun:_0x1bf5d3}){const _0x5bc70d=a76_0x45d4;validateInput(_0xbe21bf);const _0x312e8e=await getDatasetDetail(_0xbe21bf['code']),_0x43882a=resolveCurrentName(_0x312e8e);if(_0x43882a!==_0xbe21bf['expectName'])throw CliErrors[_0x5bc70d(0xa4)](_0x5bc70d(0x97),_0x5bc70d(0x9f)+JSON[_0x5bc70d(0x91)](_0xbe21bf[_0x5bc70d(0x99)])+_0x5bc70d(0xa2)+JSON['stringify'](_0x43882a));const _0x19123b=buildRenameRequest(_0x312e8e,_0xbe21bf),_0x17bc09=_0x43882a!==_0xbe21bf[_0x5bc70d(0x8f)];let _0x4f51ab;return _0x17bc09&&!_0x1bf5d3&&(_0x4f51ab=await updateDrivenData(_0x19123b)),{'ok':!![],'data':{'dataset':{'id':_0x19123b['modelId'],'code':_0x19123b['modelCode']},'dryRun':_0x1bf5d3,'changed':_0x17bc09,'before':{'name':_0x43882a},'after':{'name':_0xbe21bf[_0x5bc70d(0x8f)]},'request':_0x19123b,'submitted':_0x17bc09&&!_0x1bf5d3,..._0x4f51ab!==undefined?{'version':_0x4f51ab}:{}},'message':_0x17bc09?_0x1bf5d3?'Dry-run:\x20dataset\x20'+_0x19123b[_0x5bc70d(0xa3)]+'\x20would\x20be\x20renamed\x20to\x20'+_0xbe21bf[_0x5bc70d(0x8f)]:_0x5bc70d(0xa6)+_0x19123b['modelCode']+_0x5bc70d(0xa8)+_0xbe21bf[_0x5bc70d(0x8f)]:_0x5bc70d(0xaa)+_0x19123b[_0x5bc70d(0xa3)]};}export const datasetRename={'service':'dataset','command':'rename','description':a76_0x322d96(0x88),'risk':a76_0x322d96(0x8b),'flags':[CODE_FLAG,{'name':a76_0x322d96(0x8f),'type':a76_0x322d96(0x9c),'required':!![],'description':a76_0x322d96(0x9a)},{'name':a76_0x322d96(0x9e),'type':'string','required':!![],'description':a76_0x322d96(0x8c)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xb344f7){validateInput(readDatasetRenameInput(_0xb344f7));},async 'dryRun'(_0x5a78f1){const _0x19216e=a76_0x322d96,_0x1cd967=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x5a78f1),'dryRun':!![]});return{'method':_0x19216e(0xa5),'url':'/smartapi/dataset/update-driven-data','body':_0x1cd967[_0x19216e(0xa0)]['request'],'description':_0x1cd967['message'],..._0x1cd967['data']};},async 'execute'(_0x4238ca){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x4238ca),'dryRun':![]});}};function readDatasetRenameInput(_0x1a40d5){const _0x5667a9=a76_0x322d96;return{'code':trim(_0x1a40d5['str']('code')),'name':trim(_0x1a40d5[_0x5667a9(0x8d)]('name')),'expectName':trim(_0x1a40d5['str'](_0x5667a9(0x9e)))};}function a76_0x45d4(_0x589183,_0x35250a){_0x589183=_0x589183-0x88;const _0x3737a6=a76_0x3737();let _0x45d4f0=_0x3737a6[_0x589183];return _0x45d4f0;}function validateInput(_0x4f2c77){const _0x57d1c8=a76_0x322d96;if(!_0x4f2c77['code'])throw CliErrors['validation'](_0x57d1c8(0xac));if(!_0x4f2c77[_0x57d1c8(0x8f)])throw CliErrors[_0x57d1c8(0xa4)](_0x57d1c8(0x8e));if(!_0x4f2c77[_0x57d1c8(0x99)])throw CliErrors[_0x57d1c8(0xa4)]('--expect-name\x20is\x20required');}function resolveCurrentName(_0x59bb90){const _0x4033db=a76_0x322d96;return String(_0x59bb90['dataset']?.['datasetName']??_0x59bb90[_0x4033db(0x8f)]??'')['trim']();}function buildRenameRequest(_0x479fea,_0xe1b7d0){const _0xad5bae=a76_0x322d96,_0x11db3e=isPlainObject(_0x479fea[_0xad5bae(0xa9)])?_0x479fea[_0xad5bae(0xa9)]:{},_0x413209=_0x479fea[_0xad5bae(0x89)]??_0x479fea['id']??_0x11db3e['datasetId'];if(_0x413209===undefined||_0x413209===null||_0x413209==='')throw CliErrors['validation']('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id');const _0x35e035=String(_0x479fea['modelCode']??_0x479fea[_0xad5bae(0x90)]??_0x11db3e[_0xad5bae(0x9d)]??_0xe1b7d0[_0xad5bae(0x90)])[_0xad5bae(0x94)]();if(!_0x35e035)throw CliErrors[_0xad5bae(0xa4)]('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code');return{'modelId':_0x413209,'modelCode':_0x35e035,'name':_0xe1b7d0[_0xad5bae(0x8f)],'dataset':{'datasetId':_0x413209,'datasetCode':_0x35e035,'datasetName':_0xe1b7d0[_0xad5bae(0x8f)]}};}function isPlainObject(_0x126de5){const _0x1cc17e=a76_0x322d96;return Boolean(_0x126de5)&&typeof _0x126de5==='object'&&!Array[_0x1cc17e(0x8a)](_0x126de5);}function trim(_0x1374ed){const _0x2d635f=a76_0x322d96;return String(_0x1374ed||'')[_0x2d635f(0x94)]();}
1
+ const a76_0x26d309=a76_0x370a;(function(_0x293d38,_0x44841a){const _0x468144=a76_0x370a,_0x140152=_0x293d38();while(!![]){try{const _0x29f028=-parseInt(_0x468144(0x1c6))/0x1*(parseInt(_0x468144(0x1c1))/0x2)+-parseInt(_0x468144(0x1a9))/0x3+parseInt(_0x468144(0x1b9))/0x4+parseInt(_0x468144(0x1cf))/0x5+parseInt(_0x468144(0x1d4))/0x6*(-parseInt(_0x468144(0x1bd))/0x7)+parseInt(_0x468144(0x1b0))/0x8*(-parseInt(_0x468144(0x1bb))/0x9)+parseInt(_0x468144(0x1d3))/0xa;if(_0x29f028===_0x44841a)break;else _0x140152['push'](_0x140152['shift']());}catch(_0x219348){_0x140152['push'](_0x140152['shift']());}}}(a76_0x55df,0xddf82));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a76_0x55df(){const _0x2c9588=['trim','763278MiMkLY','No\x20changes\x20for\x20dataset\x20','datasetId','Renamed\x20dataset\x20','Rename\x20dataset\x20display\x20name\x20safely','data','POST','2272RUTWib','object','str','--expect-name\x20is\x20required','--name\x20is\x20required',',\x20actual\x20','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id','datasetCode','Expected\x20','1714660IyWJFv','write','10566bwMiBd','expectName','7upQXGX','\x20to\x20','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','name','164326rswpOp','modelCode','New\x20dataset\x20display\x20name','--code\x20is\x20required','dataset','8EBGoOP','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code','datasetName','Dry-run:\x20dataset\x20','Expectation\x20mismatch\x20at\x20dataset.name','stringify','rename','/smartapi/dataset/update-driven-data','isArray','879660aYYaOE','validation','\x20would\x20be\x20renamed\x20to\x20','request','27216060OudEXv','7031226AyOsQR','modelId','code'];a76_0x55df=function(){return _0x2c9588;};return a76_0x55df();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a76_0x370a(_0x2a6957,_0x1c9620){_0x2a6957=_0x2a6957-0x1a9;const _0x55dfbf=a76_0x55df();let _0x370ab5=_0x55dfbf[_0x2a6957];return _0x370ab5;}export async function buildDatasetRenameResult({input:_0x4569ae,dryRun:_0x2668f8}){const _0x46c4d5=a76_0x370a;validateInput(_0x4569ae);const _0x4db9a3=await getDatasetDetail(_0x4569ae[_0x46c4d5(0x1d6)]),_0x170a1e=resolveCurrentName(_0x4db9a3);if(_0x170a1e!==_0x4569ae['expectName'])throw CliErrors[_0x46c4d5(0x1d0)](_0x46c4d5(0x1ca),_0x46c4d5(0x1b8)+JSON[_0x46c4d5(0x1cb)](_0x4569ae[_0x46c4d5(0x1bc)])+_0x46c4d5(0x1b5)+JSON[_0x46c4d5(0x1cb)](_0x170a1e));const _0xfb2771=buildRenameRequest(_0x4db9a3,_0x4569ae),_0x1e1928=_0x170a1e!==_0x4569ae[_0x46c4d5(0x1c0)];let _0x2c9012;return _0x1e1928&&!_0x2668f8&&(_0x2c9012=await updateDrivenData(_0xfb2771)),{'ok':!![],'data':{'dataset':{'id':_0xfb2771['modelId'],'code':_0xfb2771[_0x46c4d5(0x1c2)]},'dryRun':_0x2668f8,'changed':_0x1e1928,'before':{'name':_0x170a1e},'after':{'name':_0x4569ae[_0x46c4d5(0x1c0)]},'request':_0xfb2771,'submitted':_0x1e1928&&!_0x2668f8,..._0x2c9012!==undefined?{'version':_0x2c9012}:{}},'message':_0x1e1928?_0x2668f8?_0x46c4d5(0x1c9)+_0xfb2771[_0x46c4d5(0x1c2)]+_0x46c4d5(0x1d1)+_0x4569ae['name']:_0x46c4d5(0x1ac)+_0xfb2771[_0x46c4d5(0x1c2)]+_0x46c4d5(0x1be)+_0x4569ae[_0x46c4d5(0x1c0)]:_0x46c4d5(0x1aa)+_0xfb2771['modelCode']};}export const datasetRename={'service':'dataset','command':a76_0x26d309(0x1cc),'description':a76_0x26d309(0x1ad),'risk':a76_0x26d309(0x1ba),'flags':[CODE_FLAG,{'name':a76_0x26d309(0x1c0),'type':'string','required':!![],'description':a76_0x26d309(0x1c3)},{'name':'expect-name','type':'string','required':!![],'description':a76_0x26d309(0x1bf)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x58a2be){validateInput(readDatasetRenameInput(_0x58a2be));},async 'dryRun'(_0x1b6c14){const _0x5cd2c9=a76_0x26d309,_0x4575ce=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x1b6c14),'dryRun':!![]});return{'method':_0x5cd2c9(0x1af),'url':_0x5cd2c9(0x1cd),'body':_0x4575ce[_0x5cd2c9(0x1ae)][_0x5cd2c9(0x1d2)],'description':_0x4575ce['message'],..._0x4575ce['data']};},async 'execute'(_0x59316f){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x59316f),'dryRun':![]});}};function readDatasetRenameInput(_0x91d256){const _0x2dc41f=a76_0x26d309;return{'code':trim(_0x91d256[_0x2dc41f(0x1b2)](_0x2dc41f(0x1d6))),'name':trim(_0x91d256[_0x2dc41f(0x1b2)]('name')),'expectName':trim(_0x91d256[_0x2dc41f(0x1b2)]('expect-name'))};}function validateInput(_0x367591){const _0x36a151=a76_0x26d309;if(!_0x367591[_0x36a151(0x1d6)])throw CliErrors[_0x36a151(0x1d0)](_0x36a151(0x1c4));if(!_0x367591[_0x36a151(0x1c0)])throw CliErrors[_0x36a151(0x1d0)](_0x36a151(0x1b4));if(!_0x367591['expectName'])throw CliErrors['validation'](_0x36a151(0x1b3));}function resolveCurrentName(_0x286cdc){const _0x55cf8b=a76_0x26d309;return String(_0x286cdc[_0x55cf8b(0x1c5)]?.[_0x55cf8b(0x1c8)]??_0x286cdc[_0x55cf8b(0x1c0)]??'')[_0x55cf8b(0x1d7)]();}function buildRenameRequest(_0x3a9785,_0x3563f3){const _0x2b3701=a76_0x26d309,_0x2d3f0b=isPlainObject(_0x3a9785[_0x2b3701(0x1c5)])?_0x3a9785[_0x2b3701(0x1c5)]:{},_0x237f37=_0x3a9785[_0x2b3701(0x1d5)]??_0x3a9785['id']??_0x2d3f0b[_0x2b3701(0x1ab)];if(_0x237f37===undefined||_0x237f37===null||_0x237f37==='')throw CliErrors[_0x2b3701(0x1d0)](_0x2b3701(0x1b6));const _0x347b55=String(_0x3a9785['modelCode']??_0x3a9785['code']??_0x2d3f0b[_0x2b3701(0x1b7)]??_0x3563f3[_0x2b3701(0x1d6)])[_0x2b3701(0x1d7)]();if(!_0x347b55)throw CliErrors[_0x2b3701(0x1d0)](_0x2b3701(0x1c7));return{'modelId':_0x237f37,'modelCode':_0x347b55,'name':_0x3563f3[_0x2b3701(0x1c0)],'dataset':{'datasetId':_0x237f37,'datasetCode':_0x347b55,'datasetName':_0x3563f3[_0x2b3701(0x1c0)]}};}function isPlainObject(_0x564c83){const _0x1dfc95=a76_0x26d309;return Boolean(_0x564c83)&&typeof _0x564c83===_0x1dfc95(0x1b1)&&!Array[_0x1dfc95(0x1ce)](_0x564c83);}function trim(_0xba70f6){const _0x5a6af9=a76_0x26d309;return String(_0xba70f6||'')[_0x5a6af9(0x1d7)]();}
@@ -1 +1 @@
1
- const a77_0x678291=a77_0x11d8;(function(_0xc999a0,_0x1b63f6){const _0x244aca=a77_0x11d8,_0x49bf9e=_0xc999a0();while(!![]){try{const _0x22ab7f=-parseInt(_0x244aca(0xbe))/0x1*(-parseInt(_0x244aca(0xb4))/0x2)+parseInt(_0x244aca(0xa3))/0x3*(parseInt(_0x244aca(0x9f))/0x4)+-parseInt(_0x244aca(0xc6))/0x5+parseInt(_0x244aca(0x9d))/0x6*(parseInt(_0x244aca(0x9a))/0x7)+-parseInt(_0x244aca(0xb5))/0x8*(-parseInt(_0x244aca(0xbc))/0x9)+-parseInt(_0x244aca(0xaa))/0xa+-parseInt(_0x244aca(0xb7))/0xb;if(_0x22ab7f===_0x1b63f6)break;else _0x49bf9e['push'](_0x49bf9e['shift']());}catch(_0x284bd1){_0x49bf9e['push'](_0x49bf9e['shift']());}}}(a77_0x97b6,0xb5dd8));import{listDatasets,restoreDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a77_0x678291(0xc7),'description':a77_0x678291(0xc2)},DBID_FLAG={'name':a77_0x678291(0xb6),'type':'number','description':a77_0x678291(0xab)},CONFIRM_FLAG={'name':a77_0x678291(0xa0),'type':a77_0x678291(0xa4),'description':a77_0x678291(0x99)},EXPECTED_COUNT_FLAG={'name':a77_0x678291(0xa7),'type':a77_0x678291(0xc7),'description':a77_0x678291(0xb8)};function a77_0x11d8(_0x1cf68d,_0x2ac107){_0x1cf68d=_0x1cf68d-0x99;const _0x97b68b=a77_0x97b6();let _0x11d84d=_0x97b68b[_0x1cf68d];return _0x11d84d;}export const datasetRestore={'service':a77_0x678291(0xb2),'command':'restore','description':'Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','risk':a77_0x678291(0x9b),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x374914){const _0x34eab7=a77_0x678291,_0x339ae1=_0x374914['num']('id'),_0x3cbcbf=_0x374914[_0x34eab7(0xbd)]('code'),_0x4b4980=_0x374914[_0x34eab7(0xc4)](_0x34eab7(0xb6)),_0x44b174=[_0x339ae1>0x0,Boolean(_0x3cbcbf),_0x4b4980>0x0][_0x34eab7(0xb0)](Boolean);if(_0x44b174['length']===0x0)throw CliErrors[_0x34eab7(0xc1)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x44b174['length']>0x1)throw CliErrors[_0x34eab7(0xc1)](_0x34eab7(0xa1));},async 'dryRun'(_0x2b354e){const _0x53d239=a77_0x678291,_0x5d7488=await resolveTargets(_0x2b354e);return{'method':'POST','url':'/smartapi/dataset/restore-dataset','body':{'appCode':_0x2b354e[_0x53d239(0xca)],'count':_0x5d7488['length'],'datasets':_0x5d7488},'description':_0x53d239(0x9e)+_0x5d7488[_0x53d239(0xad)]+_0x53d239(0xc3)};},async 'execute'(_0x45ab5c){const _0x5ee591=a77_0x678291;if(!_0x45ab5c[_0x5ee591(0xae)](_0x5ee591(0xa0)))throw CliErrors['validation'](_0x5ee591(0xbf),_0x5ee591(0xc9));const _0xd0bd32=await resolveTargets(_0x45ab5c),_0x11343b=[],_0x4a5b0a=[];for(const _0xc97a18 of _0xd0bd32){try{await restoreDataset(_0x45ab5c[_0x5ee591(0xca)],_0xc97a18['id']),_0x11343b[_0x5ee591(0xcb)](_0xc97a18);}catch(_0x4dea14){_0x4a5b0a[_0x5ee591(0xcb)]({..._0xc97a18,'error':_0x4dea14 instanceof Error?_0x4dea14[_0x5ee591(0xa9)]:String(_0x4dea14)});}}if(_0x4a5b0a['length']>0x0)return{'ok':![],'data':{'requested':_0xd0bd32[_0x5ee591(0xad)],'restoredCount':_0x11343b[_0x5ee591(0xad)],'failedCount':_0x4a5b0a[_0x5ee591(0xad)],'restored':_0x11343b,'failed':_0x4a5b0a},'message':'Restored\x20'+_0x11343b['length']+'/'+_0xd0bd32[_0x5ee591(0xad)]+_0x5ee591(0xba)+_0x4a5b0a[_0x5ee591(0xad)]+_0x5ee591(0xbb)};return{'ok':!![],'data':{'requested':_0xd0bd32[_0x5ee591(0xad)],'restoredCount':_0x11343b[_0x5ee591(0xad)],'restored':_0x11343b},'message':_0x5ee591(0xa6)+_0x11343b['length']+'\x20dataset(s)'};}};async function resolveTargets(_0x1d80f6){const _0x2f54d3=a77_0x678291,_0x4d688d=_0x1d80f6['num']('id'),_0x2d9a=_0x1d80f6[_0x2f54d3(0xbd)](_0x2f54d3(0xc5)),_0x34e143=_0x1d80f6[_0x2f54d3(0xc4)](_0x2f54d3(0xb6));let _0x57069d;_0x2d9a?(_0x57069d=await listDatasets(_0x1d80f6[_0x2f54d3(0xca)],{'code':_0x2d9a,'deleted':!![]}),_0x57069d=_0x57069d['filter'](_0x2ff86c=>_0x2ff86c['code']===_0x2d9a)):(_0x57069d=await listDatasets(_0x1d80f6[_0x2f54d3(0xca)],{'deleted':!![]}),_0x4d688d>0x0&&(_0x57069d=_0x57069d[_0x2f54d3(0xb0)](_0x3019b5=>_0x3019b5['id']===_0x4d688d)),_0x34e143>0x0&&(_0x57069d=_0x57069d[_0x2f54d3(0xb0)](_0x2a985e=>_0x2a985e[_0x2f54d3(0xac)]?.['dbId']===_0x34e143)));const _0x5e62e9=_0x57069d['map'](normalizeTarget);if(_0x5e62e9['length']===0x0){const _0x3ca5d9=_0x2d9a||(_0x4d688d>0x0?_0x2f54d3(0xcc)+_0x4d688d:_0x2f54d3(0xc0)+_0x34e143);throw CliErrors[_0x2f54d3(0xc1)](_0x2f54d3(0xc8)+_0x3ca5d9+'.');}const _0x181483=_0x1d80f6[_0x2f54d3(0xc4)]('expected-count');if(_0x181483>0x0&&_0x5e62e9[_0x2f54d3(0xad)]!==_0x181483)throw CliErrors[_0x2f54d3(0xc1)](_0x2f54d3(0x9c)+_0x5e62e9[_0x2f54d3(0xad)]+_0x2f54d3(0xb9)+_0x181483+'.');return _0x5e62e9;}function normalizeTarget(_0x322a49){const _0x3a43f4=a77_0x678291,_0x4ece7e=_0x322a49[_0x3a43f4(0xac)]??{};return{'id':_0x322a49['id'],'code':_0x322a49[_0x3a43f4(0xc5)],'name':_0x322a49['name'],'description':_0x322a49[_0x3a43f4(0xa5)],'source':_0x322a49[_0x3a43f4(0xa2)],'dbId':_0x4ece7e[_0x3a43f4(0xaf)],'dbName':_0x4ece7e[_0x3a43f4(0xb1)],'tableName':_0x4ece7e['tableName'],'relatedPageCount':Array[_0x3a43f4(0xb3)](_0x322a49[_0x3a43f4(0xa8)])?_0x322a49['relationPages'][_0x3a43f4(0xad)]:undefined};}function a77_0x97b6(){const _0x2e2b05=['3mDpKnp','boolean','description','Restored\x20','expected-count','relationPages','message','5447860aYUpXK','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbtableConfig','length','bool','dbId','filter','dbName','dataset','isArray','108814cRqvwD','6376SWPLWT','dbid','7870269MJUSUI','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','\x20dataset(s);\x20','\x20failed','7659ZOJyeA','str','7mDVsSR','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','dbid=','validation','Dataset\x20id','\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.','num','code','3265590tXPjzK','number','No\x20deleted\x20dataset\x20found\x20for\x20','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','appCode','push','id=','Required\x20to\x20execute\x20dataset\x20restore','7oZLJbw','high-risk-write','Matched\x20','7537938fbtcgI','Would\x20restore\x20','1371536qNqIIY','confirm','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','source'];a77_0x97b6=function(){return _0x2e2b05;};return a77_0x97b6();}
1
+ function a77_0x2a28(){const _0x271c57=['relationPages','1441803KiZNfb','dbtableConfig','10NpBlBt','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','number','391705uIgCyN','/smartapi/dataset/restore-dataset','boolean','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','length','num','653359EqpWDP','code','push','filter','Required\x20to\x20execute\x20dataset\x20restore','46290DVEhbg','isArray','\x20dataset(s);\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','20NFcNUT','183840JRpvds','POST','Restored\x20','\x20dataset(s)','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','Would\x20restore\x20','str','dataset','dbid','dbId','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','Dataset\x20id','high-risk-write','message','12ukANPn','2289192Zztuxp','No\x20deleted\x20dataset\x20found\x20for\x20','676449YLZdNv','8IgWala','tableName','confirm','map','name','Matched\x20','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','dbid=','dbName','\x20failed','appCode','expected-count','validation'];a77_0x2a28=function(){return _0x271c57;};return a77_0x2a28();}const a77_0x171466=a77_0x3863;(function(_0x31fe21,_0x2a5beb){const _0x15f82d=a77_0x3863,_0x5c3d1c=_0x31fe21();while(!![]){try{const _0x40bcc4=-parseInt(_0x15f82d(0x190))/0x1+parseInt(_0x15f82d(0x17d))/0x2*(parseInt(_0x15f82d(0x18b))/0x3)+parseInt(_0x15f82d(0x1a0))/0x4*(parseInt(_0x15f82d(0x180))/0x5)+parseInt(_0x15f82d(0x1a1))/0x6+-parseInt(_0x15f82d(0x186))/0x7*(parseInt(_0x15f82d(0x1a4))/0x8)+parseInt(_0x15f82d(0x1a3))/0x9+parseInt(_0x15f82d(0x18f))/0xa*(-parseInt(_0x15f82d(0x17b))/0xb);if(_0x40bcc4===_0x2a5beb)break;else _0x5c3d1c['push'](_0x5c3d1c['shift']());}catch(_0x384083){_0x5c3d1c['push'](_0x5c3d1c['shift']());}}}(a77_0x2a28,0x380a7));import{listDatasets,restoreDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a77_0x171466(0x17f),'description':a77_0x171466(0x19d)},DBID_FLAG={'name':a77_0x171466(0x198),'type':'number','description':a77_0x171466(0x19c)},CONFIRM_FLAG={'name':'confirm','type':a77_0x171466(0x182),'description':a77_0x171466(0x18a)},EXPECTED_COUNT_FLAG={'name':a77_0x171466(0x178),'type':a77_0x171466(0x17f),'description':a77_0x171466(0x17e)};function a77_0x3863(_0x129657,_0x537073){_0x129657=_0x129657-0x174;const _0x2a282c=a77_0x2a28();let _0x3863f4=_0x2a282c[_0x129657];return _0x3863f4;}export const datasetRestore={'service':a77_0x171466(0x197),'command':'restore','description':a77_0x171466(0x19b),'risk':a77_0x171466(0x19e),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x45ac6b){const _0x591d00=a77_0x171466,_0x356d80=_0x45ac6b['num']('id'),_0x366718=_0x45ac6b[_0x591d00(0x196)]('code'),_0x3eecd3=_0x45ac6b[_0x591d00(0x185)]('dbid'),_0x55f77f=[_0x356d80>0x0,Boolean(_0x366718),_0x3eecd3>0x0][_0x591d00(0x189)](Boolean);if(_0x55f77f[_0x591d00(0x184)]===0x0)throw CliErrors['validation'](_0x591d00(0x18e));if(_0x55f77f[_0x591d00(0x184)]>0x1)throw CliErrors[_0x591d00(0x179)](_0x591d00(0x1aa));},async 'dryRun'(_0x1643a6){const _0xe831a1=a77_0x171466,_0x51f704=await resolveTargets(_0x1643a6);return{'method':_0xe831a1(0x191),'url':_0xe831a1(0x181),'body':{'appCode':_0x1643a6[_0xe831a1(0x177)],'count':_0x51f704['length'],'datasets':_0x51f704},'description':_0xe831a1(0x195)+_0x51f704['length']+'\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.'};},async 'execute'(_0x427cc6){const _0x17fe9a=a77_0x171466;if(!_0x427cc6['bool'](_0x17fe9a(0x1a6)))throw CliErrors['validation'](_0x17fe9a(0x183),_0x17fe9a(0x194));const _0x3dd898=await resolveTargets(_0x427cc6),_0x10ec62=[],_0x2c1e19=[];for(const _0x375b1a of _0x3dd898){try{await restoreDataset(_0x427cc6[_0x17fe9a(0x177)],_0x375b1a['id']),_0x10ec62[_0x17fe9a(0x188)](_0x375b1a);}catch(_0x9b161f){_0x2c1e19[_0x17fe9a(0x188)]({..._0x375b1a,'error':_0x9b161f instanceof Error?_0x9b161f[_0x17fe9a(0x19f)]:String(_0x9b161f)});}}if(_0x2c1e19['length']>0x0)return{'ok':![],'data':{'requested':_0x3dd898[_0x17fe9a(0x184)],'restoredCount':_0x10ec62['length'],'failedCount':_0x2c1e19[_0x17fe9a(0x184)],'restored':_0x10ec62,'failed':_0x2c1e19},'message':_0x17fe9a(0x192)+_0x10ec62[_0x17fe9a(0x184)]+'/'+_0x3dd898[_0x17fe9a(0x184)]+_0x17fe9a(0x18d)+_0x2c1e19[_0x17fe9a(0x184)]+_0x17fe9a(0x176)};return{'ok':!![],'data':{'requested':_0x3dd898['length'],'restoredCount':_0x10ec62[_0x17fe9a(0x184)],'restored':_0x10ec62},'message':_0x17fe9a(0x192)+_0x10ec62[_0x17fe9a(0x184)]+_0x17fe9a(0x193)};}};async function resolveTargets(_0x56c9f9){const _0x1fc1bc=a77_0x171466,_0x3dba7f=_0x56c9f9['num']('id'),_0xef2d47=_0x56c9f9[_0x1fc1bc(0x196)](_0x1fc1bc(0x187)),_0x4bc99f=_0x56c9f9['num'](_0x1fc1bc(0x198));let _0x545537;_0xef2d47?(_0x545537=await listDatasets(_0x56c9f9['appCode'],{'code':_0xef2d47,'deleted':!![]}),_0x545537=_0x545537[_0x1fc1bc(0x189)](_0x2510b4=>_0x2510b4['code']===_0xef2d47)):(_0x545537=await listDatasets(_0x56c9f9['appCode'],{'deleted':!![]}),_0x3dba7f>0x0&&(_0x545537=_0x545537['filter'](_0x2ebd22=>_0x2ebd22['id']===_0x3dba7f)),_0x4bc99f>0x0&&(_0x545537=_0x545537[_0x1fc1bc(0x189)](_0x514a0b=>_0x514a0b[_0x1fc1bc(0x17c)]?.[_0x1fc1bc(0x199)]===_0x4bc99f)));const _0xe46c4c=_0x545537[_0x1fc1bc(0x1a7)](normalizeTarget);if(_0xe46c4c['length']===0x0){const _0x513c16=_0xef2d47||(_0x3dba7f>0x0?'id='+_0x3dba7f:_0x1fc1bc(0x174)+_0x4bc99f);throw CliErrors[_0x1fc1bc(0x179)](_0x1fc1bc(0x1a2)+_0x513c16+'.');}const _0x39c00f=_0x56c9f9[_0x1fc1bc(0x185)]('expected-count');if(_0x39c00f>0x0&&_0xe46c4c['length']!==_0x39c00f)throw CliErrors[_0x1fc1bc(0x179)](_0x1fc1bc(0x1a9)+_0xe46c4c[_0x1fc1bc(0x184)]+_0x1fc1bc(0x19a)+_0x39c00f+'.');return _0xe46c4c;}function normalizeTarget(_0x10173d){const _0x479f9a=a77_0x171466,_0x2c3d1b=_0x10173d[_0x479f9a(0x17c)]??{};return{'id':_0x10173d['id'],'code':_0x10173d[_0x479f9a(0x187)],'name':_0x10173d[_0x479f9a(0x1a8)],'description':_0x10173d['description'],'source':_0x10173d['source'],'dbId':_0x2c3d1b[_0x479f9a(0x199)],'dbName':_0x2c3d1b[_0x479f9a(0x175)],'tableName':_0x2c3d1b[_0x479f9a(0x1a5)],'relatedPageCount':Array[_0x479f9a(0x18c)](_0x10173d['relationPages'])?_0x10173d[_0x479f9a(0x17a)]['length']:undefined};}
@@ -1 +1 @@
1
- (function(_0x5601df,_0x33eba2){const _0x3830e9=a78_0x1814,_0xae1178=_0x5601df();while(!![]){try{const _0x349746=parseInt(_0x3830e9(0x98))/0x1*(-parseInt(_0x3830e9(0x94))/0x2)+-parseInt(_0x3830e9(0xa3))/0x3+parseInt(_0x3830e9(0x97))/0x4*(-parseInt(_0x3830e9(0x9f))/0x5)+-parseInt(_0x3830e9(0x95))/0x6*(parseInt(_0x3830e9(0x9e))/0x7)+parseInt(_0x3830e9(0x8f))/0x8+parseInt(_0x3830e9(0xa1))/0x9+parseInt(_0x3830e9(0x90))/0xa;if(_0x349746===_0x33eba2)break;else _0xae1178['push'](_0xae1178['shift']());}catch(_0x315f27){_0xae1178['push'](_0xae1178['shift']());}}}(a78_0x5b45,0xe2550));import{CliErrors}from'../../errors.js';export const DB_ANALYSIS_MAX_TABLES_PER_BATCH=0xa;function a78_0x5b45(){const _0x3720c0=['Table\x20\x22','10336512OYhdlT','23195710bVPIGt','heuristic','byteLength','\x20bytes.','5294anIhcX','243546gxNbVn','push','5103436jFpLNP','164PlMCBR','has','\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20','\x20bytes,\x20limit\x20','ceil','validation','259WwsevS','5HwmYZN','split','9475173FEEvND','length','1576626tMUJkT'];a78_0x5b45=function(){return _0x3720c0;};return a78_0x5b45();}function a78_0x1814(_0x44cc4c,_0x416de2){_0x44cc4c=_0x44cc4c-0x8f;const _0x5b451d=a78_0x5b45();let _0x1814a7=_0x5b451d[_0x44cc4c];return _0x1814a7;}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(_0x276e67){const _0x5103ec=a78_0x1814,_0x266bf0=new Set(),_0x1487c3=[];for(const _0x19ccbb of _0x276e67[_0x5103ec(0xa0)](',')){const _0x12ddc4=_0x19ccbb['trim']();if(!_0x12ddc4||_0x266bf0[_0x5103ec(0x99)](_0x12ddc4))continue;_0x266bf0['add'](_0x12ddc4),_0x1487c3['push'](_0x12ddc4);}return _0x1487c3;}export function measureAnalysisInputParamsBytes(_0x71f3a6,_0x317c54){const _0x4cc52b=a78_0x1814;return Buffer[_0x4cc52b(0x92)](JSON['stringify']({'dbLinkId':_0x71f3a6,'tableNames':_0x317c54}),'utf8');}export function buildAnalysisBatchPlan(_0x44ce34,_0x2ff5e7){const _0x83ca2=a78_0x1814;if(_0x2ff5e7[_0x83ca2(0xa2)]===0x0)throw CliErrors[_0x83ca2(0x9d)]('At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.');const _0x50f689=[];let _0x3e90d8=[];for(const _0x347da3 of _0x2ff5e7){const _0x221086=[..._0x3e90d8,_0x347da3],_0x12db0f=_0x221086[_0x83ca2(0xa2)]>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0x44ce34,_0x221086)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x12db0f&&_0x3e90d8[_0x83ca2(0xa2)]>0x0?(_0x50f689[_0x83ca2(0x96)](_0x3e90d8),_0x3e90d8=[_0x347da3]):_0x3e90d8=_0x221086;const _0x50ae50=measureAnalysisInputParamsBytes(_0x44ce34,_0x3e90d8);if(_0x50ae50>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors[_0x83ca2(0x9d)](_0x83ca2(0xa4)+_0x347da3+_0x83ca2(0x9a)+_0x50ae50+_0x83ca2(0x9b)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x83ca2(0x93));}_0x3e90d8[_0x83ca2(0xa2)]>0x0&&_0x50f689[_0x83ca2(0x96)](_0x3e90d8);const _0x433fcf=_0x50f689['map']((_0x9d7b20,_0x22100c)=>({'index':_0x22100c+0x1,'tableCount':_0x9d7b20[_0x83ca2(0xa2)],'inputParamsBytes':measureAnalysisInputParamsBytes(_0x44ce34,_0x9d7b20),'estimatedDurationSeconds':_0x9d7b20[_0x83ca2(0xa2)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x9d7b20})),_0x30c3c4=_0x2ff5e7['length']*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0x44ce34,'tableCount':_0x2ff5e7[_0x83ca2(0xa2)],'batchCount':_0x433fcf['length'],'maxTablesPerBatch':DB_ANALYSIS_MAX_TABLES_PER_BATCH,'maxSerializedBytesPerBatch':DB_ANALYSIS_BATCH_TARGET_BYTES,'serverInputParamsLimitBytes':DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,'planningEstimate':{'basis':_0x83ca2(0x91),'assumedSecondsPerTable':DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'estimatedTotalSeconds':_0x30c3c4,'estimatedTotalMinutes':Math[_0x83ca2(0x9c)](_0x30c3c4/0x3c)},'batches':_0x433fcf};}
1
+ function a78_0x58fb(_0x46b3c5,_0x51c42c){_0x46b3c5=_0x46b3c5-0xa7;const _0x183f06=a78_0x183f();let _0x58fb84=_0x183f06[_0x46b3c5];return _0x58fb84;}(function(_0x343307,_0x160f5a){const _0x29ff90=a78_0x58fb,_0xb14a77=_0x343307();while(!![]){try{const _0x484564=-parseInt(_0x29ff90(0xb7))/0x1+parseInt(_0x29ff90(0xb2))/0x2+parseInt(_0x29ff90(0xaf))/0x3+parseInt(_0x29ff90(0xb1))/0x4*(-parseInt(_0x29ff90(0xb8))/0x5)+parseInt(_0x29ff90(0xaa))/0x6+parseInt(_0x29ff90(0xb6))/0x7+parseInt(_0x29ff90(0xba))/0x8*(parseInt(_0x29ff90(0xbd))/0x9);if(_0x484564===_0x160f5a)break;else _0xb14a77['push'](_0xb14a77['shift']());}catch(_0x3726b7){_0xb14a77['push'](_0xb14a77['shift']());}}}(a78_0x183f,0x4aa81));import{CliErrors}from'../../errors.js';export const DB_ANALYSIS_MAX_TABLES_PER_BATCH=0xa;export const DB_ANALYSIS_BATCH_TARGET_BYTES=0x3c0;export const DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES=0x400;export const DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE=0x3c;export function normalizeAnalysisTableNames(_0x2ae929){const _0x5f2256=a78_0x58fb,_0x2d07f3=new Set(),_0x5e53f4=[];for(const _0xdb5f1e of _0x2ae929[_0x5f2256(0xb5)](',')){const _0x5660bc=_0xdb5f1e[_0x5f2256(0xbe)]();if(!_0x5660bc||_0x2d07f3[_0x5f2256(0xb0)](_0x5660bc))continue;_0x2d07f3['add'](_0x5660bc),_0x5e53f4['push'](_0x5660bc);}return _0x5e53f4;}export function measureAnalysisInputParamsBytes(_0x8b1d4,_0x13857c){const _0x4ae230=a78_0x58fb;return Buffer[_0x4ae230(0xb3)](JSON[_0x4ae230(0xa9)]({'dbLinkId':_0x8b1d4,'tableNames':_0x13857c}),_0x4ae230(0xad));}export function buildAnalysisBatchPlan(_0xecb9d2,_0x413f62){const _0x4521c1=a78_0x58fb;if(_0x413f62[_0x4521c1(0xbc)]===0x0)throw CliErrors['validation'](_0x4521c1(0xbf));const _0x2b5c6a=[];let _0xe376da=[];for(const _0x4253e2 of _0x413f62){const _0x5e73a2=[..._0xe376da,_0x4253e2],_0x11ae6c=_0x5e73a2[_0x4521c1(0xbc)]>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0xecb9d2,_0x5e73a2)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x11ae6c&&_0xe376da[_0x4521c1(0xbc)]>0x0?(_0x2b5c6a[_0x4521c1(0xb4)](_0xe376da),_0xe376da=[_0x4253e2]):_0xe376da=_0x5e73a2;const _0x321be9=measureAnalysisInputParamsBytes(_0xecb9d2,_0xe376da);if(_0x321be9>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors[_0x4521c1(0xa7)](_0x4521c1(0xab)+_0x4253e2+_0x4521c1(0xbb)+_0x321be9+_0x4521c1(0xac)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x4521c1(0xb9));}_0xe376da[_0x4521c1(0xbc)]>0x0&&_0x2b5c6a[_0x4521c1(0xb4)](_0xe376da);const _0x2a9d11=_0x2b5c6a['map']((_0x1a9725,_0x254615)=>({'index':_0x254615+0x1,'tableCount':_0x1a9725['length'],'inputParamsBytes':measureAnalysisInputParamsBytes(_0xecb9d2,_0x1a9725),'estimatedDurationSeconds':_0x1a9725['length']*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x1a9725})),_0x5a6102=_0x413f62[_0x4521c1(0xbc)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0xecb9d2,'tableCount':_0x413f62[_0x4521c1(0xbc)],'batchCount':_0x2a9d11[_0x4521c1(0xbc)],'maxTablesPerBatch':DB_ANALYSIS_MAX_TABLES_PER_BATCH,'maxSerializedBytesPerBatch':DB_ANALYSIS_BATCH_TARGET_BYTES,'serverInputParamsLimitBytes':DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,'planningEstimate':{'basis':_0x4521c1(0xa8),'assumedSecondsPerTable':DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'estimatedTotalSeconds':_0x5a6102,'estimatedTotalMinutes':Math[_0x4521c1(0xae)](_0x5a6102/0x3c)},'batches':_0x2a9d11};}function a78_0x183f(){const _0x50bae3=['2784924yUACJV','Table\x20\x22','\x20bytes,\x20limit\x20','utf8','ceil','349977PHglCt','has','60igbdkP','670108jIUIxT','byteLength','push','split','83839KfXLfZ','549186RLiZyk','64595TTiDmI','\x20bytes.','193472AWSTHE','\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20','length','45cLifFc','trim','At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.','validation','heuristic','stringify'];a78_0x183f=function(){return _0x50bae3;};return a78_0x183f();}
@@ -1 +1 @@
1
- const a79_0x453c04=a79_0x323c;(function(_0x26b435,_0x1dec18){const _0x57995e=a79_0x323c,_0xfb599c=_0x26b435();while(!![]){try{const _0x102a25=-parseInt(_0x57995e(0xca))/0x1+parseInt(_0x57995e(0xdd))/0x2*(-parseInt(_0x57995e(0xdb))/0x3)+-parseInt(_0x57995e(0xd5))/0x4*(-parseInt(_0x57995e(0xd7))/0x5)+parseInt(_0x57995e(0xc1))/0x6*(-parseInt(_0x57995e(0xc7))/0x7)+parseInt(_0x57995e(0xd3))/0x8*(-parseInt(_0x57995e(0xc4))/0x9)+-parseInt(_0x57995e(0xc6))/0xa*(-parseInt(_0x57995e(0xc9))/0xb)+parseInt(_0x57995e(0xd2))/0xc*(parseInt(_0x57995e(0xda))/0xd);if(_0x102a25===_0x1dec18)break;else _0xfb599c['push'](_0xfb599c['shift']());}catch(_0x3d22f1){_0xfb599c['push'](_0xfb599c['shift']());}}}(a79_0x38cd,0x4ea3e));import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';function a79_0x38cd(){const _0xa62adf=['analyze-batch-plan','12xgNIfn','Prepared\x20local\x20batch\x20plan\x20for\x20','814105XGLrFg','\x20minute(s)\x20at\x20','assumedSecondsPerTable','195NFWcBa','412476oxqRAH','tableCount','6hCKDQD',';\x20estimated\x20about\x20','85902mkjumX','planningEstimate','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','70344DHTAZb','Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','155860uKBTgW','161rjRxNg','string','209clgGXm','171925zQhQCn','Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches','num','str','\x20serial\x20batch(es)\x20for\x20db\x20link\x20','tables','estimatedTotalMinutes','batchCount','611076AhftQo','320VcMevS'];a79_0x38cd=function(){return _0xa62adf;};return a79_0x38cd();}function a79_0x323c(_0x4e41dc,_0x49d1b4){_0x4e41dc=_0x4e41dc-0xc0;const _0x38cd3f=a79_0x38cd();let _0x323c93=_0x38cd3f[_0x4e41dc];return _0x323c93;}export const dbAnalyzeBatchPlan={'service':'db','command':a79_0x453c04(0xd4),'description':a79_0x453c04(0xc5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a79_0x453c04(0xc8),'required':!![],'description':a79_0x453c04(0xcb)}],async 'execute'(_0x239ce0){const _0x5e77ec=a79_0x453c04,_0x376e9b=_0x239ce0[_0x5e77ec(0xcc)]('id'),_0x4bfb64=normalizeAnalysisTableNames(_0x239ce0[_0x5e77ec(0xcd)](_0x5e77ec(0xcf))),_0x4855e1=buildAnalysisBatchPlan(_0x376e9b,_0x4bfb64);return{'ok':!![],'data':_0x4855e1,'message':_0x5e77ec(0xd6)+_0x4855e1[_0x5e77ec(0xdc)]+'\x20table(s)\x20in\x20'+_0x4855e1[_0x5e77ec(0xd1)]+_0x5e77ec(0xce)+_0x376e9b+_0x5e77ec(0xc0)+_0x4855e1['planningEstimate'][_0x5e77ec(0xd0)]+_0x5e77ec(0xd8)+_0x4855e1[_0x5e77ec(0xc2)][_0x5e77ec(0xd9)]+_0x5e77ec(0xc3)};}};
1
+ const a79_0x5b4b40=a79_0x2e0c;(function(_0x2c86f6,_0x5a3e29){const _0x36ea93=a79_0x2e0c,_0x1ffbb8=_0x2c86f6();while(!![]){try{const _0x42b2ba=-parseInt(_0x36ea93(0xa8))/0x1+parseInt(_0x36ea93(0xac))/0x2*(parseInt(_0x36ea93(0xa1))/0x3)+-parseInt(_0x36ea93(0xa9))/0x4+-parseInt(_0x36ea93(0xab))/0x5*(-parseInt(_0x36ea93(0xa4))/0x6)+parseInt(_0x36ea93(0xaf))/0x7*(parseInt(_0x36ea93(0x9e))/0x8)+-parseInt(_0x36ea93(0xb0))/0x9*(-parseInt(_0x36ea93(0x9d))/0xa)+parseInt(_0x36ea93(0xaa))/0xb*(-parseInt(_0x36ea93(0xa2))/0xc);if(_0x42b2ba===_0x5a3e29)break;else _0x1ffbb8['push'](_0x1ffbb8['shift']());}catch(_0x4f1d60){_0x1ffbb8['push'](_0x1ffbb8['shift']());}}}(a79_0x10eb,0xc1ee7));import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';function a79_0x2e0c(_0x26d05c,_0x18ef76){_0x26d05c=_0x26d05c-0x9a;const _0x10eb6a=a79_0x10eb();let _0x2e0c22=_0x10eb6a[_0x26d05c];return _0x2e0c22;}function a79_0x10eb(){const _0x455afe=['tables','2274UHaPlg','num','tableCount','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','380680fTlMGb','337064KOdHAc','57002baIJcG','11195XHMLYk','1382642AOdDDx','analyze-batch-plan','str','343rCITRu','12357IJMhlw','planningEstimate','read','\x20serial\x20batch(es)\x20for\x20db\x20link\x20','assumedSecondsPerTable','string','10nMJcdN','6416mCtaln','Prepared\x20local\x20batch\x20plan\x20for\x20','Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches','3lzdTlN','744DtwehW'];a79_0x10eb=function(){return _0x455afe;};return a79_0x10eb();}export const dbAnalyzeBatchPlan={'service':'db','command':a79_0x5b4b40(0xad),'description':'Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','risk':a79_0x5b4b40(0xb2),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a79_0x5b4b40(0xa3),'type':a79_0x5b4b40(0x9c),'required':!![],'description':a79_0x5b4b40(0xa0)}],async 'execute'(_0x32adf5){const _0xed85c1=a79_0x5b4b40,_0x2dd587=_0x32adf5[_0xed85c1(0xa5)]('id'),_0x4d8963=normalizeAnalysisTableNames(_0x32adf5[_0xed85c1(0xae)](_0xed85c1(0xa3))),_0x8101d0=buildAnalysisBatchPlan(_0x2dd587,_0x4d8963);return{'ok':!![],'data':_0x8101d0,'message':_0xed85c1(0x9f)+_0x8101d0[_0xed85c1(0xa6)]+'\x20table(s)\x20in\x20'+_0x8101d0['batchCount']+_0xed85c1(0x9a)+_0x2dd587+';\x20estimated\x20about\x20'+_0x8101d0[_0xed85c1(0xb1)]['estimatedTotalMinutes']+'\x20minute(s)\x20at\x20'+_0x8101d0[_0xed85c1(0xb1)][_0xed85c1(0x9b)]+_0xed85c1(0xa7)};}};
@@ -1 +1 @@
1
- const a80_0x8b84ae=a80_0x1e42;(function(_0x328801,_0x4a2423){const _0x59631c=a80_0x1e42,_0x4d2cae=_0x328801();while(!![]){try{const _0x3ffd45=parseInt(_0x59631c(0x14b))/0x1+parseInt(_0x59631c(0x154))/0x2+-parseInt(_0x59631c(0x151))/0x3+parseInt(_0x59631c(0x153))/0x4*(parseInt(_0x59631c(0x146))/0x5)+-parseInt(_0x59631c(0x14c))/0x6*(-parseInt(_0x59631c(0x143))/0x7)+-parseInt(_0x59631c(0x14a))/0x8*(parseInt(_0x59631c(0x150))/0x9)+-parseInt(_0x59631c(0x145))/0xa;if(_0x3ffd45===_0x4a2423)break;else _0x4d2cae['push'](_0x4d2cae['shift']());}catch(_0x287abf){_0x4d2cae['push'](_0x4d2cae['shift']());}}}(a80_0x24c6,0x2eeb9));import{cancelDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a80_0x24c6(){const _0x2a773e=['Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','9hbKEdI','222702ncZbLs','plan','232aCWrmh','144736aXkvGX','Cancel\x20requested\x20for\x20plan\x20','7112HQljeg','write','3523570HTjmzM','22045qhkzEj','str','string','analyze-cancel','927624DhDrEa','254239IvHjbU','900QsGRgu','num','Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel'];a80_0x24c6=function(){return _0x2a773e;};return a80_0x24c6();}function a80_0x1e42(_0xb08fd6,_0x1a91b4){_0xb08fd6=_0xb08fd6-0x142;const _0x24c6bc=a80_0x24c6();let _0x1e42a9=_0x24c6bc[_0xb08fd6];return _0x1e42a9;}export const dbAnalyzeCancel={'service':'db','command':a80_0x8b84ae(0x149),'description':a80_0x8b84ae(0x14f),'risk':a80_0x8b84ae(0x144),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a80_0x8b84ae(0x152),'type':a80_0x8b84ae(0x148),'required':!![],'description':a80_0x8b84ae(0x14e)}],async 'execute'(_0x31054c){const _0x25bf4b=a80_0x8b84ae,_0xe6ab8=_0x31054c[_0x25bf4b(0x14d)]('id'),_0x2d4990=_0x31054c[_0x25bf4b(0x147)]('plan');return await cancelDbAnalysis(_0x2d4990),{'ok':!![],'data':{'dbLinkId':_0xe6ab8,'planId':_0x2d4990},'message':_0x25bf4b(0x142)+_0x2d4990};}};
1
+ const a80_0x2b27f8=a80_0x104c;function a80_0x104c(_0x39b717,_0x412829){_0x39b717=_0x39b717-0x1c1;const _0x498c33=a80_0x498c();let _0x104c1a=_0x498c33[_0x39b717];return _0x104c1a;}(function(_0x3529ad,_0x3da325){const _0x1dd2a2=a80_0x104c,_0x37f61f=_0x3529ad();while(!![]){try{const _0x2fa107=parseInt(_0x1dd2a2(0x1ca))/0x1*(parseInt(_0x1dd2a2(0x1cb))/0x2)+-parseInt(_0x1dd2a2(0x1c3))/0x3+-parseInt(_0x1dd2a2(0x1cd))/0x4+parseInt(_0x1dd2a2(0x1cc))/0x5+-parseInt(_0x1dd2a2(0x1c1))/0x6*(-parseInt(_0x1dd2a2(0x1c7))/0x7)+-parseInt(_0x1dd2a2(0x1ce))/0x8*(-parseInt(_0x1dd2a2(0x1c4))/0x9)+-parseInt(_0x1dd2a2(0x1c8))/0xa;if(_0x2fa107===_0x3da325)break;else _0x37f61f['push'](_0x37f61f['shift']());}catch(_0xb163a1){_0x37f61f['push'](_0x37f61f['shift']());}}}(a80_0x498c,0xb7ba7));function a80_0x498c(){const _0x34ea06=['8iNhDUf','1929195PINdrh','3208972EmHfZZ','7560296exhnTo','plan','num','1438488wSukjk','analyze-cancel','268782onCedI','9hpwJcK','str','write','28seWfaB','20263640Vhyglx','string','345221GMRXzY'];a80_0x498c=function(){return _0x34ea06;};return a80_0x498c();}import{cancelDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a80_0x2b27f8(0x1c2),'description':'Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','risk':a80_0x2b27f8(0x1c6),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a80_0x2b27f8(0x1c9),'required':!![],'description':'Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel'}],async 'execute'(_0x67f54c){const _0x15d334=a80_0x2b27f8,_0x207d90=_0x67f54c[_0x15d334(0x1d0)]('id'),_0x313022=_0x67f54c[_0x15d334(0x1c5)](_0x15d334(0x1cf));return await cancelDbAnalysis(_0x313022),{'ok':!![],'data':{'dbLinkId':_0x207d90,'planId':_0x313022},'message':'Cancel\x20requested\x20for\x20plan\x20'+_0x313022};}};
@@ -1 +1 @@
1
- const a81_0x3e5081=a81_0x1584;(function(_0x2cb9f9,_0x23a64a){const _0x4afa13=a81_0x1584,_0x7bff89=_0x2cb9f9();while(!![]){try{const _0x1f8791=parseInt(_0x4afa13(0xb0))/0x1+-parseInt(_0x4afa13(0xa6))/0x2*(parseInt(_0x4afa13(0xb4))/0x3)+-parseInt(_0x4afa13(0xa8))/0x4+-parseInt(_0x4afa13(0xad))/0x5*(-parseInt(_0x4afa13(0x9e))/0x6)+parseInt(_0x4afa13(0xb1))/0x7*(parseInt(_0x4afa13(0xa9))/0x8)+-parseInt(_0x4afa13(0xa2))/0x9+-parseInt(_0x4afa13(0xb2))/0xa;if(_0x1f8791===_0x23a64a)break;else _0x7bff89['push'](_0x7bff89['shift']());}catch(_0x36c097){_0x7bff89['push'](_0x7bff89['shift']());}}}(a81_0x24c2,0x8a574));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a81_0x1584(_0x1ac15a,_0x3275e1){_0x1ac15a=_0x1ac15a-0x9c;const _0x24c28a=a81_0x24c2();let _0x1584b7=_0x24c28a[_0x1ac15a];return _0x1584b7;}import{DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,measureAnalysisInputParamsBytes,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';function a81_0x24c2(){const _0x3833e4=['Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','length','string','2629467IgGemc','validation','analyze-start','\x20bytes.\x20Run\x20`','10456FnHVqy','num','134384OoVuqf','2667352qPalMX','\x20table(s),\x20','Started\x20analysis\x20for\x20db\x20link\x20','str','30rGPzXm','\x20db\x20analyze-batch-plan\x20--id\x20','Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20','1082950GozWYO','21DLsNtJ','15563280bDOlav','\x20bytes,\x20limit\x20','201jThJQc','flag','tables','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','715800XgvFAA'];a81_0x24c2=function(){return _0x3833e4;};return a81_0x24c2();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbAnalyzeStart={'service':'db','command':a81_0x3e5081(0xa4),'description':a81_0x3e5081(0x9f),'risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x3e5081(0x9c),'type':a81_0x3e5081(0xa1),'description':a81_0x3e5081(0x9d)}],async 'execute'(_0x7f9968){const _0x494a00=a81_0x3e5081,_0x35ce01=_0x7f9968[_0x494a00(0xa7)]('id'),_0x3116b8=_0x7f9968[_0x494a00(0xac)](_0x494a00(0x9c)),_0x1bafc7=_0x7f9968[_0x494a00(0xb5)](_0x494a00(0x9c))!==undefined,_0x3a4e5f=_0x1bafc7?normalizeAnalysisTableNames(_0x3116b8):undefined;if(_0x3a4e5f&&_0x3a4e5f[_0x494a00(0xa0)]===0x0)throw CliErrors[_0x494a00(0xa3)]('At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.');if(_0x3a4e5f&&_0x3a4e5f[_0x494a00(0xa0)]>0x0){const _0x3895f7=measureAnalysisInputParamsBytes(_0x35ce01,_0x3a4e5f);if(_0x3895f7>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors[_0x494a00(0xa3)](_0x494a00(0xaf)+_0x3a4e5f[_0x494a00(0xa0)]+_0x494a00(0xaa)+_0x3895f7+_0x494a00(0xb3)+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x494a00(0xa5)+CLI_BIN_NAME+_0x494a00(0xae)+_0x35ce01+'\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.');}const {planId:_0x75b13f,estimatedMinutes:_0x2f5a34,estimatedDurationDesc:_0x2330b}=await startDbAnalysis(_0x35ce01,_0x3a4e5f),_0x42ab16=buildDbPageLinks(_0x7f9968['appCode'],_0x35ce01);return{'ok':!![],'data':{'dbLinkId':_0x35ce01,'planId':_0x75b13f,'tableNames':_0x3a4e5f??[],'serverEstimate':{'estimatedMinutes':_0x2f5a34,'estimatedDurationDesc':_0x2330b},..._0x42ab16?{'links':_0x42ab16}:{}},'message':_0x494a00(0xab)+_0x35ce01};}};
1
+ const a81_0x2583b7=a81_0x4c6b;(function(_0x1ea25f,_0xb089dc){const _0x367f9f=a81_0x4c6b,_0x509206=_0x1ea25f();while(!![]){try{const _0x114e34=-parseInt(_0x367f9f(0x1da))/0x1*(-parseInt(_0x367f9f(0x1e6))/0x2)+-parseInt(_0x367f9f(0x1e0))/0x3+-parseInt(_0x367f9f(0x1ea))/0x4*(parseInt(_0x367f9f(0x1e1))/0x5)+-parseInt(_0x367f9f(0x1ec))/0x6+-parseInt(_0x367f9f(0x1f4))/0x7*(parseInt(_0x367f9f(0x1f6))/0x8)+parseInt(_0x367f9f(0x1e4))/0x9+parseInt(_0x367f9f(0x1de))/0xa*(parseInt(_0x367f9f(0x1e7))/0xb);if(_0x114e34===_0xb089dc)break;else _0x509206['push'](_0x509206['shift']());}catch(_0x1e2331){_0x509206['push'](_0x509206['shift']());}}}(a81_0x40c3,0x7faae));import{startDbAnalysis}from'../../core/api-client.js';function a81_0x40c3(){const _0x425997=['Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20','4357827gyHwVr','\x20bytes,\x20limit\x20','2WMgtrL','429OvSSUi','Started\x20analysis\x20for\x20db\x20link\x20','At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','3606764zVAKtv','appCode','4034766QGyLXi','length','\x20table(s),\x20','write','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','tables','string','num','14TwIISw','\x20bytes.\x20Run\x20`','3909464NGMSgZ','782338khgQFF','\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.','str','validation','483490OVxAgy','\x20db\x20analyze-batch-plan\x20--id\x20','233124YNOcMx','5hOUuSE','flag'];a81_0x40c3=function(){return _0x425997;};return a81_0x40c3();}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 a81_0x4c6b(_0xed154b,_0x38152c){_0xed154b=_0xed154b-0x1da;const _0x40c3db=a81_0x40c3();let _0x4c6bcc=_0x40c3db[_0xed154b];return _0x4c6bcc;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbAnalyzeStart={'service':'db','command':'analyze-start','description':'Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','risk':a81_0x2583b7(0x1ef),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x2583b7(0x1f1),'type':a81_0x2583b7(0x1f2),'description':a81_0x2583b7(0x1f0)}],async 'execute'(_0x2a35ae){const _0x3f0069=a81_0x2583b7,_0x555943=_0x2a35ae[_0x3f0069(0x1f3)]('id'),_0x21aed4=_0x2a35ae[_0x3f0069(0x1dc)](_0x3f0069(0x1f1)),_0x553e7b=_0x2a35ae[_0x3f0069(0x1e2)](_0x3f0069(0x1f1))!==undefined,_0x91b467=_0x553e7b?normalizeAnalysisTableNames(_0x21aed4):undefined;if(_0x91b467&&_0x91b467[_0x3f0069(0x1ed)]===0x0)throw CliErrors[_0x3f0069(0x1dd)](_0x3f0069(0x1e9));if(_0x91b467&&_0x91b467[_0x3f0069(0x1ed)]>0x0){const _0x6789d8=measureAnalysisInputParamsBytes(_0x555943,_0x91b467);if(_0x6789d8>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors['validation'](_0x3f0069(0x1e3)+_0x91b467['length']+_0x3f0069(0x1ee)+_0x6789d8+_0x3f0069(0x1e5)+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x3f0069(0x1f5)+CLI_BIN_NAME+_0x3f0069(0x1df)+_0x555943+_0x3f0069(0x1db));}const {planId:_0x473ea,estimatedMinutes:_0x449c02,estimatedDurationDesc:_0x4a9353}=await startDbAnalysis(_0x555943,_0x91b467),_0x5d2cfc=buildDbPageLinks(_0x2a35ae[_0x3f0069(0x1eb)],_0x555943);return{'ok':!![],'data':{'dbLinkId':_0x555943,'planId':_0x473ea,'tableNames':_0x91b467??[],'serverEstimate':{'estimatedMinutes':_0x449c02,'estimatedDurationDesc':_0x4a9353},..._0x5d2cfc?{'links':_0x5d2cfc}:{}},'message':_0x3f0069(0x1e8)+_0x555943};}};
@@ -1 +1 @@
1
- const a82_0x1ce2a9=a82_0x1774;function a82_0x1774(_0x15400f,_0x2f9d3a){_0x15400f=_0x15400f-0xb3;const _0x4043f5=a82_0x4043();let _0x177457=_0x4043f5[_0x15400f];return _0x177457;}(function(_0x589201,_0x2a732f){const _0x4c4f8f=a82_0x1774,_0x82df3d=_0x589201();while(!![]){try{const _0x50b05a=-parseInt(_0x4c4f8f(0xcf))/0x1*(parseInt(_0x4c4f8f(0xc0))/0x2)+parseInt(_0x4c4f8f(0xd4))/0x3+parseInt(_0x4c4f8f(0xc4))/0x4*(parseInt(_0x4c4f8f(0xc8))/0x5)+parseInt(_0x4c4f8f(0xd2))/0x6*(parseInt(_0x4c4f8f(0xc6))/0x7)+-parseInt(_0x4c4f8f(0xcd))/0x8+parseInt(_0x4c4f8f(0xc3))/0x9+parseInt(_0x4c4f8f(0xba))/0xa*(parseInt(_0x4c4f8f(0xd6))/0xb);if(_0x50b05a===_0x2a732f)break;else _0x82df3d['push'](_0x82df3d['shift']());}catch(_0x19f5f3){_0x82df3d['push'](_0x82df3d['shift']());}}}(a82_0x4043,0xa3164));function a82_0x4043(){const _0x591db1=['373726wOizLL','length','isNaN','6087042cNuwlB','2555612pvzdsd','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','7CimeLS','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','5EztASz','plan','analyze-status','string','CANCELLED','6549712CDlBhw','PARTIAL_SUCCESS','6ThGDGr','number','status','5857476AUSVAb','jobContext','648081WiGPyT','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','1166hHTzHz','costTimeMs','appCode','object','isArray','isFinite','has','SUCCESS','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','parse','num','9470JAaQLn','Analysis\x20status\x20for\x20','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','trim','RETRYING','startTime'];a82_0x4043=function(){return _0x591db1;};return a82_0x4043();}import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a82_0x1ce2a9(0xb6),a82_0x1ce2a9(0xce),'FAILED',a82_0x1ce2a9(0xcc)]);export const dbAnalyzeStatus={'service':'db','command':a82_0x1ce2a9(0xca),'description':a82_0x1ce2a9(0xd5),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a82_0x1ce2a9(0xc9),'type':a82_0x1ce2a9(0xcb),'required':!![],'description':a82_0x1ce2a9(0xb7)}],async 'execute'(_0x7b388b){const _0x2d6e86=a82_0x1ce2a9,_0x523b8c=_0x7b388b[_0x2d6e86(0xb9)]('id'),_0x28fe32=_0x7b388b['str'](_0x2d6e86(0xc9)),_0xd001a3=await getDbAnalysisStatus(_0x28fe32),_0x35ddcc=TERMINAL_STATUSES[_0x2d6e86(0xb5)](_0xd001a3[_0x2d6e86(0xd1)]??''),{parsedJobContext:_0xf9fd2c,jobContextParseWarning:_0x51247e}=parseJobContext(_0xd001a3[_0x2d6e86(0xd3)]),_0x53c7f6=readAccumulatedErrorTypeCounts(_0xf9fd2c),_0x528163=buildDbPageLinks(_0x7b388b[_0x2d6e86(0xd8)],_0x523b8c);return{'ok':!![],'data':{'dbLinkId':_0x523b8c,'planId':_0x28fe32,'status':_0xd001a3,'parsedJobContext':_0xf9fd2c,'accumulatedErrorTypeCounts':_0x53c7f6,'accumulatedErrorTypeCountsAdvisory':_0x53c7f6?_0x2d6e86(0xbc):_0x2d6e86(0xc7),'isTerminal':_0x35ddcc,'isRetrying':_0xd001a3[_0x2d6e86(0xd1)]===_0x2d6e86(0xbe),'elapsedMs':calculateElapsedMs(_0xd001a3,_0x35ddcc),'jobContextParseWarning':_0x51247e,..._0x528163?{'links':_0x528163}:{}},'message':_0x2d6e86(0xbb)+_0x28fe32};}};function readAccumulatedErrorTypeCounts(_0x2fa829){const _0x144240=a82_0x1ce2a9,_0x5c57a7=_0x2fa829?.['accumulatedErrorTypeCounts'];if(!_0x5c57a7||typeof _0x5c57a7!==_0x144240(0xd9)||Array[_0x144240(0xb3)](_0x5c57a7))return null;if(Object['keys'](_0x5c57a7)[_0x144240(0xc1)]===0x0)return null;return _0x5c57a7;}function parseJobContext(_0x2f96f6){const _0x3a439f=a82_0x1ce2a9;if(!_0x2f96f6?.[_0x3a439f(0xbd)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0xf83d91=JSON[_0x3a439f(0xb8)](_0x2f96f6);if(_0xf83d91&&typeof _0xf83d91===_0x3a439f(0xd9)&&!Array['isArray'](_0xf83d91))return{'parsedJobContext':_0xf83d91,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x3a439f(0xc5)};}function calculateElapsedMs(_0x31932b,_0x9a732){const _0x4379cf=a82_0x1ce2a9;if(typeof _0x31932b[_0x4379cf(0xd7)]===_0x4379cf(0xd0)&&Number[_0x4379cf(0xb4)](_0x31932b[_0x4379cf(0xd7)])&&_0x31932b[_0x4379cf(0xd7)]>=0x0)return _0x31932b[_0x4379cf(0xd7)];const _0x522410=toTimestamp(_0x31932b[_0x4379cf(0xbf)]);if(_0x522410===null)return null;const _0x47e3e0=toTimestamp(_0x31932b['endTime']),_0xb7c09d=_0x47e3e0??(_0x9a732?null:Date['now']());if(_0xb7c09d===null||_0xb7c09d<_0x522410)return null;return _0xb7c09d-_0x522410;}function toTimestamp(_0x291b7a){const _0x5af7ff=a82_0x1ce2a9;if(typeof _0x291b7a==='number')return Number[_0x5af7ff(0xb4)](_0x291b7a)?_0x291b7a:null;if(typeof _0x291b7a!=='string'||_0x291b7a[_0x5af7ff(0xbd)]()==='')return null;const _0x375592=Number(_0x291b7a);if(Number[_0x5af7ff(0xb4)](_0x375592))return _0x375592;const _0x49e734=Date[_0x5af7ff(0xb8)](_0x291b7a);return Number[_0x5af7ff(0xc2)](_0x49e734)?null:_0x49e734;}
1
+ const a82_0x44a4b9=a82_0xee1d;(function(_0x317a43,_0x4bf172){const _0x4c1cbb=a82_0xee1d,_0x1baf59=_0x317a43();while(!![]){try{const _0x1daef0=parseInt(_0x4c1cbb(0x1d3))/0x1+parseInt(_0x4c1cbb(0x1bc))/0x2+-parseInt(_0x4c1cbb(0x1d2))/0x3*(parseInt(_0x4c1cbb(0x1d1))/0x4)+-parseInt(_0x4c1cbb(0x1c3))/0x5+parseInt(_0x4c1cbb(0x1c5))/0x6*(parseInt(_0x4c1cbb(0x1d4))/0x7)+-parseInt(_0x4c1cbb(0x1bf))/0x8*(-parseInt(_0x4c1cbb(0x1c9))/0x9)+parseInt(_0x4c1cbb(0x1c0))/0xa;if(_0x1daef0===_0x4bf172)break;else _0x1baf59['push'](_0x1baf59['shift']());}catch(_0x47eda1){_0x1baf59['push'](_0x1baf59['shift']());}}}(a82_0x4751,0xa5b71));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a82_0x4751(){const _0x5cd4fb=['plan','FAILED','appCode','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','status','accumulatedErrorTypeCounts','1185244nSPnkt','length','Analysis\x20status\x20for\x20','35016XvcwPX','1936090gApiUW','keys','SUCCESS','6736380SaQCsG','isFinite','115932zBHVoU','num','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','RETRYING','855UHkQdW','string','str','PARTIAL_SUCCESS','now','CANCELLED','has','parse','8eZDbrd','1959123TiviZX','1125337VcfJxU','364dQnkAd','trim','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','number','costTimeMs','object','isArray'];a82_0x4751=function(){return _0x5cd4fb;};return a82_0x4751();}const TERMINAL_STATUSES=new Set([a82_0x44a4b9(0x1c2),a82_0x44a4b9(0x1cc),a82_0x44a4b9(0x1b6),a82_0x44a4b9(0x1ce)]);export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a82_0x44a4b9(0x1b8),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a82_0x44a4b9(0x1b5),'type':a82_0x44a4b9(0x1ca),'required':!![],'description':a82_0x44a4b9(0x1d6)}],async 'execute'(_0x554f96){const _0x105004=a82_0x44a4b9,_0x1c3140=_0x554f96[_0x105004(0x1c6)]('id'),_0x329f57=_0x554f96[_0x105004(0x1cb)](_0x105004(0x1b5)),_0x578627=await getDbAnalysisStatus(_0x329f57),_0x1af2a9=TERMINAL_STATUSES[_0x105004(0x1cf)](_0x578627['status']??''),{parsedJobContext:_0x42da28,jobContextParseWarning:_0xb28224}=parseJobContext(_0x578627['jobContext']),_0x212987=readAccumulatedErrorTypeCounts(_0x42da28),_0x3e363e=buildDbPageLinks(_0x554f96[_0x105004(0x1b7)],_0x1c3140);return{'ok':!![],'data':{'dbLinkId':_0x1c3140,'planId':_0x329f57,'status':_0x578627,'parsedJobContext':_0x42da28,'accumulatedErrorTypeCounts':_0x212987,'accumulatedErrorTypeCountsAdvisory':_0x212987?_0x105004(0x1b9):_0x105004(0x1c7),'isTerminal':_0x1af2a9,'isRetrying':_0x578627[_0x105004(0x1ba)]===_0x105004(0x1c8),'elapsedMs':calculateElapsedMs(_0x578627,_0x1af2a9),'jobContextParseWarning':_0xb28224,..._0x3e363e?{'links':_0x3e363e}:{}},'message':_0x105004(0x1be)+_0x329f57};}};function readAccumulatedErrorTypeCounts(_0x5a5b73){const _0x411ed7=a82_0x44a4b9,_0x4586c6=_0x5a5b73?.[_0x411ed7(0x1bb)];if(!_0x4586c6||typeof _0x4586c6!==_0x411ed7(0x1d9)||Array[_0x411ed7(0x1da)](_0x4586c6))return null;if(Object[_0x411ed7(0x1c1)](_0x4586c6)[_0x411ed7(0x1bd)]===0x0)return null;return _0x4586c6;}function a82_0xee1d(_0x4e3d11,_0x21d608){_0x4e3d11=_0x4e3d11-0x1b5;const _0x4751f9=a82_0x4751();let _0xee1da8=_0x4751f9[_0x4e3d11];return _0xee1da8;}function parseJobContext(_0x4cac22){const _0x5a4f67=a82_0x44a4b9;if(!_0x4cac22?.[_0x5a4f67(0x1d5)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x42d57b=JSON['parse'](_0x4cac22);if(_0x42d57b&&typeof _0x42d57b===_0x5a4f67(0x1d9)&&!Array[_0x5a4f67(0x1da)](_0x42d57b))return{'parsedJobContext':_0x42d57b,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':'jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.'};}function calculateElapsedMs(_0x363532,_0x936521){const _0x3aef50=a82_0x44a4b9;if(typeof _0x363532['costTimeMs']==='number'&&Number[_0x3aef50(0x1c4)](_0x363532['costTimeMs'])&&_0x363532[_0x3aef50(0x1d8)]>=0x0)return _0x363532[_0x3aef50(0x1d8)];const _0x18e6f7=toTimestamp(_0x363532['startTime']);if(_0x18e6f7===null)return null;const _0x3a37eb=toTimestamp(_0x363532['endTime']),_0x21cb53=_0x3a37eb??(_0x936521?null:Date[_0x3aef50(0x1cd)]());if(_0x21cb53===null||_0x21cb53<_0x18e6f7)return null;return _0x21cb53-_0x18e6f7;}function toTimestamp(_0x5c9d72){const _0x34d5d9=a82_0x44a4b9;if(typeof _0x5c9d72===_0x34d5d9(0x1d7))return Number[_0x34d5d9(0x1c4)](_0x5c9d72)?_0x5c9d72:null;if(typeof _0x5c9d72!==_0x34d5d9(0x1ca)||_0x5c9d72['trim']()==='')return null;const _0x1eeffa=Number(_0x5c9d72);if(Number['isFinite'](_0x1eeffa))return _0x1eeffa;const _0x4c5524=Date[_0x34d5d9(0x1d0)](_0x5c9d72);return Number['isNaN'](_0x4c5524)?null:_0x4c5524;}
@@ -1 +1 @@
1
- const a83_0x218aa1=a83_0x3af6;(function(_0x191621,_0x301973){const _0x19e532=a83_0x3af6,_0x16b697=_0x191621();while(!![]){try{const _0x374ce8=-parseInt(_0x19e532(0x92))/0x1*(-parseInt(_0x19e532(0xb2))/0x2)+-parseInt(_0x19e532(0xb0))/0x3*(parseInt(_0x19e532(0xae))/0x4)+parseInt(_0x19e532(0x95))/0x5*(parseInt(_0x19e532(0x8a))/0x6)+-parseInt(_0x19e532(0xb4))/0x7+-parseInt(_0x19e532(0x99))/0x8+parseInt(_0x19e532(0x96))/0x9+parseInt(_0x19e532(0xb1))/0xa*(parseInt(_0x19e532(0xb3))/0xb);if(_0x374ce8===_0x301973)break;else _0x16b697['push'](_0x16b697['shift']());}catch(_0x34a2b1){_0x16b697['push'](_0x16b697['shift']());}}}(a83_0x5d54,0x7ef8e));function a83_0x5d54(){const _0x418956=['Host\x20and\x20port:\x20host:port','dburl','No\x20follow-up\x20analysis','autostart','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Database\x20password','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','validation','boolean','After\x20create,\x20start\x20schema\x20analysis','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','468932OMIdlj','dbname','3UtIKyc','375710TNHREe','7906jafkXO','286SbLEJz','6284782nhZCKn','bool','/smartapi/dblink/create','join','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','trim','dbparam','Database\x20username','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','3616254PThUzR','Created\x20db\x20link\x20','password','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','Extra\x20JDBC-style\x20connection\x20parameters\x20string','Create\x20dblink','string','databasePage','5lkjSIE','dbversion','dbtype','5uzMScA','5756445vAWSow','message','\x20and\x20started\x20analysis','5630304PXihVo','appCode','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','dbdesc','str','username','POST','create','8.0','planId'];a83_0x5d54=function(){return _0x418956;};return a83_0x5d54();}import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a83_0x3af6(_0x5c01bf,_0x2fc4ac){_0x5c01bf=_0x5c01bf-0x85;const _0x5d5473=a83_0x5d54();let _0x3af631=_0x5d5473[_0x5c01bf];return _0x3af631;}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a83_0x218aa1(0xa0),'description':a83_0x218aa1(0xad),'risk':'write','flags':[APPCODE_FLAG_OPTIONAL,{'name':a83_0x218aa1(0xaf),'type':a83_0x218aa1(0x90),'required':!![],'description':a83_0x218aa1(0xa7)},DB_TYPE_FLAG,{'name':a83_0x218aa1(0x93),'type':a83_0x218aa1(0x90),'description':a83_0x218aa1(0x8d),'default':a83_0x218aa1(0xa1)},{'name':a83_0x218aa1(0xa4),'type':'string','required':!![],'description':a83_0x218aa1(0xa3)},{'name':'username','type':a83_0x218aa1(0x90),'required':!![],'description':a83_0x218aa1(0x88)},{'name':a83_0x218aa1(0x8c),'type':a83_0x218aa1(0x90),'required':!![],'description':a83_0x218aa1(0xa8)},{'name':a83_0x218aa1(0x87),'type':a83_0x218aa1(0x90),'description':a83_0x218aa1(0x8e)},{'name':'dbdesc','type':a83_0x218aa1(0x90),'description':'Human-readable\x20description'},{'name':a83_0x218aa1(0xa6),'type':a83_0x218aa1(0xab),'description':a83_0x218aa1(0xac),'default':![]}],async 'validate'(_0x52d954){const _0x540890=a83_0x218aa1,_0x43c792=_0x52d954['str'](_0x540890(0xa4))[_0x540890(0x86)]();if(!validateDbUrl(_0x43c792))throw CliErrors[_0x540890(0xaa)](_0x540890(0x9b)+_0x43c792+'\x22',_0x540890(0x89));},async 'dryRun'(_0xa917b6){const _0x2c7918=a83_0x218aa1,_0x12a220={'appCode':_0xa917b6[_0x2c7918(0x9a)],'dbName':_0xa917b6[_0x2c7918(0x9d)](_0x2c7918(0xaf)),'dbType':_0xa917b6[_0x2c7918(0x9d)](_0x2c7918(0x94)),'dbVersion':_0xa917b6[_0x2c7918(0x9d)]('dbversion')||_0x2c7918(0xa1),'dbUrl':_0xa917b6['str'](_0x2c7918(0xa4))['trim'](),'username':_0xa917b6[_0x2c7918(0x9d)](_0x2c7918(0x9e)),'password':'[redacted]',..._0xa917b6[_0x2c7918(0x9d)]('dbparam')?{'dbParam':_0xa917b6[_0x2c7918(0x9d)](_0x2c7918(0x87))}:{},..._0xa917b6[_0x2c7918(0x9d)](_0x2c7918(0x9c))?{'dbDesc':_0xa917b6['str']('dbdesc')}:{}};return{'method':_0x2c7918(0x9f),'url':_0x2c7918(0xb6),'body':_0x12a220,'description':[_0x2c7918(0x8f),_0xa917b6[_0x2c7918(0xb5)](_0x2c7918(0xa6))?_0x2c7918(0xa9):_0x2c7918(0xa5)][_0x2c7918(0xb7)]('\x0a')};},async 'execute'(_0x6721d1){const _0xa8753e=a83_0x218aa1,_0x10bd6f={'appCode':_0x6721d1[_0xa8753e(0x9a)],'dbName':_0x6721d1[_0xa8753e(0x9d)](_0xa8753e(0xaf)),'dbType':_0x6721d1[_0xa8753e(0x9d)](_0xa8753e(0x94)),'dbVersion':_0x6721d1[_0xa8753e(0x9d)](_0xa8753e(0x93))||'8.0','dbUrl':_0x6721d1[_0xa8753e(0x9d)]('dburl')[_0xa8753e(0x86)](),'username':_0x6721d1[_0xa8753e(0x9d)](_0xa8753e(0x9e)),'password':_0x6721d1[_0xa8753e(0x9d)](_0xa8753e(0x8c)),..._0x6721d1[_0xa8753e(0x9d)](_0xa8753e(0x87))?{'dbParam':_0x6721d1[_0xa8753e(0x9d)]('dbparam')}:{},..._0x6721d1[_0xa8753e(0x9d)](_0xa8753e(0x9c))?{'dbDesc':_0x6721d1[_0xa8753e(0x9d)](_0xa8753e(0x9c))}:{}},{id:_0x12d6b5,entity:_0xea5660}=normalizeEntityWithIdResponse(await createDbLink(_0x10bd6f));if(!_0x12d6b5)return{'ok':![],'message':_0xa8753e(0x85),'data':sanitizeDbLinkForOutput(_0xea5660)};let _0x319e98,_0x97b393;if(_0x6721d1[_0xa8753e(0xb5)](_0xa8753e(0xa6)))try{_0x319e98=(await startDbAnalysis(_0x12d6b5))[_0xa8753e(0xa2)];}catch(_0x438ae3){_0x97b393=_0x438ae3 instanceof Error?_0x438ae3[_0xa8753e(0x97)]:String(_0x438ae3);}const _0x265bc9=buildDbPageLinks(_0x6721d1['appCode'],_0x12d6b5),_0x4d09e5={'connection':sanitizeDbLinkForOutput(_0xea5660),..._0x265bc9?{'links':{'databasePage':_0x265bc9[_0xa8753e(0x91)]}}:{},..._0x319e98?{'analysisPlanId':_0x319e98}:{},..._0x97b393?{'analysisStartWarning':_0x97b393}:{}};let _0x4332fb;return _0x6721d1[_0xa8753e(0xb5)](_0xa8753e(0xa6))?_0x97b393?_0x4332fb=_0xa8753e(0x8b)+_0x12d6b5+';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning':_0x4332fb='Created\x20db\x20link\x20'+_0x12d6b5+_0xa8753e(0x98):_0x4332fb='Created\x20db\x20link\x20'+_0x12d6b5,{'ok':!![],'data':_0x4d09e5,'message':_0x4332fb};}};
1
+ const a83_0x4026e4=a83_0x57ab;(function(_0x256219,_0x3c94b1){const _0x28dc44=a83_0x57ab,_0x598c3a=_0x256219();while(!![]){try{const _0x2a97ff=parseInt(_0x28dc44(0x1bb))/0x1*(-parseInt(_0x28dc44(0x1d6))/0x2)+parseInt(_0x28dc44(0x1d0))/0x3*(-parseInt(_0x28dc44(0x1de))/0x4)+-parseInt(_0x28dc44(0x1dc))/0x5*(-parseInt(_0x28dc44(0x1dd))/0x6)+-parseInt(_0x28dc44(0x1b7))/0x7+parseInt(_0x28dc44(0x1d5))/0x8+-parseInt(_0x28dc44(0x1cb))/0x9+parseInt(_0x28dc44(0x1cc))/0xa*(parseInt(_0x28dc44(0x1ce))/0xb);if(_0x2a97ff===_0x3c94b1)break;else _0x598c3a['push'](_0x598c3a['shift']());}catch(_0x4182f2){_0x598c3a['push'](_0x598c3a['shift']());}}}(a83_0x1e43,0x4ee0d));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':a83_0x4026e4(0x1db),'description':a83_0x4026e4(0x1c0),'risk':a83_0x4026e4(0x1e5),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a83_0x4026e4(0x1da),'required':!![],'description':a83_0x4026e4(0x1e8)},DB_TYPE_FLAG,{'name':a83_0x4026e4(0x1e2),'type':'string','description':a83_0x4026e4(0x1bf),'default':'8.0'},{'name':'dburl','type':a83_0x4026e4(0x1da),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a83_0x4026e4(0x1c3),'type':a83_0x4026e4(0x1da),'required':!![],'description':a83_0x4026e4(0x1c5)},{'name':a83_0x4026e4(0x1d3),'type':a83_0x4026e4(0x1da),'required':!![],'description':a83_0x4026e4(0x1be)},{'name':a83_0x4026e4(0x1df),'type':a83_0x4026e4(0x1da),'description':a83_0x4026e4(0x1c8)},{'name':'dbdesc','type':a83_0x4026e4(0x1da),'description':'Human-readable\x20description'},{'name':a83_0x4026e4(0x1ca),'type':a83_0x4026e4(0x1c6),'description':a83_0x4026e4(0x1bd),'default':![]}],async 'validate'(_0x368edb){const _0x1d83bb=a83_0x4026e4,_0x504d1e=_0x368edb['str'](_0x1d83bb(0x1d9))[_0x1d83bb(0x1cf)]();if(!validateDbUrl(_0x504d1e))throw CliErrors[_0x1d83bb(0x1e3)](_0x1d83bb(0x1c2)+_0x504d1e+'\x22',_0x1d83bb(0x1bc));},async 'dryRun'(_0x38a795){const _0x59da69=a83_0x4026e4,_0x18bcb2={'appCode':_0x38a795[_0x59da69(0x1e7)],'dbName':_0x38a795[_0x59da69(0x1d8)](_0x59da69(0x1d4)),'dbType':_0x38a795[_0x59da69(0x1d8)]('dbtype'),'dbVersion':_0x38a795[_0x59da69(0x1d8)](_0x59da69(0x1e2))||_0x59da69(0x1cd),'dbUrl':_0x38a795['str'](_0x59da69(0x1d9))[_0x59da69(0x1cf)](),'username':_0x38a795[_0x59da69(0x1d8)](_0x59da69(0x1c3)),'password':_0x59da69(0x1d7),..._0x38a795[_0x59da69(0x1d8)](_0x59da69(0x1df))?{'dbParam':_0x38a795['str'](_0x59da69(0x1df))}:{},..._0x38a795[_0x59da69(0x1d8)]('dbdesc')?{'dbDesc':_0x38a795['str'](_0x59da69(0x1c4))}:{}};return{'method':_0x59da69(0x1e6),'url':'/smartapi/dblink/create','body':_0x18bcb2,'description':[_0x59da69(0x1c7),_0x38a795[_0x59da69(0x1b9)]('autostart')?_0x59da69(0x1b6):_0x59da69(0x1d1)][_0x59da69(0x1e1)]('\x0a')};},async 'execute'(_0x4b6825){const _0x514cc3=a83_0x4026e4,_0x569a52={'appCode':_0x4b6825[_0x514cc3(0x1e7)],'dbName':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1d4)),'dbType':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1e4)),'dbVersion':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1e2))||_0x514cc3(0x1cd),'dbUrl':_0x4b6825['str'](_0x514cc3(0x1d9))['trim'](),'username':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1c3)),'password':_0x4b6825['str'](_0x514cc3(0x1d3)),..._0x4b6825[_0x514cc3(0x1d8)]('dbparam')?{'dbParam':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1df))}:{},..._0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1c4))?{'dbDesc':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1c4))}:{}},{id:_0x477e41,entity:_0x15ba93}=normalizeEntityWithIdResponse(await createDbLink(_0x569a52));if(!_0x477e41)return{'ok':![],'message':_0x514cc3(0x1b8),'data':sanitizeDbLinkForOutput(_0x15ba93)};let _0x79d7bf,_0x938993;if(_0x4b6825[_0x514cc3(0x1b9)](_0x514cc3(0x1ca)))try{_0x79d7bf=(await startDbAnalysis(_0x477e41))[_0x514cc3(0x1e0)];}catch(_0x32cec8){_0x938993=_0x32cec8 instanceof Error?_0x32cec8[_0x514cc3(0x1c1)]:String(_0x32cec8);}const _0x42d148=buildDbPageLinks(_0x4b6825['appCode'],_0x477e41),_0x48aed5={'connection':sanitizeDbLinkForOutput(_0x15ba93),..._0x42d148?{'links':{'databasePage':_0x42d148['databasePage']}}:{},..._0x79d7bf?{'analysisPlanId':_0x79d7bf}:{},..._0x938993?{'analysisStartWarning':_0x938993}:{}};let _0x544134;return _0x4b6825['bool'](_0x514cc3(0x1ca))?_0x938993?_0x544134='Created\x20db\x20link\x20'+_0x477e41+_0x514cc3(0x1c9):_0x544134=_0x514cc3(0x1ba)+_0x477e41+_0x514cc3(0x1d2):_0x544134=_0x514cc3(0x1ba)+_0x477e41,{'ok':!![],'data':_0x48aed5,'message':_0x544134};}};function a83_0x57ab(_0xccccfd,_0x4a7d3a){_0xccccfd=_0xccccfd-0x1b6;const _0x1e4365=a83_0x1e43();let _0x57ab48=_0x1e4365[_0xccccfd];return _0x57ab48;}function a83_0x1e43(){const _0x34330a=['planId','join','dbversion','validation','dbtype','write','POST','appCode','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','2268546QLXyfd','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','bool','Created\x20db\x20link\x20','1tvraje','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','After\x20create,\x20start\x20schema\x20analysis','Database\x20password','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','message','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','username','dbdesc','Database\x20username','boolean','Create\x20dblink','Extra\x20JDBC-style\x20connection\x20parameters\x20string',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','autostart','4152690rTdtJq','50qcpBqQ','8.0','2311727cugEYG','trim','75yzkdfl','No\x20follow-up\x20analysis','\x20and\x20started\x20analysis','password','dbname','1851704FquCeR','1262934WZTdCX','[redacted]','str','dburl','string','create','34495GsAsNC','498AJyMDJ','18372DzknTD','dbparam'];a83_0x1e43=function(){return _0x34330a;};return a83_0x1e43();}
@@ -1 +1 @@
1
- const a84_0x8d095e=a84_0x1c58;(function(_0x5bf573,_0x8bbe80){const _0xf981a5=a84_0x1c58,_0x14db88=_0x5bf573();while(!![]){try{const _0x2e4176=-parseInt(_0xf981a5(0x182))/0x1+-parseInt(_0xf981a5(0x18e))/0x2+parseInt(_0xf981a5(0x184))/0x3+-parseInt(_0xf981a5(0x18b))/0x4*(-parseInt(_0xf981a5(0x181))/0x5)+parseInt(_0xf981a5(0x189))/0x6*(-parseInt(_0xf981a5(0x185))/0x7)+parseInt(_0xf981a5(0x18d))/0x8*(-parseInt(_0xf981a5(0x183))/0x9)+parseInt(_0xf981a5(0x18a))/0xa;if(_0x2e4176===_0x8bbe80)break;else _0x14db88['push'](_0x14db88['shift']());}catch(_0x2db47b){_0x14db88['push'](_0x14db88['shift']());}}}(a84_0x3dd2,0x7add5));import{deleteDbLink}from'../../core/api-client.js';function a84_0x3dd2(){const _0x24884a=['294277eZbwOs','27mzBseT','445980nvODCu','280qlehBG','num','high-risk-write','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','69390mFlfAs','4542980INEavk','4RNXBUB','Deleted\x20db\x20link\x20','418408dFrGMd','145892hbjwUl','delete','4435105YNhWwx'];a84_0x3dd2=function(){return _0x24884a;};return a84_0x3dd2();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a84_0x1c58(_0x24a04a,_0x6ae164){_0x24a04a=_0x24a04a-0x180;const _0x3dd22c=a84_0x3dd2();let _0x1c5817=_0x3dd22c[_0x24a04a];return _0x1c5817;}export const dbDelete={'service':'db','command':a84_0x8d095e(0x180),'description':a84_0x8d095e(0x188),'risk':a84_0x8d095e(0x187),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5db044){const _0x5dbc3d=a84_0x8d095e,_0x2a798c=_0x5db044[_0x5dbc3d(0x186)]('id');return await deleteDbLink(_0x2a798c),{'ok':!![],'data':{'id':_0x2a798c,'deleted':!![]},'message':_0x5dbc3d(0x18c)+_0x2a798c};}};
1
+ const a84_0x379563=a84_0x2755;(function(_0x385503,_0x521c99){const _0x4b0ea3=a84_0x2755,_0xac302d=_0x385503();while(!![]){try{const _0x133c97=parseInt(_0x4b0ea3(0x1a6))/0x1*(parseInt(_0x4b0ea3(0x199))/0x2)+parseInt(_0x4b0ea3(0x19d))/0x3*(parseInt(_0x4b0ea3(0x19e))/0x4)+-parseInt(_0x4b0ea3(0x1a0))/0x5+-parseInt(_0x4b0ea3(0x19c))/0x6*(parseInt(_0x4b0ea3(0x1a3))/0x7)+-parseInt(_0x4b0ea3(0x1a1))/0x8+-parseInt(_0x4b0ea3(0x1a7))/0x9+parseInt(_0x4b0ea3(0x19b))/0xa*(parseInt(_0x4b0ea3(0x19a))/0xb);if(_0x133c97===_0x521c99)break;else _0xac302d['push'](_0xac302d['shift']());}catch(_0x331714){_0xac302d['push'](_0xac302d['shift']());}}}(a84_0x3144,0x8820a));import{deleteDbLink}from'../../core/api-client.js';function a84_0x2755(_0x599f0d,_0x2a76fa){_0x599f0d=_0x599f0d-0x199;const _0x3144a8=a84_0x3144();let _0x27556d=_0x3144a8[_0x599f0d];return _0x27556d;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a84_0x3144(){const _0x1fc0e3=['8427816LRlWRC','Deleted\x20db\x20link\x20','2179086KFmLAX','delete','high-risk-write','1693EAsAoQ','6791418FJLMcD','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','914eubPxP','583EjkVwU','398710jGqPJZ','6DIzkHL','131052bQNdEz','28HhkQSY','num','2578485bQSWIB'];a84_0x3144=function(){return _0x1fc0e3;};return a84_0x3144();}export const dbDelete={'service':'db','command':a84_0x379563(0x1a4),'description':a84_0x379563(0x1a8),'risk':a84_0x379563(0x1a5),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3a072e){const _0x2b86bb=a84_0x379563,_0xb0f9f1=_0x3a072e[_0x2b86bb(0x19f)]('id');return await deleteDbLink(_0xb0f9f1),{'ok':!![],'data':{'id':_0xb0f9f1,'deleted':!![]},'message':_0x2b86bb(0x1a2)+_0xb0f9f1};}};
@@ -1 +1 @@
1
- const a85_0x371cf7=a85_0x428b;(function(_0x151646,_0x1155fb){const _0x393581=a85_0x428b,_0x22d252=_0x151646();while(!![]){try{const _0x322c52=-parseInt(_0x393581(0x11e))/0x1*(parseInt(_0x393581(0x118))/0x2)+-parseInt(_0x393581(0x11b))/0x3+-parseInt(_0x393581(0x11a))/0x4*(parseInt(_0x393581(0x114))/0x5)+-parseInt(_0x393581(0x11d))/0x6+parseInt(_0x393581(0x11f))/0x7+-parseInt(_0x393581(0x112))/0x8+parseInt(_0x393581(0x119))/0x9;if(_0x322c52===_0x1155fb)break;else _0x22d252['push'](_0x22d252['shift']());}catch(_0x1c1ecf){_0x22d252['push'](_0x22d252['shift']());}}}(a85_0x2f4e,0xcd4ac));function a85_0x428b(_0x6c44d8,_0x451127){_0x6c44d8=_0x6c44d8-0x112;const _0x2f4ee7=a85_0x2f4e();let _0x428bda=_0x2f4ee7[_0x6c44d8];return _0x428bda;}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 a85_0x2f4e(){const _0xd0ce08=['2898674wtiNhb','53842833yBLxYL','11100vqWUFY','482805ZWvXik','detail','7810884UkFtZN','1sMAEuD','2021964ESBqDp','8359216tKSoLY','read','2655QSUqVJ','num','db\x20link\x20','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)'];a85_0x2f4e=function(){return _0xd0ce08;};return a85_0x2f4e();}export const dbDetail={'service':'db','command':a85_0x371cf7(0x11c),'description':a85_0x371cf7(0x117),'risk':a85_0x371cf7(0x113),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4bd2bf){const _0x4e7de6=a85_0x371cf7,_0x512808=_0x4bd2bf[_0x4e7de6(0x115)]('id'),_0x1a0bd3=await getDbLinkInfo(_0x512808);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x1a0bd3),'message':_0x4e7de6(0x116)+_0x512808+':\x20'+_0x1a0bd3['dbName']};}};
1
+ function a85_0x185f(){const _0x3c1385=['1534656DKebzd','52dvboYs','10928ClcrAn','2lRihcA','896cRuenE','detail','53537pRESUL','read','455962lUTHaw','7545096VpgjFa','dbName','db\x20link\x20','2640CKWyEO','2908080txFyge','314795tGDjFq'];a85_0x185f=function(){return _0x3c1385;};return a85_0x185f();}const a85_0x153d91=a85_0x464b;(function(_0xb40e8b,_0x4e02d7){const _0x10410d=a85_0x464b,_0x3929f7=_0xb40e8b();while(!![]){try{const _0x3dd2bd=-parseInt(_0x10410d(0xdc))/0x1*(parseInt(_0x10410d(0xe1))/0x2)+parseInt(_0x10410d(0xd9))/0x3+-parseInt(_0x10410d(0xda))/0x4*(-parseInt(_0x10410d(0xd8))/0x5)+parseInt(_0x10410d(0xe2))/0x6+-parseInt(_0x10410d(0xdd))/0x7*(-parseInt(_0x10410d(0xdb))/0x8)+-parseInt(_0x10410d(0xd7))/0x9+parseInt(_0x10410d(0xe5))/0xa*(-parseInt(_0x10410d(0xdf))/0xb);if(_0x3dd2bd===_0x4e02d7)break;else _0x3929f7['push'](_0x3929f7['shift']());}catch(_0x502f4b){_0x3929f7['push'](_0x3929f7['shift']());}}}(a85_0x185f,0xaa82d));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a85_0x464b(_0x267149,_0x52b9eb){_0x267149=_0x267149-0xd7;const _0x185f89=a85_0x185f();let _0x464b9b=_0x185f89[_0x267149];return _0x464b9b;}import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a85_0x153d91(0xde),'description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':a85_0x153d91(0xe0),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1164aa){const _0x36d24d=a85_0x153d91,_0x318b35=_0x1164aa['num']('id'),_0x272eb9=await getDbLinkInfo(_0x318b35);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x272eb9),'message':_0x36d24d(0xe4)+_0x318b35+':\x20'+_0x272eb9[_0x36d24d(0xe3)]};}};
@@ -1 +1 @@
1
- const a86_0x1ce5d2=a86_0x5e4b;(function(_0x76ae82,_0x437c09){const _0x4acfc0=a86_0x5e4b,_0x526223=_0x76ae82();while(!![]){try{const _0x4bee11=parseInt(_0x4acfc0(0x1ba))/0x1+parseInt(_0x4acfc0(0x1a7))/0x2*(-parseInt(_0x4acfc0(0x18b))/0x3)+parseInt(_0x4acfc0(0x1a9))/0x4*(parseInt(_0x4acfc0(0x188))/0x5)+parseInt(_0x4acfc0(0x1a4))/0x6*(parseInt(_0x4acfc0(0x192))/0x7)+parseInt(_0x4acfc0(0x189))/0x8*(-parseInt(_0x4acfc0(0x1a0))/0x9)+-parseInt(_0x4acfc0(0x187))/0xa*(-parseInt(_0x4acfc0(0x1b1))/0xb)+parseInt(_0x4acfc0(0x185))/0xc*(-parseInt(_0x4acfc0(0x199))/0xd);if(_0x4bee11===_0x437c09)break;else _0x526223['push'](_0x526223['shift']());}catch(_0x20f26b){_0x526223['push'](_0x526223['shift']());}}}(a86_0x2690,0x2c156));import{getDbTableDiff}from'../../core/api-client.js';function a86_0x5e4b(_0x6c67b0,_0x3c8ff5){_0x6c67b0=_0x6c67b0-0x183;const _0x26908f=a86_0x2690();let _0x5e4bf3=_0x26908f[_0x6c67b0];return _0x5e4bf3;}function a86_0x2690(){const _0x10b454=['modifiedColumns','summary','\x20(db\x20link\x20','1417EQIdma','\x20row(s),\x20total\x20','ALREADY_ANALYZED','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','str','addedColumns','datasetTableCount','396efPAvm','table','fieldDiff','pagesize','159774WCCptP','size','boolean','11314DnUino','length','765796TYMkjO','filter','validation','physicalTableCount','tableList','read','MODIFIED_TABLE','DELETED_TABLE','281798OyJWMR','all','tableName','set','num','\x20row(s).','totalCount','NEW_TABLE','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','309685BeNSRz','Page\x20size','fromEntries','map','bool','39108mPYqjR','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','100VhAKnw','5tfxphE','52392UGDSZY','values','120NsYgKu','page','\x20of\x20','deletedColumns','changed-only','number','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','77pXYUGg','appCode','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','diffType'];a86_0x2690=function(){return _0x10b454;};return a86_0x2690();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=['NEW_TABLE',a86_0x1ce5d2(0x1af),a86_0x1ce5d2(0x1b0),a86_0x1ce5d2(0x19b)];export const dbDiff={'service':'db','command':'diff','description':a86_0x1ce5d2(0x186),'risk':a86_0x1ce5d2(0x1ae),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x1ce5d2(0x1a1),'type':'string','description':a86_0x1ce5d2(0x194)},{'name':a86_0x1ce5d2(0x18c),'type':a86_0x1ce5d2(0x190),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a86_0x1ce5d2(0x1a3),'type':'number','description':a86_0x1ce5d2(0x1bb),'default':0x14},{'name':a86_0x1ce5d2(0x1b2),'type':a86_0x1ce5d2(0x1a6),'description':a86_0x1ce5d2(0x191)},{'name':a86_0x1ce5d2(0x18f),'type':a86_0x1ce5d2(0x1a6),'description':a86_0x1ce5d2(0x1b9)}],async 'execute'(_0x1e44b5){const _0x459f8c=a86_0x1ce5d2,_0x3f15ed=_0x1e44b5[_0x459f8c(0x1b5)]('id'),_0x40c2a8=_0x1e44b5[_0x459f8c(0x184)]('all'),_0x196592=_0x1e44b5[_0x459f8c(0x184)](_0x459f8c(0x18f)),_0x199f11=_0x40c2a8?0x1:_0x1e44b5[_0x459f8c(0x1b5)](_0x459f8c(0x18c),0x1)||0x1,_0x18aa08=_0x40c2a8?ALL_PAGE_SIZE:_0x1e44b5['num'](_0x459f8c(0x1a3),0x14)||0x14,_0x585d07=_0x1e44b5[_0x459f8c(0x19d)](_0x459f8c(0x1a1))||undefined,_0x401ce7=_0x40c2a8?await getAllDbTableDiff(_0x1e44b5[_0x459f8c(0x193)],_0x3f15ed,_0x585d07):await getDbTableDiff(_0x1e44b5[_0x459f8c(0x193)],_0x3f15ed,{'pageIndex':_0x199f11,'pageSize':_0x18aa08,'tableName':_0x585d07}),_0x452711=_0x401ce7[_0x459f8c(0x1ad)],_0x349f5b=_0x196592?_0x452711['filter'](_0xbd8be2=>_0xbd8be2['diffType']!==_0x459f8c(0x19b)):_0x452711,_0x3d479c=Object[_0x459f8c(0x1bc)](DIFF_TYPES[_0x459f8c(0x183)](_0x151120=>[_0x151120,_0x452711[_0x459f8c(0x1aa)](_0x588362=>_0x588362[_0x459f8c(0x195)]===_0x151120)[_0x459f8c(0x1a8)]])),_0x299b56=_0x452711[_0x459f8c(0x1aa)](_0x425a51=>_0x425a51[_0x459f8c(0x195)]===_0x459f8c(0x1b8)||_0x425a51['diffType']===_0x459f8c(0x1af))[_0x459f8c(0x183)](_0x18a426=>_0x18a426[_0x459f8c(0x1b3)]),_0x51ae62=_0x452711[_0x459f8c(0x1aa)](_0x3ae4b1=>_0x3ae4b1['diffType']==='DELETED_TABLE')[_0x459f8c(0x183)](_0x4cc09a=>_0x4cc09a[_0x459f8c(0x1b3)]),_0x100b63=_0x452711[_0x459f8c(0x1aa)](_0x5de333=>_0x5de333[_0x459f8c(0x195)]===_0x459f8c(0x1af))[_0x459f8c(0x183)](_0x226c79=>({'tableName':_0x226c79[_0x459f8c(0x1b3)],'addedColumns':_0x226c79[_0x459f8c(0x1a2)]?.[_0x459f8c(0x19e)]??[],'deletedColumns':_0x226c79[_0x459f8c(0x1a2)]?.[_0x459f8c(0x18e)]??[],'modifiedColumns':_0x226c79[_0x459f8c(0x1a2)]?.[_0x459f8c(0x196)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x3f15ed,'page':_0x199f11,'pageSize':_0x18aa08,'totalCount':_0x401ce7[_0x459f8c(0x1b7)],'physicalTableCount':_0x401ce7[_0x459f8c(0x1ac)],'datasetTableCount':_0x401ce7[_0x459f8c(0x19f)],..._0x401ce7['summary']?{'summary':_0x401ce7[_0x459f8c(0x197)]}:{},'summaryByType':_0x3d479c,'toAnalyzeTables':_0x299b56,'deletedTables':_0x51ae62,'modifiedFieldDiffs':_0x100b63,'tables':_0x349f5b,'tableList':_0x349f5b},'message':_0x349f5b[_0x459f8c(0x1a8)]+_0x459f8c(0x19a)+_0x401ce7[_0x459f8c(0x1b7)]+_0x459f8c(0x198)+_0x3f15ed+')'};}};async function getAllDbTableDiff(_0x35551,_0x4ac73e,_0x498be8){const _0x5138fe=a86_0x1ce5d2,_0x2eb291=new Map();let _0x551b6f=0x1,_0x3f3c4e=null;while(!![]){_0x3f3c4e=await getDbTableDiff(_0x35551,_0x4ac73e,{'pageIndex':_0x551b6f,'pageSize':ALL_PAGE_SIZE,'tableName':_0x498be8});const _0xc0b29=_0x2eb291[_0x5138fe(0x1a5)];for(const _0xc28771 of _0x3f3c4e[_0x5138fe(0x1ad)]){_0x2eb291[_0x5138fe(0x1b4)](_0xc28771[_0x5138fe(0x1b3)],_0xc28771);}if(_0x2eb291[_0x5138fe(0x1a5)]>=_0x3f3c4e[_0x5138fe(0x1b7)])break;if(_0x3f3c4e[_0x5138fe(0x1ad)][_0x5138fe(0x1a8)]===0x0||_0x2eb291[_0x5138fe(0x1a5)]===_0xc0b29)throw CliErrors[_0x5138fe(0x1ab)](_0x5138fe(0x19c)+_0x2eb291[_0x5138fe(0x1a5)]+_0x5138fe(0x18d)+_0x3f3c4e['totalCount']+_0x5138fe(0x1b6));_0x551b6f+=0x1;}return{'totalCount':_0x3f3c4e?.[_0x5138fe(0x1b7)]??0x0,'physicalTableCount':_0x3f3c4e?.['physicalTableCount']??0x0,'datasetTableCount':_0x3f3c4e?.[_0x5138fe(0x19f)]??0x0,..._0x3f3c4e?.['summary']?{'summary':_0x3f3c4e[_0x5138fe(0x197)]}:{},'tableList':[..._0x2eb291[_0x5138fe(0x18a)]()]};}
1
+ const a86_0x38af56=a86_0x216f;(function(_0xd0e044,_0x54734b){const _0x490b69=a86_0x216f,_0x3a9498=_0xd0e044();while(!![]){try{const _0x18a522=parseInt(_0x490b69(0xc3))/0x1*(-parseInt(_0x490b69(0xcc))/0x2)+parseInt(_0x490b69(0xdc))/0x3*(-parseInt(_0x490b69(0xc9))/0x4)+parseInt(_0x490b69(0xc0))/0x5*(parseInt(_0x490b69(0xb5))/0x6)+parseInt(_0x490b69(0xcd))/0x7+-parseInt(_0x490b69(0xc5))/0x8*(parseInt(_0x490b69(0xb6))/0x9)+-parseInt(_0x490b69(0xc1))/0xa+-parseInt(_0x490b69(0xd8))/0xb*(-parseInt(_0x490b69(0xce))/0xc);if(_0x18a522===_0x54734b)break;else _0x3a9498['push'](_0x3a9498['shift']());}catch(_0x34a963){_0x3a9498['push'](_0x3a9498['shift']());}}}(a86_0x2586,0xd5dba));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a86_0x216f(_0x46d4d3,_0x241e05){_0x46d4d3=_0x46d4d3-0xb3;const _0x258672=a86_0x2586();let _0x216f0f=_0x258672[_0x46d4d3];return _0x216f0f;}import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a86_0x38af56(0xdf),a86_0x38af56(0xb8),'DELETED_TABLE','ALREADY_ANALYZED'];function a86_0x2586(){const _0x56009e=['appCode','\x20of\x20','totalCount','size','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','3499495deUdsz','16890350kbAghy','filter','81874pGcyqk','fieldDiff','2787560GcVaXA','string','Page\x20size','deletedColumns','182116lfgVSG','boolean','addedColumns','36EXefNQ','5613923LNZTxR','84XGGboQ','summary','str','tableList','map','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','bool','\x20(db\x20link\x20','tableName','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','5720759ATLkJm','Page\x20index\x20(1-based)','changed-only','\x20row(s).','27oTQYNh','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','NEW_TABLE','DELETED_TABLE','length','diffType','num','read','datasetTableCount','all','fromEntries','physicalTableCount','table','modifiedColumns','number','12mhnnHt','36OiGhGJ','diff','MODIFIED_TABLE','page','pagesize'];a86_0x2586=function(){return _0x56009e;};return a86_0x2586();}export const dbDiff={'service':'db','command':a86_0x38af56(0xb7),'description':a86_0x38af56(0xd7),'risk':a86_0x38af56(0xe4),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x38af56(0xe9),'type':a86_0x38af56(0xc6),'description':a86_0x38af56(0xdd)},{'name':a86_0x38af56(0xb9),'type':a86_0x38af56(0xb4),'description':a86_0x38af56(0xd9),'default':0x1},{'name':a86_0x38af56(0xba),'type':a86_0x38af56(0xb4),'description':a86_0x38af56(0xc7),'default':0x14},{'name':a86_0x38af56(0xe6),'type':'boolean','description':a86_0x38af56(0xbf)},{'name':'changed-only','type':a86_0x38af56(0xca),'description':a86_0x38af56(0xd3)}],async 'execute'(_0x53fbaf){const _0x21a734=a86_0x38af56,_0x34b3df=_0x53fbaf['num']('id'),_0x18ea13=_0x53fbaf[_0x21a734(0xd4)](_0x21a734(0xe6)),_0x3030fc=_0x53fbaf[_0x21a734(0xd4)](_0x21a734(0xda)),_0x596fda=_0x18ea13?0x1:_0x53fbaf[_0x21a734(0xe3)](_0x21a734(0xb9),0x1)||0x1,_0x399266=_0x18ea13?ALL_PAGE_SIZE:_0x53fbaf[_0x21a734(0xe3)](_0x21a734(0xba),0x14)||0x14,_0x2f2c22=_0x53fbaf[_0x21a734(0xd0)](_0x21a734(0xe9))||undefined,_0x2758b9=_0x18ea13?await getAllDbTableDiff(_0x53fbaf[_0x21a734(0xbb)],_0x34b3df,_0x2f2c22):await getDbTableDiff(_0x53fbaf['appCode'],_0x34b3df,{'pageIndex':_0x596fda,'pageSize':_0x399266,'tableName':_0x2f2c22}),_0xfc2f59=_0x2758b9[_0x21a734(0xd1)],_0x5b0b7c=_0x3030fc?_0xfc2f59['filter'](_0x2051c0=>_0x2051c0['diffType']!=='ALREADY_ANALYZED'):_0xfc2f59,_0x267300=Object[_0x21a734(0xe7)](DIFF_TYPES[_0x21a734(0xd2)](_0x4514b3=>[_0x4514b3,_0xfc2f59['filter'](_0x6e729b=>_0x6e729b[_0x21a734(0xe2)]===_0x4514b3)['length']])),_0x949764=_0xfc2f59[_0x21a734(0xc2)](_0x1c8b10=>_0x1c8b10[_0x21a734(0xe2)]===_0x21a734(0xdf)||_0x1c8b10[_0x21a734(0xe2)]===_0x21a734(0xb8))[_0x21a734(0xd2)](_0x32f389=>_0x32f389['tableName']),_0xec2d65=_0xfc2f59['filter'](_0x3a6d35=>_0x3a6d35[_0x21a734(0xe2)]===_0x21a734(0xe0))[_0x21a734(0xd2)](_0x48be2f=>_0x48be2f['tableName']),_0x5b44e1=_0xfc2f59[_0x21a734(0xc2)](_0x51bab6=>_0x51bab6[_0x21a734(0xe2)]===_0x21a734(0xb8))['map'](_0x44fefa=>({'tableName':_0x44fefa[_0x21a734(0xd6)],'addedColumns':_0x44fefa[_0x21a734(0xc4)]?.[_0x21a734(0xcb)]??[],'deletedColumns':_0x44fefa['fieldDiff']?.[_0x21a734(0xc8)]??[],'modifiedColumns':_0x44fefa['fieldDiff']?.[_0x21a734(0xb3)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x34b3df,'page':_0x596fda,'pageSize':_0x399266,'totalCount':_0x2758b9[_0x21a734(0xbd)],'physicalTableCount':_0x2758b9[_0x21a734(0xe8)],'datasetTableCount':_0x2758b9[_0x21a734(0xe5)],..._0x2758b9[_0x21a734(0xcf)]?{'summary':_0x2758b9[_0x21a734(0xcf)]}:{},'summaryByType':_0x267300,'toAnalyzeTables':_0x949764,'deletedTables':_0xec2d65,'modifiedFieldDiffs':_0x5b44e1,'tables':_0x5b0b7c,'tableList':_0x5b0b7c},'message':_0x5b0b7c[_0x21a734(0xe1)]+'\x20row(s),\x20total\x20'+_0x2758b9['totalCount']+_0x21a734(0xd5)+_0x34b3df+')'};}};async function getAllDbTableDiff(_0x2937b6,_0x5470b3,_0x45c96c){const _0x2b806c=a86_0x38af56,_0x1ffa6f=new Map();let _0x5dd0c7=0x1,_0x1b81b2=null;while(!![]){_0x1b81b2=await getDbTableDiff(_0x2937b6,_0x5470b3,{'pageIndex':_0x5dd0c7,'pageSize':ALL_PAGE_SIZE,'tableName':_0x45c96c});const _0x535461=_0x1ffa6f['size'];for(const _0x59a164 of _0x1b81b2['tableList']){_0x1ffa6f['set'](_0x59a164[_0x2b806c(0xd6)],_0x59a164);}if(_0x1ffa6f[_0x2b806c(0xbe)]>=_0x1b81b2['totalCount'])break;if(_0x1b81b2[_0x2b806c(0xd1)][_0x2b806c(0xe1)]===0x0||_0x1ffa6f[_0x2b806c(0xbe)]===_0x535461)throw CliErrors['validation'](_0x2b806c(0xde)+_0x1ffa6f[_0x2b806c(0xbe)]+_0x2b806c(0xbc)+_0x1b81b2[_0x2b806c(0xbd)]+_0x2b806c(0xdb));_0x5dd0c7+=0x1;}return{'totalCount':_0x1b81b2?.[_0x2b806c(0xbd)]??0x0,'physicalTableCount':_0x1b81b2?.[_0x2b806c(0xe8)]??0x0,'datasetTableCount':_0x1b81b2?.[_0x2b806c(0xe5)]??0x0,..._0x1b81b2?.[_0x2b806c(0xcf)]?{'summary':_0x1b81b2['summary']}:{},'tableList':[..._0x1ffa6f['values']()]};}
@@ -1 +1 @@
1
- (function(_0x81b214,_0x2b9787){const _0x1a56a2=a87_0x1f40,_0x542936=_0x81b214();while(!![]){try{const _0x2fbcb2=-parseInt(_0x1a56a2(0xae))/0x1*(parseInt(_0x1a56a2(0xa7))/0x2)+-parseInt(_0x1a56a2(0xa6))/0x3*(-parseInt(_0x1a56a2(0xa9))/0x4)+-parseInt(_0x1a56a2(0xaf))/0x5*(parseInt(_0x1a56a2(0xaa))/0x6)+parseInt(_0x1a56a2(0xa8))/0x7+parseInt(_0x1a56a2(0xad))/0x8*(-parseInt(_0x1a56a2(0xac))/0x9)+parseInt(_0x1a56a2(0xab))/0xa+parseInt(_0x1a56a2(0xb0))/0xb;if(_0x2fbcb2===_0x2b9787)break;else _0x542936['push'](_0x542936['shift']());}catch(_0x4a1b76){_0x542936['push'](_0x542936['shift']());}}}(a87_0x5946,0x72589));import{dbList}from'../../commands/db/list.js';function a87_0x1f40(_0x459363,_0x240511){_0x459363=_0x459363-0xa6;const _0x5946bf=a87_0x5946();let _0x1f4001=_0x5946bf[_0x459363];return _0x1f4001;}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';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';function a87_0x5946(){const _0x3b1aac=['3410568sFgURp','2776NRnQxj','752646hhICuU','3183230wMawMu','18EbLPKj','2880832rDgoEC','2374IWlxpO','5VsLiqp','6855079dvjzlL','3219ncfcsh','724hkISgF'];a87_0x5946=function(){return _0x3b1aac;};return a87_0x5946();}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(_0x3a9764,_0x5b9c76){const _0x5aa1e2=a87_0x290c,_0x159276=_0x3a9764();while(!![]){try{const _0x3a6e1b=-parseInt(_0x5aa1e2(0x10f))/0x1+-parseInt(_0x5aa1e2(0x107))/0x2+parseInt(_0x5aa1e2(0x106))/0x3*(parseInt(_0x5aa1e2(0x109))/0x4)+-parseInt(_0x5aa1e2(0x10e))/0x5+parseInt(_0x5aa1e2(0x108))/0x6*(-parseInt(_0x5aa1e2(0x10c))/0x7)+-parseInt(_0x5aa1e2(0x10a))/0x8*(parseInt(_0x5aa1e2(0x10d))/0x9)+parseInt(_0x5aa1e2(0x10b))/0xa;if(_0x3a6e1b===_0x5b9c76)break;else _0x159276['push'](_0x159276['shift']());}catch(_0x579e31){_0x159276['push'](_0x159276['shift']());}}}(a87_0x38b7,0x87c8b));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';function a87_0x290c(_0x3adc2c,_0xc103de){_0x3adc2c=_0x3adc2c-0x106;const _0x38b7ae=a87_0x38b7();let _0x290cba=_0x38b7ae[_0x3adc2c];return _0x290cba;}import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';function a87_0x38b7(){const _0x3dae8a=['1233262dLXziq','495834FakicX','4rvvfPu','15480IzdaBx','33934930ECLWAX','77bNqpaL','4581xsQunV','2581660vLVfUJ','856784SRvBjd','3139107hvPnIG'];a87_0x38b7=function(){return _0x3dae8a;};return a87_0x38b7();}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 a88_0xe670de=a88_0x5227;(function(_0x56d9c0,_0x2ca54a){const _0xd76e67=a88_0x5227,_0xbc53d8=_0x56d9c0();while(!![]){try{const _0x43bc53=parseInt(_0xd76e67(0xaf))/0x1+parseInt(_0xd76e67(0xb8))/0x2+-parseInt(_0xd76e67(0xa8))/0x3+parseInt(_0xd76e67(0xb1))/0x4*(-parseInt(_0xd76e67(0xb4))/0x5)+-parseInt(_0xd76e67(0xb5))/0x6*(-parseInt(_0xd76e67(0xb2))/0x7)+-parseInt(_0xd76e67(0xa9))/0x8*(-parseInt(_0xd76e67(0xae))/0x9)+-parseInt(_0xd76e67(0xa5))/0xa;if(_0x43bc53===_0x2ca54a)break;else _0xbc53d8['push'](_0xbc53d8['shift']());}catch(_0x395f31){_0xbc53d8['push'](_0xbc53d8['shift']());}}}(a88_0x154d,0xc1cb3));function a88_0x154d(){const _0x7f897=['5hrRSAe','7251378ftRlxm','pagesize','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','256016dJdIwv','Found\x20','7383570TtGxCe','appCode','length','4525962bKZTVk','575184GRVHiy','page','num','read','\x20database\x20connection(s)','90dxBRgF','1385830EmBnYC','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','1602364hOTCIp','7bwTgEq','number'];a88_0x154d=function(){return _0x7f897;};return a88_0x154d();}import{listDbLinks}from'../../core/api-client.js';function a88_0x5227(_0x3bff9e,_0x21d5b4){_0x3bff9e=_0x3bff9e-0xa4;const _0x154d6c=a88_0x154d();let _0x522701=_0x154d6c[_0x3bff9e];return _0x522701;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':'list','description':a88_0xe670de(0xb7),'risk':a88_0xe670de(0xac),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a88_0xe670de(0xaa),'type':a88_0xe670de(0xb3),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a88_0xe670de(0xb6),'type':a88_0xe670de(0xb3),'description':'Page\x20size','default':0x64}],async 'execute'(_0x456579){const _0x5e32ec=a88_0xe670de,_0x5a260d=_0x456579[_0x5e32ec(0xab)](_0x5e32ec(0xaa),0x1)||0x1,_0x33b63b=_0x456579[_0x5e32ec(0xab)](_0x5e32ec(0xb6),0x64)||0x64,{items:_0x75716c,paging:_0x547a27}=await listDbLinks(_0x456579[_0x5e32ec(0xa6)],{'currentPage':_0x5a260d,'pageSize':_0x33b63b}),_0x4ee5df=sanitizeDbLinkList(_0x75716c),_0x1a74c0=_0x547a27?_0x547a27:{'currentPage':_0x5a260d,'pageSize':_0x33b63b,'rowsOnPage':_0x4ee5df['length'],'totalCount':null,'note':_0x5e32ec(0xb0)};return{'ok':!![],'data':{'connections':_0x4ee5df,'paging':_0x1a74c0},'message':_0x5e32ec(0xa4)+_0x4ee5df[_0x5e32ec(0xa7)]+_0x5e32ec(0xad)};}};
1
+ const a88_0x2164c9=a88_0x55cd;function a88_0x340b(){const _0x2fd00b=['List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','Page\x20index\x20(1-based)','appCode','9lCurfm','11065CUyWaL','num','63hhRRzk','\x20database\x20connection(s)','3DqSBMi','13nSGlaE','read','number','1900484bcfFSl','17045DqXGRR','13895602yvGHKk','22772xeVvNT','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','654XJmyBJ','110qNWxzG','pagesize','2400HWYtwg','899076tkamZw','866950OhyGMD','length','list'];a88_0x340b=function(){return _0x2fd00b;};return a88_0x340b();}(function(_0x5abf00,_0x675e77){const _0xef2108=a88_0x55cd,_0x2fdcab=_0x5abf00();while(!![]){try{const _0x17b200=parseInt(_0xef2108(0x93))/0x1*(parseInt(_0xef2108(0x9c))/0x2)+-parseInt(_0xef2108(0x95))/0x3*(-parseInt(_0xef2108(0x99))/0x4)+parseInt(_0xef2108(0x91))/0x5*(-parseInt(_0xef2108(0x9e))/0x6)+-parseInt(_0xef2108(0x9a))/0x7*(parseInt(_0xef2108(0xa1))/0x8)+parseInt(_0xef2108(0x90))/0x9*(parseInt(_0xef2108(0xa3))/0xa)+-parseInt(_0xef2108(0x9f))/0xb*(parseInt(_0xef2108(0xa2))/0xc)+parseInt(_0xef2108(0x96))/0xd*(parseInt(_0xef2108(0x9b))/0xe);if(_0x17b200===_0x675e77)break;else _0x2fdcab['push'](_0x2fdcab['shift']());}catch(_0x1db71b){_0x2fdcab['push'](_0x2fdcab['shift']());}}}(a88_0x340b,0x8674a));function a88_0x55cd(_0x5edd58,_0x55221f){_0x5edd58=_0x5edd58-0x8c;const _0x340b0b=a88_0x340b();let _0x55cd3b=_0x340b0b[_0x5edd58];return _0x55cd3b;}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':a88_0x2164c9(0x8c),'description':a88_0x2164c9(0x8d),'risk':a88_0x2164c9(0x97),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':a88_0x2164c9(0x98),'description':a88_0x2164c9(0x8e),'default':0x1},{'name':a88_0x2164c9(0xa0),'type':'number','description':'Page\x20size','default':0x64}],async 'execute'(_0xb2afe8){const _0x32e8a4=a88_0x2164c9,_0x1ef495=_0xb2afe8[_0x32e8a4(0x92)]('page',0x1)||0x1,_0x4dbf2a=_0xb2afe8[_0x32e8a4(0x92)](_0x32e8a4(0xa0),0x64)||0x64,{items:_0x147595,paging:_0x69fc97}=await listDbLinks(_0xb2afe8[_0x32e8a4(0x8f)],{'currentPage':_0x1ef495,'pageSize':_0x4dbf2a}),_0x5460ed=sanitizeDbLinkList(_0x147595),_0x2e8bd2=_0x69fc97?_0x69fc97:{'currentPage':_0x1ef495,'pageSize':_0x4dbf2a,'rowsOnPage':_0x5460ed['length'],'totalCount':null,'note':_0x32e8a4(0x9d)};return{'ok':!![],'data':{'connections':_0x5460ed,'paging':_0x2e8bd2},'message':'Found\x20'+_0x5460ed[_0x32e8a4(0xa4)]+_0x32e8a4(0x94)};}};
@@ -1 +1 @@
1
- (function(_0x55d824,_0x24dc26){const _0x11282d=a89_0x1330,_0x5babb6=_0x55d824();while(!![]){try{const _0x5a3c39=parseInt(_0x11282d(0xd2))/0x1*(-parseInt(_0x11282d(0xcc))/0x2)+-parseInt(_0x11282d(0xd3))/0x3+-parseInt(_0x11282d(0xd0))/0x4+-parseInt(_0x11282d(0xe0))/0x5+parseInt(_0x11282d(0xd8))/0x6+parseInt(_0x11282d(0xdc))/0x7*(-parseInt(_0x11282d(0xdd))/0x8)+parseInt(_0x11282d(0xda))/0x9;if(_0x5a3c39===_0x24dc26)break;else _0x5babb6['push'](_0x5babb6['shift']());}catch(_0x5694c3){_0x5babb6['push'](_0x5babb6['shift']());}}}(a89_0x28fb,0x26964));function a89_0x28fb(){const _0xa7b1f3=['token','credential','756735xkVDRY','dbpassword','password','length','connectionstring','6sifuMo','/data/er?dbId=','privatekey','secret','1002228WLjcXU','accesskey','76054hzlfHr','915690FuiEzr','isFinite','includes','/data/database','[redacted]','1604136ZvrNLG','authorization','9087192UKeYBy','jdbcurl','428624BxIDTv','24PJPXOT'];a89_0x28fb=function(){return _0xa7b1f3;};return a89_0x28fb();}import{getAppBaseUrl}from'../../constant/domain.js';function a89_0x1330(_0x5d9cb8,_0x3fabb3){_0x5d9cb8=_0x5d9cb8-0xc8;const _0x28fbec=a89_0x28fb();let _0x13302d=_0x28fbec[_0x5d9cb8];return _0x13302d;}function shouldRedactKey(_0x19d835){const _0x37ff6d=a89_0x1330,_0x31e26b=_0x19d835['toLowerCase']();if(_0x31e26b===_0x37ff6d(0xc9)||_0x31e26b==='passwd'||_0x31e26b===_0x37ff6d(0xc8))return!![];if(_0x31e26b[_0x37ff6d(0xd5)](_0x37ff6d(0xcf))||_0x31e26b['includes'](_0x37ff6d(0xde))||_0x31e26b[_0x37ff6d(0xd5)](_0x37ff6d(0xdf)))return!![];if(_0x31e26b['includes'](_0x37ff6d(0xce))||_0x31e26b[_0x37ff6d(0xd5)](_0x37ff6d(0xd1)))return!![];if(_0x31e26b===_0x37ff6d(0xd9)||_0x31e26b===_0x37ff6d(0xcb)||_0x31e26b===_0x37ff6d(0xdb))return!![];return![];}export function sanitizeDbLinkForOutput(_0x39733f){const _0x4cba69=a89_0x1330,_0x42adf9={..._0x39733f};for(const _0x26bad6 of Object['keys'](_0x42adf9)){if(!shouldRedactKey(_0x26bad6))continue;const _0x389b19=_0x42adf9[_0x26bad6];_0x389b19!=null&&String(_0x389b19)[_0x4cba69(0xca)]>0x0&&(_0x42adf9[_0x26bad6]=_0x4cba69(0xd7));}return _0x42adf9;}export function sanitizeDbLinkList(_0x657ebd){return _0x657ebd['map'](_0x25a829=>sanitizeDbLinkForOutput(_0x25a829));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x4991c0){const _0x389a1f=_0x4991c0['trim']();if(!_0x389a1f)return![];return DB_URL_PATTERN['test'](_0x389a1f);}export function buildDbPageLinks(_0x2ec02e,_0x1c9599){const _0x46cdd4=a89_0x1330,_0x33df34=_0x2ec02e?.['trim']();if(!_0x33df34)return undefined;const _0x3329b5=typeof _0x1c9599==='number'?String(_0x1c9599):String(_0x1c9599??'')['trim']();if(!_0x3329b5)return undefined;const _0x447a32=Number(_0x3329b5);if(!Number[_0x46cdd4(0xd4)](_0x447a32)||_0x447a32<=0x0)return undefined;const _0x84fd9b=getAppBaseUrl(_0x33df34),_0x5bb17=encodeURIComponent(String(_0x447a32));return{'databasePage':_0x84fd9b+_0x46cdd4(0xd6),'erPage':_0x84fd9b+_0x46cdd4(0xcd)+_0x5bb17};}
1
+ function a89_0x3778(){const _0x3d1c67=['token','passwd','connectionstring','18194FTOaJD','34eCUhax','2490191uhHNWD','dbpassword','4014162houtQz','50SHIEON','credential','map','authorization','keys','toLowerCase','6551910XBIhMB','/data/er?dbId=','number','16bimUez','/data/database','includes','8571976HNtPqo','secret','accesskey','length','7DsKoDP','privatekey','35418qNvcVT','552785uyDYPn','trim'];a89_0x3778=function(){return _0x3d1c67;};return a89_0x3778();}(function(_0x4431c3,_0x331f67){const _0x30884c=a89_0x21e2,_0x5bf5db=_0x4431c3();while(!![]){try{const _0x566ebe=-parseInt(_0x30884c(0x1bd))/0x1*(parseInt(_0x30884c(0x1be))/0x2)+-parseInt(_0x30884c(0x1b7))/0x3+-parseInt(_0x30884c(0x1ae))/0x4*(parseInt(_0x30884c(0x1b8))/0x5)+parseInt(_0x30884c(0x1c1))/0x6*(parseInt(_0x30884c(0x1b5))/0x7)+parseInt(_0x30884c(0x1b1))/0x8+parseInt(_0x30884c(0x1ab))/0x9+parseInt(_0x30884c(0x1a5))/0xa*(-parseInt(_0x30884c(0x1bf))/0xb);if(_0x566ebe===_0x331f67)break;else _0x5bf5db['push'](_0x5bf5db['shift']());}catch(_0x256689){_0x5bf5db['push'](_0x5bf5db['shift']());}}}(a89_0x3778,0x8bf5d));function a89_0x21e2(_0x35d8ae,_0x1bd8f5){_0x35d8ae=_0x35d8ae-0x1a5;const _0x37780a=a89_0x3778();let _0x21e2d9=_0x37780a[_0x35d8ae];return _0x21e2d9;}import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0x16896d){const _0x4b2273=a89_0x21e2,_0x2a98c7=_0x16896d[_0x4b2273(0x1aa)]();if(_0x2a98c7==='password'||_0x2a98c7===_0x4b2273(0x1bb)||_0x2a98c7===_0x4b2273(0x1c0))return!![];if(_0x2a98c7['includes'](_0x4b2273(0x1b2))||_0x2a98c7[_0x4b2273(0x1b0)](_0x4b2273(0x1ba))||_0x2a98c7[_0x4b2273(0x1b0)](_0x4b2273(0x1a6)))return!![];if(_0x2a98c7['includes'](_0x4b2273(0x1b6))||_0x2a98c7['includes'](_0x4b2273(0x1b3)))return!![];if(_0x2a98c7===_0x4b2273(0x1a8)||_0x2a98c7===_0x4b2273(0x1bc)||_0x2a98c7==='jdbcurl')return!![];return![];}export function sanitizeDbLinkForOutput(_0x1bd61b){const _0x13d5bd=a89_0x21e2,_0xb6b7cf={..._0x1bd61b};for(const _0x4e9aae of Object[_0x13d5bd(0x1a9)](_0xb6b7cf)){if(!shouldRedactKey(_0x4e9aae))continue;const _0x204a8b=_0xb6b7cf[_0x4e9aae];_0x204a8b!=null&&String(_0x204a8b)[_0x13d5bd(0x1b4)]>0x0&&(_0xb6b7cf[_0x4e9aae]='[redacted]');}return _0xb6b7cf;}export function sanitizeDbLinkList(_0x4eb71d){const _0xb6bfe0=a89_0x21e2;return _0x4eb71d[_0xb6bfe0(0x1a7)](_0x22e0c9=>sanitizeDbLinkForOutput(_0x22e0c9));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x2354db){const _0x404f4d=_0x2354db['trim']();if(!_0x404f4d)return![];return DB_URL_PATTERN['test'](_0x404f4d);}export function buildDbPageLinks(_0x943d33,_0x4dfedf){const _0xe263f7=a89_0x21e2,_0x535e31=_0x943d33?.[_0xe263f7(0x1b9)]();if(!_0x535e31)return undefined;const _0xc32d18=typeof _0x4dfedf===_0xe263f7(0x1ad)?String(_0x4dfedf):String(_0x4dfedf??'')[_0xe263f7(0x1b9)]();if(!_0xc32d18)return undefined;const _0x13294f=Number(_0xc32d18);if(!Number['isFinite'](_0x13294f)||_0x13294f<=0x0)return undefined;const _0x5e5ff6=getAppBaseUrl(_0x535e31),_0x24d1b5=encodeURIComponent(String(_0x13294f));return{'databasePage':_0x5e5ff6+_0xe263f7(0x1af),'erPage':_0x5e5ff6+_0xe263f7(0x1ac)+_0x24d1b5};}
@@ -1 +1 @@
1
- const a90_0xcd39b0=a90_0x5634;(function(_0xec6ece,_0x17de44){const _0x517c47=a90_0x5634,_0x2e084e=_0xec6ece();while(!![]){try{const _0x26ef34=-parseInt(_0x517c47(0xd6))/0x1*(-parseInt(_0x517c47(0xda))/0x2)+parseInt(_0x517c47(0xdc))/0x3+-parseInt(_0x517c47(0xe0))/0x4+-parseInt(_0x517c47(0xd5))/0x5*(parseInt(_0x517c47(0xe2))/0x6)+parseInt(_0x517c47(0xdb))/0x7*(-parseInt(_0x517c47(0xd4))/0x8)+parseInt(_0x517c47(0xd9))/0x9*(-parseInt(_0x517c47(0xdd))/0xa)+parseInt(_0x517c47(0xdf))/0xb;if(_0x26ef34===_0x17de44)break;else _0x2e084e['push'](_0x2e084e['shift']());}catch(_0x4157b6){_0x2e084e['push'](_0x2e084e['shift']());}}}(a90_0x1ffc,0x5a3ef));function a90_0x5634(_0x3fed8c,_0x3d3a50){_0x3fed8c=_0x3fed8c-0xd4;const _0x1ffc3f=a90_0x1ffc();let _0x563470=_0x1ffc3f[_0x3fed8c];return _0x563470;}function a90_0x1ffc(){const _0x54d32b=['396cMgxDz','length','num','5767192TtyWay','10100gomQTG','144513XzrUMs','read','\x20table(s)\x20on\x20db\x20link\x20','54279NZVpsn','4vFQgEl','7lclSsy','1053090xYfaEM','230wlWLBK','tables','9393967LidvIW','525896YUSkAd','appCode'];a90_0x1ffc=function(){return _0x54d32b;};return a90_0x1ffc();}import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a90_0xcd39b0(0xde),'description':'List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','risk':a90_0xcd39b0(0xd7),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1f82af){const _0x2c8f33=a90_0xcd39b0,_0x5003bb=_0x1f82af[_0x2c8f33(0xe4)]('id'),_0x537fed=await getDbAllTableList(_0x1f82af[_0x2c8f33(0xe1)],_0x5003bb);return{'ok':!![],'data':{'dbLinkId':_0x5003bb,'total':_0x537fed[_0x2c8f33(0xe3)],'tables':_0x537fed},'message':_0x537fed[_0x2c8f33(0xe3)]+_0x2c8f33(0xd8)+_0x5003bb};}};
1
+ const a90_0x4e124e=a90_0x385d;(function(_0x506b45,_0x407eaa){const _0xe007d9=a90_0x385d,_0x2fd003=_0x506b45();while(!![]){try{const _0x1879df=-parseInt(_0xe007d9(0x1a2))/0x1+parseInt(_0xe007d9(0x19b))/0x2*(-parseInt(_0xe007d9(0x198))/0x3)+-parseInt(_0xe007d9(0x19a))/0x4*(-parseInt(_0xe007d9(0x19d))/0x5)+-parseInt(_0xe007d9(0x1a5))/0x6*(-parseInt(_0xe007d9(0x19c))/0x7)+-parseInt(_0xe007d9(0x1a1))/0x8*(-parseInt(_0xe007d9(0x1a8))/0x9)+-parseInt(_0xe007d9(0x1a6))/0xa*(parseInt(_0xe007d9(0x1a7))/0xb)+parseInt(_0xe007d9(0x19e))/0xc;if(_0x1879df===_0x407eaa)break;else _0x2fd003['push'](_0x2fd003['shift']());}catch(_0x720927){_0x2fd003['push'](_0x2fd003['shift']());}}}(a90_0x47d1,0x8c3cc));function a90_0x47d1(){const _0x2cc180=['2817896VZZsVa','1116362zxpxaB','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','appCode','1206054LwYoEw','66590jADtLM','561yYvPQO','18qkKzqg','length','38481IKdcIB','num','45584qjNjnS','96aRuZjk','35Gjdocb','290boZpEi','3307104fjqUuR','\x20table(s)\x20on\x20db\x20link\x20','tables'];a90_0x47d1=function(){return _0x2cc180;};return a90_0x47d1();}import{getDbAllTableList}from'../../core/api-client.js';function a90_0x385d(_0x419929,_0x421371){_0x419929=_0x419929-0x198;const _0x47d186=a90_0x47d1();let _0x385d92=_0x47d186[_0x419929];return _0x385d92;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a90_0x4e124e(0x1a0),'description':a90_0x4e124e(0x1a3),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5219f9){const _0x4a29c1=a90_0x4e124e,_0x91e267=_0x5219f9[_0x4a29c1(0x199)]('id'),_0x5244f3=await getDbAllTableList(_0x5219f9[_0x4a29c1(0x1a4)],_0x91e267);return{'ok':!![],'data':{'dbLinkId':_0x91e267,'total':_0x5244f3[_0x4a29c1(0x1a9)],'tables':_0x5244f3},'message':_0x5244f3['length']+_0x4a29c1(0x19f)+_0x91e267};}};
@@ -1 +1 @@
1
- const a91_0x346d98=a91_0x41dc;(function(_0x5c6211,_0x1cdfb8){const _0x594c1a=a91_0x41dc,_0x5599af=_0x5c6211();while(!![]){try{const _0x38ee88=-parseInt(_0x594c1a(0x149))/0x1+-parseInt(_0x594c1a(0x142))/0x2+-parseInt(_0x594c1a(0x147))/0x3*(parseInt(_0x594c1a(0x137))/0x4)+-parseInt(_0x594c1a(0x148))/0x5*(parseInt(_0x594c1a(0x139))/0x6)+-parseInt(_0x594c1a(0x13f))/0x7*(parseInt(_0x594c1a(0x13d))/0x8)+parseInt(_0x594c1a(0x144))/0x9*(parseInt(_0x594c1a(0x13a))/0xa)+parseInt(_0x594c1a(0x136))/0xb;if(_0x38ee88===_0x1cdfb8)break;else _0x5599af['push'](_0x5599af['shift']());}catch(_0x13504a){_0x5599af['push'](_0x5599af['shift']());}}}(a91_0xaa9a,0x9e973));function a91_0xaa9a(){const _0x1d68de=['2526094PabElm','slice','117JCWzAd','read','length','106137lYmutF','4429715bOdxVR','851633ovMiwW','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','object','error','Connection\x20check\x20finished\x20for\x20db\x20link\x20','msg','message','44537680rPENIw','32wMmxbg','\x20(see\x20data.result)','6wEgftw','694510CabvLI','Connection\x20OK\x20for\x20db\x20link\x20','success','4664FStHxw','num','12229KCzQnk','keys','test'];a91_0xaa9a=function(){return _0x1d68de;};return a91_0xaa9a();}import{testDbLinkConnect}from'../../core/api-client.js';function a91_0x41dc(_0x482047,_0x5804e2){_0x482047=_0x482047-0x133;const _0xaa9a91=a91_0xaa9a();let _0x41dcd4=_0xaa9a91[_0x482047];return _0x41dcd4;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x2b64a9){const _0x2dc987=a91_0x41dc;if(_0x2b64a9===!![]||_0x2b64a9===![])return{'success':_0x2b64a9};if(_0x2b64a9===null||_0x2b64a9===undefined)return{'type':typeof _0x2b64a9};if(typeof _0x2b64a9!==_0x2dc987(0x14b))return{'type':typeof _0x2b64a9};const _0x51f960=_0x2b64a9,_0x1795b5=['success',_0x2dc987(0x135),'code',_0x2dc987(0x14c),_0x2dc987(0x134),'data'],_0x28d1db={};for(const _0x23661f of _0x1795b5){if(_0x23661f in _0x51f960)_0x28d1db[_0x23661f]=_0x51f960[_0x23661f];}return Object[_0x2dc987(0x140)](_0x28d1db)[_0x2dc987(0x146)]===0x0&&(_0x28d1db['keys']=Object[_0x2dc987(0x140)](_0x51f960)[_0x2dc987(0x143)](0x0,0x14)),_0x28d1db;}export const dbTest={'service':'db','command':a91_0x346d98(0x141),'description':a91_0x346d98(0x14a),'risk':a91_0x346d98(0x145),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x512536){const _0x270ff7=a91_0x346d98,_0x149410=_0x512536[_0x270ff7(0x13e)]('id'),_0x377e4d=await testDbLinkConnect(_0x149410),_0x49b99d=_0x377e4d===!![]||typeof _0x377e4d===_0x270ff7(0x14b)&&_0x377e4d!==null&&_0x377e4d[_0x270ff7(0x13c)]===!![],_0x5d511a=summarizeTestConnectResult(_0x377e4d);return{'ok':!![],'data':{'id':_0x149410,'connected':Boolean(_0x49b99d),'result':_0x5d511a},'message':_0x49b99d?_0x270ff7(0x13b)+_0x149410:_0x270ff7(0x133)+_0x149410+_0x270ff7(0x138)};}};
1
+ function a91_0xc271(_0x4aa95d,_0x9649c5){_0x4aa95d=_0x4aa95d-0x12b;const _0x3d1eec=a91_0x3d1e();let _0xc2711=_0x3d1eec[_0x4aa95d];return _0xc2711;}const a91_0x457d50=a91_0xc271;function a91_0x3d1e(){const _0x8ecdb5=['length','6097882HfcjnE','485972pSWKSo','read','error','Connection\x20OK\x20for\x20db\x20link\x20','1742805AcnnuC','60572PTVxxT','success','object','6dtYFQi','slice','message','test','Connection\x20check\x20finished\x20for\x20db\x20link\x20','code','30yvFnmg','803852YhlUCg','171ncDFnI','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','data','4554675LWxcea','3602208UARQAN','keys'];a91_0x3d1e=function(){return _0x8ecdb5;};return a91_0x3d1e();}(function(_0x322e25,_0x21a019){const _0x1ac760=a91_0xc271,_0x4455ff=_0x322e25();while(!![]){try{const _0x5b51e9=-parseInt(_0x1ac760(0x12d))/0x1+-parseInt(_0x1ac760(0x136))/0x2+parseInt(_0x1ac760(0x12e))/0x3*(parseInt(_0x1ac760(0x13b))/0x4)+parseInt(_0x1ac760(0x131))/0x5*(parseInt(_0x1ac760(0x13e))/0x6)+parseInt(_0x1ac760(0x135))/0x7+-parseInt(_0x1ac760(0x132))/0x8+parseInt(_0x1ac760(0x13a))/0x9*(-parseInt(_0x1ac760(0x12c))/0xa);if(_0x5b51e9===_0x21a019)break;else _0x4455ff['push'](_0x4455ff['shift']());}catch(_0xb5e8da){_0x4455ff['push'](_0x4455ff['shift']());}}}(a91_0x3d1e,0x8a77b));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x2945a9){const _0x157965=a91_0xc271;if(_0x2945a9===!![]||_0x2945a9===![])return{'success':_0x2945a9};if(_0x2945a9===null||_0x2945a9===undefined)return{'type':typeof _0x2945a9};if(typeof _0x2945a9!==_0x157965(0x13d))return{'type':typeof _0x2945a9};const _0x334d05=_0x2945a9,_0x45056f=[_0x157965(0x13c),_0x157965(0x140),_0x157965(0x12b),_0x157965(0x138),'msg',_0x157965(0x130)],_0x4ae6f2={};for(const _0x2e728f of _0x45056f){if(_0x2e728f in _0x334d05)_0x4ae6f2[_0x2e728f]=_0x334d05[_0x2e728f];}return Object[_0x157965(0x133)](_0x4ae6f2)[_0x157965(0x134)]===0x0&&(_0x4ae6f2[_0x157965(0x133)]=Object[_0x157965(0x133)](_0x334d05)[_0x157965(0x13f)](0x0,0x14)),_0x4ae6f2;}export const dbTest={'service':'db','command':a91_0x457d50(0x141),'description':a91_0x457d50(0x12f),'risk':a91_0x457d50(0x137),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x785262){const _0x372d06=a91_0x457d50,_0x3556a5=_0x785262['num']('id'),_0xec4269=await testDbLinkConnect(_0x3556a5),_0x54a10d=_0xec4269===!![]||typeof _0xec4269==='object'&&_0xec4269!==null&&_0xec4269[_0x372d06(0x13c)]===!![],_0x435887=summarizeTestConnectResult(_0xec4269);return{'ok':!![],'data':{'id':_0x3556a5,'connected':Boolean(_0x54a10d),'result':_0x435887},'message':_0x54a10d?_0x372d06(0x139)+_0x3556a5:_0x372d06(0x142)+_0x3556a5+'\x20(see\x20data.result)'};}};
@@ -1 +1 @@
1
- const a92_0x4ce958=a92_0xd47e;(function(_0x29c04b,_0x3470ec){const _0x51c32f=a92_0xd47e,_0x68e199=_0x29c04b();while(!![]){try{const _0x584362=parseInt(_0x51c32f(0x171))/0x1*(-parseInt(_0x51c32f(0x173))/0x2)+parseInt(_0x51c32f(0x172))/0x3+-parseInt(_0x51c32f(0x164))/0x4*(parseInt(_0x51c32f(0x156))/0x5)+parseInt(_0x51c32f(0x16a))/0x6+parseInt(_0x51c32f(0x15b))/0x7+parseInt(_0x51c32f(0x154))/0x8*(-parseInt(_0x51c32f(0x151))/0x9)+parseInt(_0x51c32f(0x168))/0xa*(parseInt(_0x51c32f(0x177))/0xb);if(_0x584362===_0x3470ec)break;else _0x68e199['push'](_0x68e199['shift']());}catch(_0x18e885){_0x68e199['push'](_0x68e199['shift']());}}}(a92_0x3c41,0x5467a));function a92_0x3c41(){const _0x276810=['Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','New\x20connection\x20parameter\x20string','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','New\x20description','1555239iNAXCY','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','dbName','dburl','has','str','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','dbParam','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','4fiYqCe','Updated\x20db\x20link\x20','password','dbUrl','10nYxPlN','dbname','1262784evoUUm','validation','username','New\x20host:port','update','New\x20username','num','526423sdfaQE','360936STxXuE','2rvnvZv','dbparam','string','POST','6359243SfdIkh','write','dbdesc','96264CgrQrT','/smartapi/dblink/update','[redacted]','88CFwoRU','trim','706325Ngshxw'];a92_0x3c41=function(){return _0x276810;};return a92_0x3c41();}function a92_0xd47e(_0x9fd0d,_0x1f695b){_0x9fd0d=_0x9fd0d-0x14f;const _0x3c411e=a92_0x3c41();let _0xd47e0d=_0x3c411e[_0x9fd0d];return _0xd47e0d;}import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set(['******',a92_0x4ce958(0x153)]);function mergeDbLinkUpdate(_0x4a058b,_0x30c43f){const _0x4e828b=a92_0x4ce958,_0x26ab70={..._0x4a058b},_0x191c7f=_0x30c43f[_0x4e828b(0x160)]('password');if(_0x191c7f&&MASKED_PASSWORD_VALUES[_0x4e828b(0x15f)](_0x191c7f))throw CliErrors['validation'](_0x4e828b(0x159));if(!_0x191c7f&&MASKED_PASSWORD_VALUES[_0x4e828b(0x15f)](String(_0x4a058b['password']??'')))throw CliErrors[_0x4e828b(0x16b)](_0x4e828b(0x161));const _0x1ffe51=_0x30c43f[_0x4e828b(0x160)](_0x4e828b(0x169));if(_0x1ffe51)_0x26ab70[_0x4e828b(0x15d)]=_0x1ffe51;const _0x55b975=_0x30c43f[_0x4e828b(0x160)](_0x4e828b(0x15e));if(_0x55b975)_0x26ab70[_0x4e828b(0x167)]=_0x55b975[_0x4e828b(0x155)]();const _0x47ffef=_0x30c43f[_0x4e828b(0x160)](_0x4e828b(0x16c));if(_0x47ffef)_0x26ab70[_0x4e828b(0x16c)]=_0x47ffef;if(_0x191c7f)_0x26ab70[_0x4e828b(0x166)]=_0x191c7f;const _0x27f16f=_0x30c43f[_0x4e828b(0x160)]('dbparam');if(_0x27f16f)_0x26ab70[_0x4e828b(0x162)]=_0x27f16f;const _0x21914d=_0x30c43f['str'](_0x4e828b(0x150));if(_0x21914d)_0x26ab70['dbDesc']=_0x21914d;return _0x26ab70;}export const dbUpdate={'service':'db','command':a92_0x4ce958(0x16e),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':a92_0x4ce958(0x14f),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a92_0x4ce958(0x169),'type':'string','description':'New\x20database\x20name'},{'name':a92_0x4ce958(0x15e),'type':'string','description':a92_0x4ce958(0x16d)},{'name':a92_0x4ce958(0x16c),'type':a92_0x4ce958(0x175),'description':a92_0x4ce958(0x16f)},{'name':'password','type':a92_0x4ce958(0x175),'description':a92_0x4ce958(0x15c)},{'name':a92_0x4ce958(0x174),'type':a92_0x4ce958(0x175),'description':a92_0x4ce958(0x158)},{'name':'dbdesc','type':'string','description':a92_0x4ce958(0x15a)}],async 'validate'(_0x124d68){const _0x53c0d5=a92_0x4ce958,_0x2a17d8=_0x124d68[_0x53c0d5(0x160)](_0x53c0d5(0x15e));if(_0x2a17d8&&!validateDbUrl(_0x2a17d8[_0x53c0d5(0x155)]()))throw CliErrors['validation'](_0x53c0d5(0x163)+_0x2a17d8+'\x22');},async 'dryRun'(_0x3abcf1){const _0x1c62fc=a92_0x4ce958,_0x1e97da=_0x3abcf1[_0x1c62fc(0x170)]('id'),_0x589e44=await getDbLinkInfo(_0x1e97da),_0x1b824f=mergeDbLinkUpdate(_0x589e44,_0x3abcf1),_0x53063a=sanitizeDbLinkForOutput(_0x1b824f);return{'method':_0x1c62fc(0x176),'url':_0x1c62fc(0x152),'body':_0x53063a,'description':_0x1c62fc(0x157)};},async 'execute'(_0x47e4bf){const _0x7f2241=a92_0x4ce958,_0x3188d4=_0x47e4bf[_0x7f2241(0x170)]('id'),_0x314376=await getDbLinkInfo(_0x3188d4),_0x37ba41=mergeDbLinkUpdate(_0x314376,_0x47e4bf),{id:_0x37dd18,entity:_0x45fb14}=normalizeEntityWithIdResponse(await updateDbLink(_0x37ba41));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x45fb14),'message':_0x7f2241(0x165)+(_0x37dd18??_0x3188d4)};}};
1
+ const a92_0x2a586a=a92_0x78d8;(function(_0x43b043,_0x54566b){const _0x4b6962=a92_0x78d8,_0x52df9f=_0x43b043();while(!![]){try{const _0x575f32=-parseInt(_0x4b6962(0x16c))/0x1+-parseInt(_0x4b6962(0x162))/0x2*(-parseInt(_0x4b6962(0x164))/0x3)+-parseInt(_0x4b6962(0x167))/0x4+-parseInt(_0x4b6962(0x15d))/0x5+parseInt(_0x4b6962(0x165))/0x6*(parseInt(_0x4b6962(0x156))/0x7)+parseInt(_0x4b6962(0x14f))/0x8+parseInt(_0x4b6962(0x14e))/0x9;if(_0x575f32===_0x54566b)break;else _0x52df9f['push'](_0x52df9f['shift']());}catch(_0x1fee93){_0x52df9f['push'](_0x52df9f['shift']());}}}(a92_0x4d48,0xedf51));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a92_0x4d48(){const _0x56ae1a=['dbdesc','1061504PrkQVk','has','trim','num','dburl','1876390DTVEEh','New\x20database\x20name','dbParam','POST','23981418lDYaOh','2732272gpNXnQ','validation','dbparam','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','username','update','New\x20description','49DUPknf','dbName','dbDesc','Updated\x20db\x20link\x20','string','password','******','4541555LcVSfu','[redacted]','dbname','str','dbUrl','20lxBQlE','New\x20username','278574CjEsaT','77172vAXMJG'];a92_0x4d48=function(){return _0x56ae1a;};return a92_0x4d48();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a92_0x78d8(_0x176a80,_0x1c62f5){_0x176a80=_0x176a80-0x14c;const _0x4d48fa=a92_0x4d48();let _0x78d858=_0x4d48fa[_0x176a80];return _0x78d858;}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a92_0x2a586a(0x15c),a92_0x2a586a(0x15e)]);function mergeDbLinkUpdate(_0x34379f,_0x13ce49){const _0x58f1a5=a92_0x2a586a,_0x42d57f={..._0x34379f},_0xc2afaa=_0x13ce49[_0x58f1a5(0x160)]('password');if(_0xc2afaa&&MASKED_PASSWORD_VALUES[_0x58f1a5(0x168)](_0xc2afaa))throw CliErrors[_0x58f1a5(0x150)]('--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.');if(!_0xc2afaa&&MASKED_PASSWORD_VALUES[_0x58f1a5(0x168)](String(_0x34379f[_0x58f1a5(0x15b)]??'')))throw CliErrors[_0x58f1a5(0x150)]('The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.');const _0x1d92ae=_0x13ce49[_0x58f1a5(0x160)]('dbname');if(_0x1d92ae)_0x42d57f[_0x58f1a5(0x157)]=_0x1d92ae;const _0x3b281f=_0x13ce49[_0x58f1a5(0x160)](_0x58f1a5(0x16b));if(_0x3b281f)_0x42d57f[_0x58f1a5(0x161)]=_0x3b281f[_0x58f1a5(0x169)]();const _0xf98449=_0x13ce49['str'](_0x58f1a5(0x153));if(_0xf98449)_0x42d57f[_0x58f1a5(0x153)]=_0xf98449;if(_0xc2afaa)_0x42d57f[_0x58f1a5(0x15b)]=_0xc2afaa;const _0x59cb9e=_0x13ce49[_0x58f1a5(0x160)](_0x58f1a5(0x151));if(_0x59cb9e)_0x42d57f[_0x58f1a5(0x14c)]=_0x59cb9e;const _0x2cad78=_0x13ce49[_0x58f1a5(0x160)](_0x58f1a5(0x166));if(_0x2cad78)_0x42d57f[_0x58f1a5(0x158)]=_0x2cad78;return _0x42d57f;}export const dbUpdate={'service':'db','command':a92_0x2a586a(0x154),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a92_0x2a586a(0x15f),'type':a92_0x2a586a(0x15a),'description':a92_0x2a586a(0x16d)},{'name':a92_0x2a586a(0x16b),'type':'string','description':'New\x20host:port'},{'name':a92_0x2a586a(0x153),'type':a92_0x2a586a(0x15a),'description':a92_0x2a586a(0x163)},{'name':a92_0x2a586a(0x15b),'type':a92_0x2a586a(0x15a),'description':'Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password'},{'name':'dbparam','type':'string','description':'New\x20connection\x20parameter\x20string'},{'name':a92_0x2a586a(0x166),'type':a92_0x2a586a(0x15a),'description':a92_0x2a586a(0x155)}],async 'validate'(_0x2dcd70){const _0x29c8d7=a92_0x2a586a,_0x434dd8=_0x2dcd70['str']('dburl');if(_0x434dd8&&!validateDbUrl(_0x434dd8['trim']()))throw CliErrors[_0x29c8d7(0x150)](_0x29c8d7(0x152)+_0x434dd8+'\x22');},async 'dryRun'(_0x5bba57){const _0x4958d0=a92_0x2a586a,_0x4711a8=_0x5bba57[_0x4958d0(0x16a)]('id'),_0x4a7509=await getDbLinkInfo(_0x4711a8),_0x24fcac=mergeDbLinkUpdate(_0x4a7509,_0x5bba57),_0x2fadc4=sanitizeDbLinkForOutput(_0x24fcac);return{'method':_0x4958d0(0x14d),'url':'/smartapi/dblink/update','body':_0x2fadc4,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0x41e69a){const _0xae0752=a92_0x2a586a,_0x5c8825=_0x41e69a[_0xae0752(0x16a)]('id'),_0x23cd16=await getDbLinkInfo(_0x5c8825),_0x3cda73=mergeDbLinkUpdate(_0x23cd16,_0x41e69a),{id:_0x1d846d,entity:_0x468d99}=normalizeEntityWithIdResponse(await updateDbLink(_0x3cda73));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x468d99),'message':_0xae0752(0x159)+(_0x1d846d??_0x5c8825)};}};