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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
@@ -1 +1 @@
1
- function a131_0x16b4(_0x14cc6a,_0x546afa){_0x14cc6a=_0x14cc6a-0x14a;const _0x56cd6f=a131_0x56cd();let _0x16b40d=_0x56cd6f[_0x14cc6a];return _0x16b40d;}const a131_0x946bbd=a131_0x16b4;(function(_0x44c4da,_0x28d493){const _0x462d14=a131_0x16b4,_0x16868b=_0x44c4da();while(!![]){try{const _0x2b63cd=-parseInt(_0x462d14(0x16b))/0x1+parseInt(_0x462d14(0x189))/0x2*(parseInt(_0x462d14(0x18b))/0x3)+parseInt(_0x462d14(0x14b))/0x4*(parseInt(_0x462d14(0x157))/0x5)+parseInt(_0x462d14(0x158))/0x6*(-parseInt(_0x462d14(0x15d))/0x7)+-parseInt(_0x462d14(0x15e))/0x8+-parseInt(_0x462d14(0x155))/0x9*(parseInt(_0x462d14(0x16d))/0xa)+-parseInt(_0x462d14(0x14e))/0xb*(-parseInt(_0x462d14(0x183))/0xc);if(_0x2b63cd===_0x28d493)break;else _0x16868b['push'](_0x16868b['shift']());}catch(_0x4742c3){_0x16868b['push'](_0x16868b['shift']());}}}(a131_0x56cd,0x808fb));import a131_0x160f6e from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a131_0x56cd(){const _0x1df684=['\x20\x20Cancelled.','failed','created','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','string','238276YvvJrl','\x20menu(s)\x20created','127850LlKXBE','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','✓\x20Menu\x20sync\x20completed:\x20','params','Menu\x20sync\x20skipped','gray','yes','cssUrl','cyan','onlineMenuList','trim','localPages','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20created.','rawFlags','split','filter','Online\x20menu\x20list\x20fetched','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20menu(s)\x20with\x20JS:\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','7116gvCJox','\x20\x20Continue\x20with\x20creation?','targetPages','str','write','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','516658QcRRsv','jsUrl','6YtMWaG','Menu\x20creation\x20failed','boolean','cookie','POST','appCode','\x20local\x20microfrontend\x20menu(s).','skipped','\x20menu(s)','26020UpMKcz','yellow','onlinePaths','15389OBKtnf','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Menu\x20sync\x20completed:\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','selectedAppName','\x20and\x20CSS:\x20','length','207SGTaEG','appcode','345WVMfWJ','14766KMokDp','Would\x20create\x20','Fetching\x20online\x20menu\x20list...','/smartapi/menu/create','validation','448upkGam','4629504ZhYJhr','message','paths','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20\x20✓\x20Selected:\x20','\x20\x20Create\x20','\x20page(s)'];a131_0x56cd=function(){return _0x1df684;};return a131_0x56cd();}import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a131_0x946bbd(0x187),'flags':[{'name':'params','type':a131_0x946bbd(0x16a),'description':a131_0x946bbd(0x179)+a131_0x946bbd(0x17f)},{'name':'paths','type':a131_0x946bbd(0x16a),'description':a131_0x946bbd(0x181)},{'name':'yes','type':a131_0x946bbd(0x18d),'description':a131_0x946bbd(0x182)}],async 'dryRun'(_0x3764cb){const _0x4e4045=a131_0x946bbd;ensureRunnableContext(_0x3764cb[_0x4e4045(0x17b)],_0x3764cb[_0x4e4045(0x152)]);const _0x237626=await runMenuSyncCore(_0x3764cb[_0x4e4045(0x190)],_0x3764cb['cookie'],parsePaths(_0x3764cb[_0x4e4045(0x186)](_0x4e4045(0x160))),_0x3764cb[_0x4e4045(0x186)]('params'),{'dryRun':!![]});return{'method':_0x4e4045(0x18f),'url':_0x4e4045(0x15b),'body':_0x237626,'description':_0x237626[_0x4e4045(0x192)]?_0x4e4045(0x16e):_0x4e4045(0x159)+_0x237626[_0x4e4045(0x185)]['length']+_0x4e4045(0x191)};},async 'execute'(_0x9a61b8){const _0x14eb11=a131_0x946bbd;ensureRunnableContext(_0x9a61b8[_0x14eb11(0x17b)],_0x9a61b8[_0x14eb11(0x152)]);const _0x699462=_0x9a61b8['flag'](_0x14eb11(0x173)),_0x200c99=_0x9a61b8['str'](_0x14eb11(0x170)),_0x41146b=parsePaths(_0x9a61b8[_0x14eb11(0x186)](_0x14eb11(0x160))),_0xdf666=parseMenuSyncParams(_0x200c99);if(_0x699462){const _0x351384=await runMenuSyncCore(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8[_0x14eb11(0x18e)],_0x41146b,_0x200c99);if(_0x351384[_0x14eb11(0x192)]){const _0x442609=getLocalPages();_0x442609['length']===0x0?writeCliSideChannelLine(_0x14eb11(0x188)):writeCliSideChannelLine(_0x14eb11(0x14f));}else writeCliSideChannelLine(_0x14eb11(0x16f)+_0x351384[_0x14eb11(0x167)]+_0x14eb11(0x16c));return{'ok':!![],'data':_0x351384,'message':_0x351384['skipped']?_0x14eb11(0x171):_0x14eb11(0x150)+_0x351384[_0x14eb11(0x167)]+_0x14eb11(0x17a)};}if(_0x41146b[_0x14eb11(0x154)]>0x0)throw CliErrors[_0x14eb11(0x15c)](_0x14eb11(0x169),_0x14eb11(0x161));if(!isInteractive()&&_0x200c99)throw CliErrors[_0x14eb11(0x15c)](_0x14eb11(0x168),_0x14eb11(0x161));requireInteractive();const _0x58f4e0=startSpinner(_0x14eb11(0x15a));let _0x7a6a1b,_0x1a7203,_0xd2384d;try{const _0x2df237=await fetchMenuData(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8['cookie']);_0x7a6a1b=_0x2df237[_0x14eb11(0x178)],_0x1a7203=_0x2df237[_0x14eb11(0x14d)],_0xd2384d=_0x2df237[_0x14eb11(0x176)],stopSpinner(_0x58f4e0,_0x14eb11(0x17e),!![]);}catch(_0x36cb06){stopSpinner(_0x58f4e0,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x14eb11(0x15c)](_0x36cb06 instanceof Error?_0x36cb06[_0x14eb11(0x15f)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x7a6a1b[_0x14eb11(0x154)]===0x0)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x14c)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x57b761=buildCompareRows(_0x7a6a1b,_0x1a7203);writeCliSideChannelLine(renderCompareTable(_0x57b761)),writeCliSideChannelLine('');const _0x2956d1=await selectPages(_0x7a6a1b,_0x1a7203);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x175)](_0x14eb11(0x162)+_0x2956d1[_0x14eb11(0x154)]+_0x14eb11(0x164)));const _0x1cfe05=_0xdf666[_0x14eb11(0x18a)]&&_0xdf666[_0x14eb11(0x174)];if(!_0x1cfe05){writeCliSideChannelLine(renderSyncSummary(_0x2956d1,_0x1a7203['size']>0x0));const _0x5c87e8=await askConfirm(_0x14eb11(0x184));if(!_0x5c87e8)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x172)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x816f53=_0xdf666['jsUrl'],_0x4060c1=_0xdf666[_0x14eb11(0x174)];!_0x816f53&&(_0x816f53=await askJsUrl());!_0x4060c1&&(_0x4060c1=await askCssUrl());const _0x3b2b3c=await askConfirm(_0x14eb11(0x163)+_0x2956d1[_0x14eb11(0x154)]+_0x14eb11(0x180)+_0x816f53+_0x14eb11(0x153)+_0x4060c1+'?');if(!_0x3b2b3c)return writeCliSideChannelLine(a131_0x160f6e[_0x14eb11(0x172)](_0x14eb11(0x165))),{'ok':!![]};const _0x3907c7=[_0x816f53,_0x4060c1],_0x101a4c=startSpinner('Creating\x20'+_0x2956d1[_0x14eb11(0x154)]+'\x20menu(s)...');try{const _0x5e5449=await doCreateMenus(_0x9a61b8[_0x14eb11(0x190)],_0x9a61b8[_0x14eb11(0x18e)],_0x2956d1,_0x3907c7);return stopSpinner(_0x101a4c,'Created\x20'+_0x5e5449[_0x14eb11(0x167)]+_0x14eb11(0x14a),!![]),{'ok':!![],'data':_0x5e5449,'message':_0x14eb11(0x150)+_0x5e5449[_0x14eb11(0x167)]+'\x20created,\x20'+_0x5e5449[_0x14eb11(0x166)]+'\x20failed.'};}catch(_0xf97425){stopSpinner(_0x101a4c,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x14eb11(0x15c)](_0xf97425 instanceof Error?_0xf97425[_0x14eb11(0x15f)]:_0x14eb11(0x18c));}}};function ensureRunnableContext(_0x243332,_0x5936cd){const _0x1ced37=a131_0x946bbd,_0x59bdbd=_0x243332[_0x1ced37(0x156)]?String(_0x243332['appcode'])[_0x1ced37(0x177)]():'';if(!isInProject()&&!_0x5936cd&&!_0x59bdbd)throw CliErrors[_0x1ced37(0x15c)](_0x1ced37(0x151)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x2f167d){const _0x4b7fa8=a131_0x946bbd;return[...new Set(_0x2f167d[_0x4b7fa8(0x17c)](',')['map'](_0x10d8da=>_0x10d8da[_0x4b7fa8(0x177)]())[_0x4b7fa8(0x17d)](Boolean))];}
1
+ const a131_0x5e6587=a131_0x4d62;(function(_0x5a1982,_0xa60cea){const _0x5bdd32=a131_0x4d62,_0x4d0cac=_0x5a1982();while(!![]){try{const _0x4f7710=-parseInt(_0x5bdd32(0x100))/0x1*(-parseInt(_0x5bdd32(0x115))/0x2)+parseInt(_0x5bdd32(0x11c))/0x3*(parseInt(_0x5bdd32(0x116))/0x4)+-parseInt(_0x5bdd32(0x113))/0x5*(parseInt(_0x5bdd32(0xf4))/0x6)+parseInt(_0x5bdd32(0x125))/0x7*(parseInt(_0x5bdd32(0x120))/0x8)+-parseInt(_0x5bdd32(0x108))/0x9+-parseInt(_0x5bdd32(0x10f))/0xa*(-parseInt(_0x5bdd32(0x122))/0xb)+parseInt(_0x5bdd32(0x10c))/0xc*(-parseInt(_0x5bdd32(0x111))/0xd);if(_0x4f7710===_0xa60cea)break;else _0x4d0cac['push'](_0x4d0cac['shift']());}catch(_0x2e4d0b){_0x4d0cac['push'](_0x4d0cac['shift']());}}}(a131_0x856a,0x9458b));import a131_0x3e6b77 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a131_0x856a(){const _0x3f74d3=['3460008EVBXyF','Fetching\x20online\x20menu\x20list...','failed','690KkdvOG','cyan','13NfzkHX','\x20created.','24655bWicyH','filter','318tEJOcJ','4pnaSYw','/smartapi/menu/create','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20menu(s)\x20created','cookie','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','341796tFHfiK','sync','Menu\x20sync\x20skipped','Online\x20menu\x20list\x20fetched','34784RnnFlE','\x20local\x20microfrontend\x20menu(s).','19657MqbMKZ','localPages','menu','1386NwBxYb','map','yes','\x20failed.','\x20\x20Create\x20','Menu\x20sync\x20completed:\x20','Created\x20','length','✓\x20Menu\x20sync\x20completed:\x20','validation','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','created','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','cssUrl','boolean','trim','string','Failed\x20to\x20fetch\x20online\x20menu\x20list','message','size','\x20and\x20CSS:\x20','flag','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','yellow','\x20menu(s)\x20with\x20JS:\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','6uuFRTf','jsUrl','gray','Creating\x20','appcode','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','rawFlags','str','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','skipped','\x20\x20Cancelled.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','2633gpviII','\x20page(s)','onlinePaths','appCode','paths','\x20created,\x20','onlineMenuList','Pre-fill\x20JS/CSS\x20URLs.\x20','5543046iFVIxy','Menu\x20creation\x20failed','params','selectedAppName'];a131_0x856a=function(){return _0x3f74d3;};return a131_0x856a();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';function a131_0x4d62(_0x5de721,_0x50cb4c){_0x5de721=_0x5de721-0xdd;const _0x856a43=a131_0x856a();let _0x4d6241=_0x856a43[_0x5de721];return _0x4d6241;}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a131_0x5e6587(0x124),'command':a131_0x5e6587(0x11d),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a131_0x5e6587(0x10a),'type':a131_0x5e6587(0xea),'description':a131_0x5e6587(0x107)+a131_0x5e6587(0x118)},{'name':a131_0x5e6587(0x104),'type':'string','description':a131_0x5e6587(0xf9)},{'name':a131_0x5e6587(0x127),'type':a131_0x5e6587(0xe8),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x1b2663){const _0x1dd860=a131_0x5e6587;ensureRunnableContext(_0x1b2663[_0x1dd860(0xfa)],_0x1b2663['selectedAppName']);const _0x1c58ab=await runMenuSyncCore(_0x1b2663[_0x1dd860(0x103)],_0x1b2663['cookie'],parsePaths(_0x1b2663['str'](_0x1dd860(0x104))),_0x1b2663[_0x1dd860(0xfb)](_0x1dd860(0x10a)),{'dryRun':!![]});return{'method':'POST','url':_0x1dd860(0x117),'body':_0x1c58ab,'description':_0x1c58ab[_0x1dd860(0xfd)]?_0x1dd860(0xe4):'Would\x20create\x20'+_0x1c58ab['targetPages'][_0x1dd860(0xe1)]+_0x1dd860(0x121)};},async 'execute'(_0x463333){const _0x2ac0b7=a131_0x5e6587;ensureRunnableContext(_0x463333[_0x2ac0b7(0xfa)],_0x463333[_0x2ac0b7(0x10b)]);const _0x25e3a2=_0x463333[_0x2ac0b7(0xef)]('yes'),_0x18ad14=_0x463333[_0x2ac0b7(0xfb)](_0x2ac0b7(0x10a)),_0x3f3c44=parsePaths(_0x463333[_0x2ac0b7(0xfb)](_0x2ac0b7(0x104))),_0x90fea9=parseMenuSyncParams(_0x18ad14);if(_0x25e3a2){const _0x32b0e5=await runMenuSyncCore(_0x463333['appCode'],_0x463333[_0x2ac0b7(0x11a)],_0x3f3c44,_0x18ad14);if(_0x32b0e5[_0x2ac0b7(0xfd)]){const _0x33e9b1=getLocalPages();_0x33e9b1[_0x2ac0b7(0xe1)]===0x0?writeCliSideChannelLine(_0x2ac0b7(0x11b)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x2ac0b7(0xe2)+_0x32b0e5[_0x2ac0b7(0xe5)]+_0x2ac0b7(0x119));return{'ok':!![],'data':_0x32b0e5,'message':_0x32b0e5[_0x2ac0b7(0xfd)]?_0x2ac0b7(0x11e):'Menu\x20sync\x20completed:\x20'+_0x32b0e5[_0x2ac0b7(0xe5)]+_0x2ac0b7(0x112)};}if(_0x3f3c44[_0x2ac0b7(0xe1)]>0x0)throw CliErrors[_0x2ac0b7(0xe3)](_0x2ac0b7(0xf0),_0x2ac0b7(0xe6));if(!isInteractive()&&_0x18ad14)throw CliErrors[_0x2ac0b7(0xe3)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x2ac0b7(0xe6));requireInteractive();const _0x49c773=startSpinner(_0x2ac0b7(0x10d));let _0x44394b,_0x34566f,_0x3fe48d;try{const _0x138095=await fetchMenuData(_0x463333[_0x2ac0b7(0x103)],_0x463333[_0x2ac0b7(0x11a)]);_0x44394b=_0x138095[_0x2ac0b7(0x123)],_0x34566f=_0x138095[_0x2ac0b7(0x102)],_0x3fe48d=_0x138095[_0x2ac0b7(0x106)],stopSpinner(_0x49c773,_0x2ac0b7(0x11f),!![]);}catch(_0x25c06e){stopSpinner(_0x49c773,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x2ac0b7(0xe3)](_0x25c06e instanceof Error?_0x25c06e['message']:_0x2ac0b7(0xeb));}if(_0x44394b[_0x2ac0b7(0xe1)]===0x0)return writeCliSideChannelLine(a131_0x3e6b77[_0x2ac0b7(0xf1)](_0x2ac0b7(0xff))),{'ok':!![]};const _0x557c74=buildCompareRows(_0x44394b,_0x34566f);writeCliSideChannelLine(renderCompareTable(_0x557c74)),writeCliSideChannelLine('');const _0x1f82ec=await selectPages(_0x44394b,_0x34566f);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x3e6b77[_0x2ac0b7(0x110)]('\x20\x20✓\x20Selected:\x20'+_0x1f82ec['length']+_0x2ac0b7(0x101)));const _0x132ee3=_0x90fea9[_0x2ac0b7(0xf5)]&&_0x90fea9[_0x2ac0b7(0xe7)];if(!_0x132ee3){writeCliSideChannelLine(renderSyncSummary(_0x1f82ec,_0x34566f[_0x2ac0b7(0xed)]>0x0));const _0x422ba5=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x422ba5)return writeCliSideChannelLine(a131_0x3e6b77[_0x2ac0b7(0xf6)](_0x2ac0b7(0xfe))),{'ok':!![]};}let _0x1a0471=_0x90fea9[_0x2ac0b7(0xf5)],_0x576713=_0x90fea9['cssUrl'];!_0x1a0471&&(_0x1a0471=await askJsUrl());!_0x576713&&(_0x576713=await askCssUrl());const _0x2ae6f2=await askConfirm(_0x2ac0b7(0xde)+_0x1f82ec[_0x2ac0b7(0xe1)]+_0x2ac0b7(0xf2)+_0x1a0471+_0x2ac0b7(0xee)+_0x576713+'?');if(!_0x2ae6f2)return writeCliSideChannelLine(a131_0x3e6b77['gray'](_0x2ac0b7(0xfe))),{'ok':!![]};const _0x563821=[_0x1a0471,_0x576713],_0x58c38c=startSpinner(_0x2ac0b7(0xf7)+_0x1f82ec[_0x2ac0b7(0xe1)]+'\x20menu(s)...');try{const _0x49b08d=await doCreateMenus(_0x463333[_0x2ac0b7(0x103)],_0x463333[_0x2ac0b7(0x11a)],_0x1f82ec,_0x563821);return stopSpinner(_0x58c38c,_0x2ac0b7(0xe0)+_0x49b08d[_0x2ac0b7(0xe5)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x49b08d,'message':_0x2ac0b7(0xdf)+_0x49b08d['created']+_0x2ac0b7(0x105)+_0x49b08d[_0x2ac0b7(0x10e)]+_0x2ac0b7(0xdd)};}catch(_0x39fc4a){stopSpinner(_0x58c38c,_0x2ac0b7(0x109),![]);throw CliErrors[_0x2ac0b7(0xe3)](_0x39fc4a instanceof Error?_0x39fc4a[_0x2ac0b7(0xec)]:_0x2ac0b7(0x109));}}};function ensureRunnableContext(_0x1c3e47,_0x5c4b58){const _0x3a90fd=a131_0x5e6587,_0xbf5877=_0x1c3e47[_0x3a90fd(0xf8)]?String(_0x1c3e47['appcode'])[_0x3a90fd(0xe9)]():'';if(!isInProject()&&!_0x5c4b58&&!_0xbf5877)throw CliErrors[_0x3a90fd(0xe3)](_0x3a90fd(0xfc)+_0x3a90fd(0xf3));}function parsePaths(_0x34996c){const _0x5178c7=a131_0x5e6587;return[...new Set(_0x34996c['split'](',')[_0x5178c7(0x126)](_0x5c79f0=>_0x5c79f0[_0x5178c7(0xe9)]())[_0x5178c7(0x114)](Boolean))];}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationConfigList: CommandDefinition;
@@ -1 +1 @@
1
- const a132_0x41f8bc=a132_0x1360;(function(_0x485846,_0x4f9359){const _0x4ede64=a132_0x1360,_0x36e78f=_0x485846();while(!![]){try{const _0x1a1401=-parseInt(_0x4ede64(0x122))/0x1*(-parseInt(_0x4ede64(0x12e))/0x2)+-parseInt(_0x4ede64(0x127))/0x3+parseInt(_0x4ede64(0x120))/0x4*(parseInt(_0x4ede64(0x135))/0x5)+parseInt(_0x4ede64(0x134))/0x6+parseInt(_0x4ede64(0x121))/0x7+parseInt(_0x4ede64(0x132))/0x8+parseInt(_0x4ede64(0x11e))/0x9*(-parseInt(_0x4ede64(0x12c))/0xa);if(_0x1a1401===_0x4f9359)break;else _0x36e78f['push'](_0x36e78f['shift']());}catch(_0x4efad6){_0x36e78f['push'](_0x36e78f['shift']());}}}(a132_0x1977,0xcd7cc));function a132_0x1360(_0x5a2577,_0x4dd51b){_0x5a2577=_0x5a2577-0x11a;const _0x197789=a132_0x1977();let _0x1360ea=_0x197789[_0x5a2577];return _0x1360ea;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a132_0x41f8bc(0x131),a132_0x41f8bc(0x12f),'DINGTALK',a132_0x41f8bc(0x133),a132_0x41f8bc(0x124)];export const notificationConfigList={'service':'notification','command':a132_0x41f8bc(0x128),'description':a132_0x41f8bc(0x11c),'risk':a132_0x41f8bc(0x13f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a132_0x41f8bc(0x13d),'description':a132_0x41f8bc(0x137),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x41f8bc(0x131)}],async 'validate'(_0x261681){readChannelType(_0x261681);},async 'execute'(_0x655d9d){const _0x2530ad=a132_0x41f8bc,_0x14af0d=readChannelType(_0x655d9d),_0x1fb92d=await listNotificationChannelConfigs(_0x655d9d['appCode'],_0x14af0d),_0x6d0d27=_0x1fb92d[_0x2530ad(0x13b)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x655d9d[_0x2530ad(0x13a)],'channelType':_0x14af0d,'count':_0x6d0d27[_0x2530ad(0x11a)],'configs':_0x6d0d27},'message':'Found\x20'+_0x6d0d27['length']+'\x20'+_0x14af0d+_0x2530ad(0x12b)};}};function readChannelType(_0x19d818){const _0x28bbc6=a132_0x41f8bc,_0x5b669a=_0x19d818['str'](_0x28bbc6(0x140))[_0x28bbc6(0x13e)]()||_0x28bbc6(0x131);if(!NOTIFICATION_CHANNEL_TYPES[_0x28bbc6(0x11b)](_0x5b669a))throw CliErrors['validation'](_0x28bbc6(0x138)+_0x5b669a,_0x28bbc6(0x130)+NOTIFICATION_CHANNEL_TYPES[_0x28bbc6(0x12a)](',\x20')+'.');return _0x5b669a;}function projectNotificationConfig(_0x7a19e,_0x322ec7){const _0x4c358d=a132_0x41f8bc;return{'id':typeof _0x7a19e['id']===_0x4c358d(0x139)?_0x7a19e['id']:null,'configCode':requireConfigString(_0x7a19e,_0x4c358d(0x136),_0x322ec7),'configName':requireConfigString(_0x7a19e,_0x4c358d(0x11d),_0x322ec7),'channelType':requireConfigString(_0x7a19e,_0x4c358d(0x129),_0x322ec7),'description':normalizeNullableString(_0x7a19e[_0x4c358d(0x123)]),'createTime':normalizeNullableString(_0x7a19e[_0x4c358d(0x12d)]),'updateTime':normalizeNullableString(_0x7a19e[_0x4c358d(0x13c)])};}function a132_0x1977(){const _0x2ef7f4=['Allowed\x20values:\x20','EMAIL','11538872LLsvtc','WECOM','1088232QrOFUD','480fjIHMq','configCode','Notification\x20channel\x20type','Invalid\x20--type:\x20','number','appCode','map','updateTime','string','trim','read','type','length','includes','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','configName','15240303yDpPSj','Invalid\x20notification\x20config\x20response.','66892wdQQzP','4202310uupzxg','115CetpMa','description','WEBHOOK','apiError','Item\x20','624432xrlexT','config-list','channelType','join','\x20notification\x20config(s)','20dWsEmI','createTime','10558vmzimF','FEISHU'];a132_0x1977=function(){return _0x2ef7f4;};return a132_0x1977();}function requireConfigString(_0x488718,_0x66d497,_0x53f0af){const _0xc88452=a132_0x41f8bc,_0x665904=_0x488718[_0x66d497];if(typeof _0x665904!==_0xc88452(0x13d)||_0x665904[_0xc88452(0x13e)]()==='')throw CliErrors[_0xc88452(0x125)](_0xc88452(0x11f),_0xc88452(0x126)+(_0x53f0af+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x66d497+'\x22.');return _0x665904[_0xc88452(0x13e)]();}function normalizeNullableString(_0x379514){const _0x14d53e=a132_0x41f8bc;return typeof _0x379514===_0x14d53e(0x13d)?_0x379514:null;}
1
+ const a132_0xeee6c5=a132_0xfb56;(function(_0x2ce45f,_0x42f370){const _0x120e41=a132_0xfb56,_0x3845b6=_0x2ce45f();while(!![]){try{const _0x1e365d=-parseInt(_0x120e41(0x120))/0x1+-parseInt(_0x120e41(0x123))/0x2*(parseInt(_0x120e41(0x12a))/0x3)+parseInt(_0x120e41(0x131))/0x4+parseInt(_0x120e41(0x12e))/0x5+-parseInt(_0x120e41(0x127))/0x6+parseInt(_0x120e41(0x11e))/0x7*(parseInt(_0x120e41(0x13b))/0x8)+parseInt(_0x120e41(0x130))/0x9*(-parseInt(_0x120e41(0x12b))/0xa);if(_0x1e365d===_0x42f370)break;else _0x3845b6['push'](_0x3845b6['shift']());}catch(_0x5c5c56){_0x3845b6['push'](_0x3845b6['shift']());}}}(a132_0x7b6b,0x2f63c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a132_0xfb56(_0x4c7fac,_0xaf3154){_0x4c7fac=_0x4c7fac-0x11a;const _0x7b6ba7=a132_0x7b6b();let _0xfb5678=_0x7b6ba7[_0x4c7fac];return _0xfb5678;}const NOTIFICATION_CHANNEL_TYPES=[a132_0xeee6c5(0x125),a132_0xeee6c5(0x126),'DINGTALK',a132_0xeee6c5(0x11d),a132_0xeee6c5(0x12d)];function a132_0x7b6b(){const _0x300cce=['trim','notification','type','createTime','validation','updateTime','read','WECOM','709737NSpyNf','Item\x20','127495twzxgZ','map','appCode','4qjLqVt','length','EMAIL','FEISHU','17394NpsmLi','string','Notification\x20channel\x20type','411909KQjIbX','2870POjGbD','Invalid\x20--type:\x20','WEBHOOK','1038775NFfTIA','\x20is\x20missing\x20required\x20field\x20\x22','2718CaONOj','695416ncWpIc','number','Allowed\x20values:\x20','join','Found\x20','Invalid\x20notification\x20config\x20response.','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','channelType','configName','\x20notification\x20config(s)','24lSiNjh','includes'];a132_0x7b6b=function(){return _0x300cce;};return a132_0x7b6b();}export const notificationConfigList={'service':a132_0xeee6c5(0x13e),'command':'config-list','description':a132_0xeee6c5(0x137),'risk':a132_0xeee6c5(0x11c),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a132_0xeee6c5(0x13f),'type':a132_0xeee6c5(0x128),'description':a132_0xeee6c5(0x129),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0xeee6c5(0x125)}],async 'validate'(_0xc26ecd){readChannelType(_0xc26ecd);},async 'execute'(_0x533a5e){const _0x5ee544=a132_0xeee6c5,_0x393e74=readChannelType(_0x533a5e),_0x3d1979=await listNotificationChannelConfigs(_0x533a5e['appCode'],_0x393e74),_0x4ae475=_0x3d1979[_0x5ee544(0x121)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x533a5e[_0x5ee544(0x122)],'channelType':_0x393e74,'count':_0x4ae475[_0x5ee544(0x124)],'configs':_0x4ae475},'message':_0x5ee544(0x135)+_0x4ae475['length']+'\x20'+_0x393e74+_0x5ee544(0x13a)};}};function readChannelType(_0x40ef5f){const _0x3144dd=a132_0xeee6c5,_0x4efc00=_0x40ef5f['str']('type')[_0x3144dd(0x13d)]()||_0x3144dd(0x125);if(!NOTIFICATION_CHANNEL_TYPES[_0x3144dd(0x13c)](_0x4efc00))throw CliErrors[_0x3144dd(0x11a)](_0x3144dd(0x12c)+_0x4efc00,_0x3144dd(0x133)+NOTIFICATION_CHANNEL_TYPES[_0x3144dd(0x134)](',\x20')+'.');return _0x4efc00;}function projectNotificationConfig(_0x1903af,_0x557c73){const _0xaf5638=a132_0xeee6c5;return{'id':typeof _0x1903af['id']===_0xaf5638(0x132)?_0x1903af['id']:null,'configCode':requireConfigString(_0x1903af,'configCode',_0x557c73),'configName':requireConfigString(_0x1903af,_0xaf5638(0x139),_0x557c73),'channelType':requireConfigString(_0x1903af,_0xaf5638(0x138),_0x557c73),'description':normalizeNullableString(_0x1903af['description']),'createTime':normalizeNullableString(_0x1903af[_0xaf5638(0x140)]),'updateTime':normalizeNullableString(_0x1903af[_0xaf5638(0x11b)])};}function requireConfigString(_0x291aa8,_0x36824b,_0x1e72b9){const _0x56f2ea=a132_0xeee6c5,_0x4dcd4f=_0x291aa8[_0x36824b];if(typeof _0x4dcd4f!==_0x56f2ea(0x128)||_0x4dcd4f[_0x56f2ea(0x13d)]()==='')throw CliErrors['apiError'](_0x56f2ea(0x136),_0x56f2ea(0x11f)+(_0x1e72b9+0x1)+_0x56f2ea(0x12f)+_0x36824b+'\x22.');return _0x4dcd4f[_0x56f2ea(0x13d)]();}function normalizeNullableString(_0x3feee2){const _0x5576b2=a132_0xeee6c5;return typeof _0x3feee2===_0x5576b2(0x128)?_0x3feee2:null;}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- (function(_0x560f6d,_0x26f6c6){const _0x49468f=a133_0x569e,_0x513450=_0x560f6d();while(!![]){try{const _0x31d3f9=parseInt(_0x49468f(0x11c))/0x1*(-parseInt(_0x49468f(0x119))/0x2)+-parseInt(_0x49468f(0x118))/0x3*(-parseInt(_0x49468f(0x11f))/0x4)+-parseInt(_0x49468f(0x11e))/0x5+parseInt(_0x49468f(0x121))/0x6+parseInt(_0x49468f(0x11a))/0x7*(-parseInt(_0x49468f(0x11d))/0x8)+-parseInt(_0x49468f(0x11b))/0x9+parseInt(_0x49468f(0x120))/0xa;if(_0x31d3f9===_0x26f6c6)break;else _0x513450['push'](_0x513450['shift']());}catch(_0x184e3b){_0x513450['push'](_0x513450['shift']());}}}(a133_0x2a67,0x6afd7));function a133_0x569e(_0x2c407d,_0x59fa2a){_0x2c407d=_0x2c407d-0x118;const _0x2a6792=a133_0x2a67();let _0x569eaa=_0x2a6792[_0x2c407d];return _0x569eaa;}function a133_0x2a67(){const _0x3fae84=['9mKxWcY','754gONYxs','397915tSurNv','7140663ijjyHT','467NQQbXc','120pRBGYG','1826610qKHXfw','193792uBQPtk','23085260HxbvkQ','1030944cqUNGM'];a133_0x2a67=function(){return _0x3fae84;};return a133_0x2a67();}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
1
+ (function(_0xb71a18,_0x4aaefa){const _0x532bd3=a133_0x3c23,_0x7bf057=_0xb71a18();while(!![]){try{const _0x4282e6=-parseInt(_0x532bd3(0x12d))/0x1*(parseInt(_0x532bd3(0x125))/0x2)+-parseInt(_0x532bd3(0x12c))/0x3+-parseInt(_0x532bd3(0x127))/0x4+-parseInt(_0x532bd3(0x12e))/0x5+-parseInt(_0x532bd3(0x126))/0x6+parseInt(_0x532bd3(0x129))/0x7*(-parseInt(_0x532bd3(0x12a))/0x8)+parseInt(_0x532bd3(0x12b))/0x9*(parseInt(_0x532bd3(0x128))/0xa);if(_0x4282e6===_0x4aaefa)break;else _0x7bf057['push'](_0x7bf057['shift']());}catch(_0x1ee7f8){_0x7bf057['push'](_0x7bf057['shift']());}}}(a133_0x2274,0x62488));import{notificationConfigList}from'../../commands/notification/config-list.js';function a133_0x3c23(_0x3eabbc,_0x2ae0cd){_0x3eabbc=_0x3eabbc-0x125;const _0x227456=a133_0x2274();let _0x3c23b1=_0x227456[_0x3eabbc];return _0x3c23b1;}function a133_0x2274(){const _0x5a1051=['1553944EHhnow','16PHSzTY','54rqYOyO','147732AXOeBF','925LwNFia','2105070hRcVJw','898UCSobi','3322122HmVqaH','2013016DonJwH','4648460ijXhEm'];a133_0x2274=function(){return _0x5a1051;};return a133_0x2274();}export const notificationDefinitions=[notificationConfigList];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const ocrDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- const a134_0x21f53f=a134_0x167e;(function(_0x1ad04f,_0x4ed422){const _0x5dd353=a134_0x167e,_0x3cb3cd=_0x1ad04f();while(!![]){try{const _0xb7b7af=-parseInt(_0x5dd353(0x152))/0x1*(parseInt(_0x5dd353(0x167))/0x2)+parseInt(_0x5dd353(0x15b))/0x3*(parseInt(_0x5dd353(0x142))/0x4)+parseInt(_0x5dd353(0x14c))/0x5+parseInt(_0x5dd353(0x156))/0x6+parseInt(_0x5dd353(0x158))/0x7*(parseInt(_0x5dd353(0x168))/0x8)+-parseInt(_0x5dd353(0x15c))/0x9*(parseInt(_0x5dd353(0x164))/0xa)+-parseInt(_0x5dd353(0x16a))/0xb;if(_0xb7b7af===_0x4ed422)break;else _0x3cb3cd['push'](_0x3cb3cd['shift']());}catch(_0x3a42a3){_0x3cb3cd['push'](_0x3cb3cd['shift']());}}}(a134_0x184d,0x532a8));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a134_0x21f53f(0x166),a134_0x21f53f(0x13e),'form','idCard'],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a134_0x21f53f(0x14f),'form':a134_0x21f53f(0x13d),'idCard':a134_0x21f53f(0x155)},SCENE_FLAG={'name':a134_0x21f53f(0x163),'type':a134_0x21f53f(0x145),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a134_0x21f53f(0x147)},IMAGE_FILE_FLAG={'name':'image-file','type':a134_0x21f53f(0x145),'description':a134_0x21f53f(0x159)},IMAGE_URL_FLAG={'name':a134_0x21f53f(0x149),'type':a134_0x21f53f(0x145),'description':a134_0x21f53f(0x146)};function normalizeScene(_0x281073){const _0x2dbb9e=a134_0x21f53f,_0x3c40f6=_0x281073[_0x2dbb9e(0x150)]()[_0x2dbb9e(0x13a)]();if(_0x3c40f6==='idcard')return _0x2dbb9e(0x140);if(_0x3c40f6===_0x2dbb9e(0x166)||_0x3c40f6===_0x2dbb9e(0x13e)||_0x3c40f6==='form')return _0x3c40f6;throw CliErrors[_0x2dbb9e(0x16c)](_0x2dbb9e(0x13c)+_0x281073+_0x2dbb9e(0x157)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x53a6e1){const _0x28786e=a134_0x21f53f,_0x45d326=_0x53a6e1[_0x28786e(0x144)](_0x28786e(0x16e))['trim'](),_0x3142d7=_0x53a6e1[_0x28786e(0x144)]('image-url')[_0x28786e(0x150)]();return{'imageFile':_0x45d326,'imageUrl':_0x3142d7,'count':[_0x45d326,_0x3142d7]['filter'](Boolean)[_0x28786e(0x154)]};}function validateInputSelection(_0x57e373){const _0x11f59e=a134_0x21f53f,_0x4b9ad8=selectedInputs(_0x57e373);if(_0x4b9ad8[_0x11f59e(0x14a)]!==0x1)throw CliErrors[_0x11f59e(0x16c)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x4b9ad8;}function a134_0x167e(_0x233ce4,_0x8fb2b7){_0x233ce4=_0x233ce4-0x139;const _0x184d9e=a134_0x184d();let _0x167edf=_0x184d9e[_0x233ce4];return _0x167edf;}function withScene(_0x548980,_0x2655f0,_0x5b1abb){const _0x2c70b1=a134_0x21f53f;return{..._0x548980,'scene':_0x2655f0,..._0x5b1abb?{'sourceFile':{'fileName':_0x5b1abb['fileName'],'filePath':_0x5b1abb[_0x2c70b1(0x14b)]}}:{}};}const ocrRecognize={'service':a134_0x21f53f(0x15f),'command':a134_0x21f53f(0x153),'description':a134_0x21f53f(0x139),'risk':a134_0x21f53f(0x169),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3b822f){const _0x437c7e=a134_0x21f53f,_0x4ce4b4=normalizeScene(_0x3b822f[_0x437c7e(0x144)](_0x437c7e(0x163))),_0x4eef25=SCENE_TO_LEGACY_TYPE[_0x4ce4b4],_0x3ff1f0=validateInputSelection(_0x3b822f);if(_0x3ff1f0[_0x437c7e(0x148)]){const _0x55821a=new URLSearchParams({'url':_0x3ff1f0[_0x437c7e(0x148)],'type':_0x4eef25,'appCode':_0x3b822f[_0x437c7e(0x14d)]});return{'method':_0x437c7e(0x16d),'url':'/smartapi/ocr/recognize-text?'+_0x55821a[_0x437c7e(0x161)](),'description':'Preview:\x20recognize\x20'+_0x4ce4b4+_0x437c7e(0x16b)};}const _0x2a9b0f=requireDevelopmentUploadFile(_0x3ff1f0[_0x437c7e(0x13b)],_0x437c7e(0x16e));return{'method':_0x437c7e(0x141),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x437c7e(0x141),'url':_0x437c7e(0x151),'body':{'appCode':_0x3b822f[_0x437c7e(0x14d)],'multipart':{'file':_0x2a9b0f}}},{'method':_0x437c7e(0x141),'url':_0x437c7e(0x165),'body':{'filePath':_0x437c7e(0x15d),'downloadFlag':![]}},{'method':'GET','url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x3b822f['appCode'],'url':_0x437c7e(0x143),'type':_0x4eef25}}]},'description':_0x437c7e(0x15e)+_0x4ce4b4+_0x437c7e(0x162)};},async 'execute'(_0x10f80f){const _0x5e0ad2=a134_0x21f53f,_0x10cff9=normalizeScene(_0x10f80f[_0x5e0ad2(0x144)](_0x5e0ad2(0x163))),_0x714faf=SCENE_TO_LEGACY_TYPE[_0x10cff9],_0x58a3b7=validateInputSelection(_0x10f80f);if(_0x58a3b7['imageUrl']){const _0x394ec6=await recognizeDevelopmentOcr(_0x10f80f['appCode'],{'url':_0x58a3b7[_0x5e0ad2(0x148)],'type':_0x714faf});return{'ok':!![],'data':withScene(_0x394ec6,_0x10cff9)};}const _0x56d3d6=requireDevelopmentUploadFile(_0x58a3b7['imageFile'],_0x5e0ad2(0x16e)),_0x2f53b5=await uploadDevelopmentFile(_0x10f80f[_0x5e0ad2(0x14d)],_0x56d3d6[_0x5e0ad2(0x13f)]);if(!_0x2f53b5[_0x5e0ad2(0x14b)])throw CliErrors[_0x5e0ad2(0x14e)]('File\x20upload\x20response\x20missing\x20filePath.');const _0xd8e7ee=await queryDevelopmentFileUrl(_0x2f53b5['filePath'],{'download':![]});if(!_0xd8e7ee[_0x5e0ad2(0x160)])throw CliErrors[_0x5e0ad2(0x14e)](_0x5e0ad2(0x15a));const _0x3019bb=await recognizeDevelopmentOcr(_0x10f80f[_0x5e0ad2(0x14d)],{'url':_0xd8e7ee['fileUrl'],'type':_0x714faf});return{'ok':!![],'data':withScene(_0x3019bb,_0x10cff9,_0x2f53b5)};}};function a134_0x184d(){const _0x2c6bdb=['toLowerCase','imageFile','Unsupported\x20OCR\x20scene:\x20','Table','general','path','idCard','POST','84kHvNjg','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','str','string','Publicly\x20accessible\x20image\x20or\x20file\x20URL','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','imageUrl','image-url','count','filePath','1610455aVrBJT','appCode','apiError','General','trim','/smartapi/common/uploadFile','121609rTujxE','recognize','length','IdCard','801282TuWEMz','.\x20Supported\x20scenes:\x20','981127lPSave','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','File\x20URL\x20response\x20missing\x20fileUrl.','30045pRXqSQ','9IFuKxS','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','ocr','fileUrl','toString','\x20OCR','scene','2343910zUjxuP','/smartapi/common/queryFileUrl','invoice','8cZjpYt','24gUYSpV','read','274571uhLlNp','\x20OCR\x20from\x20URL','validation','GET','image-file','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字'];a134_0x184d=function(){return _0x2c6bdb;};return a134_0x184d();}export const ocrDefinitions=[ocrRecognize];
1
+ function a134_0x2b3e(_0x4a9afe,_0xc6afed){_0x4a9afe=_0x4a9afe-0x98;const _0x4f137f=a134_0x4f13();let _0x2b3e74=_0x4f137f[_0x4a9afe];return _0x2b3e74;}const a134_0x2fc6c6=a134_0x2b3e;(function(_0x52b3c0,_0x76d2ff){const _0x1e00f6=a134_0x2b3e,_0x2d612a=_0x52b3c0();while(!![]){try{const _0xb385c=-parseInt(_0x1e00f6(0xc8))/0x1+parseInt(_0x1e00f6(0xa4))/0x2+-parseInt(_0x1e00f6(0xb7))/0x3+parseInt(_0x1e00f6(0xa3))/0x4+parseInt(_0x1e00f6(0xba))/0x5*(-parseInt(_0x1e00f6(0xa9))/0x6)+-parseInt(_0x1e00f6(0xb3))/0x7+parseInt(_0x1e00f6(0xbe))/0x8*(parseInt(_0x1e00f6(0xab))/0x9);if(_0xb385c===_0x76d2ff)break;else _0x2d612a['push'](_0x2d612a['shift']());}catch(_0x41e3df){_0x2d612a['push'](_0x2d612a['shift']());}}}(a134_0x4f13,0x4f13a));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a134_0x4f13(){const _0x54654c=['Invoice','955tgJOvp','apiError','recognize','length','4020208AqYnvs','POST','File\x20URL\x20response\x20missing\x20fileUrl.','/smartapi/common/uploadFile','imageUrl','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','scene','.\x20Supported\x20scenes:\x20','File\x20upload\x20response\x20missing\x20filePath.','fileName','432807LESVxY','validation','IdCard','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','idcard','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','string','str','image-url','imageFile','general','trim','\x20OCR\x20from\x20URL','toLowerCase','form','path','1742272NfRpOV','906652HKOnqD','/smartapi/common/queryFileUrl','GET','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Publicly\x20accessible\x20image\x20or\x20file\x20URL','60mUyAfI','invoice','9YjLIoD','Table','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','idCard','image-file','filePath','fileUrl','appCode','1232630CURJxK','/smartapi/ocr/recognize-text?','ocr','Unsupported\x20OCR\x20scene:\x20','1370145FagAAQ','filter'];a134_0x4f13=function(){return _0x54654c;};return a134_0x4f13();}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice','general',a134_0x2fc6c6(0xa1),a134_0x2fc6c6(0xae)],SCENE_TO_LEGACY_TYPE={'invoice':a134_0x2fc6c6(0xb9),'general':'General','form':a134_0x2fc6c6(0xac),'idCard':a134_0x2fc6c6(0xca)},SCENE_FLAG={'name':a134_0x2fc6c6(0xc4),'type':a134_0x2fc6c6(0x99),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a134_0x2fc6c6(0xcb)},IMAGE_FILE_FLAG={'name':'image-file','type':a134_0x2fc6c6(0x99),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':a134_0x2fc6c6(0xa8)};function normalizeScene(_0x2c5575){const _0x2ea936=a134_0x2fc6c6,_0x3bacef=_0x2c5575['trim']()[_0x2ea936(0xa0)]();if(_0x3bacef===_0x2ea936(0xcc))return _0x2ea936(0xae);if(_0x3bacef===_0x2ea936(0xaa)||_0x3bacef===_0x2ea936(0x9d)||_0x3bacef==='form')return _0x3bacef;throw CliErrors['validation'](_0x2ea936(0xb6)+_0x2c5575+_0x2ea936(0xc5)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x3700d2){const _0x3f0a23=a134_0x2fc6c6,_0x1ed93b=_0x3700d2['str'](_0x3f0a23(0xaf))['trim'](),_0x2f2ff9=_0x3700d2['str'](_0x3f0a23(0x9b))[_0x3f0a23(0x9e)]();return{'imageFile':_0x1ed93b,'imageUrl':_0x2f2ff9,'count':[_0x1ed93b,_0x2f2ff9][_0x3f0a23(0xb8)](Boolean)[_0x3f0a23(0xbd)]};}function validateInputSelection(_0x134ef6){const _0xfbeecd=a134_0x2fc6c6,_0x25fa1c=selectedInputs(_0x134ef6);if(_0x25fa1c['count']!==0x1)throw CliErrors[_0xfbeecd(0xc9)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x25fa1c;}function withScene(_0x22901d,_0x147473,_0xced3a0){const _0xd143a7=a134_0x2fc6c6;return{..._0x22901d,'scene':_0x147473,..._0xced3a0?{'sourceFile':{'fileName':_0xced3a0[_0xd143a7(0xc7)],'filePath':_0xced3a0[_0xd143a7(0xb0)]}}:{}};}const ocrRecognize={'service':a134_0x2fc6c6(0xb5),'command':a134_0x2fc6c6(0xbc),'description':a134_0x2fc6c6(0x98),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5015e0){const _0x3ac106=a134_0x2fc6c6,_0x4a2502=normalizeScene(_0x5015e0[_0x3ac106(0x9a)](_0x3ac106(0xc4))),_0x258d99=SCENE_TO_LEGACY_TYPE[_0x4a2502],_0x50a17f=validateInputSelection(_0x5015e0);if(_0x50a17f[_0x3ac106(0xc2)]){const _0x242071=new URLSearchParams({'url':_0x50a17f['imageUrl'],'type':_0x258d99,'appCode':_0x5015e0[_0x3ac106(0xb2)]});return{'method':'GET','url':_0x3ac106(0xb4)+_0x242071['toString'](),'description':'Preview:\x20recognize\x20'+_0x4a2502+_0x3ac106(0x9f)};}const _0x26892f=requireDevelopmentUploadFile(_0x50a17f[_0x3ac106(0x9c)],_0x3ac106(0xaf));return{'method':_0x3ac106(0xbf),'url':_0x3ac106(0xc1),'body':{'steps':[{'method':_0x3ac106(0xbf),'url':_0x3ac106(0xc1),'body':{'appCode':_0x5015e0[_0x3ac106(0xb2)],'multipart':{'file':_0x26892f}}},{'method':_0x3ac106(0xbf),'url':_0x3ac106(0xa5),'body':{'filePath':_0x3ac106(0xad),'downloadFlag':![]}},{'method':_0x3ac106(0xa6),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x5015e0[_0x3ac106(0xb2)],'url':_0x3ac106(0xa7),'type':_0x258d99}}]},'description':_0x3ac106(0xc3)+_0x4a2502+'\x20OCR'};},async 'execute'(_0x5e319c){const _0x22a128=a134_0x2fc6c6,_0x36aec4=normalizeScene(_0x5e319c['str'](_0x22a128(0xc4))),_0x23eae7=SCENE_TO_LEGACY_TYPE[_0x36aec4],_0x30feae=validateInputSelection(_0x5e319c);if(_0x30feae[_0x22a128(0xc2)]){const _0x555708=await recognizeDevelopmentOcr(_0x5e319c['appCode'],{'url':_0x30feae[_0x22a128(0xc2)],'type':_0x23eae7});return{'ok':!![],'data':withScene(_0x555708,_0x36aec4)};}const _0x5bbae9=requireDevelopmentUploadFile(_0x30feae[_0x22a128(0x9c)],_0x22a128(0xaf)),_0x479a82=await uploadDevelopmentFile(_0x5e319c[_0x22a128(0xb2)],_0x5bbae9[_0x22a128(0xa2)]);if(!_0x479a82['filePath'])throw CliErrors['apiError'](_0x22a128(0xc6));const _0x4b3276=await queryDevelopmentFileUrl(_0x479a82['filePath'],{'download':![]});if(!_0x4b3276['fileUrl'])throw CliErrors[_0x22a128(0xbb)](_0x22a128(0xc0));const _0x5adbe8=await recognizeDevelopmentOcr(_0x5e319c[_0x22a128(0xb2)],{'url':_0x4b3276[_0x22a128(0xb1)],'type':_0x23eae7});return{'ok':!![],'data':withScene(_0x5adbe8,_0x36aec4,_0x479a82)};}};export const ocrDefinitions=[ocrRecognize];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const pageGenerateStart: CommandDefinition;
@@ -1 +1 @@
1
- const a135_0x1f6b11=a135_0x2cf8;(function(_0x3d5a72,_0x3dbc2b){const _0xf1895f=a135_0x2cf8,_0x3d059f=_0x3d5a72();while(!![]){try{const _0x8ba6c=-parseInt(_0xf1895f(0x1b8))/0x1*(parseInt(_0xf1895f(0x1cf))/0x2)+parseInt(_0xf1895f(0x1b3))/0x3+-parseInt(_0xf1895f(0x1d2))/0x4*(parseInt(_0xf1895f(0x1c8))/0x5)+-parseInt(_0xf1895f(0x1b4))/0x6+parseInt(_0xf1895f(0x1c9))/0x7+-parseInt(_0xf1895f(0x1cc))/0x8*(parseInt(_0xf1895f(0x1b0))/0x9)+parseInt(_0xf1895f(0x1ac))/0xa*(parseInt(_0xf1895f(0x1c4))/0xb);if(_0x8ba6c===_0x3dbc2b)break;else _0x3d059f['push'](_0x3d059f['shift']());}catch(_0x1895f3){_0x3d059f['push'](_0x3d059f['shift']());}}}(a135_0x22f6,0x7b45b));function a135_0x22f6(){const _0x4de8a1=['string','message','operationId','write','dryRun','POST','apply','compress','dataset','bool','11XHNEBd','generate-start','/generate-standard-pages/start','progressRate','10yFXLwx','1362067kusZhp','currentStep','alias','16NRbona','name','status','8llmtDE','reused','已提交生成任务','256600kphFvd','source','number','manualResolutionRequired','related-pages-fallback','clientOperationId','code','19126820oWzWhn','nextAction','PARTIAL_SUCCESS','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','1941552tbkPZC','precheck','allowGenerate','2183337ECllGe','5228370XsTRvQ','appCode','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','224742kAXnyR','standardPageStatus'];a135_0x22f6=function(){return _0x4de8a1;};return a135_0x22f6();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a135_0x2cf8(_0x105217,_0x2bf15e){_0x105217=_0x105217-0x1ab;const _0x22f621=a135_0x22f6();let _0x2cf84f=_0x22f621[_0x105217];return _0x2cf84f;}import{assessGenerateOperationState,assessStandardPageState,buildPageGenerateOperationStatusQueryCommand,buildStandardPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateStandardPages}from'../../core/api-client.js';export const pageGenerateStart={'service':'page','command':a135_0x1f6b11(0x1c5),'description':a135_0x1f6b11(0x1af),'risk':a135_0x1f6b11(0x1bd),'defaultOutputFormat':a135_0x1f6b11(0x1c1),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a135_0x1f6b11(0x1cb),'type':a135_0x1f6b11(0x1ba),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'apply','type':'boolean','description':a135_0x1f6b11(0x1b7)}],async 'validate'(_0x3f9268){validateDatasetSelector(_0x3f9268);},async 'dryRun'(_0x1d0367){const _0x2ec2a3=a135_0x1f6b11,_0x33110e=await prepare(_0x1d0367);return{'method':_0x2ec2a3(0x1bf),'url':'/smartapi/lovrabet/dataset/'+_0x33110e[_0x2ec2a3(0x1c2)][_0x2ec2a3(0x1ab)]+_0x2ec2a3(0x1c6),'body':{'appCode':_0x1d0367[_0x2ec2a3(0x1b5)],'clientOperationId':_0x33110e[_0x2ec2a3(0x1d7)]},'description':serializeDryRunDescription({'dataset':{'id':_0x33110e[_0x2ec2a3(0x1c2)]['id'],'code':_0x33110e['dataset'][_0x2ec2a3(0x1ab)],'name':_0x33110e['dataset'][_0x2ec2a3(0x1cd)],'fieldCount':_0x33110e['dataset']['fieldCount']},'precheckSource':_0x33110e[_0x2ec2a3(0x1b9)]?.[_0x2ec2a3(0x1d3)]??_0x2ec2a3(0x1d6),'action':_0x2ec2a3(0x1c5),'clientOperationId':_0x33110e['clientOperationId'],'plannedStatus':_0x33110e[_0x2ec2a3(0x1b1)][_0x2ec2a3(0x1ce)],'reason':_0x33110e[_0x2ec2a3(0x1b1)][_0x2ec2a3(0x1bb)]})};},async 'execute'(_0x44aba2){const _0xae6c9e=a135_0x1f6b11;if(!_0x44aba2[_0xae6c9e(0x1c3)](_0xae6c9e(0x1c0))){const _0x399eec=await pageGenerateStart[_0xae6c9e(0x1be)](_0x44aba2);return{'ok':!![],'message':_0xae6c9e(0x1b6),'data':_0x399eec};}const _0x307efa=await prepare(_0x44aba2);if(!_0x307efa[_0xae6c9e(0x1b1)][_0xae6c9e(0x1b2)])return{'ok':![],'message':_0x307efa['precheck'][_0xae6c9e(0x1bb)],'data':{'datasetCode':_0x307efa['dataset'][_0xae6c9e(0x1ab)],'clientOperationId':_0x307efa[_0xae6c9e(0x1d7)],'precheckSource':_0x307efa[_0xae6c9e(0x1b9)]?.[_0xae6c9e(0x1d3)]??_0xae6c9e(0x1d6),'status':_0x307efa['precheck'][_0xae6c9e(0x1ce)],'manualResolutionRequired':_0x307efa[_0xae6c9e(0x1b1)][_0xae6c9e(0x1d5)],'nextAction':_0x307efa[_0xae6c9e(0x1b1)][_0xae6c9e(0x1ad)],'query':{'command':buildStandardPageStatusQueryCommand(_0x307efa[_0xae6c9e(0x1c2)][_0xae6c9e(0x1ab)],_0x44aba2[_0xae6c9e(0x1b5)])},'standardPageStatus':_0x307efa[_0xae6c9e(0x1b9)]}};const _0x2ff158=await startGenerateStandardPages(_0x44aba2[_0xae6c9e(0x1b5)],_0x307efa[_0xae6c9e(0x1c2)][_0xae6c9e(0x1ab)],{'clientOperationId':_0x307efa['clientOperationId']}),_0x5280da=_0x2ff158['status']==='SUCCESS'||_0x2ff158[_0xae6c9e(0x1ce)]===_0xae6c9e(0x1ae)?await loadStandardPageStatusForGenerate(_0x44aba2,_0x307efa[_0xae6c9e(0x1c2)][_0xae6c9e(0x1ab)]):null,_0x49387e=assessGenerateOperationState(_0x307efa['dataset'][_0xae6c9e(0x1ab)],_0x2ff158['status'],_0x5280da);return{'ok':!![],'message':_0x2ff158[_0xae6c9e(0x1d0)]?'复用已有生成任务':_0xae6c9e(0x1d1),'data':{'datasetCode':_0x307efa[_0xae6c9e(0x1c2)][_0xae6c9e(0x1ab)],'appCode':_0x44aba2['appCode'],'operationId':_0x2ff158['operationId']??null,'clientOperationId':_0x307efa[_0xae6c9e(0x1d7)],'jobStatus':_0x2ff158[_0xae6c9e(0x1ce)]??null,'progressRate':typeof _0x2ff158[_0xae6c9e(0x1c7)]===_0xae6c9e(0x1d4)?_0x2ff158[_0xae6c9e(0x1c7)]:null,'currentStep':_0x2ff158[_0xae6c9e(0x1ca)]??null,'reused':_0x2ff158[_0xae6c9e(0x1d0)]===!![],'status':_0x49387e[_0xae6c9e(0x1ce)],'manualResolutionRequired':_0x49387e[_0xae6c9e(0x1d5)],'nextAction':_0x49387e['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x307efa[_0xae6c9e(0x1c2)][_0xae6c9e(0x1ab)],{'appCode':_0x44aba2['appCode'],'operationId':_0x2ff158[_0xae6c9e(0x1bc)],'clientOperationId':_0x307efa['clientOperationId']})},'standardPageStatus':_0x5280da}};}};async function prepare(_0x5c0185){const _0x5dd7ac=a135_0x1f6b11,_0x3136fd=await loadDatasetDetailForPage(_0x5c0185),_0x362d58=await loadStandardPageStatusForGenerate(_0x5c0185,_0x3136fd[_0x5dd7ac(0x1ab)]),_0x32c08d=getUndeletedRelatedPages(_0x3136fd);return{'dataset':_0x3136fd,'standardPageStatus':_0x362d58,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x3136fd[_0x5dd7ac(0x1ab)],_0x362d58,{'fallbackUndeletedPages':_0x32c08d})};}
1
+ const a135_0x373dc6=a135_0x5303;(function(_0x4e3aea,_0x360cf7){const _0x28c518=a135_0x5303,_0x4aac2c=_0x4e3aea();while(!![]){try{const _0x4778f6=-parseInt(_0x28c518(0x152))/0x1+-parseInt(_0x28c518(0x144))/0x2*(-parseInt(_0x28c518(0x141))/0x3)+-parseInt(_0x28c518(0x140))/0x4+parseInt(_0x28c518(0x136))/0x5+-parseInt(_0x28c518(0x13f))/0x6+-parseInt(_0x28c518(0x12c))/0x7+-parseInt(_0x28c518(0x130))/0x8*(-parseInt(_0x28c518(0x14b))/0x9);if(_0x4778f6===_0x360cf7)break;else _0x4aac2c['push'](_0x4aac2c['shift']());}catch(_0x1e122c){_0x4aac2c['push'](_0x4aac2c['shift']());}}}(a135_0x31c2,0x2ba75));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a135_0x5303(_0x5a9792,_0x26831c){_0x5a9792=_0x5a9792-0x127;const _0x31c2dc=a135_0x31c2();let _0x5303a4=_0x31c2dc[_0x5a9792];return _0x5303a4;}function a135_0x31c2(){const _0x52b76d=['2vkbppA','message','code','/generate-standard-pages/start','compress','currentStep','dataset','18ltfzly','boolean','page','generate-start','write','manualResolutionRequired','fieldCount','44963hteHak','复用已有生成任务','number','apply','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','precheck','nextAction','516026yfhgkn','已提交生成任务','operationId','alias','1340992gbSMGD','dryRun','appCode','POST','progressRate','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','809710DiYQfo','string','status','allowGenerate','standardPageStatus','related-pages-fallback','source','clientOperationId','reused','1083144xoFCgp','898764RsTvVz','616533sLiAHj','bool','name'];a135_0x31c2=function(){return _0x52b76d;};return a135_0x31c2();}import{assessGenerateOperationState,assessStandardPageState,buildPageGenerateOperationStatusQueryCommand,buildStandardPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateStandardPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a135_0x373dc6(0x14d),'command':a135_0x373dc6(0x14e),'description':'Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a135_0x373dc6(0x14f),'defaultOutputFormat':a135_0x373dc6(0x148),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a135_0x373dc6(0x12f),'type':a135_0x373dc6(0x137),'description':a135_0x373dc6(0x135)},{'name':a135_0x373dc6(0x128),'type':a135_0x373dc6(0x14c),'description':a135_0x373dc6(0x129)}],async 'validate'(_0x460cdf){validateDatasetSelector(_0x460cdf);},async 'dryRun'(_0x5f160c){const _0xf8bfe6=a135_0x373dc6,_0x4b8d81=await prepare(_0x5f160c);return{'method':_0xf8bfe6(0x133),'url':'/smartapi/lovrabet/dataset/'+_0x4b8d81[_0xf8bfe6(0x14a)]['code']+_0xf8bfe6(0x147),'body':{'appCode':_0x5f160c[_0xf8bfe6(0x132)],'clientOperationId':_0x4b8d81[_0xf8bfe6(0x13d)]},'description':serializeDryRunDescription({'dataset':{'id':_0x4b8d81[_0xf8bfe6(0x14a)]['id'],'code':_0x4b8d81['dataset']['code'],'name':_0x4b8d81[_0xf8bfe6(0x14a)][_0xf8bfe6(0x143)],'fieldCount':_0x4b8d81['dataset'][_0xf8bfe6(0x151)]},'precheckSource':_0x4b8d81[_0xf8bfe6(0x13a)]?.[_0xf8bfe6(0x13c)]??'related-pages-fallback','action':'generate-start','clientOperationId':_0x4b8d81[_0xf8bfe6(0x13d)],'plannedStatus':_0x4b8d81['precheck'][_0xf8bfe6(0x138)],'reason':_0x4b8d81['precheck'][_0xf8bfe6(0x145)]})};},async 'execute'(_0x1ae8b0){const _0x41e07d=a135_0x373dc6;if(!_0x1ae8b0[_0x41e07d(0x142)](_0x41e07d(0x128))){const _0x363314=await pageGenerateStart[_0x41e07d(0x131)](_0x1ae8b0);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x363314};}const _0x41a68e=await prepare(_0x1ae8b0);if(!_0x41a68e[_0x41e07d(0x12a)][_0x41e07d(0x139)])return{'ok':![],'message':_0x41a68e[_0x41e07d(0x12a)][_0x41e07d(0x145)],'data':{'datasetCode':_0x41a68e[_0x41e07d(0x14a)][_0x41e07d(0x146)],'clientOperationId':_0x41a68e['clientOperationId'],'precheckSource':_0x41a68e[_0x41e07d(0x13a)]?.[_0x41e07d(0x13c)]??_0x41e07d(0x13b),'status':_0x41a68e[_0x41e07d(0x12a)][_0x41e07d(0x138)],'manualResolutionRequired':_0x41a68e[_0x41e07d(0x12a)][_0x41e07d(0x150)],'nextAction':_0x41a68e[_0x41e07d(0x12a)][_0x41e07d(0x12b)],'query':{'command':buildStandardPageStatusQueryCommand(_0x41a68e[_0x41e07d(0x14a)][_0x41e07d(0x146)],_0x1ae8b0[_0x41e07d(0x132)])},'standardPageStatus':_0x41a68e[_0x41e07d(0x13a)]}};const _0x22244a=await startGenerateStandardPages(_0x1ae8b0[_0x41e07d(0x132)],_0x41a68e[_0x41e07d(0x14a)]['code'],{'clientOperationId':_0x41a68e['clientOperationId']}),_0x734638=_0x22244a['status']==='SUCCESS'||_0x22244a[_0x41e07d(0x138)]==='PARTIAL_SUCCESS'?await loadStandardPageStatusForGenerate(_0x1ae8b0,_0x41a68e[_0x41e07d(0x14a)][_0x41e07d(0x146)]):null,_0xb37380=assessGenerateOperationState(_0x41a68e[_0x41e07d(0x14a)][_0x41e07d(0x146)],_0x22244a['status'],_0x734638);return{'ok':!![],'message':_0x22244a[_0x41e07d(0x13e)]?_0x41e07d(0x153):_0x41e07d(0x12d),'data':{'datasetCode':_0x41a68e['dataset'][_0x41e07d(0x146)],'appCode':_0x1ae8b0['appCode'],'operationId':_0x22244a['operationId']??null,'clientOperationId':_0x41a68e[_0x41e07d(0x13d)],'jobStatus':_0x22244a[_0x41e07d(0x138)]??null,'progressRate':typeof _0x22244a[_0x41e07d(0x134)]===_0x41e07d(0x127)?_0x22244a[_0x41e07d(0x134)]:null,'currentStep':_0x22244a[_0x41e07d(0x149)]??null,'reused':_0x22244a[_0x41e07d(0x13e)]===!![],'status':_0xb37380[_0x41e07d(0x138)],'manualResolutionRequired':_0xb37380[_0x41e07d(0x150)],'nextAction':_0xb37380[_0x41e07d(0x12b)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x41a68e[_0x41e07d(0x14a)][_0x41e07d(0x146)],{'appCode':_0x1ae8b0[_0x41e07d(0x132)],'operationId':_0x22244a[_0x41e07d(0x12e)],'clientOperationId':_0x41a68e['clientOperationId']})},'standardPageStatus':_0x734638}};}};async function prepare(_0x34f231){const _0x1df12e=await loadDatasetDetailForPage(_0x34f231),_0x554f4f=await loadStandardPageStatusForGenerate(_0x34f231,_0x1df12e['code']),_0x575156=getUndeletedRelatedPages(_0x1df12e);return{'dataset':_0x1df12e,'standardPageStatus':_0x554f4f,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x1df12e['code'],_0x554f4f,{'fallbackUndeletedPages':_0x575156})};}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const pageGenerateStatus: CommandDefinition;
@@ -1 +1 @@
1
- function a136_0x40f9(_0x3c11e9,_0x24b482){_0x3c11e9=_0x3c11e9-0x19b;const _0xc8f2ef=a136_0xc8f2();let _0x40f983=_0xc8f2ef[_0x3c11e9];return _0x40f983;}function a136_0xc8f2(){const _0x4527b0=['currentStep','operation-id','message','appCode','status','read','7368BlShAK','3542262FurzmU','errorMsg','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','SUCCESS','858WlXWxT','result','GET','operation_failed','alias','operationId','page','nextAction','14379480WPFJxD','915874bURzjK','progressRate','client-operation-id','toString','compress','code','5319904nnHzpc','str','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','set','number','6348015hKRNSp','7GHDHxe','manualResolutionRequired','PARTIAL_SUCCESS','clientOperationId','string','1142006zsQnXh'];a136_0xc8f2=function(){return _0x4527b0;};return a136_0xc8f2();}const a136_0x17d706=a136_0x40f9;(function(_0x3f015f,_0x161680){const _0x5ba82b=a136_0x40f9,_0x17d291=_0x3f015f();while(!![]){try{const _0x2211ba=parseInt(_0x5ba82b(0x1ac))/0x1+parseInt(_0x5ba82b(0x19b))/0x2+-parseInt(_0x5ba82b(0x1b8))/0x3*(parseInt(_0x5ba82b(0x1b3))/0x4)+parseInt(_0x5ba82b(0x1a6))/0x5+parseInt(_0x5ba82b(0x1b4))/0x6*(parseInt(_0x5ba82b(0x1a7))/0x7)+-parseInt(_0x5ba82b(0x1a1))/0x8+-parseInt(_0x5ba82b(0x1c0))/0x9;if(_0x2211ba===_0x161680)break;else _0x17d291['push'](_0x17d291['shift']());}catch(_0x373239){_0x17d291['push'](_0x17d291['shift']());}}}(a136_0xc8f2,0xa3ac3));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateStandardPagesStatus}from'../../core/api-client.js';export const pageGenerateStatus={'service':a136_0x17d706(0x1be),'command':'generate-status','description':a136_0x17d706(0x1a3),'risk':a136_0x17d706(0x1b2),'defaultOutputFormat':a136_0x17d706(0x19f),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a136_0x17d706(0x1bc),'type':a136_0x17d706(0x1ab),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'operation-id','type':'string','description':'Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start'},{'name':a136_0x17d706(0x19d),'type':a136_0x17d706(0x1ab),'description':a136_0x17d706(0x1b6)}],async 'validate'(_0x6ec675){validateDatasetSelector(_0x6ec675),validateGenerateOperationSelector(_0x6ec675);},async 'dryRun'(_0x1dbfc1){const _0x438da0=a136_0x17d706,_0x37a912=await loadDatasetDetailForPage(_0x1dbfc1),_0x282f30=_0x1dbfc1[_0x438da0(0x1a2)](_0x438da0(0x1ae)),_0x57210f=_0x1dbfc1[_0x438da0(0x1a2)](_0x438da0(0x19d)),_0x174b10=new URLSearchParams({'appCode':_0x1dbfc1[_0x438da0(0x1b0)]});return _0x282f30&&_0x174b10['set']('operationId',_0x282f30),_0x57210f&&_0x174b10[_0x438da0(0x1a4)](_0x438da0(0x1aa),_0x57210f),{'method':_0x438da0(0x1ba),'url':'/smartapi/lovrabet/dataset/'+_0x37a912[_0x438da0(0x1a0)]+'/generate-standard-pages/status?'+_0x174b10[_0x438da0(0x19e)](),'description':serializeDryRunDescription({'dataset':{'id':_0x37a912['id'],'code':_0x37a912[_0x438da0(0x1a0)],'name':_0x37a912['name']},'action':'query-generate-operation-status','operationId':_0x282f30||undefined,'clientOperationId':_0x57210f||undefined})};},async 'execute'(_0xb06740){const _0x236fed=a136_0x17d706,_0x281c2e=await loadDatasetDetailForPage(_0xb06740),_0x76e639=_0xb06740['str'](_0x236fed(0x1ae)),_0x10f034=_0xb06740['str'](_0x236fed(0x19d)),_0x51b6cf=await getGenerateStandardPagesStatus(_0xb06740['appCode'],_0x281c2e[_0x236fed(0x1a0)],{'operationId':_0x76e639||undefined,'clientOperationId':_0x10f034||undefined}),_0x3ef43c=_0x51b6cf[_0x236fed(0x1b1)]===_0x236fed(0x1b7)||_0x51b6cf[_0x236fed(0x1b1)]===_0x236fed(0x1a9),_0x1fdef3=_0x3ef43c?await loadStandardPageStatusForGenerate(_0xb06740,_0x281c2e[_0x236fed(0x1a0)]):null,_0xaf06a4=assessGenerateOperationState(_0x281c2e[_0x236fed(0x1a0)],_0x51b6cf[_0x236fed(0x1b1)],_0x1fdef3),_0x2051ac=_0x51b6cf[_0x236fed(0x1bd)]??_0x76e639??undefined,_0x4c93c5=_0x51b6cf['clientOperationId']??_0x10f034??undefined;return{'ok':!![],'message':_0xaf06a4[_0x236fed(0x1b1)]===_0x236fed(0x1bb)?_0x51b6cf[_0x236fed(0x1b5)]||_0xaf06a4[_0x236fed(0x1af)]:_0xaf06a4[_0x236fed(0x1af)],'data':{'datasetCode':_0x281c2e['code'],'appCode':_0xb06740['appCode'],'operationId':_0x2051ac,'clientOperationId':_0x4c93c5,'jobStatus':_0x51b6cf[_0x236fed(0x1b1)]??null,'progressRate':typeof _0x51b6cf[_0x236fed(0x19c)]===_0x236fed(0x1a5)?_0x51b6cf[_0x236fed(0x19c)]:null,'currentStep':_0x51b6cf[_0x236fed(0x1ad)]??null,'errorMsg':_0x51b6cf[_0x236fed(0x1b5)]??null,'status':_0xaf06a4[_0x236fed(0x1b1)],'manualResolutionRequired':_0xaf06a4[_0x236fed(0x1a8)],'nextAction':_0xaf06a4[_0x236fed(0x1bf)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x281c2e[_0x236fed(0x1a0)],{'appCode':_0xb06740[_0x236fed(0x1b0)],'operationId':_0x2051ac,'clientOperationId':_0x4c93c5})},'standardPageStatus':_0x1fdef3,'result':_0x51b6cf[_0x236fed(0x1b9)]??null}};}};
1
+ const a136_0x1ef3ef=a136_0x5f1b;(function(_0x319d6d,_0x37d78){const _0x5bf799=a136_0x5f1b,_0x5f38d9=_0x319d6d();while(!![]){try{const _0x40a506=parseInt(_0x5bf799(0xab))/0x1+parseInt(_0x5bf799(0xa4))/0x2*(parseInt(_0x5bf799(0xa6))/0x3)+-parseInt(_0x5bf799(0x99))/0x4*(-parseInt(_0x5bf799(0x90))/0x5)+parseInt(_0x5bf799(0x95))/0x6+parseInt(_0x5bf799(0xae))/0x7*(-parseInt(_0x5bf799(0x96))/0x8)+-parseInt(_0x5bf799(0xa5))/0x9*(parseInt(_0x5bf799(0x9d))/0xa)+-parseInt(_0x5bf799(0x9b))/0xb;if(_0x40a506===_0x37d78)break;else _0x5f38d9['push'](_0x5f38d9['shift']());}catch(_0x5252cf){_0x5f38d9['push'](_0x5f38d9['shift']());}}}(a136_0x1bb9,0xaed88));function a136_0x5f1b(_0x5749c2,_0x469963){_0x5749c2=_0x5749c2-0x8e;const _0x1bb978=a136_0x1bb9();let _0x5f1be5=_0x1bb978[_0x5749c2];return _0x5f1be5;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateStandardPagesStatus}from'../../core/api-client.js';function a136_0x1bb9(){const _0x99bd78=['14llhRyX','query-generate-operation-status','alias','page','1915GjsMFP','clientOperationId','number','errorMsg','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','7210584thQwiN','4676704dOEzFn','code','string','10588CZwXnJ','SUCCESS','21875216gttugD','operation-id','10690ekdkbA','appCode','str','status','operationId','generate-status','manualResolutionRequired','122KVOXjA','5517EJgLnx','49461odyuGq','client-operation-id','operation_failed','toString','/smartapi/lovrabet/dataset/','1308025qgWqHd','message','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost'];a136_0x1bb9=function(){return _0x99bd78;};return a136_0x1bb9();}export const pageGenerateStatus={'service':a136_0x1ef3ef(0x8f),'command':a136_0x1ef3ef(0xa2),'description':'Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','risk':'read','defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a136_0x1ef3ef(0x8e),'type':'string','description':a136_0x1ef3ef(0x94)},{'name':a136_0x1ef3ef(0x9c),'type':a136_0x1ef3ef(0x98),'description':'Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start'},{'name':'client-operation-id','type':a136_0x1ef3ef(0x98),'description':a136_0x1ef3ef(0xad)}],async 'validate'(_0x2d0248){validateDatasetSelector(_0x2d0248),validateGenerateOperationSelector(_0x2d0248);},async 'dryRun'(_0x2c13ac){const _0x571d04=a136_0x1ef3ef,_0x3cdad6=await loadDatasetDetailForPage(_0x2c13ac),_0xe3f631=_0x2c13ac['str'](_0x571d04(0x9c)),_0x5f065d=_0x2c13ac[_0x571d04(0x9f)](_0x571d04(0xa7)),_0x3eaec0=new URLSearchParams({'appCode':_0x2c13ac['appCode']});return _0xe3f631&&_0x3eaec0['set'](_0x571d04(0xa1),_0xe3f631),_0x5f065d&&_0x3eaec0['set'](_0x571d04(0x91),_0x5f065d),{'method':'GET','url':_0x571d04(0xaa)+_0x3cdad6[_0x571d04(0x97)]+'/generate-standard-pages/status?'+_0x3eaec0[_0x571d04(0xa9)](),'description':serializeDryRunDescription({'dataset':{'id':_0x3cdad6['id'],'code':_0x3cdad6['code'],'name':_0x3cdad6['name']},'action':_0x571d04(0xaf),'operationId':_0xe3f631||undefined,'clientOperationId':_0x5f065d||undefined})};},async 'execute'(_0x37acbe){const _0x118ebd=a136_0x1ef3ef,_0x234345=await loadDatasetDetailForPage(_0x37acbe),_0x36982e=_0x37acbe['str'](_0x118ebd(0x9c)),_0x4f3146=_0x37acbe['str'](_0x118ebd(0xa7)),_0x59f2b1=await getGenerateStandardPagesStatus(_0x37acbe[_0x118ebd(0x9e)],_0x234345[_0x118ebd(0x97)],{'operationId':_0x36982e||undefined,'clientOperationId':_0x4f3146||undefined}),_0x2a4eb2=_0x59f2b1[_0x118ebd(0xa0)]===_0x118ebd(0x9a)||_0x59f2b1[_0x118ebd(0xa0)]==='PARTIAL_SUCCESS',_0x54ec14=_0x2a4eb2?await loadStandardPageStatusForGenerate(_0x37acbe,_0x234345[_0x118ebd(0x97)]):null,_0x1d339c=assessGenerateOperationState(_0x234345['code'],_0x59f2b1[_0x118ebd(0xa0)],_0x54ec14),_0x1e2bc6=_0x59f2b1[_0x118ebd(0xa1)]??_0x36982e??undefined,_0x3cd5f3=_0x59f2b1[_0x118ebd(0x91)]??_0x4f3146??undefined;return{'ok':!![],'message':_0x1d339c[_0x118ebd(0xa0)]===_0x118ebd(0xa8)?_0x59f2b1[_0x118ebd(0x93)]||_0x1d339c[_0x118ebd(0xac)]:_0x1d339c[_0x118ebd(0xac)],'data':{'datasetCode':_0x234345[_0x118ebd(0x97)],'appCode':_0x37acbe[_0x118ebd(0x9e)],'operationId':_0x1e2bc6,'clientOperationId':_0x3cd5f3,'jobStatus':_0x59f2b1[_0x118ebd(0xa0)]??null,'progressRate':typeof _0x59f2b1['progressRate']===_0x118ebd(0x92)?_0x59f2b1['progressRate']:null,'currentStep':_0x59f2b1['currentStep']??null,'errorMsg':_0x59f2b1[_0x118ebd(0x93)]??null,'status':_0x1d339c[_0x118ebd(0xa0)],'manualResolutionRequired':_0x1d339c[_0x118ebd(0xa3)],'nextAction':_0x1d339c['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x234345[_0x118ebd(0x97)],{'appCode':_0x37acbe[_0x118ebd(0x9e)],'operationId':_0x1e2bc6,'clientOperationId':_0x3cd5f3})},'standardPageStatus':_0x54ec14,'result':_0x59f2b1['result']??null}};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const pageDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- (function(_0x33f703,_0x345d37){const _0x33e5d8=a137_0x1765,_0x331ab9=_0x33f703();while(!![]){try{const _0x273dfc=-parseInt(_0x33e5d8(0x147))/0x1*(-parseInt(_0x33e5d8(0x142))/0x2)+parseInt(_0x33e5d8(0x148))/0x3*(-parseInt(_0x33e5d8(0x14c))/0x4)+-parseInt(_0x33e5d8(0x145))/0x5+parseInt(_0x33e5d8(0x14a))/0x6*(-parseInt(_0x33e5d8(0x140))/0x7)+parseInt(_0x33e5d8(0x146))/0x8*(parseInt(_0x33e5d8(0x141))/0x9)+parseInt(_0x33e5d8(0x144))/0xa*(parseInt(_0x33e5d8(0x14b))/0xb)+parseInt(_0x33e5d8(0x143))/0xc*(parseInt(_0x33e5d8(0x149))/0xd);if(_0x273dfc===_0x345d37)break;else _0x331ab9['push'](_0x331ab9['shift']());}catch(_0xcf1aef){_0x331ab9['push'](_0x331ab9['shift']());}}}(a137_0x3371,0x46b6b));import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageStandardPageStatus}from'../../commands/page/standard-page-status.js';function a137_0x3371(){const _0x18a45d=['20TkgTKw','2785350ehpPSM','2632vkVqzD','3EMQdpA','431481nqPfYP','13DufaBe','30834pdMvzO','2237268wjaeIy','12PpULoH','399ECaivO','4887FpIguJ','26034xWmvpn','11359716XwqKhF'];a137_0x3371=function(){return _0x18a45d;};return a137_0x3371();}import{pageSync}from'../../commands/page/sync.js';function a137_0x1765(_0x5eb11a,_0x281f29){_0x5eb11a=_0x5eb11a-0x140;const _0x3371a1=a137_0x3371();let _0x17657f=_0x3371a1[_0x5eb11a];return _0x17657f;}import{pagePull}from'../../commands/page/pull.js';import{pagePush}from'../../commands/page/push.js';import{pageRelationAudit}from'../../commands/page/relation-audit.js';import{pageRestore}from'../../commands/page/restore.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush,pageRestore];
1
+ (function(_0x136367,_0x222084){const _0x3d526f=a137_0x1303,_0xf65acb=_0x136367();while(!![]){try{const _0x4f7bc2=-parseInt(_0x3d526f(0x1e0))/0x1+parseInt(_0x3d526f(0x1db))/0x2+parseInt(_0x3d526f(0x1dd))/0x3+-parseInt(_0x3d526f(0x1dc))/0x4*(-parseInt(_0x3d526f(0x1df))/0x5)+-parseInt(_0x3d526f(0x1e3))/0x6*(-parseInt(_0x3d526f(0x1e2))/0x7)+-parseInt(_0x3d526f(0x1da))/0x8+parseInt(_0x3d526f(0x1e1))/0x9*(-parseInt(_0x3d526f(0x1de))/0xa);if(_0x4f7bc2===_0x222084)break;else _0xf65acb['push'](_0xf65acb['shift']());}catch(_0x168070){_0xf65acb['push'](_0xf65acb['shift']());}}}(a137_0x4773,0xd9101));function a137_0x4773(){const _0x4cce8e=['72EuZEzf','10917088EPxTFD','3012190DSBgXz','306188fIiqPu','5058315UWEkfC','2640duNoIy','85NtZPML','387874NltUah','113814aOnqKA','867209nkALON'];a137_0x4773=function(){return _0x4cce8e;};return a137_0x4773();}import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageStandardPageStatus}from'../../commands/page/standard-page-status.js';import{pageSync}from'../../commands/page/sync.js';import{pagePull}from'../../commands/page/pull.js';function a137_0x1303(_0x1cd8e1,_0x4c976f){_0x1cd8e1=_0x1cd8e1-0x1da;const _0x477319=a137_0x4773();let _0x13037e=_0x477319[_0x1cd8e1];return _0x13037e;}import{pagePush}from'../../commands/page/push.js';import{pageRelationAudit}from'../../commands/page/relation-audit.js';import{pageRestore}from'../../commands/page/restore.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush,pageRestore];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const pagePull: CommandDefinition;
@@ -1 +1 @@
1
- const a138_0x534671=a138_0x4d85;(function(_0x2f5f71,_0x408149){const _0x13d2b2=a138_0x4d85,_0x4765ae=_0x2f5f71();while(!![]){try{const _0x4cfd25=parseInt(_0x13d2b2(0xbf))/0x1+-parseInt(_0x13d2b2(0xba))/0x2+-parseInt(_0x13d2b2(0xc1))/0x3+parseInt(_0x13d2b2(0xb2))/0x4+parseInt(_0x13d2b2(0xc4))/0x5*(-parseInt(_0x13d2b2(0x96))/0x6)+parseInt(_0x13d2b2(0xb1))/0x7*(-parseInt(_0x13d2b2(0x9f))/0x8)+-parseInt(_0x13d2b2(0xb3))/0x9;if(_0x4cfd25===_0x408149)break;else _0x4765ae['push'](_0x4765ae['shift']());}catch(_0xa76dd4){_0x4765ae['push'](_0x4765ae['shift']());}}}(a138_0x3bdc,0x3218d));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{computePageContentHash,computePageFileHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{ensureParentDirectory,fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';function a138_0x4d85(_0x50373b,_0x542bd6){_0x50373b=_0x50373b-0x91;const _0x3bdc47=a138_0x3bdc();let _0x4d858d=_0x3bdc47[_0x50373b];return _0x4d858d;}import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';function a138_0x3bdc(){const _0x23fa04=['code','lastSync','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','force','258JaPBWr','compress','appCode','Dataset\x20\x22','push','filter','Pull\x20page\x20schema\x20to\x20local\x20files','lockFilePath','map','566472nRnXau','deleted','hash','detail','length','mode','validation','string','read','version-tag','status','boolean','alias','number','GET','versionTag','single','all','7WSjxKx','1316876EzhHsU','636057sEVecc','拉取完成:\x20','pageId','page','bool','items','/smartapi/lovrabet/detail?pageId=','3416hzXqrw','type','toISOString','name','conflict','54404WZYVDq','str','95001vdQMep','pull','batch','415NEGejo','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','Page\x20ID','reason','local\x20unsynced\x20changes','pages','utf8','would_pull','Use\x20--force\x20to\x20overwrite\x20local\x20changes.','Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20','relatedPages','localPath','datasetCode'];a138_0x3bdc=function(){return _0x23fa04;};return a138_0x3bdc();}export const pagePull={'service':a138_0x534671(0xb6),'command':a138_0x534671(0xc2),'description':a138_0x534671(0x9c),'risk':a138_0x534671(0xa7),'defaultOutputFormat':a138_0x534671(0x97),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a138_0x534671(0xac),'description':a138_0x534671(0xc6)},DATASETCODE_FLAG_OPTIONAL,{'name':a138_0x534671(0xab),'type':a138_0x534671(0xa6),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a138_0x534671(0xa8),'type':a138_0x534671(0xa6),'description':a138_0x534671(0xc5)},{'name':a138_0x534671(0x95),'type':a138_0x534671(0xaa),'description':a138_0x534671(0x94)}],async 'validate'(_0x41379e){validatePageTargetSelector(_0x41379e);},async 'dryRun'(_0x24075d){const _0x147334=a138_0x534671,_0x296abe=await buildPullPlan(_0x24075d);return{'method':_0x147334(0xad),'url':_0x296abe['mode']===_0x147334(0xaf)?_0x147334(0xb9)+(_0x296abe['items'][0x0]?.['detail'][_0x147334(0xb5)]??''):'/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','body':{'appCode':_0x24075d[_0x147334(0x98)],'mode':_0x296abe[_0x147334(0xa4)],'targetDatasetCode':_0x296abe[_0x147334(0x91)]??null,'pages':_0x296abe[_0x147334(0xb8)][_0x147334(0x9e)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x296abe[_0x147334(0xa4)],'datasetCode':_0x296abe['datasetCode']??null,'totalCandidates':_0x296abe[_0x147334(0xb8)][_0x147334(0xa3)],'totalWouldPull':_0x296abe[_0x147334(0xb8)][_0x147334(0x9b)](_0x37f4fe=>_0x37f4fe[_0x147334(0xa9)]==='would_pull')['length'],'totalConflicts':_0x296abe[_0x147334(0xb8)][_0x147334(0x9b)](_0x9e2ea8=>_0x9e2ea8['status']===_0x147334(0xbe))['length']})};},async 'execute'(_0x3164d6){const _0x721248=a138_0x534671,_0x3e3bfb=loadPageProjectConfig(_0x3164d6[_0x721248(0x98)]),_0x5979a3=await readPageLockFile(_0x3e3bfb[_0x721248(0x9d)]),{lockData:_0x17f37a,appLock:_0x52f5fc}=ensurePageLockScope(_0x5979a3??createEmptyPageLock(),_0x3164d6[_0x721248(0x98)]),_0x3a999a=await buildPullPlan(_0x3164d6),_0x4cc14f=_0x3164d6[_0x721248(0xb7)](_0x721248(0x95));if(_0x3a999a[_0x721248(0xa4)]===_0x721248(0xaf)&&_0x3a999a[_0x721248(0xb8)][0x0]?.[_0x721248(0xa9)]===_0x721248(0xbe)&&!_0x4cc14f)throw CliErrors[_0x721248(0xa5)](_0x721248(0xcd)+_0x3a999a[_0x721248(0xb8)][0x0][_0x721248(0xcf)],_0x721248(0xcc));const _0x5322c1=[],_0x49536a=[];for(const _0x342849 of _0x3a999a[_0x721248(0xb8)]){if(_0x342849[_0x721248(0xa9)]==='conflict'&&!_0x4cc14f){_0x49536a['push']({'pageId':_0x342849[_0x721248(0xa2)][_0x721248(0xb5)],'type':_0x342849['detail']['type'],'title':_0x342849[_0x721248(0xa2)][_0x721248(0xbd)],'localPath':_0x342849[_0x721248(0xcf)],'reason':_0x342849[_0x721248(0xc7)]??_0x721248(0xc8)});continue;}await ensureParentDirectory(_0x342849[_0x721248(0xcf)]);const _0x4e574b=serializePageSchemaForFile(_0x342849[_0x721248(0xa2)]['code']);await writeFile(_0x342849[_0x721248(0xcf)],_0x4e574b,_0x721248(0xca)),_0x52f5fc[_0x721248(0xc9)][String(_0x342849['detail']['pageId'])]=buildLockEntry(_0x342849[_0x721248(0xa2)],_0x4e574b),_0x5322c1[_0x721248(0x9a)]({'pageId':_0x342849[_0x721248(0xa2)][_0x721248(0xb5)],'type':_0x342849[_0x721248(0xa2)][_0x721248(0xbb)],'title':_0x342849[_0x721248(0xa2)][_0x721248(0xbd)],'localPath':_0x342849[_0x721248(0xcf)]});}return _0x52f5fc[_0x721248(0x93)]=new Date()[_0x721248(0xbc)](),await writePageLockFile(_0x3e3bfb[_0x721248(0x9d)],_0x17f37a),{'ok':!![],'message':_0x721248(0xb4)+_0x5322c1['length']+'\x20pulled,\x20'+_0x49536a['length']+'\x20skipped','data':{'appCode':_0x3164d6[_0x721248(0x98)],'pulledPages':_0x5322c1,'skippedPages':_0x49536a,'totalPulled':_0x5322c1[_0x721248(0xa3)],'totalSkipped':_0x49536a[_0x721248(0xa3)]}};}};async function buildPullPlan(_0x42b983){const _0x25b986=a138_0x534671,_0xfae4f7=loadPageProjectConfig(_0x42b983[_0x25b986(0x98)]),_0xfbf282=await readPageLockFile(_0xfae4f7[_0x25b986(0x9d)]),{appLock:_0x487400}=ensurePageLockScope(_0xfbf282??createEmptyPageLock(),_0x42b983[_0x25b986(0x98)]),_0x355a36=getPageIdFlag(_0x42b983);if(_0x355a36!==undefined){const _0x5b3678=await loadPageDetailForPage(_0x42b983,_0x355a36);return{'mode':_0x25b986(0xaf),'items':[await inspectPullTarget(_0xfae4f7,_0x487400[_0x25b986(0xc9)][String(_0x5b3678['pageId'])],_0x5b3678)]};}const _0x50a9bc=await loadDatasetDetailForPage(_0x42b983),_0x1f7ba3=_0x50a9bc[_0x25b986(0xce)]['filter'](_0x2324da=>!_0x2324da[_0x25b986(0xa0)]);if(_0x1f7ba3[_0x25b986(0xa3)]===0x0)throw CliErrors['validation'](_0x25b986(0x99)+_0x50a9bc[_0x25b986(0x92)]+'\x22\x20has\x20no\x20undeleted\x20related\x20pages.');const _0x405a3a=await Promise['all'](_0x1f7ba3[_0x25b986(0x9e)](_0x4eb86c=>loadPageDetailForPage(_0x42b983,_0x4eb86c['id']))),_0x54f3b7=selectVersionTagGroup(_0x405a3a,_0x119afc=>_0x119afc[_0x25b986(0xae)],_0x42b983[_0x25b986(0xc0)](_0x25b986(0xa8)));return{'mode':_0x25b986(0xc3),'datasetCode':_0x50a9bc[_0x25b986(0x92)],'items':await Promise[_0x25b986(0xb0)](_0x54f3b7[_0x25b986(0xb8)][_0x25b986(0x9e)](_0xf4c9b=>inspectPullTarget(_0xfae4f7,_0x487400['pages'][String(_0xf4c9b['pageId'])],_0xf4c9b)))};}async function inspectPullTarget(_0x5227e2,_0x2e0115,_0x1a92fe){const _0x2921b4=a138_0x534671,_0x3dccdb=resolvePageFilePath(_0x5227e2,_0x1a92fe['pageId'],_0x1a92fe[_0x2921b4(0xbb)]),_0xc55a6f=await fileExists(_0x3dccdb);if(!_0xc55a6f){const _0x6235f=serializePageSchemaForFile(_0x1a92fe[_0x2921b4(0x92)]);return{'detail':_0x1a92fe,'localPath':_0x3dccdb,'localHash':computePageContentHash(_0x6235f),'status':_0x2921b4(0xcb)};}const _0x5cd727=await computePageFileHash(_0x3dccdb);if(!_0x2e0115||_0x5cd727!==_0x2e0115[_0x2921b4(0xa1)])return{'detail':_0x1a92fe,'localPath':_0x3dccdb,'localHash':_0x5cd727,'status':_0x2921b4(0xbe),'reason':'local\x20unsynced\x20changes'};return{'detail':_0x1a92fe,'localPath':_0x3dccdb,'localHash':_0x5cd727,'status':'would_pull'};}function buildLockEntry(_0x1a10ed,_0x1cea9e){const _0x2ee068=a138_0x534671;return{'hash':computePageContentHash(_0x1cea9e),'pageId':_0x1a10ed['pageId'],'pageVersion':_0x1a10ed['pageVersion'],'type':_0x1a10ed[_0x2ee068(0xbb)],'title':_0x1a10ed[_0x2ee068(0xbd)],'datasetIds':_0x1a10ed['datasetIds'],'versionTag':_0x1a10ed[_0x2ee068(0xae)]};}function toPreviewItem(_0x3d3404){const _0x11515c=a138_0x534671;return{'pageId':_0x3d3404[_0x11515c(0xa2)][_0x11515c(0xb5)],'type':_0x3d3404['detail'][_0x11515c(0xbb)],'title':_0x3d3404['detail'][_0x11515c(0xbd)],'localPath':_0x3d3404[_0x11515c(0xcf)],'status':_0x3d3404[_0x11515c(0xa9)],..._0x3d3404[_0x11515c(0xc7)]?{'reason':_0x3d3404[_0x11515c(0xc7)]}:{}};}
1
+ const a138_0x463b4b=a138_0x62fb;function a138_0x62fb(_0x536519,_0x58afc7){_0x536519=_0x536519-0x18f;const _0x38892f=a138_0x3889();let _0x62fb6d=_0x38892f[_0x536519];return _0x62fb6d;}(function(_0x2d7a68,_0x62e6d9){const _0x2cc01b=a138_0x62fb,_0x26dae2=_0x2d7a68();while(!![]){try{const _0xfa1331=parseInt(_0x2cc01b(0x19b))/0x1*(-parseInt(_0x2cc01b(0x195))/0x2)+-parseInt(_0x2cc01b(0x1a3))/0x3*(-parseInt(_0x2cc01b(0x1b4))/0x4)+parseInt(_0x2cc01b(0x1b9))/0x5+-parseInt(_0x2cc01b(0x1be))/0x6*(parseInt(_0x2cc01b(0x1b1))/0x7)+-parseInt(_0x2cc01b(0x1c6))/0x8*(-parseInt(_0x2cc01b(0x1b3))/0x9)+-parseInt(_0x2cc01b(0x1a5))/0xa+parseInt(_0x2cc01b(0x1aa))/0xb;if(_0xfa1331===_0x62e6d9)break;else _0x26dae2['push'](_0x26dae2['shift']());}catch(_0x1afac0){_0x26dae2['push'](_0x26dae2['shift']());}}}(a138_0x3889,0xd627a));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{computePageContentHash,computePageFileHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{ensureParentDirectory,fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePull={'service':'page','command':'pull','description':a138_0x463b4b(0x1c4),'risk':a138_0x463b4b(0x1ca),'defaultOutputFormat':a138_0x463b4b(0x1c5),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':a138_0x463b4b(0x190)},DATASETCODE_FLAG_OPTIONAL,{'name':a138_0x463b4b(0x1c9),'type':a138_0x463b4b(0x18f),'description':a138_0x463b4b(0x1ac)},{'name':a138_0x463b4b(0x1c3),'type':'string','description':'Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)'},{'name':a138_0x463b4b(0x19f),'type':'boolean','description':'Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist'}],async 'validate'(_0x4845cb){validatePageTargetSelector(_0x4845cb);},async 'dryRun'(_0x21237e){const _0x39ddca=a138_0x463b4b,_0x4e78c9=await buildPullPlan(_0x21237e);return{'method':_0x39ddca(0x1a7),'url':_0x4e78c9[_0x39ddca(0x1ad)]==='single'?_0x39ddca(0x1ba)+(_0x4e78c9[_0x39ddca(0x1c8)][0x0]?.['detail'][_0x39ddca(0x19d)]??''):_0x39ddca(0x19c),'body':{'appCode':_0x21237e[_0x39ddca(0x1bb)],'mode':_0x4e78c9['mode'],'targetDatasetCode':_0x4e78c9[_0x39ddca(0x1a8)]??null,'pages':_0x4e78c9[_0x39ddca(0x1c8)][_0x39ddca(0x193)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x4e78c9[_0x39ddca(0x1ad)],'datasetCode':_0x4e78c9[_0x39ddca(0x1a8)]??null,'totalCandidates':_0x4e78c9[_0x39ddca(0x1c8)][_0x39ddca(0x192)],'totalWouldPull':_0x4e78c9[_0x39ddca(0x1c8)]['filter'](_0x516e02=>_0x516e02[_0x39ddca(0x1bd)]==='would_pull')[_0x39ddca(0x192)],'totalConflicts':_0x4e78c9['items'][_0x39ddca(0x1a0)](_0x481cda=>_0x481cda[_0x39ddca(0x1bd)]==='conflict')[_0x39ddca(0x192)]})};},async 'execute'(_0x23c3d6){const _0x20c867=a138_0x463b4b,_0x9d4733=loadPageProjectConfig(_0x23c3d6[_0x20c867(0x1bb)]),_0x13a5ae=await readPageLockFile(_0x9d4733[_0x20c867(0x1b0)]),{lockData:_0x26d4a0,appLock:_0x2c56a9}=ensurePageLockScope(_0x13a5ae??createEmptyPageLock(),_0x23c3d6[_0x20c867(0x1bb)]),_0x535bc8=await buildPullPlan(_0x23c3d6),_0x5ea659=_0x23c3d6[_0x20c867(0x1ae)](_0x20c867(0x19f));if(_0x535bc8[_0x20c867(0x1ad)]===_0x20c867(0x1bf)&&_0x535bc8[_0x20c867(0x1c8)][0x0]?.['status']==='conflict'&&!_0x5ea659)throw CliErrors[_0x20c867(0x1bc)](_0x20c867(0x1b2)+_0x535bc8[_0x20c867(0x1c8)][0x0]['localPath'],_0x20c867(0x198));const _0x17bcd2=[],_0x128a3f=[];for(const _0x4d3536 of _0x535bc8[_0x20c867(0x1c8)]){if(_0x4d3536[_0x20c867(0x1bd)]===_0x20c867(0x1af)&&!_0x5ea659){_0x128a3f[_0x20c867(0x1a6)]({'pageId':_0x4d3536[_0x20c867(0x1b5)][_0x20c867(0x19d)],'type':_0x4d3536[_0x20c867(0x1b5)][_0x20c867(0x19e)],'title':_0x4d3536[_0x20c867(0x1b5)][_0x20c867(0x199)],'localPath':_0x4d3536[_0x20c867(0x1b8)],'reason':_0x4d3536[_0x20c867(0x197)]??'local\x20unsynced\x20changes'});continue;}await ensureParentDirectory(_0x4d3536[_0x20c867(0x1b8)]);const _0x2e5732=serializePageSchemaForFile(_0x4d3536[_0x20c867(0x1b5)][_0x20c867(0x1c1)]);await writeFile(_0x4d3536[_0x20c867(0x1b8)],_0x2e5732,'utf8'),_0x2c56a9[_0x20c867(0x1a2)][String(_0x4d3536['detail'][_0x20c867(0x19d)])]=buildLockEntry(_0x4d3536[_0x20c867(0x1b5)],_0x2e5732),_0x17bcd2[_0x20c867(0x1a6)]({'pageId':_0x4d3536['detail']['pageId'],'type':_0x4d3536['detail'][_0x20c867(0x19e)],'title':_0x4d3536['detail']['name'],'localPath':_0x4d3536[_0x20c867(0x1b8)]});}return _0x2c56a9[_0x20c867(0x1ab)]=new Date()[_0x20c867(0x1c0)](),await writePageLockFile(_0x9d4733['lockFilePath'],_0x26d4a0),{'ok':!![],'message':'拉取完成:\x20'+_0x17bcd2[_0x20c867(0x192)]+_0x20c867(0x196)+_0x128a3f[_0x20c867(0x192)]+'\x20skipped','data':{'appCode':_0x23c3d6[_0x20c867(0x1bb)],'pulledPages':_0x17bcd2,'skippedPages':_0x128a3f,'totalPulled':_0x17bcd2[_0x20c867(0x192)],'totalSkipped':_0x128a3f[_0x20c867(0x192)]}};}};async function buildPullPlan(_0x492ef5){const _0x47b7c9=a138_0x463b4b,_0x12c598=loadPageProjectConfig(_0x492ef5[_0x47b7c9(0x1bb)]),_0x3c5d3a=await readPageLockFile(_0x12c598[_0x47b7c9(0x1b0)]),{appLock:_0x33f830}=ensurePageLockScope(_0x3c5d3a??createEmptyPageLock(),_0x492ef5[_0x47b7c9(0x1bb)]),_0x37bccc=getPageIdFlag(_0x492ef5);if(_0x37bccc!==undefined){const _0x46f89d=await loadPageDetailForPage(_0x492ef5,_0x37bccc);return{'mode':_0x47b7c9(0x1bf),'items':[await inspectPullTarget(_0x12c598,_0x33f830[_0x47b7c9(0x1a2)][String(_0x46f89d[_0x47b7c9(0x19d)])],_0x46f89d)]};}const _0x1a48b7=await loadDatasetDetailForPage(_0x492ef5),_0x20a5e9=_0x1a48b7[_0x47b7c9(0x194)][_0x47b7c9(0x1a0)](_0x27370d=>!_0x27370d['deleted']);if(_0x20a5e9[_0x47b7c9(0x192)]===0x0)throw CliErrors['validation']('Dataset\x20\x22'+_0x1a48b7[_0x47b7c9(0x1c1)]+_0x47b7c9(0x1a1));const _0x4e911b=await Promise[_0x47b7c9(0x19a)](_0x20a5e9[_0x47b7c9(0x193)](_0x11fcde=>loadPageDetailForPage(_0x492ef5,_0x11fcde['id']))),_0x44c78d=selectVersionTagGroup(_0x4e911b,_0x21d0ef=>_0x21d0ef['versionTag'],_0x492ef5['str'](_0x47b7c9(0x1c3)));return{'mode':_0x47b7c9(0x1c7),'datasetCode':_0x1a48b7[_0x47b7c9(0x1c1)],'items':await Promise[_0x47b7c9(0x19a)](_0x44c78d[_0x47b7c9(0x1c8)][_0x47b7c9(0x193)](_0x11d38d=>inspectPullTarget(_0x12c598,_0x33f830[_0x47b7c9(0x1a2)][String(_0x11d38d[_0x47b7c9(0x19d)])],_0x11d38d)))};}function a138_0x3889(){const _0x30edf3=['local\x20unsynced\x20changes','25510518skYBKh','lastSync','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','mode','bool','conflict','lockFilePath','6055539SCcPUj','Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20','2763VIOWFy','95660Ahsehl','detail','datasetIds','would_pull','localPath','3388855LNAUZz','/smartapi/lovrabet/detail?pageId=','appCode','validation','status','6ekEvSy','single','toISOString','code','versionTag','version-tag','Pull\x20page\x20schema\x20to\x20local\x20files','compress','24576KrBOVP','batch','items','alias','read','string','Page\x20ID','pageVersion','length','map','relatedPages','2xmgDct','\x20pulled,\x20','reason','Use\x20--force\x20to\x20overwrite\x20local\x20changes.','name','all','1328867faYjFK','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','pageId','type','force','filter','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','pages','84NqSSJO','hash','15385110TIaLlc','push','GET','datasetCode'];a138_0x3889=function(){return _0x30edf3;};return a138_0x3889();}async function inspectPullTarget(_0x49afb2,_0x4f4d66,_0x128c10){const _0x58d1e1=a138_0x463b4b,_0x24c9cd=resolvePageFilePath(_0x49afb2,_0x128c10[_0x58d1e1(0x19d)],_0x128c10[_0x58d1e1(0x19e)]),_0x382388=await fileExists(_0x24c9cd);if(!_0x382388){const _0x311740=serializePageSchemaForFile(_0x128c10[_0x58d1e1(0x1c1)]);return{'detail':_0x128c10,'localPath':_0x24c9cd,'localHash':computePageContentHash(_0x311740),'status':_0x58d1e1(0x1b7)};}const _0x27f6e9=await computePageFileHash(_0x24c9cd);if(!_0x4f4d66||_0x27f6e9!==_0x4f4d66[_0x58d1e1(0x1a4)])return{'detail':_0x128c10,'localPath':_0x24c9cd,'localHash':_0x27f6e9,'status':_0x58d1e1(0x1af),'reason':_0x58d1e1(0x1a9)};return{'detail':_0x128c10,'localPath':_0x24c9cd,'localHash':_0x27f6e9,'status':_0x58d1e1(0x1b7)};}function buildLockEntry(_0x500bcd,_0x1eba76){const _0x29c261=a138_0x463b4b;return{'hash':computePageContentHash(_0x1eba76),'pageId':_0x500bcd[_0x29c261(0x19d)],'pageVersion':_0x500bcd[_0x29c261(0x191)],'type':_0x500bcd['type'],'title':_0x500bcd['name'],'datasetIds':_0x500bcd[_0x29c261(0x1b6)],'versionTag':_0x500bcd[_0x29c261(0x1c2)]};}function toPreviewItem(_0x1e0504){const _0x326f2f=a138_0x463b4b;return{'pageId':_0x1e0504[_0x326f2f(0x1b5)]['pageId'],'type':_0x1e0504[_0x326f2f(0x1b5)][_0x326f2f(0x19e)],'title':_0x1e0504[_0x326f2f(0x1b5)]['name'],'localPath':_0x1e0504[_0x326f2f(0x1b8)],'status':_0x1e0504[_0x326f2f(0x1bd)],..._0x1e0504[_0x326f2f(0x197)]?{'reason':_0x1e0504[_0x326f2f(0x197)]}:{}};}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const pagePush: CommandDefinition;
@@ -1 +1 @@
1
- const a139_0x4c4699=a139_0x1321;(function(_0x1b3347,_0x433427){const _0x26811f=a139_0x1321,_0x3e806b=_0x1b3347();while(!![]){try{const _0x11a1b6=parseInt(_0x26811f(0xc3))/0x1*(parseInt(_0x26811f(0xa5))/0x2)+parseInt(_0x26811f(0xcd))/0x3+parseInt(_0x26811f(0xd9))/0x4+-parseInt(_0x26811f(0xd2))/0x5+parseInt(_0x26811f(0x94))/0x6+parseInt(_0x26811f(0x91))/0x7*(parseInt(_0x26811f(0xd1))/0x8)+parseInt(_0x26811f(0xc2))/0x9*(-parseInt(_0x26811f(0xb0))/0xa);if(_0x11a1b6===_0x433427)break;else _0x3e806b['push'](_0x3e806b['shift']());}catch(_0x3341e6){_0x3e806b['push'](_0x3e806b['shift']());}}}(a139_0x2096,0xd6a17));import{readFile,writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{updatePage}from'../../core/api-client.js';import{computePageContentHash,computePageFileHash,computeSerializedSchemaHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';function a139_0x1321(_0x129f7f,_0x3eb8e7){_0x129f7f=_0x129f7f-0x8c;const _0x20968b=a139_0x2096();let _0x1321ed=_0x20968b[_0x129f7f];return _0x1321ed;}export const pagePush={'service':'page','command':a139_0x4c4699(0x95),'description':'Push\x20local\x20page\x20schema\x20back\x20to\x20remote','risk':a139_0x4c4699(0x97),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a139_0x4c4699(0xca),'description':'Page\x20ID'},DATASETCODE_FLAG_OPTIONAL,{'name':a139_0x4c4699(0x92),'type':a139_0x4c4699(0xbc),'description':a139_0x4c4699(0xa0)},{'name':'version-tag','type':a139_0x4c4699(0xbc),'description':a139_0x4c4699(0x96)}],async 'validate'(_0xf17c83){validatePageTargetSelector(_0xf17c83);},async 'dryRun'(_0x1bbac2){const _0x3a33ba=a139_0x4c4699,_0x477293=await buildPushPreview(_0x1bbac2);return{'method':_0x3a33ba(0xb3),'url':'/smartapi/lovrabet/update-page','body':{'appCode':_0x1bbac2[_0x3a33ba(0xab)],'mode':_0x477293[_0x3a33ba(0xc8)],'datasetCode':_0x477293[_0x3a33ba(0x9e)]??null,'pages':_0x477293[_0x3a33ba(0x8c)]},'description':serializeDryRunDescription({'mode':_0x477293[_0x3a33ba(0xc8)],'datasetCode':_0x477293[_0x3a33ba(0x9e)]??null,'totalWouldPush':_0x477293[_0x3a33ba(0x8c)][_0x3a33ba(0xdb)](_0x3122a8=>_0x3122a8[_0x3a33ba(0xae)]===_0x3a33ba(0xbd))['length'],'totalUnchanged':_0x477293['items'][_0x3a33ba(0xdb)](_0x345489=>_0x345489['status']===_0x3a33ba(0x9c))[_0x3a33ba(0xd0)],'totalConflicts':_0x477293[_0x3a33ba(0x8c)]['filter'](_0x3f605a=>_0x3f605a[_0x3a33ba(0xae)]==='conflict'||_0x3f605a[_0x3a33ba(0xae)]===_0x3a33ba(0x93))['length']})};},async 'execute'(_0x254ac0){const _0x3054e0=a139_0x4c4699,_0x46b3a1=loadPageProjectConfig(_0x254ac0[_0x3054e0(0xab)]),_0x4b382c=await readPageLockFile(_0x46b3a1[_0x3054e0(0xa7)]),{lockData:_0x4f6fd1,appLock:_0x5447bd}=ensurePageLockScope(_0x4b382c??createEmptyPageLock(),_0x254ac0[_0x3054e0(0xab)]),_0xb1635d=getPageIdFlag(_0x254ac0);if(_0xb1635d!==undefined){const _0xce9712=await prepareSinglePush(_0x254ac0,_0x46b3a1,_0x5447bd[_0x3054e0(0xb5)][String(_0xb1635d)],_0xb1635d),_0x2adc87=await pushPreparedPage(_0x254ac0,_0xce9712);return _0x5447bd[_0x3054e0(0xb5)][String(_0x2adc87['pageId'])]=_0x2adc87[_0x3054e0(0xa3)],_0x5447bd[_0x3054e0(0xc5)]=new Date()[_0x3054e0(0xc6)](),await writePageLockFile(_0x46b3a1[_0x3054e0(0xa7)],_0x4f6fd1),{'ok':!![],'message':_0x2adc87[_0x3054e0(0xce)]?'推送成功,服务端已规范化\x20schema':_0x3054e0(0xa9),'data':{'appCode':_0x254ac0[_0x3054e0(0xab)],'pushedPages':[{'pageId':_0x2adc87[_0x3054e0(0xdf)],'type':_0x2adc87['type'],'title':_0x2adc87[_0x3054e0(0xa6)],'normalized':_0x2adc87[_0x3054e0(0xce)]}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x344113=await buildBatchPushPlan(_0x254ac0,_0x5447bd['pages']),_0x2db771=[],_0xabf1db=[],_0x210e04=[];for(const _0x16bafc of _0x344113[_0x3054e0(0x9c)]){_0xabf1db[_0x3054e0(0x95)](_0x16bafc);}for(const _0x9c5ef7 of _0x344113[_0x3054e0(0x9b)]){try{const _0x2e226f=await prepareSinglePush(_0x254ac0,_0x46b3a1,_0x5447bd[_0x3054e0(0xb5)][String(_0x9c5ef7[_0x3054e0(0xdf)])],_0x9c5ef7[_0x3054e0(0xdf)],_0x344113[_0x3054e0(0x99)]),_0xbaf6b0=await pushPreparedPage(_0x254ac0,_0x2e226f);_0x5447bd['pages'][String(_0xbaf6b0[_0x3054e0(0xdf)])]=_0xbaf6b0[_0x3054e0(0xa3)],_0x2db771[_0x3054e0(0x95)]({'pageId':_0xbaf6b0['pageId'],'type':_0xbaf6b0[_0x3054e0(0xa8)],'title':_0xbaf6b0[_0x3054e0(0xa6)],'normalized':_0xbaf6b0['normalized']});}catch(_0x459123){_0x210e04['push']({'pageId':_0x9c5ef7[_0x3054e0(0xdf)],'type':_0x9c5ef7['type'],'title':_0x9c5ef7[_0x3054e0(0xa6)],'reason':_0x459123 instanceof Error?_0x459123[_0x3054e0(0xc1)]:String(_0x459123)});}}return _0x5447bd[_0x3054e0(0xc5)]=new Date()[_0x3054e0(0xc6)](),await writePageLockFile(_0x46b3a1[_0x3054e0(0xa7)],_0x4f6fd1),{'ok':_0x210e04[_0x3054e0(0xd0)]===0x0||_0x2db771['length']>0x0||_0xabf1db['length']>0x0,'message':_0x210e04[_0x3054e0(0xd0)]>0x0&&_0x2db771[_0x3054e0(0xd0)]>0x0?_0x3054e0(0xda):_0x2db771[_0x3054e0(0xd0)]>0x0?'推送成功':_0xabf1db['length']>0x0&&_0x210e04[_0x3054e0(0xd0)]===0x0?_0x3054e0(0xc4):_0x210e04[0x0]?.[_0x3054e0(0xb6)]||_0x3054e0(0xa2),'data':{'appCode':_0x254ac0[_0x3054e0(0xab)],'pushedPages':_0x2db771,'skippedPages':_0xabf1db,'failedPages':_0x210e04,'totalPushed':_0x2db771[_0x3054e0(0xd0)],'totalSkipped':_0xabf1db[_0x3054e0(0xd0)],'totalFailed':_0x210e04[_0x3054e0(0xd0)]}};}};function a139_0x2096(){const _0x9399bf=['normalized','remoteDetail','length','7112ImhYnW','7349350xApVWE','remote\x20pageVersion\x20changed','utf8','UNKNOWN','deleted','\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.','`\x20first.','6283504GEKxuL','部分页面推送失败','filter','validation','single','version-tag','pageId','code','items','\x20page\x20pull\x20--id\x20','No\x20lock\x20record\x20found\x20for\x20page\x20','map','relatedPages','13783CkiRhc','alias','blocked','2148456MZnfVw','push','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','write','hash','datasetId','localContent','candidates','unchanged','Page\x20','datasetCode','localPath','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','batch','推送失败','nextLockEntry','str','2dBcmQr','title','lockFilePath','type','推送成功','no\x20changes','appCode','includes','values','status','pageVersion','10PgMEJu','\x20page\x20pull\x20--datasetcode\x20','parse','POST','apiError','pages','reason','`\x20first','versionTag','name','page-','datasetIds','string','would_push','Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20','Remote\x20page\x20','all','message','23853411FmtIla','778669BgnaGu','无变更需要推送','lastSync','toISOString','has','mode','conflict','number','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','Run\x20`','1623942gdakIX'];a139_0x2096=function(){return _0x9399bf;};return a139_0x2096();}async function buildPushPreview(_0x330553){const _0x4f4467=a139_0x4c4699,_0x179cf1=loadPageProjectConfig(_0x330553['appCode']),_0x4b2a16=await readPageLockFile(_0x179cf1[_0x4f4467(0xa7)]),{appLock:_0x2db706}=ensurePageLockScope(_0x4b2a16??createEmptyPageLock(),_0x330553['appCode']),_0x2accfb=getPageIdFlag(_0x330553);if(_0x2accfb!==undefined)return{'mode':_0x4f4467(0xdd),'items':[await inspectPushPage(_0x330553,_0x179cf1,_0x2db706[_0x4f4467(0xb5)][String(_0x2accfb)],_0x2accfb)]};const _0x879a72=await buildBatchPushPlan(_0x330553,_0x2db706['pages']);return{'mode':_0x4f4467(0xa1),'datasetCode':_0x879a72['datasetCode'],'items':[..._0x879a72['unchanged'][_0x4f4467(0x8f)](_0x5e63ce=>({'pageId':_0x5e63ce[_0x4f4467(0xdf)],'type':_0x5e63ce[_0x4f4467(0xa8)],'title':_0x5e63ce[_0x4f4467(0xa6)],'localPath':_0x5e63ce[_0x4f4467(0x9f)],'status':_0x4f4467(0x9c),'reason':_0x5e63ce[_0x4f4467(0xb6)]})),...await Promise[_0x4f4467(0xc0)](_0x879a72[_0x4f4467(0x9b)]['map'](_0x58eeec=>inspectPushPage(_0x330553,_0x179cf1,_0x2db706[_0x4f4467(0xb5)][String(_0x58eeec[_0x4f4467(0xdf)])],_0x58eeec[_0x4f4467(0xdf)],_0x879a72[_0x4f4467(0x99)])))]};}async function buildBatchPushPlan(_0x4221fe,_0x1acb56){const _0x481f93=a139_0x4c4699,_0x5a1acb=loadPageProjectConfig(_0x4221fe[_0x481f93(0xab)]),_0xeff904=await loadDatasetDetailForPage(_0x4221fe),_0x33e911=_0xeff904['id'],_0xee59b2=new Set(_0xeff904[_0x481f93(0x90)][_0x481f93(0xdb)](_0x33e040=>!_0x33e040[_0x481f93(0xd6)])['map'](_0x2d24e3=>_0x2d24e3['id'])),_0x582676=Object[_0x481f93(0xad)](_0x1acb56)[_0x481f93(0xdb)](_0x37914c=>_0x37914c[_0x481f93(0xbb)]['includes'](_0x33e911)&&_0xee59b2[_0x481f93(0xc7)](_0x37914c[_0x481f93(0xdf)]));if(_0x582676['length']===0x0)throw CliErrors[_0x481f93(0xdc)](_0x481f93(0xcb)+_0xeff904[_0x481f93(0xe0)]+'\x22.',_0x481f93(0xcc)+CLI_BIN_NAME+_0x481f93(0xb1)+_0xeff904['code']+_0x481f93(0xd8));const _0x33c439=selectVersionTagGroup(_0x582676,_0x5347fb=>_0x5347fb['versionTag']??null,_0x4221fe[_0x481f93(0xa4)](_0x481f93(0xde))),_0x15d557=[],_0x1ea49b=[];for(const _0x90c94f of _0x33c439[_0x481f93(0x8c)]){const _0x3d9889=resolvePageFilePath(_0x5a1acb,_0x90c94f[_0x481f93(0xdf)],_0x90c94f['type']);if(!await fileExists(_0x3d9889)){_0x15d557[_0x481f93(0x95)]({'pageId':_0x90c94f['pageId'],'type':_0x90c94f['type'],'title':_0x90c94f[_0x481f93(0xa6)]});continue;}const _0x1835a0=await computePageFileHash(_0x3d9889);if(_0x1835a0===_0x90c94f[_0x481f93(0x98)]){_0x1ea49b[_0x481f93(0x95)]({'pageId':_0x90c94f[_0x481f93(0xdf)],'type':_0x90c94f[_0x481f93(0xa8)],'title':_0x90c94f[_0x481f93(0xa6)],'localPath':_0x3d9889,'reason':_0x481f93(0xaa)});continue;}_0x15d557['push']({'pageId':_0x90c94f['pageId'],'type':_0x90c94f[_0x481f93(0xa8)],'title':_0x90c94f[_0x481f93(0xa6)]});}return{'datasetCode':_0xeff904['code'],'datasetId':_0x33e911,'candidates':_0x15d557,'unchanged':_0x1ea49b};}async function inspectPushPage(_0x1fa1e1,_0x29f728,_0x8a2ce,_0x4de28e,_0x581a96){const _0x5cefc5=a139_0x4c4699;if(!_0x8a2ce)return{'pageId':_0x4de28e,'type':_0x5cefc5(0xd5),'title':_0x5cefc5(0xba)+_0x4de28e,'localPath':resolvePageFilePath(_0x29f728,_0x4de28e,_0x5cefc5(0xd5)),'status':_0x5cefc5(0x93),'reason':_0x5cefc5(0xcc)+CLI_BIN_NAME+_0x5cefc5(0x8d)+_0x4de28e+_0x5cefc5(0xb7)};const _0x37a9a5=resolvePageFilePath(_0x29f728,_0x4de28e,_0x8a2ce[_0x5cefc5(0xa8)]);if(!await fileExists(_0x37a9a5))return{'pageId':_0x4de28e,'type':_0x8a2ce[_0x5cefc5(0xa8)],'title':_0x8a2ce['title'],'localPath':_0x37a9a5,'status':_0x5cefc5(0x93),'reason':'Local\x20file\x20not\x20found:\x20'+_0x37a9a5};const _0x18c0b7=await readFile(_0x37a9a5,'utf8');try{JSON[_0x5cefc5(0xb2)](_0x18c0b7);}catch{return{'pageId':_0x4de28e,'type':_0x8a2ce[_0x5cefc5(0xa8)],'title':_0x8a2ce[_0x5cefc5(0xa6)],'localPath':_0x37a9a5,'status':_0x5cefc5(0x93),'reason':'local\x20JSON\x20is\x20invalid'};}const _0x9cc253=computePageContentHash(_0x18c0b7);if(_0x9cc253===_0x8a2ce[_0x5cefc5(0x98)])return{'pageId':_0x4de28e,'type':_0x8a2ce[_0x5cefc5(0xa8)],'title':_0x8a2ce[_0x5cefc5(0xa6)],'localPath':_0x37a9a5,'status':_0x5cefc5(0x9c),'reason':_0x5cefc5(0xaa)};try{const _0x3a469d=await loadPageDetailForPage(_0x1fa1e1,_0x4de28e);if(_0x581a96!=null&&!_0x3a469d[_0x5cefc5(0xbb)][_0x5cefc5(0xac)](_0x581a96))return{'pageId':_0x4de28e,'type':_0x8a2ce[_0x5cefc5(0xa8)],'title':_0x8a2ce['title'],'localPath':_0x37a9a5,'status':_0x5cefc5(0xc9),'reason':_0x5cefc5(0x9d)+_0x4de28e+'\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset'};const _0xc10bb0=_0x8a2ce[_0x5cefc5(0xaf)]!=null&&_0x3a469d[_0x5cefc5(0xaf)]!=null;if(_0xc10bb0&&_0x8a2ce[_0x5cefc5(0xaf)]!==_0x3a469d[_0x5cefc5(0xaf)])return{'pageId':_0x4de28e,'type':_0x8a2ce[_0x5cefc5(0xa8)],'title':_0x8a2ce['title'],'localPath':_0x37a9a5,'status':'conflict','reason':_0x5cefc5(0xd3)};if(!_0xc10bb0&&computeSerializedSchemaHash(_0x3a469d['code'])!==_0x8a2ce['hash'])return{'pageId':_0x4de28e,'type':_0x8a2ce[_0x5cefc5(0xa8)],'title':_0x8a2ce['title'],'localPath':_0x37a9a5,'status':_0x5cefc5(0xc9),'reason':'remote\x20schema\x20changed'};}catch(_0xb983b0){return{'pageId':_0x4de28e,'type':_0x8a2ce[_0x5cefc5(0xa8)],'title':_0x8a2ce[_0x5cefc5(0xa6)],'localPath':_0x37a9a5,'status':_0x5cefc5(0x93),'reason':_0xb983b0 instanceof Error?_0xb983b0[_0x5cefc5(0xc1)]:String(_0xb983b0)};}return{'pageId':_0x4de28e,'type':_0x8a2ce[_0x5cefc5(0xa8)],'title':_0x8a2ce['title'],'localPath':_0x37a9a5,'status':_0x5cefc5(0xbd)};}async function prepareSinglePush(_0x58cb94,_0x182ec7,_0x38a5d7,_0x156ff8,_0xa435be){const _0x5d90af=a139_0x4c4699;if(!_0x38a5d7)throw CliErrors['validation'](_0x5d90af(0x8e)+_0x156ff8+'.',_0x5d90af(0xcc)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x156ff8+_0x5d90af(0xd8));const _0x903e38=resolvePageFilePath(_0x182ec7,_0x156ff8,_0x38a5d7[_0x5d90af(0xa8)]);if(!await fileExists(_0x903e38))throw CliErrors[_0x5d90af(0xdc)]('Local\x20file\x20not\x20found:\x20'+_0x903e38,'Run\x20`'+CLI_BIN_NAME+_0x5d90af(0x8d)+_0x156ff8+_0x5d90af(0xd8));const _0x4cab30=await readFile(_0x903e38,_0x5d90af(0xd4));try{JSON[_0x5d90af(0xb2)](_0x4cab30);}catch{throw CliErrors[_0x5d90af(0xdc)](_0x5d90af(0xbe)+_0x903e38);}const _0x3b9042=await loadPageDetailForPage(_0x58cb94,_0x156ff8);if(_0xa435be!=null&&!_0x3b9042['datasetIds'][_0x5d90af(0xac)](_0xa435be))throw CliErrors[_0x5d90af(0xdc)](_0x5d90af(0x9d)+_0x156ff8+_0x5d90af(0xd7));const _0x54f2d9=_0x38a5d7[_0x5d90af(0xaf)]!=null&&_0x3b9042['pageVersion']!=null;if(_0x54f2d9){if(_0x38a5d7[_0x5d90af(0xaf)]!==_0x3b9042[_0x5d90af(0xaf)])throw CliErrors[_0x5d90af(0xdc)](_0x5d90af(0xbf)+_0x156ff8+'\x20has\x20changed\x20since\x20last\x20pull.',_0x5d90af(0xcc)+CLI_BIN_NAME+_0x5d90af(0x8d)+_0x156ff8+_0x5d90af(0xd8));}else{const _0x1d54bd=computeSerializedSchemaHash(_0x3b9042['code']);if(_0x1d54bd!==_0x38a5d7[_0x5d90af(0x98)])throw CliErrors[_0x5d90af(0xdc)](_0x5d90af(0xbf)+_0x156ff8+'\x20has\x20changed\x20since\x20last\x20pull.',_0x5d90af(0xcc)+CLI_BIN_NAME+_0x5d90af(0x8d)+_0x156ff8+_0x5d90af(0xd8));}return{'lockEntry':_0x38a5d7,'localPath':_0x903e38,'localContent':_0x4cab30,'localHash':computePageContentHash(_0x4cab30),'remoteDetail':_0x3b9042};}async function pushPreparedPage(_0x3399ed,_0x43d26a){const _0x2dc4c7=a139_0x4c4699,_0x233754=await updatePage(_0x3399ed[_0x2dc4c7(0xab)],_0x43d26a[_0x2dc4c7(0xcf)]['pageId'],_0x43d26a[_0x2dc4c7(0x9a)],_0x43d26a[_0x2dc4c7(0xcf)][_0x2dc4c7(0xbb)]);if(!_0x233754)throw CliErrors[_0x2dc4c7(0xb4)]('Page\x20update\x20failed:\x20'+_0x43d26a[_0x2dc4c7(0xcf)][_0x2dc4c7(0xdf)]);const _0x29c022=await loadPageDetailForPage(_0x3399ed,_0x43d26a[_0x2dc4c7(0xcf)][_0x2dc4c7(0xdf)]),_0x12ed49=serializePageSchemaForFile(_0x29c022[_0x2dc4c7(0xe0)]);return await writeFile(_0x43d26a[_0x2dc4c7(0x9f)],_0x12ed49,_0x2dc4c7(0xd4)),{'pageId':_0x29c022[_0x2dc4c7(0xdf)],'type':_0x29c022[_0x2dc4c7(0xa8)],'title':_0x29c022['name'],'normalized':_0x12ed49!==serializePageSchemaForFile(_0x43d26a[_0x2dc4c7(0x9a)]),'nextLockEntry':{'hash':computePageContentHash(_0x12ed49),'pageId':_0x29c022[_0x2dc4c7(0xdf)],'pageVersion':_0x29c022[_0x2dc4c7(0xaf)],'type':_0x29c022[_0x2dc4c7(0xa8)],'title':_0x29c022[_0x2dc4c7(0xb9)],'datasetIds':_0x29c022[_0x2dc4c7(0xbb)],'versionTag':_0x29c022[_0x2dc4c7(0xb8)]}};}
1
+ const a139_0x14c924=a139_0x4dc5;function a139_0x4dc5(_0x539ed9,_0x423293){_0x539ed9=_0x539ed9-0x89;const _0x76aef9=a139_0x76ae();let _0x4dc5fd=_0x76aef9[_0x539ed9];return _0x4dc5fd;}function a139_0x76ae(){const _0x53c79b=['\x20page\x20pull\x20--datasetcode\x20','2427804Tviszl','localContent','remoteDetail','推送成功,服务端已规范化\x20schema','Local\x20file\x20not\x20found:\x20','nextLockEntry','parse','UNKNOWN','single','str','batch','推送成功','\x20page\x20pull\x20--id\x20','push','mode','toISOString','utf8','pageId','lockFilePath','values','pageVersion','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','996496qvRrHR','145tUoVec','`\x20first','pages','relatedPages','hash','normalized','\x20has\x20changed\x20since\x20last\x20pull.','3286703WCtiFe','11448NRqqrd','13227220WJOcZS','Run\x20`','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','page','无变更需要推送','Remote\x20page\x20','includes','candidates','type','470427PBpNqd','status','reason','compress','message','9dRFPqA','datasetId','\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.','blocked','`\x20first.','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','localPath','unchanged','number','page-','name','title','versionTag','datasetIds','Page\x20','no\x20changes','items','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','conflict','202UbOmVf','alias','string','local\x20JSON\x20is\x20invalid','validation','datasetCode','推送失败','lastSync','would_push','map','code','length','version-tag','remote\x20schema\x20changed','/smartapi/lovrabet/update-page','all','86820jMMuMi','Page\x20ID','No\x20lock\x20record\x20found\x20for\x20page\x20','filter','appCode'];a139_0x76ae=function(){return _0x53c79b;};return a139_0x76ae();}(function(_0x277c67,_0x521c14){const _0x423bc6=a139_0x4dc5,_0x382b64=_0x277c67();while(!![]){try{const _0x269b21=parseInt(_0x423bc6(0x95))/0x1+parseInt(_0x423bc6(0xad))/0x2*(-parseInt(_0x423bc6(0x8b))/0x3)+parseInt(_0x423bc6(0xbd))/0x4*(parseInt(_0x423bc6(0xda))/0x5)+parseInt(_0x423bc6(0xc3))/0x6+parseInt(_0x423bc6(0x8a))/0x7+parseInt(_0x423bc6(0xd9))/0x8+parseInt(_0x423bc6(0x9a))/0x9*(-parseInt(_0x423bc6(0x8c))/0xa);if(_0x269b21===_0x521c14)break;else _0x382b64['push'](_0x382b64['shift']());}catch(_0xb07f44){_0x382b64['push'](_0x382b64['shift']());}}}(a139_0x76ae,0x5f53b));import{readFile,writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{updatePage}from'../../core/api-client.js';import{computePageContentHash,computePageFileHash,computeSerializedSchemaHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePush={'service':a139_0x14c924(0x8f),'command':a139_0x14c924(0xd0),'description':a139_0x14c924(0x8e),'risk':'write','defaultOutputFormat':a139_0x14c924(0x98),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a139_0x14c924(0xa2),'description':a139_0x14c924(0xbe)},DATASETCODE_FLAG_OPTIONAL,{'name':a139_0x14c924(0xae),'type':'string','description':a139_0x14c924(0xab)},{'name':a139_0x14c924(0xb9),'type':a139_0x14c924(0xaf),'description':a139_0x14c924(0x9f)}],async 'validate'(_0x2821d8){validatePageTargetSelector(_0x2821d8);},async 'dryRun'(_0x325752){const _0x4e38f7=a139_0x14c924,_0x279792=await buildPushPreview(_0x325752);return{'method':'POST','url':_0x4e38f7(0xbb),'body':{'appCode':_0x325752[_0x4e38f7(0xc1)],'mode':_0x279792[_0x4e38f7(0xd1)],'datasetCode':_0x279792[_0x4e38f7(0xb2)]??null,'pages':_0x279792[_0x4e38f7(0xaa)]},'description':serializeDryRunDescription({'mode':_0x279792['mode'],'datasetCode':_0x279792[_0x4e38f7(0xb2)]??null,'totalWouldPush':_0x279792['items'][_0x4e38f7(0xc0)](_0x5f34f6=>_0x5f34f6[_0x4e38f7(0x96)]===_0x4e38f7(0xb5))[_0x4e38f7(0xb8)],'totalUnchanged':_0x279792[_0x4e38f7(0xaa)][_0x4e38f7(0xc0)](_0x566f96=>_0x566f96[_0x4e38f7(0x96)]===_0x4e38f7(0xa1))['length'],'totalConflicts':_0x279792['items']['filter'](_0x57b413=>_0x57b413[_0x4e38f7(0x96)]==='conflict'||_0x57b413[_0x4e38f7(0x96)]===_0x4e38f7(0x9d))[_0x4e38f7(0xb8)]})};},async 'execute'(_0x7836e1){const _0x3e953a=a139_0x14c924,_0x7a0dff=loadPageProjectConfig(_0x7836e1[_0x3e953a(0xc1)]),_0x4dfc3a=await readPageLockFile(_0x7a0dff[_0x3e953a(0xd5)]),{lockData:_0x2bb959,appLock:_0x5bcf32}=ensurePageLockScope(_0x4dfc3a??createEmptyPageLock(),_0x7836e1['appCode']),_0x2b082a=getPageIdFlag(_0x7836e1);if(_0x2b082a!==undefined){const _0x47bf15=await prepareSinglePush(_0x7836e1,_0x7a0dff,_0x5bcf32[_0x3e953a(0xdc)][String(_0x2b082a)],_0x2b082a),_0x580602=await pushPreparedPage(_0x7836e1,_0x47bf15);return _0x5bcf32[_0x3e953a(0xdc)][String(_0x580602['pageId'])]=_0x580602[_0x3e953a(0xc8)],_0x5bcf32[_0x3e953a(0xb4)]=new Date()['toISOString'](),await writePageLockFile(_0x7a0dff['lockFilePath'],_0x2bb959),{'ok':!![],'message':_0x580602[_0x3e953a(0xdf)]?_0x3e953a(0xc6):_0x3e953a(0xce),'data':{'appCode':_0x7836e1[_0x3e953a(0xc1)],'pushedPages':[{'pageId':_0x580602[_0x3e953a(0xd4)],'type':_0x580602[_0x3e953a(0x94)],'title':_0x580602[_0x3e953a(0xa5)],'normalized':_0x580602[_0x3e953a(0xdf)]}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x47914f=await buildBatchPushPlan(_0x7836e1,_0x5bcf32[_0x3e953a(0xdc)]),_0x5d6026=[],_0x538ae3=[],_0x5cfbff=[];for(const _0x5345a9 of _0x47914f['unchanged']){_0x538ae3['push'](_0x5345a9);}for(const _0x31bf23 of _0x47914f[_0x3e953a(0x93)]){try{const _0x583e2d=await prepareSinglePush(_0x7836e1,_0x7a0dff,_0x5bcf32[_0x3e953a(0xdc)][String(_0x31bf23[_0x3e953a(0xd4)])],_0x31bf23['pageId'],_0x47914f[_0x3e953a(0x9b)]),_0x5ce989=await pushPreparedPage(_0x7836e1,_0x583e2d);_0x5bcf32[_0x3e953a(0xdc)][String(_0x5ce989[_0x3e953a(0xd4)])]=_0x5ce989['nextLockEntry'],_0x5d6026['push']({'pageId':_0x5ce989[_0x3e953a(0xd4)],'type':_0x5ce989['type'],'title':_0x5ce989[_0x3e953a(0xa5)],'normalized':_0x5ce989['normalized']});}catch(_0x4bc45d){_0x5cfbff[_0x3e953a(0xd0)]({'pageId':_0x31bf23['pageId'],'type':_0x31bf23['type'],'title':_0x31bf23[_0x3e953a(0xa5)],'reason':_0x4bc45d instanceof Error?_0x4bc45d[_0x3e953a(0x99)]:String(_0x4bc45d)});}}return _0x5bcf32[_0x3e953a(0xb4)]=new Date()[_0x3e953a(0xd2)](),await writePageLockFile(_0x7a0dff[_0x3e953a(0xd5)],_0x2bb959),{'ok':_0x5cfbff['length']===0x0||_0x5d6026[_0x3e953a(0xb8)]>0x0||_0x538ae3['length']>0x0,'message':_0x5cfbff[_0x3e953a(0xb8)]>0x0&&_0x5d6026[_0x3e953a(0xb8)]>0x0?'部分页面推送失败':_0x5d6026[_0x3e953a(0xb8)]>0x0?_0x3e953a(0xce):_0x538ae3[_0x3e953a(0xb8)]>0x0&&_0x5cfbff[_0x3e953a(0xb8)]===0x0?_0x3e953a(0x90):_0x5cfbff[0x0]?.[_0x3e953a(0x97)]||_0x3e953a(0xb3),'data':{'appCode':_0x7836e1[_0x3e953a(0xc1)],'pushedPages':_0x5d6026,'skippedPages':_0x538ae3,'failedPages':_0x5cfbff,'totalPushed':_0x5d6026['length'],'totalSkipped':_0x538ae3['length'],'totalFailed':_0x5cfbff['length']}};}};async function buildPushPreview(_0x29127e){const _0x13342=a139_0x14c924,_0x420082=loadPageProjectConfig(_0x29127e[_0x13342(0xc1)]),_0x132727=await readPageLockFile(_0x420082[_0x13342(0xd5)]),{appLock:_0x74f890}=ensurePageLockScope(_0x132727??createEmptyPageLock(),_0x29127e[_0x13342(0xc1)]),_0xf78850=getPageIdFlag(_0x29127e);if(_0xf78850!==undefined)return{'mode':_0x13342(0xcb),'items':[await inspectPushPage(_0x29127e,_0x420082,_0x74f890['pages'][String(_0xf78850)],_0xf78850)]};const _0xcb0ee0=await buildBatchPushPlan(_0x29127e,_0x74f890['pages']);return{'mode':_0x13342(0xcd),'datasetCode':_0xcb0ee0[_0x13342(0xb2)],'items':[..._0xcb0ee0[_0x13342(0xa1)][_0x13342(0xb6)](_0x5bc9b5=>({'pageId':_0x5bc9b5[_0x13342(0xd4)],'type':_0x5bc9b5[_0x13342(0x94)],'title':_0x5bc9b5['title'],'localPath':_0x5bc9b5[_0x13342(0xa0)],'status':_0x13342(0xa1),'reason':_0x5bc9b5[_0x13342(0x97)]})),...await Promise[_0x13342(0xbc)](_0xcb0ee0[_0x13342(0x93)][_0x13342(0xb6)](_0x3b8afc=>inspectPushPage(_0x29127e,_0x420082,_0x74f890[_0x13342(0xdc)][String(_0x3b8afc['pageId'])],_0x3b8afc[_0x13342(0xd4)],_0xcb0ee0[_0x13342(0x9b)])))]};}async function buildBatchPushPlan(_0x5b149a,_0x49ff16){const _0x36b991=a139_0x14c924,_0x214d06=loadPageProjectConfig(_0x5b149a[_0x36b991(0xc1)]),_0x4fb8b6=await loadDatasetDetailForPage(_0x5b149a),_0x47f8cb=_0x4fb8b6['id'],_0x4a0af1=new Set(_0x4fb8b6[_0x36b991(0xdd)][_0x36b991(0xc0)](_0x15de2b=>!_0x15de2b['deleted'])[_0x36b991(0xb6)](_0x2e1530=>_0x2e1530['id'])),_0x3173e2=Object[_0x36b991(0xd6)](_0x49ff16)[_0x36b991(0xc0)](_0x13f71c=>_0x13f71c['datasetIds']['includes'](_0x47f8cb)&&_0x4a0af1['has'](_0x13f71c[_0x36b991(0xd4)]));if(_0x3173e2['length']===0x0)throw CliErrors[_0x36b991(0xb1)](_0x36b991(0xd8)+_0x4fb8b6[_0x36b991(0xb7)]+'\x22.',_0x36b991(0x8d)+CLI_BIN_NAME+_0x36b991(0xc2)+_0x4fb8b6[_0x36b991(0xb7)]+_0x36b991(0x9e));const _0x223b57=selectVersionTagGroup(_0x3173e2,_0x2da697=>_0x2da697[_0x36b991(0xa6)]??null,_0x5b149a[_0x36b991(0xcc)](_0x36b991(0xb9))),_0x2e3bf2=[],_0x213a9c=[];for(const _0x2e5b8a of _0x223b57[_0x36b991(0xaa)]){const _0x30549b=resolvePageFilePath(_0x214d06,_0x2e5b8a[_0x36b991(0xd4)],_0x2e5b8a[_0x36b991(0x94)]);if(!await fileExists(_0x30549b)){_0x2e3bf2[_0x36b991(0xd0)]({'pageId':_0x2e5b8a[_0x36b991(0xd4)],'type':_0x2e5b8a[_0x36b991(0x94)],'title':_0x2e5b8a['title']});continue;}const _0x3c7d0a=await computePageFileHash(_0x30549b);if(_0x3c7d0a===_0x2e5b8a['hash']){_0x213a9c[_0x36b991(0xd0)]({'pageId':_0x2e5b8a[_0x36b991(0xd4)],'type':_0x2e5b8a[_0x36b991(0x94)],'title':_0x2e5b8a[_0x36b991(0xa5)],'localPath':_0x30549b,'reason':'no\x20changes'});continue;}_0x2e3bf2[_0x36b991(0xd0)]({'pageId':_0x2e5b8a[_0x36b991(0xd4)],'type':_0x2e5b8a['type'],'title':_0x2e5b8a[_0x36b991(0xa5)]});}return{'datasetCode':_0x4fb8b6[_0x36b991(0xb7)],'datasetId':_0x47f8cb,'candidates':_0x2e3bf2,'unchanged':_0x213a9c};}async function inspectPushPage(_0x3711d1,_0x3381bc,_0x27388f,_0x9b26bc,_0x3a9555){const _0x43304c=a139_0x14c924;if(!_0x27388f)return{'pageId':_0x9b26bc,'type':_0x43304c(0xca),'title':_0x43304c(0xa3)+_0x9b26bc,'localPath':resolvePageFilePath(_0x3381bc,_0x9b26bc,_0x43304c(0xca)),'status':'blocked','reason':_0x43304c(0x8d)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x9b26bc+_0x43304c(0xdb)};const _0x381065=resolvePageFilePath(_0x3381bc,_0x9b26bc,_0x27388f['type']);if(!await fileExists(_0x381065))return{'pageId':_0x9b26bc,'type':_0x27388f[_0x43304c(0x94)],'title':_0x27388f[_0x43304c(0xa5)],'localPath':_0x381065,'status':_0x43304c(0x9d),'reason':_0x43304c(0xc7)+_0x381065};const _0x3132ea=await readFile(_0x381065,_0x43304c(0xd3));try{JSON['parse'](_0x3132ea);}catch{return{'pageId':_0x9b26bc,'type':_0x27388f[_0x43304c(0x94)],'title':_0x27388f[_0x43304c(0xa5)],'localPath':_0x381065,'status':_0x43304c(0x9d),'reason':_0x43304c(0xb0)};}const _0x1e23dc=computePageContentHash(_0x3132ea);if(_0x1e23dc===_0x27388f['hash'])return{'pageId':_0x9b26bc,'type':_0x27388f['type'],'title':_0x27388f[_0x43304c(0xa5)],'localPath':_0x381065,'status':_0x43304c(0xa1),'reason':_0x43304c(0xa9)};try{const _0x52e19b=await loadPageDetailForPage(_0x3711d1,_0x9b26bc);if(_0x3a9555!=null&&!_0x52e19b[_0x43304c(0xa7)][_0x43304c(0x92)](_0x3a9555))return{'pageId':_0x9b26bc,'type':_0x27388f[_0x43304c(0x94)],'title':_0x27388f[_0x43304c(0xa5)],'localPath':_0x381065,'status':_0x43304c(0xac),'reason':'Page\x20'+_0x9b26bc+'\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset'};const _0x2a7532=_0x27388f[_0x43304c(0xd7)]!=null&&_0x52e19b['pageVersion']!=null;if(_0x2a7532&&_0x27388f[_0x43304c(0xd7)]!==_0x52e19b['pageVersion'])return{'pageId':_0x9b26bc,'type':_0x27388f[_0x43304c(0x94)],'title':_0x27388f[_0x43304c(0xa5)],'localPath':_0x381065,'status':_0x43304c(0xac),'reason':'remote\x20pageVersion\x20changed'};if(!_0x2a7532&&computeSerializedSchemaHash(_0x52e19b[_0x43304c(0xb7)])!==_0x27388f[_0x43304c(0xde)])return{'pageId':_0x9b26bc,'type':_0x27388f[_0x43304c(0x94)],'title':_0x27388f[_0x43304c(0xa5)],'localPath':_0x381065,'status':_0x43304c(0xac),'reason':_0x43304c(0xba)};}catch(_0x1bce55){return{'pageId':_0x9b26bc,'type':_0x27388f[_0x43304c(0x94)],'title':_0x27388f[_0x43304c(0xa5)],'localPath':_0x381065,'status':'blocked','reason':_0x1bce55 instanceof Error?_0x1bce55[_0x43304c(0x99)]:String(_0x1bce55)};}return{'pageId':_0x9b26bc,'type':_0x27388f['type'],'title':_0x27388f[_0x43304c(0xa5)],'localPath':_0x381065,'status':_0x43304c(0xb5)};}async function prepareSinglePush(_0x2623b6,_0x335306,_0x423a97,_0x234ef0,_0x40653f){const _0x62398=a139_0x14c924;if(!_0x423a97)throw CliErrors[_0x62398(0xb1)](_0x62398(0xbf)+_0x234ef0+'.',_0x62398(0x8d)+CLI_BIN_NAME+_0x62398(0xcf)+_0x234ef0+'`\x20first.');const _0x3c3b43=resolvePageFilePath(_0x335306,_0x234ef0,_0x423a97[_0x62398(0x94)]);if(!await fileExists(_0x3c3b43))throw CliErrors[_0x62398(0xb1)](_0x62398(0xc7)+_0x3c3b43,'Run\x20`'+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x234ef0+_0x62398(0x9e));const _0x47aa81=await readFile(_0x3c3b43,_0x62398(0xd3));try{JSON[_0x62398(0xc9)](_0x47aa81);}catch{throw CliErrors[_0x62398(0xb1)]('Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20'+_0x3c3b43);}const _0x2f3d06=await loadPageDetailForPage(_0x2623b6,_0x234ef0);if(_0x40653f!=null&&!_0x2f3d06[_0x62398(0xa7)][_0x62398(0x92)](_0x40653f))throw CliErrors[_0x62398(0xb1)](_0x62398(0xa8)+_0x234ef0+_0x62398(0x9c));const _0x17037f=_0x423a97[_0x62398(0xd7)]!=null&&_0x2f3d06[_0x62398(0xd7)]!=null;if(_0x17037f){if(_0x423a97[_0x62398(0xd7)]!==_0x2f3d06['pageVersion'])throw CliErrors['validation'](_0x62398(0x91)+_0x234ef0+_0x62398(0x89),_0x62398(0x8d)+CLI_BIN_NAME+_0x62398(0xcf)+_0x234ef0+'`\x20first.');}else{const _0x2a5ddc=computeSerializedSchemaHash(_0x2f3d06[_0x62398(0xb7)]);if(_0x2a5ddc!==_0x423a97[_0x62398(0xde)])throw CliErrors['validation']('Remote\x20page\x20'+_0x234ef0+'\x20has\x20changed\x20since\x20last\x20pull.','Run\x20`'+CLI_BIN_NAME+_0x62398(0xcf)+_0x234ef0+_0x62398(0x9e));}return{'lockEntry':_0x423a97,'localPath':_0x3c3b43,'localContent':_0x47aa81,'localHash':computePageContentHash(_0x47aa81),'remoteDetail':_0x2f3d06};}async function pushPreparedPage(_0x117f8e,_0x1fc557){const _0x375f7a=a139_0x14c924,_0x2c533d=await updatePage(_0x117f8e['appCode'],_0x1fc557['remoteDetail'][_0x375f7a(0xd4)],_0x1fc557[_0x375f7a(0xc4)],_0x1fc557[_0x375f7a(0xc5)]['datasetIds']);if(!_0x2c533d)throw CliErrors['apiError']('Page\x20update\x20failed:\x20'+_0x1fc557[_0x375f7a(0xc5)][_0x375f7a(0xd4)]);const _0x417b05=await loadPageDetailForPage(_0x117f8e,_0x1fc557[_0x375f7a(0xc5)][_0x375f7a(0xd4)]),_0x4ea05d=serializePageSchemaForFile(_0x417b05[_0x375f7a(0xb7)]);return await writeFile(_0x1fc557[_0x375f7a(0xa0)],_0x4ea05d,_0x375f7a(0xd3)),{'pageId':_0x417b05[_0x375f7a(0xd4)],'type':_0x417b05[_0x375f7a(0x94)],'title':_0x417b05[_0x375f7a(0xa4)],'normalized':_0x4ea05d!==serializePageSchemaForFile(_0x1fc557['localContent']),'nextLockEntry':{'hash':computePageContentHash(_0x4ea05d),'pageId':_0x417b05[_0x375f7a(0xd4)],'pageVersion':_0x417b05[_0x375f7a(0xd7)],'type':_0x417b05[_0x375f7a(0x94)],'title':_0x417b05[_0x375f7a(0xa4)],'datasetIds':_0x417b05[_0x375f7a(0xa7)],'versionTag':_0x417b05[_0x375f7a(0xa6)]}};}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const pageRelationAudit: CommandDefinition;