@lovrabet/rabetbase-cli 2.5.1-beta.2 → 2.5.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) 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/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  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/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.d.ts +1 -1
  56. package/lib/commands/config/init.js +1 -1
  57. package/lib/commands/config/list.js +1 -1
  58. package/lib/commands/config/set.js +1 -1
  59. package/lib/commands/config/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-restore.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/dataset/user-deleted-field-list.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.js +1 -1
  95. package/lib/commands/db/table-diff-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/deployment/auto-sync.js +1 -1
  100. package/lib/commands/deployment/index.js +1 -1
  101. package/lib/commands/deployment/sync.js +1 -1
  102. package/lib/commands/doctor.js +1 -1
  103. package/lib/commands/file/index.js +1 -1
  104. package/lib/commands/issue/index.js +1 -1
  105. package/lib/commands/issue/nudge.js +1 -1
  106. package/lib/commands/issue/report.js +1 -1
  107. package/lib/commands/issue/shared.js +1 -1
  108. package/lib/commands/kb/create.js +1 -1
  109. package/lib/commands/kb/delete.js +1 -1
  110. package/lib/commands/kb/detail.js +1 -1
  111. package/lib/commands/kb/index.js +1 -1
  112. package/lib/commands/kb/list.js +1 -1
  113. package/lib/commands/kb/search.js +1 -1
  114. package/lib/commands/kb/shared.js +1 -1
  115. package/lib/commands/kb/update.js +1 -1
  116. package/lib/commands/logs/index.js +1 -1
  117. package/lib/commands/menu/asset-update.js +1 -1
  118. package/lib/commands/menu/delete.js +1 -1
  119. package/lib/commands/menu/external-link-create.js +1 -1
  120. package/lib/commands/menu/external-link-update.js +1 -1
  121. package/lib/commands/menu/group-create.js +1 -1
  122. package/lib/commands/menu/group-update.js +1 -1
  123. package/lib/commands/menu/index.js +1 -1
  124. package/lib/commands/menu/list.js +1 -1
  125. package/lib/commands/menu/move.js +1 -1
  126. package/lib/commands/menu/regroup-start.js +1 -1
  127. package/lib/commands/menu/rename.js +1 -1
  128. package/lib/commands/menu/shared/compare-table.js +1 -1
  129. package/lib/commands/menu/shared/delete-plan.js +1 -1
  130. package/lib/commands/menu/shared/facts.js +1 -1
  131. package/lib/commands/menu/shared/index.js +1 -1
  132. package/lib/commands/menu/shared/inquirer.js +1 -1
  133. package/lib/commands/menu/shared/local-pages.js +1 -1
  134. package/lib/commands/menu/shared/logic.js +1 -1
  135. package/lib/commands/menu/shared/mutations.js +1 -1
  136. package/lib/commands/menu/shared/service.js +1 -1
  137. package/lib/commands/menu/shared/sync-core.js +1 -1
  138. package/lib/commands/menu/shared/update-core.js +1 -1
  139. package/lib/commands/menu/shared/valid-url.js +1 -1
  140. package/lib/commands/menu/sync.js +1 -1
  141. package/lib/commands/menu/visibility-update.js +1 -1
  142. package/lib/commands/notification/config-create.js +1 -1
  143. package/lib/commands/notification/config-delete.js +1 -1
  144. package/lib/commands/notification/config-list.js +1 -1
  145. package/lib/commands/notification/config-update.js +1 -1
  146. package/lib/commands/notification/index.js +1 -1
  147. package/lib/commands/notification/shared.js +1 -1
  148. package/lib/commands/ocr/index.js +1 -1
  149. package/lib/commands/page/create.js +1 -1
  150. package/lib/commands/page/custom/detail.js +1 -1
  151. package/lib/commands/page/custom/list.js +1 -1
  152. package/lib/commands/page/custom/publish.js +1 -1
  153. package/lib/commands/page/custom/shared.js +1 -1
  154. package/lib/commands/page/custom/syntax.js +1 -1
  155. package/lib/commands/page/custom/template.js +1 -1
  156. package/lib/commands/page/custom/update.js +1 -1
  157. package/lib/commands/page/data-list-status.js +1 -1
  158. package/lib/commands/page/generate-start.js +1 -1
  159. package/lib/commands/page/generate-status.js +1 -1
  160. package/lib/commands/page/index.js +1 -1
  161. package/lib/commands/page/pull.js +1 -1
  162. package/lib/commands/page/push.js +1 -1
  163. package/lib/commands/page/relation-audit.js +1 -1
  164. package/lib/commands/page/restore.js +1 -1
  165. package/lib/commands/page/shared.js +1 -1
  166. package/lib/commands/page/sync.js +1 -1
  167. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  168. package/lib/commands/project/create/format-elapsed.js +1 -1
  169. package/lib/commands/project/create/main.js +1 -1
  170. package/lib/commands/project/create/materialize-project-template.js +1 -1
  171. package/lib/commands/project/create/project-name.js +1 -1
  172. package/lib/commands/project/create/project-template-archive.js +1 -1
  173. package/lib/commands/project/create/project-template-path.js +1 -1
  174. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  175. package/lib/commands/project/create/use-format-code.js +1 -1
  176. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  177. package/lib/commands/project/index.js +1 -1
  178. package/lib/commands/project/upgrade.js +1 -1
  179. package/lib/commands/registry.js +1 -1
  180. package/lib/commands/role/delete.js +1 -1
  181. package/lib/commands/role/detail.js +1 -1
  182. package/lib/commands/role/index.js +1 -1
  183. package/lib/commands/role/list.js +1 -1
  184. package/lib/commands/role/shared.js +1 -1
  185. package/lib/commands/role/update.js +1 -1
  186. package/lib/commands/role/user-add.js +1 -1
  187. package/lib/commands/role/user-remove.js +1 -1
  188. package/lib/commands/role/user-resolve.js +1 -1
  189. package/lib/commands/run/index.js +1 -1
  190. package/lib/commands/schema.js +1 -1
  191. package/lib/commands/sql/create.js +1 -1
  192. package/lib/commands/sql/delete.js +1 -1
  193. package/lib/commands/sql/detail.js +1 -1
  194. package/lib/commands/sql/exec.js +1 -1
  195. package/lib/commands/sql/index.js +1 -1
  196. package/lib/commands/sql/list.js +1 -1
  197. package/lib/commands/sql/pull.js +1 -1
  198. package/lib/commands/sql/push.js +1 -1
  199. package/lib/commands/sql/shared.js +1 -1
  200. package/lib/commands/sql/status.js +1 -1
  201. package/lib/commands/sql/validate.js +1 -1
  202. package/lib/commands/task/index.js +1 -1
  203. package/lib/commands/task/status.js +1 -1
  204. package/lib/commands/tenant/index.js +1 -1
  205. package/lib/commands/tenant/members-list.js +1 -1
  206. package/lib/commands/tenant/shared.js +1 -1
  207. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  208. package/lib/commands/user-account/index.js +1 -1
  209. package/lib/commands/workspace/add.js +1 -1
  210. package/lib/commands/workspace/index.js +1 -1
  211. package/lib/commands/workspace/remove.js +1 -1
  212. package/lib/config/deployment-sync.js +1 -1
  213. package/lib/config/domain-config.d.ts +1 -1
  214. package/lib/config/domain-config.js +1 -1
  215. package/lib/config/project-routing.js +1 -1
  216. package/lib/config/schema.d.ts +1 -1
  217. package/lib/config/schema.js +1 -1
  218. package/lib/constant/cdn.js +1 -1
  219. package/lib/constant/cli.js +1 -1
  220. package/lib/constant/defaults.js +1 -1
  221. package/lib/constant/domain.d.ts +2 -0
  222. package/lib/constant/domain.js +1 -1
  223. package/lib/constant/env.js +1 -1
  224. package/lib/constant/output.js +1 -1
  225. package/lib/constant/paths.js +1 -1
  226. package/lib/constant/region.js +1 -1
  227. package/lib/constant/risk.js +1 -1
  228. package/lib/constant/routing-profile.js +1 -1
  229. package/lib/context/app-resolver.js +1 -1
  230. package/lib/context/auth-resolver.js +1 -1
  231. package/lib/context/config-loader.js +1 -1
  232. package/lib/context.js +1 -1
  233. package/lib/core/alias-resolver.js +1 -1
  234. package/lib/core/api-client.d.ts +0 -16
  235. package/lib/core/api-client.js +1 -1
  236. package/lib/core/bff/config.js +1 -1
  237. package/lib/core/bff/file-system.js +1 -1
  238. package/lib/core/bff/hash.js +1 -1
  239. package/lib/core/bff/lock.js +1 -1
  240. package/lib/core/bff/utils.js +1 -1
  241. package/lib/core/db-resolver.js +1 -1
  242. package/lib/core/kb-search-client.d.ts +30 -0
  243. package/lib/core/kb-search-client.js +1 -0
  244. package/lib/core/page/file-system.js +1 -1
  245. package/lib/core/page/hash.js +1 -1
  246. package/lib/core/page/lock.js +1 -1
  247. package/lib/core/sql-index-auditor.js +1 -1
  248. package/lib/core/sql-sync/config.js +1 -1
  249. package/lib/core/sql-sync/file-system.js +1 -1
  250. package/lib/core/sql-sync/hash.js +1 -1
  251. package/lib/core/sql-sync/lock.js +1 -1
  252. package/lib/core/sql-sync/utils.js +1 -1
  253. package/lib/core/sql-validator.js +1 -1
  254. package/lib/errors.js +1 -1
  255. package/lib/framework/build-all-flags.js +1 -1
  256. package/lib/framework/error-output.js +1 -1
  257. package/lib/framework/explicit-yes.js +1 -1
  258. package/lib/framework/flags.js +1 -1
  259. package/lib/framework/help.js +1 -1
  260. package/lib/framework/index.js +1 -1
  261. package/lib/framework/output.js +1 -1
  262. package/lib/framework/response.js +1 -1
  263. package/lib/framework/runner-alias.js +1 -1
  264. package/lib/framework/runner.js +1 -1
  265. package/lib/framework/schema-export.js +1 -1
  266. package/lib/framework/types.d.ts +1 -0
  267. package/lib/framework/types.js +1 -1
  268. package/lib/generated/build-info.d.ts +4 -4
  269. package/lib/generated/build-info.js +1 -1
  270. package/lib/help.js +1 -1
  271. package/lib/postinstall.js +1 -1
  272. package/lib/runtime/confirmation.js +1 -1
  273. package/lib/runtime/event.js +1 -1
  274. package/lib/runtime/index.js +1 -1
  275. package/lib/runtime/queue.js +1 -1
  276. package/lib/runtime/resolve.js +1 -1
  277. package/lib/skills/builtin-skill.js +1 -1
  278. package/lib/skills/main.js +1 -1
  279. package/lib/skills/npx-skills-add.js +1 -1
  280. package/lib/skills/skill-presence.js +1 -1
  281. package/lib/telemetry/cli-command-trace.js +1 -1
  282. package/lib/telemetry/cli-help-trace.js +1 -1
  283. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  284. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  285. package/lib/telemetry/send-cli-trace-log.js +1 -1
  286. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  287. package/lib/utils/ai_config.js +1 -1
  288. package/lib/utils/apply-jq-filter.js +1 -1
  289. package/lib/utils/cdn-config.js +1 -1
  290. package/lib/utils/check-sdk-version.js +1 -1
  291. package/lib/utils/cli-version-check.js +1 -1
  292. package/lib/utils/cli-version-policy.js +1 -1
  293. package/lib/utils/config.js +1 -1
  294. package/lib/utils/entity-with-id.js +1 -1
  295. package/lib/utils/file-utils.js +1 -1
  296. package/lib/utils/guides-cdn.js +1 -1
  297. package/lib/utils/http-client.js +1 -1
  298. package/lib/utils/is-non-interactive.js +1 -1
  299. package/lib/utils/logger.js +1 -1
  300. package/lib/utils/params.js +1 -1
  301. package/lib/utils/platform.js +1 -1
  302. package/lib/utils/sleep.js +1 -1
  303. package/lib/utils/template-replacer.js +1 -1
  304. package/lib/utils/update-notice.js +1 -1
  305. package/lib/utils/version.js +1 -1
  306. package/lib/utils/with-active-cookie.js +1 -1
  307. package/lib/utils/write-cli-side-channel.js +1 -1
  308. package/package.json +1 -1
  309. package/skills/rabetbase/SKILL.md +2 -2
  310. package/skills/rabetbase/references/rabetbase-config.md +4 -1
  311. package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
  312. package/skills/rabetbase/references/rabetbase-init.md +2 -0
  313. package/skills/rabetbase/references/rabetbase-kb.md +7 -7
  314. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a50_0x569d(_0x143d5e,_0x2890a0){_0x143d5e=_0x143d5e-0xbb;const _0x23fb39=a50_0x23fb();let _0x569d1a=_0x23fb39[_0x143d5e];return _0x569d1a;}function a50_0x23fb(){const _0x12a962=['7336005MzlLDu','trim','test','1638432xcjzad','length','14jyrsRH','3fHkvZT','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','3772gOmfOR','250RgGDDC','5422292TiHMYy','507815MFHfDU','App\x20Code\x20cannot\x20exceed\x20100\x20characters','359HzBLzY','3217482MyAfDh','5245857osscWA'];a50_0x23fb=function(){return _0x12a962;};return a50_0x23fb();}(function(_0x17f888,_0x10e8c0){const _0x2d89a6=a50_0x569d,_0x9ad6cb=_0x17f888();while(!![]){try{const _0x118280=parseInt(_0x2d89a6(0xc9))/0x1*(-parseInt(_0x2d89a6(0xc4))/0x2)+-parseInt(_0x2d89a6(0xc2))/0x3*(parseInt(_0x2d89a6(0xc6))/0x4)+parseInt(_0x2d89a6(0xbc))/0x5+-parseInt(_0x2d89a6(0xca))/0x6*(-parseInt(_0x2d89a6(0xc1))/0x7)+-parseInt(_0x2d89a6(0xbf))/0x8+-parseInt(_0x2d89a6(0xbb))/0x9+parseInt(_0x2d89a6(0xc5))/0xa*(parseInt(_0x2d89a6(0xc7))/0xb);if(_0x118280===_0x10e8c0)break;else _0x9ad6cb['push'](_0x9ad6cb['shift']());}catch(_0x2cb4e9){_0x9ad6cb['push'](_0x9ad6cb['shift']());}}}(a50_0x23fb,0xd5418));export function validateAppcode(_0x1e3a5a){const _0x2992f4=a50_0x569d,_0x2c5101=_0x1e3a5a[_0x2992f4(0xbd)]();if(!_0x2c5101)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x2c5101[_0x2992f4(0xc0)]>0x64)return{'valid':![],'message':_0x2992f4(0xc8)};if(!/^[A-Za-z0-9_-]+$/[_0x2992f4(0xbe)](_0x2c5101))return{'valid':![],'message':_0x2992f4(0xc3)};return{'valid':!![]};}
1
+ (function(_0x3d7e6a,_0x400993){const _0x5543dd=a50_0x1d54,_0x359cbf=_0x3d7e6a();while(!![]){try{const _0x55392d=-parseInt(_0x5543dd(0x152))/0x1+-parseInt(_0x5543dd(0x148))/0x2+-parseInt(_0x5543dd(0x154))/0x3+-parseInt(_0x5543dd(0x14d))/0x4*(-parseInt(_0x5543dd(0x14c))/0x5)+-parseInt(_0x5543dd(0x151))/0x6+parseInt(_0x5543dd(0x153))/0x7+parseInt(_0x5543dd(0x150))/0x8;if(_0x55392d===_0x400993)break;else _0x359cbf['push'](_0x359cbf['shift']());}catch(_0x343f5e){_0x359cbf['push'](_0x359cbf['shift']());}}}(a50_0x2a76,0x3ff5d));function a50_0x1d54(_0x3f3d82,_0x220269){_0x3f3d82=_0x3f3d82-0x148;const _0x2a760c=a50_0x2a76();let _0x1d54ed=_0x2a760c[_0x3f3d82];return _0x1d54ed;}function a50_0x2a76(){const _0x49238a=['App\x20Code\x20cannot\x20be\x20empty','8520iyXZGw','864dVehxK','App\x20Code\x20cannot\x20exceed\x20100\x20characters','trim','6239368ZGlAOa','1876098kRNLyI','133326dkmLHd','1249668XVdYRt','1546260REtPao','206198HwZJzy','test','length'];a50_0x2a76=function(){return _0x49238a;};return a50_0x2a76();}export function validateAppcode(_0x537d02){const _0x21143a=a50_0x1d54,_0x18e0e6=_0x537d02[_0x21143a(0x14f)]();if(!_0x18e0e6)return{'valid':![],'message':_0x21143a(0x14b)};if(_0x18e0e6[_0x21143a(0x14a)]>0x64)return{'valid':![],'message':_0x21143a(0x14e)};if(!/^[A-Za-z0-9_-]+$/[_0x21143a(0x149)](_0x18e0e6))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a51_0x4503bd=a51_0x4e6e;function a51_0x2daf(){const _0x32c5c3=['3966rvSTNF','has','\x22\x20is\x20not\x20deletable.','1219414YzvWrT','25067aNJuTa','Project','1103112dZkVdI','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','boolean','Global','defaultApp','global','hasOwnProperty','inherit','32661VFMiDq','8059860YNbwdF','delete','Usage:\x20','696CmKxEG','Top-level\x20key\x20\x22','config','\x20deleted','validation','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','args','prototype','10Utpjts','\x20already\x20absent','138fMvzUt','770404GnXqUy','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','trim'];a51_0x2daf=function(){return _0x32c5c3;};return a51_0x2daf();}(function(_0x30a751,_0xa8bf7a){const _0x2895dd=a51_0x4e6e,_0x52c3e7=_0x30a751();while(!![]){try{const _0x1a4338=parseInt(_0x2895dd(0xf9))/0x1+-parseInt(_0x2895dd(0xf1))/0x2*(parseInt(_0x2895dd(0xf5))/0x3)+parseInt(_0x2895dd(0xf2))/0x4+parseInt(_0x2895dd(0xef))/0x5*(-parseInt(_0x2895dd(0xfb))/0x6)+parseInt(_0x2895dd(0xf8))/0x7+parseInt(_0x2895dd(0xe7))/0x8*(-parseInt(_0x2895dd(0xe3))/0x9)+parseInt(_0x2895dd(0xe4))/0xa;if(_0x1a4338===_0xa8bf7a)break;else _0x52c3e7['push'](_0x52c3e7['shift']());}catch(_0x3f096c){_0x52c3e7['push'](_0x52c3e7['shift']());}}}(a51_0x2daf,0x6752b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';function a51_0x4e6e(_0x3ebaef,_0x40a7ad){_0x3ebaef=_0x3ebaef-0xe3;const _0x2daf46=a51_0x2daf();let _0x4e6e68=_0x2daf46[_0x3ebaef];return _0x4e6e68;}const LEGACY_DELETABLE_KEYS=new Set([a51_0x4503bd(0x102)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x4503bd(0xff)]);async function execute(_0x51e209){const _0x46ac1e=a51_0x4503bd,_0x3e71a4=_0x51e209[_0x46ac1e(0xed)][0x0]?.[_0x46ac1e(0xf4)]();if(!_0x3e71a4)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x46ac1e(0xe6)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(_0x3e71a4==='riskLevel')throw CliErrors[_0x46ac1e(0xeb)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x3e71a4)&&!EXTRA_DELETABLE_KEYS[_0x46ac1e(0xf6)](_0x3e71a4)&&!LEGACY_DELETABLE_KEYS['has'](_0x3e71a4))throw CliErrors['validation'](_0x46ac1e(0xe8)+_0x3e71a4+_0x46ac1e(0xf7),'Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.');const _0x31838e=resolveWriteScope({'global':_0x51e209['bool'](_0x46ac1e(0x100))}),_0x1ee8f6=readScopedConfig(_0x31838e),_0x1de00a=Object[_0x46ac1e(0xee)][_0x46ac1e(0x101)]['call'](_0x1ee8f6,_0x3e71a4);_0x1de00a&&(delete _0x1ee8f6[_0x3e71a4],writeScopedConfig(_0x1ee8f6,_0x31838e));const _0x102910=_0x31838e===_0x46ac1e(0x100)?_0x46ac1e(0xfe):_0x46ac1e(0xfa);return{'ok':!![],'message':_0x1de00a?'✓\x20'+_0x102910+'\x20'+_0x3e71a4+_0x46ac1e(0xea):'✓\x20'+_0x102910+'\x20'+_0x3e71a4+_0x46ac1e(0xf0),'data':{'key':_0x3e71a4,'scope':_0x31838e,'changed':_0x1de00a}};}export const configDeleteDefinition={'service':a51_0x4503bd(0xe9),'command':a51_0x4503bd(0xe5),'description':a51_0x4503bd(0xec),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a51_0x4503bd(0xfc),'required':!![]}],'flags':[{'name':'global','type':a51_0x4503bd(0xfd),'description':a51_0x4503bd(0xf3),'default':![]}],'execute':execute};
1
+ const a51_0x5e1b6b=a51_0x21fd;(function(_0x2d9244,_0x5858e7){const _0x11f1d8=a51_0x21fd,_0x35d4ae=_0x2d9244();while(!![]){try{const _0xed1759=parseInt(_0x11f1d8(0x1ff))/0x1+-parseInt(_0x11f1d8(0x201))/0x2+-parseInt(_0x11f1d8(0x1f2))/0x3+parseInt(_0x11f1d8(0x1f9))/0x4*(parseInt(_0x11f1d8(0x1f5))/0x5)+-parseInt(_0x11f1d8(0x1ec))/0x6+parseInt(_0x11f1d8(0x1fd))/0x7*(parseInt(_0x11f1d8(0x202))/0x8)+parseInt(_0x11f1d8(0x208))/0x9;if(_0xed1759===_0x5858e7)break;else _0x35d4ae['push'](_0x35d4ae['shift']());}catch(_0x3a09b7){_0x35d4ae['push'](_0x35d4ae['shift']());}}}(a51_0xd276,0xd6e3c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a51_0x5e1b6b(0x205)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x5e1b6b(0x1fa)]);function a51_0x21fd(_0x1fc6f0,_0x19e986){_0x1fc6f0=_0x1fc6f0-0x1ea;const _0xd27662=a51_0xd276();let _0x21fd9e=_0xd27662[_0x1fc6f0];return _0x21fd9e;}async function execute(_0x58dc17){const _0x5c0e25=a51_0x5e1b6b,_0x280270=_0x58dc17[_0x5c0e25(0x1ea)][0x0]?.[_0x5c0e25(0x20a)]();if(!_0x280270)throw CliErrors[_0x5c0e25(0x1f8)](_0x5c0e25(0x1ed),'Usage:\x20'+CLI_BIN_NAME+_0x5c0e25(0x204));if(_0x280270===_0x5c0e25(0x1eb))throw CliErrors[_0x5c0e25(0x1f8)](_0x5c0e25(0x1ef));if(!isTopLevelConfigKey(_0x280270)&&!EXTRA_DELETABLE_KEYS[_0x5c0e25(0x1fc)](_0x280270)&&!LEGACY_DELETABLE_KEYS[_0x5c0e25(0x1fc)](_0x280270))throw CliErrors[_0x5c0e25(0x1f8)]('Top-level\x20key\x20\x22'+_0x280270+_0x5c0e25(0x1f7),_0x5c0e25(0x1f6));const _0x43a3dd=resolveWriteScope({'global':_0x58dc17['bool']('global')}),_0x400bb2=readScopedConfig(_0x43a3dd),_0x56dde9=Object[_0x5c0e25(0x1ee)][_0x5c0e25(0x203)][_0x5c0e25(0x1fe)](_0x400bb2,_0x280270);_0x56dde9&&(delete _0x400bb2[_0x280270],writeScopedConfig(_0x400bb2,_0x43a3dd));const _0x175420=_0x43a3dd===_0x5c0e25(0x1f1)?'Global':_0x5c0e25(0x200);return{'ok':!![],'message':_0x56dde9?'✓\x20'+_0x175420+'\x20'+_0x280270+_0x5c0e25(0x1f4):'✓\x20'+_0x175420+'\x20'+_0x280270+_0x5c0e25(0x206),'data':{'key':_0x280270,'scope':_0x43a3dd,'changed':_0x56dde9}};}function a51_0xd276(){const _0x521468=['write','\x20deleted','2217170jXiWwf','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x22\x20is\x20not\x20deletable.','validation','12iZPVcT','defaultApp','delete','has','7QdZzYK','call','1191627Fnydcq','Project','976496fRUiMI','474000qmdeEs','hasOwnProperty','\x20config\x20delete\x20<key>\x20[--global]','inherit','\x20already\x20absent','config','12660948LRJkda','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','trim','args','riskLevel','6286764mXaxno','Missing\x20key\x20argument.','prototype','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','boolean','global','4715163cBPtJS'];a51_0xd276=function(){return _0x521468;};return a51_0xd276();}export const configDeleteDefinition={'service':a51_0x5e1b6b(0x207),'command':a51_0x5e1b6b(0x1fb),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':a51_0x5e1b6b(0x1f3),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a51_0x5e1b6b(0x209),'required':!![]}],'flags':[{'name':'global','type':a51_0x5e1b6b(0x1f0),'description':'Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a52_0x3133e3=a52_0x3737;(function(_0x350e36,_0x1f505c){const _0xf4f7a3=a52_0x3737,_0x1fd1e2=_0x350e36();while(!![]){try{const _0x2b9d47=parseInt(_0xf4f7a3(0x90))/0x1+parseInt(_0xf4f7a3(0x98))/0x2+parseInt(_0xf4f7a3(0x91))/0x3+-parseInt(_0xf4f7a3(0x95))/0x4+-parseInt(_0xf4f7a3(0x97))/0x5+-parseInt(_0xf4f7a3(0x8d))/0x6*(-parseInt(_0xf4f7a3(0x8c))/0x7)+parseInt(_0xf4f7a3(0x8e))/0x8;if(_0x2b9d47===_0x1f505c)break;else _0x1fd1e2['push'](_0x1fd1e2['shift']());}catch(_0x26fbf6){_0x1fd1e2['push'](_0x1fd1e2['shift']());}}}(a52_0x4423,0x2fecf));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3c0681){const _0x658281=a52_0x3737,_0x304bc4=_0x3c0681[_0x658281(0x8f)](_0x658281(0x89));if(!_0x304bc4)throw CliErrors['validation'](_0x658281(0x99),_0x658281(0x96)+CLI_BIN_NAME+_0x658281(0x8a));const _0x337b42=readConfig(),_0x208861=_0x304bc4===_0x658281(0x9a)?_0x658281(0x92):_0x304bc4,_0xff2b65=_0x337b42[_0x208861];if(_0xff2b65===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x304bc4);return{'ok':!![],'data':typeof _0xff2b65==='object'?_0xff2b65:{[_0x208861]:_0xff2b65},'message':typeof _0xff2b65===_0x658281(0x9c)?undefined:String(_0xff2b65)};}function a52_0x3737(_0x3e0b95,_0x1fd0d5){_0x3e0b95=_0x3e0b95-0x89;const _0x442354=a52_0x4423();let _0x373722=_0x442354[_0x3e0b95];return _0x373722;}export const configGetDefinition={'service':a52_0x3133e3(0x9b),'command':a52_0x3133e3(0x93),'description':a52_0x3133e3(0x94),'risk':a52_0x3133e3(0x8b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x3133e3(0x89),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a52_0x4423(){const _0x4eacee=['Missing\x20key.','app','config','object','key','\x20config\x20get\x20--key\x20<key>','read','1674799TYvnyN','6DLtqqd','366176YEeMAZ','str','23594JzTDKy','1153653EzWTQh','appcode','get','Get\x20a\x20config\x20value\x20by\x20key','1544380xhamnb','Usage:\x20','1381915iXzgCR','331214Strqyr'];a52_0x4423=function(){return _0x4eacee;};return a52_0x4423();}
1
+ function a52_0x3116(){const _0xbccb80=['2642282tUCuFz','56UreUSd','875OCOxhR','appcode','app','Missing\x20key.','validation','Key\x20not\x20found:\x20','627948rBTAuI','55617ncctlP','\x20config\x20get\x20--key\x20<key>','7339480GQoNlq','object','string','8518433BDCWtu','143mKgENm','config','1PLwNks','key','27nkdEPR','57804vwrHGp','str','Get\x20a\x20config\x20value\x20by\x20key','get','1102952vgCufg'];a52_0x3116=function(){return _0xbccb80;};return a52_0x3116();}const a52_0x37b6fd=a52_0x143c;(function(_0x51b22f,_0x22c339){const _0x2669be=a52_0x143c,_0x470873=_0x51b22f();while(!![]){try{const _0x3eb9af=-parseInt(_0x2669be(0x1e9))/0x1*(parseInt(_0x2669be(0x1f1))/0x2)+parseInt(_0x2669be(0x1e1))/0x3*(-parseInt(_0x2669be(0x1f2))/0x4)+parseInt(_0x2669be(0x1f3))/0x5*(parseInt(_0x2669be(0x1ec))/0x6)+parseInt(_0x2669be(0x1e6))/0x7+-parseInt(_0x2669be(0x1f0))/0x8*(parseInt(_0x2669be(0x1eb))/0x9)+parseInt(_0x2669be(0x1e3))/0xa+-parseInt(_0x2669be(0x1e7))/0xb*(parseInt(_0x2669be(0x1e0))/0xc);if(_0x3eb9af===_0x22c339)break;else _0x470873['push'](_0x470873['shift']());}catch(_0x5d2c03){_0x470873['push'](_0x470873['shift']());}}}(a52_0x3116,0xeaec6));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x1b294f){const _0x245a33=a52_0x143c,_0x1648ad=_0x1b294f[_0x245a33(0x1ed)](_0x245a33(0x1ea));if(!_0x1648ad)throw CliErrors[_0x245a33(0x1f7)](_0x245a33(0x1f6),'Usage:\x20'+CLI_BIN_NAME+_0x245a33(0x1e2));const _0x1388bb=readConfig(),_0x24149b=_0x1648ad===_0x245a33(0x1f5)?_0x245a33(0x1f4):_0x1648ad,_0x2bc474=_0x1388bb[_0x24149b];if(_0x2bc474===undefined)throw CliErrors[_0x245a33(0x1f7)](_0x245a33(0x1df)+_0x1648ad);return{'ok':!![],'data':typeof _0x2bc474===_0x245a33(0x1e4)?_0x2bc474:{[_0x24149b]:_0x2bc474},'message':typeof _0x2bc474===_0x245a33(0x1e4)?undefined:String(_0x2bc474)};}function a52_0x143c(_0x371130,_0x2a2a22){_0x371130=_0x371130-0x1df;const _0x31165f=a52_0x3116();let _0x143caa=_0x31165f[_0x371130];return _0x143caa;}export const configGetDefinition={'service':a52_0x37b6fd(0x1e8),'command':a52_0x37b6fd(0x1ef),'description':a52_0x37b6fd(0x1ee),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x37b6fd(0x1ea),'type':a52_0x37b6fd(0x1e5),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x4887c0,_0x106b95){const _0x20b2f4=a53_0x36c1,_0x5340d6=_0x4887c0();while(!![]){try{const _0x45fa5d=-parseInt(_0x20b2f4(0x176))/0x1*(parseInt(_0x20b2f4(0x17e))/0x2)+-parseInt(_0x20b2f4(0x178))/0x3*(-parseInt(_0x20b2f4(0x17d))/0x4)+parseInt(_0x20b2f4(0x17b))/0x5*(parseInt(_0x20b2f4(0x177))/0x6)+parseInt(_0x20b2f4(0x175))/0x7+parseInt(_0x20b2f4(0x17a))/0x8*(-parseInt(_0x20b2f4(0x179))/0x9)+-parseInt(_0x20b2f4(0x17c))/0xa*(parseInt(_0x20b2f4(0x181))/0xb)+parseInt(_0x20b2f4(0x180))/0xc*(parseInt(_0x20b2f4(0x17f))/0xd);if(_0x45fa5d===_0x106b95)break;else _0x5340d6['push'](_0x5340d6['shift']());}catch(_0x1ed32b){_0x5340d6['push'](_0x5340d6['shift']());}}}(a53_0x5edb,0xcb07b));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a53_0x36c1(_0x1803f0,_0x569917){_0x1803f0=_0x1803f0-0x175;const _0x5edb21=a53_0x5edb();let _0x36c1a3=_0x5edb21[_0x1803f0];return _0x36c1a3;}function a53_0x5edb(){const _0x5a42f4=['50WXIFrM','16BmiTWC','2848574pOuLZD','103571WJLLuD','2244MqNnqi','3218611EyRyCy','8073135pXWhfA','1NcPIfg','22182YiBJox','361773NQeLgD','117BqQhun','619936aHHbKP','2165hNYRsa'];a53_0x5edb=function(){return _0x5a42f4;};return a53_0x5edb();}import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
1
+ (function(_0x418997,_0x5de5ef){const _0x3c500d=a53_0x1b8e,_0x205d66=_0x418997();while(!![]){try{const _0x34e702=-parseInt(_0x3c500d(0x15d))/0x1*(parseInt(_0x3c500d(0x15f))/0x2)+-parseInt(_0x3c500d(0x160))/0x3*(parseInt(_0x3c500d(0x15a))/0x4)+parseInt(_0x3c500d(0x15e))/0x5+parseInt(_0x3c500d(0x159))/0x6+-parseInt(_0x3c500d(0x162))/0x7*(-parseInt(_0x3c500d(0x158))/0x8)+-parseInt(_0x3c500d(0x161))/0x9*(-parseInt(_0x3c500d(0x15b))/0xa)+parseInt(_0x3c500d(0x15c))/0xb;if(_0x34e702===_0x5de5ef)break;else _0x205d66['push'](_0x205d66['shift']());}catch(_0x543e7b){_0x205d66['push'](_0x205d66['shift']());}}}(a53_0x17e1,0xdf1af));function a53_0x1b8e(_0x4eb79d,_0x3598f2){_0x4eb79d=_0x4eb79d-0x158;const _0x17e103=a53_0x17e1();let _0x1b8ef7=_0x17e103[_0x4eb79d];return _0x1b8ef7;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';function a53_0x17e1(){const _0x5dbcdb=['8jSNodT','9964872QpcpUE','684524KXVBem','120SoiEAF','15650261knNvyR','2493mIfsLo','211625YvXWhr','1214CgBGxR','27ErDtEV','406431alTAhy','2096311MZYkKn'];a53_0x17e1=function(){return _0x5dbcdb;};return a53_0x17e1();}import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
@@ -6,7 +6,7 @@ export declare function executeConfigInit(ctx: RuntimeContext): Promise<{
6
6
  data: {
7
7
  mode: string;
8
8
  region: "global" | "id" | "cn" | null;
9
- domains: Partial<Record<"apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "appDomain" | "localDomain" | "certificateDomain", string>>;
9
+ domains: Partial<Record<"apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "kbSearchDomain" | "appDomain" | "localDomain" | "certificateDomain", string>>;
10
10
  };
11
11
  }>;
12
12
  export declare const configInitDefinition: CommandDefinition;
@@ -1 +1 @@
1
- const a54_0x392ecf=a54_0xd8ef;(function(_0xfb7e5f,_0xbaa3ca){const _0x25d9c2=a54_0xd8ef,_0x2c1a67=_0xfb7e5f();while(!![]){try{const _0x243d07=parseInt(_0x25d9c2(0xcf))/0x1*(parseInt(_0x25d9c2(0xdc))/0x2)+-parseInt(_0x25d9c2(0xde))/0x3*(parseInt(_0x25d9c2(0xbb))/0x4)+-parseInt(_0x25d9c2(0xc7))/0x5+-parseInt(_0x25d9c2(0xbc))/0x6+-parseInt(_0x25d9c2(0xb9))/0x7*(-parseInt(_0x25d9c2(0xce))/0x8)+-parseInt(_0x25d9c2(0xcb))/0x9*(parseInt(_0x25d9c2(0xb8))/0xa)+parseInt(_0x25d9c2(0xe3))/0xb;if(_0x243d07===_0xbaa3ca)break;else _0x2c1a67['push'](_0x2c1a67['shift']());}catch(_0x1ef7d1){_0x2c1a67['push'](_0x2c1a67['shift']());}}}(a54_0x1862,0x4537c));function a54_0xd8ef(_0x2a2af8,_0x5e631d){_0x2a2af8=_0x2a2af8-0xb4;const _0x186270=a54_0x1862();let _0xd8ef61=_0x186270[_0x2a2af8];return _0xd8ef61;}import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainFlags}from'../../config/domain-config.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';function a54_0x1862(){const _0x8f500=['875077NUFdyh','api-domain','679132HAtiyw','2935620CxZOKG','runtime-domain','region','keys','skill-domain','config','Updates\x20the\x20global\x20Rabetbase\x20region\x20or\x20independent-deployment\x20domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','Custom\x20SkillHub\x20HTTPS\x20origin','ExitPromptError','certificate-domain','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','2721130dJPWAJ','Custom\x20local\x20callback\x20HTTPS\x20origin','Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','26883ESbVoZ','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','init','24pCFCpG','28859BUDqLD','independent','cancelled','Indonesia\x20(id)','validation','\x22\x20is\x20not\x20currently\x20available.','Region\x20\x22','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','Select\x20Lovrabet\x20region','localDomain','Custom\x20Runtime\x20HTTPS\x20origin','Independent-deployment\x20Domain\x20JSON\x20file','str','2MqNHPd','app-domain','6qhcDcD','Custom\x20knowledge-base\x20HTTPS\x20origin','global','Custom\x20User\x20HTTPS\x20origin','assign','18445240ViVQhR','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','name','join','string','user-domain','write','Custom\x20certificate\x20service\x20HTTPS\x20origin','1420giqDBX'];a54_0x1862=function(){return _0x8f500;};return a54_0x1862();}export const configInitFlags=[{'name':a54_0x392ecf(0xbe),'type':a54_0x392ecf(0xb4),'description':a54_0x392ecf(0xc9),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':a54_0x392ecf(0xb4),'description':a54_0x392ecf(0xda)},{'name':a54_0x392ecf(0xb5),'type':'string','description':a54_0x392ecf(0xe1)},{'name':a54_0x392ecf(0xba),'type':a54_0x392ecf(0xb4),'description':'Custom\x20platform\x20API\x20HTTPS\x20origin'},{'name':a54_0x392ecf(0xbd),'type':'string','description':a54_0x392ecf(0xd9)},{'name':a54_0x392ecf(0xc0),'type':a54_0x392ecf(0xb4),'description':a54_0x392ecf(0xc3)},{'name':'kb-domain','type':a54_0x392ecf(0xb4),'description':a54_0x392ecf(0xdf)},{'name':a54_0x392ecf(0xdd),'type':a54_0x392ecf(0xb4),'description':a54_0x392ecf(0xc6)},{'name':'local-domain','type':a54_0x392ecf(0xb4),'description':a54_0x392ecf(0xc8)},{'name':a54_0x392ecf(0xc5),'type':a54_0x392ecf(0xb4),'description':a54_0x392ecf(0xb7)}];async function resolveRegion(_0x2cf3dc){const _0x36ff68=a54_0x392ecf,_0x54ae41=_0x2cf3dc[_0x36ff68(0xdb)](_0x36ff68(0xbe));if(_0x54ae41){if(!isEnabledLovrabetRegion(_0x54ae41))throw CliErrors[_0x36ff68(0xd3)](_0x36ff68(0xd5)+_0x54ae41+_0x36ff68(0xd4),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x36ff68(0xe6)](',\x20'));return _0x54ae41;}if(_0x2cf3dc['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x36ff68(0xd7),'default':DEFAULT_LOVRABET_REGION,'choices':[{'name':'Mainland\x20China\x20(cn)','value':'cn'},{'name':_0x36ff68(0xd2),'value':'id'}]});}catch(_0x4614ab){if(_0x4614ab?.[_0x36ff68(0xe5)]===_0x36ff68(0xc4))throw CliErrors[_0x36ff68(0xd1)]();throw _0x4614ab;}}export async function executeConfigInit(_0x2fd66a){const _0x29b192=a54_0x392ecf,_0x266c8d=resolveDomainFlags(_0x2fd66a),_0x7006bb=Object[_0x29b192(0xbf)](_0x266c8d)['length']>0x0;if(_0x7006bb&&_0x2fd66a[_0x29b192(0xdb)](_0x29b192(0xbe)))throw CliErrors[_0x29b192(0xd3)](_0x29b192(0xe4));if(!!_0x266c8d[_0x29b192(0xd8)]!==!!_0x266c8d['certificateDomain'])throw CliErrors[_0x29b192(0xd3)](_0x29b192(0xd6));const _0x4dd71a=readScopedConfig(_0x29b192(0xe0));for(const _0x3cd8ce of DOMAIN_CONFIG_FIELDS)delete _0x4dd71a[_0x3cd8ce];for(const _0x3bbfe9 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x4dd71a[_0x3bbfe9];let _0x1450c4=null;if(_0x7006bb)delete _0x4dd71a['region'],Object[_0x29b192(0xe2)](_0x4dd71a,_0x266c8d);else{_0x1450c4=await resolveRegion(_0x2fd66a);if(_0x1450c4===DEFAULT_LOVRABET_REGION)delete _0x4dd71a[_0x29b192(0xbe)];else _0x4dd71a[_0x29b192(0xbe)]=_0x1450c4;}return writeScopedConfig(_0x4dd71a,_0x29b192(0xe0)),{'ok':!![],'message':_0x7006bb?'Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object[_0x29b192(0xbf)](_0x266c8d)[_0x29b192(0xe6)](',\x20')+'.':_0x29b192(0xcc)+_0x1450c4+'.','data':{'mode':_0x7006bb?_0x29b192(0xd0):'official','region':_0x1450c4,'domains':_0x266c8d}};}export const configInitDefinition={'service':a54_0x392ecf(0xc1),'command':a54_0x392ecf(0xcd),'description':a54_0x392ecf(0xca),'risk':a54_0x392ecf(0xb6),'confirmationDescription':a54_0x392ecf(0xc2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
1
+ const a54_0x484684=a54_0xac5f;function a54_0x2868(){const _0x3e1f56=['Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','global','2004303tbYSlv','region','186230OjRyXs','26TumLGB','Custom\x20local\x20callback\x20HTTPS\x20origin','name','string','Mainland\x20China\x20(cn)','Custom\x20KB\x20Search\x20HTTPS\x20origin','domain-config','independent','ExitPromptError','Available\x20regions:\x20','Select\x20Lovrabet\x20region','15372744oqfoZS','Indonesia\x20(id)','keys','assign','Custom\x20SkillHub\x20HTTPS\x20origin','Independent-deployment\x20Domain\x20JSON\x20file','kb-domain','Custom\x20certificate\x20service\x20HTTPS\x20origin','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','7sservq','2126460jGKZCY','11HfoOzO','str','301096BbBHIv','certificate-domain','official','Custom\x20knowledge-base\x20HTTPS\x20origin','Region\x20\x22','local-domain','write','24874lDRTGe','length','Custom\x20platform\x20API\x20HTTPS\x20origin','cancelled','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','153gnaDsS','kb-search-domain','76PquYub','12cVfiYz','Custom\x20Runtime\x20HTTPS\x20origin','8209100NZImEb','\x22\x20is\x20not\x20currently\x20available.','Custom\x20User\x20HTTPS\x20origin','validation','join','api-domain','user-domain','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.'];a54_0x2868=function(){return _0x3e1f56;};return a54_0x2868();}(function(_0x7378a0,_0x977329){const _0x25df64=a54_0xac5f,_0x36d943=_0x7378a0();while(!![]){try{const _0x5cb96c=parseInt(_0x25df64(0x15f))/0x1*(parseInt(_0x25df64(0x133))/0x2)+-parseInt(_0x25df64(0x148))/0x3+parseInt(_0x25df64(0x13a))/0x4*(-parseInt(_0x25df64(0x14a))/0x5)+parseInt(_0x25df64(0x13b))/0x6*(parseInt(_0x25df64(0x160))/0x7)+-parseInt(_0x25df64(0x163))/0x8*(parseInt(_0x25df64(0x138))/0x9)+-parseInt(_0x25df64(0x13d))/0xa*(parseInt(_0x25df64(0x161))/0xb)+parseInt(_0x25df64(0x156))/0xc*(parseInt(_0x25df64(0x14b))/0xd);if(_0x5cb96c===_0x977329)break;else _0x36d943['push'](_0x36d943['shift']());}catch(_0x7a6ac8){_0x36d943['push'](_0x36d943['shift']());}}}(a54_0x2868,0x66985));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';function a54_0xac5f(_0x4cc2dc,_0x309796){_0x4cc2dc=_0x4cc2dc-0x12d;const _0x2868c8=a54_0x2868();let _0xac5fb5=_0x2868c8[_0x4cc2dc];return _0xac5fb5;}import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainFlags}from'../../config/domain-config.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';export const configInitFlags=[{'name':a54_0x484684(0x149),'type':a54_0x484684(0x14e),'description':'Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x484684(0x151),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x15b)},{'name':a54_0x484684(0x143),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x13f)},{'name':a54_0x484684(0x142),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x135)},{'name':'runtime-domain','type':a54_0x484684(0x14e),'description':a54_0x484684(0x13c)},{'name':'skill-domain','type':a54_0x484684(0x14e),'description':a54_0x484684(0x15a)},{'name':a54_0x484684(0x15c),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x12f)},{'name':a54_0x484684(0x139),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x150)},{'name':'app-domain','type':'string','description':a54_0x484684(0x15e)},{'name':a54_0x484684(0x131),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x14c)},{'name':a54_0x484684(0x12d),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x15d)}];async function resolveRegion(_0x4137c4){const _0x59dbe0=a54_0x484684,_0x2800b9=_0x4137c4[_0x59dbe0(0x162)](_0x59dbe0(0x149));if(_0x2800b9){if(!isEnabledLovrabetRegion(_0x2800b9))throw CliErrors[_0x59dbe0(0x140)](_0x59dbe0(0x130)+_0x2800b9+_0x59dbe0(0x13e),_0x59dbe0(0x154)+ENABLED_LOVRABET_REGION_VALUES[_0x59dbe0(0x141)](',\x20'));return _0x2800b9;}if(_0x4137c4['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x59dbe0(0x155),'default':DEFAULT_LOVRABET_REGION,'choices':[{'name':_0x59dbe0(0x14f),'value':'cn'},{'name':_0x59dbe0(0x157),'value':'id'}]});}catch(_0x50cf74){if(_0x50cf74?.[_0x59dbe0(0x14d)]===_0x59dbe0(0x153))throw CliErrors[_0x59dbe0(0x136)]();throw _0x50cf74;}}export async function executeConfigInit(_0x34ade7){const _0x51cf55=a54_0x484684,_0x334bb1=resolveDomainFlags(_0x34ade7),_0x4e71f5=Object['keys'](_0x334bb1)[_0x51cf55(0x134)]>0x0;if(_0x4e71f5&&_0x34ade7[_0x51cf55(0x162)](_0x51cf55(0x149)))throw CliErrors[_0x51cf55(0x140)]('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0x334bb1['localDomain']!==!!_0x334bb1['certificateDomain'])throw CliErrors[_0x51cf55(0x140)](_0x51cf55(0x144));const _0x1663a9=readScopedConfig('global');for(const _0x4fa530 of DOMAIN_CONFIG_FIELDS)delete _0x1663a9[_0x4fa530];for(const _0x406a0d of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x1663a9[_0x406a0d];let _0x2def00=null;if(_0x4e71f5)delete _0x1663a9[_0x51cf55(0x149)],Object[_0x51cf55(0x159)](_0x1663a9,_0x334bb1);else{_0x2def00=await resolveRegion(_0x34ade7);if(_0x2def00===DEFAULT_LOVRABET_REGION)delete _0x1663a9[_0x51cf55(0x149)];else _0x1663a9[_0x51cf55(0x149)]=_0x2def00;}return writeScopedConfig(_0x1663a9,_0x51cf55(0x147)),{'ok':!![],'message':_0x4e71f5?_0x51cf55(0x145)+Object[_0x51cf55(0x158)](_0x334bb1)[_0x51cf55(0x141)](',\x20')+'.':_0x51cf55(0x146)+_0x2def00+'.','data':{'mode':_0x4e71f5?_0x51cf55(0x152):_0x51cf55(0x12e),'region':_0x2def00,'domains':_0x334bb1}};}export const configInitDefinition={'service':'config','command':'init','description':a54_0x484684(0x137),'risk':a54_0x484684(0x132),'confirmationDescription':'Updates\x20the\x20global\x20Rabetbase\x20region\x20or\x20independent-deployment\x20domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
@@ -1 +1 @@
1
- const a55_0x239662=a55_0x1cc1;(function(_0x1c7876,_0x10a931){const _0x50e996=a55_0x1cc1,_0x5165f4=_0x1c7876();while(!![]){try{const _0x570e5=-parseInt(_0x50e996(0xbe))/0x1*(parseInt(_0x50e996(0xb6))/0x2)+parseInt(_0x50e996(0xb0))/0x3+parseInt(_0x50e996(0xb4))/0x4*(-parseInt(_0x50e996(0xbb))/0x5)+-parseInt(_0x50e996(0xb5))/0x6*(-parseInt(_0x50e996(0xb8))/0x7)+-parseInt(_0x50e996(0xb7))/0x8+-parseInt(_0x50e996(0xbd))/0x9+parseInt(_0x50e996(0xb2))/0xa;if(_0x570e5===_0x10a931)break;else _0x5165f4['push'](_0x5165f4['shift']());}catch(_0x481425){_0x5165f4['push'](_0x5165f4['shift']());}}}(a55_0x5dcb,0x6107b));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0xd9603f){const _0xd83de0=a55_0x1cc1,_0x14d114=_0xd9603f[_0xd83de0(0xae)]('global')?readScopedConfig(_0xd83de0(0xbc)):readConfig();return{'ok':!![],'data':_0x14d114};}function a55_0x1cc1(_0x3f6a30,_0xb1638){_0x3f6a30=_0x3f6a30-0xae;const _0x5dcb45=a55_0x5dcb();let _0x1cc10a=_0x5dcb45[_0x3f6a30];return _0x1cc10a;}function a55_0x5dcb(){const _0xca0901=['global','4086801DSiWqt','1wJZJJc','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','bool','read','2193777WlUkab','boolean','2323940cJPVzt','list','502664JvpneU','2451882SJvueG','111236UcnkuC','2715936OcjMXa','7CeLTwO','List\x20all\x20config\x20values','config','5JNquAL'];a55_0x5dcb=function(){return _0xca0901;};return a55_0x5dcb();}export const configListDefinition={'service':a55_0x239662(0xba),'command':a55_0x239662(0xb3),'description':a55_0x239662(0xb9),'risk':a55_0x239662(0xaf),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x239662(0xbc),'type':a55_0x239662(0xb1),'description':a55_0x239662(0xbf),'default':![]}],'execute':execute};
1
+ const a55_0x4004c8=a55_0x2568;function a55_0x2568(_0x3d8af6,_0x2f7d4b){_0x3d8af6=_0x3d8af6-0x154;const _0x58e32f=a55_0x58e3();let _0x2568da=_0x58e32f[_0x3d8af6];return _0x2568da;}(function(_0x498f32,_0x57793c){const _0x3bf424=a55_0x2568,_0x4d4c80=_0x498f32();while(!![]){try{const _0x254322=-parseInt(_0x3bf424(0x160))/0x1*(-parseInt(_0x3bf424(0x157))/0x2)+parseInt(_0x3bf424(0x15a))/0x3*(-parseInt(_0x3bf424(0x155))/0x4)+parseInt(_0x3bf424(0x159))/0x5+-parseInt(_0x3bf424(0x15d))/0x6*(parseInt(_0x3bf424(0x156))/0x7)+-parseInt(_0x3bf424(0x154))/0x8+parseInt(_0x3bf424(0x162))/0x9+parseInt(_0x3bf424(0x164))/0xa;if(_0x254322===_0x57793c)break;else _0x4d4c80['push'](_0x4d4c80['shift']());}catch(_0x2aecb0){_0x4d4c80['push'](_0x4d4c80['shift']());}}}(a55_0x58e3,0xcbe34));function a55_0x58e3(){const _0x4f21c6=['15174lXVIbP','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','2336490YWbuqE','3AefrUU','List\x20all\x20config\x20values','config','18zMOkzW','boolean','read','141HmevyY','bool','6665949PhikUV','global','22038970ApAWYD','9885256npiGCC','5429988otDXPJ','2457805uSCkfH'];a55_0x58e3=function(){return _0x4f21c6;};return a55_0x58e3();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x42cc25){const _0x47791d=a55_0x2568,_0x323f10=_0x42cc25[_0x47791d(0x161)](_0x47791d(0x163))?readScopedConfig(_0x47791d(0x163)):readConfig();return{'ok':!![],'data':_0x323f10};}export const configListDefinition={'service':a55_0x4004c8(0x15c),'command':'list','description':a55_0x4004c8(0x15b),'risk':a55_0x4004c8(0x15f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x4004c8(0x163),'type':a55_0x4004c8(0x15e),'description':a55_0x4004c8(0x158),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a56_0xfa42fb=a56_0x1b54;(function(_0x2dc7c8,_0x1b89ae){const _0x3f3e4b=a56_0x1b54,_0x364a47=_0x2dc7c8();while(!![]){try{const _0x554b9b=parseInt(_0x3f3e4b(0x1f8))/0x1*(-parseInt(_0x3f3e4b(0x1f0))/0x2)+-parseInt(_0x3f3e4b(0x203))/0x3+parseInt(_0x3f3e4b(0x1f9))/0x4*(-parseInt(_0x3f3e4b(0x1fd))/0x5)+parseInt(_0x3f3e4b(0x1f2))/0x6+-parseInt(_0x3f3e4b(0x1de))/0x7+-parseInt(_0x3f3e4b(0x1ec))/0x8+parseInt(_0x3f3e4b(0x205))/0x9;if(_0x554b9b===_0x1b89ae)break;else _0x364a47['push'](_0x364a47['shift']());}catch(_0x447dcf){_0x364a47['push'](_0x364a47['shift']());}}}(a56_0x9010,0x73075));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a56_0x1b54(_0x793ed2,_0x14d18b){_0x793ed2=_0x793ed2-0x1d9;const _0x90102=a56_0x9010();let _0x1b5432=_0x90102[_0x793ed2];return _0x1b5432;}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';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x4827ce){const _0x351705=a56_0x1b54,_0x12ed2e=_0x4827ce['str'](_0x351705(0x1e8)),_0x330dfb=_0x4827ce[_0x351705(0x1f4)](_0x351705(0x1f1));if(!_0x12ed2e)throw CliErrors[_0x351705(0x20a)](_0x351705(0x1fa),'Usage:\x20'+CLI_BIN_NAME+_0x351705(0x1ea));if(_0x330dfb===undefined||_0x330dfb==='')throw CliErrors[_0x351705(0x20a)](_0x351705(0x1df),_0x351705(0x209)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');let _0x4fab5f=_0x12ed2e,_0x583979=_0x330dfb;if(_0x330dfb[_0x351705(0x1e2)]>0x1f4)throw CliErrors[_0x351705(0x20a)](_0x351705(0x1dc));if(_0x12ed2e===_0x351705(0x1e9))throw CliErrors[_0x351705(0x20a)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x12ed2e))throw CliErrors['validation'](_0x351705(0x1fe)+_0x12ed2e+_0x351705(0x1f7),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x12ed2e]&&!CONFIG_ENUM_VALUES[_0x12ed2e]['includes'](_0x330dfb))throw CliErrors[_0x351705(0x20a)]('Invalid\x20value\x20for\x20\x22'+_0x12ed2e+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x12ed2e][_0x351705(0x1e6)](',\x20'));if(_0x12ed2e===_0x351705(0x1f3)&&!normalizeLocale(_0x330dfb))throw CliErrors[_0x351705(0x20a)](_0x351705(0x206),_0x351705(0x1ef));DOMAIN_CONFIG_FIELDS[_0x351705(0x1fc)](_0x12ed2e)&&(_0x583979=normalizeDomainOrigin(_0x12ed2e,_0x330dfb));const _0x3fdb5b={'global':_0x4827ce['bool'](_0x351705(0x1fb))},_0x419464=resolveWriteScope(_0x3fdb5b),_0x1a55ff=readScopedConfig(_0x419464);_0x12ed2e==='app'&&(_0x4fab5f=_0x351705(0x1e4),delete _0x1a55ff['app']);_0x12ed2e===_0x351705(0x1f3)&&(_0x583979=normalizeLocale(_0x330dfb));if(_0x12ed2e===_0x351705(0x1ff)){_0x583979=normalizeEnv(_0x330dfb);if(!isProduction(_0x583979)&&!isDaily(_0x583979))throw CliErrors[_0x351705(0x20a)](_0x351705(0x202),_0x351705(0x1da));}if(_0x12ed2e===_0x351705(0x1e4)){const _0x1f9a04=_0x1a55ff[_0x351705(0x1ed)]&&typeof _0x1a55ff[_0x351705(0x1ed)]==='object'?Object[_0x351705(0x1e1)](_0x1a55ff[_0x351705(0x1ed)]):[];if(_0x1f9a04['length']>0x0)throw CliErrors[_0x351705(0x20a)](_0x351705(0x1e3),_0x351705(0x1eb)+CLI_BIN_NAME+_0x351705(0x1e5)+_0x583979+_0x351705(0x1e0)+CLI_BIN_NAME+_0x351705(0x1dd));const _0x1627d1=buildCanonicalProjectConfig({..._0x1a55ff},{'appCodes':[_0x583979],'env':typeof _0x1a55ff[_0x351705(0x1ff)]===_0x351705(0x207)?_0x1a55ff['env']:undefined});writeScopedConfig(_0x1627d1,_0x419464);const _0x4a89ef=_0x419464===_0x351705(0x1fb)?_0x351705(0x201):_0x351705(0x1db);return{'ok':!![],'message':'✓\x20'+_0x4a89ef+_0x351705(0x208)+_0x583979+_0x351705(0x1f6)};}_0x1a55ff[_0x4fab5f]=_0x583979,writeScopedConfig(_0x1a55ff,_0x419464);const _0x4fc26d=_0x419464===_0x351705(0x1fb)?_0x351705(0x201):_0x351705(0x1db);return{'ok':!![],'message':'✓\x20'+_0x4fc26d+'\x20'+_0x4fab5f+'\x20set\x20to:\x20'+_0x583979};}function a56_0x9010(){const _0x4a0892=['57126mZjGIf','value','731712lRPxOf','locale','str','write','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','\x22\x20is\x20not\x20settable.','17kniTQR','792eSgEjH','Missing\x20key.','global','includes','21870LivOIp','Top-level\x20key\x20\x22','env','Config\x20value','Global','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','2065104lNDWdl','Set\x20a\x20config\x20value','26948115yNkfqZ','Invalid\x20locale\x20value.','string','\x20appcode\x20set\x20to:\x20','Usage:\x20','validation','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Project','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','3806089iBDHam','Missing\x20value.','`,\x20`','keys','length','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','appcode','\x20workspace\x20add\x20<name>\x20--appcode\x20','join','set','key','riskLevel','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Use\x20`','490496yZQYOa','apps','boolean','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US'];a56_0x9010=function(){return _0x4a0892;};return a56_0x9010();}export const configSetDefinition={'service':'config','command':a56_0xfa42fb(0x1e7),'description':a56_0xfa42fb(0x204),'risk':a56_0xfa42fb(0x1f5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a56_0xfa42fb(0x207),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0xfa42fb(0x1f1),'type':a56_0xfa42fb(0x207),'description':a56_0xfa42fb(0x200),'required':!![]},{'name':a56_0xfa42fb(0x1fb),'type':a56_0xfa42fb(0x1ee),'description':a56_0xfa42fb(0x1d9),'default':![]}],'execute':execute};
1
+ const a56_0x3f2f2a=a56_0x226a;(function(_0x54e9f5,_0x570e2e){const _0x4956e1=a56_0x226a,_0x2368e2=_0x54e9f5();while(!![]){try{const _0x16f66e=-parseInt(_0x4956e1(0xbf))/0x1*(parseInt(_0x4956e1(0xab))/0x2)+-parseInt(_0x4956e1(0xac))/0x3+parseInt(_0x4956e1(0xdc))/0x4*(-parseInt(_0x4956e1(0xd1))/0x5)+-parseInt(_0x4956e1(0xc4))/0x6*(-parseInt(_0x4956e1(0xba))/0x7)+parseInt(_0x4956e1(0xd0))/0x8*(-parseInt(_0x4956e1(0xb8))/0x9)+parseInt(_0x4956e1(0xc1))/0xa+parseInt(_0x4956e1(0xd9))/0xb*(parseInt(_0x4956e1(0xd6))/0xc);if(_0x16f66e===_0x570e2e)break;else _0x2368e2['push'](_0x2368e2['shift']());}catch(_0x5aee96){_0x2368e2['push'](_0x2368e2['shift']());}}}(a56_0x3a69,0xe7c26));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 a56_0x3a69(){const _0x37a992=['12874240IXRNpa','\x22.\x20Allowed:\x20','value','1986SVIIox','write','length','string','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','\x20appcode\x20set\x20to:\x20','app','Project','validation','Top-level\x20key\x20\x22','keys','Usage:\x20','24cNdBCA','99050uNvxRB','`,\x20`','Use\x20`','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','riskLevel','444tZirLr','Set\x20a\x20config\x20value','env','704066mZyniU','includes','boolean','4MNQXFn','apps','locale','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20workspace\x20add\x20<name>\x20--appcode\x20','2rphTxT','313152gypjjJ','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','appcode','str','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','config','key','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','object','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','global','\x20set\x20to:\x20','5057901TuUuAC','set','13622ZOwRbN','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Invalid\x20value\x20for\x20\x22','bool','Missing\x20value.','1540325WEdsbU','Missing\x20key.'];a56_0x3a69=function(){return _0x37a992;};return a56_0x3a69();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';function a56_0x226a(_0x4b383b,_0x2ddf2d){_0x4b383b=_0x4b383b-0xa7;const _0x3a691a=a56_0x3a69();let _0x226ae1=_0x3a691a[_0x4b383b];return _0x226ae1;}async function execute(_0x2a1ef1){const _0x41ab73=a56_0x226a,_0x40cb92=_0x2a1ef1[_0x41ab73(0xaf)](_0x41ab73(0xb2)),_0x1621dc=_0x2a1ef1[_0x41ab73(0xaf)](_0x41ab73(0xc3));if(!_0x40cb92)throw CliErrors[_0x41ab73(0xcc)](_0x41ab73(0xc0),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x1621dc===undefined||_0x1621dc==='')throw CliErrors[_0x41ab73(0xcc)](_0x41ab73(0xbe),_0x41ab73(0xcf)+CLI_BIN_NAME+_0x41ab73(0xa9));let _0x2788ed=_0x40cb92,_0x323ff2=_0x1621dc;if(_0x1621dc['length']>0x1f4)throw CliErrors['validation'](_0x41ab73(0xb0));if(_0x40cb92===_0x41ab73(0xd5))throw CliErrors[_0x41ab73(0xcc)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x40cb92))throw CliErrors['validation'](_0x41ab73(0xcd)+_0x40cb92+'\x22\x20is\x20not\x20settable.','Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x40cb92]&&!CONFIG_ENUM_VALUES[_0x40cb92][_0x41ab73(0xda)](_0x1621dc))throw CliErrors[_0x41ab73(0xcc)](_0x41ab73(0xbc)+_0x40cb92+_0x41ab73(0xc2)+CONFIG_ENUM_VALUES[_0x40cb92]['join'](',\x20'));if(_0x40cb92===_0x41ab73(0xa8)&&!normalizeLocale(_0x1621dc))throw CliErrors[_0x41ab73(0xcc)]('Invalid\x20locale\x20value.',_0x41ab73(0xbb));DOMAIN_CONFIG_FIELDS[_0x41ab73(0xda)](_0x40cb92)&&(_0x323ff2=normalizeDomainOrigin(_0x40cb92,_0x1621dc));const _0x9b4821={'global':_0x2a1ef1[_0x41ab73(0xbd)](_0x41ab73(0xb6))},_0x4ce0d1=resolveWriteScope(_0x9b4821),_0x5d0f90=readScopedConfig(_0x4ce0d1);_0x40cb92==='app'&&(_0x2788ed=_0x41ab73(0xae),delete _0x5d0f90[_0x41ab73(0xca)]);_0x40cb92==='locale'&&(_0x323ff2=normalizeLocale(_0x1621dc));if(_0x40cb92===_0x41ab73(0xd8)){_0x323ff2=normalizeEnv(_0x1621dc);if(!isProduction(_0x323ff2)&&!isDaily(_0x323ff2))throw CliErrors['validation'](_0x41ab73(0xd4),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x40cb92===_0x41ab73(0xae)){const _0x164d7b=_0x5d0f90[_0x41ab73(0xa7)]&&typeof _0x5d0f90[_0x41ab73(0xa7)]===_0x41ab73(0xb4)?Object[_0x41ab73(0xce)](_0x5d0f90[_0x41ab73(0xa7)]):[];if(_0x164d7b[_0x41ab73(0xc6)]>0x0)throw CliErrors[_0x41ab73(0xcc)](_0x41ab73(0xad),_0x41ab73(0xd3)+CLI_BIN_NAME+_0x41ab73(0xaa)+_0x323ff2+_0x41ab73(0xd2)+CLI_BIN_NAME+_0x41ab73(0xb3));const _0x2a3055=buildCanonicalProjectConfig({..._0x5d0f90},{'appCodes':[_0x323ff2],'env':typeof _0x5d0f90['env']===_0x41ab73(0xc7)?_0x5d0f90[_0x41ab73(0xd8)]:undefined});writeScopedConfig(_0x2a3055,_0x4ce0d1);const _0x1e4568=_0x4ce0d1===_0x41ab73(0xb6)?'Global':_0x41ab73(0xcb);return{'ok':!![],'message':'✓\x20'+_0x1e4568+_0x41ab73(0xc9)+_0x323ff2+_0x41ab73(0xb5)};}_0x5d0f90[_0x2788ed]=_0x323ff2,writeScopedConfig(_0x5d0f90,_0x4ce0d1);const _0x3d7337=_0x4ce0d1===_0x41ab73(0xb6)?'Global':_0x41ab73(0xcb);return{'ok':!![],'message':'✓\x20'+_0x3d7337+'\x20'+_0x2788ed+_0x41ab73(0xb7)+_0x323ff2};}export const configSetDefinition={'service':a56_0x3f2f2a(0xb1),'command':a56_0x3f2f2a(0xb9),'description':a56_0x3f2f2a(0xd7),'risk':a56_0x3f2f2a(0xc5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x3f2f2a(0xb2),'type':a56_0x3f2f2a(0xc7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0x3f2f2a(0xc3),'type':a56_0x3f2f2a(0xc7),'description':'Config\x20value','required':!![]},{'name':a56_0x3f2f2a(0xb6),'type':a56_0x3f2f2a(0xdb),'description':a56_0x3f2f2a(0xc8),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x394830,_0x4caea2){var _0x4bb079=a57_0x2db6,_0x13d3e7=_0x394830();while(!![]){try{var _0x5339b3=parseInt(_0x4bb079(0x1ec))/0x1*(parseInt(_0x4bb079(0x1df))/0x2)+-parseInt(_0x4bb079(0x1e8))/0x3*(parseInt(_0x4bb079(0x1e3))/0x4)+parseInt(_0x4bb079(0x1e1))/0x5*(parseInt(_0x4bb079(0x1dd))/0x6)+-parseInt(_0x4bb079(0x1e2))/0x7*(-parseInt(_0x4bb079(0x1e4))/0x8)+parseInt(_0x4bb079(0x1e0))/0x9*(-parseInt(_0x4bb079(0x1dc))/0xa)+parseInt(_0x4bb079(0x1e7))/0xb+-parseInt(_0x4bb079(0x1e6))/0xc;if(_0x5339b3===_0x4caea2)break;else _0x13d3e7['push'](_0x13d3e7['shift']());}catch(_0x1bb264){_0x13d3e7['push'](_0x13d3e7['shift']());}}}(a57_0x851c,0xd52e4));import{CLI_BIN_NAME}from'../../constant/cli.js';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(_0x48a2de){var _0x336ad6=a57_0x2db6;if(_0x48a2de['global'])return _0x336ad6(0x1ea);if(!isInProject())throw CliErrors[_0x336ad6(0x1db)](_0x336ad6(0x1e5),_0x336ad6(0x1e9)+CLI_BIN_NAME+_0x336ad6(0x1de));return _0x336ad6(0x1eb);}function a57_0x2db6(_0x1821aa,_0x5618ef){_0x1821aa=_0x1821aa-0x1db;var _0x851c78=a57_0x851c();var _0x2db6e6=_0x851c78[_0x1821aa];return _0x2db6e6;}export function readScopedConfig(_0x3c907a){return readConfigFile(resolveWriteConfigPath(_0x3c907a));}function a57_0x851c(){var _0x34adc9=['10rartoX','2148ugoLzY','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','613070DEWwnL','9895491xzTMyz','22615uqjfKI','7YwEAiR','59380UZmPil','11763016lhcwJY','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','19632960carIeh','7515596ZZcymc','219okrXyj','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','global','project','3iwZkZf','validation'];a57_0x851c=function(){return _0x34adc9;};return a57_0x851c();}export function writeScopedConfig(_0x1d4ba8,_0x3c6bb9){writeConfigFile(resolveWriteConfigPath(_0x3c6bb9),_0x1d4ba8);}
1
+ (function(_0x459676,_0x374f56){var _0x47a843=a57_0xabe0,_0x588f61=_0x459676();while(!![]){try{var _0x423005=-parseInt(_0x47a843(0x7c))/0x1*(-parseInt(_0x47a843(0x76))/0x2)+parseInt(_0x47a843(0x77))/0x3*(parseInt(_0x47a843(0x6f))/0x4)+parseInt(_0x47a843(0x74))/0x5*(parseInt(_0x47a843(0x78))/0x6)+parseInt(_0x47a843(0x6e))/0x7+-parseInt(_0x47a843(0x6c))/0x8*(-parseInt(_0x47a843(0x73))/0x9)+-parseInt(_0x47a843(0x7b))/0xa*(-parseInt(_0x47a843(0x72))/0xb)+-parseInt(_0x47a843(0x6d))/0xc;if(_0x423005===_0x374f56)break;else _0x588f61['push'](_0x588f61['shift']());}catch(_0x24ec9b){_0x588f61['push'](_0x588f61['shift']());}}}(a57_0x52bc,0x3e55a));function a57_0xabe0(_0x420d9a,_0xe12cf3){_0x420d9a=_0x420d9a-0x6c;var _0x52bcbe=a57_0x52bc();var _0xabe0ef=_0x52bcbe[_0x420d9a];return _0xabe0ef;}import{CLI_BIN_NAME}from'../../constant/cli.js';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(_0x394799){var _0x1025bb=a57_0xabe0;if(_0x394799[_0x1025bb(0x71)])return _0x1025bb(0x71);if(!isInProject())throw CliErrors[_0x1025bb(0x7a)](_0x1025bb(0x70),_0x1025bb(0x79)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x1025bb(0x75);}function a57_0x52bc(){var _0x5aa592=['1LIniIm','8tQgPEX','14434068cSIzCI','1771455xMtpzN','356PoWsgy','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','global','1871452BPvVXe','1310058MhscCc','5FoMZwM','project','156676VMQHnb','5331logPQL','2896674wQCbpV','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','validation','20CMLaqK'];a57_0x52bc=function(){return _0x5aa592;};return a57_0x52bc();}export function readScopedConfig(_0x34ad00){return readConfigFile(resolveWriteConfigPath(_0x34ad00));}export function writeScopedConfig(_0x3f3ae6,_0x13c463){writeConfigFile(resolveWriteConfigPath(_0x13c463),_0x3f3ae6);}
@@ -1 +1 @@
1
- const a58_0x3fa0e3=a58_0xe106;(function(_0x202f79,_0xe5228b){const _0x2868cc=a58_0xe106,_0x1d8b31=_0x202f79();while(!![]){try{const _0x37b319=-parseInt(_0x2868cc(0xc0))/0x1+parseInt(_0x2868cc(0x9c))/0x2*(parseInt(_0x2868cc(0xb0))/0x3)+-parseInt(_0x2868cc(0x98))/0x4*(-parseInt(_0x2868cc(0xcc))/0x5)+parseInt(_0x2868cc(0x92))/0x6+-parseInt(_0x2868cc(0x85))/0x7*(-parseInt(_0x2868cc(0x87))/0x8)+parseInt(_0x2868cc(0xc9))/0x9*(parseInt(_0x2868cc(0xae))/0xa)+parseInt(_0x2868cc(0xa2))/0xb*(-parseInt(_0x2868cc(0xca))/0xc);if(_0x37b319===_0xe5228b)break;else _0x1d8b31['push'](_0x1d8b31['shift']());}catch(_0x4e6ca3){_0x1d8b31['push'](_0x1d8b31['shift']());}}}(a58_0x2314,0x4dc36));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a58_0x2314(){const _0x186a9d=['dbId','/smartapi/question/er-config/business-group/edit','sourceType','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','path','532746fCKtCR','code','expect-business-group','trim','datasetCode','METADATA','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','name','dbtableConfig','3887604jbjxFF','11059320dgtetH','validation','910NVXFab','parse','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','call','--business-group\x20is\x20required','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','apiError','847ZYugOv','businessGroup','6704IbUrfY','number','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','stringify','/smartapi/dblink/updateTableBusinessGroup','--code\x20is\x20required','dbTableSelector','Expected\x20','tableName','isArray','value','964068BxQgHR','--business-group\x20must\x20not\x20be\x20blank','business-group-update','str','message','modelCode','11908cIUifh','unchanged','db-table','update','8SHLQYp','kind','DB_TABLE','data','found','isFinite','11EyVkZn','method',',\x20actual\x20','expectBusinessGroup','source','POST','toUpperCase','Update\x20business\x20scenario\x20group','business-group','backend','Expectation\x20mismatch\x20at\x20businessGroup','matched','10uRFRvj','string','402771LCUNHX','dataset','prototype','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','modelId','dbLinkId','payload','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','extend'];a58_0x2314=function(){return _0x186a9d;};return a58_0x2314();}import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x3fa0e3(0x8b),METADATA_BACKEND_PATH=a58_0x3fa0e3(0xbc),UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x4620c4,input:_0x2dae33,dryRun:_0x551ab8}){const _0x111ef6=a58_0x3fa0e3;validateInput(_0x2dae33);const _0x2d10af=normalizeBusinessGroupArgument(_0x2dae33[_0x111ef6(0x86)]),_0x1bc7a9=await getDatasetDetail(_0x2dae33['code']),_0x4d96da=resolveBusinessGroupDataset(_0x1bc7a9,_0x2dae33['code']);assertBusinessGroupUpdateSupported(_0x4d96da,_0x2d10af);const _0x490d5b=loadCurrentBusinessGroup(_0x1bc7a9,_0x4d96da);assertExpectedBusinessGroup(_0x490d5b,_0x2dae33[_0x111ef6(0xa5)]);const _0x46381f=buildBackendPlan(_0x4620c4,_0x4d96da,_0x2d10af),_0x18fff6=_0x490d5b!==_0x2d10af;let _0x3b3beb;if(_0x18fff6&&!_0x551ab8){_0x46381f[_0x111ef6(0x9d)]==='db-table'?await updateDbTableBusinessGroup(_0x46381f[_0x111ef6(0xb7)]):await updateErBusinessGroup(_0x46381f[_0x111ef6(0xb7)]);const _0x12cd4f=await getDatasetDetail(_0x4d96da['code']),_0x1ea37a=resolveBusinessGroupDataset(_0x12cd4f,_0x4d96da[_0x111ef6(0xc1)]),_0x418447=loadCurrentBusinessGroup(_0x12cd4f,_0x1ea37a);if(_0x418447!==_0x2d10af)throw CliErrors[_0x111ef6(0x84)](_0x111ef6(0xb3),_0x111ef6(0x8e)+JSON[_0x111ef6(0x8a)](displayBusinessGroup(_0x2d10af))+_0x111ef6(0xa4)+JSON['stringify'](displayBusinessGroup(_0x418447))+'.');_0x3b3beb={'verified':!![],'status':_0x111ef6(0xad),'afterReadback':{'businessGroup':displayBusinessGroup(_0x418447)}};}else!_0x18fff6&&(_0x3b3beb={'verified':!![],'status':_0x111ef6(0x99),'afterReadback':{'businessGroup':displayBusinessGroup(_0x490d5b)}});const _0x5456eb={'operation':_0x111ef6(0x9b),'appCode':_0x4620c4,'selector':{'code':_0x4d96da['code']},'dataset':{'id':_0x4d96da['id'],'code':_0x4d96da['code'],'name':_0x4d96da[_0x111ef6(0xc7)],'sourceType':_0x4d96da['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x490d5b)},'after':{'businessGroup':displayBusinessGroup(_0x2d10af)},'changed':_0x18fff6,'dryRun':_0x551ab8,'submitted':_0x18fff6&&!_0x551ab8,'backend':{'method':_0x46381f['method'],'path':_0x46381f[_0x111ef6(0xbf)],'payload':_0x46381f[_0x111ef6(0xb7)]},..._0x3b3beb?{'verification':_0x3b3beb}:{},'warnings':[]};return{'ok':!![],'data':_0x5456eb,'message':_0x18fff6?_0x551ab8?_0x111ef6(0x83)+_0x4d96da[_0x111ef6(0xc1)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x4d96da[_0x111ef6(0xc1)]:_0x111ef6(0x89)+_0x4d96da[_0x111ef6(0xc1)]};}export const datasetBusinessGroupUpdate={'service':a58_0x3fa0e3(0xb1),'command':a58_0x3fa0e3(0x94),'description':a58_0x3fa0e3(0xa9),'risk':'write','flags':[CODE_FLAG,{'name':a58_0x3fa0e3(0xaa),'type':a58_0x3fa0e3(0xaf),'required':!![],'description':a58_0x3fa0e3(0xb8)},{'name':a58_0x3fa0e3(0xc2),'type':a58_0x3fa0e3(0xaf),'required':![],'description':a58_0x3fa0e3(0xc6)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bde7a){validateInput(readBusinessGroupUpdateInput(_0x2bde7a));},async 'dryRun'(_0x2eb3be){const _0x562873=a58_0x3fa0e3,_0x31d2b2=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2eb3be['appCode'],'input':readBusinessGroupUpdateInput(_0x2eb3be),'dryRun':!![]});return{'method':_0x31d2b2[_0x562873(0x9f)][_0x562873(0xab)][_0x562873(0xa3)],'url':_0x31d2b2[_0x562873(0x9f)][_0x562873(0xab)]['path'],'body':_0x31d2b2['data'][_0x562873(0xab)][_0x562873(0xb7)],'description':_0x31d2b2[_0x562873(0x96)],..._0x31d2b2[_0x562873(0x9f)]};},async 'execute'(_0x412841){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x412841['appCode'],'input':readBusinessGroupUpdateInput(_0x412841),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4ebb7e){const _0x31a923=a58_0x3fa0e3,_0x3ba025=_0x4ebb7e['str']('expect-business-group');return{'code':trim(_0x4ebb7e['str'](_0x31a923(0xc1))),'businessGroup':_0x4ebb7e[_0x31a923(0x95)](_0x31a923(0xaa)),'expectBusinessGroup':_0x3ba025===undefined||_0x3ba025===''?undefined:_0x3ba025};}function validateInput(_0xcf4c79){const _0x58e107=a58_0x3fa0e3;if(!trim(_0xcf4c79[_0x58e107(0xc1)]))throw CliErrors[_0x58e107(0xcb)](_0x58e107(0x8c));if(_0xcf4c79[_0x58e107(0x86)]===undefined)throw CliErrors[_0x58e107(0xcb)](_0x58e107(0x82));if(!trim(_0xcf4c79[_0x58e107(0x86)]))throw CliErrors[_0x58e107(0xcb)](_0x58e107(0x93));}function assertBusinessGroupUpdateSupported(_0x451dd0,_0x55d872){const _0x53c329=a58_0x3fa0e3;if(_0x451dd0[_0x53c329(0xbd)]==='DB_TABLE'&&!_0x55d872)throw CliErrors[_0x53c329(0xcb)](_0x53c329(0xb9));}function resolveBusinessGroupDataset(_0x27c02b,_0x14a76f){const _0x516a63=a58_0x3fa0e3,_0x19e819=asPlainObject(_0x27c02b[_0x516a63(0xb1)]),_0x51f41d=asPlainObject(_0x27c02b[_0x516a63(0xc8)]),_0x243c85=resolveSourceType(_0x27c02b,_0x19e819,_0x51f41d),_0x38d953=firstString(_0x27c02b[_0x516a63(0x97)],_0x27c02b['code'],_0x19e819[_0x516a63(0xc4)],_0x14a76f)||_0x14a76f;return{'id':firstNumber(_0x27c02b[_0x516a63(0xb5)],_0x27c02b['id'],_0x19e819['datasetId'])??firstString(_0x27c02b[_0x516a63(0xb5)],_0x27c02b['id'],_0x19e819['datasetId'])??null,'code':_0x38d953,'name':firstString(_0x27c02b[_0x516a63(0xc7)],_0x19e819['datasetName'],_0x19e819['name'])||null,'sourceType':_0x243c85,'dbTableSelector':_0x243c85===_0x516a63(0x9e)?{'dbLinkId':firstNumber(_0x51f41d[_0x516a63(0xbb)]),'tableName':firstString(_0x51f41d[_0x516a63(0x8f)])||null}:null};}function resolveSourceType(_0x27f39a,_0x2f5455,_0x15b47d){const _0x2790a8=a58_0x3fa0e3,_0x3e10f6=firstString(_0x27f39a['source'],_0x27f39a[_0x2790a8(0xbd)],_0x2f5455[_0x2790a8(0xa6)],_0x2f5455[_0x2790a8(0xbd)])?.['trim']()[_0x2790a8(0xa8)]();if(_0x3e10f6===_0x2790a8(0x9e)||_0x3e10f6===_0x2790a8(0xc5))return _0x3e10f6;if(Object['keys'](_0x15b47d)['length']>0x0)return _0x2790a8(0x9e);throw CliErrors[_0x2790a8(0xcb)](_0x2790a8(0xb4));}function a58_0xe106(_0x40575f,_0x250ab3){_0x40575f=_0x40575f-0x82;const _0x23143c=a58_0x2314();let _0xe1060c=_0x23143c[_0x40575f];return _0xe1060c;}function loadCurrentBusinessGroup(_0x1fc675,_0x4b2b5e){const _0x28f0a6=a58_0x3fa0e3,_0x46ff85=readBusinessGroupFromDatasetDetail(_0x1fc675,_0x4b2b5e['sourceType']);if(_0x46ff85[_0x28f0a6(0xa0)])return normalizeBusinessGroup(_0x46ff85[_0x28f0a6(0x91)]);return'';}function readBusinessGroupFromDatasetDetail(_0x434077,_0x969a02){const _0x311496=a58_0x3fa0e3,_0x2e890c=asPlainObject(_0x434077['dataset']),_0x2ac8df=firstPresent(_0x434077[_0x311496(0x86)]);if(_0x2ac8df[_0x311496(0xa0)])return _0x2ac8df;const _0xe2ebdb=firstPresent(_0x2e890c['businessGroup']);if(_0xe2ebdb['found'])return _0xe2ebdb;if(_0x969a02===_0x311496(0x9e))return{'found':![]};const _0x4b0b02=readBusinessGroupFromExtend(_0x434077[_0x311496(0xba)]);if(_0x4b0b02['found'])return _0x4b0b02;return readBusinessGroupFromExtend(_0x2e890c['extend']);}function readBusinessGroupFromExtend(_0x4e4f48){const _0x4cddcf=a58_0x3fa0e3;if(_0x4e4f48===undefined||_0x4e4f48===null||_0x4e4f48==='')return{'found':![]};if(typeof _0x4e4f48===_0x4cddcf(0xaf))try{const _0x581a20=JSON[_0x4cddcf(0xcd)](_0x4e4f48);return readBusinessGroupFromExtend(_0x581a20);}catch{return{'found':![]};}const _0x3a9381=asPlainObject(_0x4e4f48);if(Object[_0x4cddcf(0xb2)]['hasOwnProperty'][_0x4cddcf(0xcf)](_0x3a9381,'businessGroup'))return{'found':!![],'value':_0x3a9381[_0x4cddcf(0x86)]};return{'found':![]};}function firstPresent(..._0x34c843){for(const _0x3c7605 of _0x34c843){if(_0x3c7605!==undefined&&_0x3c7605!==null)return{'found':!![],'value':_0x3c7605};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4b4b3c,_0xc2e317){const _0x4f3825=a58_0x3fa0e3;if(_0xc2e317===undefined)return;const _0x1fb836=normalizeBusinessGroupArgument(_0xc2e317);if(_0x4b4b3c!==_0x1fb836)throw CliErrors[_0x4f3825(0xcb)](_0x4f3825(0xac),'Expected\x20'+JSON[_0x4f3825(0x8a)](_0x1fb836)+_0x4f3825(0xa4)+JSON['stringify'](_0x4b4b3c));}function buildBackendPlan(_0x265c9a,_0x3e1628,_0x432f5d){const _0x2481c9=a58_0x3fa0e3;if(_0x3e1628[_0x2481c9(0xbd)]===_0x2481c9(0x9e)){if(!_0x3e1628[_0x2481c9(0x8d)]||_0x3e1628[_0x2481c9(0x8d)][_0x2481c9(0xb6)]===null||!_0x3e1628[_0x2481c9(0x8d)][_0x2481c9(0x8f)])throw CliErrors[_0x2481c9(0xcb)](_0x2481c9(0xce),_0x2481c9(0xbe));return{'kind':_0x2481c9(0x9a),'method':_0x2481c9(0xa7),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x3e1628[_0x2481c9(0x8d)][_0x2481c9(0xb6)],'tableName':_0x3e1628[_0x2481c9(0x8d)][_0x2481c9(0x8f)],'businessGroup':_0x432f5d}};}return{'kind':'metadata','method':_0x2481c9(0xa7),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x265c9a,'datasetCode':_0x3e1628[_0x2481c9(0xc1)],'businessGroup':_0x432f5d}};}function normalizeBusinessGroup(_0x5a5450){if(_0x5a5450===undefined||_0x5a5450===null)return'';return String(_0x5a5450)['trim']();}function normalizeBusinessGroupArgument(_0x299f13){const _0x419ba9=normalizeBusinessGroup(_0x299f13);return _0x419ba9===UNGROUPED_BUSINESS_GROUP?'':_0x419ba9;}function displayBusinessGroup(_0x2298d6){return _0x2298d6||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x380258){const _0x3be073=a58_0x3fa0e3;if(!_0x380258||typeof _0x380258!=='object'||Array[_0x3be073(0x90)](_0x380258))return{};return _0x380258;}function firstString(..._0x5075e4){const _0x282d24=a58_0x3fa0e3;for(const _0x9fd15f of _0x5075e4){if(typeof _0x9fd15f===_0x282d24(0xaf)&&_0x9fd15f[_0x282d24(0xc3)]())return _0x9fd15f[_0x282d24(0xc3)]();if(typeof _0x9fd15f===_0x282d24(0x88)&&Number[_0x282d24(0xa1)](_0x9fd15f))return String(_0x9fd15f);}return undefined;}function firstNumber(..._0x3c45d2){const _0x2acd57=a58_0x3fa0e3;for(const _0x3f87a1 of _0x3c45d2){if(typeof _0x3f87a1===_0x2acd57(0x88)&&Number[_0x2acd57(0xa1)](_0x3f87a1))return _0x3f87a1;if(typeof _0x3f87a1===_0x2acd57(0xaf)&&_0x3f87a1[_0x2acd57(0xc3)]()&&Number[_0x2acd57(0xa1)](Number(_0x3f87a1)))return Number(_0x3f87a1);}return null;}function trim(_0x22da97){const _0x1c55d7=a58_0x3fa0e3;return String(_0x22da97||'')[_0x1c55d7(0xc3)]();}
1
+ const a58_0x5f0563=a58_0x1869;(function(_0x549d34,_0x27fb6a){const _0x2704c0=a58_0x1869,_0x42fe5a=_0x549d34();while(!![]){try{const _0x3c16d2=-parseInt(_0x2704c0(0x90))/0x1*(-parseInt(_0x2704c0(0x88))/0x2)+-parseInt(_0x2704c0(0xb2))/0x3*(-parseInt(_0x2704c0(0x9b))/0x4)+parseInt(_0x2704c0(0x8f))/0x5*(-parseInt(_0x2704c0(0x89))/0x6)+parseInt(_0x2704c0(0xa4))/0x7*(parseInt(_0x2704c0(0x8c))/0x8)+-parseInt(_0x2704c0(0xac))/0x9+-parseInt(_0x2704c0(0x96))/0xa+parseInt(_0x2704c0(0xb0))/0xb;if(_0x3c16d2===_0x27fb6a)break;else _0x42fe5a['push'](_0x42fe5a['shift']());}catch(_0xcba2d3){_0x42fe5a['push'](_0x42fe5a['shift']());}}}(a58_0x46a4,0x89fc6));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x5f0563(0x82),METADATA_BACKEND_PATH=a58_0x5f0563(0x7e),UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x50219a,input:_0x2aa422,dryRun:_0x5b3760}){const _0x4ba0c3=a58_0x5f0563;validateInput(_0x2aa422);const _0x237545=normalizeBusinessGroupArgument(_0x2aa422[_0x4ba0c3(0xae)]),_0x3ae3db=await getDatasetDetail(_0x2aa422['code']),_0x3fb986=resolveBusinessGroupDataset(_0x3ae3db,_0x2aa422['code']);assertBusinessGroupUpdateSupported(_0x3fb986,_0x237545);const _0x3d6bcc=loadCurrentBusinessGroup(_0x3ae3db,_0x3fb986);assertExpectedBusinessGroup(_0x3d6bcc,_0x2aa422['expectBusinessGroup']);const _0x2197a9=buildBackendPlan(_0x50219a,_0x3fb986,_0x237545),_0x456479=_0x3d6bcc!==_0x237545;let _0x19d5e4;if(_0x456479&&!_0x5b3760){_0x2197a9['kind']==='db-table'?await updateDbTableBusinessGroup(_0x2197a9[_0x4ba0c3(0x87)]):await updateErBusinessGroup(_0x2197a9[_0x4ba0c3(0x87)]);const _0x18b688=await getDatasetDetail(_0x3fb986[_0x4ba0c3(0x85)]),_0x486bfc=resolveBusinessGroupDataset(_0x18b688,_0x3fb986[_0x4ba0c3(0x85)]),_0x4ba39b=loadCurrentBusinessGroup(_0x18b688,_0x486bfc);if(_0x4ba39b!==_0x237545)throw CliErrors[_0x4ba0c3(0xb7)]('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x4ba0c3(0xb3)+JSON[_0x4ba0c3(0xab)](displayBusinessGroup(_0x237545))+',\x20actual\x20'+JSON[_0x4ba0c3(0xab)](displayBusinessGroup(_0x4ba39b))+'.');_0x19d5e4={'verified':!![],'status':_0x4ba0c3(0xb8),'afterReadback':{'businessGroup':displayBusinessGroup(_0x4ba39b)}};}else!_0x456479&&(_0x19d5e4={'verified':!![],'status':_0x4ba0c3(0x71),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3d6bcc)}});const _0x2e665e={'operation':_0x4ba0c3(0xa6),'appCode':_0x50219a,'selector':{'code':_0x3fb986['code']},'dataset':{'id':_0x3fb986['id'],'code':_0x3fb986[_0x4ba0c3(0x85)],'name':_0x3fb986[_0x4ba0c3(0xb9)],'sourceType':_0x3fb986['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x3d6bcc)},'after':{'businessGroup':displayBusinessGroup(_0x237545)},'changed':_0x456479,'dryRun':_0x5b3760,'submitted':_0x456479&&!_0x5b3760,'backend':{'method':_0x2197a9['method'],'path':_0x2197a9[_0x4ba0c3(0x9c)],'payload':_0x2197a9[_0x4ba0c3(0x87)]},..._0x19d5e4?{'verification':_0x19d5e4}:{},'warnings':[]};return{'ok':!![],'data':_0x2e665e,'message':_0x456479?_0x5b3760?_0x4ba0c3(0xb6)+_0x3fb986[_0x4ba0c3(0x85)]:_0x4ba0c3(0x72)+_0x3fb986[_0x4ba0c3(0x85)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x3fb986['code']};}export const datasetBusinessGroupUpdate={'service':a58_0x5f0563(0x70),'command':a58_0x5f0563(0x84),'description':a58_0x5f0563(0x7a),'risk':'write','flags':[CODE_FLAG,{'name':a58_0x5f0563(0x7b),'type':a58_0x5f0563(0x9f),'required':!![],'description':a58_0x5f0563(0x7d)},{'name':'expect-business-group','type':a58_0x5f0563(0x9f),'required':![],'description':a58_0x5f0563(0xa5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1574d6){validateInput(readBusinessGroupUpdateInput(_0x1574d6));},async 'dryRun'(_0x4b150f){const _0x1efcb2=a58_0x5f0563,_0x114471=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4b150f[_0x1efcb2(0x73)],'input':readBusinessGroupUpdateInput(_0x4b150f),'dryRun':!![]});return{'method':_0x114471['data'][_0x1efcb2(0x81)][_0x1efcb2(0x9a)],'url':_0x114471[_0x1efcb2(0x92)][_0x1efcb2(0x81)][_0x1efcb2(0x9c)],'body':_0x114471[_0x1efcb2(0x92)]['backend'][_0x1efcb2(0x87)],'description':_0x114471[_0x1efcb2(0xa7)],..._0x114471[_0x1efcb2(0x92)]};},async 'execute'(_0x38e112){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x38e112['appCode'],'input':readBusinessGroupUpdateInput(_0x38e112),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1a9a35){const _0x514a1e=a58_0x5f0563,_0x566918=_0x1a9a35[_0x514a1e(0x75)](_0x514a1e(0x98));return{'code':trim(_0x1a9a35[_0x514a1e(0x75)](_0x514a1e(0x85))),'businessGroup':_0x1a9a35[_0x514a1e(0x75)](_0x514a1e(0x7b)),'expectBusinessGroup':_0x566918===undefined||_0x566918===''?undefined:_0x566918};}function validateInput(_0x345bed){const _0x3ddd7a=a58_0x5f0563;if(!trim(_0x345bed[_0x3ddd7a(0x85)]))throw CliErrors['validation'](_0x3ddd7a(0x8e));if(_0x345bed[_0x3ddd7a(0xae)]===undefined)throw CliErrors[_0x3ddd7a(0x8b)]('--business-group\x20is\x20required');if(!trim(_0x345bed[_0x3ddd7a(0xae)]))throw CliErrors[_0x3ddd7a(0x8b)](_0x3ddd7a(0x86));}function assertBusinessGroupUpdateSupported(_0x2545c1,_0x23939d){const _0x869a6=a58_0x5f0563;if(_0x2545c1[_0x869a6(0xb4)]===_0x869a6(0x83)&&!_0x23939d)throw CliErrors['validation'](_0x869a6(0xa8));}function resolveBusinessGroupDataset(_0x19df03,_0xf77afd){const _0x24698d=a58_0x5f0563,_0x196c6c=asPlainObject(_0x19df03[_0x24698d(0x70)]),_0x5c9d32=asPlainObject(_0x19df03[_0x24698d(0x77)]),_0x4f4edd=resolveSourceType(_0x19df03,_0x196c6c,_0x5c9d32),_0x467023=firstString(_0x19df03['modelCode'],_0x19df03[_0x24698d(0x85)],_0x196c6c[_0x24698d(0x78)],_0xf77afd)||_0xf77afd;return{'id':firstNumber(_0x19df03['modelId'],_0x19df03['id'],_0x196c6c[_0x24698d(0x8a)])??firstString(_0x19df03[_0x24698d(0x6f)],_0x19df03['id'],_0x196c6c[_0x24698d(0x8a)])??null,'code':_0x467023,'name':firstString(_0x19df03[_0x24698d(0xb9)],_0x196c6c['datasetName'],_0x196c6c[_0x24698d(0xb9)])||null,'sourceType':_0x4f4edd,'dbTableSelector':_0x4f4edd==='DB_TABLE'?{'dbLinkId':firstNumber(_0x5c9d32[_0x24698d(0xad)]),'tableName':firstString(_0x5c9d32[_0x24698d(0x93)])||null}:null};}function resolveSourceType(_0x16aa25,_0x2fd045,_0xf53cb0){const _0x539eda=a58_0x5f0563,_0x27b1a3=firstString(_0x16aa25[_0x539eda(0x9d)],_0x16aa25['sourceType'],_0x2fd045[_0x539eda(0x9d)],_0x2fd045['sourceType'])?.['trim']()[_0x539eda(0x80)]();if(_0x27b1a3==='DB_TABLE'||_0x27b1a3===_0x539eda(0x7c))return _0x27b1a3;if(Object[_0x539eda(0x99)](_0xf53cb0)[_0x539eda(0xaf)]>0x0)return _0x539eda(0x83);throw CliErrors[_0x539eda(0x8b)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x11bad4,_0x31a978){const _0x5af8de=a58_0x5f0563,_0x5eb1de=readBusinessGroupFromDatasetDetail(_0x11bad4,_0x31a978['sourceType']);if(_0x5eb1de[_0x5af8de(0xb1)])return normalizeBusinessGroup(_0x5eb1de[_0x5af8de(0x8d)]);return'';}function readBusinessGroupFromDatasetDetail(_0x2a6c9e,_0x5c1db1){const _0x2eb0c2=a58_0x5f0563,_0x36e8a4=asPlainObject(_0x2a6c9e[_0x2eb0c2(0x70)]),_0x3bbb1c=firstPresent(_0x2a6c9e[_0x2eb0c2(0xae)]);if(_0x3bbb1c[_0x2eb0c2(0xb1)])return _0x3bbb1c;const _0x2455bc=firstPresent(_0x36e8a4['businessGroup']);if(_0x2455bc[_0x2eb0c2(0xb1)])return _0x2455bc;if(_0x5c1db1===_0x2eb0c2(0x83))return{'found':![]};const _0x5a115d=readBusinessGroupFromExtend(_0x2a6c9e[_0x2eb0c2(0x95)]);if(_0x5a115d[_0x2eb0c2(0xb1)])return _0x5a115d;return readBusinessGroupFromExtend(_0x36e8a4['extend']);}function readBusinessGroupFromExtend(_0x19dd14){const _0x4b4d3e=a58_0x5f0563;if(_0x19dd14===undefined||_0x19dd14===null||_0x19dd14==='')return{'found':![]};if(typeof _0x19dd14===_0x4b4d3e(0x9f))try{const _0x32f42=JSON[_0x4b4d3e(0x76)](_0x19dd14);return readBusinessGroupFromExtend(_0x32f42);}catch{return{'found':![]};}const _0x350da7=asPlainObject(_0x19dd14);if(Object[_0x4b4d3e(0xa0)][_0x4b4d3e(0xa3)]['call'](_0x350da7,_0x4b4d3e(0xae)))return{'found':!![],'value':_0x350da7[_0x4b4d3e(0xae)]};return{'found':![]};}function firstPresent(..._0x503820){for(const _0x42f610 of _0x503820){if(_0x42f610!==undefined&&_0x42f610!==null)return{'found':!![],'value':_0x42f610};}return{'found':![]};}function assertExpectedBusinessGroup(_0x3029f9,_0x5cfb42){const _0x17a05a=a58_0x5f0563;if(_0x5cfb42===undefined)return;const _0x52145e=normalizeBusinessGroupArgument(_0x5cfb42);if(_0x3029f9!==_0x52145e)throw CliErrors[_0x17a05a(0x8b)](_0x17a05a(0xaa),_0x17a05a(0xb3)+JSON['stringify'](_0x52145e)+',\x20actual\x20'+JSON[_0x17a05a(0xab)](_0x3029f9));}function buildBackendPlan(_0x3fe323,_0x2595fb,_0x13832d){const _0x450639=a58_0x5f0563;if(_0x2595fb[_0x450639(0xb4)]===_0x450639(0x83)){if(!_0x2595fb[_0x450639(0xa2)]||_0x2595fb[_0x450639(0xa2)]['dbLinkId']===null||!_0x2595fb[_0x450639(0xa2)][_0x450639(0x93)])throw CliErrors[_0x450639(0x8b)](_0x450639(0x91),_0x450639(0x79));return{'kind':'db-table','method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x2595fb['dbTableSelector'][_0x450639(0x7f)],'tableName':_0x2595fb[_0x450639(0xa2)][_0x450639(0x93)],'businessGroup':_0x13832d}};}return{'kind':_0x450639(0x74),'method':_0x450639(0xa1),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x3fe323,'datasetCode':_0x2595fb[_0x450639(0x85)],'businessGroup':_0x13832d}};}function normalizeBusinessGroup(_0x2b7f50){const _0x8153bd=a58_0x5f0563;if(_0x2b7f50===undefined||_0x2b7f50===null)return'';return String(_0x2b7f50)[_0x8153bd(0x94)]();}function a58_0x46a4(){const _0xa76dd2=['str','parse','dbtableConfig','datasetCode','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','Update\x20business\x20scenario\x20group','business-group','METADATA','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','/smartapi/question/er-config/business-group/edit','dbLinkId','toUpperCase','backend','/smartapi/dblink/updateTableBusinessGroup','DB_TABLE','business-group-update','code','--business-group\x20must\x20not\x20be\x20blank','payload','762XltThg','898278EvhEFs','datasetId','validation','40MLoBRz','value','--code\x20is\x20required','25IQrgKP','2941dwRvlX','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','data','tableName','trim','extend','3645930QXjQav','object','expect-business-group','keys','method','123748XlUOuN','path','source','isArray','string','prototype','POST','dbTableSelector','hasOwnProperty','137277cklbII','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','update','message','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','isFinite','Expectation\x20mismatch\x20at\x20businessGroup','stringify','9694890nvltXV','dbId','businessGroup','length','11121583EXgGSv','found','51heFQRQ','Expected\x20','sourceType','number','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','apiError','matched','name','modelId','dataset','unchanged','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','appCode','metadata'];a58_0x46a4=function(){return _0xa76dd2;};return a58_0x46a4();}function normalizeBusinessGroupArgument(_0x9e457c){const _0x1360f5=normalizeBusinessGroup(_0x9e457c);return _0x1360f5===UNGROUPED_BUSINESS_GROUP?'':_0x1360f5;}function displayBusinessGroup(_0x48becc){return _0x48becc||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x48e242){const _0x4b5f0d=a58_0x5f0563;if(!_0x48e242||typeof _0x48e242!==_0x4b5f0d(0x97)||Array[_0x4b5f0d(0x9e)](_0x48e242))return{};return _0x48e242;}function firstString(..._0x4f311f){const _0x210eb3=a58_0x5f0563;for(const _0x375c8a of _0x4f311f){if(typeof _0x375c8a===_0x210eb3(0x9f)&&_0x375c8a[_0x210eb3(0x94)]())return _0x375c8a['trim']();if(typeof _0x375c8a==='number'&&Number[_0x210eb3(0xa9)](_0x375c8a))return String(_0x375c8a);}return undefined;}function a58_0x1869(_0x5adb83,_0x394248){_0x5adb83=_0x5adb83-0x6f;const _0x46a4c7=a58_0x46a4();let _0x1869b8=_0x46a4c7[_0x5adb83];return _0x1869b8;}function firstNumber(..._0x20403b){const _0x3ee363=a58_0x5f0563;for(const _0x25b8bd of _0x20403b){if(typeof _0x25b8bd===_0x3ee363(0xb5)&&Number[_0x3ee363(0xa9)](_0x25b8bd))return _0x25b8bd;if(typeof _0x25b8bd==='string'&&_0x25b8bd['trim']()&&Number[_0x3ee363(0xa9)](Number(_0x25b8bd)))return Number(_0x25b8bd);}return null;}function trim(_0x50933d){return String(_0x50933d||'')['trim']();}
@@ -1 +1 @@
1
- function a59_0x55f5(_0x5786c,_0x2b9058){_0x5786c=_0x5786c-0x19c;const _0x245fa4=a59_0x245f();let _0x55f5e6=_0x245fa4[_0x5786c];return _0x55f5e6;}const a59_0x51b913=a59_0x55f5;(function(_0x5bb24c,_0x13f386){const _0x50137f=a59_0x55f5,_0x453eaf=_0x5bb24c();while(!![]){try{const _0xbb899=parseInt(_0x50137f(0x1ae))/0x1+-parseInt(_0x50137f(0x19c))/0x2+parseInt(_0x50137f(0x19d))/0x3*(-parseInt(_0x50137f(0x1a1))/0x4)+parseInt(_0x50137f(0x1b1))/0x5*(parseInt(_0x50137f(0x1b5))/0x6)+parseInt(_0x50137f(0x1af))/0x7*(parseInt(_0x50137f(0x1b4))/0x8)+parseInt(_0x50137f(0x1ad))/0x9*(parseInt(_0x50137f(0x1a2))/0xa)+-parseInt(_0x50137f(0x1ac))/0xb*(parseInt(_0x50137f(0x19e))/0xc);if(_0xbb899===_0x13f386)break;else _0x453eaf['push'](_0x453eaf['shift']());}catch(_0x1ddd3d){_0x453eaf['push'](_0x453eaf['shift']());}}}(a59_0x245f,0x4090a));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0x245f(){const _0x18be98=['number','923571uyfGVk','234HIqGgz','376121FQKwLY','14YWDAcY','dbid','5ALCKkk','ungrouped','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','150296ZteVnz','167322WIHkGl','669168LNfbmW','21bUldJc','12uonKvA','length','read','3604pWgXni','95280EHaOzO','business-groups','num','groups','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','Found\x20','businessGroup','\x20business\x20group(s)\x20for\x20database\x20connection\x20','trim'];a59_0x245f=function(){return _0x18be98;};return a59_0x245f();}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':'dataset','command':a59_0x51b913(0x1a3),'description':a59_0x51b913(0x1a6),'risk':a59_0x51b913(0x1a0),'flags':[{'name':a59_0x51b913(0x1b0),'type':a59_0x51b913(0x1ab),'required':!![],'description':a59_0x51b913(0x1b3)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1e147f){const _0x292a1b=a59_0x51b913,_0x365114=_0x1e147f[_0x292a1b(0x1a4)]('dbid'),_0x2da838=await getErBusinessGroupSummary(_0x1e147f['appCode'],_0x365114),_0x6f1874=_0x2da838[_0x292a1b(0x1a5)]['map'](_0x56cf4a=>({..._0x56cf4a,'businessGroup':_0x56cf4a[_0x292a1b(0x1a8)][_0x292a1b(0x1aa)]()||_0x292a1b(0x1b2)}));return{'ok':!![],'data':{..._0x2da838,'groups':_0x6f1874,'scope':'DB_TABLE'},'message':_0x292a1b(0x1a7)+_0x6f1874[_0x292a1b(0x19f)]+_0x292a1b(0x1a9)+_0x365114};}};
1
+ const a59_0x40e851=a59_0x5e54;(function(_0xd414f5,_0x5e2d54){const _0x436d16=a59_0x5e54,_0x392e6a=_0xd414f5();while(!![]){try{const _0x481493=parseInt(_0x436d16(0x155))/0x1*(parseInt(_0x436d16(0x166))/0x2)+-parseInt(_0x436d16(0x15a))/0x3*(parseInt(_0x436d16(0x167))/0x4)+-parseInt(_0x436d16(0x159))/0x5*(parseInt(_0x436d16(0x152))/0x6)+-parseInt(_0x436d16(0x161))/0x7*(-parseInt(_0x436d16(0x156))/0x8)+-parseInt(_0x436d16(0x157))/0x9+-parseInt(_0x436d16(0x15c))/0xa*(-parseInt(_0x436d16(0x15d))/0xb)+-parseInt(_0x436d16(0x15e))/0xc*(-parseInt(_0x436d16(0x164))/0xd);if(_0x481493===_0x5e2d54)break;else _0x392e6a['push'](_0x392e6a['shift']());}catch(_0x2fc381){_0x392e6a['push'](_0x392e6a['shift']());}}}(a59_0x27f3,0x57df4));function a59_0x5e54(_0x10303f,_0x12f8a4){_0x10303f=_0x10303f-0x152;const _0x27f338=a59_0x27f3();let _0x5e5477=_0x27f338[_0x10303f];return _0x5e5477;}function a59_0x27f3(){const _0x3453a0=['DB_TABLE','21bovKnl','map','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','131443grOcaC','number','6zxIhoJ','1865316UIGCzk','length','business-groups','num','appCode','dbid','23442nIoTCT','dataset','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','113543RXlBEY','27224oWgjDr','5572368WkuCfX','ungrouped','30dDaYsG','3tTpDZK','\x20business\x20group(s)\x20for\x20database\x20connection\x20','200gJutWd','64361YkJTTX','1188FkIlVh','businessGroup'];a59_0x27f3=function(){return _0x3453a0;};return a59_0x27f3();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a59_0x40e851(0x153),'command':a59_0x40e851(0x169),'description':a59_0x40e851(0x163),'risk':'read','flags':[{'name':a59_0x40e851(0x16c),'type':a59_0x40e851(0x165),'required':!![],'description':a59_0x40e851(0x154)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4e6dce){const _0x40044d=a59_0x40e851,_0x3e6715=_0x4e6dce[_0x40044d(0x16a)](_0x40044d(0x16c)),_0x2ddc80=await getErBusinessGroupSummary(_0x4e6dce[_0x40044d(0x16b)],_0x3e6715),_0x370a18=_0x2ddc80['groups'][_0x40044d(0x162)](_0x4d0927=>({..._0x4d0927,'businessGroup':_0x4d0927[_0x40044d(0x15f)]['trim']()||_0x40044d(0x158)}));return{'ok':!![],'data':{..._0x2ddc80,'groups':_0x370a18,'scope':_0x40044d(0x160)},'message':'Found\x20'+_0x370a18[_0x40044d(0x168)]+_0x40044d(0x15b)+_0x3e6715};}};
@@ -1 +1 @@
1
- function a60_0x1a59(_0x2905e5,_0x3c00a9){_0x2905e5=_0x2905e5-0x18c;const _0x373531=a60_0x3735();let _0x1a598a=_0x373531[_0x2905e5];return _0x1a598a;}const a60_0x502da4=a60_0x1a59;(function(_0x5bfcf4,_0x2d1877){const _0x15f17c=a60_0x1a59,_0x51e06e=_0x5bfcf4();while(!![]){try{const _0x3ea0f8=parseInt(_0x15f17c(0x1a5))/0x1*(-parseInt(_0x15f17c(0x19b))/0x2)+parseInt(_0x15f17c(0x1a6))/0x3+-parseInt(_0x15f17c(0x195))/0x4+-parseInt(_0x15f17c(0x191))/0x5+-parseInt(_0x15f17c(0x1a0))/0x6*(parseInt(_0x15f17c(0x19a))/0x7)+parseInt(_0x15f17c(0x1ac))/0x8*(parseInt(_0x15f17c(0x1b0))/0x9)+-parseInt(_0x15f17c(0x18d))/0xa*(-parseInt(_0x15f17c(0x1a7))/0xb);if(_0x3ea0f8===_0x2d1877)break;else _0x51e06e['push'](_0x51e06e['shift']());}catch(_0x197587){_0x51e06e['push'](_0x51e06e['shift']());}}}(a60_0x3735,0x321ba));function a60_0x3735(){const _0x371192=['18eFTxRR','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','name','dbId','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','95496AzNGTD','dataset','datasetName','METADATA','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','18173zuSEWK','681681EGOXXR','231lCykyv','modelCode','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','toUpperCase','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','1375352tQVPmI','trim','lovrabet','object','9YTlrlr','datasetCode','80910OcBpFu','sourceType','dbtable','code','65500UvNgFg','getOne','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','dbtableConfig','48328agdkYi','filter','length','validation','tableName','77HqNhNn'];a60_0x3735=function(){return _0x371192;};return a60_0x3735();}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x502da4(0x1ae),'filter':a60_0x502da4(0x19f),'getOne':a60_0x502da4(0x19c)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x502da4(0x193);function valueToString(_0x282998){const _0x44ac93=a60_0x502da4;return _0x282998==null?'':String(_0x282998)[_0x44ac93(0x1ad)]();}function getDatasetCode(_0x3452b3){const _0x433eb5=a60_0x502da4;return valueToString(_0x3452b3[_0x433eb5(0x190)]??_0x3452b3[_0x433eb5(0x1a8)]??_0x3452b3[_0x433eb5(0x1a1)]?.[_0x433eb5(0x18c)]);}function getDatasetName(_0x206b65){const _0x4090af=a60_0x502da4;return valueToString(_0x206b65[_0x4090af(0x19d)]??_0x206b65[_0x4090af(0x1a1)]?.[_0x4090af(0x1a2)])||'unknown';}function getDatasetSource(_0x168584){const _0x35d8fe=a60_0x502da4;return valueToString(_0x168584['source']??_0x168584[_0x35d8fe(0x1a1)]?.[_0x35d8fe(0x18e)])[_0x35d8fe(0x1aa)]();}function getDbtableConfig(_0x49e8fe){const _0x531047=a60_0x502da4,_0x45737f=_0x49e8fe[_0x531047(0x194)]??_0x49e8fe[_0x531047(0x18f)];return _0x45737f&&typeof _0x45737f===_0x531047(0x1af)?_0x45737f:{};}export function isDbTableBackedDataset(_0x145239){const _0x50dbeb=a60_0x502da4,_0x5cd44e=getDatasetSource(_0x145239);if(_0x5cd44e===_0x50dbeb(0x1a3))return![];const _0x4c3447=getDbtableConfig(_0x145239),_0x44048e=_0x4c3447[_0x50dbeb(0x19e)]??_0x4c3447['id'],_0x1210c3=valueToString(_0x4c3447[_0x50dbeb(0x199)]??_0x145239['tableName']??_0x145239[_0x50dbeb(0x1a1)]?.['tableName']);return _0x44048e!==undefined&&_0x44048e!==null&&_0x1210c3[_0x50dbeb(0x197)]>0x0;}export function filterDbTableBackedDatasets(_0x1f7b06){const _0x3c756d=a60_0x502da4;return _0x1f7b06[_0x3c756d(0x196)](_0x260a47=>isDbTableBackedDataset(_0x260a47));}export function buildDbTableBackedRequirementMessage(_0x2400c5,_0x50e75e='SQL\x20schema\x20validation'){const _0x280eac=a60_0x502da4,_0x563696=getDatasetSource(_0x2400c5)||'UNKNOWN',_0x43cf86=getDatasetName(_0x2400c5),_0x2b5457=getDatasetCode(_0x2400c5),_0x2c8372=_0x2b5457?'\x20('+_0x2b5457+')':'';return['The\x20current\x20dataset\x20\x22'+_0x43cf86+'\x22'+_0x2c8372+'\x20is\x20'+_0x563696+_0x280eac(0x1a9)+_0x50e75e+'.',_0x280eac(0x1ab),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x280eac(0x1a4)+RUNTIME_DATA_ACCESS_COMMANDS[_0x280eac(0x196)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x280eac(0x192)]+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x4fce57,_0x3163c3){const _0x15c2b0=a60_0x502da4;if(!isDbTableBackedDataset(_0x4fce57))throw CliErrors[_0x15c2b0(0x198)](buildDbTableBackedRequirementMessage(_0x4fce57,_0x3163c3));}
1
+ const a60_0x4d8ec8=a60_0x4bcd;(function(_0x39deab,_0x33575a){const _0x3c9be9=a60_0x4bcd,_0x5dca32=_0x39deab();while(!![]){try{const _0xab5392=parseInt(_0x3c9be9(0xfa))/0x1+-parseInt(_0x3c9be9(0x101))/0x2*(-parseInt(_0x3c9be9(0xf9))/0x3)+-parseInt(_0x3c9be9(0x106))/0x4+-parseInt(_0x3c9be9(0x102))/0x5+-parseInt(_0x3c9be9(0xef))/0x6+parseInt(_0x3c9be9(0xfe))/0x7+parseInt(_0x3c9be9(0x103))/0x8;if(_0xab5392===_0x33575a)break;else _0x5dca32['push'](_0x5dca32['shift']());}catch(_0x44c91c){_0x5dca32['push'](_0x5dca32['shift']());}}}(a60_0x1cc0,0xd209f));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a60_0x4d8ec8(0x105),'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=a60_0x4d8ec8(0xf8);function valueToString(_0x248225){const _0x3a5b57=a60_0x4d8ec8;return _0x248225==null?'':String(_0x248225)[_0x3a5b57(0xee)]();}function getDatasetCode(_0xd10653){const _0x4686da=a60_0x4d8ec8;return valueToString(_0xd10653[_0x4686da(0xf3)]??_0xd10653['modelCode']??_0xd10653['dataset']?.[_0x4686da(0xf5)]);}function getDatasetName(_0x5cde9d){const _0x24c984=a60_0x4d8ec8;return valueToString(_0x5cde9d['name']??_0x5cde9d[_0x24c984(0x100)]?.[_0x24c984(0xf7)])||_0x24c984(0xe7);}function getDatasetSource(_0x1dd319){const _0x170381=a60_0x4d8ec8;return valueToString(_0x1dd319[_0x170381(0xf1)]??_0x1dd319[_0x170381(0x100)]?.[_0x170381(0xf2)])[_0x170381(0x107)]();}function getDbtableConfig(_0x48b0e2){const _0x2bbb39=a60_0x4d8ec8,_0xa79b9b=_0x48b0e2[_0x2bbb39(0xed)]??_0x48b0e2[_0x2bbb39(0x109)];return _0xa79b9b&&typeof _0xa79b9b===_0x2bbb39(0xf0)?_0xa79b9b:{};}export function isDbTableBackedDataset(_0x3c5384){const _0x4cb8e3=a60_0x4d8ec8,_0x11ae19=getDatasetSource(_0x3c5384);if(_0x11ae19===_0x4cb8e3(0x10a))return![];const _0x343764=getDbtableConfig(_0x3c5384),_0x154fd3=_0x343764['dbId']??_0x343764['id'],_0x4c06bf=valueToString(_0x343764['tableName']??_0x3c5384[_0x4cb8e3(0xfb)]??_0x3c5384[_0x4cb8e3(0x100)]?.['tableName']);return _0x154fd3!==undefined&&_0x154fd3!==null&&_0x4c06bf[_0x4cb8e3(0xe8)]>0x0;}export function filterDbTableBackedDatasets(_0x433c3d){const _0x1edf10=a60_0x4d8ec8;return _0x433c3d[_0x1edf10(0xf6)](_0x8bf593=>isDbTableBackedDataset(_0x8bf593));}function a60_0x4bcd(_0x25d066,_0x36974d){_0x25d066=_0x25d066-0xe6;const _0x1cc04c=a60_0x1cc0();let _0x4bcdd0=_0x1cc04c[_0x25d066];return _0x4bcdd0;}function a60_0x1cc0(){const _0x3ab15b=['sourceType','code','SQL\x20schema\x20validation','datasetCode','filter','datasetName','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','1288086pwNYau','42284mWYJYk','tableName','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','UNKNOWN','7302855nCoirQ','join','dataset','2weyleG','4028830JOMmIl','12096000mLBzzk','The\x20current\x20dataset\x20\x22','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','3988580evXMUj','toUpperCase','getOne','dbtable','METADATA','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','unknown','length','\x20is\x20','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','validation','dbtableConfig','trim','2182086acovTt','object','source'];a60_0x1cc0=function(){return _0x3ab15b;};return a60_0x1cc0();}export function buildDbTableBackedRequirementMessage(_0x4cbb86,_0x2dacf0=a60_0x4d8ec8(0xf4)){const _0x23481e=a60_0x4d8ec8,_0x15832a=getDatasetSource(_0x4cbb86)||_0x23481e(0xfd),_0x6be775=getDatasetName(_0x4cbb86),_0x4acfbf=getDatasetCode(_0x4cbb86),_0x4d597e=_0x4acfbf?'\x20('+_0x4acfbf+')':'';return[_0x23481e(0x104)+_0x6be775+'\x22'+_0x4d597e+_0x23481e(0xe9)+_0x15832a+_0x23481e(0xeb)+_0x2dacf0+'.',_0x23481e(0xfc),_0x23481e(0xe6),_0x23481e(0xea)+RUNTIME_DATA_ACCESS_COMMANDS[_0x23481e(0xf6)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x23481e(0x108)]+'.'][_0x23481e(0xff)]('\x20');}export function assertDatasetIsDbTableBacked(_0x450546,_0x24a9b6){const _0x326142=a60_0x4d8ec8;if(!isDbTableBackedDataset(_0x450546))throw CliErrors[_0x326142(0xec)](buildDbTableBackedRequirementMessage(_0x450546,_0x24a9b6));}
@@ -1 +1 @@
1
- const a61_0x4ec1b1=a61_0xda18;(function(_0x548228,_0x4f60ed){const _0x4e31bc=a61_0xda18,_0x5606a4=_0x548228();while(!![]){try{const _0x2b2a1d=-parseInt(_0x4e31bc(0xe9))/0x1*(parseInt(_0x4e31bc(0xee))/0x2)+parseInt(_0x4e31bc(0xe3))/0x3*(-parseInt(_0x4e31bc(0xcc))/0x4)+-parseInt(_0x4e31bc(0xc0))/0x5+-parseInt(_0x4e31bc(0xd8))/0x6*(parseInt(_0x4e31bc(0xd4))/0x7)+parseInt(_0x4e31bc(0xe7))/0x8+-parseInt(_0x4e31bc(0xf1))/0x9*(parseInt(_0x4e31bc(0xd5))/0xa)+parseInt(_0x4e31bc(0xe5))/0xb*(parseInt(_0x4e31bc(0xc1))/0xc);if(_0x2b2a1d===_0x4f60ed)break;else _0x5606a4['push'](_0x5606a4['shift']());}catch(_0x692132){_0x5606a4['push'](_0x5606a4['shift']());}}}(a61_0x4d02,0x4e014));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';function a61_0xda18(_0x3aafdd,_0xbb966){_0x3aafdd=_0x3aafdd-0xb4;const _0x4d020a=a61_0x4d02();let _0xda183a=_0x4d020a[_0x3aafdd];return _0xda183a;}function a61_0x4d02(){const _0x8c5457=['relatedPages','Dataset\x20id','1018444uCAusn','appCode','Deleted\x20','object','dbid','name','delete','num','3081883MlmggG','69850eoiDqK','isArray','message','6JxgnAw','bool','confirm','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','filter','deleted','Required\x20to\x20execute\x20dataset\x20deletion','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','rabetbase\x20page\x20restore\x20--id\x20','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','6XwtdYH','Matched\x20','21923cawpfI','description','3309280NgXfsH','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','458027HyJxVp','add','dbtableConfig','false','dbid=','2zmCiNE','length','type','45jsUGJT','push','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','map','validation','relatedPageInfoList','high-risk-write','dbName','source','No\x20undeleted\x20dataset\x20found\x20for\x20','Would\x20safely\x20delete\x20','title','boolean','dbId','cascade','str','isInteger','expected-count','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','393485tnTZaX','8592dvWeuG','Would\x20delete\x20','code','number','\x20failed','\x20dataset(s)','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','dataset'];a61_0x4d02=function(){return _0x8c5457;};return a61_0x4d02();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x4ec1b1(0xc4),'description':a61_0x4ec1b1(0xcb)},DBID_FLAG={'name':a61_0x4ec1b1(0xd0),'type':a61_0x4ec1b1(0xc4),'description':a61_0x4ec1b1(0xe2)},CONFIRM_FLAG={'name':'confirm','type':a61_0x4ec1b1(0xb9),'description':a61_0x4ec1b1(0xdf)},CASCADE_FLAG={'name':a61_0x4ec1b1(0xbb),'type':a61_0x4ec1b1(0xb9),'description':a61_0x4ec1b1(0xbf)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a61_0x4ec1b1(0xc4),'description':a61_0x4ec1b1(0xc8)};export const datasetDelete={'service':a61_0x4ec1b1(0xc9),'command':a61_0x4ec1b1(0xd2),'description':a61_0x4ec1b1(0xf3),'risk':a61_0x4ec1b1(0xf8),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5c8325){const _0x11548a=a61_0x4ec1b1,_0x4d1299=_0x5c8325['num']('id'),_0x1d8483=_0x5c8325['str'](_0x11548a(0xc3)),_0x5add41=_0x5c8325[_0x11548a(0xd3)](_0x11548a(0xd0)),_0x1ceacb=[_0x4d1299>0x0,Boolean(_0x1d8483),_0x5add41>0x0][_0x11548a(0xdd)](Boolean);if(_0x1ceacb[_0x11548a(0xef)]===0x0)throw CliErrors[_0x11548a(0xf6)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x1ceacb[_0x11548a(0xef)]>0x1)throw CliErrors['validation'](_0x11548a(0xe8));},async 'dryRun'(_0xeda1a6){const _0x621b12=a61_0x4ec1b1,_0x48a056=await resolveTargets(_0xeda1a6),_0x344c45=_0xeda1a6[_0x621b12(0xd9)]('cascade');return{'method':'POST','url':'/smartapi/dataset/delete?cascade='+(_0x344c45?'true':_0x621b12(0xec)),'body':{'count':_0x48a056[_0x621b12(0xef)],'cascade':_0x344c45,'datasets':_0x48a056},'description':_0x344c45?_0x621b12(0xc2)+_0x48a056['length']+_0x621b12(0xc7):_0x621b12(0xb7)+_0x48a056[_0x621b12(0xef)]+_0x621b12(0xf4)};},async 'execute'(_0x2a3257){const _0x1bb8c8=a61_0x4ec1b1;if(!_0x2a3257[_0x1bb8c8(0xd9)](_0x1bb8c8(0xda)))throw CliErrors['validation'](_0x1bb8c8(0xdc),_0x1bb8c8(0xe0));const _0x226ee3=await resolveTargets(_0x2a3257),_0x4c8b4b=_0x2a3257[_0x1bb8c8(0xd9)](_0x1bb8c8(0xbb)),_0x3c192b=[],_0xfc0c4b=[];for(const _0x32922d of _0x226ee3){try{await deleteDataset(_0x32922d['id'],_0x4c8b4b),_0x3c192b[_0x1bb8c8(0xf2)](_0x32922d);}catch(_0x2b3346){_0xfc0c4b[_0x1bb8c8(0xf2)]({..._0x32922d,'error':_0x2b3346 instanceof Error?_0x2b3346[_0x1bb8c8(0xd7)]:String(_0x2b3346)});}}if(_0xfc0c4b[_0x1bb8c8(0xef)]>0x0){const _0x4363ae=buildPageRestoreCommands(_0x2a3257[_0x1bb8c8(0xcd)],_0x4c8b4b?_0x3c192b:[]);return{'ok':![],'data':{'requested':_0x226ee3[_0x1bb8c8(0xef)],'cascade':_0x4c8b4b,'deletedCount':_0x3c192b[_0x1bb8c8(0xef)],'failedCount':_0xfc0c4b[_0x1bb8c8(0xef)],'deleted':_0x3c192b,'failed':_0xfc0c4b,'pageRestoreCommands':_0x4363ae},'message':_0x1bb8c8(0xce)+_0x3c192b[_0x1bb8c8(0xef)]+'/'+_0x226ee3[_0x1bb8c8(0xef)]+'\x20dataset(s);\x20'+_0xfc0c4b['length']+_0x1bb8c8(0xc5)};}return{'ok':!![],'data':{'requested':_0x226ee3[_0x1bb8c8(0xef)],'cascade':_0x4c8b4b,'deletedCount':_0x3c192b['length'],'deleted':_0x3c192b,'pageRestoreCommands':buildPageRestoreCommands(_0x2a3257[_0x1bb8c8(0xcd)],_0x4c8b4b?_0x3c192b:[])},'message':_0x1bb8c8(0xce)+_0x3c192b[_0x1bb8c8(0xef)]+_0x1bb8c8(0xc6)};}};async function resolveTargets(_0x52bbc6){const _0xd2e5e9=a61_0x4ec1b1,_0x585f17=_0x52bbc6[_0xd2e5e9(0xd3)]('id'),_0x5a4469=_0x52bbc6[_0xd2e5e9(0xbc)](_0xd2e5e9(0xc3)),_0x42c198=_0x52bbc6[_0xd2e5e9(0xd3)](_0xd2e5e9(0xd0));let _0x2c4827;_0x5a4469?(_0x2c4827=await listDatasets(_0x52bbc6['appCode'],{'code':_0x5a4469}),_0x2c4827=_0x2c4827[_0xd2e5e9(0xdd)](_0x4ce536=>_0x4ce536[_0xd2e5e9(0xc3)]===_0x5a4469)):(_0x2c4827=await listDatasets(_0x52bbc6[_0xd2e5e9(0xcd)]),_0x585f17>0x0&&(_0x2c4827=_0x2c4827[_0xd2e5e9(0xdd)](_0xe3d667=>_0xe3d667['id']===_0x585f17)),_0x42c198>0x0&&(_0x2c4827=_0x2c4827[_0xd2e5e9(0xdd)](_0x3a284c=>_0x3a284c['dbtableConfig']?.[_0xd2e5e9(0xba)]===_0x42c198)));const _0x58f586=[];for(const _0x5bc590 of _0x2c4827){const _0x1526d7=await getDatasetDetail(_0x5bc590[_0xd2e5e9(0xc3)]),_0x3f4d44=Array[_0xd2e5e9(0xd6)](_0x1526d7['relatedPageInfoList'])?_0x1526d7[_0xd2e5e9(0xf7)][_0xd2e5e9(0xdd)](_0x56e633=>_0x56e633!=null&&typeof _0x56e633===_0xd2e5e9(0xcf)&&_0x56e633[_0xd2e5e9(0xde)]!==!![]):[];_0x58f586['push'](normalizeTarget(_0x5bc590,_0x3f4d44));}if(_0x58f586[_0xd2e5e9(0xef)]===0x0){const _0x404b28=_0x5a4469||(_0x585f17>0x0?'id='+_0x585f17:_0xd2e5e9(0xed)+_0x42c198);throw CliErrors[_0xd2e5e9(0xf6)](_0xd2e5e9(0xb6)+_0x404b28+'.');}const _0x2df223=_0x52bbc6[_0xd2e5e9(0xd3)](_0xd2e5e9(0xbe));if(_0x2df223>0x0&&_0x58f586[_0xd2e5e9(0xef)]!==_0x2df223)throw CliErrors[_0xd2e5e9(0xf6)](_0xd2e5e9(0xe4)+_0x58f586[_0xd2e5e9(0xef)]+_0xd2e5e9(0xdb)+_0x2df223+'.');return _0x58f586;}function normalizeTarget(_0x1fa9a8,_0x354afc){const _0x47d219=a61_0x4ec1b1,_0x325195=_0x1fa9a8[_0x47d219(0xeb)]??{},_0x3d46ce=_0x354afc[_0x47d219(0xf5)](_0x1748e5=>{const _0x473ac7=_0x47d219;if(_0x1748e5==null||typeof _0x1748e5!=='object')return null;const _0x3cdb8f=_0x1748e5,_0x38f44c=Number(_0x3cdb8f['id']);if(!Number[_0x473ac7(0xbd)](_0x38f44c)||_0x38f44c<=0x0)return null;const _0x3ebe8c=_0x3cdb8f[_0x473ac7(0xb8)]??_0x3cdb8f[_0x473ac7(0xd1)];return{'id':_0x38f44c,..._0x3ebe8c?{'name':String(_0x3ebe8c)}:{},..._0x3cdb8f['type']?{'type':String(_0x3cdb8f[_0x473ac7(0xf0)])}:{}};})[_0x47d219(0xdd)](_0x4d75aa=>_0x4d75aa!==null);return{'id':_0x1fa9a8['id'],'code':_0x1fa9a8['code'],'name':_0x1fa9a8[_0x47d219(0xd1)],'description':_0x1fa9a8[_0x47d219(0xe6)],'source':_0x1fa9a8[_0x47d219(0xb5)],'dbId':_0x325195[_0x47d219(0xba)],'dbName':_0x325195[_0x47d219(0xb4)],'tableName':_0x325195['tableName'],'relatedPageCount':_0x3d46ce['length'],'relatedPages':_0x3d46ce};}function buildPageRestoreCommands(_0x524b85,_0x1c7780){const _0x2cb343=a61_0x4ec1b1,_0x36a80c=new Set();for(const _0xfc967d of _0x1c7780){for(const _0x331d0b of _0xfc967d[_0x2cb343(0xca)])_0x36a80c[_0x2cb343(0xea)](_0x331d0b['id']);}return[..._0x36a80c]['map'](_0x70e7af=>_0x2cb343(0xe1)+_0x70e7af+'\x20--appcode\x20'+_0x524b85);}
1
+ const a61_0x1226f5=a61_0x3768;(function(_0x33ab60,_0x7d0e3b){const _0xbc281=a61_0x3768,_0x343ddd=_0x33ab60();while(!![]){try{const _0x36c0cf=parseInt(_0xbc281(0x214))/0x1+parseInt(_0xbc281(0x201))/0x2*(-parseInt(_0xbc281(0x1f0))/0x3)+-parseInt(_0xbc281(0x215))/0x4*(parseInt(_0xbc281(0x1dd))/0x5)+parseInt(_0xbc281(0x1db))/0x6*(-parseInt(_0xbc281(0x1fd))/0x7)+parseInt(_0xbc281(0x20c))/0x8*(-parseInt(_0xbc281(0x213))/0x9)+parseInt(_0xbc281(0x212))/0xa+parseInt(_0xbc281(0x1d7))/0xb*(parseInt(_0xbc281(0x210))/0xc);if(_0x36c0cf===_0x7d0e3b)break;else _0x343ddd['push'](_0x343ddd['shift']());}catch(_0x2a003e){_0x343ddd['push'](_0x343ddd['shift']());}}}(a61_0x4b7e,0x7c4e0));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x3768(_0x133cae,_0x29db03){_0x133cae=_0x133cae-0x1d5;const _0x4b7ee6=a61_0x4b7e();let _0x376861=_0x4b7ee6[_0x133cae];return _0x376861;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x1226f5(0x20e),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x1226f5(0x20f),'type':a61_0x1226f5(0x20e),'description':a61_0x1226f5(0x211)},CONFIRM_FLAG={'name':'confirm','type':a61_0x1226f5(0x217),'description':a61_0x1226f5(0x1e8)},CASCADE_FLAG={'name':'cascade','type':a61_0x1226f5(0x217),'description':a61_0x1226f5(0x209)},EXPECTED_COUNT_FLAG={'name':a61_0x1226f5(0x1e2),'type':a61_0x1226f5(0x20e),'description':a61_0x1226f5(0x1df)};function a61_0x4b7e(){const _0x3d0a6b=['object','6023598mkjEny','relatedPages','80yltMrE','bool','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','message','push','expected-count','relatedPageInfoList','deleted','dbId','dbid=','tableName','Required\x20to\x20execute\x20dataset\x20deletion','type','Deleted\x20','false','\x20--appcode\x20','name','validation','No\x20undeleted\x20dataset\x20found\x20for\x20','540021qTlIBc','title','Would\x20delete\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','filter','delete','isInteger','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','rabetbase\x20page\x20restore\x20--id\x20','code','str','dbtableConfig','Would\x20safely\x20delete\x20','7KuiEWJ','description','dataset','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','10IXBSlc','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','num','\x20dataset(s);\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','true','\x20dataset(s)','cascade','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','length','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','152eOxGut','add','number','dbid','20705400QNHDmX','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','8059040jMzzfY','93366emIKBN','694888AdvpZR','154004dZuqaH','\x20failed','boolean','/smartapi/dataset/delete?cascade=','dbName','11qkNBgu','confirm','appCode'];a61_0x4b7e=function(){return _0x3d0a6b;};return a61_0x4b7e();}export const datasetDelete={'service':a61_0x1226f5(0x1ff),'command':a61_0x1226f5(0x1f5),'description':a61_0x1226f5(0x20b),'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'(_0x4e414b){const _0x2bd3b2=a61_0x1226f5,_0x46660b=_0x4e414b['num']('id'),_0x3456e0=_0x4e414b[_0x2bd3b2(0x1fa)](_0x2bd3b2(0x1f9)),_0x1f8076=_0x4e414b[_0x2bd3b2(0x203)](_0x2bd3b2(0x20f)),_0x39f9ad=[_0x46660b>0x0,Boolean(_0x3456e0),_0x1f8076>0x0][_0x2bd3b2(0x1f4)](Boolean);if(_0x39f9ad[_0x2bd3b2(0x20a)]===0x0)throw CliErrors[_0x2bd3b2(0x1ee)](_0x2bd3b2(0x1f3));if(_0x39f9ad['length']>0x1)throw CliErrors[_0x2bd3b2(0x1ee)](_0x2bd3b2(0x202));},async 'dryRun'(_0x434077){const _0x37e46f=a61_0x1226f5,_0x2d3e3c=await resolveTargets(_0x434077),_0x4a3b29=_0x434077[_0x37e46f(0x1de)](_0x37e46f(0x208));return{'method':'POST','url':_0x37e46f(0x1d5)+(_0x4a3b29?_0x37e46f(0x206):_0x37e46f(0x1eb)),'body':{'count':_0x2d3e3c[_0x37e46f(0x20a)],'cascade':_0x4a3b29,'datasets':_0x2d3e3c},'description':_0x4a3b29?_0x37e46f(0x1f2)+_0x2d3e3c[_0x37e46f(0x20a)]+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':_0x37e46f(0x1fc)+_0x2d3e3c['length']+_0x37e46f(0x1f7)};},async 'execute'(_0x2bbfc9){const _0x173137=a61_0x1226f5;if(!_0x2bbfc9[_0x173137(0x1de)](_0x173137(0x1d8)))throw CliErrors['validation'](_0x173137(0x205),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x2f29d1=await resolveTargets(_0x2bbfc9),_0x5b592c=_0x2bbfc9[_0x173137(0x1de)](_0x173137(0x208)),_0x43a804=[],_0x171ea9=[];for(const _0x23b417 of _0x2f29d1){try{await deleteDataset(_0x23b417['id'],_0x5b592c),_0x43a804[_0x173137(0x1e1)](_0x23b417);}catch(_0xf8e0e8){_0x171ea9['push']({..._0x23b417,'error':_0xf8e0e8 instanceof Error?_0xf8e0e8[_0x173137(0x1e0)]:String(_0xf8e0e8)});}}if(_0x171ea9[_0x173137(0x20a)]>0x0){const _0xbf0ef6=buildPageRestoreCommands(_0x2bbfc9[_0x173137(0x1d9)],_0x5b592c?_0x43a804:[]);return{'ok':![],'data':{'requested':_0x2f29d1[_0x173137(0x20a)],'cascade':_0x5b592c,'deletedCount':_0x43a804['length'],'failedCount':_0x171ea9[_0x173137(0x20a)],'deleted':_0x43a804,'failed':_0x171ea9,'pageRestoreCommands':_0xbf0ef6},'message':'Deleted\x20'+_0x43a804[_0x173137(0x20a)]+'/'+_0x2f29d1[_0x173137(0x20a)]+_0x173137(0x204)+_0x171ea9['length']+_0x173137(0x216)};}return{'ok':!![],'data':{'requested':_0x2f29d1['length'],'cascade':_0x5b592c,'deletedCount':_0x43a804[_0x173137(0x20a)],'deleted':_0x43a804,'pageRestoreCommands':buildPageRestoreCommands(_0x2bbfc9[_0x173137(0x1d9)],_0x5b592c?_0x43a804:[])},'message':_0x173137(0x1ea)+_0x43a804[_0x173137(0x20a)]+_0x173137(0x207)};}};async function resolveTargets(_0x324bcd){const _0x4ec2db=a61_0x1226f5,_0x41a077=_0x324bcd[_0x4ec2db(0x203)]('id'),_0x5b41af=_0x324bcd['str'](_0x4ec2db(0x1f9)),_0x63b231=_0x324bcd['num']('dbid');let _0x4017d6;_0x5b41af?(_0x4017d6=await listDatasets(_0x324bcd[_0x4ec2db(0x1d9)],{'code':_0x5b41af}),_0x4017d6=_0x4017d6[_0x4ec2db(0x1f4)](_0x11a405=>_0x11a405[_0x4ec2db(0x1f9)]===_0x5b41af)):(_0x4017d6=await listDatasets(_0x324bcd[_0x4ec2db(0x1d9)]),_0x41a077>0x0&&(_0x4017d6=_0x4017d6[_0x4ec2db(0x1f4)](_0x5d69fd=>_0x5d69fd['id']===_0x41a077)),_0x63b231>0x0&&(_0x4017d6=_0x4017d6[_0x4ec2db(0x1f4)](_0x5849e9=>_0x5849e9['dbtableConfig']?.[_0x4ec2db(0x1e5)]===_0x63b231)));const _0x26f1a8=[];for(const _0x3b410b of _0x4017d6){const _0x16403d=await getDatasetDetail(_0x3b410b['code']),_0x5098e1=Array['isArray'](_0x16403d[_0x4ec2db(0x1e3)])?_0x16403d[_0x4ec2db(0x1e3)]['filter'](_0x45c273=>_0x45c273!=null&&typeof _0x45c273===_0x4ec2db(0x1da)&&_0x45c273[_0x4ec2db(0x1e4)]!==!![]):[];_0x26f1a8[_0x4ec2db(0x1e1)](normalizeTarget(_0x3b410b,_0x5098e1));}if(_0x26f1a8['length']===0x0){const _0x2d37a7=_0x5b41af||(_0x41a077>0x0?'id='+_0x41a077:_0x4ec2db(0x1e6)+_0x63b231);throw CliErrors['validation'](_0x4ec2db(0x1ef)+_0x2d37a7+'.');}const _0x468b11=_0x324bcd[_0x4ec2db(0x203)]('expected-count');if(_0x468b11>0x0&&_0x26f1a8[_0x4ec2db(0x20a)]!==_0x468b11)throw CliErrors[_0x4ec2db(0x1ee)]('Matched\x20'+_0x26f1a8[_0x4ec2db(0x20a)]+_0x4ec2db(0x200)+_0x468b11+'.');return _0x26f1a8;}function normalizeTarget(_0x13366e,_0x5840c6){const _0x240793=a61_0x1226f5,_0x54b08f=_0x13366e[_0x240793(0x1fb)]??{},_0x6c3571=_0x5840c6['map'](_0x17be3f=>{const _0x4c8905=_0x240793;if(_0x17be3f==null||typeof _0x17be3f!==_0x4c8905(0x1da))return null;const _0x5b2350=_0x17be3f,_0x2a1c5a=Number(_0x5b2350['id']);if(!Number[_0x4c8905(0x1f6)](_0x2a1c5a)||_0x2a1c5a<=0x0)return null;const _0x50956d=_0x5b2350[_0x4c8905(0x1f1)]??_0x5b2350[_0x4c8905(0x1ed)];return{'id':_0x2a1c5a,..._0x50956d?{'name':String(_0x50956d)}:{},..._0x5b2350[_0x4c8905(0x1e9)]?{'type':String(_0x5b2350[_0x4c8905(0x1e9)])}:{}};})[_0x240793(0x1f4)](_0x136a32=>_0x136a32!==null);return{'id':_0x13366e['id'],'code':_0x13366e['code'],'name':_0x13366e[_0x240793(0x1ed)],'description':_0x13366e[_0x240793(0x1fe)],'source':_0x13366e['source'],'dbId':_0x54b08f['dbId'],'dbName':_0x54b08f[_0x240793(0x1d6)],'tableName':_0x54b08f[_0x240793(0x1e7)],'relatedPageCount':_0x6c3571[_0x240793(0x20a)],'relatedPages':_0x6c3571};}function buildPageRestoreCommands(_0x50e1c7,_0x5e7d78){const _0x5ea02f=a61_0x1226f5,_0x34f030=new Set();for(const _0x4d56ad of _0x5e7d78){for(const _0x39f364 of _0x4d56ad[_0x5ea02f(0x1dc)])_0x34f030[_0x5ea02f(0x20d)](_0x39f364['id']);}return[..._0x34f030]['map'](_0x22f7fb=>_0x5ea02f(0x1f8)+_0x22f7fb+_0x5ea02f(0x1ec)+_0x50e1c7);}
@@ -1 +1 @@
1
- function a62_0x4934(){const _0x4824a4=['options','modifierNameField','modelCode','doType','operations','title','toFieldLabel','deleted','toField','creatorNameField','14dbbjIN','labelField','host','object','push','291676SYULlj','split','1029222drzQma','3814565NjxVIg','pkField','string','method','relatedPageInfoList','deprecated','65042KbLeIG','dbType','description','toDatasetCode','displayName','modelId','read','relations','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','type','allFields','beforeScriptId','formatRules','afterScriptId','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','tableComment','responseBody','map','dbId','requestBody','code','validateRules','detail','cardinality','dbtableConfig','toDatasetName','name','isArray','dataType','tableName','path','parse','indexes','extend','doVersion','datasetKey','str','21159056xhKGXK','3828270fhIhnG','updateTimeField','columnCodeListWithDeleted','dblinkInfoDTO','3437892hEfyiQ','responseFields','entries','filter','properties','requestFields','main_sub','length','fields','dbName'];a62_0x4934=function(){return _0x4824a4;};return a62_0x4934();}const a62_0x5bd994=a62_0x4264;(function(_0x147f7c,_0x150921){const _0x56ec76=a62_0x4264,_0x12868e=_0x147f7c();while(!![]){try{const _0x4d93e4=parseInt(_0x56ec76(0xe3))/0x1*(parseInt(_0x56ec76(0xd5))/0x2)+-parseInt(_0x56ec76(0xdc))/0x3+-parseInt(_0x56ec76(0xc1))/0x4+-parseInt(_0x56ec76(0xdd))/0x5+-parseInt(_0x56ec76(0xbd))/0x6+parseInt(_0x56ec76(0xda))/0x7+parseInt(_0x56ec76(0xbc))/0x8;if(_0x4d93e4===_0x150921)break;else _0x12868e['push'](_0x12868e['shift']());}catch(_0x737e7b){_0x12868e['push'](_0x12868e['shift']());}}}(a62_0x4934,0x836e3));import{getDatasetDetail}from'../../core/api-client.js';function a62_0x4264(_0x45dbd7,_0x4dc22f){_0x45dbd7=_0x45dbd7-0xaa;const _0x4934e5=a62_0x4934();let _0x4264c6=_0x4934e5[_0x45dbd7];return _0x4264c6;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0xa11965){const _0x5626b4=a62_0x4264;if(_0xa11965['deleted'])return null;const _0x1a2c59=Boolean(_0xa11965[_0x5626b4(0xe7)]!==undefined||_0xa11965[_0x5626b4(0xce)]!==undefined);let _0x5ac66b={};if(!_0x1a2c59&&typeof _0xa11965[_0x5626b4(0xb8)]==='string')try{_0x5ac66b=JSON[_0x5626b4(0xb6)](_0xa11965[_0x5626b4(0xb8)]);}catch{}const _0x334a32=_0x1a2c59?_0xa11965['name']:_0xa11965[_0x5626b4(0xab)],_0x5c6517=_0x1a2c59?_0xa11965['displayName']:_0xa11965[_0x5626b4(0xb1)],_0x2b54d9=_0x1a2c59?_0xa11965[_0x5626b4(0xce)]:_0xa11965[_0x5626b4(0xec)]||_0xa11965[_0x5626b4(0xb3)],_0x436478=_0x1a2c59?_0xa11965['pkField']===!![]:_0x5ac66b['pkField']===!![],_0x6a0ec9=_0x1a2c59?_0xa11965['required']===!![]:_0x5ac66b['required']===!![],_0x4f9eaa=_0x1a2c59?_0xa11965['options']??null:_0x5ac66b[_0x5626b4(0xcb)]??null,_0x44117b={'name':_0x334a32,'displayName':_0x5c6517||_0x334a32,'type':_0x2b54d9,'dbType':_0xa11965[_0x5626b4(0xe4)],'pk':_0x436478,'required':_0x6a0ec9,'deprecated':_0xa11965[_0x5626b4(0xe2)]===!![],'description':_0xa11965[_0x5626b4(0xe5)]||undefined};return Array[_0x5626b4(0xb2)](_0x4f9eaa)&&_0x4f9eaa[_0x5626b4(0xc8)]>0x0&&(_0x44117b[_0x5626b4(0xcb)]=_0x4f9eaa),_0x44117b;}function parseJsonMaybe(_0x18973c){const _0x5b54e9=a62_0x4264;if(typeof _0x18973c!==_0x5b54e9(0xdf))return _0x18973c;try{return JSON[_0x5b54e9(0xb6)](_0x18973c);}catch{return _0x18973c;}}function normalizeOperationEntry(_0x4aac96,_0x5becf3){const _0x5658a3=a62_0x4264;if(!_0x5becf3||typeof _0x5becf3!=='object')return null;if(!_0x5becf3[_0x5658a3(0xe0)]||!_0x5becf3['path'])return null;const _0x3808a9={'name':_0x4aac96,'method':_0x5becf3[_0x5658a3(0xe0)],'path':_0x5becf3[_0x5658a3(0xb5)]};if(_0x5becf3[_0x5658a3(0xd7)])_0x3808a9[_0x5658a3(0xd7)]=_0x5becf3['host'];if(_0x5becf3['requestBody']!=null){const _0x49311f=parseJsonMaybe(_0x5becf3[_0x5658a3(0xaa)]);_0x3808a9[_0x5658a3(0xaa)]=_0x49311f;}if(_0x5becf3[_0x5658a3(0xf3)]!=null){const _0x2641cd=parseJsonMaybe(_0x5becf3['responseBody']);_0x3808a9[_0x5658a3(0xf3)]=_0x2641cd;}if(_0x5becf3[_0x5658a3(0xee)]!=null)_0x3808a9[_0x5658a3(0xee)]=_0x5becf3['beforeScriptId'];if(_0x5becf3[_0x5658a3(0xf0)]!=null)_0x3808a9[_0x5658a3(0xf0)]=_0x5becf3[_0x5658a3(0xf0)];if(Array[_0x5658a3(0xb2)](_0x5becf3['requestFields']))_0x3808a9[_0x5658a3(0xc6)]=_0x5becf3[_0x5658a3(0xc6)];if(Array[_0x5658a3(0xb2)](_0x5becf3[_0x5658a3(0xc2)]))_0x3808a9[_0x5658a3(0xc2)]=_0x5becf3[_0x5658a3(0xc2)];return _0x3808a9;}function summarizeDbtable(_0x406e02){const _0x351ea0=a62_0x4264,_0x1e95ed={},_0x399aed=['dbId',_0x351ea0(0xca),_0x351ea0(0xb4),_0x351ea0(0xba),_0x351ea0(0xde),_0x351ea0(0xed),'logicField','createTimeField',_0x351ea0(0xbe),'creatorIdField',_0x351ea0(0xd4),'modifierIdField',_0x351ea0(0xcc),_0x351ea0(0xd6),_0x351ea0(0xc0)];for(const _0x1c7c48 of _0x399aed){if(_0x406e02[_0x1c7c48]!==undefined)_0x1e95ed[_0x1c7c48]=_0x406e02[_0x1c7c48];}return typeof _0x1e95ed[_0x351ea0(0xed)]===_0x351ea0(0xdf)&&_0x1e95ed[_0x351ea0(0xed)][_0x351ea0(0xc8)]>0x0&&(_0x1e95ed['allFieldNames']=_0x1e95ed[_0x351ea0(0xed)][_0x351ea0(0xdb)](',')[_0x351ea0(0xf4)](_0x3c6cdb=>_0x3c6cdb['trim']())[_0x351ea0(0xc4)](Boolean)),_0x1e95ed;}function normalizeRelatedPages(_0x5da691){const _0x333778=a62_0x4264;if(!Array['isArray'](_0x5da691))return[];return _0x5da691[_0x333778(0xc4)](_0x50ea38=>_0x50ea38&&typeof _0x50ea38===_0x333778(0xd8))[_0x333778(0xf4)](_0x5ca0f1=>({'id':_0x5ca0f1['id'],'type':_0x5ca0f1['type'],'code':_0x5ca0f1[_0x333778(0xab)],'title':_0x5ca0f1[_0x333778(0xd0)],'deleted':_0x5ca0f1[_0x333778(0xd2)]===!![]}));}export const datasetDetail={'service':'dataset','command':a62_0x5bd994(0xad),'description':a62_0x5bd994(0xeb),'risk':a62_0x5bd994(0xe9),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a62_0x5bd994(0xf1)}],async 'execute'(_0x456caf){const _0x5b7354=a62_0x5bd994,_0x25bc8b=await getDatasetDetail(_0x456caf[_0x5b7354(0xbb)]('code')),_0x47ae11=Array[_0x5b7354(0xb2)](_0x25bc8b[_0x5b7354(0xc9)])?_0x25bc8b[_0x5b7354(0xc9)]:Array[_0x5b7354(0xb2)](_0x25bc8b[_0x5b7354(0xc5)])?_0x25bc8b[_0x5b7354(0xc5)]:[],_0x1290d0=_0x47ae11[_0x5b7354(0xf4)](_0x465c96=>normalizeField(_0x465c96))['filter'](_0x1641e5=>_0x1641e5!==null),_0x138d38=_0x25bc8b[_0x5b7354(0xcf)]??{},_0x56fc3f=[];for(const [_0x648a21,_0x4a8953]of Object[_0x5b7354(0xc3)](_0x138d38)){const _0x1c4dc4=normalizeOperationEntry(_0x648a21,_0x4a8953);if(_0x1c4dc4)_0x56fc3f[_0x5b7354(0xd9)](_0x1c4dc4);}const _0x13e251=_0x25bc8b[_0x5b7354(0xaf)]??{},_0x1549e6=_0x25bc8b['dataset']??{},_0x1bda2c=_0x13e251[_0x5b7354(0xf5)]!=null?{'id':_0x13e251[_0x5b7354(0xf5)],'name':_0x13e251['dbName']??null}:undefined;let _0x1675f0;return typeof _0x25bc8b[_0x5b7354(0xb8)]===_0x5b7354(0xdf)&&(_0x1675f0=parseJsonMaybe(_0x25bc8b[_0x5b7354(0xb8)])),{'ok':!![],'data':{'id':_0x25bc8b[_0x5b7354(0xe8)]??_0x25bc8b['id'],'name':_0x25bc8b[_0x5b7354(0xb1)],'code':_0x25bc8b[_0x5b7354(0xcd)]||_0x25bc8b[_0x5b7354(0xab)],'doVersion':_0x25bc8b[_0x5b7354(0xb9)],'description':_0x25bc8b['description']||_0x1549e6[_0x5b7354(0xf2)]||undefined,'source':_0x25bc8b['source']||_0x1549e6['sourceType'],'table':_0x13e251[_0x5b7354(0xb4)]||_0x1549e6[_0x5b7354(0xb4)],'datasetKey':_0x13e251[_0x5b7354(0xba)],'pk':_0x13e251[_0x5b7354(0xde)],'db':_0x1bda2c,'dbtable':summarizeDbtable(_0x13e251),'fields':_0x1290d0,'operations':_0x56fc3f,'indexes':Array[_0x5b7354(0xb2)](_0x1549e6[_0x5b7354(0xb7)])?_0x1549e6[_0x5b7354(0xb7)]:[],'relations':Array[_0x5b7354(0xb2)](_0x25bc8b[_0x5b7354(0xea)])?_0x25bc8b[_0x5b7354(0xea)][_0x5b7354(0xf4)](_0x53f2f3=>({..._0x53f2f3['relationId']!=null?{'relationId':_0x53f2f3['relationId']}:{},'fromDataset':_0x25bc8b[_0x5b7354(0xb1)],'fromCode':_0x25bc8b[_0x5b7354(0xcd)]||_0x25bc8b[_0x5b7354(0xab)],'fromTable':_0x13e251[_0x5b7354(0xb4)]||_0x1549e6['tableName'],'fromField':_0x53f2f3['fromField'],'toDataset':_0x53f2f3[_0x5b7354(0xb0)],'toCode':_0x53f2f3[_0x5b7354(0xe6)],'toTable':_0x53f2f3['toTableName'],'toField':_0x53f2f3[_0x5b7354(0xd3)],'labelField':_0x53f2f3[_0x5b7354(0xd1)]||undefined,'cardinality':_0x53f2f3[_0x5b7354(0xae)]||undefined,'bizRelationType':_0x53f2f3['bizRelationType']===_0x5b7354(0xc7)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x25bc8b[_0x5b7354(0xe1)]),...Array[_0x5b7354(0xb2)](_0x25bc8b['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x25bc8b[_0x5b7354(0xbf)]}:{},'formatRules':Array['isArray'](_0x25bc8b['formatRules'])?_0x25bc8b[_0x5b7354(0xef)]:[],'validateRules':Array[_0x5b7354(0xb2)](_0x25bc8b[_0x5b7354(0xac)])?_0x25bc8b[_0x5b7354(0xac)]:[],..._0x1675f0!==undefined?{'extend':_0x1675f0}:{},'stats':{'fieldCount':_0x1290d0[_0x5b7354(0xc8)],'operationCount':_0x56fc3f[_0x5b7354(0xc8)]}}};}};
1
+ const a62_0x3d761e=a62_0x1141;(function(_0x698f3c,_0x14a741){const _0x29a8d7=a62_0x1141,_0x3d99f2=_0x698f3c();while(!![]){try{const _0x450116=parseInt(_0x29a8d7(0x1fd))/0x1+parseInt(_0x29a8d7(0x1da))/0x2+-parseInt(_0x29a8d7(0x1be))/0x3*(-parseInt(_0x29a8d7(0x1cf))/0x4)+-parseInt(_0x29a8d7(0x1de))/0x5+-parseInt(_0x29a8d7(0x1f8))/0x6+-parseInt(_0x29a8d7(0x1d2))/0x7+parseInt(_0x29a8d7(0x1c8))/0x8;if(_0x450116===_0x14a741)break;else _0x3d99f2['push'](_0x3d99f2['shift']());}catch(_0x478052){_0x3d99f2['push'](_0x3d99f2['shift']());}}}(a62_0x14df,0xebe4d));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x2f7b16){const _0x366f95=a62_0x1141;if(_0x2f7b16[_0x366f95(0x1f6)])return null;const _0x462b10=Boolean(_0x2f7b16[_0x366f95(0x1cb)]!==undefined||_0x2f7b16[_0x366f95(0x1bc)]!==undefined);let _0x28bb8e={};if(!_0x462b10&&typeof _0x2f7b16['extend']===_0x366f95(0x1e6))try{_0x28bb8e=JSON[_0x366f95(0x1fa)](_0x2f7b16['extend']);}catch{}const _0x525657=_0x462b10?_0x2f7b16['name']:_0x2f7b16[_0x366f95(0x1bb)],_0x16f16d=_0x462b10?_0x2f7b16['displayName']:_0x2f7b16['name'],_0x325d53=_0x462b10?_0x2f7b16[_0x366f95(0x1bc)]:_0x2f7b16[_0x366f95(0x1f7)]||_0x2f7b16['dataType'],_0x2d58e2=_0x462b10?_0x2f7b16[_0x366f95(0x1d4)]===!![]:_0x28bb8e['pkField']===!![],_0x3b3e83=_0x462b10?_0x2f7b16[_0x366f95(0x1b8)]===!![]:_0x28bb8e[_0x366f95(0x1b8)]===!![],_0x469c2f=_0x462b10?_0x2f7b16[_0x366f95(0x1fe)]??null:_0x28bb8e[_0x366f95(0x1fe)]??null,_0x2434f8={'name':_0x525657,'displayName':_0x16f16d||_0x525657,'type':_0x325d53,'dbType':_0x2f7b16[_0x366f95(0x1b7)],'pk':_0x2d58e2,'required':_0x3b3e83,'deprecated':_0x2f7b16[_0x366f95(0x1cd)]===!![],'description':_0x2f7b16['description']||undefined};return Array[_0x366f95(0x1fc)](_0x469c2f)&&_0x469c2f['length']>0x0&&(_0x2434f8[_0x366f95(0x1fe)]=_0x469c2f),_0x2434f8;}function a62_0x1141(_0x68f579,_0x5ad7a7){_0x68f579=_0x68f579-0x1b4;const _0x14df18=a62_0x14df();let _0x1141f5=_0x14df18[_0x68f579];return _0x1141f5;}function parseJsonMaybe(_0x8bc61b){const _0x693766=a62_0x1141;if(typeof _0x8bc61b!==_0x693766(0x1e6))return _0x8bc61b;try{return JSON[_0x693766(0x1fa)](_0x8bc61b);}catch{return _0x8bc61b;}}function normalizeOperationEntry(_0x2a2037,_0x2c5ea0){const _0x349163=a62_0x1141;if(!_0x2c5ea0||typeof _0x2c5ea0!==_0x349163(0x1ec))return null;if(!_0x2c5ea0['method']||!_0x2c5ea0[_0x349163(0x1c1)])return null;const _0x4210bf={'name':_0x2a2037,'method':_0x2c5ea0[_0x349163(0x1f3)],'path':_0x2c5ea0['path']};if(_0x2c5ea0[_0x349163(0x1d7)])_0x4210bf[_0x349163(0x1d7)]=_0x2c5ea0['host'];if(_0x2c5ea0[_0x349163(0x1df)]!=null){const _0x10f21c=parseJsonMaybe(_0x2c5ea0[_0x349163(0x1df)]);_0x4210bf[_0x349163(0x1df)]=_0x10f21c;}if(_0x2c5ea0[_0x349163(0x1ba)]!=null){const _0x3dedad=parseJsonMaybe(_0x2c5ea0[_0x349163(0x1ba)]);_0x4210bf['responseBody']=_0x3dedad;}if(_0x2c5ea0[_0x349163(0x1ea)]!=null)_0x4210bf[_0x349163(0x1ea)]=_0x2c5ea0[_0x349163(0x1ea)];if(_0x2c5ea0[_0x349163(0x1c6)]!=null)_0x4210bf[_0x349163(0x1c6)]=_0x2c5ea0[_0x349163(0x1c6)];if(Array['isArray'](_0x2c5ea0[_0x349163(0x1e4)]))_0x4210bf[_0x349163(0x1e4)]=_0x2c5ea0[_0x349163(0x1e4)];if(Array[_0x349163(0x1fc)](_0x2c5ea0[_0x349163(0x1f9)]))_0x4210bf[_0x349163(0x1f9)]=_0x2c5ea0[_0x349163(0x1f9)];return _0x4210bf;}function summarizeDbtable(_0x3c6149){const _0x47a39f=a62_0x1141,_0x440b4b={},_0x25790e=[_0x47a39f(0x1db),_0x47a39f(0x1eb),_0x47a39f(0x1dd),'datasetKey','pkField',_0x47a39f(0x1e2),_0x47a39f(0x1f0),_0x47a39f(0x1b9),'updateTimeField',_0x47a39f(0x1c7),'creatorNameField',_0x47a39f(0x1ee),'modifierNameField',_0x47a39f(0x1d0),'dblinkInfoDTO'];for(const _0x35cafb of _0x25790e){if(_0x3c6149[_0x35cafb]!==undefined)_0x440b4b[_0x35cafb]=_0x3c6149[_0x35cafb];}return typeof _0x440b4b[_0x47a39f(0x1e2)]===_0x47a39f(0x1e6)&&_0x440b4b[_0x47a39f(0x1e2)][_0x47a39f(0x1c0)]>0x0&&(_0x440b4b['allFieldNames']=_0x440b4b[_0x47a39f(0x1e2)][_0x47a39f(0x1e5)](',')[_0x47a39f(0x1e7)](_0x5368aa=>_0x5368aa[_0x47a39f(0x1d8)]())[_0x47a39f(0x1d5)](Boolean)),_0x440b4b;}function normalizeRelatedPages(_0x45db54){const _0x450595=a62_0x1141;if(!Array['isArray'](_0x45db54))return[];return _0x45db54[_0x450595(0x1d5)](_0x6bf2dd=>_0x6bf2dd&&typeof _0x6bf2dd===_0x450595(0x1ec))['map'](_0x5c4eb0=>({'id':_0x5c4eb0['id'],'type':_0x5c4eb0['type'],'code':_0x5c4eb0['code'],'title':_0x5c4eb0[_0x450595(0x1b5)],'deleted':_0x5c4eb0[_0x450595(0x1f6)]===!![]}));}export const datasetDetail={'service':'dataset','command':a62_0x3d761e(0x1c3),'description':a62_0x3d761e(0x1e3),'risk':a62_0x3d761e(0x1ed),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x3d761e(0x1c4),'type':a62_0x3d761e(0x1e6),'description':a62_0x3d761e(0x1b4)}],async 'execute'(_0x1a4fc3){const _0x4b3911=a62_0x3d761e,_0x54d0d2=await getDatasetDetail(_0x1a4fc3[_0x4b3911(0x1e1)](_0x4b3911(0x1bb))),_0x26a59c=Array[_0x4b3911(0x1fc)](_0x54d0d2['fields'])?_0x54d0d2[_0x4b3911(0x1e0)]:Array['isArray'](_0x54d0d2['properties'])?_0x54d0d2[_0x4b3911(0x1e9)]:[],_0x11b45a=_0x26a59c['map'](_0x397aef=>normalizeField(_0x397aef))['filter'](_0x2c87b9=>_0x2c87b9!==null),_0x33ba7b=_0x54d0d2[_0x4b3911(0x1cc)]??{},_0x3a8c1f=[];for(const [_0x58f34b,_0x15a47a]of Object[_0x4b3911(0x1c2)](_0x33ba7b)){const _0x4724bd=normalizeOperationEntry(_0x58f34b,_0x15a47a);if(_0x4724bd)_0x3a8c1f[_0x4b3911(0x1d9)](_0x4724bd);}const _0x3f73e9=_0x54d0d2['dbtableConfig']??{},_0x18d8bb=_0x54d0d2[_0x4b3911(0x1f5)]??{},_0xda9547=_0x3f73e9[_0x4b3911(0x1db)]!=null?{'id':_0x3f73e9[_0x4b3911(0x1db)],'name':_0x3f73e9[_0x4b3911(0x1eb)]??null}:undefined;let _0x5a1fca;return typeof _0x54d0d2[_0x4b3911(0x1ff)]==='string'&&(_0x5a1fca=parseJsonMaybe(_0x54d0d2['extend'])),{'ok':!![],'data':{'id':_0x54d0d2[_0x4b3911(0x1d6)]??_0x54d0d2['id'],'name':_0x54d0d2[_0x4b3911(0x1bf)],'code':_0x54d0d2['modelCode']||_0x54d0d2['code'],'doVersion':_0x54d0d2[_0x4b3911(0x1f1)],'description':_0x54d0d2['description']||_0x18d8bb[_0x4b3911(0x1ca)]||undefined,'source':_0x54d0d2[_0x4b3911(0x1e8)]||_0x18d8bb[_0x4b3911(0x1f4)],'table':_0x3f73e9['tableName']||_0x18d8bb['tableName'],'datasetKey':_0x3f73e9[_0x4b3911(0x1b6)],'pk':_0x3f73e9[_0x4b3911(0x1d4)],'db':_0xda9547,'dbtable':summarizeDbtable(_0x3f73e9),'fields':_0x11b45a,'operations':_0x3a8c1f,'indexes':Array[_0x4b3911(0x1fc)](_0x18d8bb[_0x4b3911(0x1ce)])?_0x18d8bb[_0x4b3911(0x1ce)]:[],'relations':Array[_0x4b3911(0x1fc)](_0x54d0d2[_0x4b3911(0x200)])?_0x54d0d2[_0x4b3911(0x200)]['map'](_0x371d0f=>({..._0x371d0f[_0x4b3911(0x1c9)]!=null?{'relationId':_0x371d0f[_0x4b3911(0x1c9)]}:{},'fromDataset':_0x54d0d2['name'],'fromCode':_0x54d0d2[_0x4b3911(0x1ef)]||_0x54d0d2[_0x4b3911(0x1bb)],'fromTable':_0x3f73e9[_0x4b3911(0x1dd)]||_0x18d8bb[_0x4b3911(0x1dd)],'fromField':_0x371d0f[_0x4b3911(0x1d1)],'toDataset':_0x371d0f[_0x4b3911(0x1f2)],'toCode':_0x371d0f['toDatasetCode'],'toTable':_0x371d0f['toTableName'],'toField':_0x371d0f['toField'],'labelField':_0x371d0f[_0x4b3911(0x1dc)]||undefined,'cardinality':_0x371d0f['cardinality']||undefined,'bizRelationType':_0x371d0f[_0x4b3911(0x1fb)]===_0x4b3911(0x1d3)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x54d0d2['relatedPageInfoList']),...Array[_0x4b3911(0x1fc)](_0x54d0d2[_0x4b3911(0x1bd)])?{'columnCodeListWithDeleted':_0x54d0d2['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x4b3911(0x1fc)](_0x54d0d2[_0x4b3911(0x201)])?_0x54d0d2[_0x4b3911(0x201)]:[],'validateRules':Array[_0x4b3911(0x1fc)](_0x54d0d2[_0x4b3911(0x1c5)])?_0x54d0d2['validateRules']:[],..._0x5a1fca!==undefined?{'extend':_0x5a1fca}:{},'stats':{'fieldCount':_0x11b45a['length'],'operationCount':_0x3a8c1f['length']}}};}};function a62_0x14df(){const _0x37c7a6=['modifierIdField','modelCode','logicField','doVersion','toDatasetName','method','sourceType','dataset','deleted','type','1423476fUhmpo','responseFields','parse','bizRelationType','isArray','340474OMGHEg','options','extend','relations','formatRules','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','title','datasetKey','dbType','required','createTimeField','responseBody','code','doType','columnCodeListWithDeleted','66219eVWQTs','name','length','path','entries','detail','alias','validateRules','afterScriptId','creatorIdField','2887024aKWkXB','relationId','tableComment','displayName','operations','deprecated','indexes','136gEBDGo','labelField','fromField','12659584mmdGHT','main_sub','pkField','filter','modelId','host','trim','push','3251834wdXXQL','dbId','toFieldLabel','tableName','328860TOnoTI','requestBody','fields','str','allFields','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','requestFields','split','string','map','source','properties','beforeScriptId','dbName','object','read'];a62_0x14df=function(){return _0x37c7a6;};return a62_0x14df();}
@@ -1 +1 @@
1
- function a63_0x5b76(_0x915e32,_0x25a30b){_0x915e32=_0x915e32-0xc6;const _0x58b3ec=a63_0x58b3();let _0x5b76ad=_0x58b3ec[_0x915e32];return _0x5b76ad;}const a63_0x9b8ba8=a63_0x5b76;(function(_0x2f811e,_0xb11e7e){const _0x24056f=a63_0x5b76,_0x1f0e7a=_0x2f811e();while(!![]){try{const _0x54a6f0=parseInt(_0x24056f(0xf0))/0x1*(parseInt(_0x24056f(0xce))/0x2)+parseInt(_0x24056f(0x102))/0x3*(-parseInt(_0x24056f(0xec))/0x4)+-parseInt(_0x24056f(0xc9))/0x5*(parseInt(_0x24056f(0xd7))/0x6)+-parseInt(_0x24056f(0xcd))/0x7+-parseInt(_0x24056f(0xe6))/0x8+-parseInt(_0x24056f(0xe5))/0x9*(-parseInt(_0x24056f(0xdf))/0xa)+parseInt(_0x24056f(0xc8))/0xb*(parseInt(_0x24056f(0x103))/0xc);if(_0x54a6f0===_0xb11e7e)break;else _0x1f0e7a['push'](_0x1f0e7a['shift']());}catch(_0x20df66){_0x1f0e7a['push'](_0x1f0e7a['shift']());}}}(a63_0x58b3,0x3d158));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([[a63_0x9b8ba8(0xe9),{'message':a63_0x9b8ba8(0x100),'hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);export function parseJsonObjectFlag(_0x23aaf8,_0x363cf3){const _0x576f15=a63_0x9b8ba8;if(!_0x23aaf8)return undefined;let _0x573655;try{_0x573655=JSON[_0x576f15(0xf4)](_0x23aaf8);}catch(_0x4692fa){const _0x468b7f=_0x4692fa instanceof Error?_0x4692fa[_0x576f15(0xd0)]:String(_0x4692fa);throw CliErrors[_0x576f15(0xfe)](_0x363cf3+_0x576f15(0xe8)+_0x468b7f);}if(!isPlainObject(_0x573655)||Array[_0x576f15(0x10b)](_0x573655))throw CliErrors[_0x576f15(0xfe)](_0x363cf3+_0x576f15(0xd1));return _0x573655;}export function validateExtendPatchKeys(_0x465e36){const _0x4e4036=a63_0x9b8ba8,_0xd83cfe=Object[_0x4e4036(0x101)](_0x465e36);if(_0xd83cfe[_0x4e4036(0xff)]===0x0)throw CliErrors[_0x4e4036(0xfe)](_0x4e4036(0xf8));for(const _0x4ba367 of _0xd83cfe){const _0x451ed5=EXTEND_PATCH_REDIRECTS[_0x4e4036(0xdb)](_0x4ba367);if(_0x451ed5)throw CliErrors[_0x4e4036(0xfe)](_0x451ed5[_0x4e4036(0xd0)],_0x451ed5[_0x4e4036(0xf1)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x4ba367))throw CliErrors[_0x4e4036(0xfe)](_0x4e4036(0x105)+_0x4ba367,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x694286=a63_0x9b8ba8,_0x5035a2=Array[_0x694286(0xf6)](MUTABLE_EXTEND_KEYS)['sort']();return _0x5035a2[_0x694286(0xff)]>0x0?'Allowed\x20keys:\x20'+_0x5035a2[_0x694286(0xc6)](',\x20'):_0x694286(0xcb);}export function applyExtendPatch(_0x40595c,_0x4893ca){const _0xf07970=a63_0x9b8ba8;validateExtendPatchKeys(_0x4893ca);const _0x49ae5f=deepClone(_0x40595c),_0x7b36c8=[];for(const [_0x291b16,_0x3a0b05]of Object['entries'](_0x4893ca)){const _0x139d41=_0x49ae5f[_0x291b16],_0x35395f=deepClone(_0x3a0b05);!deepEqual(_0x139d41,_0x35395f)&&(_0x49ae5f[_0x291b16]=_0x35395f,_0x7b36c8[_0xf07970(0x10a)](_0xf07970(0x10c)+_0x291b16));}return _0x7b36c8[_0xf07970(0xef)](),{'after':_0x49ae5f,'changedPaths':_0x7b36c8,'changed':_0x7b36c8[_0xf07970(0xff)]>0x0};}export function assertExpectation(_0x33bb40,_0x41e6e3){const _0x126879=a63_0x9b8ba8;if(!_0x41e6e3)return;for(const [_0x68cba5,_0x1438d1]of Object[_0x126879(0x104)](_0x41e6e3)){const _0x2d8217=_0x33bb40[_0x68cba5];if(!deepEqual(_0x2d8217,_0x1438d1))throw CliErrors[_0x126879(0xfe)](_0x126879(0xf3)+_0x68cba5,_0x126879(0xd8)+JSON[_0x126879(0xe0)](_0x1438d1)+_0x126879(0xcc)+JSON[_0x126879(0xe0)](_0x2d8217));}}export async function buildDatasetExtendUpdateResult({appCode:_0x5708b2,input:_0x2ae58b,dryRun:_0x36106c}){const _0x585ebd=a63_0x9b8ba8;validateInput(_0x2ae58b);const _0xf3dcdd=await getDatasetDetail(_0x2ae58b[_0x585ebd(0xd3)]),_0x48234e=parseDatasetExtend(_0xf3dcdd[_0x585ebd(0xe1)]),_0xc2bf87=deepClone(_0x48234e['value']);assertExpectation(_0xc2bf87,_0x2ae58b['expect']);const {after:_0x5d16c3,changedPaths:_0x2442bd,changed:_0x598ec2}=applyExtendPatch(_0xc2bf87,_0x2ae58b[_0x585ebd(0xf2)]),_0x18714d=summarizeDataset(_0xf3dcdd,_0x2ae58b[_0x585ebd(0xd3)]);return _0x598ec2&&!_0x36106c&&(_0xf3dcdd[_0x585ebd(0xe1)]=serializeDatasetExtend(_0x5d16c3,_0x48234e[_0x585ebd(0xe4)]),await updateDrivenData(_0xf3dcdd)),{'ok':!![],'data':{'appCode':_0x5708b2,'selector':{'code':_0x2ae58b['code']},'dataset':_0x18714d,'dryRun':_0x36106c,'changed':_0x598ec2,'changedPaths':_0x2442bd,'before':{'extend':_0xc2bf87},'after':{'extend':_0x5d16c3},'submitted':_0x598ec2&&!_0x36106c},'message':_0x598ec2?_0x36106c?_0x585ebd(0xdd)+_0x2442bd[_0x585ebd(0xc6)](',\x20')+')':_0x585ebd(0xf9)+_0x2442bd['join'](',\x20')+')':_0x585ebd(0xfb)};}export const datasetExtendUpdate={'service':a63_0x9b8ba8(0xd9),'command':a63_0x9b8ba8(0xeb),'description':a63_0x9b8ba8(0xfd),'risk':'write','flags':[CODE_FLAG,{'name':'patch-json','type':a63_0x9b8ba8(0xd4),'required':!![],'description':a63_0x9b8ba8(0xd6)},{'name':a63_0x9b8ba8(0xfc),'type':a63_0x9b8ba8(0xd4),'required':![],'description':a63_0x9b8ba8(0xd5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x51ac14){validateInput(readExtendUpdateInput(_0x51ac14));},async 'dryRun'(_0xdfb6f5){const _0x256ed9=a63_0x9b8ba8,_0x5bec76=await buildDatasetExtendUpdateResult({'appCode':_0xdfb6f5[_0x256ed9(0x10d)],'input':readExtendUpdateInput(_0xdfb6f5),'dryRun':!![]});return{'method':_0x256ed9(0xdc),'url':_0x256ed9(0xca),'body':_0x5bec76[_0x256ed9(0xde)],'description':_0x5bec76[_0x256ed9(0xd0)]};},async 'execute'(_0x2b80f1){const _0x5edf19=a63_0x9b8ba8;return buildDatasetExtendUpdateResult({'appCode':_0x2b80f1[_0x5edf19(0x10d)],'input':readExtendUpdateInput(_0x2b80f1),'dryRun':![]});}};function a63_0x58b3(){const _0x504831=['isArray','extend.','appCode','join','datasetCode','911262pgKjcY','5RXwtbp','/smartapi/dataset/update-driven-data','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.',',\x20actual\x20','2476880EtYqMk','2204NUeIRP','dbName','message','\x20must\x20be\x20a\x20JSON\x20object','dbtableConfig','code','string','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','187662ViZjmF','Expected\x20','dataset','dbId','get','POST','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','data','10LicHEd','stringify','extend','name','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','shape','4432041akBhWb','2959920IcZOCE','tableName','\x20must\x20be\x20valid\x20JSON\x20object:\x20','businessGroup','str','extend-update','8eLTKET','datasetName','patch-json','sort','9tkStQU','hint','patch','Expectation\x20mismatch\x20at\x20extend.','parse','trim','from','--patch-json','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Updated\x20dataset\x20extend\x20(','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','No\x20changes\x20for\x20dataset\x20extend','expect-json','Patch\x20dataset\x20top-level\x20extend\x20safely','validation','length','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','keys','612483DNanFj','132NptLVS','entries','Unsupported\x20patch\x20key:\x20','modelCode','object','datasetId','--code\x20is\x20required','push'];a63_0x58b3=function(){return _0x504831;};return a63_0x58b3();}function readExtendUpdateInput(_0x4b7dfb){const _0x18678d=a63_0x9b8ba8,_0x1dda68=trim(_0x4b7dfb['str'](_0x18678d(0xd3))),_0x13ca32=parseJsonObjectFlag(_0x4b7dfb[_0x18678d(0xea)](_0x18678d(0xee)),_0x18678d(0xf7)),_0x43bb4a=parseJsonObjectFlag(_0x4b7dfb[_0x18678d(0xea)](_0x18678d(0xfc)),'--expect-json');return{'code':_0x1dda68,'patch':_0x13ca32||{},'expect':_0x43bb4a};}function validateInput(_0x11d016){const _0x46b39b=a63_0x9b8ba8;if(!_0x11d016[_0x46b39b(0xd3)])throw CliErrors[_0x46b39b(0xfe)](_0x46b39b(0x109));validateExtendPatchKeys(_0x11d016[_0x46b39b(0xf2)]);}function parseDatasetExtend(_0x47206a){const _0x5cea2c=a63_0x9b8ba8;if(typeof _0x47206a===_0x5cea2c(0xd4)){const _0xf82ec4=_0x47206a[_0x5cea2c(0xf5)]();if(!_0xf82ec4)return{'value':{},'shape':'string'};let _0x2643ec;try{_0x2643ec=JSON['parse'](_0xf82ec4);}catch(_0x5586c5){const _0x47c8e3=_0x5586c5 instanceof Error?_0x5586c5[_0x5cea2c(0xd0)]:String(_0x5586c5);throw CliErrors[_0x5cea2c(0xfe)](_0x5cea2c(0xfa)+_0x47c8e3);}if(!isPlainObject(_0x2643ec)||Array[_0x5cea2c(0x10b)](_0x2643ec))throw CliErrors['validation'](_0x5cea2c(0xe3));return{'value':_0x2643ec,'shape':'string'};}if(_0x47206a===undefined||_0x47206a===null)return{'value':{},'shape':_0x5cea2c(0xd4)};if(!isPlainObject(_0x47206a)||Array['isArray'](_0x47206a))throw CliErrors[_0x5cea2c(0xfe)](_0x5cea2c(0xe3));return{'value':_0x47206a,'shape':_0x5cea2c(0x107)};}function serializeDatasetExtend(_0x1e3e11,_0x24a39e){const _0x407f8d=a63_0x9b8ba8;return _0x24a39e===_0x407f8d(0xd4)?JSON[_0x407f8d(0xe0)](_0x1e3e11):_0x1e3e11;}function summarizeDataset(_0x1d0b94,_0x3024d0){const _0x413130=a63_0x9b8ba8,_0x572f31=isPlainObject(_0x1d0b94[_0x413130(0xd9)])?_0x1d0b94['dataset']:{},_0xbfe174=isPlainObject(_0x1d0b94[_0x413130(0xd2)])?_0x1d0b94[_0x413130(0xd2)]:{};return{'id':_0x1d0b94['modelId']??_0x1d0b94['id']??_0x572f31[_0x413130(0x108)]??null,'code':_0x1d0b94[_0x413130(0x106)]??_0x1d0b94[_0x413130(0xd3)]??_0x572f31[_0x413130(0xc7)]??_0x3024d0,'name':_0x1d0b94[_0x413130(0xe2)]??_0x572f31[_0x413130(0xed)]??null,'table':_0xbfe174[_0x413130(0xe7)]??_0x572f31[_0x413130(0xe7)]??null,'db':_0xbfe174[_0x413130(0xcf)]??_0xbfe174[_0x413130(0xda)]??null};}function deepClone(_0x4160fb){const _0x182497=a63_0x9b8ba8;if(_0x4160fb===undefined)return _0x4160fb;return JSON['parse'](JSON[_0x182497(0xe0)](_0x4160fb));}function deepEqual(_0xd6bd93,_0x10eedd){const _0x4cf975=a63_0x9b8ba8;return JSON['stringify'](_0xd6bd93)===JSON[_0x4cf975(0xe0)](_0x10eedd);}function isPlainObject(_0x7eb94a){const _0x2cb2e5=a63_0x9b8ba8;return Boolean(_0x7eb94a)&&typeof _0x7eb94a==='object'&&!Array[_0x2cb2e5(0x10b)](_0x7eb94a);}function trim(_0x1d6887){const _0x56a614=a63_0x9b8ba8,_0x59df55=String(_0x1d6887||'')[_0x56a614(0xf5)]();return _0x59df55;}
1
+ const a63_0x150c5a=a63_0x66a7;(function(_0x45f7bd,_0x5de165){const _0x372495=a63_0x66a7,_0x32f531=_0x45f7bd();while(!![]){try{const _0x5bd098=-parseInt(_0x372495(0x160))/0x1*(parseInt(_0x372495(0x153))/0x2)+parseInt(_0x372495(0x137))/0x3*(-parseInt(_0x372495(0x124))/0x4)+-parseInt(_0x372495(0x158))/0x5*(-parseInt(_0x372495(0x136))/0x6)+-parseInt(_0x372495(0x14c))/0x7*(-parseInt(_0x372495(0x149))/0x8)+-parseInt(_0x372495(0x164))/0x9*(-parseInt(_0x372495(0x125))/0xa)+parseInt(_0x372495(0x169))/0xb*(-parseInt(_0x372495(0x150))/0xc)+-parseInt(_0x372495(0x14b))/0xd*(parseInt(_0x372495(0x128))/0xe);if(_0x5bd098===_0x5de165)break;else _0x32f531['push'](_0x32f531['shift']());}catch(_0x4b064e){_0x32f531['push'](_0x32f531['shift']());}}}(a63_0x24ac,0xdaa50));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([[a63_0x150c5a(0x134),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a63_0x150c5a(0x161)}]]);export function parseJsonObjectFlag(_0x155767,_0x144b30){const _0x9e8843=a63_0x150c5a;if(!_0x155767)return undefined;let _0x2981c6;try{_0x2981c6=JSON['parse'](_0x155767);}catch(_0x18a9f1){const _0xe2e10d=_0x18a9f1 instanceof Error?_0x18a9f1[_0x9e8843(0x14f)]:String(_0x18a9f1);throw CliErrors['validation'](_0x144b30+_0x9e8843(0x130)+_0xe2e10d);}if(!isPlainObject(_0x2981c6)||Array[_0x9e8843(0x152)](_0x2981c6))throw CliErrors['validation'](_0x144b30+_0x9e8843(0x127));return _0x2981c6;}export function validateExtendPatchKeys(_0x4fdd4c){const _0x5c6d99=a63_0x150c5a,_0x4f702b=Object[_0x5c6d99(0x154)](_0x4fdd4c);if(_0x4f702b['length']===0x0)throw CliErrors[_0x5c6d99(0x155)](_0x5c6d99(0x139));for(const _0xa0279b of _0x4f702b){const _0x3bffd8=EXTEND_PATCH_REDIRECTS['get'](_0xa0279b);if(_0x3bffd8)throw CliErrors[_0x5c6d99(0x155)](_0x3bffd8[_0x5c6d99(0x14f)],_0x3bffd8[_0x5c6d99(0x146)]);if(!MUTABLE_EXTEND_KEYS[_0x5c6d99(0x15d)](_0xa0279b))throw CliErrors[_0x5c6d99(0x155)]('Unsupported\x20patch\x20key:\x20'+_0xa0279b,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x1e0a5b=a63_0x150c5a,_0x116cbd=Array[_0x1e0a5b(0x163)](MUTABLE_EXTEND_KEYS)[_0x1e0a5b(0x12c)]();return _0x116cbd[_0x1e0a5b(0x122)]>0x0?_0x1e0a5b(0x157)+_0x116cbd[_0x1e0a5b(0x13c)](',\x20'):'No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.';}export function applyExtendPatch(_0x589b21,_0x204bca){const _0x258007=a63_0x150c5a;validateExtendPatchKeys(_0x204bca);const _0x123c8e=deepClone(_0x589b21),_0x4f0f59=[];for(const [_0x13ff9b,_0x5bc5b1]of Object[_0x258007(0x143)](_0x204bca)){const _0x51aba1=_0x123c8e[_0x13ff9b],_0x18d1c9=deepClone(_0x5bc5b1);!deepEqual(_0x51aba1,_0x18d1c9)&&(_0x123c8e[_0x13ff9b]=_0x18d1c9,_0x4f0f59[_0x258007(0x123)](_0x258007(0x166)+_0x13ff9b));}return _0x4f0f59[_0x258007(0x12c)](),{'after':_0x123c8e,'changedPaths':_0x4f0f59,'changed':_0x4f0f59['length']>0x0};}export function assertExpectation(_0x5e499d,_0x4d4ff8){const _0x13b9bc=a63_0x150c5a;if(!_0x4d4ff8)return;for(const [_0x3cef26,_0x5afa8a]of Object[_0x13b9bc(0x143)](_0x4d4ff8)){const _0x1bbeb7=_0x5e499d[_0x3cef26];if(!deepEqual(_0x1bbeb7,_0x5afa8a))throw CliErrors['validation'](_0x13b9bc(0x148)+_0x3cef26,_0x13b9bc(0x138)+JSON[_0x13b9bc(0x156)](_0x5afa8a)+_0x13b9bc(0x16c)+JSON[_0x13b9bc(0x156)](_0x1bbeb7));}}export async function buildDatasetExtendUpdateResult({appCode:_0x54b6f4,input:_0x163217,dryRun:_0x149830}){const _0x1731dd=a63_0x150c5a;validateInput(_0x163217);const _0x230aae=await getDatasetDetail(_0x163217['code']),_0x48be12=parseDatasetExtend(_0x230aae[_0x1731dd(0x142)]),_0x19a44c=deepClone(_0x48be12[_0x1731dd(0x15a)]);assertExpectation(_0x19a44c,_0x163217[_0x1731dd(0x13e)]);const {after:_0x124a85,changedPaths:_0x482f86,changed:_0x507b50}=applyExtendPatch(_0x19a44c,_0x163217[_0x1731dd(0x14e)]),_0x6ad8f1=summarizeDataset(_0x230aae,_0x163217['code']);return _0x507b50&&!_0x149830&&(_0x230aae[_0x1731dd(0x142)]=serializeDatasetExtend(_0x124a85,_0x48be12[_0x1731dd(0x144)]),await updateDrivenData(_0x230aae)),{'ok':!![],'data':{'appCode':_0x54b6f4,'selector':{'code':_0x163217[_0x1731dd(0x15b)]},'dataset':_0x6ad8f1,'dryRun':_0x149830,'changed':_0x507b50,'changedPaths':_0x482f86,'before':{'extend':_0x19a44c},'after':{'extend':_0x124a85},'submitted':_0x507b50&&!_0x149830},'message':_0x507b50?_0x149830?_0x1731dd(0x13d)+_0x482f86['join'](',\x20')+')':'Updated\x20dataset\x20extend\x20('+_0x482f86[_0x1731dd(0x13c)](',\x20')+')':_0x1731dd(0x12b)};}function a63_0x24ac(){const _0x1b6910=['120tYtBjP','extend-update','\x20must\x20be\x20a\x20JSON\x20object','14EpkESz','trim','write','No\x20changes\x20for\x20dataset\x20extend','sort','patch-json','name','string','\x20must\x20be\x20valid\x20JSON\x20object:\x20','str','dbName','--patch-json','businessGroup','object','6pIEGci','99lRYVxK','Expected\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','appCode','join','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','expect','parse','dbtableConfig','datasetId','extend','entries','shape','/smartapi/dataset/update-driven-data','hint','datasetCode','Expectation\x20mismatch\x20at\x20extend.','4024zmaKMf','expect-json','9446021ERppMA','22435YngNcm','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','patch','message','12hFMLYT','data','isArray','150978vCBhCK','keys','validation','stringify','Allowed\x20keys:\x20','7627210hFRRMX','dataset','value','code','--expect-json','has','modelId','dbId','9NZjgjO','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','datasetName','from','82971prwVyC','POST','extend.','modelCode','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','7563765vHtYug','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','tableName',',\x20actual\x20','length','push','31392YJAaKg'];a63_0x24ac=function(){return _0x1b6910;};return a63_0x24ac();}export const datasetExtendUpdate={'service':a63_0x150c5a(0x159),'command':a63_0x150c5a(0x126),'description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a63_0x150c5a(0x12a),'flags':[CODE_FLAG,{'name':a63_0x150c5a(0x12d),'type':a63_0x150c5a(0x12f),'required':!![],'description':a63_0x150c5a(0x14d)},{'name':a63_0x150c5a(0x14a),'type':a63_0x150c5a(0x12f),'required':![],'description':a63_0x150c5a(0x13a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5cba3b){validateInput(readExtendUpdateInput(_0x5cba3b));},async 'dryRun'(_0x499211){const _0x111bb0=a63_0x150c5a,_0x194263=await buildDatasetExtendUpdateResult({'appCode':_0x499211[_0x111bb0(0x13b)],'input':readExtendUpdateInput(_0x499211),'dryRun':!![]});return{'method':_0x111bb0(0x165),'url':_0x111bb0(0x145),'body':_0x194263[_0x111bb0(0x151)],'description':_0x194263['message']};},async 'execute'(_0x360436){return buildDatasetExtendUpdateResult({'appCode':_0x360436['appCode'],'input':readExtendUpdateInput(_0x360436),'dryRun':![]});}};function readExtendUpdateInput(_0x3ac257){const _0xbb8524=a63_0x150c5a,_0x17dc88=trim(_0x3ac257['str'](_0xbb8524(0x15b))),_0x1c3966=parseJsonObjectFlag(_0x3ac257[_0xbb8524(0x131)](_0xbb8524(0x12d)),_0xbb8524(0x133)),_0x50689f=parseJsonObjectFlag(_0x3ac257['str']('expect-json'),_0xbb8524(0x15c));return{'code':_0x17dc88,'patch':_0x1c3966||{},'expect':_0x50689f};}function validateInput(_0x1d91df){const _0x3125ae=a63_0x150c5a;if(!_0x1d91df[_0x3125ae(0x15b)])throw CliErrors[_0x3125ae(0x155)]('--code\x20is\x20required');validateExtendPatchKeys(_0x1d91df[_0x3125ae(0x14e)]);}function a63_0x66a7(_0x4b0640,_0x47180f){_0x4b0640=_0x4b0640-0x122;const _0x24ac4b=a63_0x24ac();let _0x66a7c3=_0x24ac4b[_0x4b0640];return _0x66a7c3;}function parseDatasetExtend(_0x10e0ca){const _0x1d414b=a63_0x150c5a;if(typeof _0x10e0ca===_0x1d414b(0x12f)){const _0x55e58e=_0x10e0ca[_0x1d414b(0x129)]();if(!_0x55e58e)return{'value':{},'shape':_0x1d414b(0x12f)};let _0x367fa2;try{_0x367fa2=JSON[_0x1d414b(0x13f)](_0x55e58e);}catch(_0xc1682e){const _0x55b1e5=_0xc1682e instanceof Error?_0xc1682e['message']:String(_0xc1682e);throw CliErrors[_0x1d414b(0x155)](_0x1d414b(0x168)+_0x55b1e5);}if(!isPlainObject(_0x367fa2)||Array['isArray'](_0x367fa2))throw CliErrors[_0x1d414b(0x155)](_0x1d414b(0x16a));return{'value':_0x367fa2,'shape':'string'};}if(_0x10e0ca===undefined||_0x10e0ca===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x10e0ca)||Array['isArray'](_0x10e0ca))throw CliErrors[_0x1d414b(0x155)](_0x1d414b(0x16a));return{'value':_0x10e0ca,'shape':_0x1d414b(0x135)};}function serializeDatasetExtend(_0x1aaa5c,_0x30c0c6){const _0x4e5d90=a63_0x150c5a;return _0x30c0c6===_0x4e5d90(0x12f)?JSON[_0x4e5d90(0x156)](_0x1aaa5c):_0x1aaa5c;}function summarizeDataset(_0x3f3ff9,_0x3a733b){const _0x519ae4=a63_0x150c5a,_0x2026cb=isPlainObject(_0x3f3ff9[_0x519ae4(0x159)])?_0x3f3ff9[_0x519ae4(0x159)]:{},_0x39ef11=isPlainObject(_0x3f3ff9[_0x519ae4(0x140)])?_0x3f3ff9[_0x519ae4(0x140)]:{};return{'id':_0x3f3ff9[_0x519ae4(0x15e)]??_0x3f3ff9['id']??_0x2026cb[_0x519ae4(0x141)]??null,'code':_0x3f3ff9[_0x519ae4(0x167)]??_0x3f3ff9[_0x519ae4(0x15b)]??_0x2026cb[_0x519ae4(0x147)]??_0x3a733b,'name':_0x3f3ff9[_0x519ae4(0x12e)]??_0x2026cb[_0x519ae4(0x162)]??null,'table':_0x39ef11[_0x519ae4(0x16b)]??_0x2026cb[_0x519ae4(0x16b)]??null,'db':_0x39ef11[_0x519ae4(0x132)]??_0x39ef11[_0x519ae4(0x15f)]??null};}function deepClone(_0x1f25f9){const _0x3a2abe=a63_0x150c5a;if(_0x1f25f9===undefined)return _0x1f25f9;return JSON[_0x3a2abe(0x13f)](JSON[_0x3a2abe(0x156)](_0x1f25f9));}function deepEqual(_0x2e17df,_0x195230){const _0x58f829=a63_0x150c5a;return JSON[_0x58f829(0x156)](_0x2e17df)===JSON[_0x58f829(0x156)](_0x195230);}function isPlainObject(_0x50fbb4){const _0x4546bf=a63_0x150c5a;return Boolean(_0x50fbb4)&&typeof _0x50fbb4===_0x4546bf(0x135)&&!Array[_0x4546bf(0x152)](_0x50fbb4);}function trim(_0xee4849){const _0x1bf5d5=a63_0x150c5a,_0x495f13=String(_0xee4849||'')[_0x1bf5d5(0x129)]();return _0x495f13;}