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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/kb-search-client.js +1 -1
  301. package/lib/core/page/file-system.js +1 -1
  302. package/lib/core/page/hash.js +1 -1
  303. package/lib/core/page/lock.js +1 -1
  304. package/lib/core/page/lr-smart-jsx.js +1 -1
  305. package/lib/core/sql-index-auditor.js +1 -1
  306. package/lib/core/sql-sync/config.js +1 -1
  307. package/lib/core/sql-sync/file-system.js +1 -1
  308. package/lib/core/sql-sync/hash.js +1 -1
  309. package/lib/core/sql-sync/lock.js +1 -1
  310. package/lib/core/sql-sync/utils.js +1 -1
  311. package/lib/core/sql-validator.js +1 -1
  312. package/lib/errors.js +1 -1
  313. package/lib/framework/build-all-flags.js +1 -1
  314. package/lib/framework/error-output.js +1 -1
  315. package/lib/framework/explicit-yes.js +1 -1
  316. package/lib/framework/flags.js +1 -1
  317. package/lib/framework/help.js +1 -1
  318. package/lib/framework/index.js +1 -1
  319. package/lib/framework/output.js +1 -1
  320. package/lib/framework/response.js +1 -1
  321. package/lib/framework/runner-alias.js +1 -1
  322. package/lib/framework/runner.js +1 -1
  323. package/lib/framework/schema-export.js +1 -1
  324. package/lib/framework/supported-flags.js +1 -1
  325. package/lib/framework/types.js +1 -1
  326. package/lib/generated/build-info.d.ts +4 -4
  327. package/lib/generated/build-info.js +1 -1
  328. package/lib/generated/official-routing.js +1 -1
  329. package/lib/generated/routing-contract.js +1 -1
  330. package/lib/help.js +1 -1
  331. package/lib/postinstall.js +1 -1
  332. package/lib/runtime/confirmation.js +1 -1
  333. package/lib/runtime/event.js +1 -1
  334. package/lib/runtime/index.js +1 -1
  335. package/lib/runtime/queue.js +1 -1
  336. package/lib/runtime/resolve.js +1 -1
  337. package/lib/services/dataset-design/checkpoint.js +1 -1
  338. package/lib/services/dataset-design/commands.js +1 -1
  339. package/lib/services/dataset-design/contract.js +1 -1
  340. package/lib/skills/builtin-skill.js +1 -1
  341. package/lib/skills/main.js +1 -1
  342. package/lib/skills/npx-skills-add.js +1 -1
  343. package/lib/skills/skill-presence.js +1 -1
  344. package/lib/telemetry/cli-command-trace.js +1 -1
  345. package/lib/telemetry/cli-help-trace.js +1 -1
  346. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  347. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  348. package/lib/telemetry/send-cli-trace-log.js +1 -1
  349. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  350. package/lib/utils/ai_config.js +1 -1
  351. package/lib/utils/apply-jq-filter.js +1 -1
  352. package/lib/utils/cdn-config.js +1 -1
  353. package/lib/utils/check-sdk-version.js +1 -1
  354. package/lib/utils/cli-version-check.js +1 -1
  355. package/lib/utils/cli-version-policy.js +1 -1
  356. package/lib/utils/config.js +1 -1
  357. package/lib/utils/entity-with-id.js +1 -1
  358. package/lib/utils/file-utils.js +1 -1
  359. package/lib/utils/guides-cdn.js +1 -1
  360. package/lib/utils/http-client.js +1 -1
  361. package/lib/utils/is-non-interactive.js +1 -1
  362. package/lib/utils/logger.js +1 -1
  363. package/lib/utils/params.js +1 -1
  364. package/lib/utils/platform.js +1 -1
  365. package/lib/utils/sleep.js +1 -1
  366. package/lib/utils/template-replacer.js +1 -1
  367. package/lib/utils/update-notice.js +1 -1
  368. package/lib/utils/version.js +1 -1
  369. package/lib/utils/with-active-cookie.js +1 -1
  370. package/lib/utils/write-cli-side-channel.js +1 -1
  371. package/package.json +1 -1
  372. package/skills/rabetbase/SKILL.md +1 -1
  373. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  374. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  375. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a74_0x4bfeae=a74_0x363b;(function(_0x544801,_0x28e5ad){const _0x42b4c0=a74_0x363b,_0x270a66=_0x544801();while(!![]){try{const _0x496cd8=-parseInt(_0x42b4c0(0x105))/0x1*(-parseInt(_0x42b4c0(0xf3))/0x2)+-parseInt(_0x42b4c0(0xf9))/0x3+parseInt(_0x42b4c0(0xdf))/0x4+parseInt(_0x42b4c0(0xcf))/0x5*(-parseInt(_0x42b4c0(0xd0))/0x6)+-parseInt(_0x42b4c0(0xf6))/0x7*(parseInt(_0x42b4c0(0xcd))/0x8)+-parseInt(_0x42b4c0(0xe7))/0x9+parseInt(_0x42b4c0(0xfe))/0xa;if(_0x496cd8===_0x28e5ad)break;else _0x270a66['push'](_0x270a66['shift']());}catch(_0x5805fb){_0x270a66['push'](_0x270a66['shift']());}}}(a74_0x12e5,0x601fe));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a74_0x363b(_0x2df22f,_0x5acf5b){_0x2df22f=_0x2df22f-0xca;const _0x12e56f=a74_0x12e5();let _0x363bc0=_0x12e56f[_0x2df22f];return _0x363bc0;}const DATASET_ID_FLAG={'name':'id','type':a74_0x4bfeae(0xe6),'description':'Dataset\x20id'},DBID_FLAG={'name':a74_0x4bfeae(0x101),'type':'number','description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':'confirm','type':a74_0x4bfeae(0xdc),'description':a74_0x4bfeae(0xea)},CASCADE_FLAG={'name':a74_0x4bfeae(0xcb),'type':'boolean','description':'Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm'},EXPECTED_COUNT_FLAG={'name':a74_0x4bfeae(0xf8),'type':'number','description':a74_0x4bfeae(0xef)};export const datasetDelete={'service':a74_0x4bfeae(0xe0),'command':a74_0x4bfeae(0xe8),'description':a74_0x4bfeae(0xd5),'risk':a74_0x4bfeae(0x102),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e9f0e){const _0x59b05d=a74_0x4bfeae,_0x40546f=_0x5e9f0e[_0x59b05d(0xec)]('id'),_0x1ee318=_0x5e9f0e['str'](_0x59b05d(0xeb)),_0x2dafc8=_0x5e9f0e['num'](_0x59b05d(0x101)),_0x54c14a=[_0x40546f>0x0,Boolean(_0x1ee318),_0x2dafc8>0x0][_0x59b05d(0xe2)](Boolean);if(_0x54c14a[_0x59b05d(0xd7)]===0x0)throw CliErrors[_0x59b05d(0xed)](_0x59b05d(0x10a));if(_0x54c14a[_0x59b05d(0xd7)]>0x1)throw CliErrors[_0x59b05d(0xed)](_0x59b05d(0xee));},async 'dryRun'(_0x5cac0b){const _0x407b7c=a74_0x4bfeae,_0x52dc6f=await resolveTargets(_0x5cac0b),_0x12cf5f=_0x5cac0b[_0x407b7c(0x106)](_0x407b7c(0xcb));return{'method':_0x407b7c(0xca),'url':_0x407b7c(0xf1)+(_0x12cf5f?_0x407b7c(0xda):_0x407b7c(0xd6)),'body':{'count':_0x52dc6f[_0x407b7c(0xd7)],'cascade':_0x12cf5f,'datasets':_0x52dc6f},'description':_0x12cf5f?'Would\x20delete\x20'+_0x52dc6f['length']+_0x407b7c(0xfb):_0x407b7c(0xe9)+_0x52dc6f[_0x407b7c(0xd7)]+_0x407b7c(0xfa)};},async 'execute'(_0x278323){const _0x1af867=a74_0x4bfeae;if(!_0x278323[_0x1af867(0x106)](_0x1af867(0x107)))throw CliErrors[_0x1af867(0xed)](_0x1af867(0xff),_0x1af867(0x108));const _0x10b0fe=await resolveTargets(_0x278323),_0x1193bd=_0x278323[_0x1af867(0x106)](_0x1af867(0xcb)),_0x55d708=[],_0x2756a2=[];for(const _0x530d8a of _0x10b0fe){try{await deleteDataset(_0x530d8a['id'],_0x1193bd),_0x55d708[_0x1af867(0xdb)](_0x530d8a);}catch(_0x3ebdc3){_0x2756a2[_0x1af867(0xdb)]({..._0x530d8a,'error':_0x3ebdc3 instanceof Error?_0x3ebdc3[_0x1af867(0xfc)]:String(_0x3ebdc3)});}}if(_0x2756a2[_0x1af867(0xd7)]>0x0){const _0x40241d=buildPageRestoreCommands(_0x278323[_0x1af867(0x100)],_0x1193bd?_0x55d708:[]);return{'ok':![],'data':{'requested':_0x10b0fe['length'],'cascade':_0x1193bd,'deletedCount':_0x55d708[_0x1af867(0xd7)],'failedCount':_0x2756a2[_0x1af867(0xd7)],'deleted':_0x55d708,'failed':_0x2756a2,'pageRestoreCommands':_0x40241d},'message':_0x1af867(0xe3)+_0x55d708[_0x1af867(0xd7)]+'/'+_0x10b0fe[_0x1af867(0xd7)]+'\x20dataset(s);\x20'+_0x2756a2[_0x1af867(0xd7)]+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x10b0fe[_0x1af867(0xd7)],'cascade':_0x1193bd,'deletedCount':_0x55d708[_0x1af867(0xd7)],'deleted':_0x55d708,'pageRestoreCommands':buildPageRestoreCommands(_0x278323['appCode'],_0x1193bd?_0x55d708:[])},'message':'Deleted\x20'+_0x55d708[_0x1af867(0xd7)]+_0x1af867(0xe1)};}};async function resolveTargets(_0x9265c6){const _0x21d377=a74_0x4bfeae,_0x44e283=_0x9265c6[_0x21d377(0xec)]('id'),_0x5294cc=_0x9265c6[_0x21d377(0x10b)](_0x21d377(0xeb)),_0x2bc67f=_0x9265c6[_0x21d377(0xec)](_0x21d377(0x101));let _0x341dc9;_0x5294cc?(_0x341dc9=await listDatasets(_0x9265c6['appCode'],{'code':_0x5294cc}),_0x341dc9=_0x341dc9[_0x21d377(0xe2)](_0x14fe13=>_0x14fe13[_0x21d377(0xeb)]===_0x5294cc)):(_0x341dc9=await listDatasets(_0x9265c6[_0x21d377(0x100)]),_0x44e283>0x0&&(_0x341dc9=_0x341dc9[_0x21d377(0xe2)](_0x2105ad=>_0x2105ad['id']===_0x44e283)),_0x2bc67f>0x0&&(_0x341dc9=_0x341dc9[_0x21d377(0xe2)](_0x575b77=>_0x575b77[_0x21d377(0xf7)]?.[_0x21d377(0x104)]===_0x2bc67f)));const _0x6ca3b1=[];for(const _0x116449 of _0x341dc9){const _0xb8aa0b=await getDatasetDetail(_0x116449['code']),_0x4c090a=Array[_0x21d377(0xf2)](_0xb8aa0b[_0x21d377(0xdd)])?_0xb8aa0b[_0x21d377(0xdd)][_0x21d377(0xe2)](_0xdd2e13=>_0xdd2e13!=null&&typeof _0xdd2e13===_0x21d377(0xde)&&_0xdd2e13[_0x21d377(0xd8)]!==!![]):[];_0x6ca3b1[_0x21d377(0xdb)](normalizeTarget(_0x116449,_0x4c090a));}if(_0x6ca3b1[_0x21d377(0xd7)]===0x0){const _0x51266e=_0x5294cc||(_0x44e283>0x0?_0x21d377(0xd2)+_0x44e283:_0x21d377(0xcc)+_0x2bc67f);throw CliErrors[_0x21d377(0xed)](_0x21d377(0xd4)+_0x51266e+'.');}const _0x293420=_0x9265c6[_0x21d377(0xec)](_0x21d377(0xf8));if(_0x293420>0x0&&_0x6ca3b1['length']!==_0x293420)throw CliErrors['validation']('Matched\x20'+_0x6ca3b1['length']+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x293420+'.');return _0x6ca3b1;}function a74_0x12e5(){const _0x3424e0=['dbName','12015250jwgdfv','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','appCode','dbid','high-risk-write','relatedPages','dbId','9bgorLq','bool','confirm','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','isInteger','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','str','POST','cascade','dbid=','56704FmGeih','name','40QTvVfO','583536CXsZsR','rabetbase\x20page\x20restore\x20--id\x20','id=','title','No\x20undeleted\x20dataset\x20found\x20for\x20','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','false','length','deleted','add','true','push','boolean','relatedPageInfoList','object','957980QEKCTF','dataset','\x20dataset(s)','filter','Deleted\x20','tableName','type','number','101124GZWpOQ','delete','Would\x20safely\x20delete\x20','Required\x20to\x20execute\x20dataset\x20deletion','code','num','validation','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','source','/smartapi/dataset/delete?cascade=','isArray','80430kTSHsv','description','map','217rWwrGM','dbtableConfig','expected-count','1200651fevisL','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','message'];a74_0x12e5=function(){return _0x3424e0;};return a74_0x12e5();}function normalizeTarget(_0x3ef380,_0x485d35){const _0x8c8584=a74_0x4bfeae,_0x4e5238=_0x3ef380[_0x8c8584(0xf7)]??{},_0x495787=_0x485d35['map'](_0x2561cf=>{const _0x25190c=_0x8c8584;if(_0x2561cf==null||typeof _0x2561cf!=='object')return null;const _0x337b7e=_0x2561cf,_0xe9531a=Number(_0x337b7e['id']);if(!Number[_0x25190c(0x109)](_0xe9531a)||_0xe9531a<=0x0)return null;const _0x17f037=_0x337b7e[_0x25190c(0xd3)]??_0x337b7e[_0x25190c(0xce)];return{'id':_0xe9531a,..._0x17f037?{'name':String(_0x17f037)}:{},..._0x337b7e[_0x25190c(0xe5)]?{'type':String(_0x337b7e[_0x25190c(0xe5)])}:{}};})['filter'](_0x14d64b=>_0x14d64b!==null);return{'id':_0x3ef380['id'],'code':_0x3ef380[_0x8c8584(0xeb)],'name':_0x3ef380['name'],'description':_0x3ef380[_0x8c8584(0xf4)],'source':_0x3ef380[_0x8c8584(0xf0)],'dbId':_0x4e5238[_0x8c8584(0x104)],'dbName':_0x4e5238[_0x8c8584(0xfd)],'tableName':_0x4e5238[_0x8c8584(0xe4)],'relatedPageCount':_0x495787[_0x8c8584(0xd7)],'relatedPages':_0x495787};}function buildPageRestoreCommands(_0x392fbe,_0x53aac7){const _0x80d235=a74_0x4bfeae,_0x499165=new Set();for(const _0x1dc1d4 of _0x53aac7){for(const _0x44dd9c of _0x1dc1d4[_0x80d235(0x103)])_0x499165[_0x80d235(0xd9)](_0x44dd9c['id']);}return[..._0x499165][_0x80d235(0xf5)](_0xab86a0=>_0x80d235(0xd1)+_0xab86a0+'\x20--appcode\x20'+_0x392fbe);}
1
+ const a74_0x5d7f05=a74_0x280a;(function(_0x157f25,_0x2d179f){const _0x295c8c=a74_0x280a,_0x12fcde=_0x157f25();while(!![]){try{const _0x4eda1c=-parseInt(_0x295c8c(0x11c))/0x1*(-parseInt(_0x295c8c(0x116))/0x2)+-parseInt(_0x295c8c(0x113))/0x3*(-parseInt(_0x295c8c(0x120))/0x4)+-parseInt(_0x295c8c(0x11f))/0x5+parseInt(_0x295c8c(0xfd))/0x6+-parseInt(_0x295c8c(0x10a))/0x7+parseInt(_0x295c8c(0x105))/0x8+-parseInt(_0x295c8c(0xf8))/0x9*(parseInt(_0x295c8c(0x11b))/0xa);if(_0x4eda1c===_0x2d179f)break;else _0x12fcde['push'](_0x12fcde['shift']());}catch(_0x23c866){_0x12fcde['push'](_0x12fcde['shift']());}}}(a74_0x4c5c,0xf1379));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a74_0x5d7f05(0x118),'description':a74_0x5d7f05(0x103)},DBID_FLAG={'name':a74_0x5d7f05(0xf1),'type':a74_0x5d7f05(0x118),'description':a74_0x5d7f05(0xe7)},CONFIRM_FLAG={'name':a74_0x5d7f05(0x115),'type':'boolean','description':'Required\x20to\x20execute\x20dataset\x20deletion'},CASCADE_FLAG={'name':a74_0x5d7f05(0xe5),'type':a74_0x5d7f05(0xeb),'description':a74_0x5d7f05(0x124)},EXPECTED_COUNT_FLAG={'name':a74_0x5d7f05(0xe9),'type':a74_0x5d7f05(0x118),'description':a74_0x5d7f05(0xf4)};export const datasetDelete={'service':a74_0x5d7f05(0x123),'command':a74_0x5d7f05(0x101),'description':a74_0x5d7f05(0x108),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3cb686){const _0x4f5274=a74_0x5d7f05,_0x1de244=_0x3cb686[_0x4f5274(0x117)]('id'),_0xb17246=_0x3cb686[_0x4f5274(0x11d)]('code'),_0x34cf29=_0x3cb686[_0x4f5274(0x117)](_0x4f5274(0xf1)),_0x101a6c=[_0x1de244>0x0,Boolean(_0xb17246),_0x34cf29>0x0][_0x4f5274(0x102)](Boolean);if(_0x101a6c[_0x4f5274(0xe3)]===0x0)throw CliErrors[_0x4f5274(0xea)](_0x4f5274(0x119));if(_0x101a6c[_0x4f5274(0xe3)]>0x1)throw CliErrors[_0x4f5274(0xea)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x849675){const _0x2fe8ab=a74_0x5d7f05,_0x5bf801=await resolveTargets(_0x849675),_0xd13770=_0x849675[_0x2fe8ab(0x10e)](_0x2fe8ab(0xe5));return{'method':_0x2fe8ab(0xf3),'url':_0x2fe8ab(0xe2)+(_0xd13770?_0x2fe8ab(0x100):_0x2fe8ab(0x110)),'body':{'count':_0x5bf801[_0x2fe8ab(0xe3)],'cascade':_0xd13770,'datasets':_0x5bf801},'description':_0xd13770?_0x2fe8ab(0x107)+_0x5bf801['length']+_0x2fe8ab(0xe4):_0x2fe8ab(0x125)+_0x5bf801['length']+_0x2fe8ab(0x10f)};},async 'execute'(_0x3cc0f9){const _0x180866=a74_0x5d7f05;if(!_0x3cc0f9[_0x180866(0x10e)](_0x180866(0x115)))throw CliErrors[_0x180866(0xea)]('--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x97f571=await resolveTargets(_0x3cc0f9),_0x8afe7d=_0x3cc0f9[_0x180866(0x10e)]('cascade'),_0x82a862=[],_0x1c9257=[];for(const _0x176c07 of _0x97f571){try{await deleteDataset(_0x176c07['id'],_0x8afe7d),_0x82a862[_0x180866(0x112)](_0x176c07);}catch(_0x59e66f){_0x1c9257['push']({..._0x176c07,'error':_0x59e66f instanceof Error?_0x59e66f[_0x180866(0x10d)]:String(_0x59e66f)});}}if(_0x1c9257['length']>0x0){const _0x236fe7=buildPageRestoreCommands(_0x3cc0f9[_0x180866(0xef)],_0x8afe7d?_0x82a862:[]);return{'ok':![],'data':{'requested':_0x97f571[_0x180866(0xe3)],'cascade':_0x8afe7d,'deletedCount':_0x82a862[_0x180866(0xe3)],'failedCount':_0x1c9257['length'],'deleted':_0x82a862,'failed':_0x1c9257,'pageRestoreCommands':_0x236fe7},'message':_0x180866(0xec)+_0x82a862[_0x180866(0xe3)]+'/'+_0x97f571[_0x180866(0xe3)]+_0x180866(0xe6)+_0x1c9257[_0x180866(0xe3)]+_0x180866(0xfc)};}return{'ok':!![],'data':{'requested':_0x97f571[_0x180866(0xe3)],'cascade':_0x8afe7d,'deletedCount':_0x82a862['length'],'deleted':_0x82a862,'pageRestoreCommands':buildPageRestoreCommands(_0x3cc0f9[_0x180866(0xef)],_0x8afe7d?_0x82a862:[])},'message':_0x180866(0xec)+_0x82a862[_0x180866(0xe3)]+_0x180866(0xf7)};}};function a74_0x4c5c(){const _0x92a8c5=['message','bool','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','false','add','push','96933DDRSsA','relatedPages','confirm','4dKLdOH','num','number','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','type','110oBrCqz','831119VbYzbU','str','dbName','4581190DIkNXZ','68kfbOpi','deleted','title','dataset','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','Would\x20safely\x20delete\x20','/smartapi/dataset/delete?cascade=','length','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','cascade','\x20dataset(s);\x20','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','expected-count','validation','boolean','Deleted\x20','id=','source','appCode','description','dbid','No\x20undeleted\x20dataset\x20found\x20for\x20','POST','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','map','isArray','\x20dataset(s)','1048392deFHfF','dbid=','Matched\x20','dbtableConfig','\x20failed','3761916pVLJdl','object','\x20--appcode\x20','true','delete','filter','Dataset\x20id','dbId','11563824AwsuvH','relatedPageInfoList','Would\x20delete\x20','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','tableName','7688506iDFrHc','rabetbase\x20page\x20restore\x20--id\x20','code'];a74_0x4c5c=function(){return _0x92a8c5;};return a74_0x4c5c();}async function resolveTargets(_0x2d5fa8){const _0x3a133d=a74_0x5d7f05,_0x432b58=_0x2d5fa8[_0x3a133d(0x117)]('id'),_0x2821cc=_0x2d5fa8[_0x3a133d(0x11d)](_0x3a133d(0x10c)),_0x527af7=_0x2d5fa8[_0x3a133d(0x117)](_0x3a133d(0xf1));let _0x576df7;_0x2821cc?(_0x576df7=await listDatasets(_0x2d5fa8[_0x3a133d(0xef)],{'code':_0x2821cc}),_0x576df7=_0x576df7[_0x3a133d(0x102)](_0x2ae006=>_0x2ae006[_0x3a133d(0x10c)]===_0x2821cc)):(_0x576df7=await listDatasets(_0x2d5fa8['appCode']),_0x432b58>0x0&&(_0x576df7=_0x576df7['filter'](_0x48bfaf=>_0x48bfaf['id']===_0x432b58)),_0x527af7>0x0&&(_0x576df7=_0x576df7[_0x3a133d(0x102)](_0x5c68c1=>_0x5c68c1[_0x3a133d(0xfb)]?.['dbId']===_0x527af7)));const _0x24347a=[];for(const _0x4f2035 of _0x576df7){const _0x3d8dfb=await getDatasetDetail(_0x4f2035[_0x3a133d(0x10c)]),_0xeb37f4=Array[_0x3a133d(0xf6)](_0x3d8dfb[_0x3a133d(0x106)])?_0x3d8dfb[_0x3a133d(0x106)]['filter'](_0x113d0c=>_0x113d0c!=null&&typeof _0x113d0c===_0x3a133d(0xfe)&&_0x113d0c[_0x3a133d(0x121)]!==!![]):[];_0x24347a[_0x3a133d(0x112)](normalizeTarget(_0x4f2035,_0xeb37f4));}if(_0x24347a[_0x3a133d(0xe3)]===0x0){const _0x48e421=_0x2821cc||(_0x432b58>0x0?_0x3a133d(0xed)+_0x432b58:_0x3a133d(0xf9)+_0x527af7);throw CliErrors[_0x3a133d(0xea)](_0x3a133d(0xf2)+_0x48e421+'.');}const _0x44995c=_0x2d5fa8[_0x3a133d(0x117)]('expected-count');if(_0x44995c>0x0&&_0x24347a[_0x3a133d(0xe3)]!==_0x44995c)throw CliErrors[_0x3a133d(0xea)](_0x3a133d(0xfa)+_0x24347a['length']+_0x3a133d(0xe8)+_0x44995c+'.');return _0x24347a;}function normalizeTarget(_0x1ec176,_0x14fe4b){const _0x270b7a=a74_0x5d7f05,_0x431ffd=_0x1ec176['dbtableConfig']??{},_0xdc3d3=_0x14fe4b['map'](_0x26a942=>{const _0x27b732=a74_0x280a;if(_0x26a942==null||typeof _0x26a942!=='object')return null;const _0x4ddad0=_0x26a942,_0x41edec=Number(_0x4ddad0['id']);if(!Number['isInteger'](_0x41edec)||_0x41edec<=0x0)return null;const _0x23423c=_0x4ddad0[_0x27b732(0x122)]??_0x4ddad0['name'];return{'id':_0x41edec,..._0x23423c?{'name':String(_0x23423c)}:{},..._0x4ddad0[_0x27b732(0x11a)]?{'type':String(_0x4ddad0[_0x27b732(0x11a)])}:{}};})[_0x270b7a(0x102)](_0x3abf9a=>_0x3abf9a!==null);return{'id':_0x1ec176['id'],'code':_0x1ec176['code'],'name':_0x1ec176['name'],'description':_0x1ec176[_0x270b7a(0xf0)],'source':_0x1ec176[_0x270b7a(0xee)],'dbId':_0x431ffd[_0x270b7a(0x104)],'dbName':_0x431ffd[_0x270b7a(0x11e)],'tableName':_0x431ffd[_0x270b7a(0x109)],'relatedPageCount':_0xdc3d3[_0x270b7a(0xe3)],'relatedPages':_0xdc3d3};}function a74_0x280a(_0x16617b,_0x2b733e){_0x16617b=_0x16617b-0xe2;const _0x4c5c0c=a74_0x4c5c();let _0x280a6b=_0x4c5c0c[_0x16617b];return _0x280a6b;}function buildPageRestoreCommands(_0x662348,_0x5452ad){const _0x1bc06d=a74_0x5d7f05,_0x44fc1d=new Set();for(const _0x3ac589 of _0x5452ad){for(const _0x396fd2 of _0x3ac589[_0x1bc06d(0x114)])_0x44fc1d[_0x1bc06d(0x111)](_0x396fd2['id']);}return[..._0x44fc1d][_0x1bc06d(0xf5)](_0x488827=>_0x1bc06d(0x10b)+_0x488827+_0x1bc06d(0xff)+_0x662348);}
@@ -1 +1 @@
1
- function a75_0x4cfe(_0x28916d,_0x3e8db0){_0x28916d=_0x28916d-0x1ca;const _0x45b893=a75_0x45b8();let _0x4cfec8=_0x45b893[_0x28916d];return _0x4cfec8;}function a75_0x45b8(){const _0x488ae9=['11637711VhycQd','308OagzQs','186NlIHhC','4691iClZbL','25399SGsGgk','814TvwTjE','2032OGFpCO','10bQOnRt','10195787dChiFW','4788sXpPxE','8resLTT','2874469zNEPfa','8660UjwTaM','1929QZIohe'];a75_0x45b8=function(){return _0x488ae9;};return a75_0x45b8();}(function(_0x40c2ec,_0x247254){const _0x1dfc14=a75_0x4cfe,_0xab7d73=_0x40c2ec();while(!![]){try{const _0x58164c=parseInt(_0x1dfc14(0x1d6))/0x1*(parseInt(_0x1dfc14(0x1ca))/0x2)+-parseInt(_0x1dfc14(0x1d2))/0x3*(-parseInt(_0x1dfc14(0x1cb))/0x4)+-parseInt(_0x1dfc14(0x1d1))/0x5*(parseInt(_0x1dfc14(0x1d5))/0x6)+parseInt(_0x1dfc14(0x1cd))/0x7*(parseInt(_0x1dfc14(0x1cf))/0x8)+-parseInt(_0x1dfc14(0x1d3))/0x9*(-parseInt(_0x1dfc14(0x1cc))/0xa)+-parseInt(_0x1dfc14(0x1d7))/0xb*(-parseInt(_0x1dfc14(0x1ce))/0xc)+-parseInt(_0x1dfc14(0x1d0))/0xd*(parseInt(_0x1dfc14(0x1d4))/0xe);if(_0x58164c===_0x247254)break;else _0xab7d73['push'](_0xab7d73['shift']());}catch(_0x218124){_0xab7d73['push'](_0xab7d73['shift']());}}}(a75_0x45b8,0xf15c6));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignContext=designCommand('context');
1
+ const a75_0x1a9296=a75_0x502b;(function(_0x228a74,_0x150f3c){const _0x51a546=a75_0x502b,_0x1c40f4=_0x228a74();while(!![]){try{const _0x138eb5=parseInt(_0x51a546(0x1e5))/0x1*(-parseInt(_0x51a546(0x1e4))/0x2)+parseInt(_0x51a546(0x1de))/0x3+parseInt(_0x51a546(0x1e2))/0x4*(-parseInt(_0x51a546(0x1e3))/0x5)+-parseInt(_0x51a546(0x1dc))/0x6*(parseInt(_0x51a546(0x1e1))/0x7)+-parseInt(_0x51a546(0x1e6))/0x8+-parseInt(_0x51a546(0x1df))/0x9+parseInt(_0x51a546(0x1dd))/0xa;if(_0x138eb5===_0x150f3c)break;else _0x1c40f4['push'](_0x1c40f4['shift']());}catch(_0x540ef5){_0x1c40f4['push'](_0x1c40f4['shift']());}}}(a75_0x584b,0xc7000));function a75_0x584b(){const _0xd447a=['8507216YAMxQg','263346sCHsGD','43512950bgLygX','3190311kTBBIZ','13365603VRVWJQ','context','140gHgTZc','291112jCrEyJ','80XPbHOi','1046GvaiMB','17vKFdrq'];a75_0x584b=function(){return _0xd447a;};return a75_0x584b();}import{designCommand}from'../../services/dataset-design/commands.js';function a75_0x502b(_0x15160f,_0x443dfd){_0x15160f=_0x15160f-0x1dc;const _0x584b31=a75_0x584b();let _0x502bbd=_0x584b31[_0x15160f];return _0x502bbd;}export const datasetDesignContext=designCommand(a75_0x1a9296(0x1e0));
@@ -1 +1 @@
1
- const a76_0x454bc1=a76_0x119d;function a76_0x119d(_0x511d67,_0x4d1db1){_0x511d67=_0x511d67-0x18e;const _0x449103=a76_0x4491();let _0x119d64=_0x449103[_0x511d67];return _0x119d64;}(function(_0x23e39f,_0x25bf3a){const _0x35a9f1=a76_0x119d,_0x491ee5=_0x23e39f();while(!![]){try{const _0x77e9b2=parseInt(_0x35a9f1(0x19a))/0x1*(parseInt(_0x35a9f1(0x198))/0x2)+-parseInt(_0x35a9f1(0x18f))/0x3*(parseInt(_0x35a9f1(0x192))/0x4)+parseInt(_0x35a9f1(0x18e))/0x5*(parseInt(_0x35a9f1(0x191))/0x6)+-parseInt(_0x35a9f1(0x193))/0x7*(-parseInt(_0x35a9f1(0x194))/0x8)+-parseInt(_0x35a9f1(0x196))/0x9+-parseInt(_0x35a9f1(0x197))/0xa*(parseInt(_0x35a9f1(0x195))/0xb)+parseInt(_0x35a9f1(0x199))/0xc;if(_0x77e9b2===_0x25bf3a)break;else _0x491ee5['push'](_0x491ee5['shift']());}catch(_0x1c264d){_0x491ee5['push'](_0x491ee5['shift']());}}}(a76_0x4491,0x1daff));function a76_0x4491(){const _0x557057=['6xucxCR','253412Qtfowt','28DDqPwW','288232JXSSLT','22WvsouR','932040iyYyVv','324230whwvkd','60lCjuHS','938844TgyrvT','3314tdlXNI','157925wTdGEm','3UZyCqv','start'];a76_0x4491=function(){return _0x557057;};return a76_0x4491();}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStart=designCommand(a76_0x454bc1(0x190));
1
+ function a76_0x3204(){const _0x21df6c=['3046572LLYQjV','19185JZBTVi','18HdbkYu','5110ztMbic','start','2769886PKpEZx','1865758hcLNzk','7436151BgEwmA','1836eqAYNX','8GroRBF','60533kvddnQ','1768600gnWmcE'];a76_0x3204=function(){return _0x21df6c;};return a76_0x3204();}function a76_0x1a11(_0x1d6da7,_0x13a4d3){_0x1d6da7=_0x1d6da7-0x148;const _0x3204b3=a76_0x3204();let _0x1a11a6=_0x3204b3[_0x1d6da7];return _0x1a11a6;}const a76_0x4f6822=a76_0x1a11;(function(_0x44f748,_0xf1ee8e){const _0x3ed9b1=a76_0x1a11,_0x502d29=_0x44f748();while(!![]){try{const _0x4a9a05=-parseInt(_0x3ed9b1(0x149))/0x1+parseInt(_0x3ed9b1(0x14e))/0x2+parseInt(_0x3ed9b1(0x14f))/0x3+-parseInt(_0x3ed9b1(0x14b))/0x4*(-parseInt(_0x3ed9b1(0x150))/0x5)+-parseInt(_0x3ed9b1(0x151))/0x6*(-parseInt(_0x3ed9b1(0x148))/0x7)+parseInt(_0x3ed9b1(0x14c))/0x8*(parseInt(_0x3ed9b1(0x14a))/0x9)+-parseInt(_0x3ed9b1(0x152))/0xa*(parseInt(_0x3ed9b1(0x14d))/0xb);if(_0x4a9a05===_0xf1ee8e)break;else _0x502d29['push'](_0x502d29['shift']());}catch(_0x2d3694){_0x502d29['push'](_0x502d29['shift']());}}}(a76_0x3204,0xf34c5));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStart=designCommand(a76_0x4f6822(0x153));
@@ -1 +1 @@
1
- const a77_0x5c3e9e=a77_0x3663;(function(_0x10969d,_0x51a8d0){const _0x508f80=a77_0x3663,_0xe79631=_0x10969d();while(!![]){try{const _0x149e2a=parseInt(_0x508f80(0x193))/0x1+-parseInt(_0x508f80(0x198))/0x2+parseInt(_0x508f80(0x199))/0x3*(-parseInt(_0x508f80(0x197))/0x4)+-parseInt(_0x508f80(0x194))/0x5*(-parseInt(_0x508f80(0x190))/0x6)+-parseInt(_0x508f80(0x18f))/0x7*(parseInt(_0x508f80(0x191))/0x8)+parseInt(_0x508f80(0x195))/0x9*(-parseInt(_0x508f80(0x196))/0xa)+parseInt(_0x508f80(0x192))/0xb;if(_0x149e2a===_0x51a8d0)break;else _0xe79631['push'](_0xe79631['shift']());}catch(_0x4de049){_0xe79631['push'](_0xe79631['shift']());}}}(a77_0x1f23,0xd626f));function a77_0x3663(_0x2a8831,_0xece5e3){_0x2a8831=_0x2a8831-0x18e;const _0x1f237e=a77_0x1f23();let _0x366352=_0x1f237e[_0x2a8831];return _0x366352;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStatus=designCommand(a77_0x5c3e9e(0x18e));function a77_0x1f23(){const _0x48fd24=['15210272UnStXs','959213xnsqtP','655IuaClT','18hmjKvo','4052530VdMYaw','4ETWaiC','896888ZZQlmN','3924861IHlske','status','3136LCUVvV','51150cRqUYW','256RFckeN'];a77_0x1f23=function(){return _0x48fd24;};return a77_0x1f23();}
1
+ function a77_0x1c58(){const _0x39ccef=['3951280faufyy','669707fbOWfr','127482czucVk','2843832NQXroK','77IZTGnK','status','4395312sKVEGL','847964neOHMk','5834331pxuZep','4lqLKhI'];a77_0x1c58=function(){return _0x39ccef;};return a77_0x1c58();}function a77_0x7bcf(_0x88755f,_0x16430d){_0x88755f=_0x88755f-0x141;const _0x1c58e1=a77_0x1c58();let _0x7bcf65=_0x1c58e1[_0x88755f];return _0x7bcf65;}const a77_0x2e8d2d=a77_0x7bcf;(function(_0x126ff7,_0x236f04){const _0x4129f2=a77_0x7bcf,_0x4f1de1=_0x126ff7();while(!![]){try{const _0x2f24c2=-parseInt(_0x4129f2(0x146))/0x1+-parseInt(_0x4129f2(0x142))/0x2+-parseInt(_0x4129f2(0x148))/0x3*(-parseInt(_0x4129f2(0x144))/0x4)+-parseInt(_0x4129f2(0x145))/0x5+-parseInt(_0x4129f2(0x147))/0x6*(-parseInt(_0x4129f2(0x149))/0x7)+parseInt(_0x4129f2(0x141))/0x8+parseInt(_0x4129f2(0x143))/0x9;if(_0x2f24c2===_0x236f04)break;else _0x4f1de1['push'](_0x4f1de1['shift']());}catch(_0x40c98a){_0x4f1de1['push'](_0x4f1de1['shift']());}}}(a77_0x1c58,0x78f1d));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStatus=designCommand(a77_0x2e8d2d(0x14a));
@@ -1 +1 @@
1
- function a78_0x4216(_0x311331,_0x4865c3){_0x311331=_0x311331-0x76;const _0x3b016e=a78_0x3b01();let _0x4216d5=_0x3b016e[_0x311331];return _0x4216d5;}(function(_0xbbc631,_0x2ff846){const _0x29edb4=a78_0x4216,_0x883f40=_0xbbc631();while(!![]){try{const _0x495189=-parseInt(_0x29edb4(0x77))/0x1+parseInt(_0x29edb4(0x79))/0x2+parseInt(_0x29edb4(0x7d))/0x3*(-parseInt(_0x29edb4(0x7c))/0x4)+parseInt(_0x29edb4(0x7f))/0x5*(-parseInt(_0x29edb4(0x7b))/0x6)+parseInt(_0x29edb4(0x7a))/0x7*(-parseInt(_0x29edb4(0x80))/0x8)+-parseInt(_0x29edb4(0x76))/0x9+-parseInt(_0x29edb4(0x7e))/0xa*(-parseInt(_0x29edb4(0x78))/0xb);if(_0x495189===_0x2ff846)break;else _0x883f40['push'](_0x883f40['shift']());}catch(_0x2a0fd8){_0x883f40['push'](_0x883f40['shift']());}}}(a78_0x3b01,0x9682d));import{designCommand}from'../../services/dataset-design/commands.js';function a78_0x3b01(){const _0xaf1962=['1740hdTEIs','36404gLgojA','267cJfNQR','2330VTqbGP','605sCEgdP','117872xXblMQ','6353883GTHlia','500598oWYmYy','129173mxwlqb','1013328iqOXHK','273LvnrsS'];a78_0x3b01=function(){return _0xaf1962;};return a78_0x3b01();}export const datasetDesignSyncRetry=designCommand('sync-retry');
1
+ (function(_0xe509d6,_0x43d228){const _0x358bc9=a78_0x1839,_0x445e01=_0xe509d6();while(!![]){try{const _0x21fd80=-parseInt(_0x358bc9(0x17f))/0x1+-parseInt(_0x358bc9(0x17e))/0x2+parseInt(_0x358bc9(0x17b))/0x3*(-parseInt(_0x358bc9(0x17c))/0x4)+-parseInt(_0x358bc9(0x179))/0x5+parseInt(_0x358bc9(0x180))/0x6*(-parseInt(_0x358bc9(0x17a))/0x7)+parseInt(_0x358bc9(0x17d))/0x8+parseInt(_0x358bc9(0x181))/0x9;if(_0x21fd80===_0x43d228)break;else _0x445e01['push'](_0x445e01['shift']());}catch(_0x10fa1b){_0x445e01['push'](_0x445e01['shift']());}}}(a78_0xee47,0x5c8c9));import{designCommand}from'../../services/dataset-design/commands.js';function a78_0x1839(_0x1dc178,_0x1c5ca2){_0x1dc178=_0x1dc178-0x179;const _0xee4714=a78_0xee47();let _0x183988=_0xee4714[_0x1dc178];return _0x183988;}function a78_0xee47(){const _0x45467f=['313934fZfXxt','710151nHSUPv','6918iQFLNY','11628036vBCHoW','148475fIisJM','924ZrJcpX','12VxGacV','18008tJTcGz','1232752uJaXkO'];a78_0xee47=function(){return _0x45467f;};return a78_0xee47();}export const datasetDesignSyncRetry=designCommand('sync-retry');
@@ -1 +1 @@
1
- const a79_0x13d51e=a79_0x2341;function a79_0x2341(_0x44b1a5,_0x53a16a){_0x44b1a5=_0x44b1a5-0x14c;const _0x4ac11a=a79_0x4ac1();let _0x2341ac=_0x4ac11a[_0x44b1a5];return _0x2341ac;}(function(_0x8d1598,_0x3fd464){const _0x3d0b2a=a79_0x2341,_0x509b34=_0x8d1598();while(!![]){try{const _0x42ca7c=-parseInt(_0x3d0b2a(0x159))/0x1*(parseInt(_0x3d0b2a(0x155))/0x2)+parseInt(_0x3d0b2a(0x153))/0x3*(-parseInt(_0x3d0b2a(0x14f))/0x4)+parseInt(_0x3d0b2a(0x156))/0x5*(-parseInt(_0x3d0b2a(0x151))/0x6)+-parseInt(_0x3d0b2a(0x157))/0x7*(-parseInt(_0x3d0b2a(0x154))/0x8)+-parseInt(_0x3d0b2a(0x150))/0x9*(-parseInt(_0x3d0b2a(0x14e))/0xa)+-parseInt(_0x3d0b2a(0x14c))/0xb+-parseInt(_0x3d0b2a(0x158))/0xc*(-parseInt(_0x3d0b2a(0x152))/0xd);if(_0x42ca7c===_0x3fd464)break;else _0x509b34['push'](_0x509b34['shift']());}catch(_0x2377f7){_0x509b34['push'](_0x509b34['shift']());}}}(a79_0x4ac1,0x87f18));function a79_0x4ac1(){const _0x2aaaf8=['420KCjnZZ','4772341eZviEU','108132ZYtGuk','192KKYYRM','5761239KOmaBh','sync-status','456910HhQaTq','4zkFtSZ','144KEUAkV','17124YuDodu','1859KZdUxW','2886417YVtbUi','8MLLVSR','4364URcQyj'];a79_0x4ac1=function(){return _0x2aaaf8;};return a79_0x4ac1();}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncStatus=designCommand(a79_0x13d51e(0x14d));
1
+ const a79_0x3a963b=a79_0x5346;function a79_0x5346(_0x5959b4,_0xe92a7b){_0x5959b4=_0x5959b4-0xdf;const _0x5c8867=a79_0x5c88();let _0x534652=_0x5c8867[_0x5959b4];return _0x534652;}(function(_0x2020f6,_0xf331bf){const _0x278292=a79_0x5346,_0x861728=_0x2020f6();while(!![]){try{const _0x234337=parseInt(_0x278292(0xdf))/0x1*(-parseInt(_0x278292(0xe2))/0x2)+parseInt(_0x278292(0xe1))/0x3+-parseInt(_0x278292(0xe6))/0x4+parseInt(_0x278292(0xe3))/0x5*(parseInt(_0x278292(0xe5))/0x6)+parseInt(_0x278292(0xe7))/0x7+parseInt(_0x278292(0xe0))/0x8+parseInt(_0x278292(0xe4))/0x9*(parseInt(_0x278292(0xe8))/0xa);if(_0x234337===_0xf331bf)break;else _0x861728['push'](_0x861728['shift']());}catch(_0x253ff7){_0x861728['push'](_0x861728['shift']());}}}(a79_0x5c88,0x71b29));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncStatus=designCommand(a79_0x3a963b(0xe9));function a79_0x5c88(){const _0x41d869=['42750XXzInQ','6ofnncX','2843900ewvygr','1788822MWrchH','640DuXqCY','sync-status','24pqveyH','1639072rrKUVM','934887jrgYIX','6168GBapfw','873185IPfDjB'];a79_0x5c88=function(){return _0x41d869;};return a79_0x5c88();}
@@ -1 +1 @@
1
- function a80_0x5b1d(){const _0x4113bf=['248qFNzhf','14952516llZbZe','90tPayIy','55nPkdFz','validate','422559rRAPXs','178TzsdJO','178818DuKDwH','3BAVBDb','10527006SSTKBv','7829qaqBCM','1273552vdOzqk','8120400bzqIJX'];a80_0x5b1d=function(){return _0x4113bf;};return a80_0x5b1d();}const a80_0x573d39=a80_0x1ea5;function a80_0x1ea5(_0x5da448,_0x3b16f3){_0x5da448=_0x5da448-0x16e;const _0x5b1d50=a80_0x5b1d();let _0x1ea5ca=_0x5b1d50[_0x5da448];return _0x1ea5ca;}(function(_0x4ad7bc,_0x3793e6){const _0x205d0e=a80_0x1ea5,_0x524b93=_0x4ad7bc();while(!![]){try{const _0x14eb71=-parseInt(_0x205d0e(0x177))/0x1*(parseInt(_0x205d0e(0x173))/0x2)+-parseInt(_0x205d0e(0x175))/0x3*(parseInt(_0x205d0e(0x178))/0x4)+parseInt(_0x205d0e(0x16f))/0x5*(-parseInt(_0x205d0e(0x174))/0x6)+-parseInt(_0x205d0e(0x176))/0x7+-parseInt(_0x205d0e(0x17a))/0x8*(parseInt(_0x205d0e(0x172))/0x9)+-parseInt(_0x205d0e(0x179))/0xa+parseInt(_0x205d0e(0x170))/0xb*(parseInt(_0x205d0e(0x16e))/0xc);if(_0x14eb71===_0x3793e6)break;else _0x524b93['push'](_0x524b93['shift']());}catch(_0x52a03e){_0x524b93['push'](_0x524b93['shift']());}}}(a80_0x5b1d,0xdd7cd));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignValidate=designCommand(a80_0x573d39(0x171));
1
+ (function(_0x150b85,_0x2bb611){const _0xd6d5f5=a80_0x1218,_0x575f06=_0x150b85();while(!![]){try{const _0x5f473d=parseInt(_0xd6d5f5(0x1aa))/0x1+-parseInt(_0xd6d5f5(0x1a8))/0x2*(-parseInt(_0xd6d5f5(0x1a7))/0x3)+parseInt(_0xd6d5f5(0x1ad))/0x4+parseInt(_0xd6d5f5(0x1a6))/0x5+-parseInt(_0xd6d5f5(0x1a9))/0x6+-parseInt(_0xd6d5f5(0x1ab))/0x7+-parseInt(_0xd6d5f5(0x1ac))/0x8;if(_0x5f473d===_0x2bb611)break;else _0x575f06['push'](_0x575f06['shift']());}catch(_0x3eff8f){_0x575f06['push'](_0x575f06['shift']());}}}(a80_0x2595,0xba136));function a80_0x1218(_0x250f7f,_0x59fd1f){_0x250f7f=_0x250f7f-0x1a6;const _0x259529=a80_0x2595();let _0x121859=_0x259529[_0x250f7f];return _0x121859;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignValidate=designCommand('validate');function a80_0x2595(){const _0x563e82=['18251232EwdSZI','5437344bjOpLn','6519540HMUNkc','400947DalpqI','20thcBpg','2691732Ugftdr','846015jwGNjg','9474899vmRLKt'];a80_0x2595=function(){return _0x563e82;};return a80_0x2595();}
@@ -1 +1 @@
1
- const a81_0xfa4f42=a81_0x38b8;(function(_0x375426,_0x3d883b){const _0x5785a8=a81_0x38b8,_0x4efc84=_0x375426();while(!![]){try{const _0x524e59=parseInt(_0x5785a8(0xa4))/0x1+parseInt(_0x5785a8(0x8e))/0x2+parseInt(_0x5785a8(0x84))/0x3*(parseInt(_0x5785a8(0x9b))/0x4)+-parseInt(_0x5785a8(0xba))/0x5*(parseInt(_0x5785a8(0xb0))/0x6)+-parseInt(_0x5785a8(0xc7))/0x7+parseInt(_0x5785a8(0xcc))/0x8*(parseInt(_0x5785a8(0x80))/0x9)+-parseInt(_0x5785a8(0x9c))/0xa;if(_0x524e59===_0x3d883b)break;else _0x4efc84['push'](_0x4efc84['shift']());}catch(_0x5ebcde){_0x4efc84['push'](_0x4efc84['shift']());}}}(a81_0x19f0,0x486f1));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x29a069){const _0x1a9e79=a81_0x38b8;if(_0x29a069[_0x1a9e79(0xbe)])return null;const _0xdc444a=Boolean(_0x29a069['displayName']!==undefined||_0x29a069[_0x1a9e79(0x97)]!==undefined);let _0x3c338c={};if(!_0xdc444a&&typeof _0x29a069[_0x1a9e79(0x91)]===_0x1a9e79(0xc6))try{_0x3c338c=JSON[_0x1a9e79(0xce)](_0x29a069['extend']);}catch{}const _0x3541f3=_0xdc444a?_0x29a069[_0x1a9e79(0x99)]:_0x29a069[_0x1a9e79(0x92)],_0x4b4ef9=_0xdc444a?_0x29a069[_0x1a9e79(0x87)]:_0x29a069[_0x1a9e79(0x99)],_0x1e3c91=_0xdc444a?_0x29a069[_0x1a9e79(0x97)]:_0x29a069[_0x1a9e79(0xc5)]||_0x29a069['dataType'],_0x26eb48=_0xdc444a?_0x29a069[_0x1a9e79(0xb6)]===!![]:_0x3c338c[_0x1a9e79(0xb6)]===!![],_0x36f93d=_0xdc444a?_0x29a069[_0x1a9e79(0x83)]===!![]:_0x3c338c[_0x1a9e79(0x83)]===!![],_0x404f22=_0xdc444a?_0x29a069[_0x1a9e79(0x96)]??null:_0x3c338c[_0x1a9e79(0x96)]??null,_0x5e00f3={'name':_0x3541f3,'displayName':_0x4b4ef9||_0x3541f3,'type':_0x1e3c91,'dbType':_0x29a069['dbType'],'pk':_0x26eb48,'required':_0x36f93d,'deprecated':_0x29a069[_0x1a9e79(0x9e)]===!![],'description':_0x29a069[_0x1a9e79(0xae)]||undefined};return Array[_0x1a9e79(0xb9)](_0x404f22)&&_0x404f22['length']>0x0&&(_0x5e00f3[_0x1a9e79(0x96)]=_0x404f22),_0x5e00f3;}function parseJsonMaybe(_0x13d708){const _0x9af716=a81_0x38b8;if(typeof _0x13d708!=='string')return _0x13d708;try{return JSON[_0x9af716(0xce)](_0x13d708);}catch{return _0x13d708;}}function normalizeOperationEntry(_0x17c5e5,_0x47c52e){const _0x15a792=a81_0x38b8;if(!_0x47c52e||typeof _0x47c52e!==_0x15a792(0x81))return null;if(!_0x47c52e[_0x15a792(0xc2)]||!_0x47c52e[_0x15a792(0xaa)])return null;const _0x440947={'name':_0x17c5e5,'method':_0x47c52e[_0x15a792(0xc2)],'path':_0x47c52e[_0x15a792(0xaa)]};if(_0x47c52e['host'])_0x440947[_0x15a792(0xc4)]=_0x47c52e[_0x15a792(0xc4)];if(_0x47c52e[_0x15a792(0xa9)]!=null){const _0x3a74ba=parseJsonMaybe(_0x47c52e[_0x15a792(0xa9)]);_0x440947[_0x15a792(0xa9)]=_0x3a74ba;}if(_0x47c52e[_0x15a792(0x9d)]!=null){const _0x5c029d=parseJsonMaybe(_0x47c52e['responseBody']);_0x440947[_0x15a792(0x9d)]=_0x5c029d;}if(_0x47c52e[_0x15a792(0x7f)]!=null)_0x440947[_0x15a792(0x7f)]=_0x47c52e['beforeScriptId'];if(_0x47c52e[_0x15a792(0x89)]!=null)_0x440947[_0x15a792(0x89)]=_0x47c52e[_0x15a792(0x89)];if(Array[_0x15a792(0xb9)](_0x47c52e[_0x15a792(0x8d)]))_0x440947[_0x15a792(0x8d)]=_0x47c52e['requestFields'];if(Array[_0x15a792(0xb9)](_0x47c52e[_0x15a792(0xac)]))_0x440947['responseFields']=_0x47c52e[_0x15a792(0xac)];return _0x440947;}function a81_0x19f0(){const _0x414dc5=['Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','relations','relatedPageInfoList','options','doType','dataset','name','creatorIdField','12CFVhZk','231440TvOvla','responseBody','deprecated','read','fromField','allFields','toField','dblinkInfoDTO','189872jXzIKr','dbName','logicField','properties','modifierIdField','requestBody','path','fields','responseFields','dbId','description','detail','906rVBzAf','toDatasetName','columnCodeListWithDeleted','sourceType','modelId','modelCode','pkField','bizRelationType','main_sub','isArray','15715NNZhSZ','creatorNameField','allFieldNames','toFieldLabel','deleted','alias','entries','toDatasetCode','method','title','host','type','string','2240308kwvLsL','labelField','validateRules','source','map','160WEmAnS','datasetKey','parse','doVersion','cardinality','relationId','tableComment','dbtableConfig','filter','beforeScriptId','83529oCYXBI','object','createTimeField','required','411828FutUhO','length','indexes','displayName','formatRules','afterScriptId','split','str','operations','requestFields','654300XHgqSy','tableName','updateTimeField','extend','code'];a81_0x19f0=function(){return _0x414dc5;};return a81_0x19f0();}function summarizeDbtable(_0x30340e){const _0x5ea442=a81_0x38b8,_0x3995da={},_0x1bd211=[_0x5ea442(0xad),_0x5ea442(0xa5),_0x5ea442(0x8f),_0x5ea442(0xcd),'pkField',_0x5ea442(0xa1),_0x5ea442(0xa6),_0x5ea442(0x82),_0x5ea442(0x90),_0x5ea442(0x9a),_0x5ea442(0xbb),_0x5ea442(0xa8),'modifierNameField',_0x5ea442(0xc8),_0x5ea442(0xa3)];for(const _0x5c8659 of _0x1bd211){if(_0x30340e[_0x5c8659]!==undefined)_0x3995da[_0x5c8659]=_0x30340e[_0x5c8659];}return typeof _0x3995da['allFields']===_0x5ea442(0xc6)&&_0x3995da[_0x5ea442(0xa1)][_0x5ea442(0x85)]>0x0&&(_0x3995da[_0x5ea442(0xbc)]=_0x3995da[_0x5ea442(0xa1)][_0x5ea442(0x8a)](',')[_0x5ea442(0xcb)](_0x71e62b=>_0x71e62b['trim']())[_0x5ea442(0x7e)](Boolean)),_0x3995da;}function normalizeRelatedPages(_0x5632d3){const _0x237187=a81_0x38b8;if(!Array[_0x237187(0xb9)](_0x5632d3))return[];return _0x5632d3['filter'](_0x562c9a=>_0x562c9a&&typeof _0x562c9a===_0x237187(0x81))['map'](_0x489a55=>({'id':_0x489a55['id'],'type':_0x489a55[_0x237187(0xc5)],'code':_0x489a55[_0x237187(0x92)],'title':_0x489a55[_0x237187(0xc3)],'deleted':_0x489a55[_0x237187(0xbe)]===!![]}));}function a81_0x38b8(_0x202d05,_0x4815a5){_0x202d05=_0x202d05-0x79;const _0x19f0a6=a81_0x19f0();let _0x38b82c=_0x19f0a6[_0x202d05];return _0x38b82c;}export const datasetDetail={'service':a81_0xfa4f42(0x98),'command':a81_0xfa4f42(0xaf),'description':a81_0xfa4f42(0x93),'risk':a81_0xfa4f42(0x9f),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a81_0xfa4f42(0xbf),'type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x3101b5){const _0x476c75=a81_0xfa4f42,_0x2ff1e6=await getDatasetDetail(_0x3101b5[_0x476c75(0x8b)](_0x476c75(0x92))),_0x2147ff=Array['isArray'](_0x2ff1e6[_0x476c75(0xab)])?_0x2ff1e6[_0x476c75(0xab)]:Array[_0x476c75(0xb9)](_0x2ff1e6['properties'])?_0x2ff1e6[_0x476c75(0xa7)]:[],_0x15a047=_0x2147ff['map'](_0x54b323=>normalizeField(_0x54b323))[_0x476c75(0x7e)](_0x7ea285=>_0x7ea285!==null),_0x30e6ea=_0x2ff1e6[_0x476c75(0x8c)]??{},_0x12eeb4=[];for(const [_0x20e70e,_0x4f40ea]of Object[_0x476c75(0xc0)](_0x30e6ea)){const _0x45cf22=normalizeOperationEntry(_0x20e70e,_0x4f40ea);if(_0x45cf22)_0x12eeb4['push'](_0x45cf22);}const _0x2d5d6c=_0x2ff1e6[_0x476c75(0x7d)]??{},_0x251ab=_0x2ff1e6['dataset']??{},_0x37f518=_0x2d5d6c[_0x476c75(0xad)]!=null?{'id':_0x2d5d6c[_0x476c75(0xad)],'name':_0x2d5d6c[_0x476c75(0xa5)]??null}:undefined;let _0x49645d;return typeof _0x2ff1e6[_0x476c75(0x91)]===_0x476c75(0xc6)&&(_0x49645d=parseJsonMaybe(_0x2ff1e6[_0x476c75(0x91)])),{'ok':!![],'data':{'id':_0x2ff1e6[_0x476c75(0xb4)]??_0x2ff1e6['id'],'name':_0x2ff1e6[_0x476c75(0x99)],'code':_0x2ff1e6[_0x476c75(0xb5)]||_0x2ff1e6[_0x476c75(0x92)],'doVersion':_0x2ff1e6[_0x476c75(0x79)],'description':_0x2ff1e6[_0x476c75(0xae)]||_0x251ab[_0x476c75(0x7c)]||undefined,'source':_0x2ff1e6[_0x476c75(0xca)]||_0x251ab[_0x476c75(0xb3)],'table':_0x2d5d6c[_0x476c75(0x8f)]||_0x251ab[_0x476c75(0x8f)],'datasetKey':_0x2d5d6c[_0x476c75(0xcd)],'pk':_0x2d5d6c[_0x476c75(0xb6)],'db':_0x37f518,'dbtable':summarizeDbtable(_0x2d5d6c),'fields':_0x15a047,'operations':_0x12eeb4,'indexes':Array['isArray'](_0x251ab[_0x476c75(0x86)])?_0x251ab['indexes']:[],'relations':Array['isArray'](_0x2ff1e6[_0x476c75(0x94)])?_0x2ff1e6[_0x476c75(0x94)][_0x476c75(0xcb)](_0x4eae5d=>({..._0x4eae5d['relationId']!=null?{'relationId':_0x4eae5d[_0x476c75(0x7b)]}:{},'fromDataset':_0x2ff1e6[_0x476c75(0x99)],'fromCode':_0x2ff1e6[_0x476c75(0xb5)]||_0x2ff1e6[_0x476c75(0x92)],'fromTable':_0x2d5d6c[_0x476c75(0x8f)]||_0x251ab[_0x476c75(0x8f)],'fromField':_0x4eae5d[_0x476c75(0xa0)],'toDataset':_0x4eae5d[_0x476c75(0xb1)],'toCode':_0x4eae5d[_0x476c75(0xc1)],'toTable':_0x4eae5d['toTableName'],'toField':_0x4eae5d[_0x476c75(0xa2)],'labelField':_0x4eae5d[_0x476c75(0xbd)]||undefined,'cardinality':_0x4eae5d[_0x476c75(0x7a)]||undefined,'bizRelationType':_0x4eae5d[_0x476c75(0xb7)]===_0x476c75(0xb8)?_0x476c75(0xb8):null})):[],'relatedPages':normalizeRelatedPages(_0x2ff1e6[_0x476c75(0x95)]),...Array['isArray'](_0x2ff1e6[_0x476c75(0xb2)])?{'columnCodeListWithDeleted':_0x2ff1e6[_0x476c75(0xb2)]}:{},'formatRules':Array[_0x476c75(0xb9)](_0x2ff1e6[_0x476c75(0x88)])?_0x2ff1e6[_0x476c75(0x88)]:[],'validateRules':Array['isArray'](_0x2ff1e6[_0x476c75(0xc9)])?_0x2ff1e6['validateRules']:[],..._0x49645d!==undefined?{'extend':_0x49645d}:{},'stats':{'fieldCount':_0x15a047[_0x476c75(0x85)],'operationCount':_0x12eeb4['length']}}};}};
1
+ function a81_0x1985(){const _0x20c74a=['fields','code','120681ciWQiL','4450VqPFDv','parse','host','creatorIdField','relatedPageInfoList','tableName','cardinality','columnCodeListWithDeleted','required','relations','beforeScriptId','responseBody','isArray','allFields','name','pkField','formatRules','alias','10098750hVrpeO','filter','toDatasetCode','main_sub','modifierNameField','5njnYIj','dblinkInfoDTO','1901384LSdHmx','map','1481923WsNwHQ','object','49UeLkHv','82778NcWusQ','operations','toFieldLabel','validateRules','extend','responseFields','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','dataset','properties','toDatasetName','modelId','modifierIdField','deprecated','createTimeField','displayName','entries','indexes','1166972uEtHZy','read','dbId','description','deleted','2499264IrtJqr','type','string','title','requestBody','afterScriptId','dbtableConfig','trim','options','modelCode','datasetKey','bizRelationType','source','tableComment','dbType','relationId','creatorNameField','114XeVKra','updateTimeField','dataType','requestFields','path','length','labelField','dbName','detail','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','fromField'];a81_0x1985=function(){return _0x20c74a;};return a81_0x1985();}const a81_0x19b748=a81_0x50c8;(function(_0x39e7fd,_0x65ca1a){const _0x2871de=a81_0x50c8,_0x5e1d1f=_0x39e7fd();while(!![]){try{const _0x39649f=parseInt(_0x2871de(0x209))/0x1+-parseInt(_0x2871de(0x20c))/0x2*(parseInt(_0x2871de(0x1e0))/0x3)+-parseInt(_0x2871de(0x1ca))/0x4*(parseInt(_0x2871de(0x205))/0x5)+-parseInt(_0x2871de(0x200))/0x6+parseInt(_0x2871de(0x20b))/0x7*(-parseInt(_0x2871de(0x207))/0x8)+-parseInt(_0x2871de(0x1cf))/0x9+-parseInt(_0x2871de(0x1ee))/0xa*(-parseInt(_0x2871de(0x1ed))/0xb);if(_0x39649f===_0x65ca1a)break;else _0x5e1d1f['push'](_0x5e1d1f['shift']());}catch(_0x592db6){_0x5e1d1f['push'](_0x5e1d1f['shift']());}}}(a81_0x1985,0xd59d1));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x1dab09){const _0x44ac63=a81_0x50c8;if(_0x1dab09[_0x44ac63(0x1ce)])return null;const _0x389870=Boolean(_0x1dab09[_0x44ac63(0x1c7)]!==undefined||_0x1dab09['doType']!==undefined);let _0x40b85e={};if(!_0x389870&&typeof _0x1dab09['extend']===_0x44ac63(0x1d1))try{_0x40b85e=JSON[_0x44ac63(0x1ef)](_0x1dab09[_0x44ac63(0x210)]);}catch{}const _0x3bfab4=_0x389870?_0x1dab09[_0x44ac63(0x1fc)]:_0x1dab09[_0x44ac63(0x1ec)],_0x67bcea=_0x389870?_0x1dab09[_0x44ac63(0x1c7)]:_0x1dab09[_0x44ac63(0x1fc)],_0x334f54=_0x389870?_0x1dab09['doType']:_0x1dab09[_0x44ac63(0x1d0)]||_0x1dab09[_0x44ac63(0x1e2)],_0x1a66b1=_0x389870?_0x1dab09[_0x44ac63(0x1fd)]===!![]:_0x40b85e['pkField']===!![],_0x465552=_0x389870?_0x1dab09[_0x44ac63(0x1f6)]===!![]:_0x40b85e[_0x44ac63(0x1f6)]===!![],_0x686150=_0x389870?_0x1dab09[_0x44ac63(0x1d7)]??null:_0x40b85e[_0x44ac63(0x1d7)]??null,_0x56943c={'name':_0x3bfab4,'displayName':_0x67bcea||_0x3bfab4,'type':_0x334f54,'dbType':_0x1dab09[_0x44ac63(0x1dd)],'pk':_0x1a66b1,'required':_0x465552,'deprecated':_0x1dab09[_0x44ac63(0x1c5)]===!![],'description':_0x1dab09[_0x44ac63(0x1cd)]||undefined};return Array[_0x44ac63(0x1fa)](_0x686150)&&_0x686150[_0x44ac63(0x1e5)]>0x0&&(_0x56943c['options']=_0x686150),_0x56943c;}function parseJsonMaybe(_0x19484e){const _0x2407e8=a81_0x50c8;if(typeof _0x19484e!=='string')return _0x19484e;try{return JSON[_0x2407e8(0x1ef)](_0x19484e);}catch{return _0x19484e;}}function normalizeOperationEntry(_0x285f20,_0x41bd3d){const _0x5533bf=a81_0x50c8;if(!_0x41bd3d||typeof _0x41bd3d!==_0x5533bf(0x20a))return null;if(!_0x41bd3d['method']||!_0x41bd3d['path'])return null;const _0x123153={'name':_0x285f20,'method':_0x41bd3d['method'],'path':_0x41bd3d[_0x5533bf(0x1e4)]};if(_0x41bd3d[_0x5533bf(0x1f0)])_0x123153[_0x5533bf(0x1f0)]=_0x41bd3d['host'];if(_0x41bd3d[_0x5533bf(0x1d3)]!=null){const _0x593260=parseJsonMaybe(_0x41bd3d[_0x5533bf(0x1d3)]);_0x123153[_0x5533bf(0x1d3)]=_0x593260;}if(_0x41bd3d[_0x5533bf(0x1f9)]!=null){const _0x1b9faf=parseJsonMaybe(_0x41bd3d[_0x5533bf(0x1f9)]);_0x123153[_0x5533bf(0x1f9)]=_0x1b9faf;}if(_0x41bd3d[_0x5533bf(0x1f8)]!=null)_0x123153['beforeScriptId']=_0x41bd3d[_0x5533bf(0x1f8)];if(_0x41bd3d[_0x5533bf(0x1d4)]!=null)_0x123153['afterScriptId']=_0x41bd3d['afterScriptId'];if(Array[_0x5533bf(0x1fa)](_0x41bd3d['requestFields']))_0x123153[_0x5533bf(0x1e3)]=_0x41bd3d[_0x5533bf(0x1e3)];if(Array[_0x5533bf(0x1fa)](_0x41bd3d[_0x5533bf(0x211)]))_0x123153['responseFields']=_0x41bd3d[_0x5533bf(0x211)];return _0x123153;}function a81_0x50c8(_0x3aa29d,_0x2b8bb3){_0x3aa29d=_0x3aa29d-0x1c4;const _0x1985c2=a81_0x1985();let _0x50c868=_0x1985c2[_0x3aa29d];return _0x50c868;}function summarizeDbtable(_0x570515){const _0x30907e=a81_0x50c8,_0x533218={},_0x26bb43=[_0x30907e(0x1cc),_0x30907e(0x1e7),_0x30907e(0x1f3),_0x30907e(0x1d9),_0x30907e(0x1fd),_0x30907e(0x1fb),'logicField',_0x30907e(0x1c6),_0x30907e(0x1e1),_0x30907e(0x1f1),_0x30907e(0x1df),_0x30907e(0x1c4),_0x30907e(0x204),_0x30907e(0x1e6),_0x30907e(0x206)];for(const _0x4d7fdf of _0x26bb43){if(_0x570515[_0x4d7fdf]!==undefined)_0x533218[_0x4d7fdf]=_0x570515[_0x4d7fdf];}return typeof _0x533218[_0x30907e(0x1fb)]==='string'&&_0x533218[_0x30907e(0x1fb)][_0x30907e(0x1e5)]>0x0&&(_0x533218['allFieldNames']=_0x533218[_0x30907e(0x1fb)]['split'](',')[_0x30907e(0x208)](_0xfd9c40=>_0xfd9c40[_0x30907e(0x1d6)]())[_0x30907e(0x201)](Boolean)),_0x533218;}function normalizeRelatedPages(_0xfcaad){const _0x31a3f1=a81_0x50c8;if(!Array[_0x31a3f1(0x1fa)](_0xfcaad))return[];return _0xfcaad[_0x31a3f1(0x201)](_0x4d0f66=>_0x4d0f66&&typeof _0x4d0f66===_0x31a3f1(0x20a))[_0x31a3f1(0x208)](_0x3e5e29=>({'id':_0x3e5e29['id'],'type':_0x3e5e29[_0x31a3f1(0x1d0)],'code':_0x3e5e29[_0x31a3f1(0x1ec)],'title':_0x3e5e29[_0x31a3f1(0x1d2)],'deleted':_0x3e5e29[_0x31a3f1(0x1ce)]===!![]}));}export const datasetDetail={'service':a81_0x19b748(0x213),'command':a81_0x19b748(0x1e8),'description':a81_0x19b748(0x1e9),'risk':a81_0x19b748(0x1cb),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a81_0x19b748(0x1ff),'type':'string','description':a81_0x19b748(0x212)}],async 'execute'(_0x1ccb40){const _0x38470a=a81_0x19b748,_0x424eb2=await getDatasetDetail(_0x1ccb40['str']('code')),_0x353c9b=Array['isArray'](_0x424eb2['fields'])?_0x424eb2[_0x38470a(0x1eb)]:Array[_0x38470a(0x1fa)](_0x424eb2[_0x38470a(0x214)])?_0x424eb2[_0x38470a(0x214)]:[],_0x4bb9a3=_0x353c9b[_0x38470a(0x208)](_0x42bcb4=>normalizeField(_0x42bcb4))[_0x38470a(0x201)](_0x177151=>_0x177151!==null),_0x54cf0d=_0x424eb2[_0x38470a(0x20d)]??{},_0x7bb1c5=[];for(const [_0xdcd705,_0x56a997]of Object[_0x38470a(0x1c8)](_0x54cf0d)){const _0x330c29=normalizeOperationEntry(_0xdcd705,_0x56a997);if(_0x330c29)_0x7bb1c5['push'](_0x330c29);}const _0x57f827=_0x424eb2[_0x38470a(0x1d5)]??{},_0x2f1d66=_0x424eb2[_0x38470a(0x213)]??{},_0x25012c=_0x57f827[_0x38470a(0x1cc)]!=null?{'id':_0x57f827[_0x38470a(0x1cc)],'name':_0x57f827[_0x38470a(0x1e7)]??null}:undefined;let _0xc9bbfb;return typeof _0x424eb2[_0x38470a(0x210)]==='string'&&(_0xc9bbfb=parseJsonMaybe(_0x424eb2[_0x38470a(0x210)])),{'ok':!![],'data':{'id':_0x424eb2[_0x38470a(0x216)]??_0x424eb2['id'],'name':_0x424eb2[_0x38470a(0x1fc)],'code':_0x424eb2[_0x38470a(0x1d8)]||_0x424eb2[_0x38470a(0x1ec)],'doVersion':_0x424eb2['doVersion'],'description':_0x424eb2[_0x38470a(0x1cd)]||_0x2f1d66[_0x38470a(0x1dc)]||undefined,'source':_0x424eb2[_0x38470a(0x1db)]||_0x2f1d66['sourceType'],'table':_0x57f827[_0x38470a(0x1f3)]||_0x2f1d66[_0x38470a(0x1f3)],'datasetKey':_0x57f827[_0x38470a(0x1d9)],'pk':_0x57f827['pkField'],'db':_0x25012c,'dbtable':summarizeDbtable(_0x57f827),'fields':_0x4bb9a3,'operations':_0x7bb1c5,'indexes':Array[_0x38470a(0x1fa)](_0x2f1d66['indexes'])?_0x2f1d66[_0x38470a(0x1c9)]:[],'relations':Array[_0x38470a(0x1fa)](_0x424eb2[_0x38470a(0x1f7)])?_0x424eb2[_0x38470a(0x1f7)][_0x38470a(0x208)](_0x580d36=>({..._0x580d36[_0x38470a(0x1de)]!=null?{'relationId':_0x580d36[_0x38470a(0x1de)]}:{},'fromDataset':_0x424eb2[_0x38470a(0x1fc)],'fromCode':_0x424eb2[_0x38470a(0x1d8)]||_0x424eb2['code'],'fromTable':_0x57f827[_0x38470a(0x1f3)]||_0x2f1d66[_0x38470a(0x1f3)],'fromField':_0x580d36[_0x38470a(0x1ea)],'toDataset':_0x580d36[_0x38470a(0x215)],'toCode':_0x580d36[_0x38470a(0x202)],'toTable':_0x580d36['toTableName'],'toField':_0x580d36['toField'],'labelField':_0x580d36[_0x38470a(0x20e)]||undefined,'cardinality':_0x580d36[_0x38470a(0x1f4)]||undefined,'bizRelationType':_0x580d36[_0x38470a(0x1da)]==='main_sub'?_0x38470a(0x203):null})):[],'relatedPages':normalizeRelatedPages(_0x424eb2[_0x38470a(0x1f2)]),...Array[_0x38470a(0x1fa)](_0x424eb2[_0x38470a(0x1f5)])?{'columnCodeListWithDeleted':_0x424eb2['columnCodeListWithDeleted']}:{},'formatRules':Array['isArray'](_0x424eb2[_0x38470a(0x1fe)])?_0x424eb2['formatRules']:[],'validateRules':Array[_0x38470a(0x1fa)](_0x424eb2[_0x38470a(0x20f)])?_0x424eb2[_0x38470a(0x20f)]:[],..._0xc9bbfb!==undefined?{'extend':_0xc9bbfb}:{},'stats':{'fieldCount':_0x4bb9a3[_0x38470a(0x1e5)],'operationCount':_0x7bb1c5[_0x38470a(0x1e5)]}}};}};
@@ -1 +1 @@
1
- const a82_0x6239dd=a82_0x3266;(function(_0x64c9f,_0x56e462){const _0x4c6312=a82_0x3266,_0x68ed9d=_0x64c9f();while(!![]){try{const _0x404a5c=parseInt(_0x4c6312(0xad))/0x1*(parseInt(_0x4c6312(0xa5))/0x2)+-parseInt(_0x4c6312(0xb3))/0x3+parseInt(_0x4c6312(0x9a))/0x4+parseInt(_0x4c6312(0xa1))/0x5+parseInt(_0x4c6312(0x82))/0x6*(-parseInt(_0x4c6312(0x79))/0x7)+parseInt(_0x4c6312(0x81))/0x8+-parseInt(_0x4c6312(0x76))/0x9;if(_0x404a5c===_0x56e462)break;else _0x68ed9d['push'](_0x68ed9d['shift']());}catch(_0x4fa12a){_0x68ed9d['push'](_0x68ed9d['shift']());}}}(a82_0x55bc,0x9ca22));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a82_0x6239dd(0x87),{'message':a82_0x6239dd(0xb0),'hint':a82_0x6239dd(0xaa)}]]);export function parseJsonObjectFlag(_0x2878d5,_0x503784){const _0x771188=a82_0x6239dd;if(!_0x2878d5)return undefined;let _0xd9991a;try{_0xd9991a=JSON[_0x771188(0x92)](_0x2878d5);}catch(_0x271652){const _0x738ef3=_0x271652 instanceof Error?_0x271652['message']:String(_0x271652);throw CliErrors[_0x771188(0x9d)](_0x503784+_0x771188(0xb2)+_0x738ef3);}if(!isPlainObject(_0xd9991a)||Array[_0x771188(0x94)](_0xd9991a))throw CliErrors[_0x771188(0x9d)](_0x503784+_0x771188(0x7a));return _0xd9991a;}export function validateExtendPatchKeys(_0x2d4f67){const _0x5a5a79=a82_0x6239dd,_0x5e75bf=Object['keys'](_0x2d4f67);if(_0x5e75bf[_0x5a5a79(0xae)]===0x0)throw CliErrors['validation'](_0x5a5a79(0xa3));for(const _0x78ad30 of _0x5e75bf){const _0x5a88b4=EXTEND_PATCH_REDIRECTS[_0x5a5a79(0x98)](_0x78ad30);if(_0x5a88b4)throw CliErrors['validation'](_0x5a88b4[_0x5a5a79(0xa2)],_0x5a88b4[_0x5a5a79(0xa0)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x78ad30))throw CliErrors[_0x5a5a79(0x9d)](_0x5a5a79(0x93)+_0x78ad30,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x2de821=a82_0x6239dd,_0x57ed44=Array[_0x2de821(0x9e)](MUTABLE_EXTEND_KEYS)[_0x2de821(0xa7)]();return _0x57ed44[_0x2de821(0xae)]>0x0?'Allowed\x20keys:\x20'+_0x57ed44['join'](',\x20'):_0x2de821(0x75);}export function applyExtendPatch(_0xed7de4,_0x108626){const _0x235eab=a82_0x6239dd;validateExtendPatchKeys(_0x108626);const _0x4dc6f4=deepClone(_0xed7de4),_0x47629a=[];for(const [_0x4e288a,_0xde76cc]of Object[_0x235eab(0x88)](_0x108626)){const _0x359f67=_0x4dc6f4[_0x4e288a],_0x161627=deepClone(_0xde76cc);!deepEqual(_0x359f67,_0x161627)&&(_0x4dc6f4[_0x4e288a]=_0x161627,_0x47629a[_0x235eab(0xb1)](_0x235eab(0x8b)+_0x4e288a));}return _0x47629a['sort'](),{'after':_0x4dc6f4,'changedPaths':_0x47629a,'changed':_0x47629a[_0x235eab(0xae)]>0x0};}export function assertExpectation(_0x5f42df,_0x46e34f){const _0x2a9f23=a82_0x6239dd;if(!_0x46e34f)return;for(const [_0x523893,_0xed0991]of Object[_0x2a9f23(0x88)](_0x46e34f)){const _0x445a37=_0x5f42df[_0x523893];if(!deepEqual(_0x445a37,_0xed0991))throw CliErrors[_0x2a9f23(0x9d)](_0x2a9f23(0x83)+_0x523893,_0x2a9f23(0x80)+JSON[_0x2a9f23(0x9f)](_0xed0991)+_0x2a9f23(0x99)+JSON['stringify'](_0x445a37));}}export async function buildDatasetExtendUpdateResult({appCode:_0x1a796b,input:_0x3fe82d,dryRun:_0x2ba0b5}){const _0x5b6e79=a82_0x6239dd;validateInput(_0x3fe82d);const _0x5a2681=await getDatasetDetail(_0x3fe82d['code']),_0x36cb30=parseDatasetExtend(_0x5a2681[_0x5b6e79(0xa6)]),_0x103d6b=deepClone(_0x36cb30[_0x5b6e79(0x90)]);assertExpectation(_0x103d6b,_0x3fe82d[_0x5b6e79(0x74)]);const {after:_0x16a14d,changedPaths:_0x11fe65,changed:_0x5db61b}=applyExtendPatch(_0x103d6b,_0x3fe82d[_0x5b6e79(0xa4)]),_0x2bf123=summarizeDataset(_0x5a2681,_0x3fe82d[_0x5b6e79(0x9c)]);return _0x5db61b&&!_0x2ba0b5&&(_0x5a2681[_0x5b6e79(0xa6)]=serializeDatasetExtend(_0x16a14d,_0x36cb30['shape']),await updateDrivenData(_0x5a2681)),{'ok':!![],'data':{'appCode':_0x1a796b,'selector':{'code':_0x3fe82d[_0x5b6e79(0x9c)]},'dataset':_0x2bf123,'dryRun':_0x2ba0b5,'changed':_0x5db61b,'changedPaths':_0x11fe65,'before':{'extend':_0x103d6b},'after':{'extend':_0x16a14d},'submitted':_0x5db61b&&!_0x2ba0b5},'message':_0x5db61b?_0x2ba0b5?_0x5b6e79(0x8d)+_0x11fe65[_0x5b6e79(0xaf)](',\x20')+')':_0x5b6e79(0x8e)+_0x11fe65['join'](',\x20')+')':_0x5b6e79(0x8c)};}export const datasetExtendUpdate={'service':a82_0x6239dd(0x95),'command':a82_0x6239dd(0x91),'description':a82_0x6239dd(0xa9),'risk':a82_0x6239dd(0x8f),'flags':[CODE_FLAG,{'name':a82_0x6239dd(0x86),'type':a82_0x6239dd(0x7c),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a82_0x6239dd(0xab),'type':'string','required':![],'description':a82_0x6239dd(0x97)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29ca68){validateInput(readExtendUpdateInput(_0x29ca68));},async 'dryRun'(_0x4b6dc1){const _0x105711=a82_0x6239dd,_0x21d827=await buildDatasetExtendUpdateResult({'appCode':_0x4b6dc1[_0x105711(0x7f)],'input':readExtendUpdateInput(_0x4b6dc1),'dryRun':!![]});return{'method':'POST','url':'/smartapi/dataset/update-driven-data','body':_0x21d827['data'],'description':_0x21d827[_0x105711(0xa2)]};},async 'execute'(_0x95f020){const _0x19077d=a82_0x6239dd;return buildDatasetExtendUpdateResult({'appCode':_0x95f020[_0x19077d(0x7f)],'input':readExtendUpdateInput(_0x95f020),'dryRun':![]});}};function a82_0x55bc(){const _0x5bf53c=['Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','Updated\x20dataset\x20extend\x20(','write','value','extend-update','parse','Unsupported\x20patch\x20key:\x20','isArray','dataset','str','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','get',',\x20actual\x20','581756kHlwoH','tableName','code','validation','from','stringify','hint','3452480XeYCYI','message','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','patch','262538NoPBzn','extend','sort','dbtableConfig','Patch\x20dataset\x20top-level\x20extend\x20safely','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','expect-json','object','7nNEJGs','length','join','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','push','\x20must\x20be\x20valid\x20JSON\x20object:\x20','3177024UsECKo','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','expect','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','1409139ztsVWc','--patch-json','dbId','909503ccfrYx','\x20must\x20be\x20a\x20JSON\x20object','datasetId','string','datasetName','modelId','appCode','Expected\x20','8094672VihpSb','42IdQMPv','Expectation\x20mismatch\x20at\x20extend.','trim','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','patch-json','businessGroup','entries','dbName','--code\x20is\x20required','extend.','No\x20changes\x20for\x20dataset\x20extend'];a82_0x55bc=function(){return _0x5bf53c;};return a82_0x55bc();}function readExtendUpdateInput(_0x58d245){const _0x3d8bd0=a82_0x6239dd,_0x14c64c=trim(_0x58d245[_0x3d8bd0(0x96)](_0x3d8bd0(0x9c))),_0x40e558=parseJsonObjectFlag(_0x58d245[_0x3d8bd0(0x96)](_0x3d8bd0(0x86)),_0x3d8bd0(0x77)),_0x4b9923=parseJsonObjectFlag(_0x58d245[_0x3d8bd0(0x96)]('expect-json'),'--expect-json');return{'code':_0x14c64c,'patch':_0x40e558||{},'expect':_0x4b9923};}function validateInput(_0x132e34){const _0x5b0351=a82_0x6239dd;if(!_0x132e34['code'])throw CliErrors[_0x5b0351(0x9d)](_0x5b0351(0x8a));validateExtendPatchKeys(_0x132e34[_0x5b0351(0xa4)]);}function a82_0x3266(_0x52da80,_0x200394){_0x52da80=_0x52da80-0x74;const _0x55bcea=a82_0x55bc();let _0x326625=_0x55bcea[_0x52da80];return _0x326625;}function parseDatasetExtend(_0x10a8ba){const _0x39182f=a82_0x6239dd;if(typeof _0x10a8ba===_0x39182f(0x7c)){const _0x2ac0e9=_0x10a8ba[_0x39182f(0x84)]();if(!_0x2ac0e9)return{'value':{},'shape':_0x39182f(0x7c)};let _0x20cf8b;try{_0x20cf8b=JSON[_0x39182f(0x92)](_0x2ac0e9);}catch(_0x2cea04){const _0x30f156=_0x2cea04 instanceof Error?_0x2cea04[_0x39182f(0xa2)]:String(_0x2cea04);throw CliErrors['validation'](_0x39182f(0xb4)+_0x30f156);}if(!isPlainObject(_0x20cf8b)||Array['isArray'](_0x20cf8b))throw CliErrors[_0x39182f(0x9d)](_0x39182f(0x85));return{'value':_0x20cf8b,'shape':_0x39182f(0x7c)};}if(_0x10a8ba===undefined||_0x10a8ba===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x10a8ba)||Array[_0x39182f(0x94)](_0x10a8ba))throw CliErrors[_0x39182f(0x9d)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x10a8ba,'shape':'object'};}function serializeDatasetExtend(_0x5e12b8,_0x29daa3){const _0x184650=a82_0x6239dd;return _0x29daa3===_0x184650(0x7c)?JSON[_0x184650(0x9f)](_0x5e12b8):_0x5e12b8;}function summarizeDataset(_0x34442b,_0x5da79c){const _0x328f94=a82_0x6239dd,_0x2787a6=isPlainObject(_0x34442b['dataset'])?_0x34442b[_0x328f94(0x95)]:{},_0x5b736b=isPlainObject(_0x34442b['dbtableConfig'])?_0x34442b[_0x328f94(0xa8)]:{};return{'id':_0x34442b[_0x328f94(0x7e)]??_0x34442b['id']??_0x2787a6[_0x328f94(0x7b)]??null,'code':_0x34442b['modelCode']??_0x34442b[_0x328f94(0x9c)]??_0x2787a6['datasetCode']??_0x5da79c,'name':_0x34442b['name']??_0x2787a6[_0x328f94(0x7d)]??null,'table':_0x5b736b['tableName']??_0x2787a6[_0x328f94(0x9b)]??null,'db':_0x5b736b[_0x328f94(0x89)]??_0x5b736b[_0x328f94(0x78)]??null};}function deepClone(_0x5ceac2){const _0x1ac5d0=a82_0x6239dd;if(_0x5ceac2===undefined)return _0x5ceac2;return JSON['parse'](JSON[_0x1ac5d0(0x9f)](_0x5ceac2));}function deepEqual(_0x370353,_0x7a6f2b){const _0x258d3c=a82_0x6239dd;return JSON[_0x258d3c(0x9f)](_0x370353)===JSON[_0x258d3c(0x9f)](_0x7a6f2b);}function isPlainObject(_0x371ba5){const _0x1bef63=a82_0x6239dd;return Boolean(_0x371ba5)&&typeof _0x371ba5===_0x1bef63(0xac)&&!Array[_0x1bef63(0x94)](_0x371ba5);}function trim(_0x4c5877){const _0x31d354=a82_0x6239dd,_0x2259f0=String(_0x4c5877||'')[_0x31d354(0x84)]();return _0x2259f0;}
1
+ const a82_0x411b07=a82_0x408e;(function(_0x1063fe,_0xa01359){const _0x4802c4=a82_0x408e,_0x1f380b=_0x1063fe();while(!![]){try{const _0x57165c=-parseInt(_0x4802c4(0x1bc))/0x1+parseInt(_0x4802c4(0x1db))/0x2+parseInt(_0x4802c4(0x1a3))/0x3+parseInt(_0x4802c4(0x1bf))/0x4+parseInt(_0x4802c4(0x1ad))/0x5+-parseInt(_0x4802c4(0x1c6))/0x6*(-parseInt(_0x4802c4(0x1a8))/0x7)+parseInt(_0x4802c4(0x1c1))/0x8*(-parseInt(_0x4802c4(0x1b1))/0x9);if(_0x57165c===_0xa01359)break;else _0x1f380b['push'](_0x1f380b['shift']());}catch(_0x18eefe){_0x1f380b['push'](_0x1f380b['shift']());}}}(a82_0x37f8,0x25462));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([['businessGroup',{'message':a82_0x411b07(0x1c3),'hint':a82_0x411b07(0x1ba)}]]);export function parseJsonObjectFlag(_0x4c3245,_0x48fa50){const _0x333027=a82_0x411b07;if(!_0x4c3245)return undefined;let _0x44900b;try{_0x44900b=JSON[_0x333027(0x1c5)](_0x4c3245);}catch(_0x295a56){const _0x5c8388=_0x295a56 instanceof Error?_0x295a56['message']:String(_0x295a56);throw CliErrors[_0x333027(0x1e0)](_0x48fa50+_0x333027(0x1c4)+_0x5c8388);}if(!isPlainObject(_0x44900b)||Array[_0x333027(0x1d3)](_0x44900b))throw CliErrors[_0x333027(0x1e0)](_0x48fa50+_0x333027(0x1b9));return _0x44900b;}export function validateExtendPatchKeys(_0x3ad64d){const _0x2d166c=a82_0x411b07,_0x9001cd=Object[_0x2d166c(0x1e4)](_0x3ad64d);if(_0x9001cd['length']===0x0)throw CliErrors[_0x2d166c(0x1e0)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x261308 of _0x9001cd){const _0x21ee05=EXTEND_PATCH_REDIRECTS['get'](_0x261308);if(_0x21ee05)throw CliErrors[_0x2d166c(0x1e0)](_0x21ee05[_0x2d166c(0x1ab)],_0x21ee05[_0x2d166c(0x1ac)]);if(!MUTABLE_EXTEND_KEYS[_0x2d166c(0x1de)](_0x261308))throw CliErrors[_0x2d166c(0x1e0)](_0x2d166c(0x1a1)+_0x261308,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x3230d7=a82_0x411b07,_0x39748e=Array[_0x3230d7(0x1cc)](MUTABLE_EXTEND_KEYS)[_0x3230d7(0x1e1)]();return _0x39748e['length']>0x0?_0x3230d7(0x1b3)+_0x39748e[_0x3230d7(0x1a4)](',\x20'):_0x3230d7(0x1c9);}export function applyExtendPatch(_0x5f5a6f,_0x381ab3){const _0x3f4999=a82_0x411b07;validateExtendPatchKeys(_0x381ab3);const _0x1fbcf9=deepClone(_0x5f5a6f),_0xb55483=[];for(const [_0x4f3f8e,_0x3dcce2]of Object[_0x3f4999(0x1da)](_0x381ab3)){const _0x479da2=_0x1fbcf9[_0x4f3f8e],_0x14fe2d=deepClone(_0x3dcce2);!deepEqual(_0x479da2,_0x14fe2d)&&(_0x1fbcf9[_0x4f3f8e]=_0x14fe2d,_0xb55483[_0x3f4999(0x1d8)](_0x3f4999(0x1d6)+_0x4f3f8e));}return _0xb55483[_0x3f4999(0x1e1)](),{'after':_0x1fbcf9,'changedPaths':_0xb55483,'changed':_0xb55483[_0x3f4999(0x1cd)]>0x0};}function a82_0x37f8(){const _0x37280d=['--patch-json','extend.','patch-json','push','string','entries','572016QAXvZv','expect','str','has','expect-json','validation','sort','modelId','name','keys','Unsupported\x20patch\x20key:\x20','modelCode','456732qNVQex','join','--code\x20is\x20required','code','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','865333EeWJjJ','dbName','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','message','hint','1334965suvinq','extend','/smartapi/dataset/update-driven-data','tableName','207261zRLWsW','patch','Allowed\x20keys:\x20','--expect-json','object','Expected\x20','write','Updated\x20dataset\x20extend\x20(','\x20must\x20be\x20a\x20JSON\x20object','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','datasetName','304801uHwCsd','value','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','967680bdrVab','dataset','256rzZDvX','No\x20changes\x20for\x20dataset\x20extend','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','\x20must\x20be\x20valid\x20JSON\x20object:\x20','parse','12XPzhvf','appCode','datasetId','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','stringify',',\x20actual\x20','from','length','shape','POST','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','trim','datasetCode','isArray','dbtableConfig'];a82_0x37f8=function(){return _0x37280d;};return a82_0x37f8();}function a82_0x408e(_0xdddc60,_0x13b472){_0xdddc60=_0xdddc60-0x1a1;const _0x37f851=a82_0x37f8();let _0x408edf=_0x37f851[_0xdddc60];return _0x408edf;}export function assertExpectation(_0x244109,_0x1f3651){const _0x20a481=a82_0x411b07;if(!_0x1f3651)return;for(const [_0xea0afd,_0x2ddc49]of Object[_0x20a481(0x1da)](_0x1f3651)){const _0x27b804=_0x244109[_0xea0afd];if(!deepEqual(_0x27b804,_0x2ddc49))throw CliErrors[_0x20a481(0x1e0)]('Expectation\x20mismatch\x20at\x20extend.'+_0xea0afd,_0x20a481(0x1b6)+JSON[_0x20a481(0x1ca)](_0x2ddc49)+_0x20a481(0x1cb)+JSON[_0x20a481(0x1ca)](_0x27b804));}}export async function buildDatasetExtendUpdateResult({appCode:_0x409fe3,input:_0x2a2aa9,dryRun:_0x320d61}){const _0x3bd6e4=a82_0x411b07;validateInput(_0x2a2aa9);const _0x36c6d2=await getDatasetDetail(_0x2a2aa9[_0x3bd6e4(0x1a6)]),_0x2a5af7=parseDatasetExtend(_0x36c6d2[_0x3bd6e4(0x1ae)]),_0xaa70f9=deepClone(_0x2a5af7[_0x3bd6e4(0x1bd)]);assertExpectation(_0xaa70f9,_0x2a2aa9[_0x3bd6e4(0x1dc)]);const {after:_0x10fa9c,changedPaths:_0x5debe1,changed:_0x152e1f}=applyExtendPatch(_0xaa70f9,_0x2a2aa9['patch']),_0x356ec9=summarizeDataset(_0x36c6d2,_0x2a2aa9[_0x3bd6e4(0x1a6)]);return _0x152e1f&&!_0x320d61&&(_0x36c6d2[_0x3bd6e4(0x1ae)]=serializeDatasetExtend(_0x10fa9c,_0x2a5af7[_0x3bd6e4(0x1ce)]),await updateDrivenData(_0x36c6d2)),{'ok':!![],'data':{'appCode':_0x409fe3,'selector':{'code':_0x2a2aa9[_0x3bd6e4(0x1a6)]},'dataset':_0x356ec9,'dryRun':_0x320d61,'changed':_0x152e1f,'changedPaths':_0x5debe1,'before':{'extend':_0xaa70f9},'after':{'extend':_0x10fa9c},'submitted':_0x152e1f&&!_0x320d61},'message':_0x152e1f?_0x320d61?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x5debe1[_0x3bd6e4(0x1a4)](',\x20')+')':_0x3bd6e4(0x1b8)+_0x5debe1[_0x3bd6e4(0x1a4)](',\x20')+')':_0x3bd6e4(0x1c2)};}export const datasetExtendUpdate={'service':'dataset','command':'extend-update','description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a82_0x411b07(0x1b7),'flags':[CODE_FLAG,{'name':a82_0x411b07(0x1d7),'type':a82_0x411b07(0x1d9),'required':!![],'description':a82_0x411b07(0x1d0)},{'name':'expect-json','type':a82_0x411b07(0x1d9),'required':![],'description':a82_0x411b07(0x1a7)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x43a1af){validateInput(readExtendUpdateInput(_0x43a1af));},async 'dryRun'(_0x256581){const _0x34117b=a82_0x411b07,_0x4f663b=await buildDatasetExtendUpdateResult({'appCode':_0x256581[_0x34117b(0x1c7)],'input':readExtendUpdateInput(_0x256581),'dryRun':!![]});return{'method':_0x34117b(0x1cf),'url':_0x34117b(0x1af),'body':_0x4f663b['data'],'description':_0x4f663b[_0x34117b(0x1ab)]};},async 'execute'(_0x3c0a11){const _0x4b9afd=a82_0x411b07;return buildDatasetExtendUpdateResult({'appCode':_0x3c0a11[_0x4b9afd(0x1c7)],'input':readExtendUpdateInput(_0x3c0a11),'dryRun':![]});}};function readExtendUpdateInput(_0x53e58e){const _0x27aeb5=a82_0x411b07,_0x39a7ce=trim(_0x53e58e[_0x27aeb5(0x1dd)](_0x27aeb5(0x1a6))),_0x3f7db7=parseJsonObjectFlag(_0x53e58e[_0x27aeb5(0x1dd)]('patch-json'),_0x27aeb5(0x1d5)),_0x27656e=parseJsonObjectFlag(_0x53e58e[_0x27aeb5(0x1dd)](_0x27aeb5(0x1df)),_0x27aeb5(0x1b4));return{'code':_0x39a7ce,'patch':_0x3f7db7||{},'expect':_0x27656e};}function validateInput(_0x24dc82){const _0x5e7e4b=a82_0x411b07;if(!_0x24dc82[_0x5e7e4b(0x1a6)])throw CliErrors[_0x5e7e4b(0x1e0)](_0x5e7e4b(0x1a5));validateExtendPatchKeys(_0x24dc82[_0x5e7e4b(0x1b2)]);}function parseDatasetExtend(_0x490fe5){const _0x26c4c5=a82_0x411b07;if(typeof _0x490fe5===_0x26c4c5(0x1d9)){const _0x44a318=_0x490fe5[_0x26c4c5(0x1d1)]();if(!_0x44a318)return{'value':{},'shape':_0x26c4c5(0x1d9)};let _0x42db11;try{_0x42db11=JSON['parse'](_0x44a318);}catch(_0x109465){const _0x53db49=_0x109465 instanceof Error?_0x109465[_0x26c4c5(0x1ab)]:String(_0x109465);throw CliErrors[_0x26c4c5(0x1e0)](_0x26c4c5(0x1aa)+_0x53db49);}if(!isPlainObject(_0x42db11)||Array[_0x26c4c5(0x1d3)](_0x42db11))throw CliErrors['validation'](_0x26c4c5(0x1be));return{'value':_0x42db11,'shape':_0x26c4c5(0x1d9)};}if(_0x490fe5===undefined||_0x490fe5===null)return{'value':{},'shape':_0x26c4c5(0x1d9)};if(!isPlainObject(_0x490fe5)||Array[_0x26c4c5(0x1d3)](_0x490fe5))throw CliErrors['validation'](_0x26c4c5(0x1be));return{'value':_0x490fe5,'shape':_0x26c4c5(0x1b5)};}function serializeDatasetExtend(_0x3362d4,_0x176899){const _0x159b0e=a82_0x411b07;return _0x176899===_0x159b0e(0x1d9)?JSON['stringify'](_0x3362d4):_0x3362d4;}function summarizeDataset(_0x24a22a,_0x5588a2){const _0x15ab19=a82_0x411b07,_0x18204e=isPlainObject(_0x24a22a[_0x15ab19(0x1c0)])?_0x24a22a[_0x15ab19(0x1c0)]:{},_0x2a39da=isPlainObject(_0x24a22a[_0x15ab19(0x1d4)])?_0x24a22a[_0x15ab19(0x1d4)]:{};return{'id':_0x24a22a[_0x15ab19(0x1e2)]??_0x24a22a['id']??_0x18204e[_0x15ab19(0x1c8)]??null,'code':_0x24a22a[_0x15ab19(0x1a2)]??_0x24a22a[_0x15ab19(0x1a6)]??_0x18204e[_0x15ab19(0x1d2)]??_0x5588a2,'name':_0x24a22a[_0x15ab19(0x1e3)]??_0x18204e[_0x15ab19(0x1bb)]??null,'table':_0x2a39da[_0x15ab19(0x1b0)]??_0x18204e['tableName']??null,'db':_0x2a39da[_0x15ab19(0x1a9)]??_0x2a39da['dbId']??null};}function deepClone(_0x5a13c6){const _0x22f823=a82_0x411b07;if(_0x5a13c6===undefined)return _0x5a13c6;return JSON['parse'](JSON[_0x22f823(0x1ca)](_0x5a13c6));}function deepEqual(_0x2cce0f,_0x1bc9b5){const _0xd10595=a82_0x411b07;return JSON[_0xd10595(0x1ca)](_0x2cce0f)===JSON[_0xd10595(0x1ca)](_0x1bc9b5);}function isPlainObject(_0xb7577){const _0x3f67f4=a82_0x411b07;return Boolean(_0xb7577)&&typeof _0xb7577===_0x3f67f4(0x1b5)&&!Array[_0x3f67f4(0x1d3)](_0xb7577);}function trim(_0x14406d){const _0x3dd786=String(_0x14406d||'')['trim']();return _0x3dd786;}
@@ -1 +1 @@
1
- const a83_0x2776fb=a83_0x49fc;(function(_0x544e3d,_0x170cd4){const _0x15a650=a83_0x49fc,_0x521e2e=_0x544e3d();while(!![]){try{const _0x5bb997=-parseInt(_0x15a650(0x13d))/0x1*(parseInt(_0x15a650(0x126))/0x2)+parseInt(_0x15a650(0x128))/0x3*(parseInt(_0x15a650(0x11d))/0x4)+parseInt(_0x15a650(0x11c))/0x5+-parseInt(_0x15a650(0x139))/0x6+-parseInt(_0x15a650(0x137))/0x7*(-parseInt(_0x15a650(0x120))/0x8)+-parseInt(_0x15a650(0x131))/0x9+parseInt(_0x15a650(0x12f))/0xa;if(_0x5bb997===_0x170cd4)break;else _0x521e2e['push'](_0x521e2e['shift']());}catch(_0x22eb64){_0x521e2e['push'](_0x521e2e['shift']());}}}(a83_0x3a50,0x7cd9e));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a83_0x3a50(){const _0x29a287=['backend','fields','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','trim','all','Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20','str','Restored\x20Dataset\x20field\x20','properties','Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.','message','filter','Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.','Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.','unknown','confirm','dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','--code\x20is\x20required','--field\x20is\x20required','223060JvIWdg','483116kKHKOY','length','Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20','3743904JyxPFu','warnings','Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore','Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20','/smartapi/dataset/restore-column','No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.','74OTFjth','name','12BRGYJp','\x20would\x20be\x20restored','validation','readback-failed','yes','Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20','No\x20user-deleted\x20field\x20found\x20with\x20code:\x20','4080110SZSvhR','some','3249FBWscW','code','POST','dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','field-restore','7FQaFWR','dataset','579300gfgCKP','data','field','map','21498eBPvGA','deleted','string','mutation-outcome-unknown','appCode','isArray','Dry-run:\x20Dataset\x20field\x20'];a83_0x3a50=function(){return _0x29a287;};return a83_0x3a50();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{normalizeUserDeletedField,resolveDataset}from'../../commands/dataset/user-deleted-field-list.js';import{getDatasetDetail,isPlatformTransportFailure,listUserDeletedDatasetColumns,restoreDatasetColumns}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PAGE_SYNC_WARNING='Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.',NO_RESUBMIT_WARNING=a83_0x2776fb(0x112);export async function buildDatasetFieldRestoreResult({appCode:_0x2b5f52,input:_0x45ab68,dryRun:_0x44e561}){const _0x1ad554=a83_0x2776fb,_0x3c5a2f=_0x45ab68['code']['trim'](),_0x4833bd=_0x45ab68[_0x1ad554(0x13b)][_0x1ad554(0x10c)]();if(!_0x3c5a2f)throw CliErrors[_0x1ad554(0x12a)](_0x1ad554(0x11a));if(!_0x4833bd)throw CliErrors['validation'](_0x1ad554(0x11b));const _0x388056=await getDatasetDetail(_0x3c5a2f),_0x19e8bd=resolveDataset(_0x388056,_0x3c5a2f),_0x2dead0=(await listUserDeletedDatasetColumns(_0x19e8bd['id']))[_0x1ad554(0x13c)](normalizeUserDeletedField),_0x56c9fe=_0x2dead0[_0x1ad554(0x114)](_0x9155b0=>_0x9155b0['code']===_0x4833bd);if(_0x56c9fe[_0x1ad554(0x11e)]===0x0)throw CliErrors[_0x1ad554(0x12a)](_0x1ad554(0x12e)+_0x4833bd,_0x1ad554(0x116));if(_0x56c9fe[_0x1ad554(0x11e)]>0x1)throw CliErrors[_0x1ad554(0x12a)](_0x1ad554(0x11f)+_0x4833bd,_0x1ad554(0x125));const _0x4084d8=_0x56c9fe[0x0],_0x1dd32a={'id':_0x4084d8['id'],'code':_0x4084d8[_0x1ad554(0x132)],'displayName':_0x4084d8['displayName'],'deleted':![],'active':!![]},_0x16ebc7={'operation':_0x1ad554(0x136),'appCode':_0x2b5f52,'selector':{'code':_0x3c5a2f,'field':_0x4833bd},'dataset':_0x19e8bd,'before':_0x4084d8,'dryRun':_0x44e561,'warnings':[PAGE_SYNC_WARNING]};if(_0x44e561)return{'ok':!![],'data':{..._0x16ebc7,'after':_0x1dd32a,'backend':{'submitted':![],'requestedColumnIds':[_0x4084d8['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':_0x1ad554(0x108)+_0x4833bd+_0x1ad554(0x129)};let _0x5f1730=null,_0x372426=![];try{_0x5f1730=await restoreDatasetColumns(_0x19e8bd['id'],[_0x4084d8['id']]);}catch(_0x56e3aa){if(!isPlatformTransportFailure(_0x56e3aa))throw _0x56e3aa;_0x372426=!![];}const _0x1904e1={'submitted':!![],'requestedColumnIds':[_0x4084d8['id']],'restoredCount':_0x5f1730,..._0x372426?{'outcome':_0x1ad554(0x117)}:{}};let _0x2fa21a,_0x173fe5;try{[_0x2fa21a,_0x173fe5]=await Promise[_0x1ad554(0x10d)]([listUserDeletedDatasetColumns(_0x19e8bd['id']),getDatasetDetail(_0x3c5a2f)]);}catch{return{'ok':![],'data':{..._0x16ebc7,'after':null,'backend':_0x1904e1,'warnings':[..._0x16ebc7[_0x1ad554(0x121)],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x372426?_0x1ad554(0x140):_0x1ad554(0x12b)}},'message':_0x372426?_0x1ad554(0x10e)+_0x4833bd+'.\x20'+NO_RESUBMIT_WARNING:_0x1ad554(0x123)+_0x4833bd+'.\x20'+NO_RESUBMIT_WARNING};}const _0x20610a=!_0x2fa21a[_0x1ad554(0x130)](_0x4706cc=>Number(_0x4706cc['id'])===_0x4084d8['id']||_0x4706cc[_0x1ad554(0x132)]===_0x4833bd),_0x1df11c=findActiveField(_0x173fe5,_0x4084d8['id'],_0x4833bd),_0x374183=_0x1df11c!==null,_0x22b0f7=!_0x372426&&_0x5f1730===0x1&&_0x20610a&&_0x374183,_0x2d7617={'performed':!![],'deletedListCleared':_0x20610a,'activeFieldPresent':_0x374183,'passed':_0x22b0f7,..._0x372426?{'reason':_0x1ad554(0x140)}:_0x5f1730!==0x1?{'reason':'server-restored-count-mismatch'}:{}};return{'ok':_0x22b0f7,'data':{..._0x16ebc7,'after':_0x1df11c,'backend':_0x1904e1,'warnings':_0x22b0f7?_0x16ebc7[_0x1ad554(0x121)]:[..._0x16ebc7[_0x1ad554(0x121)],NO_RESUBMIT_WARNING],'verification':_0x2d7617},'message':_0x22b0f7?_0x1ad554(0x110)+_0x4833bd:_0x372426?_0x1ad554(0x10e)+_0x4833bd+'.\x20'+NO_RESUBMIT_WARNING:_0x1ad554(0x12d)+_0x4833bd+'.\x20'+NO_RESUBMIT_WARNING};}export const datasetFieldRestore={'service':a83_0x2776fb(0x138),'command':a83_0x2776fb(0x136),'description':'Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','risk':'write','structuredErrors':!![],'rejectedFlags':[{'name':a83_0x2776fb(0x10d),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','hint':'Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.'},{'name':a83_0x2776fb(0x10a),'message':a83_0x2776fb(0x134),'hint':a83_0x2776fb(0x115)},{'name':a83_0x2776fb(0x12c),'message':a83_0x2776fb(0x10b),'hint':a83_0x2776fb(0x135)},{'name':a83_0x2776fb(0x118),'message':a83_0x2776fb(0x119),'hint':a83_0x2776fb(0x135)}],'flags':[CODE_FLAG,{'name':a83_0x2776fb(0x13b),'type':a83_0x2776fb(0x13f),'required':!![],'description':a83_0x2776fb(0x122)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x7dadfd){readInput(_0x7dadfd);},async 'dryRun'(_0x4be10e){const _0x3fecc7=a83_0x2776fb,_0x4cdb10=await buildDatasetFieldRestoreResult({'appCode':_0x4be10e[_0x3fecc7(0x106)],'input':readInput(_0x4be10e),'dryRun':!![]});return asDryRunResult({..._0x4cdb10[_0x3fecc7(0x13a)],'body':{'datasetId':_0x4cdb10[_0x3fecc7(0x13a)][_0x3fecc7(0x138)]['id'],'columnIds':_0x4cdb10['data'][_0x3fecc7(0x109)]['requestedColumnIds']}},{'method':_0x3fecc7(0x133),'url':_0x3fecc7(0x124),'description':_0x4cdb10[_0x3fecc7(0x113)]});},async 'execute'(_0x59210c){const _0x488170=a83_0x2776fb;return buildDatasetFieldRestoreResult({'appCode':_0x59210c[_0x488170(0x106)],'input':readInput(_0x59210c),'dryRun':![]});}};function readInput(_0x54d227){const _0x5dcfbd=a83_0x2776fb,_0x319924={'code':String(_0x54d227[_0x5dcfbd(0x10f)](_0x5dcfbd(0x132))||'')[_0x5dcfbd(0x10c)](),'field':String(_0x54d227[_0x5dcfbd(0x10f)](_0x5dcfbd(0x13b))||'')[_0x5dcfbd(0x10c)]()};if(!_0x319924[_0x5dcfbd(0x132)])throw CliErrors[_0x5dcfbd(0x12a)](_0x5dcfbd(0x11a));if(!_0x319924[_0x5dcfbd(0x13b)])throw CliErrors[_0x5dcfbd(0x12a)](_0x5dcfbd(0x11b));return _0x319924;}function a83_0x49fc(_0x1c9f37,_0x2064a1){_0x1c9f37=_0x1c9f37-0x106;const _0x3a500e=a83_0x3a50();let _0x49fcb7=_0x3a500e[_0x1c9f37];return _0x49fcb7;}function findActiveField(_0x23aa6e,_0x508b2e,_0x583b43){const _0xecc700=a83_0x2776fb,_0x1ceb86=Array['isArray'](_0x23aa6e[_0xecc700(0x10a)]),_0x244d47=_0x1ceb86?_0x23aa6e['fields']:Array[_0xecc700(0x107)](_0x23aa6e[_0xecc700(0x111)])?_0x23aa6e['properties']:[];for(const _0x390d26 of _0x244d47){if(!_0x390d26||typeof _0x390d26!=='object')continue;const _0x42cd4f=_0x390d26,_0x1e4b92=_0x1ceb86?_0x42cd4f[_0xecc700(0x127)]:_0x42cd4f[_0xecc700(0x132)],_0x39f213=_0x42cd4f[_0xecc700(0x13e)]!==!![]&&Number(_0x42cd4f['id'])===_0x508b2e&&_0x1e4b92===_0x583b43;if(!_0x39f213)continue;const _0x13cbb7=_0x1ceb86?_0x42cd4f['displayName']:_0x42cd4f[_0xecc700(0x127)];return{'id':_0x508b2e,'code':_0x583b43,'displayName':typeof _0x13cbb7===_0xecc700(0x13f)&&_0x13cbb7?_0x13cbb7:_0x583b43,'deleted':![],'active':!![]};}return null;}
1
+ const a83_0x4f83fe=a83_0x30a3;(function(_0x7a3c37,_0x36f624){const _0x13f4c2=a83_0x30a3,_0x37753e=_0x7a3c37();while(!![]){try{const _0x1ec3e8=-parseInt(_0x13f4c2(0x1ba))/0x1+-parseInt(_0x13f4c2(0x1b5))/0x2*(-parseInt(_0x13f4c2(0x1b6))/0x3)+parseInt(_0x13f4c2(0x1e1))/0x4+-parseInt(_0x13f4c2(0x1c2))/0x5+-parseInt(_0x13f4c2(0x1cb))/0x6+-parseInt(_0x13f4c2(0x1e5))/0x7*(parseInt(_0x13f4c2(0x1d6))/0x8)+parseInt(_0x13f4c2(0x1c8))/0x9*(parseInt(_0x13f4c2(0x1b8))/0xa);if(_0x1ec3e8===_0x36f624)break;else _0x37753e['push'](_0x37753e['shift']());}catch(_0x83529e){_0x37753e['push'](_0x37753e['shift']());}}}(a83_0x183c,0xa414d));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{normalizeUserDeletedField,resolveDataset}from'../../commands/dataset/user-deleted-field-list.js';function a83_0x30a3(_0x2b1fbb,_0x42569e){_0x2b1fbb=_0x2b1fbb-0x1ae;const _0x183c5a=a83_0x183c();let _0x30a386=_0x183c5a[_0x2b1fbb];return _0x30a386;}import{getDatasetDetail,isPlatformTransportFailure,listUserDeletedDatasetColumns,restoreDatasetColumns}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PAGE_SYNC_WARNING='Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.',NO_RESUBMIT_WARNING='Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.';export async function buildDatasetFieldRestoreResult({appCode:_0x435191,input:_0x14d418,dryRun:_0x8641df}){const _0x7f806=a83_0x30a3,_0x13ddb8=_0x14d418[_0x7f806(0x1d5)][_0x7f806(0x1c4)](),_0x11095f=_0x14d418[_0x7f806(0x1c9)][_0x7f806(0x1c4)]();if(!_0x13ddb8)throw CliErrors['validation']('--code\x20is\x20required');if(!_0x11095f)throw CliErrors[_0x7f806(0x1bc)](_0x7f806(0x1e2));const _0x1241eb=await getDatasetDetail(_0x13ddb8),_0x5ad003=resolveDataset(_0x1241eb,_0x13ddb8),_0x369e3b=(await listUserDeletedDatasetColumns(_0x5ad003['id']))['map'](normalizeUserDeletedField),_0x55c86c=_0x369e3b['filter'](_0x47d790=>_0x47d790[_0x7f806(0x1d5)]===_0x11095f);if(_0x55c86c['length']===0x0)throw CliErrors[_0x7f806(0x1bc)](_0x7f806(0x1d8)+_0x11095f,_0x7f806(0x1d1));if(_0x55c86c[_0x7f806(0x1d2)]>0x1)throw CliErrors[_0x7f806(0x1bc)](_0x7f806(0x1c3)+_0x11095f,_0x7f806(0x1c7));const _0xa395be=_0x55c86c[0x0],_0xc86536={'id':_0xa395be['id'],'code':_0xa395be[_0x7f806(0x1d5)],'displayName':_0xa395be['displayName'],'deleted':![],'active':!![]},_0x3473ee={'operation':_0x7f806(0x1d9),'appCode':_0x435191,'selector':{'code':_0x13ddb8,'field':_0x11095f},'dataset':_0x5ad003,'before':_0xa395be,'dryRun':_0x8641df,'warnings':[PAGE_SYNC_WARNING]};if(_0x8641df)return{'ok':!![],'data':{..._0x3473ee,'after':_0xc86536,'backend':{'submitted':![],'requestedColumnIds':[_0xa395be['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':_0x7f806(0x1c1)+_0x11095f+_0x7f806(0x1bd)};let _0xe05598=null,_0x14c59c=![];try{_0xe05598=await restoreDatasetColumns(_0x5ad003['id'],[_0xa395be['id']]);}catch(_0x37e3af){if(!isPlatformTransportFailure(_0x37e3af))throw _0x37e3af;_0x14c59c=!![];}const _0xc47d02={'submitted':!![],'requestedColumnIds':[_0xa395be['id']],'restoredCount':_0xe05598,..._0x14c59c?{'outcome':_0x7f806(0x1b1)}:{}};let _0x373c1e,_0x139d86;try{[_0x373c1e,_0x139d86]=await Promise['all']([listUserDeletedDatasetColumns(_0x5ad003['id']),getDatasetDetail(_0x13ddb8)]);}catch{return{'ok':![],'data':{..._0x3473ee,'after':null,'backend':_0xc47d02,'warnings':[..._0x3473ee[_0x7f806(0x1de)],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x14c59c?_0x7f806(0x1b4):_0x7f806(0x1ae)}},'message':_0x14c59c?_0x7f806(0x1c0)+_0x11095f+'.\x20'+NO_RESUBMIT_WARNING:_0x7f806(0x1af)+_0x11095f+'.\x20'+NO_RESUBMIT_WARNING};}const _0x44719c=!_0x373c1e[_0x7f806(0x1da)](_0x3e5ca9=>Number(_0x3e5ca9['id'])===_0xa395be['id']||_0x3e5ca9[_0x7f806(0x1d5)]===_0x11095f),_0x560b52=findActiveField(_0x139d86,_0xa395be['id'],_0x11095f),_0x2c223e=_0x560b52!==null,_0x3e2225=!_0x14c59c&&_0xe05598===0x1&&_0x44719c&&_0x2c223e,_0xb6094c={'performed':!![],'deletedListCleared':_0x44719c,'activeFieldPresent':_0x2c223e,'passed':_0x3e2225,..._0x14c59c?{'reason':'mutation-outcome-unknown'}:_0xe05598!==0x1?{'reason':_0x7f806(0x1c6)}:{}};return{'ok':_0x3e2225,'data':{..._0x3473ee,'after':_0x560b52,'backend':_0xc47d02,'warnings':_0x3e2225?_0x3473ee[_0x7f806(0x1de)]:[..._0x3473ee[_0x7f806(0x1de)],NO_RESUBMIT_WARNING],'verification':_0xb6094c},'message':_0x3e2225?_0x7f806(0x1db)+_0x11095f:_0x14c59c?_0x7f806(0x1c0)+_0x11095f+'.\x20'+NO_RESUBMIT_WARNING:_0x7f806(0x1d3)+_0x11095f+'.\x20'+NO_RESUBMIT_WARNING};}export const datasetFieldRestore={'service':a83_0x4f83fe(0x1b0),'command':a83_0x4f83fe(0x1d9),'description':a83_0x4f83fe(0x1b7),'risk':'write','structuredErrors':!![],'rejectedFlags':[{'name':a83_0x4f83fe(0x1d4),'message':a83_0x4f83fe(0x1be),'hint':a83_0x4f83fe(0x1cd)},{'name':a83_0x4f83fe(0x1ce),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','hint':a83_0x4f83fe(0x1cd)},{'name':'yes','message':a83_0x4f83fe(0x1b2),'hint':a83_0x4f83fe(0x1e3)},{'name':a83_0x4f83fe(0x1d0),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','hint':a83_0x4f83fe(0x1e3)}],'flags':[CODE_FLAG,{'name':a83_0x4f83fe(0x1c9),'type':a83_0x4f83fe(0x1e4),'required':!![],'description':a83_0x4f83fe(0x1dc)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d5ac5){readInput(_0x3d5ac5);},async 'dryRun'(_0x34056f){const _0x31360b=a83_0x4f83fe,_0x382987=await buildDatasetFieldRestoreResult({'appCode':_0x34056f[_0x31360b(0x1b9)],'input':readInput(_0x34056f),'dryRun':!![]});return asDryRunResult({..._0x382987[_0x31360b(0x1bb)],'body':{'datasetId':_0x382987[_0x31360b(0x1bb)]['dataset']['id'],'columnIds':_0x382987[_0x31360b(0x1bb)][_0x31360b(0x1cc)]['requestedColumnIds']}},{'method':_0x31360b(0x1ca),'url':_0x31360b(0x1d7),'description':_0x382987[_0x31360b(0x1cf)]});},async 'execute'(_0xd62473){const _0x1e361d=a83_0x4f83fe;return buildDatasetFieldRestoreResult({'appCode':_0xd62473[_0x1e361d(0x1b9)],'input':readInput(_0xd62473),'dryRun':![]});}};function readInput(_0x550004){const _0x11a43f=a83_0x4f83fe,_0x411282={'code':String(_0x550004[_0x11a43f(0x1bf)]('code')||'')['trim'](),'field':String(_0x550004['str']('field')||'')[_0x11a43f(0x1c4)]()};if(!_0x411282[_0x11a43f(0x1d5)])throw CliErrors['validation'](_0x11a43f(0x1e6));if(!_0x411282[_0x11a43f(0x1c9)])throw CliErrors['validation'](_0x11a43f(0x1e2));return _0x411282;}function findActiveField(_0x5d3571,_0x4cdc60,_0x100512){const _0x20e08a=a83_0x4f83fe,_0x5a2425=Array[_0x20e08a(0x1df)](_0x5d3571[_0x20e08a(0x1ce)]),_0x4086b9=_0x5a2425?_0x5d3571[_0x20e08a(0x1ce)]:Array[_0x20e08a(0x1df)](_0x5d3571[_0x20e08a(0x1dd)])?_0x5d3571[_0x20e08a(0x1dd)]:[];for(const _0x245daf of _0x4086b9){if(!_0x245daf||typeof _0x245daf!=='object')continue;const _0x476eda=_0x245daf,_0x5d79fc=_0x5a2425?_0x476eda[_0x20e08a(0x1c5)]:_0x476eda[_0x20e08a(0x1d5)],_0x5f2244=_0x476eda[_0x20e08a(0x1e0)]!==!![]&&Number(_0x476eda['id'])===_0x4cdc60&&_0x5d79fc===_0x100512;if(!_0x5f2244)continue;const _0xd94d3e=_0x5a2425?_0x476eda[_0x20e08a(0x1b3)]:_0x476eda['name'];return{'id':_0x4cdc60,'code':_0x100512,'displayName':typeof _0xd94d3e==='string'&&_0xd94d3e?_0xd94d3e:_0x100512,'deleted':![],'active':!![]};}return null;}function a83_0x183c(){const _0x22ac80=['12KevtdI','Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','830840pilyCa','appCode','724219XnnOgo','data','validation','\x20would\x20be\x20restored','dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','str','Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20','Dry-run:\x20Dataset\x20field\x20','992290RRXSvu','Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20','trim','name','server-restored-count-mismatch','No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.','99ywhuZi','field','POST','4669092cstHyR','backend','Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.','fields','message','confirm','Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.','length','Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20','all','code','3168iQxorJ','/smartapi/dataset/restore-column','No\x20user-deleted\x20field\x20found\x20with\x20code:\x20','field-restore','some','Restored\x20Dataset\x20field\x20','Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore','properties','warnings','isArray','deleted','779792wuMTAD','--field\x20is\x20required','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','string','959NSQxeq','--code\x20is\x20required','readback-failed','Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20','dataset','unknown','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','displayName','mutation-outcome-unknown','659158JOfcHy'];a83_0x183c=function(){return _0x22ac80;};return a83_0x183c();}
@@ -1 +1 @@
1
- const a84_0x53a6f6=a84_0x36da;(function(_0x2250ef,_0x23aa8a){const _0x115d46=a84_0x36da,_0x518c53=_0x2250ef();while(!![]){try{const _0x103745=-parseInt(_0x115d46(0x1f1))/0x1+-parseInt(_0x115d46(0x1c7))/0x2*(parseInt(_0x115d46(0x1d8))/0x3)+-parseInt(_0x115d46(0x1ee))/0x4*(-parseInt(_0x115d46(0x207))/0x5)+-parseInt(_0x115d46(0x1e8))/0x6+parseInt(_0x115d46(0x1c4))/0x7*(parseInt(_0x115d46(0x1d6))/0x8)+parseInt(_0x115d46(0x200))/0x9*(parseInt(_0x115d46(0x1d5))/0xa)+parseInt(_0x115d46(0x1c2))/0xb;if(_0x103745===_0x23aa8a)break;else _0x518c53['push'](_0x518c53['shift']());}catch(_0x5374c7){_0x518c53['push'](_0x518c53['shift']());}}}(a84_0x3355,0xec416));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a84_0x36da(_0x3a0a59,_0x4eb87f){_0x3a0a59=_0x3a0a59-0x1c2;const _0x3355a1=a84_0x3355();let _0x36da3f=_0x3355a1[_0x3a0a59];return _0x36da3f;}import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a84_0x53a6f6(0x1c3),'description',a84_0x53a6f6(0x205),a84_0x53a6f6(0x1d0),'datetimeFormat','defaultAggregation',a84_0x53a6f6(0x1db),a84_0x53a6f6(0x1ff)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x53a6f6(0x1cf),a84_0x53a6f6(0x1ed),'dbType',a84_0x53a6f6(0x1de),'dbTypeScale',a84_0x53a6f6(0x1ce),a84_0x53a6f6(0x202),a84_0x53a6f6(0x1da),a84_0x53a6f6(0x20a),a84_0x53a6f6(0x1dc),a84_0x53a6f6(0x1cc)]);export function parseJsonObjectFlag(_0x4868f1,_0x1128bc){const _0x1d089b=a84_0x53a6f6;if(!_0x4868f1)return undefined;let _0x5b9925;try{_0x5b9925=JSON['parse'](_0x4868f1);}catch(_0x5434f3){const _0x41324a=_0x5434f3 instanceof Error?_0x5434f3['message']:String(_0x5434f3);throw CliErrors[_0x1d089b(0x1fc)](_0x1128bc+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x41324a);}if(!isPlainObject(_0x5b9925)||Array[_0x1d089b(0x1c5)](_0x5b9925))throw CliErrors[_0x1d089b(0x1fc)](_0x1128bc+_0x1d089b(0x1c9));return _0x5b9925;}export function validatePatchKeys(_0x2db9df){const _0x52556d=a84_0x53a6f6,_0x1a38aa=Object[_0x52556d(0x1fd)](_0x2db9df);if(_0x1a38aa[_0x52556d(0x1ec)]===0x0)throw CliErrors[_0x52556d(0x1fc)](_0x52556d(0x1df));for(const _0x150865 of _0x1a38aa){if(FORBIDDEN_FIELD_KEYS[_0x52556d(0x1e1)](_0x150865))throw CliErrors[_0x52556d(0x1fc)]('Forbidden\x20patch\x20key:\x20'+_0x150865);if(!MUTABLE_FIELD_KEYS[_0x52556d(0x1e1)](_0x150865))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x150865,_0x52556d(0x1ef)+Array['from'](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}function a84_0x3355(){const _0x2f3bba=['str','dbFieldName','name','required','message','from','dbId','parse','126830WfqEWI','560YJHlNn','size','3ZvZDXh','stringify','deleted','chartRole','autoIncrement','POST','dbTypeLen','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','dataset','has','modelId','Expectation\x20mismatch\x20at\x20','datasetName','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','expect-json','Field\x20not\x20found:\x20','1641186OhgGXu','field','/smartapi/dataset/update-driven-data','Updated\x20dataset\x20field\x20','length','code','448276zWOLVV','Allowed\x20keys:\x20','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','1412973YBhPlv','data','Dry-run:\x20dataset\x20field\x20','modelCode','fields','patch-json','dbtableConfig','write','--field\x20is\x20required','entries','No\x20changes\x20for\x20dataset\x20field\x20','validation','keys','add','deprecated','531ehCtaK','expect','tableName','--expect-json','join','options','properties','10DmQKWf','patch','Exact\x20raw\x20fields[].name\x20to\x20patch','pkField','trim','23667908NzYzwM','displayName','64435sjmHUQ','isArray','findIndex','2228414jrFDfB','dbName','\x20must\x20be\x20a\x20JSON\x20object','appCode','string','systemRetain'];a84_0x3355=function(){return _0x2f3bba;};return a84_0x3355();}export function applyFieldPatch(_0x11e832,_0x47dc41){const _0x2197d3=a84_0x53a6f6;validatePatchKeys(_0x47dc41);const _0x4a4247=deepClone(_0x11e832),_0x1c84ad=new Set();for(const [_0x253d3f,_0x465551]of Object['entries'](_0x47dc41)){const _0x412786=_0x4a4247[_0x253d3f],_0x5e840d=mergePatchValue(_0x412786,_0x465551);!deepEqual(_0x412786,_0x5e840d)&&(_0x4a4247[_0x253d3f]=_0x5e840d,_0x1c84ad[_0x2197d3(0x1fe)](_0x253d3f),collectChangedPaths(_0x253d3f,_0x412786,_0x5e840d,_0x1c84ad));}return{'after':_0x4a4247,'changedPaths':Array[_0x2197d3(0x1d2)](_0x1c84ad)['sort'](),'changed':_0x1c84ad[_0x2197d3(0x1d7)]>0x0};}export function assertExpectation(_0x31f069,_0x4298ce){const _0x336c38=a84_0x53a6f6;if(!_0x4298ce)return;for(const [_0x35ccd1,_0x33f705]of Object[_0x336c38(0x1fa)](_0x4298ce)){const _0x35b138=_0x31f069[_0x35ccd1];if(!deepEqual(_0x35b138,_0x33f705))throw CliErrors['validation'](_0x336c38(0x1e3)+_0x35ccd1,'Expected\x20'+JSON[_0x336c38(0x1d9)](_0x33f705)+',\x20actual\x20'+JSON[_0x336c38(0x1d9)](_0x35b138));}}export async function buildDatasetFieldUpdateResult({appCode:_0x1b142f,input:_0x4f4988,dryRun:_0x43effe}){const _0x30c4bc=a84_0x53a6f6;validateInput(_0x4f4988);const _0x573f5a=await getDatasetDetail(_0x4f4988[_0x30c4bc(0x1ed)]),_0x5c1388=readFieldArray(_0x573f5a),_0x27cf4a=_0x5c1388[_0x30c4bc(0x1c6)](_0x15373c=>_0x15373c?.['name']===_0x4f4988[_0x30c4bc(0x1e9)]);if(_0x27cf4a<0x0)throw CliErrors['validation'](_0x30c4bc(0x1e7)+_0x4f4988[_0x30c4bc(0x1e9)]);const _0x576bd4=deepClone(_0x5c1388[_0x27cf4a]);assertExpectation(_0x576bd4,_0x4f4988[_0x30c4bc(0x201)]);const {after:_0x27a3b2,changedPaths:_0x284dd4,changed:_0x144f67}=applyFieldPatch(_0x576bd4,_0x4f4988[_0x30c4bc(0x208)]),_0x54622f=summarizeDataset(_0x573f5a,_0x4f4988[_0x30c4bc(0x1ed)]);return _0x144f67&&!_0x43effe&&(_0x5c1388[_0x27cf4a]=_0x27a3b2,await updateDrivenData(_0x573f5a)),{'ok':!![],'data':{'appCode':_0x1b142f,'selector':{'code':_0x4f4988[_0x30c4bc(0x1ed)]},'dataset':_0x54622f,'field':{'id':_0x576bd4['id']??null,'name':_0x576bd4[_0x30c4bc(0x1cf)]},'dryRun':_0x43effe,'changed':_0x144f67,'changedPaths':_0x284dd4,'before':_0x576bd4,'after':_0x27a3b2,'submitted':_0x144f67&&!_0x43effe},'message':_0x144f67?_0x43effe?_0x30c4bc(0x1f3)+_0x4f4988[_0x30c4bc(0x1e9)]+'\x20would\x20change\x20('+_0x284dd4['join'](',\x20')+')':_0x30c4bc(0x1eb)+_0x4f4988[_0x30c4bc(0x1e9)]+'\x20('+_0x284dd4[_0x30c4bc(0x204)](',\x20')+')':_0x30c4bc(0x1fb)+_0x4f4988[_0x30c4bc(0x1e9)]};}export const datasetFieldUpdate={'service':a84_0x53a6f6(0x1e0),'command':'field-update','description':a84_0x53a6f6(0x1f0),'risk':a84_0x53a6f6(0x1f8),'flags':[CODE_FLAG,{'name':a84_0x53a6f6(0x1e9),'type':a84_0x53a6f6(0x1cb),'required':!![],'description':a84_0x53a6f6(0x209)},{'name':a84_0x53a6f6(0x1f6),'type':a84_0x53a6f6(0x1cb),'required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a84_0x53a6f6(0x1e6),'type':a84_0x53a6f6(0x1cb),'required':![],'description':a84_0x53a6f6(0x1e5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x381b90){validateInput(readFieldUpdateInput(_0x381b90));},async 'dryRun'(_0x49be61){const _0xf522bc=a84_0x53a6f6,_0x20ee1e=await buildDatasetFieldUpdateResult({'appCode':_0x49be61['appCode'],'input':readFieldUpdateInput(_0x49be61),'dryRun':!![]});return{'method':_0xf522bc(0x1dd),'url':_0xf522bc(0x1ea),'body':_0x20ee1e[_0xf522bc(0x1f2)],'description':_0x20ee1e[_0xf522bc(0x1d1)]};},async 'execute'(_0x14bc00){const _0x7fc3e9=a84_0x53a6f6;return buildDatasetFieldUpdateResult({'appCode':_0x14bc00[_0x7fc3e9(0x1ca)],'input':readFieldUpdateInput(_0x14bc00),'dryRun':![]});}};function readFieldUpdateInput(_0x270fe0){const _0x31a253=a84_0x53a6f6,_0x1de4cf=trim(_0x270fe0[_0x31a253(0x1cd)](_0x31a253(0x1ed))),_0x496aeb=emptyToUndefined(_0x270fe0[_0x31a253(0x1cd)](_0x31a253(0x1e9))),_0x37190d=parseJsonObjectFlag(_0x270fe0[_0x31a253(0x1cd)](_0x31a253(0x1f6)),'--patch-json'),_0xd4b058=parseJsonObjectFlag(_0x270fe0['str'](_0x31a253(0x1e6)),_0x31a253(0x203));return{'code':_0x1de4cf,'field':_0x496aeb||'','patch':_0x37190d||{},'expect':_0xd4b058};}function validateInput(_0x2d28b4){const _0xac73=a84_0x53a6f6;if(!_0x2d28b4[_0xac73(0x1ed)])throw CliErrors[_0xac73(0x1fc)]('--code\x20is\x20required');if(!_0x2d28b4[_0xac73(0x1e9)])throw CliErrors[_0xac73(0x1fc)](_0xac73(0x1f9));validatePatchKeys(_0x2d28b4[_0xac73(0x208)]);}function readFieldArray(_0x2a46fd){const _0x2db287=a84_0x53a6f6;if(Array[_0x2db287(0x1c5)](_0x2a46fd['fields']))return _0x2a46fd[_0x2db287(0x1f5)];if(Array[_0x2db287(0x1c5)](_0x2a46fd[_0x2db287(0x206)]))return _0x2a46fd[_0x2db287(0x206)];throw CliErrors[_0x2db287(0x1fc)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x429a64,_0x14e465){const _0x41eab2=a84_0x53a6f6,_0x576998=isPlainObject(_0x429a64[_0x41eab2(0x1e0)])?_0x429a64['dataset']:{},_0xdc1e72=isPlainObject(_0x429a64['dbtableConfig'])?_0x429a64[_0x41eab2(0x1f7)]:{};return{'id':_0x429a64[_0x41eab2(0x1e2)]??_0x429a64['id']??_0x576998['datasetId']??null,'code':_0x429a64[_0x41eab2(0x1f4)]??_0x429a64[_0x41eab2(0x1ed)]??_0x576998['datasetCode']??_0x14e465,'name':_0x429a64[_0x41eab2(0x1cf)]??_0x576998[_0x41eab2(0x1e4)]??null,'table':_0xdc1e72['tableName']??_0x576998[_0x41eab2(0x202)]??null,'db':_0xdc1e72[_0x41eab2(0x1c8)]??_0xdc1e72[_0x41eab2(0x1d3)]??null};}function mergePatchValue(_0x5065e9,_0xcdc4d5){if(isPlainObject(_0x5065e9)&&isPlainObject(_0xcdc4d5))return deepMerge(_0x5065e9,_0xcdc4d5);return deepClone(_0xcdc4d5);}function deepMerge(_0x19214c,_0x58d9fd){const _0x356b86=a84_0x53a6f6,_0x25dbfe=deepClone(_0x19214c);for(const [_0x2716e2,_0x18268d]of Object[_0x356b86(0x1fa)](_0x58d9fd)){_0x25dbfe[_0x2716e2]=isPlainObject(_0x25dbfe[_0x2716e2])&&isPlainObject(_0x18268d)?deepMerge(_0x25dbfe[_0x2716e2],_0x18268d):deepClone(_0x18268d);}return _0x25dbfe;}function collectChangedPaths(_0x54bf37,_0xe5e28d,_0x2d22a5,_0x26424b){const _0x4e123d=a84_0x53a6f6;if(!isPlainObject(_0xe5e28d)||!isPlainObject(_0x2d22a5))return;const _0xee72dc=new Set([...Object[_0x4e123d(0x1fd)](_0xe5e28d),...Object[_0x4e123d(0x1fd)](_0x2d22a5)]);for(const _0x35cd2b of _0xee72dc){const _0x25d674=_0xe5e28d[_0x35cd2b],_0x2ce2f1=_0x2d22a5[_0x35cd2b];!deepEqual(_0x25d674,_0x2ce2f1)&&_0x26424b[_0x4e123d(0x1fe)](_0x54bf37+'.'+_0x35cd2b);}}function deepClone(_0x182087){const _0x3b1e35=a84_0x53a6f6;if(_0x182087===undefined)return _0x182087;return JSON[_0x3b1e35(0x1d4)](JSON[_0x3b1e35(0x1d9)](_0x182087));}function deepEqual(_0x4eefb4,_0x3ffc12){const _0x1e6da0=a84_0x53a6f6;return JSON[_0x1e6da0(0x1d9)](_0x4eefb4)===JSON[_0x1e6da0(0x1d9)](_0x3ffc12);}function isPlainObject(_0x12bd0a){const _0x198dd7=a84_0x53a6f6;return Boolean(_0x12bd0a)&&typeof _0x12bd0a==='object'&&!Array[_0x198dd7(0x1c5)](_0x12bd0a);}function emptyToUndefined(_0x3bf7a8){const _0x385ef7=a84_0x53a6f6,_0x5342e9=String(_0x3bf7a8||'')[_0x385ef7(0x20b)]();return _0x5342e9||undefined;}function trim(_0x5604e9){const _0x302070=a84_0x53a6f6;return String(_0x5604e9||'')[_0x302070(0x20b)]();}
1
+ const a84_0xbc5188=a84_0x3f1b;(function(_0x108400,_0x30977b){const _0x1f96e7=a84_0x3f1b,_0x4849f4=_0x108400();while(!![]){try{const _0x27f5f5=-parseInt(_0x1f96e7(0xb6))/0x1*(-parseInt(_0x1f96e7(0xe3))/0x2)+parseInt(_0x1f96e7(0xcd))/0x3*(parseInt(_0x1f96e7(0xd6))/0x4)+-parseInt(_0x1f96e7(0xda))/0x5*(parseInt(_0x1f96e7(0xe4))/0x6)+parseInt(_0x1f96e7(0xd5))/0x7+parseInt(_0x1f96e7(0xe8))/0x8*(-parseInt(_0x1f96e7(0xde))/0x9)+parseInt(_0x1f96e7(0xf9))/0xa*(-parseInt(_0x1f96e7(0xed))/0xb)+-parseInt(_0x1f96e7(0xea))/0xc*(-parseInt(_0x1f96e7(0xbe))/0xd);if(_0x27f5f5===_0x30977b)break;else _0x4849f4['push'](_0x4849f4['shift']());}catch(_0x4de7bb){_0x4849f4['push'](_0x4849f4['shift']());}}}(a84_0x2c73,0xc3fcb));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a84_0xbc5188(0xaf),a84_0xbc5188(0xca),a84_0xbc5188(0xcb),'options',a84_0xbc5188(0xd4),'datetimeFormat','defaultAggregation',a84_0xbc5188(0xf8),a84_0xbc5188(0xce)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0xbc5188(0xc9),'code',a84_0xbc5188(0xe7),a84_0xbc5188(0xb0),a84_0xbc5188(0xb4),a84_0xbc5188(0xc6),a84_0xbc5188(0xb8),a84_0xbc5188(0xcf),'pkField',a84_0xbc5188(0xc7),a84_0xbc5188(0xef)]);function a84_0x2c73(){const _0x360597=['stringify','datasetId','properties','3809xGCwjQ','modelId','sort','join','entries','appCode','field-update','isArray','dbFieldName','autoIncrement','str','name','displayName','description','Expected\x20','1851837uGNqtf','deprecated','deleted','trim','add','Forbidden\x20patch\x20key:\x20','\x20must\x20be\x20a\x20JSON\x20object','required','549514bdUzyK','8LcFZIo','code','data','has','4467070vbVbLj','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','size','expect-json','2232goPvdu','Field\x20not\x20found:\x20','string','validation','Unsupported\x20patch\x20key:\x20','742618mztRXU','6ElJzsC','patch-json','write','dbType','26360tyXrVl','length','648ccybnG','Updated\x20dataset\x20field\x20','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','2431qPjtNg','\x20would\x20change\x20(','systemRetain','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Allowed\x20keys:\x20','fields','Exact\x20raw\x20fields[].name\x20to\x20patch',',\x20actual\x20','dataset','datasetName','chartRole','13610IWjyxm','keys','field','dbtableConfig','message','modelCode','findIndex','patch','from','doType','dbTypeLen','\x20must\x20be\x20valid\x20JSON\x20object:\x20','--field\x20is\x20required','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','dbTypeScale','expect','4vNFcVb','POST','tableName','datasetCode','No\x20changes\x20for\x20dataset\x20field\x20'];a84_0x2c73=function(){return _0x360597;};return a84_0x2c73();}export function parseJsonObjectFlag(_0x349d6e,_0x3c7849){const _0x7be8c4=a84_0xbc5188;if(!_0x349d6e)return undefined;let _0x4886cd;try{_0x4886cd=JSON['parse'](_0x349d6e);}catch(_0x53f873){const _0x1371b2=_0x53f873 instanceof Error?_0x53f873[_0x7be8c4(0xaa)]:String(_0x53f873);throw CliErrors[_0x7be8c4(0xe1)](_0x3c7849+_0x7be8c4(0xb1)+_0x1371b2);}if(!isPlainObject(_0x4886cd)||Array['isArray'](_0x4886cd))throw CliErrors[_0x7be8c4(0xe1)](_0x3c7849+_0x7be8c4(0xd3));return _0x4886cd;}export function validatePatchKeys(_0x45b45d){const _0x3bcf5b=a84_0xbc5188,_0x145fe8=Object['keys'](_0x45b45d);if(_0x145fe8[_0x3bcf5b(0xe9)]===0x0)throw CliErrors['validation'](_0x3bcf5b(0xdb));for(const _0x4ef21f of _0x145fe8){if(FORBIDDEN_FIELD_KEYS[_0x3bcf5b(0xd9)](_0x4ef21f))throw CliErrors['validation'](_0x3bcf5b(0xd2)+_0x4ef21f);if(!MUTABLE_FIELD_KEYS[_0x3bcf5b(0xd9)](_0x4ef21f))throw CliErrors[_0x3bcf5b(0xe1)](_0x3bcf5b(0xe2)+_0x4ef21f,_0x3bcf5b(0xf2)+Array[_0x3bcf5b(0xae)](MUTABLE_FIELD_KEYS)[_0x3bcf5b(0xc1)](',\x20'));}}export function applyFieldPatch(_0xe50707,_0x34f768){const _0x80356a=a84_0xbc5188;validatePatchKeys(_0x34f768);const _0x243d51=deepClone(_0xe50707),_0x335ec5=new Set();for(const [_0x3b1336,_0x75ef86]of Object[_0x80356a(0xc2)](_0x34f768)){const _0x512f88=_0x243d51[_0x3b1336],_0x3f30e6=mergePatchValue(_0x512f88,_0x75ef86);!deepEqual(_0x512f88,_0x3f30e6)&&(_0x243d51[_0x3b1336]=_0x3f30e6,_0x335ec5[_0x80356a(0xd1)](_0x3b1336),collectChangedPaths(_0x3b1336,_0x512f88,_0x3f30e6,_0x335ec5));}return{'after':_0x243d51,'changedPaths':Array[_0x80356a(0xae)](_0x335ec5)[_0x80356a(0xc0)](),'changed':_0x335ec5[_0x80356a(0xdc)]>0x0};}export function assertExpectation(_0x359340,_0x580adf){const _0x31e992=a84_0xbc5188;if(!_0x580adf)return;for(const [_0x465a93,_0x2784f5]of Object[_0x31e992(0xc2)](_0x580adf)){const _0x3248d9=_0x359340[_0x465a93];if(!deepEqual(_0x3248d9,_0x2784f5))throw CliErrors[_0x31e992(0xe1)]('Expectation\x20mismatch\x20at\x20'+_0x465a93,_0x31e992(0xcc)+JSON[_0x31e992(0xbb)](_0x2784f5)+_0x31e992(0xf5)+JSON[_0x31e992(0xbb)](_0x3248d9));}}function a84_0x3f1b(_0x454dcb,_0x2fe574){_0x454dcb=_0x454dcb-0xa9;const _0x2c735d=a84_0x2c73();let _0x3f1b92=_0x2c735d[_0x454dcb];return _0x3f1b92;}export async function buildDatasetFieldUpdateResult({appCode:_0x11581d,input:_0x191957,dryRun:_0x185b80}){const _0xe545e=a84_0xbc5188;validateInput(_0x191957);const _0x5cc29e=await getDatasetDetail(_0x191957['code']),_0x812a26=readFieldArray(_0x5cc29e),_0x4887d3=_0x812a26[_0xe545e(0xac)](_0x54da17=>_0x54da17?.['name']===_0x191957['field']);if(_0x4887d3<0x0)throw CliErrors[_0xe545e(0xe1)](_0xe545e(0xdf)+_0x191957[_0xe545e(0xfb)]);const _0x579f7a=deepClone(_0x812a26[_0x4887d3]);assertExpectation(_0x579f7a,_0x191957[_0xe545e(0xb5)]);const {after:_0x3fe505,changedPaths:_0x1aa49c,changed:_0x2ea60f}=applyFieldPatch(_0x579f7a,_0x191957[_0xe545e(0xad)]),_0x4695fd=summarizeDataset(_0x5cc29e,_0x191957[_0xe545e(0xd7)]);return _0x2ea60f&&!_0x185b80&&(_0x812a26[_0x4887d3]=_0x3fe505,await updateDrivenData(_0x5cc29e)),{'ok':!![],'data':{'appCode':_0x11581d,'selector':{'code':_0x191957['code']},'dataset':_0x4695fd,'field':{'id':_0x579f7a['id']??null,'name':_0x579f7a[_0xe545e(0xc9)]},'dryRun':_0x185b80,'changed':_0x2ea60f,'changedPaths':_0x1aa49c,'before':_0x579f7a,'after':_0x3fe505,'submitted':_0x2ea60f&&!_0x185b80},'message':_0x2ea60f?_0x185b80?'Dry-run:\x20dataset\x20field\x20'+_0x191957[_0xe545e(0xfb)]+_0xe545e(0xee)+_0x1aa49c[_0xe545e(0xc1)](',\x20')+')':_0xe545e(0xeb)+_0x191957[_0xe545e(0xfb)]+'\x20('+_0x1aa49c['join'](',\x20')+')':_0xe545e(0xba)+_0x191957[_0xe545e(0xfb)]};}export const datasetFieldUpdate={'service':a84_0xbc5188(0xf6),'command':a84_0xbc5188(0xc4),'description':a84_0xbc5188(0xf0),'risk':a84_0xbc5188(0xe6),'flags':[CODE_FLAG,{'name':a84_0xbc5188(0xfb),'type':a84_0xbc5188(0xe0),'required':!![],'description':a84_0xbc5188(0xf4)},{'name':'patch-json','type':'string','required':!![],'description':a84_0xbc5188(0xf1)},{'name':a84_0xbc5188(0xdd),'type':a84_0xbc5188(0xe0),'required':![],'description':a84_0xbc5188(0xb3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5312cd){validateInput(readFieldUpdateInput(_0x5312cd));},async 'dryRun'(_0x308c6e){const _0x4b1e99=a84_0xbc5188,_0x29dcaa=await buildDatasetFieldUpdateResult({'appCode':_0x308c6e[_0x4b1e99(0xc3)],'input':readFieldUpdateInput(_0x308c6e),'dryRun':!![]});return{'method':_0x4b1e99(0xb7),'url':'/smartapi/dataset/update-driven-data','body':_0x29dcaa[_0x4b1e99(0xd8)],'description':_0x29dcaa[_0x4b1e99(0xaa)]};},async 'execute'(_0xcc7474){const _0x103b81=a84_0xbc5188;return buildDatasetFieldUpdateResult({'appCode':_0xcc7474[_0x103b81(0xc3)],'input':readFieldUpdateInput(_0xcc7474),'dryRun':![]});}};function readFieldUpdateInput(_0xf116a0){const _0x4de3d5=a84_0xbc5188,_0x2a8718=trim(_0xf116a0['str'](_0x4de3d5(0xd7))),_0x2eb6c1=emptyToUndefined(_0xf116a0[_0x4de3d5(0xc8)](_0x4de3d5(0xfb))),_0x264023=parseJsonObjectFlag(_0xf116a0[_0x4de3d5(0xc8)](_0x4de3d5(0xe5)),'--patch-json'),_0xf9462a=parseJsonObjectFlag(_0xf116a0[_0x4de3d5(0xc8)](_0x4de3d5(0xdd)),'--expect-json');return{'code':_0x2a8718,'field':_0x2eb6c1||'','patch':_0x264023||{},'expect':_0xf9462a};}function validateInput(_0xa72d7e){const _0x14b411=a84_0xbc5188;if(!_0xa72d7e['code'])throw CliErrors[_0x14b411(0xe1)]('--code\x20is\x20required');if(!_0xa72d7e['field'])throw CliErrors[_0x14b411(0xe1)](_0x14b411(0xb2));validatePatchKeys(_0xa72d7e[_0x14b411(0xad)]);}function readFieldArray(_0x36a75a){const _0x593b55=a84_0xbc5188;if(Array[_0x593b55(0xc5)](_0x36a75a[_0x593b55(0xf3)]))return _0x36a75a[_0x593b55(0xf3)];if(Array[_0x593b55(0xc5)](_0x36a75a[_0x593b55(0xbd)]))return _0x36a75a[_0x593b55(0xbd)];throw CliErrors[_0x593b55(0xe1)](_0x593b55(0xec));}function summarizeDataset(_0x278b5e,_0x4d31c5){const _0x151eb2=a84_0xbc5188,_0x1c3090=isPlainObject(_0x278b5e['dataset'])?_0x278b5e[_0x151eb2(0xf6)]:{},_0x102b98=isPlainObject(_0x278b5e[_0x151eb2(0xa9)])?_0x278b5e[_0x151eb2(0xa9)]:{};return{'id':_0x278b5e[_0x151eb2(0xbf)]??_0x278b5e['id']??_0x1c3090[_0x151eb2(0xbc)]??null,'code':_0x278b5e[_0x151eb2(0xab)]??_0x278b5e[_0x151eb2(0xd7)]??_0x1c3090[_0x151eb2(0xb9)]??_0x4d31c5,'name':_0x278b5e['name']??_0x1c3090[_0x151eb2(0xf7)]??null,'table':_0x102b98[_0x151eb2(0xb8)]??_0x1c3090[_0x151eb2(0xb8)]??null,'db':_0x102b98['dbName']??_0x102b98['dbId']??null};}function mergePatchValue(_0x1e4b75,_0x497d67){if(isPlainObject(_0x1e4b75)&&isPlainObject(_0x497d67))return deepMerge(_0x1e4b75,_0x497d67);return deepClone(_0x497d67);}function deepMerge(_0x1f5bbe,_0x19e624){const _0x228911=a84_0xbc5188,_0x5ec44b=deepClone(_0x1f5bbe);for(const [_0x7e166d,_0x460ea3]of Object[_0x228911(0xc2)](_0x19e624)){_0x5ec44b[_0x7e166d]=isPlainObject(_0x5ec44b[_0x7e166d])&&isPlainObject(_0x460ea3)?deepMerge(_0x5ec44b[_0x7e166d],_0x460ea3):deepClone(_0x460ea3);}return _0x5ec44b;}function collectChangedPaths(_0xb83872,_0xd6d231,_0x407972,_0x5adafe){const _0x4c764c=a84_0xbc5188;if(!isPlainObject(_0xd6d231)||!isPlainObject(_0x407972))return;const _0x71f32b=new Set([...Object[_0x4c764c(0xfa)](_0xd6d231),...Object[_0x4c764c(0xfa)](_0x407972)]);for(const _0x9c3759 of _0x71f32b){const _0x3ba6ba=_0xd6d231[_0x9c3759],_0x2d5962=_0x407972[_0x9c3759];!deepEqual(_0x3ba6ba,_0x2d5962)&&_0x5adafe[_0x4c764c(0xd1)](_0xb83872+'.'+_0x9c3759);}}function deepClone(_0x43bd3d){const _0x11afd4=a84_0xbc5188;if(_0x43bd3d===undefined)return _0x43bd3d;return JSON['parse'](JSON[_0x11afd4(0xbb)](_0x43bd3d));}function deepEqual(_0xc2d114,_0x2f402b){const _0xe587d8=a84_0xbc5188;return JSON[_0xe587d8(0xbb)](_0xc2d114)===JSON[_0xe587d8(0xbb)](_0x2f402b);}function isPlainObject(_0x1a2eb0){const _0x5eb001=a84_0xbc5188;return Boolean(_0x1a2eb0)&&typeof _0x1a2eb0==='object'&&!Array[_0x5eb001(0xc5)](_0x1a2eb0);}function emptyToUndefined(_0x20d1cb){const _0x10d635=String(_0x20d1cb||'')['trim']();return _0x10d635||undefined;}function trim(_0x8a5ff6){const _0x2fe7b2=a84_0xbc5188;return String(_0x8a5ff6||'')[_0x2fe7b2(0xd0)]();}