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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
@@ -1 +1 @@
1
- const a117_0x44794d=a117_0x40a6;(function(_0x337a88,_0x246eaf){const _0x328202=a117_0x40a6,_0x33394f=_0x337a88();while(!![]){try{const _0x2a6ebf=parseInt(_0x328202(0x10d))/0x1+parseInt(_0x328202(0xee))/0x2+parseInt(_0x328202(0xde))/0x3*(parseInt(_0x328202(0x10a))/0x4)+-parseInt(_0x328202(0x11f))/0x5*(-parseInt(_0x328202(0xe0))/0x6)+parseInt(_0x328202(0x10c))/0x7+-parseInt(_0x328202(0x116))/0x8+-parseInt(_0x328202(0xf3))/0x9;if(_0x2a6ebf===_0x246eaf)break;else _0x33394f['push'](_0x33394f['shift']());}catch(_0x3cb8e7){_0x33394f['push'](_0x33394f['shift']());}}}(a117_0xe47d,0x9a566));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_ID_FLAG,asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a117_0x44794d(0xfe),'path':a117_0x44794d(0xd8)}];export const menuRename={'service':'menu','command':a117_0x44794d(0xdf),'description':a117_0x44794d(0xe1),'risk':a117_0x44794d(0xe8),'structuredErrors':!![],'flags':[MENU_ID_FLAG,{'name':a117_0x44794d(0x119),'type':a117_0x44794d(0xf4),'required':!![],'description':'New\x20menu\x20label'},{'name':a117_0x44794d(0xf6),'type':a117_0x44794d(0xf4),'required':!![],'description':a117_0x44794d(0x105)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x35595d){validateInput(_0x35595d);},async 'dryRun'(_0x4a9fcd){const _0x4f5594=a117_0x44794d;validateInput(_0x4a9fcd);const _0x5257ff=await buildPlan(_0x4a9fcd,!![]);return menuDryRunResult(_0x5257ff[_0x4f5594(0xfc)],{'method':'POST','url':_0x4f5594(0xd8),'body':_0x5257ff[_0x4f5594(0x109)],'description':_0x4f5594(0xef)+_0x5257ff[_0x4f5594(0x109)]['id']+'.'});},async 'execute'(_0x46d3ae){const _0x29ec9a=a117_0x44794d;validateInput(_0x46d3ae);const _0x953049=await buildPlan(_0x46d3ae,![]),{plan:_0x5a4af4,body:_0x23fc2e,before:_0x4e1da0,noChanges:_0x2e9269}=_0x953049,_0x4e14e0=_0x23fc2e['id'];if(_0x2e9269)return renameSuccess(_0x5a4af4,_0x953049['snapshot'],_0x4e1da0,!![],![]);await recheckMutationSnapshot(_0x46d3ae,_0x5a4af4,'rename\x20menu',_0x4e14e0);try{await updateMenuEntity(_0x46d3ae['appCode'],_0x46d3ae['cookie'],{'id':_0x4e14e0,'label':_0x23fc2e[_0x29ec9a(0x119)]});}catch(_0x1bc824){const _0x4cb334=mapMenuApiError(_0x1bc824,_0x29ec9a(0xdf),_0x4e14e0);if(isMenuResponseLoss(_0x1bc824)&&_0x4cb334['code']!=='menu_permission_denied')return recoverAfterResponseLoss(_0x46d3ae,_0x953049);throw menuFailure(_0x4cb334,_0x5a4af4,{'stage':_0x29ec9a(0x115),'failed':{'id':_0x4e14e0},'warnings':['The\x20rename\x20request\x20was\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x29ec9a(0x123),'targetId':_0x4e14e0,'lookupCommand':buildLookupCommand(_0x46d3ae[_0x29ec9a(0x117)])}});}let _0x1ef6f9,_0x37422d;try{_0x1ef6f9=await fetchMenuSnapshot(_0x46d3ae[_0x29ec9a(0x117)],_0x46d3ae[_0x29ec9a(0xf0)]),_0x37422d=requireMenu(_0x1ef6f9,_0x4e14e0),verifyRenamedFact(_0x4e1da0,_0x37422d,_0x23fc2e[_0x29ec9a(0x119)]);}catch(_0x4a6e58){const _0x4c95f8=describeMenuErrorCause(_0x4a6e58,'verify\x20menu\x20rename',_0x4e14e0),_0x5e7383=asVerificationError(_0x4a6e58,_0x29ec9a(0x118)+_0x4e14e0+_0x29ec9a(0xd9));throw menuFailure(_0x5e7383,_0x5a4af4,{'stage':_0x29ec9a(0xda),'succeeded':[{'id':_0x4e14e0,'updateRequested':!![]}],'failed':{'id':_0x4e14e0,'requestedStateConfirmed':![],..._0x4c95f8},'warnings':[_0x29ec9a(0x106)],'verification':{'status':_0x29ec9a(0x123),'targetId':_0x4e14e0,'lookupCommand':buildLookupCommand(_0x46d3ae[_0x29ec9a(0x117)])}});}return renameSuccess(_0x5a4af4,_0x1ef6f9,_0x37422d,![],![]);}};function validateInput(_0xf31d1e){const _0xb1e72f=a117_0x44794d;validateExactId(_0xf31d1e);if(!_0xf31d1e['str']('label')[_0xb1e72f(0xeb)]())throw CliErrors['validation'](_0xb1e72f(0x108));if(!_0xf31d1e[_0xb1e72f(0xe2)](_0xb1e72f(0xf6))[_0xb1e72f(0xeb)]())throw CliErrors[_0xb1e72f(0xfa)](_0xb1e72f(0xf6));}async function buildPlan(_0x570f9c,_0x4ea80f){const _0x5b5a33=a117_0x44794d,_0x566be3=validateExactId(_0x570f9c),_0x2d9c9a=_0x570f9c[_0x5b5a33(0xe2)](_0x5b5a33(0x119))[_0x5b5a33(0xeb)](),_0x183936=_0x570f9c[_0x5b5a33(0xe2)](_0x5b5a33(0xf6)),_0x2d8831=await fetchMutationSnapshot(_0x570f9c,_0x5b5a33(0x102),_0x566be3),_0x5641d1=requireMenu(_0x2d8831,_0x566be3);if(_0x5641d1[_0x5b5a33(0x119)]!==_0x183936)throw menuError('menu_state_drift','Menu\x20'+_0x566be3+_0x5b5a33(0xdc)+JSON['stringify'](_0x183936)+',\x20current\x20'+JSON[_0x5b5a33(0x11e)](_0x5641d1['label'])+'.',_0x5b5a33(0xf1));const _0x96b961={'id':_0x566be3,'appCode':_0x570f9c['appCode'],'label':_0x2d9c9a},_0xa88bd7={..._0x5641d1,'label':_0x2d9c9a},_0xfd3667=_0x5641d1[_0x5b5a33(0x119)]===_0x2d9c9a,_0xb3ea74=_0xfd3667?[]:[{'stage':_0x5b5a33(0xdd),'method':_0x5b5a33(0xfe),'path':_0x5b5a33(0xd8),'body':_0x96b961}];return{'snapshot':_0x2d8831,'before':_0x5641d1,'body':_0x96b961,'noChanges':_0xfd3667,'plan':mutationResult({'operation':_0x5b5a33(0xdf),'selector':{'id':_0x566be3},'before':_0x5641d1,'after':_0xa88bd7,'dryRun':_0x4ea80f,'backend':[...BACKEND],'plannedActions':_0xb3ea74,'snapshotHash':_0x2d8831[_0x5b5a33(0x114)],'warnings':_0xfd3667?[_0x5b5a33(0xf5)]:[]})};}function verifyRenamedFact(_0x3870d8,_0x1282d2,_0x49ac98){const _0x20d43f=a117_0x44794d,_0x4e4c5b=[['id',_0x1282d2['id'],_0x3870d8['id']],['parentId',_0x1282d2['parentId'],_0x3870d8[_0x20d43f(0xf9)]],['depth',_0x1282d2[_0x20d43f(0xdb)],_0x3870d8['depth']],['path',_0x1282d2[_0x20d43f(0x122)],_0x3870d8[_0x20d43f(0x122)]],['url',_0x1282d2[_0x20d43f(0x107)],_0x3870d8[_0x20d43f(0x107)]],['type',_0x1282d2[_0x20d43f(0xe9)],_0x3870d8[_0x20d43f(0xe9)]],['visible',_0x1282d2[_0x20d43f(0x11d)],_0x3870d8[_0x20d43f(0x11d)]],[_0x20d43f(0x113),_0x1282d2[_0x20d43f(0x113)],_0x3870d8['sort']],[_0x20d43f(0xea),_0x1282d2[_0x20d43f(0xea)],_0x3870d8[_0x20d43f(0xea)]],[_0x20d43f(0x111),_0x1282d2[_0x20d43f(0x111)],_0x3870d8[_0x20d43f(0x111)]],[_0x20d43f(0x10f),_0x1282d2[_0x20d43f(0x10f)],_0x3870d8[_0x20d43f(0x10f)]],[_0x20d43f(0x104),_0x1282d2[_0x20d43f(0x104)],_0x3870d8[_0x20d43f(0x104)]],[_0x20d43f(0xe7),_0x1282d2[_0x20d43f(0xe7)],_0x3870d8[_0x20d43f(0xe7)]],['pageType',_0x1282d2['pageType'],_0x3870d8[_0x20d43f(0xff)]],['modelType',_0x1282d2[_0x20d43f(0x101)],_0x3870d8[_0x20d43f(0x101)]],['datasetId',_0x1282d2[_0x20d43f(0xfd)],_0x3870d8[_0x20d43f(0xfd)]],[_0x20d43f(0xed),_0x1282d2[_0x20d43f(0xed)],_0x3870d8[_0x20d43f(0xed)]]];for(const [_0x470c08,_0x486f15,_0x2fd3c8]of _0x4e4c5b){assertVerified(sameValue(_0x486f15,_0x2fd3c8),_0x20d43f(0xe5)+_0x3870d8['id']+'\x20'+_0x470c08+_0x20d43f(0xe4));}assertVerified(_0x1282d2[_0x20d43f(0x119)]===_0x49ac98,'Menu\x20'+_0x3870d8['id']+_0x20d43f(0xf2));}function sameValue(_0x29876d,_0x4c4b6e){const _0x185ae2=a117_0x44794d;if(Array['isArray'](_0x29876d)||Array[_0x185ae2(0x10b)](_0x4c4b6e))return JSON[_0x185ae2(0x11e)](_0x29876d)===JSON[_0x185ae2(0x11e)](_0x4c4b6e);return _0x29876d===_0x4c4b6e;}function a117_0x40a6(_0x6e0f09,_0x21dde5){_0x6e0f09=_0x6e0f09-0xd7;const _0xe47d73=a117_0xe47d();let _0x40a641=_0xe47d73[_0x6e0f09];return _0x40a641;}function renameSuccess(_0x270a16,_0x530154,_0x2ab5a9,_0x5959d4,_0x29a0d2){const _0x6c6009=a117_0x44794d,_0x1fbc3d=_0x2ab5a9['id'],_0x1d1ff1=mutationResult({..._0x270a16,'after':_0x2ab5a9,'dryRun':![],'succeeded':[{'id':_0x1fbc3d,'updated':!_0x5959d4,'skipped':_0x5959d4,'recovered':_0x29a0d2}],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x530154[_0x6c6009(0x114)],'targetId':_0x1fbc3d,'matchesRequestedState':!![],'recovered':_0x29a0d2}});return{'ok':!![],'message':_0x29a0d2?_0x6c6009(0x11b)+_0x1fbc3d+'.':_0x5959d4?_0x6c6009(0xe5)+_0x1fbc3d+_0x6c6009(0x10e):_0x6c6009(0x100)+_0x1fbc3d+'.','data':{..._0x1d1ff1,'recovered':_0x29a0d2}};}function a117_0xe47d(){const _0x48a3be=['resourcesValid','rabetbase\x20menu\x20list\x20--appcode\x20','sort','hash','update','1825784gVJLHB','appCode','Rename\x20request\x20for\x20menu\x20','label','menu_update_recovery_required','Recovered\x20confirmed\x20rename\x20for\x20menu\x20','\x20could\x20not\x20be\x20verified\x20safely','visible','stringify','1595ZiSgnC','\x20and\x20inspect\x20the\x20exact\x20menu\x20id\x20before\x20retrying.','byId','path','failed','get','update-recovery','/smartapi/menu/update','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','verification','depth','\x20label\x20changed:\x20expected\x20','rename-menu','2145636HMxwwg','rename','1158efAvss','Rename\x20one\x20existing\x20menu\x20without\x20changing\x20its\x20type\x20or\x20page\x20binding','str','replace','\x20changed\x20during\x20the\x20label-only\x20rename.','Menu\x20','Run\x20','pageId','write','type','resources','trim','requestedLabelObserved','datasetCode','787312oNTNhn','Would\x20rename\x20menu\x20','cookie','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-label.','\x20label\x20update\x20did\x20not\x20take\x20effect.','19590156EKChCN','string','The\x20menu\x20already\x20has\x20the\x20requested\x20label;\x20no\x20write\x20is\x20needed.','expect-label','after','The\x20rename\x20may\x20have\x20taken\x20effect.\x20Automatic\x20retry\x20is\x20disabled.','parentId','flagMissing','The\x20requested\x20label\x20was\x20observed\x20after\x20response\x20loss,\x20but\x20other\x20menu\x20facts\x20changed.','plan','datasetId','POST','pageType','Renamed\x20menu\x20','modelType','rename\x20menu','readbackFailed','childrenCount','Abort\x20unless\x20the\x20current\x20menu\x20label\x20exactly\x20matches','The\x20rename\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','url','--label\x20cannot\x20be\x20empty.','body','4SbfpDd','isArray','4988935zTXVzt','1153933ckZuqB','\x20already\x20has\x20the\x20requested\x20label.','childrenIds','\x27\x5c\x27\x27'];a117_0xe47d=function(){return _0x48a3be;};return a117_0xe47d();}async function recoverAfterResponseLoss(_0x38b7f1,_0x44eae8){const _0x39fc9b=a117_0x44794d,{plan:_0x32f625,before:_0x1d3035,body:_0x4169f5}=_0x44eae8;let _0x240a20;try{_0x240a20=await fetchMenuSnapshot(_0x38b7f1[_0x39fc9b(0x117)],_0x38b7f1[_0x39fc9b(0xf0)]);}catch{throw recoveryRequired(_0x32f625,_0x38b7f1[_0x39fc9b(0x117)],{'id':_0x4169f5['id'],'readbackFailed':!![]});}const _0x2735cf=_0x240a20[_0x39fc9b(0x121)][_0x39fc9b(0x124)](_0x4169f5['id']);if(!_0x2735cf||_0x2735cf[_0x39fc9b(0x119)]!==_0x4169f5[_0x39fc9b(0x119)])throw recoveryRequired(_0x32f625,_0x38b7f1[_0x39fc9b(0x117)],{'id':_0x4169f5['id'],'requestedLabelObserved':![],'after':_0x2735cf??null});try{verifyRenamedFact(_0x1d3035,_0x2735cf,_0x4169f5['label']);}catch(_0x569175){const _0x15976a=asVerificationError(_0x569175,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x4169f5['id']+_0x39fc9b(0x11c));throw menuFailure(_0x15976a,_0x32f625,{'stage':'update-recovery','succeeded':[{'id':_0x4169f5['id'],'updateRequested':!![],'recovered':!![]}],'failed':{'id':_0x4169f5['id'],'requestedLabelObserved':!![],'invariantsConfirmed':![]},'after':_0x2735cf,'warnings':[_0x39fc9b(0xfb)],'verification':{'status':_0x39fc9b(0x123),'targetId':_0x4169f5['id'],'requestedLabelObserved':!![],'invariantsConfirmed':![],'lookupCommand':buildLookupCommand(_0x38b7f1[_0x39fc9b(0x117)])}});}return renameSuccess(_0x32f625,_0x240a20,_0x2735cf,![],!![]);}function recoveryRequired(_0x4f77d5,_0xf10e17,_0x3f3b9f){const _0x41f5ef=a117_0x44794d,_0x31c434=menuError(_0x41f5ef(0x11a),'The\x20rename\x20response\x20was\x20lost\x20and\x20the\x20requested\x20label\x20cannot\x20be\x20confirmed\x20safely.',_0x41f5ef(0xe6)+buildLookupCommand(_0xf10e17)+_0x41f5ef(0x120));return menuFailure(_0x31c434,_0x4f77d5,{'stage':_0x41f5ef(0xd7),'failed':{'id':_0x3f3b9f['id'],..._0x3f3b9f[_0x41f5ef(0xec)]===undefined?{}:{'requestedLabelObserved':_0x3f3b9f[_0x41f5ef(0xec)]},..._0x3f3b9f['readbackFailed']?{'readbackFailed':!![]}:{}},'after':_0x3f3b9f[_0x41f5ef(0xf7)],'warnings':[_0x41f5ef(0xf8)],'verification':{'status':_0x41f5ef(0x123),'targetId':_0x3f3b9f['id'],..._0x3f3b9f[_0x41f5ef(0xec)]===undefined?{}:{'requestedLabelObserved':_0x3f3b9f[_0x41f5ef(0xec)]},..._0x3f3b9f[_0x41f5ef(0x103)]?{'readbackFailed':!![]}:{},'lookupCommand':buildLookupCommand(_0xf10e17)}});}function buildLookupCommand(_0x14fa6d){const _0x2609c7=a117_0x44794d,_0x11a644='\x27'+_0x14fa6d[_0x2609c7(0xe3)](/'/g,_0x2609c7(0x110))+'\x27';return _0x2609c7(0x112)+_0x11a644+'\x20--format\x20compress';}
1
+ const a117_0x3d82fc=a117_0x3376;(function(_0x305d42,_0x27e0ff){const _0x4771cc=a117_0x3376,_0x653f15=_0x305d42();while(!![]){try{const _0x42096e=-parseInt(_0x4771cc(0x105))/0x1*(parseInt(_0x4771cc(0xea))/0x2)+-parseInt(_0x4771cc(0xd7))/0x3*(parseInt(_0x4771cc(0x10a))/0x4)+-parseInt(_0x4771cc(0xcf))/0x5*(-parseInt(_0x4771cc(0xe1))/0x6)+-parseInt(_0x4771cc(0x10d))/0x7*(-parseInt(_0x4771cc(0xf8))/0x8)+parseInt(_0x4771cc(0xee))/0x9*(-parseInt(_0x4771cc(0xf5))/0xa)+-parseInt(_0x4771cc(0x108))/0xb*(parseInt(_0x4771cc(0xf6))/0xc)+parseInt(_0x4771cc(0xc6))/0xd;if(_0x42096e===_0x27e0ff)break;else _0x653f15['push'](_0x653f15['shift']());}catch(_0x54830e){_0x653f15['push'](_0x653f15['shift']());}}}(a117_0xf747,0xdd4fe));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_ID_FLAG,asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a117_0x3d82fc(0x103),'path':a117_0x3d82fc(0xe9)}];export const menuRename={'service':a117_0x3d82fc(0x109),'command':a117_0x3d82fc(0xf1),'description':'Rename\x20one\x20existing\x20menu\x20without\x20changing\x20its\x20type\x20or\x20page\x20binding','risk':a117_0x3d82fc(0xd6),'structuredErrors':!![],'flags':[MENU_ID_FLAG,{'name':a117_0x3d82fc(0x101),'type':a117_0x3d82fc(0xf0),'required':!![],'description':'New\x20menu\x20label'},{'name':a117_0x3d82fc(0xcb),'type':a117_0x3d82fc(0xf0),'required':!![],'description':a117_0x3d82fc(0xbf)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x105c08){validateInput(_0x105c08);},async 'dryRun'(_0x386af4){const _0x5f0369=a117_0x3d82fc;validateInput(_0x386af4);const _0xe91013=await buildPlan(_0x386af4,!![]);return menuDryRunResult(_0xe91013['plan'],{'method':_0x5f0369(0x103),'url':'/smartapi/menu/update','body':_0xe91013[_0x5f0369(0xbe)],'description':_0x5f0369(0xd9)+_0xe91013[_0x5f0369(0xbe)]['id']+'.'});},async 'execute'(_0x84fca0){const _0x5329a0=a117_0x3d82fc;validateInput(_0x84fca0);const _0x4d32a6=await buildPlan(_0x84fca0,![]),{plan:_0x41f903,body:_0x2c057f,before:_0x17012e,noChanges:_0xcc655d}=_0x4d32a6,_0x3549c7=_0x2c057f['id'];if(_0xcc655d)return renameSuccess(_0x41f903,_0x4d32a6[_0x5329a0(0xe5)],_0x17012e,!![],![]);await recheckMutationSnapshot(_0x84fca0,_0x41f903,_0x5329a0(0xe7),_0x3549c7);try{await updateMenuEntity(_0x84fca0[_0x5329a0(0xd0)],_0x84fca0[_0x5329a0(0xec)],{'id':_0x3549c7,'label':_0x2c057f[_0x5329a0(0x101)]});}catch(_0x19b7e1){const _0x1a10bf=mapMenuApiError(_0x19b7e1,_0x5329a0(0xf1),_0x3549c7);if(isMenuResponseLoss(_0x19b7e1)&&_0x1a10bf[_0x5329a0(0xc5)]!=='menu_permission_denied')return recoverAfterResponseLoss(_0x84fca0,_0x4d32a6);throw menuFailure(_0x1a10bf,_0x41f903,{'stage':'update','failed':{'id':_0x3549c7},'warnings':[_0x5329a0(0xda)],'verification':{'status':'failed','targetId':_0x3549c7,'lookupCommand':buildLookupCommand(_0x84fca0[_0x5329a0(0xd0)])}});}let _0x4085fe,_0x174ad1;try{_0x4085fe=await fetchMenuSnapshot(_0x84fca0['appCode'],_0x84fca0['cookie']),_0x174ad1=requireMenu(_0x4085fe,_0x3549c7),verifyRenamedFact(_0x17012e,_0x174ad1,_0x2c057f['label']);}catch(_0x4fe8c5){const _0x244d80=describeMenuErrorCause(_0x4fe8c5,'verify\x20menu\x20rename',_0x3549c7),_0x3daeb2=asVerificationError(_0x4fe8c5,_0x5329a0(0x10b)+_0x3549c7+_0x5329a0(0xe3));throw menuFailure(_0x3daeb2,_0x41f903,{'stage':_0x5329a0(0xd5),'succeeded':[{'id':_0x3549c7,'updateRequested':!![]}],'failed':{'id':_0x3549c7,'requestedStateConfirmed':![],..._0x244d80},'warnings':[_0x5329a0(0xe0)],'verification':{'status':_0x5329a0(0xc0),'targetId':_0x3549c7,'lookupCommand':buildLookupCommand(_0x84fca0[_0x5329a0(0xd0)])}});}return renameSuccess(_0x41f903,_0x4085fe,_0x174ad1,![],![]);}};function validateInput(_0x316bf1){const _0xcc0fc1=a117_0x3d82fc;validateExactId(_0x316bf1);if(!_0x316bf1[_0xcc0fc1(0xdf)](_0xcc0fc1(0x101))[_0xcc0fc1(0xfe)]())throw CliErrors[_0xcc0fc1(0xc7)]('--label\x20cannot\x20be\x20empty.');if(!_0x316bf1[_0xcc0fc1(0xdf)](_0xcc0fc1(0xcb))[_0xcc0fc1(0xfe)]())throw CliErrors[_0xcc0fc1(0xf7)](_0xcc0fc1(0xcb));}async function buildPlan(_0x257c1f,_0x292614){const _0x312214=a117_0x3d82fc,_0xd95bb1=validateExactId(_0x257c1f),_0x2c6e94=_0x257c1f[_0x312214(0xdf)]('label')[_0x312214(0xfe)](),_0x45a290=_0x257c1f[_0x312214(0xdf)](_0x312214(0xcb)),_0x129aee=await fetchMutationSnapshot(_0x257c1f,_0x312214(0xe7),_0xd95bb1),_0x5a77da=requireMenu(_0x129aee,_0xd95bb1);if(_0x5a77da[_0x312214(0x101)]!==_0x45a290)throw menuError('menu_state_drift','Menu\x20'+_0xd95bb1+_0x312214(0xf4)+JSON[_0x312214(0xe4)](_0x45a290)+_0x312214(0xc8)+JSON[_0x312214(0xe4)](_0x5a77da['label'])+'.',_0x312214(0xe8));const _0x1beeac={'id':_0xd95bb1,'appCode':_0x257c1f[_0x312214(0xd0)],'label':_0x2c6e94},_0x1a0702={..._0x5a77da,'label':_0x2c6e94},_0x28e833=_0x5a77da['label']===_0x2c6e94,_0x316830=_0x28e833?[]:[{'stage':'rename-menu','method':_0x312214(0x103),'path':_0x312214(0xe9),'body':_0x1beeac}];return{'snapshot':_0x129aee,'before':_0x5a77da,'body':_0x1beeac,'noChanges':_0x28e833,'plan':mutationResult({'operation':'rename','selector':{'id':_0xd95bb1},'before':_0x5a77da,'after':_0x1a0702,'dryRun':_0x292614,'backend':[...BACKEND],'plannedActions':_0x316830,'snapshotHash':_0x129aee[_0x312214(0x10e)],'warnings':_0x28e833?[_0x312214(0xfb)]:[]})};}function verifyRenamedFact(_0x3ae7e7,_0x18e8d3,_0x380fc3){const _0x2fbca2=a117_0x3d82fc,_0x404022=[['id',_0x18e8d3['id'],_0x3ae7e7['id']],[_0x2fbca2(0xf2),_0x18e8d3[_0x2fbca2(0xf2)],_0x3ae7e7[_0x2fbca2(0xf2)]],[_0x2fbca2(0xf9),_0x18e8d3[_0x2fbca2(0xf9)],_0x3ae7e7['depth']],[_0x2fbca2(0xed),_0x18e8d3['path'],_0x3ae7e7[_0x2fbca2(0xed)]],[_0x2fbca2(0xce),_0x18e8d3[_0x2fbca2(0xce)],_0x3ae7e7[_0x2fbca2(0xce)]],['type',_0x18e8d3[_0x2fbca2(0xeb)],_0x3ae7e7[_0x2fbca2(0xeb)]],[_0x2fbca2(0x10c),_0x18e8d3[_0x2fbca2(0x10c)],_0x3ae7e7['visible']],[_0x2fbca2(0xff),_0x18e8d3['sort'],_0x3ae7e7['sort']],['resources',_0x18e8d3[_0x2fbca2(0xcc)],_0x3ae7e7[_0x2fbca2(0xcc)]],['resourcesValid',_0x18e8d3[_0x2fbca2(0xca)],_0x3ae7e7['resourcesValid']],[_0x2fbca2(0xd2),_0x18e8d3['childrenIds'],_0x3ae7e7[_0x2fbca2(0xd2)]],['childrenCount',_0x18e8d3['childrenCount'],_0x3ae7e7[_0x2fbca2(0xdc)]],[_0x2fbca2(0x106),_0x18e8d3['pageId'],_0x3ae7e7[_0x2fbca2(0x106)]],[_0x2fbca2(0xfc),_0x18e8d3[_0x2fbca2(0xfc)],_0x3ae7e7['pageType']],['modelType',_0x18e8d3[_0x2fbca2(0xd3)],_0x3ae7e7[_0x2fbca2(0xd3)]],[_0x2fbca2(0xd8),_0x18e8d3[_0x2fbca2(0xd8)],_0x3ae7e7[_0x2fbca2(0xd8)]],['datasetCode',_0x18e8d3[_0x2fbca2(0xef)],_0x3ae7e7[_0x2fbca2(0xef)]]];for(const [_0x5853c1,_0x32c90e,_0x19f56f]of _0x404022){assertVerified(sameValue(_0x32c90e,_0x19f56f),_0x2fbca2(0xf3)+_0x3ae7e7['id']+'\x20'+_0x5853c1+_0x2fbca2(0xc4));}assertVerified(_0x18e8d3['label']===_0x380fc3,'Menu\x20'+_0x3ae7e7['id']+_0x2fbca2(0xc9));}function sameValue(_0x2eb33f,_0x4212e4){const _0xe73417=a117_0x3d82fc;if(Array['isArray'](_0x2eb33f)||Array['isArray'](_0x4212e4))return JSON['stringify'](_0x2eb33f)===JSON[_0xe73417(0xe4)](_0x4212e4);return _0x2eb33f===_0x4212e4;}function renameSuccess(_0x41258e,_0x46f6dc,_0x22dddc,_0x56e890,_0x58455d){const _0x1e7026=a117_0x3d82fc,_0x3d4329=_0x22dddc['id'],_0x59d0ab=mutationResult({..._0x41258e,'after':_0x22dddc,'dryRun':![],'succeeded':[{'id':_0x3d4329,'updated':!_0x56e890,'skipped':_0x56e890,'recovered':_0x58455d}],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x46f6dc['hash'],'targetId':_0x3d4329,'matchesRequestedState':!![],'recovered':_0x58455d}});return{'ok':!![],'message':_0x58455d?'Recovered\x20confirmed\x20rename\x20for\x20menu\x20'+_0x3d4329+'.':_0x56e890?_0x1e7026(0xf3)+_0x3d4329+_0x1e7026(0xdd):_0x1e7026(0xc3)+_0x3d4329+'.','data':{..._0x59d0ab,'recovered':_0x58455d}};}async function recoverAfterResponseLoss(_0x274328,_0x2f5912){const _0x36abe2=a117_0x3d82fc,{plan:_0x2b21d0,before:_0xac0dd2,body:_0x5b9621}=_0x2f5912;let _0x9452a7;try{_0x9452a7=await fetchMenuSnapshot(_0x274328[_0x36abe2(0xd0)],_0x274328['cookie']);}catch{throw recoveryRequired(_0x2b21d0,_0x274328[_0x36abe2(0xd0)],{'id':_0x5b9621['id'],'readbackFailed':!![]});}const _0x2cf0ee=_0x9452a7['byId'][_0x36abe2(0xde)](_0x5b9621['id']);if(!_0x2cf0ee||_0x2cf0ee[_0x36abe2(0x101)]!==_0x5b9621['label'])throw recoveryRequired(_0x2b21d0,_0x274328['appCode'],{'id':_0x5b9621['id'],'requestedLabelObserved':![],'after':_0x2cf0ee??null});try{verifyRenamedFact(_0xac0dd2,_0x2cf0ee,_0x5b9621['label']);}catch(_0x3e4a0e){const _0x42674f=asVerificationError(_0x3e4a0e,_0x36abe2(0xdb)+_0x5b9621['id']+_0x36abe2(0xcd));throw menuFailure(_0x42674f,_0x2b21d0,{'stage':_0x36abe2(0x107),'succeeded':[{'id':_0x5b9621['id'],'updateRequested':!![],'recovered':!![]}],'failed':{'id':_0x5b9621['id'],'requestedLabelObserved':!![],'invariantsConfirmed':![]},'after':_0x2cf0ee,'warnings':['The\x20requested\x20label\x20was\x20observed\x20after\x20response\x20loss,\x20but\x20other\x20menu\x20facts\x20changed.'],'verification':{'status':_0x36abe2(0xc0),'targetId':_0x5b9621['id'],'requestedLabelObserved':!![],'invariantsConfirmed':![],'lookupCommand':buildLookupCommand(_0x274328[_0x36abe2(0xd0)])}});}return renameSuccess(_0x2b21d0,_0x9452a7,_0x2cf0ee,![],!![]);}function a117_0x3376(_0x89ef0d,_0x169158){_0x89ef0d=_0x89ef0d-0xbe;const _0xf747de=a117_0xf747();let _0x3376c3=_0xf747de[_0x89ef0d];return _0x3376c3;}function recoveryRequired(_0x5ed26d,_0x5345f3,_0x348bfa){const _0x14c0a0=a117_0x3d82fc,_0x4557fc=menuError(_0x14c0a0(0xd1),_0x14c0a0(0xfd),'Run\x20'+buildLookupCommand(_0x5345f3)+_0x14c0a0(0xc1));return menuFailure(_0x4557fc,_0x5ed26d,{'stage':_0x14c0a0(0x107),'failed':{'id':_0x348bfa['id'],..._0x348bfa[_0x14c0a0(0xfa)]===undefined?{}:{'requestedLabelObserved':_0x348bfa[_0x14c0a0(0xfa)]},..._0x348bfa[_0x14c0a0(0x102)]?{'readbackFailed':!![]}:{}},'after':_0x348bfa[_0x14c0a0(0x100)],'warnings':[_0x14c0a0(0x104)],'verification':{'status':_0x14c0a0(0xc0),'targetId':_0x348bfa['id'],..._0x348bfa['requestedLabelObserved']===undefined?{}:{'requestedLabelObserved':_0x348bfa[_0x14c0a0(0xfa)]},..._0x348bfa[_0x14c0a0(0x102)]?{'readbackFailed':!![]}:{},'lookupCommand':buildLookupCommand(_0x5345f3)}});}function a117_0xf747(){const _0x271ce1=['flagMissing','46088JtMMuD','depth','requestedLabelObserved','The\x20menu\x20already\x20has\x20the\x20requested\x20label;\x20no\x20write\x20is\x20needed.','pageType','The\x20rename\x20response\x20was\x20lost\x20and\x20the\x20requested\x20label\x20cannot\x20be\x20confirmed\x20safely.','trim','sort','after','label','readbackFailed','POST','The\x20rename\x20may\x20have\x20taken\x20effect.\x20Automatic\x20retry\x20is\x20disabled.','600130jjUUyi','pageId','update-recovery','6765FVJrQn','menu','1131124hjMQJG','Rename\x20request\x20for\x20menu\x20','visible','1183aiTort','hash','body','Abort\x20unless\x20the\x20current\x20menu\x20label\x20exactly\x20matches','failed','\x20and\x20inspect\x20the\x20exact\x20menu\x20id\x20before\x20retrying.','\x27\x5c\x27\x27','Renamed\x20menu\x20','\x20changed\x20during\x20the\x20label-only\x20rename.','code','9158214wiQMnS','validation',',\x20current\x20','\x20label\x20update\x20did\x20not\x20take\x20effect.','resourcesValid','expect-label','resources','\x20could\x20not\x20be\x20verified\x20safely','url','5wttAYJ','appCode','menu_update_recovery_required','childrenIds','modelType','\x20--format\x20compress','verification','write','3ZVhkMv','datasetId','Would\x20rename\x20menu\x20','The\x20rename\x20request\x20was\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Response\x20was\x20lost\x20and\x20menu\x20','childrenCount','\x20already\x20has\x20the\x20requested\x20label.','get','str','The\x20rename\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','8497242QxbwGT','replace','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','stringify','snapshot','rabetbase\x20menu\x20list\x20--appcode\x20','rename\x20menu','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-label.','/smartapi/menu/update','2aHNGFr','type','cookie','path','9186831duHmfo','datasetCode','string','rename','parentId','Menu\x20','\x20label\x20changed:\x20expected\x20','10ovMSyu','5544lpuBIE'];a117_0xf747=function(){return _0x271ce1;};return a117_0xf747();}function buildLookupCommand(_0x36e58b){const _0x293257=a117_0x3d82fc,_0x553843='\x27'+_0x36e58b[_0x293257(0xe2)](/'/g,_0x293257(0xc2))+'\x27';return _0x293257(0xe6)+_0x553843+_0x293257(0xd4);}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Menu compare table renderer
3
+ *
4
+ * Migrated from MenuSyncUI (app-menu-sync-ui.tsx).
5
+ * Renders the local vs online comparison table in plain text.
6
+ */
7
+ import type { LocalPage } from "../../../commands/menu/shared/types.js";
8
+ export interface CompareRow {
9
+ label: string;
10
+ path: string;
11
+ local: boolean;
12
+ online: boolean;
13
+ }
14
+ /**
15
+ * Render the local vs platform comparison table.
16
+ */
17
+ export declare function renderCompareTable(rows: CompareRow[], options?: {
18
+ showOnline?: boolean;
19
+ }): string;
20
+ /**
21
+ * Render the sync summary: shows which pages will be created.
22
+ */
23
+ export declare function renderSyncSummary(pages: LocalPage[], hasOnline: boolean): string;
24
+ /**
25
+ * Render the update summary: shows which menus will be updated.
26
+ */
27
+ export declare function renderUpdateSummary(menuLabels: string[], resources: (string | undefined)[]): string;
@@ -1 +1 @@
1
- (function(_0x9193e,_0x37540e){const _0x5a4121=a118_0x5591,_0x23ba51=_0x9193e();while(!![]){try{const _0x1e8d80=parseInt(_0x5a4121(0xeb))/0x1+parseInt(_0x5a4121(0xf8))/0x2+-parseInt(_0x5a4121(0xf9))/0x3*(parseInt(_0x5a4121(0xfe))/0x4)+parseInt(_0x5a4121(0xe5))/0x5*(parseInt(_0x5a4121(0xf6))/0x6)+-parseInt(_0x5a4121(0xf0))/0x7+parseInt(_0x5a4121(0xf4))/0x8*(-parseInt(_0x5a4121(0xe9))/0x9)+-parseInt(_0x5a4121(0xe6))/0xa*(parseInt(_0x5a4121(0xfa))/0xb);if(_0x1e8d80===_0x37540e)break;else _0x23ba51['push'](_0x23ba51['shift']());}catch(_0x331def){_0x23ba51['push'](_0x23ba51['shift']());}}}(a118_0xbbce,0x40acb));function strWidth(_0x6b4b0){let _0x37a3a0=0x0;for(const _0xb9d1ca of _0x6b4b0){_0x37a3a0+=/[\u4e00-\u9fa5]/['test'](_0xb9d1ca)?0x2:0x1;}return _0x37a3a0;}function a118_0xbbce(){const _0x578e69=['max','406612hTITwg','12vSuAOT','22JrIxZv','map','push','\x20\x20No\x20pages\x20to\x20sync.','26932zZBnbh','local','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','\x20\x20\x20\x20•\x20','\x20\x20\x20\x20CSS:\x20','repeat','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','5DNlUGL','348860EArKUF','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','online','1061163DqltXh','label','454485DjZCnO','showOnline','length','Platform','path','2281447vFPgJd','\x20\x20\x20\x20JS:\x20\x20','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','Menu\x20Name','16AjdqCd','Local','1593330dHKXEb'];a118_0xbbce=function(){return _0x578e69;};return a118_0xbbce();}function padRight(_0x474675,_0x17ce33){const _0x5cc06f=a118_0x5591,_0x30e344=strWidth(_0x474675);return _0x474675+'\x20'[_0x5cc06f(0xe3)](Math[_0x5cc06f(0xf7)](0x0,_0x17ce33-_0x30e344));}export function renderCompareTable(_0x863c0d,_0x4769c5={}){const _0x5c266e=a118_0x5591;if(_0x863c0d[_0x5c266e(0xed)]===0x0)return'';const _0x4dd36c=_0x4769c5[_0x5c266e(0xec)]??!![],_0xf3f577=Math['max'](0x1e,..._0x863c0d[_0x5c266e(0xfb)](_0x4cb07b=>strWidth(_0x4cb07b[_0x5c266e(0xea)]))),_0x2d7f61=Math[_0x5c266e(0xf7)](0x18,..._0x863c0d[_0x5c266e(0xfb)](_0x166d6f=>strWidth(_0x166d6f['path']))),_0x288f21=0x4,_0x4d8a6b=[],_0x4981f2='\x20\x20'+padRight(_0x5c266e(0xf3),_0xf3f577),_0x5ef75a=padRight('Path',_0x2d7f61),_0x191743=padRight(_0x5c266e(0xf5),_0x288f21),_0x42c4ac=_0x4dd36c?'\x20\x20'+padRight(_0x5c266e(0xee),_0x288f21):'';_0x4d8a6b['push'](_0x4981f2+'\x20\x20'+_0x5ef75a+'\x20\x20'+_0x191743+(_0x4dd36c?_0x42c4ac:'')),_0x4d8a6b[_0x5c266e(0xfc)]('\x20\x20'+'─'['repeat'](_0xf3f577)+'\x20\x20'+'─'[_0x5c266e(0xe3)](_0x2d7f61)+'\x20\x20'+'─'[_0x5c266e(0xe3)](_0x288f21)+(_0x4dd36c?'\x20\x20'+'─'[_0x5c266e(0xe3)](_0x288f21):''));for(const _0x2c7527 of _0x863c0d){const _0x3c0e84=padRight(_0x2c7527[_0x5c266e(0xea)],_0xf3f577),_0x1136ed=padRight(_0x2c7527[_0x5c266e(0xef)],_0x2d7f61),_0x32e532=_0x2c7527[_0x5c266e(0xdf)]?'✓':'✗',_0x1b2a92=padRight(_0x32e532,_0x288f21);let _0x1d6a5c='\x20\x20'+_0x3c0e84+'\x20\x20'+_0x1136ed+'\x20\x20'+_0x1b2a92;if(_0x4dd36c){const _0x3a0806=_0x2c7527[_0x5c266e(0xe8)]?'✓':'✗';_0x1d6a5c+='\x20\x20'+padRight(_0x3a0806,_0x288f21);}_0x4d8a6b[_0x5c266e(0xfc)](_0x1d6a5c);}return _0x4d8a6b['join']('\x0a');}function a118_0x5591(_0x37941b,_0x1b1955){_0x37941b=_0x37941b-0xdf;const _0xbbcec0=a118_0xbbce();let _0x55916c=_0xbbcec0[_0x37941b];return _0x55916c;}export function renderSyncSummary(_0x405f78,_0x321a78){const _0x500aec=a118_0x5591;if(_0x405f78[_0x500aec(0xed)]===0x0)return _0x321a78?_0x500aec(0xe4):_0x500aec(0xfd);const _0x17274f=['\x20\x20'+_0x405f78['length']+_0x500aec(0xf2)];for(const _0x4f54bf of _0x405f78){_0x17274f[_0x500aec(0xfc)](_0x500aec(0xe1)+_0x4f54bf[_0x500aec(0xea)]+'\x20('+_0x4f54bf['path']+')');}return _0x17274f['join']('\x0a');}export function renderUpdateSummary(_0x53ae48,_0x4b235a){const _0x138f91=a118_0x5591;if(_0x53ae48[_0x138f91(0xed)]===0x0)return _0x138f91(0xe7);const _0x57e6e1=['\x20\x20'+_0x53ae48[_0x138f91(0xed)]+_0x138f91(0xe0),_0x138f91(0xf1)+(_0x4b235a[0x0]??'(unchanged)'),_0x138f91(0xe2)+(_0x4b235a[0x1]??'(unchanged)'),'','\x20\x20Affected\x20menus:\x20'+_0x53ae48['join'](',\x20')];return _0x57e6e1['join']('\x0a');}
1
+ function a118_0x2cfe(_0x1cde89,_0xfe9bb8){_0x1cde89=_0x1cde89-0xe1;const _0x5b623e=a118_0x5b62();let _0x2cfe25=_0x5b623e[_0x1cde89];return _0x2cfe25;}(function(_0x1a40f8,_0x2408f0){const _0x2c1545=a118_0x2cfe,_0x300a3a=_0x1a40f8();while(!![]){try{const _0x33b885=parseInt(_0x2c1545(0xf2))/0x1+parseInt(_0x2c1545(0xfa))/0x2*(-parseInt(_0x2c1545(0x100))/0x3)+-parseInt(_0x2c1545(0xf0))/0x4*(-parseInt(_0x2c1545(0xf1))/0x5)+parseInt(_0x2c1545(0xe2))/0x6*(parseInt(_0x2c1545(0xfc))/0x7)+parseInt(_0x2c1545(0xe6))/0x8+parseInt(_0x2c1545(0xf3))/0x9+-parseInt(_0x2c1545(0xfe))/0xa;if(_0x33b885===_0x2408f0)break;else _0x300a3a['push'](_0x300a3a['shift']());}catch(_0x56bac5){_0x300a3a['push'](_0x300a3a['shift']());}}}(a118_0x5b62,0xca59b));function strWidth(_0x485443){let _0x3575c8=0x0;for(const _0x54e6bd of _0x485443){_0x3575c8+=/[\u4e00-\u9fa5]/['test'](_0x54e6bd)?0x2:0x1;}return _0x3575c8;}function a118_0x5b62(){const _0x70e4d5=['label','11627030XXRRPP','Platform','6cRTSIL','\x20\x20\x20\x20JS:\x20\x20','85584OBVhOE','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','map','\x20\x20\x20\x20•\x20','10788008PHxlOo','Path','\x20\x20Affected\x20menus:\x20','length','local','\x20\x20No\x20pages\x20to\x20sync.','max','(unchanged)','Local','\x20\x20\x20\x20CSS:\x20','4267036UgPuYa','5NDWDDE','960mrrSec','124038ARQZrr','repeat','path','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','push','join','showOnline','1322840KLOgfL','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','434dYSrmM'];a118_0x5b62=function(){return _0x70e4d5;};return a118_0x5b62();}function padRight(_0x5bd78c,_0x43b00f){const _0x55e923=a118_0x2cfe,_0x513855=strWidth(_0x5bd78c);return _0x5bd78c+'\x20'['repeat'](Math[_0x55e923(0xec)](0x0,_0x43b00f-_0x513855));}export function renderCompareTable(_0x56485b,_0x400a96={}){const _0x173e09=a118_0x2cfe;if(_0x56485b[_0x173e09(0xe9)]===0x0)return'';const _0x5b0d08=_0x400a96[_0x173e09(0xf9)]??!![],_0x5b5ac4=Math[_0x173e09(0xec)](0x1e,..._0x56485b['map'](_0x1eb845=>strWidth(_0x1eb845[_0x173e09(0xfd)]))),_0x36c94b=Math[_0x173e09(0xec)](0x18,..._0x56485b[_0x173e09(0xe4)](_0x227f45=>strWidth(_0x227f45[_0x173e09(0xf5)]))),_0x895a9b=0x4,_0x27e457=[],_0x1fdf45='\x20\x20'+padRight('Menu\x20Name',_0x5b5ac4),_0x4f142a=padRight(_0x173e09(0xe7),_0x36c94b),_0x1d4fa7=padRight(_0x173e09(0xee),_0x895a9b),_0x18b2a0=_0x5b0d08?'\x20\x20'+padRight(_0x173e09(0xff),_0x895a9b):'';_0x27e457['push'](_0x1fdf45+'\x20\x20'+_0x4f142a+'\x20\x20'+_0x1d4fa7+(_0x5b0d08?_0x18b2a0:'')),_0x27e457[_0x173e09(0xf7)]('\x20\x20'+'─'[_0x173e09(0xf4)](_0x5b5ac4)+'\x20\x20'+'─'[_0x173e09(0xf4)](_0x36c94b)+'\x20\x20'+'─'[_0x173e09(0xf4)](_0x895a9b)+(_0x5b0d08?'\x20\x20'+'─'['repeat'](_0x895a9b):''));for(const _0x32d784 of _0x56485b){const _0x26fc55=padRight(_0x32d784[_0x173e09(0xfd)],_0x5b5ac4),_0x1a58e8=padRight(_0x32d784[_0x173e09(0xf5)],_0x36c94b),_0x1f6775=_0x32d784[_0x173e09(0xea)]?'✓':'✗',_0x5c9205=padRight(_0x1f6775,_0x895a9b);let _0x27ab19='\x20\x20'+_0x26fc55+'\x20\x20'+_0x1a58e8+'\x20\x20'+_0x5c9205;if(_0x5b0d08){const _0xaf0fac=_0x32d784['online']?'✓':'✗';_0x27ab19+='\x20\x20'+padRight(_0xaf0fac,_0x895a9b);}_0x27e457[_0x173e09(0xf7)](_0x27ab19);}return _0x27e457[_0x173e09(0xf8)]('\x0a');}export function renderSyncSummary(_0x9f3c6d,_0x2c650a){const _0x17e516=a118_0x2cfe;if(_0x9f3c6d['length']===0x0)return _0x2c650a?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x17e516(0xeb);const _0x24571a=['\x20\x20'+_0x9f3c6d[_0x17e516(0xe9)]+_0x17e516(0xf6)];for(const _0x38c365 of _0x9f3c6d){_0x24571a[_0x17e516(0xf7)](_0x17e516(0xe5)+_0x38c365[_0x17e516(0xfd)]+'\x20('+_0x38c365[_0x17e516(0xf5)]+')');}return _0x24571a[_0x17e516(0xf8)]('\x0a');}export function renderUpdateSummary(_0x27b273,_0x26809b){const _0x1e965e=a118_0x2cfe;if(_0x27b273[_0x1e965e(0xe9)]===0x0)return _0x1e965e(0xe3);const _0x294abd=['\x20\x20'+_0x27b273[_0x1e965e(0xe9)]+_0x1e965e(0xfb),_0x1e965e(0xe1)+(_0x26809b[0x0]??'(unchanged)'),_0x1e965e(0xef)+(_0x26809b[0x1]??_0x1e965e(0xed)),'',_0x1e965e(0xe8)+_0x27b273[_0x1e965e(0xf8)](',\x20')];return _0x294abd[_0x1e965e(0xf8)]('\x0a');}
@@ -0,0 +1,51 @@
1
+ import type { MenuFact, MenuMutationResult, MenuSnapshot } from "../../../commands/menu/shared/types.js";
2
+ interface MenuDeleteTargetFingerprint {
3
+ id: number;
4
+ parentId: number | null;
5
+ depth: number;
6
+ label: string;
7
+ path: string;
8
+ type: string;
9
+ visible: boolean | null;
10
+ sort: number | null;
11
+ pageId: number | null;
12
+ pageType: string;
13
+ modelType: string;
14
+ datasetId: number | null;
15
+ datasetCode: string;
16
+ childrenIds: number[];
17
+ childrenCount: number;
18
+ resourcesValid: boolean;
19
+ resourcesHash: string;
20
+ extendHash: string;
21
+ updateTime: string | number | null;
22
+ }
23
+ export interface MenuDeletePlanFile {
24
+ version: 2;
25
+ command: "menu delete";
26
+ appCode: string;
27
+ createdAt: string;
28
+ expiresAt: string;
29
+ snapshotHash: string;
30
+ recursive: boolean;
31
+ target: MenuFact;
32
+ targetFingerprint: MenuDeleteTargetFingerprint;
33
+ targets: MenuFact[];
34
+ targetFingerprints: MenuDeleteTargetFingerprint[];
35
+ deleteOrder: number[];
36
+ cascade: {
37
+ pages: number[];
38
+ pageSchemaAffected: boolean;
39
+ };
40
+ warnings: string[];
41
+ }
42
+ export declare function createMenuDeletePlanFile(appCode: string, plan: MenuMutationResult, now?: Date): MenuDeletePlanFile;
43
+ export declare function writeMenuDeletePlan(filePath: string, plan: MenuDeletePlanFile): Promise<string>;
44
+ export declare function readMenuDeletePlan(filePath: string): Promise<{
45
+ path: string;
46
+ plan: MenuDeletePlanFile;
47
+ }>;
48
+ export declare function mutationPlanFromDeleteFile(file: MenuDeletePlanFile, path: string): MenuMutationResult;
49
+ export declare function assertMenuDeletePlanCurrent(file: MenuDeletePlanFile, appCode: string, snapshot: MenuSnapshot, now?: Date): MenuFact[];
50
+ export declare function assertMenuDeletePlanExecutable(file: MenuDeletePlanFile, appCode: string, now?: Date): void;
51
+ export {};
@@ -1 +1 @@
1
- const a119_0x25bede=a119_0x41cb;(function(_0x4a3d9f,_0x27c80b){const _0x49bcd5=a119_0x41cb,_0x24b04c=_0x4a3d9f();while(!![]){try{const _0xd70ef0=-parseInt(_0x49bcd5(0x20c))/0x1+parseInt(_0x49bcd5(0x233))/0x2*(-parseInt(_0x49bcd5(0x1ee))/0x3)+parseInt(_0x49bcd5(0x217))/0x4*(parseInt(_0x49bcd5(0x22d))/0x5)+parseInt(_0x49bcd5(0x1fd))/0x6*(parseInt(_0x49bcd5(0x21c))/0x7)+-parseInt(_0x49bcd5(0x23c))/0x8+parseInt(_0x49bcd5(0x1fa))/0x9*(parseInt(_0x49bcd5(0x251))/0xa)+parseInt(_0x49bcd5(0x23b))/0xb*(parseInt(_0x49bcd5(0x24c))/0xc);if(_0xd70ef0===_0x27c80b)break;else _0x24b04c['push'](_0x24b04c['shift']());}catch(_0xb1144d){_0x24b04c['push'](_0x24b04c['shift']());}}}(a119_0x5f9b,0x36b20));import{createHash}from'node:crypto';import{mkdir,readFile,stat,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';function a119_0x41cb(_0x52af63,_0xc2ca96){_0x52af63=_0x52af63-0x1ea;const _0x5f9bd5=a119_0x5f9b();let _0x41cb20=_0x5f9bd5[_0x52af63];return _0x41cb20;}import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND=a119_0x25bede(0x220),PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;function a119_0x5f9b(){const _0x14e09a=['updateTime','childrenIds','21264QmfYPM','menu_plan_write_failed','pageType','updateUserName','resourcesHash','10AsAhtE','label','digest','resourcesValid','pageSchemaAffected','isInteger','sha256','9DnrJBQ','targets','Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.','datasetCode','warnings','byId','length','targetFingerprints','Cannot\x20read\x20menu\x20delete\x20plan\x20','Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.','/smartapi/menu/batchDelete','Failed\x20to\x20write\x20menu\x20delete\x20plan\x20','1695105QFSpOg','recursive','Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.','18yuvIfK','\x20requires\x20a\x20non-empty\x20file\x20path.','Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20','Menu\x20delete\x20plan\x20creation\x20time\x20','Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.','snapshotHash','getTime','Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.','command','deleteOrder','menu_plan_invalid','datasetId','createdAt','hash','boolean','45095SrfONd','string','targetFingerprint','EEXIST','\x20of\x20the\x20','Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.','visible','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','every','appCode','Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20','12Ykdwol','parse','number','trim','utf8','690263VQGhnA','isFinite','menu_plan_file_exists','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','menu\x20delete','plan','test','POST','pageId','before','menu_plan_app_mismatch','\x20bytes.','updateUserId','resources','Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.','pages','expiresAt','345095AxpGhv','extendHash',',\x20current\x20app\x20is\x20','cascade','hex','modelType','295666WMnvbe','Planned\x20menu\x20','stringify','type','\x20contract.','childrenCount','sort','target','2343KDprIR','2848312HEDdIs','map','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.','parentId','isArray','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','path','extend','menu_state_drift','depth','isSafeInteger','Menu\x20delete\x20plan\x20targets\x20app\x20','size','toISOString'];a119_0x5f9b=function(){return _0x14e09a;};return a119_0x5f9b();}export function createMenuDeletePlanFile(_0x3b6f86,_0x4c1c9a,_0x55ffda=new Date()){const _0x1c7558=a119_0x25bede;if(!_0x4c1c9a['before']||!isMenuFact(_0x4c1c9a[_0x1c7558(0x225)]))throw menuError('menu_plan_invalid',_0x1c7558(0x1f7));const _0x395b82=_0x4c1c9a[_0x1c7558(0x1ef)]?.[_0x1c7558(0x1f4)]?_0x4c1c9a['targets']:[_0x4c1c9a[_0x1c7558(0x225)]],_0x17ba5c=_0x4c1c9a[_0x1c7558(0x206)]?.[_0x1c7558(0x1f4)]?_0x4c1c9a['deleteOrder']:_0x395b82[_0x1c7558(0x23d)](_0x38a47b=>_0x38a47b['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0x3b6f86,'createdAt':_0x55ffda[_0x1c7558(0x249)](),'expiresAt':new Date(_0x55ffda[_0x1c7558(0x203)]()+PLAN_TTL_MS)[_0x1c7558(0x249)](),'snapshotHash':_0x4c1c9a[_0x1c7558(0x202)],'recursive':_0x4c1c9a['selector'][_0x1c7558(0x1fb)]===!![],'target':_0x4c1c9a['before'],'targetFingerprint':fingerprint(_0x4c1c9a[_0x1c7558(0x225)]),'targets':_0x395b82,'targetFingerprints':_0x395b82[_0x1c7558(0x23d)](fingerprint),'deleteOrder':_0x17ba5c,'cascade':_0x4c1c9a[_0x1c7558(0x230)]??{'pages':_0x4c1c9a['before'][_0x1c7558(0x224)]==null?[]:[_0x4c1c9a[_0x1c7558(0x225)]['pageId']],'pageSchemaAffected':_0x4c1c9a['before']['pageId']!=null},'warnings':[..._0x4c1c9a['warnings']]};}export async function writeMenuDeletePlan(_0x3521a4,_0x5f201b){const _0x389150=a119_0x25bede,_0x197f6c=resolvePlanPath(_0x3521a4,'plan-out');await mkdir(dirname(_0x197f6c),{'recursive':!![]});try{await writeFile(_0x197f6c,JSON[_0x389150(0x235)](_0x5f201b,null,0x2)+'\x0a',{'encoding':_0x389150(0x21b),'flag':'wx'});}catch(_0x279410){if(_0x279410['code']===_0x389150(0x20f))throw menuError(_0x389150(0x21e),'Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20'+_0x197f6c,_0x389150(0x1fc));throw menuError(_0x389150(0x24d),_0x389150(0x1f9)+_0x197f6c+':\x20'+errorMessage(_0x279410));}return _0x197f6c;}export async function readMenuDeletePlan(_0x1de0aa){const _0x198356=a119_0x25bede,_0x1c1fa1=resolvePlanPath(_0x1de0aa,_0x198356(0x221));let _0xb758bb;try{_0xb758bb=(await stat(_0x1c1fa1))[_0x198356(0x248)];}catch(_0x27b35d){throw menuError(_0x198356(0x207),_0x198356(0x1f6)+_0x1c1fa1+':\x20'+errorMessage(_0x27b35d));}if(_0xb758bb>MAX_PLAN_BYTES)throw menuError('menu_plan_invalid',_0x198356(0x213)+_0xb758bb+_0x198356(0x227));let _0x1130b8;try{_0x1130b8=JSON[_0x198356(0x218)](await readFile(_0x1c1fa1,_0x198356(0x21b)));}catch(_0x5e8bde){throw menuError(_0x198356(0x207),_0x198356(0x1ff)+errorMessage(_0x5e8bde));}if(!isMenuDeletePlanFile(_0x1130b8))throw menuError(_0x198356(0x207),_0x198356(0x216)+PLAN_VERSION+_0x198356(0x210)+PLAN_COMMAND+_0x198356(0x237));if(!sameFingerprint(_0x1130b8[_0x198356(0x20e)],fingerprint(_0x1130b8[_0x198356(0x23a)])))throw menuError(_0x198356(0x207),_0x198356(0x22a),_0x198356(0x21f));if(!_0x1130b8[_0x198356(0x1ef)][_0x198356(0x214)]((_0x5b4a1f,_0x3b5d40)=>sameFingerprint(_0x1130b8[_0x198356(0x1f5)][_0x3b5d40],fingerprint(_0x5b4a1f)))||!sameFingerprint(_0x1130b8[_0x198356(0x20e)],fingerprint(_0x1130b8['targets'][_0x1130b8[_0x198356(0x1ef)][_0x198356(0x1f4)]-0x1])))throw menuError(_0x198356(0x207),_0x198356(0x204),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.');return{'path':_0x1c1fa1,'plan':_0x1130b8};}export function mutationPlanFromDeleteFile(_0x36e98b,_0x2a6a29){const _0x3d8a64=a119_0x25bede;return mutationResult({'operation':'delete','selector':{'id':_0x36e98b['target']['id'],'recursive':_0x36e98b[_0x3d8a64(0x1fb)]},'before':_0x36e98b[_0x3d8a64(0x23a)],'after':null,'dryRun':![],'backend':[{'method':_0x3d8a64(0x223),'path':_0x3d8a64(0x1f8)}],'plannedActions':[{'stage':'batch-delete-menu','method':_0x3d8a64(0x223),'path':_0x3d8a64(0x1f8),'body':{'idList':_0x36e98b[_0x3d8a64(0x206)]}}],'targets':_0x36e98b[_0x3d8a64(0x1ef)],'deleteOrder':_0x36e98b['deleteOrder'],'snapshotHash':_0x36e98b[_0x3d8a64(0x202)],'cascade':_0x36e98b['cascade'],'planFile':{'path':_0x2a6a29,'createdAt':_0x36e98b['createdAt'],'expiresAt':_0x36e98b[_0x3d8a64(0x22c)]},'warnings':_0x36e98b['warnings']});}export function assertMenuDeletePlanCurrent(_0x369720,_0x515da0,_0x58db60,_0x3b6934=new Date()){const _0x3d4565=a119_0x25bede;assertMenuDeletePlanExecutable(_0x369720,_0x515da0,_0x3b6934);if(_0x58db60[_0x3d4565(0x20a)]!==_0x369720[_0x3d4565(0x202)])throw menuError('menu_state_drift',_0x3d4565(0x1f0),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.');return _0x369720['targets'][_0x3d4565(0x23d)]((_0x9ebb93,_0x5b5b44)=>{const _0x301caf=_0x3d4565,_0x5942d4=_0x58db60[_0x301caf(0x1f3)]['get'](_0x9ebb93['id']);if(!_0x5942d4)throw menuError('menu_state_drift',_0x301caf(0x234)+_0x9ebb93['id']+_0x301caf(0x241));if(!sameFingerprint(_0x369720[_0x301caf(0x1f5)][_0x5b5b44],fingerprint(_0x5942d4)))throw menuError(_0x301caf(0x244),_0x301caf(0x234)+_0x9ebb93['id']+'\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.',_0x301caf(0x211));return _0x5942d4;});}export function assertMenuDeletePlanExecutable(_0x4b6535,_0x10a7b2,_0xe0a75e=new Date()){const _0x54f96a=a119_0x25bede;if(_0x4b6535[_0x54f96a(0x215)]!==_0x10a7b2)throw menuError(_0x54f96a(0x226),_0x54f96a(0x247)+JSON[_0x54f96a(0x235)](_0x4b6535[_0x54f96a(0x215)])+_0x54f96a(0x22f)+JSON[_0x54f96a(0x235)](_0x10a7b2)+'.');const _0x1cc6f1=Date['parse'](_0x4b6535[_0x54f96a(0x209)]),_0x1529b6=Date[_0x54f96a(0x218)](_0x4b6535[_0x54f96a(0x22c)]);if(!Number[_0x54f96a(0x21d)](_0x1cc6f1)||!Number[_0x54f96a(0x21d)](_0x1529b6)||_0x1529b6-_0x1cc6f1!==PLAN_TTL_MS)throw menuError(_0x54f96a(0x207),_0x54f96a(0x201));if(_0x1cc6f1>_0xe0a75e[_0x54f96a(0x203)]())throw menuError(_0x54f96a(0x207),_0x54f96a(0x200)+_0x4b6535[_0x54f96a(0x209)]+'\x20is\x20in\x20the\x20future.','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.');if(_0xe0a75e[_0x54f96a(0x203)]()>_0x1529b6)throw menuError('menu_plan_expired','Menu\x20delete\x20plan\x20expired\x20at\x20'+_0x4b6535[_0x54f96a(0x22c)]+'.',_0x54f96a(0x23e));}function fingerprint(_0x26b892){const _0x37d005=a119_0x25bede;return{'id':_0x26b892['id'],'parentId':_0x26b892[_0x37d005(0x23f)],'depth':_0x26b892['depth'],'label':_0x26b892[_0x37d005(0x252)],'path':_0x26b892[_0x37d005(0x242)],'type':_0x26b892[_0x37d005(0x236)],'visible':_0x26b892[_0x37d005(0x212)],'sort':_0x26b892['sort'],'pageId':_0x26b892[_0x37d005(0x224)],'pageType':_0x26b892['pageType'],'modelType':_0x26b892[_0x37d005(0x232)],'datasetId':_0x26b892[_0x37d005(0x208)],'datasetCode':_0x26b892[_0x37d005(0x1f1)],'childrenIds':[..._0x26b892[_0x37d005(0x24b)]],'childrenCount':_0x26b892[_0x37d005(0x238)],'resourcesValid':_0x26b892[_0x37d005(0x1ea)],'resourcesHash':hashValue(_0x26b892[_0x37d005(0x229)]),'extendHash':hashValue(_0x26b892[_0x37d005(0x243)]??null),'updateTime':_0x26b892[_0x37d005(0x24a)]};}function hashValue(_0x2fb167){const _0x524793=a119_0x25bede;return createHash(_0x524793(0x1ed))['update'](JSON[_0x524793(0x235)](_0x2fb167))[_0x524793(0x253)](_0x524793(0x231));}function sameFingerprint(_0x44ab98,_0x3cc752){const _0x2d39b3=a119_0x25bede;return JSON[_0x2d39b3(0x235)](_0x44ab98)===JSON[_0x2d39b3(0x235)](_0x3cc752);}function resolvePlanPath(_0x545e7b,_0x4a4b11){const _0x163ae6=a119_0x25bede,_0x12f894=_0x545e7b[_0x163ae6(0x21a)]();if(!_0x12f894)throw menuError('menu_plan_invalid','--'+_0x4a4b11+_0x163ae6(0x1fe));return resolve(_0x12f894);}function isMenuDeletePlanFile(_0x39f542){const _0x167c8b=a119_0x25bede;if(!isRecord(_0x39f542))return![];return _0x39f542['version']===PLAN_VERSION&&_0x39f542[_0x167c8b(0x205)]===PLAN_COMMAND&&typeof _0x39f542[_0x167c8b(0x215)]===_0x167c8b(0x20d)&&_0x39f542[_0x167c8b(0x215)][_0x167c8b(0x1f4)]>0x0&&typeof _0x39f542[_0x167c8b(0x209)]===_0x167c8b(0x20d)&&typeof _0x39f542[_0x167c8b(0x22c)]===_0x167c8b(0x20d)&&typeof _0x39f542[_0x167c8b(0x202)]===_0x167c8b(0x20d)&&/^sha256:[a-f0-9]{64}$/['test'](_0x39f542[_0x167c8b(0x202)])&&typeof _0x39f542['recursive']===_0x167c8b(0x20b)&&isMenuFact(_0x39f542[_0x167c8b(0x23a)])&&isTargetFingerprint(_0x39f542[_0x167c8b(0x20e)])&&Array['isArray'](_0x39f542[_0x167c8b(0x1ef)])&&_0x39f542[_0x167c8b(0x1ef)][_0x167c8b(0x1f4)]>0x0&&_0x39f542[_0x167c8b(0x1ef)][_0x167c8b(0x214)](isMenuFact)&&Array[_0x167c8b(0x240)](_0x39f542[_0x167c8b(0x1f5)])&&_0x39f542['targetFingerprints'][_0x167c8b(0x1f4)]===_0x39f542[_0x167c8b(0x1ef)][_0x167c8b(0x1f4)]&&_0x39f542['targetFingerprints']['every'](isTargetFingerprint)&&Array[_0x167c8b(0x240)](_0x39f542[_0x167c8b(0x206)])&&_0x39f542[_0x167c8b(0x206)][_0x167c8b(0x1f4)]===_0x39f542[_0x167c8b(0x1ef)][_0x167c8b(0x1f4)]&&_0x39f542[_0x167c8b(0x206)][_0x167c8b(0x214)](isPositiveInteger)&&new Set(_0x39f542[_0x167c8b(0x206)])[_0x167c8b(0x248)]===_0x39f542[_0x167c8b(0x206)][_0x167c8b(0x1f4)]&&_0x39f542[_0x167c8b(0x1ef)][_0x167c8b(0x214)]((_0x30ba9e,_0xdb8688)=>_0x30ba9e['id']===_0x39f542[_0x167c8b(0x206)][_0xdb8688])&&_0x39f542[_0x167c8b(0x1ef)][_0x39f542[_0x167c8b(0x1ef)][_0x167c8b(0x1f4)]-0x1]?.['id']===_0x39f542['target']['id']&&isRecord(_0x39f542[_0x167c8b(0x230)])&&Array[_0x167c8b(0x240)](_0x39f542[_0x167c8b(0x230)][_0x167c8b(0x22b)])&&_0x39f542[_0x167c8b(0x230)][_0x167c8b(0x22b)][_0x167c8b(0x214)](isPositiveInteger)&&typeof _0x39f542[_0x167c8b(0x230)][_0x167c8b(0x1eb)]==='boolean'&&Array[_0x167c8b(0x240)](_0x39f542[_0x167c8b(0x1f2)])&&_0x39f542[_0x167c8b(0x1f2)][_0x167c8b(0x214)](_0x59b46b=>typeof _0x59b46b==='string');}function isMenuFact(_0x113339){const _0x668822=a119_0x25bede;if(!isRecord(_0x113339))return![];return isPositiveInteger(_0x113339['id'])&&(_0x113339[_0x668822(0x23f)]===null||isPositiveInteger(_0x113339[_0x668822(0x23f)]))&&Number[_0x668822(0x1ec)](_0x113339[_0x668822(0x245)])&&_0x113339[_0x668822(0x245)]>=0x0&&typeof _0x113339['label']==='string'&&typeof _0x113339['path']==='string'&&typeof _0x113339[_0x668822(0x236)]===_0x668822(0x20d)&&(_0x113339[_0x668822(0x212)]===null||typeof _0x113339['visible']===_0x668822(0x20b))&&(_0x113339[_0x668822(0x239)]===null||Number['isInteger'](_0x113339[_0x668822(0x239)]))&&Array['isArray'](_0x113339[_0x668822(0x229)])&&_0x113339[_0x668822(0x229)]['every'](_0x572aeb=>typeof _0x572aeb==='string')&&typeof _0x113339[_0x668822(0x1ea)]==='boolean'&&Array[_0x668822(0x240)](_0x113339[_0x668822(0x24b)])&&_0x113339['childrenIds'][_0x668822(0x214)](isPositiveInteger)&&Number[_0x668822(0x1ec)](_0x113339['childrenCount'])&&_0x113339[_0x668822(0x238)]>=0x0&&(_0x113339[_0x668822(0x224)]===null||isPositiveInteger(_0x113339[_0x668822(0x224)]))&&typeof _0x113339[_0x668822(0x24e)]===_0x668822(0x20d)&&typeof _0x113339[_0x668822(0x232)]===_0x668822(0x20d)&&(_0x113339['datasetId']===null||isPositiveInteger(_0x113339['datasetId']))&&typeof _0x113339['datasetCode']===_0x668822(0x20d)&&(_0x113339[_0x668822(0x228)]===null||typeof _0x113339[_0x668822(0x228)]==='string')&&(_0x113339['updateUserName']===null||typeof _0x113339[_0x668822(0x24f)]==='string')&&(_0x113339[_0x668822(0x24a)]===null||typeof _0x113339[_0x668822(0x24a)]===_0x668822(0x20d)||typeof _0x113339['updateTime']===_0x668822(0x219))&&(_0x113339[_0x668822(0x243)]===undefined||_0x113339[_0x668822(0x243)]===null||isRecord(_0x113339['extend']));}function isTargetFingerprint(_0x35b595){const _0x132604=a119_0x25bede;if(!isRecord(_0x35b595))return![];return isPositiveInteger(_0x35b595['id'])&&(_0x35b595[_0x132604(0x23f)]===null||isPositiveInteger(_0x35b595[_0x132604(0x23f)]))&&Number[_0x132604(0x1ec)](_0x35b595['depth'])&&_0x35b595[_0x132604(0x245)]>=0x0&&typeof _0x35b595[_0x132604(0x252)]===_0x132604(0x20d)&&typeof _0x35b595['path']===_0x132604(0x20d)&&typeof _0x35b595[_0x132604(0x236)]==='string'&&(_0x35b595[_0x132604(0x212)]===null||typeof _0x35b595[_0x132604(0x212)]===_0x132604(0x20b))&&(_0x35b595['sort']===null||Number[_0x132604(0x1ec)](_0x35b595[_0x132604(0x239)]))&&(_0x35b595[_0x132604(0x224)]===null||isPositiveInteger(_0x35b595[_0x132604(0x224)]))&&typeof _0x35b595[_0x132604(0x24e)]===_0x132604(0x20d)&&typeof _0x35b595[_0x132604(0x232)]===_0x132604(0x20d)&&(_0x35b595[_0x132604(0x208)]===null||isPositiveInteger(_0x35b595['datasetId']))&&typeof _0x35b595['datasetCode']==='string'&&Array['isArray'](_0x35b595['childrenIds'])&&_0x35b595[_0x132604(0x24b)][_0x132604(0x214)](isPositiveInteger)&&Number['isInteger'](_0x35b595[_0x132604(0x238)])&&_0x35b595['childrenCount']>=0x0&&typeof _0x35b595[_0x132604(0x1ea)]===_0x132604(0x20b)&&typeof _0x35b595[_0x132604(0x250)]===_0x132604(0x20d)&&/^[a-f0-9]{64}$/[_0x132604(0x222)](_0x35b595['resourcesHash'])&&typeof _0x35b595[_0x132604(0x22e)]===_0x132604(0x20d)&&/^[a-f0-9]{64}$/['test'](_0x35b595[_0x132604(0x22e)])&&(_0x35b595['updateTime']===null||typeof _0x35b595[_0x132604(0x24a)]==='string'||typeof _0x35b595[_0x132604(0x24a)]===_0x132604(0x219));}function isRecord(_0x2e5d88){return typeof _0x2e5d88==='object'&&_0x2e5d88!==null&&!Array['isArray'](_0x2e5d88);}function isPositiveInteger(_0x429982){const _0x21cb77=a119_0x25bede;return Number[_0x21cb77(0x246)](_0x429982)&&Number(_0x429982)>0x0;}function errorMessage(_0x4eb026){return _0x4eb026 instanceof Error?_0x4eb026['message']:String(_0x4eb026);}
1
+ const a119_0x2d1d48=a119_0x5811;(function(_0x3480ea,_0x36cf1b){const _0x6560bd=a119_0x5811,_0x33b159=_0x3480ea();while(!![]){try{const _0x10822f=parseInt(_0x6560bd(0x20b))/0x1*(parseInt(_0x6560bd(0x1e0))/0x2)+parseInt(_0x6560bd(0x1d6))/0x3*(parseInt(_0x6560bd(0x217))/0x4)+-parseInt(_0x6560bd(0x211))/0x5*(parseInt(_0x6560bd(0x1de))/0x6)+parseInt(_0x6560bd(0x200))/0x7*(parseInt(_0x6560bd(0x20e))/0x8)+parseInt(_0x6560bd(0x213))/0x9*(parseInt(_0x6560bd(0x22d))/0xa)+parseInt(_0x6560bd(0x205))/0xb+-parseInt(_0x6560bd(0x1ff))/0xc;if(_0x10822f===_0x36cf1b)break;else _0x33b159['push'](_0x33b159['shift']());}catch(_0x4c543b){_0x33b159['push'](_0x33b159['shift']());}}}(a119_0x5ba4,0x835e9));import{createHash}from'node:crypto';import{mkdir,readFile,stat,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND=a119_0x2d1d48(0x1d0),PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;export function createMenuDeletePlanFile(_0xe20c92,_0x37409d,_0x4541f7=new Date()){const _0x1f962c=a119_0x2d1d48;if(!_0x37409d['before']||!isMenuFact(_0x37409d[_0x1f962c(0x1ca)]))throw menuError('menu_plan_invalid',_0x1f962c(0x1f1));const _0x14a853=_0x37409d['targets']?.[_0x1f962c(0x1f9)]?_0x37409d['targets']:[_0x37409d['before']],_0x3fb57a=_0x37409d[_0x1f962c(0x20c)]?.[_0x1f962c(0x1f9)]?_0x37409d[_0x1f962c(0x20c)]:_0x14a853[_0x1f962c(0x21a)](_0x27c594=>_0x27c594['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0xe20c92,'createdAt':_0x4541f7[_0x1f962c(0x1e5)](),'expiresAt':new Date(_0x4541f7[_0x1f962c(0x1ee)]()+PLAN_TTL_MS)[_0x1f962c(0x1e5)](),'snapshotHash':_0x37409d[_0x1f962c(0x1cc)],'recursive':_0x37409d[_0x1f962c(0x1d5)]['recursive']===!![],'target':_0x37409d[_0x1f962c(0x1ca)],'targetFingerprint':fingerprint(_0x37409d['before']),'targets':_0x14a853,'targetFingerprints':_0x14a853['map'](fingerprint),'deleteOrder':_0x3fb57a,'cascade':_0x37409d[_0x1f962c(0x202)]??{'pages':_0x37409d[_0x1f962c(0x1ca)][_0x1f962c(0x225)]==null?[]:[_0x37409d[_0x1f962c(0x1ca)][_0x1f962c(0x225)]],'pageSchemaAffected':_0x37409d['before'][_0x1f962c(0x225)]!=null},'warnings':[..._0x37409d[_0x1f962c(0x220)]]};}export async function writeMenuDeletePlan(_0x6a925c,_0x530637){const _0x334760=a119_0x2d1d48,_0x35ed83=resolvePlanPath(_0x6a925c,_0x334760(0x209));await mkdir(dirname(_0x35ed83),{'recursive':!![]});try{await writeFile(_0x35ed83,JSON[_0x334760(0x1ce)](_0x530637,null,0x2)+'\x0a',{'encoding':_0x334760(0x1fc),'flag':'wx'});}catch(_0x1e76ac){if(_0x1e76ac[_0x334760(0x1e8)]===_0x334760(0x1f5))throw menuError(_0x334760(0x221),_0x334760(0x1da)+_0x35ed83,_0x334760(0x1fd));throw menuError(_0x334760(0x1dc),'Failed\x20to\x20write\x20menu\x20delete\x20plan\x20'+_0x35ed83+':\x20'+errorMessage(_0x1e76ac));}return _0x35ed83;}export async function readMenuDeletePlan(_0x57ef03){const _0x35090c=a119_0x2d1d48,_0x258a2d=resolvePlanPath(_0x57ef03,_0x35090c(0x226));let _0x44a310;try{_0x44a310=(await stat(_0x258a2d))[_0x35090c(0x1cd)];}catch(_0x31365){throw menuError(_0x35090c(0x1fe),'Cannot\x20read\x20menu\x20delete\x20plan\x20'+_0x258a2d+':\x20'+errorMessage(_0x31365));}if(_0x44a310>MAX_PLAN_BYTES)throw menuError(_0x35090c(0x1fe),_0x35090c(0x223)+_0x44a310+'\x20bytes.');let _0x287930;try{_0x287930=JSON[_0x35090c(0x1e7)](await readFile(_0x258a2d,'utf8'));}catch(_0x2801d0){throw menuError('menu_plan_invalid',_0x35090c(0x22f)+errorMessage(_0x2801d0));}if(!isMenuDeletePlanFile(_0x287930))throw menuError(_0x35090c(0x1fe),_0x35090c(0x212)+PLAN_VERSION+_0x35090c(0x218)+PLAN_COMMAND+_0x35090c(0x1d2));if(!sameFingerprint(_0x287930['targetFingerprint'],fingerprint(_0x287930[_0x35090c(0x21c)])))throw menuError('menu_plan_invalid',_0x35090c(0x214),_0x35090c(0x22e));if(!_0x287930['targets']['every']((_0x33c742,_0x34e4d7)=>sameFingerprint(_0x287930[_0x35090c(0x23a)][_0x34e4d7],fingerprint(_0x33c742)))||!sameFingerprint(_0x287930[_0x35090c(0x22b)],fingerprint(_0x287930[_0x35090c(0x1df)][_0x287930[_0x35090c(0x1df)][_0x35090c(0x1f9)]-0x1])))throw menuError(_0x35090c(0x1fe),_0x35090c(0x204),_0x35090c(0x22e));return{'path':_0x258a2d,'plan':_0x287930};}export function mutationPlanFromDeleteFile(_0xe75fd4,_0x272021){const _0x38cdc3=a119_0x2d1d48;return mutationResult({'operation':_0x38cdc3(0x1db),'selector':{'id':_0xe75fd4['target']['id'],'recursive':_0xe75fd4[_0x38cdc3(0x233)]},'before':_0xe75fd4[_0x38cdc3(0x21c)],'after':null,'dryRun':![],'backend':[{'method':_0x38cdc3(0x1e4),'path':_0x38cdc3(0x1d3)}],'plannedActions':[{'stage':_0x38cdc3(0x20d),'method':_0x38cdc3(0x1e4),'path':_0x38cdc3(0x1d3),'body':{'idList':_0xe75fd4[_0x38cdc3(0x20c)]}}],'targets':_0xe75fd4[_0x38cdc3(0x1df)],'deleteOrder':_0xe75fd4[_0x38cdc3(0x20c)],'snapshotHash':_0xe75fd4[_0x38cdc3(0x1cc)],'cascade':_0xe75fd4[_0x38cdc3(0x202)],'planFile':{'path':_0x272021,'createdAt':_0xe75fd4[_0x38cdc3(0x1d9)],'expiresAt':_0xe75fd4[_0x38cdc3(0x235)]},'warnings':_0xe75fd4['warnings']});}export function assertMenuDeletePlanCurrent(_0x20ab6f,_0x520c12,_0x59a951,_0x5c9b18=new Date()){const _0x2f3c45=a119_0x2d1d48;assertMenuDeletePlanExecutable(_0x20ab6f,_0x520c12,_0x5c9b18);if(_0x59a951[_0x2f3c45(0x1e9)]!==_0x20ab6f['snapshotHash'])throw menuError(_0x2f3c45(0x1f8),_0x2f3c45(0x21e),_0x2f3c45(0x1f3));return _0x20ab6f[_0x2f3c45(0x1df)][_0x2f3c45(0x21a)]((_0x529a22,_0x33d38e)=>{const _0x304ff9=_0x2f3c45,_0x571a77=_0x59a951['byId'][_0x304ff9(0x231)](_0x529a22['id']);if(!_0x571a77)throw menuError(_0x304ff9(0x1f8),_0x304ff9(0x21f)+_0x529a22['id']+_0x304ff9(0x22a));if(!sameFingerprint(_0x20ab6f['targetFingerprints'][_0x33d38e],fingerprint(_0x571a77)))throw menuError(_0x304ff9(0x1f8),_0x304ff9(0x21f)+_0x529a22['id']+_0x304ff9(0x216),_0x304ff9(0x1f7));return _0x571a77;});}function a119_0x5ba4(){const _0x100f05=['trim','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','every','pageId','plan','digest','Menu\x20delete\x20plan\x20creation\x20time\x20','type','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','targetFingerprint','parentId','10DfyhYv','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20','update','get','childrenIds','recursive','boolean','expiresAt','menu_plan_app_mismatch','extendHash','isArray','visible','targetFingerprints','depth','before','pages','snapshotHash','size','stringify','pageSchemaAffected','menu\x20delete','path','\x20contract.','/smartapi/menu/batchDelete','\x20is\x20in\x20the\x20future.','selector','15qonnQO','string','menu_plan_expired','createdAt','Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20','delete','menu_plan_write_failed','updateUserId','18OVzlaL','targets','3548aLDRAb','updateUserName','label','modelType','POST','toISOString','isInteger','parse','code','hash','isFinite','number','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.','message','getTime','sort','test','Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.','isSafeInteger','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.','childrenCount','EEXIST',',\x20current\x20app\x20is\x20','Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.','menu_state_drift','length','appCode','Menu\x20delete\x20plan\x20expired\x20at\x20','utf8','Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.','menu_plan_invalid','26319108BGxBYH','5411dgLPJK','command','cascade','sha256','Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.','7088180iIrAZX','resources','pageType','Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.','plan-out','\x20requires\x20a\x20non-empty\x20file\x20path.','536OiTBFr','deleteOrder','batch-delete-menu','6120YBDfbl','extend','datasetCode','1182905CovVCQ','Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20','7845228qJrJDD','Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.','resourcesValid','\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.','306248yERFtE','\x20of\x20the\x20','resourcesHash','map','updateTime','target','datasetId','Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.','Planned\x20menu\x20','warnings','menu_plan_file_exists'];a119_0x5ba4=function(){return _0x100f05;};return a119_0x5ba4();}export function assertMenuDeletePlanExecutable(_0x27626d,_0x267ec5,_0x9c6a97=new Date()){const _0x271e01=a119_0x2d1d48;if(_0x27626d['appCode']!==_0x267ec5)throw menuError(_0x271e01(0x236),'Menu\x20delete\x20plan\x20targets\x20app\x20'+JSON['stringify'](_0x27626d[_0x271e01(0x1fa)])+_0x271e01(0x1f6)+JSON[_0x271e01(0x1ce)](_0x267ec5)+'.');const _0x59d64d=Date[_0x271e01(0x1e7)](_0x27626d[_0x271e01(0x1d9)]),_0x547d83=Date[_0x271e01(0x1e7)](_0x27626d['expiresAt']);if(!Number[_0x271e01(0x1ea)](_0x59d64d)||!Number['isFinite'](_0x547d83)||_0x547d83-_0x59d64d!==PLAN_TTL_MS)throw menuError('menu_plan_invalid',_0x271e01(0x208));if(_0x59d64d>_0x9c6a97['getTime']())throw menuError('menu_plan_invalid',_0x271e01(0x228)+_0x27626d[_0x271e01(0x1d9)]+_0x271e01(0x1d4),_0x271e01(0x1ec));if(_0x9c6a97['getTime']()>_0x547d83)throw menuError(_0x271e01(0x1d8),_0x271e01(0x1fb)+_0x27626d[_0x271e01(0x235)]+'.','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.');}function fingerprint(_0x367615){const _0x20bc28=a119_0x2d1d48;return{'id':_0x367615['id'],'parentId':_0x367615[_0x20bc28(0x22c)],'depth':_0x367615[_0x20bc28(0x23b)],'label':_0x367615[_0x20bc28(0x1e2)],'path':_0x367615[_0x20bc28(0x1d1)],'type':_0x367615[_0x20bc28(0x229)],'visible':_0x367615[_0x20bc28(0x239)],'sort':_0x367615[_0x20bc28(0x1ef)],'pageId':_0x367615[_0x20bc28(0x225)],'pageType':_0x367615[_0x20bc28(0x207)],'modelType':_0x367615['modelType'],'datasetId':_0x367615[_0x20bc28(0x21d)],'datasetCode':_0x367615[_0x20bc28(0x210)],'childrenIds':[..._0x367615[_0x20bc28(0x232)]],'childrenCount':_0x367615[_0x20bc28(0x1f4)],'resourcesValid':_0x367615[_0x20bc28(0x215)],'resourcesHash':hashValue(_0x367615[_0x20bc28(0x206)]),'extendHash':hashValue(_0x367615[_0x20bc28(0x20f)]??null),'updateTime':_0x367615[_0x20bc28(0x21b)]};}function hashValue(_0x29fba4){const _0x1143a3=a119_0x2d1d48;return createHash(_0x1143a3(0x203))[_0x1143a3(0x230)](JSON['stringify'](_0x29fba4))[_0x1143a3(0x227)]('hex');}function sameFingerprint(_0x22acb8,_0x3d3371){const _0x896ab4=a119_0x2d1d48;return JSON['stringify'](_0x22acb8)===JSON[_0x896ab4(0x1ce)](_0x3d3371);}function resolvePlanPath(_0x292df9,_0x34524e){const _0x415c5d=a119_0x2d1d48,_0x30059e=_0x292df9[_0x415c5d(0x222)]();if(!_0x30059e)throw menuError('menu_plan_invalid','--'+_0x34524e+_0x415c5d(0x20a));return resolve(_0x30059e);}function isMenuDeletePlanFile(_0x5e2f57){const _0x1d32f0=a119_0x2d1d48;if(!isRecord(_0x5e2f57))return![];return _0x5e2f57['version']===PLAN_VERSION&&_0x5e2f57[_0x1d32f0(0x201)]===PLAN_COMMAND&&typeof _0x5e2f57['appCode']===_0x1d32f0(0x1d7)&&_0x5e2f57[_0x1d32f0(0x1fa)][_0x1d32f0(0x1f9)]>0x0&&typeof _0x5e2f57[_0x1d32f0(0x1d9)]==='string'&&typeof _0x5e2f57['expiresAt']===_0x1d32f0(0x1d7)&&typeof _0x5e2f57[_0x1d32f0(0x1cc)]===_0x1d32f0(0x1d7)&&/^sha256:[a-f0-9]{64}$/[_0x1d32f0(0x1f0)](_0x5e2f57[_0x1d32f0(0x1cc)])&&typeof _0x5e2f57[_0x1d32f0(0x233)]===_0x1d32f0(0x234)&&isMenuFact(_0x5e2f57['target'])&&isTargetFingerprint(_0x5e2f57['targetFingerprint'])&&Array['isArray'](_0x5e2f57[_0x1d32f0(0x1df)])&&_0x5e2f57[_0x1d32f0(0x1df)][_0x1d32f0(0x1f9)]>0x0&&_0x5e2f57[_0x1d32f0(0x1df)][_0x1d32f0(0x224)](isMenuFact)&&Array['isArray'](_0x5e2f57[_0x1d32f0(0x23a)])&&_0x5e2f57[_0x1d32f0(0x23a)]['length']===_0x5e2f57['targets'][_0x1d32f0(0x1f9)]&&_0x5e2f57[_0x1d32f0(0x23a)]['every'](isTargetFingerprint)&&Array[_0x1d32f0(0x238)](_0x5e2f57[_0x1d32f0(0x20c)])&&_0x5e2f57[_0x1d32f0(0x20c)][_0x1d32f0(0x1f9)]===_0x5e2f57[_0x1d32f0(0x1df)]['length']&&_0x5e2f57['deleteOrder'][_0x1d32f0(0x224)](isPositiveInteger)&&new Set(_0x5e2f57[_0x1d32f0(0x20c)])[_0x1d32f0(0x1cd)]===_0x5e2f57['deleteOrder'][_0x1d32f0(0x1f9)]&&_0x5e2f57[_0x1d32f0(0x1df)][_0x1d32f0(0x224)]((_0x2a165a,_0x59dcd7)=>_0x2a165a['id']===_0x5e2f57['deleteOrder'][_0x59dcd7])&&_0x5e2f57['targets'][_0x5e2f57[_0x1d32f0(0x1df)][_0x1d32f0(0x1f9)]-0x1]?.['id']===_0x5e2f57['target']['id']&&isRecord(_0x5e2f57[_0x1d32f0(0x202)])&&Array[_0x1d32f0(0x238)](_0x5e2f57[_0x1d32f0(0x202)][_0x1d32f0(0x1cb)])&&_0x5e2f57['cascade']['pages'][_0x1d32f0(0x224)](isPositiveInteger)&&typeof _0x5e2f57['cascade'][_0x1d32f0(0x1cf)]===_0x1d32f0(0x234)&&Array[_0x1d32f0(0x238)](_0x5e2f57[_0x1d32f0(0x220)])&&_0x5e2f57[_0x1d32f0(0x220)]['every'](_0x1e1ee8=>typeof _0x1e1ee8==='string');}function isMenuFact(_0x539a3a){const _0x390f78=a119_0x2d1d48;if(!isRecord(_0x539a3a))return![];return isPositiveInteger(_0x539a3a['id'])&&(_0x539a3a[_0x390f78(0x22c)]===null||isPositiveInteger(_0x539a3a[_0x390f78(0x22c)]))&&Number[_0x390f78(0x1e6)](_0x539a3a[_0x390f78(0x23b)])&&_0x539a3a[_0x390f78(0x23b)]>=0x0&&typeof _0x539a3a[_0x390f78(0x1e2)]===_0x390f78(0x1d7)&&typeof _0x539a3a[_0x390f78(0x1d1)]===_0x390f78(0x1d7)&&typeof _0x539a3a[_0x390f78(0x229)]===_0x390f78(0x1d7)&&(_0x539a3a[_0x390f78(0x239)]===null||typeof _0x539a3a[_0x390f78(0x239)]===_0x390f78(0x234))&&(_0x539a3a['sort']===null||Number[_0x390f78(0x1e6)](_0x539a3a[_0x390f78(0x1ef)]))&&Array[_0x390f78(0x238)](_0x539a3a[_0x390f78(0x206)])&&_0x539a3a[_0x390f78(0x206)][_0x390f78(0x224)](_0x4445a5=>typeof _0x4445a5===_0x390f78(0x1d7))&&typeof _0x539a3a[_0x390f78(0x215)]===_0x390f78(0x234)&&Array[_0x390f78(0x238)](_0x539a3a[_0x390f78(0x232)])&&_0x539a3a['childrenIds']['every'](isPositiveInteger)&&Number[_0x390f78(0x1e6)](_0x539a3a[_0x390f78(0x1f4)])&&_0x539a3a[_0x390f78(0x1f4)]>=0x0&&(_0x539a3a[_0x390f78(0x225)]===null||isPositiveInteger(_0x539a3a['pageId']))&&typeof _0x539a3a['pageType']===_0x390f78(0x1d7)&&typeof _0x539a3a[_0x390f78(0x1e3)]===_0x390f78(0x1d7)&&(_0x539a3a[_0x390f78(0x21d)]===null||isPositiveInteger(_0x539a3a[_0x390f78(0x21d)]))&&typeof _0x539a3a[_0x390f78(0x210)]===_0x390f78(0x1d7)&&(_0x539a3a['updateUserId']===null||typeof _0x539a3a[_0x390f78(0x1dd)]==='string')&&(_0x539a3a[_0x390f78(0x1e1)]===null||typeof _0x539a3a[_0x390f78(0x1e1)]===_0x390f78(0x1d7))&&(_0x539a3a['updateTime']===null||typeof _0x539a3a[_0x390f78(0x21b)]==='string'||typeof _0x539a3a[_0x390f78(0x21b)]===_0x390f78(0x1eb))&&(_0x539a3a[_0x390f78(0x20f)]===undefined||_0x539a3a[_0x390f78(0x20f)]===null||isRecord(_0x539a3a[_0x390f78(0x20f)]));}function isTargetFingerprint(_0x9c56c6){const _0x16f879=a119_0x2d1d48;if(!isRecord(_0x9c56c6))return![];return isPositiveInteger(_0x9c56c6['id'])&&(_0x9c56c6[_0x16f879(0x22c)]===null||isPositiveInteger(_0x9c56c6[_0x16f879(0x22c)]))&&Number['isInteger'](_0x9c56c6['depth'])&&_0x9c56c6['depth']>=0x0&&typeof _0x9c56c6['label']===_0x16f879(0x1d7)&&typeof _0x9c56c6[_0x16f879(0x1d1)]===_0x16f879(0x1d7)&&typeof _0x9c56c6[_0x16f879(0x229)]===_0x16f879(0x1d7)&&(_0x9c56c6[_0x16f879(0x239)]===null||typeof _0x9c56c6['visible']==='boolean')&&(_0x9c56c6[_0x16f879(0x1ef)]===null||Number[_0x16f879(0x1e6)](_0x9c56c6[_0x16f879(0x1ef)]))&&(_0x9c56c6[_0x16f879(0x225)]===null||isPositiveInteger(_0x9c56c6['pageId']))&&typeof _0x9c56c6[_0x16f879(0x207)]===_0x16f879(0x1d7)&&typeof _0x9c56c6[_0x16f879(0x1e3)]==='string'&&(_0x9c56c6['datasetId']===null||isPositiveInteger(_0x9c56c6['datasetId']))&&typeof _0x9c56c6[_0x16f879(0x210)]===_0x16f879(0x1d7)&&Array['isArray'](_0x9c56c6[_0x16f879(0x232)])&&_0x9c56c6[_0x16f879(0x232)][_0x16f879(0x224)](isPositiveInteger)&&Number[_0x16f879(0x1e6)](_0x9c56c6['childrenCount'])&&_0x9c56c6[_0x16f879(0x1f4)]>=0x0&&typeof _0x9c56c6['resourcesValid']===_0x16f879(0x234)&&typeof _0x9c56c6[_0x16f879(0x219)]===_0x16f879(0x1d7)&&/^[a-f0-9]{64}$/[_0x16f879(0x1f0)](_0x9c56c6['resourcesHash'])&&typeof _0x9c56c6[_0x16f879(0x237)]===_0x16f879(0x1d7)&&/^[a-f0-9]{64}$/[_0x16f879(0x1f0)](_0x9c56c6[_0x16f879(0x237)])&&(_0x9c56c6[_0x16f879(0x21b)]===null||typeof _0x9c56c6[_0x16f879(0x21b)]===_0x16f879(0x1d7)||typeof _0x9c56c6['updateTime']===_0x16f879(0x1eb));}function a119_0x5811(_0x189fd5,_0x10e355){_0x189fd5=_0x189fd5-0x1ca;const _0x5ba43d=a119_0x5ba4();let _0x581198=_0x5ba43d[_0x189fd5];return _0x581198;}function isRecord(_0x30a67f){const _0x22f055=a119_0x2d1d48;return typeof _0x30a67f==='object'&&_0x30a67f!==null&&!Array[_0x22f055(0x238)](_0x30a67f);}function isPositiveInteger(_0x4b62cc){const _0x295bcf=a119_0x2d1d48;return Number[_0x295bcf(0x1f2)](_0x4b62cc)&&Number(_0x4b62cc)>0x0;}function errorMessage(_0xad5f21){const _0x3016fc=a119_0x2d1d48;return _0xad5f21 instanceof Error?_0xad5f21[_0x3016fc(0x1ed)]:String(_0xad5f21);}
@@ -0,0 +1,12 @@
1
+ import type { MenuFact, MenuListItem, MenuSnapshot, ProcessedMenuItem } from "../../../commands/menu/shared/types.js";
2
+ import type { MenuTreeRecord } from "../../../core/api-client.js";
3
+ export declare function fetchMenuSnapshot(appCode: string, cookie: string, options?: {
4
+ verbose?: boolean;
5
+ }): Promise<MenuSnapshot>;
6
+ export declare function buildMenuSnapshot(items: MenuTreeRecord[], options?: {
7
+ verbose?: boolean;
8
+ }): MenuSnapshot;
9
+ export declare function toProcessedMenuItem(menu: MenuFact): ProcessedMenuItem;
10
+ export declare function toMenuListItem(menu: MenuFact): MenuListItem;
11
+ export declare function getChildren(snapshot: MenuSnapshot, parentId: number | null): MenuFact[];
12
+ export declare function normalizeResources(value: unknown): string[];
@@ -1 +1 @@
1
- (function(_0x50b6b7,_0xeff3e4){const _0x130a36=a120_0x3f0b,_0x523e1a=_0x50b6b7();while(!![]){try{const _0x548c80=parseInt(_0x130a36(0x9a))/0x1*(-parseInt(_0x130a36(0xb9))/0x2)+-parseInt(_0x130a36(0xb0))/0x3+parseInt(_0x130a36(0x94))/0x4*(parseInt(_0x130a36(0x93))/0x5)+-parseInt(_0x130a36(0x86))/0x6*(-parseInt(_0x130a36(0xb7))/0x7)+parseInt(_0x130a36(0x8f))/0x8*(-parseInt(_0x130a36(0x95))/0x9)+-parseInt(_0x130a36(0xa1))/0xa*(-parseInt(_0x130a36(0x9d))/0xb)+-parseInt(_0x130a36(0x98))/0xc;if(_0x548c80===_0xeff3e4)break;else _0x523e1a['push'](_0x523e1a['shift']());}catch(_0x47b595){_0x523e1a['push'](_0x523e1a['shift']());}}}(a120_0x2c5e,0xba25b));function a120_0x2c5e(){const _0x5e9f63=['96168OSleBo','isArray','updateUserId','POSITIVE_INFINITY','item','type','sha256:','resourcesValid','push','261416ZVgdCV','childrenIds','label','stringify','281215TuSOhP','52yLWIoV','207IZeWNH','sort','boolean','2233356GnHBzO','sha256','830799NYissK','extend','index','11ThFLrs','isFinite','values','hex','14615450xPDxPn','url','string','pageId','depth','parentId','menus','number','path','pageType','resources','parse','filter','updateTime','modelType','2158830wIeaRt','verbose','length','visible','valid','datasetCode','children','462zWqqgc','updateUserName','2Typykr','datasetId','map'];a120_0x2c5e=function(){return _0x5e9f63;};return a120_0x2c5e();}import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x19529,_0x2f6a6a,_0x2b55c8={}){const _0x330f54=a120_0x3f0b,_0x255204=await getMenuTree(_0x19529,_0x2f6a6a);return buildMenuSnapshot(Array[_0x330f54(0x87)](_0x255204)?_0x255204:[],_0x2b55c8);}function a120_0x3f0b(_0x1bede6,_0x3d414a){_0x1bede6=_0x1bede6-0x86;const _0x2c5e83=a120_0x2c5e();let _0x3f0b03=_0x2c5e83[_0x1bede6];return _0x3f0b03;}export function buildMenuSnapshot(_0x46738b,_0x10776c={}){const _0x8ee2ab=a120_0x3f0b,_0x483044=flattenMenuItems(_0x46738b,{'verbose':_0x10776c[_0x8ee2ab(0xb1)]===!![],'parentId':null,'depth':0x0}),_0x51d7c5=new Map(_0x483044[_0x8ee2ab(0xbb)](_0x33eceb=>[_0x33eceb['id'],_0x33eceb])),_0x4da579=createHash(_0x8ee2ab(0x99))['update'](JSON[_0x8ee2ab(0x92)](_0x483044[_0x8ee2ab(0xbb)](toHashInput)))['digest'](_0x8ee2ab(0xa0));return{'total':_0x483044['length'],'hash':_0x8ee2ab(0x8c)+_0x4da579,'menus':_0x483044,'byId':_0x51d7c5};}export function toProcessedMenuItem(_0x368e3d){const _0x3043fd=a120_0x3f0b;return{'id':_0x368e3d['id'],'path':_0x368e3d[_0x3043fd(0xa9)],'label':_0x368e3d[_0x3043fd(0x91)],'resources':[..._0x368e3d['resources']],'extend':_0x368e3d[_0x3043fd(0x9b)]??null};}export function toMenuListItem(_0x3cadfc){const {modelType:_0x1d6d9c,datasetId:_0x2b3a94,datasetCode:_0x292cec,resourcesValid:_0x30cede,..._0x3f0261}=_0x3cadfc;return _0x3f0261;}export function getChildren(_0x19f80c,_0x7636df){const _0x322ebd=a120_0x3f0b;return _0x19f80c[_0x322ebd(0xa7)][_0x322ebd(0xad)](_0x21b8f1=>_0x21b8f1['parentId']===_0x7636df);}function flattenMenuItems(_0x5d993c,_0x40c870){const _0x3359db=a120_0x3f0b,_0xe294b2=sortMenuItems(_0x5d993c),_0x49a81c=[];for(const _0x3e4075 of _0xe294b2){const _0x1f4994=sortMenuItems(Array[_0x3359db(0x87)](_0x3e4075[_0x3359db(0xb6)])?_0x3e4075[_0x3359db(0xb6)]:[]);_0x49a81c['push'](toMenuFact(_0x3e4075,_0x1f4994,_0x40c870)),_0x1f4994[_0x3359db(0xb2)]>0x0&&_0x49a81c[_0x3359db(0x8e)](...flattenMenuItems(_0x1f4994,{'verbose':_0x40c870[_0x3359db(0xb1)],'parentId':_0x3e4075['id'],'depth':_0x40c870[_0x3359db(0xa5)]+0x1}));}return _0x49a81c;}function sortMenuItems(_0x21503d){const _0x3edb78=a120_0x3f0b;return _0x21503d[_0x3edb78(0xbb)]((_0x439bd6,_0x444106)=>({'item':_0x439bd6,'index':_0x444106}))['sort']((_0x404ed3,_0x8aa2df)=>{const _0x42bf56=_0x3edb78,_0x3a5ebe=normalizeSort(_0x404ed3[_0x42bf56(0x8a)][_0x42bf56(0x96)]),_0x5776d7=normalizeSort(_0x8aa2df[_0x42bf56(0x8a)][_0x42bf56(0x96)]);if(_0x3a5ebe!==_0x5776d7)return _0x3a5ebe-_0x5776d7;return _0x404ed3[_0x42bf56(0x9c)]-_0x8aa2df[_0x42bf56(0x9c)];})[_0x3edb78(0xbb)](({item:_0x5ac63a})=>_0x5ac63a);}function toMenuFact(_0x38adca,_0x4e1077,_0x108832){const _0x1baf94=a120_0x3f0b,_0x5d724f=normalizeResourceValue(_0x38adca[_0x1baf94(0x9b)]?.[_0x1baf94(0xab)]),_0x245a5e={'id':_0x38adca['id'],'parentId':_0x108832['parentId'],'depth':_0x108832['depth'],'label':normalizeString(_0x38adca[_0x1baf94(0x91)]),'path':normalizeString(_0x38adca['path']),'url':normalizeString(_0x38adca[_0x1baf94(0xa2)]),'type':normalizeString(_0x38adca[_0x1baf94(0x8b)]),'visible':typeof _0x38adca['visible']===_0x1baf94(0x97)?_0x38adca[_0x1baf94(0xb3)]:null,'sort':typeof _0x38adca[_0x1baf94(0x96)]==='number'&&Number['isFinite'](_0x38adca[_0x1baf94(0x96)])?_0x38adca[_0x1baf94(0x96)]:null,'resources':_0x5d724f[_0x1baf94(0x9f)],'resourcesValid':_0x5d724f[_0x1baf94(0xb4)],'childrenIds':_0x4e1077[_0x1baf94(0xbb)](_0x5f110a=>_0x5f110a['id']),'childrenCount':_0x4e1077['length'],'pageId':normalizeNullableNumber(_0x38adca['pageId']),'pageType':normalizeString(_0x38adca[_0x1baf94(0xaa)]),'modelType':normalizeString(_0x38adca[_0x1baf94(0xaf)]),'datasetId':normalizeNullableNumber(_0x38adca[_0x1baf94(0xba)]),'datasetCode':normalizeString(_0x38adca[_0x1baf94(0xb5)]),'updateUserId':normalizeNullableString(_0x38adca[_0x1baf94(0x88)]),'updateUserName':normalizeNullableString(_0x38adca[_0x1baf94(0xb8)]),'updateTime':normalizeNullableTimestamp(_0x38adca[_0x1baf94(0xae)])};return _0x108832[_0x1baf94(0xb1)]&&(_0x245a5e[_0x1baf94(0x9b)]=_0x38adca['extend']??null),_0x245a5e;}function toHashInput(_0x141fbf){const _0x21ddc5=a120_0x3f0b;return{'id':_0x141fbf['id'],'parentId':_0x141fbf[_0x21ddc5(0xa6)],'label':_0x141fbf[_0x21ddc5(0x91)],'path':_0x141fbf[_0x21ddc5(0xa9)],'url':_0x141fbf[_0x21ddc5(0xa2)],'type':_0x141fbf[_0x21ddc5(0x8b)],'visible':_0x141fbf[_0x21ddc5(0xb3)],'sort':_0x141fbf['sort'],'resources':_0x141fbf['resources'],'resourcesValid':_0x141fbf[_0x21ddc5(0x8d)],'childrenIds':_0x141fbf[_0x21ddc5(0x90)],'pageId':_0x141fbf[_0x21ddc5(0xa4)],'pageType':_0x141fbf['pageType'],'modelType':_0x141fbf[_0x21ddc5(0xaf)],'datasetId':_0x141fbf['datasetId'],'datasetCode':_0x141fbf['datasetCode'],'updateUserId':_0x141fbf[_0x21ddc5(0x88)],'updateUserName':_0x141fbf['updateUserName'],'updateTime':_0x141fbf[_0x21ddc5(0xae)]};}function normalizeSort(_0x59e15c){const _0x575eb0=a120_0x3f0b;return typeof _0x59e15c===_0x575eb0(0xa8)&&Number[_0x575eb0(0x9e)](_0x59e15c)?_0x59e15c:Number[_0x575eb0(0x89)];}function normalizeString(_0x15fd21){const _0x19da14=a120_0x3f0b;return typeof _0x15fd21===_0x19da14(0xa3)?_0x15fd21:'';}function normalizeNullableNumber(_0x3fb803){const _0x275677=a120_0x3f0b;return typeof _0x3fb803===_0x275677(0xa8)&&Number[_0x275677(0x9e)](_0x3fb803)?_0x3fb803:null;}function normalizeNullableString(_0x29924f){const _0x45ceca=a120_0x3f0b;return typeof _0x29924f===_0x45ceca(0xa3)&&_0x29924f[_0x45ceca(0xb2)]>0x0?_0x29924f:null;}function normalizeNullableTimestamp(_0x4f6084){const _0x144888=a120_0x3f0b;if(typeof _0x4f6084==='string')return _0x4f6084[_0x144888(0xb2)]>0x0?_0x4f6084:null;return typeof _0x4f6084==='number'&&Number['isFinite'](_0x4f6084)?_0x4f6084:null;}export function normalizeResources(_0x3d56b5){return normalizeResourceValue(_0x3d56b5)['values'];}function normalizeResourceValue(_0x154129){const _0x2f1267=a120_0x3f0b;if(_0x154129==null)return{'values':[],'valid':!![]};if(Array['isArray'](_0x154129))return{'values':_0x154129[_0x2f1267(0xbb)](String),'valid':!![]};if(typeof _0x154129!==_0x2f1267(0xa3))return{'values':[],'valid':![]};try{const _0x4e5015=JSON[_0x2f1267(0xac)](_0x154129);return Array[_0x2f1267(0x87)](_0x4e5015)?{'values':_0x4e5015[_0x2f1267(0xbb)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
1
+ (function(_0x10713f,_0x30992b){const _0x2f43aa=a120_0x25d4,_0x71dbcc=_0x10713f();while(!![]){try{const _0x42ae7d=-parseInt(_0x2f43aa(0x1fe))/0x1*(-parseInt(_0x2f43aa(0x1f6))/0x2)+-parseInt(_0x2f43aa(0x1dd))/0x3+parseInt(_0x2f43aa(0x209))/0x4+-parseInt(_0x2f43aa(0x20d))/0x5*(-parseInt(_0x2f43aa(0x1de))/0x6)+-parseInt(_0x2f43aa(0x1f5))/0x7*(parseInt(_0x2f43aa(0x1ed))/0x8)+-parseInt(_0x2f43aa(0x1e8))/0x9+-parseInt(_0x2f43aa(0x207))/0xa*(-parseInt(_0x2f43aa(0x20c))/0xb);if(_0x42ae7d===_0x30992b)break;else _0x71dbcc['push'](_0x71dbcc['shift']());}catch(_0x201071){_0x71dbcc['push'](_0x71dbcc['shift']());}}}(a120_0x493d,0xa95ca));function a120_0x493d(){const _0xd74890=['sha256','updateUserId','childrenIds','label','datasetId','updateUserName','1djYZDH','updateTime','filter','string','sort','hex','pageId','resources','path','1550ZLjnTR','push','730176svCmay','menus','resourcesValid','39116BvXeua','115cTcxWD','2965476vSmrjp','195258TnbZAR','depth','parentId','datasetCode','map','children','isArray','length','stringify','isFinite','2688066BpIFQz','valid','type','index','POSITIVE_INFINITY','8ECToTH','item','extend','url','boolean','visible','modelType','digest','2864162NgpVjQ','1815650CIATfK','number'];a120_0x493d=function(){return _0xd74890;};return a120_0x493d();}import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x1e9491,_0x322d41,_0x1a2235={}){const _0x34cd99=await getMenuTree(_0x1e9491,_0x322d41);return buildMenuSnapshot(Array['isArray'](_0x34cd99)?_0x34cd99:[],_0x1a2235);}export function buildMenuSnapshot(_0x4de6cd,_0x207499={}){const _0x596090=a120_0x25d4,_0x246677=flattenMenuItems(_0x4de6cd,{'verbose':_0x207499['verbose']===!![],'parentId':null,'depth':0x0}),_0x4c77dd=new Map(_0x246677['map'](_0x3762f4=>[_0x3762f4['id'],_0x3762f4])),_0x582a4b=createHash(_0x596090(0x1f8))['update'](JSON[_0x596090(0x1e6)](_0x246677[_0x596090(0x1e2)](toHashInput)))[_0x596090(0x1f4)](_0x596090(0x203));return{'total':_0x246677[_0x596090(0x1e5)],'hash':'sha256:'+_0x582a4b,'menus':_0x246677,'byId':_0x4c77dd};}export function toProcessedMenuItem(_0x53590b){const _0x5a602b=a120_0x25d4;return{'id':_0x53590b['id'],'path':_0x53590b[_0x5a602b(0x206)],'label':_0x53590b[_0x5a602b(0x1fb)],'resources':[..._0x53590b[_0x5a602b(0x205)]],'extend':_0x53590b[_0x5a602b(0x1ef)]??null};}export function toMenuListItem(_0x8ad62){const {modelType:_0x3095bd,datasetId:_0x35a08f,datasetCode:_0x2bdb60,resourcesValid:_0x4844b5,..._0x3c41ad}=_0x8ad62;return _0x3c41ad;}function a120_0x25d4(_0x55969c,_0x477970){_0x55969c=_0x55969c-0x1dd;const _0x493df9=a120_0x493d();let _0x25d4b5=_0x493df9[_0x55969c];return _0x25d4b5;}export function getChildren(_0x3327fa,_0x56e6d3){const _0x1810d9=a120_0x25d4;return _0x3327fa[_0x1810d9(0x20a)][_0x1810d9(0x200)](_0x16b13b=>_0x16b13b['parentId']===_0x56e6d3);}function flattenMenuItems(_0x3b265a,_0x301264){const _0x28e92b=a120_0x25d4,_0x529711=sortMenuItems(_0x3b265a),_0x8b2459=[];for(const _0x4cfdac of _0x529711){const _0x9bded5=sortMenuItems(Array['isArray'](_0x4cfdac[_0x28e92b(0x1e3)])?_0x4cfdac[_0x28e92b(0x1e3)]:[]);_0x8b2459[_0x28e92b(0x208)](toMenuFact(_0x4cfdac,_0x9bded5,_0x301264)),_0x9bded5[_0x28e92b(0x1e5)]>0x0&&_0x8b2459[_0x28e92b(0x208)](...flattenMenuItems(_0x9bded5,{'verbose':_0x301264['verbose'],'parentId':_0x4cfdac['id'],'depth':_0x301264[_0x28e92b(0x1df)]+0x1}));}return _0x8b2459;}function sortMenuItems(_0x1e71f8){const _0x1ee4ba=a120_0x25d4;return _0x1e71f8[_0x1ee4ba(0x1e2)]((_0x3db478,_0x1de596)=>({'item':_0x3db478,'index':_0x1de596}))['sort']((_0x17c2a3,_0xa54123)=>{const _0x2962c7=_0x1ee4ba,_0x53a335=normalizeSort(_0x17c2a3['item'][_0x2962c7(0x202)]),_0x25c76a=normalizeSort(_0xa54123[_0x2962c7(0x1ee)][_0x2962c7(0x202)]);if(_0x53a335!==_0x25c76a)return _0x53a335-_0x25c76a;return _0x17c2a3[_0x2962c7(0x1eb)]-_0xa54123[_0x2962c7(0x1eb)];})[_0x1ee4ba(0x1e2)](({item:_0xb89578})=>_0xb89578);}function toMenuFact(_0x5046ce,_0x532793,_0x3f4bcb){const _0x2ba310=a120_0x25d4,_0x1f4821=normalizeResourceValue(_0x5046ce[_0x2ba310(0x1ef)]?.[_0x2ba310(0x205)]),_0x69392b={'id':_0x5046ce['id'],'parentId':_0x3f4bcb[_0x2ba310(0x1e0)],'depth':_0x3f4bcb[_0x2ba310(0x1df)],'label':normalizeString(_0x5046ce[_0x2ba310(0x1fb)]),'path':normalizeString(_0x5046ce[_0x2ba310(0x206)]),'url':normalizeString(_0x5046ce[_0x2ba310(0x1f0)]),'type':normalizeString(_0x5046ce[_0x2ba310(0x1ea)]),'visible':typeof _0x5046ce['visible']===_0x2ba310(0x1f1)?_0x5046ce[_0x2ba310(0x1f2)]:null,'sort':typeof _0x5046ce[_0x2ba310(0x202)]===_0x2ba310(0x1f7)&&Number['isFinite'](_0x5046ce[_0x2ba310(0x202)])?_0x5046ce[_0x2ba310(0x202)]:null,'resources':_0x1f4821['values'],'resourcesValid':_0x1f4821[_0x2ba310(0x1e9)],'childrenIds':_0x532793[_0x2ba310(0x1e2)](_0x36eaf0=>_0x36eaf0['id']),'childrenCount':_0x532793[_0x2ba310(0x1e5)],'pageId':normalizeNullableNumber(_0x5046ce[_0x2ba310(0x204)]),'pageType':normalizeString(_0x5046ce['pageType']),'modelType':normalizeString(_0x5046ce[_0x2ba310(0x1f3)]),'datasetId':normalizeNullableNumber(_0x5046ce['datasetId']),'datasetCode':normalizeString(_0x5046ce[_0x2ba310(0x1e1)]),'updateUserId':normalizeNullableString(_0x5046ce[_0x2ba310(0x1f9)]),'updateUserName':normalizeNullableString(_0x5046ce[_0x2ba310(0x1fd)]),'updateTime':normalizeNullableTimestamp(_0x5046ce[_0x2ba310(0x1ff)])};return _0x3f4bcb['verbose']&&(_0x69392b[_0x2ba310(0x1ef)]=_0x5046ce['extend']??null),_0x69392b;}function toHashInput(_0x4ddea1){const _0x9f636c=a120_0x25d4;return{'id':_0x4ddea1['id'],'parentId':_0x4ddea1[_0x9f636c(0x1e0)],'label':_0x4ddea1[_0x9f636c(0x1fb)],'path':_0x4ddea1[_0x9f636c(0x206)],'url':_0x4ddea1[_0x9f636c(0x1f0)],'type':_0x4ddea1['type'],'visible':_0x4ddea1['visible'],'sort':_0x4ddea1['sort'],'resources':_0x4ddea1[_0x9f636c(0x205)],'resourcesValid':_0x4ddea1[_0x9f636c(0x20b)],'childrenIds':_0x4ddea1[_0x9f636c(0x1fa)],'pageId':_0x4ddea1[_0x9f636c(0x204)],'pageType':_0x4ddea1['pageType'],'modelType':_0x4ddea1[_0x9f636c(0x1f3)],'datasetId':_0x4ddea1[_0x9f636c(0x1fc)],'datasetCode':_0x4ddea1[_0x9f636c(0x1e1)],'updateUserId':_0x4ddea1[_0x9f636c(0x1f9)],'updateUserName':_0x4ddea1[_0x9f636c(0x1fd)],'updateTime':_0x4ddea1[_0x9f636c(0x1ff)]};}function normalizeSort(_0x47fb0f){const _0x1c4dbe=a120_0x25d4;return typeof _0x47fb0f===_0x1c4dbe(0x1f7)&&Number[_0x1c4dbe(0x1e7)](_0x47fb0f)?_0x47fb0f:Number[_0x1c4dbe(0x1ec)];}function normalizeString(_0x44cce6){const _0x32799f=a120_0x25d4;return typeof _0x44cce6===_0x32799f(0x201)?_0x44cce6:'';}function normalizeNullableNumber(_0xab36f8){const _0xf6ce87=a120_0x25d4;return typeof _0xab36f8===_0xf6ce87(0x1f7)&&Number[_0xf6ce87(0x1e7)](_0xab36f8)?_0xab36f8:null;}function normalizeNullableString(_0x2dc31e){return typeof _0x2dc31e==='string'&&_0x2dc31e['length']>0x0?_0x2dc31e:null;}function normalizeNullableTimestamp(_0x150064){const _0xbd5d56=a120_0x25d4;if(typeof _0x150064===_0xbd5d56(0x201))return _0x150064[_0xbd5d56(0x1e5)]>0x0?_0x150064:null;return typeof _0x150064===_0xbd5d56(0x1f7)&&Number['isFinite'](_0x150064)?_0x150064:null;}export function normalizeResources(_0xc0cc){return normalizeResourceValue(_0xc0cc)['values'];}function normalizeResourceValue(_0x501c64){const _0x4f48b7=a120_0x25d4;if(_0x501c64==null)return{'values':[],'valid':!![]};if(Array[_0x4f48b7(0x1e4)](_0x501c64))return{'values':_0x501c64[_0x4f48b7(0x1e2)](String),'valid':!![]};if(typeof _0x501c64!=='string')return{'values':[],'valid':![]};try{const _0x257d16=JSON['parse'](_0x501c64);return Array[_0x4f48b7(0x1e4)](_0x257d16)?{'values':_0x257d16[_0x4f48b7(0x1e2)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * menu shared modules
3
+ */
4
+ export * from "../../../commands/menu/shared/types.js";
5
+ export * from "../../../commands/menu/shared/logic.js";
6
+ export * from "../../../commands/menu/shared/compare-table.js";
7
+ export * from "../../../commands/menu/shared/inquirer.js";
8
+ export * from "../../../commands/menu/shared/valid-url.js";
9
+ export * from "../../../commands/menu/shared/local-pages.js";
10
+ export * from "../../../commands/menu/shared/service.js";
11
+ export * from "../../../commands/menu/shared/sync-core.js";
12
+ export * from "../../../commands/menu/shared/update-core.js";
@@ -1 +1 @@
1
- (function(_0x4e5ba6,_0x493695){var _0x41248a=a121_0x5117,_0xe27f0c=_0x4e5ba6();while(!![]){try{var _0x3677be=-parseInt(_0x41248a(0xec))/0x1+-parseInt(_0x41248a(0xea))/0x2+parseInt(_0x41248a(0xe8))/0x3+parseInt(_0x41248a(0xe7))/0x4+parseInt(_0x41248a(0xe6))/0x5+parseInt(_0x41248a(0xeb))/0x6+-parseInt(_0x41248a(0xe9))/0x7;if(_0x3677be===_0x493695)break;else _0xe27f0c['push'](_0xe27f0c['shift']());}catch(_0x369133){_0xe27f0c['push'](_0xe27f0c['shift']());}}}(a121_0x401a,0x8e39a));function a121_0x5117(_0x9c6f4c,_0x17fa8d){_0x9c6f4c=_0x9c6f4c-0xe6;var _0x401aca=a121_0x401a();var _0x51176c=_0x401aca[_0x9c6f4c];return _0x51176c;}function a121_0x401a(){var _0x543888=['1060179gogxcW','1780510FSomTJ','1605580ddxfms','361710ExouWd','2369339XMuUqX','79752ofvJcn','6858114HnibEn'];a121_0x401a=function(){return _0x543888;};return a121_0x401a();}export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0x98f578,_0x573a0c){var _0x3801e3=a121_0x3369,_0x50a8a5=_0x98f578();while(!![]){try{var _0x5a5e70=parseInt(_0x3801e3(0x1aa))/0x1+parseInt(_0x3801e3(0x1a9))/0x2*(-parseInt(_0x3801e3(0x1a3))/0x3)+parseInt(_0x3801e3(0x1a7))/0x4+-parseInt(_0x3801e3(0x1a4))/0x5*(-parseInt(_0x3801e3(0x1a8))/0x6)+-parseInt(_0x3801e3(0x1a2))/0x7*(-parseInt(_0x3801e3(0x1a5))/0x8)+-parseInt(_0x3801e3(0x1a6))/0x9+parseInt(_0x3801e3(0x1ab))/0xa*(-parseInt(_0x3801e3(0x1ac))/0xb);if(_0x5a5e70===_0x573a0c)break;else _0x50a8a5['push'](_0x50a8a5['shift']());}catch(_0x329a64){_0x50a8a5['push'](_0x50a8a5['shift']());}}}(a121_0x2deb,0x28c58));export*from'../../../commands/menu/shared/types.js';function a121_0x2deb(){var _0x240e14=['6170hzoxup','253mkBdTh','502187SuQUAG','6snufiy','10yhjJkz','8liiACb','2638773YoSkjy','1169376LaSzso','61764cMyVsN','95668MBXjhk','185383hflrwI'];a121_0x2deb=function(){return _0x240e14;};return a121_0x2deb();}export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a121_0x3369(_0x3ba54d,_0x4caaa7){_0x3ba54d=_0x3ba54d-0x1a2;var _0x2deb2a=a121_0x2deb();var _0x336941=_0x2deb2a[_0x3ba54d];return _0x336941;}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
@@ -0,0 +1,10 @@
1
+ import { type Ora } from "ora";
2
+ import type { LocalPage } from "../../../commands/menu/shared/types.js";
3
+ export declare function startSpinner(text: string): Ora;
4
+ export declare function stopSpinner(spinner: Ora, text: string, success: boolean): void;
5
+ export declare function askConfirm(message: string): Promise<boolean>;
6
+ export declare function askJsUrl(defaultValue?: string): Promise<string>;
7
+ export declare function askCssUrl(defaultValue?: string): Promise<string>;
8
+ export declare function selectPages(pages: LocalPage[], onlinePaths: Set<string>): Promise<LocalPage[]>;
9
+ export declare function isInteractive(): boolean;
10
+ export declare function requireInteractive(): void;
@@ -1 +1 @@
1
- (function(_0x17cfa3,_0x5a72da){const _0x38c7e0=a122_0x24bb,_0x5c061d=_0x17cfa3();while(!![]){try{const _0x550158=-parseInt(_0x38c7e0(0xf4))/0x1*(parseInt(_0x38c7e0(0xf9))/0x2)+-parseInt(_0x38c7e0(0xdc))/0x3*(-parseInt(_0x38c7e0(0xdb))/0x4)+parseInt(_0x38c7e0(0x104))/0x5+-parseInt(_0x38c7e0(0xf8))/0x6*(-parseInt(_0x38c7e0(0xf7))/0x7)+-parseInt(_0x38c7e0(0xdf))/0x8*(-parseInt(_0x38c7e0(0xfb))/0x9)+-parseInt(_0x38c7e0(0xe5))/0xa+parseInt(_0x38c7e0(0xe0))/0xb;if(_0x550158===_0x5a72da)break;else _0x5c061d['push'](_0x5c061d['shift']());}catch(_0x16ce41){_0x5c061d['push'](_0x5c061d['shift']());}}}(a122_0x215c,0x7b296));import a122_0xe2b90e from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x19d811 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function a122_0x215c(){const _0xe8a4d3=['\x20\x20CSS\x20URL:','190420OCAJiH','map','has','name','trim','4cgbnMx','1447233CQOFHp','cancelled','No\x20local\x20pages\x20found.','8rjAvSz','1297285HLVvHZ','\x20\x20Checking\x20CSS\x20URL\x20reachability...','start','filter','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','5405440ZFFPxW','JS\x20URL\x20checked','test','cyan','stdin','length','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','Cancelled.','No\x20menus\x20selected.','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','error','red','[new]','green','includes','548339SEKQrj','label','CSS\x20URL\x20checked','7wJJeRY','3409092CuNtpy','2xxFEKr','isTTY','3480669eOJplK','JS\x20URL\x20check\x20failed','\x20\x20Checking\x20JS\x20URL\x20reachability...','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','gray','\x20\x20JS\x20URL:','path','ExitPromptError'];a122_0x215c=function(){return _0xe8a4d3;};return a122_0x215c();}function onCancel(_0x3460a0){return _0x3460a0['catch'](_0x2378a2=>{const _0x3af477=a122_0x24bb;if(_0x2378a2?.[_0x3af477(0x107)]===_0x3af477(0x102))throw CliErrors['cancelled']('Cancelled.');throw _0x2378a2;});}export function startSpinner(_0x48175c){const _0x1e1393=a122_0x24bb;return a122_0x19d811({'text':_0x48175c,'color':_0x1e1393(0xe8)})[_0x1e1393(0xe2)]();}export function stopSpinner(_0x4cf7a5,_0x49d56c,_0x392039){_0x392039?_0x4cf7a5['succeed'](_0x49d56c):_0x4cf7a5['fail'](_0x49d56c);}export async function askConfirm(_0x262bd3){return onCancel(confirm({'message':_0x262bd3,'theme':{'prefix':''}}));}export async function askJsUrl(_0x5ece94){const _0x1c5e90=a122_0x24bb;while(!![]){const _0x214790=await onCancel(input({'message':_0x1c5e90(0x100),'default':_0x5ece94,'theme':{'prefix':''}}));if(_0x214790[_0x1c5e90(0xda)]()==='')throw CliErrors[_0x1c5e90(0xdd)](_0x1c5e90(0xec));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x1c5e90(0xe7)](_0x214790[_0x1c5e90(0xda)]())){console['error'](a122_0xe2b90e[_0x1c5e90(0xf0)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x2836d4=startSpinner(_0x1c5e90(0xfd));try{const _0x6da4eb=await isUrlReachable(_0x214790[_0x1c5e90(0xda)]());stopSpinner(_0x2836d4,_0x1c5e90(0xe6),_0x6da4eb);if(!_0x6da4eb){console[_0x1c5e90(0xef)](a122_0xe2b90e['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x214790[_0x1c5e90(0xda)]();}catch(_0x284a11){stopSpinner(_0x2836d4,_0x1c5e90(0xfc),![]);throw _0x284a11;}}}export async function askCssUrl(_0x3ad0b8){const _0x346556=a122_0x24bb;while(!![]){const _0x4b5dcd=await onCancel(input({'message':_0x346556(0x103),'default':_0x3ad0b8,'theme':{'prefix':''}}));if(_0x4b5dcd[_0x346556(0xda)]()==='')throw CliErrors[_0x346556(0xdd)](_0x346556(0xec));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x346556(0xe7)](_0x4b5dcd['trim']())){console['error'](a122_0xe2b90e[_0x346556(0xf0)](_0x346556(0xee)));continue;}const _0x18b91c=startSpinner(_0x346556(0xe1));try{const _0x29f4f8=await isUrlReachable(_0x4b5dcd['trim']());stopSpinner(_0x18b91c,_0x346556(0xf6),_0x29f4f8);if(!_0x29f4f8){console['error'](a122_0xe2b90e[_0x346556(0xf0)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x4b5dcd['trim']();}catch(_0x3654cc){stopSpinner(_0x18b91c,'CSS\x20URL\x20check\x20failed',![]);throw _0x3654cc;}}}export async function selectPages(_0xdf238f,_0x3b1173){const _0x4080f0=a122_0x24bb,_0x20685e=_0xdf238f[_0x4080f0(0x105)](_0x23ce1f=>{const _0x45d585=_0x4080f0,_0x1708ba=_0x3b1173[_0x45d585(0x106)](_0x23ce1f[_0x45d585(0x101)]);return{'name':_0x23ce1f[_0x45d585(0xf5)]+'\x20\x20'+a122_0xe2b90e[_0x45d585(0xff)](_0x23ce1f[_0x45d585(0x101)])+'\x20\x20'+(_0x1708ba?a122_0xe2b90e[_0x45d585(0xff)]('[already\x20on\x20platform]'):a122_0xe2b90e[_0x45d585(0xf2)](_0x45d585(0xf1))),'value':_0x23ce1f[_0x45d585(0x101)],'checked':!_0x1708ba,'disabled':_0x1708ba};});if(_0x20685e[_0x4080f0(0xea)]===0x0)throw new Error(_0x4080f0(0xde));const _0xfb95a4=await onCancel(checkbox({'message':_0x4080f0(0xe4),'choices':_0x20685e,'loop':![],'theme':{'prefix':''}}));if(_0xfb95a4['length']===0x0)throw new Error(_0x4080f0(0xed));return _0xdf238f[_0x4080f0(0xe3)](_0x454047=>_0xfb95a4[_0x4080f0(0xf3)](_0x454047[_0x4080f0(0x101)]));}export function isInteractive(){const _0x40065e=a122_0x24bb;return process[_0x40065e(0xe9)][_0x40065e(0xfa)]===!![];}function a122_0x24bb(_0x58f42b,_0x1e1907){_0x58f42b=_0x58f42b-0xda;const _0x215c06=a122_0x215c();let _0x24bb5d=_0x215c06[_0x58f42b];return _0x24bb5d;}export function requireInteractive(){const _0x3dcf2d=a122_0x24bb;if(!isInteractive())throw new Error(_0x3dcf2d(0xfe)+_0x3dcf2d(0xeb));}
1
+ (function(_0x5c12d3,_0x4b8cbd){const _0x52c620=a122_0x2bf6,_0x15367e=_0x5c12d3();while(!![]){try{const _0x571c10=-parseInt(_0x52c620(0x98))/0x1+-parseInt(_0x52c620(0xac))/0x2+parseInt(_0x52c620(0xa9))/0x3+-parseInt(_0x52c620(0x9c))/0x4*(-parseInt(_0x52c620(0x99))/0x5)+-parseInt(_0x52c620(0x9e))/0x6+-parseInt(_0x52c620(0xbf))/0x7*(parseInt(_0x52c620(0x9d))/0x8)+parseInt(_0x52c620(0xa7))/0x9*(parseInt(_0x52c620(0xa0))/0xa);if(_0x571c10===_0x4b8cbd)break;else _0x15367e['push'](_0x15367e['shift']());}catch(_0x3db83d){_0x15367e['push'](_0x15367e['shift']());}}}(a122_0x1510,0x26af7));import a122_0x5a3360 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x5f3689 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a122_0x1510(){const _0x88cfd5=['\x20\x20CSS\x20URL:','No\x20local\x20pages\x20found.','504848tPfrQq','red','\x20\x20Checking\x20CSS\x20URL\x20reachability...','stdin','CSS\x20URL\x20check\x20failed','map','cyan','[new]','JS\x20URL\x20check\x20failed','[already\x20on\x20platform]','fail','label','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','error','trim','start','test','807457BGTUsW','Cancelled.','cancelled','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','isTTY','123865HwzLrA','10vDNRVB','green','name','81740fIRKar','8lRpfzr','1199142ZXpuYp','length','3600830HZSTOA','path','\x20\x20JS\x20URL:','includes','gray','filter','has','18wTnCEH','ExitPromptError','266748UrManW'];a122_0x1510=function(){return _0x88cfd5;};return a122_0x1510();}import{CliErrors}from'../../../errors.js';function onCancel(_0x5ecb79){return _0x5ecb79['catch'](_0x17ec8f=>{const _0x150d78=a122_0x2bf6;if(_0x17ec8f?.[_0x150d78(0x9b)]===_0x150d78(0xa8))throw CliErrors[_0x150d78(0xc1)](_0x150d78(0xc0));throw _0x17ec8f;});}export function startSpinner(_0x195a93){const _0x1c2df3=a122_0x2bf6;return a122_0x5f3689({'text':_0x195a93,'color':_0x1c2df3(0xb2)})[_0x1c2df3(0xbd)]();}export function stopSpinner(_0x2c428c,_0x2f6e61,_0x53f666){const _0x10e692=a122_0x2bf6;_0x53f666?_0x2c428c['succeed'](_0x2f6e61):_0x2c428c[_0x10e692(0xb6)](_0x2f6e61);}function a122_0x2bf6(_0x1e8a7f,_0x19920f){_0x1e8a7f=_0x1e8a7f-0x98;const _0x15106c=a122_0x1510();let _0x2bf6f1=_0x15106c[_0x1e8a7f];return _0x2bf6f1;}export async function askConfirm(_0x140fdb){return onCancel(confirm({'message':_0x140fdb,'theme':{'prefix':''}}));}export async function askJsUrl(_0x462001){const _0x2a1550=a122_0x2bf6;while(!![]){const _0xbfddb0=await onCancel(input({'message':_0x2a1550(0xa2),'default':_0x462001,'theme':{'prefix':''}}));if(_0xbfddb0[_0x2a1550(0xbc)]()==='')throw CliErrors['cancelled'](_0x2a1550(0xc0));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x2a1550(0xbe)](_0xbfddb0['trim']())){console['error'](a122_0x5a3360['red']('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x4076e8=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x239963=await isUrlReachable(_0xbfddb0[_0x2a1550(0xbc)]());stopSpinner(_0x4076e8,'JS\x20URL\x20checked',_0x239963);if(!_0x239963){console[_0x2a1550(0xbb)](a122_0x5a3360[_0x2a1550(0xad)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0xbfddb0[_0x2a1550(0xbc)]();}catch(_0x213f60){stopSpinner(_0x4076e8,_0x2a1550(0xb4),![]);throw _0x213f60;}}}export async function askCssUrl(_0x461a0c){const _0xc71e58=a122_0x2bf6;while(!![]){const _0x163935=await onCancel(input({'message':_0xc71e58(0xaa),'default':_0x461a0c,'theme':{'prefix':''}}));if(_0x163935['trim']()==='')throw CliErrors[_0xc71e58(0xc1)](_0xc71e58(0xc0));if(!/^https:\/\/.+\.css(\?.*)?$/[_0xc71e58(0xbe)](_0x163935[_0xc71e58(0xbc)]())){console['error'](a122_0x5a3360['red'](_0xc71e58(0xb8)));continue;}const _0x4672f3=startSpinner(_0xc71e58(0xae));try{const _0x12aad8=await isUrlReachable(_0x163935[_0xc71e58(0xbc)]());stopSpinner(_0x4672f3,'CSS\x20URL\x20checked',_0x12aad8);if(!_0x12aad8){console[_0xc71e58(0xbb)](a122_0x5a3360[_0xc71e58(0xad)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x163935[_0xc71e58(0xbc)]();}catch(_0x3b1453){stopSpinner(_0x4672f3,_0xc71e58(0xb0),![]);throw _0x3b1453;}}}export async function selectPages(_0xe12eb5,_0x2cd47e){const _0x31ab0a=a122_0x2bf6,_0x22d3f5=_0xe12eb5[_0x31ab0a(0xb1)](_0x332c57=>{const _0x4a710e=_0x31ab0a,_0x469e3f=_0x2cd47e[_0x4a710e(0xa6)](_0x332c57['path']);return{'name':_0x332c57[_0x4a710e(0xb7)]+'\x20\x20'+a122_0x5a3360['gray'](_0x332c57[_0x4a710e(0xa1)])+'\x20\x20'+(_0x469e3f?a122_0x5a3360[_0x4a710e(0xa4)](_0x4a710e(0xb5)):a122_0x5a3360[_0x4a710e(0x9a)](_0x4a710e(0xb3))),'value':_0x332c57[_0x4a710e(0xa1)],'checked':!_0x469e3f,'disabled':_0x469e3f};});if(_0x22d3f5[_0x31ab0a(0x9f)]===0x0)throw new Error(_0x31ab0a(0xab));const _0x2cf8b5=await onCancel(checkbox({'message':_0x31ab0a(0xba),'choices':_0x22d3f5,'loop':![],'theme':{'prefix':''}}));if(_0x2cf8b5[_0x31ab0a(0x9f)]===0x0)throw new Error('No\x20menus\x20selected.');return _0xe12eb5[_0x31ab0a(0xa5)](_0x580c5f=>_0x2cf8b5[_0x31ab0a(0xa3)](_0x580c5f[_0x31ab0a(0xa1)]));}export function isInteractive(){const _0x3dfa1d=a122_0x2bf6;return process[_0x3dfa1d(0xaf)][_0x3dfa1d(0xc3)]===!![];}export function requireInteractive(){const _0x9c3845=a122_0x2bf6;if(!isInteractive())throw new Error(_0x9c3845(0xc2)+_0x9c3845(0xb9));}
@@ -0,0 +1,12 @@
1
+ import type { LocalPage } from "../../../commands/menu/shared/types.js";
2
+ /**
3
+ * Extract menu title from a source file.
4
+ *
5
+ * Priority:
6
+ * 1. Title: comment in top block comment
7
+ * 2. ComponentName.displayName
8
+ * 3. Component name from export default
9
+ * 4. null (caller falls back to file path)
10
+ */
11
+ export declare function extractTitleFromComment(filePath: string): string | null;
12
+ export declare function getLocalPages(dir?: string, baseDir?: string): LocalPage[];
@@ -1 +1 @@
1
- function a123_0x2bc7(_0x449035,_0x5c00f3){_0x449035=_0x449035-0xfb;const _0x437fbb=a123_0x437f();let _0x2bc765=_0x437fbb[_0x449035];return _0x2bc765;}const a123_0x23823c=a123_0x2bc7;function a123_0x437f(){const _0x2a1cf9=['match','replace','replaceAll','1856286uBZMmh','trim','3728326kMSibP','index.tsx','forEach','split','slice','isDirectory','join','push','183UgDdZS','24286UDxHoF','filter','cwd','484188PmZzuE','3240044ALLyVt','236770anWFLc','endsWith','12265728PDmvXp'];a123_0x437f=function(){return _0x2a1cf9;};return a123_0x437f();}(function(_0x2ec140,_0x2cf371){const _0x24b291=a123_0x2bc7,_0x47fa22=_0x2ec140();while(!![]){try{const _0x1b2ff2=-parseInt(_0x24b291(0xff))/0x1+parseInt(_0x24b291(0xfc))/0x2*(parseInt(_0x24b291(0xfb))/0x3)+parseInt(_0x24b291(0x100))/0x4+parseInt(_0x24b291(0x101))/0x5+parseInt(_0x24b291(0x107))/0x6+parseInt(_0x24b291(0x109))/0x7+-parseInt(_0x24b291(0x103))/0x8;if(_0x1b2ff2===_0x2cf371)break;else _0x47fa22['push'](_0x47fa22['shift']());}catch(_0x20ebc2){_0x47fa22['push'](_0x47fa22['shift']());}}}(a123_0x437f,0x6731b));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a123_0x23823c(0xfe)](),'src/pages');export function extractTitleFromComment(_0x372248){const _0x2b5d09=a123_0x23823c;try{const _0x2a71d3=readFileSync(_0x372248,'utf-8'),_0x2ebfc6=_0x2a71d3['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x2ebfc6&&_0x2ebfc6[0x1]){const _0x1d986a=_0x2ebfc6[0x1],_0x13cd29=_0x1d986a[_0x2b5d09(0x104)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x13cd29&&_0x13cd29[0x1])return _0x13cd29[0x1][_0x2b5d09(0x108)]();}let _0x5edc62=null;const _0x2931fe=_0x2a71d3[_0x2b5d09(0x104)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x2931fe&&_0x2931fe[0x1]&&(_0x5edc62=_0x2931fe[0x1]);if(!_0x5edc62){const _0x44df68=_0x2a71d3[_0x2b5d09(0x104)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x44df68&&_0x44df68[0x1]&&(_0x5edc62=_0x44df68[0x1]);}if(_0x5edc62){const _0x2c6646=new RegExp('\x5cb'+_0x5edc62+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x14c946=_0x2a71d3['match'](_0x2c6646);if(_0x14c946&&_0x14c946[0x1])return _0x14c946[0x1];return _0x5edc62;}return null;}catch(_0x55d235){return null;}}export function getLocalPages(_0x3c28f3=pagesDir,_0x2ee366=pagesDir){const _0x4d5dbe=a123_0x23823c;let _0x547e8f=[];const _0x5d1c9e=readdirSync(_0x3c28f3);return _0x5d1c9e[_0x4d5dbe(0x10b)](_0xc4eded=>{const _0x473424=_0x4d5dbe,_0x13e768=join(_0x3c28f3,_0xc4eded),_0x315de7=statSync(_0x13e768);if(_0x315de7&&_0x315de7[_0x473424(0x10e)]())_0x547e8f=_0x547e8f['concat'](getLocalPages(_0x13e768,_0x2ee366));else{if(_0xc4eded[_0x473424(0x102)]('.tsx')){let _0x47318e=relative(_0x2ee366,_0x13e768);_0x47318e['endsWith'](_0x473424(0x10a))?_0x47318e=_0x47318e[_0x473424(0x105)](/index\.tsx$/,''):_0x47318e=_0x47318e[_0x473424(0x105)](/\.tsx$/,'');_0x47318e[_0x473424(0x102)](sep)&&(_0x47318e=_0x47318e[_0x473424(0x10d)](0x0,-0x1));const _0x165845=_0x47318e[_0x473424(0x10c)](sep)[_0x473424(0x10f)]('/'),_0x4afdb8=extractTitleFromComment(_0x13e768),_0x217e77=_0x4afdb8||_0x165845;_0x547e8f[_0x473424(0x110)]({'path':_0x165845[_0x473424(0x106)]('$',':'),'label':_0x217e77});}}}),_0x547e8f[_0x4d5dbe(0xfd)](_0x4ef83f=>_0x4ef83f['path']!=='');}
1
+ const a123_0x1caa17=a123_0x35e2;(function(_0x598fdc,_0x1a4675){const _0xf911b8=a123_0x35e2,_0x4d6a4e=_0x598fdc();while(!![]){try{const _0x2cce45=parseInt(_0xf911b8(0x75))/0x1*(parseInt(_0xf911b8(0x81))/0x2)+-parseInt(_0xf911b8(0x74))/0x3*(parseInt(_0xf911b8(0x71))/0x4)+-parseInt(_0xf911b8(0x6c))/0x5*(-parseInt(_0xf911b8(0x77))/0x6)+-parseInt(_0xf911b8(0x72))/0x7+-parseInt(_0xf911b8(0x84))/0x8*(parseInt(_0xf911b8(0x85))/0x9)+parseInt(_0xf911b8(0x6f))/0xa+-parseInt(_0xf911b8(0x82))/0xb*(-parseInt(_0xf911b8(0x80))/0xc);if(_0x2cce45===_0x1a4675)break;else _0x4d6a4e['push'](_0x4d6a4e['shift']());}catch(_0x4e1dcc){_0x4d6a4e['push'](_0x4d6a4e['shift']());}}}(a123_0x50d7,0x70be4));function a123_0x35e2(_0x3a749f,_0x7d2028){_0x3a749f=_0x3a749f-0x6a;const _0x50d768=a123_0x50d7();let _0x35e291=_0x50d768[_0x3a749f];return _0x35e291;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a123_0x1caa17(0x76));export function extractTitleFromComment(_0x274ab3){const _0x57eefe=a123_0x1caa17;try{const _0x47018b=readFileSync(_0x274ab3,_0x57eefe(0x79)),_0x14a911=_0x47018b[_0x57eefe(0x7f)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x14a911&&_0x14a911[0x1]){const _0x29f011=_0x14a911[0x1],_0x2aaa22=_0x29f011[_0x57eefe(0x7f)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2aaa22&&_0x2aaa22[0x1])return _0x2aaa22[0x1][_0x57eefe(0x78)]();}let _0x48e35b=null;const _0xff2ab0=_0x47018b[_0x57eefe(0x7f)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0xff2ab0&&_0xff2ab0[0x1]&&(_0x48e35b=_0xff2ab0[0x1]);if(!_0x48e35b){const _0x47dff3=_0x47018b['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x47dff3&&_0x47dff3[0x1]&&(_0x48e35b=_0x47dff3[0x1]);}if(_0x48e35b){const _0x450508=new RegExp('\x5cb'+_0x48e35b+_0x57eefe(0x6b)),_0x4b89ed=_0x47018b['match'](_0x450508);if(_0x4b89ed&&_0x4b89ed[0x1])return _0x4b89ed[0x1];return _0x48e35b;}return null;}catch(_0x1a6030){return null;}}function a123_0x50d7(){const _0xad5932=['replaceAll','replace','slice','forEach','match','2175660lqEbXH','274SerxYG','66wWrfMn','isDirectory','4869352lfDZPc','9KEpFjZ','split','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','2035YsMtxQ','filter','push','9160060cfrupB','concat','1108OjpAwP','5743976GbwNSb','path','2757tWVXyJ','907lBRddk','src/pages','258kSsvdY','trim','utf-8','endsWith'];a123_0x50d7=function(){return _0xad5932;};return a123_0x50d7();}export function getLocalPages(_0x3a4ef4=pagesDir,_0x21d86b=pagesDir){const _0x3a73f3=a123_0x1caa17;let _0x11616f=[];const _0x452ee3=readdirSync(_0x3a4ef4);return _0x452ee3[_0x3a73f3(0x7e)](_0x315c00=>{const _0x155b03=_0x3a73f3,_0x6a474b=join(_0x3a4ef4,_0x315c00),_0x44f371=statSync(_0x6a474b);if(_0x44f371&&_0x44f371[_0x155b03(0x83)]())_0x11616f=_0x11616f[_0x155b03(0x70)](getLocalPages(_0x6a474b,_0x21d86b));else{if(_0x315c00[_0x155b03(0x7a)]('.tsx')){let _0x1fad5e=relative(_0x21d86b,_0x6a474b);_0x1fad5e['endsWith']('index.tsx')?_0x1fad5e=_0x1fad5e[_0x155b03(0x7c)](/index\.tsx$/,''):_0x1fad5e=_0x1fad5e['replace'](/\.tsx$/,'');_0x1fad5e['endsWith'](sep)&&(_0x1fad5e=_0x1fad5e[_0x155b03(0x7d)](0x0,-0x1));const _0x106da1=_0x1fad5e[_0x155b03(0x6a)](sep)['join']('/'),_0x3da464=extractTitleFromComment(_0x6a474b),_0x449c52=_0x3da464||_0x106da1;_0x11616f[_0x155b03(0x6e)]({'path':_0x106da1[_0x155b03(0x7b)]('$',':'),'label':_0x449c52});}}}),_0x11616f[_0x3a73f3(0x6d)](_0x27af05=>_0x27af05[_0x3a73f3(0x73)]!=='');}
@@ -0,0 +1,28 @@
1
+ import type { LocalPage, MenuMutationEntity, ProcessedMenuItem } from "../../../commands/menu/shared/types.js";
2
+ export interface UrlValidationResult {
3
+ ok: boolean;
4
+ errors: string[];
5
+ }
6
+ export declare function validateJsUrl(url: string): UrlValidationResult;
7
+ export declare function validateCssUrl(url: string): UrlValidationResult;
8
+ export declare function validateJsUrlReachable(url: string): Promise<UrlValidationResult>;
9
+ export declare function validateCssUrlReachable(url: string): Promise<UrlValidationResult>;
10
+ export declare function buildCompareRows(localPages: LocalPage[], onlinePaths: Set<string>): {
11
+ label: string;
12
+ path: string;
13
+ local: boolean;
14
+ online: boolean;
15
+ }[];
16
+ export declare function doCreateMenus(appCode: string, cookie: string, pages: LocalPage[], resources?: string[]): Promise<{
17
+ created: number;
18
+ failed: number;
19
+ labels: string[];
20
+ menus: MenuMutationEntity[];
21
+ }>;
22
+ export declare function filterMenusWithResources(menuList: ProcessedMenuItem[]): ProcessedMenuItem[];
23
+ export declare function fetchMenuData(appCode: string, cookie: string): Promise<{
24
+ localPages: LocalPage[];
25
+ onlineMenuList: ProcessedMenuItem[];
26
+ onlinePaths: Set<string>;
27
+ }>;
28
+ export declare function fetchOnlineMenuList(appCode: string, cookie: string): Promise<ProcessedMenuItem[]>;
@@ -1 +1 @@
1
- (function(_0x7a0146,_0x19d03b){const _0x1d75c9=a124_0x5bea,_0x35256c=_0x7a0146();while(!![]){try{const _0x231da8=parseInt(_0x1d75c9(0x180))/0x1+parseInt(_0x1d75c9(0x18d))/0x2+-parseInt(_0x1d75c9(0x18a))/0x3+parseInt(_0x1d75c9(0x184))/0x4+parseInt(_0x1d75c9(0x18c))/0x5+-parseInt(_0x1d75c9(0x187))/0x6+parseInt(_0x1d75c9(0x17d))/0x7*(parseInt(_0x1d75c9(0x182))/0x8);if(_0x231da8===_0x19d03b)break;else _0x35256c['push'](_0x35256c['shift']());}catch(_0x3934e2){_0x35256c['push'](_0x35256c['shift']());}}}(a124_0x2672,0xd8dac));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';export function validateJsUrl(_0x148ae3){const _0x5df44d=a124_0x5bea,_0x4646df=[];return!isValidJsHttpsUrl(_0x148ae3)&&_0x4646df[_0x5df44d(0x189)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x4646df['length']===0x0,'errors':_0x4646df};}export function validateCssUrl(_0x31c61e){const _0x2a50ea=a124_0x5bea,_0x14ebdc=[];return!isValidCssHttpsUrl(_0x31c61e)&&_0x14ebdc[_0x2a50ea(0x189)](_0x2a50ea(0x18b)),{'ok':_0x14ebdc[_0x2a50ea(0x188)]===0x0,'errors':_0x14ebdc};}function a124_0x5bea(_0x592c09,_0x3677d4){_0x592c09=_0x592c09-0x17c;const _0x26724b=a124_0x2672();let _0x5beaea=_0x26724b[_0x592c09];return _0x5beaea;}export async function validateJsUrlReachable(_0x4f6985){const _0x1b182d=a124_0x5bea,_0x1de0c0=validateJsUrl(_0x4f6985);if(!_0x1de0c0['ok'])return _0x1de0c0;const _0x57132d=await isUrlReachable(_0x4f6985);if(!_0x57132d)_0x1de0c0['errors'][_0x1b182d(0x189)](_0x1b182d(0x17c));return{'ok':_0x1de0c0[_0x1b182d(0x181)][_0x1b182d(0x188)]===0x0,'errors':_0x1de0c0[_0x1b182d(0x181)]};}export async function validateCssUrlReachable(_0x56e70b){const _0x2f0a6e=a124_0x5bea,_0x448b4f=validateCssUrl(_0x56e70b);if(!_0x448b4f['ok'])return _0x448b4f;const _0x422ea1=await isUrlReachable(_0x56e70b);if(!_0x422ea1)_0x448b4f[_0x2f0a6e(0x181)][_0x2f0a6e(0x189)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x448b4f[_0x2f0a6e(0x181)]['length']===0x0,'errors':_0x448b4f[_0x2f0a6e(0x181)]};}export function buildCompareRows(_0x3f404e,_0x4579a3){const _0x153b51=a124_0x5bea;return _0x3f404e[_0x153b51(0x183)](_0x3a0ba0=>({'label':_0x3a0ba0[_0x153b51(0x186)],'path':_0x3a0ba0[_0x153b51(0x185)],'local':!![],'online':_0x4579a3[_0x153b51(0x17e)](_0x3a0ba0['path'])}));}function a124_0x2672(){const _0x2872c9=['1322193lGqcpk','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2347570blFckF','499570pmwNyF','JS\x20URL\x20is\x20unreachable','256235FpQSTL','has','resources','1075753YYZlMg','errors','120HBDHNj','map','297708JKgniL','path','label','6537522LkDZiY','length','push'];a124_0x2672=function(){return _0x2872c9;};return a124_0x2672();}export async function doCreateMenus(_0x2219ac,_0x4b9b46,_0x409165,_0x33757f){const _0x59c09c=a124_0x5bea,_0x374e7a=await createMenus(_0x2219ac,_0x4b9b46,_0x409165,_0x33757f);return{'created':_0x374e7a[_0x59c09c(0x188)],'failed':0x0,'labels':_0x409165[_0x59c09c(0x183)](_0x49d415=>_0x49d415['label']),'menus':_0x374e7a};}export function filterMenusWithResources(_0x3f6140){const _0x4d5f80=a124_0x5bea;return _0x3f6140['filter'](_0x32cb7d=>_0x32cb7d[_0x4d5f80(0x17f)][_0x4d5f80(0x188)]>0x0);}export async function fetchMenuData(_0x453250,_0x469309){const _0x587d39=a124_0x5bea,_0xf3c0cd=getLocalPages(),_0x660861=await getOnlineMenuList(_0x453250,_0x469309),_0x31f15a=new Set(_0x660861[_0x587d39(0x183)](_0x331b03=>_0x331b03['path']));return{'localPages':_0xf3c0cd,'onlineMenuList':_0x660861,'onlinePaths':_0x31f15a};}export async function fetchOnlineMenuList(_0x38869f,_0x3967aa){return getOnlineMenuList(_0x38869f,_0x3967aa);}
1
+ (function(_0x65c473,_0x569370){const _0x472e21=a124_0x1b7e,_0x1a6013=_0x65c473();while(!![]){try{const _0x156330=-parseInt(_0x472e21(0x150))/0x1+parseInt(_0x472e21(0x14a))/0x2+-parseInt(_0x472e21(0x158))/0x3+-parseInt(_0x472e21(0x149))/0x4+parseInt(_0x472e21(0x154))/0x5*(-parseInt(_0x472e21(0x15b))/0x6)+parseInt(_0x472e21(0x153))/0x7+-parseInt(_0x472e21(0x147))/0x8*(-parseInt(_0x472e21(0x152))/0x9);if(_0x156330===_0x569370)break;else _0x1a6013['push'](_0x1a6013['shift']());}catch(_0x17926f){_0x1a6013['push'](_0x1a6013['shift']());}}}(a124_0x489e,0x8ce30));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';export function validateJsUrl(_0x53c5cc){const _0x50e858=a124_0x1b7e,_0xa68982=[];return!isValidJsHttpsUrl(_0x53c5cc)&&_0xa68982[_0x50e858(0x14c)](_0x50e858(0x14d)),{'ok':_0xa68982['length']===0x0,'errors':_0xa68982};}export function validateCssUrl(_0x30e482){const _0x5433c6=a124_0x1b7e,_0x54b251=[];return!isValidCssHttpsUrl(_0x30e482)&&_0x54b251[_0x5433c6(0x14c)](_0x5433c6(0x157)),{'ok':_0x54b251['length']===0x0,'errors':_0x54b251};}function a124_0x489e(){const _0x225f83=['516012cAOvsx','path','has','252YXPYPv','errors','17667696fpQWJU','filter','4400948Qjjtpv','370128xyKcjI','length','push','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','map','label','238990aUVGxv','JS\x20URL\x20is\x20unreachable','9pOYmqb','5557713POhvKR','130855sWMCfQ','resources','CSS\x20URL\x20is\x20unreachable','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'];a124_0x489e=function(){return _0x225f83;};return a124_0x489e();}function a124_0x1b7e(_0x423dd1,_0x17b9c7){_0x423dd1=_0x423dd1-0x146;const _0x489ecc=a124_0x489e();let _0x1b7e20=_0x489ecc[_0x423dd1];return _0x1b7e20;}export async function validateJsUrlReachable(_0x563555){const _0x437d88=a124_0x1b7e,_0x4d18be=validateJsUrl(_0x563555);if(!_0x4d18be['ok'])return _0x4d18be;const _0x464462=await isUrlReachable(_0x563555);if(!_0x464462)_0x4d18be[_0x437d88(0x146)][_0x437d88(0x14c)](_0x437d88(0x151));return{'ok':_0x4d18be[_0x437d88(0x146)][_0x437d88(0x14b)]===0x0,'errors':_0x4d18be['errors']};}export async function validateCssUrlReachable(_0xdf0f1e){const _0x1f04d2=a124_0x1b7e,_0x39071d=validateCssUrl(_0xdf0f1e);if(!_0x39071d['ok'])return _0x39071d;const _0x46f5a1=await isUrlReachable(_0xdf0f1e);if(!_0x46f5a1)_0x39071d[_0x1f04d2(0x146)][_0x1f04d2(0x14c)](_0x1f04d2(0x156));return{'ok':_0x39071d[_0x1f04d2(0x146)][_0x1f04d2(0x14b)]===0x0,'errors':_0x39071d[_0x1f04d2(0x146)]};}export function buildCompareRows(_0x572da1,_0x597e71){const _0x4bb1c8=a124_0x1b7e;return _0x572da1[_0x4bb1c8(0x14e)](_0x438dea=>({'label':_0x438dea['label'],'path':_0x438dea['path'],'local':!![],'online':_0x597e71[_0x4bb1c8(0x15a)](_0x438dea[_0x4bb1c8(0x159)])}));}export async function doCreateMenus(_0x2400b2,_0x5dcb80,_0x244acd,_0x17b10e){const _0x34db97=a124_0x1b7e,_0x22e092=await createMenus(_0x2400b2,_0x5dcb80,_0x244acd,_0x17b10e);return{'created':_0x22e092[_0x34db97(0x14b)],'failed':0x0,'labels':_0x244acd[_0x34db97(0x14e)](_0xdb2fd6=>_0xdb2fd6[_0x34db97(0x14f)]),'menus':_0x22e092};}export function filterMenusWithResources(_0x532929){const _0x20f862=a124_0x1b7e;return _0x532929[_0x20f862(0x148)](_0xb20418=>_0xb20418[_0x20f862(0x155)]['length']>0x0);}export async function fetchMenuData(_0x36bb9d,_0x5a0ccc){const _0x2ea604=a124_0x1b7e,_0xc96b1a=getLocalPages(),_0x1246d2=await getOnlineMenuList(_0x36bb9d,_0x5a0ccc),_0x2bba4a=new Set(_0x1246d2[_0x2ea604(0x14e)](_0x43a1e0=>_0x43a1e0[_0x2ea604(0x159)]));return{'localPages':_0xc96b1a,'onlineMenuList':_0x1246d2,'onlinePaths':_0x2bba4a};}export async function fetchOnlineMenuList(_0x3b7747,_0x344d55){return getOnlineMenuList(_0x3b7747,_0x344d55);}