@lovrabet/rabetbase-cli 2.4.3 → 2.4.4

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 (381) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.d.ts +2 -0
  87. package/lib/commands/db/diff-refresh-start.js +1 -0
  88. package/lib/commands/db/diff-refresh-status.d.ts +2 -0
  89. package/lib/commands/db/diff-refresh-status.js +1 -0
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.d.ts +2 -0
  137. package/lib/commands/notification/config-create.js +1 -0
  138. package/lib/commands/notification/config-delete.d.ts +2 -0
  139. package/lib/commands/notification/config-delete.js +1 -0
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.d.ts +2 -0
  142. package/lib/commands/notification/config-update.js +1 -0
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.d.ts +97 -0
  145. package/lib/commands/notification/shared.js +1 -0
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/generate-start.js +1 -1
  148. package/lib/commands/page/generate-status.js +1 -1
  149. package/lib/commands/page/index.js +1 -1
  150. package/lib/commands/page/pull.js +1 -1
  151. package/lib/commands/page/push.js +1 -1
  152. package/lib/commands/page/react/create.js +1 -1
  153. package/lib/commands/page/react/detail.js +1 -1
  154. package/lib/commands/page/react/list.js +1 -1
  155. package/lib/commands/page/react/publish.js +1 -1
  156. package/lib/commands/page/react/shared.js +1 -1
  157. package/lib/commands/page/react/syntax.js +1 -1
  158. package/lib/commands/page/react/template.js +1 -1
  159. package/lib/commands/page/react/update.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/standard-page-status.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/permit/index.js +1 -1
  166. package/lib/commands/permit/page-get.js +1 -1
  167. package/lib/commands/permit/page-set.js +1 -1
  168. package/lib/commands/permit/role-apis-set.js +1 -1
  169. package/lib/commands/permit/role-menus-set.js +1 -1
  170. package/lib/commands/permit/role-menus.js +1 -1
  171. package/lib/commands/permit/shared.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.d.ts +1 -0
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
  177. package/lib/commands/project/create/materialize-project-template.js +1 -0
  178. package/lib/commands/project/create/project-name.d.ts +2 -0
  179. package/lib/commands/project/create/project-name.js +1 -0
  180. package/lib/commands/project/create/project-template-archive.d.ts +6 -0
  181. package/lib/commands/project/create/project-template-archive.js +1 -0
  182. package/lib/commands/project/create/project-template-path.d.ts +1 -3
  183. package/lib/commands/project/create/project-template-path.js +1 -1
  184. package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/index.js +1 -1
  189. package/lib/commands/project/upgrade.js +1 -1
  190. package/lib/commands/registry.js +1 -1
  191. package/lib/commands/role/create.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/run/index.js +1 -1
  202. package/lib/commands/schema.js +1 -1
  203. package/lib/commands/sql/create.js +1 -1
  204. package/lib/commands/sql/delete.js +1 -1
  205. package/lib/commands/sql/detail.js +1 -1
  206. package/lib/commands/sql/exec.js +1 -1
  207. package/lib/commands/sql/index.js +1 -1
  208. package/lib/commands/sql/list.js +1 -1
  209. package/lib/commands/sql/pull.js +1 -1
  210. package/lib/commands/sql/push.js +1 -1
  211. package/lib/commands/sql/shared.js +1 -1
  212. package/lib/commands/sql/status.js +1 -1
  213. package/lib/commands/sql/validate.js +1 -1
  214. package/lib/commands/task/index.js +1 -1
  215. package/lib/commands/task/status.js +1 -1
  216. package/lib/commands/tenant/index.js +1 -1
  217. package/lib/commands/tenant/members-list.js +1 -1
  218. package/lib/commands/tenant/shared.js +1 -1
  219. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  220. package/lib/commands/user-account/index.js +1 -1
  221. package/lib/commands/workspace/add.js +1 -1
  222. package/lib/commands/workspace/index.js +1 -1
  223. package/lib/commands/workspace/remove.js +1 -1
  224. package/lib/config/schema.js +1 -1
  225. package/lib/constant/cdn.d.ts +2 -0
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.js +1 -1
  230. package/lib/constant/env.js +1 -1
  231. package/lib/constant/output.js +1 -1
  232. package/lib/constant/paths.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/context/app-resolver.js +1 -1
  235. package/lib/context/auth-resolver.js +1 -1
  236. package/lib/context/config-loader.js +1 -1
  237. package/lib/context.d.ts +1 -1
  238. package/lib/context.js +1 -1
  239. package/lib/core/alias-resolver.js +1 -1
  240. package/lib/core/api-client.d.ts +29 -2
  241. package/lib/core/api-client.js +1 -1
  242. package/lib/core/bff/config.js +1 -1
  243. package/lib/core/bff/file-system.js +1 -1
  244. package/lib/core/bff/hash.js +1 -1
  245. package/lib/core/bff/lock.js +1 -1
  246. package/lib/core/bff/utils.js +1 -1
  247. package/lib/core/db-resolver.js +1 -1
  248. package/lib/core/page/file-system.js +1 -1
  249. package/lib/core/page/hash.js +1 -1
  250. package/lib/core/page/lock.js +1 -1
  251. package/lib/core/sql-index-auditor.js +1 -1
  252. package/lib/core/sql-sync/config.js +1 -1
  253. package/lib/core/sql-sync/file-system.js +1 -1
  254. package/lib/core/sql-sync/hash.js +1 -1
  255. package/lib/core/sql-sync/lock.js +1 -1
  256. package/lib/core/sql-sync/utils.js +1 -1
  257. package/lib/core/sql-validator.js +1 -1
  258. package/lib/errors.js +1 -1
  259. package/lib/framework/build-all-flags.js +1 -1
  260. package/lib/framework/error-output.js +1 -1
  261. package/lib/framework/explicit-yes.js +1 -1
  262. package/lib/framework/flags.js +1 -1
  263. package/lib/framework/help.js +1 -1
  264. package/lib/framework/index.js +1 -1
  265. package/lib/framework/output.js +1 -1
  266. package/lib/framework/response.js +1 -1
  267. package/lib/framework/runner-alias.js +1 -1
  268. package/lib/framework/runner.js +1 -1
  269. package/lib/framework/schema-export.js +1 -1
  270. package/lib/framework/types.js +1 -1
  271. package/lib/generated/build-info.d.ts +4 -4
  272. package/lib/generated/build-info.js +1 -1
  273. package/lib/help.js +1 -1
  274. package/lib/postinstall.js +1 -1
  275. package/lib/runtime/confirmation.js +1 -1
  276. package/lib/runtime/event.js +1 -1
  277. package/lib/runtime/index.js +1 -1
  278. package/lib/runtime/queue.js +1 -1
  279. package/lib/runtime/resolve.js +1 -1
  280. package/lib/skills/builtin-skill.js +1 -1
  281. package/lib/skills/main.js +1 -1
  282. package/lib/skills/npx-skills-add.js +1 -1
  283. package/lib/skills/skill-presence.js +1 -1
  284. package/lib/telemetry/cli-command-trace.js +1 -1
  285. package/lib/telemetry/cli-help-trace.js +1 -1
  286. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  287. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  288. package/lib/telemetry/send-cli-trace-log.js +1 -1
  289. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  290. package/lib/utils/ai_config.js +1 -1
  291. package/lib/utils/apply-jq-filter.js +1 -1
  292. package/lib/utils/cdn-config.js +1 -1
  293. package/lib/utils/check-sdk-version.js +1 -1
  294. package/lib/utils/cli-version-check.js +1 -1
  295. package/lib/utils/cli-version-policy.d.ts +13 -0
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/rules-cdn.js +1 -1
  307. package/lib/utils/sleep.js +1 -1
  308. package/lib/utils/template-replacer.js +1 -1
  309. package/lib/utils/update-notice.js +1 -1
  310. package/lib/utils/version.js +1 -1
  311. package/lib/utils/with-active-cookie.js +1 -1
  312. package/lib/utils/write-cli-side-channel.js +1 -1
  313. package/package.json +9 -4
  314. package/skills/rabetbase/SKILL.md +33 -22
  315. package/skills/rabetbase/guides/backend-function.md +5 -3
  316. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
  317. package/skills/rabetbase/guides/conflict-detection.md +2 -2
  318. package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
  320. package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
  321. package/skills/rabetbase/guides/sql-mybatis.md +2 -2
  322. package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
  323. package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
  324. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  325. package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
  326. package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
  327. package/skills/rabetbase/references/rabetbase-config.md +2 -2
  328. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  329. package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
  330. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
  331. package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
  332. package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-kb.md +5 -3
  334. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
  335. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
  336. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
  337. package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
  338. package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
  339. package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
  340. package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
  342. package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
  343. package/skills/rabetbase/references/rabetbase-run.md +1 -1
  344. package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
  345. package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
  346. package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
  347. package/skills/rabetbase.manifest.json +5 -5
  348. package/templates/README.md +14 -2
  349. package/lib/commands/project/create/non-interactive.d.ts +0 -9
  350. package/lib/commands/project/create/non-interactive.js +0 -1
  351. package/lib/utils/copy-directory.d.ts +0 -1
  352. package/lib/utils/copy-directory.js +0 -1
  353. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
  354. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
  355. package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
  356. package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
  357. package/templates/projects/sub-app-react-demo/README.md +0 -246
  358. package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
  359. package/templates/projects/sub-app-react-demo/index.html +0 -27
  360. package/templates/projects/sub-app-react-demo/package.json +0 -34
  361. package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
  362. package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
  363. package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
  364. package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
  365. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
  366. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
  367. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
  368. package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
  369. package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
  370. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
  371. package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
  372. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
  373. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
  374. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
  375. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
  376. package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
  377. package/templates/projects/sub-app-react-demo/src/style.css +0 -108
  378. package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
  379. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
  380. package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
  381. package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
@@ -0,0 +1 @@
1
+ const a135_0x4ced75=a135_0x58d7;(function(_0x5edc94,_0x4d3cf8){const _0x13ea26=a135_0x58d7,_0x12720b=_0x5edc94();while(!![]){try{const _0x2c6a6c=-parseInt(_0x13ea26(0xc4))/0x1*(-parseInt(_0x13ea26(0xc8))/0x2)+-parseInt(_0x13ea26(0xb8))/0x3+parseInt(_0x13ea26(0xc2))/0x4*(parseInt(_0x13ea26(0xc7))/0x5)+-parseInt(_0x13ea26(0xca))/0x6*(parseInt(_0x13ea26(0xb5))/0x7)+-parseInt(_0x13ea26(0xd1))/0x8+parseInt(_0x13ea26(0xc6))/0x9*(-parseInt(_0x13ea26(0xc0))/0xa)+parseInt(_0x13ea26(0xc5))/0xb;if(_0x2c6a6c===_0x4d3cf8)break;else _0x12720b['push'](_0x12720b['shift']());}catch(_0x51d528){_0x12720b['push'](_0x12720b['shift']());}}}(a135_0x4853,0x2d3ad));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a135_0x4ced75(0xbc),REFERENCE_WARNING=a135_0x4ced75(0xce);function a135_0x4853(){const _0x1c0634=['mutation','/notification/channel-config/delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','planned','POST','282660RuWYGX','high-risk-write','16XCooKq','channelType','115131pBPZcV','10320365IeuFZy','81NluJHm','272510aytNZE','2KYvGYt','unshift','6OUDAkE','verified','notification_config_delete_verification_unavailable','Deleted\x20notification\x20config\x20','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','Inspect\x20with\x20','notification_config_delete_outcome_unknown','1842224eDEBod',';\x20no\x20automatic\x20retry\x20was\x20attempted.','delete','Notification\x20config\x20','notification','2554237vyXnes',';\x20do\x20not\x20resubmit\x20automatically.','before','709590EmLhGf','appCode','\x20remains\x20present\x20after\x20delete.'];a135_0x4853=function(){return _0x1c0634;};return a135_0x4853();}function a135_0x58d7(_0x56e327,_0xbd7e0d){_0x56e327=_0x56e327-0xb5;const _0x4853e5=a135_0x4853();let _0x58d7e6=_0x4853e5[_0x56e327];return _0x58d7e6;}async function prepareDelete(_0x34a246){const _0x3e71cd=a135_0x4ced75,_0x5f3b5a=readNotificationId(_0x34a246),_0x31082a=await requireExactNotificationConfig(_0x34a246['appCode'],_0x5f3b5a,_0x3e71cd(0xd3));return{'id':_0x5f3b5a,'before':_0x31082a};}export const notificationConfigDelete={'service':a135_0x4ced75(0xd5),'command':'config-delete','description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a135_0x4ced75(0xc1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x3954f5){readNotificationId(_0x3954f5),requireNotificationExplicitYes(_0x3954f5);},async 'dryRun'(_0x2457be){const _0x4621d7=a135_0x4ced75,_0x409562=await prepareDelete(_0x2457be),_0x101bc1=notificationLookupCommand(_0x2457be[_0x4621d7(0xb9)],_0x409562[_0x4621d7(0xb7)][_0x4621d7(0xc3)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x409562['before']),'before':projectNotificationConfig(_0x409562[_0x4621d7(0xb7)]),'after':null,'dryRun':!![],'backend':{'method':_0x4621d7(0xbf),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x4621d7(0xbe),'lookupCommand':_0x101bc1}},{'method':_0x4621d7(0xbf),'url':DELETE_PATH});},async 'execute'(_0x49b197){const _0x20f956=a135_0x4ced75;requireNotificationExplicitYes(_0x49b197);const _0x5efbc4=await prepareDelete(_0x49b197),_0x3b0c1b=notificationLookupCommand(_0x49b197[_0x20f956(0xb9)],_0x5efbc4[_0x20f956(0xb7)][_0x20f956(0xc3)]);let _0x22e42f=![];try{await deleteNotificationChannelConfig(_0x5efbc4['id'],_0x49b197['appCode']);}catch(_0x1bf61d){if(!isPlatformTransportFailure(_0x1bf61d))throw safeApiFailure('delete',_0x20f956(0xbb),_0x20f956(0xcf)+_0x3b0c1b+_0x20f956(0xd2));_0x22e42f=!![];}let _0x43838e;try{_0x43838e=await listNotificationChannelConfigs(_0x49b197['appCode'],_0x5efbc4[_0x20f956(0xb7)][_0x20f956(0xc3)]),validateNotificationDeleteReadback(_0x43838e,_0x49b197['appCode'],_0x5efbc4[_0x20f956(0xb7)][_0x20f956(0xc3)]);}catch{throw notificationError(_0x22e42f?'notification_config_delete_outcome_unknown':_0x20f956(0xcc),_0x20f956(0xd4)+_0x5efbc4['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x20f956(0xcf)+_0x3b0c1b+_0x20f956(0xb6));}if(_0x43838e['some'](_0x18854e=>_0x18854e['id']===_0x5efbc4['id']))throw notificationError(_0x22e42f?_0x20f956(0xd0):'notification_config_delete_verification_failed',_0x20f956(0xd4)+_0x5efbc4['id']+_0x20f956(0xba),_0x20f956(0xcf)+_0x3b0c1b+_0x20f956(0xb6));const _0x47cfdc=[REFERENCE_WARNING];return _0x22e42f&&_0x47cfdc[_0x20f956(0xc9)](_0x20f956(0xbd)),{'ok':!![],'data':{'operation':_0x20f956(0xd3),'selector':notificationSelector(_0x5efbc4[_0x20f956(0xb7)]),'before':projectNotificationConfig(_0x5efbc4[_0x20f956(0xb7)]),'after':null,'dryRun':![],'backend':{'method':_0x20f956(0xbf),'path':DELETE_PATH},'warnings':_0x47cfdc,'verification':{'status':_0x20f956(0xcb),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x22e42f,'lookupCommand':_0x3b0c1b}},'message':_0x20f956(0xcd)+_0x5efbc4['id']};}};
@@ -1 +1 @@
1
- const a132_0x2f2dfe=a132_0x396d;(function(_0x5925b3,_0x59c006){const _0x1003fc=a132_0x396d,_0x2fbd40=_0x5925b3();while(!![]){try{const _0x2ff623=parseInt(_0x1003fc(0x1e7))/0x1+parseInt(_0x1003fc(0x1f6))/0x2*(parseInt(_0x1003fc(0x1e8))/0x3)+parseInt(_0x1003fc(0x1f5))/0x4*(parseInt(_0x1003fc(0x1db))/0x5)+-parseInt(_0x1003fc(0x1e1))/0x6+parseInt(_0x1003fc(0x1dd))/0x7+parseInt(_0x1003fc(0x1e0))/0x8+-parseInt(_0x1003fc(0x1f4))/0x9;if(_0x2ff623===_0x59c006)break;else _0x2fbd40['push'](_0x2fbd40['shift']());}catch(_0x376536){_0x2fbd40['push'](_0x2fbd40['shift']());}}}(a132_0x23cc,0x662d5));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_0x2f2dfe(0x1de),a132_0x2f2dfe(0x1ed),a132_0x2f2dfe(0x1f8),a132_0x2f2dfe(0x1d8),a132_0x2f2dfe(0x1e6)];export const notificationConfigList={'service':a132_0x2f2dfe(0x1eb),'command':a132_0x2f2dfe(0x1e3),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a132_0x2f2dfe(0x1e9),'type':a132_0x2f2dfe(0x1d9),'description':a132_0x2f2dfe(0x1f9),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x2f2dfe(0x1de)}],async 'validate'(_0xc16bdc){readChannelType(_0xc16bdc);},async 'execute'(_0x5f2db0){const _0x419597=a132_0x2f2dfe,_0x56c968=readChannelType(_0x5f2db0),_0x342968=await listNotificationChannelConfigs(_0x5f2db0[_0x419597(0x1e4)],_0x56c968),_0x259269=_0x342968[_0x419597(0x1f7)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x5f2db0[_0x419597(0x1e4)],'channelType':_0x56c968,'count':_0x259269[_0x419597(0x1da)],'configs':_0x259269},'message':_0x419597(0x1ee)+_0x259269[_0x419597(0x1da)]+'\x20'+_0x56c968+_0x419597(0x1f2)};}};function readChannelType(_0xfbc42e){const _0x3441f6=a132_0x2f2dfe,_0x4f08ae=_0xfbc42e['str'](_0x3441f6(0x1e9))[_0x3441f6(0x1d6)]()||_0x3441f6(0x1de);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4f08ae))throw CliErrors['validation'](_0x3441f6(0x1dc)+_0x4f08ae,_0x3441f6(0x1ec)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x4f08ae;}function projectNotificationConfig(_0x4581cf,_0x1c71b2){const _0x5606cd=a132_0x2f2dfe;return{'id':typeof _0x4581cf['id']===_0x5606cd(0x1ea)?_0x4581cf['id']:null,'configCode':requireConfigString(_0x4581cf,_0x5606cd(0x1f1),_0x1c71b2),'configName':requireConfigString(_0x4581cf,_0x5606cd(0x1f0),_0x1c71b2),'channelType':requireConfigString(_0x4581cf,'channelType',_0x1c71b2),'description':normalizeNullableString(_0x4581cf[_0x5606cd(0x1d7)]),'createTime':normalizeNullableString(_0x4581cf[_0x5606cd(0x1f3)]),'updateTime':normalizeNullableString(_0x4581cf[_0x5606cd(0x1e5)])};}function a132_0x396d(_0x4d5225,_0x3492c7){_0x4d5225=_0x4d5225-0x1d6;const _0x23cc4e=a132_0x23cc();let _0x396dbd=_0x23cc4e[_0x4d5225];return _0x396dbd;}function requireConfigString(_0x26239e,_0x3f9004,_0x2beaa1){const _0x7831e5=a132_0x2f2dfe,_0x3142c8=_0x26239e[_0x3f9004];if(typeof _0x3142c8!==_0x7831e5(0x1d9)||_0x3142c8[_0x7831e5(0x1d6)]()==='')throw CliErrors[_0x7831e5(0x1e2)](_0x7831e5(0x1ef),'Item\x20'+(_0x2beaa1+0x1)+_0x7831e5(0x1df)+_0x3f9004+'\x22.');return _0x3142c8['trim']();}function a132_0x23cc(){const _0x3f4521=['2414948Tbxlqn','63690KhDrLa','map','DINGTALK','Notification\x20channel\x20type','trim','description','WECOM','string','length','5vJUyak','Invalid\x20--type:\x20','939351IwPaoq','EMAIL','\x20is\x20missing\x20required\x20field\x20\x22','3289128lYVHup','1624620lkkyHH','apiError','config-list','appCode','updateTime','WEBHOOK','69619ynDLzR','15lgDKlk','type','number','notification','Allowed\x20values:\x20','FEISHU','Found\x20','Invalid\x20notification\x20config\x20response.','configName','configCode','\x20notification\x20config(s)','createTime','6197652RQCIRm'];a132_0x23cc=function(){return _0x3f4521;};return a132_0x23cc();}function normalizeNullableString(_0x5f56b2){const _0x24a089=a132_0x2f2dfe;return typeof _0x5f56b2===_0x24a089(0x1d9)?_0x5f56b2:null;}
1
+ const a136_0x3a49e6=a136_0x267a;function a136_0x267a(_0x3faa67,_0x3e78d){_0x3faa67=_0x3faa67-0x137;const _0x508932=a136_0x5089();let _0x267abe=_0x508932[_0x3faa67];return _0x267abe;}function a136_0x5089(){const _0x5b1dfe=['\x20notification\x20config(s)','7667464FbXBIY','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','2153098piRkGz','EMAIL','read','Notification\x20channel\x20type','13118409JHIVGI','notification','83876JRosGJ','appCode','length','config-list','1YbjgVW','1783645ODouCy','5581440vjLHlx','18hSJUea','type','map','3435817QYPygK'];a136_0x5089=function(){return _0x5b1dfe;};return a136_0x5089();}(function(_0x3ae51c,_0x54dc30){const _0x3e7e48=a136_0x267a,_0x58a39b=_0x3ae51c();while(!![]){try{const _0x6dccb5=parseInt(_0x3e7e48(0x146))/0x1*(parseInt(_0x3e7e48(0x13c))/0x2)+-parseInt(_0x3e7e48(0x149))/0x3*(-parseInt(_0x3e7e48(0x142))/0x4)+parseInt(_0x3e7e48(0x147))/0x5+-parseInt(_0x3e7e48(0x148))/0x6+-parseInt(_0x3e7e48(0x138))/0x7+-parseInt(_0x3e7e48(0x13a))/0x8+parseInt(_0x3e7e48(0x140))/0x9;if(_0x6dccb5===_0x54dc30)break;else _0x58a39b['push'](_0x58a39b['shift']());}catch(_0x338d4a){_0x58a39b['push'](_0x58a39b['shift']());}}}(a136_0x5089,0x9b905));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a136_0x3a49e6(0x141),'command':a136_0x3a49e6(0x145),'description':a136_0x3a49e6(0x13b),'risk':a136_0x3a49e6(0x13e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a136_0x3a49e6(0x14a),'type':'string','description':a136_0x3a49e6(0x13f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a136_0x3a49e6(0x13d)}],async 'validate'(_0x3c2814){readNotificationChannelType(_0x3c2814);},async 'execute'(_0x511912){const _0xad6ed9=a136_0x3a49e6,_0x2e1e6d=readNotificationChannelType(_0x511912),_0x144ea6=await listNotificationChannelConfigs(_0x511912[_0xad6ed9(0x143)],_0x2e1e6d),_0xd29a9=_0x144ea6[_0xad6ed9(0x137)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x511912[_0xad6ed9(0x143)],'channelType':_0x2e1e6d,'count':_0xd29a9['length'],'configs':_0xd29a9},'message':'Found\x20'+_0xd29a9[_0xad6ed9(0x144)]+'\x20'+_0x2e1e6d+_0xad6ed9(0x139)};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationConfigUpdate: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a137_0x5e875d=a137_0x4153;(function(_0xc5c261,_0x2bd16d){const _0x2ab87e=a137_0x4153,_0x3adf2a=_0xc5c261();while(!![]){try{const _0x2362ca=-parseInt(_0x2ab87e(0x137))/0x1*(-parseInt(_0x2ab87e(0x143))/0x2)+parseInt(_0x2ab87e(0x128))/0x3+-parseInt(_0x2ab87e(0x145))/0x4+-parseInt(_0x2ab87e(0x13d))/0x5+-parseInt(_0x2ab87e(0x138))/0x6*(-parseInt(_0x2ab87e(0x13b))/0x7)+parseInt(_0x2ab87e(0x12a))/0x8*(parseInt(_0x2ab87e(0x12d))/0x9)+-parseInt(_0x2ab87e(0x139))/0xa;if(_0x2362ca===_0x2bd16d)break;else _0x3adf2a['push'](_0x3adf2a['shift']());}catch(_0x9a15f8){_0x3adf2a['push'](_0x3adf2a['shift']());}}}(a137_0x5a24,0xc2616));function a137_0x5a24(){const _0x3ab2ba=['/notification/channel-config/update','Inspect\x20ID\x20','Updated\x20notification\x20config\x20','allMatch','update','21gvsCGX','990294EOFUOy','4725520ZICAJP','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','7fAheLz','POST','5926885STqOex','Notification\x20config\x20','Inspect\x20with\x20--id\x20','notification_config_update_verification_failed','config-update','verified','62156nfacVU','mutation','3250708kExBUi','planned','\x20via\x20','notification_config_update_outcome_unknown','payload','before','verifiedFields','notification','4634481BrQCbp',';\x20do\x20not\x20resubmit\x20automatically.','516728sSJvFP','channelType','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','126GXpstY','\x20with\x20','high-risk-write','appCode','notification_config_update_verification_unavailable'];a137_0x5a24=function(){return _0x3ab2ba;};return a137_0x5a24();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a137_0x4153(_0x1ea0ec,_0x44c02c){_0x1ea0ec=_0x1ea0ec-0x125;const _0x5a24dc=a137_0x5a24();let _0x4153a7=_0x5a24dc[_0x1ea0ec];return _0x4153a7;}import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a137_0x5e875d(0x132);async function prepareUpdate(_0x3bc5f7){const _0x261598=a137_0x5e875d,_0x463b0c=readNotificationId(_0x3bc5f7),_0x44c1f6=await readNotificationDocument(_0x3bc5f7,_0x261598(0x136)),_0x3e0d24=await requireExactNotificationConfig(_0x3bc5f7[_0x261598(0x130)],_0x463b0c,_0x261598(0x136));return{'id':_0x463b0c,'patch':_0x44c1f6,'before':_0x3e0d24,'payload':mergeUpdateInput(_0x3e0d24,_0x44c1f6),'planned':plannedUpdateProjection(_0x3e0d24,_0x44c1f6)};}export const notificationConfigUpdate={'service':a137_0x5e875d(0x127),'command':a137_0x5e875d(0x141),'description':a137_0x5e875d(0x12c),'risk':a137_0x5e875d(0x12f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1d57e3){readNotificationId(_0x1d57e3),assertSingleNotificationSource(_0x1d57e3),requireNotificationExplicitYes(_0x1d57e3);},async 'dryRun'(_0x3dbc0d){const _0x59221d=a137_0x5e875d,_0x39f6b0=await prepareUpdate(_0x3dbc0d),_0x5aa123=notificationLookupCommand(_0x3dbc0d[_0x59221d(0x130)],_0x39f6b0['before'][_0x59221d(0x12b)]);return asDryRunResult({'operation':_0x59221d(0x136),'selector':notificationSelector(_0x39f6b0[_0x59221d(0x125)]),'before':projectNotificationConfig(_0x39f6b0[_0x59221d(0x125)]),'after':_0x39f6b0[_0x59221d(0x146)],'dryRun':!![],'backend':{'method':_0x59221d(0x13c),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x59221d(0x146),'lookupCommand':_0x5aa123}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0xb27af){const _0xddd60e=a137_0x5e875d;requireNotificationExplicitYes(_0xb27af);const _0xebc5a2=await prepareUpdate(_0xb27af),_0x49bbb0=notificationLookupCommand(_0xb27af[_0xddd60e(0x130)],_0xebc5a2[_0xddd60e(0x125)][_0xddd60e(0x12b)]);let _0x2d4996=![];try{await updateNotificationChannelConfig(_0xebc5a2[_0xddd60e(0x149)]);}catch(_0x952de2){if(!isPlatformTransportFailure(_0x952de2))throw safeApiFailure(_0xddd60e(0x136),_0xddd60e(0x144),_0xddd60e(0x133)+_0xebc5a2['id']+_0xddd60e(0x12e)+_0x49bbb0+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x2d4996=!![];}let _0x5d1eec;try{const _0x2a4923=await getNotificationChannelConfig(_0xebc5a2['id'],_0xb27af[_0xddd60e(0x130)]);_0x5d1eec=normalizeExactNotificationConfig(_0x2a4923,_0xebc5a2['id'],_0xb27af[_0xddd60e(0x130)]);}catch{throw notificationError(_0x2d4996?_0xddd60e(0x148):_0xddd60e(0x131),_0xddd60e(0x13e)+_0xebc5a2['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0xddd60e(0x13f)+_0xebc5a2['id']+_0xddd60e(0x147)+_0x49bbb0+_0xddd60e(0x129));}const _0x2ccffa=requestedSafeFieldsMatch(_0xebc5a2[_0xddd60e(0x125)],_0x5d1eec,_0xebc5a2['patch']);if(!_0x2ccffa[_0xddd60e(0x135)]||_0x2d4996&&!_0x2ccffa['provesChange'])throw notificationError(_0x2d4996?_0xddd60e(0x148):_0xddd60e(0x140),'Notification\x20config\x20'+_0xebc5a2['id']+_0xddd60e(0x13a),'Inspect\x20with\x20--id\x20'+_0xebc5a2['id']+_0xddd60e(0x147)+_0x49bbb0+_0xddd60e(0x129));const _0x24d860=_0x2d4996?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0xddd60e(0x136),'selector':notificationSelector(_0x5d1eec),'before':projectNotificationConfig(_0xebc5a2[_0xddd60e(0x125)]),'after':projectNotificationConfig(_0x5d1eec),'dryRun':![],'backend':{'method':_0xddd60e(0x13c),'path':UPDATE_PATH},'warnings':_0x24d860,'verification':{'status':_0xddd60e(0x142),'recoveredAfterUnknownResponse':_0x2d4996,'verifiedFields':_0x2ccffa[_0xddd60e(0x126)],'lookupCommand':_0x49bbb0}},'message':_0xddd60e(0x134)+_0x5d1eec['id']};}};
@@ -1 +1 @@
1
- function a133_0x1817(){const _0x2f93e8=['5mRUHNo','8vdjkFm','183958VlmwoT','6117250bxwcbN','229062WVNZwm','9sPrVnM','424123vbOssC','32zbtzAx','18172693rlbCCQ','367386gyVZGw','297310mzMBto'];a133_0x1817=function(){return _0x2f93e8;};return a133_0x1817();}(function(_0x18ee1b,_0x50c302){const _0x5ec6b7=a133_0x532d,_0x29b5c2=_0x18ee1b();while(!![]){try{const _0x5d059d=-parseInt(_0x5ec6b7(0x1c8))/0x1+-parseInt(_0x5ec6b7(0x1cb))/0x2+-parseInt(_0x5ec6b7(0x1cd))/0x3*(-parseInt(_0x5ec6b7(0x1ca))/0x4)+-parseInt(_0x5ec6b7(0x1c9))/0x5*(parseInt(_0x5ec6b7(0x1c7))/0x6)+-parseInt(_0x5ec6b7(0x1c4))/0x7*(parseInt(_0x5ec6b7(0x1c5))/0x8)+parseInt(_0x5ec6b7(0x1c3))/0x9*(-parseInt(_0x5ec6b7(0x1cc))/0xa)+parseInt(_0x5ec6b7(0x1c6))/0xb;if(_0x5d059d===_0x50c302)break;else _0x29b5c2['push'](_0x29b5c2['shift']());}catch(_0x530d44){_0x29b5c2['push'](_0x29b5c2['shift']());}}}(a133_0x1817,0x7a1ca));function a133_0x532d(_0x1a791d,_0xc7faf9){_0x1a791d=_0x1a791d-0x1c3;const _0x181774=a133_0x1817();let _0x532d6c=_0x181774[_0x1a791d];return _0x532d6c;}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
1
+ (function(_0x2e0e5e,_0x15a2e7){const _0x5f3149=a138_0x2543,_0x191fb0=_0x2e0e5e();while(!![]){try{const _0xfa10a2=-parseInt(_0x5f3149(0x81))/0x1+-parseInt(_0x5f3149(0x82))/0x2*(parseInt(_0x5f3149(0x85))/0x3)+parseInt(_0x5f3149(0x7f))/0x4*(-parseInt(_0x5f3149(0x83))/0x5)+parseInt(_0x5f3149(0x84))/0x6+-parseInt(_0x5f3149(0x88))/0x7+parseInt(_0x5f3149(0x87))/0x8*(-parseInt(_0x5f3149(0x86))/0x9)+parseInt(_0x5f3149(0x80))/0xa;if(_0xfa10a2===_0x15a2e7)break;else _0x191fb0['push'](_0x191fb0['shift']());}catch(_0x2b3184){_0x191fb0['push'](_0x191fb0['shift']());}}}(a138_0x4827,0x4c089));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a138_0x2543(_0x3bf85e,_0xf76870){_0x3bf85e=_0x3bf85e-0x7f;const _0x482741=a138_0x4827();let _0x2543b7=_0x482741[_0x3bf85e];return _0x2543b7;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a138_0x4827(){const _0xa5e3ac=['4642jiAloW','9320ZhpluD','2638056SEsRlq','453MIAaXU','3025089ZUGlOL','8RytMbz','3946691YwADwg','964DrFmYI','17801940AtPVyA','208808ienzIu'];a138_0x4827=function(){return _0xa5e3ac;};return a138_0x4827();}
@@ -0,0 +1,97 @@
1
+ import type { NotificationChannelConfigItem, NotificationChannelConfigMutationInput, NotificationChannelType } from "../../core/api-client.js";
2
+ import { CliError } from "../../errors.js";
3
+ import type { CommandDefinition, FlagDef, RuntimeContext } from "../../framework/types.js";
4
+ export declare const NOTIFICATION_CHANNEL_TYPES: NotificationChannelType[];
5
+ export declare const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT = 5000;
6
+ export declare const DEFAULT_NOTIFICATION_READ_TIMEOUT = 10000;
7
+ type NotificationContext = Parameters<NonNullable<CommandDefinition["execute"]>>[0];
8
+ type JsonObject = Record<string, unknown>;
9
+ type SensitiveSource = {
10
+ kind: "file";
11
+ path: string;
12
+ } | {
13
+ kind: "stdin";
14
+ } | {
15
+ kind: "env";
16
+ name: string;
17
+ };
18
+ export interface NotificationConfigDocument {
19
+ configName?: string;
20
+ channelType?: NotificationChannelType;
21
+ endpointUrl?: string | null;
22
+ channelConfig?: JsonObject | null;
23
+ description?: string | null;
24
+ connectTimeout?: number | null;
25
+ readTimeout?: number | null;
26
+ }
27
+ export interface NotificationConfigProjection {
28
+ id: number | null;
29
+ appCode: string;
30
+ configCode: string | null;
31
+ configName: string;
32
+ channelType: NotificationChannelType;
33
+ endpointUrl: "<redacted>" | null;
34
+ channelConfig: "<redacted>" | null;
35
+ description: string | null;
36
+ connectTimeout: number | null;
37
+ readTimeout: number | null;
38
+ }
39
+ export interface ExactNotificationConfig extends NotificationConfigProjection {
40
+ id: number;
41
+ configCode: string;
42
+ endpointUrlRaw: string | null;
43
+ channelConfigRaw: string | null;
44
+ }
45
+ export declare const NOTIFICATION_INPUT_FLAGS: FlagDef[];
46
+ export declare const NOTIFICATION_ID_FLAG: FlagDef;
47
+ export declare const NOTIFICATION_APP_FLAG: FlagDef;
48
+ export declare function notificationError(code: string, message: string, hint?: string): CliError;
49
+ export declare function readNotificationId(ctx: NotificationContext): number;
50
+ export declare function requireNotificationExplicitYes(ctx: NotificationContext): void;
51
+ export declare function readNotificationChannelType(ctx: RuntimeContext | NotificationContext, flagName?: string, fallback?: string): NotificationChannelType;
52
+ export declare function assertSingleNotificationSource(ctx: NotificationContext): SensitiveSource;
53
+ export declare function readNotificationDocument(ctx: NotificationContext, mode: "create" | "update"): Promise<NotificationConfigDocument>;
54
+ export declare function projectNotificationListConfig(item: NotificationChannelConfigItem, index: number): {
55
+ id: number | null;
56
+ configCode: string;
57
+ configName: string;
58
+ channelType: string;
59
+ description: string | null;
60
+ createTime: string | null;
61
+ updateTime: string | null;
62
+ };
63
+ export declare function normalizeExactNotificationConfig(item: NotificationChannelConfigItem, expectedId: number, expectedAppCode: string): ExactNotificationConfig;
64
+ export declare function requireExactNotificationConfig(appCode: string, id: number, operation: "update" | "delete"): Promise<ExactNotificationConfig>;
65
+ export declare function projectNotificationConfig(value: {
66
+ id?: number | null;
67
+ appCode: string;
68
+ configCode?: string | null;
69
+ configName: string;
70
+ channelType: NotificationChannelType;
71
+ endpointUrl?: string | JsonObject | null;
72
+ channelConfig?: string | JsonObject | null;
73
+ description?: string | null;
74
+ connectTimeout?: number | null;
75
+ readTimeout?: number | null;
76
+ }): NotificationConfigProjection;
77
+ export declare function notificationSelector(record: ExactNotificationConfig): {
78
+ appCode: string;
79
+ id: number;
80
+ configCode: string;
81
+ configName: string;
82
+ channelType: NotificationChannelType;
83
+ };
84
+ export declare function createMutationInput(appCode: string, document: NotificationConfigDocument): NotificationChannelConfigMutationInput;
85
+ export declare function mergeUpdateInput(before: ExactNotificationConfig, patch: NotificationConfigDocument): NotificationChannelConfigMutationInput & {
86
+ id: number;
87
+ };
88
+ export declare function plannedUpdateProjection(before: ExactNotificationConfig, patch: NotificationConfigDocument): NotificationConfigProjection;
89
+ export declare function requestedSafeFieldsMatch(before: ExactNotificationConfig, after: ExactNotificationConfig, patch: NotificationConfigDocument): {
90
+ allMatch: boolean;
91
+ provesChange: boolean;
92
+ verifiedFields: string[];
93
+ };
94
+ export declare function validateNotificationDeleteReadback(items: NotificationChannelConfigItem[], appCode: string, channelType: NotificationChannelType): void;
95
+ export declare function safeApiFailure(operation: "create" | "update" | "delete", stage: "mutation" | "verification" | "preflight", hint: string): CliError;
96
+ export declare function notificationLookupCommand(appCode: string, channelType: NotificationChannelType): string;
97
+ export {};
@@ -0,0 +1 @@
1
+ function a139_0x32bf(){const _0x266aa5=['endpointUrl','<redacted>','preflight','bool','setEncoding','appCode','parse','notification_config_source_unavailable','\x20failed.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Application-level\x20notification\x20config\x20ID','\x20has\x20an\x20unsupported\x20channelType.','join','channelConfig','a\x20JSON\x20object','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','failed','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20from\x20','messageTemplate','246301eiyawi','\x22\x20must\x20be\x20a\x20non-empty\x20string.','update','EMAIL','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','WECOM','1225840quJCOk','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','70LuEhKF','a\x20string\x20or\x20null','4121Kxbazk','length','subjectPrefix','\x22\x20cannot\x20exceed\x20','connectTimeout','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','_unavailable','\x20is\x20missing\x20required\x20field\x20\x22','\x20has\x20invalid\x20field\x20\x22','env','notification_config_field_required','call','notification_config_channel_field_forbidden','updateTime','trim','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','164466StdINZ','recipients','a\x20non-empty\x20string','includes','configCode','channelConfigRaw','Notification\x20JSON\x20field\x20\x22','689622eqnhkG','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Allowed\x20values:\x20','44088fpCJyK','description','15ZpvYEM','FEISHU','boolean','configName','endpointUrlRaw','12928RZpptZ','Invalid\x20--','name','ccList','notification_config_confirmation_required','notification_config_response_invalid','notification_config_field_forbidden','string','environment\x20variable\x20','every','validation','Create\x20JSON\x20requires\x20field\x20','notification_config_id_invalid','file','stdin','from-env','prototype','replyTo','\x22configName\x22.','kind','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','some','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','has','str','notification_config_field_unknown','\x20is\x20invalid.','bccList','\x22\x20is\x20forbidden.','\x20--format\x20compress','push','readTimeout','WEBHOOK','Notification\x20config\x20','number','dry-run','591BaIVOt','248TbnDNi','emailTargets','hasOwnProperty','channelType','\x22\x20must\x20be\x20','path','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','fromName','notification_config_','keys','a\x20supported\x20string','endpointUrl:null','Invalid\x20notification\x20config\x20response.','create','isSafeInteger','2WvEJSX','a\x20JSON\x20object\x20or\x20null','Item\x20','notification_config_json_invalid','notification_config_field_invalid','stringify','file\x20','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x20characters.','589471fntJlx','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'];a139_0x32bf=function(){return _0x266aa5;};return a139_0x32bf();}const a139_0x2443f0=a139_0x5a80;(function(_0x5269fb,_0x3466dd){const _0x345c25=a139_0x5a80,_0x11dc5a=_0x5269fb();while(!![]){try{const _0x163184=parseInt(_0x345c25(0x1fd))/0x1*(-parseInt(_0x345c25(0x1f4))/0x2)+parseInt(_0x345c25(0x1e4))/0x3*(parseInt(_0x345c25(0x1c0))/0x4)+-parseInt(_0x345c25(0x1bb))/0x5*(parseInt(_0x345c25(0x1b6))/0x6)+parseInt(_0x345c25(0x19a))/0x7+-parseInt(_0x345c25(0x1e5))/0x8*(parseInt(_0x345c25(0x1af))/0x9)+-parseInt(_0x345c25(0x19c))/0xa*(parseInt(_0x345c25(0x194))/0xb)+parseInt(_0x345c25(0x1b9))/0xc*(parseInt(_0x345c25(0x19e))/0xd);if(_0x163184===_0x3466dd)break;else _0x11dc5a['push'](_0x11dc5a['shift']());}catch(_0x21af63){_0x11dc5a['push'](_0x11dc5a['shift']());}}}(a139_0x32bf,0x4ddf9));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a139_0x2443f0(0x197),a139_0x2443f0(0x1bc),'DINGTALK',a139_0x2443f0(0x199),a139_0x2443f0(0x1e0)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a139_0x2443f0(0x1be),a139_0x2443f0(0x1e8),'endpointUrl',a139_0x2443f0(0x18d),'description',a139_0x2443f0(0x1a2),a139_0x2443f0(0x1df)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a139_0x2443f0(0x184),a139_0x2443f0(0x1b3),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a139_0x2443f0(0x1e6),a139_0x2443f0(0x1b0),a139_0x2443f0(0x1c3),a139_0x2443f0(0x1db),a139_0x2443f0(0x1d1),a139_0x2443f0(0x1a0),a139_0x2443f0(0x1ec),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a139_0x2443f0(0x1cd),'type':a139_0x2443f0(0x1c7),'required':![],'description':a139_0x2443f0(0x1b7)},{'name':a139_0x2443f0(0x1ce),'type':a139_0x2443f0(0x1bd),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a139_0x2443f0(0x1cf),'type':a139_0x2443f0(0x1c7),'required':![],'description':a139_0x2443f0(0x1d4)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a139_0x2443f0(0x1e2),'required':!![],'description':a139_0x2443f0(0x18a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x261103,_0x3d4e59,_0x48c32c){return new CliError(_0x261103,0x1,_0x3d4e59,_0x48c32c);}export function readNotificationId(_0x240a55){const _0x49a98a=a139_0x2443f0,_0x79a1ef=_0x240a55['num']('id');if(!Number['isSafeInteger'](_0x79a1ef)||_0x79a1ef<=0x0)throw notificationError(_0x49a98a(0x1cc),_0x49a98a(0x1a3));return _0x79a1ef;}export function requireNotificationExplicitYes(_0x1e93c7){const _0x1d3a0e=a139_0x2443f0;if(_0x1e93c7['bool'](_0x1d3a0e(0x1e3))||_0x1e93c7[_0x1d3a0e(0x182)]('yes'))return;throw notificationError(_0x1d3a0e(0x1c4),_0x1d3a0e(0x1d6),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x1c8cec,_0x28cac8='type',_0x2dd670='EMAIL'){const _0x8fb43e=a139_0x2443f0,_0x13e450=_0x1c8cec['str'](_0x28cac8)[_0x8fb43e(0x1ac)]()||_0x2dd670;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x13e450))throw CliErrors['validation'](_0x8fb43e(0x1c1)+_0x28cac8+':\x20'+_0x13e450,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x8fb43e(0x18c)](',\x20')+'.');return _0x13e450;}export function assertSingleNotificationSource(_0x1eb12b){const _0x593915=a139_0x2443f0,_0x4294df=[],_0x49f2c9=_0x1eb12b[_0x593915(0x1d8)](_0x593915(0x1cd))['trim']();if(_0x49f2c9)_0x4294df['push']({'kind':'file','path':_0x49f2c9});if(_0x1eb12b[_0x593915(0x182)](_0x593915(0x1ce)))_0x4294df[_0x593915(0x1de)]({'kind':_0x593915(0x1ce)});const _0x3636f4=_0x1eb12b[_0x593915(0x1d8)](_0x593915(0x1cf))[_0x593915(0x1ac)]();if(_0x3636f4)_0x4294df['push']({'kind':_0x593915(0x1a7),'name':_0x3636f4});if(_0x4294df[_0x593915(0x19f)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x4294df[_0x593915(0x19f)]>0x1)throw CliErrors[_0x593915(0x1ca)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x593915(0x1fe));return _0x4294df[0x0];}export async function readNotificationDocument(_0x2f0bd0,_0x42e085){const _0x12f5ab=a139_0x2443f0,_0x576583=assertSingleNotificationSource(_0x2f0bd0),_0x54f165=_0x576583[_0x12f5ab(0x1d3)]==='file'?_0x12f5ab(0x1fa)+_0x576583['path']:_0x576583[_0x12f5ab(0x1d3)]==='env'?_0x12f5ab(0x1c8)+_0x576583[_0x12f5ab(0x1c2)]:_0x12f5ab(0x1ce);let _0x1f893c;try{if(_0x576583[_0x12f5ab(0x1d3)]===_0x12f5ab(0x1cd))_0x1f893c=await readFile(_0x576583[_0x12f5ab(0x1ea)],'utf8');else{if(_0x576583['kind']==='env'){if(!(_0x576583[_0x12f5ab(0x1c2)]in process.env))throw notificationError(_0x12f5ab(0x186),_0x12f5ab(0x1ae)+_0x576583['name']);_0x1f893c=process.env[_0x576583.name]??'';}else _0x1f893c=await readStdin();}}catch(_0x208b14){if(_0x208b14 instanceof CliError)throw _0x208b14;throw notificationError('notification_config_source_unavailable',_0x12f5ab(0x18f)+_0x54f165+'.');}let _0x52dbb2;try{_0x52dbb2=JSON[_0x12f5ab(0x185)](_0x1f893c);}catch{throw notificationError(_0x12f5ab(0x1f7),_0x12f5ab(0x192)+_0x54f165+_0x12f5ab(0x1da),_0x12f5ab(0x1ad));}if(!isJsonObject(_0x52dbb2))throw notificationError(_0x12f5ab(0x1f7),_0x12f5ab(0x192)+_0x54f165+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x52dbb2,_0x42e085);}export function projectNotificationListConfig(_0x3c7479,_0x174598){const _0x108624=a139_0x2443f0;return{'id':typeof _0x3c7479['id']==='number'?_0x3c7479['id']:null,'configCode':requireResponseString(_0x3c7479[_0x108624(0x1b3)],_0x108624(0x1b3),_0x174598),'configName':requireResponseString(_0x3c7479['configName'],_0x108624(0x1be),_0x174598),'channelType':requireResponseString(_0x3c7479['channelType'],'channelType',_0x174598),'description':normalizeNullableString(_0x3c7479[_0x108624(0x1ba)]),'createTime':normalizeNullableString(_0x3c7479['createTime']),'updateTime':normalizeNullableString(_0x3c7479[_0x108624(0x1ab)])};}function a139_0x5a80(_0x44681a,_0x3a26a3){_0x44681a=_0x44681a-0x181;const _0x32bf98=a139_0x32bf();let _0x5a8004=_0x32bf98[_0x44681a];return _0x5a8004;}export function normalizeExactNotificationConfig(_0x4aed4f,_0x246a93,_0x1bd790){const _0x4c160c=a139_0x2443f0;if(!Number[_0x4c160c(0x1f3)](_0x4aed4f['id'])||_0x4aed4f['id']!==_0x246a93)throw notificationError('notification_config_response_invalid',_0x4c160c(0x1ff)+_0x246a93+'.');if(_0x4aed4f[_0x4c160c(0x184)]!==_0x1bd790)throw notificationError('notification_config_response_invalid',_0x4c160c(0x1e1)+_0x246a93+_0x4c160c(0x1eb));const _0x81a095=requireExactString(_0x4aed4f['configName'],_0x4c160c(0x1be),_0x246a93),_0x5bc9d5=requireExactString(_0x4aed4f[_0x4c160c(0x1b3)],'configCode',_0x246a93),_0x4854ac=requireExactString(_0x4aed4f[_0x4c160c(0x1e8)],_0x4c160c(0x1e8),_0x246a93);if(!NOTIFICATION_CHANNEL_TYPES[_0x4c160c(0x1b2)](_0x4854ac))throw notificationError(_0x4c160c(0x1c5),_0x4c160c(0x1e1)+_0x246a93+_0x4c160c(0x18b));const _0x1eef81=responseNullableString(_0x4aed4f['endpointUrl'],'endpointUrl',_0x246a93),_0x3647a2=responseNullableString(_0x4aed4f[_0x4c160c(0x18d)],_0x4c160c(0x18d),_0x246a93),_0x2cf36f=responseNullableString(_0x4aed4f['description'],_0x4c160c(0x1ba),_0x246a93),_0x30f929=responseNullableTimeout(_0x4aed4f['connectTimeout'],_0x4c160c(0x1a2),_0x246a93),_0x588d6d=responseNullableTimeout(_0x4aed4f[_0x4c160c(0x1df)],_0x4c160c(0x1df),_0x246a93);return{'id':_0x246a93,'appCode':_0x1bd790,'configCode':_0x5bc9d5,'configName':_0x81a095,'channelType':_0x4854ac,'endpointUrl':redactSensitive(_0x1eef81),'channelConfig':redactSensitive(_0x3647a2),'description':_0x2cf36f,'connectTimeout':_0x30f929,'readTimeout':_0x588d6d,'endpointUrlRaw':_0x1eef81,'channelConfigRaw':_0x3647a2};}export async function requireExactNotificationConfig(_0x3ea000,_0x4dbe7a,_0x6f4a3f){const _0x4f42fa=a139_0x2443f0;let _0x5465e3;try{_0x5465e3=await getNotificationChannelConfig(_0x4dbe7a,_0x3ea000);}catch{throw safeApiFailure(_0x6f4a3f,_0x4f42fa(0x181),_0x4f42fa(0x19b)+_0x3ea000+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x5465e3,_0x4dbe7a,_0x3ea000);}export function projectNotificationConfig(_0x1b5a29){const _0x257a4b=a139_0x2443f0;return{'id':_0x1b5a29['id']??null,'appCode':_0x1b5a29[_0x257a4b(0x184)],'configCode':_0x1b5a29[_0x257a4b(0x1b3)]??null,'configName':_0x1b5a29[_0x257a4b(0x1be)],'channelType':_0x1b5a29[_0x257a4b(0x1e8)],'endpointUrl':redactSensitive(_0x1b5a29[_0x257a4b(0x200)]),'channelConfig':redactSensitive(_0x1b5a29[_0x257a4b(0x18d)]),'description':_0x1b5a29[_0x257a4b(0x1ba)]??null,'connectTimeout':_0x1b5a29[_0x257a4b(0x1a2)]??null,'readTimeout':_0x1b5a29['readTimeout']??null};}export function notificationSelector(_0x133d39){const _0x322c00=a139_0x2443f0;return{'appCode':_0x133d39['appCode'],'id':_0x133d39['id'],'configCode':_0x133d39[_0x322c00(0x1b3)],'configName':_0x133d39[_0x322c00(0x1be)],'channelType':_0x133d39[_0x322c00(0x1e8)]};}export function createMutationInput(_0x13f71d,_0x6e34e9){const _0x1e2af5=a139_0x2443f0;return{'appCode':_0x13f71d,'configName':_0x6e34e9['configName'],'channelType':_0x6e34e9['channelType'],...hasOwn(_0x6e34e9,'endpointUrl')?{'endpointUrl':_0x6e34e9[_0x1e2af5(0x200)]}:{},...hasOwn(_0x6e34e9,_0x1e2af5(0x18d))?{'channelConfig':serializeChannelConfig(_0x6e34e9[_0x1e2af5(0x18d)])}:{},...hasOwn(_0x6e34e9,_0x1e2af5(0x1ba))?{'description':_0x6e34e9['description']}:{},...hasOwn(_0x6e34e9,_0x1e2af5(0x1a2))?{'connectTimeout':_0x6e34e9[_0x1e2af5(0x1a2)]}:{},...hasOwn(_0x6e34e9,'readTimeout')?{'readTimeout':_0x6e34e9[_0x1e2af5(0x1df)]}:{}};}export function mergeUpdateInput(_0x1ec94c,_0x57a9ca){const _0x4e6f07=a139_0x2443f0;return{'id':_0x1ec94c['id'],'appCode':_0x1ec94c[_0x4e6f07(0x184)],'configName':_0x57a9ca['configName']??_0x1ec94c[_0x4e6f07(0x1be)],'channelType':_0x57a9ca[_0x4e6f07(0x1e8)]??_0x1ec94c[_0x4e6f07(0x1e8)],'endpointUrl':hasOwn(_0x57a9ca,'endpointUrl')?_0x57a9ca[_0x4e6f07(0x200)]:_0x1ec94c[_0x4e6f07(0x1bf)],'channelConfig':hasOwn(_0x57a9ca,_0x4e6f07(0x18d))?serializeChannelConfig(_0x57a9ca[_0x4e6f07(0x18d)]):_0x1ec94c[_0x4e6f07(0x1b4)],'description':hasOwn(_0x57a9ca,'description')?_0x57a9ca[_0x4e6f07(0x1ba)]:_0x1ec94c['description'],'connectTimeout':hasOwn(_0x57a9ca,_0x4e6f07(0x1a2))?_0x57a9ca['connectTimeout']:_0x1ec94c['connectTimeout'],'readTimeout':hasOwn(_0x57a9ca,_0x4e6f07(0x1df))?_0x57a9ca[_0x4e6f07(0x1df)]:_0x1ec94c[_0x4e6f07(0x1df)]};}export function plannedUpdateProjection(_0x514ba3,_0x14b14e){const _0x1fecab=a139_0x2443f0;return projectNotificationConfig({'id':_0x514ba3['id'],'appCode':_0x514ba3[_0x1fecab(0x184)],'configCode':_0x514ba3[_0x1fecab(0x1b3)],'configName':_0x14b14e[_0x1fecab(0x1be)]??_0x514ba3['configName'],'channelType':_0x14b14e[_0x1fecab(0x1e8)]??_0x514ba3[_0x1fecab(0x1e8)],'endpointUrl':hasOwn(_0x14b14e,'endpointUrl')?_0x14b14e[_0x1fecab(0x200)]:_0x514ba3[_0x1fecab(0x1bf)],'channelConfig':hasOwn(_0x14b14e,_0x1fecab(0x18d))?_0x14b14e[_0x1fecab(0x18d)]:_0x514ba3[_0x1fecab(0x1b4)],'description':hasOwn(_0x14b14e,_0x1fecab(0x1ba))?_0x14b14e[_0x1fecab(0x1ba)]:_0x514ba3[_0x1fecab(0x1ba)],'connectTimeout':hasOwn(_0x14b14e,_0x1fecab(0x1a2))?_0x14b14e['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x514ba3[_0x1fecab(0x1a2)],'readTimeout':hasOwn(_0x14b14e,_0x1fecab(0x1df))?_0x14b14e[_0x1fecab(0x1df)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x514ba3[_0x1fecab(0x1df)]});}export function requestedSafeFieldsMatch(_0x115c80,_0x3ccf1e,_0x5126c9){const _0x16afea=a139_0x2443f0,_0x5660de=[],_0x5398b6=[],_0x582728=[];for(const _0x16156c of['configName',_0x16afea(0x1e8),_0x16afea(0x1ba)]){if(!hasOwn(_0x5126c9,_0x16156c))continue;_0x582728[_0x16afea(0x1de)](_0x16156c),_0x5660de[_0x16afea(0x1de)](_0x3ccf1e[_0x16156c]===_0x5126c9[_0x16156c]),_0x5398b6[_0x16afea(0x1de)](_0x115c80[_0x16156c]!==_0x5126c9[_0x16156c]&&_0x3ccf1e[_0x16156c]===_0x5126c9[_0x16156c]);}for(const _0x18fa33 of[_0x16afea(0x1a2),_0x16afea(0x1df)]){if(!hasOwn(_0x5126c9,_0x18fa33))continue;const _0x4e2dff=_0x5126c9[_0x18fa33]??(_0x18fa33==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x582728[_0x16afea(0x1de)](_0x18fa33),_0x5660de[_0x16afea(0x1de)](_0x3ccf1e[_0x18fa33]===_0x4e2dff),_0x5398b6[_0x16afea(0x1de)](_0x115c80[_0x18fa33]!==_0x4e2dff&&_0x3ccf1e[_0x18fa33]===_0x4e2dff);}return hasOwn(_0x5126c9,'endpointUrl')&&_0x5126c9[_0x16afea(0x200)]===null&&(_0x582728[_0x16afea(0x1de)](_0x16afea(0x1f0)),_0x5660de['push'](_0x3ccf1e[_0x16afea(0x1bf)]===null||_0x3ccf1e[_0x16afea(0x1bf)]===''),_0x5398b6[_0x16afea(0x1de)](_0x115c80['endpointUrlRaw']!==null&&_0x115c80[_0x16afea(0x1bf)]!==''&&(_0x3ccf1e[_0x16afea(0x1bf)]===null||_0x3ccf1e[_0x16afea(0x1bf)]===''))),{'allMatch':_0x5660de[_0x16afea(0x1c9)](Boolean),'provesChange':_0x5398b6[_0x16afea(0x1d5)](Boolean),'verifiedFields':_0x582728};}export function validateNotificationDeleteReadback(_0x302819,_0x34d866,_0x4b0678){const _0x343591=a139_0x2443f0;for(const [_0xb8fa1f,_0xb45013]of _0x302819['entries']()){if(!Number[_0x343591(0x1f3)](_0xb45013['id'])||_0xb45013['id']<=0x0)throw notificationError(_0x343591(0x1c5),'Notification\x20config\x20list\x20item\x20'+(_0xb8fa1f+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0xb45013[_0x343591(0x184)]!==_0x34d866)throw notificationError(_0x343591(0x1c5),_0x343591(0x191)+(_0xb8fa1f+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0xb45013['channelType']!==_0x4b0678)throw notificationError(_0x343591(0x1c5),'Notification\x20config\x20list\x20item\x20'+(_0xb8fa1f+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x1c65cd,_0x552970,_0x4a7fae){const _0x469a12=a139_0x2443f0;return notificationError(_0x469a12(0x1ed)+_0x1c65cd+'_'+(_0x552970==='mutation'?_0x469a12(0x190):_0x552970+_0x469a12(0x1a4)),_0x469a12(0x1e1)+_0x1c65cd+'\x20'+_0x552970+_0x469a12(0x187),_0x4a7fae);}export function notificationLookupCommand(_0x5408f7,_0x1bc00a){const _0x2b114e=a139_0x2443f0;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x5408f7+'\x20--type\x20'+_0x1bc00a+_0x2b114e(0x1dd);}function validateNotificationDocument(_0x1a392d,_0x179304){const _0x150940=a139_0x2443f0;for(const _0x38d2bf of Object[_0x150940(0x1ee)](_0x1a392d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x150940(0x1d7)](_0x38d2bf))throw notificationError(_0x150940(0x1c6),_0x150940(0x1b5)+_0x38d2bf+_0x150940(0x189));if(!ALLOWED_INPUT_FIELDS[_0x150940(0x1d7)](_0x38d2bf))throw notificationError(_0x150940(0x1d9),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x38d2bf+'\x22.');}if(_0x179304===_0x150940(0x196)&&Object['keys'](_0x1a392d)[_0x150940(0x19f)]===0x0)throw notificationError('notification_config_update_empty','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x2dac7f={};if(hasOwn(_0x1a392d,_0x150940(0x1be)))_0x2dac7f[_0x150940(0x1be)]=validateRequiredString(_0x1a392d['configName'],_0x150940(0x1be),0x80);else{if(_0x179304===_0x150940(0x1f2))throw notificationError('notification_config_field_required',_0x150940(0x1cb)+_0x150940(0x1d2));}if(hasOwn(_0x1a392d,_0x150940(0x1e8))){if(typeof _0x1a392d[_0x150940(0x1e8)]!=='string')throw invalidFieldType(_0x150940(0x1e8),_0x150940(0x1ef));const _0x4d8e89=_0x1a392d['channelType'][_0x150940(0x1ac)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4d8e89))throw notificationError(_0x150940(0x1f8),_0x150940(0x198),_0x150940(0x1b8)+NOTIFICATION_CHANNEL_TYPES[_0x150940(0x18c)](',\x20')+'.');_0x2dac7f['channelType']=_0x4d8e89;}else{if(_0x179304===_0x150940(0x1f2))throw notificationError(_0x150940(0x1a8),_0x150940(0x1cb)+'\x22channelType\x22.');}for(const [_0x191787,_0x29e184]of[['endpointUrl',0x200],[_0x150940(0x1ba),0x100]]){if(!hasOwn(_0x1a392d,_0x191787))continue;const _0x22bf05=_0x1a392d[_0x191787];if(_0x22bf05!==null&&typeof _0x22bf05!==_0x150940(0x1c7))throw invalidFieldType(_0x191787,_0x150940(0x19d));if(typeof _0x22bf05==='string'&&_0x22bf05[_0x150940(0x19f)]>_0x29e184)throw notificationError('notification_config_field_invalid',_0x150940(0x1b5)+_0x191787+_0x150940(0x1a1)+_0x29e184+_0x150940(0x1fc));_0x2dac7f[_0x191787]=_0x22bf05;}if(hasOwn(_0x1a392d,_0x150940(0x18d))){const _0x1387e2=_0x1a392d[_0x150940(0x18d)];if(_0x1387e2===null&&_0x179304===_0x150940(0x1f2))throw invalidFieldType(_0x150940(0x18d),_0x150940(0x18e));if(_0x1387e2!==null&&!isJsonObject(_0x1387e2))throw invalidFieldType(_0x150940(0x18d),_0x179304===_0x150940(0x196)?_0x150940(0x1f5):_0x150940(0x18e));_0x1387e2!==null&&validateChannelConfigFields(_0x2dac7f[_0x150940(0x1e8)],_0x1387e2),_0x2dac7f[_0x150940(0x18d)]=_0x1387e2;}for(const _0x562c00 of[_0x150940(0x1a2),_0x150940(0x1df)]){if(!hasOwn(_0x1a392d,_0x562c00))continue;const _0x551467=_0x1a392d[_0x562c00];if(_0x551467!==null&&(!Number['isSafeInteger'](_0x551467)||_0x551467<0x0))throw notificationError(_0x150940(0x1f8),_0x150940(0x1b5)+_0x562c00+_0x150940(0x1fb));_0x2dac7f[_0x562c00]=_0x551467;}return _0x2dac7f;}function validateRequiredString(_0x2ec435,_0x3be8d7,_0x2c7bfd){const _0x429d70=a139_0x2443f0;if(typeof _0x2ec435!==_0x429d70(0x1c7))throw invalidFieldType(_0x3be8d7,_0x429d70(0x1b1));const _0x12347e=_0x2ec435[_0x429d70(0x1ac)]();if(!_0x12347e)throw notificationError(_0x429d70(0x1f8),_0x429d70(0x1b5)+_0x3be8d7+_0x429d70(0x195));if(_0x12347e['length']>_0x2c7bfd)throw notificationError('notification_config_field_invalid',_0x429d70(0x1b5)+_0x3be8d7+'\x22\x20cannot\x20exceed\x20'+_0x2c7bfd+_0x429d70(0x1fc));return _0x12347e;}function validateChannelConfigFields(_0x40913e,_0x5cfbfc){const _0x3b51d4=a139_0x2443f0;if(hasOwn(_0x5cfbfc,_0x3b51d4(0x193)))throw forbiddenChannelConfigField(_0x3b51d4(0x193));if(_0x40913e===_0x3b51d4(0x197))for(const _0x564d48 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x5cfbfc,_0x564d48))throw forbiddenChannelConfigField(_0x564d48);}}function forbiddenChannelConfigField(_0x8a52d5){const _0x1334f0=a139_0x2443f0;return notificationError(_0x1334f0(0x1aa),_0x1334f0(0x188)+_0x8a52d5+_0x1334f0(0x1dc));}function invalidFieldType(_0x60e059,_0x37ca4a){const _0x121ef3=a139_0x2443f0;return notificationError('notification_config_field_invalid',_0x121ef3(0x1b5)+_0x60e059+_0x121ef3(0x1e9)+_0x37ca4a+'.');}function serializeChannelConfig(_0x248c0e){const _0x4efc6c=a139_0x2443f0;return _0x248c0e===null||_0x248c0e===undefined?null:JSON[_0x4efc6c(0x1f9)](_0x248c0e);}function redactSensitive(_0x2b391c){const _0x2b96fe=a139_0x2443f0;return _0x2b391c===null||_0x2b391c===undefined||_0x2b391c===''?null:_0x2b96fe(0x201);}function requireResponseString(_0x5dd21d,_0x1dc19a,_0x5176b3){const _0x21f788=a139_0x2443f0;if(typeof _0x5dd21d!==_0x21f788(0x1c7)||_0x5dd21d[_0x21f788(0x1ac)]()==='')throw CliErrors['apiError'](_0x21f788(0x1f1),_0x21f788(0x1f6)+(_0x5176b3+0x1)+_0x21f788(0x1a5)+_0x1dc19a+'\x22.');return _0x5dd21d[_0x21f788(0x1ac)]();}function requireExactString(_0x1ae65e,_0x28eb67,_0x27f18b){const _0x5a24a4=a139_0x2443f0;if(typeof _0x1ae65e!==_0x5a24a4(0x1c7)||_0x1ae65e[_0x5a24a4(0x1ac)]()==='')throw notificationError('notification_config_response_invalid',_0x5a24a4(0x1e1)+_0x27f18b+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x28eb67+'\x22.');return _0x1ae65e[_0x5a24a4(0x1ac)]();}function responseNullableString(_0x32edff,_0x19f33a,_0x4ed383){const _0x2a73e6=a139_0x2443f0;if(_0x32edff===undefined||_0x32edff===null)return null;if(typeof _0x32edff!==_0x2a73e6(0x1c7))throw notificationError(_0x2a73e6(0x1c5),_0x2a73e6(0x1e1)+_0x4ed383+_0x2a73e6(0x1a6)+_0x19f33a+'\x22.');return _0x32edff;}function responseNullableTimeout(_0xb38654,_0x384edd,_0x4af284){const _0x1a0bad=a139_0x2443f0;if(_0xb38654===undefined||_0xb38654===null)return null;if(!Number[_0x1a0bad(0x1f3)](_0xb38654)||_0xb38654<0x0)throw notificationError(_0x1a0bad(0x1c5),'Notification\x20config\x20'+_0x4af284+'\x20has\x20invalid\x20field\x20\x22'+_0x384edd+'\x22.');return _0xb38654;}function normalizeNullableString(_0x493da3){const _0x351a7c=a139_0x2443f0;return typeof _0x493da3===_0x351a7c(0x1c7)?_0x493da3:null;}function isJsonObject(_0x19e165){return _0x19e165!==null&&typeof _0x19e165==='object'&&!Array['isArray'](_0x19e165);}function hasOwn(_0x36652a,_0x48ae04){const _0x30022c=a139_0x2443f0;return Object[_0x30022c(0x1d0)][_0x30022c(0x1e7)][_0x30022c(0x1a9)](_0x36652a,_0x48ae04);}async function readStdin(){const _0x43bc2d=a139_0x2443f0;let _0x7df7d8='';process[_0x43bc2d(0x1ce)][_0x43bc2d(0x183)]('utf8');for await(const _0x4762a4 of process[_0x43bc2d(0x1ce)])_0x7df7d8+=_0x4762a4;return _0x7df7d8;}
@@ -1 +1 @@
1
- function a134_0x1820(){const _0x5ab077=['General','fileName','/smartapi/common/uploadFile','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','scene','appCode','fileUrl','4gwJAEl','ocr','toString','general','/smartapi/ocr/recognize-text?','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','4709448AUzpxG','filter','3558060Esovey','Publicly\x20accessible\x20image\x20or\x20file\x20URL','POST','filePath','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','/smartapi/common/queryFileUrl','File\x20upload\x20response\x20missing\x20filePath.','\x20OCR\x20from\x20URL','imageFile','imageUrl','idCard','Unsupported\x20OCR\x20scene:\x20','form','image-file','path','join','1559562wDZtVE','.\x20Supported\x20scenes:\x20','apiError','14696uhdNIF','626388zimrkL','\x20OCR','count','File\x20URL\x20response\x20missing\x20fileUrl.','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','829314pSRtNl','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Table','3254898AvcXqH','/smartapi/ocr/recognize-text','string','toLowerCase','str','validation','image-url','3038KgXHrp','trim'];a134_0x1820=function(){return _0x5ab077;};return a134_0x1820();}const a134_0x55254c=a134_0x3d84;(function(_0x4dec0c,_0x5c5757){const _0x5a371c=a134_0x3d84,_0x2d5bdd=_0x4dec0c();while(!![]){try{const _0x2109f4=parseInt(_0x5a371c(0x204))/0x1+parseInt(_0x5a371c(0x1fb))/0x2+-parseInt(_0x5a371c(0x1ff))/0x3*(parseInt(_0x5a371c(0x217))/0x4)+-parseInt(_0x5a371c(0x21f))/0x5+-parseInt(_0x5a371c(0x207))/0x6+-parseInt(_0x5a371c(0x20e))/0x7*(-parseInt(_0x5a371c(0x1fe))/0x8)+-parseInt(_0x5a371c(0x21d))/0x9;if(_0x2109f4===_0x5c5757)break;else _0x2d5bdd['push'](_0x2d5bdd['shift']());}catch(_0x316a56){_0x2d5bdd['push'](_0x2d5bdd['shift']());}}}(a134_0x1820,0x6695e));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a134_0x3d84(_0x62ad1d,_0x10db2d){_0x62ad1d=_0x62ad1d-0x1f4;const _0x1820ba=a134_0x1820();let _0x3d8495=_0x1820ba[_0x62ad1d];return _0x3d8495;}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a134_0x55254c(0x21a),a134_0x55254c(0x1f7),a134_0x55254c(0x1f5)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a134_0x55254c(0x210),'form':a134_0x55254c(0x206),'idCard':'IdCard'},SCENE_FLAG={'name':a134_0x55254c(0x214),'type':a134_0x55254c(0x209),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a134_0x55254c(0x213)},IMAGE_FILE_FLAG={'name':a134_0x55254c(0x1f8),'type':a134_0x55254c(0x209),'description':a134_0x55254c(0x205)},IMAGE_URL_FLAG={'name':a134_0x55254c(0x20d),'type':a134_0x55254c(0x209),'description':a134_0x55254c(0x220)};function normalizeScene(_0x3b1569){const _0x5ef292=a134_0x55254c,_0x41c2fe=_0x3b1569[_0x5ef292(0x20f)]()[_0x5ef292(0x20a)]();if(_0x41c2fe==='idcard')return _0x5ef292(0x1f5);if(_0x41c2fe==='invoice'||_0x41c2fe===_0x5ef292(0x21a)||_0x41c2fe==='form')return _0x41c2fe;throw CliErrors[_0x5ef292(0x20c)](_0x5ef292(0x1f6)+_0x3b1569+_0x5ef292(0x1fc)+SUPPORTED_SCENES[_0x5ef292(0x1fa)](',\x20'));}function selectedInputs(_0x2aed9b){const _0x5dd6d6=a134_0x55254c,_0x341a29=_0x2aed9b[_0x5dd6d6(0x20b)](_0x5dd6d6(0x1f8))[_0x5dd6d6(0x20f)](),_0x2944ef=_0x2aed9b[_0x5dd6d6(0x20b)](_0x5dd6d6(0x20d))['trim']();return{'imageFile':_0x341a29,'imageUrl':_0x2944ef,'count':[_0x341a29,_0x2944ef][_0x5dd6d6(0x21e)](Boolean)['length']};}function validateInputSelection(_0x525585){const _0x1675bb=a134_0x55254c,_0x1f91cc=selectedInputs(_0x525585);if(_0x1f91cc[_0x1675bb(0x201)]!==0x1)throw CliErrors[_0x1675bb(0x20c)](_0x1675bb(0x21c));return _0x1f91cc;}function withScene(_0x54c007,_0x40c3cc,_0x37122a){const _0x4219cc=a134_0x55254c;return{..._0x54c007,'scene':_0x40c3cc,..._0x37122a?{'sourceFile':{'fileName':_0x37122a[_0x4219cc(0x211)],'filePath':_0x37122a[_0x4219cc(0x222)]}}:{}};}const ocrRecognize={'service':a134_0x55254c(0x218),'command':'recognize','description':a134_0x55254c(0x203),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x8e7f1e){const _0x2863bc=a134_0x55254c,_0x3882c2=normalizeScene(_0x8e7f1e[_0x2863bc(0x20b)](_0x2863bc(0x214))),_0x2bc4ab=SCENE_TO_LEGACY_TYPE[_0x3882c2],_0x2e4d46=validateInputSelection(_0x8e7f1e);if(_0x2e4d46['imageUrl']){const _0x3e4b55=new URLSearchParams({'url':_0x2e4d46[_0x2863bc(0x1f4)],'type':_0x2bc4ab,'appCode':_0x8e7f1e[_0x2863bc(0x215)]});return{'method':'GET','url':_0x2863bc(0x21b)+_0x3e4b55[_0x2863bc(0x219)](),'description':'Preview:\x20recognize\x20'+_0x3882c2+_0x2863bc(0x226)};}const _0x472b7e=requireDevelopmentUploadFile(_0x2e4d46[_0x2863bc(0x227)],_0x2863bc(0x1f8));return{'method':_0x2863bc(0x221),'url':_0x2863bc(0x212),'body':{'steps':[{'method':_0x2863bc(0x221),'url':_0x2863bc(0x212),'body':{'appCode':_0x8e7f1e[_0x2863bc(0x215)],'multipart':{'file':_0x472b7e}}},{'method':_0x2863bc(0x221),'url':_0x2863bc(0x224),'body':{'filePath':_0x2863bc(0x223),'downloadFlag':![]}},{'method':'GET','url':_0x2863bc(0x208),'query':{'appCode':_0x8e7f1e[_0x2863bc(0x215)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2bc4ab}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x3882c2+_0x2863bc(0x200)};},async 'execute'(_0x24f48c){const _0x55c789=a134_0x55254c,_0x3c415b=normalizeScene(_0x24f48c[_0x55c789(0x20b)](_0x55c789(0x214))),_0xd53802=SCENE_TO_LEGACY_TYPE[_0x3c415b],_0x780f44=validateInputSelection(_0x24f48c);if(_0x780f44[_0x55c789(0x1f4)]){const _0x414bac=await recognizeDevelopmentOcr(_0x24f48c[_0x55c789(0x215)],{'url':_0x780f44[_0x55c789(0x1f4)],'type':_0xd53802});return{'ok':!![],'data':withScene(_0x414bac,_0x3c415b)};}const _0xf387fc=requireDevelopmentUploadFile(_0x780f44[_0x55c789(0x227)],_0x55c789(0x1f8)),_0x3edee0=await uploadDevelopmentFile(_0x24f48c[_0x55c789(0x215)],_0xf387fc[_0x55c789(0x1f9)]);if(!_0x3edee0[_0x55c789(0x222)])throw CliErrors[_0x55c789(0x1fd)](_0x55c789(0x225));const _0x33645f=await queryDevelopmentFileUrl(_0x3edee0[_0x55c789(0x222)],{'download':![]});if(!_0x33645f[_0x55c789(0x216)])throw CliErrors[_0x55c789(0x1fd)](_0x55c789(0x202));const _0x4d7b15=await recognizeDevelopmentOcr(_0x24f48c['appCode'],{'url':_0x33645f[_0x55c789(0x216)],'type':_0xd53802});return{'ok':!![],'data':withScene(_0x4d7b15,_0x3c415b,_0x3edee0)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a140_0x59b48b=a140_0x522d;(function(_0x13daa8,_0x169681){const _0x5c8019=a140_0x522d,_0x52ffc1=_0x13daa8();while(!![]){try{const _0x254fd8=parseInt(_0x5c8019(0x17b))/0x1*(-parseInt(_0x5c8019(0x172))/0x2)+-parseInt(_0x5c8019(0x185))/0x3*(parseInt(_0x5c8019(0x159))/0x4)+-parseInt(_0x5c8019(0x152))/0x5*(parseInt(_0x5c8019(0x17d))/0x6)+parseInt(_0x5c8019(0x16c))/0x7*(parseInt(_0x5c8019(0x160))/0x8)+-parseInt(_0x5c8019(0x151))/0x9*(-parseInt(_0x5c8019(0x15f))/0xa)+-parseInt(_0x5c8019(0x178))/0xb+parseInt(_0x5c8019(0x17f))/0xc;if(_0x254fd8===_0x169681)break;else _0x52ffc1['push'](_0x52ffc1['shift']());}catch(_0x5c16c4){_0x52ffc1['push'](_0x52ffc1['shift']());}}}(a140_0x36ac,0x2a395));function a140_0x522d(_0x430ebc,_0x5a64a0){_0x430ebc=_0x430ebc-0x14f;const _0x36ac92=a140_0x36ac();let _0x522d5a=_0x36ac92[_0x430ebc];return _0x522d5a;}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=[a140_0x59b48b(0x169),a140_0x59b48b(0x175),a140_0x59b48b(0x161),a140_0x59b48b(0x14f)],SCENE_TO_LEGACY_TYPE={'invoice':a140_0x59b48b(0x16d),'general':a140_0x59b48b(0x189),'form':a140_0x59b48b(0x15e),'idCard':'IdCard'},SCENE_FLAG={'name':a140_0x59b48b(0x16a),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a140_0x59b48b(0x181)},IMAGE_FILE_FLAG={'name':a140_0x59b48b(0x179),'type':a140_0x59b48b(0x184),'description':a140_0x59b48b(0x156)},IMAGE_URL_FLAG={'name':'image-url','type':a140_0x59b48b(0x184),'description':a140_0x59b48b(0x15a)};function normalizeScene(_0x80c8e9){const _0x15ab82=a140_0x59b48b,_0x3d635a=_0x80c8e9[_0x15ab82(0x182)]()[_0x15ab82(0x173)]();if(_0x3d635a===_0x15ab82(0x177))return _0x15ab82(0x14f);if(_0x3d635a==='invoice'||_0x3d635a===_0x15ab82(0x175)||_0x3d635a===_0x15ab82(0x161))return _0x3d635a;throw CliErrors[_0x15ab82(0x150)](_0x15ab82(0x188)+_0x80c8e9+_0x15ab82(0x16b)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x3a9e80){const _0x1bb8e1=a140_0x59b48b,_0x54729b=_0x3a9e80[_0x1bb8e1(0x180)](_0x1bb8e1(0x179))[_0x1bb8e1(0x182)](),_0x1a9aeb=_0x3a9e80[_0x1bb8e1(0x180)](_0x1bb8e1(0x15c))[_0x1bb8e1(0x182)]();return{'imageFile':_0x54729b,'imageUrl':_0x1a9aeb,'count':[_0x54729b,_0x1a9aeb][_0x1bb8e1(0x174)](Boolean)[_0x1bb8e1(0x183)]};}function validateInputSelection(_0x5a6f03){const _0x572664=a140_0x59b48b,_0x425455=selectedInputs(_0x5a6f03);if(_0x425455[_0x572664(0x16f)]!==0x1)throw CliErrors['validation'](_0x572664(0x17a));return _0x425455;}function withScene(_0x5a11ed,_0x57a4c3,_0x1b120b){const _0x7fd880=a140_0x59b48b;return{..._0x5a11ed,'scene':_0x57a4c3,..._0x1b120b?{'sourceFile':{'fileName':_0x1b120b[_0x7fd880(0x171)],'filePath':_0x1b120b[_0x7fd880(0x168)]}}:{}};}function a140_0x36ac(){const _0x305dcb=['Preview:\x20recognize\x20','fileName','2TxZUsD','toLowerCase','filter','general','toString','idcard','1893991gVXkVH','image-file','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','167644pEdrvZ','ocr','12YXcDec','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','7680kgpify','str','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','trim','length','string','723bIQdMb','/smartapi/ocr/recognize-text?','/smartapi/common/uploadFile','Unsupported\x20OCR\x20scene:\x20','General','fileUrl','idCard','validation','773622IRKBGV','21995ocECzX','imageFile','path','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','imageUrl','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','556JcEvwQ','Publicly\x20accessible\x20image\x20or\x20file\x20URL','GET','image-url','\x20OCR','Table','40iwRMVe','8UJDave','form','read','/smartapi/common/queryFileUrl','apiError','File\x20URL\x20response\x20missing\x20fileUrl.','File\x20upload\x20response\x20missing\x20filePath.','appCode','filePath','invoice','scene','.\x20Supported\x20scenes:\x20','1474193UYIqCj','Invoice','\x20OCR\x20from\x20URL','count'];a140_0x36ac=function(){return _0x305dcb;};return a140_0x36ac();}const ocrRecognize={'service':a140_0x59b48b(0x17c),'command':'recognize','description':a140_0x59b48b(0x158),'risk':a140_0x59b48b(0x162),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x26d5a4){const _0x2c1322=a140_0x59b48b,_0x1cf0a8=normalizeScene(_0x26d5a4[_0x2c1322(0x180)](_0x2c1322(0x16a))),_0x52a919=SCENE_TO_LEGACY_TYPE[_0x1cf0a8],_0xe230cb=validateInputSelection(_0x26d5a4);if(_0xe230cb[_0x2c1322(0x157)]){const _0x1ffc24=new URLSearchParams({'url':_0xe230cb[_0x2c1322(0x157)],'type':_0x52a919,'appCode':_0x26d5a4[_0x2c1322(0x167)]});return{'method':_0x2c1322(0x15b),'url':_0x2c1322(0x186)+_0x1ffc24[_0x2c1322(0x176)](),'description':_0x2c1322(0x170)+_0x1cf0a8+_0x2c1322(0x16e)};}const _0x7e2628=requireDevelopmentUploadFile(_0xe230cb[_0x2c1322(0x153)],_0x2c1322(0x179));return{'method':'POST','url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':_0x2c1322(0x187),'body':{'appCode':_0x26d5a4[_0x2c1322(0x167)],'multipart':{'file':_0x7e2628}}},{'method':'POST','url':_0x2c1322(0x163),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':'GET','url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x26d5a4[_0x2c1322(0x167)],'url':_0x2c1322(0x17e),'type':_0x52a919}}]},'description':_0x2c1322(0x155)+_0x1cf0a8+_0x2c1322(0x15d)};},async 'execute'(_0x5c874f){const _0x386288=a140_0x59b48b,_0x405c35=normalizeScene(_0x5c874f[_0x386288(0x180)](_0x386288(0x16a))),_0x5d1562=SCENE_TO_LEGACY_TYPE[_0x405c35],_0x4e0170=validateInputSelection(_0x5c874f);if(_0x4e0170[_0x386288(0x157)]){const _0x15fa47=await recognizeDevelopmentOcr(_0x5c874f[_0x386288(0x167)],{'url':_0x4e0170[_0x386288(0x157)],'type':_0x5d1562});return{'ok':!![],'data':withScene(_0x15fa47,_0x405c35)};}const _0x53de16=requireDevelopmentUploadFile(_0x4e0170['imageFile'],'image-file'),_0x4a371d=await uploadDevelopmentFile(_0x5c874f['appCode'],_0x53de16[_0x386288(0x154)]);if(!_0x4a371d[_0x386288(0x168)])throw CliErrors[_0x386288(0x164)](_0x386288(0x166));const _0x4827ec=await queryDevelopmentFileUrl(_0x4a371d[_0x386288(0x168)],{'download':![]});if(!_0x4827ec[_0x386288(0x18a)])throw CliErrors[_0x386288(0x164)](_0x386288(0x165));const _0x3a502a=await recognizeDevelopmentOcr(_0x5c874f['appCode'],{'url':_0x4827ec[_0x386288(0x18a)],'type':_0x5d1562});return{'ok':!![],'data':withScene(_0x3a502a,_0x405c35,_0x4a371d)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a135_0x4de99e=a135_0x3a19;(function(_0xec7430,_0x4fbd1a){const _0x5dce87=a135_0x3a19,_0x3a23f8=_0xec7430();while(!![]){try{const _0x3f45c3=parseInt(_0x5dce87(0x185))/0x1+-parseInt(_0x5dce87(0x174))/0x2+parseInt(_0x5dce87(0x17e))/0x3+-parseInt(_0x5dce87(0x182))/0x4*(-parseInt(_0x5dce87(0x191))/0x5)+-parseInt(_0x5dce87(0x17b))/0x6*(-parseInt(_0x5dce87(0x189))/0x7)+parseInt(_0x5dce87(0x177))/0x8*(parseInt(_0x5dce87(0x18d))/0x9)+parseInt(_0x5dce87(0x19c))/0xa*(-parseInt(_0x5dce87(0x1a0))/0xb);if(_0x3f45c3===_0x4fbd1a)break;else _0x3a23f8['push'](_0x3a23f8['shift']());}catch(_0x2ddc65){_0x3a23f8['push'](_0x3a23f8['shift']());}}}(a135_0xaecb,0x55e09));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessStandardPageState,buildPageGenerateOperationStatusQueryCommand,buildStandardPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a135_0xaecb(){const _0x5dfb40=['source','4218uQEAAd','reused','/generate-standard-pages/start','1435224CFMZcC','precheck','standardPageStatus','compress','11756LDNNnz','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','dataset','131432ahyJiQ','复用已有生成任务','manualResolutionRequired','appCode','2240zdZLUk','operationId','已提交生成任务','page','107811aLjSLT','PARTIAL_SUCCESS','apply','message','745gySXsD','related-pages-fallback','POST','nextAction','alias','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','name','SUCCESS','string','fieldCount','code','4939060lxhIVD','boolean','generate-start','progressRate','22wHyQDS','number','status','currentStep','81914LJAhDA','write','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','72qvSrbt','clientOperationId','taskId'];a135_0xaecb=function(){return _0x5dfb40;};return a135_0xaecb();}function a135_0x3a19(_0x4bd17b,_0x44fca5){_0x4bd17b=_0x4bd17b-0x171;const _0xaecb0c=a135_0xaecb();let _0x3a19e6=_0xaecb0c[_0x4bd17b];return _0x3a19e6;}import{startGenerateStandardPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a135_0x4de99e(0x18c),'command':a135_0x4de99e(0x19e),'description':a135_0x4de99e(0x176),'risk':a135_0x4de99e(0x175),'defaultOutputFormat':a135_0x4de99e(0x181),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a135_0x4de99e(0x195),'type':a135_0x4de99e(0x199),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a135_0x4de99e(0x18f),'type':a135_0x4de99e(0x19d),'description':a135_0x4de99e(0x196)}],async 'validate'(_0x5630bb){validateDatasetSelector(_0x5630bb);},async 'dryRun'(_0x41a353){const _0x570742=a135_0x4de99e,_0x17777c=await prepare(_0x41a353);return{'method':_0x570742(0x193),'url':'/smartapi/lovrabet/dataset/'+_0x17777c[_0x570742(0x184)][_0x570742(0x19b)]+_0x570742(0x17d),'body':{'appCode':_0x41a353[_0x570742(0x188)],'clientOperationId':_0x17777c['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x17777c[_0x570742(0x184)]['id'],'code':_0x17777c[_0x570742(0x184)][_0x570742(0x19b)],'name':_0x17777c[_0x570742(0x184)][_0x570742(0x197)],'fieldCount':_0x17777c['dataset'][_0x570742(0x19a)]},'precheckSource':_0x17777c[_0x570742(0x180)]?.[_0x570742(0x17a)]??_0x570742(0x192),'action':_0x570742(0x19e),'clientOperationId':_0x17777c[_0x570742(0x178)],'plannedStatus':_0x17777c[_0x570742(0x17f)]['status'],'reason':_0x17777c['precheck'][_0x570742(0x190)]})};},async 'execute'(_0x3f3910){const _0x41ff7d=a135_0x4de99e;if(!_0x3f3910['bool'](_0x41ff7d(0x18f))){const _0x1c5eaf=await pageGenerateStart['dryRun'](_0x3f3910);return{'ok':!![],'message':_0x41ff7d(0x183),'data':_0x1c5eaf};}const _0x18fdf3=await prepare(_0x3f3910);if(!_0x18fdf3[_0x41ff7d(0x17f)]['allowGenerate'])return{'ok':![],'message':_0x18fdf3['precheck'][_0x41ff7d(0x190)],'data':{'datasetCode':_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],'clientOperationId':_0x18fdf3[_0x41ff7d(0x178)],'precheckSource':_0x18fdf3[_0x41ff7d(0x180)]?.['source']??_0x41ff7d(0x192),'status':_0x18fdf3['precheck'][_0x41ff7d(0x172)],'manualResolutionRequired':_0x18fdf3[_0x41ff7d(0x17f)][_0x41ff7d(0x187)],'nextAction':_0x18fdf3[_0x41ff7d(0x17f)][_0x41ff7d(0x194)],'query':{'command':buildStandardPageStatusQueryCommand(_0x18fdf3[_0x41ff7d(0x184)]['code'],_0x3f3910[_0x41ff7d(0x188)])},'standardPageStatus':_0x18fdf3[_0x41ff7d(0x180)]}};const _0x45ee25=await startGenerateStandardPages(_0x3f3910[_0x41ff7d(0x188)],_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],{'clientOperationId':_0x18fdf3[_0x41ff7d(0x178)]}),_0x328488=_0x45ee25[_0x41ff7d(0x172)]===_0x41ff7d(0x198)||_0x45ee25[_0x41ff7d(0x172)]===_0x41ff7d(0x18e)?await loadStandardPageStatusForGenerate(_0x3f3910,_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)]):null,_0x2da21d=assessGenerateOperationState(_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],_0x45ee25['status'],_0x328488);return{'ok':!![],'message':_0x45ee25[_0x41ff7d(0x17c)]?_0x41ff7d(0x186):_0x41ff7d(0x18b),'data':{'datasetCode':_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],'appCode':_0x3f3910[_0x41ff7d(0x188)],'taskId':_0x45ee25[_0x41ff7d(0x179)]??null,'operationId':_0x45ee25['operationId']??null,'clientOperationId':_0x18fdf3['clientOperationId'],'jobStatus':_0x45ee25[_0x41ff7d(0x172)]??null,'progressRate':typeof _0x45ee25[_0x41ff7d(0x19f)]===_0x41ff7d(0x171)?_0x45ee25[_0x41ff7d(0x19f)]:null,'currentStep':_0x45ee25[_0x41ff7d(0x173)]??null,'reused':_0x45ee25[_0x41ff7d(0x17c)]===!![],'status':_0x2da21d[_0x41ff7d(0x172)],'manualResolutionRequired':_0x2da21d[_0x41ff7d(0x187)],'nextAction':_0x2da21d[_0x41ff7d(0x194)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],{'appCode':_0x3f3910['appCode'],'taskId':_0x45ee25['taskId'],'operationId':_0x45ee25[_0x41ff7d(0x18a)],'clientOperationId':_0x18fdf3['clientOperationId']})},'standardPageStatus':_0x328488}};}};async function prepare(_0x46ef51){const _0xbf7b3a=a135_0x4de99e,_0xde0076=await loadDatasetDetailForPage(_0x46ef51),_0x5d89c6=await loadStandardPageStatusForGenerate(_0x46ef51,_0xde0076[_0xbf7b3a(0x19b)]),_0x17f227=getUndeletedRelatedPages(_0xde0076);return{'dataset':_0xde0076,'standardPageStatus':_0x5d89c6,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0xde0076['code'],_0x5d89c6,{'fallbackUndeletedPages':_0x17f227})};}
1
+ const a141_0x448553=a141_0x3626;(function(_0x50a631,_0x34215c){const _0x535582=a141_0x3626,_0x3d26d9=_0x50a631();while(!![]){try{const _0x26dfe0=parseInt(_0x535582(0x1c8))/0x1+-parseInt(_0x535582(0x1ce))/0x2*(-parseInt(_0x535582(0x1d1))/0x3)+parseInt(_0x535582(0x1d2))/0x4+parseInt(_0x535582(0x1df))/0x5+parseInt(_0x535582(0x1d3))/0x6*(-parseInt(_0x535582(0x1dc))/0x7)+-parseInt(_0x535582(0x1c7))/0x8+-parseInt(_0x535582(0x1bb))/0x9;if(_0x26dfe0===_0x34215c)break;else _0x3d26d9['push'](_0x3d26d9['shift']());}catch(_0x24f914){_0x3d26d9['push'](_0x3d26d9['shift']());}}}(a141_0x25e8,0x87e93));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';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':a141_0x448553(0x1d4),'command':a141_0x448553(0x1c1),'description':'Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a141_0x448553(0x1c0),'defaultOutputFormat':a141_0x448553(0x1c6),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a141_0x448553(0x1ca),'type':'string','description':a141_0x448553(0x1c9)},{'name':'apply','type':'boolean','description':a141_0x448553(0x1da)}],async 'validate'(_0x3bb9b5){validateDatasetSelector(_0x3bb9b5);},async 'dryRun'(_0x30bb66){const _0x3ed1f4=a141_0x448553,_0x480171=await prepare(_0x30bb66);return{'method':_0x3ed1f4(0x1b8),'url':'/smartapi/lovrabet/dataset/'+_0x480171['dataset']['code']+_0x3ed1f4(0x1bc),'body':{'appCode':_0x30bb66['appCode'],'clientOperationId':_0x480171[_0x3ed1f4(0x1d6)]},'description':serializeDryRunDescription({'dataset':{'id':_0x480171[_0x3ed1f4(0x1d9)]['id'],'code':_0x480171[_0x3ed1f4(0x1d9)][_0x3ed1f4(0x1de)],'name':_0x480171['dataset'][_0x3ed1f4(0x1cc)],'fieldCount':_0x480171['dataset'][_0x3ed1f4(0x1be)]},'precheckSource':_0x480171[_0x3ed1f4(0x1db)]?.['source']??'related-pages-fallback','action':_0x3ed1f4(0x1c1),'clientOperationId':_0x480171['clientOperationId'],'plannedStatus':_0x480171[_0x3ed1f4(0x1bf)][_0x3ed1f4(0x1b9)],'reason':_0x480171[_0x3ed1f4(0x1bf)][_0x3ed1f4(0x1cb)]})};},async 'execute'(_0x30ab9e){const _0xe88892=a141_0x448553;if(!_0x30ab9e[_0xe88892(0x1c2)](_0xe88892(0x1d0))){const _0x416feb=await pageGenerateStart['dryRun'](_0x30ab9e);return{'ok':!![],'message':_0xe88892(0x1d5),'data':_0x416feb};}const _0x25b9f0=await prepare(_0x30ab9e);if(!_0x25b9f0[_0xe88892(0x1bf)]['allowGenerate'])return{'ok':![],'message':_0x25b9f0[_0xe88892(0x1bf)][_0xe88892(0x1cb)],'data':{'datasetCode':_0x25b9f0[_0xe88892(0x1d9)][_0xe88892(0x1de)],'clientOperationId':_0x25b9f0['clientOperationId'],'precheckSource':_0x25b9f0[_0xe88892(0x1db)]?.[_0xe88892(0x1c5)]??_0xe88892(0x1dd),'status':_0x25b9f0[_0xe88892(0x1bf)][_0xe88892(0x1b9)],'manualResolutionRequired':_0x25b9f0[_0xe88892(0x1bf)][_0xe88892(0x1c4)],'nextAction':_0x25b9f0['precheck'][_0xe88892(0x1cd)],'query':{'command':buildStandardPageStatusQueryCommand(_0x25b9f0['dataset'][_0xe88892(0x1de)],_0x30ab9e['appCode'])},'standardPageStatus':_0x25b9f0[_0xe88892(0x1db)]}};const _0x44c4ce=await startGenerateStandardPages(_0x30ab9e[_0xe88892(0x1d7)],_0x25b9f0['dataset'][_0xe88892(0x1de)],{'clientOperationId':_0x25b9f0[_0xe88892(0x1d6)]}),_0x56f9fa=_0x44c4ce[_0xe88892(0x1b9)]==='SUCCESS'||_0x44c4ce[_0xe88892(0x1b9)]===_0xe88892(0x1c3)?await loadStandardPageStatusForGenerate(_0x30ab9e,_0x25b9f0[_0xe88892(0x1d9)][_0xe88892(0x1de)]):null,_0x356cbe=assessGenerateOperationState(_0x25b9f0[_0xe88892(0x1d9)][_0xe88892(0x1de)],_0x44c4ce['status'],_0x56f9fa);return{'ok':!![],'message':_0x44c4ce[_0xe88892(0x1ba)]?'复用已有生成任务':_0xe88892(0x1bd),'data':{'datasetCode':_0x25b9f0[_0xe88892(0x1d9)][_0xe88892(0x1de)],'appCode':_0x30ab9e[_0xe88892(0x1d7)],'taskId':_0x44c4ce['taskId']??null,'operationId':_0x44c4ce[_0xe88892(0x1e0)]??null,'clientOperationId':_0x25b9f0[_0xe88892(0x1d6)],'jobStatus':_0x44c4ce[_0xe88892(0x1b9)]??null,'progressRate':typeof _0x44c4ce[_0xe88892(0x1cf)]==='number'?_0x44c4ce[_0xe88892(0x1cf)]:null,'currentStep':_0x44c4ce[_0xe88892(0x1d8)]??null,'reused':_0x44c4ce[_0xe88892(0x1ba)]===!![],'status':_0x356cbe[_0xe88892(0x1b9)],'manualResolutionRequired':_0x356cbe[_0xe88892(0x1c4)],'nextAction':_0x356cbe['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x25b9f0[_0xe88892(0x1d9)]['code'],{'appCode':_0x30ab9e[_0xe88892(0x1d7)],'taskId':_0x44c4ce['taskId'],'operationId':_0x44c4ce[_0xe88892(0x1e0)],'clientOperationId':_0x25b9f0[_0xe88892(0x1d6)]})},'standardPageStatus':_0x56f9fa}};}};function a141_0x3626(_0x35c619,_0x4aab5d){_0x35c619=_0x35c619-0x1b8;const _0x25e810=a141_0x25e8();let _0x362602=_0x25e810[_0x35c619];return _0x362602;}async function prepare(_0xa41f6a){const _0x3bf178=a141_0x448553,_0x41a0c8=await loadDatasetDetailForPage(_0xa41f6a),_0x4fbc11=await loadStandardPageStatusForGenerate(_0xa41f6a,_0x41a0c8[_0x3bf178(0x1de)]),_0x2e177d=getUndeletedRelatedPages(_0x41a0c8);return{'dataset':_0x41a0c8,'standardPageStatus':_0x4fbc11,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x41a0c8[_0x3bf178(0x1de)],_0x4fbc11,{'fallbackUndeletedPages':_0x2e177d})};}function a141_0x25e8(){const _0x20b1a5=['1717028BZxhCU','3755034viLDey','page','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','clientOperationId','appCode','currentStep','dataset','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','standardPageStatus','7Gmvhpb','related-pages-fallback','code','2851170hNjLJx','operationId','POST','status','reused','1234926VGEKlg','/generate-standard-pages/start','已提交生成任务','fieldCount','precheck','write','generate-start','bool','PARTIAL_SUCCESS','manualResolutionRequired','source','compress','4456432IxjPkl','785327OeJMgl','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','alias','message','name','nextAction','5110oTGJhf','progressRate','apply','108yDUHUS'];a141_0x25e8=function(){return _0x20b1a5;};return a141_0x25e8();}
@@ -1 +1 @@
1
- const a136_0x2a095b=a136_0x50e3;function a136_0x50e3(_0x59cd3a,_0x14f47a){_0x59cd3a=_0x59cd3a-0xa9;const _0x343001=a136_0x3430();let _0x50e3f7=_0x343001[_0x59cd3a];return _0x50e3f7;}(function(_0x20bb55,_0x516bd5){const _0x1ec720=a136_0x50e3,_0x39e0e4=_0x20bb55();while(!![]){try{const _0x18b3da=-parseInt(_0x1ec720(0xc9))/0x1*(parseInt(_0x1ec720(0xbf))/0x2)+parseInt(_0x1ec720(0xb6))/0x3*(parseInt(_0x1ec720(0xc2))/0x4)+-parseInt(_0x1ec720(0xaf))/0x5*(parseInt(_0x1ec720(0xc1))/0x6)+-parseInt(_0x1ec720(0xc0))/0x7+-parseInt(_0x1ec720(0xc4))/0x8*(-parseInt(_0x1ec720(0xbe))/0x9)+-parseInt(_0x1ec720(0xb2))/0xa*(-parseInt(_0x1ec720(0xc3))/0xb)+-parseInt(_0x1ec720(0xc6))/0xc*(-parseInt(_0x1ec720(0xce))/0xd);if(_0x18b3da===_0x516bd5)break;else _0x39e0e4['push'](_0x39e0e4['shift']());}catch(_0x46ef61){_0x39e0e4['push'](_0x39e0e4['shift']());}}}(a136_0x3430,0xa37a1));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_0x2a095b(0xbc),'command':'generate-status','description':a136_0x2a095b(0xb4),'risk':a136_0x2a095b(0xd4),'defaultOutputFormat':a136_0x2a095b(0xb1),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a136_0x2a095b(0xca),'description':a136_0x2a095b(0xc5)},{'name':a136_0x2a095b(0xd1),'type':a136_0x2a095b(0xca),'description':a136_0x2a095b(0xcc)},{'name':a136_0x2a095b(0xad),'type':a136_0x2a095b(0xca),'description':'Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start'},{'name':a136_0x2a095b(0xd3),'type':a136_0x2a095b(0xca),'description':'Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost'}],async 'validate'(_0x35a19a){validateDatasetSelector(_0x35a19a),validateGenerateOperationSelector(_0x35a19a);},async 'dryRun'(_0x331a82){const _0x1ee4bb=a136_0x2a095b,_0x462dbe=await loadDatasetDetailForPage(_0x331a82),_0x1d9f0a=_0x331a82['str'](_0x1ee4bb(0xd1)),_0x53024c=_0x331a82[_0x1ee4bb(0xc7)](_0x1ee4bb(0xad)),_0x34bcb6=_0x331a82[_0x1ee4bb(0xc7)](_0x1ee4bb(0xd3)),_0x2369e4=new URLSearchParams({'appCode':_0x331a82['appCode']});return _0x1d9f0a&&_0x2369e4[_0x1ee4bb(0xb7)]('taskId',_0x1d9f0a),_0x53024c&&_0x2369e4[_0x1ee4bb(0xb7)](_0x1ee4bb(0xba),_0x53024c),_0x34bcb6&&_0x2369e4['set'](_0x1ee4bb(0xac),_0x34bcb6),{'method':_0x1ee4bb(0xc8),'url':_0x1ee4bb(0xae)+_0x462dbe[_0x1ee4bb(0xd2)]+'/generate-standard-pages/status?'+_0x2369e4[_0x1ee4bb(0xab)](),'description':serializeDryRunDescription({'dataset':{'id':_0x462dbe['id'],'code':_0x462dbe[_0x1ee4bb(0xd2)],'name':_0x462dbe['name']},'action':_0x1ee4bb(0xb8),'taskId':_0x1d9f0a||undefined,'operationId':_0x53024c||undefined,'clientOperationId':_0x34bcb6||undefined})};},async 'execute'(_0x2f0081){const _0x10f4b0=a136_0x2a095b,_0x45af33=await loadDatasetDetailForPage(_0x2f0081),_0x2edb83=_0x2f0081[_0x10f4b0(0xc7)]('task-id'),_0x4fd51c=_0x2f0081[_0x10f4b0(0xc7)]('operation-id'),_0x6e3f8=_0x2f0081[_0x10f4b0(0xc7)](_0x10f4b0(0xd3)),_0x2cf68b=await getGenerateStandardPagesStatus(_0x2f0081[_0x10f4b0(0xcd)],_0x45af33['code'],{'taskId':_0x2edb83||undefined,'operationId':_0x4fd51c||undefined,'clientOperationId':_0x6e3f8||undefined}),_0x247ee2=_0x2cf68b[_0x10f4b0(0xb0)]===_0x10f4b0(0xb5)||_0x2cf68b[_0x10f4b0(0xb0)]==='PARTIAL_SUCCESS',_0x4affc1=_0x247ee2?await loadStandardPageStatusForGenerate(_0x2f0081,_0x45af33[_0x10f4b0(0xd2)]):null,_0x88ab8=assessGenerateOperationState(_0x45af33[_0x10f4b0(0xd2)],_0x2cf68b[_0x10f4b0(0xb0)],_0x4affc1),_0x23c95d=_0x2cf68b[_0x10f4b0(0xbb)]??_0x2edb83??undefined,_0x44be3b=_0x2cf68b['operationId']??_0x4fd51c??undefined,_0x125f0f=_0x2cf68b[_0x10f4b0(0xac)]??_0x6e3f8??undefined;return{'ok':!![],'message':_0x88ab8[_0x10f4b0(0xb0)]===_0x10f4b0(0xb9)?_0x2cf68b['errorMsg']||_0x88ab8[_0x10f4b0(0xcb)]:_0x88ab8['message'],'data':{'datasetCode':_0x45af33['code'],'appCode':_0x2f0081['appCode'],'taskId':_0x23c95d,'operationId':_0x44be3b,'clientOperationId':_0x125f0f,'jobStatus':_0x2cf68b[_0x10f4b0(0xb0)]??null,'progressRate':typeof _0x2cf68b[_0x10f4b0(0xbd)]==='number'?_0x2cf68b[_0x10f4b0(0xbd)]:null,'currentStep':_0x2cf68b[_0x10f4b0(0xcf)]??null,'errorMsg':_0x2cf68b[_0x10f4b0(0xd0)]??null,'status':_0x88ab8['status'],'manualResolutionRequired':_0x88ab8[_0x10f4b0(0xb3)],'nextAction':_0x88ab8[_0x10f4b0(0xaa)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x45af33[_0x10f4b0(0xd2)],{'appCode':_0x2f0081[_0x10f4b0(0xcd)],'taskId':_0x23c95d,'operationId':_0x44be3b,'clientOperationId':_0x125f0f})},'standardPageStatus':_0x4affc1,'result':_0x2cf68b[_0x10f4b0(0xa9)]??null}};}};function a136_0x3430(){const _0x55d924=['str','GET','1QvsZme','string','message','Generic\x20task\x20id\x20returned\x20by\x20page\x20generate-start','appCode','182qobkfp','currentStep','errorMsg','task-id','code','client-operation-id','read','result','nextAction','toString','clientOperationId','operation-id','/smartapi/lovrabet/dataset/','25pZdjdd','status','compress','300xypXdL','manualResolutionRequired','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','SUCCESS','12GYbgFv','set','query-generate-operation-status','operation_failed','operationId','taskId','page','progressRate','612cIrzRd','742814nlhhAR','6276137kLSMic','1097778dQBZKg','143932GeaKQm','462957FfBniQ','57704IIplrJ','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','818904qYjKYQ'];a136_0x3430=function(){return _0x55d924;};return a136_0x3430();}
1
+ const a142_0x49172f=a142_0x1c37;(function(_0xb89f71,_0x3a320c){const _0x2d68f4=a142_0x1c37,_0x150bf6=_0xb89f71();while(!![]){try{const _0x4dded8=parseInt(_0x2d68f4(0x1a3))/0x1*(-parseInt(_0x2d68f4(0x1a6))/0x2)+parseInt(_0x2d68f4(0x18d))/0x3*(parseInt(_0x2d68f4(0x18a))/0x4)+-parseInt(_0x2d68f4(0x18b))/0x5*(parseInt(_0x2d68f4(0x186))/0x6)+parseInt(_0x2d68f4(0x19f))/0x7+parseInt(_0x2d68f4(0x190))/0x8+-parseInt(_0x2d68f4(0x195))/0x9*(-parseInt(_0x2d68f4(0x19a))/0xa)+-parseInt(_0x2d68f4(0x19b))/0xb*(parseInt(_0x2d68f4(0x18c))/0xc);if(_0x4dded8===_0x3a320c)break;else _0x150bf6['push'](_0x150bf6['shift']());}catch(_0x400798){_0x150bf6['push'](_0x150bf6['shift']());}}}(a142_0x1fb6,0xa18dd));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';function a142_0x1c37(_0x1ff4e4,_0xdf2092){_0x1ff4e4=_0x1ff4e4-0x182;const _0x1fb6a4=a142_0x1fb6();let _0x1c3764=_0x1fb6a4[_0x1ff4e4];return _0x1c3764;}function a142_0x1fb6(){const _0x60a4e3=['result','str','1461584MzjTMF','name','/generate-standard-pages/status?','errorMsg','manualResolutionRequired','10241397GXnhAw','set','code','/smartapi/lovrabet/dataset/','operationId','10KaokPh','258654bwviFk','operation_failed','client-operation-id','query-generate-operation-status','5829992zPbEQs','compress','taskId','toString','2UwGIQc','appCode','number','779582pbfrws','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start','operation-id','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','message','status','GET','task-id','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','clientOperationId','read','progressRate','116106gMAKUR','Generic\x20task\x20id\x20returned\x20by\x20page\x20generate-start','currentStep','string','8uFHMnD','30tRONkI','852rkaeBv','1610130cHmJcM'];a142_0x1fb6=function(){return _0x60a4e3;};return a142_0x1fb6();}import{getGenerateStandardPagesStatus}from'../../core/api-client.js';export const pageGenerateStatus={'service':'page','command':'generate-status','description':a142_0x49172f(0x182),'risk':a142_0x49172f(0x184),'defaultOutputFormat':a142_0x49172f(0x1a0),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a142_0x49172f(0x189),'description':a142_0x49172f(0x1aa)},{'name':'task-id','type':a142_0x49172f(0x189),'description':a142_0x49172f(0x187)},{'name':a142_0x49172f(0x1a9),'type':a142_0x49172f(0x189),'description':a142_0x49172f(0x1a8)},{'name':a142_0x49172f(0x19d),'type':a142_0x49172f(0x189),'description':a142_0x49172f(0x1a7)}],async 'validate'(_0x59373e){validateDatasetSelector(_0x59373e),validateGenerateOperationSelector(_0x59373e);},async 'dryRun'(_0x1616e8){const _0x36bd8b=a142_0x49172f,_0xe10e7c=await loadDatasetDetailForPage(_0x1616e8),_0x515032=_0x1616e8[_0x36bd8b(0x18f)]('task-id'),_0x164df1=_0x1616e8[_0x36bd8b(0x18f)]('operation-id'),_0xfe0845=_0x1616e8['str'](_0x36bd8b(0x19d)),_0x3f7d6b=new URLSearchParams({'appCode':_0x1616e8['appCode']});return _0x515032&&_0x3f7d6b[_0x36bd8b(0x196)](_0x36bd8b(0x1a1),_0x515032),_0x164df1&&_0x3f7d6b[_0x36bd8b(0x196)](_0x36bd8b(0x199),_0x164df1),_0xfe0845&&_0x3f7d6b[_0x36bd8b(0x196)]('clientOperationId',_0xfe0845),{'method':_0x36bd8b(0x1ad),'url':_0x36bd8b(0x198)+_0xe10e7c[_0x36bd8b(0x197)]+_0x36bd8b(0x192)+_0x3f7d6b[_0x36bd8b(0x1a2)](),'description':serializeDryRunDescription({'dataset':{'id':_0xe10e7c['id'],'code':_0xe10e7c[_0x36bd8b(0x197)],'name':_0xe10e7c[_0x36bd8b(0x191)]},'action':_0x36bd8b(0x19e),'taskId':_0x515032||undefined,'operationId':_0x164df1||undefined,'clientOperationId':_0xfe0845||undefined})};},async 'execute'(_0x5791cc){const _0x4fe4bd=a142_0x49172f,_0x1ab4c5=await loadDatasetDetailForPage(_0x5791cc),_0x4a249e=_0x5791cc[_0x4fe4bd(0x18f)](_0x4fe4bd(0x1ae)),_0x55d274=_0x5791cc[_0x4fe4bd(0x18f)]('operation-id'),_0x254772=_0x5791cc[_0x4fe4bd(0x18f)](_0x4fe4bd(0x19d)),_0x1b82b1=await getGenerateStandardPagesStatus(_0x5791cc[_0x4fe4bd(0x1a4)],_0x1ab4c5[_0x4fe4bd(0x197)],{'taskId':_0x4a249e||undefined,'operationId':_0x55d274||undefined,'clientOperationId':_0x254772||undefined}),_0x1a54e8=_0x1b82b1[_0x4fe4bd(0x1ac)]==='SUCCESS'||_0x1b82b1[_0x4fe4bd(0x1ac)]==='PARTIAL_SUCCESS',_0x1fccab=_0x1a54e8?await loadStandardPageStatusForGenerate(_0x5791cc,_0x1ab4c5[_0x4fe4bd(0x197)]):null,_0x464d40=assessGenerateOperationState(_0x1ab4c5['code'],_0x1b82b1[_0x4fe4bd(0x1ac)],_0x1fccab),_0x3af4d2=_0x1b82b1[_0x4fe4bd(0x1a1)]??_0x4a249e??undefined,_0x4e1b2a=_0x1b82b1['operationId']??_0x55d274??undefined,_0x536112=_0x1b82b1[_0x4fe4bd(0x183)]??_0x254772??undefined;return{'ok':!![],'message':_0x464d40[_0x4fe4bd(0x1ac)]===_0x4fe4bd(0x19c)?_0x1b82b1[_0x4fe4bd(0x193)]||_0x464d40[_0x4fe4bd(0x1ab)]:_0x464d40[_0x4fe4bd(0x1ab)],'data':{'datasetCode':_0x1ab4c5['code'],'appCode':_0x5791cc[_0x4fe4bd(0x1a4)],'taskId':_0x3af4d2,'operationId':_0x4e1b2a,'clientOperationId':_0x536112,'jobStatus':_0x1b82b1[_0x4fe4bd(0x1ac)]??null,'progressRate':typeof _0x1b82b1[_0x4fe4bd(0x185)]===_0x4fe4bd(0x1a5)?_0x1b82b1['progressRate']:null,'currentStep':_0x1b82b1[_0x4fe4bd(0x188)]??null,'errorMsg':_0x1b82b1[_0x4fe4bd(0x193)]??null,'status':_0x464d40[_0x4fe4bd(0x1ac)],'manualResolutionRequired':_0x464d40[_0x4fe4bd(0x194)],'nextAction':_0x464d40['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x1ab4c5[_0x4fe4bd(0x197)],{'appCode':_0x5791cc[_0x4fe4bd(0x1a4)],'taskId':_0x3af4d2,'operationId':_0x4e1b2a,'clientOperationId':_0x536112})},'standardPageStatus':_0x1fccab,'result':_0x1b82b1[_0x4fe4bd(0x18e)]??null}};}};
@@ -1 +1 @@
1
- function a137_0x4302(){const _0x2d05b0=['8224456nKDlnm','13303670kElQaq','6iQVhYO','7BjWTfh','1039692OpaAhX','352700hwAlHQ','864MlyrvJ','9ubKVoG','3377730QtmwiM','2659936fmbrfj','1RhNQCc','772937kHbuKw'];a137_0x4302=function(){return _0x2d05b0;};return a137_0x4302();}function a137_0x1f2b(_0xd88baa,_0x198c05){_0xd88baa=_0xd88baa-0x139;const _0x43026d=a137_0x4302();let _0x1f2b5a=_0x43026d[_0xd88baa];return _0x1f2b5a;}(function(_0xefeb57,_0x451241){const _0xe47fd6=a137_0x1f2b,_0x5d999a=_0xefeb57();while(!![]){try{const _0x1f6250=parseInt(_0xe47fd6(0x142))/0x1*(-parseInt(_0xe47fd6(0x13d))/0x2)+-parseInt(_0xe47fd6(0x13a))/0x3*(parseInt(_0xe47fd6(0x141))/0x4)+-parseInt(_0xe47fd6(0x140))/0x5+parseInt(_0xe47fd6(0x13c))/0x6+parseInt(_0xe47fd6(0x13b))/0x7*(-parseInt(_0xe47fd6(0x144))/0x8)+parseInt(_0xe47fd6(0x13f))/0x9*(-parseInt(_0xe47fd6(0x139))/0xa)+-parseInt(_0xe47fd6(0x143))/0xb*(-parseInt(_0xe47fd6(0x13e))/0xc);if(_0x1f6250===_0x451241)break;else _0x5d999a['push'](_0x5d999a['shift']());}catch(_0x4b6296){_0x5d999a['push'](_0x5d999a['shift']());}}}(a137_0x4302,0xa8ffa));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';import{pagePush}from'../../commands/page/push.js';import{pageRelationAudit}from'../../commands/page/relation-audit.js';import{pageRestore}from'../../commands/page/restore.js';import{pageReactCreate}from'../../commands/page/react/create.js';import{pageReactDetail}from'../../commands/page/react/detail.js';import{pageReactList}from'../../commands/page/react/list.js';import{pageReactPublish}from'../../commands/page/react/publish.js';import{pageReactUpdate}from'../../commands/page/react/update.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush,pageRestore,pageReactCreate,pageReactList,pageReactDetail,pageReactPublish,pageReactUpdate];
1
+ function a143_0x1d97(){const _0x2cced0=['10851358EVhRRM','475218oyKOZf','6852304owZuVZ','28273368ekqfUJ','6yoymKU','3995586MAjikd','110151YgDQII','4080115SbZaFj'];a143_0x1d97=function(){return _0x2cced0;};return a143_0x1d97();}(function(_0x1f655e,_0x2a9b77){const _0x227375=a143_0x428f,_0xa1c011=_0x1f655e();while(!![]){try{const _0xe6b813=-parseInt(_0x227375(0x177))/0x1+parseInt(_0x227375(0x172))/0x2+parseInt(_0x227375(0x176))/0x3+-parseInt(_0x227375(0x173))/0x4+-parseInt(_0x227375(0x178))/0x5+parseInt(_0x227375(0x175))/0x6*(-parseInt(_0x227375(0x179))/0x7)+parseInt(_0x227375(0x174))/0x8;if(_0xe6b813===_0x2a9b77)break;else _0xa1c011['push'](_0xa1c011['shift']());}catch(_0x59d1fd){_0xa1c011['push'](_0xa1c011['shift']());}}}(a143_0x1d97,0xdf316));import{pageGenerateStart}from'../../commands/page/generate-start.js';function a143_0x428f(_0x5f5562,_0x205627){_0x5f5562=_0x5f5562-0x172;const _0x1d97d1=a143_0x1d97();let _0x428f63=_0x1d97d1[_0x5f5562];return _0x428f63;}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';import{pagePush}from'../../commands/page/push.js';import{pageRelationAudit}from'../../commands/page/relation-audit.js';import{pageRestore}from'../../commands/page/restore.js';import{pageReactCreate}from'../../commands/page/react/create.js';import{pageReactDetail}from'../../commands/page/react/detail.js';import{pageReactList}from'../../commands/page/react/list.js';import{pageReactPublish}from'../../commands/page/react/publish.js';import{pageReactUpdate}from'../../commands/page/react/update.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush,pageRestore,pageReactCreate,pageReactList,pageReactDetail,pageReactPublish,pageReactUpdate];
@@ -1 +1 @@
1
- const a138_0x1d2317=a138_0x57f4;(function(_0x5cdea8,_0x5570eb){const _0x511a2f=a138_0x57f4,_0x20bf3f=_0x5cdea8();while(!![]){try{const _0x1dbf42=-parseInt(_0x511a2f(0xad))/0x1+-parseInt(_0x511a2f(0x8d))/0x2*(parseInt(_0x511a2f(0xb9))/0x3)+-parseInt(_0x511a2f(0xb6))/0x4+-parseInt(_0x511a2f(0xb8))/0x5+parseInt(_0x511a2f(0xa6))/0x6*(parseInt(_0x511a2f(0x96))/0x7)+-parseInt(_0x511a2f(0x91))/0x8*(-parseInt(_0x511a2f(0x94))/0x9)+parseInt(_0x511a2f(0x8f))/0xa;if(_0x1dbf42===_0x5570eb)break;else _0x20bf3f['push'](_0x20bf3f['shift']());}catch(_0x4efe56){_0x20bf3f['push'](_0x20bf3f['shift']());}}}(a138_0x1657,0xdce5d));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':a138_0x1d2317(0x8e),'command':a138_0x1d2317(0xa3),'description':a138_0x1d2317(0xbf),'risk':'read','defaultOutputFormat':a138_0x1d2317(0xc3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':a138_0x1d2317(0xaa)},DATASETCODE_FLAG_OPTIONAL,{'name':a138_0x1d2317(0xa0),'type':a138_0x1d2317(0xc2),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'version-tag','type':'string','description':a138_0x1d2317(0xc1)},{'name':'force','type':a138_0x1d2317(0x92),'description':a138_0x1d2317(0xa7)}],async 'validate'(_0x7a9c7b){validatePageTargetSelector(_0x7a9c7b);},async 'dryRun'(_0x574eed){const _0x33e800=a138_0x1d2317,_0x2ec7b5=await buildPullPlan(_0x574eed);return{'method':_0x33e800(0xac),'url':_0x2ec7b5[_0x33e800(0x9f)]===_0x33e800(0x95)?_0x33e800(0x98)+(_0x2ec7b5[_0x33e800(0x9d)][0x0]?.[_0x33e800(0xc0)]['pageId']??''):_0x33e800(0xa9),'body':{'appCode':_0x574eed[_0x33e800(0xa5)],'mode':_0x2ec7b5[_0x33e800(0x9f)],'targetDatasetCode':_0x2ec7b5['datasetCode']??null,'pages':_0x2ec7b5[_0x33e800(0x9d)][_0x33e800(0xaf)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x2ec7b5[_0x33e800(0x9f)],'datasetCode':_0x2ec7b5['datasetCode']??null,'totalCandidates':_0x2ec7b5['items'][_0x33e800(0xba)],'totalWouldPull':_0x2ec7b5[_0x33e800(0x9d)]['filter'](_0x32acfb=>_0x32acfb['status']===_0x33e800(0xb7))[_0x33e800(0xba)],'totalConflicts':_0x2ec7b5[_0x33e800(0x9d)]['filter'](_0x22e782=>_0x22e782[_0x33e800(0xb2)]==='conflict')[_0x33e800(0xba)]})};},async 'execute'(_0x3c989f){const _0x432017=a138_0x1d2317,_0x5861be=loadPageProjectConfig(_0x3c989f[_0x432017(0xa5)]),_0x1558cb=await readPageLockFile(_0x5861be[_0x432017(0xb5)]),{lockData:_0x57e880,appLock:_0x35c6d7}=ensurePageLockScope(_0x1558cb??createEmptyPageLock(),_0x3c989f[_0x432017(0xa5)]),_0x493637=await buildPullPlan(_0x3c989f),_0x5ba1d5=_0x3c989f[_0x432017(0xb1)](_0x432017(0x8a));if(_0x493637[_0x432017(0x9f)]===_0x432017(0x95)&&_0x493637[_0x432017(0x9d)][0x0]?.[_0x432017(0xb2)]===_0x432017(0x8c)&&!_0x5ba1d5)throw CliErrors[_0x432017(0xa1)]('Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20'+_0x493637['items'][0x0][_0x432017(0xa2)],'Use\x20--force\x20to\x20overwrite\x20local\x20changes.');const _0x1f6308=[],_0x3b0bef=[];for(const _0x31b996 of _0x493637[_0x432017(0x9d)]){if(_0x31b996[_0x432017(0xb2)]===_0x432017(0x8c)&&!_0x5ba1d5){_0x3b0bef[_0x432017(0x97)]({'pageId':_0x31b996['detail'][_0x432017(0xb3)],'type':_0x31b996[_0x432017(0xc0)]['type'],'title':_0x31b996[_0x432017(0xc0)][_0x432017(0xa8)],'localPath':_0x31b996[_0x432017(0xa2)],'reason':_0x31b996[_0x432017(0xb0)]??_0x432017(0x9e)});continue;}await ensureParentDirectory(_0x31b996[_0x432017(0xa2)]);const _0x44244f=serializePageSchemaForFile(_0x31b996[_0x432017(0xc0)][_0x432017(0x9b)]);await writeFile(_0x31b996[_0x432017(0xa2)],_0x44244f,_0x432017(0xbe)),_0x35c6d7[_0x432017(0xbc)][String(_0x31b996[_0x432017(0xc0)][_0x432017(0xb3)])]=buildLockEntry(_0x31b996['detail'],_0x44244f),_0x1f6308[_0x432017(0x97)]({'pageId':_0x31b996['detail'][_0x432017(0xb3)],'type':_0x31b996['detail'][_0x432017(0x9a)],'title':_0x31b996[_0x432017(0xc0)][_0x432017(0xa8)],'localPath':_0x31b996['localPath']});}return _0x35c6d7[_0x432017(0x8b)]=new Date()[_0x432017(0x93)](),await writePageLockFile(_0x5861be['lockFilePath'],_0x57e880),{'ok':!![],'message':'拉取完成:\x20'+_0x1f6308['length']+_0x432017(0xa4)+_0x3b0bef[_0x432017(0xba)]+_0x432017(0xbd),'data':{'appCode':_0x3c989f[_0x432017(0xa5)],'pulledPages':_0x1f6308,'skippedPages':_0x3b0bef,'totalPulled':_0x1f6308[_0x432017(0xba)],'totalSkipped':_0x3b0bef[_0x432017(0xba)]}};}};function a138_0x57f4(_0x353d64,_0x10c347){_0x353d64=_0x353d64-0x8a;const _0x165769=a138_0x1657();let _0x57f4ef=_0x165769[_0x353d64];return _0x57f4ef;}async function buildPullPlan(_0x250500){const _0x34146e=a138_0x1d2317,_0x4d9414=loadPageProjectConfig(_0x250500[_0x34146e(0xa5)]),_0x2bd570=await readPageLockFile(_0x4d9414[_0x34146e(0xb5)]),{appLock:_0x339704}=ensurePageLockScope(_0x2bd570??createEmptyPageLock(),_0x250500[_0x34146e(0xa5)]),_0x4396c2=getPageIdFlag(_0x250500);if(_0x4396c2!==undefined){const _0x39cab7=await loadPageDetailForPage(_0x250500,_0x4396c2);return{'mode':_0x34146e(0x95),'items':[await inspectPullTarget(_0x4d9414,_0x339704[_0x34146e(0xbc)][String(_0x39cab7[_0x34146e(0xb3)])],_0x39cab7)]};}const _0x1d8833=await loadDatasetDetailForPage(_0x250500),_0x159ff0=_0x1d8833[_0x34146e(0x9c)][_0x34146e(0xbb)](_0x4a46b2=>!_0x4a46b2['deleted']);if(_0x159ff0[_0x34146e(0xba)]===0x0)throw CliErrors['validation'](_0x34146e(0x90)+_0x1d8833[_0x34146e(0x9b)]+_0x34146e(0xae));const _0x4115ce=await Promise[_0x34146e(0x99)](_0x159ff0[_0x34146e(0xaf)](_0x5a53ea=>loadPageDetailForPage(_0x250500,_0x5a53ea['id']))),_0x2e3b64=selectVersionTagGroup(_0x4115ce,_0x4e661d=>_0x4e661d['versionTag'],_0x250500['str']('version-tag'));return{'mode':_0x34146e(0xb4),'datasetCode':_0x1d8833[_0x34146e(0x9b)],'items':await Promise[_0x34146e(0x99)](_0x2e3b64[_0x34146e(0x9d)]['map'](_0x4f3ff2=>inspectPullTarget(_0x4d9414,_0x339704[_0x34146e(0xbc)][String(_0x4f3ff2[_0x34146e(0xb3)])],_0x4f3ff2)))};}async function inspectPullTarget(_0x1d5da2,_0x592d43,_0x10f41b){const _0x672d45=a138_0x1d2317,_0x3a01c8=resolvePageFilePath(_0x1d5da2,_0x10f41b['pageId'],_0x10f41b[_0x672d45(0x9a)]),_0x32e30f=await fileExists(_0x3a01c8);if(!_0x32e30f){const _0x20a440=serializePageSchemaForFile(_0x10f41b['code']);return{'detail':_0x10f41b,'localPath':_0x3a01c8,'localHash':computePageContentHash(_0x20a440),'status':_0x672d45(0xb7)};}const _0x284610=await computePageFileHash(_0x3a01c8);if(!_0x592d43||_0x284610!==_0x592d43['hash'])return{'detail':_0x10f41b,'localPath':_0x3a01c8,'localHash':_0x284610,'status':_0x672d45(0x8c),'reason':_0x672d45(0x9e)};return{'detail':_0x10f41b,'localPath':_0x3a01c8,'localHash':_0x284610,'status':_0x672d45(0xb7)};}function buildLockEntry(_0x45c90a,_0x39fa17){const _0x2b94c8=a138_0x1d2317;return{'hash':computePageContentHash(_0x39fa17),'pageId':_0x45c90a[_0x2b94c8(0xb3)],'pageVersion':_0x45c90a[_0x2b94c8(0xab)],'type':_0x45c90a['type'],'title':_0x45c90a['name'],'datasetIds':_0x45c90a['datasetIds'],'versionTag':_0x45c90a['versionTag']};}function a138_0x1657(){const _0x467013=['GET','1089549DVNlNN','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','map','reason','bool','status','pageId','batch','lockFilePath','6673340SVZQPa','would_pull','8934490CkuLXK','1569CSNZSI','length','filter','pages','\x20skipped','utf8','Pull\x20page\x20schema\x20to\x20local\x20files','detail','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','string','compress','force','lastSync','conflict','5346kKFyDl','page','64194380EJRjtI','Dataset\x20\x22','8kulbfx','boolean','toISOString','3201921BFViGC','single','63qOXQpb','push','/smartapi/lovrabet/detail?pageId=','all','type','code','relatedPages','items','local\x20unsynced\x20changes','mode','alias','validation','localPath','pull','\x20pulled,\x20','appCode','48234WXNBzt','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','name','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','Page\x20ID','pageVersion'];a138_0x1657=function(){return _0x467013;};return a138_0x1657();}function toPreviewItem(_0x43d169){const _0x1ca6b8=a138_0x1d2317;return{'pageId':_0x43d169[_0x1ca6b8(0xc0)]['pageId'],'type':_0x43d169[_0x1ca6b8(0xc0)][_0x1ca6b8(0x9a)],'title':_0x43d169[_0x1ca6b8(0xc0)][_0x1ca6b8(0xa8)],'localPath':_0x43d169[_0x1ca6b8(0xa2)],'status':_0x43d169[_0x1ca6b8(0xb2)],..._0x43d169['reason']?{'reason':_0x43d169[_0x1ca6b8(0xb0)]}:{}};}
1
+ const a144_0x168eef=a144_0x523d;(function(_0x170c04,_0x55b00f){const _0x163ccc=a144_0x523d,_0x58d0ce=_0x170c04();while(!![]){try{const _0xee6cb=parseInt(_0x163ccc(0xe6))/0x1+-parseInt(_0x163ccc(0x121))/0x2*(-parseInt(_0x163ccc(0x109))/0x3)+-parseInt(_0x163ccc(0x10a))/0x4*(parseInt(_0x163ccc(0x10c))/0x5)+-parseInt(_0x163ccc(0x106))/0x6*(parseInt(_0x163ccc(0x120))/0x7)+-parseInt(_0x163ccc(0xfc))/0x8*(parseInt(_0x163ccc(0x107))/0x9)+parseInt(_0x163ccc(0x10b))/0xa+-parseInt(_0x163ccc(0x110))/0xb*(-parseInt(_0x163ccc(0x102))/0xc);if(_0xee6cb===_0x55b00f)break;else _0x58d0ce['push'](_0x58d0ce['shift']());}catch(_0x4f57fe){_0x58d0ce['push'](_0x58d0ce['shift']());}}}(a144_0x1024,0xa3439));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a144_0x1024(){const _0x55e15c=['lockFilePath','89968rVGOpO','detail','status','pageId','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','number','294996gQUkGN','push','Dataset\x20\x22','local\x20unsynced\x20changes','248718FKDtxa','1026rXuRxa','validation','6oiNtxC','141748dIRpaN','9336190AxBlZU','115EazZPb','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','Page\x20ID','version-tag','517wAbmIj','拉取完成:\x20','alias','page','would_pull','pages','\x20skipped','\x20pulled,\x20','name','utf8','GET','filter','boolean','pull','appCode','single','63wvVQRO','885106dtpAeo','map','mode','force','reason','164775lzwFaw','toISOString','type','relatedPages','all','lastSync','conflict','pageVersion','localPath','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','versionTag','string','hash','str','length','code','items','/smartapi/lovrabet/detail?pageId=','bool','compress','Pull\x20page\x20schema\x20to\x20local\x20files'];a144_0x1024=function(){return _0x55e15c;};return a144_0x1024();}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';function a144_0x523d(_0x297e76,_0x212221){_0x297e76=_0x297e76-0xe6;const _0x10243a=a144_0x1024();let _0x523db6=_0x10243a[_0x297e76];return _0x523db6;}export const pagePull={'service':a144_0x168eef(0x113),'command':a144_0x168eef(0x11d),'description':a144_0x168eef(0xfa),'risk':'read','defaultOutputFormat':a144_0x168eef(0xf9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a144_0x168eef(0x101),'description':a144_0x168eef(0x10e)},DATASETCODE_FLAG_OPTIONAL,{'name':a144_0x168eef(0x112),'type':'string','description':a144_0x168eef(0x100)},{'name':a144_0x168eef(0x10f),'type':a144_0x168eef(0xf1),'description':a144_0x168eef(0x10d)},{'name':'force','type':a144_0x168eef(0x11c),'description':a144_0x168eef(0xef)}],async 'validate'(_0x2f1e8e){validatePageTargetSelector(_0x2f1e8e);},async 'dryRun'(_0x283de4){const _0x2cd5bc=a144_0x168eef,_0xcadec3=await buildPullPlan(_0x283de4);return{'method':_0x2cd5bc(0x11a),'url':_0xcadec3[_0x2cd5bc(0x123)]===_0x2cd5bc(0x11f)?_0x2cd5bc(0xf7)+(_0xcadec3[_0x2cd5bc(0xf6)][0x0]?.[_0x2cd5bc(0xfd)][_0x2cd5bc(0xff)]??''):'/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','body':{'appCode':_0x283de4[_0x2cd5bc(0x11e)],'mode':_0xcadec3[_0x2cd5bc(0x123)],'targetDatasetCode':_0xcadec3['datasetCode']??null,'pages':_0xcadec3[_0x2cd5bc(0xf6)][_0x2cd5bc(0x122)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0xcadec3['mode'],'datasetCode':_0xcadec3['datasetCode']??null,'totalCandidates':_0xcadec3['items']['length'],'totalWouldPull':_0xcadec3['items'][_0x2cd5bc(0x11b)](_0x3d2195=>_0x3d2195[_0x2cd5bc(0xfe)]==='would_pull')[_0x2cd5bc(0xf4)],'totalConflicts':_0xcadec3[_0x2cd5bc(0xf6)]['filter'](_0x8951dd=>_0x8951dd[_0x2cd5bc(0xfe)]===_0x2cd5bc(0xec))[_0x2cd5bc(0xf4)]})};},async 'execute'(_0x5b95ec){const _0x56043d=a144_0x168eef,_0x2e1537=loadPageProjectConfig(_0x5b95ec[_0x56043d(0x11e)]),_0x3438a1=await readPageLockFile(_0x2e1537[_0x56043d(0xfb)]),{lockData:_0x33042b,appLock:_0x599fc4}=ensurePageLockScope(_0x3438a1??createEmptyPageLock(),_0x5b95ec[_0x56043d(0x11e)]),_0x197f88=await buildPullPlan(_0x5b95ec),_0x2d4895=_0x5b95ec[_0x56043d(0xf8)](_0x56043d(0x124));if(_0x197f88[_0x56043d(0x123)]===_0x56043d(0x11f)&&_0x197f88['items'][0x0]?.[_0x56043d(0xfe)]===_0x56043d(0xec)&&!_0x2d4895)throw CliErrors[_0x56043d(0x108)]('Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20'+_0x197f88['items'][0x0][_0x56043d(0xee)],'Use\x20--force\x20to\x20overwrite\x20local\x20changes.');const _0x74c317=[],_0x3b0818=[];for(const _0x35c9f2 of _0x197f88[_0x56043d(0xf6)]){if(_0x35c9f2['status']===_0x56043d(0xec)&&!_0x2d4895){_0x3b0818[_0x56043d(0x103)]({'pageId':_0x35c9f2['detail'][_0x56043d(0xff)],'type':_0x35c9f2[_0x56043d(0xfd)][_0x56043d(0xe8)],'title':_0x35c9f2[_0x56043d(0xfd)][_0x56043d(0x118)],'localPath':_0x35c9f2[_0x56043d(0xee)],'reason':_0x35c9f2[_0x56043d(0x125)]??'local\x20unsynced\x20changes'});continue;}await ensureParentDirectory(_0x35c9f2[_0x56043d(0xee)]);const _0x3f66ff=serializePageSchemaForFile(_0x35c9f2[_0x56043d(0xfd)][_0x56043d(0xf5)]);await writeFile(_0x35c9f2[_0x56043d(0xee)],_0x3f66ff,_0x56043d(0x119)),_0x599fc4[_0x56043d(0x115)][String(_0x35c9f2[_0x56043d(0xfd)][_0x56043d(0xff)])]=buildLockEntry(_0x35c9f2['detail'],_0x3f66ff),_0x74c317[_0x56043d(0x103)]({'pageId':_0x35c9f2[_0x56043d(0xfd)][_0x56043d(0xff)],'type':_0x35c9f2['detail'][_0x56043d(0xe8)],'title':_0x35c9f2[_0x56043d(0xfd)][_0x56043d(0x118)],'localPath':_0x35c9f2[_0x56043d(0xee)]});}return _0x599fc4[_0x56043d(0xeb)]=new Date()[_0x56043d(0xe7)](),await writePageLockFile(_0x2e1537[_0x56043d(0xfb)],_0x33042b),{'ok':!![],'message':_0x56043d(0x111)+_0x74c317[_0x56043d(0xf4)]+_0x56043d(0x117)+_0x3b0818[_0x56043d(0xf4)]+_0x56043d(0x116),'data':{'appCode':_0x5b95ec[_0x56043d(0x11e)],'pulledPages':_0x74c317,'skippedPages':_0x3b0818,'totalPulled':_0x74c317[_0x56043d(0xf4)],'totalSkipped':_0x3b0818[_0x56043d(0xf4)]}};}};async function buildPullPlan(_0x1e9250){const _0x5a3a9e=a144_0x168eef,_0x7ad970=loadPageProjectConfig(_0x1e9250['appCode']),_0x4c4e16=await readPageLockFile(_0x7ad970[_0x5a3a9e(0xfb)]),{appLock:_0x172cc6}=ensurePageLockScope(_0x4c4e16??createEmptyPageLock(),_0x1e9250['appCode']),_0x41463c=getPageIdFlag(_0x1e9250);if(_0x41463c!==undefined){const _0x232218=await loadPageDetailForPage(_0x1e9250,_0x41463c);return{'mode':_0x5a3a9e(0x11f),'items':[await inspectPullTarget(_0x7ad970,_0x172cc6['pages'][String(_0x232218['pageId'])],_0x232218)]};}const _0xa43f59=await loadDatasetDetailForPage(_0x1e9250),_0x52356f=_0xa43f59[_0x5a3a9e(0xe9)]['filter'](_0x152ced=>!_0x152ced['deleted']);if(_0x52356f[_0x5a3a9e(0xf4)]===0x0)throw CliErrors['validation'](_0x5a3a9e(0x104)+_0xa43f59[_0x5a3a9e(0xf5)]+'\x22\x20has\x20no\x20undeleted\x20related\x20pages.');const _0x211a19=await Promise['all'](_0x52356f[_0x5a3a9e(0x122)](_0x4056b7=>loadPageDetailForPage(_0x1e9250,_0x4056b7['id']))),_0x3dfed0=selectVersionTagGroup(_0x211a19,_0x1784f5=>_0x1784f5[_0x5a3a9e(0xf0)],_0x1e9250[_0x5a3a9e(0xf3)]('version-tag'));return{'mode':'batch','datasetCode':_0xa43f59[_0x5a3a9e(0xf5)],'items':await Promise[_0x5a3a9e(0xea)](_0x3dfed0['items'][_0x5a3a9e(0x122)](_0x914864=>inspectPullTarget(_0x7ad970,_0x172cc6[_0x5a3a9e(0x115)][String(_0x914864[_0x5a3a9e(0xff)])],_0x914864)))};}async function inspectPullTarget(_0x234642,_0x54ff12,_0x222811){const _0xcbbd56=a144_0x168eef,_0x2e4a4d=resolvePageFilePath(_0x234642,_0x222811[_0xcbbd56(0xff)],_0x222811[_0xcbbd56(0xe8)]),_0x4a24e1=await fileExists(_0x2e4a4d);if(!_0x4a24e1){const _0x66e5b7=serializePageSchemaForFile(_0x222811[_0xcbbd56(0xf5)]);return{'detail':_0x222811,'localPath':_0x2e4a4d,'localHash':computePageContentHash(_0x66e5b7),'status':_0xcbbd56(0x114)};}const _0x4f0bed=await computePageFileHash(_0x2e4a4d);if(!_0x54ff12||_0x4f0bed!==_0x54ff12[_0xcbbd56(0xf2)])return{'detail':_0x222811,'localPath':_0x2e4a4d,'localHash':_0x4f0bed,'status':_0xcbbd56(0xec),'reason':_0xcbbd56(0x105)};return{'detail':_0x222811,'localPath':_0x2e4a4d,'localHash':_0x4f0bed,'status':_0xcbbd56(0x114)};}function buildLockEntry(_0x5561c2,_0x220f5f){const _0x368c77=a144_0x168eef;return{'hash':computePageContentHash(_0x220f5f),'pageId':_0x5561c2['pageId'],'pageVersion':_0x5561c2[_0x368c77(0xed)],'type':_0x5561c2[_0x368c77(0xe8)],'title':_0x5561c2[_0x368c77(0x118)],'datasetIds':_0x5561c2['datasetIds'],'versionTag':_0x5561c2[_0x368c77(0xf0)]};}function toPreviewItem(_0x24590c){const _0x2651fe=a144_0x168eef;return{'pageId':_0x24590c[_0x2651fe(0xfd)][_0x2651fe(0xff)],'type':_0x24590c[_0x2651fe(0xfd)]['type'],'title':_0x24590c[_0x2651fe(0xfd)][_0x2651fe(0x118)],'localPath':_0x24590c[_0x2651fe(0xee)],'status':_0x24590c[_0x2651fe(0xfe)],..._0x24590c[_0x2651fe(0x125)]?{'reason':_0x24590c['reason']}:{}};}
@@ -1 +1 @@
1
- const a139_0x3a60bd=a139_0x39d6;(function(_0x2c707b,_0x3df93b){const _0x144b9f=a139_0x39d6,_0x59b767=_0x2c707b();while(!![]){try{const _0xd9bff9=parseInt(_0x144b9f(0x1de))/0x1*(parseInt(_0x144b9f(0x1ac))/0x2)+parseInt(_0x144b9f(0x1c3))/0x3*(parseInt(_0x144b9f(0x1b0))/0x4)+parseInt(_0x144b9f(0x1e6))/0x5+-parseInt(_0x144b9f(0x1c1))/0x6+parseInt(_0x144b9f(0x1da))/0x7*(parseInt(_0x144b9f(0x1a6))/0x8)+-parseInt(_0x144b9f(0x1e7))/0x9+parseInt(_0x144b9f(0x1d2))/0xa*(-parseInt(_0x144b9f(0x1b1))/0xb);if(_0xd9bff9===_0x3df93b)break;else _0x59b767['push'](_0x59b767['shift']());}catch(_0x1b5910){_0x59b767['push'](_0x59b767['shift']());}}}(a139_0x4909,0x83872));import{readFile,writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a139_0x39d6(_0x2cf4f3,_0x35e802){_0x2cf4f3=_0x2cf4f3-0x1a2;const _0x4909fb=a139_0x4909();let _0x39d6d9=_0x4909fb[_0x2cf4f3];return _0x39d6d9;}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_0x3a60bd(0x1bd),'command':a139_0x3a60bd(0x1e0),'description':a139_0x3a60bd(0x1bc),'risk':a139_0x3a60bd(0x1ba),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':a139_0x3a60bd(0x1f3)},DATASETCODE_FLAG_OPTIONAL,{'name':a139_0x3a60bd(0x1dc),'type':'string','description':a139_0x3a60bd(0x1eb)},{'name':a139_0x3a60bd(0x1e5),'type':a139_0x3a60bd(0x1bf),'description':a139_0x3a60bd(0x1e4)}],async 'validate'(_0x4a1261){validatePageTargetSelector(_0x4a1261);},async 'dryRun'(_0xf434fa){const _0x263578=a139_0x3a60bd,_0x1ad111=await buildPushPreview(_0xf434fa);return{'method':'POST','url':'/smartapi/lovrabet/update-page','body':{'appCode':_0xf434fa[_0x263578(0x1ab)],'mode':_0x1ad111[_0x263578(0x1b4)],'datasetCode':_0x1ad111[_0x263578(0x1b7)]??null,'pages':_0x1ad111[_0x263578(0x1d1)]},'description':serializeDryRunDescription({'mode':_0x1ad111[_0x263578(0x1b4)],'datasetCode':_0x1ad111[_0x263578(0x1b7)]??null,'totalWouldPush':_0x1ad111[_0x263578(0x1d1)][_0x263578(0x1ca)](_0x1fa633=>_0x1fa633['status']===_0x263578(0x1d4))[_0x263578(0x1a7)],'totalUnchanged':_0x1ad111[_0x263578(0x1d1)][_0x263578(0x1ca)](_0x3e11cf=>_0x3e11cf[_0x263578(0x1a2)]===_0x263578(0x1e2))['length'],'totalConflicts':_0x1ad111[_0x263578(0x1d1)][_0x263578(0x1ca)](_0x52d6ab=>_0x52d6ab[_0x263578(0x1a2)]===_0x263578(0x1f2)||_0x52d6ab[_0x263578(0x1a2)]===_0x263578(0x1c8))['length']})};},async 'execute'(_0x4472a7){const _0x364206=a139_0x3a60bd,_0x338c8e=loadPageProjectConfig(_0x4472a7[_0x364206(0x1ab)]),_0x136425=await readPageLockFile(_0x338c8e[_0x364206(0x1cc)]),{lockData:_0x103a89,appLock:_0x412d72}=ensurePageLockScope(_0x136425??createEmptyPageLock(),_0x4472a7[_0x364206(0x1ab)]),_0x4e013f=getPageIdFlag(_0x4472a7);if(_0x4e013f!==undefined){const _0x212607=await prepareSinglePush(_0x4472a7,_0x338c8e,_0x412d72[_0x364206(0x1be)][String(_0x4e013f)],_0x4e013f),_0x162fe0=await pushPreparedPage(_0x4472a7,_0x212607);return _0x412d72['pages'][String(_0x162fe0['pageId'])]=_0x162fe0[_0x364206(0x1ea)],_0x412d72[_0x364206(0x1dd)]=new Date()['toISOString'](),await writePageLockFile(_0x338c8e[_0x364206(0x1cc)],_0x103a89),{'ok':!![],'message':_0x162fe0[_0x364206(0x1c9)]?_0x364206(0x1a4):_0x364206(0x1f5),'data':{'appCode':_0x4472a7[_0x364206(0x1ab)],'pushedPages':[{'pageId':_0x162fe0['pageId'],'type':_0x162fe0[_0x364206(0x1e9)],'title':_0x162fe0[_0x364206(0x1a5)],'normalized':_0x162fe0[_0x364206(0x1c9)]}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x3e7662=await buildBatchPushPlan(_0x4472a7,_0x412d72['pages']),_0x3f4120=[],_0x473935=[],_0xe172f6=[];for(const _0x3e01c7 of _0x3e7662['unchanged']){_0x473935[_0x364206(0x1e0)](_0x3e01c7);}for(const _0x128166 of _0x3e7662[_0x364206(0x1b2)]){try{const _0x1e6919=await prepareSinglePush(_0x4472a7,_0x338c8e,_0x412d72['pages'][String(_0x128166[_0x364206(0x1e3)])],_0x128166['pageId'],_0x3e7662[_0x364206(0x1df)]),_0x24f6e1=await pushPreparedPage(_0x4472a7,_0x1e6919);_0x412d72['pages'][String(_0x24f6e1['pageId'])]=_0x24f6e1[_0x364206(0x1ea)],_0x3f4120[_0x364206(0x1e0)]({'pageId':_0x24f6e1[_0x364206(0x1e3)],'type':_0x24f6e1[_0x364206(0x1e9)],'title':_0x24f6e1[_0x364206(0x1a5)],'normalized':_0x24f6e1[_0x364206(0x1c9)]});}catch(_0x116d51){_0xe172f6[_0x364206(0x1e0)]({'pageId':_0x128166[_0x364206(0x1e3)],'type':_0x128166['type'],'title':_0x128166[_0x364206(0x1a5)],'reason':_0x116d51 instanceof Error?_0x116d51['message']:String(_0x116d51)});}}return _0x412d72[_0x364206(0x1dd)]=new Date()[_0x364206(0x1b6)](),await writePageLockFile(_0x338c8e[_0x364206(0x1cc)],_0x103a89),{'ok':_0xe172f6[_0x364206(0x1a7)]===0x0||_0x3f4120[_0x364206(0x1a7)]>0x0||_0x473935[_0x364206(0x1a7)]>0x0,'message':_0xe172f6[_0x364206(0x1a7)]>0x0&&_0x3f4120[_0x364206(0x1a7)]>0x0?'部分页面推送失败':_0x3f4120[_0x364206(0x1a7)]>0x0?_0x364206(0x1f5):_0x473935[_0x364206(0x1a7)]>0x0&&_0xe172f6[_0x364206(0x1a7)]===0x0?_0x364206(0x1ee):_0xe172f6[0x0]?.['reason']||_0x364206(0x1aa),'data':{'appCode':_0x4472a7[_0x364206(0x1ab)],'pushedPages':_0x3f4120,'skippedPages':_0x473935,'failedPages':_0xe172f6,'totalPushed':_0x3f4120[_0x364206(0x1a7)],'totalSkipped':_0x473935[_0x364206(0x1a7)],'totalFailed':_0xe172f6[_0x364206(0x1a7)]}};}};async function buildPushPreview(_0x2fcbd9){const _0x424831=a139_0x3a60bd,_0x56e1eb=loadPageProjectConfig(_0x2fcbd9[_0x424831(0x1ab)]),_0x143de9=await readPageLockFile(_0x56e1eb[_0x424831(0x1cc)]),{appLock:_0x59c860}=ensurePageLockScope(_0x143de9??createEmptyPageLock(),_0x2fcbd9[_0x424831(0x1ab)]),_0x495bd2=getPageIdFlag(_0x2fcbd9);if(_0x495bd2!==undefined)return{'mode':_0x424831(0x1ed),'items':[await inspectPushPage(_0x2fcbd9,_0x56e1eb,_0x59c860[_0x424831(0x1be)][String(_0x495bd2)],_0x495bd2)]};const _0x116314=await buildBatchPushPlan(_0x2fcbd9,_0x59c860[_0x424831(0x1be)]);return{'mode':_0x424831(0x1ef),'datasetCode':_0x116314['datasetCode'],'items':[..._0x116314['unchanged'][_0x424831(0x1c4)](_0x139fc9=>({'pageId':_0x139fc9[_0x424831(0x1e3)],'type':_0x139fc9[_0x424831(0x1e9)],'title':_0x139fc9[_0x424831(0x1a5)],'localPath':_0x139fc9[_0x424831(0x1b5)],'status':_0x424831(0x1e2),'reason':_0x139fc9[_0x424831(0x1d0)]})),...await Promise['all'](_0x116314[_0x424831(0x1b2)][_0x424831(0x1c4)](_0x297cca=>inspectPushPage(_0x2fcbd9,_0x56e1eb,_0x59c860[_0x424831(0x1be)][String(_0x297cca[_0x424831(0x1e3)])],_0x297cca[_0x424831(0x1e3)],_0x116314[_0x424831(0x1df)])))]};}async function buildBatchPushPlan(_0x4f0f06,_0x4e317a){const _0x28d497=a139_0x3a60bd,_0x53e4f9=loadPageProjectConfig(_0x4f0f06['appCode']),_0x35556b=await loadDatasetDetailForPage(_0x4f0f06),_0x6cd735=_0x35556b['id'],_0x59a295=new Set(_0x35556b[_0x28d497(0x1af)][_0x28d497(0x1ca)](_0x2d00d4=>!_0x2d00d4[_0x28d497(0x1ae)])[_0x28d497(0x1c4)](_0xe2e864=>_0xe2e864['id'])),_0x12fa30=Object['values'](_0x4e317a)['filter'](_0x1b85cf=>_0x1b85cf['datasetIds']['includes'](_0x6cd735)&&_0x59a295[_0x28d497(0x1c0)](_0x1b85cf[_0x28d497(0x1e3)]));if(_0x12fa30[_0x28d497(0x1a7)]===0x0)throw CliErrors[_0x28d497(0x1d3)](_0x28d497(0x1f1)+_0x35556b[_0x28d497(0x1ce)]+'\x22.',_0x28d497(0x1d8)+CLI_BIN_NAME+_0x28d497(0x1f4)+_0x35556b['code']+_0x28d497(0x1b9));const _0x1352e1=selectVersionTagGroup(_0x12fa30,_0x5b77ef=>_0x5b77ef[_0x28d497(0x1e1)]??null,_0x4f0f06[_0x28d497(0x1ec)](_0x28d497(0x1e5))),_0xd6595d=[],_0x5641c1=[];for(const _0x25c015 of _0x1352e1[_0x28d497(0x1d1)]){const _0x32d377=resolvePageFilePath(_0x53e4f9,_0x25c015[_0x28d497(0x1e3)],_0x25c015[_0x28d497(0x1e9)]);if(!await fileExists(_0x32d377)){_0xd6595d[_0x28d497(0x1e0)]({'pageId':_0x25c015[_0x28d497(0x1e3)],'type':_0x25c015['type'],'title':_0x25c015['title']});continue;}const _0x4d85ae=await computePageFileHash(_0x32d377);if(_0x4d85ae===_0x25c015['hash']){_0x5641c1[_0x28d497(0x1e0)]({'pageId':_0x25c015[_0x28d497(0x1e3)],'type':_0x25c015['type'],'title':_0x25c015['title'],'localPath':_0x32d377,'reason':_0x28d497(0x1d9)});continue;}_0xd6595d[_0x28d497(0x1e0)]({'pageId':_0x25c015['pageId'],'type':_0x25c015[_0x28d497(0x1e9)],'title':_0x25c015[_0x28d497(0x1a5)]});}return{'datasetCode':_0x35556b['code'],'datasetId':_0x6cd735,'candidates':_0xd6595d,'unchanged':_0x5641c1};}function a139_0x4909(){const _0x505354=['pageVersion','reason','items','20GniaBL','validation','would_push','UNKNOWN','parse','utf8','Run\x20`','no\x20changes','5757157WHIuQC','\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset','alias','lastSync','1qUHyYq','datasetId','push','versionTag','unchanged','pageId','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','version-tag','4645400pFEOjy','1209726cBUCVR','hash','type','nextLockEntry','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','str','single','无变更需要推送','batch','name','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','conflict','Page\x20ID','\x20page\x20pull\x20--datasetcode\x20','推送成功','status','Page\x20update\x20failed:\x20','推送成功,服务端已规范化\x20schema','title','8CImVEB','length','datasetIds','remote\x20pageVersion\x20changed','推送失败','appCode','1287604mkylVE','message','deleted','relatedPages','29324PmLVya','10340946JBKLEZ','candidates','page-','mode','localPath','toISOString','datasetCode','`\x20first','`\x20first.','write','Local\x20file\x20not\x20found:\x20','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','page','pages','string','has','1999116zOSGVe','localContent','201FWtXgH','map','\x20page\x20pull\x20--id\x20','Page\x20','\x20has\x20changed\x20since\x20last\x20pull.','blocked','normalized','filter','apiError','lockFilePath','remoteDetail','code'];a139_0x4909=function(){return _0x505354;};return a139_0x4909();}async function inspectPushPage(_0x19abed,_0x29894f,_0x48bf0a,_0x138431,_0x5c197d){const _0x178484=a139_0x3a60bd;if(!_0x48bf0a)return{'pageId':_0x138431,'type':_0x178484(0x1d5),'title':_0x178484(0x1b3)+_0x138431,'localPath':resolvePageFilePath(_0x29894f,_0x138431,_0x178484(0x1d5)),'status':'blocked','reason':_0x178484(0x1d8)+CLI_BIN_NAME+_0x178484(0x1c5)+_0x138431+_0x178484(0x1b8)};const _0x3638f3=resolvePageFilePath(_0x29894f,_0x138431,_0x48bf0a['type']);if(!await fileExists(_0x3638f3))return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1c8),'reason':_0x178484(0x1bb)+_0x3638f3};const _0x2ebc50=await readFile(_0x3638f3,_0x178484(0x1d7));try{JSON[_0x178484(0x1d6)](_0x2ebc50);}catch{return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1c8),'reason':'local\x20JSON\x20is\x20invalid'};}const _0x4b9033=computePageContentHash(_0x2ebc50);if(_0x4b9033===_0x48bf0a[_0x178484(0x1e8)])return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':'unchanged','reason':_0x178484(0x1d9)};try{const _0x437d52=await loadPageDetailForPage(_0x19abed,_0x138431);if(_0x5c197d!=null&&!_0x437d52[_0x178484(0x1a8)]['includes'](_0x5c197d))return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':'conflict','reason':_0x178484(0x1c6)+_0x138431+_0x178484(0x1db)};const _0x26f43a=_0x48bf0a[_0x178484(0x1cf)]!=null&&_0x437d52[_0x178484(0x1cf)]!=null;if(_0x26f43a&&_0x48bf0a[_0x178484(0x1cf)]!==_0x437d52[_0x178484(0x1cf)])return{'pageId':_0x138431,'type':_0x48bf0a['type'],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1f2),'reason':_0x178484(0x1a9)};if(!_0x26f43a&&computeSerializedSchemaHash(_0x437d52[_0x178484(0x1ce)])!==_0x48bf0a[_0x178484(0x1e8)])return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1f2),'reason':'remote\x20schema\x20changed'};}catch(_0x138d03){return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a['title'],'localPath':_0x3638f3,'status':_0x178484(0x1c8),'reason':_0x138d03 instanceof Error?_0x138d03[_0x178484(0x1ad)]:String(_0x138d03)};}return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1d4)};}async function prepareSinglePush(_0x45c8af,_0x53ba99,_0x17403f,_0x5dbc9d,_0x32e5f0){const _0x274ff4=a139_0x3a60bd;if(!_0x17403f)throw CliErrors[_0x274ff4(0x1d3)]('No\x20lock\x20record\x20found\x20for\x20page\x20'+_0x5dbc9d+'.','Run\x20`'+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x5dbc9d+'`\x20first.');const _0x2b05ec=resolvePageFilePath(_0x53ba99,_0x5dbc9d,_0x17403f[_0x274ff4(0x1e9)]);if(!await fileExists(_0x2b05ec))throw CliErrors['validation']('Local\x20file\x20not\x20found:\x20'+_0x2b05ec,'Run\x20`'+CLI_BIN_NAME+_0x274ff4(0x1c5)+_0x5dbc9d+_0x274ff4(0x1b9));const _0x4f68d5=await readFile(_0x2b05ec,_0x274ff4(0x1d7));try{JSON['parse'](_0x4f68d5);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20'+_0x2b05ec);}const _0x4e71d5=await loadPageDetailForPage(_0x45c8af,_0x5dbc9d);if(_0x32e5f0!=null&&!_0x4e71d5[_0x274ff4(0x1a8)]['includes'](_0x32e5f0))throw CliErrors['validation'](_0x274ff4(0x1c6)+_0x5dbc9d+'\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.');const _0x1c0410=_0x17403f['pageVersion']!=null&&_0x4e71d5[_0x274ff4(0x1cf)]!=null;if(_0x1c0410){if(_0x17403f[_0x274ff4(0x1cf)]!==_0x4e71d5[_0x274ff4(0x1cf)])throw CliErrors[_0x274ff4(0x1d3)]('Remote\x20page\x20'+_0x5dbc9d+'\x20has\x20changed\x20since\x20last\x20pull.','Run\x20`'+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x5dbc9d+_0x274ff4(0x1b9));}else{const _0x144806=computeSerializedSchemaHash(_0x4e71d5[_0x274ff4(0x1ce)]);if(_0x144806!==_0x17403f['hash'])throw CliErrors[_0x274ff4(0x1d3)]('Remote\x20page\x20'+_0x5dbc9d+_0x274ff4(0x1c7),_0x274ff4(0x1d8)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x5dbc9d+_0x274ff4(0x1b9));}return{'lockEntry':_0x17403f,'localPath':_0x2b05ec,'localContent':_0x4f68d5,'localHash':computePageContentHash(_0x4f68d5),'remoteDetail':_0x4e71d5};}async function pushPreparedPage(_0x191d89,_0x50b9f5){const _0xb32a08=a139_0x3a60bd,_0x592dab=await updatePage(_0x191d89['appCode'],_0x50b9f5[_0xb32a08(0x1cd)][_0xb32a08(0x1e3)],_0x50b9f5[_0xb32a08(0x1c2)],_0x50b9f5[_0xb32a08(0x1cd)][_0xb32a08(0x1a8)]);if(!_0x592dab)throw CliErrors[_0xb32a08(0x1cb)](_0xb32a08(0x1a3)+_0x50b9f5['remoteDetail']['pageId']);const _0x473062=await loadPageDetailForPage(_0x191d89,_0x50b9f5[_0xb32a08(0x1cd)]['pageId']),_0x5ec326=serializePageSchemaForFile(_0x473062[_0xb32a08(0x1ce)]);return await writeFile(_0x50b9f5[_0xb32a08(0x1b5)],_0x5ec326,'utf8'),{'pageId':_0x473062[_0xb32a08(0x1e3)],'type':_0x473062['type'],'title':_0x473062['name'],'normalized':_0x5ec326!==serializePageSchemaForFile(_0x50b9f5[_0xb32a08(0x1c2)]),'nextLockEntry':{'hash':computePageContentHash(_0x5ec326),'pageId':_0x473062['pageId'],'pageVersion':_0x473062[_0xb32a08(0x1cf)],'type':_0x473062[_0xb32a08(0x1e9)],'title':_0x473062[_0xb32a08(0x1f0)],'datasetIds':_0x473062[_0xb32a08(0x1a8)],'versionTag':_0x473062[_0xb32a08(0x1e1)]}};}
1
+ const a145_0x10b959=a145_0x57b2;(function(_0x445618,_0x10441a){const _0x5a270e=a145_0x57b2,_0x29fece=_0x445618();while(!![]){try{const _0x9562f1=parseInt(_0x5a270e(0x103))/0x1+-parseInt(_0x5a270e(0xd0))/0x2+-parseInt(_0x5a270e(0xc8))/0x3+-parseInt(_0x5a270e(0xe8))/0x4+-parseInt(_0x5a270e(0xc2))/0x5+parseInt(_0x5a270e(0xf0))/0x6+-parseInt(_0x5a270e(0xcd))/0x7*(-parseInt(_0x5a270e(0xb3))/0x8);if(_0x9562f1===_0x10441a)break;else _0x29fece['push'](_0x29fece['shift']());}catch(_0x17f83e){_0x29fece['push'](_0x29fece['shift']());}}}(a145_0x4b2d,0x1b6e2));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':'page','command':'push','description':a145_0x10b959(0xe5),'risk':a145_0x10b959(0xce),'defaultOutputFormat':a145_0x10b959(0xea),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a145_0x10b959(0xd3),'description':a145_0x10b959(0xc6)},DATASETCODE_FLAG_OPTIONAL,{'name':a145_0x10b959(0xd2),'type':a145_0x10b959(0xd1),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a145_0x10b959(0xfa),'type':'string','description':a145_0x10b959(0xc7)}],async 'validate'(_0x4665f3){validatePageTargetSelector(_0x4665f3);},async 'dryRun'(_0x1abc06){const _0x3cf3d2=a145_0x10b959,_0x1e25bd=await buildPushPreview(_0x1abc06);return{'method':_0x3cf3d2(0x101),'url':_0x3cf3d2(0xde),'body':{'appCode':_0x1abc06['appCode'],'mode':_0x1e25bd[_0x3cf3d2(0xca)],'datasetCode':_0x1e25bd['datasetCode']??null,'pages':_0x1e25bd[_0x3cf3d2(0xb5)]},'description':serializeDryRunDescription({'mode':_0x1e25bd['mode'],'datasetCode':_0x1e25bd[_0x3cf3d2(0xcf)]??null,'totalWouldPush':_0x1e25bd[_0x3cf3d2(0xb5)][_0x3cf3d2(0xb4)](_0x4e3689=>_0x4e3689[_0x3cf3d2(0xe3)]===_0x3cf3d2(0xc9))[_0x3cf3d2(0xe6)],'totalUnchanged':_0x1e25bd[_0x3cf3d2(0xb5)][_0x3cf3d2(0xb4)](_0x127cc7=>_0x127cc7[_0x3cf3d2(0xe3)]===_0x3cf3d2(0xbe))[_0x3cf3d2(0xe6)],'totalConflicts':_0x1e25bd[_0x3cf3d2(0xb5)]['filter'](_0x2c9c2e=>_0x2c9c2e[_0x3cf3d2(0xe3)]==='conflict'||_0x2c9c2e[_0x3cf3d2(0xe3)]===_0x3cf3d2(0xf9))[_0x3cf3d2(0xe6)]})};},async 'execute'(_0x3129a4){const _0x900272=a145_0x10b959,_0x426de4=loadPageProjectConfig(_0x3129a4[_0x900272(0xf3)]),_0x5518c9=await readPageLockFile(_0x426de4[_0x900272(0x105)]),{lockData:_0x5d7a0a,appLock:_0x349545}=ensurePageLockScope(_0x5518c9??createEmptyPageLock(),_0x3129a4['appCode']),_0x4c37c8=getPageIdFlag(_0x3129a4);if(_0x4c37c8!==undefined){const _0x202064=await prepareSinglePush(_0x3129a4,_0x426de4,_0x349545[_0x900272(0xed)][String(_0x4c37c8)],_0x4c37c8),_0x289dae=await pushPreparedPage(_0x3129a4,_0x202064);return _0x349545['pages'][String(_0x289dae[_0x900272(0xb7)])]=_0x289dae[_0x900272(0xbb)],_0x349545[_0x900272(0xf2)]=new Date()['toISOString'](),await writePageLockFile(_0x426de4[_0x900272(0x105)],_0x5d7a0a),{'ok':!![],'message':_0x289dae['normalized']?_0x900272(0xdc):'推送成功','data':{'appCode':_0x3129a4[_0x900272(0xf3)],'pushedPages':[{'pageId':_0x289dae[_0x900272(0xb7)],'type':_0x289dae[_0x900272(0xba)],'title':_0x289dae[_0x900272(0xc3)],'normalized':_0x289dae[_0x900272(0xf7)]}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x3556cc=await buildBatchPushPlan(_0x3129a4,_0x349545[_0x900272(0xed)]),_0x5a64a5=[],_0x43917e=[],_0x30bbd3=[];for(const _0x16466 of _0x3556cc['unchanged']){_0x43917e[_0x900272(0x104)](_0x16466);}for(const _0x13a6a0 of _0x3556cc[_0x900272(0xb6)]){try{const _0x541235=await prepareSinglePush(_0x3129a4,_0x426de4,_0x349545[_0x900272(0xed)][String(_0x13a6a0[_0x900272(0xb7)])],_0x13a6a0[_0x900272(0xb7)],_0x3556cc[_0x900272(0xc4)]),_0x68b537=await pushPreparedPage(_0x3129a4,_0x541235);_0x349545[_0x900272(0xed)][String(_0x68b537[_0x900272(0xb7)])]=_0x68b537[_0x900272(0xbb)],_0x5a64a5[_0x900272(0x104)]({'pageId':_0x68b537['pageId'],'type':_0x68b537[_0x900272(0xba)],'title':_0x68b537['title'],'normalized':_0x68b537[_0x900272(0xf7)]});}catch(_0x4ea085){_0x30bbd3['push']({'pageId':_0x13a6a0['pageId'],'type':_0x13a6a0[_0x900272(0xba)],'title':_0x13a6a0[_0x900272(0xc3)],'reason':_0x4ea085 instanceof Error?_0x4ea085[_0x900272(0xd5)]:String(_0x4ea085)});}}return _0x349545[_0x900272(0xf2)]=new Date()['toISOString'](),await writePageLockFile(_0x426de4['lockFilePath'],_0x5d7a0a),{'ok':_0x30bbd3['length']===0x0||_0x5a64a5['length']>0x0||_0x43917e['length']>0x0,'message':_0x30bbd3['length']>0x0&&_0x5a64a5[_0x900272(0xe6)]>0x0?_0x900272(0x102):_0x5a64a5[_0x900272(0xe6)]>0x0?_0x900272(0xf5):_0x43917e['length']>0x0&&_0x30bbd3[_0x900272(0xe6)]===0x0?_0x900272(0xd4):_0x30bbd3[0x0]?.[_0x900272(0x100)]||_0x900272(0xff),'data':{'appCode':_0x3129a4['appCode'],'pushedPages':_0x5a64a5,'skippedPages':_0x43917e,'failedPages':_0x30bbd3,'totalPushed':_0x5a64a5['length'],'totalSkipped':_0x43917e[_0x900272(0xe6)],'totalFailed':_0x30bbd3['length']}};}};async function buildPushPreview(_0x1820ed){const _0x46e93f=a145_0x10b959,_0x58058a=loadPageProjectConfig(_0x1820ed['appCode']),_0x1ecffb=await readPageLockFile(_0x58058a[_0x46e93f(0x105)]),{appLock:_0x577de8}=ensurePageLockScope(_0x1ecffb??createEmptyPageLock(),_0x1820ed[_0x46e93f(0xf3)]),_0x5934c4=getPageIdFlag(_0x1820ed);if(_0x5934c4!==undefined)return{'mode':_0x46e93f(0xee),'items':[await inspectPushPage(_0x1820ed,_0x58058a,_0x577de8['pages'][String(_0x5934c4)],_0x5934c4)]};const _0x4f6310=await buildBatchPushPlan(_0x1820ed,_0x577de8[_0x46e93f(0xed)]);return{'mode':'batch','datasetCode':_0x4f6310[_0x46e93f(0xcf)],'items':[..._0x4f6310[_0x46e93f(0xbe)][_0x46e93f(0xf4)](_0x2a94f0=>({'pageId':_0x2a94f0[_0x46e93f(0xb7)],'type':_0x2a94f0['type'],'title':_0x2a94f0[_0x46e93f(0xc3)],'localPath':_0x2a94f0[_0x46e93f(0xc1)],'status':_0x46e93f(0xbe),'reason':_0x2a94f0[_0x46e93f(0x100)]})),...await Promise['all'](_0x4f6310['candidates'][_0x46e93f(0xf4)](_0x4e5bdc=>inspectPushPage(_0x1820ed,_0x58058a,_0x577de8[_0x46e93f(0xed)][String(_0x4e5bdc[_0x46e93f(0xb7)])],_0x4e5bdc['pageId'],_0x4f6310['datasetId'])))]};}async function buildBatchPushPlan(_0x302885,_0x11e475){const _0x240bfc=a145_0x10b959,_0x5cefc9=loadPageProjectConfig(_0x302885['appCode']),_0x21d197=await loadDatasetDetailForPage(_0x302885),_0x293316=_0x21d197['id'],_0xac234d=new Set(_0x21d197[_0x240bfc(0xfc)][_0x240bfc(0xb4)](_0x581789=>!_0x581789[_0x240bfc(0xe9)])['map'](_0x318877=>_0x318877['id'])),_0x555bb7=Object[_0x240bfc(0xe1)](_0x11e475)[_0x240bfc(0xb4)](_0x513329=>_0x513329['datasetIds'][_0x240bfc(0xdf)](_0x293316)&&_0xac234d['has'](_0x513329[_0x240bfc(0xb7)]));if(_0x555bb7[_0x240bfc(0xe6)]===0x0)throw CliErrors[_0x240bfc(0xe0)](_0x240bfc(0xcc)+_0x21d197['code']+'\x22.',_0x240bfc(0xc5)+CLI_BIN_NAME+_0x240bfc(0xb2)+_0x21d197[_0x240bfc(0xfe)]+'`\x20first.');const _0x877afe=selectVersionTagGroup(_0x555bb7,_0x23c70d=>_0x23c70d[_0x240bfc(0xbc)]??null,_0x302885['str']('version-tag')),_0x41bc07=[],_0x5cbdaa=[];for(const _0x273a5c of _0x877afe['items']){const _0x5de777=resolvePageFilePath(_0x5cefc9,_0x273a5c['pageId'],_0x273a5c[_0x240bfc(0xba)]);if(!await fileExists(_0x5de777)){_0x41bc07['push']({'pageId':_0x273a5c[_0x240bfc(0xb7)],'type':_0x273a5c[_0x240bfc(0xba)],'title':_0x273a5c[_0x240bfc(0xc3)]});continue;}const _0x5e9a3b=await computePageFileHash(_0x5de777);if(_0x5e9a3b===_0x273a5c[_0x240bfc(0xef)]){_0x5cbdaa[_0x240bfc(0x104)]({'pageId':_0x273a5c[_0x240bfc(0xb7)],'type':_0x273a5c[_0x240bfc(0xba)],'title':_0x273a5c['title'],'localPath':_0x5de777,'reason':_0x240bfc(0xeb)});continue;}_0x41bc07[_0x240bfc(0x104)]({'pageId':_0x273a5c[_0x240bfc(0xb7)],'type':_0x273a5c[_0x240bfc(0xba)],'title':_0x273a5c['title']});}return{'datasetCode':_0x21d197[_0x240bfc(0xfe)],'datasetId':_0x293316,'candidates':_0x41bc07,'unchanged':_0x5cbdaa};}async function inspectPushPage(_0x5bc522,_0xb9176b,_0x5b1b5a,_0x4f159c,_0x666e77){const _0x47e74b=a145_0x10b959;if(!_0x5b1b5a)return{'pageId':_0x4f159c,'type':_0x47e74b(0xc0),'title':'page-'+_0x4f159c,'localPath':resolvePageFilePath(_0xb9176b,_0x4f159c,_0x47e74b(0xc0)),'status':'blocked','reason':_0x47e74b(0xc5)+CLI_BIN_NAME+_0x47e74b(0xf6)+_0x4f159c+'`\x20first'};const _0x265ad5=resolvePageFilePath(_0xb9176b,_0x4f159c,_0x5b1b5a['type']);if(!await fileExists(_0x265ad5))return{'pageId':_0x4f159c,'type':_0x5b1b5a[_0x47e74b(0xba)],'title':_0x5b1b5a[_0x47e74b(0xc3)],'localPath':_0x265ad5,'status':_0x47e74b(0xf9),'reason':_0x47e74b(0xf1)+_0x265ad5};const _0x32d84e=await readFile(_0x265ad5,'utf8');try{JSON['parse'](_0x32d84e);}catch{return{'pageId':_0x4f159c,'type':_0x5b1b5a['type'],'title':_0x5b1b5a['title'],'localPath':_0x265ad5,'status':_0x47e74b(0xf9),'reason':_0x47e74b(0xe7)};}const _0x42b7a2=computePageContentHash(_0x32d84e);if(_0x42b7a2===_0x5b1b5a['hash'])return{'pageId':_0x4f159c,'type':_0x5b1b5a[_0x47e74b(0xba)],'title':_0x5b1b5a[_0x47e74b(0xc3)],'localPath':_0x265ad5,'status':_0x47e74b(0xbe),'reason':_0x47e74b(0xeb)};try{const _0x44d2ed=await loadPageDetailForPage(_0x5bc522,_0x4f159c);if(_0x666e77!=null&&!_0x44d2ed[_0x47e74b(0xd9)][_0x47e74b(0xdf)](_0x666e77))return{'pageId':_0x4f159c,'type':_0x5b1b5a['type'],'title':_0x5b1b5a[_0x47e74b(0xc3)],'localPath':_0x265ad5,'status':_0x47e74b(0xf8),'reason':'Page\x20'+_0x4f159c+_0x47e74b(0xbf)};const _0x33d3ef=_0x5b1b5a[_0x47e74b(0xdb)]!=null&&_0x44d2ed[_0x47e74b(0xdb)]!=null;if(_0x33d3ef&&_0x5b1b5a[_0x47e74b(0xdb)]!==_0x44d2ed[_0x47e74b(0xdb)])return{'pageId':_0x4f159c,'type':_0x5b1b5a['type'],'title':_0x5b1b5a['title'],'localPath':_0x265ad5,'status':_0x47e74b(0xf8),'reason':'remote\x20pageVersion\x20changed'};if(!_0x33d3ef&&computeSerializedSchemaHash(_0x44d2ed[_0x47e74b(0xfe)])!==_0x5b1b5a[_0x47e74b(0xef)])return{'pageId':_0x4f159c,'type':_0x5b1b5a[_0x47e74b(0xba)],'title':_0x5b1b5a[_0x47e74b(0xc3)],'localPath':_0x265ad5,'status':_0x47e74b(0xf8),'reason':_0x47e74b(0xe4)};}catch(_0x546eda){return{'pageId':_0x4f159c,'type':_0x5b1b5a['type'],'title':_0x5b1b5a[_0x47e74b(0xc3)],'localPath':_0x265ad5,'status':'blocked','reason':_0x546eda instanceof Error?_0x546eda['message']:String(_0x546eda)};}return{'pageId':_0x4f159c,'type':_0x5b1b5a[_0x47e74b(0xba)],'title':_0x5b1b5a[_0x47e74b(0xc3)],'localPath':_0x265ad5,'status':'would_push'};}function a145_0x57b2(_0x10d7cc,_0x63ca31){_0x10d7cc=_0x10d7cc-0xb2;const _0x4b2dcb=a145_0x4b2d();let _0x57b2b1=_0x4b2dcb[_0x10d7cc];return _0x57b2b1;}function a145_0x4b2d(){const _0x1e774a=['appCode','map','推送成功','\x20page\x20pull\x20--id\x20','normalized','conflict','blocked','version-tag','utf8','relatedPages','\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.','code','推送失败','reason','POST','部分页面推送失败','35697XnOHMk','push','lockFilePath','\x20page\x20pull\x20--datasetcode\x20','8riPLPR','filter','items','candidates','pageId','Page\x20','Page\x20update\x20failed:\x20','type','nextLockEntry','versionTag','name','unchanged','\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset','UNKNOWN','localPath','948190EgOtwa','title','datasetId','Run\x20`','Page\x20ID','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','161301XyAnbu','would_push','mode','\x20has\x20changed\x20since\x20last\x20pull.','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','2779798WLfkPP','write','datasetCode','68174pwpSXI','string','alias','number','无变更需要推送','message','`\x20first.','Remote\x20page\x20','Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20','datasetIds','remoteDetail','pageVersion','推送成功,服务端已规范化\x20schema','parse','/smartapi/lovrabet/update-page','includes','validation','values','localContent','status','remote\x20schema\x20changed','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','length','local\x20JSON\x20is\x20invalid','561936IVkzNf','deleted','compress','no\x20changes','No\x20lock\x20record\x20found\x20for\x20page\x20','pages','single','hash','585114lyUqma','Local\x20file\x20not\x20found:\x20','lastSync'];a145_0x4b2d=function(){return _0x1e774a;};return a145_0x4b2d();}async function prepareSinglePush(_0x333536,_0x137cf9,_0x1db741,_0x17fb31,_0x5c22b9){const _0x471398=a145_0x10b959;if(!_0x1db741)throw CliErrors[_0x471398(0xe0)](_0x471398(0xec)+_0x17fb31+'.','Run\x20`'+CLI_BIN_NAME+_0x471398(0xf6)+_0x17fb31+_0x471398(0xd6));const _0x1c4f12=resolvePageFilePath(_0x137cf9,_0x17fb31,_0x1db741['type']);if(!await fileExists(_0x1c4f12))throw CliErrors[_0x471398(0xe0)](_0x471398(0xf1)+_0x1c4f12,_0x471398(0xc5)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x17fb31+_0x471398(0xd6));const _0x8b61e5=await readFile(_0x1c4f12,_0x471398(0xfb));try{JSON[_0x471398(0xdd)](_0x8b61e5);}catch{throw CliErrors['validation'](_0x471398(0xd8)+_0x1c4f12);}const _0x18d58b=await loadPageDetailForPage(_0x333536,_0x17fb31);if(_0x5c22b9!=null&&!_0x18d58b[_0x471398(0xd9)][_0x471398(0xdf)](_0x5c22b9))throw CliErrors[_0x471398(0xe0)](_0x471398(0xb8)+_0x17fb31+_0x471398(0xfd));const _0x2d4202=_0x1db741[_0x471398(0xdb)]!=null&&_0x18d58b[_0x471398(0xdb)]!=null;if(_0x2d4202){if(_0x1db741['pageVersion']!==_0x18d58b[_0x471398(0xdb)])throw CliErrors[_0x471398(0xe0)](_0x471398(0xd7)+_0x17fb31+_0x471398(0xcb),'Run\x20`'+CLI_BIN_NAME+_0x471398(0xf6)+_0x17fb31+_0x471398(0xd6));}else{const _0x154101=computeSerializedSchemaHash(_0x18d58b[_0x471398(0xfe)]);if(_0x154101!==_0x1db741['hash'])throw CliErrors[_0x471398(0xe0)]('Remote\x20page\x20'+_0x17fb31+_0x471398(0xcb),'Run\x20`'+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x17fb31+_0x471398(0xd6));}return{'lockEntry':_0x1db741,'localPath':_0x1c4f12,'localContent':_0x8b61e5,'localHash':computePageContentHash(_0x8b61e5),'remoteDetail':_0x18d58b};}async function pushPreparedPage(_0x3804f3,_0x2c5a5a){const _0x1c6085=a145_0x10b959,_0x12389e=await updatePage(_0x3804f3[_0x1c6085(0xf3)],_0x2c5a5a['remoteDetail'][_0x1c6085(0xb7)],_0x2c5a5a[_0x1c6085(0xe2)],_0x2c5a5a[_0x1c6085(0xda)][_0x1c6085(0xd9)]);if(!_0x12389e)throw CliErrors['apiError'](_0x1c6085(0xb9)+_0x2c5a5a['remoteDetail'][_0x1c6085(0xb7)]);const _0x81b25a=await loadPageDetailForPage(_0x3804f3,_0x2c5a5a[_0x1c6085(0xda)][_0x1c6085(0xb7)]),_0x421bdf=serializePageSchemaForFile(_0x81b25a['code']);return await writeFile(_0x2c5a5a[_0x1c6085(0xc1)],_0x421bdf,_0x1c6085(0xfb)),{'pageId':_0x81b25a[_0x1c6085(0xb7)],'type':_0x81b25a[_0x1c6085(0xba)],'title':_0x81b25a[_0x1c6085(0xbd)],'normalized':_0x421bdf!==serializePageSchemaForFile(_0x2c5a5a[_0x1c6085(0xe2)]),'nextLockEntry':{'hash':computePageContentHash(_0x421bdf),'pageId':_0x81b25a[_0x1c6085(0xb7)],'pageVersion':_0x81b25a[_0x1c6085(0xdb)],'type':_0x81b25a[_0x1c6085(0xba)],'title':_0x81b25a[_0x1c6085(0xbd)],'datasetIds':_0x81b25a[_0x1c6085(0xd9)],'versionTag':_0x81b25a[_0x1c6085(0xbc)]}};}