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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
@@ -1 +1 @@
1
- (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(_0x3fbc9a,_0x29393c){const _0x8fff72=a118_0x444e,_0x51d0b1=_0x3fbc9a();while(!![]){try{const _0x53d174=-parseInt(_0x8fff72(0x149))/0x1*(-parseInt(_0x8fff72(0x15a))/0x2)+parseInt(_0x8fff72(0x157))/0x3*(-parseInt(_0x8fff72(0x153))/0x4)+parseInt(_0x8fff72(0x150))/0x5*(-parseInt(_0x8fff72(0x141))/0x6)+parseInt(_0x8fff72(0x152))/0x7+parseInt(_0x8fff72(0x156))/0x8+parseInt(_0x8fff72(0x144))/0x9*(parseInt(_0x8fff72(0x151))/0xa)+parseInt(_0x8fff72(0x15f))/0xb*(-parseInt(_0x8fff72(0x14e))/0xc);if(_0x53d174===_0x29393c)break;else _0x51d0b1['push'](_0x51d0b1['shift']());}catch(_0x14e1f4){_0x51d0b1['push'](_0x51d0b1['shift']());}}}(a118_0x2497,0x844a0));function strWidth(_0x24321b){const _0x52c51f=a118_0x444e;let _0x1dbf1c=0x0;for(const _0x2e0541 of _0x24321b){_0x1dbf1c+=/[\u4e00-\u9fa5]/[_0x52c51f(0x14f)](_0x2e0541)?0x2:0x1;}return _0x1dbf1c;}function padRight(_0x3e0073,_0x1ba598){const _0x3f820c=a118_0x444e,_0x503498=strWidth(_0x3e0073);return _0x3e0073+'\x20'[_0x3f820c(0x147)](Math[_0x3f820c(0x15c)](0x0,_0x1ba598-_0x503498));}function a118_0x2497(){const _0x2ab883=['60wqnAUv','test','2785nxnRVt','4010wxBycm','6211541yFGQEJ','23444IQluMa','path','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','7697400cKDyPP','267xMimJN','local','Local','12YlwzLF','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','max','\x20\x20\x20\x20JS:\x20\x20','length','2249071xQMqdi','Platform','\x20\x20No\x20pages\x20to\x20sync.','map','label','10818wKUnFT','\x20\x20\x20\x20•\x20','Path','7569RSPLnP','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','\x20\x20Affected\x20menus:\x20','repeat','push','150547NHYThJ','showOnline','(unchanged)','join','online'];a118_0x2497=function(){return _0x2ab883;};return a118_0x2497();}export function renderCompareTable(_0x548348,_0x3c8184={}){const _0xa64216=a118_0x444e;if(_0x548348['length']===0x0)return'';const _0x2a3a1e=_0x3c8184[_0xa64216(0x14a)]??!![],_0x353a49=Math['max'](0x1e,..._0x548348['map'](_0x2c8492=>strWidth(_0x2c8492[_0xa64216(0x140)]))),_0x502c53=Math['max'](0x18,..._0x548348[_0xa64216(0x13f)](_0x4685c4=>strWidth(_0x4685c4[_0xa64216(0x154)]))),_0x3d6fa8=0x4,_0x45d673=[],_0x3b35ad='\x20\x20'+padRight('Menu\x20Name',_0x353a49),_0x9a342c=padRight(_0xa64216(0x143),_0x502c53),_0xb83375=padRight(_0xa64216(0x159),_0x3d6fa8),_0x5eabcb=_0x2a3a1e?'\x20\x20'+padRight(_0xa64216(0x160),_0x3d6fa8):'';_0x45d673[_0xa64216(0x148)](_0x3b35ad+'\x20\x20'+_0x9a342c+'\x20\x20'+_0xb83375+(_0x2a3a1e?_0x5eabcb:'')),_0x45d673['push']('\x20\x20'+'─'['repeat'](_0x353a49)+'\x20\x20'+'─'['repeat'](_0x502c53)+'\x20\x20'+'─'[_0xa64216(0x147)](_0x3d6fa8)+(_0x2a3a1e?'\x20\x20'+'─'[_0xa64216(0x147)](_0x3d6fa8):''));for(const _0x220c97 of _0x548348){const _0x3a9f62=padRight(_0x220c97['label'],_0x353a49),_0x4ccdc7=padRight(_0x220c97['path'],_0x502c53),_0x1872f5=_0x220c97[_0xa64216(0x158)]?'✓':'✗',_0x1b76b8=padRight(_0x1872f5,_0x3d6fa8);let _0x304b1d='\x20\x20'+_0x3a9f62+'\x20\x20'+_0x4ccdc7+'\x20\x20'+_0x1b76b8;if(_0x2a3a1e){const _0x49fbb0=_0x220c97[_0xa64216(0x14d)]?'✓':'✗';_0x304b1d+='\x20\x20'+padRight(_0x49fbb0,_0x3d6fa8);}_0x45d673[_0xa64216(0x148)](_0x304b1d);}return _0x45d673[_0xa64216(0x14c)]('\x0a');}function a118_0x444e(_0x1cef54,_0x3ce580){_0x1cef54=_0x1cef54-0x13f;const _0x2497c5=a118_0x2497();let _0x444ec8=_0x2497c5[_0x1cef54];return _0x444ec8;}export function renderSyncSummary(_0x1c6764,_0x446ddd){const _0x208548=a118_0x444e;if(_0x1c6764[_0x208548(0x15e)]===0x0)return _0x446ddd?_0x208548(0x15b):_0x208548(0x161);const _0x456f7a=['\x20\x20'+_0x1c6764[_0x208548(0x15e)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x3795a4 of _0x1c6764){_0x456f7a[_0x208548(0x148)](_0x208548(0x142)+_0x3795a4[_0x208548(0x140)]+'\x20('+_0x3795a4[_0x208548(0x154)]+')');}return _0x456f7a[_0x208548(0x14c)]('\x0a');}export function renderUpdateSummary(_0x40870c,_0x5eee96){const _0x46f444=a118_0x444e;if(_0x40870c[_0x46f444(0x15e)]===0x0)return _0x46f444(0x145);const _0x3d07aa=['\x20\x20'+_0x40870c[_0x46f444(0x15e)]+_0x46f444(0x155),_0x46f444(0x15d)+(_0x5eee96[0x0]??_0x46f444(0x14b)),'\x20\x20\x20\x20CSS:\x20'+(_0x5eee96[0x1]??_0x46f444(0x14b)),'',_0x46f444(0x146)+_0x40870c[_0x46f444(0x14c)](',\x20')];return _0x3d07aa[_0x46f444(0x14c)]('\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_0x2e12f8=a119_0x3fae;(function(_0x11fbbe,_0x4f9d88){const _0x1a70b5=a119_0x3fae,_0x2f55ee=_0x11fbbe();while(!![]){try{const _0x7918d9=-parseInt(_0x1a70b5(0x122))/0x1+parseInt(_0x1a70b5(0x152))/0x2+-parseInt(_0x1a70b5(0xf0))/0x3*(parseInt(_0x1a70b5(0x150))/0x4)+-parseInt(_0x1a70b5(0x114))/0x5+-parseInt(_0x1a70b5(0x100))/0x6*(-parseInt(_0x1a70b5(0x13a))/0x7)+-parseInt(_0x1a70b5(0x138))/0x8*(-parseInt(_0x1a70b5(0xf1))/0x9)+parseInt(_0x1a70b5(0xf6))/0xa*(parseInt(_0x1a70b5(0x12e))/0xb);if(_0x7918d9===_0x4f9d88)break;else _0x2f55ee['push'](_0x2f55ee['shift']());}catch(_0xf6293b){_0x2f55ee['push'](_0x2f55ee['shift']());}}}(a119_0x1890,0x1c5fa));import{createHash}from'node:crypto';import{mkdir,readFile,stat,writeFile}from'node:fs/promises';function a119_0x1890(){const _0x15c01a=['\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.','32QZyTpM','visible','2194cYGjFf','byId','/smartapi/menu/batchDelete','version','type','\x20is\x20in\x20the\x20future.','resourcesValid','batch-delete-menu','target','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','31818bBbmTr','1944TjeiAw','toISOString','pageId','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','resources','10oQzGiq','Menu\x20delete\x20plan\x20expired\x20at\x20','depth','stringify','EEXIST','length','hash','extend','pageSchemaAffected','Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.','510YQcmTr','Planned\x20menu\x20','\x20contract.','pageType','\x20requires\x20a\x20non-empty\x20file\x20path.','createdAt','extendHash','boolean','menu_plan_expired','expiresAt','\x20bytes.','number','parse','get','childrenCount','warnings','utf8','modelType','Menu\x20delete\x20plan\x20targets\x20app\x20','every','669015DzMbsr','isFinite','snapshotHash','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','deleteOrder','test','menu_plan_app_mismatch','sort','isArray','updateTime','path','Menu\x20delete\x20plan\x20creation\x20time\x20','selector','recursive','53745oFyVao','targetFingerprints','datasetCode','string','cascade','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.','parentId','label','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.','resourcesHash','menu\x20delete','digest','604230ZaLyqP','before','Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20','menu_state_drift',',\x20current\x20app\x20is\x20','childrenIds','POST','hex','map','pages','6176SWBOrH','size','13657HoVaOO','code','targets','Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.','Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20','datasetId','appCode','menu_plan_invalid','update','Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20','isSafeInteger','command','isInteger','delete','menu_plan_write_failed','targetFingerprint','updateUserName','plan','\x20of\x20the\x20','getTime','Failed\x20to\x20write\x20menu\x20delete\x20plan\x20'];a119_0x1890=function(){return _0x15c01a;};return a119_0x1890();}import{dirname,resolve}from'node:path';import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND=a119_0x2e12f8(0x12c),PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;export function createMenuDeletePlanFile(_0x3f4bc6,_0x1ea0cf,_0x429a3c=new Date()){const _0x3bc555=a119_0x2e12f8;if(!_0x1ea0cf[_0x3bc555(0x12f)]||!isMenuFact(_0x1ea0cf['before']))throw menuError(_0x3bc555(0x141),'Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.');const _0x21b96b=_0x1ea0cf['targets']?.[_0x3bc555(0xfb)]?_0x1ea0cf[_0x3bc555(0x13c)]:[_0x1ea0cf[_0x3bc555(0x12f)]],_0x267dbd=_0x1ea0cf[_0x3bc555(0x118)]?.['length']?_0x1ea0cf[_0x3bc555(0x118)]:_0x21b96b[_0x3bc555(0x136)](_0x4e7c99=>_0x4e7c99['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0x3f4bc6,'createdAt':_0x429a3c[_0x3bc555(0xf2)](),'expiresAt':new Date(_0x429a3c[_0x3bc555(0x14d)]()+PLAN_TTL_MS)[_0x3bc555(0xf2)](),'snapshotHash':_0x1ea0cf[_0x3bc555(0x116)],'recursive':_0x1ea0cf[_0x3bc555(0x120)][_0x3bc555(0x121)]===!![],'target':_0x1ea0cf[_0x3bc555(0x12f)],'targetFingerprint':fingerprint(_0x1ea0cf[_0x3bc555(0x12f)]),'targets':_0x21b96b,'targetFingerprints':_0x21b96b[_0x3bc555(0x136)](fingerprint),'deleteOrder':_0x267dbd,'cascade':_0x1ea0cf[_0x3bc555(0x126)]??{'pages':_0x1ea0cf[_0x3bc555(0x12f)][_0x3bc555(0xf3)]==null?[]:[_0x1ea0cf[_0x3bc555(0x12f)][_0x3bc555(0xf3)]],'pageSchemaAffected':_0x1ea0cf[_0x3bc555(0x12f)][_0x3bc555(0xf3)]!=null},'warnings':[..._0x1ea0cf[_0x3bc555(0x10f)]]};}function a119_0x3fae(_0x5f2927,_0x5885ef){_0x5f2927=_0x5f2927-0xef;const _0x189014=a119_0x1890();let _0x3fae20=_0x189014[_0x5f2927];return _0x3fae20;}export async function writeMenuDeletePlan(_0x2d3611,_0x28d83d){const _0x5a45fa=a119_0x2e12f8,_0x47a9ed=resolvePlanPath(_0x2d3611,'plan-out');await mkdir(dirname(_0x47a9ed),{'recursive':!![]});try{await writeFile(_0x47a9ed,JSON[_0x5a45fa(0xf9)](_0x28d83d,null,0x2)+'\x0a',{'encoding':'utf8','flag':'wx'});}catch(_0x565823){if(_0x565823[_0x5a45fa(0x13b)]===_0x5a45fa(0xfa))throw menuError('menu_plan_file_exists',_0x5a45fa(0x130)+_0x47a9ed,'Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.');throw menuError(_0x5a45fa(0x148),_0x5a45fa(0x14e)+_0x47a9ed+':\x20'+errorMessage(_0x565823));}return _0x47a9ed;}export async function readMenuDeletePlan(_0x3e6724){const _0x42697d=a119_0x2e12f8,_0x6a9eef=resolvePlanPath(_0x3e6724,_0x42697d(0x14b));let _0x5d5297;try{_0x5d5297=(await stat(_0x6a9eef))[_0x42697d(0x139)];}catch(_0x288f2a){throw menuError('menu_plan_invalid','Cannot\x20read\x20menu\x20delete\x20plan\x20'+_0x6a9eef+':\x20'+errorMessage(_0x288f2a));}if(_0x5d5297>MAX_PLAN_BYTES)throw menuError('menu_plan_invalid',_0x42697d(0xf4)+_0x5d5297+_0x42697d(0x10a));let _0x49c2f0;try{_0x49c2f0=JSON[_0x42697d(0x10c)](await readFile(_0x6a9eef,_0x42697d(0x110)));}catch(_0x12211d){throw menuError(_0x42697d(0x141),_0x42697d(0x143)+errorMessage(_0x12211d));}if(!isMenuDeletePlanFile(_0x49c2f0))throw menuError(_0x42697d(0x141),_0x42697d(0x13e)+PLAN_VERSION+_0x42697d(0x14c)+PLAN_COMMAND+_0x42697d(0x102));if(!sameFingerprint(_0x49c2f0[_0x42697d(0x149)],fingerprint(_0x49c2f0[_0x42697d(0x15a)])))throw menuError(_0x42697d(0x141),'Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.',_0x42697d(0x117));if(!_0x49c2f0[_0x42697d(0x13c)][_0x42697d(0x113)]((_0x14ac4e,_0x41654d)=>sameFingerprint(_0x49c2f0[_0x42697d(0x123)][_0x41654d],fingerprint(_0x14ac4e)))||!sameFingerprint(_0x49c2f0[_0x42697d(0x149)],fingerprint(_0x49c2f0['targets'][_0x49c2f0[_0x42697d(0x13c)]['length']-0x1])))throw menuError(_0x42697d(0x141),_0x42697d(0xff),_0x42697d(0x117));return{'path':_0x6a9eef,'plan':_0x49c2f0};}export function mutationPlanFromDeleteFile(_0x178b68,_0x493121){const _0x43cb10=a119_0x2e12f8;return mutationResult({'operation':_0x43cb10(0x147),'selector':{'id':_0x178b68[_0x43cb10(0x15a)]['id'],'recursive':_0x178b68[_0x43cb10(0x121)]},'before':_0x178b68[_0x43cb10(0x15a)],'after':null,'dryRun':![],'backend':[{'method':'POST','path':_0x43cb10(0x154)}],'plannedActions':[{'stage':_0x43cb10(0x159),'method':_0x43cb10(0x134),'path':_0x43cb10(0x154),'body':{'idList':_0x178b68[_0x43cb10(0x118)]}}],'targets':_0x178b68['targets'],'deleteOrder':_0x178b68['deleteOrder'],'snapshotHash':_0x178b68['snapshotHash'],'cascade':_0x178b68[_0x43cb10(0x126)],'planFile':{'path':_0x493121,'createdAt':_0x178b68['createdAt'],'expiresAt':_0x178b68[_0x43cb10(0x109)]},'warnings':_0x178b68[_0x43cb10(0x10f)]});}export function assertMenuDeletePlanCurrent(_0x1b9f47,_0x5e2811,_0x4a910,_0x50eb45=new Date()){const _0x1499e3=a119_0x2e12f8;assertMenuDeletePlanExecutable(_0x1b9f47,_0x5e2811,_0x50eb45);if(_0x4a910[_0x1499e3(0xfc)]!==_0x1b9f47[_0x1499e3(0x116)])throw menuError(_0x1499e3(0x131),_0x1499e3(0x13d),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.');return _0x1b9f47['targets']['map']((_0x2c1f35,_0x53cdf5)=>{const _0x310d99=_0x1499e3,_0x2e324d=_0x4a910[_0x310d99(0x153)][_0x310d99(0x10d)](_0x2c1f35['id']);if(!_0x2e324d)throw menuError(_0x310d99(0x131),_0x310d99(0x101)+_0x2c1f35['id']+_0x310d99(0xef));if(!sameFingerprint(_0x1b9f47[_0x310d99(0x123)][_0x53cdf5],fingerprint(_0x2e324d)))throw menuError('menu_state_drift',_0x310d99(0x101)+_0x2c1f35['id']+_0x310d99(0x14f),'Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.');return _0x2e324d;});}export function assertMenuDeletePlanExecutable(_0x47d003,_0x51208d,_0x99f029=new Date()){const _0x2a0abe=a119_0x2e12f8;if(_0x47d003[_0x2a0abe(0x140)]!==_0x51208d)throw menuError(_0x2a0abe(0x11a),_0x2a0abe(0x112)+JSON[_0x2a0abe(0xf9)](_0x47d003[_0x2a0abe(0x140)])+_0x2a0abe(0x132)+JSON[_0x2a0abe(0xf9)](_0x51208d)+'.');const _0x8faa98=Date[_0x2a0abe(0x10c)](_0x47d003[_0x2a0abe(0x105)]),_0x1a1395=Date[_0x2a0abe(0x10c)](_0x47d003[_0x2a0abe(0x109)]);if(!Number['isFinite'](_0x8faa98)||!Number[_0x2a0abe(0x115)](_0x1a1395)||_0x1a1395-_0x8faa98!==PLAN_TTL_MS)throw menuError(_0x2a0abe(0x141),'Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.');if(_0x8faa98>_0x99f029[_0x2a0abe(0x14d)]())throw menuError(_0x2a0abe(0x141),_0x2a0abe(0x11f)+_0x47d003[_0x2a0abe(0x105)]+_0x2a0abe(0x157),_0x2a0abe(0x12a));if(_0x99f029[_0x2a0abe(0x14d)]()>_0x1a1395)throw menuError(_0x2a0abe(0x108),_0x2a0abe(0xf7)+_0x47d003[_0x2a0abe(0x109)]+'.',_0x2a0abe(0x127));}function fingerprint(_0x5227a4){const _0x215df5=a119_0x2e12f8;return{'id':_0x5227a4['id'],'parentId':_0x5227a4[_0x215df5(0x128)],'depth':_0x5227a4[_0x215df5(0xf8)],'label':_0x5227a4[_0x215df5(0x129)],'path':_0x5227a4[_0x215df5(0x11e)],'type':_0x5227a4[_0x215df5(0x156)],'visible':_0x5227a4[_0x215df5(0x151)],'sort':_0x5227a4[_0x215df5(0x11b)],'pageId':_0x5227a4[_0x215df5(0xf3)],'pageType':_0x5227a4[_0x215df5(0x103)],'modelType':_0x5227a4[_0x215df5(0x111)],'datasetId':_0x5227a4[_0x215df5(0x13f)],'datasetCode':_0x5227a4[_0x215df5(0x124)],'childrenIds':[..._0x5227a4[_0x215df5(0x133)]],'childrenCount':_0x5227a4[_0x215df5(0x10e)],'resourcesValid':_0x5227a4[_0x215df5(0x158)],'resourcesHash':hashValue(_0x5227a4['resources']),'extendHash':hashValue(_0x5227a4['extend']??null),'updateTime':_0x5227a4[_0x215df5(0x11d)]};}function hashValue(_0x599ae8){const _0x5a7a52=a119_0x2e12f8;return createHash('sha256')[_0x5a7a52(0x142)](JSON[_0x5a7a52(0xf9)](_0x599ae8))[_0x5a7a52(0x12d)](_0x5a7a52(0x135));}function sameFingerprint(_0x114350,_0x497c85){const _0x4b6e7d=a119_0x2e12f8;return JSON[_0x4b6e7d(0xf9)](_0x114350)===JSON[_0x4b6e7d(0xf9)](_0x497c85);}function resolvePlanPath(_0x553ed9,_0x369a8b){const _0x251929=a119_0x2e12f8,_0x4c95ec=_0x553ed9['trim']();if(!_0x4c95ec)throw menuError(_0x251929(0x141),'--'+_0x369a8b+_0x251929(0x104));return resolve(_0x4c95ec);}function isMenuDeletePlanFile(_0xc85d77){const _0x4bc256=a119_0x2e12f8;if(!isRecord(_0xc85d77))return![];return _0xc85d77[_0x4bc256(0x155)]===PLAN_VERSION&&_0xc85d77[_0x4bc256(0x145)]===PLAN_COMMAND&&typeof _0xc85d77[_0x4bc256(0x140)]===_0x4bc256(0x125)&&_0xc85d77[_0x4bc256(0x140)][_0x4bc256(0xfb)]>0x0&&typeof _0xc85d77['createdAt']===_0x4bc256(0x125)&&typeof _0xc85d77[_0x4bc256(0x109)]===_0x4bc256(0x125)&&typeof _0xc85d77[_0x4bc256(0x116)]===_0x4bc256(0x125)&&/^sha256:[a-f0-9]{64}$/[_0x4bc256(0x119)](_0xc85d77[_0x4bc256(0x116)])&&typeof _0xc85d77[_0x4bc256(0x121)]===_0x4bc256(0x107)&&isMenuFact(_0xc85d77['target'])&&isTargetFingerprint(_0xc85d77[_0x4bc256(0x149)])&&Array[_0x4bc256(0x11c)](_0xc85d77[_0x4bc256(0x13c)])&&_0xc85d77[_0x4bc256(0x13c)][_0x4bc256(0xfb)]>0x0&&_0xc85d77['targets'][_0x4bc256(0x113)](isMenuFact)&&Array['isArray'](_0xc85d77[_0x4bc256(0x123)])&&_0xc85d77['targetFingerprints'][_0x4bc256(0xfb)]===_0xc85d77[_0x4bc256(0x13c)]['length']&&_0xc85d77[_0x4bc256(0x123)]['every'](isTargetFingerprint)&&Array[_0x4bc256(0x11c)](_0xc85d77['deleteOrder'])&&_0xc85d77[_0x4bc256(0x118)]['length']===_0xc85d77[_0x4bc256(0x13c)][_0x4bc256(0xfb)]&&_0xc85d77[_0x4bc256(0x118)][_0x4bc256(0x113)](isPositiveInteger)&&new Set(_0xc85d77[_0x4bc256(0x118)])[_0x4bc256(0x139)]===_0xc85d77[_0x4bc256(0x118)][_0x4bc256(0xfb)]&&_0xc85d77[_0x4bc256(0x13c)][_0x4bc256(0x113)]((_0xa539d2,_0x3d556e)=>_0xa539d2['id']===_0xc85d77[_0x4bc256(0x118)][_0x3d556e])&&_0xc85d77[_0x4bc256(0x13c)][_0xc85d77[_0x4bc256(0x13c)]['length']-0x1]?.['id']===_0xc85d77[_0x4bc256(0x15a)]['id']&&isRecord(_0xc85d77[_0x4bc256(0x126)])&&Array[_0x4bc256(0x11c)](_0xc85d77['cascade'][_0x4bc256(0x137)])&&_0xc85d77[_0x4bc256(0x126)]['pages'][_0x4bc256(0x113)](isPositiveInteger)&&typeof _0xc85d77['cascade'][_0x4bc256(0xfe)]==='boolean'&&Array[_0x4bc256(0x11c)](_0xc85d77[_0x4bc256(0x10f)])&&_0xc85d77['warnings'][_0x4bc256(0x113)](_0x1c6524=>typeof _0x1c6524===_0x4bc256(0x125));}function isMenuFact(_0x356e6f){const _0x55f8c5=a119_0x2e12f8;if(!isRecord(_0x356e6f))return![];return isPositiveInteger(_0x356e6f['id'])&&(_0x356e6f[_0x55f8c5(0x128)]===null||isPositiveInteger(_0x356e6f['parentId']))&&Number[_0x55f8c5(0x146)](_0x356e6f[_0x55f8c5(0xf8)])&&_0x356e6f[_0x55f8c5(0xf8)]>=0x0&&typeof _0x356e6f[_0x55f8c5(0x129)]===_0x55f8c5(0x125)&&typeof _0x356e6f[_0x55f8c5(0x11e)]===_0x55f8c5(0x125)&&typeof _0x356e6f[_0x55f8c5(0x156)]===_0x55f8c5(0x125)&&(_0x356e6f[_0x55f8c5(0x151)]===null||typeof _0x356e6f[_0x55f8c5(0x151)]===_0x55f8c5(0x107))&&(_0x356e6f[_0x55f8c5(0x11b)]===null||Number[_0x55f8c5(0x146)](_0x356e6f[_0x55f8c5(0x11b)]))&&Array['isArray'](_0x356e6f[_0x55f8c5(0xf5)])&&_0x356e6f[_0x55f8c5(0xf5)]['every'](_0x48618a=>typeof _0x48618a===_0x55f8c5(0x125))&&typeof _0x356e6f[_0x55f8c5(0x158)]===_0x55f8c5(0x107)&&Array[_0x55f8c5(0x11c)](_0x356e6f[_0x55f8c5(0x133)])&&_0x356e6f['childrenIds'][_0x55f8c5(0x113)](isPositiveInteger)&&Number[_0x55f8c5(0x146)](_0x356e6f['childrenCount'])&&_0x356e6f[_0x55f8c5(0x10e)]>=0x0&&(_0x356e6f[_0x55f8c5(0xf3)]===null||isPositiveInteger(_0x356e6f[_0x55f8c5(0xf3)]))&&typeof _0x356e6f[_0x55f8c5(0x103)]==='string'&&typeof _0x356e6f[_0x55f8c5(0x111)]==='string'&&(_0x356e6f[_0x55f8c5(0x13f)]===null||isPositiveInteger(_0x356e6f[_0x55f8c5(0x13f)]))&&typeof _0x356e6f[_0x55f8c5(0x124)]==='string'&&(_0x356e6f['updateUserId']===null||typeof _0x356e6f['updateUserId']==='string')&&(_0x356e6f[_0x55f8c5(0x14a)]===null||typeof _0x356e6f[_0x55f8c5(0x14a)]===_0x55f8c5(0x125))&&(_0x356e6f[_0x55f8c5(0x11d)]===null||typeof _0x356e6f[_0x55f8c5(0x11d)]==='string'||typeof _0x356e6f[_0x55f8c5(0x11d)]==='number')&&(_0x356e6f[_0x55f8c5(0xfd)]===undefined||_0x356e6f[_0x55f8c5(0xfd)]===null||isRecord(_0x356e6f[_0x55f8c5(0xfd)]));}function isTargetFingerprint(_0x3d8c02){const _0x1a132d=a119_0x2e12f8;if(!isRecord(_0x3d8c02))return![];return isPositiveInteger(_0x3d8c02['id'])&&(_0x3d8c02['parentId']===null||isPositiveInteger(_0x3d8c02['parentId']))&&Number['isInteger'](_0x3d8c02[_0x1a132d(0xf8)])&&_0x3d8c02[_0x1a132d(0xf8)]>=0x0&&typeof _0x3d8c02[_0x1a132d(0x129)]==='string'&&typeof _0x3d8c02['path']===_0x1a132d(0x125)&&typeof _0x3d8c02[_0x1a132d(0x156)]==='string'&&(_0x3d8c02['visible']===null||typeof _0x3d8c02[_0x1a132d(0x151)]===_0x1a132d(0x107))&&(_0x3d8c02[_0x1a132d(0x11b)]===null||Number[_0x1a132d(0x146)](_0x3d8c02['sort']))&&(_0x3d8c02[_0x1a132d(0xf3)]===null||isPositiveInteger(_0x3d8c02['pageId']))&&typeof _0x3d8c02[_0x1a132d(0x103)]===_0x1a132d(0x125)&&typeof _0x3d8c02[_0x1a132d(0x111)]===_0x1a132d(0x125)&&(_0x3d8c02[_0x1a132d(0x13f)]===null||isPositiveInteger(_0x3d8c02[_0x1a132d(0x13f)]))&&typeof _0x3d8c02[_0x1a132d(0x124)]==='string'&&Array['isArray'](_0x3d8c02['childrenIds'])&&_0x3d8c02['childrenIds']['every'](isPositiveInteger)&&Number[_0x1a132d(0x146)](_0x3d8c02[_0x1a132d(0x10e)])&&_0x3d8c02[_0x1a132d(0x10e)]>=0x0&&typeof _0x3d8c02['resourcesValid']===_0x1a132d(0x107)&&typeof _0x3d8c02[_0x1a132d(0x12b)]===_0x1a132d(0x125)&&/^[a-f0-9]{64}$/[_0x1a132d(0x119)](_0x3d8c02[_0x1a132d(0x12b)])&&typeof _0x3d8c02[_0x1a132d(0x106)]===_0x1a132d(0x125)&&/^[a-f0-9]{64}$/['test'](_0x3d8c02[_0x1a132d(0x106)])&&(_0x3d8c02[_0x1a132d(0x11d)]===null||typeof _0x3d8c02[_0x1a132d(0x11d)]===_0x1a132d(0x125)||typeof _0x3d8c02[_0x1a132d(0x11d)]===_0x1a132d(0x10b));}function isRecord(_0xf11952){const _0x285ef=a119_0x2e12f8;return typeof _0xf11952==='object'&&_0xf11952!==null&&!Array[_0x285ef(0x11c)](_0xf11952);}function isPositiveInteger(_0x50fde0){const _0xdbc938=a119_0x2e12f8;return Number[_0xdbc938(0x144)](_0x50fde0)&&Number(_0x50fde0)>0x0;}function errorMessage(_0x2b06bd){return _0x2b06bd instanceof Error?_0x2b06bd['message']:String(_0x2b06bd);}
@@ -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(_0x5f33b3,_0x24ae78){const _0x13c235=a120_0x3424,_0x25d926=_0x5f33b3();while(!![]){try{const _0x1a7753=-parseInt(_0x13c235(0xe3))/0x1*(parseInt(_0x13c235(0xfd))/0x2)+-parseInt(_0x13c235(0xf4))/0x3*(-parseInt(_0x13c235(0xd1))/0x4)+-parseInt(_0x13c235(0xe5))/0x5+parseInt(_0x13c235(0xd7))/0x6+-parseInt(_0x13c235(0xe6))/0x7+parseInt(_0x13c235(0xfe))/0x8*(parseInt(_0x13c235(0xef))/0x9)+parseInt(_0x13c235(0xe1))/0xa;if(_0x1a7753===_0x24ae78)break;else _0x25d926['push'](_0x25d926['shift']());}catch(_0x20d911){_0x25d926['push'](_0x25d926['shift']());}}}(a120_0x18c1,0x8e486));function a120_0x18c1(){const _0x3fd9c0=['908199kOJlJG','boolean','childrenIds','valid','sha256','3858msalxh','verbose','resources','path','pageType','length','stringify','visible','hex','50KtjIzn','8RESnXj','update','digest','filter','map','3164yOqicN','parentId','isArray','sort','isFinite','modelType','5901588ALwFiV','label','url','type','updateTime','string','updateUserId','depth','number','datasetCode','6774310iQXvfx','updateUserName','11243FuRAWx','item','4098145DwNkUF','7669704FXlQIL','extend','push','datasetId','pageId','parse','children','index','resourcesValid'];a120_0x18c1=function(){return _0x3fd9c0;};return a120_0x18c1();}import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x43dd7b,_0xb30f17,_0x444f06={}){const _0x11cf00=a120_0x3424,_0x3a47b2=await getMenuTree(_0x43dd7b,_0xb30f17);return buildMenuSnapshot(Array[_0x11cf00(0xd3)](_0x3a47b2)?_0x3a47b2:[],_0x444f06);}function a120_0x3424(_0x2ac6c3,_0x154774){_0x2ac6c3=_0x2ac6c3-0xcd;const _0x18c1c6=a120_0x18c1();let _0x342496=_0x18c1c6[_0x2ac6c3];return _0x342496;}export function buildMenuSnapshot(_0x38bc4b,_0x225238={}){const _0xd620d5=a120_0x3424,_0x3204b1=flattenMenuItems(_0x38bc4b,{'verbose':_0x225238[_0xd620d5(0xf5)]===!![],'parentId':null,'depth':0x0}),_0xcf0a93=new Map(_0x3204b1[_0xd620d5(0xd0)](_0x5cd202=>[_0x5cd202['id'],_0x5cd202])),_0x4ecdef=createHash(_0xd620d5(0xf3))[_0xd620d5(0xcd)](JSON[_0xd620d5(0xfa)](_0x3204b1['map'](toHashInput)))[_0xd620d5(0xce)](_0xd620d5(0xfc));return{'total':_0x3204b1[_0xd620d5(0xf9)],'hash':'sha256:'+_0x4ecdef,'menus':_0x3204b1,'byId':_0xcf0a93};}export function toProcessedMenuItem(_0x21db7f){const _0x1bc951=a120_0x3424;return{'id':_0x21db7f['id'],'path':_0x21db7f[_0x1bc951(0xf7)],'label':_0x21db7f['label'],'resources':[..._0x21db7f['resources']],'extend':_0x21db7f[_0x1bc951(0xe7)]??null};}export function toMenuListItem(_0x1c6617){const {modelType:_0x12fbe1,datasetId:_0x199afd,datasetCode:_0x193d35,resourcesValid:_0x49d56b,..._0x28dd96}=_0x1c6617;return _0x28dd96;}export function getChildren(_0x2d7eee,_0x49dda9){const _0x3d3b2a=a120_0x3424;return _0x2d7eee['menus'][_0x3d3b2a(0xcf)](_0xd54949=>_0xd54949[_0x3d3b2a(0xd2)]===_0x49dda9);}function flattenMenuItems(_0x1b1068,_0x402617){const _0x278967=a120_0x3424,_0x15785c=sortMenuItems(_0x1b1068),_0x16b468=[];for(const _0x545f82 of _0x15785c){const _0xa32cd8=sortMenuItems(Array[_0x278967(0xd3)](_0x545f82[_0x278967(0xec)])?_0x545f82[_0x278967(0xec)]:[]);_0x16b468[_0x278967(0xe8)](toMenuFact(_0x545f82,_0xa32cd8,_0x402617)),_0xa32cd8[_0x278967(0xf9)]>0x0&&_0x16b468[_0x278967(0xe8)](...flattenMenuItems(_0xa32cd8,{'verbose':_0x402617[_0x278967(0xf5)],'parentId':_0x545f82['id'],'depth':_0x402617[_0x278967(0xde)]+0x1}));}return _0x16b468;}function sortMenuItems(_0x3d94df){const _0x5e166d=a120_0x3424;return _0x3d94df[_0x5e166d(0xd0)]((_0x4b181d,_0xcce4a3)=>({'item':_0x4b181d,'index':_0xcce4a3}))['sort']((_0x374634,_0xa0062f)=>{const _0x55cdb4=_0x5e166d,_0x366ddf=normalizeSort(_0x374634[_0x55cdb4(0xe4)]['sort']),_0xe1a3a5=normalizeSort(_0xa0062f['item'][_0x55cdb4(0xd4)]);if(_0x366ddf!==_0xe1a3a5)return _0x366ddf-_0xe1a3a5;return _0x374634[_0x55cdb4(0xed)]-_0xa0062f['index'];})[_0x5e166d(0xd0)](({item:_0x55a2d4})=>_0x55a2d4);}function toMenuFact(_0x28f8e2,_0x49b9a1,_0x5f22e3){const _0x5a5557=a120_0x3424,_0x3e9b5f=normalizeResourceValue(_0x28f8e2['extend']?.['resources']),_0x1c4038={'id':_0x28f8e2['id'],'parentId':_0x5f22e3[_0x5a5557(0xd2)],'depth':_0x5f22e3[_0x5a5557(0xde)],'label':normalizeString(_0x28f8e2['label']),'path':normalizeString(_0x28f8e2['path']),'url':normalizeString(_0x28f8e2[_0x5a5557(0xd9)]),'type':normalizeString(_0x28f8e2[_0x5a5557(0xda)]),'visible':typeof _0x28f8e2[_0x5a5557(0xfb)]===_0x5a5557(0xf0)?_0x28f8e2[_0x5a5557(0xfb)]:null,'sort':typeof _0x28f8e2[_0x5a5557(0xd4)]==='number'&&Number[_0x5a5557(0xd5)](_0x28f8e2['sort'])?_0x28f8e2['sort']:null,'resources':_0x3e9b5f['values'],'resourcesValid':_0x3e9b5f[_0x5a5557(0xf2)],'childrenIds':_0x49b9a1['map'](_0x27f0dc=>_0x27f0dc['id']),'childrenCount':_0x49b9a1[_0x5a5557(0xf9)],'pageId':normalizeNullableNumber(_0x28f8e2[_0x5a5557(0xea)]),'pageType':normalizeString(_0x28f8e2[_0x5a5557(0xf8)]),'modelType':normalizeString(_0x28f8e2['modelType']),'datasetId':normalizeNullableNumber(_0x28f8e2[_0x5a5557(0xe9)]),'datasetCode':normalizeString(_0x28f8e2[_0x5a5557(0xe0)]),'updateUserId':normalizeNullableString(_0x28f8e2['updateUserId']),'updateUserName':normalizeNullableString(_0x28f8e2['updateUserName']),'updateTime':normalizeNullableTimestamp(_0x28f8e2[_0x5a5557(0xdb)])};return _0x5f22e3[_0x5a5557(0xf5)]&&(_0x1c4038[_0x5a5557(0xe7)]=_0x28f8e2[_0x5a5557(0xe7)]??null),_0x1c4038;}function toHashInput(_0x49a3c1){const _0x32627c=a120_0x3424;return{'id':_0x49a3c1['id'],'parentId':_0x49a3c1['parentId'],'label':_0x49a3c1[_0x32627c(0xd8)],'path':_0x49a3c1[_0x32627c(0xf7)],'url':_0x49a3c1[_0x32627c(0xd9)],'type':_0x49a3c1[_0x32627c(0xda)],'visible':_0x49a3c1['visible'],'sort':_0x49a3c1[_0x32627c(0xd4)],'resources':_0x49a3c1[_0x32627c(0xf6)],'resourcesValid':_0x49a3c1[_0x32627c(0xee)],'childrenIds':_0x49a3c1[_0x32627c(0xf1)],'pageId':_0x49a3c1['pageId'],'pageType':_0x49a3c1[_0x32627c(0xf8)],'modelType':_0x49a3c1[_0x32627c(0xd6)],'datasetId':_0x49a3c1[_0x32627c(0xe9)],'datasetCode':_0x49a3c1['datasetCode'],'updateUserId':_0x49a3c1[_0x32627c(0xdd)],'updateUserName':_0x49a3c1[_0x32627c(0xe2)],'updateTime':_0x49a3c1[_0x32627c(0xdb)]};}function normalizeSort(_0x1e96c7){const _0x54d6df=a120_0x3424;return typeof _0x1e96c7===_0x54d6df(0xdf)&&Number[_0x54d6df(0xd5)](_0x1e96c7)?_0x1e96c7:Number['POSITIVE_INFINITY'];}function normalizeString(_0x2ef428){return typeof _0x2ef428==='string'?_0x2ef428:'';}function normalizeNullableNumber(_0x3e56f4){const _0x4ca1ac=a120_0x3424;return typeof _0x3e56f4===_0x4ca1ac(0xdf)&&Number[_0x4ca1ac(0xd5)](_0x3e56f4)?_0x3e56f4:null;}function normalizeNullableString(_0xed610e){return typeof _0xed610e==='string'&&_0xed610e['length']>0x0?_0xed610e:null;}function normalizeNullableTimestamp(_0x3ced69){const _0x5d25aa=a120_0x3424;if(typeof _0x3ced69==='string')return _0x3ced69[_0x5d25aa(0xf9)]>0x0?_0x3ced69:null;return typeof _0x3ced69==='number'&&Number[_0x5d25aa(0xd5)](_0x3ced69)?_0x3ced69:null;}export function normalizeResources(_0x37c06f){return normalizeResourceValue(_0x37c06f)['values'];}function normalizeResourceValue(_0x4b2fc4){const _0x5180ee=a120_0x3424;if(_0x4b2fc4==null)return{'values':[],'valid':!![]};if(Array[_0x5180ee(0xd3)](_0x4b2fc4))return{'values':_0x4b2fc4[_0x5180ee(0xd0)](String),'valid':!![]};if(typeof _0x4b2fc4!==_0x5180ee(0xdc))return{'values':[],'valid':![]};try{const _0x2114ee=JSON[_0x5180ee(0xeb)](_0x4b2fc4);return Array['isArray'](_0x2114ee)?{'values':_0x2114ee['map'](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 a121_0x3ac9(){var _0x26f08f=['1497128GzoCwv','579219KwIBHF','36fxXAls','193215FAsTBu','982SNLiKw','354xjoKLW','377gGldwf','4ypjKol','7865yejgNu','1810278ouiVxN','1762550sGpXVL','14ZKrezz'];a121_0x3ac9=function(){return _0x26f08f;};return a121_0x3ac9();}(function(_0x3b6252,_0x1c40ce){var _0x4103ec=a121_0x5240,_0x39c94f=_0x3b6252();while(!![]){try{var _0x4d48b8=-parseInt(_0x4103ec(0x151))/0x1*(-parseInt(_0x4103ec(0x14f))/0x2)+parseInt(_0x4103ec(0x158))/0x3*(-parseInt(_0x4103ec(0x152))/0x4)+-parseInt(_0x4103ec(0x153))/0x5*(parseInt(_0x4103ec(0x150))/0x6)+-parseInt(_0x4103ec(0x156))/0x7*(-parseInt(_0x4103ec(0x157))/0x8)+-parseInt(_0x4103ec(0x154))/0x9+parseInt(_0x4103ec(0x155))/0xa+parseInt(_0x4103ec(0x14e))/0xb*(-parseInt(_0x4103ec(0x159))/0xc);if(_0x4d48b8===_0x1c40ce)break;else _0x39c94f['push'](_0x39c94f['shift']());}catch(_0x27f50c){_0x39c94f['push'](_0x39c94f['shift']());}}}(a121_0x3ac9,0x2fd57));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';function a121_0x5240(_0x4dfafa,_0x39d16a){_0x4dfafa=_0x4dfafa-0x14e;var _0x3ac90a=a121_0x3ac9();var _0x52408f=_0x3ac90a[_0x4dfafa];return _0x52408f;}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(_0x4c3323,_0x4b3782){const _0x3b5427=a122_0x2243,_0x395696=_0x4c3323();while(!![]){try{const _0x3afadd=parseInt(_0x3b5427(0x12b))/0x1+parseInt(_0x3b5427(0x119))/0x2*(parseInt(_0x3b5427(0x11a))/0x3)+-parseInt(_0x3b5427(0x11d))/0x4+-parseInt(_0x3b5427(0x12c))/0x5+parseInt(_0x3b5427(0x115))/0x6*(parseInt(_0x3b5427(0x125))/0x7)+-parseInt(_0x3b5427(0x12e))/0x8+parseInt(_0x3b5427(0x114))/0x9;if(_0x3afadd===_0x4b3782)break;else _0x395696['push'](_0x395696['shift']());}catch(_0x35a3a3){_0x395696['push'](_0x395696['shift']());}}}(a122_0x4975,0x845ba));import a122_0x1be951 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x27a1e1 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a122_0x4975(){const _0x3ee19e=['error','gray','fail','green','filter','path','JS\x20URL\x20check\x20failed','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','7134894WnGOvz','12oebttz','red','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','includes','124HAGcTA','31467pHGadU','length','start','3040392ZTSpCC','isTTY','catch','name','label','stdin','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x20\x20CSS\x20URL:','721371bQDfwJ','ExitPromptError','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','cancelled','trim','CSS\x20URL\x20checked','212099SapvGb','2241495zoQixY','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','886032Heyfeu','succeed','\x20\x20Checking\x20CSS\x20URL\x20reachability...','[new]','test','\x20\x20JS\x20URL:','JS\x20URL\x20checked','has','Cancelled.'];a122_0x4975=function(){return _0x3ee19e;};return a122_0x4975();}function a122_0x2243(_0xf03da9,_0x13643a){_0xf03da9=_0xf03da9-0x105;const _0x4975e0=a122_0x4975();let _0x224360=_0x4975e0[_0xf03da9];return _0x224360;}import{CliErrors}from'../../../errors.js';function onCancel(_0x106350){const _0xc5f342=a122_0x2243;return _0x106350[_0xc5f342(0x11f)](_0x262755=>{const _0x14de7e=_0xc5f342;if(_0x262755?.[_0x14de7e(0x120)]===_0x14de7e(0x126))throw CliErrors['cancelled'](_0x14de7e(0x10a));throw _0x262755;});}export function startSpinner(_0x44d6b9){const _0x13ce7c=a122_0x2243;return a122_0x27a1e1({'text':_0x44d6b9,'color':'cyan'})[_0x13ce7c(0x11c)]();}export function stopSpinner(_0x39ea44,_0xc8b14b,_0xe38b2e){const _0x4514ed=a122_0x2243;_0xe38b2e?_0x39ea44[_0x4514ed(0x12f)](_0xc8b14b):_0x39ea44[_0x4514ed(0x10d)](_0xc8b14b);}export async function askConfirm(_0x40b658){return onCancel(confirm({'message':_0x40b658,'theme':{'prefix':''}}));}export async function askJsUrl(_0x154ea7){const _0x36533d=a122_0x2243;while(!![]){const _0x4b68f1=await onCancel(input({'message':_0x36533d(0x107),'default':_0x154ea7,'theme':{'prefix':''}}));if(_0x4b68f1[_0x36533d(0x129)]()==='')throw CliErrors[_0x36533d(0x128)](_0x36533d(0x10a));if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x4b68f1[_0x36533d(0x129)]())){console[_0x36533d(0x10b)](a122_0x1be951[_0x36533d(0x116)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x4f1fba=startSpinner(_0x36533d(0x112));try{const _0x540699=await isUrlReachable(_0x4b68f1[_0x36533d(0x129)]());stopSpinner(_0x4f1fba,_0x36533d(0x108),_0x540699);if(!_0x540699){console['error'](a122_0x1be951[_0x36533d(0x116)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x4b68f1['trim']();}catch(_0x2d6dd0){stopSpinner(_0x4f1fba,_0x36533d(0x111),![]);throw _0x2d6dd0;}}}export async function askCssUrl(_0x1b3e63){const _0xfe242a=a122_0x2243;while(!![]){const _0x2fcf12=await onCancel(input({'message':_0xfe242a(0x124),'default':_0x1b3e63,'theme':{'prefix':''}}));if(_0x2fcf12[_0xfe242a(0x129)]()==='')throw CliErrors[_0xfe242a(0x128)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0xfe242a(0x106)](_0x2fcf12[_0xfe242a(0x129)]())){console[_0xfe242a(0x10b)](a122_0x1be951[_0xfe242a(0x116)](_0xfe242a(0x123)));continue;}const _0x3df348=startSpinner(_0xfe242a(0x130));try{const _0x10f3d0=await isUrlReachable(_0x2fcf12[_0xfe242a(0x129)]());stopSpinner(_0x3df348,_0xfe242a(0x12a),_0x10f3d0);if(!_0x10f3d0){console[_0xfe242a(0x10b)](a122_0x1be951['red'](_0xfe242a(0x12d)));continue;}return _0x2fcf12[_0xfe242a(0x129)]();}catch(_0x2394a6){stopSpinner(_0x3df348,'CSS\x20URL\x20check\x20failed',![]);throw _0x2394a6;}}}export async function selectPages(_0x113fcd,_0x2f0077){const _0x367f2d=a122_0x2243,_0x218301=_0x113fcd['map'](_0x1276ae=>{const _0x26cb7f=a122_0x2243,_0x5df383=_0x2f0077[_0x26cb7f(0x109)](_0x1276ae[_0x26cb7f(0x110)]);return{'name':_0x1276ae[_0x26cb7f(0x121)]+'\x20\x20'+a122_0x1be951['gray'](_0x1276ae[_0x26cb7f(0x110)])+'\x20\x20'+(_0x5df383?a122_0x1be951[_0x26cb7f(0x10c)]('[already\x20on\x20platform]'):a122_0x1be951[_0x26cb7f(0x10e)](_0x26cb7f(0x105))),'value':_0x1276ae[_0x26cb7f(0x110)],'checked':!_0x5df383,'disabled':_0x5df383};});if(_0x218301[_0x367f2d(0x11b)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x2316d2=await onCancel(checkbox({'message':_0x367f2d(0x113),'choices':_0x218301,'loop':![],'theme':{'prefix':''}}));if(_0x2316d2[_0x367f2d(0x11b)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x113fcd[_0x367f2d(0x10f)](_0x39bb2e=>_0x2316d2[_0x367f2d(0x118)](_0x39bb2e[_0x367f2d(0x110)]));}export function isInteractive(){const _0xa2fc2d=a122_0x2243;return process[_0xa2fc2d(0x122)][_0xa2fc2d(0x11e)]===!![];}export function requireInteractive(){const _0x41d02c=a122_0x2243;if(!isInteractive())throw new Error(_0x41d02c(0x117)+_0x41d02c(0x127));}
@@ -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_0x9c5a1f=a123_0x571d;(function(_0x189b07,_0x4f6deb){const _0xb9914f=a123_0x571d,_0x674cfa=_0x189b07();while(!![]){try{const _0x5179bc=-parseInt(_0xb9914f(0x99))/0x1*(-parseInt(_0xb9914f(0x9a))/0x2)+parseInt(_0xb9914f(0x95))/0x3+parseInt(_0xb9914f(0x97))/0x4*(-parseInt(_0xb9914f(0x9c))/0x5)+-parseInt(_0xb9914f(0xa6))/0x6+-parseInt(_0xb9914f(0x96))/0x7*(-parseInt(_0xb9914f(0x8f))/0x8)+parseInt(_0xb9914f(0xa5))/0x9*(parseInt(_0xb9914f(0x91))/0xa)+parseInt(_0xb9914f(0x8c))/0xb*(parseInt(_0xb9914f(0xa3))/0xc);if(_0x5179bc===_0x4f6deb)break;else _0x674cfa['push'](_0x674cfa['shift']());}catch(_0x12e2ac){_0x674cfa['push'](_0x674cfa['shift']());}}}(a123_0x35ad,0xdcd2d));function a123_0x35ad(){const _0x298bab=['.tsx','slice','cwd','3456522fhVABF','164108HxMCZG','873328gKjvxl','endsWith','1FdYmVw','613026DssXOe','forEach','40fxzfSH','path','split','isDirectory','replace','match','join','94332KlTJBb','index.tsx','3220758iPGkDu','9210414GKAxgZ','1199rqVLOp','src/pages','replaceAll','272GJoDhE','trim','30RHqthR'];a123_0x35ad=function(){return _0x298bab;};return a123_0x35ad();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a123_0x9c5a1f(0x94)](),a123_0x9c5a1f(0x8d));export function extractTitleFromComment(_0x206364){const _0x305cbd=a123_0x9c5a1f;try{const _0x1a5ffe=readFileSync(_0x206364,'utf-8'),_0x1e3bf0=_0x1a5ffe['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1e3bf0&&_0x1e3bf0[0x1]){const _0x4dceb7=_0x1e3bf0[0x1],_0x2f7dc8=_0x4dceb7[_0x305cbd(0xa1)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2f7dc8&&_0x2f7dc8[0x1])return _0x2f7dc8[0x1][_0x305cbd(0x90)]();}let _0x8c38f=null;const _0x35f9b0=_0x1a5ffe[_0x305cbd(0xa1)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x35f9b0&&_0x35f9b0[0x1]&&(_0x8c38f=_0x35f9b0[0x1]);if(!_0x8c38f){const _0x4389ff=_0x1a5ffe[_0x305cbd(0xa1)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4389ff&&_0x4389ff[0x1]&&(_0x8c38f=_0x4389ff[0x1]);}if(_0x8c38f){const _0x5e10c4=new RegExp('\x5cb'+_0x8c38f+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x33bbed=_0x1a5ffe[_0x305cbd(0xa1)](_0x5e10c4);if(_0x33bbed&&_0x33bbed[0x1])return _0x33bbed[0x1];return _0x8c38f;}return null;}catch(_0x1c7794){return null;}}function a123_0x571d(_0x51c07e,_0x439eba){_0x51c07e=_0x51c07e-0x8c;const _0x35ada1=a123_0x35ad();let _0x571d04=_0x35ada1[_0x51c07e];return _0x571d04;}export function getLocalPages(_0x35e6b2=pagesDir,_0x3b4096=pagesDir){const _0x33832a=a123_0x9c5a1f;let _0x1f60e8=[];const _0x35c3c8=readdirSync(_0x35e6b2);return _0x35c3c8[_0x33832a(0x9b)](_0x526798=>{const _0x31e144=_0x33832a,_0x159826=join(_0x35e6b2,_0x526798),_0x443148=statSync(_0x159826);if(_0x443148&&_0x443148[_0x31e144(0x9f)]())_0x1f60e8=_0x1f60e8['concat'](getLocalPages(_0x159826,_0x3b4096));else{if(_0x526798[_0x31e144(0x98)](_0x31e144(0x92))){let _0x432b53=relative(_0x3b4096,_0x159826);_0x432b53[_0x31e144(0x98)](_0x31e144(0xa4))?_0x432b53=_0x432b53[_0x31e144(0xa0)](/index\.tsx$/,''):_0x432b53=_0x432b53[_0x31e144(0xa0)](/\.tsx$/,'');_0x432b53[_0x31e144(0x98)](sep)&&(_0x432b53=_0x432b53[_0x31e144(0x93)](0x0,-0x1));const _0x31c1f8=_0x432b53[_0x31e144(0x9e)](sep)[_0x31e144(0xa2)]('/'),_0x33af7f=extractTitleFromComment(_0x159826),_0x50dfec=_0x33af7f||_0x31c1f8;_0x1f60e8['push']({'path':_0x31c1f8[_0x31e144(0x8e)]('$',':'),'label':_0x50dfec});}}}),_0x1f60e8['filter'](_0x5b109c=>_0x5b109c[_0x33832a(0x9d)]!=='');}
@@ -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(_0x1f0f82,_0x3618bc){const _0x9560b=a124_0x58c7,_0x2dd802=_0x1f0f82();while(!![]){try{const _0x262749=-parseInt(_0x9560b(0x159))/0x1+parseInt(_0x9560b(0x15c))/0x2*(parseInt(_0x9560b(0x162))/0x3)+-parseInt(_0x9560b(0x161))/0x4*(-parseInt(_0x9560b(0x156))/0x5)+-parseInt(_0x9560b(0x154))/0x6+-parseInt(_0x9560b(0x15e))/0x7*(parseInt(_0x9560b(0x163))/0x8)+-parseInt(_0x9560b(0x164))/0x9+parseInt(_0x9560b(0x158))/0xa*(parseInt(_0x9560b(0x151))/0xb);if(_0x262749===_0x3618bc)break;else _0x2dd802['push'](_0x2dd802['shift']());}catch(_0x10b27b){_0x2dd802['push'](_0x2dd802['shift']());}}}(a124_0x4375,0x1e3fb));function a124_0x58c7(_0xc8c6a8,_0x27fee1){_0xc8c6a8=_0xc8c6a8-0x151;const _0x43754c=a124_0x4375();let _0x58c705=_0x43754c[_0xc8c6a8];return _0x58c705;}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(_0x2c541f){const _0x44b169=a124_0x58c7,_0x11a408=[];return!isValidJsHttpsUrl(_0x2c541f)&&_0x11a408[_0x44b169(0x166)](_0x44b169(0x157)),{'ok':_0x11a408[_0x44b169(0x160)]===0x0,'errors':_0x11a408};}export function validateCssUrl(_0x12c49e){const _0x20837e=a124_0x58c7,_0x467e90=[];return!isValidCssHttpsUrl(_0x12c49e)&&_0x467e90[_0x20837e(0x166)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x467e90[_0x20837e(0x160)]===0x0,'errors':_0x467e90};}export async function validateJsUrlReachable(_0x4e94b6){const _0x26800b=a124_0x58c7,_0x59db7b=validateJsUrl(_0x4e94b6);if(!_0x59db7b['ok'])return _0x59db7b;const _0x478da8=await isUrlReachable(_0x4e94b6);if(!_0x478da8)_0x59db7b[_0x26800b(0x15d)]['push'](_0x26800b(0x153));return{'ok':_0x59db7b['errors'][_0x26800b(0x160)]===0x0,'errors':_0x59db7b[_0x26800b(0x15d)]};}export async function validateCssUrlReachable(_0x5a7130){const _0x20d9f9=a124_0x58c7,_0x478d04=validateCssUrl(_0x5a7130);if(!_0x478d04['ok'])return _0x478d04;const _0x3a910d=await isUrlReachable(_0x5a7130);if(!_0x3a910d)_0x478d04[_0x20d9f9(0x15d)]['push'](_0x20d9f9(0x165));return{'ok':_0x478d04['errors'][_0x20d9f9(0x160)]===0x0,'errors':_0x478d04[_0x20d9f9(0x15d)]};}export function buildCompareRows(_0x280dd2,_0x55ba38){const _0x139853=a124_0x58c7;return _0x280dd2[_0x139853(0x155)](_0x2b388f=>({'label':_0x2b388f[_0x139853(0x15a)],'path':_0x2b388f['path'],'local':!![],'online':_0x55ba38['has'](_0x2b388f[_0x139853(0x15f)])}));}export async function doCreateMenus(_0x12b60a,_0x40cec7,_0x58e8c2,_0x1aff41){const _0x2587b5=a124_0x58c7,_0x1270fe=await createMenus(_0x12b60a,_0x40cec7,_0x58e8c2,_0x1aff41);return{'created':_0x1270fe['length'],'failed':0x0,'labels':_0x58e8c2[_0x2587b5(0x155)](_0x14d9c8=>_0x14d9c8[_0x2587b5(0x15a)]),'menus':_0x1270fe};}export function filterMenusWithResources(_0x2b60d0){const _0x246477=a124_0x58c7;return _0x2b60d0[_0x246477(0x15b)](_0xf78d52=>_0xf78d52[_0x246477(0x152)][_0x246477(0x160)]>0x0);}export async function fetchMenuData(_0x19592d,_0x46973d){const _0x302634=a124_0x58c7,_0x3ea6e7=getLocalPages(),_0x39ce7b=await getOnlineMenuList(_0x19592d,_0x46973d),_0x294610=new Set(_0x39ce7b['map'](_0x3935d9=>_0x3935d9[_0x302634(0x15f)]));return{'localPages':_0x3ea6e7,'onlineMenuList':_0x39ce7b,'onlinePaths':_0x294610};}function a124_0x4375(){const _0x5c3e76=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','4253600xOnlKD','217116fbJzrq','label','filter','1178OjOTZn','errors','742sMpUBr','path','length','4slQOgw','393DUBbFX','2008swjxNY','2108574uLpFPy','CSS\x20URL\x20is\x20unreachable','push','11bajgQX','resources','JS\x20URL\x20is\x20unreachable','448830IZdjut','map','870965XqMkIu'];a124_0x4375=function(){return _0x5c3e76;};return a124_0x4375();}export async function fetchOnlineMenuList(_0x4d58b3,_0x8d18c5){return getOnlineMenuList(_0x4d58b3,_0x8d18c5);}
@@ -0,0 +1,69 @@
1
+ import { CliError } from "../../../errors.js";
2
+ import type { CommandDefinition, DryRunResult, FlagDef, RuntimeContext } from "../../../framework/types.js";
3
+ import type { MenuFact, MenuMutationError, MenuMutationResult, MenuSnapshot } from "../../../commands/menu/shared/types.js";
4
+ export declare const MAX_MENU_SORT = 2147483647;
5
+ export declare const MENU_ID_FLAG: FlagDef;
6
+ export declare const MENU_SORT_FLAG: FlagDef;
7
+ export declare const MENU_PARENT_ID_FLAG: FlagDef;
8
+ export declare const MENU_EXPECT_PARENT_ID_FLAG: FlagDef;
9
+ export declare const MENU_EXPECT_FLAGS: FlagDef[];
10
+ export type MenuCommandContext = Parameters<NonNullable<CommandDefinition["execute"]>>[0];
11
+ export declare function validateExactId(ctx: RuntimeContext): number;
12
+ export declare function validateSort(ctx: RuntimeContext, flagName?: string): number | undefined;
13
+ export declare function nextSiblingSort(snapshot: MenuSnapshot, parentId: number | null, subject: string): number;
14
+ export declare function requireExplicitYes(ctx: RuntimeContext): void;
15
+ export declare function fetchMutationSnapshot(ctx: RuntimeContext & {
16
+ appCode: string;
17
+ cookie: string;
18
+ }, operation: string, targetId?: number): Promise<MenuSnapshot>;
19
+ export declare function recheckMutationSnapshot(ctx: RuntimeContext & {
20
+ appCode: string;
21
+ cookie: string;
22
+ }, plan: MenuMutationResult, operation: string, targetId?: number): Promise<MenuSnapshot>;
23
+ export declare function parseParentId(ctx: RuntimeContext, flagName: string, options?: {
24
+ required?: boolean;
25
+ }): number | null | undefined;
26
+ export declare function requireMenu(snapshot: MenuSnapshot, id: number): MenuFact;
27
+ export declare function requireFolder(snapshot: MenuSnapshot, id: number): MenuFact;
28
+ export declare function assertExpectedState(ctx: RuntimeContext, menu: MenuFact): void;
29
+ export declare function assertVerified(condition: boolean, message: string, hint?: string): asserts condition;
30
+ export declare function mutationResult(input: {
31
+ operation: string;
32
+ selector: Record<string, unknown>;
33
+ before: MenuMutationResult["before"];
34
+ after: MenuMutationResult["after"];
35
+ dryRun: boolean;
36
+ backend: MenuMutationResult["backend"];
37
+ plannedActions?: MenuMutationResult["plannedActions"];
38
+ targets?: MenuMutationResult["targets"];
39
+ deleteOrder?: MenuMutationResult["deleteOrder"];
40
+ snapshotHash: string;
41
+ cascade?: MenuMutationResult["cascade"];
42
+ planFile?: MenuMutationResult["planFile"];
43
+ succeeded?: Array<Record<string, unknown>>;
44
+ failed?: Array<Record<string, unknown>>;
45
+ warnings?: string[];
46
+ verification?: Record<string, unknown>;
47
+ error?: MenuMutationError;
48
+ }): MenuMutationResult;
49
+ export declare function menuDryRunResult(plan: MenuMutationResult, request: DryRunResult): DryRunResult & MenuMutationResult;
50
+ export declare function menuFailure(error: CliError, plan: MenuMutationResult, input: {
51
+ stage: string;
52
+ succeeded?: Array<Record<string, unknown>>;
53
+ failed?: Record<string, unknown>;
54
+ warnings?: string[];
55
+ verification?: Record<string, unknown>;
56
+ after?: MenuMutationResult["after"];
57
+ backend?: MenuMutationResult["backend"];
58
+ }): CliError;
59
+ export declare function asVerificationError(error: unknown, message: string): CliError;
60
+ export declare function describeMenuErrorCause(error: unknown, operation: string, targetId?: number): {
61
+ causeCode: string;
62
+ causeMessage: string;
63
+ };
64
+ export declare function hasFlag(ctx: RuntimeContext, name: string): boolean;
65
+ export declare function toApiParentId(parentId: number | null): number;
66
+ export declare function formatParent(parentId: number | null | undefined): string;
67
+ export declare function menuError(code: string, message: string, hint?: string): CliError;
68
+ export declare function mapMenuApiError(error: unknown, operation: string, targetId?: number): CliError;
69
+ export declare function isMenuResponseLoss(error: unknown): boolean;