@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,102 @@
1
+ /**
2
+ * CLI 共享上下文
3
+ *
4
+ * 借鉴飞书 CLI 的 Factory 模式,统一注入 config / auth / logger / env。
5
+ * 所有命令函数签名统一为 (ctx, args, flags) => Promise<void>,
6
+ * 不再各自读取 config、cookie 等共享状态。
7
+ */
8
+ import { type AppProfile } from "./context/app-resolver.js";
9
+ import { CONFIG_NAMES, LEGACY_CONFIG_NAMES, NEW_CONFIG_NAME, findProjectRootDirectory, getGlobalConfigPath, getProjectConfigPath, inspectCliConfigJsonFile, isInProject, loadRawConfigLayers, mergeRawConfigLayers, readConfigFile, readRawConfig, readRawConfigWithLayers, resolveConfigPath, resolveWriteConfigPath, writeConfigFile, type CliConfigJsonInspect, type RawConfigLayers } from "./context/config-loader.js";
10
+ import type { OutputFormat, Risk } from "./framework/types.js";
11
+ import { logger } from "./utils/logger.js";
12
+ export { CONFIG_NAMES, LEGACY_CONFIG_NAMES, NEW_CONFIG_NAME, findProjectRootDirectory, getGlobalConfigPath, getProjectConfigPath, inspectCliConfigJsonFile, isInProject, loadRawConfigLayers, mergeRawConfigLayers, readConfigFile, readRawConfig, readRawConfigWithLayers, resolveConfigPath, resolveWriteConfigPath, writeConfigFile, type AppProfile, type CliConfigJsonInspect, type RawConfigLayers, };
13
+ export interface CLIConfig {
14
+ appCode: string | undefined;
15
+ env: "production" | "daily";
16
+ locale: string;
17
+ /** 内联 cookie,优先于 ~/.lovrabet/cookie 文件 */
18
+ cookie: string | undefined;
19
+ /** Access Key,未来替代 cookie 的认证方式(预留) */
20
+ accessKey: string | undefined;
21
+ /** 默认输出格式,优先于内置默认值 pretty */
22
+ format: OutputFormat | undefined;
23
+ /** 默认分页大小,用于 sql list 等分页命令 */
24
+ pageSize: number | undefined;
25
+ /**
26
+ * 允许执行的最高风险等级,超出则拒绝执行。
27
+ * read < write < high-risk-write(无显式顶层授权时默认 read)
28
+ */
29
+ riskLevel: Risk;
30
+ /**
31
+ * 全局 verbose 开关,仅从 RABETBASE_VERBOSE 环境变量读取。
32
+ * 命令的 --verbose flag 未设时以此值为 fallback。
33
+ */
34
+ verbose: boolean;
35
+ /** api pull 生成目录,默认 `./src/api`(`constant/paths` 的 DEFAULT_API_DIR) */
36
+ apiDir: string;
37
+ /** 多应用配置(name → profile),无 apps 时为空对象 */
38
+ apps: Record<string, AppProfile>;
39
+ /** 默认应用名称 */
40
+ defaultApp: string | undefined;
41
+ /** 运行时当前应用名称(--app flag 或 defaultApp) */
42
+ currentApp: string | undefined;
43
+ /** 用户通过 --app 或 --appcode 显式指定的应用名(未指定时为 undefined,用于多应用命令过滤) */
44
+ explicitAppName: string | undefined;
45
+ raw: Record<string, any>;
46
+ }
47
+ export interface CLIAuth {
48
+ cookie: string;
49
+ isLoggedIn: boolean;
50
+ /** 获取 cookie,未登录时抛出 CliError 提示登录 */
51
+ getOrLogin(): Promise<string>;
52
+ }
53
+ export interface CLIEnv {
54
+ apiDomain: string;
55
+ userDomain: string;
56
+ }
57
+ export interface MultiAppConfig {
58
+ name: string;
59
+ appcode: string;
60
+ isDefault: boolean;
61
+ env?: string;
62
+ apiDir?: string;
63
+ cookie?: string;
64
+ }
65
+ export interface CLIContext {
66
+ config: CLIConfig;
67
+ auth: CLIAuth;
68
+ logger: typeof logger;
69
+ env: CLIEnv;
70
+ /** 是否为非交互模式 */
71
+ nonInteractive: boolean;
72
+ }
73
+ /**
74
+ * 创建 CLI 共享上下文
75
+ *
76
+ * 在 cli.tsx 中调用一次,将返回值传入每个命令的 run() 方法。
77
+ */
78
+ export declare function createContext(flags: Record<string, any>): Promise<CLIContext>;
79
+ /**
80
+ * 仅读取 CLIConfig,不初始化 env/auth(轻量用途,如 cli.tsx 中提前取 defaultFormat)
81
+ */
82
+ export declare function buildConfigFromFlags(flags: Record<string, any>): CLIConfig;
83
+ /**
84
+ * 按已解析配置初始化一次命令所需的进程级环境。
85
+ * 终端 CLI 与嵌入式 runtime 共用该入口,避免 env/domain 初始化语义漂移。
86
+ */
87
+ export declare function initGlobalEnvironment(config: CLIConfig): Promise<void>;
88
+ export declare function getConfigAppCode(projectRoot?: string): string | undefined;
89
+ export type MultiAppConfigScope = "project" | "merged";
90
+ export declare function getMultiAppConfigs(scope?: MultiAppConfigScope, projectRoot?: string): MultiAppConfig[] | null;
91
+ export declare function getTemplateBaseUrl(projectRoot?: string): string;
92
+ /**
93
+ * 根据多应用配置决定 alias 解析应读取哪个 api.ts 文件。
94
+ *
95
+ * 规则:
96
+ * - 无 appCode 或单应用 → <apiDir>/api.ts
97
+ * - 非默认应用且无独立 apiDir 配置 → <apiDir>/<appName>-api.ts
98
+ * - 默认应用 / 有独立 apiDir 配置 → <apiDir>/api.ts
99
+ *
100
+ * 放在 context.ts 而非 alias-resolver.ts,因为需要读取 .rabetbase.json。
101
+ */
102
+ export declare function resolveApiFilePath(apiDir: string, appCode?: string): string;
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a206_0x1e1834=a206_0x47eb;(function(_0x39ff15,_0x1260fa){const _0x1203b1=a206_0x47eb,_0x3e2984=_0x39ff15();while(!![]){try{const _0x43298e=-parseInt(_0x1203b1(0x1d1))/0x1*(parseInt(_0x1203b1(0x1e4))/0x2)+-parseInt(_0x1203b1(0x1ea))/0x3+-parseInt(_0x1203b1(0x1cf))/0x4*(parseInt(_0x1203b1(0x1cc))/0x5)+parseInt(_0x1203b1(0x1c9))/0x6*(parseInt(_0x1203b1(0x1e6))/0x7)+parseInt(_0x1203b1(0x1c5))/0x8+parseInt(_0x1203b1(0x1d8))/0x9*(-parseInt(_0x1203b1(0x1e7))/0xa)+-parseInt(_0x1203b1(0x1e3))/0xb*(-parseInt(_0x1203b1(0x1da))/0xc);if(_0x43298e===_0x1260fa)break;else _0x3e2984['push'](_0x3e2984['shift']());}catch(_0x4f3207){_0x3e2984['push'](_0x3e2984['shift']());}}}(a206_0x507c,0x74148));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';function a206_0x507c(){const _0x19588f=['https://g.lovrabet.com/dist/lovrabet-skill','project','defaultApp','template_base_url','11ZOIoKK','385116ulxjWU','./utils/is-non-interactive.js','4277KEglTU','126030ZAQqpm','apiDomain','app','1144188pbQsRr','appcode','globalConfig','api.ts','argv','map','./constant/env.js','apiDir','7208272gbbpXs','object','trim','-api.ts','4998mioLxc','merged','userDomain','165580brCegZ','env','entries','68BTmeGj','setRawCommand','2cNVHKD','find','cwd','runtimeDomain','string','./constant/domain.js','join','153aKZBkC','slice','7310424pqYrWx','projectConfig','filter','apps','cookie'];a206_0x507c=function(){return _0x19588f;};return a206_0x507c();}import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x17c300){return process.env[`RABETBASE_${_0x17c300}`]||process.env[`LOVRABET_${_0x17c300}`]||undefined;}function a206_0x47eb(_0x2dac97,_0x3843bc){_0x2dac97=_0x2dac97-0x1c3;const _0x507c90=a206_0x507c();let _0x47ebf6=_0x507c90[_0x2dac97];return _0x47ebf6;}export async function createContext(_0x53842d){const _0xb9c146=a206_0x47eb,{config:_0x5d41cd,layers:_0x4a006a}=readRawConfigWithLayers(),_0xf06e5=buildConfig(_0x5d41cd,_0x53842d,_0x4a006a),{initEnv:_0x10bd49}=await import(_0xb9c146(0x1c3));if(_0xf06e5[_0xb9c146(0x1cd)])_0x10bd49(_0xf06e5['env']);else _0x53842d[_0xb9c146(0x1cd)]&&typeof _0x53842d['env']===_0xb9c146(0x1d5)&&_0x10bd49(_0x53842d['env']);const {initDomains:_0x58b957,getUserDomain:_0x3c7169,getApiDomain:_0x4a961e}=await import(_0xb9c146(0x1d6));_0x58b957({'apiDomain':_0x5d41cd[_0xb9c146(0x1e8)]||undefined,'userDomain':_0x5d41cd[_0xb9c146(0x1cb)]||undefined,'runtimeDomain':_0x5d41cd[_0xb9c146(0x1d4)]||undefined});const _0x515972={'apiDomain':_0x4a961e(),'userDomain':_0x3c7169()},_0x1b24df=await buildAuth(_0xf06e5);logger['setLogPath'](process[_0xb9c146(0x1d3)]());const _0xeec33f=(CLI_BIN_NAME+'\x20'+process[_0xb9c146(0x1ee)][_0xb9c146(0x1d9)](0x2)[_0xb9c146(0x1d7)]('\x20'))[_0xb9c146(0x1c7)]();logger[_0xb9c146(0x1d0)](_0xeec33f);const {isNonInteractive:_0x5d8bb5}=await import(_0xb9c146(0x1e5)),_0x15c163=_0x5d8bb5(_0x53842d);return{'config':_0xf06e5,'auth':_0x1b24df,'logger':logger,'env':_0x515972,'nonInteractive':_0x15c163};}export function buildConfigFromFlags(_0x21a35b){const {config:_0x188529,layers:_0x2298f2}=readRawConfigWithLayers();return buildConfig(_0x188529,_0x21a35b,_0x2298f2);}export function getConfigAppCode(_0x11b712){const _0x352d11=a206_0x47eb,_0x415a4b=readRawConfig(_0x11b712);if(_0x415a4b[_0x352d11(0x1dd)]&&typeof _0x415a4b[_0x352d11(0x1dd)]===_0x352d11(0x1c6)){const _0xd73cd9=_0x415a4b[_0x352d11(0x1e1)];if(_0xd73cd9&&_0x415a4b['apps'][_0xd73cd9]?.[_0x352d11(0x1eb)])return String(_0x415a4b[_0x352d11(0x1dd)][_0xd73cd9][_0x352d11(0x1eb)])[_0x352d11(0x1c7)]();const _0x4dde65=Object['values'](_0x415a4b[_0x352d11(0x1dd)])[0x0];if(_0x4dde65?.[_0x352d11(0x1eb)])return String(_0x4dde65['appcode'])[_0x352d11(0x1c7)]();}const _0x969c17=_0x415a4b['appcode']||_0x415a4b[_0x352d11(0x1e9)];if(typeof _0x969c17!==_0x352d11(0x1d5)||_0x969c17[_0x352d11(0x1c7)]()==='')return undefined;return _0x969c17[_0x352d11(0x1c7)]();}export function getMultiAppConfigs(_0x33b3db=a206_0x1e1834(0x1e0),_0x377d0a){const _0x5ee44c=a206_0x1e1834,_0x5f4497=loadRawConfigLayers(_0x377d0a);let _0xe17134,_0xf72ab3;if(_0x33b3db===_0x5ee44c(0x1ca)){const _0x4e2efb=_0x5f4497[_0x5ee44c(0x1ec)][_0x5ee44c(0x1dd)]&&typeof _0x5f4497[_0x5ee44c(0x1ec)][_0x5ee44c(0x1dd)]===_0x5ee44c(0x1c6)?_0x5f4497[_0x5ee44c(0x1ec)][_0x5ee44c(0x1dd)]:{},_0x55a6fd=_0x5f4497[_0x5ee44c(0x1db)][_0x5ee44c(0x1dd)]&&typeof _0x5f4497['projectConfig'][_0x5ee44c(0x1dd)]==='object'?_0x5f4497[_0x5ee44c(0x1db)]['apps']:{};_0xe17134={..._0x4e2efb,..._0x55a6fd};const _0x4b8f00=readRawConfig(_0x377d0a);_0xf72ab3=_0x4b8f00[_0x5ee44c(0x1e1)];}else _0xe17134=_0x5f4497[_0x5ee44c(0x1db)]['apps'],_0xf72ab3=_0x5f4497[_0x5ee44c(0x1db)][_0x5ee44c(0x1e1)];if(!_0xe17134||typeof _0xe17134!==_0x5ee44c(0x1c6)||Object['keys'](_0xe17134)['length']===0x0)return null;return Object[_0x5ee44c(0x1ce)](_0xe17134)[_0x5ee44c(0x1ef)](([_0x40ffd0,_0x300ac6])=>({'name':_0x40ffd0,'appcode':_0x300ac6?.[_0x5ee44c(0x1eb)]||'','isDefault':_0x40ffd0===_0xf72ab3,'env':_0x300ac6?.[_0x5ee44c(0x1cd)],'apiDir':_0x300ac6?.['apiDir'],'cookie':_0x300ac6?.[_0x5ee44c(0x1de)]||undefined}))[_0x5ee44c(0x1dc)](_0x6b776e=>_0x6b776e[_0x5ee44c(0x1eb)]);}export function getTemplateBaseUrl(_0x10ae50){const _0x15d74b=a206_0x1e1834,_0x3b24e7=readRawConfig(_0x10ae50);if(_0x3b24e7[_0x15d74b(0x1e2)]&&typeof _0x3b24e7[_0x15d74b(0x1e2)]===_0x15d74b(0x1d5))return _0x3b24e7['template_base_url']['replace'](/\/$/,'');return _0x15d74b(0x1df);}function buildConfig(_0x1bc773,_0x1b6cc6,_0x1cbb7a){return{...resolveAppConfig({'raw':_0x1bc773,'flags':_0x1b6cc6,'layers':_0x1cbb7a,'readEnv':env}),'raw':_0x1bc773};}export function resolveApiFilePath(_0x4f8ab8,_0x4a64f0){const _0x32a8eb=a206_0x1e1834,_0x3dce11=resolve(process[_0x32a8eb(0x1d3)](),_0x4f8ab8),_0x40d037=resolve(_0x3dce11,_0x32a8eb(0x1ed));if(!_0x4a64f0)return _0x40d037;const _0x112fb3=readRawConfig(),_0x1f7c66=_0x112fb3[_0x32a8eb(0x1dd)]&&typeof _0x112fb3[_0x32a8eb(0x1dd)]===_0x32a8eb(0x1c6)?_0x112fb3[_0x32a8eb(0x1dd)]:{},_0x4f964d=Object[_0x32a8eb(0x1ce)](_0x1f7c66)[_0x32a8eb(0x1d2)](([,_0x75effd])=>_0x75effd?.[_0x32a8eb(0x1eb)]===_0x4a64f0);if(!_0x4f964d)return _0x40d037;const [_0x9c6e86,_0x18f82c]=_0x4f964d,_0x16d6b7=typeof _0x112fb3['defaultApp']===_0x32a8eb(0x1d5)?_0x112fb3[_0x32a8eb(0x1e1)]:undefined;if(_0x18f82c?.[_0x32a8eb(0x1c4)])return _0x40d037;if(_0x16d6b7&&_0x9c6e86!==_0x16d6b7)return resolve(_0x3dce11,_0x9c6e86+_0x32a8eb(0x1c8));return _0x40d037;}
1
+ (function(_0xf42588,_0x21fce7){const _0x22fc22=a206_0x5036,_0x39e6ee=_0xf42588();while(!![]){try{const _0x4c3fb5=parseInt(_0x22fc22(0xdb))/0x1*(-parseInt(_0x22fc22(0xba))/0x2)+parseInt(_0x22fc22(0xc7))/0x3+-parseInt(_0x22fc22(0xbb))/0x4*(-parseInt(_0x22fc22(0xc3))/0x5)+parseInt(_0x22fc22(0xdc))/0x6+-parseInt(_0x22fc22(0xbf))/0x7*(parseInt(_0x22fc22(0xc8))/0x8)+-parseInt(_0x22fc22(0xdf))/0x9+parseInt(_0x22fc22(0xd0))/0xa*(-parseInt(_0x22fc22(0xd6))/0xb);if(_0x4c3fb5===_0x21fce7)break;else _0x39e6ee['push'](_0x39e6ee['shift']());}catch(_0x40399d){_0x39e6ee['push'](_0x39e6ee['shift']());}}}(a206_0x5d2f,0x80a19));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x575eea){return process.env[`RABETBASE_${_0x575eea}`]||process.env[`LOVRABET_${_0x575eea}`]||undefined;}function optionalString(_0x3fab71){const _0x35111a=a206_0x5036;return typeof _0x3fab71===_0x35111a(0xc6)&&_0x3fab71[_0x35111a(0xc0)]()?_0x3fab71['trim']():undefined;}export async function createContext(_0x100b83){const _0x4cc707=a206_0x5036,{config:_0x25dfbc,layers:_0x34ef9b}=readRawConfigWithLayers(),_0x4aef48=buildConfig(_0x25dfbc,_0x100b83,_0x34ef9b);await initGlobalEnvironment(_0x4aef48);const {getUserDomain:_0xdaf11a,getApiDomain:_0x56c673}=await import('./constant/domain.js'),_0x96df08={'apiDomain':_0x56c673(),'userDomain':_0xdaf11a()},_0x3270c7=await buildAuth(_0x4aef48);logger[_0x4cc707(0xbe)](process['cwd']());const _0x34601e=(CLI_BIN_NAME+'\x20'+process[_0x4cc707(0xc1)][_0x4cc707(0xbc)](0x2)['join']('\x20'))[_0x4cc707(0xc0)]();logger[_0x4cc707(0xc4)](_0x34601e);const {isNonInteractive:_0x2917e3}=await import(_0x4cc707(0xe2)),_0x210390=_0x2917e3(_0x100b83);return{'config':_0x4aef48,'auth':_0x3270c7,'logger':logger,'env':_0x96df08,'nonInteractive':_0x210390};}export function buildConfigFromFlags(_0x29e6ca){const {config:_0x4e2038,layers:_0x1a6b5c}=readRawConfigWithLayers();return buildConfig(_0x4e2038,_0x29e6ca,_0x1a6b5c);}export async function initGlobalEnvironment(_0x41c741){const _0x15ceaf=a206_0x5036,{initEnv:_0x23ba6e}=await import(_0x15ceaf(0xcd));_0x23ba6e(_0x41c741['env']);const {initDomains:_0x3e6840}=await import('./constant/domain.js');_0x3e6840({'apiDomain':optionalString(_0x41c741[_0x15ceaf(0xda)]?.['apiDomain']),'userDomain':optionalString(_0x41c741[_0x15ceaf(0xda)]?.[_0x15ceaf(0xe3)]),'runtimeDomain':optionalString(_0x41c741['raw']?.['runtimeDomain'])});}export function getConfigAppCode(_0x52822f){const _0x23ee24=a206_0x5036,_0xf10936=readRawConfig(_0x52822f);if(_0xf10936['apps']&&typeof _0xf10936[_0x23ee24(0xe0)]==='object'){const _0x5d5d63=_0xf10936[_0x23ee24(0xe1)];if(_0x5d5d63&&_0xf10936[_0x23ee24(0xe0)][_0x5d5d63]?.[_0x23ee24(0xdd)])return String(_0xf10936['apps'][_0x5d5d63][_0x23ee24(0xdd)])['trim']();const _0x458b86=Object[_0x23ee24(0xd9)](_0xf10936[_0x23ee24(0xe0)])[0x0];if(_0x458b86?.[_0x23ee24(0xdd)])return String(_0x458b86[_0x23ee24(0xdd)])[_0x23ee24(0xc0)]();}const _0x593bc1=_0xf10936['appcode']||_0xf10936[_0x23ee24(0xc9)];if(typeof _0x593bc1!==_0x23ee24(0xc6)||_0x593bc1[_0x23ee24(0xc0)]()==='')return undefined;return _0x593bc1[_0x23ee24(0xc0)]();}export function getMultiAppConfigs(_0x284fec='project',_0x11ea0f){const _0x40d854=a206_0x5036,_0x26b72f=loadRawConfigLayers(_0x11ea0f);let _0x3e50d8,_0x548d51;if(_0x284fec===_0x40d854(0xc5)){const _0x538821=_0x26b72f[_0x40d854(0xd8)][_0x40d854(0xe0)]&&typeof _0x26b72f[_0x40d854(0xd8)][_0x40d854(0xe0)]===_0x40d854(0xd3)?_0x26b72f[_0x40d854(0xd8)]['apps']:{},_0x2ecd5f=_0x26b72f[_0x40d854(0xca)][_0x40d854(0xe0)]&&typeof _0x26b72f[_0x40d854(0xca)][_0x40d854(0xe0)]===_0x40d854(0xd3)?_0x26b72f[_0x40d854(0xca)]['apps']:{};_0x3e50d8={..._0x538821,..._0x2ecd5f};const _0x1ec6fb=readRawConfig(_0x11ea0f);_0x548d51=_0x1ec6fb[_0x40d854(0xe1)];}else _0x3e50d8=_0x26b72f[_0x40d854(0xca)]['apps'],_0x548d51=_0x26b72f[_0x40d854(0xca)][_0x40d854(0xe1)];if(!_0x3e50d8||typeof _0x3e50d8!==_0x40d854(0xd3)||Object[_0x40d854(0xcb)](_0x3e50d8)[_0x40d854(0xd1)]===0x0)return null;return Object[_0x40d854(0xd4)](_0x3e50d8)[_0x40d854(0xd2)](([_0x375476,_0x370975])=>({'name':_0x375476,'appcode':_0x370975?.[_0x40d854(0xdd)]||'','isDefault':_0x375476===_0x548d51,'env':_0x370975?.[_0x40d854(0xc2)],'apiDir':_0x370975?.['apiDir'],'cookie':_0x370975?.[_0x40d854(0xce)]||undefined}))['filter'](_0x42bb96=>_0x42bb96['appcode']);}function a206_0x5d2f(){const _0x178a9b=['raw','73WKCrMR','5446464sKhShB','appcode','template_base_url','6587919BQRzwF','apps','defaultApp','./utils/is-non-interactive.js','userDomain','19786SfUuBa','4AmYAuM','slice','cwd','setLogPath','7SOTSRU','trim','argv','env','4894780vyhutW','setRawCommand','merged','string','1789512zJvNxt','2372728SFxsTE','app','projectConfig','keys','-api.ts','./constant/env.js','cookie','https://g.lovrabet.com/dist/lovrabet-skill','900YTcWOY','length','map','object','entries','replace','25124dVNzQP','apiDir','globalConfig','values'];a206_0x5d2f=function(){return _0x178a9b;};return a206_0x5d2f();}export function getTemplateBaseUrl(_0x372f9b){const _0x2f93c4=a206_0x5036,_0x5e1d9b=readRawConfig(_0x372f9b);if(_0x5e1d9b[_0x2f93c4(0xde)]&&typeof _0x5e1d9b[_0x2f93c4(0xde)]===_0x2f93c4(0xc6))return _0x5e1d9b[_0x2f93c4(0xde)][_0x2f93c4(0xd5)](/\/$/,'');return _0x2f93c4(0xcf);}function buildConfig(_0x4ee4e7,_0x31ff5c,_0x2db239){return{...resolveAppConfig({'raw':_0x4ee4e7,'flags':_0x31ff5c,'layers':_0x2db239,'readEnv':env}),'raw':_0x4ee4e7};}function a206_0x5036(_0x38698a,_0x3f67c2){_0x38698a=_0x38698a-0xba;const _0x5d2f3f=a206_0x5d2f();let _0x503683=_0x5d2f3f[_0x38698a];return _0x503683;}export function resolveApiFilePath(_0x3b8606,_0x310130){const _0x411077=a206_0x5036,_0x13546e=resolve(process[_0x411077(0xbd)](),_0x3b8606),_0x51e071=resolve(_0x13546e,'api.ts');if(!_0x310130)return _0x51e071;const _0x370668=readRawConfig(),_0x2bda53=_0x370668['apps']&&typeof _0x370668[_0x411077(0xe0)]===_0x411077(0xd3)?_0x370668[_0x411077(0xe0)]:{},_0x5a2ea7=Object[_0x411077(0xd4)](_0x2bda53)['find'](([,_0x54d9db])=>_0x54d9db?.[_0x411077(0xdd)]===_0x310130);if(!_0x5a2ea7)return _0x51e071;const [_0x5bf382,_0x4544f5]=_0x5a2ea7,_0x172d32=typeof _0x370668[_0x411077(0xe1)]===_0x411077(0xc6)?_0x370668[_0x411077(0xe1)]:undefined;if(_0x4544f5?.[_0x411077(0xd7)])return _0x51e071;if(_0x172d32&&_0x5bf382!==_0x172d32)return resolve(_0x13546e,_0x5bf382+_0x411077(0xcc));return _0x51e071;}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 通用数据集别名解析层
3
+ *
4
+ * 从 `rabetbase api pull` 生成的 api.ts 中提取 alias → datasetCode 映射。
5
+ * --alias 参数接受 api.ts 中定义的 alias 名称,解析为对应的 datasetCode。
6
+ *
7
+ * 无 api.ts 时(CI 环境未 pull)返回 undefined,由调用方报错。
8
+ */
9
+ export interface AliasEntry {
10
+ alias: string;
11
+ datasetCode: string;
12
+ tableName: string;
13
+ name: string;
14
+ }
15
+ /**
16
+ * 加载并缓存指定 api 文件的别名映射。
17
+ *
18
+ * @param apiDir api 目录(用于默认路径兜底)
19
+ * @param appCode (已废弃,保留签名兼容)不再用于内部路径解析
20
+ * @param resolvedFilePath 已解析好的 api.ts 绝对/相对路径;
21
+ * 多应用场景由调用方通过 resolveApiFilePath() 传入
22
+ */
23
+ export declare function loadAliasMap(apiDir: string, appCode?: string, resolvedFilePath?: string): AliasEntry[];
24
+ /**
25
+ * 通过 alias 名称解析 datasetCode。
26
+ */
27
+ export declare function resolveAlias(apiDir: string, alias: string, appCode?: string, resolvedFilePath?: string): string | undefined;
28
+ /**
29
+ * 列出所有可用的别名(用于 help、补全、错误提示等场景)
30
+ */
31
+ export declare function listAliases(apiDir: string, appCode?: string, resolvedFilePath?: string): AliasEntry[];
@@ -1 +1 @@
1
- (function(_0xe84051,_0x433330){const _0x5c1e09=a207_0x513b,_0x3adbcb=_0xe84051();while(!![]){try{const _0x3d0e70=parseInt(_0x5c1e09(0x95))/0x1+parseInt(_0x5c1e09(0x92))/0x2+parseInt(_0x5c1e09(0x88))/0x3*(parseInt(_0x5c1e09(0x97))/0x4)+parseInt(_0x5c1e09(0x98))/0x5*(parseInt(_0x5c1e09(0x8d))/0x6)+parseInt(_0x5c1e09(0x8b))/0x7+parseInt(_0x5c1e09(0x8c))/0x8+-parseInt(_0x5c1e09(0x93))/0x9*(parseInt(_0x5c1e09(0x8a))/0xa);if(_0x3d0e70===_0x433330)break;else _0x3adbcb['push'](_0x3adbcb['shift']());}catch(_0x1d7aa5){_0x3adbcb['push'](_0x3adbcb['shift']());}}}(a207_0x23c2,0x49017));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a207_0x513b(_0x5d5f2e,_0x41bfed){_0x5d5f2e=_0x5d5f2e-0x85;const _0x23c26e=a207_0x23c2();let _0x513b09=_0x23c26e[_0x5d5f2e];return _0x513b09;}const cache=new Map();function parseApiFile(_0x5ca89a){const _0x27fc91=a207_0x513b,_0x2c1a21=[],_0x5b4e09=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x24bc91;while((_0x24bc91=_0x5b4e09[_0x27fc91(0x94)](_0x5ca89a))!==null){_0x2c1a21['push']({'datasetCode':_0x24bc91[0x1],'tableName':_0x24bc91[0x2],'name':_0x24bc91[0x3],'alias':_0x24bc91[0x4]});}return _0x2c1a21;}export function loadAliasMap(_0x1286c9,_0x2fd12f,_0x5b65f9){const _0x4101cd=a207_0x513b,_0x1be4db=_0x5b65f9??resolve(process[_0x4101cd(0x89)](),_0x1286c9,_0x4101cd(0x96));if(cache[_0x4101cd(0x87)](_0x1be4db))return cache[_0x4101cd(0x91)](_0x1be4db);if(!existsSync(_0x1be4db))return cache['set'](_0x1be4db,[]),[];try{const _0x47e3ca=readFileSync(_0x1be4db,_0x4101cd(0x8e)),_0x45a189=parseApiFile(_0x47e3ca);return cache[_0x4101cd(0x90)](_0x1be4db,_0x45a189),_0x45a189;}catch{return cache[_0x4101cd(0x90)](_0x1be4db,[]),[];}}export function resolveAlias(_0x144ebd,_0x4011cc,_0x150125,_0x2208d2){const _0x4a3fbb=a207_0x513b;if(!_0x4011cc)return undefined;const _0x4e1abf=loadAliasMap(_0x144ebd,_0x150125,_0x2208d2),_0x4cc832=_0x4e1abf[_0x4a3fbb(0x8f)](_0x5c80e0=>_0x5c80e0[_0x4a3fbb(0x85)]===_0x4011cc);return _0x4cc832?.[_0x4a3fbb(0x86)];}function a207_0x23c2(){const _0x43a020=['758696qwVapB','18ZTqUgs','exec','429864qTSZHQ','api.ts','4XEceHS','444325UYMBJo','alias','datasetCode','has','159351oByLnp','cwd','7239590XGrNKt','3542700XHSpwn','1606320qmDjce','12AHzkFI','utf-8','find','set','get'];a207_0x23c2=function(){return _0x43a020;};return a207_0x23c2();}export function listAliases(_0x2554ae,_0x45aa3f,_0xd56152){return loadAliasMap(_0x2554ae,_0x45aa3f,_0xd56152);}
1
+ (function(_0x24bf44,_0x59a197){const _0x3aedfd=a207_0x3ec7,_0x20b48e=_0x24bf44();while(!![]){try{const _0x276bf2=-parseInt(_0x3aedfd(0xa5))/0x1+-parseInt(_0x3aedfd(0xaf))/0x2*(-parseInt(_0x3aedfd(0xac))/0x3)+-parseInt(_0x3aedfd(0xb3))/0x4+-parseInt(_0x3aedfd(0xad))/0x5+-parseInt(_0x3aedfd(0xa9))/0x6+-parseInt(_0x3aedfd(0xb0))/0x7*(-parseInt(_0x3aedfd(0xa7))/0x8)+parseInt(_0x3aedfd(0xa4))/0x9;if(_0x276bf2===_0x59a197)break;else _0x20b48e['push'](_0x20b48e['shift']());}catch(_0x83e7d4){_0x20b48e['push'](_0x20b48e['shift']());}}}(a207_0x5093,0x2a75c));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x26e700){const _0x44a672=a207_0x3ec7,_0x499d28=[],_0x23d8f5=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x6c373e;while((_0x6c373e=_0x23d8f5['exec'](_0x26e700))!==null){_0x499d28[_0x44a672(0xab)]({'datasetCode':_0x6c373e[0x1],'tableName':_0x6c373e[0x2],'name':_0x6c373e[0x3],'alias':_0x6c373e[0x4]});}return _0x499d28;}function a207_0x3ec7(_0x1ec3ba,_0xbc36d8){_0x1ec3ba=_0x1ec3ba-0xa3;const _0x509343=a207_0x5093();let _0x3ec701=_0x509343[_0x1ec3ba];return _0x3ec701;}export function loadAliasMap(_0x429308,_0x557c9f,_0x2dac39){const _0x481c13=a207_0x3ec7,_0x5a20af=_0x2dac39??resolve(process['cwd'](),_0x429308,_0x481c13(0xb2));if(cache[_0x481c13(0xaa)](_0x5a20af))return cache[_0x481c13(0xa6)](_0x5a20af);if(!existsSync(_0x5a20af))return cache[_0x481c13(0xa3)](_0x5a20af,[]),[];try{const _0x120306=readFileSync(_0x5a20af,_0x481c13(0xb1)),_0xee9760=parseApiFile(_0x120306);return cache[_0x481c13(0xa3)](_0x5a20af,_0xee9760),_0xee9760;}catch{return cache[_0x481c13(0xa3)](_0x5a20af,[]),[];}}export function resolveAlias(_0x20958a,_0x4097c6,_0x248202,_0x7f5ae7){const _0x291406=a207_0x3ec7;if(!_0x4097c6)return undefined;const _0x8bcead=loadAliasMap(_0x20958a,_0x248202,_0x7f5ae7),_0x5bba0a=_0x8bcead[_0x291406(0xae)](_0x5d2d4a=>_0x5d2d4a['alias']===_0x4097c6);return _0x5bba0a?.[_0x291406(0xa8)];}function a207_0x5093(){const _0x1d0e2f=['8RmaztP','5803XJvRwm','utf-8','api.ts','1107280wDWuCT','set','5054697pxvMwF','347792yaIxDR','get','872Kjvgok','datasetCode','85776lVupzF','has','push','134598shPapt','93170njqMWZ','find'];a207_0x5093=function(){return _0x1d0e2f;};return a207_0x5093();}export function listAliases(_0xd68588,_0x2578e5,_0x3a5013){return loadAliasMap(_0xd68588,_0x2578e5,_0x3a5013);}