@lovrabet/rabetbase-cli 2.5.3-beta.3 → 2.5.3

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 (361) 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/index.js +1 -1
  26. package/lib/commands/app/list.js +1 -1
  27. package/lib/commands/app/members-list.js +1 -1
  28. package/lib/commands/app/remote-directory.js +1 -1
  29. package/lib/commands/app/shared.js +1 -1
  30. package/lib/commands/app-config/delete.js +1 -1
  31. package/lib/commands/app-config/get.js +1 -1
  32. package/lib/commands/app-config/index.js +1 -1
  33. package/lib/commands/app-config/list.js +1 -1
  34. package/lib/commands/app-config/set.js +1 -1
  35. package/lib/commands/app-config/shared.js +1 -1
  36. package/lib/commands/auth/index.js +1 -1
  37. package/lib/commands/bff/create.js +1 -1
  38. package/lib/commands/bff/delete.js +1 -1
  39. package/lib/commands/bff/detail.js +1 -1
  40. package/lib/commands/bff/index.js +1 -1
  41. package/lib/commands/bff/list.js +1 -1
  42. package/lib/commands/bff/logs.js +1 -1
  43. package/lib/commands/bff/pull.js +1 -1
  44. package/lib/commands/bff/push.js +1 -1
  45. package/lib/commands/bff/status.js +1 -1
  46. package/lib/commands/cli-skill/index.js +1 -1
  47. package/lib/commands/cli-update.js +1 -1
  48. package/lib/commands/codegen/index.js +1 -1
  49. package/lib/commands/codegen/sdk.js +1 -1
  50. package/lib/commands/codegen/sql.js +1 -1
  51. package/lib/commands/common/app-registry.js +1 -1
  52. package/lib/commands/common/app-selector.js +1 -1
  53. package/lib/commands/common/async-task.js +1 -1
  54. package/lib/commands/common/dry-run.js +1 -1
  55. package/lib/commands/common/flags.js +1 -1
  56. package/lib/commands/common/local-file.js +1 -1
  57. package/lib/commands/common/validate.js +1 -1
  58. package/lib/commands/config/delete.js +1 -1
  59. package/lib/commands/config/get.js +1 -1
  60. package/lib/commands/config/index.js +1 -1
  61. package/lib/commands/config/init.js +1 -1
  62. package/lib/commands/config/list.js +1 -1
  63. package/lib/commands/config/set.js +1 -1
  64. package/lib/commands/config/shared.js +1 -1
  65. package/lib/commands/dataset/batch-design.js +1 -1
  66. package/lib/commands/dataset/business-group-update.js +1 -1
  67. package/lib/commands/dataset/business-groups.js +1 -1
  68. package/lib/commands/dataset/capability.js +1 -1
  69. package/lib/commands/dataset/cross-relation-create.js +1 -1
  70. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  71. package/lib/commands/dataset/cross-relation-list.js +1 -1
  72. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  73. package/lib/commands/dataset/cross-relation-update.js +1 -1
  74. package/lib/commands/dataset/delete.js +1 -1
  75. package/lib/commands/dataset/detail.js +1 -1
  76. package/lib/commands/dataset/extend-update.js +1 -1
  77. package/lib/commands/dataset/field-restore.js +1 -1
  78. package/lib/commands/dataset/field-update.js +1 -1
  79. package/lib/commands/dataset/generate.js +1 -1
  80. package/lib/commands/dataset/index.js +1 -1
  81. package/lib/commands/dataset/list.js +1 -1
  82. package/lib/commands/dataset/operations.js +1 -1
  83. package/lib/commands/dataset/relation-audit.js +1 -1
  84. package/lib/commands/dataset/relation-create.js +1 -1
  85. package/lib/commands/dataset/relation-delete.js +1 -1
  86. package/lib/commands/dataset/relation-shared.js +1 -1
  87. package/lib/commands/dataset/relation-update.js +1 -1
  88. package/lib/commands/dataset/relations.js +1 -1
  89. package/lib/commands/dataset/rename.js +1 -1
  90. package/lib/commands/dataset/restore.js +1 -1
  91. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  92. package/lib/commands/db/analysis-batching.js +1 -1
  93. package/lib/commands/db/analyze-batch-plan.js +1 -1
  94. package/lib/commands/db/analyze-cancel.js +1 -1
  95. package/lib/commands/db/analyze-start.js +1 -1
  96. package/lib/commands/db/analyze-status.js +1 -1
  97. package/lib/commands/db/create.js +1 -1
  98. package/lib/commands/db/delete.js +1 -1
  99. package/lib/commands/db/detail.js +1 -1
  100. package/lib/commands/db/diff-refresh-start.js +1 -1
  101. package/lib/commands/db/diff-refresh-status.js +1 -1
  102. package/lib/commands/db/diff.js +1 -1
  103. package/lib/commands/db/index.js +1 -1
  104. package/lib/commands/db/list.js +1 -1
  105. package/lib/commands/db/shared.js +1 -1
  106. package/lib/commands/db/table-diff-shared.js +1 -1
  107. package/lib/commands/db/tables.js +1 -1
  108. package/lib/commands/db/test.js +1 -1
  109. package/lib/commands/db/update.js +1 -1
  110. package/lib/commands/deployment/index.js +1 -1
  111. package/lib/commands/deployment/sync-all.js +1 -1
  112. package/lib/commands/deployment/sync-jobs.js +1 -1
  113. package/lib/commands/deployment/sync-status.js +1 -1
  114. package/lib/commands/doctor.js +1 -1
  115. package/lib/commands/file/index.js +1 -1
  116. package/lib/commands/flow/create.js +1 -1
  117. package/lib/commands/flow/detail.js +1 -1
  118. package/lib/commands/flow/index.js +1 -1
  119. package/lib/commands/flow/list.js +1 -1
  120. package/lib/commands/flow/publish.js +1 -1
  121. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  122. package/lib/commands/flow/runtime-role-list.js +1 -1
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  124. package/lib/commands/flow/runtime-user-search.js +1 -1
  125. package/lib/commands/flow/shared.js +1 -1
  126. package/lib/commands/flow/update.js +1 -1
  127. package/lib/commands/flow/validate.js +1 -1
  128. package/lib/commands/instant-api-policy/current.js +1 -1
  129. package/lib/commands/instant-api-policy/index.js +1 -1
  130. package/lib/commands/instant-api-policy/init.js +1 -1
  131. package/lib/commands/instant-api-policy/publish.js +1 -1
  132. package/lib/commands/instant-api-policy/pull.js +1 -1
  133. package/lib/commands/instant-api-policy/revision.js +1 -1
  134. package/lib/commands/instant-api-policy/revisions.js +1 -1
  135. package/lib/commands/instant-api-policy/rollback.js +1 -1
  136. package/lib/commands/instant-api-policy/shared.js +1 -1
  137. package/lib/commands/instant-api-policy/validate.js +1 -1
  138. package/lib/commands/issue/index.js +1 -1
  139. package/lib/commands/issue/nudge.js +1 -1
  140. package/lib/commands/issue/report.js +1 -1
  141. package/lib/commands/issue/shared.js +1 -1
  142. package/lib/commands/kb/create.js +1 -1
  143. package/lib/commands/kb/delete.js +1 -1
  144. package/lib/commands/kb/detail.js +1 -1
  145. package/lib/commands/kb/index.js +1 -1
  146. package/lib/commands/kb/list.js +1 -1
  147. package/lib/commands/kb/search.js +1 -1
  148. package/lib/commands/kb/shared.js +1 -1
  149. package/lib/commands/kb/update.js +1 -1
  150. package/lib/commands/logs/index.js +1 -1
  151. package/lib/commands/menu/asset-update.js +1 -1
  152. package/lib/commands/menu/delete.js +1 -1
  153. package/lib/commands/menu/external-link-create.js +1 -1
  154. package/lib/commands/menu/external-link-update.js +1 -1
  155. package/lib/commands/menu/group-create.js +1 -1
  156. package/lib/commands/menu/group-update.js +1 -1
  157. package/lib/commands/menu/index.js +1 -1
  158. package/lib/commands/menu/list.js +1 -1
  159. package/lib/commands/menu/move.js +1 -1
  160. package/lib/commands/menu/regroup-start.js +1 -1
  161. package/lib/commands/menu/rename.js +1 -1
  162. package/lib/commands/menu/shared/compare-table.js +1 -1
  163. package/lib/commands/menu/shared/delete-plan.js +1 -1
  164. package/lib/commands/menu/shared/facts.js +1 -1
  165. package/lib/commands/menu/shared/index.js +1 -1
  166. package/lib/commands/menu/shared/inquirer.js +1 -1
  167. package/lib/commands/menu/shared/local-pages.js +1 -1
  168. package/lib/commands/menu/shared/logic.js +1 -1
  169. package/lib/commands/menu/shared/mutations.js +1 -1
  170. package/lib/commands/menu/shared/service.js +1 -1
  171. package/lib/commands/menu/shared/sync-core.js +1 -1
  172. package/lib/commands/menu/shared/update-core.js +1 -1
  173. package/lib/commands/menu/shared/valid-url.js +1 -1
  174. package/lib/commands/menu/sync.js +1 -1
  175. package/lib/commands/menu/visibility-update.js +1 -1
  176. package/lib/commands/notification/config-create.js +1 -1
  177. package/lib/commands/notification/config-delete.js +1 -1
  178. package/lib/commands/notification/config-list.js +1 -1
  179. package/lib/commands/notification/config-update.js +1 -1
  180. package/lib/commands/notification/index.js +1 -1
  181. package/lib/commands/notification/shared.js +1 -1
  182. package/lib/commands/ocr/index.js +1 -1
  183. package/lib/commands/page/create.js +1 -1
  184. package/lib/commands/page/custom/detail.js +1 -1
  185. package/lib/commands/page/custom/list.js +1 -1
  186. package/lib/commands/page/custom/publish.js +1 -1
  187. package/lib/commands/page/custom/shared.js +1 -1
  188. package/lib/commands/page/custom/syntax.js +1 -1
  189. package/lib/commands/page/custom/update.js +1 -1
  190. package/lib/commands/page/data-list-status.js +1 -1
  191. package/lib/commands/page/generate-start.js +1 -1
  192. package/lib/commands/page/generate-status.js +1 -1
  193. package/lib/commands/page/index.js +1 -1
  194. package/lib/commands/page/pull.js +1 -1
  195. package/lib/commands/page/push.js +1 -1
  196. package/lib/commands/page/relation-audit.js +1 -1
  197. package/lib/commands/page/restore.js +1 -1
  198. package/lib/commands/page/shared.js +1 -1
  199. package/lib/commands/page/sync.js +1 -1
  200. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  201. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  202. package/lib/commands/project/create/format-elapsed.js +1 -1
  203. package/lib/commands/project/create/main.js +1 -1
  204. package/lib/commands/project/create/materialize-project-template.js +1 -1
  205. package/lib/commands/project/create/project-name.js +1 -1
  206. package/lib/commands/project/create/project-template-archive.js +1 -1
  207. package/lib/commands/project/create/project-template-path.js +1 -1
  208. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  209. package/lib/commands/project/create/use-format-code.js +1 -1
  210. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  211. package/lib/commands/project/domain-routing-sync.js +1 -1
  212. package/lib/commands/project/index.js +1 -1
  213. package/lib/commands/project/upgrade.js +1 -1
  214. package/lib/commands/registry.js +1 -1
  215. package/lib/commands/role/delete.js +1 -1
  216. package/lib/commands/role/detail.js +1 -1
  217. package/lib/commands/role/index.js +1 -1
  218. package/lib/commands/role/list.js +1 -1
  219. package/lib/commands/role/shared.js +1 -1
  220. package/lib/commands/role/update.js +1 -1
  221. package/lib/commands/role/user-add.js +1 -1
  222. package/lib/commands/role/user-remove.js +1 -1
  223. package/lib/commands/role/user-resolve.js +1 -1
  224. package/lib/commands/rule/get.js +1 -1
  225. package/lib/commands/rule/index.js +1 -1
  226. package/lib/commands/rule/list.js +1 -1
  227. package/lib/commands/rule/set.js +1 -1
  228. package/lib/commands/rule/shared.js +1 -1
  229. package/lib/commands/run/index.js +1 -1
  230. package/lib/commands/schema.js +1 -1
  231. package/lib/commands/sql/create.js +1 -1
  232. package/lib/commands/sql/delete.js +1 -1
  233. package/lib/commands/sql/detail.js +1 -1
  234. package/lib/commands/sql/exec.js +1 -1
  235. package/lib/commands/sql/index.js +1 -1
  236. package/lib/commands/sql/list.js +1 -1
  237. package/lib/commands/sql/pull.js +1 -1
  238. package/lib/commands/sql/push.js +1 -1
  239. package/lib/commands/sql/shared.js +1 -1
  240. package/lib/commands/sql/status.js +1 -1
  241. package/lib/commands/sql/validate.js +1 -1
  242. package/lib/commands/task/index.js +1 -1
  243. package/lib/commands/task/status.js +1 -1
  244. package/lib/commands/tenant/index.js +1 -1
  245. package/lib/commands/tenant/members-list.js +1 -1
  246. package/lib/commands/tenant/shared.js +1 -1
  247. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  248. package/lib/commands/user-account/index.js +1 -1
  249. package/lib/commands/workspace/add.js +1 -1
  250. package/lib/commands/workspace/index.js +1 -1
  251. package/lib/commands/workspace/remove.js +1 -1
  252. package/lib/config/domain-config.js +1 -1
  253. package/lib/config/project-domain-routing.js +1 -1
  254. package/lib/config/region-config.js +1 -1
  255. package/lib/config/schema.js +1 -1
  256. package/lib/constant/cdn.d.ts +5 -3
  257. package/lib/constant/cdn.js +1 -1
  258. package/lib/constant/cli.js +1 -1
  259. package/lib/constant/defaults.js +1 -1
  260. package/lib/constant/domain.js +1 -1
  261. package/lib/constant/env.js +1 -1
  262. package/lib/constant/output.js +1 -1
  263. package/lib/constant/paths.js +1 -1
  264. package/lib/constant/region.js +1 -1
  265. package/lib/constant/risk.js +1 -1
  266. package/lib/constant/routing-profile.js +1 -1
  267. package/lib/context/app-resolver.js +1 -1
  268. package/lib/context/auth-resolver.js +1 -1
  269. package/lib/context/config-loader.js +1 -1
  270. package/lib/context.js +1 -1
  271. package/lib/core/alias-resolver.js +1 -1
  272. package/lib/core/api-client.js +1 -1
  273. package/lib/core/bff/config.js +1 -1
  274. package/lib/core/bff/file-system.js +1 -1
  275. package/lib/core/bff/hash.js +1 -1
  276. package/lib/core/bff/hook-directory.js +1 -1
  277. package/lib/core/bff/lock.js +1 -1
  278. package/lib/core/bff/utils.js +1 -1
  279. package/lib/core/cross-db-relation.js +1 -1
  280. package/lib/core/db-resolver.js +1 -1
  281. package/lib/core/flow-config.js +1 -1
  282. package/lib/core/instant-api-policy/config.js +1 -1
  283. package/lib/core/kb-search-client.js +1 -1
  284. package/lib/core/page/file-system.js +1 -1
  285. package/lib/core/page/hash.js +1 -1
  286. package/lib/core/page/lock.js +1 -1
  287. package/lib/core/page/lr-smart-jsx.js +1 -1
  288. package/lib/core/sql-index-auditor.js +1 -1
  289. package/lib/core/sql-sync/config.js +1 -1
  290. package/lib/core/sql-sync/file-system.js +1 -1
  291. package/lib/core/sql-sync/hash.js +1 -1
  292. package/lib/core/sql-sync/lock.js +1 -1
  293. package/lib/core/sql-sync/utils.js +1 -1
  294. package/lib/core/sql-validator.js +1 -1
  295. package/lib/errors.js +1 -1
  296. package/lib/framework/build-all-flags.js +1 -1
  297. package/lib/framework/error-output.js +1 -1
  298. package/lib/framework/explicit-yes.js +1 -1
  299. package/lib/framework/flags.js +1 -1
  300. package/lib/framework/help.js +1 -1
  301. package/lib/framework/index.js +1 -1
  302. package/lib/framework/output.js +1 -1
  303. package/lib/framework/response.js +1 -1
  304. package/lib/framework/runner-alias.js +1 -1
  305. package/lib/framework/runner.js +1 -1
  306. package/lib/framework/schema-export.js +1 -1
  307. package/lib/framework/supported-flags.js +1 -1
  308. package/lib/framework/types.js +1 -1
  309. package/lib/generated/build-info.d.ts +4 -4
  310. package/lib/generated/build-info.js +1 -1
  311. package/lib/generated/official-routing.js +1 -1
  312. package/lib/generated/routing-contract.js +1 -1
  313. package/lib/help.js +1 -1
  314. package/lib/postinstall.js +1 -1
  315. package/lib/runtime/confirmation.js +1 -1
  316. package/lib/runtime/event.js +1 -1
  317. package/lib/runtime/index.js +1 -1
  318. package/lib/runtime/queue.js +1 -1
  319. package/lib/runtime/resolve.js +1 -1
  320. package/lib/skills/builtin-skill.js +1 -1
  321. package/lib/skills/main.js +1 -1
  322. package/lib/skills/npx-skills-add.js +1 -1
  323. package/lib/skills/skill-presence.js +1 -1
  324. package/lib/telemetry/cli-command-trace.js +1 -1
  325. package/lib/telemetry/cli-help-trace.js +1 -1
  326. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  327. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  328. package/lib/telemetry/send-cli-trace-log.js +1 -1
  329. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  330. package/lib/utils/ai_config.js +1 -1
  331. package/lib/utils/apply-jq-filter.js +1 -1
  332. package/lib/utils/cdn-config.js +1 -1
  333. package/lib/utils/check-sdk-version.js +1 -1
  334. package/lib/utils/cli-version-check.js +1 -1
  335. package/lib/utils/cli-version-policy.d.ts +7 -0
  336. package/lib/utils/cli-version-policy.js +1 -1
  337. package/lib/utils/config.js +1 -1
  338. package/lib/utils/entity-with-id.js +1 -1
  339. package/lib/utils/file-utils.js +1 -1
  340. package/lib/utils/guides-cdn.js +1 -1
  341. package/lib/utils/http-client.js +1 -1
  342. package/lib/utils/is-non-interactive.js +1 -1
  343. package/lib/utils/logger.js +1 -1
  344. package/lib/utils/params.js +1 -1
  345. package/lib/utils/platform.js +1 -1
  346. package/lib/utils/sleep.js +1 -1
  347. package/lib/utils/template-replacer.js +1 -1
  348. package/lib/utils/update-notice.js +1 -1
  349. package/lib/utils/version.js +1 -1
  350. package/lib/utils/with-active-cookie.js +1 -1
  351. package/lib/utils/write-cli-side-channel.js +1 -1
  352. package/package.json +3 -1
  353. package/skills/rabetbase/SKILL.md +7 -5
  354. package/skills/rabetbase/guides/backend-function.md +5 -1
  355. package/skills/rabetbase/guides/bff-creation-workflow.md +3 -1
  356. package/skills/rabetbase/guides/cross-database-bff.md +70 -0
  357. package/skills/rabetbase/guides/data-api-guidelines.md +35 -33
  358. package/skills/rabetbase/guides/sql-creation-workflow.md +2 -0
  359. package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +5 -1
  360. package/skills/rabetbase.manifest.json +4 -3
  361. package/templates/README.md +41 -13
@@ -1 +1 @@
1
- const a181_0x4164a7=a181_0x1c7d;(function(_0x492e05,_0x4b0aaa){const _0x4a9877=a181_0x1c7d,_0x4b05a5=_0x492e05();while(!![]){try{const _0x1ae5a9=parseInt(_0x4a9877(0x23b))/0x1+parseInt(_0x4a9877(0x23d))/0x2+-parseInt(_0x4a9877(0x247))/0x3+-parseInt(_0x4a9877(0x230))/0x4+-parseInt(_0x4a9877(0x203))/0x5*(parseInt(_0x4a9877(0x23a))/0x6)+-parseInt(_0x4a9877(0x25a))/0x7*(parseInt(_0x4a9877(0x1ea))/0x8)+parseInt(_0x4a9877(0x1e6))/0x9;if(_0x1ae5a9===_0x4b0aaa)break;else _0x4b05a5['push'](_0x4b05a5['shift']());}catch(_0x2f90e2){_0x4b05a5['push'](_0x4b05a5['shift']());}}}(a181_0x1e41,0xd6c84));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a181_0x4164a7(0x20f),a181_0x4164a7(0x227),a181_0x4164a7(0x252),'WECOM',a181_0x4164a7(0x253)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x4164a7(0x1ef),a181_0x4164a7(0x1e1),a181_0x4164a7(0x241),a181_0x4164a7(0x1f7),a181_0x4164a7(0x1de),a181_0x4164a7(0x1dc),a181_0x4164a7(0x22d)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a181_0x4164a7(0x234),a181_0x4164a7(0x201)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x4164a7(0x22e),a181_0x4164a7(0x20c),a181_0x4164a7(0x212),a181_0x4164a7(0x255),a181_0x4164a7(0x1dd),a181_0x4164a7(0x231),'fromName','to','cc']);function a181_0x1c7d(_0x5a6155,_0x26cebe){_0x5a6155=_0x5a6155-0x1d9;const _0x1e41d4=a181_0x1e41();let _0x1c7db5=_0x1e41d4[_0x5a6155];return _0x1c7db5;}export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0x4164a7(0x24e),'type':a181_0x4164a7(0x25c),'required':![],'description':a181_0x4164a7(0x24f)},{'name':a181_0x4164a7(0x21c),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0x4164a7(0x20a),'type':'string','required':![],'description':a181_0x4164a7(0x208)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0x4164a7(0x24b),'required':!![],'description':a181_0x4164a7(0x228)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x901d27,_0x1609e4,_0x1773f4){return new CliError(_0x901d27,0x1,_0x1609e4,_0x1773f4);}export function readNotificationId(_0x3e43fe){const _0x2153b5=a181_0x4164a7,_0x33b6ab=_0x3e43fe[_0x2153b5(0x222)]('id');if(!Number[_0x2153b5(0x238)](_0x33b6ab)||_0x33b6ab<=0x0)throw notificationError('notification_config_id_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x33b6ab;}export function requireNotificationExplicitYes(_0x2916d6){const _0x465092=a181_0x4164a7;if(_0x2916d6[_0x465092(0x244)](_0x465092(0x237))||_0x2916d6[_0x465092(0x244)](_0x465092(0x205)))return;throw notificationError(_0x465092(0x20b),_0x465092(0x1f4),_0x465092(0x20e));}export function readNotificationChannelType(_0x1e0dc6,_0x5b4773=a181_0x4164a7(0x21a),_0x675641=a181_0x4164a7(0x20f)){const _0x139391=a181_0x4164a7,_0x98eb3b=_0x1e0dc6[_0x139391(0x242)](_0x5b4773)['trim']()||_0x675641;if(!NOTIFICATION_CHANNEL_TYPES[_0x139391(0x1fc)](_0x98eb3b))throw CliErrors['validation'](_0x139391(0x251)+_0x5b4773+':\x20'+_0x98eb3b,_0x139391(0x23e)+NOTIFICATION_CHANNEL_TYPES[_0x139391(0x258)](',\x20')+'.');return _0x98eb3b;}export function assertSingleNotificationSource(_0x219a7d){const _0x405a7c=a181_0x4164a7,_0x36209b=[],_0x44d057=_0x219a7d[_0x405a7c(0x242)](_0x405a7c(0x24e))[_0x405a7c(0x1e8)]();if(_0x44d057)_0x36209b['push']({'kind':'file','path':_0x44d057});if(_0x219a7d[_0x405a7c(0x244)](_0x405a7c(0x21c)))_0x36209b['push']({'kind':_0x405a7c(0x21c)});const _0x10b4c1=_0x219a7d['str'](_0x405a7c(0x20a))['trim']();if(_0x10b4c1)_0x36209b[_0x405a7c(0x223)]({'kind':'env','name':_0x10b4c1});if(_0x36209b[_0x405a7c(0x22a)]===0x0)throw CliErrors[_0x405a7c(0x22c)](_0x405a7c(0x1ee),_0x405a7c(0x233));if(_0x36209b['length']>0x1)throw CliErrors['validation'](_0x405a7c(0x1fe),_0x405a7c(0x233));return _0x36209b[0x0];}export async function readNotificationDocument(_0x445e77,_0x4e2036){const _0x1316e2=a181_0x4164a7,_0x74dd2b=assertSingleNotificationSource(_0x445e77),_0x32ff67=_0x74dd2b[_0x1316e2(0x213)]==='file'?_0x1316e2(0x21d)+_0x74dd2b[_0x1316e2(0x235)]:_0x74dd2b[_0x1316e2(0x213)]===_0x1316e2(0x236)?_0x1316e2(0x257)+_0x74dd2b[_0x1316e2(0x22b)]:_0x1316e2(0x21c);let _0x5c010f;try{if(_0x74dd2b[_0x1316e2(0x213)]==='file')_0x5c010f=await readFile(_0x74dd2b[_0x1316e2(0x235)],'utf8');else{if(_0x74dd2b[_0x1316e2(0x213)]===_0x1316e2(0x236)){if(!(_0x74dd2b[_0x1316e2(0x22b)]in process.env))throw notificationError(_0x1316e2(0x1f6),_0x1316e2(0x250)+_0x74dd2b[_0x1316e2(0x22b)]);_0x5c010f=process.env[_0x74dd2b.name]??'';}else _0x5c010f=await readStdin();}}catch(_0x2da873){if(_0x2da873 instanceof CliError)throw _0x2da873;throw notificationError(_0x1316e2(0x1f6),_0x1316e2(0x224)+_0x32ff67+'.');}let _0xfddaf7;try{_0xfddaf7=JSON[_0x1316e2(0x254)](_0x5c010f);}catch{throw notificationError('notification_config_json_invalid',_0x1316e2(0x216)+_0x32ff67+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0xfddaf7))throw notificationError(_0x1316e2(0x207),_0x1316e2(0x216)+_0x32ff67+_0x1316e2(0x1f9));return validateNotificationDocument(_0xfddaf7,_0x4e2036);}export function projectNotificationListConfig(_0x118e9e,_0x3c0a98){const _0x27bf2b=a181_0x4164a7;return{'id':typeof _0x118e9e['id']==='number'?_0x118e9e['id']:null,'configCode':requireResponseString(_0x118e9e[_0x27bf2b(0x234)],_0x27bf2b(0x234),_0x3c0a98),'configName':requireResponseString(_0x118e9e['configName'],'configName',_0x3c0a98),'channelType':requireResponseString(_0x118e9e[_0x27bf2b(0x1e1)],_0x27bf2b(0x1e1),_0x3c0a98),'description':normalizeNullableString(_0x118e9e[_0x27bf2b(0x1de)]),'createTime':normalizeNullableString(_0x118e9e[_0x27bf2b(0x248)]),'updateTime':normalizeNullableString(_0x118e9e[_0x27bf2b(0x21e)])};}export function normalizeExactNotificationConfig(_0x4ff3f2,_0xc71fb3,_0x3d257c){const _0x7a10dd=a181_0x4164a7;if(!Number[_0x7a10dd(0x238)](_0x4ff3f2['id'])||_0x4ff3f2['id']!==_0xc71fb3)throw notificationError(_0x7a10dd(0x1ed),_0x7a10dd(0x1fd)+_0xc71fb3+'.');if(_0x4ff3f2['appCode']!==_0x3d257c)throw notificationError(_0x7a10dd(0x1ed),_0x7a10dd(0x210)+_0xc71fb3+_0x7a10dd(0x226));const _0x187aca=requireExactString(_0x4ff3f2[_0x7a10dd(0x1ef)],_0x7a10dd(0x1ef),_0xc71fb3),_0x31098a=requireExactString(_0x4ff3f2['configCode'],_0x7a10dd(0x234),_0xc71fb3),_0x370a93=requireExactString(_0x4ff3f2[_0x7a10dd(0x1e1)],_0x7a10dd(0x1e1),_0xc71fb3);if(!NOTIFICATION_CHANNEL_TYPES[_0x7a10dd(0x1fc)](_0x370a93))throw notificationError('notification_config_response_invalid',_0x7a10dd(0x210)+_0xc71fb3+_0x7a10dd(0x1d9));const _0x15f2ac=responseNullableString(_0x4ff3f2['endpointUrl'],_0x7a10dd(0x241),_0xc71fb3),_0x30227a=responseNullableString(_0x4ff3f2[_0x7a10dd(0x1f7)],_0x7a10dd(0x1f7),_0xc71fb3),_0x1ee346=responseNullableString(_0x4ff3f2['description'],_0x7a10dd(0x1de),_0xc71fb3),_0x265227=responseNullableTimeout(_0x4ff3f2['connectTimeout'],_0x7a10dd(0x1dc),_0xc71fb3),_0x3fc204=responseNullableTimeout(_0x4ff3f2[_0x7a10dd(0x22d)],_0x7a10dd(0x22d),_0xc71fb3);return{'id':_0xc71fb3,'appCode':_0x3d257c,'configCode':_0x31098a,'configName':_0x187aca,'channelType':_0x370a93,'endpointUrl':redactSensitive(_0x15f2ac),'channelConfig':redactSensitive(_0x30227a),'description':_0x1ee346,'connectTimeout':_0x265227,'readTimeout':_0x3fc204,'endpointUrlRaw':_0x15f2ac,'channelConfigRaw':_0x30227a};}export async function requireExactNotificationConfig(_0x2a0057,_0x382312,_0x5b1808){const _0x315c88=a181_0x4164a7;let _0x23933b;try{_0x23933b=await getNotificationChannelConfig(_0x382312,_0x2a0057);}catch{throw safeApiFailure(_0x5b1808,_0x315c88(0x245),_0x315c88(0x21f)+_0x2a0057+_0x315c88(0x1f2));}return normalizeExactNotificationConfig(_0x23933b,_0x382312,_0x2a0057);}export function projectNotificationConfig(_0x3404df){const _0x5bdd8e=a181_0x4164a7;return{'id':_0x3404df['id']??null,'appCode':_0x3404df[_0x5bdd8e(0x256)],'configCode':_0x3404df[_0x5bdd8e(0x234)]??null,'configName':_0x3404df[_0x5bdd8e(0x1ef)],'channelType':_0x3404df['channelType'],'endpointUrl':redactSensitive(_0x3404df[_0x5bdd8e(0x241)]),'channelConfig':redactSensitive(_0x3404df[_0x5bdd8e(0x1f7)]),'description':_0x3404df[_0x5bdd8e(0x1de)]??null,'connectTimeout':_0x3404df[_0x5bdd8e(0x1dc)]??null,'readTimeout':_0x3404df[_0x5bdd8e(0x22d)]??null};}export function notificationSelector(_0x3a3c07){const _0x5b71ec=a181_0x4164a7;return{'appCode':_0x3a3c07[_0x5b71ec(0x256)],'id':_0x3a3c07['id'],'configCode':_0x3a3c07[_0x5b71ec(0x234)],'configName':_0x3a3c07[_0x5b71ec(0x1ef)],'channelType':_0x3a3c07[_0x5b71ec(0x1e1)]};}export function createMutationInput(_0x2dac62,_0x4704dc){const _0x1a30f1=a181_0x4164a7;return{'appCode':_0x2dac62,'configName':_0x4704dc[_0x1a30f1(0x1ef)],'channelType':_0x4704dc[_0x1a30f1(0x1e1)],...hasOwn(_0x4704dc,_0x1a30f1(0x241))?{'endpointUrl':_0x4704dc[_0x1a30f1(0x241)]}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1f7))?{'channelConfig':serializeChannelConfig(_0x4704dc[_0x1a30f1(0x1f7)])}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1de))?{'description':_0x4704dc['description']}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1dc))?{'connectTimeout':_0x4704dc['connectTimeout']}:{},...hasOwn(_0x4704dc,'readTimeout')?{'readTimeout':_0x4704dc[_0x1a30f1(0x22d)]}:{}};}export function mergeUpdateInput(_0x1fdc5a,_0x592227){const _0x1f2b71=a181_0x4164a7;return{'id':_0x1fdc5a['id'],'appCode':_0x1fdc5a[_0x1f2b71(0x256)],'configName':_0x592227['configName']??_0x1fdc5a[_0x1f2b71(0x1ef)],'channelType':_0x592227[_0x1f2b71(0x1e1)]??_0x1fdc5a[_0x1f2b71(0x1e1)],'endpointUrl':hasOwn(_0x592227,'endpointUrl')?_0x592227[_0x1f2b71(0x241)]:_0x1fdc5a[_0x1f2b71(0x217)],'channelConfig':hasOwn(_0x592227,'channelConfig')?serializeChannelConfig(_0x592227[_0x1f2b71(0x1f7)]):_0x1fdc5a['channelConfigRaw'],'description':hasOwn(_0x592227,_0x1f2b71(0x1de))?_0x592227[_0x1f2b71(0x1de)]:_0x1fdc5a[_0x1f2b71(0x1de)],'connectTimeout':hasOwn(_0x592227,_0x1f2b71(0x1dc))?_0x592227['connectTimeout']:_0x1fdc5a['connectTimeout'],'readTimeout':hasOwn(_0x592227,_0x1f2b71(0x22d))?_0x592227[_0x1f2b71(0x22d)]:_0x1fdc5a['readTimeout']};}export function plannedUpdateProjection(_0x4523c2,_0x2f323c){const _0x337e27=a181_0x4164a7;return projectNotificationConfig({'id':_0x4523c2['id'],'appCode':_0x4523c2[_0x337e27(0x256)],'configCode':_0x4523c2[_0x337e27(0x234)],'configName':_0x2f323c[_0x337e27(0x1ef)]??_0x4523c2[_0x337e27(0x1ef)],'channelType':_0x2f323c[_0x337e27(0x1e1)]??_0x4523c2['channelType'],'endpointUrl':hasOwn(_0x2f323c,_0x337e27(0x241))?_0x2f323c[_0x337e27(0x241)]:_0x4523c2['endpointUrlRaw'],'channelConfig':hasOwn(_0x2f323c,_0x337e27(0x1f7))?_0x2f323c[_0x337e27(0x1f7)]:_0x4523c2[_0x337e27(0x23f)],'description':hasOwn(_0x2f323c,_0x337e27(0x1de))?_0x2f323c[_0x337e27(0x1de)]:_0x4523c2[_0x337e27(0x1de)],'connectTimeout':hasOwn(_0x2f323c,_0x337e27(0x1dc))?_0x2f323c['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4523c2[_0x337e27(0x1dc)],'readTimeout':hasOwn(_0x2f323c,_0x337e27(0x22d))?_0x2f323c['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4523c2[_0x337e27(0x22d)]});}export function requestedSafeFieldsMatch(_0x4e1597,_0x589632,_0x260a8b){const _0x3ccadf=a181_0x4164a7,_0x4d44cf=[],_0x58493f=[],_0x47204c=[];for(const _0x1363c4 of[_0x3ccadf(0x1ef),_0x3ccadf(0x1e1),'description']){if(!hasOwn(_0x260a8b,_0x1363c4))continue;_0x47204c[_0x3ccadf(0x223)](_0x1363c4),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x1363c4]===_0x260a8b[_0x1363c4]),_0x58493f[_0x3ccadf(0x223)](_0x4e1597[_0x1363c4]!==_0x260a8b[_0x1363c4]&&_0x589632[_0x1363c4]===_0x260a8b[_0x1363c4]);}for(const _0x5a09a2 of[_0x3ccadf(0x1dc),_0x3ccadf(0x22d)]){if(!hasOwn(_0x260a8b,_0x5a09a2))continue;const _0x9dafcf=_0x260a8b[_0x5a09a2]??(_0x5a09a2==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x47204c[_0x3ccadf(0x223)](_0x5a09a2),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x5a09a2]===_0x9dafcf),_0x58493f[_0x3ccadf(0x223)](_0x4e1597[_0x5a09a2]!==_0x9dafcf&&_0x589632[_0x5a09a2]===_0x9dafcf);}return hasOwn(_0x260a8b,_0x3ccadf(0x241))&&_0x260a8b[_0x3ccadf(0x241)]===null&&(_0x47204c[_0x3ccadf(0x223)]('endpointUrl:null'),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x3ccadf(0x217)]===null||_0x589632[_0x3ccadf(0x217)]===''),_0x58493f[_0x3ccadf(0x223)](_0x4e1597['endpointUrlRaw']!==null&&_0x4e1597[_0x3ccadf(0x217)]!==''&&(_0x589632[_0x3ccadf(0x217)]===null||_0x589632[_0x3ccadf(0x217)]===''))),{'allMatch':_0x4d44cf[_0x3ccadf(0x218)](Boolean),'provesChange':_0x58493f[_0x3ccadf(0x1e9)](Boolean),'verifiedFields':_0x47204c};}export function validateNotificationDeleteReadback(_0x427443,_0x49e2e4,_0x4d31eb){const _0x28f2b8=a181_0x4164a7;for(const [_0x4e6111,_0x45dd66]of _0x427443[_0x28f2b8(0x232)]()){if(!Number[_0x28f2b8(0x238)](_0x45dd66['id'])||_0x45dd66['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x28f2b8(0x1df)+(_0x4e6111+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x45dd66[_0x28f2b8(0x256)]!==_0x49e2e4)throw notificationError(_0x28f2b8(0x1ed),'Notification\x20config\x20list\x20item\x20'+(_0x4e6111+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x45dd66['channelType']!==_0x4d31eb)throw notificationError(_0x28f2b8(0x1ed),_0x28f2b8(0x1df)+(_0x4e6111+0x1)+_0x28f2b8(0x1e2));}}export function safeApiFailure(_0x4b61b5,_0xd0349a,_0x4e49fb){const _0x57a150=a181_0x4164a7;return notificationError(_0x57a150(0x25d)+_0x4b61b5+'_'+(_0xd0349a==='mutation'?_0x57a150(0x1fa):_0xd0349a+_0x57a150(0x23c)),_0x57a150(0x210)+_0x4b61b5+'\x20'+_0xd0349a+_0x57a150(0x1f3),_0x4e49fb);}export function notificationLookupCommand(_0x4a7661,_0x5ec057){const _0x3d6fa8=a181_0x4164a7;return _0x3d6fa8(0x24c)+_0x4a7661+'\x20--type\x20'+_0x5ec057+_0x3d6fa8(0x239);}function validateNotificationDocument(_0x5a5c8a,_0x235cc7){const _0x56e055=a181_0x4164a7;for(const _0x18e476 of Object[_0x56e055(0x24a)](_0x5a5c8a)){if(FORBIDDEN_IDENTITY_FIELDS[_0x56e055(0x1f5)](_0x18e476))throw notificationError(_0x56e055(0x243),_0x56e055(0x249)+_0x18e476+_0x56e055(0x1da));if(!ALLOWED_INPUT_FIELDS['has'](_0x18e476))throw notificationError(_0x56e055(0x229),_0x56e055(0x1ff)+_0x18e476+'\x22.');}if(_0x235cc7===_0x56e055(0x25b)&&Object['keys'](_0x5a5c8a)[_0x56e055(0x22a)]===0x0)throw notificationError(_0x56e055(0x215),_0x56e055(0x22f));const _0x1236a9={};if(hasOwn(_0x5a5c8a,_0x56e055(0x1ef)))_0x1236a9[_0x56e055(0x1ef)]=validateRequiredString(_0x5a5c8a[_0x56e055(0x1ef)],_0x56e055(0x1ef),0x80);else{if(_0x235cc7===_0x56e055(0x1e7))throw notificationError(_0x56e055(0x1e4),_0x56e055(0x259)+_0x56e055(0x1ec));}if(hasOwn(_0x5a5c8a,_0x56e055(0x1e1))){if(typeof _0x5a5c8a[_0x56e055(0x1e1)]!==_0x56e055(0x25c))throw invalidFieldType('channelType','a\x20supported\x20string');const _0x1be0ac=_0x5a5c8a[_0x56e055(0x1e1)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x56e055(0x1fc)](_0x1be0ac))throw notificationError(_0x56e055(0x206),_0x56e055(0x1f1),_0x56e055(0x23e)+NOTIFICATION_CHANNEL_TYPES[_0x56e055(0x258)](',\x20')+'.');_0x1236a9[_0x56e055(0x1e1)]=_0x1be0ac;}else{if(_0x235cc7===_0x56e055(0x1e7))throw notificationError(_0x56e055(0x1e4),_0x56e055(0x259)+_0x56e055(0x211));}for(const [_0x17fc6b,_0x191360]of[[_0x56e055(0x241),0x200],[_0x56e055(0x1de),0x100]]){if(!hasOwn(_0x5a5c8a,_0x17fc6b))continue;const _0x50e787=_0x5a5c8a[_0x17fc6b];if(_0x50e787!==null&&typeof _0x50e787!==_0x56e055(0x25c))throw invalidFieldType(_0x17fc6b,_0x56e055(0x1e5));if(typeof _0x50e787===_0x56e055(0x25c)&&_0x50e787['length']>_0x191360)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x17fc6b+'\x22\x20cannot\x20exceed\x20'+_0x191360+_0x56e055(0x24d));_0x1236a9[_0x17fc6b]=_0x50e787;}if(hasOwn(_0x5a5c8a,_0x56e055(0x1f7))){const _0x5e215e=_0x5a5c8a['channelConfig'];if(_0x5e215e===null&&_0x235cc7===_0x56e055(0x1e7))throw invalidFieldType('channelConfig','a\x20JSON\x20object');if(_0x5e215e!==null&&!isJsonObject(_0x5e215e))throw invalidFieldType(_0x56e055(0x1f7),_0x235cc7==='update'?_0x56e055(0x204):_0x56e055(0x214));_0x5e215e!==null&&validateChannelConfigFields(_0x1236a9['channelType'],_0x5e215e),_0x1236a9[_0x56e055(0x1f7)]=_0x5e215e;}for(const _0x333441 of['connectTimeout',_0x56e055(0x22d)]){if(!hasOwn(_0x5a5c8a,_0x333441))continue;const _0x3a0dce=_0x5a5c8a[_0x333441];if(_0x3a0dce!==null&&(!Number[_0x56e055(0x238)](_0x3a0dce)||_0x3a0dce<0x0))throw notificationError(_0x56e055(0x206),'Notification\x20JSON\x20field\x20\x22'+_0x333441+_0x56e055(0x202));_0x1236a9[_0x333441]=_0x3a0dce;}return _0x1236a9;}function validateRequiredString(_0x178761,_0x4c241f,_0x34a147){const _0xb15ecb=a181_0x4164a7;if(typeof _0x178761!==_0xb15ecb(0x25c))throw invalidFieldType(_0x4c241f,_0xb15ecb(0x1e0));const _0x3793e5=_0x178761[_0xb15ecb(0x1e8)]();if(!_0x3793e5)throw notificationError('notification_config_field_invalid',_0xb15ecb(0x249)+_0x4c241f+_0xb15ecb(0x1e3));if(_0x3793e5[_0xb15ecb(0x22a)]>_0x34a147)throw notificationError(_0xb15ecb(0x206),_0xb15ecb(0x249)+_0x4c241f+_0xb15ecb(0x246)+_0x34a147+_0xb15ecb(0x24d));return _0x3793e5;}function validateChannelConfigFields(_0x570f02,_0x191689){const _0x58ac31=a181_0x4164a7;if(hasOwn(_0x191689,_0x58ac31(0x225)))throw forbiddenChannelConfigField(_0x58ac31(0x225));if(_0x570f02===_0x58ac31(0x20f))for(const _0x159f4a of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x191689,_0x159f4a))throw forbiddenChannelConfigField(_0x159f4a);}}function forbiddenChannelConfigField(_0x28c8ef){const _0x56db18=a181_0x4164a7;return notificationError(_0x56db18(0x1fb),_0x56db18(0x220)+_0x28c8ef+_0x56db18(0x1db));}function invalidFieldType(_0x1fdcca,_0x119bce){const _0x416180=a181_0x4164a7;return notificationError(_0x416180(0x206),_0x416180(0x249)+_0x1fdcca+_0x416180(0x200)+_0x119bce+'.');}function serializeChannelConfig(_0x5d4f73){return _0x5d4f73===null||_0x5d4f73===undefined?null:JSON['stringify'](_0x5d4f73);}function redactSensitive(_0x36853f){const _0x166ecf=a181_0x4164a7;return _0x36853f===null||_0x36853f===undefined||_0x36853f===''?null:_0x166ecf(0x1f0);}function requireResponseString(_0x417a76,_0x3a3ae1,_0x369ec9){const _0x36a507=a181_0x4164a7;if(typeof _0x417a76!==_0x36a507(0x25c)||_0x417a76[_0x36a507(0x1e8)]()==='')throw CliErrors[_0x36a507(0x240)](_0x36a507(0x20d),'Item\x20'+(_0x369ec9+0x1)+_0x36a507(0x1f8)+_0x3a3ae1+'\x22.');return _0x417a76[_0x36a507(0x1e8)]();}function requireExactString(_0x399246,_0x350e67,_0x1afde1){const _0x588b9d=a181_0x4164a7;if(typeof _0x399246!==_0x588b9d(0x25c)||_0x399246[_0x588b9d(0x1e8)]()==='')throw notificationError(_0x588b9d(0x1ed),'Notification\x20config\x20'+_0x1afde1+_0x588b9d(0x1f8)+_0x350e67+'\x22.');return _0x399246[_0x588b9d(0x1e8)]();}function responseNullableString(_0x234b28,_0x200a49,_0x33f3f3){const _0x11d875=a181_0x4164a7;if(_0x234b28===undefined||_0x234b28===null)return null;if(typeof _0x234b28!=='string')throw notificationError(_0x11d875(0x1ed),_0x11d875(0x210)+_0x33f3f3+'\x20has\x20invalid\x20field\x20\x22'+_0x200a49+'\x22.');return _0x234b28;}function responseNullableTimeout(_0x83cd2c,_0xfe083c,_0x412d9e){const _0x58af0d=a181_0x4164a7;if(_0x83cd2c===undefined||_0x83cd2c===null)return null;if(!Number[_0x58af0d(0x238)](_0x83cd2c)||_0x83cd2c<0x0)throw notificationError(_0x58af0d(0x1ed),_0x58af0d(0x210)+_0x412d9e+_0x58af0d(0x21b)+_0xfe083c+'\x22.');return _0x83cd2c;}function normalizeNullableString(_0x5dcd5e){const _0x1286ce=a181_0x4164a7;return typeof _0x5dcd5e===_0x1286ce(0x25c)?_0x5dcd5e:null;}function isJsonObject(_0x2d0eab){const _0x5f011a=a181_0x4164a7;return _0x2d0eab!==null&&typeof _0x2d0eab===_0x5f011a(0x219)&&!Array['isArray'](_0x2d0eab);}function hasOwn(_0x1ada30,_0x27b085){const _0x33c723=a181_0x4164a7;return Object[_0x33c723(0x1eb)]['hasOwnProperty'][_0x33c723(0x209)](_0x1ada30,_0x27b085);}function a181_0x1e41(){const _0x4f47e5=['Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','call','from-env','notification_config_confirmation_required','recipients','Invalid\x20notification\x20config\x20response.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','EMAIL','Notification\x20config\x20','\x22channelType\x22.','ccList','kind','a\x20JSON\x20object','notification_config_update_empty','Notification\x20JSON\x20from\x20','endpointUrlRaw','every','object','type','\x20has\x20invalid\x20field\x20\x22','stdin','file\x20','updateTime','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','setEncoding','num','push','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','messageTemplate','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','FEISHU','Application-level\x20notification\x20config\x20ID','notification_config_field_unknown','length','name','validation','readTimeout','emailTargets','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','3631308wWWzJh','subjectPrefix','entries','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configCode','path','env','dry-run','isSafeInteger','\x20--format\x20compress','6KHJlaj','1408687PsOXFY','_unavailable','1022854dQNzNY','Allowed\x20values:\x20','channelConfigRaw','apiError','endpointUrl','str','notification_config_field_forbidden','bool','preflight','\x22\x20cannot\x20exceed\x20','3152766gqzqaW','createTime','Notification\x20JSON\x20field\x20\x22','keys','number','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20characters.','file','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Invalid\x20--','DINGTALK','WEBHOOK','parse','bccList','appCode','environment\x20variable\x20','join','Create\x20JSON\x20requires\x20field\x20','29239huMcTf','update','string','notification_config_','\x20has\x20an\x20unsupported\x20channelType.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x22\x20is\x20forbidden.','connectTimeout','replyTo','description','Notification\x20config\x20list\x20item\x20','a\x20non-empty\x20string','channelType','\x20has\x20an\x20invalid\x20channelType.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','notification_config_field_required','a\x20string\x20or\x20null','34825032CIRSSy','create','trim','some','2416wvtBUS','prototype','\x22configName\x22.','notification_config_response_invalid','Missing\x20notification\x20JSON\x20source.','configName','<redacted>','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20failed.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','has','notification_config_source_unavailable','channelConfig','\x20is\x20missing\x20required\x20field\x20\x22','\x20must\x20be\x20an\x20object.','failed','notification_config_channel_field_forbidden','includes','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','Unknown\x20notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20','channelCode','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','8448055vypiAt','a\x20JSON\x20object\x20or\x20null','yes','notification_config_field_invalid','notification_config_json_invalid'];a181_0x1e41=function(){return _0x4f47e5;};return a181_0x1e41();}async function readStdin(){const _0x27ebee=a181_0x4164a7;let _0x5b97b6='';process[_0x27ebee(0x21c)][_0x27ebee(0x221)]('utf8');for await(const _0x4fe3da of process[_0x27ebee(0x21c)])_0x5b97b6+=_0x4fe3da;return _0x5b97b6;}
1
+ const a181_0x4044c7=a181_0x123b;(function(_0x32eefe,_0x5efefc){const _0x536b76=a181_0x123b,_0x5b74b6=_0x32eefe();while(!![]){try{const _0x533cbe=-parseInt(_0x536b76(0x104))/0x1*(parseInt(_0x536b76(0xd1))/0x2)+parseInt(_0x536b76(0xcc))/0x3+-parseInt(_0x536b76(0x10e))/0x4*(-parseInt(_0x536b76(0x118))/0x5)+-parseInt(_0x536b76(0xc5))/0x6+parseInt(_0x536b76(0x12c))/0x7*(-parseInt(_0x536b76(0xd0))/0x8)+-parseInt(_0x536b76(0xd4))/0x9*(parseInt(_0x536b76(0x131))/0xa)+parseInt(_0x536b76(0xfd))/0xb;if(_0x533cbe===_0x5efefc)break;else _0x5b74b6['push'](_0x5b74b6['shift']());}catch(_0x501762){_0x5b74b6['push'](_0x5b74b6['shift']());}}}(a181_0x2aba,0x8e558));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a181_0x4044c7(0x109),a181_0x4044c7(0xf8),a181_0x4044c7(0x141),'WECOM',a181_0x4044c7(0xee)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x4044c7(0x140),a181_0x4044c7(0xd3),a181_0x4044c7(0xf9),a181_0x4044c7(0xe5),a181_0x4044c7(0xc6),a181_0x4044c7(0x102),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a181_0x4044c7(0xdd),a181_0x4044c7(0xe9)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x4044c7(0xd7),a181_0x4044c7(0x11d),a181_0x4044c7(0x146),a181_0x4044c7(0x13f),a181_0x4044c7(0x107),'subjectPrefix',a181_0x4044c7(0xf4),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0x4044c7(0xe6),'type':a181_0x4044c7(0x122),'required':![],'description':a181_0x4044c7(0x12b)},{'name':'stdin','type':a181_0x4044c7(0x11c),'required':![],'default':![],'description':a181_0x4044c7(0xc7)},{'name':'from-env','type':a181_0x4044c7(0x122),'required':![],'description':a181_0x4044c7(0x120)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0x4044c7(0x108),'required':!![],'description':a181_0x4044c7(0xef)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a181_0x2aba(){const _0x1be220=['recipients','a\x20JSON\x20object','kind','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_field_unknown','string','notification_config_json_invalid','Item\x20','\x20has\x20an\x20unsupported\x20channelType.','Unknown\x20notification\x20JSON\x20field\x20\x22','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','name','endpointUrl:null','trim','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','847rfeEUV','Notification\x20config\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','num','Allowed\x20values:\x20','10uzcIdC','mutation','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','create','channelConfigRaw','push','Notification\x20JSON\x20source\x20is\x20ambiguous.','update','utf8','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','readTimeout','\x22\x20must\x20be\x20','\x22configName\x22.','apiError','bccList','configName','DINGTALK','rabetbase\x20notification\x20config-list\x20--appcode\x20','some','messageTemplate','isSafeInteger','ccList','notification_config_field_forbidden','\x20has\x20an\x20invalid\x20id.','createTime','notification_config_source_unavailable','4659180TYpsFF','description','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','dry-run','keys','environment\x20variable\x20','\x20has\x20an\x20invalid\x20appCode.','2706312BXRdsR','isArray','failed','\x20is\x20missing\x20required\x20field\x20\x22','3136ytFFrg','1392bkHumP','notification_config_response_invalid','channelType','6767433fUjYpU','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Invalid\x20notification\x20config\x20response.','emailTargets','call','notification_config_confirmation_required','object','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrlRaw','configCode','Notification\x20JSON\x20field\x20\x22','\x20has\x20invalid\x20field\x20\x22','\x20--format\x20compress','join','length','a\x20supported\x20string','stdin','channelConfig','file','notification_config_update_empty','type','channelCode','Missing\x20notification\x20JSON\x20source.','env','yes','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','WEBHOOK','Application-level\x20notification\x20config\x20ID','str','includes','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','hasOwnProperty','fromName','\x20characters.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Create\x20JSON\x20requires\x20field\x20','FEISHU','endpointUrl','validation','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stringify','9078949OvLZkU','file\x20','<redacted>','\x20has\x20an\x20invalid\x20channelType.','every','connectTimeout','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','863NaQqFb','setEncoding','parse','replyTo','number','EMAIL','\x22\x20is\x20forbidden.','Notification\x20JSON\x20from\x20','appCode','Notification\x20config\x20list\x20item\x20','12kXbALi','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20is\x20invalid.','path','has','\x20failed.','from-env','notification_config_field_invalid','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','1720140qgipwY','notification_config_id_invalid','notification_config_field_required','bool','boolean'];a181_0x2aba=function(){return _0x1be220;};return a181_0x2aba();}export function notificationError(_0x1b0f52,_0x315a77,_0x9ff90){return new CliError(_0x1b0f52,0x1,_0x315a77,_0x9ff90);}export function readNotificationId(_0x3799d1){const _0x510d88=a181_0x4044c7,_0x1d5f68=_0x3799d1[_0x510d88(0x12f)]('id');if(!Number['isSafeInteger'](_0x1d5f68)||_0x1d5f68<=0x0)throw notificationError(_0x510d88(0x119),_0x510d88(0x12e));return _0x1d5f68;}export function requireNotificationExplicitYes(_0xe982b){const _0x2cf703=a181_0x4044c7;if(_0xe982b['bool'](_0x2cf703(0xc8))||_0xe982b[_0x2cf703(0x11b)](_0x2cf703(0xec)))return;throw notificationError(_0x2cf703(0xd9),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x2cf703(0xfb));}export function readNotificationChannelType(_0x23ccf5,_0x1bb8fe=a181_0x4044c7(0xe8),_0x10525a=a181_0x4044c7(0x109)){const _0x5bf0a9=a181_0x4044c7,_0x1ae38c=_0x23ccf5['str'](_0x1bb8fe)[_0x5bf0a9(0x12a)]()||_0x10525a;if(!NOTIFICATION_CHANNEL_TYPES[_0x5bf0a9(0xf1)](_0x1ae38c))throw CliErrors['validation']('Invalid\x20--'+_0x1bb8fe+':\x20'+_0x1ae38c,_0x5bf0a9(0x130)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1ae38c;}export function assertSingleNotificationSource(_0xe07316){const _0x185780=a181_0x4044c7,_0x463deb=[],_0x312c1c=_0xe07316[_0x185780(0xf0)](_0x185780(0xe6))['trim']();if(_0x312c1c)_0x463deb[_0x185780(0x136)]({'kind':_0x185780(0xe6),'path':_0x312c1c});if(_0xe07316[_0x185780(0x11b)](_0x185780(0xe4)))_0x463deb['push']({'kind':'stdin'});const _0x2477c8=_0xe07316[_0x185780(0xf0)](_0x185780(0x115))[_0x185780(0x12a)]();if(_0x2477c8)_0x463deb['push']({'kind':_0x185780(0xeb),'name':_0x2477c8});if(_0x463deb[_0x185780(0xe2)]===0x0)throw CliErrors[_0x185780(0xfa)](_0x185780(0xea),_0x185780(0x103));if(_0x463deb[_0x185780(0xe2)]>0x1)throw CliErrors[_0x185780(0xfa)](_0x185780(0x137),_0x185780(0x103));return _0x463deb[0x0];}export async function readNotificationDocument(_0x2c44a9,_0x40a9e9){const _0x5d39c9=a181_0x4044c7,_0x36dbb8=assertSingleNotificationSource(_0x2c44a9),_0x3dcf5f=_0x36dbb8[_0x5d39c9(0x11f)]===_0x5d39c9(0xe6)?_0x5d39c9(0xfe)+_0x36dbb8[_0x5d39c9(0x112)]:_0x36dbb8[_0x5d39c9(0x11f)]===_0x5d39c9(0xeb)?_0x5d39c9(0xca)+_0x36dbb8[_0x5d39c9(0x128)]:'stdin';let _0x22384f;try{if(_0x36dbb8[_0x5d39c9(0x11f)]===_0x5d39c9(0xe6))_0x22384f=await readFile(_0x36dbb8['path'],_0x5d39c9(0x139));else{if(_0x36dbb8['kind']===_0x5d39c9(0xeb)){if(!(_0x36dbb8[_0x5d39c9(0x128)]in process.env))throw notificationError('notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x36dbb8['name']);_0x22384f=process.env[_0x36dbb8.name]??'';}else _0x22384f=await readStdin();}}catch(_0x42e7ca){if(_0x42e7ca instanceof CliError)throw _0x42e7ca;throw notificationError(_0x5d39c9(0xc4),_0x5d39c9(0xf2)+_0x3dcf5f+'.');}let _0x46f675;try{_0x46f675=JSON[_0x5d39c9(0x106)](_0x22384f);}catch{throw notificationError(_0x5d39c9(0x123),_0x5d39c9(0x10b)+_0x3dcf5f+_0x5d39c9(0x111),_0x5d39c9(0x133));}if(!isJsonObject(_0x46f675))throw notificationError(_0x5d39c9(0x123),_0x5d39c9(0x10b)+_0x3dcf5f+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x46f675,_0x40a9e9);}export function projectNotificationListConfig(_0x3b2532,_0x5bb93c){const _0x4fd3e7=a181_0x4044c7;return{'id':typeof _0x3b2532['id']===_0x4fd3e7(0x108)?_0x3b2532['id']:null,'configCode':requireResponseString(_0x3b2532['configCode'],_0x4fd3e7(0xdd),_0x5bb93c),'configName':requireResponseString(_0x3b2532[_0x4fd3e7(0x140)],_0x4fd3e7(0x140),_0x5bb93c),'channelType':requireResponseString(_0x3b2532[_0x4fd3e7(0xd3)],_0x4fd3e7(0xd3),_0x5bb93c),'description':normalizeNullableString(_0x3b2532['description']),'createTime':normalizeNullableString(_0x3b2532[_0x4fd3e7(0xc3)]),'updateTime':normalizeNullableString(_0x3b2532['updateTime'])};}export function normalizeExactNotificationConfig(_0x49f900,_0x2c2e58,_0x21fd65){const _0xd566bb=a181_0x4044c7;if(!Number[_0xd566bb(0x145)](_0x49f900['id'])||_0x49f900['id']!==_0x2c2e58)throw notificationError(_0xd566bb(0xd2),_0xd566bb(0xed)+_0x2c2e58+'.');if(_0x49f900[_0xd566bb(0x10c)]!==_0x21fd65)throw notificationError(_0xd566bb(0xd2),'Notification\x20config\x20'+_0x2c2e58+_0xd566bb(0x13a));const _0x468f7c=requireExactString(_0x49f900[_0xd566bb(0x140)],'configName',_0x2c2e58),_0x145ffd=requireExactString(_0x49f900['configCode'],_0xd566bb(0xdd),_0x2c2e58),_0x2e8dfe=requireExactString(_0x49f900[_0xd566bb(0xd3)],'channelType',_0x2c2e58);if(!NOTIFICATION_CHANNEL_TYPES[_0xd566bb(0xf1)](_0x2e8dfe))throw notificationError(_0xd566bb(0xd2),'Notification\x20config\x20'+_0x2c2e58+_0xd566bb(0x125));const _0x155370=responseNullableString(_0x49f900['endpointUrl'],_0xd566bb(0xf9),_0x2c2e58),_0x23e85b=responseNullableString(_0x49f900[_0xd566bb(0xe5)],_0xd566bb(0xe5),_0x2c2e58),_0x2dd804=responseNullableString(_0x49f900[_0xd566bb(0xc6)],'description',_0x2c2e58),_0x4f8d96=responseNullableTimeout(_0x49f900[_0xd566bb(0x102)],'connectTimeout',_0x2c2e58),_0x175aaa=responseNullableTimeout(_0x49f900[_0xd566bb(0x13b)],_0xd566bb(0x13b),_0x2c2e58);return{'id':_0x2c2e58,'appCode':_0x21fd65,'configCode':_0x145ffd,'configName':_0x468f7c,'channelType':_0x2e8dfe,'endpointUrl':redactSensitive(_0x155370),'channelConfig':redactSensitive(_0x23e85b),'description':_0x2dd804,'connectTimeout':_0x4f8d96,'readTimeout':_0x175aaa,'endpointUrlRaw':_0x155370,'channelConfigRaw':_0x23e85b};}export async function requireExactNotificationConfig(_0x376387,_0x1d445b,_0x2fb2b3){const _0x4df354=a181_0x4044c7;let _0x52305e;try{_0x52305e=await getNotificationChannelConfig(_0x1d445b,_0x376387);}catch{throw safeApiFailure(_0x2fb2b3,'preflight',_0x4df354(0x127)+_0x376387+_0x4df354(0x117));}return normalizeExactNotificationConfig(_0x52305e,_0x1d445b,_0x376387);}export function projectNotificationConfig(_0x4e895a){const _0x211c2f=a181_0x4044c7;return{'id':_0x4e895a['id']??null,'appCode':_0x4e895a[_0x211c2f(0x10c)],'configCode':_0x4e895a['configCode']??null,'configName':_0x4e895a[_0x211c2f(0x140)],'channelType':_0x4e895a[_0x211c2f(0xd3)],'endpointUrl':redactSensitive(_0x4e895a[_0x211c2f(0xf9)]),'channelConfig':redactSensitive(_0x4e895a[_0x211c2f(0xe5)]),'description':_0x4e895a[_0x211c2f(0xc6)]??null,'connectTimeout':_0x4e895a[_0x211c2f(0x102)]??null,'readTimeout':_0x4e895a['readTimeout']??null};}export function notificationSelector(_0x2c553c){const _0x270782=a181_0x4044c7;return{'appCode':_0x2c553c[_0x270782(0x10c)],'id':_0x2c553c['id'],'configCode':_0x2c553c['configCode'],'configName':_0x2c553c[_0x270782(0x140)],'channelType':_0x2c553c[_0x270782(0xd3)]};}export function createMutationInput(_0x5fd967,_0x43e572){const _0x33d2f0=a181_0x4044c7;return{'appCode':_0x5fd967,'configName':_0x43e572[_0x33d2f0(0x140)],'channelType':_0x43e572[_0x33d2f0(0xd3)],...hasOwn(_0x43e572,_0x33d2f0(0xf9))?{'endpointUrl':_0x43e572[_0x33d2f0(0xf9)]}:{},...hasOwn(_0x43e572,_0x33d2f0(0xe5))?{'channelConfig':serializeChannelConfig(_0x43e572[_0x33d2f0(0xe5)])}:{},...hasOwn(_0x43e572,_0x33d2f0(0xc6))?{'description':_0x43e572[_0x33d2f0(0xc6)]}:{},...hasOwn(_0x43e572,'connectTimeout')?{'connectTimeout':_0x43e572[_0x33d2f0(0x102)]}:{},...hasOwn(_0x43e572,'readTimeout')?{'readTimeout':_0x43e572[_0x33d2f0(0x13b)]}:{}};}export function mergeUpdateInput(_0x32ef4e,_0x3abc72){const _0x596347=a181_0x4044c7;return{'id':_0x32ef4e['id'],'appCode':_0x32ef4e[_0x596347(0x10c)],'configName':_0x3abc72[_0x596347(0x140)]??_0x32ef4e[_0x596347(0x140)],'channelType':_0x3abc72[_0x596347(0xd3)]??_0x32ef4e[_0x596347(0xd3)],'endpointUrl':hasOwn(_0x3abc72,'endpointUrl')?_0x3abc72['endpointUrl']:_0x32ef4e[_0x596347(0xdc)],'channelConfig':hasOwn(_0x3abc72,'channelConfig')?serializeChannelConfig(_0x3abc72[_0x596347(0xe5)]):_0x32ef4e[_0x596347(0x135)],'description':hasOwn(_0x3abc72,_0x596347(0xc6))?_0x3abc72[_0x596347(0xc6)]:_0x32ef4e[_0x596347(0xc6)],'connectTimeout':hasOwn(_0x3abc72,'connectTimeout')?_0x3abc72[_0x596347(0x102)]:_0x32ef4e['connectTimeout'],'readTimeout':hasOwn(_0x3abc72,_0x596347(0x13b))?_0x3abc72['readTimeout']:_0x32ef4e[_0x596347(0x13b)]};}export function plannedUpdateProjection(_0x29c72a,_0x518e17){const _0x40aff6=a181_0x4044c7;return projectNotificationConfig({'id':_0x29c72a['id'],'appCode':_0x29c72a[_0x40aff6(0x10c)],'configCode':_0x29c72a[_0x40aff6(0xdd)],'configName':_0x518e17[_0x40aff6(0x140)]??_0x29c72a['configName'],'channelType':_0x518e17[_0x40aff6(0xd3)]??_0x29c72a[_0x40aff6(0xd3)],'endpointUrl':hasOwn(_0x518e17,_0x40aff6(0xf9))?_0x518e17[_0x40aff6(0xf9)]:_0x29c72a[_0x40aff6(0xdc)],'channelConfig':hasOwn(_0x518e17,_0x40aff6(0xe5))?_0x518e17[_0x40aff6(0xe5)]:_0x29c72a[_0x40aff6(0x135)],'description':hasOwn(_0x518e17,'description')?_0x518e17[_0x40aff6(0xc6)]:_0x29c72a[_0x40aff6(0xc6)],'connectTimeout':hasOwn(_0x518e17,_0x40aff6(0x102))?_0x518e17['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x29c72a[_0x40aff6(0x102)],'readTimeout':hasOwn(_0x518e17,_0x40aff6(0x13b))?_0x518e17['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x29c72a[_0x40aff6(0x13b)]});}export function requestedSafeFieldsMatch(_0x462c3e,_0xbe9f9f,_0x4641a7){const _0x11995f=a181_0x4044c7,_0x590612=[],_0x543374=[],_0x4790fa=[];for(const _0x59ace0 of[_0x11995f(0x140),'channelType',_0x11995f(0xc6)]){if(!hasOwn(_0x4641a7,_0x59ace0))continue;_0x4790fa[_0x11995f(0x136)](_0x59ace0),_0x590612['push'](_0xbe9f9f[_0x59ace0]===_0x4641a7[_0x59ace0]),_0x543374[_0x11995f(0x136)](_0x462c3e[_0x59ace0]!==_0x4641a7[_0x59ace0]&&_0xbe9f9f[_0x59ace0]===_0x4641a7[_0x59ace0]);}for(const _0x2c0eac of[_0x11995f(0x102),'readTimeout']){if(!hasOwn(_0x4641a7,_0x2c0eac))continue;const _0x1778c2=_0x4641a7[_0x2c0eac]??(_0x2c0eac===_0x11995f(0x102)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4790fa['push'](_0x2c0eac),_0x590612[_0x11995f(0x136)](_0xbe9f9f[_0x2c0eac]===_0x1778c2),_0x543374['push'](_0x462c3e[_0x2c0eac]!==_0x1778c2&&_0xbe9f9f[_0x2c0eac]===_0x1778c2);}return hasOwn(_0x4641a7,_0x11995f(0xf9))&&_0x4641a7[_0x11995f(0xf9)]===null&&(_0x4790fa[_0x11995f(0x136)](_0x11995f(0x129)),_0x590612['push'](_0xbe9f9f[_0x11995f(0xdc)]===null||_0xbe9f9f[_0x11995f(0xdc)]===''),_0x543374[_0x11995f(0x136)](_0x462c3e[_0x11995f(0xdc)]!==null&&_0x462c3e[_0x11995f(0xdc)]!==''&&(_0xbe9f9f['endpointUrlRaw']===null||_0xbe9f9f[_0x11995f(0xdc)]===''))),{'allMatch':_0x590612[_0x11995f(0x101)](Boolean),'provesChange':_0x543374[_0x11995f(0x143)](Boolean),'verifiedFields':_0x4790fa};}export function validateNotificationDeleteReadback(_0xad3314,_0x18bc4f,_0x177960){const _0x1121cb=a181_0x4044c7;for(const [_0x544ea8,_0x3e3d03]of _0xad3314['entries']()){if(!Number[_0x1121cb(0x145)](_0x3e3d03['id'])||_0x3e3d03['id']<=0x0)throw notificationError(_0x1121cb(0xd2),_0x1121cb(0x10d)+(_0x544ea8+0x1)+_0x1121cb(0xc2));if(_0x3e3d03[_0x1121cb(0x10c)]!==_0x18bc4f)throw notificationError(_0x1121cb(0xd2),'Notification\x20config\x20list\x20item\x20'+(_0x544ea8+0x1)+_0x1121cb(0xcb));if(_0x3e3d03['channelType']!==_0x177960)throw notificationError(_0x1121cb(0xd2),'Notification\x20config\x20list\x20item\x20'+(_0x544ea8+0x1)+_0x1121cb(0x100));}}export function safeApiFailure(_0xdc3255,_0x2b9f2a,_0x179f70){const _0x4bf033=a181_0x4044c7;return notificationError('notification_config_'+_0xdc3255+'_'+(_0x2b9f2a===_0x4bf033(0x132)?_0x4bf033(0xce):_0x2b9f2a+'_unavailable'),'Notification\x20config\x20'+_0xdc3255+'\x20'+_0x2b9f2a+_0x4bf033(0x114),_0x179f70);}export function notificationLookupCommand(_0x5bacbc,_0x498f90){const _0x561b92=a181_0x4044c7;return _0x561b92(0x142)+_0x5bacbc+'\x20--type\x20'+_0x498f90+_0x561b92(0xe0);}function validateNotificationDocument(_0x12bfec,_0x48bf22){const _0x56aba6=a181_0x4044c7;for(const _0x5cf002 of Object['keys'](_0x12bfec)){if(FORBIDDEN_IDENTITY_FIELDS[_0x56aba6(0x113)](_0x5cf002))throw notificationError(_0x56aba6(0x147),_0x56aba6(0xde)+_0x5cf002+_0x56aba6(0xf6));if(!ALLOWED_INPUT_FIELDS[_0x56aba6(0x113)](_0x5cf002))throw notificationError(_0x56aba6(0x121),_0x56aba6(0x126)+_0x5cf002+'\x22.');}if(_0x48bf22===_0x56aba6(0x138)&&Object[_0x56aba6(0xc9)](_0x12bfec)[_0x56aba6(0xe2)]===0x0)throw notificationError(_0x56aba6(0xe7),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x547d59={};if(hasOwn(_0x12bfec,_0x56aba6(0x140)))_0x547d59[_0x56aba6(0x140)]=validateRequiredString(_0x12bfec[_0x56aba6(0x140)],_0x56aba6(0x140),0x80);else{if(_0x48bf22===_0x56aba6(0x134))throw notificationError(_0x56aba6(0x11a),_0x56aba6(0xf7)+_0x56aba6(0x13d));}if(hasOwn(_0x12bfec,_0x56aba6(0xd3))){if(typeof _0x12bfec[_0x56aba6(0xd3)]!==_0x56aba6(0x122))throw invalidFieldType(_0x56aba6(0xd3),_0x56aba6(0xe3));const _0x2a5f87=_0x12bfec['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x56aba6(0xf1)](_0x2a5f87))throw notificationError(_0x56aba6(0x116),_0x56aba6(0x110),_0x56aba6(0x130)+NOTIFICATION_CHANNEL_TYPES[_0x56aba6(0xe1)](',\x20')+'.');_0x547d59['channelType']=_0x2a5f87;}else{if(_0x48bf22===_0x56aba6(0x134))throw notificationError('notification_config_field_required',_0x56aba6(0xf7)+'\x22channelType\x22.');}for(const [_0xcdd2,_0x454cba]of[[_0x56aba6(0xf9),0x200],[_0x56aba6(0xc6),0x100]]){if(!hasOwn(_0x12bfec,_0xcdd2))continue;const _0x4a23c0=_0x12bfec[_0xcdd2];if(_0x4a23c0!==null&&typeof _0x4a23c0!==_0x56aba6(0x122))throw invalidFieldType(_0xcdd2,'a\x20string\x20or\x20null');if(typeof _0x4a23c0===_0x56aba6(0x122)&&_0x4a23c0[_0x56aba6(0xe2)]>_0x454cba)throw notificationError(_0x56aba6(0x116),_0x56aba6(0xde)+_0xcdd2+_0x56aba6(0x10f)+_0x454cba+_0x56aba6(0xf5));_0x547d59[_0xcdd2]=_0x4a23c0;}if(hasOwn(_0x12bfec,'channelConfig')){const _0x12dd19=_0x12bfec[_0x56aba6(0xe5)];if(_0x12dd19===null&&_0x48bf22===_0x56aba6(0x134))throw invalidFieldType(_0x56aba6(0xe5),_0x56aba6(0x11e));if(_0x12dd19!==null&&!isJsonObject(_0x12dd19))throw invalidFieldType(_0x56aba6(0xe5),_0x48bf22===_0x56aba6(0x138)?'a\x20JSON\x20object\x20or\x20null':_0x56aba6(0x11e));_0x12dd19!==null&&validateChannelConfigFields(_0x547d59[_0x56aba6(0xd3)],_0x12dd19),_0x547d59[_0x56aba6(0xe5)]=_0x12dd19;}for(const _0x3c4e35 of[_0x56aba6(0x102),_0x56aba6(0x13b)]){if(!hasOwn(_0x12bfec,_0x3c4e35))continue;const _0x2f3256=_0x12bfec[_0x3c4e35];if(_0x2f3256!==null&&(!Number[_0x56aba6(0x145)](_0x2f3256)||_0x2f3256<0x0))throw notificationError(_0x56aba6(0x116),_0x56aba6(0xde)+_0x3c4e35+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x547d59[_0x3c4e35]=_0x2f3256;}return _0x547d59;}function validateRequiredString(_0xcb083f,_0x50db92,_0x51c155){const _0x267e0a=a181_0x4044c7;if(typeof _0xcb083f!=='string')throw invalidFieldType(_0x50db92,'a\x20non-empty\x20string');const _0x48e8a4=_0xcb083f[_0x267e0a(0x12a)]();if(!_0x48e8a4)throw notificationError(_0x267e0a(0x116),'Notification\x20JSON\x20field\x20\x22'+_0x50db92+_0x267e0a(0xd5));if(_0x48e8a4[_0x267e0a(0xe2)]>_0x51c155)throw notificationError(_0x267e0a(0x116),'Notification\x20JSON\x20field\x20\x22'+_0x50db92+_0x267e0a(0x10f)+_0x51c155+'\x20characters.');return _0x48e8a4;}function validateChannelConfigFields(_0x4b8097,_0xb84a57){const _0x47ae5b=a181_0x4044c7;if(hasOwn(_0xb84a57,_0x47ae5b(0x144)))throw forbiddenChannelConfigField(_0x47ae5b(0x144));if(_0x4b8097===_0x47ae5b(0x109))for(const _0x286bea of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xb84a57,_0x286bea))throw forbiddenChannelConfigField(_0x286bea);}}function forbiddenChannelConfigField(_0x2f35a5){const _0x3f6bc8=a181_0x4044c7;return notificationError('notification_config_channel_field_forbidden',_0x3f6bc8(0xdb)+_0x2f35a5+_0x3f6bc8(0x10a));}function invalidFieldType(_0x10e060,_0x206182){const _0x3b8f35=a181_0x4044c7;return notificationError(_0x3b8f35(0x116),_0x3b8f35(0xde)+_0x10e060+_0x3b8f35(0x13c)+_0x206182+'.');}function a181_0x123b(_0x2f072c,_0x258f02){_0x2f072c=_0x2f072c-0xc2;const _0x2abae9=a181_0x2aba();let _0x123b24=_0x2abae9[_0x2f072c];return _0x123b24;}function serializeChannelConfig(_0x180c30){const _0x179087=a181_0x4044c7;return _0x180c30===null||_0x180c30===undefined?null:JSON[_0x179087(0xfc)](_0x180c30);}function redactSensitive(_0x34615c){const _0x362829=a181_0x4044c7;return _0x34615c===null||_0x34615c===undefined||_0x34615c===''?null:_0x362829(0xff);}function requireResponseString(_0x42fb8f,_0x1223a9,_0x308693){const _0x3e28b7=a181_0x4044c7;if(typeof _0x42fb8f!==_0x3e28b7(0x122)||_0x42fb8f['trim']()==='')throw CliErrors[_0x3e28b7(0x13e)](_0x3e28b7(0xd6),_0x3e28b7(0x124)+(_0x308693+0x1)+_0x3e28b7(0xcf)+_0x1223a9+'\x22.');return _0x42fb8f[_0x3e28b7(0x12a)]();}function requireExactString(_0x4f1ecc,_0x5dc563,_0x3a0e87){const _0x254454=a181_0x4044c7;if(typeof _0x4f1ecc!==_0x254454(0x122)||_0x4f1ecc['trim']()==='')throw notificationError(_0x254454(0xd2),_0x254454(0x12d)+_0x3a0e87+_0x254454(0xcf)+_0x5dc563+'\x22.');return _0x4f1ecc[_0x254454(0x12a)]();}function responseNullableString(_0x4bdc21,_0x530ca8,_0x4ada4a){const _0x4be9c1=a181_0x4044c7;if(_0x4bdc21===undefined||_0x4bdc21===null)return null;if(typeof _0x4bdc21!==_0x4be9c1(0x122))throw notificationError(_0x4be9c1(0xd2),'Notification\x20config\x20'+_0x4ada4a+_0x4be9c1(0xdf)+_0x530ca8+'\x22.');return _0x4bdc21;}function responseNullableTimeout(_0x3fd9cf,_0x1f133e,_0x48bca4){const _0x357992=a181_0x4044c7;if(_0x3fd9cf===undefined||_0x3fd9cf===null)return null;if(!Number['isSafeInteger'](_0x3fd9cf)||_0x3fd9cf<0x0)throw notificationError(_0x357992(0xd2),_0x357992(0x12d)+_0x48bca4+'\x20has\x20invalid\x20field\x20\x22'+_0x1f133e+'\x22.');return _0x3fd9cf;}function normalizeNullableString(_0x4047f8){return typeof _0x4047f8==='string'?_0x4047f8:null;}function isJsonObject(_0x383fdd){const _0x58ee68=a181_0x4044c7;return _0x383fdd!==null&&typeof _0x383fdd===_0x58ee68(0xda)&&!Array[_0x58ee68(0xcd)](_0x383fdd);}function hasOwn(_0x4b150e,_0x55c561){const _0x30c1bd=a181_0x4044c7;return Object['prototype'][_0x30c1bd(0xf3)][_0x30c1bd(0xd8)](_0x4b150e,_0x55c561);}async function readStdin(){const _0x5b6404=a181_0x4044c7;let _0x970634='';process['stdin'][_0x5b6404(0x105)](_0x5b6404(0x139));for await(const _0x5c068b of process[_0x5b6404(0xe4)])_0x970634+=_0x5c068b;return _0x970634;}
@@ -1 +1 @@
1
- function a182_0x129c(){const _0x293ed2=['recognize','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Unsupported\x20OCR\x20scene:\x20','GET','14360877iZiJSI','891555BpRQPW','filePath','/smartapi/common/queryFileUrl','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','fileName','general','imageUrl','filter','2623264ovvTUw','Table','validation','scene','\x20OCR\x20from\x20URL','fileUrl','525cGDUsy','image-file','count','POST','join','imageFile','1074334ETexHB','path','appCode','Preview:\x20recognize\x20','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','read','.\x20Supported\x20scenes:\x20','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','2020647hWGXmW','\x20OCR','8SJWGzA','idCard','apiError','File\x20URL\x20response\x20missing\x20fileUrl.','toLowerCase','767621mojpCF','Invoice','trim','form','string','str','5250hVgoDS','idcard','length','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','image-url'];a182_0x129c=function(){return _0x293ed2;};return a182_0x129c();}const a182_0x29f76f=a182_0x5e67;(function(_0x17ed77,_0x2d5d8b){const _0x5311c8=a182_0x5e67,_0x40fb2=_0x17ed77();while(!![]){try{const _0x1de8c3=parseInt(_0x5311c8(0x18c))/0x1+-parseInt(_0x5311c8(0x17d))/0x2+-parseInt(_0x5311c8(0x185))/0x3+-parseInt(_0x5311c8(0x171))/0x4+-parseInt(_0x5311c8(0x19c))/0x5+parseInt(_0x5311c8(0x192))/0x6*(parseInt(_0x5311c8(0x177))/0x7)+parseInt(_0x5311c8(0x187))/0x8*(parseInt(_0x5311c8(0x19b))/0x9);if(_0x1de8c3===_0x2d5d8b)break;else _0x40fb2['push'](_0x40fb2['shift']());}catch(_0x58b540){_0x40fb2['push'](_0x40fb2['shift']());}}}(a182_0x129c,0x5dc38));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',a182_0x29f76f(0x1a2),a182_0x29f76f(0x18f),a182_0x29f76f(0x188)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0x29f76f(0x18d),'general':'General','form':a182_0x29f76f(0x172),'idCard':'IdCard'},SCENE_FLAG={'name':a182_0x29f76f(0x174),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x29f76f(0x184)},IMAGE_FILE_FLAG={'name':a182_0x29f76f(0x178),'type':a182_0x29f76f(0x190),'description':a182_0x29f76f(0x195)},IMAGE_URL_FLAG={'name':a182_0x29f76f(0x196),'type':a182_0x29f76f(0x190),'description':a182_0x29f76f(0x1a0)};function normalizeScene(_0x2dc491){const _0x16c432=a182_0x29f76f,_0x5c7511=_0x2dc491['trim']()[_0x16c432(0x18b)]();if(_0x5c7511===_0x16c432(0x193))return'idCard';if(_0x5c7511==='invoice'||_0x5c7511===_0x16c432(0x1a2)||_0x5c7511===_0x16c432(0x18f))return _0x5c7511;throw CliErrors['validation'](_0x16c432(0x199)+_0x2dc491+_0x16c432(0x183)+SUPPORTED_SCENES[_0x16c432(0x17b)](',\x20'));}function selectedInputs(_0x22b1ce){const _0x3918d3=a182_0x29f76f,_0x29d496=_0x22b1ce[_0x3918d3(0x191)](_0x3918d3(0x178))[_0x3918d3(0x18e)](),_0x5ca673=_0x22b1ce[_0x3918d3(0x191)](_0x3918d3(0x196))[_0x3918d3(0x18e)]();return{'imageFile':_0x29d496,'imageUrl':_0x5ca673,'count':[_0x29d496,_0x5ca673][_0x3918d3(0x170)](Boolean)[_0x3918d3(0x194)]};}function a182_0x5e67(_0xfdf51b,_0x58a250){_0xfdf51b=_0xfdf51b-0x16f;const _0x129c09=a182_0x129c();let _0x5e67e4=_0x129c09[_0xfdf51b];return _0x5e67e4;}function validateInputSelection(_0x21297e){const _0x32821d=a182_0x29f76f,_0x4bc8e6=selectedInputs(_0x21297e);if(_0x4bc8e6[_0x32821d(0x179)]!==0x1)throw CliErrors[_0x32821d(0x173)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x4bc8e6;}function withScene(_0x1581c7,_0x1c600b,_0x49b540){const _0x547fc7=a182_0x29f76f;return{..._0x1581c7,'scene':_0x1c600b,..._0x49b540?{'sourceFile':{'fileName':_0x49b540[_0x547fc7(0x1a1)],'filePath':_0x49b540[_0x547fc7(0x19d)]}}:{}};}const ocrRecognize={'service':a182_0x29f76f(0x19f),'command':a182_0x29f76f(0x197),'description':a182_0x29f76f(0x181),'risk':a182_0x29f76f(0x182),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x1aacf6){const _0x543f6f=a182_0x29f76f,_0xf09bcf=normalizeScene(_0x1aacf6[_0x543f6f(0x191)](_0x543f6f(0x174))),_0x5ed17b=SCENE_TO_LEGACY_TYPE[_0xf09bcf],_0x305af1=validateInputSelection(_0x1aacf6);if(_0x305af1[_0x543f6f(0x16f)]){const _0x4627b7=new URLSearchParams({'url':_0x305af1[_0x543f6f(0x16f)],'type':_0x5ed17b,'appCode':_0x1aacf6[_0x543f6f(0x17f)]});return{'method':_0x543f6f(0x19a),'url':'/smartapi/ocr/recognize-text?'+_0x4627b7['toString'](),'description':_0x543f6f(0x180)+_0xf09bcf+_0x543f6f(0x175)};}const _0x161a68=requireDevelopmentUploadFile(_0x305af1[_0x543f6f(0x17c)],_0x543f6f(0x178));return{'method':_0x543f6f(0x17a),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x1aacf6[_0x543f6f(0x17f)],'multipart':{'file':_0x161a68}}},{'method':'POST','url':_0x543f6f(0x19e),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x543f6f(0x19a),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x1aacf6[_0x543f6f(0x17f)],'url':_0x543f6f(0x198),'type':_0x5ed17b}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0xf09bcf+_0x543f6f(0x186)};},async 'execute'(_0x7961d5){const _0x5efb84=a182_0x29f76f,_0x3fd9ae=normalizeScene(_0x7961d5['str']('scene')),_0x51069f=SCENE_TO_LEGACY_TYPE[_0x3fd9ae],_0x142e23=validateInputSelection(_0x7961d5);if(_0x142e23['imageUrl']){const _0x3fad86=await recognizeDevelopmentOcr(_0x7961d5[_0x5efb84(0x17f)],{'url':_0x142e23[_0x5efb84(0x16f)],'type':_0x51069f});return{'ok':!![],'data':withScene(_0x3fad86,_0x3fd9ae)};}const _0x5a43bc=requireDevelopmentUploadFile(_0x142e23['imageFile'],_0x5efb84(0x178)),_0x25953b=await uploadDevelopmentFile(_0x7961d5['appCode'],_0x5a43bc[_0x5efb84(0x17e)]);if(!_0x25953b['filePath'])throw CliErrors[_0x5efb84(0x189)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x5d9091=await queryDevelopmentFileUrl(_0x25953b[_0x5efb84(0x19d)],{'download':![]});if(!_0x5d9091[_0x5efb84(0x176)])throw CliErrors[_0x5efb84(0x189)](_0x5efb84(0x18a));const _0x4716a0=await recognizeDevelopmentOcr(_0x7961d5['appCode'],{'url':_0x5d9091[_0x5efb84(0x176)],'type':_0x51069f});return{'ok':!![],'data':withScene(_0x4716a0,_0x3fd9ae,_0x25953b)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a182_0x1da133=a182_0x27b4;(function(_0x36622a,_0x46ac42){const _0x5a3663=a182_0x27b4,_0x3196a6=_0x36622a();while(!![]){try{const _0x1cb66f=-parseInt(_0x5a3663(0xbd))/0x1+parseInt(_0x5a3663(0xcb))/0x2*(-parseInt(_0x5a3663(0xc3))/0x3)+-parseInt(_0x5a3663(0xd3))/0x4*(parseInt(_0x5a3663(0xb4))/0x5)+parseInt(_0x5a3663(0xbf))/0x6*(-parseInt(_0x5a3663(0xd9))/0x7)+parseInt(_0x5a3663(0xdb))/0x8*(parseInt(_0x5a3663(0xd7))/0x9)+-parseInt(_0x5a3663(0xdc))/0xa*(parseInt(_0x5a3663(0xae))/0xb)+-parseInt(_0x5a3663(0xb3))/0xc*(-parseInt(_0x5a3663(0xe7))/0xd);if(_0x1cb66f===_0x46ac42)break;else _0x3196a6['push'](_0x3196a6['shift']());}catch(_0x463406){_0x3196a6['push'](_0x3196a6['shift']());}}}(a182_0x4ebf,0x79e33));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a182_0x4ebf(){const _0x467ea7=['str','validation','string','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','filePath','imageUrl','scene','351nwPvvY','1089lkLXgp','\x20OCR','/smartapi/common/uploadFile','idcard','GET','1498140kFyYJe','1765XKpZOm','/smartapi/ocr/recognize-text?','IdCard','form','filter','Table','POST','path','.\x20Supported\x20scenes:\x20','74044tyCQzj','length','2952CRsSZh','/smartapi/common/queryFileUrl','General','ocr','14346PoWqpe','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','invoice','idCard','File\x20URL\x20response\x20missing\x20fileUrl.','join','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','general','330jQCELo','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','File\x20upload\x20response\x20missing\x20filePath.','apiError','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','\x20OCR\x20from\x20URL','Unsupported\x20OCR\x20scene:\x20','count','8724iPgObN','trim','recognize','image-file','7227ikGGNK','appCode','9863XJeTXj','Preview:\x20recognize\x20','520YrHgit','60360CHPcvV','image-url','fileUrl','read'];a182_0x4ebf=function(){return _0x467ea7;};return a182_0x4ebf();}const SUPPORTED_SCENES=['invoice',a182_0x1da133(0xca),a182_0x1da133(0xb7),a182_0x1da133(0xc6)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a182_0x1da133(0xc1),'form':a182_0x1da133(0xb9),'idCard':a182_0x1da133(0xb6)},SCENE_FLAG={'name':a182_0x1da133(0xe6),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x1da133(0xc9)},IMAGE_FILE_FLAG={'name':a182_0x1da133(0xd6),'type':a182_0x1da133(0xe2),'description':a182_0x1da133(0xc4)},IMAGE_URL_FLAG={'name':a182_0x1da133(0xdd),'type':a182_0x1da133(0xe2),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function a182_0x27b4(_0x3a89a2,_0x1bdb57){_0x3a89a2=_0x3a89a2-0xae;const _0x4ebf95=a182_0x4ebf();let _0x27b472=_0x4ebf95[_0x3a89a2];return _0x27b472;}function normalizeScene(_0x338ae7){const _0x1264a3=a182_0x1da133,_0x22f208=_0x338ae7[_0x1264a3(0xd4)]()['toLowerCase']();if(_0x22f208===_0x1264a3(0xb1))return _0x1264a3(0xc6);if(_0x22f208===_0x1264a3(0xc5)||_0x22f208===_0x1264a3(0xca)||_0x22f208===_0x1264a3(0xb7))return _0x22f208;throw CliErrors['validation'](_0x1264a3(0xd1)+_0x338ae7+_0x1264a3(0xbc)+SUPPORTED_SCENES[_0x1264a3(0xc8)](',\x20'));}function selectedInputs(_0x2ffae0){const _0x2c7096=a182_0x1da133,_0x26d26e=_0x2ffae0[_0x2c7096(0xe0)](_0x2c7096(0xd6))['trim'](),_0xc73d9=_0x2ffae0[_0x2c7096(0xe0)](_0x2c7096(0xdd))[_0x2c7096(0xd4)]();return{'imageFile':_0x26d26e,'imageUrl':_0xc73d9,'count':[_0x26d26e,_0xc73d9][_0x2c7096(0xb8)](Boolean)[_0x2c7096(0xbe)]};}function validateInputSelection(_0x12ceeb){const _0x44e3cb=a182_0x1da133,_0x8e275f=selectedInputs(_0x12ceeb);if(_0x8e275f[_0x44e3cb(0xd2)]!==0x1)throw CliErrors[_0x44e3cb(0xe1)](_0x44e3cb(0xcc));return _0x8e275f;}function withScene(_0x46f6dd,_0x452529,_0x53c874){const _0x25ab91=a182_0x1da133;return{..._0x46f6dd,'scene':_0x452529,..._0x53c874?{'sourceFile':{'fileName':_0x53c874['fileName'],'filePath':_0x53c874[_0x25ab91(0xe4)]}}:{}};}const ocrRecognize={'service':a182_0x1da133(0xc2),'command':a182_0x1da133(0xd5),'description':a182_0x1da133(0xe3),'risk':a182_0x1da133(0xdf),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x14354f){const _0x10c933=a182_0x1da133,_0x3adc9c=normalizeScene(_0x14354f[_0x10c933(0xe0)]('scene')),_0x36c710=SCENE_TO_LEGACY_TYPE[_0x3adc9c],_0x494eb8=validateInputSelection(_0x14354f);if(_0x494eb8[_0x10c933(0xe5)]){const _0x53e0b1=new URLSearchParams({'url':_0x494eb8[_0x10c933(0xe5)],'type':_0x36c710,'appCode':_0x14354f['appCode']});return{'method':_0x10c933(0xb2),'url':_0x10c933(0xb5)+_0x53e0b1['toString'](),'description':_0x10c933(0xda)+_0x3adc9c+_0x10c933(0xd0)};}const _0x32a0b5=requireDevelopmentUploadFile(_0x494eb8['imageFile'],_0x10c933(0xd6));return{'method':_0x10c933(0xba),'url':_0x10c933(0xb0),'body':{'steps':[{'method':'POST','url':_0x10c933(0xb0),'body':{'appCode':_0x14354f['appCode'],'multipart':{'file':_0x32a0b5}}},{'method':'POST','url':_0x10c933(0xc0),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x10c933(0xb2),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x14354f[_0x10c933(0xd8)],'url':_0x10c933(0xcf),'type':_0x36c710}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x3adc9c+_0x10c933(0xaf)};},async 'execute'(_0x1d439b){const _0x3b143a=a182_0x1da133,_0x12f1a6=normalizeScene(_0x1d439b[_0x3b143a(0xe0)](_0x3b143a(0xe6))),_0x228c8a=SCENE_TO_LEGACY_TYPE[_0x12f1a6],_0x22529b=validateInputSelection(_0x1d439b);if(_0x22529b[_0x3b143a(0xe5)]){const _0x1e6476=await recognizeDevelopmentOcr(_0x1d439b['appCode'],{'url':_0x22529b[_0x3b143a(0xe5)],'type':_0x228c8a});return{'ok':!![],'data':withScene(_0x1e6476,_0x12f1a6)};}const _0x22d83a=requireDevelopmentUploadFile(_0x22529b['imageFile'],'image-file'),_0x1257ad=await uploadDevelopmentFile(_0x1d439b['appCode'],_0x22d83a[_0x3b143a(0xbb)]);if(!_0x1257ad[_0x3b143a(0xe4)])throw CliErrors[_0x3b143a(0xce)](_0x3b143a(0xcd));const _0x2869c4=await queryDevelopmentFileUrl(_0x1257ad[_0x3b143a(0xe4)],{'download':![]});if(!_0x2869c4[_0x3b143a(0xde)])throw CliErrors['apiError'](_0x3b143a(0xc7));const _0x35ab86=await recognizeDevelopmentOcr(_0x1d439b[_0x3b143a(0xd8)],{'url':_0x2869c4[_0x3b143a(0xde)],'type':_0x228c8a});return{'ok':!![],'data':withScene(_0x35ab86,_0x12f1a6,_0x1257ad)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a183_0x2206d8=a183_0x3395;(function(_0x3ea515,_0xe20e6a){const _0x43317a=a183_0x3395,_0x263c30=_0x3ea515();while(!![]){try{const _0x4a897b=-parseInt(_0x43317a(0x9f))/0x1*(-parseInt(_0x43317a(0xa7))/0x2)+parseInt(_0x43317a(0xb1))/0x3*(-parseInt(_0x43317a(0xb2))/0x4)+parseInt(_0x43317a(0xa8))/0x5+parseInt(_0x43317a(0xa0))/0x6*(parseInt(_0x43317a(0xac))/0x7)+parseInt(_0x43317a(0xc4))/0x8*(-parseInt(_0x43317a(0xba))/0x9)+parseInt(_0x43317a(0xcd))/0xa*(-parseInt(_0x43317a(0xe0))/0xb)+parseInt(_0x43317a(0xc3))/0xc;if(_0x4a897b===_0xe20e6a)break;else _0x263c30['push'](_0x263c30['shift']());}catch(_0x474c2d){_0x263c30['push'](_0x263c30['shift']());}}}(a183_0x1a72,0xdf16c));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a183_0x3395(_0xb020f4,_0x5f50ff){_0xb020f4=_0xb020f4-0x9b;const _0x1a72bd=a183_0x1a72();let _0x3395a4=_0x1a72bd[_0xb020f4];return _0x3395a4;}import{fileURLToPath}from'node:url';function a183_0x1a72(){const _0x4294c7=['.json','values','60000xivqTz','../../../templates/custom-pages','name','apiError','POST','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','Invalid\x20Custom\x20Page\x20pattern:\x20','str','Custom_page_','files','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','length','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','version','isInteger','parent-menu-id','write','pageName','/smartapi/webcode/page/create','2607wJvsas','ONEPAGE','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','BLANK','create','toLowerCase','trim','isArray','1321049HaYnDX','12QCDqgl','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','parentMenuId','compress','page-dir','pageName\x20cannot\x20exceed\x20100\x20characters.','pageId','2jPZeSH','6827130jAmaLf','DASHBOARD','number','parse','110243OqAMPj','utf8','some','object','validation','231LkZYPC','3324DoTnPf','page-content','stringify','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','keys','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','4401qesZpx','menuPath','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page','\x20and\x20its\x20menu\x20entry.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','CUSTOM','page-pattern','4220592GhwvFF','10960yoHEPm','Would\x20create\x20Custom\x20Page\x20','page\x20create\x20does\x20not\x20accept\x20--page-type.','page.create','createMenu','string','appCode'];a183_0x1a72=function(){return _0x4294c7;};return a183_0x1a72();}import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x2206d8(0xe3),a183_0x2206d8(0xe1),a183_0x2206d8(0xa9)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a183_0x2206d8(0xce));export const pageCreate={'service':a183_0x2206d8(0xbd),'command':a183_0x2206d8(0x9b),'description':a183_0x2206d8(0xa1),'risk':a183_0x2206d8(0xdd),'defaultOutputFormat':a183_0x2206d8(0xa3),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a183_0x2206d8(0xc6),'hint':a183_0x2206d8(0xb8)},{'name':a183_0x2206d8(0xb3),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a183_0x2206d8(0xd7)}],'flags':[{'name':'name','type':a183_0x2206d8(0xc9),'description':a183_0x2206d8(0xd9)},{'name':a183_0x2206d8(0xdc),'type':a183_0x2206d8(0xaa),'description':a183_0x2206d8(0xbc)},{'name':a183_0x2206d8(0xc2),'type':'string','description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x2206d8(0xa4),'type':a183_0x2206d8(0xc9),'description':a183_0x2206d8(0xd2)},APPCODE_FLAG],async 'validate'(_0x992715){await readValidatedPageSource(_0x992715);},async 'dryRun'(_0x2f8216){const _0x2b6e97=a183_0x2206d8,_0x15d353=readInput(_0x2f8216,await readValidatedPageSource(_0x2f8216));return{'method':_0x2b6e97(0xd1),'url':_0x2b6e97(0xdf),'body':{'appCode':_0x15d353['appCode'],'pageName':_0x15d353[_0x2b6e97(0xde)],..._0x15d353[_0x2b6e97(0xa2)]!=null?{'parentMenuId':_0x15d353[_0x2b6e97(0xa2)]}:{},'createMenu':_0x15d353[_0x2b6e97(0xc8)],'codeContent':_0x15d353[_0x2b6e97(0xd6)]},'description':_0x2b6e97(0xc5)+JSON[_0x2b6e97(0xb4)](_0x15d353[_0x2b6e97(0xde)])+_0x2b6e97(0xbe)};},async 'execute'(_0x1c737d){const _0x32279a=a183_0x2206d8,_0x4b81ac=readInput(_0x1c737d,await readValidatedPageSource(_0x1c737d)),_0x5a599d=await createCustomPage(_0x4b81ac);if(!Number[_0x32279a(0xdb)](_0x5a599d[_0x32279a(0xa6)])||_0x5a599d[_0x32279a(0xa6)]<=0x0)throw CliErrors[_0x32279a(0xd0)](_0x32279a(0xb7));const _0x5af446=buildCustomPageDevelopmentUrl(_0x4b81ac[_0x32279a(0xca)],_0x5a599d[_0x32279a(0xbb)]),_0x2ceabf=buildCustomPageEditUrl(_0x4b81ac[_0x32279a(0xca)],_0x5a599d[_0x32279a(0xa6)]);return{'ok':!![],'data':{'operation':_0x32279a(0xc7),'pageType':_0x32279a(0xc1),'pagePattern':readPagePattern(_0x1c737d),'selector':{'appCode':_0x4b81ac[_0x32279a(0xca)],'pageName':_0x4b81ac['pageName']},'before':null,'after':{'pageId':_0x5a599d[_0x32279a(0xa6)],'pageName':_0x5a599d[_0x32279a(0xde)],'appCode':_0x5a599d['appCode'],'version':_0x5a599d[_0x32279a(0xda)],'menuId':_0x5a599d['menuId'],'menuPath':_0x5a599d[_0x32279a(0xbb)],'files':_0x5a599d['files']??Object['keys'](_0x4b81ac[_0x32279a(0xd6)])},'dryRun':![],'request':_0x4b81ac,..._0x5af446?{'pageUrl':_0x5af446}:{},..._0x2ceabf?{'editPageUrl':_0x2ceabf}:{},'warnings':_0x5af446?[]:[_0x32279a(0xb5)]},'message':'Created\x20Custom\x20Page\x20'+_0x5a599d[_0x32279a(0xa6)]+'.'};}};function readPagePattern(_0x1f8b19){const _0x5dc75f=a183_0x2206d8,_0x2b64d3=_0x1f8b19[_0x5dc75f(0xd4)](_0x5dc75f(0xc2))[_0x5dc75f(0x9d)](),_0xe78688=_0x1f8b19[_0x5dc75f(0xd4)](_0x5dc75f(0xa4))['trim']();if(_0x2b64d3&&_0xe78688)throw CliErrors['validation'](_0x5dc75f(0xbf));if(_0xe78688)return null;if(!_0x2b64d3)throw CliErrors[_0x5dc75f(0xb0)](_0x5dc75f(0xb9));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x2b64d3))throw CliErrors[_0x5dc75f(0xb0)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x2b64d3;}async function readPageSource(_0x176354){const _0x4acac9=a183_0x2206d8,_0x513352=_0x176354['str'](_0x4acac9(0xa4))[_0x4acac9(0x9d)](),_0x4947df=readPagePattern(_0x176354);if(_0x4947df===null){const _0x5b40b9=await readCustomPageDirectory(_0x513352);if(Object[_0x4acac9(0xb6)](_0x5b40b9)['length']===0x0)throw CliErrors[_0x4acac9(0xb0)](_0x4acac9(0xe2));return _0x5b40b9;}let _0xa0e52;try{_0xa0e52=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x4947df[_0x4acac9(0x9c)]()+_0x4acac9(0xcb)),_0x4acac9(0xad));}catch{throw CliErrors[_0x4acac9(0xb0)]('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x4947df+'.');}let _0x128ce4;try{_0x128ce4=JSON[_0x4acac9(0xab)](_0xa0e52);}catch{throw CliErrors['validation'](_0x4acac9(0xd3)+_0x4947df+'.');}if(!_0x128ce4||typeof _0x128ce4!==_0x4acac9(0xaf)||Array[_0x4acac9(0x9e)](_0x128ce4)||Object[_0x4acac9(0xcc)](_0x128ce4)[_0x4acac9(0xae)](_0x159036=>typeof _0x159036!==_0x4acac9(0xc9)))throw CliErrors['validation'](_0x4acac9(0xd3)+_0x4947df+'.');return _0x128ce4;}async function readValidatedPageSource(_0xe9ebd3){const _0x570034=await readPageSource(_0xe9ebd3);return await validateCustomPageContent(_0x570034),_0x570034;}function readInput(_0x5cc2f7,_0x5c4bff){const _0x250409=a183_0x2206d8,_0x33fb12=_0x5cc2f7[_0x250409(0xd4)](_0x250409(0xcf))[_0x250409(0x9d)]()||_0x250409(0xd5)+Date['now']();if(_0x33fb12[_0x250409(0xd8)]>0x64)throw CliErrors[_0x250409(0xb0)](_0x250409(0xa5));const _0x302296=_0x5cc2f7['num']('parent-menu-id',NaN),_0x20888c=!Number['isNaN'](_0x302296);if(_0x20888c&&(!Number['isInteger'](_0x302296)||_0x302296<=0x0))throw CliErrors[_0x250409(0xb0)](_0x250409(0xc0));return{'appCode':_0x5cc2f7['appCode'],'pageName':_0x33fb12,..._0x20888c?{'parentMenuId':_0x302296}:{},'createMenu':!![],'files':_0x5c4bff};}
1
+ const a183_0x2b4cd9=a183_0x3d2e;(function(_0x36cb23,_0x2939ef){const _0x45e966=a183_0x3d2e,_0x35f503=_0x36cb23();while(!![]){try{const _0x4347f3=-parseInt(_0x45e966(0x197))/0x1+-parseInt(_0x45e966(0x177))/0x2*(-parseInt(_0x45e966(0x160))/0x3)+-parseInt(_0x45e966(0x16b))/0x4*(-parseInt(_0x45e966(0x196))/0x5)+parseInt(_0x45e966(0x1a0))/0x6+-parseInt(_0x45e966(0x182))/0x7*(parseInt(_0x45e966(0x15d))/0x8)+-parseInt(_0x45e966(0x188))/0x9*(-parseInt(_0x45e966(0x169))/0xa)+-parseInt(_0x45e966(0x198))/0xb*(parseInt(_0x45e966(0x181))/0xc);if(_0x4347f3===_0x2939ef)break;else _0x35f503['push'](_0x35f503['shift']());}catch(_0x11b3a5){_0x35f503['push'](_0x35f503['shift']());}}}(a183_0x36c8,0x58eb7));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';function a183_0x3d2e(_0x48e1f3,_0x113e61){_0x48e1f3=_0x48e1f3-0x15c;const _0x36c850=a183_0x36c8();let _0x3d2ebc=_0x36c850[_0x48e1f3];return _0x3d2ebc;}import{readCustomPageDirectory}from'../../core/page/file-system.js';function a183_0x36c8(){const _0x2701f6=['page.create','parse','\x20and\x20its\x20menu\x20entry.','string','compress','Custom_page_','.json','350772SCGgZX','7QCKWPd','keys','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','num','trim','validation','77166WRkKbN','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','page-pattern','CUSTOM','name','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','Custom\x20Page\x20pattern\x20not\x20found:\x20','toLowerCase','length','isArray','BLANK','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','includes','now','35mbqhxA','144789xLbyFm','242UaDzcp','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','str','isInteger','write','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','page\x20create\x20does\x20not\x20accept\x20--page-type.','Would\x20create\x20Custom\x20Page\x20','1986954mZvwFh','createMenu','menuId','Created\x20Custom\x20Page\x20','3790664HfccNs','/smartapi/webcode/page/create','values','11112zGpkuY','number','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','stringify','page-type','pageId','page-dir','menuPath','790njYFkM','pageName','86120ZMQkah','../../../templates/custom-pages','DASHBOARD','parentMenuId','ONEPAGE','appCode','files','some','POST','utf8','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','Invalid\x20Custom\x20Page\x20pattern:\x20','252PyqoUL','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page'];a183_0x36c8=function(){return _0x2701f6;};return a183_0x36c8();}import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x2b4cd9(0x192),a183_0x2b4cd9(0x16f),a183_0x2b4cd9(0x16d)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a183_0x2b4cd9(0x16c));export const pageCreate={'service':a183_0x2b4cd9(0x179),'command':'create','description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a183_0x2b4cd9(0x19c),'defaultOutputFormat':a183_0x2b4cd9(0x17e),'structuredErrors':!![],'rejectedFlags':[{'name':a183_0x2b4cd9(0x165),'message':a183_0x2b4cd9(0x19e),'hint':a183_0x2b4cd9(0x162)},{'name':'page-content','message':a183_0x2b4cd9(0x19d),'hint':a183_0x2b4cd9(0x175)}],'flags':[{'name':a183_0x2b4cd9(0x18c),'type':a183_0x2b4cd9(0x17d),'description':a183_0x2b4cd9(0x193)},{'name':'parent-menu-id','type':a183_0x2b4cd9(0x161),'description':a183_0x2b4cd9(0x178)},{'name':a183_0x2b4cd9(0x18a),'type':a183_0x2b4cd9(0x17d),'description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x2b4cd9(0x167),'type':a183_0x2b4cd9(0x17d),'description':a183_0x2b4cd9(0x163)},APPCODE_FLAG],async 'validate'(_0x3aeeb1){await readValidatedPageSource(_0x3aeeb1);},async 'dryRun'(_0x52aa7b){const _0x19ecf6=a183_0x2b4cd9,_0x500b85=readInput(_0x52aa7b,await readValidatedPageSource(_0x52aa7b));return{'method':_0x19ecf6(0x173),'url':_0x19ecf6(0x15e),'body':{'appCode':_0x500b85[_0x19ecf6(0x170)],'pageName':_0x500b85[_0x19ecf6(0x16a)],..._0x500b85[_0x19ecf6(0x16e)]!=null?{'parentMenuId':_0x500b85[_0x19ecf6(0x16e)]}:{},'createMenu':_0x500b85[_0x19ecf6(0x1a1)],'codeContent':_0x500b85[_0x19ecf6(0x171)]},'description':_0x19ecf6(0x19f)+JSON[_0x19ecf6(0x164)](_0x500b85[_0x19ecf6(0x16a)])+_0x19ecf6(0x17c)};},async 'execute'(_0x4620bf){const _0x18ffde=a183_0x2b4cd9,_0x3ab9d5=readInput(_0x4620bf,await readValidatedPageSource(_0x4620bf)),_0x1b7f48=await createCustomPage(_0x3ab9d5);if(!Number[_0x18ffde(0x19b)](_0x1b7f48[_0x18ffde(0x166)])||_0x1b7f48[_0x18ffde(0x166)]<=0x0)throw CliErrors['apiError']('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x2e1170=buildCustomPageDevelopmentUrl(_0x3ab9d5[_0x18ffde(0x170)],_0x1b7f48[_0x18ffde(0x168)]),_0x5a6cf1=buildCustomPageEditUrl(_0x3ab9d5[_0x18ffde(0x170)],_0x1b7f48[_0x18ffde(0x166)]);return{'ok':!![],'data':{'operation':_0x18ffde(0x17a),'pageType':_0x18ffde(0x18b),'pagePattern':readPagePattern(_0x4620bf),'selector':{'appCode':_0x3ab9d5[_0x18ffde(0x170)],'pageName':_0x3ab9d5['pageName']},'before':null,'after':{'pageId':_0x1b7f48[_0x18ffde(0x166)],'pageName':_0x1b7f48[_0x18ffde(0x16a)],'appCode':_0x1b7f48[_0x18ffde(0x170)],'version':_0x1b7f48['version'],'menuId':_0x1b7f48[_0x18ffde(0x1a2)],'menuPath':_0x1b7f48['menuPath'],'files':_0x1b7f48[_0x18ffde(0x171)]??Object[_0x18ffde(0x183)](_0x3ab9d5[_0x18ffde(0x171)])},'dryRun':![],'request':_0x3ab9d5,..._0x2e1170?{'pageUrl':_0x2e1170}:{},..._0x5a6cf1?{'editPageUrl':_0x5a6cf1}:{},'warnings':_0x2e1170?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x18ffde(0x15c)+_0x1b7f48['pageId']+'.'};}};function readPagePattern(_0xb9b12b){const _0x1d60e2=a183_0x2b4cd9,_0x594c17=_0xb9b12b[_0x1d60e2(0x19a)](_0x1d60e2(0x18a))[_0x1d60e2(0x186)](),_0x79320f=_0xb9b12b[_0x1d60e2(0x19a)]('page-dir')[_0x1d60e2(0x186)]();if(_0x594c17&&_0x79320f)throw CliErrors[_0x1d60e2(0x187)](_0x1d60e2(0x189));if(_0x79320f)return null;if(!_0x594c17)throw CliErrors[_0x1d60e2(0x187)](_0x1d60e2(0x199));if(!CUSTOM_PAGE_PATTERNS[_0x1d60e2(0x194)](_0x594c17))throw CliErrors[_0x1d60e2(0x187)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x594c17;}async function readPageSource(_0x3c2ac7){const _0x2236d0=a183_0x2b4cd9,_0x524eae=_0x3c2ac7[_0x2236d0(0x19a)](_0x2236d0(0x167))[_0x2236d0(0x186)](),_0x465ed3=readPagePattern(_0x3c2ac7);if(_0x465ed3===null){const _0x159720=await readCustomPageDirectory(_0x524eae);if(Object[_0x2236d0(0x183)](_0x159720)[_0x2236d0(0x190)]===0x0)throw CliErrors[_0x2236d0(0x187)](_0x2236d0(0x184));return _0x159720;}let _0x1c2211;try{_0x1c2211=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x465ed3[_0x2236d0(0x18f)]()+_0x2236d0(0x180)),_0x2236d0(0x174));}catch{throw CliErrors['validation'](_0x2236d0(0x18e)+_0x465ed3+'.');}let _0x50c570;try{_0x50c570=JSON[_0x2236d0(0x17b)](_0x1c2211);}catch{throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x465ed3+'.');}if(!_0x50c570||typeof _0x50c570!=='object'||Array[_0x2236d0(0x191)](_0x50c570)||Object[_0x2236d0(0x15f)](_0x50c570)[_0x2236d0(0x172)](_0x383ea3=>typeof _0x383ea3!==_0x2236d0(0x17d)))throw CliErrors[_0x2236d0(0x187)](_0x2236d0(0x176)+_0x465ed3+'.');return _0x50c570;}async function readValidatedPageSource(_0x42640a){const _0x15885c=await readPageSource(_0x42640a);return await validateCustomPageContent(_0x15885c),_0x15885c;}function readInput(_0x363858,_0x4225a6){const _0x46765b=a183_0x2b4cd9,_0x10dc74=_0x363858['str']('name')['trim']()||_0x46765b(0x17f)+Date[_0x46765b(0x195)]();if(_0x10dc74[_0x46765b(0x190)]>0x64)throw CliErrors[_0x46765b(0x187)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x4945e6=_0x363858[_0x46765b(0x185)]('parent-menu-id',NaN),_0x296dab=!Number['isNaN'](_0x4945e6);if(_0x296dab&&(!Number[_0x46765b(0x19b)](_0x4945e6)||_0x4945e6<=0x0))throw CliErrors[_0x46765b(0x187)](_0x46765b(0x18d));return{'appCode':_0x363858[_0x46765b(0x170)],'pageName':_0x10dc74,..._0x296dab?{'parentMenuId':_0x4945e6}:{},'createMenu':!![],'files':_0x4225a6};}
@@ -1 +1 @@
1
- function a184_0x35ab(){const _0x219b1b=['padStart','Custom\x20Page\x20ID','str','getFullYear','221798cPRfFo','join','number','5531364OAickR','1786036biDpJC','custom-detail','trim','Retrieved\x20Custom\x20Page\x20','getHours','getMinutes','read','151036PlNSaw','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','2098525SquOKk','getMonth','getSeconds','getTime','7770104EIXuGJ','appCode','7150850eRDblY','6ZJzTCz','page','20erwqph','pageCode','57IyMAHG','compress'];a184_0x35ab=function(){return _0x219b1b;};return a184_0x35ab();}const a184_0xd3fda0=a184_0x24c0;(function(_0xea4ec9,_0x190c1d){const _0x16d5fc=a184_0x24c0,_0x6fd150=_0xea4ec9();while(!![]){try{const _0x54fcb7=-parseInt(_0x16d5fc(0x1de))/0x1+-parseInt(_0x16d5fc(0x1e2))/0x2+parseInt(_0x16d5fc(0x1d8))/0x3*(parseInt(_0x16d5fc(0x1e9))/0x4)+parseInt(_0x16d5fc(0x1cd))/0x5+-parseInt(_0x16d5fc(0x1d4))/0x6*(-parseInt(_0x16d5fc(0x1d3))/0x7)+parseInt(_0x16d5fc(0x1d1))/0x8+parseInt(_0x16d5fc(0x1e1))/0x9*(-parseInt(_0x16d5fc(0x1d6))/0xa);if(_0x54fcb7===_0x190c1d)break;else _0x6fd150['push'](_0x6fd150['shift']());}catch(_0x40d1b4){_0x6fd150['push'](_0x6fd150['shift']());}}}(a184_0x35ab,0xbfe0b));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a184_0x24c0(_0x355d34,_0x112546){_0x355d34=_0x355d34-0x1cd;const _0x35ab7f=a184_0x35ab();let _0x24c087=_0x35ab7f[_0x355d34];return _0x24c087;}export const pageCustomDetail={'service':a184_0xd3fda0(0x1d5),'command':a184_0xd3fda0(0x1e3),'description':a184_0xd3fda0(0x1ea),'risk':a184_0xd3fda0(0x1e8),'defaultOutputFormat':a184_0xd3fda0(0x1d9),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0xd3fda0(0x1e0),'required':!![],'description':a184_0xd3fda0(0x1db)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4f1d50){readCustomPageId(_0x4f1d50);},async 'execute'(_0xc8c99f){const _0x455e8b=a184_0xd3fda0,_0x3dcf95=readCustomPageId(_0xc8c99f),_0x1e09f3=await getCustomPageSource(_0x3dcf95),{bundle:_0x47645f,createTime:_0x5404a6,updateTime:_0x3c0c70,..._0x9735ab}=_0x1e09f3,_0x521513=_0x1e09f3['id']??_0x3dcf95,_0x340ea7=_0x1e09f3[_0x455e8b(0x1d2)]?.[_0x455e8b(0x1e4)]()||_0xc8c99f[_0x455e8b(0x1dc)]('appcode')[_0x455e8b(0x1e4)](),_0xd40492=buildCustomPageRuntimeUrl(_0x340ea7,_0x1e09f3[_0x455e8b(0x1d7)]),_0x3796e8=buildCustomPageEditUrl(_0x340ea7,_0x521513),_0x5f3b8a=await resolveCustomPageDevelopmentUrl(_0x340ea7,_0x521513,_0xc8c99f['cookie']);return{'ok':!![],'data':{..._0x9735ab,..._0xd40492?{'runtimePageUrl':_0xd40492}:{},..._0x5f3b8a?{'pageUrl':_0x5f3b8a}:{},..._0x3796e8?{'editPageUrl':_0x3796e8}:{},..._0x5404a6==null?{}:{'createTime':formatTime(_0x5404a6)},..._0x3c0c70==null?{}:{'updateTime':formatTime(_0x3c0c70)}},'message':_0x455e8b(0x1e5)+_0x3dcf95+'.'};}};function formatTime(_0x41de54){const _0x5e704a=a184_0xd3fda0,_0x2bdd99=new Date(_0x41de54);if(Number['isNaN'](_0x2bdd99[_0x5e704a(0x1d0)]()))return String(_0x41de54);const _0x3b6e03=[_0x2bdd99[_0x5e704a(0x1dd)](),String(_0x2bdd99[_0x5e704a(0x1ce)]()+0x1)[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99['getDate']())[_0x5e704a(0x1da)](0x2,'0')][_0x5e704a(0x1df)]('-'),_0x4830b0=[String(_0x2bdd99[_0x5e704a(0x1e6)]())[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99[_0x5e704a(0x1e7)]())[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99[_0x5e704a(0x1cf)]())[_0x5e704a(0x1da)](0x2,'0')][_0x5e704a(0x1df)](':');return _0x3b6e03+'\x20'+_0x4830b0;}
1
+ function a184_0x5da1(_0x1c524d,_0x1fcd03){_0x1c524d=_0x1c524d-0x199;const _0x5e91c9=a184_0x5e91();let _0x5da1d3=_0x5e91c9[_0x1c524d];return _0x5da1d3;}const a184_0xe448b1=a184_0x5da1;function a184_0x5e91(){const _0xdeea96=['2391168BCxaiA','Retrieved\x20Custom\x20Page\x20','getMinutes','63090NzLmNB','appcode','7FFYqSX','1513864CbbKgE','read','getHours','appCode','721076HOENhP','getMonth','5285958unmcIT','cookie','getFullYear','pageCode','443936cGuHGL','getTime','page','trim','padStart','compress','5096585gKYCsE','2VnDwSg','join','Custom\x20Page\x20ID'];a184_0x5e91=function(){return _0xdeea96;};return a184_0x5e91();}(function(_0x1347b8,_0x322c30){const _0x4f69f0=a184_0x5da1,_0x377920=_0x1347b8();while(!![]){try{const _0x3bffdb=-parseInt(_0x4f69f0(0x1af))/0x1*(parseInt(_0x4f69f0(0x1a2))/0x2)+-parseInt(_0x4f69f0(0x1a5))/0x3+parseInt(_0x4f69f0(0x1ab))/0x4+parseInt(_0x4f69f0(0x1a1))/0x5+-parseInt(_0x4f69f0(0x1b1))/0x6*(-parseInt(_0x4f69f0(0x1aa))/0x7)+-parseInt(_0x4f69f0(0x19b))/0x8+parseInt(_0x4f69f0(0x1a8))/0x9;if(_0x3bffdb===_0x322c30)break;else _0x377920['push'](_0x377920['shift']());}catch(_0xe9dd33){_0x377920['push'](_0x377920['shift']());}}}(a184_0x5e91,0xadde2));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a184_0xe448b1(0x19d),'command':'custom-detail','description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a184_0xe448b1(0x1ac),'defaultOutputFormat':a184_0xe448b1(0x1a0),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a184_0xe448b1(0x1a4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x58bc71){readCustomPageId(_0x58bc71);},async 'execute'(_0x195f57){const _0x72db71=a184_0xe448b1,_0x55f0b1=readCustomPageId(_0x195f57),_0x5a699f=await getCustomPageSource(_0x55f0b1),{bundle:_0x49d9cc,createTime:_0x152fc6,updateTime:_0x483c23,..._0x52caa6}=_0x5a699f,_0xefd2b9=_0x5a699f['id']??_0x55f0b1,_0x113f02=_0x5a699f[_0x72db71(0x1ae)]?.[_0x72db71(0x19e)]()||_0x195f57['str'](_0x72db71(0x1a9))[_0x72db71(0x19e)](),_0x278566=buildCustomPageRuntimeUrl(_0x113f02,_0x5a699f[_0x72db71(0x19a)]),_0x5e8f7b=buildCustomPageEditUrl(_0x113f02,_0xefd2b9),_0x2de902=await resolveCustomPageDevelopmentUrl(_0x113f02,_0xefd2b9,_0x195f57[_0x72db71(0x1b2)]);return{'ok':!![],'data':{..._0x52caa6,..._0x278566?{'runtimePageUrl':_0x278566}:{},..._0x2de902?{'pageUrl':_0x2de902}:{},..._0x5e8f7b?{'editPageUrl':_0x5e8f7b}:{},..._0x152fc6==null?{}:{'createTime':formatTime(_0x152fc6)},..._0x483c23==null?{}:{'updateTime':formatTime(_0x483c23)}},'message':_0x72db71(0x1a6)+_0x55f0b1+'.'};}};function formatTime(_0x52f3e7){const _0xa13798=a184_0xe448b1,_0x27cf5c=new Date(_0x52f3e7);if(Number['isNaN'](_0x27cf5c[_0xa13798(0x19c)]()))return String(_0x52f3e7);const _0x3d73b3=[_0x27cf5c[_0xa13798(0x199)](),String(_0x27cf5c[_0xa13798(0x1b0)]()+0x1)[_0xa13798(0x19f)](0x2,'0'),String(_0x27cf5c['getDate']())[_0xa13798(0x19f)](0x2,'0')]['join']('-'),_0x2da809=[String(_0x27cf5c[_0xa13798(0x1ad)]())[_0xa13798(0x19f)](0x2,'0'),String(_0x27cf5c[_0xa13798(0x1a7)]())[_0xa13798(0x19f)](0x2,'0'),String(_0x27cf5c['getSeconds']())[_0xa13798(0x19f)](0x2,'0')][_0xa13798(0x1a3)](':');return _0x3d73b3+'\x20'+_0x2da809;}
@@ -1 +1 @@
1
- const a185_0x17754c=a185_0x23b8;(function(_0x2ba099,_0x532eee){const _0x5e0e16=a185_0x23b8,_0x15a57c=_0x2ba099();while(!![]){try{const _0x1ec716=parseInt(_0x5e0e16(0x1e0))/0x1*(-parseInt(_0x5e0e16(0x1d1))/0x2)+parseInt(_0x5e0e16(0x1d0))/0x3+-parseInt(_0x5e0e16(0x1cd))/0x4*(parseInt(_0x5e0e16(0x1e2))/0x5)+-parseInt(_0x5e0e16(0x1db))/0x6*(parseInt(_0x5e0e16(0x1dd))/0x7)+parseInt(_0x5e0e16(0x1d9))/0x8*(-parseInt(_0x5e0e16(0x1df))/0x9)+-parseInt(_0x5e0e16(0x1d8))/0xa+parseInt(_0x5e0e16(0x1dc))/0xb;if(_0x1ec716===_0x532eee)break;else _0x15a57c['push'](_0x15a57c['shift']());}catch(_0x1ed132){_0x15a57c['push'](_0x15a57c['shift']());}}}(a185_0x5ca2,0xced63));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';function a185_0x23b8(_0xe5fe6b,_0x283d0e){_0xe5fe6b=_0xe5fe6b-0x1cd;const _0x5ca23c=a185_0x5ca2();let _0x23b855=_0x5ca23c[_0xe5fe6b];return _0x23b855;}export const pageCustomList={'service':a185_0x17754c(0x1cf),'command':'custom-list','description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a185_0x17754c(0x1ce),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1aa409){const _0x392c6d=a185_0x17754c,_0x1f9b05=(await fetchMenuSnapshot(_0x1aa409[_0x392c6d(0x1d5)],_0x1aa409['cookie']))['menus']['flatMap'](_0x3660fa=>{const _0x106fd7=_0x392c6d;if(_0x3660fa[_0x106fd7(0x1d4)]!=='react'||_0x3660fa['pageId']==null)return[];const _0x428752=buildCustomPageDevelopmentUrl(_0x1aa409[_0x106fd7(0x1d5)],_0x3660fa[_0x106fd7(0x1d6)]),_0x2a3a4c=buildCustomPageEditUrl(_0x1aa409[_0x106fd7(0x1d5)],_0x3660fa[_0x106fd7(0x1d7)]);return[{'pageId':_0x3660fa[_0x106fd7(0x1d7)],'label':_0x3660fa[_0x106fd7(0x1de)],..._0x428752?{'pageUrl':_0x428752}:{},..._0x2a3a4c?{'editPageUrl':_0x2a3a4c}:{}}];});return{'ok':!![],'data':{'pages':_0x1f9b05},'message':_0x1f9b05[_0x392c6d(0x1d2)]===0x0?_0x392c6d(0x1e1):_0x392c6d(0x1d3)+_0x1f9b05['length']+_0x392c6d(0x1da)};}};function a185_0x5ca2(){const _0x19589e=['63700KDtdUB','read','page','5010399fJLNIM','4AjVGBD','length','Found\x20','type','appCode','path','pageId','7677910VygtPE','1681232kaqtqu','\x20Custom\x20Page(s).','2010tsewHk','20715266rKYZEK','6706kWwPDk','label','9TXNqjJ','42743DcLIkE','No\x20Custom\x20Pages\x20found.','415gJjcew'];a185_0x5ca2=function(){return _0x19589e;};return a185_0x5ca2();}
1
+ const a185_0x2f5fd7=a185_0x38af;(function(_0x2920e4,_0x26dd34){const _0x189e20=a185_0x38af,_0x2db11c=_0x2920e4();while(!![]){try{const _0x1b9614=parseInt(_0x189e20(0x18b))/0x1*(-parseInt(_0x189e20(0x192))/0x2)+-parseInt(_0x189e20(0x183))/0x3*(parseInt(_0x189e20(0x197))/0x4)+-parseInt(_0x189e20(0x193))/0x5*(parseInt(_0x189e20(0x195))/0x6)+parseInt(_0x189e20(0x199))/0x7*(parseInt(_0x189e20(0x19b))/0x8)+parseInt(_0x189e20(0x189))/0x9+parseInt(_0x189e20(0x191))/0xa+-parseInt(_0x189e20(0x19c))/0xb*(-parseInt(_0x189e20(0x188))/0xc);if(_0x1b9614===_0x26dd34)break;else _0x2db11c['push'](_0x2db11c['shift']());}catch(_0x5e796f){_0x2db11c['push'](_0x2db11c['shift']());}}}(a185_0x60d3,0x38deb));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a185_0x38af(_0x20c7bf,_0x3deeae){_0x20c7bf=_0x20c7bf-0x183;const _0x60d3a=a185_0x60d3();let _0x38af2a=_0x60d3a[_0x20c7bf];return _0x38af2a;}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a185_0x60d3(){const _0x290eb2=['compress','flatMap','appCode','239208ZCzBwV','3442716jAcbPY','page','38evZFft','react','type','Found\x20','length','\x20Custom\x20Page(s).','557490qoEPpc','17506NLqnNg','585gFWQBi','pageId','11406IJGEOl','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','288724rlqBtG','cookie','14qfOfkr','path','491472TkLnny','165XmCQot','3OrLnsf','custom-list'];a185_0x60d3=function(){return _0x290eb2;};return a185_0x60d3();}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a185_0x2f5fd7(0x18a),'command':a185_0x2f5fd7(0x184),'description':a185_0x2f5fd7(0x196),'risk':'read','defaultOutputFormat':a185_0x2f5fd7(0x185),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2372d9){const _0x19d24f=a185_0x2f5fd7,_0x554db9=(await fetchMenuSnapshot(_0x2372d9[_0x19d24f(0x187)],_0x2372d9[_0x19d24f(0x198)]))['menus'][_0x19d24f(0x186)](_0x5e098b=>{const _0x573c09=_0x19d24f;if(_0x5e098b[_0x573c09(0x18d)]!==_0x573c09(0x18c)||_0x5e098b['pageId']==null)return[];const _0x10dd29=buildCustomPageDevelopmentUrl(_0x2372d9[_0x573c09(0x187)],_0x5e098b[_0x573c09(0x19a)]),_0x3d5f83=buildCustomPageEditUrl(_0x2372d9['appCode'],_0x5e098b[_0x573c09(0x194)]);return[{'pageId':_0x5e098b[_0x573c09(0x194)],'label':_0x5e098b['label'],..._0x10dd29?{'pageUrl':_0x10dd29}:{},..._0x3d5f83?{'editPageUrl':_0x3d5f83}:{}}];});return{'ok':!![],'data':{'pages':_0x554db9},'message':_0x554db9['length']===0x0?'No\x20Custom\x20Pages\x20found.':_0x19d24f(0x18e)+_0x554db9[_0x19d24f(0x18f)]+_0x19d24f(0x190)};}};
@@ -1 +1 @@
1
- const a186_0x6e1bd6=a186_0x2e40;function a186_0x766c(){const _0x265adf=['2729988dTWEOg','appCode','121WxrWCW','status','trim','FORMAL','string','unknown','14aIvSva','number','148270GyqBZg','1113354jBmrjQ','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','remark','Published\x20Custom\x20Page\x20','2086860Mcjlof','531820neyRCx','apiError','1368490gYdtmS','Optional\x20publish\x20remark','isInteger','84vNFMtU','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','Custom\x20Page\x20ID','2EoaXaY','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','custom-publish','write','pageId','compress','pageCode','POST','2057384rCqYjF','runtimePageUrl','page.custom-publish','warnings'];a186_0x766c=function(){return _0x265adf;};return a186_0x766c();}(function(_0x2acee7,_0x44a7d9){const _0x22f0a6=a186_0x2e40,_0x13a45c=_0x2acee7();while(!![]){try{const _0x208c2c=parseInt(_0x22f0a6(0xa1))/0x1*(-parseInt(_0x22f0a6(0xa9))/0x2)+-parseInt(_0x22f0a6(0xa0))/0x3+-parseInt(_0x22f0a6(0xb5))/0x4+-parseInt(_0x22f0a6(0x9b))/0x5*(-parseInt(_0x22f0a6(0xa6))/0x6)+parseInt(_0x22f0a6(0xbd))/0x7*(parseInt(_0x22f0a6(0xb1))/0x8)+-parseInt(_0x22f0a6(0x9c))/0x9+parseInt(_0x22f0a6(0xa3))/0xa*(parseInt(_0x22f0a6(0xb7))/0xb);if(_0x208c2c===_0x44a7d9)break;else _0x13a45c['push'](_0x13a45c['shift']());}catch(_0x4a80c6){_0x13a45c['push'](_0x13a45c['shift']());}}}(a186_0x766c,0x61f2e));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a186_0x2e40(_0x4e6b6b,_0xf07d0a){_0x4e6b6b=_0x4e6b6b-0x9b;const _0x766ce9=a186_0x766c();let _0x2e407d=_0x766ce9[_0x4e6b6b];return _0x2e407d;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':'page','command':a186_0x6e1bd6(0xab),'description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a186_0x6e1bd6(0xac),'defaultOutputFormat':a186_0x6e1bd6(0xae),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0x6e1bd6(0xbe),'required':!![],'description':a186_0x6e1bd6(0xa8)},{'name':a186_0x6e1bd6(0x9e),'type':a186_0x6e1bd6(0xbb),'description':a186_0x6e1bd6(0xa4)}],async 'validate'(_0xc58c1){readCustomPageId(_0xc58c1);},async 'dryRun'(_0x4a44bc){const _0x230952=a186_0x6e1bd6,_0x5e930a=readInput(_0x4a44bc);return{'method':_0x230952(0xb0),'url':'/smartapi/webcode/file/publish','body':{'id':_0x5e930a['pageId'],..._0x5e930a[_0x230952(0x9e)]?{'remark':_0x5e930a[_0x230952(0x9e)]}:{}},'description':'Would\x20publish\x20Custom\x20Page\x20'+_0x5e930a['pageId']+'.'};},async 'execute'(_0x4ef0c5){const _0x4076b7=a186_0x6e1bd6,_0x9e36da=readInput(_0x4ef0c5);await getCustomPageSource(_0x9e36da['pageId']);const _0x155729=await publishCustomPage(_0x9e36da);if(!Number[_0x4076b7(0xa5)](_0x155729)||_0x155729!==_0x9e36da[_0x4076b7(0xad)])throw CliErrors[_0x4076b7(0xa2)](_0x4076b7(0x9d));const _0x2dcc6e=await getCustomPageSource(_0x9e36da[_0x4076b7(0xad)]);if(_0x2dcc6e[_0x4076b7(0xb8)]!==_0x4076b7(0xba))throw CliErrors['apiError'](_0x4076b7(0xa7)+(_0x2dcc6e[_0x4076b7(0xb8)]??_0x4076b7(0xbc))+'.');const _0xb15114=_0x2dcc6e[_0x4076b7(0xb6)]?.['trim'](),_0xb1ce1c=buildCustomPageEditUrl(_0xb15114,_0x9e36da[_0x4076b7(0xad)]),_0x476350=await resolveCustomPageDevelopmentUrl(_0xb15114,_0x9e36da['pageId'],_0x4ef0c5['cookie']),_0x3fc5d0=buildMutationData(_0x9e36da,!![],_0x476350,_0xb1ce1c);_0xb15114&&!_0x476350&&_0x3fc5d0['warnings']['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x1ee79b=buildCustomPageRuntimeUrl(_0x2dcc6e[_0x4076b7(0xb6)],_0x2dcc6e[_0x4076b7(0xaf)]);return _0x1ee79b?_0x3fc5d0[_0x4076b7(0xb2)]=_0x1ee79b:_0x3fc5d0[_0x4076b7(0xb4)]['push'](_0x4076b7(0xaa)),{'ok':!![],'data':_0x3fc5d0,'message':_0x4076b7(0x9f)+_0x9e36da[_0x4076b7(0xad)]+'.'};}};function readInput(_0x425fe8){const _0x106c5c=a186_0x6e1bd6,_0x3e1a5f=readCustomPageId(_0x425fe8),_0x202369=_0x425fe8['str'](_0x106c5c(0x9e))[_0x106c5c(0xb9)]();return{'pageId':_0x3e1a5f,..._0x202369?{'remark':_0x202369}:{}};}function buildMutationData(_0x25f6f2,_0x29f6dd=![],_0x167768,_0x592266){const _0x56c1f9=a186_0x6e1bd6;return{'operation':_0x56c1f9(0xb3),'selector':{'pageId':_0x25f6f2['pageId']},'before':null,'after':{'pageId':_0x25f6f2[_0x56c1f9(0xad)],'status':_0x56c1f9(0xba)},'dryRun':!_0x29f6dd,'request':_0x25f6f2,..._0x167768?{'pageUrl':_0x167768}:{},..._0x592266?{'editPageUrl':_0x592266}:{},'warnings':[]};}
1
+ const a186_0xecbf7e=a186_0x291f;function a186_0x291f(_0x421002,_0x165ed2){_0x421002=_0x421002-0x19f;const _0x2ce03b=a186_0x2ce0();let _0x291f5e=_0x2ce03b[_0x421002];return _0x291f5e;}(function(_0x2d5ae3,_0x25f1fb){const _0x5e74c2=a186_0x291f,_0x38912b=_0x2d5ae3();while(!![]){try{const _0x5c7254=parseInt(_0x5e74c2(0x1a6))/0x1+parseInt(_0x5e74c2(0x1c5))/0x2*(-parseInt(_0x5e74c2(0x1a1))/0x3)+-parseInt(_0x5e74c2(0x1c0))/0x4+parseInt(_0x5e74c2(0x1b6))/0x5*(-parseInt(_0x5e74c2(0x1b3))/0x6)+parseInt(_0x5e74c2(0x1aa))/0x7*(-parseInt(_0x5e74c2(0x1c1))/0x8)+parseInt(_0x5e74c2(0x1b1))/0x9+parseInt(_0x5e74c2(0x1c6))/0xa*(parseInt(_0x5e74c2(0x1c4))/0xb);if(_0x5c7254===_0x25f1fb)break;else _0x38912b['push'](_0x38912b['shift']());}catch(_0x4fac95){_0x38912b['push'](_0x38912b['shift']());}}}(a186_0x2ce0,0x4bbf5));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a186_0x2ce0(){const _0x727a64=['Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','944112BgLQFR','1256OOYHDs','POST','string','498377aoPXKM','2SIywyz','100oiNwit','Published\x20Custom\x20Page\x20','warnings','123645vInkCj','custom-publish','apiError','unknown','str','593879RZreOS','trim','compress','page.custom-publish','27636nbVFNj','write','/smartapi/webcode/file/publish','cookie','status','page','appCode','4409343BtOIOW','runtimePageUrl','192CszmVl','FORMAL','pageCode','51490oiPXZm','Optional\x20publish\x20remark','push','number','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','Custom\x20Page\x20ID','remark','pageId','Would\x20publish\x20Custom\x20Page\x20'];a186_0x2ce0=function(){return _0x727a64;};return a186_0x2ce0();}export const pageCustomPublish={'service':a186_0xecbf7e(0x1af),'command':a186_0xecbf7e(0x1a2),'description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a186_0xecbf7e(0x1ab),'defaultOutputFormat':a186_0xecbf7e(0x1a8),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0xecbf7e(0x1b9),'required':!![],'description':a186_0xecbf7e(0x1bb)},{'name':a186_0xecbf7e(0x1bc),'type':a186_0xecbf7e(0x1c3),'description':a186_0xecbf7e(0x1b7)}],async 'validate'(_0x36aedc){readCustomPageId(_0x36aedc);},async 'dryRun'(_0x551551){const _0x53ffc0=a186_0xecbf7e,_0x4d9fe4=readInput(_0x551551);return{'method':_0x53ffc0(0x1c2),'url':_0x53ffc0(0x1ac),'body':{'id':_0x4d9fe4[_0x53ffc0(0x1bd)],..._0x4d9fe4[_0x53ffc0(0x1bc)]?{'remark':_0x4d9fe4[_0x53ffc0(0x1bc)]}:{}},'description':_0x53ffc0(0x1be)+_0x4d9fe4[_0x53ffc0(0x1bd)]+'.'};},async 'execute'(_0x4a3885){const _0x32a7e0=a186_0xecbf7e,_0x20d9c7=readInput(_0x4a3885);await getCustomPageSource(_0x20d9c7[_0x32a7e0(0x1bd)]);const _0x4eaea3=await publishCustomPage(_0x20d9c7);if(!Number['isInteger'](_0x4eaea3)||_0x4eaea3!==_0x20d9c7[_0x32a7e0(0x1bd)])throw CliErrors['apiError'](_0x32a7e0(0x1bf));const _0x2e6df8=await getCustomPageSource(_0x20d9c7[_0x32a7e0(0x1bd)]);if(_0x2e6df8[_0x32a7e0(0x1ae)]!==_0x32a7e0(0x1b4))throw CliErrors[_0x32a7e0(0x1a3)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x2e6df8[_0x32a7e0(0x1ae)]??_0x32a7e0(0x1a4))+'.');const _0x452c0c=_0x2e6df8[_0x32a7e0(0x1b0)]?.['trim'](),_0x464c27=buildCustomPageEditUrl(_0x452c0c,_0x20d9c7[_0x32a7e0(0x1bd)]),_0x27d977=await resolveCustomPageDevelopmentUrl(_0x452c0c,_0x20d9c7['pageId'],_0x4a3885[_0x32a7e0(0x1ad)]),_0x1e660b=buildMutationData(_0x20d9c7,!![],_0x27d977,_0x464c27);_0x452c0c&&!_0x27d977&&_0x1e660b[_0x32a7e0(0x1a0)][_0x32a7e0(0x1b8)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x1160c3=buildCustomPageRuntimeUrl(_0x2e6df8[_0x32a7e0(0x1b0)],_0x2e6df8[_0x32a7e0(0x1b5)]);return _0x1160c3?_0x1e660b[_0x32a7e0(0x1b2)]=_0x1160c3:_0x1e660b[_0x32a7e0(0x1a0)][_0x32a7e0(0x1b8)](_0x32a7e0(0x1ba)),{'ok':!![],'data':_0x1e660b,'message':_0x32a7e0(0x19f)+_0x20d9c7[_0x32a7e0(0x1bd)]+'.'};}};function readInput(_0xc8d560){const _0x2dff0a=a186_0xecbf7e,_0x114e9b=readCustomPageId(_0xc8d560),_0x272d85=_0xc8d560[_0x2dff0a(0x1a5)]('remark')[_0x2dff0a(0x1a7)]();return{'pageId':_0x114e9b,..._0x272d85?{'remark':_0x272d85}:{}};}function buildMutationData(_0x380b9b,_0x2458f2=![],_0x5df069,_0x4b8427){const _0x2e0836=a186_0xecbf7e;return{'operation':_0x2e0836(0x1a9),'selector':{'pageId':_0x380b9b[_0x2e0836(0x1bd)]},'before':null,'after':{'pageId':_0x380b9b[_0x2e0836(0x1bd)],'status':'FORMAL'},'dryRun':!_0x2458f2,'request':_0x380b9b,..._0x5df069?{'pageUrl':_0x5df069}:{},..._0x4b8427?{'editPageUrl':_0x4b8427}:{},'warnings':[]};}
@@ -1 +1 @@
1
- const a187_0x5c4075=a187_0x1cce;(function(_0x149507,_0x4a9cd0){const _0x2bf634=a187_0x1cce,_0x1ebdcd=_0x149507();while(!![]){try{const _0x5e6076=parseInt(_0x2bf634(0x79))/0x1+parseInt(_0x2bf634(0x8d))/0x2+-parseInt(_0x2bf634(0x7d))/0x3*(parseInt(_0x2bf634(0x89))/0x4)+parseInt(_0x2bf634(0x7a))/0x5*(-parseInt(_0x2bf634(0x77))/0x6)+parseInt(_0x2bf634(0x78))/0x7+parseInt(_0x2bf634(0x7f))/0x8*(parseInt(_0x2bf634(0x85))/0x9)+-parseInt(_0x2bf634(0x7b))/0xa*(-parseInt(_0x2bf634(0x86))/0xb);if(_0x5e6076===_0x4a9cd0)break;else _0x1ebdcd['push'](_0x1ebdcd['shift']());}catch(_0x42d1d7){_0x1ebdcd['push'](_0x1ebdcd['shift']());}}}(a187_0x5447,0xf288f));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':a187_0x5c4075(0x87)};function trimOptional(_0x3e1e13){const _0x19eee0=a187_0x5c4075;return _0x3e1e13?.[_0x19eee0(0x81)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x402836,_0x52ff1d){const _0x10e0e2=trimOptional(_0x402836),_0x479a6f=trimOptional(_0x52ff1d);if(!_0x10e0e2||!_0x479a6f)return undefined;return getPublishedAppDomain(_0x10e0e2)+'/'+encodeURIComponent(_0x479a6f);}export function buildCustomPageDevelopmentUrl(_0x308b06,_0x2a1697){const _0x810c38=a187_0x5c4075,_0x534e32=trimOptional(_0x308b06),_0x46e093=trimOptional(_0x2a1697);if(!_0x534e32||!_0x46e093)return undefined;return getAppBaseUrl(_0x534e32)+_0x810c38(0x76)+encodeURIComponent(_0x46e093);}function a187_0x5447(){const _0x5cad60=['12302163Mztgxq','22CfHNfv','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','message','8496MrUSTK','menus','/ide/','map','2560654rugsYj','path','join','validation','type','/pages/','4111686CFCEeS','900466tBemID','18878XuENNc','5tWbdBV','2342290PLwWbJ','react','2238YxDykU','Invalid\x20Custom\x20Page\x20content:\x20','8DlAyoB','num','trim','file','pageId','--id\x20must\x20be\x20a\x20positive\x20integer.'];a187_0x5447=function(){return _0x5cad60;};return a187_0x5447();}function a187_0x1cce(_0x31cc15,_0x40e2d2){_0x31cc15=_0x31cc15-0x73;const _0x5447a9=a187_0x5447();let _0x1ccea0=_0x5447a9[_0x31cc15];return _0x1ccea0;}export async function resolveCustomPageDevelopmentUrl(_0x5160d2,_0x184127,_0x5639a0){const _0x47ec1f=a187_0x5c4075,_0x1380bb=trimOptional(_0x5160d2);if(!_0x1380bb)return undefined;try{const _0x1a6bb9=(await fetchMenuSnapshot(_0x1380bb,_0x5639a0))[_0x47ec1f(0x8a)]['find'](_0x1a4249=>_0x1a4249[_0x47ec1f(0x75)]===_0x47ec1f(0x7c)&&_0x1a4249[_0x47ec1f(0x83)]===_0x184127);return buildCustomPageDevelopmentUrl(_0x1380bb,_0x1a6bb9?.[_0x47ec1f(0x8e)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x1820ed,_0x8554b3){const _0x178d6b=a187_0x5c4075,_0x4a6d39=trimOptional(_0x1820ed);if(!_0x4a6d39)return;const _0x45f79e=trimOptional(String(_0x8554b3??''));if(!_0x45f79e)return;return getAppBaseUrl(_0x4a6d39)+_0x178d6b(0x8b)+encodeURIComponent(_0x45f79e);}export async function validateCustomPageContent(_0x4a68ff){const _0x21c5f0=a187_0x5c4075,_0x318bc9=await validateCustomPageSourceFiles(_0x4a68ff);if(_0x318bc9['length']>0x0)throw CliErrors[_0x21c5f0(0x74)](_0x21c5f0(0x7e)+_0x318bc9[_0x21c5f0(0x8c)](_0x374ef8=>_0x374ef8[_0x21c5f0(0x82)]+':\x20'+_0x374ef8[_0x21c5f0(0x88)])[_0x21c5f0(0x73)](';\x20'));}export function readCustomPageId(_0x52db0f){const _0xf221b4=a187_0x5c4075,_0x1d4fed=_0x52db0f[_0xf221b4(0x80)]('id');if(!Number['isInteger'](_0x1d4fed)||_0x1d4fed<=0x0)throw CliErrors[_0xf221b4(0x74)](_0xf221b4(0x84));return _0x1d4fed;}
1
+ (function(_0x5c399b,_0x19f2e6){const _0x3d3c17=a187_0x199a,_0x5613e3=_0x5c399b();while(!![]){try{const _0x2de144=-parseInt(_0x3d3c17(0x188))/0x1+parseInt(_0x3d3c17(0x187))/0x2*(parseInt(_0x3d3c17(0x18d))/0x3)+-parseInt(_0x3d3c17(0x17f))/0x4*(-parseInt(_0x3d3c17(0x18a))/0x5)+parseInt(_0x3d3c17(0x17d))/0x6*(-parseInt(_0x3d3c17(0x185))/0x7)+-parseInt(_0x3d3c17(0x181))/0x8*(parseInt(_0x3d3c17(0x18c))/0x9)+-parseInt(_0x3d3c17(0x189))/0xa+parseInt(_0x3d3c17(0x18b))/0xb;if(_0x2de144===_0x19f2e6)break;else _0x5613e3['push'](_0x5613e3['shift']());}catch(_0x220f65){_0x5613e3['push'](_0x5613e3['shift']());}}}(a187_0x519a,0x8f094));function a187_0x519a(){const _0x4bc83c=['menus','732NwzQdB','react','80DsCNGc','find','--id\x20must\x20be\x20a\x20positive\x20integer.','validation','238KmcKYv','pageId','654XAjDgQ','800492viaTxF','5448820CzJgRd','7290opeEyF','15700619ywbupI','540747XxHuOE','10371MpUlqO','length','/pages/','path','isInteger','file','map','51618gLUxqG'];a187_0x519a=function(){return _0x4bc83c;};return a187_0x519a();}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';function a187_0x199a(_0x5e3dfe,_0x9a79d5){_0x5e3dfe=_0x5e3dfe-0x177;const _0x519a01=a187_0x519a();let _0x199a97=_0x519a01[_0x5e3dfe];return _0x199a97;}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function trimOptional(_0x23824f){return _0x23824f?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x3db848,_0x3205bf){const _0x51bd21=trimOptional(_0x3db848),_0xd28774=trimOptional(_0x3205bf);if(!_0x51bd21||!_0xd28774)return undefined;return getPublishedAppDomain(_0x51bd21)+'/'+encodeURIComponent(_0xd28774);}export function buildCustomPageDevelopmentUrl(_0x3f42a6,_0x2b34c0){const _0x3d4f0d=a187_0x199a,_0x48a84a=trimOptional(_0x3f42a6),_0x48fdb0=trimOptional(_0x2b34c0);if(!_0x48a84a||!_0x48fdb0)return undefined;return getAppBaseUrl(_0x48a84a)+_0x3d4f0d(0x178)+encodeURIComponent(_0x48fdb0);}export async function resolveCustomPageDevelopmentUrl(_0x5547ad,_0x42276a,_0x3ae8bd){const _0x179a75=a187_0x199a,_0x250c99=trimOptional(_0x5547ad);if(!_0x250c99)return undefined;try{const _0x2ffc3e=(await fetchMenuSnapshot(_0x250c99,_0x3ae8bd))[_0x179a75(0x17e)][_0x179a75(0x182)](_0x37a53f=>_0x37a53f['type']===_0x179a75(0x180)&&_0x37a53f[_0x179a75(0x186)]===_0x42276a);return buildCustomPageDevelopmentUrl(_0x250c99,_0x2ffc3e?.[_0x179a75(0x179)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x10e26c,_0x558beb){const _0x3817f5=trimOptional(_0x10e26c);if(!_0x3817f5)return;const _0x5a5f34=trimOptional(String(_0x558beb??''));if(!_0x5a5f34)return;return getAppBaseUrl(_0x3817f5)+'/ide/'+encodeURIComponent(_0x5a5f34);}export async function validateCustomPageContent(_0x4be233){const _0x43aa80=a187_0x199a,_0x3ba4dc=await validateCustomPageSourceFiles(_0x4be233);if(_0x3ba4dc[_0x43aa80(0x177)]>0x0)throw CliErrors[_0x43aa80(0x184)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x3ba4dc[_0x43aa80(0x17c)](_0x508637=>_0x508637[_0x43aa80(0x17b)]+':\x20'+_0x508637['message'])['join'](';\x20'));}export function readCustomPageId(_0x4099e2){const _0x25ebb7=a187_0x199a,_0xdbc419=_0x4099e2['num']('id');if(!Number[_0x25ebb7(0x17a)](_0xdbc419)||_0xdbc419<=0x0)throw CliErrors[_0x25ebb7(0x184)](_0x25ebb7(0x183));return _0xdbc419;}
@@ -1 +1 @@
1
- const a188_0x10ef2e=a188_0x5b91;(function(_0x29397c,_0x23f1b6){const _0x81a819=a188_0x5b91,_0x228722=_0x29397c();while(!![]){try{const _0x559b90=parseInt(_0x81a819(0x134))/0x1*(parseInt(_0x81a819(0x130))/0x2)+-parseInt(_0x81a819(0x142))/0x3+parseInt(_0x81a819(0x137))/0x4*(parseInt(_0x81a819(0x133))/0x5)+-parseInt(_0x81a819(0x13e))/0x6+-parseInt(_0x81a819(0x135))/0x7*(parseInt(_0x81a819(0x13a))/0x8)+-parseInt(_0x81a819(0x143))/0x9*(parseInt(_0x81a819(0x13b))/0xa)+-parseInt(_0x81a819(0x132))/0xb*(-parseInt(_0x81a819(0x13c))/0xc);if(_0x559b90===_0x23f1b6)break;else _0x228722['push'](_0x228722['shift']());}catch(_0x519ba9){_0x228722['push'](_0x228722['shift']());}}}(a188_0x1960,0xe2d58));function a188_0x1960(){const _0x5f208e=['6811407Wghzmk','toLowerCase','.tsx','typescript','endsWith','find','trim','366jjQctG','entries','52929514dhCYpi','25dIpEgv','2803RvtmlP','2044KnPLyZ','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','135188ZGMNmz','filter','.jsx','46504WJBvau','20yWbTRI','12eAlwfF','message','7607886scsXgk','babel','some','map','256719fFEXeW'];a188_0x1960=function(){return _0x5f208e;};return a188_0x1960();}import{format}from'prettier';const SOURCE_PARSERS={'.js':a188_0x10ef2e(0x13f),'.jsx':a188_0x10ef2e(0x13f),'.ts':'typescript','.tsx':a188_0x10ef2e(0x146)},CUSTOM_PAGE_EXTENSIONS=[a188_0x10ef2e(0x139),a188_0x10ef2e(0x145)];export async function validateCustomPageSourceFiles(_0x44b8e2){const _0x1e9434=a188_0x10ef2e,_0x6f2f04=Object[_0x1e9434(0x131)](_0x44b8e2)['filter'](([_0x182db7])=>getParser(_0x182db7));if(!_0x6f2f04[_0x1e9434(0x140)](([_0x3d0f9b])=>isReactSourceFile(_0x3d0f9b)))return[{'file':'page\x20files','message':_0x1e9434(0x136)}];const _0x531c92=await Promise['all'](_0x6f2f04[_0x1e9434(0x141)](async([_0x5361e5,_0x1d6611])=>{const _0x2d2b55=_0x1e9434;try{return await format(_0x1d6611,{'parser':getParser(_0x5361e5)}),undefined;}catch(_0x2dbbb0){return{'file':_0x5361e5,'message':_0x2dbbb0 instanceof Error?_0x2dbbb0[_0x2d2b55(0x13d)]:String(_0x2dbbb0)};}}));return _0x531c92[_0x1e9434(0x138)](_0x597af6=>_0x597af6!==undefined);}function getParser(_0x256a03){const _0x3a54a6=a188_0x10ef2e,_0x1e6a7c=_0x256a03['trim']()[_0x3a54a6(0x144)]();return Object[_0x3a54a6(0x131)](SOURCE_PARSERS)[_0x3a54a6(0x12e)](([_0x39a862])=>_0x1e6a7c[_0x3a54a6(0x12d)](_0x39a862))?.[0x1];}function a188_0x5b91(_0x5cb0f2,_0x4a9c5a){_0x5cb0f2=_0x5cb0f2-0x12d;const _0x1960dd=a188_0x1960();let _0x5b91f5=_0x1960dd[_0x5cb0f2];return _0x5b91f5;}function isReactSourceFile(_0x57e2aa){const _0xf1b17a=a188_0x10ef2e,_0x1c92d7=_0x57e2aa[_0xf1b17a(0x12f)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0xf1b17a(0x140)](_0x24159a=>_0x1c92d7[_0xf1b17a(0x12d)](_0x24159a));}
1
+ const a188_0x4dce11=a188_0x475a;function a188_0x44e1(){const _0x3b6305=['Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','40374SsJXVs','2990iXUXPx','905ZPfSSV','8418ZJzPJG','message','entries','88ssTgTh','map','find','some','189849NHtUdO','typescript','3501972UtRUmX','.tsx','.jsx','3332wWYEeG','all','filter','babel','996mWveYn','8071eGnTjA','40546WScbuk','trim','page\x20files','toLowerCase','endsWith','5253120nGVQtG'];a188_0x44e1=function(){return _0x3b6305;};return a188_0x44e1();}(function(_0x322c83,_0x3a0679){const _0x41778a=a188_0x475a,_0x1b01c9=_0x322c83();while(!![]){try{const _0x94980d=-parseInt(_0x41778a(0x1dd))/0x1*(-parseInt(_0x41778a(0x1ec))/0x2)+-parseInt(_0x41778a(0x1e3))/0x3+parseInt(_0x41778a(0x1e6))/0x4*(-parseInt(_0x41778a(0x1d9))/0x5)+-parseInt(_0x41778a(0x1da))/0x6*(parseInt(_0x41778a(0x1eb))/0x7)+-parseInt(_0x41778a(0x1f1))/0x8+parseInt(_0x41778a(0x1d7))/0x9*(parseInt(_0x41778a(0x1d8))/0xa)+-parseInt(_0x41778a(0x1e1))/0xb*(-parseInt(_0x41778a(0x1ea))/0xc);if(_0x94980d===_0x3a0679)break;else _0x1b01c9['push'](_0x1b01c9['shift']());}catch(_0x1efc84){_0x1b01c9['push'](_0x1b01c9['shift']());}}}(a188_0x44e1,0xebb3f));import{format}from'prettier';function a188_0x475a(_0x1e4bb6,_0x496643){_0x1e4bb6=_0x1e4bb6-0x1d7;const _0x44e1ca=a188_0x44e1();let _0x475a08=_0x44e1ca[_0x1e4bb6];return _0x475a08;}const SOURCE_PARSERS={'.js':a188_0x4dce11(0x1e9),'.jsx':a188_0x4dce11(0x1e9),'.ts':'typescript','.tsx':a188_0x4dce11(0x1e2)},CUSTOM_PAGE_EXTENSIONS=[a188_0x4dce11(0x1e5),a188_0x4dce11(0x1e4)];export async function validateCustomPageSourceFiles(_0x4033af){const _0x5b435c=a188_0x4dce11,_0x1522f2=Object['entries'](_0x4033af)['filter'](([_0xe11fb3])=>getParser(_0xe11fb3));if(!_0x1522f2[_0x5b435c(0x1e0)](([_0x1ec505])=>isReactSourceFile(_0x1ec505)))return[{'file':_0x5b435c(0x1ee),'message':_0x5b435c(0x1f2)}];const _0x4fcf07=await Promise[_0x5b435c(0x1e7)](_0x1522f2[_0x5b435c(0x1de)](async([_0x16494b,_0x2cdc16])=>{const _0x35aeb0=_0x5b435c;try{return await format(_0x2cdc16,{'parser':getParser(_0x16494b)}),undefined;}catch(_0x3aa927){return{'file':_0x16494b,'message':_0x3aa927 instanceof Error?_0x3aa927[_0x35aeb0(0x1db)]:String(_0x3aa927)};}}));return _0x4fcf07[_0x5b435c(0x1e8)](_0x3ff09e=>_0x3ff09e!==undefined);}function getParser(_0x1880c8){const _0x1a2684=a188_0x4dce11,_0x43286f=_0x1880c8[_0x1a2684(0x1ed)]()[_0x1a2684(0x1ef)]();return Object[_0x1a2684(0x1dc)](SOURCE_PARSERS)[_0x1a2684(0x1df)](([_0x48852a])=>_0x43286f[_0x1a2684(0x1f0)](_0x48852a))?.[0x1];}function isReactSourceFile(_0x2e11cc){const _0x5997ff=a188_0x4dce11,_0x773a4=_0x2e11cc[_0x5997ff(0x1ed)]()[_0x5997ff(0x1ef)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x150608=>_0x773a4[_0x5997ff(0x1f0)](_0x150608));}
@@ -1 +1 @@
1
- const a189_0x56e889=a189_0x336a;(function(_0x47d187,_0x4bf42e){const _0x478e39=a189_0x336a,_0x536db5=_0x47d187();while(!![]){try{const _0x40db72=-parseInt(_0x478e39(0x122))/0x1*(parseInt(_0x478e39(0x121))/0x2)+-parseInt(_0x478e39(0x12f))/0x3*(parseInt(_0x478e39(0x132))/0x4)+-parseInt(_0x478e39(0x11f))/0x5+-parseInt(_0x478e39(0x12b))/0x6*(parseInt(_0x478e39(0x126))/0x7)+parseInt(_0x478e39(0x134))/0x8*(-parseInt(_0x478e39(0x12a))/0x9)+-parseInt(_0x478e39(0x142))/0xa*(parseInt(_0x478e39(0x13a))/0xb)+parseInt(_0x478e39(0x128))/0xc;if(_0x40db72===_0x4bf42e)break;else _0x536db5['push'](_0x536db5['shift']());}catch(_0x5e4ded){_0x536db5['push'](_0x536db5['shift']());}}}(a189_0x4479,0x54b05));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a189_0x4479(){const _0x1179d7=['Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','Custom\x20Page\x20ID','appcode','511TKjMjW','page.custom-update','23853528YNoKIZ','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','141894WOBnau','9006IdRbGG','apiError','page-content','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','2649zptQHo','number','/smartapi/webcode/page/update/content','1400LFyBaL','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','216vwNnsA','pageId','cookie','trim','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','isInteger','3454OePvhy','validation','appCode','Updated\x20Custom\x20Page\x20','page','pageContent','str','POST','3370xFttkQ','newVersion','2693620bHPbcK','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','304124FqVVyY','1dYSnJT'];a189_0x4479=function(){return _0x1179d7;};return a189_0x4479();}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 a189_0x336a(_0x168b3d,_0x23ac5a){_0x168b3d=_0x168b3d-0x11f;const _0x4479f9=a189_0x4479();let _0x336ac5=_0x4479f9[_0x168b3d];return _0x336ac5;}export const pageCustomUpdate={'service':a189_0x56e889(0x13e),'command':'custom-update','description':a189_0x56e889(0x120),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x56e889(0x12d),'message':a189_0x56e889(0x12e),'hint':a189_0x56e889(0x129)}],'flags':[{'name':'id','type':a189_0x56e889(0x130),'required':!![],'description':a189_0x56e889(0x124)},{'name':'page-dir','type':'string','required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1c51d6){readCustomPageId(_0x1c51d6),await readValidatedPageContent(_0x1c51d6);},async 'dryRun'(_0x326900){const _0x3b5a5a=a189_0x56e889,_0x170da8=await readInput(_0x326900);return{'method':_0x3b5a5a(0x141),'url':_0x3b5a5a(0x131),'body':{'id':_0x170da8['pageId'],'codeContent':_0x170da8[_0x3b5a5a(0x13f)]},'description':_0x3b5a5a(0x138)+_0x170da8[_0x3b5a5a(0x135)]+'.'};},async 'execute'(_0x2d346c){const _0x470f7e=a189_0x56e889,_0x36d32b=await readInput(_0x2d346c),_0xd3514b=await updateCustomPageContent({'pageId':_0x36d32b[_0x470f7e(0x135)],'pageContent':_0x36d32b[_0x470f7e(0x13f)]});if(!Number[_0x470f7e(0x139)](_0xd3514b[_0x470f7e(0x143)])||_0xd3514b[_0x470f7e(0x143)]<=0x0)throw CliErrors[_0x470f7e(0x12c)](_0x470f7e(0x123));const _0x58b0d6=buildCustomPageEditUrl(_0x36d32b[_0x470f7e(0x13c)],_0x36d32b[_0x470f7e(0x135)]),_0x53cfec=await resolveCustomPageDevelopmentUrl(_0x36d32b[_0x470f7e(0x13c)],_0x36d32b[_0x470f7e(0x135)],_0x2d346c[_0x470f7e(0x136)]);return{'ok':!![],'data':{'operation':_0x470f7e(0x127),'selector':{'appCode':_0x36d32b[_0x470f7e(0x13c)],'pageId':_0x36d32b[_0x470f7e(0x135)]},'before':null,'after':{'pageId':_0xd3514b[_0x470f7e(0x135)],'version':_0xd3514b[_0x470f7e(0x143)],'pageContent':_0x36d32b['pageContent']},'dryRun':![],'request':_0x36d32b,..._0x53cfec?{'pageUrl':_0x53cfec}:{},..._0x58b0d6?{'editPageUrl':_0x58b0d6}:{},'warnings':_0x53cfec?[]:[_0x470f7e(0x133)]},'message':_0x470f7e(0x13d)+_0x36d32b[_0x470f7e(0x135)]+'.'};}};async function readInput(_0x235d96){const _0x14e66b=a189_0x56e889,_0x2f5040=readCustomPageId(_0x235d96),_0x5063c3=_0x235d96['str'](_0x14e66b(0x125))[_0x14e66b(0x137)]()||(await getCustomPageSource(_0x2f5040))[_0x14e66b(0x13c)]?.[_0x14e66b(0x137)]();if(!_0x5063c3)throw CliErrors[_0x14e66b(0x13b)]('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x2f5040+'.');return{'appCode':_0x5063c3,'pageId':_0x2f5040,'pageContent':await readValidatedPageContent(_0x235d96)};}async function readValidatedPageContent(_0x199755){const _0x10a233=a189_0x56e889,_0x3d3477=await readCustomPageDirectory(_0x199755[_0x10a233(0x140)]('page-dir'));return await validateCustomPageContent(_0x3d3477),_0x3d3477;}
1
+ const a189_0x34bb87=a189_0xefe9;function a189_0xefe9(_0x22f47d,_0x3b2e0b){_0x22f47d=_0x22f47d-0x78;const _0x4f587a=a189_0x4f58();let _0xefe9f=_0x4f587a[_0x22f47d];return _0xefe9f;}(function(_0x24d575,_0x5aef8f){const _0x4fc423=a189_0xefe9,_0x50880f=_0x24d575();while(!![]){try{const _0xe0d624=parseInt(_0x4fc423(0x7c))/0x1+-parseInt(_0x4fc423(0x94))/0x2+-parseInt(_0x4fc423(0x88))/0x3+parseInt(_0x4fc423(0x98))/0x4*(parseInt(_0x4fc423(0x79))/0x5)+parseInt(_0x4fc423(0x80))/0x6+-parseInt(_0x4fc423(0x8d))/0x7+parseInt(_0x4fc423(0x83))/0x8;if(_0xe0d624===_0x5aef8f)break;else _0x50880f['push'](_0x50880f['shift']());}catch(_0x3572c1){_0x50880f['push'](_0x50880f['shift']());}}}(a189_0x4f58,0x8d153));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a189_0x4f58(){const _0x5bd991=['page-dir','isInteger','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','7351568OALnpT','page-content','apiError','appCode','newVersion','page','compress','363648YLPiyq','page.custom-update','str','string','4yGvBNV','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','Directory\x20containing\x20all\x20complete\x20page\x20files','5118235axvHly','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','484252fVjXmD','write','custom-update','POST','4600542wDtPjo','Updated\x20Custom\x20Page\x20','number','3882616TBUkMX','pageId','Custom\x20Page\x20ID','cookie','pageContent','2850180zqjsLd','trim'];a189_0x4f58=function(){return _0x5bd991;};return a189_0x4f58();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a189_0x34bb87(0x92),'command':a189_0x34bb87(0x7e),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a189_0x34bb87(0x7d),'defaultOutputFormat':a189_0x34bb87(0x93),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x34bb87(0x8e),'message':a189_0x34bb87(0x9a),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':a189_0x34bb87(0x82),'required':!![],'description':a189_0x34bb87(0x85)},{'name':a189_0x34bb87(0x8a),'type':a189_0x34bb87(0x97),'required':!![],'description':a189_0x34bb87(0x78)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x324341){readCustomPageId(_0x324341),await readValidatedPageContent(_0x324341);},async 'dryRun'(_0x3fab6e){const _0x24074b=a189_0x34bb87,_0x34ec89=await readInput(_0x3fab6e);return{'method':_0x24074b(0x7f),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x34ec89['pageId'],'codeContent':_0x34ec89[_0x24074b(0x87)]},'description':_0x24074b(0x7a)+_0x34ec89[_0x24074b(0x84)]+'.'};},async 'execute'(_0x5562ec){const _0x153f77=a189_0x34bb87,_0x10a5c1=await readInput(_0x5562ec),_0x336f9f=await updateCustomPageContent({'pageId':_0x10a5c1[_0x153f77(0x84)],'pageContent':_0x10a5c1['pageContent']});if(!Number[_0x153f77(0x8b)](_0x336f9f[_0x153f77(0x91)])||_0x336f9f[_0x153f77(0x91)]<=0x0)throw CliErrors[_0x153f77(0x8f)](_0x153f77(0x7b));const _0x3974cc=buildCustomPageEditUrl(_0x10a5c1['appCode'],_0x10a5c1[_0x153f77(0x84)]),_0x342c1c=await resolveCustomPageDevelopmentUrl(_0x10a5c1['appCode'],_0x10a5c1[_0x153f77(0x84)],_0x5562ec[_0x153f77(0x86)]);return{'ok':!![],'data':{'operation':_0x153f77(0x95),'selector':{'appCode':_0x10a5c1[_0x153f77(0x90)],'pageId':_0x10a5c1['pageId']},'before':null,'after':{'pageId':_0x336f9f[_0x153f77(0x84)],'version':_0x336f9f['newVersion'],'pageContent':_0x10a5c1[_0x153f77(0x87)]},'dryRun':![],'request':_0x10a5c1,..._0x342c1c?{'pageUrl':_0x342c1c}:{},..._0x3974cc?{'editPageUrl':_0x3974cc}:{},'warnings':_0x342c1c?[]:[_0x153f77(0x99)]},'message':_0x153f77(0x81)+_0x10a5c1[_0x153f77(0x84)]+'.'};}};async function readInput(_0x157e9f){const _0x4666e5=a189_0x34bb87,_0x4cb2f4=readCustomPageId(_0x157e9f),_0x369828=_0x157e9f[_0x4666e5(0x96)]('appcode')[_0x4666e5(0x89)]()||(await getCustomPageSource(_0x4cb2f4))[_0x4666e5(0x90)]?.[_0x4666e5(0x89)]();if(!_0x369828)throw CliErrors['validation'](_0x4666e5(0x8c)+_0x4cb2f4+'.');return{'appCode':_0x369828,'pageId':_0x4cb2f4,'pageContent':await readValidatedPageContent(_0x157e9f)};}async function readValidatedPageContent(_0x26d405){const _0x232948=await readCustomPageDirectory(_0x26d405['str']('page-dir'));return await validateCustomPageContent(_0x232948),_0x232948;}
@@ -1 +1 @@
1
- const a190_0x5e0fea=a190_0x1adb;(function(_0x55c9f3,_0x1b3f26){const _0x4817c0=a190_0x1adb,_0x17ead1=_0x55c9f3();while(!![]){try{const _0xb82c91=-parseInt(_0x4817c0(0x178))/0x1*(parseInt(_0x4817c0(0x167))/0x2)+parseInt(_0x4817c0(0x171))/0x3*(parseInt(_0x4817c0(0x175))/0x4)+-parseInt(_0x4817c0(0x168))/0x5*(parseInt(_0x4817c0(0x163))/0x6)+-parseInt(_0x4817c0(0x160))/0x7+-parseInt(_0x4817c0(0x179))/0x8*(-parseInt(_0x4817c0(0x17b))/0x9)+parseInt(_0x4817c0(0x176))/0xa+-parseInt(_0x4817c0(0x16d))/0xb*(-parseInt(_0x4817c0(0x16c))/0xc);if(_0xb82c91===_0x1b3f26)break;else _0x17ead1['push'](_0x17ead1['shift']());}catch(_0x11e78c){_0x17ead1['push'](_0x17ead1['shift']());}}}(a190_0x1116,0x4af04));function a190_0x1adb(_0x1f6d79,_0x32b416){_0x1f6d79=_0x1f6d79-0x15f;const _0x111639=a190_0x1116();let _0x1adb55=_0x111639[_0x1f6d79];return _0x1adb55;}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':a190_0x5e0fea(0x16a),'command':a190_0x5e0fea(0x17a),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a190_0x5e0fea(0x16f),'defaultOutputFormat':a190_0x5e0fea(0x164),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0x5e0fea(0x172),'type':a190_0x5e0fea(0x16b),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0xf438f0){validateDatasetSelector(_0xf438f0);},async 'dryRun'(_0x4adae8){const _0xeb5b10=a190_0x5e0fea,_0x268d5c=await loadDatasetDetailForPage(_0x4adae8);return{'method':'GET','url':_0xeb5b10(0x16e)+_0x268d5c[_0xeb5b10(0x177)]+_0xeb5b10(0x166)+encodeURIComponent(_0x4adae8[_0xeb5b10(0x17c)]),'description':serializeDryRunDescription({'dataset':{'id':_0x268d5c['id'],'code':_0x268d5c['code'],'name':_0x268d5c[_0xeb5b10(0x161)]},'action':_0xeb5b10(0x169)})};},async 'execute'(_0x407eb8){const _0x479128=a190_0x5e0fea,_0x29405b=await loadDatasetDetailForPage(_0x407eb8),_0x248760=await loadDataListPageStatusForGenerate(_0x407eb8,_0x29405b['code']),_0x748c54=getUndeletedRelatedPages(_0x29405b),_0x3069d8=assessDataListPageState(_0x29405b[_0x479128(0x177)],_0x248760,{'fallbackUndeletedPages':_0x748c54});return{'ok':!![],'data':{'datasetCode':_0x29405b[_0x479128(0x177)],'precheckSource':_0x248760?.['source']??_0x479128(0x165),'status':_0x3069d8[_0x479128(0x173)],'manualResolutionRequired':_0x3069d8[_0x479128(0x174)],'nextAction':_0x3069d8[_0x479128(0x15f)],'dataListPageStatus':_0x248760,'relatedPages':{'total':_0x29405b[_0x479128(0x170)][_0x479128(0x162)],'undeletedCount':_0x748c54['length']}}};}};function a190_0x1116(){const _0x51bb74=['/smartapi/lovrabet/dataset/','read','relatedPages','31812AtaUTk','alias','status','manualResolutionRequired','196vsxglC','583940zVccJo','code','19289bpmJCT','536dRPBOO','data-list-status','65889LbFSon','appCode','nextAction','25844cgqHhC','name','length','42shQbnn','compress','related-pages-fallback','/standard-page-status?appCode=','28ZQuLoq','433765nCFgAi','query-data-list-status','page','string','360pYkevj','43802BLEUuL'];a190_0x1116=function(){return _0x51bb74;};return a190_0x1116();}
1
+ const a190_0xb44837=a190_0x2f19;(function(_0x16411c,_0x5135b3){const _0xad1ab6=a190_0x2f19,_0x1eb584=_0x16411c();while(!![]){try{const _0x4b4a79=-parseInt(_0xad1ab6(0x114))/0x1*(parseInt(_0xad1ab6(0x118))/0x2)+parseInt(_0xad1ab6(0x119))/0x3+-parseInt(_0xad1ab6(0x117))/0x4*(parseInt(_0xad1ab6(0x11b))/0x5)+parseInt(_0xad1ab6(0x113))/0x6+parseInt(_0xad1ab6(0x104))/0x7+parseInt(_0xad1ab6(0x11e))/0x8*(-parseInt(_0xad1ab6(0x109))/0x9)+parseInt(_0xad1ab6(0x115))/0xa;if(_0x4b4a79===_0x5135b3)break;else _0x1eb584['push'](_0x1eb584['shift']());}catch(_0x330b49){_0x1eb584['push'](_0x1eb584['shift']());}}}(a190_0x26cc,0x5d5d0));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a190_0x26cc(){const _0x4ad7fa=['/standard-page-status?appCode=','alias','280HGpFjP','3908667zuXLxN','code','compress','relatedPages','string','102267lRhCLw','page','GET','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','nextAction','appCode','name','related-pages-fallback','length','read','2264430HHjNlw','2bDhEkA','3564400jWXPxQ','/smartapi/lovrabet/dataset/','870008wKfjcI','412358iTQhTi','1658277yMQDVw','manualResolutionRequired','15YZnWtU'];a190_0x26cc=function(){return _0x4ad7fa;};return a190_0x26cc();}function a190_0x2f19(_0x4525dd,_0x3a5e0e){_0x4525dd=_0x4525dd-0x104;const _0x26cc72=a190_0x26cc();let _0x2f194d=_0x26cc72[_0x4525dd];return _0x2f194d;}export const pageDataListStatus={'service':a190_0xb44837(0x10a),'command':'data-list-status','description':a190_0xb44837(0x10c),'risk':a190_0xb44837(0x112),'defaultOutputFormat':a190_0xb44837(0x106),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0xb44837(0x11d),'type':a190_0xb44837(0x108),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x33f4b5){validateDatasetSelector(_0x33f4b5);},async 'dryRun'(_0x45f4d4){const _0x911ad6=a190_0xb44837,_0x5bb103=await loadDatasetDetailForPage(_0x45f4d4);return{'method':_0x911ad6(0x10b),'url':_0x911ad6(0x116)+_0x5bb103['code']+_0x911ad6(0x11c)+encodeURIComponent(_0x45f4d4[_0x911ad6(0x10e)]),'description':serializeDryRunDescription({'dataset':{'id':_0x5bb103['id'],'code':_0x5bb103[_0x911ad6(0x105)],'name':_0x5bb103[_0x911ad6(0x10f)]},'action':'query-data-list-status'})};},async 'execute'(_0x303c8b){const _0x25f1aa=a190_0xb44837,_0x2f8747=await loadDatasetDetailForPage(_0x303c8b),_0x2a4892=await loadDataListPageStatusForGenerate(_0x303c8b,_0x2f8747[_0x25f1aa(0x105)]),_0x174a05=getUndeletedRelatedPages(_0x2f8747),_0x184c0d=assessDataListPageState(_0x2f8747['code'],_0x2a4892,{'fallbackUndeletedPages':_0x174a05});return{'ok':!![],'data':{'datasetCode':_0x2f8747[_0x25f1aa(0x105)],'precheckSource':_0x2a4892?.['source']??_0x25f1aa(0x110),'status':_0x184c0d['status'],'manualResolutionRequired':_0x184c0d[_0x25f1aa(0x11a)],'nextAction':_0x184c0d[_0x25f1aa(0x10d)],'dataListPageStatus':_0x2a4892,'relatedPages':{'total':_0x2f8747[_0x25f1aa(0x107)][_0x25f1aa(0x111)],'undeletedCount':_0x174a05['length']}}};}};
@@ -1 +1 @@
1
- const a191_0x24d382=a191_0x5274;function a191_0x5274(_0x3700b9,_0x5da508){_0x3700b9=_0x3700b9-0x14d;const _0x34f9a1=a191_0x34f9();let _0x5274e8=_0x34f9a1[_0x3700b9];return _0x5274e8;}(function(_0x3ea283,_0x39765f){const _0x484644=a191_0x5274,_0x1ec51c=_0x3ea283();while(!![]){try{const _0x16f562=parseInt(_0x484644(0x14e))/0x1+-parseInt(_0x484644(0x177))/0x2+parseInt(_0x484644(0x161))/0x3+parseInt(_0x484644(0x179))/0x4*(-parseInt(_0x484644(0x152))/0x5)+parseInt(_0x484644(0x172))/0x6+parseInt(_0x484644(0x155))/0x7+-parseInt(_0x484644(0x158))/0x8*(parseInt(_0x484644(0x166))/0x9);if(_0x16f562===_0x39765f)break;else _0x1ec51c['push'](_0x1ec51c['shift']());}catch(_0x2d12cf){_0x1ec51c['push'](_0x1ec51c['shift']());}}}(a191_0x34f9,0x621a0));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a191_0x24d382(0x17d),'command':a191_0x24d382(0x157),'description':a191_0x24d382(0x17c),'risk':'write','defaultOutputFormat':a191_0x24d382(0x174),'rejectedFlags':[{'name':a191_0x24d382(0x16e),'message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a191_0x24d382(0x15d),'message':a191_0x24d382(0x15f),'hint':a191_0x24d382(0x17e)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x24d382(0x15b),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a191_0x24d382(0x167),'type':a191_0x24d382(0x16d),'description':a191_0x24d382(0x16c)}],async 'validate'(_0x30628a){validateDatasetSelector(_0x30628a);},async 'dryRun'(_0x59d182){const _0x1b15a6=a191_0x24d382,_0x24ed17=await prepare(_0x59d182);return{'method':_0x1b15a6(0x17b),'url':_0x1b15a6(0x16a)+_0x24ed17[_0x1b15a6(0x160)]['code']+'/generate-standard-pages/start','body':{'appCode':_0x59d182[_0x1b15a6(0x15e)],'clientOperationId':_0x24ed17[_0x1b15a6(0x153)]},'description':serializeDryRunDescription({'dataset':{'id':_0x24ed17[_0x1b15a6(0x160)]['id'],'code':_0x24ed17[_0x1b15a6(0x160)][_0x1b15a6(0x164)],'name':_0x24ed17[_0x1b15a6(0x160)][_0x1b15a6(0x159)],'fieldCount':_0x24ed17['dataset'][_0x1b15a6(0x14f)]},'precheckSource':_0x24ed17[_0x1b15a6(0x162)]?.[_0x1b15a6(0x169)]??_0x1b15a6(0x175),'action':'generate-start','clientOperationId':_0x24ed17[_0x1b15a6(0x153)],'plannedStatus':_0x24ed17['precheck'][_0x1b15a6(0x171)],'reason':_0x24ed17[_0x1b15a6(0x16f)][_0x1b15a6(0x154)]})};},async 'execute'(_0x4d289f){const _0x44b63f=a191_0x24d382;if(!_0x4d289f[_0x44b63f(0x17a)](_0x44b63f(0x167))){const _0x329178=await pageGenerateStart[_0x44b63f(0x15c)](_0x4d289f);return{'ok':!![],'message':_0x44b63f(0x168),'data':_0x329178};}const _0x113c5d=await prepare(_0x4d289f);if(!_0x113c5d[_0x44b63f(0x16f)][_0x44b63f(0x150)])return{'ok':![],'message':_0x113c5d[_0x44b63f(0x16f)][_0x44b63f(0x154)],'data':{'datasetCode':_0x113c5d[_0x44b63f(0x160)][_0x44b63f(0x164)],'pageType':_0x44b63f(0x16b),'pagePattern':_0x44b63f(0x151),'clientOperationId':_0x113c5d[_0x44b63f(0x153)],'precheckSource':_0x113c5d[_0x44b63f(0x162)]?.[_0x44b63f(0x169)]??_0x44b63f(0x175),'status':_0x113c5d[_0x44b63f(0x16f)]['status'],'manualResolutionRequired':_0x113c5d[_0x44b63f(0x16f)][_0x44b63f(0x173)],'nextAction':_0x113c5d['precheck'][_0x44b63f(0x163)],'query':{'command':buildDataListPageStatusQueryCommand(_0x113c5d[_0x44b63f(0x160)]['code'],_0x4d289f['appCode'])},'dataListPageStatus':_0x113c5d[_0x44b63f(0x162)]}};const _0x37f7c1=await startGenerateDataListPages(_0x4d289f[_0x44b63f(0x15e)],_0x113c5d['dataset'][_0x44b63f(0x164)],{'clientOperationId':_0x113c5d['clientOperationId']}),_0x3642d4=_0x37f7c1[_0x44b63f(0x171)]===_0x44b63f(0x178)||_0x37f7c1['status']===_0x44b63f(0x14d)?await loadDataListPageStatusForGenerate(_0x4d289f,_0x113c5d[_0x44b63f(0x160)][_0x44b63f(0x164)]):null,_0x51bce0=assessGenerateOperationState(_0x113c5d[_0x44b63f(0x160)][_0x44b63f(0x164)],_0x37f7c1[_0x44b63f(0x171)],_0x3642d4);return{'ok':!![],'message':_0x37f7c1[_0x44b63f(0x156)]?'Reusing\x20an\x20existing\x20generate\x20task':'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x113c5d[_0x44b63f(0x160)][_0x44b63f(0x164)],'appCode':_0x4d289f[_0x44b63f(0x15e)],'pageType':'DATA_LIST','pagePattern':_0x44b63f(0x151),'taskId':_0x37f7c1[_0x44b63f(0x15a)]??null,'operationId':_0x37f7c1[_0x44b63f(0x176)]??null,'clientOperationId':_0x113c5d['clientOperationId'],'jobStatus':_0x37f7c1[_0x44b63f(0x171)]??null,'progressRate':typeof _0x37f7c1[_0x44b63f(0x165)]==='number'?_0x37f7c1[_0x44b63f(0x165)]:null,'currentStep':_0x37f7c1[_0x44b63f(0x170)]??null,'reused':_0x37f7c1[_0x44b63f(0x156)]===!![],'status':_0x51bce0[_0x44b63f(0x171)],'manualResolutionRequired':_0x51bce0[_0x44b63f(0x173)],'nextAction':_0x51bce0[_0x44b63f(0x163)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x113c5d['dataset'][_0x44b63f(0x164)],{'appCode':_0x4d289f[_0x44b63f(0x15e)],'taskId':_0x37f7c1[_0x44b63f(0x15a)],'operationId':_0x37f7c1['operationId'],'clientOperationId':_0x113c5d['clientOperationId']})},'dataListPageStatus':_0x3642d4}};}};function a191_0x34f9(){const _0xebdbb4=['reused','generate-start','4520nDaYYQ','name','taskId','alias','dryRun','page-pattern','appCode','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','dataset','2223762cHWmKj','dataListPageStatus','nextAction','code','progressRate','25209XcmcWJ','apply','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','source','/smartapi/lovrabet/dataset/','DATA_LIST','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','boolean','page-type','precheck','currentStep','status','4473972kwYtIr','manualResolutionRequired','compress','related-pages-fallback','operationId','353400tjNCBY','SUCCESS','52muyQQi','bool','POST','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','page','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','PARTIAL_SUCCESS','558748CTwzEE','fieldCount','allowGenerate','CRUD_PAGE_SET','25215qikWGk','clientOperationId','message','1266888kcRTqz'];a191_0x34f9=function(){return _0xebdbb4;};return a191_0x34f9();}async function prepare(_0x2bcb1f){const _0x70104b=a191_0x24d382,_0x23f73e=await loadDatasetDetailForPage(_0x2bcb1f),_0x44c24b=await loadDataListPageStatusForGenerate(_0x2bcb1f,_0x23f73e[_0x70104b(0x164)]),_0x25134a=getUndeletedRelatedPages(_0x23f73e);return{'dataset':_0x23f73e,'dataListPageStatus':_0x44c24b,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x23f73e[_0x70104b(0x164)],_0x44c24b,{'fallbackUndeletedPages':_0x25134a})};}
1
+ const a191_0x34604c=a191_0x33bd;(function(_0xdeb7ed,_0x16ad26){const _0x20e48f=a191_0x33bd,_0x239f6d=_0xdeb7ed();while(!![]){try{const _0x302adb=-parseInt(_0x20e48f(0x214))/0x1*(-parseInt(_0x20e48f(0x209))/0x2)+parseInt(_0x20e48f(0x20c))/0x3*(-parseInt(_0x20e48f(0x1f9))/0x4)+-parseInt(_0x20e48f(0x1fa))/0x5+parseInt(_0x20e48f(0x20b))/0x6+parseInt(_0x20e48f(0x213))/0x7*(parseInt(_0x20e48f(0x220))/0x8)+-parseInt(_0x20e48f(0x21d))/0x9*(-parseInt(_0x20e48f(0x1ed))/0xa)+-parseInt(_0x20e48f(0x21b))/0xb;if(_0x302adb===_0x16ad26)break;else _0x239f6d['push'](_0x239f6d['shift']());}catch(_0x2db369){_0x239f6d['push'](_0x239f6d['shift']());}}}(a191_0x3d2e,0xb2161));function a191_0x33bd(_0x1a4f74,_0x2797a9){_0x1a4f74=_0x1a4f74-0x1ed;const _0x3d2e3e=a191_0x3d2e();let _0x33bd19=_0x3d2e3e[_0x1a4f74];return _0x33bd19;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0x3d2e(){const _0x36120e=['page-type','Reusing\x20an\x20existing\x20generate\x20task','compress','/generate-standard-pages/start','code','30WdWAGE','generate-start','7678488TVrebx','92769DejQPT','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','/smartapi/lovrabet/dataset/','related-pages-fallback','message','operationId','clientOperationId','889IEfUmN','57299viaJyV','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','CRUD_PAGE_SET','DATA_LIST','apply','number','PARTIAL_SUCCESS','12692009VexHaT','currentStep','27GBdKlB','appCode','reused','80728QVJmoo','690810xTqQzm','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','nextAction','name','status','page','precheck','dataListPageStatus','dataset','fieldCount','taskId','alias','164WAVKsx','2384650AakfJY','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','manualResolutionRequired','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','dryRun','source','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','allowGenerate','Submitted\x20a\x20generate\x20task','POST'];a191_0x3d2e=function(){return _0x36120e;};return a191_0x3d2e();}import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a191_0x34604c(0x1f2),'command':'generate-start','description':a191_0x34604c(0x20d),'risk':'write','defaultOutputFormat':a191_0x34604c(0x206),'rejectedFlags':[{'name':a191_0x34604c(0x204),'message':a191_0x34604c(0x1ee),'hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':'page-pattern','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','hint':a191_0x34604c(0x200)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x34604c(0x1f8),'type':'string','description':a191_0x34604c(0x1fd)},{'name':a191_0x34604c(0x218),'type':'boolean','description':a191_0x34604c(0x215)}],async 'validate'(_0x53101c){validateDatasetSelector(_0x53101c);},async 'dryRun'(_0x5559f3){const _0x1dd00e=a191_0x34604c,_0x349e58=await prepare(_0x5559f3);return{'method':_0x1dd00e(0x203),'url':_0x1dd00e(0x20e)+_0x349e58['dataset'][_0x1dd00e(0x208)]+_0x1dd00e(0x207),'body':{'appCode':_0x5559f3[_0x1dd00e(0x21e)],'clientOperationId':_0x349e58[_0x1dd00e(0x212)]},'description':serializeDryRunDescription({'dataset':{'id':_0x349e58['dataset']['id'],'code':_0x349e58[_0x1dd00e(0x1f5)][_0x1dd00e(0x208)],'name':_0x349e58[_0x1dd00e(0x1f5)][_0x1dd00e(0x1f0)],'fieldCount':_0x349e58[_0x1dd00e(0x1f5)][_0x1dd00e(0x1f6)]},'precheckSource':_0x349e58[_0x1dd00e(0x1f4)]?.[_0x1dd00e(0x1ff)]??_0x1dd00e(0x20f),'action':_0x1dd00e(0x20a),'clientOperationId':_0x349e58[_0x1dd00e(0x212)],'plannedStatus':_0x349e58[_0x1dd00e(0x1f3)][_0x1dd00e(0x1f1)],'reason':_0x349e58[_0x1dd00e(0x1f3)][_0x1dd00e(0x210)]})};},async 'execute'(_0x634a43){const _0x45d4f5=a191_0x34604c;if(!_0x634a43['bool'](_0x45d4f5(0x218))){const _0x1bbca7=await pageGenerateStart[_0x45d4f5(0x1fe)](_0x634a43);return{'ok':!![],'message':_0x45d4f5(0x1fb),'data':_0x1bbca7};}const _0x44e3a6=await prepare(_0x634a43);if(!_0x44e3a6[_0x45d4f5(0x1f3)][_0x45d4f5(0x201)])return{'ok':![],'message':_0x44e3a6[_0x45d4f5(0x1f3)][_0x45d4f5(0x210)],'data':{'datasetCode':_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)],'pageType':_0x45d4f5(0x217),'pagePattern':_0x45d4f5(0x216),'clientOperationId':_0x44e3a6['clientOperationId'],'precheckSource':_0x44e3a6[_0x45d4f5(0x1f4)]?.[_0x45d4f5(0x1ff)]??_0x45d4f5(0x20f),'status':_0x44e3a6['precheck']['status'],'manualResolutionRequired':_0x44e3a6['precheck'][_0x45d4f5(0x1fc)],'nextAction':_0x44e3a6[_0x45d4f5(0x1f3)][_0x45d4f5(0x1ef)],'query':{'command':buildDataListPageStatusQueryCommand(_0x44e3a6['dataset'][_0x45d4f5(0x208)],_0x634a43[_0x45d4f5(0x21e)])},'dataListPageStatus':_0x44e3a6['dataListPageStatus']}};const _0x442ccf=await startGenerateDataListPages(_0x634a43['appCode'],_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)],{'clientOperationId':_0x44e3a6[_0x45d4f5(0x212)]}),_0x44f528=_0x442ccf[_0x45d4f5(0x1f1)]==='SUCCESS'||_0x442ccf[_0x45d4f5(0x1f1)]===_0x45d4f5(0x21a)?await loadDataListPageStatusForGenerate(_0x634a43,_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)]):null,_0xfd3e2f=assessGenerateOperationState(_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)],_0x442ccf[_0x45d4f5(0x1f1)],_0x44f528);return{'ok':!![],'message':_0x442ccf[_0x45d4f5(0x21f)]?_0x45d4f5(0x205):_0x45d4f5(0x202),'data':{'datasetCode':_0x44e3a6[_0x45d4f5(0x1f5)]['code'],'appCode':_0x634a43[_0x45d4f5(0x21e)],'pageType':'DATA_LIST','pagePattern':_0x45d4f5(0x216),'taskId':_0x442ccf[_0x45d4f5(0x1f7)]??null,'operationId':_0x442ccf[_0x45d4f5(0x211)]??null,'clientOperationId':_0x44e3a6[_0x45d4f5(0x212)],'jobStatus':_0x442ccf[_0x45d4f5(0x1f1)]??null,'progressRate':typeof _0x442ccf['progressRate']===_0x45d4f5(0x219)?_0x442ccf['progressRate']:null,'currentStep':_0x442ccf[_0x45d4f5(0x21c)]??null,'reused':_0x442ccf[_0x45d4f5(0x21f)]===!![],'status':_0xfd3e2f[_0x45d4f5(0x1f1)],'manualResolutionRequired':_0xfd3e2f[_0x45d4f5(0x1fc)],'nextAction':_0xfd3e2f[_0x45d4f5(0x1ef)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x44e3a6[_0x45d4f5(0x1f5)][_0x45d4f5(0x208)],{'appCode':_0x634a43['appCode'],'taskId':_0x442ccf[_0x45d4f5(0x1f7)],'operationId':_0x442ccf[_0x45d4f5(0x211)],'clientOperationId':_0x44e3a6[_0x45d4f5(0x212)]})},'dataListPageStatus':_0x44f528}};}};async function prepare(_0x376cce){const _0x4857f2=await loadDatasetDetailForPage(_0x376cce),_0x1d53b2=await loadDataListPageStatusForGenerate(_0x376cce,_0x4857f2['code']),_0xb14949=getUndeletedRelatedPages(_0x4857f2);return{'dataset':_0x4857f2,'dataListPageStatus':_0x1d53b2,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x4857f2['code'],_0x1d53b2,{'fallbackUndeletedPages':_0xb14949})};}