@lovrabet/rabetbase-cli 2.4.4 → 2.4.5-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 (330) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.d.ts +1 -0
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/{permit/index.d.ts → dataset/business-groups.d.ts} +1 -1
  63. package/lib/commands/dataset/business-groups.js +1 -0
  64. package/lib/commands/dataset/capability.js +1 -1
  65. package/lib/commands/dataset/delete.js +1 -1
  66. package/lib/commands/dataset/detail.js +1 -1
  67. package/lib/commands/dataset/extend-update.js +1 -1
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/db/analysis-batching.js +1 -1
  82. package/lib/commands/db/analyze-batch-plan.js +1 -1
  83. package/lib/commands/db/analyze-cancel.js +1 -1
  84. package/lib/commands/db/analyze-start.js +1 -1
  85. package/lib/commands/db/analyze-status.js +1 -1
  86. package/lib/commands/db/create.js +1 -1
  87. package/lib/commands/db/delete.js +1 -1
  88. package/lib/commands/db/detail.js +1 -1
  89. package/lib/commands/db/diff-refresh-start.js +1 -1
  90. package/lib/commands/db/diff-refresh-status.js +1 -1
  91. package/lib/commands/db/diff.js +1 -1
  92. package/lib/commands/db/index.js +1 -1
  93. package/lib/commands/db/list.js +1 -1
  94. package/lib/commands/db/shared.d.ts +15 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/tables.js +1 -1
  97. package/lib/commands/db/test.js +1 -1
  98. package/lib/commands/db/update.js +1 -1
  99. package/lib/commands/doctor.js +1 -1
  100. package/lib/commands/file/index.js +1 -1
  101. package/lib/commands/init/index.js +1 -1
  102. package/lib/commands/issue/index.js +1 -1
  103. package/lib/commands/issue/nudge.js +1 -1
  104. package/lib/commands/issue/report.js +1 -1
  105. package/lib/commands/issue/shared.js +1 -1
  106. package/lib/commands/kb/create.js +1 -1
  107. package/lib/commands/kb/delete.js +1 -1
  108. package/lib/commands/kb/detail.js +1 -1
  109. package/lib/commands/kb/index.js +1 -1
  110. package/lib/commands/kb/list.js +1 -1
  111. package/lib/commands/kb/shared.js +1 -1
  112. package/lib/commands/kb/update.js +1 -1
  113. package/lib/commands/logs/index.js +1 -1
  114. package/lib/commands/menu/asset-update.js +1 -1
  115. package/lib/commands/menu/delete.js +1 -1
  116. package/lib/commands/menu/external-link-create.js +1 -1
  117. package/lib/commands/menu/external-link-update.js +1 -1
  118. package/lib/commands/menu/group-create.js +1 -1
  119. package/lib/commands/menu/group-update.js +1 -1
  120. package/lib/commands/menu/index.js +1 -1
  121. package/lib/commands/menu/list.js +1 -1
  122. package/lib/commands/menu/move.js +1 -1
  123. package/lib/commands/menu/regroup-start.js +1 -1
  124. package/lib/commands/menu/rename.js +1 -1
  125. package/lib/commands/menu/shared/compare-table.js +1 -1
  126. package/lib/commands/menu/shared/delete-plan.js +1 -1
  127. package/lib/commands/menu/shared/facts.js +1 -1
  128. package/lib/commands/menu/shared/index.js +1 -1
  129. package/lib/commands/menu/shared/inquirer.js +1 -1
  130. package/lib/commands/menu/shared/local-pages.js +1 -1
  131. package/lib/commands/menu/shared/logic.js +1 -1
  132. package/lib/commands/menu/shared/mutations.js +1 -1
  133. package/lib/commands/menu/shared/service.js +1 -1
  134. package/lib/commands/menu/shared/sync-core.js +1 -1
  135. package/lib/commands/menu/shared/update-core.js +1 -1
  136. package/lib/commands/menu/shared/valid-url.js +1 -1
  137. package/lib/commands/menu/sync.js +1 -1
  138. package/lib/commands/notification/config-create.js +1 -1
  139. package/lib/commands/notification/config-delete.js +1 -1
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.js +1 -1
  142. package/lib/commands/notification/index.js +1 -1
  143. package/lib/commands/notification/shared.js +1 -1
  144. package/lib/commands/ocr/index.js +1 -1
  145. package/lib/commands/page/generate-start.js +1 -1
  146. package/lib/commands/page/generate-status.js +1 -1
  147. package/lib/commands/page/index.js +1 -1
  148. package/lib/commands/page/pull.js +1 -1
  149. package/lib/commands/page/push.js +1 -1
  150. package/lib/commands/page/react/create.js +1 -1
  151. package/lib/commands/page/react/detail.js +1 -1
  152. package/lib/commands/page/react/list.js +1 -1
  153. package/lib/commands/page/react/publish.js +1 -1
  154. package/lib/commands/page/react/shared.js +1 -1
  155. package/lib/commands/page/react/syntax.js +1 -1
  156. package/lib/commands/page/react/template.js +1 -1
  157. package/lib/commands/page/react/update.js +1 -1
  158. package/lib/commands/page/relation-audit.js +1 -1
  159. package/lib/commands/page/restore.js +1 -1
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/standard-page-status.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  164. package/lib/commands/project/create/format-elapsed.js +1 -1
  165. package/lib/commands/project/create/main.js +1 -1
  166. package/lib/commands/project/create/materialize-project-template.js +1 -1
  167. package/lib/commands/project/create/project-name.js +1 -1
  168. package/lib/commands/project/create/project-template-archive.js +1 -1
  169. package/lib/commands/project/create/project-template-path.js +1 -1
  170. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  171. package/lib/commands/project/create/use-format-code.js +1 -1
  172. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  173. package/lib/commands/project/index.js +1 -1
  174. package/lib/commands/project/upgrade.js +1 -1
  175. package/lib/commands/registry.js +1 -1
  176. package/lib/commands/role/delete.js +1 -1
  177. package/lib/commands/role/detail.js +1 -1
  178. package/lib/commands/role/index.js +1 -1
  179. package/lib/commands/role/list.js +1 -1
  180. package/lib/commands/role/shared.d.ts +15 -17
  181. package/lib/commands/role/shared.js +1 -1
  182. package/lib/commands/role/update.js +1 -1
  183. package/lib/commands/role/user-add.js +1 -1
  184. package/lib/commands/role/user-remove.js +1 -1
  185. package/lib/commands/role/user-resolve.js +1 -1
  186. package/lib/commands/run/index.js +1 -1
  187. package/lib/commands/schema.js +1 -1
  188. package/lib/commands/sql/create.js +1 -1
  189. package/lib/commands/sql/delete.js +1 -1
  190. package/lib/commands/sql/detail.js +1 -1
  191. package/lib/commands/sql/exec.js +1 -1
  192. package/lib/commands/sql/index.js +1 -1
  193. package/lib/commands/sql/list.js +1 -1
  194. package/lib/commands/sql/pull.js +1 -1
  195. package/lib/commands/sql/push.js +1 -1
  196. package/lib/commands/sql/shared.js +1 -1
  197. package/lib/commands/sql/status.js +1 -1
  198. package/lib/commands/sql/validate.js +1 -1
  199. package/lib/commands/task/index.js +1 -1
  200. package/lib/commands/task/status.js +1 -1
  201. package/lib/commands/tenant/index.js +1 -1
  202. package/lib/commands/tenant/members-list.js +1 -1
  203. package/lib/commands/tenant/shared.js +1 -1
  204. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  205. package/lib/commands/user-account/index.js +1 -1
  206. package/lib/commands/workspace/add.js +1 -1
  207. package/lib/commands/workspace/index.js +1 -1
  208. package/lib/commands/workspace/remove.js +1 -1
  209. package/lib/config/schema.js +1 -1
  210. package/lib/constant/cdn.js +1 -1
  211. package/lib/constant/cli.js +1 -1
  212. package/lib/constant/defaults.js +1 -1
  213. package/lib/constant/domain.js +1 -1
  214. package/lib/constant/env.js +1 -1
  215. package/lib/constant/output.js +1 -1
  216. package/lib/constant/paths.js +1 -1
  217. package/lib/constant/risk.js +1 -1
  218. package/lib/context/app-resolver.js +1 -1
  219. package/lib/context/auth-resolver.js +1 -1
  220. package/lib/context/config-loader.js +1 -1
  221. package/lib/context.js +1 -1
  222. package/lib/core/alias-resolver.js +1 -1
  223. package/lib/core/api-client.d.ts +70 -79
  224. package/lib/core/api-client.js +1 -1
  225. package/lib/core/bff/config.js +1 -1
  226. package/lib/core/bff/file-system.d.ts +1 -0
  227. package/lib/core/bff/file-system.js +1 -1
  228. package/lib/core/bff/hash.js +1 -1
  229. package/lib/core/bff/lock.js +1 -1
  230. package/lib/core/bff/utils.js +1 -1
  231. package/lib/core/db-resolver.js +1 -1
  232. package/lib/core/page/file-system.js +1 -1
  233. package/lib/core/page/hash.js +1 -1
  234. package/lib/core/page/lock.js +1 -1
  235. package/lib/core/sql-index-auditor.js +1 -1
  236. package/lib/core/sql-sync/config.js +1 -1
  237. package/lib/core/sql-sync/file-system.js +1 -1
  238. package/lib/core/sql-sync/hash.js +1 -1
  239. package/lib/core/sql-sync/lock.js +1 -1
  240. package/lib/core/sql-sync/utils.js +1 -1
  241. package/lib/core/sql-validator.js +1 -1
  242. package/lib/errors.js +1 -1
  243. package/lib/framework/build-all-flags.js +1 -1
  244. package/lib/framework/error-output.js +1 -1
  245. package/lib/framework/explicit-yes.js +1 -1
  246. package/lib/framework/flags.js +1 -1
  247. package/lib/framework/help.js +1 -1
  248. package/lib/framework/index.js +1 -1
  249. package/lib/framework/output.js +1 -1
  250. package/lib/framework/response.js +1 -1
  251. package/lib/framework/runner-alias.js +1 -1
  252. package/lib/framework/runner.js +1 -1
  253. package/lib/framework/schema-export.js +1 -1
  254. package/lib/framework/types.js +1 -1
  255. package/lib/generated/build-info.d.ts +4 -4
  256. package/lib/generated/build-info.js +1 -1
  257. package/lib/help.js +1 -1
  258. package/lib/postinstall.js +1 -1
  259. package/lib/runtime/confirmation.js +1 -1
  260. package/lib/runtime/event.js +1 -1
  261. package/lib/runtime/index.js +1 -1
  262. package/lib/runtime/queue.js +1 -1
  263. package/lib/runtime/resolve.js +1 -1
  264. package/lib/skills/builtin-skill.js +1 -1
  265. package/lib/skills/main.js +1 -1
  266. package/lib/skills/npx-skills-add.js +1 -1
  267. package/lib/skills/skill-presence.js +1 -1
  268. package/lib/telemetry/cli-command-trace.js +1 -1
  269. package/lib/telemetry/cli-help-trace.js +1 -1
  270. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  271. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  272. package/lib/telemetry/send-cli-trace-log.js +1 -1
  273. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  274. package/lib/utils/ai_config.js +1 -1
  275. package/lib/utils/apply-jq-filter.js +1 -1
  276. package/lib/utils/cdn-config.js +1 -1
  277. package/lib/utils/check-sdk-version.js +1 -1
  278. package/lib/utils/cli-version-check.js +1 -1
  279. package/lib/utils/cli-version-policy.js +1 -1
  280. package/lib/utils/config.js +1 -1
  281. package/lib/utils/entity-with-id.js +1 -1
  282. package/lib/utils/file-utils.js +1 -1
  283. package/lib/utils/guides-cdn.js +1 -1
  284. package/lib/utils/http-client.js +1 -1
  285. package/lib/utils/is-non-interactive.js +1 -1
  286. package/lib/utils/logger.js +1 -1
  287. package/lib/utils/params.js +1 -1
  288. package/lib/utils/platform.js +1 -1
  289. package/lib/utils/rules-cdn.js +1 -1
  290. package/lib/utils/sleep.js +1 -1
  291. package/lib/utils/template-replacer.js +1 -1
  292. package/lib/utils/update-notice.js +1 -1
  293. package/lib/utils/version.js +1 -1
  294. package/lib/utils/with-active-cookie.js +1 -1
  295. package/lib/utils/write-cli-side-channel.js +1 -1
  296. package/package.json +1 -1
  297. package/skills/rabetbase/SKILL.md +18 -24
  298. package/skills/rabetbase/guides/database-connection-workflow.md +6 -2
  299. package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +28 -0
  300. package/skills/rabetbase/references/rabetbase-dataset-delete.md +7 -5
  301. package/skills/rabetbase/references/rabetbase-dataset-list.md +6 -6
  302. package/skills/rabetbase/references/rabetbase-dataset-restore.md +5 -5
  303. package/skills/rabetbase/references/rabetbase-db-create.md +3 -0
  304. package/skills/rabetbase/references/rabetbase-db-delete.md +10 -2
  305. package/skills/rabetbase/references/rabetbase-db-detail.md +2 -0
  306. package/skills/rabetbase/references/rabetbase-db-list.md +3 -2
  307. package/skills/rabetbase/references/rabetbase-db-update.md +4 -2
  308. package/skills/rabetbase/references/rabetbase-role-list.md +9 -17
  309. package/skills/rabetbase/references/rabetbase-role-user-add.md +44 -16
  310. package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
  311. package/skills/rabetbase.manifest.json +4 -7
  312. package/lib/commands/permit/index.js +0 -1
  313. package/lib/commands/permit/page-get.d.ts +0 -2
  314. package/lib/commands/permit/page-get.js +0 -1
  315. package/lib/commands/permit/page-set.d.ts +0 -2
  316. package/lib/commands/permit/page-set.js +0 -1
  317. package/lib/commands/permit/role-apis-set.d.ts +0 -2
  318. package/lib/commands/permit/role-apis-set.js +0 -1
  319. package/lib/commands/permit/role-menus-set.d.ts +0 -2
  320. package/lib/commands/permit/role-menus-set.js +0 -1
  321. package/lib/commands/permit/role-menus.d.ts +0 -2
  322. package/lib/commands/permit/role-menus.js +0 -1
  323. package/lib/commands/permit/shared.d.ts +0 -74
  324. package/lib/commands/permit/shared.js +0 -1
  325. package/lib/commands/role/create.d.ts +0 -2
  326. package/lib/commands/role/create.js +0 -1
  327. package/skills/rabetbase/guides/role-permit-workflow.md +0 -127
  328. package/skills/rabetbase/references/rabetbase-permit-page-set.md +0 -69
  329. package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +0 -53
  330. package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +0 -57
@@ -1 +1 @@
1
- function a49_0x3fdf(){const _0x1975b2=['4031024QLAJGQ','11393170IVAMZV','3yOydVw','App\x20Code\x20cannot\x20be\x20empty','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','length','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1215795YsHvbf','7AMTWCO','2058572cETWVl','5DPxfDq','515178gCmwYB','11DnzKhJ','4053771rxsZvy','3943878MWTLSe','test'];a49_0x3fdf=function(){return _0x1975b2;};return a49_0x3fdf();}function a49_0xf770(_0x13dace,_0x5abbee){_0x13dace=_0x13dace-0xe8;const _0x3fdf1c=a49_0x3fdf();let _0xf770f8=_0x3fdf1c[_0x13dace];return _0xf770f8;}(function(_0x51c209,_0x4aa64c){const _0x105c91=a49_0xf770,_0x12cf78=_0x51c209();while(!![]){try{const _0x58e8a3=parseInt(_0x105c91(0xf4))/0x1*(parseInt(_0x105c91(0xed))/0x2)+-parseInt(_0x105c91(0xe9))/0x3+-parseInt(_0x105c91(0xeb))/0x4*(parseInt(_0x105c91(0xec))/0x5)+parseInt(_0x105c91(0xf0))/0x6*(-parseInt(_0x105c91(0xea))/0x7)+parseInt(_0x105c91(0xf2))/0x8+-parseInt(_0x105c91(0xef))/0x9+-parseInt(_0x105c91(0xf3))/0xa*(-parseInt(_0x105c91(0xee))/0xb);if(_0x58e8a3===_0x4aa64c)break;else _0x12cf78['push'](_0x12cf78['shift']());}catch(_0x10f05b){_0x12cf78['push'](_0x12cf78['shift']());}}}(a49_0x3fdf,0x5ece2));export function validateAppcode(_0x482d8a){const _0x540e9b=a49_0xf770,_0x54b48b=_0x482d8a['trim']();if(!_0x54b48b)return{'valid':![],'message':_0x540e9b(0xf5)};if(_0x54b48b[_0x540e9b(0xf7)]>0x64)return{'valid':![],'message':_0x540e9b(0xe8)};if(!/^[A-Za-z0-9_-]+$/[_0x540e9b(0xf1)](_0x54b48b))return{'valid':![],'message':_0x540e9b(0xf6)};return{'valid':!![]};}
1
+ (function(_0x238f18,_0x512a2a){const _0x4fc683=a49_0x241f,_0x49de0a=_0x238f18();while(!![]){try{const _0x434388=-parseInt(_0x4fc683(0x198))/0x1+-parseInt(_0x4fc683(0x196))/0x2*(parseInt(_0x4fc683(0x19b))/0x3)+parseInt(_0x4fc683(0x19a))/0x4+-parseInt(_0x4fc683(0x197))/0x5*(parseInt(_0x4fc683(0x193))/0x6)+parseInt(_0x4fc683(0x195))/0x7+parseInt(_0x4fc683(0x19e))/0x8+-parseInt(_0x4fc683(0x199))/0x9*(-parseInt(_0x4fc683(0x19d))/0xa);if(_0x434388===_0x512a2a)break;else _0x49de0a['push'](_0x49de0a['shift']());}catch(_0x44172c){_0x49de0a['push'](_0x49de0a['shift']());}}}(a49_0x1723,0x477a8));function a49_0x241f(_0x10d531,_0x4a3361){_0x10d531=_0x10d531-0x193;const _0x17232a=a49_0x1723();let _0x241f73=_0x17232a[_0x10d531];return _0x241f73;}function a49_0x1723(){const _0x19a53b=['126epCjnd','703232tJdbzp','6984FwKvTd','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','461710jiiikd','1977904fBDXht','App\x20Code\x20cannot\x20be\x20empty','8154Sgahpn','length','202461kvPydL','466aMaMLt','870XudkIy','26697UmFOfB'];a49_0x1723=function(){return _0x19a53b;};return a49_0x1723();}export function validateAppcode(_0x267707){const _0x4c130d=a49_0x241f,_0x34dec4=_0x267707['trim']();if(!_0x34dec4)return{'valid':![],'message':_0x4c130d(0x19f)};if(_0x34dec4[_0x4c130d(0x194)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x34dec4))return{'valid':![],'message':_0x4c130d(0x19c)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a50_0x5a9898=a50_0x1bc7;function a50_0x4479(){const _0xaae2da=['24989whWXHS','52976XtHZvr','key','validation','appcode','92wexDcy','str','3465WwbdDz','180uDNgJG','read','string','3433404iVdcRP','2457963WqPDNW','config','28310bGjsoR','Missing\x20key.','Get\x20a\x20config\x20value\x20by\x20key','516267BBoEnr','object','184KHllQN','4301uLWYuq','app','6396IOYLVX','Key\x20not\x20found:\x20','Usage:\x20'];a50_0x4479=function(){return _0xaae2da;};return a50_0x4479();}(function(_0x2bba6e,_0x2247f0){const _0x331709=a50_0x1bc7,_0x235046=_0x2bba6e();while(!![]){try{const _0x52bdb7=parseInt(_0x331709(0xbb))/0x1*(parseInt(_0x331709(0xc0))/0x2)+parseInt(_0x331709(0xae))/0x3+parseInt(_0x331709(0xb8))/0x4*(parseInt(_0x331709(0xc2))/0x5)+-parseInt(_0x331709(0xc3))/0x6*(parseInt(_0x331709(0xbc))/0x7)+-parseInt(_0x331709(0xb5))/0x8*(parseInt(_0x331709(0xb3))/0x9)+-parseInt(_0x331709(0xb0))/0xa*(parseInt(_0x331709(0xb6))/0xb)+parseInt(_0x331709(0xc6))/0xc;if(_0x52bdb7===_0x2247f0)break;else _0x235046['push'](_0x235046['shift']());}catch(_0x411131){_0x235046['push'](_0x235046['shift']());}}}(a50_0x4479,0xad461));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a50_0x1bc7(_0x20582e,_0x2409e6){_0x20582e=_0x20582e-0xae;const _0x44792f=a50_0x4479();let _0x1bc738=_0x44792f[_0x20582e];return _0x1bc738;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x42dcae){const _0x4bd539=a50_0x1bc7,_0x58498c=_0x42dcae[_0x4bd539(0xc1)](_0x4bd539(0xbd));if(!_0x58498c)throw CliErrors['validation'](_0x4bd539(0xb1),_0x4bd539(0xba)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x3175da=readConfig(),_0x31f405=_0x58498c===_0x4bd539(0xb7)?_0x4bd539(0xbf):_0x58498c,_0x28dd86=_0x3175da[_0x31f405];if(_0x28dd86===undefined)throw CliErrors[_0x4bd539(0xbe)](_0x4bd539(0xb9)+_0x58498c);return{'ok':!![],'data':typeof _0x28dd86===_0x4bd539(0xb4)?_0x28dd86:{[_0x31f405]:_0x28dd86},'message':typeof _0x28dd86===_0x4bd539(0xb4)?undefined:String(_0x28dd86)};}export const configGetDefinition={'service':a50_0x5a9898(0xaf),'command':'get','description':a50_0x5a9898(0xb2),'risk':a50_0x5a9898(0xc4),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x5a9898(0xbd),'type':a50_0x5a9898(0xc5),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a50_0x5e6b10=a50_0x2bfe;(function(_0x22d9bf,_0x45468c){const _0x66807b=a50_0x2bfe,_0x5ec878=_0x22d9bf();while(!![]){try{const _0x4d5ba6=-parseInt(_0x66807b(0x131))/0x1+-parseInt(_0x66807b(0x13f))/0x2*(parseInt(_0x66807b(0x13e))/0x3)+-parseInt(_0x66807b(0x12f))/0x4*(parseInt(_0x66807b(0x140))/0x5)+parseInt(_0x66807b(0x139))/0x6*(-parseInt(_0x66807b(0x141))/0x7)+-parseInt(_0x66807b(0x134))/0x8*(parseInt(_0x66807b(0x12e))/0x9)+parseInt(_0x66807b(0x133))/0xa*(parseInt(_0x66807b(0x12b))/0xb)+parseInt(_0x66807b(0x130))/0xc*(parseInt(_0x66807b(0x13a))/0xd);if(_0x4d5ba6===_0x45468c)break;else _0x5ec878['push'](_0x5ec878['shift']());}catch(_0xfb9a98){_0x5ec878['push'](_0x5ec878['shift']());}}}(a50_0x382b,0x8691c));import{CliErrors}from'../../errors.js';function a50_0x382b(){const _0x409fd2=['get','227280xDweQi','1576jLBBWO','read','Usage:\x20','Key\x20not\x20found:\x20','Get\x20a\x20config\x20value\x20by\x20key','24lUyjUr','13nlrKIi','string','\x20config\x20get\x20--key\x20<key>','key','3DiFrGk','504754pUecin','5LcjPlj','1047291IKZUkx','object','config','88qpUEdT','validation','app','15597uEISSF','3972412nVhevn','37036464ztBTiM','531667elDpSd'];a50_0x382b=function(){return _0x409fd2;};return a50_0x382b();}function a50_0x2bfe(_0x4574a8,_0x1225f3){_0x4574a8=_0x4574a8-0x129;const _0x382b19=a50_0x382b();let _0x2bfe21=_0x382b19[_0x4574a8];return _0x2bfe21;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x28a738){const _0x4b11f9=a50_0x2bfe,_0x4904b2=_0x28a738['str'](_0x4b11f9(0x13d));if(!_0x4904b2)throw CliErrors[_0x4b11f9(0x12c)]('Missing\x20key.',_0x4b11f9(0x136)+CLI_BIN_NAME+_0x4b11f9(0x13c));const _0x22cd08=readConfig(),_0xc4bcd6=_0x4904b2===_0x4b11f9(0x12d)?'appcode':_0x4904b2,_0x343a06=_0x22cd08[_0xc4bcd6];if(_0x343a06===undefined)throw CliErrors[_0x4b11f9(0x12c)](_0x4b11f9(0x137)+_0x4904b2);return{'ok':!![],'data':typeof _0x343a06==='object'?_0x343a06:{[_0xc4bcd6]:_0x343a06},'message':typeof _0x343a06===_0x4b11f9(0x129)?undefined:String(_0x343a06)};}export const configGetDefinition={'service':a50_0x5e6b10(0x12a),'command':a50_0x5e6b10(0x132),'description':a50_0x5e6b10(0x138),'risk':a50_0x5e6b10(0x135),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x5e6b10(0x13d),'type':a50_0x5e6b10(0x13b),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x32030d,_0x45f65b){const _0x4f1afb=a51_0x1ac6,_0x37fe4e=_0x32030d();while(!![]){try{const _0x2394ae=parseInt(_0x4f1afb(0xaa))/0x1+-parseInt(_0x4f1afb(0xa2))/0x2*(-parseInt(_0x4f1afb(0xab))/0x3)+-parseInt(_0x4f1afb(0xa5))/0x4+-parseInt(_0x4f1afb(0xac))/0x5*(-parseInt(_0x4f1afb(0xa6))/0x6)+parseInt(_0x4f1afb(0xa1))/0x7*(-parseInt(_0x4f1afb(0xa7))/0x8)+parseInt(_0x4f1afb(0xa8))/0x9*(parseInt(_0x4f1afb(0xa9))/0xa)+parseInt(_0x4f1afb(0xa4))/0xb*(-parseInt(_0x4f1afb(0xa3))/0xc);if(_0x2394ae===_0x45f65b)break;else _0x37fe4e['push'](_0x37fe4e['shift']());}catch(_0x5955bd){_0x37fe4e['push'](_0x37fe4e['shift']());}}}(a51_0x4114,0xb90dd));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a51_0x1ac6(_0x9d0e2c,_0x18ad79){_0x9d0e2c=_0x9d0e2c-0xa1;const _0x4114cc=a51_0x4114();let _0x1ac6eb=_0x4114cc[_0x9d0e2c];return _0x1ac6eb;}import{configSetDefinition}from'../../commands/config/set.js';function a51_0x4114(){const _0x25f4bf=['3766528vBVDCr','2562432gaGqhQ','965512pkqpgo','45TeVcgP','2017600YGUnID','261078lxNJvr','204786Lflspb','5MwTuqs','35BaEzRK','20MGUENq','76512zmvFlr','132PdJXTU'];a51_0x4114=function(){return _0x25f4bf;};return a51_0x4114();}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ function a51_0x18e5(){const _0x38f54b=['768909RvkIrA','12jewarB','5374818vQCJrG','4oDSfov','103852wkIlDF','4859555jLdSaQ','264223JDceUi','488bvDZSy','11244780iThzKH','5449176dhuEVm'];a51_0x18e5=function(){return _0x38f54b;};return a51_0x18e5();}(function(_0xc7ead6,_0x293c51){const _0x52ea1c=a51_0x38e4,_0x88d929=_0xc7ead6();while(!![]){try{const _0x5cecc0=parseInt(_0x52ea1c(0xf0))/0x1*(parseInt(_0x52ea1c(0xed))/0x2)+-parseInt(_0x52ea1c(0xea))/0x3*(parseInt(_0x52ea1c(0xeb))/0x4)+-parseInt(_0x52ea1c(0xef))/0x5+-parseInt(_0x52ea1c(0xe9))/0x6+-parseInt(_0x52ea1c(0xee))/0x7*(-parseInt(_0x52ea1c(0xe7))/0x8)+parseInt(_0x52ea1c(0xec))/0x9+parseInt(_0x52ea1c(0xe8))/0xa;if(_0x5cecc0===_0x293c51)break;else _0x88d929['push'](_0x88d929['shift']());}catch(_0x212695){_0x88d929['push'](_0x88d929['shift']());}}}(a51_0x18e5,0x7b8fa));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a51_0x38e4(_0x703d64,_0x4d4e3a){_0x703d64=_0x703d64-0xe7;const _0x18e5f1=a51_0x18e5();let _0x38e435=_0x18e5f1[_0x703d64];return _0x38e435;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- const a52_0x45ce96=a52_0x39dc;(function(_0x563ae6,_0x1baf04){const _0x3162b9=a52_0x39dc,_0x2f4f18=_0x563ae6();while(!![]){try{const _0x5dad2a=-parseInt(_0x3162b9(0x158))/0x1+parseInt(_0x3162b9(0x156))/0x2+-parseInt(_0x3162b9(0x15c))/0x3*(-parseInt(_0x3162b9(0x157))/0x4)+parseInt(_0x3162b9(0x152))/0x5*(parseInt(_0x3162b9(0x153))/0x6)+-parseInt(_0x3162b9(0x15a))/0x7*(-parseInt(_0x3162b9(0x151))/0x8)+-parseInt(_0x3162b9(0x155))/0x9+-parseInt(_0x3162b9(0x15d))/0xa*(parseInt(_0x3162b9(0x15f))/0xb);if(_0x5dad2a===_0x1baf04)break;else _0x2f4f18['push'](_0x2f4f18['shift']());}catch(_0x5115cb){_0x2f4f18['push'](_0x2f4f18['shift']());}}}(a52_0x2a8b,0x43568));function a52_0x39dc(_0xb2d6d4,_0x4dba04){_0xb2d6d4=_0xb2d6d4-0x151;const _0x2a8ba6=a52_0x2a8b();let _0x39dc9b=_0x2a8ba6[_0xb2d6d4];return _0x39dc9b;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2bf5a9){const _0x24bbb5=a52_0x39dc,_0x325535=_0x2bf5a9[_0x24bbb5(0x154)](_0x24bbb5(0x15e))?readScopedConfig(_0x24bbb5(0x15e)):readConfig();return{'ok':!![],'data':_0x325535};}function a52_0x2a8b(){const _0x10faa7=['1361063pOjMCR','list','List\x20all\x20config\x20values','45112HWuTYr','339145zVxwgf','36oSeSou','bool','1507221sRTSnv','219352IHbzQS','379244EGlBLq','422256FFQUum','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','469QTPDaF','read','3wVdrYc','10LADVlr','global'];a52_0x2a8b=function(){return _0x10faa7;};return a52_0x2a8b();}export const configListDefinition={'service':'config','command':a52_0x45ce96(0x160),'description':a52_0x45ce96(0x161),'risk':a52_0x45ce96(0x15b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x45ce96(0x15e),'type':'boolean','description':a52_0x45ce96(0x159),'default':![]}],'execute':execute};
1
+ const a52_0x392837=a52_0x1751;(function(_0x34fef1,_0x377feb){const _0x4252a1=a52_0x1751,_0x24124a=_0x34fef1();while(!![]){try{const _0x255aeb=-parseInt(_0x4252a1(0x19c))/0x1+parseInt(_0x4252a1(0x1a5))/0x2+parseInt(_0x4252a1(0x1a2))/0x3*(parseInt(_0x4252a1(0x19a))/0x4)+-parseInt(_0x4252a1(0x19e))/0x5+-parseInt(_0x4252a1(0x19d))/0x6+-parseInt(_0x4252a1(0x19b))/0x7*(-parseInt(_0x4252a1(0x197))/0x8)+parseInt(_0x4252a1(0x1a3))/0x9*(-parseInt(_0x4252a1(0x1a1))/0xa);if(_0x255aeb===_0x377feb)break;else _0x24124a['push'](_0x24124a['shift']());}catch(_0x24e19e){_0x24124a['push'](_0x24124a['shift']());}}}(a52_0xdfd6,0x9bf54));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a52_0x1751(_0x1b92f3,_0x1ec2ee){_0x1b92f3=_0x1b92f3-0x197;const _0xdfd6f1=a52_0xdfd6();let _0x1751e3=_0xdfd6f1[_0x1b92f3];return _0x1751e3;}async function execute(_0x5d6292){const _0x149d88=a52_0x1751,_0x2ac343=_0x5d6292[_0x149d88(0x1a4)](_0x149d88(0x199))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x2ac343};}export const configListDefinition={'service':a52_0x392837(0x1a0),'command':'list','description':a52_0x392837(0x19f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x392837(0x199),'type':'boolean','description':a52_0x392837(0x198),'default':![]}],'execute':execute};function a52_0xdfd6(){const _0x2397df=['7FrPzpz','232891NLtjel','6519954ccksfb','431540XmiZLQ','List\x20all\x20config\x20values','config','349710nrkmnR','244599HJgUVl','297zGjZWo','bool','1583902dPtxnj','9470072uNjIWO','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','60ItdRWZ'];a52_0xdfd6=function(){return _0x2397df;};return a52_0xdfd6();}
@@ -1 +1 @@
1
- const a53_0x5d4ae2=a53_0x5c8b;function a53_0x5c8b(_0x74f91f,_0xd2d85f){_0x74f91f=_0x74f91f-0xc1;const _0x51eaf8=a53_0x51ea();let _0x5c8b9c=_0x51eaf8[_0x74f91f];return _0x5c8b9c;}(function(_0x167898,_0x103497){const _0x1f7515=a53_0x5c8b,_0x574add=_0x167898();while(!![]){try{const _0x58748=-parseInt(_0x1f7515(0xf2))/0x1+-parseInt(_0x1f7515(0xec))/0x2*(parseInt(_0x1f7515(0xf4))/0x3)+parseInt(_0x1f7515(0xc7))/0x4*(-parseInt(_0x1f7515(0xf0))/0x5)+-parseInt(_0x1f7515(0xc9))/0x6*(parseInt(_0x1f7515(0xc1))/0x7)+parseInt(_0x1f7515(0xcd))/0x8*(-parseInt(_0x1f7515(0xce))/0x9)+-parseInt(_0x1f7515(0xe8))/0xa+parseInt(_0x1f7515(0xeb))/0xb;if(_0x58748===_0x103497)break;else _0x574add['push'](_0x574add['shift']());}catch(_0x3b2d4e){_0x574add['push'](_0x574add['shift']());}}}(a53_0x51ea,0x70d8b));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a53_0x51ea(){const _0x3b84a0=['bool','join','keys','7161030rhfHjw','Settable\x20top-level\x20keys:\x20','locale','28452666bhCTcy','11574rOptaQ','`,\x20`','value','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','121945YJQAys','str','199948PcsclW','apps','165krLzmF','global','riskLevel','Invalid\x20value\x20for\x20\x22','424606msYwQM','object','\x22\x20is\x20not\x20settable.','Set\x20a\x20config\x20value','Use\x20`','\x22.\x20Allowed:\x20','44wIHVhP','Config\x20value','24JilHCl','Usage:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','config','11360jUlOvR','2403NzXuKL','env','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','validation','appcode','Invalid\x20locale\x20value.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','string','\x20set\x20to:\x20','Missing\x20key.','\x20appcode\x20set\x20to:\x20','app','write','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Missing\x20value.','Project','key','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','length','Global'];a53_0x51ea=function(){return _0x3b84a0;};return a53_0x51ea();}async function execute(_0x361efc){const _0x1b003e=a53_0x5c8b,_0x1bace6=_0x361efc[_0x1b003e(0xf1)](_0x1b003e(0xdf)),_0x2a13f2=_0x361efc['str'](_0x1b003e(0xee));if(!_0x1bace6)throw CliErrors[_0x1b003e(0xd1)](_0x1b003e(0xd7),'Usage:\x20'+CLI_BIN_NAME+_0x1b003e(0xd4));if(_0x2a13f2===undefined||_0x2a13f2==='')throw CliErrors[_0x1b003e(0xd1)](_0x1b003e(0xdd),_0x1b003e(0xca)+CLI_BIN_NAME+_0x1b003e(0xd4));if(_0x2a13f2[_0x1b003e(0xe3)]>0x1f4)throw CliErrors[_0x1b003e(0xd1)](_0x1b003e(0xef));if(!isTopLevelConfigKey(_0x1bace6))throw CliErrors[_0x1b003e(0xd1)]('Top-level\x20key\x20\x22'+_0x1bace6+_0x1b003e(0xc3),_0x1b003e(0xe9)+getTopLevelConfigKeySummary());if(_0x1bace6===_0x1b003e(0xf6))throw CliErrors[_0x1b003e(0xd1)](_0x1b003e(0xe2));if(CONFIG_ENUM_VALUES[_0x1bace6]&&!CONFIG_ENUM_VALUES[_0x1bace6]['includes'](_0x2a13f2))throw CliErrors[_0x1b003e(0xd1)](_0x1b003e(0xf7)+_0x1bace6+_0x1b003e(0xc6)+CONFIG_ENUM_VALUES[_0x1bace6][_0x1b003e(0xe6)](',\x20'));if(_0x1bace6===_0x1b003e(0xea)&&!normalizeLocale(_0x2a13f2))throw CliErrors[_0x1b003e(0xd1)](_0x1b003e(0xd3),_0x1b003e(0xdc));const _0x3d0849={'global':_0x361efc[_0x1b003e(0xe5)](_0x1b003e(0xf5))},_0x2311bb=resolveWriteScope(_0x3d0849),_0x4fa2cf=readScopedConfig(_0x2311bb);let _0x260247=_0x1bace6,_0x77c212=_0x2a13f2;_0x1bace6==='app'&&(_0x260247=_0x1b003e(0xd2),delete _0x4fa2cf[_0x1b003e(0xd9)]);_0x1bace6===_0x1b003e(0xea)&&(_0x77c212=normalizeLocale(_0x2a13f2));if(_0x1bace6===_0x1b003e(0xcf)){_0x77c212=normalizeEnv(_0x2a13f2);if(!isProduction(_0x77c212)&&!isDaily(_0x77c212))throw CliErrors[_0x1b003e(0xd1)](_0x1b003e(0xd0),_0x1b003e(0xcb));}if(_0x1bace6===_0x1b003e(0xd2)){const _0x314e23=_0x4fa2cf[_0x1b003e(0xf3)]&&typeof _0x4fa2cf[_0x1b003e(0xf3)]===_0x1b003e(0xc2)?Object[_0x1b003e(0xe7)](_0x4fa2cf[_0x1b003e(0xf3)]):[];if(_0x314e23[_0x1b003e(0xe3)]>0x0)throw CliErrors['validation']('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x1b003e(0xc5)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x77c212+_0x1b003e(0xed)+CLI_BIN_NAME+_0x1b003e(0xdb));const _0xa3de2d=buildCanonicalProjectConfig({..._0x4fa2cf},{'appCodes':[_0x77c212],'env':typeof _0x4fa2cf[_0x1b003e(0xcf)]===_0x1b003e(0xd5)?_0x4fa2cf['env']:undefined});writeScopedConfig(_0xa3de2d,_0x2311bb);const _0x24a5a5=_0x2311bb===_0x1b003e(0xf5)?_0x1b003e(0xe4):_0x1b003e(0xde);return{'ok':!![],'message':'✓\x20'+_0x24a5a5+_0x1b003e(0xd8)+_0x77c212+_0x1b003e(0xe0)};}_0x4fa2cf[_0x260247]=_0x77c212,writeScopedConfig(_0x4fa2cf,_0x2311bb);const _0x5c6dd5=_0x2311bb===_0x1b003e(0xf5)?_0x1b003e(0xe4):_0x1b003e(0xde);return{'ok':!![],'message':'✓\x20'+_0x5c6dd5+'\x20'+_0x260247+_0x1b003e(0xd6)+_0x77c212};}export const configSetDefinition={'service':a53_0x5d4ae2(0xcc),'command':'set','description':a53_0x5d4ae2(0xc4),'risk':a53_0x5d4ae2(0xda),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x5d4ae2(0xdf),'type':a53_0x5d4ae2(0xd5),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a53_0x5d4ae2(0xd5),'description':a53_0x5d4ae2(0xc8),'required':!![]},{'name':a53_0x5d4ae2(0xf5),'type':'boolean','description':a53_0x5d4ae2(0xe1),'default':![]}],'execute':execute};
1
+ function a53_0xce21(){const _0x3a7a33=['\x22\x20is\x20not\x20settable.','global','validation','Settable\x20top-level\x20keys:\x20','3210808axxRxL','config','Invalid\x20value\x20for\x20\x22','key','Global','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','`,\x20`','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','\x20appcode\x20set\x20to:\x20','str','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','6263379bRMZQJ','7QOcghS','includes','length','Project','object','Set\x20a\x20config\x20value','3528318BcIuIz','apps','15726XPNBTb','string','2355780dfMIut','set','Top-level\x20key\x20\x22','\x20workspace\x20add\x20<name>\x20--appcode\x20','env','\x22.\x20Allowed:\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','locale','write','Invalid\x20locale\x20value.','Usage:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','app','Missing\x20key.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','keys','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','join','4VIZeqt','20VFzQEx','136917TbmYuN','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Config\x20value','334195UCwbTG','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Use\x20`'];a53_0xce21=function(){return _0x3a7a33;};return a53_0xce21();}const a53_0x2fa7c3=a53_0x123b;(function(_0xa5895f,_0x43f369){const _0x252417=a53_0x123b,_0x395edc=_0xa5895f();while(!![]){try{const _0x56a417=-parseInt(_0x252417(0x10c))/0x1*(parseInt(_0x252417(0x12c))/0x2)+parseInt(_0x252417(0x10e))/0x3+-parseInt(_0x252417(0x10d))/0x4*(parseInt(_0x252417(0x111))/0x5)+parseInt(_0x252417(0x12a))/0x6*(-parseInt(_0x252417(0x124))/0x7)+parseInt(_0x252417(0x118))/0x8+parseInt(_0x252417(0x123))/0x9+parseInt(_0x252417(0x12e))/0xa;if(_0x56a417===_0x43f369)break;else _0x395edc['push'](_0x395edc['shift']());}catch(_0x340ea3){_0x395edc['push'](_0x395edc['shift']());}}}(a53_0xce21,0x67b5f));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a53_0x123b(_0x292cc1,_0x48db40){_0x292cc1=_0x292cc1-0x101;const _0xce2140=a53_0xce21();let _0x123bb0=_0xce2140[_0x292cc1];return _0x123bb0;}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x5cdc86){const _0x2eb22c=a53_0x123b,_0x427c45=_0x5cdc86[_0x2eb22c(0x121)](_0x2eb22c(0x11b)),_0x1c51f4=_0x5cdc86[_0x2eb22c(0x121)]('value');if(!_0x427c45)throw CliErrors[_0x2eb22c(0x116)](_0x2eb22c(0x107),'Usage:\x20'+CLI_BIN_NAME+_0x2eb22c(0x10f));if(_0x1c51f4===undefined||_0x1c51f4==='')throw CliErrors['validation']('Missing\x20value.',_0x2eb22c(0x103)+CLI_BIN_NAME+_0x2eb22c(0x10f));if(_0x1c51f4[_0x2eb22c(0x126)]>0x1f4)throw CliErrors[_0x2eb22c(0x116)](_0x2eb22c(0x108));if(!isTopLevelConfigKey(_0x427c45))throw CliErrors[_0x2eb22c(0x116)](_0x2eb22c(0x130)+_0x427c45+_0x2eb22c(0x114),_0x2eb22c(0x117)+getTopLevelConfigKeySummary());if(_0x427c45==='riskLevel')throw CliErrors['validation'](_0x2eb22c(0x134));if(CONFIG_ENUM_VALUES[_0x427c45]&&!CONFIG_ENUM_VALUES[_0x427c45][_0x2eb22c(0x125)](_0x1c51f4))throw CliErrors[_0x2eb22c(0x116)](_0x2eb22c(0x11a)+_0x427c45+_0x2eb22c(0x133)+CONFIG_ENUM_VALUES[_0x427c45][_0x2eb22c(0x10b)](',\x20'));if(_0x427c45===_0x2eb22c(0x135)&&!normalizeLocale(_0x1c51f4))throw CliErrors[_0x2eb22c(0x116)](_0x2eb22c(0x102),_0x2eb22c(0x122));const _0x18aed0={'global':_0x5cdc86['bool'](_0x2eb22c(0x115))},_0x1c95d6=resolveWriteScope(_0x18aed0),_0x2d111a=readScopedConfig(_0x1c95d6);let _0x41f5c1=_0x427c45,_0x5533a9=_0x1c51f4;_0x427c45===_0x2eb22c(0x106)&&(_0x41f5c1='appcode',delete _0x2d111a['app']);_0x427c45==='locale'&&(_0x5533a9=normalizeLocale(_0x1c51f4));if(_0x427c45===_0x2eb22c(0x132)){_0x5533a9=normalizeEnv(_0x1c51f4);if(!isProduction(_0x5533a9)&&!isDaily(_0x5533a9))throw CliErrors[_0x2eb22c(0x116)](_0x2eb22c(0x112),_0x2eb22c(0x104));}if(_0x427c45==='appcode'){const _0xe1472c=_0x2d111a['apps']&&typeof _0x2d111a[_0x2eb22c(0x12b)]===_0x2eb22c(0x128)?Object[_0x2eb22c(0x109)](_0x2d111a['apps']):[];if(_0xe1472c[_0x2eb22c(0x126)]>0x0)throw CliErrors['validation'](_0x2eb22c(0x105),_0x2eb22c(0x113)+CLI_BIN_NAME+_0x2eb22c(0x131)+_0x5533a9+_0x2eb22c(0x11e)+CLI_BIN_NAME+_0x2eb22c(0x11d));const _0x57ac63=buildCanonicalProjectConfig({..._0x2d111a},{'appCodes':[_0x5533a9],'env':typeof _0x2d111a[_0x2eb22c(0x132)]===_0x2eb22c(0x12d)?_0x2d111a['env']:undefined});writeScopedConfig(_0x57ac63,_0x1c95d6);const _0x8d4eb5=_0x1c95d6===_0x2eb22c(0x115)?_0x2eb22c(0x11c):_0x2eb22c(0x127);return{'ok':!![],'message':'✓\x20'+_0x8d4eb5+_0x2eb22c(0x120)+_0x5533a9+_0x2eb22c(0x11f)};}_0x2d111a[_0x41f5c1]=_0x5533a9,writeScopedConfig(_0x2d111a,_0x1c95d6);const _0x4e7e38=_0x1c95d6==='global'?_0x2eb22c(0x11c):_0x2eb22c(0x127);return{'ok':!![],'message':'✓\x20'+_0x4e7e38+'\x20'+_0x41f5c1+'\x20set\x20to:\x20'+_0x5533a9};}export const configSetDefinition={'service':a53_0x2fa7c3(0x119),'command':a53_0x2fa7c3(0x12f),'description':a53_0x2fa7c3(0x129),'risk':a53_0x2fa7c3(0x101),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x2fa7c3(0x11b),'type':a53_0x2fa7c3(0x12d),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':'string','description':a53_0x2fa7c3(0x110),'required':!![]},{'name':a53_0x2fa7c3(0x115),'type':'boolean','description':a53_0x2fa7c3(0x10a),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x139742,_0x40fbf0){var _0xd5c05a=a54_0x1a33,_0x1a8899=_0x139742();while(!![]){try{var _0x3586e8=-parseInt(_0xd5c05a(0x191))/0x1*(parseInt(_0xd5c05a(0x18d))/0x2)+-parseInt(_0xd5c05a(0x199))/0x3+parseInt(_0xd5c05a(0x194))/0x4+-parseInt(_0xd5c05a(0x193))/0x5*(-parseInt(_0xd5c05a(0x18b))/0x6)+parseInt(_0xd5c05a(0x192))/0x7*(-parseInt(_0xd5c05a(0x18f))/0x8)+parseInt(_0xd5c05a(0x190))/0x9*(-parseInt(_0xd5c05a(0x18a))/0xa)+parseInt(_0xd5c05a(0x18e))/0xb;if(_0x3586e8===_0x40fbf0)break;else _0x1a8899['push'](_0x1a8899['shift']());}catch(_0x204444){_0x1a8899['push'](_0x1a8899['shift']());}}}(a54_0x58d3,0x5f4ac));import{CLI_BIN_NAME}from'../../constant/cli.js';function a54_0x58d3(){var _0x157da1=['2835868MsgWTh','validation','project','global','\x20init`\x20first.','199602kmkQgO','20ExGRnB','30feqOjy','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','4UJmxvU','2567840CLllsa','59608mfAkZz','2055465VyWUEJ','18305JsVKUM','644KrWWDG','693315ueUING'];a54_0x58d3=function(){return _0x157da1;};return a54_0x58d3();}import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x2d9576){var _0x141ad3=a54_0x1a33;if(_0x2d9576['global'])return _0x141ad3(0x197);if(!isInProject())throw CliErrors[_0x141ad3(0x195)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x141ad3(0x18c)+CLI_BIN_NAME+_0x141ad3(0x198));return _0x141ad3(0x196);}function a54_0x1a33(_0x7b4e59,_0x507c57){_0x7b4e59=_0x7b4e59-0x18a;var _0x58d314=a54_0x58d3();var _0x1a33b4=_0x58d314[_0x7b4e59];return _0x1a33b4;}export function readScopedConfig(_0x565d13){return readConfigFile(resolveWriteConfigPath(_0x565d13));}export function writeScopedConfig(_0x3a9c0d,_0x49497f){writeConfigFile(resolveWriteConfigPath(_0x49497f),_0x3a9c0d);}
1
+ (function(_0x2205be,_0xb10fa6){var _0x450099=a54_0x8ed8,_0x3a3caf=_0x2205be();while(!![]){try{var _0x4b65e4=parseInt(_0x450099(0x1fb))/0x1*(-parseInt(_0x450099(0x1fe))/0x2)+parseInt(_0x450099(0x1fd))/0x3*(parseInt(_0x450099(0x1f4))/0x4)+parseInt(_0x450099(0x1f6))/0x5+-parseInt(_0x450099(0x1f8))/0x6+-parseInt(_0x450099(0x1fc))/0x7+parseInt(_0x450099(0x1f3))/0x8+parseInt(_0x450099(0x1fa))/0x9;if(_0x4b65e4===_0xb10fa6)break;else _0x3a3caf['push'](_0x3a3caf['shift']());}catch(_0xb05204){_0x3a3caf['push'](_0x3a3caf['shift']());}}}(a54_0x5161,0x80e14));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a54_0x8ed8(_0xaa4f80,_0xa27522){_0xaa4f80=_0xaa4f80-0x1f2;var _0x51617d=a54_0x5161();var _0x8ed874=_0x51617d[_0xaa4f80];return _0x8ed874;}import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x51043b){var _0x27dd04=a54_0x8ed8;if(_0x51043b[_0x27dd04(0x1f9)])return'global';if(!isInProject())throw CliErrors['validation'](_0x27dd04(0x1f2),_0x27dd04(0x1f7)+CLI_BIN_NAME+_0x27dd04(0x1f5));return'project';}export function readScopedConfig(_0x52f34a){return readConfigFile(resolveWriteConfigPath(_0x52f34a));}export function writeScopedConfig(_0x4ba4ee,_0x28ec1d){writeConfigFile(resolveWriteConfigPath(_0x28ec1d),_0x4ba4ee);}function a54_0x5161(){var _0x4e90c0=['12296cftmaq','\x20init`\x20first.','2263355TlpxWi','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','5575722IpiiXD','global','14968017bhuZYJ','1kbNwdA','6380885kWjLok','750GOuJYn','1138818oKiPff','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','430872pHttqX'];a54_0x5161=function(){return _0x4e90c0;};return a54_0x5161();}
@@ -1 +1 @@
1
- const a55_0x395d71=a55_0x5f27;function a55_0x5f27(_0x2b9f83,_0x19b62a){_0x2b9f83=_0x2b9f83-0x1e4;const _0xb4e905=a55_0xb4e9();let _0x5f27b1=_0xb4e905[_0x2b9f83];return _0x5f27b1;}function a55_0xb4e9(){const _0x623b54=['JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','88GTWosL','3542793AduEaG','1bfJskz','552WqjEPg','5961720ZVhXgs','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','4009061ZkqlMn','155772sGVJJc','filter','5915742bprvgd','4070FuQVYX','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','476222ceuxVl','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)'];a55_0xb4e9=function(){return _0x623b54;};return a55_0xb4e9();}(function(_0x594795,_0x55e5b7){const _0x28e6d6=a55_0x5f27,_0x148dfe=_0x594795();while(!![]){try{const _0x226147=parseInt(_0x28e6d6(0x1ef))/0x1*(-parseInt(_0x28e6d6(0x1e9))/0x2)+parseInt(_0x28e6d6(0x1ee))/0x3+parseInt(_0x28e6d6(0x1ed))/0x4*(-parseInt(_0x28e6d6(0x1e7))/0x5)+parseInt(_0x28e6d6(0x1e6))/0x6+parseInt(_0x28e6d6(0x1f4))/0x7+parseInt(_0x28e6d6(0x1f0))/0x8*(-parseInt(_0x28e6d6(0x1e4))/0x9)+-parseInt(_0x28e6d6(0x1f1))/0xa;if(_0x226147===_0x55e5b7)break;else _0x148dfe['push'](_0x148dfe['shift']());}catch(_0x5c4aeb){_0x148dfe['push'](_0x148dfe['shift']());}}}(a55_0xb4e9,0xa93b0));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':'filter','operation':a55_0x395d71(0x1e5),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a55_0x395d71(0x1ec),'helpExtra':[a55_0x395d71(0x1f3),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a55_0x395d71(0x1e8),a55_0x395d71(0x1f2),a55_0x395d71(0x1eb),a55_0x395d71(0x1ea)]['join']('\x0a')});
1
+ const a55_0x5d32c9=a55_0xd595;function a55_0x649e(){const _0xfbd6be=['595396CvfLLR','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','6724398FLEyoB','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','3052844dNmfKF','85756EqGVOB','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','filter','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','856VEocQO','54061HeDqqA','102gFVFvk','59160nVEjjW','join','5LhxkDB','19472255vxbssq','18JopcrL'];a55_0x649e=function(){return _0xfbd6be;};return a55_0x649e();}(function(_0x315d15,_0x6e66c7){const _0x2ff941=a55_0xd595,_0x45e8c8=_0x315d15();while(!![]){try{const _0x2736ee=parseInt(_0x2ff941(0x79))/0x1+-parseInt(_0x2ff941(0x81))/0x2*(-parseInt(_0x2ff941(0x73))/0x3)+parseInt(_0x2ff941(0x80))/0x4*(parseInt(_0x2ff941(0x76))/0x5)+-parseInt(_0x2ff941(0x7d))/0x6+parseInt(_0x2ff941(0x72))/0x7*(parseInt(_0x2ff941(0x71))/0x8)+-parseInt(_0x2ff941(0x78))/0x9*(-parseInt(_0x2ff941(0x74))/0xa)+-parseInt(_0x2ff941(0x77))/0xb;if(_0x2736ee===_0x6e66c7)break;else _0x45e8c8['push'](_0x45e8c8['shift']());}catch(_0x223fe0){_0x45e8c8['push'](_0x45e8c8['shift']());}}}(a55_0x649e,0xba742));import{buildDataCommand}from'../../commands/data/shared.js';function a55_0xd595(_0x50cf6e,_0x4b4db4){_0x50cf6e=_0x50cf6e-0x6e;const _0x649e45=a55_0x649e();let _0xd595ab=_0x649e45[_0x50cf6e];return _0xd595ab;}export const dataFilter=buildDataCommand({'command':a55_0x5d32c9(0x6f),'operation':a55_0x5d32c9(0x6f),'description':a55_0x5d32c9(0x7c),'paramsRequired':![],'paramsHint':a55_0x5d32c9(0x7e),'helpExtra':[a55_0x5d32c9(0x70),a55_0x5d32c9(0x6e),a55_0x5d32c9(0x7a),a55_0x5d32c9(0x7b),a55_0x5d32c9(0x7f),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a55_0x5d32c9(0x75)]('\x0a')});
@@ -1 +1 @@
1
- function a56_0x1b81(_0xe85fd1,_0x30ef39){_0xe85fd1=_0xe85fd1-0xc0;const _0x3200e5=a56_0x3200();let _0x1b8179=_0x3200e5[_0xe85fd1];return _0x1b8179;}function a56_0x3200(){const _0x3869a5=['getOne','1973277fRgTBc','308zUnqSJ','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','371120AWNQBL','192464KDEABZ','13614KiIuJZ','44040EpDcbG','Get\x20a\x20single\x20record\x20by\x20ID','799047JhcUjV','356208FAJTDD','16sXNLcd'];a56_0x3200=function(){return _0x3869a5;};return a56_0x3200();}const a56_0xaae604=a56_0x1b81;(function(_0x262ca3,_0x4933c3){const _0x10b3e1=a56_0x1b81,_0x3de522=_0x262ca3();while(!![]){try{const _0x377a8f=-parseInt(_0x10b3e1(0xc5))/0x1+parseInt(_0x10b3e1(0xc6))/0x2+parseInt(_0x10b3e1(0xca))/0x3+-parseInt(_0x10b3e1(0xcb))/0x4+-parseInt(_0x10b3e1(0xc8))/0x5+-parseInt(_0x10b3e1(0xc7))/0x6*(parseInt(_0x10b3e1(0xc3))/0x7)+-parseInt(_0x10b3e1(0xc0))/0x8*(-parseInt(_0x10b3e1(0xc2))/0x9);if(_0x377a8f===_0x4933c3)break;else _0x3de522['push'](_0x3de522['shift']());}catch(_0x114a9b){_0x3de522['push'](_0x3de522['shift']());}}}(a56_0x3200,0x38b4f));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':'getOne','operation':a56_0xaae604(0xc1),'description':a56_0xaae604(0xc9),'paramsRequired':!![],'paramsHint':a56_0xaae604(0xc4)});
1
+ const a56_0x242b4d=a56_0x1fbe;(function(_0x459832,_0x576a28){const _0x5430c8=a56_0x1fbe,_0x279534=_0x459832();while(!![]){try{const _0x326f6f=-parseInt(_0x5430c8(0x173))/0x1+parseInt(_0x5430c8(0x178))/0x2*(parseInt(_0x5430c8(0x16e))/0x3)+-parseInt(_0x5430c8(0x16d))/0x4+-parseInt(_0x5430c8(0x171))/0x5*(parseInt(_0x5430c8(0x177))/0x6)+parseInt(_0x5430c8(0x172))/0x7*(parseInt(_0x5430c8(0x175))/0x8)+-parseInt(_0x5430c8(0x16f))/0x9+parseInt(_0x5430c8(0x176))/0xa;if(_0x326f6f===_0x576a28)break;else _0x279534['push'](_0x279534['shift']());}catch(_0x15da67){_0x279534['push'](_0x279534['shift']());}}}(a56_0x2948,0xbd54f));import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x1fbe(_0x3c582e,_0x458a4a){_0x3c582e=_0x3c582e-0x16d;const _0x294835=a56_0x2948();let _0x1fbe1f=_0x294835[_0x3c582e];return _0x1fbe1f;}function a56_0x2948(){const _0x10607e=['12PdplZP','4ADrStU','2635924tLpzxc','561579ZbiTst','1525158LPQYEl','getOne','337780sfHTCV','7ssfJbh','943803HvmtBv','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','1511352nUFcWl','21195560uVgFCa'];a56_0x2948=function(){return _0x10607e;};return a56_0x2948();}export const dataGetOne=buildDataCommand({'command':a56_0x242b4d(0x170),'operation':'getOne','description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a56_0x242b4d(0x174)});
@@ -1 +1 @@
1
- (function(_0x1520df,_0x48ac1f){const _0x8b8bbd=a57_0x1807,_0x525bed=_0x1520df();while(!![]){try{const _0xd797a7=-parseInt(_0x8b8bbd(0x1d4))/0x1*(-parseInt(_0x8b8bbd(0x1d9))/0x2)+-parseInt(_0x8b8bbd(0x1d7))/0x3+parseInt(_0x8b8bbd(0x1d3))/0x4*(parseInt(_0x8b8bbd(0x1d2))/0x5)+parseInt(_0x8b8bbd(0x1d0))/0x6*(-parseInt(_0x8b8bbd(0x1d6))/0x7)+parseInt(_0x8b8bbd(0x1d5))/0x8*(parseInt(_0x8b8bbd(0x1d1))/0x9)+parseInt(_0x8b8bbd(0x1db))/0xa*(-parseInt(_0x8b8bbd(0x1d8))/0xb)+parseInt(_0x8b8bbd(0x1da))/0xc;if(_0xd797a7===_0x48ac1f)break;else _0x525bed['push'](_0x525bed['shift']());}catch(_0x47dcb3){_0x525bed['push'](_0x525bed['shift']());}}}(a57_0x204c,0x3650b));import{dataFilter}from'../../commands/data/filter.js';function a57_0x1807(_0x1fc1f0,_0x33baad){_0x1fc1f0=_0x1fc1f0-0x1d0;const _0x204c46=a57_0x204c();let _0x18074c=_0x204c46[_0x1fc1f0];return _0x18074c;}function a57_0x204c(){const _0x35c0c8=['395UXxTsy','1192hNPSHF','1oKsQho','16qraEKE','23303LjnqKm','1062336GzGQBD','55EWuRom','519154fHJuWT','5647068YKrpYw','33100UPvxZt','462OBQjtr','430929IDMctI'];a57_0x204c=function(){return _0x35c0c8;};return a57_0x204c();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
1
+ (function(_0x243f62,_0xe02c89){const _0x24eb0c=a57_0x46a1,_0x2c2667=_0x243f62();while(!![]){try{const _0x472e65=-parseInt(_0x24eb0c(0x116))/0x1+-parseInt(_0x24eb0c(0x11d))/0x2+-parseInt(_0x24eb0c(0x11b))/0x3+parseInt(_0x24eb0c(0x11c))/0x4+-parseInt(_0x24eb0c(0x11a))/0x5+-parseInt(_0x24eb0c(0x119))/0x6*(parseInt(_0x24eb0c(0x117))/0x7)+parseInt(_0x24eb0c(0x118))/0x8;if(_0x472e65===_0xe02c89)break;else _0x2c2667['push'](_0x2c2667['shift']());}catch(_0x2ca18f){_0x2c2667['push'](_0x2c2667['shift']());}}}(a57_0x5c9d,0x2eaee));import{dataFilter}from'../../commands/data/filter.js';function a57_0x5c9d(){const _0x2de0ce=['372772mUEZfE','264908cDvkHY','365996NXrvYo','7uayNXt','11038480ASYskf','1985142HYmYxm','1214685ZiWuko','628635XhbZLf'];a57_0x5c9d=function(){return _0x2de0ce;};return a57_0x5c9d();}import{dataGetOne}from'../../commands/data/getOne.js';function a57_0x46a1(_0x4f5480,_0x276b5b){_0x4f5480=_0x4f5480-0x116;const _0x5c9dbf=a57_0x5c9d();let _0x46a14f=_0x5c9dbf[_0x4f5480];return _0x46a14f;}export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x47f093,_0x5e2657){const _0x99e1df=a58_0x51ce,_0x533c9b=_0x47f093();while(!![]){try{const _0x55814b=-parseInt(_0x99e1df(0xc8))/0x1+-parseInt(_0x99e1df(0xcd))/0x2*(-parseInt(_0x99e1df(0xc2))/0x3)+parseInt(_0x99e1df(0xcf))/0x4*(parseInt(_0x99e1df(0xd6))/0x5)+parseInt(_0x99e1df(0xc9))/0x6+parseInt(_0x99e1df(0xd2))/0x7*(parseInt(_0x99e1df(0xdb))/0x8)+parseInt(_0x99e1df(0xc4))/0x9*(-parseInt(_0x99e1df(0xd7))/0xa)+parseInt(_0x99e1df(0xd5))/0xb*(-parseInt(_0x99e1df(0xce))/0xc);if(_0x55814b===_0x5e2657)break;else _0x533c9b['push'](_0x533c9b['shift']());}catch(_0x1c3afe){_0x533c9b['push'](_0x533c9b['shift']());}}}(a58_0x3aa4,0x92fc0));import{executeDatasetDataOperation}from'../../core/api-client.js';function a58_0x51ce(_0x4feda6,_0x48ae34){_0x4feda6=_0x4feda6-0xc0;const _0x3aa408=a58_0x3aa4();let _0x51ce1f=_0x3aa408[_0x4feda6];return _0x51ce1f;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a58_0x3aa4(){const _0x3a0346=['params','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','data','operation','403023FfQHEH','flagMissing','233397ftOEvl','appCode','validation','helpExtra','211061AMHAJP','4082670dBUvxK','paramsRequired','compress','paramsHint','2HTBFOU','702468QWohiX','12xIpGVu','\x20completed\x20in\x20','getOne','841022OpGGuI','alias','string','77SSfhLu','987085wggfrd','210oWMMEb','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','str','now','24YyYImY','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'];a58_0x3aa4=function(){return _0x3a0346;};return a58_0x3aa4();}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x55313f){const _0x54c994=a58_0x51ce;if(!_0x55313f)throw CliErrors[_0x54c994(0xc3)](_0x54c994(0xdd),_0x54c994(0xde));const _0x3d3996=_0x55313f['id'];if(_0x3d3996===undefined||_0x3d3996===null||_0x3d3996==='')throw CliErrors[_0x54c994(0xc6)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x54c994(0xd8));}function parseCommandParams(_0x52330a){return parseJsonParams(_0x52330a)??{};}export function buildDataCommand(_0xc88528){const _0x9656f7=a58_0x51ce,_0x4f2e67=_0x9656f7(0xdc);return{'service':_0x9656f7(0xc0),'command':_0xc88528['command'],'description':_0xc88528['description'],'risk':'read','defaultOutputFormat':_0x9656f7(0xcb),'helpExtra':_0xc88528[_0x9656f7(0xc7)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x9656f7(0xd3),'type':_0x9656f7(0xd4),'description':_0x4f2e67},{'name':_0x9656f7(0xdd),'type':'string','description':_0xc88528[_0x9656f7(0xcc)]}],async 'validate'(_0x6c17ac){const _0x348eed=_0x9656f7,_0x444ff0=_0x6c17ac[_0x348eed(0xd9)](_0x348eed(0xdd));if(_0xc88528[_0x348eed(0xca)]&&!_0x444ff0)throw CliErrors[_0x348eed(0xc3)](_0x348eed(0xdd),_0xc88528[_0x348eed(0xcc)]);const _0x403731=parseJsonParams(_0x444ff0);_0xc88528[_0x348eed(0xc1)]===_0x348eed(0xd1)&&assertGetOneId(_0x403731);},async 'execute'(_0xf0951d){const _0x28e8e9=_0x9656f7,_0x366b33=parseCommandParams(_0xf0951d[_0x28e8e9(0xd9)](_0x28e8e9(0xdd))),_0x5f5386=Date[_0x28e8e9(0xda)](),_0x47de78=await executeDatasetDataOperation(_0xf0951d[_0x28e8e9(0xc5)],_0xf0951d[_0x28e8e9(0xd9)]('code'),_0xc88528[_0x28e8e9(0xc1)],_0x366b33),_0x3a354f=Date[_0x28e8e9(0xda)]()-_0x5f5386;return{'ok':!![],'data':{'result':_0x47de78,'elapsed':_0x3a354f},'message':'data\x20'+_0xc88528['command']+_0x28e8e9(0xd0)+_0x3a354f+'ms'};}};}
1
+ (function(_0x36b0b9,_0x2c6f75){const _0x4e0200=a58_0x4361,_0x5f339c=_0x36b0b9();while(!![]){try{const _0x1986d3=-parseInt(_0x4e0200(0x110))/0x1*(parseInt(_0x4e0200(0x11d))/0x2)+parseInt(_0x4e0200(0x11c))/0x3*(-parseInt(_0x4e0200(0x11b))/0x4)+-parseInt(_0x4e0200(0x10c))/0x5+-parseInt(_0x4e0200(0x108))/0x6+-parseInt(_0x4e0200(0x116))/0x7+-parseInt(_0x4e0200(0x10a))/0x8*(-parseInt(_0x4e0200(0x10b))/0x9)+parseInt(_0x4e0200(0x10d))/0xa;if(_0x1986d3===_0x2c6f75)break;else _0x5f339c['push'](_0x5f339c['shift']());}catch(_0x2a781d){_0x5f339c['push'](_0x5f339c['shift']());}}}(a58_0x2294,0x54a13));function a58_0x4361(_0x103b4d,_0x2359ed){_0x103b4d=_0x103b4d-0x102;const _0x229410=a58_0x2294();let _0x4361b8=_0x229410[_0x103b4d];return _0x4361b8;}function a58_0x2294(){const _0x2be7e8=['data\x20','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','4194211GjnAIP','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','str','params','now','762616JZLlFZ','3SGKIrJ','80042kGEGbQ','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','data','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','operation','command','paramsRequired','alias','3260310LlzDoN','string','1576zcGFZL','25353laKoEc','838935QjSdmb','15728400GCpPkz','description','paramsHint','7HxnWnR','validation','flagMissing','getOne'];a58_0x2294=function(){return _0x2be7e8;};return a58_0x2294();}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x57b731){const _0x59bf59=a58_0x4361;if(!_0x57b731)throw CliErrors['flagMissing']('params',_0x59bf59(0x117));const _0xbd7732=_0x57b731['id'];if(_0xbd7732===undefined||_0xbd7732===null||_0xbd7732==='')throw CliErrors[_0x59bf59(0x111)](_0x59bf59(0x103),_0x59bf59(0x115));}function parseCommandParams(_0x2d9143){return parseJsonParams(_0x2d9143)??{};}export function buildDataCommand(_0x478e61){const _0x394534=a58_0x4361,_0x47bfe1=_0x394534(0x11e);return{'service':_0x394534(0x102),'command':_0x478e61[_0x394534(0x105)],'description':_0x478e61[_0x394534(0x10e)],'risk':'read','defaultOutputFormat':'compress','helpExtra':_0x478e61['helpExtra'],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x394534(0x107),'type':_0x394534(0x109),'description':_0x47bfe1},{'name':_0x394534(0x119),'type':_0x394534(0x109),'description':_0x478e61[_0x394534(0x10f)]}],async 'validate'(_0x2946b4){const _0xbaa7cd=_0x394534,_0x537ac2=_0x2946b4[_0xbaa7cd(0x118)]('params');if(_0x478e61[_0xbaa7cd(0x106)]&&!_0x537ac2)throw CliErrors[_0xbaa7cd(0x112)](_0xbaa7cd(0x119),_0x478e61[_0xbaa7cd(0x10f)]);const _0x239bb1=parseJsonParams(_0x537ac2);_0x478e61[_0xbaa7cd(0x104)]===_0xbaa7cd(0x113)&&assertGetOneId(_0x239bb1);},async 'execute'(_0x53bc91){const _0x5f29c4=_0x394534,_0x4d5f47=parseCommandParams(_0x53bc91['str'](_0x5f29c4(0x119))),_0x106aa8=Date['now'](),_0x145d2b=await executeDatasetDataOperation(_0x53bc91['appCode'],_0x53bc91[_0x5f29c4(0x118)]('code'),_0x478e61['operation'],_0x4d5f47),_0x248a6d=Date[_0x5f29c4(0x11a)]()-_0x106aa8;return{'ok':!![],'data':{'result':_0x145d2b,'elapsed':_0x248a6d},'message':_0x5f29c4(0x114)+_0x478e61['command']+'\x20completed\x20in\x20'+_0x248a6d+'ms'};}};}
@@ -1 +1 @@
1
- const a59_0x573762=a59_0x51e6;(function(_0x1e4adb,_0x3166c8){const _0x2ce986=a59_0x51e6,_0xbb917c=_0x1e4adb();while(!![]){try{const _0x33044f=parseInt(_0x2ce986(0x183))/0x1*(-parseInt(_0x2ce986(0x19b))/0x2)+parseInt(_0x2ce986(0x189))/0x3+-parseInt(_0x2ce986(0x193))/0x4*(-parseInt(_0x2ce986(0x1a8))/0x5)+parseInt(_0x2ce986(0x1a0))/0x6+parseInt(_0x2ce986(0x19a))/0x7*(parseInt(_0x2ce986(0x17d))/0x8)+parseInt(_0x2ce986(0x191))/0x9*(parseInt(_0x2ce986(0x19c))/0xa)+parseInt(_0x2ce986(0x198))/0xb*(-parseInt(_0x2ce986(0x195))/0xc);if(_0x33044f===_0x3166c8)break;else _0xbb917c['push'](_0xbb917c['shift']());}catch(_0x554fa9){_0xbb917c['push'](_0xbb917c['shift']());}}}(a59_0x1520,0x3897f));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x573762(0x1a1);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x13ad91,input:_0x52e7f4,dryRun:_0x4cfdec}){const _0x2c4e96=a59_0x573762;validateInput(_0x52e7f4);const _0x58711e=normalizeBusinessGroup(_0x52e7f4[_0x2c4e96(0x178)]),_0x781a41=await getDatasetDetail(_0x52e7f4[_0x2c4e96(0x187)]),_0x49ff75=resolveBusinessGroupDataset(_0x781a41,_0x52e7f4[_0x2c4e96(0x187)]),_0x13d53a=loadCurrentBusinessGroup(_0x781a41,_0x49ff75);assertExpectedBusinessGroup(_0x13d53a,_0x52e7f4[_0x2c4e96(0x17e)]);const _0x44f754=buildBackendPayload(_0x13ad91,_0x49ff75,_0x58711e),_0x5519d9=_0x13d53a!==_0x58711e;let _0x5ccb48;if(_0x5519d9&&!_0x4cfdec){await updateErBusinessGroup(_0x44f754);const _0x295214=await getDatasetDetail(_0x49ff75[_0x2c4e96(0x187)]),_0x263e90=resolveBusinessGroupDataset(_0x295214,_0x49ff75[_0x2c4e96(0x187)]),_0x3e319f=loadCurrentBusinessGroup(_0x295214,_0x263e90);if(_0x3e319f!==_0x58711e)throw CliErrors[_0x2c4e96(0x1aa)](_0x2c4e96(0x17c),_0x2c4e96(0x185)+JSON[_0x2c4e96(0x1b5)](_0x58711e)+_0x2c4e96(0x18c)+JSON['stringify'](_0x3e319f)+'.');_0x5ccb48={'verified':!![],'status':_0x2c4e96(0x1b6),'afterReadback':{'businessGroup':_0x3e319f}};}else!_0x5519d9&&(_0x5ccb48={'verified':!![],'status':_0x2c4e96(0x1b0),'afterReadback':{'businessGroup':_0x13d53a}});const _0x5b7397={'operation':_0x2c4e96(0x194),'appCode':_0x13ad91,'selector':{'code':_0x49ff75[_0x2c4e96(0x187)]},'dataset':_0x49ff75,'before':{'businessGroup':_0x13d53a},'after':{'businessGroup':_0x58711e},'changed':_0x5519d9,'dryRun':_0x4cfdec,'submitted':_0x5519d9&&!_0x4cfdec,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x44f754},..._0x5ccb48?{'verification':_0x5ccb48}:{},'warnings':[]};return{'ok':!![],'data':_0x5b7397,'message':_0x5519d9?_0x4cfdec?_0x2c4e96(0x1ac)+_0x49ff75[_0x2c4e96(0x187)]:_0x2c4e96(0x18b)+_0x49ff75[_0x2c4e96(0x187)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x49ff75[_0x2c4e96(0x187)]};}export const datasetBusinessGroupUpdate={'service':a59_0x573762(0x177),'command':a59_0x573762(0x1a7),'description':'Update\x20business\x20scenario\x20group','risk':a59_0x573762(0x192),'flags':[CODE_FLAG,{'name':'business-group','type':a59_0x573762(0x1b8),'required':!![],'description':a59_0x573762(0x1a3)},{'name':a59_0x573762(0x199),'type':a59_0x573762(0x1b8),'required':![],'description':a59_0x573762(0x1a9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x562ff0){validateInput(readBusinessGroupUpdateInput(_0x562ff0));},async 'dryRun'(_0x11f3d6){const _0x1dcba6=a59_0x573762,_0x27394b=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x11f3d6[_0x1dcba6(0x1b7)],'input':readBusinessGroupUpdateInput(_0x11f3d6),'dryRun':!![]});return{'method':'POST','url':BACKEND_PATH,'body':_0x27394b[_0x1dcba6(0x1b4)][_0x1dcba6(0x180)]['payload'],'description':_0x27394b['message'],..._0x27394b[_0x1dcba6(0x1b4)]};},async 'execute'(_0x3209ba){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3209ba['appCode'],'input':readBusinessGroupUpdateInput(_0x3209ba),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1efd5e){const _0x13be2c=a59_0x573762,_0x89f73a=_0x1efd5e[_0x13be2c(0x1ab)](_0x13be2c(0x199));return{'code':trim(_0x1efd5e['str'](_0x13be2c(0x187))),'businessGroup':_0x1efd5e[_0x13be2c(0x1ab)](_0x13be2c(0x17a)),'expectBusinessGroup':_0x89f73a===undefined||_0x89f73a===''?undefined:_0x89f73a};}function validateInput(_0x40384a){const _0x2c613a=a59_0x573762;if(!trim(_0x40384a[_0x2c613a(0x187)]))throw CliErrors[_0x2c613a(0x190)](_0x2c613a(0x19e));if(_0x40384a[_0x2c613a(0x178)]===undefined)throw CliErrors[_0x2c613a(0x190)](_0x2c613a(0x17f));}function resolveBusinessGroupDataset(_0xc0668a,_0x316150){const _0x5f0096=a59_0x573762,_0x59a517=asPlainObject(_0xc0668a[_0x5f0096(0x177)]),_0x487ea0=asPlainObject(_0xc0668a[_0x5f0096(0x1ae)]),_0x278b4a=resolveSourceType(_0xc0668a,_0x59a517,_0x487ea0),_0x5b701f=firstString(_0xc0668a[_0x5f0096(0x17b)],_0xc0668a['code'],_0x59a517['datasetCode'],_0x316150)||_0x316150;return{'id':firstNumber(_0xc0668a[_0x5f0096(0x19d)],_0xc0668a['id'],_0x59a517['datasetId'])??firstString(_0xc0668a[_0x5f0096(0x19d)],_0xc0668a['id'],_0x59a517[_0x5f0096(0x1b3)])??null,'code':_0x5b701f,'name':firstString(_0xc0668a['name'],_0x59a517[_0x5f0096(0x1b1)],_0x59a517[_0x5f0096(0x197)])||null,'sourceType':_0x278b4a};}function resolveSourceType(_0x4d4d4c,_0x2dcc4c,_0xc81496){const _0x1abfea=a59_0x573762,_0x1b6069=firstString(_0x4d4d4c['source'],_0x4d4d4c[_0x1abfea(0x188)],_0x2dcc4c[_0x1abfea(0x18d)],_0x2dcc4c[_0x1abfea(0x188)])?.[_0x1abfea(0x18a)]()[_0x1abfea(0x196)]();if(_0x1b6069===_0x1abfea(0x1b2)||_0x1b6069===_0x1abfea(0x1af))return _0x1b6069;if(Object['keys'](_0xc81496)[_0x1abfea(0x1a5)]>0x0)return _0x1abfea(0x1b2);throw CliErrors[_0x1abfea(0x190)](_0x1abfea(0x18f));}function loadCurrentBusinessGroup(_0xd40356,_0x59907f){const _0x1acfbc=a59_0x573762,_0x1e721b=readBusinessGroupFromDatasetDetail(_0xd40356,_0x59907f['sourceType']);if(_0x1e721b['found'])return normalizeBusinessGroup(_0x1e721b[_0x1acfbc(0x1b9)]);if(_0x59907f['sourceType']===_0x1acfbc(0x1af))return'';throw CliErrors['validation'](_0x1acfbc(0x19f),_0x1acfbc(0x184));}function readBusinessGroupFromDatasetDetail(_0x34b7f5,_0x40f9d2){const _0x26306f=a59_0x573762,_0x312e0c=asPlainObject(_0x34b7f5[_0x26306f(0x177)]),_0x521366=firstPresent(_0x34b7f5[_0x26306f(0x178)]);if(_0x521366[_0x26306f(0x1a6)])return _0x521366;const _0x3e281e=firstPresent(_0x312e0c[_0x26306f(0x178)]);if(_0x3e281e[_0x26306f(0x1a6)])return _0x3e281e;if(_0x40f9d2===_0x26306f(0x1b2))return{'found':![]};const _0x2cedf0=readBusinessGroupFromExtend(_0x34b7f5[_0x26306f(0x182)]);if(_0x2cedf0[_0x26306f(0x1a6)])return _0x2cedf0;return readBusinessGroupFromExtend(_0x312e0c[_0x26306f(0x182)]);}function readBusinessGroupFromExtend(_0x2a0eb8){const _0x5f3505=a59_0x573762;if(_0x2a0eb8===undefined||_0x2a0eb8===null||_0x2a0eb8==='')return{'found':![]};if(typeof _0x2a0eb8==='string')try{const _0x5d97e6=JSON[_0x5f3505(0x1a4)](_0x2a0eb8);return readBusinessGroupFromExtend(_0x5d97e6);}catch{return{'found':![]};}const _0x1f5149=asPlainObject(_0x2a0eb8);if(Object[_0x5f3505(0x18e)][_0x5f3505(0x1a2)]['call'](_0x1f5149,_0x5f3505(0x178)))return{'found':!![],'value':_0x1f5149['businessGroup']};return{'found':![]};}function firstPresent(..._0x390277){for(const _0x2ab294 of _0x390277){if(_0x2ab294!==undefined&&_0x2ab294!==null)return{'found':!![],'value':_0x2ab294};}return{'found':![]};}function a59_0x51e6(_0x517def,_0x12aece){_0x517def=_0x517def-0x177;const _0x152010=a59_0x1520();let _0x51e6a7=_0x152010[_0x517def];return _0x51e6a7;}function assertExpectedBusinessGroup(_0x510371,_0x4a2fe8){const _0x458db5=a59_0x573762;if(_0x4a2fe8===undefined)return;const _0x3babda=normalizeBusinessGroup(_0x4a2fe8);if(_0x510371!==_0x3babda)throw CliErrors[_0x458db5(0x190)](_0x458db5(0x181),_0x458db5(0x185)+JSON[_0x458db5(0x1b5)](_0x3babda)+_0x458db5(0x18c)+JSON[_0x458db5(0x1b5)](_0x510371));}function buildBackendPayload(_0xbc4da2,_0x3d05e9,_0x1931c2){return{'appCode':_0xbc4da2,'datasetCode':_0x3d05e9['code'],'businessGroup':_0x1931c2};}function normalizeBusinessGroup(_0x2eb097){const _0xb3f69d=a59_0x573762;if(_0x2eb097===undefined||_0x2eb097===null)return'';return String(_0x2eb097)[_0xb3f69d(0x18a)]();}function a59_0x1520(){const _0x5c041d=['name','22jSHQpa','expect-business-group','14PVqwxp','522iSYPSJ','10qxUGkq','modelId','--code\x20is\x20required','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','1532664gWXjgJ','/smartapi/question/er-config/business-group/edit','hasOwnProperty','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','parse','length','found','business-group-update','3155sIqXHX','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','apiError','str','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','isArray','dbtableConfig','METADATA','unchanged','datasetName','DB_TABLE','datasetId','data','stringify','matched','appCode','string','value','dataset','businessGroup','number','business-group','modelCode','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','1348912XrJijW','expectBusinessGroup','--business-group\x20is\x20required','backend','Expectation\x20mismatch\x20at\x20businessGroup','extend','374BPNgaX','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','Expected\x20','object','code','sourceType','32745ArHCKP','trim','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20',',\x20actual\x20','source','prototype','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','validation','108855HXZQCK','write','2572VXFuJD','update','4151964peujRg','toUpperCase'];a59_0x1520=function(){return _0x5c041d;};return a59_0x1520();}function asPlainObject(_0x44e1a6){const _0x1bd6dc=a59_0x573762;if(!_0x44e1a6||typeof _0x44e1a6!==_0x1bd6dc(0x186)||Array[_0x1bd6dc(0x1ad)](_0x44e1a6))return{};return _0x44e1a6;}function firstString(..._0x1e632d){const _0x5bcb36=a59_0x573762;for(const _0x20f21a of _0x1e632d){if(typeof _0x20f21a==='string'&&_0x20f21a['trim']())return _0x20f21a[_0x5bcb36(0x18a)]();if(typeof _0x20f21a==='number'&&Number['isFinite'](_0x20f21a))return String(_0x20f21a);}return undefined;}function firstNumber(..._0x45efa4){const _0x47b882=a59_0x573762;for(const _0x3d9689 of _0x45efa4){if(typeof _0x3d9689===_0x47b882(0x179)&&Number['isFinite'](_0x3d9689))return _0x3d9689;if(typeof _0x3d9689===_0x47b882(0x1b8)&&_0x3d9689[_0x47b882(0x18a)]()&&Number['isFinite'](Number(_0x3d9689)))return Number(_0x3d9689);}return null;}function trim(_0x512892){const _0x51ad70=a59_0x573762;return String(_0x512892||'')[_0x51ad70(0x18a)]();}
1
+ const a59_0x42b763=a59_0x5bb2;(function(_0x2110e5,_0x1decd4){const _0x2f4667=a59_0x5bb2,_0x5dca77=_0x2110e5();while(!![]){try{const _0x1a731d=parseInt(_0x2f4667(0xe2))/0x1+-parseInt(_0x2f4667(0xf0))/0x2+-parseInt(_0x2f4667(0xe4))/0x3*(parseInt(_0x2f4667(0xdb))/0x4)+-parseInt(_0x2f4667(0xe7))/0x5*(parseInt(_0x2f4667(0xfd))/0x6)+-parseInt(_0x2f4667(0xe1))/0x7*(parseInt(_0x2f4667(0xe3))/0x8)+parseInt(_0x2f4667(0xe5))/0x9*(parseInt(_0x2f4667(0xc8))/0xa)+parseInt(_0x2f4667(0xfa))/0xb;if(_0x1a731d===_0x1decd4)break;else _0x5dca77['push'](_0x5dca77['shift']());}catch(_0x5c4f8e){_0x5dca77['push'](_0x5dca77['shift']());}}}(a59_0x3ed2,0x28c66));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x42b763(0xde);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x9f7c94,input:_0x2a85d3,dryRun:_0xc61dce}){const _0x2ac591=a59_0x42b763;validateInput(_0x2a85d3);const _0x18fb62=normalizeBusinessGroup(_0x2a85d3[_0x2ac591(0xc1)]),_0x45fa5d=await getDatasetDetail(_0x2a85d3[_0x2ac591(0xe6)]),_0x39f774=resolveBusinessGroupDataset(_0x45fa5d,_0x2a85d3[_0x2ac591(0xe6)]),_0x2069f9=loadCurrentBusinessGroup(_0x45fa5d,_0x39f774);assertExpectedBusinessGroup(_0x2069f9,_0x2a85d3[_0x2ac591(0xbf)]);const _0xca3382=buildBackendPayload(_0x9f7c94,_0x39f774,_0x18fb62),_0xfb51de=_0x2069f9!==_0x18fb62;let _0x15f375;if(_0xfb51de&&!_0xc61dce){await updateErBusinessGroup(_0xca3382);const _0x1fc8bd=await getDatasetDetail(_0x39f774['code']),_0x2e7fb5=resolveBusinessGroupDataset(_0x1fc8bd,_0x39f774[_0x2ac591(0xe6)]),_0x27699f=loadCurrentBusinessGroup(_0x1fc8bd,_0x2e7fb5);if(_0x27699f!==_0x18fb62)throw CliErrors['apiError'](_0x2ac591(0xcf),_0x2ac591(0xf3)+JSON[_0x2ac591(0xe0)](_0x18fb62)+_0x2ac591(0xee)+JSON[_0x2ac591(0xe0)](_0x27699f)+'.');_0x15f375={'verified':!![],'status':_0x2ac591(0xf6),'afterReadback':{'businessGroup':_0x27699f}};}else!_0xfb51de&&(_0x15f375={'verified':!![],'status':_0x2ac591(0xdc),'afterReadback':{'businessGroup':_0x2069f9}});const _0x3a69a3={'operation':_0x2ac591(0xf1),'appCode':_0x9f7c94,'selector':{'code':_0x39f774['code']},'dataset':_0x39f774,'before':{'businessGroup':_0x2069f9},'after':{'businessGroup':_0x18fb62},'changed':_0xfb51de,'dryRun':_0xc61dce,'submitted':_0xfb51de&&!_0xc61dce,'backend':{'method':_0x2ac591(0xc2),'path':BACKEND_PATH,'payload':_0xca3382},..._0x15f375?{'verification':_0x15f375}:{},'warnings':[]};return{'ok':!![],'data':_0x3a69a3,'message':_0xfb51de?_0xc61dce?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x39f774['code']:_0x2ac591(0xfb)+_0x39f774[_0x2ac591(0xe6)]:_0x2ac591(0xda)+_0x39f774[_0x2ac591(0xe6)]};}export const datasetBusinessGroupUpdate={'service':a59_0x42b763(0xd7),'command':a59_0x42b763(0xf7),'description':a59_0x42b763(0xe8),'risk':a59_0x42b763(0xc0),'flags':[CODE_FLAG,{'name':a59_0x42b763(0xf5),'type':'string','required':!![],'description':a59_0x42b763(0xc4)},{'name':a59_0x42b763(0xbe),'type':a59_0x42b763(0xcd),'required':![],'description':a59_0x42b763(0xd9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x24368d){validateInput(readBusinessGroupUpdateInput(_0x24368d));},async 'dryRun'(_0x585850){const _0x2f4333=a59_0x42b763,_0x3e421d=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x585850['appCode'],'input':readBusinessGroupUpdateInput(_0x585850),'dryRun':!![]});return{'method':_0x2f4333(0xc2),'url':BACKEND_PATH,'body':_0x3e421d['data'][_0x2f4333(0xe9)][_0x2f4333(0xc3)],'description':_0x3e421d[_0x2f4333(0xf9)],..._0x3e421d['data']};},async 'execute'(_0x1277fc){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1277fc['appCode'],'input':readBusinessGroupUpdateInput(_0x1277fc),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x556be9){const _0x12a9c4=a59_0x42b763,_0xe121f5=_0x556be9['str'](_0x12a9c4(0xbe));return{'code':trim(_0x556be9[_0x12a9c4(0xdd)](_0x12a9c4(0xe6))),'businessGroup':_0x556be9['str'](_0x12a9c4(0xf5)),'expectBusinessGroup':_0xe121f5===undefined||_0xe121f5===''?undefined:_0xe121f5};}function validateInput(_0x31f3f8){const _0x306499=a59_0x42b763;if(!trim(_0x31f3f8[_0x306499(0xe6)]))throw CliErrors[_0x306499(0xf4)](_0x306499(0xd5));if(_0x31f3f8[_0x306499(0xc1)]===undefined)throw CliErrors['validation']('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x3d27f1,_0x19fc3f){const _0x3330e5=a59_0x42b763,_0x1b9c69=asPlainObject(_0x3d27f1[_0x3330e5(0xd7)]),_0x3e8632=asPlainObject(_0x3d27f1[_0x3330e5(0xf8)]),_0x554f87=resolveSourceType(_0x3d27f1,_0x1b9c69,_0x3e8632),_0x1a9400=firstString(_0x3d27f1[_0x3330e5(0xfe)],_0x3d27f1[_0x3330e5(0xe6)],_0x1b9c69[_0x3330e5(0xca)],_0x19fc3f)||_0x19fc3f;return{'id':firstNumber(_0x3d27f1[_0x3330e5(0xce)],_0x3d27f1['id'],_0x1b9c69[_0x3330e5(0xff)])??firstString(_0x3d27f1[_0x3330e5(0xce)],_0x3d27f1['id'],_0x1b9c69[_0x3330e5(0xff)])??null,'code':_0x1a9400,'name':firstString(_0x3d27f1[_0x3330e5(0xd2)],_0x1b9c69[_0x3330e5(0xc9)],_0x1b9c69[_0x3330e5(0xd2)])||null,'sourceType':_0x554f87};}function resolveSourceType(_0x4fb4a4,_0x1ec2f5,_0x118996){const _0x26d440=a59_0x42b763,_0x49d840=firstString(_0x4fb4a4['source'],_0x4fb4a4[_0x26d440(0xc6)],_0x1ec2f5[_0x26d440(0xd4)],_0x1ec2f5[_0x26d440(0xc6)])?.[_0x26d440(0xed)]()[_0x26d440(0xd6)]();if(_0x49d840===_0x26d440(0xef)||_0x49d840==='METADATA')return _0x49d840;if(Object[_0x26d440(0xf2)](_0x118996)[_0x26d440(0xd1)]>0x0)return _0x26d440(0xef);throw CliErrors[_0x26d440(0xf4)](_0x26d440(0xc5));}function loadCurrentBusinessGroup(_0x30ba84,_0x286d7a){const _0x200ed7=a59_0x42b763,_0x3a0837=readBusinessGroupFromDatasetDetail(_0x30ba84,_0x286d7a[_0x200ed7(0xc6)]);if(_0x3a0837[_0x200ed7(0xcb)])return normalizeBusinessGroup(_0x3a0837[_0x200ed7(0xd3)]);if(_0x286d7a[_0x200ed7(0xc6)]==='METADATA')return'';throw CliErrors[_0x200ed7(0xf4)](_0x200ed7(0xc7),'Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x516d8b,_0xcde084){const _0x2cb0be=a59_0x42b763,_0x3380e9=asPlainObject(_0x516d8b[_0x2cb0be(0xd7)]),_0xd49b9e=firstPresent(_0x516d8b['businessGroup']);if(_0xd49b9e['found'])return _0xd49b9e;const _0x404fbe=firstPresent(_0x3380e9[_0x2cb0be(0xc1)]);if(_0x404fbe['found'])return _0x404fbe;if(_0xcde084===_0x2cb0be(0xef))return{'found':![]};const _0x37d6b8=readBusinessGroupFromExtend(_0x516d8b[_0x2cb0be(0xd8)]);if(_0x37d6b8[_0x2cb0be(0xcb)])return _0x37d6b8;return readBusinessGroupFromExtend(_0x3380e9[_0x2cb0be(0xd8)]);}function readBusinessGroupFromExtend(_0x665974){const _0x11108f=a59_0x42b763;if(_0x665974===undefined||_0x665974===null||_0x665974==='')return{'found':![]};if(typeof _0x665974==='string')try{const _0x27d4e2=JSON[_0x11108f(0xd0)](_0x665974);return readBusinessGroupFromExtend(_0x27d4e2);}catch{return{'found':![]};}const _0x92c904=asPlainObject(_0x665974);if(Object[_0x11108f(0xcc)][_0x11108f(0xec)][_0x11108f(0xea)](_0x92c904,_0x11108f(0xc1)))return{'found':!![],'value':_0x92c904[_0x11108f(0xc1)]};return{'found':![]};}function a59_0x5bb2(_0x23a426,_0x2a01ad){_0x23a426=_0x23a426-0xbe;const _0x3ed2b0=a59_0x3ed2();let _0x5bb263=_0x3ed2b0[_0x23a426];return _0x5bb263;}function firstPresent(..._0x31dd91){for(const _0x777e90 of _0x31dd91){if(_0x777e90!==undefined&&_0x777e90!==null)return{'found':!![],'value':_0x777e90};}return{'found':![]};}function assertExpectedBusinessGroup(_0x37d15c,_0x4ff6eb){const _0x557d1d=a59_0x42b763;if(_0x4ff6eb===undefined)return;const _0x15ff4c=normalizeBusinessGroup(_0x4ff6eb);if(_0x37d15c!==_0x15ff4c)throw CliErrors[_0x557d1d(0xf4)](_0x557d1d(0xdf),_0x557d1d(0xf3)+JSON[_0x557d1d(0xe0)](_0x15ff4c)+_0x557d1d(0xee)+JSON[_0x557d1d(0xe0)](_0x37d15c));}function buildBackendPayload(_0x5778da,_0x182efb,_0x312c62){return{'appCode':_0x5778da,'datasetCode':_0x182efb['code'],'businessGroup':_0x312c62};}function normalizeBusinessGroup(_0x3a1784){const _0x2a05fa=a59_0x42b763;if(_0x3a1784===undefined||_0x3a1784===null)return'';return String(_0x3a1784)[_0x2a05fa(0xed)]();}function a59_0x3ed2(){const _0x4a107a=['matched','business-group-update','dbtableConfig','message','8581122PLwIje','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','isFinite','372630KKZSfL','modelCode','datasetId','expect-business-group','expectBusinessGroup','write','businessGroup','POST','payload','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','sourceType','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','20veCsOb','datasetName','datasetCode','found','prototype','string','modelId','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','parse','length','name','value','source','--code\x20is\x20required','toUpperCase','dataset','extend','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','8CfIHSv','unchanged','str','/smartapi/question/er-config/business-group/edit','Expectation\x20mismatch\x20at\x20businessGroup','stringify','363867IpvRCU','98151fcUWzb','48xrtUbL','407238baClUe','1011915jEtFmc','code','20GFWppy','Update\x20business\x20scenario\x20group','backend','call','number','hasOwnProperty','trim',',\x20actual\x20','DB_TABLE','208622xGAxLQ','update','keys','Expected\x20','validation','business-group'];a59_0x3ed2=function(){return _0x4a107a;};return a59_0x3ed2();}function asPlainObject(_0x45f3af){if(!_0x45f3af||typeof _0x45f3af!=='object'||Array['isArray'](_0x45f3af))return{};return _0x45f3af;}function firstString(..._0xdba7fd){const _0x14c9da=a59_0x42b763;for(const _0xecd2cc of _0xdba7fd){if(typeof _0xecd2cc===_0x14c9da(0xcd)&&_0xecd2cc['trim']())return _0xecd2cc[_0x14c9da(0xed)]();if(typeof _0xecd2cc===_0x14c9da(0xeb)&&Number[_0x14c9da(0xfc)](_0xecd2cc))return String(_0xecd2cc);}return undefined;}function firstNumber(..._0x58e767){const _0x47cef5=a59_0x42b763;for(const _0xf064f of _0x58e767){if(typeof _0xf064f==='number'&&Number[_0x47cef5(0xfc)](_0xf064f))return _0xf064f;if(typeof _0xf064f===_0x47cef5(0xcd)&&_0xf064f['trim']()&&Number[_0x47cef5(0xfc)](Number(_0xf064f)))return Number(_0xf064f);}return null;}function trim(_0x4bb738){const _0x4eb06c=a59_0x42b763;return String(_0x4bb738||'')[_0x4eb06c(0xed)]();}
@@ -1,2 +1,2 @@
1
1
  import type { CommandDefinition } from "../../framework/types.js";
2
- export declare const permitDefinitions: CommandDefinition[];
2
+ export declare const datasetBusinessGroups: CommandDefinition;
@@ -0,0 +1 @@
1
+ function a60_0xbef5(){const _0xc83b24=['read','23620ctnZNf','length','\x20business\x20group(s)\x20for\x20database\x20connection\x20','788bYtbyo','Found\x20','14120wIACZw','454eNhAuA','dataset','groups','2912769MCjYLO','33616SwkxmO','business-groups','num','number','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','appCode','4819voYugI','2439930DkVAxS','8koXWYK','dbid','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','12988395gwNqHj','6016591VbTqeF'];a60_0xbef5=function(){return _0xc83b24;};return a60_0xbef5();}const a60_0x4b7c1d=a60_0x1418;(function(_0x47a512,_0x25f7c3){const _0xe4f142=a60_0x1418,_0x2624ed=_0x47a512();while(!![]){try{const _0x18f636=parseInt(_0xe4f142(0x16c))/0x1*(parseInt(_0xe4f142(0x162))/0x2)+-parseInt(_0xe4f142(0x165))/0x3+-parseInt(_0xe4f142(0x15f))/0x4*(parseInt(_0xe4f142(0x174))/0x5)+-parseInt(_0xe4f142(0x16d))/0x6+parseInt(_0xe4f142(0x172))/0x7*(-parseInt(_0xe4f142(0x16e))/0x8)+-parseInt(_0xe4f142(0x171))/0x9+parseInt(_0xe4f142(0x161))/0xa*(parseInt(_0xe4f142(0x166))/0xb);if(_0x18f636===_0x25f7c3)break;else _0x2624ed['push'](_0x2624ed['shift']());}catch(_0x1940f9){_0x2624ed['push'](_0x2624ed['shift']());}}}(a60_0xbef5,0xc2d9f));function a60_0x1418(_0x144fa9,_0x10e810){_0x144fa9=_0x144fa9-0x15e;const _0xbef53b=a60_0xbef5();let _0x141866=_0xbef53b[_0x144fa9];return _0x141866;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a60_0x4b7c1d(0x163),'command':a60_0x4b7c1d(0x167),'description':a60_0x4b7c1d(0x170),'risk':a60_0x4b7c1d(0x173),'flags':[{'name':a60_0x4b7c1d(0x16f),'type':a60_0x4b7c1d(0x169),'required':!![],'description':a60_0x4b7c1d(0x16a)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x539f1a){const _0x1822bb=a60_0x4b7c1d,_0x1beab0=_0x539f1a[_0x1822bb(0x168)]('dbid'),_0x250958=await getErBusinessGroupSummary(_0x539f1a[_0x1822bb(0x16b)],_0x1beab0);return{'ok':!![],'data':{..._0x250958,'scope':'DB_TABLE'},'message':_0x1822bb(0x160)+_0x250958[_0x1822bb(0x164)][_0x1822bb(0x175)]+_0x1822bb(0x15e)+_0x1beab0};}};
@@ -1 +1 @@
1
- function a60_0x2e55(_0x10a859,_0x13b632){_0x10a859=_0x10a859-0xa0;const _0x48c22b=a60_0x48c2();let _0x2e558b=_0x48c22b[_0x10a859];return _0x2e558b;}function a60_0x48c2(){const _0x256f6d=['filter','getOne','lovrabet','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','trim','dataset','modelCode','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','UNKNOWN','当前数据集\x20\x22','datasetCode','\x20类型,没有可用于\x20','name','source','95yzokWA','datasetName','sourceType','length','dbtable','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','12364aQJVok','object','SQL\x20schema\x20validation','code','8mVNJeI','1845984iGwjLN','join','dbtableConfig','toUpperCase','validation','tableName','153681iyNiUQ','dbId','909279PatSlt','5599QAwFwN','unknown','59061tfjaUC','2057545osyipg','8810wELQDx','4ULBQeu'];a60_0x48c2=function(){return _0x256f6d;};return a60_0x48c2();}const a60_0x419f91=a60_0x2e55;(function(_0x43be2c,_0x40884f){const _0x503d7b=a60_0x2e55,_0x4869f9=_0x43be2c();while(!![]){try{const _0x435c76=parseInt(_0x503d7b(0xaa))/0x1+-parseInt(_0x503d7b(0xad))/0x2*(-parseInt(_0x503d7b(0xa5))/0x3)+-parseInt(_0x503d7b(0xc3))/0x4*(parseInt(_0x503d7b(0xbc))/0x5)+parseInt(_0x503d7b(0xc8))/0x6+parseInt(_0x503d7b(0xab))/0x7*(parseInt(_0x503d7b(0xc7))/0x8)+-parseInt(_0x503d7b(0xa7))/0x9+parseInt(_0x503d7b(0xac))/0xa*(-parseInt(_0x503d7b(0xa8))/0xb);if(_0x435c76===_0x40884f)break;else _0x4869f9['push'](_0x4869f9['shift']());}catch(_0x20f6ad){_0x4869f9['push'](_0x4869f9['shift']());}}}(a60_0x48c2,0x25d2d));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x419f91(0xb0),'filter':a60_0x419f91(0xb5),'getOne':a60_0x419f91(0xb1)};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x4e8da8){const _0x4a9c15=a60_0x419f91;return _0x4e8da8==null?'':String(_0x4e8da8)[_0x4a9c15(0xb2)]();}function getDatasetCode(_0x12aade){const _0x343bb6=a60_0x419f91;return valueToString(_0x12aade[_0x343bb6(0xc6)]??_0x12aade[_0x343bb6(0xb4)]??_0x12aade[_0x343bb6(0xb3)]?.[_0x343bb6(0xb8)]);}function getDatasetName(_0x15560e){const _0xb271d=a60_0x419f91;return valueToString(_0x15560e[_0xb271d(0xba)]??_0x15560e[_0xb271d(0xb3)]?.[_0xb271d(0xbd)])||_0xb271d(0xa9);}function getDatasetSource(_0x3ca5b6){const _0xb6aa92=a60_0x419f91;return valueToString(_0x3ca5b6[_0xb6aa92(0xbb)]??_0x3ca5b6['dataset']?.[_0xb6aa92(0xbe)])[_0xb6aa92(0xa2)]();}function getDbtableConfig(_0x56f9f4){const _0xb6e7ea=a60_0x419f91,_0x4c27e2=_0x56f9f4[_0xb6e7ea(0xa1)]??_0x56f9f4[_0xb6e7ea(0xc0)];return _0x4c27e2&&typeof _0x4c27e2===_0xb6e7ea(0xc4)?_0x4c27e2:{};}export function isDbTableBackedDataset(_0x9926bd){const _0x479b00=a60_0x419f91,_0x1b80b7=getDatasetSource(_0x9926bd);if(_0x1b80b7==='METADATA')return![];const _0x4d123f=getDbtableConfig(_0x9926bd),_0xb77558=_0x4d123f[_0x479b00(0xa6)]??_0x4d123f['id'],_0xad06fb=valueToString(_0x4d123f[_0x479b00(0xa4)]??_0x9926bd[_0x479b00(0xa4)]??_0x9926bd[_0x479b00(0xb3)]?.[_0x479b00(0xa4)]);return _0xb77558!==undefined&&_0xb77558!==null&&_0xad06fb[_0x479b00(0xbf)]>0x0;}export function filterDbTableBackedDatasets(_0x5517e3){const _0x20c88d=a60_0x419f91;return _0x5517e3[_0x20c88d(0xae)](_0x188c5c=>isDbTableBackedDataset(_0x188c5c));}export function buildDbTableBackedRequirementMessage(_0x55d17c,_0xfdcc40=a60_0x419f91(0xc5)){const _0x5f20f1=a60_0x419f91,_0x2f8544=getDatasetSource(_0x55d17c)||_0x5f20f1(0xb6),_0x10ab28=getDatasetName(_0x55d17c),_0x1d769d=getDatasetCode(_0x55d17c),_0x52937d=_0x1d769d?'\x20('+_0x1d769d+')':'';return[_0x5f20f1(0xb7)+_0x10ab28+'\x22'+_0x52937d+'\x20是\x20'+_0x2f8544+_0x5f20f1(0xb9)+_0xfdcc40+'\x20的\x20DB_TABLE\x20数据源上下文。',_0x5f20f1(0xc1),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x5f20f1(0xc2)+RUNTIME_DATA_ACCESS_COMMANDS[_0x5f20f1(0xae)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x5f20f1(0xaf)]+'。'][_0x5f20f1(0xa0)]('\x20');}export function assertDatasetIsDbTableBacked(_0x387e91,_0x562768){const _0x4d6302=a60_0x419f91;if(!isDbTableBackedDataset(_0x387e91))throw CliErrors[_0x4d6302(0xa3)](buildDbTableBackedRequirementMessage(_0x387e91,_0x562768));}
1
+ const a61_0x1e0f61=a61_0x2226;(function(_0x5bd6dc,_0x3b3aec){const _0x4be16d=a61_0x2226,_0x561565=_0x5bd6dc();while(!![]){try{const _0x41bdb6=-parseInt(_0x4be16d(0x98))/0x1+parseInt(_0x4be16d(0x83))/0x2*(-parseInt(_0x4be16d(0x86))/0x3)+parseInt(_0x4be16d(0x84))/0x4*(parseInt(_0x4be16d(0x87))/0x5)+parseInt(_0x4be16d(0xa5))/0x6+parseInt(_0x4be16d(0x99))/0x7*(-parseInt(_0x4be16d(0x9f))/0x8)+parseInt(_0x4be16d(0xa7))/0x9*(-parseInt(_0x4be16d(0x8c))/0xa)+parseInt(_0x4be16d(0xa9))/0xb;if(_0x41bdb6===_0x3b3aec)break;else _0x561565['push'](_0x561565['shift']());}catch(_0x59b5ab){_0x561565['push'](_0x561565['shift']());}}}(a61_0x5b48,0xd5a02));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x1e0f61(0xa2),'filter':a61_0x1e0f61(0x8a),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x1e0f61(0xab);function valueToString(_0x4bb9ec){const _0x2982e4=a61_0x1e0f61;return _0x4bb9ec==null?'':String(_0x4bb9ec)[_0x2982e4(0x94)]();}function getDatasetCode(_0x6e81f){const _0x53f853=a61_0x1e0f61;return valueToString(_0x6e81f[_0x53f853(0x97)]??_0x6e81f['modelCode']??_0x6e81f[_0x53f853(0x93)]?.[_0x53f853(0x8b)]);}function getDatasetName(_0x76241c){const _0xd3e7df=a61_0x1e0f61;return valueToString(_0x76241c[_0xd3e7df(0x8f)]??_0x76241c[_0xd3e7df(0x93)]?.[_0xd3e7df(0x9c)])||_0xd3e7df(0x89);}function getDatasetSource(_0x3633d8){const _0xe96c5=a61_0x1e0f61;return valueToString(_0x3633d8[_0xe96c5(0x9d)]??_0x3633d8['dataset']?.[_0xe96c5(0xaa)])[_0xe96c5(0x96)]();}function getDbtableConfig(_0x36beae){const _0x499dda=a61_0x1e0f61,_0x1c38de=_0x36beae[_0x499dda(0x9a)]??_0x36beae[_0x499dda(0xa4)];return _0x1c38de&&typeof _0x1c38de===_0x499dda(0x88)?_0x1c38de:{};}function a61_0x2226(_0x1c5bae,_0x32fae9){_0x1c5bae=_0x1c5bae-0x83;const _0x5b48df=a61_0x5b48();let _0x2226fc=_0x5b48df[_0x1c5bae];return _0x2226fc;}export function isDbTableBackedDataset(_0x476203){const _0x34587c=a61_0x1e0f61,_0xe2d77=getDatasetSource(_0x476203);if(_0xe2d77===_0x34587c(0x90))return![];const _0x3aa27e=getDbtableConfig(_0x476203),_0x3d419c=_0x3aa27e[_0x34587c(0x95)]??_0x3aa27e['id'],_0x1838d3=valueToString(_0x3aa27e[_0x34587c(0xa6)]??_0x476203['tableName']??_0x476203['dataset']?.[_0x34587c(0xa6)]);return _0x3d419c!==undefined&&_0x3d419c!==null&&_0x1838d3[_0x34587c(0x8d)]>0x0;}export function filterDbTableBackedDatasets(_0x59c0ce){const _0x3c5938=a61_0x1e0f61;return _0x59c0ce[_0x3c5938(0x9b)](_0xd02f20=>isDbTableBackedDataset(_0xd02f20));}function a61_0x5b48(){const _0x270769=['当前数据集\x20\x22','dbtable','8199684owCNcg','tableName','244737NLhNMJ','\x20类型,没有可用于\x20','25203937vEPHrm','sourceType','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','3125526HVbkaS','4NcwqMb','\x20的\x20DB_TABLE\x20数据源上下文。','3qqWHlD','1838490wXCztV','object','unknown','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','datasetCode','140Dwaubp','length','UNKNOWN','name','METADATA','\x20是\x20','getOne','dataset','trim','dbId','toUpperCase','code','339765tJjoyC','61327EbLtLK','dbtableConfig','filter','datasetName','source','SQL\x20schema\x20validation','792iVNNVd','validation','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','lovrabet'];a61_0x5b48=function(){return _0x270769;};return a61_0x5b48();}export function buildDbTableBackedRequirementMessage(_0x16362f,_0x242939=a61_0x1e0f61(0x9e)){const _0x4ad3ec=a61_0x1e0f61,_0x2b4bdf=getDatasetSource(_0x16362f)||_0x4ad3ec(0x8e),_0x415389=getDatasetName(_0x16362f),_0x4abcea=getDatasetCode(_0x16362f),_0x2f7292=_0x4abcea?'\x20('+_0x4abcea+')':'';return[_0x4ad3ec(0xa3)+_0x415389+'\x22'+_0x2f7292+_0x4ad3ec(0x91)+_0x2b4bdf+_0x4ad3ec(0xa8)+_0x242939+_0x4ad3ec(0x85),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0x4ad3ec(0xa1),'如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:'+RUNTIME_DATA_ACCESS_COMMANDS[_0x4ad3ec(0x9b)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x4ad3ec(0x92)]+'。']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x7d3e11,_0x567d3d){const _0x14f204=a61_0x1e0f61;if(!isDbTableBackedDataset(_0x7d3e11))throw CliErrors[_0x14f204(0xa0)](buildDbTableBackedRequirementMessage(_0x7d3e11,_0x567d3d));}
@@ -1 +1 @@
1
- const a61_0x5798e5=a61_0x5784;(function(_0xa05444,_0x2755d4){const _0x34011b=a61_0x5784,_0x47c2b5=_0xa05444();while(!![]){try{const _0x3cd523=-parseInt(_0x34011b(0x84))/0x1*(-parseInt(_0x34011b(0x7a))/0x2)+-parseInt(_0x34011b(0x7f))/0x3+-parseInt(_0x34011b(0x8b))/0x4+parseInt(_0x34011b(0x6a))/0x5+-parseInt(_0x34011b(0x7e))/0x6+parseInt(_0x34011b(0x97))/0x7*(parseInt(_0x34011b(0x80))/0x8)+-parseInt(_0x34011b(0x8d))/0x9;if(_0x3cd523===_0x2755d4)break;else _0x47c2b5['push'](_0x47c2b5['shift']());}catch(_0xeb8c0b){_0x47c2b5['push'](_0x47c2b5['shift']());}}}(a61_0xe496,0xa8f3b));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 a61_0x5784(_0x3630c6,_0x3214fc){_0x3630c6=_0x3630c6-0x68;const _0xe49651=a61_0xe496();let _0x5784df=_0xe49651[_0x3630c6];return _0x5784df;}const DATASET_ID_FLAG={'name':'id','type':a61_0x5798e5(0x8e),'description':a61_0x5798e5(0x83)},DBID_FLAG={'name':a61_0x5798e5(0x7b),'type':a61_0x5798e5(0x8e),'description':a61_0x5798e5(0x6b)},CONFIRM_FLAG={'name':a61_0x5798e5(0x77),'type':a61_0x5798e5(0x73),'description':a61_0x5798e5(0x92)},EXPECTED_COUNT_FLAG={'name':a61_0x5798e5(0x86),'type':a61_0x5798e5(0x8e),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a61_0x5798e5(0x68),'command':'delete','description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x780db5){const _0x32acf5=a61_0x5798e5,_0x29dae0=_0x780db5[_0x32acf5(0x71)]('id'),_0x2efbc3=_0x780db5[_0x32acf5(0x99)](_0x32acf5(0x85)),_0x1fc249=_0x780db5[_0x32acf5(0x71)]('dbid'),_0x148488=[_0x29dae0>0x0,Boolean(_0x2efbc3),_0x1fc249>0x0][_0x32acf5(0x87)](Boolean);if(_0x148488[_0x32acf5(0x8c)]===0x0)throw CliErrors[_0x32acf5(0x76)](_0x32acf5(0x72));if(_0x148488[_0x32acf5(0x8c)]>0x1)throw CliErrors[_0x32acf5(0x76)](_0x32acf5(0x78));},async 'dryRun'(_0x4006c9){const _0x23d1d0=a61_0x5798e5,_0x4977e2=await resolveTargets(_0x4006c9);return{'method':'POST','url':_0x23d1d0(0x6d),'body':{'appCode':_0x4006c9[_0x23d1d0(0x88)],'count':_0x4977e2['length'],'datasets':_0x4977e2},'description':_0x23d1d0(0x8f)+_0x4977e2[_0x23d1d0(0x8c)]+'\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.'};},async 'execute'(_0x3f74b6){const _0x1ff861=a61_0x5798e5;if(!_0x3f74b6[_0x1ff861(0x89)]('confirm'))throw CliErrors[_0x1ff861(0x76)](_0x1ff861(0x91),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x5b2ece=await resolveTargets(_0x3f74b6),_0x414d76=[],_0x513271=[];for(const _0x24e542 of _0x5b2ece){try{await deleteDataset(_0x3f74b6['appCode'],_0x24e542['id']),_0x414d76[_0x1ff861(0x74)](_0x24e542);}catch(_0xceeae9){_0x513271['push']({..._0x24e542,'error':_0xceeae9 instanceof Error?_0xceeae9[_0x1ff861(0x79)]:String(_0xceeae9)});}}if(_0x513271[_0x1ff861(0x8c)]>0x0)return{'ok':![],'data':{'requested':_0x5b2ece[_0x1ff861(0x8c)],'deletedCount':_0x414d76[_0x1ff861(0x8c)],'failedCount':_0x513271['length'],'deleted':_0x414d76,'failed':_0x513271},'message':_0x1ff861(0x6c)+_0x414d76[_0x1ff861(0x8c)]+'/'+_0x5b2ece[_0x1ff861(0x8c)]+_0x1ff861(0x6e)+_0x513271['length']+'\x20failed'};return{'ok':!![],'data':{'requested':_0x5b2ece[_0x1ff861(0x8c)],'deletedCount':_0x414d76['length'],'deleted':_0x414d76},'message':_0x1ff861(0x6c)+_0x414d76[_0x1ff861(0x8c)]+_0x1ff861(0x69)};}};async function resolveTargets(_0x37d34f){const _0x8fbff=a61_0x5798e5,_0x272919=_0x37d34f[_0x8fbff(0x71)]('id'),_0x3783e0=_0x37d34f[_0x8fbff(0x99)](_0x8fbff(0x85)),_0x901346=_0x37d34f[_0x8fbff(0x71)](_0x8fbff(0x7b));let _0x1e18cd;_0x3783e0?(_0x1e18cd=await listDatasets(_0x37d34f[_0x8fbff(0x88)],{'code':_0x3783e0}),_0x1e18cd=_0x1e18cd[_0x8fbff(0x87)](_0x5922e3=>_0x5922e3[_0x8fbff(0x85)]===_0x3783e0)):(_0x1e18cd=await listDatasets(_0x37d34f[_0x8fbff(0x88)]),_0x272919>0x0&&(_0x1e18cd=_0x1e18cd[_0x8fbff(0x87)](_0x2d99da=>_0x2d99da['id']===_0x272919)),_0x901346>0x0&&(_0x1e18cd=_0x1e18cd['filter'](_0x34ee16=>_0x34ee16[_0x8fbff(0x95)]?.[_0x8fbff(0x98)]===_0x901346)));const _0x155a68=[];for(const _0x14ef3e of _0x1e18cd){const _0xae68a5=await getDatasetDetail(_0x14ef3e['code']),_0x29a9dc=Array[_0x8fbff(0x7d)](_0xae68a5[_0x8fbff(0x96)])?_0xae68a5[_0x8fbff(0x96)][_0x8fbff(0x87)](_0x23596f=>_0x23596f!=null&&typeof _0x23596f===_0x8fbff(0x8a)&&_0x23596f[_0x8fbff(0x6f)]!==!![]):[];_0x155a68[_0x8fbff(0x74)](normalizeTarget(_0x14ef3e,_0x29a9dc[_0x8fbff(0x8c)]));}if(_0x155a68[_0x8fbff(0x8c)]===0x0){const _0x5f4074=_0x3783e0||(_0x272919>0x0?_0x8fbff(0x94)+_0x272919:_0x8fbff(0x7c)+_0x901346);throw CliErrors['validation'](_0x8fbff(0x90)+_0x5f4074+'.');}const _0x86b1f1=_0x37d34f[_0x8fbff(0x71)](_0x8fbff(0x86));if(_0x86b1f1>0x0&&_0x155a68[_0x8fbff(0x8c)]!==_0x86b1f1)throw CliErrors[_0x8fbff(0x76)]('Matched\x20'+_0x155a68[_0x8fbff(0x8c)]+_0x8fbff(0x81)+_0x86b1f1+'.');return _0x155a68;}function normalizeTarget(_0x2e91b4,_0x5e2778){const _0x3f5bc1=a61_0x5798e5,_0x4d6a58=_0x2e91b4[_0x3f5bc1(0x95)]??{};return{'id':_0x2e91b4['id'],'code':_0x2e91b4[_0x3f5bc1(0x85)],'name':_0x2e91b4['name'],'description':_0x2e91b4[_0x3f5bc1(0x70)],'source':_0x2e91b4[_0x3f5bc1(0x93)],'dbId':_0x4d6a58[_0x3f5bc1(0x98)],'dbName':_0x4d6a58[_0x3f5bc1(0x75)],'tableName':_0x4d6a58[_0x3f5bc1(0x82)],'relatedPageCount':_0x5e2778};}function a61_0xe496(){const _0x3e1001=['dataset','\x20dataset(s)','6782900vYLgeL','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','Deleted\x20','/smartapi/dataset/delete-dataset','\x20dataset(s);\x20','deleted','description','num','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','boolean','push','dbName','validation','confirm','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','message','2hPODkx','dbid','dbid=','isArray','3598386yGnisZ','3300999qVTkdR','67792ZjGVGB','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','tableName','Dataset\x20id','1087076lJEAgY','code','expected-count','filter','appCode','bool','object','413088ImjCDX','length','8762823DrXuvc','number','Would\x20delete\x20','No\x20undeleted\x20dataset\x20found\x20for\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Required\x20to\x20execute\x20dataset\x20deletion','source','id=','dbtableConfig','relatedPageInfoList','847NISwjO','dbId','str'];a61_0xe496=function(){return _0x3e1001;};return a61_0xe496();}
1
+ const a62_0x509496=a62_0x5591;(function(_0x469d47,_0x1922d3){const _0x11e46a=a62_0x5591,_0x1ec504=_0x469d47();while(!![]){try{const _0x19ea1d=parseInt(_0x11e46a(0x1cd))/0x1+parseInt(_0x11e46a(0x1d6))/0x2+-parseInt(_0x11e46a(0x1e2))/0x3+parseInt(_0x11e46a(0x1fd))/0x4*(parseInt(_0x11e46a(0x1ec))/0x5)+-parseInt(_0x11e46a(0x1c9))/0x6*(-parseInt(_0x11e46a(0x1e4))/0x7)+parseInt(_0x11e46a(0x1d0))/0x8+-parseInt(_0x11e46a(0x1fc))/0x9;if(_0x19ea1d===_0x1922d3)break;else _0x1ec504['push'](_0x1ec504['shift']());}catch(_0x39aab0){_0x1ec504['push'](_0x1ec504['shift']());}}}(a62_0x2550,0xcec34));function a62_0x2550(){const _0x4284a6=['71477XhcyjZ','dbId','map','filter','delete','add','push','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','5133335pKHPeW','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','false','boolean','code','isInteger','description','cascade','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','POST','true','Deleted\x20','str','number','confirm','\x20dataset(s);\x20','16302654uMsqUH','4hqEWUp','\x20--appcode\x20','title','dbtableConfig','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','Matched\x20','appCode','validation','num','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbid=','No\x20undeleted\x20dataset\x20found\x20for\x20','id=','18DgqLZD','Would\x20delete\x20','message','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','939579vuHBzU','deleted','dbid','5645504BPGwVk','isArray','relatedPages','\x20dataset(s)','Would\x20safely\x20delete\x20','source','739312wFQJgQ','type','bool','name','relatedPageInfoList','length','rabetbase\x20page\x20restore\x20--id\x20','Required\x20to\x20execute\x20dataset\x20deletion','\x20failed','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','object','1241751tlciDM','tableName'];a62_0x2550=function(){return _0x4284a6;};return a62_0x2550();}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 a62_0x5591(_0x3be101,_0x583cdb){_0x3be101=_0x3be101-0x1c9;const _0x2550c0=a62_0x2550();let _0x5591db=_0x2550c0[_0x3be101];return _0x5591db;}const DATASET_ID_FLAG={'name':'id','type':a62_0x509496(0x1f9),'description':'Dataset\x20id'},DBID_FLAG={'name':a62_0x509496(0x1cf),'type':'number','description':a62_0x509496(0x207)},CONFIRM_FLAG={'name':a62_0x509496(0x1fa),'type':a62_0x509496(0x1ef),'description':a62_0x509496(0x1dd)},CASCADE_FLAG={'name':a62_0x509496(0x1f3),'type':a62_0x509496(0x1ef),'description':a62_0x509496(0x201)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a62_0x509496(0x1f9),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':'dataset','command':a62_0x509496(0x1e8),'description':a62_0x509496(0x1f4),'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'(_0x592309){const _0x51c36d=a62_0x509496,_0x30f33c=_0x592309[_0x51c36d(0x205)]('id'),_0x2ac6e0=_0x592309[_0x51c36d(0x1f8)](_0x51c36d(0x1f0)),_0x3ef3db=_0x592309['num'](_0x51c36d(0x1cf)),_0x54e69c=[_0x30f33c>0x0,Boolean(_0x2ac6e0),_0x3ef3db>0x0][_0x51c36d(0x1e7)](Boolean);if(_0x54e69c[_0x51c36d(0x1db)]===0x0)throw CliErrors[_0x51c36d(0x204)](_0x51c36d(0x1eb));if(_0x54e69c[_0x51c36d(0x1db)]>0x1)throw CliErrors[_0x51c36d(0x204)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x471aff){const _0x1425ec=a62_0x509496,_0x360ba1=await resolveTargets(_0x471aff),_0x135b81=_0x471aff[_0x1425ec(0x1d8)](_0x1425ec(0x1f3));return{'method':_0x1425ec(0x1f5),'url':'/smartapi/dataset/delete?cascade='+(_0x135b81?_0x1425ec(0x1f6):_0x1425ec(0x1ee)),'body':{'count':_0x360ba1['length'],'cascade':_0x135b81,'datasets':_0x360ba1},'description':_0x135b81?_0x1425ec(0x1ca)+_0x360ba1['length']+_0x1425ec(0x206):_0x1425ec(0x1d4)+_0x360ba1[_0x1425ec(0x1db)]+_0x1425ec(0x1ed)};},async 'execute'(_0x58fe77){const _0x15bbf9=a62_0x509496;if(!_0x58fe77[_0x15bbf9(0x1d8)](_0x15bbf9(0x1fa)))throw CliErrors[_0x15bbf9(0x204)](_0x15bbf9(0x1e0),_0x15bbf9(0x1cc));const _0x1d4579=await resolveTargets(_0x58fe77),_0x22412c=_0x58fe77[_0x15bbf9(0x1d8)]('cascade'),_0x1d5951=[],_0x317de3=[];for(const _0x32ffbe of _0x1d4579){try{await deleteDataset(_0x32ffbe['id'],_0x22412c),_0x1d5951[_0x15bbf9(0x1ea)](_0x32ffbe);}catch(_0x4d5af2){_0x317de3['push']({..._0x32ffbe,'error':_0x4d5af2 instanceof Error?_0x4d5af2[_0x15bbf9(0x1cb)]:String(_0x4d5af2)});}}if(_0x317de3[_0x15bbf9(0x1db)]>0x0){const _0x316ec0=buildPageRestoreCommands(_0x58fe77[_0x15bbf9(0x203)],_0x22412c?_0x1d5951:[]);return{'ok':![],'data':{'requested':_0x1d4579[_0x15bbf9(0x1db)],'cascade':_0x22412c,'deletedCount':_0x1d5951[_0x15bbf9(0x1db)],'failedCount':_0x317de3[_0x15bbf9(0x1db)],'deleted':_0x1d5951,'failed':_0x317de3,'pageRestoreCommands':_0x316ec0},'message':'Deleted\x20'+_0x1d5951[_0x15bbf9(0x1db)]+'/'+_0x1d4579['length']+_0x15bbf9(0x1fb)+_0x317de3[_0x15bbf9(0x1db)]+_0x15bbf9(0x1de)};}return{'ok':!![],'data':{'requested':_0x1d4579[_0x15bbf9(0x1db)],'cascade':_0x22412c,'deletedCount':_0x1d5951['length'],'deleted':_0x1d5951,'pageRestoreCommands':buildPageRestoreCommands(_0x58fe77[_0x15bbf9(0x203)],_0x22412c?_0x1d5951:[])},'message':_0x15bbf9(0x1f7)+_0x1d5951[_0x15bbf9(0x1db)]+_0x15bbf9(0x1d3)};}};async function resolveTargets(_0x130209){const _0x4c23fd=a62_0x509496,_0xf21a26=_0x130209['num']('id'),_0x263afa=_0x130209['str'](_0x4c23fd(0x1f0)),_0x34bc2a=_0x130209['num']('dbid');let _0x16f2ed;_0x263afa?(_0x16f2ed=await listDatasets(_0x130209['appCode'],{'code':_0x263afa}),_0x16f2ed=_0x16f2ed[_0x4c23fd(0x1e7)](_0x4a5c23=>_0x4a5c23[_0x4c23fd(0x1f0)]===_0x263afa)):(_0x16f2ed=await listDatasets(_0x130209[_0x4c23fd(0x203)]),_0xf21a26>0x0&&(_0x16f2ed=_0x16f2ed[_0x4c23fd(0x1e7)](_0xd5df2=>_0xd5df2['id']===_0xf21a26)),_0x34bc2a>0x0&&(_0x16f2ed=_0x16f2ed['filter'](_0xaa9c86=>_0xaa9c86[_0x4c23fd(0x200)]?.[_0x4c23fd(0x1e5)]===_0x34bc2a)));const _0x1723f6=[];for(const _0x2a36c5 of _0x16f2ed){const _0x30e4a9=await getDatasetDetail(_0x2a36c5[_0x4c23fd(0x1f0)]),_0x1b762a=Array[_0x4c23fd(0x1d1)](_0x30e4a9[_0x4c23fd(0x1da)])?_0x30e4a9[_0x4c23fd(0x1da)][_0x4c23fd(0x1e7)](_0x5d7324=>_0x5d7324!=null&&typeof _0x5d7324===_0x4c23fd(0x1e1)&&_0x5d7324[_0x4c23fd(0x1ce)]!==!![]):[];_0x1723f6['push'](normalizeTarget(_0x2a36c5,_0x1b762a));}if(_0x1723f6['length']===0x0){const _0x116dfa=_0x263afa||(_0xf21a26>0x0?_0x4c23fd(0x20a)+_0xf21a26:_0x4c23fd(0x208)+_0x34bc2a);throw CliErrors[_0x4c23fd(0x204)](_0x4c23fd(0x209)+_0x116dfa+'.');}const _0x287c91=_0x130209[_0x4c23fd(0x205)]('expected-count');if(_0x287c91>0x0&&_0x1723f6[_0x4c23fd(0x1db)]!==_0x287c91)throw CliErrors[_0x4c23fd(0x204)](_0x4c23fd(0x202)+_0x1723f6[_0x4c23fd(0x1db)]+_0x4c23fd(0x1df)+_0x287c91+'.');return _0x1723f6;}function normalizeTarget(_0x108765,_0x4f10ad){const _0x1a46a6=a62_0x509496,_0x41c80b=_0x108765[_0x1a46a6(0x200)]??{},_0x51477a=_0x4f10ad[_0x1a46a6(0x1e6)](_0x4cfa1b=>{const _0x57f1a1=_0x1a46a6;if(_0x4cfa1b==null||typeof _0x4cfa1b!==_0x57f1a1(0x1e1))return null;const _0x22878a=_0x4cfa1b,_0x4cb6c4=Number(_0x22878a['id']);if(!Number[_0x57f1a1(0x1f1)](_0x4cb6c4)||_0x4cb6c4<=0x0)return null;const _0xaf2885=_0x22878a[_0x57f1a1(0x1ff)]??_0x22878a[_0x57f1a1(0x1d9)];return{'id':_0x4cb6c4,..._0xaf2885?{'name':String(_0xaf2885)}:{},..._0x22878a['type']?{'type':String(_0x22878a[_0x57f1a1(0x1d7)])}:{}};})['filter'](_0x17f21e=>_0x17f21e!==null);return{'id':_0x108765['id'],'code':_0x108765[_0x1a46a6(0x1f0)],'name':_0x108765[_0x1a46a6(0x1d9)],'description':_0x108765[_0x1a46a6(0x1f2)],'source':_0x108765[_0x1a46a6(0x1d5)],'dbId':_0x41c80b['dbId'],'dbName':_0x41c80b['dbName'],'tableName':_0x41c80b[_0x1a46a6(0x1e3)],'relatedPageCount':_0x51477a['length'],'relatedPages':_0x51477a};}function buildPageRestoreCommands(_0x279578,_0x458e50){const _0x204a1a=a62_0x509496,_0x59b2c0=new Set();for(const _0x2a9173 of _0x458e50){for(const _0x3dd013 of _0x2a9173[_0x204a1a(0x1d2)])_0x59b2c0[_0x204a1a(0x1e9)](_0x3dd013['id']);}return[..._0x59b2c0]['map'](_0x14fb7a=>_0x204a1a(0x1dc)+_0x14fb7a+_0x204a1a(0x1fe)+_0x279578);}
@@ -1 +1 @@
1
- const a62_0x2728ee=a62_0x446c;(function(_0xb02bf2,_0x359f44){const _0x40b95d=a62_0x446c,_0x52578c=_0xb02bf2();while(!![]){try{const _0x18cde7=-parseInt(_0x40b95d(0x16b))/0x1+-parseInt(_0x40b95d(0x161))/0x2*(parseInt(_0x40b95d(0x159))/0x3)+parseInt(_0x40b95d(0x13a))/0x4+parseInt(_0x40b95d(0x126))/0x5*(parseInt(_0x40b95d(0x13c))/0x6)+-parseInt(_0x40b95d(0x129))/0x7*(parseInt(_0x40b95d(0x131))/0x8)+parseInt(_0x40b95d(0x120))/0x9+parseInt(_0x40b95d(0x15d))/0xa;if(_0x18cde7===_0x359f44)break;else _0x52578c['push'](_0x52578c['shift']());}catch(_0x2d2d55){_0x52578c['push'](_0x52578c['shift']());}}}(a62_0xf914,0xd923f));import{getDatasetDetail}from'../../core/api-client.js';function a62_0x446c(_0x55ec6a,_0x471246){_0x55ec6a=_0x55ec6a-0x11f;const _0xf9143e=a62_0xf914();let _0x446cfe=_0xf9143e[_0x55ec6a];return _0x446cfe;}function a62_0xf914(){const _0x29a490=['isArray','174724mAdPLc','host','dblinkInfoDTO','options','code','requestBody','691020bxpPZN','allFieldNames','string','dbName','toDatasetCode','requestFields','3370JJcTlE','formatRules','object','14pCCgqz','filter','relations','deleted','updateTimeField','trim','validateRules','doType','2269016mjvoeH','path','fromField','modelId','read','responseBody','afterScriptId','relationId','toFieldLabel','2240800YctFSy','name','9798LPJuWZ','datasetKey','allFields','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','modifierIdField','toDatasetName','modelCode','creatorIdField','displayName','pkField','relatedPageInfoList','columnCodeListWithDeleted','bizRelationType','extend','creatorNameField','type','tableComment','labelField','description','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','str','beforeScriptId','detail','push','properties','entries','fields','parse','required','164001kRpeKG','dbId','length','dataType','7137680NkPcEy','source','alias','logicField','30FTbZZr','doVersion','deprecated','responseFields','indexes','title','method','map','main_sub'];a62_0xf914=function(){return _0x29a490;};return a62_0xf914();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x445f08){const _0x99be0b=a62_0x446c;if(_0x445f08[_0x99be0b(0x12c)])return null;const _0x56cf6d=Boolean(_0x445f08['displayName']!==undefined||_0x445f08[_0x99be0b(0x130)]!==undefined);let _0x5434a9={};if(!_0x56cf6d&&typeof _0x445f08[_0x99be0b(0x149)]===_0x99be0b(0x122))try{_0x5434a9=JSON[_0x99be0b(0x157)](_0x445f08[_0x99be0b(0x149)]);}catch{}const _0x4a6fcd=_0x56cf6d?_0x445f08['name']:_0x445f08[_0x99be0b(0x16f)],_0x1aa0e8=_0x56cf6d?_0x445f08[_0x99be0b(0x144)]:_0x445f08[_0x99be0b(0x13b)],_0x405e93=_0x56cf6d?_0x445f08[_0x99be0b(0x130)]:_0x445f08['type']||_0x445f08[_0x99be0b(0x15c)],_0x44addb=_0x56cf6d?_0x445f08[_0x99be0b(0x145)]===!![]:_0x5434a9[_0x99be0b(0x145)]===!![],_0xd682a5=_0x56cf6d?_0x445f08['required']===!![]:_0x5434a9[_0x99be0b(0x158)]===!![],_0x40893b=_0x56cf6d?_0x445f08['options']??null:_0x5434a9[_0x99be0b(0x16e)]??null,_0x40f648={'name':_0x4a6fcd,'displayName':_0x1aa0e8||_0x4a6fcd,'type':_0x405e93,'dbType':_0x445f08['dbType'],'pk':_0x44addb,'required':_0xd682a5,'deprecated':_0x445f08[_0x99be0b(0x163)]===!![],'description':_0x445f08[_0x99be0b(0x14e)]||undefined};return Array['isArray'](_0x40893b)&&_0x40893b[_0x99be0b(0x15b)]>0x0&&(_0x40f648[_0x99be0b(0x16e)]=_0x40893b),_0x40f648;}function parseJsonMaybe(_0xea3850){const _0x2f8e52=a62_0x446c;if(typeof _0xea3850!==_0x2f8e52(0x122))return _0xea3850;try{return JSON[_0x2f8e52(0x157)](_0xea3850);}catch{return _0xea3850;}}function normalizeOperationEntry(_0x13901a,_0x19245b){const _0x10f41d=a62_0x446c;if(!_0x19245b||typeof _0x19245b!==_0x10f41d(0x128))return null;if(!_0x19245b[_0x10f41d(0x167)]||!_0x19245b[_0x10f41d(0x132)])return null;const _0x2b3fe8={'name':_0x13901a,'method':_0x19245b[_0x10f41d(0x167)],'path':_0x19245b[_0x10f41d(0x132)]};if(_0x19245b[_0x10f41d(0x16c)])_0x2b3fe8[_0x10f41d(0x16c)]=_0x19245b['host'];if(_0x19245b[_0x10f41d(0x11f)]!=null){const _0x4bfed8=parseJsonMaybe(_0x19245b['requestBody']);_0x2b3fe8['requestBody']=_0x4bfed8;}if(_0x19245b[_0x10f41d(0x136)]!=null){const _0x3d7681=parseJsonMaybe(_0x19245b[_0x10f41d(0x136)]);_0x2b3fe8[_0x10f41d(0x136)]=_0x3d7681;}if(_0x19245b['beforeScriptId']!=null)_0x2b3fe8[_0x10f41d(0x151)]=_0x19245b[_0x10f41d(0x151)];if(_0x19245b[_0x10f41d(0x137)]!=null)_0x2b3fe8[_0x10f41d(0x137)]=_0x19245b[_0x10f41d(0x137)];if(Array['isArray'](_0x19245b['requestFields']))_0x2b3fe8[_0x10f41d(0x125)]=_0x19245b[_0x10f41d(0x125)];if(Array['isArray'](_0x19245b[_0x10f41d(0x164)]))_0x2b3fe8['responseFields']=_0x19245b[_0x10f41d(0x164)];return _0x2b3fe8;}function summarizeDbtable(_0x2e2a3b){const _0x48d98c=a62_0x446c,_0x5c6f1f={},_0x74123e=['dbId',_0x48d98c(0x123),'tableName',_0x48d98c(0x13d),_0x48d98c(0x145),'allFields',_0x48d98c(0x160),'createTimeField',_0x48d98c(0x12d),_0x48d98c(0x143),_0x48d98c(0x14a),_0x48d98c(0x140),'modifierNameField',_0x48d98c(0x14d),_0x48d98c(0x16d)];for(const _0x16283a of _0x74123e){if(_0x2e2a3b[_0x16283a]!==undefined)_0x5c6f1f[_0x16283a]=_0x2e2a3b[_0x16283a];}return typeof _0x5c6f1f['allFields']==='string'&&_0x5c6f1f[_0x48d98c(0x13e)]['length']>0x0&&(_0x5c6f1f[_0x48d98c(0x121)]=_0x5c6f1f[_0x48d98c(0x13e)]['split'](',')[_0x48d98c(0x168)](_0xd9a971=>_0xd9a971[_0x48d98c(0x12e)]())[_0x48d98c(0x12a)](Boolean)),_0x5c6f1f;}function normalizeRelatedPages(_0x579881){const _0x288c18=a62_0x446c;if(!Array[_0x288c18(0x16a)](_0x579881))return[];return _0x579881['filter'](_0x8c6795=>_0x8c6795&&typeof _0x8c6795===_0x288c18(0x128))['map'](_0x2a133b=>({'id':_0x2a133b['id'],'type':_0x2a133b[_0x288c18(0x14b)],'code':_0x2a133b[_0x288c18(0x16f)],'title':_0x2a133b[_0x288c18(0x166)],'deleted':_0x2a133b[_0x288c18(0x12c)]===!![]}));}export const datasetDetail={'service':'dataset','command':a62_0x2728ee(0x152),'description':a62_0x2728ee(0x14f),'risk':a62_0x2728ee(0x135),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x2728ee(0x15f),'type':a62_0x2728ee(0x122),'description':a62_0x2728ee(0x13f)}],async 'execute'(_0x39d8f7){const _0x276110=a62_0x2728ee,_0x3fb533=await getDatasetDetail(_0x39d8f7[_0x276110(0x150)](_0x276110(0x16f))),_0x467d9a=Array['isArray'](_0x3fb533['fields'])?_0x3fb533[_0x276110(0x156)]:Array[_0x276110(0x16a)](_0x3fb533[_0x276110(0x154)])?_0x3fb533['properties']:[],_0xa50cb3=_0x467d9a['map'](_0x3dd9c3=>normalizeField(_0x3dd9c3))[_0x276110(0x12a)](_0x3caeb1=>_0x3caeb1!==null),_0x5a23a4=_0x3fb533['operations']??{},_0x5211ca=[];for(const [_0x4df0b7,_0x3f39fd]of Object[_0x276110(0x155)](_0x5a23a4)){const _0x3e8438=normalizeOperationEntry(_0x4df0b7,_0x3f39fd);if(_0x3e8438)_0x5211ca[_0x276110(0x153)](_0x3e8438);}const _0x386acf=_0x3fb533['dbtableConfig']??{},_0x3a4d7e=_0x3fb533['dataset']??{},_0xac6d5b=_0x386acf['dbId']!=null?{'id':_0x386acf[_0x276110(0x15a)],'name':_0x386acf[_0x276110(0x123)]??null}:undefined;let _0x451624;return typeof _0x3fb533[_0x276110(0x149)]==='string'&&(_0x451624=parseJsonMaybe(_0x3fb533['extend'])),{'ok':!![],'data':{'id':_0x3fb533[_0x276110(0x134)]??_0x3fb533['id'],'name':_0x3fb533[_0x276110(0x13b)],'code':_0x3fb533[_0x276110(0x142)]||_0x3fb533['code'],'doVersion':_0x3fb533[_0x276110(0x162)],'description':_0x3fb533[_0x276110(0x14e)]||_0x3a4d7e[_0x276110(0x14c)]||undefined,'source':_0x3fb533[_0x276110(0x15e)]||_0x3a4d7e['sourceType'],'table':_0x386acf['tableName']||_0x3a4d7e['tableName'],'datasetKey':_0x386acf[_0x276110(0x13d)],'pk':_0x386acf[_0x276110(0x145)],'db':_0xac6d5b,'dbtable':summarizeDbtable(_0x386acf),'fields':_0xa50cb3,'operations':_0x5211ca,'indexes':Array['isArray'](_0x3a4d7e[_0x276110(0x165)])?_0x3a4d7e[_0x276110(0x165)]:[],'relations':Array[_0x276110(0x16a)](_0x3fb533[_0x276110(0x12b)])?_0x3fb533[_0x276110(0x12b)][_0x276110(0x168)](_0x2a53a6=>({..._0x2a53a6['relationId']!=null?{'relationId':_0x2a53a6[_0x276110(0x138)]}:{},'fromDataset':_0x3fb533[_0x276110(0x13b)],'fromCode':_0x3fb533[_0x276110(0x142)]||_0x3fb533[_0x276110(0x16f)],'fromTable':_0x386acf['tableName']||_0x3a4d7e['tableName'],'fromField':_0x2a53a6[_0x276110(0x133)],'toDataset':_0x2a53a6[_0x276110(0x141)],'toCode':_0x2a53a6[_0x276110(0x124)],'toTable':_0x2a53a6['toTableName'],'toField':_0x2a53a6['toField'],'labelField':_0x2a53a6[_0x276110(0x139)]||undefined,'cardinality':_0x2a53a6['cardinality']||undefined,'bizRelationType':_0x2a53a6[_0x276110(0x148)]===_0x276110(0x169)?_0x276110(0x169):null})):[],'relatedPages':normalizeRelatedPages(_0x3fb533[_0x276110(0x146)]),...Array[_0x276110(0x16a)](_0x3fb533['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x3fb533[_0x276110(0x147)]}:{},'formatRules':Array[_0x276110(0x16a)](_0x3fb533[_0x276110(0x127)])?_0x3fb533[_0x276110(0x127)]:[],'validateRules':Array[_0x276110(0x16a)](_0x3fb533[_0x276110(0x12f)])?_0x3fb533[_0x276110(0x12f)]:[],..._0x451624!==undefined?{'extend':_0x451624}:{},'stats':{'fieldCount':_0xa50cb3['length'],'operationCount':_0x5211ca[_0x276110(0x15b)]}}};}};
1
+ function a63_0x2184(_0x5dc01b,_0xd11d74){_0x5dc01b=_0x5dc01b-0x1b7;const _0x580355=a63_0x5803();let _0x218461=_0x580355[_0x5dc01b];return _0x218461;}const a63_0x1923fc=a63_0x2184;(function(_0x47953d,_0x13a098){const _0x3c5b72=a63_0x2184,_0x6cb371=_0x47953d();while(!![]){try{const _0xbede8b=-parseInt(_0x3c5b72(0x1f5))/0x1+parseInt(_0x3c5b72(0x1ff))/0x2+-parseInt(_0x3c5b72(0x201))/0x3+parseInt(_0x3c5b72(0x1eb))/0x4+parseInt(_0x3c5b72(0x1fc))/0x5*(-parseInt(_0x3c5b72(0x203))/0x6)+-parseInt(_0x3c5b72(0x1d7))/0x7*(-parseInt(_0x3c5b72(0x1f4))/0x8)+parseInt(_0x3c5b72(0x1ee))/0x9*(parseInt(_0x3c5b72(0x1d8))/0xa);if(_0xbede8b===_0x13a098)break;else _0x6cb371['push'](_0x6cb371['shift']());}catch(_0x441fa0){_0x6cb371['push'](_0x6cb371['shift']());}}}(a63_0x5803,0xe72e0));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x292b04){const _0x1fbe8c=a63_0x2184;if(_0x292b04[_0x1fbe8c(0x1ce)])return null;const _0x407c41=Boolean(_0x292b04[_0x1fbe8c(0x1fe)]!==undefined||_0x292b04['doType']!==undefined);let _0x443036={};if(!_0x407c41&&typeof _0x292b04[_0x1fbe8c(0x1d4)]==='string')try{_0x443036=JSON[_0x1fbe8c(0x1d9)](_0x292b04[_0x1fbe8c(0x1d4)]);}catch{}const _0x169ff8=_0x407c41?_0x292b04[_0x1fbe8c(0x1c1)]:_0x292b04['code'],_0x7c3840=_0x407c41?_0x292b04['displayName']:_0x292b04['name'],_0x3a0df8=_0x407c41?_0x292b04[_0x1fbe8c(0x1de)]:_0x292b04[_0x1fbe8c(0x1ed)]||_0x292b04[_0x1fbe8c(0x200)],_0x232971=_0x407c41?_0x292b04[_0x1fbe8c(0x202)]===!![]:_0x443036[_0x1fbe8c(0x202)]===!![],_0x2802e0=_0x407c41?_0x292b04['required']===!![]:_0x443036[_0x1fbe8c(0x1d3)]===!![],_0x4c99d0=_0x407c41?_0x292b04[_0x1fbe8c(0x1c5)]??null:_0x443036['options']??null,_0x3b9dd2={'name':_0x169ff8,'displayName':_0x7c3840||_0x169ff8,'type':_0x3a0df8,'dbType':_0x292b04[_0x1fbe8c(0x205)],'pk':_0x232971,'required':_0x2802e0,'deprecated':_0x292b04[_0x1fbe8c(0x1c6)]===!![],'description':_0x292b04['description']||undefined};return Array[_0x1fbe8c(0x1c0)](_0x4c99d0)&&_0x4c99d0[_0x1fbe8c(0x207)]>0x0&&(_0x3b9dd2[_0x1fbe8c(0x1c5)]=_0x4c99d0),_0x3b9dd2;}function parseJsonMaybe(_0x2cb39c){const _0x1724b9=a63_0x2184;if(typeof _0x2cb39c!==_0x1724b9(0x1e6))return _0x2cb39c;try{return JSON[_0x1724b9(0x1d9)](_0x2cb39c);}catch{return _0x2cb39c;}}function a63_0x5803(){const _0x262363=['fields','cardinality','dbtableConfig','responseBody','required','extend','modifierNameField','main_sub','7mWJZiJ','813810oquuMu','parse','fromField','allFields','properties','title','doType','validateRules','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','description','host','path','modelId','columnCodeListWithDeleted','string','map','toFieldLabel','logicField','updateTimeField','2863736VPmPTI','creatorNameField','type','306fEWNtB','tableComment','modelCode','afterScriptId','filter','bizRelationType','10278536miwmvW','1253928roXIvM','beforeScriptId','labelField','str','allFieldNames','code','dbId','1615YJkopL','push','displayName','1591044xVJIUk','dataType','5235378mhWOxL','pkField','30042RzeHVl','requestBody','dbType','toDatasetCode','length','tableName','entries','dblinkInfoDTO','dbName','method','dataset','relations','requestFields','toDatasetName','isArray','name','responseFields','doVersion','toTableName','options','deprecated','datasetKey','source','detail','formatRules','object','operations','modifierIdField','deleted'];a63_0x5803=function(){return _0x262363;};return a63_0x5803();}function normalizeOperationEntry(_0x424518,_0x467986){const _0x3fc816=a63_0x2184;if(!_0x467986||typeof _0x467986!==_0x3fc816(0x1cb))return null;if(!_0x467986[_0x3fc816(0x1bb)]||!_0x467986[_0x3fc816(0x1e3)])return null;const _0x23efad={'name':_0x424518,'method':_0x467986[_0x3fc816(0x1bb)],'path':_0x467986[_0x3fc816(0x1e3)]};if(_0x467986[_0x3fc816(0x1e2)])_0x23efad[_0x3fc816(0x1e2)]=_0x467986[_0x3fc816(0x1e2)];if(_0x467986[_0x3fc816(0x204)]!=null){const _0x469836=parseJsonMaybe(_0x467986[_0x3fc816(0x204)]);_0x23efad[_0x3fc816(0x204)]=_0x469836;}if(_0x467986[_0x3fc816(0x1d2)]!=null){const _0x12b5ac=parseJsonMaybe(_0x467986[_0x3fc816(0x1d2)]);_0x23efad[_0x3fc816(0x1d2)]=_0x12b5ac;}if(_0x467986[_0x3fc816(0x1f6)]!=null)_0x23efad['beforeScriptId']=_0x467986['beforeScriptId'];if(_0x467986[_0x3fc816(0x1f1)]!=null)_0x23efad[_0x3fc816(0x1f1)]=_0x467986[_0x3fc816(0x1f1)];if(Array['isArray'](_0x467986['requestFields']))_0x23efad[_0x3fc816(0x1be)]=_0x467986['requestFields'];if(Array[_0x3fc816(0x1c0)](_0x467986[_0x3fc816(0x1c2)]))_0x23efad[_0x3fc816(0x1c2)]=_0x467986[_0x3fc816(0x1c2)];return _0x23efad;}function summarizeDbtable(_0x59fb86){const _0x4c7f2d=a63_0x2184,_0x331009={},_0x516633=[_0x4c7f2d(0x1fb),_0x4c7f2d(0x1ba),_0x4c7f2d(0x1b7),'datasetKey',_0x4c7f2d(0x202),_0x4c7f2d(0x1db),_0x4c7f2d(0x1e9),'createTimeField',_0x4c7f2d(0x1ea),'creatorIdField',_0x4c7f2d(0x1ec),_0x4c7f2d(0x1cd),_0x4c7f2d(0x1d5),_0x4c7f2d(0x1f7),_0x4c7f2d(0x1b9)];for(const _0x447be9 of _0x516633){if(_0x59fb86[_0x447be9]!==undefined)_0x331009[_0x447be9]=_0x59fb86[_0x447be9];}return typeof _0x331009[_0x4c7f2d(0x1db)]===_0x4c7f2d(0x1e6)&&_0x331009[_0x4c7f2d(0x1db)][_0x4c7f2d(0x207)]>0x0&&(_0x331009[_0x4c7f2d(0x1f9)]=_0x331009[_0x4c7f2d(0x1db)]['split'](',')[_0x4c7f2d(0x1e7)](_0x4ca494=>_0x4ca494['trim']())[_0x4c7f2d(0x1f2)](Boolean)),_0x331009;}function normalizeRelatedPages(_0x5dd5c8){const _0x333ca6=a63_0x2184;if(!Array[_0x333ca6(0x1c0)](_0x5dd5c8))return[];return _0x5dd5c8['filter'](_0x1bcae6=>_0x1bcae6&&typeof _0x1bcae6===_0x333ca6(0x1cb))[_0x333ca6(0x1e7)](_0x21fab3=>({'id':_0x21fab3['id'],'type':_0x21fab3[_0x333ca6(0x1ed)],'code':_0x21fab3['code'],'title':_0x21fab3[_0x333ca6(0x1dd)],'deleted':_0x21fab3[_0x333ca6(0x1ce)]===!![]}));}export const datasetDetail={'service':'dataset','command':a63_0x1923fc(0x1c9),'description':a63_0x1923fc(0x1e0),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':a63_0x1923fc(0x1e6),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x489a2a){const _0xfda37a=a63_0x1923fc,_0x1a7f9a=await getDatasetDetail(_0x489a2a[_0xfda37a(0x1f8)](_0xfda37a(0x1fa))),_0xebaa9e=Array[_0xfda37a(0x1c0)](_0x1a7f9a[_0xfda37a(0x1cf)])?_0x1a7f9a[_0xfda37a(0x1cf)]:Array[_0xfda37a(0x1c0)](_0x1a7f9a[_0xfda37a(0x1dc)])?_0x1a7f9a[_0xfda37a(0x1dc)]:[],_0x4b9b0a=_0xebaa9e['map'](_0x5a9171=>normalizeField(_0x5a9171))[_0xfda37a(0x1f2)](_0x3a404b=>_0x3a404b!==null),_0x14e13c=_0x1a7f9a[_0xfda37a(0x1cc)]??{},_0x48afcb=[];for(const [_0x2a55eb,_0x8a69d7]of Object[_0xfda37a(0x1b8)](_0x14e13c)){const _0x221993=normalizeOperationEntry(_0x2a55eb,_0x8a69d7);if(_0x221993)_0x48afcb[_0xfda37a(0x1fd)](_0x221993);}const _0x1c75f6=_0x1a7f9a[_0xfda37a(0x1d1)]??{},_0x4be7d1=_0x1a7f9a[_0xfda37a(0x1bc)]??{},_0x84b370=_0x1c75f6[_0xfda37a(0x1fb)]!=null?{'id':_0x1c75f6[_0xfda37a(0x1fb)],'name':_0x1c75f6['dbName']??null}:undefined;let _0x500d51;return typeof _0x1a7f9a[_0xfda37a(0x1d4)]===_0xfda37a(0x1e6)&&(_0x500d51=parseJsonMaybe(_0x1a7f9a['extend'])),{'ok':!![],'data':{'id':_0x1a7f9a[_0xfda37a(0x1e4)]??_0x1a7f9a['id'],'name':_0x1a7f9a[_0xfda37a(0x1c1)],'code':_0x1a7f9a['modelCode']||_0x1a7f9a[_0xfda37a(0x1fa)],'doVersion':_0x1a7f9a[_0xfda37a(0x1c3)],'description':_0x1a7f9a[_0xfda37a(0x1e1)]||_0x4be7d1[_0xfda37a(0x1ef)]||undefined,'source':_0x1a7f9a[_0xfda37a(0x1c8)]||_0x4be7d1['sourceType'],'table':_0x1c75f6[_0xfda37a(0x1b7)]||_0x4be7d1['tableName'],'datasetKey':_0x1c75f6[_0xfda37a(0x1c7)],'pk':_0x1c75f6[_0xfda37a(0x202)],'db':_0x84b370,'dbtable':summarizeDbtable(_0x1c75f6),'fields':_0x4b9b0a,'operations':_0x48afcb,'indexes':Array[_0xfda37a(0x1c0)](_0x4be7d1['indexes'])?_0x4be7d1['indexes']:[],'relations':Array['isArray'](_0x1a7f9a['relations'])?_0x1a7f9a[_0xfda37a(0x1bd)][_0xfda37a(0x1e7)](_0x3e9cb9=>({..._0x3e9cb9['relationId']!=null?{'relationId':_0x3e9cb9['relationId']}:{},'fromDataset':_0x1a7f9a[_0xfda37a(0x1c1)],'fromCode':_0x1a7f9a[_0xfda37a(0x1f0)]||_0x1a7f9a[_0xfda37a(0x1fa)],'fromTable':_0x1c75f6[_0xfda37a(0x1b7)]||_0x4be7d1[_0xfda37a(0x1b7)],'fromField':_0x3e9cb9[_0xfda37a(0x1da)],'toDataset':_0x3e9cb9[_0xfda37a(0x1bf)],'toCode':_0x3e9cb9[_0xfda37a(0x206)],'toTable':_0x3e9cb9[_0xfda37a(0x1c4)],'toField':_0x3e9cb9['toField'],'labelField':_0x3e9cb9[_0xfda37a(0x1e8)]||undefined,'cardinality':_0x3e9cb9[_0xfda37a(0x1d0)]||undefined,'bizRelationType':_0x3e9cb9[_0xfda37a(0x1f3)]==='main_sub'?_0xfda37a(0x1d6):null})):[],'relatedPages':normalizeRelatedPages(_0x1a7f9a['relatedPageInfoList']),...Array[_0xfda37a(0x1c0)](_0x1a7f9a[_0xfda37a(0x1e5)])?{'columnCodeListWithDeleted':_0x1a7f9a['columnCodeListWithDeleted']}:{},'formatRules':Array[_0xfda37a(0x1c0)](_0x1a7f9a[_0xfda37a(0x1ca)])?_0x1a7f9a['formatRules']:[],'validateRules':Array[_0xfda37a(0x1c0)](_0x1a7f9a[_0xfda37a(0x1df)])?_0x1a7f9a[_0xfda37a(0x1df)]:[],..._0x500d51!==undefined?{'extend':_0x500d51}:{},'stats':{'fieldCount':_0x4b9b0a['length'],'operationCount':_0x48afcb[_0xfda37a(0x207)]}}};}};
@@ -1 +1 @@
1
- const a63_0x1a1cac=a63_0x5aeb;(function(_0x185fe2,_0x2c97ee){const _0x1378a9=a63_0x5aeb,_0x2a222f=_0x185fe2();while(!![]){try{const _0x17db9a=parseInt(_0x1378a9(0x1cb))/0x1*(-parseInt(_0x1378a9(0x1cd))/0x2)+-parseInt(_0x1378a9(0x1c4))/0x3+-parseInt(_0x1378a9(0x1ae))/0x4*(-parseInt(_0x1378a9(0x1c8))/0x5)+-parseInt(_0x1378a9(0x1c1))/0x6*(parseInt(_0x1378a9(0x1cf))/0x7)+parseInt(_0x1378a9(0x1db))/0x8*(-parseInt(_0x1378a9(0x1c2))/0x9)+-parseInt(_0x1378a9(0x1ca))/0xa*(-parseInt(_0x1378a9(0x1d0))/0xb)+-parseInt(_0x1378a9(0x1bd))/0xc*(-parseInt(_0x1378a9(0x1b1))/0xd);if(_0x17db9a===_0x2c97ee)break;else _0x2a222f['push'](_0x2a222f['shift']());}catch(_0x49bcd5){_0x2a222f['push'](_0x2a222f['shift']());}}}(a63_0x4244,0x703de));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a63_0x4244(){const _0x467649=['JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','code','7056792dfmwkA','length','write','stringify','42tVLYPn','189DXuCBW','--expect-json','168165DVGoiu','sort','dataset','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','85585fKllZZ','appCode','1375800fcKEhk','1553wHoDWe','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','274ZGSBNP','str','296366EKHKbv','11fZgcDB','message','No\x20changes\x20for\x20dataset\x20extend','tableName','parse','modelId','--code\x20is\x20required','Updated\x20dataset\x20extend\x20(','string','push','expect-json','123056VfBHlI','dbId','has','extend-update','datasetCode','entries','validation','businessGroup','get','isArray','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','from','patch','\x20must\x20be\x20valid\x20JSON\x20object:\x20','shape','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','POST','join','keys','--patch-json','name','hint','dbtableConfig','8lgEZBp','Expected\x20','data','26onlVbQ','patch-json','trim','Allowed\x20keys:\x20','object','\x20must\x20be\x20a\x20JSON\x20object','value','extend',',\x20actual\x20'];a63_0x4244=function(){return _0x467649;};return a63_0x4244();}import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a63_0x1a1cac(0x1e2),{'message':a63_0x1a1cac(0x1e5),'hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);export function parseJsonObjectFlag(_0x1f3d49,_0x203ef7){const _0x1a0369=a63_0x1a1cac;if(!_0x1f3d49)return undefined;let _0x4ae831;try{_0x4ae831=JSON[_0x1a0369(0x1d4)](_0x1f3d49);}catch(_0x175a16){const _0x3a6e9f=_0x175a16 instanceof Error?_0x175a16[_0x1a0369(0x1d1)]:String(_0x175a16);throw CliErrors[_0x1a0369(0x1e1)](_0x203ef7+_0x1a0369(0x1a4)+_0x3a6e9f);}if(!isPlainObject(_0x4ae831)||Array[_0x1a0369(0x1e4)](_0x4ae831))throw CliErrors[_0x1a0369(0x1e1)](_0x203ef7+_0x1a0369(0x1b6));return _0x4ae831;}export function validateExtendPatchKeys(_0x3c6ddb){const _0x6a60f9=a63_0x1a1cac,_0x1e2f27=Object[_0x6a60f9(0x1a9)](_0x3c6ddb);if(_0x1e2f27[_0x6a60f9(0x1be)]===0x0)throw CliErrors['validation'](_0x6a60f9(0x1bb));for(const _0x3415f6 of _0x1e2f27){const _0xc1afb0=EXTEND_PATCH_REDIRECTS[_0x6a60f9(0x1e3)](_0x3415f6);if(_0xc1afb0)throw CliErrors[_0x6a60f9(0x1e1)](_0xc1afb0[_0x6a60f9(0x1d1)],_0xc1afb0[_0x6a60f9(0x1ac)]);if(!MUTABLE_EXTEND_KEYS[_0x6a60f9(0x1dd)](_0x3415f6))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x3415f6,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x2d31d2=a63_0x1a1cac,_0x42cb35=Array[_0x2d31d2(0x1e7)](MUTABLE_EXTEND_KEYS)[_0x2d31d2(0x1c5)]();return _0x42cb35[_0x2d31d2(0x1be)]>0x0?_0x2d31d2(0x1b4)+_0x42cb35['join'](',\x20'):_0x2d31d2(0x1c7);}export function applyExtendPatch(_0x25c07c,_0x1ee799){const _0x3ec880=a63_0x1a1cac;validateExtendPatchKeys(_0x1ee799);const _0xe38109=deepClone(_0x25c07c),_0x44d6dd=[];for(const [_0x31c5fd,_0x6215eb]of Object[_0x3ec880(0x1e0)](_0x1ee799)){const _0x1c82fe=_0xe38109[_0x31c5fd],_0x381073=deepClone(_0x6215eb);!deepEqual(_0x1c82fe,_0x381073)&&(_0xe38109[_0x31c5fd]=_0x381073,_0x44d6dd[_0x3ec880(0x1d9)]('extend.'+_0x31c5fd));}return _0x44d6dd[_0x3ec880(0x1c5)](),{'after':_0xe38109,'changedPaths':_0x44d6dd,'changed':_0x44d6dd['length']>0x0};}export function assertExpectation(_0x581bb2,_0x2ea0ee){const _0x4c4f35=a63_0x1a1cac;if(!_0x2ea0ee)return;for(const [_0x2853e9,_0x5aad58]of Object[_0x4c4f35(0x1e0)](_0x2ea0ee)){const _0x2fad80=_0x581bb2[_0x2853e9];if(!deepEqual(_0x2fad80,_0x5aad58))throw CliErrors[_0x4c4f35(0x1e1)]('Expectation\x20mismatch\x20at\x20extend.'+_0x2853e9,_0x4c4f35(0x1af)+JSON['stringify'](_0x5aad58)+_0x4c4f35(0x1b9)+JSON[_0x4c4f35(0x1c0)](_0x2fad80));}}export async function buildDatasetExtendUpdateResult({appCode:_0x231a9d,input:_0x1118aa,dryRun:_0x29af4e}){const _0x59fc64=a63_0x1a1cac;validateInput(_0x1118aa);const _0x29416a=await getDatasetDetail(_0x1118aa[_0x59fc64(0x1bc)]),_0x2c1396=parseDatasetExtend(_0x29416a[_0x59fc64(0x1b8)]),_0x2aaa54=deepClone(_0x2c1396[_0x59fc64(0x1b7)]);assertExpectation(_0x2aaa54,_0x1118aa['expect']);const {after:_0x4b81e,changedPaths:_0x261865,changed:_0x3bb028}=applyExtendPatch(_0x2aaa54,_0x1118aa[_0x59fc64(0x1e8)]),_0xea27a1=summarizeDataset(_0x29416a,_0x1118aa['code']);return _0x3bb028&&!_0x29af4e&&(_0x29416a['extend']=serializeDatasetExtend(_0x4b81e,_0x2c1396[_0x59fc64(0x1a5)]),await updateDrivenData(_0x29416a)),{'ok':!![],'data':{'appCode':_0x231a9d,'selector':{'code':_0x1118aa[_0x59fc64(0x1bc)]},'dataset':_0xea27a1,'dryRun':_0x29af4e,'changed':_0x3bb028,'changedPaths':_0x261865,'before':{'extend':_0x2aaa54},'after':{'extend':_0x4b81e},'submitted':_0x3bb028&&!_0x29af4e},'message':_0x3bb028?_0x29af4e?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x261865[_0x59fc64(0x1a8)](',\x20')+')':_0x59fc64(0x1d7)+_0x261865[_0x59fc64(0x1a8)](',\x20')+')':_0x59fc64(0x1d2)};}export const datasetExtendUpdate={'service':'dataset','command':a63_0x1a1cac(0x1de),'description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a63_0x1a1cac(0x1bf),'flags':[CODE_FLAG,{'name':a63_0x1a1cac(0x1b2),'type':a63_0x1a1cac(0x1d8),'required':!![],'description':a63_0x1a1cac(0x1a6)},{'name':'expect-json','type':'string','required':![],'description':a63_0x1a1cac(0x1ba)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1ffc1c){validateInput(readExtendUpdateInput(_0x1ffc1c));},async 'dryRun'(_0x1ad213){const _0x2793aa=a63_0x1a1cac,_0xb6b5ae=await buildDatasetExtendUpdateResult({'appCode':_0x1ad213[_0x2793aa(0x1c9)],'input':readExtendUpdateInput(_0x1ad213),'dryRun':!![]});return{'method':_0x2793aa(0x1a7),'url':'/smartapi/dataset/update-driven-data','body':_0xb6b5ae[_0x2793aa(0x1b0)],'description':_0xb6b5ae['message']};},async 'execute'(_0x18e766){return buildDatasetExtendUpdateResult({'appCode':_0x18e766['appCode'],'input':readExtendUpdateInput(_0x18e766),'dryRun':![]});}};function readExtendUpdateInput(_0x210bd2){const _0x55f018=a63_0x1a1cac,_0x938c0e=trim(_0x210bd2[_0x55f018(0x1ce)](_0x55f018(0x1bc))),_0x35a521=parseJsonObjectFlag(_0x210bd2[_0x55f018(0x1ce)](_0x55f018(0x1b2)),_0x55f018(0x1aa)),_0x17a5d3=parseJsonObjectFlag(_0x210bd2[_0x55f018(0x1ce)](_0x55f018(0x1da)),_0x55f018(0x1c3));return{'code':_0x938c0e,'patch':_0x35a521||{},'expect':_0x17a5d3};}function validateInput(_0x5021f4){const _0x338759=a63_0x1a1cac;if(!_0x5021f4[_0x338759(0x1bc)])throw CliErrors[_0x338759(0x1e1)](_0x338759(0x1d6));validateExtendPatchKeys(_0x5021f4['patch']);}function parseDatasetExtend(_0x145f2c){const _0x311cf5=a63_0x1a1cac;if(typeof _0x145f2c===_0x311cf5(0x1d8)){const _0x4dc08a=_0x145f2c[_0x311cf5(0x1b3)]();if(!_0x4dc08a)return{'value':{},'shape':'string'};let _0x271cd5;try{_0x271cd5=JSON[_0x311cf5(0x1d4)](_0x4dc08a);}catch(_0x1eb5a1){const _0x282be3=_0x1eb5a1 instanceof Error?_0x1eb5a1['message']:String(_0x1eb5a1);throw CliErrors[_0x311cf5(0x1e1)](_0x311cf5(0x1cc)+_0x282be3);}if(!isPlainObject(_0x271cd5)||Array[_0x311cf5(0x1e4)](_0x271cd5))throw CliErrors[_0x311cf5(0x1e1)](_0x311cf5(0x1e6));return{'value':_0x271cd5,'shape':_0x311cf5(0x1d8)};}if(_0x145f2c===undefined||_0x145f2c===null)return{'value':{},'shape':_0x311cf5(0x1d8)};if(!isPlainObject(_0x145f2c)||Array[_0x311cf5(0x1e4)](_0x145f2c))throw CliErrors[_0x311cf5(0x1e1)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x145f2c,'shape':_0x311cf5(0x1b5)};}function serializeDatasetExtend(_0x1e0a07,_0x2f6bbf){const _0x490620=a63_0x1a1cac;return _0x2f6bbf==='string'?JSON[_0x490620(0x1c0)](_0x1e0a07):_0x1e0a07;}function summarizeDataset(_0x3b0486,_0x4ceb6c){const _0x1294d8=a63_0x1a1cac,_0x18a3ff=isPlainObject(_0x3b0486[_0x1294d8(0x1c6)])?_0x3b0486[_0x1294d8(0x1c6)]:{},_0x436608=isPlainObject(_0x3b0486[_0x1294d8(0x1ad)])?_0x3b0486[_0x1294d8(0x1ad)]:{};return{'id':_0x3b0486[_0x1294d8(0x1d5)]??_0x3b0486['id']??_0x18a3ff['datasetId']??null,'code':_0x3b0486['modelCode']??_0x3b0486[_0x1294d8(0x1bc)]??_0x18a3ff[_0x1294d8(0x1df)]??_0x4ceb6c,'name':_0x3b0486[_0x1294d8(0x1ab)]??_0x18a3ff['datasetName']??null,'table':_0x436608[_0x1294d8(0x1d3)]??_0x18a3ff[_0x1294d8(0x1d3)]??null,'db':_0x436608['dbName']??_0x436608[_0x1294d8(0x1dc)]??null};}function a63_0x5aeb(_0x384102,_0x4c93e1){_0x384102=_0x384102-0x1a4;const _0x42446f=a63_0x4244();let _0x5aebdf=_0x42446f[_0x384102];return _0x5aebdf;}function deepClone(_0x2e1ad4){const _0x6d9130=a63_0x1a1cac;if(_0x2e1ad4===undefined)return _0x2e1ad4;return JSON[_0x6d9130(0x1d4)](JSON[_0x6d9130(0x1c0)](_0x2e1ad4));}function deepEqual(_0xf0ca13,_0x32ca3b){const _0x29e2ef=a63_0x1a1cac;return JSON['stringify'](_0xf0ca13)===JSON[_0x29e2ef(0x1c0)](_0x32ca3b);}function isPlainObject(_0x45525b){const _0x5a0698=a63_0x1a1cac;return Boolean(_0x45525b)&&typeof _0x45525b===_0x5a0698(0x1b5)&&!Array['isArray'](_0x45525b);}function trim(_0xcf4a16){const _0x33c221=a63_0x1a1cac,_0x4d5d72=String(_0xcf4a16||'')[_0x33c221(0x1b3)]();return _0x4d5d72;}
1
+ const a64_0x1aca6b=a64_0x2701;(function(_0x271674,_0x27e674){const _0x10522a=a64_0x2701,_0xa7d9cb=_0x271674();while(!![]){try{const _0x1cce83=parseInt(_0x10522a(0x15a))/0x1+parseInt(_0x10522a(0x15f))/0x2+-parseInt(_0x10522a(0x156))/0x3+parseInt(_0x10522a(0x140))/0x4*(parseInt(_0x10522a(0x167))/0x5)+parseInt(_0x10522a(0x13d))/0x6*(parseInt(_0x10522a(0x15e))/0x7)+parseInt(_0x10522a(0x153))/0x8+-parseInt(_0x10522a(0x16a))/0x9;if(_0x1cce83===_0x27e674)break;else _0xa7d9cb['push'](_0xa7d9cb['shift']());}catch(_0x22a0f9){_0xa7d9cb['push'](_0xa7d9cb['shift']());}}}(a64_0x2d22,0x9fe70));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':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);export function parseJsonObjectFlag(_0xc56a24,_0x51bc8d){const _0x18e596=a64_0x2701;if(!_0xc56a24)return undefined;let _0x581965;try{_0x581965=JSON[_0x18e596(0x174)](_0xc56a24);}catch(_0x29a686){const _0x51f71f=_0x29a686 instanceof Error?_0x29a686[_0x18e596(0x139)]:String(_0x29a686);throw CliErrors[_0x18e596(0x149)](_0x51bc8d+_0x18e596(0x13e)+_0x51f71f);}if(!isPlainObject(_0x581965)||Array[_0x18e596(0x13f)](_0x581965))throw CliErrors[_0x18e596(0x149)](_0x51bc8d+_0x18e596(0x165));return _0x581965;}export function validateExtendPatchKeys(_0x2dc8d3){const _0x3c1bcc=a64_0x2701,_0x54532b=Object['keys'](_0x2dc8d3);if(_0x54532b[_0x3c1bcc(0x166)]===0x0)throw CliErrors[_0x3c1bcc(0x149)](_0x3c1bcc(0x137));for(const _0x646199 of _0x54532b){const _0x54d838=EXTEND_PATCH_REDIRECTS[_0x3c1bcc(0x143)](_0x646199);if(_0x54d838)throw CliErrors['validation'](_0x54d838[_0x3c1bcc(0x139)],_0x54d838[_0x3c1bcc(0x142)]);if(!MUTABLE_EXTEND_KEYS[_0x3c1bcc(0x15d)](_0x646199))throw CliErrors[_0x3c1bcc(0x149)]('Unsupported\x20patch\x20key:\x20'+_0x646199,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x126f3c=a64_0x2701,_0x23a9e4=Array['from'](MUTABLE_EXTEND_KEYS)['sort']();return _0x23a9e4[_0x126f3c(0x166)]>0x0?_0x126f3c(0x162)+_0x23a9e4[_0x126f3c(0x15c)](',\x20'):_0x126f3c(0x16c);}function a64_0x2701(_0x300e09,_0xd6fa81){_0x300e09=_0x300e09-0x136;const _0x2d22e8=a64_0x2d22();let _0x2701ed=_0x2d22e8[_0x300e09];return _0x2701ed;}export function applyExtendPatch(_0x50dfd7,_0x8cdfb9){const _0xedb27a=a64_0x2701;validateExtendPatchKeys(_0x8cdfb9);const _0x34b13d=deepClone(_0x50dfd7),_0x45ae4f=[];for(const [_0x3e79f7,_0x333bcf]of Object['entries'](_0x8cdfb9)){const _0x1b5c30=_0x34b13d[_0x3e79f7],_0x50049e=deepClone(_0x333bcf);!deepEqual(_0x1b5c30,_0x50049e)&&(_0x34b13d[_0x3e79f7]=_0x50049e,_0x45ae4f[_0xedb27a(0x164)](_0xedb27a(0x168)+_0x3e79f7));}return _0x45ae4f[_0xedb27a(0x163)](),{'after':_0x34b13d,'changedPaths':_0x45ae4f,'changed':_0x45ae4f['length']>0x0};}export function assertExpectation(_0x2a2a0c,_0x4e6d04){const _0x51001b=a64_0x2701;if(!_0x4e6d04)return;for(const [_0x115fc2,_0x460ced]of Object[_0x51001b(0x176)](_0x4e6d04)){const _0x3e3298=_0x2a2a0c[_0x115fc2];if(!deepEqual(_0x3e3298,_0x460ced))throw CliErrors[_0x51001b(0x149)](_0x51001b(0x13b)+_0x115fc2,_0x51001b(0x136)+JSON['stringify'](_0x460ced)+_0x51001b(0x16b)+JSON[_0x51001b(0x14f)](_0x3e3298));}}function a64_0x2d22(){const _0x3738a1=['appCode','stringify','name','extend','Patch\x20dataset\x20top-level\x20extend\x20safely','3743000fljwrL','dbId','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','1229340EfJRhu','string','expect-json','No\x20changes\x20for\x20dataset\x20extend','230833BuRorT','POST','join','has','663250omvKOB','224356ucxtWU','object','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','Allowed\x20keys:\x20','sort','push','\x20must\x20be\x20a\x20JSON\x20object','length','270PImNuW','extend.','expect','6400152kJzKiu',',\x20actual\x20','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','/smartapi/dataset/update-driven-data','--expect-json','Updated\x20dataset\x20extend\x20(','value','patch','write','trim','parse','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','entries','Expected\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','extend-update','message','dataset','Expectation\x20mismatch\x20at\x20extend.','data','48ezyiYj','\x20must\x20be\x20valid\x20JSON\x20object:\x20','isArray','15332SNSFoc','dbtableConfig','hint','get','--patch-json','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','modelCode','code','patch-json','validation','str','datasetCode','datasetId','Dry-run:\x20dataset\x20extend\x20would\x20change\x20('];a64_0x2d22=function(){return _0x3738a1;};return a64_0x2d22();}export async function buildDatasetExtendUpdateResult({appCode:_0x4c8fda,input:_0x321f8a,dryRun:_0xb5a41a}){const _0x2aec7f=a64_0x2701;validateInput(_0x321f8a);const _0x265560=await getDatasetDetail(_0x321f8a[_0x2aec7f(0x147)]),_0x55e878=parseDatasetExtend(_0x265560[_0x2aec7f(0x151)]),_0x9356e6=deepClone(_0x55e878[_0x2aec7f(0x170)]);assertExpectation(_0x9356e6,_0x321f8a[_0x2aec7f(0x169)]);const {after:_0x5b1e04,changedPaths:_0x4e6adf,changed:_0x568668}=applyExtendPatch(_0x9356e6,_0x321f8a[_0x2aec7f(0x171)]),_0x33323e=summarizeDataset(_0x265560,_0x321f8a[_0x2aec7f(0x147)]);return _0x568668&&!_0xb5a41a&&(_0x265560['extend']=serializeDatasetExtend(_0x5b1e04,_0x55e878['shape']),await updateDrivenData(_0x265560)),{'ok':!![],'data':{'appCode':_0x4c8fda,'selector':{'code':_0x321f8a[_0x2aec7f(0x147)]},'dataset':_0x33323e,'dryRun':_0xb5a41a,'changed':_0x568668,'changedPaths':_0x4e6adf,'before':{'extend':_0x9356e6},'after':{'extend':_0x5b1e04},'submitted':_0x568668&&!_0xb5a41a},'message':_0x568668?_0xb5a41a?_0x2aec7f(0x14d)+_0x4e6adf[_0x2aec7f(0x15c)](',\x20')+')':_0x2aec7f(0x16f)+_0x4e6adf[_0x2aec7f(0x15c)](',\x20')+')':_0x2aec7f(0x159)};}export const datasetExtendUpdate={'service':a64_0x1aca6b(0x13a),'command':a64_0x1aca6b(0x138),'description':a64_0x1aca6b(0x152),'risk':a64_0x1aca6b(0x172),'flags':[CODE_FLAG,{'name':'patch-json','type':a64_0x1aca6b(0x157),'required':!![],'description':a64_0x1aca6b(0x161)},{'name':a64_0x1aca6b(0x158),'type':a64_0x1aca6b(0x157),'required':![],'description':a64_0x1aca6b(0x155)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2de09f){validateInput(readExtendUpdateInput(_0x2de09f));},async 'dryRun'(_0x18183c){const _0x3bd1ae=a64_0x1aca6b,_0x397713=await buildDatasetExtendUpdateResult({'appCode':_0x18183c[_0x3bd1ae(0x14e)],'input':readExtendUpdateInput(_0x18183c),'dryRun':!![]});return{'method':_0x3bd1ae(0x15b),'url':_0x3bd1ae(0x16d),'body':_0x397713[_0x3bd1ae(0x13c)],'description':_0x397713[_0x3bd1ae(0x139)]};},async 'execute'(_0x2dafbb){const _0x10ec2b=a64_0x1aca6b;return buildDatasetExtendUpdateResult({'appCode':_0x2dafbb[_0x10ec2b(0x14e)],'input':readExtendUpdateInput(_0x2dafbb),'dryRun':![]});}};function readExtendUpdateInput(_0x8fa59d){const _0x5661d3=a64_0x1aca6b,_0x3c4de3=trim(_0x8fa59d[_0x5661d3(0x14a)](_0x5661d3(0x147))),_0x3cbf51=parseJsonObjectFlag(_0x8fa59d[_0x5661d3(0x14a)](_0x5661d3(0x148)),_0x5661d3(0x144)),_0x2fd75d=parseJsonObjectFlag(_0x8fa59d['str']('expect-json'),_0x5661d3(0x16e));return{'code':_0x3c4de3,'patch':_0x3cbf51||{},'expect':_0x2fd75d};}function validateInput(_0x2a3afb){const _0x20f5a2=a64_0x1aca6b;if(!_0x2a3afb[_0x20f5a2(0x147)])throw CliErrors[_0x20f5a2(0x149)]('--code\x20is\x20required');validateExtendPatchKeys(_0x2a3afb['patch']);}function parseDatasetExtend(_0x67e335){const _0x285f2f=a64_0x1aca6b;if(typeof _0x67e335===_0x285f2f(0x157)){const _0x18e2bb=_0x67e335[_0x285f2f(0x173)]();if(!_0x18e2bb)return{'value':{},'shape':_0x285f2f(0x157)};let _0x43ea26;try{_0x43ea26=JSON[_0x285f2f(0x174)](_0x18e2bb);}catch(_0x4a4ae4){const _0x450b0d=_0x4a4ae4 instanceof Error?_0x4a4ae4[_0x285f2f(0x139)]:String(_0x4a4ae4);throw CliErrors[_0x285f2f(0x149)](_0x285f2f(0x175)+_0x450b0d);}if(!isPlainObject(_0x43ea26)||Array[_0x285f2f(0x13f)](_0x43ea26))throw CliErrors[_0x285f2f(0x149)](_0x285f2f(0x145));return{'value':_0x43ea26,'shape':_0x285f2f(0x157)};}if(_0x67e335===undefined||_0x67e335===null)return{'value':{},'shape':_0x285f2f(0x157)};if(!isPlainObject(_0x67e335)||Array[_0x285f2f(0x13f)](_0x67e335))throw CliErrors[_0x285f2f(0x149)](_0x285f2f(0x145));return{'value':_0x67e335,'shape':'object'};}function serializeDatasetExtend(_0x38265e,_0x379c04){const _0x164683=a64_0x1aca6b;return _0x379c04===_0x164683(0x157)?JSON[_0x164683(0x14f)](_0x38265e):_0x38265e;}function summarizeDataset(_0x2a325f,_0x2e29be){const _0x503541=a64_0x1aca6b,_0x158d1f=isPlainObject(_0x2a325f[_0x503541(0x13a)])?_0x2a325f[_0x503541(0x13a)]:{},_0x460fdc=isPlainObject(_0x2a325f[_0x503541(0x141)])?_0x2a325f[_0x503541(0x141)]:{};return{'id':_0x2a325f['modelId']??_0x2a325f['id']??_0x158d1f[_0x503541(0x14c)]??null,'code':_0x2a325f[_0x503541(0x146)]??_0x2a325f['code']??_0x158d1f[_0x503541(0x14b)]??_0x2e29be,'name':_0x2a325f[_0x503541(0x150)]??_0x158d1f['datasetName']??null,'table':_0x460fdc['tableName']??_0x158d1f['tableName']??null,'db':_0x460fdc['dbName']??_0x460fdc[_0x503541(0x154)]??null};}function deepClone(_0x3b45c1){const _0x46d476=a64_0x1aca6b;if(_0x3b45c1===undefined)return _0x3b45c1;return JSON[_0x46d476(0x174)](JSON[_0x46d476(0x14f)](_0x3b45c1));}function deepEqual(_0x4ba049,_0x112f39){const _0xd52621=a64_0x1aca6b;return JSON[_0xd52621(0x14f)](_0x4ba049)===JSON[_0xd52621(0x14f)](_0x112f39);}function isPlainObject(_0x110ee8){const _0x3a2b0f=a64_0x1aca6b;return Boolean(_0x110ee8)&&typeof _0x110ee8===_0x3a2b0f(0x160)&&!Array[_0x3a2b0f(0x13f)](_0x110ee8);}function trim(_0x4b2b0a){const _0x2216a1=a64_0x1aca6b,_0x4fc52e=String(_0x4b2b0a||'')[_0x2216a1(0x173)]();return _0x4fc52e;}