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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
@@ -0,0 +1,42 @@
1
+ /**
2
+ * 配置工具 — 薄代理层
3
+ *
4
+ * 所有配置文件读写的底层实现统一在 context.ts 中。
5
+ * 本模块保留历史导出接口,供旧命令使用。
6
+ */
7
+ export { getProjectConfigPath, getGlobalConfigPath } from "../context.js";
8
+ export { isInProject } from "../context.js";
9
+ export declare function readConfig(projectRoot?: string): Record<string, any> & {
10
+ app?: string;
11
+ appcode?: string;
12
+ env?: string;
13
+ template_base_url?: string;
14
+ locale?: string;
15
+ };
16
+ export interface MultiAppConfig {
17
+ name: string;
18
+ appcode: string;
19
+ isDefault: boolean;
20
+ env?: string;
21
+ apiDir?: string;
22
+ cookie?: string;
23
+ }
24
+ /**
25
+ * 获取配置的 AppCode
26
+ * 优先级:多应用 defaultApp > 项目 appcode > 项目 app > 全局 appcode > 全局 app
27
+ */
28
+ export declare function getConfigAppCode(): string | undefined;
29
+ /** 多应用列表来源:`project` 仅项目文件 `apps`;`merged` 为全局+项目合并(与 readRawConfig 一致) */
30
+ export type MultiAppConfigScope = "project" | "merged";
31
+ /**
32
+ * 获取多应用配置列表。
33
+ * 返回 null 表示不在多应用模式(应使用单应用逻辑)。
34
+ *
35
+ * @param scope `project`(默认)仅当前项目 `.rabetbase.json` 等中的 `apps`;
36
+ * `merged` 使用全局+项目合并结果(api pull/list 传 `--global` 时)。
37
+ */
38
+ export declare function getMultiAppConfigs(scope?: MultiAppConfigScope): MultiAppConfig[] | null;
39
+ /**
40
+ * 获取模板 CDN 基础 URL
41
+ */
42
+ export declare function getTemplateBaseUrl(): string;
@@ -1 +1 @@
1
- const a259_0x43bde6=a259_0x59dd;(function(_0x325ec1,_0x315a97){const _0x33818a=a259_0x59dd,_0x1ae7c9=_0x325ec1();while(!![]){try{const _0x2f7259=-parseInt(_0x33818a(0x1a4))/0x1+parseInt(_0x33818a(0x19f))/0x2+parseInt(_0x33818a(0x1a1))/0x3+parseInt(_0x33818a(0x1a0))/0x4+parseInt(_0x33818a(0x1a9))/0x5*(parseInt(_0x33818a(0x19e))/0x6)+parseInt(_0x33818a(0x1a8))/0x7*(parseInt(_0x33818a(0x1a3))/0x8)+-parseInt(_0x33818a(0x1a5))/0x9;if(_0x2f7259===_0x315a97)break;else _0x1ae7c9['push'](_0x1ae7c9['shift']());}catch(_0x121492){_0x1ae7c9['push'](_0x1ae7c9['shift']());}}}(a259_0x5f8e,0x6db06));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a259_0x44648a,getMultiAppConfigs as a259_0x166d33,getTemplateBaseUrl as a259_0x4dbc2d}from'../context.js';function a259_0x59dd(_0x3507c7,_0x550baf){_0x3507c7=_0x3507c7-0x19e;const _0x5f8ebb=a259_0x5f8e();let _0x59dd2a=_0x5f8ebb[_0x3507c7];return _0x59dd2a;}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a259_0x5f8e(){const _0xbda506=['project','string','238PVFdUo','310JatfMU','1020qWdSlo','807294BiimRg','1684392tprMOJ','2656839VAiVfr','env','7224WMuaLo','95958XOMtHS','10857204WFScWJ'];a259_0x5f8e=function(){return _0xbda506;};return a259_0x5f8e();}export{isInProject}from'../context.js';export function readConfig(_0x21752e){const _0x10b853=a259_0x59dd,_0x231c6d=readRawConfig(_0x21752e);return _0x231c6d[_0x10b853(0x1a2)]&&typeof _0x231c6d[_0x10b853(0x1a2)]===_0x10b853(0x1a7)&&initEnv(_0x231c6d['env']),_0x231c6d;}export function getConfigAppCode(){return a259_0x44648a();}export function getMultiAppConfigs(_0x352bb4=a259_0x43bde6(0x1a6)){return a259_0x166d33(_0x352bb4);}export function getTemplateBaseUrl(){return a259_0x4dbc2d();}
1
+ const a265_0x19fa22=a265_0x273a;function a265_0x273a(_0x5872af,_0x1e42cf){_0x5872af=_0x5872af-0x19d;const _0x322a50=a265_0x322a();let _0x273aa3=_0x322a50[_0x5872af];return _0x273aa3;}(function(_0x399bde,_0x41fac6){const _0xc23c43=a265_0x273a,_0x4bc473=_0x399bde();while(!![]){try{const _0x36a86e=parseInt(_0xc23c43(0x19e))/0x1*(parseInt(_0xc23c43(0x1a4))/0x2)+parseInt(_0xc23c43(0x19d))/0x3+-parseInt(_0xc23c43(0x1a1))/0x4+-parseInt(_0xc23c43(0x1a7))/0x5*(-parseInt(_0xc23c43(0x1a2))/0x6)+parseInt(_0xc23c43(0x1a0))/0x7+-parseInt(_0xc23c43(0x1a5))/0x8+-parseInt(_0xc23c43(0x19f))/0x9*(parseInt(_0xc23c43(0x1a6))/0xa);if(_0x36a86e===_0x41fac6)break;else _0x4bc473['push'](_0x4bc473['shift']());}catch(_0x5225ba){_0x4bc473['push'](_0x4bc473['shift']());}}}(a265_0x322a,0x1c421));import{initEnv}from'../constant/env.js';function a265_0x322a(){const _0x29c1b7=['1067899QMIDOm','163920VSRqVL','55332HViSNG','project','2jVxfEv','660528xCnuyP','35010Ligbur','95dLXJmU','env','275163agltfQ','106877jsMRrr','738vygNlu'];a265_0x322a=function(){return _0x29c1b7;};return a265_0x322a();}import{readRawConfig,getConfigAppCode as a265_0x2785f1,getMultiAppConfigs as a265_0x2f00a1,getTemplateBaseUrl as a265_0x25d32a}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x529e9a){const _0x2dbc6b=a265_0x273a,_0x303d52=readRawConfig(_0x529e9a);return _0x303d52[_0x2dbc6b(0x1a8)]&&typeof _0x303d52[_0x2dbc6b(0x1a8)]==='string'&&initEnv(_0x303d52[_0x2dbc6b(0x1a8)]),_0x303d52;}export function getConfigAppCode(){return a265_0x2785f1();}export function getMultiAppConfigs(_0x4ed575=a265_0x19fa22(0x1a3)){return a265_0x2f00a1(_0x4ed575);}export function getTemplateBaseUrl(){return a265_0x25d32a();}
@@ -0,0 +1 @@
1
+ export declare function copyDirectory(src: string, dest: string): Promise<void>;
@@ -1 +1 @@
1
- (function(_0x3a5387,_0x22dc6c){const _0x2879ff=a260_0x4abe,_0x52081b=_0x3a5387();while(!![]){try{const _0x551844=-parseInt(_0x2879ff(0x119))/0x1*(-parseInt(_0x2879ff(0x116))/0x2)+-parseInt(_0x2879ff(0x112))/0x3*(-parseInt(_0x2879ff(0x105))/0x4)+parseInt(_0x2879ff(0x111))/0x5*(parseInt(_0x2879ff(0x118))/0x6)+-parseInt(_0x2879ff(0x10f))/0x7*(parseInt(_0x2879ff(0x117))/0x8)+parseInt(_0x2879ff(0x10b))/0x9+parseInt(_0x2879ff(0x113))/0xa*(-parseInt(_0x2879ff(0x108))/0xb)+-parseInt(_0x2879ff(0x10a))/0xc*(parseInt(_0x2879ff(0x107))/0xd);if(_0x551844===_0x22dc6c)break;else _0x52081b['push'](_0x52081b['shift']());}catch(_0x1acc89){_0x52081b['push'](_0x52081b['shift']());}}}(a260_0x1cda,0x7808a));import a260_0x54ea2a from'node:path';import a260_0xed5e84 from'node:fs';function a260_0x1cda(){const _0x1b8ae5=['复制目录时出错:','13sqsXlh','1375BeIKOL','isDirectory','16724340tktIsF','6975090DBmqzt','name','copyFileSync','mkdirSync','865550zmjQGv','join','11185KvLZbi','190011blnteb','5790QBQoLR','error','readdirSync','32fQYDts','40IjyLEd','1362cJaupP','45196KYMFgM','36SWxfTo'];a260_0x1cda=function(){return _0x1b8ae5;};return a260_0x1cda();}function a260_0x4abe(_0x320e9e,_0x4fc56c){_0x320e9e=_0x320e9e-0x105;const _0x1cda9b=a260_0x1cda();let _0x4abe28=_0x1cda9b[_0x320e9e];return _0x4abe28;}export async function copyDirectory(_0x5d84c9,_0x320894){const _0x3f391e=a260_0x4abe;try{const _0x1a9a51=a260_0xed5e84[_0x3f391e(0x115)](_0x5d84c9,{'withFileTypes':!![]});a260_0xed5e84[_0x3f391e(0x10e)](_0x320894,{'recursive':!![]});for(const _0x4eeb19 of _0x1a9a51){const _0x2083bd=a260_0x54ea2a[_0x3f391e(0x110)](_0x5d84c9,_0x4eeb19[_0x3f391e(0x10c)]),_0x5b171e=a260_0x54ea2a[_0x3f391e(0x110)](_0x320894,_0x4eeb19[_0x3f391e(0x10c)]);_0x4eeb19[_0x3f391e(0x109)]()?await copyDirectory(_0x2083bd,_0x5b171e):a260_0xed5e84[_0x3f391e(0x10d)](_0x2083bd,_0x5b171e);}}catch(_0x3500a){console[_0x3f391e(0x114)](_0x3f391e(0x106),_0x3500a);}}
1
+ function a266_0x31b5(){const _0x28b4b5=['1347642pkswir','1514NIIeFM','134FVRCab','7200798SweSvT','error','126UGgOYc','readdirSync','name','copyFileSync','24AaVnNs','mkdirSync','1555504NrJfrY','1354227SfEExY','复制目录时出错:','join','1195tLnoRr','16908uyWULI','233020MmrAhE'];a266_0x31b5=function(){return _0x28b4b5;};return a266_0x31b5();}(function(_0x3f30a4,_0x3da3f9){const _0xae1c79=a266_0x3041,_0x2746d6=_0x3f30a4();while(!![]){try{const _0x24afce=parseInt(_0xae1c79(0x158))/0x1*(parseInt(_0xae1c79(0x159))/0x2)+-parseInt(_0xae1c79(0x157))/0x3+-parseInt(_0xae1c79(0x162))/0x4+parseInt(_0xae1c79(0x166))/0x5*(parseInt(_0xae1c79(0x167))/0x6)+parseInt(_0xae1c79(0x163))/0x7*(-parseInt(_0xae1c79(0x160))/0x8)+-parseInt(_0xae1c79(0x15c))/0x9*(-parseInt(_0xae1c79(0x156))/0xa)+parseInt(_0xae1c79(0x15a))/0xb;if(_0x24afce===_0x3da3f9)break;else _0x2746d6['push'](_0x2746d6['shift']());}catch(_0x400d86){_0x2746d6['push'](_0x2746d6['shift']());}}}(a266_0x31b5,0x525a1));function a266_0x3041(_0x5bd086,_0x486a11){_0x5bd086=_0x5bd086-0x156;const _0x31b579=a266_0x31b5();let _0x3041bd=_0x31b579[_0x5bd086];return _0x3041bd;}import a266_0x5d9981 from'node:path';import a266_0x436854 from'node:fs';export async function copyDirectory(_0x1566df,_0x130892){const _0x510597=a266_0x3041;try{const _0x315bff=a266_0x436854[_0x510597(0x15d)](_0x1566df,{'withFileTypes':!![]});a266_0x436854[_0x510597(0x161)](_0x130892,{'recursive':!![]});for(const _0x3dbb6f of _0x315bff){const _0x3fdd2b=a266_0x5d9981[_0x510597(0x165)](_0x1566df,_0x3dbb6f['name']),_0x46b8c0=a266_0x5d9981[_0x510597(0x165)](_0x130892,_0x3dbb6f[_0x510597(0x15e)]);_0x3dbb6f['isDirectory']()?await copyDirectory(_0x3fdd2b,_0x46b8c0):a266_0x436854[_0x510597(0x15f)](_0x3fdd2b,_0x46b8c0);}}catch(_0x215b4f){console[_0x510597(0x15b)](_0x510597(0x164),_0x215b4f);}}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Normalized shape for create/update responses that should contain an entity id.
3
+ *
4
+ * Why:
5
+ * backend endpoints are being migrated gradually and may return either:
6
+ * - primitive id (legacy): `data: 1070` or `data: "1070"`
7
+ * - full object (new): `data: { id: 1070, ... }`
8
+ *
9
+ * This unified shape allows command handlers to consume one contract and avoid
10
+ * false negatives like "created but no id", which can trigger duplicate retries.
11
+ */
12
+ export interface NormalizedEntityWithId<T extends object = Record<string, unknown>> {
13
+ id: number | undefined;
14
+ entity: T;
15
+ }
16
+ /**
17
+ * Normalize API response data into a stable `{ id, entity }` shape.
18
+ *
19
+ * Problem solved:
20
+ * multiple endpoints are in a compatibility window where response `data`
21
+ * may be primitive id or object payload. This helper centralizes parsing
22
+ * so command code does not duplicate branching logic and can evolve safely
23
+ * while server contracts are transitioning.
24
+ *
25
+ * @param raw Raw response `data` from API.
26
+ * @typeParam T Expected entity object shape when the backend returns a full object.
27
+ * @param raw Raw response `data` from API.
28
+ * @returns Normalized id and entity object for downstream command flow.
29
+ */
30
+ export declare function normalizeEntityWithIdResponse<T extends object = Record<string, unknown>>(raw: unknown): NormalizedEntityWithId<T>;
@@ -1 +1 @@
1
- function a261_0xaeed(){const _0x59192f=['isFinite','1420eorpVJ','1235140yxeyCY','object','32412YUnSmE','string','86145AuaSCV','3855mqNCmd','2295088BGGJVU','14598yHLNkD','14490EtxzWG','1091790NPeWkj','679tOXLRp'];a261_0xaeed=function(){return _0x59192f;};return a261_0xaeed();}(function(_0x121f5a,_0x573674){const _0x3dc194=a261_0x2131,_0x3593b6=_0x121f5a();while(!![]){try{const _0x34bab7=parseInt(_0x3dc194(0x1b4))/0x1+-parseInt(_0x3dc194(0x1b0))/0x2+-parseInt(_0x3dc194(0x1a8))/0x3*(parseInt(_0x3dc194(0x1af))/0x4)+-parseInt(_0x3dc194(0x1ac))/0x5+parseInt(_0x3dc194(0x1b2))/0x6*(-parseInt(_0x3dc194(0x1ad))/0x7)+-parseInt(_0x3dc194(0x1a9))/0x8+parseInt(_0x3dc194(0x1aa))/0x9*(parseInt(_0x3dc194(0x1ab))/0xa);if(_0x34bab7===_0x573674)break;else _0x3593b6['push'](_0x3593b6['shift']());}catch(_0x2546e9){_0x3593b6['push'](_0x3593b6['shift']());}}}(a261_0xaeed,0x51680));function toFiniteNumber(_0x3687bc){const _0x409540=a261_0x2131;if(typeof _0x3687bc==='number'&&Number['isFinite'](_0x3687bc))return _0x3687bc;if(typeof _0x3687bc===_0x409540(0x1b3)){const _0x3a663e=_0x3687bc['trim']();if(!_0x3a663e)return undefined;const _0x30cefa=Number(_0x3a663e);if(Number[_0x409540(0x1ae)](_0x30cefa))return _0x30cefa;}return undefined;}function a261_0x2131(_0x4644f5,_0x5bcb71){_0x4644f5=_0x4644f5-0x1a8;const _0xaeed54=a261_0xaeed();let _0x213171=_0xaeed54[_0x4644f5];return _0x213171;}export function normalizeEntityWithIdResponse(_0x5a89ec){const _0x5519e8=a261_0x2131,_0x1c3b35=toFiniteNumber(_0x5a89ec);if(_0x1c3b35!==undefined)return{'id':_0x1c3b35,'entity':{'id':_0x1c3b35}};if(!_0x5a89ec||typeof _0x5a89ec!==_0x5519e8(0x1b1))return{'id':undefined,'entity':{}};const _0x5a1ef0={..._0x5a89ec},_0x764347=toFiniteNumber(_0x5a1ef0['id']);return _0x764347!==undefined&&(_0x5a1ef0['id']=_0x764347),{'id':_0x764347,'entity':_0x5a1ef0};}
1
+ (function(_0x4b3bd7,_0x1b7ed5){const _0x2386cc=a267_0x2913,_0x302fe0=_0x4b3bd7();while(!![]){try{const _0x81421e=parseInt(_0x2386cc(0x11d))/0x1+-parseInt(_0x2386cc(0x11a))/0x2+parseInt(_0x2386cc(0x121))/0x3*(-parseInt(_0x2386cc(0x124))/0x4)+parseInt(_0x2386cc(0x11c))/0x5+-parseInt(_0x2386cc(0x11f))/0x6*(parseInt(_0x2386cc(0x123))/0x7)+parseInt(_0x2386cc(0x119))/0x8*(parseInt(_0x2386cc(0x122))/0x9)+-parseInt(_0x2386cc(0x11e))/0xa;if(_0x81421e===_0x1b7ed5)break;else _0x302fe0['push'](_0x302fe0['shift']());}catch(_0x599da2){_0x302fe0['push'](_0x302fe0['shift']());}}}(a267_0x110c,0x5b02e));function a267_0x110c(){const _0x1e152d=['584656XQSNem','158342QgyGpJ','isFinite','2564410StGurr','704520QkuWhD','3900410MFDvUD','582zYGWef','string','1124757iKvXyK','63HxPEuz','36953FaIMwv','4rCAcCn'];a267_0x110c=function(){return _0x1e152d;};return a267_0x110c();}function toFiniteNumber(_0x487dee){const _0x29d0c3=a267_0x2913;if(typeof _0x487dee==='number'&&Number[_0x29d0c3(0x11b)](_0x487dee))return _0x487dee;if(typeof _0x487dee===_0x29d0c3(0x120)){const _0x1c2af4=_0x487dee['trim']();if(!_0x1c2af4)return undefined;const _0x3a0c67=Number(_0x1c2af4);if(Number['isFinite'](_0x3a0c67))return _0x3a0c67;}return undefined;}function a267_0x2913(_0x19089f,_0x27f4b1){_0x19089f=_0x19089f-0x119;const _0x110c1e=a267_0x110c();let _0x29139c=_0x110c1e[_0x19089f];return _0x29139c;}export function normalizeEntityWithIdResponse(_0x3359fd){const _0x1a5000=toFiniteNumber(_0x3359fd);if(_0x1a5000!==undefined)return{'id':_0x1a5000,'entity':{'id':_0x1a5000}};if(!_0x3359fd||typeof _0x3359fd!=='object')return{'id':undefined,'entity':{}};const _0x38e3ae={..._0x3359fd},_0x11ec8a=toFiniteNumber(_0x38e3ae['id']);return _0x11ec8a!==undefined&&(_0x38e3ae['id']=_0x11ec8a),{'id':_0x11ec8a,'entity':_0x38e3ae};}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 文件操作工具函数
3
+ *
4
+ * 提供跨模块共享的文件操作逻辑
5
+ */
6
+ /**
7
+ * 递归复制目录
8
+ *
9
+ * @param src 源目录路径
10
+ * @param dest 目标目录路径
11
+ */
12
+ export declare function copyDir(src: string, dest: string): Promise<void>;
13
+ /**
14
+ * 确保目录存在,如不存在则创建
15
+ *
16
+ * @param dir 目录路径
17
+ */
18
+ export declare function ensureDir(dir: string): void;
19
+ /**
20
+ * 检查文件或目录是否存在
21
+ *
22
+ * @param path 文件或目录路径
23
+ * @returns 是否存在
24
+ */
25
+ export declare function pathExists(path: string): boolean;
@@ -1 +1 @@
1
- function a262_0x1cae(){const _0x5f25ad=['379491JUdNRP','807210lgdYRQ','84273vQpSEJ','7791480MtDqsS','2295828ZumifL','24NwEMrg','isDirectory','1309840zArotc','83829foEyLy'];a262_0x1cae=function(){return _0x5f25ad;};return a262_0x1cae();}(function(_0x3f5522,_0x25fae6){const _0x5a4892=a262_0x1ca3,_0x5291bd=_0x3f5522();while(!![]){try{const _0x1949f0=-parseInt(_0x5a4892(0x125))/0x1+-parseInt(_0x5a4892(0x126))/0x2+parseInt(_0x5a4892(0x124))/0x3*(parseInt(_0x5a4892(0x121))/0x4)+parseInt(_0x5a4892(0x123))/0x5+-parseInt(_0x5a4892(0x120))/0x6+-parseInt(_0x5a4892(0x127))/0x7+parseInt(_0x5a4892(0x128))/0x8;if(_0x1949f0===_0x25fae6)break;else _0x5291bd['push'](_0x5291bd['shift']());}catch(_0x3c88df){_0x5291bd['push'](_0x5291bd['shift']());}}}(a262_0x1cae,0x371fc));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a262_0x1ca3(_0x4cbe09,_0x29ac5f){_0x4cbe09=_0x4cbe09-0x120;const _0x1cae1c=a262_0x1cae();let _0x1ca35=_0x1cae1c[_0x4cbe09];return _0x1ca35;}export async function copyDir(_0x11e762,_0xafdc31){const _0x2d1096=a262_0x1ca3,_0x39884e=statSync(_0x11e762);if(_0x39884e[_0x2d1096(0x122)]()){!existsSync(_0xafdc31)&&mkdirSync(_0xafdc31,{'recursive':!![]});const _0x4ecdce=readdirSync(_0x11e762);for(const _0x5d0e47 of _0x4ecdce){await copyDir(join(_0x11e762,_0x5d0e47),join(_0xafdc31,_0x5d0e47));}}else copyFileSync(_0x11e762,_0xafdc31);}export function ensureDir(_0xd355c7){!existsSync(_0xd355c7)&&mkdirSync(_0xd355c7,{'recursive':!![]});}export function pathExists(_0x5130eb){return existsSync(_0x5130eb);}
1
+ (function(_0x2649b8,_0x4e2f81){const _0x14de73=a268_0x1239,_0x475874=_0x2649b8();while(!![]){try{const _0x3a610c=parseInt(_0x14de73(0x9d))/0x1+parseInt(_0x14de73(0xa4))/0x2*(parseInt(_0x14de73(0xa0))/0x3)+parseInt(_0x14de73(0xa3))/0x4+parseInt(_0x14de73(0x9c))/0x5*(parseInt(_0x14de73(0x9e))/0x6)+-parseInt(_0x14de73(0x9f))/0x7+parseInt(_0x14de73(0xa2))/0x8+parseInt(_0x14de73(0xa6))/0x9*(-parseInt(_0x14de73(0xa5))/0xa);if(_0x3a610c===_0x4e2f81)break;else _0x475874['push'](_0x475874['shift']());}catch(_0x212f1b){_0x475874['push'](_0x475874['shift']());}}}(a268_0x3d72,0xe5014));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x1a530c,_0x4e9f0e){const _0x217fef=a268_0x1239,_0x315297=statSync(_0x1a530c);if(_0x315297[_0x217fef(0xa1)]()){!existsSync(_0x4e9f0e)&&mkdirSync(_0x4e9f0e,{'recursive':!![]});const _0x3a36c6=readdirSync(_0x1a530c);for(const _0x56b31c of _0x3a36c6){await copyDir(join(_0x1a530c,_0x56b31c),join(_0x4e9f0e,_0x56b31c));}}else copyFileSync(_0x1a530c,_0x4e9f0e);}function a268_0x1239(_0x4d64c1,_0x4c78fc){_0x4d64c1=_0x4d64c1-0x9c;const _0x3d7241=a268_0x3d72();let _0x12394d=_0x3d7241[_0x4d64c1];return _0x12394d;}function a268_0x3d72(){const _0x1f8d4d=['1337742JQongR','22296qbvwKk','3804969owJyeS','5178IEPmQS','isDirectory','655072BhXMmc','3511304VekHmm','2012xwqmNE','2370wbvQaS','116253YvJVSZ','685ugtMlY'];a268_0x3d72=function(){return _0x1f8d4d;};return a268_0x3d72();}export function ensureDir(_0x4f00ce){!existsSync(_0x4f00ce)&&mkdirSync(_0x4f00ce,{'recursive':!![]});}export function pathExists(_0x3831ea){return existsSync(_0x3831ea);}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Guides CDN 工具
3
+ *
4
+ * 从 CDN 拉取 skill guides 数据,并写入到用户项目
5
+ *
6
+ * 优先级:本地 dist 文件(开发模式) > CDN(生产模式)
7
+ */
8
+ /**
9
+ * Guides 数据结构
10
+ */
11
+ export interface GuidesData {
12
+ version: string;
13
+ buildTime: string;
14
+ skillTemplate: {
15
+ content: string;
16
+ lastUpdated?: string;
17
+ };
18
+ guides: Record<string, {
19
+ title: string;
20
+ path: string;
21
+ content: string;
22
+ lastUpdated?: string;
23
+ requireFlags?: string[];
24
+ extendContent?: string;
25
+ extendLastUpdated?: string;
26
+ }>;
27
+ }
28
+ /**
29
+ * 从 CDN 拉取 guides 数据(单一 guides.json,已含全部指南)
30
+ */
31
+ export declare function fetchGuidesFromCDN(): Promise<GuidesData>;
32
+ /**
33
+ * 将 guides 数据写入到项目目录
34
+ *
35
+ * @param guidesData - guides 数据
36
+ * @param projectRoot - 项目根目录
37
+ * @param basePath - 目标基础路径
38
+ * @param _providedFlags 保留参数以兼容旧调用方;指南已全量安装,不再按 flag 过滤
39
+ */
40
+ export declare function writeGuidesToProject(guidesData: GuidesData, projectRoot: string, basePath?: string, _providedFlags?: string[]): void;
41
+ /**
42
+ * 追加更新时间到内容末尾(通用方法)
43
+ */
44
+ export declare function appendUpdateTime(content: string, lastUpdated: string): string;
45
+ /**
46
+ * 获取 SKILL.md 模板内容(用于替换 {{IDE_NAME}})
47
+ */
48
+ export declare function getSkillTemplate(guidesData: GuidesData): string;
49
+ /**
50
+ * 追加符合条件的 extendContent 到 SKILL.md
51
+ *
52
+ * @param content - 当前 SKILL.md 内容
53
+ * @param guidesData - guides 数据
54
+ * @param _providedFlags 保留兼容;extend 全量追加(requireFlags 仅作元数据,见各指南正文)
55
+ * @returns 追加 extendContent 后的内容
56
+ */
57
+ export declare function appendExtendContents(content: string, guidesData: GuidesData, _providedFlags?: string[]): string;
58
+ /**
59
+ * 写入 SKILL.md 到目标路径(替换 {{IDE_NAME}} 占位符)
60
+ *
61
+ * @param guidesData - guides 数据
62
+ * @param destPath - 目标文件路径
63
+ * @param ideDisplayName - IDE 显示名称(替换 {{IDE_NAME}})
64
+ */
65
+ export declare function writeSkillFile(guidesData: GuidesData, destPath: string, ideDisplayName: string): void;
66
+ /**
67
+ * 安装 guides(从 CDN 拉取并写入项目)
68
+ *
69
+ * @param projectRoot 项目根目录
70
+ * @returns 写入的 guides 数量
71
+ */
72
+ export declare function installGuides(projectRoot: string): Promise<number>;
73
+ /**
74
+ * 获取 guides 摘要(用于显示)
75
+ */
76
+ export declare function getGuidesSummary(guidesData: GuidesData): Array<{
77
+ key: string;
78
+ title: string;
79
+ path: string;
80
+ }>;
@@ -1 +1 @@
1
- const a263_0xd21190=a263_0x449f;(function(_0x770fa0,_0x5afad0){const _0x7b5150=a263_0x449f,_0xbde06b=_0x770fa0();while(!![]){try{const _0x80578e=-parseInt(_0x7b5150(0x1bd))/0x1+parseInt(_0x7b5150(0x1c0))/0x2*(parseInt(_0x7b5150(0x1c2))/0x3)+parseInt(_0x7b5150(0x1ca))/0x4+parseInt(_0x7b5150(0x1dc))/0x5*(-parseInt(_0x7b5150(0x1c4))/0x6)+-parseInt(_0x7b5150(0x1d5))/0x7+-parseInt(_0x7b5150(0x1d8))/0x8+parseInt(_0x7b5150(0x1c7))/0x9*(parseInt(_0x7b5150(0x1c6))/0xa);if(_0x80578e===_0x5afad0)break;else _0xbde06b['push'](_0xbde06b['shift']());}catch(_0x4a6351){_0xbde06b['push'](_0xbde06b['shift']());}}}(a263_0x3f4f,0x578ef));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';function a263_0x449f(_0x45d7b9,_0x209055){_0x45d7b9=_0x45d7b9-0x1bc;const _0x3f4ff0=a263_0x3f4f();let _0x449f11=_0x3f4ff0[_0x45d7b9];return _0x449f11;}import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x3d96c6=getTemplateBaseUrl();return _0x3d96c6+'/skills/guides.json';}function a263_0x3f4f(){const _0x1540a0=['45165hXdhOK','skillTemplate','extendContent','28508TLUjqr','join','6BDktFq','lastUpdated','342438aeEtqU','CDN\x20返回数据格式错误','6546610lFdhYg','9AOAjqp','statusText','trimEnd','1952512QfNLia','application/json','\x0a\x0a>更新时间:','status','.md','.lovrabet/skill/guides','guides','object','replace','cache','entries','3069990gowsad','utf-8','path','2174800IHHddk','push','title','length','5sWkcSF','CDN\x20数据中缺少\x20skillTemplate','map','content'];a263_0x3f4f=function(){return _0x1540a0;};return a263_0x3f4f();}const CACHE_DIR=join(homedir(),'.lovrabet',a263_0xd21190(0x1d3));export async function fetchGuidesFromCDN(){const _0x13cc15=a263_0xd21190,_0x18fad6=getGuidesCdnUrl(),_0x531759=await fetch(_0x18fad6,{'headers':{'Accept':_0x13cc15(0x1cb)}});if(!_0x531759['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x531759[_0x13cc15(0x1cd)]+'\x20'+_0x531759[_0x13cc15(0x1c8)]);const _0x233d66=await _0x531759['json']();if(!_0x233d66[_0x13cc15(0x1d0)]||typeof _0x233d66[_0x13cc15(0x1d0)]!==_0x13cc15(0x1d1))throw new Error(_0x13cc15(0x1c5));return _0x233d66;}export function writeGuidesToProject(_0x181665,_0x9be492,_0x5c17e7=a263_0xd21190(0x1cf),_0xee902e){const _0x1289cf=a263_0xd21190,_0x5b738c=join(_0x9be492,_0x5c17e7);mkdirSync(_0x5b738c,{'recursive':!![]});for(const [_0x5a8f0e,_0x3de58f]of Object[_0x1289cf(0x1d4)](_0x181665['guides'])){let _0xe5089b=_0x3de58f[_0x1289cf(0x1bc)];_0x3de58f[_0x1289cf(0x1c3)]&&(_0xe5089b=appendUpdateTime(_0xe5089b,_0x3de58f[_0x1289cf(0x1c3)])),writeFileSync(join(_0x5b738c,_0x5a8f0e+_0x1289cf(0x1ce)),_0xe5089b,_0x1289cf(0x1d6));}}export function appendUpdateTime(_0x40b609,_0x1fc15e){const _0xa199fa=a263_0xd21190;return _0x40b609=_0x40b609[_0xa199fa(0x1d2)](/\n*>更新时间:.*$/m,''),_0x40b609[_0xa199fa(0x1c9)]()+(_0xa199fa(0x1cc)+_0x1fc15e);}export function getSkillTemplate(_0x413f18){const _0x5578bf=a263_0xd21190;return _0x413f18[_0x5578bf(0x1be)]?.[_0x5578bf(0x1bc)]||'';}export function appendExtendContents(_0x3c4826,_0x5ad75a,_0x300d83){const _0x3a409a=a263_0xd21190,_0x904843=[];for(const [,_0x408c2d]of Object['entries'](_0x5ad75a[_0x3a409a(0x1d0)])){_0x408c2d[_0x3a409a(0x1bf)]&&_0x904843[_0x3a409a(0x1d9)](_0x408c2d[_0x3a409a(0x1bf)][_0x3a409a(0x1c9)]());}if(_0x904843[_0x3a409a(0x1db)]===0x0)return _0x3c4826;return _0x3c4826[_0x3a409a(0x1c9)]()+'\x0a\x0a'+_0x904843[_0x3a409a(0x1c1)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x1a32cb,_0x3d3ee7,_0xd3b2d0){const _0x22b859=a263_0xd21190,_0x3a7895=getSkillTemplate(_0x1a32cb);if(!_0x3a7895)throw new Error(_0x22b859(0x1dd));const _0x280809=dirname(_0x3d3ee7);mkdirSync(_0x280809,{'recursive':!![]});let _0x39bdd1=_0x3a7895[_0x22b859(0x1d2)](/\{\{IDE_NAME\}\}/g,_0xd3b2d0);_0x39bdd1=appendExtendContents(_0x39bdd1,_0x1a32cb),_0x1a32cb[_0x22b859(0x1be)][_0x22b859(0x1c3)]&&(_0x39bdd1=appendUpdateTime(_0x39bdd1,_0x1a32cb['skillTemplate']['lastUpdated'])),writeFileSync(_0x3d3ee7,_0x39bdd1,'utf-8');}export async function installGuides(_0x460a9b){const _0x91b996=a263_0xd21190,_0x5c96c5=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5c96c5,_0x460a9b),Object['keys'](_0x5c96c5[_0x91b996(0x1d0)])[_0x91b996(0x1db)];}export function getGuidesSummary(_0x56d5b9){const _0x30f5d1=a263_0xd21190;return Object[_0x30f5d1(0x1d4)](_0x56d5b9['guides'])[_0x30f5d1(0x1de)](([_0x315046,_0x5efc8c])=>({'key':_0x315046,'title':_0x5efc8c[_0x30f5d1(0x1da)],'path':_0x5efc8c[_0x30f5d1(0x1d7)]}));}
1
+ const a269_0xe0efe1=a269_0x3c54;(function(_0xd3f5c6,_0x50df86){const _0x4405e6=a269_0x3c54,_0x488879=_0xd3f5c6();while(!![]){try{const _0x2de105=parseInt(_0x4405e6(0x17f))/0x1*(-parseInt(_0x4405e6(0x1a0))/0x2)+parseInt(_0x4405e6(0x19f))/0x3+parseInt(_0x4405e6(0x19e))/0x4+-parseInt(_0x4405e6(0x185))/0x5+-parseInt(_0x4405e6(0x194))/0x6*(parseInt(_0x4405e6(0x190))/0x7)+parseInt(_0x4405e6(0x19c))/0x8+-parseInt(_0x4405e6(0x193))/0x9*(parseInt(_0x4405e6(0x191))/0xa);if(_0x2de105===_0x50df86)break;else _0x488879['push'](_0x488879['shift']());}catch(_0x2a38ef){_0x488879['push'](_0x488879['shift']());}}}(a269_0x2232,0xa1231));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x151e90=a269_0x3c54,_0x4c0a96=getTemplateBaseUrl();return _0x4c0a96+_0x151e90(0x184);}const CACHE_DIR=join(homedir(),'.lovrabet',a269_0xe0efe1(0x199));export async function fetchGuidesFromCDN(){const _0x238265=a269_0xe0efe1,_0x4d3b27=getGuidesCdnUrl(),_0x3a9f57=await fetch(_0x4d3b27,{'headers':{'Accept':_0x238265(0x188)}});if(!_0x3a9f57['ok'])throw new Error(_0x238265(0x180)+_0x3a9f57[_0x238265(0x18d)]+'\x20'+_0x3a9f57[_0x238265(0x196)]);const _0x45b920=await _0x3a9f57[_0x238265(0x18e)]();if(!_0x45b920[_0x238265(0x186)]||typeof _0x45b920[_0x238265(0x186)]!=='object')throw new Error(_0x238265(0x18c));return _0x45b920;}export function writeGuidesToProject(_0x1b7e0a,_0x1cbf13,_0x4c6ddf='.lovrabet/skill/guides',_0x1583e1){const _0x2cc8bf=a269_0xe0efe1,_0x521144=join(_0x1cbf13,_0x4c6ddf);mkdirSync(_0x521144,{'recursive':!![]});for(const [_0x21b4ec,_0x2239c3]of Object[_0x2cc8bf(0x19b)](_0x1b7e0a['guides'])){let _0x1c8ebb=_0x2239c3[_0x2cc8bf(0x183)];_0x2239c3[_0x2cc8bf(0x192)]&&(_0x1c8ebb=appendUpdateTime(_0x1c8ebb,_0x2239c3['lastUpdated'])),writeFileSync(join(_0x521144,_0x21b4ec+_0x2cc8bf(0x18b)),_0x1c8ebb,_0x2cc8bf(0x189));}}export function appendUpdateTime(_0x4533d4,_0x23492a){const _0x27bbe8=a269_0xe0efe1;return _0x4533d4=_0x4533d4[_0x27bbe8(0x187)](/\n*>更新时间:.*$/m,''),_0x4533d4[_0x27bbe8(0x19d)]()+(_0x27bbe8(0x181)+_0x23492a);}function a269_0x3c54(_0x3a5713,_0x47edf9){_0x3a5713=_0x3a5713-0x17d;const _0x2232f2=a269_0x2232();let _0x3c54b2=_0x2232f2[_0x3a5713];return _0x3c54b2;}export function getSkillTemplate(_0xbc57cf){const _0x584fd1=a269_0xe0efe1;return _0xbc57cf['skillTemplate']?.[_0x584fd1(0x183)]||'';}export function appendExtendContents(_0x5dfec8,_0x4fdf0b,_0x432a88){const _0x3303e0=a269_0xe0efe1,_0x41bfda=[];for(const [,_0x339cf5]of Object[_0x3303e0(0x19b)](_0x4fdf0b[_0x3303e0(0x186)])){_0x339cf5['extendContent']&&_0x41bfda[_0x3303e0(0x197)](_0x339cf5[_0x3303e0(0x195)][_0x3303e0(0x19d)]());}if(_0x41bfda[_0x3303e0(0x17d)]===0x0)return _0x5dfec8;return _0x5dfec8[_0x3303e0(0x19d)]()+'\x0a\x0a'+_0x41bfda[_0x3303e0(0x18f)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2291d8,_0x396c15,_0x1d6977){const _0x35d008=a269_0xe0efe1,_0x30e630=getSkillTemplate(_0x2291d8);if(!_0x30e630)throw new Error(_0x35d008(0x17e));const _0x20b0d8=dirname(_0x396c15);mkdirSync(_0x20b0d8,{'recursive':!![]});let _0x209163=_0x30e630['replace'](/\{\{IDE_NAME\}\}/g,_0x1d6977);_0x209163=appendExtendContents(_0x209163,_0x2291d8),_0x2291d8[_0x35d008(0x19a)]['lastUpdated']&&(_0x209163=appendUpdateTime(_0x209163,_0x2291d8['skillTemplate']['lastUpdated'])),writeFileSync(_0x396c15,_0x209163,_0x35d008(0x189));}export async function installGuides(_0x34a457){const _0x353bfe=a269_0xe0efe1,_0x81323=await fetchGuidesFromCDN();return writeGuidesToProject(_0x81323,_0x34a457),Object[_0x353bfe(0x18a)](_0x81323['guides'])['length'];}export function getGuidesSummary(_0x31e179){const _0x23a748=a269_0xe0efe1;return Object[_0x23a748(0x19b)](_0x31e179['guides'])[_0x23a748(0x182)](([_0x2bd1e8,_0xe2de41])=>({'key':_0x2bd1e8,'title':_0xe2de41[_0x23a748(0x198)],'path':_0xe2de41[_0x23a748(0x1a1)]}));}function a269_0x2232(){const _0x2f241f=['CDN\x20数据中缺少\x20skillTemplate','4XJOXLR','CDN\x20请求失败:\x20','\x0a\x0a>更新时间:','map','content','/skills/guides.json','111555eBbcUk','guides','replace','application/json','utf-8','keys','.md','CDN\x20返回数据格式错误','status','json','join','245Zhsxgf','3930YytYmO','lastUpdated','4581DuZzbf','119826hpMXaK','extendContent','statusText','push','title','cache','skillTemplate','entries','7563520zDcAFN','trimEnd','2659340gZsnBi','769761UUuCME','142756zrITsL','path','length'];a269_0x2232=function(){return _0x2f241f;};return a269_0x2232();}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * HTTP 客户端工具,提供健壮的网络请求功能
3
+ */
4
+ export interface RequestOptions {
5
+ /** 请求超时时间(毫秒),默认 30 秒 */
6
+ timeout?: number;
7
+ /** 重试次数,默认 3 次 */
8
+ retries?: number;
9
+ /** 重试间隔(毫秒),默认 1 秒 */
10
+ retryDelay?: number;
11
+ /** 请求头 */
12
+ headers?: Record<string, string>;
13
+ }
14
+ export interface HttpResponse<T = any> {
15
+ ok: boolean;
16
+ status: number;
17
+ statusText: string;
18
+ data: T;
19
+ headers: Headers;
20
+ url: string;
21
+ text(): Promise<string>;
22
+ }
23
+ /**
24
+ * 可重试的 HTTP 请求
25
+ */
26
+ export declare function httpRequest<T = any>(url: string, options?: RequestOptions): Promise<HttpResponse<T>>;
27
+ /**
28
+ * 验证 URL 格式
29
+ */
30
+ export declare function validateUrl(url: string): boolean;
@@ -1 +1 @@
1
- (function(_0x49aacd,_0x52db54){const _0x2c4100=a264_0x5de9,_0x5d513b=_0x49aacd();while(!![]){try{const _0x2a67d1=parseInt(_0x2c4100(0x205))/0x1+parseInt(_0x2c4100(0x20a))/0x2+-parseInt(_0x2c4100(0x1fd))/0x3*(parseInt(_0x2c4100(0x206))/0x4)+-parseInt(_0x2c4100(0x203))/0x5*(-parseInt(_0x2c4100(0x20d))/0x6)+parseInt(_0x2c4100(0x201))/0x7+-parseInt(_0x2c4100(0x1f8))/0x8+-parseInt(_0x2c4100(0x207))/0x9;if(_0x2a67d1===_0x52db54)break;else _0x5d513b['push'](_0x5d513b['shift']());}catch(_0x1cb516){_0x5d513b['push'](_0x5d513b['shift']());}}}(a264_0x5002,0xcc3d8));function a264_0x5002(){const _0x464fa2=['Request\x20failed','5008240VtcIWu','includes','1443545tNKcke','49288txXjuu','560061KzoyiX','signal','message','2573176pVhTht','headers','log','6mhpDMU','text','json','abort','\x20次重试...','get','status','ECONNRESET','11822392BYvuon','url','statusText','*\x20请求失败,','name','339eASWYf','fetch','AbortError','application/json','260407txCVRq'];a264_0x5002=function(){return _0x464fa2;};return a264_0x5002();}function a264_0x5de9(_0x5ac795,_0x3ce5fd){_0x5ac795=_0x5ac795-0x1f4;const _0x50023f=a264_0x5002();let _0x5de97e=_0x50023f[_0x5ac795];return _0x5de97e;}export async function httpRequest(_0x34d711,_0x47f0e1={}){const _0x303537=a264_0x5de9,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x47f0e1;let _0x4bb36c=null;for(let _0x569449=0x0;_0x569449<=retries;_0x569449++){try{const _0x4c34e2=new AbortController(),_0x31ce58=setTimeout(()=>_0x4c34e2[_0x303537(0x210)](),timeout),_0x574264=await fetch(_0x34d711,{'headers':headers,'signal':_0x4c34e2[_0x303537(0x208)]});clearTimeout(_0x31ce58);let _0x45cc0a;const _0x51fede=_0x574264[_0x303537(0x20b)][_0x303537(0x1f5)]('content-type');return _0x51fede?.[_0x303537(0x204)](_0x303537(0x200))?_0x45cc0a=await _0x574264[_0x303537(0x20f)]():_0x45cc0a=await _0x574264['text'](),{'ok':_0x574264['ok'],'status':_0x574264[_0x303537(0x1f6)],'statusText':_0x574264[_0x303537(0x1fa)],'data':_0x45cc0a,'headers':_0x574264[_0x303537(0x20b)],'url':_0x574264[_0x303537(0x1f9)],'text':()=>_0x574264[_0x303537(0x20e)]()};}catch(_0x49440d){_0x4bb36c=_0x49440d instanceof Error?_0x49440d:new Error(String(_0x49440d));if(_0x569449===retries)break;if(shouldRetry(_0x49440d)){console[_0x303537(0x20c)](_0x303537(0x1fb)+retryDelay+'ms\x20后进行第\x20'+(_0x569449+0x1)+_0x303537(0x1f4)),await sleep(retryDelay);continue;}else break;}}throw _0x4bb36c||new Error(_0x303537(0x202));}function shouldRetry(_0x29a15e){const _0x703bfb=a264_0x5de9;if(_0x29a15e instanceof Error){if(_0x29a15e['name']===_0x703bfb(0x1ff))return![];if(_0x29a15e[_0x703bfb(0x1fc)]==='TypeError'&&_0x29a15e['message'][_0x703bfb(0x204)](_0x703bfb(0x1fe)))return!![];if(_0x29a15e[_0x703bfb(0x209)][_0x703bfb(0x204)](_0x703bfb(0x1f7)))return!![];if(_0x29a15e[_0x703bfb(0x209)]['includes']('ENOTFOUND'))return![];}return![];}function sleep(_0x3d950c){return new Promise(_0x339c29=>setTimeout(_0x339c29,_0x3d950c));}export function validateUrl(_0xef6b4c){try{return new URL(_0xef6b4c),!![];}catch{return![];}}
1
+ function a270_0x1bd4(){const _0x30ca56=['url','11879536abWLpl','AbortError','ECONNRESET','906955caJNvk','includes','message','\x20次重试...','596652Bjwvpk','TypeError','165573ICsBkP','14PDrONf','get','log','content-type','Request\x20failed','*\x20请求失败,','fetch','signal','headers','239583aQkUPb','985615YSEhuE','abort','name','text','1381200UHBkgb','application/json'];a270_0x1bd4=function(){return _0x30ca56;};return a270_0x1bd4();}(function(_0x4dadf4,_0x5eae2b){const _0x467772=a270_0x2c0b,_0x289b66=_0x4dadf4();while(!![]){try{const _0x4422da=parseInt(_0x467772(0x155))/0x1+-parseInt(_0x467772(0x156))/0x2*(parseInt(_0x467772(0x15f))/0x3)+-parseInt(_0x467772(0x164))/0x4+-parseInt(_0x467772(0x160))/0x5+-parseInt(_0x467772(0x153))/0x6+-parseInt(_0x467772(0x14f))/0x7+parseInt(_0x467772(0x167))/0x8;if(_0x4422da===_0x5eae2b)break;else _0x289b66['push'](_0x289b66['shift']());}catch(_0x50c0a4){_0x289b66['push'](_0x289b66['shift']());}}}(a270_0x1bd4,0x4e23a));export async function httpRequest(_0x5d1bba,_0x31035f={}){const _0x49250a=a270_0x2c0b,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x31035f;let _0x2b37b7=null;for(let _0x36e78c=0x0;_0x36e78c<=retries;_0x36e78c++){try{const _0x1825ee=new AbortController(),_0x17f98a=setTimeout(()=>_0x1825ee[_0x49250a(0x161)](),timeout),_0x59c97a=await fetch(_0x5d1bba,{'headers':headers,'signal':_0x1825ee[_0x49250a(0x15d)]});clearTimeout(_0x17f98a);let _0x18b9e7;const _0x57e739=_0x59c97a[_0x49250a(0x15e)][_0x49250a(0x157)](_0x49250a(0x159));return _0x57e739?.[_0x49250a(0x150)](_0x49250a(0x165))?_0x18b9e7=await _0x59c97a['json']():_0x18b9e7=await _0x59c97a['text'](),{'ok':_0x59c97a['ok'],'status':_0x59c97a['status'],'statusText':_0x59c97a['statusText'],'data':_0x18b9e7,'headers':_0x59c97a['headers'],'url':_0x59c97a[_0x49250a(0x166)],'text':()=>_0x59c97a[_0x49250a(0x163)]()};}catch(_0x45293f){_0x2b37b7=_0x45293f instanceof Error?_0x45293f:new Error(String(_0x45293f));if(_0x36e78c===retries)break;if(shouldRetry(_0x45293f)){console[_0x49250a(0x158)](_0x49250a(0x15b)+retryDelay+'ms\x20后进行第\x20'+(_0x36e78c+0x1)+_0x49250a(0x152)),await sleep(retryDelay);continue;}else break;}}throw _0x2b37b7||new Error(_0x49250a(0x15a));}function a270_0x2c0b(_0x391488,_0x191742){_0x391488=_0x391488-0x14e;const _0x1bd4fb=a270_0x1bd4();let _0x2c0b88=_0x1bd4fb[_0x391488];return _0x2c0b88;}function shouldRetry(_0x5e00e3){const _0x453dca=a270_0x2c0b;if(_0x5e00e3 instanceof Error){if(_0x5e00e3[_0x453dca(0x162)]===_0x453dca(0x168))return![];if(_0x5e00e3['name']===_0x453dca(0x154)&&_0x5e00e3['message'][_0x453dca(0x150)](_0x453dca(0x15c)))return!![];if(_0x5e00e3[_0x453dca(0x151)]['includes'](_0x453dca(0x14e)))return!![];if(_0x5e00e3[_0x453dca(0x151)][_0x453dca(0x150)]('ENOTFOUND'))return![];}return![];}function sleep(_0x296321){return new Promise(_0xac7322=>setTimeout(_0xac7322,_0x296321));}export function validateUrl(_0x3091b9){try{return new URL(_0x3091b9),!![];}catch{return![];}}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 统一的非交互模式检测
3
+ *
4
+ * 唯一入口,context.ts 和 cli.tsx 均引用此函数,
5
+ * 避免两处实现产生不一致行为。
6
+ */
7
+ export declare function isNonInteractive(flags: Record<string, any>): boolean;
@@ -1 +1 @@
1
- function a265_0x289c(_0x3e8047,_0x3b0e85){_0x3e8047=_0x3e8047-0x1b6;const _0x2c8981=a265_0x2c89();let _0x289c43=_0x2c8981[_0x3e8047];return _0x289c43;}(function(_0x280937,_0x4ebc75){const _0x250b7e=a265_0x289c,_0x57d5e5=_0x280937();while(!![]){try{const _0xf4635a=parseInt(_0x250b7e(0x1bf))/0x1*(parseInt(_0x250b7e(0x1c3))/0x2)+parseInt(_0x250b7e(0x1bb))/0x3*(parseInt(_0x250b7e(0x1c4))/0x4)+parseInt(_0x250b7e(0x1b9))/0x5+parseInt(_0x250b7e(0x1c1))/0x6+-parseInt(_0x250b7e(0x1bd))/0x7+-parseInt(_0x250b7e(0x1ba))/0x8+-parseInt(_0x250b7e(0x1b7))/0x9*(-parseInt(_0x250b7e(0x1c2))/0xa);if(_0xf4635a===_0x4ebc75)break;else _0x57d5e5['push'](_0x57d5e5['shift']());}catch(_0x413531){_0x57d5e5['push'](_0x57d5e5['shift']());}}}(a265_0x2c89,0x77ad1));function env(_0x2fc3fa){return process.env[`RABETBASE_${_0x2fc3fa}`]||process.env[`LOVRABET_${_0x2fc3fa}`]||undefined;}export function isNonInteractive(_0x488476){const _0x281576=a265_0x289c;return!!(_0x488476[_0x281576(0x1c0)]||_0x488476['ci']||env('CI')===_0x281576(0x1b8)||process.env.CI===_0x281576(0x1b8)||!process['stdout'][_0x281576(0x1c5)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x3cfbda=a265_0x289c;if(!process[_0x3cfbda(0x1bc)]['isTTY'])return![];try{const _0x5682ce=process[_0x3cfbda(0x1bc)][_0x3cfbda(0x1b6)];return process[_0x3cfbda(0x1bc)]['setRawMode'](!![]),process['stdin'][_0x3cfbda(0x1be)](_0x5682ce??![]),!![];}catch{return![];}}function a265_0x2c89(){const _0x417b5b=['true','3289300VdZKuW','7157504FMExxQ','1545NMYEUH','stdin','4602423tNAYMW','setRawMode','1VCdHdm','nonInteractive','598560KlwSWX','8088560IpcTof','531548rQQdiF','1632oLWqPt','isTTY','isRaw','9sUHqia'];a265_0x2c89=function(){return _0x417b5b;};return a265_0x2c89();}
1
+ function a271_0x2e32(){const _0x337291=['104IpvBXw','4599eIVpOu','553092txKQaQ','stdin','stdout','322AUdPNG','602581XtFSSR','14106672edCFvJ','4644234dUZAPy','true','4181805RKfgjW','isTTY','3128636RIBZgj','setRawMode','nonInteractive','isRaw'];a271_0x2e32=function(){return _0x337291;};return a271_0x2e32();}function a271_0x34ca(_0x50bd04,_0x4d8bb6){_0x50bd04=_0x50bd04-0x1da;const _0x2e32ef=a271_0x2e32();let _0x34ca53=_0x2e32ef[_0x50bd04];return _0x34ca53;}(function(_0x7007ac,_0x32fb88){const _0x3ea9d1=a271_0x34ca,_0x8f4a90=_0x7007ac();while(!![]){try{const _0x4d2c6e=-parseInt(_0x3ea9d1(0x1e0))/0x1*(-parseInt(_0x3ea9d1(0x1e4))/0x2)+parseInt(_0x3ea9d1(0x1e1))/0x3+parseInt(_0x3ea9d1(0x1db))/0x4+parseInt(_0x3ea9d1(0x1e9))/0x5+parseInt(_0x3ea9d1(0x1e7))/0x6+parseInt(_0x3ea9d1(0x1e5))/0x7*(-parseInt(_0x3ea9d1(0x1df))/0x8)+-parseInt(_0x3ea9d1(0x1e6))/0x9;if(_0x4d2c6e===_0x32fb88)break;else _0x8f4a90['push'](_0x8f4a90['shift']());}catch(_0x483c45){_0x8f4a90['push'](_0x8f4a90['shift']());}}}(a271_0x2e32,0x9a05b));function env(_0x54bee4){return process.env[`RABETBASE_${_0x54bee4}`]||process.env[`LOVRABET_${_0x54bee4}`]||undefined;}export function isNonInteractive(_0x774507){const _0x3ccbcd=a271_0x34ca;return!!(_0x774507[_0x3ccbcd(0x1dd)]||_0x774507['ci']||env('CI')===_0x3ccbcd(0x1e8)||process.env.CI===_0x3ccbcd(0x1e8)||!process[_0x3ccbcd(0x1e3)][_0x3ccbcd(0x1da)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x4e9caa=a271_0x34ca;if(!process[_0x4e9caa(0x1e2)][_0x4e9caa(0x1da)])return![];try{const _0x28a4f3=process[_0x4e9caa(0x1e2)][_0x4e9caa(0x1de)];return process['stdin'][_0x4e9caa(0x1dc)](!![]),process['stdin']['setRawMode'](_0x28a4f3??![]),!![];}catch{return![];}}
@@ -0,0 +1,62 @@
1
+ import winston from "winston";
2
+ export interface LogEntry {
3
+ timestamp: string;
4
+ level: "info" | "success" | "error" | "warn";
5
+ command: string;
6
+ rawCommand?: string;
7
+ message: string;
8
+ duration?: number;
9
+ details?: any;
10
+ }
11
+ declare class Logger {
12
+ private winstonLogger;
13
+ private logFilePath;
14
+ private currentRawCommand;
15
+ constructor();
16
+ /**
17
+ * 设置当前执行的原始命令
18
+ */
19
+ setRawCommand(rawCommand: string): void;
20
+ /**
21
+ * 初始化 Winston Logger
22
+ */
23
+ private initWinstonLogger;
24
+ /**
25
+ * 设置日志文件路径
26
+ */
27
+ setLogPath(projectPath: string): void;
28
+ /**
29
+ * 记录信息日志
30
+ */
31
+ info(command: string, message: string, details?: any): void;
32
+ /**
33
+ * 记录成功日志
34
+ */
35
+ success(command: string, message: string, duration?: number, details?: any): void;
36
+ /**
37
+ * 记录错误日志
38
+ */
39
+ error(command: string, message: string, details?: any): void;
40
+ /**
41
+ * 记录警告日志
42
+ */
43
+ warn(command: string, message: string, details?: any): void;
44
+ /**
45
+ * 记录带执行时间的任务
46
+ */
47
+ logTask<T>(command: string, taskName: string, task: () => Promise<T>): Promise<T>;
48
+ /**
49
+ * 读取日志文件内容
50
+ */
51
+ readLogs(): LogEntry[];
52
+ /**
53
+ * 清空日志文件
54
+ */
55
+ clearLogs(): void;
56
+ /**
57
+ * 获取 Winston Logger 实例 (用于高级用法)
58
+ */
59
+ getWinstonInstance(): winston.Logger;
60
+ }
61
+ export declare const logger: Logger;
62
+ export {};
@@ -1 +1 @@
1
- const a266_0x11abc8=a266_0x3578;function a266_0x4f90(){const _0x549226=['errors','log','existsSync','error','setRawCommand','timestamp','toISOString','1317685YMrZTN','currentRawCommand','format','command','trim','addColors','.lovrabet.log','696845HCwjIh','rawCommand','438150yDhFTA','details','utf8','getWinstonInstance','printf','filter','message','success','171kZVPkm','blue','unknown','now','createLogger','map','失败:\x20','warn','Failed\x20to\x20clear\x20logs:','initWinstonLogger','logFilePath','readFileSync','winstonLogger','clearLogs','950vtrztJ','logTask','split','4047Vbrgqh','完成:\x20','writeFileSync','level','4670080ZRBYEr','7LSgbEp','readLogs','info','red','transports','2678976kqeBYs','yellow','281510tbeuLz','duration'];a266_0x4f90=function(){return _0x549226;};return a266_0x4f90();}function a266_0x3578(_0x46bdb1,_0x2fa901){_0x46bdb1=_0x46bdb1-0x150;const _0x4f9026=a266_0x4f90();let _0x35780b=_0x4f9026[_0x46bdb1];return _0x35780b;}(function(_0x178f02,_0x311917){const _0x256158=a266_0x3578,_0x5a67ef=_0x178f02();while(!![]){try{const _0x3cff18=parseInt(_0x256158(0x16a))/0x1+-parseInt(_0x256158(0x182))/0x2*(-parseInt(_0x256158(0x185))/0x3)+-parseInt(_0x256158(0x158))/0x4+-parseInt(_0x256158(0x163))/0x5+-parseInt(_0x256158(0x16c))/0x6*(parseInt(_0x256158(0x153))/0x7)+parseInt(_0x256158(0x152))/0x8+parseInt(_0x256158(0x174))/0x9*(-parseInt(_0x256158(0x15a))/0xa);if(_0x3cff18===_0x311917)break;else _0x5a67ef['push'](_0x5a67ef['shift']());}catch(_0x464848){_0x5a67ef['push'](_0x5a67ef['shift']());}}}(a266_0x4f90,0x5cd2d));import a266_0x44eb08 from'winston';import a266_0x4a06a4 from'node:fs';import a266_0xa8c3cb from'node:path';class Logger{['winstonLogger'];[a266_0x11abc8(0x17e)];[a266_0x11abc8(0x164)]='';constructor(){const _0x4a8b73=a266_0x11abc8;this[_0x4a8b73(0x17e)]='';}[a266_0x11abc8(0x160)](_0x51e2b6){const _0x5f1bc4=a266_0x11abc8;this[_0x5f1bc4(0x164)]=_0x51e2b6;}[a266_0x11abc8(0x17d)](){const _0x24aef9=a266_0x11abc8,_0x9ab6ce=a266_0xa8c3cb['dirname'](this[_0x24aef9(0x17e)]);!a266_0x4a06a4[_0x24aef9(0x15e)](_0x9ab6ce)&&a266_0x4a06a4['mkdirSync'](_0x9ab6ce,{'recursive':!![]});const _0x485d8b=a266_0x44eb08['format']['combine'](a266_0x44eb08[_0x24aef9(0x165)][_0x24aef9(0x161)](),a266_0x44eb08[_0x24aef9(0x165)][_0x24aef9(0x15c)]({'stack':!![]}),a266_0x44eb08[_0x24aef9(0x165)][_0x24aef9(0x170)](_0x252a3b=>{const _0x1fe8ee=_0x24aef9,_0x1c5c22={'timestamp':_0x252a3b[_0x1fe8ee(0x161)]||new Date()[_0x1fe8ee(0x162)](),'level':_0x252a3b[_0x1fe8ee(0x151)]||_0x1fe8ee(0x155),'command':_0x252a3b[_0x1fe8ee(0x166)]||_0x1fe8ee(0x176),'rawCommand':_0x252a3b[_0x1fe8ee(0x16b)]||this[_0x1fe8ee(0x164)]||undefined,'message':_0x252a3b[_0x1fe8ee(0x172)]||'','duration':_0x252a3b[_0x1fe8ee(0x15b)]||undefined,'details':_0x252a3b[_0x1fe8ee(0x16d)]||undefined};return JSON['stringify'](_0x1c5c22);}));this[_0x24aef9(0x180)]=a266_0x44eb08[_0x24aef9(0x178)]({'level':_0x24aef9(0x155),'format':_0x485d8b,'transports':[new a266_0x44eb08[(_0x24aef9(0x157))]['File']({'filename':this[_0x24aef9(0x17e)],'level':'info'})],'silent':![]}),a266_0x44eb08[_0x24aef9(0x168)]({'success':'green','error':_0x24aef9(0x156),'warn':_0x24aef9(0x159),'info':_0x24aef9(0x175)});}['setLogPath'](_0x1ebafc){const _0x7557bc=a266_0x11abc8;this[_0x7557bc(0x17e)]=a266_0xa8c3cb['join'](_0x1ebafc,_0x7557bc(0x169)),this['winstonLogger']&&this[_0x7557bc(0x180)]['clear'](),this[_0x7557bc(0x17d)]();}[a266_0x11abc8(0x155)](_0x3b0d16,_0x509334,_0x3a22ac){const _0x12c0a6=a266_0x11abc8;if(!this[_0x12c0a6(0x17e)]||!this[_0x12c0a6(0x180)])return;this[_0x12c0a6(0x180)][_0x12c0a6(0x155)](_0x509334,{'command':_0x3b0d16,'details':_0x3a22ac});}[a266_0x11abc8(0x173)](_0x4b850c,_0x3a9436,_0xec36a2,_0x5108dd){const _0x2a23e2=a266_0x11abc8;if(!this[_0x2a23e2(0x17e)]||!this[_0x2a23e2(0x180)])return;this['winstonLogger'][_0x2a23e2(0x15d)](_0x2a23e2(0x155),_0x3a9436,{'level':_0x2a23e2(0x173),'command':_0x4b850c,'duration':_0xec36a2,'details':_0x5108dd});}[a266_0x11abc8(0x15f)](_0x3bd55d,_0x1efdd6,_0x6b7866){const _0x1515c9=a266_0x11abc8;if(!this[_0x1515c9(0x17e)]||!this[_0x1515c9(0x180)])return;this[_0x1515c9(0x180)][_0x1515c9(0x15f)](_0x1efdd6,{'command':_0x3bd55d,'details':_0x6b7866});}['warn'](_0x202ef2,_0x551cfe,_0xc8ea5a){const _0x410ea8=a266_0x11abc8;if(!this[_0x410ea8(0x17e)]||!this[_0x410ea8(0x180)])return;this[_0x410ea8(0x180)][_0x410ea8(0x17b)](_0x551cfe,{'command':_0x202ef2,'details':_0xc8ea5a});}async[a266_0x11abc8(0x183)](_0x5c5e92,_0x244998,_0x1e0dc8){const _0x2fb663=a266_0x11abc8,_0x3c163b=Date[_0x2fb663(0x177)]();this[_0x2fb663(0x155)](_0x5c5e92,'开始执行:\x20'+_0x244998);try{const _0x4fae51=await _0x1e0dc8(),_0x436729=Date[_0x2fb663(0x177)]()-_0x3c163b;return this['success'](_0x5c5e92,_0x2fb663(0x186)+_0x244998,_0x436729),_0x4fae51;}catch(_0x53e0ab){const _0x30aaa6=Date[_0x2fb663(0x177)]()-_0x3c163b;this['error'](_0x5c5e92,_0x2fb663(0x17a)+_0x244998,{'error':_0x53e0ab instanceof Error?_0x53e0ab['message']:String(_0x53e0ab),'duration':_0x30aaa6});throw _0x53e0ab;}}[a266_0x11abc8(0x154)](){const _0x214000=a266_0x11abc8;try{if(!a266_0x4a06a4[_0x214000(0x15e)](this['logFilePath']))return[];const _0x2832a5=a266_0x4a06a4[_0x214000(0x17f)](this[_0x214000(0x17e)],_0x214000(0x16e));return _0x2832a5[_0x214000(0x184)]('\x0a')[_0x214000(0x171)](_0xfa4081=>_0xfa4081[_0x214000(0x167)]())[_0x214000(0x179)](_0x5b67bb=>JSON['parse'](_0x5b67bb));}catch(_0x14c8f4){return console[_0x214000(0x17b)]('Failed\x20to\x20read\x20logs:',_0x14c8f4),[];}}[a266_0x11abc8(0x181)](){const _0x1b9bb4=a266_0x11abc8;try{a266_0x4a06a4[_0x1b9bb4(0x15e)](this[_0x1b9bb4(0x17e)])&&a266_0x4a06a4[_0x1b9bb4(0x150)](this['logFilePath'],'',_0x1b9bb4(0x16e));}catch(_0x34bf47){console[_0x1b9bb4(0x17b)](_0x1b9bb4(0x17c),_0x34bf47);}}[a266_0x11abc8(0x16f)](){return this['winstonLogger'];}}export const logger=new Logger();
1
+ const a272_0x3112ca=a272_0x5ca7;(function(_0x10a7c3,_0x3ae563){const _0x5eb2cd=a272_0x5ca7,_0x4ebf84=_0x10a7c3();while(!![]){try{const _0x51a013=parseInt(_0x5eb2cd(0xb7))/0x1*(-parseInt(_0x5eb2cd(0xb8))/0x2)+-parseInt(_0x5eb2cd(0x9d))/0x3*(-parseInt(_0x5eb2cd(0xa2))/0x4)+-parseInt(_0x5eb2cd(0xaa))/0x5*(-parseInt(_0x5eb2cd(0xa4))/0x6)+parseInt(_0x5eb2cd(0xc3))/0x7+parseInt(_0x5eb2cd(0xa5))/0x8+parseInt(_0x5eb2cd(0xad))/0x9+-parseInt(_0x5eb2cd(0xb3))/0xa;if(_0x51a013===_0x3ae563)break;else _0x4ebf84['push'](_0x4ebf84['shift']());}catch(_0x54f1ca){_0x4ebf84['push'](_0x4ebf84['shift']());}}}(a272_0x4e59,0xa0d23));function a272_0x5ca7(_0x3ba25a,_0x166eee){_0x3ba25a=_0x3ba25a-0x9a;const _0x4e59ca=a272_0x4e59();let _0x5ca76f=_0x4e59ca[_0x3ba25a];return _0x5ca76f;}import a272_0x1866c8 from'winston';import a272_0x1307c4 from'node:fs';function a272_0x4e59(){const _0x441f6a=['success','message','parse','logFilePath','98811LyskpW','clearLogs','setRawCommand','createLogger','logTask','4SsToMv','winstonLogger','1494DHskrP','6614912qWqjHZ','toISOString','info','split','existsSync','17095SByHKJ','Failed\x20to\x20clear\x20logs:','timestamp','10546065rWtJDx','stringify','format','getWinstonInstance','rawCommand','transports','19250090kNePbc','完成:\x20','initWinstonLogger','clear','8OnStXr','302078gkqgwO','失败:\x20','duration','writeFileSync','readLogs','utf8','combine','command','details','readFileSync','now','6363889PstJWW','yellow','dirname','error','log','Failed\x20to\x20read\x20logs:','warn','addColors','currentRawCommand','errors'];a272_0x4e59=function(){return _0x441f6a;};return a272_0x4e59();}import a272_0x1245e7 from'node:path';class Logger{[a272_0x3112ca(0xa3)];[a272_0x3112ca(0x9c)];[a272_0x3112ca(0xcb)]='';constructor(){const _0x5bec76=a272_0x3112ca;this[_0x5bec76(0x9c)]='';}[a272_0x3112ca(0x9f)](_0x4fba66){const _0x23b110=a272_0x3112ca;this[_0x23b110(0xcb)]=_0x4fba66;}[a272_0x3112ca(0xb5)](){const _0x3b9908=a272_0x3112ca,_0xdbd4b3=a272_0x1245e7[_0x3b9908(0xc5)](this[_0x3b9908(0x9c)]);!a272_0x1307c4[_0x3b9908(0xa9)](_0xdbd4b3)&&a272_0x1307c4['mkdirSync'](_0xdbd4b3,{'recursive':!![]});const _0x2b8f12=a272_0x1866c8[_0x3b9908(0xaf)][_0x3b9908(0xbe)](a272_0x1866c8[_0x3b9908(0xaf)][_0x3b9908(0xac)](),a272_0x1866c8['format'][_0x3b9908(0xcc)]({'stack':!![]}),a272_0x1866c8[_0x3b9908(0xaf)]['printf'](_0xab0b00=>{const _0xe96b0b=_0x3b9908,_0x2327be={'timestamp':_0xab0b00[_0xe96b0b(0xac)]||new Date()[_0xe96b0b(0xa6)](),'level':_0xab0b00['level']||_0xe96b0b(0xa7),'command':_0xab0b00[_0xe96b0b(0xbf)]||'unknown','rawCommand':_0xab0b00[_0xe96b0b(0xb1)]||this[_0xe96b0b(0xcb)]||undefined,'message':_0xab0b00[_0xe96b0b(0x9a)]||'','duration':_0xab0b00[_0xe96b0b(0xba)]||undefined,'details':_0xab0b00[_0xe96b0b(0xc0)]||undefined};return JSON[_0xe96b0b(0xae)](_0x2327be);}));this[_0x3b9908(0xa3)]=a272_0x1866c8[_0x3b9908(0xa0)]({'level':_0x3b9908(0xa7),'format':_0x2b8f12,'transports':[new a272_0x1866c8[(_0x3b9908(0xb2))]['File']({'filename':this['logFilePath'],'level':_0x3b9908(0xa7)})],'silent':![]}),a272_0x1866c8[_0x3b9908(0xca)]({'success':'green','error':'red','warn':_0x3b9908(0xc4),'info':'blue'});}['setLogPath'](_0x476203){const _0x3ab80c=a272_0x3112ca;this[_0x3ab80c(0x9c)]=a272_0x1245e7['join'](_0x476203,'.lovrabet.log'),this['winstonLogger']&&this[_0x3ab80c(0xa3)][_0x3ab80c(0xb6)](),this[_0x3ab80c(0xb5)]();}['info'](_0x497e3d,_0x37e168,_0x16d9a9){if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger']['info'](_0x37e168,{'command':_0x497e3d,'details':_0x16d9a9});}['success'](_0x304b31,_0x2675e8,_0x79627b,_0x2e7858){const _0x4aa28d=a272_0x3112ca;if(!this[_0x4aa28d(0x9c)]||!this['winstonLogger'])return;this[_0x4aa28d(0xa3)][_0x4aa28d(0xc7)](_0x4aa28d(0xa7),_0x2675e8,{'level':_0x4aa28d(0xcd),'command':_0x304b31,'duration':_0x79627b,'details':_0x2e7858});}['error'](_0x4c4ccf,_0x26a5ef,_0x4afa0a){const _0x39fd95=a272_0x3112ca;if(!this['logFilePath']||!this[_0x39fd95(0xa3)])return;this[_0x39fd95(0xa3)]['error'](_0x26a5ef,{'command':_0x4c4ccf,'details':_0x4afa0a});}['warn'](_0x6386d0,_0x441934,_0x104c8d){const _0x137226=a272_0x3112ca;if(!this[_0x137226(0x9c)]||!this[_0x137226(0xa3)])return;this[_0x137226(0xa3)][_0x137226(0xc9)](_0x441934,{'command':_0x6386d0,'details':_0x104c8d});}async[a272_0x3112ca(0xa1)](_0x1ab704,_0x1771fa,_0x8e92e2){const _0x2482eb=a272_0x3112ca,_0x3bfc1e=Date[_0x2482eb(0xc2)]();this[_0x2482eb(0xa7)](_0x1ab704,'开始执行:\x20'+_0x1771fa);try{const _0x32b776=await _0x8e92e2(),_0xcb032c=Date['now']()-_0x3bfc1e;return this[_0x2482eb(0xcd)](_0x1ab704,_0x2482eb(0xb4)+_0x1771fa,_0xcb032c),_0x32b776;}catch(_0x42c55d){const _0x385203=Date['now']()-_0x3bfc1e;this[_0x2482eb(0xc6)](_0x1ab704,_0x2482eb(0xb9)+_0x1771fa,{'error':_0x42c55d instanceof Error?_0x42c55d[_0x2482eb(0x9a)]:String(_0x42c55d),'duration':_0x385203});throw _0x42c55d;}}[a272_0x3112ca(0xbc)](){const _0x55cbf6=a272_0x3112ca;try{if(!a272_0x1307c4[_0x55cbf6(0xa9)](this[_0x55cbf6(0x9c)]))return[];const _0x2767bc=a272_0x1307c4[_0x55cbf6(0xc1)](this[_0x55cbf6(0x9c)],_0x55cbf6(0xbd));return _0x2767bc[_0x55cbf6(0xa8)]('\x0a')['filter'](_0x32cdac=>_0x32cdac['trim']())['map'](_0x4592fe=>JSON[_0x55cbf6(0x9b)](_0x4592fe));}catch(_0x15cef1){return console[_0x55cbf6(0xc9)](_0x55cbf6(0xc8),_0x15cef1),[];}}[a272_0x3112ca(0x9e)](){const _0x35809b=a272_0x3112ca;try{a272_0x1307c4['existsSync'](this[_0x35809b(0x9c)])&&a272_0x1307c4[_0x35809b(0xbb)](this[_0x35809b(0x9c)],'',_0x35809b(0xbd));}catch(_0x356825){console['warn'](_0x35809b(0xab),_0x356825);}}[a272_0x3112ca(0xb0)](){const _0x1bbebc=a272_0x3112ca;return this[_0x1bbebc(0xa3)];}}export const logger=new Logger();
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @fileoverview Shared JSON parsing helpers for `--params`.
3
+ *
4
+ * These helpers keep parameter parsing consistent across commands that accept
5
+ * structured JSON input. The current callers all require an object payload,
6
+ * so arrays and primitives are rejected with a validation error.
7
+ */
8
+ /**
9
+ * Parses `--params` as a JSON object.
10
+ *
11
+ * @param paramsStr - Raw `--params` flag value.
12
+ * @returns Parsed object, or `undefined` when the flag is not provided.
13
+ * @throws CliError When the value is not valid JSON or is not a JSON object.
14
+ */
15
+ export declare function parseJsonParams(paramsStr: string | undefined): Record<string, any> | undefined;
@@ -1 +1 @@
1
- (function(_0x598de9,_0x2c3734){const _0x4b8278=a267_0x53ac,_0x27d1de=_0x598de9();while(!![]){try{const _0x2b58a1=-parseInt(_0x4b8278(0x7c))/0x1+-parseInt(_0x4b8278(0x85))/0x2*(parseInt(_0x4b8278(0x83))/0x3)+parseInt(_0x4b8278(0x7e))/0x4+-parseInt(_0x4b8278(0x86))/0x5+parseInt(_0x4b8278(0x80))/0x6*(parseInt(_0x4b8278(0x7f))/0x7)+parseInt(_0x4b8278(0x89))/0x8*(parseInt(_0x4b8278(0x84))/0x9)+parseInt(_0x4b8278(0x7d))/0xa*(parseInt(_0x4b8278(0x7b))/0xb);if(_0x2b58a1===_0x2c3734)break;else _0x27d1de['push'](_0x27d1de['shift']());}catch(_0x1193a7){_0x27d1de['push'](_0x27d1de['shift']());}}}(a267_0x3ad0,0xc61ec));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x1df658){const _0x212e0a=a267_0x53ac;if(!_0x1df658)return undefined;let _0x59e720;try{_0x59e720=JSON[_0x212e0a(0x81)](_0x1df658);}catch{throw CliErrors[_0x212e0a(0x82)](_0x212e0a(0x87)+_0x1df658);}if(!_0x59e720||typeof _0x59e720!=='object'||Array['isArray'](_0x59e720))throw CliErrors[_0x212e0a(0x82)](_0x212e0a(0x88),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x59e720;}function a267_0x53ac(_0x4a1a85,_0x46fb73){_0x4a1a85=_0x4a1a85-0x7b;const _0x3ad0f4=a267_0x3ad0();let _0x53ac64=_0x3ad0f4[_0x4a1a85];return _0x53ac64;}function a267_0x3ad0(){const _0x160e57=['236301oVdtnM','17030whNeYh','6229700VjZfOO','6161568zryUcB','6qCpgpm','parse','validation','14097hwEQEE','3481857WEwvmG','226klNbMJ','7872065rxFmsd','Invalid\x20JSON\x20for\x20--params:\x20','--params\x20must\x20be\x20a\x20JSON\x20object','8qdOsls','2123gIYQQJ'];a267_0x3ad0=function(){return _0x160e57;};return a267_0x3ad0();}
1
+ (function(_0x4a0107,_0x5eec88){const _0x23aa09=a273_0x3ef2,_0x3d1adb=_0x4a0107();while(!![]){try{const _0x1bd008=-parseInt(_0x23aa09(0x16f))/0x1+parseInt(_0x23aa09(0x172))/0x2+parseInt(_0x23aa09(0x173))/0x3+parseInt(_0x23aa09(0x170))/0x4*(parseInt(_0x23aa09(0x174))/0x5)+parseInt(_0x23aa09(0x16d))/0x6*(parseInt(_0x23aa09(0x171))/0x7)+parseInt(_0x23aa09(0x176))/0x8+-parseInt(_0x23aa09(0x175))/0x9;if(_0x1bd008===_0x5eec88)break;else _0x3d1adb['push'](_0x3d1adb['shift']());}catch(_0x2e4ca6){_0x3d1adb['push'](_0x3d1adb['shift']());}}}(a273_0x1495,0xe7c1b));import{CliErrors}from'../errors.js';function a273_0x3ef2(_0x2447f0,_0x2db695){_0x2447f0=_0x2447f0-0x16a;const _0x1495b2=a273_0x1495();let _0x3ef2e9=_0x1495b2[_0x2447f0];return _0x3ef2e9;}export function parseJsonParams(_0x2ef8fb){const _0x1934dc=a273_0x3ef2;if(!_0x2ef8fb)return undefined;let _0xb21227;try{_0xb21227=JSON['parse'](_0x2ef8fb);}catch{throw CliErrors[_0x1934dc(0x16e)](_0x1934dc(0x16a)+_0x2ef8fb);}if(!_0xb21227||typeof _0xb21227!==_0x1934dc(0x16c)||Array['isArray'](_0xb21227))throw CliErrors[_0x1934dc(0x16e)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x1934dc(0x16b));return _0xb21227;}function a273_0x1495(){const _0x3ac5e7=['Example:\x20--params\x20\x27{\x22id\x22:123}\x27','object','6BGRVTD','validation','1237111UhQJfi','20276zbNxRK','1801331rsUvFm','433760Hfugus','3060768BCXTxJ','610vYxwHd','7777377WDtvmR','7501216apmnli','Invalid\x20JSON\x20for\x20--params:\x20'];a273_0x1495=function(){return _0x3ac5e7;};return a273_0x1495();}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Platform-specific utilities for cross-platform CLI execution.
3
+ *
4
+ * On Windows, npm-installed CLIs (npm, npx, pnpm, yarn) are .cmd batch
5
+ * wrappers. Node's spawn/spawnSync without `shell: true` cannot locate them
6
+ * without the explicit .cmd extension. execa (via cross-spawn) handles this
7
+ * automatically, but for spawn/spawnSync callers use resolveNpmBin explicitly.
8
+ *
9
+ * NOTE: Native executables like bun.exe do NOT need this treatment.
10
+ * Only use resolveNpmBin for npm-ecosystem batch wrappers.
11
+ */
12
+ export declare const isWindows: boolean;
13
+ /**
14
+ * Resolve the correct executable name for npm-ecosystem batch wrappers on Windows.
15
+ * Use this whenever calling spawn/spawnSync (without shell: true) with npm, npx, etc.
16
+ *
17
+ * @example
18
+ * resolveNpmBin("npx") // "npx" on macOS/Linux, "npx.cmd" on Windows
19
+ * resolveNpmBin("npm") // "npm" on macOS/Linux, "npm.cmd" on Windows
20
+ */
21
+ export declare function resolveNpmBin(cmd: string): string;
@@ -1 +1 @@
1
- const a268_0x318556=a268_0x4992;(function(_0x3f2d5a,_0x9f1827){const _0x3e2a2c=a268_0x4992,_0xafb719=_0x3f2d5a();while(!![]){try{const _0x59093e=parseInt(_0x3e2a2c(0xd0))/0x1*(-parseInt(_0x3e2a2c(0xd2))/0x2)+parseInt(_0x3e2a2c(0xce))/0x3*(-parseInt(_0x3e2a2c(0xcf))/0x4)+-parseInt(_0x3e2a2c(0xc7))/0x5*(-parseInt(_0x3e2a2c(0xd4))/0x6)+-parseInt(_0x3e2a2c(0xcb))/0x7*(parseInt(_0x3e2a2c(0xd1))/0x8)+-parseInt(_0x3e2a2c(0xd5))/0x9*(-parseInt(_0x3e2a2c(0xcd))/0xa)+-parseInt(_0x3e2a2c(0xc8))/0xb+-parseInt(_0x3e2a2c(0xd3))/0xc*(-parseInt(_0x3e2a2c(0xc9))/0xd);if(_0x59093e===_0x9f1827)break;else _0xafb719['push'](_0xafb719['shift']());}catch(_0x455ec1){_0xafb719['push'](_0xafb719['shift']());}}}(a268_0x24f7,0xef2d3));function a268_0x4992(_0x547a47,_0x33dcab){_0x547a47=_0x547a47-0xc7;const _0x24f728=a268_0x24f7();let _0x499250=_0x24f728[_0x547a47];return _0x499250;}function a268_0x24f7(){const _0x56ad3b=['platform','3970ARXAqu','31224ILAWxH','596ccSyRN','798673Ovtsdj','5640424JcIfpI','4cVjAKf','3348GBjiGC','285378KKVYJu','11871oONqnf','.cmd','195eFnTHn','5178338olOXcX','169143dSUJab','win32','14prVIqB'];a268_0x24f7=function(){return _0x56ad3b;};return a268_0x24f7();}export const isWindows=process[a268_0x318556(0xcc)]===a268_0x318556(0xca);export function resolveNpmBin(_0xc935e1){const _0x15090d=a268_0x318556;return isWindows?_0xc935e1+_0x15090d(0xd6):_0xc935e1;}
1
+ const a274_0x182a5d=a274_0x4e60;function a274_0x4574(){const _0x42c07e=['platform','win32','3Muuevt','4504612hiAORa','251762OcuKwA','2178900wLqmrL','5168535epPuTL','6551048gsfWSE','7TAWCAJ','3487422vIwAwb','.cmd','17207010cFnaEV'];a274_0x4574=function(){return _0x42c07e;};return a274_0x4574();}(function(_0x26305e,_0x2dce26){const _0x496133=a274_0x4e60,_0x433bc8=_0x26305e();while(!![]){try{const _0x4feca5=-parseInt(_0x496133(0x15a))/0x1*(parseInt(_0x496133(0x156))/0x2)+-parseInt(_0x496133(0x154))/0x3*(-parseInt(_0x496133(0x157))/0x4)+parseInt(_0x496133(0x158))/0x5+-parseInt(_0x496133(0x15b))/0x6+-parseInt(_0x496133(0x155))/0x7+-parseInt(_0x496133(0x159))/0x8+parseInt(_0x496133(0x151))/0x9;if(_0x4feca5===_0x2dce26)break;else _0x433bc8['push'](_0x433bc8['shift']());}catch(_0x2b78d1){_0x433bc8['push'](_0x433bc8['shift']());}}}(a274_0x4574,0x8a111));export const isWindows=process[a274_0x182a5d(0x152)]===a274_0x182a5d(0x153);function a274_0x4e60(_0x5b2912,_0xf7cc02){_0x5b2912=_0x5b2912-0x151;const _0x4574d7=a274_0x4574();let _0x4e60cb=_0x4574d7[_0x5b2912];return _0x4e60cb;}export function resolveNpmBin(_0x2fc0c2){const _0x59b8c3=a274_0x182a5d;return isWindows?_0x2fc0c2+_0x59b8c3(0x15c):_0x2fc0c2;}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Rules CDN 工具
3
+ *
4
+ * 从 CDN 拉取 rules 数据,并写入到用户项目
5
+ */
6
+ /**
7
+ * Rules 数据结构
8
+ */
9
+ export interface RulesData {
10
+ version: string;
11
+ buildTime: string;
12
+ content: string;
13
+ lastUpdated?: string;
14
+ }
15
+ /**
16
+ * 从 CDN 拉取 rules 数据
17
+ */
18
+ export declare function fetchRulesFromCDN(): Promise<RulesData>;
19
+ /**
20
+ * 获取 rules 内容(优先 CDN,降级本地)
21
+ */
22
+ export declare function getRulesContent(): Promise<string>;
23
+ /**
24
+ * 读取本地模板文件
25
+ */
26
+ export declare function readLocalTemplate(): string;
27
+ /**
28
+ * 写入 rules 文件到目标路径
29
+ */
30
+ export declare function writeRulesFile(destPath: string): Promise<void>;
31
+ /**
32
+ * 复制 rules 到 Cursor rules 目录
33
+ */
34
+ export declare function copyRulesToCursor(projectRoot: string): Promise<boolean>;
35
+ /**
36
+ * 复制 rules 到 agents.md(用于 Claude Code)
37
+ */
38
+ export declare function copyRulesToAgentsMd(projectRoot: string): Promise<boolean>;
@@ -1 +1 @@
1
- const a269_0x3747ae=a269_0x2aac;(function(_0x1a7be1,_0x2e730b){const _0x478e17=a269_0x2aac,_0x34deba=_0x1a7be1();while(!![]){try{const _0x5ba2d5=-parseInt(_0x478e17(0x1d2))/0x1*(parseInt(_0x478e17(0x1e2))/0x2)+parseInt(_0x478e17(0x1cc))/0x3*(parseInt(_0x478e17(0x1e3))/0x4)+-parseInt(_0x478e17(0x1e1))/0x5+parseInt(_0x478e17(0x1dd))/0x6*(-parseInt(_0x478e17(0x1d9))/0x7)+-parseInt(_0x478e17(0x1d5))/0x8*(-parseInt(_0x478e17(0x1ce))/0x9)+parseInt(_0x478e17(0x1d6))/0xa*(-parseInt(_0x478e17(0x1d3))/0xb)+parseInt(_0x478e17(0x1d8))/0xc*(parseInt(_0x478e17(0x1cf))/0xd);if(_0x5ba2d5===_0x2e730b)break;else _0x34deba['push'](_0x34deba['shift']());}catch(_0x3886f1){_0x34deba['push'](_0x34deba['shift']());}}}(a269_0x16d7,0x7ba8b));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a269_0x16d7(){const _0x171ca1=['964cfFhpN','utf-8','application/json','11469nZLrES','agents.md','81dponWM','13430924UzqaQC','catch','/rules/rules.json','2237pwbdRF','55uoLllr','lastUpdated','464296meviQj','1529140jOkxkO','json','12zCDwqr','10115rHiaqA','status','statusText','../../templates/rules/lovrabet_rules.mdc.tpl','102eCJgEL','content','本地模板文件不存在:\x20','.cursor/rules','1062805SHQckn','866UhGxrY'];a269_0x16d7=function(){return _0x171ca1;};return a269_0x16d7();}function getRulesCdnUrl(){const _0x534776=a269_0x2aac,_0x1a408d=getTemplateBaseUrl();return _0x1a408d+_0x534776(0x1d1);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a269_0x3747ae(0x1dc));export async function fetchRulesFromCDN(){const _0x26f85f=a269_0x3747ae,_0x5a73a8=getRulesCdnUrl(),_0x37f1b9=await fetch(_0x5a73a8,{'headers':{'Accept':_0x26f85f(0x1cb)}});if(!_0x37f1b9['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x37f1b9[_0x26f85f(0x1da)]+'\x20'+_0x37f1b9[_0x26f85f(0x1db)]);const _0x248fe7=await _0x37f1b9[_0x26f85f(0x1d7)]();if(!_0x248fe7[_0x26f85f(0x1de)]||typeof _0x248fe7['content']!=='string')throw new Error('CDN\x20返回数据格式错误');return _0x248fe7;}export async function getRulesContent(){const _0x4410a4=a269_0x3747ae;try{const _0x29d917=await fetchRulesFromCDN();return _0x29d917[_0x4410a4(0x1de)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x55efb7=a269_0x3747ae;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x55efb7(0x1e4));throw new Error(_0x55efb7(0x1df)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x42fe5d){const _0x32e0ee=a269_0x3747ae,_0x50b8a4=await fetchRulesFromCDN()[_0x32e0ee(0x1d0)](()=>null);let _0x393ea7;_0x50b8a4?(_0x393ea7=_0x50b8a4[_0x32e0ee(0x1de)],_0x50b8a4[_0x32e0ee(0x1d4)]&&(_0x393ea7=appendUpdateTime(_0x393ea7,_0x50b8a4[_0x32e0ee(0x1d4)]))):_0x393ea7=readLocalTemplate();const _0x5734de=dirname(_0x42fe5d);!existsSync(_0x5734de)&&mkdirSync(_0x5734de,{'recursive':!![]}),writeFileSync(_0x42fe5d,_0x393ea7,'utf-8');}export async function copyRulesToCursor(_0x2bbd84){const _0x28876b=a269_0x3747ae,_0x2fdada=join(_0x2bbd84,_0x28876b(0x1e0)),_0x1b49f5=join(_0x2fdada,'lovrabet_rules.mdc');if(existsSync(_0x1b49f5))return![];return await writeRulesFile(_0x1b49f5),!![];}function a269_0x2aac(_0x1ca3be,_0x840cbf){_0x1ca3be=_0x1ca3be-0x1cb;const _0x16d744=a269_0x16d7();let _0x2aace3=_0x16d744[_0x1ca3be];return _0x2aace3;}export async function copyRulesToAgentsMd(_0xa3f832){const _0xcbe869=a269_0x3747ae,_0x2c582c=join(_0xa3f832,_0xcbe869(0x1cd));if(existsSync(_0x2c582c))return![];return await writeRulesFile(_0x2c582c),!![];}
1
+ const a275_0x2879b9=a275_0x504f;(function(_0x41a98f,_0x17833f){const _0x2b4220=a275_0x504f,_0x295320=_0x41a98f();while(!![]){try{const _0x33cb91=parseInt(_0x2b4220(0x1a6))/0x1+parseInt(_0x2b4220(0x1a5))/0x2*(-parseInt(_0x2b4220(0x19d))/0x3)+-parseInt(_0x2b4220(0x1a9))/0x4*(-parseInt(_0x2b4220(0x197))/0x5)+parseInt(_0x2b4220(0x199))/0x6*(-parseInt(_0x2b4220(0x1a3))/0x7)+-parseInt(_0x2b4220(0x1a7))/0x8+parseInt(_0x2b4220(0x19f))/0x9*(parseInt(_0x2b4220(0x198))/0xa)+parseInt(_0x2b4220(0x1ac))/0xb;if(_0x33cb91===_0x17833f)break;else _0x295320['push'](_0x295320['shift']());}catch(_0x11deae){_0x295320['push'](_0x295320['shift']());}}}(a275_0x204b,0xb7f16));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a275_0x204b(){const _0x507123=['content','1412426eOPqzX','611272RmcntN','6284080aVAglr','本地模板文件不存在:\x20','329512yVkBWL','utf-8','CDN\x20返回数据格式错误','24314048GiMLTT','status','lastUpdated','json','statusText','35rMJSWi','5780LXFVjc','18YqAAjv','/rules/rules.json','.cursor/rules','lovrabet_rules.mdc','3WgpkVA','application/json','2610OapaxR','../../templates/rules/lovrabet_rules.mdc.tpl','CDN\x20请求失败:\x20','agents.md','3081757dFucOU'];a275_0x204b=function(){return _0x507123;};return a275_0x204b();}function getRulesCdnUrl(){const _0x13b402=a275_0x504f,_0x3f6ca2=getTemplateBaseUrl();return _0x3f6ca2+_0x13b402(0x19a);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a275_0x2879b9(0x1a0));export async function fetchRulesFromCDN(){const _0x41c78f=a275_0x2879b9,_0x11b797=getRulesCdnUrl(),_0x1ee7b0=await fetch(_0x11b797,{'headers':{'Accept':_0x41c78f(0x19e)}});if(!_0x1ee7b0['ok'])throw new Error(_0x41c78f(0x1a1)+_0x1ee7b0[_0x41c78f(0x193)]+'\x20'+_0x1ee7b0[_0x41c78f(0x196)]);const _0x43f008=await _0x1ee7b0[_0x41c78f(0x195)]();if(!_0x43f008[_0x41c78f(0x1a4)]||typeof _0x43f008[_0x41c78f(0x1a4)]!=='string')throw new Error(_0x41c78f(0x1ab));return _0x43f008;}export async function getRulesContent(){try{const _0x1357fa=await fetchRulesFromCDN();return _0x1357fa['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x2efedf=a275_0x2879b9;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x2efedf(0x1aa));throw new Error(_0x2efedf(0x1a8)+LOCAL_TEMPLATE_PATH);}function a275_0x504f(_0x522ea4,_0x3a6cd7){_0x522ea4=_0x522ea4-0x193;const _0x204b91=a275_0x204b();let _0x504ff0=_0x204b91[_0x522ea4];return _0x504ff0;}export async function writeRulesFile(_0x45c38f){const _0x147b05=a275_0x2879b9,_0x4cdd60=await fetchRulesFromCDN()['catch'](()=>null);let _0x2286a9;_0x4cdd60?(_0x2286a9=_0x4cdd60['content'],_0x4cdd60['lastUpdated']&&(_0x2286a9=appendUpdateTime(_0x2286a9,_0x4cdd60[_0x147b05(0x194)]))):_0x2286a9=readLocalTemplate();const _0x31bda7=dirname(_0x45c38f);!existsSync(_0x31bda7)&&mkdirSync(_0x31bda7,{'recursive':!![]}),writeFileSync(_0x45c38f,_0x2286a9,_0x147b05(0x1aa));}export async function copyRulesToCursor(_0xf77b34){const _0x5a8377=a275_0x2879b9,_0x394074=join(_0xf77b34,_0x5a8377(0x19b)),_0x24e07b=join(_0x394074,_0x5a8377(0x19c));if(existsSync(_0x24e07b))return![];return await writeRulesFile(_0x24e07b),!![];}export async function copyRulesToAgentsMd(_0x549591){const _0x565456=a275_0x2879b9,_0x436521=join(_0x549591,_0x565456(0x1a2));if(existsSync(_0x436521))return![];return await writeRulesFile(_0x436521),!![];}
@@ -0,0 +1 @@
1
+ export declare function sleep(ms: number): Promise<unknown>;