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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (568) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
  561. package/lib/commands/page/react/create.js +0 -1
  562. package/lib/commands/page/react/detail.js +0 -1
  563. package/lib/commands/page/react/list.js +0 -1
  564. package/lib/commands/page/react/publish.js +0 -1
  565. package/lib/commands/page/react/shared.js +0 -1
  566. package/lib/commands/page/react/syntax.js +0 -1
  567. package/lib/commands/page/react/template.js +0 -1
  568. package/lib/commands/page/react/update.js +0 -1
@@ -1 +1 @@
1
- const a125_0x85e8f3=a125_0x407a;(function(_0x1c9716,_0x3cfda2){const _0x2c6f7d=a125_0x407a,_0xf78daf=_0x1c9716();while(!![]){try{const _0x353d3c=-parseInt(_0x2c6f7d(0x1d9))/0x1+parseInt(_0x2c6f7d(0x1a4))/0x2+parseInt(_0x2c6f7d(0x1de))/0x3+parseInt(_0x2c6f7d(0x1ae))/0x4+-parseInt(_0x2c6f7d(0x1e2))/0x5*(-parseInt(_0x2c6f7d(0x19a))/0x6)+parseInt(_0x2c6f7d(0x1ec))/0x7+-parseInt(_0x2c6f7d(0x1c4))/0x8;if(_0x353d3c===_0x3cfda2)break;else _0xf78daf['push'](_0xf78daf['shift']());}catch(_0x4cd855){_0xf78daf['push'](_0xf78daf['shift']());}}}(a125_0x16e6,0x8521c));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':a125_0x85e8f3(0x1df),'type':'number','description':a125_0x85e8f3(0x1d5)};export const MENU_PARENT_ID_FLAG={'name':a125_0x85e8f3(0x1ed),'type':'string','description':a125_0x85e8f3(0x19b)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x85e8f3(0x1be),'type':'string','description':'Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level'};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a125_0x85e8f3(0x1c8),'type':a125_0x85e8f3(0x1d4),'description':a125_0x85e8f3(0x195)},{'name':a125_0x85e8f3(0x199),'type':a125_0x85e8f3(0x192),'description':a125_0x85e8f3(0x1b3)}];export function validateExactId(_0x1982fe){const _0x1d9d26=a125_0x85e8f3,_0x16893e=_0x1982fe['num']('id');if(!Number[_0x1d9d26(0x1d0)](_0x16893e)||_0x16893e<=0x0)throw CliErrors['validation'](_0x1d9d26(0x1b0));return _0x16893e;}export function validateSort(_0x570dd3,_0x59e902=a125_0x85e8f3(0x1df)){const _0x29b0cb=a125_0x85e8f3;if(!hasFlag(_0x570dd3,_0x59e902))return undefined;const _0x243e48=_0x570dd3[_0x29b0cb(0x1c1)](_0x59e902);if(!Number['isSafeInteger'](_0x243e48)||_0x243e48<0x0||_0x243e48>MAX_MENU_SORT)throw menuError(_0x29b0cb(0x1b4),'--'+_0x59e902+_0x29b0cb(0x1a9)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x243e48;}export function nextSiblingSort(_0x5e403d,_0x29766a,_0x54ad8c){const _0x59de85=a125_0x85e8f3,_0x1b0645=getChildren(_0x5e403d,_0x29766a)[_0x59de85(0x1b1)](_0x421d21=>_0x421d21['sort'])[_0x59de85(0x198)](_0x5ccac0=>typeof _0x5ccac0==='number');if(_0x1b0645[_0x59de85(0x1c3)]===0x0)return 0x0;const _0x178721=Math['max'](..._0x1b0645);if(_0x178721>=MAX_MENU_SORT)throw menuError('menu_sort_overflow',_0x59de85(0x1e8)+_0x54ad8c+_0x59de85(0x1af)+_0x178721+'.',_0x59de85(0x1db)+MAX_MENU_SORT+_0x59de85(0x1d8));return _0x178721+0x1;}export function requireExplicitYes(_0x2f71bf){const _0x984dec=a125_0x85e8f3;if(_0x2f71bf[_0x984dec(0x19e)](_0x984dec(0x1b9)))return;if(!_0x2f71bf[_0x984dec(0x19e)](_0x984dec(0x1bb)))throw menuError('menu_confirmation_required',_0x984dec(0x1a6),_0x984dec(0x1a2));}export async function fetchMutationSnapshot(_0x3d300e,_0x39c2c2,_0x394b4f){const _0x5230a6=a125_0x85e8f3;try{return await fetchMenuSnapshot(_0x3d300e[_0x5230a6(0x1b8)],_0x3d300e[_0x5230a6(0x1a5)]);}catch(_0x3b2268){throw mapMenuApiError(_0x3b2268,_0x5230a6(0x196)+_0x39c2c2,_0x394b4f);}}export async function recheckMutationSnapshot(_0x4f7549,_0xbda3be,_0x2e0db8,_0x2b88a6){const _0x2d52af=a125_0x85e8f3;let _0x380c89;try{_0x380c89=await fetchMenuSnapshot(_0x4f7549[_0x2d52af(0x1b8)],_0x4f7549[_0x2d52af(0x1a5)]);}catch(_0x5856fe){const _0x4d02c1=mapMenuApiError(_0x5856fe,_0x2d52af(0x1a8)+_0x2e0db8,_0x2b88a6);throw menuFailure(_0x4d02c1,_0xbda3be,{'stage':'pre-write-recheck','failed':_0x2b88a6==null?{}:{'id':_0x2b88a6}});}if(_0x380c89[_0x2d52af(0x1cf)]!==_0xbda3be[_0x2d52af(0x1ad)]){const _0x553cb8=menuError(_0x2d52af(0x1e5),_0x2d52af(0x1dd)+_0x2e0db8+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0x553cb8,_0xbda3be,{'stage':_0x2d52af(0x1e7),'failed':{..._0x2b88a6==null?{}:{'id':_0x2b88a6},'expectedSnapshotHash':_0xbda3be[_0x2d52af(0x1ad)],'currentSnapshotHash':_0x380c89[_0x2d52af(0x1cf)]}});}return _0x380c89;}export function parseParentId(_0x8065e0,_0x19a204,_0x229768={}){const _0x98fe8b=a125_0x85e8f3;if(!hasFlag(_0x8065e0,_0x19a204)){if(_0x229768[_0x98fe8b(0x18d)])throw CliErrors[_0x98fe8b(0x1bd)](_0x19a204);return undefined;}const _0x4ff1e7=_0x8065e0[_0x98fe8b(0x1cb)](_0x19a204)[_0x98fe8b(0x19f)]();if(_0x4ff1e7[_0x98fe8b(0x1d1)]()==='root')return null;if(!/^\d+$/['test'](_0x4ff1e7))throw CliErrors[_0x98fe8b(0x1c5)]('--'+_0x19a204+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');const _0xc4d88e=Number(_0x4ff1e7);if(!Number[_0x98fe8b(0x1d0)](_0xc4d88e)||_0xc4d88e<=0x0)throw CliErrors['validation']('--'+_0x19a204+_0x98fe8b(0x1bc));return _0xc4d88e;}export function requireMenu(_0x1dc9c9,_0x32e6d3){const _0x917ad1=a125_0x85e8f3,_0x2d0e49=_0x1dc9c9['byId']['get'](_0x32e6d3);if(!_0x2d0e49)throw menuError('menu_not_found','Online\x20menu\x20not\x20found:\x20'+_0x32e6d3,_0x917ad1(0x190));return _0x2d0e49;}export function requireFolder(_0x59fdf7,_0x501bbc){const _0x5a830e=a125_0x85e8f3,_0x7a6d58=requireMenu(_0x59fdf7,_0x501bbc);if(_0x7a6d58[_0x5a830e(0x1eb)]!==_0x5a830e(0x1ce))throw menuError(_0x5a830e(0x1cd),_0x5a830e(0x18c)+_0x501bbc+'\x20is\x20type\x20\x22'+(_0x7a6d58['type']||_0x5a830e(0x1ac))+_0x5a830e(0x1ab),_0x5a830e(0x1c9));return _0x7a6d58;}export function assertExpectedState(_0x3b279e,_0x322220){const _0x47293e=a125_0x85e8f3;if(hasFlag(_0x3b279e,_0x47293e(0x1be))){const _0x314d4b=parseParentId(_0x3b279e,_0x47293e(0x1be),{'required':!![]});if(_0x322220[_0x47293e(0x1ba)]!==_0x314d4b)throw stateDrift('Menu\x20'+_0x322220['id']+_0x47293e(0x1ca)+formatParent(_0x314d4b)+_0x47293e(0x1b2)+formatParent(_0x322220[_0x47293e(0x1ba)])+'.');}if(hasFlag(_0x3b279e,_0x47293e(0x1c8))){const _0x1f0df5=_0x3b279e[_0x47293e(0x1cb)](_0x47293e(0x1c8));if(_0x322220[_0x47293e(0x1da)]!==_0x1f0df5)throw stateDrift(_0x47293e(0x18c)+_0x322220['id']+_0x47293e(0x18e)+JSON[_0x47293e(0x1e6)](_0x1f0df5)+_0x47293e(0x1b2)+JSON['stringify'](_0x322220[_0x47293e(0x1da)])+'.');}if(hasFlag(_0x3b279e,_0x47293e(0x199))){const _0x219eac=_0x3b279e[_0x47293e(0x1c1)](_0x47293e(0x199));if(!Number[_0x47293e(0x1d0)](_0x219eac)||_0x219eac<0x0)throw CliErrors[_0x47293e(0x1c5)](_0x47293e(0x1b5));if(_0x322220[_0x47293e(0x1a0)]!==_0x219eac)throw stateDrift('Menu\x20'+_0x322220['id']+_0x47293e(0x19d)+_0x219eac+_0x47293e(0x1b2)+_0x322220[_0x47293e(0x1a0)]+'.');}}export function assertVerified(_0x36834e,_0xf212c2,_0x5e418c='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x2df18f=a125_0x85e8f3;if(!_0x36834e)throw menuError(_0x2df18f(0x1c6),_0xf212c2,_0x5e418c);}export function mutationResult(_0x2dd2e7){const _0x3de1cf=a125_0x85e8f3;return{'operation':_0x2dd2e7[_0x3de1cf(0x1d7)],'selector':_0x2dd2e7[_0x3de1cf(0x1b7)],'before':_0x2dd2e7['before'],'after':_0x2dd2e7['after'],'dryRun':_0x2dd2e7[_0x3de1cf(0x1c2)],'backend':_0x2dd2e7['backend'],..._0x2dd2e7[_0x3de1cf(0x1b6)]?{'plannedActions':_0x2dd2e7[_0x3de1cf(0x1b6)]}:{},..._0x2dd2e7['targets']?{'targets':_0x2dd2e7[_0x3de1cf(0x1c0)]}:{},..._0x2dd2e7[_0x3de1cf(0x1c7)]?{'deleteOrder':_0x2dd2e7[_0x3de1cf(0x1c7)]}:{},'snapshotHash':_0x2dd2e7[_0x3de1cf(0x1ad)],..._0x2dd2e7[_0x3de1cf(0x1dc)]?{'cascade':_0x2dd2e7[_0x3de1cf(0x1dc)]}:{},..._0x2dd2e7['planFile']?{'planFile':_0x2dd2e7['planFile']}:{},'succeeded':_0x2dd2e7['succeeded']??[],'failed':_0x2dd2e7[_0x3de1cf(0x1cc)]??[],'warnings':_0x2dd2e7[_0x3de1cf(0x18f)]??[],'verification':_0x2dd2e7[_0x3de1cf(0x19c)],'error':_0x2dd2e7[_0x3de1cf(0x18b)]};}export function menuDryRunResult(_0x24d555,_0x4a78dc){return{..._0x24d555,..._0x4a78dc};}export function menuFailure(_0xf6e028,_0x51703c,_0x72e067){const _0x2f685d=a125_0x85e8f3,_0x37c226=mutationResult({..._0x51703c,'after':_0x72e067[_0x2f685d(0x1a1)]===undefined?_0x51703c['after']:_0x72e067[_0x2f685d(0x1a1)],'backend':_0x72e067['backend']??_0x51703c[_0x2f685d(0x1ea)],'dryRun':![],'succeeded':_0x72e067[_0x2f685d(0x191)]??[],'failed':[{..._0x72e067[_0x2f685d(0x1cc)]??{},'stage':_0x72e067[_0x2f685d(0x194)],'code':_0xf6e028[_0x2f685d(0x1e0)],'message':_0xf6e028['message']}],'warnings':[..._0x51703c[_0x2f685d(0x18f)],..._0x72e067['warnings']??[]],'verification':_0x72e067[_0x2f685d(0x19c)],'error':{'code':_0xf6e028[_0x2f685d(0x1e0)],'message':_0xf6e028[_0x2f685d(0x18a)],..._0xf6e028['hint']?{'hint':_0xf6e028[_0x2f685d(0x1aa)]}:{}}});return Object[_0x2f685d(0x193)](_0xf6e028,_0x2f685d(0x1d2),{'value':_0x37c226,'enumerable':!![],'configurable':!![]}),_0xf6e028;}export function asVerificationError(_0x171d04,_0x3aa956){const _0x4e663a=a125_0x85e8f3;if(_0x171d04 instanceof CliError&&_0x171d04[_0x4e663a(0x1e0)]===_0x4e663a(0x1c6))return _0x171d04;const _0x311c30=_0x171d04 instanceof Error?_0x171d04[_0x4e663a(0x18a)]:String(_0x171d04);return menuError('menu_verification_failed',''+_0x3aa956+(_0x311c30?':\x20'+_0x311c30:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}export function describeMenuErrorCause(_0x3cad11,_0x275256,_0x3d5975){const _0x5db0a6=a125_0x85e8f3,_0x5b4629=mapMenuApiError(_0x3cad11,_0x275256,_0x3d5975);return{'causeCode':_0x5b4629[_0x5db0a6(0x1e0)],'causeMessage':_0x5b4629[_0x5db0a6(0x18a)]};}function a125_0x407a(_0x26ca97,_0x560b9e){_0x26ca97=_0x26ca97-0x18a;const _0x16e6fb=a125_0x16e6();let _0x407a1b=_0x16e6fb[_0x26ca97];return _0x407a1b;}export function hasFlag(_0x463480,_0x1bf4b9){const _0x40a3fa=a125_0x85e8f3;return Object[_0x40a3fa(0x1a3)][_0x40a3fa(0x1d6)][_0x40a3fa(0x1e1)](_0x463480[_0x40a3fa(0x1a7)],_0x1bf4b9)&&_0x463480[_0x40a3fa(0x1a7)][_0x1bf4b9]!==undefined;}export function toApiParentId(_0x318072){return _0x318072??0x0;}export function formatParent(_0xe1aa4){return _0xe1aa4==null?'root':String(_0xe1aa4);}export function menuError(_0x3a2f86,_0x19c738,_0x19d47d){return new CliError(_0x3a2f86,0x1,_0x19c738,_0x19d47d);}export function mapMenuApiError(_0x816a76,_0x596c27,_0x416b0f){const _0x1a878e=a125_0x85e8f3;if(_0x816a76 instanceof CliError&&_0x816a76[_0x1a878e(0x1e0)]!=='api_error')return _0x816a76;const _0x195677=_0x816a76 instanceof Error?_0x816a76[_0x1a878e(0x18a)]:String(_0x816a76);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x1a878e(0x1e9)](_0x195677))return menuError(_0x1a878e(0x1d3),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x596c27+(_0x416b0f?_0x1a878e(0x1e3)+_0x416b0f:'')+'.',_0x1a878e(0x1e4));return menuError('menu_mutation_failed',_0x1a878e(0x197)+_0x596c27+(_0x416b0f?_0x1a878e(0x1e3)+_0x416b0f:'')+':\x20'+_0x195677,'Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.');}export function isMenuResponseLoss(_0x49acbb){const _0x13ffd6=a125_0x85e8f3,_0x40f972=_0x49acbb instanceof Error?_0x49acbb[_0x13ffd6(0x18a)]:String(_0x49acbb);if(_0x49acbb instanceof CliError)return _0x49acbb[_0x13ffd6(0x1e0)]===_0x13ffd6(0x1bf)&&/^Request (?:failed|timeout):/i['test'](_0x40f972);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i['test'](_0x40f972);}function stateDrift(_0x2099c6){const _0x232d83=a125_0x85e8f3;return menuError(_0x232d83(0x1e5),_0x2099c6,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}function a125_0x16e6(){const _0x18c214=['\x20path\x20changed:\x20expected\x20','warnings','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','succeeded','number','defineProperty','stage','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','read\x20online\x20menu\x20facts\x20before\x20','Failed\x20to\x20','filter','expected-children-count','4197306cmPpzM','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','verification','\x20child\x20count\x20changed:\x20expected\x20','bool','trim','childrenCount','after','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','prototype','1548380wiKGWA','cookie','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','rawFlags','recheck\x20online\x20menu\x20facts\x20before\x20','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','hint','\x22,\x20not\x20folder.','unknown','snapshotHash','672900hiUtHk','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','map',',\x20current\x20','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','menu_sort_invalid','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','plannedActions','selector','appCode','dry-run','parentId','yes','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','flagMissing','expect-parent-id','api_error','targets','num','dryRun','length','5201968SCpiDQ','validation','menu_verification_failed','deleteOrder','expect-path','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','\x20parent\x20changed:\x20expected\x20','str','failed','menu_parent_not_folder','folder','hash','isSafeInteger','toLowerCase','data','menu_permission_denied','string','Sibling\x20sort\x20value\x20(non-negative\x20integer)','hasOwnProperty','operation',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','983351CZxueB','path','Reorder\x20sibling\x20menus\x20below\x20','cascade','Online\x20menu\x20state\x20changed\x20before\x20','236358EGCypT','sort','code','call','5mLsbYS','\x20menu\x20','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','menu_state_drift','stringify','pre-write-recheck','Cannot\x20append\x20a\x20','test','backend','type','3207071ijkxfR','parent-id','message','error','Menu\x20','required'];a125_0x16e6=function(){return _0x18c214;};return a125_0x16e6();}
1
+ const a125_0x146e0e=a125_0x1d25;(function(_0x5340e1,_0x4e88e3){const _0x332616=a125_0x1d25,_0x5aa073=_0x5340e1();while(!![]){try{const _0x22c04e=-parseInt(_0x332616(0x1c2))/0x1+-parseInt(_0x332616(0x1cc))/0x2*(-parseInt(_0x332616(0x1ed))/0x3)+parseInt(_0x332616(0x1a6))/0x4+-parseInt(_0x332616(0x19c))/0x5+-parseInt(_0x332616(0x1ee))/0x6+-parseInt(_0x332616(0x1cf))/0x7+-parseInt(_0x332616(0x1bf))/0x8*(-parseInt(_0x332616(0x1fe))/0x9);if(_0x22c04e===_0x4e88e3)break;else _0x5aa073['push'](_0x5aa073['shift']());}catch(_0x14cf65){_0x5aa073['push'](_0x5aa073['shift']());}}}(a125_0xff48,0x31641));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';function a125_0xff48(){const _0x1f84ef=['plannedActions','root','Failed\x20to\x20','\x20parent\x20changed:\x20expected\x20','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','menu_verification_failed','hint','menu_parent_not_folder','dryRun','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','appCode','required','parentId','yes','cascade','hasOwnProperty','menu_confirmation_required','warnings','menu_sort_overflow','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','menu_state_drift','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','24aZhxmU','validation','Menu\x20','266053sPFaTN','get','succeeded','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x20menu\x20','planFile','length','type','targets','expect-parent-id','14BsraFj','stage','parent-id','1320550NpOfgT','\x20child\x20count\x20changed:\x20expected\x20','\x20path\x20changed:\x20expected\x20','snapshotHash','operation','pre-write-recheck','deleteOrder','trim','Online\x20menu\x20state\x20changed\x20before\x20','sort','Reorder\x20sibling\x20menus\x20below\x20','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','isSafeInteger','defineProperty','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','filter',',\x20current\x20','stringify','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Exact\x20online\x20menu\x20id','toLowerCase','after','rawFlags','menu_mutation_failed',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','prototype','bool','Online\x20menu\x20not\x20found:\x20','api_error','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','54351QKCPqy','1928670yVSRMX','cookie','backend','unknown','code','Sibling\x20sort\x20value\x20(non-negative\x20integer)','number','failed','num','call','expect-path',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','expected-children-count','byId','message','path','2849436fGFIyY','test','string','1315555NNODCH','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','Permission\x20denied\x20while\x20attempting\x20to\x20','menu_not_found','menu_sort_invalid','str','recheck\x20online\x20menu\x20facts\x20before\x20','\x20is\x20type\x20\x22','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','659732PnXqjk','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','childrenCount'];a125_0xff48=function(){return _0x1f84ef;};return a125_0xff48();}export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':'number','required':!![],'description':a125_0x146e0e(0x1e2)};export const MENU_SORT_FLAG={'name':a125_0x146e0e(0x1d8),'type':'number','description':a125_0x146e0e(0x1f3)};export const MENU_PARENT_ID_FLAG={'name':a125_0x146e0e(0x1ce),'type':a125_0x146e0e(0x19b),'description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x146e0e(0x1cb),'type':'string','description':'Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level'};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a125_0x146e0e(0x1f8),'type':a125_0x146e0e(0x19b),'description':a125_0x146e0e(0x1ad)},{'name':'expected-children-count','type':a125_0x146e0e(0x1f4),'description':a125_0x146e0e(0x1b2)}];export function validateExactId(_0x47430e){const _0x1742ee=a125_0x146e0e,_0x150142=_0x47430e[_0x1742ee(0x1f6)]('id');if(!Number[_0x1742ee(0x1db)](_0x150142)||_0x150142<=0x0)throw CliErrors[_0x1742ee(0x1c0)](_0x1742ee(0x1c5));return _0x150142;}export function validateSort(_0x4bd75d,_0x2d27e5='sort'){const _0x47ddd5=a125_0x146e0e;if(!hasFlag(_0x4bd75d,_0x2d27e5))return undefined;const _0x4faa5e=_0x4bd75d['num'](_0x2d27e5);if(!Number[_0x47ddd5(0x1db)](_0x4faa5e)||_0x4faa5e<0x0||_0x4faa5e>MAX_MENU_SORT)throw menuError(_0x47ddd5(0x1a0),'--'+_0x2d27e5+'\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20'+MAX_MENU_SORT+'.',_0x47ddd5(0x1bc));return _0x4faa5e;}export function nextSiblingSort(_0x1dc1b1,_0x3d7e8d,_0x53cfe4){const _0x1a0aac=a125_0x146e0e,_0x1b4b1d=getChildren(_0x1dc1b1,_0x3d7e8d)['map'](_0x55507c=>_0x55507c['sort'])[_0x1a0aac(0x1de)](_0x4ad6af=>typeof _0x4ad6af===_0x1a0aac(0x1f4));if(_0x1b4b1d[_0x1a0aac(0x1c8)]===0x0)return 0x0;const _0x21e834=Math['max'](..._0x1b4b1d);if(_0x21e834>=MAX_MENU_SORT)throw menuError(_0x1a0aac(0x1bb),'Cannot\x20append\x20a\x20'+_0x53cfe4+_0x1a0aac(0x1da)+_0x21e834+'.',_0x1a0aac(0x1d9)+MAX_MENU_SORT+_0x1a0aac(0x1f9));return _0x21e834+0x1;}export function requireExplicitYes(_0x4f41b6){const _0x403bab=a125_0x146e0e;if(_0x4f41b6['bool']('dry-run'))return;if(!_0x4f41b6[_0x403bab(0x1e9)](_0x403bab(0x1b6)))throw menuError(_0x403bab(0x1b9),_0x403bab(0x1a5),_0x403bab(0x1e1));}export async function fetchMutationSnapshot(_0x34d698,_0x12ac02,_0x280881){const _0x3884b0=a125_0x146e0e;try{return await fetchMenuSnapshot(_0x34d698[_0x3884b0(0x1b3)],_0x34d698[_0x3884b0(0x1ef)]);}catch(_0x5805dc){throw mapMenuApiError(_0x5805dc,'read\x20online\x20menu\x20facts\x20before\x20'+_0x12ac02,_0x280881);}}export async function recheckMutationSnapshot(_0x212a71,_0x4ab0c8,_0x190084,_0x15e10d){const _0x3f504b=a125_0x146e0e;let _0x250af9;try{_0x250af9=await fetchMenuSnapshot(_0x212a71['appCode'],_0x212a71['cookie']);}catch(_0x1f346d){const _0x3bac49=mapMenuApiError(_0x1f346d,_0x3f504b(0x1a2)+_0x190084,_0x15e10d);throw menuFailure(_0x3bac49,_0x4ab0c8,{'stage':'pre-write-recheck','failed':_0x15e10d==null?{}:{'id':_0x15e10d}});}if(_0x250af9['hash']!==_0x4ab0c8[_0x3f504b(0x1d2)]){const _0x512cd4=menuError(_0x3f504b(0x1bd),_0x3f504b(0x1d7)+_0x190084+_0x3f504b(0x1e7),_0x3f504b(0x1dd));throw menuFailure(_0x512cd4,_0x4ab0c8,{'stage':_0x3f504b(0x1d4),'failed':{..._0x15e10d==null?{}:{'id':_0x15e10d},'expectedSnapshotHash':_0x4ab0c8['snapshotHash'],'currentSnapshotHash':_0x250af9['hash']}});}return _0x250af9;}export function parseParentId(_0x52968f,_0x293039,_0x3610d7={}){const _0x138eb0=a125_0x146e0e;if(!hasFlag(_0x52968f,_0x293039)){if(_0x3610d7[_0x138eb0(0x1b4)])throw CliErrors['flagMissing'](_0x293039);return undefined;}const _0x229db8=_0x52968f[_0x138eb0(0x1a1)](_0x293039)[_0x138eb0(0x1d6)]();if(_0x229db8[_0x138eb0(0x1e3)]()==='root')return null;if(!/^\d+$/[_0x138eb0(0x19a)](_0x229db8))throw CliErrors[_0x138eb0(0x1c0)]('--'+_0x293039+_0x138eb0(0x19d));const _0x3246fa=Number(_0x229db8);if(!Number[_0x138eb0(0x1db)](_0x3246fa)||_0x3246fa<=0x0)throw CliErrors[_0x138eb0(0x1c0)]('--'+_0x293039+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');return _0x3246fa;}export function requireMenu(_0x1b206d,_0x4dee07){const _0x3041f3=a125_0x146e0e,_0x2d8837=_0x1b206d[_0x3041f3(0x1fb)][_0x3041f3(0x1c3)](_0x4dee07);if(!_0x2d8837)throw menuError(_0x3041f3(0x19f),_0x3041f3(0x1ea)+_0x4dee07,_0x3041f3(0x1a7));return _0x2d8837;}export function requireFolder(_0x2eba94,_0x242f74){const _0x5b2e98=a125_0x146e0e,_0x5a0b14=requireMenu(_0x2eba94,_0x242f74);if(_0x5a0b14['type']!=='folder')throw menuError(_0x5b2e98(0x1b0),_0x5b2e98(0x1c1)+_0x242f74+_0x5b2e98(0x1a3)+(_0x5a0b14[_0x5b2e98(0x1c9)]||_0x5b2e98(0x1f1))+'\x22,\x20not\x20folder.',_0x5b2e98(0x1a4));return _0x5a0b14;}export function assertExpectedState(_0x1fbb8f,_0x51d3bf){const _0x444cd7=a125_0x146e0e;if(hasFlag(_0x1fbb8f,'expect-parent-id')){const _0x9487fc=parseParentId(_0x1fbb8f,_0x444cd7(0x1cb),{'required':!![]});if(_0x51d3bf[_0x444cd7(0x1b5)]!==_0x9487fc)throw stateDrift(_0x444cd7(0x1c1)+_0x51d3bf['id']+_0x444cd7(0x1ac)+formatParent(_0x9487fc)+',\x20current\x20'+formatParent(_0x51d3bf[_0x444cd7(0x1b5)])+'.');}if(hasFlag(_0x1fbb8f,'expect-path')){const _0x53366b=_0x1fbb8f['str']('expect-path');if(_0x51d3bf[_0x444cd7(0x1fd)]!==_0x53366b)throw stateDrift(_0x444cd7(0x1c1)+_0x51d3bf['id']+_0x444cd7(0x1d1)+JSON['stringify'](_0x53366b)+',\x20current\x20'+JSON[_0x444cd7(0x1e0)](_0x51d3bf[_0x444cd7(0x1fd)])+'.');}if(hasFlag(_0x1fbb8f,'expected-children-count')){const _0xb50ddf=_0x1fbb8f[_0x444cd7(0x1f6)](_0x444cd7(0x1fa));if(!Number['isSafeInteger'](_0xb50ddf)||_0xb50ddf<0x0)throw CliErrors[_0x444cd7(0x1c0)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x51d3bf[_0x444cd7(0x1a8)]!==_0xb50ddf)throw stateDrift('Menu\x20'+_0x51d3bf['id']+_0x444cd7(0x1d0)+_0xb50ddf+_0x444cd7(0x1df)+_0x51d3bf[_0x444cd7(0x1a8)]+'.');}}export function assertVerified(_0x581ef9,_0x199436,_0x307125=a125_0x146e0e(0x1be)){const _0x251c6c=a125_0x146e0e;if(!_0x581ef9)throw menuError(_0x251c6c(0x1ae),_0x199436,_0x307125);}export function mutationResult(_0x2ff738){const _0x54d14a=a125_0x146e0e;return{'operation':_0x2ff738[_0x54d14a(0x1d3)],'selector':_0x2ff738['selector'],'before':_0x2ff738['before'],'after':_0x2ff738[_0x54d14a(0x1e4)],'dryRun':_0x2ff738[_0x54d14a(0x1b1)],'backend':_0x2ff738[_0x54d14a(0x1f0)],..._0x2ff738['plannedActions']?{'plannedActions':_0x2ff738[_0x54d14a(0x1a9)]}:{},..._0x2ff738['targets']?{'targets':_0x2ff738[_0x54d14a(0x1ca)]}:{},..._0x2ff738['deleteOrder']?{'deleteOrder':_0x2ff738[_0x54d14a(0x1d5)]}:{},'snapshotHash':_0x2ff738[_0x54d14a(0x1d2)],..._0x2ff738[_0x54d14a(0x1b7)]?{'cascade':_0x2ff738[_0x54d14a(0x1b7)]}:{},..._0x2ff738[_0x54d14a(0x1c7)]?{'planFile':_0x2ff738[_0x54d14a(0x1c7)]}:{},'succeeded':_0x2ff738[_0x54d14a(0x1c4)]??[],'failed':_0x2ff738['failed']??[],'warnings':_0x2ff738[_0x54d14a(0x1ba)]??[],'verification':_0x2ff738['verification'],'error':_0x2ff738['error']};}export function menuDryRunResult(_0x55a96f,_0xc96116){return{..._0x55a96f,..._0xc96116};}export function menuFailure(_0x3cf331,_0x30fbb7,_0x4657b2){const _0x165427=a125_0x146e0e,_0x260c3b=mutationResult({..._0x30fbb7,'after':_0x4657b2[_0x165427(0x1e4)]===undefined?_0x30fbb7['after']:_0x4657b2[_0x165427(0x1e4)],'backend':_0x4657b2['backend']??_0x30fbb7[_0x165427(0x1f0)],'dryRun':![],'succeeded':_0x4657b2[_0x165427(0x1c4)]??[],'failed':[{..._0x4657b2[_0x165427(0x1f5)]??{},'stage':_0x4657b2[_0x165427(0x1cd)],'code':_0x3cf331[_0x165427(0x1f2)],'message':_0x3cf331[_0x165427(0x1fc)]}],'warnings':[..._0x30fbb7[_0x165427(0x1ba)],..._0x4657b2[_0x165427(0x1ba)]??[]],'verification':_0x4657b2['verification'],'error':{'code':_0x3cf331[_0x165427(0x1f2)],'message':_0x3cf331['message'],..._0x3cf331[_0x165427(0x1af)]?{'hint':_0x3cf331[_0x165427(0x1af)]}:{}}});return Object[_0x165427(0x1dc)](_0x3cf331,'data',{'value':_0x260c3b,'enumerable':!![],'configurable':!![]}),_0x3cf331;}function a125_0x1d25(_0xb650ac,_0x239401){_0xb650ac=_0xb650ac-0x19a;const _0xff485d=a125_0xff48();let _0x1d25c5=_0xff485d[_0xb650ac];return _0x1d25c5;}export function asVerificationError(_0x55590e,_0x1b2cd7){const _0xc35012=a125_0x146e0e;if(_0x55590e instanceof CliError&&_0x55590e[_0xc35012(0x1f2)]===_0xc35012(0x1ae))return _0x55590e;const _0x132655=_0x55590e instanceof Error?_0x55590e[_0xc35012(0x1fc)]:String(_0x55590e);return menuError(_0xc35012(0x1ae),''+_0x1b2cd7+(_0x132655?':\x20'+_0x132655:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}export function describeMenuErrorCause(_0x2a4c51,_0xd7ad6b,_0x35cd4a){const _0x97a0da=a125_0x146e0e,_0xae7dac=mapMenuApiError(_0x2a4c51,_0xd7ad6b,_0x35cd4a);return{'causeCode':_0xae7dac['code'],'causeMessage':_0xae7dac[_0x97a0da(0x1fc)]};}export function hasFlag(_0x3919cf,_0x4770d2){const _0x199c9c=a125_0x146e0e;return Object[_0x199c9c(0x1e8)][_0x199c9c(0x1b8)][_0x199c9c(0x1f7)](_0x3919cf[_0x199c9c(0x1e5)],_0x4770d2)&&_0x3919cf['rawFlags'][_0x4770d2]!==undefined;}export function toApiParentId(_0x5ba04d){return _0x5ba04d??0x0;}export function formatParent(_0x5ee486){const _0x4b8f22=a125_0x146e0e;return _0x5ee486==null?_0x4b8f22(0x1aa):String(_0x5ee486);}export function menuError(_0x57b278,_0x231821,_0x1b5566){return new CliError(_0x57b278,0x1,_0x231821,_0x1b5566);}export function mapMenuApiError(_0x17028e,_0x1c0a84,_0x53d194){const _0x39df25=a125_0x146e0e;if(_0x17028e instanceof CliError&&_0x17028e[_0x39df25(0x1f2)]!=='api_error')return _0x17028e;const _0x1f89d2=_0x17028e instanceof Error?_0x17028e[_0x39df25(0x1fc)]:String(_0x17028e);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x39df25(0x19a)](_0x1f89d2))return menuError('menu_permission_denied',_0x39df25(0x19e)+_0x1c0a84+(_0x53d194?_0x39df25(0x1c6)+_0x53d194:'')+'.','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.');return menuError(_0x39df25(0x1e6),_0x39df25(0x1ab)+_0x1c0a84+(_0x53d194?_0x39df25(0x1c6)+_0x53d194:'')+':\x20'+_0x1f89d2,_0x39df25(0x1ec));}export function isMenuResponseLoss(_0x56b871){const _0x37eb0a=a125_0x146e0e,_0x2e835e=_0x56b871 instanceof Error?_0x56b871['message']:String(_0x56b871);if(_0x56b871 instanceof CliError)return _0x56b871[_0x37eb0a(0x1f2)]===_0x37eb0a(0x1eb)&&/^Request (?:failed|timeout):/i[_0x37eb0a(0x19a)](_0x2e835e);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i['test'](_0x2e835e);}function stateDrift(_0x4d808e){const _0x4c4a74=a125_0x146e0e;return menuError(_0x4c4a74(0x1bd),_0x4d808e,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
@@ -0,0 +1,17 @@
1
+ import type { AsyncTaskStatusRecord, MenuRegroupInput } from "../../../core/api-client.js";
2
+ import type { Menu, MenuMutationEntity, ProcessedMenuItem, UpdateMenu, UpdateMenuCdnUrlParams } from "../../../commands/menu/shared/types.js";
3
+ export declare function getOnlineMenuList(appCode: string, cookie: string): Promise<ProcessedMenuItem[]>;
4
+ export declare function createMenu(appCode: string, cookie: string, params: {
5
+ label: string;
6
+ path: string;
7
+ resources?: string[];
8
+ }): Promise<MenuMutationEntity>;
9
+ export declare function createMenus(appCode: string, cookie: string, pages: Array<{
10
+ path: string;
11
+ label: string;
12
+ }>, resources?: string[]): Promise<MenuMutationEntity[]>;
13
+ export declare function updateMenuCdnUrl(appCode: string, cookie: string, params: UpdateMenuCdnUrlParams): Promise<MenuMutationEntity>;
14
+ export declare function createMenuEntity(appCode: string, cookie: string, params: Omit<Menu, "appCode">): Promise<MenuMutationEntity>;
15
+ export declare function updateMenuEntity(appCode: string, cookie: string, params: Omit<UpdateMenu, "appCode">): Promise<MenuMutationEntity>;
16
+ export declare function batchDeleteMenuEntities(cookie: string, ids: number[]): Promise<number>;
17
+ export declare function startMenuRegroup(cookie: string, input: MenuRegroupInput): Promise<AsyncTaskStatusRecord>;
@@ -1 +1 @@
1
- (function(_0xc4d7e4,_0x2adf2c){const _0x48004b=a126_0x2c82,_0x11ad96=_0xc4d7e4();while(!![]){try{const _0x18c0f0=-parseInt(_0x48004b(0x109))/0x1*(-parseInt(_0x48004b(0x107))/0x2)+parseInt(_0x48004b(0x110))/0x3+parseInt(_0x48004b(0x11a))/0x4*(-parseInt(_0x48004b(0x126))/0x5)+parseInt(_0x48004b(0x10a))/0x6+-parseInt(_0x48004b(0x10b))/0x7*(-parseInt(_0x48004b(0x129))/0x8)+parseInt(_0x48004b(0x12f))/0x9*(-parseInt(_0x48004b(0x12a))/0xa)+-parseInt(_0x48004b(0x124))/0xb*(parseInt(_0x48004b(0x120))/0xc);if(_0x18c0f0===_0x2adf2c)break;else _0x11ad96['push'](_0x11ad96['shift']());}catch(_0x1a8863){_0x11ad96['push'](_0x11ad96['shift']());}}}(a126_0x2c91,0xbe757));function a126_0x2c82(_0x711ac1,_0x40056e){_0x711ac1=_0x711ac1-0x107;const _0x2c9107=a126_0x2c91();let _0x2c8264=_0x2c9107[_0x711ac1];return _0x2c8264;}function a126_0x2c91(){const _0x60ce1e=['info','3605lghmVt','7946934xNPvhE','14uitIMH','path','Fetched\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','stringify','1525821LCvFNY','map','update-menu-cdn-url','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','loadScriptMode','Create\x20menu\x20\x22','total','Update\x20menu\x20','create-menu','568iTzrRw','import','get-online-menu-list','length','Update\x20menu\x20assets\x20\x22','Updating\x20menu\x20asset\x20links:\x20','55332YZTtpV','resources','\x20menu\x20group(s)','Creating\x20menu:\x20','2332CRHUCr','menuGroups','30055aFTlOo','Menu\x20created\x20successfully:\x20','\x20menu','4304504HwsWbr','4752570vVndLh','menus','create-menus','label','procode','18QkwYim','362SsTZQY'];a126_0x2c91=function(){return _0x60ce1e;};return a126_0x2c91();}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a126_0x1ec342,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x113e2b,_0x762a34){const _0xbb1886=a126_0x2c82,_0x3e405e=getEnv();logger[_0xbb1886(0x108)](_0xbb1886(0x11c),isProduction(_0x3e405e)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x113e2b+')':_0xbb1886(0x113)+_0x113e2b+')');const _0x3606d4=await fetchMenuSnapshot(_0x113e2b,_0x762a34,{'verbose':!![]});return logger['info'](_0xbb1886(0x11c),_0xbb1886(0x10d)+_0x3606d4[_0xbb1886(0x117)]+'\x20online\x20menus\x20successfully'),_0x3606d4[_0xbb1886(0x12b)][_0xbb1886(0x111)](toProcessedMenuItem);}export async function createMenu(_0x5e649c,_0x19877d,_0x74f16e){const _0x1f15b4=a126_0x2c82;logger['info'](_0x1f15b4(0x119),_0x1f15b4(0x123)+_0x74f16e[_0x1f15b4(0x12d)]+'\x20('+_0x74f16e[_0x1f15b4(0x10c)]+')');const _0xbb34c0={'appCode':_0x5e649c,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x1f15b4(0x11b),'resources':_0x74f16e['resources']?JSON[_0x1f15b4(0x10f)](_0x74f16e['resources']):undefined},..._0x74f16e},_0x3a3b48=await createMenuRecord(_0xbb34c0,_0x19877d,_0x1f15b4(0x116)+_0x74f16e[_0x1f15b4(0x12d)]+'\x22');return logger['info']('create-menu','Menu\x20created\x20successfully:\x20'+_0x74f16e[_0x1f15b4(0x12d)]),_0x3a3b48;}async function createSingleMenu(_0x3ad161,_0x45cde2,_0x398d35,_0x144ab1){const _0x2d736d=a126_0x2c82,_0x47dfd3={'appCode':_0x3ad161,'type':_0x2d736d(0x12e),'sort':0x0,'extend':{'loadScriptMode':_0x2d736d(0x11b),'resources':_0x144ab1?JSON[_0x2d736d(0x10f)](_0x144ab1):undefined},'label':_0x398d35[_0x2d736d(0x12d)],'path':_0x398d35[_0x2d736d(0x10c)]},_0x2118c7=await createMenuRecord(_0x47dfd3,_0x45cde2,_0x2d736d(0x116)+_0x398d35['label']+'\x22');return logger['info'](_0x2d736d(0x119),_0x2d736d(0x127)+_0x398d35[_0x2d736d(0x12d)]),_0x2118c7;}export async function createMenus(_0x30da79,_0x506ba3,_0x43e71a,_0x23d225){const _0x49c390=a126_0x2c82;logger['info'](_0x49c390(0x12c),_0x49c390(0x10e)+_0x43e71a['length']);const _0xb766e1=await Promise['all'](_0x43e71a[_0x49c390(0x111)](_0x54cd35=>createSingleMenu(_0x30da79,_0x506ba3,_0x54cd35,_0x23d225)));return logger[_0x49c390(0x108)]('create-menus',_0x49c390(0x114)+_0x43e71a[_0x49c390(0x11d)]),_0xb766e1;}export async function updateMenuCdnUrl(_0x1360f8,_0x419980,_0x5b61b8){const _0x10282f=a126_0x2c82;logger[_0x10282f(0x108)](_0x10282f(0x112),_0x10282f(0x11f)+_0x5b61b8['label']+'\x20('+_0x5b61b8[_0x10282f(0x10c)]+')');const _0x2f4b3f={'id':_0x5b61b8['id'],'appCode':_0x1360f8,'extend':{..._0x5b61b8['extend']??{},..._0x5b61b8[_0x10282f(0x115)]?{'loadScriptMode':_0x5b61b8[_0x10282f(0x115)]}:{},'resources':_0x5b61b8[_0x10282f(0x121)]?JSON[_0x10282f(0x10f)](_0x5b61b8['resources']):undefined}},_0x5c6542=await updateMenuRecord(_0x2f4b3f,_0x419980,_0x10282f(0x11e)+_0x5b61b8['label']+'\x22');return logger['info'](_0x10282f(0x112),'Menu\x20assets\x20synced:\x20'+_0x5b61b8[_0x10282f(0x12d)],undefined),_0x5c6542;}export async function createMenuEntity(_0x576e6c,_0x218d74,_0x2f7e58){const _0x4663d3=a126_0x2c82;return createMenuRecord({'appCode':_0x576e6c,..._0x2f7e58},_0x218d74,_0x4663d3(0x116)+_0x2f7e58[_0x4663d3(0x12d)]+'\x22');}export async function updateMenuEntity(_0x3531fb,_0x230c70,_0x48f8e6){const _0x2e344e=a126_0x2c82;return updateMenuRecord({'appCode':_0x3531fb,..._0x48f8e6},_0x230c70,_0x2e344e(0x118)+_0x48f8e6['id']);}export async function batchDeleteMenuEntities(_0x55fbad,_0x381b9f){const _0x53f572=a126_0x2c82;return batchDeleteMenuRecords(_0x381b9f,_0x55fbad,'Delete\x20'+_0x381b9f[_0x53f572(0x11d)]+_0x53f572(0x128)+(_0x381b9f[_0x53f572(0x11d)]===0x1?'':'s'));}export async function startMenuRegroup(_0x5b27b0,_0x19cf95){const _0x5ad736=a126_0x2c82;return a126_0x1ec342(_0x19cf95,_0x5b27b0,'Regroup\x20'+_0x19cf95[_0x5ad736(0x125)][_0x5ad736(0x11d)]+_0x5ad736(0x122));}
1
+ (function(_0x1e067,_0x114709){const _0x40badd=a126_0x18f7,_0x4b6d56=_0x1e067();while(!![]){try{const _0x3a2e71=-parseInt(_0x40badd(0x17f))/0x1*(parseInt(_0x40badd(0x187))/0x2)+-parseInt(_0x40badd(0x198))/0x3+-parseInt(_0x40badd(0x184))/0x4*(parseInt(_0x40badd(0x174))/0x5)+parseInt(_0x40badd(0x189))/0x6+parseInt(_0x40badd(0x19b))/0x7+parseInt(_0x40badd(0x182))/0x8*(parseInt(_0x40badd(0x19a))/0x9)+parseInt(_0x40badd(0x197))/0xa;if(_0x3a2e71===_0x114709)break;else _0x4b6d56['push'](_0x4b6d56['shift']());}catch(_0x5e218d){_0x4b6d56['push'](_0x4b6d56['shift']());}}}(a126_0x55de,0x4975b));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a126_0x48ed1e,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1d46ae,_0x5049f5){const _0x311d07=a126_0x18f7,_0x24b2d8=getEnv();logger[_0x311d07(0x178)](_0x311d07(0x183),isProduction(_0x24b2d8)?_0x311d07(0x18c)+_0x1d46ae+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x1d46ae+')');const _0xaed9c7=await fetchMenuSnapshot(_0x1d46ae,_0x5049f5,{'verbose':!![]});return logger[_0x311d07(0x178)](_0x311d07(0x183),_0x311d07(0x176)+_0xaed9c7[_0x311d07(0x18b)]+_0x311d07(0x17c)),_0xaed9c7[_0x311d07(0x185)][_0x311d07(0x179)](toProcessedMenuItem);}export async function createMenu(_0x113cee,_0x414204,_0x394a16){const _0x453b63=a126_0x18f7;logger[_0x453b63(0x178)]('create-menu',_0x453b63(0x188)+_0x394a16['label']+'\x20('+_0x394a16[_0x453b63(0x17b)]+')');const _0x5dbde3={'appCode':_0x113cee,'type':_0x453b63(0x177),'sort':0x0,'extend':{'loadScriptMode':_0x453b63(0x186),'resources':_0x394a16[_0x453b63(0x191)]?JSON['stringify'](_0x394a16['resources']):undefined},..._0x394a16},_0x2db26d=await createMenuRecord(_0x5dbde3,_0x414204,_0x453b63(0x193)+_0x394a16[_0x453b63(0x192)]+'\x22');return logger[_0x453b63(0x178)](_0x453b63(0x199),_0x453b63(0x181)+_0x394a16['label']),_0x2db26d;}async function createSingleMenu(_0x5c3c34,_0x5001db,_0x10c30a,_0x2c1f28){const _0x1853df=a126_0x18f7,_0x31187e={'appCode':_0x5c3c34,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x1853df(0x186),'resources':_0x2c1f28?JSON[_0x1853df(0x17e)](_0x2c1f28):undefined},'label':_0x10c30a['label'],'path':_0x10c30a[_0x1853df(0x17b)]},_0x585576=await createMenuRecord(_0x31187e,_0x5001db,'Create\x20menu\x20\x22'+_0x10c30a[_0x1853df(0x192)]+'\x22');return logger[_0x1853df(0x178)]('create-menu','Menu\x20created\x20successfully:\x20'+_0x10c30a[_0x1853df(0x192)]),_0x585576;}function a126_0x55de(){const _0x5f526c=['loadScriptMode','Start\x20batch\x20menu\x20creation,\x20total\x20','resources','label','Create\x20menu\x20\x22','all','\x20menu','create-menus','1282050mFSZoA','959334tqUYtl','create-menu','1302903XVmtxT','969605MIQLbu','95vrASMg','\x20menu\x20group(s)','Fetched\x20','procode','info','map','length','path','\x20online\x20menus\x20successfully','menuGroups','stringify','13560jzgwqt','Delete\x20','Menu\x20created\x20successfully:\x20','24gMETNn','get-online-menu-list','70484akxoiy','menus','import','16LERJzW','Creating\x20menu:\x20','2177562YpGGNA','Regroup\x20','total','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','update-menu-cdn-url','Updating\x20menu\x20asset\x20links:\x20'];a126_0x55de=function(){return _0x5f526c;};return a126_0x55de();}export async function createMenus(_0x33874a,_0x171f0f,_0x3b7200,_0x2bc031){const _0xb254ff=a126_0x18f7;logger[_0xb254ff(0x178)](_0xb254ff(0x196),_0xb254ff(0x190)+_0x3b7200['length']);const _0x574c2c=await Promise[_0xb254ff(0x194)](_0x3b7200['map'](_0x181e52=>createSingleMenu(_0x33874a,_0x171f0f,_0x181e52,_0x2bc031)));return logger[_0xb254ff(0x178)](_0xb254ff(0x196),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x3b7200['length']),_0x574c2c;}export async function updateMenuCdnUrl(_0x506bac,_0x1e6f6a,_0x3ef614){const _0xa2cec2=a126_0x18f7;logger[_0xa2cec2(0x178)]('update-menu-cdn-url',_0xa2cec2(0x18e)+_0x3ef614[_0xa2cec2(0x192)]+'\x20('+_0x3ef614['path']+')');const _0xfde7dd={'id':_0x3ef614['id'],'appCode':_0x506bac,'extend':{..._0x3ef614['extend']??{},..._0x3ef614['loadScriptMode']?{'loadScriptMode':_0x3ef614[_0xa2cec2(0x18f)]}:{},'resources':_0x3ef614[_0xa2cec2(0x191)]?JSON[_0xa2cec2(0x17e)](_0x3ef614[_0xa2cec2(0x191)]):undefined}},_0x755caa=await updateMenuRecord(_0xfde7dd,_0x1e6f6a,'Update\x20menu\x20assets\x20\x22'+_0x3ef614['label']+'\x22');return logger[_0xa2cec2(0x178)](_0xa2cec2(0x18d),'Menu\x20assets\x20synced:\x20'+_0x3ef614[_0xa2cec2(0x192)],undefined),_0x755caa;}function a126_0x18f7(_0x1d6642,_0x1b8280){_0x1d6642=_0x1d6642-0x174;const _0x55de3d=a126_0x55de();let _0x18f7be=_0x55de3d[_0x1d6642];return _0x18f7be;}export async function createMenuEntity(_0x52c9cc,_0x1f0c21,_0x42dd8d){const _0x222e37=a126_0x18f7;return createMenuRecord({'appCode':_0x52c9cc,..._0x42dd8d},_0x1f0c21,_0x222e37(0x193)+_0x42dd8d[_0x222e37(0x192)]+'\x22');}export async function updateMenuEntity(_0x3f9b94,_0x4e161b,_0x56ca36){return updateMenuRecord({'appCode':_0x3f9b94,..._0x56ca36},_0x4e161b,'Update\x20menu\x20'+_0x56ca36['id']);}export async function batchDeleteMenuEntities(_0x5e961a,_0x39795b){const _0x1ea167=a126_0x18f7;return batchDeleteMenuRecords(_0x39795b,_0x5e961a,_0x1ea167(0x180)+_0x39795b[_0x1ea167(0x17a)]+_0x1ea167(0x195)+(_0x39795b['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x4047ed,_0x4c6879){const _0x2771ec=a126_0x18f7;return a126_0x48ed1e(_0x4c6879,_0x4047ed,_0x2771ec(0x18a)+_0x4c6879[_0x2771ec(0x17d)]['length']+_0x2771ec(0x175));}
@@ -0,0 +1,7 @@
1
+ import type { MenuSyncParams, SyncResult } from "../../../commands/menu/shared/types.js";
2
+ interface MenuSyncOptions {
3
+ dryRun?: boolean;
4
+ }
5
+ export declare function runMenuSyncCore(appCode: string, cookie: string, selectedPaths?: string[], paramsFlag?: string, options?: MenuSyncOptions): Promise<SyncResult>;
6
+ export declare function parseMenuSyncParams(paramsFlag: unknown): MenuSyncParams;
7
+ export {};
@@ -1 +1 @@
1
- const a127_0x2def76=a127_0x2509;function a127_0x2509(_0x43f2fd,_0x12a918){_0x43f2fd=_0x43f2fd-0x1eb;const _0x5bfac5=a127_0x5bfa();let _0x250986=_0x5bfac5[_0x43f2fd];return _0x250986;}(function(_0x16ebff,_0x37f3d1){const _0x2d533b=a127_0x2509,_0xdb6369=_0x16ebff();while(!![]){try{const _0x1cecca=-parseInt(_0x2d533b(0x1eb))/0x1+-parseInt(_0x2d533b(0x217))/0x2*(parseInt(_0x2d533b(0x213))/0x3)+-parseInt(_0x2d533b(0x212))/0x4*(parseInt(_0x2d533b(0x211))/0x5)+parseInt(_0x2d533b(0x208))/0x6*(-parseInt(_0x2d533b(0x1f2))/0x7)+-parseInt(_0x2d533b(0x214))/0x8*(-parseInt(_0x2d533b(0x202))/0x9)+parseInt(_0x2d533b(0x1f1))/0xa*(-parseInt(_0x2d533b(0x21b))/0xb)+parseInt(_0x2d533b(0x21c))/0xc*(parseInt(_0x2d533b(0x1ff))/0xd);if(_0x1cecca===_0x37f3d1)break;else _0xdb6369['push'](_0xdb6369['shift']());}catch(_0xf4dd76){_0xdb6369['push'](_0xdb6369['shift']());}}}(a127_0x5bfa,0x76688));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl',a127_0x2def76(0x1fb)]);function validateParams(_0x463a78){const _0x2e7580=a127_0x2def76,_0x41be13=[];return _0x463a78[_0x2e7580(0x203)]&&!isValidJsHttpsUrl(_0x463a78['jsUrl'])&&_0x41be13[_0x2e7580(0x1f8)]({'field':'jsUrl','message':_0x2e7580(0x207)}),_0x463a78[_0x2e7580(0x1fb)]&&!isValidCssHttpsUrl(_0x463a78[_0x2e7580(0x1fb)])&&_0x41be13[_0x2e7580(0x1f8)]({'field':_0x2e7580(0x1fb),'message':_0x2e7580(0x201)}),_0x41be13;}function a127_0x5bfa(){const _0x398399=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','1223958xMfJuq','No\x20local\x20pages\x20matched\x20paths:\x20','info','join','import','CSS\x20URL\x20is\x20unreachable:\x20','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params\x20fields:\x20','isArray','26020KGLeXp','252QnTxuk','1227uZOUzp','2240dmuYkM','path','has','3746isFMPO','menu-sync','Menu\x20sync\x20completed','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','484qCfGAQ','36Mhobvy','get','364691fKaawl','keys','pages','map','hasOwn','dryRun','47290FcoqDb','7Xphcnh','setLogPath',':\x20expected\x20a\x20non-empty\x20string.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','trim','Start\x20non-interactive\x20menu\x20sync','push','Invalid\x20--params.','filter','cssUrl','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','length','label','10073219GjMtsM','\x0a\x20\x20Available\x20local\x20paths:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','999MUbFFz','jsUrl','Invalid\x20--params\x20JSON.','message','string'];a127_0x5bfa=function(){return _0x398399;};return a127_0x5bfa();}export async function runMenuSyncCore(_0x5835a2,_0xf78cf0,_0x5f40e3=[],_0x3a63dc,_0x4626fe={}){const _0x35090d=a127_0x2def76,_0x7e3da9=parseMenuSyncParams(_0x3a63dc),_0x7850d4=[...new Set(_0x5f40e3[_0x35090d(0x1ee)](_0x55a7a8=>_0x55a7a8[_0x35090d(0x1f6)]())[_0x35090d(0x1fa)](Boolean))],_0x43c3f6=_0x7e3da9['jsUrl'],_0x3b615f=_0x7e3da9[_0x35090d(0x1fb)],_0x33e8fe=[];if(_0x43c3f6)_0x33e8fe['push'](_0x43c3f6);if(_0x3b615f)_0x33e8fe[_0x35090d(0x1f8)](_0x3b615f);const _0x2afaa7=validateParams(_0x7e3da9);if(_0x2afaa7[_0x35090d(0x1fd)]>0x0){const _0x508d36=_0x2afaa7[_0x35090d(0x1ee)](_0x4d0252=>'--params.'+_0x4d0252['field']+':\x20'+_0x4d0252[_0x35090d(0x205)])[_0x35090d(0x20b)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x508d36);}logger[_0x35090d(0x1f3)](process['cwd']()),logger['info'](_0x35090d(0x218),_0x35090d(0x1f7),{'appCode':_0x5835a2,'selectedCount':_0x7850d4[_0x35090d(0x1fd)],'jsUrl':_0x43c3f6,'cssUrl':_0x3b615f});if(_0x43c3f6){const _0x3f13fb=await isUrlReachable(_0x43c3f6);if(!_0x3f13fb)throw new Error(_0x35090d(0x20e)+_0x43c3f6);}if(_0x3b615f){const _0x5cda10=await isUrlReachable(_0x3b615f);if(!_0x5cda10)throw new Error(_0x35090d(0x20d)+_0x3b615f);}const _0x26df8a=getLocalPages();if(_0x26df8a['length']===0x0){if(_0x7850d4[_0x35090d(0x1fd)]>0x0)throw new Error(_0x35090d(0x209)+_0x7850d4[_0x35090d(0x20b)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4626fe[_0x35090d(0x1f0)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x134845=await getOnlineMenuList(_0x5835a2,_0xf78cf0),_0x5466d5=new Set(_0x134845[_0x35090d(0x1ee)](_0x26df8b=>_0x26df8b['path']));let _0xe386f2;if(_0x7850d4['length']>0x0){const _0x22b39a=new Map(_0x26df8a['map'](_0x23f7b0=>[_0x23f7b0[_0x35090d(0x215)],_0x23f7b0])),_0x44c697=_0x7850d4['filter'](_0x5e63f1=>!_0x22b39a[_0x35090d(0x216)](_0x5e63f1));if(_0x44c697[_0x35090d(0x1fd)]>0x0){const _0x2bf514=_0x26df8a[_0x35090d(0x1ee)](_0x5bc4bc=>_0x5bc4bc[_0x35090d(0x215)])['join'](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x44c697['join'](',\x20')+_0x35090d(0x200)+_0x2bf514);}const _0x1dc9b6=_0x7850d4[_0x35090d(0x1fa)](_0xfbb241=>_0x5466d5[_0x35090d(0x216)](_0xfbb241));if(_0x1dc9b6[_0x35090d(0x1fd)]>0x0)throw new Error(_0x35090d(0x1f5)+_0x1dc9b6['join'](',\x20'));_0xe386f2=_0x7850d4[_0x35090d(0x1ee)](_0x38c1b4=>_0x22b39a[_0x35090d(0x21d)](_0x38c1b4));}else _0xe386f2=_0x26df8a[_0x35090d(0x1fa)](_0x5613c0=>!_0x5466d5['has'](_0x5613c0[_0x35090d(0x215)]));if(_0xe386f2[_0x35090d(0x1fd)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4626fe[_0x35090d(0x1f0)]===!![],'targetPages':[],'plannedMenus':[]};const _0x411652=_0xe386f2['map'](_0x1cc254=>({'type':'procode','path':_0x1cc254['path'],'label':_0x1cc254[_0x35090d(0x1fe)],'loadScriptMode':_0x35090d(0x20c),'resources':[..._0x33e8fe]}));if(_0x4626fe[_0x35090d(0x1f0)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0xe386f2,'plannedMenus':_0x411652};const _0x858bc5=await createMenus(_0x5835a2,_0xf78cf0,_0xe386f2,_0x33e8fe[_0x35090d(0x1fd)]>0x0?_0x33e8fe:undefined);return logger[_0x35090d(0x20a)]('menu-sync',_0x35090d(0x219),{'count':_0xe386f2[_0x35090d(0x1fd)],'resources':_0x33e8fe}),{'created':_0x858bc5[_0x35090d(0x1fd)],'skipped':![],'dryRun':![],'targetPages':_0xe386f2,'plannedMenus':_0x411652,'menus':_0x858bc5};}export function parseMenuSyncParams(_0x27e032){const _0xd597fa=a127_0x2def76;if(!_0x27e032||typeof _0x27e032!==_0xd597fa(0x206))return{};let _0x2b7b27;try{_0x2b7b27=JSON['parse'](_0x27e032);}catch{throw new Error(_0xd597fa(0x204));}if(typeof _0x2b7b27!=='object'||_0x2b7b27===null||Array[_0xd597fa(0x210)](_0x2b7b27))throw new Error(_0xd597fa(0x21a));const _0x4f0a65=_0x2b7b27;if(Object[_0xd597fa(0x1ef)](_0x4f0a65,_0xd597fa(0x1ed)))throw new Error(_0xd597fa(0x1fc));const _0x24515a=Object[_0xd597fa(0x1ec)](_0x4f0a65)[_0xd597fa(0x1fa)](_0x51afca=>!MENU_SYNC_PARAM_KEYS[_0xd597fa(0x216)](_0x51afca));if(_0x24515a[_0xd597fa(0x1fd)]>0x0)throw new Error(_0xd597fa(0x20f)+_0x24515a[_0xd597fa(0x20b)](',\x20')+'.');for(const _0x16ea08 of MENU_SYNC_PARAM_KEYS){const _0x23c163=_0x4f0a65[_0x16ea08];if(_0x23c163!==undefined&&(typeof _0x23c163!==_0xd597fa(0x206)||_0x23c163[_0xd597fa(0x1f6)]()===''))throw new Error(_0xd597fa(0x1f9)+_0x16ea08+_0xd597fa(0x1f4));}return{'jsUrl':typeof _0x4f0a65[_0xd597fa(0x203)]===_0xd597fa(0x206)?_0x4f0a65[_0xd597fa(0x203)][_0xd597fa(0x1f6)]():undefined,'cssUrl':typeof _0x4f0a65[_0xd597fa(0x1fb)]==='string'?_0x4f0a65[_0xd597fa(0x1fb)][_0xd597fa(0x1f6)]():undefined};}
1
+ const a127_0x465525=a127_0x247a;function a127_0x5cfb(){const _0x4cc623=['jsUrl','863020xhkLNq','CSS\x20URL\x20is\x20unreachable:\x20','procode','No\x20local\x20pages\x20matched\x20paths:\x20','trim','\x0a\x20\x20Available\x20local\x20paths:\x20','path','cwd','dryRun','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','object','10YQkcbp','JS\x20URL\x20is\x20unreachable:\x20','262470PrIlEQ','hasOwn','Invalid\x20--params\x20fields:\x20','map','--params.','menu-sync','36786bSHxfS','parse','has','pages','join','3349611clMuiX','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','info','839814glHKfn','Invalid\x20--params:\x20','cssUrl','52mTYvaH','field','319DFzWnx','length','setLogPath','keys','Invalid\x20--params\x20JSON.','Menu\x20sync\x20completed','8RcamEI',':\x20expected\x20a\x20non-empty\x20string.','string','filter','push','3321927IZVnSN','get','470285DfWBhW','message'];a127_0x5cfb=function(){return _0x4cc623;};return a127_0x5cfb();}(function(_0x46d55d,_0x223def){const _0x4bd906=a127_0x247a,_0x1ae9ee=_0x46d55d();while(!![]){try{const _0x2550a8=-parseInt(_0x4bd906(0x105))/0x1+parseInt(_0x4bd906(0x108))/0x2+parseInt(_0x4bd906(0x11b))/0x3*(-parseInt(_0x4bd906(0xf6))/0x4)+-parseInt(_0x4bd906(0x113))/0x5*(parseInt(_0x4bd906(0x123))/0x6)+parseInt(_0x4bd906(0x103))/0x7+-parseInt(_0x4bd906(0xfe))/0x8*(parseInt(_0x4bd906(0x120))/0x9)+parseInt(_0x4bd906(0x115))/0xa*(parseInt(_0x4bd906(0xf8))/0xb);if(_0x2550a8===_0x223def)break;else _0x1ae9ee['push'](_0x1ae9ee['shift']());}catch(_0x51536c){_0x1ae9ee['push'](_0x1ae9ee['shift']());}}}(a127_0x5cfb,0x5e192));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a127_0x465525(0x107),a127_0x465525(0xf5)]);function a127_0x247a(_0x45a448,_0x5a68cb){_0x45a448=_0x45a448-0xf4;const _0x5cfb1a=a127_0x5cfb();let _0x247ada=_0x5cfb1a[_0x45a448];return _0x247ada;}function validateParams(_0x5fe28c){const _0x2f6c4c=a127_0x465525,_0x53651c=[];return _0x5fe28c[_0x2f6c4c(0x107)]&&!isValidJsHttpsUrl(_0x5fe28c[_0x2f6c4c(0x107)])&&_0x53651c[_0x2f6c4c(0x102)]({'field':_0x2f6c4c(0x107),'message':_0x2f6c4c(0x121)}),_0x5fe28c['cssUrl']&&!isValidCssHttpsUrl(_0x5fe28c[_0x2f6c4c(0xf5)])&&_0x53651c[_0x2f6c4c(0x102)]({'field':_0x2f6c4c(0xf5),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x53651c;}export async function runMenuSyncCore(_0x5ed897,_0x54ba12,_0x47c150=[],_0x498717,_0x2a3994={}){const _0x38678a=a127_0x465525,_0xca1329=parseMenuSyncParams(_0x498717),_0x1374f4=[...new Set(_0x47c150[_0x38678a(0x118)](_0x1317d5=>_0x1317d5[_0x38678a(0x10c)]())[_0x38678a(0x101)](Boolean))],_0x319e4a=_0xca1329[_0x38678a(0x107)],_0x510708=_0xca1329[_0x38678a(0xf5)],_0x18dad7=[];if(_0x319e4a)_0x18dad7[_0x38678a(0x102)](_0x319e4a);if(_0x510708)_0x18dad7[_0x38678a(0x102)](_0x510708);const _0x4550fb=validateParams(_0xca1329);if(_0x4550fb[_0x38678a(0xf9)]>0x0){const _0x35034d=_0x4550fb[_0x38678a(0x118)](_0x2f298b=>_0x38678a(0x119)+_0x2f298b[_0x38678a(0xf7)]+':\x20'+_0x2f298b[_0x38678a(0x106)])[_0x38678a(0x11f)](';\x20');throw new Error(_0x38678a(0xf4)+_0x35034d);}logger[_0x38678a(0xfa)](process[_0x38678a(0x10f)]()),logger['info'](_0x38678a(0x11a),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x5ed897,'selectedCount':_0x1374f4[_0x38678a(0xf9)],'jsUrl':_0x319e4a,'cssUrl':_0x510708});if(_0x319e4a){const _0x3b3d34=await isUrlReachable(_0x319e4a);if(!_0x3b3d34)throw new Error(_0x38678a(0x114)+_0x319e4a);}if(_0x510708){const _0x382f54=await isUrlReachable(_0x510708);if(!_0x382f54)throw new Error(_0x38678a(0x109)+_0x510708);}const _0x3cc999=getLocalPages();if(_0x3cc999[_0x38678a(0xf9)]===0x0){if(_0x1374f4[_0x38678a(0xf9)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x1374f4[_0x38678a(0x11f)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x2a3994[_0x38678a(0x110)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x151fb0=await getOnlineMenuList(_0x5ed897,_0x54ba12),_0x180cbe=new Set(_0x151fb0[_0x38678a(0x118)](_0x155470=>_0x155470['path']));let _0x2bfbdd;if(_0x1374f4[_0x38678a(0xf9)]>0x0){const _0x187ab2=new Map(_0x3cc999[_0x38678a(0x118)](_0x387cda=>[_0x387cda[_0x38678a(0x10e)],_0x387cda])),_0x2c952f=_0x1374f4[_0x38678a(0x101)](_0x33cb02=>!_0x187ab2[_0x38678a(0x11d)](_0x33cb02));if(_0x2c952f[_0x38678a(0xf9)]>0x0){const _0x6281ac=_0x3cc999[_0x38678a(0x118)](_0xe2f215=>_0xe2f215[_0x38678a(0x10e)])[_0x38678a(0x11f)](',\x20');throw new Error(_0x38678a(0x10b)+_0x2c952f['join'](',\x20')+_0x38678a(0x10d)+_0x6281ac);}const _0x334c19=_0x1374f4[_0x38678a(0x101)](_0x546059=>_0x180cbe[_0x38678a(0x11d)](_0x546059));if(_0x334c19['length']>0x0)throw new Error(_0x38678a(0x111)+_0x334c19['join'](',\x20'));_0x2bfbdd=_0x1374f4['map'](_0xe88aae=>_0x187ab2[_0x38678a(0x104)](_0xe88aae));}else _0x2bfbdd=_0x3cc999['filter'](_0x21d553=>!_0x180cbe[_0x38678a(0x11d)](_0x21d553[_0x38678a(0x10e)]));if(_0x2bfbdd[_0x38678a(0xf9)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x2a3994[_0x38678a(0x110)]===!![],'targetPages':[],'plannedMenus':[]};const _0x586842=_0x2bfbdd['map'](_0xc499f7=>({'type':_0x38678a(0x10a),'path':_0xc499f7[_0x38678a(0x10e)],'label':_0xc499f7['label'],'loadScriptMode':'import','resources':[..._0x18dad7]}));if(_0x2a3994[_0x38678a(0x110)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x2bfbdd,'plannedMenus':_0x586842};const _0x304e21=await createMenus(_0x5ed897,_0x54ba12,_0x2bfbdd,_0x18dad7[_0x38678a(0xf9)]>0x0?_0x18dad7:undefined);return logger[_0x38678a(0x122)](_0x38678a(0x11a),_0x38678a(0xfd),{'count':_0x2bfbdd[_0x38678a(0xf9)],'resources':_0x18dad7}),{'created':_0x304e21['length'],'skipped':![],'dryRun':![],'targetPages':_0x2bfbdd,'plannedMenus':_0x586842,'menus':_0x304e21};}export function parseMenuSyncParams(_0xab555){const _0x11b715=a127_0x465525;if(!_0xab555||typeof _0xab555!=='string')return{};let _0x3540af;try{_0x3540af=JSON[_0x11b715(0x11c)](_0xab555);}catch{throw new Error(_0x11b715(0xfc));}if(typeof _0x3540af!==_0x11b715(0x112)||_0x3540af===null||Array['isArray'](_0x3540af))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x547276=_0x3540af;if(Object[_0x11b715(0x116)](_0x547276,_0x11b715(0x11e)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x10a118=Object[_0x11b715(0xfb)](_0x547276)[_0x11b715(0x101)](_0x27904e=>!MENU_SYNC_PARAM_KEYS[_0x11b715(0x11d)](_0x27904e));if(_0x10a118[_0x11b715(0xf9)]>0x0)throw new Error(_0x11b715(0x117)+_0x10a118[_0x11b715(0x11f)](',\x20')+'.');for(const _0x4166e5 of MENU_SYNC_PARAM_KEYS){const _0x3eb3ce=_0x547276[_0x4166e5];if(_0x3eb3ce!==undefined&&(typeof _0x3eb3ce!==_0x11b715(0x100)||_0x3eb3ce[_0x11b715(0x10c)]()===''))throw new Error('Invalid\x20--params.'+_0x4166e5+_0x11b715(0xff));}return{'jsUrl':typeof _0x547276['jsUrl']===_0x11b715(0x100)?_0x547276[_0x11b715(0x107)]['trim']():undefined,'cssUrl':typeof _0x547276[_0x11b715(0xf5)]===_0x11b715(0x100)?_0x547276[_0x11b715(0xf5)][_0x11b715(0x10c)]():undefined};}
@@ -0,0 +1,162 @@
1
+ /**
2
+ * menu shared types
3
+ */
4
+ import type { MenuCreateRecordInput, MenuMutationRecord, MenuTreeRecord, MenuUpdateRecordInput } from "../../../core/api-client.js";
5
+ export type Menu = MenuCreateRecordInput;
6
+ export type OriginalMenuItem = MenuTreeRecord;
7
+ export type UpdateMenu = MenuUpdateRecordInput;
8
+ export type MenuMutationEntity = MenuMutationRecord;
9
+ export interface UpdateMenuCdnUrlParams {
10
+ id: number;
11
+ label: string;
12
+ path: string;
13
+ resources?: string[];
14
+ extend?: Record<string, unknown> | null;
15
+ loadScriptMode?: MenuLoadScriptMode;
16
+ }
17
+ export interface LocalPage {
18
+ path: string;
19
+ label: string;
20
+ }
21
+ export interface ProcessedMenuItem {
22
+ id: number;
23
+ path: string;
24
+ label: string;
25
+ resources: string[];
26
+ extend?: Record<string, unknown> | null;
27
+ }
28
+ export interface MenuFact {
29
+ id: number;
30
+ parentId: number | null;
31
+ depth: number;
32
+ label: string;
33
+ path: string;
34
+ url: string;
35
+ type: string;
36
+ visible: boolean | null;
37
+ sort: number | null;
38
+ resources: string[];
39
+ resourcesValid: boolean;
40
+ childrenIds: number[];
41
+ childrenCount: number;
42
+ pageId: number | null;
43
+ pageType: string;
44
+ modelType: string;
45
+ datasetId: number | null;
46
+ datasetCode: string;
47
+ updateUserId: string | null;
48
+ updateUserName: string | null;
49
+ updateTime: string | number | null;
50
+ extend?: Record<string, unknown> | null;
51
+ }
52
+ export type MenuListItem = Omit<MenuFact, "modelType" | "datasetId" | "datasetCode" | "resourcesValid">;
53
+ export interface MenuSnapshot {
54
+ total: number;
55
+ hash: string;
56
+ menus: MenuFact[];
57
+ byId: Map<number, MenuFact>;
58
+ }
59
+ export interface MenuMutationError {
60
+ code: string;
61
+ message: string;
62
+ hint?: string;
63
+ }
64
+ export interface MenuMutationResult {
65
+ operation: string;
66
+ selector: Record<string, unknown>;
67
+ before: MenuFact | Record<string, unknown> | null;
68
+ after: MenuFact | Record<string, unknown> | null;
69
+ dryRun: boolean;
70
+ backend: Array<{
71
+ method: "POST";
72
+ path: string;
73
+ }>;
74
+ plannedActions?: Array<{
75
+ stage: string;
76
+ method: "POST";
77
+ path: string;
78
+ body: Record<string, unknown>;
79
+ condition?: string;
80
+ }>;
81
+ targets?: MenuFact[];
82
+ deleteOrder?: number[];
83
+ snapshotHash: string;
84
+ cascade?: {
85
+ pages: number[];
86
+ pageSchemaAffected: boolean;
87
+ };
88
+ planFile?: {
89
+ path: string;
90
+ createdAt: string;
91
+ expiresAt: string;
92
+ };
93
+ succeeded: Array<Record<string, unknown>>;
94
+ failed: Array<Record<string, unknown>>;
95
+ warnings: string[];
96
+ verification?: Record<string, unknown>;
97
+ error?: MenuMutationError;
98
+ }
99
+ export interface MenuSyncParams {
100
+ jsUrl?: string;
101
+ cssUrl?: string;
102
+ }
103
+ export interface MenuUpdateParams {
104
+ jsUrl?: string;
105
+ cssUrl?: string;
106
+ }
107
+ export type MenuUpdateMode = "replace" | "patch";
108
+ export type MenuLoadScriptMode = "import" | "script" | "fetch";
109
+ export interface MenuUpdateSelection {
110
+ all: boolean;
111
+ menuIds: number[];
112
+ paths: string[];
113
+ }
114
+ export interface MenuUpdateDiff {
115
+ id: number;
116
+ label: string;
117
+ path: string;
118
+ mode: MenuUpdateMode;
119
+ before: {
120
+ resources: string[];
121
+ loadScriptMode?: string | null;
122
+ };
123
+ after: {
124
+ resources: string[];
125
+ loadScriptMode?: string | null;
126
+ };
127
+ warnings: string[];
128
+ }
129
+ export interface MenuSyncResult {
130
+ created: number;
131
+ failed: number;
132
+ labels: string[];
133
+ }
134
+ export interface MenuUpdateResult {
135
+ updated: number;
136
+ failed: number;
137
+ }
138
+ export interface SyncResult {
139
+ created: number;
140
+ skipped: boolean;
141
+ dryRun?: boolean;
142
+ targetPages: {
143
+ path: string;
144
+ label: string;
145
+ }[];
146
+ plannedMenus?: Array<{
147
+ type: "procode";
148
+ path: string;
149
+ label: string;
150
+ loadScriptMode: "import";
151
+ resources: string[];
152
+ }>;
153
+ menus?: MenuMutationEntity[];
154
+ }
155
+ export interface UpdateResult {
156
+ updated: number;
157
+ failed: number;
158
+ skipped: boolean;
159
+ menus?: MenuMutationEntity[];
160
+ dryRun?: boolean;
161
+ diffs?: MenuUpdateDiff[];
162
+ }
@@ -0,0 +1,11 @@
1
+ import type { MenuLoadScriptMode, MenuUpdateMode, MenuUpdateSelection, ProcessedMenuItem, UpdateResult } from "../../../commands/menu/shared/types.js";
2
+ interface MenuUpdateOptions {
3
+ mode?: MenuUpdateMode;
4
+ dryRun?: boolean;
5
+ force?: boolean;
6
+ selection?: MenuUpdateSelection;
7
+ loadScriptMode?: MenuLoadScriptMode;
8
+ }
9
+ export declare function runMenuUpdateCore(appCode: string, cookie: string, paramsFlag?: string, options?: MenuUpdateOptions): Promise<UpdateResult>;
10
+ export declare function selectMenusForUpdate(menusWithResources: ProcessedMenuItem[], selection: MenuUpdateSelection): ProcessedMenuItem[];
11
+ export {};
@@ -1 +1 @@
1
- (function(_0x278db7,_0xf771c9){const _0xd93c45=a129_0x55f4,_0x4385c1=_0x278db7();while(!![]){try{const _0x23ce58=-parseInt(_0xd93c45(0x106))/0x1*(parseInt(_0xd93c45(0x105))/0x2)+parseInt(_0xd93c45(0xf3))/0x3+parseInt(_0xd93c45(0x11b))/0x4*(parseInt(_0xd93c45(0xe7))/0x5)+-parseInt(_0xd93c45(0xfa))/0x6+parseInt(_0xd93c45(0xf1))/0x7+-parseInt(_0xd93c45(0x102))/0x8*(parseInt(_0xd93c45(0xed))/0x9)+parseInt(_0xd93c45(0xfe))/0xa*(parseInt(_0xd93c45(0x115))/0xb);if(_0x23ce58===_0xf771c9)break;else _0x4385c1['push'](_0x4385c1['shift']());}catch(_0x79f51a){_0x4385c1['push'](_0x4385c1['shift']());}}}(a129_0x379c,0x5c552));function a129_0x379c(){const _0xeec41b=['length','1621611MRImmn','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','resources','.\x20Allowed\x20values:\x20replace,\x20patch','4118821ihbDFI','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','1055382wzlvsS','force','allSettled','Start\x20non-interactive\x20menu\x20asset\x20update','dryRun','filter','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','2203518yaJCuy','Invalid\x20--params:\x20','rejected','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','582040mlXwzC','mode','endsWith','toLowerCase','8yytTzx','field','string','774ttyRpW','1721lLpmlq','path','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','loadScriptMode','\x22\x20(','menu-asset-update','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu\x20asset-update\x20cannot\x20patch\x20','paths','CSS\x20URL\x20is\x20unreachable:\x20','replace','extend','label','push','selection','22wJklfy','cwd','value','patch','parse','jsUrl','1070096sdLZAu','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','info','setLogPath','has','menuIds','object','split','\x20existing\x20CSS\x20resources\x20for\x20\x22','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','cssUrl','status','map','unshift','some','all','isArray','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','trim','10OrEbDa','fulfilled','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','join',').\x20'];a129_0x379c=function(){return _0xeec41b;};return a129_0x379c();}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x30550d){const _0x20dd71=a129_0x55f4,_0xf3a13=[];return _0x30550d[_0x20dd71(0x11a)]&&!isValidJsHttpsUrl(_0x30550d['jsUrl'])&&_0xf3a13[_0x20dd71(0x113)]({'field':_0x20dd71(0x11a),'message':_0x20dd71(0x108)}),_0x30550d['cssUrl']&&!isValidCssHttpsUrl(_0x30550d[_0x20dd71(0x125)])&&_0xf3a13[_0x20dd71(0x113)]({'field':_0x20dd71(0x125),'message':_0x20dd71(0x10c)}),_0xf3a13;}export async function runMenuUpdateCore(_0x2f598a,_0x4d775b,_0x3e6377,_0x50e496={}){const _0x4c86be=a129_0x55f4,_0x11868d=parseUpdateParamsFlag(_0x3e6377),_0x5f0913=normalizeMode(_0x50e496[_0x4c86be(0xff)]);validateSelection(_0x50e496['selection']);const _0x59aeb8=[];if(_0x11868d[_0x4c86be(0x11a)])_0x59aeb8['push'](_0x11868d['jsUrl']);if(_0x11868d[_0x4c86be(0x125)])_0x59aeb8[_0x4c86be(0x113)](_0x11868d[_0x4c86be(0x125)]);const _0x38e921=validateParams(_0x11868d);if(_0x38e921[_0x4c86be(0xec)]>0x0){const _0x478d18=_0x38e921[_0x4c86be(0x127)](_0xd59c9e=>'--params.'+_0xd59c9e[_0x4c86be(0x103)]+':\x20'+_0xd59c9e['message'])[_0x4c86be(0xea)](';\x20');throw new Error(_0x4c86be(0xfb)+_0x478d18);}if(_0x59aeb8[_0x4c86be(0xec)]===0x0)throw new Error(_0x4c86be(0xe9)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x4c86be(0x11e)](process[_0x4c86be(0x116)]()),logger[_0x4c86be(0x11d)](_0x4c86be(0x10b),_0x4c86be(0xf6),{'appCode':_0x2f598a,'jsUrl':_0x11868d[_0x4c86be(0x11a)],'cssUrl':_0x11868d[_0x4c86be(0x125)],'mode':_0x5f0913,'dryRun':_0x50e496['dryRun']===!![]});if(_0x11868d['jsUrl']){const _0xf78706=await isUrlReachable(_0x11868d['jsUrl']);if(!_0xf78706)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x11868d[_0x4c86be(0x11a)]);}if(_0x11868d[_0x4c86be(0x125)]){const _0x4389ed=await isUrlReachable(_0x11868d[_0x4c86be(0x125)]);if(!_0x4389ed)throw new Error(_0x4c86be(0x10f)+_0x11868d[_0x4c86be(0x125)]);}const _0x323529=await getOnlineMenuList(_0x2f598a,_0x4d775b),_0x4985b8=_0x323529[_0x4c86be(0xf8)](_0x2837e1=>_0x2837e1['resources']['length']>0x0),_0x3fdbbd=selectMenusForUpdate(_0x4985b8,_0x50e496[_0x4c86be(0x114)]);if(_0x3fdbbd['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x50e496[_0x4c86be(0xf7)]===!![]};const _0x2ce8bf=_0x3fdbbd[_0x4c86be(0x127)](_0x10d510=>buildMenuUpdateDiff(_0x10d510,_0x11868d,_0x5f0913,_0x50e496[_0x4c86be(0xf4)]===!![],_0x50e496[_0x4c86be(0x109)]));if(_0x50e496[_0x4c86be(0xf7)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2ce8bf};const _0x621b3a=await Promise[_0x4c86be(0xf5)](_0x3fdbbd[_0x4c86be(0x127)]((_0x5b4583,_0x2b59fe)=>updateMenuCdnUrl(_0x2f598a,_0x4d775b,{'id':_0x5b4583['id'],'label':_0x5b4583[_0x4c86be(0x112)],'path':_0x5b4583['path'],'resources':_0x2ce8bf[_0x2b59fe]['after'][_0x4c86be(0xef)],'extend':_0x5b4583['extend']??null,'loadScriptMode':_0x50e496['loadScriptMode']}))),_0x381c0e=_0x621b3a['filter'](_0x391e14=>_0x391e14[_0x4c86be(0x126)]===_0x4c86be(0xe8))[_0x4c86be(0x127)](_0xa64af9=>_0xa64af9[_0x4c86be(0x117)]),_0x3cab6f=_0x621b3a[_0x4c86be(0xf8)](_0x4c52a9=>_0x4c52a9['status']===_0x4c86be(0xfc))[_0x4c86be(0xec)];return logger['info'](_0x4c86be(0x10b),'Menu\x20asset\x20update\x20completed',{'count':_0x3fdbbd['length'],'resources':_0x59aeb8}),{'updated':_0x381c0e[_0x4c86be(0xec)],'failed':_0x3cab6f,'skipped':![],'menus':_0x381c0e};}function validateSelection(_0x190e76){const _0x15d971=a129_0x55f4;if(!_0x190e76)throw new Error(_0x15d971(0x11c));if(_0x190e76[_0x15d971(0xe3)]&&(_0x190e76[_0x15d971(0x120)][_0x15d971(0xec)]>0x0||_0x190e76[_0x15d971(0x10e)]['length']>0x0))throw new Error(_0x15d971(0xf9));if(!_0x190e76['all']&&_0x190e76[_0x15d971(0x120)]['length']===0x0&&_0x190e76[_0x15d971(0x10e)][_0x15d971(0xec)]===0x0)throw new Error(_0x15d971(0x11c));}export function selectMenusForUpdate(_0x26c6ee,_0x334569){const _0x32e72e=a129_0x55f4;validateSelection(_0x334569);if(_0x334569[_0x32e72e(0xe3)])return _0x26c6ee;const _0x1e8e66=new Set(_0x26c6ee[_0x32e72e(0x127)](_0x497ec0=>_0x497ec0['id'])),_0x11d9c7=new Set(_0x26c6ee[_0x32e72e(0x127)](_0xd2564b=>_0xd2564b[_0x32e72e(0x107)])),_0x3de1b5=_0x334569['menuIds']['filter'](_0xd6ab6e=>!_0x1e8e66[_0x32e72e(0x11f)](_0xd6ab6e)),_0x1abc07=_0x334569[_0x32e72e(0x10e)][_0x32e72e(0xf8)](_0x47d2ee=>!_0x11d9c7[_0x32e72e(0x11f)](_0x47d2ee));if(_0x3de1b5[_0x32e72e(0xec)]>0x0||_0x1abc07[_0x32e72e(0xec)]>0x0){const _0x162c34=[..._0x3de1b5[_0x32e72e(0x127)](_0x32d481=>String(_0x32d481)),..._0x1abc07][_0x32e72e(0xea)](',\x20');throw new Error(_0x32e72e(0xee)+_0x162c34);}const _0x384235=new Set(_0x334569[_0x32e72e(0x120)]),_0x131ce4=new Set(_0x334569[_0x32e72e(0x10e)]);return _0x26c6ee[_0x32e72e(0xf8)](_0x191029=>_0x384235[_0x32e72e(0x11f)](_0x191029['id'])||_0x131ce4['has'](_0x191029[_0x32e72e(0x107)]));}function normalizeMode(_0xb447a0){const _0x581ea5=a129_0x55f4;if(!_0xb447a0)return _0x581ea5(0x118);if(_0xb447a0===_0x581ea5(0x110)||_0xb447a0===_0x581ea5(0x118))return _0xb447a0;throw new Error('Invalid\x20--mode:\x20'+_0xb447a0+_0x581ea5(0xf0));}function a129_0x55f4(_0x1dec26,_0x1a89df){_0x1dec26=_0x1dec26-0xe3;const _0x379cf7=a129_0x379c();let _0x55f48d=_0x379cf7[_0x1dec26];return _0x55f48d;}function buildMenuUpdateDiff(_0x1316d6,_0x29cc2b,_0x26c022,_0x3aeac7,_0x288c6b){const _0x1f67c0=a129_0x55f4,_0x22604f=[..._0x1316d6['resources']];_0x26c022===_0x1f67c0(0x118)&&assertUnambiguousPatchResources(_0x1316d6,_0x22604f,_0x29cc2b);const _0xe8ebaa=_0x26c022===_0x1f67c0(0x118)?patchResources(_0x22604f,_0x29cc2b):replaceResources(_0x29cc2b),_0x122612=[],_0x2a5658=_0x22604f['some'](isJsResource),_0x5b8557=_0xe8ebaa[_0x1f67c0(0x129)](isJsResource);if(_0x2a5658&&!_0x5b8557){const _0x40b230=_0x1f67c0(0xf2)+_0x1316d6[_0x1f67c0(0x112)]+_0x1f67c0(0x10a)+_0x1316d6['path']+_0x1f67c0(0xeb)+_0x1f67c0(0x124);if(!_0x3aeac7)throw new Error(_0x40b230);_0x122612[_0x1f67c0(0x113)](_0x40b230);}const _0x10bccc=_0x22604f[_0x1f67c0(0x129)](isCssResource),_0x3efece=_0xe8ebaa['some'](isCssResource);_0x10bccc&&!_0x3efece&&_0x122612[_0x1f67c0(0x113)](_0x1f67c0(0xe5)+_0x1316d6['label']+'\x22\x20('+_0x1316d6[_0x1f67c0(0x107)]+').');const _0x33a62b=typeof _0x1316d6[_0x1f67c0(0x111)]?.[_0x1f67c0(0x109)]===_0x1f67c0(0x104)?_0x1316d6[_0x1f67c0(0x111)][_0x1f67c0(0x109)]:null,_0x3e6ad0=_0x288c6b?{'loadScriptMode':_0x33a62b}:{},_0x377882=_0x288c6b?{'loadScriptMode':_0x288c6b}:{};return{'id':_0x1316d6['id'],'label':_0x1316d6['label'],'path':_0x1316d6[_0x1f67c0(0x107)],'mode':_0x26c022,'before':{'resources':_0x22604f,..._0x3e6ad0},'after':{'resources':_0xe8ebaa,..._0x377882},'warnings':_0x122612};}function replaceResources(_0x4949ea){const _0x46a2d9=a129_0x55f4;return[_0x4949ea[_0x46a2d9(0x11a)],_0x4949ea[_0x46a2d9(0x125)]][_0x46a2d9(0xf8)](_0x1bb754=>!!_0x1bb754);}function assertUnambiguousPatchResources(_0x3d657f,_0x2ed3ae,_0x14a566){const _0x24b6bb=a129_0x55f4,_0x48987b=_0x2ed3ae[_0x24b6bb(0xf8)](isJsResource)[_0x24b6bb(0xec)];if(_0x14a566['jsUrl']&&_0x48987b>0x1)throw new Error(_0x24b6bb(0x10d)+_0x48987b+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x3d657f[_0x24b6bb(0x112)]+_0x24b6bb(0x10a)+_0x3d657f[_0x24b6bb(0x107)]+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x421ed8=_0x2ed3ae[_0x24b6bb(0xf8)](isCssResource)['length'];if(_0x14a566[_0x24b6bb(0x125)]&&_0x421ed8>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x421ed8+_0x24b6bb(0x123)+_0x3d657f['label']+_0x24b6bb(0x10a)+_0x3d657f[_0x24b6bb(0x107)]+')\x20'+_0x24b6bb(0xfd));}function patchResources(_0x878321,_0x574dd1){const _0x594e4d=a129_0x55f4;let _0x5dbe39=![],_0x2a6a2e=![];const _0x4ccc80=[];for(const _0x257b47 of _0x878321){if(isJsResource(_0x257b47)){if(_0x574dd1[_0x594e4d(0x11a)]&&!_0x5dbe39)_0x4ccc80['push'](_0x574dd1[_0x594e4d(0x11a)]),_0x5dbe39=!![];else!_0x574dd1[_0x594e4d(0x11a)]&&_0x4ccc80['push'](_0x257b47);continue;}if(isCssResource(_0x257b47)){if(_0x574dd1[_0x594e4d(0x125)]&&!_0x2a6a2e)_0x4ccc80[_0x594e4d(0x113)](_0x574dd1[_0x594e4d(0x125)]),_0x2a6a2e=!![];else!_0x574dd1[_0x594e4d(0x125)]&&_0x4ccc80[_0x594e4d(0x113)](_0x257b47);continue;}_0x4ccc80[_0x594e4d(0x113)](_0x257b47);}return _0x574dd1[_0x594e4d(0x11a)]&&!_0x5dbe39&&_0x4ccc80[_0x594e4d(0x128)](_0x574dd1['jsUrl']),_0x574dd1['cssUrl']&&!_0x2a6a2e&&_0x4ccc80[_0x594e4d(0x113)](_0x574dd1[_0x594e4d(0x125)]),_0x4ccc80;}function isJsResource(_0x17a34c){const _0x411ee1=a129_0x55f4;return stripQuery(_0x17a34c)[_0x411ee1(0x101)]()[_0x411ee1(0x100)]('.js');}function isCssResource(_0x217a41){const _0x1e1ea3=a129_0x55f4;return stripQuery(_0x217a41)['toLowerCase']()[_0x1e1ea3(0x100)]('.css');}function stripQuery(_0x639ca9){const _0x138450=a129_0x55f4;return _0x639ca9[_0x138450(0x122)]('?')[0x0]??_0x639ca9;}function parseUpdateParamsFlag(_0x37c215){const _0x36e66a=a129_0x55f4;if(!_0x37c215||typeof _0x37c215!==_0x36e66a(0x104))return{};try{const _0x7b9d2f=JSON[_0x36e66a(0x119)](_0x37c215);if(typeof _0x7b9d2f!==_0x36e66a(0x121)||_0x7b9d2f===null||Array[_0x36e66a(0xe4)](_0x7b9d2f))return{};return{'jsUrl':typeof _0x7b9d2f['jsUrl']===_0x36e66a(0x104)?_0x7b9d2f['jsUrl'][_0x36e66a(0xe6)]():undefined,'cssUrl':typeof _0x7b9d2f[_0x36e66a(0x125)]===_0x36e66a(0x104)?_0x7b9d2f['cssUrl'][_0x36e66a(0xe6)]():undefined};}catch{return{};}}
1
+ (function(_0x30144a,_0x4787eb){const _0x2158f7=a129_0x89bd,_0x82561a=_0x30144a();while(!![]){try{const _0x1de900=parseInt(_0x2158f7(0x1ef))/0x1+-parseInt(_0x2158f7(0x1d5))/0x2+parseInt(_0x2158f7(0x203))/0x3*(parseInt(_0x2158f7(0x1f1))/0x4)+parseInt(_0x2158f7(0x1f4))/0x5*(-parseInt(_0x2158f7(0x1e8))/0x6)+-parseInt(_0x2158f7(0x1e4))/0x7*(parseInt(_0x2158f7(0x1e0))/0x8)+-parseInt(_0x2158f7(0x1e9))/0x9*(parseInt(_0x2158f7(0x1d6))/0xa)+parseInt(_0x2158f7(0x1e3))/0xb;if(_0x1de900===_0x4787eb)break;else _0x82561a['push'](_0x82561a['shift']());}catch(_0x4bcad2){_0x82561a['push'](_0x82561a['shift']());}}}(a129_0x2a9a,0x390ad));function a129_0x89bd(_0xef08be,_0x5b8293){_0xef08be=_0xef08be-0x1c4;const _0x2a9a63=a129_0x2a9a();let _0x89bdd8=_0x2a9a63[_0xef08be];return _0x89bdd8;}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x4fb84b){const _0x1b88ca=a129_0x89bd,_0x40ea91=[];return _0x4fb84b[_0x1b88ca(0x202)]&&!isValidJsHttpsUrl(_0x4fb84b['jsUrl'])&&_0x40ea91[_0x1b88ca(0x1fc)]({'field':_0x1b88ca(0x202),'message':_0x1b88ca(0x1eb)}),_0x4fb84b[_0x1b88ca(0x1f6)]&&!isValidCssHttpsUrl(_0x4fb84b['cssUrl'])&&_0x40ea91[_0x1b88ca(0x1fc)]({'field':_0x1b88ca(0x1f6),'message':_0x1b88ca(0x1e5)}),_0x40ea91;}export async function runMenuUpdateCore(_0x3bbfae,_0x11896d,_0x1c22cb,_0x269289={}){const _0x501884=a129_0x89bd,_0x580957=parseUpdateParamsFlag(_0x1c22cb),_0x39c579=normalizeMode(_0x269289['mode']);validateSelection(_0x269289[_0x501884(0x1ee)]);const _0xc2ae18=[];if(_0x580957[_0x501884(0x202)])_0xc2ae18[_0x501884(0x1fc)](_0x580957['jsUrl']);if(_0x580957[_0x501884(0x1f6)])_0xc2ae18[_0x501884(0x1fc)](_0x580957[_0x501884(0x1f6)]);const _0x5b4f9c=validateParams(_0x580957);if(_0x5b4f9c[_0x501884(0x1cd)]>0x0){const _0x102479=_0x5b4f9c['map'](_0x2d783a=>_0x501884(0x1ce)+_0x2d783a[_0x501884(0x1f7)]+':\x20'+_0x2d783a[_0x501884(0x1cf)])[_0x501884(0x1c7)](';\x20');throw new Error(_0x501884(0x1fe)+_0x102479);}if(_0xc2ae18[_0x501884(0x1cd)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger['setLogPath'](process[_0x501884(0x1dc)]()),logger[_0x501884(0x1d7)](_0x501884(0x1fd),_0x501884(0x1df),{'appCode':_0x3bbfae,'jsUrl':_0x580957[_0x501884(0x202)],'cssUrl':_0x580957[_0x501884(0x1f6)],'mode':_0x39c579,'dryRun':_0x269289['dryRun']===!![]});if(_0x580957[_0x501884(0x202)]){const _0x210df1=await isUrlReachable(_0x580957[_0x501884(0x202)]);if(!_0x210df1)throw new Error(_0x501884(0x1c6)+_0x580957[_0x501884(0x202)]);}if(_0x580957[_0x501884(0x1f6)]){const _0xfa8031=await isUrlReachable(_0x580957[_0x501884(0x1f6)]);if(!_0xfa8031)throw new Error(_0x501884(0x1f3)+_0x580957[_0x501884(0x1f6)]);}const _0x156cd7=await getOnlineMenuList(_0x3bbfae,_0x11896d),_0x43cc69=_0x156cd7[_0x501884(0x1ec)](_0x65de4f=>_0x65de4f[_0x501884(0x1d9)]['length']>0x0),_0x32c5e0=selectMenusForUpdate(_0x43cc69,_0x269289[_0x501884(0x1ee)]);if(_0x32c5e0['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x269289[_0x501884(0x1c9)]===!![]};const _0x3f3bd6=_0x32c5e0[_0x501884(0x1ff)](_0x342c5a=>buildMenuUpdateDiff(_0x342c5a,_0x580957,_0x39c579,_0x269289['force']===!![],_0x269289['loadScriptMode']));if(_0x269289[_0x501884(0x1c9)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x3f3bd6};const _0x412502=await Promise['allSettled'](_0x32c5e0[_0x501884(0x1ff)]((_0x39da2f,_0x3b3d99)=>updateMenuCdnUrl(_0x3bbfae,_0x11896d,{'id':_0x39da2f['id'],'label':_0x39da2f[_0x501884(0x1e6)],'path':_0x39da2f[_0x501884(0x1fa)],'resources':_0x3f3bd6[_0x3b3d99]['after']['resources'],'extend':_0x39da2f[_0x501884(0x1f5)]??null,'loadScriptMode':_0x269289[_0x501884(0x1e1)]}))),_0x37a880=_0x412502[_0x501884(0x1ec)](_0x1d1b93=>_0x1d1b93[_0x501884(0x1ca)]==='fulfilled')[_0x501884(0x1ff)](_0x43a0fa=>_0x43a0fa[_0x501884(0x1dd)]),_0x219af4=_0x412502[_0x501884(0x1ec)](_0x5cfa3c=>_0x5cfa3c[_0x501884(0x1ca)]===_0x501884(0x1ed))[_0x501884(0x1cd)];return logger[_0x501884(0x1d7)](_0x501884(0x1fd),'Menu\x20asset\x20update\x20completed',{'count':_0x32c5e0[_0x501884(0x1cd)],'resources':_0xc2ae18}),{'updated':_0x37a880[_0x501884(0x1cd)],'failed':_0x219af4,'skipped':![],'menus':_0x37a880};}function validateSelection(_0x38b35e){const _0x32fbb8=a129_0x89bd;if(!_0x38b35e)throw new Error(_0x32fbb8(0x1ea));if(_0x38b35e[_0x32fbb8(0x1d3)]&&(_0x38b35e['menuIds'][_0x32fbb8(0x1cd)]>0x0||_0x38b35e[_0x32fbb8(0x1d2)][_0x32fbb8(0x1cd)]>0x0))throw new Error(_0x32fbb8(0x1cb));if(!_0x38b35e[_0x32fbb8(0x1d3)]&&_0x38b35e[_0x32fbb8(0x200)][_0x32fbb8(0x1cd)]===0x0&&_0x38b35e[_0x32fbb8(0x1d2)][_0x32fbb8(0x1cd)]===0x0)throw new Error(_0x32fbb8(0x1ea));}export function selectMenusForUpdate(_0x6cf4bf,_0x1a52a0){const _0x1cc83=a129_0x89bd;validateSelection(_0x1a52a0);if(_0x1a52a0['all'])return _0x6cf4bf;const _0x2fc9df=new Set(_0x6cf4bf[_0x1cc83(0x1ff)](_0x44bc5a=>_0x44bc5a['id'])),_0xef5833=new Set(_0x6cf4bf[_0x1cc83(0x1ff)](_0x1be06d=>_0x1be06d[_0x1cc83(0x1fa)])),_0xdcf45d=_0x1a52a0[_0x1cc83(0x200)][_0x1cc83(0x1ec)](_0x32058f=>!_0x2fc9df[_0x1cc83(0x1db)](_0x32058f)),_0x4a8857=_0x1a52a0['paths'][_0x1cc83(0x1ec)](_0x51f155=>!_0xef5833[_0x1cc83(0x1db)](_0x51f155));if(_0xdcf45d[_0x1cc83(0x1cd)]>0x0||_0x4a8857[_0x1cc83(0x1cd)]>0x0){const _0x443ee5=[..._0xdcf45d[_0x1cc83(0x1ff)](_0xc9e64d=>String(_0xc9e64d)),..._0x4a8857]['join'](',\x20');throw new Error(_0x1cc83(0x1f8)+_0x443ee5);}const _0x5a80ba=new Set(_0x1a52a0['menuIds']),_0x317afa=new Set(_0x1a52a0[_0x1cc83(0x1d2)]);return _0x6cf4bf['filter'](_0x5e2567=>_0x5a80ba[_0x1cc83(0x1db)](_0x5e2567['id'])||_0x317afa[_0x1cc83(0x1db)](_0x5e2567[_0x1cc83(0x1fa)]));}function normalizeMode(_0x3f95ef){const _0x49959d=a129_0x89bd;if(!_0x3f95ef)return _0x49959d(0x1d1);if(_0x3f95ef===_0x49959d(0x1d8)||_0x3f95ef===_0x49959d(0x1d1))return _0x3f95ef;throw new Error('Invalid\x20--mode:\x20'+_0x3f95ef+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x36cb60,_0x55291d,_0x493e83,_0x558ed4,_0x35aa87){const _0x2092de=a129_0x89bd,_0x46cb6c=[..._0x36cb60[_0x2092de(0x1d9)]];_0x493e83===_0x2092de(0x1d1)&&assertUnambiguousPatchResources(_0x36cb60,_0x46cb6c,_0x55291d);const _0x417a6c=_0x493e83==='patch'?patchResources(_0x46cb6c,_0x55291d):replaceResources(_0x55291d),_0x14197a=[],_0x7db154=_0x46cb6c['some'](isJsResource),_0x2b6e3b=_0x417a6c[_0x2092de(0x1de)](isJsResource);if(_0x7db154&&!_0x2b6e3b){const _0x28de56=_0x2092de(0x1d4)+_0x36cb60[_0x2092de(0x1e6)]+_0x2092de(0x1f2)+_0x36cb60['path']+').\x20'+_0x2092de(0x1c4);if(!_0x558ed4)throw new Error(_0x28de56);_0x14197a[_0x2092de(0x1fc)](_0x28de56);}const _0x1f3046=_0x46cb6c[_0x2092de(0x1de)](isCssResource),_0x5923a3=_0x417a6c['some'](isCssResource);_0x1f3046&&!_0x5923a3&&_0x14197a[_0x2092de(0x1fc)](_0x2092de(0x1e7)+_0x36cb60[_0x2092de(0x1e6)]+_0x2092de(0x1f2)+_0x36cb60[_0x2092de(0x1fa)]+').');const _0x360a46=typeof _0x36cb60['extend']?.['loadScriptMode']===_0x2092de(0x1c8)?_0x36cb60[_0x2092de(0x1f5)][_0x2092de(0x1e1)]:null,_0x209efc=_0x35aa87?{'loadScriptMode':_0x360a46}:{},_0x4c1d88=_0x35aa87?{'loadScriptMode':_0x35aa87}:{};return{'id':_0x36cb60['id'],'label':_0x36cb60['label'],'path':_0x36cb60['path'],'mode':_0x493e83,'before':{'resources':_0x46cb6c,..._0x209efc},'after':{'resources':_0x417a6c,..._0x4c1d88},'warnings':_0x14197a};}function replaceResources(_0x45a366){const _0x5f4fc0=a129_0x89bd;return[_0x45a366['jsUrl'],_0x45a366[_0x5f4fc0(0x1f6)]][_0x5f4fc0(0x1ec)](_0x315593=>!!_0x315593);}function assertUnambiguousPatchResources(_0x419960,_0x3b62ad,_0x190c26){const _0x502eab=a129_0x89bd,_0x48e412=_0x3b62ad[_0x502eab(0x1ec)](isJsResource)[_0x502eab(0x1cd)];if(_0x190c26['jsUrl']&&_0x48e412>0x1)throw new Error(_0x502eab(0x1c5)+_0x48e412+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x419960[_0x502eab(0x1e6)]+_0x502eab(0x1f2)+_0x419960['path']+')\x20'+_0x502eab(0x1d0));const _0x359e78=_0x3b62ad[_0x502eab(0x1ec)](isCssResource)[_0x502eab(0x1cd)];if(_0x190c26['cssUrl']&&_0x359e78>0x1)throw new Error(_0x502eab(0x1c5)+_0x359e78+_0x502eab(0x1f0)+_0x419960[_0x502eab(0x1e6)]+_0x502eab(0x1f2)+_0x419960[_0x502eab(0x1fa)]+')\x20'+_0x502eab(0x1e2));}function patchResources(_0x499ebf,_0x531409){const _0x3d7aec=a129_0x89bd;let _0x88171a=![],_0x211a8b=![];const _0x18473e=[];for(const _0x47a376 of _0x499ebf){if(isJsResource(_0x47a376)){if(_0x531409[_0x3d7aec(0x202)]&&!_0x88171a)_0x18473e[_0x3d7aec(0x1fc)](_0x531409[_0x3d7aec(0x202)]),_0x88171a=!![];else!_0x531409['jsUrl']&&_0x18473e[_0x3d7aec(0x1fc)](_0x47a376);continue;}if(isCssResource(_0x47a376)){if(_0x531409[_0x3d7aec(0x1f6)]&&!_0x211a8b)_0x18473e[_0x3d7aec(0x1fc)](_0x531409[_0x3d7aec(0x1f6)]),_0x211a8b=!![];else!_0x531409[_0x3d7aec(0x1f6)]&&_0x18473e[_0x3d7aec(0x1fc)](_0x47a376);continue;}_0x18473e['push'](_0x47a376);}return _0x531409[_0x3d7aec(0x202)]&&!_0x88171a&&_0x18473e[_0x3d7aec(0x1fb)](_0x531409['jsUrl']),_0x531409[_0x3d7aec(0x1f6)]&&!_0x211a8b&&_0x18473e[_0x3d7aec(0x1fc)](_0x531409['cssUrl']),_0x18473e;}function a129_0x2a9a(){const _0x4b79db=['map','menuIds','endsWith','jsUrl','207219eMTwls','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menu\x20asset-update\x20cannot\x20patch\x20','JS\x20URL\x20is\x20unreachable:\x20','join','string','dryRun','status','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','trim','length','--params.','message','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','patch','paths','all','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','450430XVTqqI','25220CxUXQg','info','replace','resources','toLowerCase','has','cwd','value','some','Start\x20non-interactive\x20menu\x20asset\x20update','344mnfenP','loadScriptMode','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','297143xdoAki','40243ukosTH','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','label','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','18vWOxvq','54CvthCR','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','filter','rejected','selection','343993coJuwM','\x20existing\x20CSS\x20resources\x20for\x20\x22','24iikzrl','\x22\x20(','CSS\x20URL\x20is\x20unreachable:\x20','107075ziRbgr','extend','cssUrl','field','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','.css','path','unshift','push','menu-asset-update','Invalid\x20--params:\x20'];a129_0x2a9a=function(){return _0x4b79db;};return a129_0x2a9a();}function isJsResource(_0x439bf9){return stripQuery(_0x439bf9)['toLowerCase']()['endsWith']('.js');}function isCssResource(_0x489ba9){const _0x5876ce=a129_0x89bd;return stripQuery(_0x489ba9)[_0x5876ce(0x1da)]()[_0x5876ce(0x201)](_0x5876ce(0x1f9));}function stripQuery(_0x3e67b8){return _0x3e67b8['split']('?')[0x0]??_0x3e67b8;}function parseUpdateParamsFlag(_0x2a95d1){const _0xd074ae=a129_0x89bd;if(!_0x2a95d1||typeof _0x2a95d1!==_0xd074ae(0x1c8))return{};try{const _0x3322c6=JSON['parse'](_0x2a95d1);if(typeof _0x3322c6!=='object'||_0x3322c6===null||Array['isArray'](_0x3322c6))return{};return{'jsUrl':typeof _0x3322c6[_0xd074ae(0x202)]===_0xd074ae(0x1c8)?_0x3322c6[_0xd074ae(0x202)][_0xd074ae(0x1cc)]():undefined,'cssUrl':typeof _0x3322c6[_0xd074ae(0x1f6)]===_0xd074ae(0x1c8)?_0x3322c6['cssUrl']['trim']():undefined};}catch{return{};}}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * URL validation utilities for menu commands
3
+ */
4
+ export declare function isValidJsHttpsUrl(url: string): boolean;
5
+ export declare function isValidCssHttpsUrl(url: string): boolean;
6
+ export declare function isUrlReachable(url: string): Promise<boolean>;
@@ -1 +1 @@
1
- function a130_0x53e4(_0x356195,_0xab0baf){_0x356195=_0x356195-0x1af;const _0x4a6d66=a130_0x4a6d();let _0x53e4d1=_0x4a6d66[_0x356195];return _0x53e4d1;}(function(_0x59ec7d,_0x3451a0){const _0x2b14a3=a130_0x53e4,_0x4e10a2=_0x59ec7d();while(!![]){try{const _0x2d579a=parseInt(_0x2b14a3(0x1b2))/0x1*(parseInt(_0x2b14a3(0x1b0))/0x2)+parseInt(_0x2b14a3(0x1b4))/0x3+-parseInt(_0x2b14a3(0x1b3))/0x4+-parseInt(_0x2b14a3(0x1b7))/0x5+parseInt(_0x2b14a3(0x1b5))/0x6*(parseInt(_0x2b14a3(0x1af))/0x7)+-parseInt(_0x2b14a3(0x1b6))/0x8+-parseInt(_0x2b14a3(0x1ba))/0x9;if(_0x2d579a===_0x3451a0)break;else _0x4e10a2['push'](_0x4e10a2['shift']());}catch(_0x5ed878){_0x4e10a2['push'](_0x4e10a2['shift']());}}}(a130_0x4a6d,0x82f66));export function isValidJsHttpsUrl(_0xe3cf03){const _0x4c9dce=a130_0x53e4;return/^https:\/\/.+\.js(\?.*)?$/[_0x4c9dce(0x1b8)](_0xe3cf03[_0x4c9dce(0x1b9)]());}function a130_0x4a6d(){const _0x180921=['138fwmARt','2567360ojIqBA','1427370euHwXI','test','trim','3152088dwcXhz','318381jHAQgx','716670vsHvni','HEAD','2QePFJY','3125864ZJmhJn','1535205AXWmyK'];a130_0x4a6d=function(){return _0x180921;};return a130_0x4a6d();}export function isValidCssHttpsUrl(_0x34a9dd){const _0x21e0d8=a130_0x53e4;return/^https:\/\/.+\.css(\?.*)?$/[_0x21e0d8(0x1b8)](_0x34a9dd['trim']());}export async function isUrlReachable(_0x599468){const _0x5ce046=a130_0x53e4;try{const _0x25d606=await fetch(_0x599468,{'method':_0x5ce046(0x1b1)});return _0x25d606['ok'];}catch{return![];}}
1
+ (function(_0x179cd2,_0x1df9a3){const _0x18fa24=a130_0x3276,_0xdd18bc=_0x179cd2();while(!![]){try{const _0x5978af=parseInt(_0x18fa24(0x167))/0x1*(parseInt(_0x18fa24(0x165))/0x2)+-parseInt(_0x18fa24(0x16e))/0x3*(-parseInt(_0x18fa24(0x172))/0x4)+parseInt(_0x18fa24(0x16f))/0x5*(parseInt(_0x18fa24(0x168))/0x6)+-parseInt(_0x18fa24(0x170))/0x7+-parseInt(_0x18fa24(0x171))/0x8*(-parseInt(_0x18fa24(0x16a))/0x9)+parseInt(_0x18fa24(0x16b))/0xa*(parseInt(_0x18fa24(0x169))/0xb)+-parseInt(_0x18fa24(0x166))/0xc;if(_0x5978af===_0x1df9a3)break;else _0xdd18bc['push'](_0xdd18bc['shift']());}catch(_0x220de7){_0xdd18bc['push'](_0xdd18bc['shift']());}}}(a130_0x2ee4,0xc610e));export function isValidJsHttpsUrl(_0x5aa369){const _0x40188d=a130_0x3276;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x5aa369[_0x40188d(0x16c)]());}export function isValidCssHttpsUrl(_0xef5975){const _0x272c09=a130_0x3276;return/^https:\/\/.+\.css(\?.*)?$/[_0x272c09(0x16d)](_0xef5975[_0x272c09(0x16c)]());}function a130_0x3276(_0x4c4018,_0x2c9784){_0x4c4018=_0x4c4018-0x165;const _0x2ee4fb=a130_0x2ee4();let _0x32761d=_0x2ee4fb[_0x4c4018];return _0x32761d;}function a130_0x2ee4(){const _0x23b622=['test','12HxDRoN','991195lhUtoJ','7693eLxRQg','185208utJdfb','149828xCPWTt','2255102YYKnvZ','44131704VkOLaU','1vsLqXE','42ICBUTh','44qAoztQ','549wEJDhv','1031890ywoIFZ','trim'];a130_0x2ee4=function(){return _0x23b622;};return a130_0x2ee4();}export async function isUrlReachable(_0x3096de){try{const _0x1e1689=await fetch(_0x3096de,{'method':'HEAD'});return _0x1e1689['ok'];}catch{return![];}}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const menuSync: CommandDefinition;
@@ -1 +1 @@
1
- const a131_0x1a3a06=a131_0x25ec;function a131_0x25ec(_0x5c5533,_0x5a3425){_0x5c5533=_0x5c5533-0x1ee;const _0x4e4f9c=a131_0x4e4f();let _0x25eca9=_0x4e4f9c[_0x5c5533];return _0x25eca9;}(function(_0x366a97,_0x2374fb){const _0x48221a=a131_0x25ec,_0x878e8c=_0x366a97();while(!![]){try{const _0x226018=parseInt(_0x48221a(0x1ff))/0x1*(-parseInt(_0x48221a(0x22b))/0x2)+parseInt(_0x48221a(0x21f))/0x3*(-parseInt(_0x48221a(0x231))/0x4)+parseInt(_0x48221a(0x213))/0x5*(-parseInt(_0x48221a(0x1f7))/0x6)+parseInt(_0x48221a(0x230))/0x7*(parseInt(_0x48221a(0x205))/0x8)+parseInt(_0x48221a(0x227))/0x9+parseInt(_0x48221a(0x22c))/0xa*(-parseInt(_0x48221a(0x1f9))/0xb)+-parseInt(_0x48221a(0x207))/0xc*(-parseInt(_0x48221a(0x212))/0xd);if(_0x226018===_0x2374fb)break;else _0x878e8c['push'](_0x878e8c['shift']());}catch(_0x3d1a88){_0x878e8c['push'](_0x878e8c['shift']());}}}(a131_0x4e4f,0x83c90));import a131_0x474074 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a131_0x4e4f(){const _0x692cb=['appCode','\x20menu(s)...','Menu\x20sync\x20completed:\x20','\x20failed.','1770AyGDFJ','Sync\x20local\x20pages\x20as\x20platform\x20menus','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','string','trim','onlinePaths','cookie','message','4923873BnFOUT','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20Create\x20','\x20\x20Cancelled.','859666ncbNaS','112660lZenJC','Would\x20create\x20','Menu\x20creation\x20failed','yellow','6790BJNDwx','2616owDMfE','split','Failed\x20to\x20fetch\x20online\x20menu\x20list','filter','paths','\x20menu(s)\x20created','Pre-fill\x20JS/CSS\x20URLs.\x20','boolean','failed','str','created','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','cyan','\x20page(s)','targetPages','localPages','240798ffnXvR','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','66pLcXMj','size','POST','Menu\x20sync\x20skipped','\x20and\x20CSS:\x20','sync','1ObPtEB','Fetching\x20online\x20menu\x20list...','cssUrl','skipped','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','1768lGNazM','length','1572FFQgnl','write','\x20created.','\x20\x20✓\x20Selected:\x20','selectedAppName','validation','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20menu(s)','gray','rawFlags','93535CvXtnB','35nNlCYo','\x20created,\x20','appcode','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','jsUrl','yes','Online\x20menu\x20list\x20fetched','Non-interactive\x20menu\x20sync\x20requires\x20--yes.'];a131_0x4e4f=function(){return _0x692cb;};return a131_0x4e4f();}export const menuSync={'service':'menu','command':a131_0x1a3a06(0x1fe),'description':a131_0x1a3a06(0x220),'risk':a131_0x1a3a06(0x208),'flags':[{'name':'params','type':a131_0x1a3a06(0x222),'description':a131_0x1a3a06(0x237)+a131_0x1a3a06(0x204)},{'name':a131_0x1a3a06(0x235),'type':a131_0x1a3a06(0x222),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a131_0x1a3a06(0x218),'type':a131_0x1a3a06(0x1ee),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x23ac20){const _0x26f986=a131_0x1a3a06;ensureRunnableContext(_0x23ac20['rawFlags'],_0x23ac20[_0x26f986(0x20b)]);const _0x216ec4=await runMenuSyncCore(_0x23ac20['appCode'],_0x23ac20['cookie'],parsePaths(_0x23ac20[_0x26f986(0x1f0)]('paths')),_0x23ac20[_0x26f986(0x1f0)]('params'),{'dryRun':!![]});return{'method':_0x26f986(0x1fb),'url':'/smartapi/menu/create','body':_0x216ec4,'description':_0x216ec4['skipped']?_0x26f986(0x1f8):_0x26f986(0x22d)+_0x216ec4[_0x26f986(0x1f5)][_0x26f986(0x206)]+'\x20local\x20microfrontend\x20menu(s).'};},async 'execute'(_0x361062){const _0x587db6=a131_0x1a3a06;ensureRunnableContext(_0x361062[_0x587db6(0x211)],_0x361062['selectedAppName']);const _0x4b305b=_0x361062['flag']('yes'),_0x2b8dc2=_0x361062[_0x587db6(0x1f0)]('params'),_0x37f021=parsePaths(_0x361062[_0x587db6(0x1f0)](_0x587db6(0x235))),_0x77642d=parseMenuSyncParams(_0x2b8dc2);if(_0x4b305b){const _0x11a31a=await runMenuSyncCore(_0x361062[_0x587db6(0x21b)],_0x361062[_0x587db6(0x225)],_0x37f021,_0x2b8dc2);if(_0x11a31a[_0x587db6(0x202)]){const _0x22bc2a=getLocalPages();_0x22bc2a[_0x587db6(0x206)]===0x0?writeCliSideChannelLine(_0x587db6(0x221)):writeCliSideChannelLine(_0x587db6(0x1f2));}else writeCliSideChannelLine(_0x587db6(0x228)+_0x11a31a[_0x587db6(0x1f1)]+_0x587db6(0x236));return{'ok':!![],'data':_0x11a31a,'message':_0x11a31a[_0x587db6(0x202)]?_0x587db6(0x1fc):'Menu\x20sync\x20completed:\x20'+_0x11a31a[_0x587db6(0x1f1)]+_0x587db6(0x209)};}if(_0x37f021[_0x587db6(0x206)]>0x0)throw CliErrors[_0x587db6(0x20c)](_0x587db6(0x216),_0x587db6(0x20d));if(!isInteractive()&&_0x2b8dc2)throw CliErrors[_0x587db6(0x20c)](_0x587db6(0x21a),_0x587db6(0x20d));requireInteractive();const _0x4ae102=startSpinner(_0x587db6(0x200));let _0x26720a,_0x4e5d37,_0xd274de;try{const _0x1f0c45=await fetchMenuData(_0x361062[_0x587db6(0x21b)],_0x361062[_0x587db6(0x225)]);_0x26720a=_0x1f0c45[_0x587db6(0x1f6)],_0x4e5d37=_0x1f0c45[_0x587db6(0x224)],_0xd274de=_0x1f0c45['onlineMenuList'],stopSpinner(_0x4ae102,_0x587db6(0x219),!![]);}catch(_0x8094a6){stopSpinner(_0x4ae102,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x587db6(0x20c)](_0x8094a6 instanceof Error?_0x8094a6[_0x587db6(0x226)]:_0x587db6(0x233));}if(_0x26720a['length']===0x0)return writeCliSideChannelLine(a131_0x474074[_0x587db6(0x22f)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x1e3b4f=buildCompareRows(_0x26720a,_0x4e5d37);writeCliSideChannelLine(renderCompareTable(_0x1e3b4f)),writeCliSideChannelLine('');const _0x575495=await selectPages(_0x26720a,_0x4e5d37);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x474074[_0x587db6(0x1f3)](_0x587db6(0x20a)+_0x575495[_0x587db6(0x206)]+_0x587db6(0x1f4)));const _0x59af8f=_0x77642d['jsUrl']&&_0x77642d[_0x587db6(0x201)];if(!_0x59af8f){writeCliSideChannelLine(renderSyncSummary(_0x575495,_0x4e5d37[_0x587db6(0x1fa)]>0x0));const _0xb1c236=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0xb1c236)return writeCliSideChannelLine(a131_0x474074['gray'](_0x587db6(0x22a))),{'ok':!![]};}let _0x340a7a=_0x77642d[_0x587db6(0x217)],_0x2816a1=_0x77642d[_0x587db6(0x201)];!_0x340a7a&&(_0x340a7a=await askJsUrl());!_0x2816a1&&(_0x2816a1=await askCssUrl());const _0x53e450=await askConfirm(_0x587db6(0x229)+_0x575495[_0x587db6(0x206)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x340a7a+_0x587db6(0x1fd)+_0x2816a1+'?');if(!_0x53e450)return writeCliSideChannelLine(a131_0x474074[_0x587db6(0x210)](_0x587db6(0x22a))),{'ok':!![]};const _0x3c70f1=[_0x340a7a,_0x2816a1],_0x355714=startSpinner('Creating\x20'+_0x575495[_0x587db6(0x206)]+_0x587db6(0x21c));try{const _0x55be68=await doCreateMenus(_0x361062[_0x587db6(0x21b)],_0x361062[_0x587db6(0x225)],_0x575495,_0x3c70f1);return stopSpinner(_0x355714,'Created\x20'+_0x55be68[_0x587db6(0x1f1)]+_0x587db6(0x20f),!![]),{'ok':!![],'data':_0x55be68,'message':_0x587db6(0x21d)+_0x55be68[_0x587db6(0x1f1)]+_0x587db6(0x214)+_0x55be68[_0x587db6(0x1ef)]+_0x587db6(0x21e)};}catch(_0x41c7ca){stopSpinner(_0x355714,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x587db6(0x20c)](_0x41c7ca instanceof Error?_0x41c7ca[_0x587db6(0x226)]:_0x587db6(0x22e));}}};function ensureRunnableContext(_0x5e4501,_0x4e8a71){const _0x371a2c=a131_0x1a3a06,_0x131ae6=_0x5e4501[_0x371a2c(0x215)]?String(_0x5e4501[_0x371a2c(0x215)])['trim']():'';if(!isInProject()&&!_0x4e8a71&&!_0x131ae6)throw CliErrors[_0x371a2c(0x20c)](_0x371a2c(0x203)+_0x371a2c(0x20e));}function parsePaths(_0x1e0173){const _0x22a4b2=a131_0x1a3a06;return[...new Set(_0x1e0173[_0x22a4b2(0x232)](',')['map'](_0x2d7243=>_0x2d7243[_0x22a4b2(0x223)]())[_0x22a4b2(0x234)](Boolean))];}
1
+ const a131_0x376118=a131_0x1d7d;(function(_0x4bec94,_0x50cb3c){const _0x241440=a131_0x1d7d,_0x4691a8=_0x4bec94();while(!![]){try{const _0x59a57c=parseInt(_0x241440(0x99))/0x1+-parseInt(_0x241440(0xa0))/0x2*(-parseInt(_0x241440(0xb1))/0x3)+-parseInt(_0x241440(0xb8))/0x4+parseInt(_0x241440(0xb4))/0x5+-parseInt(_0x241440(0x98))/0x6*(parseInt(_0x241440(0x94))/0x7)+-parseInt(_0x241440(0x85))/0x8+parseInt(_0x241440(0x86))/0x9*(parseInt(_0x241440(0x9b))/0xa);if(_0x59a57c===_0x50cb3c)break;else _0x4691a8['push'](_0x4691a8['shift']());}catch(_0x5f2337){_0x4691a8['push'](_0x4691a8['shift']());}}}(a131_0x1b0f,0x28a0f));import a131_0xf79f41 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a131_0x1d7d(_0x2ad718,_0x583be4){_0x2ad718=_0x2ad718-0x75;const _0x1b0ffd=a131_0x1b0f();let _0x1d7d08=_0x1b0ffd[_0x2ad718];return _0x1d7d08;}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a131_0x1b0f(){const _0x4553ce=['\x20page(s)','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','140118XcQzru','129422MOWGLY','paths','140meEVah','/smartapi/menu/create','cookie','\x20local\x20microfrontend\x20menu(s).','Creating\x20','2axMMpW','str','\x20and\x20CSS:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','rawFlags','jsUrl','localPages','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','skipped','yes','appCode','\x20failed.','\x20created,\x20','message','\x20\x20Cancelled.','gray','flag','132135Jzaaot','\x20created.','Menu\x20creation\x20failed','426575XbrrRs','\x20menu(s)\x20created','\x20\x20Create\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','733376ZNuDBF','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','\x20menu(s)...','length','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','selectedAppName','Menu\x20sync\x20skipped','size','✓\x20Menu\x20sync\x20completed:\x20','validation','Would\x20create\x20','appcode','Created\x20','trim','POST','sync','params','split','targetPages','string','\x20\x20Continue\x20with\x20creation?','Menu\x20sync\x20completed:\x20','cssUrl','created','write','failed','801536PyCZbF','137907GAnJzW','\x20menu(s)\x20with\x20JS:\x20','filter','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','onlineMenuList','Pre-fill\x20JS/CSS\x20URLs.\x20','Online\x20menu\x20list\x20fetched','\x20menu(s)','onlinePaths','yellow','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','boolean','cyan','7rTjCPh','Fetching\x20online\x20menu\x20list...'];a131_0x1b0f=function(){return _0x4553ce;};return a131_0x1b0f();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a131_0x376118(0x7a),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a131_0x376118(0x83),'flags':[{'name':a131_0x376118(0x7b),'type':a131_0x376118(0x7e),'description':a131_0x376118(0x8b)+a131_0x376118(0xa7)},{'name':a131_0x376118(0x9a),'type':a131_0x376118(0x7e),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a131_0x376118(0xa9),'type':a131_0x376118(0x92),'description':a131_0x376118(0xb9)}],async 'dryRun'(_0x1eb3e7){const _0x423bf1=a131_0x376118;ensureRunnableContext(_0x1eb3e7[_0x423bf1(0xa4)],_0x1eb3e7[_0x423bf1(0xbd)]);const _0x2d9dd1=await runMenuSyncCore(_0x1eb3e7[_0x423bf1(0xaa)],_0x1eb3e7[_0x423bf1(0x9d)],parsePaths(_0x1eb3e7[_0x423bf1(0xa1)](_0x423bf1(0x9a))),_0x1eb3e7['str']('params'),{'dryRun':!![]});return{'method':_0x423bf1(0x79),'url':_0x423bf1(0x9c),'body':_0x2d9dd1,'description':_0x2d9dd1[_0x423bf1(0xa8)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x423bf1(0x75)+_0x2d9dd1[_0x423bf1(0x7d)][_0x423bf1(0xbb)]+_0x423bf1(0x9e)};},async 'execute'(_0x12bde0){const _0x274f3b=a131_0x376118;ensureRunnableContext(_0x12bde0[_0x274f3b(0xa4)],_0x12bde0[_0x274f3b(0xbd)]);const _0x30f744=_0x12bde0[_0x274f3b(0xb0)](_0x274f3b(0xa9)),_0x55e47f=_0x12bde0[_0x274f3b(0xa1)](_0x274f3b(0x7b)),_0x190abf=parsePaths(_0x12bde0['str'](_0x274f3b(0x9a))),_0x3994bd=parseMenuSyncParams(_0x55e47f);if(_0x30f744){const _0x34d0ef=await runMenuSyncCore(_0x12bde0[_0x274f3b(0xaa)],_0x12bde0[_0x274f3b(0x9d)],_0x190abf,_0x55e47f);if(_0x34d0ef[_0x274f3b(0xa8)]){const _0x75c5c=getLocalPages();_0x75c5c[_0x274f3b(0xbb)]===0x0?writeCliSideChannelLine(_0x274f3b(0xbc)):writeCliSideChannelLine(_0x274f3b(0xb7));}else writeCliSideChannelLine(_0x274f3b(0xc0)+_0x34d0ef[_0x274f3b(0x82)]+_0x274f3b(0xb5));return{'ok':!![],'data':_0x34d0ef,'message':_0x34d0ef[_0x274f3b(0xa8)]?_0x274f3b(0xbe):_0x274f3b(0x80)+_0x34d0ef[_0x274f3b(0x82)]+_0x274f3b(0xb2)};}if(_0x190abf[_0x274f3b(0xbb)]>0x0)throw CliErrors['validation']('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x274f3b(0x91));if(!isInteractive()&&_0x55e47f)throw CliErrors['validation']('Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive();const _0x58a4a9=startSpinner(_0x274f3b(0x95));let _0x17db3b,_0x23fdf1,_0x5bb0c4;try{const _0x575389=await fetchMenuData(_0x12bde0[_0x274f3b(0xaa)],_0x12bde0[_0x274f3b(0x9d)]);_0x17db3b=_0x575389[_0x274f3b(0xa6)],_0x23fdf1=_0x575389[_0x274f3b(0x8e)],_0x5bb0c4=_0x575389[_0x274f3b(0x8a)],stopSpinner(_0x58a4a9,_0x274f3b(0x8c),!![]);}catch(_0x3b7213){stopSpinner(_0x58a4a9,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x3b7213 instanceof Error?_0x3b7213[_0x274f3b(0xad)]:_0x274f3b(0xa3));}if(_0x17db3b['length']===0x0)return writeCliSideChannelLine(a131_0xf79f41[_0x274f3b(0x8f)](_0x274f3b(0x90))),{'ok':!![]};const _0x41dbd4=buildCompareRows(_0x17db3b,_0x23fdf1);writeCliSideChannelLine(renderCompareTable(_0x41dbd4)),writeCliSideChannelLine('');const _0x27eda1=await selectPages(_0x17db3b,_0x23fdf1);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0xf79f41[_0x274f3b(0x93)]('\x20\x20✓\x20Selected:\x20'+_0x27eda1[_0x274f3b(0xbb)]+_0x274f3b(0x96)));const _0x114e32=_0x3994bd['jsUrl']&&_0x3994bd[_0x274f3b(0x81)];if(!_0x114e32){writeCliSideChannelLine(renderSyncSummary(_0x27eda1,_0x23fdf1[_0x274f3b(0xbf)]>0x0));const _0x44cb06=await askConfirm(_0x274f3b(0x7f));if(!_0x44cb06)return writeCliSideChannelLine(a131_0xf79f41[_0x274f3b(0xaf)](_0x274f3b(0xae))),{'ok':!![]};}let _0x1ed8b1=_0x3994bd[_0x274f3b(0xa5)],_0x37d1b2=_0x3994bd[_0x274f3b(0x81)];!_0x1ed8b1&&(_0x1ed8b1=await askJsUrl());!_0x37d1b2&&(_0x37d1b2=await askCssUrl());const _0x34711a=await askConfirm(_0x274f3b(0xb6)+_0x27eda1[_0x274f3b(0xbb)]+_0x274f3b(0x87)+_0x1ed8b1+_0x274f3b(0xa2)+_0x37d1b2+'?');if(!_0x34711a)return writeCliSideChannelLine(a131_0xf79f41[_0x274f3b(0xaf)](_0x274f3b(0xae))),{'ok':!![]};const _0x4600f9=[_0x1ed8b1,_0x37d1b2],_0x3e1067=startSpinner(_0x274f3b(0x9f)+_0x27eda1[_0x274f3b(0xbb)]+_0x274f3b(0xba));try{const _0x5ef956=await doCreateMenus(_0x12bde0['appCode'],_0x12bde0[_0x274f3b(0x9d)],_0x27eda1,_0x4600f9);return stopSpinner(_0x3e1067,_0x274f3b(0x77)+_0x5ef956[_0x274f3b(0x82)]+_0x274f3b(0x8d),!![]),{'ok':!![],'data':_0x5ef956,'message':'Menu\x20sync\x20completed:\x20'+_0x5ef956['created']+_0x274f3b(0xac)+_0x5ef956[_0x274f3b(0x84)]+_0x274f3b(0xab)};}catch(_0x510140){stopSpinner(_0x3e1067,_0x274f3b(0xb3),![]);throw CliErrors[_0x274f3b(0xc1)](_0x510140 instanceof Error?_0x510140[_0x274f3b(0xad)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x3b6f35,_0x47dd2f){const _0x3f98df=a131_0x376118,_0x540213=_0x3b6f35[_0x3f98df(0x76)]?String(_0x3b6f35[_0x3f98df(0x76)])[_0x3f98df(0x78)]():'';if(!isInProject()&&!_0x47dd2f&&!_0x540213)throw CliErrors[_0x3f98df(0xc1)](_0x3f98df(0x89)+_0x3f98df(0x97));}function parsePaths(_0x5cc216){const _0x5ebb50=a131_0x376118;return[...new Set(_0x5cc216[_0x5ebb50(0x7c)](',')['map'](_0x5ba6cb=>_0x5ba6cb[_0x5ebb50(0x78)]())[_0x5ebb50(0x88)](Boolean))];}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationConfigList: CommandDefinition;
@@ -1 +1 @@
1
- const a132_0x2c41bd=a132_0xef08;(function(_0x4b3a28,_0xf27258){const _0x13ba31=a132_0xef08,_0x109550=_0x4b3a28();while(!![]){try{const _0x34f56f=-parseInt(_0x13ba31(0x77))/0x1*(parseInt(_0x13ba31(0x92))/0x2)+parseInt(_0x13ba31(0x74))/0x3*(-parseInt(_0x13ba31(0x96))/0x4)+parseInt(_0x13ba31(0x8d))/0x5*(-parseInt(_0x13ba31(0x82))/0x6)+parseInt(_0x13ba31(0x7f))/0x7+-parseInt(_0x13ba31(0x8c))/0x8+parseInt(_0x13ba31(0x87))/0x9+parseInt(_0x13ba31(0x76))/0xa;if(_0x34f56f===_0xf27258)break;else _0x109550['push'](_0x109550['shift']());}catch(_0x2e576a){_0x109550['push'](_0x109550['shift']());}}}(a132_0x264c,0x761ef));function a132_0xef08(_0x36d9a6,_0x4ca248){_0x36d9a6=_0x36d9a6-0x74;const _0x264c23=a132_0x264c();let _0xef08b3=_0x264c23[_0x36d9a6];return _0xef08b3;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a132_0x2c41bd(0x99),a132_0x2c41bd(0x79),'DINGTALK',a132_0x2c41bd(0x9a),a132_0x2c41bd(0x8f)];export const notificationConfigList={'service':a132_0x2c41bd(0x85),'command':a132_0x2c41bd(0x83),'description':a132_0x2c41bd(0x88),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a132_0x2c41bd(0x86),'type':a132_0x2c41bd(0x81),'description':a132_0x2c41bd(0x7c),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x2c41bd(0x99)}],async 'validate'(_0x58b515){readChannelType(_0x58b515);},async 'execute'(_0x59cf90){const _0x67eafb=a132_0x2c41bd,_0x41238d=readChannelType(_0x59cf90),_0x58563a=await listNotificationChannelConfigs(_0x59cf90['appCode'],_0x41238d),_0x155ba1=_0x58563a['map'](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x59cf90[_0x67eafb(0x80)],'channelType':_0x41238d,'count':_0x155ba1[_0x67eafb(0x9b)],'configs':_0x155ba1},'message':_0x67eafb(0x7a)+_0x155ba1[_0x67eafb(0x9b)]+'\x20'+_0x41238d+_0x67eafb(0x8a)};}};function readChannelType(_0x1665f7){const _0x199328=a132_0x2c41bd,_0x5cc3d3=_0x1665f7[_0x199328(0x7b)](_0x199328(0x86))[_0x199328(0x95)]()||'EMAIL';if(!NOTIFICATION_CHANNEL_TYPES[_0x199328(0x7e)](_0x5cc3d3))throw CliErrors[_0x199328(0x97)](_0x199328(0x89)+_0x5cc3d3,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x199328(0x78)](',\x20')+'.');return _0x5cc3d3;}function a132_0x264c(){const _0x5ed5a4=['number','5943110mfbADA','983PNJhOE','join','FEISHU','Found\x20','str','Notification\x20channel\x20type','apiError','includes','4860730dNzjFi','appCode','string','4356eXBcmC','config-list','updateTime','notification','type','5870403PJFYNg','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','Invalid\x20--type:\x20','\x20notification\x20config(s)','configCode','2549320Cogwge','1690TPFBiV','configName','WEBHOOK','Item\x20','\x20is\x20missing\x20required\x20field\x20\x22','32XsQPRK','Invalid\x20notification\x20config\x20response.','description','trim','3368aFNKkC','validation','channelType','EMAIL','WECOM','length','3126JdxdQo'];a132_0x264c=function(){return _0x5ed5a4;};return a132_0x264c();}function projectNotificationConfig(_0x4252a6,_0x160b05){const _0x260d22=a132_0x2c41bd;return{'id':typeof _0x4252a6['id']===_0x260d22(0x75)?_0x4252a6['id']:null,'configCode':requireConfigString(_0x4252a6,_0x260d22(0x8b),_0x160b05),'configName':requireConfigString(_0x4252a6,_0x260d22(0x8e),_0x160b05),'channelType':requireConfigString(_0x4252a6,_0x260d22(0x98),_0x160b05),'description':normalizeNullableString(_0x4252a6[_0x260d22(0x94)]),'createTime':normalizeNullableString(_0x4252a6['createTime']),'updateTime':normalizeNullableString(_0x4252a6[_0x260d22(0x84)])};}function requireConfigString(_0x448cb5,_0xe21396,_0x264114){const _0x14fe45=a132_0x2c41bd,_0x4079d0=_0x448cb5[_0xe21396];if(typeof _0x4079d0!==_0x14fe45(0x81)||_0x4079d0[_0x14fe45(0x95)]()==='')throw CliErrors[_0x14fe45(0x7d)](_0x14fe45(0x93),_0x14fe45(0x90)+(_0x264114+0x1)+_0x14fe45(0x91)+_0xe21396+'\x22.');return _0x4079d0[_0x14fe45(0x95)]();}function normalizeNullableString(_0x35a30d){return typeof _0x35a30d==='string'?_0x35a30d:null;}
1
+ const a132_0x4a64dd=a132_0xb8fe;(function(_0x2c334,_0x3ff9fa){const _0x1cf718=a132_0xb8fe,_0x5ca913=_0x2c334();while(!![]){try{const _0x28c571=-parseInt(_0x1cf718(0x1ba))/0x1*(-parseInt(_0x1cf718(0x19b))/0x2)+-parseInt(_0x1cf718(0x1be))/0x3*(parseInt(_0x1cf718(0x1a2))/0x4)+-parseInt(_0x1cf718(0x1ae))/0x5+-parseInt(_0x1cf718(0x1a3))/0x6+-parseInt(_0x1cf718(0x1a4))/0x7+-parseInt(_0x1cf718(0x1ac))/0x8+parseInt(_0x1cf718(0x1bb))/0x9*(parseInt(_0x1cf718(0x19f))/0xa);if(_0x28c571===_0x3ff9fa)break;else _0x5ca913['push'](_0x5ca913['shift']());}catch(_0x8297f8){_0x5ca913['push'](_0x5ca913['shift']());}}}(a132_0x50c8,0x30444));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a132_0x4a64dd(0x1af),'FEISHU',a132_0x4a64dd(0x1b2),a132_0x4a64dd(0x1ab),a132_0x4a64dd(0x1b5)];export const notificationConfigList={'service':a132_0x4a64dd(0x1b0),'command':'config-list','description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a132_0x4a64dd(0x1ad),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a132_0x4a64dd(0x1b9),'type':a132_0x4a64dd(0x1b1),'description':a132_0x4a64dd(0x19e),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x4a64dd(0x1af)}],async 'validate'(_0x36d524){readChannelType(_0x36d524);},async 'execute'(_0x14b128){const _0x57902c=a132_0x4a64dd,_0x5e8d0b=readChannelType(_0x14b128),_0x1311ca=await listNotificationChannelConfigs(_0x14b128[_0x57902c(0x1a6)],_0x5e8d0b),_0x2baa3d=_0x1311ca[_0x57902c(0x1b8)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x14b128[_0x57902c(0x1a6)],'channelType':_0x5e8d0b,'count':_0x2baa3d[_0x57902c(0x1a9)],'configs':_0x2baa3d},'message':_0x57902c(0x1a1)+_0x2baa3d[_0x57902c(0x1a9)]+'\x20'+_0x5e8d0b+_0x57902c(0x1a8)};}};function readChannelType(_0x2036d8){const _0x4db1d6=a132_0x4a64dd,_0x2db90d=_0x2036d8[_0x4db1d6(0x19d)]('type')[_0x4db1d6(0x1aa)]()||_0x4db1d6(0x1af);if(!NOTIFICATION_CHANNEL_TYPES[_0x4db1d6(0x1a7)](_0x2db90d))throw CliErrors[_0x4db1d6(0x1b6)](_0x4db1d6(0x1bc)+_0x2db90d,_0x4db1d6(0x1b3)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x2db90d;}function projectNotificationConfig(_0x581af4,_0x4e262b){const _0x501eef=a132_0x4a64dd;return{'id':typeof _0x581af4['id']==='number'?_0x581af4['id']:null,'configCode':requireConfigString(_0x581af4,_0x501eef(0x19c),_0x4e262b),'configName':requireConfigString(_0x581af4,_0x501eef(0x1a5),_0x4e262b),'channelType':requireConfigString(_0x581af4,'channelType',_0x4e262b),'description':normalizeNullableString(_0x581af4['description']),'createTime':normalizeNullableString(_0x581af4['createTime']),'updateTime':normalizeNullableString(_0x581af4[_0x501eef(0x1a0)])};}function requireConfigString(_0x4a7873,_0x2081e1,_0x519922){const _0x481a69=a132_0x4a64dd,_0x56ce2a=_0x4a7873[_0x2081e1];if(typeof _0x56ce2a!==_0x481a69(0x1b1)||_0x56ce2a[_0x481a69(0x1aa)]()==='')throw CliErrors['apiError'](_0x481a69(0x1bd),_0x481a69(0x1b7)+(_0x519922+0x1)+_0x481a69(0x1b4)+_0x2081e1+'\x22.');return _0x56ce2a[_0x481a69(0x1aa)]();}function a132_0xb8fe(_0x457f5,_0x25fa99){_0x457f5=_0x457f5-0x19b;const _0x50c880=a132_0x50c8();let _0xb8fe49=_0x50c880[_0x457f5];return _0xb8fe49;}function a132_0x50c8(){const _0x590f4b=['updateTime','Found\x20','4UFssUk','1031820DDQOAG','1408939HnjXFn','configName','appCode','includes','\x20notification\x20config(s)','length','trim','WECOM','2433144bWrBjx','read','294605vMHTRm','EMAIL','notification','string','DINGTALK','Allowed\x20values:\x20','\x20is\x20missing\x20required\x20field\x20\x22','WEBHOOK','validation','Item\x20','map','type','2819BvzaHt','423VYXGya','Invalid\x20--type:\x20','Invalid\x20notification\x20config\x20response.','402399lZeJZS','50MVswIp','configCode','str','Notification\x20channel\x20type','212270AlsjXY'];a132_0x50c8=function(){return _0x590f4b;};return a132_0x50c8();}function normalizeNullableString(_0x5ec392){return typeof _0x5ec392==='string'?_0x5ec392:null;}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationDefinitions: CommandDefinition[];