@lovrabet/rabetbase-cli 2.3.4-beta.3 → 2.3.4-beta.4

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 (240) 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 -0
  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 -0
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -0
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/validate.js +1 -1
  50. package/lib/commands/config/get.js +1 -1
  51. package/lib/commands/config/index.js +1 -1
  52. package/lib/commands/config/list.js +1 -1
  53. package/lib/commands/config/set.js +1 -1
  54. package/lib/commands/config/shared.js +1 -1
  55. package/lib/commands/data/filter.js +1 -1
  56. package/lib/commands/data/getOne.js +1 -1
  57. package/lib/commands/data/index.js +1 -1
  58. package/lib/commands/data/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/capability.js +1 -1
  61. package/lib/commands/dataset/delete.js +1 -1
  62. package/lib/commands/dataset/detail.js +1 -1
  63. package/lib/commands/dataset/extend-update.js +1 -1
  64. package/lib/commands/dataset/field-update.js +1 -1
  65. package/lib/commands/dataset/generate.js +1 -1
  66. package/lib/commands/dataset/index.js +1 -1
  67. package/lib/commands/dataset/list.js +1 -1
  68. package/lib/commands/dataset/operations.js +1 -1
  69. package/lib/commands/dataset/relation-audit.js +1 -1
  70. package/lib/commands/dataset/relation-create.js +1 -1
  71. package/lib/commands/dataset/relation-delete.js +1 -1
  72. package/lib/commands/dataset/relation-shared.js +1 -1
  73. package/lib/commands/dataset/relation-update.js +1 -1
  74. package/lib/commands/dataset/relations.js +1 -1
  75. package/lib/commands/dataset/rename.js +1 -1
  76. package/lib/commands/dataset/restore.js +1 -1
  77. package/lib/commands/db/analyze-cancel.js +1 -1
  78. package/lib/commands/db/analyze-start.js +1 -1
  79. package/lib/commands/db/analyze-status.js +1 -1
  80. package/lib/commands/db/create.js +1 -1
  81. package/lib/commands/db/delete.js +1 -1
  82. package/lib/commands/db/detail.js +1 -1
  83. package/lib/commands/db/diff.js +1 -1
  84. package/lib/commands/db/index.js +1 -1
  85. package/lib/commands/db/list.js +1 -1
  86. package/lib/commands/db/shared.js +1 -1
  87. package/lib/commands/db/tables.js +1 -1
  88. package/lib/commands/db/test.js +1 -1
  89. package/lib/commands/db/update.js +1 -1
  90. package/lib/commands/doctor.js +1 -1
  91. package/lib/commands/init/index.js +1 -1
  92. package/lib/commands/issue/index.js +1 -1
  93. package/lib/commands/issue/nudge.js +1 -1
  94. package/lib/commands/issue/report.js +1 -1
  95. package/lib/commands/issue/shared.js +1 -1
  96. package/lib/commands/logs/index.js +1 -1
  97. package/lib/commands/menu/index.js +1 -1
  98. package/lib/commands/menu/list.js +1 -1
  99. package/lib/commands/menu/shared/compare-table.js +1 -1
  100. package/lib/commands/menu/shared/index.js +1 -1
  101. package/lib/commands/menu/shared/inquirer.js +1 -1
  102. package/lib/commands/menu/shared/local-pages.js +1 -1
  103. package/lib/commands/menu/shared/logic.js +1 -1
  104. package/lib/commands/menu/shared/service.js +1 -1
  105. package/lib/commands/menu/shared/sync-core.js +1 -1
  106. package/lib/commands/menu/shared/update-core.js +1 -1
  107. package/lib/commands/menu/shared/valid-url.js +1 -1
  108. package/lib/commands/menu/sync.js +1 -1
  109. package/lib/commands/menu/update.js +1 -1
  110. package/lib/commands/page/generate-start.js +1 -1
  111. package/lib/commands/page/generate-status.js +1 -1
  112. package/lib/commands/page/index.js +1 -1
  113. package/lib/commands/page/pull.js +1 -1
  114. package/lib/commands/page/push.js +1 -1
  115. package/lib/commands/page/relation-audit.js +1 -1
  116. package/lib/commands/page/shared.js +1 -1
  117. package/lib/commands/page/standard-page-status.js +1 -1
  118. package/lib/commands/page/sync.js +1 -1
  119. package/lib/commands/permit/index.js +1 -0
  120. package/lib/commands/permit/page-get.js +1 -0
  121. package/lib/commands/permit/page-set.js +1 -0
  122. package/lib/commands/permit/role-apis-set.js +1 -0
  123. package/lib/commands/permit/role-menus-set.js +1 -0
  124. package/lib/commands/permit/role-menus.js +1 -0
  125. package/lib/commands/permit/shared.js +1 -0
  126. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  127. package/lib/commands/project/create/format-elapsed.js +1 -1
  128. package/lib/commands/project/create/main.js +1 -1
  129. package/lib/commands/project/create/non-interactive.js +1 -1
  130. package/lib/commands/project/create/project-template-path.js +1 -1
  131. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  132. package/lib/commands/project/create/use-format-code.js +1 -1
  133. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  134. package/lib/commands/project/index.js +1 -1
  135. package/lib/commands/project/init.js +1 -1
  136. package/lib/commands/project/upgrade.js +1 -1
  137. package/lib/commands/registry.js +1 -1
  138. package/lib/commands/role/create.js +1 -0
  139. package/lib/commands/role/delete.js +1 -0
  140. package/lib/commands/role/detail.js +1 -0
  141. package/lib/commands/role/index.js +1 -0
  142. package/lib/commands/role/list.js +1 -0
  143. package/lib/commands/role/shared.js +1 -0
  144. package/lib/commands/role/update.js +1 -0
  145. package/lib/commands/role/user-add.js +1 -0
  146. package/lib/commands/role/user-remove.js +1 -0
  147. package/lib/commands/role/user-resolve.js +1 -0
  148. package/lib/commands/run/index.js +1 -1
  149. package/lib/commands/schema.js +1 -1
  150. package/lib/commands/sql/create.js +1 -1
  151. package/lib/commands/sql/delete.js +1 -1
  152. package/lib/commands/sql/detail.js +1 -1
  153. package/lib/commands/sql/exec.js +1 -1
  154. package/lib/commands/sql/index.js +1 -1
  155. package/lib/commands/sql/list.js +1 -1
  156. package/lib/commands/sql/pull.js +1 -1
  157. package/lib/commands/sql/push.js +1 -1
  158. package/lib/commands/sql/save.js +1 -1
  159. package/lib/commands/sql/shared.js +1 -1
  160. package/lib/commands/sql/status.js +1 -1
  161. package/lib/commands/sql/validate.js +1 -1
  162. package/lib/commands/workspace/add.js +1 -0
  163. package/lib/commands/workspace/index.js +1 -1
  164. package/lib/commands/workspace/remove.js +1 -0
  165. package/lib/config/schema.js +1 -1
  166. package/lib/constant/cdn.js +1 -1
  167. package/lib/constant/cli.js +1 -1
  168. package/lib/constant/defaults.js +1 -1
  169. package/lib/constant/domain.js +1 -1
  170. package/lib/constant/env.js +1 -1
  171. package/lib/constant/output.js +1 -1
  172. package/lib/constant/paths.js +1 -1
  173. package/lib/constant/risk.js +1 -1
  174. package/lib/context/app-resolver.js +1 -1
  175. package/lib/context/auth-resolver.js +1 -1
  176. package/lib/context/config-loader.js +1 -1
  177. package/lib/context.js +1 -1
  178. package/lib/core/alias-resolver.js +1 -1
  179. package/lib/core/api-client.js +1 -1
  180. package/lib/core/bff/config.js +1 -1
  181. package/lib/core/bff/file-system.js +1 -1
  182. package/lib/core/bff/hash.js +1 -1
  183. package/lib/core/bff/lock.js +1 -1
  184. package/lib/core/bff/utils.js +1 -1
  185. package/lib/core/db-resolver.js +1 -1
  186. package/lib/core/page/file-system.js +1 -1
  187. package/lib/core/page/hash.js +1 -1
  188. package/lib/core/page/lock.js +1 -1
  189. package/lib/core/sql-sync/config.js +1 -1
  190. package/lib/core/sql-sync/file-system.js +1 -1
  191. package/lib/core/sql-sync/hash.js +1 -1
  192. package/lib/core/sql-sync/lock.js +1 -1
  193. package/lib/core/sql-sync/utils.js +1 -1
  194. package/lib/core/sql-validator.js +1 -1
  195. package/lib/errors.js +1 -1
  196. package/lib/framework/build-all-flags.js +1 -1
  197. package/lib/framework/flags.js +1 -1
  198. package/lib/framework/help.js +1 -1
  199. package/lib/framework/index.js +1 -1
  200. package/lib/framework/output.js +1 -1
  201. package/lib/framework/response.js +1 -1
  202. package/lib/framework/runner-alias.js +1 -1
  203. package/lib/framework/runner.js +1 -1
  204. package/lib/framework/schema-export.js +1 -1
  205. package/lib/framework/types.js +1 -1
  206. package/lib/generated/build-info.js +1 -1
  207. package/lib/help.js +1 -1
  208. package/lib/skills/main.js +1 -1
  209. package/lib/skills/npx-skills-add.js +1 -1
  210. package/lib/telemetry/cli-command-trace.js +1 -1
  211. package/lib/telemetry/cli-help-trace.js +1 -1
  212. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  213. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  214. package/lib/telemetry/send-cli-trace-log.js +1 -1
  215. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  216. package/lib/utils/ai_config.js +1 -1
  217. package/lib/utils/apply-jq-filter.js +1 -1
  218. package/lib/utils/cdn-config.js +1 -1
  219. package/lib/utils/check-sdk-version.js +1 -1
  220. package/lib/utils/cli-version-check.js +1 -1
  221. package/lib/utils/cli-version-policy.js +1 -1
  222. package/lib/utils/config.js +1 -1
  223. package/lib/utils/copy-directory.js +1 -1
  224. package/lib/utils/entity-with-id.js +1 -1
  225. package/lib/utils/file-utils.js +1 -1
  226. package/lib/utils/guides-cdn.js +1 -1
  227. package/lib/utils/http-client.js +1 -1
  228. package/lib/utils/is-non-interactive.js +1 -1
  229. package/lib/utils/logger.js +1 -1
  230. package/lib/utils/params.js +1 -1
  231. package/lib/utils/platform.js +1 -1
  232. package/lib/utils/rules-cdn.js +1 -1
  233. package/lib/utils/sleep.js +1 -1
  234. package/lib/utils/template-replacer.js +1 -1
  235. package/lib/utils/update-notice.js +1 -1
  236. package/lib/utils/version.js +1 -1
  237. package/lib/utils/with-active-cookie.js +1 -1
  238. package/lib/utils/write-cli-side-channel.js +1 -1
  239. package/package.json +2 -2
  240. package/lib/commands/app/discover.js +0 -1
@@ -1 +1 @@
1
- const a74_0x55951e=a74_0xab14;(function(_0xacb788,_0x5b03b7){const _0x266a9c=a74_0xab14,_0x2cd1c2=_0xacb788();while(!![]){try{const _0xba302=-parseInt(_0x266a9c(0x15a))/0x1+parseInt(_0x266a9c(0x15f))/0x2*(parseInt(_0x266a9c(0x15e))/0x3)+-parseInt(_0x266a9c(0x154))/0x4*(parseInt(_0x266a9c(0x15c))/0x5)+parseInt(_0x266a9c(0x163))/0x6+-parseInt(_0x266a9c(0x159))/0x7+-parseInt(_0x266a9c(0x15d))/0x8+-parseInt(_0x266a9c(0x151))/0x9*(-parseInt(_0x266a9c(0x162))/0xa);if(_0xba302===_0x5b03b7)break;else _0x2cd1c2['push'](_0x2cd1c2['shift']());}catch(_0x5f268c){_0x2cd1c2['push'](_0x2cd1c2['shift']());}}}(a74_0x533c,0x5dc26));function a74_0x533c(){const _0x2f4a3b=['Cancel\x20requested\x20for\x20plan\x20','analyze-cancel','5370736vaMXwG','454521gKQZGS','validation','505RWZtMG','2809256vTDvyo','9SVlLnQ','272474aXcKQJ','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.','60gbXmLM','3148614UTcOHi','2231217NdoagS','plan','No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.','18376UgSsVa','string','write'];a74_0x533c=function(){return _0x2f4a3b;};return a74_0x533c();}import{cancelDbAnalysis,getDbLinkInfo}from'../../core/api-client.js';function a74_0xab14(_0x406757,_0x2389db){_0x406757=_0x406757-0x151;const _0x533cc7=a74_0x533c();let _0xab143a=_0x533cc7[_0x406757];return _0xab143a;}import{CliErrors}from'../../errors.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a74_0x55951e(0x158),'description':a74_0x55951e(0x160),'risk':a74_0x55951e(0x156),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a74_0x55951e(0x152),'type':a74_0x55951e(0x155),'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)'}],async 'execute'(_0x7c8e6b){const _0x566b02=a74_0x55951e,_0x2c74c3=_0x7c8e6b['num']('id');let _0x14f75e=_0x7c8e6b['str']('plan')||undefined;if(!_0x14f75e){const _0x2c9617=await getDbLinkInfo(_0x2c74c3);_0x14f75e=_0x2c9617['latestAnalysisTraceId']??undefined;if(!_0x14f75e)throw CliErrors[_0x566b02(0x15b)](_0x566b02(0x153),_0x566b02(0x161));}return await cancelDbAnalysis(_0x14f75e),{'ok':!![],'data':{'dbLinkId':_0x2c74c3,'planId':_0x14f75e},'message':_0x566b02(0x157)+_0x14f75e};}};
1
+ const a76_0x4663a1=a76_0x10ea;(function(_0x2fef05,_0x1de9b3){const _0x5408ab=a76_0x10ea,_0x11b6e7=_0x2fef05();while(!![]){try{const _0x33fe73=parseInt(_0x5408ab(0x113))/0x1+parseInt(_0x5408ab(0x11b))/0x2*(-parseInt(_0x5408ab(0x111))/0x3)+parseInt(_0x5408ab(0x110))/0x4+-parseInt(_0x5408ab(0x112))/0x5+parseInt(_0x5408ab(0x122))/0x6+parseInt(_0x5408ab(0x117))/0x7*(-parseInt(_0x5408ab(0x120))/0x8)+-parseInt(_0x5408ab(0x119))/0x9*(-parseInt(_0x5408ab(0x114))/0xa);if(_0x33fe73===_0x1de9b3)break;else _0x11b6e7['push'](_0x11b6e7['shift']());}catch(_0x3a5560){_0x11b6e7['push'](_0x11b6e7['shift']());}}}(a76_0x3e2e,0xbe345));function a76_0x10ea(_0x58723b,_0x539088){_0x58723b=_0x58723b-0x110;const _0x3e2e3c=a76_0x3e2e();let _0x10eaa2=_0x3e2e3c[_0x58723b];return _0x10eaa2;}import{cancelDbAnalysis,getDbLinkInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a76_0x4663a1(0x121),'description':a76_0x4663a1(0x11f),'risk':a76_0x4663a1(0x123),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a76_0x4663a1(0x118),'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)'}],async 'execute'(_0x206bc1){const _0x19a994=a76_0x4663a1,_0x17d5ec=_0x206bc1[_0x19a994(0x11d)]('id');let _0x39276a=_0x206bc1[_0x19a994(0x11e)](_0x19a994(0x11a))||undefined;if(!_0x39276a){const _0x47ef88=await getDbLinkInfo(_0x17d5ec);_0x39276a=_0x47ef88['latestAnalysisTraceId']??undefined;if(!_0x39276a)throw CliErrors[_0x19a994(0x115)]('No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.',_0x19a994(0x11c));}return await cancelDbAnalysis(_0x39276a),{'ok':!![],'data':{'dbLinkId':_0x17d5ec,'planId':_0x39276a},'message':_0x19a994(0x116)+_0x39276a};}};function a76_0x3e2e(){const _0x172f8c=['90VmLlie','plan','3520IFFwpt','Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.','num','str','Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','52000EznKyh','analyze-cancel','5445912CbBDwg','write','3525624oPLiIZ','2031FFyNNL','519630FHVTgd','125755uLaocf','770710WTePmr','validation','Cancel\x20requested\x20for\x20plan\x20','658HMMrgV','string'];a76_0x3e2e=function(){return _0x172f8c;};return a76_0x3e2e();}
@@ -1 +1 @@
1
- const a75_0xd054ba=a75_0x29aa;(function(_0x5f4056,_0x1fe626){const _0x4a4c32=a75_0x29aa,_0x4acaea=_0x5f4056();while(!![]){try{const _0x7c1147=parseInt(_0x4a4c32(0x90))/0x1+-parseInt(_0x4a4c32(0xa6))/0x2*(-parseInt(_0x4a4c32(0x9e))/0x3)+parseInt(_0x4a4c32(0xa1))/0x4*(parseInt(_0x4a4c32(0xa3))/0x5)+-parseInt(_0x4a4c32(0x95))/0x6*(parseInt(_0x4a4c32(0x93))/0x7)+-parseInt(_0x4a4c32(0x96))/0x8*(parseInt(_0x4a4c32(0xa2))/0x9)+parseInt(_0x4a4c32(0x91))/0xa+parseInt(_0x4a4c32(0x92))/0xb;if(_0x7c1147===_0x1fe626)break;else _0x4acaea['push'](_0x4acaea['shift']());}catch(_0x517f7b){_0x4acaea['push'](_0x4acaea['shift']());}}}(a75_0x1ee5,0xc74ec));function a75_0x29aa(_0x460138,_0x27c025){_0x460138=_0x460138-0x90;const _0x1ee5c7=a75_0x1ee5();let _0x29aa65=_0x1ee5c7[_0x460138];return _0x29aa65;}import{startDbAnalysis}from'../../core/api-client.js';function a75_0x1ee5(){const _0x2ba59d=['filter','108852tyeKZA','1166337NNoXEg','145mCZwxY','write','num','166dMgsWj','237435kwiBHz','12828470aaZTXJ','8080237jwFCCx','4347iHAsKY','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','8358ABUTYr','88rvCHXy','trim','appCode','map','Started\x20analysis\x20for\x20db\x20link\x20','split','str','tables','2274VFnwFk','string'];a75_0x1ee5=function(){return _0x2ba59d;};return a75_0x1ee5();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStart={'service':'db','command':'analyze-start','description':'Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','risk':a75_0xd054ba(0xa4),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a75_0xd054ba(0x9d),'type':a75_0xd054ba(0x9f),'description':a75_0xd054ba(0x94)}],async 'execute'(_0xfa58ef){const _0x2a6266=a75_0xd054ba,_0x407d0f=_0xfa58ef[_0x2a6266(0xa5)]('id'),_0x78d17a=_0xfa58ef[_0x2a6266(0x9c)]('tables'),_0x4947bf=_0x78d17a?_0x78d17a[_0x2a6266(0x9b)](',')[_0x2a6266(0x99)](_0x3182f7=>_0x3182f7[_0x2a6266(0x97)]())[_0x2a6266(0xa0)](Boolean):undefined,_0x47bcd6=await startDbAnalysis(_0x407d0f,_0x4947bf),_0x4248fa=buildDbPageLinks(_0xfa58ef[_0x2a6266(0x98)],_0x407d0f);return{'ok':!![],'data':{'dbLinkId':_0x407d0f,'planId':_0x47bcd6,'tableNames':_0x4947bf??[],..._0x4248fa?{'links':_0x4248fa}:{}},'message':_0x2a6266(0x9a)+_0x407d0f};}};
1
+ function a77_0x53d5(){const _0x5c3d9e=['3139824fYUaXm','Started\x20analysis\x20for\x20db\x20link\x20','split','28500dEADRf','filter','1500874yGMyWx','508HoVMBQ','117MkgfpV','str','trim','963TMrDDV','603946PTWtNQ','3564oUZyuf','6DiJHYe','33630WtjeRS','tables','8400vXFqtl','write','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','string','num','765339cOgudN','3gDFtpj','analyze-start','map'];a77_0x53d5=function(){return _0x5c3d9e;};return a77_0x53d5();}const a77_0xa826e0=a77_0xb1cd;(function(_0x1cd55a,_0x11748d){const _0x857164=a77_0xb1cd,_0x46c5a8=_0x1cd55a();while(!![]){try{const _0x5e5199=-parseInt(_0x857164(0x1a4))/0x1+parseInt(_0x857164(0x194))/0x2*(parseInt(_0x857164(0x1a5))/0x3)+parseInt(_0x857164(0x195))/0x4*(-parseInt(_0x857164(0x19d))/0x5)+parseInt(_0x857164(0x19c))/0x6*(-parseInt(_0x857164(0x19a))/0x7)+-parseInt(_0x857164(0x19f))/0x8*(-parseInt(_0x857164(0x199))/0x9)+-parseInt(_0x857164(0x1ab))/0xa*(parseInt(_0x857164(0x19b))/0xb)+-parseInt(_0x857164(0x1a8))/0xc*(-parseInt(_0x857164(0x196))/0xd);if(_0x5e5199===_0x11748d)break;else _0x46c5a8['push'](_0x46c5a8['shift']());}catch(_0x598094){_0x46c5a8['push'](_0x46c5a8['shift']());}}}(a77_0x53d5,0x8fa94));function a77_0xb1cd(_0x47a549,_0x5ada64){_0x47a549=_0x47a549-0x194;const _0x53d5b1=a77_0x53d5();let _0xb1cd48=_0x53d5b1[_0x47a549];return _0xb1cd48;}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_0xa826e0(0x1a6),'description':a77_0xa826e0(0x1a1),'risk':a77_0xa826e0(0x1a0),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a77_0xa826e0(0x1a2),'description':'Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)'}],async 'execute'(_0xb2b71d){const _0x15a381=a77_0xa826e0,_0x5640fe=_0xb2b71d[_0x15a381(0x1a3)]('id'),_0x180acd=_0xb2b71d[_0x15a381(0x197)](_0x15a381(0x19e)),_0x4c7cf5=_0x180acd?_0x180acd[_0x15a381(0x1aa)](',')[_0x15a381(0x1a7)](_0x5c7685=>_0x5c7685[_0x15a381(0x198)]())[_0x15a381(0x1ac)](Boolean):undefined,_0x2b3eeb=await startDbAnalysis(_0x5640fe,_0x4c7cf5),_0x418efe=buildDbPageLinks(_0xb2b71d['appCode'],_0x5640fe);return{'ok':!![],'data':{'dbLinkId':_0x5640fe,'planId':_0x2b3eeb,'tableNames':_0x4c7cf5??[],..._0x418efe?{'links':_0x418efe}:{}},'message':_0x15a381(0x1a9)+_0x5640fe};}};
@@ -1 +1 @@
1
- const a76_0x405001=a76_0x1088;(function(_0x1e78d1,_0x321a0c){const _0x45724a=a76_0x1088,_0x580e8b=_0x1e78d1();while(!![]){try{const _0x44b1e=parseInt(_0x45724a(0xd9))/0x1+-parseInt(_0x45724a(0xe2))/0x2+-parseInt(_0x45724a(0xd1))/0x3+-parseInt(_0x45724a(0xda))/0x4*(-parseInt(_0x45724a(0xdf))/0x5)+-parseInt(_0x45724a(0xd3))/0x6+parseInt(_0x45724a(0xde))/0x7*(-parseInt(_0x45724a(0xd8))/0x8)+parseInt(_0x45724a(0xdd))/0x9*(parseInt(_0x45724a(0xd5))/0xa);if(_0x44b1e===_0x321a0c)break;else _0x580e8b['push'](_0x580e8b['shift']());}catch(_0x46ddc3){_0x580e8b['push'](_0x580e8b['shift']());}}}(a76_0x379c,0xb2f48));function a76_0x379c(){const _0x2a766f=['2552zWMjZR','691815lMlGWr','91684MBWgyQ','read','num','18KJYKcu','13139zYGnsA','155fQyhrE','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','str','1735276ARFZLT','2921499bqfqGq','Analysis\x20status\x20for\x20','2470488BRDeOO','analyze-status','10913080HcLTOD','appCode','plan'];a76_0x379c=function(){return _0x2a766f;};return a76_0x379c();}import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a76_0x1088(_0x56db26,_0x17ef7b){_0x56db26=_0x56db26-0xd1;const _0x379c8c=a76_0x379c();let _0x1088a4=_0x379c8c[_0x56db26];return _0x1088a4;}export const dbAnalyzeStatus={'service':'db','command':a76_0x405001(0xd4),'description':a76_0x405001(0xe0),'risk':a76_0x405001(0xdb),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a76_0x405001(0xd7),'type':'string','required':!![],'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)'}],async 'execute'(_0x29eb49){const _0x1b5dc8=a76_0x405001,_0x17b404=_0x29eb49[_0x1b5dc8(0xdc)]('id'),_0x135de0=_0x29eb49[_0x1b5dc8(0xe1)]('plan'),_0x489e70=await getDbAnalysisStatus(_0x135de0),_0x5af825=buildDbPageLinks(_0x29eb49[_0x1b5dc8(0xd6)],_0x17b404);return{'ok':!![],'data':{'dbLinkId':_0x17b404,'planId':_0x135de0,'status':_0x489e70,..._0x5af825?{'links':_0x5af825}:{}},'message':_0x1b5dc8(0xd2)+_0x135de0};}};
1
+ const a78_0x35d75b=a78_0x2066;(function(_0x3f5053,_0x5b959f){const _0x4690a6=a78_0x2066,_0x2d010c=_0x3f5053();while(!![]){try{const _0x16ee28=-parseInt(_0x4690a6(0x11a))/0x1+-parseInt(_0x4690a6(0x128))/0x2*(parseInt(_0x4690a6(0x114))/0x3)+parseInt(_0x4690a6(0x113))/0x4*(-parseInt(_0x4690a6(0x117))/0x5)+parseInt(_0x4690a6(0x129))/0x6+parseInt(_0x4690a6(0x116))/0x7+-parseInt(_0x4690a6(0x11d))/0x8+parseInt(_0x4690a6(0x119))/0x9*(parseInt(_0x4690a6(0x123))/0xa);if(_0x16ee28===_0x5b959f)break;else _0x2d010c['push'](_0x2d010c['shift']());}catch(_0x2e0d66){_0x2d010c['push'](_0x2d010c['shift']());}}}(a78_0x49f0,0x621cf));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_0x35d75b(0x11f),'PARTIAL_SUCCESS',a78_0x35d75b(0x121),'CANCELLED']);export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a78_0x35d75b(0x115),'risk':a78_0x35d75b(0x126),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a78_0x35d75b(0x118),'type':a78_0x35d75b(0x12a),'required':!![],'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)'}],async 'execute'(_0x28a4f1){const _0x82d8a=a78_0x35d75b,_0x305ee6=_0x28a4f1[_0x82d8a(0x11c)]('id'),_0x40bcbe=_0x28a4f1[_0x82d8a(0x122)]('plan'),_0x3b3708=await getDbAnalysisStatus(_0x40bcbe),_0xe010f5=TERMINAL_STATUSES[_0x82d8a(0x125)](_0x3b3708[_0x82d8a(0x12b)]??''),{parsedJobContext:_0x3edc45,jobContextParseWarning:_0x3a0458}=parseJobContext(_0x3b3708[_0x82d8a(0x127)]),_0x18c097=buildDbPageLinks(_0x28a4f1['appCode'],_0x305ee6);return{'ok':!![],'data':{'dbLinkId':_0x305ee6,'planId':_0x40bcbe,'status':_0x3b3708,'parsedJobContext':_0x3edc45,'isTerminal':_0xe010f5,'isRetrying':_0x3b3708[_0x82d8a(0x12b)]==='RETRYING','elapsedMs':calculateElapsedMs(_0x3b3708,_0xe010f5),'jobContextParseWarning':_0x3a0458,..._0x18c097?{'links':_0x18c097}:{}},'message':_0x82d8a(0x120)+_0x40bcbe};}};function parseJobContext(_0xee4574){const _0x134e8c=a78_0x35d75b;if(!_0xee4574?.[_0x134e8c(0x11e)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x31e840=JSON['parse'](_0xee4574);if(_0x31e840&&typeof _0x31e840===_0x134e8c(0x110)&&!Array[_0x134e8c(0x12c)](_0x31e840))return{'parsedJobContext':_0x31e840,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':'jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.'};}function calculateElapsedMs(_0x3478bb,_0xde8d72){const _0xb09b3b=a78_0x35d75b;if(typeof _0x3478bb[_0xb09b3b(0x11b)]==='number'&&Number[_0xb09b3b(0x124)](_0x3478bb[_0xb09b3b(0x11b)])&&_0x3478bb[_0xb09b3b(0x11b)]>=0x0)return _0x3478bb['costTimeMs'];const _0x4ada4e=toTimestamp(_0x3478bb['startTime']);if(_0x4ada4e===null)return null;const _0x1bd9e3=toTimestamp(_0x3478bb['endTime']),_0x55d04f=_0x1bd9e3??(_0xde8d72?null:Date[_0xb09b3b(0x112)]());if(_0x55d04f===null||_0x55d04f<_0x4ada4e)return null;return _0x55d04f-_0x4ada4e;}function a78_0x2066(_0x44f179,_0x4f570b){_0x44f179=_0x44f179-0x110;const _0x49f019=a78_0x49f0();let _0x20662f=_0x49f019[_0x44f179];return _0x20662f;}function toTimestamp(_0x1bfdcd){const _0x2f3b04=a78_0x35d75b;if(typeof _0x1bfdcd==='number')return Number[_0x2f3b04(0x124)](_0x1bfdcd)?_0x1bfdcd:null;if(typeof _0x1bfdcd!==_0x2f3b04(0x12a)||_0x1bfdcd['trim']()==='')return null;const _0x213ab1=Number(_0x1bfdcd);if(Number[_0x2f3b04(0x124)](_0x213ab1))return _0x213ab1;const _0x3da9ac=Date[_0x2f3b04(0x111)](_0x1bfdcd);return Number['isNaN'](_0x3da9ac)?null:_0x3da9ac;}function a78_0x49f0(){const _0x2f9f47=['isArray','object','parse','now','4NpkzQD','5043OJFFbk','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','4540669tXsnPN','2617875giCats','plan','9omhPMd','611928ufqiIX','costTimeMs','num','181072acWPXm','trim','SUCCESS','Analysis\x20status\x20for\x20','FAILED','str','7697080QOXnrR','isFinite','has','read','jobContext','132iWnnEa','1515474KzaKgu','string','status'];a78_0x49f0=function(){return _0x2f9f47;};return a78_0x49f0();}
@@ -1 +1 @@
1
- const a77_0x3d4c9a=a77_0x4c5e;(function(_0x4fac87,_0x36c6d4){const _0x56ffb6=a77_0x4c5e,_0x5459e3=_0x4fac87();while(!![]){try{const _0x49d658=parseInt(_0x56ffb6(0xf0))/0x1+parseInt(_0x56ffb6(0xf5))/0x2+parseInt(_0x56ffb6(0xfc))/0x3*(parseInt(_0x56ffb6(0x11d))/0x4)+parseInt(_0x56ffb6(0x100))/0x5+-parseInt(_0x56ffb6(0x119))/0x6*(parseInt(_0x56ffb6(0x103))/0x7)+parseInt(_0x56ffb6(0xed))/0x8*(parseInt(_0x56ffb6(0x10e))/0x9)+-parseInt(_0x56ffb6(0x116))/0xa*(parseInt(_0x56ffb6(0x110))/0xb);if(_0x49d658===_0x36c6d4)break;else _0x5459e3['push'](_0x5459e3['shift']());}catch(_0x3d3d09){_0x5459e3['push'](_0x5459e3['shift']());}}}(a77_0x5afd,0x7e00f));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a77_0x4c5e(_0x4a3a2f,_0x52175e){_0x4a3a2f=_0x4a3a2f-0xed;const _0x5afd01=a77_0x5afd();let _0x4c5ea0=_0x5afd01[_0x4a3a2f];return _0x4c5ea0;}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':'create','description':a77_0x3d4c9a(0xf3),'risk':a77_0x3d4c9a(0x10a),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a77_0x3d4c9a(0xf9),'type':a77_0x3d4c9a(0xf7),'required':!![],'description':'Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server'},DB_TYPE_FLAG,{'name':'dbversion','type':a77_0x3d4c9a(0xf7),'description':a77_0x3d4c9a(0x104),'default':a77_0x3d4c9a(0xfa)},{'name':a77_0x3d4c9a(0x11e),'type':a77_0x3d4c9a(0xf7),'required':!![],'description':a77_0x3d4c9a(0x11b)},{'name':a77_0x3d4c9a(0xfd),'type':'string','required':!![],'description':a77_0x3d4c9a(0x10f)},{'name':a77_0x3d4c9a(0x107),'type':a77_0x3d4c9a(0xf7),'required':!![],'description':a77_0x3d4c9a(0x114)},{'name':a77_0x3d4c9a(0x102),'type':'string','description':a77_0x3d4c9a(0x112)},{'name':a77_0x3d4c9a(0x111),'type':a77_0x3d4c9a(0xf7),'description':a77_0x3d4c9a(0xef)},{'name':a77_0x3d4c9a(0x109),'type':'boolean','description':a77_0x3d4c9a(0xee),'default':![]}],async 'validate'(_0x1d0a26){const _0x6415d0=a77_0x3d4c9a,_0x39de90=_0x1d0a26[_0x6415d0(0xfb)](_0x6415d0(0x11e))[_0x6415d0(0xf8)]();if(!validateDbUrl(_0x39de90))throw CliErrors[_0x6415d0(0xf2)](_0x6415d0(0xff)+_0x39de90+'\x22',_0x6415d0(0x10d));},async 'dryRun'(_0x19e961){const _0x1f9635=a77_0x3d4c9a,_0x50c673={'appCode':_0x19e961[_0x1f9635(0xf6)],'dbName':_0x19e961[_0x1f9635(0xfb)](_0x1f9635(0xf9)),'dbType':_0x19e961[_0x1f9635(0xfb)](_0x1f9635(0xf1)),'dbVersion':_0x19e961['str'](_0x1f9635(0xfe))||'8.0','dbUrl':_0x19e961[_0x1f9635(0xfb)](_0x1f9635(0x11e))['trim'](),'username':_0x19e961[_0x1f9635(0xfb)]('username'),'password':_0x1f9635(0x115),..._0x19e961[_0x1f9635(0xfb)]('dbparam')?{'dbParam':_0x19e961[_0x1f9635(0xfb)](_0x1f9635(0x102))}:{},..._0x19e961[_0x1f9635(0xfb)](_0x1f9635(0x111))?{'dbDesc':_0x19e961[_0x1f9635(0xfb)](_0x1f9635(0x111))}:{}};return{'method':_0x1f9635(0x11c),'url':_0x1f9635(0x117),'body':_0x50c673,'description':[_0x1f9635(0x113),_0x19e961[_0x1f9635(0x106)](_0x1f9635(0x109))?_0x1f9635(0x10b):'No\x20follow-up\x20analysis'][_0x1f9635(0xf4)]('\x0a')};},async 'execute'(_0x80aca0){const _0x1b1c56=a77_0x3d4c9a,_0x214ba0={'appCode':_0x80aca0['appCode'],'dbName':_0x80aca0[_0x1b1c56(0xfb)](_0x1b1c56(0xf9)),'dbType':_0x80aca0[_0x1b1c56(0xfb)]('dbtype'),'dbVersion':_0x80aca0[_0x1b1c56(0xfb)](_0x1b1c56(0xfe))||_0x1b1c56(0xfa),'dbUrl':_0x80aca0[_0x1b1c56(0xfb)](_0x1b1c56(0x11e))[_0x1b1c56(0xf8)](),'username':_0x80aca0[_0x1b1c56(0xfb)](_0x1b1c56(0xfd)),'password':_0x80aca0[_0x1b1c56(0xfb)](_0x1b1c56(0x107)),..._0x80aca0['str']('dbparam')?{'dbParam':_0x80aca0[_0x1b1c56(0xfb)](_0x1b1c56(0x102))}:{},..._0x80aca0['str'](_0x1b1c56(0x111))?{'dbDesc':_0x80aca0[_0x1b1c56(0xfb)](_0x1b1c56(0x111))}:{}},{id:_0x478a6b,entity:_0x295468}=normalizeEntityWithIdResponse(await createDbLink(_0x214ba0));if(!_0x478a6b)return{'ok':![],'message':_0x1b1c56(0x101),'data':sanitizeDbLinkForOutput(_0x295468)};let _0xf0d1d1,_0x5d59ff;if(_0x80aca0['bool'](_0x1b1c56(0x109)))try{_0xf0d1d1=await startDbAnalysis(_0x478a6b);}catch(_0x38b1ab){_0x5d59ff=_0x38b1ab instanceof Error?_0x38b1ab[_0x1b1c56(0x108)]:String(_0x38b1ab);}const _0xb29a0c=buildDbPageLinks(_0x80aca0['appCode'],_0x478a6b),_0x191e30={'connection':sanitizeDbLinkForOutput(_0x295468),..._0xb29a0c?{'links':{'databasePage':_0xb29a0c[_0x1b1c56(0x11a)]}}:{},..._0xf0d1d1?{'analysisPlanId':_0xf0d1d1}:{},..._0x5d59ff?{'analysisStartWarning':_0x5d59ff}:{}};let _0x11b1d5;return _0x80aca0[_0x1b1c56(0x106)]('autostart')?_0x5d59ff?_0x11b1d5=_0x1b1c56(0x105)+_0x478a6b+_0x1b1c56(0x118):_0x11b1d5=_0x1b1c56(0x105)+_0x478a6b+_0x1b1c56(0x10c):_0x11b1d5='Created\x20db\x20link\x20'+_0x478a6b,{'ok':!![],'data':_0x191e30,'message':_0x11b1d5};}};function a77_0x5afd(){const _0x414d28=['Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','\x20and\x20started\x20analysis','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','2026692GoUUYq','Database\x20username','341iEQbcX','dbdesc','Extra\x20JDBC-style\x20connection\x20parameters\x20string','Create\x20dblink','Database\x20password','[redacted]','833130AcDKAf','/smartapi/dblink/create',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','18MEcRhY','databasePage','Host\x20and\x20port:\x20host:port','POST','116frCRyT','dburl','24gwXCag','After\x20create,\x20start\x20schema\x20analysis','Human-readable\x20description','940938mtLNuR','dbtype','validation','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','join','699756UDhoKk','appCode','string','trim','dbname','8.0','str','93858chlfIn','username','dbversion','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','3284650gGIcaM','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','dbparam','1007510WNRpwu','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','Created\x20db\x20link\x20','bool','password','message','autostart','write'];a77_0x5afd=function(){return _0x414d28;};return a77_0x5afd();}
1
+ const a79_0x16d75e=a79_0x3b7e;(function(_0x42dc55,_0x3d1e3c){const _0x40686a=a79_0x3b7e,_0x1130c0=_0x42dc55();while(!![]){try{const _0x42c7f2=parseInt(_0x40686a(0x192))/0x1*(parseInt(_0x40686a(0x183))/0x2)+-parseInt(_0x40686a(0x1a5))/0x3+parseInt(_0x40686a(0x18b))/0x4*(parseInt(_0x40686a(0x17c))/0x5)+parseInt(_0x40686a(0x181))/0x6*(parseInt(_0x40686a(0x1a3))/0x7)+parseInt(_0x40686a(0x17f))/0x8*(-parseInt(_0x40686a(0x194))/0x9)+-parseInt(_0x40686a(0x1a1))/0xa+parseInt(_0x40686a(0x18c))/0xb;if(_0x42c7f2===_0x3d1e3c)break;else _0x1130c0['push'](_0x1130c0['shift']());}catch(_0x1f76a4){_0x1130c0['push'](_0x1130c0['shift']());}}}(a79_0x3dbe,0x8c1b1));function a79_0x3b7e(_0x541c70,_0x3b431a){_0x541c70=_0x541c70-0x17b;const _0x3dbed8=a79_0x3dbe();let _0x3b7e60=_0x3dbed8[_0x541c70];return _0x3b7e60;}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':a79_0x16d75e(0x184),'description':a79_0x16d75e(0x1a0),'risk':a79_0x16d75e(0x19e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a79_0x16d75e(0x19f),'type':a79_0x16d75e(0x19b),'required':!![],'description':a79_0x16d75e(0x197)},DB_TYPE_FLAG,{'name':'dbversion','type':a79_0x16d75e(0x19b),'description':a79_0x16d75e(0x1a4),'default':a79_0x16d75e(0x180)},{'name':a79_0x16d75e(0x193),'type':a79_0x16d75e(0x19b),'required':!![],'description':a79_0x16d75e(0x196)},{'name':'username','type':a79_0x16d75e(0x19b),'required':!![],'description':'Database\x20username'},{'name':'password','type':a79_0x16d75e(0x19b),'required':!![],'description':a79_0x16d75e(0x191)},{'name':a79_0x16d75e(0x18f),'type':a79_0x16d75e(0x19b),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':'dbdesc','type':'string','description':'Human-readable\x20description'},{'name':a79_0x16d75e(0x19c),'type':a79_0x16d75e(0x195),'description':a79_0x16d75e(0x19a),'default':![]}],async 'validate'(_0x1b9383){const _0x3b9701=a79_0x16d75e,_0x20f5df=_0x1b9383['str'](_0x3b9701(0x193))[_0x3b9701(0x17d)]();if(!validateDbUrl(_0x20f5df))throw CliErrors[_0x3b9701(0x18a)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x20f5df+'\x22',_0x3b9701(0x189));},async 'dryRun'(_0xd07f91){const _0x16ddc3=a79_0x16d75e,_0x4759b7={'appCode':_0xd07f91[_0x16ddc3(0x186)],'dbName':_0xd07f91[_0x16ddc3(0x188)]('dbname'),'dbType':_0xd07f91[_0x16ddc3(0x188)](_0x16ddc3(0x187)),'dbVersion':_0xd07f91[_0x16ddc3(0x188)](_0x16ddc3(0x182))||_0x16ddc3(0x180),'dbUrl':_0xd07f91[_0x16ddc3(0x188)]('dburl')[_0x16ddc3(0x17d)](),'username':_0xd07f91['str']('username'),'password':'[redacted]',..._0xd07f91[_0x16ddc3(0x188)](_0x16ddc3(0x18f))?{'dbParam':_0xd07f91['str'](_0x16ddc3(0x18f))}:{},..._0xd07f91[_0x16ddc3(0x188)](_0x16ddc3(0x18d))?{'dbDesc':_0xd07f91[_0x16ddc3(0x188)]('dbdesc')}:{}};return{'method':_0x16ddc3(0x17e),'url':'/smartapi/dblink/create','body':_0x4759b7,'description':['Create\x20dblink',_0xd07f91[_0x16ddc3(0x17b)](_0x16ddc3(0x19c))?_0x16ddc3(0x198):'No\x20follow-up\x20analysis'][_0x16ddc3(0x185)]('\x0a')};},async 'execute'(_0x39ef13){const _0x27a227=a79_0x16d75e,_0x15dac2={'appCode':_0x39ef13[_0x27a227(0x186)],'dbName':_0x39ef13['str'](_0x27a227(0x19f)),'dbType':_0x39ef13['str'](_0x27a227(0x187)),'dbVersion':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x182))||_0x27a227(0x180),'dbUrl':_0x39ef13['str'](_0x27a227(0x193))[_0x27a227(0x17d)](),'username':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x19d)),'password':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x18e)),..._0x39ef13[_0x27a227(0x188)](_0x27a227(0x18f))?{'dbParam':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x18f))}:{},..._0x39ef13[_0x27a227(0x188)](_0x27a227(0x18d))?{'dbDesc':_0x39ef13[_0x27a227(0x188)](_0x27a227(0x18d))}:{}},{id:_0x577811,entity:_0x4c53eb}=normalizeEntityWithIdResponse(await createDbLink(_0x15dac2));if(!_0x577811)return{'ok':![],'message':_0x27a227(0x199),'data':sanitizeDbLinkForOutput(_0x4c53eb)};let _0x3ae3d3,_0x15d763;if(_0x39ef13[_0x27a227(0x17b)]('autostart'))try{_0x3ae3d3=await startDbAnalysis(_0x577811);}catch(_0x2065ef){_0x15d763=_0x2065ef instanceof Error?_0x2065ef[_0x27a227(0x190)]:String(_0x2065ef);}const _0x1f036f=buildDbPageLinks(_0x39ef13[_0x27a227(0x186)],_0x577811),_0x2f944f={'connection':sanitizeDbLinkForOutput(_0x4c53eb),..._0x1f036f?{'links':{'databasePage':_0x1f036f['databasePage']}}:{},..._0x3ae3d3?{'analysisPlanId':_0x3ae3d3}:{},..._0x15d763?{'analysisStartWarning':_0x15d763}:{}};let _0x370807;return _0x39ef13[_0x27a227(0x17b)](_0x27a227(0x19c))?_0x15d763?_0x370807=_0x27a227(0x1a2)+_0x577811+_0x27a227(0x1a6):_0x370807=_0x27a227(0x1a2)+_0x577811+'\x20and\x20started\x20analysis':_0x370807=_0x27a227(0x1a2)+_0x577811,{'ok':!![],'data':_0x2f944f,'message':_0x370807};}};function a79_0x3dbe(){const _0x1837d9=['POST','11176GZEEja','8.0','18444qziWOy','dbversion','1527826nVymPc','create','join','appCode','dbtype','str','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','validation','956hGvfVg','468578jZwVNi','dbdesc','password','dbparam','message','Database\x20password','1wnaIif','dburl','5706lDFMFb','boolean','Host\x20and\x20port:\x20host:port','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','After\x20create,\x20start\x20schema\x20analysis','string','autostart','username','write','dbname','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','2356990wgvIMD','Created\x20db\x20link\x20','1442AyIuEd','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','2297196oSurbP',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','bool','21365UzaALk','trim'];a79_0x3dbe=function(){return _0x1837d9;};return a79_0x3dbe();}
@@ -1 +1 @@
1
- function a78_0x30ca(_0x473b0b,_0x1b3eb4){_0x473b0b=_0x473b0b-0x189;const _0x5a33b5=a78_0x5a33();let _0x30caab=_0x5a33b5[_0x473b0b];return _0x30caab;}const a78_0x35326e=a78_0x30ca;(function(_0x3842ca,_0x3ed99e){const _0x38e65c=a78_0x30ca,_0x4aa774=_0x3842ca();while(!![]){try{const _0x545d31=parseInt(_0x38e65c(0x193))/0x1+parseInt(_0x38e65c(0x190))/0x2*(parseInt(_0x38e65c(0x189))/0x3)+-parseInt(_0x38e65c(0x194))/0x4+parseInt(_0x38e65c(0x18d))/0x5*(-parseInt(_0x38e65c(0x196))/0x6)+parseInt(_0x38e65c(0x18c))/0x7+parseInt(_0x38e65c(0x18e))/0x8*(-parseInt(_0x38e65c(0x18b))/0x9)+-parseInt(_0x38e65c(0x18f))/0xa;if(_0x545d31===_0x3ed99e)break;else _0x4aa774['push'](_0x4aa774['shift']());}catch(_0x455c83){_0x4aa774['push'](_0x4aa774['shift']());}}}(a78_0x5a33,0x76ef8));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a78_0x5a33(){const _0x185259=['278448NEUHiX','21itOyXg','delete','10665IWanRU','2155195yCLguc','5WLtjKh','4408EJBkgR','809640NGmEjl','137002KYXBUk','Deleted\x20db\x20link\x20','num','957322ApRFpu','1908988fieivo','high-risk-write'];a78_0x5a33=function(){return _0x185259;};return a78_0x5a33();}export const dbDelete={'service':'db','command':a78_0x35326e(0x18a),'description':'Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','risk':a78_0x35326e(0x195),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x329833){const _0x222037=a78_0x35326e,_0x55fad7=_0x329833[_0x222037(0x192)]('id');return await deleteDbLink(_0x55fad7),{'ok':!![],'data':{'id':_0x55fad7,'deleted':!![]},'message':_0x222037(0x191)+_0x55fad7};}};
1
+ function a80_0x3b21(){const _0x499cdf=['3834JOiakG','delete','50131VbGVrB','3770XMfmeZ','505406LeRPmG','834668dOTaoJ','1209816AmTDVh','69594jyzXGV','high-risk-write','num','2EOGRfH','446550VyHNSl','55gerhmT','Deleted\x20db\x20link\x20','7ZnDXEE'];a80_0x3b21=function(){return _0x499cdf;};return a80_0x3b21();}const a80_0x4dda0d=a80_0x82ef;(function(_0x54673b,_0x2f5539){const _0xfcd89a=a80_0x82ef,_0x41d2a3=_0x54673b();while(!![]){try{const _0x34e13a=-parseInt(_0xfcd89a(0xf5))/0x1*(-parseInt(_0xfcd89a(0xfd))/0x2)+parseInt(_0xfcd89a(0xfe))/0x3+-parseInt(_0xfcd89a(0xf8))/0x4+-parseInt(_0xfcd89a(0xff))/0x5*(-parseInt(_0xfcd89a(0xfa))/0x6)+-parseInt(_0xfcd89a(0x101))/0x7*(parseInt(_0xfcd89a(0xf9))/0x8)+parseInt(_0xfcd89a(0xf3))/0x9*(parseInt(_0xfcd89a(0xf6))/0xa)+parseInt(_0xfcd89a(0xf7))/0xb;if(_0x34e13a===_0x2f5539)break;else _0x41d2a3['push'](_0x41d2a3['shift']());}catch(_0x2618b0){_0x41d2a3['push'](_0x41d2a3['shift']());}}}(a80_0x3b21,0x2a4a8));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a80_0x82ef(_0x49e986,_0xbaa762){_0x49e986=_0x49e986-0xf3;const _0x3b2111=a80_0x3b21();let _0x82ef5a=_0x3b2111[_0x49e986];return _0x82ef5a;}export const dbDelete={'service':'db','command':a80_0x4dda0d(0xf4),'description':'Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','risk':a80_0x4dda0d(0xfb),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5da25c){const _0x5a3f40=a80_0x4dda0d,_0x5026eb=_0x5da25c[_0x5a3f40(0xfc)]('id');return await deleteDbLink(_0x5026eb),{'ok':!![],'data':{'id':_0x5026eb,'deleted':!![]},'message':_0x5a3f40(0x100)+_0x5026eb};}};
@@ -1 +1 @@
1
- function a79_0x1656(_0x26604b,_0x338947){_0x26604b=_0x26604b-0x11e;const _0x24ce81=a79_0x24ce();let _0x165645=_0x24ce81[_0x26604b];return _0x165645;}(function(_0x28ffc5,_0x23bed0){const _0x10ce66=a79_0x1656,_0x56338c=_0x28ffc5();while(!![]){try{const _0x25c8d2=parseInt(_0x10ce66(0x127))/0x1*(parseInt(_0x10ce66(0x12b))/0x2)+-parseInt(_0x10ce66(0x124))/0x3*(-parseInt(_0x10ce66(0x120))/0x4)+parseInt(_0x10ce66(0x122))/0x5+parseInt(_0x10ce66(0x11e))/0x6*(parseInt(_0x10ce66(0x11f))/0x7)+parseInt(_0x10ce66(0x129))/0x8+parseInt(_0x10ce66(0x128))/0x9*(parseInt(_0x10ce66(0x121))/0xa)+-parseInt(_0x10ce66(0x125))/0xb*(parseInt(_0x10ce66(0x12c))/0xc);if(_0x25c8d2===_0x23bed0)break;else _0x56338c['push'](_0x56338c['shift']());}catch(_0x5a69cf){_0x56338c['push'](_0x56338c['shift']());}}}(a79_0x24ce,0xe969e));import{getDbLinkInfo}from'../../core/api-client.js';function a79_0x24ce(){const _0x4f665f=['1603YUKVBJ','4eLOFAh','4446880fjHqAt','5771175ghmHDe','db\x20link\x20','2128278elqNDO','7123083xCYUhS','num','2797tIMftv','18LUtGFQ','2515184wNohet','dbName','278kvhavj','60AjmAbQ','19326hsaAUG'];a79_0x24ce=function(){return _0x4f665f;};return a79_0x24ce();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':'detail','description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x12566f){const _0x2f2f35=a79_0x1656,_0x5ecf4a=_0x12566f[_0x2f2f35(0x126)]('id'),_0x3e42e4=await getDbLinkInfo(_0x5ecf4a);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x3e42e4),'message':_0x2f2f35(0x123)+_0x5ecf4a+':\x20'+_0x3e42e4[_0x2f2f35(0x12a)]};}};
1
+ function a81_0x65f0(_0x243903,_0x405e51){_0x243903=_0x243903-0x95;const _0x38afec=a81_0x38af();let _0x65f07b=_0x38afec[_0x243903];return _0x65f07b;}const a81_0x623748=a81_0x65f0;(function(_0x5d50c8,_0x5e47f7){const _0x2f7157=a81_0x65f0,_0x502f38=_0x5d50c8();while(!![]){try{const _0x4a444b=-parseInt(_0x2f7157(0x9d))/0x1*(-parseInt(_0x2f7157(0xa3))/0x2)+-parseInt(_0x2f7157(0x96))/0x3+-parseInt(_0x2f7157(0xa4))/0x4*(parseInt(_0x2f7157(0xa2))/0x5)+parseInt(_0x2f7157(0xa1))/0x6*(parseInt(_0x2f7157(0x9c))/0x7)+parseInt(_0x2f7157(0x9a))/0x8*(-parseInt(_0x2f7157(0x9e))/0x9)+parseInt(_0x2f7157(0x9b))/0xa+-parseInt(_0x2f7157(0xa0))/0xb*(parseInt(_0x2f7157(0x99))/0xc);if(_0x4a444b===_0x5e47f7)break;else _0x502f38['push'](_0x502f38['shift']());}catch(_0x5ec429){_0x502f38['push'](_0x502f38['shift']());}}}(a81_0x38af,0x7c487));function a81_0x38af(){const _0x1b15f8=['1343718xnNyRq','read','dbName','8724mPuCZZ','1016Jotrjn','5110220GhffVr','1397907coCWWI','562XwNsHj','45522Zlixiv','db\x20link\x20','2024HdfBkT','24dITQdC','100935ECcpNJ','3446ZvdrGB','108oUzjNR','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','detail'];a81_0x38af=function(){return _0x1b15f8;};return a81_0x38af();}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';export const dbDetail={'service':'db','command':a81_0x623748(0x95),'description':a81_0x623748(0xa5),'risk':a81_0x623748(0x97),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x52d23e){const _0x2099e6=a81_0x623748,_0x52fbbf=_0x52d23e['num']('id'),_0x54095e=await getDbLinkInfo(_0x52fbbf);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x54095e),'message':_0x2099e6(0x9f)+_0x52fbbf+':\x20'+_0x54095e[_0x2099e6(0x98)]};}};
@@ -1 +1 @@
1
- const a80_0x3fbd8b=a80_0x974b;function a80_0x2936(){const _0x19da9d=['read','diff','2CYdips','str','6RlbzEZ','string','number','795868PXqlZV','483927foIrNi','Page\x20index\x20(1-based)','\x20(db\x20link\x20','pagesize','Page\x20size','num','9408328AkasbH','table','9lffiao','110779vHtpLF','page','\x20row(s),\x20total\x20','7526043riGISh','3727385gyfhcM','39625260xiiMEC'];a80_0x2936=function(){return _0x19da9d;};return a80_0x2936();}function a80_0x974b(_0x59e027,_0x6e3b7c){_0x59e027=_0x59e027-0x162;const _0x293631=a80_0x2936();let _0x974b84=_0x293631[_0x59e027];return _0x974b84;}(function(_0x47b8ea,_0xdc1658){const _0x1aed84=a80_0x974b,_0x425e5e=_0x47b8ea();while(!![]){try{const _0x54574a=-parseInt(_0x1aed84(0x16a))/0x1+parseInt(_0x1aed84(0x172))/0x2*(parseInt(_0x1aed84(0x178))/0x3)+-parseInt(_0x1aed84(0x177))/0x4+parseInt(_0x1aed84(0x16e))/0x5*(-parseInt(_0x1aed84(0x174))/0x6)+-parseInt(_0x1aed84(0x16d))/0x7+parseInt(_0x1aed84(0x167))/0x8*(-parseInt(_0x1aed84(0x169))/0x9)+parseInt(_0x1aed84(0x16f))/0xa;if(_0x54574a===_0xdc1658)break;else _0x425e5e['push'](_0x425e5e['shift']());}catch(_0x1e51d5){_0x425e5e['push'](_0x425e5e['shift']());}}}(a80_0x2936,0xc790e));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDiff={'service':'db','command':a80_0x3fbd8b(0x171),'description':'Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','risk':a80_0x3fbd8b(0x170),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a80_0x3fbd8b(0x168),'type':a80_0x3fbd8b(0x175),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a80_0x3fbd8b(0x16b),'type':a80_0x3fbd8b(0x176),'description':a80_0x3fbd8b(0x162),'default':0x1},{'name':a80_0x3fbd8b(0x164),'type':a80_0x3fbd8b(0x176),'description':a80_0x3fbd8b(0x165),'default':0x14}],async 'execute'(_0x396b9e){const _0x25628=a80_0x3fbd8b,_0x19677a=_0x396b9e[_0x25628(0x166)]('id'),_0x26b19c=_0x396b9e[_0x25628(0x166)](_0x25628(0x16b),0x1)||0x1,_0x42d854=_0x396b9e[_0x25628(0x166)](_0x25628(0x164),0x14)||0x14,_0x2db0e9=_0x396b9e[_0x25628(0x173)](_0x25628(0x168))||undefined,{totalCount:_0x3384e8,physicalTableCount:_0x1f7460,datasetTableCount:_0x1c829e,summary:_0x54c837,tableList:_0xe8ffb}=await getDbTableDiff(_0x396b9e['appCode'],_0x19677a,{'pageIndex':_0x26b19c,'pageSize':_0x42d854,'tableName':_0x2db0e9});return{'ok':!![],'data':{'dbLinkId':_0x19677a,'page':_0x26b19c,'pageSize':_0x42d854,'totalCount':_0x3384e8,'physicalTableCount':_0x1f7460,'datasetTableCount':_0x1c829e,..._0x54c837?{'summary':_0x54c837}:{},'tables':_0xe8ffb,'tableList':_0xe8ffb},'message':_0xe8ffb['length']+_0x25628(0x16c)+_0x3384e8+_0x25628(0x163)+_0x19677a+')'};}};
1
+ function a82_0x306e(_0x308e6a,_0x37279c){_0x308e6a=_0x308e6a-0x9e;const _0x276234=a82_0x2762();let _0x306e94=_0x276234[_0x308e6a];return _0x306e94;}const a82_0xb9c80=a82_0x306e;(function(_0x385945,_0x57e5f1){const _0x5c7cfb=a82_0x306e,_0x400a0b=_0x385945();while(!![]){try{const _0x50d9ae=-parseInt(_0x5c7cfb(0xc4))/0x1+parseInt(_0x5c7cfb(0xad))/0x2*(-parseInt(_0x5c7cfb(0xaa))/0x3)+-parseInt(_0x5c7cfb(0xa2))/0x4+parseInt(_0x5c7cfb(0xbd))/0x5*(parseInt(_0x5c7cfb(0xc2))/0x6)+parseInt(_0x5c7cfb(0x9f))/0x7+-parseInt(_0x5c7cfb(0xbb))/0x8*(-parseInt(_0x5c7cfb(0xb6))/0x9)+parseInt(_0x5c7cfb(0xcc))/0xa;if(_0x50d9ae===_0x57e5f1)break;else _0x400a0b['push'](_0x400a0b['shift']());}catch(_0x5e04ba){_0x400a0b['push'](_0x400a0b['shift']());}}}(a82_0x2762,0x9041c));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a82_0xb9c80(0xb2),'MODIFIED_TABLE',a82_0xb9c80(0xac),'ALREADY_ANALYZED'];export const dbDiff={'service':'db','command':a82_0xb9c80(0xcb),'description':a82_0xb9c80(0xb1),'risk':a82_0xb9c80(0xb9),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a82_0xb9c80(0xb3),'type':'string','description':a82_0xb9c80(0xc6)},{'name':a82_0xb9c80(0xd0),'type':a82_0xb9c80(0xa3),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a82_0xb9c80(0xa0),'type':a82_0xb9c80(0xa3),'description':a82_0xb9c80(0xbc),'default':0x14},{'name':a82_0xb9c80(0xbf),'type':a82_0xb9c80(0xa8),'description':a82_0xb9c80(0xa4)},{'name':'changed-only','type':a82_0xb9c80(0xa8),'description':a82_0xb9c80(0xc7)}],async 'execute'(_0x494a3){const _0x2e3948=a82_0xb9c80,_0x45b7e9=_0x494a3[_0x2e3948(0xb8)]('id'),_0x984351=_0x494a3['bool'](_0x2e3948(0xbf)),_0x6634d8=_0x494a3['bool'](_0x2e3948(0xc1)),_0x4274ec=_0x984351?0x1:_0x494a3[_0x2e3948(0xb8)](_0x2e3948(0xd0),0x1)||0x1,_0x2d3f3b=_0x984351?ALL_PAGE_SIZE:_0x494a3[_0x2e3948(0xb8)](_0x2e3948(0xa0),0x14)||0x14,_0x2ebe22=_0x494a3[_0x2e3948(0xc5)](_0x2e3948(0xb3))||undefined,_0x3f9b6f=_0x984351?await getAllDbTableDiff(_0x494a3['appCode'],_0x45b7e9,_0x2ebe22):await getDbTableDiff(_0x494a3[_0x2e3948(0xae)],_0x45b7e9,{'pageIndex':_0x4274ec,'pageSize':_0x2d3f3b,'tableName':_0x2ebe22}),_0x54695f=_0x3f9b6f[_0x2e3948(0xaf)],_0x281505=_0x6634d8?_0x54695f[_0x2e3948(0xb4)](_0x76ced5=>_0x76ced5['diffType']!=='ALREADY_ANALYZED'):_0x54695f,_0x49e090=Object[_0x2e3948(0xcf)](DIFF_TYPES[_0x2e3948(0xb0)](_0x15a3b3=>[_0x15a3b3,_0x54695f[_0x2e3948(0xb4)](_0x4e3293=>_0x4e3293[_0x2e3948(0xbe)]===_0x15a3b3)['length']])),_0x39b514=_0x54695f[_0x2e3948(0xb4)](_0x2e79cc=>_0x2e79cc[_0x2e3948(0xbe)]===_0x2e3948(0xb2)||_0x2e79cc[_0x2e3948(0xbe)]===_0x2e3948(0xcd))[_0x2e3948(0xb0)](_0x459764=>_0x459764['tableName']),_0x3f7936=_0x54695f[_0x2e3948(0xb4)](_0x5ee6cf=>_0x5ee6cf['diffType']===_0x2e3948(0xac))[_0x2e3948(0xb0)](_0xda085d=>_0xda085d['tableName']),_0x32dbb9=_0x54695f[_0x2e3948(0xb4)](_0x45a3ac=>_0x45a3ac[_0x2e3948(0xbe)]===_0x2e3948(0xcd))[_0x2e3948(0xb0)](_0x55e455=>({'tableName':_0x55e455[_0x2e3948(0xb5)],'addedColumns':_0x55e455[_0x2e3948(0xc3)]?.[_0x2e3948(0xa6)]??[],'deletedColumns':_0x55e455['fieldDiff']?.[_0x2e3948(0xc0)]??[],'modifiedColumns':_0x55e455[_0x2e3948(0xc3)]?.[_0x2e3948(0xa9)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x45b7e9,'page':_0x4274ec,'pageSize':_0x2d3f3b,'totalCount':_0x3f9b6f['totalCount'],'physicalTableCount':_0x3f9b6f[_0x2e3948(0xc9)],'datasetTableCount':_0x3f9b6f['datasetTableCount'],..._0x3f9b6f['summary']?{'summary':_0x3f9b6f[_0x2e3948(0x9e)]}:{},'summaryByType':_0x49e090,'toAnalyzeTables':_0x39b514,'deletedTables':_0x3f7936,'modifiedFieldDiffs':_0x32dbb9,'tables':_0x281505,'tableList':_0x281505},'message':_0x281505[_0x2e3948(0xba)]+_0x2e3948(0xc8)+_0x3f9b6f[_0x2e3948(0xa7)]+'\x20(db\x20link\x20'+_0x45b7e9+')'};}};async function getAllDbTableDiff(_0x1b01ff,_0x2c39ca,_0x1e88e8){const _0x4bf3df=a82_0xb9c80,_0x46d18b=new Map();let _0x20224f=0x1,_0x40b8a4=null;while(!![]){_0x40b8a4=await getDbTableDiff(_0x1b01ff,_0x2c39ca,{'pageIndex':_0x20224f,'pageSize':ALL_PAGE_SIZE,'tableName':_0x1e88e8});const _0x377475=_0x46d18b[_0x4bf3df(0xa1)];for(const _0x32f083 of _0x40b8a4['tableList']){_0x46d18b[_0x4bf3df(0xce)](_0x32f083[_0x4bf3df(0xb5)],_0x32f083);}if(_0x46d18b[_0x4bf3df(0xa1)]>=_0x40b8a4['totalCount'])break;if(_0x40b8a4[_0x4bf3df(0xaf)][_0x4bf3df(0xba)]===0x0||_0x46d18b[_0x4bf3df(0xa1)]===_0x377475)throw CliErrors['validation'](_0x4bf3df(0xab)+_0x46d18b[_0x4bf3df(0xa1)]+_0x4bf3df(0xb7)+_0x40b8a4[_0x4bf3df(0xa7)]+'\x20row(s).');_0x20224f+=0x1;}return{'totalCount':_0x40b8a4?.[_0x4bf3df(0xa7)]??0x0,'physicalTableCount':_0x40b8a4?.[_0x4bf3df(0xc9)]??0x0,'datasetTableCount':_0x40b8a4?.[_0x4bf3df(0xca)]??0x0,..._0x40b8a4?.[_0x4bf3df(0x9e)]?{'summary':_0x40b8a4[_0x4bf3df(0x9e)]}:{},'tableList':[..._0x46d18b[_0x4bf3df(0xa5)]()]};}function a82_0x2762(){const _0x2d66ca=['set','fromEntries','page','summary','5266863Ppwrsa','pagesize','size','3112796CZyXBR','number','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','values','addedColumns','totalCount','boolean','modifiedColumns','738807juIMMz','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','DELETED_TABLE','4SMHHwx','appCode','tableList','map','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','NEW_TABLE','table','filter','tableName','4203xqRLWp','\x20of\x20','num','read','length','7360iqFgUx','Page\x20size','15jgSovS','diffType','all','deletedColumns','changed-only','510666WNoLHF','fieldDiff','657285hTIJBR','str','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','\x20row(s),\x20total\x20','physicalTableCount','datasetTableCount','diff','10815160HndjJb','MODIFIED_TABLE'];a82_0x2762=function(){return _0x2d66ca;};return a82_0x2762();}
@@ -1 +1 @@
1
- function a81_0x27da(_0x31cf02,_0x3fa482){_0x31cf02=_0x31cf02-0x97;const _0x2e23d5=a81_0x2e23();let _0x27da8f=_0x2e23d5[_0x31cf02];return _0x27da8f;}(function(_0xf8e5c0,_0x483b57){const _0x16000b=a81_0x27da,_0x6aa08e=_0xf8e5c0();while(!![]){try{const _0x33c9b6=parseInt(_0x16000b(0x98))/0x1*(parseInt(_0x16000b(0x99))/0x2)+parseInt(_0x16000b(0x9e))/0x3+-parseInt(_0x16000b(0xa0))/0x4+-parseInt(_0x16000b(0x9d))/0x5*(parseInt(_0x16000b(0x9c))/0x6)+-parseInt(_0x16000b(0x9a))/0x7+parseInt(_0x16000b(0x9f))/0x8*(parseInt(_0x16000b(0x97))/0x9)+-parseInt(_0x16000b(0x9b))/0xa;if(_0x33c9b6===_0x483b57)break;else _0x6aa08e['push'](_0x6aa08e['shift']());}catch(_0x840fa9){_0x6aa08e['push'](_0x6aa08e['shift']());}}}(a81_0x2e23,0xcb7d1));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{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];function a81_0x2e23(){const _0xfea5b3=['21928ePxXrz','2104600JnTSnj','4563rrkdig','3HetIGQ','733722oejvth','8525825EgEJXy','1806820OiUgXc','23556OBWmJC','645mCOfds','2323440JRIcpw'];a81_0x2e23=function(){return _0xfea5b3;};return a81_0x2e23();}
1
+ function a83_0x59f0(_0x503a4f,_0x28c6ce){_0x503a4f=_0x503a4f-0x16a;const _0x34edbb=a83_0x34ed();let _0x59f0c5=_0x34edbb[_0x503a4f];return _0x59f0c5;}(function(_0x2869cd,_0x9893fa){const _0x1b5a6a=a83_0x59f0,_0x373d9e=_0x2869cd();while(!![]){try{const _0xa4463c=parseInt(_0x1b5a6a(0x16f))/0x1+parseInt(_0x1b5a6a(0x16e))/0x2*(parseInt(_0x1b5a6a(0x16c))/0x3)+parseInt(_0x1b5a6a(0x16a))/0x4+parseInt(_0x1b5a6a(0x16d))/0x5+-parseInt(_0x1b5a6a(0x170))/0x6*(-parseInt(_0x1b5a6a(0x173))/0x7)+parseInt(_0x1b5a6a(0x171))/0x8+parseInt(_0x1b5a6a(0x16b))/0x9*(-parseInt(_0x1b5a6a(0x172))/0xa);if(_0xa4463c===_0x9893fa)break;else _0x373d9e['push'](_0x373d9e['shift']());}catch(_0xf88c4b){_0x373d9e['push'](_0x373d9e['shift']());}}}(a83_0x34ed,0x83136));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';function a83_0x34ed(){const _0x39896a=['1701042GagyEt','1347370dmaFxq','2DIYwZP','231437nKepOj','546jdhMZQ','4197160rNoRAX','22476040hABzRi','70854SQLJpU','1083272qkxDOK','9deySlx'];a83_0x34ed=function(){return _0x39896a;};return a83_0x34ed();}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 +1 @@
1
- const a82_0x1fb45c=a82_0x5218;(function(_0x28134e,_0x2f7c41){const _0x28445d=a82_0x5218,_0x46ba07=_0x28134e();while(!![]){try{const _0x549c29=parseInt(_0x28445d(0xeb))/0x1+parseInt(_0x28445d(0xee))/0x2+parseInt(_0x28445d(0xf4))/0x3*(-parseInt(_0x28445d(0xe4))/0x4)+parseInt(_0x28445d(0xe7))/0x5+parseInt(_0x28445d(0xe3))/0x6+parseInt(_0x28445d(0xe5))/0x7+-parseInt(_0x28445d(0xe6))/0x8;if(_0x549c29===_0x2f7c41)break;else _0x46ba07['push'](_0x46ba07['shift']());}catch(_0x219451){_0x46ba07['push'](_0x46ba07['shift']());}}}(a82_0x3ef2,0xd275f));import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a82_0x5218(_0x280415,_0x13a298){_0x280415=_0x280415-0xe3;const _0x3ef2dd=a82_0x3ef2();let _0x521812=_0x3ef2dd[_0x280415];return _0x521812;}function a82_0x3ef2(){const _0x28bbd6=['list','pagesize','2025663jeXaKb','9340410hjxTlH','4AalapZ','4776618ISqbvZ','23665808lJHvZz','553760UOdtrE','appCode','read','Page\x20index\x20(1-based)','1721337JWJkVL','number','\x20database\x20connection(s)','848592DBNCYo','Found\x20','length','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'];a82_0x3ef2=function(){return _0x28bbd6;};return a82_0x3ef2();}import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a82_0x1fb45c(0xf2),'description':a82_0x1fb45c(0xf1),'risk':a82_0x1fb45c(0xe9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':'number','description':a82_0x1fb45c(0xea),'default':0x1},{'name':a82_0x1fb45c(0xf3),'type':a82_0x1fb45c(0xec),'description':'Page\x20size','default':0x64}],async 'execute'(_0x1825cc){const _0x4caa2d=a82_0x1fb45c,_0x234989=_0x1825cc['num']('page',0x1)||0x1,_0x3f0ba2=_0x1825cc['num']('pagesize',0x64)||0x64,{items:_0x4e0dfc,paging:_0x504bac}=await listDbLinks(_0x1825cc[_0x4caa2d(0xe8)],{'currentPage':_0x234989,'pageSize':_0x3f0ba2}),_0x506cdc=sanitizeDbLinkList(_0x4e0dfc),_0x45d42b=_0x504bac?_0x504bac:{'currentPage':_0x234989,'pageSize':_0x3f0ba2,'rowsOnPage':_0x506cdc[_0x4caa2d(0xf0)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x506cdc,'paging':_0x45d42b},'message':_0x4caa2d(0xef)+_0x506cdc[_0x4caa2d(0xf0)]+_0x4caa2d(0xed)};}};
1
+ const a84_0x2079c5=a84_0x1720;(function(_0x4061ed,_0x143f74){const _0x80cf1a=a84_0x1720,_0x1bcc2a=_0x4061ed();while(!![]){try{const _0x1901b0=parseInt(_0x80cf1a(0x1cb))/0x1+-parseInt(_0x80cf1a(0x1c9))/0x2+-parseInt(_0x80cf1a(0x1c1))/0x3+-parseInt(_0x80cf1a(0x1d0))/0x4+parseInt(_0x80cf1a(0x1ca))/0x5*(-parseInt(_0x80cf1a(0x1d3))/0x6)+parseInt(_0x80cf1a(0x1be))/0x7+parseInt(_0x80cf1a(0x1c6))/0x8*(parseInt(_0x80cf1a(0x1c5))/0x9);if(_0x1901b0===_0x143f74)break;else _0x1bcc2a['push'](_0x1bcc2a['shift']());}catch(_0x3be3a1){_0x1bcc2a['push'](_0x1bcc2a['shift']());}}}(a84_0x18de,0x40e41));import{listDbLinks}from'../../core/api-client.js';function a84_0x1720(_0x4fa1a7,_0x45c474){_0x4fa1a7=_0x4fa1a7-0x1be;const _0x18de85=a84_0x18de();let _0x172067=_0x18de85[_0x4fa1a7];return _0x172067;}function a84_0x18de(){const _0xccabab=['790170xIeZTE','Found\x20','appCode','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','9DWEdfS','6203784fRpgPG','pagesize','list','579184ZIdGxW','7835xUbHDI','450644cbMLFO','num','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','\x20database\x20connection(s)','number','498264grxkny','length','Page\x20size','1266UXIijU','335027MVCaLo','page','Page\x20index\x20(1-based)'];a84_0x18de=function(){return _0xccabab;};return a84_0x18de();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a84_0x2079c5(0x1c8),'description':a84_0x2079c5(0x1c4),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a84_0x2079c5(0x1bf),'type':a84_0x2079c5(0x1cf),'description':a84_0x2079c5(0x1c0),'default':0x1},{'name':a84_0x2079c5(0x1c7),'type':a84_0x2079c5(0x1cf),'description':a84_0x2079c5(0x1d2),'default':0x64}],async 'execute'(_0x2547fc){const _0x4f8951=a84_0x2079c5,_0x37de9c=_0x2547fc['num'](_0x4f8951(0x1bf),0x1)||0x1,_0x4f675d=_0x2547fc[_0x4f8951(0x1cc)](_0x4f8951(0x1c7),0x64)||0x64,{items:_0x18a969,paging:_0x295c47}=await listDbLinks(_0x2547fc[_0x4f8951(0x1c3)],{'currentPage':_0x37de9c,'pageSize':_0x4f675d}),_0x314218=sanitizeDbLinkList(_0x18a969),_0x3fc913=_0x295c47?_0x295c47:{'currentPage':_0x37de9c,'pageSize':_0x4f675d,'rowsOnPage':_0x314218['length'],'totalCount':null,'note':_0x4f8951(0x1cd)};return{'ok':!![],'data':{'connections':_0x314218,'paging':_0x3fc913},'message':_0x4f8951(0x1c2)+_0x314218[_0x4f8951(0x1d1)]+_0x4f8951(0x1ce)};}};
@@ -1 +1 @@
1
- function a83_0x4474(_0x342722,_0x52b4c7){_0x342722=_0x342722-0x14c;const _0x356dfd=a83_0x356d();let _0x4474a5=_0x356dfd[_0x342722];return _0x4474a5;}(function(_0x2b7d46,_0x489e95){const _0x3e9cd7=a83_0x4474,_0x1913ef=_0x2b7d46();while(!![]){try{const _0x5def48=-parseInt(_0x3e9cd7(0x156))/0x1+-parseInt(_0x3e9cd7(0x159))/0x2+parseInt(_0x3e9cd7(0x165))/0x3*(parseInt(_0x3e9cd7(0x157))/0x4)+-parseInt(_0x3e9cd7(0x14f))/0x5+parseInt(_0x3e9cd7(0x15c))/0x6+-parseInt(_0x3e9cd7(0x160))/0x7*(parseInt(_0x3e9cd7(0x15f))/0x8)+parseInt(_0x3e9cd7(0x14d))/0x9;if(_0x5def48===_0x489e95)break;else _0x1913ef['push'](_0x1913ef['shift']());}catch(_0x2e7537){_0x1913ef['push'](_0x1913ef['shift']());}}}(a83_0x356d,0xe318f));import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0x5e2b72){const _0x2bd515=a83_0x4474,_0x122126=_0x5e2b72[_0x2bd515(0x164)]();if(_0x122126===_0x2bd515(0x15a)||_0x122126===_0x2bd515(0x152)||_0x122126===_0x2bd515(0x154))return!![];if(_0x122126[_0x2bd515(0x155)](_0x2bd515(0x151))||_0x122126[_0x2bd515(0x155)](_0x2bd515(0x163))||_0x122126[_0x2bd515(0x155)]('credential'))return!![];if(_0x122126['includes'](_0x2bd515(0x14c))||_0x122126[_0x2bd515(0x155)]('accesskey'))return!![];if(_0x122126===_0x2bd515(0x162)||_0x122126===_0x2bd515(0x161)||_0x122126==='jdbcurl')return!![];return![];}export function sanitizeDbLinkForOutput(_0x421596){const _0x20ed07=a83_0x4474,_0x2f434b={..._0x421596};for(const _0x1e8192 of Object[_0x20ed07(0x166)](_0x2f434b)){if(!shouldRedactKey(_0x1e8192))continue;const _0x1a8f43=_0x2f434b[_0x1e8192];_0x1a8f43!=null&&String(_0x1a8f43)[_0x20ed07(0x15e)]>0x0&&(_0x2f434b[_0x1e8192]='[redacted]');}return _0x2f434b;}export function sanitizeDbLinkList(_0x573a01){const _0x7ffd5c=a83_0x4474;return _0x573a01[_0x7ffd5c(0x150)](_0x5d4931=>sanitizeDbLinkForOutput(_0x5d4931));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;function a83_0x356d(){const _0x4db346=['448732YFAhrZ','number','1602436jsWBdA','password','trim','781422MaDlhX','isFinite','length','112ehoEZH','873117wdfJRM','connectionstring','authorization','token','toLowerCase','9JlobIg','keys','test','privatekey','32210676cDBxwf','/data/er?dbId=','1753700tKCcsR','map','secret','passwd','/data/database','dbpassword','includes','217367Ngqhgg'];a83_0x356d=function(){return _0x4db346;};return a83_0x356d();}export function validateDbUrl(_0x133317){const _0x59a83d=a83_0x4474,_0x420738=_0x133317[_0x59a83d(0x15b)]();if(!_0x420738)return![];return DB_URL_PATTERN[_0x59a83d(0x167)](_0x420738);}export function buildDbPageLinks(_0x5831a2,_0x597c41){const _0x3e57e1=a83_0x4474,_0x11980b=_0x5831a2?.[_0x3e57e1(0x15b)]();if(!_0x11980b)return undefined;const _0x1eed90=typeof _0x597c41===_0x3e57e1(0x158)?String(_0x597c41):String(_0x597c41??'')['trim']();if(!_0x1eed90)return undefined;const _0x3ccad5=Number(_0x1eed90);if(!Number[_0x3e57e1(0x15d)](_0x3ccad5)||_0x3ccad5<=0x0)return undefined;const _0x36c738=getAppBaseUrl(_0x11980b),_0x51549e=encodeURIComponent(String(_0x3ccad5));return{'databasePage':_0x36c738+_0x3e57e1(0x153),'erPage':_0x36c738+_0x3e57e1(0x14e)+_0x51549e};}
1
+ function a85_0x3d5f(_0x1018b4,_0x5e737d){_0x1018b4=_0x1018b4-0x10a;const _0x4c2d8b=a85_0x4c2d();let _0x3d5fa2=_0x4c2d8b[_0x1018b4];return _0x3d5fa2;}(function(_0x1fac28,_0xc590fd){const _0x5e6082=a85_0x3d5f,_0x3078c5=_0x1fac28();while(!![]){try{const _0xeb376b=parseInt(_0x5e6082(0x114))/0x1+-parseInt(_0x5e6082(0x11a))/0x2+parseInt(_0x5e6082(0x11b))/0x3*(-parseInt(_0x5e6082(0x11d))/0x4)+parseInt(_0x5e6082(0x11e))/0x5+-parseInt(_0x5e6082(0x10d))/0x6+-parseInt(_0x5e6082(0x11f))/0x7+parseInt(_0x5e6082(0x11c))/0x8;if(_0xeb376b===_0xc590fd)break;else _0x3078c5['push'](_0x3078c5['shift']());}catch(_0x10a146){_0x3078c5['push'](_0x3078c5['shift']());}}}(a85_0x4c2d,0xd1168));import{getAppBaseUrl}from'../../constant/domain.js';function a85_0x4c2d(){const _0x35f373=['2271375tZfbBN','3843035bLEIcq','credential','[redacted]','includes','passwd','password','keys','3423864ptPqiH','toLowerCase','accesskey','jdbcurl','connectionstring','length','/data/er?dbId=','690659tGdYLN','privatekey','/data/database','trim','number','secret','223020UUlxHB','6jxLtqr','17554808ABYEFo','2503404AjTvMH'];a85_0x4c2d=function(){return _0x35f373;};return a85_0x4c2d();}function shouldRedactKey(_0x3f1b1d){const _0x3741f5=a85_0x3d5f,_0x5dc16b=_0x3f1b1d[_0x3741f5(0x10e)]();if(_0x5dc16b===_0x3741f5(0x10b)||_0x5dc16b===_0x3741f5(0x10a)||_0x5dc16b==='dbpassword')return!![];if(_0x5dc16b['includes'](_0x3741f5(0x119))||_0x5dc16b[_0x3741f5(0x122)]('token')||_0x5dc16b[_0x3741f5(0x122)](_0x3741f5(0x120)))return!![];if(_0x5dc16b['includes'](_0x3741f5(0x115))||_0x5dc16b[_0x3741f5(0x122)](_0x3741f5(0x10f)))return!![];if(_0x5dc16b==='authorization'||_0x5dc16b===_0x3741f5(0x111)||_0x5dc16b===_0x3741f5(0x110))return!![];return![];}export function sanitizeDbLinkForOutput(_0x4cfa39){const _0x249cc2=a85_0x3d5f,_0x4e8338={..._0x4cfa39};for(const _0x3fa3d1 of Object[_0x249cc2(0x10c)](_0x4e8338)){if(!shouldRedactKey(_0x3fa3d1))continue;const _0x2459a6=_0x4e8338[_0x3fa3d1];_0x2459a6!=null&&String(_0x2459a6)[_0x249cc2(0x112)]>0x0&&(_0x4e8338[_0x3fa3d1]=_0x249cc2(0x121));}return _0x4e8338;}export function sanitizeDbLinkList(_0x2da75a){return _0x2da75a['map'](_0x6ece30=>sanitizeDbLinkForOutput(_0x6ece30));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5bed0c){const _0x9019bf=a85_0x3d5f,_0x2b731f=_0x5bed0c[_0x9019bf(0x117)]();if(!_0x2b731f)return![];return DB_URL_PATTERN['test'](_0x2b731f);}export function buildDbPageLinks(_0x23b432,_0x4767e7){const _0x1bd757=a85_0x3d5f,_0x412d84=_0x23b432?.[_0x1bd757(0x117)]();if(!_0x412d84)return undefined;const _0x59381b=typeof _0x4767e7===_0x1bd757(0x118)?String(_0x4767e7):String(_0x4767e7??'')[_0x1bd757(0x117)]();if(!_0x59381b)return undefined;const _0x3f91ed=Number(_0x59381b);if(!Number['isFinite'](_0x3f91ed)||_0x3f91ed<=0x0)return undefined;const _0x1c71f6=getAppBaseUrl(_0x412d84),_0x5860be=encodeURIComponent(String(_0x3f91ed));return{'databasePage':_0x1c71f6+_0x1bd757(0x116),'erPage':_0x1c71f6+_0x1bd757(0x113)+_0x5860be};}
@@ -1 +1 @@
1
- const a84_0x311720=a84_0x4f4a;(function(_0x433c66,_0x40be1a){const _0x5d1244=a84_0x4f4a,_0x4847d0=_0x433c66();while(!![]){try{const _0x2f1ce1=-parseInt(_0x5d1244(0x178))/0x1+parseInt(_0x5d1244(0x16e))/0x2+-parseInt(_0x5d1244(0x170))/0x3*(-parseInt(_0x5d1244(0x173))/0x4)+-parseInt(_0x5d1244(0x17a))/0x5*(parseInt(_0x5d1244(0x176))/0x6)+-parseInt(_0x5d1244(0x172))/0x7*(-parseInt(_0x5d1244(0x174))/0x8)+-parseInt(_0x5d1244(0x175))/0x9*(-parseInt(_0x5d1244(0x179))/0xa)+-parseInt(_0x5d1244(0x16c))/0xb;if(_0x2f1ce1===_0x40be1a)break;else _0x4847d0['push'](_0x4847d0['shift']());}catch(_0x1c6586){_0x4847d0['push'](_0x4847d0['shift']());}}}(a84_0x3fd6,0xd8aa4));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a84_0x3fd6(){const _0x2e9aa6=['1838408wObjRy','15653916cxEfvY','2654244oshauZ','length','1206178NHNjrO','10IHexgN','5MOMsgT','tables','read','13955381RbterO','num','183490BhKcPw','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','1095021pWrOHN','\x20table(s)\x20on\x20db\x20link\x20','49krkRUo','4UZurCS'];a84_0x3fd6=function(){return _0x2e9aa6;};return a84_0x3fd6();}function a84_0x4f4a(_0x4c9671,_0x18bee5){_0x4c9671=_0x4c9671-0x16c;const _0x3fd6c7=a84_0x3fd6();let _0x4f4aae=_0x3fd6c7[_0x4c9671];return _0x4f4aae;}export const dbTables={'service':'db','command':a84_0x311720(0x17b),'description':a84_0x311720(0x16f),'risk':a84_0x311720(0x17c),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5348c5){const _0x4b60a5=a84_0x311720,_0x18bd43=_0x5348c5[_0x4b60a5(0x16d)]('id'),_0x41619a=await getDbAllTableList(_0x5348c5['appCode'],_0x18bd43);return{'ok':!![],'data':{'dbLinkId':_0x18bd43,'total':_0x41619a[_0x4b60a5(0x177)],'tables':_0x41619a},'message':_0x41619a['length']+_0x4b60a5(0x171)+_0x18bd43};}};
1
+ const a86_0x59b584=a86_0x5135;function a86_0x5135(_0x1b0301,_0x46ff94){_0x1b0301=_0x1b0301-0x8d;const _0x3c33d3=a86_0x3c33();let _0x5135d2=_0x3c33d3[_0x1b0301];return _0x5135d2;}function a86_0x3c33(){const _0x56ec69=['length','\x20table(s)\x20on\x20db\x20link\x20','866730OdhjEU','num','12BXFjUG','27002qClOrg','267177zYSjuG','49FcsVya','464348tWuEDE','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','150896PVxtAu','3283119jamTQH','851040HWwDPo','appCode'];a86_0x3c33=function(){return _0x56ec69;};return a86_0x3c33();}(function(_0x22d794,_0x5dc209){const _0x446bd1=a86_0x5135,_0x42b14c=_0x22d794();while(!![]){try{const _0xc0acc2=-parseInt(_0x446bd1(0x93))/0x1*(-parseInt(_0x446bd1(0x92))/0x2)+parseInt(_0x446bd1(0x94))/0x3+parseInt(_0x446bd1(0x96))/0x4+parseInt(_0x446bd1(0x9a))/0x5+-parseInt(_0x446bd1(0x90))/0x6+parseInt(_0x446bd1(0x95))/0x7*(parseInt(_0x446bd1(0x98))/0x8)+-parseInt(_0x446bd1(0x99))/0x9;if(_0xc0acc2===_0x5dc209)break;else _0x42b14c['push'](_0x42b14c['shift']());}catch(_0x5adee6){_0x42b14c['push'](_0x42b14c['shift']());}}}(a86_0x3c33,0x2719a));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':'tables','description':a86_0x59b584(0x97),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x467e4f){const _0x664c80=a86_0x59b584,_0x20391c=_0x467e4f[_0x664c80(0x91)]('id'),_0x14935f=await getDbAllTableList(_0x467e4f[_0x664c80(0x8d)],_0x20391c);return{'ok':!![],'data':{'dbLinkId':_0x20391c,'total':_0x14935f[_0x664c80(0x8e)],'tables':_0x14935f},'message':_0x14935f[_0x664c80(0x8e)]+_0x664c80(0x8f)+_0x20391c};}};
@@ -1 +1 @@
1
- const a85_0x22cffd=a85_0x3e29;(function(_0x23a0c8,_0x3477ae){const _0x28c922=a85_0x3e29,_0x9706d7=_0x23a0c8();while(!![]){try{const _0xfe7f41=-parseInt(_0x28c922(0x19b))/0x1+-parseInt(_0x28c922(0x1ab))/0x2*(-parseInt(_0x28c922(0x1ad))/0x3)+parseInt(_0x28c922(0x19f))/0x4+-parseInt(_0x28c922(0x1a3))/0x5+-parseInt(_0x28c922(0x1ac))/0x6*(parseInt(_0x28c922(0x1a0))/0x7)+-parseInt(_0x28c922(0x1a9))/0x8+parseInt(_0x28c922(0x19e))/0x9;if(_0xfe7f41===_0x3477ae)break;else _0x9706d7['push'](_0x9706d7['shift']());}catch(_0x2c273e){_0x9706d7['push'](_0x9706d7['shift']());}}}(a85_0x3ac2,0x2b6ac));function a85_0x3e29(_0x2c2e53,_0x45927f){_0x2c2e53=_0x2c2e53-0x19b;const _0x3ac2c9=a85_0x3ac2();let _0x3e292e=_0x3ac2c9[_0x2c2e53];return _0x3e292e;}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0xc2a81d){const _0x399da7=a85_0x3e29;if(_0xc2a81d===!![]||_0xc2a81d===![])return{'success':_0xc2a81d};if(_0xc2a81d===null||_0xc2a81d===undefined)return{'type':typeof _0xc2a81d};if(typeof _0xc2a81d!==_0x399da7(0x1a4))return{'type':typeof _0xc2a81d};const _0x3f14fc=_0xc2a81d,_0x5581ff=[_0x399da7(0x1a1),_0x399da7(0x1a5),_0x399da7(0x1a2),_0x399da7(0x1b0),_0x399da7(0x1a6),_0x399da7(0x1a7)],_0x120c65={};for(const _0x217a55 of _0x5581ff){if(_0x217a55 in _0x3f14fc)_0x120c65[_0x217a55]=_0x3f14fc[_0x217a55];}return Object[_0x399da7(0x19c)](_0x120c65)['length']===0x0&&(_0x120c65[_0x399da7(0x19c)]=Object[_0x399da7(0x19c)](_0x3f14fc)['slice'](0x0,0x14)),_0x120c65;}export const dbTest={'service':'db','command':a85_0x22cffd(0x1af),'description':a85_0x22cffd(0x1aa),'risk':a85_0x22cffd(0x1a8),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x124fff){const _0x3d602e=a85_0x22cffd,_0x1922d0=_0x124fff['num']('id'),_0xc79da1=await testDbLinkConnect(_0x1922d0),_0x3d69ce=_0xc79da1===!![]||typeof _0xc79da1==='object'&&_0xc79da1!==null&&_0xc79da1[_0x3d602e(0x1a1)]===!![],_0x13e956=summarizeTestConnectResult(_0xc79da1);return{'ok':!![],'data':{'id':_0x1922d0,'connected':Boolean(_0x3d69ce),'result':_0x13e956},'message':_0x3d69ce?_0x3d602e(0x1ae)+_0x1922d0:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x1922d0+_0x3d602e(0x19d)};}};function a85_0x3ac2(){const _0x272809=['error','17112vgBpqq','keys','\x20(see\x20data.result)','6205986vZZCJs','682392YDpgau','896xsSOGb','success','code','884895JyPBce','object','message','msg','data','read','1917256jxCYWn','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','21506VlBTau','15684OYomWE','24wAgLiF','Connection\x20OK\x20for\x20db\x20link\x20','test'];a85_0x3ac2=function(){return _0x272809;};return a85_0x3ac2();}
1
+ const a87_0x20ad54=a87_0x1826;(function(_0x2e2129,_0x3214be){const _0x16df9e=a87_0x1826,_0x4b1ba1=_0x2e2129();while(!![]){try{const _0x587a22=parseInt(_0x16df9e(0x118))/0x1*(parseInt(_0x16df9e(0x117))/0x2)+-parseInt(_0x16df9e(0x10d))/0x3+-parseInt(_0x16df9e(0x109))/0x4+-parseInt(_0x16df9e(0x111))/0x5*(-parseInt(_0x16df9e(0x110))/0x6)+parseInt(_0x16df9e(0x112))/0x7+parseInt(_0x16df9e(0x10b))/0x8+-parseInt(_0x16df9e(0x116))/0x9*(parseInt(_0x16df9e(0x113))/0xa);if(_0x587a22===_0x3214be)break;else _0x4b1ba1['push'](_0x4b1ba1['shift']());}catch(_0xa8fcf4){_0x4b1ba1['push'](_0x4b1ba1['shift']());}}}(a87_0x13a6,0x238ea));import{testDbLinkConnect}from'../../core/api-client.js';function a87_0x13a6(){const _0x2ac418=['990JQYoSu','test','message','9549iaDxft','2SIqOqt','61867IIvbon','success','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','read','\x20(see\x20data.result)','Connection\x20OK\x20for\x20db\x20link\x20','keys','code','796568YYrcXr','data','2024816hjabFd','object','817005rvBBFW','msg','length','4266oCfsud','1655JHpxll','1202936GRsRYn'];a87_0x13a6=function(){return _0x2ac418;};return a87_0x13a6();}function a87_0x1826(_0x2c5855,_0x3f947b){_0x2c5855=_0x2c5855-0x109;const _0x13a6e2=a87_0x13a6();let _0x182639=_0x13a6e2[_0x2c5855];return _0x182639;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x54b03d){const _0x12069d=a87_0x1826;if(_0x54b03d===!![]||_0x54b03d===![])return{'success':_0x54b03d};if(_0x54b03d===null||_0x54b03d===undefined)return{'type':typeof _0x54b03d};if(typeof _0x54b03d!=='object')return{'type':typeof _0x54b03d};const _0x2f44ab=_0x54b03d,_0x45a188=[_0x12069d(0x119),_0x12069d(0x115),_0x12069d(0x11f),'error',_0x12069d(0x10e),_0x12069d(0x10a)],_0x18aede={};for(const _0x7035e8 of _0x45a188){if(_0x7035e8 in _0x2f44ab)_0x18aede[_0x7035e8]=_0x2f44ab[_0x7035e8];}return Object['keys'](_0x18aede)[_0x12069d(0x10f)]===0x0&&(_0x18aede[_0x12069d(0x11e)]=Object[_0x12069d(0x11e)](_0x2f44ab)['slice'](0x0,0x14)),_0x18aede;}export const dbTest={'service':'db','command':a87_0x20ad54(0x114),'description':a87_0x20ad54(0x11a),'risk':a87_0x20ad54(0x11b),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5d6b40){const _0x192b13=a87_0x20ad54,_0x1f5837=_0x5d6b40['num']('id'),_0x4253b7=await testDbLinkConnect(_0x1f5837),_0x5a1193=_0x4253b7===!![]||typeof _0x4253b7===_0x192b13(0x10c)&&_0x4253b7!==null&&_0x4253b7[_0x192b13(0x119)]===!![],_0x5883ab=summarizeTestConnectResult(_0x4253b7);return{'ok':!![],'data':{'id':_0x1f5837,'connected':Boolean(_0x5a1193),'result':_0x5883ab},'message':_0x5a1193?_0x192b13(0x11d)+_0x1f5837:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x1f5837+_0x192b13(0x11c)};}};
@@ -1 +1 @@
1
- const a86_0x26f2ea=a86_0x303a;function a86_0x303a(_0x1e2395,_0x4cc5f5){_0x1e2395=_0x1e2395-0xdd;const _0x3f23b1=a86_0x3f23();let _0x303a8a=_0x3f23b1[_0x1e2395];return _0x303a8a;}(function(_0x403460,_0x257b71){const _0xb022f6=a86_0x303a,_0x3767f1=_0x403460();while(!![]){try{const _0x313911=-parseInt(_0xb022f6(0xf2))/0x1*(parseInt(_0xb022f6(0xea))/0x2)+-parseInt(_0xb022f6(0xfa))/0x3*(parseInt(_0xb022f6(0xe5))/0x4)+-parseInt(_0xb022f6(0xe3))/0x5*(-parseInt(_0xb022f6(0xf6))/0x6)+-parseInt(_0xb022f6(0xfd))/0x7*(parseInt(_0xb022f6(0xe2))/0x8)+-parseInt(_0xb022f6(0xee))/0x9*(parseInt(_0xb022f6(0xef))/0xa)+-parseInt(_0xb022f6(0xf4))/0xb+-parseInt(_0xb022f6(0xfc))/0xc*(-parseInt(_0xb022f6(0xf1))/0xd);if(_0x313911===_0x257b71)break;else _0x3767f1['push'](_0x3767f1['shift']());}catch(_0x20cbf5){_0x3767f1['push'](_0x3767f1['shift']());}}}(a86_0x3f23,0xb0e00));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a86_0x3f23(){const _0x35026b=['dbName','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','username','dbparam','dburl','num','/smartapi/dblink/update','81320CHoiCM','10YLoagn','dbdesc','462260opDqmf','string','password','POST','dbUrl','544OxkJCs','dbParam','str','New\x20connection\x20parameter\x20string','833823rxBExY','60weABNs','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','39jJHgMG','1864FSmAFv','dbDesc','2632014WenSSl','trim','2405316bgxbfN','New\x20database\x20name','dbname','New\x20description','9fMOdrt','Updated\x20db\x20link\x20','7180788qTVLUq','154qVtZfP'];a86_0x3f23=function(){return _0x35026b;};return a86_0x3f23();}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':'update','description':'Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x26f2ea(0xf8),'type':'string','description':a86_0x26f2ea(0xf7)},{'name':'dburl','type':a86_0x26f2ea(0xe6),'description':'New\x20host:port'},{'name':a86_0x26f2ea(0xdd),'type':a86_0x26f2ea(0xe6),'description':'New\x20username'},{'name':a86_0x26f2ea(0xe7),'type':a86_0x26f2ea(0xe6),'description':'New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API'},{'name':a86_0x26f2ea(0xde),'type':'string','description':a86_0x26f2ea(0xed)},{'name':'dbdesc','type':a86_0x26f2ea(0xe6),'description':a86_0x26f2ea(0xf9)}],async 'validate'(_0x53588d){const _0x352e3e=a86_0x26f2ea,_0x53ea8f=_0x53588d['str']('dburl');if(_0x53ea8f&&!validateDbUrl(_0x53ea8f[_0x352e3e(0xf5)]()))throw CliErrors['validation'](_0x352e3e(0xff)+_0x53ea8f+'\x22');},async 'dryRun'(_0x147302){const _0x455cb4=a86_0x26f2ea,_0x5878a6=_0x147302[_0x455cb4(0xe0)]('id'),_0x342178=await getDbLinkInfo(_0x5878a6),_0x504807={..._0x342178},_0x1e0703=_0x147302[_0x455cb4(0xec)](_0x455cb4(0xf8));if(_0x1e0703)_0x504807[_0x455cb4(0xfe)]=_0x1e0703;const _0x51adce=_0x147302[_0x455cb4(0xec)](_0x455cb4(0xdf));if(_0x51adce)_0x504807[_0x455cb4(0xe9)]=_0x51adce['trim']();const _0x1262d9=_0x147302[_0x455cb4(0xec)](_0x455cb4(0xdd));if(_0x1262d9)_0x504807[_0x455cb4(0xdd)]=_0x1262d9;const _0x20673b=_0x147302[_0x455cb4(0xec)](_0x455cb4(0xe7));if(_0x20673b)_0x504807[_0x455cb4(0xe7)]=_0x20673b;const _0x22887f=_0x147302[_0x455cb4(0xec)](_0x455cb4(0xde));if(_0x22887f)_0x504807['dbParam']=_0x22887f;const _0x2ad968=_0x147302['str'](_0x455cb4(0xe4));if(_0x2ad968)_0x504807[_0x455cb4(0xf3)]=_0x2ad968;const _0x588122=sanitizeDbLinkForOutput(_0x504807);return{'method':_0x455cb4(0xe8),'url':_0x455cb4(0xe1),'body':_0x588122,'description':_0x455cb4(0xf0)};},async 'execute'(_0x4e62b5){const _0x4af88e=a86_0x26f2ea,_0x1df7bf=_0x4e62b5[_0x4af88e(0xe0)]('id'),_0x3c4019=await getDbLinkInfo(_0x1df7bf),_0x10ca03={..._0x3c4019},_0xfc89c9=_0x4e62b5[_0x4af88e(0xec)](_0x4af88e(0xf8));if(_0xfc89c9)_0x10ca03[_0x4af88e(0xfe)]=_0xfc89c9;const _0xb6e683=_0x4e62b5[_0x4af88e(0xec)](_0x4af88e(0xdf));if(_0xb6e683)_0x10ca03[_0x4af88e(0xe9)]=_0xb6e683[_0x4af88e(0xf5)]();const _0x13b0b9=_0x4e62b5[_0x4af88e(0xec)](_0x4af88e(0xdd));if(_0x13b0b9)_0x10ca03[_0x4af88e(0xdd)]=_0x13b0b9;const _0x505e73=_0x4e62b5[_0x4af88e(0xec)](_0x4af88e(0xe7));if(_0x505e73)_0x10ca03[_0x4af88e(0xe7)]=_0x505e73;const _0x96f379=_0x4e62b5[_0x4af88e(0xec)](_0x4af88e(0xde));if(_0x96f379)_0x10ca03[_0x4af88e(0xeb)]=_0x96f379;const _0x5c972f=_0x4e62b5[_0x4af88e(0xec)](_0x4af88e(0xe4));if(_0x5c972f)_0x10ca03['dbDesc']=_0x5c972f;const {id:_0x2e9e61,entity:_0x464919}=normalizeEntityWithIdResponse(await updateDbLink(_0x10ca03));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x464919),'message':_0x4af88e(0xfb)+(_0x2e9e61??_0x1df7bf)};}};
1
+ const a88_0x2c28cf=a88_0x118d;(function(_0x45fece,_0x5c4d74){const _0x310e1b=a88_0x118d,_0x32cfc5=_0x45fece();while(!![]){try{const _0x191066=parseInt(_0x310e1b(0xc3))/0x1*(parseInt(_0x310e1b(0xbe))/0x2)+-parseInt(_0x310e1b(0xac))/0x3*(-parseInt(_0x310e1b(0xbb))/0x4)+parseInt(_0x310e1b(0xa5))/0x5*(-parseInt(_0x310e1b(0xb3))/0x6)+-parseInt(_0x310e1b(0xab))/0x7*(-parseInt(_0x310e1b(0xb2))/0x8)+parseInt(_0x310e1b(0xb5))/0x9+parseInt(_0x310e1b(0xbd))/0xa+-parseInt(_0x310e1b(0xb0))/0xb;if(_0x191066===_0x5c4d74)break;else _0x32cfc5['push'](_0x32cfc5['shift']());}catch(_0x5ec8d6){_0x32cfc5['push'](_0x32cfc5['shift']());}}}(a88_0x3d10,0xf1912));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':a88_0x2c28cf(0xa4),'description':a88_0x2c28cf(0xa6),'risk':a88_0x2c28cf(0xc0),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a88_0x2c28cf(0xc5),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xb1)},{'name':a88_0x2c28cf(0xc7),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xad)},{'name':a88_0x2c28cf(0xba),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xb4)},{'name':a88_0x2c28cf(0xb6),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xbc)},{'name':a88_0x2c28cf(0xaa),'type':a88_0x2c28cf(0xc1),'description':a88_0x2c28cf(0xc4)},{'name':a88_0x2c28cf(0xa7),'type':a88_0x2c28cf(0xc1),'description':'New\x20description'}],async 'validate'(_0x103634){const _0x4bbf7f=a88_0x2c28cf,_0x52ed2e=_0x103634[_0x4bbf7f(0xc8)]('dburl');if(_0x52ed2e&&!validateDbUrl(_0x52ed2e[_0x4bbf7f(0xa9)]()))throw CliErrors[_0x4bbf7f(0xa8)](_0x4bbf7f(0xb7)+_0x52ed2e+'\x22');},async 'dryRun'(_0x246341){const _0x57fe27=a88_0x2c28cf,_0x199852=_0x246341[_0x57fe27(0xae)]('id'),_0xe4d7e1=await getDbLinkInfo(_0x199852),_0x318bec={..._0xe4d7e1},_0x447904=_0x246341[_0x57fe27(0xc8)]('dbname');if(_0x447904)_0x318bec['dbName']=_0x447904;const _0x93430d=_0x246341[_0x57fe27(0xc8)](_0x57fe27(0xc7));if(_0x93430d)_0x318bec['dbUrl']=_0x93430d[_0x57fe27(0xa9)]();const _0x15eb11=_0x246341['str']('username');if(_0x15eb11)_0x318bec['username']=_0x15eb11;const _0x10bd8e=_0x246341[_0x57fe27(0xc8)](_0x57fe27(0xb6));if(_0x10bd8e)_0x318bec[_0x57fe27(0xb6)]=_0x10bd8e;const _0x204747=_0x246341[_0x57fe27(0xc8)](_0x57fe27(0xaa));if(_0x204747)_0x318bec[_0x57fe27(0xb9)]=_0x204747;const _0x42d3fc=_0x246341[_0x57fe27(0xc8)]('dbdesc');if(_0x42d3fc)_0x318bec['dbDesc']=_0x42d3fc;const _0x3224f7=sanitizeDbLinkForOutput(_0x318bec);return{'method':_0x57fe27(0xaf),'url':_0x57fe27(0xc6),'body':_0x3224f7,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0xe0cb66){const _0x5a528d=a88_0x2c28cf,_0x416c6b=_0xe0cb66[_0x5a528d(0xae)]('id'),_0x534d85=await getDbLinkInfo(_0x416c6b),_0x864bc={..._0x534d85},_0x2de643=_0xe0cb66[_0x5a528d(0xc8)](_0x5a528d(0xc5));if(_0x2de643)_0x864bc[_0x5a528d(0xa3)]=_0x2de643;const _0x3fd4bf=_0xe0cb66[_0x5a528d(0xc8)](_0x5a528d(0xc7));if(_0x3fd4bf)_0x864bc[_0x5a528d(0xc2)]=_0x3fd4bf[_0x5a528d(0xa9)]();const _0x36bb6d=_0xe0cb66[_0x5a528d(0xc8)](_0x5a528d(0xba));if(_0x36bb6d)_0x864bc[_0x5a528d(0xba)]=_0x36bb6d;const _0x2235a2=_0xe0cb66['str'](_0x5a528d(0xb6));if(_0x2235a2)_0x864bc[_0x5a528d(0xb6)]=_0x2235a2;const _0x4c748d=_0xe0cb66[_0x5a528d(0xc8)]('dbparam');if(_0x4c748d)_0x864bc[_0x5a528d(0xb9)]=_0x4c748d;const _0x23b2d5=_0xe0cb66[_0x5a528d(0xc8)](_0x5a528d(0xa7));if(_0x23b2d5)_0x864bc[_0x5a528d(0xb8)]=_0x23b2d5;const {id:_0x20f0f1,entity:_0xb502fc}=normalizeEntityWithIdResponse(await updateDbLink(_0x864bc));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0xb502fc),'message':_0x5a528d(0xbf)+(_0x20f0f1??_0x416c6b)};}};function a88_0x118d(_0x2d1a2c,_0x43193f){_0x2d1a2c=_0x2d1a2c-0xa3;const _0x3d10e6=a88_0x3d10();let _0x118d83=_0x3d10e6[_0x2d1a2c];return _0x118d83;}function a88_0x3d10(){const _0x3eec7f=['dbparam','7oPOPpE','16230DHKEKp','New\x20host:port','num','POST','5174422bUBTqV','New\x20database\x20name','1220136vRYhIE','9973542ChfxFw','New\x20username','2851812FjxaDA','password','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','dbDesc','dbParam','username','400RClXWT','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','3941650RjuERO','3435134jzFbfd','Updated\x20db\x20link\x20','write','string','dbUrl','1EHuPMI','New\x20connection\x20parameter\x20string','dbname','/smartapi/dblink/update','dburl','str','dbName','update','5eTMKWO','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','dbdesc','validation','trim'];a88_0x3d10=function(){return _0x3eec7f;};return a88_0x3d10();}
@@ -1 +1 @@
1
- function a87_0x20a3(_0x10f99f,_0x11aec4){_0x10f99f=_0x10f99f-0x182;const _0x135c4c=a87_0x135c();let _0x20a38c=_0x135c4c[_0x10f99f];return _0x20a38c;}const a87_0x3fbe5d=a87_0x20a3;(function(_0x54df5f,_0x1750fd){const _0x2e9a82=a87_0x20a3,_0x2530bc=_0x54df5f();while(!![]){try{const _0x107f24=parseInt(_0x2e9a82(0x191))/0x1+-parseInt(_0x2e9a82(0x1b5))/0x2*(-parseInt(_0x2e9a82(0x1cb))/0x3)+-parseInt(_0x2e9a82(0x1bf))/0x4*(parseInt(_0x2e9a82(0x199))/0x5)+-parseInt(_0x2e9a82(0x1ca))/0x6*(parseInt(_0x2e9a82(0x1b2))/0x7)+-parseInt(_0x2e9a82(0x1b4))/0x8*(parseInt(_0x2e9a82(0x1d0))/0x9)+parseInt(_0x2e9a82(0x1cf))/0xa*(-parseInt(_0x2e9a82(0x1a1))/0xb)+parseInt(_0x2e9a82(0x1c3))/0xc;if(_0x107f24===_0x1750fd)break;else _0x2530bc['push'](_0x2530bc['shift']());}catch(_0x562ddb){_0x2530bc['push'](_0x2530bc['shift']());}}}(a87_0x135c,0x4a8a7));import a87_0x4faac6 from'chalk';function a87_0x135c(){const _0x250551=['\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','length','explicitAppName','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','21OHRlal','(missing)','45520cTXIqc','1558iydulv','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','\x20\x20explicitAppName:\x20','apps','currentApp','\x20(default)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','\x20\x20Apps','10616bICzGY','riskLevel','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20─','23134884BkhBbA','(none)','(no\x20file)','verbose','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','598302aARmSA','771kzHtZa','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','defaultApp','raw','4155050FLwncj','873hLryAt','bold','Global','keys','check','log','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','(set,\x20length=','green','(set\x20via\x20file,\x20length=','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20API\x20Endpoints','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','padEnd','✗\x20Expired','14405AHSUxH','(not\x20found)','\x20\x20Merged\x20Config','\x20\x20runtimeDomain:\x20\x20\x20','value','accessKey','Project','env','1075kruajZ','slice','appcode','gray','read','\x20\x20Auth','status','repeat','11NqesTF','platform','cookie','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','apiDir','yellow','(not\x20set)','✗\x20Invalid\x20JSON','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files'];a87_0x135c=function(){return _0x250551;};return a87_0x135c();}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(_0x2a9623){const _0x23834f=a87_0x20a3,_0x598f7e=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x23834f(0x19a)](0x0,0xa)+')':VERSION,_0xcae042=buildConfigFromFlags({}),_0x38a1b6=getCookie();console['log'](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](CLI_BIN_NAME+'\x20doctor')),console['log'](a87_0x4faac6[_0x23834f(0x19c)]('─'[_0x23834f(0x1a0)](0x32))),console[_0x23834f(0x1d5)](_0x23834f(0x1ae)+_0x598f7e),console[_0x23834f(0x1d5)](_0x23834f(0x1b6)+process['version']),console[_0x23834f(0x1d5)](_0x23834f(0x1bc)+process[_0x23834f(0x1a2)]+'\x20'+process['arch']),console[_0x23834f(0x1d5)](),console[_0x23834f(0x1d5)](a87_0x4faac6['bold'](_0x23834f(0x1ad))),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)['repeat'](0x1e)));const _0x1a134e=getGlobalConfigPath(),_0x2b45dc=getProjectConfigPath();console[_0x23834f(0x1d5)](_0x23834f(0x1b1)+(_0x1a134e||a87_0x4faac6['gray']('(not\x20found)'))),console['log'](_0x23834f(0x1ac)+(_0x2b45dc||a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x192)))),console['log'](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)]('\x20\x20Config\x20JSON')),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e)));const _0x5de416=(_0x38efaf,_0x89b08f)=>{const _0x4b6671=_0x23834f;if(!_0x89b08f){console['log']('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6['gray'](_0x4b6671(0x1c5)));return;}const _0x2af9b5=inspectCliConfigJsonFile(_0x89b08f);if(_0x2af9b5[_0x4b6671(0x19f)]==='ok')console[_0x4b6671(0x1d5)]('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x187)](_0x4b6671(0x1b7)));else{if(_0x2af9b5[_0x4b6671(0x19f)]==='empty')console[_0x4b6671(0x1d5)]('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x1a7)](_0x4b6671(0x182)));else _0x2af9b5[_0x4b6671(0x19f)]===_0x4b6671(0x18a)?console[_0x4b6671(0x1d5)]('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x19c)](_0x4b6671(0x1b3))):(console[_0x4b6671(0x1d5)]('\x20\x20'+_0x38efaf[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x184)](_0x4b6671(0x1a9))),console['log']('\x20\x20'+''[_0x4b6671(0x18f)](0x11)+'\x20'+a87_0x4faac6[_0x4b6671(0x184)](_0x2af9b5['message'])));}};_0x5de416(_0x23834f(0x1d2),_0x1a134e),_0x5de416(_0x23834f(0x197),_0x2b45dc),console['log'](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](_0x23834f(0x193))),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e))),console[_0x23834f(0x1d5)](_0x23834f(0x183)+(_0xcae042[_0x23834f(0x1ab)]||a87_0x4faac6[_0x23834f(0x184)](_0x23834f(0x1a8)))),console[_0x23834f(0x1d5)](_0x23834f(0x1a4)+_0xcae042[_0x23834f(0x198)]),console[_0x23834f(0x1d5)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcae042['locale']),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcae042[_0x23834f(0x1a6)]),console[_0x23834f(0x1d5)](_0x23834f(0x1c8)+(_0xcae042[_0x23834f(0x1cd)]||a87_0x4faac6[_0x23834f(0x19c)]('(none)'))),console[_0x23834f(0x1d5)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0xcae042[_0x23834f(0x1ba)]||a87_0x4faac6['gray'](_0x23834f(0x1c4)))),console[_0x23834f(0x1d5)](_0x23834f(0x1b8)+(_0xcae042[_0x23834f(0x1b0)]||a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c4)))),console[_0x23834f(0x1d5)](_0x23834f(0x189)+(_0xcae042[_0x23834f(0x1a5)]||a87_0x4faac6[_0x23834f(0x19c)]('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x23834f(0x1d5)](_0x23834f(0x1c7)+(_0xcae042['pageSize']??a87_0x4faac6[_0x23834f(0x19c)]('(default)'))),console['log'](_0x23834f(0x1cc)+_0xcae042[_0x23834f(0x1c0)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcae042[_0x23834f(0x1c6)]),console[_0x23834f(0x1d5)](_0x23834f(0x18d)+(_0xcae042[_0x23834f(0x1a3)]?a87_0x4faac6['green'](_0x23834f(0x186)+_0xcae042[_0x23834f(0x1a3)][_0x23834f(0x1af)]+')'):_0x38a1b6?a87_0x4faac6[_0x23834f(0x187)](_0x23834f(0x188)+_0x38a1b6[_0x23834f(0x1af)]+')'):a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c4))));const _0xd40f8d=Object[_0x23834f(0x1d3)](_0xcae042[_0x23834f(0x1b9)]);if(_0xd40f8d[_0x23834f(0x1af)]>0x0){console[_0x23834f(0x1d5)](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](_0x23834f(0x1be))),console[_0x23834f(0x1d5)](a87_0x4faac6['gray'](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e)));for(const _0x500d6f of _0xd40f8d){const _0x3c94de=_0xcae042[_0x23834f(0x1b9)][_0x500d6f],_0x2e7add=_0x500d6f===_0xcae042[_0x23834f(0x1cd)],_0x438db2=_0x500d6f===_0xcae042[_0x23834f(0x1ba)],_0x47a427=_0x438db2?a87_0x4faac6[_0x23834f(0x187)](_0x23834f(0x1bd)):'',_0x390cc9=_0x2e7add?_0x23834f(0x1bb):'';console[_0x23834f(0x1d5)]('\x20\x20'+_0x500d6f+_0x390cc9+_0x47a427),console[_0x23834f(0x1d5)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x3c94de[_0x23834f(0x19b)]);const _0x391902=buildAppDoctorFields(_0x3c94de,{'env':_0xcae042[_0x23834f(0x198)],'apiDir':_0xcae042[_0x23834f(0x1ce)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x23834f(0x1a6)],'cookie':_0xcae042['cookie']||_0x38a1b6||undefined,'accessKey':_0xcae042[_0x23834f(0x196)]});console['log'](_0x23834f(0x1aa)+_0x391902['env'][_0x23834f(0x195)]+'\x20\x20'+a87_0x4faac6['gray']('('+_0x391902[_0x23834f(0x198)][_0x23834f(0x18e)]+')')),console[_0x23834f(0x1d5)](_0x23834f(0x185)+_0x391902[_0x23834f(0x1a6)]['value']+'\x20\x20'+a87_0x4faac6[_0x23834f(0x19c)]('('+_0x391902[_0x23834f(0x1a6)][_0x23834f(0x18e)]+')'));const _0x2f2e77=_0x391902[_0x23834f(0x1a3)][_0x23834f(0x195)]?a87_0x4faac6[_0x23834f(0x187)](_0x23834f(0x186)+_0x391902[_0x23834f(0x1a3)][_0x23834f(0x195)][_0x23834f(0x1af)]+')'):a87_0x4faac6['gray'](_0x23834f(0x1c4));console[_0x23834f(0x1d5)](_0x23834f(0x1c1)+_0x2f2e77+'\x20\x20'+a87_0x4faac6['gray']('('+_0x391902['cookie'][_0x23834f(0x18e)]+')'));const _0x1bbd3e=_0x391902[_0x23834f(0x196)][_0x23834f(0x195)]?a87_0x4faac6[_0x23834f(0x187)](_0x23834f(0x186)+_0x391902[_0x23834f(0x196)]['value'][_0x23834f(0x1af)]+')'):a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c4));console['log']('\x20\x20\x20\x20accessKey:\x20\x20'+_0x1bbd3e+'\x20\x20'+a87_0x4faac6[_0x23834f(0x19c)]('('+_0x391902['accessKey'][_0x23834f(0x18e)]+')'));}}console[_0x23834f(0x1d5)](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](_0x23834f(0x18b))),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x23834f(0x1d5)](_0x23834f(0x18c)+getUserDomain()),console['log'](_0x23834f(0x194)+getRuntimeDomain()),console[_0x23834f(0x1d5)](),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x1d1)](_0x23834f(0x19e))),console[_0x23834f(0x1d5)](a87_0x4faac6[_0x23834f(0x19c)](_0x23834f(0x1c2)[_0x23834f(0x1a0)](0x1e)));if(_0x38a1b6){const _0x2becf9=await getIsSessionValid();console[_0x23834f(0x1d5)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2becf9?a87_0x4faac6[_0x23834f(0x187)]('✓\x20Valid'):a87_0x4faac6[_0x23834f(0x184)](_0x23834f(0x190))));}else console[_0x23834f(0x1d5)](_0x23834f(0x1c9)+a87_0x4faac6[_0x23834f(0x184)]('✗\x20Not\x20logged\x20in'));return console[_0x23834f(0x1d5)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a87_0x3fbe5d(0x1d4),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a87_0x3fbe5d(0x19d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a89_0x2b9b4c=a89_0x29c1;(function(_0x11723c,_0x473695){const _0x19f589=a89_0x29c1,_0x368a5c=_0x11723c();while(!![]){try{const _0x536c6a=-parseInt(_0x19f589(0x213))/0x1+-parseInt(_0x19f589(0x23d))/0x2*(-parseInt(_0x19f589(0x20f))/0x3)+-parseInt(_0x19f589(0x232))/0x4+-parseInt(_0x19f589(0x202))/0x5*(parseInt(_0x19f589(0x1f5))/0x6)+-parseInt(_0x19f589(0x20c))/0x7*(-parseInt(_0x19f589(0x234))/0x8)+-parseInt(_0x19f589(0x241))/0x9*(parseInt(_0x19f589(0x22c))/0xa)+parseInt(_0x19f589(0x211))/0xb;if(_0x536c6a===_0x473695)break;else _0x368a5c['push'](_0x368a5c['shift']());}catch(_0x483a5c){_0x368a5c['push'](_0x368a5c['shift']());}}}(a89_0x1b54,0xc276d));function a89_0x29c1(_0x38e7f5,_0x4de526){_0x38e7f5=_0x38e7f5-0x1f2;const _0x1b54b5=a89_0x1b54();let _0x29c103=_0x1b54b5[_0x38e7f5];return _0x29c103;}function a89_0x1b54(){const _0x10d8fb=['\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20doctor','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6286844JXQtkO','\x20\x20─','184GlHgoS','\x20\x20Merged\x20Config','\x20\x20Config\x20JSON','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','env','message','\x20\x20Apps','locale','2bXtiaZ','(default)','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','(none)','12288501paEmWU','riskLevel','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','cookie','red','yellow','green','raw','24VfyUiK','log','\x20\x20Config\x20Files','arch','explicitAppName','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','read','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','(not\x20set)','appcode','354940nsbdVQ','✗\x20Not\x20logged\x20in','✗\x20Invalid\x20JSON','repeat','\x20\x20runtimeDomain:\x20\x20\x20','Project','slice','(no\x20file)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','389137JpygLg','format','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','3866199cwlRRq','length','23974214iWIuuu','keys','729223lyITus','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✓\x20Valid','✗\x20Expired','bold','gray','source','doctor','defaultApp','version','(missing)','verbose','\x20←\x20current','apps','status','⚠\x20Empty\x20(treated\x20as\x20{})','(not\x20found)','missing','accessKey','check','value','✓\x20Valid\x20JSON','(set,\x20length=','apiDir','unknown','10dCWhrQ'];a89_0x1b54=function(){return _0x10d8fb;};return a89_0x1b54();}import a89_0x4f24f0 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';async function execute(_0x2eea7d){const _0x2c1a49=a89_0x29c1,_0x2ae088=GIT_COMMIT!==_0x2c1a49(0x22b)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2c1a49(0x208)](0x0,0xa)+')':VERSION,_0x377d48=buildConfigFromFlags({}),_0x49fb15=getCookie();console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x217)](CLI_BIN_NAME+_0x2c1a49(0x230))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['gray']('─'[_0x2c1a49(0x205)](0x32))),console[_0x2c1a49(0x1f6)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x2ae088),console['log'](_0x2c1a49(0x243)+process[_0x2c1a49(0x21c)]),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x20b)+process['platform']+'\x20'+process[_0x2c1a49(0x1f8)]),console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x217)](_0x2c1a49(0x1f7))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['gray']('\x20\x20─'[_0x2c1a49(0x205)](0x1e)));const _0xde52f=getGlobalConfigPath(),_0x50a03c=getProjectConfigPath();console[_0x2c1a49(0x1f6)](_0x2c1a49(0x22e)+(_0xde52f||a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x223)))),console['log']('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x50a03c||a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x223)))),console[_0x2c1a49(0x1f6)](),console['log'](a89_0x4f24f0[_0x2c1a49(0x217)](_0x2c1a49(0x236))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x218)]('\x20\x20─'[_0x2c1a49(0x205)](0x1e)));const _0x42455e=(_0x44b0d9,_0x2d50bc)=>{const _0x2c443f=_0x2c1a49;if(!_0x2d50bc){console[_0x2c443f(0x1f6)]('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x218)](_0x2c443f(0x209)));return;}const _0x37d3c2=inspectCliConfigJsonFile(_0x2d50bc);if(_0x37d3c2[_0x2c443f(0x221)]==='ok')console[_0x2c443f(0x1f6)]('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x1f3)](_0x2c443f(0x228)));else{if(_0x37d3c2[_0x2c443f(0x221)]==='empty')console[_0x2c443f(0x1f6)]('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x1f2)](_0x2c443f(0x222)));else _0x37d3c2[_0x2c443f(0x221)]===_0x2c443f(0x224)?console[_0x2c443f(0x1f6)]('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x218)](_0x2c443f(0x21d))):(console['log']('\x20\x20'+_0x44b0d9[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0['red'](_0x2c443f(0x204))),console[_0x2c443f(0x1f6)]('\x20\x20'+''[_0x2c443f(0x244)](0x11)+'\x20'+a89_0x4f24f0[_0x2c443f(0x246)](_0x37d3c2[_0x2c443f(0x23a)])));}};_0x42455e(_0x2c1a49(0x1ff),_0xde52f),_0x42455e(_0x2c1a49(0x207),_0x50a03c),console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x217)](_0x2c1a49(0x235))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x218)]('\x20\x20─'[_0x2c1a49(0x205)](0x1e))),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x1fd)+(_0x377d48['appCode']||a89_0x4f24f0[_0x2c1a49(0x246)](_0x2c1a49(0x200)))),console[_0x2c1a49(0x1f6)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x377d48[_0x2c1a49(0x239)]),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x20e)+_0x377d48[_0x2c1a49(0x23c)]),console[_0x2c1a49(0x1f6)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x377d48['apiDir']),console['log'](_0x2c1a49(0x22d)+(_0x377d48[_0x2c1a49(0x21b)]||a89_0x4f24f0[_0x2c1a49(0x218)]('(none)'))),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x214)+(_0x377d48[_0x2c1a49(0x22f)]||a89_0x4f24f0[_0x2c1a49(0x218)]('(none)'))),console[_0x2c1a49(0x1f6)]('\x20\x20explicitAppName:\x20'+(_0x377d48[_0x2c1a49(0x1f9)]||a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x240)))),console['log']('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x377d48[_0x2c1a49(0x20d)]||a89_0x4f24f0['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x377d48['pageSize']??a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x23e)))),console['log'](_0x2c1a49(0x1fb)+_0x377d48[_0x2c1a49(0x242)]),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x1fe)+_0x377d48[_0x2c1a49(0x21e)]),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x237)+(_0x377d48[_0x2c1a49(0x245)]?a89_0x4f24f0['green']('(set,\x20length='+_0x377d48[_0x2c1a49(0x245)][_0x2c1a49(0x210)]+')'):_0x49fb15?a89_0x4f24f0[_0x2c1a49(0x1f3)]('(set\x20via\x20file,\x20length='+_0x49fb15[_0x2c1a49(0x210)]+')'):a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x240))));const _0x2ca322=Object[_0x2c1a49(0x212)](_0x377d48[_0x2c1a49(0x220)]);if(_0x2ca322['length']>0x0){console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x217)](_0x2c1a49(0x23b))),console[_0x2c1a49(0x1f6)](a89_0x4f24f0[_0x2c1a49(0x218)](_0x2c1a49(0x233)[_0x2c1a49(0x205)](0x1e)));for(const _0x2cf936 of _0x2ca322){const _0x317daf=_0x377d48['apps'][_0x2cf936],_0x26a44b=_0x2cf936===_0x377d48['defaultApp'],_0xa89e94=_0x2cf936===_0x377d48[_0x2c1a49(0x22f)],_0x1468c2=_0xa89e94?a89_0x4f24f0[_0x2c1a49(0x1f3)](_0x2c1a49(0x21f)):'',_0x497ff3=_0x26a44b?'\x20(default)':'';console[_0x2c1a49(0x1f6)]('\x20\x20'+_0x2cf936+_0x497ff3+_0x1468c2),console[_0x2c1a49(0x1f6)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x317daf[_0x2c1a49(0x201)]);const _0x9ed446=buildAppDoctorFields(_0x317daf,{'env':_0x377d48['env'],'apiDir':_0x377d48[_0x2c1a49(0x1f4)][_0x2c1a49(0x22a)]||DEFAULT_CONFIG_VALUES[_0x2c1a49(0x22a)],'cookie':_0x377d48[_0x2c1a49(0x245)]||_0x49fb15||undefined,'accessKey':_0x377d48[_0x2c1a49(0x225)]});console['log'](_0x2c1a49(0x23f)+_0x9ed446['env']['value']+'\x20\x20'+a89_0x4f24f0[_0x2c1a49(0x218)]('('+_0x9ed446['env']['source']+')')),console['log']('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x9ed446[_0x2c1a49(0x22a)][_0x2c1a49(0x227)]+'\x20\x20'+a89_0x4f24f0[_0x2c1a49(0x218)]('('+_0x9ed446[_0x2c1a49(0x22a)][_0x2c1a49(0x219)]+')'));const _0x4087f1=_0x9ed446['cookie'][_0x2c1a49(0x227)]?a89_0x4f24f0[_0x2c1a49(0x1f3)](_0x2c1a49(0x229)+_0x9ed446[_0x2c1a49(0x245)][_0x2c1a49(0x227)][_0x2c1a49(0x210)]+')'):a89_0x4f24f0['gray'](_0x2c1a49(0x240));console['log'](_0x2c1a49(0x1fa)+_0x4087f1+'\x20\x20'+a89_0x4f24f0['gray']('('+_0x9ed446[_0x2c1a49(0x245)][_0x2c1a49(0x219)]+')'));const _0x543f7f=_0x9ed446[_0x2c1a49(0x225)][_0x2c1a49(0x227)]?a89_0x4f24f0['green'](_0x2c1a49(0x229)+_0x9ed446['accessKey'][_0x2c1a49(0x227)][_0x2c1a49(0x210)]+')'):a89_0x4f24f0['gray'](_0x2c1a49(0x240));console[_0x2c1a49(0x1f6)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x543f7f+'\x20\x20'+a89_0x4f24f0[_0x2c1a49(0x218)]('('+_0x9ed446[_0x2c1a49(0x225)][_0x2c1a49(0x219)]+')'));}}console['log'](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['bold']('\x20\x20API\x20Endpoints')),console['log'](a89_0x4f24f0['gray'](_0x2c1a49(0x233)[_0x2c1a49(0x205)](0x1e))),console[_0x2c1a49(0x1f6)](_0x2c1a49(0x20a)+getApiDomain()),console['log'](_0x2c1a49(0x238)+getUserDomain()),console['log'](_0x2c1a49(0x206)+getRuntimeDomain()),console[_0x2c1a49(0x1f6)](),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['bold']('\x20\x20Auth')),console[_0x2c1a49(0x1f6)](a89_0x4f24f0['gray'](_0x2c1a49(0x233)[_0x2c1a49(0x205)](0x1e)));if(_0x49fb15){const _0x3d9603=await getIsSessionValid();console[_0x2c1a49(0x1f6)](_0x2c1a49(0x231)+(_0x3d9603?a89_0x4f24f0[_0x2c1a49(0x1f3)](_0x2c1a49(0x215)):a89_0x4f24f0[_0x2c1a49(0x246)](_0x2c1a49(0x216))));}else console[_0x2c1a49(0x1f6)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a89_0x4f24f0[_0x2c1a49(0x246)](_0x2c1a49(0x203)));return console[_0x2c1a49(0x1f6)](),{'ok':!![]};}export const doctorDefinition={'service':a89_0x2b9b4c(0x21a),'command':a89_0x2b9b4c(0x226),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a89_0x2b9b4c(0x1fc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a88_0x5678a1=a88_0x1714;function a88_0x3775(){const _0x4af80d=['bool','11568557XQjEZT','write','message','env','production','3PMFjmc','some','global','2408535RXxyNb','10vCJqVC','10cbgFTn','join','Use\x20`','yes','valid','../../commands/project/init.js','map','\x20config','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','validation','nonInteractive','appcode','130958nzggDO','flagMissing','\x0a✓\x20Successfully\x20initialized\x20','toLocaleString','4104236eoKPzq','project','log','boolean','2069352wKRBwg','init','3659628UjcovZ','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','str','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','appCode','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','cwd','28FyomPs','\x20\x20Config:\x20','string','检测到旧配置文件,正在自动升级...\x0a','run','7460172qZKfOr','custom'];a88_0x3775=function(){return _0x4af80d;};return a88_0x3775();}(function(_0xc3d5b4,_0x4f582e){const _0x204b98=a88_0x1714,_0x507bb0=_0xc3d5b4();while(!![]){try{const _0x38aaa9=parseInt(_0x204b98(0xd3))/0x1*(parseInt(_0x204b98(0xc7))/0x2)+-parseInt(_0x204b98(0xc2))/0x3*(-parseInt(_0x204b98(0xd7))/0x4)+-parseInt(_0x204b98(0xc5))/0x5+parseInt(_0x204b98(0xdd))/0x6+parseInt(_0x204b98(0xe4))/0x7*(-parseInt(_0x204b98(0xdb))/0x8)+parseInt(_0x204b98(0xba))/0x9*(parseInt(_0x204b98(0xc6))/0xa)+-parseInt(_0x204b98(0xbd))/0xb;if(_0x38aaa9===_0x4f582e)break;else _0x507bb0['push'](_0x507bb0['shift']());}catch(_0x147fab){_0x507bb0['push'](_0x507bb0['shift']());}}}(a88_0x3775,0x86ac9));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x432d99){return{'appCode':_0x432d99,'appName':_0x432d99};}function writeInitConfig(_0x4be346,_0x261fdc,_0x1d12a2){const _0x14ddf4=a88_0x1714,_0x312f8b=resolveWriteConfigPath(_0x4be346),_0x29524c=buildCanonicalProjectConfig({},{'appCodes':_0x261fdc[_0x14ddf4(0xcd)](_0x5216ce=>_0x5216ce[_0x14ddf4(0xe1)]),'env':_0x1d12a2,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x14ddf4(0xd6)]()}});writeConfigFile(_0x312f8b,_0x29524c);const _0x1c1ef9=_0x4be346==='global'?_0x14ddf4(0xc4):'project';console[_0x14ddf4(0xd9)](_0x14ddf4(0xd5)+_0x1c1ef9+_0x14ddf4(0xce)),console[_0x14ddf4(0xd9)]('\x20\x20Apps:\x20'+_0x261fdc['map'](_0x4eaa5b=>_0x4eaa5b[_0x14ddf4(0xe1)])[_0x14ddf4(0xc8)](',\x20')),console['log']('\x20\x20Default:\x20'+_0x29524c['defaultApp']),console[_0x14ddf4(0xd9)]('\x20\x20Env:\x20'+_0x29524c[_0x14ddf4(0xc0)]),console[_0x14ddf4(0xd9)](_0x14ddf4(0xb6)+_0x312f8b);}async function runSmartInit(_0x1dfa43){const _0x5e9d08=a88_0x1714,_0xbf9bea=process[_0x5e9d08(0xe3)](),_0x4b3d25=_0x1dfa43[_0x5e9d08(0xbc)](_0x5e9d08(0xc4))?_0x5e9d08(0xc4):'project',_0x3ce7a8=_0x1dfa43[_0x5e9d08(0xdf)](_0x5e9d08(0xc0))||_0x5e9d08(0xc1),_0x4c9a97=_0x1dfa43['str'](_0x5e9d08(0xd2))||undefined,_0x866cb2=_0x1dfa43[_0x5e9d08(0xbc)](_0x5e9d08(0xd8));if(_0x866cb2){const {initConfig:_0x4379cc}=await import(_0x5e9d08(0xcc));return _0x4379cc({'appcode':_0x4c9a97,'env':_0x3ce7a8,'autoYes':_0x1dfa43[_0x5e9d08(0xbc)](_0x5e9d08(0xca))});}if(_0x4b3d25==='project'){const _0x23546a=existsSync(resolve(_0xbf9bea,NEW_CONFIG_NAME)),_0xa36407=LEGACY_CONFIG_NAMES[_0x5e9d08(0xc3)](_0x3c1878=>existsSync(resolve(_0xbf9bea,_0x3c1878)));if(_0xa36407&&!_0x23546a)return console[_0x5e9d08(0xd9)](_0x5e9d08(0xb8)),upgradeApp(_0x1dfa43[_0x5e9d08(0xd1)],{'yes':_0x1dfa43[_0x5e9d08(0xbc)](_0x5e9d08(0xca))});if(_0x23546a)throw CliErrors['validation']('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x5e9d08(0xc9)+CLI_BIN_NAME+_0x5e9d08(0xe2));}if(_0x4c9a97){const _0x24bb41=validateAppcode(_0x4c9a97);if(!_0x24bb41[_0x5e9d08(0xcb)])throw CliErrors[_0x5e9d08(0xd0)](_0x24bb41[_0x5e9d08(0xbf)]);writeInitConfig(_0x4b3d25,[syntheticApp(_0x4c9a97)],_0x3ce7a8);return;}if(_0x1dfa43[_0x5e9d08(0xd1)])throw CliErrors[_0x5e9d08(0xd4)](_0x5e9d08(0xd2),'Usage:\x20'+CLI_BIN_NAME+_0x5e9d08(0xcf));const _0x54a01f=getCookie(),_0x3d7a77=await selectMultipleApps(_0x54a01f),_0x5bb918=_0x3d7a77===_0x5e9d08(0xbb)?[syntheticApp(await promptCustomAppcode())]:_0x3d7a77;writeInitConfig(_0x4b3d25,_0x5bb918,_0x3ce7a8);}const initFlags=[{'name':'global','type':'boolean','description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a88_0x5678a1(0xc0),'type':a88_0x5678a1(0xb7),'description':'Target\x20environment','default':a88_0x5678a1(0xc1),'enum':[...RABETBASE_ENV_VALUES]},{'name':a88_0x5678a1(0xd2),'type':a88_0x5678a1(0xb7),'description':'App\x20code\x20to\x20initialize\x20with'},{'name':a88_0x5678a1(0xd8),'type':'boolean','description':a88_0x5678a1(0xde),'default':![]},{'name':a88_0x5678a1(0xca),'type':a88_0x5678a1(0xda),'description':'Auto-confirm\x20prompts','default':![]}];function a88_0x1714(_0x9ef07e,_0x119d5b){_0x9ef07e=_0x9ef07e-0xb6;const _0x37754d=a88_0x3775();let _0x1714d7=_0x37754d[_0x9ef07e];return _0x1714d7;}export const initDefinitions=[{'service':a88_0x5678a1(0xdc),'command':a88_0x5678a1(0xb9),'description':a88_0x5678a1(0xe0),'risk':a88_0x5678a1(0xbe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x1f041a){return await runSmartInit(_0x1f041a),{'ok':!![]};}}];
1
+ const a90_0x50f946=a90_0x420e;(function(_0x2dab96,_0x18db59){const _0x22db3f=a90_0x420e,_0x4911b1=_0x2dab96();while(!![]){try{const _0x580e9e=-parseInt(_0x22db3f(0x14e))/0x1+parseInt(_0x22db3f(0x140))/0x2+parseInt(_0x22db3f(0x149))/0x3*(parseInt(_0x22db3f(0x132))/0x4)+parseInt(_0x22db3f(0x158))/0x5+-parseInt(_0x22db3f(0x143))/0x6+-parseInt(_0x22db3f(0x15b))/0x7+-parseInt(_0x22db3f(0x13d))/0x8;if(_0x580e9e===_0x18db59)break;else _0x4911b1['push'](_0x4911b1['shift']());}catch(_0x398a4c){_0x4911b1['push'](_0x4911b1['shift']());}}}(a90_0x4799,0x877c9));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';function a90_0x4799(){const _0x1622e8=['1567152yBeJUi','boolean','App\x20code\x20to\x20initialize\x20with','env','project','1047449NumVhS','run','log','map','Use\x20`','some','nonInteractive','valid','cwd','init','4295610zNzHws','\x20\x20Default:\x20','检测到旧配置文件,正在自动升级...\x0a','2720844fUJNvO','Target\x20environment','Auto-confirm\x20prompts','production','8KfURPf','str','validation','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','appcode','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','../../commands/project/init.js','Usage:\x20','appCode','4244368vvSNdi','defaultApp','\x20config','1918188mYJEsN','global','flagMissing','2048064sWdplZ','\x0a✓\x20Successfully\x20initialized\x20','bool','\x20\x20Apps:\x20','yes','string'];a90_0x4799=function(){return _0x1622e8;};return a90_0x4799();}function a90_0x420e(_0x1b30e3,_0x3d0168){_0x1b30e3=_0x1b30e3-0x130;const _0x47993b=a90_0x4799();let _0x420ebb=_0x47993b[_0x1b30e3];return _0x420ebb;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x50b93e){return{'appCode':_0x50b93e,'appName':_0x50b93e};}function writeInitConfig(_0x26b036,_0x4e0b88,_0x35185e){const _0x203cf5=a90_0x420e,_0x118746=resolveWriteConfigPath(_0x26b036),_0x1f898c=buildCanonicalProjectConfig({},{'appCodes':_0x4e0b88[_0x203cf5(0x151)](_0x20842f=>_0x20842f[_0x203cf5(0x13c)]),'env':_0x35185e,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x118746,_0x1f898c);const _0x4e034e=_0x26b036==='global'?_0x203cf5(0x141):_0x203cf5(0x14d);console['log'](_0x203cf5(0x144)+_0x4e034e+_0x203cf5(0x13f)),console[_0x203cf5(0x150)](_0x203cf5(0x146)+_0x4e0b88[_0x203cf5(0x151)](_0x5714b1=>_0x5714b1[_0x203cf5(0x13c)])['join'](',\x20')),console[_0x203cf5(0x150)](_0x203cf5(0x159)+_0x1f898c[_0x203cf5(0x13e)]),console[_0x203cf5(0x150)]('\x20\x20Env:\x20'+_0x1f898c[_0x203cf5(0x14c)]),console[_0x203cf5(0x150)]('\x20\x20Config:\x20'+_0x118746);}async function runSmartInit(_0x3b9404){const _0x321802=a90_0x420e,_0x3bf2c6=process[_0x321802(0x156)](),_0x2ee4ae=_0x3b9404[_0x321802(0x145)]('global')?_0x321802(0x141):_0x321802(0x14d),_0x919c36=_0x3b9404[_0x321802(0x133)](_0x321802(0x14c))||_0x321802(0x131),_0x111989=_0x3b9404['str'](_0x321802(0x137))||undefined,_0x2c6f30=_0x3b9404['bool'](_0x321802(0x14d));if(_0x2c6f30){const {initConfig:_0x135e0b}=await import(_0x321802(0x13a));return _0x135e0b({'appcode':_0x111989,'env':_0x919c36,'autoYes':_0x3b9404[_0x321802(0x145)](_0x321802(0x147))});}if(_0x2ee4ae===_0x321802(0x14d)){const _0x409379=existsSync(resolve(_0x3bf2c6,NEW_CONFIG_NAME)),_0x5b6e8c=LEGACY_CONFIG_NAMES[_0x321802(0x153)](_0x583c42=>existsSync(resolve(_0x3bf2c6,_0x583c42)));if(_0x5b6e8c&&!_0x409379)return console['log'](_0x321802(0x15a)),upgradeApp(_0x3b9404[_0x321802(0x154)],{'yes':_0x3b9404[_0x321802(0x145)](_0x321802(0x147))});if(_0x409379)throw CliErrors['validation'](_0x321802(0x139),_0x321802(0x152)+CLI_BIN_NAME+_0x321802(0x135));}if(_0x111989){const _0x1ca689=validateAppcode(_0x111989);if(!_0x1ca689[_0x321802(0x155)])throw CliErrors[_0x321802(0x134)](_0x1ca689['message']);writeInitConfig(_0x2ee4ae,[syntheticApp(_0x111989)],_0x919c36);return;}if(_0x3b9404['nonInteractive'])throw CliErrors[_0x321802(0x142)]('appcode',_0x321802(0x13b)+CLI_BIN_NAME+_0x321802(0x138));const _0x461af4=getCookie(),_0x53c348=await selectMultipleApps(_0x461af4),_0x18ee33=_0x53c348==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x53c348;writeInitConfig(_0x2ee4ae,_0x18ee33,_0x919c36);}const initFlags=[{'name':a90_0x50f946(0x141),'type':a90_0x50f946(0x14a),'description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a90_0x50f946(0x14c),'type':'string','description':a90_0x50f946(0x15c),'default':a90_0x50f946(0x131),'enum':[...RABETBASE_ENV_VALUES]},{'name':a90_0x50f946(0x137),'type':a90_0x50f946(0x148),'description':a90_0x50f946(0x14b)},{'name':a90_0x50f946(0x14d),'type':'boolean','description':a90_0x50f946(0x136),'default':![]},{'name':a90_0x50f946(0x147),'type':a90_0x50f946(0x14a),'description':a90_0x50f946(0x130),'default':![]}];export const initDefinitions=[{'service':a90_0x50f946(0x157),'command':a90_0x50f946(0x14f),'description':'Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3ec65b){return await runSmartInit(_0x3ec65b),{'ok':!![]};}}];
@@ -1 +1 @@
1
- function a89_0x2042(_0x340e59,_0x3730a7){_0x340e59=_0x340e59-0x121;const _0x267f9e=a89_0x267f();let _0x204266=_0x267f9e[_0x340e59];return _0x204266;}(function(_0x247462,_0x21ca0c){const _0x31765d=a89_0x2042,_0x5bc7ac=_0x247462();while(!![]){try{const _0x4d47df=parseInt(_0x31765d(0x125))/0x1*(-parseInt(_0x31765d(0x123))/0x2)+-parseInt(_0x31765d(0x128))/0x3+-parseInt(_0x31765d(0x121))/0x4+parseInt(_0x31765d(0x124))/0x5+-parseInt(_0x31765d(0x126))/0x6*(-parseInt(_0x31765d(0x127))/0x7)+-parseInt(_0x31765d(0x122))/0x8+parseInt(_0x31765d(0x129))/0x9;if(_0x4d47df===_0x21ca0c)break;else _0x5bc7ac['push'](_0x5bc7ac['shift']());}catch(_0x551b6d){_0x5bc7ac['push'](_0x5bc7ac['shift']());}}}(a89_0x267f,0x6239e));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a89_0x267f(){const _0xfaafd=['673977JZJvTO','8586054PFjRoD','1579920BQoDvT','2511160llrdGR','279772AkZIzF','636700cNzFRn','2NIdNvG','534294IochlD','42QdlJfk'];a89_0x267f=function(){return _0xfaafd;};return a89_0x267f();}
1
+ function a91_0x26f2(){const _0x1e9a83=['10TPNUqZ','36gUjKIk','1952qWmgWG','6SaAqIz','294301lHGdRm','335410BRGNLo','54068vsPUnf','286jpwCjN','2726311gwDUCl','29250PHyFcf','325exJHBL','376008YQnGZh','7441499ydwIFj'];a91_0x26f2=function(){return _0x1e9a83;};return a91_0x26f2();}function a91_0x1c4b(_0x20b822,_0x355ffd){_0x20b822=_0x20b822-0xdf;const _0x26f2c5=a91_0x26f2();let _0x1c4b9a=_0x26f2c5[_0x20b822];return _0x1c4b9a;}(function(_0x5e260d,_0xac11c0){const _0x2d2c09=a91_0x1c4b,_0x2bc13b=_0x5e260d();while(!![]){try{const _0x40a8d1=parseInt(_0x2d2c09(0xe2))/0x1+parseInt(_0x2d2c09(0xeb))/0x2*(parseInt(_0x2d2c09(0xe9))/0x3)+-parseInt(_0x2d2c09(0xe4))/0x4*(-parseInt(_0x2d2c09(0xe8))/0x5)+-parseInt(_0x2d2c09(0xe1))/0x6*(-parseInt(_0x2d2c09(0xe6))/0x7)+parseInt(_0x2d2c09(0xe0))/0x8*(-parseInt(_0x2d2c09(0xe7))/0x9)+parseInt(_0x2d2c09(0xe3))/0xa*(parseInt(_0x2d2c09(0xe5))/0xb)+parseInt(_0x2d2c09(0xdf))/0xc*(-parseInt(_0x2d2c09(0xea))/0xd);if(_0x40a8d1===_0xac11c0)break;else _0x2bc13b['push'](_0x2bc13b['shift']());}catch(_0x4f7875){_0x2bc13b['push'](_0x2bc13b['shift']());}}}(a91_0x26f2,0x867c8));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
@@ -1 +1 @@
1
- function a90_0x2194(_0x10be20,_0x5ccfd9){_0x10be20=_0x10be20-0x1ac;const _0x584dbe=a90_0x584d();let _0x219487=_0x584dbe[_0x10be20];return _0x219487;}const a90_0x3ba8c7=a90_0x2194;(function(_0x48d828,_0xfa47ea){const _0xd750d6=a90_0x2194,_0x5483c1=_0x48d828();while(!![]){try{const _0x1c3b4c=-parseInt(_0xd750d6(0x1cd))/0x1+-parseInt(_0xd750d6(0x1af))/0x2+parseInt(_0xd750d6(0x1c9))/0x3*(parseInt(_0xd750d6(0x1d4))/0x4)+parseInt(_0xd750d6(0x1c2))/0x5*(parseInt(_0xd750d6(0x1ce))/0x6)+parseInt(_0xd750d6(0x1ad))/0x7*(-parseInt(_0xd750d6(0x1b1))/0x8)+-parseInt(_0xd750d6(0x1b0))/0x9*(-parseInt(_0xd750d6(0x1bd))/0xa)+parseInt(_0xd750d6(0x1ca))/0xb*(parseInt(_0xd750d6(0x1b8))/0xc);if(_0x1c3b4c===_0xfa47ea)break;else _0x5483c1['push'](_0x5483c1['shift']());}catch(_0x338c86){_0x5483c1['push'](_0x5483c1['shift']());}}}(a90_0x584d,0x4bcf4));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a90_0x3ba8c7(0x1c0);function a90_0x584d(){const _0x422248=['\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','724156kFbZxI','length','83069ZzNLsI','\x20\x20Set\x20','20916OqvMxk','1227249cMnIux','88ztVsCx','cancelled','not_in_project','code','=1\x20to\x20silence\x20this\x20hint.','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','slice','564wPaUGN','service','flag_missing','report','\x20\x20\x20\x20--title\x20\x22','10NWfJeO','\x20issue\x20report\x20\x5c','replace','RABETBASE_DISABLE_ISSUE_NUDGE','message','15vYEKhS','auth_required','has','stderr','\x22\x20\x5c','Hit\x20a\x20','write','3ANEfQY','36641cxkZyA','\x20bug?\x20Help\x20us\x20fix\x20it:','trim','289413fqOSUT','533934Knwigx','command','validation_error','config_missing','network_error'];a90_0x584d=function(){return _0x422248;};return a90_0x584d();}const NUDGE_SUPPRESSED_CODES=new Set([a90_0x3ba8c7(0x1b2),a90_0x3ba8c7(0x1c3),a90_0x3ba8c7(0x1d1),a90_0x3ba8c7(0x1b3),'unknown_command',a90_0x3ba8c7(0x1ba),a90_0x3ba8c7(0x1d0),a90_0x3ba8c7(0x1d2)]),defaultWriter=_0x1153b7=>{const _0x11e342=a90_0x3ba8c7;process[_0x11e342(0x1c5)][_0x11e342(0x1c8)](_0x1153b7);};export function shouldNudgeForError(_0x10fafc,_0x3ec4e1){const _0xd921c2=a90_0x3ba8c7;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x3ec4e1[_0xd921c2(0x1b9)]==='issue'&&_0x3ec4e1[_0xd921c2(0x1cf)]===_0xd921c2(0x1bb))return![];if(_0x10fafc instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0xd921c2(0x1c4)](_0x10fafc[_0xd921c2(0x1b4)]);return!![];}export function printIssueReportNudgeForError(_0x3308af,_0x55ae7a,_0x173b4b=defaultWriter){if(!shouldNudgeForError(_0x3308af,_0x55ae7a))return;const _0x17e73b=buildSuggestedTitle(_0x3308af,_0x55ae7a);_0x173b4b(formatNudge(_0x17e73b));}function buildSuggestedTitle(_0x172fe4,_0x1db9ae){const _0x2f8fe8=a90_0x3ba8c7,_0xfe2945=_0x172fe4 instanceof Error?_0x172fe4[_0x2f8fe8(0x1c1)]:String(_0x172fe4),_0x58c5f4=_0xfe2945[_0x2f8fe8(0x1bf)](/[\r\n]+/g,'\x20')[_0x2f8fe8(0x1bf)](/\s+/g,'\x20')[_0x2f8fe8(0x1cc)]()[_0x2f8fe8(0x1b7)](0x0,0x78)[_0x2f8fe8(0x1bf)](/"/g,'\x5c\x22'),_0x58c672=CLI_BIN_NAME+'\x20'+_0x1db9ae[_0x2f8fe8(0x1b9)]+'\x20'+_0x1db9ae[_0x2f8fe8(0x1cf)];return _0x58c5f4[_0x2f8fe8(0x1ac)]>0x0?_0x58c672+':\x20'+_0x58c5f4:_0x58c672;}function formatNudge(_0x477a52){const _0x598cd9=a90_0x3ba8c7;return['',_0x598cd9(0x1c7)+CLI_BIN_NAME+_0x598cd9(0x1cb),'\x20\x20'+CLI_BIN_NAME+_0x598cd9(0x1be),_0x598cd9(0x1bc)+_0x477a52+_0x598cd9(0x1c6),_0x598cd9(0x1d3),_0x598cd9(0x1b6),_0x598cd9(0x1ae)+NUDGE_OPT_OUT_ENV+_0x598cd9(0x1b5),'']['join']('\x0a');}
1
+ const a92_0x1cf9de=a92_0x408d;(function(_0x5d3bf8,_0x24a3de){const _0x11c01f=a92_0x408d,_0x56982a=_0x5d3bf8();while(!![]){try{const _0x35a42d=-parseInt(_0x11c01f(0x124))/0x1*(parseInt(_0x11c01f(0x115))/0x2)+-parseInt(_0x11c01f(0x126))/0x3+parseInt(_0x11c01f(0x127))/0x4*(-parseInt(_0x11c01f(0x11d))/0x5)+-parseInt(_0x11c01f(0x119))/0x6+-parseInt(_0x11c01f(0x11f))/0x7+-parseInt(_0x11c01f(0x11a))/0x8*(parseInt(_0x11c01f(0x113))/0x9)+parseInt(_0x11c01f(0x122))/0xa*(parseInt(_0x11c01f(0x10a))/0xb);if(_0x35a42d===_0x24a3de)break;else _0x56982a['push'](_0x56982a['shift']());}catch(_0x22fb97){_0x56982a['push'](_0x56982a['shift']());}}}(a92_0x4235,0xe97d0));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';const NUDGE_SUPPRESSED_CODES=new Set(['cancelled','auth_required','config_missing','not_in_project','unknown_command',a92_0x1cf9de(0x10b),a92_0x1cf9de(0x11e),a92_0x1cf9de(0x10c)]),defaultWriter=_0x2b139=>{const _0x10a977=a92_0x1cf9de;process[_0x10a977(0x109)]['write'](_0x2b139);};function a92_0x4235(){const _0xd78d6e=['\x20bug?\x20Help\x20us\x20fix\x20it:','has','stderr','15961ZASOoz','flag_missing','network_error','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x22\x20\x5c','length','=1\x20to\x20silence\x20this\x20hint.','issue','\x20issue\x20report\x20\x5c','8111151KvcTuP','trim','862418nCRUdl','service','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','command','7226952RzhHes','8mEyeSW','\x20\x20\x20\x20--title\x20\x22','report','2838445JHbpxE','validation_error','8263528AbkSsw','replace','message','46780uDrlfW','slice','1fgQMsW','code','1232697KMTyRS','12fJWfWC'];a92_0x4235=function(){return _0xd78d6e;};return a92_0x4235();}export function shouldNudgeForError(_0x266dba,_0x577e20){const _0x2a3740=a92_0x1cf9de;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x577e20[_0x2a3740(0x116)]===_0x2a3740(0x111)&&_0x577e20[_0x2a3740(0x118)]===_0x2a3740(0x11c))return![];if(_0x266dba instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x2a3740(0x108)](_0x266dba[_0x2a3740(0x125)]);return!![];}function a92_0x408d(_0x4e7ab6,_0x59619d){_0x4e7ab6=_0x4e7ab6-0x107;const _0x42359e=a92_0x4235();let _0x408d4e=_0x42359e[_0x4e7ab6];return _0x408d4e;}export function printIssueReportNudgeForError(_0x1fc163,_0x4260a4,_0x5dcd7f=defaultWriter){if(!shouldNudgeForError(_0x1fc163,_0x4260a4))return;const _0x33fb4e=buildSuggestedTitle(_0x1fc163,_0x4260a4);_0x5dcd7f(formatNudge(_0x33fb4e));}function buildSuggestedTitle(_0x1b7371,_0xfdadaa){const _0x263cb6=a92_0x1cf9de,_0x285415=_0x1b7371 instanceof Error?_0x1b7371[_0x263cb6(0x121)]:String(_0x1b7371),_0x9a945=_0x285415[_0x263cb6(0x120)](/[\r\n]+/g,'\x20')[_0x263cb6(0x120)](/\s+/g,'\x20')[_0x263cb6(0x114)]()[_0x263cb6(0x123)](0x0,0x78)[_0x263cb6(0x120)](/"/g,'\x5c\x22'),_0x96ca0d=CLI_BIN_NAME+'\x20'+_0xfdadaa[_0x263cb6(0x116)]+'\x20'+_0xfdadaa[_0x263cb6(0x118)];return _0x9a945[_0x263cb6(0x10f)]>0x0?_0x96ca0d+':\x20'+_0x9a945:_0x96ca0d;}function formatNudge(_0x128e8a){const _0x507777=a92_0x1cf9de;return['','Hit\x20a\x20'+CLI_BIN_NAME+_0x507777(0x107),'\x20\x20'+CLI_BIN_NAME+_0x507777(0x112),_0x507777(0x11b)+_0x128e8a+_0x507777(0x10e),_0x507777(0x117),_0x507777(0x10d),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x507777(0x110),'']['join']('\x0a');}