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

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 (568) 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
  561. package/lib/commands/page/react/create.js +0 -1
  562. package/lib/commands/page/react/detail.js +0 -1
  563. package/lib/commands/page/react/list.js +0 -1
  564. package/lib/commands/page/react/publish.js +0 -1
  565. package/lib/commands/page/react/shared.js +0 -1
  566. package/lib/commands/page/react/syntax.js +0 -1
  567. package/lib/commands/page/react/template.js +0 -1
  568. package/lib/commands/page/react/update.js +0 -1
@@ -0,0 +1,34 @@
1
+ /**
2
+ * SQL 内容校验(轻量级)
3
+ *
4
+ * 集成在 SQL 创建与推送管线中作为前置校验步骤。
5
+ * DELETE / DDL 语句被阻止自动保存——须用户手动在平台操作。
6
+ * 从 lovrabet-dataset-mcp 的 sql-parser.ts 提取核心逻辑,无外部依赖。
7
+ */
8
+ export interface SqlTypeInfo {
9
+ type: "SELECT" | "INSERT" | "UPDATE" | "DELETE" | "DDL" | "UNKNOWN";
10
+ isSelectOnly: boolean;
11
+ isDangerous: boolean;
12
+ reason?: string;
13
+ }
14
+ export interface SqlValidation {
15
+ valid: boolean;
16
+ sqlType: SqlTypeInfo;
17
+ tables: string[];
18
+ parameters: string[];
19
+ message: string;
20
+ }
21
+ type SqlStatementType = "SELECT" | "INSERT" | "UPDATE" | "DELETE";
22
+ export interface SqlStaticAnalysisSource {
23
+ sql: string;
24
+ mode: "sql" | "mybatisXml";
25
+ statementType?: SqlStatementType;
26
+ error?: string;
27
+ }
28
+ export declare const MYBATIS_DYNAMIC_START_MARKER = "__RABETBASE_MYBATIS_DYNAMIC_START__";
29
+ export declare const MYBATIS_DYNAMIC_END_MARKER = "__RABETBASE_MYBATIS_DYNAMIC_END__";
30
+ export declare const MYBATIS_INCLUDE_MARKER = "__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__";
31
+ export declare function normalizeSqlForStaticAnalysis(sqlContent: string): SqlStaticAnalysisSource;
32
+ export declare function detectSqlType(sqlContent: string): SqlTypeInfo;
33
+ export declare function validateSql(sqlContent: string): SqlValidation;
34
+ export {};
@@ -1 +1 @@
1
- const a235_0x354b9f=a235_0x256d;(function(_0x5042ff,_0x5ad9f7){const _0x418eb4=a235_0x256d,_0x43551a=_0x5042ff();while(!![]){try{const _0x28a21f=parseInt(_0x418eb4(0x125))/0x1*(parseInt(_0x418eb4(0x16a))/0x2)+parseInt(_0x418eb4(0x139))/0x3*(-parseInt(_0x418eb4(0x151))/0x4)+parseInt(_0x418eb4(0x172))/0x5*(parseInt(_0x418eb4(0x131))/0x6)+-parseInt(_0x418eb4(0x119))/0x7*(-parseInt(_0x418eb4(0x11a))/0x8)+parseInt(_0x418eb4(0x173))/0x9*(-parseInt(_0x418eb4(0x16d))/0xa)+-parseInt(_0x418eb4(0x175))/0xb+-parseInt(_0x418eb4(0x155))/0xc*(-parseInt(_0x418eb4(0x15e))/0xd);if(_0x28a21f===_0x5ad9f7)break;else _0x43551a['push'](_0x43551a['shift']());}catch(_0x308f46){_0x43551a['push'](_0x43551a['shift']());}}}(a235_0x2275,0x37643));const MYBATIS_OUTER_TAGS=new Map([['select',a235_0x354b9f(0x12a)],[a235_0x354b9f(0x149),a235_0x354b9f(0x126)],[a235_0x354b9f(0x16b),a235_0x354b9f(0x13d)],[a235_0x354b9f(0x13f),a235_0x354b9f(0x11e)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a235_0x354b9f(0x162),a235_0x354b9f(0x135),a235_0x354b9f(0x134),a235_0x354b9f(0x150),a235_0x354b9f(0x14b),a235_0x354b9f(0x137),'set',a235_0x354b9f(0x176),a235_0x354b9f(0x133),a235_0x354b9f(0x14f)]),MYBATIS_BRANCH_TAGS=new Set(['if','foreach',a235_0x354b9f(0x134),a235_0x354b9f(0x150),a235_0x354b9f(0x14b)]);export const MYBATIS_DYNAMIC_START_MARKER=a235_0x354b9f(0x124);export const MYBATIS_DYNAMIC_END_MARKER=a235_0x354b9f(0x163);export const MYBATIS_INCLUDE_MARKER=a235_0x354b9f(0x15d);const UNRESOLVED_SQL_FRAGMENT=a235_0x354b9f(0x12e),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a235_0x354b9f(0x15a)+[...MYBATIS_OUTER_TAGS[a235_0x354b9f(0x118)]()][a235_0x354b9f(0x14e)]('|')+a235_0x354b9f(0x160),'i');export function normalizeSqlForStaticAnalysis(_0x35d31b){const _0x4dda78=a235_0x354b9f,_0x263059=typeof _0x35d31b==='string'?_0x35d31b:'';if(!startsWithMybatisStatementWrapper(_0x263059))return{'sql':_0x263059,'mode':_0x4dda78(0x159)};let _0x107e2d=0x0,_0x55c7f2='',_0x3af143,_0x457258=![],_0x59fa27=![];const _0x3c3098=[];while(_0x107e2d<_0x263059[_0x4dda78(0x153)]){if(_0x263059['startsWith'](_0x4dda78(0x14a),_0x107e2d)){const _0xfa743a=_0x263059[_0x4dda78(0x179)]('-->',_0x107e2d+0x4);if(_0xfa743a<0x0)return invalidMybatisSource(_0x4dda78(0x152));_0x55c7f2+='\x20',_0x107e2d=_0xfa743a+0x3;continue;}if(_0x263059[_0x4dda78(0x164)](_0x4dda78(0x16f),_0x107e2d)){if(!_0x457258||_0x59fa27)return invalidMybatisSource(_0x4dda78(0x12b));const _0x19aeeb=_0x263059[_0x4dda78(0x179)](']]>',_0x107e2d+0x9);if(_0x19aeeb<0x0)return invalidMybatisSource(_0x4dda78(0x14d));_0x55c7f2+=_0x263059[_0x4dda78(0x144)](_0x107e2d+0x9,_0x19aeeb),_0x107e2d=_0x19aeeb+0x3;continue;}if(_0x263059[_0x4dda78(0x164)]('<?',_0x107e2d)){if(_0x457258)return invalidMybatisSource(_0x4dda78(0x145));const _0x16b9d8=_0x263059['indexOf']('?>',_0x107e2d+0x2);if(_0x16b9d8<0x0)return invalidMybatisSource(_0x4dda78(0x16c));_0x55c7f2+='\x20',_0x107e2d=_0x16b9d8+0x2;continue;}if(_0x263059[_0x107e2d]!=='<'){const _0x552c6b=_0x263059[_0x4dda78(0x179)]('<',_0x107e2d),_0x135463=_0x552c6b<0x0?_0x263059[_0x4dda78(0x153)]:_0x552c6b,_0x23e0c4=_0x263059[_0x4dda78(0x144)](_0x107e2d,_0x135463);if((!_0x457258||_0x59fa27)&&_0x23e0c4['trim']())return invalidMybatisSource(_0x4dda78(0x11f));if(_0x457258&&!_0x59fa27){const _0x22c7a4=decodeXmlEntities(_0x23e0c4);if(_0x22c7a4===null)return invalidMybatisSource(_0x4dda78(0x166));_0x55c7f2+=_0x22c7a4;}else _0x55c7f2+='\x20';_0x107e2d=_0x135463;continue;}const _0xa4ad97=findXmlTagEnd(_0x263059,_0x107e2d);if(_0xa4ad97<0x0)return invalidMybatisSource('Unterminated\x20MyBatis\x20XML\x20tag.');const _0x1e265e=_0x263059['slice'](_0x107e2d,_0xa4ad97+0x1),_0x400305=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x4dda78(0x171)](_0x1e265e);if(!_0x400305)return invalidMybatisSource(_0x4dda78(0x154));const _0x10f216=_0x400305[0x1]==='/',_0x4ada0a=_0x400305[0x2]??'',_0xb3d57b=_0x4ada0a['toLowerCase'](),_0x4c2958=_0x400305[0x3]??'',_0x3373b8=_0x400305[0x4]==='/',_0xf8fd3e=MYBATIS_OUTER_TAGS[_0x4dda78(0x14c)](_0xb3d57b);if(!_0xf8fd3e&&!MYBATIS_DYNAMIC_TAGS[_0x4dda78(0x142)](_0xb3d57b))return invalidMybatisSource(_0x4dda78(0x158)+_0xb3d57b+'>.');if(!_0xf8fd3e&&_0x4ada0a!==_0xb3d57b)return invalidMybatisSource(_0x4dda78(0x157)+_0x4ada0a+'>.');if(_0x10f216){if(_0x4c2958['trim']()||_0x3373b8)return invalidMybatisSource(_0x4dda78(0x11c)+_0x4ada0a+'>.');const _0xb51823=_0x3c3098['at'](-0x1);if(!_0xb51823||(_0xb51823['outer']?_0xb51823[_0x4dda78(0x130)]!==_0xb3d57b:_0xb51823[_0x4dda78(0x11d)]!==_0x4ada0a))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x4ada0a+'>.');_0x3c3098['pop']();if(_0xb51823[_0x4dda78(0x12d)])_0x59fa27=!![];_0x55c7f2+=MYBATIS_BRANCH_TAGS[_0x4dda78(0x142)](_0xb3d57b)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x4c2958))return invalidMybatisSource('Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<'+_0x4ada0a+'>.');if(_0xb3d57b===_0x4dda78(0x14f)&&(!_0x3373b8||_0x3c3098['at'](-0x1)?.[_0x4dda78(0x130)]!==_0x4dda78(0x133)))return invalidMybatisSource(_0x4dda78(0x178));if(_0xf8fd3e){if(_0x457258||_0x3c3098[_0x4dda78(0x153)]>0x0)return invalidMybatisSource(_0x4dda78(0x161));_0x457258=!![],_0x59fa27=_0x3373b8,_0x3af143=_0xf8fd3e;}else{if(!_0x457258||_0x59fa27)return invalidMybatisSource(_0x4dda78(0x147)+_0x4ada0a+'>.');}_0x55c7f2+=_0xb3d57b===_0x4dda78(0x162)?'\x20WHERE\x20':_0xb3d57b===_0x4dda78(0x15b)?_0x4dda78(0x12c):_0xb3d57b===_0x4dda78(0x133)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x4dda78(0x142)](_0xb3d57b)&&!_0x3373b8?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x3373b8&&_0x3c3098[_0x4dda78(0x167)]({'rawName':_0x4ada0a,'tagName':_0xb3d57b,'outer':!!_0xf8fd3e});}_0x107e2d=_0xa4ad97+0x1;}if(_0x3c3098[_0x4dda78(0x153)]>0x0)return invalidMybatisSource(_0x4dda78(0x168)+_0x3c3098['at'](-0x1)?.[_0x4dda78(0x11d)]+'>.');if(!_0x457258||!_0x59fa27)return invalidMybatisSource('MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.');return{'sql':_0x55c7f2['trim'](),'mode':'mybatisXml',..._0x3af143?{'statementType':_0x3af143}:{}};}function hasWellFormedXmlAttributes(_0x4d2f2a){const _0x36f5a5=a235_0x354b9f;let _0x73face=0x0;const _0x2e2e91=new Set();while(_0x73face<_0x4d2f2a[_0x36f5a5(0x153)]){while(_0x73face<_0x4d2f2a['length']&&/\s/[_0x36f5a5(0x13e)](_0x4d2f2a[_0x73face]??''))_0x73face+=0x1;if(_0x73face>=_0x4d2f2a[_0x36f5a5(0x153)])return!![];const _0x30d841=/^[A-Za-z_:][\w:.-]*/[_0x36f5a5(0x171)](_0x4d2f2a[_0x36f5a5(0x144)](_0x73face)),_0x35f44f=_0x30d841?.[0x0];if(!_0x35f44f||_0x2e2e91[_0x36f5a5(0x142)](_0x35f44f))return![];_0x2e2e91[_0x36f5a5(0x128)](_0x35f44f),_0x73face+=_0x35f44f[_0x36f5a5(0x153)];while(_0x73face<_0x4d2f2a[_0x36f5a5(0x153)]&&/\s/[_0x36f5a5(0x13e)](_0x4d2f2a[_0x73face]??''))_0x73face+=0x1;if(_0x4d2f2a[_0x73face]!=='=')return![];_0x73face+=0x1;while(_0x73face<_0x4d2f2a['length']&&/\s/[_0x36f5a5(0x13e)](_0x4d2f2a[_0x73face]??''))_0x73face+=0x1;const _0x20b057=_0x4d2f2a[_0x73face];if(_0x20b057!=='\x22'&&_0x20b057!=='\x27')return![];_0x73face+=0x1;const _0x5775cb=_0x4d2f2a[_0x36f5a5(0x179)](_0x20b057,_0x73face);if(_0x5775cb<0x0)return![];if(decodeXmlEntities(_0x4d2f2a[_0x36f5a5(0x144)](_0x73face,_0x5775cb))===null)return![];_0x73face=_0x5775cb+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x8dcaf3){const _0x1ca39c=a235_0x354b9f;let _0x1d3dc2=0x0;const _0x480f67=()=>{const _0x244410=a235_0x256d;while(_0x1d3dc2<_0x8dcaf3[_0x244410(0x153)]&&/\s/['test'](_0x8dcaf3[_0x1d3dc2]??''))_0x1d3dc2+=0x1;};_0x480f67();while(_0x1d3dc2<_0x8dcaf3[_0x1ca39c(0x153)]){if(_0x8dcaf3['startsWith'](_0x1ca39c(0x14a),_0x1d3dc2)){const _0x280aec=_0x8dcaf3['indexOf'](_0x1ca39c(0x141),_0x1d3dc2+0x4);if(_0x280aec<0x0)return!![];_0x1d3dc2=_0x280aec+0x3,_0x480f67();continue;}if(_0x8dcaf3[_0x1ca39c(0x164)]('<?',_0x1d3dc2)){const _0x422047=_0x8dcaf3['indexOf']('?>',_0x1d3dc2+0x2);if(_0x422047<0x0)return!![];_0x1d3dc2=_0x422047+0x2,_0x480f67();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN['test'](_0x8dcaf3[_0x1ca39c(0x144)](_0x1d3dc2));}function invalidMybatisSource(_0x5cd9a0){const _0xe5408=a235_0x354b9f;return{'sql':'','mode':_0xe5408(0x174),'error':_0x5cd9a0};}function findXmlTagEnd(_0xfb8c0f,_0xd16ea2){const _0x1879f2=a235_0x354b9f;let _0x4fff35;for(let _0x57054c=_0xd16ea2+0x1;_0x57054c<_0xfb8c0f[_0x1879f2(0x153)];_0x57054c+=0x1){const _0x125ef5=_0xfb8c0f[_0x57054c];if(_0x4fff35){if(_0x125ef5===_0x4fff35)_0x4fff35=undefined;continue;}if(_0x125ef5==='\x22'||_0x125ef5==='\x27'){_0x4fff35=_0x125ef5;continue;}if(_0x125ef5==='>')return _0x57054c;}return-0x1;}function decodeXmlEntities(_0x10336b){const _0x3dcf1a=a235_0x354b9f;let _0x3a6546=![];const _0x27bd6a=_0x10336b[_0x3dcf1a(0x120)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x2bae74=>{const _0x2825b2=_0x3dcf1a;if(_0x2bae74==='&lt;')return'<';if(_0x2bae74===_0x2825b2(0x122))return'>';if(_0x2bae74==='&quot;')return'\x22';if(_0x2bae74===_0x2825b2(0x143))return'\x27';if(_0x2bae74==='&amp;')return'&';const _0x4876fd=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x2bae74);if(_0x4876fd){const _0x37d04f=_0x4876fd[0x1],_0x7f0d15=_0x4876fd[0x2],_0xdc5b78=Number[_0x2825b2(0x156)](_0x37d04f??_0x7f0d15??'',_0x37d04f?0x10:0xa);if(isValidXmlCharacter(_0xdc5b78))return String[_0x2825b2(0x129)](_0xdc5b78);}return _0x3a6546=!![],'';});return _0x3a6546?null:_0x27bd6a;}function isValidXmlCharacter(_0x181cda){return _0x181cda===0x9||_0x181cda===0xa||_0x181cda===0xd||_0x181cda>=0x20&&_0x181cda<=0xd7ff||_0x181cda>=0xe000&&_0x181cda<=0xfffd||_0x181cda>=0x10000&&_0x181cda<=0x10ffff;}export function detectSqlType(_0xb3c8f){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0xb3c8f));}function detectNormalizedSqlType(_0x49a8bc){const _0x34ac62=a235_0x354b9f;if(_0x49a8bc[_0x34ac62(0x132)])return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x49a8bc[_0x34ac62(0x132)]};if(!_0x49a8bc[_0x34ac62(0x159)][_0x34ac62(0x137)]())return{'type':_0x34ac62(0x165),'isSelectOnly':![],'isDangerous':![],'reason':_0x34ac62(0x13c)};const _0x10a4d2=stripStaticAnalysisMarkers(_0x49a8bc[_0x34ac62(0x159)])[_0x34ac62(0x120)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x34ac62(0x137)](),_0x280e69=_0x10a4d2['split']('\x0a');let _0x3d69ba='';for(const _0x45cf2b of _0x280e69){const _0x61041b=_0x45cf2b['trim']();if(!_0x61041b||_0x61041b[_0x34ac62(0x164)]('--')||_0x61041b['startsWith']('/*'))continue;_0x3d69ba=_0x61041b;break;}const _0x5619b3=_0x3d69ba[_0x34ac62(0x177)](),_0x3a7420=_0x49a8bc[_0x34ac62(0x15c)],_0x5d114e=maskSqlTextForBlockedKeywordScan(_0x10a4d2),_0x32185f=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x34ac62(0x13e)](_0x5d114e);if(_0x3a7420==='SELECT'||!_0x3a7420&&(_0x5619b3[_0x34ac62(0x164)]('SELECT')||_0x5619b3[_0x34ac62(0x164)]('WITH'))){const _0x170604=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x34ac62(0x13e)](_0x10a4d2);return{'type':_0x34ac62(0x12a),'isSelectOnly':!_0x170604,'isDangerous':_0x170604,'reason':_0x170604?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x3a7420===_0x34ac62(0x126)||!_0x3a7420&&_0x5619b3[_0x34ac62(0x164)](_0x34ac62(0x126)))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x32185f,'reason':_0x32185f?_0x34ac62(0x170):undefined};if(_0x3a7420==='UPDATE'||!_0x3a7420&&_0x5619b3[_0x34ac62(0x164)](_0x34ac62(0x13d)))return{'type':_0x34ac62(0x13d),'isSelectOnly':![],'isDangerous':_0x32185f,'reason':_0x32185f?_0x34ac62(0x170):undefined};if(_0x3a7420===_0x34ac62(0x11e)||!_0x3a7420&&_0x5619b3[_0x34ac62(0x164)](_0x34ac62(0x11e)))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x34ac62(0x17a)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0x5619b3))return{'type':_0x34ac62(0x15f),'isSelectOnly':![],'isDangerous':!![],'reason':_0x34ac62(0x11b)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x3f486d){const _0x1da747=a235_0x354b9f;return _0x3f486d['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x1da747(0x148)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function a235_0x2275(){const _0x5144e0=['Unable\x20to\x20detect\x20SQL\x20type.\x20','add','fromCodePoint','SELECT','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','\x20SET\x20','outer','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','reason','tagName','1326qZHkTr','error','include','choose','foreach','\x20with\x20parameters:\x20','trim','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','4068aJnAdw','type','match','SQL\x20content\x20is\x20empty','UPDATE','test','delete','includes','-->','has','&apos;','slice','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','from','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','replaceAll','insert','<!--','otherwise','get','Unterminated\x20CDATA\x20section.','join','property','when','884MwccGy','Unterminated\x20XML\x20comment.','length','Invalid\x20MyBatis\x20XML\x20tag.','2316Tmrcrk','parseInt','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','sql','^<\x5cs*(?:','set','statementType','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','4979uRDzge','DDL',')\x5cb','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','where','__RABETBASE_MYBATIS_DYNAMIC_END__','startsWith','UNKNOWN','Invalid\x20XML\x20entity\x20reference.','push','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','\x20query\x20targeting\x20','2PpJIqb','update','Unterminated\x20XML\x20declaration.','10HzWdLd','unknown\x20table(s)','<![CDATA[','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','exec','8455GUjAPD','2440674mivPpB','mybatisXml','1160016qbNteq','bind','toUpperCase','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','indexOf','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','keys','14wuKtUs','460232RBWoBm','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','rawName','DELETE','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','replace','matchAll','&gt;','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','__RABETBASE_MYBATIS_DYNAMIC_START__','340513FKaaSJ','INSERT'];a235_0x2275=function(){return _0x5144e0;};return a235_0x2275();}function a235_0x256d(_0x16a3d1,_0x340251){_0x16a3d1=_0x16a3d1-0x118;const _0x22759e=a235_0x2275();let _0x256d37=_0x22759e[_0x16a3d1];return _0x256d37;}function maskSqlTextForBlockedKeywordScan(_0x157821){const _0x40a70c=a235_0x354b9f;return _0x157821[_0x40a70c(0x120)](/'(?:''|\\.|[^'])*'/g,'\x20')['replace'](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x40a70c(0x120)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x40a70c(0x120)](/--.*$/gm,'\x20')[_0x40a70c(0x120)](/#.*$/gm,'\x20')[_0x40a70c(0x120)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x3c90c9){const _0x44441c=a235_0x354b9f,_0x51963f=_0x3c90c9[_0x44441c(0x120)](/#\{[^}]*\}/g,'?')[_0x44441c(0x120)](/\$\{[^}]*\}/g,'?')[_0x44441c(0x120)](/'[^']*'/g,'\x27\x27')['replace'](/--.*$/gm,'')[_0x44441c(0x120)](/\/\*[\s\S]*?\*\//g,''),_0xe0c65=[],_0x3a7de5=_0x51963f[_0x44441c(0x13b)](/FROM\s+([^\s,)(]+)/i);addTable(_0xe0c65,_0x3a7de5?.[0x1]);for(const _0x1bec1b of _0x51963f[_0x44441c(0x121)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0xe0c65,_0x1bec1b[0x1]);}const _0x1fceb7=_0x51963f[_0x44441c(0x13b)](/INTO\s+([^\s(]+)/i);addTable(_0xe0c65,_0x1fceb7?.[0x1]);const _0x206ac7=_0x51963f[_0x44441c(0x13b)](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0xe0c65,_0x206ac7?.[0x1]),_0xe0c65;}function addTable(_0x3d82df,_0x18a1c2){const _0x2b44d9=a235_0x354b9f,_0xd1d9de=_0x18a1c2?.[_0x2b44d9(0x120)](/[`"]/g,'');_0xd1d9de&&_0xd1d9de!==UNRESOLVED_SQL_FRAGMENT&&!_0x3d82df[_0x2b44d9(0x140)](_0xd1d9de)&&_0x3d82df[_0x2b44d9(0x167)](_0xd1d9de);}function extractParameters(_0x55b644){const _0x3e0845=a235_0x354b9f,_0x2178fd=new Set();for(const _0x3dfc86 of _0x55b644[_0x3e0845(0x121)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x3dfc86[0x1])_0x2178fd[_0x3e0845(0x128)](_0x3dfc86[0x1]);}return Array[_0x3e0845(0x146)](_0x2178fd);}export function validateSql(_0x49aa21){const _0xa882d5=a235_0x354b9f,_0x421ac0=normalizeSqlForStaticAnalysis(_0x49aa21),_0x747197=detectNormalizedSqlType(_0x421ac0),_0xa90295=stripStaticAnalysisMarkers(_0x421ac0['sql']),_0x1d659c=_0x421ac0['error']?[]:extractTables(_0xa90295),_0x20af5b=_0x421ac0['error']?[]:extractParameters(_0xa90295);if(_0x747197['isDangerous'])return{'valid':![],'sqlType':_0x747197,'tables':_0x1d659c,'parameters':_0x20af5b,'message':_0x747197[_0xa882d5(0x12f)]||_0x747197['type']+_0xa882d5(0x138)};if(_0x747197[_0xa882d5(0x13a)]==='UNKNOWN')return{'valid':![],'sqlType':_0x747197,'tables':_0x1d659c,'parameters':_0x20af5b,'message':_0x421ac0[_0xa882d5(0x132)]?_0xa882d5(0x127)+_0x421ac0['error']:_0xa882d5(0x123)};return{'valid':!![],'sqlType':_0x747197,'tables':_0x1d659c,'parameters':_0x20af5b,'message':_0x747197[_0xa882d5(0x13a)]+_0xa882d5(0x169)+(_0x1d659c['length']?_0x1d659c[_0xa882d5(0x14e)](',\x20'):_0xa882d5(0x16e))+(_0x20af5b['length']?_0xa882d5(0x136)+_0x20af5b[_0xa882d5(0x14e)](',\x20'):'')};}
1
+ const a227_0x492ce4=a227_0x2c20;(function(_0x306490,_0x3e901b){const _0x53dc87=a227_0x2c20,_0x27ec1a=_0x306490();while(!![]){try{const _0x1e86d8=-parseInt(_0x53dc87(0x1a9))/0x1*(parseInt(_0x53dc87(0x1ae))/0x2)+parseInt(_0x53dc87(0x1be))/0x3*(parseInt(_0x53dc87(0x178))/0x4)+-parseInt(_0x53dc87(0x1a4))/0x5*(parseInt(_0x53dc87(0x18d))/0x6)+-parseInt(_0x53dc87(0x170))/0x7*(parseInt(_0x53dc87(0x1af))/0x8)+parseInt(_0x53dc87(0x1b0))/0x9+-parseInt(_0x53dc87(0x166))/0xa+parseInt(_0x53dc87(0x19f))/0xb;if(_0x1e86d8===_0x3e901b)break;else _0x27ec1a['push'](_0x27ec1a['shift']());}catch(_0x2b9e2d){_0x27ec1a['push'](_0x27ec1a['shift']());}}}(a227_0x3545,0x29650));const MYBATIS_OUTER_TAGS=new Map([['select',a227_0x492ce4(0x1b6)],['insert',a227_0x492ce4(0x1ad)],[a227_0x492ce4(0x1a0),a227_0x492ce4(0x181)],['delete',a227_0x492ce4(0x197)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if','where','foreach',a227_0x492ce4(0x1c6),a227_0x492ce4(0x1c8),a227_0x492ce4(0x19b),a227_0x492ce4(0x1ba),a227_0x492ce4(0x19e),a227_0x492ce4(0x18a),a227_0x492ce4(0x18b),a227_0x492ce4(0x1b4)]),MYBATIS_BRANCH_TAGS=new Set(['if',a227_0x492ce4(0x194),a227_0x492ce4(0x1c6),a227_0x492ce4(0x1c8),a227_0x492ce4(0x19b)]);export const MYBATIS_DYNAMIC_START_MARKER=a227_0x492ce4(0x16d);function a227_0x3545(){const _0x20e639=['indexOf','DELETE','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','&gt;','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','otherwise','startsWith','^<\x5cs*(?:','set','10390501jykTsF','update','exec','test','sql','23710aPgwKv','string','\x20query\x20targeting\x20','from','replaceAll','217561NLIZtt','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','<!--','\x20WHERE\x20','INSERT','2umCMbY','16OyerHx','347778QtFQUK','UNKNOWN','has','Invalid\x20XML\x20entity\x20reference.','property','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','SELECT',']]>','tagName','<![CDATA[','trim','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','split','84939brjseC',')\x5cb','__RABETBASE_MYBATIS_DYNAMIC_END__','Unable\x20to\x20detect\x20SQL\x20type.\x20','parseInt','&apos;','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','Unterminated\x20XML\x20declaration.','choose','statementType','when','994530RiMzno','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','length','unknown\x20table(s)','matchAll','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','isDangerous','__RABETBASE_MYBATIS_DYNAMIC_START__','\x20with\x20parameters:\x20','replace','1140356mEVrCo','WITH','SQL\x20content\x20is\x20empty','DDL','rawName','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','Unterminated\x20CDATA\x20section.','add','4hfpbEU','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','push','toUpperCase','where','match','&amp;','error','reason','UPDATE','type','get','-->','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','slice','join','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','bind','include','&quot;','252bDNNeF','Unterminated\x20MyBatis\x20XML\x20tag.','Invalid\x20MyBatis\x20XML\x20tag.','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','Unterminated\x20XML\x20comment.','fromCodePoint','includes','foreach','outer'];a227_0x3545=function(){return _0x20e639;};return a227_0x3545();}export const MYBATIS_DYNAMIC_END_MARKER=a227_0x492ce4(0x1c0);export const MYBATIS_INCLUDE_MARKER=a227_0x492ce4(0x19a);const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp(a227_0x492ce4(0x19d)+[...MYBATIS_OUTER_TAGS['keys']()][a227_0x492ce4(0x187)]('|')+a227_0x492ce4(0x1bf),'i');export function normalizeSqlForStaticAnalysis(_0x5180c8){const _0x1c155a=a227_0x492ce4,_0x1facd3=typeof _0x5180c8===_0x1c155a(0x1a5)?_0x5180c8:'';if(!startsWithMybatisStatementWrapper(_0x1facd3))return{'sql':_0x1facd3,'mode':_0x1c155a(0x1a3)};let _0x49d8f0=0x0,_0x28797d='',_0x4acac6,_0x3fd766=![],_0x5c5bb1=![];const _0x4f49f3=[];while(_0x49d8f0<_0x1facd3[_0x1c155a(0x168)]){if(_0x1facd3[_0x1c155a(0x19c)](_0x1c155a(0x1ab),_0x49d8f0)){const _0x1254ae=_0x1facd3['indexOf'](_0x1c155a(0x184),_0x49d8f0+0x4);if(_0x1254ae<0x0)return invalidMybatisSource(_0x1c155a(0x191));_0x28797d+='\x20',_0x49d8f0=_0x1254ae+0x3;continue;}if(_0x1facd3[_0x1c155a(0x19c)](_0x1c155a(0x1b9),_0x49d8f0)){if(!_0x3fd766||_0x5c5bb1)return invalidMybatisSource('CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x197619=_0x1facd3[_0x1c155a(0x196)](_0x1c155a(0x1b7),_0x49d8f0+0x9);if(_0x197619<0x0)return invalidMybatisSource(_0x1c155a(0x176));_0x28797d+=_0x1facd3['slice'](_0x49d8f0+0x9,_0x197619),_0x49d8f0=_0x197619+0x3;continue;}if(_0x1facd3['startsWith']('<?',_0x49d8f0)){if(_0x3fd766)return invalidMybatisSource(_0x1c155a(0x1bc));const _0x54be37=_0x1facd3['indexOf']('?>',_0x49d8f0+0x2);if(_0x54be37<0x0)return invalidMybatisSource(_0x1c155a(0x1c5));_0x28797d+='\x20',_0x49d8f0=_0x54be37+0x2;continue;}if(_0x1facd3[_0x49d8f0]!=='<'){const _0x5afabe=_0x1facd3[_0x1c155a(0x196)]('<',_0x49d8f0),_0x1f2bf0=_0x5afabe<0x0?_0x1facd3[_0x1c155a(0x168)]:_0x5afabe,_0x40f80a=_0x1facd3[_0x1c155a(0x186)](_0x49d8f0,_0x1f2bf0);if((!_0x3fd766||_0x5c5bb1)&&_0x40f80a[_0x1c155a(0x1ba)]())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x3fd766&&!_0x5c5bb1){const _0x52b8de=decodeXmlEntities(_0x40f80a);if(_0x52b8de===null)return invalidMybatisSource(_0x1c155a(0x1b3));_0x28797d+=_0x52b8de;}else _0x28797d+='\x20';_0x49d8f0=_0x1f2bf0;continue;}const _0xfa0fb4=findXmlTagEnd(_0x1facd3,_0x49d8f0);if(_0xfa0fb4<0x0)return invalidMybatisSource(_0x1c155a(0x18e));const _0x5008f3=_0x1facd3[_0x1c155a(0x186)](_0x49d8f0,_0xfa0fb4+0x1),_0x4fa6eb=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x1c155a(0x1a1)](_0x5008f3);if(!_0x4fa6eb)return invalidMybatisSource(_0x1c155a(0x18f));const _0x2d9e69=_0x4fa6eb[0x1]==='/',_0x550dbf=_0x4fa6eb[0x2]??'',_0x505afc=_0x550dbf['toLowerCase'](),_0x1bc81e=_0x4fa6eb[0x3]??'',_0x23fd4f=_0x4fa6eb[0x4]==='/',_0x24467c=MYBATIS_OUTER_TAGS[_0x1c155a(0x183)](_0x505afc);if(!_0x24467c&&!MYBATIS_DYNAMIC_TAGS['has'](_0x505afc))return invalidMybatisSource(_0x1c155a(0x1c4)+_0x505afc+'>.');if(!_0x24467c&&_0x550dbf!==_0x505afc)return invalidMybatisSource(_0x1c155a(0x1aa)+_0x550dbf+'>.');if(_0x2d9e69){if(_0x1bc81e[_0x1c155a(0x1ba)]()||_0x23fd4f)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x550dbf+'>.');const _0x126e68=_0x4f49f3['at'](-0x1);if(!_0x126e68||(_0x126e68[_0x1c155a(0x195)]?_0x126e68[_0x1c155a(0x1b8)]!==_0x505afc:_0x126e68[_0x1c155a(0x174)]!==_0x550dbf))return invalidMybatisSource(_0x1c155a(0x188)+_0x550dbf+'>.');_0x4f49f3['pop']();if(_0x126e68[_0x1c155a(0x195)])_0x5c5bb1=!![];_0x28797d+=MYBATIS_BRANCH_TAGS[_0x1c155a(0x1b2)](_0x505afc)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x1bc81e))return invalidMybatisSource(_0x1c155a(0x179)+_0x550dbf+'>.');if(_0x505afc===_0x1c155a(0x1b4)&&(!_0x23fd4f||_0x4f49f3['at'](-0x1)?.['tagName']!=='include'))return invalidMybatisSource(_0x1c155a(0x16b));if(_0x24467c){if(_0x3fd766||_0x4f49f3[_0x1c155a(0x168)]>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0x3fd766=!![],_0x5c5bb1=_0x23fd4f,_0x4acac6=_0x24467c;}else{if(!_0x3fd766||_0x5c5bb1)return invalidMybatisSource(_0x1c155a(0x198)+_0x550dbf+'>.');}_0x28797d+=_0x505afc===_0x1c155a(0x17c)?_0x1c155a(0x1ac):_0x505afc===_0x1c155a(0x19e)?'\x20SET\x20':_0x505afc===_0x1c155a(0x18b)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x1c155a(0x1b2)](_0x505afc)&&!_0x23fd4f?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x23fd4f&&_0x4f49f3['push']({'rawName':_0x550dbf,'tagName':_0x505afc,'outer':!!_0x24467c});}_0x49d8f0=_0xfa0fb4+0x1;}if(_0x4f49f3[_0x1c155a(0x168)]>0x0)return invalidMybatisSource(_0x1c155a(0x185)+_0x4f49f3['at'](-0x1)?.['rawName']+'>.');if(!_0x3fd766||!_0x5c5bb1)return invalidMybatisSource(_0x1c155a(0x1bb));return{'sql':_0x28797d['trim'](),'mode':'mybatisXml',..._0x4acac6?{'statementType':_0x4acac6}:{}};}function hasWellFormedXmlAttributes(_0x42d9ec){const _0x2ca39a=a227_0x492ce4;let _0x3e995d=0x0;const _0x271679=new Set();while(_0x3e995d<_0x42d9ec[_0x2ca39a(0x168)]){while(_0x3e995d<_0x42d9ec[_0x2ca39a(0x168)]&&/\s/[_0x2ca39a(0x1a2)](_0x42d9ec[_0x3e995d]??''))_0x3e995d+=0x1;if(_0x3e995d>=_0x42d9ec[_0x2ca39a(0x168)])return!![];const _0x220035=/^[A-Za-z_:][\w:.-]*/[_0x2ca39a(0x1a1)](_0x42d9ec[_0x2ca39a(0x186)](_0x3e995d)),_0xc3a2ca=_0x220035?.[0x0];if(!_0xc3a2ca||_0x271679['has'](_0xc3a2ca))return![];_0x271679[_0x2ca39a(0x177)](_0xc3a2ca),_0x3e995d+=_0xc3a2ca[_0x2ca39a(0x168)];while(_0x3e995d<_0x42d9ec[_0x2ca39a(0x168)]&&/\s/['test'](_0x42d9ec[_0x3e995d]??''))_0x3e995d+=0x1;if(_0x42d9ec[_0x3e995d]!=='=')return![];_0x3e995d+=0x1;while(_0x3e995d<_0x42d9ec[_0x2ca39a(0x168)]&&/\s/[_0x2ca39a(0x1a2)](_0x42d9ec[_0x3e995d]??''))_0x3e995d+=0x1;const _0x304870=_0x42d9ec[_0x3e995d];if(_0x304870!=='\x22'&&_0x304870!=='\x27')return![];_0x3e995d+=0x1;const _0x2e9e17=_0x42d9ec['indexOf'](_0x304870,_0x3e995d);if(_0x2e9e17<0x0)return![];if(decodeXmlEntities(_0x42d9ec['slice'](_0x3e995d,_0x2e9e17))===null)return![];_0x3e995d=_0x2e9e17+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x4cd625){const _0xcdf511=a227_0x492ce4;let _0x167bbc=0x0;const _0x529020=()=>{const _0x3a8403=a227_0x2c20;while(_0x167bbc<_0x4cd625[_0x3a8403(0x168)]&&/\s/[_0x3a8403(0x1a2)](_0x4cd625[_0x167bbc]??''))_0x167bbc+=0x1;};_0x529020();while(_0x167bbc<_0x4cd625['length']){if(_0x4cd625[_0xcdf511(0x19c)]('<!--',_0x167bbc)){const _0x1b18c1=_0x4cd625[_0xcdf511(0x196)](_0xcdf511(0x184),_0x167bbc+0x4);if(_0x1b18c1<0x0)return!![];_0x167bbc=_0x1b18c1+0x3,_0x529020();continue;}if(_0x4cd625['startsWith']('<?',_0x167bbc)){const _0x36e188=_0x4cd625[_0xcdf511(0x196)]('?>',_0x167bbc+0x2);if(_0x36e188<0x0)return!![];_0x167bbc=_0x36e188+0x2,_0x529020();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0xcdf511(0x1a2)](_0x4cd625[_0xcdf511(0x186)](_0x167bbc));}function invalidMybatisSource(_0xeb19bc){return{'sql':'','mode':'mybatisXml','error':_0xeb19bc};}function findXmlTagEnd(_0x18b358,_0x1ef0ba){const _0x3acdcb=a227_0x492ce4;let _0x58e5aa;for(let _0xbb60d8=_0x1ef0ba+0x1;_0xbb60d8<_0x18b358[_0x3acdcb(0x168)];_0xbb60d8+=0x1){const _0x757f4a=_0x18b358[_0xbb60d8];if(_0x58e5aa){if(_0x757f4a===_0x58e5aa)_0x58e5aa=undefined;continue;}if(_0x757f4a==='\x22'||_0x757f4a==='\x27'){_0x58e5aa=_0x757f4a;continue;}if(_0x757f4a==='>')return _0xbb60d8;}return-0x1;}function a227_0x2c20(_0xe8ba6a,_0x53fada){_0xe8ba6a=_0xe8ba6a-0x166;const _0x3545e1=a227_0x3545();let _0x2c2084=_0x3545e1[_0xe8ba6a];return _0x2c2084;}function decodeXmlEntities(_0x122b29){let _0xc1e468=![];const _0xb12de4=_0x122b29['replace'](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x56fe39=>{const _0x4cd681=a227_0x2c20;if(_0x56fe39==='&lt;')return'<';if(_0x56fe39===_0x4cd681(0x199))return'>';if(_0x56fe39===_0x4cd681(0x18c))return'\x22';if(_0x56fe39===_0x4cd681(0x1c3))return'\x27';if(_0x56fe39===_0x4cd681(0x17e))return'&';const _0x44acf7=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x4cd681(0x1a1)](_0x56fe39);if(_0x44acf7){const _0x27d646=_0x44acf7[0x1],_0x5d8524=_0x44acf7[0x2],_0x4d7e7d=Number[_0x4cd681(0x1c2)](_0x27d646??_0x5d8524??'',_0x27d646?0x10:0xa);if(isValidXmlCharacter(_0x4d7e7d))return String[_0x4cd681(0x192)](_0x4d7e7d);}return _0xc1e468=!![],'';});return _0xc1e468?null:_0xb12de4;}function isValidXmlCharacter(_0x41a218){return _0x41a218===0x9||_0x41a218===0xa||_0x41a218===0xd||_0x41a218>=0x20&&_0x41a218<=0xd7ff||_0x41a218>=0xe000&&_0x41a218<=0xfffd||_0x41a218>=0x10000&&_0x41a218<=0x10ffff;}export function detectSqlType(_0x3b5064){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x3b5064));}function detectNormalizedSqlType(_0x26f8d7){const _0x37ea11=a227_0x492ce4;if(_0x26f8d7[_0x37ea11(0x17f)])return{'type':_0x37ea11(0x1b1),'isSelectOnly':![],'isDangerous':![],'reason':_0x26f8d7[_0x37ea11(0x17f)]};if(!_0x26f8d7[_0x37ea11(0x1a3)][_0x37ea11(0x1ba)]())return{'type':_0x37ea11(0x1b1),'isSelectOnly':![],'isDangerous':![],'reason':_0x37ea11(0x172)};const _0x4d2ae6=stripStaticAnalysisMarkers(_0x26f8d7[_0x37ea11(0x1a3)])[_0x37ea11(0x16f)](/#\{[^}]*\}/g,'?')[_0x37ea11(0x16f)](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')[_0x37ea11(0x16f)](/\/\*[\s\S]*?\*\//g,'')[_0x37ea11(0x1ba)](),_0x88a180=_0x4d2ae6[_0x37ea11(0x1bd)]('\x0a');let _0x43045c='';for(const _0x316092 of _0x88a180){const _0x39188d=_0x316092['trim']();if(!_0x39188d||_0x39188d[_0x37ea11(0x19c)]('--')||_0x39188d['startsWith']('/*'))continue;_0x43045c=_0x39188d;break;}const _0x1f141d=_0x43045c[_0x37ea11(0x17b)](),_0x210f21=_0x26f8d7[_0x37ea11(0x1c7)],_0x3d4de5=maskSqlTextForBlockedKeywordScan(_0x4d2ae6),_0x23b3b7=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0x3d4de5);if(_0x210f21===_0x37ea11(0x1b6)||!_0x210f21&&(_0x1f141d[_0x37ea11(0x19c)](_0x37ea11(0x1b6))||_0x1f141d[_0x37ea11(0x19c)](_0x37ea11(0x171)))){const _0x4b2ee5=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x37ea11(0x1a2)](_0x4d2ae6);return{'type':'SELECT','isSelectOnly':!_0x4b2ee5,'isDangerous':_0x4b2ee5,'reason':_0x4b2ee5?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x210f21===_0x37ea11(0x1ad)||!_0x210f21&&_0x1f141d['startsWith'](_0x37ea11(0x1ad)))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x23b3b7,'reason':_0x23b3b7?_0x37ea11(0x1b5):undefined};if(_0x210f21==='UPDATE'||!_0x210f21&&_0x1f141d[_0x37ea11(0x19c)](_0x37ea11(0x181)))return{'type':_0x37ea11(0x181),'isSelectOnly':![],'isDangerous':_0x23b3b7,'reason':_0x23b3b7?_0x37ea11(0x1b5):undefined};if(_0x210f21===_0x37ea11(0x197)||!_0x210f21&&_0x1f141d['startsWith'](_0x37ea11(0x197)))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x37ea11(0x167)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x37ea11(0x1a2)](_0x1f141d))return{'type':_0x37ea11(0x173),'isSelectOnly':![],'isDangerous':!![],'reason':_0x37ea11(0x190)};return{'type':_0x37ea11(0x1b1),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x21091e){const _0x542d89=a227_0x492ce4;return _0x21091e[_0x542d89(0x1a8)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x542d89(0x1a8)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x15ed67){const _0x5e7ae5=a227_0x492ce4;return _0x15ed67[_0x5e7ae5(0x16f)](/'(?:''|\\.|[^'])*'/g,'\x20')['replace'](/"(?:""|\\.|[^"])*"/g,'\x20')['replace'](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x5e7ae5(0x16f)](/--.*$/gm,'\x20')[_0x5e7ae5(0x16f)](/#.*$/gm,'\x20')['replace'](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x52fb23){const _0x136769=a227_0x492ce4,_0x3f1dd3=_0x52fb23[_0x136769(0x16f)](/#\{[^}]*\}/g,'?')[_0x136769(0x16f)](/\$\{[^}]*\}/g,'?')[_0x136769(0x16f)](/'[^']*'/g,'\x27\x27')[_0x136769(0x16f)](/--.*$/gm,'')[_0x136769(0x16f)](/\/\*[\s\S]*?\*\//g,''),_0xb2093d=[],_0xccc4bb=_0x3f1dd3['match'](/FROM\s+([^\s,)(]+)/i);addTable(_0xb2093d,_0xccc4bb?.[0x1]);for(const _0x2ef4fd of _0x3f1dd3['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0xb2093d,_0x2ef4fd[0x1]);}const _0x48161d=_0x3f1dd3[_0x136769(0x17d)](/INTO\s+([^\s(]+)/i);addTable(_0xb2093d,_0x48161d?.[0x1]);const _0x191f35=_0x3f1dd3[_0x136769(0x17d)](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0xb2093d,_0x191f35?.[0x1]),_0xb2093d;}function addTable(_0x5c09dc,_0x1686b2){const _0x55647a=a227_0x492ce4,_0xfae982=_0x1686b2?.[_0x55647a(0x16f)](/[`"]/g,'');_0xfae982&&_0xfae982!==UNRESOLVED_SQL_FRAGMENT&&!_0x5c09dc[_0x55647a(0x193)](_0xfae982)&&_0x5c09dc[_0x55647a(0x17a)](_0xfae982);}function extractParameters(_0xd02ab2){const _0x531767=a227_0x492ce4,_0x27cef2=new Set();for(const _0x26ab32 of _0xd02ab2[_0x531767(0x16a)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x26ab32[0x1])_0x27cef2[_0x531767(0x177)](_0x26ab32[0x1]);}return Array[_0x531767(0x1a7)](_0x27cef2);}export function validateSql(_0x1a9ff0){const _0x2117e1=a227_0x492ce4,_0x2a8510=normalizeSqlForStaticAnalysis(_0x1a9ff0),_0x1ed543=detectNormalizedSqlType(_0x2a8510),_0x227abb=stripStaticAnalysisMarkers(_0x2a8510[_0x2117e1(0x1a3)]),_0x5708d6=_0x2a8510['error']?[]:extractTables(_0x227abb),_0xc0b285=_0x2a8510[_0x2117e1(0x17f)]?[]:extractParameters(_0x227abb);if(_0x1ed543[_0x2117e1(0x16c)])return{'valid':![],'sqlType':_0x1ed543,'tables':_0x5708d6,'parameters':_0xc0b285,'message':_0x1ed543[_0x2117e1(0x180)]||_0x1ed543['type']+_0x2117e1(0x175)};if(_0x1ed543[_0x2117e1(0x182)]===_0x2117e1(0x1b1))return{'valid':![],'sqlType':_0x1ed543,'tables':_0x5708d6,'parameters':_0xc0b285,'message':_0x2a8510[_0x2117e1(0x17f)]?_0x2117e1(0x1c1)+_0x2a8510[_0x2117e1(0x17f)]:_0x2117e1(0x189)};return{'valid':!![],'sqlType':_0x1ed543,'tables':_0x5708d6,'parameters':_0xc0b285,'message':_0x1ed543['type']+_0x2117e1(0x1a6)+(_0x5708d6[_0x2117e1(0x168)]?_0x5708d6[_0x2117e1(0x187)](',\x20'):_0x2117e1(0x169))+(_0xc0b285[_0x2117e1(0x168)]?_0x2117e1(0x16e)+_0xc0b285['join'](',\x20'):'')};}
@@ -0,0 +1,3 @@
1
+ import { CliError } from "@lovrabet/cli-framework";
2
+ export { CliError };
3
+ export declare const CliErrors: import("@lovrabet/cli-framework").CliErrorsShape;
package/lib/errors.js CHANGED
@@ -1 +1 @@
1
- function a236_0x32c8(){const _0x2c8492=['27452200gejpKl','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','9282960SSbEvi','2748VOFqNb','Tip:\x20`','1626iCbaaW','35077vAqQOS','606KRgsmi','Run\x20`','6654qLPmxZ','1176HHVNdA','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','3366940ojhfpk','10499152nMWNJV','\x20auth`\x20to\x20login\x20first.'];a236_0x32c8=function(){return _0x2c8492;};return a236_0x32c8();}function a236_0x4e6a(_0x37bfb4,_0xea5fc4){_0x37bfb4=_0x37bfb4-0x10e;const _0x32c8b5=a236_0x32c8();let _0x4e6a3d=_0x32c8b5[_0x37bfb4];return _0x4e6a3d;}const a236_0x4553db=a236_0x4e6a;(function(_0x43ec0e,_0x2d2cd5){const _0x465a4b=a236_0x4e6a,_0x43698e=_0x43ec0e();while(!![]){try{const _0xc3b281=-parseInt(_0x465a4b(0x111))/0x1*(parseInt(_0x465a4b(0x115))/0x2)+-parseInt(_0x465a4b(0x117))/0x3*(-parseInt(_0x465a4b(0x118))/0x4)+-parseInt(_0x465a4b(0x11a))/0x5+-parseInt(_0x465a4b(0x113))/0x6*(parseInt(_0x465a4b(0x114))/0x7)+parseInt(_0x465a4b(0x11b))/0x8+-parseInt(_0x465a4b(0x110))/0x9+parseInt(_0x465a4b(0x10e))/0xa;if(_0xc3b281===_0x2d2cd5)break;else _0x43698e['push'](_0x43698e['shift']());}catch(_0x503a3e){_0x43698e['push'](_0x43698e['shift']());}}}(a236_0x32c8,0xc6cad));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a236_0x4553db(0x116)+CLI_BIN_NAME+a236_0x4553db(0x11c),'configMissingHint':['Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.',a236_0x4553db(0x112)+CLI_BIN_NAME+a236_0x4553db(0x10f)]['join']('\x0a\x20\x20\x20\x20\x20\x20\x20'),'notInProjectHint':a236_0x4553db(0x119)});
1
+ const a228_0x2a2a70=a228_0x2baa;function a228_0x1e86(){const _0x366176=['5PLFgCT','5376924wQkiQi','1334755YHfBVf','338812uFtbGu','17920881xMXdWI','81836TkZhQb','\x0a\x20\x20\x20\x20\x20\x20\x20','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','Tip:\x20`','2956880GVcukm','Set\x20appcode\x20via\x20`','66nAQfaH','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','3001722oSuTZH','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'];a228_0x1e86=function(){return _0x366176;};return a228_0x1e86();}(function(_0x4a5b6d,_0x5461dd){const _0xdc2888=a228_0x2baa,_0x1d8f6c=_0x4a5b6d();while(!![]){try{const _0x31aa07=-parseInt(_0xdc2888(0x133))/0x1*(parseInt(_0xdc2888(0x136))/0x2)+-parseInt(_0xdc2888(0x12f))/0x3*(-parseInt(_0xdc2888(0x138))/0x4)+-parseInt(_0xdc2888(0x135))/0x5+-parseInt(_0xdc2888(0x131))/0x6+-parseInt(_0xdc2888(0x134))/0x7+parseInt(_0xdc2888(0x12d))/0x8+parseInt(_0xdc2888(0x137))/0x9;if(_0x31aa07===_0x5461dd)break;else _0x1d8f6c['push'](_0x1d8f6c['shift']());}catch(_0x3946d5){_0x1d8f6c['push'](_0x1d8f6c['shift']());}}}(a228_0x1e86,0x689e5));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a228_0x2baa(_0x504c56,_0x490dee){_0x504c56=_0x504c56-0x12a;const _0x1e864c=a228_0x1e86();let _0x2baa22=_0x1e864c[_0x504c56];return _0x2baa22;}export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':[a228_0x2a2a70(0x12e)+CLI_BIN_NAME+a228_0x2a2a70(0x130),a228_0x2a2a70(0x12c)+CLI_BIN_NAME+a228_0x2a2a70(0x132)]['join'](a228_0x2a2a70(0x12a)),'notInProjectHint':a228_0x2a2a70(0x12b)});
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition, FlagDef } from "../framework/types.js";
2
+ export declare function buildAllFlags(def: CommandDefinition): FlagDef[];
@@ -1 +1 @@
1
- (function(_0x13503b,_0x2f996b){const _0x4d428d=a237_0xef44,_0x561d57=_0x13503b();while(!![]){try{const _0x3fd69e=parseInt(_0x4d428d(0xfb))/0x1+-parseInt(_0x4d428d(0x107))/0x2*(parseInt(_0x4d428d(0xfd))/0x3)+-parseInt(_0x4d428d(0x101))/0x4+-parseInt(_0x4d428d(0xff))/0x5+-parseInt(_0x4d428d(0xfc))/0x6*(-parseInt(_0x4d428d(0x102))/0x7)+-parseInt(_0x4d428d(0x104))/0x8+parseInt(_0x4d428d(0x106))/0x9*(parseInt(_0x4d428d(0x103))/0xa);if(_0x3fd69e===_0x2f996b)break;else _0x561d57['push'](_0x561d57['shift']());}catch(_0x3fb53d){_0x561d57['push'](_0x561d57['shift']());}}}(a237_0x24d5,0xdbdd8));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a237_0xef44(_0x468f85,_0x1cfd41){_0x468f85=_0x468f85-0xfb;const _0x24d56f=a237_0x24d5();let _0xef4435=_0x24d56f[_0x468f85];return _0xef4435;}import{buildAllFlags as a237_0x2ddb68}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a237_0x24d5(){const _0x1ae1ec=['map','3793220WWLbnB','yes','3272664PCikqq','930020QsuNyJ','30tLcjhV','7003232kWPbIF','name','10831599zqmNNM','2nnnpcG','733825pAtNSB','30scIEly','4967628hbnNQZ'];a237_0x24d5=function(){return _0x1ae1ec;};return a237_0x24d5();}export function buildAllFlags(_0x47366b){const _0x452d83=a237_0xef44,_0x2c2740=a237_0x2ddb68(_0x47366b,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x47366b))return _0x2c2740;return _0x2c2740[_0x452d83(0xfe)](_0x517511=>_0x517511[_0x452d83(0x105)]===_0x452d83(0x100)?{..._0x517511,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x517511);}
1
+ (function(_0x36a564,_0x52a28b){const _0x6b271e=a229_0x4717,_0x535fc2=_0x36a564();while(!![]){try{const _0x3461c1=parseInt(_0x6b271e(0x1bb))/0x1+-parseInt(_0x6b271e(0x1bd))/0x2*(-parseInt(_0x6b271e(0x1b7))/0x3)+parseInt(_0x6b271e(0x1bc))/0x4*(-parseInt(_0x6b271e(0x1c2))/0x5)+parseInt(_0x6b271e(0x1be))/0x6*(-parseInt(_0x6b271e(0x1c1))/0x7)+parseInt(_0x6b271e(0x1ba))/0x8*(parseInt(_0x6b271e(0x1bf))/0x9)+parseInt(_0x6b271e(0x1b9))/0xa+parseInt(_0x6b271e(0x1c3))/0xb;if(_0x3461c1===_0x52a28b)break;else _0x535fc2['push'](_0x535fc2['shift']());}catch(_0x2deb7f){_0x535fc2['push'](_0x535fc2['shift']());}}}(a229_0x1e27,0xcfff9));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a229_0x11816a}from'@lovrabet/cli-framework';function a229_0x1e27(){const _0x499ebc=['1081528LbDFhY','461293BPrqfx','410460nsAMwv','3222DiQswP','6SKDWTl','45HpxhJv','yes','8790607ohyWFO','75wWUoBF','6920958TRDWJu','2439WkocZF','map','5708180jbSUck'];a229_0x1e27=function(){return _0x499ebc;};return a229_0x1e27();}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a229_0x4717(_0x3ecb3e,_0x573c35){_0x3ecb3e=_0x3ecb3e-0x1b7;const _0x1e27b3=a229_0x1e27();let _0x4717ff=_0x1e27b3[_0x3ecb3e];return _0x4717ff;}export function buildAllFlags(_0x3f77ed){const _0x184a11=a229_0x4717,_0x338f81=a229_0x11816a(_0x3f77ed,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x3f77ed))return _0x338f81;return _0x338f81[_0x184a11(0x1b8)](_0x2910e0=>_0x2910e0['name']===_0x184a11(0x1c0)?{..._0x2910e0,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x2910e0);}
@@ -0,0 +1,9 @@
1
+ import type { CommandDefinition, OutputFormat } from "../framework/types.js";
2
+ export declare function usesStructuredErrorOutput(def: CommandDefinition | undefined): def is CommandDefinition & {
3
+ structuredErrors: true;
4
+ };
5
+ export declare function resolveErrorOutputFormat(currentCommand: {
6
+ def?: CommandDefinition;
7
+ flags?: Record<string, any>;
8
+ defaultFormat?: OutputFormat;
9
+ }): OutputFormat;
@@ -1 +1 @@
1
- (function(_0x37913b,_0x4a9e07){var _0xa44022=a238_0x221a,_0x38d760=_0x37913b();while(!![]){try{var _0x3ac197=parseInt(_0xa44022(0x1c8))/0x1*(-parseInt(_0xa44022(0x1ca))/0x2)+-parseInt(_0xa44022(0x1c6))/0x3*(parseInt(_0xa44022(0x1c5))/0x4)+parseInt(_0xa44022(0x1cb))/0x5+parseInt(_0xa44022(0x1be))/0x6+parseInt(_0xa44022(0x1cc))/0x7+parseInt(_0xa44022(0x1c1))/0x8*(-parseInt(_0xa44022(0x1c3))/0x9)+parseInt(_0xa44022(0x1c9))/0xa*(parseInt(_0xa44022(0x1c4))/0xb);if(_0x3ac197===_0x4a9e07)break;else _0x38d760['push'](_0x38d760['shift']());}catch(_0x45a352){_0x38d760['push'](_0x38d760['shift']());}}}(a238_0x5ac8,0x76286));function a238_0x221a(_0x1ed4d4,_0x3431cc){_0x1ed4d4=_0x1ed4d4-0x1be;var _0x5ac803=a238_0x5ac8();var _0x221a35=_0x5ac803[_0x1ed4d4];return _0x221a35;}function a238_0x5ac8(){var _0x378f61=['def','6204824hBoOYE','structuredErrors','9zqhGiL','11qulSnX','84yHbuEf','79503JxNQNk','compress','209wvfYOC','3176290yJwhjD','3014WmsQfc','3095745sruPZI','2685389nbDpAg','4863936HzFSUG','defaultFormat'];a238_0x5ac8=function(){return _0x378f61;};return a238_0x5ac8();}import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x4ee3b1){var _0x13feb=a238_0x221a;return _0x4ee3b1?.[_0x13feb(0x1c2)]===!![];}export function resolveErrorOutputFormat(_0x435172){var _0x2b1d33=a238_0x221a;if(!_0x435172[_0x2b1d33(0x1c0)])return _0x435172[_0x2b1d33(0x1bf)]??_0x2b1d33(0x1c7);return resolveOutputConfig({'flags':_0x435172['flags']??{},'def':_0x435172[_0x2b1d33(0x1c0)],'configDefault':_0x435172['defaultFormat']})['format'];}
1
+ function a230_0x22f7(_0xe2b0cd,_0x735b49){_0xe2b0cd=_0xe2b0cd-0x1da;var _0x237650=a230_0x2376();var _0x22f7ad=_0x237650[_0xe2b0cd];return _0x22f7ad;}(function(_0x23a351,_0xfe9dcb){var _0x36d297=a230_0x22f7,_0x1247e5=_0x23a351();while(!![]){try{var _0x58af4c=parseInt(_0x36d297(0x1df))/0x1+parseInt(_0x36d297(0x1e1))/0x2*(-parseInt(_0x36d297(0x1e4))/0x3)+parseInt(_0x36d297(0x1de))/0x4*(-parseInt(_0x36d297(0x1e8))/0x5)+parseInt(_0x36d297(0x1e3))/0x6*(-parseInt(_0x36d297(0x1e0))/0x7)+-parseInt(_0x36d297(0x1e6))/0x8*(-parseInt(_0x36d297(0x1db))/0x9)+-parseInt(_0x36d297(0x1e5))/0xa+parseInt(_0x36d297(0x1dd))/0xb;if(_0x58af4c===_0xfe9dcb)break;else _0x1247e5['push'](_0x1247e5['shift']());}catch(_0x3878a2){_0x1247e5['push'](_0x1247e5['shift']());}}}(a230_0x2376,0x7f913));import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x50f9ee){var _0x442e24=a230_0x22f7;return _0x50f9ee?.[_0x442e24(0x1e2)]===!![];}function a230_0x2376(){var _0x476aa6=['9iEecSo','defaultFormat','17183881FIrhHD','100sihteU','293276gshIPB','28GVYKTI','4uNgWII','structuredErrors','837498tLgXcQ','1534371JtTikT','2122200YDPRld','7037872PIIaiV','flags','83840nvTLES','def'];a230_0x2376=function(){return _0x476aa6;};return a230_0x2376();}export function resolveErrorOutputFormat(_0x108bdd){var _0xd6ebcd=a230_0x22f7;if(!_0x108bdd[_0xd6ebcd(0x1da)])return _0x108bdd[_0xd6ebcd(0x1dc)]??'compress';return resolveOutputConfig({'flags':_0x108bdd[_0xd6ebcd(0x1e7)]??{},'def':_0x108bdd['def'],'configDefault':_0x108bdd[_0xd6ebcd(0x1dc)]})['format'];}
@@ -0,0 +1,3 @@
1
+ import type { CommandDefinition } from "../framework/types.js";
2
+ export declare const EXPLICIT_YES_FLAG_DESCRIPTION = "Required for execution after reviewing the --dry-run plan";
3
+ export declare function requiresExplicitYes(def: CommandDefinition): boolean;
@@ -1 +1 @@
1
- const a239_0x11ba9f=a239_0x447f;(function(_0x2b0a14,_0x544989){const _0x2363e6=a239_0x447f,_0x5b6916=_0x2b0a14();while(!![]){try{const _0x4cf929=parseInt(_0x2363e6(0xc7))/0x1+-parseInt(_0x2363e6(0xbb))/0x2+parseInt(_0x2363e6(0xcb))/0x3+-parseInt(_0x2363e6(0xba))/0x4+-parseInt(_0x2363e6(0xc2))/0x5+-parseInt(_0x2363e6(0xc3))/0x6+parseInt(_0x2363e6(0xbc))/0x7*(parseInt(_0x2363e6(0xc5))/0x8);if(_0x4cf929===_0x544989)break;else _0x5b6916['push'](_0x5b6916['shift']());}catch(_0x17ba8b){_0x5b6916['push'](_0x5b6916['shift']());}}}(a239_0x3eca,0x6f61b));function a239_0x447f(_0x2b2a60,_0x3233bb){_0x2b2a60=_0x2b2a60-0xba;const _0x3ecad3=a239_0x3eca();let _0x447fe4=_0x3ecad3[_0x2b2a60];return _0x447fe4;}const EXPLICIT_YES_COMMANDS=new Set([a239_0x11ba9f(0xc4),a239_0x11ba9f(0xbf),a239_0x11ba9f(0xc6),'menu\x20group-create',a239_0x11ba9f(0xc8),'menu\x20move',a239_0x11ba9f(0xc0),a239_0x11ba9f(0xc9),a239_0x11ba9f(0xc1),a239_0x11ba9f(0xbe)]);function a239_0x3eca(){const _0x250d35=['689453gWmJcD','menu\x20group-update','kb\x20create','has','2016132fDtFro','command','3473028vCZBmA','1483574qONmQG','375893ODoFyk','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','kb\x20delete','menu\x20rename','menu\x20regroup-start','kb\x20update','3363840zrkOAe','3978168BYXjZZ','menu\x20external-link-update','304kfSoAY','menu\x20delete'];a239_0x3eca=function(){return _0x250d35;};return a239_0x3eca();}export const EXPLICIT_YES_FLAG_DESCRIPTION=a239_0x11ba9f(0xbd);export function requiresExplicitYes(_0xfa32fe){const _0x354575=a239_0x11ba9f;return EXPLICIT_YES_COMMANDS[_0x354575(0xca)](_0xfa32fe['service']+'\x20'+_0xfa32fe[_0x354575(0xcc)]);}
1
+ function a231_0x259d(){const _0x53fce4=['menu\x20external-link-update','900162LSxqfj','2225685DOIJiE','203991eHapwQ','369838YKmfhg','service','kb\x20update','kb\x20create','command','1935983zKIvfy','873148fvaTWM','has','260304MpsIme','kb\x20delete'];a231_0x259d=function(){return _0x53fce4;};return a231_0x259d();}const a231_0x3d6c83=a231_0x3eca;(function(_0x5b094b,_0x207e5f){const _0x2abfb3=a231_0x3eca,_0x36d005=_0x5b094b();while(!![]){try{const _0x577025=parseInt(_0x2abfb3(0x9f))/0x1+parseInt(_0x2abfb3(0x97))/0x2+-parseInt(_0x2abfb3(0x96))/0x3+parseInt(_0x2abfb3(0x9d))/0x4+-parseInt(_0x2abfb3(0x95))/0x5+-parseInt(_0x2abfb3(0x94))/0x6+parseInt(_0x2abfb3(0x9c))/0x7;if(_0x577025===_0x207e5f)break;else _0x36d005['push'](_0x36d005['shift']());}catch(_0x343988){_0x36d005['push'](_0x36d005['shift']());}}}(a231_0x259d,0x439b6));const EXPLICIT_YES_COMMANDS=new Set([a231_0x3d6c83(0x93),'menu\x20delete','menu\x20regroup-start',a231_0x3d6c83(0x9a),a231_0x3d6c83(0x99),a231_0x3d6c83(0xa0)]);export const EXPLICIT_YES_FLAG_DESCRIPTION='Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan';function a231_0x3eca(_0x3ff711,_0x206917){_0x3ff711=_0x3ff711-0x93;const _0x259dde=a231_0x259d();let _0x3eca22=_0x259dde[_0x3ff711];return _0x3eca22;}export function requiresExplicitYes(_0x1585fe){const _0x162723=a231_0x3d6c83;return EXPLICIT_YES_COMMANDS[_0x162723(0x9e)](_0x1585fe[_0x162723(0x98)]+'\x20'+_0x1585fe[_0x162723(0x9b)]);}
@@ -0,0 +1,3 @@
1
+ export type { ParsedFlags } from "@lovrabet/cli-framework";
2
+ export declare const parseFlags: (defs: import("@lovrabet/cli-framework").FlagDef[], rawFlags: Record<string, any>) => import("@lovrabet/cli-framework").ParsedFlags;
3
+ export declare const validateFlags: (defs: import("@lovrabet/cli-framework").FlagDef[], parsed: import("@lovrabet/cli-framework").ParsedFlags, commandLabel: string) => void;
@@ -1 +1 @@
1
- (function(_0x18cbf4,_0x53948b){const _0x14c2d5=a240_0x4360,_0x1075b0=_0x18cbf4();while(!![]){try{const _0x4dd206=-parseInt(_0x14c2d5(0xfd))/0x1*(-parseInt(_0x14c2d5(0xff))/0x2)+-parseInt(_0x14c2d5(0x103))/0x3*(parseInt(_0x14c2d5(0xfe))/0x4)+-parseInt(_0x14c2d5(0xfc))/0x5+-parseInt(_0x14c2d5(0xfa))/0x6*(parseInt(_0x14c2d5(0xfb))/0x7)+parseInt(_0x14c2d5(0x100))/0x8+parseInt(_0x14c2d5(0x101))/0x9*(parseInt(_0x14c2d5(0x104))/0xa)+parseInt(_0x14c2d5(0x102))/0xb;if(_0x4dd206===_0x53948b)break;else _0x1075b0['push'](_0x1075b0['shift']());}catch(_0x5bcd75){_0x1075b0['push'](_0x1075b0['shift']());}}}(a240_0x3ab8,0xc35b8));function a240_0x3ab8(){const _0x533c1a=['1mpHnde','116LiiZuM','1670314SaKciR','5409608LcFAFX','1432746zdhkEE','12435126ZAPUPo','8796rYqgwW','20HdjhqI','235806mhDqNU','119yOhRPM','7034415wVrYVC'];a240_0x3ab8=function(){return _0x533c1a;};return a240_0x3ab8();}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a240_0x4360(_0x3d4e5d,_0x384f2d){_0x3d4e5d=_0x3d4e5d-0xfa;const _0x3ab835=a240_0x3ab8();let _0x43601d=_0x3ab835[_0x3d4e5d];return _0x43601d;}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers['validateFlags'];
1
+ function a232_0x4cd3(_0x2e22bc,_0x23216c){_0x2e22bc=_0x2e22bc-0x1e0;const _0x97b39b=a232_0x97b3();let _0x4cd318=_0x97b39b[_0x2e22bc];return _0x4cd318;}const a232_0x297204=a232_0x4cd3;(function(_0x17e775,_0x1b6fe1){const _0x15ca6c=a232_0x4cd3,_0x3f5a4c=_0x17e775();while(!![]){try{const _0x5a8656=-parseInt(_0x15ca6c(0x1ed))/0x1*(parseInt(_0x15ca6c(0x1e1))/0x2)+-parseInt(_0x15ca6c(0x1e7))/0x3*(parseInt(_0x15ca6c(0x1e3))/0x4)+-parseInt(_0x15ca6c(0x1e6))/0x5*(-parseInt(_0x15ca6c(0x1e2))/0x6)+-parseInt(_0x15ca6c(0x1e0))/0x7*(parseInt(_0x15ca6c(0x1e8))/0x8)+parseInt(_0x15ca6c(0x1e9))/0x9*(-parseInt(_0x15ca6c(0x1ec))/0xa)+-parseInt(_0x15ca6c(0x1e4))/0xb*(parseInt(_0x15ca6c(0x1eb))/0xc)+parseInt(_0x15ca6c(0x1ee))/0xd;if(_0x5a8656===_0x1b6fe1)break;else _0x3f5a4c['push'](_0x3f5a4c['shift']());}catch(_0x39f534){_0x3f5a4c['push'](_0x3f5a4c['shift']());}}}(a232_0x97b3,0xe5099));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a232_0x97b3(){const _0x3bca44=['68727906JEfTIS','14HkdMsu','3525958gceRFG','13854bWprTz','684316lymtao','11XDAMKT','validateFlags','1465cBnRDk','6alElUb','1909216CqmNtC','126wniENQ','parseFlags','8851092cBiDal','1217950oFxBEp','1PYqHty'];a232_0x97b3=function(){return _0x3bca44;};return a232_0x97b3();}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a232_0x297204(0x1ea)];export const validateFlags=helpers[a232_0x297204(0x1e5)];
@@ -0,0 +1,4 @@
1
+ import type { CommandDefinition } from "../framework/types.js";
2
+ export declare function generateCommandHelp(def: CommandDefinition): string;
3
+ export declare const generateServiceHelp: (service: string) => string;
4
+ export declare const generateFullHelp: () => string;
@@ -1 +1 @@
1
- const a241_0x196134=a241_0x5ef1;(function(_0x135dac,_0x1e5721){const _0x32bd88=a241_0x5ef1,_0x5f49d5=_0x135dac();while(!![]){try{const _0x2204ac=parseInt(_0x32bd88(0x7e))/0x1+parseInt(_0x32bd88(0x70))/0x2+parseInt(_0x32bd88(0x7a))/0x3*(-parseInt(_0x32bd88(0x78))/0x4)+-parseInt(_0x32bd88(0x71))/0x5+-parseInt(_0x32bd88(0x75))/0x6+-parseInt(_0x32bd88(0x7c))/0x7*(parseInt(_0x32bd88(0x7b))/0x8)+parseInt(_0x32bd88(0x7f))/0x9*(parseInt(_0x32bd88(0x72))/0xa);if(_0x2204ac===_0x1e5721)break;else _0x5f49d5['push'](_0x5f49d5['shift']());}catch(_0x1f5b98){_0x5f49d5['push'](_0x5f49d5['shift']());}}}(a241_0x5477,0x41f64));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x28e761=>serviceGroups[a241_0x196134(0x77)](_0x28e761),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20`'+CLI_BIN_NAME+'\x20workspace\x20init`\x20or\x20--appcode).','serviceUsageSuffix':'\x20[args]\x20[flags]'});function a241_0x5477(){const _0x272cd3=['633605VydCRb','1670950RqtEVw','generateFullHelp','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','1407918LMkcWJ','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','get','30860jeFzcA','generateServiceHelp','123jCKLCg','1003048OXJYtu','21hRDicE','generateCommandHelp','202083dkJEZH','45IRBdTm','572908AfRTVW'];a241_0x5477=function(){return _0x272cd3;};return a241_0x5477();}function a241_0x5ef1(_0xb79a9f,_0x1b76cd){_0xb79a9f=_0xb79a9f-0x70;const _0x5477bf=a241_0x5477();let _0x5ef1de=_0x5477bf[_0xb79a9f];return _0x5ef1de;}export function generateCommandHelp(_0x4f2aae){const _0x12daa8=a241_0x196134,_0x455251=generators[_0x12daa8(0x7d)](_0x4f2aae);if(!requiresExplicitYes(_0x4f2aae))return _0x455251;return _0x455251['replace'](_0x12daa8(0x74),_0x12daa8(0x76));}export const generateServiceHelp=generators[a241_0x196134(0x79)];export const generateFullHelp=generators[a241_0x196134(0x73)];
1
+ function a233_0x3327(_0x473cfc,_0xa06728){_0x473cfc=_0x473cfc-0x1b9;const _0x4b5337=a233_0x4b53();let _0x3327a4=_0x4b5337[_0x473cfc];return _0x3327a4;}const a233_0x4017d9=a233_0x3327;(function(_0x226208,_0x40c450){const _0x33c053=a233_0x3327,_0x1376fb=_0x226208();while(!![]){try{const _0x21081f=-parseInt(_0x33c053(0x1b9))/0x1+parseInt(_0x33c053(0x1ba))/0x2+-parseInt(_0x33c053(0x1c6))/0x3*(parseInt(_0x33c053(0x1c5))/0x4)+-parseInt(_0x33c053(0x1c8))/0x5+parseInt(_0x33c053(0x1c2))/0x6*(-parseInt(_0x33c053(0x1c9))/0x7)+parseInt(_0x33c053(0x1c4))/0x8+-parseInt(_0x33c053(0x1be))/0x9*(-parseInt(_0x33c053(0x1c0))/0xa);if(_0x21081f===_0x40c450)break;else _0x1376fb['push'](_0x1376fb['shift']());}catch(_0x2b97bd){_0x1376fb['push'](_0x1376fb['shift']());}}}(a233_0x4b53,0xde05e));function a233_0x4b53(){const _0x3291d9=['\x20[args]\x20[flags]','get','5379858dalZof','replace','50naACHv','Requires\x20appcode\x20(set\x20via\x20`','8646594NZOFdZ','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','10723752eKFeKH','16xKwKyz','958611rfmmKl','generateServiceHelp','3647885BbqPwG','7wQzhDx','1167027hJsvtn','2391956NMDfrm','\x20workspace\x20init`\x20or\x20--appcode).'];a233_0x4b53=function(){return _0x3291d9;};return a233_0x4b53();}import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x754de4=>serviceGroups[a233_0x4017d9(0x1bd)](_0x754de4),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a233_0x4017d9(0x1c1)+CLI_BIN_NAME+a233_0x4017d9(0x1bb),'serviceUsageSuffix':a233_0x4017d9(0x1bc)});export function generateCommandHelp(_0x4b62e2){const _0x59bb8b=a233_0x4017d9,_0x2fb34a=generators['generateCommandHelp'](_0x4b62e2);if(!requiresExplicitYes(_0x4b62e2))return _0x2fb34a;return _0x2fb34a[_0x59bb8b(0x1bf)]('Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.',_0x59bb8b(0x1c3));}export const generateServiceHelp=generators[a233_0x4017d9(0x1c7)];export const generateFullHelp=generators['generateFullHelp'];
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 声明式命令框架 —— 统一导出
3
+ */
4
+ export type { Risk, FlagDef, CommandDefinition, CommandResult, DryRunResult, RuntimeContext, OutputFormat, OutputEnvelope, } from "../framework/types.js";
5
+ export { runCommand } from "../framework/runner.js";
6
+ export { parseFlags, validateFlags } from "../framework/flags.js";
7
+ export { formatOutput } from "../framework/output.js";
8
+ export { generateCommandHelp, generateServiceHelp, generateFullHelp, } from "../framework/help.js";
9
+ export { extractList, extractPaging } from "../framework/response.js";
10
+ export type { Paging, ListResponse } from "../framework/response.js";
11
+ export { riskLevelOrder } from "../framework/types.js";
@@ -1 +1 @@
1
- (function(_0x364fdf,_0x3d18df){var _0x431cb1=a242_0x1a87,_0x49d75c=_0x364fdf();while(!![]){try{var _0x315aad=parseInt(_0x431cb1(0x145))/0x1+parseInt(_0x431cb1(0x140))/0x2*(-parseInt(_0x431cb1(0x13e))/0x3)+parseInt(_0x431cb1(0x13d))/0x4*(parseInt(_0x431cb1(0x147))/0x5)+-parseInt(_0x431cb1(0x144))/0x6*(-parseInt(_0x431cb1(0x141))/0x7)+parseInt(_0x431cb1(0x142))/0x8*(parseInt(_0x431cb1(0x143))/0x9)+-parseInt(_0x431cb1(0x13f))/0xa+parseInt(_0x431cb1(0x146))/0xb;if(_0x315aad===_0x3d18df)break;else _0x49d75c['push'](_0x49d75c['shift']());}catch(_0x2bbb52){_0x49d75c['push'](_0x49d75c['shift']());}}}(a242_0x4d0b,0x8731e));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';function a242_0x1a87(_0x5812e5,_0x3813e6){_0x5812e5=_0x5812e5-0x13d;var _0x4d0bd8=a242_0x4d0b();var _0x1a87d7=_0x4d0bd8[_0x5812e5];return _0x1a87d7;}export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';function a242_0x4d0b(){var _0x11ed3a=['5510428mPBWZt','2762195Zfcdua','4GQSdND','2870949KYPXWi','9263670TvPeWZ','2ZoDjkD','2373TvWpjD','74864nFKQjF','9wIoTaW','5106CiYHOK','1085874rYUtlw'];a242_0x4d0b=function(){return _0x11ed3a;};return a242_0x4d0b();}
1
+ (function(_0x32b495,_0x50457b){var _0x348581=a234_0x1611,_0x1c7762=_0x32b495();while(!![]){try{var _0x2ebb18=-parseInt(_0x348581(0x9a))/0x1*(parseInt(_0x348581(0x9d))/0x2)+parseInt(_0x348581(0x98))/0x3*(-parseInt(_0x348581(0xa1))/0x4)+parseInt(_0x348581(0x99))/0x5*(-parseInt(_0x348581(0x97))/0x6)+-parseInt(_0x348581(0x9e))/0x7+-parseInt(_0x348581(0x9b))/0x8+parseInt(_0x348581(0x9f))/0x9+parseInt(_0x348581(0xa0))/0xa*(parseInt(_0x348581(0x9c))/0xb);if(_0x2ebb18===_0x50457b)break;else _0x1c7762['push'](_0x1c7762['shift']());}catch(_0x16dc3f){_0x1c7762['push'](_0x1c7762['shift']());}}}(a234_0x4610,0xc04e8));export{runCommand}from'../framework/runner.js';function a234_0x4610(){var _0x26cde5=['429928GbKWMx','579078LEglwN','24pMBpEj','65zTUUNV','254764JjghfJ','8473112gTQnTQ','2111428vVfDvs','2KJBmRW','2199379mmmqvo','13132305XTfgji','160DLhNjH'];a234_0x4610=function(){return _0x26cde5;};return a234_0x4610();}export{parseFlags,validateFlags}from'../framework/flags.js';function a234_0x1611(_0xe361dc,_0x391f5){_0xe361dc=_0xe361dc-0x97;var _0x4610a4=a234_0x4610();var _0x161169=_0x4610a4[_0xe361dc];return _0x161169;}export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
@@ -0,0 +1,15 @@
1
+ import { CliError } from "../errors.js";
2
+ import type { CommandResultWithNotice, OutputFormat, Risk } from "../framework/types.js";
3
+ interface OutputOptions {
4
+ command: string;
5
+ risk: Risk;
6
+ format: OutputFormat;
7
+ dryRun?: boolean;
8
+ jqFilter?: string;
9
+ }
10
+ interface ErrorOutputOptions extends OutputOptions {
11
+ format: OutputFormat;
12
+ }
13
+ export declare function formatOutput<T>(result: CommandResultWithNotice<T>, options: OutputOptions): void;
14
+ export declare function formatCliError(error: CliError, options: ErrorOutputOptions): boolean;
15
+ export {};
@@ -1 +1 @@
1
- (function(_0x270497,_0x1ef7d5){const _0x58abc3=a243_0x46ae,_0x5f274c=_0x270497();while(!![]){try{const _0x19306b=-parseInt(_0x58abc3(0x85))/0x1*(-parseInt(_0x58abc3(0x9b))/0x2)+parseInt(_0x58abc3(0x95))/0x3+-parseInt(_0x58abc3(0x94))/0x4*(-parseInt(_0x58abc3(0x92))/0x5)+parseInt(_0x58abc3(0x84))/0x6*(parseInt(_0x58abc3(0x8c))/0x7)+parseInt(_0x58abc3(0x83))/0x8+-parseInt(_0x58abc3(0x82))/0x9+-parseInt(_0x58abc3(0x81))/0xa*(parseInt(_0x58abc3(0x80))/0xb);if(_0x19306b===_0x1ef7d5)break;else _0x5f274c['push'](_0x5f274c['shift']());}catch(_0x83a0c){_0x5f274c['push'](_0x5f274c['shift']());}}}(a243_0x8254,0xedaf2));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x59b2e4,_0x4c8b8d){const _0x1f3f56=a243_0x46ae,_0x34bcf7=_0x59b2e4['_notice'],{_notice:_0x1cbc40,..._0x9c9b08}=_0x59b2e4;void _0x1cbc40,baseFormatOutput(_0x9c9b08,_0x4c8b8d),_0x4c8b8d[_0x1f3f56(0x87)]===_0x1f3f56(0x8b)&&printPrettyNotice(_0x34bcf7);}function a243_0x46ae(_0x5d7493,_0x48d245){_0x5d7493=_0x5d7493-0x80;const _0x8254c2=a243_0x8254();let _0x46ae6b=_0x8254c2[_0x5d7493];return _0x46ae6b;}export function formatCliError(_0x9dba1d,_0x3eddde){const _0x10ae7c=a243_0x46ae;if(_0x3eddde['format']==='pretty')return![];const _0x12d514=_0x9dba1d[_0x10ae7c(0x99)],_0x582d6a={'ok':![],'command':_0x3eddde[_0x10ae7c(0x88)],'risk':_0x3eddde[_0x10ae7c(0x93)],'data':_0x12d514??null,'error':{'code':_0x9dba1d['code'],'message':_0x9dba1d[_0x10ae7c(0x98)],..._0x9dba1d[_0x10ae7c(0x8d)]?{'hint':_0x9dba1d['hint']}:{}}},_0x196c29=_0x3eddde['format']==='json'?JSON[_0x10ae7c(0x8f)](_0x582d6a,null,0x2):JSON[_0x10ae7c(0x8f)](_0x582d6a);let _0x3a6ca4=_0x196c29;if(_0x3eddde[_0x10ae7c(0x9a)]?.['trim']())try{_0x3a6ca4=applyJqFilter(_0x196c29,_0x3eddde['jqFilter']);}catch(_0x2e31f2){const _0x45a430=_0x2e31f2 instanceof CliError?_0x2e31f2:CliErrors[_0x10ae7c(0x9c)](_0x10ae7c(0x8a)+(_0x2e31f2 instanceof Error?_0x2e31f2[_0x10ae7c(0x98)]:String(_0x2e31f2))),_0x366453={..._0x582d6a,'error':{'code':_0x45a430[_0x10ae7c(0x90)],'message':_0x45a430['message'],..._0x45a430[_0x10ae7c(0x8d)]?{'hint':_0x45a430['hint']}:{},'cause':_0x582d6a[_0x10ae7c(0x89)]}};_0x3a6ca4=_0x3eddde[_0x10ae7c(0x87)]===_0x10ae7c(0x86)?JSON['stringify'](_0x366453,null,0x2):JSON[_0x10ae7c(0x8f)](_0x366453);}return process[_0x10ae7c(0x91)][_0x10ae7c(0x8e)](_0x3a6ca4['endsWith']('\x0a')?_0x3a6ca4:_0x3a6ca4+'\x0a'),!![];}function printPrettyNotice(_0xe048b7){const _0x3998c4=a243_0x46ae;if(!_0xe048b7?.[_0x3998c4(0x96)])return;console[_0x3998c4(0x89)](_0xe048b7[_0x3998c4(0x96)][_0x3998c4(0x98)]+'\x20('+_0xe048b7['update'][_0x3998c4(0x97)]+')');}function a243_0x8254(){const _0x260476=['pretty','1176ownwGO','hint','write','stringify','code','stdout','92215DsMCPN','risk','228QBGzeY','5420487woiQVT','update','url','message','data','jqFilter','20lilzAF','validation','2057fWLAKM','163160VZkxRe','12165750LlZprH','3063952vHLKMd','59754dMrxuF','46221cSUIIe','json','format','command','error','jq:\x20'];a243_0x8254=function(){return _0x260476;};return a243_0x8254();}
1
+ (function(_0x43171d,_0x29e607){const _0x5ad467=a235_0x5d6d,_0x3044a5=_0x43171d();while(!![]){try{const _0xf8645f=-parseInt(_0x5ad467(0x12b))/0x1*(parseInt(_0x5ad467(0x133))/0x2)+parseInt(_0x5ad467(0x135))/0x3*(parseInt(_0x5ad467(0x134))/0x4)+-parseInt(_0x5ad467(0x142))/0x5*(-parseInt(_0x5ad467(0x13f))/0x6)+parseInt(_0x5ad467(0x13a))/0x7+-parseInt(_0x5ad467(0x140))/0x8+-parseInt(_0x5ad467(0x145))/0x9+parseInt(_0x5ad467(0x139))/0xa*(-parseInt(_0x5ad467(0x12c))/0xb);if(_0xf8645f===_0x29e607)break;else _0x3044a5['push'](_0x3044a5['shift']());}catch(_0xecad75){_0x3044a5['push'](_0x3044a5['shift']());}}}(a235_0x2579,0xb811d));function a235_0x5d6d(_0x30a2cd,_0x341b86){_0x30a2cd=_0x30a2cd-0x12b;const _0x25790c=a235_0x2579();let _0x5d6d88=_0x25790c[_0x30a2cd];return _0x5d6d88;}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a235_0x2579(){const _0x16d5bf=['stdout','endsWith','442330HcsEAs','815458VXJFyl','jqFilter','stringify','hint','url','4320588bSkLeb','1326504obNknD','risk','5ZgbxOS','message','json','3343302grtXwP','write','705803UbZzzk','77QLrXYJ','update','error','pretty','format','trim','code','2yXfRql','16244BbXAFm','1086bsSgWZ','_notice'];a235_0x2579=function(){return _0x16d5bf;};return a235_0x2579();}import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0xd22b08,_0x40fb7c){const _0x31d791=a235_0x5d6d,_0xe33d42=_0xd22b08[_0x31d791(0x136)],{_notice:_0x8bd63f,..._0x38d01d}=_0xd22b08;void _0x8bd63f,baseFormatOutput(_0x38d01d,_0x40fb7c),_0x40fb7c[_0x31d791(0x130)]===_0x31d791(0x12f)&&printPrettyNotice(_0xe33d42);}export function formatCliError(_0x25bf61,_0x1ee673){const _0x2d79f1=a235_0x5d6d;if(_0x1ee673[_0x2d79f1(0x130)]===_0x2d79f1(0x12f))return![];const _0x429d64=_0x25bf61['data'],_0x3c6042={'ok':![],'command':_0x1ee673['command'],'risk':_0x1ee673[_0x2d79f1(0x141)],'data':_0x429d64??null,'error':{'code':_0x25bf61[_0x2d79f1(0x132)],'message':_0x25bf61[_0x2d79f1(0x143)],..._0x25bf61[_0x2d79f1(0x13d)]?{'hint':_0x25bf61[_0x2d79f1(0x13d)]}:{}}},_0x4ff94e=_0x1ee673[_0x2d79f1(0x130)]===_0x2d79f1(0x144)?JSON[_0x2d79f1(0x13c)](_0x3c6042,null,0x2):JSON[_0x2d79f1(0x13c)](_0x3c6042);let _0x304e8f=_0x4ff94e;if(_0x1ee673[_0x2d79f1(0x13b)]?.[_0x2d79f1(0x131)]())try{_0x304e8f=applyJqFilter(_0x4ff94e,_0x1ee673[_0x2d79f1(0x13b)]);}catch(_0x45ffb4){const _0x5d1a22=_0x45ffb4 instanceof CliError?_0x45ffb4:CliErrors['validation']('jq:\x20'+(_0x45ffb4 instanceof Error?_0x45ffb4[_0x2d79f1(0x143)]:String(_0x45ffb4))),_0x4d8512={..._0x3c6042,'error':{'code':_0x5d1a22[_0x2d79f1(0x132)],'message':_0x5d1a22[_0x2d79f1(0x143)],..._0x5d1a22[_0x2d79f1(0x13d)]?{'hint':_0x5d1a22['hint']}:{},'cause':_0x3c6042[_0x2d79f1(0x12e)]}};_0x304e8f=_0x1ee673['format']===_0x2d79f1(0x144)?JSON[_0x2d79f1(0x13c)](_0x4d8512,null,0x2):JSON[_0x2d79f1(0x13c)](_0x4d8512);}return process[_0x2d79f1(0x137)][_0x2d79f1(0x146)](_0x304e8f[_0x2d79f1(0x138)]('\x0a')?_0x304e8f:_0x304e8f+'\x0a'),!![];}function printPrettyNotice(_0x146078){const _0x30a599=a235_0x5d6d;if(!_0x146078?.[_0x30a599(0x12d)])return;console[_0x30a599(0x12e)](_0x146078[_0x30a599(0x12d)][_0x30a599(0x143)]+'\x20('+_0x146078[_0x30a599(0x12d)][_0x30a599(0x13e)]+')');}
@@ -0,0 +1,2 @@
1
+ export { extractList, extractPaging } from "@lovrabet/cli-framework";
2
+ export type { Paging, ListResponse } from "@lovrabet/cli-framework";
@@ -1 +1 @@
1
- function a244_0x3316(_0x50867d,_0x303b1b){_0x50867d=_0x50867d-0x182;var _0x408b33=a244_0x408b();var _0x331657=_0x408b33[_0x50867d];return _0x331657;}(function(_0x211459,_0x5160cc){var _0x1fb95e=a244_0x3316,_0xd0ecb7=_0x211459();while(!![]){try{var _0x135d09=parseInt(_0x1fb95e(0x185))/0x1*(-parseInt(_0x1fb95e(0x18b))/0x2)+parseInt(_0x1fb95e(0x183))/0x3+-parseInt(_0x1fb95e(0x18c))/0x4*(-parseInt(_0x1fb95e(0x184))/0x5)+-parseInt(_0x1fb95e(0x182))/0x6+-parseInt(_0x1fb95e(0x186))/0x7*(-parseInt(_0x1fb95e(0x18a))/0x8)+-parseInt(_0x1fb95e(0x189))/0x9*(parseInt(_0x1fb95e(0x18d))/0xa)+-parseInt(_0x1fb95e(0x188))/0xb*(-parseInt(_0x1fb95e(0x187))/0xc);if(_0x135d09===_0x5160cc)break;else _0xd0ecb7['push'](_0xd0ecb7['shift']());}catch(_0x2d9a1f){_0xd0ecb7['push'](_0xd0ecb7['shift']());}}}(a244_0x408b,0x98346));function a244_0x408b(){var _0x2d0aa2=['1130VQVaoK','3228054qrZcCS','2300835Fxssho','720GPyhbu','3heTNgA','421169KYusAX','14352708WCSuYn','11qrNtHj','5571MphYHG','16olDVUA','585824ZUkRIF','744NlXVRX'];a244_0x408b=function(){return _0x2d0aa2;};return a244_0x408b();}export{extractList,extractPaging}from'@lovrabet/cli-framework';
1
+ function a236_0x4d74(){var _0x47471a=['465114ZmQwKk','14sVkwGU','135IlmIEX','7213328oYTDSw','64970QleJan','1065570NIkIpY','8RcapJF','2514230FmhDdW','982374TcKpwh','2075285IWlQMG'];a236_0x4d74=function(){return _0x47471a;};return a236_0x4d74();}(function(_0x518d2e,_0xc6c645){var _0x3ac50d=a236_0x44ee,_0x5c2e1c=_0x518d2e();while(!![]){try{var _0x4e004f=parseInt(_0x3ac50d(0x151))/0x1+-parseInt(_0x3ac50d(0x153))/0x2+-parseInt(_0x3ac50d(0x154))/0x3*(-parseInt(_0x3ac50d(0x152))/0x4)+-parseInt(_0x3ac50d(0x14b))/0x5+parseInt(_0x3ac50d(0x14c))/0x6*(-parseInt(_0x3ac50d(0x14d))/0x7)+parseInt(_0x3ac50d(0x14f))/0x8+-parseInt(_0x3ac50d(0x14e))/0x9*(parseInt(_0x3ac50d(0x150))/0xa);if(_0x4e004f===_0xc6c645)break;else _0x5c2e1c['push'](_0x5c2e1c['shift']());}catch(_0x176b4a){_0x5c2e1c['push'](_0x5c2e1c['shift']());}}}(a236_0x4d74,0xaa48f));function a236_0x44ee(_0xe73f9b,_0x20c5c5){_0xe73f9b=_0xe73f9b-0x14b;var _0x4d7473=a236_0x4d74();var _0x44ee2a=_0x4d7473[_0xe73f9b];return _0x44ee2a;}export{extractList,extractPaging}from'@lovrabet/cli-framework';
@@ -0,0 +1,14 @@
1
+ import type { CommandDefinition } from "../framework/types.js";
2
+ import type { ParsedFlags } from "@lovrabet/cli-framework";
3
+ /**
4
+ * 通用 --alias → --code 管线解析
5
+ *
6
+ * 当命令同时声明了 "code"(string)和 "alias"(string)两个 flag 时自动触发:
7
+ * 1. --code 与 --alias 至少传一个,否则报错
8
+ * 2. 同时传时以 --code 为准,不解析 --alias
9
+ * 3. 仅传 --alias 时从 apiDir/api.ts 解析并写入 flags.code
10
+ * 4. 命令层只读 ctx.str("code") 即可
11
+ *
12
+ * 未声明 alias flag 的命令不受影响。
13
+ */
14
+ export declare function resolveAliasToCode(def: CommandDefinition, flags: ParsedFlags, apiDir: string, commandLabel: string): void;
@@ -1 +1 @@
1
- function a245_0x1889(_0x4fa873,_0x583aaf){_0x4fa873=_0x4fa873-0xaf;const _0x9bae3e=a245_0x9bae();let _0x1889ae=_0x9bae3e[_0x4fa873];return _0x1889ae;}function a245_0x9bae(){const _0x391389=['alias','2139801mTKUSx','6019448GQHRal','join','4030970lIjmOx','some','6931897pESzkz','.\x20Run\x20`','Available\x20aliases:\x20','\x22.\x20','validation','20160PfSnrt','code','18iVRExG','name','\x20api\x20pull`\x20first.','6UGvtMi','flags','length','1351537vMpDFK','363335CsMiIc','string','2DnyHmb','type','96NGtKjL','270TzmQOF','Unknown\x20alias\x20\x22'];a245_0x9bae=function(){return _0x391389;};return a245_0x9bae();}(function(_0x5906cd,_0x225603){const _0x4043a9=a245_0x1889,_0x372e98=_0x5906cd();while(!![]){try{const _0x1cf5cd=-parseInt(_0x4043a9(0xbd))/0x1+parseInt(_0x4043a9(0xbf))/0x2*(-parseInt(_0x4043a9(0xc5))/0x3)+-parseInt(_0x4043a9(0xb4))/0x4*(parseInt(_0x4043a9(0xc2))/0x5)+-parseInt(_0x4043a9(0xb9))/0x6*(-parseInt(_0x4043a9(0xaf))/0x7)+parseInt(_0x4043a9(0xc6))/0x8+-parseInt(_0x4043a9(0xb6))/0x9*(parseInt(_0x4043a9(0xc8))/0xa)+parseInt(_0x4043a9(0xbc))/0xb*(parseInt(_0x4043a9(0xc1))/0xc);if(_0x1cf5cd===_0x225603)break;else _0x372e98['push'](_0x372e98['shift']());}catch(_0x1bf6c6){_0x372e98['push'](_0x372e98['shift']());}}}(a245_0x9bae,0x8b53a));import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0xec42d,_0x2eb157,_0xab791,_0x25f27b){const _0x5ef746=a245_0x1889,_0x3134a6=_0xec42d[_0x5ef746(0xba)][_0x5ef746(0xc9)](_0x2ab940=>_0x2ab940[_0x5ef746(0xb7)]===_0x5ef746(0xb5)&&_0x2ab940[_0x5ef746(0xc0)]===_0x5ef746(0xbe)),_0x6e46eb=_0xec42d[_0x5ef746(0xba)]['some'](_0x5bbbe2=>_0x5bbbe2[_0x5ef746(0xb7)]===_0x5ef746(0xc4)&&_0x5bbbe2[_0x5ef746(0xc0)]===_0x5ef746(0xbe));if(!_0x3134a6||!_0x6e46eb)return;const _0x4db063=_0x2eb157['code']?String(_0x2eb157['code']):'',_0x5448be=_0x2eb157['alias']?String(_0x2eb157[_0x5ef746(0xc4)]):'';if(!_0x4db063&&!_0x5448be)throw CliErrors[_0x5ef746(0xb3)]('`'+_0x25f27b+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x5448be&&!_0x4db063){const _0x100fd9=resolveAlias(_0xab791,_0x5448be);if(!_0x100fd9){const _0x4aa3db=listAliases(_0xab791)['map'](_0x1fc886=>_0x1fc886['alias']),_0x2f9613=_0x4aa3db[_0x5ef746(0xbb)]?_0x5ef746(0xb1)+_0x4aa3db[_0x5ef746(0xc7)](',\x20'):'No\x20api.ts\x20found\x20in\x20'+_0xab791+_0x5ef746(0xb0)+CLI_BIN_NAME+_0x5ef746(0xb8);throw CliErrors[_0x5ef746(0xb3)](_0x5ef746(0xc3)+_0x5448be+_0x5ef746(0xb2)+_0x2f9613);}_0x2eb157[_0x5ef746(0xb5)]=_0x100fd9;}}
1
+ function a237_0x20e6(_0x147699,_0xe0aff4){_0x147699=_0x147699-0x6b;const _0xf946ff=a237_0xf946();let _0x20e606=_0xf946ff[_0x147699];return _0x20e606;}(function(_0x1ece07,_0x2e575b){const _0x15e3af=a237_0x20e6,_0x4e9ada=_0x1ece07();while(!![]){try{const _0x11edcd=-parseInt(_0x15e3af(0x75))/0x1*(parseInt(_0x15e3af(0x7e))/0x2)+-parseInt(_0x15e3af(0x7f))/0x3*(-parseInt(_0x15e3af(0x6d))/0x4)+-parseInt(_0x15e3af(0x7c))/0x5+parseInt(_0x15e3af(0x81))/0x6*(parseInt(_0x15e3af(0x76))/0x7)+parseInt(_0x15e3af(0x79))/0x8*(-parseInt(_0x15e3af(0x85))/0x9)+parseInt(_0x15e3af(0x6b))/0xa*(-parseInt(_0x15e3af(0x7b))/0xb)+parseInt(_0x15e3af(0x73))/0xc*(parseInt(_0x15e3af(0x84))/0xd);if(_0x11edcd===_0x2e575b)break;else _0x4e9ada['push'](_0x4e9ada['shift']());}catch(_0x4ff19b){_0x4e9ada['push'](_0x4e9ada['shift']());}}}(a237_0xf946,0xe572e));import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x290c0f,_0x209389,_0xf1582f,_0x559f56){const _0x56fb7a=a237_0x20e6,_0x4a766e=_0x290c0f[_0x56fb7a(0x78)]['some'](_0x367fa1=>_0x367fa1[_0x56fb7a(0x74)]===_0x56fb7a(0x82)&&_0x367fa1['type']===_0x56fb7a(0x80)),_0x354900=_0x290c0f[_0x56fb7a(0x78)][_0x56fb7a(0x6e)](_0xbc4dd2=>_0xbc4dd2['name']==='alias'&&_0xbc4dd2['type']==='string');if(!_0x4a766e||!_0x354900)return;const _0x253747=_0x209389[_0x56fb7a(0x82)]?String(_0x209389[_0x56fb7a(0x82)]):'',_0x350549=_0x209389[_0x56fb7a(0x77)]?String(_0x209389[_0x56fb7a(0x77)]):'';if(!_0x253747&&!_0x350549)throw CliErrors[_0x56fb7a(0x7a)]('`'+_0x559f56+_0x56fb7a(0x6f));if(_0x350549&&!_0x253747){const _0x50f41f=resolveAlias(_0xf1582f,_0x350549);if(!_0x50f41f){const _0x209c76=listAliases(_0xf1582f)[_0x56fb7a(0x6c)](_0xb858fb=>_0xb858fb[_0x56fb7a(0x77)]),_0x31258c=_0x209c76[_0x56fb7a(0x83)]?_0x56fb7a(0x71)+_0x209c76[_0x56fb7a(0x72)](',\x20'):_0x56fb7a(0x7d)+_0xf1582f+'.\x20Run\x20`'+CLI_BIN_NAME+_0x56fb7a(0x70);throw CliErrors[_0x56fb7a(0x7a)]('Unknown\x20alias\x20\x22'+_0x350549+'\x22.\x20'+_0x31258c);}_0x209389[_0x56fb7a(0x82)]=_0x50f41f;}}function a237_0xf946(){const _0x5bf502=['922028GnGYfL','some','`\x20requires\x20either\x20--code\x20or\x20--alias.','\x20api\x20pull`\x20first.','Available\x20aliases:\x20','join','156oLnEXW','name','1bxZpxh','21qYYRSw','alias','flags','56kiWDky','validation','1283029IXgyTk','8384750oDqAZZ','No\x20api.ts\x20found\x20in\x20','2648702rXlmnG','9VeyEyM','string','2920716wLPZWn','code','length','3152227DswohC','102798FfdtqS','110teZVLH','map'];a237_0xf946=function(){return _0x5bf502;};return a237_0xf946();}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 声明式命令执行管线(Pipeline)
3
+ *
4
+ * 通用编排在 @lovrabet/cli-framework,rb 只保留平台相关准备逻辑:
5
+ * cookie、appCode、apiDir/alias 解析,以及高风险确认文案。
6
+ */
7
+ import type { CommandDefinition, OutputFormat, MergedCliSnapshot, RuntimeContextExtras } from "../framework/types.js";
8
+ import type { Risk, RunnerAdapter } from "@lovrabet/cli-framework";
9
+ import type { buildConfigFromFlags } from "../context.js";
10
+ export interface PipelineEnv {
11
+ rawFlags: Record<string, any>;
12
+ /** 位置参数(cli.input.slice(2),wildcard 命令时含 command 名) */
13
+ args?: string[];
14
+ resolveAppCode: () => string | undefined;
15
+ resolveCookie: () => string;
16
+ resolveApiDomain: () => string;
17
+ isNonInteractive: boolean;
18
+ defaultFormat?: OutputFormat;
19
+ defaultPageSize?: number;
20
+ defaultVerbose?: boolean;
21
+ apiDir?: string;
22
+ riskLevel?: Risk;
23
+ selectedAppName?: string;
24
+ /** 与入口 buildConfigFromFlags 一致,供 app list 标注当前应用 */
25
+ mergedCli?: MergedCliSnapshot;
26
+ }
27
+ export declare function createPipelineEnv(cliConfig: ReturnType<typeof buildConfigFromFlags>, flags: Record<string, any>, args?: string[]): PipelineEnv;
28
+ export interface RabetbaseRunnerAdapterOptions {
29
+ formatOutput?: RunnerAdapter<PipelineEnv, RuntimeContextExtras>["formatOutput"];
30
+ confirmHighRisk?: RunnerAdapter<PipelineEnv, RuntimeContextExtras>["confirmHighRisk"];
31
+ }
32
+ /** 为终端或嵌入式调用创建同一条执行管线的 adapter。 */
33
+ export declare function createRabetbaseRunnerAdapter(options?: RabetbaseRunnerAdapterOptions): RunnerAdapter<PipelineEnv, RuntimeContextExtras>;
34
+ /** 清理长驻进程中的嵌入式调用可能留下的 cookie、域名和环境状态。 */
35
+ export declare function finalizeRabetbaseRuntimeState(): Promise<void>;
36
+ export declare function runCommand(def: CommandDefinition, env: PipelineEnv, adapter?: RunnerAdapter<PipelineEnv, RuntimeContextExtras>): Promise<void>;
@@ -1 +1 @@
1
- const a246_0x172a38=a246_0x4c72;(function(_0xc3e0bc,_0x31f97a){const _0x3eabd1=a246_0x4c72,_0x21cb70=_0xc3e0bc();while(!![]){try{const _0x86c0d0=parseInt(_0x3eabd1(0xff))/0x1+-parseInt(_0x3eabd1(0x104))/0x2+parseInt(_0x3eabd1(0xfb))/0x3+-parseInt(_0x3eabd1(0x105))/0x4*(-parseInt(_0x3eabd1(0x11a))/0x5)+-parseInt(_0x3eabd1(0xf6))/0x6*(-parseInt(_0x3eabd1(0xe6))/0x7)+parseInt(_0x3eabd1(0x119))/0x8*(-parseInt(_0x3eabd1(0xf9))/0x9)+-parseInt(_0x3eabd1(0xf8))/0xa;if(_0x86c0d0===_0x31f97a)break;else _0x21cb70['push'](_0x21cb70['shift']());}catch(_0x1db43a){_0x21cb70['push'](_0x21cb70['shift']());}}}(a246_0xc297,0xeff3c));import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a246_0x202104}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x2fc07d){const _0x40bf3f=a246_0x4c72;return typeof _0x2fc07d===_0x40bf3f(0x100)&&_0x2fc07d[_0x40bf3f(0x114)]()?_0x2fc07d[_0x40bf3f(0x114)]():undefined;}function resolveEnvAppCode(){const _0xbe8529=a246_0x4c72,_0x269312=stringFlag(process.env.RABETBASE_APPCODE);if(_0x269312)return{'name':_0xbe8529(0xe8),'value':_0x269312};const _0x19a1c3=stringFlag(process.env.LOVRABET_APPCODE);if(_0x19a1c3)return{'name':'LOVRABET_APPCODE','value':_0x19a1c3};return undefined;}function hasExplicitAppCode(_0x35f172,_0xe7e1e7){const _0x5723e1=a246_0x4c72;return!!(stringFlag(_0x35f172['appcode'])||stringFlag(_0xe7e1e7[_0x5723e1(0x11d)]));}function assertEnvAppCodeNotIgnored(_0x114dbe,_0x19323a,_0x2c5152){const _0x27a686=a246_0x4c72;if(!_0x19323a||_0x2c5152||_0x114dbe===_0x19323a[_0x27a686(0xeb)])return;const _0x5c39a5=_0x114dbe?_0x27a686(0xea)+_0x114dbe+'\x22.':_0x27a686(0xef);throw CliErrors[_0x27a686(0xf1)](_0x19323a[_0x27a686(0x108)]+'='+_0x19323a[_0x27a686(0xeb)]+'\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20'+_0x5c39a5+'\x20'+(_0x27a686(0x118)+_0x19323a['name']+'\x22.'));}export function createPipelineEnv(_0x3d361c,_0x3b48ac,_0x168e8a=[]){const _0x586329=a246_0x4c72;return{'rawFlags':_0x3b48ac,'args':_0x168e8a,'resolveAppCode':()=>_0x3d361c[_0x586329(0x115)],'resolveCookie':()=>_0x3d361c[_0x586329(0xf4)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a246_0x202104(_0x3b48ac),'defaultFormat':_0x3d361c[_0x586329(0x10e)],'defaultPageSize':_0x3d361c[_0x586329(0xf2)],'defaultVerbose':_0x3d361c[_0x586329(0xee)],'apiDir':_0x3d361c[_0x586329(0xe5)],'riskLevel':_0x3d361c[_0x586329(0xfc)],'selectedAppName':_0x3d361c['explicitAppName'],'mergedCli':{'defaultApp':_0x3d361c[_0x586329(0x110)],'currentApp':_0x3d361c[_0x586329(0xf5)],'appCode':_0x3d361c['appCode'],'apps':_0x3d361c['apps']}};}function a246_0xc297(){const _0x95618b=['3105654ZOuppf','1672ejaYHv','map','find','name','defaultVerbose','cancelled','doctor','message','replace','format','includes','defaultApp','none','command','nonInteractive','trim','appCode','hint','\x20\x20\x20Continue?\x20[y/N]\x20','To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$','48fzJckL','11140eRchUN','resolve','⚠\x20\x20High-risk\x20operation:\x20','appcode','schema','service','apiDir','58513mjzqfP','resolveApiDomain','RABETBASE_APPCODE','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','Current\x20resolved\x20appcode\x20is\x20\x22','value','update','configMissing','verbose','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','resolveAppCode','validation','pageSize','rejectedFlags','cookie','currentApp','1188QVPheq','rawFlags','8888050MPPYKz','2890692fQTNKX','_notice','3319539QKXCEd','riskLevel','catch','meowKey','1658705nGakTY','string','isNonInteractive','required','../core/api-client.js'];a246_0xc297=function(){return _0x95618b;};return a246_0xc297();}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x3a5ed8=>PIPELINE_FLAG_NAMES['has'](_0x3a5ed8[a246_0x172a38(0x108)]))[a246_0x172a38(0x106)](({name:_0x4a5717,type:_0x26436b,description:_0x491118})=>({'name':_0x4a5717,'type':_0x26436b,'description':_0x491118})),'formatOutput':formatOutput,'getCommandLabel'(_0x149ab6){const _0x37f340=a246_0x172a38;return CLI_BIN_NAME+'\x20'+_0x149ab6[_0x37f340(0xe4)]+'\x20'+_0x149ab6[_0x37f340(0x112)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x3d1134){const _0x52832c=a246_0x172a38;return CliErrors[_0x52832c(0xf1)](_0x3d1134);}},async 'prepare'(_0x107252,_0x5d9070,_0x71aed,_0x24161d){const _0x452d01=a246_0x172a38,_0x5264e5=_0x5d9070['apiDir']||DEFAULT_API_DIR;resolveAliasToCode(_0x107252,_0x71aed,_0x5264e5,_0x24161d);const _0x30f3ae=resolveCommandAuthMode(_0x107252);let _0x2c2eab='';if(_0x30f3ae!==_0x452d01(0x111)){_0x2c2eab=_0x5d9070['resolveCookie']()||'';if(!_0x2c2eab){if(_0x30f3ae===_0x452d01(0x102))throw CliErrors['authRequired']();}else{const {setActiveCookie:_0x54b264}=await import('../core/api-client.js');_0x54b264(_0x2c2eab);}}const _0x456c9b=_0x5d9070[_0x452d01(0xf0)]()??'';if(_0x107252['requiresAppCode']!==![]){assertEnvAppCodeNotIgnored(_0x456c9b,resolveEnvAppCode(),hasExplicitAppCode(_0x71aed,_0x5d9070[_0x452d01(0xf7)]));if(!_0x456c9b)throw CliErrors[_0x452d01(0xed)]('Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}return{'defaults':{'booleans':{'verbose':_0x5d9070[_0x452d01(0x109)]},'numbers':{'pagesize':_0x5d9070['defaultPageSize']}},'extras':{'appCode':_0x456c9b,'cookie':_0x2c2eab,'apiDomain':_0x5d9070[_0x452d01(0xe7)](),'apiDir':_0x5264e5,'selectedAppName':_0x5d9070['selectedAppName'],'mergedCli':_0x5d9070['mergedCli']}};},async 'confirmHighRisk'({env:_0x259ae1,commandLabel:_0x6fe48}){const _0x27a60c=a246_0x172a38;if(_0x259ae1[_0x27a60c(0x101)])throw CliErrors[_0x27a60c(0xf1)]('High-risk\x20operation\x20`'+_0x6fe48+_0x27a60c(0xe9));await requireConfirmationPrompt({'lines':[_0x27a60c(0x11c)+_0x6fe48,_0x27a60c(0x117)],'createCancelledError':_0x24b89b=>CliErrors[_0x27a60c(0x10a)](_0x24b89b)});},async 'finalize'(){const _0x422b80=a246_0x172a38,{clearActiveCookie:_0x49b124}=await import(_0x422b80(0x103));_0x49b124();}};export async function runCommand(_0x8e32f6,_0x5c973e){assertRejectedFlags(_0x8e32f6,_0x5c973e['rawFlags']),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x8e32f6)?withUpdateNotice(_0x8e32f6):_0x8e32f6,_0x5c973e,runnerAdapter);}function assertRejectedFlags(_0x4ccbf8,_0x2c49a6){const _0x59620b=a246_0x172a38;for(const _0x32a59e of _0x4ccbf8[_0x59620b(0xf3)]??[]){const _0x3b0b7a=GLOBAL_FLAGS[_0x59620b(0x107)](_0x2f3da2=>_0x2f3da2[_0x59620b(0x108)]===_0x32a59e['name']),_0x56d79c=new Set([_0x32a59e[_0x59620b(0x108)],toCamelCase(_0x32a59e[_0x59620b(0x108)]),_0x3b0b7a?.[_0x59620b(0xfe)]]),_0x4d5125=[..._0x56d79c]['some'](_0x2349bb=>{if(!_0x2349bb)return![];const _0x180f57=_0x2c49a6[_0x2349bb];return _0x180f57!==undefined&&_0x180f57!==null&&_0x180f57!==![];});if(_0x4d5125)throw CliErrors['validation'](_0x32a59e[_0x59620b(0x10c)],_0x32a59e[_0x59620b(0x116)]);}}function toCamelCase(_0x592073){const _0x44796d=a246_0x172a38;return _0x592073[_0x44796d(0x10d)](/-([a-z])/g,(_0x5aa5d5,_0x28ad97)=>_0x28ad97['toUpperCase']());}function shouldAttachUpdateNotice(_0xe98f2c){const _0x3765f3=a246_0x172a38;if(_0xe98f2c['hasFormat']===![])return![];return![_0x3765f3(0xec),_0x3765f3(0xe3),_0x3765f3(0x10b)][_0x3765f3(0x10f)](_0xe98f2c[_0x3765f3(0xe4)]);}function a246_0x4c72(_0x1bc9bd,_0x5d7ee6){_0x1bc9bd=_0x1bc9bd-0xe3;const _0xc297b8=a246_0xc297();let _0x4c7210=_0xc297b8[_0x1bc9bd];return _0x4c7210;}function withUpdateNotice(_0x58f04c){return{..._0x58f04c,async 'execute'(_0x30a14f){const _0x4f6c2d=a246_0x4c72,_0x21f132=shouldResolveUpdateNotice(_0x30a14f)?resolveLatestUpdateNotice()[_0x4f6c2d(0xfd)](()=>null):Promise[_0x4f6c2d(0x11b)](null),_0x145b55=await _0x58f04c['execute'](_0x30a14f);return attachUpdateNotice(_0x145b55,await _0x21f132);}};}function shouldResolveUpdateNotice(_0x375260){const _0x2ef5c1=a246_0x172a38;return _0x375260[_0x2ef5c1(0x10e)]==='pretty'&&!_0x375260[_0x2ef5c1(0x113)];}function attachUpdateNotice(_0x24fa1b,_0x58eef5){const _0x2110af=a246_0x172a38;if(!_0x58eef5||!_0x24fa1b||typeof _0x24fa1b!=='object')return _0x24fa1b;const _0x201edf=_0x24fa1b,_0x5b8877=typeof _0x201edf[_0x2110af(0xfa)]==='object'&&_0x201edf['_notice']!==null?_0x201edf[_0x2110af(0xfa)]:{};return{..._0x201edf,'_notice':{..._0x5b8877,'update':_0x58eef5}};}
1
+ (function(_0x1442bd,_0x526cfc){const _0x360b47=a238_0x41f5,_0x196d14=_0x1442bd();while(!![]){try{const _0x26aa53=-parseInt(_0x360b47(0x152))/0x1*(parseInt(_0x360b47(0x149))/0x2)+-parseInt(_0x360b47(0x151))/0x3*(-parseInt(_0x360b47(0x148))/0x4)+parseInt(_0x360b47(0x12d))/0x5*(parseInt(_0x360b47(0x118))/0x6)+-parseInt(_0x360b47(0x12f))/0x7*(-parseInt(_0x360b47(0x123))/0x8)+-parseInt(_0x360b47(0x11b))/0x9+-parseInt(_0x360b47(0x134))/0xa+parseInt(_0x360b47(0x114))/0xb;if(_0x26aa53===_0x526cfc)break;else _0x196d14['push'](_0x196d14['shift']());}catch(_0x27651e){_0x196d14['push'](_0x196d14['shift']());}}}(a238_0x22ef,0x7fc7f));import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';function a238_0x22ef(){const _0x58f9d9=['includes','11672672ElAYzl','resolveCookie','update','production','834KJGaAD','doctor','configMissing','8986698vMYWvG','hasFormat','isNonInteractive','meowKey','replace','rawFlags','explicitAppName','cookie','72MuDpYP','selectedAppName','defaultApp','cancelled','filter','has','formatOutput','trim','find','nonInteractive','24755ZvTZTm','../core/api-client.js','681926FGBIPH','Set\x20appcode\x20via\x20`','schema','some','currentApp','6380520ceDQhv','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','apps','mergedCli','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','string','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','LOVRABET_APPCODE','appcode','_notice','High-risk\x20operation\x20`','riskLevel','apiDir','Current\x20resolved\x20appcode\x20is\x20\x22','value','defaultVerbose','pretty','validation','requiresAppCode','name','1797912IfboFH','29536IYXyoY','appCode','none','../constant/env.js','message','resolveApiDomain','hint','service','3nPuWXB','62bawjhd','all','../constant/domain.js','To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$','required','verbose','authRequired','defaultPageSize','format','map','catch'];a238_0x22ef=function(){return _0x58f9d9;};return a238_0x22ef();}import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a238_0x5b038e}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x2ac527){const _0x401d57=a238_0x41f5;return typeof _0x2ac527===_0x401d57(0x139)&&_0x2ac527[_0x401d57(0x12a)]()?_0x2ac527[_0x401d57(0x12a)]():undefined;}function resolveEnvAppCode(){const _0x14130a=a238_0x41f5,_0x4685fb=stringFlag(process.env.RABETBASE_APPCODE);if(_0x4685fb)return{'name':'RABETBASE_APPCODE','value':_0x4685fb};const _0x5f7702=stringFlag(process.env.LOVRABET_APPCODE);if(_0x5f7702)return{'name':_0x14130a(0x13b),'value':_0x5f7702};return undefined;}function hasExplicitAppCode(_0x19b1d4,_0x6cf503){const _0x48a71e=a238_0x41f5;return!!(stringFlag(_0x19b1d4[_0x48a71e(0x13c)])||stringFlag(_0x6cf503[_0x48a71e(0x13c)]));}function assertEnvAppCodeNotIgnored(_0x24db5e,_0xa3737e,_0x2e6797){const _0x4c979b=a238_0x41f5;if(!_0xa3737e||_0x2e6797||_0x24db5e===_0xa3737e[_0x4c979b(0x142)])return;const _0x3a48ee=_0x24db5e?_0x4c979b(0x141)+_0x24db5e+'\x22.':_0x4c979b(0x135);throw CliErrors[_0x4c979b(0x145)](_0xa3737e['name']+'='+_0xa3737e['value']+_0x4c979b(0x138)+_0x3a48ee+'\x20'+(_0x4c979b(0x155)+_0xa3737e[_0x4c979b(0x147)]+'\x22.'));}export function createPipelineEnv(_0x1d159a,_0x15edeb,_0x593597=[]){const _0x3de639=a238_0x41f5;return{'rawFlags':_0x15edeb,'args':_0x593597,'resolveAppCode':()=>_0x1d159a[_0x3de639(0x14a)],'resolveCookie':()=>_0x1d159a[_0x3de639(0x122)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a238_0x5b038e(_0x15edeb),'defaultFormat':_0x1d159a['format'],'defaultPageSize':_0x1d159a['pageSize'],'defaultVerbose':_0x1d159a[_0x3de639(0x157)],'apiDir':_0x1d159a[_0x3de639(0x140)],'riskLevel':_0x1d159a[_0x3de639(0x13f)],'selectedAppName':_0x1d159a[_0x3de639(0x121)],'mergedCli':{'defaultApp':_0x1d159a[_0x3de639(0x125)],'currentApp':_0x1d159a[_0x3de639(0x133)],'appCode':_0x1d159a['appCode'],'apps':_0x1d159a[_0x3de639(0x136)]}};}export function createRabetbaseRunnerAdapter(_0x2f3620={}){const _0x500803=a238_0x41f5;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x500803(0x127)](_0x3c60a5=>PIPELINE_FLAG_NAMES[_0x500803(0x128)](_0x3c60a5[_0x500803(0x147)]))[_0x500803(0x111)](({name:_0x2932b1,type:_0x5f5857,description:_0x266ff6})=>({'name':_0x2932b1,'type':_0x5f5857,'description':_0x266ff6})),'formatOutput':_0x2f3620[_0x500803(0x129)]??formatOutput,'getCommandLabel'(_0x5b4214){const _0x379943=_0x500803;return CLI_BIN_NAME+'\x20'+_0x5b4214[_0x379943(0x150)]+'\x20'+_0x5b4214['command'];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x1ee9ea){return CliErrors['validation'](_0x1ee9ea);}},async 'prepare'(_0xe73148,_0x5f2f74,_0x489c2b,_0xac7af8){const _0x25100f=_0x500803,_0x4c4af0=_0x5f2f74['apiDir']||DEFAULT_API_DIR;resolveAliasToCode(_0xe73148,_0x489c2b,_0x4c4af0,_0xac7af8);const _0x499b06=resolveCommandAuthMode(_0xe73148);let _0x3b1562='';if(_0x499b06!==_0x25100f(0x14b)){_0x3b1562=_0x5f2f74[_0x25100f(0x115)]()||'';if(!_0x3b1562){if(_0x499b06===_0x25100f(0x156))throw CliErrors[_0x25100f(0x158)]();}else{const {setActiveCookie:_0x50fed0}=await import(_0x25100f(0x12e));_0x50fed0(_0x3b1562);}}const _0x4cc08a=_0x5f2f74['resolveAppCode']()??'';if(_0xe73148[_0x25100f(0x146)]!==![]){assertEnvAppCodeNotIgnored(_0x4cc08a,resolveEnvAppCode(),hasExplicitAppCode(_0x489c2b,_0x5f2f74[_0x25100f(0x120)]));if(!_0x4cc08a)throw CliErrors[_0x25100f(0x11a)](_0x25100f(0x130)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}return{'defaults':{'booleans':{'verbose':_0x5f2f74[_0x25100f(0x143)]},'numbers':{'pagesize':_0x5f2f74[_0x25100f(0x159)]}},'extras':{'appCode':_0x4cc08a,'cookie':_0x3b1562,'apiDomain':_0x5f2f74[_0x25100f(0x14e)](),'apiDir':_0x4c4af0,'selectedAppName':_0x5f2f74[_0x25100f(0x124)],'mergedCli':_0x5f2f74[_0x25100f(0x137)]}};},'confirmHighRisk':_0x2f3620['confirmHighRisk']??(async({env:_0x3415b2,commandLabel:_0x267b90})=>{const _0x39a996=_0x500803;if(_0x3415b2[_0x39a996(0x11d)])throw CliErrors['validation'](_0x39a996(0x13e)+_0x267b90+_0x39a996(0x13a));await requireConfirmationPrompt({'lines':['⚠\x20\x20High-risk\x20operation:\x20'+_0x267b90,'\x20\x20\x20Continue?\x20[y/N]\x20'],'createCancelledError':_0x16d182=>CliErrors[_0x39a996(0x126)](_0x16d182)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();function a238_0x41f5(_0xf7f1a1,_0x3aafba){_0xf7f1a1=_0xf7f1a1-0x110;const _0x22ef60=a238_0x22ef();let _0x41f592=_0x22ef60[_0xf7f1a1];return _0x41f592;}async function clearRabetbaseCommandState(){const _0x1a1b60=a238_0x41f5,{clearActiveCookie:_0x367a13}=await import(_0x1a1b60(0x12e));_0x367a13();}export async function finalizeRabetbaseRuntimeState(){const _0x298b9d=a238_0x41f5;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x5290f0},{initEnv:_0x2c2fbd}]=await Promise[_0x298b9d(0x153)]([import(_0x298b9d(0x154)),import(_0x298b9d(0x14c))]);_0x5290f0(),_0x2c2fbd(_0x298b9d(0x117));}}export async function runCommand(_0x487dc6,_0x54a6fa,_0x4364ae=terminalRunnerAdapter){const _0x56372d=a238_0x41f5;assertRejectedFlags(_0x487dc6,_0x54a6fa[_0x56372d(0x120)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x487dc6)?withUpdateNotice(_0x487dc6):_0x487dc6,_0x54a6fa,_0x4364ae);}function assertRejectedFlags(_0x165d49,_0x3aeae4){const _0x1eca05=a238_0x41f5;for(const _0x3fc169 of _0x165d49['rejectedFlags']??[]){const _0xf6a8e3=GLOBAL_FLAGS[_0x1eca05(0x12b)](_0x406dd1=>_0x406dd1[_0x1eca05(0x147)]===_0x3fc169[_0x1eca05(0x147)]),_0x381a33=new Set([_0x3fc169[_0x1eca05(0x147)],toCamelCase(_0x3fc169['name']),_0xf6a8e3?.[_0x1eca05(0x11e)]]),_0x532e18=[..._0x381a33][_0x1eca05(0x132)](_0x55008b=>{if(!_0x55008b)return![];const _0x5147bb=_0x3aeae4[_0x55008b];return _0x5147bb!==undefined&&_0x5147bb!==null&&_0x5147bb!==![];});if(_0x532e18)throw CliErrors[_0x1eca05(0x145)](_0x3fc169[_0x1eca05(0x14d)],_0x3fc169[_0x1eca05(0x14f)]);}}function toCamelCase(_0x30396d){const _0x4f94f5=a238_0x41f5;return _0x30396d[_0x4f94f5(0x11f)](/-([a-z])/g,(_0x5d5c17,_0x51fbc9)=>_0x51fbc9['toUpperCase']());}function shouldAttachUpdateNotice(_0x202562){const _0x19791b=a238_0x41f5;if(_0x202562[_0x19791b(0x11c)]===![])return![];return![_0x19791b(0x116),_0x19791b(0x131),_0x19791b(0x119)][_0x19791b(0x113)](_0x202562['service']);}function withUpdateNotice(_0x501fc4){return{..._0x501fc4,async 'execute'(_0x2ed87f){const _0x329661=a238_0x41f5,_0x2d765b=shouldResolveUpdateNotice(_0x2ed87f)?resolveLatestUpdateNotice()[_0x329661(0x112)](()=>null):Promise['resolve'](null),_0x58676a=await _0x501fc4['execute'](_0x2ed87f);return attachUpdateNotice(_0x58676a,await _0x2d765b);}};}function shouldResolveUpdateNotice(_0x1d9372){const _0x59fe3c=a238_0x41f5;return _0x1d9372[_0x59fe3c(0x110)]===_0x59fe3c(0x144)&&!_0x1d9372[_0x59fe3c(0x12c)];}function attachUpdateNotice(_0x21c4c6,_0x13e049){const _0x148f9e=a238_0x41f5;if(!_0x13e049||!_0x21c4c6||typeof _0x21c4c6!=='object')return _0x21c4c6;const _0x267a1d=_0x21c4c6,_0x5e5c8f=typeof _0x267a1d[_0x148f9e(0x13d)]==='object'&&_0x267a1d['_notice']!==null?_0x267a1d[_0x148f9e(0x13d)]:{};return{..._0x267a1d,'_notice':{..._0x5e5c8f,'update':_0x13e049}};}
@@ -0,0 +1,3 @@
1
+ import { type SerializedFlagPattern, type SerializedFlag, type SchemaCommandEntry, type SchemaServiceEntry, type SchemaPayload } from "@lovrabet/cli-framework";
2
+ export type { SerializedFlagPattern, SerializedFlag, SchemaCommandEntry, SchemaServiceEntry, SchemaPayload, };
3
+ export declare function buildSchemaPayload(): Promise<SchemaPayload>;
@@ -1 +1 @@
1
- (function(_0xb15287,_0x2a3042){const _0x57fefe=a247_0x21d9,_0xee65cf=_0xb15287();while(!![]){try{const _0x45241a=-parseInt(_0x57fefe(0x7d))/0x1*(parseInt(_0x57fefe(0x86))/0x2)+parseInt(_0x57fefe(0x80))/0x3*(parseInt(_0x57fefe(0x7a))/0x4)+-parseInt(_0x57fefe(0x84))/0x5*(parseInt(_0x57fefe(0x83))/0x6)+parseInt(_0x57fefe(0x7e))/0x7*(parseInt(_0x57fefe(0x85))/0x8)+-parseInt(_0x57fefe(0x87))/0x9*(-parseInt(_0x57fefe(0x81))/0xa)+parseInt(_0x57fefe(0x7b))/0xb*(-parseInt(_0x57fefe(0x7f))/0xc)+parseInt(_0x57fefe(0x7c))/0xd;if(_0x45241a===_0x2a3042)break;else _0xee65cf['push'](_0xee65cf['shift']());}catch(_0x5079cf){_0xee65cf['push'](_0xee65cf['shift']());}}}(a247_0x422f,0xa468b));function a247_0x422f(){const _0xe0fcd3=['27pWWhml','43240dbKdQz','../commands/registry.js','1345188OpYzNd','15juiUCG','24WuiSMg','2137090NILfJl','2061YnMmFq','156248WNSSfI','42361CLfLhH','16712475MqsoTG','1xCclha','348187TEPuGt','1128dHwIaH'];a247_0x422f=function(){return _0xe0fcd3;};return a247_0x422f();}import{buildSchemaPayload as a247_0x3b97c2}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a247_0x21d9(_0x1091b7,_0x4634a6){_0x1091b7=_0x1091b7-0x7a;const _0x422fe8=a247_0x422f();let _0x21d9db=_0x422fe8[_0x1091b7];return _0x21d9db;}import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x5a237b=a247_0x21d9,{serviceRegistry:_0x14257c,findDefinition:_0x558455}=await import(_0x5a237b(0x82));return a247_0x3b97c2({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x14257c,'buildAllFlags':buildAllFlags,'findDefinition':_0x558455});}
1
+ (function(_0x16a98d,_0x5341c9){const _0x2a61da=a239_0x599f,_0xf33e9d=_0x16a98d();while(!![]){try{const _0x335797=-parseInt(_0x2a61da(0x13b))/0x1*(parseInt(_0x2a61da(0x13e))/0x2)+-parseInt(_0x2a61da(0x141))/0x3+-parseInt(_0x2a61da(0x142))/0x4*(parseInt(_0x2a61da(0x13d))/0x5)+-parseInt(_0x2a61da(0x13c))/0x6+-parseInt(_0x2a61da(0x143))/0x7+-parseInt(_0x2a61da(0x13f))/0x8+parseInt(_0x2a61da(0x144))/0x9;if(_0x335797===_0x5341c9)break;else _0xf33e9d['push'](_0xf33e9d['shift']());}catch(_0x3cf07c){_0xf33e9d['push'](_0xf33e9d['shift']());}}}(a239_0x43de,0xb129b));import{buildSchemaPayload as a239_0x58927c}from'@lovrabet/cli-framework';function a239_0x599f(_0xff17b8,_0x189df7){_0xff17b8=_0xff17b8-0x13b;const _0x43de0c=a239_0x43de();let _0x599f9e=_0x43de0c[_0xff17b8];return _0x599f9e;}import{buildAllFlags}from'../framework/build-all-flags.js';function a239_0x43de(){const _0x2591a1=['4KQFJGP','4069506phZijK','51339582eYBimx','1ehNdDN','7993824CikREJ','6220555pfkPWn','442286ZqAgPD','6935960OuhyOd','../commands/registry.js','2198484iDrevU'];a239_0x43de=function(){return _0x2591a1;};return a239_0x43de();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x14979e=a239_0x599f,{serviceRegistry:_0x31278f,findDefinition:_0x2dff3d}=await import(_0x14979e(0x140));return a239_0x58927c({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x31278f,'buildAllFlags':buildAllFlags,'findDefinition':_0x2dff3d});}
@@ -0,0 +1,63 @@
1
+ export type { ArgDef, FlagDef, CommandAuthMode, CommandResult, DeprecatedCommandInfo, DryRunResult, OutputFormat, OutputEnvelope, Risk, } from "@lovrabet/cli-framework";
2
+ import type { CommandDefinition as CoreCommandDefinition, CommandResult as CoreCommandResult, RuntimeContext as CoreRuntimeContext } from "@lovrabet/cli-framework";
3
+ export { riskLevelOrder, normalizeLegacyOutputFormat, isValidFormat, commandAllowsOptionalAuth, commandRequiresAuth, formatDeprecatedCommandMessage, resolveCommandAuthMode, } from "@lovrabet/cli-framework";
4
+ export interface MergedCliSnapshot {
5
+ defaultApp?: string;
6
+ currentApp?: string;
7
+ appCode?: string;
8
+ apps?: Record<string, {
9
+ appcode?: string;
10
+ }>;
11
+ }
12
+ export interface RuntimeContextExtras {
13
+ appCode: string;
14
+ cookie: string;
15
+ apiDomain: string;
16
+ apiDir: string;
17
+ selectedAppName?: string;
18
+ mergedCli?: MergedCliSnapshot;
19
+ }
20
+ export type RuntimeContext = CoreRuntimeContext<RuntimeContextExtras>;
21
+ export interface RuntimeUpdateNotice {
22
+ command: string;
23
+ current: string;
24
+ latest: string;
25
+ url: string;
26
+ message: string;
27
+ }
28
+ export interface RuntimeNotice {
29
+ update?: RuntimeUpdateNotice;
30
+ }
31
+ export type CommandResultWithNotice<T = any> = CoreCommandResult<T> & {
32
+ _notice?: RuntimeNotice;
33
+ };
34
+ export type CommandDefinition = CoreCommandDefinition<RuntimeContext> & {
35
+ /**
36
+ * 嵌入式原生工具在写入前展示的静态影响说明。
37
+ * 该字段不得拼入 argv、凭证或业务内容;缺省时 runtime 生成脱敏通用文案。
38
+ */
39
+ confirmationDescription?: string;
40
+ /**
41
+ * When `true`, the command is excluded from generated help text and the
42
+ * machine-readable schema, but remains dispatchable (e.g. deprecated
43
+ * aliases kept only for a migration warning). Pair with `deprecated` to
44
+ * print a migration notice when the command is invoked directly.
45
+ */
46
+ hidden?: boolean;
47
+ /**
48
+ * Emit a structured CliError envelope for this command in json/compress
49
+ * modes. Commands opt in explicitly so adding one mutation does not change
50
+ * stderr/stdout behavior for every declarative command.
51
+ */
52
+ structuredErrors?: boolean;
53
+ /**
54
+ * Reject previously accepted raw CLI flags without exposing them in help or
55
+ * schema. This is used for removed mutation capabilities that meow still
56
+ * needs to recognize long enough to return an actionable error.
57
+ */
58
+ rejectedFlags?: Array<{
59
+ name: string;
60
+ message: string;
61
+ hint?: string;
62
+ }>;
63
+ };