@lovrabet/rabetbase-cli 2.3.6 → 2.3.7-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 (241) 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/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -0
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analyze-cancel.js +1 -1
  79. package/lib/commands/db/analyze-start.js +1 -1
  80. package/lib/commands/db/analyze-status.js +1 -1
  81. package/lib/commands/db/create.js +1 -1
  82. package/lib/commands/db/delete.js +1 -1
  83. package/lib/commands/db/detail.js +1 -1
  84. package/lib/commands/db/diff.js +1 -1
  85. package/lib/commands/db/index.js +1 -1
  86. package/lib/commands/db/list.js +1 -1
  87. package/lib/commands/db/shared.js +1 -1
  88. package/lib/commands/db/tables.js +1 -1
  89. package/lib/commands/db/test.js +1 -1
  90. package/lib/commands/db/update.js +1 -1
  91. package/lib/commands/doctor.js +1 -1
  92. package/lib/commands/file/index.js +1 -0
  93. package/lib/commands/init/index.js +1 -1
  94. package/lib/commands/issue/index.js +1 -1
  95. package/lib/commands/issue/nudge.js +1 -1
  96. package/lib/commands/issue/report.js +1 -1
  97. package/lib/commands/issue/shared.js +1 -1
  98. package/lib/commands/logs/index.js +1 -1
  99. package/lib/commands/menu/index.js +1 -1
  100. package/lib/commands/menu/list.js +1 -1
  101. package/lib/commands/menu/shared/compare-table.js +1 -1
  102. package/lib/commands/menu/shared/index.js +1 -1
  103. package/lib/commands/menu/shared/inquirer.js +1 -1
  104. package/lib/commands/menu/shared/local-pages.js +1 -1
  105. package/lib/commands/menu/shared/logic.js +1 -1
  106. package/lib/commands/menu/shared/service.js +1 -1
  107. package/lib/commands/menu/shared/sync-core.js +1 -1
  108. package/lib/commands/menu/shared/update-core.js +1 -1
  109. package/lib/commands/menu/shared/valid-url.js +1 -1
  110. package/lib/commands/menu/sync.js +1 -1
  111. package/lib/commands/menu/update.js +1 -1
  112. package/lib/commands/page/generate-start.js +1 -1
  113. package/lib/commands/page/generate-status.js +1 -1
  114. package/lib/commands/page/index.js +1 -1
  115. package/lib/commands/page/pull.js +1 -1
  116. package/lib/commands/page/push.js +1 -1
  117. package/lib/commands/page/relation-audit.js +1 -1
  118. package/lib/commands/page/shared.js +1 -1
  119. package/lib/commands/page/standard-page-status.js +1 -1
  120. package/lib/commands/page/sync.js +1 -1
  121. package/lib/commands/permit/index.js +1 -1
  122. package/lib/commands/permit/page-get.js +1 -1
  123. package/lib/commands/permit/page-set.js +1 -1
  124. package/lib/commands/permit/role-apis-set.js +1 -1
  125. package/lib/commands/permit/role-menus-set.js +1 -1
  126. package/lib/commands/permit/role-menus.js +1 -1
  127. package/lib/commands/permit/shared.js +1 -1
  128. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  129. package/lib/commands/project/create/format-elapsed.js +1 -1
  130. package/lib/commands/project/create/main.js +1 -1
  131. package/lib/commands/project/create/non-interactive.js +1 -1
  132. package/lib/commands/project/create/project-template-path.js +1 -1
  133. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  134. package/lib/commands/project/create/use-format-code.js +1 -1
  135. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  136. package/lib/commands/project/index.js +1 -1
  137. package/lib/commands/project/init.js +1 -1
  138. package/lib/commands/project/upgrade.js +1 -1
  139. package/lib/commands/registry.js +1 -1
  140. package/lib/commands/role/create.js +1 -1
  141. package/lib/commands/role/delete.js +1 -1
  142. package/lib/commands/role/detail.js +1 -1
  143. package/lib/commands/role/index.js +1 -1
  144. package/lib/commands/role/list.js +1 -1
  145. package/lib/commands/role/shared.js +1 -1
  146. package/lib/commands/role/update.js +1 -1
  147. package/lib/commands/role/user-add.js +1 -1
  148. package/lib/commands/role/user-remove.js +1 -1
  149. package/lib/commands/role/user-resolve.js +1 -1
  150. package/lib/commands/run/index.js +1 -1
  151. package/lib/commands/schema.js +1 -1
  152. package/lib/commands/sql/create.js +1 -1
  153. package/lib/commands/sql/delete.js +1 -1
  154. package/lib/commands/sql/detail.js +1 -1
  155. package/lib/commands/sql/exec.js +1 -1
  156. package/lib/commands/sql/index.js +1 -1
  157. package/lib/commands/sql/list.js +1 -1
  158. package/lib/commands/sql/pull.js +1 -1
  159. package/lib/commands/sql/push.js +1 -1
  160. package/lib/commands/sql/save.js +1 -1
  161. package/lib/commands/sql/shared.js +1 -1
  162. package/lib/commands/sql/status.js +1 -1
  163. package/lib/commands/sql/validate.js +1 -1
  164. package/lib/commands/workspace/add.js +1 -1
  165. package/lib/commands/workspace/index.js +1 -1
  166. package/lib/commands/workspace/remove.js +1 -1
  167. package/lib/config/schema.js +1 -1
  168. package/lib/constant/cdn.js +1 -1
  169. package/lib/constant/cli.js +1 -1
  170. package/lib/constant/defaults.js +1 -1
  171. package/lib/constant/domain.js +1 -1
  172. package/lib/constant/env.js +1 -1
  173. package/lib/constant/output.js +1 -1
  174. package/lib/constant/paths.js +1 -1
  175. package/lib/constant/risk.js +1 -1
  176. package/lib/context/app-resolver.js +1 -1
  177. package/lib/context/auth-resolver.js +1 -1
  178. package/lib/context/config-loader.js +1 -1
  179. package/lib/context.js +1 -1
  180. package/lib/core/alias-resolver.js +1 -1
  181. package/lib/core/api-client.js +1 -1
  182. package/lib/core/bff/config.js +1 -1
  183. package/lib/core/bff/file-system.js +1 -1
  184. package/lib/core/bff/hash.js +1 -1
  185. package/lib/core/bff/lock.js +1 -1
  186. package/lib/core/bff/utils.js +1 -1
  187. package/lib/core/db-resolver.js +1 -1
  188. package/lib/core/page/file-system.js +1 -1
  189. package/lib/core/page/hash.js +1 -1
  190. package/lib/core/page/lock.js +1 -1
  191. package/lib/core/sql-sync/config.js +1 -1
  192. package/lib/core/sql-sync/file-system.js +1 -1
  193. package/lib/core/sql-sync/hash.js +1 -1
  194. package/lib/core/sql-sync/lock.js +1 -1
  195. package/lib/core/sql-sync/utils.js +1 -1
  196. package/lib/core/sql-validator.js +1 -1
  197. package/lib/errors.js +1 -1
  198. package/lib/framework/build-all-flags.js +1 -1
  199. package/lib/framework/flags.js +1 -1
  200. package/lib/framework/help.js +1 -1
  201. package/lib/framework/index.js +1 -1
  202. package/lib/framework/output.js +1 -1
  203. package/lib/framework/response.js +1 -1
  204. package/lib/framework/runner-alias.js +1 -1
  205. package/lib/framework/runner.js +1 -1
  206. package/lib/framework/schema-export.js +1 -1
  207. package/lib/framework/types.js +1 -1
  208. package/lib/generated/build-info.js +1 -1
  209. package/lib/help.js +1 -1
  210. package/lib/skills/main.js +1 -1
  211. package/lib/skills/npx-skills-add.js +1 -1
  212. package/lib/telemetry/cli-command-trace.js +1 -1
  213. package/lib/telemetry/cli-help-trace.js +1 -1
  214. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  215. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  216. package/lib/telemetry/send-cli-trace-log.js +1 -1
  217. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  218. package/lib/utils/ai_config.js +1 -1
  219. package/lib/utils/apply-jq-filter.js +1 -1
  220. package/lib/utils/cdn-config.js +1 -1
  221. package/lib/utils/check-sdk-version.js +1 -1
  222. package/lib/utils/cli-version-check.js +1 -1
  223. package/lib/utils/cli-version-policy.js +1 -1
  224. package/lib/utils/config.js +1 -1
  225. package/lib/utils/copy-directory.js +1 -1
  226. package/lib/utils/entity-with-id.js +1 -1
  227. package/lib/utils/file-utils.js +1 -1
  228. package/lib/utils/guides-cdn.js +1 -1
  229. package/lib/utils/http-client.js +1 -1
  230. package/lib/utils/is-non-interactive.js +1 -1
  231. package/lib/utils/logger.js +1 -1
  232. package/lib/utils/params.js +1 -1
  233. package/lib/utils/platform.js +1 -1
  234. package/lib/utils/rules-cdn.js +1 -1
  235. package/lib/utils/sleep.js +1 -1
  236. package/lib/utils/template-replacer.js +1 -1
  237. package/lib/utils/update-notice.js +1 -1
  238. package/lib/utils/version.js +1 -1
  239. package/lib/utils/with-active-cookie.js +1 -1
  240. package/lib/utils/write-cli-side-channel.js +1 -1
  241. package/package.json +1 -1
@@ -1 +1 @@
1
- const a74_0x4538bc=a74_0x38ac;(function(_0x195bcb,_0x3c9496){const _0x5de109=a74_0x38ac,_0x3ca38f=_0x195bcb();while(!![]){try{const _0xaa1e86=parseInt(_0x5de109(0xd5))/0x1*(-parseInt(_0x5de109(0xd8))/0x2)+parseInt(_0x5de109(0xd3))/0x3+-parseInt(_0x5de109(0xe3))/0x4*(parseInt(_0x5de109(0xf5))/0x5)+parseInt(_0x5de109(0xe9))/0x6+parseInt(_0x5de109(0xd6))/0x7+parseInt(_0x5de109(0xdc))/0x8+-parseInt(_0x5de109(0xe8))/0x9;if(_0xaa1e86===_0x3c9496)break;else _0x3ca38f['push'](_0x3ca38f['shift']());}catch(_0x123c52){_0x3ca38f['push'](_0x3ca38f['shift']());}}}(a74_0x44a0,0x89455));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a74_0x44a0(){const _0x3fc510=['\x20would\x20be\x20renamed\x20to\x20','stringify','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','datasetCode','modelCode','str','432201TPqTmR','datasetName','1017098OzXvVI','5401830xjgWYF','\x20to\x20','2dPnpXB','POST','--code\x20is\x20required','rename','8083472ziWJeq','modelId','trim','name','string','expectName','Expectation\x20mismatch\x20at\x20dataset.name','22000cfDrmK','data','--expect-name\x20is\x20required','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id','Rename\x20dataset\x20display\x20name\x20safely','3177909PGElUV','169614bYRTyx','Renamed\x20dataset\x20','validation',',\x20actual\x20','object','Expected\x20','/smartapi/dataset/update-driven-data','--name\x20is\x20required','New\x20dataset\x20display\x20name','code','expect-name','Dry-run:\x20dataset\x20','20vJQSGB','dataset'];a74_0x44a0=function(){return _0x3fc510;};return a74_0x44a0();}export async function buildDatasetRenameResult({input:_0x450786,dryRun:_0x4ea669}){const _0x320e64=a74_0x38ac;validateInput(_0x450786);const _0x1be7fa=await getDatasetDetail(_0x450786[_0x320e64(0xf2)]),_0x142400=resolveCurrentName(_0x1be7fa);if(_0x142400!==_0x450786[_0x320e64(0xe1)])throw CliErrors['validation'](_0x320e64(0xe2),_0x320e64(0xee)+JSON[_0x320e64(0xf8)](_0x450786['expectName'])+_0x320e64(0xec)+JSON['stringify'](_0x142400));const _0x536f66=buildRenameRequest(_0x1be7fa,_0x450786),_0x549428=_0x142400!==_0x450786[_0x320e64(0xdf)];let _0x148f7e;return _0x549428&&!_0x4ea669&&(_0x148f7e=await updateDrivenData(_0x536f66)),{'ok':!![],'data':{'dataset':{'id':_0x536f66[_0x320e64(0xdd)],'code':_0x536f66[_0x320e64(0xfb)]},'dryRun':_0x4ea669,'changed':_0x549428,'before':{'name':_0x142400},'after':{'name':_0x450786[_0x320e64(0xdf)]},'request':_0x536f66,'submitted':_0x549428&&!_0x4ea669,..._0x148f7e!==undefined?{'version':_0x148f7e}:{}},'message':_0x549428?_0x4ea669?_0x320e64(0xf4)+_0x536f66[_0x320e64(0xfb)]+_0x320e64(0xf7)+_0x450786[_0x320e64(0xdf)]:_0x320e64(0xea)+_0x536f66[_0x320e64(0xfb)]+_0x320e64(0xd7)+_0x450786[_0x320e64(0xdf)]:'No\x20changes\x20for\x20dataset\x20'+_0x536f66['modelCode']};}export const datasetRename={'service':a74_0x4538bc(0xf6),'command':a74_0x4538bc(0xdb),'description':a74_0x4538bc(0xe7),'risk':'write','flags':[CODE_FLAG,{'name':a74_0x4538bc(0xdf),'type':a74_0x4538bc(0xe0),'required':!![],'description':a74_0x4538bc(0xf1)},{'name':'expect-name','type':a74_0x4538bc(0xe0),'required':!![],'description':a74_0x4538bc(0xf9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5adc59){validateInput(readDatasetRenameInput(_0x5adc59));},async 'dryRun'(_0x47d351){const _0x423444=a74_0x4538bc,_0x18f051=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x47d351),'dryRun':!![]});return{'method':_0x423444(0xd9),'url':_0x423444(0xef),'body':_0x18f051[_0x423444(0xe4)]['request'],'description':_0x18f051['message'],..._0x18f051[_0x423444(0xe4)]};},async 'execute'(_0x434703){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x434703),'dryRun':![]});}};function readDatasetRenameInput(_0x8c24f4){const _0x59f033=a74_0x4538bc;return{'code':trim(_0x8c24f4[_0x59f033(0xd2)]('code')),'name':trim(_0x8c24f4[_0x59f033(0xd2)]('name')),'expectName':trim(_0x8c24f4['str'](_0x59f033(0xf3)))};}function validateInput(_0x107a58){const _0x1ba770=a74_0x4538bc;if(!_0x107a58['code'])throw CliErrors['validation'](_0x1ba770(0xda));if(!_0x107a58[_0x1ba770(0xdf)])throw CliErrors[_0x1ba770(0xeb)](_0x1ba770(0xf0));if(!_0x107a58['expectName'])throw CliErrors['validation'](_0x1ba770(0xe5));}function resolveCurrentName(_0x3a4884){const _0x41a919=a74_0x4538bc;return String(_0x3a4884['dataset']?.[_0x41a919(0xd4)]??_0x3a4884[_0x41a919(0xdf)]??'')[_0x41a919(0xde)]();}function buildRenameRequest(_0xe4a0e4,_0xabd671){const _0x212c4=a74_0x4538bc,_0x5be306=isPlainObject(_0xe4a0e4[_0x212c4(0xf6)])?_0xe4a0e4[_0x212c4(0xf6)]:{},_0x44f5d1=_0xe4a0e4[_0x212c4(0xdd)]??_0xe4a0e4['id']??_0x5be306['datasetId'];if(_0x44f5d1===undefined||_0x44f5d1===null||_0x44f5d1==='')throw CliErrors[_0x212c4(0xeb)](_0x212c4(0xe6));const _0xce3908=String(_0xe4a0e4['modelCode']??_0xe4a0e4[_0x212c4(0xf2)]??_0x5be306[_0x212c4(0xfa)]??_0xabd671[_0x212c4(0xf2)])[_0x212c4(0xde)]();if(!_0xce3908)throw CliErrors[_0x212c4(0xeb)]('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code');return{'modelId':_0x44f5d1,'modelCode':_0xce3908,'name':_0xabd671['name'],'dataset':{'datasetId':_0x44f5d1,'datasetCode':_0xce3908,'datasetName':_0xabd671[_0x212c4(0xdf)]}};}function isPlainObject(_0x3e57a2){const _0x4d62b2=a74_0x4538bc;return Boolean(_0x3e57a2)&&typeof _0x3e57a2===_0x4d62b2(0xed)&&!Array['isArray'](_0x3e57a2);}function a74_0x38ac(_0x24ca8f,_0x556f39){_0x24ca8f=_0x24ca8f-0xd2;const _0x44a08d=a74_0x44a0();let _0x38acd7=_0x44a08d[_0x24ca8f];return _0x38acd7;}function trim(_0x5183a4){const _0x1a6d6b=a74_0x4538bc;return String(_0x5183a4||'')[_0x1a6d6b(0xde)]();}
1
+ const a75_0x207ac7=a75_0x1dea;(function(_0x4a2496,_0x5e1510){const _0x3a2660=a75_0x1dea,_0x2f511b=_0x4a2496();while(!![]){try{const _0x4fc23a=parseInt(_0x3a2660(0xc8))/0x1*(-parseInt(_0x3a2660(0xdf))/0x2)+-parseInt(_0x3a2660(0xcd))/0x3*(-parseInt(_0x3a2660(0xdb))/0x4)+parseInt(_0x3a2660(0xea))/0x5+-parseInt(_0x3a2660(0xe0))/0x6+parseInt(_0x3a2660(0xcb))/0x7*(-parseInt(_0x3a2660(0xef))/0x8)+-parseInt(_0x3a2660(0xd7))/0x9+-parseInt(_0x3a2660(0xd5))/0xa*(-parseInt(_0x3a2660(0xd1))/0xb);if(_0x4fc23a===_0x5e1510)break;else _0x2f511b['push'](_0x2f511b['shift']());}catch(_0x4b5bbb){_0x2f511b['push'](_0x2f511b['shift']());}}}(a75_0x1e81,0xa1adb));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:_0x5d3ddd,dryRun:_0x97ef6a}){const _0x1dc59e=a75_0x1dea;validateInput(_0x5d3ddd);const _0x1af00d=await getDatasetDetail(_0x5d3ddd[_0x1dc59e(0xd0)]),_0x188caa=resolveCurrentName(_0x1af00d);if(_0x188caa!==_0x5d3ddd['expectName'])throw CliErrors[_0x1dc59e(0xc9)](_0x1dc59e(0xee),_0x1dc59e(0xe8)+JSON[_0x1dc59e(0xd3)](_0x5d3ddd[_0x1dc59e(0xde)])+',\x20actual\x20'+JSON[_0x1dc59e(0xd3)](_0x188caa));const _0x994183=buildRenameRequest(_0x1af00d,_0x5d3ddd),_0x39ba76=_0x188caa!==_0x5d3ddd[_0x1dc59e(0xe9)];let _0x4d2762;return _0x39ba76&&!_0x97ef6a&&(_0x4d2762=await updateDrivenData(_0x994183)),{'ok':!![],'data':{'dataset':{'id':_0x994183[_0x1dc59e(0xe7)],'code':_0x994183['modelCode']},'dryRun':_0x97ef6a,'changed':_0x39ba76,'before':{'name':_0x188caa},'after':{'name':_0x5d3ddd['name']},'request':_0x994183,'submitted':_0x39ba76&&!_0x97ef6a,..._0x4d2762!==undefined?{'version':_0x4d2762}:{}},'message':_0x39ba76?_0x97ef6a?_0x1dc59e(0xf1)+_0x994183['modelCode']+'\x20would\x20be\x20renamed\x20to\x20'+_0x5d3ddd[_0x1dc59e(0xe9)]:_0x1dc59e(0xe4)+_0x994183[_0x1dc59e(0xce)]+_0x1dc59e(0xd9)+_0x5d3ddd[_0x1dc59e(0xe9)]:_0x1dc59e(0xd6)+_0x994183[_0x1dc59e(0xce)]};}export const datasetRename={'service':a75_0x207ac7(0xe5),'command':a75_0x207ac7(0xcc),'description':a75_0x207ac7(0xf2),'risk':a75_0x207ac7(0xf3),'flags':[CODE_FLAG,{'name':'name','type':a75_0x207ac7(0xda),'required':!![],'description':a75_0x207ac7(0xd2)},{'name':'expect-name','type':'string','required':!![],'description':'Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x104370){validateInput(readDatasetRenameInput(_0x104370));},async 'dryRun'(_0x26cc72){const _0x538f5b=a75_0x207ac7,_0x33cde4=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x26cc72),'dryRun':!![]});return{'method':_0x538f5b(0xd8),'url':_0x538f5b(0xe1),'body':_0x33cde4['data']['request'],'description':_0x33cde4['message'],..._0x33cde4[_0x538f5b(0xeb)]};},async 'execute'(_0x258689){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x258689),'dryRun':![]});}};function readDatasetRenameInput(_0x1eb327){const _0x9e9642=a75_0x207ac7;return{'code':trim(_0x1eb327['str'](_0x9e9642(0xd0))),'name':trim(_0x1eb327['str'](_0x9e9642(0xe9))),'expectName':trim(_0x1eb327[_0x9e9642(0xf0)](_0x9e9642(0xcf)))};}function validateInput(_0x3748d2){const _0x19381a=a75_0x207ac7;if(!_0x3748d2[_0x19381a(0xd0)])throw CliErrors[_0x19381a(0xc9)]('--code\x20is\x20required');if(!_0x3748d2[_0x19381a(0xe9)])throw CliErrors['validation'](_0x19381a(0xca));if(!_0x3748d2['expectName'])throw CliErrors[_0x19381a(0xc9)](_0x19381a(0xed));}function resolveCurrentName(_0x4aad0d){const _0x1ade3f=a75_0x207ac7;return String(_0x4aad0d[_0x1ade3f(0xe5)]?.[_0x1ade3f(0xe2)]??_0x4aad0d['name']??'')[_0x1ade3f(0xdd)]();}function buildRenameRequest(_0x419e1f,_0x5ede29){const _0x5ea93a=a75_0x207ac7,_0x5266d9=isPlainObject(_0x419e1f[_0x5ea93a(0xe5)])?_0x419e1f[_0x5ea93a(0xe5)]:{},_0x1b289a=_0x419e1f[_0x5ea93a(0xe7)]??_0x419e1f['id']??_0x5266d9[_0x5ea93a(0xdc)];if(_0x1b289a===undefined||_0x1b289a===null||_0x1b289a==='')throw CliErrors[_0x5ea93a(0xc9)](_0x5ea93a(0xe3));const _0x5027e3=String(_0x419e1f[_0x5ea93a(0xce)]??_0x419e1f[_0x5ea93a(0xd0)]??_0x5266d9[_0x5ea93a(0xd4)]??_0x5ede29[_0x5ea93a(0xd0)])['trim']();if(!_0x5027e3)throw CliErrors[_0x5ea93a(0xc9)](_0x5ea93a(0xe6));return{'modelId':_0x1b289a,'modelCode':_0x5027e3,'name':_0x5ede29[_0x5ea93a(0xe9)],'dataset':{'datasetId':_0x1b289a,'datasetCode':_0x5027e3,'datasetName':_0x5ede29[_0x5ea93a(0xe9)]}};}function a75_0x1dea(_0x310a7f,_0xce7076){_0x310a7f=_0x310a7f-0xc8;const _0x1e811a=a75_0x1e81();let _0x1deaef=_0x1e811a[_0x310a7f];return _0x1deaef;}function isPlainObject(_0x4cc5a6){const _0x5b70d5=a75_0x207ac7;return Boolean(_0x4cc5a6)&&typeof _0x4cc5a6===_0x5b70d5(0xec)&&!Array['isArray'](_0x4cc5a6);}function trim(_0x18b520){return String(_0x18b520||'')['trim']();}function a75_0x1e81(){const _0x2b30a5=['\x20to\x20','string','4jgzkZg','datasetId','trim','expectName','190598Scstbo','4646082sTYoVD','/smartapi/dataset/update-driven-data','datasetName','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id','Renamed\x20dataset\x20','dataset','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code','modelId','Expected\x20','name','3299025soennT','data','object','--expect-name\x20is\x20required','Expectation\x20mismatch\x20at\x20dataset.name','6039784pZLCkc','str','Dry-run:\x20dataset\x20','Rename\x20dataset\x20display\x20name\x20safely','write','3XRMPuI','validation','--name\x20is\x20required','7AgnYjf','rename','2231673FoyaYy','modelCode','expect-name','code','55LmSTBR','New\x20dataset\x20display\x20name','stringify','datasetCode','3311190wFobCX','No\x20changes\x20for\x20dataset\x20','5236551Vkniai','POST'];a75_0x1e81=function(){return _0x2b30a5;};return a75_0x1e81();}
@@ -1 +1 @@
1
- const a75_0xec58=a75_0x49c0;(function(_0x1e2e0d,_0x2858eb){const _0x25f6a5=a75_0x49c0,_0x1ac38d=_0x1e2e0d();while(!![]){try{const _0x124293=parseInt(_0x25f6a5(0x1de))/0x1*(parseInt(_0x25f6a5(0x1e4))/0x2)+parseInt(_0x25f6a5(0x1f0))/0x3*(-parseInt(_0x25f6a5(0x1f3))/0x4)+parseInt(_0x25f6a5(0x1f9))/0x5+parseInt(_0x25f6a5(0x1e1))/0x6*(-parseInt(_0x25f6a5(0x1ed))/0x7)+-parseInt(_0x25f6a5(0x1d6))/0x8+parseInt(_0x25f6a5(0x1da))/0x9*(parseInt(_0x25f6a5(0x1e0))/0xa)+-parseInt(_0x25f6a5(0x1fb))/0xb*(parseInt(_0x25f6a5(0x1f2))/0xc);if(_0x124293===_0x2858eb)break;else _0x1ac38d['push'](_0x1ac38d['shift']());}catch(_0x3a5377){_0x1ac38d['push'](_0x1ac38d['shift']());}}}(a75_0xd2b3,0xdd021));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':a75_0xec58(0x1d9),'description':a75_0xec58(0x1e6)},DBID_FLAG={'name':a75_0xec58(0x1fc),'type':'number','description':a75_0xec58(0x1ee)},CONFIRM_FLAG={'name':a75_0xec58(0x201),'type':a75_0xec58(0x1d8),'description':a75_0xec58(0x1e3)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a75_0xec58(0x1d9),'description':a75_0xec58(0x1d3)};export const datasetRestore={'service':a75_0xec58(0x1fe),'command':'restore','description':a75_0xec58(0x1d4),'risk':a75_0xec58(0x1e9),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4d8272){const _0x5a667b=a75_0xec58,_0x41dfe6=_0x4d8272[_0x5a667b(0x1f8)]('id'),_0x426b72=_0x4d8272[_0x5a667b(0x1ff)](_0x5a667b(0x1e7)),_0x45102b=_0x4d8272[_0x5a667b(0x1f8)](_0x5a667b(0x1fc)),_0x174a38=[_0x41dfe6>0x0,Boolean(_0x426b72),_0x45102b>0x0][_0x5a667b(0x1db)](Boolean);if(_0x174a38[_0x5a667b(0x1ea)]===0x0)throw CliErrors['validation'](_0x5a667b(0x206));if(_0x174a38[_0x5a667b(0x1ea)]>0x1)throw CliErrors[_0x5a667b(0x1f5)](_0x5a667b(0x205));},async 'dryRun'(_0x45394e){const _0x2d109f=a75_0xec58,_0x47e62b=await resolveTargets(_0x45394e);return{'method':_0x2d109f(0x1df),'url':_0x2d109f(0x203),'body':{'appCode':_0x45394e[_0x2d109f(0x1d1)],'count':_0x47e62b[_0x2d109f(0x1ea)],'datasets':_0x47e62b},'description':_0x2d109f(0x1e5)+_0x47e62b[_0x2d109f(0x1ea)]+'\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.'};},async 'execute'(_0x62729b){const _0x37b823=a75_0xec58;if(!_0x62729b[_0x37b823(0x1e2)](_0x37b823(0x201)))throw CliErrors[_0x37b823(0x1f5)]('--confirm\x20is\x20required\x20to\x20restore\x20datasets.',_0x37b823(0x202));const _0x193d9d=await resolveTargets(_0x62729b),_0x58a298=[],_0x4960c7=[];for(const _0x11455b of _0x193d9d){try{await restoreDataset(_0x62729b['appCode'],_0x11455b['id']),_0x58a298[_0x37b823(0x204)](_0x11455b);}catch(_0x5a3e36){_0x4960c7[_0x37b823(0x204)]({..._0x11455b,'error':_0x5a3e36 instanceof Error?_0x5a3e36[_0x37b823(0x200)]:String(_0x5a3e36)});}}if(_0x4960c7[_0x37b823(0x1ea)]>0x0)return{'ok':![],'data':{'requested':_0x193d9d[_0x37b823(0x1ea)],'restoredCount':_0x58a298[_0x37b823(0x1ea)],'failedCount':_0x4960c7[_0x37b823(0x1ea)],'restored':_0x58a298,'failed':_0x4960c7},'message':_0x37b823(0x1ec)+_0x58a298[_0x37b823(0x1ea)]+'/'+_0x193d9d[_0x37b823(0x1ea)]+_0x37b823(0x1f6)+_0x4960c7[_0x37b823(0x1ea)]+_0x37b823(0x1fd)};return{'ok':!![],'data':{'requested':_0x193d9d[_0x37b823(0x1ea)],'restoredCount':_0x58a298[_0x37b823(0x1ea)],'restored':_0x58a298},'message':_0x37b823(0x1ec)+_0x58a298[_0x37b823(0x1ea)]+'\x20dataset(s)'};}};async function resolveTargets(_0x80e15e){const _0x7b6e81=a75_0xec58,_0x51a07e=_0x80e15e[_0x7b6e81(0x1f8)]('id'),_0x1d9e04=_0x80e15e['str'](_0x7b6e81(0x1e7)),_0x21636a=_0x80e15e[_0x7b6e81(0x1f8)](_0x7b6e81(0x1fc));let _0x4207c0;_0x1d9e04?(_0x4207c0=await listDatasets(_0x80e15e[_0x7b6e81(0x1d1)],{'code':_0x1d9e04,'deleted':!![]}),_0x4207c0=_0x4207c0['filter'](_0x401c2b=>_0x401c2b[_0x7b6e81(0x1e7)]===_0x1d9e04)):(_0x4207c0=await listDatasets(_0x80e15e[_0x7b6e81(0x1d1)],{'deleted':!![]}),_0x51a07e>0x0&&(_0x4207c0=_0x4207c0[_0x7b6e81(0x1db)](_0xef84de=>_0xef84de['id']===_0x51a07e)),_0x21636a>0x0&&(_0x4207c0=_0x4207c0[_0x7b6e81(0x1db)](_0x3d5fde=>_0x3d5fde[_0x7b6e81(0x1f1)]?.[_0x7b6e81(0x1e8)]===_0x21636a)));const _0x405220=_0x4207c0['map'](normalizeTarget);if(_0x405220['length']===0x0){const _0xc46887=_0x1d9e04||(_0x51a07e>0x0?_0x7b6e81(0x1d5)+_0x51a07e:_0x7b6e81(0x1f4)+_0x21636a);throw CliErrors[_0x7b6e81(0x1f5)](_0x7b6e81(0x1fa)+_0xc46887+'.');}const _0x1b27be=_0x80e15e['num'](_0x7b6e81(0x1d2));if(_0x1b27be>0x0&&_0x405220[_0x7b6e81(0x1ea)]!==_0x1b27be)throw CliErrors['validation'](_0x7b6e81(0x1d7)+_0x405220[_0x7b6e81(0x1ea)]+_0x7b6e81(0x1eb)+_0x1b27be+'.');return _0x405220;}function a75_0x49c0(_0x95d155,_0x1888aa){_0x95d155=_0x95d155-0x1d0;const _0xd2b3a6=a75_0xd2b3();let _0x49c0d5=_0xd2b3a6[_0x95d155];return _0x49c0d5;}function normalizeTarget(_0x495947){const _0x13925f=a75_0xec58,_0xd87f1f=_0x495947[_0x13925f(0x1f1)]??{};return{'id':_0x495947['id'],'code':_0x495947['code'],'name':_0x495947[_0x13925f(0x1dc)],'description':_0x495947['description'],'source':_0x495947[_0x13925f(0x1ef)],'dbId':_0xd87f1f[_0x13925f(0x1e8)],'dbName':_0xd87f1f[_0x13925f(0x1d0)],'tableName':_0xd87f1f[_0x13925f(0x1dd)],'relatedPageCount':Array['isArray'](_0x495947[_0x13925f(0x1f7)])?_0x495947['relationPages'][_0x13925f(0x1ea)]:undefined};}function a75_0xd2b3(){const _0x1732c7=['980780NPAeFn','dbid=','validation','\x20dataset(s);\x20','relationPages','num','7916435aYWQbF','No\x20deleted\x20dataset\x20found\x20for\x20','17776QHtLbE','dbid','\x20failed','dataset','str','message','confirm','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','/smartapi/dataset/restore-dataset','push','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','dbName','appCode','expected-count','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','id=','2823216nUoEBd','Matched\x20','boolean','number','2286rQQmqC','filter','name','tableName','52603WGaWkr','POST','42590YglyYz','1356OnbGoq','bool','Required\x20to\x20execute\x20dataset\x20restore','34tRClwZ','Would\x20restore\x20','Dataset\x20id','code','dbId','high-risk-write','length','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Restored\x20','46963kAmKSL','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','source','3ReltuJ','dbtableConfig','4008VTqAhd'];a75_0xd2b3=function(){return _0x1732c7;};return a75_0xd2b3();}
1
+ function a76_0x22d0(_0x115c95,_0x36ce91){_0x115c95=_0x115c95-0x19b;const _0x1209b8=a76_0x1209();let _0x22d0d2=_0x1209b8[_0x115c95];return _0x22d0d2;}const a76_0x1d031f=a76_0x22d0;(function(_0x3d7664,_0x25e93b){const _0x13416e=a76_0x22d0,_0x3685a2=_0x3d7664();while(!![]){try{const _0x3687d4=-parseInt(_0x13416e(0x1c3))/0x1*(-parseInt(_0x13416e(0x1b5))/0x2)+parseInt(_0x13416e(0x1b2))/0x3+-parseInt(_0x13416e(0x1a1))/0x4+-parseInt(_0x13416e(0x19e))/0x5*(parseInt(_0x13416e(0x1a2))/0x6)+parseInt(_0x13416e(0x1c0))/0x7*(-parseInt(_0x13416e(0x1c4))/0x8)+parseInt(_0x13416e(0x19d))/0x9+-parseInt(_0x13416e(0x1ae))/0xa;if(_0x3687d4===_0x25e93b)break;else _0x3685a2['push'](_0x3685a2['shift']());}catch(_0x32363e){_0x3685a2['push'](_0x3685a2['shift']());}}}(a76_0x1209,0xe0f7e));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';function a76_0x1209(){const _0x215f4b=['length','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','2BjVgIj','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','Required\x20to\x20execute\x20dataset\x20restore','Matched\x20','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','source','\x20failed','appCode','\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.','validation','329GuQwvR','confirm','number','1514612aQtDtg','13128zyJNCs','/smartapi/dataset/restore-dataset','POST','high-risk-write','filter','\x20dataset(s);\x20','dbid=','7857540VIhgkJ','15sIVBWe','isArray','bool','4193924WTAVEC','2457198oFPtYQ','id=','dbid','Restored\x20','dbName','dbId','push','num','dbtableConfig','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','tableName','expected-count','2088650LWCsSi','restore','code','str','3290610KmyDtp'];a76_0x1209=function(){return _0x215f4b;};return a76_0x1209();}const DATASET_ID_FLAG={'name':'id','type':a76_0x1d031f(0x1c2),'description':'Dataset\x20id'},DBID_FLAG={'name':'dbid','type':a76_0x1d031f(0x1c2),'description':a76_0x1d031f(0x1b9)},CONFIRM_FLAG={'name':a76_0x1d031f(0x1c1),'type':'boolean','description':a76_0x1d031f(0x1b7)},EXPECTED_COUNT_FLAG={'name':a76_0x1d031f(0x1ad),'type':a76_0x1d031f(0x1c2),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetRestore={'service':'dataset','command':a76_0x1d031f(0x1af),'description':'Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','risk':a76_0x1d031f(0x1c7),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xb24a44){const _0xdfbae7=a76_0x1d031f,_0x5cfac1=_0xb24a44[_0xdfbae7(0x1a9)]('id'),_0x1771c9=_0xb24a44[_0xdfbae7(0x1b1)](_0xdfbae7(0x1b0)),_0x517318=_0xb24a44[_0xdfbae7(0x1a9)](_0xdfbae7(0x1a4)),_0x2cf821=[_0x5cfac1>0x0,Boolean(_0x1771c9),_0x517318>0x0][_0xdfbae7(0x1c8)](Boolean);if(_0x2cf821['length']===0x0)throw CliErrors[_0xdfbae7(0x1bf)](_0xdfbae7(0x1ba));if(_0x2cf821[_0xdfbae7(0x1b3)]>0x1)throw CliErrors[_0xdfbae7(0x1bf)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x8ba2cc){const _0x1662c2=a76_0x1d031f,_0x4fbb72=await resolveTargets(_0x8ba2cc);return{'method':_0x1662c2(0x1c6),'url':_0x1662c2(0x1c5),'body':{'appCode':_0x8ba2cc['appCode'],'count':_0x4fbb72[_0x1662c2(0x1b3)],'datasets':_0x4fbb72},'description':'Would\x20restore\x20'+_0x4fbb72[_0x1662c2(0x1b3)]+_0x1662c2(0x1be)};},async 'execute'(_0x3e38d1){const _0x584c12=a76_0x1d031f;if(!_0x3e38d1[_0x584c12(0x1a0)](_0x584c12(0x1c1)))throw CliErrors[_0x584c12(0x1bf)](_0x584c12(0x1b6),_0x584c12(0x1ab));const _0x49ad99=await resolveTargets(_0x3e38d1),_0x123113=[],_0x5c78ca=[];for(const _0x31bc43 of _0x49ad99){try{await restoreDataset(_0x3e38d1[_0x584c12(0x1bd)],_0x31bc43['id']),_0x123113[_0x584c12(0x1a8)](_0x31bc43);}catch(_0x1d35c1){_0x5c78ca[_0x584c12(0x1a8)]({..._0x31bc43,'error':_0x1d35c1 instanceof Error?_0x1d35c1['message']:String(_0x1d35c1)});}}if(_0x5c78ca[_0x584c12(0x1b3)]>0x0)return{'ok':![],'data':{'requested':_0x49ad99['length'],'restoredCount':_0x123113[_0x584c12(0x1b3)],'failedCount':_0x5c78ca['length'],'restored':_0x123113,'failed':_0x5c78ca},'message':'Restored\x20'+_0x123113[_0x584c12(0x1b3)]+'/'+_0x49ad99['length']+_0x584c12(0x19b)+_0x5c78ca['length']+_0x584c12(0x1bc)};return{'ok':!![],'data':{'requested':_0x49ad99['length'],'restoredCount':_0x123113['length'],'restored':_0x123113},'message':_0x584c12(0x1a5)+_0x123113['length']+'\x20dataset(s)'};}};async function resolveTargets(_0x15bf09){const _0x4178ff=a76_0x1d031f,_0x1b1f3c=_0x15bf09[_0x4178ff(0x1a9)]('id'),_0x527c79=_0x15bf09[_0x4178ff(0x1b1)](_0x4178ff(0x1b0)),_0x373e11=_0x15bf09[_0x4178ff(0x1a9)](_0x4178ff(0x1a4));let _0x4e3dc7;_0x527c79?(_0x4e3dc7=await listDatasets(_0x15bf09[_0x4178ff(0x1bd)],{'code':_0x527c79,'deleted':!![]}),_0x4e3dc7=_0x4e3dc7['filter'](_0x4552fc=>_0x4552fc[_0x4178ff(0x1b0)]===_0x527c79)):(_0x4e3dc7=await listDatasets(_0x15bf09['appCode'],{'deleted':!![]}),_0x1b1f3c>0x0&&(_0x4e3dc7=_0x4e3dc7[_0x4178ff(0x1c8)](_0x1ef5a4=>_0x1ef5a4['id']===_0x1b1f3c)),_0x373e11>0x0&&(_0x4e3dc7=_0x4e3dc7[_0x4178ff(0x1c8)](_0x8d5153=>_0x8d5153[_0x4178ff(0x1aa)]?.[_0x4178ff(0x1a7)]===_0x373e11)));const _0x26fc9a=_0x4e3dc7['map'](normalizeTarget);if(_0x26fc9a[_0x4178ff(0x1b3)]===0x0){const _0x32ae1f=_0x527c79||(_0x1b1f3c>0x0?_0x4178ff(0x1a3)+_0x1b1f3c:_0x4178ff(0x19c)+_0x373e11);throw CliErrors[_0x4178ff(0x1bf)]('No\x20deleted\x20dataset\x20found\x20for\x20'+_0x32ae1f+'.');}const _0x113b47=_0x15bf09[_0x4178ff(0x1a9)](_0x4178ff(0x1ad));if(_0x113b47>0x0&&_0x26fc9a[_0x4178ff(0x1b3)]!==_0x113b47)throw CliErrors[_0x4178ff(0x1bf)](_0x4178ff(0x1b8)+_0x26fc9a[_0x4178ff(0x1b3)]+_0x4178ff(0x1b4)+_0x113b47+'.');return _0x26fc9a;}function normalizeTarget(_0x71eb2f){const _0x2dc77b=a76_0x1d031f,_0x74cf40=_0x71eb2f['dbtableConfig']??{};return{'id':_0x71eb2f['id'],'code':_0x71eb2f[_0x2dc77b(0x1b0)],'name':_0x71eb2f['name'],'description':_0x71eb2f['description'],'source':_0x71eb2f[_0x2dc77b(0x1bb)],'dbId':_0x74cf40['dbId'],'dbName':_0x74cf40[_0x2dc77b(0x1a6)],'tableName':_0x74cf40[_0x2dc77b(0x1ac)],'relatedPageCount':Array[_0x2dc77b(0x19f)](_0x71eb2f['relationPages'])?_0x71eb2f['relationPages'][_0x2dc77b(0x1b3)]:undefined};}
@@ -1 +1 @@
1
- const a76_0x3a6330=a76_0x1281;function a76_0x1281(_0x33f457,_0x43a59a){_0x33f457=_0x33f457-0x1d5;const _0x222af6=a76_0x222a();let _0x1281c6=_0x222af6[_0x33f457];return _0x1281c6;}(function(_0x39f046,_0x1b6dd5){const _0xedcb30=a76_0x1281,_0x42207f=_0x39f046();while(!![]){try{const _0x4d6bb9=parseInt(_0xedcb30(0x1de))/0x1+parseInt(_0xedcb30(0x1e2))/0x2*(-parseInt(_0xedcb30(0x1e5))/0x3)+-parseInt(_0xedcb30(0x1d7))/0x4*(parseInt(_0xedcb30(0x1d5))/0x5)+-parseInt(_0xedcb30(0x1e4))/0x6+-parseInt(_0xedcb30(0x1d6))/0x7*(-parseInt(_0xedcb30(0x1dc))/0x8)+-parseInt(_0xedcb30(0x1d8))/0x9+parseInt(_0xedcb30(0x1e1))/0xa*(parseInt(_0xedcb30(0x1d9))/0xb);if(_0x4d6bb9===_0x1b6dd5)break;else _0x42207f['push'](_0x42207f['shift']());}catch(_0x2a9dec){_0x42207f['push'](_0x42207f['shift']());}}}(a76_0x222a,0xa8dfc));import{cancelDbAnalysis,getDbLinkInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a76_0x222a(){const _0x1b2998=['18tUdLAw','str','Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)','5lhNclN','7itPNBJ','5444508WqnhSb','8030421SCSCXd','1309HOkdhO','string','plan','2425168urzhzZ','No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.','905865fQZxRH','latestAnalysisTraceId','validation','362210QlwlBh','429034vwDpCz','Cancel\x20requested\x20for\x20plan\x20','7722624KcZezC'];a76_0x222a=function(){return _0x1b2998;};return a76_0x222a();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':'analyze-cancel','description':'Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a76_0x3a6330(0x1db),'type':a76_0x3a6330(0x1da),'description':a76_0x3a6330(0x1e7)}],async 'execute'(_0x4cc313){const _0x267729=a76_0x3a6330,_0x1af432=_0x4cc313['num']('id');let _0x289e76=_0x4cc313[_0x267729(0x1e6)](_0x267729(0x1db))||undefined;if(!_0x289e76){const _0x23bdb2=await getDbLinkInfo(_0x1af432);_0x289e76=_0x23bdb2[_0x267729(0x1df)]??undefined;if(!_0x289e76)throw CliErrors[_0x267729(0x1e0)](_0x267729(0x1dd),'Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.');}return await cancelDbAnalysis(_0x289e76),{'ok':!![],'data':{'dbLinkId':_0x1af432,'planId':_0x289e76},'message':_0x267729(0x1e3)+_0x289e76};}};
1
+ const a77_0x26c3cf=a77_0x4310;function a77_0x1354(){const _0x567239=['1002129AKspua','4980213McFkku','write','6544475PFEnOV','6wAiYrr','22492880QZmDua','num','10Vzzvoz','174215QfomyT','424moMEld','60759RjmIZo','6517144uefgoP','Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','plan'];a77_0x1354=function(){return _0x567239;};return a77_0x1354();}(function(_0x537b32,_0x46f411){const _0x1756f1=a77_0x4310,_0x225985=_0x537b32();while(!![]){try{const _0x429610=-parseInt(_0x1756f1(0x88))/0x1*(-parseInt(_0x1756f1(0x87))/0x2)+-parseInt(_0x1756f1(0x8e))/0x3+parseInt(_0x1756f1(0x8b))/0x4+parseInt(_0x1756f1(0x91))/0x5+-parseInt(_0x1756f1(0x92))/0x6*(parseInt(_0x1756f1(0x8f))/0x7)+-parseInt(_0x1756f1(0x89))/0x8*(-parseInt(_0x1756f1(0x8a))/0x9)+-parseInt(_0x1756f1(0x85))/0xa;if(_0x429610===_0x46f411)break;else _0x225985['push'](_0x225985['shift']());}catch(_0x484de2){_0x225985['push'](_0x225985['shift']());}}}(a77_0x1354,0xd4f4d));import{cancelDbAnalysis}from'../../core/api-client.js';function a77_0x4310(_0x5901d3,_0xe4f7f2){_0x5901d3=_0x5901d3-0x85;const _0x135484=a77_0x1354();let _0x431087=_0x135484[_0x5901d3];return _0x431087;}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':'analyze-cancel','description':a77_0x26c3cf(0x8c),'risk':a77_0x26c3cf(0x90),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a77_0x26c3cf(0x8d),'type':'string','required':!![],'description':'Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel'}],async 'execute'(_0x1c44d6){const _0x30c6c5=a77_0x26c3cf,_0x5d786c=_0x1c44d6[_0x30c6c5(0x86)]('id'),_0xd9c646=_0x1c44d6['str'](_0x30c6c5(0x8d));return await cancelDbAnalysis(_0xd9c646),{'ok':!![],'data':{'dbLinkId':_0x5d786c,'planId':_0xd9c646},'message':'Cancel\x20requested\x20for\x20plan\x20'+_0xd9c646};}};
@@ -1 +1 @@
1
- const a77_0x444bf2=a77_0x1c7a;function a77_0x1c7a(_0x4138d8,_0x1e4b6d){_0x4138d8=_0x4138d8-0x140;const _0x1e678f=a77_0x1e67();let _0x1c7a67=_0x1e678f[_0x4138d8];return _0x1c7a67;}function a77_0x1e67(){const _0x18cdeb=['filter','Started\x20analysis\x20for\x20db\x20link\x20','26924QNFOOu','10642000IrWcAB','str','205UAUPLS','tables','1044333MtXWlR','9iXsSPj','330295zjQvaE','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','split','trim','9460130CAwopf','analyze-start','15wqLDaY','string','23279718BRMcll','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','appCode','274578dTxYPx','120UzNlvc'];a77_0x1e67=function(){return _0x18cdeb;};return a77_0x1e67();}(function(_0x570910,_0x4d8f06){const _0x261c30=a77_0x1c7a,_0x515d42=_0x570910();while(!![]){try{const _0x7d3410=parseInt(_0x261c30(0x153))/0x1+parseInt(_0x261c30(0x14a))/0x2*(-parseInt(_0x261c30(0x145))/0x3)+parseInt(_0x261c30(0x14e))/0x4*(-parseInt(_0x261c30(0x151))/0x5)+-parseInt(_0x261c30(0x14b))/0x6*(parseInt(_0x261c30(0x155))/0x7)+-parseInt(_0x261c30(0x14f))/0x8+-parseInt(_0x261c30(0x154))/0x9*(-parseInt(_0x261c30(0x143))/0xa)+parseInt(_0x261c30(0x147))/0xb;if(_0x7d3410===_0x4d8f06)break;else _0x515d42['push'](_0x515d42['shift']());}catch(_0x2112ca){_0x515d42['push'](_0x515d42['shift']());}}}(a77_0x1e67,0xd47ae));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStart={'service':'db','command':a77_0x444bf2(0x144),'description':a77_0x444bf2(0x148),'risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a77_0x444bf2(0x152),'type':a77_0x444bf2(0x146),'description':a77_0x444bf2(0x140)}],async 'execute'(_0x2ebe66){const _0x3ae1e5=a77_0x444bf2,_0x534bde=_0x2ebe66['num']('id'),_0xbe98d6=_0x2ebe66[_0x3ae1e5(0x150)](_0x3ae1e5(0x152)),_0x40e9f7=_0xbe98d6?_0xbe98d6[_0x3ae1e5(0x141)](',')['map'](_0x8d8f14=>_0x8d8f14[_0x3ae1e5(0x142)]())[_0x3ae1e5(0x14c)](Boolean):undefined,_0x3809d6=await startDbAnalysis(_0x534bde,_0x40e9f7),_0x52da0a=buildDbPageLinks(_0x2ebe66[_0x3ae1e5(0x149)],_0x534bde);return{'ok':!![],'data':{'dbLinkId':_0x534bde,'planId':_0x3809d6,'tableNames':_0x40e9f7??[],..._0x52da0a?{'links':_0x52da0a}:{}},'message':_0x3ae1e5(0x14d)+_0x534bde};}};
1
+ const a78_0x4a032f=a78_0x3466;function a78_0x2326(){const _0xf6076c=['analyze-start','appCode','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','4851628TdYagZ','1258427MRYWlD','tables','33561520ZspAON','1310tRNMXl','Started\x20analysis\x20for\x20db\x20link\x20','map','3995235NFxnYo','1778TpJHQQ','19064PYIZGX','num','string','30204DzcoJU','9ZdpFzg','1329176dzMACK','str'];a78_0x2326=function(){return _0xf6076c;};return a78_0x2326();}(function(_0x8235fa,_0x435471){const _0x3bf515=a78_0x3466,_0x1a32f3=_0x8235fa();while(!![]){try{const _0x4f0128=-parseInt(_0x3bf515(0x158))/0x1+parseInt(_0x3bf515(0x152))/0x2+parseInt(_0x3bf515(0x15e))/0x3+-parseInt(_0x3bf515(0x157))/0x4+parseInt(_0x3bf515(0x15b))/0x5*(-parseInt(_0x3bf515(0x150))/0x6)+-parseInt(_0x3bf515(0x15f))/0x7*(parseInt(_0x3bf515(0x160))/0x8)+-parseInt(_0x3bf515(0x151))/0x9*(-parseInt(_0x3bf515(0x15a))/0xa);if(_0x4f0128===_0x435471)break;else _0x1a32f3['push'](_0x1a32f3['shift']());}catch(_0x54a30a){_0x1a32f3['push'](_0x1a32f3['shift']());}}}(a78_0x2326,0xe9a21));function a78_0x3466(_0x2af4d0,_0x549782){_0x2af4d0=_0x2af4d0-0x14e;const _0x2326bf=a78_0x2326();let _0x3466dd=_0x2326bf[_0x2af4d0];return _0x3466dd;}import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStart={'service':'db','command':a78_0x4a032f(0x154),'description':'Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a78_0x4a032f(0x159),'type':a78_0x4a032f(0x14f),'description':a78_0x4a032f(0x156)}],async 'execute'(_0x349106){const _0x8bee5f=a78_0x4a032f,_0x5ba391=_0x349106[_0x8bee5f(0x14e)]('id'),_0x2a5a78=_0x349106[_0x8bee5f(0x153)](_0x8bee5f(0x159)),_0xc2839b=_0x2a5a78?_0x2a5a78['split'](',')[_0x8bee5f(0x15d)](_0x35f33a=>_0x35f33a['trim']())['filter'](Boolean):undefined,_0x2a3e67=await startDbAnalysis(_0x5ba391,_0xc2839b),_0x459290=buildDbPageLinks(_0x349106[_0x8bee5f(0x155)],_0x5ba391);return{'ok':!![],'data':{'dbLinkId':_0x5ba391,'planId':_0x2a3e67,'tableNames':_0xc2839b??[],..._0x459290?{'links':_0x459290}:{}},'message':_0x8bee5f(0x15c)+_0x5ba391};}};
@@ -1 +1 @@
1
- const a78_0x494da1=a78_0xf683;(function(_0x4d630f,_0x159bf9){const _0x1f6256=a78_0xf683,_0x4efc14=_0x4d630f();while(!![]){try{const _0x1ac214=parseInt(_0x1f6256(0x88))/0x1*(parseInt(_0x1f6256(0x77))/0x2)+-parseInt(_0x1f6256(0x89))/0x3+-parseInt(_0x1f6256(0x7b))/0x4+-parseInt(_0x1f6256(0x81))/0x5*(parseInt(_0x1f6256(0x73))/0x6)+-parseInt(_0x1f6256(0x7d))/0x7+-parseInt(_0x1f6256(0x71))/0x8*(-parseInt(_0x1f6256(0x76))/0x9)+parseInt(_0x1f6256(0x85))/0xa;if(_0x1ac214===_0x159bf9)break;else _0x4efc14['push'](_0x4efc14['shift']());}catch(_0x45d660){_0x4efc14['push'](_0x4efc14['shift']());}}}(a78_0x3744,0x55a2b));function a78_0xf683(_0x5775cf,_0x2f08e1){_0x5775cf=_0x5775cf-0x6e;const _0x37440e=a78_0x3744();let _0xf683ea=_0x37440e[_0x5775cf];return _0xf683ea;}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([a78_0x494da1(0x74),a78_0x494da1(0x7c),a78_0x494da1(0x84),a78_0x494da1(0x8b)]);export const dbAnalyzeStatus={'service':'db','command':a78_0x494da1(0x87),'description':a78_0x494da1(0x8e),'risk':a78_0x494da1(0x86),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a78_0x494da1(0x72),'type':a78_0x494da1(0x83),'required':!![],'description':a78_0x494da1(0x8f)}],async 'execute'(_0xb06918){const _0x401a24=a78_0x494da1,_0x3951bd=_0xb06918['num']('id'),_0x22cd38=_0xb06918['str'](_0x401a24(0x72)),_0x16f84b=await getDbAnalysisStatus(_0x22cd38),_0xa9ae2f=TERMINAL_STATUSES[_0x401a24(0x75)](_0x16f84b[_0x401a24(0x6f)]??''),{parsedJobContext:_0x58f92e,jobContextParseWarning:_0x1b8278}=parseJobContext(_0x16f84b[_0x401a24(0x78)]),_0xed8495=buildDbPageLinks(_0xb06918['appCode'],_0x3951bd);return{'ok':!![],'data':{'dbLinkId':_0x3951bd,'planId':_0x22cd38,'status':_0x16f84b,'parsedJobContext':_0x58f92e,'isTerminal':_0xa9ae2f,'isRetrying':_0x16f84b['status']===_0x401a24(0x7a),'elapsedMs':calculateElapsedMs(_0x16f84b,_0xa9ae2f),'jobContextParseWarning':_0x1b8278,..._0xed8495?{'links':_0xed8495}:{}},'message':'Analysis\x20status\x20for\x20'+_0x22cd38};}};function a78_0x3744(){const _0x5089f4=['status','isArray','8bwtRiD','plan','6RJmopW','SUCCESS','has','2795382Qwbgwm','2HTvIzr','jobContext','isFinite','RETRYING','1192864nwmLCg','PARTIAL_SUCCESS','3506118bglEgq','endTime','parse','number','1068595aBgEXU','trim','string','FAILED','6679890AwXCEE','read','analyze-status','575147UxUgWW','570486WxQoSP','object','CANCELLED','isNaN','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','costTimeMs'];a78_0x3744=function(){return _0x5089f4;};return a78_0x3744();}function parseJobContext(_0x41ccc5){const _0x536f35=a78_0x494da1;if(!_0x41ccc5?.['trim']())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x547a09=JSON[_0x536f35(0x7f)](_0x41ccc5);if(_0x547a09&&typeof _0x547a09===_0x536f35(0x8a)&&!Array[_0x536f35(0x70)](_0x547a09))return{'parsedJobContext':_0x547a09,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x536f35(0x8d)};}function calculateElapsedMs(_0x201cc8,_0x4b22bb){const _0x42b7d7=a78_0x494da1;if(typeof _0x201cc8[_0x42b7d7(0x6e)]===_0x42b7d7(0x80)&&Number['isFinite'](_0x201cc8['costTimeMs'])&&_0x201cc8['costTimeMs']>=0x0)return _0x201cc8[_0x42b7d7(0x6e)];const _0xcb0039=toTimestamp(_0x201cc8['startTime']);if(_0xcb0039===null)return null;const _0x34b7fe=toTimestamp(_0x201cc8[_0x42b7d7(0x7e)]),_0x1eb4d9=_0x34b7fe??(_0x4b22bb?null:Date['now']());if(_0x1eb4d9===null||_0x1eb4d9<_0xcb0039)return null;return _0x1eb4d9-_0xcb0039;}function toTimestamp(_0x33a690){const _0x34453a=a78_0x494da1;if(typeof _0x33a690==='number')return Number[_0x34453a(0x79)](_0x33a690)?_0x33a690:null;if(typeof _0x33a690!=='string'||_0x33a690[_0x34453a(0x82)]()==='')return null;const _0x393106=Number(_0x33a690);if(Number[_0x34453a(0x79)](_0x393106))return _0x393106;const _0x1da9ae=Date[_0x34453a(0x7f)](_0x33a690);return Number[_0x34453a(0x8c)](_0x1da9ae)?null:_0x1da9ae;}
1
+ const a79_0x3e1a35=a79_0x92de;(function(_0x205551,_0x1de0b6){const _0x34c4a1=a79_0x92de,_0x23fdbf=_0x205551();while(!![]){try{const _0x40a63e=parseInt(_0x34c4a1(0xcc))/0x1+-parseInt(_0x34c4a1(0xc1))/0x2*(parseInt(_0x34c4a1(0xd2))/0x3)+-parseInt(_0x34c4a1(0xe3))/0x4*(-parseInt(_0x34c4a1(0xdb))/0x5)+parseInt(_0x34c4a1(0xd9))/0x6+parseInt(_0x34c4a1(0xd6))/0x7*(-parseInt(_0x34c4a1(0xc2))/0x8)+parseInt(_0x34c4a1(0xce))/0x9*(parseInt(_0x34c4a1(0xc4))/0xa)+parseInt(_0x34c4a1(0xc5))/0xb*(-parseInt(_0x34c4a1(0xe6))/0xc);if(_0x40a63e===_0x1de0b6)break;else _0x23fdbf['push'](_0x23fdbf['shift']());}catch(_0x2692e1){_0x23fdbf['push'](_0x23fdbf['shift']());}}}(a79_0x2fe5,0x93efb));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a79_0x2fe5(){const _0xce2bb9=['trim','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','449099Titfzn','keys','isNaN','1685796cnycct','RETRYING','5pfpRPJ','isArray','status','string','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','plan','number','PARTIAL_SUCCESS','3811532UyYnAB','str','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','2421696drmVrH','Analysis\x20status\x20for\x20','accumulatedErrorTypeCounts','appCode','16XROxTY','144kFdiJo','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','20MPeHPw','22paCHOs','num','costTimeMs','parse','isFinite','endTime','has','899942GCpMcn','CANCELLED','1224675WHItmm','now','SUCCESS','object','90582gdHjeQ','length'];a79_0x2fe5=function(){return _0xce2bb9;};return a79_0x2fe5();}const TERMINAL_STATUSES=new Set([a79_0x3e1a35(0xd0),a79_0x3e1a35(0xe2),'FAILED',a79_0x3e1a35(0xcd)]);export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a79_0x3e1a35(0xdf),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a79_0x3e1a35(0xe0),'type':a79_0x3e1a35(0xde),'required':!![],'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)'}],async 'execute'(_0x4661a8){const _0x446759=a79_0x3e1a35,_0x3abd12=_0x4661a8[_0x446759(0xc6)]('id'),_0x3c701e=_0x4661a8[_0x446759(0xe4)](_0x446759(0xe0)),_0x321653=await getDbAnalysisStatus(_0x3c701e),_0x11864a=TERMINAL_STATUSES[_0x446759(0xcb)](_0x321653[_0x446759(0xdd)]??''),{parsedJobContext:_0x13d819,jobContextParseWarning:_0x37aa59}=parseJobContext(_0x321653['jobContext']),_0x3ba498=readAccumulatedErrorTypeCounts(_0x13d819),_0xdfdc0=buildDbPageLinks(_0x4661a8[_0x446759(0xe9)],_0x3abd12);return{'ok':!![],'data':{'dbLinkId':_0x3abd12,'planId':_0x3c701e,'status':_0x321653,'parsedJobContext':_0x13d819,'accumulatedErrorTypeCounts':_0x3ba498,'accumulatedErrorTypeCountsAdvisory':_0x3ba498?_0x446759(0xc3):_0x446759(0xd5),'isTerminal':_0x11864a,'isRetrying':_0x321653[_0x446759(0xdd)]===_0x446759(0xda),'elapsedMs':calculateElapsedMs(_0x321653,_0x11864a),'jobContextParseWarning':_0x37aa59,..._0xdfdc0?{'links':_0xdfdc0}:{}},'message':_0x446759(0xe7)+_0x3c701e};}};function a79_0x92de(_0x3549df,_0x205e38){_0x3549df=_0x3549df-0xc1;const _0x2fe509=a79_0x2fe5();let _0x92dec5=_0x2fe509[_0x3549df];return _0x92dec5;}function readAccumulatedErrorTypeCounts(_0x4f4cbc){const _0x575f44=a79_0x3e1a35,_0x3902e4=_0x4f4cbc?.[_0x575f44(0xe8)];if(!_0x3902e4||typeof _0x3902e4!==_0x575f44(0xd1)||Array[_0x575f44(0xdc)](_0x3902e4))return null;if(Object[_0x575f44(0xd7)](_0x3902e4)[_0x575f44(0xd3)]===0x0)return null;return _0x3902e4;}function parseJobContext(_0x2009e6){const _0x587102=a79_0x3e1a35;if(!_0x2009e6?.[_0x587102(0xd4)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x566736=JSON['parse'](_0x2009e6);if(_0x566736&&typeof _0x566736==='object'&&!Array[_0x587102(0xdc)](_0x566736))return{'parsedJobContext':_0x566736,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x587102(0xe5)};}function calculateElapsedMs(_0x54e2a5,_0x579659){const _0x2395bb=a79_0x3e1a35;if(typeof _0x54e2a5['costTimeMs']==='number'&&Number[_0x2395bb(0xc9)](_0x54e2a5[_0x2395bb(0xc7)])&&_0x54e2a5['costTimeMs']>=0x0)return _0x54e2a5[_0x2395bb(0xc7)];const _0x193314=toTimestamp(_0x54e2a5['startTime']);if(_0x193314===null)return null;const _0x9b2cea=toTimestamp(_0x54e2a5[_0x2395bb(0xca)]),_0x50c51c=_0x9b2cea??(_0x579659?null:Date[_0x2395bb(0xcf)]());if(_0x50c51c===null||_0x50c51c<_0x193314)return null;return _0x50c51c-_0x193314;}function toTimestamp(_0x32e778){const _0x4e17eb=a79_0x3e1a35;if(typeof _0x32e778===_0x4e17eb(0xe1))return Number['isFinite'](_0x32e778)?_0x32e778:null;if(typeof _0x32e778!==_0x4e17eb(0xde)||_0x32e778[_0x4e17eb(0xd4)]()==='')return null;const _0x30545b=Number(_0x32e778);if(Number[_0x4e17eb(0xc9)](_0x30545b))return _0x30545b;const _0x5c9494=Date[_0x4e17eb(0xc8)](_0x32e778);return Number[_0x4e17eb(0xd8)](_0x5c9494)?null:_0x5c9494;}
@@ -1 +1 @@
1
- const a79_0x4c7433=a79_0x2bec;(function(_0x5b8a68,_0x30ba52){const _0xd389a7=a79_0x2bec,_0x5aa51c=_0x5b8a68();while(!![]){try{const _0xb810f4=parseInt(_0xd389a7(0x77))/0x1+-parseInt(_0xd389a7(0x76))/0x2*(parseInt(_0xd389a7(0x81))/0x3)+parseInt(_0xd389a7(0x83))/0x4*(parseInt(_0xd389a7(0x88))/0x5)+parseInt(_0xd389a7(0x93))/0x6*(-parseInt(_0xd389a7(0x8b))/0x7)+-parseInt(_0xd389a7(0x66))/0x8*(-parseInt(_0xd389a7(0x71))/0x9)+parseInt(_0xd389a7(0x69))/0xa+-parseInt(_0xd389a7(0x80))/0xb;if(_0xb810f4===_0x30ba52)break;else _0x5aa51c['push'](_0x5aa51c['shift']());}catch(_0x53dc40){_0x5aa51c['push'](_0x5aa51c['shift']());}}}(a79_0x4546,0x8a44c));function a79_0x4546(){const _0x5c60cf=['After\x20create,\x20start\x20schema\x20analysis','2364462fXQPyQ','dburl','message','dbname','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','252982zOGVLr','882838uZWZBj','\x20and\x20started\x20analysis','bool','username','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','dbdesc','str','string','dbversion','2796750AMnHcR','18xecPFH','databasePage','188OGwAfN','autostart','No\x20follow-up\x20analysis','Host\x20and\x20port:\x20host:port','Database\x20password','84765EOldZf','[redacted]','Extra\x20JDBC-style\x20connection\x20parameters\x20string','266WWxmIB','Database\x20username','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','dbparam','/smartapi/dblink/create','join','appCode','boolean','74652gFpLEf','trim','write','validation','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','8mKsiEh','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','password','1099930cMtZBg','dbtype','POST','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','create','Create\x20dblink','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)'];a79_0x4546=function(){return _0x5c60cf;};return a79_0x4546();}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';function a79_0x2bec(_0x4487ae,_0x40629e){_0x4487ae=_0x4487ae-0x65;const _0x4546e9=a79_0x4546();let _0x2bec1c=_0x4546e9[_0x4487ae];return _0x2bec1c;}export const dbCreate={'service':'db','command':a79_0x4c7433(0x6d),'description':a79_0x4c7433(0x8d),'risk':a79_0x4c7433(0x95),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a79_0x4c7433(0x74),'type':a79_0x4c7433(0x7e),'required':!![],'description':a79_0x4c7433(0x75)},DB_TYPE_FLAG,{'name':a79_0x4c7433(0x7f),'type':a79_0x4c7433(0x7e),'description':a79_0x4c7433(0x6f),'default':'8.0'},{'name':a79_0x4c7433(0x72),'type':a79_0x4c7433(0x7e),'required':!![],'description':a79_0x4c7433(0x86)},{'name':'username','type':a79_0x4c7433(0x7e),'required':!![],'description':a79_0x4c7433(0x8c)},{'name':'password','type':a79_0x4c7433(0x7e),'required':!![],'description':a79_0x4c7433(0x87)},{'name':a79_0x4c7433(0x8e),'type':a79_0x4c7433(0x7e),'description':a79_0x4c7433(0x8a)},{'name':a79_0x4c7433(0x7c),'type':'string','description':'Human-readable\x20description'},{'name':a79_0x4c7433(0x84),'type':a79_0x4c7433(0x92),'description':a79_0x4c7433(0x70),'default':![]}],async 'validate'(_0x29d1e8){const _0x5bdfdb=a79_0x4c7433,_0x35003f=_0x29d1e8[_0x5bdfdb(0x7d)](_0x5bdfdb(0x72))[_0x5bdfdb(0x94)]();if(!validateDbUrl(_0x35003f))throw CliErrors[_0x5bdfdb(0x96)](_0x5bdfdb(0x6c)+_0x35003f+'\x22',_0x5bdfdb(0x65));},async 'dryRun'(_0x4d2864){const _0x330aef=a79_0x4c7433,_0x1364ed={'appCode':_0x4d2864[_0x330aef(0x91)],'dbName':_0x4d2864['str'](_0x330aef(0x74)),'dbType':_0x4d2864[_0x330aef(0x7d)](_0x330aef(0x6a)),'dbVersion':_0x4d2864['str'](_0x330aef(0x7f))||'8.0','dbUrl':_0x4d2864[_0x330aef(0x7d)](_0x330aef(0x72))[_0x330aef(0x94)](),'username':_0x4d2864['str'](_0x330aef(0x7a)),'password':_0x330aef(0x89),..._0x4d2864[_0x330aef(0x7d)](_0x330aef(0x8e))?{'dbParam':_0x4d2864[_0x330aef(0x7d)](_0x330aef(0x8e))}:{},..._0x4d2864['str'](_0x330aef(0x7c))?{'dbDesc':_0x4d2864[_0x330aef(0x7d)](_0x330aef(0x7c))}:{}};return{'method':_0x330aef(0x6b),'url':_0x330aef(0x8f),'body':_0x1364ed,'description':[_0x330aef(0x6e),_0x4d2864[_0x330aef(0x79)]('autostart')?_0x330aef(0x67):_0x330aef(0x85)][_0x330aef(0x90)]('\x0a')};},async 'execute'(_0x501391){const _0x47409e=a79_0x4c7433,_0x24e490={'appCode':_0x501391['appCode'],'dbName':_0x501391[_0x47409e(0x7d)](_0x47409e(0x74)),'dbType':_0x501391[_0x47409e(0x7d)]('dbtype'),'dbVersion':_0x501391[_0x47409e(0x7d)](_0x47409e(0x7f))||'8.0','dbUrl':_0x501391[_0x47409e(0x7d)](_0x47409e(0x72))['trim'](),'username':_0x501391[_0x47409e(0x7d)](_0x47409e(0x7a)),'password':_0x501391[_0x47409e(0x7d)](_0x47409e(0x68)),..._0x501391[_0x47409e(0x7d)]('dbparam')?{'dbParam':_0x501391[_0x47409e(0x7d)]('dbparam')}:{},..._0x501391[_0x47409e(0x7d)](_0x47409e(0x7c))?{'dbDesc':_0x501391[_0x47409e(0x7d)](_0x47409e(0x7c))}:{}},{id:_0x2ca683,entity:_0x32af7c}=normalizeEntityWithIdResponse(await createDbLink(_0x24e490));if(!_0x2ca683)return{'ok':![],'message':_0x47409e(0x7b),'data':sanitizeDbLinkForOutput(_0x32af7c)};let _0x20ceea,_0x4c200d;if(_0x501391[_0x47409e(0x79)](_0x47409e(0x84)))try{_0x20ceea=await startDbAnalysis(_0x2ca683);}catch(_0x382f3f){_0x4c200d=_0x382f3f instanceof Error?_0x382f3f[_0x47409e(0x73)]:String(_0x382f3f);}const _0x34a6e3=buildDbPageLinks(_0x501391['appCode'],_0x2ca683),_0x40ede8={'connection':sanitizeDbLinkForOutput(_0x32af7c),..._0x34a6e3?{'links':{'databasePage':_0x34a6e3[_0x47409e(0x82)]}}:{},..._0x20ceea?{'analysisPlanId':_0x20ceea}:{},..._0x4c200d?{'analysisStartWarning':_0x4c200d}:{}};let _0x1ef76f;return _0x501391[_0x47409e(0x79)](_0x47409e(0x84))?_0x4c200d?_0x1ef76f='Created\x20db\x20link\x20'+_0x2ca683+';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning':_0x1ef76f='Created\x20db\x20link\x20'+_0x2ca683+_0x47409e(0x78):_0x1ef76f='Created\x20db\x20link\x20'+_0x2ca683,{'ok':!![],'data':_0x40ede8,'message':_0x1ef76f};}};
1
+ const a80_0x2c390e=a80_0x23f1;function a80_0x23f1(_0x5c9a41,_0x22427e){_0x5c9a41=_0x5c9a41-0x188;const _0x25a5a8=a80_0x25a5();let _0x23f13e=_0x25a5a8[_0x5c9a41];return _0x23f13e;}(function(_0x135833,_0x353ac6){const _0x228f6d=a80_0x23f1,_0x23b685=_0x135833();while(!![]){try{const _0x200672=parseInt(_0x228f6d(0x1a7))/0x1+parseInt(_0x228f6d(0x18b))/0x2+-parseInt(_0x228f6d(0x1b3))/0x3*(-parseInt(_0x228f6d(0x194))/0x4)+-parseInt(_0x228f6d(0x18a))/0x5+parseInt(_0x228f6d(0x18e))/0x6*(-parseInt(_0x228f6d(0x191))/0x7)+parseInt(_0x228f6d(0x1ac))/0x8*(-parseInt(_0x228f6d(0x192))/0x9)+-parseInt(_0x228f6d(0x18d))/0xa;if(_0x200672===_0x353ac6)break;else _0x23b685['push'](_0x23b685['shift']());}catch(_0x1d62f0){_0x23b685['push'](_0x23b685['shift']());}}}(a80_0x25a5,0x4050b));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':a80_0x2c390e(0x195),'description':a80_0x2c390e(0x1b5),'risk':a80_0x2c390e(0x1ae),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a80_0x2c390e(0x19f),'type':a80_0x2c390e(0x1aa),'required':!![],'description':a80_0x2c390e(0x1ad)},DB_TYPE_FLAG,{'name':a80_0x2c390e(0x1b2),'type':a80_0x2c390e(0x1aa),'description':a80_0x2c390e(0x189),'default':'8.0'},{'name':a80_0x2c390e(0x1a6),'type':a80_0x2c390e(0x1aa),'required':!![],'description':a80_0x2c390e(0x197)},{'name':'username','type':a80_0x2c390e(0x1aa),'required':!![],'description':'Database\x20username'},{'name':'password','type':a80_0x2c390e(0x1aa),'required':!![],'description':a80_0x2c390e(0x1b7)},{'name':a80_0x2c390e(0x19e),'type':a80_0x2c390e(0x1aa),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a80_0x2c390e(0x19a),'type':'string','description':a80_0x2c390e(0x188)},{'name':a80_0x2c390e(0x1a2),'type':'boolean','description':a80_0x2c390e(0x18c),'default':![]}],async 'validate'(_0xcc8693){const _0x504874=a80_0x2c390e,_0x1286d5=_0xcc8693[_0x504874(0x1a3)](_0x504874(0x1a6))[_0x504874(0x1a5)]();if(!validateDbUrl(_0x1286d5))throw CliErrors[_0x504874(0x1b0)](_0x504874(0x19d)+_0x1286d5+'\x22','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.');},async 'dryRun'(_0x13f64a){const _0x1e2f0f=a80_0x2c390e,_0x377ece={'appCode':_0x13f64a[_0x1e2f0f(0x1b4)],'dbName':_0x13f64a[_0x1e2f0f(0x1a3)](_0x1e2f0f(0x19f)),'dbType':_0x13f64a[_0x1e2f0f(0x1a3)](_0x1e2f0f(0x1a8)),'dbVersion':_0x13f64a['str'](_0x1e2f0f(0x1b2))||_0x1e2f0f(0x199),'dbUrl':_0x13f64a[_0x1e2f0f(0x1a3)]('dburl')[_0x1e2f0f(0x1a5)](),'username':_0x13f64a[_0x1e2f0f(0x1a3)](_0x1e2f0f(0x196)),'password':_0x1e2f0f(0x1a4),..._0x13f64a[_0x1e2f0f(0x1a3)](_0x1e2f0f(0x19e))?{'dbParam':_0x13f64a[_0x1e2f0f(0x1a3)](_0x1e2f0f(0x19e))}:{},..._0x13f64a[_0x1e2f0f(0x1a3)](_0x1e2f0f(0x19a))?{'dbDesc':_0x13f64a['str']('dbdesc')}:{}};return{'method':_0x1e2f0f(0x1b1),'url':_0x1e2f0f(0x1a9),'body':_0x377ece,'description':['Create\x20dblink',_0x13f64a[_0x1e2f0f(0x18f)]('autostart')?_0x1e2f0f(0x19c):_0x1e2f0f(0x1a1)][_0x1e2f0f(0x1b6)]('\x0a')};},async 'execute'(_0x53e933){const _0x50aa3c=a80_0x2c390e,_0x6e91b1={'appCode':_0x53e933[_0x50aa3c(0x1b4)],'dbName':_0x53e933[_0x50aa3c(0x1a3)](_0x50aa3c(0x19f)),'dbType':_0x53e933[_0x50aa3c(0x1a3)](_0x50aa3c(0x1a8)),'dbVersion':_0x53e933['str']('dbversion')||'8.0','dbUrl':_0x53e933[_0x50aa3c(0x1a3)]('dburl')[_0x50aa3c(0x1a5)](),'username':_0x53e933[_0x50aa3c(0x1a3)](_0x50aa3c(0x196)),'password':_0x53e933[_0x50aa3c(0x1a3)](_0x50aa3c(0x1af)),..._0x53e933[_0x50aa3c(0x1a3)](_0x50aa3c(0x19e))?{'dbParam':_0x53e933[_0x50aa3c(0x1a3)](_0x50aa3c(0x19e))}:{},..._0x53e933[_0x50aa3c(0x1a3)]('dbdesc')?{'dbDesc':_0x53e933[_0x50aa3c(0x1a3)]('dbdesc')}:{}},{id:_0x54e5fb,entity:_0x35adc3}=normalizeEntityWithIdResponse(await createDbLink(_0x6e91b1));if(!_0x54e5fb)return{'ok':![],'message':_0x50aa3c(0x1a0),'data':sanitizeDbLinkForOutput(_0x35adc3)};let _0x53c0a2,_0x53ec5a;if(_0x53e933[_0x50aa3c(0x18f)](_0x50aa3c(0x1a2)))try{_0x53c0a2=await startDbAnalysis(_0x54e5fb);}catch(_0x3129ad){_0x53ec5a=_0x3129ad instanceof Error?_0x3129ad[_0x50aa3c(0x190)]:String(_0x3129ad);}const _0x9b592c=buildDbPageLinks(_0x53e933[_0x50aa3c(0x1b4)],_0x54e5fb),_0x10945c={'connection':sanitizeDbLinkForOutput(_0x35adc3),..._0x9b592c?{'links':{'databasePage':_0x9b592c[_0x50aa3c(0x198)]}}:{},..._0x53c0a2?{'analysisPlanId':_0x53c0a2}:{},..._0x53ec5a?{'analysisStartWarning':_0x53ec5a}:{}};let _0x4195ce;return _0x53e933[_0x50aa3c(0x18f)](_0x50aa3c(0x1a2))?_0x53ec5a?_0x4195ce=_0x50aa3c(0x19b)+_0x54e5fb+_0x50aa3c(0x193):_0x4195ce=_0x50aa3c(0x19b)+_0x54e5fb+_0x50aa3c(0x1ab):_0x4195ce=_0x50aa3c(0x19b)+_0x54e5fb,{'ok':!![],'data':_0x10945c,'message':_0x4195ce};}};function a80_0x25a5(){const _0x36f3c3=['POST','dbversion','3GhgqVf','appCode','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','join','Database\x20password','Human-readable\x20description','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','6850TAksOr','708206wedzvw','After\x20create,\x20start\x20schema\x20analysis','900020eyYmRq','24HsRciy','bool','message','430486dVBtLj','1241811jrOdrt',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','1978328iKNnnc','create','username','Host\x20and\x20port:\x20host:port','databasePage','8.0','dbdesc','Created\x20db\x20link\x20','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','dbparam','dbname','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','No\x20follow-up\x20analysis','autostart','str','[redacted]','trim','dburl','166051qEmIVO','dbtype','/smartapi/dblink/create','string','\x20and\x20started\x20analysis','24lvFdTK','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','write','password','validation'];a80_0x25a5=function(){return _0x36f3c3;};return a80_0x25a5();}
@@ -1 +1 @@
1
- function a80_0x2230(){const _0x53eb92=['Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','10745HhACtd','795864UxfCUE','3105650fjwEtk','49xHgSpY','5772177biJyOU','delete','num','804571toYGSq','high-risk-write','6RQdlOV','1556328laUlhb','4101174FzHkIs','1052IyVSIo'];a80_0x2230=function(){return _0x53eb92;};return a80_0x2230();}const a80_0x4d0d6f=a80_0x3cd7;function a80_0x3cd7(_0x8355b8,_0x2ceb46){_0x8355b8=_0x8355b8-0x163;const _0x2230ca=a80_0x2230();let _0x3cd79a=_0x2230ca[_0x8355b8];return _0x3cd79a;}(function(_0x509f57,_0x5a2fc3){const _0xdf3fe=a80_0x3cd7,_0x2c4e41=_0x509f57();while(!![]){try{const _0x72be6e=parseInt(_0xdf3fe(0x16f))/0x1+parseInt(_0xdf3fe(0x163))/0x2*(parseInt(_0xdf3fe(0x164))/0x3)+parseInt(_0xdf3fe(0x166))/0x4*(-parseInt(_0xdf3fe(0x168))/0x5)+-parseInt(_0xdf3fe(0x165))/0x6+parseInt(_0xdf3fe(0x16b))/0x7*(parseInt(_0xdf3fe(0x169))/0x8)+-parseInt(_0xdf3fe(0x16c))/0x9+-parseInt(_0xdf3fe(0x16a))/0xa;if(_0x72be6e===_0x5a2fc3)break;else _0x2c4e41['push'](_0x2c4e41['shift']());}catch(_0xd34d50){_0x2c4e41['push'](_0x2c4e41['shift']());}}}(a80_0x2230,0xd1246));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':a80_0x4d0d6f(0x16d),'description':a80_0x4d0d6f(0x167),'risk':a80_0x4d0d6f(0x170),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x161572){const _0x737d75=a80_0x4d0d6f,_0x5671fa=_0x161572[_0x737d75(0x16e)]('id');return await deleteDbLink(_0x5671fa),{'ok':!![],'data':{'id':_0x5671fa,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x5671fa};}};
1
+ function a81_0x27f4(_0x336ad6,_0x46bdcd){_0x336ad6=_0x336ad6-0x1c1;const _0x285fc7=a81_0x285f();let _0x27f469=_0x285fc7[_0x336ad6];return _0x27f469;}const a81_0x35098a=a81_0x27f4;(function(_0x5ae02c,_0x2ec7e1){const _0x513154=a81_0x27f4,_0x4ef7f5=_0x5ae02c();while(!![]){try{const _0x241538=-parseInt(_0x513154(0x1c8))/0x1+-parseInt(_0x513154(0x1d0))/0x2*(parseInt(_0x513154(0x1c5))/0x3)+parseInt(_0x513154(0x1ce))/0x4*(parseInt(_0x513154(0x1cf))/0x5)+parseInt(_0x513154(0x1cd))/0x6*(-parseInt(_0x513154(0x1c6))/0x7)+parseInt(_0x513154(0x1c4))/0x8*(-parseInt(_0x513154(0x1cc))/0x9)+parseInt(_0x513154(0x1ca))/0xa*(parseInt(_0x513154(0x1c7))/0xb)+-parseInt(_0x513154(0x1c2))/0xc*(-parseInt(_0x513154(0x1c3))/0xd);if(_0x241538===_0x2ec7e1)break;else _0x4ef7f5['push'](_0x4ef7f5['shift']());}catch(_0xed9a9f){_0x4ef7f5['push'](_0x4ef7f5['shift']());}}}(a81_0x285f,0x62d74));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':'delete','description':a81_0x35098a(0x1c1),'risk':a81_0x35098a(0x1c9),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2e3319){const _0x18e7c3=a81_0x35098a,_0x4b7317=_0x2e3319['num']('id');return await deleteDbLink(_0x4b7317),{'ok':!![],'data':{'id':_0x4b7317,'deleted':!![]},'message':_0x18e7c3(0x1cb)+_0x4b7317};}};function a81_0x285f(){const _0x4d134a=['high-risk-write','1324600sRhQxU','Deleted\x20db\x20link\x20','28575gDCkNm','12cBoTCX','28RNSjiE','186280bLegiN','1454dokmjc','Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','72sgpXap','2990767bLaaUR','1016GEuNkf','1221cPowGo','1449917WvjXlN','33rOZZtG','520298XmwBrS'];a81_0x285f=function(){return _0x4d134a;};return a81_0x285f();}
@@ -1 +1 @@
1
- const a81_0x98338f=a81_0x12a0;(function(_0xc594e6,_0x260e04){const _0x13fb62=a81_0x12a0,_0x410c78=_0xc594e6();while(!![]){try{const _0x1895ee=parseInt(_0x13fb62(0x1f4))/0x1+parseInt(_0x13fb62(0x1f1))/0x2*(-parseInt(_0x13fb62(0x1e7))/0x3)+-parseInt(_0x13fb62(0x1f0))/0x4*(parseInt(_0x13fb62(0x1f5))/0x5)+-parseInt(_0x13fb62(0x1e9))/0x6*(parseInt(_0x13fb62(0x1ee))/0x7)+parseInt(_0x13fb62(0x1ef))/0x8+-parseInt(_0x13fb62(0x1e6))/0x9*(-parseInt(_0x13fb62(0x1ed))/0xa)+parseInt(_0x13fb62(0x1ea))/0xb*(parseInt(_0x13fb62(0x1e8))/0xc);if(_0x1895ee===_0x260e04)break;else _0x410c78['push'](_0x410c78['shift']());}catch(_0x590c03){_0x410c78['push'](_0x410c78['shift']());}}}(a81_0x21d8,0x92a7a));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a81_0x12a0(_0x2a9cb6,_0xd7780a){_0x2a9cb6=_0x2a9cb6-0x1e6;const _0x21d85d=a81_0x21d8();let _0x12a061=_0x21d85d[_0x2a9cb6];return _0x12a061;}function a81_0x21d8(){const _0x1423cd=['22TOyowa','read','detail','61850WdANIr','28KmdDbd','5062712nFPvjH','4WtXbGV','2BvpVXe','db\x20link\x20','dbName','24440gtRfSR','2866565oUbuAE','1449bATyCN','986169akEplA','5067780JaVsCr','1492440LgdecH'];a81_0x21d8=function(){return _0x1423cd;};return a81_0x21d8();}import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a81_0x98338f(0x1ec),'description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':a81_0x98338f(0x1eb),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x37d4da){const _0x2270f3=a81_0x98338f,_0x12e2d1=_0x37d4da['num']('id'),_0x3ee8ac=await getDbLinkInfo(_0x12e2d1);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x3ee8ac),'message':_0x2270f3(0x1f2)+_0x12e2d1+':\x20'+_0x3ee8ac[_0x2270f3(0x1f3)]};}};
1
+ const a82_0x29a59b=a82_0xe6b5;(function(_0x438ccd,_0x32823c){const _0x113eec=a82_0xe6b5,_0x168779=_0x438ccd();while(!![]){try{const _0x2f96d4=-parseInt(_0x113eec(0x9e))/0x1*(-parseInt(_0x113eec(0xa2))/0x2)+parseInt(_0x113eec(0x98))/0x3+-parseInt(_0x113eec(0x97))/0x4*(parseInt(_0x113eec(0x99))/0x5)+-parseInt(_0x113eec(0x9b))/0x6*(-parseInt(_0x113eec(0xa3))/0x7)+-parseInt(_0x113eec(0x95))/0x8+parseInt(_0x113eec(0x9d))/0x9*(parseInt(_0x113eec(0x9f))/0xa)+parseInt(_0x113eec(0x9a))/0xb*(-parseInt(_0x113eec(0x96))/0xc);if(_0x2f96d4===_0x32823c)break;else _0x168779['push'](_0x168779['shift']());}catch(_0xb30627){_0x168779['push'](_0x168779['shift']());}}}(a82_0x39f8,0x2a5ab));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 a82_0x39f8(){const _0x441032=['93858DXGOEN','3585hvmwFX','542223aWIeIS','222CvzDFd','num','189lITTBl','6brMRDZ','59490VkwBUU','read','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','109458TnDFvf','24017TrPAAK','953368gedayV','60pgbpHb','404guZPMf'];a82_0x39f8=function(){return _0x441032;};return a82_0x39f8();}function a82_0xe6b5(_0x4006ef,_0x5e4fb1){_0x4006ef=_0x4006ef-0x95;const _0x39f83c=a82_0x39f8();let _0xe6b501=_0x39f83c[_0x4006ef];return _0xe6b501;}export const dbDetail={'service':'db','command':'detail','description':a82_0x29a59b(0xa1),'risk':a82_0x29a59b(0xa0),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x32763a){const _0x515672=a82_0x29a59b,_0x746d11=_0x32763a[_0x515672(0x9c)]('id'),_0x5d3cd3=await getDbLinkInfo(_0x746d11);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x5d3cd3),'message':'db\x20link\x20'+_0x746d11+':\x20'+_0x5d3cd3['dbName']};}};
@@ -1 +1 @@
1
- function a82_0x41b1(_0x66eceb,_0xd231a9){_0x66eceb=_0x66eceb-0x151;const _0x30ee8b=a82_0x30ee();let _0x41b12a=_0x30ee8b[_0x66eceb];return _0x41b12a;}const a82_0x106c89=a82_0x41b1;(function(_0xc94104,_0x2965a5){const _0x4e7f6b=a82_0x41b1,_0xa0329c=_0xc94104();while(!![]){try{const _0x2a074f=parseInt(_0x4e7f6b(0x163))/0x1*(parseInt(_0x4e7f6b(0x15c))/0x2)+parseInt(_0x4e7f6b(0x15d))/0x3+-parseInt(_0x4e7f6b(0x161))/0x4+parseInt(_0x4e7f6b(0x15b))/0x5+parseInt(_0x4e7f6b(0x172))/0x6+-parseInt(_0x4e7f6b(0x17b))/0x7*(-parseInt(_0x4e7f6b(0x166))/0x8)+parseInt(_0x4e7f6b(0x155))/0x9*(-parseInt(_0x4e7f6b(0x151))/0xa);if(_0x2a074f===_0x2965a5)break;else _0xa0329c['push'](_0xa0329c['shift']());}catch(_0x5795f3){_0xa0329c['push'](_0xa0329c['shift']());}}}(a82_0x30ee,0x92315));import{getDbTableDiff}from'../../core/api-client.js';function a82_0x30ee(){const _0x505d88=['totalCount','4684152dQifJs','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','read','Page\x20size','tableList','diffType','fieldDiff','number','map','3655603jvIKwW','boolean','\x20row(s),\x20total\x20','physicalTableCount','deletedColumns','DELETED_TABLE','fromEntries','appCode','ALREADY_ANALYZED','str','365760HkOdaT','summary','\x20of\x20','diff','171piiXlZ','validation','length','pagesize','datasetTableCount','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','555630fAEhjn','9946WHFImu','1667475iSiAcV','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','filter','all','3878120TkdlZF','NEW_TABLE','59cPJGLf','table','Page\x20index\x20(1-based)','8nmyKWH','changed-only','size','\x20(db\x20link\x20','tableName','MODIFIED_TABLE','bool','num','values','modifiedColumns','page'];a82_0x30ee=function(){return _0x505d88;};return a82_0x30ee();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a82_0x106c89(0x162),a82_0x106c89(0x16b),a82_0x106c89(0x180),'ALREADY_ANALYZED'];export const dbDiff={'service':'db','command':a82_0x106c89(0x154),'description':'Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','risk':a82_0x106c89(0x174),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a82_0x106c89(0x164),'type':'string','description':a82_0x106c89(0x15e)},{'name':a82_0x106c89(0x170),'type':a82_0x106c89(0x179),'description':a82_0x106c89(0x165),'default':0x1},{'name':a82_0x106c89(0x158),'type':a82_0x106c89(0x179),'description':a82_0x106c89(0x175),'default':0x14},{'name':a82_0x106c89(0x160),'type':a82_0x106c89(0x17c),'description':a82_0x106c89(0x15a)},{'name':'changed-only','type':a82_0x106c89(0x17c),'description':a82_0x106c89(0x173)}],async 'execute'(_0x2bdb6a){const _0x1adcdd=a82_0x106c89,_0x202308=_0x2bdb6a['num']('id'),_0x40449c=_0x2bdb6a[_0x1adcdd(0x16c)]('all'),_0x58bd2e=_0x2bdb6a[_0x1adcdd(0x16c)](_0x1adcdd(0x167)),_0x527dce=_0x40449c?0x1:_0x2bdb6a[_0x1adcdd(0x16d)](_0x1adcdd(0x170),0x1)||0x1,_0x3b34f9=_0x40449c?ALL_PAGE_SIZE:_0x2bdb6a[_0x1adcdd(0x16d)]('pagesize',0x14)||0x14,_0x4ce01d=_0x2bdb6a[_0x1adcdd(0x184)](_0x1adcdd(0x164))||undefined,_0x4cd319=_0x40449c?await getAllDbTableDiff(_0x2bdb6a[_0x1adcdd(0x182)],_0x202308,_0x4ce01d):await getDbTableDiff(_0x2bdb6a[_0x1adcdd(0x182)],_0x202308,{'pageIndex':_0x527dce,'pageSize':_0x3b34f9,'tableName':_0x4ce01d}),_0x83fd63=_0x4cd319[_0x1adcdd(0x176)],_0xfdd524=_0x58bd2e?_0x83fd63['filter'](_0x42ffeb=>_0x42ffeb[_0x1adcdd(0x177)]!==_0x1adcdd(0x183)):_0x83fd63,_0x4cbd4d=Object[_0x1adcdd(0x181)](DIFF_TYPES[_0x1adcdd(0x17a)](_0x28dad2=>[_0x28dad2,_0x83fd63[_0x1adcdd(0x15f)](_0x44fa4b=>_0x44fa4b[_0x1adcdd(0x177)]===_0x28dad2)[_0x1adcdd(0x157)]])),_0xb2ff32=_0x83fd63[_0x1adcdd(0x15f)](_0x449c0c=>_0x449c0c[_0x1adcdd(0x177)]===_0x1adcdd(0x162)||_0x449c0c[_0x1adcdd(0x177)]===_0x1adcdd(0x16b))['map'](_0x230bfc=>_0x230bfc['tableName']),_0x881657=_0x83fd63['filter'](_0x3fb0cf=>_0x3fb0cf[_0x1adcdd(0x177)]===_0x1adcdd(0x180))[_0x1adcdd(0x17a)](_0x428f16=>_0x428f16[_0x1adcdd(0x16a)]),_0x5ae237=_0x83fd63[_0x1adcdd(0x15f)](_0x1ffd68=>_0x1ffd68[_0x1adcdd(0x177)]==='MODIFIED_TABLE')[_0x1adcdd(0x17a)](_0x344767=>({'tableName':_0x344767[_0x1adcdd(0x16a)],'addedColumns':_0x344767['fieldDiff']?.['addedColumns']??[],'deletedColumns':_0x344767[_0x1adcdd(0x178)]?.[_0x1adcdd(0x17f)]??[],'modifiedColumns':_0x344767['fieldDiff']?.[_0x1adcdd(0x16f)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x202308,'page':_0x527dce,'pageSize':_0x3b34f9,'totalCount':_0x4cd319[_0x1adcdd(0x171)],'physicalTableCount':_0x4cd319[_0x1adcdd(0x17e)],'datasetTableCount':_0x4cd319['datasetTableCount'],..._0x4cd319['summary']?{'summary':_0x4cd319['summary']}:{},'summaryByType':_0x4cbd4d,'toAnalyzeTables':_0xb2ff32,'deletedTables':_0x881657,'modifiedFieldDiffs':_0x5ae237,'tables':_0xfdd524,'tableList':_0xfdd524},'message':_0xfdd524[_0x1adcdd(0x157)]+_0x1adcdd(0x17d)+_0x4cd319[_0x1adcdd(0x171)]+_0x1adcdd(0x169)+_0x202308+')'};}};async function getAllDbTableDiff(_0x2bf12c,_0x51caa9,_0x3535a9){const _0x433eed=a82_0x106c89,_0x52ebe0=new Map();let _0x8c7fef=0x1,_0x51f81d=null;while(!![]){_0x51f81d=await getDbTableDiff(_0x2bf12c,_0x51caa9,{'pageIndex':_0x8c7fef,'pageSize':ALL_PAGE_SIZE,'tableName':_0x3535a9});const _0x35c9c6=_0x52ebe0[_0x433eed(0x168)];for(const _0x1c9076 of _0x51f81d[_0x433eed(0x176)]){_0x52ebe0['set'](_0x1c9076[_0x433eed(0x16a)],_0x1c9076);}if(_0x52ebe0[_0x433eed(0x168)]>=_0x51f81d[_0x433eed(0x171)])break;if(_0x51f81d[_0x433eed(0x176)][_0x433eed(0x157)]===0x0||_0x52ebe0[_0x433eed(0x168)]===_0x35c9c6)throw CliErrors[_0x433eed(0x156)]('Incomplete\x20db\x20diff\x20pagination:\x20collected\x20'+_0x52ebe0['size']+_0x433eed(0x153)+_0x51f81d[_0x433eed(0x171)]+'\x20row(s).');_0x8c7fef+=0x1;}return{'totalCount':_0x51f81d?.[_0x433eed(0x171)]??0x0,'physicalTableCount':_0x51f81d?.[_0x433eed(0x17e)]??0x0,'datasetTableCount':_0x51f81d?.[_0x433eed(0x159)]??0x0,..._0x51f81d?.[_0x433eed(0x152)]?{'summary':_0x51f81d[_0x433eed(0x152)]}:{},'tableList':[..._0x52ebe0[_0x433eed(0x16e)]()]};}
1
+ const a83_0x358984=a83_0x1a67;(function(_0x34d7dd,_0x1c635b){const _0xa8033b=a83_0x1a67,_0x3798ae=_0x34d7dd();while(!![]){try{const _0x29652c=-parseInt(_0xa8033b(0xd8))/0x1+-parseInt(_0xa8033b(0xb4))/0x2*(-parseInt(_0xa8033b(0xe3))/0x3)+-parseInt(_0xa8033b(0xda))/0x4*(-parseInt(_0xa8033b(0xcc))/0x5)+-parseInt(_0xa8033b(0xc5))/0x6+-parseInt(_0xa8033b(0xcb))/0x7*(-parseInt(_0xa8033b(0xb2))/0x8)+parseInt(_0xa8033b(0xbb))/0x9*(-parseInt(_0xa8033b(0xd7))/0xa)+parseInt(_0xa8033b(0xde))/0xb*(parseInt(_0xa8033b(0xcf))/0xc);if(_0x29652c===_0x1c635b)break;else _0x3798ae['push'](_0x3798ae['shift']());}catch(_0x31f095){_0x3798ae['push'](_0x3798ae['shift']());}}}(a83_0x473c,0x5d91f));import{getDbTableDiff}from'../../core/api-client.js';function a83_0x1a67(_0x4c1625,_0x2ee087){_0x4c1625=_0x4c1625-0xb2;const _0x473c31=a83_0x473c();let _0x1a674c=_0x473c31[_0x4c1625];return _0x1a674c;}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',a83_0x358984(0xd1),a83_0x358984(0xdc),'ALREADY_ANALYZED'];export const dbDiff={'service':'db','command':a83_0x358984(0xc2),'description':a83_0x358984(0xce),'risk':a83_0x358984(0xdb),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a83_0x358984(0xe2),'type':a83_0x358984(0xc4),'description':a83_0x358984(0xc8)},{'name':a83_0x358984(0xbd),'type':a83_0x358984(0xbc),'description':a83_0x358984(0xca),'default':0x1},{'name':a83_0x358984(0xe1),'type':a83_0x358984(0xbc),'description':a83_0x358984(0xd6),'default':0x14},{'name':'all','type':a83_0x358984(0xe6),'description':a83_0x358984(0xe4)},{'name':a83_0x358984(0xd5),'type':a83_0x358984(0xe6),'description':'Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables'}],async 'execute'(_0x4e5a6e){const _0x28116f=a83_0x358984,_0x321326=_0x4e5a6e[_0x28116f(0xb3)]('id'),_0x22941f=_0x4e5a6e[_0x28116f(0xe7)](_0x28116f(0xb6)),_0x234a65=_0x4e5a6e[_0x28116f(0xe7)](_0x28116f(0xd5)),_0x1706cf=_0x22941f?0x1:_0x4e5a6e[_0x28116f(0xb3)](_0x28116f(0xbd),0x1)||0x1,_0x2a6e5e=_0x22941f?ALL_PAGE_SIZE:_0x4e5a6e[_0x28116f(0xb3)]('pagesize',0x14)||0x14,_0x3e46ec=_0x4e5a6e[_0x28116f(0xd3)](_0x28116f(0xe2))||undefined,_0x152152=_0x22941f?await getAllDbTableDiff(_0x4e5a6e[_0x28116f(0xdd)],_0x321326,_0x3e46ec):await getDbTableDiff(_0x4e5a6e[_0x28116f(0xdd)],_0x321326,{'pageIndex':_0x1706cf,'pageSize':_0x2a6e5e,'tableName':_0x3e46ec}),_0x4a8b64=_0x152152['tableList'],_0x43d544=_0x234a65?_0x4a8b64[_0x28116f(0xd2)](_0x3768d8=>_0x3768d8[_0x28116f(0xb7)]!==_0x28116f(0xd0)):_0x4a8b64,_0x58a092=Object[_0x28116f(0xba)](DIFF_TYPES['map'](_0x544902=>[_0x544902,_0x4a8b64[_0x28116f(0xd2)](_0x1bc498=>_0x1bc498['diffType']===_0x544902)[_0x28116f(0xc7)]])),_0x4e2e01=_0x4a8b64['filter'](_0x5e6f35=>_0x5e6f35[_0x28116f(0xb7)]===_0x28116f(0xcd)||_0x5e6f35[_0x28116f(0xb7)]==='MODIFIED_TABLE')[_0x28116f(0xb9)](_0x4e9a1f=>_0x4e9a1f[_0x28116f(0xc6)]),_0x4d37aa=_0x4a8b64[_0x28116f(0xd2)](_0x2cc561=>_0x2cc561[_0x28116f(0xb7)]===_0x28116f(0xdc))[_0x28116f(0xb9)](_0x1226e3=>_0x1226e3[_0x28116f(0xc6)]),_0x119615=_0x4a8b64[_0x28116f(0xd2)](_0x1d9770=>_0x1d9770[_0x28116f(0xb7)]===_0x28116f(0xd1))[_0x28116f(0xb9)](_0x39f0b9=>({'tableName':_0x39f0b9[_0x28116f(0xc6)],'addedColumns':_0x39f0b9[_0x28116f(0xdf)]?.[_0x28116f(0xc1)]??[],'deletedColumns':_0x39f0b9[_0x28116f(0xdf)]?.[_0x28116f(0xe9)]??[],'modifiedColumns':_0x39f0b9[_0x28116f(0xdf)]?.[_0x28116f(0xbf)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x321326,'page':_0x1706cf,'pageSize':_0x2a6e5e,'totalCount':_0x152152[_0x28116f(0xb5)],'physicalTableCount':_0x152152[_0x28116f(0xc3)],'datasetTableCount':_0x152152[_0x28116f(0xe8)],..._0x152152[_0x28116f(0xd4)]?{'summary':_0x152152[_0x28116f(0xd4)]}:{},'summaryByType':_0x58a092,'toAnalyzeTables':_0x4e2e01,'deletedTables':_0x4d37aa,'modifiedFieldDiffs':_0x119615,'tables':_0x43d544,'tableList':_0x43d544},'message':_0x43d544[_0x28116f(0xc7)]+_0x28116f(0xc0)+_0x152152[_0x28116f(0xb5)]+_0x28116f(0xe0)+_0x321326+')'};}};function a83_0x473c(){const _0x4d2441=['190uRsyXh','607048WPCjda','\x20row(s).','4fTjjsp','read','DELETED_TABLE','appCode','6763669GHuynA','fieldDiff','\x20(db\x20link\x20','pagesize','table','3IeDCNb','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','size','boolean','bool','datasetTableCount','deletedColumns','96qNfvTK','num','182946EHlyyR','totalCount','all','diffType','values','map','fromEntries','219771TSKSpw','number','page','tableList','modifiedColumns','\x20row(s),\x20total\x20','addedColumns','diff','physicalTableCount','string','231630ciQgZc','tableName','length','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','\x20of\x20','Page\x20index\x20(1-based)','384930qdhNXs','633225RiVUQk','NEW_TABLE','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','12cJQclx','ALREADY_ANALYZED','MODIFIED_TABLE','filter','str','summary','changed-only','Page\x20size'];a83_0x473c=function(){return _0x4d2441;};return a83_0x473c();}async function getAllDbTableDiff(_0x30e767,_0x6d433,_0x25e220){const _0x25b97e=a83_0x358984,_0x5d5356=new Map();let _0x75477b=0x1,_0x157e71=null;while(!![]){_0x157e71=await getDbTableDiff(_0x30e767,_0x6d433,{'pageIndex':_0x75477b,'pageSize':ALL_PAGE_SIZE,'tableName':_0x25e220});const _0x56c2a4=_0x5d5356[_0x25b97e(0xe5)];for(const _0x11cec7 of _0x157e71[_0x25b97e(0xbe)]){_0x5d5356['set'](_0x11cec7[_0x25b97e(0xc6)],_0x11cec7);}if(_0x5d5356[_0x25b97e(0xe5)]>=_0x157e71[_0x25b97e(0xb5)])break;if(_0x157e71[_0x25b97e(0xbe)][_0x25b97e(0xc7)]===0x0||_0x5d5356['size']===_0x56c2a4)throw CliErrors['validation']('Incomplete\x20db\x20diff\x20pagination:\x20collected\x20'+_0x5d5356[_0x25b97e(0xe5)]+_0x25b97e(0xc9)+_0x157e71['totalCount']+_0x25b97e(0xd9));_0x75477b+=0x1;}return{'totalCount':_0x157e71?.[_0x25b97e(0xb5)]??0x0,'physicalTableCount':_0x157e71?.['physicalTableCount']??0x0,'datasetTableCount':_0x157e71?.[_0x25b97e(0xe8)]??0x0,..._0x157e71?.[_0x25b97e(0xd4)]?{'summary':_0x157e71[_0x25b97e(0xd4)]}:{},'tableList':[..._0x5d5356[_0x25b97e(0xb8)]()]};}
@@ -1 +1 @@
1
- function a83_0x37c3(){const _0x45c34e=['280khBLTR','7EYSHRO','2LNYXTN','4kiUwyU','14145zzFAMT','1206803tRaGnW','10YfKhBC','256374xHuigi','3132744PgtPEY','117341LMTrLF','282hwtabL','2699408tLRytP','2405361bIJAEY','22IsGKBo'];a83_0x37c3=function(){return _0x45c34e;};return a83_0x37c3();}(function(_0xf64f45,_0x3d4224){const _0x1dba5e=a83_0x407b,_0x25112b=_0xf64f45();while(!![]){try{const _0x5a9755=parseInt(_0x1dba5e(0x1cd))/0x1*(parseInt(_0x1dba5e(0x1c6))/0x2)+-parseInt(_0x1dba5e(0x1d0))/0x3*(parseInt(_0x1dba5e(0x1c7))/0x4)+-parseInt(_0x1dba5e(0x1c8))/0x5*(-parseInt(_0x1dba5e(0x1ce))/0x6)+parseInt(_0x1dba5e(0x1c5))/0x7*(-parseInt(_0x1dba5e(0x1cf))/0x8)+-parseInt(_0x1dba5e(0x1cb))/0x9*(parseInt(_0x1dba5e(0x1ca))/0xa)+parseInt(_0x1dba5e(0x1d1))/0xb*(-parseInt(_0x1dba5e(0x1cc))/0xc)+parseInt(_0x1dba5e(0x1c9))/0xd*(parseInt(_0x1dba5e(0x1d2))/0xe);if(_0x5a9755===_0x3d4224)break;else _0x25112b['push'](_0x25112b['shift']());}catch(_0x4715ff){_0x25112b['push'](_0x25112b['shift']());}}}(a83_0x37c3,0x65d4d));import{dbList}from'../../commands/db/list.js';function a83_0x407b(_0x34eb03,_0x3003ce){_0x34eb03=_0x34eb03-0x1c5;const _0x37c315=a83_0x37c3();let _0x407b7c=_0x37c315[_0x34eb03];return _0x407b7c;}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{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
1
+ (function(_0x3a5866,_0x49d70a){const _0x187eb0=a84_0x4a3d,_0x3e7e79=_0x3a5866();while(!![]){try{const _0x5646b5=-parseInt(_0x187eb0(0x7f))/0x1+-parseInt(_0x187eb0(0x81))/0x2*(parseInt(_0x187eb0(0x84))/0x3)+-parseInt(_0x187eb0(0x82))/0x4+-parseInt(_0x187eb0(0x83))/0x5+-parseInt(_0x187eb0(0x7e))/0x6*(parseInt(_0x187eb0(0x86))/0x7)+parseInt(_0x187eb0(0x7d))/0x8+parseInt(_0x187eb0(0x85))/0x9*(parseInt(_0x187eb0(0x80))/0xa);if(_0x5646b5===_0x49d70a)break;else _0x3e7e79['push'](_0x3e7e79['shift']());}catch(_0x37a143){_0x3e7e79['push'](_0x3e7e79['shift']());}}}(a84_0x58ed,0x21000));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';function a84_0x4a3d(_0x18e84f,_0x5c4df7){_0x18e84f=_0x18e84f-0x7d;const _0x58ed05=a84_0x58ed();let _0x4a3de3=_0x58ed05[_0x18e84f];return _0x4a3de3;}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{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';function a84_0x58ed(){const _0x1fd628=['491442uJQMHd','8035101cIUZQk','21HdNXky','2108640HpMdLM','526542XzssMc','119929KmHNQs','10ajFKXO','2LHBLLA','917596Wirohc','1223940AsJnCi'];a84_0x58ed=function(){return _0x1fd628;};return a84_0x58ed();}import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
@@ -1 +1 @@
1
- const a84_0x13426c=a84_0x1bb8;(function(_0x5bce82,_0x1aee02){const _0x19277e=a84_0x1bb8,_0x4a3c89=_0x5bce82();while(!![]){try{const _0x16ed63=parseInt(_0x19277e(0x129))/0x1+-parseInt(_0x19277e(0x12a))/0x2*(parseInt(_0x19277e(0x13c))/0x3)+parseInt(_0x19277e(0x130))/0x4*(parseInt(_0x19277e(0x138))/0x5)+parseInt(_0x19277e(0x13b))/0x6+-parseInt(_0x19277e(0x13a))/0x7*(parseInt(_0x19277e(0x12f))/0x8)+-parseInt(_0x19277e(0x134))/0x9*(parseInt(_0x19277e(0x136))/0xa)+parseInt(_0x19277e(0x135))/0xb;if(_0x16ed63===_0x1aee02)break;else _0x4a3c89['push'](_0x4a3c89['shift']());}catch(_0x11c7d9){_0x4a3c89['push'](_0x4a3c89['shift']());}}}(a84_0x2107,0x66866));import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a84_0x1bb8(_0x5c338c,_0x27d644){_0x5c338c=_0x5c338c-0x128;const _0x21071c=a84_0x2107();let _0x1bb8cb=_0x21071c[_0x5c338c];return _0x1bb8cb;}import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a84_0x13426c(0x132),'description':'List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','risk':a84_0x13426c(0x139),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a84_0x13426c(0x12d),'type':a84_0x13426c(0x12b),'description':a84_0x13426c(0x128),'default':0x1},{'name':a84_0x13426c(0x131),'type':'number','description':a84_0x13426c(0x12c),'default':0x64}],async 'execute'(_0x273f32){const _0x37cd62=a84_0x13426c,_0x5c61dd=_0x273f32[_0x37cd62(0x137)]('page',0x1)||0x1,_0x1bd3b2=_0x273f32[_0x37cd62(0x137)]('pagesize',0x64)||0x64,{items:_0x3daaf2,paging:_0x40c0bc}=await listDbLinks(_0x273f32['appCode'],{'currentPage':_0x5c61dd,'pageSize':_0x1bd3b2}),_0x56f3e3=sanitizeDbLinkList(_0x3daaf2),_0x25f742=_0x40c0bc?_0x40c0bc:{'currentPage':_0x5c61dd,'pageSize':_0x1bd3b2,'rowsOnPage':_0x56f3e3['length'],'totalCount':null,'note':_0x37cd62(0x133)};return{'ok':!![],'data':{'connections':_0x56f3e3,'paging':_0x25f742},'message':'Found\x20'+_0x56f3e3['length']+_0x37cd62(0x12e)};}};function a84_0x2107(){const _0x327294=['11844IJaScM','10254OBVOLu','Page\x20index\x20(1-based)','42089gAXYGp','202bsiSIA','number','Page\x20size','page','\x20database\x20connection(s)','34120jmbkFo','28OTeqes','pagesize','list','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','9BItqVq','15649722yFXRUo','2391270ZcdzOQ','num','184505nkjnTX','read','1183cBOCpv'];a84_0x2107=function(){return _0x327294;};return a84_0x2107();}
1
+ const a85_0x94251c=a85_0x511e;(function(_0x842772,_0x2a2e2e){const _0x39fe99=a85_0x511e,_0x2663aa=_0x842772();while(!![]){try{const _0x4f3a2d=-parseInt(_0x39fe99(0x93))/0x1+parseInt(_0x39fe99(0x95))/0x2+parseInt(_0x39fe99(0x9e))/0x3*(parseInt(_0x39fe99(0x9b))/0x4)+parseInt(_0x39fe99(0x92))/0x5*(parseInt(_0x39fe99(0x98))/0x6)+parseInt(_0x39fe99(0x94))/0x7*(parseInt(_0x39fe99(0x97))/0x8)+-parseInt(_0x39fe99(0x9a))/0x9*(parseInt(_0x39fe99(0x9d))/0xa)+-parseInt(_0x39fe99(0x96))/0xb;if(_0x4f3a2d===_0x2a2e2e)break;else _0x2663aa['push'](_0x2663aa['shift']());}catch(_0x10c678){_0x2663aa['push'](_0x2663aa['shift']());}}}(a85_0x423d,0xa5acb));function a85_0x423d(){const _0x5c336d=['number','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','num','\x20database\x20connection(s)','page','length','10555BNNCeM','211426gKYVbJ','3522925fXAVyw','1704858ukPlMD','19869465eZFzOq','16dAvqau','780yyvnBd','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','558ZBvHYa','11404aGSPku','list','34740vBBbjn','819MWVgEW','Page\x20size','read','Page\x20index\x20(1-based)','appCode'];a85_0x423d=function(){return _0x5c336d;};return a85_0x423d();}import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';function a85_0x511e(_0xf04249,_0x13a65d){_0xf04249=_0xf04249-0x8d;const _0x423dd0=a85_0x423d();let _0x511e90=_0x423dd0[_0xf04249];return _0x511e90;}export const dbList={'service':'db','command':a85_0x94251c(0x9c),'description':a85_0x94251c(0x8d),'risk':a85_0x94251c(0xa0),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a85_0x94251c(0x90),'type':'number','description':a85_0x94251c(0xa1),'default':0x1},{'name':a85_0x94251c(0xa4),'type':a85_0x94251c(0xa3),'description':a85_0x94251c(0x9f),'default':0x64}],async 'execute'(_0x7dd0e1){const _0x5d6f11=a85_0x94251c,_0xaa0e67=_0x7dd0e1[_0x5d6f11(0x8e)](_0x5d6f11(0x90),0x1)||0x1,_0x5094ca=_0x7dd0e1[_0x5d6f11(0x8e)](_0x5d6f11(0xa4),0x64)||0x64,{items:_0x1c8c9d,paging:_0x422f88}=await listDbLinks(_0x7dd0e1[_0x5d6f11(0xa2)],{'currentPage':_0xaa0e67,'pageSize':_0x5094ca}),_0x51c701=sanitizeDbLinkList(_0x1c8c9d),_0x14075b=_0x422f88?_0x422f88:{'currentPage':_0xaa0e67,'pageSize':_0x5094ca,'rowsOnPage':_0x51c701[_0x5d6f11(0x91)],'totalCount':null,'note':_0x5d6f11(0x99)};return{'ok':!![],'data':{'connections':_0x51c701,'paging':_0x14075b},'message':'Found\x20'+_0x51c701[_0x5d6f11(0x91)]+_0x5d6f11(0x8f)};}};
@@ -1 +1 @@
1
- function a85_0xebc3(_0x179e0c,_0x2af2a8){_0x179e0c=_0x179e0c-0x125;const _0x54eb3c=a85_0x54eb();let _0xebc3c2=_0x54eb3c[_0x179e0c];return _0xebc3c2;}(function(_0x39839b,_0x430bf2){const _0x227376=a85_0xebc3,_0x1c0601=_0x39839b();while(!![]){try{const _0x44a26e=parseInt(_0x227376(0x126))/0x1*(-parseInt(_0x227376(0x141))/0x2)+-parseInt(_0x227376(0x13d))/0x3+parseInt(_0x227376(0x130))/0x4*(-parseInt(_0x227376(0x136))/0x5)+-parseInt(_0x227376(0x13e))/0x6+-parseInt(_0x227376(0x142))/0x7+parseInt(_0x227376(0x134))/0x8*(-parseInt(_0x227376(0x132))/0x9)+-parseInt(_0x227376(0x12e))/0xa*(-parseInt(_0x227376(0x12f))/0xb);if(_0x44a26e===_0x430bf2)break;else _0x1c0601['push'](_0x1c0601['shift']());}catch(_0x289e3a){_0x1c0601['push'](_0x1c0601['shift']());}}}(a85_0x54eb,0xdf1df));import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0x1305ff){const _0x37aa99=a85_0xebc3,_0x9f9acf=_0x1305ff[_0x37aa99(0x12d)]();if(_0x9f9acf===_0x37aa99(0x127)||_0x9f9acf===_0x37aa99(0x13a)||_0x9f9acf===_0x37aa99(0x13b))return!![];if(_0x9f9acf[_0x37aa99(0x137)](_0x37aa99(0x13f))||_0x9f9acf[_0x37aa99(0x137)](_0x37aa99(0x139))||_0x9f9acf[_0x37aa99(0x137)](_0x37aa99(0x128)))return!![];if(_0x9f9acf[_0x37aa99(0x137)]('privatekey')||_0x9f9acf[_0x37aa99(0x137)](_0x37aa99(0x125)))return!![];if(_0x9f9acf==='authorization'||_0x9f9acf===_0x37aa99(0x131)||_0x9f9acf==='jdbcurl')return!![];return![];}export function sanitizeDbLinkForOutput(_0x2bf883){const _0xf7863f=a85_0xebc3,_0xc34674={..._0x2bf883};for(const _0x3d47c5 of Object[_0xf7863f(0x133)](_0xc34674)){if(!shouldRedactKey(_0x3d47c5))continue;const _0x5d86a8=_0xc34674[_0x3d47c5];_0x5d86a8!=null&&String(_0x5d86a8)[_0xf7863f(0x138)]>0x0&&(_0xc34674[_0x3d47c5]=_0xf7863f(0x135));}return _0xc34674;}export function sanitizeDbLinkList(_0x1902e4){const _0x5dfd57=a85_0xebc3;return _0x1902e4[_0x5dfd57(0x140)](_0x5d8689=>sanitizeDbLinkForOutput(_0x5d8689));}function a85_0x54eb(){const _0x412b6b=['connectionstring','9uxqFLi','keys','7282424iGshIo','[redacted]','7455hIHkmd','includes','length','token','passwd','dbpassword','/data/database','4845876eLHLIy','2635152KIlbrY','secret','map','2ndlAho','11395496qtkuQB','accesskey','1096561yalUMk','password','credential','test','trim','number','/data/er?dbId=','toLowerCase','140SERwOJ','6318697dHyJgr','3860jnDVoU'];a85_0x54eb=function(){return _0x412b6b;};return a85_0x54eb();}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5f2907){const _0x1228be=a85_0xebc3,_0x2a13c5=_0x5f2907[_0x1228be(0x12a)]();if(!_0x2a13c5)return![];return DB_URL_PATTERN[_0x1228be(0x129)](_0x2a13c5);}export function buildDbPageLinks(_0x2d7c78,_0x2a063f){const _0x22d738=a85_0xebc3,_0x8fdeae=_0x2d7c78?.[_0x22d738(0x12a)]();if(!_0x8fdeae)return undefined;const _0x21c904=typeof _0x2a063f===_0x22d738(0x12b)?String(_0x2a063f):String(_0x2a063f??'')['trim']();if(!_0x21c904)return undefined;const _0x2b0f80=Number(_0x21c904);if(!Number['isFinite'](_0x2b0f80)||_0x2b0f80<=0x0)return undefined;const _0x3c80d3=getAppBaseUrl(_0x8fdeae),_0x4a5a50=encodeURIComponent(String(_0x2b0f80));return{'databasePage':_0x3c80d3+_0x22d738(0x13c),'erPage':_0x3c80d3+_0x22d738(0x12c)+_0x4a5a50};}
1
+ (function(_0x5a0e1a,_0x57ee62){const _0x1b0b34=a86_0x4f88,_0x5e5f5a=_0x5a0e1a();while(!![]){try{const _0x13dc8f=-parseInt(_0x1b0b34(0x1ed))/0x1+parseInt(_0x1b0b34(0x1e2))/0x2+parseInt(_0x1b0b34(0x1f6))/0x3+-parseInt(_0x1b0b34(0x1e7))/0x4*(-parseInt(_0x1b0b34(0x1ea))/0x5)+-parseInt(_0x1b0b34(0x1f7))/0x6*(-parseInt(_0x1b0b34(0x1e6))/0x7)+parseInt(_0x1b0b34(0x1f1))/0x8+-parseInt(_0x1b0b34(0x1e0))/0x9;if(_0x13dc8f===_0x57ee62)break;else _0x5e5f5a['push'](_0x5e5f5a['shift']());}catch(_0x114996){_0x5e5f5a['push'](_0x5e5f5a['shift']());}}}(a86_0x4621,0xe1e9b));import{getAppBaseUrl}from'../../constant/domain.js';function a86_0x4f88(_0x3aea05,_0x39489a){_0x3aea05=_0x3aea05-0x1df;const _0x4621c2=a86_0x4621();let _0x4f8821=_0x4621c2[_0x3aea05];return _0x4f8821;}function shouldRedactKey(_0x4d2dc2){const _0x8d770a=a86_0x4f88,_0x3a86f5=_0x4d2dc2[_0x8d770a(0x1df)]();if(_0x3a86f5===_0x8d770a(0x1e5)||_0x3a86f5===_0x8d770a(0x1f4)||_0x3a86f5===_0x8d770a(0x1e9))return!![];if(_0x3a86f5[_0x8d770a(0x1ef)]('secret')||_0x3a86f5[_0x8d770a(0x1ef)](_0x8d770a(0x1e1))||_0x3a86f5[_0x8d770a(0x1ef)](_0x8d770a(0x1f3)))return!![];if(_0x3a86f5['includes']('privatekey')||_0x3a86f5[_0x8d770a(0x1ef)]('accesskey'))return!![];if(_0x3a86f5===_0x8d770a(0x1e3)||_0x3a86f5===_0x8d770a(0x1e4)||_0x3a86f5===_0x8d770a(0x1eb))return!![];return![];}function a86_0x4621(){const _0x80d423=['6054UgxAIb','length','toLowerCase','20717037eTDQFr','token','3594780ZfmOMS','authorization','connectionstring','password','6461pkqNOK','2051860JJzhnZ','[redacted]','dbpassword','15tVoIZF','jdbcurl','keys','1830221BysBMB','map','includes','/data/database','6269392mPDHmx','isFinite','credential','passwd','trim','18561GwpLZL'];a86_0x4621=function(){return _0x80d423;};return a86_0x4621();}export function sanitizeDbLinkForOutput(_0x38130c){const _0x6b652d=a86_0x4f88,_0x485dde={..._0x38130c};for(const _0x784ba7 of Object[_0x6b652d(0x1ec)](_0x485dde)){if(!shouldRedactKey(_0x784ba7))continue;const _0x4818b7=_0x485dde[_0x784ba7];_0x4818b7!=null&&String(_0x4818b7)[_0x6b652d(0x1f8)]>0x0&&(_0x485dde[_0x784ba7]=_0x6b652d(0x1e8));}return _0x485dde;}export function sanitizeDbLinkList(_0x4c1d84){const _0x134c2a=a86_0x4f88;return _0x4c1d84[_0x134c2a(0x1ee)](_0x5658da=>sanitizeDbLinkForOutput(_0x5658da));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x48293e){const _0xea8a44=a86_0x4f88,_0x37846a=_0x48293e[_0xea8a44(0x1f5)]();if(!_0x37846a)return![];return DB_URL_PATTERN['test'](_0x37846a);}export function buildDbPageLinks(_0x5b11aa,_0x244968){const _0x2e3ab3=a86_0x4f88,_0x135a59=_0x5b11aa?.[_0x2e3ab3(0x1f5)]();if(!_0x135a59)return undefined;const _0x53585e=typeof _0x244968==='number'?String(_0x244968):String(_0x244968??'')[_0x2e3ab3(0x1f5)]();if(!_0x53585e)return undefined;const _0x4b8f7c=Number(_0x53585e);if(!Number[_0x2e3ab3(0x1f2)](_0x4b8f7c)||_0x4b8f7c<=0x0)return undefined;const _0xe0930b=getAppBaseUrl(_0x135a59),_0x30e57d=encodeURIComponent(String(_0x4b8f7c));return{'databasePage':_0xe0930b+_0x2e3ab3(0x1f0),'erPage':_0xe0930b+'/data/er?dbId='+_0x30e57d};}
@@ -1 +1 @@
1
- function a86_0x45f6(){const _0x322297=['length','tables','3HRPBCZ','8QaWeIJ','read','112460VyFJpM','124896ivSCjI','num','8346576vpHSdK','1692420VaWdHD','549XrXBfv','616ESStZo','\x20table(s)\x20on\x20db\x20link\x20','218846OZNoQm','62346CuSnNv','110bSQRts','3048795zNcdgM'];a86_0x45f6=function(){return _0x322297;};return a86_0x45f6();}const a86_0x38ebbf=a86_0x5c0b;function a86_0x5c0b(_0x37d4a8,_0x4e99b3){_0x37d4a8=_0x37d4a8-0xf3;const _0x45f6be=a86_0x45f6();let _0x5c0b6c=_0x45f6be[_0x37d4a8];return _0x5c0b6c;}(function(_0x51d2e2,_0x3f038f){const _0x38dda3=a86_0x5c0b,_0x43fab5=_0x51d2e2();while(!![]){try{const _0x1baf0e=parseInt(_0x38dda3(0xf8))/0x1*(-parseInt(_0x38dda3(0x103))/0x2)+-parseInt(_0x38dda3(0xfc))/0x3+-parseInt(_0x38dda3(0xf9))/0x4*(parseInt(_0x38dda3(0xf5))/0x5)+parseInt(_0x38dda3(0xf3))/0x6*(-parseInt(_0x38dda3(0x101))/0x7)+parseInt(_0x38dda3(0xfe))/0x8+parseInt(_0x38dda3(0x100))/0x9*(parseInt(_0x38dda3(0xfb))/0xa)+parseInt(_0x38dda3(0xf4))/0xb*(parseInt(_0x38dda3(0xff))/0xc);if(_0x1baf0e===_0x3f038f)break;else _0x43fab5['push'](_0x43fab5['shift']());}catch(_0x30b270){_0x43fab5['push'](_0x43fab5['shift']());}}}(a86_0x45f6,0x9b3cb));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':a86_0x38ebbf(0xf7),'description':'List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','risk':a86_0x38ebbf(0xfa),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2aebbb){const _0x1b7ab4=a86_0x38ebbf,_0x204e1e=_0x2aebbb[_0x1b7ab4(0xfd)]('id'),_0x1b4ed7=await getDbAllTableList(_0x2aebbb['appCode'],_0x204e1e);return{'ok':!![],'data':{'dbLinkId':_0x204e1e,'total':_0x1b4ed7[_0x1b7ab4(0xf6)],'tables':_0x1b4ed7},'message':_0x1b4ed7[_0x1b7ab4(0xf6)]+_0x1b7ab4(0x102)+_0x204e1e};}};
1
+ const a87_0x580f08=a87_0x4d96;function a87_0x30ec(){const _0x1d69d3=['2463909DccmHf','appCode','955054UfwmmB','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','num','12373696wwUiyB','68oDmTLG','914914RUcDrs','tables','300130TDcIfW','length','757050lTjLkv','2135202FdoIFT'];a87_0x30ec=function(){return _0x1d69d3;};return a87_0x30ec();}(function(_0x15b114,_0x5816fc){const _0x47584e=a87_0x4d96,_0xcaabef=_0x15b114();while(!![]){try{const _0x3d54f2=-parseInt(_0x47584e(0xd7))/0x1+-parseInt(_0x47584e(0xdc))/0x2+-parseInt(_0x47584e(0xd3))/0x3+parseInt(_0x47584e(0xdb))/0x4*(parseInt(_0x47584e(0xd1))/0x5)+parseInt(_0x47584e(0xd4))/0x6+-parseInt(_0x47584e(0xd5))/0x7+parseInt(_0x47584e(0xda))/0x8;if(_0x3d54f2===_0x5816fc)break;else _0xcaabef['push'](_0xcaabef['shift']());}catch(_0x33c3ca){_0xcaabef['push'](_0xcaabef['shift']());}}}(a87_0x30ec,0xdd3bd));function a87_0x4d96(_0x5f0722,_0x54b988){_0x5f0722=_0x5f0722-0xd0;const _0x30eca0=a87_0x30ec();let _0x4d9631=_0x30eca0[_0x5f0722];return _0x4d9631;}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':a87_0x580f08(0xd0),'description':a87_0x580f08(0xd8),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1cd1c0){const _0x24b19b=a87_0x580f08,_0x43b894=_0x1cd1c0[_0x24b19b(0xd9)]('id'),_0x2cd6c1=await getDbAllTableList(_0x1cd1c0[_0x24b19b(0xd6)],_0x43b894);return{'ok':!![],'data':{'dbLinkId':_0x43b894,'total':_0x2cd6c1['length'],'tables':_0x2cd6c1},'message':_0x2cd6c1[_0x24b19b(0xd2)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x43b894};}};
@@ -1 +1 @@
1
- const a87_0x32e9b7=a87_0x298d;(function(_0x22ecc8,_0x4b95a1){const _0x42c668=a87_0x298d,_0x5e1c37=_0x22ecc8();while(!![]){try{const _0x14ee35=-parseInt(_0x42c668(0x1ab))/0x1+parseInt(_0x42c668(0x1a1))/0x2*(-parseInt(_0x42c668(0x1b8))/0x3)+parseInt(_0x42c668(0x1a6))/0x4*(parseInt(_0x42c668(0x1b4))/0x5)+-parseInt(_0x42c668(0x1a2))/0x6+parseInt(_0x42c668(0x1a4))/0x7+-parseInt(_0x42c668(0x1b0))/0x8*(parseInt(_0x42c668(0x1b5))/0x9)+parseInt(_0x42c668(0x1aa))/0xa*(parseInt(_0x42c668(0x1ac))/0xb);if(_0x14ee35===_0x4b95a1)break;else _0x5e1c37['push'](_0x5e1c37['shift']());}catch(_0x45bd9b){_0x5e1c37['push'](_0x5e1c37['shift']());}}}(a87_0x3c20,0x66532));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x4f4e61){const _0x52c001=a87_0x298d;if(_0x4f4e61===!![]||_0x4f4e61===![])return{'success':_0x4f4e61};if(_0x4f4e61===null||_0x4f4e61===undefined)return{'type':typeof _0x4f4e61};if(typeof _0x4f4e61!==_0x52c001(0x1b6))return{'type':typeof _0x4f4e61};const _0x3f48cc=_0x4f4e61,_0x854272=[_0x52c001(0x1b9),_0x52c001(0x1a5),_0x52c001(0x1ae),_0x52c001(0x1a8),_0x52c001(0x1a3),'data'],_0x38c5f4={};for(const _0x4eaa83 of _0x854272){if(_0x4eaa83 in _0x3f48cc)_0x38c5f4[_0x4eaa83]=_0x3f48cc[_0x4eaa83];}return Object[_0x52c001(0x1b2)](_0x38c5f4)[_0x52c001(0x1a9)]===0x0&&(_0x38c5f4[_0x52c001(0x1b2)]=Object[_0x52c001(0x1b2)](_0x3f48cc)[_0x52c001(0x1af)](0x0,0x14)),_0x38c5f4;}function a87_0x298d(_0x486edf,_0x4249a7){_0x486edf=_0x486edf-0x1a0;const _0x3c20fc=a87_0x3c20();let _0x298db0=_0x3c20fc[_0x486edf];return _0x298db0;}function a87_0x3c20(){const _0x16fa2f=['1172955DgFhDT','message','524SGwlbV','test','error','length','23510fbvUEw','148980HEYnoz','5555YzqaET','Connection\x20OK\x20for\x20db\x20link\x20','code','slice','464368TZmvRn','read','keys','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','28790FmXiii','117IRckVA','object','\x20(see\x20data.result)','99798heQxnm','success','num','22MmVmIK','2522952yrBtDe','msg'];a87_0x3c20=function(){return _0x16fa2f;};return a87_0x3c20();}export const dbTest={'service':'db','command':a87_0x32e9b7(0x1a7),'description':a87_0x32e9b7(0x1b3),'risk':a87_0x32e9b7(0x1b1),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5f5152){const _0x575741=a87_0x32e9b7,_0x205e19=_0x5f5152[_0x575741(0x1a0)]('id'),_0x256137=await testDbLinkConnect(_0x205e19),_0x3149e1=_0x256137===!![]||typeof _0x256137===_0x575741(0x1b6)&&_0x256137!==null&&_0x256137[_0x575741(0x1b9)]===!![],_0x116c93=summarizeTestConnectResult(_0x256137);return{'ok':!![],'data':{'id':_0x205e19,'connected':Boolean(_0x3149e1),'result':_0x116c93},'message':_0x3149e1?_0x575741(0x1ad)+_0x205e19:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x205e19+_0x575741(0x1b7)};}};
1
+ const a88_0x32377e=a88_0x1ecf;function a88_0x8b8f(){const _0x76b1a4=['object','81qbnhak','msg','\x20(see\x20data.result)','length','Connection\x20check\x20finished\x20for\x20db\x20link\x20','10XwuVAV','59186wKDQdT','Connection\x20OK\x20for\x20db\x20link\x20','8aXGSvH','31296cbExzH','num','60234VrVBXE','read','test','keys','7290833GYxKHw','success','slice','734724gKgFTs','85BfbJdt','1024457nuqDfK','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','data','code','338914MgmDFr'];a88_0x8b8f=function(){return _0x76b1a4;};return a88_0x8b8f();}(function(_0x4b0c9b,_0x3339b5){const _0x10b3bb=a88_0x1ecf,_0x35a120=_0x4b0c9b();while(!![]){try{const _0x4c9cd1=-parseInt(_0x10b3bb(0x190))/0x1+-parseInt(_0x10b3bb(0x188))/0x2+parseInt(_0x10b3bb(0x18a))/0x3*(-parseInt(_0x10b3bb(0x193))/0x4)+-parseInt(_0x10b3bb(0x183))/0x5*(parseInt(_0x10b3bb(0x195))/0x6)+parseInt(_0x10b3bb(0x184))/0x7*(parseInt(_0x10b3bb(0x192))/0x8)+-parseInt(_0x10b3bb(0x19c))/0x9+parseInt(_0x10b3bb(0x18f))/0xa*(parseInt(_0x10b3bb(0x199))/0xb);if(_0x4c9cd1===_0x3339b5)break;else _0x35a120['push'](_0x35a120['shift']());}catch(_0x7b6ca2){_0x35a120['push'](_0x35a120['shift']());}}}(a88_0x8b8f,0x1c8e4));function a88_0x1ecf(_0xb5b51c,_0x1f638b){_0xb5b51c=_0xb5b51c-0x183;const _0x8b8f31=a88_0x8b8f();let _0x1ecfaa=_0x8b8f31[_0xb5b51c];return _0x1ecfaa;}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0xe55126){const _0x33f4f5=a88_0x1ecf;if(_0xe55126===!![]||_0xe55126===![])return{'success':_0xe55126};if(_0xe55126===null||_0xe55126===undefined)return{'type':typeof _0xe55126};if(typeof _0xe55126!=='object')return{'type':typeof _0xe55126};const _0x5b2269=_0xe55126,_0x4dad39=[_0x33f4f5(0x19a),'message',_0x33f4f5(0x187),'error',_0x33f4f5(0x18b),_0x33f4f5(0x186)],_0x355088={};for(const _0x2deb5b of _0x4dad39){if(_0x2deb5b in _0x5b2269)_0x355088[_0x2deb5b]=_0x5b2269[_0x2deb5b];}return Object[_0x33f4f5(0x198)](_0x355088)[_0x33f4f5(0x18d)]===0x0&&(_0x355088[_0x33f4f5(0x198)]=Object[_0x33f4f5(0x198)](_0x5b2269)[_0x33f4f5(0x19b)](0x0,0x14)),_0x355088;}export const dbTest={'service':'db','command':a88_0x32377e(0x197),'description':a88_0x32377e(0x185),'risk':a88_0x32377e(0x196),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5db584){const _0x284996=a88_0x32377e,_0x17e490=_0x5db584[_0x284996(0x194)]('id'),_0x548179=await testDbLinkConnect(_0x17e490),_0x3c16df=_0x548179===!![]||typeof _0x548179===_0x284996(0x189)&&_0x548179!==null&&_0x548179[_0x284996(0x19a)]===!![],_0x3c1d5b=summarizeTestConnectResult(_0x548179);return{'ok':!![],'data':{'id':_0x17e490,'connected':Boolean(_0x3c16df),'result':_0x3c1d5b},'message':_0x3c16df?_0x284996(0x191)+_0x17e490:_0x284996(0x18e)+_0x17e490+_0x284996(0x18c)};}};
@@ -1 +1 @@
1
- const a88_0x5f569e=a88_0x5728;function a88_0x3235(){const _0x5be346=['Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','dburl','string','validation','124951GHGgBD','dbname','update','2785860NvVPzU','dbparam','str','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','New\x20database\x20name','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','104fwQEpS','POST','dbUrl','Updated\x20db\x20link\x20','username','662196sSMSmw','write','81886CmjgSH','num','dbdesc','/smartapi/dblink/update','499428ZuQKwx','1705525dlHjex','3uMRpfQ','77CXNuOH','New\x20host:port','dbParam','New\x20username','2715020SuVJam','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','dbDesc','trim','dbName','password','10UzFiQP','18UoKxce'];a88_0x3235=function(){return _0x5be346;};return a88_0x3235();}(function(_0x4908f6,_0x31eabb){const _0x191ad5=a88_0x5728,_0x430b3e=_0x4908f6();while(!![]){try{const _0x1dc648=parseInt(_0x191ad5(0x17f))/0x1*(-parseInt(_0x191ad5(0x179))/0x2)+parseInt(_0x191ad5(0x195))/0x3*(-parseInt(_0x191ad5(0x193))/0x4)+-parseInt(_0x191ad5(0x194))/0x5+parseInt(_0x191ad5(0x182))/0x6+parseInt(_0x191ad5(0x18f))/0x7*(parseInt(_0x191ad5(0x188))/0x8)+parseInt(_0x191ad5(0x17a))/0x9*(parseInt(_0x191ad5(0x173))/0xa)+-parseInt(_0x191ad5(0x16f))/0xb*(-parseInt(_0x191ad5(0x18d))/0xc);if(_0x1dc648===_0x31eabb)break;else _0x430b3e['push'](_0x430b3e['shift']());}catch(_0x502d9a){_0x430b3e['push'](_0x430b3e['shift']());}}}(a88_0x3235,0x6f128));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a88_0x5728(_0xbf4f47,_0x2fb11f){_0xbf4f47=_0xbf4f47-0x16f;const _0x323589=a88_0x3235();let _0x57286f=_0x323589[_0xbf4f47];return _0x57286f;}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';export const dbUpdate={'service':'db','command':a88_0x5f569e(0x181),'description':a88_0x5f569e(0x174),'risk':a88_0x5f569e(0x18e),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a88_0x5f569e(0x180),'type':a88_0x5f569e(0x17d),'description':a88_0x5f569e(0x186)},{'name':a88_0x5f569e(0x17c),'type':a88_0x5f569e(0x17d),'description':a88_0x5f569e(0x170)},{'name':a88_0x5f569e(0x18c),'type':'string','description':a88_0x5f569e(0x172)},{'name':a88_0x5f569e(0x178),'type':a88_0x5f569e(0x17d),'description':a88_0x5f569e(0x187)},{'name':a88_0x5f569e(0x183),'type':a88_0x5f569e(0x17d),'description':'New\x20connection\x20parameter\x20string'},{'name':a88_0x5f569e(0x191),'type':'string','description':'New\x20description'}],async 'validate'(_0x592661){const _0x51f172=a88_0x5f569e,_0x33547f=_0x592661['str'](_0x51f172(0x17c));if(_0x33547f&&!validateDbUrl(_0x33547f[_0x51f172(0x176)]()))throw CliErrors[_0x51f172(0x17e)](_0x51f172(0x17b)+_0x33547f+'\x22');},async 'dryRun'(_0x1d6f25){const _0x2f59fd=a88_0x5f569e,_0x2ce350=_0x1d6f25[_0x2f59fd(0x190)]('id'),_0x1d720b=await getDbLinkInfo(_0x2ce350),_0x6bb8f0={..._0x1d720b},_0x52d8d1=_0x1d6f25['str']('dbname');if(_0x52d8d1)_0x6bb8f0[_0x2f59fd(0x177)]=_0x52d8d1;const _0x5bc697=_0x1d6f25[_0x2f59fd(0x184)](_0x2f59fd(0x17c));if(_0x5bc697)_0x6bb8f0[_0x2f59fd(0x18a)]=_0x5bc697[_0x2f59fd(0x176)]();const _0x281321=_0x1d6f25[_0x2f59fd(0x184)]('username');if(_0x281321)_0x6bb8f0[_0x2f59fd(0x18c)]=_0x281321;const _0x1529dd=_0x1d6f25[_0x2f59fd(0x184)](_0x2f59fd(0x178));if(_0x1529dd)_0x6bb8f0[_0x2f59fd(0x178)]=_0x1529dd;const _0x221035=_0x1d6f25['str'](_0x2f59fd(0x183));if(_0x221035)_0x6bb8f0[_0x2f59fd(0x171)]=_0x221035;const _0x89b4bb=_0x1d6f25['str'](_0x2f59fd(0x191));if(_0x89b4bb)_0x6bb8f0[_0x2f59fd(0x175)]=_0x89b4bb;const _0xeffe=sanitizeDbLinkForOutput(_0x6bb8f0);return{'method':_0x2f59fd(0x189),'url':_0x2f59fd(0x192),'body':_0xeffe,'description':_0x2f59fd(0x185)};},async 'execute'(_0x152f1){const _0x4818e4=a88_0x5f569e,_0x360f3c=_0x152f1[_0x4818e4(0x190)]('id'),_0x3916ac=await getDbLinkInfo(_0x360f3c),_0x48f95e={..._0x3916ac},_0x5c3281=_0x152f1[_0x4818e4(0x184)](_0x4818e4(0x180));if(_0x5c3281)_0x48f95e[_0x4818e4(0x177)]=_0x5c3281;const _0x2cc521=_0x152f1['str'](_0x4818e4(0x17c));if(_0x2cc521)_0x48f95e[_0x4818e4(0x18a)]=_0x2cc521[_0x4818e4(0x176)]();const _0x18dbd3=_0x152f1[_0x4818e4(0x184)](_0x4818e4(0x18c));if(_0x18dbd3)_0x48f95e[_0x4818e4(0x18c)]=_0x18dbd3;const _0x7ba347=_0x152f1[_0x4818e4(0x184)](_0x4818e4(0x178));if(_0x7ba347)_0x48f95e[_0x4818e4(0x178)]=_0x7ba347;const _0x4211b1=_0x152f1['str']('dbparam');if(_0x4211b1)_0x48f95e[_0x4818e4(0x171)]=_0x4211b1;const _0x47d8c8=_0x152f1['str'](_0x4818e4(0x191));if(_0x47d8c8)_0x48f95e[_0x4818e4(0x175)]=_0x47d8c8;const {id:_0x596d8d,entity:_0x13ffa8}=normalizeEntityWithIdResponse(await updateDbLink(_0x48f95e));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x13ffa8),'message':_0x4818e4(0x18b)+(_0x596d8d??_0x360f3c)};}};
1
+ const a89_0x249201=a89_0x3c1c;function a89_0x3c1c(_0x53b688,_0x285906){_0x53b688=_0x53b688-0x125;const _0x5152dc=a89_0x5152();let _0x3c1c4c=_0x5152dc[_0x53b688];return _0x3c1c4c;}function a89_0x5152(){const _0x3df526=['Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','92vHarOI','dbDesc','/smartapi/dblink/update','7631315KeGzmB','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','18041phQTHP','36VmYPLI','dbName','trim','string','username','New\x20database\x20name','password','update','num','4217823PjfAds','Updated\x20db\x20link\x20','validation','1087672rluReT','30Pfmshd','str','dbname','2499057hHDnLH','dbdesc','POST','6rXiGPX','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','7YPpUPI','17638555SkVlrL','dbparam','11027032jYZBRI','dbUrl','New\x20connection\x20parameter\x20string'];a89_0x5152=function(){return _0x3df526;};return a89_0x5152();}(function(_0xacacf5,_0x1f5add){const _0x5a6232=a89_0x3c1c,_0x5f1ac1=_0xacacf5();while(!![]){try{const _0x8fa68a=-parseInt(_0x5a6232(0x139))/0x1*(-parseInt(_0x5a6232(0x134))/0x2)+-parseInt(_0x5a6232(0x143))/0x3+parseInt(_0x5a6232(0x146))/0x4+parseInt(_0x5a6232(0x137))/0x5*(-parseInt(_0x5a6232(0x12a))/0x6)+-parseInt(_0x5a6232(0x12c))/0x7*(parseInt(_0x5a6232(0x12f))/0x8)+parseInt(_0x5a6232(0x127))/0x9*(-parseInt(_0x5a6232(0x147))/0xa)+parseInt(_0x5a6232(0x12d))/0xb*(parseInt(_0x5a6232(0x13a))/0xc);if(_0x8fa68a===_0x1f5add)break;else _0x5f1ac1['push'](_0x5f1ac1['shift']());}catch(_0x33a039){_0x5f1ac1['push'](_0x5f1ac1['shift']());}}}(a89_0x5152,0xbbacd));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';export const dbUpdate={'service':'db','command':a89_0x249201(0x141),'description':a89_0x249201(0x132),'risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a89_0x249201(0x126),'type':a89_0x249201(0x13d),'description':a89_0x249201(0x13f)},{'name':'dburl','type':a89_0x249201(0x13d),'description':'New\x20host:port'},{'name':a89_0x249201(0x13e),'type':a89_0x249201(0x13d),'description':'New\x20username'},{'name':a89_0x249201(0x140),'type':a89_0x249201(0x13d),'description':a89_0x249201(0x138)},{'name':a89_0x249201(0x12e),'type':'string','description':a89_0x249201(0x131)},{'name':a89_0x249201(0x128),'type':a89_0x249201(0x13d),'description':'New\x20description'}],async 'validate'(_0x5d8774){const _0x39b949=a89_0x249201,_0x55f5b3=_0x5d8774['str']('dburl');if(_0x55f5b3&&!validateDbUrl(_0x55f5b3['trim']()))throw CliErrors[_0x39b949(0x145)](_0x39b949(0x12b)+_0x55f5b3+'\x22');},async 'dryRun'(_0x370fd1){const _0x1310a1=a89_0x249201,_0x1323ab=_0x370fd1[_0x1310a1(0x142)]('id'),_0x154bc6=await getDbLinkInfo(_0x1323ab),_0x32bcec={..._0x154bc6},_0xe3fdc4=_0x370fd1['str']('dbname');if(_0xe3fdc4)_0x32bcec[_0x1310a1(0x13b)]=_0xe3fdc4;const _0x2672c8=_0x370fd1[_0x1310a1(0x125)]('dburl');if(_0x2672c8)_0x32bcec['dbUrl']=_0x2672c8[_0x1310a1(0x13c)]();const _0x2ac2a7=_0x370fd1[_0x1310a1(0x125)](_0x1310a1(0x13e));if(_0x2ac2a7)_0x32bcec[_0x1310a1(0x13e)]=_0x2ac2a7;const _0x5c4cf2=_0x370fd1[_0x1310a1(0x125)](_0x1310a1(0x140));if(_0x5c4cf2)_0x32bcec[_0x1310a1(0x140)]=_0x5c4cf2;const _0x1d7da1=_0x370fd1['str'](_0x1310a1(0x12e));if(_0x1d7da1)_0x32bcec['dbParam']=_0x1d7da1;const _0x5a4267=_0x370fd1[_0x1310a1(0x125)](_0x1310a1(0x128));if(_0x5a4267)_0x32bcec[_0x1310a1(0x135)]=_0x5a4267;const _0x284d13=sanitizeDbLinkForOutput(_0x32bcec);return{'method':_0x1310a1(0x129),'url':_0x1310a1(0x136),'body':_0x284d13,'description':_0x1310a1(0x133)};},async 'execute'(_0x293783){const _0x3393ae=a89_0x249201,_0x34081b=_0x293783[_0x3393ae(0x142)]('id'),_0xef013f=await getDbLinkInfo(_0x34081b),_0x5baa9a={..._0xef013f},_0x34493f=_0x293783['str'](_0x3393ae(0x126));if(_0x34493f)_0x5baa9a['dbName']=_0x34493f;const _0x44c76d=_0x293783[_0x3393ae(0x125)]('dburl');if(_0x44c76d)_0x5baa9a[_0x3393ae(0x130)]=_0x44c76d[_0x3393ae(0x13c)]();const _0x4e27ce=_0x293783['str']('username');if(_0x4e27ce)_0x5baa9a[_0x3393ae(0x13e)]=_0x4e27ce;const _0x488a62=_0x293783[_0x3393ae(0x125)](_0x3393ae(0x140));if(_0x488a62)_0x5baa9a[_0x3393ae(0x140)]=_0x488a62;const _0x22eedc=_0x293783[_0x3393ae(0x125)]('dbparam');if(_0x22eedc)_0x5baa9a['dbParam']=_0x22eedc;const _0x69007b=_0x293783[_0x3393ae(0x125)](_0x3393ae(0x128));if(_0x69007b)_0x5baa9a[_0x3393ae(0x135)]=_0x69007b;const {id:_0x37b02d,entity:_0x152778}=normalizeEntityWithIdResponse(await updateDbLink(_0x5baa9a));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x152778),'message':_0x3393ae(0x144)+(_0x37b02d??_0x34081b)};}};
@@ -1 +1 @@
1
- const a89_0x1bec60=a89_0x4d3b;function a89_0x4d3b(_0x30db1f,_0x3ab165){_0x30db1f=_0x30db1f-0x1c0;const _0x1645f8=a89_0x1645();let _0x4d3bf2=_0x1645f8[_0x30db1f];return _0x4d3bf2;}(function(_0x47c15b,_0x15b8dd){const _0x42226c=a89_0x4d3b,_0x179974=_0x47c15b();while(!![]){try{const _0x23f135=-parseInt(_0x42226c(0x1c3))/0x1+-parseInt(_0x42226c(0x1c0))/0x2+-parseInt(_0x42226c(0x204))/0x3*(-parseInt(_0x42226c(0x1dd))/0x4)+-parseInt(_0x42226c(0x1d5))/0x5*(-parseInt(_0x42226c(0x20d))/0x6)+-parseInt(_0x42226c(0x1df))/0x7*(parseInt(_0x42226c(0x1d0))/0x8)+-parseInt(_0x42226c(0x1db))/0x9*(-parseInt(_0x42226c(0x1cc))/0xa)+-parseInt(_0x42226c(0x20c))/0xb;if(_0x23f135===_0x15b8dd)break;else _0x179974['push'](_0x179974['shift']());}catch(_0x2fa910){_0x179974['push'](_0x179974['shift']());}}}(a89_0x1645,0x3d316));import a89_0xaedd35 from'chalk';function a89_0x1645(){const _0x59eb0b=['empty','31199MYNoXj','\x20\x20\x20\x20accessKey:\x20\x20','accessKey','⚠\x20Empty\x20(treated\x20as\x20{})','✓\x20Valid\x20JSON','platform','apiDir','\x20\x20Merged\x20Config','(set,\x20length=','locale','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(missing)','✗\x20Invalid\x20JSON','\x20←\x20current','gray','missing','read','slice','(default:\x20','riskLevel','arch','✗\x20Expired','repeat','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','value','log','Global','appcode','red','✓\x20Valid','(not\x20found)','padEnd','currentApp','(no\x20file)','version','\x20\x20─','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','1201839UcFNLy','keys','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20doctor','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(not\x20set)','328449ALJPuL','111354atMoRD','verbose','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','status','format','cookie','appCode','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','831556GCGICg','env','bold','262776JuuaEf','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','yellow','check','message','explicitAppName','raw','doctor','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4969920hZJDSi','\x20\x20explicitAppName:\x20','unknown','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','456OXiyqx','defaultApp','\x20\x20API\x20Endpoints','(default)','green','85rtvTEU','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','(none)','source','9csCuev','apps','4IgePdC'];a89_0x1645=function(){return _0x59eb0b;};return a89_0x1645();}import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x3372da){const _0xf621f1=a89_0x4d3b,_0x3223a8=GIT_COMMIT!==_0xf621f1(0x1ce)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xf621f1(0x1f0)](0x0,0xa)+')':VERSION,_0x47081a=buildConfigFromFlags({}),_0x1c5a56=getCookie();console[_0xf621f1(0x1f8)](),console[_0xf621f1(0x1f8)](a89_0xaedd35[_0xf621f1(0x1c2)](CLI_BIN_NAME+_0xf621f1(0x207))),console['log'](a89_0xaedd35['gray']('─'['repeat'](0x32))),console[_0xf621f1(0x1f8)](_0xf621f1(0x1e9)+_0x3223a8),console[_0xf621f1(0x1f8)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0xf621f1(0x201)]),console[_0xf621f1(0x1f8)](_0xf621f1(0x1f6)+process[_0xf621f1(0x1e4)]+'\x20'+process[_0xf621f1(0x1f3)]),console[_0xf621f1(0x1f8)](),console[_0xf621f1(0x1f8)](a89_0xaedd35[_0xf621f1(0x1c2)](_0xf621f1(0x1d8))),console[_0xf621f1(0x1f8)](a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x202)[_0xf621f1(0x1f5)](0x1e)));const _0x18c842=getGlobalConfigPath(),_0x145fa0=getProjectConfigPath();console[_0xf621f1(0x1f8)](_0xf621f1(0x214)+(_0x18c842||a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x1fd)))),console['log'](_0xf621f1(0x1d6)+(_0x145fa0||a89_0xaedd35['gray']('(not\x20found)'))),console['log'](),console[_0xf621f1(0x1f8)](a89_0xaedd35['bold']('\x20\x20Config\x20JSON')),console[_0xf621f1(0x1f8)](a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x202)[_0xf621f1(0x1f5)](0x1e)));const _0x515ba1=(_0x10c953,_0x68382b)=>{const _0xff4874=_0xf621f1;if(!_0x68382b){console[_0xff4874(0x1f8)]('\x20\x20'+_0x10c953[_0xff4874(0x1fe)](0x11)+'\x20'+a89_0xaedd35['gray'](_0xff4874(0x200)));return;}const _0x28137a=inspectCliConfigJsonFile(_0x68382b);if(_0x28137a[_0xff4874(0x210)]==='ok')console[_0xff4874(0x1f8)]('\x20\x20'+_0x10c953[_0xff4874(0x1fe)](0x11)+'\x20'+a89_0xaedd35[_0xff4874(0x1d4)](_0xff4874(0x1e3)));else{if(_0x28137a[_0xff4874(0x210)]===_0xff4874(0x1de))console[_0xff4874(0x1f8)]('\x20\x20'+_0x10c953[_0xff4874(0x1fe)](0x11)+'\x20'+a89_0xaedd35[_0xff4874(0x1c5)](_0xff4874(0x1e2)));else _0x28137a[_0xff4874(0x210)]===_0xff4874(0x1ee)?console[_0xff4874(0x1f8)]('\x20\x20'+_0x10c953[_0xff4874(0x1fe)](0x11)+'\x20'+a89_0xaedd35[_0xff4874(0x1ed)](_0xff4874(0x1ea))):(console[_0xff4874(0x1f8)]('\x20\x20'+_0x10c953[_0xff4874(0x1fe)](0x11)+'\x20'+a89_0xaedd35[_0xff4874(0x1fb)](_0xff4874(0x1eb))),console[_0xff4874(0x1f8)]('\x20\x20'+''[_0xff4874(0x1fe)](0x11)+'\x20'+a89_0xaedd35[_0xff4874(0x1fb)](_0x28137a[_0xff4874(0x1c7)])));}};_0x515ba1(_0xf621f1(0x1f9),_0x18c842),_0x515ba1('Project',_0x145fa0),console[_0xf621f1(0x1f8)](),console[_0xf621f1(0x1f8)](a89_0xaedd35[_0xf621f1(0x1c2)](_0xf621f1(0x1e6))),console[_0xf621f1(0x1f8)](a89_0xaedd35['gray']('\x20\x20─'[_0xf621f1(0x1f5)](0x1e))),console[_0xf621f1(0x1f8)](_0xf621f1(0x1cb)+(_0x47081a[_0xf621f1(0x213)]||a89_0xaedd35[_0xf621f1(0x1fb)](_0xf621f1(0x20b)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x47081a['env']),console['log']('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x47081a[_0xf621f1(0x1e8)]),console[_0xf621f1(0x1f8)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x47081a[_0xf621f1(0x1e5)]),console[_0xf621f1(0x1f8)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x47081a[_0xf621f1(0x1d1)]||a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x1d9)))),console[_0xf621f1(0x1f8)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x47081a[_0xf621f1(0x1ff)]||a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x1d9)))),console['log'](_0xf621f1(0x1cd)+(_0x47081a[_0xf621f1(0x1c8)]||a89_0xaedd35['gray'](_0xf621f1(0x1d9)))),console['log'](_0xf621f1(0x1cf)+(_0x47081a[_0xf621f1(0x211)]||a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x1f1)+DEFAULT_CONFIG_VALUES[_0xf621f1(0x211)]+')'))),console[_0xf621f1(0x1f8)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x47081a[_0xf621f1(0x209)]??a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x1d3)))),console[_0xf621f1(0x1f8)](_0xf621f1(0x20f)+_0x47081a[_0xf621f1(0x1f2)]),console[_0xf621f1(0x1f8)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x47081a[_0xf621f1(0x20e)]),console['log']('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x47081a[_0xf621f1(0x212)]?a89_0xaedd35['green'](_0xf621f1(0x1e7)+_0x47081a[_0xf621f1(0x212)][_0xf621f1(0x215)]+')'):_0x1c5a56?a89_0xaedd35[_0xf621f1(0x1d4)]('(set\x20via\x20file,\x20length='+_0x1c5a56['length']+')'):a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x1d9))));const _0x3459b5=Object[_0xf621f1(0x205)](_0x47081a[_0xf621f1(0x1dc)]);if(_0x3459b5[_0xf621f1(0x215)]>0x0){console['log'](),console[_0xf621f1(0x1f8)](a89_0xaedd35[_0xf621f1(0x1c2)]('\x20\x20Apps')),console[_0xf621f1(0x1f8)](a89_0xaedd35['gray'](_0xf621f1(0x202)[_0xf621f1(0x1f5)](0x1e)));for(const _0x1f2636 of _0x3459b5){const _0x1c09a1=_0x47081a['apps'][_0x1f2636],_0x4bc33c=_0x1f2636===_0x47081a[_0xf621f1(0x1d1)],_0x4748c9=_0x1f2636===_0x47081a[_0xf621f1(0x1ff)],_0x1c9693=_0x4748c9?a89_0xaedd35[_0xf621f1(0x1d4)](_0xf621f1(0x1ec)):'',_0x3fc917=_0x4bc33c?'\x20(default)':'';console[_0xf621f1(0x1f8)]('\x20\x20'+_0x1f2636+_0x3fc917+_0x1c9693),console[_0xf621f1(0x1f8)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x1c09a1[_0xf621f1(0x1fa)]);const _0x29405b=buildAppDoctorFields(_0x1c09a1,{'env':_0x47081a[_0xf621f1(0x1c1)],'apiDir':_0x47081a[_0xf621f1(0x1c9)][_0xf621f1(0x1e5)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x47081a['cookie']||_0x1c5a56||undefined,'accessKey':_0x47081a['accessKey']});console['log'](_0xf621f1(0x203)+_0x29405b[_0xf621f1(0x1c1)][_0xf621f1(0x1f7)]+'\x20\x20'+a89_0xaedd35['gray']('('+_0x29405b['env'][_0xf621f1(0x1da)]+')')),console[_0xf621f1(0x1f8)](_0xf621f1(0x1d7)+_0x29405b[_0xf621f1(0x1e5)][_0xf621f1(0x1f7)]+'\x20\x20'+a89_0xaedd35[_0xf621f1(0x1ed)]('('+_0x29405b[_0xf621f1(0x1e5)]['source']+')'));const _0x1ce2e7=_0x29405b[_0xf621f1(0x212)][_0xf621f1(0x1f7)]?a89_0xaedd35[_0xf621f1(0x1d4)](_0xf621f1(0x1e7)+_0x29405b['cookie'][_0xf621f1(0x1f7)][_0xf621f1(0x215)]+')'):a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x1d9));console['log']('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x1ce2e7+'\x20\x20'+a89_0xaedd35[_0xf621f1(0x1ed)]('('+_0x29405b[_0xf621f1(0x212)][_0xf621f1(0x1da)]+')'));const _0x30d59a=_0x29405b[_0xf621f1(0x1e1)][_0xf621f1(0x1f7)]?a89_0xaedd35[_0xf621f1(0x1d4)](_0xf621f1(0x1e7)+_0x29405b[_0xf621f1(0x1e1)][_0xf621f1(0x1f7)][_0xf621f1(0x215)]+')'):a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x1d9));console[_0xf621f1(0x1f8)](_0xf621f1(0x1e0)+_0x30d59a+'\x20\x20'+a89_0xaedd35[_0xf621f1(0x1ed)]('('+_0x29405b[_0xf621f1(0x1e1)][_0xf621f1(0x1da)]+')'));}}console[_0xf621f1(0x1f8)](),console[_0xf621f1(0x1f8)](a89_0xaedd35[_0xf621f1(0x1c2)](_0xf621f1(0x1d2))),console[_0xf621f1(0x1f8)](a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x202)['repeat'](0x1e))),console[_0xf621f1(0x1f8)](_0xf621f1(0x206)+getApiDomain()),console[_0xf621f1(0x1f8)](_0xf621f1(0x20a)+getUserDomain()),console[_0xf621f1(0x1f8)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0xf621f1(0x1f8)](),console['log'](a89_0xaedd35['bold']('\x20\x20Auth')),console['log'](a89_0xaedd35[_0xf621f1(0x1ed)](_0xf621f1(0x202)['repeat'](0x1e)));if(_0x1c5a56){const _0x6da2ae=await getIsSessionValid();console[_0xf621f1(0x1f8)](_0xf621f1(0x208)+(_0x6da2ae?a89_0xaedd35[_0xf621f1(0x1d4)](_0xf621f1(0x1fc)):a89_0xaedd35[_0xf621f1(0x1fb)](_0xf621f1(0x1f4))));}else console['log'](_0xf621f1(0x208)+a89_0xaedd35[_0xf621f1(0x1fb)]('✗\x20Not\x20logged\x20in'));return console[_0xf621f1(0x1f8)](),{'ok':!![]};}export const doctorDefinition={'service':a89_0x1bec60(0x1ca),'command':a89_0x1bec60(0x1c6),'description':a89_0x1bec60(0x1c4),'risk':a89_0x1bec60(0x1ef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a90_0x1f9b84=a90_0x3949;function a90_0x3949(_0x172961,_0x458c22){_0x172961=_0x172961-0x183;const _0x23b5ab=a90_0x23b5();let _0x39499a=_0x23b5ab[_0x172961];return _0x39499a;}(function(_0x2f6efa,_0x16eb59){const _0x450520=a90_0x3949,_0x5a51db=_0x2f6efa();while(!![]){try{const _0x489417=-parseInt(_0x450520(0x18b))/0x1+-parseInt(_0x450520(0x1a1))/0x2*(-parseInt(_0x450520(0x184))/0x3)+parseInt(_0x450520(0x19e))/0x4+parseInt(_0x450520(0x1b7))/0x5+parseInt(_0x450520(0x1b2))/0x6*(-parseInt(_0x450520(0x196))/0x7)+-parseInt(_0x450520(0x1bd))/0x8+parseInt(_0x450520(0x193))/0x9;if(_0x489417===_0x16eb59)break;else _0x5a51db['push'](_0x5a51db['shift']());}catch(_0xdc4dff){_0x5a51db['push'](_0x5a51db['shift']());}}}(a90_0x23b5,0x8737b));import a90_0x16da66 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';function a90_0x23b5(){const _0x41fa1c=['✗\x20Invalid\x20JSON','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','repeat','(default:\x20','(set,\x20length=','value','\x20\x20Apps','Global','bold','\x20\x20─','unknown','length','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','apps','padEnd','1444326EyGscy','defaultApp','format','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4403490jcxPaA','apiDir','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','slice','7809984VaHXlB','green','message','env','\x20(default)','appCode','(none)','\x20\x20Merged\x20Config','(set\x20via\x20file,\x20length=','\x20\x20API\x20Endpoints','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','(missing)','locale','(no\x20file)','yellow','arch','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','red','(default)','read','✓\x20Valid','1031442hSrcNL','cookie','riskLevel','\x20\x20Config\x20JSON','\x20\x20Config\x20Files','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Expired','1020622SfxwQV','explicitAppName','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','pageSize','raw','status','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','3864834gxqMDJ','Project','✗\x20Not\x20logged\x20in','7NWPZnm','version','\x20\x20explicitAppName:\x20','\x20doctor','verbose','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','gray','3174760oKFBIE','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','4JTFVTs'];a90_0x23b5=function(){return _0x41fa1c;};return a90_0x23b5();}async function execute(_0x30032c){const _0x2d4496=a90_0x3949,_0x395d0f=GIT_COMMIT!==_0x2d4496(0x1ac)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2d4496(0x1bc)](0x0,0xa)+')':VERSION,_0x2d437f=buildConfigFromFlags({}),_0x7f764a=getCookie();console[_0x2d4496(0x1c8)](),console['log'](a90_0x16da66['bold'](CLI_BIN_NAME+_0x2d4496(0x199))),console[_0x2d4496(0x1c8)](a90_0x16da66['gray']('─'[_0x2d4496(0x1a4)](0x32))),console['log'](_0x2d4496(0x192)+_0x395d0f),console[_0x2d4496(0x1c8)](_0x2d4496(0x19f)+process[_0x2d4496(0x197)]),console[_0x2d4496(0x1c8)](_0x2d4496(0x19b)+process['platform']+'\x20'+process[_0x2d4496(0x1d2)]),console[_0x2d4496(0x1c8)](),console[_0x2d4496(0x1c8)](a90_0x16da66[_0x2d4496(0x1aa)](_0x2d4496(0x188))),console['log'](a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1ab)['repeat'](0x1e)));const _0x10185b=getGlobalConfigPath(),_0x22464f=getProjectConfigPath();console[_0x2d4496(0x1c8)](_0x2d4496(0x1b9)+(_0x10185b||a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1ba)))),console[_0x2d4496(0x1c8)](_0x2d4496(0x1c7)+(_0x22464f||a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1ba)))),console[_0x2d4496(0x1c8)](),console[_0x2d4496(0x1c8)](a90_0x16da66[_0x2d4496(0x1aa)](_0x2d4496(0x187))),console[_0x2d4496(0x1c8)](a90_0x16da66[_0x2d4496(0x19d)]('\x20\x20─'[_0x2d4496(0x1a4)](0x1e)));const _0x387c2d=(_0x5c3a00,_0x136cf8)=>{const _0x5c1bc1=_0x2d4496;if(!_0x136cf8){console[_0x5c1bc1(0x1c8)]('\x20\x20'+_0x5c3a00['padEnd'](0x11)+'\x20'+a90_0x16da66['gray'](_0x5c1bc1(0x1d0)));return;}const _0x48627c=inspectCliConfigJsonFile(_0x136cf8);if(_0x48627c['status']==='ok')console[_0x5c1bc1(0x1c8)]('\x20\x20'+_0x5c3a00[_0x5c1bc1(0x1b1)](0x11)+'\x20'+a90_0x16da66[_0x5c1bc1(0x1be)](_0x5c1bc1(0x19c)));else{if(_0x48627c[_0x5c1bc1(0x191)]==='empty')console[_0x5c1bc1(0x1c8)]('\x20\x20'+_0x5c3a00['padEnd'](0x11)+'\x20'+a90_0x16da66[_0x5c1bc1(0x1d1)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x48627c[_0x5c1bc1(0x191)]==='missing'?console[_0x5c1bc1(0x1c8)]('\x20\x20'+_0x5c3a00[_0x5c1bc1(0x1b1)](0x11)+'\x20'+a90_0x16da66[_0x5c1bc1(0x19d)](_0x5c1bc1(0x1ce))):(console[_0x5c1bc1(0x1c8)]('\x20\x20'+_0x5c3a00['padEnd'](0x11)+'\x20'+a90_0x16da66['red'](_0x5c1bc1(0x1a2))),console['log']('\x20\x20'+''[_0x5c1bc1(0x1b1)](0x11)+'\x20'+a90_0x16da66[_0x5c1bc1(0x1d5)](_0x48627c[_0x5c1bc1(0x1bf)])));}};_0x387c2d(_0x2d4496(0x1a9),_0x10185b),_0x387c2d(_0x2d4496(0x194),_0x22464f),console['log'](),console[_0x2d4496(0x1c8)](a90_0x16da66[_0x2d4496(0x1aa)](_0x2d4496(0x1c4))),console['log'](a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1ab)[_0x2d4496(0x1a4)](0x1e))),console[_0x2d4496(0x1c8)](_0x2d4496(0x1b6)+(_0x2d437f[_0x2d4496(0x1c2)]||a90_0x16da66[_0x2d4496(0x1d5)]('(not\x20set)'))),console[_0x2d4496(0x1c8)](_0x2d4496(0x18d)+_0x2d437f[_0x2d4496(0x1c0)]),console[_0x2d4496(0x1c8)](_0x2d4496(0x1d3)+_0x2d437f[_0x2d4496(0x1cf)]),console[_0x2d4496(0x1c8)](_0x2d4496(0x1bb)+_0x2d437f['apiDir']),console[_0x2d4496(0x1c8)](_0x2d4496(0x1a3)+(_0x2d437f[_0x2d4496(0x1b3)]||a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1c3)))),console[_0x2d4496(0x1c8)](_0x2d4496(0x1ae)+(_0x2d437f[_0x2d4496(0x1d4)]||a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1c3)))),console['log'](_0x2d4496(0x198)+(_0x2d437f[_0x2d4496(0x18c)]||a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1c3)))),console['log']('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2d437f[_0x2d4496(0x1b4)]||a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1a5)+DEFAULT_CONFIG_VALUES[_0x2d4496(0x1b4)]+')'))),console[_0x2d4496(0x1c8)](_0x2d4496(0x189)+(_0x2d437f[_0x2d4496(0x18f)]??a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1d6)))),console[_0x2d4496(0x1c8)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x2d437f[_0x2d4496(0x186)]),console['log'](_0x2d4496(0x1cb)+_0x2d437f[_0x2d4496(0x19a)]),console[_0x2d4496(0x1c8)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2d437f[_0x2d4496(0x185)]?a90_0x16da66[_0x2d4496(0x1be)]('(set,\x20length='+_0x2d437f['cookie'][_0x2d4496(0x1ad)]+')'):_0x7f764a?a90_0x16da66[_0x2d4496(0x1be)](_0x2d4496(0x1c5)+_0x7f764a['length']+')'):a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1c3))));const _0x1af696=Object['keys'](_0x2d437f[_0x2d4496(0x1b0)]);if(_0x1af696['length']>0x0){console[_0x2d4496(0x1c8)](),console['log'](a90_0x16da66['bold'](_0x2d4496(0x1a8))),console[_0x2d4496(0x1c8)](a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1ab)[_0x2d4496(0x1a4)](0x1e)));for(const _0x537dd6 of _0x1af696){const _0x329f2a=_0x2d437f[_0x2d4496(0x1b0)][_0x537dd6],_0x2aa8dd=_0x537dd6===_0x2d437f['defaultApp'],_0x35f179=_0x537dd6===_0x2d437f[_0x2d4496(0x1d4)],_0x661dcd=_0x35f179?a90_0x16da66[_0x2d4496(0x1be)]('\x20←\x20current'):'',_0x39678a=_0x2aa8dd?_0x2d4496(0x1c1):'';console[_0x2d4496(0x1c8)]('\x20\x20'+_0x537dd6+_0x39678a+_0x661dcd),console[_0x2d4496(0x1c8)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x329f2a['appcode']);const _0x3c561e=buildAppDoctorFields(_0x329f2a,{'env':_0x2d437f[_0x2d4496(0x1c0)],'apiDir':_0x2d437f[_0x2d4496(0x190)][_0x2d4496(0x1b8)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x2d437f[_0x2d4496(0x185)]||_0x7f764a||undefined,'accessKey':_0x2d437f['accessKey']});console[_0x2d4496(0x1c8)](_0x2d4496(0x1b5)+_0x3c561e[_0x2d4496(0x1c0)][_0x2d4496(0x1a7)]+'\x20\x20'+a90_0x16da66[_0x2d4496(0x19d)]('('+_0x3c561e[_0x2d4496(0x1c0)][_0x2d4496(0x1a0)]+')')),console['log'](_0x2d4496(0x1cc)+_0x3c561e[_0x2d4496(0x1b8)]['value']+'\x20\x20'+a90_0x16da66[_0x2d4496(0x19d)]('('+_0x3c561e[_0x2d4496(0x1b8)]['source']+')'));const _0x24caa9=_0x3c561e[_0x2d4496(0x185)][_0x2d4496(0x1a7)]?a90_0x16da66[_0x2d4496(0x1be)](_0x2d4496(0x1a6)+_0x3c561e[_0x2d4496(0x185)]['value'][_0x2d4496(0x1ad)]+')'):a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1c3));console[_0x2d4496(0x1c8)](_0x2d4496(0x1cd)+_0x24caa9+'\x20\x20'+a90_0x16da66[_0x2d4496(0x19d)]('('+_0x3c561e[_0x2d4496(0x185)][_0x2d4496(0x1a0)]+')'));const _0x57980d=_0x3c561e[_0x2d4496(0x18e)][_0x2d4496(0x1a7)]?a90_0x16da66[_0x2d4496(0x1be)]('(set,\x20length='+_0x3c561e[_0x2d4496(0x18e)][_0x2d4496(0x1a7)][_0x2d4496(0x1ad)]+')'):a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1c3));console[_0x2d4496(0x1c8)](_0x2d4496(0x1ca)+_0x57980d+'\x20\x20'+a90_0x16da66['gray']('('+_0x3c561e[_0x2d4496(0x18e)][_0x2d4496(0x1a0)]+')'));}}console['log'](),console[_0x2d4496(0x1c8)](a90_0x16da66[_0x2d4496(0x1aa)](_0x2d4496(0x1c6))),console[_0x2d4496(0x1c8)](a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1ab)[_0x2d4496(0x1a4)](0x1e))),console[_0x2d4496(0x1c8)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x2d4496(0x1c8)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log'](_0x2d4496(0x1af)+getRuntimeDomain()),console[_0x2d4496(0x1c8)](),console['log'](a90_0x16da66['bold']('\x20\x20Auth')),console[_0x2d4496(0x1c8)](a90_0x16da66[_0x2d4496(0x19d)](_0x2d4496(0x1ab)[_0x2d4496(0x1a4)](0x1e)));if(_0x7f764a){const _0x268c5d=await getIsSessionValid();console[_0x2d4496(0x1c8)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x268c5d?a90_0x16da66['green'](_0x2d4496(0x183)):a90_0x16da66[_0x2d4496(0x1d5)](_0x2d4496(0x18a))));}else console[_0x2d4496(0x1c8)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a90_0x16da66['red'](_0x2d4496(0x195)));return console[_0x2d4496(0x1c8)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':'check','description':a90_0x1f9b84(0x1c9),'risk':a90_0x1f9b84(0x1d7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -0,0 +1 @@
1
+ const a91_0x585eb5=a91_0x1ab2;(function(_0x2fe0d2,_0x3d9afe){const _0x97b0ae=a91_0x1ab2,_0x371a17=_0x2fe0d2();while(!![]){try{const _0x280327=parseInt(_0x97b0ae(0x160))/0x1*(-parseInt(_0x97b0ae(0x164))/0x2)+-parseInt(_0x97b0ae(0x156))/0x3+-parseInt(_0x97b0ae(0x166))/0x4+parseInt(_0x97b0ae(0x15e))/0x5*(-parseInt(_0x97b0ae(0x145))/0x6)+parseInt(_0x97b0ae(0x163))/0x7*(-parseInt(_0x97b0ae(0x161))/0x8)+parseInt(_0x97b0ae(0x14f))/0x9+parseInt(_0x97b0ae(0x14d))/0xa*(parseInt(_0x97b0ae(0x142))/0xb);if(_0x280327===_0x3d9afe)break;else _0x371a17['push'](_0x371a17['shift']());}catch(_0x38a3b9){_0x371a17['push'](_0x371a17['shift']());}}}(a91_0x43fb,0x73a0e));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a91_0x585eb5(0x151),'type':a91_0x585eb5(0x159),'required':!![],'description':a91_0x585eb5(0x14e)},FILEPATH_FLAG={'name':a91_0x585eb5(0x144),'type':'string','required':!![],'description':a91_0x585eb5(0x152)},DOWNLOAD_FLAG={'name':'download','type':'boolean','description':a91_0x585eb5(0x155)},LONG_TERM_FLAG={'name':a91_0x585eb5(0x153),'type':a91_0x585eb5(0x157),'description':a91_0x585eb5(0x150)};function a91_0x1ab2(_0x2e3dd1,_0x3fcebe){_0x2e3dd1=_0x2e3dd1-0x140;const _0x43fb24=a91_0x43fb();let _0x1ab2f2=_0x43fb24[_0x2e3dd1];return _0x1ab2f2;}function requireFilePath(_0xefdd91){const _0x24373b=a91_0x585eb5,_0x121a6b=_0xefdd91[_0x24373b(0x15b)]();if(!_0x121a6b)throw CliErrors[_0x24373b(0x154)]('filePath\x20is\x20required.');return _0x121a6b;}const fileUpload={'service':a91_0x585eb5(0x151),'command':a91_0x585eb5(0x14c),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a91_0x585eb5(0x14b),'flags':[FILE_FLAG],async 'dryRun'(_0x4fada2){const _0x2d4d3f=a91_0x585eb5,_0x1de7a5=requireDevelopmentUploadFile(_0x4fada2['str'](_0x2d4d3f(0x151)),_0x2d4d3f(0x162));return{'method':_0x2d4d3f(0x143),'url':_0x2d4d3f(0x140),'body':{'appCode':_0x4fada2[_0x2d4d3f(0x14a)],'multipart':{'file':_0x1de7a5}},'description':_0x2d4d3f(0x149)+_0x1de7a5[_0x2d4d3f(0x147)]+_0x2d4d3f(0x146)+_0x4fada2[_0x2d4d3f(0x14a)]};},async 'execute'(_0x272077){const _0xba8038=a91_0x585eb5,_0x415c7a=requireDevelopmentUploadFile(_0x272077[_0xba8038(0x158)]('file'),_0xba8038(0x162)),_0x3b3fa6=await uploadDevelopmentFile(_0x272077[_0xba8038(0x14a)],_0x415c7a['path']);return{'ok':!![],'data':_0x3b3fa6,'message':_0x3b3fa6[_0xba8038(0x141)]?_0xba8038(0x15a)+_0x3b3fa6[_0xba8038(0x141)]+_0xba8038(0x15c):_0xba8038(0x165)};}},fileQueryUrl={'service':a91_0x585eb5(0x151),'command':'query-url','description':a91_0x585eb5(0x148),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x238328){const _0x5320bf=a91_0x585eb5,_0x1cc328=requireFilePath(_0x238328[_0x5320bf(0x158)](_0x5320bf(0x144))),_0x532b5c=await queryDevelopmentFileUrl(_0x1cc328,{'download':_0x238328[_0x5320bf(0x15f)](_0x5320bf(0x15d)),'longTerm':_0x238328[_0x5320bf(0x15f)](_0x5320bf(0x153))});return{'ok':!![],'data':_0x532b5c};}};function a91_0x43fb(){const _0x134537=['1074424oHmGZr','File','21foGbdI','10932KjqVrU','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','1629820JdVIjY','/smartapi/common/uploadFile','filePath','13570051RIBclc','POST','filepath','138kPKCUb','\x20to\x20development\x20app\x20','path','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','Preview:\x20upload\x20','appCode','write','upload','20fqZlxO','Path\x20to\x20the\x20local\x20file\x20to\x20upload','213039YMBXzd','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','file','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','long-term','validation','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','832665YELJdS','boolean','str','string','Uploaded\x20file:\x20','trim','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','download','84410yDyJxg','bool','99dAJbUG'];a91_0x43fb=function(){return _0x134537;};return a91_0x43fb();}export const fileDefinitions=[fileUpload,fileQueryUrl];