@lovrabet/rabetbase-cli 2.3.16-beta.4 → 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 (560) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
@@ -1 +1 @@
1
- const a125_0x1190ac=a125_0x3959;(function(_0x1b8a9a,_0xb8dc60){const _0x52a809=a125_0x3959,_0x251a9d=_0x1b8a9a();while(!![]){try{const _0x195357=-parseInt(_0x52a809(0x1e2))/0x1*(parseInt(_0x52a809(0x1e1))/0x2)+-parseInt(_0x52a809(0x1f9))/0x3+-parseInt(_0x52a809(0x204))/0x4+parseInt(_0x52a809(0x1df))/0x5*(parseInt(_0x52a809(0x1c0))/0x6)+-parseInt(_0x52a809(0x1e0))/0x7+-parseInt(_0x52a809(0x1d5))/0x8+parseInt(_0x52a809(0x1cf))/0x9*(parseInt(_0x52a809(0x1c7))/0xa);if(_0x195357===_0xb8dc60)break;else _0x251a9d['push'](_0x251a9d['shift']());}catch(_0x3c2c00){_0x251a9d['push'](_0x251a9d['shift']());}}}(a125_0x2e1d,0x3b219));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':a125_0x1190ac(0x20b),'required':!![],'description':a125_0x1190ac(0x1b4)};export const MENU_SORT_FLAG={'name':'sort','type':a125_0x1190ac(0x20b),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':a125_0x1190ac(0x1cc),'type':'string','description':a125_0x1190ac(0x203)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x1190ac(0x1d1),'type':'string','description':a125_0x1190ac(0x1c3)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a125_0x1190ac(0x1fe),'type':'string','description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':a125_0x1190ac(0x1ea),'type':a125_0x1190ac(0x20b),'description':a125_0x1190ac(0x1fd)}];export function validateExactId(_0x321f74){const _0x3c17a7=a125_0x1190ac,_0x598f57=_0x321f74[_0x3c17a7(0x1ba)]('id');if(!Number[_0x3c17a7(0x1d4)](_0x598f57)||_0x598f57<=0x0)throw CliErrors['validation'](_0x3c17a7(0x207));return _0x598f57;}export function validateSort(_0x300eb6,_0x4ae067=a125_0x1190ac(0x1f7)){const _0x4830ee=a125_0x1190ac;if(!hasFlag(_0x300eb6,_0x4ae067))return undefined;const _0x50e65b=_0x300eb6[_0x4830ee(0x1ba)](_0x4ae067);if(!Number[_0x4830ee(0x1d4)](_0x50e65b)||_0x50e65b<0x0||_0x50e65b>MAX_MENU_SORT)throw menuError('menu_sort_invalid','--'+_0x4ae067+_0x4830ee(0x1eb)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x50e65b;}export function nextSiblingSort(_0x5ac0c0,_0x135832,_0x57e354){const _0xf69bb5=a125_0x1190ac,_0x15b5f3=getChildren(_0x5ac0c0,_0x135832)['map'](_0x12764a=>_0x12764a[_0xf69bb5(0x1f7)])[_0xf69bb5(0x1cd)](_0x4a8eb4=>typeof _0x4a8eb4===_0xf69bb5(0x20b));if(_0x15b5f3[_0xf69bb5(0x1f0)]===0x0)return 0x0;const _0x37d9a0=Math['max'](..._0x15b5f3);if(_0x37d9a0>=MAX_MENU_SORT)throw menuError(_0xf69bb5(0x1b7),_0xf69bb5(0x1b6)+_0x57e354+_0xf69bb5(0x1a7)+_0x37d9a0+'.',_0xf69bb5(0x1c6)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x37d9a0+0x1;}export function requireExplicitYes(_0x13f0a1){const _0x17f399=a125_0x1190ac;if(_0x13f0a1[_0x17f399(0x1e5)](_0x17f399(0x1c8)))return;if(!_0x13f0a1[_0x17f399(0x1e5)](_0x17f399(0x20c)))throw menuError('menu_confirmation_required',_0x17f399(0x1f3),_0x17f399(0x205));}export async function fetchMutationSnapshot(_0x335838,_0x539c90,_0x3c5d2e){const _0x15ce98=a125_0x1190ac;try{return await fetchMenuSnapshot(_0x335838[_0x15ce98(0x1ab)],_0x335838[_0x15ce98(0x1e4)]);}catch(_0x2e08ff){throw mapMenuApiError(_0x2e08ff,'read\x20online\x20menu\x20facts\x20before\x20'+_0x539c90,_0x3c5d2e);}}export async function recheckMutationSnapshot(_0x37ece2,_0x5d88e9,_0x2b5c9b,_0x39f6e5){const _0x491df5=a125_0x1190ac;let _0x158330;try{_0x158330=await fetchMenuSnapshot(_0x37ece2[_0x491df5(0x1ab)],_0x37ece2[_0x491df5(0x1e4)]);}catch(_0x83e3eb){const _0x2af62a=mapMenuApiError(_0x83e3eb,_0x491df5(0x1ed)+_0x2b5c9b,_0x39f6e5);throw menuFailure(_0x2af62a,_0x5d88e9,{'stage':_0x491df5(0x20d),'failed':_0x39f6e5==null?{}:{'id':_0x39f6e5}});}if(_0x158330[_0x491df5(0x1be)]!==_0x5d88e9[_0x491df5(0x1ef)]){const _0x3a72af=menuError(_0x491df5(0x1c5),_0x491df5(0x209)+_0x2b5c9b+_0x491df5(0x1fa),_0x491df5(0x1b0));throw menuFailure(_0x3a72af,_0x5d88e9,{'stage':_0x491df5(0x20d),'failed':{..._0x39f6e5==null?{}:{'id':_0x39f6e5},'expectedSnapshotHash':_0x5d88e9[_0x491df5(0x1ef)],'currentSnapshotHash':_0x158330['hash']}});}return _0x158330;}export function parseParentId(_0xc397a7,_0x46c6a4,_0x52d18e={}){const _0x18edef=a125_0x1190ac;if(!hasFlag(_0xc397a7,_0x46c6a4)){if(_0x52d18e[_0x18edef(0x1dc)])throw CliErrors[_0x18edef(0x1ee)](_0x46c6a4);return undefined;}const _0x3bbfb5=_0xc397a7[_0x18edef(0x1c4)](_0x46c6a4)[_0x18edef(0x1e6)]();if(_0x3bbfb5[_0x18edef(0x1d6)]()===_0x18edef(0x1c9))return null;if(!/^\d+$/[_0x18edef(0x1a8)](_0x3bbfb5))throw CliErrors[_0x18edef(0x200)]('--'+_0x46c6a4+_0x18edef(0x1b9));const _0x1497c4=Number(_0x3bbfb5);if(!Number['isSafeInteger'](_0x1497c4)||_0x1497c4<=0x0)throw CliErrors[_0x18edef(0x200)]('--'+_0x46c6a4+_0x18edef(0x1b9));return _0x1497c4;}export function requireMenu(_0x3e3016,_0x49a17d){const _0x12dead=a125_0x1190ac,_0x46f863=_0x3e3016['byId'][_0x12dead(0x1d8)](_0x49a17d);if(!_0x46f863)throw menuError(_0x12dead(0x1bf),_0x12dead(0x1f5)+_0x49a17d,'Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.');return _0x46f863;}export function requireFolder(_0x2dbe54,_0x109abc){const _0x445f98=a125_0x1190ac,_0x596eb0=requireMenu(_0x2dbe54,_0x109abc);if(_0x596eb0[_0x445f98(0x1db)]!==_0x445f98(0x1bd))throw menuError(_0x445f98(0x1f8),_0x445f98(0x1b1)+_0x109abc+_0x445f98(0x1b2)+(_0x596eb0[_0x445f98(0x1db)]||_0x445f98(0x201))+_0x445f98(0x1da),_0x445f98(0x1ce));return _0x596eb0;}export function assertExpectedState(_0xb472ff,_0x12a649){const _0x4baebc=a125_0x1190ac;if(hasFlag(_0xb472ff,_0x4baebc(0x1d1))){const _0x41e1c8=parseParentId(_0xb472ff,_0x4baebc(0x1d1),{'required':!![]});if(_0x12a649['parentId']!==_0x41e1c8)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x41e1c8)+_0x4baebc(0x1ec)+formatParent(_0x12a649[_0x4baebc(0x1b3)])+'.');}if(hasFlag(_0xb472ff,'expect-path')){const _0x2d0267=_0xb472ff[_0x4baebc(0x1c4)](_0x4baebc(0x1fe));if(_0x12a649[_0x4baebc(0x1aa)]!==_0x2d0267)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+_0x4baebc(0x1e3)+JSON[_0x4baebc(0x1f1)](_0x2d0267)+',\x20current\x20'+JSON[_0x4baebc(0x1f1)](_0x12a649[_0x4baebc(0x1aa)])+'.');}if(hasFlag(_0xb472ff,_0x4baebc(0x1ea))){const _0x2ab3bf=_0xb472ff[_0x4baebc(0x1ba)](_0x4baebc(0x1ea));if(!Number[_0x4baebc(0x1d4)](_0x2ab3bf)||_0x2ab3bf<0x0)throw CliErrors['validation'](_0x4baebc(0x1b8));if(_0x12a649[_0x4baebc(0x1b5)]!==_0x2ab3bf)throw stateDrift(_0x4baebc(0x1b1)+_0x12a649['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x2ab3bf+',\x20current\x20'+_0x12a649[_0x4baebc(0x1b5)]+'.');}}export function assertVerified(_0x5c5787,_0x42ee3d,_0x57d1fd=a125_0x1190ac(0x1fc)){if(!_0x5c5787)throw menuError('menu_verification_failed',_0x42ee3d,_0x57d1fd);}export function mutationResult(_0x3a60a2){const _0xd29a24=a125_0x1190ac;return{'operation':_0x3a60a2[_0xd29a24(0x1c1)],'selector':_0x3a60a2[_0xd29a24(0x1f6)],'before':_0x3a60a2[_0xd29a24(0x1f2)],'after':_0x3a60a2['after'],'dryRun':_0x3a60a2[_0xd29a24(0x1e7)],'backend':_0x3a60a2['backend'],..._0x3a60a2[_0xd29a24(0x20a)]?{'plannedActions':_0x3a60a2[_0xd29a24(0x20a)]}:{},..._0x3a60a2[_0xd29a24(0x1d0)]?{'targets':_0x3a60a2['targets']}:{},..._0x3a60a2['deleteOrder']?{'deleteOrder':_0x3a60a2[_0xd29a24(0x1c2)]}:{},'snapshotHash':_0x3a60a2['snapshotHash'],..._0x3a60a2['cascade']?{'cascade':_0x3a60a2[_0xd29a24(0x1d2)]}:{},..._0x3a60a2[_0xd29a24(0x1de)]?{'planFile':_0x3a60a2['planFile']}:{},'succeeded':_0x3a60a2[_0xd29a24(0x1d9)]??[],'failed':_0x3a60a2[_0xd29a24(0x206)]??[],'warnings':_0x3a60a2[_0xd29a24(0x1cb)]??[],'verification':_0x3a60a2[_0xd29a24(0x1bb)],'error':_0x3a60a2[_0xd29a24(0x208)]};}export function menuDryRunResult(_0x1ed696,_0x2cedba){return{..._0x1ed696,..._0x2cedba};}export function menuFailure(_0x29e46a,_0x1aa2a7,_0x56ba2c){const _0x903141=a125_0x1190ac,_0x215260=mutationResult({..._0x1aa2a7,'after':_0x56ba2c['after']===undefined?_0x1aa2a7[_0x903141(0x1ad)]:_0x56ba2c[_0x903141(0x1ad)],'backend':_0x56ba2c[_0x903141(0x1f4)]??_0x1aa2a7[_0x903141(0x1f4)],'dryRun':![],'succeeded':_0x56ba2c[_0x903141(0x1d9)]??[],'failed':[{..._0x56ba2c[_0x903141(0x206)]??{},'stage':_0x56ba2c[_0x903141(0x1fb)],'code':_0x29e46a[_0x903141(0x1a5)],'message':_0x29e46a[_0x903141(0x1ff)]}],'warnings':[..._0x1aa2a7['warnings'],..._0x56ba2c[_0x903141(0x1cb)]??[]],'verification':_0x56ba2c[_0x903141(0x1bb)],'error':{'code':_0x29e46a[_0x903141(0x1a5)],'message':_0x29e46a[_0x903141(0x1ff)],..._0x29e46a[_0x903141(0x1a9)]?{'hint':_0x29e46a['hint']}:{}}});return Object[_0x903141(0x1af)](_0x29e46a,_0x903141(0x1d3),{'value':_0x215260,'enumerable':!![],'configurable':!![]}),_0x29e46a;}export function asVerificationError(_0x12b710,_0x407750){const _0x5812cb=a125_0x1190ac;if(_0x12b710 instanceof CliError&&_0x12b710[_0x5812cb(0x1a5)]===_0x5812cb(0x1dd))return _0x12b710;const _0x404a02=_0x12b710 instanceof Error?_0x12b710['message']:String(_0x12b710);return menuError('menu_verification_failed',''+_0x407750+(_0x404a02?':\x20'+_0x404a02:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}function a125_0x3959(_0x1cb9aa,_0x302c1a){_0x1cb9aa=_0x1cb9aa-0x1a5;const _0x2e1dc0=a125_0x2e1d();let _0x395945=_0x2e1dc0[_0x1cb9aa];return _0x395945;}export function describeMenuErrorCause(_0x50bf48,_0x29c6a2,_0x1df138){const _0x53b4b8=a125_0x1190ac,_0xbc7e68=mapMenuApiError(_0x50bf48,_0x29c6a2,_0x1df138);return{'causeCode':_0xbc7e68[_0x53b4b8(0x1a5)],'causeMessage':_0xbc7e68[_0x53b4b8(0x1ff)]};}export function hasFlag(_0x378a16,_0x530621){const _0x5327c0=a125_0x1190ac;return Object[_0x5327c0(0x1d7)]['hasOwnProperty']['call'](_0x378a16[_0x5327c0(0x1ca)],_0x530621)&&_0x378a16[_0x5327c0(0x1ca)][_0x530621]!==undefined;}export function toApiParentId(_0xcc030c){return _0xcc030c??0x0;}export function formatParent(_0x1d9e4b){return _0x1d9e4b==null?'root':String(_0x1d9e4b);}export function menuError(_0x41c4fd,_0x421ad8,_0x488a5c){return new CliError(_0x41c4fd,0x1,_0x421ad8,_0x488a5c);}export function mapMenuApiError(_0x28db69,_0x62a031,_0x3b4588){const _0xcf29a5=a125_0x1190ac;if(_0x28db69 instanceof CliError&&_0x28db69[_0xcf29a5(0x1a5)]!==_0xcf29a5(0x1e9))return _0x28db69;const _0x1ebec4=_0x28db69 instanceof Error?_0x28db69[_0xcf29a5(0x1ff)]:String(_0x28db69);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0xcf29a5(0x1a8)](_0x1ebec4))return menuError(_0xcf29a5(0x1e8),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x62a031+(_0x3b4588?_0xcf29a5(0x1ae)+_0x3b4588:'')+'.',_0xcf29a5(0x1a6));return menuError(_0xcf29a5(0x1ac),'Failed\x20to\x20'+_0x62a031+(_0x3b4588?_0xcf29a5(0x1ae)+_0x3b4588:'')+':\x20'+_0x1ebec4,_0xcf29a5(0x202));}export function isMenuResponseLoss(_0x21f581){const _0xb95a3=a125_0x1190ac,_0x16b429=_0x21f581 instanceof Error?_0x21f581[_0xb95a3(0x1ff)]:String(_0x21f581);if(_0x21f581 instanceof CliError)return _0x21f581[_0xb95a3(0x1a5)]===_0xb95a3(0x1e9)&&/^Request (?:failed|timeout):/i['test'](_0x16b429);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'](_0x16b429);}function stateDrift(_0x37a5ff){const _0x418a01=a125_0x1190ac;return menuError(_0x418a01(0x1c5),_0x37a5ff,_0x418a01(0x1bc));}function a125_0x2e1d(){const _0x100a95=['num','verification','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','folder','hash','menu_not_found','246Pzycfs','operation','deleteOrder','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','str','menu_state_drift','Reorder\x20sibling\x20menus\x20below\x20','40BOwAsW','dry-run','root','rawFlags','warnings','parent-id','filter','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','3243582zRKmAD','targets','expect-parent-id','cascade','data','isSafeInteger','538144zCFjwJ','toLowerCase','prototype','get','succeeded','\x22,\x20not\x20folder.','type','required','menu_verification_failed','planFile','23235LaKBxK','2163497UhxabE','10HjjmyL','89447ocYCGK','\x20path\x20changed:\x20expected\x20','cookie','bool','trim','dryRun','menu_permission_denied','api_error','expected-children-count','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20',',\x20current\x20','recheck\x20online\x20menu\x20facts\x20before\x20','flagMissing','snapshotHash','length','stringify','before','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','backend','Online\x20menu\x20not\x20found:\x20','selector','sort','menu_parent_not_folder','392064yZMMXQ',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','stage','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','expect-path','message','validation','unknown','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','1742624UTjgmD','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','failed','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','error','Online\x20menu\x20state\x20changed\x20before\x20','plannedActions','number','yes','pre-write-recheck','code','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','test','hint','path','appCode','menu_mutation_failed','after','\x20menu\x20','defineProperty','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','Menu\x20','\x20is\x20type\x20\x22','parentId','Exact\x20online\x20menu\x20id','childrenCount','Cannot\x20append\x20a\x20','menu_sort_overflow','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.'];a125_0x2e1d=function(){return _0x100a95;};return a125_0x2e1d();}
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(_0x555745,_0x5a5531){const _0x44f037=a126_0x551e,_0x379bab=_0x555745();while(!![]){try{const _0x424e21=parseInt(_0x44f037(0x182))/0x1*(parseInt(_0x44f037(0x179))/0x2)+parseInt(_0x44f037(0x171))/0x3+-parseInt(_0x44f037(0x183))/0x4*(-parseInt(_0x44f037(0x192))/0x5)+parseInt(_0x44f037(0x16f))/0x6*(-parseInt(_0x44f037(0x190))/0x7)+parseInt(_0x44f037(0x17b))/0x8+parseInt(_0x44f037(0x18a))/0x9*(parseInt(_0x44f037(0x175))/0xa)+-parseInt(_0x44f037(0x174))/0xb;if(_0x424e21===_0x5a5531)break;else _0x379bab['push'](_0x379bab['shift']());}catch(_0x2aced3){_0x379bab['push'](_0x379bab['shift']());}}}(a126_0x10c3,0x9000b));function a126_0x10c3(){const _0xd712d9=['\x20menu','558957LVLOSJ','stringify','total','25933270GMFIVm','5114590psCEPJ','Regroup\x20','create-menus','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','22926xXQofk','info','6478936SNDDtC','length','\x20online\x20menus\x20successfully','update-menu-cdn-url','resources','Creating\x20menu:\x20','\x20menu\x20group(s)','86Hsbqbt','996PyMLaX','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Create\x20menu\x20\x22','Updating\x20menu\x20asset\x20links:\x20','menuGroups','Fetched\x20','get-online-menu-list','9CeKRHt','Update\x20menu\x20','path','Batch\x20menu\x20creation\x20completed,\x20total\x20','label','all','1479191DVAEUT','Delete\x20','21845Tnqpyg','import','Menu\x20created\x20successfully:\x20','loadScriptMode','Menu\x20assets\x20synced:\x20','map','Start\x20batch\x20menu\x20creation,\x20total\x20','create-menu','18zLRMZp'];a126_0x10c3=function(){return _0xd712d9;};return a126_0x10c3();}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';function a126_0x551e(_0x268a50,_0x35b0fb){_0x268a50=_0x268a50-0x16c;const _0x10c317=a126_0x10c3();let _0x551ec1=_0x10c317[_0x268a50];return _0x551ec1;}import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a126_0x167d0a,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x3f99aa,_0xb9f58c){const _0x3584e4=a126_0x551e,_0x2854c4=getEnv();logger[_0x3584e4(0x17a)](_0x3584e4(0x189),isProduction(_0x2854c4)?_0x3584e4(0x184)+_0x3f99aa+')':_0x3584e4(0x178)+_0x3f99aa+')');const _0x3faeb5=await fetchMenuSnapshot(_0x3f99aa,_0xb9f58c,{'verbose':!![]});return logger[_0x3584e4(0x17a)]('get-online-menu-list',_0x3584e4(0x188)+_0x3faeb5[_0x3584e4(0x173)]+_0x3584e4(0x17d)),_0x3faeb5['menus'][_0x3584e4(0x16c)](toProcessedMenuItem);}export async function createMenu(_0x9e68b5,_0x3ea5a6,_0x4e4b47){const _0x450e20=a126_0x551e;logger[_0x450e20(0x17a)](_0x450e20(0x16e),_0x450e20(0x180)+_0x4e4b47['label']+'\x20('+_0x4e4b47[_0x450e20(0x18c)]+')');const _0x53ba91={'appCode':_0x9e68b5,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x450e20(0x193),'resources':_0x4e4b47['resources']?JSON['stringify'](_0x4e4b47[_0x450e20(0x17f)]):undefined},..._0x4e4b47},_0x2e5712=await createMenuRecord(_0x53ba91,_0x3ea5a6,_0x450e20(0x185)+_0x4e4b47[_0x450e20(0x18e)]+'\x22');return logger[_0x450e20(0x17a)](_0x450e20(0x16e),_0x450e20(0x194)+_0x4e4b47[_0x450e20(0x18e)]),_0x2e5712;}async function createSingleMenu(_0x8870dd,_0x340a53,_0x4cfdff,_0x563723){const _0x358c2b=a126_0x551e,_0xd88a2={'appCode':_0x8870dd,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x358c2b(0x193),'resources':_0x563723?JSON['stringify'](_0x563723):undefined},'label':_0x4cfdff[_0x358c2b(0x18e)],'path':_0x4cfdff[_0x358c2b(0x18c)]},_0x504467=await createMenuRecord(_0xd88a2,_0x340a53,_0x358c2b(0x185)+_0x4cfdff[_0x358c2b(0x18e)]+'\x22');return logger[_0x358c2b(0x17a)](_0x358c2b(0x16e),_0x358c2b(0x194)+_0x4cfdff['label']),_0x504467;}export async function createMenus(_0x3bd932,_0x6cd0d8,_0x1a72b9,_0x3c3ae9){const _0x7162f2=a126_0x551e;logger['info'](_0x7162f2(0x177),_0x7162f2(0x16d)+_0x1a72b9[_0x7162f2(0x17c)]);const _0x284e5a=await Promise[_0x7162f2(0x18f)](_0x1a72b9[_0x7162f2(0x16c)](_0xc9357b=>createSingleMenu(_0x3bd932,_0x6cd0d8,_0xc9357b,_0x3c3ae9)));return logger[_0x7162f2(0x17a)](_0x7162f2(0x177),_0x7162f2(0x18d)+_0x1a72b9['length']),_0x284e5a;}export async function updateMenuCdnUrl(_0x5d9107,_0xf05ac,_0x2c6a02){const _0x2ab24c=a126_0x551e;logger[_0x2ab24c(0x17a)](_0x2ab24c(0x17e),_0x2ab24c(0x186)+_0x2c6a02[_0x2ab24c(0x18e)]+'\x20('+_0x2c6a02[_0x2ab24c(0x18c)]+')');const _0x4fdd83={'id':_0x2c6a02['id'],'appCode':_0x5d9107,'extend':{..._0x2c6a02['extend']??{},..._0x2c6a02[_0x2ab24c(0x195)]?{'loadScriptMode':_0x2c6a02['loadScriptMode']}:{},'resources':_0x2c6a02['resources']?JSON[_0x2ab24c(0x172)](_0x2c6a02[_0x2ab24c(0x17f)]):undefined}},_0x5ac8b7=await updateMenuRecord(_0x4fdd83,_0xf05ac,'Update\x20menu\x20assets\x20\x22'+_0x2c6a02[_0x2ab24c(0x18e)]+'\x22');return logger[_0x2ab24c(0x17a)]('update-menu-cdn-url',_0x2ab24c(0x196)+_0x2c6a02[_0x2ab24c(0x18e)],undefined),_0x5ac8b7;}export async function createMenuEntity(_0x1c3476,_0x5cbf09,_0x300d05){const _0x1e263c=a126_0x551e;return createMenuRecord({'appCode':_0x1c3476,..._0x300d05},_0x5cbf09,_0x1e263c(0x185)+_0x300d05[_0x1e263c(0x18e)]+'\x22');}export async function updateMenuEntity(_0x4a5fbc,_0x4212b7,_0x74272b){const _0x216003=a126_0x551e;return updateMenuRecord({'appCode':_0x4a5fbc,..._0x74272b},_0x4212b7,_0x216003(0x18b)+_0x74272b['id']);}export async function batchDeleteMenuEntities(_0x40ca58,_0x18f533){const _0x3a5245=a126_0x551e;return batchDeleteMenuRecords(_0x18f533,_0x40ca58,_0x3a5245(0x191)+_0x18f533[_0x3a5245(0x17c)]+_0x3a5245(0x170)+(_0x18f533[_0x3a5245(0x17c)]===0x1?'':'s'));}export async function startMenuRegroup(_0x170f79,_0x214cfc){const _0x35a5ad=a126_0x551e;return a126_0x167d0a(_0x214cfc,_0x170f79,_0x35a5ad(0x176)+_0x214cfc[_0x35a5ad(0x187)][_0x35a5ad(0x17c)]+_0x35a5ad(0x181));}
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_0x42b82d=a127_0x486d;(function(_0x41c24c,_0x4fc403){const _0x396e2f=a127_0x486d,_0x25f4cb=_0x41c24c();while(!![]){try{const _0x1e3b20=parseInt(_0x396e2f(0x93))/0x1+parseInt(_0x396e2f(0xb4))/0x2+-parseInt(_0x396e2f(0x9d))/0x3*(-parseInt(_0x396e2f(0x8a))/0x4)+-parseInt(_0x396e2f(0x92))/0x5*(-parseInt(_0x396e2f(0xa3))/0x6)+-parseInt(_0x396e2f(0xb3))/0x7*(-parseInt(_0x396e2f(0x9c))/0x8)+parseInt(_0x396e2f(0xb6))/0x9+parseInt(_0x396e2f(0x9e))/0xa*(-parseInt(_0x396e2f(0x96))/0xb);if(_0x1e3b20===_0x4fc403)break;else _0x25f4cb['push'](_0x25f4cb['shift']());}catch(_0x1a074a){_0x25f4cb['push'](_0x25f4cb['shift']());}}}(a127_0x36f1,0xb495f));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a127_0x486d(_0x5d6fc8,_0x11b23b){_0x5d6fc8=_0x5d6fc8-0x87;const _0x36f142=a127_0x36f1();let _0x486d4e=_0x36f142[_0x5d6fc8];return _0x486d4e;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a127_0x36f1(){const _0x1debe8=['import','menu-sync','info','21EkJXZg','186824fDlwxn','get','3851766Ikhqbi','pages','jsUrl','Invalid\x20--params\x20fields:\x20','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','dryRun','160CviaNP','string','Start\x20non-interactive\x20menu\x20sync','has','label','join','push','object','50bSDEdi','671394WEoqvF','filter','cssUrl','14893087wGmKds','path','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','cwd',':\x20expected\x20a\x20non-empty\x20string.','trim','61448paZNej','79845pZZLtN','20RfjZzS','keys','Invalid\x20--params:\x20','No\x20local\x20pages\x20matched\x20paths:\x20','--params.','700254lMixUf','CSS\x20URL\x20is\x20unreachable:\x20','setLogPath','map','Menu\x20sync\x20completed','Invalid\x20--params\x20JSON.','\x0a\x20\x20Available\x20local\x20paths:\x20','Invalid\x20--params.','field','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','length','JS\x20URL\x20is\x20unreachable:\x20','parse'];a127_0x36f1=function(){return _0x1debe8;};return a127_0x36f1();}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a127_0x42b82d(0xb8),'cssUrl']);function validateParams(_0x5875c1){const _0x54c9fc=a127_0x42b82d,_0x211355=[];return _0x5875c1['jsUrl']&&!isValidJsHttpsUrl(_0x5875c1['jsUrl'])&&_0x211355['push']({'field':_0x54c9fc(0xb8),'message':_0x54c9fc(0xac)}),_0x5875c1[_0x54c9fc(0x95)]&&!isValidCssHttpsUrl(_0x5875c1[_0x54c9fc(0x95)])&&_0x211355[_0x54c9fc(0x90)]({'field':_0x54c9fc(0x95),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x211355;}export async function runMenuSyncCore(_0x1aff0e,_0x26c97a,_0xced2ee=[],_0x3addfd,_0x337294={}){const _0x318abc=a127_0x42b82d,_0x428bc7=parseMenuSyncParams(_0x3addfd),_0x4e7c91=[...new Set(_0xced2ee[_0x318abc(0xa6)](_0x489079=>_0x489079[_0x318abc(0x9b)]())[_0x318abc(0x94)](Boolean))],_0xb3258=_0x428bc7[_0x318abc(0xb8)],_0x13c1fc=_0x428bc7['cssUrl'],_0x2a566d=[];if(_0xb3258)_0x2a566d[_0x318abc(0x90)](_0xb3258);if(_0x13c1fc)_0x2a566d[_0x318abc(0x90)](_0x13c1fc);const _0x5d9e60=validateParams(_0x428bc7);if(_0x5d9e60['length']>0x0){const _0x342b21=_0x5d9e60[_0x318abc(0xa6)](_0x199124=>_0x318abc(0xa2)+_0x199124[_0x318abc(0xab)]+':\x20'+_0x199124['message'])['join'](';\x20');throw new Error(_0x318abc(0xa0)+_0x342b21);}logger[_0x318abc(0xa5)](process[_0x318abc(0x99)]()),logger[_0x318abc(0xb2)](_0x318abc(0xb1),_0x318abc(0x8c),{'appCode':_0x1aff0e,'selectedCount':_0x4e7c91[_0x318abc(0xad)],'jsUrl':_0xb3258,'cssUrl':_0x13c1fc});if(_0xb3258){const _0x4a6155=await isUrlReachable(_0xb3258);if(!_0x4a6155)throw new Error(_0x318abc(0xae)+_0xb3258);}if(_0x13c1fc){const _0x275c55=await isUrlReachable(_0x13c1fc);if(!_0x275c55)throw new Error(_0x318abc(0xa4)+_0x13c1fc);}const _0x161bb1=getLocalPages();if(_0x161bb1[_0x318abc(0xad)]===0x0){if(_0x4e7c91[_0x318abc(0xad)]>0x0)throw new Error(_0x318abc(0xa1)+_0x4e7c91[_0x318abc(0x8f)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x337294[_0x318abc(0x89)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x2aef96=await getOnlineMenuList(_0x1aff0e,_0x26c97a),_0x502b26=new Set(_0x2aef96[_0x318abc(0xa6)](_0x46bc1f=>_0x46bc1f['path']));let _0x54a121;if(_0x4e7c91[_0x318abc(0xad)]>0x0){const _0x3c9840=new Map(_0x161bb1[_0x318abc(0xa6)](_0x575049=>[_0x575049['path'],_0x575049])),_0x2b19b5=_0x4e7c91['filter'](_0x6d4e58=>!_0x3c9840[_0x318abc(0x8d)](_0x6d4e58));if(_0x2b19b5[_0x318abc(0xad)]>0x0){const _0x565018=_0x161bb1['map'](_0x23eae5=>_0x23eae5[_0x318abc(0x97)])['join'](',\x20');throw new Error(_0x318abc(0xa1)+_0x2b19b5['join'](',\x20')+_0x318abc(0xa9)+_0x565018);}const _0x3d98a9=_0x4e7c91[_0x318abc(0x94)](_0x2efd69=>_0x502b26[_0x318abc(0x8d)](_0x2efd69));if(_0x3d98a9[_0x318abc(0xad)]>0x0)throw new Error(_0x318abc(0x98)+_0x3d98a9[_0x318abc(0x8f)](',\x20'));_0x54a121=_0x4e7c91[_0x318abc(0xa6)](_0x57b398=>_0x3c9840[_0x318abc(0xb5)](_0x57b398));}else _0x54a121=_0x161bb1[_0x318abc(0x94)](_0x3dd474=>!_0x502b26[_0x318abc(0x8d)](_0x3dd474['path']));if(_0x54a121['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x337294[_0x318abc(0x89)]===!![],'targetPages':[],'plannedMenus':[]};const _0x626fa=_0x54a121[_0x318abc(0xa6)](_0x5d9e41=>({'type':'procode','path':_0x5d9e41['path'],'label':_0x5d9e41[_0x318abc(0x8e)],'loadScriptMode':_0x318abc(0xb0),'resources':[..._0x2a566d]}));if(_0x337294[_0x318abc(0x89)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x54a121,'plannedMenus':_0x626fa};const _0x4fe1f4=await createMenus(_0x1aff0e,_0x26c97a,_0x54a121,_0x2a566d[_0x318abc(0xad)]>0x0?_0x2a566d:undefined);return logger[_0x318abc(0xb2)]('menu-sync',_0x318abc(0xa7),{'count':_0x54a121[_0x318abc(0xad)],'resources':_0x2a566d}),{'created':_0x4fe1f4[_0x318abc(0xad)],'skipped':![],'dryRun':![],'targetPages':_0x54a121,'plannedMenus':_0x626fa,'menus':_0x4fe1f4};}export function parseMenuSyncParams(_0x4fd2ed){const _0x2c9da1=a127_0x42b82d;if(!_0x4fd2ed||typeof _0x4fd2ed!==_0x2c9da1(0x8b))return{};let _0x3b4242;try{_0x3b4242=JSON[_0x2c9da1(0xaf)](_0x4fd2ed);}catch{throw new Error(_0x2c9da1(0xa8));}if(typeof _0x3b4242!==_0x2c9da1(0x91)||_0x3b4242===null||Array['isArray'](_0x3b4242))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x3e732e=_0x3b4242;if(Object['hasOwn'](_0x3e732e,_0x2c9da1(0xb7)))throw new Error(_0x2c9da1(0x88));const _0x13586d=Object[_0x2c9da1(0x9f)](_0x3e732e)['filter'](_0x59d82b=>!MENU_SYNC_PARAM_KEYS['has'](_0x59d82b));if(_0x13586d[_0x2c9da1(0xad)]>0x0)throw new Error(_0x2c9da1(0x87)+_0x13586d[_0x2c9da1(0x8f)](',\x20')+'.');for(const _0x2e6968 of MENU_SYNC_PARAM_KEYS){const _0x299676=_0x3e732e[_0x2e6968];if(_0x299676!==undefined&&(typeof _0x299676!=='string'||_0x299676[_0x2c9da1(0x9b)]()===''))throw new Error(_0x2c9da1(0xaa)+_0x2e6968+_0x2c9da1(0x9a));}return{'jsUrl':typeof _0x3e732e[_0x2c9da1(0xb8)]===_0x2c9da1(0x8b)?_0x3e732e[_0x2c9da1(0xb8)][_0x2c9da1(0x9b)]():undefined,'cssUrl':typeof _0x3e732e[_0x2c9da1(0x95)]===_0x2c9da1(0x8b)?_0x3e732e[_0x2c9da1(0x95)][_0x2c9da1(0x9b)]():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(_0x1f7f73,_0x505878){const _0x10bf08=a129_0x20c4,_0x9788cd=_0x1f7f73();while(!![]){try{const _0x2e4be4=-parseInt(_0x10bf08(0xb8))/0x1+parseInt(_0x10bf08(0xde))/0x2*(-parseInt(_0x10bf08(0xd7))/0x3)+parseInt(_0x10bf08(0xea))/0x4+-parseInt(_0x10bf08(0xc4))/0x5+-parseInt(_0x10bf08(0xff))/0x6*(parseInt(_0x10bf08(0xe1))/0x7)+-parseInt(_0x10bf08(0xc0))/0x8+-parseInt(_0x10bf08(0xbe))/0x9*(-parseInt(_0x10bf08(0xbd))/0xa);if(_0x2e4be4===_0x505878)break;else _0x9788cd['push'](_0x9788cd['shift']());}catch(_0x53ba0f){_0x9788cd['push'](_0x9788cd['shift']());}}}(a129_0x5a03,0xaff3d));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(_0x2bff56){const _0x1ba21a=a129_0x20c4,_0x32fdb7=[];return _0x2bff56['jsUrl']&&!isValidJsHttpsUrl(_0x2bff56[_0x1ba21a(0xfe)])&&_0x32fdb7['push']({'field':_0x1ba21a(0xfe),'message':_0x1ba21a(0x100)}),_0x2bff56[_0x1ba21a(0xed)]&&!isValidCssHttpsUrl(_0x2bff56[_0x1ba21a(0xed)])&&_0x32fdb7[_0x1ba21a(0xd9)]({'field':'cssUrl','message':_0x1ba21a(0xcb)}),_0x32fdb7;}export async function runMenuUpdateCore(_0x5359c7,_0x412afa,_0x533652,_0x41f39d={}){const _0x529b99=a129_0x20c4,_0x203366=parseUpdateParamsFlag(_0x533652),_0x165aca=normalizeMode(_0x41f39d[_0x529b99(0xf9)]);validateSelection(_0x41f39d[_0x529b99(0xd5)]);const _0x2dfc5a=[];if(_0x203366[_0x529b99(0xfe)])_0x2dfc5a[_0x529b99(0xd9)](_0x203366[_0x529b99(0xfe)]);if(_0x203366[_0x529b99(0xed)])_0x2dfc5a[_0x529b99(0xd9)](_0x203366['cssUrl']);const _0x4b2e55=validateParams(_0x203366);if(_0x4b2e55['length']>0x0){const _0x4c37c4=_0x4b2e55[_0x529b99(0xc9)](_0x214d6d=>_0x529b99(0xeb)+_0x214d6d[_0x529b99(0xef)]+':\x20'+_0x214d6d[_0x529b99(0xce)])[_0x529b99(0xbb)](';\x20');throw new Error(_0x529b99(0xca)+_0x4c37c4);}if(_0x2dfc5a[_0x529b99(0xc3)]===0x0)throw new Error(_0x529b99(0xe9)+_0x529b99(0x101));logger[_0x529b99(0xd0)](process[_0x529b99(0xf6)]()),logger['info'](_0x529b99(0xf5),_0x529b99(0xe8),{'appCode':_0x5359c7,'jsUrl':_0x203366[_0x529b99(0xfe)],'cssUrl':_0x203366['cssUrl'],'mode':_0x165aca,'dryRun':_0x41f39d[_0x529b99(0xfc)]===!![]});if(_0x203366['jsUrl']){const _0x1a4372=await isUrlReachable(_0x203366[_0x529b99(0xfe)]);if(!_0x1a4372)throw new Error(_0x529b99(0xe4)+_0x203366[_0x529b99(0xfe)]);}if(_0x203366[_0x529b99(0xed)]){const _0x1536ae=await isUrlReachable(_0x203366[_0x529b99(0xed)]);if(!_0x1536ae)throw new Error(_0x529b99(0xc2)+_0x203366[_0x529b99(0xed)]);}const _0x3a7e7e=await getOnlineMenuList(_0x5359c7,_0x412afa),_0x43f706=_0x3a7e7e[_0x529b99(0xf8)](_0x447aa4=>_0x447aa4[_0x529b99(0xe5)]['length']>0x0),_0x59a0fd=selectMenusForUpdate(_0x43f706,_0x41f39d['selection']);if(_0x59a0fd[_0x529b99(0xc3)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x41f39d['dryRun']===!![]};const _0xf8569=_0x59a0fd['map'](_0x42acaa=>buildMenuUpdateDiff(_0x42acaa,_0x203366,_0x165aca,_0x41f39d[_0x529b99(0xd3)]===!![],_0x41f39d[_0x529b99(0xd4)]));if(_0x41f39d[_0x529b99(0xfc)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0xf8569};const _0x29af55=await Promise['allSettled'](_0x59a0fd['map']((_0x2540b2,_0x2c2ed3)=>updateMenuCdnUrl(_0x5359c7,_0x412afa,{'id':_0x2540b2['id'],'label':_0x2540b2['label'],'path':_0x2540b2[_0x529b99(0xc7)],'resources':_0xf8569[_0x2c2ed3][_0x529b99(0xbc)][_0x529b99(0xe5)],'extend':_0x2540b2[_0x529b99(0xe6)]??null,'loadScriptMode':_0x41f39d['loadScriptMode']}))),_0x44770c=_0x29af55[_0x529b99(0xf8)](_0x7b7d2a=>_0x7b7d2a[_0x529b99(0xcf)]===_0x529b99(0xb9))[_0x529b99(0xc9)](_0x2ef8e9=>_0x2ef8e9[_0x529b99(0xe3)]),_0x1c42f2=_0x29af55['filter'](_0x8e37c7=>_0x8e37c7[_0x529b99(0xcf)]===_0x529b99(0xf4))[_0x529b99(0xc3)];return logger['info'](_0x529b99(0xf5),_0x529b99(0xfa),{'count':_0x59a0fd['length'],'resources':_0x2dfc5a}),{'updated':_0x44770c['length'],'failed':_0x1c42f2,'skipped':![],'menus':_0x44770c};}function validateSelection(_0x345b30){const _0x53c21d=a129_0x20c4;if(!_0x345b30)throw new Error(_0x53c21d(0xf0));if(_0x345b30[_0x53c21d(0xcc)]&&(_0x345b30[_0x53c21d(0xfd)][_0x53c21d(0xc3)]>0x0||_0x345b30[_0x53c21d(0xd1)]['length']>0x0))throw new Error(_0x53c21d(0xc1));if(!_0x345b30['all']&&_0x345b30[_0x53c21d(0xfd)][_0x53c21d(0xc3)]===0x0&&_0x345b30[_0x53c21d(0xd1)][_0x53c21d(0xc3)]===0x0)throw new Error(_0x53c21d(0xf0));}export function selectMenusForUpdate(_0x4d8c98,_0x54c708){const _0x295c80=a129_0x20c4;validateSelection(_0x54c708);if(_0x54c708[_0x295c80(0xcc)])return _0x4d8c98;const _0xc73bc2=new Set(_0x4d8c98['map'](_0x2bf954=>_0x2bf954['id'])),_0x30f38e=new Set(_0x4d8c98['map'](_0xd6ea28=>_0xd6ea28[_0x295c80(0xc7)])),_0x8c4132=_0x54c708[_0x295c80(0xfd)][_0x295c80(0xf8)](_0x400e7a=>!_0xc73bc2[_0x295c80(0xd6)](_0x400e7a)),_0x6ee057=_0x54c708['paths'][_0x295c80(0xf8)](_0x271847=>!_0x30f38e['has'](_0x271847));if(_0x8c4132[_0x295c80(0xc3)]>0x0||_0x6ee057['length']>0x0){const _0x1f6da1=[..._0x8c4132[_0x295c80(0xc9)](_0x4c75be=>String(_0x4c75be)),..._0x6ee057][_0x295c80(0xbb)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x1f6da1);}const _0x3269dd=new Set(_0x54c708[_0x295c80(0xfd)]),_0x1fe081=new Set(_0x54c708['paths']);return _0x4d8c98[_0x295c80(0xf8)](_0x584efb=>_0x3269dd['has'](_0x584efb['id'])||_0x1fe081[_0x295c80(0xd6)](_0x584efb[_0x295c80(0xc7)]));}function normalizeMode(_0xdf5e70){const _0x23c6ce=a129_0x20c4;if(!_0xdf5e70)return _0x23c6ce(0xba);if(_0xdf5e70===_0x23c6ce(0xbf)||_0xdf5e70===_0x23c6ce(0xba))return _0xdf5e70;throw new Error(_0x23c6ce(0xf2)+_0xdf5e70+_0x23c6ce(0xcd));}function a129_0x5a03(){const _0x175d1f=['some','value','JS\x20URL\x20is\x20unreachable:\x20','resources','extend','unshift','Start\x20non-interactive\x20menu\x20asset\x20update','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','1111476OlUrQz','--params.','string','cssUrl','trim','field','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','\x22\x20(','Invalid\x20--mode:\x20','label','rejected','menu-asset-update','cwd','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','filter','mode','Menu\x20asset\x20update\x20completed','isArray','dryRun','menuIds','jsUrl','18eFYLNR','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','286700bEGQjc','fulfilled','patch','join','after','169180XgkNvz','1872aNvFPX','replace','4819152MOazeV','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','CSS\x20URL\x20is\x20unreachable:\x20','length','4039315PYluEF','toLowerCase','\x20existing\x20CSS\x20resources\x20for\x20\x22','path','object','map','Invalid\x20--params:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','all','.\x20Allowed\x20values:\x20replace,\x20patch','message','status','setLogPath','paths',').\x20','force','loadScriptMode','selection','has','686121HKLYKE','menu\x20asset-update\x20cannot\x20patch\x20','push','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','endsWith','.css','.js','4iBdYTb','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','parse','2150729QHfvCr'];a129_0x5a03=function(){return _0x175d1f;};return a129_0x5a03();}function buildMenuUpdateDiff(_0x4d2709,_0x4d00e4,_0xccc0f7,_0xb8976b,_0x1fcf7d){const _0x29804c=a129_0x20c4,_0x1709d5=[..._0x4d2709[_0x29804c(0xe5)]];_0xccc0f7===_0x29804c(0xba)&&assertUnambiguousPatchResources(_0x4d2709,_0x1709d5,_0x4d00e4);const _0x588cae=_0xccc0f7===_0x29804c(0xba)?patchResources(_0x1709d5,_0x4d00e4):replaceResources(_0x4d00e4),_0x195cbe=[],_0x2fc4f3=_0x1709d5[_0x29804c(0xe2)](isJsResource),_0x4a68bd=_0x588cae[_0x29804c(0xe2)](isJsResource);if(_0x2fc4f3&&!_0x4a68bd){const _0x59ae88='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x4d2709[_0x29804c(0xf3)]+_0x29804c(0xf1)+_0x4d2709[_0x29804c(0xc7)]+_0x29804c(0xd2)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0xb8976b)throw new Error(_0x59ae88);_0x195cbe['push'](_0x59ae88);}const _0x1685c9=_0x1709d5[_0x29804c(0xe2)](isCssResource),_0x40c644=_0x588cae[_0x29804c(0xe2)](isCssResource);_0x1685c9&&!_0x40c644&&_0x195cbe[_0x29804c(0xd9)](_0x29804c(0xdf)+_0x4d2709['label']+_0x29804c(0xf1)+_0x4d2709[_0x29804c(0xc7)]+').');const _0x48e58d=typeof _0x4d2709['extend']?.['loadScriptMode']===_0x29804c(0xec)?_0x4d2709['extend'][_0x29804c(0xd4)]:null,_0x47b8d0=_0x1fcf7d?{'loadScriptMode':_0x48e58d}:{},_0x547959=_0x1fcf7d?{'loadScriptMode':_0x1fcf7d}:{};return{'id':_0x4d2709['id'],'label':_0x4d2709[_0x29804c(0xf3)],'path':_0x4d2709[_0x29804c(0xc7)],'mode':_0xccc0f7,'before':{'resources':_0x1709d5,..._0x47b8d0},'after':{'resources':_0x588cae,..._0x547959},'warnings':_0x195cbe};}function replaceResources(_0x2e7b33){const _0x4cfa67=a129_0x20c4;return[_0x2e7b33['jsUrl'],_0x2e7b33[_0x4cfa67(0xed)]]['filter'](_0x5e896c=>!!_0x5e896c);}function assertUnambiguousPatchResources(_0x2574ea,_0x7eb089,_0x508b06){const _0x3a49df=a129_0x20c4,_0x43bb53=_0x7eb089[_0x3a49df(0xf8)](isJsResource)[_0x3a49df(0xc3)];if(_0x508b06['jsUrl']&&_0x43bb53>0x1)throw new Error(_0x3a49df(0xd8)+_0x43bb53+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x2574ea['label']+_0x3a49df(0xf1)+_0x2574ea[_0x3a49df(0xc7)]+')\x20'+_0x3a49df(0xda));const _0x3d7b1a=_0x7eb089[_0x3a49df(0xf8)](isCssResource)[_0x3a49df(0xc3)];if(_0x508b06[_0x3a49df(0xed)]&&_0x3d7b1a>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x3d7b1a+_0x3a49df(0xc6)+_0x2574ea[_0x3a49df(0xf3)]+_0x3a49df(0xf1)+_0x2574ea[_0x3a49df(0xc7)]+')\x20'+_0x3a49df(0xf7));}function patchResources(_0x1e2718,_0x1bf472){const _0x13fde2=a129_0x20c4;let _0xbabecc=![],_0x6ecfb9=![];const _0x4a9c34=[];for(const _0x1fa3d2 of _0x1e2718){if(isJsResource(_0x1fa3d2)){if(_0x1bf472[_0x13fde2(0xfe)]&&!_0xbabecc)_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xfe)]),_0xbabecc=!![];else!_0x1bf472['jsUrl']&&_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);continue;}if(isCssResource(_0x1fa3d2)){if(_0x1bf472[_0x13fde2(0xed)]&&!_0x6ecfb9)_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xed)]),_0x6ecfb9=!![];else!_0x1bf472['cssUrl']&&_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);continue;}_0x4a9c34[_0x13fde2(0xd9)](_0x1fa3d2);}return _0x1bf472['jsUrl']&&!_0xbabecc&&_0x4a9c34[_0x13fde2(0xe7)](_0x1bf472[_0x13fde2(0xfe)]),_0x1bf472[_0x13fde2(0xed)]&&!_0x6ecfb9&&_0x4a9c34[_0x13fde2(0xd9)](_0x1bf472[_0x13fde2(0xed)]),_0x4a9c34;}function a129_0x20c4(_0x44ff4b,_0x82aea0){_0x44ff4b=_0x44ff4b-0xb8;const _0x5a032b=a129_0x5a03();let _0x20c4ec=_0x5a032b[_0x44ff4b];return _0x20c4ec;}function isJsResource(_0x2cd7bc){const _0x3f3962=a129_0x20c4;return stripQuery(_0x2cd7bc)[_0x3f3962(0xc5)]()[_0x3f3962(0xdb)](_0x3f3962(0xdd));}function isCssResource(_0x5ccff5){const _0x2ffb63=a129_0x20c4;return stripQuery(_0x5ccff5)[_0x2ffb63(0xc5)]()[_0x2ffb63(0xdb)](_0x2ffb63(0xdc));}function stripQuery(_0x5e745f){return _0x5e745f['split']('?')[0x0]??_0x5e745f;}function parseUpdateParamsFlag(_0xad0e79){const _0x424c62=a129_0x20c4;if(!_0xad0e79||typeof _0xad0e79!==_0x424c62(0xec))return{};try{const _0x37895b=JSON[_0x424c62(0xe0)](_0xad0e79);if(typeof _0x37895b!==_0x424c62(0xc8)||_0x37895b===null||Array[_0x424c62(0xfb)](_0x37895b))return{};return{'jsUrl':typeof _0x37895b['jsUrl']==='string'?_0x37895b[_0x424c62(0xfe)][_0x424c62(0xee)]():undefined,'cssUrl':typeof _0x37895b[_0x424c62(0xed)]===_0x424c62(0xec)?_0x37895b[_0x424c62(0xed)]['trim']():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_0x5224(){const _0x23b7b3=['trim','12994itPShA','1996974XXHypx','8942292SfauAl','843hctdpV','3910zjeiiA','7046296SKZUTp','test','11845470XgTqsp','4220kaNZhm','606406ocdOIs'];a130_0x5224=function(){return _0x23b7b3;};return a130_0x5224();}function a130_0x1500(_0x18248b,_0x4028f8){_0x18248b=_0x18248b-0x129;const _0x5224ad=a130_0x5224();let _0x1500f1=_0x5224ad[_0x18248b];return _0x1500f1;}(function(_0x3dcd3d,_0x919b2b){const _0x229e26=a130_0x1500,_0x45d84a=_0x3dcd3d();while(!![]){try{const _0x1fce25=-parseInt(_0x229e26(0x132))/0x1+-parseInt(_0x229e26(0x129))/0x2*(parseInt(_0x229e26(0x12c))/0x3)+parseInt(_0x229e26(0x131))/0x4*(parseInt(_0x229e26(0x12d))/0x5)+parseInt(_0x229e26(0x12b))/0x6+parseInt(_0x229e26(0x130))/0x7+-parseInt(_0x229e26(0x12e))/0x8+parseInt(_0x229e26(0x12a))/0x9;if(_0x1fce25===_0x919b2b)break;else _0x45d84a['push'](_0x45d84a['shift']());}catch(_0x1cc5b3){_0x45d84a['push'](_0x45d84a['shift']());}}}(a130_0x5224,0xdfc9e));export function isValidJsHttpsUrl(_0x80d6e){const _0xbd59a=a130_0x1500;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x80d6e[_0xbd59a(0x133)]());}export function isValidCssHttpsUrl(_0x5cf379){const _0x601e7=a130_0x1500;return/^https:\/\/.+\.css(\?.*)?$/[_0x601e7(0x12f)](_0x5cf379[_0x601e7(0x133)]());}export async function isUrlReachable(_0x483318){try{const _0x49ea82=await fetch(_0x483318,{'method':'HEAD'});return _0x49ea82['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
- function a131_0x16b4(_0x14cc6a,_0x546afa){_0x14cc6a=_0x14cc6a-0x14a;const _0x56cd6f=a131_0x56cd();let _0x16b40d=_0x56cd6f[_0x14cc6a];return _0x16b40d;}const a131_0x946bbd=a131_0x16b4;(function(_0x44c4da,_0x28d493){const _0x462d14=a131_0x16b4,_0x16868b=_0x44c4da();while(!![]){try{const _0x2b63cd=-parseInt(_0x462d14(0x16b))/0x1+parseInt(_0x462d14(0x189))/0x2*(parseInt(_0x462d14(0x18b))/0x3)+parseInt(_0x462d14(0x14b))/0x4*(parseInt(_0x462d14(0x157))/0x5)+parseInt(_0x462d14(0x158))/0x6*(-parseInt(_0x462d14(0x15d))/0x7)+-parseInt(_0x462d14(0x15e))/0x8+-parseInt(_0x462d14(0x155))/0x9*(parseInt(_0x462d14(0x16d))/0xa)+-parseInt(_0x462d14(0x14e))/0xb*(-parseInt(_0x462d14(0x183))/0xc);if(_0x2b63cd===_0x28d493)break;else _0x16868b['push'](_0x16868b['shift']());}catch(_0x4742c3){_0x16868b['push'](_0x16868b['shift']());}}}(a131_0x56cd,0x808fb));import a131_0x160f6e 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';function a131_0x56cd(){const _0x1df684=['\x20\x20Cancelled.','failed','created','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','string','238276YvvJrl','\x20menu(s)\x20created','127850LlKXBE','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','✓\x20Menu\x20sync\x20completed:\x20','params','Menu\x20sync\x20skipped','gray','yes','cssUrl','cyan','onlineMenuList','trim','localPages','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20created.','rawFlags','split','filter','Online\x20menu\x20list\x20fetched','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20menu(s)\x20with\x20JS:\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','7116gvCJox','\x20\x20Continue\x20with\x20creation?','targetPages','str','write','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','516658QcRRsv','jsUrl','6YtMWaG','Menu\x20creation\x20failed','boolean','cookie','POST','appCode','\x20local\x20microfrontend\x20menu(s).','skipped','\x20menu(s)','26020UpMKcz','yellow','onlinePaths','15389OBKtnf','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Menu\x20sync\x20completed:\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','selectedAppName','\x20and\x20CSS:\x20','length','207SGTaEG','appcode','345WVMfWJ','14766KMokDp','Would\x20create\x20','Fetching\x20online\x20menu\x20list...','/smartapi/menu/create','validation','448upkGam','4629504ZhYJhr','message','paths','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20\x20✓\x20Selected:\x20','\x20\x20Create\x20','\x20page(s)'];a131_0x56cd=function(){return _0x1df684;};return a131_0x56cd();}import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a131_0x946bbd(0x187),'flags':[{'name':'params','type':a131_0x946bbd(0x16a),'description':a131_0x946bbd(0x179)+a131_0x946bbd(0x17f)},{'name':'paths','type':a131_0x946bbd(0x16a),'description':a131_0x946bbd(0x181)},{'name':'yes','type':a131_0x946bbd(0x18d),'description':a131_0x946bbd(0x182)}],async 'dryRun'(_0x3764cb){const _0x4e4045=a131_0x946bbd;ensureRunnableContext(_0x3764cb[_0x4e4045(0x17b)],_0x3764cb[_0x4e4045(0x152)]);const _0x237626=await runMenuSyncCore(_0x3764cb[_0x4e4045(0x190)],_0x3764cb['cookie'],parsePaths(_0x3764cb[_0x4e4045(0x186)](_0x4e4045(0x160))),_0x3764cb[_0x4e4045(0x186)]('params'),{'dryRun':!![]});return{'method':_0x4e4045(0x18f),'url':_0x4e4045(0x15b),'body':_0x237626,'description':_0x237626[_0x4e4045(0x192)]?_0x4e4045(0x16e):_0x4e4045(0x159)+_0x237626[_0x4e4045(0x185)]['length']+_0x4e4045(0x191)};},async 'execute'(_0x9a61b8){const _0x14eb11=a131_0x946bbd;ensureRunnableContext(_0x9a61b8[_0x14eb11(0x17b)],_0x9a61b8[_0x14eb11(0x152)]);const _0x699462=_0x9a61b8['flag'](_0x14eb11(0x173)),_0x200c99=_0x9a61b8['str'](_0x14eb11(0x170)),_0x41146b=parsePaths(_0x9a61b8[_0x14eb11(0x186)](_0x14eb11(0x160))),_0xdf666=parseMenuSyncParams(_0x200c99);if(_0x699462){const _0x351384=await runMenuSyncCore(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8[_0x14eb11(0x18e)],_0x41146b,_0x200c99);if(_0x351384[_0x14eb11(0x192)]){const _0x442609=getLocalPages();_0x442609['length']===0x0?writeCliSideChannelLine(_0x14eb11(0x188)):writeCliSideChannelLine(_0x14eb11(0x14f));}else writeCliSideChannelLine(_0x14eb11(0x16f)+_0x351384[_0x14eb11(0x167)]+_0x14eb11(0x16c));return{'ok':!![],'data':_0x351384,'message':_0x351384['skipped']?_0x14eb11(0x171):_0x14eb11(0x150)+_0x351384[_0x14eb11(0x167)]+_0x14eb11(0x17a)};}if(_0x41146b[_0x14eb11(0x154)]>0x0)throw CliErrors[_0x14eb11(0x15c)](_0x14eb11(0x169),_0x14eb11(0x161));if(!isInteractive()&&_0x200c99)throw CliErrors[_0x14eb11(0x15c)](_0x14eb11(0x168),_0x14eb11(0x161));requireInteractive();const _0x58f4e0=startSpinner(_0x14eb11(0x15a));let _0x7a6a1b,_0x1a7203,_0xd2384d;try{const _0x2df237=await fetchMenuData(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8['cookie']);_0x7a6a1b=_0x2df237[_0x14eb11(0x178)],_0x1a7203=_0x2df237[_0x14eb11(0x14d)],_0xd2384d=_0x2df237[_0x14eb11(0x176)],stopSpinner(_0x58f4e0,_0x14eb11(0x17e),!![]);}catch(_0x36cb06){stopSpinner(_0x58f4e0,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x14eb11(0x15c)](_0x36cb06 instanceof Error?_0x36cb06[_0x14eb11(0x15f)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x7a6a1b[_0x14eb11(0x154)]===0x0)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x14c)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x57b761=buildCompareRows(_0x7a6a1b,_0x1a7203);writeCliSideChannelLine(renderCompareTable(_0x57b761)),writeCliSideChannelLine('');const _0x2956d1=await selectPages(_0x7a6a1b,_0x1a7203);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x175)](_0x14eb11(0x162)+_0x2956d1[_0x14eb11(0x154)]+_0x14eb11(0x164)));const _0x1cfe05=_0xdf666[_0x14eb11(0x18a)]&&_0xdf666[_0x14eb11(0x174)];if(!_0x1cfe05){writeCliSideChannelLine(renderSyncSummary(_0x2956d1,_0x1a7203['size']>0x0));const _0x5c87e8=await askConfirm(_0x14eb11(0x184));if(!_0x5c87e8)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x172)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x816f53=_0xdf666['jsUrl'],_0x4060c1=_0xdf666[_0x14eb11(0x174)];!_0x816f53&&(_0x816f53=await askJsUrl());!_0x4060c1&&(_0x4060c1=await askCssUrl());const _0x3b2b3c=await askConfirm(_0x14eb11(0x163)+_0x2956d1[_0x14eb11(0x154)]+_0x14eb11(0x180)+_0x816f53+_0x14eb11(0x153)+_0x4060c1+'?');if(!_0x3b2b3c)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x172)](_0x14eb11(0x165))),{'ok':!![]};const _0x3907c7=[_0x816f53,_0x4060c1],_0x101a4c=startSpinner('Creating\x20'+_0x2956d1[_0x14eb11(0x154)]+'\x20menu(s)...');try{const _0x5e5449=await doCreateMenus(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8[_0x14eb11(0x18e)],_0x2956d1,_0x3907c7);return stopSpinner(_0x101a4c,'Created\x20'+_0x5e5449[_0x14eb11(0x167)]+_0x14eb11(0x14a),!![]),{'ok':!![],'data':_0x5e5449,'message':_0x14eb11(0x150)+_0x5e5449[_0x14eb11(0x167)]+'\x20created,\x20'+_0x5e5449[_0x14eb11(0x166)]+'\x20failed.'};}catch(_0xf97425){stopSpinner(_0x101a4c,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x14eb11(0x15c)](_0xf97425 instanceof Error?_0xf97425[_0x14eb11(0x15f)]:_0x14eb11(0x18c));}}};function ensureRunnableContext(_0x243332,_0x5936cd){const _0x1ced37=a131_0x946bbd,_0x59bdbd=_0x243332[_0x1ced37(0x156)]?String(_0x243332['appcode'])[_0x1ced37(0x177)]():'';if(!isInProject()&&!_0x5936cd&&!_0x59bdbd)throw CliErrors[_0x1ced37(0x15c)](_0x1ced37(0x151)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x2f167d){const _0x4b7fa8=a131_0x946bbd;return[...new Set(_0x2f167d[_0x4b7fa8(0x17c)](',')['map'](_0x10d8da=>_0x10d8da[_0x4b7fa8(0x177)]())[_0x4b7fa8(0x17d)](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_0x41f8bc=a132_0x1360;(function(_0x485846,_0x4f9359){const _0x4ede64=a132_0x1360,_0x36e78f=_0x485846();while(!![]){try{const _0x1a1401=-parseInt(_0x4ede64(0x122))/0x1*(-parseInt(_0x4ede64(0x12e))/0x2)+-parseInt(_0x4ede64(0x127))/0x3+parseInt(_0x4ede64(0x120))/0x4*(parseInt(_0x4ede64(0x135))/0x5)+parseInt(_0x4ede64(0x134))/0x6+parseInt(_0x4ede64(0x121))/0x7+parseInt(_0x4ede64(0x132))/0x8+parseInt(_0x4ede64(0x11e))/0x9*(-parseInt(_0x4ede64(0x12c))/0xa);if(_0x1a1401===_0x4f9359)break;else _0x36e78f['push'](_0x36e78f['shift']());}catch(_0x4efad6){_0x36e78f['push'](_0x36e78f['shift']());}}}(a132_0x1977,0xcd7cc));function a132_0x1360(_0x5a2577,_0x4dd51b){_0x5a2577=_0x5a2577-0x11a;const _0x197789=a132_0x1977();let _0x1360ea=_0x197789[_0x5a2577];return _0x1360ea;}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_0x41f8bc(0x131),a132_0x41f8bc(0x12f),'DINGTALK',a132_0x41f8bc(0x133),a132_0x41f8bc(0x124)];export const notificationConfigList={'service':'notification','command':a132_0x41f8bc(0x128),'description':a132_0x41f8bc(0x11c),'risk':a132_0x41f8bc(0x13f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a132_0x41f8bc(0x13d),'description':a132_0x41f8bc(0x137),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x41f8bc(0x131)}],async 'validate'(_0x261681){readChannelType(_0x261681);},async 'execute'(_0x655d9d){const _0x2530ad=a132_0x41f8bc,_0x14af0d=readChannelType(_0x655d9d),_0x1fb92d=await listNotificationChannelConfigs(_0x655d9d['appCode'],_0x14af0d),_0x6d0d27=_0x1fb92d[_0x2530ad(0x13b)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x655d9d[_0x2530ad(0x13a)],'channelType':_0x14af0d,'count':_0x6d0d27[_0x2530ad(0x11a)],'configs':_0x6d0d27},'message':'Found\x20'+_0x6d0d27['length']+'\x20'+_0x14af0d+_0x2530ad(0x12b)};}};function readChannelType(_0x19d818){const _0x28bbc6=a132_0x41f8bc,_0x5b669a=_0x19d818['str'](_0x28bbc6(0x140))[_0x28bbc6(0x13e)]()||_0x28bbc6(0x131);if(!NOTIFICATION_CHANNEL_TYPES[_0x28bbc6(0x11b)](_0x5b669a))throw CliErrors['validation'](_0x28bbc6(0x138)+_0x5b669a,_0x28bbc6(0x130)+NOTIFICATION_CHANNEL_TYPES[_0x28bbc6(0x12a)](',\x20')+'.');return _0x5b669a;}function projectNotificationConfig(_0x7a19e,_0x322ec7){const _0x4c358d=a132_0x41f8bc;return{'id':typeof _0x7a19e['id']===_0x4c358d(0x139)?_0x7a19e['id']:null,'configCode':requireConfigString(_0x7a19e,_0x4c358d(0x136),_0x322ec7),'configName':requireConfigString(_0x7a19e,_0x4c358d(0x11d),_0x322ec7),'channelType':requireConfigString(_0x7a19e,_0x4c358d(0x129),_0x322ec7),'description':normalizeNullableString(_0x7a19e[_0x4c358d(0x123)]),'createTime':normalizeNullableString(_0x7a19e[_0x4c358d(0x12d)]),'updateTime':normalizeNullableString(_0x7a19e[_0x4c358d(0x13c)])};}function a132_0x1977(){const _0x2ef7f4=['Allowed\x20values:\x20','EMAIL','11538872LLsvtc','WECOM','1088232QrOFUD','480fjIHMq','configCode','Notification\x20channel\x20type','Invalid\x20--type:\x20','number','appCode','map','updateTime','string','trim','read','type','length','includes','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','configName','15240303yDpPSj','Invalid\x20notification\x20config\x20response.','66892wdQQzP','4202310uupzxg','115CetpMa','description','WEBHOOK','apiError','Item\x20','624432xrlexT','config-list','channelType','join','\x20notification\x20config(s)','20dWsEmI','createTime','10558vmzimF','FEISHU'];a132_0x1977=function(){return _0x2ef7f4;};return a132_0x1977();}function requireConfigString(_0x488718,_0x66d497,_0x53f0af){const _0xc88452=a132_0x41f8bc,_0x665904=_0x488718[_0x66d497];if(typeof _0x665904!==_0xc88452(0x13d)||_0x665904[_0xc88452(0x13e)]()==='')throw CliErrors[_0xc88452(0x125)](_0xc88452(0x11f),_0xc88452(0x126)+(_0x53f0af+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x66d497+'\x22.');return _0x665904[_0xc88452(0x13e)]();}function normalizeNullableString(_0x379514){const _0x14d53e=a132_0x41f8bc;return typeof _0x379514===_0x14d53e(0x13d)?_0x379514: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[];