@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.d.ts +22 -0
  3. package/lib/api/api-group.js +1 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +18 -2
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/api/generate-sdk-config-file.js +1 -1
  8. package/lib/api/legacy-api-file.d.ts +11 -0
  9. package/lib/api/legacy-api-file.js +1 -0
  10. package/lib/api/model-registry-file.d.ts +36 -0
  11. package/lib/api/model-registry-file.js +1 -0
  12. package/lib/api/model-registry-scaffold.d.ts +7 -0
  13. package/lib/api/model-registry-scaffold.js +1 -0
  14. package/lib/api/model-source.d.ts +6 -0
  15. package/lib/api/model-source.js +1 -0
  16. package/lib/auth/auth-server-ui.js +1 -1
  17. package/lib/auth/auth-server.js +1 -1
  18. package/lib/auth/constant.js +1 -1
  19. package/lib/auth/get-cookie.js +1 -1
  20. package/lib/auth/get-session-user.js +1 -1
  21. package/lib/auth/is-session-valid.js +1 -1
  22. package/lib/auth/login-success-html.js +1 -1
  23. package/lib/auth/logout.js +1 -1
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.js +1 -1
  26. package/lib/commands/api/generate.js +1 -1
  27. package/lib/commands/api/index.js +1 -1
  28. package/lib/commands/api/list.js +1 -1
  29. package/lib/commands/api/pull.js +1 -1
  30. package/lib/commands/api/shared.js +1 -1
  31. package/lib/commands/app/index.js +1 -1
  32. package/lib/commands/app/list.js +1 -1
  33. package/lib/commands/app/members-list.js +1 -1
  34. package/lib/commands/app/remote-directory.js +1 -1
  35. package/lib/commands/app/shared.js +1 -1
  36. package/lib/commands/app-config/delete.js +1 -1
  37. package/lib/commands/app-config/get.js +1 -1
  38. package/lib/commands/app-config/index.js +1 -1
  39. package/lib/commands/app-config/list.js +1 -1
  40. package/lib/commands/app-config/set.js +1 -1
  41. package/lib/commands/app-config/shared.js +1 -1
  42. package/lib/commands/auth/index.js +1 -1
  43. package/lib/commands/bff/create.js +1 -1
  44. package/lib/commands/bff/delete.js +1 -1
  45. package/lib/commands/bff/detail.js +1 -1
  46. package/lib/commands/bff/index.js +1 -1
  47. package/lib/commands/bff/list.js +1 -1
  48. package/lib/commands/bff/logs.js +1 -1
  49. package/lib/commands/bff/pull.js +1 -1
  50. package/lib/commands/bff/push.js +1 -1
  51. package/lib/commands/bff/status.js +1 -1
  52. package/lib/commands/cli-skill/index.js +1 -1
  53. package/lib/commands/cli-update.js +1 -1
  54. package/lib/commands/codegen/index.js +1 -1
  55. package/lib/commands/codegen/sdk.js +1 -1
  56. package/lib/commands/codegen/sql.js +1 -1
  57. package/lib/commands/common/app-registry.js +1 -1
  58. package/lib/commands/common/app-selector.js +1 -1
  59. package/lib/commands/common/async-task.js +1 -1
  60. package/lib/commands/common/dry-run.js +1 -1
  61. package/lib/commands/common/flags.d.ts +7 -0
  62. package/lib/commands/common/flags.js +1 -1
  63. package/lib/commands/common/local-file.js +1 -1
  64. package/lib/commands/common/validate.js +1 -1
  65. package/lib/commands/config/delete.js +1 -1
  66. package/lib/commands/config/get.js +1 -1
  67. package/lib/commands/config/index.js +1 -1
  68. package/lib/commands/config/init.js +1 -1
  69. package/lib/commands/config/list.js +1 -1
  70. package/lib/commands/config/set.js +1 -1
  71. package/lib/commands/config/shared.js +1 -1
  72. package/lib/commands/dataset/batch-design.js +1 -1
  73. package/lib/commands/dataset/business-group-update.js +1 -1
  74. package/lib/commands/dataset/business-groups.js +1 -1
  75. package/lib/commands/dataset/capability.js +1 -1
  76. package/lib/commands/dataset/cross-relation-create.d.ts +2 -0
  77. package/lib/commands/dataset/cross-relation-create.js +1 -0
  78. package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
  79. package/lib/commands/dataset/cross-relation-delete.js +1 -0
  80. package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
  81. package/lib/commands/dataset/cross-relation-list.js +1 -0
  82. package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
  83. package/lib/commands/dataset/cross-relation-shared.js +1 -0
  84. package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
  85. package/lib/commands/dataset/cross-relation-update.js +1 -0
  86. package/lib/commands/dataset/delete.js +1 -1
  87. package/lib/commands/dataset/detail.js +1 -1
  88. package/lib/commands/dataset/extend-update.js +1 -1
  89. package/lib/commands/dataset/field-restore.js +1 -1
  90. package/lib/commands/dataset/field-update.js +1 -1
  91. package/lib/commands/dataset/generate.js +1 -1
  92. package/lib/commands/dataset/index.js +1 -1
  93. package/lib/commands/dataset/list.js +1 -1
  94. package/lib/commands/dataset/operations.js +1 -1
  95. package/lib/commands/dataset/relation-audit.js +1 -1
  96. package/lib/commands/dataset/relation-create.js +1 -1
  97. package/lib/commands/dataset/relation-delete.js +1 -1
  98. package/lib/commands/dataset/relation-shared.js +1 -1
  99. package/lib/commands/dataset/relation-update.js +1 -1
  100. package/lib/commands/dataset/relations.js +1 -1
  101. package/lib/commands/dataset/rename.js +1 -1
  102. package/lib/commands/dataset/restore.js +1 -1
  103. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  104. package/lib/commands/db/analysis-batching.js +1 -1
  105. package/lib/commands/db/analyze-batch-plan.js +1 -1
  106. package/lib/commands/db/analyze-cancel.js +1 -1
  107. package/lib/commands/db/analyze-start.js +1 -1
  108. package/lib/commands/db/analyze-status.js +1 -1
  109. package/lib/commands/db/create.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/service.js +1 -1
  183. package/lib/commands/menu/shared/sync-core.js +1 -1
  184. package/lib/commands/menu/shared/update-core.js +1 -1
  185. package/lib/commands/menu/shared/valid-url.js +1 -1
  186. package/lib/commands/menu/sync.js +1 -1
  187. package/lib/commands/menu/visibility-update.js +1 -1
  188. package/lib/commands/notification/config-create.js +1 -1
  189. package/lib/commands/notification/config-delete.js +1 -1
  190. package/lib/commands/notification/config-list.js +1 -1
  191. package/lib/commands/notification/config-update.js +1 -1
  192. package/lib/commands/notification/index.js +1 -1
  193. package/lib/commands/notification/shared.js +1 -1
  194. package/lib/commands/ocr/index.js +1 -1
  195. package/lib/commands/page/create.js +1 -1
  196. package/lib/commands/page/custom/detail.js +1 -1
  197. package/lib/commands/page/custom/list.js +1 -1
  198. package/lib/commands/page/custom/publish.js +1 -1
  199. package/lib/commands/page/custom/shared.js +1 -1
  200. package/lib/commands/page/custom/syntax.js +1 -1
  201. package/lib/commands/page/custom/update.js +1 -1
  202. package/lib/commands/page/data-list-status.js +1 -1
  203. package/lib/commands/page/generate-start.js +1 -1
  204. package/lib/commands/page/generate-status.js +1 -1
  205. package/lib/commands/page/index.js +1 -1
  206. package/lib/commands/page/pull.js +1 -1
  207. package/lib/commands/page/push.js +1 -1
  208. package/lib/commands/page/relation-audit.js +1 -1
  209. package/lib/commands/page/restore.js +1 -1
  210. package/lib/commands/page/shared.js +1 -1
  211. package/lib/commands/page/sync.js +1 -1
  212. package/lib/commands/project/api-architecture-upgrade.d.ts +28 -0
  213. package/lib/commands/project/api-architecture-upgrade.js +1 -0
  214. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  215. package/lib/commands/project/create/format-elapsed.js +1 -1
  216. package/lib/commands/project/create/main.js +1 -1
  217. package/lib/commands/project/create/materialize-project-template.js +1 -1
  218. package/lib/commands/project/create/project-name.js +1 -1
  219. package/lib/commands/project/create/project-template-archive.js +1 -1
  220. package/lib/commands/project/create/project-template-path.js +1 -1
  221. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  222. package/lib/commands/project/create/use-format-code.js +1 -1
  223. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  224. package/lib/commands/project/domain-routing-sync.js +1 -1
  225. package/lib/commands/project/index.js +1 -1
  226. package/lib/commands/project/upgrade.d.ts +30 -1
  227. package/lib/commands/project/upgrade.js +1 -1
  228. package/lib/commands/registry.js +1 -1
  229. package/lib/commands/role/delete.js +1 -1
  230. package/lib/commands/role/detail.js +1 -1
  231. package/lib/commands/role/index.js +1 -1
  232. package/lib/commands/role/list.js +1 -1
  233. package/lib/commands/role/shared.js +1 -1
  234. package/lib/commands/role/update.js +1 -1
  235. package/lib/commands/role/user-add.js +1 -1
  236. package/lib/commands/role/user-remove.js +1 -1
  237. package/lib/commands/role/user-resolve.js +1 -1
  238. package/lib/commands/rule/get.js +1 -1
  239. package/lib/commands/rule/index.js +1 -1
  240. package/lib/commands/rule/list.js +1 -1
  241. package/lib/commands/rule/set.js +1 -1
  242. package/lib/commands/rule/shared.js +1 -1
  243. package/lib/commands/run/index.js +1 -1
  244. package/lib/commands/schema.js +1 -1
  245. package/lib/commands/sql/create.js +1 -1
  246. package/lib/commands/sql/delete.js +1 -1
  247. package/lib/commands/sql/detail.js +1 -1
  248. package/lib/commands/sql/exec.js +1 -1
  249. package/lib/commands/sql/index.js +1 -1
  250. package/lib/commands/sql/list.js +1 -1
  251. package/lib/commands/sql/pull.js +1 -1
  252. package/lib/commands/sql/push.js +1 -1
  253. package/lib/commands/sql/shared.js +1 -1
  254. package/lib/commands/sql/status.js +1 -1
  255. package/lib/commands/sql/validate.js +1 -1
  256. package/lib/commands/task/index.js +1 -1
  257. package/lib/commands/task/status.js +1 -1
  258. package/lib/commands/tenant/index.js +1 -1
  259. package/lib/commands/tenant/members-list.js +1 -1
  260. package/lib/commands/tenant/shared.js +1 -1
  261. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  262. package/lib/commands/user-account/index.js +1 -1
  263. package/lib/commands/workspace/add.js +1 -1
  264. package/lib/commands/workspace/index.js +1 -1
  265. package/lib/commands/workspace/remove.js +1 -1
  266. package/lib/config/domain-config.js +1 -1
  267. package/lib/config/project-domain-routing.js +1 -1
  268. package/lib/config/region-config.js +1 -1
  269. package/lib/config/schema.js +1 -1
  270. package/lib/constant/cdn.d.ts +5 -3
  271. package/lib/constant/cdn.js +1 -1
  272. package/lib/constant/cli.js +1 -1
  273. package/lib/constant/defaults.js +1 -1
  274. package/lib/constant/domain.js +1 -1
  275. package/lib/constant/env.js +1 -1
  276. package/lib/constant/output.js +1 -1
  277. package/lib/constant/paths.js +1 -1
  278. package/lib/constant/region.js +1 -1
  279. package/lib/constant/risk.js +1 -1
  280. package/lib/constant/routing-profile.js +1 -1
  281. package/lib/context/app-resolver.d.ts +2 -0
  282. package/lib/context/app-resolver.js +1 -1
  283. package/lib/context/auth-resolver.js +1 -1
  284. package/lib/context/config-loader.js +1 -1
  285. package/lib/context.d.ts +2 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.d.ts +13 -17
  288. package/lib/core/alias-resolver.js +1 -1
  289. package/lib/core/api-client.d.ts +6 -0
  290. package/lib/core/api-client.js +1 -1
  291. package/lib/core/bff/config.js +1 -1
  292. package/lib/core/bff/file-system.js +1 -1
  293. package/lib/core/bff/hash.js +1 -1
  294. package/lib/core/bff/hook-directory.js +1 -1
  295. package/lib/core/bff/lock.js +1 -1
  296. package/lib/core/bff/utils.js +1 -1
  297. package/lib/core/cross-db-relation.d.ts +41 -0
  298. package/lib/core/cross-db-relation.js +1 -0
  299. package/lib/core/db-resolver.js +1 -1
  300. package/lib/core/flow-config.js +1 -1
  301. package/lib/core/instant-api-policy/config.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.d.ts +1 -1
  324. package/lib/framework/runner-alias.js +1 -1
  325. package/lib/framework/runner.js +1 -1
  326. package/lib/framework/schema-export.js +1 -1
  327. package/lib/framework/supported-flags.js +1 -1
  328. package/lib/framework/types.js +1 -1
  329. package/lib/generated/build-info.d.ts +4 -4
  330. package/lib/generated/build-info.js +1 -1
  331. package/lib/generated/official-routing.js +1 -1
  332. package/lib/generated/routing-contract.js +1 -1
  333. package/lib/help.js +1 -1
  334. package/lib/postinstall.js +1 -1
  335. package/lib/runtime/confirmation.js +1 -1
  336. package/lib/runtime/event.js +1 -1
  337. package/lib/runtime/index.js +1 -1
  338. package/lib/runtime/queue.js +1 -1
  339. package/lib/runtime/resolve.js +1 -1
  340. package/lib/skills/builtin-skill.js +1 -1
  341. package/lib/skills/main.js +1 -1
  342. package/lib/skills/npx-skills-add.d.ts +0 -10
  343. package/lib/skills/npx-skills-add.js +1 -1
  344. package/lib/skills/skill-presence.js +1 -1
  345. package/lib/telemetry/cli-command-trace.js +1 -1
  346. package/lib/telemetry/cli-help-trace.js +1 -1
  347. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  348. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  349. package/lib/telemetry/send-cli-trace-log.js +1 -1
  350. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  351. package/lib/types/index.d.ts +11 -1
  352. package/lib/utils/ai_config.js +1 -1
  353. package/lib/utils/apply-jq-filter.js +1 -1
  354. package/lib/utils/cdn-config.js +1 -1
  355. package/lib/utils/check-sdk-version.js +1 -1
  356. package/lib/utils/cli-version-check.js +1 -1
  357. package/lib/utils/cli-version-policy.d.ts +19 -0
  358. package/lib/utils/cli-version-policy.js +1 -1
  359. package/lib/utils/config.js +1 -1
  360. package/lib/utils/entity-with-id.js +1 -1
  361. package/lib/utils/file-utils.js +1 -1
  362. package/lib/utils/guides-cdn.js +1 -1
  363. package/lib/utils/http-client.js +1 -1
  364. package/lib/utils/is-non-interactive.js +1 -1
  365. package/lib/utils/logger.js +1 -1
  366. package/lib/utils/params.js +1 -1
  367. package/lib/utils/platform.js +1 -1
  368. package/lib/utils/sleep.js +1 -1
  369. package/lib/utils/template-replacer.js +1 -1
  370. package/lib/utils/update-notice.js +1 -1
  371. package/lib/utils/version.js +1 -1
  372. package/lib/utils/with-active-cookie.js +1 -1
  373. package/lib/utils/write-cli-side-channel.js +1 -1
  374. package/package.json +6 -1
  375. package/skills/rabetbase/SKILL.md +16 -10
  376. package/skills/rabetbase/guides/backend-function.md +5 -1
  377. package/skills/rabetbase/guides/bff-creation-workflow.md +3 -1
  378. package/skills/rabetbase/guides/cross-database-bff.md +70 -0
  379. package/skills/rabetbase/guides/data-api-guidelines.md +35 -33
  380. package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
  381. package/skills/rabetbase/guides/sql-creation-workflow.md +2 -0
  382. package/skills/rabetbase/guides/typescript-sdk.md +9 -0
  383. package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
  384. package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
  385. package/skills/rabetbase/references/rabetbase-config.md +2 -1
  386. package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +64 -0
  387. package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
  388. package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
  389. package/skills/rabetbase.manifest.json +5 -3
  390. package/templates/README.md +46 -6
  391. package/templates/generate-api/model-runtime.ts.tpl +101 -0
  392. package/templates/generate-api/profile-api.ts.tpl +21 -0
  393. package/templates/generate-api/profile-client.ts.tpl +14 -0
@@ -1 +1 @@
1
- const a169_0x4cfd8f=a169_0x5685;function a169_0x19bf(){const _0x559429=['notification','appCode','POST','notification_config_update_verification_unavailable','mutation','\x20via\x20','/notification/channel-config/update','213102xKJsUk','3671860xrzngl','552527ZxYWqF','\x20with\x20','7aTBnyt','1368936MDSHsd','update','verifiedFields','notification_config_update_verification_failed','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Inspect\x20with\x20--id\x20','verified','before','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','3097408tkmPPk','2022pEHDGA','14879781PyDXyy',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20ID\x20','1257npEZzc','notification_config_update_outcome_unknown','planned','provesChange','channelType','config-update',';\x20do\x20not\x20resubmit\x20automatically.'];a169_0x19bf=function(){return _0x559429;};return a169_0x19bf();}(function(_0x1d5727,_0x5b4805){const _0x1855d8=a169_0x5685,_0x16b0d7=_0x1d5727();while(!![]){try{const _0x1c9795=-parseInt(_0x1855d8(0x191))/0x1+parseInt(_0x1855d8(0x19f))/0x2*(-parseInt(_0x1855d8(0x1a3))/0x3)+-parseInt(_0x1855d8(0x19e))/0x4+parseInt(_0x1855d8(0x190))/0x5+parseInt(_0x1855d8(0x1b1))/0x6+parseInt(_0x1855d8(0x193))/0x7*(-parseInt(_0x1855d8(0x194))/0x8)+parseInt(_0x1855d8(0x1a0))/0x9;if(_0x1c9795===_0x5b4805)break;else _0x16b0d7['push'](_0x16b0d7['shift']());}catch(_0x3f4a6e){_0x16b0d7['push'](_0x16b0d7['shift']());}}}(a169_0x19bf,0x7a759));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a169_0x5685(_0x4cd8fa,_0x41f572){_0x4cd8fa=_0x4cd8fa-0x190;const _0x19bff7=a169_0x19bf();let _0x56857a=_0x19bff7[_0x4cd8fa];return _0x56857a;}const UPDATE_PATH=a169_0x4cfd8f(0x1b0);async function prepareUpdate(_0x27f5b6){const _0x324e83=a169_0x4cfd8f,_0x119cbb=readNotificationId(_0x27f5b6),_0xa49cf5=await readNotificationDocument(_0x27f5b6,_0x324e83(0x195)),_0xabe4c1=await requireExactNotificationConfig(_0x27f5b6[_0x324e83(0x1ab)],_0x119cbb,_0x324e83(0x195));return{'id':_0x119cbb,'patch':_0xa49cf5,'before':_0xabe4c1,'payload':mergeUpdateInput(_0xabe4c1,_0xa49cf5),'planned':plannedUpdateProjection(_0xabe4c1,_0xa49cf5)};}export const notificationConfigUpdate={'service':a169_0x4cfd8f(0x1aa),'command':a169_0x4cfd8f(0x1a8),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x13fe6d){readNotificationId(_0x13fe6d),assertSingleNotificationSource(_0x13fe6d),requireNotificationExplicitYes(_0x13fe6d);},async 'dryRun'(_0x5480fb){const _0x696ef7=a169_0x4cfd8f,_0x80292e=await prepareUpdate(_0x5480fb),_0x15937f=notificationLookupCommand(_0x5480fb['appCode'],_0x80292e[_0x696ef7(0x19c)][_0x696ef7(0x1a7)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x80292e[_0x696ef7(0x19c)]),'before':projectNotificationConfig(_0x80292e['before']),'after':_0x80292e[_0x696ef7(0x1a5)],'dryRun':!![],'backend':{'method':_0x696ef7(0x1ac),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x696ef7(0x1a5),'lookupCommand':_0x15937f}},{'method':_0x696ef7(0x1ac),'url':UPDATE_PATH});},async 'execute'(_0x1be50c){const _0xfd3a2d=a169_0x4cfd8f;requireNotificationExplicitYes(_0x1be50c);const _0x40e66c=await prepareUpdate(_0x1be50c),_0x7dd173=notificationLookupCommand(_0x1be50c['appCode'],_0x40e66c[_0xfd3a2d(0x19c)][_0xfd3a2d(0x1a7)]);let _0x3059f2=![];try{await updateNotificationChannelConfig(_0x40e66c['payload']);}catch(_0x5c26da){if(!isPlatformTransportFailure(_0x5c26da))throw safeApiFailure('update',_0xfd3a2d(0x1ae),_0xfd3a2d(0x1a2)+_0x40e66c['id']+_0xfd3a2d(0x192)+_0x7dd173+_0xfd3a2d(0x1a1));_0x3059f2=!![];}let _0x5c9e1f;try{const _0xfa3261=await getNotificationChannelConfig(_0x40e66c['id'],_0x1be50c[_0xfd3a2d(0x1ab)]);_0x5c9e1f=normalizeExactNotificationConfig(_0xfa3261,_0x40e66c['id'],_0x1be50c[_0xfd3a2d(0x1ab)]);}catch{throw notificationError(_0x3059f2?_0xfd3a2d(0x1a4):_0xfd3a2d(0x1ad),'Notification\x20config\x20'+_0x40e66c['id']+_0xfd3a2d(0x199),_0xfd3a2d(0x19a)+_0x40e66c['id']+_0xfd3a2d(0x1af)+_0x7dd173+_0xfd3a2d(0x1a9));}const _0x21ac3=requestedSafeFieldsMatch(_0x40e66c[_0xfd3a2d(0x19c)],_0x5c9e1f,_0x40e66c['patch']);if(!_0x21ac3['allMatch']||_0x3059f2&&!_0x21ac3[_0xfd3a2d(0x1a6)])throw notificationError(_0x3059f2?_0xfd3a2d(0x1a4):_0xfd3a2d(0x197),'Notification\x20config\x20'+_0x40e66c['id']+_0xfd3a2d(0x19d),'Inspect\x20with\x20--id\x20'+_0x40e66c['id']+'\x20via\x20'+_0x7dd173+_0xfd3a2d(0x1a9));const _0x3d164c=_0x3059f2?[_0xfd3a2d(0x198)]:[];return{'ok':!![],'data':{'operation':_0xfd3a2d(0x195),'selector':notificationSelector(_0x5c9e1f),'before':projectNotificationConfig(_0x40e66c[_0xfd3a2d(0x19c)]),'after':projectNotificationConfig(_0x5c9e1f),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x3d164c,'verification':{'status':_0xfd3a2d(0x19b),'recoveredAfterUnknownResponse':_0x3059f2,'verifiedFields':_0x21ac3[_0xfd3a2d(0x196)],'lookupCommand':_0x7dd173}},'message':'Updated\x20notification\x20config\x20'+_0x5c9e1f['id']};}};
1
+ const a179_0x329bad=a179_0x2895;(function(_0xe63cbd,_0x40546e){const _0x216ade=a179_0x2895,_0x416077=_0xe63cbd();while(!![]){try{const _0x25f682=parseInt(_0x216ade(0xa5))/0x1*(-parseInt(_0x216ade(0xbc))/0x2)+parseInt(_0x216ade(0xb5))/0x3+parseInt(_0x216ade(0xaa))/0x4+-parseInt(_0x216ade(0xbe))/0x5*(-parseInt(_0x216ade(0xb6))/0x6)+parseInt(_0x216ade(0xc0))/0x7+parseInt(_0x216ade(0xc5))/0x8+parseInt(_0x216ade(0xa0))/0x9*(-parseInt(_0x216ade(0xc1))/0xa);if(_0x25f682===_0x40546e)break;else _0x416077['push'](_0x416077['shift']());}catch(_0x8573f9){_0x416077['push'](_0x416077['shift']());}}}(a179_0x24fd,0xde44f));import{asDryRunResult}from'../../commands/common/dry-run.js';function a179_0x2895(_0x20b22f,_0x5452ac){_0x20b22f=_0x20b22f-0xa0;const _0x24fdd9=a179_0x24fd();let _0x289531=_0x24fdd9[_0x20b22f];return _0x289531;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';function a179_0x24fd(){const _0x413494=['406487yVHgKj','planned','notification_config_update_verification_failed',';\x20do\x20not\x20resubmit\x20automatically.','allMatch','2044392uUHnBO','Notification\x20config\x20','mutation','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','high-risk-write','payload','channelType','notification_config_update_outcome_unknown','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Updated\x20notification\x20config\x20','3468111HCkbCy','3310134WPXhoX','config-update','verified','POST','provesChange','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','2rENkWy','appCode','5HgKVqQ','update','5278770CPVPOY','20dSMyNh','before','patch','verifiedFields','2195008FNsxvw','8686836PJGRtK','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20via\x20','notification_config_update_verification_unavailable','Inspect\x20with\x20--id\x20'];a179_0x24fd=function(){return _0x413494;};return a179_0x24fd();}async function prepareUpdate(_0x1a2d99){const _0x1cc24f=a179_0x2895,_0x5300a2=readNotificationId(_0x1a2d99),_0x10a5dd=await readNotificationDocument(_0x1a2d99,_0x1cc24f(0xbf)),_0x15c48c=await requireExactNotificationConfig(_0x1a2d99[_0x1cc24f(0xbd)],_0x5300a2,_0x1cc24f(0xbf));return{'id':_0x5300a2,'patch':_0x10a5dd,'before':_0x15c48c,'payload':mergeUpdateInput(_0x15c48c,_0x10a5dd),'planned':plannedUpdateProjection(_0x15c48c,_0x10a5dd)};}export const notificationConfigUpdate={'service':'notification','command':a179_0x329bad(0xb7),'description':a179_0x329bad(0xb3),'risk':a179_0x329bad(0xaf),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0xa1e3fc){readNotificationId(_0xa1e3fc),assertSingleNotificationSource(_0xa1e3fc),requireNotificationExplicitYes(_0xa1e3fc);},async 'dryRun'(_0x32d2ab){const _0x7a63cc=a179_0x329bad,_0x3d47fe=await prepareUpdate(_0x32d2ab),_0x4db27a=notificationLookupCommand(_0x32d2ab[_0x7a63cc(0xbd)],_0x3d47fe[_0x7a63cc(0xc2)]['channelType']);return asDryRunResult({'operation':_0x7a63cc(0xbf),'selector':notificationSelector(_0x3d47fe[_0x7a63cc(0xc2)]),'before':projectNotificationConfig(_0x3d47fe[_0x7a63cc(0xc2)]),'after':_0x3d47fe[_0x7a63cc(0xa6)],'dryRun':!![],'backend':{'method':_0x7a63cc(0xb9),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x7a63cc(0xa6),'lookupCommand':_0x4db27a}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x4c8c6c){const _0x36bf17=a179_0x329bad;requireNotificationExplicitYes(_0x4c8c6c);const _0x251d67=await prepareUpdate(_0x4c8c6c),_0x1d4c5c=notificationLookupCommand(_0x4c8c6c[_0x36bf17(0xbd)],_0x251d67['before'][_0x36bf17(0xb1)]);let _0x392953=![];try{await updateNotificationChannelConfig(_0x251d67[_0x36bf17(0xb0)]);}catch(_0x132c1e){if(!isPlatformTransportFailure(_0x132c1e))throw safeApiFailure('update',_0x36bf17(0xac),'Inspect\x20ID\x20'+_0x251d67['id']+'\x20with\x20'+_0x1d4c5c+_0x36bf17(0xae));_0x392953=!![];}let _0x562b4e;try{const _0x149d3b=await getNotificationChannelConfig(_0x251d67['id'],_0x4c8c6c[_0x36bf17(0xbd)]);_0x562b4e=normalizeExactNotificationConfig(_0x149d3b,_0x251d67['id'],_0x4c8c6c['appCode']);}catch{throw notificationError(_0x392953?_0x36bf17(0xb2):_0x36bf17(0xa3),_0x36bf17(0xab)+_0x251d67['id']+_0x36bf17(0xbb),_0x36bf17(0xa4)+_0x251d67['id']+_0x36bf17(0xa2)+_0x1d4c5c+_0x36bf17(0xa8));}const _0x57587e=requestedSafeFieldsMatch(_0x251d67[_0x36bf17(0xc2)],_0x562b4e,_0x251d67[_0x36bf17(0xc3)]);if(!_0x57587e[_0x36bf17(0xa9)]||_0x392953&&!_0x57587e[_0x36bf17(0xba)])throw notificationError(_0x392953?'notification_config_update_outcome_unknown':_0x36bf17(0xa7),'Notification\x20config\x20'+_0x251d67['id']+_0x36bf17(0xad),_0x36bf17(0xa4)+_0x251d67['id']+_0x36bf17(0xa2)+_0x1d4c5c+';\x20do\x20not\x20resubmit\x20automatically.');const _0x186518=_0x392953?[_0x36bf17(0xa1)]:[];return{'ok':!![],'data':{'operation':_0x36bf17(0xbf),'selector':notificationSelector(_0x562b4e),'before':projectNotificationConfig(_0x251d67[_0x36bf17(0xc2)]),'after':projectNotificationConfig(_0x562b4e),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x186518,'verification':{'status':_0x36bf17(0xb8),'recoveredAfterUnknownResponse':_0x392953,'verifiedFields':_0x57587e[_0x36bf17(0xc4)],'lookupCommand':_0x1d4c5c}},'message':_0x36bf17(0xb4)+_0x562b4e['id']};}};
@@ -1 +1 @@
1
- (function(_0xbb5366,_0x381981){const _0x44c4d9=a170_0x4f0b,_0x3ec914=_0xbb5366();while(!![]){try{const _0x56164f=-parseInt(_0x44c4d9(0x75))/0x1*(-parseInt(_0x44c4d9(0x7b))/0x2)+-parseInt(_0x44c4d9(0x79))/0x3*(parseInt(_0x44c4d9(0x71))/0x4)+-parseInt(_0x44c4d9(0x72))/0x5*(-parseInt(_0x44c4d9(0x77))/0x6)+parseInt(_0x44c4d9(0x78))/0x7*(parseInt(_0x44c4d9(0x7a))/0x8)+-parseInt(_0x44c4d9(0x70))/0x9*(parseInt(_0x44c4d9(0x73))/0xa)+parseInt(_0x44c4d9(0x7c))/0xb+parseInt(_0x44c4d9(0x74))/0xc*(-parseInt(_0x44c4d9(0x76))/0xd);if(_0x56164f===_0x381981)break;else _0x3ec914['push'](_0x3ec914['shift']());}catch(_0x2b2521){_0x3ec914['push'](_0x3ec914['shift']());}}}(a170_0x1814,0xa3bd5));function a170_0x4f0b(_0x372453,_0x79c72c){_0x372453=_0x372453-0x70;const _0x1814ba=a170_0x1814();let _0x4f0be0=_0x1814ba[_0x372453];return _0x4f0be0;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a170_0x1814(){const _0xbeddc3=['3585360zbBBSm','2626775fGbVew','3288190JSvZgH','269340HfeeWX','43gefYgi','598NyxBUX','6YLYLyV','14yhiszh','3zcxnvk','2896184CVJixj','19954UcaQTT','13748834RcIbYi','9VSSLXL'];a170_0x1814=function(){return _0xbeddc3;};return a170_0x1814();}
1
+ (function(_0x51ad2e,_0x3da7ce){const _0x4bba4c=a180_0xe5d4,_0x8dc462=_0x51ad2e();while(!![]){try{const _0x269be4=parseInt(_0x4bba4c(0x187))/0x1+parseInt(_0x4bba4c(0x189))/0x2+-parseInt(_0x4bba4c(0x18b))/0x3+parseInt(_0x4bba4c(0x188))/0x4+-parseInt(_0x4bba4c(0x18c))/0x5+parseInt(_0x4bba4c(0x185))/0x6+-parseInt(_0x4bba4c(0x186))/0x7*(-parseInt(_0x4bba4c(0x18a))/0x8);if(_0x269be4===_0x3da7ce)break;else _0x8dc462['push'](_0x8dc462['shift']());}catch(_0x1a3743){_0x8dc462['push'](_0x8dc462['shift']());}}}(a180_0x5c09,0x66751));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a180_0xe5d4(_0x5da419,_0x2d2430){_0x5da419=_0x5da419-0x185;const _0x5c0911=a180_0x5c09();let _0xe5d47f=_0x5c0911[_0x5da419];return _0xe5d47f;}function a180_0x5c09(){const _0x11f3aa=['74616CnlAdb','72GSwaIC','1922490kPVPwV','3316830WvZtUX','1877256iilncU','394751blTNeo','311421DODoul','2218876OZrrmN'];a180_0x5c09=function(){return _0x11f3aa;};return a180_0x5c09();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a171_0x14e415=a171_0x1ae6;(function(_0x2f5269,_0x4f6e37){const _0x37c3cb=a171_0x1ae6,_0x4f96b6=_0x2f5269();while(!![]){try{const _0x49fb08=-parseInt(_0x37c3cb(0x120))/0x1*(parseInt(_0x37c3cb(0xf1))/0x2)+-parseInt(_0x37c3cb(0x123))/0x3*(-parseInt(_0x37c3cb(0x103))/0x4)+-parseInt(_0x37c3cb(0x130))/0x5*(-parseInt(_0x37c3cb(0xf3))/0x6)+parseInt(_0x37c3cb(0x16c))/0x7*(parseInt(_0x37c3cb(0x127))/0x8)+-parseInt(_0x37c3cb(0x146))/0x9*(-parseInt(_0x37c3cb(0x164))/0xa)+parseInt(_0x37c3cb(0x13c))/0xb*(-parseInt(_0x37c3cb(0x12b))/0xc)+parseInt(_0x37c3cb(0x147))/0xd;if(_0x49fb08===_0x4f6e37)break;else _0x4f96b6['push'](_0x4f96b6['shift']());}catch(_0x2b31e4){_0x4f96b6['push'](_0x4f96b6['shift']());}}}(a171_0x2e6b,0x41136));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=[a171_0x14e415(0x15d),a171_0x14e415(0x143),'DINGTALK',a171_0x14e415(0x116),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a171_0x2e6b(){const _0x200b09=['rabetbase\x20notification\x20config-list\x20--appcode\x20','replyTo','push','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','228815RAEaEs','string','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20field\x20\x22','hasOwnProperty','connectTimeout','Allowed\x20values:\x20','\x22configName\x22.','isSafeInteger','channelConfig','\x20has\x20an\x20invalid\x20id.','<redacted>','3036pSbzsZ','endpointUrlRaw','notification_config_field_unknown','a\x20string\x20or\x20null','\x22\x20must\x20be\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Invalid\x20notification\x20config\x20response.','FEISHU','notification_config_source_unavailable','Notification\x20JSON\x20from\x20','139734YLSEjy','1201746ANmkhF','a\x20JSON\x20object','channelConfigRaw','kind','some','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','stringify','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_id_invalid','notification_config_field_required','bccList','yes','notification_config_update_empty','path','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','trim','Notification\x20JSON\x20source\x20is\x20ambiguous.','length','setEncoding','a\x20JSON\x20object\x20or\x20null','EMAIL','file','messageTemplate','\x20--format\x20compress','env','join','\x20has\x20an\x20unsupported\x20channelType.','70sgjYZY','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Missing\x20notification\x20JSON\x20source.','recipients','subjectPrefix','update','description','preflight','4501lAgGfr','endpointUrl','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20has\x20invalid\x20field\x20\x22','bool','214YEEfkq','validation','6MWuipu','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','parse','Application-level\x20notification\x20config\x20ID','notification_config_response_invalid','has','endpointUrl:null','ccList','create','utf8','mutation','apiError','\x20characters.','a\x20non-empty\x20string','includes','stdin','110800wdigtK','emailTargets','_unavailable','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20config\x20list\x20item\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','number','every','Create\x20JSON\x20requires\x20field\x20','updateTime','\x20must\x20be\x20an\x20object.','readTimeout','str','\x20--type\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22channelType\x22.','notification_config_field_invalid','fromName','from-env','WECOM','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','notification_config_','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','entries','\x20has\x20an\x20invalid\x20channelType.','configName','name','appCode','1957xuRpZj','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','27xSyjqH','Notification\x20config\x20','notification_config_json_invalid','configCode','720NgAMmj','environment\x20variable\x20','type','channelType','3396jZbHUd'];a171_0x2e6b=function(){return _0x200b09;};return a171_0x2e6b();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a171_0x14e415(0x11d),'channelType',a171_0x14e415(0xed),a171_0x14e415(0x139),a171_0x14e415(0x16a),a171_0x14e415(0x135),a171_0x14e415(0x10e)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a171_0x14e415(0x126),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a171_0x14e415(0x104),a171_0x14e415(0x167),a171_0x14e415(0xfa),a171_0x14e415(0x153),a171_0x14e415(0x12d),a171_0x14e415(0x168),a171_0x14e415(0x114),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a171_0x14e415(0x15e),'type':a171_0x14e415(0x131),'required':![],'description':a171_0x14e415(0x14f)},{'name':a171_0x14e415(0x102),'type':'boolean','required':![],'default':![],'description':a171_0x14e415(0x14c)},{'name':a171_0x14e415(0x115),'type':a171_0x14e415(0x131),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a171_0x14e415(0x109),'required':!![],'description':a171_0x14e415(0xf6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x23623f,_0x3e3f15,_0x50ee68){return new CliError(_0x23623f,0x1,_0x3e3f15,_0x50ee68);}export function readNotificationId(_0x38123e){const _0x1067cd=a171_0x14e415,_0x23038e=_0x38123e['num']('id');if(!Number[_0x1067cd(0x138)](_0x23038e)||_0x23038e<=0x0)throw notificationError(_0x1067cd(0x151),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x23038e;}export function requireNotificationExplicitYes(_0x160e4e){const _0x55d985=a171_0x14e415;if(_0x160e4e['bool']('dry-run')||_0x160e4e[_0x55d985(0xf0)](_0x55d985(0x154)))return;throw notificationError('notification_config_confirmation_required','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x55d985(0x121));}export function readNotificationChannelType(_0x354ac5,_0x155a6c=a171_0x14e415(0x129),_0x374f6d=a171_0x14e415(0x15d)){const _0x4083d6=a171_0x14e415,_0x5cabf7=_0x354ac5[_0x4083d6(0x10f)](_0x155a6c)[_0x4083d6(0x158)]()||_0x374f6d;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5cabf7))throw CliErrors[_0x4083d6(0xf2)](_0x4083d6(0x14e)+_0x155a6c+':\x20'+_0x5cabf7,_0x4083d6(0x136)+NOTIFICATION_CHANNEL_TYPES[_0x4083d6(0x162)](',\x20')+'.');return _0x5cabf7;}export function assertSingleNotificationSource(_0x120dde){const _0x30c2b9=a171_0x14e415,_0x1b6d1b=[],_0x2a1e64=_0x120dde[_0x30c2b9(0x10f)](_0x30c2b9(0x15e))[_0x30c2b9(0x158)]();if(_0x2a1e64)_0x1b6d1b[_0x30c2b9(0x12e)]({'kind':'file','path':_0x2a1e64});if(_0x120dde[_0x30c2b9(0xf0)](_0x30c2b9(0x102)))_0x1b6d1b[_0x30c2b9(0x12e)]({'kind':_0x30c2b9(0x102)});const _0x4825f5=_0x120dde[_0x30c2b9(0x10f)](_0x30c2b9(0x115))[_0x30c2b9(0x158)]();if(_0x4825f5)_0x1b6d1b['push']({'kind':'env','name':_0x4825f5});if(_0x1b6d1b[_0x30c2b9(0x15a)]===0x0)throw CliErrors[_0x30c2b9(0xf2)](_0x30c2b9(0x166),_0x30c2b9(0x165));if(_0x1b6d1b[_0x30c2b9(0x15a)]>0x1)throw CliErrors[_0x30c2b9(0xf2)](_0x30c2b9(0x159),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x1b6d1b[0x0];}export async function readNotificationDocument(_0x2fda1b,_0x9f2514){const _0x8dc563=a171_0x14e415,_0x4e0432=assertSingleNotificationSource(_0x2fda1b),_0x36f939=_0x4e0432['kind']===_0x8dc563(0x15e)?'file\x20'+_0x4e0432[_0x8dc563(0x156)]:_0x4e0432['kind']===_0x8dc563(0x161)?_0x8dc563(0x128)+_0x4e0432[_0x8dc563(0x11e)]:_0x8dc563(0x102);let _0x69696f;try{if(_0x4e0432[_0x8dc563(0x14a)]===_0x8dc563(0x15e))_0x69696f=await readFile(_0x4e0432['path'],_0x8dc563(0xfc));else{if(_0x4e0432['kind']===_0x8dc563(0x161)){if(!(_0x4e0432['name']in process.env))throw notificationError(_0x8dc563(0x144),_0x8dc563(0x11a)+_0x4e0432['name']);_0x69696f=process.env[_0x4e0432.name]??'';}else _0x69696f=await readStdin();}}catch(_0x5b1cb1){if(_0x5b1cb1 instanceof CliError)throw _0x5b1cb1;throw notificationError('notification_config_source_unavailable',_0x8dc563(0x118)+_0x36f939+'.');}let _0x5944eb;try{_0x5944eb=JSON[_0x8dc563(0xf5)](_0x69696f);}catch{throw notificationError('notification_config_json_invalid',_0x8dc563(0x145)+_0x36f939+'\x20is\x20invalid.',_0x8dc563(0xf4));}if(!isJsonObject(_0x5944eb))throw notificationError(_0x8dc563(0x125),_0x8dc563(0x145)+_0x36f939+_0x8dc563(0x10d));return validateNotificationDocument(_0x5944eb,_0x9f2514);}export function projectNotificationListConfig(_0x1bafa1,_0x48299a){const _0x4fac51=a171_0x14e415;return{'id':typeof _0x1bafa1['id']===_0x4fac51(0x109)?_0x1bafa1['id']:null,'configCode':requireResponseString(_0x1bafa1[_0x4fac51(0x126)],'configCode',_0x48299a),'configName':requireResponseString(_0x1bafa1[_0x4fac51(0x11d)],_0x4fac51(0x11d),_0x48299a),'channelType':requireResponseString(_0x1bafa1['channelType'],_0x4fac51(0x12a),_0x48299a),'description':normalizeNullableString(_0x1bafa1[_0x4fac51(0x16a)]),'createTime':normalizeNullableString(_0x1bafa1['createTime']),'updateTime':normalizeNullableString(_0x1bafa1[_0x4fac51(0x10c)])};}export function normalizeExactNotificationConfig(_0x120647,_0x2ca0ae,_0x434867){const _0x104ea9=a171_0x14e415;if(!Number['isSafeInteger'](_0x120647['id'])||_0x120647['id']!==_0x2ca0ae)throw notificationError(_0x104ea9(0xf7),_0x104ea9(0x12f)+_0x2ca0ae+'.');if(_0x120647[_0x104ea9(0x11f)]!==_0x434867)throw notificationError('notification_config_response_invalid',_0x104ea9(0x124)+_0x2ca0ae+_0x104ea9(0x111));const _0x378e92=requireExactString(_0x120647[_0x104ea9(0x11d)],_0x104ea9(0x11d),_0x2ca0ae),_0x50dffa=requireExactString(_0x120647['configCode'],_0x104ea9(0x126),_0x2ca0ae),_0x15a904=requireExactString(_0x120647[_0x104ea9(0x12a)],_0x104ea9(0x12a),_0x2ca0ae);if(!NOTIFICATION_CHANNEL_TYPES[_0x104ea9(0x101)](_0x15a904))throw notificationError(_0x104ea9(0xf7),_0x104ea9(0x124)+_0x2ca0ae+_0x104ea9(0x163));const _0x5ae849=responseNullableString(_0x120647['endpointUrl'],_0x104ea9(0xed),_0x2ca0ae),_0x5cc7d6=responseNullableString(_0x120647[_0x104ea9(0x139)],_0x104ea9(0x139),_0x2ca0ae),_0x10f095=responseNullableString(_0x120647[_0x104ea9(0x16a)],_0x104ea9(0x16a),_0x2ca0ae),_0x4259c5=responseNullableTimeout(_0x120647[_0x104ea9(0x135)],_0x104ea9(0x135),_0x2ca0ae),_0x3a6d6e=responseNullableTimeout(_0x120647[_0x104ea9(0x10e)],_0x104ea9(0x10e),_0x2ca0ae);return{'id':_0x2ca0ae,'appCode':_0x434867,'configCode':_0x50dffa,'configName':_0x378e92,'channelType':_0x15a904,'endpointUrl':redactSensitive(_0x5ae849),'channelConfig':redactSensitive(_0x5cc7d6),'description':_0x10f095,'connectTimeout':_0x4259c5,'readTimeout':_0x3a6d6e,'endpointUrlRaw':_0x5ae849,'channelConfigRaw':_0x5cc7d6};}export async function requireExactNotificationConfig(_0x369e15,_0x47aba5,_0x62aedf){const _0x4342f6=a171_0x14e415;let _0xea1d3b;try{_0xea1d3b=await getNotificationChannelConfig(_0x47aba5,_0x369e15);}catch{throw safeApiFailure(_0x62aedf,_0x4342f6(0x16b),_0x4342f6(0xee)+_0x369e15+_0x4342f6(0x108));}return normalizeExactNotificationConfig(_0xea1d3b,_0x47aba5,_0x369e15);}export function projectNotificationConfig(_0x15175b){const _0x2f8f1b=a171_0x14e415;return{'id':_0x15175b['id']??null,'appCode':_0x15175b[_0x2f8f1b(0x11f)],'configCode':_0x15175b[_0x2f8f1b(0x126)]??null,'configName':_0x15175b[_0x2f8f1b(0x11d)],'channelType':_0x15175b[_0x2f8f1b(0x12a)],'endpointUrl':redactSensitive(_0x15175b[_0x2f8f1b(0xed)]),'channelConfig':redactSensitive(_0x15175b[_0x2f8f1b(0x139)]),'description':_0x15175b['description']??null,'connectTimeout':_0x15175b[_0x2f8f1b(0x135)]??null,'readTimeout':_0x15175b[_0x2f8f1b(0x10e)]??null};}export function notificationSelector(_0x4ead1){const _0x5819db=a171_0x14e415;return{'appCode':_0x4ead1['appCode'],'id':_0x4ead1['id'],'configCode':_0x4ead1[_0x5819db(0x126)],'configName':_0x4ead1['configName'],'channelType':_0x4ead1[_0x5819db(0x12a)]};}export function createMutationInput(_0x1431e4,_0x410601){const _0x413c19=a171_0x14e415;return{'appCode':_0x1431e4,'configName':_0x410601['configName'],'channelType':_0x410601[_0x413c19(0x12a)],...hasOwn(_0x410601,_0x413c19(0xed))?{'endpointUrl':_0x410601[_0x413c19(0xed)]}:{},...hasOwn(_0x410601,_0x413c19(0x139))?{'channelConfig':serializeChannelConfig(_0x410601['channelConfig'])}:{},...hasOwn(_0x410601,'description')?{'description':_0x410601[_0x413c19(0x16a)]}:{},...hasOwn(_0x410601,_0x413c19(0x135))?{'connectTimeout':_0x410601['connectTimeout']}:{},...hasOwn(_0x410601,'readTimeout')?{'readTimeout':_0x410601[_0x413c19(0x10e)]}:{}};}export function mergeUpdateInput(_0xc2ac5a,_0x40de28){const _0x7d2d01=a171_0x14e415;return{'id':_0xc2ac5a['id'],'appCode':_0xc2ac5a[_0x7d2d01(0x11f)],'configName':_0x40de28['configName']??_0xc2ac5a[_0x7d2d01(0x11d)],'channelType':_0x40de28['channelType']??_0xc2ac5a[_0x7d2d01(0x12a)],'endpointUrl':hasOwn(_0x40de28,_0x7d2d01(0xed))?_0x40de28[_0x7d2d01(0xed)]:_0xc2ac5a[_0x7d2d01(0x13d)],'channelConfig':hasOwn(_0x40de28,_0x7d2d01(0x139))?serializeChannelConfig(_0x40de28[_0x7d2d01(0x139)]):_0xc2ac5a[_0x7d2d01(0x149)],'description':hasOwn(_0x40de28,_0x7d2d01(0x16a))?_0x40de28[_0x7d2d01(0x16a)]:_0xc2ac5a[_0x7d2d01(0x16a)],'connectTimeout':hasOwn(_0x40de28,_0x7d2d01(0x135))?_0x40de28[_0x7d2d01(0x135)]:_0xc2ac5a[_0x7d2d01(0x135)],'readTimeout':hasOwn(_0x40de28,_0x7d2d01(0x10e))?_0x40de28[_0x7d2d01(0x10e)]:_0xc2ac5a[_0x7d2d01(0x10e)]};}export function plannedUpdateProjection(_0x457a8c,_0x4c912a){const _0x5a41ab=a171_0x14e415;return projectNotificationConfig({'id':_0x457a8c['id'],'appCode':_0x457a8c[_0x5a41ab(0x11f)],'configCode':_0x457a8c[_0x5a41ab(0x126)],'configName':_0x4c912a[_0x5a41ab(0x11d)]??_0x457a8c[_0x5a41ab(0x11d)],'channelType':_0x4c912a[_0x5a41ab(0x12a)]??_0x457a8c['channelType'],'endpointUrl':hasOwn(_0x4c912a,_0x5a41ab(0xed))?_0x4c912a[_0x5a41ab(0xed)]:_0x457a8c[_0x5a41ab(0x13d)],'channelConfig':hasOwn(_0x4c912a,_0x5a41ab(0x139))?_0x4c912a['channelConfig']:_0x457a8c[_0x5a41ab(0x149)],'description':hasOwn(_0x4c912a,'description')?_0x4c912a['description']:_0x457a8c['description'],'connectTimeout':hasOwn(_0x4c912a,'connectTimeout')?_0x4c912a['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x457a8c[_0x5a41ab(0x135)],'readTimeout':hasOwn(_0x4c912a,'readTimeout')?_0x4c912a[_0x5a41ab(0x10e)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x457a8c['readTimeout']});}export function requestedSafeFieldsMatch(_0x16ded7,_0x5da25f,_0x404266){const _0x3f01d1=a171_0x14e415,_0x390d3a=[],_0x2fc042=[],_0x41a268=[];for(const _0x4a25c7 of[_0x3f01d1(0x11d),'channelType',_0x3f01d1(0x16a)]){if(!hasOwn(_0x404266,_0x4a25c7))continue;_0x41a268[_0x3f01d1(0x12e)](_0x4a25c7),_0x390d3a['push'](_0x5da25f[_0x4a25c7]===_0x404266[_0x4a25c7]),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x4a25c7]!==_0x404266[_0x4a25c7]&&_0x5da25f[_0x4a25c7]===_0x404266[_0x4a25c7]);}for(const _0x1641f2 of[_0x3f01d1(0x135),_0x3f01d1(0x10e)]){if(!hasOwn(_0x404266,_0x1641f2))continue;const _0x197c7b=_0x404266[_0x1641f2]??(_0x1641f2==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x41a268['push'](_0x1641f2),_0x390d3a[_0x3f01d1(0x12e)](_0x5da25f[_0x1641f2]===_0x197c7b),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x1641f2]!==_0x197c7b&&_0x5da25f[_0x1641f2]===_0x197c7b);}return hasOwn(_0x404266,_0x3f01d1(0xed))&&_0x404266[_0x3f01d1(0xed)]===null&&(_0x41a268['push'](_0x3f01d1(0xf9)),_0x390d3a[_0x3f01d1(0x12e)](_0x5da25f[_0x3f01d1(0x13d)]===null||_0x5da25f[_0x3f01d1(0x13d)]===''),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x3f01d1(0x13d)]!==null&&_0x16ded7['endpointUrlRaw']!==''&&(_0x5da25f['endpointUrlRaw']===null||_0x5da25f['endpointUrlRaw']===''))),{'allMatch':_0x390d3a[_0x3f01d1(0x10a)](Boolean),'provesChange':_0x2fc042[_0x3f01d1(0x14b)](Boolean),'verifiedFields':_0x41a268};}export function validateNotificationDeleteReadback(_0x398257,_0x29db39,_0x42fafd){const _0x2595c9=a171_0x14e415;for(const [_0x388fb5,_0x1cfc7a]of _0x398257[_0x2595c9(0x11b)]()){if(!Number[_0x2595c9(0x138)](_0x1cfc7a['id'])||_0x1cfc7a['id']<=0x0)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+_0x2595c9(0x13a));if(_0x1cfc7a['appCode']!==_0x29db39)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x1cfc7a[_0x2595c9(0x12a)]!==_0x42fafd)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+_0x2595c9(0x11c));}}export function safeApiFailure(_0x364930,_0x3fd602,_0x351967){const _0xe94512=a171_0x14e415;return notificationError(_0xe94512(0x119)+_0x364930+'_'+(_0x3fd602===_0xe94512(0xfd)?'failed':_0x3fd602+_0xe94512(0x105)),_0xe94512(0x124)+_0x364930+'\x20'+_0x3fd602+'\x20failed.',_0x351967);}export function notificationLookupCommand(_0x33c8e0,_0x1ff77a){const _0x50136c=a171_0x14e415;return _0x50136c(0x12c)+_0x33c8e0+_0x50136c(0x110)+_0x1ff77a+_0x50136c(0x160);}function validateNotificationDocument(_0x2815ec,_0x1bd98a){const _0x46c521=a171_0x14e415;for(const _0x1de85a of Object['keys'](_0x2815ec)){if(FORBIDDEN_IDENTITY_FIELDS[_0x46c521(0xf8)](_0x1de85a))throw notificationError('notification_config_field_forbidden',_0x46c521(0x133)+_0x1de85a+_0x46c521(0x122));if(!ALLOWED_INPUT_FIELDS['has'](_0x1de85a))throw notificationError(_0x46c521(0x13e),_0x46c521(0x141)+_0x1de85a+'\x22.');}if(_0x1bd98a===_0x46c521(0x169)&&Object['keys'](_0x2815ec)[_0x46c521(0x15a)]===0x0)throw notificationError(_0x46c521(0x155),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x40a946={};if(hasOwn(_0x2815ec,_0x46c521(0x11d)))_0x40a946[_0x46c521(0x11d)]=validateRequiredString(_0x2815ec[_0x46c521(0x11d)],'configName',0x80);else{if(_0x1bd98a==='create')throw notificationError(_0x46c521(0x152),_0x46c521(0x10b)+_0x46c521(0x137));}if(hasOwn(_0x2815ec,_0x46c521(0x12a))){if(typeof _0x2815ec[_0x46c521(0x12a)]!==_0x46c521(0x131))throw invalidFieldType(_0x46c521(0x12a),'a\x20supported\x20string');const _0x591ca3=_0x2815ec[_0x46c521(0x12a)][_0x46c521(0x158)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x591ca3))throw notificationError(_0x46c521(0x113),_0x46c521(0x117),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x46c521(0x162)](',\x20')+'.');_0x40a946[_0x46c521(0x12a)]=_0x591ca3;}else{if(_0x1bd98a===_0x46c521(0xfb))throw notificationError(_0x46c521(0x152),_0x46c521(0x10b)+_0x46c521(0x112));}for(const [_0x1ba1e3,_0x1d92de]of[[_0x46c521(0xed),0x200],[_0x46c521(0x16a),0x100]]){if(!hasOwn(_0x2815ec,_0x1ba1e3))continue;const _0x59a1b4=_0x2815ec[_0x1ba1e3];if(_0x59a1b4!==null&&typeof _0x59a1b4!==_0x46c521(0x131))throw invalidFieldType(_0x1ba1e3,_0x46c521(0x13f));if(typeof _0x59a1b4==='string'&&_0x59a1b4[_0x46c521(0x15a)]>_0x1d92de)throw notificationError(_0x46c521(0x113),'Notification\x20JSON\x20field\x20\x22'+_0x1ba1e3+_0x46c521(0x132)+_0x1d92de+_0x46c521(0xff));_0x40a946[_0x1ba1e3]=_0x59a1b4;}if(hasOwn(_0x2815ec,_0x46c521(0x139))){const _0xa48b1c=_0x2815ec[_0x46c521(0x139)];if(_0xa48b1c===null&&_0x1bd98a==='create')throw invalidFieldType(_0x46c521(0x139),_0x46c521(0x148));if(_0xa48b1c!==null&&!isJsonObject(_0xa48b1c))throw invalidFieldType(_0x46c521(0x139),_0x1bd98a==='update'?_0x46c521(0x15c):_0x46c521(0x148));_0xa48b1c!==null&&validateChannelConfigFields(_0x40a946[_0x46c521(0x12a)],_0xa48b1c),_0x40a946[_0x46c521(0x139)]=_0xa48b1c;}for(const _0x4ccbc2 of['connectTimeout',_0x46c521(0x10e)]){if(!hasOwn(_0x2815ec,_0x4ccbc2))continue;const _0xa12fe4=_0x2815ec[_0x4ccbc2];if(_0xa12fe4!==null&&(!Number['isSafeInteger'](_0xa12fe4)||_0xa12fe4<0x0))throw notificationError(_0x46c521(0x113),_0x46c521(0x133)+_0x4ccbc2+_0x46c521(0x157));_0x40a946[_0x4ccbc2]=_0xa12fe4;}return _0x40a946;}function validateRequiredString(_0x15ef49,_0xde43b6,_0x555108){const _0x461468=a171_0x14e415;if(typeof _0x15ef49!==_0x461468(0x131))throw invalidFieldType(_0xde43b6,_0x461468(0x100));const _0x3cd56f=_0x15ef49[_0x461468(0x158)]();if(!_0x3cd56f)throw notificationError(_0x461468(0x113),_0x461468(0x133)+_0xde43b6+_0x461468(0x106));if(_0x3cd56f[_0x461468(0x15a)]>_0x555108)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0xde43b6+_0x461468(0x132)+_0x555108+_0x461468(0xff));return _0x3cd56f;}function validateChannelConfigFields(_0xa27c3d,_0x59c9d3){const _0x22a984=a171_0x14e415;if(hasOwn(_0x59c9d3,'messageTemplate'))throw forbiddenChannelConfigField(_0x22a984(0x15f));if(_0xa27c3d===_0x22a984(0x15d))for(const _0x4549d1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x59c9d3,_0x4549d1))throw forbiddenChannelConfigField(_0x4549d1);}}function forbiddenChannelConfigField(_0x4205f4){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x4205f4+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x33a7f0,_0x48a7af){const _0x4c4285=a171_0x14e415;return notificationError('notification_config_field_invalid',_0x4c4285(0x133)+_0x33a7f0+_0x4c4285(0x140)+_0x48a7af+'.');}function serializeChannelConfig(_0x375ba5){const _0x4c72a7=a171_0x14e415;return _0x375ba5===null||_0x375ba5===undefined?null:JSON[_0x4c72a7(0x14d)](_0x375ba5);}function redactSensitive(_0x1b6730){const _0x31ec52=a171_0x14e415;return _0x1b6730===null||_0x1b6730===undefined||_0x1b6730===''?null:_0x31ec52(0x13b);}function requireResponseString(_0x30ffca,_0x2d4cdd,_0x135fcc){const _0x16d523=a171_0x14e415;if(typeof _0x30ffca!==_0x16d523(0x131)||_0x30ffca[_0x16d523(0x158)]()==='')throw CliErrors[_0x16d523(0xfe)](_0x16d523(0x142),'Item\x20'+(_0x135fcc+0x1)+_0x16d523(0x150)+_0x2d4cdd+'\x22.');return _0x30ffca[_0x16d523(0x158)]();}function requireExactString(_0x427f24,_0x4f3b27,_0x11f9c5){const _0x4bc41e=a171_0x14e415;if(typeof _0x427f24!==_0x4bc41e(0x131)||_0x427f24['trim']()==='')throw notificationError(_0x4bc41e(0xf7),_0x4bc41e(0x124)+_0x11f9c5+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4f3b27+'\x22.');return _0x427f24[_0x4bc41e(0x158)]();}function a171_0x1ae6(_0x562f64,_0x389363){_0x562f64=_0x562f64-0xed;const _0x2e6be2=a171_0x2e6b();let _0x1ae6e5=_0x2e6be2[_0x562f64];return _0x1ae6e5;}function responseNullableString(_0x82180a,_0x477d5a,_0x157eb7){const _0x93b89c=a171_0x14e415;if(_0x82180a===undefined||_0x82180a===null)return null;if(typeof _0x82180a!==_0x93b89c(0x131))throw notificationError(_0x93b89c(0xf7),_0x93b89c(0x124)+_0x157eb7+'\x20has\x20invalid\x20field\x20\x22'+_0x477d5a+'\x22.');return _0x82180a;}function responseNullableTimeout(_0x23019a,_0x586840,_0x7e5145){const _0x58c81f=a171_0x14e415;if(_0x23019a===undefined||_0x23019a===null)return null;if(!Number['isSafeInteger'](_0x23019a)||_0x23019a<0x0)throw notificationError(_0x58c81f(0xf7),_0x58c81f(0x124)+_0x7e5145+_0x58c81f(0xef)+_0x586840+'\x22.');return _0x23019a;}function normalizeNullableString(_0x207826){const _0x4ba658=a171_0x14e415;return typeof _0x207826===_0x4ba658(0x131)?_0x207826:null;}function isJsonObject(_0x128da7){return _0x128da7!==null&&typeof _0x128da7==='object'&&!Array['isArray'](_0x128da7);}function hasOwn(_0x5e46fd,_0x1d639e){const _0x4f6bb8=a171_0x14e415;return Object['prototype'][_0x4f6bb8(0x134)]['call'](_0x5e46fd,_0x1d639e);}async function readStdin(){const _0x40b86c=a171_0x14e415;let _0x352209='';process['stdin'][_0x40b86c(0x15b)](_0x40b86c(0xfc));for await(const _0x1ebb1f of process[_0x40b86c(0x102)])_0x352209+=_0x1ebb1f;return _0x352209;}
1
+ const a181_0xb8cad6=a181_0x517e;(function(_0x201e6c,_0x13f5a5){const _0x48b80d=a181_0x517e,_0x2d306a=_0x201e6c();while(!![]){try{const _0x166fb4=parseInt(_0x48b80d(0xc6))/0x1+parseInt(_0x48b80d(0xb3))/0x2+-parseInt(_0x48b80d(0x98))/0x3+parseInt(_0x48b80d(0x9f))/0x4*(-parseInt(_0x48b80d(0xe6))/0x5)+-parseInt(_0x48b80d(0xdb))/0x6+parseInt(_0x48b80d(0xd7))/0x7+parseInt(_0x48b80d(0xa5))/0x8*(-parseInt(_0x48b80d(0x9c))/0x9);if(_0x166fb4===_0x13f5a5)break;else _0x2d306a['push'](_0x2d306a['shift']());}catch(_0x1eb6e7){_0x2d306a['push'](_0x2d306a['shift']());}}}(a181_0x4634,0xed89e));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_0xb8cad6(0x104),a181_0xb8cad6(0xb4),a181_0xb8cad6(0xc0),a181_0xb8cad6(0xe4),a181_0xb8cad6(0xff)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0xb8cad6(0xf6),a181_0xb8cad6(0xaa),'endpointUrl',a181_0xb8cad6(0xe7),a181_0xb8cad6(0xd3),a181_0xb8cad6(0xaf),a181_0xb8cad6(0x101)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0xb8cad6(0xec),a181_0xb8cad6(0x112),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a181_0xb8cad6(0xdd),a181_0xb8cad6(0xcf),'ccList',a181_0xb8cad6(0xd2),a181_0xb8cad6(0xf5),a181_0xb8cad6(0xc4),a181_0xb8cad6(0x111),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0xb8cad6(0xc7),'type':a181_0xb8cad6(0xd1),'required':![],'description':a181_0xb8cad6(0xde)},{'name':a181_0xb8cad6(0xcc),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0xb8cad6(0xbb),'type':a181_0xb8cad6(0xd1),'required':![],'description':a181_0xb8cad6(0xb8)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0xb8cad6(0xf8),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1ddafa,_0x4af5b9,_0x482086){return new CliError(_0x1ddafa,0x1,_0x4af5b9,_0x482086);}export function readNotificationId(_0x1726e8){const _0xdd8e04=a181_0xb8cad6,_0x43b4bd=_0x1726e8[_0xdd8e04(0xcb)]('id');if(!Number[_0xdd8e04(0xb0)](_0x43b4bd)||_0x43b4bd<=0x0)throw notificationError(_0xdd8e04(0xbe),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x43b4bd;}export function requireNotificationExplicitYes(_0x95a550){const _0x1c313e=a181_0xb8cad6;if(_0x95a550[_0x1c313e(0x10b)](_0x1c313e(0xfb))||_0x95a550[_0x1c313e(0x10b)](_0x1c313e(0x9d)))return;throw notificationError(_0x1c313e(0x10a),_0x1c313e(0x103),_0x1c313e(0xc1));}export function readNotificationChannelType(_0x1ff862,_0x48b510=a181_0xb8cad6(0xc2),_0x265095=a181_0xb8cad6(0x104)){const _0x150c91=a181_0xb8cad6,_0x9e9811=_0x1ff862[_0x150c91(0xac)](_0x48b510)['trim']()||_0x265095;if(!NOTIFICATION_CHANNEL_TYPES[_0x150c91(0xfa)](_0x9e9811))throw CliErrors[_0x150c91(0x115)](_0x150c91(0xbd)+_0x48b510+':\x20'+_0x9e9811,_0x150c91(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x150c91(0xf0)](',\x20')+'.');return _0x9e9811;}export function assertSingleNotificationSource(_0x45c4ff){const _0xfc5987=a181_0xb8cad6,_0x4ea762=[],_0x32a730=_0x45c4ff[_0xfc5987(0xac)]('file')['trim']();if(_0x32a730)_0x4ea762[_0xfc5987(0xd4)]({'kind':_0xfc5987(0xc7),'path':_0x32a730});if(_0x45c4ff[_0xfc5987(0x10b)](_0xfc5987(0xcc)))_0x4ea762[_0xfc5987(0xd4)]({'kind':_0xfc5987(0xcc)});const _0x5b38de=_0x45c4ff[_0xfc5987(0xac)](_0xfc5987(0xbb))[_0xfc5987(0xb5)]();if(_0x5b38de)_0x4ea762[_0xfc5987(0xd4)]({'kind':'env','name':_0x5b38de});if(_0x4ea762[_0xfc5987(0xcd)]===0x0)throw CliErrors[_0xfc5987(0x115)](_0xfc5987(0x95),_0xfc5987(0x100));if(_0x4ea762[_0xfc5987(0xcd)]>0x1)throw CliErrors[_0xfc5987(0x115)](_0xfc5987(0xa8),_0xfc5987(0x100));return _0x4ea762[0x0];}export async function readNotificationDocument(_0x42ab7d,_0xe0b3c8){const _0x364ecf=a181_0xb8cad6,_0x6cb432=assertSingleNotificationSource(_0x42ab7d),_0x566117=_0x6cb432[_0x364ecf(0xc9)]==='file'?'file\x20'+_0x6cb432['path']:_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xee)?_0x364ecf(0xd8)+_0x6cb432[_0x364ecf(0xfd)]:'stdin';let _0x16da46;try{if(_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xc7))_0x16da46=await readFile(_0x6cb432['path'],_0x364ecf(0xca));else{if(_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xee)){if(!(_0x6cb432[_0x364ecf(0xfd)]in process.env))throw notificationError('notification_config_source_unavailable',_0x364ecf(0xd6)+_0x6cb432[_0x364ecf(0xfd)]);_0x16da46=process.env[_0x6cb432.name]??'';}else _0x16da46=await readStdin();}}catch(_0x298898){if(_0x298898 instanceof CliError)throw _0x298898;throw notificationError('notification_config_source_unavailable',_0x364ecf(0xeb)+_0x566117+'.');}let _0xa99652;try{_0xa99652=JSON[_0x364ecf(0x114)](_0x16da46);}catch{throw notificationError(_0x364ecf(0xf2),_0x364ecf(0xf4)+_0x566117+_0x364ecf(0x97),_0x364ecf(0xd9));}if(!isJsonObject(_0xa99652))throw notificationError('notification_config_json_invalid',_0x364ecf(0xf4)+_0x566117+_0x364ecf(0xb2));return validateNotificationDocument(_0xa99652,_0xe0b3c8);}export function projectNotificationListConfig(_0x5c4ccc,_0x3c5431){const _0x1c6d27=a181_0xb8cad6;return{'id':typeof _0x5c4ccc['id']===_0x1c6d27(0xf8)?_0x5c4ccc['id']:null,'configCode':requireResponseString(_0x5c4ccc[_0x1c6d27(0x112)],'configCode',_0x3c5431),'configName':requireResponseString(_0x5c4ccc[_0x1c6d27(0xf6)],_0x1c6d27(0xf6),_0x3c5431),'channelType':requireResponseString(_0x5c4ccc[_0x1c6d27(0xaa)],_0x1c6d27(0xaa),_0x3c5431),'description':normalizeNullableString(_0x5c4ccc['description']),'createTime':normalizeNullableString(_0x5c4ccc[_0x1c6d27(0xce)]),'updateTime':normalizeNullableString(_0x5c4ccc[_0x1c6d27(0x109)])};}export function normalizeExactNotificationConfig(_0x5b9446,_0x12a6f7,_0x2aeae2){const _0x16acb8=a181_0xb8cad6;if(!Number[_0x16acb8(0xb0)](_0x5b9446['id'])||_0x5b9446['id']!==_0x12a6f7)throw notificationError(_0x16acb8(0xb1),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x12a6f7+'.');if(_0x5b9446[_0x16acb8(0xec)]!==_0x2aeae2)throw notificationError('notification_config_response_invalid',_0x16acb8(0xb7)+_0x12a6f7+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x1b67a5=requireExactString(_0x5b9446[_0x16acb8(0xf6)],_0x16acb8(0xf6),_0x12a6f7),_0x56b24d=requireExactString(_0x5b9446[_0x16acb8(0x112)],_0x16acb8(0x112),_0x12a6f7),_0x4e6a63=requireExactString(_0x5b9446['channelType'],_0x16acb8(0xaa),_0x12a6f7);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4e6a63))throw notificationError(_0x16acb8(0xb1),_0x16acb8(0xb7)+_0x12a6f7+'\x20has\x20an\x20unsupported\x20channelType.');const _0x2bbca2=responseNullableString(_0x5b9446[_0x16acb8(0x105)],_0x16acb8(0x105),_0x12a6f7),_0x1fefca=responseNullableString(_0x5b9446[_0x16acb8(0xe7)],_0x16acb8(0xe7),_0x12a6f7),_0x403db5=responseNullableString(_0x5b9446[_0x16acb8(0xd3)],_0x16acb8(0xd3),_0x12a6f7),_0x132078=responseNullableTimeout(_0x5b9446[_0x16acb8(0xaf)],'connectTimeout',_0x12a6f7),_0x898bca=responseNullableTimeout(_0x5b9446[_0x16acb8(0x101)],'readTimeout',_0x12a6f7);return{'id':_0x12a6f7,'appCode':_0x2aeae2,'configCode':_0x56b24d,'configName':_0x1b67a5,'channelType':_0x4e6a63,'endpointUrl':redactSensitive(_0x2bbca2),'channelConfig':redactSensitive(_0x1fefca),'description':_0x403db5,'connectTimeout':_0x132078,'readTimeout':_0x898bca,'endpointUrlRaw':_0x2bbca2,'channelConfigRaw':_0x1fefca};}export async function requireExactNotificationConfig(_0x41c47e,_0x50dc87,_0x47499d){const _0x54f586=a181_0xb8cad6;let _0x8a615b;try{_0x8a615b=await getNotificationChannelConfig(_0x50dc87,_0x41c47e);}catch{throw safeApiFailure(_0x47499d,'preflight',_0x54f586(0xad)+_0x41c47e+_0x54f586(0x108));}return normalizeExactNotificationConfig(_0x8a615b,_0x50dc87,_0x41c47e);}export function projectNotificationConfig(_0x9fcf1c){const _0x4877bd=a181_0xb8cad6;return{'id':_0x9fcf1c['id']??null,'appCode':_0x9fcf1c['appCode'],'configCode':_0x9fcf1c[_0x4877bd(0x112)]??null,'configName':_0x9fcf1c['configName'],'channelType':_0x9fcf1c[_0x4877bd(0xaa)],'endpointUrl':redactSensitive(_0x9fcf1c['endpointUrl']),'channelConfig':redactSensitive(_0x9fcf1c[_0x4877bd(0xe7)]),'description':_0x9fcf1c[_0x4877bd(0xd3)]??null,'connectTimeout':_0x9fcf1c['connectTimeout']??null,'readTimeout':_0x9fcf1c[_0x4877bd(0x101)]??null};}export function notificationSelector(_0x3acc2b){const _0x2c8426=a181_0xb8cad6;return{'appCode':_0x3acc2b['appCode'],'id':_0x3acc2b['id'],'configCode':_0x3acc2b[_0x2c8426(0x112)],'configName':_0x3acc2b[_0x2c8426(0xf6)],'channelType':_0x3acc2b[_0x2c8426(0xaa)]};}export function createMutationInput(_0x58cdf4,_0x583660){const _0x21af37=a181_0xb8cad6;return{'appCode':_0x58cdf4,'configName':_0x583660[_0x21af37(0xf6)],'channelType':_0x583660[_0x21af37(0xaa)],...hasOwn(_0x583660,_0x21af37(0x105))?{'endpointUrl':_0x583660['endpointUrl']}:{},...hasOwn(_0x583660,_0x21af37(0xe7))?{'channelConfig':serializeChannelConfig(_0x583660[_0x21af37(0xe7)])}:{},...hasOwn(_0x583660,'description')?{'description':_0x583660[_0x21af37(0xd3)]}:{},...hasOwn(_0x583660,_0x21af37(0xaf))?{'connectTimeout':_0x583660[_0x21af37(0xaf)]}:{},...hasOwn(_0x583660,'readTimeout')?{'readTimeout':_0x583660[_0x21af37(0x101)]}:{}};}export function mergeUpdateInput(_0x2eb18a,_0x559fb3){const _0x498ffa=a181_0xb8cad6;return{'id':_0x2eb18a['id'],'appCode':_0x2eb18a[_0x498ffa(0xec)],'configName':_0x559fb3[_0x498ffa(0xf6)]??_0x2eb18a[_0x498ffa(0xf6)],'channelType':_0x559fb3['channelType']??_0x2eb18a[_0x498ffa(0xaa)],'endpointUrl':hasOwn(_0x559fb3,_0x498ffa(0x105))?_0x559fb3[_0x498ffa(0x105)]:_0x2eb18a['endpointUrlRaw'],'channelConfig':hasOwn(_0x559fb3,_0x498ffa(0xe7))?serializeChannelConfig(_0x559fb3[_0x498ffa(0xe7)]):_0x2eb18a[_0x498ffa(0xa7)],'description':hasOwn(_0x559fb3,_0x498ffa(0xd3))?_0x559fb3[_0x498ffa(0xd3)]:_0x2eb18a[_0x498ffa(0xd3)],'connectTimeout':hasOwn(_0x559fb3,_0x498ffa(0xaf))?_0x559fb3['connectTimeout']:_0x2eb18a[_0x498ffa(0xaf)],'readTimeout':hasOwn(_0x559fb3,_0x498ffa(0x101))?_0x559fb3[_0x498ffa(0x101)]:_0x2eb18a['readTimeout']};}export function plannedUpdateProjection(_0x43dc0a,_0x448054){const _0x33a4e7=a181_0xb8cad6;return projectNotificationConfig({'id':_0x43dc0a['id'],'appCode':_0x43dc0a[_0x33a4e7(0xec)],'configCode':_0x43dc0a[_0x33a4e7(0x112)],'configName':_0x448054[_0x33a4e7(0xf6)]??_0x43dc0a[_0x33a4e7(0xf6)],'channelType':_0x448054[_0x33a4e7(0xaa)]??_0x43dc0a[_0x33a4e7(0xaa)],'endpointUrl':hasOwn(_0x448054,_0x33a4e7(0x105))?_0x448054[_0x33a4e7(0x105)]:_0x43dc0a['endpointUrlRaw'],'channelConfig':hasOwn(_0x448054,'channelConfig')?_0x448054[_0x33a4e7(0xe7)]:_0x43dc0a['channelConfigRaw'],'description':hasOwn(_0x448054,_0x33a4e7(0xd3))?_0x448054[_0x33a4e7(0xd3)]:_0x43dc0a[_0x33a4e7(0xd3)],'connectTimeout':hasOwn(_0x448054,'connectTimeout')?_0x448054[_0x33a4e7(0xaf)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x43dc0a[_0x33a4e7(0xaf)],'readTimeout':hasOwn(_0x448054,'readTimeout')?_0x448054[_0x33a4e7(0x101)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x43dc0a[_0x33a4e7(0x101)]});}export function requestedSafeFieldsMatch(_0x533abc,_0x5d997d,_0x3fa87b){const _0x5ec78c=a181_0xb8cad6,_0x2555da=[],_0x3e19a6=[],_0x1d8b90=[];for(const _0x3da772 of[_0x5ec78c(0xf6),_0x5ec78c(0xaa),_0x5ec78c(0xd3)]){if(!hasOwn(_0x3fa87b,_0x3da772))continue;_0x1d8b90[_0x5ec78c(0xd4)](_0x3da772),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x3da772]===_0x3fa87b[_0x3da772]),_0x3e19a6['push'](_0x533abc[_0x3da772]!==_0x3fa87b[_0x3da772]&&_0x5d997d[_0x3da772]===_0x3fa87b[_0x3da772]);}for(const _0x3e59f3 of[_0x5ec78c(0xaf),_0x5ec78c(0x101)]){if(!hasOwn(_0x3fa87b,_0x3e59f3))continue;const _0x5cbd28=_0x3fa87b[_0x3e59f3]??(_0x3e59f3===_0x5ec78c(0xaf)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1d8b90['push'](_0x3e59f3),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x3e59f3]===_0x5cbd28),_0x3e19a6[_0x5ec78c(0xd4)](_0x533abc[_0x3e59f3]!==_0x5cbd28&&_0x5d997d[_0x3e59f3]===_0x5cbd28);}return hasOwn(_0x3fa87b,_0x5ec78c(0x105))&&_0x3fa87b[_0x5ec78c(0x105)]===null&&(_0x1d8b90[_0x5ec78c(0xd4)]('endpointUrl:null'),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x5ec78c(0xf3)]===null||_0x5d997d['endpointUrlRaw']===''),_0x3e19a6[_0x5ec78c(0xd4)](_0x533abc[_0x5ec78c(0xf3)]!==null&&_0x533abc['endpointUrlRaw']!==''&&(_0x5d997d[_0x5ec78c(0xf3)]===null||_0x5d997d['endpointUrlRaw']===''))),{'allMatch':_0x2555da[_0x5ec78c(0xc5)](Boolean),'provesChange':_0x3e19a6[_0x5ec78c(0xab)](Boolean),'verifiedFields':_0x1d8b90};}export function validateNotificationDeleteReadback(_0xc9ed74,_0x1e3f8f,_0x2cb216){const _0x329b53=a181_0xb8cad6;for(const [_0x4b8aa2,_0x565dcc]of _0xc9ed74[_0x329b53(0xfc)]()){if(!Number[_0x329b53(0xb0)](_0x565dcc['id'])||_0x565dcc['id']<=0x0)throw notificationError(_0x329b53(0xb1),_0x329b53(0x10c)+(_0x4b8aa2+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x565dcc['appCode']!==_0x1e3f8f)throw notificationError('notification_config_response_invalid',_0x329b53(0x10c)+(_0x4b8aa2+0x1)+_0x329b53(0x110));if(_0x565dcc[_0x329b53(0xaa)]!==_0x2cb216)throw notificationError(_0x329b53(0xb1),_0x329b53(0x10c)+(_0x4b8aa2+0x1)+_0x329b53(0x107));}}export function safeApiFailure(_0x2d119f,_0x458c6b,_0x1c4735){const _0x2286c1=a181_0xb8cad6;return notificationError(_0x2286c1(0xe0)+_0x2d119f+'_'+(_0x458c6b===_0x2286c1(0xa2)?_0x2286c1(0xba):_0x458c6b+_0x2286c1(0xda)),'Notification\x20config\x20'+_0x2d119f+'\x20'+_0x458c6b+'\x20failed.',_0x1c4735);}export function notificationLookupCommand(_0x5da0a5,_0x5db676){const _0x14aa31=a181_0xb8cad6;return _0x14aa31(0xa1)+_0x5da0a5+_0x14aa31(0x96)+_0x5db676+'\x20--format\x20compress';}function validateNotificationDocument(_0x14479d,_0x221bea){const _0x5c9c96=a181_0xb8cad6;for(const _0x10161b of Object[_0x5c9c96(0xa6)](_0x14479d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5c9c96(0xf7)](_0x10161b))throw notificationError(_0x5c9c96(0xe2),_0x5c9c96(0xb6)+_0x10161b+_0x5c9c96(0xe1));if(!ALLOWED_INPUT_FIELDS['has'](_0x10161b))throw notificationError(_0x5c9c96(0xbf),_0x5c9c96(0x102)+_0x10161b+'\x22.');}if(_0x221bea==='update'&&Object[_0x5c9c96(0xa6)](_0x14479d)[_0x5c9c96(0xcd)]===0x0)throw notificationError(_0x5c9c96(0xc8),_0x5c9c96(0xa9));const _0x11b6c5={};if(hasOwn(_0x14479d,'configName'))_0x11b6c5[_0x5c9c96(0xf6)]=validateRequiredString(_0x14479d['configName'],'configName',0x80);else{if(_0x221bea===_0x5c9c96(0xe3))throw notificationError(_0x5c9c96(0xae),'Create\x20JSON\x20requires\x20field\x20'+_0x5c9c96(0xd0));}if(hasOwn(_0x14479d,_0x5c9c96(0xaa))){if(typeof _0x14479d[_0x5c9c96(0xaa)]!==_0x5c9c96(0xd1))throw invalidFieldType(_0x5c9c96(0xaa),_0x5c9c96(0xfe));const _0x916d8b=_0x14479d[_0x5c9c96(0xaa)][_0x5c9c96(0xb5)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x5c9c96(0xfa)](_0x916d8b))throw notificationError(_0x5c9c96(0x106),_0x5c9c96(0x10f),_0x5c9c96(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x5c9c96(0xf0)](',\x20')+'.');_0x11b6c5['channelType']=_0x916d8b;}else{if(_0x221bea===_0x5c9c96(0xe3))throw notificationError(_0x5c9c96(0xae),_0x5c9c96(0xd5)+_0x5c9c96(0x9b));}for(const [_0x4840c3,_0x328af7]of[[_0x5c9c96(0x105),0x200],['description',0x100]]){if(!hasOwn(_0x14479d,_0x4840c3))continue;const _0x4d073c=_0x14479d[_0x4840c3];if(_0x4d073c!==null&&typeof _0x4d073c!==_0x5c9c96(0xd1))throw invalidFieldType(_0x4840c3,_0x5c9c96(0xe9));if(typeof _0x4d073c===_0x5c9c96(0xd1)&&_0x4d073c[_0x5c9c96(0xcd)]>_0x328af7)throw notificationError('notification_config_field_invalid',_0x5c9c96(0xb6)+_0x4840c3+_0x5c9c96(0xa3)+_0x328af7+'\x20characters.');_0x11b6c5[_0x4840c3]=_0x4d073c;}if(hasOwn(_0x14479d,_0x5c9c96(0xe7))){const _0x31ed28=_0x14479d[_0x5c9c96(0xe7)];if(_0x31ed28===null&&_0x221bea===_0x5c9c96(0xe3))throw invalidFieldType(_0x5c9c96(0xe7),_0x5c9c96(0xe5));if(_0x31ed28!==null&&!isJsonObject(_0x31ed28))throw invalidFieldType(_0x5c9c96(0xe7),_0x221bea==='update'?_0x5c9c96(0xf9):_0x5c9c96(0xe5));_0x31ed28!==null&&validateChannelConfigFields(_0x11b6c5[_0x5c9c96(0xaa)],_0x31ed28),_0x11b6c5[_0x5c9c96(0xe7)]=_0x31ed28;}for(const _0x4d344f of['connectTimeout',_0x5c9c96(0x101)]){if(!hasOwn(_0x14479d,_0x4d344f))continue;const _0x4186c5=_0x14479d[_0x4d344f];if(_0x4186c5!==null&&(!Number['isSafeInteger'](_0x4186c5)||_0x4186c5<0x0))throw notificationError('notification_config_field_invalid',_0x5c9c96(0xb6)+_0x4d344f+_0x5c9c96(0xc3));_0x11b6c5[_0x4d344f]=_0x4186c5;}return _0x11b6c5;}function validateRequiredString(_0x43832c,_0x27420e,_0x2b7b24){const _0x1a59c7=a181_0xb8cad6;if(typeof _0x43832c!==_0x1a59c7(0xd1))throw invalidFieldType(_0x27420e,_0x1a59c7(0xed));const _0x56b7e3=_0x43832c[_0x1a59c7(0xb5)]();if(!_0x56b7e3)throw notificationError(_0x1a59c7(0x106),_0x1a59c7(0xb6)+_0x27420e+_0x1a59c7(0x99));if(_0x56b7e3[_0x1a59c7(0xcd)]>_0x2b7b24)throw notificationError(_0x1a59c7(0x106),'Notification\x20JSON\x20field\x20\x22'+_0x27420e+_0x1a59c7(0xa3)+_0x2b7b24+_0x1a59c7(0xef));return _0x56b7e3;}function validateChannelConfigFields(_0xa8a22e,_0xf2eb2b){const _0x129a9e=a181_0xb8cad6;if(hasOwn(_0xf2eb2b,_0x129a9e(0xdf)))throw forbiddenChannelConfigField(_0x129a9e(0xdf));if(_0xa8a22e===_0x129a9e(0x104))for(const _0x16fc3c of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xf2eb2b,_0x16fc3c))throw forbiddenChannelConfigField(_0x16fc3c);}}function forbiddenChannelConfigField(_0x66bc14){const _0x38d0d8=a181_0xb8cad6;return notificationError(_0x38d0d8(0x113),_0x38d0d8(0x9e)+_0x66bc14+_0x38d0d8(0x10e));}function invalidFieldType(_0x67fddf,_0x4ca937){const _0x5ee8ab=a181_0xb8cad6;return notificationError('notification_config_field_invalid',_0x5ee8ab(0xb6)+_0x67fddf+_0x5ee8ab(0xdc)+_0x4ca937+'.');}function a181_0x517e(_0x5eba1b,_0x30d530){_0x5eba1b=_0x5eba1b-0x94;const _0x4634d4=a181_0x4634();let _0x517ece=_0x4634d4[_0x5eba1b];return _0x517ece;}function serializeChannelConfig(_0x12ef02){const _0x53623f=a181_0xb8cad6;return _0x12ef02===null||_0x12ef02===undefined?null:JSON[_0x53623f(0x10d)](_0x12ef02);}function redactSensitive(_0x4a90e1){const _0x18a44f=a181_0xb8cad6;return _0x4a90e1===null||_0x4a90e1===undefined||_0x4a90e1===''?null:_0x18a44f(0xea);}function requireResponseString(_0xfe531d,_0x33ace9,_0x5b8caa){const _0x15ccd0=a181_0xb8cad6;if(typeof _0xfe531d!==_0x15ccd0(0xd1)||_0xfe531d[_0x15ccd0(0xb5)]()==='')throw CliErrors[_0x15ccd0(0xb9)]('Invalid\x20notification\x20config\x20response.',_0x15ccd0(0xf1)+(_0x5b8caa+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x33ace9+'\x22.');return _0xfe531d['trim']();}function requireExactString(_0x81abcc,_0xb000d8,_0x86cb26){const _0x51cc70=a181_0xb8cad6;if(typeof _0x81abcc!==_0x51cc70(0xd1)||_0x81abcc[_0x51cc70(0xb5)]()==='')throw notificationError(_0x51cc70(0xb1),_0x51cc70(0xb7)+_0x86cb26+_0x51cc70(0xa4)+_0xb000d8+'\x22.');return _0x81abcc[_0x51cc70(0xb5)]();}function responseNullableString(_0x3bf8ea,_0x160f2c,_0x213ba5){const _0x47ba51=a181_0xb8cad6;if(_0x3bf8ea===undefined||_0x3bf8ea===null)return null;if(typeof _0x3bf8ea!==_0x47ba51(0xd1))throw notificationError(_0x47ba51(0xb1),'Notification\x20config\x20'+_0x213ba5+'\x20has\x20invalid\x20field\x20\x22'+_0x160f2c+'\x22.');return _0x3bf8ea;}function a181_0x4634(){const _0x19c411=['endpointUrlRaw','Notification\x20JSON\x20from\x20','replyTo','configName','has','number','a\x20JSON\x20object\x20or\x20null','includes','dry-run','entries','name','a\x20supported\x20string','WEBHOOK','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','readTimeout','Unknown\x20notification\x20JSON\x20field\x20\x22','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','EMAIL','endpointUrl','notification_config_field_invalid','\x20has\x20an\x20invalid\x20channelType.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','updateTime','notification_config_confirmation_required','bool','Notification\x20config\x20list\x20item\x20','stringify','\x22\x20is\x20forbidden.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20has\x20an\x20invalid\x20appCode.','fromName','configCode','notification_config_channel_field_forbidden','parse','validation','call','Missing\x20notification\x20JSON\x20source.','\x20--type\x20','\x20is\x20invalid.','1169817LdJHhI','\x22\x20must\x20be\x20a\x20non-empty\x20string.','prototype','\x22channelType\x22.','860481faCvBb','yes','Notification\x20JSON\x20channelConfig\x20field\x20\x22','4RczTZY','Allowed\x20values:\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','mutation','\x22\x20cannot\x20exceed\x20','\x20is\x20missing\x20required\x20field\x20\x22','16bNlfVr','keys','channelConfigRaw','Notification\x20JSON\x20source\x20is\x20ambiguous.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','channelType','some','str','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_required','connectTimeout','isSafeInteger','notification_config_response_invalid','\x20must\x20be\x20an\x20object.','429084HJhKIP','FEISHU','trim','Notification\x20JSON\x20field\x20\x22','Notification\x20config\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','apiError','failed','from-env','isArray','Invalid\x20--','notification_config_id_invalid','notification_config_field_unknown','DINGTALK','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','type','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','subjectPrefix','every','1511222IWevwf','file','notification_config_update_empty','kind','utf8','num','stdin','length','createTime','recipients','\x22configName\x22.','string','bccList','description','push','Create\x20JSON\x20requires\x20field\x20','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','10074652wLHRtP','environment\x20variable\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','_unavailable','5249004hDsfWJ','\x22\x20must\x20be\x20','emailTargets','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','messageTemplate','notification_config_','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_field_forbidden','create','WECOM','a\x20JSON\x20object','3680255BlLCbi','channelConfig','hasOwnProperty','a\x20string\x20or\x20null','<redacted>','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','appCode','a\x20non-empty\x20string','env','\x20characters.','join','Item\x20','notification_config_json_invalid'];a181_0x4634=function(){return _0x19c411;};return a181_0x4634();}function responseNullableTimeout(_0xf5d295,_0x1f2d6d,_0x19f980){const _0x2695a4=a181_0xb8cad6;if(_0xf5d295===undefined||_0xf5d295===null)return null;if(!Number[_0x2695a4(0xb0)](_0xf5d295)||_0xf5d295<0x0)throw notificationError(_0x2695a4(0xb1),_0x2695a4(0xb7)+_0x19f980+'\x20has\x20invalid\x20field\x20\x22'+_0x1f2d6d+'\x22.');return _0xf5d295;}function normalizeNullableString(_0x545f73){const _0xc722cd=a181_0xb8cad6;return typeof _0x545f73===_0xc722cd(0xd1)?_0x545f73:null;}function isJsonObject(_0x46b1d7){const _0x18f575=a181_0xb8cad6;return _0x46b1d7!==null&&typeof _0x46b1d7==='object'&&!Array[_0x18f575(0xbc)](_0x46b1d7);}function hasOwn(_0x30ae51,_0x3fc493){const _0x109c1c=a181_0xb8cad6;return Object[_0x109c1c(0x9a)][_0x109c1c(0xe8)][_0x109c1c(0x94)](_0x30ae51,_0x3fc493);}async function readStdin(){const _0x596e0c=a181_0xb8cad6;let _0x5cad9f='';process[_0x596e0c(0xcc)]['setEncoding'](_0x596e0c(0xca));for await(const _0x5b0028 of process[_0x596e0c(0xcc)])_0x5cad9f+=_0x5b0028;return _0x5cad9f;}
@@ -1 +1 @@
1
- const a172_0x535dca=a172_0x11b4;(function(_0xd38d92,_0x125e10){const _0x5ed806=a172_0x11b4,_0x55e2c4=_0xd38d92();while(!![]){try{const _0x2424c5=-parseInt(_0x5ed806(0x21b))/0x1*(parseInt(_0x5ed806(0x1f1))/0x2)+-parseInt(_0x5ed806(0x20c))/0x3*(-parseInt(_0x5ed806(0x20e))/0x4)+-parseInt(_0x5ed806(0x1f2))/0x5*(-parseInt(_0x5ed806(0x207))/0x6)+parseInt(_0x5ed806(0x1f0))/0x7*(-parseInt(_0x5ed806(0x200))/0x8)+-parseInt(_0x5ed806(0x20a))/0x9*(parseInt(_0x5ed806(0x210))/0xa)+parseInt(_0x5ed806(0x214))/0xb+-parseInt(_0x5ed806(0x21e))/0xc*(-parseInt(_0x5ed806(0x209))/0xd);if(_0x2424c5===_0x125e10)break;else _0x55e2c4['push'](_0x55e2c4['shift']());}catch(_0x123a66){_0x55e2c4['push'](_0x55e2c4['shift']());}}}(a172_0x3d0a,0xb2e76));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a172_0x11b4(_0x3d4c19,_0x542330){_0x3d4c19=_0x3d4c19-0x1e9;const _0x3d0aa8=a172_0x3d0a();let _0x11b432=_0x3d0aa8[_0x3d4c19];return _0x11b432;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a172_0x535dca(0x21d),a172_0x535dca(0x1f8),a172_0x535dca(0x1f4),a172_0x535dca(0x221)],SCENE_TO_LEGACY_TYPE={'invoice':a172_0x535dca(0x1fb),'general':'General','form':a172_0x535dca(0x1f5),'idCard':a172_0x535dca(0x20d)},SCENE_FLAG={'name':a172_0x535dca(0x1ed),'type':a172_0x535dca(0x216),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a172_0x535dca(0x1f6)},IMAGE_FILE_FLAG={'name':a172_0x535dca(0x1ef),'type':'string','description':a172_0x535dca(0x1f7)},IMAGE_URL_FLAG={'name':a172_0x535dca(0x1fa),'type':a172_0x535dca(0x216),'description':a172_0x535dca(0x1fd)};function normalizeScene(_0x34e502){const _0x1bb01e=a172_0x535dca,_0xedd0c7=_0x34e502['trim']()[_0x1bb01e(0x1fe)]();if(_0xedd0c7===_0x1bb01e(0x201))return _0x1bb01e(0x221);if(_0xedd0c7===_0x1bb01e(0x21d)||_0xedd0c7===_0x1bb01e(0x1f8)||_0xedd0c7==='form')return _0xedd0c7;throw CliErrors[_0x1bb01e(0x208)]('Unsupported\x20OCR\x20scene:\x20'+_0x34e502+_0x1bb01e(0x204)+SUPPORTED_SCENES[_0x1bb01e(0x222)](',\x20'));}function selectedInputs(_0xbde60b){const _0x32afae=a172_0x535dca,_0x102321=_0xbde60b[_0x32afae(0x218)]('image-file')[_0x32afae(0x1ee)](),_0x3ffceb=_0xbde60b[_0x32afae(0x218)]('image-url')[_0x32afae(0x1ee)]();return{'imageFile':_0x102321,'imageUrl':_0x3ffceb,'count':[_0x102321,_0x3ffceb][_0x32afae(0x20f)](Boolean)['length']};}function validateInputSelection(_0x11c5e4){const _0x5f3a33=a172_0x535dca,_0x119800=selectedInputs(_0x11c5e4);if(_0x119800[_0x5f3a33(0x1f3)]!==0x1)throw CliErrors[_0x5f3a33(0x208)](_0x5f3a33(0x223));return _0x119800;}function withScene(_0x1c042a,_0xf783f6,_0x114adf){const _0xb3ae44=a172_0x535dca;return{..._0x1c042a,'scene':_0xf783f6,..._0x114adf?{'sourceFile':{'fileName':_0x114adf['fileName'],'filePath':_0x114adf[_0xb3ae44(0x1ea)]}}:{}};}const ocrRecognize={'service':a172_0x535dca(0x202),'command':'recognize','description':a172_0x535dca(0x21f),'risk':a172_0x535dca(0x21c),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5e0f2b){const _0x15265f=a172_0x535dca,_0xbc8f49=normalizeScene(_0x5e0f2b[_0x15265f(0x218)](_0x15265f(0x1ed))),_0x2708b9=SCENE_TO_LEGACY_TYPE[_0xbc8f49],_0x5d20a6=validateInputSelection(_0x5e0f2b);if(_0x5d20a6['imageUrl']){const _0x37effe=new URLSearchParams({'url':_0x5d20a6['imageUrl'],'type':_0x2708b9,'appCode':_0x5e0f2b[_0x15265f(0x220)]});return{'method':_0x15265f(0x1fc),'url':_0x15265f(0x1e9)+_0x37effe[_0x15265f(0x211)](),'description':_0x15265f(0x1eb)+_0xbc8f49+_0x15265f(0x1f9)};}const _0x4c0cd3=requireDevelopmentUploadFile(_0x5d20a6[_0x15265f(0x1ff)],_0x15265f(0x1ef));return{'method':_0x15265f(0x20b),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x15265f(0x20b),'url':_0x15265f(0x215),'body':{'appCode':_0x5e0f2b[_0x15265f(0x220)],'multipart':{'file':_0x4c0cd3}}},{'method':_0x15265f(0x20b),'url':_0x15265f(0x217),'body':{'filePath':_0x15265f(0x21a),'downloadFlag':![]}},{'method':_0x15265f(0x1fc),'url':_0x15265f(0x219),'query':{'appCode':_0x5e0f2b[_0x15265f(0x220)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2708b9}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0xbc8f49+_0x15265f(0x212)};},async 'execute'(_0x1e4262){const _0x1aa6d7=a172_0x535dca,_0x587e42=normalizeScene(_0x1e4262[_0x1aa6d7(0x218)](_0x1aa6d7(0x1ed))),_0x23d1fd=SCENE_TO_LEGACY_TYPE[_0x587e42],_0x37c74c=validateInputSelection(_0x1e4262);if(_0x37c74c[_0x1aa6d7(0x205)]){const _0x5b373d=await recognizeDevelopmentOcr(_0x1e4262[_0x1aa6d7(0x220)],{'url':_0x37c74c[_0x1aa6d7(0x205)],'type':_0x23d1fd});return{'ok':!![],'data':withScene(_0x5b373d,_0x587e42)};}const _0x61a7f3=requireDevelopmentUploadFile(_0x37c74c[_0x1aa6d7(0x1ff)],_0x1aa6d7(0x1ef)),_0x5d0d2c=await uploadDevelopmentFile(_0x1e4262[_0x1aa6d7(0x220)],_0x61a7f3[_0x1aa6d7(0x213)]);if(!_0x5d0d2c[_0x1aa6d7(0x1ea)])throw CliErrors[_0x1aa6d7(0x203)](_0x1aa6d7(0x206));const _0x421c53=await queryDevelopmentFileUrl(_0x5d0d2c[_0x1aa6d7(0x1ea)],{'download':![]});if(!_0x421c53[_0x1aa6d7(0x1ec)])throw CliErrors[_0x1aa6d7(0x203)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x5ef935=await recognizeDevelopmentOcr(_0x1e4262['appCode'],{'url':_0x421c53[_0x1aa6d7(0x1ec)],'type':_0x23d1fd});return{'ok':!![],'data':withScene(_0x5ef935,_0x587e42,_0x5d0d2c)};}};function a172_0x3d0a(){const _0xf3bd68=['toString','\x20OCR','path','8022289LrHInE','/smartapi/common/uploadFile','string','/smartapi/common/queryFileUrl','str','/smartapi/ocr/recognize-text','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','7sqNTyJ','read','invoice','199668KumfGu','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','appCode','idCard','join','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','/smartapi/ocr/recognize-text?','filePath','Preview:\x20recognize\x20','fileUrl','scene','trim','image-file','10235365StknjA','21252dSgBMk','122810adlZBW','count','form','Table','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','general','\x20OCR\x20from\x20URL','image-url','Invoice','GET','Publicly\x20accessible\x20image\x20or\x20file\x20URL','toLowerCase','imageFile','8fnCkrg','idcard','ocr','apiError','.\x20Supported\x20scenes:\x20','imageUrl','File\x20upload\x20response\x20missing\x20filePath.','186yQWBph','validation','403wUXXkC','9QrxTMT','POST','26739dRUOOh','IdCard','284BNQILv','filter','3699860IDHadt'];a172_0x3d0a=function(){return _0xf3bd68;};return a172_0x3d0a();}export const ocrDefinitions=[ocrRecognize];
1
+ const a182_0x53933a=a182_0x2536;(function(_0xb3f579,_0x2fafe9){const _0x200f95=a182_0x2536,_0x8433d=_0xb3f579();while(!![]){try{const _0x12efd5=-parseInt(_0x200f95(0xfc))/0x1+-parseInt(_0x200f95(0xed))/0x2+-parseInt(_0x200f95(0x105))/0x3*(parseInt(_0x200f95(0xf9))/0x4)+-parseInt(_0x200f95(0x114))/0x5+-parseInt(_0x200f95(0x10b))/0x6*(parseInt(_0x200f95(0x122))/0x7)+parseInt(_0x200f95(0x10f))/0x8+parseInt(_0x200f95(0xee))/0x9;if(_0x12efd5===_0x2fafe9)break;else _0x8433d['push'](_0x8433d['shift']());}catch(_0x2968bb){_0x8433d['push'](_0x8433d['shift']());}}}(a182_0x3bc3,0xdb2e8));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a182_0x2536(_0x1ac54d,_0x2a7d84){_0x1ac54d=_0x1ac54d-0xeb;const _0x3bc37b=a182_0x3bc3();let _0x2536d6=_0x3bc37b[_0x1ac54d];return _0x2536d6;}const SUPPORTED_SCENES=[a182_0x53933a(0x113),a182_0x53933a(0xf3),a182_0x53933a(0x117),a182_0x53933a(0xeb)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0x53933a(0x10d),'general':a182_0x53933a(0x120),'form':a182_0x53933a(0x11a),'idCard':a182_0x53933a(0xf7)},SCENE_FLAG={'name':a182_0x53933a(0x112),'type':a182_0x53933a(0xfd),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x53933a(0xec)},IMAGE_FILE_FLAG={'name':a182_0x53933a(0xf0),'type':'string','description':a182_0x53933a(0x101)},IMAGE_URL_FLAG={'name':a182_0x53933a(0xfb),'type':'string','description':a182_0x53933a(0x116)};function a182_0x3bc3(){const _0x6ec77f=['Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','3126rmgAPL','toLowerCase','fileUrl','recognize','trim','File\x20upload\x20response\x20missing\x20filePath.','1301250DrtGYU','/smartapi/common/queryFileUrl','Invoice','join','10264712oSpCSG','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','scene','invoice','3235805zUxmZs','appCode','Publicly\x20accessible\x20image\x20or\x20file\x20URL','form','File\x20URL\x20response\x20missing\x20fileUrl.','filter','Table','toString','Preview:\x20recognize\x20','POST','idcard','/smartapi/ocr/recognize-text','General','filePath','49ivCssr','Unsupported\x20OCR\x20scene:\x20','idCard','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','984402MEzheu','36622647AfRSIN','ocr','image-file','apiError','read','general','imageUrl','/smartapi/common/uploadFile','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','IdCard','count','1332cGJEex','imageFile','image-url','1450031GvrOhE','string','GET','.\x20Supported\x20scenes:\x20','/smartapi/ocr/recognize-text?','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','str','validation'];a182_0x3bc3=function(){return _0x6ec77f;};return a182_0x3bc3();}function normalizeScene(_0x1a9059){const _0x375066=a182_0x53933a,_0x189bb8=_0x1a9059[_0x375066(0x109)]()[_0x375066(0x106)]();if(_0x189bb8===_0x375066(0x11e))return _0x375066(0xeb);if(_0x189bb8===_0x375066(0x113)||_0x189bb8===_0x375066(0xf3)||_0x189bb8===_0x375066(0x117))return _0x189bb8;throw CliErrors['validation'](_0x375066(0x123)+_0x1a9059+_0x375066(0xff)+SUPPORTED_SCENES[_0x375066(0x10e)](',\x20'));}function selectedInputs(_0x3d4432){const _0x27cbc0=a182_0x53933a,_0x14d80f=_0x3d4432[_0x27cbc0(0x102)](_0x27cbc0(0xf0))[_0x27cbc0(0x109)](),_0x405e5d=_0x3d4432[_0x27cbc0(0x102)](_0x27cbc0(0xfb))['trim']();return{'imageFile':_0x14d80f,'imageUrl':_0x405e5d,'count':[_0x14d80f,_0x405e5d][_0x27cbc0(0x119)](Boolean)['length']};}function validateInputSelection(_0x4937ce){const _0x3a932c=a182_0x53933a,_0x2bb1f8=selectedInputs(_0x4937ce);if(_0x2bb1f8[_0x3a932c(0xf8)]!==0x1)throw CliErrors[_0x3a932c(0x103)](_0x3a932c(0x104));return _0x2bb1f8;}function withScene(_0x333ae8,_0x378694,_0x3f62fc){const _0x6373bb=a182_0x53933a;return{..._0x333ae8,'scene':_0x378694,..._0x3f62fc?{'sourceFile':{'fileName':_0x3f62fc['fileName'],'filePath':_0x3f62fc[_0x6373bb(0x121)]}}:{}};}const ocrRecognize={'service':a182_0x53933a(0xef),'command':a182_0x53933a(0x108),'description':a182_0x53933a(0x110),'risk':a182_0x53933a(0xf2),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5d4c72){const _0x258e3a=a182_0x53933a,_0x25098e=normalizeScene(_0x5d4c72['str'](_0x258e3a(0x112))),_0xf45b0=SCENE_TO_LEGACY_TYPE[_0x25098e],_0x1f9027=validateInputSelection(_0x5d4c72);if(_0x1f9027[_0x258e3a(0xf4)]){const _0x34fc5d=new URLSearchParams({'url':_0x1f9027[_0x258e3a(0xf4)],'type':_0xf45b0,'appCode':_0x5d4c72[_0x258e3a(0x115)]});return{'method':'GET','url':_0x258e3a(0x100)+_0x34fc5d[_0x258e3a(0x11b)](),'description':_0x258e3a(0x11c)+_0x25098e+'\x20OCR\x20from\x20URL'};}const _0x2ba122=requireDevelopmentUploadFile(_0x1f9027[_0x258e3a(0xfa)],_0x258e3a(0xf0));return{'method':'POST','url':_0x258e3a(0xf5),'body':{'steps':[{'method':_0x258e3a(0x11d),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x5d4c72[_0x258e3a(0x115)],'multipart':{'file':_0x2ba122}}},{'method':_0x258e3a(0x11d),'url':_0x258e3a(0x10c),'body':{'filePath':_0x258e3a(0x111),'downloadFlag':![]}},{'method':_0x258e3a(0xfe),'url':_0x258e3a(0x11f),'query':{'appCode':_0x5d4c72[_0x258e3a(0x115)],'url':_0x258e3a(0xf6),'type':_0xf45b0}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x25098e+'\x20OCR'};},async 'execute'(_0x354b36){const _0xd98484=a182_0x53933a,_0xf66e76=normalizeScene(_0x354b36[_0xd98484(0x102)](_0xd98484(0x112))),_0x3b403d=SCENE_TO_LEGACY_TYPE[_0xf66e76],_0x38a47b=validateInputSelection(_0x354b36);if(_0x38a47b[_0xd98484(0xf4)]){const _0x6cb82b=await recognizeDevelopmentOcr(_0x354b36[_0xd98484(0x115)],{'url':_0x38a47b[_0xd98484(0xf4)],'type':_0x3b403d});return{'ok':!![],'data':withScene(_0x6cb82b,_0xf66e76)};}const _0x20b736=requireDevelopmentUploadFile(_0x38a47b[_0xd98484(0xfa)],_0xd98484(0xf0)),_0xb02ee8=await uploadDevelopmentFile(_0x354b36[_0xd98484(0x115)],_0x20b736['path']);if(!_0xb02ee8['filePath'])throw CliErrors['apiError'](_0xd98484(0x10a));const _0x3bdcf6=await queryDevelopmentFileUrl(_0xb02ee8[_0xd98484(0x121)],{'download':![]});if(!_0x3bdcf6[_0xd98484(0x107)])throw CliErrors[_0xd98484(0xf1)](_0xd98484(0x118));const _0x413190=await recognizeDevelopmentOcr(_0x354b36[_0xd98484(0x115)],{'url':_0x3bdcf6[_0xd98484(0x107)],'type':_0x3b403d});return{'ok':!![],'data':withScene(_0x413190,_0xf66e76,_0xb02ee8)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a173_0x5c8698=a173_0x10b1;(function(_0x565682,_0x19b18b){const _0x580fe2=a173_0x10b1,_0x43629a=_0x565682();while(!![]){try{const _0x3bb201=parseInt(_0x580fe2(0x152))/0x1*(-parseInt(_0x580fe2(0x170))/0x2)+parseInt(_0x580fe2(0x14a))/0x3*(parseInt(_0x580fe2(0x133))/0x4)+parseInt(_0x580fe2(0x162))/0x5*(parseInt(_0x580fe2(0x150))/0x6)+-parseInt(_0x580fe2(0x16a))/0x7+-parseInt(_0x580fe2(0x13b))/0x8*(-parseInt(_0x580fe2(0x171))/0x9)+parseInt(_0x580fe2(0x14b))/0xa*(-parseInt(_0x580fe2(0x146))/0xb)+parseInt(_0x580fe2(0x15b))/0xc;if(_0x3bb201===_0x19b18b)break;else _0x43629a['push'](_0x43629a['shift']());}catch(_0x4577d6){_0x43629a['push'](_0x43629a['shift']());}}}(a173_0x5dab,0xbbb01));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 a173_0x5dab(){const _0x41b87d=['2908578pvYTQN','now','1aElRXJ','Created\x20Custom\x20Page\x20','toLowerCase','parent-menu-id','CUSTOM','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','parse','utf8','validation','25271304uCjBXr','name','string','page.create','page\x20create\x20does\x20not\x20accept\x20--page-type.','page-type','parentMenuId','5qRYfuv','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','menuPath','page','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','files','Custom\x20Page\x20pattern\x20not\x20found:\x20','values','6805498jogAlr','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','isNaN','some','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','isArray','1931938atCdPf','36MulyoC','DASHBOARD','14420oFPkSY','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','isInteger','\x20and\x20its\x20menu\x20entry.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','keys','Invalid\x20Custom\x20Page\x20pattern:\x20','length','1813344SxcQsY','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','apiError','page-pattern','pageName\x20cannot\x20exceed\x20100\x20characters.','appCode','pageName','createMenu','.json','trim','937255gKbIPW','str','/smartapi/webcode/page/create','ONEPAGE','264RMMDNS','130hsCyDB','BLANK','page-dir','pageId','number'];a173_0x5dab=function(){return _0x41b87d;};return a173_0x5dab();}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=[a173_0x5c8698(0x14c),a173_0x5c8698(0x149),a173_0x5c8698(0x172)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');function a173_0x10b1(_0x56d111,_0x42e087){_0x56d111=_0x56d111-0x133;const _0x5dabba=a173_0x5dab();let _0x10b1d6=_0x5dabba[_0x56d111];return _0x10b1d6;}export const pageCreate={'service':a173_0x5c8698(0x165),'command':'create','description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a173_0x5c8698(0x160),'message':a173_0x5c8698(0x15f),'hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'},{'name':'page-content','message':a173_0x5c8698(0x166),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':a173_0x5c8698(0x15d),'description':a173_0x5c8698(0x157)},{'name':'parent-menu-id','type':a173_0x5c8698(0x14f),'description':a173_0x5c8698(0x13c)},{'name':'page-pattern','type':a173_0x5c8698(0x15d),'description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a173_0x5c8698(0x14d),'type':a173_0x5c8698(0x15d),'description':a173_0x5c8698(0x134)},APPCODE_FLAG],async 'validate'(_0x323ddf){await readValidatedPageSource(_0x323ddf);},async 'dryRun'(_0x532a1f){const _0x1100a3=a173_0x5c8698,_0x33a346=readInput(_0x532a1f,await readValidatedPageSource(_0x532a1f));return{'method':'POST','url':_0x1100a3(0x148),'body':{'appCode':_0x33a346[_0x1100a3(0x141)],'pageName':_0x33a346[_0x1100a3(0x142)],..._0x33a346['parentMenuId']!=null?{'parentMenuId':_0x33a346[_0x1100a3(0x161)]}:{},'createMenu':_0x33a346[_0x1100a3(0x143)],'codeContent':_0x33a346[_0x1100a3(0x167)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON['stringify'](_0x33a346['pageName'])+_0x1100a3(0x136)};},async 'execute'(_0x41f1ea){const _0x48dd21=a173_0x5c8698,_0x4238e3=readInput(_0x41f1ea,await readValidatedPageSource(_0x41f1ea)),_0xfaf9d1=await createCustomPage(_0x4238e3);if(!Number['isInteger'](_0xfaf9d1[_0x48dd21(0x14e)])||_0xfaf9d1[_0x48dd21(0x14e)]<=0x0)throw CliErrors[_0x48dd21(0x13e)](_0x48dd21(0x163));const _0x55a04c=buildCustomPageDevelopmentUrl(_0x4238e3[_0x48dd21(0x141)],_0xfaf9d1[_0x48dd21(0x164)]),_0x371196=buildCustomPageEditUrl(_0x4238e3['appCode'],_0xfaf9d1[_0x48dd21(0x14e)]);return{'ok':!![],'data':{'operation':_0x48dd21(0x15e),'pageType':_0x48dd21(0x156),'pagePattern':readPagePattern(_0x41f1ea),'selector':{'appCode':_0x4238e3[_0x48dd21(0x141)],'pageName':_0x4238e3['pageName']},'before':null,'after':{'pageId':_0xfaf9d1[_0x48dd21(0x14e)],'pageName':_0xfaf9d1[_0x48dd21(0x142)],'appCode':_0xfaf9d1['appCode'],'version':_0xfaf9d1['version'],'menuId':_0xfaf9d1['menuId'],'menuPath':_0xfaf9d1[_0x48dd21(0x164)],'files':_0xfaf9d1[_0x48dd21(0x167)]??Object[_0x48dd21(0x138)](_0x4238e3['files'])},'dryRun':![],'request':_0x4238e3,..._0x55a04c?{'pageUrl':_0x55a04c}:{},..._0x371196?{'editPageUrl':_0x371196}:{},'warnings':_0x55a04c?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x48dd21(0x153)+_0xfaf9d1[_0x48dd21(0x14e)]+'.'};}};function readPagePattern(_0x4ae444){const _0x26f55b=a173_0x5c8698,_0x49cb47=_0x4ae444[_0x26f55b(0x147)](_0x26f55b(0x13f))[_0x26f55b(0x145)](),_0x5cacde=_0x4ae444[_0x26f55b(0x147)](_0x26f55b(0x14d))['trim']();if(_0x49cb47&&_0x5cacde)throw CliErrors['validation'](_0x26f55b(0x137));if(_0x5cacde)return null;if(!_0x49cb47)throw CliErrors[_0x26f55b(0x15a)](_0x26f55b(0x16e));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x49cb47))throw CliErrors[_0x26f55b(0x15a)](_0x26f55b(0x13d));return _0x49cb47;}async function readPageSource(_0x1eb037){const _0x52125a=a173_0x5c8698,_0xc855bd=_0x1eb037[_0x52125a(0x147)](_0x52125a(0x14d))[_0x52125a(0x145)](),_0x21204c=readPagePattern(_0x1eb037);if(_0x21204c===null){const _0x1ee510=await readCustomPageDirectory(_0xc855bd);if(Object['keys'](_0x1ee510)[_0x52125a(0x13a)]===0x0)throw CliErrors['validation'](_0x52125a(0x16b));return _0x1ee510;}let _0x5009b7;try{_0x5009b7=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x21204c[_0x52125a(0x154)]()+_0x52125a(0x144)),_0x52125a(0x159));}catch{throw CliErrors['validation'](_0x52125a(0x168)+_0x21204c+'.');}let _0x3e2fa4;try{_0x3e2fa4=JSON[_0x52125a(0x158)](_0x5009b7);}catch{throw CliErrors['validation'](_0x52125a(0x139)+_0x21204c+'.');}if(!_0x3e2fa4||typeof _0x3e2fa4!=='object'||Array[_0x52125a(0x16f)](_0x3e2fa4)||Object[_0x52125a(0x169)](_0x3e2fa4)[_0x52125a(0x16d)](_0x1ec00e=>typeof _0x1ec00e!==_0x52125a(0x15d)))throw CliErrors[_0x52125a(0x15a)](_0x52125a(0x139)+_0x21204c+'.');return _0x3e2fa4;}async function readValidatedPageSource(_0x4e589d){const _0x487cdc=await readPageSource(_0x4e589d);return await validateCustomPageContent(_0x487cdc),_0x487cdc;}function readInput(_0x136e6f,_0x5be840){const _0x15f8d8=a173_0x5c8698,_0x48d05c=_0x136e6f[_0x15f8d8(0x147)](_0x15f8d8(0x15c))[_0x15f8d8(0x145)]()||'Custom_page_'+Date[_0x15f8d8(0x151)]();if(_0x48d05c['length']>0x64)throw CliErrors[_0x15f8d8(0x15a)](_0x15f8d8(0x140));const _0x47b0a1=_0x136e6f['num'](_0x15f8d8(0x155),NaN),_0x56bad2=!Number[_0x15f8d8(0x16c)](_0x47b0a1);if(_0x56bad2&&(!Number[_0x15f8d8(0x135)](_0x47b0a1)||_0x47b0a1<=0x0))throw CliErrors[_0x15f8d8(0x15a)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x136e6f[_0x15f8d8(0x141)],'pageName':_0x48d05c,..._0x56bad2?{'parentMenuId':_0x47b0a1}:{},'createMenu':!![],'files':_0x5be840};}
1
+ const a183_0x5c5995=a183_0x44f2;(function(_0x4c8dee,_0x1711ad){const _0x34a215=a183_0x44f2,_0x4f8b8e=_0x4c8dee();while(!![]){try{const _0x16ab9b=-parseInt(_0x34a215(0x1f7))/0x1*(-parseInt(_0x34a215(0x20d))/0x2)+-parseInt(_0x34a215(0x1df))/0x3*(parseInt(_0x34a215(0x204))/0x4)+parseInt(_0x34a215(0x1e2))/0x5+parseInt(_0x34a215(0x1e5))/0x6+parseInt(_0x34a215(0x1e8))/0x7*(-parseInt(_0x34a215(0x206))/0x8)+-parseInt(_0x34a215(0x201))/0x9*(parseInt(_0x34a215(0x1da))/0xa)+-parseInt(_0x34a215(0x20a))/0xb;if(_0x16ab9b===_0x1711ad)break;else _0x4f8b8e['push'](_0x4f8b8e['shift']());}catch(_0x1d68bc){_0x4f8b8e['push'](_0x4f8b8e['shift']());}}}(a183_0x4217,0x7947d));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';function a183_0x4217(){const _0x4d89e2=['length','isNaN','CUSTOM','960230UJNhGr','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','stringify','../../../templates/custom-pages','parse','61179fRXAKy','name','validation','4534790pXGLwS','includes','compress','5572512GmhnlJ','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','object','63WNKflp','parent-menu-id','parentMenuId','string','page-dir','apiError','now','page-pattern','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','appCode','str','num','files','/smartapi/webcode/page/create','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','5KMgkPF','.json','\x20and\x20its\x20menu\x20entry.','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','menuId','trim','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','toLowerCase','page\x20create\x20does\x20not\x20accept\x20--page-type.','DASHBOARD','72upkvvj','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','4WUCgLk','pageName','594976woetOi','write','pageId','utf8','1577455rkqBBS','isInteger','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','104954GGTSIp','menuPath','page-content','Would\x20create\x20Custom\x20Page\x20','page-type','Custom\x20Page\x20pattern\x20not\x20found:\x20','page.create','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','Invalid\x20Custom\x20Page\x20pattern:\x20','number','BLANK','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','values','pageName\x20cannot\x20exceed\x20100\x20characters.','create','page','version','POST'];a183_0x4217=function(){return _0x4d89e2;};return a183_0x4217();}import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x5c5995(0x1cf),'ONEPAGE',a183_0x5c5995(0x200)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a183_0x5c5995(0x1dd));export const pageCreate={'service':a183_0x5c5995(0x1d4),'command':a183_0x5c5995(0x1d3),'description':a183_0x5c5995(0x1f0),'risk':a183_0x5c5995(0x207),'defaultOutputFormat':a183_0x5c5995(0x1e4),'structuredErrors':!![],'rejectedFlags':[{'name':a183_0x5c5995(0x211),'message':a183_0x5c5995(0x1ff),'hint':a183_0x5c5995(0x20c)},{'name':a183_0x5c5995(0x20f),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a183_0x5c5995(0x214)}],'flags':[{'name':a183_0x5c5995(0x1e0),'type':a183_0x5c5995(0x1eb),'description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a183_0x5c5995(0x1e9),'type':a183_0x5c5995(0x1ce),'description':a183_0x5c5995(0x1f6)},{'name':a183_0x5c5995(0x1ef),'type':a183_0x5c5995(0x1eb),'description':a183_0x5c5995(0x1fa),'enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x5c5995(0x1ec),'type':a183_0x5c5995(0x1eb),'description':a183_0x5c5995(0x1d0)},APPCODE_FLAG],async 'validate'(_0x531425){await readValidatedPageSource(_0x531425);},async 'dryRun'(_0x446bae){const _0x2c3b3c=a183_0x5c5995,_0x2567cf=readInput(_0x446bae,await readValidatedPageSource(_0x446bae));return{'method':_0x2c3b3c(0x1d6),'url':_0x2c3b3c(0x1f5),'body':{'appCode':_0x2567cf[_0x2c3b3c(0x1f1)],'pageName':_0x2567cf[_0x2c3b3c(0x205)],..._0x2567cf[_0x2c3b3c(0x1ea)]!=null?{'parentMenuId':_0x2567cf[_0x2c3b3c(0x1ea)]}:{},'createMenu':_0x2567cf['createMenu'],'codeContent':_0x2567cf['files']},'description':_0x2c3b3c(0x210)+JSON[_0x2c3b3c(0x1dc)](_0x2567cf[_0x2c3b3c(0x205)])+_0x2c3b3c(0x1f9)};},async 'execute'(_0x563b0d){const _0x1784b4=a183_0x5c5995,_0x1ab837=readInput(_0x563b0d,await readValidatedPageSource(_0x563b0d)),_0x2082f9=await createCustomPage(_0x1ab837);if(!Number[_0x1784b4(0x20b)](_0x2082f9[_0x1784b4(0x208)])||_0x2082f9[_0x1784b4(0x208)]<=0x0)throw CliErrors[_0x1784b4(0x1ed)](_0x1784b4(0x1fd));const _0x2da985=buildCustomPageDevelopmentUrl(_0x1ab837[_0x1784b4(0x1f1)],_0x2082f9['menuPath']),_0x43070f=buildCustomPageEditUrl(_0x1ab837[_0x1784b4(0x1f1)],_0x2082f9[_0x1784b4(0x208)]);return{'ok':!![],'data':{'operation':_0x1784b4(0x213),'pageType':_0x1784b4(0x1d9),'pagePattern':readPagePattern(_0x563b0d),'selector':{'appCode':_0x1ab837['appCode'],'pageName':_0x1ab837[_0x1784b4(0x205)]},'before':null,'after':{'pageId':_0x2082f9[_0x1784b4(0x208)],'pageName':_0x2082f9[_0x1784b4(0x205)],'appCode':_0x2082f9[_0x1784b4(0x1f1)],'version':_0x2082f9[_0x1784b4(0x1d5)],'menuId':_0x2082f9[_0x1784b4(0x1fb)],'menuPath':_0x2082f9[_0x1784b4(0x20e)],'files':_0x2082f9['files']??Object['keys'](_0x1ab837[_0x1784b4(0x1f4)])},'dryRun':![],'request':_0x1ab837,..._0x2da985?{'pageUrl':_0x2da985}:{},..._0x43070f?{'editPageUrl':_0x43070f}:{},'warnings':_0x2da985?[]:[_0x1784b4(0x203)]},'message':'Created\x20Custom\x20Page\x20'+_0x2082f9[_0x1784b4(0x208)]+'.'};}};function readPagePattern(_0xe0ba8e){const _0x81ab44=a183_0x5c5995,_0xd254f1=_0xe0ba8e[_0x81ab44(0x1f2)]('page-pattern')['trim'](),_0x121511=_0xe0ba8e['str'](_0x81ab44(0x1ec))[_0x81ab44(0x1fc)]();if(_0xd254f1&&_0x121511)throw CliErrors['validation']('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x121511)return null;if(!_0xd254f1)throw CliErrors[_0x81ab44(0x1e1)](_0x81ab44(0x202));if(!CUSTOM_PAGE_PATTERNS[_0x81ab44(0x1e3)](_0xd254f1))throw CliErrors[_0x81ab44(0x1e1)](_0x81ab44(0x1e6));return _0xd254f1;}async function readPageSource(_0x5c715e){const _0x8198c6=a183_0x5c5995,_0x248b99=_0x5c715e[_0x8198c6(0x1f2)](_0x8198c6(0x1ec))[_0x8198c6(0x1fc)](),_0x30aa9a=readPagePattern(_0x5c715e);if(_0x30aa9a===null){const _0x34fa80=await readCustomPageDirectory(_0x248b99);if(Object['keys'](_0x34fa80)['length']===0x0)throw CliErrors['validation'](_0x8198c6(0x1db));return _0x34fa80;}let _0x50b564;try{_0x50b564=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x30aa9a[_0x8198c6(0x1fe)]()+_0x8198c6(0x1f8)),_0x8198c6(0x209));}catch{throw CliErrors[_0x8198c6(0x1e1)](_0x8198c6(0x212)+_0x30aa9a+'.');}let _0x325eca;try{_0x325eca=JSON[_0x8198c6(0x1de)](_0x50b564);}catch{throw CliErrors[_0x8198c6(0x1e1)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x30aa9a+'.');}if(!_0x325eca||typeof _0x325eca!==_0x8198c6(0x1e7)||Array['isArray'](_0x325eca)||Object[_0x8198c6(0x1d1)](_0x325eca)['some'](_0x4e0616=>typeof _0x4e0616!==_0x8198c6(0x1eb)))throw CliErrors[_0x8198c6(0x1e1)](_0x8198c6(0x1cd)+_0x30aa9a+'.');return _0x325eca;}function a183_0x44f2(_0x114337,_0x54b58d){_0x114337=_0x114337-0x1cd;const _0x4217e7=a183_0x4217();let _0x44f2fa=_0x4217e7[_0x114337];return _0x44f2fa;}async function readValidatedPageSource(_0x566038){const _0xee63b9=await readPageSource(_0x566038);return await validateCustomPageContent(_0xee63b9),_0xee63b9;}function readInput(_0x51e876,_0x31a948){const _0x3a1cd5=a183_0x5c5995,_0x5f0870=_0x51e876['str']('name')[_0x3a1cd5(0x1fc)]()||'Custom_page_'+Date[_0x3a1cd5(0x1ee)]();if(_0x5f0870[_0x3a1cd5(0x1d7)]>0x64)throw CliErrors[_0x3a1cd5(0x1e1)](_0x3a1cd5(0x1d2));const _0x167ef5=_0x51e876[_0x3a1cd5(0x1f3)](_0x3a1cd5(0x1e9),NaN),_0x12b4c3=!Number[_0x3a1cd5(0x1d8)](_0x167ef5);if(_0x12b4c3&&(!Number[_0x3a1cd5(0x20b)](_0x167ef5)||_0x167ef5<=0x0))throw CliErrors[_0x3a1cd5(0x1e1)](_0x3a1cd5(0x215));return{'appCode':_0x51e876[_0x3a1cd5(0x1f1)],'pageName':_0x5f0870,..._0x12b4c3?{'parentMenuId':_0x167ef5}:{},'createMenu':!![],'files':_0x31a948};}
@@ -1 +1 @@
1
- const a174_0x52e299=a174_0xdf85;(function(_0x3d7771,_0xdfccea){const _0x2dd4c5=a174_0xdf85,_0x149560=_0x3d7771();while(!![]){try{const _0x96142a=parseInt(_0x2dd4c5(0x12e))/0x1+-parseInt(_0x2dd4c5(0x12a))/0x2*(parseInt(_0x2dd4c5(0x139))/0x3)+-parseInt(_0x2dd4c5(0x138))/0x4+parseInt(_0x2dd4c5(0x128))/0x5+-parseInt(_0x2dd4c5(0x12f))/0x6*(-parseInt(_0x2dd4c5(0x134))/0x7)+-parseInt(_0x2dd4c5(0x13e))/0x8+parseInt(_0x2dd4c5(0x129))/0x9;if(_0x96142a===_0xdfccea)break;else _0x149560['push'](_0x149560['shift']());}catch(_0x40b257){_0x149560['push'](_0x149560['shift']());}}}(a174_0x4cc9,0x3cc3b));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a174_0x52e299(0x137),'command':a174_0x52e299(0x13b),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a174_0x52e299(0x127),'defaultOutputFormat':a174_0x52e299(0x131),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a174_0x52e299(0x124),'required':!![],'description':a174_0x52e299(0x13c)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4afd06){readCustomPageId(_0x4afd06);},async 'execute'(_0x478bdd){const _0x5a231c=a174_0x52e299,_0x402323=readCustomPageId(_0x478bdd),_0x5e5266=await getCustomPageSource(_0x402323),{bundle:_0x510279,createTime:_0x987299,updateTime:_0xb73a4c,..._0x5bf0a1}=_0x5e5266,_0x554660=_0x5e5266['id']??_0x402323,_0x131778=_0x5e5266[_0x5a231c(0x126)]?.[_0x5a231c(0x133)]()||_0x478bdd[_0x5a231c(0x12b)](_0x5a231c(0x13f))[_0x5a231c(0x133)](),_0x8a9e79=buildCustomPageRuntimeUrl(_0x131778,_0x5e5266[_0x5a231c(0x13a)]),_0x244f06=buildCustomPageEditUrl(_0x131778,_0x554660),_0x1c0b25=await resolveCustomPageDevelopmentUrl(_0x131778,_0x554660,_0x478bdd[_0x5a231c(0x135)]);return{'ok':!![],'data':{..._0x5bf0a1,..._0x8a9e79?{'runtimePageUrl':_0x8a9e79}:{},..._0x1c0b25?{'pageUrl':_0x1c0b25}:{},..._0x244f06?{'editPageUrl':_0x244f06}:{},..._0x987299==null?{}:{'createTime':formatTime(_0x987299)},..._0xb73a4c==null?{}:{'updateTime':formatTime(_0xb73a4c)}},'message':_0x5a231c(0x121)+_0x402323+'.'};}};function a174_0x4cc9(){const _0x38a27=['12oLVTTy','getMonth','compress','isNaN','trim','753956LuVCjQ','cookie','getFullYear','page','1433880jAmFQx','45IRDlij','pageCode','custom-detail','Custom\x20Page\x20ID','getHours','1070480YsxyGW','appcode','join','Retrieved\x20Custom\x20Page\x20','getSeconds','getDate','number','getMinutes','appCode','read','778960WumYlE','2019240IUJPcx','4154ZSYxcD','str','padStart','getTime','176758qMsqGP'];a174_0x4cc9=function(){return _0x38a27;};return a174_0x4cc9();}function a174_0xdf85(_0x5b3658,_0x24ab97){_0x5b3658=_0x5b3658-0x120;const _0x4cc9e2=a174_0x4cc9();let _0xdf85db=_0x4cc9e2[_0x5b3658];return _0xdf85db;}function formatTime(_0x50c225){const _0x5b5b3c=a174_0x52e299,_0x3fc715=new Date(_0x50c225);if(Number[_0x5b5b3c(0x132)](_0x3fc715[_0x5b5b3c(0x12d)]()))return String(_0x50c225);const _0x370ab9=[_0x3fc715[_0x5b5b3c(0x136)](),String(_0x3fc715[_0x5b5b3c(0x130)]()+0x1)[_0x5b5b3c(0x12c)](0x2,'0'),String(_0x3fc715[_0x5b5b3c(0x123)]())[_0x5b5b3c(0x12c)](0x2,'0')]['join']('-'),_0x1bdfe7=[String(_0x3fc715[_0x5b5b3c(0x13d)]())[_0x5b5b3c(0x12c)](0x2,'0'),String(_0x3fc715[_0x5b5b3c(0x125)]())[_0x5b5b3c(0x12c)](0x2,'0'),String(_0x3fc715[_0x5b5b3c(0x122)]())[_0x5b5b3c(0x12c)](0x2,'0')][_0x5b5b3c(0x120)](':');return _0x370ab9+'\x20'+_0x1bdfe7;}
1
+ const a184_0x3ebc13=a184_0x4b12;function a184_0x4b12(_0x11e78c,_0x682b72){_0x11e78c=_0x11e78c-0x85;const _0x2ad150=a184_0x2ad1();let _0x4b12de=_0x2ad150[_0x11e78c];return _0x4b12de;}(function(_0x5dff55,_0x1db4d2){const _0x1409e0=a184_0x4b12,_0x5c7b49=_0x5dff55();while(!![]){try{const _0xaa317a=-parseInt(_0x1409e0(0x93))/0x1*(-parseInt(_0x1409e0(0xa2))/0x2)+parseInt(_0x1409e0(0x9e))/0x3*(parseInt(_0x1409e0(0x8f))/0x4)+parseInt(_0x1409e0(0x88))/0x5+parseInt(_0x1409e0(0x8b))/0x6*(parseInt(_0x1409e0(0x95))/0x7)+parseInt(_0x1409e0(0x86))/0x8+parseInt(_0x1409e0(0x90))/0x9+parseInt(_0x1409e0(0xa5))/0xa*(-parseInt(_0x1409e0(0x85))/0xb);if(_0xaa317a===_0x1db4d2)break;else _0x5c7b49['push'](_0x5c7b49['shift']());}catch(_0x4f4b41){_0x5c7b49['push'](_0x5c7b49['shift']());}}}(a184_0x2ad1,0x9dd0c));import{getCustomPageSource}from'../../../core/api-client.js';function a184_0x2ad1(){const _0xeed4d3=['compress','getSeconds','6DLFqsT','Retrieved\x20Custom\x20Page\x20','number','trim','7680LrAcpi','128934kvRbfY','pageCode','getFullYear','2389hDeqTY','padStart','2074548UiNvJT','cookie','getHours','getDate','isNaN','Custom\x20Page\x20ID','getMinutes','read','appCode','894WHQifW','custom-detail','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','join','58ZMAxmD','appcode','getMonth','30yliQRr','3262127VcKpUX','3901632NwqRKI','getTime','481240wSRjVK'];a184_0x2ad1=function(){return _0xeed4d3;};return a184_0x2ad1();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a184_0x3ebc13(0x9f),'description':a184_0x3ebc13(0xa0),'risk':a184_0x3ebc13(0x9c),'defaultOutputFormat':a184_0x3ebc13(0x89),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0x3ebc13(0x8d),'required':!![],'description':a184_0x3ebc13(0x9a)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bdd79){readCustomPageId(_0x2bdd79);},async 'execute'(_0x1364ff){const _0x5505e7=a184_0x3ebc13,_0x27de40=readCustomPageId(_0x1364ff),_0x36b52f=await getCustomPageSource(_0x27de40),{bundle:_0x5b1101,createTime:_0x72cb86,updateTime:_0x2e90a1,..._0x4c695f}=_0x36b52f,_0x2f766b=_0x36b52f['id']??_0x27de40,_0x21293f=_0x36b52f[_0x5505e7(0x9d)]?.[_0x5505e7(0x8e)]()||_0x1364ff['str'](_0x5505e7(0xa3))[_0x5505e7(0x8e)](),_0x483545=buildCustomPageRuntimeUrl(_0x21293f,_0x36b52f[_0x5505e7(0x91)]),_0x3d7733=buildCustomPageEditUrl(_0x21293f,_0x2f766b),_0x58939f=await resolveCustomPageDevelopmentUrl(_0x21293f,_0x2f766b,_0x1364ff[_0x5505e7(0x96)]);return{'ok':!![],'data':{..._0x4c695f,..._0x483545?{'runtimePageUrl':_0x483545}:{},..._0x58939f?{'pageUrl':_0x58939f}:{},..._0x3d7733?{'editPageUrl':_0x3d7733}:{},..._0x72cb86==null?{}:{'createTime':formatTime(_0x72cb86)},..._0x2e90a1==null?{}:{'updateTime':formatTime(_0x2e90a1)}},'message':_0x5505e7(0x8c)+_0x27de40+'.'};}};function formatTime(_0x334dba){const _0x2bef3e=a184_0x3ebc13,_0x1172f9=new Date(_0x334dba);if(Number[_0x2bef3e(0x99)](_0x1172f9[_0x2bef3e(0x87)]()))return String(_0x334dba);const _0x47e5e3=[_0x1172f9[_0x2bef3e(0x92)](),String(_0x1172f9[_0x2bef3e(0xa4)]()+0x1)['padStart'](0x2,'0'),String(_0x1172f9[_0x2bef3e(0x98)]())[_0x2bef3e(0x94)](0x2,'0')][_0x2bef3e(0xa1)]('-'),_0x1fea24=[String(_0x1172f9[_0x2bef3e(0x97)]())[_0x2bef3e(0x94)](0x2,'0'),String(_0x1172f9[_0x2bef3e(0x9b)]())[_0x2bef3e(0x94)](0x2,'0'),String(_0x1172f9[_0x2bef3e(0x8a)]())[_0x2bef3e(0x94)](0x2,'0')][_0x2bef3e(0xa1)](':');return _0x47e5e3+'\x20'+_0x1fea24;}
@@ -1 +1 @@
1
- const a175_0x1cbfca=a175_0x59b2;(function(_0x1d6bf6,_0x3bb726){const _0x539c3e=a175_0x59b2,_0x4c55dc=_0x1d6bf6();while(!![]){try{const _0xedc3fb=parseInt(_0x539c3e(0xda))/0x1+parseInt(_0x539c3e(0xe0))/0x2*(-parseInt(_0x539c3e(0xdf))/0x3)+-parseInt(_0x539c3e(0xd4))/0x4*(-parseInt(_0x539c3e(0xd0))/0x5)+-parseInt(_0x539c3e(0xe4))/0x6*(parseInt(_0x539c3e(0xe1))/0x7)+parseInt(_0x539c3e(0xd7))/0x8+-parseInt(_0x539c3e(0xd9))/0x9*(parseInt(_0x539c3e(0xdb))/0xa)+parseInt(_0x539c3e(0xe2))/0xb*(parseInt(_0x539c3e(0xd6))/0xc);if(_0xedc3fb===_0x3bb726)break;else _0x4c55dc['push'](_0x4c55dc['shift']());}catch(_0x3ff6c7){_0x4c55dc['push'](_0x4c55dc['shift']());}}}(a175_0x1ee4,0x5e0a0));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';function a175_0x1ee4(){const _0x32ab41=['custom-list','read','5508rfWfKW','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','1277076baueMn','5493088aHbGLF','pageId','1294497SpEipv','138599Pgjzmb','50lbYPHy','type','compress','Found\x20','971322XsqVqk','2uXDbBp','7hRvCNg','110VPACqJ','path','3800802WONUhN','\x20Custom\x20Page(s).','react','length','cookie','menus','625hODpFM','appCode'];a175_0x1ee4=function(){return _0x32ab41;};return a175_0x1ee4();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a175_0x59b2(_0x22de15,_0x477cc5){_0x22de15=_0x22de15-0xcf;const _0x1ee436=a175_0x1ee4();let _0x59b2ba=_0x1ee436[_0x22de15];return _0x59b2ba;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':'page','command':a175_0x1cbfca(0xd2),'description':a175_0x1cbfca(0xd5),'risk':a175_0x1cbfca(0xd3),'defaultOutputFormat':a175_0x1cbfca(0xdd),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1789ae){const _0x4f84a4=a175_0x1cbfca,_0x249cdf=(await fetchMenuSnapshot(_0x1789ae[_0x4f84a4(0xd1)],_0x1789ae[_0x4f84a4(0xe8)]))[_0x4f84a4(0xcf)]['flatMap'](_0x2f8c70=>{const _0x2008d3=_0x4f84a4;if(_0x2f8c70[_0x2008d3(0xdc)]!==_0x2008d3(0xe6)||_0x2f8c70[_0x2008d3(0xd8)]==null)return[];const _0x35391a=buildCustomPageDevelopmentUrl(_0x1789ae[_0x2008d3(0xd1)],_0x2f8c70[_0x2008d3(0xe3)]),_0x212213=buildCustomPageEditUrl(_0x1789ae['appCode'],_0x2f8c70[_0x2008d3(0xd8)]);return[{'pageId':_0x2f8c70[_0x2008d3(0xd8)],'label':_0x2f8c70['label'],..._0x35391a?{'pageUrl':_0x35391a}:{},..._0x212213?{'editPageUrl':_0x212213}:{}}];});return{'ok':!![],'data':{'pages':_0x249cdf},'message':_0x249cdf[_0x4f84a4(0xe7)]===0x0?'No\x20Custom\x20Pages\x20found.':_0x4f84a4(0xde)+_0x249cdf[_0x4f84a4(0xe7)]+_0x4f84a4(0xe5)};}};
1
+ const a185_0x22fe20=a185_0x461b;(function(_0x3fc549,_0x44857a){const _0x569902=a185_0x461b,_0x39388a=_0x3fc549();while(!![]){try{const _0x52eafd=-parseInt(_0x569902(0x128))/0x1+-parseInt(_0x569902(0x11e))/0x2*(-parseInt(_0x569902(0x12d))/0x3)+parseInt(_0x569902(0x127))/0x4+-parseInt(_0x569902(0x117))/0x5+-parseInt(_0x569902(0x124))/0x6*(-parseInt(_0x569902(0x120))/0x7)+-parseInt(_0x569902(0x11d))/0x8+parseInt(_0x569902(0x12b))/0x9*(parseInt(_0x569902(0x118))/0xa);if(_0x52eafd===_0x44857a)break;else _0x39388a['push'](_0x39388a['shift']());}catch(_0x527452){_0x39388a['push'](_0x39388a['shift']());}}}(a185_0x363b,0x4b986));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_0x461b(_0x222e73,_0x25bb3a){_0x222e73=_0x222e73-0x117;const _0x363b09=a185_0x363b();let _0x461bf7=_0x363b09[_0x222e73];return _0x461bf7;}function a185_0x363b(){const _0x3cea48=['101139SyKoie','cookie','2489455vTueZN','1850PlSQSi','path','Found\x20','react','No\x20Custom\x20Pages\x20found.','1057080UHvTap','22edDrPn','type','7TlhmzH','compress','\x20Custom\x20Page(s).','menus','11982IpLnDO','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','length','1462212ctVICp','605884CZxzJh','pageId','appCode','39267VvZhaY','page'];a185_0x363b=function(){return _0x3cea48;};return a185_0x363b();}export const pageCustomList={'service':a185_0x22fe20(0x12c),'command':'custom-list','description':a185_0x22fe20(0x125),'risk':'read','defaultOutputFormat':a185_0x22fe20(0x121),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x20406c){const _0x4e5bc0=a185_0x22fe20,_0x57e3fd=(await fetchMenuSnapshot(_0x20406c[_0x4e5bc0(0x12a)],_0x20406c[_0x4e5bc0(0x12e)]))[_0x4e5bc0(0x123)]['flatMap'](_0xdacff8=>{const _0x55eee8=_0x4e5bc0;if(_0xdacff8[_0x55eee8(0x11f)]!==_0x55eee8(0x11b)||_0xdacff8[_0x55eee8(0x129)]==null)return[];const _0x447329=buildCustomPageDevelopmentUrl(_0x20406c['appCode'],_0xdacff8[_0x55eee8(0x119)]),_0x26f57f=buildCustomPageEditUrl(_0x20406c[_0x55eee8(0x12a)],_0xdacff8[_0x55eee8(0x129)]);return[{'pageId':_0xdacff8[_0x55eee8(0x129)],'label':_0xdacff8['label'],..._0x447329?{'pageUrl':_0x447329}:{},..._0x26f57f?{'editPageUrl':_0x26f57f}:{}}];});return{'ok':!![],'data':{'pages':_0x57e3fd},'message':_0x57e3fd[_0x4e5bc0(0x126)]===0x0?_0x4e5bc0(0x11c):_0x4e5bc0(0x11a)+_0x57e3fd['length']+_0x4e5bc0(0x122)};}};
@@ -1 +1 @@
1
- const a176_0x53cfe9=a176_0x3f15;(function(_0x3c44a5,_0x3808c9){const _0x39c19c=a176_0x3f15,_0x326210=_0x3c44a5();while(!![]){try{const _0x4b82ad=-parseInt(_0x39c19c(0x81))/0x1+parseInt(_0x39c19c(0x91))/0x2*(parseInt(_0x39c19c(0x75))/0x3)+parseInt(_0x39c19c(0x8a))/0x4*(parseInt(_0x39c19c(0x85))/0x5)+parseInt(_0x39c19c(0x79))/0x6+-parseInt(_0x39c19c(0x87))/0x7+-parseInt(_0x39c19c(0x98))/0x8*(parseInt(_0x39c19c(0x93))/0x9)+parseInt(_0x39c19c(0x8d))/0xa;if(_0x4b82ad===_0x3808c9)break;else _0x326210['push'](_0x326210['shift']());}catch(_0x19c908){_0x326210['push'](_0x326210['shift']());}}}(a176_0x40e7,0x1ba7d));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a176_0x40e7(){const _0x343544=['pageId','status','apiError','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','appCode','cookie','19094yyJlKS','remark','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','trim','40inDzYc','custom-publish','1525671NEvzGf','page','push','57028EFgmOH','Optional\x20publish\x20remark','isInteger','799650HRrhyv','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','str','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','698fmWYEz','/smartapi/webcode/file/publish','9QmYvrK','runtimePageUrl','FORMAL','string','number','1089624hvMSvL','1485YQYBpB','warnings','Custom\x20Page\x20ID','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','718506bZTqts','write'];a176_0x40e7=function(){return _0x343544;};return a176_0x40e7();}function a176_0x3f15(_0x4504c3,_0x50e6d5){_0x4504c3=_0x4504c3-0x75;const _0x40e7f4=a176_0x40e7();let _0x3f15c4=_0x40e7f4[_0x4504c3];return _0x3f15c4;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a176_0x53cfe9(0x88),'command':a176_0x53cfe9(0x86),'description':a176_0x53cfe9(0x8e),'risk':a176_0x53cfe9(0x7a),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a176_0x53cfe9(0x97),'required':!![],'description':a176_0x53cfe9(0x77)},{'name':a176_0x53cfe9(0x82),'type':a176_0x53cfe9(0x96),'description':a176_0x53cfe9(0x8b)}],async 'validate'(_0x49baaf){readCustomPageId(_0x49baaf);},async 'dryRun'(_0x5605f9){const _0x4abfcc=a176_0x53cfe9,_0x184ce0=readInput(_0x5605f9);return{'method':'POST','url':_0x4abfcc(0x92),'body':{'id':_0x184ce0[_0x4abfcc(0x7b)],..._0x184ce0['remark']?{'remark':_0x184ce0['remark']}:{}},'description':'Would\x20publish\x20Custom\x20Page\x20'+_0x184ce0[_0x4abfcc(0x7b)]+'.'};},async 'execute'(_0xbff1c9){const _0x1639a2=a176_0x53cfe9,_0x2e25a5=readInput(_0xbff1c9);await getCustomPageSource(_0x2e25a5[_0x1639a2(0x7b)]);const _0x34801=await publishCustomPage(_0x2e25a5);if(!Number[_0x1639a2(0x8c)](_0x34801)||_0x34801!==_0x2e25a5[_0x1639a2(0x7b)])throw CliErrors[_0x1639a2(0x7d)](_0x1639a2(0x90));const _0x3a812f=await getCustomPageSource(_0x2e25a5['pageId']);if(_0x3a812f[_0x1639a2(0x7c)]!==_0x1639a2(0x95))throw CliErrors[_0x1639a2(0x7d)](_0x1639a2(0x7e)+(_0x3a812f['status']??'unknown')+'.');const _0xa49fbd=_0x3a812f[_0x1639a2(0x7f)]?.[_0x1639a2(0x84)](),_0x38d408=buildCustomPageEditUrl(_0xa49fbd,_0x2e25a5[_0x1639a2(0x7b)]),_0x38fe78=await resolveCustomPageDevelopmentUrl(_0xa49fbd,_0x2e25a5[_0x1639a2(0x7b)],_0xbff1c9[_0x1639a2(0x80)]),_0x23639d=buildMutationData(_0x2e25a5,!![],_0x38fe78,_0x38d408);_0xa49fbd&&!_0x38fe78&&_0x23639d['warnings'][_0x1639a2(0x89)](_0x1639a2(0x83));const _0x537d5=buildCustomPageRuntimeUrl(_0x3a812f['appCode'],_0x3a812f['pageCode']);return _0x537d5?_0x23639d[_0x1639a2(0x94)]=_0x537d5:_0x23639d[_0x1639a2(0x76)][_0x1639a2(0x89)](_0x1639a2(0x78)),{'ok':!![],'data':_0x23639d,'message':'Published\x20Custom\x20Page\x20'+_0x2e25a5[_0x1639a2(0x7b)]+'.'};}};function readInput(_0x2539b4){const _0x30d213=a176_0x53cfe9,_0x1bb6d2=readCustomPageId(_0x2539b4),_0x32931b=_0x2539b4[_0x30d213(0x8f)](_0x30d213(0x82))[_0x30d213(0x84)]();return{'pageId':_0x1bb6d2,..._0x32931b?{'remark':_0x32931b}:{}};}function buildMutationData(_0x2b85e3,_0x48120d=![],_0x3eb66e,_0xe5db79){const _0x3e996c=a176_0x53cfe9;return{'operation':'page.custom-publish','selector':{'pageId':_0x2b85e3[_0x3e996c(0x7b)]},'before':null,'after':{'pageId':_0x2b85e3['pageId'],'status':_0x3e996c(0x95)},'dryRun':!_0x48120d,'request':_0x2b85e3,..._0x3eb66e?{'pageUrl':_0x3eb66e}:{},..._0xe5db79?{'editPageUrl':_0xe5db79}:{},'warnings':[]};}
1
+ function a186_0xd1fe(){const _0x260a7c=['13869ZEOmnH','21oDgpeY','warnings','/smartapi/webcode/file/publish','page.custom-publish','Published\x20Custom\x20Page\x20','unknown','pageCode','isInteger','number','FORMAL','155QyjnBb','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','980116XYlvuX','4122808gjokNp','3633237lVvDPd','str','appCode','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','trim','apiError','21330sFhwLY','push','Would\x20publish\x20Custom\x20Page\x20','status','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','remark','107694iopsWv','18594sHxGqd','64072qDcjyX','page','compress','custom-publish','pageId'];a186_0xd1fe=function(){return _0x260a7c;};return a186_0xd1fe();}const a186_0x25094d=a186_0x2fd8;(function(_0x18eeb7,_0x3ab6d0){const _0x2a8c4c=a186_0x2fd8,_0x56be13=_0x18eeb7();while(!![]){try{const _0x31238c=parseInt(_0x2a8c4c(0xff))/0x1+-parseInt(_0x2a8c4c(0x113))/0x2+-parseInt(_0x2a8c4c(0x115))/0x3+-parseInt(_0x2a8c4c(0x114))/0x4+-parseInt(_0x2a8c4c(0x111))/0x5*(-parseInt(_0x2a8c4c(0x100))/0x6)+-parseInt(_0x2a8c4c(0x107))/0x7*(parseInt(_0x2a8c4c(0x101))/0x8)+-parseInt(_0x2a8c4c(0x106))/0x9*(-parseInt(_0x2a8c4c(0xf9))/0xa);if(_0x31238c===_0x3ab6d0)break;else _0x56be13['push'](_0x56be13['shift']());}catch(_0x5ebccc){_0x56be13['push'](_0x56be13['shift']());}}}(a186_0xd1fe,0xb3682));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a186_0x2fd8(_0x39e3df,_0x303632){_0x39e3df=_0x39e3df-0xf9;const _0xd1fe29=a186_0xd1fe();let _0x2fd808=_0xd1fe29[_0x39e3df];return _0x2fd808;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a186_0x25094d(0x102),'command':a186_0x25094d(0x104),'description':a186_0x25094d(0x112),'risk':'write','defaultOutputFormat':a186_0x25094d(0x103),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0x25094d(0x10f),'required':!![],'description':'Custom\x20Page\x20ID'},{'name':a186_0x25094d(0xfe),'type':'string','description':'Optional\x20publish\x20remark'}],async 'validate'(_0x5a410b){readCustomPageId(_0x5a410b);},async 'dryRun'(_0xe661d7){const _0x20bb16=a186_0x25094d,_0x17868d=readInput(_0xe661d7);return{'method':'POST','url':_0x20bb16(0x109),'body':{'id':_0x17868d[_0x20bb16(0x105)],..._0x17868d[_0x20bb16(0xfe)]?{'remark':_0x17868d[_0x20bb16(0xfe)]}:{}},'description':_0x20bb16(0xfb)+_0x17868d[_0x20bb16(0x105)]+'.'};},async 'execute'(_0x4d6df2){const _0x5e3fbb=a186_0x25094d,_0x189c4b=readInput(_0x4d6df2);await getCustomPageSource(_0x189c4b[_0x5e3fbb(0x105)]);const _0x510a47=await publishCustomPage(_0x189c4b);if(!Number[_0x5e3fbb(0x10e)](_0x510a47)||_0x510a47!==_0x189c4b[_0x5e3fbb(0x105)])throw CliErrors['apiError'](_0x5e3fbb(0xfd));const _0x1cd731=await getCustomPageSource(_0x189c4b[_0x5e3fbb(0x105)]);if(_0x1cd731[_0x5e3fbb(0xfc)]!==_0x5e3fbb(0x110))throw CliErrors[_0x5e3fbb(0x11a)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x1cd731[_0x5e3fbb(0xfc)]??_0x5e3fbb(0x10c))+'.');const _0x2e344e=_0x1cd731[_0x5e3fbb(0x117)]?.[_0x5e3fbb(0x119)](),_0x3101fb=buildCustomPageEditUrl(_0x2e344e,_0x189c4b[_0x5e3fbb(0x105)]),_0x496b6b=await resolveCustomPageDevelopmentUrl(_0x2e344e,_0x189c4b[_0x5e3fbb(0x105)],_0x4d6df2['cookie']),_0x359dce=buildMutationData(_0x189c4b,!![],_0x496b6b,_0x3101fb);_0x2e344e&&!_0x496b6b&&_0x359dce[_0x5e3fbb(0x108)][_0x5e3fbb(0xfa)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x1e11ad=buildCustomPageRuntimeUrl(_0x1cd731[_0x5e3fbb(0x117)],_0x1cd731[_0x5e3fbb(0x10d)]);return _0x1e11ad?_0x359dce['runtimePageUrl']=_0x1e11ad:_0x359dce['warnings'][_0x5e3fbb(0xfa)](_0x5e3fbb(0x118)),{'ok':!![],'data':_0x359dce,'message':_0x5e3fbb(0x10b)+_0x189c4b[_0x5e3fbb(0x105)]+'.'};}};function readInput(_0x45c69f){const _0x49efe6=a186_0x25094d,_0x24fa78=readCustomPageId(_0x45c69f),_0x5e9397=_0x45c69f[_0x49efe6(0x116)](_0x49efe6(0xfe))[_0x49efe6(0x119)]();return{'pageId':_0x24fa78,..._0x5e9397?{'remark':_0x5e9397}:{}};}function buildMutationData(_0x1aac98,_0x5c50fb=![],_0x536c16,_0x16707e){const _0x4ed56e=a186_0x25094d;return{'operation':_0x4ed56e(0x10a),'selector':{'pageId':_0x1aac98[_0x4ed56e(0x105)]},'before':null,'after':{'pageId':_0x1aac98[_0x4ed56e(0x105)],'status':_0x4ed56e(0x110)},'dryRun':!_0x5c50fb,'request':_0x1aac98,..._0x536c16?{'pageUrl':_0x536c16}:{},..._0x16707e?{'editPageUrl':_0x16707e}:{},'warnings':[]};}
@@ -1 +1 @@
1
- (function(_0x3a13cd,_0x3240a9){const _0x2fe9e6=a177_0x445a,_0x51245e=_0x3a13cd();while(!![]){try{const _0x511c94=parseInt(_0x2fe9e6(0x10f))/0x1+parseInt(_0x2fe9e6(0x110))/0x2*(-parseInt(_0x2fe9e6(0x109))/0x3)+parseInt(_0x2fe9e6(0xff))/0x4+-parseInt(_0x2fe9e6(0x112))/0x5+-parseInt(_0x2fe9e6(0x101))/0x6+parseInt(_0x2fe9e6(0xfc))/0x7*(parseInt(_0x2fe9e6(0x100))/0x8)+parseInt(_0x2fe9e6(0x103))/0x9;if(_0x511c94===_0x3240a9)break;else _0x51245e['push'](_0x51245e['shift']());}catch(_0x1a0962){_0x51245e['push'](_0x51245e['shift']());}}}(a177_0xc0ae,0x4b150));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':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function a177_0x445a(_0x272dbd,_0x578026){_0x272dbd=_0x272dbd-0xfa;const _0xc0aeed=a177_0xc0ae();let _0x445a56=_0xc0aeed[_0x272dbd];return _0x445a56;}function trimOptional(_0x41defb){const _0xaa18ed=a177_0x445a;return _0x41defb?.[_0xaa18ed(0xfb)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x492483,_0x5f4dca){const _0x4df2ad=trimOptional(_0x492483),_0x18afa5=trimOptional(_0x5f4dca);if(!_0x4df2ad||!_0x18afa5)return undefined;return getPublishedAppDomain(_0x4df2ad)+'/'+encodeURIComponent(_0x18afa5);}export function buildCustomPageDevelopmentUrl(_0x395e36,_0x1ec0b1){const _0x3009cb=a177_0x445a,_0x1b508a=trimOptional(_0x395e36),_0x594b75=trimOptional(_0x1ec0b1);if(!_0x1b508a||!_0x594b75)return undefined;return getAppBaseUrl(_0x1b508a)+_0x3009cb(0x111)+encodeURIComponent(_0x594b75);}export async function resolveCustomPageDevelopmentUrl(_0x551c1e,_0xba3710,_0x35a9f0){const _0x2d4f28=a177_0x445a,_0x456843=trimOptional(_0x551c1e);if(!_0x456843)return undefined;try{const _0x406b25=(await fetchMenuSnapshot(_0x456843,_0x35a9f0))['menus'][_0x2d4f28(0x10d)](_0x1e3c98=>_0x1e3c98[_0x2d4f28(0xfd)]==='react'&&_0x1e3c98[_0x2d4f28(0x113)]===_0xba3710);return buildCustomPageDevelopmentUrl(_0x456843,_0x406b25?.[_0x2d4f28(0x108)]);}catch{return undefined;}}function a177_0xc0ae(){const _0x42f869=['9uelzoo','--id\x20must\x20be\x20a\x20positive\x20integer.','file','validation','find','map','230713vWdrPO','323378HGHBHj','/pages/','3074115qDRatc','pageId','num','trim','7izauUK','type','/ide/','554064HixaRn','2785112ghGrIP','479520pDICnm','Invalid\x20Custom\x20Page\x20content:\x20','6929802gOnaeX','message','isInteger','length','join','path'];a177_0xc0ae=function(){return _0x42f869;};return a177_0xc0ae();}export function buildCustomPageEditUrl(_0x27dc38,_0x314520){const _0x53e4e6=a177_0x445a,_0x52bcb8=trimOptional(_0x27dc38);if(!_0x52bcb8)return;const _0x5cc473=trimOptional(String(_0x314520??''));if(!_0x5cc473)return;return getAppBaseUrl(_0x52bcb8)+_0x53e4e6(0xfe)+encodeURIComponent(_0x5cc473);}export async function validateCustomPageContent(_0x18fae1){const _0x265aff=a177_0x445a,_0x4c1a6b=await validateCustomPageSourceFiles(_0x18fae1);if(_0x4c1a6b[_0x265aff(0x106)]>0x0)throw CliErrors[_0x265aff(0x10c)](_0x265aff(0x102)+_0x4c1a6b[_0x265aff(0x10e)](_0x2b8781=>_0x2b8781[_0x265aff(0x10b)]+':\x20'+_0x2b8781[_0x265aff(0x104)])[_0x265aff(0x107)](';\x20'));}export function readCustomPageId(_0xdc99df){const _0x3e3011=a177_0x445a,_0x18af6a=_0xdc99df[_0x3e3011(0xfa)]('id');if(!Number[_0x3e3011(0x105)](_0x18af6a)||_0x18af6a<=0x0)throw CliErrors[_0x3e3011(0x10c)](_0x3e3011(0x10a));return _0x18af6a;}
1
+ const a187_0x331d4a=a187_0x5d4f;function a187_0x5152(){const _0x6199f0=['--id\x20must\x20be\x20a\x20positive\x20integer.','3642TRqQQU','5740kqOtCx','1460286yvKeKX','42HDBwkh','path','isInteger','message','num','48202YnnFwI','195710hcuLJa','/ide/','map','react','11RXKzPT','24TljWnr','2820818qiMoVE','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','find','join','length','menus','693mPkTRA','type','2086580GioUSo','validation','Invalid\x20Custom\x20Page\x20content:\x20'];a187_0x5152=function(){return _0x6199f0;};return a187_0x5152();}(function(_0x2a3ddb,_0x4845a3){const _0x381961=a187_0x5d4f,_0x5460cf=_0x2a3ddb();while(!![]){try{const _0x1a4abe=-parseInt(_0x381961(0x14c))/0x1*(-parseInt(_0x381961(0x15a))/0x2)+-parseInt(_0x381961(0x154))/0x3*(-parseInt(_0x381961(0x15b))/0x4)+-parseInt(_0x381961(0x148))/0x5*(parseInt(_0x381961(0x15d))/0x6)+-parseInt(_0x381961(0x147))/0x7*(parseInt(_0x381961(0x14d))/0x8)+parseInt(_0x381961(0x15c))/0x9+parseInt(_0x381961(0x156))/0xa+-parseInt(_0x381961(0x14e))/0xb;if(_0x1a4abe===_0x4845a3)break;else _0x5460cf['push'](_0x5460cf['shift']());}catch(_0x50cac0){_0x5460cf['push'](_0x5460cf['shift']());}}}(a187_0x5152,0x29d4a));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_0x331d4a(0x14f)};function trimOptional(_0x3c0e4a){return _0x3c0e4a?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x44344f,_0x36a986){const _0x59dba2=trimOptional(_0x44344f),_0x24477d=trimOptional(_0x36a986);if(!_0x59dba2||!_0x24477d)return undefined;return getPublishedAppDomain(_0x59dba2)+'/'+encodeURIComponent(_0x24477d);}export function buildCustomPageDevelopmentUrl(_0x30a676,_0x5bbf8f){const _0x2e6e85=trimOptional(_0x30a676),_0x2d1615=trimOptional(_0x5bbf8f);if(!_0x2e6e85||!_0x2d1615)return undefined;return getAppBaseUrl(_0x2e6e85)+'/pages/'+encodeURIComponent(_0x2d1615);}export async function resolveCustomPageDevelopmentUrl(_0xac87e7,_0x1d898f,_0x3d2c5c){const _0x51e66c=a187_0x331d4a,_0x56c70c=trimOptional(_0xac87e7);if(!_0x56c70c)return undefined;try{const _0x59b264=(await fetchMenuSnapshot(_0x56c70c,_0x3d2c5c))[_0x51e66c(0x153)][_0x51e66c(0x150)](_0xe68de3=>_0xe68de3[_0x51e66c(0x155)]===_0x51e66c(0x14b)&&_0xe68de3['pageId']===_0x1d898f);return buildCustomPageDevelopmentUrl(_0x56c70c,_0x59b264?.[_0x51e66c(0x15e)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x249be3,_0x4ccb23){const _0x4f73d5=a187_0x331d4a,_0x42f241=trimOptional(_0x249be3);if(!_0x42f241)return;const _0x44f08c=trimOptional(String(_0x4ccb23??''));if(!_0x44f08c)return;return getAppBaseUrl(_0x42f241)+_0x4f73d5(0x149)+encodeURIComponent(_0x44f08c);}export async function validateCustomPageContent(_0x3c7d0c){const _0x172fbc=a187_0x331d4a,_0x1ba7e1=await validateCustomPageSourceFiles(_0x3c7d0c);if(_0x1ba7e1[_0x172fbc(0x152)]>0x0)throw CliErrors[_0x172fbc(0x157)](_0x172fbc(0x158)+_0x1ba7e1[_0x172fbc(0x14a)](_0x4a5568=>_0x4a5568['file']+':\x20'+_0x4a5568[_0x172fbc(0x145)])[_0x172fbc(0x151)](';\x20'));}function a187_0x5d4f(_0x39068a,_0x1359e7){_0x39068a=_0x39068a-0x145;const _0x51526c=a187_0x5152();let _0x5d4fb5=_0x51526c[_0x39068a];return _0x5d4fb5;}export function readCustomPageId(_0x1d078c){const _0x447dec=a187_0x331d4a,_0x5a8926=_0x1d078c[_0x447dec(0x146)]('id');if(!Number[_0x447dec(0x15f)](_0x5a8926)||_0x5a8926<=0x0)throw CliErrors[_0x447dec(0x157)](_0x447dec(0x159));return _0x5a8926;}
@@ -1 +1 @@
1
- const a178_0x33bae4=a178_0x5d85;(function(_0x3e9f34,_0x492cdf){const _0x4b3a14=a178_0x5d85,_0x56b125=_0x3e9f34();while(!![]){try{const _0x379fd4=parseInt(_0x4b3a14(0x115))/0x1*(parseInt(_0x4b3a14(0x11b))/0x2)+-parseInt(_0x4b3a14(0x11e))/0x3*(-parseInt(_0x4b3a14(0x10c))/0x4)+parseInt(_0x4b3a14(0x110))/0x5*(-parseInt(_0x4b3a14(0x10f))/0x6)+parseInt(_0x4b3a14(0x117))/0x7*(parseInt(_0x4b3a14(0x11f))/0x8)+parseInt(_0x4b3a14(0x11a))/0x9+parseInt(_0x4b3a14(0x122))/0xa+-parseInt(_0x4b3a14(0x113))/0xb;if(_0x379fd4===_0x492cdf)break;else _0x56b125['push'](_0x56b125['shift']());}catch(_0x3fb8a5){_0x56b125['push'](_0x56b125['shift']());}}}(a178_0x5165,0x9da51));import{format}from'prettier';function a178_0x5165(){const _0x8562e5=['242823dMWnVy','message','typescript','4807593BtPaol','2dtmyLG','trim','filter','3237351mEyBQo','88BKrzDl','.jsx','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','8939800NvjyNF','map','4VPbwIU','entries','babel','498pobCMn','35935KwWKKk','some','all','26679917bRcbfi','toLowerCase','778828SeejUU','endsWith'];a178_0x5165=function(){return _0x8562e5;};return a178_0x5165();}const SOURCE_PARSERS={'.js':'babel','.jsx':a178_0x33bae4(0x10e),'.ts':a178_0x33bae4(0x119),'.tsx':a178_0x33bae4(0x119)},CUSTOM_PAGE_EXTENSIONS=[a178_0x33bae4(0x120),'.tsx'];function a178_0x5d85(_0xf777e5,_0x3b6683){_0xf777e5=_0xf777e5-0x10c;const _0x516579=a178_0x5165();let _0x5d8534=_0x516579[_0xf777e5];return _0x5d8534;}export async function validateCustomPageSourceFiles(_0x31feb0){const _0x2ce7c8=a178_0x33bae4,_0x96c7c6=Object[_0x2ce7c8(0x10d)](_0x31feb0)[_0x2ce7c8(0x11d)](([_0x12a20c])=>getParser(_0x12a20c));if(!_0x96c7c6[_0x2ce7c8(0x111)](([_0xb25d7c])=>isReactSourceFile(_0xb25d7c)))return[{'file':'page\x20files','message':_0x2ce7c8(0x121)}];const _0x502041=await Promise[_0x2ce7c8(0x112)](_0x96c7c6[_0x2ce7c8(0x123)](async([_0x2c4e12,_0x3b33ab])=>{const _0x1b426f=_0x2ce7c8;try{return await format(_0x3b33ab,{'parser':getParser(_0x2c4e12)}),undefined;}catch(_0x246121){return{'file':_0x2c4e12,'message':_0x246121 instanceof Error?_0x246121[_0x1b426f(0x118)]:String(_0x246121)};}}));return _0x502041[_0x2ce7c8(0x11d)](_0x43c3f5=>_0x43c3f5!==undefined);}function getParser(_0x236880){const _0x67cb6f=a178_0x33bae4,_0x174bd9=_0x236880['trim']()[_0x67cb6f(0x114)]();return Object['entries'](SOURCE_PARSERS)['find'](([_0x47fc02])=>_0x174bd9[_0x67cb6f(0x116)](_0x47fc02))?.[0x1];}function isReactSourceFile(_0x2da145){const _0x3956b5=a178_0x33bae4,_0x4c3be4=_0x2da145[_0x3956b5(0x11c)]()[_0x3956b5(0x114)]();return CUSTOM_PAGE_EXTENSIONS[_0x3956b5(0x111)](_0x3bd5bf=>_0x4c3be4[_0x3956b5(0x116)](_0x3bd5bf));}
1
+ const a188_0x5c2480=a188_0x155a;(function(_0x3105e7,_0x217f6f){const _0x7b0bfa=a188_0x155a,_0x82bd6e=_0x3105e7();while(!![]){try{const _0x5d498b=-parseInt(_0x7b0bfa(0x13d))/0x1+-parseInt(_0x7b0bfa(0x14a))/0x2*(-parseInt(_0x7b0bfa(0x152))/0x3)+-parseInt(_0x7b0bfa(0x13f))/0x4*(-parseInt(_0x7b0bfa(0x13c))/0x5)+parseInt(_0x7b0bfa(0x13a))/0x6+parseInt(_0x7b0bfa(0x139))/0x7+parseInt(_0x7b0bfa(0x150))/0x8*(parseInt(_0x7b0bfa(0x13e))/0x9)+parseInt(_0x7b0bfa(0x140))/0xa*(-parseInt(_0x7b0bfa(0x153))/0xb);if(_0x5d498b===_0x217f6f)break;else _0x82bd6e['push'](_0x82bd6e['shift']());}catch(_0x1af0c7){_0x82bd6e['push'](_0x82bd6e['shift']());}}}(a188_0x7e42,0xb84fd));function a188_0x155a(_0x3d713d,_0x2936d6){_0x3d713d=_0x3d713d-0x139;const _0x7e429d=a188_0x7e42();let _0x155a40=_0x7e429d[_0x3d713d];return _0x155a40;}import{format}from'prettier';function a188_0x7e42(){const _0x59baa9=['babel','all','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','.tsx','message','some','toLowerCase','.jsx','2ndndnb','trim','entries','map','typescript','find','363360iCQqOy','endsWith','3793947HZWIxM','1021790xCSIBm','9907982SrQZVX','5500338wRDbMz','filter','105NHHOha','1196278ZoKYUk','99TxcpAm','33724qnctbo','250HfIPVc','page\x20files'];a188_0x7e42=function(){return _0x59baa9;};return a188_0x7e42();}const SOURCE_PARSERS={'.js':a188_0x5c2480(0x142),'.jsx':a188_0x5c2480(0x142),'.ts':a188_0x5c2480(0x14e),'.tsx':a188_0x5c2480(0x14e)},CUSTOM_PAGE_EXTENSIONS=[a188_0x5c2480(0x149),a188_0x5c2480(0x145)];export async function validateCustomPageSourceFiles(_0x6670e6){const _0x259ac5=a188_0x5c2480,_0x5e9822=Object[_0x259ac5(0x14c)](_0x6670e6)['filter'](([_0x422e9f])=>getParser(_0x422e9f));if(!_0x5e9822['some'](([_0x14a8e9])=>isReactSourceFile(_0x14a8e9)))return[{'file':_0x259ac5(0x141),'message':_0x259ac5(0x144)}];const _0x414546=await Promise[_0x259ac5(0x143)](_0x5e9822[_0x259ac5(0x14d)](async([_0x179af4,_0x2412b0])=>{const _0x1de355=_0x259ac5;try{return await format(_0x2412b0,{'parser':getParser(_0x179af4)}),undefined;}catch(_0x34e1cb){return{'file':_0x179af4,'message':_0x34e1cb instanceof Error?_0x34e1cb[_0x1de355(0x146)]:String(_0x34e1cb)};}}));return _0x414546[_0x259ac5(0x13b)](_0x469a4a=>_0x469a4a!==undefined);}function getParser(_0x294090){const _0x43de3b=a188_0x5c2480,_0x457f8c=_0x294090['trim']()[_0x43de3b(0x148)]();return Object['entries'](SOURCE_PARSERS)[_0x43de3b(0x14f)](([_0x1ca257])=>_0x457f8c[_0x43de3b(0x151)](_0x1ca257))?.[0x1];}function isReactSourceFile(_0x8b23b5){const _0xfdb3e1=a188_0x5c2480,_0x269a26=_0x8b23b5[_0xfdb3e1(0x14b)]()[_0xfdb3e1(0x148)]();return CUSTOM_PAGE_EXTENSIONS[_0xfdb3e1(0x147)](_0x2aac70=>_0x269a26[_0xfdb3e1(0x151)](_0x2aac70));}
@@ -1 +1 @@
1
- function a179_0x425b(){const _0x378655=['Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','17087rEbcpE','POST','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','str','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','50sRzFKc','custom-update','6305648HfOTuk','number','page-content','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','3059664IdOIZp','cookie','trim','appCode','pageContent','page-dir','validation','page.custom-update','pageId','114WbMhnD','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','19420kIcBsq','string','write','Updated\x20Custom\x20Page\x20','1689957fgWaMP','113wEuXny','113770BstebD','5085591htthjh','Custom\x20Page\x20ID','page','220bQrJrj','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','newVersion','isInteger','1208jwwdop'];a179_0x425b=function(){return _0x378655;};return a179_0x425b();}const a179_0x2cbb87=a179_0x533e;(function(_0x1045c1,_0x9da089){const _0x23f79f=a179_0x533e,_0x8524d=_0x1045c1();while(!![]){try{const _0xb0ee4b=-parseInt(_0x23f79f(0x1a5))/0x1*(parseInt(_0x23f79f(0x1a0))/0x2)+-parseInt(_0x23f79f(0x1a7))/0x3+-parseInt(_0x23f79f(0x191))/0x4+-parseInt(_0x23f79f(0x1a6))/0x5*(parseInt(_0x23f79f(0x19e))/0x6)+parseInt(_0x23f79f(0x1b0))/0x7*(-parseInt(_0x23f79f(0x1ae))/0x8)+parseInt(_0x23f79f(0x1a4))/0x9*(parseInt(_0x23f79f(0x1b5))/0xa)+-parseInt(_0x23f79f(0x1aa))/0xb*(-parseInt(_0x23f79f(0x195))/0xc);if(_0xb0ee4b===_0x9da089)break;else _0x8524d['push'](_0x8524d['shift']());}catch(_0x3e96fb){_0x8524d['push'](_0x8524d['shift']());}}}(a179_0x425b,0xd40c5));function a179_0x533e(_0x3b4dbc,_0x3f8382){_0x3b4dbc=_0x3b4dbc-0x190;const _0x425b53=a179_0x425b();let _0x533e21=_0x425b53[_0x3b4dbc];return _0x533e21;}import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a179_0x2cbb87(0x1a9),'command':a179_0x2cbb87(0x190),'description':a179_0x2cbb87(0x1ab),'risk':a179_0x2cbb87(0x1a2),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a179_0x2cbb87(0x193),'message':a179_0x2cbb87(0x1b2),'hint':a179_0x2cbb87(0x19f)}],'flags':[{'name':'id','type':a179_0x2cbb87(0x192),'required':!![],'description':a179_0x2cbb87(0x1a8)},{'name':a179_0x2cbb87(0x19a),'type':a179_0x2cbb87(0x1a1),'required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5eeefb){readCustomPageId(_0x5eeefb),await readValidatedPageContent(_0x5eeefb);},async 'dryRun'(_0x2e6fd5){const _0x22b316=a179_0x2cbb87,_0xfb9b07=await readInput(_0x2e6fd5);return{'method':_0x22b316(0x1b1),'url':'/smartapi/webcode/page/update/content','body':{'id':_0xfb9b07[_0x22b316(0x19d)],'codeContent':_0xfb9b07[_0x22b316(0x199)]},'description':_0x22b316(0x194)+_0xfb9b07[_0x22b316(0x19d)]+'.'};},async 'execute'(_0x167f87){const _0x4b240e=a179_0x2cbb87,_0x2bbbba=await readInput(_0x167f87),_0x36a0eb=await updateCustomPageContent({'pageId':_0x2bbbba[_0x4b240e(0x19d)],'pageContent':_0x2bbbba['pageContent']});if(!Number[_0x4b240e(0x1ad)](_0x36a0eb[_0x4b240e(0x1ac)])||_0x36a0eb['newVersion']<=0x0)throw CliErrors['apiError']('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0xc1fc4c=buildCustomPageEditUrl(_0x2bbbba[_0x4b240e(0x198)],_0x2bbbba[_0x4b240e(0x19d)]),_0xa18aa1=await resolveCustomPageDevelopmentUrl(_0x2bbbba[_0x4b240e(0x198)],_0x2bbbba['pageId'],_0x167f87[_0x4b240e(0x196)]);return{'ok':!![],'data':{'operation':_0x4b240e(0x19c),'selector':{'appCode':_0x2bbbba[_0x4b240e(0x198)],'pageId':_0x2bbbba[_0x4b240e(0x19d)]},'before':null,'after':{'pageId':_0x36a0eb[_0x4b240e(0x19d)],'version':_0x36a0eb['newVersion'],'pageContent':_0x2bbbba[_0x4b240e(0x199)]},'dryRun':![],'request':_0x2bbbba,..._0xa18aa1?{'pageUrl':_0xa18aa1}:{},..._0xc1fc4c?{'editPageUrl':_0xc1fc4c}:{},'warnings':_0xa18aa1?[]:[_0x4b240e(0x1b4)]},'message':_0x4b240e(0x1a3)+_0x2bbbba[_0x4b240e(0x19d)]+'.'};}};async function readInput(_0x173bd6){const _0x7b6848=a179_0x2cbb87,_0x356f68=readCustomPageId(_0x173bd6),_0x16078f=_0x173bd6[_0x7b6848(0x1b3)]('appcode')[_0x7b6848(0x197)]()||(await getCustomPageSource(_0x356f68))[_0x7b6848(0x198)]?.[_0x7b6848(0x197)]();if(!_0x16078f)throw CliErrors[_0x7b6848(0x19b)](_0x7b6848(0x1af)+_0x356f68+'.');return{'appCode':_0x16078f,'pageId':_0x356f68,'pageContent':await readValidatedPageContent(_0x173bd6)};}async function readValidatedPageContent(_0x3b3c5f){const _0x571e4c=a179_0x2cbb87,_0x4c729f=await readCustomPageDirectory(_0x3b3c5f[_0x571e4c(0x1b3)](_0x571e4c(0x19a)));return await validateCustomPageContent(_0x4c729f),_0x4c729f;}
1
+ const a189_0x552dd6=a189_0x39a6;(function(_0x4b6880,_0x555728){const _0x5b66eb=a189_0x39a6,_0x25a93a=_0x4b6880();while(!![]){try{const _0x54cd50=parseInt(_0x5b66eb(0x1d8))/0x1*(-parseInt(_0x5b66eb(0x1c1))/0x2)+-parseInt(_0x5b66eb(0x1b7))/0x3*(-parseInt(_0x5b66eb(0x1cf))/0x4)+parseInt(_0x5b66eb(0x1c6))/0x5+parseInt(_0x5b66eb(0x1c5))/0x6*(-parseInt(_0x5b66eb(0x1b5))/0x7)+-parseInt(_0x5b66eb(0x1b8))/0x8+parseInt(_0x5b66eb(0x1c0))/0x9*(-parseInt(_0x5b66eb(0x1cd))/0xa)+parseInt(_0x5b66eb(0x1d2))/0xb*(parseInt(_0x5b66eb(0x1c3))/0xc);if(_0x54cd50===_0x555728)break;else _0x25a93a['push'](_0x25a93a['shift']());}catch(_0xa12ef){_0x25a93a['push'](_0x25a93a['shift']());}}}(a189_0x44e9,0x3bbc1));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a189_0x44e9(){const _0x210c0b=['write','/smartapi/webcode/page/update/content','pageId','97mLDlLy','Updated\x20Custom\x20Page\x20','newVersion','appcode','Directory\x20containing\x20all\x20complete\x20page\x20files','custom-update','147KzomHJ','validation','15nXuzhA','2642832SaCWkR','appCode','page-content','apiError','string','str','compress','POST','9UvWkpC','3158jfGfiE','Custom\x20Page\x20ID','1695132cvOqSu','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','32694aPSFFt','203935bGzqaq','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','page-dir','isInteger','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','page','449070cyIHca','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','225356AHsunJ','trim','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','44ybmJmN','pageContent','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page'];a189_0x44e9=function(){return _0x210c0b;};return a189_0x44e9();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';function a189_0x39a6(_0x4e14e1,_0x14c330){_0x4e14e1=_0x4e14e1-0x1b1;const _0x44e9a8=a189_0x44e9();let _0x39a655=_0x44e9a8[_0x4e14e1];return _0x39a655;}export const pageCustomUpdate={'service':a189_0x552dd6(0x1cc),'command':a189_0x552dd6(0x1b4),'description':a189_0x552dd6(0x1d4),'risk':a189_0x552dd6(0x1d5),'defaultOutputFormat':a189_0x552dd6(0x1be),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x552dd6(0x1ba),'message':a189_0x552dd6(0x1d1),'hint':a189_0x552dd6(0x1ce)}],'flags':[{'name':'id','type':'number','required':!![],'description':a189_0x552dd6(0x1c2)},{'name':a189_0x552dd6(0x1c8),'type':a189_0x552dd6(0x1bc),'required':!![],'description':a189_0x552dd6(0x1b3)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49a99a){readCustomPageId(_0x49a99a),await readValidatedPageContent(_0x49a99a);},async 'dryRun'(_0x1cc040){const _0x497862=a189_0x552dd6,_0x9bcdf0=await readInput(_0x1cc040);return{'method':_0x497862(0x1bf),'url':_0x497862(0x1d6),'body':{'id':_0x9bcdf0['pageId'],'codeContent':_0x9bcdf0[_0x497862(0x1d3)]},'description':_0x497862(0x1c7)+_0x9bcdf0[_0x497862(0x1d7)]+'.'};},async 'execute'(_0x4a868c){const _0x1cfa44=a189_0x552dd6,_0x542b72=await readInput(_0x4a868c),_0x2a2e97=await updateCustomPageContent({'pageId':_0x542b72[_0x1cfa44(0x1d7)],'pageContent':_0x542b72[_0x1cfa44(0x1d3)]});if(!Number[_0x1cfa44(0x1c9)](_0x2a2e97[_0x1cfa44(0x1b1)])||_0x2a2e97['newVersion']<=0x0)throw CliErrors[_0x1cfa44(0x1bb)](_0x1cfa44(0x1cb));const _0xbeb8fc=buildCustomPageEditUrl(_0x542b72[_0x1cfa44(0x1b9)],_0x542b72['pageId']),_0x477763=await resolveCustomPageDevelopmentUrl(_0x542b72[_0x1cfa44(0x1b9)],_0x542b72['pageId'],_0x4a868c['cookie']);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x542b72[_0x1cfa44(0x1b9)],'pageId':_0x542b72[_0x1cfa44(0x1d7)]},'before':null,'after':{'pageId':_0x2a2e97[_0x1cfa44(0x1d7)],'version':_0x2a2e97[_0x1cfa44(0x1b1)],'pageContent':_0x542b72[_0x1cfa44(0x1d3)]},'dryRun':![],'request':_0x542b72,..._0x477763?{'pageUrl':_0x477763}:{},..._0xbeb8fc?{'editPageUrl':_0xbeb8fc}:{},'warnings':_0x477763?[]:[_0x1cfa44(0x1c4)]},'message':_0x1cfa44(0x1d9)+_0x542b72[_0x1cfa44(0x1d7)]+'.'};}};async function readInput(_0x53de09){const _0x124d42=a189_0x552dd6,_0x5e9193=readCustomPageId(_0x53de09),_0x3d611b=_0x53de09[_0x124d42(0x1bd)](_0x124d42(0x1b2))[_0x124d42(0x1d0)]()||(await getCustomPageSource(_0x5e9193))[_0x124d42(0x1b9)]?.[_0x124d42(0x1d0)]();if(!_0x3d611b)throw CliErrors[_0x124d42(0x1b6)](_0x124d42(0x1ca)+_0x5e9193+'.');return{'appCode':_0x3d611b,'pageId':_0x5e9193,'pageContent':await readValidatedPageContent(_0x53de09)};}async function readValidatedPageContent(_0x2a7852){const _0x53cd87=a189_0x552dd6,_0x465d59=await readCustomPageDirectory(_0x2a7852[_0x53cd87(0x1bd)]('page-dir'));return await validateCustomPageContent(_0x465d59),_0x465d59;}
@@ -1 +1 @@
1
- function a180_0xaf01(){const _0x5042c4=['code','data-list-status','3722248YCzmxR','length','name','831912cCkqha','/standard-page-status?appCode=','source','manualResolutionRequired','compress','14sDXDCz','relatedPages','GET','nextAction','/smartapi/lovrabet/dataset/','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','related-pages-fallback','alias','2809FxtIzR','469485VuXubG','7NtoYMP','10gLUSQb','appCode','page','read','11483813JnhtPk','1155415qhbuQH','12oPzGPK','674319YjcDxV'];a180_0xaf01=function(){return _0x5042c4;};return a180_0xaf01();}const a180_0x165a4=a180_0xedc6;(function(_0x4a9833,_0x2cb1e4){const _0x16c30b=a180_0xedc6,_0x48ca60=_0x4a9833();while(!![]){try{const _0x1189ba=-parseInt(_0x16c30b(0xc0))/0x1*(parseInt(_0x16c30b(0xb8))/0x2)+parseInt(_0x16c30b(0xad))/0x3+parseInt(_0x16c30b(0xb3))/0x4+-parseInt(_0x16c30b(0xab))/0x5*(-parseInt(_0x16c30b(0xac))/0x6)+parseInt(_0x16c30b(0xa5))/0x7*(parseInt(_0x16c30b(0xb0))/0x8)+-parseInt(_0x16c30b(0xa4))/0x9*(parseInt(_0x16c30b(0xa6))/0xa)+-parseInt(_0x16c30b(0xaa))/0xb;if(_0x1189ba===_0x2cb1e4)break;else _0x48ca60['push'](_0x48ca60['shift']());}catch(_0x9781da){_0x48ca60['push'](_0x48ca60['shift']());}}}(a180_0xaf01,0x3baa3));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 a180_0xedc6(_0x18c189,_0x21a96f){_0x18c189=_0x18c189-0xa4;const _0xaf01ae=a180_0xaf01();let _0xedc6b0=_0xaf01ae[_0x18c189];return _0xedc6b0;}export const pageDataListStatus={'service':a180_0x165a4(0xa8),'command':a180_0x165a4(0xaf),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a180_0x165a4(0xa9),'defaultOutputFormat':a180_0x165a4(0xb7),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a180_0x165a4(0xbf),'type':'string','description':a180_0x165a4(0xbd)}],async 'validate'(_0xeca1cd){validateDatasetSelector(_0xeca1cd);},async 'dryRun'(_0x6e9416){const _0x3440c9=a180_0x165a4,_0x5c2d2d=await loadDatasetDetailForPage(_0x6e9416);return{'method':_0x3440c9(0xba),'url':_0x3440c9(0xbc)+_0x5c2d2d[_0x3440c9(0xae)]+_0x3440c9(0xb4)+encodeURIComponent(_0x6e9416[_0x3440c9(0xa7)]),'description':serializeDryRunDescription({'dataset':{'id':_0x5c2d2d['id'],'code':_0x5c2d2d[_0x3440c9(0xae)],'name':_0x5c2d2d[_0x3440c9(0xb2)]},'action':'query-data-list-status'})};},async 'execute'(_0x91f947){const _0x230a89=a180_0x165a4,_0x17d01d=await loadDatasetDetailForPage(_0x91f947),_0x322cb2=await loadDataListPageStatusForGenerate(_0x91f947,_0x17d01d[_0x230a89(0xae)]),_0x2639d0=getUndeletedRelatedPages(_0x17d01d),_0x164c1c=assessDataListPageState(_0x17d01d[_0x230a89(0xae)],_0x322cb2,{'fallbackUndeletedPages':_0x2639d0});return{'ok':!![],'data':{'datasetCode':_0x17d01d[_0x230a89(0xae)],'precheckSource':_0x322cb2?.[_0x230a89(0xb5)]??_0x230a89(0xbe),'status':_0x164c1c['status'],'manualResolutionRequired':_0x164c1c[_0x230a89(0xb6)],'nextAction':_0x164c1c[_0x230a89(0xbb)],'dataListPageStatus':_0x322cb2,'relatedPages':{'total':_0x17d01d[_0x230a89(0xb9)]['length'],'undeletedCount':_0x2639d0[_0x230a89(0xb1)]}}};}};
1
+ function a190_0x4dd9(_0x4fa1c8,_0x190a48){_0x4fa1c8=_0x4fa1c8-0x181;const _0x54819e=a190_0x5481();let _0x4dd91e=_0x54819e[_0x4fa1c8];return _0x4dd91e;}const a190_0x3d8a1f=a190_0x4dd9;(function(_0x25ce63,_0x1c88ae){const _0x50beb8=a190_0x4dd9,_0x2e85ab=_0x25ce63();while(!![]){try{const _0x18136e=parseInt(_0x50beb8(0x194))/0x1*(-parseInt(_0x50beb8(0x18d))/0x2)+-parseInt(_0x50beb8(0x1a0))/0x3+-parseInt(_0x50beb8(0x19a))/0x4*(parseInt(_0x50beb8(0x18e))/0x5)+-parseInt(_0x50beb8(0x183))/0x6*(-parseInt(_0x50beb8(0x184))/0x7)+parseInt(_0x50beb8(0x19d))/0x8*(-parseInt(_0x50beb8(0x196))/0x9)+-parseInt(_0x50beb8(0x193))/0xa*(parseInt(_0x50beb8(0x18c))/0xb)+-parseInt(_0x50beb8(0x197))/0xc*(-parseInt(_0x50beb8(0x192))/0xd);if(_0x18136e===_0x1c88ae)break;else _0x2e85ab['push'](_0x2e85ab['shift']());}catch(_0x53f21f){_0x2e85ab['push'](_0x2e85ab['shift']());}}}(a190_0x5481,0x4f257));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a190_0x5481(){const _0x347ef9=['365631IJyQBn','name','manualResolutionRequired','134886xGHbnq','14khQumm','page','/standard-page-status?appCode=','query-data-list-status','appCode','related-pages-fallback','length','data-list-status','1934229dwHomU','24008GwUYeA','375815TLyodt','relatedPages','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','13762489yHhvNO','10TPxTFu','1dlZRBj','alias','281691iaBRZD','12xtMWCs','code','GET','20syytEX','status','read','24lIfTjz','nextAction','compress'];a190_0x5481=function(){return _0x347ef9;};return a190_0x5481();}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a190_0x3d8a1f(0x185),'command':a190_0x3d8a1f(0x18b),'description':a190_0x3d8a1f(0x190),'risk':a190_0x3d8a1f(0x19c),'defaultOutputFormat':a190_0x3d8a1f(0x19f),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0x3d8a1f(0x195),'type':'string','description':a190_0x3d8a1f(0x191)}],async 'validate'(_0x47e09d){validateDatasetSelector(_0x47e09d);},async 'dryRun'(_0x22a2c6){const _0x33de64=a190_0x3d8a1f,_0x1f95f2=await loadDatasetDetailForPage(_0x22a2c6);return{'method':_0x33de64(0x199),'url':'/smartapi/lovrabet/dataset/'+_0x1f95f2[_0x33de64(0x198)]+_0x33de64(0x186)+encodeURIComponent(_0x22a2c6[_0x33de64(0x188)]),'description':serializeDryRunDescription({'dataset':{'id':_0x1f95f2['id'],'code':_0x1f95f2[_0x33de64(0x198)],'name':_0x1f95f2[_0x33de64(0x181)]},'action':_0x33de64(0x187)})};},async 'execute'(_0xd5580f){const _0x3bdc87=a190_0x3d8a1f,_0x369460=await loadDatasetDetailForPage(_0xd5580f),_0x1469ff=await loadDataListPageStatusForGenerate(_0xd5580f,_0x369460[_0x3bdc87(0x198)]),_0x27cf4b=getUndeletedRelatedPages(_0x369460),_0x13f93a=assessDataListPageState(_0x369460['code'],_0x1469ff,{'fallbackUndeletedPages':_0x27cf4b});return{'ok':!![],'data':{'datasetCode':_0x369460[_0x3bdc87(0x198)],'precheckSource':_0x1469ff?.['source']??_0x3bdc87(0x189),'status':_0x13f93a[_0x3bdc87(0x19b)],'manualResolutionRequired':_0x13f93a[_0x3bdc87(0x182)],'nextAction':_0x13f93a[_0x3bdc87(0x19e)],'dataListPageStatus':_0x1469ff,'relatedPages':{'total':_0x369460[_0x3bdc87(0x18f)][_0x3bdc87(0x18a)],'undeletedCount':_0x27cf4b[_0x3bdc87(0x18a)]}}};}};