@lovrabet/rabetbase-cli 2.5.7-beta.1 → 2.5.7

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 (375) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.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.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/kb-search-client.js +1 -1
  301. package/lib/core/page/file-system.js +1 -1
  302. package/lib/core/page/hash.js +1 -1
  303. package/lib/core/page/lock.js +1 -1
  304. package/lib/core/page/lr-smart-jsx.js +1 -1
  305. package/lib/core/sql-index-auditor.js +1 -1
  306. package/lib/core/sql-sync/config.js +1 -1
  307. package/lib/core/sql-sync/file-system.js +1 -1
  308. package/lib/core/sql-sync/hash.js +1 -1
  309. package/lib/core/sql-sync/lock.js +1 -1
  310. package/lib/core/sql-sync/utils.js +1 -1
  311. package/lib/core/sql-validator.js +1 -1
  312. package/lib/errors.js +1 -1
  313. package/lib/framework/build-all-flags.js +1 -1
  314. package/lib/framework/error-output.js +1 -1
  315. package/lib/framework/explicit-yes.js +1 -1
  316. package/lib/framework/flags.js +1 -1
  317. package/lib/framework/help.js +1 -1
  318. package/lib/framework/index.js +1 -1
  319. package/lib/framework/output.js +1 -1
  320. package/lib/framework/response.js +1 -1
  321. package/lib/framework/runner-alias.js +1 -1
  322. package/lib/framework/runner.js +1 -1
  323. package/lib/framework/schema-export.js +1 -1
  324. package/lib/framework/supported-flags.js +1 -1
  325. package/lib/framework/types.js +1 -1
  326. package/lib/generated/build-info.d.ts +4 -4
  327. package/lib/generated/build-info.js +1 -1
  328. package/lib/generated/official-routing.js +1 -1
  329. package/lib/generated/routing-contract.js +1 -1
  330. package/lib/help.js +1 -1
  331. package/lib/postinstall.js +1 -1
  332. package/lib/runtime/confirmation.js +1 -1
  333. package/lib/runtime/event.js +1 -1
  334. package/lib/runtime/index.js +1 -1
  335. package/lib/runtime/queue.js +1 -1
  336. package/lib/runtime/resolve.js +1 -1
  337. package/lib/services/dataset-design/checkpoint.js +1 -1
  338. package/lib/services/dataset-design/commands.js +1 -1
  339. package/lib/services/dataset-design/contract.js +1 -1
  340. package/lib/skills/builtin-skill.js +1 -1
  341. package/lib/skills/main.js +1 -1
  342. package/lib/skills/npx-skills-add.js +1 -1
  343. package/lib/skills/skill-presence.js +1 -1
  344. package/lib/telemetry/cli-command-trace.js +1 -1
  345. package/lib/telemetry/cli-help-trace.js +1 -1
  346. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  347. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  348. package/lib/telemetry/send-cli-trace-log.js +1 -1
  349. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  350. package/lib/utils/ai_config.js +1 -1
  351. package/lib/utils/apply-jq-filter.js +1 -1
  352. package/lib/utils/cdn-config.js +1 -1
  353. package/lib/utils/check-sdk-version.js +1 -1
  354. package/lib/utils/cli-version-check.js +1 -1
  355. package/lib/utils/cli-version-policy.js +1 -1
  356. package/lib/utils/config.js +1 -1
  357. package/lib/utils/entity-with-id.js +1 -1
  358. package/lib/utils/file-utils.js +1 -1
  359. package/lib/utils/guides-cdn.js +1 -1
  360. package/lib/utils/http-client.js +1 -1
  361. package/lib/utils/is-non-interactive.js +1 -1
  362. package/lib/utils/logger.js +1 -1
  363. package/lib/utils/params.js +1 -1
  364. package/lib/utils/platform.js +1 -1
  365. package/lib/utils/sleep.js +1 -1
  366. package/lib/utils/template-replacer.js +1 -1
  367. package/lib/utils/update-notice.js +1 -1
  368. package/lib/utils/version.js +1 -1
  369. package/lib/utils/with-active-cookie.js +1 -1
  370. package/lib/utils/write-cli-side-channel.js +1 -1
  371. package/package.json +1 -1
  372. package/skills/rabetbase/SKILL.md +1 -1
  373. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  374. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  375. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x2e35cf,_0x2dad1c){const _0x256a58=a196_0x1791,_0x2fc73f=_0x2e35cf();while(!![]){try{const _0x53725a=-parseInt(_0x256a58(0xd5))/0x1*(-parseInt(_0x256a58(0xd8))/0x2)+-parseInt(_0x256a58(0xd7))/0x3+-parseInt(_0x256a58(0xdb))/0x4*(parseInt(_0x256a58(0xd4))/0x5)+parseInt(_0x256a58(0xd2))/0x6+parseInt(_0x256a58(0xd3))/0x7+-parseInt(_0x256a58(0xda))/0x8+parseInt(_0x256a58(0xd6))/0x9*(parseInt(_0x256a58(0xd9))/0xa);if(_0x53725a===_0x2dad1c)break;else _0x2fc73f['push'](_0x2fc73f['shift']());}catch(_0x4d6fc6){_0x2fc73f['push'](_0x2fc73f['shift']());}}}(a196_0x2c18,0x86701));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a196_0x1791(_0x2bc04b,_0x5ebf22){_0x2bc04b=_0x2bc04b-0xd2;const _0x2c188f=a196_0x2c18();let _0x17914d=_0x2c188f[_0x2bc04b];return _0x17914d;}function a196_0x2c18(){const _0x27dab2=['168abinFy','230uKMlOY','3171176BpxWKA','777052xBSojF','4514778YfMaBo','3309677kPEhPn','25wsnZpe','8354xdCBSy','286245oRSZHq','2220468UJknaE'];a196_0x2c18=function(){return _0x27dab2;};return a196_0x2c18();}
1
+ (function(_0x550c06,_0x29043f){const _0x3eef78=a196_0x1e56,_0xa74713=_0x550c06();while(!![]){try{const _0x41ab70=parseInt(_0x3eef78(0x1b8))/0x1+-parseInt(_0x3eef78(0x1b2))/0x2*(parseInt(_0x3eef78(0x1b4))/0x3)+parseInt(_0x3eef78(0x1b0))/0x4*(-parseInt(_0x3eef78(0x1b1))/0x5)+parseInt(_0x3eef78(0x1af))/0x6*(parseInt(_0x3eef78(0x1b6))/0x7)+parseInt(_0x3eef78(0x1b7))/0x8*(parseInt(_0x3eef78(0x1b3))/0x9)+-parseInt(_0x3eef78(0x1ba))/0xa*(-parseInt(_0x3eef78(0x1b5))/0xb)+-parseInt(_0x3eef78(0x1b9))/0xc;if(_0x41ab70===_0x29043f)break;else _0xa74713['push'](_0xa74713['shift']());}catch(_0x37eb4d){_0xa74713['push'](_0xa74713['shift']());}}}(a196_0x4a1b,0xaaec3));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x1e56(_0x3409ca,_0x4cad60){_0x3409ca=_0x3409ca-0x1af;const _0x4a1b90=a196_0x4a1b();let _0x1e5646=_0x4a1b90[_0x3409ca];return _0x1e5646;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a196_0x4a1b(){const _0x297e3d=['262682LMeNtA','8HPORxk','387561uSZhxY','4592496AOpzTZ','10qrBExG','210VOwowf','2605924xYCDMb','5rUzvRx','12582DlyLMM','1648926lFsVoX','342oqcXbT','6240047cfZYrh'];a196_0x4a1b=function(){return _0x297e3d;};return a196_0x4a1b();}
@@ -1 +1 @@
1
- const a197_0x9e85a2=a197_0x479c;(function(_0x2a068a,_0x567b42){const _0x4f91f0=a197_0x479c,_0x36884e=_0x2a068a();while(!![]){try{const _0x1a525c=parseInt(_0x4f91f0(0xe8))/0x1+parseInt(_0x4f91f0(0x123))/0x2*(-parseInt(_0x4f91f0(0x15c))/0x3)+-parseInt(_0x4f91f0(0xf9))/0x4+parseInt(_0x4f91f0(0xe6))/0x5+parseInt(_0x4f91f0(0xdd))/0x6+parseInt(_0x4f91f0(0x147))/0x7*(parseInt(_0x4f91f0(0xef))/0x8)+parseInt(_0x4f91f0(0x12d))/0x9*(parseInt(_0x4f91f0(0xf0))/0xa);if(_0x1a525c===_0x567b42)break;else _0x36884e['push'](_0x36884e['shift']());}catch(_0xf07a71){_0x36884e['push'](_0x36884e['shift']());}}}(a197_0x2930,0xdfcb4));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',a197_0x9e85a2(0x103),'DINGTALK',a197_0x9e85a2(0x104),a197_0x9e85a2(0x11a)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x9e85a2(0x146),'channelType',a197_0x9e85a2(0x114),a197_0x9e85a2(0x12f),a197_0x9e85a2(0xf4),a197_0x9e85a2(0x158),a197_0x9e85a2(0x116)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x9e85a2(0x13d),a197_0x9e85a2(0x15f),a197_0x9e85a2(0x111)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x9e85a2(0xea),a197_0x9e85a2(0xf2),'ccList',a197_0x9e85a2(0x106),a197_0x9e85a2(0xf7),a197_0x9e85a2(0x145),a197_0x9e85a2(0x102),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x9e85a2(0x141),'type':a197_0x9e85a2(0x13a),'required':![],'description':a197_0x9e85a2(0x11b)},{'name':'stdin','type':a197_0x9e85a2(0x133),'required':![],'default':![],'description':a197_0x9e85a2(0x12b)},{'name':a197_0x9e85a2(0x13f),'type':a197_0x9e85a2(0x13a),'required':![],'description':a197_0x9e85a2(0x13e)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x9e85a2(0x152),'required':!![],'description':a197_0x9e85a2(0x155)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x53d31a,_0x42be99,_0x8111fe){return new CliError(_0x53d31a,0x1,_0x42be99,_0x8111fe);}export function readNotificationId(_0x9ed7a1){const _0x1afc63=a197_0x9e85a2,_0x1c2d1e=_0x9ed7a1[_0x1afc63(0x139)]('id');if(!Number['isSafeInteger'](_0x1c2d1e)||_0x1c2d1e<=0x0)throw notificationError(_0x1afc63(0xdb),_0x1afc63(0x10e));return _0x1c2d1e;}export function requireNotificationExplicitYes(_0x323ca5){const _0x1c7ea5=a197_0x9e85a2;if(_0x323ca5[_0x1c7ea5(0xf3)](_0x1c7ea5(0x149))||_0x323ca5['bool'](_0x1c7ea5(0x128)))return;throw notificationError(_0x1c7ea5(0x10c),_0x1c7ea5(0xf1),_0x1c7ea5(0x124));}export function readNotificationChannelType(_0x9574b4,_0x2cab09='type',_0x4291ac='EMAIL'){const _0x5be0b5=a197_0x9e85a2,_0x554105=_0x9574b4[_0x5be0b5(0x15d)](_0x2cab09)[_0x5be0b5(0xde)]()||_0x4291ac;if(!NOTIFICATION_CHANNEL_TYPES[_0x5be0b5(0x13c)](_0x554105))throw CliErrors[_0x5be0b5(0xe0)]('Invalid\x20--'+_0x2cab09+':\x20'+_0x554105,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x5be0b5(0x156)](',\x20')+'.');return _0x554105;}export function assertSingleNotificationSource(_0x4ce423){const _0xbca546=a197_0x9e85a2,_0x5a7d24=[],_0x556a91=_0x4ce423['str']('file')[_0xbca546(0xde)]();if(_0x556a91)_0x5a7d24['push']({'kind':_0xbca546(0x141),'path':_0x556a91});if(_0x4ce423[_0xbca546(0xf3)](_0xbca546(0x125)))_0x5a7d24[_0xbca546(0xe5)]({'kind':_0xbca546(0x125)});const _0x103d68=_0x4ce423[_0xbca546(0x15d)](_0xbca546(0x13f))['trim']();if(_0x103d68)_0x5a7d24[_0xbca546(0xe5)]({'kind':_0xbca546(0xfc),'name':_0x103d68});if(_0x5a7d24[_0xbca546(0x10d)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0xbca546(0xe1));if(_0x5a7d24['length']>0x1)throw CliErrors[_0xbca546(0xe0)](_0xbca546(0x108),_0xbca546(0xe1));return _0x5a7d24[0x0];}export async function readNotificationDocument(_0x4e8cde,_0x5cb85c){const _0x4589a2=a197_0x9e85a2,_0x23e152=assertSingleNotificationSource(_0x4e8cde),_0x2f5797=_0x23e152[_0x4589a2(0x130)]===_0x4589a2(0x141)?_0x4589a2(0x121)+_0x23e152[_0x4589a2(0x100)]:_0x23e152['kind']==='env'?_0x4589a2(0x132)+_0x23e152[_0x4589a2(0x11f)]:_0x4589a2(0x125);let _0x165a0c;try{if(_0x23e152['kind']===_0x4589a2(0x141))_0x165a0c=await readFile(_0x23e152[_0x4589a2(0x100)],'utf8');else{if(_0x23e152[_0x4589a2(0x130)]===_0x4589a2(0xfc)){if(!(_0x23e152[_0x4589a2(0x11f)]in process.env))throw notificationError(_0x4589a2(0x138),_0x4589a2(0xfa)+_0x23e152[_0x4589a2(0x11f)]);_0x165a0c=process.env[_0x23e152.name]??'';}else _0x165a0c=await readStdin();}}catch(_0xb8576a){if(_0xb8576a instanceof CliError)throw _0xb8576a;throw notificationError('notification_config_source_unavailable',_0x4589a2(0x136)+_0x2f5797+'.');}let _0x3e2d74;try{_0x3e2d74=JSON[_0x4589a2(0x14a)](_0x165a0c);}catch{throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x2f5797+_0x4589a2(0x151),_0x4589a2(0x14c));}if(!isJsonObject(_0x3e2d74))throw notificationError(_0x4589a2(0x13b),'Notification\x20JSON\x20from\x20'+_0x2f5797+_0x4589a2(0x142));return validateNotificationDocument(_0x3e2d74,_0x5cb85c);}export function projectNotificationListConfig(_0x2af762,_0x1e4b42){const _0x1fad12=a197_0x9e85a2;return{'id':typeof _0x2af762['id']===_0x1fad12(0x152)?_0x2af762['id']:null,'configCode':requireResponseString(_0x2af762[_0x1fad12(0x15f)],'configCode',_0x1e4b42),'configName':requireResponseString(_0x2af762['configName'],_0x1fad12(0x146),_0x1e4b42),'channelType':requireResponseString(_0x2af762['channelType'],'channelType',_0x1e4b42),'description':normalizeNullableString(_0x2af762[_0x1fad12(0xf4)]),'createTime':normalizeNullableString(_0x2af762[_0x1fad12(0xf6)]),'updateTime':normalizeNullableString(_0x2af762[_0x1fad12(0xdf)])};}export function normalizeExactNotificationConfig(_0x19a8b8,_0x33fa2e,_0x5ddac5){const _0x4d40c7=a197_0x9e85a2;if(!Number['isSafeInteger'](_0x19a8b8['id'])||_0x19a8b8['id']!==_0x33fa2e)throw notificationError(_0x4d40c7(0xff),_0x4d40c7(0xda)+_0x33fa2e+'.');if(_0x19a8b8[_0x4d40c7(0x13d)]!==_0x5ddac5)throw notificationError(_0x4d40c7(0xff),_0x4d40c7(0x154)+_0x33fa2e+_0x4d40c7(0xfb));const _0x55f96a=requireExactString(_0x19a8b8[_0x4d40c7(0x146)],_0x4d40c7(0x146),_0x33fa2e),_0x407b1a=requireExactString(_0x19a8b8[_0x4d40c7(0x15f)],_0x4d40c7(0x15f),_0x33fa2e),_0x5e8b3a=requireExactString(_0x19a8b8[_0x4d40c7(0x157)],_0x4d40c7(0x157),_0x33fa2e);if(!NOTIFICATION_CHANNEL_TYPES[_0x4d40c7(0x13c)](_0x5e8b3a))throw notificationError(_0x4d40c7(0xff),_0x4d40c7(0x154)+_0x33fa2e+'\x20has\x20an\x20unsupported\x20channelType.');const _0x4884d0=responseNullableString(_0x19a8b8['endpointUrl'],_0x4d40c7(0x114),_0x33fa2e),_0x464960=responseNullableString(_0x19a8b8[_0x4d40c7(0x12f)],_0x4d40c7(0x12f),_0x33fa2e),_0x2d4b03=responseNullableString(_0x19a8b8[_0x4d40c7(0xf4)],_0x4d40c7(0xf4),_0x33fa2e),_0x441a54=responseNullableTimeout(_0x19a8b8['connectTimeout'],_0x4d40c7(0x158),_0x33fa2e),_0x34a6df=responseNullableTimeout(_0x19a8b8[_0x4d40c7(0x116)],_0x4d40c7(0x116),_0x33fa2e);return{'id':_0x33fa2e,'appCode':_0x5ddac5,'configCode':_0x407b1a,'configName':_0x55f96a,'channelType':_0x5e8b3a,'endpointUrl':redactSensitive(_0x4884d0),'channelConfig':redactSensitive(_0x464960),'description':_0x2d4b03,'connectTimeout':_0x441a54,'readTimeout':_0x34a6df,'endpointUrlRaw':_0x4884d0,'channelConfigRaw':_0x464960};}export async function requireExactNotificationConfig(_0xd2a8db,_0x9a2e88,_0x2258ef){const _0x345bb4=a197_0x9e85a2;let _0x12d1ea;try{_0x12d1ea=await getNotificationChannelConfig(_0x9a2e88,_0xd2a8db);}catch{throw safeApiFailure(_0x2258ef,'preflight','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0xd2a8db+_0x345bb4(0x10f));}return normalizeExactNotificationConfig(_0x12d1ea,_0x9a2e88,_0xd2a8db);}export function projectNotificationConfig(_0x539da3){const _0x188b9c=a197_0x9e85a2;return{'id':_0x539da3['id']??null,'appCode':_0x539da3[_0x188b9c(0x13d)],'configCode':_0x539da3['configCode']??null,'configName':_0x539da3['configName'],'channelType':_0x539da3[_0x188b9c(0x157)],'endpointUrl':redactSensitive(_0x539da3[_0x188b9c(0x114)]),'channelConfig':redactSensitive(_0x539da3[_0x188b9c(0x12f)]),'description':_0x539da3[_0x188b9c(0xf4)]??null,'connectTimeout':_0x539da3[_0x188b9c(0x158)]??null,'readTimeout':_0x539da3[_0x188b9c(0x116)]??null};}export function notificationSelector(_0x1bca7c){const _0x1f4ce4=a197_0x9e85a2;return{'appCode':_0x1bca7c[_0x1f4ce4(0x13d)],'id':_0x1bca7c['id'],'configCode':_0x1bca7c['configCode'],'configName':_0x1bca7c[_0x1f4ce4(0x146)],'channelType':_0x1bca7c['channelType']};}export function createMutationInput(_0x3cf9ea,_0x4518d6){const _0x2dca69=a197_0x9e85a2;return{'appCode':_0x3cf9ea,'configName':_0x4518d6[_0x2dca69(0x146)],'channelType':_0x4518d6[_0x2dca69(0x157)],...hasOwn(_0x4518d6,'endpointUrl')?{'endpointUrl':_0x4518d6[_0x2dca69(0x114)]}:{},...hasOwn(_0x4518d6,_0x2dca69(0x12f))?{'channelConfig':serializeChannelConfig(_0x4518d6[_0x2dca69(0x12f)])}:{},...hasOwn(_0x4518d6,_0x2dca69(0xf4))?{'description':_0x4518d6[_0x2dca69(0xf4)]}:{},...hasOwn(_0x4518d6,'connectTimeout')?{'connectTimeout':_0x4518d6[_0x2dca69(0x158)]}:{},...hasOwn(_0x4518d6,'readTimeout')?{'readTimeout':_0x4518d6['readTimeout']}:{}};}export function mergeUpdateInput(_0x5c4365,_0x2401df){const _0x1e5cd8=a197_0x9e85a2;return{'id':_0x5c4365['id'],'appCode':_0x5c4365['appCode'],'configName':_0x2401df[_0x1e5cd8(0x146)]??_0x5c4365[_0x1e5cd8(0x146)],'channelType':_0x2401df[_0x1e5cd8(0x157)]??_0x5c4365[_0x1e5cd8(0x157)],'endpointUrl':hasOwn(_0x2401df,_0x1e5cd8(0x114))?_0x2401df[_0x1e5cd8(0x114)]:_0x5c4365[_0x1e5cd8(0x113)],'channelConfig':hasOwn(_0x2401df,_0x1e5cd8(0x12f))?serializeChannelConfig(_0x2401df['channelConfig']):_0x5c4365[_0x1e5cd8(0x140)],'description':hasOwn(_0x2401df,_0x1e5cd8(0xf4))?_0x2401df[_0x1e5cd8(0xf4)]:_0x5c4365[_0x1e5cd8(0xf4)],'connectTimeout':hasOwn(_0x2401df,_0x1e5cd8(0x158))?_0x2401df['connectTimeout']:_0x5c4365['connectTimeout'],'readTimeout':hasOwn(_0x2401df,_0x1e5cd8(0x116))?_0x2401df['readTimeout']:_0x5c4365[_0x1e5cd8(0x116)]};}export function plannedUpdateProjection(_0x319333,_0xc35160){const _0x17d4e5=a197_0x9e85a2;return projectNotificationConfig({'id':_0x319333['id'],'appCode':_0x319333['appCode'],'configCode':_0x319333[_0x17d4e5(0x15f)],'configName':_0xc35160[_0x17d4e5(0x146)]??_0x319333[_0x17d4e5(0x146)],'channelType':_0xc35160[_0x17d4e5(0x157)]??_0x319333[_0x17d4e5(0x157)],'endpointUrl':hasOwn(_0xc35160,_0x17d4e5(0x114))?_0xc35160[_0x17d4e5(0x114)]:_0x319333['endpointUrlRaw'],'channelConfig':hasOwn(_0xc35160,_0x17d4e5(0x12f))?_0xc35160[_0x17d4e5(0x12f)]:_0x319333[_0x17d4e5(0x140)],'description':hasOwn(_0xc35160,_0x17d4e5(0xf4))?_0xc35160[_0x17d4e5(0xf4)]:_0x319333[_0x17d4e5(0xf4)],'connectTimeout':hasOwn(_0xc35160,_0x17d4e5(0x158))?_0xc35160[_0x17d4e5(0x158)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x319333['connectTimeout'],'readTimeout':hasOwn(_0xc35160,_0x17d4e5(0x116))?_0xc35160[_0x17d4e5(0x116)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x319333['readTimeout']});}export function requestedSafeFieldsMatch(_0x499db9,_0xe282ac,_0x4941eb){const _0x334a12=a197_0x9e85a2,_0x354b41=[],_0x2a7706=[],_0x276199=[];for(const _0x2c0616 of[_0x334a12(0x146),_0x334a12(0x157),_0x334a12(0xf4)]){if(!hasOwn(_0x4941eb,_0x2c0616))continue;_0x276199[_0x334a12(0xe5)](_0x2c0616),_0x354b41['push'](_0xe282ac[_0x2c0616]===_0x4941eb[_0x2c0616]),_0x2a7706['push'](_0x499db9[_0x2c0616]!==_0x4941eb[_0x2c0616]&&_0xe282ac[_0x2c0616]===_0x4941eb[_0x2c0616]);}for(const _0xf6b079 of[_0x334a12(0x158),_0x334a12(0x116)]){if(!hasOwn(_0x4941eb,_0xf6b079))continue;const _0x16fa62=_0x4941eb[_0xf6b079]??(_0xf6b079===_0x334a12(0x158)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x276199[_0x334a12(0xe5)](_0xf6b079),_0x354b41[_0x334a12(0xe5)](_0xe282ac[_0xf6b079]===_0x16fa62),_0x2a7706[_0x334a12(0xe5)](_0x499db9[_0xf6b079]!==_0x16fa62&&_0xe282ac[_0xf6b079]===_0x16fa62);}return hasOwn(_0x4941eb,_0x334a12(0x114))&&_0x4941eb['endpointUrl']===null&&(_0x276199[_0x334a12(0xe5)]('endpointUrl:null'),_0x354b41[_0x334a12(0xe5)](_0xe282ac[_0x334a12(0x113)]===null||_0xe282ac[_0x334a12(0x113)]===''),_0x2a7706['push'](_0x499db9['endpointUrlRaw']!==null&&_0x499db9[_0x334a12(0x113)]!==''&&(_0xe282ac[_0x334a12(0x113)]===null||_0xe282ac[_0x334a12(0x113)]===''))),{'allMatch':_0x354b41['every'](Boolean),'provesChange':_0x2a7706[_0x334a12(0x11d)](Boolean),'verifiedFields':_0x276199};}export function validateNotificationDeleteReadback(_0x25a2c8,_0xe06e59,_0x230664){const _0x346b61=a197_0x9e85a2;for(const [_0x3a8fc4,_0x1a6bd8]of _0x25a2c8[_0x346b61(0x11c)]()){if(!Number[_0x346b61(0x131)](_0x1a6bd8['id'])||_0x1a6bd8['id']<=0x0)throw notificationError(_0x346b61(0xff),'Notification\x20config\x20list\x20item\x20'+(_0x3a8fc4+0x1)+_0x346b61(0x118));if(_0x1a6bd8[_0x346b61(0x13d)]!==_0xe06e59)throw notificationError('notification_config_response_invalid',_0x346b61(0xfe)+(_0x3a8fc4+0x1)+_0x346b61(0xec));if(_0x1a6bd8[_0x346b61(0x157)]!==_0x230664)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x3a8fc4+0x1)+_0x346b61(0xf8));}}export function safeApiFailure(_0x2dfb63,_0x43e338,_0x502fbd){const _0x305b59=a197_0x9e85a2;return notificationError(_0x305b59(0x15e)+_0x2dfb63+'_'+(_0x43e338===_0x305b59(0x119)?_0x305b59(0x129):_0x43e338+_0x305b59(0xe2)),_0x305b59(0x154)+_0x2dfb63+'\x20'+_0x43e338+_0x305b59(0x14b),_0x502fbd);}export function notificationLookupCommand(_0x44162c,_0x36c807){const _0x548566=a197_0x9e85a2;return _0x548566(0x137)+_0x44162c+_0x548566(0x112)+_0x36c807+_0x548566(0xee);}function validateNotificationDocument(_0x41fba6,_0x5bdb26){const _0x1d8384=a197_0x9e85a2;for(const _0x2e07c0 of Object[_0x1d8384(0x14e)](_0x41fba6)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1d8384(0xe3)](_0x2e07c0))throw notificationError(_0x1d8384(0xdc),'Notification\x20JSON\x20field\x20\x22'+_0x2e07c0+_0x1d8384(0xe7));if(!ALLOWED_INPUT_FIELDS[_0x1d8384(0xe3)](_0x2e07c0))throw notificationError(_0x1d8384(0x150),_0x1d8384(0x15b)+_0x2e07c0+'\x22.');}if(_0x5bdb26==='update'&&Object[_0x1d8384(0x14e)](_0x41fba6)['length']===0x0)throw notificationError(_0x1d8384(0x109),_0x1d8384(0x127));const _0x568a86={};if(hasOwn(_0x41fba6,_0x1d8384(0x146)))_0x568a86[_0x1d8384(0x146)]=validateRequiredString(_0x41fba6[_0x1d8384(0x146)],_0x1d8384(0x146),0x80);else{if(_0x5bdb26===_0x1d8384(0xe4))throw notificationError(_0x1d8384(0x135),_0x1d8384(0x11e)+_0x1d8384(0x105));}if(hasOwn(_0x41fba6,_0x1d8384(0x157))){if(typeof _0x41fba6[_0x1d8384(0x157)]!==_0x1d8384(0x13a))throw invalidFieldType(_0x1d8384(0x157),_0x1d8384(0x12c));const _0x568cef=_0x41fba6[_0x1d8384(0x157)][_0x1d8384(0xde)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1d8384(0x13c)](_0x568cef))throw notificationError(_0x1d8384(0x115),_0x1d8384(0x14f),_0x1d8384(0x143)+NOTIFICATION_CHANNEL_TYPES[_0x1d8384(0x156)](',\x20')+'.');_0x568a86[_0x1d8384(0x157)]=_0x568cef;}else{if(_0x5bdb26==='create')throw notificationError(_0x1d8384(0x135),_0x1d8384(0x11e)+_0x1d8384(0x101));}for(const [_0x87db04,_0x14f56f]of[[_0x1d8384(0x114),0x200],[_0x1d8384(0xf4),0x100]]){if(!hasOwn(_0x41fba6,_0x87db04))continue;const _0x393212=_0x41fba6[_0x87db04];if(_0x393212!==null&&typeof _0x393212!==_0x1d8384(0x13a))throw invalidFieldType(_0x87db04,_0x1d8384(0x120));if(typeof _0x393212===_0x1d8384(0x13a)&&_0x393212[_0x1d8384(0x10d)]>_0x14f56f)throw notificationError(_0x1d8384(0x115),_0x1d8384(0x14d)+_0x87db04+'\x22\x20cannot\x20exceed\x20'+_0x14f56f+'\x20characters.');_0x568a86[_0x87db04]=_0x393212;}if(hasOwn(_0x41fba6,'channelConfig')){const _0x2c38c6=_0x41fba6[_0x1d8384(0x12f)];if(_0x2c38c6===null&&_0x5bdb26===_0x1d8384(0xe4))throw invalidFieldType(_0x1d8384(0x12f),_0x1d8384(0x153));if(_0x2c38c6!==null&&!isJsonObject(_0x2c38c6))throw invalidFieldType(_0x1d8384(0x12f),_0x5bdb26==='update'?_0x1d8384(0x122):_0x1d8384(0x153));_0x2c38c6!==null&&validateChannelConfigFields(_0x568a86[_0x1d8384(0x157)],_0x2c38c6),_0x568a86[_0x1d8384(0x12f)]=_0x2c38c6;}for(const _0x2c8779 of[_0x1d8384(0x158),'readTimeout']){if(!hasOwn(_0x41fba6,_0x2c8779))continue;const _0x44ecb2=_0x41fba6[_0x2c8779];if(_0x44ecb2!==null&&(!Number['isSafeInteger'](_0x44ecb2)||_0x44ecb2<0x0))throw notificationError(_0x1d8384(0x115),'Notification\x20JSON\x20field\x20\x22'+_0x2c8779+_0x1d8384(0x110));_0x568a86[_0x2c8779]=_0x44ecb2;}return _0x568a86;}function validateRequiredString(_0x301d02,_0x3ef287,_0x21f4aa){const _0x25346a=a197_0x9e85a2;if(typeof _0x301d02!==_0x25346a(0x13a))throw invalidFieldType(_0x3ef287,_0x25346a(0x117));const _0x3285ad=_0x301d02[_0x25346a(0xde)]();if(!_0x3285ad)throw notificationError(_0x25346a(0x115),_0x25346a(0x14d)+_0x3ef287+_0x25346a(0xfd));if(_0x3285ad[_0x25346a(0x10d)]>_0x21f4aa)throw notificationError(_0x25346a(0x115),_0x25346a(0x14d)+_0x3ef287+'\x22\x20cannot\x20exceed\x20'+_0x21f4aa+'\x20characters.');return _0x3285ad;}function validateChannelConfigFields(_0xf9f69,_0x29eea2){const _0x2d6073=a197_0x9e85a2;if(hasOwn(_0x29eea2,_0x2d6073(0x12e)))throw forbiddenChannelConfigField(_0x2d6073(0x12e));if(_0xf9f69===_0x2d6073(0x12a))for(const _0xc8ac6c of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x29eea2,_0xc8ac6c))throw forbiddenChannelConfigField(_0xc8ac6c);}}function forbiddenChannelConfigField(_0x3f2f95){const _0x33fbff=a197_0x9e85a2;return notificationError(_0x33fbff(0x159),_0x33fbff(0x15a)+_0x3f2f95+_0x33fbff(0x134));}function invalidFieldType(_0x1cc9b3,_0x2c1e35){const _0x328564=a197_0x9e85a2;return notificationError(_0x328564(0x115),_0x328564(0x14d)+_0x1cc9b3+_0x328564(0xf5)+_0x2c1e35+'.');}function serializeChannelConfig(_0x18958f){const _0x1932dc=a197_0x9e85a2;return _0x18958f===null||_0x18958f===undefined?null:JSON[_0x1932dc(0x148)](_0x18958f);}function redactSensitive(_0x2ee812){return _0x2ee812===null||_0x2ee812===undefined||_0x2ee812===''?null:'<redacted>';}function a197_0x2930(){const _0x5d80af=['WEBHOOK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','entries','some','Create\x20JSON\x20requires\x20field\x20','name','a\x20string\x20or\x20null','file\x20','a\x20JSON\x20object\x20or\x20null','43260PjfOuL','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stdin','object','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','yes','failed','EMAIL','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','a\x20supported\x20string','502047rxtHzU','messageTemplate','channelConfig','kind','isSafeInteger','environment\x20variable\x20','boolean','\x22\x20is\x20forbidden.','notification_config_field_required','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_source_unavailable','num','string','notification_config_json_invalid','includes','appCode','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','from-env','channelConfigRaw','file','\x20must\x20be\x20an\x20object.','Allowed\x20values:\x20','Item\x20','subjectPrefix','configName','3693858SLvOMC','stringify','dry-run','parse','\x20failed.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Notification\x20JSON\x20field\x20\x22','keys','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','notification_config_field_unknown','\x20is\x20invalid.','number','a\x20JSON\x20object','Notification\x20config\x20','Application-level\x20notification\x20config\x20ID','join','channelType','connectTimeout','notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Unknown\x20notification\x20JSON\x20field\x20\x22','222ONHBkW','str','notification_config_','configCode','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','notification_config_id_invalid','notification_config_field_forbidden','1902258XTAJkM','trim','updateTime','validation','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','_unavailable','has','create','push','5450950DfLQvS','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','280123DWWrXI','\x20has\x20invalid\x20field\x20\x22','emailTargets','\x20is\x20missing\x20required\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','isArray','\x20--format\x20compress','16XpXBCJ','240pNiwga','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','recipients','bool','description','\x22\x20must\x20be\x20','createTime','replyTo','\x20has\x20an\x20invalid\x20channelType.','6257024xEeMBM','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','env','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20config\x20list\x20item\x20','notification_config_response_invalid','path','\x22channelType\x22.','fromName','FEISHU','WECOM','\x22configName\x22.','bccList','setEncoding','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_update_empty','hasOwnProperty','apiError','notification_config_confirmation_required','length','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','channelCode','\x20--type\x20','endpointUrlRaw','endpointUrl','notification_config_field_invalid','readTimeout','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20id.','mutation'];a197_0x2930=function(){return _0x5d80af;};return a197_0x2930();}function requireResponseString(_0x34885c,_0x378576,_0x115a56){const _0x5722a5=a197_0x9e85a2;if(typeof _0x34885c!=='string'||_0x34885c[_0x5722a5(0xde)]()==='')throw CliErrors[_0x5722a5(0x10b)]('Invalid\x20notification\x20config\x20response.',_0x5722a5(0x144)+(_0x115a56+0x1)+_0x5722a5(0xeb)+_0x378576+'\x22.');return _0x34885c['trim']();}function a197_0x479c(_0x89e3c2,_0x430cc6){_0x89e3c2=_0x89e3c2-0xda;const _0x293054=a197_0x2930();let _0x479c48=_0x293054[_0x89e3c2];return _0x479c48;}function requireExactString(_0x4d37e5,_0x9518bf,_0x9dbd3a){const _0xb20fe6=a197_0x9e85a2;if(typeof _0x4d37e5!==_0xb20fe6(0x13a)||_0x4d37e5[_0xb20fe6(0xde)]()==='')throw notificationError(_0xb20fe6(0xff),_0xb20fe6(0x154)+_0x9dbd3a+_0xb20fe6(0xeb)+_0x9518bf+'\x22.');return _0x4d37e5['trim']();}function responseNullableString(_0x1e19c3,_0x5bec99,_0x187640){const _0x24ead8=a197_0x9e85a2;if(_0x1e19c3===undefined||_0x1e19c3===null)return null;if(typeof _0x1e19c3!==_0x24ead8(0x13a))throw notificationError(_0x24ead8(0xff),'Notification\x20config\x20'+_0x187640+_0x24ead8(0xe9)+_0x5bec99+'\x22.');return _0x1e19c3;}function responseNullableTimeout(_0x8eedd4,_0x51078e,_0xbfbe44){const _0x4f299b=a197_0x9e85a2;if(_0x8eedd4===undefined||_0x8eedd4===null)return null;if(!Number[_0x4f299b(0x131)](_0x8eedd4)||_0x8eedd4<0x0)throw notificationError(_0x4f299b(0xff),_0x4f299b(0x154)+_0xbfbe44+_0x4f299b(0xe9)+_0x51078e+'\x22.');return _0x8eedd4;}function normalizeNullableString(_0x5e829f){return typeof _0x5e829f==='string'?_0x5e829f:null;}function isJsonObject(_0x56819b){const _0x501811=a197_0x9e85a2;return _0x56819b!==null&&typeof _0x56819b===_0x501811(0x126)&&!Array[_0x501811(0xed)](_0x56819b);}function hasOwn(_0x10da83,_0xfd3c95){const _0x5c5c35=a197_0x9e85a2;return Object['prototype'][_0x5c5c35(0x10a)]['call'](_0x10da83,_0xfd3c95);}async function readStdin(){const _0x555f44=a197_0x9e85a2;let _0x132c51='';process[_0x555f44(0x125)][_0x555f44(0x107)]('utf8');for await(const _0x1519d0 of process['stdin'])_0x132c51+=_0x1519d0;return _0x132c51;}
1
+ const a197_0x5297c2=a197_0x28ce;(function(_0xfc9d69,_0x82ba3a){const _0x5d5f66=a197_0x28ce,_0x1abee8=_0xfc9d69();while(!![]){try{const _0x33eece=-parseInt(_0x5d5f66(0x226))/0x1*(-parseInt(_0x5d5f66(0x1f1))/0x2)+-parseInt(_0x5d5f66(0x20d))/0x3*(parseInt(_0x5d5f66(0x200))/0x4)+-parseInt(_0x5d5f66(0x1c4))/0x5*(parseInt(_0x5d5f66(0x1df))/0x6)+parseInt(_0x5d5f66(0x237))/0x7+-parseInt(_0x5d5f66(0x1c8))/0x8+parseInt(_0x5d5f66(0x21f))/0x9+parseInt(_0x5d5f66(0x236))/0xa;if(_0x33eece===_0x82ba3a)break;else _0x1abee8['push'](_0x1abee8['shift']());}catch(_0x1c4444){_0x1abee8['push'](_0x1abee8['shift']());}}}(a197_0x1773,0x4deb8));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';function a197_0x1773(){const _0x50ea2c=['notification_config_','Invalid\x20notification\x20config\x20response.','endpointUrlRaw','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','a\x20JSON\x20object\x20or\x20null','notification_config_json_invalid','\x20--format\x20compress','parse','\x22\x20cannot\x20exceed\x20','\x22configName\x22.','subjectPrefix','endpointUrl','channelConfig','notification_config_update_empty','WECOM','2XUDjhg','create','notification_config_response_invalid','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Application-level\x20notification\x20config\x20ID','configName','kind','from-env','a\x20supported\x20string','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','number','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','setEncoding','trim','196216SigkIs','length','update','utf8','join','channelConfigRaw','apiError','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','bool','\x20failed.','Invalid\x20--','str','18PFBnrv','notification_config_source_unavailable','configCode','Create\x20JSON\x20requires\x20field\x20','boolean','environment\x20variable\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20has\x20an\x20invalid\x20appCode.','\x20must\x20be\x20an\x20object.','push','Item\x20','messageTemplate','\x20has\x20an\x20invalid\x20channelType.','replyTo','isSafeInteger','mutation','a\x20JSON\x20object','\x20is\x20missing\x20required\x20field\x20\x22','1440855RbyifI','ccList','EMAIL','has','\x20characters.','Unknown\x20notification\x20JSON\x20field\x20\x22','stringify','342569gEVREe','a\x20string\x20or\x20null','notification_config_field_unknown','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20--type\x20','path','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Allowed\x20values:\x20','stdin','includes','connectTimeout','FEISHU','notification_config_field_invalid','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20JSON\x20from\x20','1862890lHUhtv','3842902BDZCxH','notification_config_confirmation_required','notification_config_id_invalid','file\x20','a\x20non-empty\x20string','description','Notification\x20config\x20','keys','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_field_required','\x20has\x20invalid\x20field\x20\x22','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x22\x20is\x20forbidden.','5SHJREU','prototype','channelCode','rabetbase\x20notification\x20config-list\x20--appcode\x20','436128vodnXh','\x20is\x20invalid.','hasOwnProperty','WEBHOOK','failed','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','file','notification_config_channel_field_forbidden','Notification\x20config\x20list\x20item\x20','string','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','dry-run','channelType','env','call','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','recipients','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','validation','updateTime','name','endpointUrl:null','readTimeout','3419634NELCqg'];a197_0x1773=function(){return _0x50ea2c;};return a197_0x1773();}import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x5297c2(0x221),a197_0x5297c2(0x231),'DINGTALK',a197_0x5297c2(0x1f0),a197_0x5297c2(0x1cb)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x5297c2(0x1f7),'channelType',a197_0x5297c2(0x1ed),'channelConfig',a197_0x5297c2(0x23c),a197_0x5297c2(0x230),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x5297c2(0x1f4),a197_0x5297c2(0x20f),a197_0x5297c2(0x1c6)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x5297c2(0x1d8),a197_0x5297c2(0x220),'bccList',a197_0x5297c2(0x21a),a197_0x5297c2(0x1ec),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x5297c2(0x1ce),'type':a197_0x5297c2(0x1d1),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a197_0x5297c2(0x22e),'type':a197_0x5297c2(0x211),'required':![],'default':![],'description':a197_0x5297c2(0x234)},{'name':'from-env','type':a197_0x5297c2(0x1d1),'required':![],'description':a197_0x5297c2(0x1cd)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x5297c2(0x1fc),'required':!![],'description':a197_0x5297c2(0x1f6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3cf4d8,_0x270d7f,_0x41e511){return new CliError(_0x3cf4d8,0x1,_0x270d7f,_0x41e511);}export function readNotificationId(_0x1a6e16){const _0x30ebf6=a197_0x5297c2,_0x1248f9=_0x1a6e16['num']('id');if(!Number['isSafeInteger'](_0x1248f9)||_0x1248f9<=0x0)throw notificationError(_0x30ebf6(0x239),_0x30ebf6(0x213));return _0x1248f9;}export function requireNotificationExplicitYes(_0x40ebde){const _0x554030=a197_0x5297c2;if(_0x40ebde[_0x554030(0x209)](_0x554030(0x1d3))||_0x40ebde[_0x554030(0x209)]('yes'))return;throw notificationError(_0x554030(0x238),_0x554030(0x1fd),_0x554030(0x1f5));}export function readNotificationChannelType(_0x1f13f9,_0x557f4='type',_0x116d66='EMAIL'){const _0x262ae0=a197_0x5297c2,_0x538578=_0x1f13f9[_0x262ae0(0x20c)](_0x557f4)[_0x262ae0(0x1ff)]()||_0x116d66;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x538578))throw CliErrors[_0x262ae0(0x1da)](_0x262ae0(0x20b)+_0x557f4+':\x20'+_0x538578,_0x262ae0(0x22d)+NOTIFICATION_CHANNEL_TYPES[_0x262ae0(0x204)](',\x20')+'.');return _0x538578;}export function assertSingleNotificationSource(_0x43ff54){const _0x5434e2=a197_0x5297c2,_0x2c5ee4=[],_0x11879f=_0x43ff54[_0x5434e2(0x20c)](_0x5434e2(0x1ce))[_0x5434e2(0x1ff)]();if(_0x11879f)_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x1ce),'path':_0x11879f});if(_0x43ff54[_0x5434e2(0x209)](_0x5434e2(0x22e)))_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x22e)});const _0xfca172=_0x43ff54[_0x5434e2(0x20c)](_0x5434e2(0x1f9))['trim']();if(_0xfca172)_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x1d5),'name':_0xfca172});if(_0x2c5ee4[_0x5434e2(0x201)]===0x0)throw CliErrors[_0x5434e2(0x1da)]('Missing\x20notification\x20JSON\x20source.',_0x5434e2(0x207));if(_0x2c5ee4['length']>0x1)throw CliErrors[_0x5434e2(0x1da)](_0x5434e2(0x23f),_0x5434e2(0x207));return _0x2c5ee4[0x0];}export async function readNotificationDocument(_0x3f2692,_0x5ab45e){const _0x23d927=a197_0x5297c2,_0x180dc4=assertSingleNotificationSource(_0x3f2692),_0x39c7fe=_0x180dc4['kind']==='file'?_0x23d927(0x23a)+_0x180dc4[_0x23d927(0x22b)]:_0x180dc4[_0x23d927(0x1f8)]===_0x23d927(0x1d5)?_0x23d927(0x212)+_0x180dc4[_0x23d927(0x1dc)]:_0x23d927(0x22e);let _0x153aa2;try{if(_0x180dc4[_0x23d927(0x1f8)]===_0x23d927(0x1ce))_0x153aa2=await readFile(_0x180dc4['path'],'utf8');else{if(_0x180dc4['kind']===_0x23d927(0x1d5)){if(!(_0x180dc4[_0x23d927(0x1dc)]in process.env))throw notificationError(_0x23d927(0x20e),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x180dc4['name']);_0x153aa2=process.env[_0x180dc4.name]??'';}else _0x153aa2=await readStdin();}}catch(_0x463678){if(_0x463678 instanceof CliError)throw _0x463678;throw notificationError(_0x23d927(0x20e),_0x23d927(0x1c2)+_0x39c7fe+'.');}let _0x379f9c;try{_0x379f9c=JSON[_0x23d927(0x1e9)](_0x153aa2);}catch{throw notificationError('notification_config_json_invalid',_0x23d927(0x235)+_0x39c7fe+_0x23d927(0x1c9),_0x23d927(0x233));}if(!isJsonObject(_0x379f9c))throw notificationError(_0x23d927(0x1e7),_0x23d927(0x235)+_0x39c7fe+_0x23d927(0x215));return validateNotificationDocument(_0x379f9c,_0x5ab45e);}export function projectNotificationListConfig(_0x1e1d95,_0x1b7378){const _0x41c96d=a197_0x5297c2;return{'id':typeof _0x1e1d95['id']===_0x41c96d(0x1fc)?_0x1e1d95['id']:null,'configCode':requireResponseString(_0x1e1d95[_0x41c96d(0x20f)],'configCode',_0x1b7378),'configName':requireResponseString(_0x1e1d95[_0x41c96d(0x1f7)],'configName',_0x1b7378),'channelType':requireResponseString(_0x1e1d95[_0x41c96d(0x1d4)],'channelType',_0x1b7378),'description':normalizeNullableString(_0x1e1d95['description']),'createTime':normalizeNullableString(_0x1e1d95['createTime']),'updateTime':normalizeNullableString(_0x1e1d95[_0x41c96d(0x1db)])};}export function normalizeExactNotificationConfig(_0x10be21,_0x37e1ae,_0x577e93){const _0x51affe=a197_0x5297c2;if(!Number[_0x51affe(0x21b)](_0x10be21['id'])||_0x10be21['id']!==_0x37e1ae)throw notificationError(_0x51affe(0x1f3),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x37e1ae+'.');if(_0x10be21['appCode']!==_0x577e93)throw notificationError(_0x51affe(0x1f3),_0x51affe(0x23d)+_0x37e1ae+_0x51affe(0x1d9));const _0x39f964=requireExactString(_0x10be21['configName'],_0x51affe(0x1f7),_0x37e1ae),_0x202e90=requireExactString(_0x10be21[_0x51affe(0x20f)],_0x51affe(0x20f),_0x37e1ae),_0x40da44=requireExactString(_0x10be21[_0x51affe(0x1d4)],_0x51affe(0x1d4),_0x37e1ae);if(!NOTIFICATION_CHANNEL_TYPES[_0x51affe(0x22f)](_0x40da44))throw notificationError(_0x51affe(0x1f3),_0x51affe(0x23d)+_0x37e1ae+'\x20has\x20an\x20unsupported\x20channelType.');const _0x109121=responseNullableString(_0x10be21[_0x51affe(0x1ed)],_0x51affe(0x1ed),_0x37e1ae),_0x3e1354=responseNullableString(_0x10be21[_0x51affe(0x1ee)],_0x51affe(0x1ee),_0x37e1ae),_0x4970cd=responseNullableString(_0x10be21['description'],_0x51affe(0x23c),_0x37e1ae),_0x476274=responseNullableTimeout(_0x10be21['connectTimeout'],'connectTimeout',_0x37e1ae),_0x99a58e=responseNullableTimeout(_0x10be21[_0x51affe(0x1de)],_0x51affe(0x1de),_0x37e1ae);return{'id':_0x37e1ae,'appCode':_0x577e93,'configCode':_0x202e90,'configName':_0x39f964,'channelType':_0x40da44,'endpointUrl':redactSensitive(_0x109121),'channelConfig':redactSensitive(_0x3e1354),'description':_0x4970cd,'connectTimeout':_0x476274,'readTimeout':_0x99a58e,'endpointUrlRaw':_0x109121,'channelConfigRaw':_0x3e1354};}export async function requireExactNotificationConfig(_0x386962,_0x2e1f92,_0x22ab9d){const _0x3e91f7=a197_0x5297c2;let _0x547dec;try{_0x547dec=await getNotificationChannelConfig(_0x2e1f92,_0x386962);}catch{throw safeApiFailure(_0x22ab9d,'preflight',_0x3e91f7(0x1d7)+_0x386962+_0x3e91f7(0x229));}return normalizeExactNotificationConfig(_0x547dec,_0x2e1f92,_0x386962);}export function projectNotificationConfig(_0x21298c){const _0x51cb61=a197_0x5297c2;return{'id':_0x21298c['id']??null,'appCode':_0x21298c['appCode'],'configCode':_0x21298c[_0x51cb61(0x20f)]??null,'configName':_0x21298c['configName'],'channelType':_0x21298c[_0x51cb61(0x1d4)],'endpointUrl':redactSensitive(_0x21298c['endpointUrl']),'channelConfig':redactSensitive(_0x21298c[_0x51cb61(0x1ee)]),'description':_0x21298c['description']??null,'connectTimeout':_0x21298c[_0x51cb61(0x230)]??null,'readTimeout':_0x21298c['readTimeout']??null};}export function notificationSelector(_0x4471f3){const _0x242055=a197_0x5297c2;return{'appCode':_0x4471f3[_0x242055(0x1f4)],'id':_0x4471f3['id'],'configCode':_0x4471f3[_0x242055(0x20f)],'configName':_0x4471f3[_0x242055(0x1f7)],'channelType':_0x4471f3['channelType']};}export function createMutationInput(_0x152a5c,_0x283bbd){const _0x497bf7=a197_0x5297c2;return{'appCode':_0x152a5c,'configName':_0x283bbd[_0x497bf7(0x1f7)],'channelType':_0x283bbd[_0x497bf7(0x1d4)],...hasOwn(_0x283bbd,_0x497bf7(0x1ed))?{'endpointUrl':_0x283bbd[_0x497bf7(0x1ed)]}:{},...hasOwn(_0x283bbd,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x283bbd['channelConfig'])}:{},...hasOwn(_0x283bbd,'description')?{'description':_0x283bbd[_0x497bf7(0x23c)]}:{},...hasOwn(_0x283bbd,_0x497bf7(0x230))?{'connectTimeout':_0x283bbd[_0x497bf7(0x230)]}:{},...hasOwn(_0x283bbd,_0x497bf7(0x1de))?{'readTimeout':_0x283bbd[_0x497bf7(0x1de)]}:{}};}export function mergeUpdateInput(_0x54ed2d,_0x4b0a51){const _0x40b213=a197_0x5297c2;return{'id':_0x54ed2d['id'],'appCode':_0x54ed2d['appCode'],'configName':_0x4b0a51[_0x40b213(0x1f7)]??_0x54ed2d[_0x40b213(0x1f7)],'channelType':_0x4b0a51[_0x40b213(0x1d4)]??_0x54ed2d[_0x40b213(0x1d4)],'endpointUrl':hasOwn(_0x4b0a51,'endpointUrl')?_0x4b0a51[_0x40b213(0x1ed)]:_0x54ed2d[_0x40b213(0x1e2)],'channelConfig':hasOwn(_0x4b0a51,_0x40b213(0x1ee))?serializeChannelConfig(_0x4b0a51[_0x40b213(0x1ee)]):_0x54ed2d[_0x40b213(0x205)],'description':hasOwn(_0x4b0a51,'description')?_0x4b0a51['description']:_0x54ed2d[_0x40b213(0x23c)],'connectTimeout':hasOwn(_0x4b0a51,'connectTimeout')?_0x4b0a51[_0x40b213(0x230)]:_0x54ed2d['connectTimeout'],'readTimeout':hasOwn(_0x4b0a51,_0x40b213(0x1de))?_0x4b0a51[_0x40b213(0x1de)]:_0x54ed2d['readTimeout']};}export function plannedUpdateProjection(_0x37fb6f,_0x5ab2d4){const _0x40b25e=a197_0x5297c2;return projectNotificationConfig({'id':_0x37fb6f['id'],'appCode':_0x37fb6f['appCode'],'configCode':_0x37fb6f[_0x40b25e(0x20f)],'configName':_0x5ab2d4[_0x40b25e(0x1f7)]??_0x37fb6f['configName'],'channelType':_0x5ab2d4[_0x40b25e(0x1d4)]??_0x37fb6f[_0x40b25e(0x1d4)],'endpointUrl':hasOwn(_0x5ab2d4,_0x40b25e(0x1ed))?_0x5ab2d4['endpointUrl']:_0x37fb6f['endpointUrlRaw'],'channelConfig':hasOwn(_0x5ab2d4,_0x40b25e(0x1ee))?_0x5ab2d4[_0x40b25e(0x1ee)]:_0x37fb6f[_0x40b25e(0x205)],'description':hasOwn(_0x5ab2d4,_0x40b25e(0x23c))?_0x5ab2d4['description']:_0x37fb6f[_0x40b25e(0x23c)],'connectTimeout':hasOwn(_0x5ab2d4,'connectTimeout')?_0x5ab2d4[_0x40b25e(0x230)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x37fb6f[_0x40b25e(0x230)],'readTimeout':hasOwn(_0x5ab2d4,_0x40b25e(0x1de))?_0x5ab2d4['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x37fb6f[_0x40b25e(0x1de)]});}export function requestedSafeFieldsMatch(_0x3c7fc9,_0x1bb0e7,_0x9093d8){const _0x125a33=a197_0x5297c2,_0x3d0aff=[],_0x4f7dfd=[],_0x2e0032=[];for(const _0x6aae65 of[_0x125a33(0x1f7),_0x125a33(0x1d4),_0x125a33(0x23c)]){if(!hasOwn(_0x9093d8,_0x6aae65))continue;_0x2e0032[_0x125a33(0x216)](_0x6aae65),_0x3d0aff['push'](_0x1bb0e7[_0x6aae65]===_0x9093d8[_0x6aae65]),_0x4f7dfd['push'](_0x3c7fc9[_0x6aae65]!==_0x9093d8[_0x6aae65]&&_0x1bb0e7[_0x6aae65]===_0x9093d8[_0x6aae65]);}for(const _0x463e32 of[_0x125a33(0x230),_0x125a33(0x1de)]){if(!hasOwn(_0x9093d8,_0x463e32))continue;const _0x36a388=_0x9093d8[_0x463e32]??(_0x463e32==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2e0032[_0x125a33(0x216)](_0x463e32),_0x3d0aff[_0x125a33(0x216)](_0x1bb0e7[_0x463e32]===_0x36a388),_0x4f7dfd[_0x125a33(0x216)](_0x3c7fc9[_0x463e32]!==_0x36a388&&_0x1bb0e7[_0x463e32]===_0x36a388);}return hasOwn(_0x9093d8,_0x125a33(0x1ed))&&_0x9093d8[_0x125a33(0x1ed)]===null&&(_0x2e0032[_0x125a33(0x216)](_0x125a33(0x1dd)),_0x3d0aff['push'](_0x1bb0e7['endpointUrlRaw']===null||_0x1bb0e7[_0x125a33(0x1e2)]===''),_0x4f7dfd[_0x125a33(0x216)](_0x3c7fc9['endpointUrlRaw']!==null&&_0x3c7fc9[_0x125a33(0x1e2)]!==''&&(_0x1bb0e7['endpointUrlRaw']===null||_0x1bb0e7[_0x125a33(0x1e2)]===''))),{'allMatch':_0x3d0aff['every'](Boolean),'provesChange':_0x4f7dfd['some'](Boolean),'verifiedFields':_0x2e0032};}export function validateNotificationDeleteReadback(_0x41f475,_0x58f23c,_0x4556aa){const _0x2900ae=a197_0x5297c2;for(const [_0x5a5251,_0xd88e57]of _0x41f475['entries']()){if(!Number[_0x2900ae(0x21b)](_0xd88e57['id'])||_0xd88e57['id']<=0x0)throw notificationError(_0x2900ae(0x1f3),'Notification\x20config\x20list\x20item\x20'+(_0x5a5251+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0xd88e57[_0x2900ae(0x1f4)]!==_0x58f23c)throw notificationError(_0x2900ae(0x1f3),_0x2900ae(0x1d0)+(_0x5a5251+0x1)+_0x2900ae(0x214));if(_0xd88e57[_0x2900ae(0x1d4)]!==_0x4556aa)throw notificationError(_0x2900ae(0x1f3),_0x2900ae(0x1d0)+(_0x5a5251+0x1)+_0x2900ae(0x219));}}export function safeApiFailure(_0x464247,_0x33fbb6,_0x48cd0e){const _0x432f5e=a197_0x5297c2;return notificationError(_0x432f5e(0x1e0)+_0x464247+'_'+(_0x33fbb6===_0x432f5e(0x21c)?_0x432f5e(0x1cc):_0x33fbb6+'_unavailable'),_0x432f5e(0x23d)+_0x464247+'\x20'+_0x33fbb6+_0x432f5e(0x20a),_0x48cd0e);}export function notificationLookupCommand(_0x523335,_0x1a242b){const _0x21eaaa=a197_0x5297c2;return _0x21eaaa(0x1c7)+_0x523335+_0x21eaaa(0x22a)+_0x1a242b+_0x21eaaa(0x1e8);}function validateNotificationDocument(_0x5dd4eb,_0x5e5d1e){const _0x266ad6=a197_0x5297c2;for(const _0x1a26db of Object['keys'](_0x5dd4eb)){if(FORBIDDEN_IDENTITY_FIELDS[_0x266ad6(0x222)](_0x1a26db))throw notificationError('notification_config_field_forbidden',_0x266ad6(0x1e3)+_0x1a26db+_0x266ad6(0x208));if(!ALLOWED_INPUT_FIELDS['has'](_0x1a26db))throw notificationError(_0x266ad6(0x228),_0x266ad6(0x224)+_0x1a26db+'\x22.');}if(_0x5e5d1e===_0x266ad6(0x202)&&Object[_0x266ad6(0x23e)](_0x5dd4eb)['length']===0x0)throw notificationError(_0x266ad6(0x1ef),_0x266ad6(0x22c));const _0x374821={};if(hasOwn(_0x5dd4eb,_0x266ad6(0x1f7)))_0x374821[_0x266ad6(0x1f7)]=validateRequiredString(_0x5dd4eb[_0x266ad6(0x1f7)],_0x266ad6(0x1f7),0x80);else{if(_0x5e5d1e===_0x266ad6(0x1f2))throw notificationError(_0x266ad6(0x240),_0x266ad6(0x210)+_0x266ad6(0x1eb));}if(hasOwn(_0x5dd4eb,_0x266ad6(0x1d4))){if(typeof _0x5dd4eb['channelType']!==_0x266ad6(0x1d1))throw invalidFieldType(_0x266ad6(0x1d4),_0x266ad6(0x1fa));const _0x58be6=_0x5dd4eb[_0x266ad6(0x1d4)][_0x266ad6(0x1ff)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x266ad6(0x22f)](_0x58be6))throw notificationError('notification_config_field_invalid',_0x266ad6(0x1fb),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x266ad6(0x204)](',\x20')+'.');_0x374821['channelType']=_0x58be6;}else{if(_0x5e5d1e===_0x266ad6(0x1f2))throw notificationError(_0x266ad6(0x240),_0x266ad6(0x210)+'\x22channelType\x22.');}for(const [_0x27670d,_0x45bde4]of[[_0x266ad6(0x1ed),0x200],['description',0x100]]){if(!hasOwn(_0x5dd4eb,_0x27670d))continue;const _0x2af05d=_0x5dd4eb[_0x27670d];if(_0x2af05d!==null&&typeof _0x2af05d!==_0x266ad6(0x1d1))throw invalidFieldType(_0x27670d,_0x266ad6(0x227));if(typeof _0x2af05d===_0x266ad6(0x1d1)&&_0x2af05d[_0x266ad6(0x201)]>_0x45bde4)throw notificationError(_0x266ad6(0x232),_0x266ad6(0x1e3)+_0x27670d+_0x266ad6(0x1ea)+_0x45bde4+_0x266ad6(0x223));_0x374821[_0x27670d]=_0x2af05d;}if(hasOwn(_0x5dd4eb,'channelConfig')){const _0xb9fc48=_0x5dd4eb[_0x266ad6(0x1ee)];if(_0xb9fc48===null&&_0x5e5d1e==='create')throw invalidFieldType('channelConfig',_0x266ad6(0x21d));if(_0xb9fc48!==null&&!isJsonObject(_0xb9fc48))throw invalidFieldType(_0x266ad6(0x1ee),_0x5e5d1e===_0x266ad6(0x202)?_0x266ad6(0x1e6):_0x266ad6(0x21d));_0xb9fc48!==null&&validateChannelConfigFields(_0x374821['channelType'],_0xb9fc48),_0x374821[_0x266ad6(0x1ee)]=_0xb9fc48;}for(const _0xa9e3b4 of[_0x266ad6(0x230),'readTimeout']){if(!hasOwn(_0x5dd4eb,_0xa9e3b4))continue;const _0x4d27f8=_0x5dd4eb[_0xa9e3b4];if(_0x4d27f8!==null&&(!Number['isSafeInteger'](_0x4d27f8)||_0x4d27f8<0x0))throw notificationError(_0x266ad6(0x232),_0x266ad6(0x1e3)+_0xa9e3b4+_0x266ad6(0x1d2));_0x374821[_0xa9e3b4]=_0x4d27f8;}return _0x374821;}function validateRequiredString(_0x13d4bd,_0x273f2c,_0x3c7dc3){const _0x596a88=a197_0x5297c2;if(typeof _0x13d4bd!==_0x596a88(0x1d1))throw invalidFieldType(_0x273f2c,_0x596a88(0x23b));const _0x1990d3=_0x13d4bd[_0x596a88(0x1ff)]();if(!_0x1990d3)throw notificationError(_0x596a88(0x232),'Notification\x20JSON\x20field\x20\x22'+_0x273f2c+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x1990d3[_0x596a88(0x201)]>_0x3c7dc3)throw notificationError(_0x596a88(0x232),_0x596a88(0x1e3)+_0x273f2c+_0x596a88(0x1ea)+_0x3c7dc3+_0x596a88(0x223));return _0x1990d3;}function validateChannelConfigFields(_0x319e92,_0x4dcf5b){const _0x3812c2=a197_0x5297c2;if(hasOwn(_0x4dcf5b,'messageTemplate'))throw forbiddenChannelConfigField(_0x3812c2(0x218));if(_0x319e92===_0x3812c2(0x221))for(const _0x3bff3e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4dcf5b,_0x3bff3e))throw forbiddenChannelConfigField(_0x3bff3e);}}function forbiddenChannelConfigField(_0x2f67bf){const _0x207983=a197_0x5297c2;return notificationError(_0x207983(0x1cf),_0x207983(0x1e5)+_0x2f67bf+_0x207983(0x1c3));}function invalidFieldType(_0x1d08c7,_0x112257){const _0x2a742c=a197_0x5297c2;return notificationError(_0x2a742c(0x232),_0x2a742c(0x1e3)+_0x1d08c7+_0x2a742c(0x1e4)+_0x112257+'.');}function serializeChannelConfig(_0x3e8a68){const _0x3635b1=a197_0x5297c2;return _0x3e8a68===null||_0x3e8a68===undefined?null:JSON[_0x3635b1(0x225)](_0x3e8a68);}function redactSensitive(_0x132664){return _0x132664===null||_0x132664===undefined||_0x132664===''?null:'<redacted>';}function requireResponseString(_0x553f5f,_0x3fc2b9,_0x351b1e){const _0x4f219b=a197_0x5297c2;if(typeof _0x553f5f!==_0x4f219b(0x1d1)||_0x553f5f[_0x4f219b(0x1ff)]()==='')throw CliErrors[_0x4f219b(0x206)](_0x4f219b(0x1e1),_0x4f219b(0x217)+(_0x351b1e+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3fc2b9+'\x22.');return _0x553f5f[_0x4f219b(0x1ff)]();}function requireExactString(_0x1ea571,_0x44a5f6,_0x1ef1d3){const _0x10a70b=a197_0x5297c2;if(typeof _0x1ea571!=='string'||_0x1ea571[_0x10a70b(0x1ff)]()==='')throw notificationError(_0x10a70b(0x1f3),_0x10a70b(0x23d)+_0x1ef1d3+_0x10a70b(0x21e)+_0x44a5f6+'\x22.');return _0x1ea571[_0x10a70b(0x1ff)]();}function a197_0x28ce(_0x417639,_0x2d0e0e){_0x417639=_0x417639-0x1c2;const _0x1773c6=a197_0x1773();let _0x28ce49=_0x1773c6[_0x417639];return _0x28ce49;}function responseNullableString(_0x3f9234,_0xdaa76a,_0x8dc5e4){const _0xc8992a=a197_0x5297c2;if(_0x3f9234===undefined||_0x3f9234===null)return null;if(typeof _0x3f9234!==_0xc8992a(0x1d1))throw notificationError(_0xc8992a(0x1f3),_0xc8992a(0x23d)+_0x8dc5e4+_0xc8992a(0x241)+_0xdaa76a+'\x22.');return _0x3f9234;}function responseNullableTimeout(_0x5cfcd5,_0x3c6ee2,_0x2580ba){const _0x948e75=a197_0x5297c2;if(_0x5cfcd5===undefined||_0x5cfcd5===null)return null;if(!Number[_0x948e75(0x21b)](_0x5cfcd5)||_0x5cfcd5<0x0)throw notificationError(_0x948e75(0x1f3),'Notification\x20config\x20'+_0x2580ba+_0x948e75(0x241)+_0x3c6ee2+'\x22.');return _0x5cfcd5;}function normalizeNullableString(_0x5c6cfd){return typeof _0x5c6cfd==='string'?_0x5c6cfd:null;}function isJsonObject(_0x2c0975){return _0x2c0975!==null&&typeof _0x2c0975==='object'&&!Array['isArray'](_0x2c0975);}function hasOwn(_0x59209a,_0x4f03b8){const _0x22ccd3=a197_0x5297c2;return Object[_0x22ccd3(0x1c5)][_0x22ccd3(0x1ca)][_0x22ccd3(0x1d6)](_0x59209a,_0x4f03b8);}async function readStdin(){const _0x1f8618=a197_0x5297c2;let _0x5db7c2='';process[_0x1f8618(0x22e)][_0x1f8618(0x1fe)](_0x1f8618(0x203));for await(const _0x17928f of process['stdin'])_0x5db7c2+=_0x17928f;return _0x5db7c2;}
@@ -1 +1 @@
1
- const a198_0x46fc51=a198_0x3c77;(function(_0x2457b1,_0x5e1580){const _0x248b06=a198_0x3c77,_0x2ad040=_0x2457b1();while(!![]){try{const _0x9480c=-parseInt(_0x248b06(0x1c2))/0x1*(parseInt(_0x248b06(0x1ea))/0x2)+-parseInt(_0x248b06(0x1d3))/0x3*(-parseInt(_0x248b06(0x1c5))/0x4)+-parseInt(_0x248b06(0x1f2))/0x5+-parseInt(_0x248b06(0x1df))/0x6+-parseInt(_0x248b06(0x1d6))/0x7*(parseInt(_0x248b06(0x1cc))/0x8)+-parseInt(_0x248b06(0x1ca))/0x9+-parseInt(_0x248b06(0x1d1))/0xa*(-parseInt(_0x248b06(0x1e0))/0xb);if(_0x9480c===_0x5e1580)break;else _0x2ad040['push'](_0x2ad040['shift']());}catch(_0x1abdde){_0x2ad040['push'](_0x2ad040['shift']());}}}(a198_0x182f,0xbe8b0));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=[a198_0x46fc51(0x1d4),a198_0x46fc51(0x1c6),'form',a198_0x46fc51(0x1d9)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a198_0x46fc51(0x1dd),'form':a198_0x46fc51(0x1da),'idCard':a198_0x46fc51(0x1ce)},SCENE_FLAG={'name':a198_0x46fc51(0x1ec),'type':a198_0x46fc51(0x1d0),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x46fc51(0x1e7)},IMAGE_FILE_FLAG={'name':'image-file','type':a198_0x46fc51(0x1d0),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a198_0x46fc51(0x1bd),'type':a198_0x46fc51(0x1d0),'description':a198_0x46fc51(0x1ed)};function normalizeScene(_0x34ce56){const _0x3f8b8c=a198_0x46fc51,_0x373241=_0x34ce56[_0x3f8b8c(0x1de)]()['toLowerCase']();if(_0x373241===_0x3f8b8c(0x1bc))return _0x3f8b8c(0x1d9);if(_0x373241===_0x3f8b8c(0x1d4)||_0x373241===_0x3f8b8c(0x1c6)||_0x373241===_0x3f8b8c(0x1d8))return _0x373241;throw CliErrors[_0x3f8b8c(0x1c4)]('Unsupported\x20OCR\x20scene:\x20'+_0x34ce56+_0x3f8b8c(0x1e9)+SUPPORTED_SCENES[_0x3f8b8c(0x1db)](',\x20'));}function selectedInputs(_0x3a896f){const _0x2ccf72=a198_0x46fc51,_0x1415b1=_0x3a896f['str']('image-file')[_0x2ccf72(0x1de)](),_0x1af0d9=_0x3a896f[_0x2ccf72(0x1c1)](_0x2ccf72(0x1bd))[_0x2ccf72(0x1de)]();return{'imageFile':_0x1415b1,'imageUrl':_0x1af0d9,'count':[_0x1415b1,_0x1af0d9][_0x2ccf72(0x1cd)](Boolean)[_0x2ccf72(0x1c9)]};}function a198_0x3c77(_0x852e42,_0x5dd48e){_0x852e42=_0x852e42-0x1bb;const _0x182f92=a198_0x182f();let _0x3c77fb=_0x182f92[_0x852e42];return _0x3c77fb;}function validateInputSelection(_0x11e668){const _0x4eb6e2=a198_0x46fc51,_0x521d8c=selectedInputs(_0x11e668);if(_0x521d8c[_0x4eb6e2(0x1e2)]!==0x1)throw CliErrors[_0x4eb6e2(0x1c4)](_0x4eb6e2(0x1e5));return _0x521d8c;}function withScene(_0x417fbf,_0x3763e1,_0x57c5b1){const _0xdb59d8=a198_0x46fc51;return{..._0x417fbf,'scene':_0x3763e1,..._0x57c5b1?{'sourceFile':{'fileName':_0x57c5b1[_0xdb59d8(0x1f3)],'filePath':_0x57c5b1[_0xdb59d8(0x1e6)]}}:{}};}const ocrRecognize={'service':'ocr','command':a198_0x46fc51(0x1c3),'description':a198_0x46fc51(0x1d5),'risk':a198_0x46fc51(0x1e8),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x23cb3b){const _0x50bb23=a198_0x46fc51,_0x2a0093=normalizeScene(_0x23cb3b[_0x50bb23(0x1c1)](_0x50bb23(0x1ec))),_0x51b407=SCENE_TO_LEGACY_TYPE[_0x2a0093],_0x17f7c2=validateInputSelection(_0x23cb3b);if(_0x17f7c2[_0x50bb23(0x1bb)]){const _0x62386c=new URLSearchParams({'url':_0x17f7c2[_0x50bb23(0x1bb)],'type':_0x51b407,'appCode':_0x23cb3b[_0x50bb23(0x1c0)]});return{'method':_0x50bb23(0x1eb),'url':_0x50bb23(0x1d2)+_0x62386c[_0x50bb23(0x1ee)](),'description':'Preview:\x20recognize\x20'+_0x2a0093+_0x50bb23(0x1c7)};}const _0x52d98c=requireDevelopmentUploadFile(_0x17f7c2[_0x50bb23(0x1be)],_0x50bb23(0x1e1));return{'method':'POST','url':_0x50bb23(0x1d7),'body':{'steps':[{'method':_0x50bb23(0x1ef),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x23cb3b['appCode'],'multipart':{'file':_0x52d98c}}},{'method':'POST','url':_0x50bb23(0x1cf),'body':{'filePath':_0x50bb23(0x1f0),'downloadFlag':![]}},{'method':_0x50bb23(0x1eb),'url':_0x50bb23(0x1c8),'query':{'appCode':_0x23cb3b['appCode'],'url':_0x50bb23(0x1dc),'type':_0x51b407}}]},'description':_0x50bb23(0x1bf)+_0x2a0093+_0x50bb23(0x1e3)};},async 'execute'(_0x207d56){const _0x35414c=a198_0x46fc51,_0x366f8e=normalizeScene(_0x207d56[_0x35414c(0x1c1)](_0x35414c(0x1ec))),_0x3b25a6=SCENE_TO_LEGACY_TYPE[_0x366f8e],_0x55af90=validateInputSelection(_0x207d56);if(_0x55af90['imageUrl']){const _0x2bb652=await recognizeDevelopmentOcr(_0x207d56[_0x35414c(0x1c0)],{'url':_0x55af90[_0x35414c(0x1bb)],'type':_0x3b25a6});return{'ok':!![],'data':withScene(_0x2bb652,_0x366f8e)};}const _0x3af7f8=requireDevelopmentUploadFile(_0x55af90['imageFile'],_0x35414c(0x1e1)),_0x263639=await uploadDevelopmentFile(_0x207d56[_0x35414c(0x1c0)],_0x3af7f8[_0x35414c(0x1f1)]);if(!_0x263639['filePath'])throw CliErrors[_0x35414c(0x1cb)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x587435=await queryDevelopmentFileUrl(_0x263639[_0x35414c(0x1e6)],{'download':![]});if(!_0x587435[_0x35414c(0x1e4)])throw CliErrors['apiError']('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x192038=await recognizeDevelopmentOcr(_0x207d56['appCode'],{'url':_0x587435[_0x35414c(0x1e4)],'type':_0x3b25a6});return{'ok':!![],'data':withScene(_0x192038,_0x366f8e,_0x263639)};}};export const ocrDefinitions=[ocrRecognize];function a198_0x182f(){const _0x3294b9=['General','trim','1304448SXBgMr','11JEglhB','image-file','count','\x20OCR','fileUrl','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','filePath','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','read','.\x20Supported\x20scenes:\x20','2765918xJGpGi','GET','scene','Publicly\x20accessible\x20image\x20or\x20file\x20URL','toString','POST','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','path','6723090VwBTtQ','fileName','imageUrl','idcard','image-url','imageFile','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','appCode','str','1jqvfla','recognize','validation','2764072sdzNdF','general','\x20OCR\x20from\x20URL','/smartapi/ocr/recognize-text','length','8073567yXWNgL','apiError','5853896UhbmiU','filter','IdCard','/smartapi/common/queryFileUrl','string','46632310TIOSTm','/smartapi/ocr/recognize-text?','3NRsWir','invoice','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','7HrvMBi','/smartapi/common/uploadFile','form','idCard','Table','join','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>'];a198_0x182f=function(){return _0x3294b9;};return a198_0x182f();}
1
+ const a198_0x5b7e4f=a198_0x3186;function a198_0x3186(_0x323a3f,_0x4d9562){_0x323a3f=_0x323a3f-0x164;const _0x154ec6=a198_0x154e();let _0x318659=_0x154ec6[_0x323a3f];return _0x318659;}(function(_0x5cb025,_0x153bac){const _0x4289a2=a198_0x3186,_0x1d0a44=_0x5cb025();while(!![]){try{const _0x1e47c8=-parseInt(_0x4289a2(0x181))/0x1*(-parseInt(_0x4289a2(0x165))/0x2)+-parseInt(_0x4289a2(0x175))/0x3*(parseInt(_0x4289a2(0x184))/0x4)+parseInt(_0x4289a2(0x164))/0x5+parseInt(_0x4289a2(0x171))/0x6*(-parseInt(_0x4289a2(0x169))/0x7)+parseInt(_0x4289a2(0x182))/0x8*(-parseInt(_0x4289a2(0x16c))/0x9)+parseInt(_0x4289a2(0x17e))/0xa+parseInt(_0x4289a2(0x16b))/0xb;if(_0x1e47c8===_0x153bac)break;else _0x1d0a44['push'](_0x1d0a44['shift']());}catch(_0x159af8){_0x1d0a44['push'](_0x1d0a44['shift']());}}}(a198_0x154e,0xc4b85));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=['invoice',a198_0x5b7e4f(0x189),'form',a198_0x5b7e4f(0x16f)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x5b7e4f(0x195),'general':a198_0x5b7e4f(0x170),'form':a198_0x5b7e4f(0x177),'idCard':a198_0x5b7e4f(0x17b)},SCENE_FLAG={'name':'scene','type':a198_0x5b7e4f(0x194),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x5b7e4f(0x196)},IMAGE_FILE_FLAG={'name':'image-file','type':a198_0x5b7e4f(0x194),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a198_0x5b7e4f(0x193),'type':a198_0x5b7e4f(0x194),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x4bce2b){const _0x4b3249=a198_0x5b7e4f,_0x475ad5=_0x4bce2b[_0x4b3249(0x167)]()['toLowerCase']();if(_0x475ad5==='idcard')return _0x4b3249(0x16f);if(_0x475ad5==='invoice'||_0x475ad5===_0x4b3249(0x189)||_0x475ad5===_0x4b3249(0x18f))return _0x475ad5;throw CliErrors['validation']('Unsupported\x20OCR\x20scene:\x20'+_0x4bce2b+_0x4b3249(0x190)+SUPPORTED_SCENES[_0x4b3249(0x16d)](',\x20'));}function selectedInputs(_0x24a2a3){const _0x15d04e=a198_0x5b7e4f,_0x430072=_0x24a2a3['str']('image-file')[_0x15d04e(0x167)](),_0x1ff97f=_0x24a2a3['str'](_0x15d04e(0x193))[_0x15d04e(0x167)]();return{'imageFile':_0x430072,'imageUrl':_0x1ff97f,'count':[_0x430072,_0x1ff97f]['filter'](Boolean)[_0x15d04e(0x191)]};}function validateInputSelection(_0x28f4ab){const _0x382ebc=a198_0x5b7e4f,_0x467aad=selectedInputs(_0x28f4ab);if(_0x467aad[_0x382ebc(0x183)]!==0x1)throw CliErrors['validation'](_0x382ebc(0x188));return _0x467aad;}function a198_0x154e(){const _0x4c6857=['4615410dpMiIb','filePath','/smartapi/common/uploadFile','1Urtqju','286192plCyzW','count','51884trIaVr','recognize','GET','appCode','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','general','POST','\x20OCR\x20from\x20URL','fileName','\x20OCR','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','form','.\x20Supported\x20scenes:\x20','length','imageFile','image-url','string','Invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','4324605tpwRih','1396914aKdycr','File\x20URL\x20response\x20missing\x20fileUrl.','trim','/smartapi/common/queryFileUrl','6986pHdLkt','toString','19312612nDAxaT','351WzoIag','join','image-file','idCard','General','4974pcAGuA','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','apiError','str','174IcLymQ','fileUrl','Table','scene','imageUrl','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','IdCard','ocr','File\x20upload\x20response\x20missing\x20filePath.'];a198_0x154e=function(){return _0x4c6857;};return a198_0x154e();}function withScene(_0x18e731,_0x3c2e80,_0x524d09){const _0x4ed91f=a198_0x5b7e4f;return{..._0x18e731,'scene':_0x3c2e80,..._0x524d09?{'sourceFile':{'fileName':_0x524d09[_0x4ed91f(0x18c)],'filePath':_0x524d09[_0x4ed91f(0x17f)]}}:{}};}const ocrRecognize={'service':a198_0x5b7e4f(0x17c),'command':a198_0x5b7e4f(0x185),'description':a198_0x5b7e4f(0x172),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x50faf2){const _0xc06cbc=a198_0x5b7e4f,_0x1e40ef=normalizeScene(_0x50faf2[_0xc06cbc(0x174)](_0xc06cbc(0x178))),_0x1c8741=SCENE_TO_LEGACY_TYPE[_0x1e40ef],_0x36c171=validateInputSelection(_0x50faf2);if(_0x36c171[_0xc06cbc(0x179)]){const _0x1244d3=new URLSearchParams({'url':_0x36c171['imageUrl'],'type':_0x1c8741,'appCode':_0x50faf2[_0xc06cbc(0x187)]});return{'method':_0xc06cbc(0x186),'url':'/smartapi/ocr/recognize-text?'+_0x1244d3[_0xc06cbc(0x16a)](),'description':'Preview:\x20recognize\x20'+_0x1e40ef+_0xc06cbc(0x18b)};}const _0x2e0802=requireDevelopmentUploadFile(_0x36c171[_0xc06cbc(0x192)],'image-file');return{'method':'POST','url':_0xc06cbc(0x180),'body':{'steps':[{'method':_0xc06cbc(0x18a),'url':_0xc06cbc(0x180),'body':{'appCode':_0x50faf2[_0xc06cbc(0x187)],'multipart':{'file':_0x2e0802}}},{'method':_0xc06cbc(0x18a),'url':_0xc06cbc(0x168),'body':{'filePath':_0xc06cbc(0x18e),'downloadFlag':![]}},{'method':_0xc06cbc(0x186),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x50faf2[_0xc06cbc(0x187)],'url':_0xc06cbc(0x17a),'type':_0x1c8741}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x1e40ef+_0xc06cbc(0x18d)};},async 'execute'(_0x14d209){const _0x13752e=a198_0x5b7e4f,_0x4a43a1=normalizeScene(_0x14d209[_0x13752e(0x174)](_0x13752e(0x178))),_0x3ce4a7=SCENE_TO_LEGACY_TYPE[_0x4a43a1],_0x5552da=validateInputSelection(_0x14d209);if(_0x5552da[_0x13752e(0x179)]){const _0x30c601=await recognizeDevelopmentOcr(_0x14d209['appCode'],{'url':_0x5552da['imageUrl'],'type':_0x3ce4a7});return{'ok':!![],'data':withScene(_0x30c601,_0x4a43a1)};}const _0x56f07b=requireDevelopmentUploadFile(_0x5552da[_0x13752e(0x192)],_0x13752e(0x16e)),_0x4f8e86=await uploadDevelopmentFile(_0x14d209[_0x13752e(0x187)],_0x56f07b['path']);if(!_0x4f8e86[_0x13752e(0x17f)])throw CliErrors[_0x13752e(0x173)](_0x13752e(0x17d));const _0x30d776=await queryDevelopmentFileUrl(_0x4f8e86['filePath'],{'download':![]});if(!_0x30d776[_0x13752e(0x176)])throw CliErrors[_0x13752e(0x173)](_0x13752e(0x166));const _0xb6d373=await recognizeDevelopmentOcr(_0x14d209[_0x13752e(0x187)],{'url':_0x30d776['fileUrl'],'type':_0x3ce4a7});return{'ok':!![],'data':withScene(_0xb6d373,_0x4a43a1,_0x4f8e86)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a199_0x2f5e6f=a199_0xd336;(function(_0x2c5003,_0x114855){const _0x3b1deb=a199_0xd336,_0x2faa47=_0x2c5003();while(!![]){try{const _0x491551=parseInt(_0x3b1deb(0x90))/0x1+parseInt(_0x3b1deb(0x79))/0x2+-parseInt(_0x3b1deb(0xad))/0x3*(parseInt(_0x3b1deb(0xae))/0x4)+-parseInt(_0x3b1deb(0x85))/0x5+-parseInt(_0x3b1deb(0xa7))/0x6+-parseInt(_0x3b1deb(0xb3))/0x7*(parseInt(_0x3b1deb(0xa0))/0x8)+parseInt(_0x3b1deb(0xa6))/0x9;if(_0x491551===_0x114855)break;else _0x2faa47['push'](_0x2faa47['shift']());}catch(_0x17b7c5){_0x2faa47['push'](_0x2faa47['shift']());}}}(a199_0x526d,0x623a8));import{readFile}from'node:fs/promises';function a199_0x526d(){const _0x476428=['4zowztE','menuId','Created\x20Custom\x20Page\x20','files','isNaN','119JPscMV','compress','isArray','trim','toLowerCase','parentMenuId','validation','591922aJJSoA','pageId','now','page','str','keys','page-dir','menuPath','page\x20create\x20does\x20not\x20accept\x20--page-type.','Would\x20create\x20Custom\x20Page\x20','string','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','596505YVGeFJ','parse','page-type','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','length','appCode','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','../../../templates/custom-pages','create','pageName','361540oSiQyj','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','includes','write','\x20and\x20its\x20menu\x20entry.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','page-pattern','number','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','Custom\x20Page\x20pattern\x20not\x20found:\x20','.json','/smartapi/webcode/page/create','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','parent-menu-id','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','some','320384aLcuWk','Invalid\x20Custom\x20Page\x20pattern:\x20','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','utf8','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','12501063KudOJa','4257552IrxQio','name','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','createMenu','BLANK','403365VxHUMw'];a199_0x526d=function(){return _0x476428;};return a199_0x526d();}function a199_0xd336(_0x526002,_0x21ae1d){_0x526002=_0x526002-0x76;const _0x526df9=a199_0x526d();let _0xd3369=_0x526df9[_0x526002];return _0xd3369;}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=[a199_0x2f5e6f(0xac),'ONEPAGE','DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x2f5e6f(0x8d));export const pageCreate={'service':a199_0x2f5e6f(0x7c),'command':a199_0x2f5e6f(0x8e),'description':a199_0x2f5e6f(0xa2),'risk':a199_0x2f5e6f(0x93),'defaultOutputFormat':a199_0x2f5e6f(0xb4),'structuredErrors':!![],'rejectedFlags':[{'name':a199_0x2f5e6f(0x87),'message':a199_0x2f5e6f(0x81),'hint':a199_0x2f5e6f(0xa9)},{'name':'page-content','message':a199_0x2f5e6f(0x91),'hint':a199_0x2f5e6f(0xa5)}],'flags':[{'name':a199_0x2f5e6f(0xa8),'type':a199_0x2f5e6f(0x83),'description':a199_0x2f5e6f(0x9c)},{'name':a199_0x2f5e6f(0x9d),'type':a199_0x2f5e6f(0x97),'description':a199_0x2f5e6f(0x9e)},{'name':'page-pattern','type':a199_0x2f5e6f(0x83),'description':a199_0x2f5e6f(0x88),'enum':CUSTOM_PAGE_PATTERNS},{'name':'page-dir','type':a199_0x2f5e6f(0x83),'description':a199_0x2f5e6f(0x95)},APPCODE_FLAG],async 'validate'(_0x3cd9b7){await readValidatedPageSource(_0x3cd9b7);},async 'dryRun'(_0x28e82f){const _0x4b1da9=a199_0x2f5e6f,_0x529c57=readInput(_0x28e82f,await readValidatedPageSource(_0x28e82f));return{'method':'POST','url':_0x4b1da9(0x9b),'body':{'appCode':_0x529c57['appCode'],'pageName':_0x529c57[_0x4b1da9(0x8f)],..._0x529c57[_0x4b1da9(0x77)]!=null?{'parentMenuId':_0x529c57[_0x4b1da9(0x77)]}:{},'createMenu':_0x529c57[_0x4b1da9(0xab)],'codeContent':_0x529c57['files']},'description':_0x4b1da9(0x82)+JSON['stringify'](_0x529c57[_0x4b1da9(0x8f)])+_0x4b1da9(0x94)};},async 'execute'(_0x1e7a3e){const _0x21dc3d=a199_0x2f5e6f,_0x1d1575=readInput(_0x1e7a3e,await readValidatedPageSource(_0x1e7a3e)),_0x3a1ee0=await createCustomPage(_0x1d1575);if(!Number['isInteger'](_0x3a1ee0[_0x21dc3d(0x7a)])||_0x3a1ee0[_0x21dc3d(0x7a)]<=0x0)throw CliErrors['apiError'](_0x21dc3d(0xa3));const _0x5d0e0b=buildCustomPageDevelopmentUrl(_0x1d1575[_0x21dc3d(0x8b)],_0x3a1ee0[_0x21dc3d(0x80)]),_0x4d47d1=buildCustomPageEditUrl(_0x1d1575['appCode'],_0x3a1ee0[_0x21dc3d(0x7a)]);return{'ok':!![],'data':{'operation':'page.create','pageType':'CUSTOM','pagePattern':readPagePattern(_0x1e7a3e),'selector':{'appCode':_0x1d1575[_0x21dc3d(0x8b)],'pageName':_0x1d1575[_0x21dc3d(0x8f)]},'before':null,'after':{'pageId':_0x3a1ee0[_0x21dc3d(0x7a)],'pageName':_0x3a1ee0[_0x21dc3d(0x8f)],'appCode':_0x3a1ee0['appCode'],'version':_0x3a1ee0['version'],'menuId':_0x3a1ee0[_0x21dc3d(0xaf)],'menuPath':_0x3a1ee0[_0x21dc3d(0x80)],'files':_0x3a1ee0[_0x21dc3d(0xb1)]??Object[_0x21dc3d(0x7e)](_0x1d1575['files'])},'dryRun':![],'request':_0x1d1575,..._0x5d0e0b?{'pageUrl':_0x5d0e0b}:{},..._0x4d47d1?{'editPageUrl':_0x4d47d1}:{},'warnings':_0x5d0e0b?[]:[_0x21dc3d(0x8c)]},'message':_0x21dc3d(0xb0)+_0x3a1ee0['pageId']+'.'};}};function readPagePattern(_0x4ae082){const _0x20c99c=a199_0x2f5e6f,_0x54f36c=_0x4ae082[_0x20c99c(0x7d)](_0x20c99c(0x96))[_0x20c99c(0xb6)](),_0x29dafb=_0x4ae082[_0x20c99c(0x7d)](_0x20c99c(0x7f))['trim']();if(_0x54f36c&&_0x29dafb)throw CliErrors[_0x20c99c(0x78)](_0x20c99c(0xaa));if(_0x29dafb)return null;if(!_0x54f36c)throw CliErrors[_0x20c99c(0x78)]('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x20c99c(0x92)](_0x54f36c))throw CliErrors[_0x20c99c(0x78)](_0x20c99c(0x98));return _0x54f36c;}async function readPageSource(_0x477241){const _0x19bd78=a199_0x2f5e6f,_0xde411=_0x477241[_0x19bd78(0x7d)]('page-dir')['trim'](),_0x178eac=readPagePattern(_0x477241);if(_0x178eac===null){const _0x217db2=await readCustomPageDirectory(_0xde411);if(Object[_0x19bd78(0x7e)](_0x217db2)[_0x19bd78(0x8a)]===0x0)throw CliErrors[_0x19bd78(0x78)](_0x19bd78(0x84));return _0x217db2;}let _0x153929;try{_0x153929=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x178eac[_0x19bd78(0x76)]()+_0x19bd78(0x9a)),_0x19bd78(0xa4));}catch{throw CliErrors[_0x19bd78(0x78)](_0x19bd78(0x99)+_0x178eac+'.');}let _0x529010;try{_0x529010=JSON[_0x19bd78(0x86)](_0x153929);}catch{throw CliErrors[_0x19bd78(0x78)](_0x19bd78(0xa1)+_0x178eac+'.');}if(!_0x529010||typeof _0x529010!=='object'||Array[_0x19bd78(0xb5)](_0x529010)||Object['values'](_0x529010)[_0x19bd78(0x9f)](_0x455e14=>typeof _0x455e14!==_0x19bd78(0x83)))throw CliErrors[_0x19bd78(0x78)](_0x19bd78(0xa1)+_0x178eac+'.');return _0x529010;}async function readValidatedPageSource(_0x259106){const _0x5cb2c7=await readPageSource(_0x259106);return await validateCustomPageContent(_0x5cb2c7),_0x5cb2c7;}function readInput(_0x3b42a0,_0x327859){const _0x1fde62=a199_0x2f5e6f,_0x5c9b85=_0x3b42a0[_0x1fde62(0x7d)]('name')[_0x1fde62(0xb6)]()||'Custom_page_'+Date[_0x1fde62(0x7b)]();if(_0x5c9b85['length']>0x64)throw CliErrors['validation']('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x59cf59=_0x3b42a0['num'](_0x1fde62(0x9d),NaN),_0x1f62cb=!Number[_0x1fde62(0xb2)](_0x59cf59);if(_0x1f62cb&&(!Number['isInteger'](_0x59cf59)||_0x59cf59<=0x0))throw CliErrors['validation'](_0x1fde62(0x89));return{'appCode':_0x3b42a0[_0x1fde62(0x8b)],'pageName':_0x5c9b85,..._0x1f62cb?{'parentMenuId':_0x59cf59}:{},'createMenu':!![],'files':_0x327859};}
1
+ const a199_0xe7c881=a199_0x20e1;(function(_0x187340,_0x31f77f){const _0x3ac715=a199_0x20e1,_0x2074b1=_0x187340();while(!![]){try{const _0x3b92a4=parseInt(_0x3ac715(0x1b2))/0x1*(-parseInt(_0x3ac715(0x1b7))/0x2)+-parseInt(_0x3ac715(0x1ac))/0x3+parseInt(_0x3ac715(0x19f))/0x4*(parseInt(_0x3ac715(0x192))/0x5)+parseInt(_0x3ac715(0x193))/0x6+-parseInt(_0x3ac715(0x19e))/0x7+-parseInt(_0x3ac715(0x196))/0x8*(-parseInt(_0x3ac715(0x188))/0x9)+-parseInt(_0x3ac715(0x18c))/0xa;if(_0x3b92a4===_0x31f77f)break;else _0x2074b1['push'](_0x2074b1['shift']());}catch(_0x4fdb05){_0x2074b1['push'](_0x2074b1['shift']());}}}(a199_0x28d8,0xe623d));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';function a199_0x28d8(){const _0x731753=['5417566MwMEYJ','32zPhbKz','BLANK','page.create','createMenu','now','string','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','isArray','stringify','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','version','includes','241431bCBdEZ','parse','parent-menu-id','../../../templates/custom-pages','isInteger','apiError','548237DHItTn','menuPath','validation','\x20and\x20its\x20menu\x20entry.','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','2vCUXvm','page-dir','pageId','page\x20create\x20does\x20not\x20accept\x20--page-type.','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','page-pattern','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','DASHBOARD','parentMenuId','toLowerCase','Invalid\x20Custom\x20Page\x20pattern:\x20','Created\x20Custom\x20Page\x20','ONEPAGE','some','appCode','files','length','create','81ueJNig','page','num','str','11449810ADBPqA','pageName','keys','Custom_page_','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','Custom\x20Page\x20pattern\x20not\x20found:\x20','1127660YGYAnW','955782abgbiJ','values','name','1357096VxaCay','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','isNaN','POST','page-content','compress','trim','number'];a199_0x28d8=function(){return _0x731753;};return a199_0x28d8();}import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';function a199_0x20e1(_0x3343f8,_0x3f0b56){_0x3343f8=_0x3343f8-0x187;const _0x28d8dd=a199_0x28d8();let _0x20e1e5=_0x28d8dd[_0x3343f8];return _0x20e1e5;}const CUSTOM_PAGE_PATTERNS=[a199_0xe7c881(0x1a0),a199_0xe7c881(0x1c4),a199_0xe7c881(0x1bf)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0xe7c881(0x1af));export const pageCreate={'service':a199_0xe7c881(0x189),'command':a199_0xe7c881(0x187),'description':a199_0xe7c881(0x1b6),'risk':'write','defaultOutputFormat':a199_0xe7c881(0x19b),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a199_0xe7c881(0x1ba),'hint':a199_0xe7c881(0x1bb)},{'name':a199_0xe7c881(0x19a),'message':a199_0xe7c881(0x190),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a199_0xe7c881(0x195),'type':a199_0xe7c881(0x1a4),'description':a199_0xe7c881(0x197)},{'name':'parent-menu-id','type':a199_0xe7c881(0x19d),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':'page-pattern','type':'string','description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0xe7c881(0x1b8),'type':a199_0xe7c881(0x1a4),'description':a199_0xe7c881(0x1a9)},APPCODE_FLAG],async 'validate'(_0x110733){await readValidatedPageSource(_0x110733);},async 'dryRun'(_0x53a60e){const _0x21c0c8=a199_0xe7c881,_0x1dd166=readInput(_0x53a60e,await readValidatedPageSource(_0x53a60e));return{'method':_0x21c0c8(0x199),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x1dd166['appCode'],'pageName':_0x1dd166['pageName'],..._0x1dd166[_0x21c0c8(0x1c0)]!=null?{'parentMenuId':_0x1dd166[_0x21c0c8(0x1c0)]}:{},'createMenu':_0x1dd166[_0x21c0c8(0x1a2)],'codeContent':_0x1dd166[_0x21c0c8(0x1c7)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x21c0c8(0x1a7)](_0x1dd166[_0x21c0c8(0x18d)])+_0x21c0c8(0x1b5)};},async 'execute'(_0x3b5d18){const _0x1a25b6=a199_0xe7c881,_0x109dc2=readInput(_0x3b5d18,await readValidatedPageSource(_0x3b5d18)),_0x32e156=await createCustomPage(_0x109dc2);if(!Number[_0x1a25b6(0x1b0)](_0x32e156['pageId'])||_0x32e156[_0x1a25b6(0x1b9)]<=0x0)throw CliErrors[_0x1a25b6(0x1b1)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x288954=buildCustomPageDevelopmentUrl(_0x109dc2[_0x1a25b6(0x1c6)],_0x32e156[_0x1a25b6(0x1b3)]),_0x510f7f=buildCustomPageEditUrl(_0x109dc2[_0x1a25b6(0x1c6)],_0x32e156['pageId']);return{'ok':!![],'data':{'operation':_0x1a25b6(0x1a1),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x3b5d18),'selector':{'appCode':_0x109dc2[_0x1a25b6(0x1c6)],'pageName':_0x109dc2[_0x1a25b6(0x18d)]},'before':null,'after':{'pageId':_0x32e156['pageId'],'pageName':_0x32e156[_0x1a25b6(0x18d)],'appCode':_0x32e156[_0x1a25b6(0x1c6)],'version':_0x32e156[_0x1a25b6(0x1aa)],'menuId':_0x32e156['menuId'],'menuPath':_0x32e156[_0x1a25b6(0x1b3)],'files':_0x32e156[_0x1a25b6(0x1c7)]??Object[_0x1a25b6(0x18e)](_0x109dc2[_0x1a25b6(0x1c7)])},'dryRun':![],'request':_0x109dc2,..._0x288954?{'pageUrl':_0x288954}:{},..._0x510f7f?{'editPageUrl':_0x510f7f}:{},'warnings':_0x288954?[]:[_0x1a25b6(0x1bd)]},'message':_0x1a25b6(0x1c3)+_0x32e156[_0x1a25b6(0x1b9)]+'.'};}};function readPagePattern(_0x592533){const _0xef7c50=a199_0xe7c881,_0x48fae6=_0x592533['str'](_0xef7c50(0x1bc))[_0xef7c50(0x19c)](),_0x47bf0f=_0x592533['str'](_0xef7c50(0x1b8))[_0xef7c50(0x19c)]();if(_0x48fae6&&_0x47bf0f)throw CliErrors['validation'](_0xef7c50(0x1a5));if(_0x47bf0f)return null;if(!_0x48fae6)throw CliErrors['validation']('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0xef7c50(0x1ab)](_0x48fae6))throw CliErrors[_0xef7c50(0x1b4)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x48fae6;}async function readPageSource(_0x584f2d){const _0x10fac6=a199_0xe7c881,_0x2e87e9=_0x584f2d[_0x10fac6(0x18b)](_0x10fac6(0x1b8))[_0x10fac6(0x19c)](),_0x1da754=readPagePattern(_0x584f2d);if(_0x1da754===null){const _0x32f59d=await readCustomPageDirectory(_0x2e87e9);if(Object[_0x10fac6(0x18e)](_0x32f59d)[_0x10fac6(0x1c8)]===0x0)throw CliErrors['validation'](_0x10fac6(0x1be));return _0x32f59d;}let _0x3cf08f;try{_0x3cf08f=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x1da754[_0x10fac6(0x1c1)]()+'.json'),'utf8');}catch{throw CliErrors['validation'](_0x10fac6(0x191)+_0x1da754+'.');}let _0x31cd76;try{_0x31cd76=JSON[_0x10fac6(0x1ad)](_0x3cf08f);}catch{throw CliErrors[_0x10fac6(0x1b4)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x1da754+'.');}if(!_0x31cd76||typeof _0x31cd76!=='object'||Array[_0x10fac6(0x1a6)](_0x31cd76)||Object[_0x10fac6(0x194)](_0x31cd76)[_0x10fac6(0x1c5)](_0x323b31=>typeof _0x323b31!==_0x10fac6(0x1a4)))throw CliErrors[_0x10fac6(0x1b4)](_0x10fac6(0x1c2)+_0x1da754+'.');return _0x31cd76;}async function readValidatedPageSource(_0x282475){const _0x5a62f1=await readPageSource(_0x282475);return await validateCustomPageContent(_0x5a62f1),_0x5a62f1;}function readInput(_0xcbece9,_0x455bba){const _0x40f6c2=a199_0xe7c881,_0x3e8c16=_0xcbece9[_0x40f6c2(0x18b)]('name')[_0x40f6c2(0x19c)]()||_0x40f6c2(0x18f)+Date[_0x40f6c2(0x1a3)]();if(_0x3e8c16[_0x40f6c2(0x1c8)]>0x64)throw CliErrors[_0x40f6c2(0x1b4)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x3e3432=_0xcbece9[_0x40f6c2(0x18a)](_0x40f6c2(0x1ae),NaN),_0x747ffc=!Number[_0x40f6c2(0x198)](_0x3e3432);if(_0x747ffc&&(!Number[_0x40f6c2(0x1b0)](_0x3e3432)||_0x3e3432<=0x0))throw CliErrors[_0x40f6c2(0x1b4)](_0x40f6c2(0x1a8));return{'appCode':_0xcbece9[_0x40f6c2(0x1c6)],'pageName':_0x3e8c16,..._0x747ffc?{'parentMenuId':_0x3e3432}:{},'createMenu':!![],'files':_0x455bba};}
@@ -1 +1 @@
1
- const a200_0x4fa991=a200_0x2b16;(function(_0x31bec3,_0x3ab540){const _0x130505=a200_0x2b16,_0x1bee56=_0x31bec3();while(!![]){try{const _0xb25960=parseInt(_0x130505(0x82))/0x1+parseInt(_0x130505(0x84))/0x2*(parseInt(_0x130505(0x8a))/0x3)+-parseInt(_0x130505(0x85))/0x4+-parseInt(_0x130505(0x94))/0x5*(-parseInt(_0x130505(0x9a))/0x6)+-parseInt(_0x130505(0x8c))/0x7+-parseInt(_0x130505(0x99))/0x8*(-parseInt(_0x130505(0x86))/0x9)+-parseInt(_0x130505(0x98))/0xa;if(_0xb25960===_0x3ab540)break;else _0x1bee56['push'](_0x1bee56['shift']());}catch(_0x3a8c33){_0x1bee56['push'](_0x1bee56['shift']());}}}(a200_0x92d2,0xbec41));function a200_0x2b16(_0x24904f,_0x575d2d){_0x24904f=_0x24904f-0x82;const _0x92d2a3=a200_0x92d2();let _0x2b1627=_0x92d2a3[_0x24904f];return _0x2b1627;}import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':'custom-detail','description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a200_0x4fa991(0x95),'defaultOutputFormat':a200_0x4fa991(0x9b),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0x4fa991(0x96),'required':!![],'description':a200_0x4fa991(0x90)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x42a6ec){readCustomPageId(_0x42a6ec);},async 'execute'(_0xa90c97){const _0x1cb738=a200_0x4fa991,_0x481cbc=readCustomPageId(_0xa90c97),_0x576719=await getCustomPageSource(_0x481cbc),{bundle:_0x2e176d,createTime:_0x485b57,updateTime:_0x1c5166,..._0x299edc}=_0x576719,_0x52f925=_0x576719['id']??_0x481cbc,_0x2e96ac=_0x576719[_0x1cb738(0x8e)]?.[_0x1cb738(0x97)]()||_0xa90c97[_0x1cb738(0x8d)]('appcode')['trim'](),_0x4130d7=buildCustomPageRuntimeUrl(_0x2e96ac,_0x576719[_0x1cb738(0x8f)]),_0x2b973d=buildCustomPageEditUrl(_0x2e96ac,_0x52f925),_0x3f25fb=await resolveCustomPageDevelopmentUrl(_0x2e96ac,_0x52f925,_0xa90c97[_0x1cb738(0x8b)]);return{'ok':!![],'data':{..._0x299edc,..._0x4130d7?{'runtimePageUrl':_0x4130d7}:{},..._0x3f25fb?{'pageUrl':_0x3f25fb}:{},..._0x2b973d?{'editPageUrl':_0x2b973d}:{},..._0x485b57==null?{}:{'createTime':formatTime(_0x485b57)},..._0x1c5166==null?{}:{'updateTime':formatTime(_0x1c5166)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x481cbc+'.'};}};function a200_0x92d2(){const _0x3bdf34=['getMonth','42kDlrxJ','cookie','10436090Tlloav','str','appCode','pageCode','Custom\x20Page\x20ID','getHours','padStart','getSeconds','90UZnLtG','read','number','trim','11449860WbJqcN','1573136fIeWEx','2598ZohEcT','compress','getMinutes','865950HdhGJy','getFullYear','193266qImhfs','743468xbekLP','63EDjrUK','getTime','isNaN'];a200_0x92d2=function(){return _0x3bdf34;};return a200_0x92d2();}function formatTime(_0x8ed64c){const _0x43ba7e=a200_0x4fa991,_0x18a551=new Date(_0x8ed64c);if(Number[_0x43ba7e(0x88)](_0x18a551[_0x43ba7e(0x87)]()))return String(_0x8ed64c);const _0x5ac0b3=[_0x18a551[_0x43ba7e(0x83)](),String(_0x18a551[_0x43ba7e(0x89)]()+0x1)[_0x43ba7e(0x92)](0x2,'0'),String(_0x18a551['getDate']())[_0x43ba7e(0x92)](0x2,'0')]['join']('-'),_0xcf7297=[String(_0x18a551[_0x43ba7e(0x91)]())[_0x43ba7e(0x92)](0x2,'0'),String(_0x18a551[_0x43ba7e(0x9c)]())[_0x43ba7e(0x92)](0x2,'0'),String(_0x18a551[_0x43ba7e(0x93)]())[_0x43ba7e(0x92)](0x2,'0')]['join'](':');return _0x5ac0b3+'\x20'+_0xcf7297;}
1
+ const a200_0x2a0df4=a200_0x1f4e;(function(_0x412c9d,_0x190933){const _0x271f26=a200_0x1f4e,_0x3839fa=_0x412c9d();while(!![]){try{const _0x420895=-parseInt(_0x271f26(0xdb))/0x1*(parseInt(_0x271f26(0xec))/0x2)+-parseInt(_0x271f26(0xe5))/0x3*(parseInt(_0x271f26(0xe7))/0x4)+parseInt(_0x271f26(0xdc))/0x5*(parseInt(_0x271f26(0xe0))/0x6)+-parseInt(_0x271f26(0xe8))/0x7*(parseInt(_0x271f26(0xda))/0x8)+-parseInt(_0x271f26(0xd1))/0x9*(-parseInt(_0x271f26(0xed))/0xa)+parseInt(_0x271f26(0xea))/0xb+parseInt(_0x271f26(0xe4))/0xc;if(_0x420895===_0x190933)break;else _0x3839fa['push'](_0x3839fa['shift']());}catch(_0x574cac){_0x3839fa['push'](_0x3839fa['shift']());}}}(a200_0x53bd,0xdf6b7));import{getCustomPageSource}from'../../../core/api-client.js';function a200_0x1f4e(_0xfe9d69,_0x2613b5){_0xfe9d69=_0xfe9d69-0xd1;const _0x53bd71=a200_0x53bd();let _0x1f4edf=_0x53bd71[_0xfe9d69];return _0x1f4edf;}function a200_0x53bd(){const _0x435d3c=['189eTIbTf','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getMinutes','getSeconds','compress','trim','appcode','read','Retrieved\x20Custom\x20Page\x20','16IeCRCJ','69015pnzFkf','7143550IdCvaw','Custom\x20Page\x20ID','padStart','getTime','6XKSdDo','number','pageCode','join','43746648qqrRlT','2591781qPfqoe','getFullYear','8RedlZW','4914721rymHTh','isNaN','2554794kCrmrt','getHours','38PDGhHb','24740LTyyeM','appCode'];a200_0x53bd=function(){return _0x435d3c;};return a200_0x53bd();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':'custom-detail','description':a200_0x2a0df4(0xd2),'risk':a200_0x2a0df4(0xd8),'defaultOutputFormat':a200_0x2a0df4(0xd5),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0x2a0df4(0xe1),'required':!![],'description':a200_0x2a0df4(0xdd)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x465388){readCustomPageId(_0x465388);},async 'execute'(_0x3713b1){const _0x5e28a7=a200_0x2a0df4,_0x5ba4e9=readCustomPageId(_0x3713b1),_0x159417=await getCustomPageSource(_0x5ba4e9),{bundle:_0xcb762f,createTime:_0x4b33ef,updateTime:_0x354e41,..._0x5b697e}=_0x159417,_0x13167f=_0x159417['id']??_0x5ba4e9,_0x347cb9=_0x159417[_0x5e28a7(0xee)]?.[_0x5e28a7(0xd6)]()||_0x3713b1['str'](_0x5e28a7(0xd7))[_0x5e28a7(0xd6)](),_0x41dcfb=buildCustomPageRuntimeUrl(_0x347cb9,_0x159417[_0x5e28a7(0xe2)]),_0x42ba9a=buildCustomPageEditUrl(_0x347cb9,_0x13167f),_0x1a6180=await resolveCustomPageDevelopmentUrl(_0x347cb9,_0x13167f,_0x3713b1['cookie']);return{'ok':!![],'data':{..._0x5b697e,..._0x41dcfb?{'runtimePageUrl':_0x41dcfb}:{},..._0x1a6180?{'pageUrl':_0x1a6180}:{},..._0x42ba9a?{'editPageUrl':_0x42ba9a}:{},..._0x4b33ef==null?{}:{'createTime':formatTime(_0x4b33ef)},..._0x354e41==null?{}:{'updateTime':formatTime(_0x354e41)}},'message':_0x5e28a7(0xd9)+_0x5ba4e9+'.'};}};function formatTime(_0x2e7492){const _0x2e1631=a200_0x2a0df4,_0x22383d=new Date(_0x2e7492);if(Number[_0x2e1631(0xe9)](_0x22383d[_0x2e1631(0xdf)]()))return String(_0x2e7492);const _0x5406d3=[_0x22383d[_0x2e1631(0xe6)](),String(_0x22383d['getMonth']()+0x1)[_0x2e1631(0xde)](0x2,'0'),String(_0x22383d['getDate']())[_0x2e1631(0xde)](0x2,'0')][_0x2e1631(0xe3)]('-'),_0x244a3b=[String(_0x22383d[_0x2e1631(0xeb)]())[_0x2e1631(0xde)](0x2,'0'),String(_0x22383d[_0x2e1631(0xd3)]())[_0x2e1631(0xde)](0x2,'0'),String(_0x22383d[_0x2e1631(0xd4)]())[_0x2e1631(0xde)](0x2,'0')][_0x2e1631(0xe3)](':');return _0x5406d3+'\x20'+_0x244a3b;}
@@ -1 +1 @@
1
- const a201_0x25faa8=a201_0x34ba;function a201_0x23d5(){const _0x1fa03b=['page','24713180XQQJsj','read','path','6494368wcvAAP','9rzYixH','19615mvYUGI','652916fJHTaA','99702xJKSbe','2056059fkzzik','21DqEWgM','\x20Custom\x20Page(s).','react','appCode','menus','length','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','custom-list','pageId','flatMap','1198066PuxCzz','No\x20Custom\x20Pages\x20found.','label','1076oeqaXa'];a201_0x23d5=function(){return _0x1fa03b;};return a201_0x23d5();}(function(_0x4d270f,_0xfabe0d){const _0x10d040=a201_0x34ba,_0x1854e4=_0x4d270f();while(!![]){try{const _0x50d96d=-parseInt(_0x10d040(0x105))/0x1+parseInt(_0x10d040(0xf8))/0x2+-parseInt(_0x10d040(0xfa))/0x3+-parseInt(_0x10d040(0x108))/0x4*(parseInt(_0x10d040(0xf7))/0x5)+-parseInt(_0x10d040(0xf9))/0x6*(parseInt(_0x10d040(0xfb))/0x7)+parseInt(_0x10d040(0xf5))/0x8+-parseInt(_0x10d040(0xf6))/0x9*(-parseInt(_0x10d040(0xf2))/0xa);if(_0x50d96d===_0xfabe0d)break;else _0x1854e4['push'](_0x1854e4['shift']());}catch(_0x3f29ec){_0x1854e4['push'](_0x1854e4['shift']());}}}(a201_0x23d5,0x979d7));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a201_0x34ba(_0x362707,_0x5d8888){_0x362707=_0x362707-0xf2;const _0x23d5af=a201_0x23d5();let _0x34ba8c=_0x23d5af[_0x362707];return _0x34ba8c;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a201_0x25faa8(0x109),'command':a201_0x25faa8(0x102),'description':a201_0x25faa8(0x101),'risk':a201_0x25faa8(0xf3),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x7ac51){const _0x192191=a201_0x25faa8,_0x1571d5=(await fetchMenuSnapshot(_0x7ac51['appCode'],_0x7ac51['cookie']))[_0x192191(0xff)][_0x192191(0x104)](_0x56fda2=>{const _0x4eca0c=_0x192191;if(_0x56fda2['type']!==_0x4eca0c(0xfd)||_0x56fda2['pageId']==null)return[];const _0x310b2b=buildCustomPageDevelopmentUrl(_0x7ac51[_0x4eca0c(0xfe)],_0x56fda2['path']),_0x52cb00=buildCustomPageRuntimeUrl(_0x7ac51[_0x4eca0c(0xfe)],_0x56fda2[_0x4eca0c(0xf4)]),_0x15dc5e=buildCustomPageEditUrl(_0x7ac51[_0x4eca0c(0xfe)],_0x56fda2[_0x4eca0c(0x103)]);return[{'pageId':_0x56fda2[_0x4eca0c(0x103)],'label':_0x56fda2[_0x4eca0c(0x107)],'path':_0x56fda2[_0x4eca0c(0xf4)],..._0x310b2b?{'pageUrl':_0x310b2b}:{},..._0x52cb00?{'runtimePageUrl':_0x52cb00}:{},..._0x15dc5e?{'editPageUrl':_0x15dc5e}:{}}];});return{'ok':!![],'data':{'pages':_0x1571d5},'message':_0x1571d5[_0x192191(0x100)]===0x0?_0x192191(0x106):'Found\x20'+_0x1571d5[_0x192191(0x100)]+_0x192191(0xfc)};}};
1
+ const a201_0x3cb429=a201_0x1a66;function a201_0x1a66(_0x5284b6,_0x53216d){_0x5284b6=_0x5284b6-0x1d2;const _0x13cffa=a201_0x13cf();let _0x1a66ce=_0x13cffa[_0x5284b6];return _0x1a66ce;}(function(_0x5d1111,_0x11cbc6){const _0x14aecb=a201_0x1a66,_0x66c753=_0x5d1111();while(!![]){try{const _0x193e9e=-parseInt(_0x14aecb(0x1e1))/0x1+-parseInt(_0x14aecb(0x1d3))/0x2*(-parseInt(_0x14aecb(0x1e6))/0x3)+parseInt(_0x14aecb(0x1eb))/0x4+parseInt(_0x14aecb(0x1e3))/0x5*(parseInt(_0x14aecb(0x1d7))/0x6)+parseInt(_0x14aecb(0x1ea))/0x7+parseInt(_0x14aecb(0x1db))/0x8*(-parseInt(_0x14aecb(0x1da))/0x9)+-parseInt(_0x14aecb(0x1dc))/0xa*(parseInt(_0x14aecb(0x1e4))/0xb);if(_0x193e9e===_0x11cbc6)break;else _0x66c753['push'](_0x66c753['shift']());}catch(_0x3ab62a){_0x66c753['push'](_0x66c753['shift']());}}}(a201_0x13cf,0x1a6c2));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a201_0x13cf(){const _0x615246=['cookie','52225FiQAPZ','4983FaJpRt','pageId','3ordNvN','compress','menus','custom-list','978859JyNxYN','512248zTtpnC','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','95086TXzAcu','read','length','react','102knaQNI','flatMap','path','383256lyjvNh','8BfHnYE','5570FmMikr','appCode','No\x20Custom\x20Pages\x20found.','page','\x20Custom\x20Page(s).','89876ppCdZd'];a201_0x13cf=function(){return _0x615246;};return a201_0x13cf();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a201_0x3cb429(0x1df),'command':a201_0x3cb429(0x1e9),'description':a201_0x3cb429(0x1d2),'risk':a201_0x3cb429(0x1d4),'defaultOutputFormat':a201_0x3cb429(0x1e7),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x589c76){const _0x4d7aaa=a201_0x3cb429,_0x5c1f29=(await fetchMenuSnapshot(_0x589c76[_0x4d7aaa(0x1dd)],_0x589c76[_0x4d7aaa(0x1e2)]))[_0x4d7aaa(0x1e8)][_0x4d7aaa(0x1d8)](_0x35fdef=>{const _0x3e6725=_0x4d7aaa;if(_0x35fdef['type']!==_0x3e6725(0x1d6)||_0x35fdef[_0x3e6725(0x1e5)]==null)return[];const _0x1f9c25=buildCustomPageDevelopmentUrl(_0x589c76[_0x3e6725(0x1dd)],_0x35fdef['path']),_0x3a9c0f=buildCustomPageRuntimeUrl(_0x589c76['appCode'],_0x35fdef[_0x3e6725(0x1d9)]),_0x256096=buildCustomPageEditUrl(_0x589c76['appCode'],_0x35fdef['pageId']);return[{'pageId':_0x35fdef[_0x3e6725(0x1e5)],'label':_0x35fdef['label'],'path':_0x35fdef[_0x3e6725(0x1d9)],..._0x1f9c25?{'pageUrl':_0x1f9c25}:{},..._0x3a9c0f?{'runtimePageUrl':_0x3a9c0f}:{},..._0x256096?{'editPageUrl':_0x256096}:{}}];});return{'ok':!![],'data':{'pages':_0x5c1f29},'message':_0x5c1f29[_0x4d7aaa(0x1d5)]===0x0?_0x4d7aaa(0x1de):'Found\x20'+_0x5c1f29[_0x4d7aaa(0x1d5)]+_0x4d7aaa(0x1e0)};}};
@@ -1 +1 @@
1
- const a202_0x59b52b=a202_0x3f38;(function(_0x1d1486,_0x4520f8){const _0x106c27=a202_0x3f38,_0x2fb2a0=_0x1d1486();while(!![]){try{const _0x2d14d2=-parseInt(_0x106c27(0xdc))/0x1*(parseInt(_0x106c27(0xf7))/0x2)+parseInt(_0x106c27(0xf0))/0x3*(-parseInt(_0x106c27(0xd6))/0x4)+parseInt(_0x106c27(0xf8))/0x5*(-parseInt(_0x106c27(0xdd))/0x6)+parseInt(_0x106c27(0xef))/0x7+-parseInt(_0x106c27(0xe8))/0x8*(-parseInt(_0x106c27(0xeb))/0x9)+parseInt(_0x106c27(0xda))/0xa*(parseInt(_0x106c27(0xe7))/0xb)+-parseInt(_0x106c27(0xdf))/0xc*(parseInt(_0x106c27(0xe1))/0xd);if(_0x2d14d2===_0x4520f8)break;else _0x2fb2a0['push'](_0x2fb2a0['shift']());}catch(_0x52eefa){_0x2fb2a0['push'](_0x2fb2a0['shift']());}}}(a202_0x5eaf,0x7dd16));function a202_0x5eaf(){const _0x6270ec=['push','5339271xaVmDB','57JoaLTj','appCode','FORMAL','remark','number','isInteger','compress','76JelLXK','26125aeQWWT','status','custom-publish','runtimePageUrl','cookie','Would\x20publish\x20Custom\x20Page\x20','145884DvTnZn','Custom\x20Page\x20ID','POST','pageId','8273850pHfbUj','string','1203hAvZYL','762IbOvmG','Published\x20Custom\x20Page\x20','2847348MpajAz','pageCode','26DdsoZt','/smartapi/webcode/file/publish','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','Optional\x20publish\x20remark','page.custom-publish','11nDhSzA','27072zzbwDH','trim','unknown','2133XOCUxu','warnings','str'];a202_0x5eaf=function(){return _0x6270ec;};return a202_0x5eaf();}import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a202_0x3f38(_0x11984b,_0x7a7dea){_0x11984b=_0x11984b-0xd5;const _0x5eaff3=a202_0x5eaf();let _0x3f3879=_0x5eaff3[_0x11984b];return _0x3f3879;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':'page','command':a202_0x59b52b(0xfa),'description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':'write','defaultOutputFormat':a202_0x59b52b(0xf6),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a202_0x59b52b(0xf4),'required':!![],'description':a202_0x59b52b(0xd7)},{'name':'remark','type':a202_0x59b52b(0xdb),'description':a202_0x59b52b(0xe5)}],async 'validate'(_0x15218f){readCustomPageId(_0x15218f);},async 'dryRun'(_0x25dc56){const _0x1784dc=a202_0x59b52b,_0x47513e=readInput(_0x25dc56);return{'method':_0x1784dc(0xd8),'url':_0x1784dc(0xe2),'body':{'id':_0x47513e[_0x1784dc(0xd9)],..._0x47513e[_0x1784dc(0xf3)]?{'remark':_0x47513e[_0x1784dc(0xf3)]}:{}},'description':_0x1784dc(0xd5)+_0x47513e['pageId']+'.'};},async 'execute'(_0x43862b){const _0x2528f4=a202_0x59b52b,_0x370bd0=readInput(_0x43862b);await getCustomPageSource(_0x370bd0['pageId']);const _0x3d2ef3=await publishCustomPage(_0x370bd0);if(!Number[_0x2528f4(0xf5)](_0x3d2ef3)||_0x3d2ef3!==_0x370bd0[_0x2528f4(0xd9)])throw CliErrors['apiError'](_0x2528f4(0xe4));const _0xa68042=await getCustomPageSource(_0x370bd0['pageId']);if(_0xa68042[_0x2528f4(0xf9)]!==_0x2528f4(0xf2))throw CliErrors['apiError'](_0x2528f4(0xe3)+(_0xa68042['status']??_0x2528f4(0xea))+'.');const _0x35fcca=_0xa68042[_0x2528f4(0xf1)]?.[_0x2528f4(0xe9)](),_0x4d211e=buildCustomPageEditUrl(_0x35fcca,_0x370bd0[_0x2528f4(0xd9)]),_0x352b77=await resolveCustomPageDevelopmentUrl(_0x35fcca,_0x370bd0[_0x2528f4(0xd9)],_0x43862b[_0x2528f4(0xfc)]),_0xe143d0=buildMutationData(_0x370bd0,!![],_0x352b77,_0x4d211e);_0x35fcca&&!_0x352b77&&_0xe143d0[_0x2528f4(0xec)][_0x2528f4(0xee)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x1b974a=buildCustomPageRuntimeUrl(_0xa68042[_0x2528f4(0xf1)],_0xa68042[_0x2528f4(0xe0)]);return _0x1b974a?_0xe143d0[_0x2528f4(0xfb)]=_0x1b974a:_0xe143d0['warnings'][_0x2528f4(0xee)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0xe143d0,'message':_0x2528f4(0xde)+_0x370bd0['pageId']+'.'};}};function readInput(_0x50dab4){const _0x53d66f=a202_0x59b52b,_0x4f5ba7=readCustomPageId(_0x50dab4),_0x2aad69=_0x50dab4[_0x53d66f(0xed)](_0x53d66f(0xf3))[_0x53d66f(0xe9)]();return{'pageId':_0x4f5ba7,..._0x2aad69?{'remark':_0x2aad69}:{}};}function buildMutationData(_0x2456a4,_0x244982=![],_0x358317,_0x577c00){const _0x2e700b=a202_0x59b52b;return{'operation':_0x2e700b(0xe6),'selector':{'pageId':_0x2456a4[_0x2e700b(0xd9)]},'before':null,'after':{'pageId':_0x2456a4[_0x2e700b(0xd9)],'status':'FORMAL'},'dryRun':!_0x244982,'request':_0x2456a4,..._0x358317?{'pageUrl':_0x358317}:{},..._0x577c00?{'editPageUrl':_0x577c00}:{},'warnings':[]};}
1
+ function a202_0x323c(){const _0x2fe422=['page','3594056aDTVAn','string','POST','1203nFCoHL','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','write','push','44082CVoxUd','567xGfrBv','140XkwDKE','pageCode','Custom\x20Page\x20ID','4AokWhQ','Optional\x20publish\x20remark','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','apiError','50360nzQyeP','custom-publish','warnings','isInteger','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','unknown','trim','4835860WCLBvQ','/smartapi/webcode/file/publish','9mGXZiM','compress','FORMAL','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','367603EdBTWs','cookie','482724OzmKxJ','runtimePageUrl','str','remark','pageId'];a202_0x323c=function(){return _0x2fe422;};return a202_0x323c();}const a202_0x18ef5d=a202_0x390b;(function(_0xf3a31f,_0x5cdc99){const _0x3dbd54=a202_0x390b,_0x2b50e0=_0xf3a31f();while(!![]){try{const _0x1b9efb=parseInt(_0x3dbd54(0x82))/0x1+parseInt(_0x3dbd54(0x71))/0x2*(-parseInt(_0x3dbd54(0x8d))/0x3)+parseInt(_0x3dbd54(0x6e))/0x4*(-parseInt(_0x3dbd54(0x75))/0x5)+parseInt(_0x3dbd54(0x6c))/0x6*(-parseInt(_0x3dbd54(0x6d))/0x7)+parseInt(_0x3dbd54(0x8a))/0x8+-parseInt(_0x3dbd54(0x7e))/0x9*(-parseInt(_0x3dbd54(0x7c))/0xa)+-parseInt(_0x3dbd54(0x84))/0xb;if(_0x1b9efb===_0x5cdc99)break;else _0x2b50e0['push'](_0x2b50e0['shift']());}catch(_0x42c637){_0x2b50e0['push'](_0x2b50e0['shift']());}}}(a202_0x323c,0x4b3a5));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a202_0x390b(_0x11f2a4,_0x2b930e){_0x11f2a4=_0x11f2a4-0x6c;const _0x323c5f=a202_0x323c();let _0x390b49=_0x323c5f[_0x11f2a4];return _0x390b49;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a202_0x18ef5d(0x89),'command':a202_0x18ef5d(0x76),'description':a202_0x18ef5d(0x81),'risk':a202_0x18ef5d(0x8f),'defaultOutputFormat':a202_0x18ef5d(0x7f),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a202_0x18ef5d(0x70)},{'name':a202_0x18ef5d(0x87),'type':a202_0x18ef5d(0x8b),'description':a202_0x18ef5d(0x72)}],async 'validate'(_0xb898ba){readCustomPageId(_0xb898ba);},async 'dryRun'(_0x5f177b){const _0x49067b=a202_0x18ef5d,_0x6fa48a=readInput(_0x5f177b);return{'method':_0x49067b(0x8c),'url':_0x49067b(0x7d),'body':{'id':_0x6fa48a['pageId'],..._0x6fa48a[_0x49067b(0x87)]?{'remark':_0x6fa48a[_0x49067b(0x87)]}:{}},'description':'Would\x20publish\x20Custom\x20Page\x20'+_0x6fa48a[_0x49067b(0x88)]+'.'};},async 'execute'(_0xf7641e){const _0x3ffa8c=a202_0x18ef5d,_0x16f3c8=readInput(_0xf7641e);await getCustomPageSource(_0x16f3c8[_0x3ffa8c(0x88)]);const _0x22182c=await publishCustomPage(_0x16f3c8);if(!Number[_0x3ffa8c(0x78)](_0x22182c)||_0x22182c!==_0x16f3c8[_0x3ffa8c(0x88)])throw CliErrors[_0x3ffa8c(0x74)](_0x3ffa8c(0x79));const _0x259eed=await getCustomPageSource(_0x16f3c8[_0x3ffa8c(0x88)]);if(_0x259eed['status']!==_0x3ffa8c(0x80))throw CliErrors[_0x3ffa8c(0x74)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x259eed['status']??_0x3ffa8c(0x7a))+'.');const _0x415af8=_0x259eed['appCode']?.[_0x3ffa8c(0x7b)](),_0x7162e3=buildCustomPageEditUrl(_0x415af8,_0x16f3c8[_0x3ffa8c(0x88)]),_0x3e7608=await resolveCustomPageDevelopmentUrl(_0x415af8,_0x16f3c8['pageId'],_0xf7641e[_0x3ffa8c(0x83)]),_0x3125b7=buildMutationData(_0x16f3c8,!![],_0x3e7608,_0x7162e3);_0x415af8&&!_0x3e7608&&_0x3125b7[_0x3ffa8c(0x77)]['push'](_0x3ffa8c(0x73));const _0xd9cd7d=buildCustomPageRuntimeUrl(_0x259eed['appCode'],_0x259eed[_0x3ffa8c(0x6f)]);return _0xd9cd7d?_0x3125b7[_0x3ffa8c(0x85)]=_0xd9cd7d:_0x3125b7[_0x3ffa8c(0x77)][_0x3ffa8c(0x90)](_0x3ffa8c(0x8e)),{'ok':!![],'data':_0x3125b7,'message':'Published\x20Custom\x20Page\x20'+_0x16f3c8['pageId']+'.'};}};function readInput(_0x2b49d2){const _0x1a56db=a202_0x18ef5d,_0x1e3b20=readCustomPageId(_0x2b49d2),_0x2973d5=_0x2b49d2[_0x1a56db(0x86)](_0x1a56db(0x87))[_0x1a56db(0x7b)]();return{'pageId':_0x1e3b20,..._0x2973d5?{'remark':_0x2973d5}:{}};}function buildMutationData(_0x404129,_0x30a323=![],_0x5c0244,_0x20895f){const _0x2d1609=a202_0x18ef5d;return{'operation':'page.custom-publish','selector':{'pageId':_0x404129[_0x2d1609(0x88)]},'before':null,'after':{'pageId':_0x404129[_0x2d1609(0x88)],'status':_0x2d1609(0x80)},'dryRun':!_0x30a323,'request':_0x404129,..._0x5c0244?{'pageUrl':_0x5c0244}:{},..._0x20895f?{'editPageUrl':_0x20895f}:{},'warnings':[]};}
@@ -1 +1 @@
1
- const a203_0x4c689f=a203_0x1df2;(function(_0x4d9d6a,_0x5b535c){const _0x4a38e1=a203_0x1df2,_0x275f33=_0x4d9d6a();while(!![]){try{const _0x3c928b=-parseInt(_0x4a38e1(0x133))/0x1*(parseInt(_0x4a38e1(0x135))/0x2)+parseInt(_0x4a38e1(0x137))/0x3+-parseInt(_0x4a38e1(0x12d))/0x4+parseInt(_0x4a38e1(0x13b))/0x5+parseInt(_0x4a38e1(0x13d))/0x6+-parseInt(_0x4a38e1(0x129))/0x7+parseInt(_0x4a38e1(0x12b))/0x8;if(_0x3c928b===_0x5b535c)break;else _0x275f33['push'](_0x275f33['shift']());}catch(_0x197abb){_0x275f33['push'](_0x275f33['shift']());}}}(a203_0x4db8,0x26091));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a203_0x4db8(){const _0x16bf3e=['485882rUjsXh','type','822072vuYwwQ','Invalid\x20Custom\x20Page\x20content:\x20','--id\x20must\x20be\x20a\x20positive\x20integer.','/ide/','271260FWBCje','react','231030sfxKYd','menus','map','876610KaWeIC','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','3370136XfdBGW','length','1056336fKURwP','/pages/','message','join','path','file','1MRDBbv','find'];a203_0x4db8=function(){return _0x16bf3e;};return a203_0x4db8();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';function a203_0x1df2(_0x50ef98,_0x292624){_0x50ef98=_0x50ef98-0x128;const _0x4db855=a203_0x4db8();let _0x1df2c4=_0x4db855[_0x50ef98];return _0x1df2c4;}import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a203_0x4c689f(0x12a)};function trimOptional(_0x11bcbc){return _0x11bcbc?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x451503,_0x5d2054){const _0x15ad97=trimOptional(_0x451503),_0x1cae67=trimOptional(_0x5d2054);if(!_0x15ad97||!_0x1cae67)return undefined;return getPublishedAppDomain(_0x15ad97)+'/'+encodeURIComponent(_0x1cae67);}export function buildCustomPageDevelopmentUrl(_0x1f44ed,_0x4550a2){const _0x29f83c=a203_0x4c689f,_0x4c35be=trimOptional(_0x1f44ed),_0x384963=trimOptional(_0x4550a2);if(!_0x4c35be||!_0x384963)return undefined;return getAppBaseUrl(_0x4c35be)+_0x29f83c(0x12e)+encodeURIComponent(_0x384963);}export async function resolveCustomPageDevelopmentUrl(_0x4d754f,_0x5903ab,_0x33826a){const _0x20b12e=a203_0x4c689f,_0x1262e0=trimOptional(_0x4d754f);if(!_0x1262e0)return undefined;try{const _0x5c3481=(await fetchMenuSnapshot(_0x1262e0,_0x33826a))[_0x20b12e(0x13e)][_0x20b12e(0x134)](_0x34895a=>_0x34895a[_0x20b12e(0x136)]===_0x20b12e(0x13c)&&_0x34895a['pageId']===_0x5903ab);return buildCustomPageDevelopmentUrl(_0x1262e0,_0x5c3481?.[_0x20b12e(0x131)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x4ebeb7,_0x551b3a){const _0xdc3196=a203_0x4c689f,_0x1c58d3=trimOptional(_0x4ebeb7);if(!_0x1c58d3)return;const _0x3a6402=trimOptional(String(_0x551b3a??''));if(!_0x3a6402)return;return getAppBaseUrl(_0x1c58d3)+_0xdc3196(0x13a)+encodeURIComponent(_0x3a6402);}export async function validateCustomPageContent(_0x4bfa69){const _0x26e5e8=a203_0x4c689f,_0x257f1b=await validateCustomPageSourceFiles(_0x4bfa69);if(_0x257f1b[_0x26e5e8(0x12c)]>0x0)throw CliErrors['validation'](_0x26e5e8(0x138)+_0x257f1b[_0x26e5e8(0x128)](_0x2582f9=>_0x2582f9[_0x26e5e8(0x132)]+':\x20'+_0x2582f9[_0x26e5e8(0x12f)])[_0x26e5e8(0x130)](';\x20'));}export function readCustomPageId(_0xa156f1){const _0x442eeb=a203_0x4c689f,_0x9ad14e=_0xa156f1['num']('id');if(!Number['isInteger'](_0x9ad14e)||_0x9ad14e<=0x0)throw CliErrors['validation'](_0x442eeb(0x139));return _0x9ad14e;}
1
+ const a203_0x5017dc=a203_0x17ab;(function(_0x4a4d46,_0x4e2a62){const _0x52f59d=a203_0x17ab,_0x76d798=_0x4a4d46();while(!![]){try{const _0x37a529=-parseInt(_0x52f59d(0x193))/0x1*(-parseInt(_0x52f59d(0x189))/0x2)+-parseInt(_0x52f59d(0x19a))/0x3+parseInt(_0x52f59d(0x18e))/0x4*(-parseInt(_0x52f59d(0x191))/0x5)+parseInt(_0x52f59d(0x195))/0x6+parseInt(_0x52f59d(0x1a0))/0x7*(parseInt(_0x52f59d(0x194))/0x8)+-parseInt(_0x52f59d(0x18c))/0x9*(parseInt(_0x52f59d(0x186))/0xa)+-parseInt(_0x52f59d(0x19b))/0xb*(-parseInt(_0x52f59d(0x18a))/0xc);if(_0x37a529===_0x4e2a62)break;else _0x76d798['push'](_0x76d798['shift']());}catch(_0x140097){_0x76d798['push'](_0x76d798['shift']());}}}(a203_0x5931,0x2abe9));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';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a203_0x5017dc(0x192)};function trimOptional(_0x4d68ac){const _0x50ee68=a203_0x5017dc;return _0x4d68ac?.[_0x50ee68(0x190)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x46d7e5,_0x537f0e){const _0x39bccc=trimOptional(_0x46d7e5),_0x11eb8d=trimOptional(_0x537f0e);if(!_0x39bccc||!_0x11eb8d)return undefined;return getPublishedAppDomain(_0x39bccc)+'/'+encodeURIComponent(_0x11eb8d);}export function buildCustomPageDevelopmentUrl(_0x4a6a6f,_0x395062){const _0x3e35c2=a203_0x5017dc,_0x3a5944=trimOptional(_0x4a6a6f),_0x150850=trimOptional(_0x395062);if(!_0x3a5944||!_0x150850)return undefined;return getAppBaseUrl(_0x3a5944)+_0x3e35c2(0x187)+encodeURIComponent(_0x150850);}export async function resolveCustomPageDevelopmentUrl(_0x31f515,_0xcb6bef,_0x2a60e7){const _0x541c9e=a203_0x5017dc,_0x2c8e1d=trimOptional(_0x31f515);if(!_0x2c8e1d)return undefined;try{const _0x2294e5=(await fetchMenuSnapshot(_0x2c8e1d,_0x2a60e7))['menus']['find'](_0x2f0069=>_0x2f0069[_0x541c9e(0x18b)]===_0x541c9e(0x198)&&_0x2f0069[_0x541c9e(0x19c)]===_0xcb6bef);return buildCustomPageDevelopmentUrl(_0x2c8e1d,_0x2294e5?.[_0x541c9e(0x18d)]);}catch{return undefined;}}function a203_0x17ab(_0x2afa2e,_0x1ec38e){_0x2afa2e=_0x2afa2e-0x186;const _0x593198=a203_0x5931();let _0x17abba=_0x593198[_0x2afa2e];return _0x17abba;}export function buildCustomPageEditUrl(_0x2e9e54,_0x5adf25){const _0x398e75=a203_0x5017dc,_0x5dd62b=trimOptional(_0x2e9e54);if(!_0x5dd62b)return;const _0x4da2f6=trimOptional(String(_0x5adf25??''));if(!_0x4da2f6)return;return getAppBaseUrl(_0x5dd62b)+_0x398e75(0x197)+encodeURIComponent(_0x4da2f6);}export async function validateCustomPageContent(_0x36e0c4){const _0xabaf0b=a203_0x5017dc,_0x2eccb1=await validateCustomPageSourceFiles(_0x36e0c4);if(_0x2eccb1['length']>0x0)throw CliErrors['validation'](_0xabaf0b(0x19e)+_0x2eccb1['map'](_0x915810=>_0x915810[_0xabaf0b(0x18f)]+':\x20'+_0x915810['message'])[_0xabaf0b(0x19d)](';\x20'));}export function readCustomPageId(_0x555161){const _0x1b3fb2=a203_0x5017dc,_0x4fed15=_0x555161[_0x1b3fb2(0x196)]('id');if(!Number[_0x1b3fb2(0x188)](_0x4fed15)||_0x4fed15<=0x0)throw CliErrors[_0x1b3fb2(0x19f)](_0x1b3fb2(0x199));return _0x4fed15;}function a203_0x5931(){const _0x4b71da=['validation','70DgSNAZ','540850fdGhoz','/pages/','isInteger','2tZGMJX','2869788iDKOnu','type','18RPdxXx','path','4mzTlMV','file','trim','298735qUbjvr','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','4001YZUZWr','3768aSRkRC','2014050rybHnA','num','/ide/','react','--id\x20must\x20be\x20a\x20positive\x20integer.','721611pFySVj','11SHVvfc','pageId','join','Invalid\x20Custom\x20Page\x20content:\x20'];a203_0x5931=function(){return _0x4b71da;};return a203_0x5931();}
@@ -1 +1 @@
1
- const a204_0x20808e=a204_0x58f0;(function(_0x1ee7aa,_0x416768){const _0x3e8a70=a204_0x58f0,_0x4d0f12=_0x1ee7aa();while(!![]){try{const _0x18ba7b=parseInt(_0x3e8a70(0x1f2))/0x1*(parseInt(_0x3e8a70(0x1f3))/0x2)+-parseInt(_0x3e8a70(0x1e9))/0x3*(-parseInt(_0x3e8a70(0x1ee))/0x4)+parseInt(_0x3e8a70(0x1f1))/0x5+parseInt(_0x3e8a70(0x1f5))/0x6+parseInt(_0x3e8a70(0x1f0))/0x7+-parseInt(_0x3e8a70(0x1eb))/0x8+parseInt(_0x3e8a70(0x1df))/0x9*(-parseInt(_0x3e8a70(0x1e7))/0xa);if(_0x18ba7b===_0x416768)break;else _0x4d0f12['push'](_0x4d0f12['shift']());}catch(_0xdc379e){_0x4d0f12['push'](_0x4d0f12['shift']());}}}(a204_0x333c,0xd0b40));import{format}from'prettier';function a204_0x333c(){const _0x174c96=['4uLbGNN','typescript','1748705OxVMHF','3196620vNBEfr','4185wcYFnd','454kIgrFE','message','6107484bNnSTV','all','153756HBpcKR','.jsx','page\x20files','entries','trim','endsWith','babel','filter','680YCtRFW','find','709431nhCyyQ','some','8615720BwwAzX','toLowerCase','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx'];a204_0x333c=function(){return _0x174c96;};return a204_0x333c();}const SOURCE_PARSERS={'.js':a204_0x20808e(0x1e5),'.jsx':a204_0x20808e(0x1e5),'.ts':a204_0x20808e(0x1ef),'.tsx':a204_0x20808e(0x1ef)},CUSTOM_PAGE_EXTENSIONS=[a204_0x20808e(0x1e0),'.tsx'];function a204_0x58f0(_0x59677b,_0x54987a){_0x59677b=_0x59677b-0x1df;const _0x333c7c=a204_0x333c();let _0x58f0ef=_0x333c7c[_0x59677b];return _0x58f0ef;}export async function validateCustomPageSourceFiles(_0x27dccf){const _0x2e65f6=a204_0x20808e,_0x15ae1d=Object[_0x2e65f6(0x1e2)](_0x27dccf)[_0x2e65f6(0x1e6)](([_0xe9ac18])=>getParser(_0xe9ac18));if(!_0x15ae1d[_0x2e65f6(0x1ea)](([_0x3b117b])=>isReactSourceFile(_0x3b117b)))return[{'file':_0x2e65f6(0x1e1),'message':_0x2e65f6(0x1ed)}];const _0x18dcfb=await Promise[_0x2e65f6(0x1f6)](_0x15ae1d['map'](async([_0x42c599,_0x22e459])=>{const _0x11e16c=_0x2e65f6;try{return await format(_0x22e459,{'parser':getParser(_0x42c599)}),undefined;}catch(_0x54ac57){return{'file':_0x42c599,'message':_0x54ac57 instanceof Error?_0x54ac57[_0x11e16c(0x1f4)]:String(_0x54ac57)};}}));return _0x18dcfb[_0x2e65f6(0x1e6)](_0x1bf29b=>_0x1bf29b!==undefined);}function getParser(_0x3ebc56){const _0x4bbbef=a204_0x20808e,_0x4b77e5=_0x3ebc56[_0x4bbbef(0x1e3)]()[_0x4bbbef(0x1ec)]();return Object[_0x4bbbef(0x1e2)](SOURCE_PARSERS)[_0x4bbbef(0x1e8)](([_0x246711])=>_0x4b77e5[_0x4bbbef(0x1e4)](_0x246711))?.[0x1];}function isReactSourceFile(_0x3e5313){const _0x261f2a=a204_0x20808e,_0x5d8522=_0x3e5313['trim']()[_0x261f2a(0x1ec)]();return CUSTOM_PAGE_EXTENSIONS[_0x261f2a(0x1ea)](_0x4d68ca=>_0x5d8522['endsWith'](_0x4d68ca));}
1
+ const a204_0x5d056f=a204_0x53f2;(function(_0x2d5e5c,_0x15741b){const _0x2684e6=a204_0x53f2,_0x3e9e69=_0x2d5e5c();while(!![]){try{const _0xed3c86=parseInt(_0x2684e6(0x17f))/0x1+parseInt(_0x2684e6(0x17e))/0x2*(-parseInt(_0x2684e6(0x186))/0x3)+-parseInt(_0x2684e6(0x188))/0x4*(-parseInt(_0x2684e6(0x182))/0x5)+parseInt(_0x2684e6(0x189))/0x6*(parseInt(_0x2684e6(0x180))/0x7)+parseInt(_0x2684e6(0x187))/0x8+-parseInt(_0x2684e6(0x17d))/0x9*(parseInt(_0x2684e6(0x17b))/0xa)+parseInt(_0x2684e6(0x178))/0xb*(-parseInt(_0x2684e6(0x183))/0xc);if(_0xed3c86===_0x15741b)break;else _0x3e9e69['push'](_0x3e9e69['shift']());}catch(_0x485dc0){_0x3e9e69['push'](_0x3e9e69['shift']());}}}(a204_0x4509,0xa463b));import{format}from'prettier';function a204_0x53f2(_0x5ad370,_0x3aac5c){_0x5ad370=_0x5ad370-0x175;const _0x450991=a204_0x4509();let _0x53f213=_0x450991[_0x5ad370];return _0x53f213;}const SOURCE_PARSERS={'.js':a204_0x5d056f(0x184),'.jsx':a204_0x5d056f(0x184),'.ts':a204_0x5d056f(0x176),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=['.jsx','.tsx'];function a204_0x4509(){const _0x4c529e=['154IEdaCz','toLowerCase','5AYOvEi','10284408acEMJm','babel','trim','3NmCoir','8046160vNwQQz','4254184ZQEakX','14772QwZdGG','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','map','message','entries','typescript','filter','11QtKyAH','some','endsWith','60EETcrX','find','1753146RNoyeb','1271228XDoffr','1211271TtIPnQ'];a204_0x4509=function(){return _0x4c529e;};return a204_0x4509();}export async function validateCustomPageSourceFiles(_0x2ab167){const _0xa08cbb=a204_0x5d056f,_0x5d5cc6=Object['entries'](_0x2ab167)[_0xa08cbb(0x177)](([_0x5bd46a])=>getParser(_0x5bd46a));if(!_0x5d5cc6[_0xa08cbb(0x179)](([_0x321357])=>isReactSourceFile(_0x321357)))return[{'file':'page\x20files','message':_0xa08cbb(0x18a)}];const _0x2326b3=await Promise['all'](_0x5d5cc6[_0xa08cbb(0x18b)](async([_0x400e3d,_0x4f9217])=>{const _0x13d61d=_0xa08cbb;try{return await format(_0x4f9217,{'parser':getParser(_0x400e3d)}),undefined;}catch(_0x5b977f){return{'file':_0x400e3d,'message':_0x5b977f instanceof Error?_0x5b977f[_0x13d61d(0x18c)]:String(_0x5b977f)};}}));return _0x2326b3[_0xa08cbb(0x177)](_0x37751d=>_0x37751d!==undefined);}function getParser(_0x532479){const _0x5ca1f6=a204_0x5d056f,_0x26b4c7=_0x532479[_0x5ca1f6(0x185)]()[_0x5ca1f6(0x181)]();return Object[_0x5ca1f6(0x175)](SOURCE_PARSERS)[_0x5ca1f6(0x17c)](([_0x2e607d])=>_0x26b4c7[_0x5ca1f6(0x17a)](_0x2e607d))?.[0x1];}function isReactSourceFile(_0x1a5111){const _0x2bac8e=a204_0x5d056f,_0x3769f0=_0x1a5111[_0x2bac8e(0x185)]()[_0x2bac8e(0x181)]();return CUSTOM_PAGE_EXTENSIONS[_0x2bac8e(0x179)](_0x4a0102=>_0x3769f0[_0x2bac8e(0x17a)](_0x4a0102));}
@@ -1 +1 @@
1
- const a205_0x522d88=a205_0x3a85;(function(_0x261946,_0x364461){const _0x3949b5=a205_0x3a85,_0x25bdc6=_0x261946();while(!![]){try{const _0x375857=parseInt(_0x3949b5(0xd7))/0x1+-parseInt(_0x3949b5(0xd9))/0x2+parseInt(_0x3949b5(0xd0))/0x3+parseInt(_0x3949b5(0xda))/0x4*(-parseInt(_0x3949b5(0xd4))/0x5)+parseInt(_0x3949b5(0xd5))/0x6+parseInt(_0x3949b5(0xdb))/0x7+-parseInt(_0x3949b5(0xc4))/0x8;if(_0x375857===_0x364461)break;else _0x25bdc6['push'](_0x25bdc6['shift']());}catch(_0x130a7f){_0x25bdc6['push'](_0x25bdc6['shift']());}}}(a205_0x51c3,0x8973f));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';function a205_0x3a85(_0x481a03,_0x365e76){_0x481a03=_0x481a03-0xc3;const _0x51c3f6=a205_0x51c3();let _0x3a8586=_0x51c3f6[_0x481a03];return _0x3a8586;}export const pageCustomUpdate={'service':a205_0x522d88(0xd1),'command':'custom-update','description':a205_0x522d88(0xdd),'risk':a205_0x522d88(0xdc),'defaultOutputFormat':a205_0x522d88(0xd2),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a205_0x522d88(0xe1),'message':a205_0x522d88(0xcf),'hint':a205_0x522d88(0xe2)}],'flags':[{'name':'id','type':a205_0x522d88(0xd8),'required':!![],'description':a205_0x522d88(0xca)},{'name':'page-dir','type':a205_0x522d88(0xd6),'required':!![],'description':a205_0x522d88(0xcb)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x924e3c){readCustomPageId(_0x924e3c),await readValidatedPageContent(_0x924e3c);},async 'dryRun'(_0x203e1b){const _0x477563=a205_0x522d88,_0x2dd957=await readInput(_0x203e1b);return{'method':_0x477563(0xc8),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x2dd957[_0x477563(0xde)],'codeContent':_0x2dd957[_0x477563(0xcc)]},'description':_0x477563(0xc9)+_0x2dd957[_0x477563(0xde)]+'.'};},async 'execute'(_0x562157){const _0x5d30b8=a205_0x522d88,_0x4e2639=await readInput(_0x562157),_0x2fef62=await updateCustomPageContent({'pageId':_0x4e2639['pageId'],'pageContent':_0x4e2639['pageContent']});if(!Number['isInteger'](_0x2fef62[_0x5d30b8(0xd3)])||_0x2fef62[_0x5d30b8(0xd3)]<=0x0)throw CliErrors[_0x5d30b8(0xe0)](_0x5d30b8(0xe3));const _0x341fa4=buildCustomPageEditUrl(_0x4e2639[_0x5d30b8(0xcd)],_0x4e2639['pageId']),_0x47a9f4=await resolveCustomPageDevelopmentUrl(_0x4e2639[_0x5d30b8(0xcd)],_0x4e2639[_0x5d30b8(0xde)],_0x562157['cookie']);return{'ok':!![],'data':{'operation':_0x5d30b8(0xc3),'selector':{'appCode':_0x4e2639[_0x5d30b8(0xcd)],'pageId':_0x4e2639[_0x5d30b8(0xde)]},'before':null,'after':{'pageId':_0x2fef62['pageId'],'version':_0x2fef62[_0x5d30b8(0xd3)],'pageContent':_0x4e2639[_0x5d30b8(0xcc)]},'dryRun':![],'request':_0x4e2639,..._0x47a9f4?{'pageUrl':_0x47a9f4}:{},..._0x341fa4?{'editPageUrl':_0x341fa4}:{},'warnings':_0x47a9f4?[]:[_0x5d30b8(0xc5)]},'message':_0x5d30b8(0xce)+_0x4e2639[_0x5d30b8(0xde)]+'.'};}};async function readInput(_0x50d82f){const _0x25dd63=a205_0x522d88,_0x52f5e9=readCustomPageId(_0x50d82f),_0x573cd9=_0x50d82f[_0x25dd63(0xc7)]('appcode')[_0x25dd63(0xc6)]()||(await getCustomPageSource(_0x52f5e9))['appCode']?.[_0x25dd63(0xc6)]();if(!_0x573cd9)throw CliErrors[_0x25dd63(0xdf)]('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x52f5e9+'.');return{'appCode':_0x573cd9,'pageId':_0x52f5e9,'pageContent':await readValidatedPageContent(_0x50d82f)};}async function readValidatedPageContent(_0x360218){const _0x2d5e4f=a205_0x522d88,_0x3017cf=await readCustomPageDirectory(_0x360218['str'](_0x2d5e4f(0xe4)));return await validateCustomPageContent(_0x3017cf),_0x3017cf;}function a205_0x51c3(){const _0x5da8e0=['Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','page-dir','page.custom-update','4882832DwgMFt','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','trim','str','POST','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','Custom\x20Page\x20ID','Directory\x20containing\x20all\x20complete\x20page\x20files','pageContent','appCode','Updated\x20Custom\x20Page\x20','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','3125196ARxcam','page','compress','newVersion','764420wSkQhZ','261720ZEAYic','string','432159akwtSM','number','1875948WHQyPT','4QVIvfP','5226956ZRFXDn','write','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','pageId','validation','apiError','page-content','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'];a205_0x51c3=function(){return _0x5da8e0;};return a205_0x51c3();}
1
+ function a205_0x370c(){const _0x4d53c4=['Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','/smartapi/webcode/page/update/content','trim','772xvngeI','appCode','str','custom-update','newVersion','cookie','1391800ELEJKz','790EGfZMn','write','number','6245WBuBOZ','page','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','324NoZCZK','Custom\x20Page\x20ID','Directory\x20containing\x20all\x20complete\x20page\x20files','string','1770360KEVsOD','251840DbkMeM','page.custom-update','page-dir','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','882pMBjNx','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','361392udWthf','appcode','page-content','7AAfxYg','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','POST','pageContent','pageId','isInteger','64360OgHlYl','286mOSlog','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.'];a205_0x370c=function(){return _0x4d53c4;};return a205_0x370c();}const a205_0x5073f0=a205_0xb2b6;(function(_0xd5ac5a,_0x5e02ed){const _0x15a14c=a205_0xb2b6,_0x5bc3bd=_0xd5ac5a();while(!![]){try{const _0x2cfa61=parseInt(_0x15a14c(0x185))/0x1+-parseInt(_0x15a14c(0x17a))/0x2*(-parseInt(_0x15a14c(0x189))/0x3)+parseInt(_0x15a14c(0x173))/0x4*(-parseInt(_0x15a14c(0x17d))/0x5)+parseInt(_0x15a14c(0x184))/0x6*(-parseInt(_0x15a14c(0x18e))/0x7)+-parseInt(_0x15a14c(0x179))/0x8+-parseInt(_0x15a14c(0x180))/0x9*(parseInt(_0x15a14c(0x194))/0xa)+parseInt(_0x15a14c(0x195))/0xb*(parseInt(_0x15a14c(0x18b))/0xc);if(_0x2cfa61===_0x5e02ed)break;else _0x5bc3bd['push'](_0x5bc3bd['shift']());}catch(_0x904614){_0x5bc3bd['push'](_0x5bc3bd['shift']());}}}(a205_0x370c,0x3312e));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';function a205_0xb2b6(_0x4f9cab,_0x2f9774){_0x4f9cab=_0x4f9cab-0x171;const _0x370c29=a205_0x370c();let _0xb2b64d=_0x370c29[_0x4f9cab];return _0xb2b64d;}import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a205_0x5073f0(0x17e),'command':a205_0x5073f0(0x176),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a205_0x5073f0(0x17b),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a205_0x5073f0(0x18d),'message':a205_0x5073f0(0x18a),'hint':a205_0x5073f0(0x17f)}],'flags':[{'name':'id','type':a205_0x5073f0(0x17c),'required':!![],'description':a205_0x5073f0(0x181)},{'name':a205_0x5073f0(0x187),'type':a205_0x5073f0(0x183),'required':!![],'description':a205_0x5073f0(0x182)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x302a32){readCustomPageId(_0x302a32),await readValidatedPageContent(_0x302a32);},async 'dryRun'(_0x24a39d){const _0x52e146=a205_0x5073f0,_0x1d1979=await readInput(_0x24a39d);return{'method':_0x52e146(0x190),'url':_0x52e146(0x171),'body':{'id':_0x1d1979[_0x52e146(0x192)],'codeContent':_0x1d1979['pageContent']},'description':_0x52e146(0x188)+_0x1d1979[_0x52e146(0x192)]+'.'};},async 'execute'(_0x29265d){const _0x1074ed=a205_0x5073f0,_0x4fe3f5=await readInput(_0x29265d),_0x22ebc9=await updateCustomPageContent({'pageId':_0x4fe3f5['pageId'],'pageContent':_0x4fe3f5[_0x1074ed(0x191)]});if(!Number[_0x1074ed(0x193)](_0x22ebc9[_0x1074ed(0x177)])||_0x22ebc9[_0x1074ed(0x177)]<=0x0)throw CliErrors['apiError'](_0x1074ed(0x196));const _0x56a592=buildCustomPageEditUrl(_0x4fe3f5[_0x1074ed(0x174)],_0x4fe3f5[_0x1074ed(0x192)]),_0x58e294=await resolveCustomPageDevelopmentUrl(_0x4fe3f5[_0x1074ed(0x174)],_0x4fe3f5['pageId'],_0x29265d[_0x1074ed(0x178)]);return{'ok':!![],'data':{'operation':_0x1074ed(0x186),'selector':{'appCode':_0x4fe3f5[_0x1074ed(0x174)],'pageId':_0x4fe3f5[_0x1074ed(0x192)]},'before':null,'after':{'pageId':_0x22ebc9['pageId'],'version':_0x22ebc9['newVersion'],'pageContent':_0x4fe3f5[_0x1074ed(0x191)]},'dryRun':![],'request':_0x4fe3f5,..._0x58e294?{'pageUrl':_0x58e294}:{},..._0x56a592?{'editPageUrl':_0x56a592}:{},'warnings':_0x58e294?[]:[_0x1074ed(0x197)]},'message':'Updated\x20Custom\x20Page\x20'+_0x4fe3f5[_0x1074ed(0x192)]+'.'};}};async function readInput(_0x250144){const _0x511067=a205_0x5073f0,_0x3a9ce1=readCustomPageId(_0x250144),_0x255497=_0x250144['str'](_0x511067(0x18c))[_0x511067(0x172)]()||(await getCustomPageSource(_0x3a9ce1))[_0x511067(0x174)]?.[_0x511067(0x172)]();if(!_0x255497)throw CliErrors['validation'](_0x511067(0x18f)+_0x3a9ce1+'.');return{'appCode':_0x255497,'pageId':_0x3a9ce1,'pageContent':await readValidatedPageContent(_0x250144)};}async function readValidatedPageContent(_0x7c9825){const _0x54cd77=a205_0x5073f0,_0x3ea2d1=await readCustomPageDirectory(_0x7c9825[_0x54cd77(0x175)](_0x54cd77(0x187)));return await validateCustomPageContent(_0x3ea2d1),_0x3ea2d1;}
@@ -1 +1 @@
1
- function a206_0xb2b0(){const _0x3e854f=['1010690ahsfkQ','page','/standard-page-status?appCode=','1183293DKjYcV','338583EKPsjD','475155DLzlST','appCode','87368yTAPKN','code','manualResolutionRequired','2203836WDxbFN','related-pages-fallback','2gyKiXW','nextAction','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','source','compress','length','status','16VxocMC','6087348IacGiu','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','data-list-status'];a206_0xb2b0=function(){return _0x3e854f;};return a206_0xb2b0();}const a206_0x2b0d61=a206_0x15aa;(function(_0x118ef4,_0x2a4d3a){const _0x252b61=a206_0x15aa,_0x414062=_0x118ef4();while(!![]){try{const _0x361b83=-parseInt(_0x252b61(0x7d))/0x1+-parseInt(_0x252b61(0x6d))/0x2*(parseInt(_0x252b61(0x7b))/0x3)+-parseInt(_0x252b61(0x68))/0x4+parseInt(_0x252b61(0x78))/0x5+parseInt(_0x252b61(0x6b))/0x6+parseInt(_0x252b61(0x7c))/0x7*(-parseInt(_0x252b61(0x74))/0x8)+parseInt(_0x252b61(0x75))/0x9;if(_0x361b83===_0x2a4d3a)break;else _0x414062['push'](_0x414062['shift']());}catch(_0x59be4d){_0x414062['push'](_0x414062['shift']());}}}(a206_0xb2b0,0x3ee72));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a206_0x15aa(_0x32a54a,_0x70141b){_0x32a54a=_0x32a54a-0x68;const _0xb2b074=a206_0xb2b0();let _0x15aaf8=_0xb2b074[_0x32a54a];return _0x15aaf8;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a206_0x2b0d61(0x79),'command':a206_0x2b0d61(0x77),'description':a206_0x2b0d61(0x6f),'risk':'read','defaultOutputFormat':a206_0x2b0d61(0x71),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a206_0x2b0d61(0x76)}],async 'validate'(_0x375846){validateDatasetSelector(_0x375846);},async 'dryRun'(_0x5ebeda){const _0x5ca490=a206_0x2b0d61,_0x510fc5=await loadDatasetDetailForPage(_0x5ebeda);return{'method':'GET','url':'/smartapi/lovrabet/dataset/'+_0x510fc5[_0x5ca490(0x69)]+_0x5ca490(0x7a)+encodeURIComponent(_0x5ebeda[_0x5ca490(0x7e)]),'description':serializeDryRunDescription({'dataset':{'id':_0x510fc5['id'],'code':_0x510fc5[_0x5ca490(0x69)],'name':_0x510fc5['name']},'action':'query-data-list-status'})};},async 'execute'(_0x3144c4){const _0x9ffcad=a206_0x2b0d61,_0x8307c2=await loadDatasetDetailForPage(_0x3144c4),_0x1f32bf=await loadDataListPageStatusForGenerate(_0x3144c4,_0x8307c2[_0x9ffcad(0x69)]),_0x4f5033=getUndeletedRelatedPages(_0x8307c2),_0x732f6f=assessDataListPageState(_0x8307c2[_0x9ffcad(0x69)],_0x1f32bf,{'fallbackUndeletedPages':_0x4f5033});return{'ok':!![],'data':{'datasetCode':_0x8307c2[_0x9ffcad(0x69)],'precheckSource':_0x1f32bf?.[_0x9ffcad(0x70)]??_0x9ffcad(0x6c),'status':_0x732f6f[_0x9ffcad(0x73)],'manualResolutionRequired':_0x732f6f[_0x9ffcad(0x6a)],'nextAction':_0x732f6f[_0x9ffcad(0x6e)],'dataListPageStatus':_0x1f32bf,'relatedPages':{'total':_0x8307c2['relatedPages'][_0x9ffcad(0x72)],'undeletedCount':_0x4f5033[_0x9ffcad(0x72)]}}};}};
1
+ const a206_0x57675c=a206_0xdfe4;function a206_0x1fd6(){const _0x19a58e=['84562sbgwiW','query-data-list-status','8NFyxrH','relatedPages','965178RlSLgO','read','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','string','status','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','source','appCode','12956377CZOnkM','39GbmkzC','1744podRHi','GET','2047239XZmfzG','length','alias','compress','manualResolutionRequired','1483746dGxQpw','related-pages-fallback','1090gamcWk','name','nextAction','150MrLKMP','page','/smartapi/lovrabet/dataset/','6447330oVprWj','/standard-page-status?appCode=','code'];a206_0x1fd6=function(){return _0x19a58e;};return a206_0x1fd6();}function a206_0xdfe4(_0x1c467e,_0x36e10b){_0x1c467e=_0x1c467e-0xd9;const _0x1fd62f=a206_0x1fd6();let _0xdfe4c0=_0x1fd62f[_0x1c467e];return _0xdfe4c0;}(function(_0x38fbd3,_0xd66591){const _0x5d03d7=a206_0xdfe4,_0x4d6e7e=_0x38fbd3();while(!![]){try{const _0x54cd30=parseInt(_0x5d03d7(0xf1))/0x1*(parseInt(_0x5d03d7(0xe4))/0x2)+parseInt(_0x5d03d7(0xe8))/0x3+parseInt(_0x5d03d7(0xf2))/0x4*(parseInt(_0x5d03d7(0xdb))/0x5)+-parseInt(_0x5d03d7(0xe1))/0x6+parseInt(_0x5d03d7(0xf0))/0x7*(-parseInt(_0x5d03d7(0xe6))/0x8)+-parseInt(_0x5d03d7(0xf4))/0x9+parseInt(_0x5d03d7(0xde))/0xa*(parseInt(_0x5d03d7(0xd9))/0xb);if(_0x54cd30===_0xd66591)break;else _0x4d6e7e['push'](_0x4d6e7e['shift']());}catch(_0x32a82a){_0x4d6e7e['push'](_0x4d6e7e['shift']());}}}(a206_0x1fd6,0xe4896));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a206_0x57675c(0xdf),'command':'data-list-status','description':a206_0x57675c(0xed),'risk':a206_0x57675c(0xe9),'defaultOutputFormat':a206_0x57675c(0xf7),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a206_0x57675c(0xf6),'type':a206_0x57675c(0xeb),'description':a206_0x57675c(0xea)}],async 'validate'(_0x3b9b58){validateDatasetSelector(_0x3b9b58);},async 'dryRun'(_0x1749d1){const _0x549cfd=a206_0x57675c,_0xbedee6=await loadDatasetDetailForPage(_0x1749d1);return{'method':_0x549cfd(0xf3),'url':_0x549cfd(0xe0)+_0xbedee6[_0x549cfd(0xe3)]+_0x549cfd(0xe2)+encodeURIComponent(_0x1749d1[_0x549cfd(0xef)]),'description':serializeDryRunDescription({'dataset':{'id':_0xbedee6['id'],'code':_0xbedee6[_0x549cfd(0xe3)],'name':_0xbedee6[_0x549cfd(0xdc)]},'action':_0x549cfd(0xe5)})};},async 'execute'(_0x419b2b){const _0xed1647=a206_0x57675c,_0x34ae63=await loadDatasetDetailForPage(_0x419b2b),_0x83c0d1=await loadDataListPageStatusForGenerate(_0x419b2b,_0x34ae63[_0xed1647(0xe3)]),_0x5c55d5=getUndeletedRelatedPages(_0x34ae63),_0x1518f7=assessDataListPageState(_0x34ae63['code'],_0x83c0d1,{'fallbackUndeletedPages':_0x5c55d5});return{'ok':!![],'data':{'datasetCode':_0x34ae63[_0xed1647(0xe3)],'precheckSource':_0x83c0d1?.[_0xed1647(0xee)]??_0xed1647(0xda),'status':_0x1518f7[_0xed1647(0xec)],'manualResolutionRequired':_0x1518f7[_0xed1647(0xf8)],'nextAction':_0x1518f7[_0xed1647(0xdd)],'dataListPageStatus':_0x83c0d1,'relatedPages':{'total':_0x34ae63[_0xed1647(0xe7)][_0xed1647(0xf5)],'undeletedCount':_0x5c55d5[_0xed1647(0xf5)]}}};}};
@@ -1 +1 @@
1
- const a207_0x1cba2c=a207_0xc9ec;function a207_0x3a94(){const _0x4e5ef3=['precheck','bool','allowGenerate','progressRate','1415986mSgcLw','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','/generate-standard-pages/start','Reusing\x20an\x20existing\x20generate\x20task','653205hhLmtw','POST','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','status','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','2870965lucTUF','compress','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','nextAction','currentStep','operationId','string','592tlwHXh','manualResolutionRequired','clientOperationId','dryRun','DATA_LIST','6436700GtkpHi','/smartapi/lovrabet/dataset/','819CATrOJ','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','source','PARTIAL_SUCCESS','code','SUCCESS','alias','name','dataset','generate-start','taskId','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','page-pattern','message','boolean','409854mGavxd','page','appCode','CRUD_PAGE_SET','1401297fZXvda','related-pages-fallback','write','dataListPageStatus','number','4sHGYXm','reused','14sLNLZn','apply'];a207_0x3a94=function(){return _0x4e5ef3;};return a207_0x3a94();}(function(_0x4d0b60,_0x4bd593){const _0xe90288=a207_0xc9ec,_0x117a16=_0x4d0b60();while(!![]){try{const _0x2b8d1a=-parseInt(_0xe90288(0xc1))/0x1+parseInt(_0xe90288(0xbd))/0x2+parseInt(_0xe90288(0xb0))/0x3*(parseInt(_0xe90288(0xb5))/0x4)+-parseInt(_0xe90288(0xc7))/0x5+-parseInt(_0xe90288(0xac))/0x6*(parseInt(_0xe90288(0xb7))/0x7)+parseInt(_0xe90288(0xce))/0x8*(parseInt(_0xe90288(0xd5))/0x9)+parseInt(_0xe90288(0xd3))/0xa;if(_0x2b8d1a===_0x4bd593)break;else _0x117a16['push'](_0x117a16['shift']());}catch(_0x252878){_0x117a16['push'](_0x117a16['shift']());}}}(a207_0x3a94,0x70aa8));function a207_0xc9ec(_0x194344,_0x156939){_0x194344=_0x194344-0x9e;const _0x3a9473=a207_0x3a94();let _0xc9ec44=_0x3a9473[_0x194344];return _0xc9ec44;}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':a207_0x1cba2c(0xad),'command':a207_0x1cba2c(0xa6),'description':a207_0x1cba2c(0xc6),'risk':a207_0x1cba2c(0xb2),'defaultOutputFormat':a207_0x1cba2c(0xc8),'rejectedFlags':[{'name':'page-type','message':a207_0x1cba2c(0xc3),'hint':a207_0x1cba2c(0xa8)},{'name':a207_0x1cba2c(0xa9),'message':a207_0x1cba2c(0xbe),'hint':a207_0x1cba2c(0xc5)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a207_0x1cba2c(0xa3),'type':a207_0x1cba2c(0xcd),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a207_0x1cba2c(0xb8),'type':a207_0x1cba2c(0xab),'description':a207_0x1cba2c(0x9e)}],async 'validate'(_0x1b83c2){validateDatasetSelector(_0x1b83c2);},async 'dryRun'(_0x45ed3e){const _0x3ece38=a207_0x1cba2c,_0x20eac0=await prepare(_0x45ed3e);return{'method':_0x3ece38(0xc2),'url':_0x3ece38(0xd4)+_0x20eac0[_0x3ece38(0xa5)][_0x3ece38(0xa1)]+_0x3ece38(0xbf),'body':{'appCode':_0x45ed3e[_0x3ece38(0xae)],'clientOperationId':_0x20eac0[_0x3ece38(0xd0)]},'description':serializeDryRunDescription({'dataset':{'id':_0x20eac0[_0x3ece38(0xa5)]['id'],'code':_0x20eac0[_0x3ece38(0xa5)][_0x3ece38(0xa1)],'name':_0x20eac0[_0x3ece38(0xa5)][_0x3ece38(0xa4)],'fieldCount':_0x20eac0[_0x3ece38(0xa5)]['fieldCount']},'precheckSource':_0x20eac0['dataListPageStatus']?.[_0x3ece38(0x9f)]??'related-pages-fallback','action':_0x3ece38(0xa6),'clientOperationId':_0x20eac0['clientOperationId'],'plannedStatus':_0x20eac0[_0x3ece38(0xb9)][_0x3ece38(0xc4)],'reason':_0x20eac0['precheck'][_0x3ece38(0xaa)]})};},async 'execute'(_0x43a678){const _0x3a447c=a207_0x1cba2c;if(!_0x43a678[_0x3a447c(0xba)]('apply')){const _0x5c80ce=await pageGenerateStart[_0x3a447c(0xd1)](_0x43a678);return{'ok':!![],'message':_0x3a447c(0xc9),'data':_0x5c80ce};}const _0x12c15f=await prepare(_0x43a678);if(!_0x12c15f[_0x3a447c(0xb9)][_0x3a447c(0xbb)])return{'ok':![],'message':_0x12c15f[_0x3a447c(0xb9)][_0x3a447c(0xaa)],'data':{'datasetCode':_0x12c15f[_0x3a447c(0xa5)][_0x3a447c(0xa1)],'pageType':_0x3a447c(0xd2),'pagePattern':_0x3a447c(0xaf),'clientOperationId':_0x12c15f[_0x3a447c(0xd0)],'precheckSource':_0x12c15f[_0x3a447c(0xb3)]?.[_0x3a447c(0x9f)]??_0x3a447c(0xb1),'status':_0x12c15f[_0x3a447c(0xb9)][_0x3a447c(0xc4)],'manualResolutionRequired':_0x12c15f[_0x3a447c(0xb9)][_0x3a447c(0xcf)],'nextAction':_0x12c15f[_0x3a447c(0xb9)][_0x3a447c(0xca)],'query':{'command':buildDataListPageStatusQueryCommand(_0x12c15f['dataset'][_0x3a447c(0xa1)],_0x43a678[_0x3a447c(0xae)])},'dataListPageStatus':_0x12c15f[_0x3a447c(0xb3)]}};const _0x1394fb=await startGenerateDataListPages(_0x43a678['appCode'],_0x12c15f[_0x3a447c(0xa5)][_0x3a447c(0xa1)],{'clientOperationId':_0x12c15f[_0x3a447c(0xd0)]}),_0x2635ae=_0x1394fb[_0x3a447c(0xc4)]===_0x3a447c(0xa2)||_0x1394fb[_0x3a447c(0xc4)]===_0x3a447c(0xa0)?await loadDataListPageStatusForGenerate(_0x43a678,_0x12c15f[_0x3a447c(0xa5)]['code']):null,_0x4093b3=assessGenerateOperationState(_0x12c15f[_0x3a447c(0xa5)]['code'],_0x1394fb[_0x3a447c(0xc4)],_0x2635ae);return{'ok':!![],'message':_0x1394fb['reused']?_0x3a447c(0xc0):'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x12c15f['dataset'][_0x3a447c(0xa1)],'appCode':_0x43a678[_0x3a447c(0xae)],'pageType':_0x3a447c(0xd2),'pagePattern':_0x3a447c(0xaf),'taskId':_0x1394fb[_0x3a447c(0xa7)]??null,'operationId':_0x1394fb[_0x3a447c(0xcc)]??null,'clientOperationId':_0x12c15f[_0x3a447c(0xd0)],'jobStatus':_0x1394fb[_0x3a447c(0xc4)]??null,'progressRate':typeof _0x1394fb[_0x3a447c(0xbc)]===_0x3a447c(0xb4)?_0x1394fb[_0x3a447c(0xbc)]:null,'currentStep':_0x1394fb[_0x3a447c(0xcb)]??null,'reused':_0x1394fb[_0x3a447c(0xb6)]===!![],'status':_0x4093b3[_0x3a447c(0xc4)],'manualResolutionRequired':_0x4093b3[_0x3a447c(0xcf)],'nextAction':_0x4093b3[_0x3a447c(0xca)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x12c15f[_0x3a447c(0xa5)][_0x3a447c(0xa1)],{'appCode':_0x43a678[_0x3a447c(0xae)],'taskId':_0x1394fb[_0x3a447c(0xa7)],'operationId':_0x1394fb['operationId'],'clientOperationId':_0x12c15f[_0x3a447c(0xd0)]})},'dataListPageStatus':_0x2635ae}};}};async function prepare(_0x5cce85){const _0x115e82=a207_0x1cba2c,_0xcb6e79=await loadDatasetDetailForPage(_0x5cce85),_0xe7485e=await loadDataListPageStatusForGenerate(_0x5cce85,_0xcb6e79[_0x115e82(0xa1)]),_0x2310b8=getUndeletedRelatedPages(_0xcb6e79);return{'dataset':_0xcb6e79,'dataListPageStatus':_0xe7485e,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0xcb6e79[_0x115e82(0xa1)],_0xe7485e,{'fallbackUndeletedPages':_0x2310b8})};}
1
+ const a207_0x4b579=a207_0x3d24;(function(_0x2f19a5,_0x33b2ea){const _0x115c6f=a207_0x3d24,_0xeef1b=_0x2f19a5();while(!![]){try{const _0x2a26d4=-parseInt(_0x115c6f(0xde))/0x1+-parseInt(_0x115c6f(0xb9))/0x2*(parseInt(_0x115c6f(0xc0))/0x3)+-parseInt(_0x115c6f(0xd0))/0x4+parseInt(_0x115c6f(0xcf))/0x5+-parseInt(_0x115c6f(0xc8))/0x6*(-parseInt(_0x115c6f(0xe1))/0x7)+-parseInt(_0x115c6f(0xda))/0x8+-parseInt(_0x115c6f(0xd2))/0x9;if(_0x2a26d4===_0x33b2ea)break;else _0xeef1b['push'](_0xeef1b['shift']());}catch(_0x10a08a){_0xeef1b['push'](_0xeef1b['shift']());}}}(a207_0x3890,0x2b05f));function a207_0x3d24(_0x5a36ed,_0x277448){_0x5a36ed=_0x5a36ed-0xb1;const _0x389027=a207_0x3890();let _0x3d240f=_0x389027[_0x5a36ed];return _0x3d240f;}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 a207_0x3890(){const _0x35a3e6=['CRUD_PAGE_SET','DATA_LIST','2BVFirL','generate-start','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','taskId','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','dryRun','allowGenerate','1004649bgJbjX','Reusing\x20an\x20existing\x20generate\x20task','PARTIAL_SUCCESS','page-pattern','code','write','/generate-standard-pages/start','page-type','30BfIhrx','manualResolutionRequired','/smartapi/lovrabet/dataset/','name','boolean','alias','source','1690720NxiFqh','186648rAtAYC','related-pages-fallback','329742JPJrjU','status','fieldCount','message','nextAction','number','dataset','reused','95952mWxrZi','clientOperationId','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','apply','72549ydPmfo','POST','precheck','477127rMqFOM','appCode','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','progressRate','page','dataListPageStatus','compress','currentStep','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.'];a207_0x3890=function(){return _0x35a3e6;};return a207_0x3890();}import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a207_0x4b579(0xb2),'command':a207_0x4b579(0xba),'description':a207_0x4b579(0xdc),'risk':a207_0x4b579(0xc5),'defaultOutputFormat':a207_0x4b579(0xb4),'rejectedFlags':[{'name':a207_0x4b579(0xc7),'message':a207_0x4b579(0xe3),'hint':a207_0x4b579(0xbd)},{'name':a207_0x4b579(0xc3),'message':a207_0x4b579(0xb6),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a207_0x4b579(0xcd),'type':'string','description':a207_0x4b579(0xbb)},{'name':a207_0x4b579(0xdd),'type':a207_0x4b579(0xcc),'description':'Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.'}],async 'validate'(_0x247221){validateDatasetSelector(_0x247221);},async 'dryRun'(_0x1a1a3f){const _0x12830b=a207_0x4b579,_0x3f883a=await prepare(_0x1a1a3f);return{'method':_0x12830b(0xdf),'url':_0x12830b(0xca)+_0x3f883a[_0x12830b(0xd8)]['code']+_0x12830b(0xc6),'body':{'appCode':_0x1a1a3f[_0x12830b(0xe2)],'clientOperationId':_0x3f883a['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x3f883a[_0x12830b(0xd8)]['id'],'code':_0x3f883a['dataset'][_0x12830b(0xc4)],'name':_0x3f883a['dataset'][_0x12830b(0xcb)],'fieldCount':_0x3f883a[_0x12830b(0xd8)][_0x12830b(0xd4)]},'precheckSource':_0x3f883a['dataListPageStatus']?.[_0x12830b(0xce)]??_0x12830b(0xd1),'action':'generate-start','clientOperationId':_0x3f883a[_0x12830b(0xdb)],'plannedStatus':_0x3f883a[_0x12830b(0xe0)][_0x12830b(0xd3)],'reason':_0x3f883a[_0x12830b(0xe0)]['message']})};},async 'execute'(_0x30ad9c){const _0x42b318=a207_0x4b579;if(!_0x30ad9c['bool'](_0x42b318(0xdd))){const _0xb9c270=await pageGenerateStart[_0x42b318(0xbe)](_0x30ad9c);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0xb9c270};}const _0x3982bf=await prepare(_0x30ad9c);if(!_0x3982bf[_0x42b318(0xe0)][_0x42b318(0xbf)])return{'ok':![],'message':_0x3982bf[_0x42b318(0xe0)][_0x42b318(0xd5)],'data':{'datasetCode':_0x3982bf[_0x42b318(0xd8)][_0x42b318(0xc4)],'pageType':_0x42b318(0xb8),'pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x3982bf[_0x42b318(0xdb)],'precheckSource':_0x3982bf[_0x42b318(0xb3)]?.[_0x42b318(0xce)]??_0x42b318(0xd1),'status':_0x3982bf[_0x42b318(0xe0)][_0x42b318(0xd3)],'manualResolutionRequired':_0x3982bf[_0x42b318(0xe0)][_0x42b318(0xc9)],'nextAction':_0x3982bf['precheck']['nextAction'],'query':{'command':buildDataListPageStatusQueryCommand(_0x3982bf[_0x42b318(0xd8)][_0x42b318(0xc4)],_0x30ad9c[_0x42b318(0xe2)])},'dataListPageStatus':_0x3982bf[_0x42b318(0xb3)]}};const _0x2ce8f6=await startGenerateDataListPages(_0x30ad9c[_0x42b318(0xe2)],_0x3982bf[_0x42b318(0xd8)][_0x42b318(0xc4)],{'clientOperationId':_0x3982bf['clientOperationId']}),_0xa97af0=_0x2ce8f6[_0x42b318(0xd3)]==='SUCCESS'||_0x2ce8f6[_0x42b318(0xd3)]===_0x42b318(0xc2)?await loadDataListPageStatusForGenerate(_0x30ad9c,_0x3982bf[_0x42b318(0xd8)]['code']):null,_0x514162=assessGenerateOperationState(_0x3982bf[_0x42b318(0xd8)]['code'],_0x2ce8f6[_0x42b318(0xd3)],_0xa97af0);return{'ok':!![],'message':_0x2ce8f6[_0x42b318(0xd9)]?_0x42b318(0xc1):'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x3982bf['dataset'][_0x42b318(0xc4)],'appCode':_0x30ad9c[_0x42b318(0xe2)],'pageType':'DATA_LIST','pagePattern':_0x42b318(0xb7),'taskId':_0x2ce8f6[_0x42b318(0xbc)]??null,'operationId':_0x2ce8f6['operationId']??null,'clientOperationId':_0x3982bf['clientOperationId'],'jobStatus':_0x2ce8f6[_0x42b318(0xd3)]??null,'progressRate':typeof _0x2ce8f6[_0x42b318(0xb1)]===_0x42b318(0xd7)?_0x2ce8f6[_0x42b318(0xb1)]:null,'currentStep':_0x2ce8f6[_0x42b318(0xb5)]??null,'reused':_0x2ce8f6[_0x42b318(0xd9)]===!![],'status':_0x514162[_0x42b318(0xd3)],'manualResolutionRequired':_0x514162[_0x42b318(0xc9)],'nextAction':_0x514162[_0x42b318(0xd6)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x3982bf['dataset'][_0x42b318(0xc4)],{'appCode':_0x30ad9c[_0x42b318(0xe2)],'taskId':_0x2ce8f6[_0x42b318(0xbc)],'operationId':_0x2ce8f6['operationId'],'clientOperationId':_0x3982bf[_0x42b318(0xdb)]})},'dataListPageStatus':_0xa97af0}};}};async function prepare(_0x21ebaf){const _0x1c9339=a207_0x4b579,_0x51aef9=await loadDatasetDetailForPage(_0x21ebaf),_0x5ebfcb=await loadDataListPageStatusForGenerate(_0x21ebaf,_0x51aef9[_0x1c9339(0xc4)]),_0x20b1ed=getUndeletedRelatedPages(_0x51aef9);return{'dataset':_0x51aef9,'dataListPageStatus':_0x5ebfcb,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x51aef9['code'],_0x5ebfcb,{'fallbackUndeletedPages':_0x20b1ed})};}