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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
@@ -1 +1 @@
1
- const a36_0x72519a=a36_0x14ab;(function(_0x1ec191,_0x38ff89){const _0x5845b4=a36_0x14ab,_0x3e100c=_0x1ec191();while(!![]){try{const _0x17bdff=-parseInt(_0x5845b4(0x1ac))/0x1*(parseInt(_0x5845b4(0x18e))/0x2)+parseInt(_0x5845b4(0x1b4))/0x3+parseInt(_0x5845b4(0x19f))/0x4*(-parseInt(_0x5845b4(0x17c))/0x5)+parseInt(_0x5845b4(0x1b9))/0x6*(-parseInt(_0x5845b4(0x167))/0x7)+-parseInt(_0x5845b4(0x1a4))/0x8*(parseInt(_0x5845b4(0x191))/0x9)+-parseInt(_0x5845b4(0x187))/0xa*(-parseInt(_0x5845b4(0x1a5))/0xb)+-parseInt(_0x5845b4(0x1a9))/0xc*(-parseInt(_0x5845b4(0x190))/0xd);if(_0x17bdff===_0x38ff89)break;else _0x3e100c['push'](_0x3e100c['shift']());}catch(_0x45a1c4){_0x3e100c['push'](_0x3e100c['shift']());}}}(a36_0x2e2d,0xdbc5b));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a36_0x2e2d(){const _0x590a9f=['Push\x20only\x20this\x20script\x20type','lastSync','ENDPOINT','type','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','create','attempted','31890yCRfHb','bool','Would\x20inspect\x20','aliasToDatasetCode','push','datasetId','str','104088lNsAgf','map','3939eUKiir','6627267hwUBZt','functionNode','set','lockFilePath','utf8','force','\x22\x20not\x20found\x20after\x20ensureLockScope.','alias','lockKey','scriptsRoot','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','has','get','operationType','4656600FvPKAm','Push\x20local\x20BFF\x20scripts\x20to\x20remote','length','values','Cannot\x20resolve\x20dataset\x20for\x20\x22','8YaWeES','3597WIKrYD','COMMON','No\x20local\x20BFF\x20functions\x20found.','runtime\x20cache\x20clear\x20failed','72132JYWuFM','code','boolean','3aNWpLc','would_push',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','message','\x20skipped,\x20','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','stringify','name','4264974WMAZoa','HOOK','\x22.\x20','Lock\x20scope\x20for\x20app\x20\x22','apps','20238QxGgAa','datasetCodeToDataset','script','Incomplete\x20HOOK\x20path:\x20','2758WpThHd','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20failed,\x20','remoteId','runtime\x20cache\x20not\x20needed','some','datasetCode','filter','runtime\x20cache\x20cleared','unchanged','bff','\x20uploaded,\x20','Runtime\x20script\x20cache\x20cleared.','cleared','every','high-risk-write','hash','version','appCode','filePath','status','5AWLYvm','validation','functions','description'];a36_0x2e2d=function(){return _0x590a9f;};return a36_0x2e2d();}import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x72519a(0x171),'command':a36_0x72519a(0x18b),'description':a36_0x72519a(0x1a0),'risk':a36_0x72519a(0x176),'flags':[{'name':'type','type':'string','description':a36_0x72519a(0x180),'enum':[a36_0x72519a(0x1a6),a36_0x72519a(0x182),a36_0x72519a(0x1b5)]},{'name':a36_0x72519a(0x1b3),'type':'string','description':a36_0x72519a(0x168)},{'name':a36_0x72519a(0x196),'type':a36_0x72519a(0x1ab),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x52ab3f){const _0x58357f=a36_0x72519a,_0x3b7a4e=loadBffProjectConfig(_0x52ab3f['appCode']),_0x2e01cf=await readBffLockFile(_0x3b7a4e['lockFilePath']),{appLock:_0x3ca11f}=ensureLockScope(_0x2e01cf??createEmptyBffLock(),_0x52ab3f[_0x58357f(0x179)],_0x3b7a4e[_0x58357f(0x19a)],_0x58357f(0x18b)),_0x3cbd37=await getTargetFunctions(_0x3b7a4e,_0x52ab3f),_0x2f808b=_0x52ab3f['bool'](_0x58357f(0x196)),_0x2728f0=[];for(const _0x470061 of _0x3cbd37){const _0x48b15c=await computeFileHash(_0x470061['filePath']),_0x584baf=_0x3ca11f[_0x58357f(0x17e)][_0x470061[_0x58357f(0x199)]],_0x390171=!!_0x584baf&&_0x584baf[_0x58357f(0x177)]===_0x48b15c;_0x2728f0['push']({'lockKey':_0x470061[_0x58357f(0x199)],'filePath':_0x470061['filePath'],'remoteId':_0x584baf?.[_0x58357f(0x16a)]??null,'mode':_0x584baf?.['remoteId']?'update':_0x58357f(0x185),'status':!_0x2f808b&&_0x390171?'unchanged':_0x58357f(0x1ad)});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x52ab3f['appCode'],'force':_0x2f808b,'files':_0x2728f0,'cacheClearAtRuntime':_0x2728f0[_0x58357f(0x16c)](_0x5d00b4=>_0x5d00b4[_0x58357f(0x17b)]===_0x58357f(0x1ad)),'cacheClearAtRuntimeTimes':_0x2728f0[_0x58357f(0x16c)](_0x2328af=>_0x2328af[_0x58357f(0x17b)]===_0x58357f(0x1ad))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x58357f(0x189)+_0x2728f0['length']+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x4240e2){const _0x510067=a36_0x72519a,_0x378905=loadBffProjectConfig(_0x4240e2[_0x510067(0x179)]),_0x335847=await readBffLockFile(_0x378905['lockFilePath']),{lockData:_0x28105f,appLock:_0x2f51a2}=ensureLockScope(_0x335847??createEmptyBffLock(),_0x4240e2['appCode'],_0x378905['scriptsRoot'],_0x510067(0x18b)),_0x115cb2=await getTargetFunctions(_0x378905,_0x4240e2);if(_0x115cb2['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x510067(0x1a7)};const _0x40441b=_0x4240e2[_0x510067(0x188)]('force'),_0x4233a0=JSON['parse'](JSON[_0x510067(0x1b2)](_0x28105f)),_0x3122ee=_0x4233a0[_0x510067(0x1b8)][_0x4240e2[_0x510067(0x179)]];if(!_0x3122ee)throw new Error(_0x510067(0x1b7)+_0x4240e2[_0x510067(0x179)]+_0x510067(0x197));const _0x40b3ba=await buildHookMaps(_0x4240e2[_0x510067(0x179)],_0x4240e2['apiDir'],_0x115cb2,_0x3122ee),_0x1b83bd=[],_0x2b659b=[],_0xe4365b=[];for(const _0x280552 of _0x115cb2){const _0x3926e8=await computeFileHash(_0x280552[_0x510067(0x17a)]),_0x4923d7=_0x3122ee['functions'][_0x280552['lockKey']];if(!_0x40441b&&_0x4923d7&&_0x4923d7[_0x510067(0x177)]===_0x3926e8){_0x2b659b[_0x510067(0x18b)]({'lockKey':_0x280552[_0x510067(0x199)],'reason':_0x510067(0x170)});continue;}try{await uploadSingleFunction(_0x4240e2['appCode'],_0x280552,_0x3122ee,_0x40b3ba);const _0x26acb8=_0x3122ee['functions'][_0x280552[_0x510067(0x199)]];_0x1b83bd[_0x510067(0x18b)]({'lockKey':_0x280552[_0x510067(0x199)],'remoteId':_0x26acb8?.[_0x510067(0x16a)]??0x0});}catch(_0x99d922){_0xe4365b['push']({'lockKey':_0x280552[_0x510067(0x199)],'error':_0x99d922 instanceof Error?_0x99d922[_0x510067(0x1af)]:String(_0x99d922)});}}_0x3122ee[_0x510067(0x181)]=new Date()['toISOString'](),await writeBffLockFile(_0x378905[_0x510067(0x194)],_0x4233a0),await waitForUploadedLockEntries(_0x378905[_0x510067(0x194)],_0x4240e2[_0x510067(0x179)],_0x1b83bd[_0x510067(0x18f)](_0xb15958=>_0xb15958['lockKey']));let _0x13030e={'attempted':![],'cleared':![]};if(_0x1b83bd[_0x510067(0x1a1)]>0x0)try{let _0x2c9587='';for(let _0x59ab45=0x0;_0x59ab45<CACHE_CLEAR_ATTEMPTS;_0x59ab45+=0x1){_0x2c9587=await clearBffScriptCache(),_0x59ab45<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x13030e={'attempted':!![],'cleared':!![],'message':_0x2c9587||_0x510067(0x173)};}catch(_0x47fe3c){_0x13030e={'attempted':!![],'cleared':![],'error':_0x47fe3c instanceof Error?_0x47fe3c[_0x510067(0x1af)]:String(_0x47fe3c)};}const _0x4c261f=_0xe4365b[_0x510067(0x1a1)]===0x0&&(_0x13030e[_0x510067(0x186)]?_0x13030e[_0x510067(0x174)]:!![]),_0x2bd0ef=_0x13030e[_0x510067(0x186)]?_0x13030e['cleared']?_0x510067(0x16f):_0x510067(0x1a8):_0x510067(0x16b);return{'ok':_0x4c261f,'data':{'uploaded':_0x1b83bd,'skipped':_0x2b659b,'failed':_0xe4365b,'cacheClear':_0x13030e},'message':'Push\x20complete:\x20'+_0x1b83bd[_0x510067(0x1a1)]+_0x510067(0x172)+_0x2b659b[_0x510067(0x1a1)]+_0x510067(0x1b0)+_0xe4365b[_0x510067(0x1a1)]+_0x510067(0x169)+_0x2bd0ef};}};async function getTargetFunctions(_0x526acb,_0xc86898){const _0x3ec394=a36_0x72519a,_0x2abee8=_0xc86898[_0x3ec394(0x18d)](_0x3ec394(0x183)),_0x11a65d=_0xc86898[_0x3ec394(0x18d)](_0x3ec394(0x1b3)),_0x5aca07=normalizeBffType(_0x2abee8)??undefined;if(_0x11a65d&&!_0x5aca07)throw CliErrors['validation'](_0x3ec394(0x1b1));const _0x47c5c9=await scanLocalBffFunctions(_0x526acb,_0x5aca07);if(_0x11a65d){const _0x23fa1b=_0x47c5c9[_0x3ec394(0x16e)](_0x20669a=>_0x20669a[_0x3ec394(0x1b3)]===_0x11a65d);if(_0x23fa1b[_0x3ec394(0x1a1)]===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x5aca07+'/'+_0x11a65d);return _0x23fa1b;}return _0x47c5c9;}async function buildHookMaps(_0x556753,_0x4580f6,_0x18c62a,_0x4818fd){const _0x5e8ac8=a36_0x72519a,_0x2b744d=_0x18c62a[_0x5e8ac8(0x16c)](_0x24c9a7=>_0x24c9a7['type']===_0x5e8ac8(0x1b5));if(!_0x2b744d)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3f1e9b=loadAliasMap(_0x4580f6,undefined,resolveApiFilePath(_0x4580f6,_0x556753)),_0x235583=new Map(_0x3f1e9b[_0x5e8ac8(0x18f)](_0x47ce3a=>[_0x47ce3a['alias'],_0x47ce3a[_0x5e8ac8(0x16d)]]));for(const _0x5d0589 of Object[_0x5e8ac8(0x1a2)](_0x4818fd[_0x5e8ac8(0x17e)])){_0x5d0589[_0x5e8ac8(0x198)]&&_0x5d0589[_0x5e8ac8(0x16d)]&&!_0x235583['has'](_0x5d0589[_0x5e8ac8(0x198)])&&_0x235583[_0x5e8ac8(0x193)](_0x5d0589['alias'],_0x5d0589[_0x5e8ac8(0x16d)]);}const _0xc55ebc=await listDatasets(_0x556753),_0x4252ca=new Map(_0xc55ebc[_0x5e8ac8(0x18f)](_0x2e704f=>[_0x2e704f[_0x5e8ac8(0x1aa)],_0x2e704f]));return{'aliasToDatasetCode':_0x235583,'datasetCodeToDataset':_0x4252ca};}async function uploadSingleFunction(_0x3d2aaa,_0x2e4934,_0x368e67,_0x2d29c2){const _0x4ae706=a36_0x72519a,_0x41e0fb=await readFile(_0x2e4934[_0x4ae706(0x17a)],_0x4ae706(0x195)),_0x431cd7=await computeFileHash(_0x2e4934['filePath']),_0x3ec296=_0x368e67['functions'][_0x2e4934['lockKey']];if(_0x3ec296?.[_0x4ae706(0x16a)]&&_0x3ec296['version']==null)throw CliErrors[_0x4ae706(0x17d)](_0x2e4934[_0x4ae706(0x199)]+_0x4ae706(0x1ae));let _0x29a707=extractScriptDescription(_0x41e0fb);if(!_0x29a707&&_0x3ec296?.[_0x4ae706(0x16a)]){const _0x2c9e73=await getBffScriptInfo(_0x3ec296[_0x4ae706(0x16a)]);_0x29a707=_0x2c9e73['description']||undefined;}const _0x409bda={'appCode':_0x3d2aaa,'functionName':_0x2e4934['name'],'scriptType':_0x2e4934['type'],'scriptContent':_0x41e0fb};if(_0x3ec296?.[_0x4ae706(0x16a)])_0x409bda['id']=_0x3ec296['remoteId'];if(_0x3ec296?.['version']!=null)_0x409bda[_0x4ae706(0x178)]=_0x3ec296[_0x4ae706(0x178)];if(_0x29a707)_0x409bda[_0x4ae706(0x17f)]=_0x29a707;if(_0x2e4934[_0x4ae706(0x183)]===_0x4ae706(0x1b5)){const _0x422b4a=_0x2e4934[_0x4ae706(0x198)];if(!_0x422b4a||!_0x2e4934[_0x4ae706(0x19e)]||!_0x2e4934[_0x4ae706(0x192)])throw CliErrors[_0x4ae706(0x17d)](_0x4ae706(0x166)+_0x2e4934[_0x4ae706(0x199)]);const _0x53117d=_0x2d29c2[_0x4ae706(0x18a)][_0x4ae706(0x19d)](_0x422b4a)??_0x3ec296?.[_0x4ae706(0x16d)]??_0x422b4a,_0x2e6c0=_0x2d29c2[_0x4ae706(0x164)]['get'](_0x53117d);if(!_0x2e6c0)throw CliErrors[_0x4ae706(0x17d)](_0x4ae706(0x1a3)+_0x422b4a+_0x4ae706(0x1b6)+('Run\x20`'+CLI_BIN_NAME+_0x4ae706(0x184)));_0x409bda[_0x4ae706(0x18c)]=_0x2e6c0['id'],_0x409bda['operationType']=_0x2e4934[_0x4ae706(0x19e)],_0x409bda[_0x4ae706(0x192)]=_0x2e4934[_0x4ae706(0x192)];}const _0x294d98=await saveBffScript(_0x409bda),_0xf35f7b=_0x294d98['id'],_0x5dc7ec=_0x294d98[_0x4ae706(0x165)]??await getBffScriptInfo(_0xf35f7b),_0xe36bcf={'hash':_0x431cd7,'remoteId':_0xf35f7b,'version':_0x5dc7ec[_0x4ae706(0x178)]};if(_0x2e4934[_0x4ae706(0x183)]===_0x4ae706(0x1b5)){const _0x300a75=_0x2e4934[_0x4ae706(0x198)],_0x3ba32c=_0x2d29c2['aliasToDatasetCode'][_0x4ae706(0x19d)](_0x300a75)??_0x3ec296?.[_0x4ae706(0x16d)]??_0x300a75;_0x2d29c2['aliasToDatasetCode'][_0x4ae706(0x19c)](_0x300a75)?_0xe36bcf[_0x4ae706(0x198)]=_0x300a75:_0xe36bcf[_0x4ae706(0x198)]=_0x3ec296?.[_0x4ae706(0x198)],_0xe36bcf[_0x4ae706(0x16d)]=_0x3ba32c,_0xe36bcf[_0x4ae706(0x19e)]=_0x2e4934['operationType'],_0xe36bcf[_0x4ae706(0x192)]=_0x2e4934['functionNode'];}_0x368e67[_0x4ae706(0x17e)][_0x2e4934[_0x4ae706(0x199)]]=_0xe36bcf;}function a36_0x14ab(_0x4c34ba,_0x6ad379){_0x4c34ba=_0x4c34ba-0x164;const _0x2e2d22=a36_0x2e2d();let _0x14ab01=_0x2e2d22[_0x4c34ba];return _0x14ab01;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x9b020f,_0x3230af,_0x3772fb){const _0x672dc1=a36_0x72519a;if(_0x3772fb[_0x672dc1(0x1a1)]===0x0)return;for(let _0x2f52aa=0x0;_0x2f52aa<LOCK_SETTLE_RETRY_COUNT;_0x2f52aa+=0x1){const _0x334f0c=await readBffLockFile(_0x9b020f),_0xeeb52a=_0x334f0c?.['apps']?.[_0x3230af]?.[_0x672dc1(0x17e)]??{},_0x126d0f=_0x3772fb[_0x672dc1(0x175)](_0x4d9ee6=>!!_0xeeb52a[_0x4d9ee6]?.['remoteId']);if(_0x126d0f)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x672dc1(0x19b)+_0x3772fb['join'](',\x20')+'.');}
1
+ const a36_0x467fd1=a36_0x1ee4;(function(_0x35ae96,_0x1daa55){const _0x42f272=a36_0x1ee4,_0xe11b0b=_0x35ae96();while(!![]){try{const _0x3d31d2=parseInt(_0x42f272(0x1e0))/0x1+-parseInt(_0x42f272(0x1db))/0x2+parseInt(_0x42f272(0x1aa))/0x3+parseInt(_0x42f272(0x19a))/0x4+parseInt(_0x42f272(0x1d3))/0x5*(-parseInt(_0x42f272(0x1c5))/0x6)+-parseInt(_0x42f272(0x19e))/0x7*(-parseInt(_0x42f272(0x1b1))/0x8)+-parseInt(_0x42f272(0x1b4))/0x9;if(_0x3d31d2===_0x1daa55)break;else _0xe11b0b['push'](_0xe11b0b['shift']());}catch(_0x3bff59){_0xe11b0b['push'](_0xe11b0b['shift']());}}}(a36_0x5bfa,0xc495d));function a36_0x1ee4(_0x1f34ca,_0x5b13ac){_0x1f34ca=_0x1f34ca-0x194;const _0x5bfa0d=a36_0x5bfa();let _0x1ee49d=_0x5bfa0d[_0x1f34ca];return _0x1ee49d;}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';function a36_0x5bfa(){const _0x5de285=['Cannot\x20resolve\x20dataset\x20for\x20\x22','824712JEIpuR','No\x20local\x20BFF\x20functions\x20found.','cleared','Push\x20local\x20BFF\x20scripts\x20to\x20remote','\x20skipped,\x20','697666fvVYwt','has','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','description','code','status','HOOK','remoteId','lockFilePath','runtime\x20cache\x20cleared','4000672yuEqza','stringify','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','script','38899rvuyyT','functions','lockKey','Force\x20push\x20ignoring\x20hash\x20protection','Push\x20only\x20this\x20script\x20type','datasetCode','type','datasetId','scriptsRoot','attempted','apps','would_push','2108772FlIZSu','unchanged','boolean','aliasToDatasetCode','parse','hash','\x20uploaded,\x20','384CNCWrU','functionNode','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','6853347YCJUzT','version','get','ENDPOINT','update','bool','str','bff','Run\x20`','runtime\x20cache\x20not\x20needed','join','operationType','\x20failed,\x20','name','COMMON','create','high-risk-write','4130652zkxNkS','map','some','message','lastSync','force','datasetCodeToDataset','push','appCode','apiDir','runtime\x20cache\x20clear\x20failed','utf8','POST','string','5LyowED','Incomplete\x20HOOK\x20path:\x20','filePath','alias','validation','length','\x22.\x20'];a36_0x5bfa=function(){return _0x5de285;};return a36_0x5bfa();}import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x467fd1(0x1bb),'command':a36_0x467fd1(0x1cc),'description':a36_0x467fd1(0x1de),'risk':a36_0x467fd1(0x1c4),'flags':[{'name':'type','type':a36_0x467fd1(0x1d2),'description':a36_0x467fd1(0x1a2),'enum':[a36_0x467fd1(0x1c2),a36_0x467fd1(0x1b7),a36_0x467fd1(0x196)]},{'name':a36_0x467fd1(0x1c1),'type':a36_0x467fd1(0x1d2),'description':a36_0x467fd1(0x1e2)},{'name':a36_0x467fd1(0x1ca),'type':a36_0x467fd1(0x1ac),'description':a36_0x467fd1(0x1a1)}],async 'dryRun'(_0x508180){const _0x24294b=a36_0x467fd1,_0x1f4c89=loadBffProjectConfig(_0x508180[_0x24294b(0x1cd)]),_0x534b20=await readBffLockFile(_0x1f4c89['lockFilePath']),{appLock:_0x185799}=ensureLockScope(_0x534b20??createEmptyBffLock(),_0x508180[_0x24294b(0x1cd)],_0x1f4c89[_0x24294b(0x1a6)],'push'),_0x1595a5=await getTargetFunctions(_0x1f4c89,_0x508180),_0xbaf0f5=_0x508180[_0x24294b(0x1b9)]('force'),_0x4ed317=[];for(const _0x5d69f5 of _0x1595a5){const _0xb7cc54=await computeFileHash(_0x5d69f5['filePath']),_0x18f4bd=_0x185799[_0x24294b(0x19f)][_0x5d69f5[_0x24294b(0x1a0)]],_0x2bd975=!!_0x18f4bd&&_0x18f4bd[_0x24294b(0x1af)]===_0xb7cc54;_0x4ed317['push']({'lockKey':_0x5d69f5[_0x24294b(0x1a0)],'filePath':_0x5d69f5[_0x24294b(0x1d5)],'remoteId':_0x18f4bd?.[_0x24294b(0x197)]??null,'mode':_0x18f4bd?.[_0x24294b(0x197)]?_0x24294b(0x1b8):_0x24294b(0x1c3),'status':!_0xbaf0f5&&_0x2bd975?_0x24294b(0x1ab):_0x24294b(0x1a9)});}return{'method':_0x24294b(0x1d1),'url':'/api/management/library/scripts/save','body':{'appCode':_0x508180['appCode'],'force':_0xbaf0f5,'files':_0x4ed317,'cacheClearAtRuntime':_0x4ed317['some'](_0xd6b351=>_0xd6b351['status']==='would_push'),'cacheClearAtRuntimeTimes':_0x4ed317[_0x24294b(0x1c7)](_0x5e1f03=>_0x5e1f03[_0x24294b(0x195)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x4ed317[_0x24294b(0x1d8)]+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0xe2b802){const _0x272dfc=a36_0x467fd1,_0x53b55c=loadBffProjectConfig(_0xe2b802[_0x272dfc(0x1cd)]),_0x4311ba=await readBffLockFile(_0x53b55c[_0x272dfc(0x198)]),{lockData:_0x279a4e,appLock:_0x2712a2}=ensureLockScope(_0x4311ba??createEmptyBffLock(),_0xe2b802[_0x272dfc(0x1cd)],_0x53b55c['scriptsRoot'],_0x272dfc(0x1cc)),_0x336fd7=await getTargetFunctions(_0x53b55c,_0xe2b802);if(_0x336fd7[_0x272dfc(0x1d8)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x272dfc(0x1dc)};const _0x1297dc=_0xe2b802[_0x272dfc(0x1b9)](_0x272dfc(0x1ca)),_0x1737f8=JSON[_0x272dfc(0x1ae)](JSON[_0x272dfc(0x19b)](_0x279a4e)),_0x37ccd0=_0x1737f8[_0x272dfc(0x1a8)][_0xe2b802[_0x272dfc(0x1cd)]];if(!_0x37ccd0)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xe2b802['appCode']+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x317e33=await buildHookMaps(_0xe2b802['appCode'],_0xe2b802[_0x272dfc(0x1ce)],_0x336fd7,_0x37ccd0),_0x460696=[],_0x5568c4=[],_0x576a95=[];for(const _0x509b10 of _0x336fd7){const _0x121224=await computeFileHash(_0x509b10[_0x272dfc(0x1d5)]),_0x2b42e4=_0x37ccd0[_0x272dfc(0x19f)][_0x509b10[_0x272dfc(0x1a0)]];if(!_0x1297dc&&_0x2b42e4&&_0x2b42e4[_0x272dfc(0x1af)]===_0x121224){_0x5568c4[_0x272dfc(0x1cc)]({'lockKey':_0x509b10[_0x272dfc(0x1a0)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0xe2b802['appCode'],_0x509b10,_0x37ccd0,_0x317e33);const _0x2c50b5=_0x37ccd0[_0x272dfc(0x19f)][_0x509b10[_0x272dfc(0x1a0)]];_0x460696[_0x272dfc(0x1cc)]({'lockKey':_0x509b10[_0x272dfc(0x1a0)],'remoteId':_0x2c50b5?.[_0x272dfc(0x197)]??0x0});}catch(_0x4bda23){_0x576a95['push']({'lockKey':_0x509b10['lockKey'],'error':_0x4bda23 instanceof Error?_0x4bda23[_0x272dfc(0x1c8)]:String(_0x4bda23)});}}_0x37ccd0[_0x272dfc(0x1c9)]=new Date()['toISOString'](),await writeBffLockFile(_0x53b55c[_0x272dfc(0x198)],_0x1737f8),await waitForUploadedLockEntries(_0x53b55c[_0x272dfc(0x198)],_0xe2b802[_0x272dfc(0x1cd)],_0x460696[_0x272dfc(0x1c6)](_0x3b373f=>_0x3b373f['lockKey']));let _0x49a626={'attempted':![],'cleared':![]};if(_0x460696[_0x272dfc(0x1d8)]>0x0)try{let _0x137ab5='';for(let _0x219375=0x0;_0x219375<CACHE_CLEAR_ATTEMPTS;_0x219375+=0x1){_0x137ab5=await clearBffScriptCache(),_0x219375<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x49a626={'attempted':!![],'cleared':!![],'message':_0x137ab5||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x228dab){_0x49a626={'attempted':!![],'cleared':![],'error':_0x228dab instanceof Error?_0x228dab['message']:String(_0x228dab)};}const _0x46bd3e=_0x576a95['length']===0x0&&(_0x49a626[_0x272dfc(0x1a7)]?_0x49a626[_0x272dfc(0x1dd)]:!![]),_0x2e102b=_0x49a626[_0x272dfc(0x1a7)]?_0x49a626[_0x272dfc(0x1dd)]?_0x272dfc(0x199):_0x272dfc(0x1cf):_0x272dfc(0x1bd);return{'ok':_0x46bd3e,'data':{'uploaded':_0x460696,'skipped':_0x5568c4,'failed':_0x576a95,'cacheClear':_0x49a626},'message':'Push\x20complete:\x20'+_0x460696['length']+_0x272dfc(0x1b0)+_0x5568c4['length']+_0x272dfc(0x1df)+_0x576a95[_0x272dfc(0x1d8)]+_0x272dfc(0x1c0)+_0x2e102b};}};async function getTargetFunctions(_0x421b01,_0x22bd06){const _0x15f093=a36_0x467fd1,_0x1c556c=_0x22bd06[_0x15f093(0x1ba)](_0x15f093(0x1a4)),_0x2d2777=_0x22bd06['str'](_0x15f093(0x1c1)),_0x4c0853=normalizeBffType(_0x1c556c)??undefined;if(_0x2d2777&&!_0x4c0853)throw CliErrors[_0x15f093(0x1d7)](_0x15f093(0x19c));const _0x3ee595=await scanLocalBffFunctions(_0x421b01,_0x4c0853);if(_0x2d2777){const _0x534fc2=_0x3ee595['filter'](_0x2ccf38=>_0x2ccf38[_0x15f093(0x1c1)]===_0x2d2777);if(_0x534fc2[_0x15f093(0x1d8)]===0x0)throw CliErrors[_0x15f093(0x1d7)]('Local\x20function\x20not\x20found:\x20'+_0x4c0853+'/'+_0x2d2777);return _0x534fc2;}return _0x3ee595;}async function buildHookMaps(_0x1975e0,_0x39e086,_0x3964b4,_0xfebc42){const _0x1dbe85=a36_0x467fd1,_0x138e40=_0x3964b4['some'](_0x3b9880=>_0x3b9880[_0x1dbe85(0x1a4)]===_0x1dbe85(0x196));if(!_0x138e40)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3ca157=loadAliasMap(_0x39e086,undefined,resolveApiFilePath(_0x39e086,_0x1975e0)),_0x33308e=new Map(_0x3ca157[_0x1dbe85(0x1c6)](_0x52ec0e=>[_0x52ec0e[_0x1dbe85(0x1d6)],_0x52ec0e['datasetCode']]));for(const _0x1fd8b1 of Object['values'](_0xfebc42[_0x1dbe85(0x19f)])){_0x1fd8b1['alias']&&_0x1fd8b1[_0x1dbe85(0x1a3)]&&!_0x33308e[_0x1dbe85(0x1e1)](_0x1fd8b1['alias'])&&_0x33308e['set'](_0x1fd8b1[_0x1dbe85(0x1d6)],_0x1fd8b1[_0x1dbe85(0x1a3)]);}const _0x145f17=await listDatasets(_0x1975e0),_0x1b0bb1=new Map(_0x145f17[_0x1dbe85(0x1c6)](_0xa7a9a6=>[_0xa7a9a6[_0x1dbe85(0x194)],_0xa7a9a6]));return{'aliasToDatasetCode':_0x33308e,'datasetCodeToDataset':_0x1b0bb1};}async function uploadSingleFunction(_0x4aa531,_0x1a45b5,_0x1401e7,_0x36e306){const _0x33b51b=a36_0x467fd1,_0x323f04=await readFile(_0x1a45b5[_0x33b51b(0x1d5)],_0x33b51b(0x1d0)),_0x41ac15=await computeFileHash(_0x1a45b5['filePath']),_0x36dc45=_0x1401e7[_0x33b51b(0x19f)][_0x1a45b5[_0x33b51b(0x1a0)]];if(_0x36dc45?.['remoteId']&&_0x36dc45[_0x33b51b(0x1b5)]==null)throw CliErrors[_0x33b51b(0x1d7)](_0x1a45b5[_0x33b51b(0x1a0)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x3ba27c=extractScriptDescription(_0x323f04);if(!_0x3ba27c&&_0x36dc45?.[_0x33b51b(0x197)]){const _0x298a50=await getBffScriptInfo(_0x36dc45[_0x33b51b(0x197)]);_0x3ba27c=_0x298a50[_0x33b51b(0x1e3)]||undefined;}const _0x119ce6={'appCode':_0x4aa531,'functionName':_0x1a45b5[_0x33b51b(0x1c1)],'scriptType':_0x1a45b5[_0x33b51b(0x1a4)],'scriptContent':_0x323f04};if(_0x36dc45?.[_0x33b51b(0x197)])_0x119ce6['id']=_0x36dc45[_0x33b51b(0x197)];if(_0x36dc45?.['version']!=null)_0x119ce6['version']=_0x36dc45[_0x33b51b(0x1b5)];if(_0x3ba27c)_0x119ce6['description']=_0x3ba27c;if(_0x1a45b5['type']===_0x33b51b(0x196)){const _0x59222d=_0x1a45b5[_0x33b51b(0x1d6)];if(!_0x59222d||!_0x1a45b5[_0x33b51b(0x1bf)]||!_0x1a45b5[_0x33b51b(0x1b2)])throw CliErrors[_0x33b51b(0x1d7)](_0x33b51b(0x1d4)+_0x1a45b5[_0x33b51b(0x1a0)]);const _0x415f4c=_0x36e306['aliasToDatasetCode'][_0x33b51b(0x1b6)](_0x59222d)??_0x36dc45?.[_0x33b51b(0x1a3)]??_0x59222d,_0x220b14=_0x36e306[_0x33b51b(0x1cb)]['get'](_0x415f4c);if(!_0x220b14)throw CliErrors[_0x33b51b(0x1d7)](_0x33b51b(0x1da)+_0x59222d+_0x33b51b(0x1d9)+(_0x33b51b(0x1bc)+CLI_BIN_NAME+_0x33b51b(0x1b3)));_0x119ce6[_0x33b51b(0x1a5)]=_0x220b14['id'],_0x119ce6['operationType']=_0x1a45b5[_0x33b51b(0x1bf)],_0x119ce6[_0x33b51b(0x1b2)]=_0x1a45b5[_0x33b51b(0x1b2)];}const _0x37a680=await saveBffScript(_0x119ce6),_0x21ca98=_0x37a680['id'],_0x3e1922=_0x37a680[_0x33b51b(0x19d)]??await getBffScriptInfo(_0x21ca98),_0x548556={'hash':_0x41ac15,'remoteId':_0x21ca98,'version':_0x3e1922[_0x33b51b(0x1b5)]};if(_0x1a45b5[_0x33b51b(0x1a4)]===_0x33b51b(0x196)){const _0x4b1d3e=_0x1a45b5['alias'],_0x38457a=_0x36e306['aliasToDatasetCode'][_0x33b51b(0x1b6)](_0x4b1d3e)??_0x36dc45?.[_0x33b51b(0x1a3)]??_0x4b1d3e;_0x36e306[_0x33b51b(0x1ad)]['has'](_0x4b1d3e)?_0x548556[_0x33b51b(0x1d6)]=_0x4b1d3e:_0x548556[_0x33b51b(0x1d6)]=_0x36dc45?.[_0x33b51b(0x1d6)],_0x548556['datasetCode']=_0x38457a,_0x548556[_0x33b51b(0x1bf)]=_0x1a45b5[_0x33b51b(0x1bf)],_0x548556[_0x33b51b(0x1b2)]=_0x1a45b5[_0x33b51b(0x1b2)];}_0x1401e7[_0x33b51b(0x19f)][_0x1a45b5['lockKey']]=_0x548556;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x280600,_0x277327,_0x337fab){const _0x38f88e=a36_0x467fd1;if(_0x337fab[_0x38f88e(0x1d8)]===0x0)return;for(let _0xfc167b=0x0;_0xfc167b<LOCK_SETTLE_RETRY_COUNT;_0xfc167b+=0x1){const _0x32e77e=await readBffLockFile(_0x280600),_0x41ca32=_0x32e77e?.[_0x38f88e(0x1a8)]?.[_0x277327]?.[_0x38f88e(0x19f)]??{},_0x3b5c4a=_0x337fab['every'](_0x33c727=>!!_0x41ca32[_0x33c727]?.[_0x38f88e(0x197)]);if(_0x3b5c4a)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x337fab[_0x38f88e(0x1be)](',\x20')+'.');}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const bffStatus: CommandDefinition;
@@ -1 +1 @@
1
- const a37_0x3fb8b5=a37_0x13be;function a37_0x58d5(){const _0xd0f0ee=['201450WMlGLl','read','boolean','apiDir','filePath','appCode','\x20added,\x20','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','push','lockKey','scriptsRoot','map','3778943idsUDi','functions','bool','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','\x20unchanged','hash','744546JEpnfv','208928mVrIWn','All\x20BFF\x20scripts\x20are\x20in\x20sync.','alias','bff','189sxauBG','182202xyJyzk','2667615dnWEmh','1181670bMzgsD','\x20modified,\x20','4dgsduu','datasetCode','remote','has','lockFilePath','status','803XsktDD','1kUouZN','all','length'];a37_0x58d5=function(){return _0xd0f0ee;};return a37_0x58d5();}(function(_0x444785,_0x395557){const _0x430932=a37_0x13be,_0x42ab8c=_0x444785();while(!![]){try{const _0x36ac84=-parseInt(_0x430932(0xf5))/0x1*(parseInt(_0x430932(0x110))/0x2)+parseInt(_0x430932(0x112))/0x3+-parseInt(_0x430932(0x114))/0x4*(parseInt(_0x430932(0x111))/0x5)+parseInt(_0x430932(0x10a))/0x6+-parseInt(_0x430932(0x104))/0x7+-parseInt(_0x430932(0x10b))/0x8*(parseInt(_0x430932(0x10f))/0x9)+-parseInt(_0x430932(0xf8))/0xa*(-parseInt(_0x430932(0x11a))/0xb);if(_0x36ac84===_0x395557)break;else _0x42ab8c['push'](_0x42ab8c['shift']());}catch(_0x2d83e1){_0x42ab8c['push'](_0x42ab8c['shift']());}}}(a37_0x58d5,0x434c9));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a37_0x13be(_0x2c191b,_0x473c8e){_0x2c191b=_0x2c191b-0xf5;const _0x58d5aa=a37_0x58d5();let _0x13bef6=_0x58d5aa[_0x2c191b];return _0x13bef6;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a37_0x3fb8b5(0x10e),'command':a37_0x3fb8b5(0x119),'description':a37_0x3fb8b5(0x107),'risk':a37_0x3fb8b5(0xf9),'flags':[{'name':a37_0x3fb8b5(0x116),'type':a37_0x3fb8b5(0xfa),'description':a37_0x3fb8b5(0xff)}],async 'execute'(_0xc106fb){const _0x1773cb=a37_0x3fb8b5,_0x5ca886=loadBffProjectConfig(_0xc106fb[_0x1773cb(0xfd)]),_0x55b367=await readBffLockFile(_0x5ca886[_0x1773cb(0x118)]),{appLock:_0x33d01e}=ensureLockScope(_0x55b367??createEmptyBffLock(),_0xc106fb[_0x1773cb(0xfd)],_0x5ca886[_0x1773cb(0x102)],_0x1773cb(0x119)),_0x5f2596=await scanLocalBffFunctions(_0x5ca886),_0x3bca41=[],_0x263340=[],_0x47cb8f=[];for(const _0x3b18d5 of _0x5f2596){const _0x10a1d7=await computeFileHash(_0x3b18d5[_0x1773cb(0xfc)]),_0x29fb5f=_0x33d01e['functions'][_0x3b18d5['lockKey']];if(!_0x29fb5f)_0x3bca41[_0x1773cb(0x100)](_0x3b18d5[_0x1773cb(0x101)]);else _0x29fb5f[_0x1773cb(0x109)]!==_0x10a1d7?_0x263340[_0x1773cb(0x100)](_0x3b18d5[_0x1773cb(0x101)]):_0x47cb8f[_0x1773cb(0x100)](_0x3b18d5[_0x1773cb(0x101)]);}const _0x56af4b=[];if(_0xc106fb[_0x1773cb(0x106)](_0x1773cb(0x116))){const _0x29b07f=loadAliasMap(_0xc106fb[_0x1773cb(0xfb)],undefined,resolveApiFilePath(_0xc106fb['apiDir'],_0xc106fb[_0x1773cb(0xfd)])),_0x246ae9=new Map(_0x29b07f[_0x1773cb(0x103)](_0x5a6e68=>[_0x5a6e68[_0x1773cb(0x115)],_0x5a6e68[_0x1773cb(0x10d)]])),[_0x3fcc94,_0x2d28df]=await Promise[_0x1773cb(0xf6)]([listBffScripts(_0xc106fb[_0x1773cb(0xfd)]),getBffScriptStatistics(_0xc106fb[_0x1773cb(0xfd)])]),_0x4e6090=createHookLocationMap(_0x2d28df),_0x21401a=new Set(_0x5f2596[_0x1773cb(0x103)](_0x30fb6a=>_0x30fb6a[_0x1773cb(0x101)]));for(const _0x3e8cd3 of _0x3fcc94){const _0x562d0e=resolveRemoteScriptTarget(_0x5ca886,_0x3e8cd3,_0x4e6090,_0x33d01e[_0x1773cb(0x105)],_0x246ae9);_0x562d0e&&!_0x21401a[_0x1773cb(0x117)](_0x562d0e['lockKey'])&&_0x56af4b[_0x1773cb(0x100)](_0x562d0e[_0x1773cb(0x101)]);}}const _0x3fd684=_0x3bca41[_0x1773cb(0xf7)]===0x0&&_0x263340[_0x1773cb(0xf7)]===0x0&&_0x56af4b['length']===0x0;return{'ok':!![],'data':{'added':_0x3bca41,'modified':_0x263340,'unchanged':_0x47cb8f,'remoteOnly':_0x56af4b},'message':_0x3fd684?_0x1773cb(0x10c):_0x3bca41[_0x1773cb(0xf7)]+_0x1773cb(0xfe)+_0x263340[_0x1773cb(0xf7)]+_0x1773cb(0x113)+_0x47cb8f[_0x1773cb(0xf7)]+_0x1773cb(0x108)+(_0x56af4b[_0x1773cb(0xf7)]>0x0?',\x20'+_0x56af4b['length']+'\x20remote-only':'')};}};
1
+ const a37_0xcf25b2=a37_0x420d;(function(_0x1074be,_0x3da69e){const _0x348b33=a37_0x420d,_0x2a8b9e=_0x1074be();while(!![]){try{const _0x18f965=-parseInt(_0x348b33(0x16e))/0x1*(parseInt(_0x348b33(0x16b))/0x2)+parseInt(_0x348b33(0x17b))/0x3*(-parseInt(_0x348b33(0x174))/0x4)+-parseInt(_0x348b33(0x17f))/0x5*(parseInt(_0x348b33(0x177))/0x6)+-parseInt(_0x348b33(0x168))/0x7+parseInt(_0x348b33(0x17e))/0x8+-parseInt(_0x348b33(0x175))/0x9+parseInt(_0x348b33(0x179))/0xa;if(_0x18f965===_0x3da69e)break;else _0x2a8b9e['push'](_0x2a8b9e['shift']());}catch(_0x15af8e){_0x2a8b9e['push'](_0x2a8b9e['shift']());}}}(a37_0x52f4,0xcafa8));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a37_0x52f4(){const _0x3af426=['3819215qXABCw','push','alias','read','has','lockKey','\x20added,\x20','bff','all','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','9303287HUppXB','filePath','length','2MkseIC','status','map','1052819wnEPmn','remote','scriptsRoot','appCode','boolean','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','204bxHLEo','14004126oxcdeq','\x20remote-only','6ZQgObp','lockFilePath','51963680XQyWiA','functions','47412fwgKlU','\x20unchanged','apiDir','9142024auhrFF'];a37_0x52f4=function(){return _0x3af426;};return a37_0x52f4();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a37_0x420d(_0x3bf6a6,_0x1346d3){_0x3bf6a6=_0x3bf6a6-0x163;const _0x52f46c=a37_0x52f4();let _0x420da2=_0x52f46c[_0x3bf6a6];return _0x420da2;}export const bffStatus={'service':a37_0xcf25b2(0x165),'command':a37_0xcf25b2(0x16c),'description':a37_0xcf25b2(0x173),'risk':a37_0xcf25b2(0x182),'flags':[{'name':'remote','type':a37_0xcf25b2(0x172),'description':a37_0xcf25b2(0x167)}],async 'execute'(_0x28e980){const _0x28dfa2=a37_0xcf25b2,_0x2893c5=loadBffProjectConfig(_0x28e980[_0x28dfa2(0x171)]),_0x101eb7=await readBffLockFile(_0x2893c5[_0x28dfa2(0x178)]),{appLock:_0x460c71}=ensureLockScope(_0x101eb7??createEmptyBffLock(),_0x28e980[_0x28dfa2(0x171)],_0x2893c5[_0x28dfa2(0x170)],_0x28dfa2(0x16c)),_0x32fff4=await scanLocalBffFunctions(_0x2893c5),_0x193bea=[],_0x4b5f0a=[],_0x3fecb3=[];for(const _0x27e3f4 of _0x32fff4){const _0x2f3a99=await computeFileHash(_0x27e3f4[_0x28dfa2(0x169)]),_0x18733f=_0x460c71[_0x28dfa2(0x17a)][_0x27e3f4[_0x28dfa2(0x163)]];if(!_0x18733f)_0x193bea['push'](_0x27e3f4[_0x28dfa2(0x163)]);else _0x18733f['hash']!==_0x2f3a99?_0x4b5f0a[_0x28dfa2(0x180)](_0x27e3f4[_0x28dfa2(0x163)]):_0x3fecb3[_0x28dfa2(0x180)](_0x27e3f4[_0x28dfa2(0x163)]);}const _0x5cf938=[];if(_0x28e980['bool'](_0x28dfa2(0x16f))){const _0x2fa758=loadAliasMap(_0x28e980[_0x28dfa2(0x17d)],undefined,resolveApiFilePath(_0x28e980[_0x28dfa2(0x17d)],_0x28e980[_0x28dfa2(0x171)])),_0x47c8b6=new Map(_0x2fa758[_0x28dfa2(0x16d)](_0x3e5d44=>[_0x3e5d44['datasetCode'],_0x3e5d44[_0x28dfa2(0x181)]])),[_0x2affa1,_0x2ed163]=await Promise[_0x28dfa2(0x166)]([listBffScripts(_0x28e980['appCode']),getBffScriptStatistics(_0x28e980[_0x28dfa2(0x171)])]),_0x584ab4=createHookLocationMap(_0x2ed163),_0x3bb6c8=new Set(_0x32fff4[_0x28dfa2(0x16d)](_0x35a152=>_0x35a152[_0x28dfa2(0x163)]));for(const _0x19b73d of _0x2affa1){const _0x3a3b01=resolveRemoteScriptTarget(_0x2893c5,_0x19b73d,_0x584ab4,_0x460c71[_0x28dfa2(0x17a)],_0x47c8b6);_0x3a3b01&&!_0x3bb6c8[_0x28dfa2(0x183)](_0x3a3b01[_0x28dfa2(0x163)])&&_0x5cf938[_0x28dfa2(0x180)](_0x3a3b01[_0x28dfa2(0x163)]);}}const _0x12ab85=_0x193bea[_0x28dfa2(0x16a)]===0x0&&_0x4b5f0a[_0x28dfa2(0x16a)]===0x0&&_0x5cf938['length']===0x0;return{'ok':!![],'data':{'added':_0x193bea,'modified':_0x4b5f0a,'unchanged':_0x3fecb3,'remoteOnly':_0x5cf938},'message':_0x12ab85?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x193bea['length']+_0x28dfa2(0x164)+_0x4b5f0a[_0x28dfa2(0x16a)]+'\x20modified,\x20'+_0x3fecb3[_0x28dfa2(0x16a)]+_0x28dfa2(0x17c)+(_0x5cf938[_0x28dfa2(0x16a)]>0x0?',\x20'+_0x5cf938['length']+_0x28dfa2(0x176):'')};}};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI Built-in Skill commands.
3
+ *
4
+ * This service owns the rabetbase CLI maintenance Skill installation path.
5
+ * Business Skill installation belongs to the lovrabet runtime CLI.
6
+ */
7
+ import type { CommandDefinition } from "../../framework/types.js";
8
+ export declare const cliSkillDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- const a38_0xe570d2=a38_0x126a;(function(_0xf66a5,_0x33804a){const _0x5b9f62=a38_0x126a,_0x434b6c=_0xf66a5();while(!![]){try{const _0x419206=-parseInt(_0x5b9f62(0x185))/0x1+-parseInt(_0x5b9f62(0x17f))/0x2*(-parseInt(_0x5b9f62(0x184))/0x3)+-parseInt(_0x5b9f62(0x182))/0x4*(parseInt(_0x5b9f62(0x18c))/0x5)+parseInt(_0x5b9f62(0x190))/0x6+parseInt(_0x5b9f62(0x186))/0x7+parseInt(_0x5b9f62(0x18b))/0x8+-parseInt(_0x5b9f62(0x189))/0x9*(parseInt(_0x5b9f62(0x193))/0xa);if(_0x419206===_0x33804a)break;else _0x434b6c['push'](_0x434b6c['shift']());}catch(_0x55348f){_0x434b6c['push'](_0x434b6c['shift']());}}}(a38_0x2c51,0x845e8));import{CliErrors}from'../../errors.js';function a38_0x126a(_0x3db6ca,_0x5bcc3b){_0x3db6ca=_0x3db6ca-0x17d;const _0x2c51f4=a38_0x2c51();let _0x126a13=_0x2c51f4[_0x3db6ca];return _0x126a13;}import{logger}from'../../utils/logger.js';function a38_0x2c51(){const _0x44c4dd=['unknown','2967OnUASm','463812uWUmDd','2481374LhZCBU','nonInteractive','setLogPath','968067iUunrM','error','8123688yOFdZt','10vLpqhm','apiError','cwd','info','3064926TdeFuz','skipped','log','90oyvtoB','read','inherit',')...','1818ptxFDS','cli-skill','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','1611404WONAax'];a38_0x2c51=function(){return _0x44c4dd;};return a38_0x2c51();}export const cliSkillDefinitions=[{'service':a38_0xe570d2(0x180),'command':'install','description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a38_0xe570d2(0x194),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xb71a7b){const _0x5bf8d7=a38_0xe570d2;logger[_0x5bf8d7(0x188)](process['cwd']()),logger[_0x5bf8d7(0x18f)]('cli-skill-install',_0x5bf8d7(0x181));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x2a428e,RABETBASE_SKILL_SOURCE:_0x456301,runNpxSkillsAddGlobal:_0x340ed5}=await import('../../skills/npx-skills-add.js'),_0x1ec1c6=_0xb71a7b[_0x5bf8d7(0x187)]?'pipe':_0x5bf8d7(0x17d);console[_0x5bf8d7(0x192)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x2a428e+_0x5bf8d7(0x17e));const _0x1dcd3a=_0x340ed5(process[_0x5bf8d7(0x18e)](),_0x456301,{'stdio':_0x1ec1c6});if(_0x1dcd3a[_0x5bf8d7(0x191)])console['log']('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x1dcd3a['ok'])console['log']('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x5bf8d7(0x18d)]('npx\x20skills\x20add\x20failed:\x20'+(_0x1dcd3a[_0x5bf8d7(0x18a)]||_0x5bf8d7(0x183)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x2a428e);}return{'ok':!![]};}}];
1
+ const a38_0x5b0307=a38_0x3605;(function(_0x2c9210,_0x553d9a){const _0x1c8c29=a38_0x3605,_0x5dfa69=_0x2c9210();while(!![]){try{const _0x42e6cd=-parseInt(_0x1c8c29(0x1ec))/0x1*(parseInt(_0x1c8c29(0x1f8))/0x2)+parseInt(_0x1c8c29(0x1ee))/0x3*(parseInt(_0x1c8c29(0x1ed))/0x4)+-parseInt(_0x1c8c29(0x1e6))/0x5*(-parseInt(_0x1c8c29(0x1e8))/0x6)+parseInt(_0x1c8c29(0x1f6))/0x7+parseInt(_0x1c8c29(0x1f7))/0x8+parseInt(_0x1c8c29(0x1dd))/0x9+-parseInt(_0x1c8c29(0x1f1))/0xa;if(_0x42e6cd===_0x553d9a)break;else _0x5dfa69['push'](_0x5dfa69['shift']());}catch(_0x508265){_0x5dfa69['push'](_0x5dfa69['shift']());}}}(a38_0x76a7,0xefc6a));function a38_0x76a7(){const _0x563c06=['cli-skill','330RVTYTS','pipe','77676HSvSdf','apiError','log','read','3WOOkxu','4ZReQFy','3390951SkMAjA',')...','cwd','14721950KoWxqS','inherit','unknown','npx\x20skills\x20add\x20failed:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','2550142CYvyHF','1498144RoNHAs','1119214ZgcmwY','14371299WKWkLA','error','install','skipped','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','setLogPath','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.'];a38_0x76a7=function(){return _0x563c06;};return a38_0x76a7();}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a38_0x3605(_0x59597e,_0x38b3ed){_0x59597e=_0x59597e-0x1dd;const _0x76a7e2=a38_0x76a7();let _0x360563=_0x76a7e2[_0x59597e];return _0x360563;}export const cliSkillDefinitions=[{'service':a38_0x5b0307(0x1e5),'command':a38_0x5b0307(0x1df),'description':a38_0x5b0307(0x1e1),'risk':a38_0x5b0307(0x1eb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x291cc7){const _0x4b2e88=a38_0x5b0307;logger[_0x4b2e88(0x1e3)](process['cwd']()),logger['info']('cli-skill-install',_0x4b2e88(0x1e4));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4ef033,RABETBASE_SKILL_SOURCE:_0x314989,runNpxSkillsAddGlobal:_0x1d1bfe}=await import('../../skills/npx-skills-add.js'),_0x4ae842=_0x291cc7['nonInteractive']?_0x4b2e88(0x1e7):_0x4b2e88(0x1f2);console[_0x4b2e88(0x1ea)](_0x4b2e88(0x1f5)+_0x4ef033+_0x4b2e88(0x1ef));const _0x549c24=_0x1d1bfe(process[_0x4b2e88(0x1f0)](),_0x314989,{'stdio':_0x4ae842});if(_0x549c24[_0x4b2e88(0x1e0)])console[_0x4b2e88(0x1ea)](_0x4b2e88(0x1e2));else{if(_0x549c24['ok'])console[_0x4b2e88(0x1ea)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x4b2e88(0x1e9)](_0x4b2e88(0x1f4)+(_0x549c24[_0x4b2e88(0x1de)]||_0x4b2e88(0x1f3)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x4ef033);}return{'ok':!![]};}}];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../framework/types.js";
2
+ export declare const updateDefinition: CommandDefinition;
@@ -1 +1 @@
1
- const a39_0x104a08=a39_0x48a1;(function(_0x4c43be,_0x3484b3){const _0x2f9696=a39_0x48a1,_0x5a80a1=_0x4c43be();while(!![]){try{const _0x224857=parseInt(_0x2f9696(0xf6))/0x1+parseInt(_0x2f9696(0x138))/0x2+-parseInt(_0x2f9696(0x129))/0x3+-parseInt(_0x2f9696(0x108))/0x4*(parseInt(_0x2f9696(0x118))/0x5)+parseInt(_0x2f9696(0x130))/0x6+-parseInt(_0x2f9696(0xef))/0x7*(parseInt(_0x2f9696(0x12c))/0x8)+-parseInt(_0x2f9696(0x112))/0x9;if(_0x224857===_0x3484b3)break;else _0x5a80a1['push'](_0x5a80a1['shift']());}catch(_0x30cfac){_0x5a80a1['push'](_0x5a80a1['shift']());}}}(a39_0x57bd,0x99eaf));import a39_0x32a3f6 from'chalk';import a39_0x2d0a03 from'ora';import a39_0x3a1e4b from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x40fd90=a39_0x48a1;return GIT_COMMIT!==_0x40fd90(0x117)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function a39_0x48a1(_0x667e1e,_0x392652){_0x667e1e=_0x667e1e-0xed;const _0x57bd17=a39_0x57bd();let _0x48a176=_0x57bd17[_0x667e1e];return _0x48a176;}function a39_0x57bd(){const _0x368c6e=['Version\x20comparison\x20failed','1067074VgIDkA','yellow','Update\x20available:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','valid','read','bun','install','Checking\x20for\x20updates...','Current\x20version:\x20','/dist-tags','\x20→\x20','skills','pipe','Updating\x20via\x20','green','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','version','20eWXeWt','filter','execPath','skipped','source','string','https://registry.npmjs.org/-/package/','includes','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Invalid\x20version:\x20','2535156GPtbMk','Install\x20a\x20specific\x20CLI\x20version','cwd','red','info','unknown','238250NMHzMr','beta','Update\x20failed','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','map','gray','bool','\x20cli-skill\x20install','fail','Already\x20on\x20requested\x20version\x20(v','error','toLowerCase','trim','\x20install\x20-g\x20','npm','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','\x20\x20Try\x20manually:\x20','301440aikPIC','entries','object','1163888AjVywA','boolean','succeed','Checking\x20CLI\x20Built-in\x20Skill...','5986440jgjFiL','json','...','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','timeout','validation','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','length','408898QtTfgC','start','fromEntries','warn','\x20\x20Run\x20manually:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Beta\x20version:\x20','no-skills','message','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','log','49ULQGIE','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','latest','inherit','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','nonInteractive'];a39_0x57bd=function(){return _0x368c6e;};return a39_0x57bd();}function detectPackageManager(){const _0x36c663=a39_0x48a1,_0x3aa434=process[_0x36c663(0x10a)][_0x36c663(0x123)]();if(_0x3aa434[_0x36c663(0x10f)](_0x36c663(0xfc)))return _0x36c663(0xfc);return _0x36c663(0x126);}const updateFlags=[{'name':a39_0x104a08(0x119),'type':'boolean','description':a39_0x104a08(0xf0),'default':![]},{'name':'version','type':a39_0x104a08(0x10d),'description':a39_0x104a08(0x113)},{'name':a39_0x104a08(0x13f),'type':a39_0x104a08(0x12d),'description':a39_0x104a08(0xed),'default':![]},{'name':a39_0x104a08(0x102),'type':a39_0x104a08(0x12d),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0xc1618d){const _0x7f4d9c=a39_0x104a08;return _0xc1618d['str'](_0x7f4d9c(0x107))[_0x7f4d9c(0x124)]();}function shouldSkipCliSkill(_0x5d6835){const _0x2483d2=a39_0x104a08;return _0x5d6835['bool'](_0x2483d2(0x13f))||_0x5d6835['flag'](_0x2483d2(0x102))===![];}async function validateUpdateFlags(_0x46a1f0){const _0x1d8f13=a39_0x104a08,_0x5bbe2d=_0x46a1f0[_0x1d8f13(0x11e)]('beta'),_0x56c259=getRequestedVersion(_0x46a1f0);if(_0x5bbe2d&&_0x56c259)throw CliErrors[_0x1d8f13(0x135)](_0x1d8f13(0x133),_0x1d8f13(0x13d));if(_0x56c259&&!a39_0x3a1e4b[_0x1d8f13(0xfa)](_0x56c259))throw CliErrors['validation'](_0x1d8f13(0x111)+_0x56c259,_0x1d8f13(0x11b));}async function fetchNpmDistTags(){const _0x298c92=a39_0x104a08;try{const _0x588b3a=await fetch(_0x298c92(0x10e)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x298c92(0x100),{'signal':AbortSignal[_0x298c92(0x134)](0x2710)});if(!_0x588b3a['ok'])return null;const _0x5d38e0=await _0x588b3a[_0x298c92(0x131)]();if(!_0x5d38e0||typeof _0x5d38e0!==_0x298c92(0x12b))return null;return Object[_0x298c92(0x13a)](Object[_0x298c92(0x12a)](_0x5d38e0)[_0x298c92(0x109)](([,_0x746aa])=>typeof _0x746aa===_0x298c92(0x10d)&&_0x746aa['trim']()[_0x298c92(0x137)]>0x0)[_0x298c92(0x11c)](([_0x5afb6e,_0x2ea07d])=>[_0x5afb6e,String(_0x2ea07d)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x1dd06b){const _0x23e070=await fetchNpmDistTags();return _0x23e070?.[_0x1dd06b]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x4a7563){const _0x486b52=a39_0x104a08,_0x2ce451=getRequestedVersion(_0x4a7563);if(_0x2ce451)return{'version':_0x2ce451,'source':_0x486b52(0x107)};if(_0x4a7563['bool'](_0x486b52(0x119))){const _0x1b2308=await fetchNpmDistTagVersion(_0x486b52(0x119));if(!_0x1b2308)return null;return{'version':_0x1b2308,'source':_0x486b52(0x119)};}const _0x478f4b=await fetchLatestVersion();if(!_0x478f4b)return null;return{'version':_0x478f4b,'source':_0x486b52(0xf1)};}function shouldInstallTarget(_0x880bbc,_0x50da80){const _0x5b2e40=a39_0x104a08;if(_0x50da80[_0x5b2e40(0x10c)]==='version'||_0x50da80[_0x5b2e40(0x10c)]===_0x5b2e40(0x119))return!a39_0x3a1e4b['eq'](_0x880bbc,_0x50da80[_0x5b2e40(0x107)]);return a39_0x3a1e4b['lt'](_0x880bbc,_0x50da80[_0x5b2e40(0x107)]);}function getInstallPlanLabel(_0x4bdf99,_0x32242a){const _0x56608b=a39_0x104a08;switch(_0x32242a[_0x56608b(0x10c)]){case _0x56608b(0x119):return _0x56608b(0x13e)+a39_0x32a3f6[_0x56608b(0xf7)](_0x4bdf99)+_0x56608b(0x101)+a39_0x32a3f6[_0x56608b(0x105)](_0x32242a[_0x56608b(0x107)]);case _0x56608b(0x107):return'Requested\x20version:\x20'+a39_0x32a3f6[_0x56608b(0xf7)](_0x4bdf99)+_0x56608b(0x101)+a39_0x32a3f6['green'](_0x32242a[_0x56608b(0x107)]);case _0x56608b(0xf1):default:return _0x56608b(0xf8)+a39_0x32a3f6[_0x56608b(0xf7)](_0x4bdf99)+_0x56608b(0x101)+a39_0x32a3f6[_0x56608b(0x105)](_0x32242a['version']);}}async function installCliSkill(_0x2edc4c){const _0x212c23=a39_0x104a08;console['log'](a39_0x32a3f6['gray'](_0x212c23(0x12f)));const _0x3ad3aa=runNpxSkillsAddGlobal(process[_0x212c23(0x114)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x2edc4c?_0x212c23(0x103):_0x212c23(0xf2)});if(_0x3ad3aa[_0x212c23(0x10b)]){console[_0x212c23(0xee)](a39_0x32a3f6[_0x212c23(0x11d)](_0x212c23(0x106)));return;}if(_0x3ad3aa['ok']){console[_0x212c23(0xee)](a39_0x32a3f6[_0x212c23(0x11d)](_0x212c23(0x141)));return;}console[_0x212c23(0x13b)](a39_0x32a3f6[_0x212c23(0xf7)](_0x212c23(0xf9)+(_0x3ad3aa['error']||_0x212c23(0x117)))),console[_0x212c23(0xee)](a39_0x32a3f6[_0x212c23(0x11d)](_0x212c23(0x13c)+CLI_BIN_NAME+_0x212c23(0x11f)));}async function execute(_0x5ab5bf){const _0x5f5141=a39_0x104a08;await validateUpdateFlags(_0x5ab5bf);const _0x2d6ad1=getCurrentVersion();console[_0x5f5141(0xee)](_0x5f5141(0xff)+_0x2d6ad1);const _0x5080c8=a39_0x2d0a03(_0x5f5141(0xfe))[_0x5f5141(0x139)](),_0x1d33bc=await resolveTargetVersion(_0x5ab5bf);if(!_0x1d33bc){const _0x5bd3ca=_0x5ab5bf['bool'](_0x5f5141(0x119))?_0x5f5141(0x136):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x5080c8['fail'](_0x5bd3ca),console[_0x5f5141(0xee)](a39_0x32a3f6[_0x5f5141(0x11d)](_0x5f5141(0xf3)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x5bd3ca};}const _0x198162=a39_0x3a1e4b[_0x5f5141(0xfa)](VERSION),_0x4f5dbc=a39_0x3a1e4b[_0x5f5141(0xfa)](_0x1d33bc[_0x5f5141(0x107)]);if(!_0x198162||!_0x4f5dbc)return _0x5080c8[_0x5f5141(0x120)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x5f5141(0xf5)};if(!shouldInstallTarget(_0x198162,_0x1d33bc)){const _0x3ce873=_0x1d33bc[_0x5f5141(0x10c)]===_0x5f5141(0x107)?_0x5f5141(0x121)+_0x1d33bc[_0x5f5141(0x107)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x1d33bc['version']+')';return _0x5080c8[_0x5f5141(0x12e)](_0x3ce873),shouldSkipCliSkill(_0x5ab5bf)?console['log'](a39_0x32a3f6[_0x5f5141(0x11d)](_0x5f5141(0x127))):await installCliSkill(_0x5ab5bf[_0x5f5141(0xf4)]),{'ok':!![]};}_0x5080c8[_0x5f5141(0x116)](getInstallPlanLabel(_0x2d6ad1,_0x1d33bc));const _0x4ab332=detectPackageManager(),_0x5cfe22=_0x4ab332==='npm'?resolveNpmBin(_0x5f5141(0x126)):_0x4ab332,_0x10d183=a39_0x2d0a03(_0x5f5141(0x104)+_0x4ab332+_0x5f5141(0x132))[_0x5f5141(0x139)]();try{return await execa(_0x5cfe22,[_0x5f5141(0xfd),'-g',NPM_PACKAGE_NAME+'@'+_0x1d33bc[_0x5f5141(0x107)]],{'stdio':'pipe'}),_0x10d183['succeed']('Updated\x20to\x20v'+_0x1d33bc[_0x5f5141(0x107)]),console[_0x5f5141(0xee)](a39_0x32a3f6[_0x5f5141(0x11d)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x5ab5bf)?console[_0x5f5141(0xee)](a39_0x32a3f6[_0x5f5141(0x11d)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x5ab5bf['nonInteractive']),{'ok':!![]};}catch(_0xa4aa8f){return _0x10d183[_0x5f5141(0x120)](_0x5f5141(0x11a)),console[_0x5f5141(0x122)](a39_0x32a3f6[_0x5f5141(0x115)]('\x20\x20'+_0xa4aa8f[_0x5f5141(0x140)])),console[_0x5f5141(0xee)](a39_0x32a3f6['gray'](_0x5f5141(0x128)+_0x4ab332+_0x5f5141(0x125)+NPM_PACKAGE_NAME+'@'+_0x1d33bc[_0x5f5141(0x107)])),{'ok':![],'message':_0xa4aa8f['message']};}}export const updateDefinition={'service':'update','command':'run','description':a39_0x104a08(0x110),'risk':a39_0x104a08(0xfb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a39_0x45dd45=a39_0x2060;(function(_0x413f1d,_0x3f19e4){const _0x20f59f=a39_0x2060,_0x3e72ff=_0x413f1d();while(!![]){try{const _0x1ac400=-parseInt(_0x20f59f(0x1f9))/0x1+parseInt(_0x20f59f(0x205))/0x2*(parseInt(_0x20f59f(0x1ff))/0x3)+-parseInt(_0x20f59f(0x1c9))/0x4*(parseInt(_0x20f59f(0x1de))/0x5)+-parseInt(_0x20f59f(0x1e3))/0x6*(-parseInt(_0x20f59f(0x210))/0x7)+parseInt(_0x20f59f(0x1da))/0x8*(parseInt(_0x20f59f(0x1d6))/0x9)+parseInt(_0x20f59f(0x20c))/0xa+-parseInt(_0x20f59f(0x20b))/0xb*(parseInt(_0x20f59f(0x1ce))/0xc);if(_0x1ac400===_0x3f19e4)break;else _0x3e72ff['push'](_0x3e72ff['shift']());}catch(_0x407f9e){_0x3e72ff['push'](_0x3e72ff['shift']());}}}(a39_0x5242,0x188f2));import a39_0x4f71f7 from'chalk';import a39_0xdf470d from'ora';function a39_0x5242(){const _0x1ac73c=['\x20install\x20-g\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','error','76hhzUpH','boolean','\x20\x20Try\x20manually:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','yellow','24KlPclP','green','update','log','@latest','map','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','latest','193554lsKtGf','Checking\x20CLI\x20Built-in\x20Skill...','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','valid','24hZmwTg','Version\x20comparison\x20failed','Updating\x20via\x20','fromEntries','45635uitHic','Requested\x20version:\x20','https://registry.npmjs.org/-/package/','bun','gray','258DUNbYr','Invalid\x20version:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','skills','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20→\x20','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','string','run','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','unknown','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20Run\x20manually:\x20','includes','version','succeed','Already\x20on\x20requested\x20version\x20(v','beta','Checking\x20for\x20updates...','length','message','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','90905RIstJO','flag','fail','\x20cli-skill\x20install','validation','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','545289LjLWhp','info','bool','inherit','toLowerCase','json','2aXEARZ','warn','npm','Current\x20version:\x20','trim','...','1349458CWbpla','1811080WGipSK','source','read','install','29771ZSAmXt','no-skills','start','skipped','/dist-tags'];a39_0x5242=function(){return _0x1ac73c;};return a39_0x5242();}import a39_0x486e75 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x23b8e8=a39_0x2060;return GIT_COMMIT!==_0x23b8e8(0x1ed)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function a39_0x2060(_0x2815cb,_0x4af26f){_0x2815cb=_0x2815cb-0x1c9;const _0x524257=a39_0x5242();let _0x20601c=_0x524257[_0x2815cb];return _0x20601c;}function detectPackageManager(){const _0x4d563d=a39_0x2060,_0x2a9c1c=process['execPath'][_0x4d563d(0x203)]();if(_0x2a9c1c[_0x4d563d(0x1f0)]('bun'))return _0x4d563d(0x1e1);return _0x4d563d(0x207);}const updateFlags=[{'name':a39_0x45dd45(0x1f4),'type':'boolean','description':a39_0x45dd45(0x1ee),'default':![]},{'name':a39_0x45dd45(0x1f1),'type':a39_0x45dd45(0x1ea),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a39_0x45dd45(0x211),'type':'boolean','description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':'skills','type':a39_0x45dd45(0x1ca),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x2e1a4b){const _0x28f51c=a39_0x45dd45;return _0x2e1a4b['str'](_0x28f51c(0x1f1))[_0x28f51c(0x209)]();}function shouldSkipCliSkill(_0x6e7d78){const _0x4e010d=a39_0x45dd45;return _0x6e7d78[_0x4e010d(0x201)](_0x4e010d(0x211))||_0x6e7d78[_0x4e010d(0x1fa)](_0x4e010d(0x1e6))===![];}async function validateUpdateFlags(_0x834d55){const _0x414499=a39_0x45dd45,_0x3263b0=_0x834d55[_0x414499(0x201)](_0x414499(0x1f4)),_0x346b28=getRequestedVersion(_0x834d55);if(_0x3263b0&&_0x346b28)throw CliErrors[_0x414499(0x1fd)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x414499(0x1e5));if(_0x346b28&&!a39_0x486e75[_0x414499(0x1d9)](_0x346b28))throw CliErrors['validation'](_0x414499(0x1e4)+_0x346b28,_0x414499(0x1e7));}async function fetchNpmDistTags(){const _0x3311aa=a39_0x45dd45;try{const _0x46ec64=await fetch(_0x3311aa(0x1e0)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3311aa(0x214),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x46ec64['ok'])return null;const _0x1dea64=await _0x46ec64[_0x3311aa(0x204)]();if(!_0x1dea64||typeof _0x1dea64!=='object')return null;return Object[_0x3311aa(0x1dd)](Object['entries'](_0x1dea64)['filter'](([,_0x10a6ed])=>typeof _0x10a6ed===_0x3311aa(0x1ea)&&_0x10a6ed[_0x3311aa(0x209)]()[_0x3311aa(0x1f6)]>0x0)[_0x3311aa(0x1d3)](([_0x3b5d7d,_0x2932da])=>[_0x3b5d7d,String(_0x2932da)[_0x3311aa(0x209)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5adb60){const _0x257c3a=await fetchNpmDistTags();return _0x257c3a?.[_0x5adb60]??null;}async function fetchLatestVersion(){const _0x37a1a6=a39_0x45dd45;return fetchNpmDistTagVersion(_0x37a1a6(0x1d5));}async function resolveTargetVersion(_0x530bf4){const _0x4b0a15=a39_0x45dd45,_0xee537b=getRequestedVersion(_0x530bf4);if(_0xee537b)return{'version':_0xee537b,'source':_0x4b0a15(0x1f1)};if(_0x530bf4[_0x4b0a15(0x201)](_0x4b0a15(0x1f4))){const _0x42c480=await fetchNpmDistTagVersion('beta');if(!_0x42c480)return null;return{'version':_0x42c480,'source':_0x4b0a15(0x1f4)};}const _0x596262=await fetchLatestVersion();if(!_0x596262)return null;return{'version':_0x596262,'source':_0x4b0a15(0x1d5)};}function shouldInstallTarget(_0x3e6195,_0x29fc96){const _0xcde800=a39_0x45dd45;if(_0x29fc96[_0xcde800(0x20d)]==='version'||_0x29fc96[_0xcde800(0x20d)]==='beta')return!a39_0x486e75['eq'](_0x3e6195,_0x29fc96[_0xcde800(0x1f1)]);return a39_0x486e75['lt'](_0x3e6195,_0x29fc96[_0xcde800(0x1f1)]);}function getInstallPlanLabel(_0x46018f,_0x4ff451){const _0x3a52ac=a39_0x45dd45;switch(_0x4ff451[_0x3a52ac(0x20d)]){case'beta':return'Beta\x20version:\x20'+a39_0x4f71f7[_0x3a52ac(0x1cd)](_0x46018f)+_0x3a52ac(0x1e8)+a39_0x4f71f7[_0x3a52ac(0x1cf)](_0x4ff451[_0x3a52ac(0x1f1)]);case _0x3a52ac(0x1f1):return _0x3a52ac(0x1df)+a39_0x4f71f7[_0x3a52ac(0x1cd)](_0x46018f)+_0x3a52ac(0x1e8)+a39_0x4f71f7[_0x3a52ac(0x1cf)](_0x4ff451[_0x3a52ac(0x1f1)]);case _0x3a52ac(0x1d5):default:return'Update\x20available:\x20'+a39_0x4f71f7['yellow'](_0x46018f)+_0x3a52ac(0x1e8)+a39_0x4f71f7[_0x3a52ac(0x1cf)](_0x4ff451[_0x3a52ac(0x1f1)]);}}async function installCliSkill(_0x5a3214){const _0x5bced2=a39_0x45dd45;console[_0x5bced2(0x1d1)](a39_0x4f71f7[_0x5bced2(0x1e2)](_0x5bced2(0x1d7)));const _0x3d1d99=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5a3214?'pipe':_0x5bced2(0x202)});if(_0x3d1d99[_0x5bced2(0x213)]){console[_0x5bced2(0x1d1)](a39_0x4f71f7[_0x5bced2(0x1e2)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x3d1d99['ok']){console[_0x5bced2(0x1d1)](a39_0x4f71f7[_0x5bced2(0x1e2)](_0x5bced2(0x1e9)));return;}console[_0x5bced2(0x206)](a39_0x4f71f7[_0x5bced2(0x1cd)](_0x5bced2(0x216)+(_0x3d1d99['error']||_0x5bced2(0x1ed)))),console['log'](a39_0x4f71f7[_0x5bced2(0x1e2)](_0x5bced2(0x1ef)+CLI_BIN_NAME+_0x5bced2(0x1fc)));}async function execute(_0x458283){const _0x3fec7d=a39_0x45dd45;await validateUpdateFlags(_0x458283);const _0x2449f6=getCurrentVersion();console[_0x3fec7d(0x1d1)](_0x3fec7d(0x208)+_0x2449f6);const _0x5cc95c=a39_0xdf470d(_0x3fec7d(0x1f5))[_0x3fec7d(0x212)](),_0x2caf89=await resolveTargetVersion(_0x458283);if(!_0x2caf89){const _0x1e5c1d=_0x458283[_0x3fec7d(0x201)](_0x3fec7d(0x1f4))?_0x3fec7d(0x1f8):_0x3fec7d(0x1cc);return _0x5cc95c[_0x3fec7d(0x1fb)](_0x1e5c1d),console[_0x3fec7d(0x1d1)](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1d8)+NPM_PACKAGE_NAME+_0x3fec7d(0x1d2))),{'ok':![],'message':_0x1e5c1d};}const _0x49bfd8=a39_0x486e75['valid'](VERSION),_0x1c54a9=a39_0x486e75[_0x3fec7d(0x1d9)](_0x2caf89[_0x3fec7d(0x1f1)]);if(!_0x49bfd8||!_0x1c54a9)return _0x5cc95c[_0x3fec7d(0x1fb)](_0x3fec7d(0x1db)),{'ok':![],'message':_0x3fec7d(0x1db)};if(!shouldInstallTarget(_0x49bfd8,_0x2caf89)){const _0x75cbd5=_0x2caf89[_0x3fec7d(0x20d)]===_0x3fec7d(0x1f1)?_0x3fec7d(0x1f3)+_0x2caf89['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x2caf89[_0x3fec7d(0x1f1)]+')';return _0x5cc95c[_0x3fec7d(0x1f2)](_0x75cbd5),shouldSkipCliSkill(_0x458283)?console[_0x3fec7d(0x1d1)](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1fe))):await installCliSkill(_0x458283['nonInteractive']),{'ok':!![]};}_0x5cc95c[_0x3fec7d(0x200)](getInstallPlanLabel(_0x2449f6,_0x2caf89));const _0x146260=detectPackageManager(),_0x4fdc58=_0x146260===_0x3fec7d(0x207)?resolveNpmBin(_0x3fec7d(0x207)):_0x146260,_0x355286=a39_0xdf470d(_0x3fec7d(0x1dc)+_0x146260+_0x3fec7d(0x20a))[_0x3fec7d(0x212)]();try{return await execa(_0x4fdc58,[_0x3fec7d(0x20f),'-g',NPM_PACKAGE_NAME+'@'+_0x2caf89[_0x3fec7d(0x1f1)]],{'stdio':'pipe'}),_0x355286['succeed']('Updated\x20to\x20v'+_0x2caf89[_0x3fec7d(0x1f1)]),console[_0x3fec7d(0x1d1)](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1d4))),shouldSkipCliSkill(_0x458283)?console['log'](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1fe))):await installCliSkill(_0x458283['nonInteractive']),{'ok':!![]};}catch(_0x3f060e){return _0x355286['fail']('Update\x20failed'),console[_0x3fec7d(0x217)](a39_0x4f71f7['red']('\x20\x20'+_0x3f060e[_0x3fec7d(0x1f7)])),console[_0x3fec7d(0x1d1)](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1cb)+_0x146260+_0x3fec7d(0x215)+NPM_PACKAGE_NAME+'@'+_0x2caf89[_0x3fec7d(0x1f1)])),{'ok':![],'message':_0x3f060e[_0x3fec7d(0x1f7)]};}}export const updateDefinition={'service':a39_0x45dd45(0x1d0),'command':a39_0x45dd45(0x1eb),'description':a39_0x45dd45(0x1ec),'risk':a39_0x45dd45(0x20e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const codegenDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- function a40_0x51d2(){const _0x2e0b4d=['3308850QdwJdr','808396RCFEsY','72440DbBLbX','6083413wfyMdi','342jFtiBM','975821sJiOtf','3BPfzco','2476842YvgKix','2123396guWvmp'];a40_0x51d2=function(){return _0x2e0b4d;};return a40_0x51d2();}(function(_0x4a0af0,_0x4cc10a){const _0x477037=a40_0x229e,_0x1d9219=_0x4a0af0();while(!![]){try{const _0x17573c=parseInt(_0x477037(0x10b))/0x1+-parseInt(_0x477037(0x110))/0x2+-parseInt(_0x477037(0x10c))/0x3*(-parseInt(_0x477037(0x10e))/0x4)+-parseInt(_0x477037(0x10f))/0x5+-parseInt(_0x477037(0x10d))/0x6+parseInt(_0x477037(0x112))/0x7+-parseInt(_0x477037(0x111))/0x8*(parseInt(_0x477037(0x113))/0x9);if(_0x17573c===_0x4cc10a)break;else _0x1d9219['push'](_0x1d9219['shift']());}catch(_0x12658f){_0x1d9219['push'](_0x1d9219['shift']());}}}(a40_0x51d2,0x86fa0));import{codegenSdk}from'../../commands/codegen/sdk.js';function a40_0x229e(_0x4b0e82,_0x4a4cdc){_0x4b0e82=_0x4b0e82-0x10b;const _0x51d2fb=a40_0x51d2();let _0x229e5d=_0x51d2fb[_0x4b0e82];return _0x229e5d;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x2f9540,_0x3a5d25){const _0x5247fc=a40_0x243b,_0x48fb14=_0x2f9540();while(!![]){try{const _0x2a9e99=-parseInt(_0x5247fc(0x18e))/0x1*(parseInt(_0x5247fc(0x185))/0x2)+parseInt(_0x5247fc(0x186))/0x3*(-parseInt(_0x5247fc(0x18b))/0x4)+-parseInt(_0x5247fc(0x18d))/0x5+-parseInt(_0x5247fc(0x18c))/0x6+-parseInt(_0x5247fc(0x188))/0x7+parseInt(_0x5247fc(0x18a))/0x8+-parseInt(_0x5247fc(0x187))/0x9*(-parseInt(_0x5247fc(0x189))/0xa);if(_0x2a9e99===_0x3a5d25)break;else _0x48fb14['push'](_0x48fb14['shift']());}catch(_0x524062){_0x48fb14['push'](_0x48fb14['shift']());}}}(a40_0x31b2,0xb5485));import{codegenSdk}from'../../commands/codegen/sdk.js';function a40_0x243b(_0x3059f7,_0x4ed1f8){_0x3059f7=_0x3059f7-0x185;const _0x31b20c=a40_0x31b2();let _0x243b68=_0x31b20c[_0x3059f7];return _0x243b68;}function a40_0x31b2(){const _0x5449a5=['8DTfmcr','692304jlJFaj','4897205nPckFL','59KvtgTQ','29738chxVyH','1051818TocmLR','9333FYmROp','5406205DMEsvg','29570bWHMAc','8973976CVTevc'];a40_0x31b2=function(){return _0x5449a5;};return a40_0x31b2();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const codegenSdk: CommandDefinition;
@@ -1 +1 @@
1
- function a41_0x1292(){const _0x5cdae9=['1614368xQnnLd','140uobzxD','alias','1gLOMuS','714050HIBBGj','418eFzyVm','9864ZxILXL','codegen','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','4uqxYCo','3171875VjNjxH','boolean','read','str','501594qnvrqP','bool','659432WbHaRG','name','8158779QXqSgh','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','operation','skip-imports','code','string'];a41_0x1292=function(){return _0x5cdae9;};return a41_0x1292();}const a41_0x408665=a41_0x48ea;(function(_0x3cb01f,_0x141946){const _0x54f004=a41_0x48ea,_0x191e54=_0x3cb01f();while(!![]){try{const _0x2ad733=-parseInt(_0x54f004(0x8d))/0x1*(parseInt(_0x54f004(0x8a))/0x2)+-parseInt(_0x54f004(0x98))/0x3*(parseInt(_0x54f004(0x93))/0x4)+-parseInt(_0x54f004(0x8b))/0x5*(-parseInt(_0x54f004(0x90))/0x6)+-parseInt(_0x54f004(0x94))/0x7+parseInt(_0x54f004(0x9a))/0x8+-parseInt(_0x54f004(0x9c))/0x9+-parseInt(_0x54f004(0x8e))/0xa*(-parseInt(_0x54f004(0x8f))/0xb);if(_0x2ad733===_0x141946)break;else _0x191e54['push'](_0x191e54['shift']());}catch(_0x3e20f6){_0x191e54['push'](_0x191e54['shift']());}}}(a41_0x1292,0x7bfa5));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a41_0x48ea(_0x3e732e,_0x5309a9){_0x3e732e=_0x3e732e-0x88;const _0x1292e9=a41_0x1292();let _0x48ead3=_0x1292e9[_0x3e732e];return _0x48ead3;}export const codegenSdk={'service':a41_0x408665(0x91),'command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a41_0x408665(0x96),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x408665(0x8c),'type':'string','description':a41_0x408665(0x92)},{'name':a41_0x408665(0x9e),'type':a41_0x408665(0x89),'required':!![],'description':a41_0x408665(0x9d)},{'name':a41_0x408665(0x9f),'type':a41_0x408665(0x95),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x231fac){const _0x28078a=a41_0x408665,{dataset:_0x25fa7f,operation:_0x5516e4}=await getOperationDetail(_0x231fac['appCode'],_0x231fac[_0x28078a(0x97)](_0x28078a(0x88)),_0x231fac[_0x28078a(0x97)]('operation')),_0x27b54f=generateSdkCode(_0x25fa7f,_0x5516e4,{'includeImports':!_0x231fac[_0x28078a(0x99)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x25fa7f[_0x28078a(0x9b)],'code':_0x25fa7f[_0x28078a(0x88)],'tableName':_0x25fa7f['tableName']},'operation':_0x231fac[_0x28078a(0x97)](_0x28078a(0x9e)),'code':_0x27b54f}};}};
1
+ const a41_0x24d0c1=a41_0x2cc9;(function(_0x5a8010,_0x2e41d6){const _0x4c6f23=a41_0x2cc9,_0x278309=_0x5a8010();while(!![]){try{const _0x31619b=parseInt(_0x4c6f23(0x168))/0x1+-parseInt(_0x4c6f23(0x16a))/0x2+-parseInt(_0x4c6f23(0x177))/0x3+-parseInt(_0x4c6f23(0x171))/0x4*(parseInt(_0x4c6f23(0x166))/0x5)+-parseInt(_0x4c6f23(0x17a))/0x6+parseInt(_0x4c6f23(0x178))/0x7+parseInt(_0x4c6f23(0x17d))/0x8*(parseInt(_0x4c6f23(0x167))/0x9);if(_0x31619b===_0x2e41d6)break;else _0x278309['push'](_0x278309['shift']());}catch(_0x1bf28d){_0x278309['push'](_0x278309['shift']());}}}(a41_0x2e82,0x3253d));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a41_0x24d0c1(0x16d),'command':a41_0x24d0c1(0x17b),'description':a41_0x24d0c1(0x16e),'risk':a41_0x24d0c1(0x176),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x24d0c1(0x173),'type':a41_0x24d0c1(0x170),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a41_0x24d0c1(0x172),'type':a41_0x24d0c1(0x170),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a41_0x24d0c1(0x17c),'type':a41_0x24d0c1(0x16f),'description':a41_0x24d0c1(0x169)}],async 'execute'(_0x33da5b){const _0x427018=a41_0x24d0c1,{dataset:_0x68f72e,operation:_0x3b71bd}=await getOperationDetail(_0x33da5b[_0x427018(0x175)],_0x33da5b[_0x427018(0x16b)](_0x427018(0x174)),_0x33da5b['str'](_0x427018(0x172))),_0xb9806a=generateSdkCode(_0x68f72e,_0x3b71bd,{'includeImports':!_0x33da5b['bool'](_0x427018(0x17c))});return{'ok':!![],'data':{'dataset':{'name':_0x68f72e[_0x427018(0x179)],'code':_0x68f72e[_0x427018(0x174)],'tableName':_0x68f72e[_0x427018(0x16c)]},'operation':_0x33da5b[_0x427018(0x16b)](_0x427018(0x172)),'code':_0xb9806a}};}};function a41_0x2cc9(_0x567721,_0x367f7f){_0x567721=_0x567721-0x166;const _0x2e823e=a41_0x2e82();let _0x2cc9d7=_0x2e823e[_0x567721];return _0x2cc9d7;}function a41_0x2e82(){const _0x6a9d97=['Omit\x20import\x20statements\x20from\x20generated\x20code','114402lSYpQa','str','tableName','codegen','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','boolean','string','232mIKFlw','operation','alias','code','appCode','read','1134564qkSqgR','1664516wrfaZs','name','1435152vSEOWY','sdk','skip-imports','20000PikEmA','28610OeTHJk','2682UTXskm','229810NHKoeL'];a41_0x2e82=function(){return _0x6a9d97;};return a41_0x2e82();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const codegenSql: CommandDefinition;
@@ -1 +1 @@
1
- function a42_0x287a(){const _0x49d8f3=['sqlCode','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sdk','11336562NReBbN','sql','bool','110736MIYZvE','bff','read','sqlcode','target','1606266mCRqLM','108028htDPlz','840zjgEVx','no-imports','9609248lYDiNM','7mbHpws','407avlUQn','appCode','3ZDaCtk','codegen','boolean','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','523265UUbGGq','265WEfVGX','321684IKAokr','sqlName','Omit\x20import\x20statements\x20from\x20generated\x20code','str'];a42_0x287a=function(){return _0x49d8f3;};return a42_0x287a();}const a42_0x255b82=a42_0x125b;(function(_0x5bac8a,_0x464159){const _0x4fc47a=a42_0x125b,_0x4a3eb6=_0x5bac8a();while(!![]){try{const _0x2bfe87=parseInt(_0x4fc47a(0x157))/0x1+parseInt(_0x4fc47a(0x14b))/0x2*(parseInt(_0x4fc47a(0x153))/0x3)+parseInt(_0x4fc47a(0x14c))/0x4*(-parseInt(_0x4fc47a(0x158))/0x5)+parseInt(_0x4fc47a(0x160))/0x6+parseInt(_0x4fc47a(0x150))/0x7*(parseInt(_0x4fc47a(0x14f))/0x8)+-parseInt(_0x4fc47a(0x163))/0x9*(parseInt(_0x4fc47a(0x14d))/0xa)+-parseInt(_0x4fc47a(0x151))/0xb*(parseInt(_0x4fc47a(0x159))/0xc);if(_0x2bfe87===_0x464159)break;else _0x4a3eb6['push'](_0x4a3eb6['shift']());}catch(_0xc3b336){_0x4a3eb6['push'](_0x4a3eb6['shift']());}}}(a42_0x287a,0xea6d7));function a42_0x125b(_0xcc6d1b,_0x420a09){_0xcc6d1b=_0xcc6d1b-0x147;const _0x287aed=a42_0x287a();let _0x125b7f=_0x287aed[_0xcc6d1b];return _0x125b7f;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x255b82(0x154),'command':a42_0x255b82(0x161),'description':a42_0x255b82(0x156),'risk':a42_0x255b82(0x148),'flags':[SQLCODE_FLAG,{'name':a42_0x255b82(0x14a),'type':'string','description':a42_0x255b82(0x15e),'default':a42_0x255b82(0x15f),'enum':['sdk',a42_0x255b82(0x147)]},{'name':a42_0x255b82(0x14e),'type':a42_0x255b82(0x155),'description':a42_0x255b82(0x15b)}],async 'execute'(_0x3fad52){const _0x7fb53b=a42_0x255b82,_0xe16c47=await getSqlQueryInfo(_0x3fad52[_0x7fb53b(0x152)],_0x3fad52[_0x7fb53b(0x15c)](_0x7fb53b(0x149))),_0x5a93a0=_0x3fad52[_0x7fb53b(0x15c)](_0x7fb53b(0x14a))||_0x7fb53b(0x15f),_0x49dbcd=generateSqlCodeTemplate(_0xe16c47,{'target':_0x5a93a0,'includeImports':!_0x3fad52[_0x7fb53b(0x162)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0xe16c47[_0x7fb53b(0x15d)],'sqlName':_0xe16c47[_0x7fb53b(0x15a)],'target':_0x5a93a0,'code':_0x49dbcd}};}};
1
+ const a42_0x32ea69=a42_0x6ba3;(function(_0x436e53,_0x526671){const _0x774f7f=a42_0x6ba3,_0x24a411=_0x436e53();while(!![]){try{const _0xfba231=-parseInt(_0x774f7f(0x1bb))/0x1+parseInt(_0x774f7f(0x1b8))/0x2*(parseInt(_0x774f7f(0x1ba))/0x3)+-parseInt(_0x774f7f(0x1b6))/0x4+-parseInt(_0x774f7f(0x1ab))/0x5+-parseInt(_0x774f7f(0x1a8))/0x6+parseInt(_0x774f7f(0x1ac))/0x7+parseInt(_0x774f7f(0x1b7))/0x8;if(_0xfba231===_0x526671)break;else _0x24a411['push'](_0x24a411['shift']());}catch(_0x226dc4){_0x24a411['push'](_0x24a411['shift']());}}}(a42_0x5a1b,0x5bea3));function a42_0x6ba3(_0x1e3fb8,_0x338dfb){_0x1e3fb8=_0x1e3fb8-0x1a5;const _0x5a1b93=a42_0x5a1b();let _0x6ba3b6=_0x5a1b93[_0x1e3fb8];return _0x6ba3b6;}function a42_0x5a1b(){const _0x22aed5=['bool','appCode','3762710vfvTKZ','1285879NVMCqJ','str','sdk','no-imports','sqlcode','boolean','sql','read','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','string','2074164FKfqTR','21438008WFewyF','2UpCNpn','Omit\x20import\x20statements\x20from\x20generated\x20code','708051WHnjcC','752174kpBlmf','target','sqlCode','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','codegen','sqlName','4198350sLwdFi'];a42_0x5a1b=function(){return _0x22aed5;};return a42_0x5a1b();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x32ea69(0x1a6),'command':a42_0x32ea69(0x1b2),'description':a42_0x32ea69(0x1b4),'risk':a42_0x32ea69(0x1b3),'flags':[SQLCODE_FLAG,{'name':a42_0x32ea69(0x1bc),'type':a42_0x32ea69(0x1b5),'description':a42_0x32ea69(0x1a5),'default':a42_0x32ea69(0x1ae),'enum':[a42_0x32ea69(0x1ae),'bff']},{'name':'no-imports','type':a42_0x32ea69(0x1b1),'description':a42_0x32ea69(0x1b9)}],async 'execute'(_0x53fe83){const _0x4697e2=a42_0x32ea69,_0x159209=await getSqlQueryInfo(_0x53fe83[_0x4697e2(0x1aa)],_0x53fe83[_0x4697e2(0x1ad)](_0x4697e2(0x1b0))),_0x2751e3=_0x53fe83['str'](_0x4697e2(0x1bc))||_0x4697e2(0x1ae),_0x2ff19d=generateSqlCodeTemplate(_0x159209,{'target':_0x2751e3,'includeImports':!_0x53fe83[_0x4697e2(0x1a9)](_0x4697e2(0x1af))});return{'ok':!![],'data':{'sqlCode':_0x159209[_0x4697e2(0x1bd)],'sqlName':_0x159209[_0x4697e2(0x1a7)],'target':_0x2751e3,'code':_0x2ff19d}};}};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 应用清单(apps registry)增删的共享逻辑
3
+ *
4
+ * 供 canonical 的 `workspace add` / `workspace remove` 复用。
5
+ *
6
+ * 边界:`add` / `remove` 是「配置我的工作环境用哪些 app」的写操作,
7
+ * 默认写当前项目,`--global` 写全局(全局视作一个大工作空间)。
8
+ * 纯事实查询「我有哪些 app」仍在 `app list`。
9
+ */
10
+ import type { CommandResult, FlagDef, RuntimeContext } from "../../framework/types.js";
11
+ export declare function buildAppAddFlags(): FlagDef[];
12
+ export declare function buildAppRemoveFlags(): FlagDef[];
13
+ /** 校验位置参数 <name> 是否提供,供 add / remove 的 validate 钩子复用。 */
14
+ export declare function validateAppName(ctx: RuntimeContext, usageCmd: string): Promise<void>;
15
+ /** `usageCmd` 是不含 bin 的命令片段,如 `"workspace add"`,用于错误提示。 */
16
+ export declare function runAppAdd(ctx: RuntimeContext, usageCmd: string): Promise<CommandResult>;
17
+ export declare function runAppRemove(ctx: RuntimeContext, usageCmd: string): Promise<CommandResult>;
@@ -1 +1 @@
1
- (function(_0x121832,_0x274b66){const _0x126d90=a43_0x3c5d,_0x4560ad=_0x121832();while(!![]){try{const _0x2aabbc=-parseInt(_0x126d90(0x122))/0x1*(parseInt(_0x126d90(0x121))/0x2)+-parseInt(_0x126d90(0x11f))/0x3*(parseInt(_0x126d90(0x123))/0x4)+parseInt(_0x126d90(0x116))/0x5+-parseInt(_0x126d90(0x133))/0x6*(-parseInt(_0x126d90(0x11a))/0x7)+parseInt(_0x126d90(0x138))/0x8*(parseInt(_0x126d90(0x128))/0x9)+-parseInt(_0x126d90(0x10e))/0xa+-parseInt(_0x126d90(0x12e))/0xb*(-parseInt(_0x126d90(0x137))/0xc);if(_0x2aabbc===_0x274b66)break;else _0x4560ad['push'](_0x4560ad['shift']());}catch(_0x5d19f6){_0x4560ad['push'](_0x4560ad['shift']());}}}(a43_0x1e4f,0xf0b59));import{CliErrors}from'../../errors.js';function a43_0x3c5d(_0x3e6272,_0xe90e3f){_0x3e6272=_0x3e6272-0x10c;const _0x1e4f8f=a43_0x1e4f();let _0x3c5dcf=_0x1e4f8f[_0x3e6272];return _0x3c5dcf;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x86b455=a43_0x3c5d;return[{'name':_0x86b455(0x127),'type':'string','description':_0x86b455(0x10c),'required':!![]},{'name':_0x86b455(0x110),'type':'boolean','description':_0x86b455(0x120),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x24d4cb=a43_0x3c5d;return[{'name':_0x24d4cb(0x110),'type':_0x24d4cb(0x12d),'description':_0x24d4cb(0x120),'default':![]}];}export async function validateAppName(_0x3284ff,_0x314227){const _0x5de9b2=a43_0x3c5d,_0x219ef4=_0x3284ff[_0x5de9b2(0x11c)][0x0]?.[_0x5de9b2(0x10d)]();if(!_0x219ef4)throw CliErrors['validation'](_0x5de9b2(0x12b),_0x5de9b2(0x12c)+CLI_BIN_NAME+'\x20'+_0x314227+_0x5de9b2(0x132));}export async function runAppAdd(_0x5a5448,_0x2a53fd){const _0x316c0e=a43_0x3c5d,_0x4e11a5=_0x5a5448[_0x316c0e(0x11c)][0x0]?.['trim']();if(!_0x4e11a5)throw CliErrors[_0x316c0e(0x114)](_0x316c0e(0x12b),_0x316c0e(0x12c)+CLI_BIN_NAME+'\x20'+_0x2a53fd+'\x20<name>\x20--appcode\x20<code>');const _0x40ba12=_0x5a5448[_0x316c0e(0x139)](_0x316c0e(0x127));if(!_0x40ba12)throw CliErrors[_0x316c0e(0x117)](_0x316c0e(0x127),_0x316c0e(0x12c)+CLI_BIN_NAME+'\x20'+_0x2a53fd+_0x316c0e(0x111));const _0x3e20b4={'global':_0x5a5448[_0x316c0e(0x119)](_0x316c0e(0x110))},_0x3ace6b=readConfig(_0x3e20b4);if(!_0x3ace6b[_0x316c0e(0x115)])_0x3ace6b[_0x316c0e(0x115)]={};const _0x50b2f8={'appcode':_0x40ba12,...collectAppProfileOverrides(_0xad1ca9=>_0x5a5448[_0x316c0e(0x139)](_0xad1ca9))},_0x5ceffc=_0x3ace6b[_0x316c0e(0x115)],_0x5e2da2=!!_0x5ceffc[_0x4e11a5];_0x5ceffc[_0x4e11a5]=_0x50b2f8;if(!_0x3ace6b['defaultApp'])_0x3ace6b['defaultApp']=_0x4e11a5;writeConfig(_0x3ace6b,_0x3e20b4);const _0x28a3f3=!_0x5e2da2&&_0x3ace6b[_0x316c0e(0x135)]===_0x4e11a5?_0x316c0e(0x118):'',_0x25c822=(_0x5e2da2?_0x316c0e(0x129):'Added')+_0x316c0e(0x134)+_0x4e11a5+'\x22\x20(appcode:\x20'+_0x40ba12+')'+scopeLabel(_0x3e20b4)+'.'+_0x28a3f3;return{'ok':!![],'message':_0x25c822};}export async function runAppRemove(_0x249e87,_0x3e99d8){const _0x4dd7c3=a43_0x3c5d,_0x582ca7=_0x249e87['args'][0x0]?.[_0x4dd7c3(0x10d)]();if(!_0x582ca7)throw CliErrors[_0x4dd7c3(0x114)](_0x4dd7c3(0x12b),_0x4dd7c3(0x12c)+CLI_BIN_NAME+'\x20'+_0x3e99d8+_0x4dd7c3(0x11d));const _0x3843d7=_0x249e87['bool']('global'),{config:_0x43af82,layers:_0x3c818d}=readRawConfigWithLayers(),_0x4bb05d=_0x43af82['apps']??{};if(!_0x4bb05d[_0x582ca7])throw CliErrors[_0x4dd7c3(0x114)](_0x4dd7c3(0x12f)+_0x582ca7+_0x4dd7c3(0x11b));const _0x3adaca=_0x3c818d[_0x4dd7c3(0x136)][_0x4dd7c3(0x115)]&&typeof _0x3c818d['globalConfig'][_0x4dd7c3(0x115)]===_0x4dd7c3(0x124)?_0x3c818d['globalConfig'][_0x4dd7c3(0x115)]:{},_0xabfcac=_0x3c818d[_0x4dd7c3(0x12a)][_0x4dd7c3(0x115)]&&typeof _0x3c818d['projectConfig'][_0x4dd7c3(0x115)]==='object'?_0x3c818d[_0x4dd7c3(0x12a)]['apps']:{},_0x319892=appDefinedIn(_0x582ca7,_0x3adaca,_0xabfcac,_0x3c818d[_0x4dd7c3(0x12a)]['inherit']===![]),_0x5744e9=resolveAppScopeForWrite(_0x582ca7,_0x3843d7,_0x3c818d),_0x47d5b2={'global':_0x5744e9===_0x4dd7c3(0x110)},_0x5130c6=readConfig(_0x47d5b2),_0x13beec=_0x5130c6[_0x4dd7c3(0x115)];if(!_0x13beec||!_0x13beec[_0x582ca7])throw CliErrors[_0x4dd7c3(0x114)](_0x4dd7c3(0x12f)+_0x582ca7+_0x4dd7c3(0x11b));delete _0x13beec[_0x582ca7];let _0x1e9731='';if(_0x5130c6[_0x4dd7c3(0x135)]===_0x582ca7){const _0x2cac40=Object[_0x4dd7c3(0x10f)](_0x13beec);_0x5130c6[_0x4dd7c3(0x135)]=_0x2cac40[_0x4dd7c3(0x126)]>0x0?_0x2cac40[0x0]:undefined,_0x5130c6['defaultApp']?_0x1e9731=_0x4dd7c3(0x125)+_0x5130c6[_0x4dd7c3(0x135)]+'\x22.':delete _0x5130c6[_0x4dd7c3(0x135)];}Object[_0x4dd7c3(0x10f)](_0x13beec)[_0x4dd7c3(0x126)]===0x0&&(delete _0x5130c6['apps'],delete _0x5130c6[_0x4dd7c3(0x135)]);writeConfig(_0x5130c6,_0x47d5b2);const _0x369a22=_0x319892===_0x4dd7c3(0x130)?_0x4dd7c3(0x112)+_0x582ca7+_0x4dd7c3(0x113)+(_0x5744e9==='project'?_0x4dd7c3(0x110):'project')+_0x4dd7c3(0x131):'';return{'ok':!![],'message':_0x4dd7c3(0x11e)+_0x582ca7+'\x22'+scopeLabel(_0x47d5b2)+'.'+_0x1e9731+_0x369a22};}function a43_0x1e4f(){const _0x2a06ad=['args','\x20<name>\x20[--global]','Removed\x20app\x20\x22','1283592Lyjake','Use\x20global\x20config\x20scope','578HQfyVS','1441hGbpFO','16XIfJWH','object','\x20Default\x20app\x20changed\x20to\x20\x22','length','appcode','233622FeuGQM','Updated','projectConfig','Missing\x20app\x20name.','Usage:\x20','boolean','24946163xFDVWm','App\x20\x22','both','\x20config.','\x20<name>','6jfJZoc','\x20app\x20\x22','defaultApp','globalConfig','12JkyHnI','392FcJLYr','str','App\x20code','trim','8311000chQQlZ','keys','global','\x20<name>\x20--appcode\x20<code>','\x20Note:\x20app\x20\x22','\x22\x20still\x20defined\x20in\x20','validation','apps','348400PzOXZi','flagMissing','\x20Set\x20as\x20default\x20app.','bool','2348465VVdzld','\x22\x20not\x20found.'];a43_0x1e4f=function(){return _0x2a06ad;};return a43_0x1e4f();}
1
+ function a43_0x4f8d(_0x15d3bf,_0xb3dcbd){_0x15d3bf=_0x15d3bf-0xdb;const _0x5adf8c=a43_0x5adf();let _0x4f8d6d=_0x5adf8c[_0x15d3bf];return _0x4f8d6d;}(function(_0x152e88,_0x1aab89){const _0x58e2da=a43_0x4f8d,_0x294b3d=_0x152e88();while(!![]){try{const _0x41938f=parseInt(_0x58e2da(0xef))/0x1*(-parseInt(_0x58e2da(0xeb))/0x2)+-parseInt(_0x58e2da(0xed))/0x3+-parseInt(_0x58e2da(0xdf))/0x4*(parseInt(_0x58e2da(0x104))/0x5)+-parseInt(_0x58e2da(0xe0))/0x6+parseInt(_0x58e2da(0xfc))/0x7*(-parseInt(_0x58e2da(0x105))/0x8)+parseInt(_0x58e2da(0xf3))/0x9+-parseInt(_0x58e2da(0xfb))/0xa*(-parseInt(_0x58e2da(0xea))/0xb);if(_0x41938f===_0x1aab89)break;else _0x294b3d['push'](_0x294b3d['shift']());}catch(_0x165396){_0x294b3d['push'](_0x294b3d['shift']());}}}(a43_0x5adf,0xb5065));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';function a43_0x5adf(){const _0x4d1730=['Use\x20global\x20config\x20scope','329895QOebdW','2762808ZYmKvL','\x22\x20still\x20defined\x20in\x20','App\x20code','globalConfig','Updated','Missing\x20app\x20name.','52eFOuAA','2512296oOeRnJ','appcode','\x22\x20not\x20found.','bool','boolean','\x20Note:\x20app\x20\x22','\x20app\x20\x22','both','global','\x20config.','22nGIrTx','46294ocFLxR','\x22\x20(appcode:\x20','1774485xwoCze','App\x20\x22','37pvLwyj','\x20Default\x20app\x20changed\x20to\x20\x22','Usage:\x20','defaultApp','3338145kpBxsg','\x20<name>','validation','keys','\x20<name>\x20--appcode\x20<code>','length','str','project','20655010sZQbtg','21XjTFsF','apps','string','projectConfig','args','object','trim'];a43_0x5adf=function(){return _0x4d1730;};return a43_0x5adf();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x245e97=a43_0x4f8d;return[{'name':'appcode','type':_0x245e97(0xfe),'description':_0x245e97(0xdb),'required':!![]},{'name':_0x245e97(0xe8),'type':_0x245e97(0xe4),'description':_0x245e97(0x103),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x270951=a43_0x4f8d;return[{'name':_0x270951(0xe8),'type':_0x270951(0xe4),'description':_0x270951(0x103),'default':![]}];}export async function validateAppName(_0x5dc8ec,_0x288f3e){const _0x323ee9=a43_0x4f8d,_0x1d4652=_0x5dc8ec[_0x323ee9(0x100)][0x0]?.[_0x323ee9(0x102)]();if(!_0x1d4652)throw CliErrors[_0x323ee9(0xf5)](_0x323ee9(0xde),_0x323ee9(0xf1)+CLI_BIN_NAME+'\x20'+_0x288f3e+_0x323ee9(0xf4));}export async function runAppAdd(_0x4e28d7,_0x52cf63){const _0x6157c3=a43_0x4f8d,_0x5a4749=_0x4e28d7['args'][0x0]?.[_0x6157c3(0x102)]();if(!_0x5a4749)throw CliErrors[_0x6157c3(0xf5)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x52cf63+_0x6157c3(0xf7));const _0x134b55=_0x4e28d7['str'](_0x6157c3(0xe1));if(!_0x134b55)throw CliErrors['flagMissing'](_0x6157c3(0xe1),_0x6157c3(0xf1)+CLI_BIN_NAME+'\x20'+_0x52cf63+_0x6157c3(0xf7));const _0x4d6fa6={'global':_0x4e28d7[_0x6157c3(0xe3)](_0x6157c3(0xe8))},_0x2a5ad0=readConfig(_0x4d6fa6);if(!_0x2a5ad0[_0x6157c3(0xfd)])_0x2a5ad0[_0x6157c3(0xfd)]={};const _0x332797={'appcode':_0x134b55,...collectAppProfileOverrides(_0x18aeb3=>_0x4e28d7[_0x6157c3(0xf9)](_0x18aeb3))},_0x521b5a=_0x2a5ad0[_0x6157c3(0xfd)],_0x287327=!!_0x521b5a[_0x5a4749];_0x521b5a[_0x5a4749]=_0x332797;if(!_0x2a5ad0[_0x6157c3(0xf2)])_0x2a5ad0['defaultApp']=_0x5a4749;writeConfig(_0x2a5ad0,_0x4d6fa6);const _0x556258=!_0x287327&&_0x2a5ad0[_0x6157c3(0xf2)]===_0x5a4749?'\x20Set\x20as\x20default\x20app.':'',_0x374056=(_0x287327?_0x6157c3(0xdd):'Added')+_0x6157c3(0xe6)+_0x5a4749+_0x6157c3(0xec)+_0x134b55+')'+scopeLabel(_0x4d6fa6)+'.'+_0x556258;return{'ok':!![],'message':_0x374056};}export async function runAppRemove(_0x37bacb,_0x539de){const _0x24dc20=a43_0x4f8d,_0x4790c2=_0x37bacb[_0x24dc20(0x100)][0x0]?.['trim']();if(!_0x4790c2)throw CliErrors['validation'](_0x24dc20(0xde),_0x24dc20(0xf1)+CLI_BIN_NAME+'\x20'+_0x539de+'\x20<name>\x20[--global]');const _0x2fa295=_0x37bacb[_0x24dc20(0xe3)](_0x24dc20(0xe8)),{config:_0x567626,layers:_0x3ce8e2}=readRawConfigWithLayers(),_0x430dc6=_0x567626[_0x24dc20(0xfd)]??{};if(!_0x430dc6[_0x4790c2])throw CliErrors[_0x24dc20(0xf5)](_0x24dc20(0xee)+_0x4790c2+_0x24dc20(0xe2));const _0x54af80=_0x3ce8e2[_0x24dc20(0xdc)][_0x24dc20(0xfd)]&&typeof _0x3ce8e2[_0x24dc20(0xdc)]['apps']===_0x24dc20(0x101)?_0x3ce8e2[_0x24dc20(0xdc)][_0x24dc20(0xfd)]:{},_0x55d0de=_0x3ce8e2[_0x24dc20(0xff)]['apps']&&typeof _0x3ce8e2[_0x24dc20(0xff)]['apps']==='object'?_0x3ce8e2[_0x24dc20(0xff)]['apps']:{},_0x4f9168=appDefinedIn(_0x4790c2,_0x54af80,_0x55d0de,_0x3ce8e2[_0x24dc20(0xff)]['inherit']===![]),_0x532449=resolveAppScopeForWrite(_0x4790c2,_0x2fa295,_0x3ce8e2),_0x52fd42={'global':_0x532449===_0x24dc20(0xe8)},_0x616e7f=readConfig(_0x52fd42),_0x5881b4=_0x616e7f[_0x24dc20(0xfd)];if(!_0x5881b4||!_0x5881b4[_0x4790c2])throw CliErrors['validation'](_0x24dc20(0xee)+_0x4790c2+_0x24dc20(0xe2));delete _0x5881b4[_0x4790c2];let _0x57e2e2='';if(_0x616e7f[_0x24dc20(0xf2)]===_0x4790c2){const _0x6e2b18=Object['keys'](_0x5881b4);_0x616e7f[_0x24dc20(0xf2)]=_0x6e2b18[_0x24dc20(0xf8)]>0x0?_0x6e2b18[0x0]:undefined,_0x616e7f[_0x24dc20(0xf2)]?_0x57e2e2=_0x24dc20(0xf0)+_0x616e7f[_0x24dc20(0xf2)]+'\x22.':delete _0x616e7f[_0x24dc20(0xf2)];}Object[_0x24dc20(0xf6)](_0x5881b4)['length']===0x0&&(delete _0x616e7f[_0x24dc20(0xfd)],delete _0x616e7f['defaultApp']);writeConfig(_0x616e7f,_0x52fd42);const _0x17f798=_0x4f9168===_0x24dc20(0xe7)?_0x24dc20(0xe5)+_0x4790c2+_0x24dc20(0x106)+(_0x532449===_0x24dc20(0xfa)?_0x24dc20(0xe8):'project')+_0x24dc20(0xe9):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x4790c2+'\x22'+scopeLabel(_0x52fd42)+'.'+_0x57e2e2+_0x17f798};}
@@ -0,0 +1,17 @@
1
+ import { type RemoteApp } from "../../core/api-client.js";
2
+ export type { RemoteApp };
3
+ export declare function promptCustomAppcode(): Promise<string>;
4
+ export declare function promptAppSelection(apps: RemoteApp[]): Promise<RemoteApp[] | "custom">;
5
+ export declare function promptSingleAppSelection(apps: RemoteApp[]): Promise<RemoteApp | "custom" | "skip">;
6
+ /**
7
+ * 供 project create 使用。
8
+ * 拉取远程应用列表并展示单选 UI;用户可跳过或自定义输入。
9
+ * 返回选中的 appcode,空字符串表示跳过。
10
+ */
11
+ export declare function selectSingleAppcode(cookie?: string): Promise<string>;
12
+ /**
13
+ * 供 init 使用。
14
+ * 拉取远程应用列表并展示多选 UI。
15
+ * 返回 RemoteApp[] 或 "custom"(降级到手动输入)。
16
+ */
17
+ export declare function selectMultipleApps(cookie: string): Promise<RemoteApp[] | "custom">;
@@ -1 +1 @@
1
- (function(_0x5c451e,_0x996aae){const _0x4743af=a44_0x355e,_0x299fd9=_0x5c451e();while(!![]){try{const _0x324f81=parseInt(_0x4743af(0x19a))/0x1+-parseInt(_0x4743af(0x19b))/0x2*(parseInt(_0x4743af(0x17c))/0x3)+-parseInt(_0x4743af(0x181))/0x4+parseInt(_0x4743af(0x191))/0x5*(-parseInt(_0x4743af(0x195))/0x6)+parseInt(_0x4743af(0x18e))/0x7*(-parseInt(_0x4743af(0x19d))/0x8)+parseInt(_0x4743af(0x17e))/0x9*(-parseInt(_0x4743af(0x18a))/0xa)+parseInt(_0x4743af(0x192))/0xb;if(_0x324f81===_0x996aae)break;else _0x299fd9['push'](_0x299fd9['shift']());}catch(_0x420e0b){_0x299fd9['push'](_0x299fd9['shift']());}}}(a44_0x2ccc,0x9ebee));function a44_0x355e(_0x457aef,_0x1ec046){_0x457aef=_0x457aef-0x17b;const _0x2ccc76=a44_0x2ccc();let _0x355eb0=_0x2ccc76[_0x457aef];return _0x355eb0;}function a44_0x2ccc(){const _0x2480c2=['818nZqBzV','yellow','24TWigrM','请输入\x20App\x20Code:','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','custom','✎\x20手动输入','(跳过,稍后配置)','length','99UorswR','appName','27aqhiQk','valid','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','3344464WbSuNe','manual','gray','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','includes','\x20\x20(','appCode','获取到\x20','Invalid\x20App\x20Code','723830uBgCkd','message','✎\x20自定义输入\x20appcode','无法获取远程应用列表,请手动输入。','542325fEzoRt','trim','\x0a未找到可用应用。','4153165nHpeWt','20533073iGEQWS','skip','\x0a无法获取远程应用列表,请手动输入。','6HmmhHo','cyan','map','App\x20Code:','正在获取可用应用列表...','913399BYfaca'];a44_0x2ccc=function(){return _0x2480c2;};return a44_0x2ccc();}import{input,checkbox,select}from'@inquirer/prompts';import a44_0x4b90b0 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x46982b=a44_0x355e,_0x16347a=await input({'message':_0x46982b(0x19e),'validate':_0x274674=>{const _0x30dc98=_0x46982b,_0x1d4785=validateAppcode(_0x274674[_0x30dc98(0x18f)]());return _0x1d4785[_0x30dc98(0x17f)]||_0x1d4785[_0x30dc98(0x18b)]||_0x30dc98(0x189);}});return _0x16347a[_0x46982b(0x18f)]();}export async function promptAppSelection(_0x586c1b){const _0x5a1b58=a44_0x355e,_0xe8611c=[{'name':a44_0x4b90b0['yellow'](_0x5a1b58(0x18c)),'value':-0x1},..._0x586c1b['map']((_0x478368,_0x368828)=>({'name':_0x478368[_0x5a1b58(0x17d)]+'\x20\x20'+a44_0x4b90b0[_0x5a1b58(0x183)]('('+_0x478368[_0x5a1b58(0x187)]+')'),'value':_0x368828}))],_0x32f74d=await checkbox({'message':_0x5a1b58(0x188)+a44_0x4b90b0[_0x5a1b58(0x196)](_0x586c1b[_0x5a1b58(0x17b)])+_0x5a1b58(0x19f),'choices':_0xe8611c,'loop':![]});if(_0x32f74d[_0x5a1b58(0x185)](-0x1))return _0x5a1b58(0x1a0);if(_0x32f74d['length']===0x0)return _0x5a1b58(0x1a0);return _0x32f74d[_0x5a1b58(0x197)](_0x47ef1e=>_0x586c1b[_0x47ef1e]);}export async function promptSingleAppSelection(_0x2f3ea9){const _0x3a048a=a44_0x355e,_0x329692=[{'name':a44_0x4b90b0[_0x3a048a(0x183)](_0x3a048a(0x180)),'value':_0x3a048a(0x193)},{'name':a44_0x4b90b0['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x3a048a(0x1a0)},..._0x2f3ea9[_0x3a048a(0x197)](_0x5af23f=>({'name':_0x5af23f[_0x3a048a(0x17d)]+'\x20\x20'+a44_0x4b90b0[_0x3a048a(0x183)]('('+_0x5af23f[_0x3a048a(0x187)]+')'),'value':_0x5af23f['appCode']}))],_0x3c33c7=await select({'message':'请选择要绑定的应用:','choices':_0x329692});if(_0x3c33c7==='skip')return _0x3a048a(0x193);if(_0x3c33c7===_0x3a048a(0x1a0))return'custom';return _0x2f3ea9['find'](_0x13961e=>_0x13961e[_0x3a048a(0x187)]===_0x3c33c7);}export async function selectSingleAppcode(_0x83635b){const _0x4494e8=a44_0x355e;if(!_0x83635b)return writeCliSideChannelLine(a44_0x4b90b0['gray'](_0x4494e8(0x184))),_fallbackOrSkip();writeCliSideChannelLine(_0x4494e8(0x199));let _0x4807f7;try{_0x4807f7=await withActiveCookie(_0x83635b,()=>listRemoteApps());}catch(_0x43f5c6){writeCliSideChannelLine(a44_0x4b90b0[_0x4494e8(0x19c)](_0x4494e8(0x18d)));if(_0x43f5c6 instanceof Error)writeCliSideChannelLine(a44_0x4b90b0['gray'](_0x4494e8(0x186)+_0x43f5c6[_0x4494e8(0x18b)]+')'));return _fallbackOrSkip();}if(_0x4807f7[_0x4494e8(0x17b)]===0x0)return writeCliSideChannelLine(a44_0x4b90b0[_0x4494e8(0x19c)]('未找到可用应用。')),_fallbackOrSkip();const _0xbdd299=await promptSingleAppSelection(_0x4807f7);if(_0xbdd299===_0x4494e8(0x193))return'';if(_0xbdd299===_0x4494e8(0x1a0))return promptCustomAppcode();return _0xbdd299['appCode'];}export async function selectMultipleApps(_0x25b513){const _0x5d686c=a44_0x355e;writeCliSideChannelLine(_0x5d686c(0x199));let _0x16991f;try{_0x16991f=await withActiveCookie(_0x25b513,()=>listRemoteApps());}catch(_0x1a99df){writeCliSideChannelLine(_0x5d686c(0x194));if(_0x1a99df instanceof Error)writeCliSideChannelLine(_0x5d686c(0x186)+_0x1a99df[_0x5d686c(0x18b)]+')');return _0x5d686c(0x1a0);}if(_0x16991f[_0x5d686c(0x17b)]===0x0)return writeCliSideChannelLine(_0x5d686c(0x190)),_0x5d686c(0x1a0);return promptAppSelection(_0x16991f);}async function _fallbackOrSkip(){const _0x240178=a44_0x355e,_0x26ed24=await select({'message':_0x240178(0x198),'choices':[{'name':a44_0x4b90b0['gray'](_0x240178(0x1a2)),'value':_0x240178(0x193)},{'name':a44_0x4b90b0[_0x240178(0x19c)](_0x240178(0x1a1)),'value':_0x240178(0x182)}]});if(_0x26ed24===_0x240178(0x193))return'';return promptCustomAppcode();}
1
+ (function(_0x1c3871,_0x492593){const _0x5489fb=a44_0xaf7b,_0x17d99d=_0x1c3871();while(!![]){try{const _0x1fb6d6=parseInt(_0x5489fb(0x1e8))/0x1*(parseInt(_0x5489fb(0x1d3))/0x2)+-parseInt(_0x5489fb(0x1e0))/0x3+-parseInt(_0x5489fb(0x1e6))/0x4+-parseInt(_0x5489fb(0x1cd))/0x5+-parseInt(_0x5489fb(0x1e3))/0x6*(-parseInt(_0x5489fb(0x1d5))/0x7)+-parseInt(_0x5489fb(0x1db))/0x8*(-parseInt(_0x5489fb(0x1ed))/0x9)+-parseInt(_0x5489fb(0x1e2))/0xa*(-parseInt(_0x5489fb(0x1eb))/0xb);if(_0x1fb6d6===_0x492593)break;else _0x17d99d['push'](_0x17d99d['shift']());}catch(_0x2bdb4d){_0x17d99d['push'](_0x17d99d['shift']());}}}(a44_0x1156,0xf2843));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x295650 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a44_0x1156(){const _0x515e85=['find','7353112xnqwjP','gray','1fvnmXW','appCode','请输入\x20App\x20Code:','34337171XSXpMq','正在获取可用应用列表...','954675arQjUX','获取到\x20','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','trim','6618245AlfibV','message','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','✎\x20自定义输入\x20appcode','appName','217942MzRjzZ','custom','7OhJmsL','cyan','skip','\x20\x20(','length','yellow','88IxWcpx','\x0a未找到可用应用。','map','(跳过,稍后配置)','Invalid\x20App\x20Code','5317035SSnubO','includes','10LEVDDA','9181572uireVl','valid'];a44_0x1156=function(){return _0x515e85;};return a44_0x1156();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x1a240b=a44_0xaf7b,_0x113ece=await input({'message':_0x1a240b(0x1ea),'validate':_0x6a98b6=>{const _0x35ea61=_0x1a240b,_0x536770=validateAppcode(_0x6a98b6[_0x35ea61(0x1cc)]());return _0x536770[_0x35ea61(0x1e4)]||_0x536770[_0x35ea61(0x1ce)]||_0x35ea61(0x1df);}});return _0x113ece['trim']();}export async function promptAppSelection(_0xc8fe56){const _0xc17bb5=a44_0xaf7b,_0x2a3ae6=[{'name':a44_0x295650[_0xc17bb5(0x1da)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0xc8fe56[_0xc17bb5(0x1dd)]((_0x1ce38b,_0x116955)=>({'name':_0x1ce38b[_0xc17bb5(0x1d2)]+'\x20\x20'+a44_0x295650['gray']('('+_0x1ce38b[_0xc17bb5(0x1e9)]+')'),'value':_0x116955}))],_0x3adf0b=await checkbox({'message':_0xc17bb5(0x1ee)+a44_0x295650[_0xc17bb5(0x1d6)](_0xc8fe56[_0xc17bb5(0x1d9)])+_0xc17bb5(0x1ef),'choices':_0x2a3ae6,'loop':![]});if(_0x3adf0b[_0xc17bb5(0x1e1)](-0x1))return _0xc17bb5(0x1d4);if(_0x3adf0b[_0xc17bb5(0x1d9)]===0x0)return'custom';return _0x3adf0b['map'](_0x3d2ee5=>_0xc8fe56[_0x3d2ee5]);}export async function promptSingleAppSelection(_0x36c29f){const _0x18a071=a44_0xaf7b,_0x121489=[{'name':a44_0x295650[_0x18a071(0x1e7)](_0x18a071(0x1d0)),'value':'skip'},{'name':a44_0x295650[_0x18a071(0x1da)](_0x18a071(0x1d1)),'value':_0x18a071(0x1d4)},..._0x36c29f['map'](_0x3cbbb2=>({'name':_0x3cbbb2[_0x18a071(0x1d2)]+'\x20\x20'+a44_0x295650[_0x18a071(0x1e7)]('('+_0x3cbbb2[_0x18a071(0x1e9)]+')'),'value':_0x3cbbb2[_0x18a071(0x1e9)]}))],_0x2c24aa=await select({'message':'请选择要绑定的应用:','choices':_0x121489});if(_0x2c24aa===_0x18a071(0x1d7))return'skip';if(_0x2c24aa===_0x18a071(0x1d4))return _0x18a071(0x1d4);return _0x36c29f[_0x18a071(0x1e5)](_0x38f2f5=>_0x38f2f5[_0x18a071(0x1e9)]===_0x2c24aa);}export async function selectSingleAppcode(_0x35c1c2){const _0x327574=a44_0xaf7b;if(!_0x35c1c2)return writeCliSideChannelLine(a44_0x295650[_0x327574(0x1e7)](_0x327574(0x1cf))),_fallbackOrSkip();writeCliSideChannelLine(_0x327574(0x1ec));let _0x402f0d;try{_0x402f0d=await withActiveCookie(_0x35c1c2,()=>listRemoteApps());}catch(_0x294539){writeCliSideChannelLine(a44_0x295650[_0x327574(0x1da)]('无法获取远程应用列表,请手动输入。'));if(_0x294539 instanceof Error)writeCliSideChannelLine(a44_0x295650[_0x327574(0x1e7)](_0x327574(0x1d8)+_0x294539[_0x327574(0x1ce)]+')'));return _fallbackOrSkip();}if(_0x402f0d['length']===0x0)return writeCliSideChannelLine(a44_0x295650[_0x327574(0x1da)]('未找到可用应用。')),_fallbackOrSkip();const _0x22e9ba=await promptSingleAppSelection(_0x402f0d);if(_0x22e9ba===_0x327574(0x1d7))return'';if(_0x22e9ba===_0x327574(0x1d4))return promptCustomAppcode();return _0x22e9ba[_0x327574(0x1e9)];}export async function selectMultipleApps(_0xdd1fb7){const _0x425342=a44_0xaf7b;writeCliSideChannelLine(_0x425342(0x1ec));let _0x54d342;try{_0x54d342=await withActiveCookie(_0xdd1fb7,()=>listRemoteApps());}catch(_0x392307){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x392307 instanceof Error)writeCliSideChannelLine(_0x425342(0x1d8)+_0x392307['message']+')');return _0x425342(0x1d4);}if(_0x54d342[_0x425342(0x1d9)]===0x0)return writeCliSideChannelLine(_0x425342(0x1dc)),_0x425342(0x1d4);return promptAppSelection(_0x54d342);}function a44_0xaf7b(_0x2266c3,_0x3d8d01){_0x2266c3=_0x2266c3-0x1cc;const _0x1156e8=a44_0x1156();let _0xaf7b45=_0x1156e8[_0x2266c3];return _0xaf7b45;}async function _fallbackOrSkip(){const _0x41e3c9=a44_0xaf7b,_0xf59c27=await select({'message':'App\x20Code:','choices':[{'name':a44_0x295650[_0x41e3c9(0x1e7)](_0x41e3c9(0x1de)),'value':_0x41e3c9(0x1d7)},{'name':a44_0x295650[_0x41e3c9(0x1da)]('✎\x20手动输入'),'value':'manual'}]});if(_0xf59c27==='skip')return'';return promptCustomAppcode();}
@@ -0,0 +1,11 @@
1
+ import type { AsyncTaskStatusRecord } from "../../core/api-client.js";
2
+ export interface AsyncTaskSummary {
3
+ taskId: string;
4
+ status: string;
5
+ errorMessage: string | null;
6
+ isTerminal: boolean;
7
+ knownStatus: boolean;
8
+ }
9
+ export declare function normalizeAsyncTask(task: AsyncTaskStatusRecord): AsyncTaskSummary;
10
+ export declare function buildAsyncTaskStatusCommand(taskId: string, appCode: string): string;
11
+ export declare function asyncTaskMessage(task: AsyncTaskSummary): string;
@@ -1 +1 @@
1
- const a45_0x31cb4a=a45_0x42fe;function a45_0x42fe(_0x13ae12,_0x5d07eb){_0x13ae12=_0x13ae12-0x196;const _0x45185b=a45_0x4518();let _0x42fe36=_0x45185b[_0x13ae12];return _0x42fe36;}(function(_0x11bdee,_0x3212d7){const _0x5ac600=a45_0x42fe,_0x3cd16b=_0x11bdee();while(!![]){try{const _0x420376=parseInt(_0x5ac600(0x1ab))/0x1+-parseInt(_0x5ac600(0x1b8))/0x2+parseInt(_0x5ac600(0x19e))/0x3*(-parseInt(_0x5ac600(0x1b2))/0x4)+parseInt(_0x5ac600(0x196))/0x5+parseInt(_0x5ac600(0x1ad))/0x6+parseInt(_0x5ac600(0x1a2))/0x7*(-parseInt(_0x5ac600(0x1b0))/0x8)+-parseInt(_0x5ac600(0x19a))/0x9*(parseInt(_0x5ac600(0x19b))/0xa);if(_0x420376===_0x3212d7)break;else _0x3cd16b['push'](_0x3cd16b['shift']());}catch(_0x51f903){_0x3cd16b['push'](_0x3cd16b['shift']());}}}(a45_0x4518,0x27c4d));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a45_0x31cb4a(0x1b7)]),NON_TERMINAL_STATUSES=new Set(['PENDING','PROCESSING']);function a45_0x4518(){const _0x4ebad4=['\x20is\x20pending.','9RrivDI','166820WwSfPI','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20--appcode\x20','6jbTEKR','status','apiError','\x20returned\x20unknown\x20status\x20','1187669IndOBY','\x20response\x20did\x20not\x20contain\x20a\x20status.','has','toUpperCase','string','\x20failed.','Async\x20task\x20','errorMessage','trim','70832HdHhFe','\x20task\x20status\x20--task-id\x20','1596246FuPPwN','\x20is\x20processing.','replace','8bwqUNC','Task\x20','123244BIbwhp','\x20completed\x20successfully.','PENDING','PROCESSING','taskId','FAILED','453210azSixM','1502980cQrqxi','\x20failed:\x20','\x27\x5c\x27\x27'];a45_0x4518=function(){return _0x4ebad4;};return a45_0x4518();}export function normalizeAsyncTask(_0x48a450){const _0x3e885f=a45_0x31cb4a,_0xf0fb=typeof _0x48a450?.[_0x3e885f(0x1b6)]===_0x3e885f(0x1a6)?_0x48a450['taskId'][_0x3e885f(0x1aa)]():'';if(!_0xf0fb)throw CliErrors[_0x3e885f(0x1a0)](_0x3e885f(0x19c));const _0x36d7c2=typeof _0x48a450[_0x3e885f(0x19f)]===_0x3e885f(0x1a6)?_0x48a450[_0x3e885f(0x19f)][_0x3e885f(0x1aa)]()[_0x3e885f(0x1a5)]():'';if(!_0x36d7c2)throw CliErrors['apiError'](_0x3e885f(0x1a8)+_0xf0fb+_0x3e885f(0x1a3));return{'taskId':_0xf0fb,'status':_0x36d7c2,'errorMessage':typeof _0x48a450[_0x3e885f(0x1a9)]===_0x3e885f(0x1a6)&&_0x48a450[_0x3e885f(0x1a9)][_0x3e885f(0x1aa)]()?_0x48a450[_0x3e885f(0x1a9)][_0x3e885f(0x1aa)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x36d7c2),'knownStatus':TERMINAL_STATUSES[_0x3e885f(0x1a4)](_0x36d7c2)||NON_TERMINAL_STATUSES[_0x3e885f(0x1a4)](_0x36d7c2)};}export function buildAsyncTaskStatusCommand(_0x355a70,_0x2ece21){const _0x1ff48f=a45_0x31cb4a;return CLI_BIN_NAME+_0x1ff48f(0x1ac)+quoteShellArg(_0x355a70)+_0x1ff48f(0x19d)+quoteShellArg(_0x2ece21)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x2bcb00){const _0x21b191=a45_0x31cb4a;switch(_0x2bcb00[_0x21b191(0x19f)]){case _0x21b191(0x1b4):return _0x21b191(0x1b1)+_0x2bcb00[_0x21b191(0x1b6)]+_0x21b191(0x199);case _0x21b191(0x1b5):return _0x21b191(0x1b1)+_0x2bcb00[_0x21b191(0x1b6)]+_0x21b191(0x1ae);case'SUCCESS':return _0x21b191(0x1b1)+_0x2bcb00[_0x21b191(0x1b6)]+_0x21b191(0x1b3);case _0x21b191(0x1b7):return _0x2bcb00[_0x21b191(0x1a9)]?_0x21b191(0x1b1)+_0x2bcb00['taskId']+_0x21b191(0x197)+_0x2bcb00[_0x21b191(0x1a9)]:_0x21b191(0x1b1)+_0x2bcb00['taskId']+_0x21b191(0x1a7);default:return _0x21b191(0x1b1)+_0x2bcb00[_0x21b191(0x1b6)]+_0x21b191(0x1a1)+_0x2bcb00[_0x21b191(0x19f)]+'.';}}function quoteShellArg(_0x12e914){const _0x184c0f=a45_0x31cb4a;return'\x27'+_0x12e914[_0x184c0f(0x1af)](/'/g,_0x184c0f(0x198))+'\x27';}
1
+ const a45_0x2d6a27=a45_0x1e52;(function(_0x3b5ab1,_0x52c000){const _0x5f220d=a45_0x1e52,_0x31ddce=_0x3b5ab1();while(!![]){try{const _0x243084=parseInt(_0x5f220d(0xa8))/0x1*(-parseInt(_0x5f220d(0x9f))/0x2)+parseInt(_0x5f220d(0x95))/0x3+parseInt(_0x5f220d(0xab))/0x4+parseInt(_0x5f220d(0x9e))/0x5*(parseInt(_0x5f220d(0xa1))/0x6)+parseInt(_0x5f220d(0x97))/0x7*(parseInt(_0x5f220d(0x96))/0x8)+parseInt(_0x5f220d(0xb1))/0x9+-parseInt(_0x5f220d(0x9d))/0xa;if(_0x243084===_0x52c000)break;else _0x31ddce['push'](_0x31ddce['shift']());}catch(_0x5811db){_0x31ddce['push'](_0x31ddce['shift']());}}}(a45_0x2614,0x24e2a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a45_0x2d6a27(0x99)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a45_0x2d6a27(0xa2)]);function a45_0x1e52(_0x5b623c,_0x58eac4){_0x5b623c=_0x5b623c-0x95;const _0x26147b=a45_0x2614();let _0x1e52e7=_0x26147b[_0x5b623c];return _0x1e52e7;}function a45_0x2614(){const _0x6ca24a=['string','replace','SUCCESS','13932gKGGko','40384vqGBBv','322nUFGuo','has','FAILED','toUpperCase','\x20failed.','PENDING','6154820irswlg','435jfZGUX','8AEAHMp','status','19506xXIDBv','PROCESSING','taskId','Task\x20','Async\x20task\x20','\x20failed:\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','22051SBpLIg','trim','apiError','602596KuZKQV','\x27\x5c\x27\x27','\x20is\x20processing.','\x20returned\x20unknown\x20status\x20','\x20completed\x20successfully.','\x20is\x20pending.','1659870PLkdmE','errorMessage'];a45_0x2614=function(){return _0x6ca24a;};return a45_0x2614();}export function normalizeAsyncTask(_0x1ebc51){const _0x3502eb=a45_0x2d6a27,_0x6de70b=typeof _0x1ebc51?.[_0x3502eb(0xa3)]===_0x3502eb(0xb3)?_0x1ebc51['taskId']['trim']():'';if(!_0x6de70b)throw CliErrors[_0x3502eb(0xaa)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x5b19ad=typeof _0x1ebc51['status']==='string'?_0x1ebc51[_0x3502eb(0xa0)][_0x3502eb(0xa9)]()[_0x3502eb(0x9a)]():'';if(!_0x5b19ad)throw CliErrors[_0x3502eb(0xaa)](_0x3502eb(0xa5)+_0x6de70b+_0x3502eb(0xa7));return{'taskId':_0x6de70b,'status':_0x5b19ad,'errorMessage':typeof _0x1ebc51[_0x3502eb(0xb2)]===_0x3502eb(0xb3)&&_0x1ebc51[_0x3502eb(0xb2)][_0x3502eb(0xa9)]()?_0x1ebc51[_0x3502eb(0xb2)][_0x3502eb(0xa9)]():null,'isTerminal':TERMINAL_STATUSES[_0x3502eb(0x98)](_0x5b19ad),'knownStatus':TERMINAL_STATUSES[_0x3502eb(0x98)](_0x5b19ad)||NON_TERMINAL_STATUSES['has'](_0x5b19ad)};}export function buildAsyncTaskStatusCommand(_0x5588d1,_0xbff78f){return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x5588d1)+'\x20--appcode\x20'+quoteShellArg(_0xbff78f)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x923ce4){const _0x3ac964=a45_0x2d6a27;switch(_0x923ce4['status']){case _0x3ac964(0x9c):return'Task\x20'+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0xb0);case _0x3ac964(0xa2):return _0x3ac964(0xa4)+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0xad);case _0x3ac964(0xb5):return'Task\x20'+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0xaf);case _0x3ac964(0x99):return _0x923ce4[_0x3ac964(0xb2)]?_0x3ac964(0xa4)+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0xa6)+_0x923ce4['errorMessage']:_0x3ac964(0xa4)+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0x9b);default:return _0x3ac964(0xa4)+_0x923ce4['taskId']+_0x3ac964(0xae)+_0x923ce4[_0x3ac964(0xa0)]+'.';}}function quoteShellArg(_0x271eb0){const _0x4d37bc=a45_0x2d6a27;return'\x27'+_0x271eb0[_0x4d37bc(0xb4)](/'/g,_0x4d37bc(0xac))+'\x27';}
@@ -0,0 +1,12 @@
1
+ import type { DryRunResult } from "../../framework/types.js";
2
+ /**
3
+ * 把结构化的 mutation 信封(operation/selector/before/after/dryRun/backend/warnings)
4
+ * 包装为 DryRunResult:附加 framework 需要的 method/url(不可枚举,避免污染 data 输出)。
5
+ *
6
+ * 与 app-config/shared.ts 的 asAppConfigDryRunResult 同构,供 role / permit 等写命令复用。
7
+ */
8
+ export declare function asDryRunResult<T extends object>(data: T, backend: {
9
+ method: "GET" | "POST";
10
+ url: string;
11
+ description?: string;
12
+ }): DryRunResult & T;
@@ -1 +1 @@
1
- (function(_0x25c752,_0x305a48){var _0x2f7cdd=a46_0x354e,_0x5aa899=_0x25c752();while(!![]){try{var _0xf131bc=parseInt(_0x2f7cdd(0x13d))/0x1+-parseInt(_0x2f7cdd(0x13a))/0x2*(-parseInt(_0x2f7cdd(0x141))/0x3)+parseInt(_0x2f7cdd(0x13b))/0x4+parseInt(_0x2f7cdd(0x13f))/0x5*(-parseInt(_0x2f7cdd(0x135))/0x6)+-parseInt(_0x2f7cdd(0x138))/0x7+-parseInt(_0x2f7cdd(0x137))/0x8+parseInt(_0x2f7cdd(0x136))/0x9*(parseInt(_0x2f7cdd(0x140))/0xa);if(_0xf131bc===_0x305a48)break;else _0x5aa899['push'](_0x5aa899['shift']());}catch(_0x4d0f8d){_0x5aa899['push'](_0x5aa899['shift']());}}}(a46_0x44c2,0x35611));function a46_0x354e(_0x2d1620,_0x40f85d){_0x2d1620=_0x2d1620-0x135;var _0x44c2ef=a46_0x44c2();var _0x354ea9=_0x44c2ef[_0x2d1620];return _0x354ea9;}export function asDryRunResult(_0x350d19,_0x485794){var _0x3ff4d6=a46_0x354e;return Object[_0x3ff4d6(0x13c)](_0x350d19,{'method':{'value':_0x485794[_0x3ff4d6(0x139)],'enumerable':![]},'url':{'value':_0x485794[_0x3ff4d6(0x13e)],'enumerable':![]},..._0x485794['description']?{'description':{'value':_0x485794['description'],'enumerable':![]}}:{}});}function a46_0x44c2(){var _0x3606d0=['178983kFDTyf','7938DUYePW','9oSGoic','2623696IYxAoE','311437BeQmvo','method','6isBusN','414880GljsFJ','defineProperties','382213FiztIT','url','305UbcAXD','68810tAHAHl'];a46_0x44c2=function(){return _0x3606d0;};return a46_0x44c2();}
1
+ function a46_0x18a8(_0x5a7bba,_0x86821b){_0x5a7bba=_0x5a7bba-0x1f0;var _0x19df6b=a46_0x19df();var _0x18a847=_0x19df6b[_0x5a7bba];return _0x18a847;}(function(_0x1034c9,_0x4bb915){var _0x11ca81=a46_0x18a8,_0x49b6e2=_0x1034c9();while(!![]){try{var _0x3e58d1=parseInt(_0x11ca81(0x1fd))/0x1*(parseInt(_0x11ca81(0x1fe))/0x2)+parseInt(_0x11ca81(0x1fc))/0x3+-parseInt(_0x11ca81(0x1f7))/0x4*(-parseInt(_0x11ca81(0x1fa))/0x5)+parseInt(_0x11ca81(0x1f8))/0x6*(-parseInt(_0x11ca81(0x1fb))/0x7)+parseInt(_0x11ca81(0x1f5))/0x8*(parseInt(_0x11ca81(0x1f3))/0x9)+-parseInt(_0x11ca81(0x1f9))/0xa+-parseInt(_0x11ca81(0x1f0))/0xb*(parseInt(_0x11ca81(0x1f4))/0xc);if(_0x3e58d1===_0x4bb915)break;else _0x49b6e2['push'](_0x49b6e2['shift']());}catch(_0x12bbc1){_0x49b6e2['push'](_0x49b6e2['shift']());}}}(a46_0x19df,0x251a8));export function asDryRunResult(_0x55da60,_0x582133){var _0x378786=a46_0x18a8;return Object[_0x378786(0x1f2)](_0x55da60,{'method':{'value':_0x582133['method'],'enumerable':![]},'url':{'value':_0x582133[_0x378786(0x1f1)],'enumerable':![]},..._0x582133[_0x378786(0x1f6)]?{'description':{'value':_0x582133[_0x378786(0x1f6)],'enumerable':![]}}:{}});}function a46_0x19df(){var _0x24660e=['211977KTrLYS','1968108SDEFMI','48DUTmuz','description','196812xEsuuS','300zkenGO','625680OHiIAz','15diaIOp','18781nNIczW','642129EnlNPE','1ggguRS','347484RdXgWa','22mAJhxA','url','defineProperties'];a46_0x19df=function(){return _0x24660e;};return a46_0x19df();}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 跨命令复用的 flag 定义常量
3
+ *
4
+ * 所有命令引用这里定义的常量,而非各自重复定义,
5
+ * 确保 pattern / description / required 等元数据保持一致。
6
+ */
7
+ import type { FlagDef } from "../../framework/types.js";
8
+ export declare const DATASET_CODE_PATTERN: NonNullable<FlagDef["pattern"]>;
9
+ /** Dataset --code:32 位十六进制 UUID,用于 dataset / data 等命令 */
10
+ export declare const CODE_FLAG: FlagDef;
11
+ /** Dataset --code(可选,用于过滤/查询) */
12
+ export declare const CODE_FLAG_OPTIONAL: FlagDef;
13
+ /** Dataset --datasetcode(可选,常用于 page / bff / sql 等跨资源命令) */
14
+ export declare const DATASETCODE_FLAG_OPTIONAL: FlagDef;
15
+ /** SQL/BFF --sqlcode:xxxxxxxx-xxxxxxxx 格式 */
16
+ export declare const SQLCODE_FLAG: FlagDef;
17
+ /** --appcode:显式指定应用 code(覆盖配置文件,用于 dataset 命令) */
18
+ export declare const APPCODE_FLAG_OPTIONAL: FlagDef;
19
+ /** --appcode:必须显式指定应用 code */
20
+ export declare const APPCODE_FLAG: FlagDef;
21
+ /** SQL --sqlcode(可选,用于过滤) */
22
+ export declare const SQLCODE_FLAG_OPTIONAL: FlagDef;
23
+ /** 数据库连接 ID(dblink id,来自 db list) */
24
+ export declare const DBLINK_ID_FLAG: FlagDef;
25
+ /** 创建连接时的数据库产品类型(与研发态工作台一致) */
26
+ export declare const DB_TYPE_FLAG: FlagDef;
@@ -1 +1 @@
1
- const a47_0x5e2805=a47_0x3bb5;(function(_0x507c9a,_0x390ddf){const _0x2347ce=a47_0x3bb5,_0x2f0ad2=_0x507c9a();while(!![]){try{const _0x3f7e57=parseInt(_0x2347ce(0xf1))/0x1*(parseInt(_0x2347ce(0xfe))/0x2)+parseInt(_0x2347ce(0xea))/0x3*(parseInt(_0x2347ce(0xfc))/0x4)+parseInt(_0x2347ce(0xeb))/0x5*(-parseInt(_0x2347ce(0xf9))/0x6)+parseInt(_0x2347ce(0xf2))/0x7+-parseInt(_0x2347ce(0xed))/0x8+-parseInt(_0x2347ce(0xf8))/0x9*(parseInt(_0x2347ce(0x100))/0xa)+parseInt(_0x2347ce(0xfb))/0xb*(-parseInt(_0x2347ce(0xf5))/0xc);if(_0x3f7e57===_0x390ddf)break;else _0x2f0ad2['push'](_0x2f0ad2['shift']());}catch(_0x4ab43a){_0x2f0ad2['push'](_0x2f0ad2['shift']());}}}(a47_0xfbd5,0xf2ab5));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x5e2805(0xe7)};export const CODE_FLAG={'name':a47_0x5e2805(0xe6),'type':a47_0x5e2805(0xe8),'required':!![],'description':a47_0x5e2805(0xfa),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a47_0x5e2805(0xfa)};export const SQLCODE_FLAG={'name':a47_0x5e2805(0xf4),'type':'string','required':!![],'description':a47_0x5e2805(0xf7),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x5e2805(0xee)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x5e2805(0xf6),'type':a47_0x5e2805(0xe8),'required':![],'description':a47_0x5e2805(0xf0)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x5e2805(0xff)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x5e2805(0xf3),'required':!![],'description':a47_0x5e2805(0xfd)};function a47_0xfbd5(){const _0x55747e=['string','dbtype','103152lwpDWb','2224550CjmplP','MYSQL','2005952TFxXpV','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','POSTGRESQL','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','1iwvxKg','7085778DtIIyk','number','sqlcode','7427928plozLf','appcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1027593gmZYwl','6KzhDix','Dataset\x20code\x20(32-char\x20hex\x20UUID)','44NTdHnG','212EHgxya','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','3118702SiCCWw','App\x20code\x20(e.g.\x20app-xxxxx)','20pWApox','code','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'];a47_0xfbd5=function(){return _0x55747e;};return a47_0xfbd5();}function a47_0x3bb5(_0x4669f5,_0x54cfa8){_0x4669f5=_0x4669f5-0xe6;const _0xfbd5da=a47_0xfbd5();let _0x3bb543=_0xfbd5da[_0x4669f5];return _0x3bb543;}export const DB_TYPE_FLAG={'name':a47_0x5e2805(0xe9),'type':a47_0x5e2805(0xe8),'required':!![],'description':'Database\x20product\x20type','enum':[a47_0x5e2805(0xec),a47_0x5e2805(0xef)]};
1
+ const a47_0x498053=a47_0x181b;(function(_0x759dc8,_0xc15763){const _0x2131ea=a47_0x181b,_0x30baee=_0x759dc8();while(!![]){try{const _0x3e880b=-parseInt(_0x2131ea(0x1af))/0x1+parseInt(_0x2131ea(0x1ae))/0x2*(-parseInt(_0x2131ea(0x1a2))/0x3)+parseInt(_0x2131ea(0x1a1))/0x4*(-parseInt(_0x2131ea(0x1a7))/0x5)+-parseInt(_0x2131ea(0x1b2))/0x6*(-parseInt(_0x2131ea(0x1b1))/0x7)+parseInt(_0x2131ea(0x1ad))/0x8+parseInt(_0x2131ea(0x1b3))/0x9+parseInt(_0x2131ea(0x1a5))/0xa;if(_0x3e880b===_0xc15763)break;else _0x30baee['push'](_0x30baee['shift']());}catch(_0x29bb84){_0x30baee['push'](_0x30baee['shift']());}}}(a47_0x1f62,0x48132));function a47_0x1f62(){const _0x4f6fc2=['Database\x20product\x20type','1000690isBmUv','Dataset\x20code\x20(32-char\x20hex\x20UUID)','5BRxLrc','appcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','string','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','code','3241472hAByYk','2aOCjmC','73217bcIsaB','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','21476OcRpSl','102pSFRkn','3838050cLvvVJ','number','sqlcode','dbtype','370668QcVSlt','1568271unbBed','POSTGRESQL'];a47_0x1f62=function(){return _0x4f6fc2;};return a47_0x1f62();}function a47_0x181b(_0x4e48b7,_0x21d06c){_0x4e48b7=_0x4e48b7-0x1a1;const _0x1f621c=a47_0x1f62();let _0x181b94=_0x1f621c[_0x4e48b7];return _0x181b94;}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':a47_0x498053(0x1ac),'type':'string','required':!![],'description':a47_0x498053(0x1a6),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a47_0x498053(0x1b5),'type':a47_0x498053(0x1aa),'required':!![],'description':a47_0x498053(0x1a9),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x498053(0x1a8),'type':'string','required':![],'description':a47_0x498053(0x1b0)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x498053(0x1b4),'required':!![],'description':a47_0x498053(0x1ab)};export const DB_TYPE_FLAG={'name':a47_0x498053(0x1b6),'type':'string','required':!![],'description':a47_0x498053(0x1a4),'enum':['MYSQL',a47_0x498053(0x1a3)]};
@@ -0,0 +1,6 @@
1
+ export declare const DEVELOPMENT_UPLOAD_MAX_BYTES: number;
2
+ export interface DevelopmentUploadFile {
3
+ path: string;
4
+ size: number;
5
+ }
6
+ export declare function requireDevelopmentUploadFile(filePath: string, label: string): DevelopmentUploadFile;
@@ -1 +1 @@
1
- (function(_0x2cae50,_0x4536c5){const _0x538646=a48_0x502e,_0x27aafa=_0x2cae50();while(!![]){try{const _0x1021db=parseInt(_0x538646(0x11d))/0x1*(parseInt(_0x538646(0x119))/0x2)+parseInt(_0x538646(0x11c))/0x3*(parseInt(_0x538646(0x123))/0x4)+-parseInt(_0x538646(0x125))/0x5+parseInt(_0x538646(0x11f))/0x6*(parseInt(_0x538646(0x127))/0x7)+parseInt(_0x538646(0x118))/0x8+parseInt(_0x538646(0x122))/0x9*(-parseInt(_0x538646(0x121))/0xa)+-parseInt(_0x538646(0x116))/0xb*(-parseInt(_0x538646(0x11a))/0xc);if(_0x1021db===_0x4536c5)break;else _0x27aafa['push'](_0x27aafa['shift']());}catch(_0x1268f7){_0x27aafa['push'](_0x27aafa['shift']());}}}(a48_0xc110,0x1c0e0));function a48_0xc110(){const _0x3247d9=['20cvMTuB','550404DycnPn','1580ajdGNv','validation','773675xAkqkv','\x20MB','87521hjjDok','isFile','ceil','2828309JHNZmw','\x20path\x20is\x20required.','159328SoerbA','34lGpBmM','12zNYMVq','trim','81fytOan','3191lRMANo','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','24RSTOVU','size'];a48_0xc110=function(){return _0x3247d9;};return a48_0xc110();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x9125df){const _0x5a2cc1=a48_0x502e;if(_0x9125df>=BYTES_PER_MB){const _0x2cb156=Math[_0x5a2cc1(0x129)](_0x9125df/BYTES_PER_MB*0x64)/0x64;return _0x2cb156['toFixed'](0x2)+_0x5a2cc1(0x126);}return _0x9125df+'\x20B';}function a48_0x502e(_0x2677fa,_0x279273){_0x2677fa=_0x2677fa-0x116;const _0xc110d=a48_0xc110();let _0x502e26=_0xc110d[_0x2677fa];return _0x502e26;}export function requireDevelopmentUploadFile(_0x3c1068,_0x578ef0){const _0x28842f=a48_0x502e,_0x23dc64=_0x3c1068[_0x28842f(0x11b)]();if(!_0x23dc64)throw CliErrors[_0x28842f(0x124)](_0x578ef0+_0x28842f(0x117));if(!existsSync(_0x23dc64))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x23dc64);const _0x57911a=statSync(_0x23dc64);if(!_0x57911a[_0x28842f(0x128)]())throw CliErrors[_0x28842f(0x124)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x23dc64);if(_0x57911a[_0x28842f(0x120)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x28842f(0x124)](_0x28842f(0x11e)+_0x23dc64+'\x20('+formatBytes(_0x57911a[_0x28842f(0x120)])+')');return{'path':_0x23dc64,'size':_0x57911a[_0x28842f(0x120)]};}
1
+ (function(_0x5cca76,_0x357bfe){const _0x5dee83=a48_0x1d8c,_0x2284df=_0x5cca76();while(!![]){try{const _0xed1313=-parseInt(_0x5dee83(0x126))/0x1*(-parseInt(_0x5dee83(0x116))/0x2)+parseInt(_0x5dee83(0x11a))/0x3+-parseInt(_0x5dee83(0x124))/0x4+parseInt(_0x5dee83(0x11e))/0x5*(-parseInt(_0x5dee83(0x11c))/0x6)+-parseInt(_0x5dee83(0x129))/0x7+parseInt(_0x5dee83(0x11d))/0x8+-parseInt(_0x5dee83(0x117))/0x9*(-parseInt(_0x5dee83(0x119))/0xa);if(_0xed1313===_0x357bfe)break;else _0x2284df['push'](_0x2284df['shift']());}catch(_0x524709){_0x2284df['push'](_0x2284df['shift']());}}}(a48_0x2447,0x931b3));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a48_0x1d8c(_0x2e03ce,_0x4b4d7f){_0x2e03ce=_0x2e03ce-0x116;const _0x244769=a48_0x2447();let _0x1d8cb8=_0x244769[_0x2e03ce];return _0x1d8cb8;}function a48_0x2447(){const _0x53b87a=['36745ODAphq','File\x20is\x20not\x20a\x20regular\x20file:\x20','ceil','3594941MoMhJd','6OBCyaF','207TUVLZe','toFixed','233600pPHGqT','1964841VlSXDc','validation','6EOSPDN','6575928WVUbih','2264235MJMWks','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','\x20MB','\x20path\x20is\x20required.','size','File\x20not\x20found:\x20','2221984YysjTm','trim'];a48_0x2447=function(){return _0x53b87a;};return a48_0x2447();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x16648f){const _0x1eac6a=a48_0x1d8c;if(_0x16648f>=BYTES_PER_MB){const _0xfea9a6=Math[_0x1eac6a(0x128)](_0x16648f/BYTES_PER_MB*0x64)/0x64;return _0xfea9a6[_0x1eac6a(0x118)](0x2)+_0x1eac6a(0x120);}return _0x16648f+'\x20B';}export function requireDevelopmentUploadFile(_0x55c699,_0x4618e0){const _0x4f7988=a48_0x1d8c,_0x17f1a9=_0x55c699[_0x4f7988(0x125)]();if(!_0x17f1a9)throw CliErrors['validation'](_0x4618e0+_0x4f7988(0x121));if(!existsSync(_0x17f1a9))throw CliErrors[_0x4f7988(0x11b)](_0x4f7988(0x123)+_0x17f1a9);const _0x30b1ad=statSync(_0x17f1a9);if(!_0x30b1ad['isFile']())throw CliErrors[_0x4f7988(0x11b)](_0x4f7988(0x127)+_0x17f1a9);if(_0x30b1ad['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x4f7988(0x11f)+_0x17f1a9+'\x20('+formatBytes(_0x30b1ad['size'])+')');return{'path':_0x17f1a9,'size':_0x30b1ad[_0x4f7988(0x122)]};}