@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6

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 (560) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
@@ -1 +1 @@
1
- function a90_0x3a1c(){const _0x1d656c=['2519736LcAiic','slice','38790mInDEg','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','\x20(see\x20data.result)','Connection\x20OK\x20for\x20db\x20link\x20','313323TwZRya','test','read','object','msg','24626ZiLqUK','num','136XyJDLX','keys','length','376336RARbTL','22rDdSxx','1737045IuICIm','14vkdNmW','success','21VClEka','code','3891890rygfIS'];a90_0x3a1c=function(){return _0x1d656c;};return a90_0x3a1c();}const a90_0x5d8ee3=a90_0x56c8;(function(_0x3eeef7,_0x350fe2){const _0x3e0e14=a90_0x56c8,_0x429390=_0x3eeef7();while(!![]){try{const _0x534cdf=parseInt(_0x3e0e14(0x105))/0x1*(-parseInt(_0x3e0e14(0xfb))/0x2)+parseInt(_0x3e0e14(0x10e))/0x3+-parseInt(_0x3e0e14(0xfd))/0x4*(parseInt(_0x3e0e14(0x10a))/0x5)+-parseInt(_0x3e0e14(0x108))/0x6+-parseInt(_0x3e0e14(0x103))/0x7*(-parseInt(_0x3e0e14(0x100))/0x8)+parseInt(_0x3e0e14(0x102))/0x9+parseInt(_0x3e0e14(0x107))/0xa*(parseInt(_0x3e0e14(0x101))/0xb);if(_0x534cdf===_0x350fe2)break;else _0x429390['push'](_0x429390['shift']());}catch(_0x2975ad){_0x429390['push'](_0x429390['shift']());}}}(a90_0x3a1c,0x37917));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a90_0x56c8(_0x87c8f2,_0x188385){_0x87c8f2=_0x87c8f2-0xf7;const _0x3a1c56=a90_0x3a1c();let _0x56c805=_0x3a1c56[_0x87c8f2];return _0x56c805;}function summarizeTestConnectResult(_0x29b3b9){const _0x347ade=a90_0x56c8;if(_0x29b3b9===!![]||_0x29b3b9===![])return{'success':_0x29b3b9};if(_0x29b3b9===null||_0x29b3b9===undefined)return{'type':typeof _0x29b3b9};if(typeof _0x29b3b9!==_0x347ade(0xf9))return{'type':typeof _0x29b3b9};const _0x485da5=_0x29b3b9,_0x4b2cd5=[_0x347ade(0x104),'message',_0x347ade(0x106),'error',_0x347ade(0xfa),'data'],_0x374ec4={};for(const _0x1dbc6c of _0x4b2cd5){if(_0x1dbc6c in _0x485da5)_0x374ec4[_0x1dbc6c]=_0x485da5[_0x1dbc6c];}return Object[_0x347ade(0xfe)](_0x374ec4)[_0x347ade(0xff)]===0x0&&(_0x374ec4['keys']=Object[_0x347ade(0xfe)](_0x485da5)[_0x347ade(0x109)](0x0,0x14)),_0x374ec4;}export const dbTest={'service':'db','command':a90_0x5d8ee3(0xf7),'description':a90_0x5d8ee3(0x10b),'risk':a90_0x5d8ee3(0xf8),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x166d8b){const _0x4b042f=a90_0x5d8ee3,_0x4ae9ef=_0x166d8b[_0x4b042f(0xfc)]('id'),_0x543f12=await testDbLinkConnect(_0x4ae9ef),_0x38c02a=_0x543f12===!![]||typeof _0x543f12===_0x4b042f(0xf9)&&_0x543f12!==null&&_0x543f12[_0x4b042f(0x104)]===!![],_0x513b50=summarizeTestConnectResult(_0x543f12);return{'ok':!![],'data':{'id':_0x4ae9ef,'connected':Boolean(_0x38c02a),'result':_0x513b50},'message':_0x38c02a?_0x4b042f(0x10d)+_0x4ae9ef:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x4ae9ef+_0x4b042f(0x10c)};}};
1
+ const a90_0x54f618=a90_0x505e;function a90_0x505e(_0x44b057,_0x5c5f82){_0x44b057=_0x44b057-0xab;const _0x5c01dc=a90_0x5c01();let _0x505e8b=_0x5c01dc[_0x44b057];return _0x505e8b;}(function(_0x1fff66,_0x10fb1c){const _0x566a0c=a90_0x505e,_0x528bc1=_0x1fff66();while(!![]){try{const _0x5512ba=-parseInt(_0x566a0c(0xaf))/0x1+-parseInt(_0x566a0c(0xab))/0x2+parseInt(_0x566a0c(0xc1))/0x3+-parseInt(_0x566a0c(0xb9))/0x4+-parseInt(_0x566a0c(0xba))/0x5+-parseInt(_0x566a0c(0xc3))/0x6*(parseInt(_0x566a0c(0xb1))/0x7)+-parseInt(_0x566a0c(0xb7))/0x8*(-parseInt(_0x566a0c(0xb5))/0x9);if(_0x5512ba===_0x10fb1c)break;else _0x528bc1['push'](_0x528bc1['shift']());}catch(_0x3e79ac){_0x528bc1['push'](_0x528bc1['shift']());}}}(a90_0x5c01,0x77562));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x1185cd){const _0x12a899=a90_0x505e;if(_0x1185cd===!![]||_0x1185cd===![])return{'success':_0x1185cd};if(_0x1185cd===null||_0x1185cd===undefined)return{'type':typeof _0x1185cd};if(typeof _0x1185cd!==_0x12a899(0xb8))return{'type':typeof _0x1185cd};const _0x2ff977=_0x1185cd,_0x1c89df=[_0x12a899(0xc0),_0x12a899(0xb4),_0x12a899(0xb2),_0x12a899(0xad),_0x12a899(0xac),_0x12a899(0xc4)],_0x4cd128={};for(const _0x406c14 of _0x1c89df){if(_0x406c14 in _0x2ff977)_0x4cd128[_0x406c14]=_0x2ff977[_0x406c14];}return Object[_0x12a899(0xbb)](_0x4cd128)[_0x12a899(0xae)]===0x0&&(_0x4cd128['keys']=Object[_0x12a899(0xbb)](_0x2ff977)[_0x12a899(0xb6)](0x0,0x14)),_0x4cd128;}function a90_0x5c01(){const _0x1af0db=['success','1639572vyTkel','\x20(see\x20data.result)','864zMjqIr','data','1217202rFQVSt','msg','error','length','409745FAEZuX','Connection\x20check\x20finished\x20for\x20db\x20link\x20','10661hteBoP','code','test','message','1719QhvYyA','slice','92552TfpqUo','object','2774836RyQUSb','1680170hRWkuQ','keys','Connection\x20OK\x20for\x20db\x20link\x20','read','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','num'];a90_0x5c01=function(){return _0x1af0db;};return a90_0x5c01();}export const dbTest={'service':'db','command':a90_0x54f618(0xb3),'description':a90_0x54f618(0xbe),'risk':a90_0x54f618(0xbd),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x8ab2ee){const _0x16c3d8=a90_0x54f618,_0x3c51f9=_0x8ab2ee[_0x16c3d8(0xbf)]('id'),_0x43fd4a=await testDbLinkConnect(_0x3c51f9),_0x4a5b88=_0x43fd4a===!![]||typeof _0x43fd4a==='object'&&_0x43fd4a!==null&&_0x43fd4a[_0x16c3d8(0xc0)]===!![],_0x3f5273=summarizeTestConnectResult(_0x43fd4a);return{'ok':!![],'data':{'id':_0x3c51f9,'connected':Boolean(_0x4a5b88),'result':_0x3f5273},'message':_0x4a5b88?_0x16c3d8(0xbc)+_0x3c51f9:_0x16c3d8(0xb0)+_0x3c51f9+_0x16c3d8(0xc2)};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const dbUpdate: CommandDefinition;
@@ -1 +1 @@
1
- const a91_0x43a212=a91_0x43b7;(function(_0x57252f,_0x1e4f2a){const _0x542880=a91_0x43b7,_0x10d9da=_0x57252f();while(!![]){try{const _0x10fb18=parseInt(_0x542880(0xbe))/0x1+parseInt(_0x542880(0xa0))/0x2*(-parseInt(_0x542880(0xb1))/0x3)+parseInt(_0x542880(0xae))/0x4*(-parseInt(_0x542880(0xb4))/0x5)+parseInt(_0x542880(0xab))/0x6+parseInt(_0x542880(0xad))/0x7+parseInt(_0x542880(0xa2))/0x8+-parseInt(_0x542880(0xa7))/0x9;if(_0x10fb18===_0x1e4f2a)break;else _0x10d9da['push'](_0x10d9da['shift']());}catch(_0x2a83ee){_0x10d9da['push'](_0x10d9da['shift']());}}}(a91_0x1a9c,0xdb01c));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a91_0x43b7(_0x1acc7d,_0x3eea0a){_0x1acc7d=_0x1acc7d-0x9d;const _0x1a9c77=a91_0x1a9c();let _0x43b7b5=_0x1a9c77[_0x1acc7d];return _0x43b7b5;}function a91_0x1a9c(){const _0x26d8b7=['dbname','dbUrl','has','376626rUPkTP','username','7452952MlxUQM','[redacted]','string','trim','dbDesc','17101827qhiagq','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','validation','New\x20username','4401552yDWtsq','New\x20description','2330342IRQHqS','8FAZntn','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','POST','3AthEzR','dbParam','password','927755KgwtCn','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','str','dbparam','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','num','New\x20host:port','dbdesc','update','dburl','1358553Ozrpki','dbName','New\x20database\x20name'];a91_0x1a9c=function(){return _0x26d8b7;};return a91_0x1a9c();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set(['******',a91_0x43a212(0xa3)]);function mergeDbLinkUpdate(_0x39d32a,_0x1306a2){const _0x54091f=a91_0x43a212,_0x53b35c={..._0x39d32a},_0x300a6c=_0x1306a2[_0x54091f(0xb6)]('password');if(_0x300a6c&&MASKED_PASSWORD_VALUES[_0x54091f(0x9f)](_0x300a6c))throw CliErrors[_0x54091f(0xa9)]('--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.');if(!_0x300a6c&&MASKED_PASSWORD_VALUES[_0x54091f(0x9f)](String(_0x39d32a[_0x54091f(0xb3)]??'')))throw CliErrors[_0x54091f(0xa9)](_0x54091f(0xb5));const _0x3686ef=_0x1306a2[_0x54091f(0xb6)](_0x54091f(0x9d));if(_0x3686ef)_0x53b35c[_0x54091f(0xbf)]=_0x3686ef;const _0x4aeaea=_0x1306a2[_0x54091f(0xb6)](_0x54091f(0xbd));if(_0x4aeaea)_0x53b35c[_0x54091f(0x9e)]=_0x4aeaea[_0x54091f(0xa5)]();const _0x37cf0e=_0x1306a2[_0x54091f(0xb6)](_0x54091f(0xa1));if(_0x37cf0e)_0x53b35c[_0x54091f(0xa1)]=_0x37cf0e;if(_0x300a6c)_0x53b35c[_0x54091f(0xb3)]=_0x300a6c;const _0x437689=_0x1306a2['str'](_0x54091f(0xb7));if(_0x437689)_0x53b35c[_0x54091f(0xb2)]=_0x437689;const _0x46c9ea=_0x1306a2['str'](_0x54091f(0xbb));if(_0x46c9ea)_0x53b35c[_0x54091f(0xa6)]=_0x46c9ea;return _0x53b35c;}export const dbUpdate={'service':'db','command':a91_0x43a212(0xbc),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a91_0x43a212(0x9d),'type':a91_0x43a212(0xa4),'description':a91_0x43a212(0xc0)},{'name':a91_0x43a212(0xbd),'type':a91_0x43a212(0xa4),'description':a91_0x43a212(0xba)},{'name':a91_0x43a212(0xa1),'type':a91_0x43a212(0xa4),'description':a91_0x43a212(0xaa)},{'name':a91_0x43a212(0xb3),'type':a91_0x43a212(0xa4),'description':a91_0x43a212(0xa8)},{'name':a91_0x43a212(0xb7),'type':a91_0x43a212(0xa4),'description':'New\x20connection\x20parameter\x20string'},{'name':a91_0x43a212(0xbb),'type':a91_0x43a212(0xa4),'description':a91_0x43a212(0xac)}],async 'validate'(_0x2ca29a){const _0x1c984d=a91_0x43a212,_0x45d849=_0x2ca29a[_0x1c984d(0xb6)]('dburl');if(_0x45d849&&!validateDbUrl(_0x45d849[_0x1c984d(0xa5)]()))throw CliErrors[_0x1c984d(0xa9)](_0x1c984d(0xb8)+_0x45d849+'\x22');},async 'dryRun'(_0x729790){const _0x2bc713=a91_0x43a212,_0xb50a10=_0x729790[_0x2bc713(0xb9)]('id'),_0x366381=await getDbLinkInfo(_0xb50a10),_0x1be5fe=mergeDbLinkUpdate(_0x366381,_0x729790),_0x241f1a=sanitizeDbLinkForOutput(_0x1be5fe);return{'method':_0x2bc713(0xb0),'url':'/smartapi/dblink/update','body':_0x241f1a,'description':_0x2bc713(0xaf)};},async 'execute'(_0x5de987){const _0x247224=_0x5de987['num']('id'),_0x3879ce=await getDbLinkInfo(_0x247224),_0x3f5841=mergeDbLinkUpdate(_0x3879ce,_0x5de987),{id:_0x2f13f6,entity:_0x471357}=normalizeEntityWithIdResponse(await updateDbLink(_0x3f5841));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x471357),'message':'Updated\x20db\x20link\x20'+(_0x2f13f6??_0x247224)};}};
1
+ const a91_0x5918a6=a91_0x4467;(function(_0x409731,_0x2962d0){const _0x2753e8=a91_0x4467,_0x285585=_0x409731();while(!![]){try{const _0x246e1c=parseInt(_0x2753e8(0xf3))/0x1+-parseInt(_0x2753e8(0xf9))/0x2+-parseInt(_0x2753e8(0xef))/0x3+-parseInt(_0x2753e8(0x109))/0x4+parseInt(_0x2753e8(0x105))/0x5+-parseInt(_0x2753e8(0x102))/0x6+parseInt(_0x2753e8(0xf4))/0x7;if(_0x246e1c===_0x2962d0)break;else _0x285585['push'](_0x285585['shift']());}catch(_0x33c89e){_0x285585['push'](_0x285585['shift']());}}}(a91_0x3129,0x3548a));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a91_0x4467(_0x1af90c,_0x1ffb22){_0x1af90c=_0x1af90c-0xe9;const _0x3129d1=a91_0x3129();let _0x4467d9=_0x3129d1[_0x1af90c];return _0x4467d9;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a91_0x5918a6(0xf6),a91_0x5918a6(0x104)]);function a91_0x3129(){const _0x4b4ac4=['has','735236fJEfnW','New\x20description','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','dbname','dbdesc','dbDesc','dbUrl','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','update','dbName','536106ZYsftl','username','dbparam','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','355532XZVnUt','2967748eLHKoA','Updated\x20db\x20link\x20','******','validation','/smartapi/dblink/update','61764alNYfB','password','New\x20username','New\x20host:port','dburl','trim','POST','num','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','2018274qmSJdS','str','[redacted]','842630kLpAje','string','New\x20database\x20name'];a91_0x3129=function(){return _0x4b4ac4;};return a91_0x3129();}function mergeDbLinkUpdate(_0x3ea047,_0x19aaae){const _0x37e46c=a91_0x5918a6,_0x2504ca={..._0x3ea047},_0x57d76d=_0x19aaae[_0x37e46c(0x103)](_0x37e46c(0xfa));if(_0x57d76d&&MASKED_PASSWORD_VALUES[_0x37e46c(0x108)](_0x57d76d))throw CliErrors[_0x37e46c(0xf7)](_0x37e46c(0x101));if(!_0x57d76d&&MASKED_PASSWORD_VALUES[_0x37e46c(0x108)](String(_0x3ea047['password']??'')))throw CliErrors[_0x37e46c(0xf7)](_0x37e46c(0xf2));const _0x41d613=_0x19aaae['str'](_0x37e46c(0x10c));if(_0x41d613)_0x2504ca[_0x37e46c(0xee)]=_0x41d613;const _0x16127b=_0x19aaae[_0x37e46c(0x103)](_0x37e46c(0xfd));if(_0x16127b)_0x2504ca[_0x37e46c(0xeb)]=_0x16127b[_0x37e46c(0xfe)]();const _0x2f2abf=_0x19aaae['str'](_0x37e46c(0xf0));if(_0x2f2abf)_0x2504ca['username']=_0x2f2abf;if(_0x57d76d)_0x2504ca['password']=_0x57d76d;const _0x135ff9=_0x19aaae[_0x37e46c(0x103)](_0x37e46c(0xf1));if(_0x135ff9)_0x2504ca['dbParam']=_0x135ff9;const _0xb1e2fe=_0x19aaae[_0x37e46c(0x103)](_0x37e46c(0xe9));if(_0xb1e2fe)_0x2504ca[_0x37e46c(0xea)]=_0xb1e2fe;return _0x2504ca;}export const dbUpdate={'service':'db','command':a91_0x5918a6(0xed),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a91_0x5918a6(0x10c),'type':'string','description':a91_0x5918a6(0x107)},{'name':a91_0x5918a6(0xfd),'type':a91_0x5918a6(0x106),'description':a91_0x5918a6(0xfc)},{'name':a91_0x5918a6(0xf0),'type':a91_0x5918a6(0x106),'description':a91_0x5918a6(0xfb)},{'name':a91_0x5918a6(0xfa),'type':a91_0x5918a6(0x106),'description':'Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password'},{'name':a91_0x5918a6(0xf1),'type':a91_0x5918a6(0x106),'description':'New\x20connection\x20parameter\x20string'},{'name':a91_0x5918a6(0xe9),'type':a91_0x5918a6(0x106),'description':a91_0x5918a6(0x10a)}],async 'validate'(_0x13cbff){const _0x32afc0=a91_0x5918a6,_0x306c3b=_0x13cbff[_0x32afc0(0x103)](_0x32afc0(0xfd));if(_0x306c3b&&!validateDbUrl(_0x306c3b[_0x32afc0(0xfe)]()))throw CliErrors[_0x32afc0(0xf7)](_0x32afc0(0x10b)+_0x306c3b+'\x22');},async 'dryRun'(_0x59530f){const _0x55149f=a91_0x5918a6,_0x2e0dce=_0x59530f[_0x55149f(0x100)]('id'),_0x3ef6bb=await getDbLinkInfo(_0x2e0dce),_0x5cfdf9=mergeDbLinkUpdate(_0x3ef6bb,_0x59530f),_0xae8999=sanitizeDbLinkForOutput(_0x5cfdf9);return{'method':_0x55149f(0xff),'url':_0x55149f(0xf8),'body':_0xae8999,'description':_0x55149f(0xec)};},async 'execute'(_0x26ce71){const _0x10a325=a91_0x5918a6,_0x21b4f8=_0x26ce71[_0x10a325(0x100)]('id'),_0x50658d=await getDbLinkInfo(_0x21b4f8),_0x56d2d6=mergeDbLinkUpdate(_0x50658d,_0x26ce71),{id:_0x49a0c8,entity:_0x1fb38e}=normalizeEntityWithIdResponse(await updateDbLink(_0x56d2d6));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x1fb38e),'message':_0x10a325(0xf5)+(_0x49a0c8??_0x21b4f8)};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../framework/types.js";
2
+ export declare const doctorDefinition: CommandDefinition;
@@ -1 +1 @@
1
- const a92_0x43253b=a92_0x5eba;(function(_0x2108e4,_0x4b159c){const _0x2dc1c1=a92_0x5eba,_0x4c52be=_0x2108e4();while(!![]){try{const _0x4bc2e0=-parseInt(_0x2dc1c1(0x14e))/0x1+parseInt(_0x2dc1c1(0x171))/0x2*(parseInt(_0x2dc1c1(0x145))/0x3)+parseInt(_0x2dc1c1(0x152))/0x4*(parseInt(_0x2dc1c1(0x189))/0x5)+-parseInt(_0x2dc1c1(0x156))/0x6*(-parseInt(_0x2dc1c1(0x178))/0x7)+parseInt(_0x2dc1c1(0x16b))/0x8*(parseInt(_0x2dc1c1(0x174))/0x9)+parseInt(_0x2dc1c1(0x17c))/0xa*(-parseInt(_0x2dc1c1(0x16e))/0xb)+parseInt(_0x2dc1c1(0x182))/0xc*(-parseInt(_0x2dc1c1(0x15f))/0xd);if(_0x4bc2e0===_0x4b159c)break;else _0x4c52be['push'](_0x4c52be['shift']());}catch(_0x586b59){_0x4c52be['push'](_0x4c52be['shift']());}}}(a92_0x48e6,0x5d6f0));import a92_0x5d4676 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';function a92_0x48e6(){const _0x824962=['arch','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','12LafMlU','\x20\x20Config\x20JSON','length','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','check','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','1048890urLKRl','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Expired','red','message','platform','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','source','(set\x20via\x20file,\x20length=','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','slice','(missing)','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','defaultApp','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20Config\x20Files','doctor','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20←\x20current','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','explicitAppName','146757TgAPIf','\x20doctor','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','bold','accessKey','value','yellow','(not\x20found)','padEnd','71780gMmpeX','(not\x20set)','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','✗\x20Invalid\x20JSON','8iJkZMO','(set,\x20length=','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appcode','54126PlobrV','missing','(no\x20file)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','apps','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','13176813AqPmZH','✗\x20Not\x20logged\x20in','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','pageSize','(none)','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20runtimeDomain:\x20\x20\x20','✓\x20Valid','keys','✓\x20Valid\x20JSON','8QDTJfL','gray','\x20\x20Auth','11Pwjvuj','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','14XgVtLx','\x20\x20API\x20Endpoints','\x20(default)','6428682KjnaWx','green','verbose','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','7nrnkbl','log','apiDir','format','172230QaDtuq','cookie','version','repeat'];a92_0x48e6=function(){return _0x824962;};return a92_0x48e6();}function a92_0x5eba(_0x57f97e,_0x1058fd){_0x57f97e=_0x57f97e-0x142;const _0x48e669=a92_0x48e6();let _0x5eba8b=_0x48e669[_0x57f97e];return _0x5eba8b;}async function execute(_0x4784ce){const _0x201886=a92_0x5eba,_0x24de3f=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x201886(0x196)](0x0,0xa)+')':VERSION,_0x3f3881=buildConfigFromFlags({}),_0x1d8290=getCookie();console['log'](),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x148)](CLI_BIN_NAME+_0x201886(0x146))),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x16c)]('─'['repeat'](0x32))),console[_0x201886(0x179)](_0x201886(0x161)+_0x24de3f),console['log'](_0x201886(0x191)+process[_0x201886(0x17e)]),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x201886(0x18e)]+'\x20'+process[_0x201886(0x180)]),console[_0x201886(0x179)](),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x148)](_0x201886(0x19b))),console['log'](a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x19e)[_0x201886(0x17f)](0x1e)));const _0xf1efda=getGlobalConfigPath(),_0x375b6d=getProjectConfigPath();console['log'](_0x201886(0x154)+(_0xf1efda||a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x14c)))),console[_0x201886(0x179)](_0x201886(0x15d)+(_0x375b6d||a92_0x5d4676[_0x201886(0x16c)]('(not\x20found)'))),console[_0x201886(0x179)](),console['log'](a92_0x5d4676[_0x201886(0x148)](_0x201886(0x183))),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x19e)[_0x201886(0x17f)](0x1e)));const _0x58ac01=(_0x39b29f,_0x5cd46f)=>{const _0x2b4275=_0x201886;if(!_0x5cd46f){console[_0x2b4275(0x179)]('\x20\x20'+_0x39b29f[_0x2b4275(0x14d)](0x11)+'\x20'+a92_0x5d4676['gray'](_0x2b4275(0x158)));return;}const _0x2cf08f=inspectCliConfigJsonFile(_0x5cd46f);if(_0x2cf08f['status']==='ok')console[_0x2b4275(0x179)]('\x20\x20'+_0x39b29f[_0x2b4275(0x14d)](0x11)+'\x20'+a92_0x5d4676[_0x2b4275(0x175)](_0x2b4275(0x16a)));else{if(_0x2cf08f[_0x2b4275(0x166)]==='empty')console[_0x2b4275(0x179)]('\x20\x20'+_0x39b29f[_0x2b4275(0x14d)](0x11)+'\x20'+a92_0x5d4676[_0x2b4275(0x14b)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x2cf08f[_0x2b4275(0x166)]===_0x2b4275(0x157)?console[_0x2b4275(0x179)]('\x20\x20'+_0x39b29f[_0x2b4275(0x14d)](0x11)+'\x20'+a92_0x5d4676[_0x2b4275(0x16c)](_0x2b4275(0x197))):(console[_0x2b4275(0x179)]('\x20\x20'+_0x39b29f['padEnd'](0x11)+'\x20'+a92_0x5d4676[_0x2b4275(0x18c)](_0x2b4275(0x151))),console[_0x2b4275(0x179)]('\x20\x20'+''[_0x2b4275(0x14d)](0x11)+'\x20'+a92_0x5d4676[_0x2b4275(0x18c)](_0x2cf08f[_0x2b4275(0x18d)])));}};_0x58ac01(_0x201886(0x15a),_0xf1efda),_0x58ac01('Project',_0x375b6d),console[_0x201886(0x179)](),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x148)](_0x201886(0x162))),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x19e)[_0x201886(0x17f)](0x1e))),console[_0x201886(0x179)](_0x201886(0x16f)+(_0x3f3881['appCode']||a92_0x5d4676[_0x201886(0x18c)](_0x201886(0x14f)))),console[_0x201886(0x179)](_0x201886(0x18a)+_0x3f3881[_0x201886(0x192)]),console[_0x201886(0x179)](_0x201886(0x181)+_0x3f3881['locale']),console[_0x201886(0x179)](_0x201886(0x185)+_0x3f3881[_0x201886(0x17a)]),console['log'](_0x201886(0x198)+(_0x3f3881[_0x201886(0x199)]||a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x164)))),console['log'](_0x201886(0x177)+(_0x3f3881[_0x201886(0x186)]||a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x164)))),console[_0x201886(0x179)]('\x20\x20explicitAppName:\x20'+(_0x3f3881[_0x201886(0x144)]||a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x164)))),console[_0x201886(0x179)](_0x201886(0x18f)+(_0x3f3881[_0x201886(0x17b)]||a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x190)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x201886(0x188)+(_0x3f3881[_0x201886(0x163)]??a92_0x5d4676['gray']('(default)'))),console[_0x201886(0x179)](_0x201886(0x15c)+_0x3f3881['riskLevel']),console['log'](_0x201886(0x159)+_0x3f3881[_0x201886(0x176)]),console['log'](_0x201886(0x165)+(_0x3f3881['cookie']?a92_0x5d4676[_0x201886(0x175)]('(set,\x20length='+_0x3f3881[_0x201886(0x17d)][_0x201886(0x184)]+')'):_0x1d8290?a92_0x5d4676[_0x201886(0x175)](_0x201886(0x194)+_0x1d8290[_0x201886(0x184)]+')'):a92_0x5d4676['gray']('(none)')));const _0x14fc48=Object[_0x201886(0x169)](_0x3f3881[_0x201886(0x15b)]);if(_0x14fc48[_0x201886(0x184)]>0x0){console[_0x201886(0x179)](),console[_0x201886(0x179)](a92_0x5d4676['bold']('\x20\x20Apps')),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x19e)[_0x201886(0x17f)](0x1e)));for(const _0x23e143 of _0x14fc48){const _0x533c4c=_0x3f3881[_0x201886(0x15b)][_0x23e143],_0x17e869=_0x23e143===_0x3f3881[_0x201886(0x199)],_0x133660=_0x23e143===_0x3f3881[_0x201886(0x186)],_0x5777cb=_0x133660?a92_0x5d4676[_0x201886(0x175)](_0x201886(0x142)):'',_0x500d11=_0x17e869?_0x201886(0x173):'';console[_0x201886(0x179)]('\x20\x20'+_0x23e143+_0x500d11+_0x5777cb),console[_0x201886(0x179)](_0x201886(0x170)+_0x533c4c[_0x201886(0x155)]);const _0x2002af=buildAppDoctorFields(_0x533c4c,{'env':_0x3f3881['env'],'apiDir':_0x3f3881['raw'][_0x201886(0x17a)]||DEFAULT_CONFIG_VALUES[_0x201886(0x17a)],'cookie':_0x3f3881[_0x201886(0x17d)]||_0x1d8290||undefined,'accessKey':_0x3f3881['accessKey']});console[_0x201886(0x179)](_0x201886(0x195)+_0x2002af['env']['value']+'\x20\x20'+a92_0x5d4676[_0x201886(0x16c)]('('+_0x2002af['env'][_0x201886(0x193)]+')')),console[_0x201886(0x179)](_0x201886(0x15e)+_0x2002af[_0x201886(0x17a)][_0x201886(0x14a)]+'\x20\x20'+a92_0x5d4676[_0x201886(0x16c)]('('+_0x2002af['apiDir'][_0x201886(0x193)]+')'));const _0xce3b5e=_0x2002af[_0x201886(0x17d)]['value']?a92_0x5d4676['green'](_0x201886(0x153)+_0x2002af[_0x201886(0x17d)]['value'][_0x201886(0x184)]+')'):a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x164));console[_0x201886(0x179)](_0x201886(0x143)+_0xce3b5e+'\x20\x20'+a92_0x5d4676[_0x201886(0x16c)]('('+_0x2002af['cookie'][_0x201886(0x193)]+')'));const _0xef6d65=_0x2002af[_0x201886(0x149)][_0x201886(0x14a)]?a92_0x5d4676[_0x201886(0x175)](_0x201886(0x153)+_0x2002af['accessKey'][_0x201886(0x14a)]['length']+')'):a92_0x5d4676[_0x201886(0x16c)]('(none)');console[_0x201886(0x179)](_0x201886(0x19a)+_0xef6d65+'\x20\x20'+a92_0x5d4676[_0x201886(0x16c)]('('+_0x2002af[_0x201886(0x149)][_0x201886(0x193)]+')'));}}console[_0x201886(0x179)](),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x148)](_0x201886(0x172))),console['log'](a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x19e)[_0x201886(0x17f)](0x1e))),console[_0x201886(0x179)](_0x201886(0x19d)+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x201886(0x179)](_0x201886(0x167)+getRuntimeDomain()),console['log'](),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x148)](_0x201886(0x16d))),console[_0x201886(0x179)](a92_0x5d4676[_0x201886(0x16c)](_0x201886(0x19e)['repeat'](0x1e)));if(_0x1d8290){const _0x9fa31a=await getIsSessionValid();console[_0x201886(0x179)](_0x201886(0x147)+(_0x9fa31a?a92_0x5d4676[_0x201886(0x175)](_0x201886(0x168)):a92_0x5d4676[_0x201886(0x18c)](_0x201886(0x18b))));}else console['log'](_0x201886(0x147)+a92_0x5d4676['red'](_0x201886(0x160)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a92_0x43253b(0x19c),'command':a92_0x43253b(0x187),'description':a92_0x43253b(0x150),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a92_0x2984fb=a92_0x5f5a;(function(_0x135d0f,_0x5f43b0){const _0x24e7c9=a92_0x5f5a,_0x3fed84=_0x135d0f();while(!![]){try{const _0xf92752=-parseInt(_0x24e7c9(0xd4))/0x1+parseInt(_0x24e7c9(0x9a))/0x2*(-parseInt(_0x24e7c9(0xd9))/0x3)+-parseInt(_0x24e7c9(0xca))/0x4*(parseInt(_0x24e7c9(0x8d))/0x5)+-parseInt(_0x24e7c9(0xcb))/0x6*(parseInt(_0x24e7c9(0xdf))/0x7)+-parseInt(_0x24e7c9(0xa0))/0x8*(parseInt(_0x24e7c9(0xcc))/0x9)+parseInt(_0x24e7c9(0xdd))/0xa*(parseInt(_0x24e7c9(0xe2))/0xb)+-parseInt(_0x24e7c9(0xe4))/0xc*(-parseInt(_0x24e7c9(0xc0))/0xd);if(_0xf92752===_0x5f43b0)break;else _0x3fed84['push'](_0x3fed84['shift']());}catch(_0x148e6a){_0x3fed84['push'](_0x3fed84['shift']());}}}(a92_0x281f,0x653f2));import a92_0x88b183 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(_0x45d7f1){const _0x153fec=a92_0x5f5a,_0x2350a5=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x153fec(0x93)](0x0,0xa)+')':VERSION,_0x5ae6ad=buildConfigFromFlags({}),_0x1d06ec=getCookie();console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0xb9)](CLI_BIN_NAME+_0x153fec(0xab))),console[_0x153fec(0xb2)](a92_0x88b183['gray']('─'[_0x153fec(0xd8)](0x32))),console[_0x153fec(0xb2)](_0x153fec(0xdb)+_0x2350a5),console[_0x153fec(0xb2)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0x153fec(0xb2)](_0x153fec(0x96)+process[_0x153fec(0xce)]+'\x20'+process[_0x153fec(0xa3)]),console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183['bold'](_0x153fec(0xe5))),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0x9b)]('\x20\x20─'[_0x153fec(0xd8)](0x1e)));const _0x4774d0=getGlobalConfigPath(),_0x22c2ac=getProjectConfigPath();console[_0x153fec(0xb2)](_0x153fec(0xc1)+(_0x4774d0||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0x8c)))),console[_0x153fec(0xb2)](_0x153fec(0x92)+(_0x22c2ac||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0x8c)))),console[_0x153fec(0xb2)](),console['log'](a92_0x88b183['bold'](_0x153fec(0xaa))),console[_0x153fec(0xb2)](a92_0x88b183['gray']('\x20\x20─'['repeat'](0x1e)));const _0x3b7b29=(_0x4bfbdf,_0x52ae92)=>{const _0x62ac0e=_0x153fec;if(!_0x52ae92){console[_0x62ac0e(0xb2)]('\x20\x20'+_0x4bfbdf[_0x62ac0e(0xc3)](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0x9b)]('(no\x20file)'));return;}const _0x17e386=inspectCliConfigJsonFile(_0x52ae92);if(_0x17e386[_0x62ac0e(0xc8)]==='ok')console[_0x62ac0e(0xb2)]('\x20\x20'+_0x4bfbdf[_0x62ac0e(0xc3)](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0xb4)](_0x62ac0e(0xba)));else{if(_0x17e386['status']===_0x62ac0e(0xac))console[_0x62ac0e(0xb2)]('\x20\x20'+_0x4bfbdf[_0x62ac0e(0xc3)](0x11)+'\x20'+a92_0x88b183['yellow'](_0x62ac0e(0xde)));else _0x17e386[_0x62ac0e(0xc8)]===_0x62ac0e(0xc6)?console[_0x62ac0e(0xb2)]('\x20\x20'+_0x4bfbdf['padEnd'](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0x9b)](_0x62ac0e(0xc4))):(console['log']('\x20\x20'+_0x4bfbdf['padEnd'](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0xd1)](_0x62ac0e(0xcd))),console[_0x62ac0e(0xb2)]('\x20\x20'+''[_0x62ac0e(0xc3)](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0xd1)](_0x17e386[_0x62ac0e(0x8f)])));}};_0x3b7b29(_0x153fec(0xb7),_0x4774d0),_0x3b7b29(_0x153fec(0xbc),_0x22c2ac),console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0xb9)](_0x153fec(0xa2))),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0x9b)]('\x20\x20─'[_0x153fec(0xd8)](0x1e))),console[_0x153fec(0xb2)](_0x153fec(0xc2)+(_0x5ae6ad[_0x153fec(0xe3)]||a92_0x88b183[_0x153fec(0xd1)]('(not\x20set)'))),console['log'](_0x153fec(0x91)+_0x5ae6ad['env']),console[_0x153fec(0xb2)](_0x153fec(0xcf)+_0x5ae6ad[_0x153fec(0x9c)]),console[_0x153fec(0xb2)](_0x153fec(0x98)+_0x5ae6ad['apiDir']),console[_0x153fec(0xb2)](_0x153fec(0xbf)+(_0x5ae6ad[_0x153fec(0x9d)]||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xd5)))),console[_0x153fec(0xb2)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x5ae6ad[_0x153fec(0xbe)]||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xd5)))),console['log'](_0x153fec(0xa9)+(_0x5ae6ad[_0x153fec(0xb5)]||a92_0x88b183['gray']('(none)'))),console[_0x153fec(0xb2)](_0x153fec(0xb6)+(_0x5ae6ad[_0x153fec(0xdc)]||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xb1)+DEFAULT_CONFIG_VALUES[_0x153fec(0xdc)]+')'))),console['log'](_0x153fec(0xa4)+(_0x5ae6ad['pageSize']??a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xbd)))),console[_0x153fec(0xb2)](_0x153fec(0x90)+_0x5ae6ad['riskLevel']),console['log'](_0x153fec(0xb3)+_0x5ae6ad[_0x153fec(0x95)]),console[_0x153fec(0xb2)](_0x153fec(0x94)+(_0x5ae6ad[_0x153fec(0xda)]?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0xd3)+_0x5ae6ad['cookie'][_0x153fec(0x97)]+')'):_0x1d06ec?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0xbb)+_0x1d06ec[_0x153fec(0x97)]+')'):a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xd5))));const _0x3156c6=Object[_0x153fec(0xd2)](_0x5ae6ad[_0x153fec(0xe1)]);if(_0x3156c6[_0x153fec(0x97)]>0x0){console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183['bold'](_0x153fec(0xa7))),console[_0x153fec(0xb2)](a92_0x88b183['gray']('\x20\x20─'[_0x153fec(0xd8)](0x1e)));for(const _0x25f1cc of _0x3156c6){const _0x2adc3c=_0x5ae6ad[_0x153fec(0xe1)][_0x25f1cc],_0x2b783d=_0x25f1cc===_0x5ae6ad[_0x153fec(0x9d)],_0x127ced=_0x25f1cc===_0x5ae6ad[_0x153fec(0xbe)],_0xe05e56=_0x127ced?a92_0x88b183['green'](_0x153fec(0xb8)):'',_0x21a4d3=_0x2b783d?_0x153fec(0xd6):'';console[_0x153fec(0xb2)]('\x20\x20'+_0x25f1cc+_0x21a4d3+_0xe05e56),console[_0x153fec(0xb2)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x2adc3c[_0x153fec(0xe0)]);const _0x589241=buildAppDoctorFields(_0x2adc3c,{'env':_0x5ae6ad[_0x153fec(0xa8)],'apiDir':_0x5ae6ad[_0x153fec(0xc5)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x153fec(0xd0)],'cookie':_0x5ae6ad[_0x153fec(0xda)]||_0x1d06ec||undefined,'accessKey':_0x5ae6ad['accessKey']});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x589241[_0x153fec(0xa8)][_0x153fec(0x9f)]+'\x20\x20'+a92_0x88b183[_0x153fec(0x9b)]('('+_0x589241['env']['source']+')')),console[_0x153fec(0xb2)](_0x153fec(0xa1)+_0x589241['apiDir'][_0x153fec(0x9f)]+'\x20\x20'+a92_0x88b183[_0x153fec(0x9b)]('('+_0x589241['apiDir']['source']+')'));const _0x5ba1c4=_0x589241['cookie'][_0x153fec(0x9f)]?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0xd3)+_0x589241[_0x153fec(0xda)]['value'][_0x153fec(0x97)]+')'):a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xd5));console[_0x153fec(0xb2)](_0x153fec(0xc9)+_0x5ba1c4+'\x20\x20'+a92_0x88b183[_0x153fec(0x9b)]('('+_0x589241['cookie'][_0x153fec(0xd7)]+')'));const _0x537d5f=_0x589241[_0x153fec(0xad)][_0x153fec(0x9f)]?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0xd3)+_0x589241[_0x153fec(0xad)][_0x153fec(0x9f)][_0x153fec(0x97)]+')'):a92_0x88b183['gray'](_0x153fec(0xd5));console[_0x153fec(0xb2)](_0x153fec(0xb0)+_0x537d5f+'\x20\x20'+a92_0x88b183[_0x153fec(0x9b)]('('+_0x589241['accessKey']['source']+')'));}}console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0xb9)](_0x153fec(0xe6))),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0x9b)]('\x20\x20─'['repeat'](0x1e))),console[_0x153fec(0xb2)](_0x153fec(0xc7)+getApiDomain()),console[_0x153fec(0xb2)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x153fec(0xb2)](),console['log'](a92_0x88b183[_0x153fec(0xb9)](_0x153fec(0xa6))),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xaf)['repeat'](0x1e)));if(_0x1d06ec){const _0x17fc67=await getIsSessionValid();console[_0x153fec(0xb2)](_0x153fec(0x8e)+(_0x17fc67?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0x99)):a92_0x88b183[_0x153fec(0xd1)](_0x153fec(0xae))));}else console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a92_0x88b183[_0x153fec(0xd1)]('✗\x20Not\x20logged\x20in'));return console['log'](),{'ok':!![]};}function a92_0x5f5a(_0x280eeb,_0xc7773c){_0x280eeb=_0x280eeb-0x8c;const _0x281f02=a92_0x281f();let _0x5f5a83=_0x281f02[_0x280eeb];return _0x5f5a83;}function a92_0x281f(){const _0x11ba71=['\x20\x20\x20\x20accessKey:\x20\x20','(default:\x20','log','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','explicitAppName','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','\x20←\x20current','bold','✓\x20Valid\x20JSON','(set\x20via\x20file,\x20length=','Project','(default)','currentApp','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','2977EgfJpR','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','(missing)','raw','missing','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','2852112rnjBuJ','2058JYjepX','45noGSQW','✗\x20Invalid\x20JSON','platform','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','red','keys','(set,\x20length=','114500NFzolH','(none)','\x20(default)','source','repeat','82407urRYKD','cookie','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','format','50TTUJuZ','⚠\x20Empty\x20(treated\x20as\x20{})','16051kPXUgM','appcode','apps','1475529PVnloq','appCode','142224nsWSnQ','\x20\x20Config\x20Files','\x20\x20API\x20Endpoints','(not\x20found)','5aoNgvV','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','slice','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid','50mCDzEI','gray','locale','defaultApp','read','value','1070952BbPbGs','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','arch','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20Auth','\x20\x20Apps','env','\x20\x20explicitAppName:\x20','\x20\x20Config\x20JSON','\x20doctor','empty','accessKey','✗\x20Expired','\x20\x20─'];a92_0x281f=function(){return _0x11ba71;};return a92_0x281f();}export const doctorDefinition={'service':'doctor','command':'check','description':a92_0x2984fb(0xa5),'risk':a92_0x2984fb(0x9e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const fileDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- const a93_0xb4a8ff=a93_0x368e;(function(_0x2b0ba4,_0x35c0e6){const _0x4a0b16=a93_0x368e,_0x3d8ee8=_0x2b0ba4();while(!![]){try{const _0x46b0c2=parseInt(_0x4a0b16(0xa2))/0x1+parseInt(_0x4a0b16(0x9d))/0x2*(-parseInt(_0x4a0b16(0xb3))/0x3)+parseInt(_0x4a0b16(0x99))/0x4+parseInt(_0x4a0b16(0xba))/0x5+-parseInt(_0x4a0b16(0xa4))/0x6*(parseInt(_0x4a0b16(0xad))/0x7)+-parseInt(_0x4a0b16(0xb1))/0x8*(parseInt(_0x4a0b16(0x9f))/0x9)+parseInt(_0x4a0b16(0xaa))/0xa*(parseInt(_0x4a0b16(0xbc))/0xb);if(_0x46b0c2===_0x35c0e6)break;else _0x3d8ee8['push'](_0x3d8ee8['shift']());}catch(_0x55bb81){_0x3d8ee8['push'](_0x3d8ee8['shift']());}}}(a93_0x56e1,0x715d5));function a93_0x56e1(){const _0x2c2efc=['str','2862MIQbee','upload','1106514lZLmKV','download','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','865492hnpBuU','File','6WkDbLJ','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','appCode','string','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','read','2170nIuSEs','trim','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3712807fGkeWn','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','/smartapi/common/uploadFile','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','56SZtvgV','long-term','1398CHZmwY','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Uploaded\x20file:\x20','validation','\x20to\x20development\x20app\x20','file','path','4373300rvXUVH','Preview:\x20upload\x20','37235HqXEym','query-url','bool','190052TwokCi','Path\x20to\x20the\x20local\x20file\x20to\x20upload','boolean'];a93_0x56e1=function(){return _0x2c2efc;};return a93_0x56e1();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a93_0xb4a8ff(0xb8),'type':a93_0xb4a8ff(0xa7),'required':!![],'description':a93_0xb4a8ff(0x9a)},FILEPATH_FLAG={'name':'filepath','type':'string','required':!![],'description':a93_0xb4a8ff(0xb0)},DOWNLOAD_FLAG={'name':a93_0xb4a8ff(0xa0),'type':a93_0xb4a8ff(0x9b),'description':a93_0xb4a8ff(0xa5)},LONG_TERM_FLAG={'name':a93_0xb4a8ff(0xb2),'type':a93_0xb4a8ff(0x9b),'description':a93_0xb4a8ff(0xae)};function requireFilePath(_0x34447a){const _0x508fe0=a93_0xb4a8ff,_0x43b88f=_0x34447a[_0x508fe0(0xab)]();if(!_0x43b88f)throw CliErrors[_0x508fe0(0xb6)]('filePath\x20is\x20required.');return _0x43b88f;}function a93_0x368e(_0x5b3836,_0x3ab60c){_0x5b3836=_0x5b3836-0x99;const _0x56e12a=a93_0x56e1();let _0x368ec0=_0x56e12a[_0x5b3836];return _0x368ec0;}const fileUpload={'service':a93_0xb4a8ff(0xb8),'command':a93_0xb4a8ff(0x9e),'description':a93_0xb4a8ff(0xb4),'risk':a93_0xb4a8ff(0xa9),'flags':[FILE_FLAG],async 'dryRun'(_0xd4d4ef){const _0x42457b=a93_0xb4a8ff,_0x261dc5=requireDevelopmentUploadFile(_0xd4d4ef['str'](_0x42457b(0xb8)),_0x42457b(0xa3));return{'method':'POST','url':_0x42457b(0xaf),'body':{'appCode':_0xd4d4ef[_0x42457b(0xa6)],'multipart':{'file':_0x261dc5}},'description':_0x42457b(0xbb)+_0x261dc5['path']+_0x42457b(0xb7)+_0xd4d4ef['appCode']};},async 'execute'(_0x264aad){const _0x6f9e6e=a93_0xb4a8ff,_0x3092d2=requireDevelopmentUploadFile(_0x264aad[_0x6f9e6e(0x9c)](_0x6f9e6e(0xb8)),_0x6f9e6e(0xa3)),_0x3b48e5=await uploadDevelopmentFile(_0x264aad['appCode'],_0x3092d2[_0x6f9e6e(0xb9)]);return{'ok':!![],'data':_0x3b48e5,'message':_0x3b48e5['filePath']?_0x6f9e6e(0xb5)+_0x3b48e5['filePath']+_0x6f9e6e(0xa8):_0x6f9e6e(0xac)};}},fileQueryUrl={'service':'file','command':a93_0xb4a8ff(0xbd),'description':a93_0xb4a8ff(0xa1),'risk':a93_0xb4a8ff(0xa9),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x16b7a8){const _0x59d70c=a93_0xb4a8ff,_0x14f8ac=requireFilePath(_0x16b7a8[_0x59d70c(0x9c)]('filepath')),_0x49b865=await queryDevelopmentFileUrl(_0x14f8ac,{'download':_0x16b7a8[_0x59d70c(0xbe)](_0x59d70c(0xa0)),'longTerm':_0x16b7a8['bool'](_0x59d70c(0xb2))});return{'ok':!![],'data':_0x49b865};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a93_0x3e419d=a93_0x1235;(function(_0x3d5411,_0xb9af2e){const _0x21fc11=a93_0x1235,_0x28cecd=_0x3d5411();while(!![]){try{const _0x4340a0=parseInt(_0x21fc11(0xbd))/0x1+parseInt(_0x21fc11(0xd6))/0x2+parseInt(_0x21fc11(0xc0))/0x3+-parseInt(_0x21fc11(0xc7))/0x4*(-parseInt(_0x21fc11(0xc9))/0x5)+parseInt(_0x21fc11(0xbb))/0x6*(-parseInt(_0x21fc11(0xc2))/0x7)+parseInt(_0x21fc11(0xba))/0x8*(-parseInt(_0x21fc11(0xd4))/0x9)+-parseInt(_0x21fc11(0xd2))/0xa;if(_0x4340a0===_0xb9af2e)break;else _0x28cecd['push'](_0x28cecd['shift']());}catch(_0x2dc279){_0x28cecd['push'](_0x28cecd['shift']());}}}(a93_0x4055,0x342ee));function a93_0x1235(_0x10f7c8,_0x46fba4){_0x10f7c8=_0x10f7c8-0xb8;const _0x40555c=a93_0x4055();let _0x12359f=_0x40555c[_0x10f7c8];return _0x12359f;}function a93_0x4055(){const _0x5dfab0=['long-term','126BPFMoM','validation','492206uHyxlq','bool','upload','read','trim','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','POST','filePath\x20is\x20required.','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','query-url','176248lOHBgb','423972AfqgOq','string','35919Aceitd','filePath','Path\x20to\x20the\x20local\x20file\x20to\x20upload','799698bZiXfb','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','14nFzXNy','path','download','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','\x20to\x20development\x20app\x20','7368xPXrWZ','str','810AqAuix','Uploaded\x20file:\x20','filepath','file','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Preview:\x20upload\x20','appCode','boolean','File','1834920rQqWPt'];a93_0x4055=function(){return _0x5dfab0;};return a93_0x4055();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a93_0x3e419d(0xcc),'type':'string','required':!![],'description':a93_0x3e419d(0xbf)},FILEPATH_FLAG={'name':a93_0x3e419d(0xcb),'type':a93_0x3e419d(0xbc),'required':!![],'description':a93_0x3e419d(0xc1)},DOWNLOAD_FLAG={'name':a93_0x3e419d(0xc4),'type':a93_0x3e419d(0xd0),'description':a93_0x3e419d(0xdc)},LONG_TERM_FLAG={'name':a93_0x3e419d(0xd3),'type':a93_0x3e419d(0xd0),'description':a93_0x3e419d(0xc5)};function requireFilePath(_0xfb4af8){const _0x30d046=a93_0x3e419d,_0x5d99a5=_0xfb4af8[_0x30d046(0xda)]();if(!_0x5d99a5)throw CliErrors[_0x30d046(0xd5)](_0x30d046(0xde));return _0x5d99a5;}const fileUpload={'service':a93_0x3e419d(0xcc),'command':a93_0x3e419d(0xd8),'description':a93_0x3e419d(0xcd),'risk':a93_0x3e419d(0xd9),'flags':[FILE_FLAG],async 'dryRun'(_0x5c783f){const _0x2cbe11=a93_0x3e419d,_0x4df69e=requireDevelopmentUploadFile(_0x5c783f[_0x2cbe11(0xc8)](_0x2cbe11(0xcc)),_0x2cbe11(0xd1));return{'method':_0x2cbe11(0xdd),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x5c783f[_0x2cbe11(0xcf)],'multipart':{'file':_0x4df69e}},'description':_0x2cbe11(0xce)+_0x4df69e[_0x2cbe11(0xc3)]+_0x2cbe11(0xc6)+_0x5c783f['appCode']};},async 'execute'(_0x1886e5){const _0x448470=a93_0x3e419d,_0x474040=requireDevelopmentUploadFile(_0x1886e5['str'](_0x448470(0xcc)),_0x448470(0xd1)),_0x127eef=await uploadDevelopmentFile(_0x1886e5['appCode'],_0x474040[_0x448470(0xc3)]);return{'ok':!![],'data':_0x127eef,'message':_0x127eef[_0x448470(0xbe)]?_0x448470(0xca)+_0x127eef[_0x448470(0xbe)]+_0x448470(0xdb):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a93_0x3e419d(0xcc),'command':a93_0x3e419d(0xb9),'description':a93_0x3e419d(0xb8),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x37b828){const _0x5b7b98=a93_0x3e419d,_0x15f0db=requireFilePath(_0x37b828['str'](_0x5b7b98(0xcb))),_0x1dd507=await queryDevelopmentFileUrl(_0x15f0db,{'download':_0x37b828[_0x5b7b98(0xd7)](_0x5b7b98(0xc4)),'longTerm':_0x37b828[_0x5b7b98(0xd7)]('long-term')});return{'ok':!![],'data':_0x1dd507};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -0,0 +1,11 @@
1
+ /**
2
+ * init —— 智能初始化(声明式)
3
+ *
4
+ * 一站式初始化:
5
+ * 1. 老项目自动升级(检测旧配置文件)
6
+ * 2. --appcode 直接写入配置
7
+ * 3. 交互模式:从平台拉取应用列表让用户选择
8
+ * 4. CI 模式:必须传 --appcode
9
+ */
10
+ import type { CommandDefinition } from "../../framework/types.js";
11
+ export declare const initDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- const a94_0x3ce8ad=a94_0x333c;function a94_0x2425(){const _0x4b9b47=['\x20\x20Apps:\x20','73893HjpRDa','global','valid','5UYVlOh','77xgKhZy','project','cwd','6397FXCTIQ','appcode','string','4FOZYDv','validation','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','yes','7miouhK','2688183goJTGL','56052OxyXgc','appCode','Usage:\x20','run','str','some','boolean','Target\x20environment','\x0a✓\x20Successfully\x20initialized\x20','App\x20code\x20to\x20initialize\x20with','Write\x20to\x20global\x20config\x20instead\x20of\x20project','defaultApp','\x20\x20Env:\x20','write','280314mirWGy','\x20\x20Config:\x20','toLocaleString','map','\x20config','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','nonInteractive','bool','log','env','\x20\x20Default:\x20','message','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','Use\x20`','1300220ApYPoh','2695384ptigfT'];a94_0x2425=function(){return _0x4b9b47;};return a94_0x2425();}(function(_0x2752bc,_0x2d0eae){const _0x1e53af=a94_0x333c,_0x5d3cd4=_0x2752bc();while(!![]){try{const _0x25f0db=-parseInt(_0x1e53af(0x147))/0x1+-parseInt(_0x1e53af(0x150))/0x2+parseInt(_0x1e53af(0x140))/0x3*(-parseInt(_0x1e53af(0x14a))/0x4)+-parseInt(_0x1e53af(0x143))/0x5*(parseInt(_0x1e53af(0x12f))/0x6)+parseInt(_0x1e53af(0x14e))/0x7*(-parseInt(_0x1e53af(0x13e))/0x8)+-parseInt(_0x1e53af(0x14f))/0x9+parseInt(_0x1e53af(0x13d))/0xa*(parseInt(_0x1e53af(0x144))/0xb);if(_0x25f0db===_0x2d0eae)break;else _0x5d3cd4['push'](_0x5d3cd4['shift']());}catch(_0x4a7812){_0x5d3cd4['push'](_0x5d3cd4['shift']());}}}(a94_0x2425,0x29343));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';function a94_0x333c(_0x1b8ac7,_0x2451a2){_0x1b8ac7=_0x1b8ac7-0x12f;const _0x2425db=a94_0x2425();let _0x333c73=_0x2425db[_0x1b8ac7];return _0x333c73;}import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0xf5f26e){return{'appCode':_0xf5f26e,'appName':_0xf5f26e};}function writeInitConfig(_0x1f87bd,_0x2a06d9,_0x356e6d){const _0x2bc647=a94_0x333c,_0x5b2535=resolveWriteConfigPath(_0x1f87bd),_0x143c57=buildCanonicalProjectConfig({},{'appCodes':_0x2a06d9[_0x2bc647(0x132)](_0x2b6edd=>_0x2b6edd[_0x2bc647(0x151)]),'env':_0x356e6d,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x2bc647(0x131)]()}});writeConfigFile(_0x5b2535,_0x143c57);const _0x2b1471=_0x1f87bd===_0x2bc647(0x141)?_0x2bc647(0x141):_0x2bc647(0x145);console['log'](_0x2bc647(0x158)+_0x2b1471+_0x2bc647(0x133)),console[_0x2bc647(0x137)](_0x2bc647(0x13f)+_0x2a06d9[_0x2bc647(0x132)](_0x7b110e=>_0x7b110e['appCode'])['join'](',\x20')),console[_0x2bc647(0x137)](_0x2bc647(0x139)+_0x143c57[_0x2bc647(0x15b)]),console[_0x2bc647(0x137)](_0x2bc647(0x15c)+_0x143c57['env']),console[_0x2bc647(0x137)](_0x2bc647(0x130)+_0x5b2535);}async function runSmartInit(_0x42bba3){const _0x38b239=a94_0x333c,_0x5c8313=process[_0x38b239(0x146)](),_0x51b72b=_0x42bba3[_0x38b239(0x136)](_0x38b239(0x141))?'global':'project',_0xede47f=_0x42bba3[_0x38b239(0x154)](_0x38b239(0x138))||'production',_0x52dae7=_0x42bba3[_0x38b239(0x154)](_0x38b239(0x148))||undefined;if(_0x51b72b===_0x38b239(0x145)){const _0x2c3b5d=existsSync(resolve(_0x5c8313,NEW_CONFIG_NAME)),_0x354f3=LEGACY_CONFIG_NAMES[_0x38b239(0x155)](_0x5a419a=>existsSync(resolve(_0x5c8313,_0x5a419a)));if(_0x354f3&&!_0x2c3b5d)return console['log']('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x42bba3[_0x38b239(0x135)],{'yes':_0x42bba3[_0x38b239(0x136)](_0x38b239(0x14d))});if(_0x2c3b5d)throw CliErrors['validation'](_0x38b239(0x13b),_0x38b239(0x13c)+CLI_BIN_NAME+_0x38b239(0x134));}if(_0x52dae7){const _0x2c3a6d=validateAppcode(_0x52dae7);if(!_0x2c3a6d[_0x38b239(0x142)])throw CliErrors[_0x38b239(0x14b)](_0x2c3a6d[_0x38b239(0x13a)]);writeInitConfig(_0x51b72b,[syntheticApp(_0x52dae7)],_0xede47f);return;}if(_0x42bba3['nonInteractive'])throw CliErrors['flagMissing'](_0x38b239(0x148),_0x38b239(0x152)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x3e93f4=getCookie(),_0x1bb04e=await selectMultipleApps(_0x3e93f4),_0x1c902d=_0x1bb04e==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x1bb04e;writeInitConfig(_0x51b72b,_0x1c902d,_0xede47f);}const initFlags=[{'name':'global','type':'boolean','description':a94_0x3ce8ad(0x15a),'default':![]},{'name':'env','type':a94_0x3ce8ad(0x149),'description':a94_0x3ce8ad(0x157),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':a94_0x3ce8ad(0x149),'description':a94_0x3ce8ad(0x159)},{'name':a94_0x3ce8ad(0x14d),'type':a94_0x3ce8ad(0x156),'description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':'init','command':a94_0x3ce8ad(0x153),'description':a94_0x3ce8ad(0x14c),'risk':a94_0x3ce8ad(0x15d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3cd514){return await runSmartInit(_0x3cd514),{'ok':!![]};}}];
1
+ const a94_0x24d6b4=a94_0x5570;(function(_0x4048ec,_0x3021d1){const _0x731a60=a94_0x5570,_0x5adf53=_0x4048ec();while(!![]){try{const _0x11e529=-parseInt(_0x731a60(0x206))/0x1*(parseInt(_0x731a60(0x1e9))/0x2)+-parseInt(_0x731a60(0x215))/0x3+parseInt(_0x731a60(0x204))/0x4+-parseInt(_0x731a60(0x1f1))/0x5*(parseInt(_0x731a60(0x1fe))/0x6)+parseInt(_0x731a60(0x213))/0x7+-parseInt(_0x731a60(0x20c))/0x8+parseInt(_0x731a60(0x1f6))/0x9;if(_0x11e529===_0x3021d1)break;else _0x5adf53['push'](_0x5adf53['shift']());}catch(_0x1c178f){_0x5adf53['push'](_0x5adf53['shift']());}}}(a94_0x1c25,0x576c9));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';function a94_0x1c25(){const _0x25b5c1=['Auto-confirm\x20prompts','env','cwd','2785700upEVDM','Write\x20to\x20global\x20config\x20instead\x20of\x20project','1duQkUX','write','map','flagMissing','appCode','log','4797320jncFhC','Target\x20environment','toLocaleString','boolean','production','global','\x0a✓\x20Successfully\x20initialized\x20','1835764rIxIiZ','Use\x20`','813015QCArwR','defaultApp','join','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','App\x20code\x20to\x20initialize\x20with','819158sfEEXB','\x20\x20Apps:\x20','some','message','\x20\x20Env:\x20','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','\x20\x20Config:\x20','custom','10UVhUZb','yes','project','valid','检测到旧配置文件,正在自动升级...\x0a','6199533YNqKdf','Usage:\x20','nonInteractive','\x20config','run','appcode','bool','string','27528BRGMve','validation','str'];a94_0x1c25=function(){return _0x25b5c1;};return a94_0x1c25();}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(_0x57da88){return{'appCode':_0x57da88,'appName':_0x57da88};}function writeInitConfig(_0x1ea657,_0x12aed5,_0x4bbaaa){const _0x3f06f7=a94_0x5570,_0x63614e=resolveWriteConfigPath(_0x1ea657),_0xca3a82=buildCanonicalProjectConfig({},{'appCodes':_0x12aed5[_0x3f06f7(0x208)](_0x2e7b95=>_0x2e7b95[_0x3f06f7(0x20a)]),'env':_0x4bbaaa,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x3f06f7(0x20e)]()}});writeConfigFile(_0x63614e,_0xca3a82);const _0x446d9d=_0x1ea657==='global'?_0x3f06f7(0x211):_0x3f06f7(0x1f3);console[_0x3f06f7(0x20b)](_0x3f06f7(0x212)+_0x446d9d+_0x3f06f7(0x1f9)),console[_0x3f06f7(0x20b)](_0x3f06f7(0x1ea)+_0x12aed5[_0x3f06f7(0x208)](_0x426938=>_0x426938[_0x3f06f7(0x20a)])[_0x3f06f7(0x217)](',\x20')),console[_0x3f06f7(0x20b)]('\x20\x20Default:\x20'+_0xca3a82[_0x3f06f7(0x216)]),console['log'](_0x3f06f7(0x1ed)+_0xca3a82[_0x3f06f7(0x202)]),console[_0x3f06f7(0x20b)](_0x3f06f7(0x1ef)+_0x63614e);}function a94_0x5570(_0x2519df,_0x5a59fd){_0x2519df=_0x2519df-0x1e9;const _0x1c258c=a94_0x1c25();let _0x5570a2=_0x1c258c[_0x2519df];return _0x5570a2;}async function runSmartInit(_0x5c80dd){const _0x4e2d0b=a94_0x5570,_0x36522b=process[_0x4e2d0b(0x203)](),_0x2e6275=_0x5c80dd[_0x4e2d0b(0x1fc)](_0x4e2d0b(0x211))?_0x4e2d0b(0x211):_0x4e2d0b(0x1f3),_0x3fe460=_0x5c80dd[_0x4e2d0b(0x200)](_0x4e2d0b(0x202))||_0x4e2d0b(0x210),_0x3a9f99=_0x5c80dd[_0x4e2d0b(0x200)](_0x4e2d0b(0x1fb))||undefined;if(_0x2e6275===_0x4e2d0b(0x1f3)){const _0x382af9=existsSync(resolve(_0x36522b,NEW_CONFIG_NAME)),_0x385f72=LEGACY_CONFIG_NAMES[_0x4e2d0b(0x1eb)](_0x5a465f=>existsSync(resolve(_0x36522b,_0x5a465f)));if(_0x385f72&&!_0x382af9)return console[_0x4e2d0b(0x20b)](_0x4e2d0b(0x1f5)),upgradeApp(_0x5c80dd[_0x4e2d0b(0x1f8)],{'yes':_0x5c80dd[_0x4e2d0b(0x1fc)](_0x4e2d0b(0x1f2))});if(_0x382af9)throw CliErrors[_0x4e2d0b(0x1ff)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x4e2d0b(0x214)+CLI_BIN_NAME+_0x4e2d0b(0x1ee));}if(_0x3a9f99){const _0x483ec7=validateAppcode(_0x3a9f99);if(!_0x483ec7[_0x4e2d0b(0x1f4)])throw CliErrors['validation'](_0x483ec7[_0x4e2d0b(0x1ec)]);writeInitConfig(_0x2e6275,[syntheticApp(_0x3a9f99)],_0x3fe460);return;}if(_0x5c80dd[_0x4e2d0b(0x1f8)])throw CliErrors[_0x4e2d0b(0x209)](_0x4e2d0b(0x1fb),_0x4e2d0b(0x1f7)+CLI_BIN_NAME+_0x4e2d0b(0x218));const _0x8077d2=getCookie(),_0x3fcf79=await selectMultipleApps(_0x8077d2),_0x480751=_0x3fcf79===_0x4e2d0b(0x1f0)?[syntheticApp(await promptCustomAppcode())]:_0x3fcf79;writeInitConfig(_0x2e6275,_0x480751,_0x3fe460);}const initFlags=[{'name':a94_0x24d6b4(0x211),'type':a94_0x24d6b4(0x20f),'description':a94_0x24d6b4(0x205),'default':![]},{'name':a94_0x24d6b4(0x202),'type':a94_0x24d6b4(0x1fd),'description':a94_0x24d6b4(0x20d),'default':a94_0x24d6b4(0x210),'enum':[...RABETBASE_ENV_VALUES]},{'name':a94_0x24d6b4(0x1fb),'type':a94_0x24d6b4(0x1fd),'description':a94_0x24d6b4(0x219)},{'name':'yes','type':a94_0x24d6b4(0x20f),'description':a94_0x24d6b4(0x201),'default':![]}];export const initDefinitions=[{'service':'init','command':a94_0x24d6b4(0x1fa),'description':'Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','risk':a94_0x24d6b4(0x207),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x2845ba){return await runSmartInit(_0x2845ba),{'ok':!![]};}}];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const issueDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- (function(_0x4b5a20,_0x199a18){const _0x521523=a95_0x3344,_0x517075=_0x4b5a20();while(!![]){try{const _0x18b592=-parseInt(_0x521523(0x12d))/0x1*(-parseInt(_0x521523(0x12e))/0x2)+-parseInt(_0x521523(0x12f))/0x3+-parseInt(_0x521523(0x131))/0x4*(-parseInt(_0x521523(0x137))/0x5)+parseInt(_0x521523(0x132))/0x6*(-parseInt(_0x521523(0x135))/0x7)+-parseInt(_0x521523(0x12c))/0x8*(parseInt(_0x521523(0x136))/0x9)+parseInt(_0x521523(0x130))/0xa*(parseInt(_0x521523(0x138))/0xb)+parseInt(_0x521523(0x134))/0xc*(parseInt(_0x521523(0x133))/0xd);if(_0x18b592===_0x199a18)break;else _0x517075['push'](_0x517075['shift']());}catch(_0x115ee7){_0x517075['push'](_0x517075['shift']());}}}(a95_0x163a,0xcaca7));function a95_0x3344(_0x1c16d6,_0x42304e){_0x1c16d6=_0x1c16d6-0x12c;const _0x163a12=a95_0x163a();let _0x334487=_0x163a12[_0x1c16d6];return _0x334487;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a95_0x163a(){const _0x17c7d7=['11402521HgotLX','24cpJGCa','623JBDHdO','676404xyaiUM','760pNPfjf','2245771wstjzg','96YWwWym','18015VNVwTC','2avVuis','2016846DASSap','20FbYSHO','18796mIrgmA','33036NPwMMu'];a95_0x163a=function(){return _0x17c7d7;};return a95_0x163a();}
1
+ (function(_0x11dcab,_0x2aecb3){const _0xa8baf6=a95_0x5f01,_0x31de20=_0x11dcab();while(!![]){try{const _0x1cc1b4=-parseInt(_0xa8baf6(0x157))/0x1+-parseInt(_0xa8baf6(0x15e))/0x2+parseInt(_0xa8baf6(0x159))/0x3*(parseInt(_0xa8baf6(0x15f))/0x4)+parseInt(_0xa8baf6(0x160))/0x5+parseInt(_0xa8baf6(0x15d))/0x6*(parseInt(_0xa8baf6(0x15c))/0x7)+-parseInt(_0xa8baf6(0x15b))/0x8*(-parseInt(_0xa8baf6(0x158))/0x9)+parseInt(_0xa8baf6(0x15a))/0xa;if(_0x1cc1b4===_0x2aecb3)break;else _0x31de20['push'](_0x31de20['shift']());}catch(_0x2c0890){_0x31de20['push'](_0x31de20['shift']());}}}(a95_0x5282,0xb842f));function a95_0x5f01(_0x36cbc4,_0x4baeb7){_0x36cbc4=_0x36cbc4-0x157;const _0x528295=a95_0x5282();let _0x5f016f=_0x528295[_0x36cbc4];return _0x5f016f;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a95_0x5282(){const _0x26ea98=['1608864qKyLjm','154064CvRkqa','2287905vfnIrL','1365880eFceXA','1314GEIqDh','3wZbeed','10033120ETKEHu','18752gpqHBF','1263983HJXzTY','36zLZquI'];a95_0x5282=function(){return _0x26ea98;};return a95_0x5282();}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Issue Report Nudge:当一条命令在用户视角"非预期失败"时,向 stderr 打印一行可复制的
3
+ * `<bin> issue report` 命令,引导用户把这次错误上报到平台。
4
+ *
5
+ * 触发规则:
6
+ * - 不 nudge:用户主动取消、缺参/校验/未知命令/auth/config/notInProject/network 这些
7
+ * 归因到"用户输入或用户环境"的错误。
8
+ * - nudge:`api_error` 与一切非 CliError 的 catch-all unexpected error,这两类最可能
9
+ * 是平台或 CLI 自身缺陷,正是 issue report 的目标素材。
10
+ * - 当前命令本身是 `issue report` 时跳过,避免上报失败时还提示用户用 issue report 上报。
11
+ * - 通过 `RABETBASE_DISABLE_ISSUE_NUDGE=1` 关闭,用于脚本化场景避免刷屏。
12
+ */
13
+ export declare const NUDGE_OPT_OUT_ENV = "RABETBASE_DISABLE_ISSUE_NUDGE";
14
+ export type NudgeCurrentCommand = {
15
+ service: string;
16
+ command: string;
17
+ };
18
+ /**
19
+ * 测试场景下也能注入自定义 writer,避免污染 stderr。
20
+ */
21
+ export type NudgeWriter = (chunk: string) => void;
22
+ export declare function shouldNudgeForError(err: unknown, currentCommand: NudgeCurrentCommand): boolean;
23
+ export declare function printIssueReportNudgeForError(err: unknown, currentCommand: NudgeCurrentCommand, writer?: NudgeWriter): void;
@@ -1 +1 @@
1
- const a96_0x26f66d=a96_0x34fa;(function(_0x4fe0c1,_0x1ebcbf){const _0x1bfc88=a96_0x34fa,_0x631550=_0x4fe0c1();while(!![]){try{const _0xc408c7=parseInt(_0x1bfc88(0x106))/0x1*(parseInt(_0x1bfc88(0x115))/0x2)+parseInt(_0x1bfc88(0x104))/0x3+-parseInt(_0x1bfc88(0x108))/0x4+parseInt(_0x1bfc88(0x109))/0x5*(-parseInt(_0x1bfc88(0x10d))/0x6)+parseInt(_0x1bfc88(0x10f))/0x7+-parseInt(_0x1bfc88(0x110))/0x8+parseInt(_0x1bfc88(0x102))/0x9;if(_0xc408c7===_0x1ebcbf)break;else _0x631550['push'](_0x631550['shift']());}catch(_0xdc7632){_0x631550['push'](_0x631550['shift']());}}}(a96_0x5038,0x2b680));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a96_0x26f66d(0x11e);const NUDGE_SUPPRESSED_CODES=new Set([a96_0x26f66d(0x10b),a96_0x26f66d(0x111),'config_missing',a96_0x26f66d(0x10e),'unknown_command',a96_0x26f66d(0x100),'validation_error','network_error']),defaultWriter=_0x49baf0=>{const _0x47a0ed=a96_0x26f66d;process[_0x47a0ed(0x103)]['write'](_0x49baf0);};export function shouldNudgeForError(_0x3f55bd,_0x590cc9){const _0x38d2fe=a96_0x26f66d;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x590cc9[_0x38d2fe(0x11b)]==='issue'&&_0x590cc9['command']===_0x38d2fe(0x10a))return![];if(_0x3f55bd instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x38d2fe(0x11c)](_0x3f55bd[_0x38d2fe(0x11f)]);return!![];}export function printIssueReportNudgeForError(_0x589b62,_0x42a7c1,_0xef2d6a=defaultWriter){if(!shouldNudgeForError(_0x589b62,_0x42a7c1))return;const _0x33d086=buildSuggestedTitle(_0x589b62,_0x42a7c1);_0xef2d6a(formatNudge(_0x33d086));}function a96_0x5038(){const _0x1695d0=['\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','574038fiIhwf','not_in_project','1541071FFgWwm','2065656AoJtAj','auth_required','\x20\x20\x20\x20--title\x20\x22','\x20\x20Set\x20','trim','50600ywkZFd','command','\x20issue\x20report\x20\x5c','Hit\x20a\x20','\x22\x20\x5c','replace','service','has','length','RABETBASE_DISABLE_ISSUE_NUDGE','code','=1\x20to\x20silence\x20this\x20hint.','flag_missing','\x20bug?\x20Help\x20us\x20fix\x20it:','1762740pGAMjr','stderr','515409FnrGmo','message','10aBKCnX','join','1236576jRwFFt','5VyqyDc','report','cancelled'];a96_0x5038=function(){return _0x1695d0;};return a96_0x5038();}function a96_0x34fa(_0x3d9268,_0x4229cf){_0x3d9268=_0x3d9268-0x100;const _0x5038d8=a96_0x5038();let _0x34fa02=_0x5038d8[_0x3d9268];return _0x34fa02;}function buildSuggestedTitle(_0x763703,_0x5951c5){const _0x38afed=a96_0x26f66d,_0x2167e7=_0x763703 instanceof Error?_0x763703[_0x38afed(0x105)]:String(_0x763703),_0x5d101c=_0x2167e7['replace'](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x38afed(0x114)]()['slice'](0x0,0x78)[_0x38afed(0x11a)](/"/g,'\x5c\x22'),_0x2f64ce=CLI_BIN_NAME+'\x20'+_0x5951c5[_0x38afed(0x11b)]+'\x20'+_0x5951c5[_0x38afed(0x116)];return _0x5d101c[_0x38afed(0x11d)]>0x0?_0x2f64ce+':\x20'+_0x5d101c:_0x2f64ce;}function formatNudge(_0x315f08){const _0x5c383e=a96_0x26f66d;return['',_0x5c383e(0x118)+CLI_BIN_NAME+_0x5c383e(0x101),'\x20\x20'+CLI_BIN_NAME+_0x5c383e(0x117),_0x5c383e(0x112)+_0x315f08+_0x5c383e(0x119),'\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0x5c383e(0x10c),_0x5c383e(0x113)+NUDGE_OPT_OUT_ENV+_0x5c383e(0x120),''][_0x5c383e(0x107)]('\x0a');}
1
+ function a96_0xee67(_0x445b08,_0x52b61c){_0x445b08=_0x445b08-0x10e;const _0xe57f47=a96_0xe57f();let _0xee67ce=_0xe57f47[_0x445b08];return _0xee67ce;}const a96_0x35ff73=a96_0xee67;(function(_0x52a356,_0x2c2cfd){const _0x29302c=a96_0xee67,_0x32b6dc=_0x52a356();while(!![]){try{const _0x44b871=-parseInt(_0x29302c(0x12b))/0x1+-parseInt(_0x29302c(0x11e))/0x2*(parseInt(_0x29302c(0x11b))/0x3)+-parseInt(_0x29302c(0x111))/0x4*(parseInt(_0x29302c(0x118))/0x5)+parseInt(_0x29302c(0x125))/0x6+-parseInt(_0x29302c(0x112))/0x7*(parseInt(_0x29302c(0x12e))/0x8)+-parseInt(_0x29302c(0x117))/0x9+parseInt(_0x29302c(0x12c))/0xa*(parseInt(_0x29302c(0x114))/0xb);if(_0x44b871===_0x2c2cfd)break;else _0x32b6dc['push'](_0x32b6dc['shift']());}catch(_0x3d261a){_0x32b6dc['push'](_0x32b6dc['shift']());}}}(a96_0xe57f,0xef6ac));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',a96_0x35ff73(0x123),a96_0x35ff73(0x129),'not_in_project','unknown_command','flag_missing',a96_0x35ff73(0x116),a96_0x35ff73(0x122)]),defaultWriter=_0x35a9a5=>{const _0x29aabc=a96_0x35ff73;process[_0x29aabc(0x127)]['write'](_0x35a9a5);};function a96_0xe57f(){const _0x4d3c7a=['network_error','auth_required','message','6928062fGZZvm','\x20bug?\x20Help\x20us\x20fix\x20it:','stderr','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','config_missing','Hit\x20a\x20','1714557sXuxcc','49942730wXHJuO','\x20\x20Set\x20','27992hICBZs','trim','report','code','command','1448seqsGp','749xliVBq','join','11msNewt','issue','validation_error','13785291gploIc','9655pBlVHb','=1\x20to\x20silence\x20this\x20hint.','replace','6753JIemeJ','length','\x20\x20\x20\x20--title\x20\x22','754KFDVNW','has','slice','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22'];a96_0xe57f=function(){return _0x4d3c7a;};return a96_0xe57f();}export function shouldNudgeForError(_0x2399fc,_0x16f745){const _0x43d598=a96_0x35ff73;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x16f745['service']===_0x43d598(0x115)&&_0x16f745['command']===_0x43d598(0x10e))return![];if(_0x2399fc instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x43d598(0x11f)](_0x2399fc[_0x43d598(0x10f)]);return!![];}export function printIssueReportNudgeForError(_0x4b70ae,_0x47bdb6,_0x3a0606=defaultWriter){if(!shouldNudgeForError(_0x4b70ae,_0x47bdb6))return;const _0x37220a=buildSuggestedTitle(_0x4b70ae,_0x47bdb6);_0x3a0606(formatNudge(_0x37220a));}function buildSuggestedTitle(_0x5c169d,_0x2f2945){const _0x517248=a96_0x35ff73,_0x3824da=_0x5c169d instanceof Error?_0x5c169d[_0x517248(0x124)]:String(_0x5c169d),_0x4414e1=_0x3824da['replace'](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x517248(0x12f)]()[_0x517248(0x120)](0x0,0x78)[_0x517248(0x11a)](/"/g,'\x5c\x22'),_0x4581a0=CLI_BIN_NAME+'\x20'+_0x2f2945['service']+'\x20'+_0x2f2945[_0x517248(0x110)];return _0x4414e1[_0x517248(0x11c)]>0x0?_0x4581a0+':\x20'+_0x4414e1:_0x4581a0;}function formatNudge(_0x4814b3){const _0x185566=a96_0x35ff73;return['',_0x185566(0x12a)+CLI_BIN_NAME+_0x185566(0x126),'\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x185566(0x11d)+_0x4814b3+'\x22\x20\x5c',_0x185566(0x121),_0x185566(0x128),_0x185566(0x12d)+NUDGE_OPT_OUT_ENV+_0x185566(0x119),''][_0x185566(0x113)]('\x0a');}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const issueReport: CommandDefinition;
@@ -1 +1 @@
1
- function a97_0x2f09(){const _0x5dfb0d=['descriptionSource:\x20','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Platform\x20issue\x20reported\x20(','\x20secret(s):\x20','descriptionFile:\x20','One-line\x20issue\x20summary','validation','3128752lacLah','Platform\x20issue\x20reported','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','issue.description','POST','sanitize','file','Issue\x20description\x20cannot\x20be\x20empty.','description-file','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','redactions:\x20','str','issue.description_truncated','apiError','Failed\x20to\x20report\x20platform\x20issue:\x20','issue.title','inline','issue.description_redaction_kinds','1684178OUUmNf','110BjjRJj','truncated','title','message','descriptionFilePath','3LpfSVm','\x20bytes','originalBytes','redactionKinds','Issue\x20description\x20file\x20is\x20empty:\x20','utf8','460656azuaOy','join','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','cwd','filter','descriptionSource','File\x20not\x20found:\x20','otel://','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','trim','length','compress','766759waPHEZ','redactionCount','truncated:\x20original\x20','36mLioYE','description','write','push','2712xCUNlJ','flagMissing','10674SpMqjy','2683700jnQNiB','issue','190542OfMzkQ','string'];a97_0x2f09=function(){return _0x5dfb0d;};return a97_0x2f09();}const a97_0x16c929=a97_0x2800;(function(_0x4412ec,_0x10b1d0){const _0x2e39fc=a97_0x2800,_0x4baf41=_0x4412ec();while(!![]){try{const _0x3d6feb=parseInt(_0x2e39fc(0x209))/0x1+-parseInt(_0x2e39fc(0x1fd))/0x2*(-parseInt(_0x2e39fc(0x203))/0x3)+-parseInt(_0x2e39fc(0x1eb))/0x4+-parseInt(_0x2e39fc(0x221))/0x5+-parseInt(_0x2e39fc(0x21a))/0x6*(-parseInt(_0x2e39fc(0x217))/0x7)+-parseInt(_0x2e39fc(0x21e))/0x8*(parseInt(_0x2e39fc(0x220))/0x9)+parseInt(_0x2e39fc(0x1fe))/0xa*(parseInt(_0x2e39fc(0x223))/0xb);if(_0x3d6feb===_0x10b1d0)break;else _0x4baf41['push'](_0x4baf41['shift']());}catch(_0x10640d){_0x4baf41['push'](_0x4baf41['shift']());}}}(a97_0x2f09,0x68dd7));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';function a97_0x2800(_0x6eef1,_0x52c6e0){_0x6eef1=_0x6eef1-0x1e4;const _0x2f0909=a97_0x2f09();let _0x2800d8=_0x2f0909[_0x6eef1];return _0x2800d8;}import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a97_0x16c929(0x1f3);export const issueReport={'service':a97_0x16c929(0x222),'command':'report','description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a97_0x16c929(0x21c),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a97_0x16c929(0x216),'flags':[{'name':a97_0x16c929(0x200),'type':a97_0x16c929(0x224),'required':!![],'description':a97_0x16c929(0x1e9)},{'name':a97_0x16c929(0x21b),'type':a97_0x16c929(0x224),'description':a97_0x16c929(0x1e5)},{'name':DESCRIPTION_FILE_FLAG,'type':a97_0x16c929(0x224),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x531511){const _0xbbed0=a97_0x16c929,_0x4b0691=_0x531511[_0xbbed0(0x1f6)](_0xbbed0(0x200))['trim'](),_0x2c3c99=_0x531511[_0xbbed0(0x1f6)]('description')[_0xbbed0(0x214)](),_0x354024=_0x531511[_0xbbed0(0x1f6)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x4b0691)throw CliErrors[_0xbbed0(0x21f)](_0xbbed0(0x200),_0xbbed0(0x1f4));const _0x2fd275=_0x2c3c99['length']>0x0,_0xb40df5=_0x354024[_0xbbed0(0x215)]>0x0;if(_0x2fd275===_0xb40df5)throw CliErrors[_0xbbed0(0x1ea)](_0xbbed0(0x211),_0xbbed0(0x20b));if(_0xb40df5){const _0x7976f=resolve(process[_0xbbed0(0x20c)](),_0x354024);if(!existsSync(_0x7976f))throw CliErrors[_0xbbed0(0x1ea)](_0xbbed0(0x20f)+_0x7976f);}},async 'dryRun'(_0x59032c){const _0xa2c6c6=a97_0x16c929,_0x3b593f=await prepareIssueReport(_0x59032c);return{'method':_0xa2c6c6(0x1ef),'url':_0xa2c6c6(0x210)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x3b593f[_0xa2c6c6(0x200)],'issue.description':_0x3b593f[_0xa2c6c6(0x21b)],'issue.description_original_bytes':_0x3b593f[_0xa2c6c6(0x1f0)][_0xa2c6c6(0x205)],'issue.description_truncated':_0x3b593f['sanitize'][_0xa2c6c6(0x1ff)],'issue.description_redactions':_0x3b593f[_0xa2c6c6(0x1f0)][_0xa2c6c6(0x218)],'issue.description_redaction_kinds':_0x3b593f[_0xa2c6c6(0x1f0)]['redactionKinds'][_0xa2c6c6(0x20a)](',')}},'description':[_0xa2c6c6(0x1ed),_0xa2c6c6(0x1e4)+_0x3b593f[_0xa2c6c6(0x20e)],_0x3b593f['descriptionFilePath']?_0xa2c6c6(0x1e8)+_0x3b593f[_0xa2c6c6(0x202)]:null,_0x3b593f['sanitize'][_0xa2c6c6(0x1ff)]?_0xa2c6c6(0x219)+_0x3b593f[_0xa2c6c6(0x1f0)][_0xa2c6c6(0x205)]+_0xa2c6c6(0x204):null,_0x3b593f['sanitize'][_0xa2c6c6(0x218)]>0x0?_0xa2c6c6(0x1f5)+_0x3b593f[_0xa2c6c6(0x1f0)][_0xa2c6c6(0x218)]+'\x20('+_0x3b593f[_0xa2c6c6(0x1f0)][_0xa2c6c6(0x206)][_0xa2c6c6(0x20a)](',\x20')+')':null][_0xa2c6c6(0x20d)](Boolean)['join']('\x0a')};},async 'execute'(_0x432dc2){const _0x403b30=a97_0x16c929,_0x2015c1=await prepareIssueReport(_0x432dc2);try{await sendPlatformIssueCollectLog({'title':_0x2015c1[_0x403b30(0x200)],'description':_0x2015c1[_0x403b30(0x21b)],'sanitize':{'originalBytes':_0x2015c1[_0x403b30(0x1f0)][_0x403b30(0x205)],'truncated':_0x2015c1[_0x403b30(0x1f0)][_0x403b30(0x1ff)],'redactionCount':_0x2015c1[_0x403b30(0x1f0)][_0x403b30(0x218)],'redactionKinds':_0x2015c1[_0x403b30(0x1f0)][_0x403b30(0x206)]}});}catch(_0x4851b2){throw CliErrors[_0x403b30(0x1f8)](_0x403b30(0x1f9)+(_0x4851b2 instanceof Error?_0x4851b2[_0x403b30(0x201)]:String(_0x4851b2)),_0x403b30(0x213));}return{'ok':!![],'message':buildResultMessage(_0x2015c1['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x403b30(0x1fa),_0x403b30(0x1ee),'issue.description_original_bytes',_0x403b30(0x1f7),'issue.description_redactions',_0x403b30(0x1fc)],'issue':{'title':_0x2015c1[_0x403b30(0x200)],'descriptionLength':_0x2015c1['description'][_0x403b30(0x215)],'descriptionSource':_0x2015c1['descriptionSource'],..._0x2015c1[_0x403b30(0x202)]?{'descriptionFile':_0x2015c1[_0x403b30(0x202)]}:{},'sanitize':{'originalBytes':_0x2015c1[_0x403b30(0x1f0)]['originalBytes'],'truncated':_0x2015c1['sanitize'][_0x403b30(0x1ff)],'redactions':_0x2015c1[_0x403b30(0x1f0)]['redactionCount'],'redactionKinds':_0x2015c1[_0x403b30(0x1f0)][_0x403b30(0x206)]}}}};}};function buildResultMessage(_0x50c472){const _0x1c98dc=a97_0x16c929,_0x59ea5a=[];return _0x50c472[_0x1c98dc(0x1ff)]&&_0x59ea5a[_0x1c98dc(0x21d)]('truncated\x20from\x20'+_0x50c472[_0x1c98dc(0x205)]+'\x20bytes'),_0x50c472[_0x1c98dc(0x218)]>0x0&&_0x59ea5a[_0x1c98dc(0x21d)]('redacted\x20'+_0x50c472[_0x1c98dc(0x218)]+_0x1c98dc(0x1e7)+_0x50c472[_0x1c98dc(0x206)][_0x1c98dc(0x20a)](',\x20')),_0x59ea5a[_0x1c98dc(0x215)]===0x0?_0x1c98dc(0x1ec):_0x1c98dc(0x1e6)+_0x59ea5a[_0x1c98dc(0x20a)](';\x20')+')';}async function prepareIssueReport(_0x2203dd){const _0x43686d=a97_0x16c929,_0x1d6b5b=_0x2203dd[_0x43686d(0x1f6)](_0x43686d(0x200))[_0x43686d(0x214)](),_0x28326c=_0x2203dd[_0x43686d(0x1f6)](_0x43686d(0x21b)),_0x3dd704=_0x2203dd[_0x43686d(0x1f6)](DESCRIPTION_FILE_FLAG)[_0x43686d(0x214)]();if(!_0x3dd704){const _0x5755e4=_0x28326c;if(!_0x5755e4['trim']())throw CliErrors[_0x43686d(0x1ea)](_0x43686d(0x1f2),_0x43686d(0x212));const _0x58c9c4=sanitizeIssueDescription(_0x5755e4);return{'title':_0x1d6b5b,'description':_0x58c9c4[_0x43686d(0x21b)],'descriptionSource':_0x43686d(0x1fb),'sanitize':_0x58c9c4};}const _0x490ae1=resolve(process[_0x43686d(0x20c)](),_0x3dd704),_0x232843=await readFile(_0x490ae1,_0x43686d(0x208));if(!_0x232843[_0x43686d(0x214)]())throw CliErrors[_0x43686d(0x1ea)](_0x43686d(0x207)+_0x490ae1,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x47be76=sanitizeIssueDescription(_0x232843);return{'title':_0x1d6b5b,'description':_0x47be76[_0x43686d(0x21b)],'descriptionSource':_0x43686d(0x1f1),'descriptionFilePath':_0x490ae1,'sanitize':_0x47be76};}
1
+ const a97_0x4baaeb=a97_0x31a4;(function(_0x165894,_0x3b79e2){const _0x1fd538=a97_0x31a4,_0x1741cb=_0x165894();while(!![]){try{const _0x445247=-parseInt(_0x1fd538(0x148))/0x1+-parseInt(_0x1fd538(0x154))/0x2+parseInt(_0x1fd538(0x160))/0x3+-parseInt(_0x1fd538(0x12f))/0x4*(parseInt(_0x1fd538(0x15f))/0x5)+parseInt(_0x1fd538(0x135))/0x6*(parseInt(_0x1fd538(0x13e))/0x7)+parseInt(_0x1fd538(0x14b))/0x8+parseInt(_0x1fd538(0x14a))/0x9;if(_0x445247===_0x3b79e2)break;else _0x1741cb['push'](_0x1741cb['shift']());}catch(_0x20c8cb){_0x1741cb['push'](_0x1741cb['shift']());}}}(a97_0x4a8e,0x3996f));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':a97_0x4baaeb(0x151),'command':a97_0x4baaeb(0x144),'description':a97_0x4baaeb(0x140),'risk':a97_0x4baaeb(0x155),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a97_0x4baaeb(0x161),'flags':[{'name':a97_0x4baaeb(0x143),'type':a97_0x4baaeb(0x147),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':'description','type':a97_0x4baaeb(0x147),'description':a97_0x4baaeb(0x14c)},{'name':DESCRIPTION_FILE_FLAG,'type':a97_0x4baaeb(0x147),'description':a97_0x4baaeb(0x13d)}],async 'validate'(_0x5cfa8f){const _0x210233=a97_0x4baaeb,_0x17c679=_0x5cfa8f[_0x210233(0x13a)](_0x210233(0x143))['trim'](),_0x316f6f=_0x5cfa8f[_0x210233(0x13a)]('description')['trim'](),_0x2e36a6=_0x5cfa8f['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x17c679)throw CliErrors['flagMissing'](_0x210233(0x143),_0x210233(0x145));const _0x54ed51=_0x316f6f[_0x210233(0x158)]>0x0,_0x140863=_0x2e36a6[_0x210233(0x158)]>0x0;if(_0x54ed51===_0x140863)throw CliErrors[_0x210233(0x153)](_0x210233(0x15b),_0x210233(0x137));if(_0x140863){const _0x5c252f=resolve(process['cwd'](),_0x2e36a6);if(!existsSync(_0x5c252f))throw CliErrors[_0x210233(0x153)]('File\x20not\x20found:\x20'+_0x5c252f);}},async 'dryRun'(_0x6508db){const _0x174d1c=a97_0x4baaeb,_0x1045be=await prepareIssueReport(_0x6508db);return{'method':_0x174d1c(0x136),'url':_0x174d1c(0x134)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x1045be[_0x174d1c(0x143)],'issue.description':_0x1045be['description'],'issue.description_original_bytes':_0x1045be[_0x174d1c(0x141)][_0x174d1c(0x15c)],'issue.description_truncated':_0x1045be['sanitize']['truncated'],'issue.description_redactions':_0x1045be[_0x174d1c(0x141)][_0x174d1c(0x132)],'issue.description_redaction_kinds':_0x1045be[_0x174d1c(0x141)][_0x174d1c(0x156)][_0x174d1c(0x146)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionSource:\x20'+_0x1045be['descriptionSource'],_0x1045be[_0x174d1c(0x14e)]?_0x174d1c(0x150)+_0x1045be[_0x174d1c(0x14e)]:null,_0x1045be['sanitize'][_0x174d1c(0x130)]?'truncated:\x20original\x20'+_0x1045be['sanitize'][_0x174d1c(0x15c)]+_0x174d1c(0x168):null,_0x1045be[_0x174d1c(0x141)][_0x174d1c(0x132)]>0x0?_0x174d1c(0x159)+_0x1045be[_0x174d1c(0x141)]['redactionCount']+'\x20('+_0x1045be['sanitize'][_0x174d1c(0x156)]['join'](',\x20')+')':null]['filter'](Boolean)['join']('\x0a')};},async 'execute'(_0x120f7a){const _0x457919=a97_0x4baaeb,_0x1d2842=await prepareIssueReport(_0x120f7a);try{await sendPlatformIssueCollectLog({'title':_0x1d2842[_0x457919(0x143)],'description':_0x1d2842[_0x457919(0x15a)],'sanitize':{'originalBytes':_0x1d2842['sanitize'][_0x457919(0x15c)],'truncated':_0x1d2842['sanitize'][_0x457919(0x130)],'redactionCount':_0x1d2842[_0x457919(0x141)]['redactionCount'],'redactionKinds':_0x1d2842[_0x457919(0x141)][_0x457919(0x156)]}});}catch(_0x3fd3b2){throw CliErrors[_0x457919(0x14d)](_0x457919(0x152)+(_0x3fd3b2 instanceof Error?_0x3fd3b2[_0x457919(0x165)]:String(_0x3fd3b2)),_0x457919(0x14f));}return{'ok':!![],'message':buildResultMessage(_0x1d2842[_0x457919(0x141)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x457919(0x163),_0x457919(0x166),_0x457919(0x162),_0x457919(0x13b),_0x457919(0x13c),'issue.description_redaction_kinds'],'issue':{'title':_0x1d2842[_0x457919(0x143)],'descriptionLength':_0x1d2842['description']['length'],'descriptionSource':_0x1d2842[_0x457919(0x13f)],..._0x1d2842[_0x457919(0x14e)]?{'descriptionFile':_0x1d2842[_0x457919(0x14e)]}:{},'sanitize':{'originalBytes':_0x1d2842[_0x457919(0x141)][_0x457919(0x15c)],'truncated':_0x1d2842[_0x457919(0x141)][_0x457919(0x130)],'redactions':_0x1d2842[_0x457919(0x141)][_0x457919(0x132)],'redactionKinds':_0x1d2842[_0x457919(0x141)]['redactionKinds']}}}};}};function buildResultMessage(_0xefef56){const _0x2616c6=a97_0x4baaeb,_0x4f0edb=[];return _0xefef56[_0x2616c6(0x130)]&&_0x4f0edb['push'](_0x2616c6(0x157)+_0xefef56[_0x2616c6(0x15c)]+_0x2616c6(0x168)),_0xefef56[_0x2616c6(0x132)]>0x0&&_0x4f0edb[_0x2616c6(0x149)](_0x2616c6(0x167)+_0xefef56[_0x2616c6(0x132)]+_0x2616c6(0x131)+_0xefef56[_0x2616c6(0x156)][_0x2616c6(0x146)](',\x20')),_0x4f0edb[_0x2616c6(0x158)]===0x0?'Platform\x20issue\x20reported':_0x2616c6(0x15d)+_0x4f0edb[_0x2616c6(0x146)](';\x20')+')';}function a97_0x31a4(_0x44a563,_0x314b03){_0x44a563=_0x44a563-0x12f;const _0x4a8ef3=a97_0x4a8e();let _0x31a442=_0x4a8ef3[_0x44a563];return _0x31a442;}async function prepareIssueReport(_0x4233c1){const _0x1ffee4=a97_0x4baaeb,_0x32a2be=_0x4233c1[_0x1ffee4(0x13a)]('title')[_0x1ffee4(0x15e)](),_0x24d700=_0x4233c1['str'](_0x1ffee4(0x15a)),_0x536d56=_0x4233c1[_0x1ffee4(0x13a)](DESCRIPTION_FILE_FLAG)[_0x1ffee4(0x15e)]();if(!_0x536d56){const _0x38ba18=_0x24d700;if(!_0x38ba18['trim']())throw CliErrors[_0x1ffee4(0x153)]('Issue\x20description\x20cannot\x20be\x20empty.','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x5d7343=sanitizeIssueDescription(_0x38ba18);return{'title':_0x32a2be,'description':_0x5d7343[_0x1ffee4(0x15a)],'descriptionSource':_0x1ffee4(0x138),'sanitize':_0x5d7343};}const _0x2c7c53=resolve(process[_0x1ffee4(0x142)](),_0x536d56),_0x5dadce=await readFile(_0x2c7c53,_0x1ffee4(0x139));if(!_0x5dadce['trim']())throw CliErrors[_0x1ffee4(0x153)](_0x1ffee4(0x164)+_0x2c7c53,_0x1ffee4(0x133));const _0x14f4ef=sanitizeIssueDescription(_0x5dadce);return{'title':_0x32a2be,'description':_0x14f4ef[_0x1ffee4(0x15a)],'descriptionSource':_0x1ffee4(0x169),'descriptionFilePath':_0x2c7c53,'sanitize':_0x14f4ef};}function a97_0x4a8e(){const _0x439f95=['descriptionSource','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','sanitize','cwd','title','report','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','join','string','300595tBYeHn','push','10413549MeKbWD','1477800ugcEzu','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','apiError','descriptionFilePath','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','descriptionFile:\x20','issue','Failed\x20to\x20report\x20platform\x20issue:\x20','validation','927550CtKxPk','write','redactionKinds','truncated\x20from\x20','length','redactions:\x20','description','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','originalBytes','Platform\x20issue\x20reported\x20(','trim','1107235vLGNie','14742lWSQes','compress','issue.description_original_bytes','issue.title','Issue\x20description\x20file\x20is\x20empty:\x20','message','issue.description','redacted\x20','\x20bytes','file','8GFbJmv','truncated','\x20secret(s):\x20','redactionCount','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','otel://','578706GsxOdx','POST','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','inline','utf8','str','issue.description_truncated','issue.description_redactions','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','7VPRnDJ'];a97_0x4a8e=function(){return _0x439f95;};return a97_0x4a8e();}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * 对 `issue.description` 的卫生处理:截断超长 + 替换敏感片段,**永不拒绝**。
3
+ * 设计取向是“宁可 redact 也要让 issue 送达” —— issue 上报场景本身就是兜底通路,
4
+ * 用户在登录失败 / Cookie 过期等异常下提交错误日志的概率最高,敏感关键字命中率天然高,
5
+ * 若 reject 会让用户直接放弃上报,宿主侧也丢失观测。
6
+ *
7
+ * 卫生处理结果(截断与替换次数等)会作为 attribute 一并上报,方便运维侧统计与回放。
8
+ */
9
+ export declare const ISSUE_DESCRIPTION_MAX_BYTES: number;
10
+ export type SanitizeIssueDescriptionResult = {
11
+ /** 已清洗、可直接上报的 description 文本 */
12
+ description: string;
13
+ /** 入参原始字节长度(UTF-8) */
14
+ originalBytes: number;
15
+ /** 是否因超过 {@link ISSUE_DESCRIPTION_MAX_BYTES} 被截断 */
16
+ truncated: boolean;
17
+ /** 命中的敏感片段总次数 */
18
+ redactionCount: number;
19
+ /** 命中过的敏感类别(去重、保持声明顺序) */
20
+ redactionKinds: string[];
21
+ };
22
+ /**
23
+ * 对 issue description 做体积截断 + 敏感片段替换。
24
+ *
25
+ * - 永不抛错、永不拒绝;上层应直接使用返回的 `description`。
26
+ * - 卫生处理结果通过 `truncated` / `redactionCount` / `redactionKinds` 暴露,
27
+ * 建议作为 `issue.description_*` attribute 上报,以便运维统计。
28
+ *
29
+ * 旁路:若 `RABETBASE_ISSUE_RAW_DESCRIPTION=1`,跳过 redact 但仍执行 size 截断
30
+ * (体积保护是后端成本/截断风险,不允许绕过)。
31
+ */
32
+ export declare function sanitizeIssueDescription(input: string): SanitizeIssueDescriptionResult;
@@ -1 +1 @@
1
- function a98_0x460b(){const _0x306d7d=['228XobqBz','password','REDACTED:cookie','from','description','50kOUKtp','6697712hHUGFx','includes','REDACTED:password','REDACTED:bearer-jwt','bearer-jwt','140520BGneVM','private-key','kind','authorization','cookie','REDACTED:private-key','byteLength','1322536KHywZq','subarray','pattern','34670273SDglgh','slice','10uPhNdj','REDACTED:access-key','replace','push','toString','17424ZMiUVA','length','max','251510CSczPW','REDACTED:authorization','1386825vsLnjB','restore','utf8','72Puienn','__RB_OSS_ID_'];a98_0x460b=function(){return _0x306d7d;};return a98_0x460b();}const a98_0x1091ce=a98_0x38ef;(function(_0xff1e17,_0x2e35d2){const _0x4746dd=a98_0x38ef,_0x763b5=_0xff1e17();while(!![]){try{const _0x34f11d=parseInt(_0x4746dd(0x10f))/0x1+parseInt(_0x4746dd(0x114))/0x2*(-parseInt(_0x4746dd(0x10a))/0x3)+parseInt(_0x4746dd(0x11a))/0x4+parseInt(_0x4746dd(0x119))/0x5*(parseInt(_0x4746dd(0x11f))/0x6)+parseInt(_0x4746dd(0x10d))/0x7+parseInt(_0x4746dd(0x100))/0x8*(parseInt(_0x4746dd(0x112))/0x9)+parseInt(_0x4746dd(0x105))/0xa*(-parseInt(_0x4746dd(0x103))/0xb);if(_0x34f11d===_0x2e35d2)break;else _0x763b5['push'](_0x763b5['shift']());}catch(_0x1eec3a){_0x763b5['push'](_0x763b5['shift']());}}}(a98_0x460b,0xcd11c));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a98_0x1091ce(0x123),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a98_0x1091ce(0x116)},{'kind':a98_0x1091ce(0x122),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a98_0x1091ce(0x10e)},{'kind':a98_0x1091ce(0x120),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a98_0x1091ce(0x124)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a98_0x1091ce(0x106)},{'kind':a98_0x1091ce(0x115),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a98_0x1091ce(0x11c)},{'kind':a98_0x1091ce(0x11e),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a98_0x1091ce(0x11d)}];export function sanitizeIssueDescription(_0xfed03e){const _0xb16f18=a98_0x1091ce,_0x1c8b31=Buffer['byteLength'](_0xfed03e,_0xb16f18(0x111)),_0x48b01e=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x4d0611=_0xfed03e,_0x3fe909=0x0;const _0x4d2738=[];if(!_0x48b01e){const _0x1259a3=protectOssAccessKeyIds(_0x4d0611);_0x4d0611=_0x1259a3[_0xb16f18(0x118)];for(const _0x3ff51e of REDACTION_RULES){let _0x392b84=0x0;_0x4d0611=_0x4d0611[_0xb16f18(0x107)](_0x3ff51e[_0xb16f18(0x102)],(_0x1382b7,_0x5123fc)=>{_0x392b84+=0x1;const _0x3a2a8e=typeof _0x5123fc==='string'?_0x5123fc:'';return _0x3a2a8e+'['+_0x3ff51e['label']+']';}),_0x392b84>0x0&&(_0x3fe909+=_0x392b84,!_0x4d2738[_0xb16f18(0x11b)](_0x3ff51e['kind'])&&_0x4d2738['push'](_0x3ff51e[_0xb16f18(0x121)]));}_0x4d0611=_0x1259a3[_0xb16f18(0x110)](_0x4d0611);}let _0x4dded5=![];if(Buffer[_0xb16f18(0xff)](_0x4d0611,_0xb16f18(0x111))>ISSUE_DESCRIPTION_MAX_BYTES){_0x4dded5=!![];const _0x334f1c=Buffer[_0xb16f18(0xff)](TRUNCATION_NOTICE,_0xb16f18(0x111)),_0x232831=Math[_0xb16f18(0x10c)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x334f1c);_0x4d0611=sliceUtf8Bytes(_0x4d0611,_0x232831)+TRUNCATION_NOTICE;}return{'description':_0x4d0611,'originalBytes':_0x1c8b31,'truncated':_0x4dded5,'redactionCount':_0x3fe909,'redactionKinds':_0x4d2738};}function a98_0x38ef(_0x44035b,_0x326316){_0x44035b=_0x44035b-0xff;const _0x460b85=a98_0x460b();let _0x38ef4c=_0x460b85[_0x44035b];return _0x38ef4c;}function protectOssAccessKeyIds(_0x595b3c){const _0xa6dfce=a98_0x1091ce,_0x15b615=[],_0xe96440=_0x595b3c[_0xa6dfce(0x107)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x583d73,_0x1cd861)=>{const _0x13eb21=_0xa6dfce,_0x385d09=_0x15b615[_0x13eb21(0x108)](_0x583d73[_0x13eb21(0x104)](_0x1cd861[_0x13eb21(0x10b)]))-0x1;return _0x1cd861+_0x13eb21(0x113)+_0x385d09+'__';});return{'description':_0xe96440,'restore':_0x3627ae=>_0x3627ae[_0xa6dfce(0x107)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x59905e,_0x2d5460,_0x292f57)=>{const _0x2d62de=_0x15b615[Number(_0x292f57)];return _0x2d62de===undefined?_0x59905e:''+_0x2d5460+_0x2d62de;})};}function sliceUtf8Bytes(_0x3d3b9e,_0x5ee18b){const _0x3bd1ff=a98_0x1091ce;if(_0x5ee18b<=0x0)return'';const _0xed69fa=Buffer[_0x3bd1ff(0x117)](_0x3d3b9e,_0x3bd1ff(0x111));if(_0xed69fa['byteLength']<=_0x5ee18b)return _0x3d3b9e;let _0x561821=_0x5ee18b;while(_0x561821>0x0){const _0x462217=_0xed69fa[_0x561821];if(_0x462217===undefined||(_0x462217&0xc0)!==0x80)break;_0x561821-=0x1;}return _0xed69fa[_0x3bd1ff(0x101)](0x0,_0x561821)[_0x3bd1ff(0x109)](_0x3bd1ff(0x111));}
1
+ function a98_0x5ed9(){const _0x2ce1ff=['__RB_OSS_ID_','slice','12WGRZwf','94128uAdfGP','length','replace','REDACTED:access-key','access-key','pattern','REDACTED:cookie','string','byteLength','46127rAkyXI','bearer-jwt','251944xSYLio','8zxaNgm','REDACTED:authorization','cookie','REDACTED:private-key','kind','restore','push','includes','557578weXgQg','9243BxxNZL','label','utf8','910340QcNbMh','7780RhCHTS','REDACTED:password','560742aqZill'];a98_0x5ed9=function(){return _0x2ce1ff;};return a98_0x5ed9();}const a98_0x2cee63=a98_0x599a;(function(_0xb8242c,_0x1d2156){const _0x445fb2=a98_0x599a,_0x2b3997=_0xb8242c();while(!![]){try{const _0x1755ef=-parseInt(_0x445fb2(0x147))/0x1+-parseInt(_0x445fb2(0x149))/0x2+parseInt(_0x445fb2(0x159))/0x3+parseInt(_0x445fb2(0x14a))/0x4*(-parseInt(_0x445fb2(0x156))/0x5)+parseInt(_0x445fb2(0x15c))/0x6*(-parseInt(_0x445fb2(0x152))/0x7)+-parseInt(_0x445fb2(0x15d))/0x8+-parseInt(_0x445fb2(0x153))/0x9*(-parseInt(_0x445fb2(0x157))/0xa);if(_0x1755ef===_0x1d2156)break;else _0x2b3997['push'](_0x2b3997['shift']());}catch(_0x1bafdb){_0x2b3997['push'](_0x2b3997['shift']());}}}(a98_0x5ed9,0x44053));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a98_0x2cee63(0x14c),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a98_0x2cee63(0x163)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a98_0x2cee63(0x14b)},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a98_0x2cee63(0x14d)},{'kind':a98_0x2cee63(0x161),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a98_0x2cee63(0x160)},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a98_0x2cee63(0x158)},{'kind':a98_0x2cee63(0x148),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':'REDACTED:bearer-jwt'}];export function sanitizeIssueDescription(_0x562914){const _0x18e7c5=a98_0x2cee63,_0x1f6383=Buffer['byteLength'](_0x562914,_0x18e7c5(0x155)),_0x4a3c55=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3777cf=_0x562914,_0x2966d6=0x0;const _0x98a976=[];if(!_0x4a3c55){const _0x5d1acb=protectOssAccessKeyIds(_0x3777cf);_0x3777cf=_0x5d1acb['description'];for(const _0x55bc7a of REDACTION_RULES){let _0x447a8a=0x0;_0x3777cf=_0x3777cf['replace'](_0x55bc7a[_0x18e7c5(0x162)],(_0x2717da,_0x375b66)=>{const _0x21a871=_0x18e7c5;_0x447a8a+=0x1;const _0x525338=typeof _0x375b66===_0x21a871(0x164)?_0x375b66:'';return _0x525338+'['+_0x55bc7a[_0x21a871(0x154)]+']';}),_0x447a8a>0x0&&(_0x2966d6+=_0x447a8a,!_0x98a976[_0x18e7c5(0x151)](_0x55bc7a[_0x18e7c5(0x14e)])&&_0x98a976['push'](_0x55bc7a[_0x18e7c5(0x14e)]));}_0x3777cf=_0x5d1acb[_0x18e7c5(0x14f)](_0x3777cf);}let _0x3f321c=![];if(Buffer[_0x18e7c5(0x146)](_0x3777cf,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x3f321c=!![];const _0x834ab9=Buffer['byteLength'](TRUNCATION_NOTICE,_0x18e7c5(0x155)),_0xe684e6=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x834ab9);_0x3777cf=sliceUtf8Bytes(_0x3777cf,_0xe684e6)+TRUNCATION_NOTICE;}return{'description':_0x3777cf,'originalBytes':_0x1f6383,'truncated':_0x3f321c,'redactionCount':_0x2966d6,'redactionKinds':_0x98a976};}function a98_0x599a(_0x1ffcc0,_0x44a383){_0x1ffcc0=_0x1ffcc0-0x146;const _0x5ed94f=a98_0x5ed9();let _0x599adb=_0x5ed94f[_0x1ffcc0];return _0x599adb;}function protectOssAccessKeyIds(_0x3169eb){const _0x2ee54a=a98_0x2cee63,_0x403d41=[],_0x305239=_0x3169eb[_0x2ee54a(0x15f)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x400182,_0x4797d5)=>{const _0x40235e=_0x2ee54a,_0x2c6aa2=_0x403d41[_0x40235e(0x150)](_0x400182[_0x40235e(0x15b)](_0x4797d5[_0x40235e(0x15e)]))-0x1;return _0x4797d5+_0x40235e(0x15a)+_0x2c6aa2+'__';});return{'description':_0x305239,'restore':_0x1a9d4e=>_0x1a9d4e[_0x2ee54a(0x15f)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0xe6125,_0x5034b5,_0x202661)=>{const _0x2971e0=_0x403d41[Number(_0x202661)];return _0x2971e0===undefined?_0xe6125:''+_0x5034b5+_0x2971e0;})};}function sliceUtf8Bytes(_0x4921eb,_0xf0d85b){const _0x970d1b=a98_0x2cee63;if(_0xf0d85b<=0x0)return'';const _0x250483=Buffer['from'](_0x4921eb,_0x970d1b(0x155));if(_0x250483[_0x970d1b(0x146)]<=_0xf0d85b)return _0x4921eb;let _0x25e305=_0xf0d85b;while(_0x25e305>0x0){const _0x334971=_0x250483[_0x25e305];if(_0x334971===undefined||(_0x334971&0xc0)!==0x80)break;_0x25e305-=0x1;}return _0x250483['subarray'](0x0,_0x25e305)['toString'](_0x970d1b(0x155));}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const kbCreate: CommandDefinition;
@@ -1 +1 @@
1
- const a99_0x4dc7a7=a99_0x56c5;(function(_0x364716,_0x4e8724){const _0x41b33f=a99_0x56c5,_0x3afe87=_0x364716();while(!![]){try{const _0x276e3e=-parseInt(_0x41b33f(0x14b))/0x1+parseInt(_0x41b33f(0x15c))/0x2+-parseInt(_0x41b33f(0x151))/0x3*(-parseInt(_0x41b33f(0x14a))/0x4)+parseInt(_0x41b33f(0x14f))/0x5*(-parseInt(_0x41b33f(0x147))/0x6)+-parseInt(_0x41b33f(0x14e))/0x7*(-parseInt(_0x41b33f(0x163))/0x8)+-parseInt(_0x41b33f(0x150))/0x9+-parseInt(_0x41b33f(0x15f))/0xa*(-parseInt(_0x41b33f(0x165))/0xb);if(_0x276e3e===_0x4e8724)break;else _0x3afe87['push'](_0x3afe87['shift']());}catch(_0x278101){_0x3afe87['push'](_0x3afe87['shift']());}}}(a99_0x2b33,0x1f97a));function a99_0x56c5(_0x2030b7,_0xa7221f){_0x2030b7=_0x2030b7-0x144;const _0x2b3309=a99_0x2b33();let _0x56c509=_0x2b3309[_0x2030b7];return _0x56c509;}import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a99_0x4dc7a7(0x14c);function readCreateInput(_0x2f34d1){const _0x40d043=a99_0x4dc7a7,_0x4185b1=_0x2f34d1[_0x40d043(0x173)]('title')[_0x40d043(0x15a)]();if(!_0x4185b1)throw kbError(_0x40d043(0x171),_0x40d043(0x157));const _0x2951dc=_0x2f34d1[_0x40d043(0x173)]('file')[_0x40d043(0x15a)]();if(!_0x2951dc)throw kbError(_0x40d043(0x172),_0x40d043(0x167),'Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.');return{'title':_0x4185b1,'file':_0x2951dc};}async function prepareCreate(_0xa001bd){const _0x1c95e8=a99_0x4dc7a7,_0x38457b=readCreateInput(_0xa001bd),_0xd8e86e=await readKbFile(_0x38457b[_0x1c95e8(0x158)]),_0x129f39=await fetchAllCompanyKnowledgeBases(_0xa001bd,{'title':_0x38457b[_0x1c95e8(0x160)]}),_0x5ee299=findExactCompanyKnowledgeBases(_0x129f39,_0xa001bd[_0x1c95e8(0x161)],_0x38457b['title']);if(_0x5ee299[_0x1c95e8(0x149)]>0x0)throw kbError('kb_already_exists','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0xa001bd[_0x1c95e8(0x161)]+_0x1c95e8(0x169)+_0x38457b[_0x1c95e8(0x160)]+'.',_0x1c95e8(0x144)+_0x5ee299[0x0]['id']+_0x1c95e8(0x156));return{..._0x38457b,'content':_0xd8e86e};}function plannedAfter(_0x2495f1,_0x1e9298){const _0x4b365b=a99_0x4dc7a7;return{'scope':_0x4b365b(0x146),'appCode':_0x2495f1[_0x4b365b(0x161)],'title':_0x1e9298[_0x4b365b(0x160)],'contentByteSize':_0x1e9298[_0x4b365b(0x166)][_0x4b365b(0x153)],'contentHash':_0x1e9298[_0x4b365b(0x166)][_0x4b365b(0x16d)]};}function a99_0x2b33(){const _0x2f7be0=['stringify','contentHash','kb_create_outcome_unknown','kb_verification_failed','POST','kb_title_required','kb_file_required','str','\x20--format\x20compress','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','rabetbase\x20kb\x20detail\x20--id\x20','company','42CtlmKB','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','length','400988bjIpfd','68539pLlRuW','/admin/knowledge-base/create','cookie','203KDkHpa','12145ySTzZB','1012914RIFzPv','3BcBElM','string','byteSize','rabetbase\x20kb\x20list\x20--title\x20','Company\x20knowledge\x20base\x20','\x20--format\x20compress`\x20before\x20choosing\x20update.','--title\x20is\x20required.','file','verified','trim','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','11864mjEsmh','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','158740nxBkRP','title','appCode','high-risk-write','21640ftPtHV','\x20for\x20','99opIorY','content','--file\x20is\x20required.','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','\x20with\x20title\x20','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','create'];a99_0x2b33=function(){return _0x2f7be0;};return a99_0x2b33();}function verifyCreatedState(_0x408bb6,_0x28188a,_0x2cfd75){const _0x31ea48=a99_0x4dc7a7;assertCompanyKnowledgeBase(_0x2cfd75,_0x408bb6[_0x31ea48(0x161)],_0x2cfd75['id']);const _0x519533=inspectKbContent(_0x2cfd75[_0x31ea48(0x166)]);if(_0x2cfd75[_0x31ea48(0x160)]!==_0x28188a[_0x31ea48(0x160)]||_0x519533[_0x31ea48(0x16d)]!==_0x28188a[_0x31ea48(0x166)][_0x31ea48(0x16d)])throw kbError(_0x31ea48(0x16f),_0x31ea48(0x155)+_0x2cfd75['id']+'\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.',_0x31ea48(0x15d)+_0x2cfd75['id']+_0x31ea48(0x168));return projectKb(_0x2cfd75);}export const kbCreate={'service':'kb','command':a99_0x4dc7a7(0x16b),'description':a99_0x4dc7a7(0x15b),'risk':a99_0x4dc7a7(0x162),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a99_0x4dc7a7(0x152),'required':!![],'description':'Knowledge-base\x20title'},{'name':a99_0x4dc7a7(0x158),'type':a99_0x4dc7a7(0x152),'required':!![],'description':a99_0x4dc7a7(0x16a)}],async 'validate'(_0x2c1ee4){readCreateInput(_0x2c1ee4),requireKbExplicitYes(_0x2c1ee4);},async 'dryRun'(_0x5507dc){const _0x2738b8=a99_0x4dc7a7,_0x3739b8=await prepareCreate(_0x5507dc);return asDryRunResult({'operation':_0x2738b8(0x16b),'selector':{'scope':_0x2738b8(0x146),'appCode':_0x5507dc[_0x2738b8(0x161)],'title':_0x3739b8[_0x2738b8(0x160)]},'before':null,'after':plannedAfter(_0x5507dc,_0x3739b8),'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x2738b8(0x154)+JSON[_0x2738b8(0x16c)](_0x3739b8[_0x2738b8(0x160)])+_0x2738b8(0x174)}},{'method':_0x2738b8(0x170),'url':CREATE_PATH});},async 'execute'(_0x3c602c){const _0x251ac1=a99_0x4dc7a7;requireKbExplicitYes(_0x3c602c);const _0x36c79b=await prepareCreate(_0x3c602c);let _0x4e9e65,_0x38762b=![];try{const _0xe4f17e=await createEnterpriseKnowledgeBase(_0x3c602c[_0x251ac1(0x14d)],{'appCode':_0x3c602c[_0x251ac1(0x161)],'title':_0x36c79b[_0x251ac1(0x160)],'content':_0x36c79b[_0x251ac1(0x166)][_0x251ac1(0x166)]});assertCompanyKnowledgeBase(_0xe4f17e,_0x3c602c[_0x251ac1(0x161)],_0xe4f17e['id']),_0x4e9e65=_0xe4f17e['id'];}catch(_0x31a5b0){if(!isPlatformTransportFailure(_0x31a5b0))throw _0x31a5b0;_0x38762b=!![];}if(_0x4e9e65===undefined){const _0x5b1445=await verifyKbMutationReadback('create',!![],()=>fetchAllCompanyKnowledgeBases(_0x3c602c,{'title':_0x36c79b['title']})),_0x10b70a=findExactCompanyKnowledgeBases(_0x5b1445,_0x3c602c[_0x251ac1(0x161)],_0x36c79b[_0x251ac1(0x160)]);if(_0x10b70a[_0x251ac1(0x149)]!==0x1)throw kbError(_0x251ac1(0x16e),_0x251ac1(0x148)+_0x10b70a[_0x251ac1(0x149)]+'.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.');_0x4e9e65=_0x10b70a[0x0]['id'];}const _0x54f738=await verifyKbMutationReadback(_0x251ac1(0x16b),_0x38762b,()=>requireKb(_0x3c602c,_0x4e9e65)),_0x4cea36=verifyCreatedState(_0x3c602c,_0x36c79b,_0x54f738),_0x5c1cde=_0x38762b?[_0x251ac1(0x15e)]:[];return{'ok':!![],'data':{'operation':_0x251ac1(0x16b),'selector':{'id':_0x4cea36['id'],'scope':_0x251ac1(0x146),'appCode':_0x4cea36['appCode']},'before':null,'after':_0x4cea36,'dryRun':![],'backend':{'method':_0x251ac1(0x170),'path':CREATE_PATH},'warnings':_0x5c1cde,'verification':{'status':_0x251ac1(0x159),'recoveredAfterUnknownResponse':_0x38762b,'lookupCommand':_0x251ac1(0x145)+_0x4cea36['id']+_0x251ac1(0x174)}},'message':'Created\x20company\x20knowledge\x20base\x20'+_0x4cea36['id']+_0x251ac1(0x164)+_0x4cea36[_0x251ac1(0x161)]};}};
1
+ const a99_0x58c96a=a99_0x5157;(function(_0x34e193,_0x3f664f){const _0x13b566=a99_0x5157,_0x1c51eb=_0x34e193();while(!![]){try{const _0x19c903=-parseInt(_0x13b566(0xde))/0x1*(-parseInt(_0x13b566(0xec))/0x2)+-parseInt(_0x13b566(0x102))/0x3*(-parseInt(_0x13b566(0xfa))/0x4)+parseInt(_0x13b566(0xe1))/0x5+-parseInt(_0x13b566(0xf0))/0x6*(-parseInt(_0x13b566(0xdf))/0x7)+parseInt(_0x13b566(0xef))/0x8*(-parseInt(_0x13b566(0xfe))/0x9)+-parseInt(_0x13b566(0xe9))/0xa*(-parseInt(_0x13b566(0xe8))/0xb)+-parseInt(_0x13b566(0xf5))/0xc;if(_0x19c903===_0x3f664f)break;else _0x1c51eb['push'](_0x1c51eb['shift']());}catch(_0x256c37){_0x1c51eb['push'](_0x1c51eb['shift']());}}}(a99_0x2e68,0x5ee33));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a99_0x5157(_0x4889c1,_0x4e5d9b){_0x4889c1=_0x4889c1-0xda;const _0x2e6894=a99_0x2e68();let _0x5157bb=_0x2e6894[_0x4889c1];return _0x5157bb;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a99_0x58c96a(0xdd);function readCreateInput(_0x5be7d1){const _0x4adfce=a99_0x58c96a,_0x1bd974=_0x5be7d1[_0x4adfce(0xee)](_0x4adfce(0xea))[_0x4adfce(0xf2)]();if(!_0x1bd974)throw kbError('kb_title_required','--title\x20is\x20required.');const _0x2bf22b=_0x5be7d1[_0x4adfce(0xee)](_0x4adfce(0xdb))[_0x4adfce(0xf2)]();if(!_0x2bf22b)throw kbError('kb_file_required',_0x4adfce(0xe3),_0x4adfce(0xf7));return{'title':_0x1bd974,'file':_0x2bf22b};}async function prepareCreate(_0x3301f3){const _0x4489ac=a99_0x58c96a,_0x50cbb1=readCreateInput(_0x3301f3),_0x2d3fe0=await readKbFile(_0x50cbb1[_0x4489ac(0xdb)]),_0x41bf03=await fetchAllCompanyKnowledgeBases(_0x3301f3,{'title':_0x50cbb1[_0x4489ac(0xea)]}),_0x2b54db=findExactCompanyKnowledgeBases(_0x41bf03,_0x3301f3[_0x4489ac(0xed)],_0x50cbb1[_0x4489ac(0xea)]);if(_0x2b54db[_0x4489ac(0x105)]>0x0)throw kbError('kb_already_exists',_0x4489ac(0x104)+_0x3301f3['appCode']+_0x4489ac(0xf6)+_0x50cbb1['title']+'.',_0x4489ac(0x101)+_0x2b54db[0x0]['id']+_0x4489ac(0xf9));return{..._0x50cbb1,'content':_0x2d3fe0};}function plannedAfter(_0x286306,_0x144fda){const _0x2f3e6e=a99_0x58c96a;return{'scope':_0x2f3e6e(0xe5),'appCode':_0x286306[_0x2f3e6e(0xed)],'title':_0x144fda[_0x2f3e6e(0xea)],'contentByteSize':_0x144fda[_0x2f3e6e(0xfb)]['byteSize'],'contentHash':_0x144fda[_0x2f3e6e(0xfb)][_0x2f3e6e(0xdc)]};}function verifyCreatedState(_0x579e7a,_0x2a5632,_0x23d5f8){const _0x44b62c=a99_0x58c96a;assertCompanyKnowledgeBase(_0x23d5f8,_0x579e7a['appCode'],_0x23d5f8['id']);const _0xf562d5=inspectKbContent(_0x23d5f8['content']);if(_0x23d5f8['title']!==_0x2a5632['title']||_0xf562d5[_0x44b62c(0xdc)]!==_0x2a5632[_0x44b62c(0xfb)][_0x44b62c(0xdc)])throw kbError(_0x44b62c(0xf4),'Company\x20knowledge\x20base\x20'+_0x23d5f8['id']+_0x44b62c(0xe0),_0x44b62c(0xeb)+_0x23d5f8['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');return projectKb(_0x23d5f8);}export const kbCreate={'service':'kb','command':'create','description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a99_0x58c96a(0xea),'type':a99_0x58c96a(0xe7),'required':!![],'description':a99_0x58c96a(0xe2)},{'name':a99_0x58c96a(0xdb),'type':a99_0x58c96a(0xe7),'required':!![],'description':'UTF-8\x20text\x20or\x20Markdown\x20content\x20file'}],async 'validate'(_0x225b91){readCreateInput(_0x225b91),requireKbExplicitYes(_0x225b91);},async 'dryRun'(_0xa4dbff){const _0x290c24=a99_0x58c96a,_0x92246a=await prepareCreate(_0xa4dbff);return asDryRunResult({'operation':_0x290c24(0xfc),'selector':{'scope':_0x290c24(0xe5),'appCode':_0xa4dbff['appCode'],'title':_0x92246a[_0x290c24(0xea)]},'before':null,'after':plannedAfter(_0xa4dbff,_0x92246a),'dryRun':!![],'backend':{'method':_0x290c24(0xe4),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':'rabetbase\x20kb\x20list\x20--title\x20'+JSON[_0x290c24(0xfd)](_0x92246a[_0x290c24(0xea)])+_0x290c24(0xe6)}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x2e50ac){const _0x43b6be=a99_0x58c96a;requireKbExplicitYes(_0x2e50ac);const _0x44a732=await prepareCreate(_0x2e50ac);let _0x16c781,_0x213fd6=![];try{const _0x3540b0=await createEnterpriseKnowledgeBase(_0x2e50ac[_0x43b6be(0xf8)],{'appCode':_0x2e50ac['appCode'],'title':_0x44a732[_0x43b6be(0xea)],'content':_0x44a732[_0x43b6be(0xfb)][_0x43b6be(0xfb)]});assertCompanyKnowledgeBase(_0x3540b0,_0x2e50ac[_0x43b6be(0xed)],_0x3540b0['id']),_0x16c781=_0x3540b0['id'];}catch(_0x1b98cd){if(!isPlatformTransportFailure(_0x1b98cd))throw _0x1b98cd;_0x213fd6=!![];}if(_0x16c781===undefined){const _0x4ab392=await verifyKbMutationReadback(_0x43b6be(0xfc),!![],()=>fetchAllCompanyKnowledgeBases(_0x2e50ac,{'title':_0x44a732[_0x43b6be(0xea)]})),_0x5876bf=findExactCompanyKnowledgeBases(_0x4ab392,_0x2e50ac[_0x43b6be(0xed)],_0x44a732[_0x43b6be(0xea)]);if(_0x5876bf[_0x43b6be(0x105)]!==0x1)throw kbError('kb_create_outcome_unknown',_0x43b6be(0xff)+_0x5876bf[_0x43b6be(0x105)]+'.',_0x43b6be(0xda));_0x16c781=_0x5876bf[0x0]['id'];}const _0x277ab8=await verifyKbMutationReadback('create',_0x213fd6,()=>requireKb(_0x2e50ac,_0x16c781)),_0x2bd6ac=verifyCreatedState(_0x2e50ac,_0x44a732,_0x277ab8),_0xfa31ba=_0x213fd6?[_0x43b6be(0x100)]:[];return{'ok':!![],'data':{'operation':_0x43b6be(0xfc),'selector':{'id':_0x2bd6ac['id'],'scope':_0x43b6be(0xe5),'appCode':_0x2bd6ac[_0x43b6be(0xed)]},'before':null,'after':_0x2bd6ac,'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':_0xfa31ba,'verification':{'status':_0x43b6be(0xf3),'recoveredAfterUnknownResponse':_0x213fd6,'lookupCommand':_0x43b6be(0x103)+_0x2bd6ac['id']+_0x43b6be(0xe6)}},'message':'Created\x20company\x20knowledge\x20base\x20'+_0x2bd6ac['id']+_0x43b6be(0xf1)+_0x2bd6ac[_0x43b6be(0xed)]};}};function a99_0x2e68(){const _0x2367b9=['\x20--format\x20compress','string','396YylQPn','11370fWTtTp','title','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','83906gTjECo','appCode','str','262648FvmDDQ','31206pUEHBW','\x20for\x20','trim','verified','kb_verification_failed','11164668mgvDbN','\x20with\x20title\x20','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','cookie','\x20--format\x20compress`\x20before\x20choosing\x20update.','4jLtZwR','content','create','stringify','18NupcWi','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','1070877XOBbbW','rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','length','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','file','contentHash','/admin/knowledge-base/create','7ImVxpO','777CTAroE','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','579185mKdscx','Knowledge-base\x20title','--file\x20is\x20required.','POST','company'];a99_0x2e68=function(){return _0x2367b9;};return a99_0x2e68();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const kbDelete: CommandDefinition;
@@ -1 +1 @@
1
- const a100_0x5665bb=a100_0x4ed8;(function(_0x5d9c82,_0x92ee9c){const _0x34befb=a100_0x4ed8,_0x5716df=_0x5d9c82();while(!![]){try{const _0x69ba51=-parseInt(_0x34befb(0xcf))/0x1*(-parseInt(_0x34befb(0xc7))/0x2)+-parseInt(_0x34befb(0xbb))/0x3*(parseInt(_0x34befb(0xce))/0x4)+-parseInt(_0x34befb(0xca))/0x5+-parseInt(_0x34befb(0xb4))/0x6*(parseInt(_0x34befb(0xc8))/0x7)+-parseInt(_0x34befb(0xc3))/0x8+parseInt(_0x34befb(0xc6))/0x9*(parseInt(_0x34befb(0xb3))/0xa)+parseInt(_0x34befb(0xcb))/0xb;if(_0x69ba51===_0x92ee9c)break;else _0x5716df['push'](_0x5716df['shift']());}catch(_0x5adcd2){_0x5716df['push'](_0x5716df['shift']());}}}(a100_0x39cc,0xd593f));import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH='/admin/knowledge-base/delete',RAG_WARNING=a100_0x5665bb(0xbe),NON_ATOMIC_WARNING=a100_0x5665bb(0xb1);function readExpectedVersion(_0x3eebb6){const _0x520375=a100_0x5665bb,_0x426621=_0x3eebb6[_0x520375(0xbf)](_0x520375(0xc4));if(_0x426621===undefined)return undefined;const _0x1044f2=Number(_0x426621);if(!Number['isSafeInteger'](_0x1044f2)||_0x1044f2<0x0)throw kbError('kb_expected_version_invalid','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');return _0x1044f2;}function noOpData(_0x8f9ac7,_0x3684fb,_0x5eda7a){const _0xc3e10d=a100_0x5665bb;return{'operation':_0xc3e10d(0xc2),'selector':{'id':_0x3684fb,'scope':_0xc3e10d(0xbc),'appCode':_0x8f9ac7[_0xc3e10d(0xcc)]},'before':null,'after':null,'dryRun':_0x5eda7a,'deleteCalled':![],'backend':{'method':_0xc3e10d(0xc0),'path':DELETE_PATH},'warnings':[],'verification':{'status':_0xc3e10d(0xcd),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}function a100_0x4ed8(_0x18baf9,_0x439de0){_0x18baf9=_0x18baf9-0xb1;const _0x39cc09=a100_0x39cc();let _0x4ed8e1=_0x39cc09[_0x18baf9];return _0x4ed8e1;}export const kbDelete={'service':'kb','command':'delete','description':a100_0x5665bb(0xb5),'risk':a100_0x5665bb(0xc5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a100_0x5665bb(0xc9),'required':!![],'description':a100_0x5665bb(0xba)},{'name':a100_0x5665bb(0xc4),'type':'number','required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x2aa087){readKbId(_0x2aa087),readExpectedVersion(_0x2aa087),requireKbExplicitYes(_0x2aa087);},async 'dryRun'(_0x58eeb7){const _0x357dc1=a100_0x5665bb,_0x486839=readKbId(_0x58eeb7),_0x40e18e=readExpectedVersion(_0x58eeb7),_0x19d9ee=await getKbOrNull(_0x58eeb7,_0x486839);if(!_0x19d9ee)return asDryRunResult(noOpData(_0x58eeb7,_0x486839,!![]),{'method':'POST','url':DELETE_PATH});assertExpectedKbVersion(_0x19d9ee,_0x40e18e);const _0x6acbed=projectKb(_0x19d9ee),_0x3788de=[RAG_WARNING];if(_0x40e18e!==undefined)_0x3788de[_0x357dc1(0xbd)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':'delete','selector':{'id':_0x6acbed['id'],'scope':'company','appCode':_0x6acbed[_0x357dc1(0xcc)]},'before':_0x6acbed,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x357dc1(0xc0),'path':DELETE_PATH},'warnings':_0x3788de,'verification':{'expectedVersion':_0x40e18e??null,'atomicCompareAndSet':![],'snapshotHash':_0x6acbed[_0x357dc1(0xb7)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x357dc1(0xb8)+_0x6acbed['id']+_0x357dc1(0xb2)}},{'method':_0x357dc1(0xc0),'url':DELETE_PATH});},async 'execute'(_0x53f93d){const _0x97054d=a100_0x5665bb;requireKbExplicitYes(_0x53f93d);const _0x2432ed=readKbId(_0x53f93d),_0x548c68=readExpectedVersion(_0x53f93d),_0x46cc57=await getKbOrNull(_0x53f93d,_0x2432ed);if(!_0x46cc57)return{'ok':!![],'data':noOpData(_0x53f93d,_0x2432ed,![]),'message':'Company\x20knowledge\x20base\x20'+_0x2432ed+'\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made'};assertExpectedKbVersion(_0x46cc57,_0x548c68);const _0x45f175=projectKb(_0x46cc57);let _0x34a3cb=![];try{await deleteEnterpriseKnowledgeBase(_0x53f93d['cookie'],_0x2432ed);}catch(_0x487253){if(!isPlatformTransportFailure(_0x487253))throw _0x487253;_0x34a3cb=!![];}const _0x5344d4=await verifyKbMutationReadback(_0x97054d(0xb9),_0x34a3cb,()=>getKbOrNull(_0x53f93d,_0x2432ed));if(_0x5344d4)throw kbError(_0x34a3cb?_0x97054d(0xc1):_0x97054d(0xb6),'Company\x20knowledge\x20base\x20'+_0x2432ed+'\x20remains\x20readable\x20after\x20delete.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x2432ed+_0x97054d(0xd0));const _0x14e71c=[RAG_WARNING];if(_0x548c68!==undefined)_0x14e71c[_0x97054d(0xbd)](NON_ATOMIC_WARNING);return _0x34a3cb&&_0x14e71c[_0x97054d(0xbd)]('Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x97054d(0xb9),'selector':{'id':_0x45f175['id'],'scope':_0x97054d(0xbc),'appCode':_0x45f175[_0x97054d(0xcc)]},'before':_0x45f175,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x97054d(0xc0),'path':DELETE_PATH},'warnings':_0x14e71c,'verification':{'status':'verified','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x34a3cb,'lookupCommand':'rabetbase\x20kb\x20detail\x20--id\x20'+_0x45f175['id']+_0x97054d(0xb2)}},'message':'Soft-deleted\x20company\x20knowledge\x20base\x20'+_0x45f175['id']};}};function a100_0x39cc(){const _0x8ad98a=['7203440cjvtJw','8907678XvaMGS','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','kb_verification_failed','snapshotHash','rabetbase\x20kb\x20detail\x20--id\x20','delete','Company\x20knowledge-base\x20id','2194845KaDmjf','company','unshift','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','flag','POST','kb_delete_outcome_unknown','no_op','9453904NAzooN','expected-version','high-risk-write','18xwYuxx','29738pTgKWW','7xFSSvR','number','241760KbPTlr','14511200wJVVoc','appCode','already_absent','4VisoWj','105sxqhrF','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.','\x20--format\x20compress'];a100_0x39cc=function(){return _0x8ad98a;};return a100_0x39cc();}
1
+ function a100_0x6c30(){const _0x3ccb6c=['unshift','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','143247KdbWyL','rabetbase\x20kb\x20detail\x20--id\x20','cookie','already_absent','high-risk-write','appCode','isSafeInteger','verified','8DrCEnL','kb_expected_version_invalid','1892KiRbZL','kb_verification_failed','1557DLrOqz','72DoNPWP','kb_delete_outcome_unknown','Company\x20knowledge-base\x20id','418hRpFSH','company','1196874QQDYjK','6310MtaWJT','40908oBVoSz','Company\x20knowledge\x20base\x20','POST','13784urVyyS','935465sVYpwk','Soft-deleted\x20company\x20knowledge\x20base\x20','\x20remains\x20readable\x20after\x20delete.','delete','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','91yGsxrL','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','expected-version','number'];a100_0x6c30=function(){return _0x3ccb6c;};return a100_0x6c30();}const a100_0x23ff8f=a100_0x5e4b;(function(_0x104de6,_0x23704f){const _0x592e86=a100_0x5e4b,_0xf35185=_0x104de6();while(!![]){try{const _0xadc0a1=parseInt(_0x592e86(0x1bc))/0x1*(-parseInt(_0x592e86(0x1b9))/0x2)+parseInt(_0x592e86(0x1af))/0x3*(-parseInt(_0x592e86(0x1b7))/0x4)+-parseInt(_0x592e86(0x1c7))/0x5+parseInt(_0x592e86(0x1c1))/0x6+-parseInt(_0x592e86(0x1cc))/0x7*(-parseInt(_0x592e86(0x1c6))/0x8)+parseInt(_0x592e86(0x1bb))/0x9*(parseInt(_0x592e86(0x1c2))/0xa)+parseInt(_0x592e86(0x1bf))/0xb*(parseInt(_0x592e86(0x1c3))/0xc);if(_0xadc0a1===_0x23704f)break;else _0xf35185['push'](_0xf35185['shift']());}catch(_0xed0658){_0xf35185['push'](_0xf35185['shift']());}}}(a100_0x6c30,0x1ad38));import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH='/admin/knowledge-base/delete',RAG_WARNING=a100_0x23ff8f(0x1ad),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.';function readExpectedVersion(_0x41019b){const _0x4de19d=a100_0x23ff8f,_0x391523=_0x41019b['flag'](_0x4de19d(0x1ce));if(_0x391523===undefined)return undefined;const _0x10b2fe=Number(_0x391523);if(!Number[_0x4de19d(0x1b5)](_0x10b2fe)||_0x10b2fe<0x0)throw kbError(_0x4de19d(0x1b8),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');return _0x10b2fe;}function a100_0x5e4b(_0x59c962,_0x534f36){_0x59c962=_0x59c962-0x1ac;const _0x6c30b3=a100_0x6c30();let _0x5e4b73=_0x6c30b3[_0x59c962];return _0x5e4b73;}function noOpData(_0x543208,_0x33a150,_0x2c30ab){const _0x37f205=a100_0x23ff8f;return{'operation':'no_op','selector':{'id':_0x33a150,'scope':_0x37f205(0x1c0),'appCode':_0x543208[_0x37f205(0x1b4)]},'before':null,'after':null,'dryRun':_0x2c30ab,'deleteCalled':![],'backend':{'method':_0x37f205(0x1c5),'path':DELETE_PATH},'warnings':[],'verification':{'status':_0x37f205(0x1b2),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a100_0x23ff8f(0x1ca),'description':'Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':a100_0x23ff8f(0x1b3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a100_0x23ff8f(0x1cf),'required':!![],'description':a100_0x23ff8f(0x1be)},{'name':'expected-version','type':'number','required':![],'description':a100_0x23ff8f(0x1ae)}],async 'validate'(_0x2cc465){readKbId(_0x2cc465),readExpectedVersion(_0x2cc465),requireKbExplicitYes(_0x2cc465);},async 'dryRun'(_0x137a29){const _0x204aa6=a100_0x23ff8f,_0x214660=readKbId(_0x137a29),_0x1adfbc=readExpectedVersion(_0x137a29),_0x4eb296=await getKbOrNull(_0x137a29,_0x214660);if(!_0x4eb296)return asDryRunResult(noOpData(_0x137a29,_0x214660,!![]),{'method':'POST','url':DELETE_PATH});assertExpectedKbVersion(_0x4eb296,_0x1adfbc);const _0x2ed1fc=projectKb(_0x4eb296),_0x502080=[RAG_WARNING];if(_0x1adfbc!==undefined)_0x502080[_0x204aa6(0x1ac)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':_0x204aa6(0x1ca),'selector':{'id':_0x2ed1fc['id'],'scope':_0x204aa6(0x1c0),'appCode':_0x2ed1fc[_0x204aa6(0x1b4)]},'before':_0x2ed1fc,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x204aa6(0x1c5),'path':DELETE_PATH},'warnings':_0x502080,'verification':{'expectedVersion':_0x1adfbc??null,'atomicCompareAndSet':![],'snapshotHash':_0x2ed1fc['snapshotHash'],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x204aa6(0x1b0)+_0x2ed1fc['id']+'\x20--format\x20compress'}},{'method':_0x204aa6(0x1c5),'url':DELETE_PATH});},async 'execute'(_0x1be5bf){const _0x3896dd=a100_0x23ff8f;requireKbExplicitYes(_0x1be5bf);const _0xa71dbb=readKbId(_0x1be5bf),_0x5ee900=readExpectedVersion(_0x1be5bf),_0xf1e595=await getKbOrNull(_0x1be5bf,_0xa71dbb);if(!_0xf1e595)return{'ok':!![],'data':noOpData(_0x1be5bf,_0xa71dbb,![]),'message':'Company\x20knowledge\x20base\x20'+_0xa71dbb+_0x3896dd(0x1cd)};assertExpectedKbVersion(_0xf1e595,_0x5ee900);const _0x462bdc=projectKb(_0xf1e595);let _0x1192a3=![];try{await deleteEnterpriseKnowledgeBase(_0x1be5bf[_0x3896dd(0x1b1)],_0xa71dbb);}catch(_0x24cb8b){if(!isPlatformTransportFailure(_0x24cb8b))throw _0x24cb8b;_0x1192a3=!![];}const _0x2cce75=await verifyKbMutationReadback(_0x3896dd(0x1ca),_0x1192a3,()=>getKbOrNull(_0x1be5bf,_0xa71dbb));if(_0x2cce75)throw kbError(_0x1192a3?_0x3896dd(0x1bd):_0x3896dd(0x1ba),_0x3896dd(0x1c4)+_0xa71dbb+_0x3896dd(0x1c9),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0xa71dbb+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x177cc3=[RAG_WARNING];if(_0x5ee900!==undefined)_0x177cc3[_0x3896dd(0x1ac)](NON_ATOMIC_WARNING);return _0x1192a3&&_0x177cc3[_0x3896dd(0x1ac)](_0x3896dd(0x1cb)),{'ok':!![],'data':{'operation':_0x3896dd(0x1ca),'selector':{'id':_0x462bdc['id'],'scope':'company','appCode':_0x462bdc[_0x3896dd(0x1b4)]},'before':_0x462bdc,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x3896dd(0x1c5),'path':DELETE_PATH},'warnings':_0x177cc3,'verification':{'status':_0x3896dd(0x1b6),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x1192a3,'lookupCommand':_0x3896dd(0x1b0)+_0x462bdc['id']+'\x20--format\x20compress'}},'message':_0x3896dd(0x1c8)+_0x462bdc['id']};}};