@lovrabet/rabetbase-cli 2.5.4-beta.1 → 2.5.4-beta.2

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 (368) hide show
  1. package/README.md +4 -3
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.d.ts +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/detail.js +1 -1
  78. package/lib/commands/dataset/extend-update.js +1 -1
  79. package/lib/commands/dataset/field-restore.js +1 -1
  80. package/lib/commands/dataset/field-update.js +1 -1
  81. package/lib/commands/dataset/generate.js +1 -1
  82. package/lib/commands/dataset/index.js +1 -1
  83. package/lib/commands/dataset/list.js +1 -1
  84. package/lib/commands/dataset/operations.js +1 -1
  85. package/lib/commands/dataset/relation-audit.js +1 -1
  86. package/lib/commands/dataset/relation-create.js +1 -1
  87. package/lib/commands/dataset/relation-delete.js +1 -1
  88. package/lib/commands/dataset/relation-shared.js +1 -1
  89. package/lib/commands/dataset/relation-update.js +1 -1
  90. package/lib/commands/dataset/relations.js +1 -1
  91. package/lib/commands/dataset/rename.js +1 -1
  92. package/lib/commands/dataset/restore.js +1 -1
  93. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  94. package/lib/commands/db/analysis-batching.js +1 -1
  95. package/lib/commands/db/analyze-batch-plan.js +1 -1
  96. package/lib/commands/db/analyze-cancel.js +1 -1
  97. package/lib/commands/db/analyze-start.js +1 -1
  98. package/lib/commands/db/analyze-status.js +1 -1
  99. package/lib/commands/db/create.js +1 -1
  100. package/lib/commands/db/delete.js +1 -1
  101. package/lib/commands/db/detail.js +1 -1
  102. package/lib/commands/db/diff-refresh-start.js +1 -1
  103. package/lib/commands/db/diff-refresh-status.js +1 -1
  104. package/lib/commands/db/diff.js +1 -1
  105. package/lib/commands/db/index.js +1 -1
  106. package/lib/commands/db/list.js +1 -1
  107. package/lib/commands/db/shared.js +1 -1
  108. package/lib/commands/db/table-diff-shared.js +1 -1
  109. package/lib/commands/db/tables.js +1 -1
  110. package/lib/commands/db/test.js +1 -1
  111. package/lib/commands/db/update.js +1 -1
  112. package/lib/commands/deployment/index.js +1 -1
  113. package/lib/commands/deployment/sync-all.js +1 -1
  114. package/lib/commands/deployment/sync-jobs.js +1 -1
  115. package/lib/commands/deployment/sync-status.js +1 -1
  116. package/lib/commands/doctor.js +1 -1
  117. package/lib/commands/file/index.js +1 -1
  118. package/lib/commands/flow/create.js +1 -1
  119. package/lib/commands/flow/detail.js +1 -1
  120. package/lib/commands/flow/index.js +1 -1
  121. package/lib/commands/flow/list.js +1 -1
  122. package/lib/commands/flow/publish.js +1 -1
  123. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  124. package/lib/commands/flow/runtime-role-list.js +1 -1
  125. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  126. package/lib/commands/flow/runtime-user-search.js +1 -1
  127. package/lib/commands/flow/shared.js +1 -1
  128. package/lib/commands/flow/update.js +1 -1
  129. package/lib/commands/flow/validate.js +1 -1
  130. package/lib/commands/instant-api-policy/current.js +1 -1
  131. package/lib/commands/instant-api-policy/index.js +1 -1
  132. package/lib/commands/instant-api-policy/init.js +1 -1
  133. package/lib/commands/instant-api-policy/publish.js +1 -1
  134. package/lib/commands/instant-api-policy/pull.js +1 -1
  135. package/lib/commands/instant-api-policy/revision.js +1 -1
  136. package/lib/commands/instant-api-policy/revisions.js +1 -1
  137. package/lib/commands/instant-api-policy/rollback.js +1 -1
  138. package/lib/commands/instant-api-policy/shared.js +1 -1
  139. package/lib/commands/instant-api-policy/validate.js +1 -1
  140. package/lib/commands/issue/index.js +1 -1
  141. package/lib/commands/issue/nudge.js +1 -1
  142. package/lib/commands/issue/report.js +1 -1
  143. package/lib/commands/issue/shared.js +1 -1
  144. package/lib/commands/kb/create.js +1 -1
  145. package/lib/commands/kb/delete.js +1 -1
  146. package/lib/commands/kb/detail.js +1 -1
  147. package/lib/commands/kb/index.js +1 -1
  148. package/lib/commands/kb/list.js +1 -1
  149. package/lib/commands/kb/search.js +1 -1
  150. package/lib/commands/kb/shared.js +1 -1
  151. package/lib/commands/kb/update.js +1 -1
  152. package/lib/commands/logs/index.js +1 -1
  153. package/lib/commands/menu/asset-update.js +1 -1
  154. package/lib/commands/menu/delete.js +1 -1
  155. package/lib/commands/menu/external-link-create.js +1 -1
  156. package/lib/commands/menu/external-link-update.js +1 -1
  157. package/lib/commands/menu/group-create.js +1 -1
  158. package/lib/commands/menu/group-update.js +1 -1
  159. package/lib/commands/menu/index.js +1 -1
  160. package/lib/commands/menu/list.js +1 -1
  161. package/lib/commands/menu/move.js +1 -1
  162. package/lib/commands/menu/regroup-start.js +1 -1
  163. package/lib/commands/menu/rename.js +1 -1
  164. package/lib/commands/menu/shared/compare-table.js +1 -1
  165. package/lib/commands/menu/shared/delete-plan.js +1 -1
  166. package/lib/commands/menu/shared/facts.js +1 -1
  167. package/lib/commands/menu/shared/index.js +1 -1
  168. package/lib/commands/menu/shared/inquirer.js +1 -1
  169. package/lib/commands/menu/shared/local-pages.js +1 -1
  170. package/lib/commands/menu/shared/logic.js +1 -1
  171. package/lib/commands/menu/shared/mutations.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/sync-core.js +1 -1
  174. package/lib/commands/menu/shared/update-core.js +1 -1
  175. package/lib/commands/menu/shared/valid-url.js +1 -1
  176. package/lib/commands/menu/sync.js +1 -1
  177. package/lib/commands/menu/visibility-update.js +1 -1
  178. package/lib/commands/notification/config-create.js +1 -1
  179. package/lib/commands/notification/config-delete.js +1 -1
  180. package/lib/commands/notification/config-list.js +1 -1
  181. package/lib/commands/notification/config-update.js +1 -1
  182. package/lib/commands/notification/index.js +1 -1
  183. package/lib/commands/notification/shared.js +1 -1
  184. package/lib/commands/ocr/index.js +1 -1
  185. package/lib/commands/page/create.js +1 -1
  186. package/lib/commands/page/custom/detail.js +1 -1
  187. package/lib/commands/page/custom/list.js +1 -1
  188. package/lib/commands/page/custom/publish.js +1 -1
  189. package/lib/commands/page/custom/shared.js +1 -1
  190. package/lib/commands/page/custom/syntax.js +1 -1
  191. package/lib/commands/page/custom/update.js +1 -1
  192. package/lib/commands/page/data-list-status.js +1 -1
  193. package/lib/commands/page/generate-start.js +1 -1
  194. package/lib/commands/page/generate-status.js +1 -1
  195. package/lib/commands/page/index.js +1 -1
  196. package/lib/commands/page/pull.js +1 -1
  197. package/lib/commands/page/push.js +1 -1
  198. package/lib/commands/page/relation-audit.js +1 -1
  199. package/lib/commands/page/restore.js +1 -1
  200. package/lib/commands/page/shared.js +1 -1
  201. package/lib/commands/page/sync.js +1 -1
  202. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  203. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  204. package/lib/commands/project/create/format-elapsed.js +1 -1
  205. package/lib/commands/project/create/main.js +1 -1
  206. package/lib/commands/project/create/materialize-project-template.js +1 -1
  207. package/lib/commands/project/create/project-name.js +1 -1
  208. package/lib/commands/project/create/project-template-archive.js +1 -1
  209. package/lib/commands/project/create/project-template-path.js +1 -1
  210. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  211. package/lib/commands/project/create/use-format-code.js +1 -1
  212. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  213. package/lib/commands/project/domain-routing-sync.js +1 -1
  214. package/lib/commands/project/index.js +1 -1
  215. package/lib/commands/project/upgrade.js +1 -1
  216. package/lib/commands/registry.js +1 -1
  217. package/lib/commands/role/delete.js +1 -1
  218. package/lib/commands/role/detail.js +1 -1
  219. package/lib/commands/role/index.js +1 -1
  220. package/lib/commands/role/list.js +1 -1
  221. package/lib/commands/role/shared.js +1 -1
  222. package/lib/commands/role/update.js +1 -1
  223. package/lib/commands/role/user-add.js +1 -1
  224. package/lib/commands/role/user-remove.js +1 -1
  225. package/lib/commands/role/user-resolve.js +1 -1
  226. package/lib/commands/rule/get.js +1 -1
  227. package/lib/commands/rule/index.js +1 -1
  228. package/lib/commands/rule/list.js +1 -1
  229. package/lib/commands/rule/set.js +1 -1
  230. package/lib/commands/rule/shared.js +1 -1
  231. package/lib/commands/run/index.js +1 -1
  232. package/lib/commands/schema.js +1 -1
  233. package/lib/commands/sql/create.js +1 -1
  234. package/lib/commands/sql/delete.js +1 -1
  235. package/lib/commands/sql/detail.js +1 -1
  236. package/lib/commands/sql/exec.js +1 -1
  237. package/lib/commands/sql/index.js +1 -1
  238. package/lib/commands/sql/list.js +1 -1
  239. package/lib/commands/sql/pull.js +1 -1
  240. package/lib/commands/sql/push.js +1 -1
  241. package/lib/commands/sql/shared.js +1 -1
  242. package/lib/commands/sql/status.js +1 -1
  243. package/lib/commands/sql/validate.js +1 -1
  244. package/lib/commands/task/index.js +1 -1
  245. package/lib/commands/task/status.js +1 -1
  246. package/lib/commands/tenant/index.js +1 -1
  247. package/lib/commands/tenant/members-list.js +1 -1
  248. package/lib/commands/tenant/shared.js +1 -1
  249. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  250. package/lib/commands/user-account/index.js +1 -1
  251. package/lib/commands/workspace/add.js +1 -1
  252. package/lib/commands/workspace/index.js +1 -1
  253. package/lib/commands/workspace/remove.js +1 -1
  254. package/lib/config/domain-config.d.ts +1 -1
  255. package/lib/config/domain-config.js +1 -1
  256. package/lib/config/project-domain-routing.js +1 -1
  257. package/lib/config/region-config.js +1 -1
  258. package/lib/config/schema.d.ts +1 -1
  259. package/lib/config/schema.js +1 -1
  260. package/lib/constant/cdn.js +1 -1
  261. package/lib/constant/cli.js +1 -1
  262. package/lib/constant/defaults.js +1 -1
  263. package/lib/constant/domain.d.ts +4 -0
  264. package/lib/constant/domain.js +1 -1
  265. package/lib/constant/env.js +1 -1
  266. package/lib/constant/output.js +1 -1
  267. package/lib/constant/paths.js +1 -1
  268. package/lib/constant/region.d.ts +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.d.ts +14 -1
  272. package/lib/constant/routing-profile.js +1 -1
  273. package/lib/context/app-resolver.d.ts +1 -0
  274. package/lib/context/app-resolver.js +1 -1
  275. package/lib/context/auth-resolver.js +1 -1
  276. package/lib/context/config-loader.js +1 -1
  277. package/lib/context.js +1 -1
  278. package/lib/core/alias-resolver.js +1 -1
  279. package/lib/core/api-client.js +1 -1
  280. package/lib/core/bff/config.js +1 -1
  281. package/lib/core/bff/file-system.js +1 -1
  282. package/lib/core/bff/hash.js +1 -1
  283. package/lib/core/bff/hook-directory.js +1 -1
  284. package/lib/core/bff/lock.js +1 -1
  285. package/lib/core/bff/utils.js +1 -1
  286. package/lib/core/cross-db-relation.js +1 -1
  287. package/lib/core/db-resolver.js +1 -1
  288. package/lib/core/flow-config.js +1 -1
  289. package/lib/core/instant-api-policy/config.js +1 -1
  290. package/lib/core/kb-search-client.js +1 -1
  291. package/lib/core/page/file-system.js +1 -1
  292. package/lib/core/page/hash.js +1 -1
  293. package/lib/core/page/lock.js +1 -1
  294. package/lib/core/page/lr-smart-jsx.js +1 -1
  295. package/lib/core/sql-index-auditor.js +1 -1
  296. package/lib/core/sql-sync/config.js +1 -1
  297. package/lib/core/sql-sync/file-system.js +1 -1
  298. package/lib/core/sql-sync/hash.js +1 -1
  299. package/lib/core/sql-sync/lock.js +1 -1
  300. package/lib/core/sql-sync/utils.js +1 -1
  301. package/lib/core/sql-validator.js +1 -1
  302. package/lib/errors.js +1 -1
  303. package/lib/framework/build-all-flags.js +1 -1
  304. package/lib/framework/error-output.js +1 -1
  305. package/lib/framework/explicit-yes.js +1 -1
  306. package/lib/framework/flags.js +1 -1
  307. package/lib/framework/help.js +1 -1
  308. package/lib/framework/index.js +1 -1
  309. package/lib/framework/output.js +1 -1
  310. package/lib/framework/response.js +1 -1
  311. package/lib/framework/runner-alias.js +1 -1
  312. package/lib/framework/runner.js +1 -1
  313. package/lib/framework/schema-export.js +1 -1
  314. package/lib/framework/supported-flags.js +1 -1
  315. package/lib/framework/types.js +1 -1
  316. package/lib/generated/build-info.d.ts +4 -4
  317. package/lib/generated/build-info.js +1 -1
  318. package/lib/generated/official-routing.d.ts +15 -3
  319. package/lib/generated/official-routing.js +1 -1
  320. package/lib/generated/routing-contract.d.ts +2 -2
  321. package/lib/generated/routing-contract.js +1 -1
  322. package/lib/help.js +1 -1
  323. package/lib/postinstall.js +1 -1
  324. package/lib/runtime/confirmation.js +1 -1
  325. package/lib/runtime/event.js +1 -1
  326. package/lib/runtime/index.js +1 -1
  327. package/lib/runtime/queue.js +1 -1
  328. package/lib/runtime/resolve.js +1 -1
  329. package/lib/skills/builtin-skill.js +1 -1
  330. package/lib/skills/main.js +1 -1
  331. package/lib/skills/npx-skills-add.d.ts +5 -0
  332. package/lib/skills/npx-skills-add.js +1 -1
  333. package/lib/skills/skill-presence.js +1 -1
  334. package/lib/telemetry/cli-command-trace.js +1 -1
  335. package/lib/telemetry/cli-help-trace.js +1 -1
  336. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  337. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  338. package/lib/telemetry/send-cli-trace-log.js +1 -1
  339. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  340. package/lib/utils/ai_config.js +1 -1
  341. package/lib/utils/apply-jq-filter.js +1 -1
  342. package/lib/utils/cdn-config.js +1 -1
  343. package/lib/utils/check-sdk-version.js +1 -1
  344. package/lib/utils/cli-version-check.js +1 -1
  345. package/lib/utils/cli-version-policy.js +1 -1
  346. package/lib/utils/config.js +1 -1
  347. package/lib/utils/entity-with-id.js +1 -1
  348. package/lib/utils/file-utils.js +1 -1
  349. package/lib/utils/guides-cdn.js +1 -1
  350. package/lib/utils/http-client.js +1 -1
  351. package/lib/utils/is-non-interactive.js +1 -1
  352. package/lib/utils/logger.js +1 -1
  353. package/lib/utils/params.js +1 -1
  354. package/lib/utils/platform.js +1 -1
  355. package/lib/utils/sleep.js +1 -1
  356. package/lib/utils/template-replacer.js +1 -1
  357. package/lib/utils/update-notice.js +1 -1
  358. package/lib/utils/version.js +1 -1
  359. package/lib/utils/with-active-cookie.js +1 -1
  360. package/lib/utils/write-cli-side-channel.js +1 -1
  361. package/package.json +1 -1
  362. package/skills/rabetbase/SKILL.md +2 -2
  363. package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
  364. package/skills/rabetbase/guides/sql-mybatis.md +12 -8
  365. package/skills/rabetbase/references/rabetbase-config.md +6 -4
  366. package/skills/rabetbase/references/rabetbase-init.md +7 -5
  367. package/skills/rabetbase/references/rabetbase-kb.md +8 -6
  368. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a181_0xc65655=a181_0x5673;(function(_0x82156a,_0x1d4874){const _0x334b23=a181_0x5673,_0x7544=_0x82156a();while(!![]){try{const _0x335fd4=-parseInt(_0x334b23(0x114))/0x1*(-parseInt(_0x334b23(0x129))/0x2)+-parseInt(_0x334b23(0x100))/0x3*(parseInt(_0x334b23(0x16f))/0x4)+parseInt(_0x334b23(0x147))/0x5*(-parseInt(_0x334b23(0x15d))/0x6)+parseInt(_0x334b23(0x175))/0x7*(parseInt(_0x334b23(0x16d))/0x8)+-parseInt(_0x334b23(0x139))/0x9*(-parseInt(_0x334b23(0x164))/0xa)+parseInt(_0x334b23(0x117))/0xb+-parseInt(_0x334b23(0x12a))/0xc;if(_0x335fd4===_0x1d4874)break;else _0x7544['push'](_0x7544['shift']());}catch(_0x5ea72b){_0x7544['push'](_0x7544['shift']());}}}(a181_0x37f6,0xbb287));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=['EMAIL',a181_0xc65655(0x159),a181_0xc65655(0x15b),a181_0xc65655(0x153),a181_0xc65655(0x14b)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0xc65655(0x169),'channelType',a181_0xc65655(0x14e),a181_0xc65655(0x135),'description',a181_0xc65655(0x12c),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode',a181_0xc65655(0x105)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0xc65655(0x126),a181_0xc65655(0x107),'ccList','bccList',a181_0xc65655(0x10e),a181_0xc65655(0x122),a181_0xc65655(0x123),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0xc65655(0x151),'required':![],'description':a181_0xc65655(0x156)},{'name':a181_0xc65655(0x13a),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0xc65655(0x144),'type':a181_0xc65655(0x151),'required':![],'description':a181_0xc65655(0x152)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0xc65655(0x136)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3c2da5,_0x2ace7a,_0x3c8b4f){return new CliError(_0x3c2da5,0x1,_0x2ace7a,_0x3c8b4f);}export function readNotificationId(_0x1bbd6d){const _0x4f0b32=a181_0xc65655,_0x3a8285=_0x1bbd6d[_0x4f0b32(0x10f)]('id');if(!Number['isSafeInteger'](_0x3a8285)||_0x3a8285<=0x0)throw notificationError(_0x4f0b32(0x11d),_0x4f0b32(0x106));return _0x3a8285;}export function requireNotificationExplicitYes(_0x30138b){const _0x22c0dc=a181_0xc65655;if(_0x30138b['bool'](_0x22c0dc(0x148))||_0x30138b[_0x22c0dc(0x118)](_0x22c0dc(0xfe)))return;throw notificationError('notification_config_confirmation_required',_0x22c0dc(0x16a),_0x22c0dc(0x133));}function a181_0x37f6(){const _0x93cf11=['Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x22\x20is\x20forbidden.','from-env','number','appCode','5UKfpJr','dry-run','env','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','WEBHOOK','Allowed\x20values:\x20','readTimeout','endpointUrl','parse','notification_config_response_invalid','string','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','WECOM','a\x20JSON\x20object','trim','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','utf8','type','FEISHU','\x22\x20must\x20be\x20','DINGTALK','\x20must\x20be\x20an\x20object.','419262WnOIFg','updateTime','validation','a\x20supported\x20string','configCode','\x22channelType\x22.','isArray','1631250XWpKMf','preflight','Invalid\x20--','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_unknown','configName','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','length','channelType','7927176btMuyQ','\x22\x20cannot\x20exceed\x20','11972BaKmgf','notification_config_field_required','createTime','path','keys','str','7jqcJTX','\x20has\x20invalid\x20field\x20\x22','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','notification_config_source_unavailable','setEncoding','yes','\x20--type\x20','1299sJpTxc','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20channelType.','create','apiError','channelCode','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','recipients','hasOwnProperty','\x20--format\x20compress','notification_config_channel_field_forbidden','Notification\x20config\x20list\x20item\x20','description','kind','replyTo','num','push','join','stringify','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','30WojcsW','Notification\x20config\x20','failed','5343888NAjfgQ','bool','notification_config_update_empty','name','\x20characters.','environment\x20variable\x20','notification_config_id_invalid','some','a\x20string\x20or\x20null','EMAIL','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','subjectPrefix','fromName','has','file','emailTargets','entries','includes','12106pKyXLo','4097700tIaYMw','isSafeInteger','connectTimeout','call','\x20has\x20an\x20invalid\x20id.','_unavailable','notification_config_field_invalid','Notification\x20JSON\x20from\x20','\x20has\x20an\x20invalid\x20appCode.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','every','channelConfig','Application-level\x20notification\x20config\x20ID','update','Notification\x20JSON\x20field\x20\x22','45cMmaVD','stdin','\x20failed.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x22configName\x22.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','channelConfigRaw','Missing\x20notification\x20JSON\x20source.','endpointUrlRaw'];a181_0x37f6=function(){return _0x93cf11;};return a181_0x37f6();}export function readNotificationChannelType(_0xc60f64,_0x3e0de3=a181_0xc65655(0x158),_0x4199c0=a181_0xc65655(0x120)){const _0x344ca8=a181_0xc65655,_0x5c98db=_0xc60f64[_0x344ca8(0x174)](_0x3e0de3)['trim']()||_0x4199c0;if(!NOTIFICATION_CHANNEL_TYPES[_0x344ca8(0x128)](_0x5c98db))throw CliErrors[_0x344ca8(0x15f)](_0x344ca8(0x166)+_0x3e0de3+':\x20'+_0x5c98db,_0x344ca8(0x14c)+NOTIFICATION_CHANNEL_TYPES[_0x344ca8(0x111)](',\x20')+'.');return _0x5c98db;}export function assertSingleNotificationSource(_0x13a834){const _0x3c91f1=a181_0xc65655,_0x59b49f=[],_0x4809c1=_0x13a834[_0x3c91f1(0x174)](_0x3c91f1(0x125))['trim']();if(_0x4809c1)_0x59b49f[_0x3c91f1(0x110)]({'kind':_0x3c91f1(0x125),'path':_0x4809c1});if(_0x13a834[_0x3c91f1(0x118)]('stdin'))_0x59b49f[_0x3c91f1(0x110)]({'kind':_0x3c91f1(0x13a)});const _0x6513bb=_0x13a834[_0x3c91f1(0x174)](_0x3c91f1(0x144))[_0x3c91f1(0x155)]();if(_0x6513bb)_0x59b49f[_0x3c91f1(0x110)]({'kind':'env','name':_0x6513bb});if(_0x59b49f[_0x3c91f1(0x16b)]===0x0)throw CliErrors[_0x3c91f1(0x15f)](_0x3c91f1(0x140),_0x3c91f1(0x14a));if(_0x59b49f['length']>0x1)throw CliErrors[_0x3c91f1(0x15f)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x3c91f1(0x14a));return _0x59b49f[0x0];}export async function readNotificationDocument(_0x501010,_0x49b2b2){const _0x2f7810=a181_0xc65655,_0x28e4ab=assertSingleNotificationSource(_0x501010),_0xb26c0b=_0x28e4ab[_0x2f7810(0x10d)]===_0x2f7810(0x125)?'file\x20'+_0x28e4ab[_0x2f7810(0x172)]:_0x28e4ab[_0x2f7810(0x10d)]===_0x2f7810(0x149)?_0x2f7810(0x11c)+_0x28e4ab[_0x2f7810(0x11a)]:_0x2f7810(0x13a);let _0x3d29d0;try{if(_0x28e4ab['kind']==='file')_0x3d29d0=await readFile(_0x28e4ab[_0x2f7810(0x172)],'utf8');else{if(_0x28e4ab['kind']===_0x2f7810(0x149)){if(!(_0x28e4ab[_0x2f7810(0x11a)]in process.env))throw notificationError('notification_config_source_unavailable',_0x2f7810(0x167)+_0x28e4ab[_0x2f7810(0x11a)]);_0x3d29d0=process.env[_0x28e4ab.name]??'';}else _0x3d29d0=await readStdin();}}catch(_0x329097){if(_0x329097 instanceof CliError)throw _0x329097;throw notificationError(_0x2f7810(0xfc),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0xb26c0b+'.');}let _0x448f7e;try{_0x448f7e=JSON[_0x2f7810(0x14f)](_0x3d29d0);}catch{throw notificationError('notification_config_json_invalid',_0x2f7810(0x131)+_0xb26c0b+'\x20is\x20invalid.',_0x2f7810(0x121));}if(!isJsonObject(_0x448f7e))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0xb26c0b+_0x2f7810(0x15c));return validateNotificationDocument(_0x448f7e,_0x49b2b2);}export function projectNotificationListConfig(_0x43ab70,_0x804ef1){const _0x4b39a1=a181_0xc65655;return{'id':typeof _0x43ab70['id']===_0x4b39a1(0x145)?_0x43ab70['id']:null,'configCode':requireResponseString(_0x43ab70['configCode'],_0x4b39a1(0x161),_0x804ef1),'configName':requireResponseString(_0x43ab70['configName'],_0x4b39a1(0x169),_0x804ef1),'channelType':requireResponseString(_0x43ab70[_0x4b39a1(0x16c)],_0x4b39a1(0x16c),_0x804ef1),'description':normalizeNullableString(_0x43ab70[_0x4b39a1(0x10c)]),'createTime':normalizeNullableString(_0x43ab70[_0x4b39a1(0x171)]),'updateTime':normalizeNullableString(_0x43ab70[_0x4b39a1(0x15e)])};}export function normalizeExactNotificationConfig(_0xa6fbe9,_0x2aeaaf,_0x297ac4){const _0x3fd3c7=a181_0xc65655;if(!Number[_0x3fd3c7(0x12b)](_0xa6fbe9['id'])||_0xa6fbe9['id']!==_0x2aeaaf)throw notificationError(_0x3fd3c7(0x150),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2aeaaf+'.');if(_0xa6fbe9[_0x3fd3c7(0x146)]!==_0x297ac4)throw notificationError('notification_config_response_invalid',_0x3fd3c7(0x115)+_0x2aeaaf+_0x3fd3c7(0xfb));const _0x48c7ca=requireExactString(_0xa6fbe9[_0x3fd3c7(0x169)],'configName',_0x2aeaaf),_0x2129bd=requireExactString(_0xa6fbe9[_0x3fd3c7(0x161)],_0x3fd3c7(0x161),_0x2aeaaf),_0x18fcb1=requireExactString(_0xa6fbe9[_0x3fd3c7(0x16c)],_0x3fd3c7(0x16c),_0x2aeaaf);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x18fcb1))throw notificationError('notification_config_response_invalid',_0x3fd3c7(0x115)+_0x2aeaaf+'\x20has\x20an\x20unsupported\x20channelType.');const _0x4a631b=responseNullableString(_0xa6fbe9['endpointUrl'],_0x3fd3c7(0x14e),_0x2aeaaf),_0x4feb0a=responseNullableString(_0xa6fbe9[_0x3fd3c7(0x135)],_0x3fd3c7(0x135),_0x2aeaaf),_0x234bbf=responseNullableString(_0xa6fbe9['description'],_0x3fd3c7(0x10c),_0x2aeaaf),_0x3cf145=responseNullableTimeout(_0xa6fbe9[_0x3fd3c7(0x12c)],_0x3fd3c7(0x12c),_0x2aeaaf),_0x370f56=responseNullableTimeout(_0xa6fbe9[_0x3fd3c7(0x14d)],_0x3fd3c7(0x14d),_0x2aeaaf);return{'id':_0x2aeaaf,'appCode':_0x297ac4,'configCode':_0x2129bd,'configName':_0x48c7ca,'channelType':_0x18fcb1,'endpointUrl':redactSensitive(_0x4a631b),'channelConfig':redactSensitive(_0x4feb0a),'description':_0x234bbf,'connectTimeout':_0x3cf145,'readTimeout':_0x370f56,'endpointUrlRaw':_0x4a631b,'channelConfigRaw':_0x4feb0a};}export async function requireExactNotificationConfig(_0x26b1df,_0x396c8a,_0xe8883a){const _0x356b22=a181_0xc65655;let _0x4e8162;try{_0x4e8162=await getNotificationChannelConfig(_0x396c8a,_0x26b1df);}catch{throw safeApiFailure(_0xe8883a,_0x356b22(0x165),_0x356b22(0x113)+_0x26b1df+_0x356b22(0x13c));}return normalizeExactNotificationConfig(_0x4e8162,_0x396c8a,_0x26b1df);}export function projectNotificationConfig(_0x23d7b5){const _0x1f82ba=a181_0xc65655;return{'id':_0x23d7b5['id']??null,'appCode':_0x23d7b5['appCode'],'configCode':_0x23d7b5[_0x1f82ba(0x161)]??null,'configName':_0x23d7b5[_0x1f82ba(0x169)],'channelType':_0x23d7b5[_0x1f82ba(0x16c)],'endpointUrl':redactSensitive(_0x23d7b5[_0x1f82ba(0x14e)]),'channelConfig':redactSensitive(_0x23d7b5[_0x1f82ba(0x135)]),'description':_0x23d7b5['description']??null,'connectTimeout':_0x23d7b5['connectTimeout']??null,'readTimeout':_0x23d7b5[_0x1f82ba(0x14d)]??null};}export function notificationSelector(_0x2fb013){const _0x336388=a181_0xc65655;return{'appCode':_0x2fb013['appCode'],'id':_0x2fb013['id'],'configCode':_0x2fb013[_0x336388(0x161)],'configName':_0x2fb013['configName'],'channelType':_0x2fb013[_0x336388(0x16c)]};}export function createMutationInput(_0x5ee4e7,_0x2eab83){const _0x2dc6f0=a181_0xc65655;return{'appCode':_0x5ee4e7,'configName':_0x2eab83[_0x2dc6f0(0x169)],'channelType':_0x2eab83[_0x2dc6f0(0x16c)],...hasOwn(_0x2eab83,_0x2dc6f0(0x14e))?{'endpointUrl':_0x2eab83[_0x2dc6f0(0x14e)]}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x135))?{'channelConfig':serializeChannelConfig(_0x2eab83[_0x2dc6f0(0x135)])}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x10c))?{'description':_0x2eab83['description']}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x12c))?{'connectTimeout':_0x2eab83[_0x2dc6f0(0x12c)]}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x14d))?{'readTimeout':_0x2eab83[_0x2dc6f0(0x14d)]}:{}};}export function mergeUpdateInput(_0x120577,_0x38148d){const _0x1ccc79=a181_0xc65655;return{'id':_0x120577['id'],'appCode':_0x120577['appCode'],'configName':_0x38148d[_0x1ccc79(0x169)]??_0x120577[_0x1ccc79(0x169)],'channelType':_0x38148d[_0x1ccc79(0x16c)]??_0x120577[_0x1ccc79(0x16c)],'endpointUrl':hasOwn(_0x38148d,_0x1ccc79(0x14e))?_0x38148d[_0x1ccc79(0x14e)]:_0x120577[_0x1ccc79(0x141)],'channelConfig':hasOwn(_0x38148d,_0x1ccc79(0x135))?serializeChannelConfig(_0x38148d['channelConfig']):_0x120577[_0x1ccc79(0x13f)],'description':hasOwn(_0x38148d,_0x1ccc79(0x10c))?_0x38148d['description']:_0x120577['description'],'connectTimeout':hasOwn(_0x38148d,_0x1ccc79(0x12c))?_0x38148d['connectTimeout']:_0x120577[_0x1ccc79(0x12c)],'readTimeout':hasOwn(_0x38148d,_0x1ccc79(0x14d))?_0x38148d[_0x1ccc79(0x14d)]:_0x120577['readTimeout']};}export function plannedUpdateProjection(_0x1a5d52,_0x475572){const _0xdfb784=a181_0xc65655;return projectNotificationConfig({'id':_0x1a5d52['id'],'appCode':_0x1a5d52[_0xdfb784(0x146)],'configCode':_0x1a5d52[_0xdfb784(0x161)],'configName':_0x475572['configName']??_0x1a5d52['configName'],'channelType':_0x475572[_0xdfb784(0x16c)]??_0x1a5d52['channelType'],'endpointUrl':hasOwn(_0x475572,_0xdfb784(0x14e))?_0x475572[_0xdfb784(0x14e)]:_0x1a5d52[_0xdfb784(0x141)],'channelConfig':hasOwn(_0x475572,_0xdfb784(0x135))?_0x475572[_0xdfb784(0x135)]:_0x1a5d52[_0xdfb784(0x13f)],'description':hasOwn(_0x475572,_0xdfb784(0x10c))?_0x475572[_0xdfb784(0x10c)]:_0x1a5d52[_0xdfb784(0x10c)],'connectTimeout':hasOwn(_0x475572,_0xdfb784(0x12c))?_0x475572[_0xdfb784(0x12c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x1a5d52['connectTimeout'],'readTimeout':hasOwn(_0x475572,_0xdfb784(0x14d))?_0x475572[_0xdfb784(0x14d)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x1a5d52[_0xdfb784(0x14d)]});}export function requestedSafeFieldsMatch(_0x22e937,_0x22cb6e,_0x44a095){const _0x24b5d1=a181_0xc65655,_0x328d08=[],_0xa4609a=[],_0x4585ea=[];for(const _0x57c3b7 of[_0x24b5d1(0x169),_0x24b5d1(0x16c),_0x24b5d1(0x10c)]){if(!hasOwn(_0x44a095,_0x57c3b7))continue;_0x4585ea[_0x24b5d1(0x110)](_0x57c3b7),_0x328d08[_0x24b5d1(0x110)](_0x22cb6e[_0x57c3b7]===_0x44a095[_0x57c3b7]),_0xa4609a[_0x24b5d1(0x110)](_0x22e937[_0x57c3b7]!==_0x44a095[_0x57c3b7]&&_0x22cb6e[_0x57c3b7]===_0x44a095[_0x57c3b7]);}for(const _0x1f6204 of[_0x24b5d1(0x12c),_0x24b5d1(0x14d)]){if(!hasOwn(_0x44a095,_0x1f6204))continue;const _0xfb6354=_0x44a095[_0x1f6204]??(_0x1f6204===_0x24b5d1(0x12c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4585ea[_0x24b5d1(0x110)](_0x1f6204),_0x328d08[_0x24b5d1(0x110)](_0x22cb6e[_0x1f6204]===_0xfb6354),_0xa4609a['push'](_0x22e937[_0x1f6204]!==_0xfb6354&&_0x22cb6e[_0x1f6204]===_0xfb6354);}return hasOwn(_0x44a095,_0x24b5d1(0x14e))&&_0x44a095[_0x24b5d1(0x14e)]===null&&(_0x4585ea[_0x24b5d1(0x110)]('endpointUrl:null'),_0x328d08['push'](_0x22cb6e[_0x24b5d1(0x141)]===null||_0x22cb6e[_0x24b5d1(0x141)]===''),_0xa4609a[_0x24b5d1(0x110)](_0x22e937[_0x24b5d1(0x141)]!==null&&_0x22e937[_0x24b5d1(0x141)]!==''&&(_0x22cb6e[_0x24b5d1(0x141)]===null||_0x22cb6e[_0x24b5d1(0x141)]===''))),{'allMatch':_0x328d08[_0x24b5d1(0x134)](Boolean),'provesChange':_0xa4609a[_0x24b5d1(0x11e)](Boolean),'verifiedFields':_0x4585ea};}export function validateNotificationDeleteReadback(_0x31240c,_0x40689d,_0x32e8c0){const _0x338318=a181_0xc65655;for(const [_0x41afc3,_0x44052d]of _0x31240c[_0x338318(0x127)]()){if(!Number['isSafeInteger'](_0x44052d['id'])||_0x44052d['id']<=0x0)throw notificationError(_0x338318(0x150),'Notification\x20config\x20list\x20item\x20'+(_0x41afc3+0x1)+_0x338318(0x12e));if(_0x44052d[_0x338318(0x146)]!==_0x40689d)throw notificationError(_0x338318(0x150),'Notification\x20config\x20list\x20item\x20'+(_0x41afc3+0x1)+_0x338318(0x132));if(_0x44052d['channelType']!==_0x32e8c0)throw notificationError(_0x338318(0x150),_0x338318(0x10b)+(_0x41afc3+0x1)+_0x338318(0x102));}}function a181_0x5673(_0x4bbac3,_0x599076){_0x4bbac3=_0x4bbac3-0xfa;const _0x37f657=a181_0x37f6();let _0x5673b9=_0x37f657[_0x4bbac3];return _0x5673b9;}export function safeApiFailure(_0x5389af,_0x341cad,_0x47726b){const _0x5be6eb=a181_0xc65655;return notificationError('notification_config_'+_0x5389af+'_'+(_0x341cad==='mutation'?_0x5be6eb(0x116):_0x341cad+_0x5be6eb(0x12f)),_0x5be6eb(0x115)+_0x5389af+'\x20'+_0x341cad+_0x5be6eb(0x13b),_0x47726b);}export function notificationLookupCommand(_0x294702,_0x27b40f){const _0xf5e898=a181_0xc65655;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x294702+_0xf5e898(0xff)+_0x27b40f+_0xf5e898(0x109);}function validateNotificationDocument(_0x1eca7d,_0x4a6d07){const _0x55f193=a181_0xc65655;for(const _0x2e8f94 of Object['keys'](_0x1eca7d)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x2e8f94))throw notificationError('notification_config_field_forbidden',_0x55f193(0x138)+_0x2e8f94+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x55f193(0x124)](_0x2e8f94))throw notificationError(_0x55f193(0x168),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x2e8f94+'\x22.');}if(_0x4a6d07===_0x55f193(0x137)&&Object[_0x55f193(0x173)](_0x1eca7d)['length']===0x0)throw notificationError(_0x55f193(0x119),_0x55f193(0x142));const _0x385ebf={};if(hasOwn(_0x1eca7d,_0x55f193(0x169)))_0x385ebf[_0x55f193(0x169)]=validateRequiredString(_0x1eca7d[_0x55f193(0x169)],_0x55f193(0x169),0x80);else{if(_0x4a6d07===_0x55f193(0x103))throw notificationError(_0x55f193(0x170),'Create\x20JSON\x20requires\x20field\x20'+_0x55f193(0x13d));}if(hasOwn(_0x1eca7d,_0x55f193(0x16c))){if(typeof _0x1eca7d[_0x55f193(0x16c)]!==_0x55f193(0x151))throw invalidFieldType('channelType',_0x55f193(0x160));const _0xa42baa=_0x1eca7d[_0x55f193(0x16c)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x55f193(0x128)](_0xa42baa))throw notificationError(_0x55f193(0x130),_0x55f193(0x13e),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x385ebf['channelType']=_0xa42baa;}else{if(_0x4a6d07==='create')throw notificationError(_0x55f193(0x170),'Create\x20JSON\x20requires\x20field\x20'+_0x55f193(0x162));}for(const [_0x2fa057,_0x3a0efe]of[[_0x55f193(0x14e),0x200],[_0x55f193(0x10c),0x100]]){if(!hasOwn(_0x1eca7d,_0x2fa057))continue;const _0x376885=_0x1eca7d[_0x2fa057];if(_0x376885!==null&&typeof _0x376885!==_0x55f193(0x151))throw invalidFieldType(_0x2fa057,_0x55f193(0x11f));if(typeof _0x376885===_0x55f193(0x151)&&_0x376885['length']>_0x3a0efe)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x2fa057+_0x55f193(0x16e)+_0x3a0efe+_0x55f193(0x11b));_0x385ebf[_0x2fa057]=_0x376885;}if(hasOwn(_0x1eca7d,_0x55f193(0x135))){const _0x323312=_0x1eca7d[_0x55f193(0x135)];if(_0x323312===null&&_0x4a6d07===_0x55f193(0x103))throw invalidFieldType('channelConfig',_0x55f193(0x154));if(_0x323312!==null&&!isJsonObject(_0x323312))throw invalidFieldType(_0x55f193(0x135),_0x4a6d07===_0x55f193(0x137)?'a\x20JSON\x20object\x20or\x20null':_0x55f193(0x154));_0x323312!==null&&validateChannelConfigFields(_0x385ebf[_0x55f193(0x16c)],_0x323312),_0x385ebf[_0x55f193(0x135)]=_0x323312;}for(const _0x3bc72e of[_0x55f193(0x12c),_0x55f193(0x14d)]){if(!hasOwn(_0x1eca7d,_0x3bc72e))continue;const _0x1fc4e2=_0x1eca7d[_0x3bc72e];if(_0x1fc4e2!==null&&(!Number[_0x55f193(0x12b)](_0x1fc4e2)||_0x1fc4e2<0x0))throw notificationError(_0x55f193(0x130),'Notification\x20JSON\x20field\x20\x22'+_0x3bc72e+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x385ebf[_0x3bc72e]=_0x1fc4e2;}return _0x385ebf;}function validateRequiredString(_0x3e8b03,_0x2404a3,_0x31d87a){const _0x893215=a181_0xc65655;if(typeof _0x3e8b03!=='string')throw invalidFieldType(_0x2404a3,_0x893215(0x101));const _0x472ce3=_0x3e8b03['trim']();if(!_0x472ce3)throw notificationError(_0x893215(0x130),_0x893215(0x138)+_0x2404a3+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x472ce3['length']>_0x31d87a)throw notificationError(_0x893215(0x130),_0x893215(0x138)+_0x2404a3+_0x893215(0x16e)+_0x31d87a+_0x893215(0x11b));return _0x472ce3;}function validateChannelConfigFields(_0x38d21b,_0x5b9e2e){if(hasOwn(_0x5b9e2e,'messageTemplate'))throw forbiddenChannelConfigField('messageTemplate');if(_0x38d21b==='EMAIL')for(const _0x34e47d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x5b9e2e,_0x34e47d))throw forbiddenChannelConfigField(_0x34e47d);}}function forbiddenChannelConfigField(_0x28fadc){const _0x376a10=a181_0xc65655;return notificationError(_0x376a10(0x10a),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x28fadc+_0x376a10(0x143));}function invalidFieldType(_0x1ff886,_0x3232b3){const _0x1329ff=a181_0xc65655;return notificationError('notification_config_field_invalid',_0x1329ff(0x138)+_0x1ff886+_0x1329ff(0x15a)+_0x3232b3+'.');}function serializeChannelConfig(_0x3d1cf2){const _0x2b8c2b=a181_0xc65655;return _0x3d1cf2===null||_0x3d1cf2===undefined?null:JSON[_0x2b8c2b(0x112)](_0x3d1cf2);}function redactSensitive(_0x257a10){return _0x257a10===null||_0x257a10===undefined||_0x257a10===''?null:'<redacted>';}function requireResponseString(_0x34f3a6,_0xc44118,_0x5c3f10){const _0xd9eb44=a181_0xc65655;if(typeof _0x34f3a6!==_0xd9eb44(0x151)||_0x34f3a6[_0xd9eb44(0x155)]()==='')throw CliErrors[_0xd9eb44(0x104)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x5c3f10+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0xc44118+'\x22.');return _0x34f3a6[_0xd9eb44(0x155)]();}function requireExactString(_0x28f74b,_0x498c0a,_0x2224cb){const _0x358da0=a181_0xc65655;if(typeof _0x28f74b!=='string'||_0x28f74b[_0x358da0(0x155)]()==='')throw notificationError(_0x358da0(0x150),_0x358da0(0x115)+_0x2224cb+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x498c0a+'\x22.');return _0x28f74b[_0x358da0(0x155)]();}function responseNullableString(_0x1a9cbc,_0x182134,_0x343733){const _0x2f5fbb=a181_0xc65655;if(_0x1a9cbc===undefined||_0x1a9cbc===null)return null;if(typeof _0x1a9cbc!=='string')throw notificationError('notification_config_response_invalid',_0x2f5fbb(0x115)+_0x343733+'\x20has\x20invalid\x20field\x20\x22'+_0x182134+'\x22.');return _0x1a9cbc;}function responseNullableTimeout(_0x477fbd,_0x193fca,_0x685039){const _0x144a0d=a181_0xc65655;if(_0x477fbd===undefined||_0x477fbd===null)return null;if(!Number[_0x144a0d(0x12b)](_0x477fbd)||_0x477fbd<0x0)throw notificationError(_0x144a0d(0x150),_0x144a0d(0x115)+_0x685039+_0x144a0d(0xfa)+_0x193fca+'\x22.');return _0x477fbd;}function normalizeNullableString(_0xb74f5d){return typeof _0xb74f5d==='string'?_0xb74f5d:null;}function isJsonObject(_0xe3abd9){const _0x178ca5=a181_0xc65655;return _0xe3abd9!==null&&typeof _0xe3abd9==='object'&&!Array[_0x178ca5(0x163)](_0xe3abd9);}function hasOwn(_0x1cd354,_0x59a6c8){const _0xa397e6=a181_0xc65655;return Object['prototype'][_0xa397e6(0x108)][_0xa397e6(0x12d)](_0x1cd354,_0x59a6c8);}async function readStdin(){const _0x48318c=a181_0xc65655;let _0x432b7c='';process[_0x48318c(0x13a)][_0x48318c(0xfd)](_0x48318c(0x157));for await(const _0x181f5d of process[_0x48318c(0x13a)])_0x432b7c+=_0x181f5d;return _0x432b7c;}
1
+ const a181_0x4756dc=a181_0x293b;(function(_0x218807,_0x104cbe){const _0x26d292=a181_0x293b,_0x4b2825=_0x218807();while(!![]){try{const _0x5afc13=parseInt(_0x26d292(0x16a))/0x1+parseInt(_0x26d292(0x186))/0x2+-parseInt(_0x26d292(0x151))/0x3*(parseInt(_0x26d292(0x156))/0x4)+parseInt(_0x26d292(0x194))/0x5*(-parseInt(_0x26d292(0x1a2))/0x6)+parseInt(_0x26d292(0x15e))/0x7*(parseInt(_0x26d292(0x17f))/0x8)+parseInt(_0x26d292(0x164))/0x9*(parseInt(_0x26d292(0x17c))/0xa)+parseInt(_0x26d292(0x183))/0xb;if(_0x5afc13===_0x104cbe)break;else _0x4b2825['push'](_0x4b2825['shift']());}catch(_0x573558){_0x4b2825['push'](_0x4b2825['shift']());}}}(a181_0x2802,0x83b4a));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=[a181_0x4756dc(0x19c),a181_0x4756dc(0x142),a181_0x4756dc(0x182),'WECOM',a181_0x4756dc(0x150)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a181_0x2802(){const _0x82310=['\x22channelType\x22.','320HLYzxC','messageTemplate','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configName','call','push','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_channel_field_forbidden','16681DwaedI','\x22configName\x22.','\x20failed.','Application-level\x20notification\x20config\x20ID','\x22\x20must\x20be\x20','\x20must\x20be\x20an\x20object.','9LJHUsC','isSafeInteger','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','readTimeout','isArray','\x20has\x20an\x20invalid\x20appCode.','181548piWBMJ','a\x20supported\x20string','notification_config_response_invalid','parse','yes','\x20has\x20an\x20invalid\x20id.','configCode','_unavailable','validation','Create\x20JSON\x20requires\x20field\x20','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','replyTo','a\x20string\x20or\x20null','stringify','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','channelType','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','mutation','9626850BOJTkH','update','Notification\x20config\x20','152mwWCYV','appCode','<redacted>','DINGTALK','1714240EtJrEi','a\x20non-empty\x20string','name','1763244JLvVYS','every','includes','channelConfigRaw','notification_config_source_unavailable','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrl','emailTargets','preflight','num','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22','hasOwnProperty','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','87070orkwCg','\x22\x20must\x20be\x20a\x20non-empty\x20string.','endpointUrl:null','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','join','channelConfig','str','file','EMAIL','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Item\x20','file\x20','utf8','prototype','354iisPWd','\x20has\x20an\x20invalid\x20channelType.','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_invalid','has','Allowed\x20values:\x20','\x20is\x20invalid.','\x20characters.','string','\x20--format\x20compress','createTime','Unknown\x20notification\x20JSON\x20field\x20\x22','setEncoding','trim','updateTime','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','path','notification_config_confirmation_required','apiError','channelCode','create','env','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','description','FEISHU','\x20--type\x20','a\x20JSON\x20object\x20or\x20null','stdin','bool','notification_config_json_invalid','endpointUrlRaw','Notification\x20JSON\x20from\x20','kind','\x20has\x20invalid\x20field\x20\x22','type','failed','connectTimeout','keys','WEBHOOK','24753rBPSri','bccList','a\x20JSON\x20object','length'];a181_0x2802=function(){return _0x82310;};return a181_0x2802();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x4756dc(0x159),a181_0x4756dc(0x179),'endpointUrl',a181_0x4756dc(0x199),a181_0x4756dc(0x141),'connectTimeout',a181_0x4756dc(0x167)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a181_0x4756dc(0x170),a181_0x4756dc(0x1b8)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x4756dc(0x18d),'recipients','ccList',a181_0x4756dc(0x152),a181_0x4756dc(0x175),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0x4756dc(0x19b),'type':a181_0x4756dc(0x1ab),'required':![],'description':a181_0x4756dc(0x197)},{'name':a181_0x4756dc(0x145),'type':'boolean','required':![],'default':![],'description':a181_0x4756dc(0x17a)},{'name':'from-env','type':a181_0x4756dc(0x1ab),'required':![],'description':a181_0x4756dc(0x1bb)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0x4756dc(0x161)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x40a013,_0x1d5e72,_0x5abbdb){return new CliError(_0x40a013,0x1,_0x1d5e72,_0x5abbdb);}export function readNotificationId(_0x491d18){const _0x2e53de=a181_0x4756dc,_0x1bf133=_0x491d18[_0x2e53de(0x18f)]('id');if(!Number[_0x2e53de(0x165)](_0x1bf133)||_0x1bf133<=0x0)throw notificationError('notification_config_id_invalid',_0x2e53de(0x190));return _0x1bf133;}export function requireNotificationExplicitYes(_0x49f367){const _0xe02806=a181_0x4756dc;if(_0x49f367['bool']('dry-run')||_0x49f367[_0xe02806(0x146)](_0xe02806(0x16e)))return;throw notificationError(_0xe02806(0x1b6),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x2693b1,_0x118138=a181_0x4756dc(0x14c),_0x240ea7=a181_0x4756dc(0x19c)){const _0x3f965a=a181_0x4756dc,_0x1b487e=_0x2693b1[_0x3f965a(0x19a)](_0x118138)[_0x3f965a(0x1b0)]()||_0x240ea7;if(!NOTIFICATION_CHANNEL_TYPES[_0x3f965a(0x188)](_0x1b487e))throw CliErrors['validation']('Invalid\x20--'+_0x118138+':\x20'+_0x1b487e,_0x3f965a(0x1a8)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1b487e;}export function assertSingleNotificationSource(_0x4cb9b4){const _0x5791d4=a181_0x4756dc,_0x161ed8=[],_0xd701bb=_0x4cb9b4[_0x5791d4(0x19a)]('file')[_0x5791d4(0x1b0)]();if(_0xd701bb)_0x161ed8[_0x5791d4(0x15b)]({'kind':_0x5791d4(0x19b),'path':_0xd701bb});if(_0x4cb9b4[_0x5791d4(0x146)](_0x5791d4(0x145)))_0x161ed8[_0x5791d4(0x15b)]({'kind':_0x5791d4(0x145)});const _0x13abfb=_0x4cb9b4[_0x5791d4(0x19a)]('from-env')[_0x5791d4(0x1b0)]();if(_0x13abfb)_0x161ed8['push']({'kind':'env','name':_0x13abfb});if(_0x161ed8['length']===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x5791d4(0x158));if(_0x161ed8[_0x5791d4(0x154)]>0x1)throw CliErrors[_0x5791d4(0x172)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x5791d4(0x158));return _0x161ed8[0x0];}export async function readNotificationDocument(_0xca6865,_0x38ddf8){const _0x3e2666=a181_0x4756dc,_0x4e62c9=assertSingleNotificationSource(_0xca6865),_0x2f5e85=_0x4e62c9[_0x3e2666(0x14a)]===_0x3e2666(0x19b)?_0x3e2666(0x19f)+_0x4e62c9[_0x3e2666(0x1b5)]:_0x4e62c9['kind']===_0x3e2666(0x1ba)?'environment\x20variable\x20'+_0x4e62c9['name']:_0x3e2666(0x145);let _0x23855a;try{if(_0x4e62c9[_0x3e2666(0x14a)]===_0x3e2666(0x19b))_0x23855a=await readFile(_0x4e62c9[_0x3e2666(0x1b5)],_0x3e2666(0x1a0));else{if(_0x4e62c9['kind']==='env'){if(!(_0x4e62c9[_0x3e2666(0x185)]in process.env))throw notificationError(_0x3e2666(0x18a),_0x3e2666(0x1a5)+_0x4e62c9[_0x3e2666(0x185)]);_0x23855a=process.env[_0x4e62c9.name]??'';}else _0x23855a=await readStdin();}}catch(_0x3b7229){if(_0x3b7229 instanceof CliError)throw _0x3b7229;throw notificationError(_0x3e2666(0x18a),_0x3e2666(0x174)+_0x2f5e85+'.');}let _0x37ee64;try{_0x37ee64=JSON[_0x3e2666(0x16d)](_0x23855a);}catch{throw notificationError('notification_config_json_invalid',_0x3e2666(0x149)+_0x2f5e85+_0x3e2666(0x1a9),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x37ee64))throw notificationError(_0x3e2666(0x147),_0x3e2666(0x149)+_0x2f5e85+_0x3e2666(0x163));return validateNotificationDocument(_0x37ee64,_0x38ddf8);}export function projectNotificationListConfig(_0x5e7c82,_0x258110){const _0x193994=a181_0x4756dc;return{'id':typeof _0x5e7c82['id']==='number'?_0x5e7c82['id']:null,'configCode':requireResponseString(_0x5e7c82[_0x193994(0x170)],_0x193994(0x170),_0x258110),'configName':requireResponseString(_0x5e7c82['configName'],_0x193994(0x159),_0x258110),'channelType':requireResponseString(_0x5e7c82[_0x193994(0x179)],_0x193994(0x179),_0x258110),'description':normalizeNullableString(_0x5e7c82['description']),'createTime':normalizeNullableString(_0x5e7c82[_0x193994(0x1ad)]),'updateTime':normalizeNullableString(_0x5e7c82[_0x193994(0x1b1)])};}export function normalizeExactNotificationConfig(_0x227439,_0x5ea9e8,_0x4e2dd7){const _0x4f1b87=a181_0x4756dc;if(!Number[_0x4f1b87(0x165)](_0x227439['id'])||_0x227439['id']!==_0x5ea9e8)throw notificationError('notification_config_response_invalid',_0x4f1b87(0x166)+_0x5ea9e8+'.');if(_0x227439[_0x4f1b87(0x180)]!==_0x4e2dd7)throw notificationError(_0x4f1b87(0x16c),'Notification\x20config\x20'+_0x5ea9e8+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5a32c5=requireExactString(_0x227439['configName'],_0x4f1b87(0x159),_0x5ea9e8),_0x3cf6ca=requireExactString(_0x227439['configCode'],'configCode',_0x5ea9e8),_0x4aea23=requireExactString(_0x227439[_0x4f1b87(0x179)],_0x4f1b87(0x179),_0x5ea9e8);if(!NOTIFICATION_CHANNEL_TYPES[_0x4f1b87(0x188)](_0x4aea23))throw notificationError(_0x4f1b87(0x16c),_0x4f1b87(0x17e)+_0x5ea9e8+'\x20has\x20an\x20unsupported\x20channelType.');const _0x503c12=responseNullableString(_0x227439[_0x4f1b87(0x18c)],_0x4f1b87(0x18c),_0x5ea9e8),_0x507746=responseNullableString(_0x227439[_0x4f1b87(0x199)],_0x4f1b87(0x199),_0x5ea9e8),_0x414fc7=responseNullableString(_0x227439[_0x4f1b87(0x141)],_0x4f1b87(0x141),_0x5ea9e8),_0x2377ac=responseNullableTimeout(_0x227439[_0x4f1b87(0x14e)],_0x4f1b87(0x14e),_0x5ea9e8),_0x5b206a=responseNullableTimeout(_0x227439[_0x4f1b87(0x167)],_0x4f1b87(0x167),_0x5ea9e8);return{'id':_0x5ea9e8,'appCode':_0x4e2dd7,'configCode':_0x3cf6ca,'configName':_0x5a32c5,'channelType':_0x4aea23,'endpointUrl':redactSensitive(_0x503c12),'channelConfig':redactSensitive(_0x507746),'description':_0x414fc7,'connectTimeout':_0x2377ac,'readTimeout':_0x5b206a,'endpointUrlRaw':_0x503c12,'channelConfigRaw':_0x507746};}export async function requireExactNotificationConfig(_0x1c10fa,_0x994f64,_0x28d3c9){const _0x4e8ce4=a181_0x4756dc;let _0x2aa920;try{_0x2aa920=await getNotificationChannelConfig(_0x994f64,_0x1c10fa);}catch{throw safeApiFailure(_0x28d3c9,_0x4e8ce4(0x18e),_0x4e8ce4(0x19d)+_0x1c10fa+_0x4e8ce4(0x1b4));}return normalizeExactNotificationConfig(_0x2aa920,_0x994f64,_0x1c10fa);}export function projectNotificationConfig(_0x49c680){const _0x2a791f=a181_0x4756dc;return{'id':_0x49c680['id']??null,'appCode':_0x49c680[_0x2a791f(0x180)],'configCode':_0x49c680['configCode']??null,'configName':_0x49c680[_0x2a791f(0x159)],'channelType':_0x49c680[_0x2a791f(0x179)],'endpointUrl':redactSensitive(_0x49c680[_0x2a791f(0x18c)]),'channelConfig':redactSensitive(_0x49c680[_0x2a791f(0x199)]),'description':_0x49c680[_0x2a791f(0x141)]??null,'connectTimeout':_0x49c680[_0x2a791f(0x14e)]??null,'readTimeout':_0x49c680['readTimeout']??null};}export function notificationSelector(_0x57cecf){const _0x1f6d41=a181_0x4756dc;return{'appCode':_0x57cecf[_0x1f6d41(0x180)],'id':_0x57cecf['id'],'configCode':_0x57cecf[_0x1f6d41(0x170)],'configName':_0x57cecf[_0x1f6d41(0x159)],'channelType':_0x57cecf[_0x1f6d41(0x179)]};}export function createMutationInput(_0x30e1dc,_0x52d088){const _0x340c4e=a181_0x4756dc;return{'appCode':_0x30e1dc,'configName':_0x52d088[_0x340c4e(0x159)],'channelType':_0x52d088['channelType'],...hasOwn(_0x52d088,_0x340c4e(0x18c))?{'endpointUrl':_0x52d088['endpointUrl']}:{},...hasOwn(_0x52d088,_0x340c4e(0x199))?{'channelConfig':serializeChannelConfig(_0x52d088[_0x340c4e(0x199)])}:{},...hasOwn(_0x52d088,_0x340c4e(0x141))?{'description':_0x52d088[_0x340c4e(0x141)]}:{},...hasOwn(_0x52d088,'connectTimeout')?{'connectTimeout':_0x52d088[_0x340c4e(0x14e)]}:{},...hasOwn(_0x52d088,_0x340c4e(0x167))?{'readTimeout':_0x52d088[_0x340c4e(0x167)]}:{}};}export function mergeUpdateInput(_0x1e0230,_0x651850){const _0x1c4d71=a181_0x4756dc;return{'id':_0x1e0230['id'],'appCode':_0x1e0230[_0x1c4d71(0x180)],'configName':_0x651850[_0x1c4d71(0x159)]??_0x1e0230[_0x1c4d71(0x159)],'channelType':_0x651850[_0x1c4d71(0x179)]??_0x1e0230[_0x1c4d71(0x179)],'endpointUrl':hasOwn(_0x651850,_0x1c4d71(0x18c))?_0x651850[_0x1c4d71(0x18c)]:_0x1e0230[_0x1c4d71(0x148)],'channelConfig':hasOwn(_0x651850,_0x1c4d71(0x199))?serializeChannelConfig(_0x651850[_0x1c4d71(0x199)]):_0x1e0230[_0x1c4d71(0x189)],'description':hasOwn(_0x651850,_0x1c4d71(0x141))?_0x651850[_0x1c4d71(0x141)]:_0x1e0230[_0x1c4d71(0x141)],'connectTimeout':hasOwn(_0x651850,_0x1c4d71(0x14e))?_0x651850[_0x1c4d71(0x14e)]:_0x1e0230['connectTimeout'],'readTimeout':hasOwn(_0x651850,_0x1c4d71(0x167))?_0x651850[_0x1c4d71(0x167)]:_0x1e0230[_0x1c4d71(0x167)]};}function a181_0x293b(_0x441f48,_0x378457){_0x441f48=_0x441f48-0x141;const _0x2802f3=a181_0x2802();let _0x293bae=_0x2802f3[_0x441f48];return _0x293bae;}export function plannedUpdateProjection(_0x2fff5b,_0x58fe2b){const _0x5e07ef=a181_0x4756dc;return projectNotificationConfig({'id':_0x2fff5b['id'],'appCode':_0x2fff5b[_0x5e07ef(0x180)],'configCode':_0x2fff5b[_0x5e07ef(0x170)],'configName':_0x58fe2b[_0x5e07ef(0x159)]??_0x2fff5b[_0x5e07ef(0x159)],'channelType':_0x58fe2b[_0x5e07ef(0x179)]??_0x2fff5b[_0x5e07ef(0x179)],'endpointUrl':hasOwn(_0x58fe2b,'endpointUrl')?_0x58fe2b[_0x5e07ef(0x18c)]:_0x2fff5b['endpointUrlRaw'],'channelConfig':hasOwn(_0x58fe2b,_0x5e07ef(0x199))?_0x58fe2b[_0x5e07ef(0x199)]:_0x2fff5b[_0x5e07ef(0x189)],'description':hasOwn(_0x58fe2b,_0x5e07ef(0x141))?_0x58fe2b[_0x5e07ef(0x141)]:_0x2fff5b[_0x5e07ef(0x141)],'connectTimeout':hasOwn(_0x58fe2b,_0x5e07ef(0x14e))?_0x58fe2b[_0x5e07ef(0x14e)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2fff5b[_0x5e07ef(0x14e)],'readTimeout':hasOwn(_0x58fe2b,_0x5e07ef(0x167))?_0x58fe2b[_0x5e07ef(0x167)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2fff5b['readTimeout']});}export function requestedSafeFieldsMatch(_0x5c931f,_0x52aec9,_0x1a0321){const _0x342d04=a181_0x4756dc,_0x73d00=[],_0x2b281a=[],_0x50d74c=[];for(const _0x2f319f of[_0x342d04(0x159),_0x342d04(0x179),_0x342d04(0x141)]){if(!hasOwn(_0x1a0321,_0x2f319f))continue;_0x50d74c[_0x342d04(0x15b)](_0x2f319f),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0x2f319f]===_0x1a0321[_0x2f319f]),_0x2b281a[_0x342d04(0x15b)](_0x5c931f[_0x2f319f]!==_0x1a0321[_0x2f319f]&&_0x52aec9[_0x2f319f]===_0x1a0321[_0x2f319f]);}for(const _0xfa5cc1 of['connectTimeout',_0x342d04(0x167)]){if(!hasOwn(_0x1a0321,_0xfa5cc1))continue;const _0x1f99ef=_0x1a0321[_0xfa5cc1]??(_0xfa5cc1===_0x342d04(0x14e)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x50d74c[_0x342d04(0x15b)](_0xfa5cc1),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0xfa5cc1]===_0x1f99ef),_0x2b281a['push'](_0x5c931f[_0xfa5cc1]!==_0x1f99ef&&_0x52aec9[_0xfa5cc1]===_0x1f99ef);}return hasOwn(_0x1a0321,_0x342d04(0x18c))&&_0x1a0321[_0x342d04(0x18c)]===null&&(_0x50d74c[_0x342d04(0x15b)](_0x342d04(0x196)),_0x73d00[_0x342d04(0x15b)](_0x52aec9[_0x342d04(0x148)]===null||_0x52aec9[_0x342d04(0x148)]===''),_0x2b281a[_0x342d04(0x15b)](_0x5c931f[_0x342d04(0x148)]!==null&&_0x5c931f[_0x342d04(0x148)]!==''&&(_0x52aec9[_0x342d04(0x148)]===null||_0x52aec9[_0x342d04(0x148)]===''))),{'allMatch':_0x73d00[_0x342d04(0x187)](Boolean),'provesChange':_0x2b281a['some'](Boolean),'verifiedFields':_0x50d74c};}export function validateNotificationDeleteReadback(_0x21ad30,_0x153c02,_0x4be26f){const _0x32c742=a181_0x4756dc;for(const [_0x3ea404,_0x1d76ff]of _0x21ad30['entries']()){if(!Number['isSafeInteger'](_0x1d76ff['id'])||_0x1d76ff['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x3ea404+0x1)+_0x32c742(0x16f));if(_0x1d76ff[_0x32c742(0x180)]!==_0x153c02)throw notificationError(_0x32c742(0x16c),_0x32c742(0x1a4)+(_0x3ea404+0x1)+_0x32c742(0x169));if(_0x1d76ff[_0x32c742(0x179)]!==_0x4be26f)throw notificationError(_0x32c742(0x16c),_0x32c742(0x1a4)+(_0x3ea404+0x1)+_0x32c742(0x1a3));}}export function safeApiFailure(_0x1dbd5a,_0x2d654f,_0x3e78fe){const _0x5418a5=a181_0x4756dc;return notificationError('notification_config_'+_0x1dbd5a+'_'+(_0x2d654f===_0x5418a5(0x17b)?_0x5418a5(0x14d):_0x2d654f+_0x5418a5(0x171)),_0x5418a5(0x17e)+_0x1dbd5a+'\x20'+_0x2d654f+_0x5418a5(0x160),_0x3e78fe);}export function notificationLookupCommand(_0x4d3506,_0x2b93ac){const _0x54091b=a181_0x4756dc;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4d3506+_0x54091b(0x143)+_0x2b93ac+_0x54091b(0x1ac);}function validateNotificationDocument(_0x113162,_0x27d063){const _0x305e50=a181_0x4756dc;for(const _0x2223b7 of Object[_0x305e50(0x14f)](_0x113162)){if(FORBIDDEN_IDENTITY_FIELDS[_0x305e50(0x1a7)](_0x2223b7))throw notificationError('notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22'+_0x2223b7+_0x305e50(0x1b2));if(!ALLOWED_INPUT_FIELDS['has'](_0x2223b7))throw notificationError('notification_config_field_unknown',_0x305e50(0x1ae)+_0x2223b7+'\x22.');}if(_0x27d063==='update'&&Object[_0x305e50(0x14f)](_0x113162)[_0x305e50(0x154)]===0x0)throw notificationError('notification_config_update_empty',_0x305e50(0x178));const _0x5adc={};if(hasOwn(_0x113162,_0x305e50(0x159)))_0x5adc['configName']=validateRequiredString(_0x113162[_0x305e50(0x159)],'configName',0x80);else{if(_0x27d063===_0x305e50(0x1b9))throw notificationError('notification_config_field_required',_0x305e50(0x173)+_0x305e50(0x15f));}if(hasOwn(_0x113162,_0x305e50(0x179))){if(typeof _0x113162[_0x305e50(0x179)]!=='string')throw invalidFieldType('channelType',_0x305e50(0x16b));const _0x2a7b0e=_0x113162[_0x305e50(0x179)][_0x305e50(0x1b0)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x305e50(0x188)](_0x2a7b0e))throw notificationError(_0x305e50(0x1a6),_0x305e50(0x193),_0x305e50(0x1a8)+NOTIFICATION_CHANNEL_TYPES[_0x305e50(0x198)](',\x20')+'.');_0x5adc[_0x305e50(0x179)]=_0x2a7b0e;}else{if(_0x27d063==='create')throw notificationError('notification_config_field_required',_0x305e50(0x173)+_0x305e50(0x155));}for(const [_0x29594a,_0x52de97]of[[_0x305e50(0x18c),0x200],[_0x305e50(0x141),0x100]]){if(!hasOwn(_0x113162,_0x29594a))continue;const _0x5a6f4f=_0x113162[_0x29594a];if(_0x5a6f4f!==null&&typeof _0x5a6f4f!=='string')throw invalidFieldType(_0x29594a,_0x305e50(0x176));if(typeof _0x5a6f4f===_0x305e50(0x1ab)&&_0x5a6f4f[_0x305e50(0x154)]>_0x52de97)throw notificationError(_0x305e50(0x1a6),_0x305e50(0x191)+_0x29594a+'\x22\x20cannot\x20exceed\x20'+_0x52de97+_0x305e50(0x1aa));_0x5adc[_0x29594a]=_0x5a6f4f;}if(hasOwn(_0x113162,_0x305e50(0x199))){const _0x27b527=_0x113162[_0x305e50(0x199)];if(_0x27b527===null&&_0x27d063===_0x305e50(0x1b9))throw invalidFieldType('channelConfig',_0x305e50(0x153));if(_0x27b527!==null&&!isJsonObject(_0x27b527))throw invalidFieldType(_0x305e50(0x199),_0x27d063===_0x305e50(0x17d)?_0x305e50(0x144):_0x305e50(0x153));_0x27b527!==null&&validateChannelConfigFields(_0x5adc['channelType'],_0x27b527),_0x5adc[_0x305e50(0x199)]=_0x27b527;}for(const _0x149e15 of[_0x305e50(0x14e),_0x305e50(0x167)]){if(!hasOwn(_0x113162,_0x149e15))continue;const _0x5f2c73=_0x113162[_0x149e15];if(_0x5f2c73!==null&&(!Number['isSafeInteger'](_0x5f2c73)||_0x5f2c73<0x0))throw notificationError(_0x305e50(0x1a6),_0x305e50(0x191)+_0x149e15+_0x305e50(0x1b3));_0x5adc[_0x149e15]=_0x5f2c73;}return _0x5adc;}function validateRequiredString(_0x5a9834,_0x597bdd,_0x5c11db){const _0x422937=a181_0x4756dc;if(typeof _0x5a9834!==_0x422937(0x1ab))throw invalidFieldType(_0x597bdd,_0x422937(0x184));const _0x582834=_0x5a9834[_0x422937(0x1b0)]();if(!_0x582834)throw notificationError(_0x422937(0x1a6),_0x422937(0x191)+_0x597bdd+_0x422937(0x195));if(_0x582834[_0x422937(0x154)]>_0x5c11db)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x597bdd+'\x22\x20cannot\x20exceed\x20'+_0x5c11db+_0x422937(0x1aa));return _0x582834;}function validateChannelConfigFields(_0x5e9eea,_0x4b583e){const _0x59b003=a181_0x4756dc;if(hasOwn(_0x4b583e,_0x59b003(0x157)))throw forbiddenChannelConfigField(_0x59b003(0x157));if(_0x5e9eea===_0x59b003(0x19c))for(const _0x3af0a0 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4b583e,_0x3af0a0))throw forbiddenChannelConfigField(_0x3af0a0);}}function forbiddenChannelConfigField(_0x4a4371){const _0x3aa51b=a181_0x4756dc;return notificationError(_0x3aa51b(0x15d),_0x3aa51b(0x18b)+_0x4a4371+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x57b5da,_0x335dcf){const _0x4b65ab=a181_0x4756dc;return notificationError(_0x4b65ab(0x1a6),_0x4b65ab(0x191)+_0x57b5da+_0x4b65ab(0x162)+_0x335dcf+'.');}function serializeChannelConfig(_0x5093c5){const _0x1ba9e0=a181_0x4756dc;return _0x5093c5===null||_0x5093c5===undefined?null:JSON[_0x1ba9e0(0x177)](_0x5093c5);}function redactSensitive(_0x53804b){const _0x3df55c=a181_0x4756dc;return _0x53804b===null||_0x53804b===undefined||_0x53804b===''?null:_0x3df55c(0x181);}function requireResponseString(_0x1e3446,_0x187b32,_0x2b198c){const _0x37755a=a181_0x4756dc;if(typeof _0x1e3446!=='string'||_0x1e3446['trim']()==='')throw CliErrors[_0x37755a(0x1b7)]('Invalid\x20notification\x20config\x20response.',_0x37755a(0x19e)+(_0x2b198c+0x1)+_0x37755a(0x15c)+_0x187b32+'\x22.');return _0x1e3446['trim']();}function requireExactString(_0x3bf8a6,_0x30190c,_0x599210){const _0x36f088=a181_0x4756dc;if(typeof _0x3bf8a6!==_0x36f088(0x1ab)||_0x3bf8a6[_0x36f088(0x1b0)]()==='')throw notificationError(_0x36f088(0x16c),_0x36f088(0x17e)+_0x599210+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x30190c+'\x22.');return _0x3bf8a6[_0x36f088(0x1b0)]();}function responseNullableString(_0x4f59e2,_0x39e493,_0x55fe3c){const _0x3d641f=a181_0x4756dc;if(_0x4f59e2===undefined||_0x4f59e2===null)return null;if(typeof _0x4f59e2!==_0x3d641f(0x1ab))throw notificationError(_0x3d641f(0x16c),_0x3d641f(0x17e)+_0x55fe3c+_0x3d641f(0x14b)+_0x39e493+'\x22.');return _0x4f59e2;}function responseNullableTimeout(_0x58e849,_0x561986,_0x4341e0){const _0x53bff8=a181_0x4756dc;if(_0x58e849===undefined||_0x58e849===null)return null;if(!Number['isSafeInteger'](_0x58e849)||_0x58e849<0x0)throw notificationError(_0x53bff8(0x16c),_0x53bff8(0x17e)+_0x4341e0+_0x53bff8(0x14b)+_0x561986+'\x22.');return _0x58e849;}function normalizeNullableString(_0x19c8c5){const _0x85958c=a181_0x4756dc;return typeof _0x19c8c5===_0x85958c(0x1ab)?_0x19c8c5:null;}function isJsonObject(_0xeafb7a){const _0x961894=a181_0x4756dc;return _0xeafb7a!==null&&typeof _0xeafb7a==='object'&&!Array[_0x961894(0x168)](_0xeafb7a);}function hasOwn(_0x4a6e36,_0x6a76c){const _0x4106bc=a181_0x4756dc;return Object[_0x4106bc(0x1a1)][_0x4106bc(0x192)][_0x4106bc(0x15a)](_0x4a6e36,_0x6a76c);}async function readStdin(){const _0x287e58=a181_0x4756dc;let _0x52cac3='';process[_0x287e58(0x145)][_0x287e58(0x1af)](_0x287e58(0x1a0));for await(const _0x2d645b of process[_0x287e58(0x145)])_0x52cac3+=_0x2d645b;return _0x52cac3;}
@@ -1 +1 @@
1
- const a182_0xd608ea=a182_0x172c;(function(_0x1dfe89,_0x306ebd){const _0x15d6f0=a182_0x172c,_0x5886f8=_0x1dfe89();while(!![]){try{const _0x310c5b=-parseInt(_0x15d6f0(0x19a))/0x1+-parseInt(_0x15d6f0(0x1a3))/0x2+-parseInt(_0x15d6f0(0x197))/0x3+parseInt(_0x15d6f0(0x198))/0x4*(-parseInt(_0x15d6f0(0x194))/0x5)+-parseInt(_0x15d6f0(0x189))/0x6+-parseInt(_0x15d6f0(0x1a5))/0x7*(parseInt(_0x15d6f0(0x182))/0x8)+-parseInt(_0x15d6f0(0x1a9))/0x9*(-parseInt(_0x15d6f0(0x193))/0xa);if(_0x310c5b===_0x306ebd)break;else _0x5886f8['push'](_0x5886f8['shift']());}catch(_0x5a44fd){_0x5886f8['push'](_0x5886f8['shift']());}}}(a182_0x1d2c,0x35c93));function a182_0x1d2c(){const _0xe3f113=['invoice','File\x20URL\x20response\x20missing\x20fileUrl.','imageFile','string','filePath','form','8uacDpm','Publicly\x20accessible\x20image\x20or\x20file\x20URL','read','Preview:\x20recognize\x20','imageUrl','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','\x20OCR\x20from\x20URL','1596756deKZFV','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','general','image-url','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Table','\x20OCR','toLowerCase','validation','IdCard','991110uxSXIt','199485EbblyO','idcard','image-file','514641Geklnm','24ABNwPM','idCard','10343mHuDTK','/smartapi/ocr/recognize-text','File\x20upload\x20response\x20missing\x20filePath.','recognize','toString','Invoice','.\x20Supported\x20scenes:\x20','POST','ocr','82564ZeYRZP','str','988638FlMmtq','apiError','count','/smartapi/common/queryFileUrl','99wqUhtH','GET','appCode','trim','filter','scene'];a182_0x1d2c=function(){return _0xe3f113;};return a182_0x1d2c();}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=[a182_0xd608ea(0x1af),a182_0xd608ea(0x18b),'form',a182_0xd608ea(0x199)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0xd608ea(0x19f),'general':'General','form':a182_0xd608ea(0x18e),'idCard':a182_0xd608ea(0x192)},SCENE_FLAG={'name':a182_0xd608ea(0x1ae),'type':a182_0xd608ea(0x1b2),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':'image-file','type':'string','description':a182_0xd608ea(0x18d)},IMAGE_URL_FLAG={'name':a182_0xd608ea(0x18c),'type':a182_0xd608ea(0x1b2),'description':a182_0xd608ea(0x183)};function a182_0x172c(_0x4b4331,_0x382ac7){_0x4b4331=_0x4b4331-0x181;const _0x1d2c5c=a182_0x1d2c();let _0x172c18=_0x1d2c5c[_0x4b4331];return _0x172c18;}function normalizeScene(_0x9fce6d){const _0xc016ca=a182_0xd608ea,_0x47c6b2=_0x9fce6d['trim']()[_0xc016ca(0x190)]();if(_0x47c6b2===_0xc016ca(0x195))return _0xc016ca(0x199);if(_0x47c6b2==='invoice'||_0x47c6b2===_0xc016ca(0x18b)||_0x47c6b2===_0xc016ca(0x181))return _0x47c6b2;throw CliErrors[_0xc016ca(0x191)]('Unsupported\x20OCR\x20scene:\x20'+_0x9fce6d+_0xc016ca(0x1a0)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x4afed7){const _0x259670=a182_0xd608ea,_0x1e3f8e=_0x4afed7[_0x259670(0x1a4)](_0x259670(0x196))['trim'](),_0x37bbdd=_0x4afed7[_0x259670(0x1a4)](_0x259670(0x18c))[_0x259670(0x1ac)]();return{'imageFile':_0x1e3f8e,'imageUrl':_0x37bbdd,'count':[_0x1e3f8e,_0x37bbdd][_0x259670(0x1ad)](Boolean)['length']};}function validateInputSelection(_0x4dd2b0){const _0x22c2e7=a182_0xd608ea,_0x1d614d=selectedInputs(_0x4dd2b0);if(_0x1d614d[_0x22c2e7(0x1a7)]!==0x1)throw CliErrors[_0x22c2e7(0x191)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x1d614d;}function withScene(_0x5d9df0,_0x6c57af,_0x164f9b){return{..._0x5d9df0,'scene':_0x6c57af,..._0x164f9b?{'sourceFile':{'fileName':_0x164f9b['fileName'],'filePath':_0x164f9b['filePath']}}:{}};}const ocrRecognize={'service':a182_0xd608ea(0x1a2),'command':a182_0xd608ea(0x19d),'description':a182_0xd608ea(0x187),'risk':a182_0xd608ea(0x184),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x1ad8b6){const _0x4009d8=a182_0xd608ea,_0x5bed8f=normalizeScene(_0x1ad8b6[_0x4009d8(0x1a4)](_0x4009d8(0x1ae))),_0x4c3ba6=SCENE_TO_LEGACY_TYPE[_0x5bed8f],_0x35360e=validateInputSelection(_0x1ad8b6);if(_0x35360e[_0x4009d8(0x186)]){const _0x40ea4c=new URLSearchParams({'url':_0x35360e[_0x4009d8(0x186)],'type':_0x4c3ba6,'appCode':_0x1ad8b6[_0x4009d8(0x1ab)]});return{'method':_0x4009d8(0x1aa),'url':'/smartapi/ocr/recognize-text?'+_0x40ea4c[_0x4009d8(0x19e)](),'description':_0x4009d8(0x185)+_0x5bed8f+_0x4009d8(0x188)};}const _0x48771e=requireDevelopmentUploadFile(_0x35360e[_0x4009d8(0x1b1)],_0x4009d8(0x196));return{'method':_0x4009d8(0x1a1),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x4009d8(0x1a1),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x1ad8b6[_0x4009d8(0x1ab)],'multipart':{'file':_0x48771e}}},{'method':_0x4009d8(0x1a1),'url':_0x4009d8(0x1a8),'body':{'filePath':_0x4009d8(0x18a),'downloadFlag':![]}},{'method':_0x4009d8(0x1aa),'url':_0x4009d8(0x19b),'query':{'appCode':_0x1ad8b6[_0x4009d8(0x1ab)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x4c3ba6}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x5bed8f+_0x4009d8(0x18f)};},async 'execute'(_0x5450bf){const _0x29fe34=a182_0xd608ea,_0x415f86=normalizeScene(_0x5450bf[_0x29fe34(0x1a4)](_0x29fe34(0x1ae))),_0x683fbb=SCENE_TO_LEGACY_TYPE[_0x415f86],_0xed748a=validateInputSelection(_0x5450bf);if(_0xed748a[_0x29fe34(0x186)]){const _0x4ae31c=await recognizeDevelopmentOcr(_0x5450bf['appCode'],{'url':_0xed748a[_0x29fe34(0x186)],'type':_0x683fbb});return{'ok':!![],'data':withScene(_0x4ae31c,_0x415f86)};}const _0x4cc426=requireDevelopmentUploadFile(_0xed748a[_0x29fe34(0x1b1)],_0x29fe34(0x196)),_0x48bcf3=await uploadDevelopmentFile(_0x5450bf[_0x29fe34(0x1ab)],_0x4cc426['path']);if(!_0x48bcf3[_0x29fe34(0x1b3)])throw CliErrors[_0x29fe34(0x1a6)](_0x29fe34(0x19c));const _0x6b3267=await queryDevelopmentFileUrl(_0x48bcf3['filePath'],{'download':![]});if(!_0x6b3267['fileUrl'])throw CliErrors['apiError'](_0x29fe34(0x1b0));const _0x3d41b1=await recognizeDevelopmentOcr(_0x5450bf[_0x29fe34(0x1ab)],{'url':_0x6b3267['fileUrl'],'type':_0x683fbb});return{'ok':!![],'data':withScene(_0x3d41b1,_0x415f86,_0x48bcf3)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a182_0xf68e9e=a182_0x2cf5;(function(_0x187594,_0x5f4971){const _0x8e8905=a182_0x2cf5,_0x2058e9=_0x187594();while(!![]){try{const _0x416926=parseInt(_0x8e8905(0x1d2))/0x1*(parseInt(_0x8e8905(0x1cf))/0x2)+parseInt(_0x8e8905(0x1fb))/0x3+-parseInt(_0x8e8905(0x1e6))/0x4+-parseInt(_0x8e8905(0x1d0))/0x5*(parseInt(_0x8e8905(0x1e0))/0x6)+-parseInt(_0x8e8905(0x1de))/0x7+parseInt(_0x8e8905(0x1cb))/0x8*(-parseInt(_0x8e8905(0x1e4))/0x9)+parseInt(_0x8e8905(0x1f0))/0xa*(parseInt(_0x8e8905(0x1f9))/0xb);if(_0x416926===_0x5f4971)break;else _0x2058e9['push'](_0x2058e9['shift']());}catch(_0x2f4df5){_0x2058e9['push'](_0x2058e9['shift']());}}}(a182_0x2b38,0x62b12));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a182_0x2b38(){const _0x3804ad=['.\x20Supported\x20scenes:\x20','str','string','idCard','55JyZVVi','Table','398394bCLOqa','imageUrl','\x20OCR\x20from\x20URL','validation','path','fileUrl','1036496wvCjsc','join','trim','/smartapi/common/queryFileUrl','169282bBLqqG','430545VRHQnD','Invoice','8PuItjU','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','length','\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','imageFile','recognize','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','Publicly\x20accessible\x20image\x20or\x20file\x20URL','idcard','File\x20URL\x20response\x20missing\x20fileUrl.','filter','3168830MRpnPP','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','36veiuKZ','POST','/smartapi/ocr/recognize-text?','scene','54LgtPoP','invoice','1263632ZYBlAZ','filePath','/smartapi/ocr/recognize-text','appCode','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','IdCard','toString','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','apiError','3313880FpoOsN','Unsupported\x20OCR\x20scene:\x20','/smartapi/common/uploadFile','image-file','count'];a182_0x2b38=function(){return _0x3804ad;};return a182_0x2b38();}const SUPPORTED_SCENES=['invoice','general','form',a182_0xf68e9e(0x1f8)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0xf68e9e(0x1d1),'general':'General','form':a182_0xf68e9e(0x1fa),'idCard':a182_0xf68e9e(0x1ec)},SCENE_FLAG={'name':a182_0xf68e9e(0x1e3),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0xf68e9e(0x1df)},IMAGE_FILE_FLAG={'name':'image-file','type':'string','description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':a182_0xf68e9e(0x1f7),'description':a182_0xf68e9e(0x1da)};function normalizeScene(_0x58ea1e){const _0x56365a=a182_0xf68e9e,_0x3f168a=_0x58ea1e[_0x56365a(0x1cd)]()['toLowerCase']();if(_0x3f168a===_0x56365a(0x1db))return'idCard';if(_0x3f168a===_0x56365a(0x1e5)||_0x3f168a==='general'||_0x3f168a==='form')return _0x3f168a;throw CliErrors['validation'](_0x56365a(0x1f1)+_0x58ea1e+_0x56365a(0x1f5)+SUPPORTED_SCENES[_0x56365a(0x1cc)](',\x20'));}function selectedInputs(_0x1432b4){const _0x567b75=a182_0xf68e9e,_0x513ece=_0x1432b4[_0x567b75(0x1f6)](_0x567b75(0x1f3))[_0x567b75(0x1cd)](),_0x3ffce3=_0x1432b4[_0x567b75(0x1f6)]('image-url')['trim']();return{'imageFile':_0x513ece,'imageUrl':_0x3ffce3,'count':[_0x513ece,_0x3ffce3][_0x567b75(0x1dd)](Boolean)[_0x567b75(0x1d4)]};}function validateInputSelection(_0x30f41b){const _0x548cad=a182_0xf68e9e,_0x118153=selectedInputs(_0x30f41b);if(_0x118153[_0x548cad(0x1f4)]!==0x1)throw CliErrors[_0x548cad(0x1fe)](_0x548cad(0x1d9));return _0x118153;}function withScene(_0x1dca17,_0x29ae69,_0x5b20a){const _0x9e58fe=a182_0xf68e9e;return{..._0x1dca17,'scene':_0x29ae69,..._0x5b20a?{'sourceFile':{'fileName':_0x5b20a['fileName'],'filePath':_0x5b20a[_0x9e58fe(0x1e7)]}}:{}};}const ocrRecognize={'service':'ocr','command':a182_0xf68e9e(0x1d8),'description':a182_0xf68e9e(0x1ea),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x33fb74){const _0x5ebebc=a182_0xf68e9e,_0x478ad7=normalizeScene(_0x33fb74[_0x5ebebc(0x1f6)](_0x5ebebc(0x1e3))),_0xcbb81=SCENE_TO_LEGACY_TYPE[_0x478ad7],_0x34b297=validateInputSelection(_0x33fb74);if(_0x34b297[_0x5ebebc(0x1fc)]){const _0x3b2ad2=new URLSearchParams({'url':_0x34b297['imageUrl'],'type':_0xcbb81,'appCode':_0x33fb74[_0x5ebebc(0x1e9)]});return{'method':'GET','url':_0x5ebebc(0x1e2)+_0x3b2ad2[_0x5ebebc(0x1ed)](),'description':'Preview:\x20recognize\x20'+_0x478ad7+_0x5ebebc(0x1fd)};}const _0x3b44c4=requireDevelopmentUploadFile(_0x34b297[_0x5ebebc(0x1d7)],_0x5ebebc(0x1f3));return{'method':_0x5ebebc(0x1e1),'url':_0x5ebebc(0x1f2),'body':{'steps':[{'method':_0x5ebebc(0x1e1),'url':_0x5ebebc(0x1f2),'body':{'appCode':_0x33fb74['appCode'],'multipart':{'file':_0x3b44c4}}},{'method':_0x5ebebc(0x1e1),'url':_0x5ebebc(0x1ce),'body':{'filePath':_0x5ebebc(0x1ee),'downloadFlag':![]}},{'method':'GET','url':_0x5ebebc(0x1e8),'query':{'appCode':_0x33fb74[_0x5ebebc(0x1e9)],'url':_0x5ebebc(0x1d3),'type':_0xcbb81}}]},'description':_0x5ebebc(0x1eb)+_0x478ad7+_0x5ebebc(0x1d5)};},async 'execute'(_0x29b308){const _0x5e64bf=a182_0xf68e9e,_0x489406=normalizeScene(_0x29b308['str'](_0x5e64bf(0x1e3))),_0x10dd26=SCENE_TO_LEGACY_TYPE[_0x489406],_0x34c257=validateInputSelection(_0x29b308);if(_0x34c257[_0x5e64bf(0x1fc)]){const _0x42852e=await recognizeDevelopmentOcr(_0x29b308[_0x5e64bf(0x1e9)],{'url':_0x34c257[_0x5e64bf(0x1fc)],'type':_0x10dd26});return{'ok':!![],'data':withScene(_0x42852e,_0x489406)};}const _0x4d4982=requireDevelopmentUploadFile(_0x34c257[_0x5e64bf(0x1d7)],_0x5e64bf(0x1f3)),_0x155e43=await uploadDevelopmentFile(_0x29b308[_0x5e64bf(0x1e9)],_0x4d4982[_0x5e64bf(0x1ff)]);if(!_0x155e43[_0x5e64bf(0x1e7)])throw CliErrors[_0x5e64bf(0x1ef)](_0x5e64bf(0x1d6));const _0x29724d=await queryDevelopmentFileUrl(_0x155e43[_0x5e64bf(0x1e7)],{'download':![]});if(!_0x29724d[_0x5e64bf(0x1ca)])throw CliErrors['apiError'](_0x5e64bf(0x1dc));const _0x4fe776=await recognizeDevelopmentOcr(_0x29b308[_0x5e64bf(0x1e9)],{'url':_0x29724d[_0x5e64bf(0x1ca)],'type':_0x10dd26});return{'ok':!![],'data':withScene(_0x4fe776,_0x489406,_0x155e43)};}};function a182_0x2cf5(_0x32594a,_0x342e65){_0x32594a=_0x32594a-0x1ca;const _0x2b38de=a182_0x2b38();let _0x2cf565=_0x2b38de[_0x32594a];return _0x2cf565;}export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a183_0x221d5b=a183_0x470f;function a183_0x470f(_0x4da94a,_0x4c189c){_0x4da94a=_0x4da94a-0x96;const _0x197830=a183_0x1978();let _0x470fc2=_0x197830[_0x4da94a];return _0x470fc2;}(function(_0x28a359,_0x428b77){const _0x9553bd=a183_0x470f,_0x31b414=_0x28a359();while(!![]){try{const _0x420216=parseInt(_0x9553bd(0xbd))/0x1*(parseInt(_0x9553bd(0xbe))/0x2)+parseInt(_0x9553bd(0x9f))/0x3*(-parseInt(_0x9553bd(0xb6))/0x4)+-parseInt(_0x9553bd(0xcb))/0x5*(-parseInt(_0x9553bd(0xa0))/0x6)+-parseInt(_0x9553bd(0xb5))/0x7*(parseInt(_0x9553bd(0xaa))/0x8)+parseInt(_0x9553bd(0xaf))/0x9*(-parseInt(_0x9553bd(0xd6))/0xa)+-parseInt(_0x9553bd(0xa1))/0xb+-parseInt(_0x9553bd(0x99))/0xc*(-parseInt(_0x9553bd(0xc6))/0xd);if(_0x420216===_0x428b77)break;else _0x31b414['push'](_0x31b414['shift']());}catch(_0x3f71c6){_0x31b414['push'](_0x31b414['shift']());}}}(a183_0x1978,0xf3441));function a183_0x1978(){const _0x304045=['page\x20create\x20does\x20not\x20accept\x20--page-type.','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','157272SdBacd','menuId','menuPath','Custom\x20Page\x20pattern\x20not\x20found:\x20','POST','Would\x20create\x20Custom\x20Page\x20','57nEtBGm','409002TsQAhI','2767677HqfOsK','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','name','page-type','compress','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','BLANK','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','stringify','7000oucMet','version','trim','page','parent-menu-id','10849149IMpZUn','isNaN','validation','apiError','../../../templates/custom-pages','parentMenuId','12761tGOvXU','144712DRxyKg','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','files','page.create','page-pattern','parse','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','7357cnUnVp','138qkeYLV','Created\x20Custom\x20Page\x20','CUSTOM','includes','values','string','pageName','Custom_page_','2639bOtxhH','pageId','some','isInteger','isArray','115NGqQXz','length','number','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','keys','DASHBOARD','toLowerCase','Invalid\x20Custom\x20Page\x20pattern:\x20','utf8','appCode','createMenu','10bcMOKL','page-dir','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','\x20and\x20its\x20menu\x20entry.','str','num','page-content'];a183_0x1978=function(){return _0x304045;};return a183_0x1978();}import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x221d5b(0xa7),'ONEPAGE',a183_0x221d5b(0xd0)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a183_0x221d5b(0xb3));export const pageCreate={'service':a183_0x221d5b(0xad),'command':'create','description':a183_0x221d5b(0xa2),'risk':'write','defaultOutputFormat':a183_0x221d5b(0xa5),'structuredErrors':!![],'rejectedFlags':[{'name':a183_0x221d5b(0xa4),'message':a183_0x221d5b(0x97),'hint':a183_0x221d5b(0xb7)},{'name':a183_0x221d5b(0x96),'message':a183_0x221d5b(0x98),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a183_0x221d5b(0xa3),'type':'string','description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a183_0x221d5b(0xae),'type':a183_0x221d5b(0xcd),'description':a183_0x221d5b(0xda)},{'name':a183_0x221d5b(0xba),'type':a183_0x221d5b(0xc3),'description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x221d5b(0xd7),'type':'string','description':a183_0x221d5b(0xce)},APPCODE_FLAG],async 'validate'(_0x5ab360){await readValidatedPageSource(_0x5ab360);},async 'dryRun'(_0x2e76a4){const _0x49dc06=a183_0x221d5b,_0x219412=readInput(_0x2e76a4,await readValidatedPageSource(_0x2e76a4));return{'method':_0x49dc06(0x9d),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x219412[_0x49dc06(0xd4)],'pageName':_0x219412[_0x49dc06(0xc4)],..._0x219412['parentMenuId']!=null?{'parentMenuId':_0x219412[_0x49dc06(0xb4)]}:{},'createMenu':_0x219412[_0x49dc06(0xd5)],'codeContent':_0x219412[_0x49dc06(0xb8)]},'description':_0x49dc06(0x9e)+JSON[_0x49dc06(0xa9)](_0x219412[_0x49dc06(0xc4)])+_0x49dc06(0xdb)};},async 'execute'(_0x16d06a){const _0x1fd2c3=a183_0x221d5b,_0x36a9c0=readInput(_0x16d06a,await readValidatedPageSource(_0x16d06a)),_0x9e2e96=await createCustomPage(_0x36a9c0);if(!Number[_0x1fd2c3(0xc9)](_0x9e2e96[_0x1fd2c3(0xc7)])||_0x9e2e96[_0x1fd2c3(0xc7)]<=0x0)throw CliErrors[_0x1fd2c3(0xb2)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x395692=buildCustomPageDevelopmentUrl(_0x36a9c0[_0x1fd2c3(0xd4)],_0x9e2e96[_0x1fd2c3(0x9b)]),_0xdac3da=buildCustomPageEditUrl(_0x36a9c0[_0x1fd2c3(0xd4)],_0x9e2e96[_0x1fd2c3(0xc7)]);return{'ok':!![],'data':{'operation':_0x1fd2c3(0xb9),'pageType':_0x1fd2c3(0xc0),'pagePattern':readPagePattern(_0x16d06a),'selector':{'appCode':_0x36a9c0[_0x1fd2c3(0xd4)],'pageName':_0x36a9c0[_0x1fd2c3(0xc4)]},'before':null,'after':{'pageId':_0x9e2e96[_0x1fd2c3(0xc7)],'pageName':_0x9e2e96[_0x1fd2c3(0xc4)],'appCode':_0x9e2e96[_0x1fd2c3(0xd4)],'version':_0x9e2e96[_0x1fd2c3(0xab)],'menuId':_0x9e2e96[_0x1fd2c3(0x9a)],'menuPath':_0x9e2e96[_0x1fd2c3(0x9b)],'files':_0x9e2e96['files']??Object[_0x1fd2c3(0xcf)](_0x36a9c0[_0x1fd2c3(0xb8)])},'dryRun':![],'request':_0x36a9c0,..._0x395692?{'pageUrl':_0x395692}:{},..._0xdac3da?{'editPageUrl':_0xdac3da}:{},'warnings':_0x395692?[]:[_0x1fd2c3(0xd8)]},'message':_0x1fd2c3(0xbf)+_0x9e2e96[_0x1fd2c3(0xc7)]+'.'};}};function readPagePattern(_0x1fcc4d){const _0x275c8f=a183_0x221d5b,_0x317942=_0x1fcc4d[_0x275c8f(0xdc)](_0x275c8f(0xba))[_0x275c8f(0xac)](),_0x548306=_0x1fcc4d['str'](_0x275c8f(0xd7))['trim']();if(_0x317942&&_0x548306)throw CliErrors[_0x275c8f(0xb1)](_0x275c8f(0xa6));if(_0x548306)return null;if(!_0x317942)throw CliErrors['validation']('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x275c8f(0xc1)](_0x317942))throw CliErrors[_0x275c8f(0xb1)](_0x275c8f(0xd9));return _0x317942;}async function readPageSource(_0x30c23d){const _0x372717=a183_0x221d5b,_0x4ae277=_0x30c23d[_0x372717(0xdc)]('page-dir')[_0x372717(0xac)](),_0x451c5e=readPagePattern(_0x30c23d);if(_0x451c5e===null){const _0x266485=await readCustomPageDirectory(_0x4ae277);if(Object['keys'](_0x266485)[_0x372717(0xcc)]===0x0)throw CliErrors[_0x372717(0xb1)](_0x372717(0xbc));return _0x266485;}let _0x123cde;try{_0x123cde=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x451c5e[_0x372717(0xd1)]()+'.json'),_0x372717(0xd3));}catch{throw CliErrors['validation'](_0x372717(0x9c)+_0x451c5e+'.');}let _0x2c76f7;try{_0x2c76f7=JSON[_0x372717(0xbb)](_0x123cde);}catch{throw CliErrors['validation'](_0x372717(0xd2)+_0x451c5e+'.');}if(!_0x2c76f7||typeof _0x2c76f7!=='object'||Array[_0x372717(0xca)](_0x2c76f7)||Object[_0x372717(0xc2)](_0x2c76f7)[_0x372717(0xc8)](_0x48a50d=>typeof _0x48a50d!==_0x372717(0xc3)))throw CliErrors[_0x372717(0xb1)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x451c5e+'.');return _0x2c76f7;}async function readValidatedPageSource(_0x5378e0){const _0x3cd347=await readPageSource(_0x5378e0);return await validateCustomPageContent(_0x3cd347),_0x3cd347;}function readInput(_0x4f7748,_0x469eb9){const _0x2cd22b=a183_0x221d5b,_0x300ae4=_0x4f7748[_0x2cd22b(0xdc)]('name')['trim']()||_0x2cd22b(0xc5)+Date['now']();if(_0x300ae4[_0x2cd22b(0xcc)]>0x64)throw CliErrors[_0x2cd22b(0xb1)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x2bc224=_0x4f7748[_0x2cd22b(0xdd)](_0x2cd22b(0xae),NaN),_0x4c0ae1=!Number[_0x2cd22b(0xb0)](_0x2bc224);if(_0x4c0ae1&&(!Number[_0x2cd22b(0xc9)](_0x2bc224)||_0x2bc224<=0x0))throw CliErrors[_0x2cd22b(0xb1)](_0x2cd22b(0xa8));return{'appCode':_0x4f7748[_0x2cd22b(0xd4)],'pageName':_0x300ae4,..._0x4c0ae1?{'parentMenuId':_0x2bc224}:{},'createMenu':!![],'files':_0x469eb9};}
1
+ function a183_0x13ad(){const _0x41d1c4=['trim','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','object','6kAbLlh','page-type','3607051FOQpPt','.json','isInteger','page-dir','3288900VvNyqh','1120gVEUFb','248767czzWEN','page\x20create\x20does\x20not\x20accept\x20--page-type.','utf8','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','pageName\x20cannot\x20exceed\x20100\x20characters.','string','isArray','menuId','createMenu','length','parse','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','validation','page-pattern','page.create','pageId','8kdGQik','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','keys','BLANK','DASHBOARD','Custom_page_','CUSTOM','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page-content','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','\x20and\x20its\x20menu\x20entry.','compress','13740GpABTX','/smartapi/webcode/page/create','Custom\x20Page\x20pattern\x20not\x20found:\x20','15660Dfdygi','files','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','appCode','pageName','str','create','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','menuPath','some','4230495ZwuJaG','2959seXTCD','stringify','4852728rvwxff','POST','parentMenuId','Invalid\x20Custom\x20Page\x20pattern:\x20','num','page','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','write','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','parent-menu-id','values','isNaN','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.'];a183_0x13ad=function(){return _0x41d1c4;};return a183_0x13ad();}const a183_0x21dfac=a183_0x337e;(function(_0x5369a9,_0x361d5a){const _0x66f513=a183_0x337e,_0x137a9a=_0x5369a9();while(!![]){try{const _0x3d3d5e=-parseInt(_0x66f513(0xeb))/0x1*(-parseInt(_0x66f513(0xe3))/0x2)+-parseInt(_0x66f513(0xe9))/0x3+parseInt(_0x66f513(0x118))/0x4+parseInt(_0x66f513(0xea))/0x5*(-parseInt(_0x66f513(0x10a))/0x6)+-parseInt(_0x66f513(0xe5))/0x7*(-parseInt(_0x66f513(0xfb))/0x8)+-parseInt(_0x66f513(0x115))/0x9+parseInt(_0x66f513(0x107))/0xa*(parseInt(_0x66f513(0x116))/0xb);if(_0x3d3d5e===_0x361d5a)break;else _0x137a9a['push'](_0x137a9a['shift']());}catch(_0x5ef4ff){_0x137a9a['push'](_0x137a9a['shift']());}}}(a183_0x13ad,0xa948b));import{readFile}from'node:fs/promises';function a183_0x337e(_0x21f307,_0x2b736f){_0x21f307=_0x21f307-0xd4;const _0x13adcc=a183_0x13ad();let _0x337ee1=_0x13adcc[_0x21f307];return _0x337ee1;}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x21dfac(0xfe),'ONEPAGE',a183_0x21dfac(0xff)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':a183_0x21dfac(0xd7),'command':a183_0x21dfac(0x111),'description':a183_0x21dfac(0xee),'risk':a183_0x21dfac(0xd9),'defaultOutputFormat':a183_0x21dfac(0x106),'structuredErrors':!![],'rejectedFlags':[{'name':a183_0x21dfac(0xe4),'message':a183_0x21dfac(0xec),'hint':a183_0x21dfac(0xe1)},{'name':a183_0x21dfac(0x103),'message':a183_0x21dfac(0x10d),'hint':a183_0x21dfac(0x104)}],'flags':[{'name':'name','type':a183_0x21dfac(0xf0),'description':a183_0x21dfac(0xf6)},{'name':a183_0x21dfac(0xdb),'type':'number','description':a183_0x21dfac(0x102)},{'name':a183_0x21dfac(0xf8),'type':a183_0x21dfac(0xf0),'description':a183_0x21dfac(0x10c),'enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x21dfac(0xe8),'type':a183_0x21dfac(0xf0),'description':a183_0x21dfac(0xe0)},APPCODE_FLAG],async 'validate'(_0x471b13){await readValidatedPageSource(_0x471b13);},async 'dryRun'(_0x2a386d){const _0x2f2a2e=a183_0x21dfac,_0x3f42db=readInput(_0x2a386d,await readValidatedPageSource(_0x2a386d));return{'method':_0x2f2a2e(0x119),'url':_0x2f2a2e(0x108),'body':{'appCode':_0x3f42db[_0x2f2a2e(0x10e)],'pageName':_0x3f42db[_0x2f2a2e(0x10f)],..._0x3f42db[_0x2f2a2e(0xd4)]!=null?{'parentMenuId':_0x3f42db['parentMenuId']}:{},'createMenu':_0x3f42db[_0x2f2a2e(0xf3)],'codeContent':_0x3f42db[_0x2f2a2e(0x10b)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x2f2a2e(0x117)](_0x3f42db[_0x2f2a2e(0x10f)])+_0x2f2a2e(0x105)};},async 'execute'(_0x474969){const _0x372772=a183_0x21dfac,_0x514dcd=readInput(_0x474969,await readValidatedPageSource(_0x474969)),_0x318fdd=await createCustomPage(_0x514dcd);if(!Number['isInteger'](_0x318fdd[_0x372772(0xfa)])||_0x318fdd[_0x372772(0xfa)]<=0x0)throw CliErrors['apiError'](_0x372772(0x112));const _0x3c1d87=buildCustomPageDevelopmentUrl(_0x514dcd[_0x372772(0x10e)],_0x318fdd[_0x372772(0x113)]),_0x46def2=buildCustomPageEditUrl(_0x514dcd['appCode'],_0x318fdd[_0x372772(0xfa)]);return{'ok':!![],'data':{'operation':_0x372772(0xf9),'pageType':_0x372772(0x101),'pagePattern':readPagePattern(_0x474969),'selector':{'appCode':_0x514dcd[_0x372772(0x10e)],'pageName':_0x514dcd[_0x372772(0x10f)]},'before':null,'after':{'pageId':_0x318fdd[_0x372772(0xfa)],'pageName':_0x318fdd['pageName'],'appCode':_0x318fdd[_0x372772(0x10e)],'version':_0x318fdd['version'],'menuId':_0x318fdd[_0x372772(0xf2)],'menuPath':_0x318fdd[_0x372772(0x113)],'files':_0x318fdd['files']??Object[_0x372772(0xfd)](_0x514dcd['files'])},'dryRun':![],'request':_0x514dcd,..._0x3c1d87?{'pageUrl':_0x3c1d87}:{},..._0x46def2?{'editPageUrl':_0x46def2}:{},'warnings':_0x3c1d87?[]:[_0x372772(0xfc)]},'message':'Created\x20Custom\x20Page\x20'+_0x318fdd['pageId']+'.'};}};function readPagePattern(_0x5525e7){const _0x1d445=a183_0x21dfac,_0x4c3dca=_0x5525e7[_0x1d445(0x110)]('page-pattern')[_0x1d445(0xdf)](),_0x3ec625=_0x5525e7[_0x1d445(0x110)](_0x1d445(0xe8))[_0x1d445(0xdf)]();if(_0x4c3dca&&_0x3ec625)throw CliErrors[_0x1d445(0xf7)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x3ec625)return null;if(!_0x4c3dca)throw CliErrors[_0x1d445(0xf7)](_0x1d445(0xd8));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x4c3dca))throw CliErrors[_0x1d445(0xf7)](_0x1d445(0xde));return _0x4c3dca;}async function readPageSource(_0x58c01b){const _0x5001f1=a183_0x21dfac,_0x384f00=_0x58c01b[_0x5001f1(0x110)](_0x5001f1(0xe8))[_0x5001f1(0xdf)](),_0x51ad12=readPagePattern(_0x58c01b);if(_0x51ad12===null){const _0x4b9002=await readCustomPageDirectory(_0x384f00);if(Object['keys'](_0x4b9002)[_0x5001f1(0xf4)]===0x0)throw CliErrors[_0x5001f1(0xf7)](_0x5001f1(0xda));return _0x4b9002;}let _0x5c3ff4;try{_0x5c3ff4=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x51ad12['toLowerCase']()+_0x5001f1(0xe6)),_0x5001f1(0xed));}catch{throw CliErrors[_0x5001f1(0xf7)](_0x5001f1(0x109)+_0x51ad12+'.');}let _0xeb00e;try{_0xeb00e=JSON[_0x5001f1(0xf5)](_0x5c3ff4);}catch{throw CliErrors[_0x5001f1(0xf7)](_0x5001f1(0xd5)+_0x51ad12+'.');}if(!_0xeb00e||typeof _0xeb00e!==_0x5001f1(0xe2)||Array[_0x5001f1(0xf1)](_0xeb00e)||Object[_0x5001f1(0xdc)](_0xeb00e)[_0x5001f1(0x114)](_0x463b12=>typeof _0x463b12!==_0x5001f1(0xf0)))throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x51ad12+'.');return _0xeb00e;}async function readValidatedPageSource(_0x5747ce){const _0x4e5b76=await readPageSource(_0x5747ce);return await validateCustomPageContent(_0x4e5b76),_0x4e5b76;}function readInput(_0x205049,_0x4c0ee2){const _0x494483=a183_0x21dfac,_0x462500=_0x205049[_0x494483(0x110)]('name')[_0x494483(0xdf)]()||_0x494483(0x100)+Date['now']();if(_0x462500[_0x494483(0xf4)]>0x64)throw CliErrors['validation'](_0x494483(0xef));const _0x10774a=_0x205049[_0x494483(0xd6)](_0x494483(0xdb),NaN),_0x667b62=!Number[_0x494483(0xdd)](_0x10774a);if(_0x667b62&&(!Number[_0x494483(0xe7)](_0x10774a)||_0x10774a<=0x0))throw CliErrors[_0x494483(0xf7)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x205049[_0x494483(0x10e)],'pageName':_0x462500,..._0x667b62?{'parentMenuId':_0x10774a}:{},'createMenu':!![],'files':_0x4c0ee2};}
@@ -1 +1 @@
1
- const a184_0x12f7e5=a184_0x9cf2;(function(_0x403c95,_0x514bae){const _0x361f1c=a184_0x9cf2,_0x45fd33=_0x403c95();while(!![]){try{const _0x20a7c5=-parseInt(_0x361f1c(0xe3))/0x1*(-parseInt(_0x361f1c(0xdd))/0x2)+parseInt(_0x361f1c(0xcc))/0x3+parseInt(_0x361f1c(0xde))/0x4*(-parseInt(_0x361f1c(0xcf))/0x5)+parseInt(_0x361f1c(0xe1))/0x6*(-parseInt(_0x361f1c(0xd7))/0x7)+-parseInt(_0x361f1c(0xcb))/0x8+parseInt(_0x361f1c(0xd5))/0x9+parseInt(_0x361f1c(0xe4))/0xa*(parseInt(_0x361f1c(0xd0))/0xb);if(_0x20a7c5===_0x514bae)break;else _0x45fd33['push'](_0x45fd33['shift']());}catch(_0x2d3ead){_0x45fd33['push'](_0x45fd33['shift']());}}}(a184_0x2d50,0xa7693));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a184_0x12f7e5(0xd1),'command':a184_0x12f7e5(0xe7),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a184_0x12f7e5(0xe5),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a184_0x12f7e5(0xce)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x15347b){readCustomPageId(_0x15347b);},async 'execute'(_0xfcf373){const _0x1d3ed9=a184_0x12f7e5,_0x552e76=readCustomPageId(_0xfcf373),_0x3b2352=await getCustomPageSource(_0x552e76),{bundle:_0x1c1e16,createTime:_0x288db6,updateTime:_0x41da49,..._0x30f3f7}=_0x3b2352,_0x38293b=_0x3b2352['id']??_0x552e76,_0x517aa5=_0x3b2352['appCode']?.[_0x1d3ed9(0xda)]()||_0xfcf373[_0x1d3ed9(0xd6)](_0x1d3ed9(0xdf))['trim'](),_0x10c114=buildCustomPageRuntimeUrl(_0x517aa5,_0x3b2352[_0x1d3ed9(0xcd)]),_0x470745=buildCustomPageEditUrl(_0x517aa5,_0x38293b),_0x3344c4=await resolveCustomPageDevelopmentUrl(_0x517aa5,_0x38293b,_0xfcf373['cookie']);return{'ok':!![],'data':{..._0x30f3f7,..._0x10c114?{'runtimePageUrl':_0x10c114}:{},..._0x3344c4?{'pageUrl':_0x3344c4}:{},..._0x470745?{'editPageUrl':_0x470745}:{},..._0x288db6==null?{}:{'createTime':formatTime(_0x288db6)},..._0x41da49==null?{}:{'updateTime':formatTime(_0x41da49)}},'message':_0x1d3ed9(0xdc)+_0x552e76+'.'};}};function a184_0x2d50(){const _0x5b64ba=['getTime','9980082gDyLEu','str','705670cBZFTi','getHours','getMonth','trim','getFullYear','Retrieved\x20Custom\x20Page\x20','56138MYsnDc','4WGYWrI','appcode','padStart','42FJrtms','getSeconds','20rUmcRv','47950lvHODX','read','join','custom-detail','7918816PdBJyk','1930935yTUShg','pageCode','Custom\x20Page\x20ID','3283655mdLqGa','1661unUMID','page','getDate','isNaN'];a184_0x2d50=function(){return _0x5b64ba;};return a184_0x2d50();}function a184_0x9cf2(_0x1e13bf,_0x4d8f13){_0x1e13bf=_0x1e13bf-0xcb;const _0x2d50db=a184_0x2d50();let _0x9cf206=_0x2d50db[_0x1e13bf];return _0x9cf206;}function formatTime(_0x4dc967){const _0x3090f6=a184_0x12f7e5,_0x5ad026=new Date(_0x4dc967);if(Number[_0x3090f6(0xd3)](_0x5ad026[_0x3090f6(0xd4)]()))return String(_0x4dc967);const _0x391172=[_0x5ad026[_0x3090f6(0xdb)](),String(_0x5ad026[_0x3090f6(0xd9)]()+0x1)[_0x3090f6(0xe0)](0x2,'0'),String(_0x5ad026[_0x3090f6(0xd2)]())['padStart'](0x2,'0')][_0x3090f6(0xe6)]('-'),_0x5aa3f6=[String(_0x5ad026[_0x3090f6(0xd8)]())['padStart'](0x2,'0'),String(_0x5ad026['getMinutes']())[_0x3090f6(0xe0)](0x2,'0'),String(_0x5ad026[_0x3090f6(0xe2)]())['padStart'](0x2,'0')][_0x3090f6(0xe6)](':');return _0x391172+'\x20'+_0x5aa3f6;}
1
+ function a184_0x12fa(_0x1ae482,_0x21fa46){_0x1ae482=_0x1ae482-0x173;const _0x5d2109=a184_0x5d21();let _0x12fa6c=_0x5d2109[_0x1ae482];return _0x12fa6c;}const a184_0xd795d=a184_0x12fa;(function(_0x3dfa52,_0x23a1b0){const _0x154e9e=a184_0x12fa,_0x534558=_0x3dfa52();while(!![]){try{const _0x53b834=-parseInt(_0x154e9e(0x184))/0x1+-parseInt(_0x154e9e(0x177))/0x2*(-parseInt(_0x154e9e(0x180))/0x3)+-parseInt(_0x154e9e(0x175))/0x4+parseInt(_0x154e9e(0x183))/0x5*(parseInt(_0x154e9e(0x176))/0x6)+parseInt(_0x154e9e(0x187))/0x7+parseInt(_0x154e9e(0x178))/0x8+parseInt(_0x154e9e(0x189))/0x9*(-parseInt(_0x154e9e(0x185))/0xa);if(_0x53b834===_0x23a1b0)break;else _0x534558['push'](_0x534558['shift']());}catch(_0x2a082f){_0x534558['push'](_0x534558['shift']());}}}(a184_0x5d21,0x307e3));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a184_0xd795d(0x173),'command':a184_0xd795d(0x17f),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0xd795d(0x181),'required':!![],'description':a184_0xd795d(0x17d)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4aa865){readCustomPageId(_0x4aa865);},async 'execute'(_0x3c5327){const _0x193f3e=a184_0xd795d,_0x44cc3f=readCustomPageId(_0x3c5327),_0x28f057=await getCustomPageSource(_0x44cc3f),{bundle:_0xfce97,createTime:_0x23ab2e,updateTime:_0x48c412,..._0x1b77fb}=_0x28f057,_0x3f605e=_0x28f057['id']??_0x44cc3f,_0x435b27=_0x28f057[_0x193f3e(0x182)]?.['trim']()||_0x3c5327[_0x193f3e(0x18b)](_0x193f3e(0x18a))['trim'](),_0x5131d2=buildCustomPageRuntimeUrl(_0x435b27,_0x28f057['pageCode']),_0x5e2491=buildCustomPageEditUrl(_0x435b27,_0x3f605e),_0x207fda=await resolveCustomPageDevelopmentUrl(_0x435b27,_0x3f605e,_0x3c5327['cookie']);return{'ok':!![],'data':{..._0x1b77fb,..._0x5131d2?{'runtimePageUrl':_0x5131d2}:{},..._0x207fda?{'pageUrl':_0x207fda}:{},..._0x5e2491?{'editPageUrl':_0x5e2491}:{},..._0x23ab2e==null?{}:{'createTime':formatTime(_0x23ab2e)},..._0x48c412==null?{}:{'updateTime':formatTime(_0x48c412)}},'message':_0x193f3e(0x17c)+_0x44cc3f+'.'};}};function a184_0x5d21(){const _0xbfbf3=['getDate','436806jdIDaC','appcode','str','getTime','getHours','page','isNaN','297032iCFylT','60exOUcr','814kfIeeA','2162616gIQxdt','getMinutes','padStart','getMonth','Retrieved\x20Custom\x20Page\x20','Custom\x20Page\x20ID','getSeconds','custom-detail','606TCAqNV','number','appCode','37800FUksmj','219952zvMeiV','50olqEHj','join','2151562sLCjUG'];a184_0x5d21=function(){return _0xbfbf3;};return a184_0x5d21();}function formatTime(_0x4b7b18){const _0xdb6733=a184_0xd795d,_0x2ff886=new Date(_0x4b7b18);if(Number[_0xdb6733(0x174)](_0x2ff886[_0xdb6733(0x18c)]()))return String(_0x4b7b18);const _0x539a8b=[_0x2ff886['getFullYear'](),String(_0x2ff886[_0xdb6733(0x17b)]()+0x1)[_0xdb6733(0x17a)](0x2,'0'),String(_0x2ff886[_0xdb6733(0x188)]())['padStart'](0x2,'0')][_0xdb6733(0x186)]('-'),_0x378c8c=[String(_0x2ff886[_0xdb6733(0x18d)]())[_0xdb6733(0x17a)](0x2,'0'),String(_0x2ff886[_0xdb6733(0x179)]())['padStart'](0x2,'0'),String(_0x2ff886[_0xdb6733(0x17e)]())['padStart'](0x2,'0')][_0xdb6733(0x186)](':');return _0x539a8b+'\x20'+_0x378c8c;}
@@ -1 +1 @@
1
- const a185_0x429036=a185_0x404d;function a185_0x404d(_0x44ef65,_0xd7bbfd){_0x44ef65=_0x44ef65-0xef;const _0x4dc4e2=a185_0x4dc4();let _0x404d53=_0x4dc4e2[_0x44ef65];return _0x404d53;}(function(_0x1cdf8a,_0x31e90c){const _0x2b4779=a185_0x404d,_0x411761=_0x1cdf8a();while(!![]){try{const _0x4ce784=parseInt(_0x2b4779(0xf4))/0x1+parseInt(_0x2b4779(0xf3))/0x2*(parseInt(_0x2b4779(0xfd))/0x3)+-parseInt(_0x2b4779(0xf0))/0x4*(-parseInt(_0x2b4779(0xf7))/0x5)+parseInt(_0x2b4779(0x105))/0x6+parseInt(_0x2b4779(0xf8))/0x7+parseInt(_0x2b4779(0xf6))/0x8*(-parseInt(_0x2b4779(0xfa))/0x9)+-parseInt(_0x2b4779(0x108))/0xa*(parseInt(_0x2b4779(0x104))/0xb);if(_0x4ce784===_0x31e90c)break;else _0x411761['push'](_0x411761['shift']());}catch(_0x5f2266){_0x411761['push'](_0x411761['shift']());}}}(a185_0x4dc4,0x479a7));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a185_0x429036(0x103),'command':'custom-list','description':a185_0x429036(0xf5),'risk':'read','defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0xaa11e1){const _0x55e567=a185_0x429036,_0x4a6d23=(await fetchMenuSnapshot(_0xaa11e1[_0x55e567(0xef)],_0xaa11e1[_0x55e567(0xfb)]))[_0x55e567(0x100)][_0x55e567(0xfc)](_0x810595=>{const _0x338a64=_0x55e567;if(_0x810595[_0x338a64(0x102)]!==_0x338a64(0xfe)||_0x810595[_0x338a64(0xf1)]==null)return[];const _0x34ccab=buildCustomPageDevelopmentUrl(_0xaa11e1[_0x338a64(0xef)],_0x810595[_0x338a64(0x106)]),_0x2f08eb=buildCustomPageRuntimeUrl(_0xaa11e1[_0x338a64(0xef)],_0x810595['path']),_0x468d97=buildCustomPageEditUrl(_0xaa11e1[_0x338a64(0xef)],_0x810595[_0x338a64(0xf1)]);return[{'pageId':_0x810595['pageId'],'label':_0x810595[_0x338a64(0x107)],'path':_0x810595[_0x338a64(0x106)],..._0x34ccab?{'pageUrl':_0x34ccab}:{},..._0x2f08eb?{'runtimePageUrl':_0x2f08eb}:{},..._0x468d97?{'editPageUrl':_0x468d97}:{}}];});return{'ok':!![],'data':{'pages':_0x4a6d23},'message':_0x4a6d23[_0x55e567(0xf2)]===0x0?_0x55e567(0xf9):_0x55e567(0x101)+_0x4a6d23['length']+_0x55e567(0xff)};}};function a185_0x4dc4(){const _0x21ca0e=['flatMap','810GKochB','react','\x20Custom\x20Page(s).','menus','Found\x20','type','page','67991jEiMnw','736860KWzBcW','path','label','1390wCaEEJ','appCode','16252rdAftS','pageId','length','3326UzYNHO','314407fJyYfS','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','32DPLgVJ','340VWQtsk','3511585jNroRZ','No\x20Custom\x20Pages\x20found.','1151370RzcZvp','cookie'];a185_0x4dc4=function(){return _0x21ca0e;};return a185_0x4dc4();}
1
+ const a185_0x1acdb5=a185_0x49cc;(function(_0x93f82c,_0xd8afe){const _0x199444=a185_0x49cc,_0x43a9fd=_0x93f82c();while(!![]){try{const _0x422be0=parseInt(_0x199444(0x162))/0x1*(parseInt(_0x199444(0x168))/0x2)+parseInt(_0x199444(0x164))/0x3*(parseInt(_0x199444(0x150))/0x4)+parseInt(_0x199444(0x166))/0x5+-parseInt(_0x199444(0x157))/0x6+parseInt(_0x199444(0x15e))/0x7+-parseInt(_0x199444(0x167))/0x8*(-parseInt(_0x199444(0x15c))/0x9)+-parseInt(_0x199444(0x15f))/0xa;if(_0x422be0===_0xd8afe)break;else _0x43a9fd['push'](_0x43a9fd['shift']());}catch(_0xcb61b5){_0x43a9fd['push'](_0x43a9fd['shift']());}}}(a185_0x3df5,0x88fa4));function a185_0x49cc(_0x447676,_0x131ce6){_0x447676=_0x447676-0x14f;const _0x3df5a9=a185_0x3df5();let _0x49cc85=_0x3df5a9[_0x447676];return _0x49cc85;}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';function a185_0x3df5(){const _0x17eb1d=['951355jdteUv','32bxSTZe','2174GKgVzx','flatMap','3263804AwTesp','page','No\x20Custom\x20Pages\x20found.','react','Found\x20','appCode','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','2243850GwoePv','cookie','compress','pageId','custom-list','93870KwEeIW','path','3999275aBoTkD','14494800ekHuCf','read','length','704wWyOBc','menus','3gbVXAq','\x20Custom\x20Page(s).'];a185_0x3df5=function(){return _0x17eb1d;};return a185_0x3df5();}export const pageCustomList={'service':a185_0x1acdb5(0x151),'command':a185_0x1acdb5(0x15b),'description':a185_0x1acdb5(0x156),'risk':a185_0x1acdb5(0x160),'defaultOutputFormat':a185_0x1acdb5(0x159),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x23d513){const _0x6ef830=a185_0x1acdb5,_0x25be59=(await fetchMenuSnapshot(_0x23d513[_0x6ef830(0x155)],_0x23d513[_0x6ef830(0x158)]))[_0x6ef830(0x163)][_0x6ef830(0x14f)](_0x2a3617=>{const _0x4a7805=_0x6ef830;if(_0x2a3617['type']!==_0x4a7805(0x153)||_0x2a3617[_0x4a7805(0x15a)]==null)return[];const _0x4af947=buildCustomPageDevelopmentUrl(_0x23d513[_0x4a7805(0x155)],_0x2a3617[_0x4a7805(0x15d)]),_0x3534f6=buildCustomPageRuntimeUrl(_0x23d513['appCode'],_0x2a3617[_0x4a7805(0x15d)]),_0x551923=buildCustomPageEditUrl(_0x23d513['appCode'],_0x2a3617[_0x4a7805(0x15a)]);return[{'pageId':_0x2a3617[_0x4a7805(0x15a)],'label':_0x2a3617['label'],'path':_0x2a3617[_0x4a7805(0x15d)],..._0x4af947?{'pageUrl':_0x4af947}:{},..._0x3534f6?{'runtimePageUrl':_0x3534f6}:{},..._0x551923?{'editPageUrl':_0x551923}:{}}];});return{'ok':!![],'data':{'pages':_0x25be59},'message':_0x25be59['length']===0x0?_0x6ef830(0x152):_0x6ef830(0x154)+_0x25be59[_0x6ef830(0x161)]+_0x6ef830(0x165)};}};
@@ -1 +1 @@
1
- const a186_0x3fd2c5=a186_0x3fa6;(function(_0x47daac,_0x12ddb6){const _0x10d1d0=a186_0x3fa6,_0x25b017=_0x47daac();while(!![]){try{const _0xfc8686=parseInt(_0x10d1d0(0x1fc))/0x1+parseInt(_0x10d1d0(0x1e5))/0x2*(parseInt(_0x10d1d0(0x1e0))/0x3)+parseInt(_0x10d1d0(0x1f7))/0x4*(parseInt(_0x10d1d0(0x1ff))/0x5)+-parseInt(_0x10d1d0(0x1f2))/0x6*(-parseInt(_0x10d1d0(0x1e2))/0x7)+-parseInt(_0x10d1d0(0x1ef))/0x8*(parseInt(_0x10d1d0(0x1eb))/0x9)+-parseInt(_0x10d1d0(0x1ec))/0xa+parseInt(_0x10d1d0(0x1f9))/0xb*(-parseInt(_0x10d1d0(0x1f6))/0xc);if(_0xfc8686===_0x12ddb6)break;else _0x25b017['push'](_0x25b017['shift']());}catch(_0x234f36){_0x25b017['push'](_0x25b017['shift']());}}}(a186_0x2fc6,0x33eeb));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a186_0x2fc6(){const _0x595be5=['24204MDbozO','pageCode','str','push','204RHaTej','4qFAIUE','POST','335687wZVmGn','remark','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','234237AldSWR','/smartapi/webcode/file/publish','string','1625605yvCBWC','705741FboqXp','unknown','707qyPMED','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','Optional\x20publish\x20remark','2bgeysY','pageId','page.custom-publish','warnings','Would\x20publish\x20Custom\x20Page\x20','trim','396774QlRabx','3382770CfPjwh','appCode','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','24hNHXjT','FORMAL','isInteger'];a186_0x2fc6=function(){return _0x595be5;};return a186_0x2fc6();}function a186_0x3fa6(_0x440349,_0x65856a){_0x440349=_0x440349-0x1e0;const _0x2fc6c2=a186_0x2fc6();let _0x3fa658=_0x2fc6c2[_0x440349];return _0x3fa658;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':'page','command':'custom-publish','description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':'Custom\x20Page\x20ID'},{'name':'remark','type':a186_0x3fd2c5(0x1fe),'description':a186_0x3fd2c5(0x1e4)}],async 'validate'(_0x213bc3){readCustomPageId(_0x213bc3);},async 'dryRun'(_0x3fb315){const _0x2b82f4=a186_0x3fd2c5,_0x3a9df4=readInput(_0x3fb315);return{'method':_0x2b82f4(0x1f8),'url':_0x2b82f4(0x1fd),'body':{'id':_0x3a9df4[_0x2b82f4(0x1e6)],..._0x3a9df4['remark']?{'remark':_0x3a9df4[_0x2b82f4(0x1fa)]}:{}},'description':_0x2b82f4(0x1e9)+_0x3a9df4[_0x2b82f4(0x1e6)]+'.'};},async 'execute'(_0x1d7763){const _0x2caee7=a186_0x3fd2c5,_0x366e78=readInput(_0x1d7763);await getCustomPageSource(_0x366e78[_0x2caee7(0x1e6)]);const _0x398606=await publishCustomPage(_0x366e78);if(!Number[_0x2caee7(0x1f1)](_0x398606)||_0x398606!==_0x366e78[_0x2caee7(0x1e6)])throw CliErrors['apiError'](_0x2caee7(0x1fb));const _0x5a3bec=await getCustomPageSource(_0x366e78[_0x2caee7(0x1e6)]);if(_0x5a3bec['status']!==_0x2caee7(0x1f0))throw CliErrors['apiError'](_0x2caee7(0x1ee)+(_0x5a3bec['status']??_0x2caee7(0x1e1))+'.');const _0x404f61=_0x5a3bec[_0x2caee7(0x1ed)]?.['trim'](),_0x43579c=buildCustomPageEditUrl(_0x404f61,_0x366e78[_0x2caee7(0x1e6)]),_0x38d948=await resolveCustomPageDevelopmentUrl(_0x404f61,_0x366e78[_0x2caee7(0x1e6)],_0x1d7763['cookie']),_0xc6f1bb=buildMutationData(_0x366e78,!![],_0x38d948,_0x43579c);_0x404f61&&!_0x38d948&&_0xc6f1bb['warnings']['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x30d506=buildCustomPageRuntimeUrl(_0x5a3bec['appCode'],_0x5a3bec[_0x2caee7(0x1f3)]);return _0x30d506?_0xc6f1bb['runtimePageUrl']=_0x30d506:_0xc6f1bb[_0x2caee7(0x1e8)][_0x2caee7(0x1f5)](_0x2caee7(0x1e3)),{'ok':!![],'data':_0xc6f1bb,'message':'Published\x20Custom\x20Page\x20'+_0x366e78['pageId']+'.'};}};function readInput(_0xf318db){const _0x2f7a69=a186_0x3fd2c5,_0x14048f=readCustomPageId(_0xf318db),_0x5d1a9e=_0xf318db[_0x2f7a69(0x1f4)]('remark')[_0x2f7a69(0x1ea)]();return{'pageId':_0x14048f,..._0x5d1a9e?{'remark':_0x5d1a9e}:{}};}function buildMutationData(_0x126f35,_0x1d6ee2=![],_0x151adf,_0x2aac2f){const _0x5e53d8=a186_0x3fd2c5;return{'operation':_0x5e53d8(0x1e7),'selector':{'pageId':_0x126f35['pageId']},'before':null,'after':{'pageId':_0x126f35[_0x5e53d8(0x1e6)],'status':_0x5e53d8(0x1f0)},'dryRun':!_0x1d6ee2,'request':_0x126f35,..._0x151adf?{'pageUrl':_0x151adf}:{},..._0x2aac2f?{'editPageUrl':_0x2aac2f}:{},'warnings':[]};}
1
+ function a186_0x52a7(){const _0xc83105=['write','remark','isInteger','79744aqPXNp','FORMAL','cookie','1953525uSgYEm','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','status','str','4144905zhCGnQ','string','Optional\x20publish\x20remark','push','unknown','page','6rtWBbS','12210210KTPPaQ','appCode','custom-publish','runtimePageUrl','trim','Custom\x20Page\x20ID','Published\x20Custom\x20Page\x20','apiError','page.custom-publish','322654ZFiMkg','POST','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','warnings','905470lvKutK','6mabZsY','/smartapi/webcode/file/publish','pageId','number','1715124SmzpMJ','Would\x20publish\x20Custom\x20Page\x20'];a186_0x52a7=function(){return _0xc83105;};return a186_0x52a7();}const a186_0x4ce6b0=a186_0x160f;(function(_0x4f7155,_0x92fbfd){const _0x5bfdb1=a186_0x160f,_0x4b294e=_0x4f7155();while(!![]){try{const _0x106f7f=parseInt(_0x5bfdb1(0x1be))/0x1+-parseInt(_0x5bfdb1(0x1c3))/0x2+-parseInt(_0x5bfdb1(0x1da))/0x3*(-parseInt(_0x5bfdb1(0x1c8))/0x4)+-parseInt(_0x5bfdb1(0x1d4))/0x5*(-parseInt(_0x5bfdb1(0x1c4))/0x6)+parseInt(_0x5bfdb1(0x1d0))/0x7+-parseInt(_0x5bfdb1(0x1cd))/0x8+-parseInt(_0x5bfdb1(0x1db))/0x9;if(_0x106f7f===_0x92fbfd)break;else _0x4b294e['push'](_0x4b294e['shift']());}catch(_0x4efc94){_0x4b294e['push'](_0x4b294e['shift']());}}}(a186_0x52a7,0x7278f));function a186_0x160f(_0x356c90,_0xba735a){_0x356c90=_0x356c90-0x1b7;const _0x52a764=a186_0x52a7();let _0x160f07=_0x52a764[_0x356c90];return _0x160f07;}import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a186_0x4ce6b0(0x1d9),'command':a186_0x4ce6b0(0x1b7),'description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a186_0x4ce6b0(0x1ca),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0x4ce6b0(0x1c7),'required':!![],'description':a186_0x4ce6b0(0x1ba)},{'name':a186_0x4ce6b0(0x1cb),'type':a186_0x4ce6b0(0x1d5),'description':a186_0x4ce6b0(0x1d6)}],async 'validate'(_0x39874f){readCustomPageId(_0x39874f);},async 'dryRun'(_0x1848d6){const _0x572591=a186_0x4ce6b0,_0x70a23d=readInput(_0x1848d6);return{'method':_0x572591(0x1bf),'url':_0x572591(0x1c5),'body':{'id':_0x70a23d[_0x572591(0x1c6)],..._0x70a23d[_0x572591(0x1cb)]?{'remark':_0x70a23d[_0x572591(0x1cb)]}:{}},'description':_0x572591(0x1c9)+_0x70a23d[_0x572591(0x1c6)]+'.'};},async 'execute'(_0x15cd68){const _0x2294ba=a186_0x4ce6b0,_0x163352=readInput(_0x15cd68);await getCustomPageSource(_0x163352[_0x2294ba(0x1c6)]);const _0x1c58ec=await publishCustomPage(_0x163352);if(!Number[_0x2294ba(0x1cc)](_0x1c58ec)||_0x1c58ec!==_0x163352[_0x2294ba(0x1c6)])throw CliErrors[_0x2294ba(0x1bc)](_0x2294ba(0x1c0));const _0x252dea=await getCustomPageSource(_0x163352['pageId']);if(_0x252dea[_0x2294ba(0x1d2)]!==_0x2294ba(0x1ce))throw CliErrors[_0x2294ba(0x1bc)](_0x2294ba(0x1d1)+(_0x252dea['status']??_0x2294ba(0x1d8))+'.');const _0x4ce7e6=_0x252dea['appCode']?.[_0x2294ba(0x1b9)](),_0x351add=buildCustomPageEditUrl(_0x4ce7e6,_0x163352['pageId']),_0x2228dd=await resolveCustomPageDevelopmentUrl(_0x4ce7e6,_0x163352[_0x2294ba(0x1c6)],_0x15cd68[_0x2294ba(0x1cf)]),_0x3ee190=buildMutationData(_0x163352,!![],_0x2228dd,_0x351add);_0x4ce7e6&&!_0x2228dd&&_0x3ee190[_0x2294ba(0x1c2)][_0x2294ba(0x1d7)](_0x2294ba(0x1c1));const _0x5aa286=buildCustomPageRuntimeUrl(_0x252dea[_0x2294ba(0x1dc)],_0x252dea['pageCode']);return _0x5aa286?_0x3ee190[_0x2294ba(0x1b8)]=_0x5aa286:_0x3ee190[_0x2294ba(0x1c2)][_0x2294ba(0x1d7)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x3ee190,'message':_0x2294ba(0x1bb)+_0x163352[_0x2294ba(0x1c6)]+'.'};}};function readInput(_0x19c298){const _0x1dd41a=a186_0x4ce6b0,_0x5e0c8f=readCustomPageId(_0x19c298),_0x59787f=_0x19c298[_0x1dd41a(0x1d3)]('remark')['trim']();return{'pageId':_0x5e0c8f,..._0x59787f?{'remark':_0x59787f}:{}};}function buildMutationData(_0xf94151,_0x441fdf=![],_0xbeab65,_0x1f9863){const _0x47ba61=a186_0x4ce6b0;return{'operation':_0x47ba61(0x1bd),'selector':{'pageId':_0xf94151[_0x47ba61(0x1c6)]},'before':null,'after':{'pageId':_0xf94151['pageId'],'status':'FORMAL'},'dryRun':!_0x441fdf,'request':_0xf94151,..._0xbeab65?{'pageUrl':_0xbeab65}:{},..._0x1f9863?{'editPageUrl':_0x1f9863}:{},'warnings':[]};}
@@ -1 +1 @@
1
- const a187_0x3aa2e7=a187_0x5689;(function(_0x4159dc,_0x33b668){const _0x1f1762=a187_0x5689,_0x58e8f9=_0x4159dc();while(!![]){try{const _0x33eb4b=parseInt(_0x1f1762(0x198))/0x1+-parseInt(_0x1f1762(0x1a2))/0x2*(parseInt(_0x1f1762(0x1a1))/0x3)+parseInt(_0x1f1762(0x18d))/0x4*(-parseInt(_0x1f1762(0x199))/0x5)+-parseInt(_0x1f1762(0x195))/0x6+parseInt(_0x1f1762(0x19b))/0x7+parseInt(_0x1f1762(0x18f))/0x8*(parseInt(_0x1f1762(0x194))/0x9)+parseInt(_0x1f1762(0x196))/0xa;if(_0x33eb4b===_0x33b668)break;else _0x58e8f9['push'](_0x58e8f9['shift']());}catch(_0x3c2ea3){_0x58e8f9['push'](_0x58e8f9['shift']());}}}(a187_0x29bc,0x4448c));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a187_0x29bc(){const _0x49df3c=['join','/pages/','isInteger','80061yViVcG','14JiwoAU','find','message','type','1918028SYGGcV','/ide/','16504KBnivY','validation','map','file','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','1458IDFuzZ','3027048SlAzRW','5653400zODwse','menus','354861AyPEVe','5Drttfc','length','1372763qSUPZw','trim','Invalid\x20Custom\x20Page\x20content:\x20'];a187_0x29bc=function(){return _0x49df3c;};return a187_0x29bc();}function a187_0x5689(_0x1e5319,_0x288896){_0x1e5319=_0x1e5319-0x18a;const _0x29bc6c=a187_0x29bc();let _0x568981=_0x29bc6c[_0x1e5319];return _0x568981;}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a187_0x3aa2e7(0x193)};function trimOptional(_0x1b2337){const _0x18c5b=a187_0x3aa2e7;return _0x1b2337?.[_0x18c5b(0x19c)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x87be1b,_0x2cfb01){const _0x4a1e3d=trimOptional(_0x87be1b),_0x2c8cec=trimOptional(_0x2cfb01);if(!_0x4a1e3d||!_0x2c8cec)return undefined;return getPublishedAppDomain(_0x4a1e3d)+'/'+encodeURIComponent(_0x2c8cec);}export function buildCustomPageDevelopmentUrl(_0x26ab0c,_0x224ea4){const _0x593934=a187_0x3aa2e7,_0x78a13c=trimOptional(_0x26ab0c),_0x3fcbc4=trimOptional(_0x224ea4);if(!_0x78a13c||!_0x3fcbc4)return undefined;return getAppBaseUrl(_0x78a13c)+_0x593934(0x19f)+encodeURIComponent(_0x3fcbc4);}export async function resolveCustomPageDevelopmentUrl(_0x160fd2,_0x1c2abd,_0x4c3c23){const _0x3416c0=a187_0x3aa2e7,_0x398495=trimOptional(_0x160fd2);if(!_0x398495)return undefined;try{const _0x52f3d9=(await fetchMenuSnapshot(_0x398495,_0x4c3c23))[_0x3416c0(0x197)][_0x3416c0(0x18a)](_0x529082=>_0x529082[_0x3416c0(0x18c)]==='react'&&_0x529082['pageId']===_0x1c2abd);return buildCustomPageDevelopmentUrl(_0x398495,_0x52f3d9?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x2979f7,_0x1f5072){const _0x3c5fed=a187_0x3aa2e7,_0x178957=trimOptional(_0x2979f7);if(!_0x178957)return;const _0x1c08e2=trimOptional(String(_0x1f5072??''));if(!_0x1c08e2)return;return getAppBaseUrl(_0x178957)+_0x3c5fed(0x18e)+encodeURIComponent(_0x1c08e2);}export async function validateCustomPageContent(_0x4c1e82){const _0x5e23a5=a187_0x3aa2e7,_0x1408f=await validateCustomPageSourceFiles(_0x4c1e82);if(_0x1408f[_0x5e23a5(0x19a)]>0x0)throw CliErrors['validation'](_0x5e23a5(0x19d)+_0x1408f[_0x5e23a5(0x191)](_0x125684=>_0x125684[_0x5e23a5(0x192)]+':\x20'+_0x125684[_0x5e23a5(0x18b)])[_0x5e23a5(0x19e)](';\x20'));}export function readCustomPageId(_0x4b89cc){const _0x3d201d=a187_0x3aa2e7,_0x5374f4=_0x4b89cc['num']('id');if(!Number[_0x3d201d(0x1a0)](_0x5374f4)||_0x5374f4<=0x0)throw CliErrors[_0x3d201d(0x190)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x5374f4;}
1
+ const a187_0x535920=a187_0xd201;(function(_0x16c928,_0x1d08c7){const _0x53c3d5=a187_0xd201,_0x39c314=_0x16c928();while(!![]){try{const _0x1517a6=-parseInt(_0x53c3d5(0x138))/0x1*(parseInt(_0x53c3d5(0x13f))/0x2)+parseInt(_0x53c3d5(0x13e))/0x3*(parseInt(_0x53c3d5(0x145))/0x4)+-parseInt(_0x53c3d5(0x148))/0x5+parseInt(_0x53c3d5(0x136))/0x6+parseInt(_0x53c3d5(0x146))/0x7+parseInt(_0x53c3d5(0x141))/0x8*(-parseInt(_0x53c3d5(0x13d))/0x9)+parseInt(_0x53c3d5(0x13b))/0xa*(parseInt(_0x53c3d5(0x133))/0xb);if(_0x1517a6===_0x1d08c7)break;else _0x39c314['push'](_0x39c314['shift']());}catch(_0x418b76){_0x39c314['push'](_0x39c314['shift']());}}}(a187_0x5bf5,0xcebf1));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';function a187_0x5bf5(){const _0x45bae2=['join','--id\x20must\x20be\x20a\x20positive\x20integer.','length','944Rvrqei','11094874LpzpwQ','react','4773755kamrST','message','pageId','580063QlNgbR','/ide/','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','741858zBLwdX','menus','140221tLeJBK','num','/pages/','10YtQgKk','isInteger','36xzDtim','17247HPHOzN','4iCxFeS','trim','2072192gtpHZT'];a187_0x5bf5=function(){return _0x45bae2;};return a187_0x5bf5();}function a187_0xd201(_0x3af39a,_0x45d2bb){_0x3af39a=_0x3af39a-0x131;const _0x5bf5a2=a187_0x5bf5();let _0xd201d=_0x5bf5a2[_0x3af39a];return _0xd201d;}import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a187_0x535920(0x135)};function trimOptional(_0x28363f){const _0x4b3fd4=a187_0x535920;return _0x28363f?.[_0x4b3fd4(0x140)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x339b11,_0xbfba31){const _0x2c5c00=trimOptional(_0x339b11),_0x59ba94=trimOptional(_0xbfba31);if(!_0x2c5c00||!_0x59ba94)return undefined;return getPublishedAppDomain(_0x2c5c00)+'/'+encodeURIComponent(_0x59ba94);}export function buildCustomPageDevelopmentUrl(_0x2b65fa,_0x44d2d0){const _0x35b711=a187_0x535920,_0x379730=trimOptional(_0x2b65fa),_0x6938b3=trimOptional(_0x44d2d0);if(!_0x379730||!_0x6938b3)return undefined;return getAppBaseUrl(_0x379730)+_0x35b711(0x13a)+encodeURIComponent(_0x6938b3);}export async function resolveCustomPageDevelopmentUrl(_0x5824d8,_0x33e56e,_0x1b07d4){const _0x4a5222=a187_0x535920,_0x5ba512=trimOptional(_0x5824d8);if(!_0x5ba512)return undefined;try{const _0x2b8058=(await fetchMenuSnapshot(_0x5ba512,_0x1b07d4))[_0x4a5222(0x137)]['find'](_0x1ef263=>_0x1ef263['type']===_0x4a5222(0x147)&&_0x1ef263[_0x4a5222(0x132)]===_0x33e56e);return buildCustomPageDevelopmentUrl(_0x5ba512,_0x2b8058?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x4a666b,_0x5cc3be){const _0x157893=a187_0x535920,_0x16b5f2=trimOptional(_0x4a666b);if(!_0x16b5f2)return;const _0x257774=trimOptional(String(_0x5cc3be??''));if(!_0x257774)return;return getAppBaseUrl(_0x16b5f2)+_0x157893(0x134)+encodeURIComponent(_0x257774);}export async function validateCustomPageContent(_0x22feea){const _0x5c547b=a187_0x535920,_0x1b3382=await validateCustomPageSourceFiles(_0x22feea);if(_0x1b3382[_0x5c547b(0x144)]>0x0)throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20content:\x20'+_0x1b3382['map'](_0x48b341=>_0x48b341['file']+':\x20'+_0x48b341[_0x5c547b(0x131)])[_0x5c547b(0x142)](';\x20'));}export function readCustomPageId(_0x2db625){const _0xa3d035=a187_0x535920,_0x51bfcf=_0x2db625[_0xa3d035(0x139)]('id');if(!Number[_0xa3d035(0x13c)](_0x51bfcf)||_0x51bfcf<=0x0)throw CliErrors['validation'](_0xa3d035(0x143));return _0x51bfcf;}
@@ -1 +1 @@
1
- function a188_0x372a(_0x43c084,_0x2b3c74){_0x43c084=_0x43c084-0x64;const _0x2389d6=a188_0x2389();let _0x372a17=_0x2389d6[_0x43c084];return _0x372a17;}const a188_0x486569=a188_0x372a;(function(_0xacfc79,_0x2a2e62){const _0x2a87dd=a188_0x372a,_0x54555d=_0xacfc79();while(!![]){try{const _0x1b112d=-parseInt(_0x2a87dd(0x64))/0x1*(parseInt(_0x2a87dd(0x68))/0x2)+parseInt(_0x2a87dd(0x6f))/0x3*(-parseInt(_0x2a87dd(0x71))/0x4)+-parseInt(_0x2a87dd(0x6a))/0x5+parseInt(_0x2a87dd(0x72))/0x6+-parseInt(_0x2a87dd(0x76))/0x7+-parseInt(_0x2a87dd(0x73))/0x8+parseInt(_0x2a87dd(0x75))/0x9;if(_0x1b112d===_0x2a2e62)break;else _0x54555d['push'](_0x54555d['shift']());}catch(_0x444776){_0x54555d['push'](_0x54555d['shift']());}}}(a188_0x2389,0x81cdb));import{format}from'prettier';const SOURCE_PARSERS={'.js':a188_0x486569(0x6b),'.jsx':a188_0x486569(0x6b),'.ts':'typescript','.tsx':a188_0x486569(0x70)},CUSTOM_PAGE_EXTENSIONS=[a188_0x486569(0x67),a188_0x486569(0x77)];export async function validateCustomPageSourceFiles(_0xc7a584){const _0x197aa4=a188_0x486569,_0x265974=Object[_0x197aa4(0x74)](_0xc7a584)['filter'](([_0x325857])=>getParser(_0x325857));if(!_0x265974[_0x197aa4(0x78)](([_0x52ca24])=>isReactSourceFile(_0x52ca24)))return[{'file':'page\x20files','message':'Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx'}];const _0x2b58ac=await Promise[_0x197aa4(0x6d)](_0x265974[_0x197aa4(0x6c)](async([_0x262fbb,_0x5485e3])=>{const _0x193124=_0x197aa4;try{return await format(_0x5485e3,{'parser':getParser(_0x262fbb)}),undefined;}catch(_0x548ca6){return{'file':_0x262fbb,'message':_0x548ca6 instanceof Error?_0x548ca6[_0x193124(0x6e)]:String(_0x548ca6)};}}));return _0x2b58ac['filter'](_0x48c31c=>_0x48c31c!==undefined);}function getParser(_0x2677f3){const _0x3119a7=a188_0x486569,_0x563da1=_0x2677f3[_0x3119a7(0x79)]()[_0x3119a7(0x65)]();return Object[_0x3119a7(0x74)](SOURCE_PARSERS)[_0x3119a7(0x66)](([_0x4e2f79])=>_0x563da1[_0x3119a7(0x69)](_0x4e2f79))?.[0x1];}function isReactSourceFile(_0x30715e){const _0x369226=a188_0x486569,_0x5310a7=_0x30715e[_0x369226(0x79)]()[_0x369226(0x65)]();return CUSTOM_PAGE_EXTENSIONS[_0x369226(0x78)](_0x5a2897=>_0x5310a7['endsWith'](_0x5a2897));}function a188_0x2389(){const _0x39b9c8=['78fDolWV','endsWith','894405ZBlMHv','babel','map','all','message','9JEjlxE','typescript','600308yXhakp','5434692EXZnSV','3558360zSCdMn','entries','13838058vcRFsg','1675968VfbSTH','.tsx','some','trim','15342IWAHQp','toLowerCase','find','.jsx'];a188_0x2389=function(){return _0x39b9c8;};return a188_0x2389();}
1
+ function a188_0x2a57(){const _0x5dd75a=['2559132AyulXy','.tsx','endsWith','27sgcWCV','filter','some','typescript','4979080GXHUXF','80YxGNOU','6xjLhMl','toLowerCase','entries','babel','1136275KUHsuj','all','57834cvabju','map','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','find','1062317LKrEkk','2134992tnKPZT','.jsx','trim','page\x20files','295318UvhdbU'];a188_0x2a57=function(){return _0x5dd75a;};return a188_0x2a57();}const a188_0x5bbaa3=a188_0x3f3e;(function(_0x31dfbb,_0x24db13){const _0x117893=a188_0x3f3e,_0x5ad853=_0x31dfbb();while(!![]){try{const _0x686409=parseInt(_0x117893(0x75))/0x1+-parseInt(_0x117893(0x7a))/0x2*(parseInt(_0x117893(0x84))/0x3)+parseInt(_0x117893(0x76))/0x4+parseInt(_0x117893(0x6f))/0x5+parseInt(_0x117893(0x7b))/0x6+-parseInt(_0x117893(0x71))/0x7*(-parseInt(_0x117893(0x83))/0x8)+-parseInt(_0x117893(0x7e))/0x9*(parseInt(_0x117893(0x82))/0xa);if(_0x686409===_0x24db13)break;else _0x5ad853['push'](_0x5ad853['shift']());}catch(_0x249396){_0x5ad853['push'](_0x5ad853['shift']());}}}(a188_0x2a57,0x84abc));import{format}from'prettier';const SOURCE_PARSERS={'.js':a188_0x5bbaa3(0x87),'.jsx':a188_0x5bbaa3(0x87),'.ts':'typescript','.tsx':a188_0x5bbaa3(0x81)},CUSTOM_PAGE_EXTENSIONS=[a188_0x5bbaa3(0x77),a188_0x5bbaa3(0x7c)];export async function validateCustomPageSourceFiles(_0x12d0ae){const _0x43a842=a188_0x5bbaa3,_0xa4fdf9=Object[_0x43a842(0x86)](_0x12d0ae)[_0x43a842(0x7f)](([_0xe28252])=>getParser(_0xe28252));if(!_0xa4fdf9[_0x43a842(0x80)](([_0xb32cef])=>isReactSourceFile(_0xb32cef)))return[{'file':_0x43a842(0x79),'message':_0x43a842(0x73)}];const _0x3148c8=await Promise[_0x43a842(0x70)](_0xa4fdf9[_0x43a842(0x72)](async([_0x25b184,_0x154c32])=>{try{return await format(_0x154c32,{'parser':getParser(_0x25b184)}),undefined;}catch(_0x652359){return{'file':_0x25b184,'message':_0x652359 instanceof Error?_0x652359['message']:String(_0x652359)};}}));return _0x3148c8[_0x43a842(0x7f)](_0x6380c7=>_0x6380c7!==undefined);}function a188_0x3f3e(_0x2b3ba5,_0x1ac705){_0x2b3ba5=_0x2b3ba5-0x6f;const _0x2a5707=a188_0x2a57();let _0x3f3e0c=_0x2a5707[_0x2b3ba5];return _0x3f3e0c;}function getParser(_0x4fd344){const _0x239619=a188_0x5bbaa3,_0x3f9392=_0x4fd344[_0x239619(0x78)]()[_0x239619(0x85)]();return Object[_0x239619(0x86)](SOURCE_PARSERS)[_0x239619(0x74)](([_0x1e4707])=>_0x3f9392[_0x239619(0x7d)](_0x1e4707))?.[0x1];}function isReactSourceFile(_0x12bb77){const _0x1ef334=a188_0x5bbaa3,_0x4143cb=_0x12bb77[_0x1ef334(0x78)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS['some'](_0xf81619=>_0x4143cb[_0x1ef334(0x7d)](_0xf81619));}
@@ -1 +1 @@
1
- const a189_0x5a6f29=a189_0x25a2;(function(_0x5d98f3,_0x317f45){const _0x31cfbc=a189_0x25a2,_0x23ec49=_0x5d98f3();while(!![]){try{const _0x4c56c6=-parseInt(_0x31cfbc(0xf5))/0x1*(parseInt(_0x31cfbc(0xfc))/0x2)+-parseInt(_0x31cfbc(0xfd))/0x3+parseInt(_0x31cfbc(0x109))/0x4*(-parseInt(_0x31cfbc(0x108))/0x5)+-parseInt(_0x31cfbc(0xff))/0x6*(parseInt(_0x31cfbc(0x100))/0x7)+parseInt(_0x31cfbc(0xf8))/0x8*(parseInt(_0x31cfbc(0xf3))/0x9)+parseInt(_0x31cfbc(0xf6))/0xa*(-parseInt(_0x31cfbc(0xec))/0xb)+parseInt(_0x31cfbc(0xfe))/0xc;if(_0x4c56c6===_0x317f45)break;else _0x23ec49['push'](_0x23ec49['shift']());}catch(_0x194510){_0x23ec49['push'](_0x23ec49['shift']());}}}(a189_0x5eb3,0x277cb));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a189_0x25a2(_0x46d9a2,_0x26756a){_0x46d9a2=_0x46d9a2-0xea;const _0x5eb3af=a189_0x5eb3();let _0x25a270=_0x5eb3af[_0x46d9a2];return _0x25a270;}import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a189_0x5eb3(){const _0xd0dd47=['pageContent','appcode','apiError','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','8325idPyCT','pageId','3419qXncVw','10bOGHFX','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','464qSKlYn','page.custom-update','page-dir','write','2nvIoWg','185595UPuewy','8764572FpobOL','566616kdbVGT','7AyZFNL','compress','trim','Directory\x20containing\x20all\x20complete\x20page\x20files','page','appCode','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','number','114475dZQmTo','44xAuIMH','newVersion','POST','cookie','Custom\x20Page\x20ID','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','custom-update','2317997upLPCR','str','validation'];a189_0x5eb3=function(){return _0xd0dd47;};return a189_0x5eb3();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a189_0x5a6f29(0x104),'command':a189_0x5a6f29(0xeb),'description':a189_0x5a6f29(0xf2),'risk':a189_0x5a6f29(0xfb),'defaultOutputFormat':a189_0x5a6f29(0x101),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':'page-content','message':'page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','hint':a189_0x5a6f29(0xf7)}],'flags':[{'name':'id','type':a189_0x5a6f29(0x107),'required':!![],'description':a189_0x5a6f29(0x10d)},{'name':'page-dir','type':'string','required':!![],'description':a189_0x5a6f29(0x103)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2774b5){readCustomPageId(_0x2774b5),await readValidatedPageContent(_0x2774b5);},async 'dryRun'(_0x1cd9ed){const _0x2750a0=a189_0x5a6f29,_0x1ee2d1=await readInput(_0x1cd9ed);return{'method':_0x2750a0(0x10b),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x1ee2d1[_0x2750a0(0xf4)],'codeContent':_0x1ee2d1[_0x2750a0(0xef)]},'description':'Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20'+_0x1ee2d1[_0x2750a0(0xf4)]+'.'};},async 'execute'(_0x37891b){const _0xbe6d1f=a189_0x5a6f29,_0x11cf19=await readInput(_0x37891b),_0x21956b=await updateCustomPageContent({'pageId':_0x11cf19['pageId'],'pageContent':_0x11cf19['pageContent']});if(!Number['isInteger'](_0x21956b[_0xbe6d1f(0x10a)])||_0x21956b[_0xbe6d1f(0x10a)]<=0x0)throw CliErrors[_0xbe6d1f(0xf1)](_0xbe6d1f(0xea));const _0x255c91=buildCustomPageEditUrl(_0x11cf19['appCode'],_0x11cf19['pageId']),_0x1b11a4=await resolveCustomPageDevelopmentUrl(_0x11cf19[_0xbe6d1f(0x105)],_0x11cf19[_0xbe6d1f(0xf4)],_0x37891b[_0xbe6d1f(0x10c)]);return{'ok':!![],'data':{'operation':_0xbe6d1f(0xf9),'selector':{'appCode':_0x11cf19[_0xbe6d1f(0x105)],'pageId':_0x11cf19[_0xbe6d1f(0xf4)]},'before':null,'after':{'pageId':_0x21956b[_0xbe6d1f(0xf4)],'version':_0x21956b[_0xbe6d1f(0x10a)],'pageContent':_0x11cf19[_0xbe6d1f(0xef)]},'dryRun':![],'request':_0x11cf19,..._0x1b11a4?{'pageUrl':_0x1b11a4}:{},..._0x255c91?{'editPageUrl':_0x255c91}:{},'warnings':_0x1b11a4?[]:[_0xbe6d1f(0x106)]},'message':'Updated\x20Custom\x20Page\x20'+_0x11cf19[_0xbe6d1f(0xf4)]+'.'};}};async function readInput(_0x33029c){const _0x349758=a189_0x5a6f29,_0x1e8dab=readCustomPageId(_0x33029c),_0x578e15=_0x33029c[_0x349758(0xed)](_0x349758(0xf0))['trim']()||(await getCustomPageSource(_0x1e8dab))[_0x349758(0x105)]?.[_0x349758(0x102)]();if(!_0x578e15)throw CliErrors[_0x349758(0xee)]('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x1e8dab+'.');return{'appCode':_0x578e15,'pageId':_0x1e8dab,'pageContent':await readValidatedPageContent(_0x33029c)};}async function readValidatedPageContent(_0x297167){const _0x45e83c=a189_0x5a6f29,_0x1a25f2=await readCustomPageDirectory(_0x297167[_0x45e83c(0xed)](_0x45e83c(0xfa)));return await validateCustomPageContent(_0x1a25f2),_0x1a25f2;}
1
+ const a189_0x190f42=a189_0x14c9;(function(_0x58ba32,_0xc69f39){const _0x5462d9=a189_0x14c9,_0x23672d=_0x58ba32();while(!![]){try{const _0x1ee5c9=-parseInt(_0x5462d9(0x1be))/0x1+parseInt(_0x5462d9(0x1bf))/0x2+-parseInt(_0x5462d9(0x1cc))/0x3+parseInt(_0x5462d9(0x1ba))/0x4+-parseInt(_0x5462d9(0x1b2))/0x5+-parseInt(_0x5462d9(0x1c0))/0x6*(-parseInt(_0x5462d9(0x1b3))/0x7)+parseInt(_0x5462d9(0x1b9))/0x8*(-parseInt(_0x5462d9(0x1bc))/0x9);if(_0x1ee5c9===_0xc69f39)break;else _0x23672d['push'](_0x23672d['shift']());}catch(_0xdcc731){_0x23672d['push'](_0x23672d['shift']());}}}(a189_0x3417,0x9c632));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a189_0x3417(){const _0x45de58=['Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','newVersion','isInteger','Custom\x20Page\x20ID','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','appcode','page-dir','cookie','3601509eBhseH','page.custom-update','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','page-content','write','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','string','trim','1757065DjsXZQ','7rvYoKq','Updated\x20Custom\x20Page\x20','POST','appCode','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','585368lPALlU','4958972WWyFBs','pageContent','9HBFOpa','custom-update','528069nJmvNz','2250596EXvbnL','2572062gbjmJb','str','compress','pageId'];a189_0x3417=function(){return _0x45de58;};return a189_0x3417();}import{CliErrors}from'../../../errors.js';function a189_0x14c9(_0xd6fae,_0x514856){_0xd6fae=_0xd6fae-0x1ad;const _0x34171c=a189_0x3417();let _0x14c968=_0x34171c[_0xd6fae];return _0x14c968;}import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':'page','command':a189_0x190f42(0x1bd),'description':a189_0x190f42(0x1b7),'risk':a189_0x190f42(0x1ae),'defaultOutputFormat':a189_0x190f42(0x1c2),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x190f42(0x1ad),'message':a189_0x190f42(0x1ce),'hint':a189_0x190f42(0x1c4)}],'flags':[{'name':'id','type':'number','required':!![],'description':a189_0x190f42(0x1c7)},{'name':a189_0x190f42(0x1ca),'type':a189_0x190f42(0x1b0),'required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x55ff6b){readCustomPageId(_0x55ff6b),await readValidatedPageContent(_0x55ff6b);},async 'dryRun'(_0x482a5e){const _0x16f227=a189_0x190f42,_0x1c5be8=await readInput(_0x482a5e);return{'method':_0x16f227(0x1b5),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x1c5be8[_0x16f227(0x1c3)],'codeContent':_0x1c5be8[_0x16f227(0x1bb)]},'description':_0x16f227(0x1b8)+_0x1c5be8[_0x16f227(0x1c3)]+'.'};},async 'execute'(_0x387225){const _0x4f894d=a189_0x190f42,_0x200c71=await readInput(_0x387225),_0x232af3=await updateCustomPageContent({'pageId':_0x200c71[_0x4f894d(0x1c3)],'pageContent':_0x200c71['pageContent']});if(!Number[_0x4f894d(0x1c6)](_0x232af3[_0x4f894d(0x1c5)])||_0x232af3[_0x4f894d(0x1c5)]<=0x0)throw CliErrors['apiError']('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x29baa1=buildCustomPageEditUrl(_0x200c71[_0x4f894d(0x1b6)],_0x200c71[_0x4f894d(0x1c3)]),_0x57f0cc=await resolveCustomPageDevelopmentUrl(_0x200c71[_0x4f894d(0x1b6)],_0x200c71[_0x4f894d(0x1c3)],_0x387225[_0x4f894d(0x1cb)]);return{'ok':!![],'data':{'operation':_0x4f894d(0x1cd),'selector':{'appCode':_0x200c71[_0x4f894d(0x1b6)],'pageId':_0x200c71[_0x4f894d(0x1c3)]},'before':null,'after':{'pageId':_0x232af3[_0x4f894d(0x1c3)],'version':_0x232af3[_0x4f894d(0x1c5)],'pageContent':_0x200c71[_0x4f894d(0x1bb)]},'dryRun':![],'request':_0x200c71,..._0x57f0cc?{'pageUrl':_0x57f0cc}:{},..._0x29baa1?{'editPageUrl':_0x29baa1}:{},'warnings':_0x57f0cc?[]:[_0x4f894d(0x1af)]},'message':_0x4f894d(0x1b4)+_0x200c71[_0x4f894d(0x1c3)]+'.'};}};async function readInput(_0x51d9be){const _0x20372a=a189_0x190f42,_0x2730cb=readCustomPageId(_0x51d9be),_0x43fbb3=_0x51d9be[_0x20372a(0x1c1)](_0x20372a(0x1c9))[_0x20372a(0x1b1)]()||(await getCustomPageSource(_0x2730cb))[_0x20372a(0x1b6)]?.[_0x20372a(0x1b1)]();if(!_0x43fbb3)throw CliErrors['validation'](_0x20372a(0x1c8)+_0x2730cb+'.');return{'appCode':_0x43fbb3,'pageId':_0x2730cb,'pageContent':await readValidatedPageContent(_0x51d9be)};}async function readValidatedPageContent(_0x53a353){const _0x1d9122=a189_0x190f42,_0x20493a=await readCustomPageDirectory(_0x53a353[_0x1d9122(0x1c1)](_0x1d9122(0x1ca)));return await validateCustomPageContent(_0x20493a),_0x20493a;}
@@ -1 +1 @@
1
- const a190_0x305bf6=a190_0x4d70;(function(_0x1e8c54,_0x1ad0c7){const _0x1c2fc1=a190_0x4d70,_0x37c9f0=_0x1e8c54();while(!![]){try{const _0x3230f7=-parseInt(_0x1c2fc1(0x190))/0x1+parseInt(_0x1c2fc1(0x194))/0x2*(parseInt(_0x1c2fc1(0x191))/0x3)+parseInt(_0x1c2fc1(0x18b))/0x4*(parseInt(_0x1c2fc1(0x197))/0x5)+parseInt(_0x1c2fc1(0x196))/0x6*(-parseInt(_0x1c2fc1(0x185))/0x7)+-parseInt(_0x1c2fc1(0x189))/0x8+-parseInt(_0x1c2fc1(0x19f))/0x9+parseInt(_0x1c2fc1(0x184))/0xa;if(_0x3230f7===_0x1ad0c7)break;else _0x37c9f0['push'](_0x37c9f0['shift']());}catch(_0x3dce8f){_0x37c9f0['push'](_0x37c9f0['shift']());}}}(a190_0x86fd,0x39e26));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a190_0x86fd(){const _0x1f681c=['compress','103353OIFCOw','69dNYcqv','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','/standard-page-status?appCode=','41212HpSnFm','code','8538xSwDwe','9620YIJgac','query-data-list-status','length','read','appCode','string','data-list-status','GET','4207212Yivvjt','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','6311770HoJDUz','1575BPKtZE','related-pages-fallback','name','page','878248UkoBMB','nextAction','276KgzCka','relatedPages','source','/smartapi/lovrabet/dataset/'];a190_0x86fd=function(){return _0x1f681c;};return a190_0x86fd();}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a190_0x4d70(_0x43f88f,_0x161064){_0x43f88f=_0x43f88f-0x184;const _0x86fde3=a190_0x86fd();let _0x4d707c=_0x86fde3[_0x43f88f];return _0x4d707c;}export const pageDataListStatus={'service':a190_0x305bf6(0x188),'command':a190_0x305bf6(0x19d),'description':a190_0x305bf6(0x192),'risk':a190_0x305bf6(0x19a),'defaultOutputFormat':a190_0x305bf6(0x18f),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a190_0x305bf6(0x19c),'description':a190_0x305bf6(0x1a0)}],async 'validate'(_0xcf2f38){validateDatasetSelector(_0xcf2f38);},async 'dryRun'(_0x1662e9){const _0x2e6f18=a190_0x305bf6,_0x4b1175=await loadDatasetDetailForPage(_0x1662e9);return{'method':_0x2e6f18(0x19e),'url':_0x2e6f18(0x18e)+_0x4b1175[_0x2e6f18(0x195)]+_0x2e6f18(0x193)+encodeURIComponent(_0x1662e9[_0x2e6f18(0x19b)]),'description':serializeDryRunDescription({'dataset':{'id':_0x4b1175['id'],'code':_0x4b1175[_0x2e6f18(0x195)],'name':_0x4b1175[_0x2e6f18(0x187)]},'action':_0x2e6f18(0x198)})};},async 'execute'(_0x39098a){const _0x3e1701=a190_0x305bf6,_0x4c3682=await loadDatasetDetailForPage(_0x39098a),_0xf9b590=await loadDataListPageStatusForGenerate(_0x39098a,_0x4c3682[_0x3e1701(0x195)]),_0x631b2b=getUndeletedRelatedPages(_0x4c3682),_0x3b6a23=assessDataListPageState(_0x4c3682[_0x3e1701(0x195)],_0xf9b590,{'fallbackUndeletedPages':_0x631b2b});return{'ok':!![],'data':{'datasetCode':_0x4c3682[_0x3e1701(0x195)],'precheckSource':_0xf9b590?.[_0x3e1701(0x18d)]??_0x3e1701(0x186),'status':_0x3b6a23['status'],'manualResolutionRequired':_0x3b6a23['manualResolutionRequired'],'nextAction':_0x3b6a23[_0x3e1701(0x18a)],'dataListPageStatus':_0xf9b590,'relatedPages':{'total':_0x4c3682[_0x3e1701(0x18c)][_0x3e1701(0x199)],'undeletedCount':_0x631b2b[_0x3e1701(0x199)]}}};}};
1
+ const a190_0xe7cf10=a190_0x1735;(function(_0x5d1cee,_0x94fa37){const _0x35fbf8=a190_0x1735,_0x3cb71c=_0x5d1cee();while(!![]){try{const _0xd2148d=-parseInt(_0x35fbf8(0x68))/0x1*(-parseInt(_0x35fbf8(0x6b))/0x2)+-parseInt(_0x35fbf8(0x74))/0x3+parseInt(_0x35fbf8(0x6d))/0x4*(-parseInt(_0x35fbf8(0x67))/0x5)+parseInt(_0x35fbf8(0x72))/0x6+parseInt(_0x35fbf8(0x7c))/0x7+parseInt(_0x35fbf8(0x6c))/0x8*(parseInt(_0x35fbf8(0x78))/0x9)+parseInt(_0x35fbf8(0x73))/0xa*(-parseInt(_0x35fbf8(0x7b))/0xb);if(_0xd2148d===_0x94fa37)break;else _0x3cb71c['push'](_0x3cb71c['shift']());}catch(_0x39e6ca){_0x3cb71c['push'](_0x3cb71c['shift']());}}}(a190_0x1b53,0x1a2e0));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a190_0x1b53(){const _0x4cc0f2=['GET','length','30kDYaCL','171103asKNil','read','related-pages-fallback','2cYGNUL','8ISGwsv','16932iVfeWV','page','/smartapi/lovrabet/dataset/','string','appCode','119760FPuITe','830wqKqhu','48171CelPzm','code','compress','data-list-status','1646721OnAFpB','relatedPages','name','45771VsHiBn','840126WJhqnF','manualResolutionRequired','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','alias','nextAction'];a190_0x1b53=function(){return _0x4cc0f2;};return a190_0x1b53();}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a190_0x1735(_0x37c756,_0x2fb6f0){_0x37c756=_0x37c756-0x65;const _0x1b53c7=a190_0x1b53();let _0x173505=_0x1b53c7[_0x37c756];return _0x173505;}export const pageDataListStatus={'service':a190_0xe7cf10(0x6e),'command':a190_0xe7cf10(0x77),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a190_0xe7cf10(0x69),'defaultOutputFormat':a190_0xe7cf10(0x76),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0xe7cf10(0x7f),'type':a190_0xe7cf10(0x70),'description':a190_0xe7cf10(0x7e)}],async 'validate'(_0x2644e5){validateDatasetSelector(_0x2644e5);},async 'dryRun'(_0x3db42c){const _0x1296b3=a190_0xe7cf10,_0x1bbe3=await loadDatasetDetailForPage(_0x3db42c);return{'method':_0x1296b3(0x65),'url':_0x1296b3(0x6f)+_0x1bbe3['code']+'/standard-page-status?appCode='+encodeURIComponent(_0x3db42c[_0x1296b3(0x71)]),'description':serializeDryRunDescription({'dataset':{'id':_0x1bbe3['id'],'code':_0x1bbe3[_0x1296b3(0x75)],'name':_0x1bbe3[_0x1296b3(0x7a)]},'action':'query-data-list-status'})};},async 'execute'(_0x3be9d0){const _0xe10be0=a190_0xe7cf10,_0xb53a1d=await loadDatasetDetailForPage(_0x3be9d0),_0x421462=await loadDataListPageStatusForGenerate(_0x3be9d0,_0xb53a1d[_0xe10be0(0x75)]),_0x388210=getUndeletedRelatedPages(_0xb53a1d),_0x1ce045=assessDataListPageState(_0xb53a1d[_0xe10be0(0x75)],_0x421462,{'fallbackUndeletedPages':_0x388210});return{'ok':!![],'data':{'datasetCode':_0xb53a1d[_0xe10be0(0x75)],'precheckSource':_0x421462?.['source']??_0xe10be0(0x6a),'status':_0x1ce045['status'],'manualResolutionRequired':_0x1ce045[_0xe10be0(0x7d)],'nextAction':_0x1ce045[_0xe10be0(0x80)],'dataListPageStatus':_0x421462,'relatedPages':{'total':_0xb53a1d[_0xe10be0(0x79)][_0xe10be0(0x66)],'undeletedCount':_0x388210[_0xe10be0(0x66)]}}};}};
@@ -1 +1 @@
1
- const a191_0x4569c3=a191_0x291f;(function(_0x5782af,_0x28c2fb){const _0x4f88c9=a191_0x291f,_0x4c244f=_0x5782af();while(!![]){try{const _0x21568f=-parseInt(_0x4f88c9(0x195))/0x1+-parseInt(_0x4f88c9(0x1a9))/0x2+-parseInt(_0x4f88c9(0x1a7))/0x3*(parseInt(_0x4f88c9(0x190))/0x4)+parseInt(_0x4f88c9(0x18f))/0x5+parseInt(_0x4f88c9(0x188))/0x6+-parseInt(_0x4f88c9(0x192))/0x7+parseInt(_0x4f88c9(0x186))/0x8*(parseInt(_0x4f88c9(0x196))/0x9);if(_0x21568f===_0x28c2fb)break;else _0x4c244f['push'](_0x4c244f['shift']());}catch(_0x3cfd5d){_0x4c244f['push'](_0x4c244f['shift']());}}}(a191_0x6839,0x6d203));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a191_0x4569c3(0x19b),'command':a191_0x4569c3(0x187),'description':a191_0x4569c3(0x182),'risk':'write','defaultOutputFormat':a191_0x4569c3(0x1a8),'rejectedFlags':[{'name':'page-type','message':a191_0x4569c3(0x183),'hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a191_0x4569c3(0x1ae),'message':a191_0x4569c3(0x18a),'hint':a191_0x4569c3(0x17e)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x4569c3(0x181),'type':a191_0x4569c3(0x18d),'description':a191_0x4569c3(0x1a6)},{'name':a191_0x4569c3(0x19a),'type':'boolean','description':a191_0x4569c3(0x184)}],async 'validate'(_0x32e253){validateDatasetSelector(_0x32e253);},async 'dryRun'(_0x148ca9){const _0x19b46b=a191_0x4569c3,_0x4516cc=await prepare(_0x148ca9);return{'method':_0x19b46b(0x199),'url':'/smartapi/lovrabet/dataset/'+_0x4516cc[_0x19b46b(0x1a3)][_0x19b46b(0x1ab)]+_0x19b46b(0x194),'body':{'appCode':_0x148ca9[_0x19b46b(0x180)],'clientOperationId':_0x4516cc[_0x19b46b(0x19d)]},'description':serializeDryRunDescription({'dataset':{'id':_0x4516cc[_0x19b46b(0x1a3)]['id'],'code':_0x4516cc[_0x19b46b(0x1a3)]['code'],'name':_0x4516cc[_0x19b46b(0x1a3)]['name'],'fieldCount':_0x4516cc[_0x19b46b(0x1a3)][_0x19b46b(0x1a5)]},'precheckSource':_0x4516cc['dataListPageStatus']?.['source']??_0x19b46b(0x1a4),'action':_0x19b46b(0x187),'clientOperationId':_0x4516cc[_0x19b46b(0x19d)],'plannedStatus':_0x4516cc[_0x19b46b(0x1a0)]['status'],'reason':_0x4516cc[_0x19b46b(0x1a0)][_0x19b46b(0x18e)]})};},async 'execute'(_0x1750eb){const _0x52e952=a191_0x4569c3;if(!_0x1750eb[_0x52e952(0x19c)](_0x52e952(0x19a))){const _0x145bcc=await pageGenerateStart[_0x52e952(0x193)](_0x1750eb);return{'ok':!![],'message':_0x52e952(0x18c),'data':_0x145bcc};}const _0x1f150a=await prepare(_0x1750eb);if(!_0x1f150a['precheck']['allowGenerate'])return{'ok':![],'message':_0x1f150a[_0x52e952(0x1a0)][_0x52e952(0x18e)],'data':{'datasetCode':_0x1f150a[_0x52e952(0x1a3)][_0x52e952(0x1ab)],'pageType':_0x52e952(0x191),'pagePattern':_0x52e952(0x1aa),'clientOperationId':_0x1f150a[_0x52e952(0x19d)],'precheckSource':_0x1f150a['dataListPageStatus']?.[_0x52e952(0x17f)]??'related-pages-fallback','status':_0x1f150a[_0x52e952(0x1a0)][_0x52e952(0x189)],'manualResolutionRequired':_0x1f150a[_0x52e952(0x1a0)][_0x52e952(0x19f)],'nextAction':_0x1f150a[_0x52e952(0x1a0)][_0x52e952(0x18b)],'query':{'command':buildDataListPageStatusQueryCommand(_0x1f150a[_0x52e952(0x1a3)][_0x52e952(0x1ab)],_0x1750eb[_0x52e952(0x180)])},'dataListPageStatus':_0x1f150a['dataListPageStatus']}};const _0x394fe2=await startGenerateDataListPages(_0x1750eb[_0x52e952(0x180)],_0x1f150a[_0x52e952(0x1a3)]['code'],{'clientOperationId':_0x1f150a[_0x52e952(0x19d)]}),_0x2cf11d=_0x394fe2[_0x52e952(0x189)]===_0x52e952(0x1af)||_0x394fe2[_0x52e952(0x189)]===_0x52e952(0x185)?await loadDataListPageStatusForGenerate(_0x1750eb,_0x1f150a[_0x52e952(0x1a3)][_0x52e952(0x1ab)]):null,_0x26ac5b=assessGenerateOperationState(_0x1f150a[_0x52e952(0x1a3)]['code'],_0x394fe2[_0x52e952(0x189)],_0x2cf11d);return{'ok':!![],'message':_0x394fe2[_0x52e952(0x1ad)]?_0x52e952(0x1a2):_0x52e952(0x19e),'data':{'datasetCode':_0x1f150a[_0x52e952(0x1a3)]['code'],'appCode':_0x1750eb[_0x52e952(0x180)],'pageType':_0x52e952(0x191),'pagePattern':_0x52e952(0x1aa),'taskId':_0x394fe2[_0x52e952(0x198)]??null,'operationId':_0x394fe2[_0x52e952(0x197)]??null,'clientOperationId':_0x1f150a[_0x52e952(0x19d)],'jobStatus':_0x394fe2[_0x52e952(0x189)]??null,'progressRate':typeof _0x394fe2[_0x52e952(0x1a1)]===_0x52e952(0x1ac)?_0x394fe2[_0x52e952(0x1a1)]:null,'currentStep':_0x394fe2[_0x52e952(0x17d)]??null,'reused':_0x394fe2[_0x52e952(0x1ad)]===!![],'status':_0x26ac5b[_0x52e952(0x189)],'manualResolutionRequired':_0x26ac5b[_0x52e952(0x19f)],'nextAction':_0x26ac5b[_0x52e952(0x18b)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x1f150a[_0x52e952(0x1a3)][_0x52e952(0x1ab)],{'appCode':_0x1750eb['appCode'],'taskId':_0x394fe2[_0x52e952(0x198)],'operationId':_0x394fe2[_0x52e952(0x197)],'clientOperationId':_0x1f150a[_0x52e952(0x19d)]})},'dataListPageStatus':_0x2cf11d}};}};function a191_0x291f(_0x3cf751,_0x259074){_0x3cf751=_0x3cf751-0x17d;const _0x683925=a191_0x6839();let _0x291fb0=_0x683925[_0x3cf751];return _0x291fb0;}function a191_0x6839(){const _0x5ddf50=['string','message','4007570gMGgNq','7828Kfhifr','DATA_LIST','5777177kUXJzb','dryRun','/generate-standard-pages/start','892652wqANYV','3760227CPDzcj','operationId','taskId','POST','apply','page','bool','clientOperationId','Submitted\x20a\x20generate\x20task','manualResolutionRequired','precheck','progressRate','Reusing\x20an\x20existing\x20generate\x20task','dataset','related-pages-fallback','fieldCount','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','105HTaFHl','compress','1302078IGvvtA','CRUD_PAGE_SET','code','number','reused','page-pattern','SUCCESS','currentStep','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','source','appCode','alias','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','PARTIAL_SUCCESS','32YpAGKa','generate-start','2470500LjmvHz','status','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','nextAction','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)'];a191_0x6839=function(){return _0x5ddf50;};return a191_0x6839();}async function prepare(_0x4bac9a){const _0x4c398c=await loadDatasetDetailForPage(_0x4bac9a),_0xdb117a=await loadDataListPageStatusForGenerate(_0x4bac9a,_0x4c398c['code']),_0x1368a6=getUndeletedRelatedPages(_0x4c398c);return{'dataset':_0x4c398c,'dataListPageStatus':_0xdb117a,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x4c398c['code'],_0xdb117a,{'fallbackUndeletedPages':_0x1368a6})};}
1
+ function a191_0x3801(_0x22e813,_0x7e4d6e){_0x22e813=_0x22e813-0xb3;const _0x5ba626=a191_0x5ba6();let _0x3801ea=_0x5ba626[_0x22e813];return _0x3801ea;}const a191_0x18269d=a191_0x3801;(function(_0x4735ea,_0x46cdad){const _0x272028=a191_0x3801,_0x45d890=_0x4735ea();while(!![]){try{const _0x5d4d49=-parseInt(_0x272028(0xbf))/0x1*(-parseInt(_0x272028(0xdb))/0x2)+-parseInt(_0x272028(0xcf))/0x3*(parseInt(_0x272028(0xc2))/0x4)+parseInt(_0x272028(0xb7))/0x5*(-parseInt(_0x272028(0xd2))/0x6)+-parseInt(_0x272028(0xdc))/0x7+parseInt(_0x272028(0xc8))/0x8*(parseInt(_0x272028(0xd7))/0x9)+-parseInt(_0x272028(0xda))/0xa+parseInt(_0x272028(0xd3))/0xb*(parseInt(_0x272028(0xe1))/0xc);if(_0x5d4d49===_0x46cdad)break;else _0x45d890['push'](_0x45d890['shift']());}catch(_0x18859d){_0x45d890['push'](_0x45d890['shift']());}}}(a191_0x5ba6,0xb2688));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a191_0x5ba6(){const _0x2ee768=['2162265wUhBqK','related-pages-fallback','allowGenerate','reused','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','39180EFLsGe','operationId','compress','source','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','string','185SvltAH','currentStep','dataListPageStatus','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','CRUD_PAGE_SET','nextAction','status','boolean','209417pVUQKk','Submitted\x20a\x20generate\x20task','Reusing\x20an\x20existing\x20generate\x20task','44mZGfGg','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','name','taskId','page','generate-start','7048LllJRA','clientOperationId','write','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','page-pattern','apply','code','25059hVnYdS','alias','appCode','148650HkcGWC','4862VkbCzr','page-type','dataset','bool','11889zGYfwQ','precheck','manualResolutionRequired','9775520kPFEBj','4SpiZkb'];a191_0x5ba6=function(){return _0x2ee768;};return a191_0x5ba6();}import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a191_0x18269d(0xc6),'command':a191_0x18269d(0xc7),'description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a191_0x18269d(0xca),'defaultOutputFormat':a191_0x18269d(0xb3),'rejectedFlags':[{'name':a191_0x18269d(0xd4),'message':a191_0x18269d(0xb5),'hint':a191_0x18269d(0xc3)},{'name':a191_0x18269d(0xcc),'message':a191_0x18269d(0xe0),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x18269d(0xd0),'type':a191_0x18269d(0xb6),'description':a191_0x18269d(0xba)},{'name':a191_0x18269d(0xcd),'type':a191_0x18269d(0xbe),'description':'Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.'}],async 'validate'(_0x364167){validateDatasetSelector(_0x364167);},async 'dryRun'(_0x2085c0){const _0x2adfa5=a191_0x18269d,_0x1ba0bf=await prepare(_0x2085c0);return{'method':'POST','url':'/smartapi/lovrabet/dataset/'+_0x1ba0bf['dataset'][_0x2adfa5(0xce)]+'/generate-standard-pages/start','body':{'appCode':_0x2085c0[_0x2adfa5(0xd1)],'clientOperationId':_0x1ba0bf[_0x2adfa5(0xc9)]},'description':serializeDryRunDescription({'dataset':{'id':_0x1ba0bf[_0x2adfa5(0xd5)]['id'],'code':_0x1ba0bf[_0x2adfa5(0xd5)]['code'],'name':_0x1ba0bf['dataset'][_0x2adfa5(0xc4)],'fieldCount':_0x1ba0bf[_0x2adfa5(0xd5)]['fieldCount']},'precheckSource':_0x1ba0bf[_0x2adfa5(0xb9)]?.[_0x2adfa5(0xb4)]??'related-pages-fallback','action':'generate-start','clientOperationId':_0x1ba0bf['clientOperationId'],'plannedStatus':_0x1ba0bf[_0x2adfa5(0xd8)][_0x2adfa5(0xbd)],'reason':_0x1ba0bf[_0x2adfa5(0xd8)]['message']})};},async 'execute'(_0x160b6d){const _0x11193b=a191_0x18269d;if(!_0x160b6d[_0x11193b(0xd6)]('apply')){const _0x23447d=await pageGenerateStart['dryRun'](_0x160b6d);return{'ok':!![],'message':_0x11193b(0xcb),'data':_0x23447d};}const _0x56235a=await prepare(_0x160b6d);if(!_0x56235a[_0x11193b(0xd8)][_0x11193b(0xde)])return{'ok':![],'message':_0x56235a[_0x11193b(0xd8)]['message'],'data':{'datasetCode':_0x56235a[_0x11193b(0xd5)][_0x11193b(0xce)],'pageType':'DATA_LIST','pagePattern':_0x11193b(0xbb),'clientOperationId':_0x56235a[_0x11193b(0xc9)],'precheckSource':_0x56235a[_0x11193b(0xb9)]?.[_0x11193b(0xb4)]??_0x11193b(0xdd),'status':_0x56235a[_0x11193b(0xd8)][_0x11193b(0xbd)],'manualResolutionRequired':_0x56235a['precheck'][_0x11193b(0xd9)],'nextAction':_0x56235a[_0x11193b(0xd8)][_0x11193b(0xbc)],'query':{'command':buildDataListPageStatusQueryCommand(_0x56235a['dataset'][_0x11193b(0xce)],_0x160b6d[_0x11193b(0xd1)])},'dataListPageStatus':_0x56235a['dataListPageStatus']}};const _0x42a59a=await startGenerateDataListPages(_0x160b6d[_0x11193b(0xd1)],_0x56235a[_0x11193b(0xd5)][_0x11193b(0xce)],{'clientOperationId':_0x56235a[_0x11193b(0xc9)]}),_0x54755b=_0x42a59a[_0x11193b(0xbd)]==='SUCCESS'||_0x42a59a['status']==='PARTIAL_SUCCESS'?await loadDataListPageStatusForGenerate(_0x160b6d,_0x56235a[_0x11193b(0xd5)]['code']):null,_0x1e949f=assessGenerateOperationState(_0x56235a[_0x11193b(0xd5)]['code'],_0x42a59a[_0x11193b(0xbd)],_0x54755b);return{'ok':!![],'message':_0x42a59a[_0x11193b(0xdf)]?_0x11193b(0xc1):_0x11193b(0xc0),'data':{'datasetCode':_0x56235a[_0x11193b(0xd5)][_0x11193b(0xce)],'appCode':_0x160b6d[_0x11193b(0xd1)],'pageType':'DATA_LIST','pagePattern':_0x11193b(0xbb),'taskId':_0x42a59a[_0x11193b(0xc5)]??null,'operationId':_0x42a59a[_0x11193b(0xe2)]??null,'clientOperationId':_0x56235a[_0x11193b(0xc9)],'jobStatus':_0x42a59a[_0x11193b(0xbd)]??null,'progressRate':typeof _0x42a59a['progressRate']==='number'?_0x42a59a['progressRate']:null,'currentStep':_0x42a59a[_0x11193b(0xb8)]??null,'reused':_0x42a59a['reused']===!![],'status':_0x1e949f['status'],'manualResolutionRequired':_0x1e949f[_0x11193b(0xd9)],'nextAction':_0x1e949f[_0x11193b(0xbc)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x56235a[_0x11193b(0xd5)]['code'],{'appCode':_0x160b6d[_0x11193b(0xd1)],'taskId':_0x42a59a['taskId'],'operationId':_0x42a59a[_0x11193b(0xe2)],'clientOperationId':_0x56235a[_0x11193b(0xc9)]})},'dataListPageStatus':_0x54755b}};}};async function prepare(_0x511d22){const _0x14d812=a191_0x18269d,_0x502ed5=await loadDatasetDetailForPage(_0x511d22),_0x5f458f=await loadDataListPageStatusForGenerate(_0x511d22,_0x502ed5[_0x14d812(0xce)]),_0x3149e4=getUndeletedRelatedPages(_0x502ed5);return{'dataset':_0x502ed5,'dataListPageStatus':_0x5f458f,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x502ed5['code'],_0x5f458f,{'fallbackUndeletedPages':_0x3149e4})};}