@lovrabet/rabetbase-cli 2.5.0-beta.6 → 2.5.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) 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.d.ts +7 -0
  7. package/lib/auth/auth-server.js +1 -1
  8. package/lib/auth/constant.js +1 -1
  9. package/lib/auth/get-cookie.js +1 -1
  10. package/lib/auth/get-session-user.js +1 -1
  11. package/lib/auth/is-session-valid.js +1 -1
  12. package/lib/auth/login-success-html.js +1 -1
  13. package/lib/auth/logout.js +1 -1
  14. package/lib/cli-flags.js +1 -1
  15. package/lib/cli.js +1 -1
  16. package/lib/commands/api/generate.js +1 -1
  17. package/lib/commands/api/index.js +1 -1
  18. package/lib/commands/api/list.js +1 -1
  19. package/lib/commands/api/pull.js +1 -1
  20. package/lib/commands/api/shared.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/members-list.js +1 -1
  24. package/lib/commands/app/remote-directory.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/delete.js +1 -1
  54. package/lib/commands/config/get.js +1 -1
  55. package/lib/commands/config/index.js +1 -1
  56. package/lib/commands/config/init.d.ts +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/business-groups.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.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/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/doctor.js +1 -1
  99. package/lib/commands/file/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/search.js +1 -1
  110. package/lib/commands/kb/shared.js +1 -1
  111. package/lib/commands/kb/update.js +1 -1
  112. package/lib/commands/logs/index.js +1 -1
  113. package/lib/commands/menu/asset-update.js +1 -1
  114. package/lib/commands/menu/delete.js +1 -1
  115. package/lib/commands/menu/external-link-create.js +1 -1
  116. package/lib/commands/menu/external-link-update.js +1 -1
  117. package/lib/commands/menu/group-create.js +1 -1
  118. package/lib/commands/menu/group-update.js +1 -1
  119. package/lib/commands/menu/index.js +1 -1
  120. package/lib/commands/menu/list.js +1 -1
  121. package/lib/commands/menu/move.js +1 -1
  122. package/lib/commands/menu/regroup-start.js +1 -1
  123. package/lib/commands/menu/rename.js +1 -1
  124. package/lib/commands/menu/shared/compare-table.js +1 -1
  125. package/lib/commands/menu/shared/delete-plan.js +1 -1
  126. package/lib/commands/menu/shared/facts.js +1 -1
  127. package/lib/commands/menu/shared/index.js +1 -1
  128. package/lib/commands/menu/shared/inquirer.js +1 -1
  129. package/lib/commands/menu/shared/local-pages.js +1 -1
  130. package/lib/commands/menu/shared/logic.js +1 -1
  131. package/lib/commands/menu/shared/mutations.js +1 -1
  132. package/lib/commands/menu/shared/service.js +1 -1
  133. package/lib/commands/menu/shared/sync-core.js +1 -1
  134. package/lib/commands/menu/shared/update-core.js +1 -1
  135. package/lib/commands/menu/shared/valid-url.js +1 -1
  136. package/lib/commands/menu/sync.js +1 -1
  137. package/lib/commands/menu/visibility-update.js +1 -1
  138. package/lib/commands/notification/config-create.js +1 -1
  139. package/lib/commands/notification/config-delete.js +1 -1
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.js +1 -1
  142. package/lib/commands/notification/index.js +1 -1
  143. package/lib/commands/notification/shared.js +1 -1
  144. package/lib/commands/ocr/index.js +1 -1
  145. package/lib/commands/page/create.js +1 -1
  146. package/lib/commands/page/custom/detail.js +1 -1
  147. package/lib/commands/page/custom/list.js +1 -1
  148. package/lib/commands/page/custom/publish.js +1 -1
  149. package/lib/commands/page/custom/shared.js +1 -1
  150. package/lib/commands/page/custom/syntax.js +1 -1
  151. package/lib/commands/page/custom/template.js +1 -1
  152. package/lib/commands/page/custom/update.js +1 -1
  153. package/lib/commands/page/data-list-status.js +1 -1
  154. package/lib/commands/page/generate-start.js +1 -1
  155. package/lib/commands/page/generate-status.js +1 -1
  156. package/lib/commands/page/index.js +1 -1
  157. package/lib/commands/page/pull.js +1 -1
  158. package/lib/commands/page/push.js +1 -1
  159. package/lib/commands/page/relation-audit.js +1 -1
  160. package/lib/commands/page/restore.js +1 -1
  161. package/lib/commands/page/shared.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  164. package/lib/commands/project/create/format-elapsed.js +1 -1
  165. package/lib/commands/project/create/main.js +1 -1
  166. package/lib/commands/project/create/materialize-project-template.js +1 -1
  167. package/lib/commands/project/create/project-name.js +1 -1
  168. package/lib/commands/project/create/project-template-archive.js +1 -1
  169. package/lib/commands/project/create/project-template-path.js +1 -1
  170. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  171. package/lib/commands/project/create/use-format-code.js +1 -1
  172. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  173. package/lib/commands/project/index.js +1 -1
  174. package/lib/commands/project/upgrade.js +1 -1
  175. package/lib/commands/registry.js +1 -1
  176. package/lib/commands/role/delete.js +1 -1
  177. package/lib/commands/role/detail.js +1 -1
  178. package/lib/commands/role/index.js +1 -1
  179. package/lib/commands/role/list.js +1 -1
  180. package/lib/commands/role/shared.js +1 -1
  181. package/lib/commands/role/update.js +1 -1
  182. package/lib/commands/role/user-add.js +1 -1
  183. package/lib/commands/role/user-remove.js +1 -1
  184. package/lib/commands/role/user-resolve.js +1 -1
  185. package/lib/commands/run/index.js +1 -1
  186. package/lib/commands/schema.js +1 -1
  187. package/lib/commands/sql/create.js +1 -1
  188. package/lib/commands/sql/delete.js +1 -1
  189. package/lib/commands/sql/detail.js +1 -1
  190. package/lib/commands/sql/exec.js +1 -1
  191. package/lib/commands/sql/index.js +1 -1
  192. package/lib/commands/sql/list.js +1 -1
  193. package/lib/commands/sql/pull.js +1 -1
  194. package/lib/commands/sql/push.js +1 -1
  195. package/lib/commands/sql/shared.js +1 -1
  196. package/lib/commands/sql/status.js +1 -1
  197. package/lib/commands/sql/validate.js +1 -1
  198. package/lib/commands/task/index.js +1 -1
  199. package/lib/commands/task/status.js +1 -1
  200. package/lib/commands/tenant/index.js +1 -1
  201. package/lib/commands/tenant/members-list.js +1 -1
  202. package/lib/commands/tenant/shared.js +1 -1
  203. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  204. package/lib/commands/user-account/index.js +1 -1
  205. package/lib/commands/workspace/add.js +1 -1
  206. package/lib/commands/workspace/index.js +1 -1
  207. package/lib/commands/workspace/remove.js +1 -1
  208. package/lib/config/domain-config.d.ts +1 -1
  209. package/lib/config/domain-config.js +1 -1
  210. package/lib/config/project-routing.d.ts +30 -0
  211. package/lib/config/project-routing.js +1 -0
  212. package/lib/config/schema.d.ts +1 -1
  213. package/lib/config/schema.js +1 -1
  214. package/lib/constant/cdn.js +1 -1
  215. package/lib/constant/cli.js +1 -1
  216. package/lib/constant/defaults.js +1 -1
  217. package/lib/constant/domain.d.ts +7 -2
  218. package/lib/constant/domain.js +1 -1
  219. package/lib/constant/env.js +1 -1
  220. package/lib/constant/output.js +1 -1
  221. package/lib/constant/paths.js +1 -1
  222. package/lib/constant/region.d.ts +2 -2
  223. package/lib/constant/region.js +1 -1
  224. package/lib/constant/risk.js +1 -1
  225. package/lib/constant/routing-profile.d.ts +115 -0
  226. package/lib/constant/routing-profile.js +1 -0
  227. package/lib/context/app-resolver.js +1 -1
  228. package/lib/context/auth-resolver.js +1 -1
  229. package/lib/context/config-loader.js +1 -1
  230. package/lib/context.js +1 -1
  231. package/lib/core/alias-resolver.js +1 -1
  232. package/lib/core/api-client.js +1 -1
  233. package/lib/core/bff/config.js +1 -1
  234. package/lib/core/bff/file-system.js +1 -1
  235. package/lib/core/bff/hash.js +1 -1
  236. package/lib/core/bff/lock.js +1 -1
  237. package/lib/core/bff/utils.js +1 -1
  238. package/lib/core/db-resolver.js +1 -1
  239. package/lib/core/page/file-system.js +1 -1
  240. package/lib/core/page/hash.js +1 -1
  241. package/lib/core/page/lock.js +1 -1
  242. package/lib/core/sql-index-auditor.js +1 -1
  243. package/lib/core/sql-sync/config.js +1 -1
  244. package/lib/core/sql-sync/file-system.js +1 -1
  245. package/lib/core/sql-sync/hash.js +1 -1
  246. package/lib/core/sql-sync/lock.js +1 -1
  247. package/lib/core/sql-sync/utils.js +1 -1
  248. package/lib/core/sql-validator.js +1 -1
  249. package/lib/errors.js +1 -1
  250. package/lib/framework/build-all-flags.js +1 -1
  251. package/lib/framework/error-output.js +1 -1
  252. package/lib/framework/explicit-yes.js +1 -1
  253. package/lib/framework/flags.js +1 -1
  254. package/lib/framework/help.js +1 -1
  255. package/lib/framework/index.js +1 -1
  256. package/lib/framework/output.js +1 -1
  257. package/lib/framework/response.js +1 -1
  258. package/lib/framework/runner-alias.js +1 -1
  259. package/lib/framework/runner.js +1 -1
  260. package/lib/framework/schema-export.js +1 -1
  261. package/lib/framework/types.js +1 -1
  262. package/lib/generated/build-info.d.ts +4 -4
  263. package/lib/generated/build-info.js +1 -1
  264. package/lib/help.js +1 -1
  265. package/lib/postinstall.js +1 -1
  266. package/lib/runtime/confirmation.js +1 -1
  267. package/lib/runtime/event.js +1 -1
  268. package/lib/runtime/index.js +1 -1
  269. package/lib/runtime/queue.js +1 -1
  270. package/lib/runtime/resolve.js +1 -1
  271. package/lib/skills/builtin-skill.js +1 -1
  272. package/lib/skills/main.js +1 -1
  273. package/lib/skills/npx-skills-add.js +1 -1
  274. package/lib/skills/skill-presence.js +1 -1
  275. package/lib/telemetry/cli-command-trace.js +1 -1
  276. package/lib/telemetry/cli-help-trace.js +1 -1
  277. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  278. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  279. package/lib/telemetry/send-cli-trace-log.js +1 -1
  280. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  281. package/lib/utils/ai_config.js +1 -1
  282. package/lib/utils/apply-jq-filter.js +1 -1
  283. package/lib/utils/cdn-config.js +1 -1
  284. package/lib/utils/check-sdk-version.js +1 -1
  285. package/lib/utils/cli-version-check.js +1 -1
  286. package/lib/utils/cli-version-policy.js +1 -1
  287. package/lib/utils/config.js +1 -1
  288. package/lib/utils/entity-with-id.js +1 -1
  289. package/lib/utils/file-utils.js +1 -1
  290. package/lib/utils/guides-cdn.js +1 -1
  291. package/lib/utils/http-client.js +1 -1
  292. package/lib/utils/is-non-interactive.js +1 -1
  293. package/lib/utils/logger.js +1 -1
  294. package/lib/utils/params.js +1 -1
  295. package/lib/utils/platform.js +1 -1
  296. package/lib/utils/sleep.js +1 -1
  297. package/lib/utils/template-replacer.js +1 -1
  298. package/lib/utils/update-notice.js +1 -1
  299. package/lib/utils/version.js +1 -1
  300. package/lib/utils/with-active-cookie.js +1 -1
  301. package/lib/utils/write-cli-side-channel.js +1 -1
  302. package/package.json +1 -2
  303. package/skills/rabetbase/SKILL.md +10 -5
  304. package/skills/rabetbase/guides/frontend-development.md +2 -0
  305. package/skills/rabetbase/guides/sdk-client-generation.md +3 -2
  306. package/skills/rabetbase/guides/typescript-sdk.md +42 -0
  307. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -3
  308. package/skills/rabetbase/references/rabetbase-config.md +9 -5
  309. package/skills/rabetbase/references/rabetbase-init.md +11 -5
  310. package/skills/rabetbase/references/rabetbase-project-create.md +6 -5
  311. package/skills/rabetbase.manifest.json +3 -3
  312. package/templates/README.md +13 -17
@@ -1 +1 @@
1
- function a50_0x29a1(){const _0x56c50a=['10GAhzXs','3230890AQdqMD','App\x20Code\x20cannot\x20be\x20empty','95607diWYVi','79203qFxHLR','trim','149926eiqMmT','51061bctjpa','30kNsEOQ','App\x20Code\x20cannot\x20exceed\x20100\x20characters','10LnOEHy','535796lbVAkY','618368eoDKgj'];a50_0x29a1=function(){return _0x56c50a;};return a50_0x29a1();}function a50_0x3aca(_0x3321ed,_0x1d65f7){_0x3321ed=_0x3321ed-0xcb;const _0x29a1ae=a50_0x29a1();let _0x3acab1=_0x29a1ae[_0x3321ed];return _0x3acab1;}(function(_0x409c4c,_0x20dbc5){const _0x5d37ce=a50_0x3aca,_0x23e89a=_0x409c4c();while(!![]){try{const _0x41a8e1=-parseInt(_0x5d37ce(0xd3))/0x1*(parseInt(_0x5d37ce(0xcc))/0x2)+-parseInt(_0x5d37ce(0xd0))/0x3+parseInt(_0x5d37ce(0xd7))/0x4*(parseInt(_0x5d37ce(0xd6))/0x5)+-parseInt(_0x5d37ce(0xd4))/0x6*(parseInt(_0x5d37ce(0xd2))/0x7)+-parseInt(_0x5d37ce(0xcb))/0x8+parseInt(_0x5d37ce(0xcf))/0x9+parseInt(_0x5d37ce(0xcd))/0xa;if(_0x41a8e1===_0x20dbc5)break;else _0x23e89a['push'](_0x23e89a['shift']());}catch(_0x51f227){_0x23e89a['push'](_0x23e89a['shift']());}}}(a50_0x29a1,0x2115e));export function validateAppcode(_0x8888a7){const _0x2bedf8=a50_0x3aca,_0x17d355=_0x8888a7[_0x2bedf8(0xd1)]();if(!_0x17d355)return{'valid':![],'message':_0x2bedf8(0xce)};if(_0x17d355['length']>0x64)return{'valid':![],'message':_0x2bedf8(0xd5)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x17d355))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
1
+ (function(_0x2988db,_0x1849b){const _0xbcce9e=a50_0x51c6,_0x1c5449=_0x2988db();while(!![]){try{const _0xb1f41b=parseInt(_0xbcce9e(0x157))/0x1*(parseInt(_0xbcce9e(0x160))/0x2)+-parseInt(_0xbcce9e(0x15b))/0x3*(parseInt(_0xbcce9e(0x15d))/0x4)+-parseInt(_0xbcce9e(0x15a))/0x5*(parseInt(_0xbcce9e(0x15e))/0x6)+-parseInt(_0xbcce9e(0x15f))/0x7+-parseInt(_0xbcce9e(0x162))/0x8*(parseInt(_0xbcce9e(0x156))/0x9)+parseInt(_0xbcce9e(0x161))/0xa*(parseInt(_0xbcce9e(0x159))/0xb)+parseInt(_0xbcce9e(0x158))/0xc;if(_0xb1f41b===_0x1849b)break;else _0x1c5449['push'](_0x1c5449['shift']());}catch(_0x18b446){_0x1c5449['push'](_0x1c5449['shift']());}}}(a50_0x4a70,0x9e932));function a50_0x51c6(_0x391558,_0x562a4f){_0x391558=_0x391558-0x155;const _0x4a702b=a50_0x4a70();let _0x51c6e6=_0x4a702b[_0x391558];return _0x51c6e6;}export function validateAppcode(_0x2d9b8a){const _0x15ae3d=a50_0x51c6,_0x3977a5=_0x2d9b8a[_0x15ae3d(0x15c)]();if(!_0x3977a5)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x3977a5['length']>0x64)return{'valid':![],'message':_0x15ae3d(0x155)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x3977a5))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a50_0x4a70(){const _0x4d2a86=['9wVvzto','811HWoPwI','24097692NEynOF','649BXyrud','1469915GtyJjq','22377LqmAnK','trim','676gMAAkY','12qgbCdj','944867IUVmDQ','1366xRBLos','154760Zlqart','6736784OANyGL','App\x20Code\x20cannot\x20exceed\x20100\x20characters'];a50_0x4a70=function(){return _0x4d2a86;};return a50_0x4a70();}
@@ -1 +1 @@
1
- const a51_0x83cc2f=a51_0x382c;(function(_0x2150e9,_0x45171b){const _0x297c9b=a51_0x382c,_0x405603=_0x2150e9();while(!![]){try{const _0x122770=parseInt(_0x297c9b(0x1be))/0x1+parseInt(_0x297c9b(0x1b0))/0x2+-parseInt(_0x297c9b(0x1bc))/0x3*(-parseInt(_0x297c9b(0x19f))/0x4)+parseInt(_0x297c9b(0x1bf))/0x5+-parseInt(_0x297c9b(0x1b9))/0x6+parseInt(_0x297c9b(0x1a0))/0x7+-parseInt(_0x297c9b(0x1a9))/0x8*(parseInt(_0x297c9b(0x1a2))/0x9);if(_0x122770===_0x45171b)break;else _0x405603['push'](_0x405603['shift']());}catch(_0xbd62e7){_0x405603['push'](_0x405603['shift']());}}}(a51_0x2924,0x696d1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';function a51_0x2924(){const _0x1b43fe=['prototype','194134BKNwmV','606165FQxyKD','hasOwnProperty','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Missing\x20key\x20argument.','549548GNmSRc','5941131dNdhoj','Top-level\x20key\x20\x22','2196HoPfho','Global','global','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','has','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','Project','35168xEbCXi','boolean','defaultApp','delete','\x20already\x20absent','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x20deleted','886908ZBMUvc','call','riskLevel','validation','key','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','bool','\x20config\x20delete\x20<key>\x20[--global]','trim','1442952mGneAN','config','write','3dgEHva'];a51_0x2924=function(){return _0x1b43fe;};return a51_0x2924();}const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a51_0x83cc2f(0x1ab)]);function a51_0x382c(_0x53f340,_0x5932f5){_0x53f340=_0x53f340-0x19f;const _0x2924ef=a51_0x2924();let _0x382c89=_0x2924ef[_0x53f340];return _0x382c89;}async function execute(_0x4dc945){const _0x16366c=a51_0x83cc2f,_0x31b787=_0x4dc945['args'][0x0]?.[_0x16366c(0x1b8)]();if(!_0x31b787)throw CliErrors[_0x16366c(0x1b3)](_0x16366c(0x1c2),'Usage:\x20'+CLI_BIN_NAME+_0x16366c(0x1b7));if(_0x31b787===_0x16366c(0x1b2))throw CliErrors[_0x16366c(0x1b3)](_0x16366c(0x1b5));if(!isTopLevelConfigKey(_0x31b787)&&!EXTRA_DELETABLE_KEYS['has'](_0x31b787)&&!LEGACY_DELETABLE_KEYS[_0x16366c(0x1a6)](_0x31b787))throw CliErrors[_0x16366c(0x1b3)](_0x16366c(0x1a1)+_0x31b787+'\x22\x20is\x20not\x20deletable.',_0x16366c(0x1ae));const _0x33af1f=resolveWriteScope({'global':_0x4dc945[_0x16366c(0x1b6)](_0x16366c(0x1a4))}),_0x25674a=readScopedConfig(_0x33af1f),_0x2f8ff4=Object[_0x16366c(0x1bd)][_0x16366c(0x1c0)][_0x16366c(0x1b1)](_0x25674a,_0x31b787);_0x2f8ff4&&(delete _0x25674a[_0x31b787],writeScopedConfig(_0x25674a,_0x33af1f));const _0x4946b9=_0x33af1f===_0x16366c(0x1a4)?_0x16366c(0x1a3):_0x16366c(0x1a8);return{'ok':!![],'message':_0x2f8ff4?'✓\x20'+_0x4946b9+'\x20'+_0x31b787+_0x16366c(0x1af):'✓\x20'+_0x4946b9+'\x20'+_0x31b787+_0x16366c(0x1ad),'data':{'key':_0x31b787,'scope':_0x33af1f,'changed':_0x2f8ff4}};}export const configDeleteDefinition={'service':a51_0x83cc2f(0x1ba),'command':a51_0x83cc2f(0x1ac),'description':a51_0x83cc2f(0x1a7),'risk':a51_0x83cc2f(0x1bb),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x83cc2f(0x1b4),'description':a51_0x83cc2f(0x1c1),'required':!![]}],'flags':[{'name':a51_0x83cc2f(0x1a4),'type':a51_0x83cc2f(0x1aa),'description':a51_0x83cc2f(0x1a5),'default':![]}],'execute':execute};
1
+ const a51_0x4f9d08=a51_0x2f41;(function(_0x5575cc,_0x41d018){const _0x3b084e=a51_0x2f41,_0xd6fa78=_0x5575cc();while(!![]){try{const _0x5e78a5=-parseInt(_0x3b084e(0x16d))/0x1*(-parseInt(_0x3b084e(0x17b))/0x2)+-parseInt(_0x3b084e(0x188))/0x3+parseInt(_0x3b084e(0x179))/0x4*(parseInt(_0x3b084e(0x17a))/0x5)+-parseInt(_0x3b084e(0x181))/0x6+-parseInt(_0x3b084e(0x186))/0x7*(parseInt(_0x3b084e(0x174))/0x8)+parseInt(_0x3b084e(0x16b))/0x9+parseInt(_0x3b084e(0x16e))/0xa;if(_0x5e78a5===_0x41d018)break;else _0xd6fa78['push'](_0xd6fa78['shift']());}catch(_0x4f99f3){_0xd6fa78['push'](_0xd6fa78['shift']());}}}(a51_0x405d,0x9afe1));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_0x4f9d08(0x178)]),EXTRA_DELETABLE_KEYS=new Set(['defaultApp']);function a51_0x2f41(_0x4b45dd,_0xc516ea){_0x4b45dd=_0x4b45dd-0x169;const _0x405d2d=a51_0x405d();let _0x2f4176=_0x405d2d[_0x4b45dd];return _0x2f4176;}async function execute(_0x4c2c9a){const _0x5c55cf=a51_0x4f9d08,_0x311724=_0x4c2c9a[_0x5c55cf(0x17c)][0x0]?.[_0x5c55cf(0x185)]();if(!_0x311724)throw CliErrors[_0x5c55cf(0x175)](_0x5c55cf(0x176),_0x5c55cf(0x17d)+CLI_BIN_NAME+_0x5c55cf(0x171));if(_0x311724===_0x5c55cf(0x17e))throw CliErrors[_0x5c55cf(0x175)](_0x5c55cf(0x170));if(!isTopLevelConfigKey(_0x311724)&&!EXTRA_DELETABLE_KEYS[_0x5c55cf(0x172)](_0x311724)&&!LEGACY_DELETABLE_KEYS['has'](_0x311724))throw CliErrors['validation'](_0x5c55cf(0x16c)+_0x311724+_0x5c55cf(0x180),_0x5c55cf(0x173));const _0x5147c7=resolveWriteScope({'global':_0x4c2c9a[_0x5c55cf(0x189)](_0x5c55cf(0x183))}),_0x5ebb22=readScopedConfig(_0x5147c7),_0x5b76c4=Object['prototype']['hasOwnProperty'][_0x5c55cf(0x169)](_0x5ebb22,_0x311724);_0x5b76c4&&(delete _0x5ebb22[_0x311724],writeScopedConfig(_0x5ebb22,_0x5147c7));const _0x398606=_0x5147c7===_0x5c55cf(0x183)?_0x5c55cf(0x177):'Project';return{'ok':!![],'message':_0x5b76c4?'✓\x20'+_0x398606+'\x20'+_0x311724+'\x20deleted':'✓\x20'+_0x398606+'\x20'+_0x311724+_0x5c55cf(0x182),'data':{'key':_0x311724,'scope':_0x5147c7,'changed':_0x5b76c4}};}export const configDeleteDefinition={'service':'config','command':'delete','description':a51_0x4f9d08(0x187),'risk':a51_0x4f9d08(0x16f),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x4f9d08(0x184),'description':a51_0x4f9d08(0x16a),'required':!![]}],'flags':[{'name':a51_0x4f9d08(0x183),'type':a51_0x4f9d08(0x18a),'description':a51_0x4f9d08(0x17f),'default':![]}],'execute':execute};function a51_0x405d(){const _0x176205=['key','trim','7vIMpQw','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','217719OdqqKS','bool','boolean','call','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','1408419kSwWeL','Top-level\x20key\x20\x22','1TUzalZ','552680ZkSoEG','write','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20config\x20delete\x20<key>\x20[--global]','has','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','7370768KOTmky','validation','Missing\x20key\x20argument.','Global','inherit','14036jSIKvo','995bQbOfv','1459344VyJpku','args','Usage:\x20','riskLevel','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','\x22\x20is\x20not\x20deletable.','65724HLQYyw','\x20already\x20absent','global'];a51_0x405d=function(){return _0x176205;};return a51_0x405d();}
@@ -1 +1 @@
1
- const a52_0x1ab480=a52_0x4632;(function(_0x264444,_0x37b353){const _0x3c10e9=a52_0x4632,_0x47bd97=_0x264444();while(!![]){try{const _0x3b1295=-parseInt(_0x3c10e9(0xab))/0x1+parseInt(_0x3c10e9(0xae))/0x2+parseInt(_0x3c10e9(0xa3))/0x3+-parseInt(_0x3c10e9(0xaf))/0x4*(-parseInt(_0x3c10e9(0xb0))/0x5)+-parseInt(_0x3c10e9(0xa7))/0x6+-parseInt(_0x3c10e9(0xaa))/0x7+parseInt(_0x3c10e9(0xb4))/0x8;if(_0x3b1295===_0x37b353)break;else _0x47bd97['push'](_0x47bd97['shift']());}catch(_0x37baf7){_0x47bd97['push'](_0x47bd97['shift']());}}}(a52_0x3c6f,0x1f00d));function a52_0x3c6f(){const _0x480fda=['Get\x20a\x20config\x20value\x20by\x20key','Key\x20not\x20found:\x20','73507nBrSix','200882fzrXBT','key','\x20config\x20get\x20--key\x20<key>','320064qMAjMx','4wBvdyq','707030NGfvHB','Usage:\x20','appcode','string','1928864ZMIoXb','validation','str','135165RALqBM','object','Missing\x20key.','read','1495374UhkGxg'];a52_0x3c6f=function(){return _0x480fda;};return a52_0x3c6f();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a52_0x4632(_0x5e9af5,_0x45155d){_0x5e9af5=_0x5e9af5-0xa2;const _0x3c6f3d=a52_0x3c6f();let _0x4632b6=_0x3c6f3d[_0x5e9af5];return _0x4632b6;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2c82d7){const _0x1b5449=a52_0x4632,_0x4af50d=_0x2c82d7[_0x1b5449(0xa2)](_0x1b5449(0xac));if(!_0x4af50d)throw CliErrors[_0x1b5449(0xb5)](_0x1b5449(0xa5),_0x1b5449(0xb1)+CLI_BIN_NAME+_0x1b5449(0xad));const _0x55ae36=readConfig(),_0x1316a4=_0x4af50d==='app'?_0x1b5449(0xb2):_0x4af50d,_0x5ae7e2=_0x55ae36[_0x1316a4];if(_0x5ae7e2===undefined)throw CliErrors['validation'](_0x1b5449(0xa9)+_0x4af50d);return{'ok':!![],'data':typeof _0x5ae7e2===_0x1b5449(0xa4)?_0x5ae7e2:{[_0x1316a4]:_0x5ae7e2},'message':typeof _0x5ae7e2==='object'?undefined:String(_0x5ae7e2)};}export const configGetDefinition={'service':'config','command':'get','description':a52_0x1ab480(0xa8),'risk':a52_0x1ab480(0xa6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x1ab480(0xac),'type':a52_0x1ab480(0xb3),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a52_0x6ff92d=a52_0x4c09;(function(_0x34774e,_0x19abbf){const _0x160056=a52_0x4c09,_0x4df606=_0x34774e();while(!![]){try{const _0x551bca=-parseInt(_0x160056(0x1e1))/0x1*(-parseInt(_0x160056(0x1e7))/0x2)+-parseInt(_0x160056(0x1e6))/0x3*(-parseInt(_0x160056(0x1e2))/0x4)+parseInt(_0x160056(0x1e9))/0x5+-parseInt(_0x160056(0x1da))/0x6+-parseInt(_0x160056(0x1dc))/0x7*(-parseInt(_0x160056(0x1e4))/0x8)+-parseInt(_0x160056(0x1d8))/0x9*(parseInt(_0x160056(0x1d7))/0xa)+-parseInt(_0x160056(0x1df))/0xb;if(_0x551bca===_0x19abbf)break;else _0x4df606['push'](_0x4df606['shift']());}catch(_0x3926a3){_0x4df606['push'](_0x4df606['shift']());}}}(a52_0x582d,0x7dc0f));import{CliErrors}from'../../errors.js';function a52_0x582d(){const _0x58b238=['228xuHkUo','object','3016500DaxfYt','str','Key\x20not\x20found:\x20','\x20config\x20get\x20--key\x20<key>','6093970spdFfY','9BDDXTW','key','1361250KwYQFk','config','11494ALtSKO','Missing\x20key.','validation','17523077CwAYxR','read','6136wSeoyg','24XVGarb','app','4904DgVbTc','appcode','317508bpHzkI'];a52_0x582d=function(){return _0x58b238;};return a52_0x582d();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x221795){const _0x14648c=a52_0x4c09,_0x4dfb76=_0x221795[_0x14648c(0x1ea)](_0x14648c(0x1d9));if(!_0x4dfb76)throw CliErrors[_0x14648c(0x1de)](_0x14648c(0x1dd),'Usage:\x20'+CLI_BIN_NAME+_0x14648c(0x1d6));const _0x20906d=readConfig(),_0x3aeecf=_0x4dfb76===_0x14648c(0x1e3)?_0x14648c(0x1e5):_0x4dfb76,_0x54e857=_0x20906d[_0x3aeecf];if(_0x54e857===undefined)throw CliErrors[_0x14648c(0x1de)](_0x14648c(0x1d5)+_0x4dfb76);return{'ok':!![],'data':typeof _0x54e857===_0x14648c(0x1e8)?_0x54e857:{[_0x3aeecf]:_0x54e857},'message':typeof _0x54e857===_0x14648c(0x1e8)?undefined:String(_0x54e857)};}function a52_0x4c09(_0xbb76b0,_0x45948c){_0xbb76b0=_0xbb76b0-0x1d5;const _0x582de6=a52_0x582d();let _0x4c098f=_0x582de6[_0xbb76b0];return _0x4c098f;}export const configGetDefinition={'service':a52_0x6ff92d(0x1db),'command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a52_0x6ff92d(0x1e0),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x6ff92d(0x1d9),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a53_0x44fd(_0x238dab,_0x42af51){_0x238dab=_0x238dab-0x1e7;const _0x528058=a53_0x5280();let _0x44fdb2=_0x528058[_0x238dab];return _0x44fdb2;}(function(_0x3d0afd,_0x4d879b){const _0x279a79=a53_0x44fd,_0x5bd800=_0x3d0afd();while(!![]){try{const _0x50e2f6=parseInt(_0x279a79(0x1e8))/0x1*(parseInt(_0x279a79(0x1e9))/0x2)+-parseInt(_0x279a79(0x1eb))/0x3+-parseInt(_0x279a79(0x1ea))/0x4+parseInt(_0x279a79(0x1ed))/0x5*(-parseInt(_0x279a79(0x1ee))/0x6)+parseInt(_0x279a79(0x1ef))/0x7+parseInt(_0x279a79(0x1ec))/0x8*(-parseInt(_0x279a79(0x1e7))/0x9)+-parseInt(_0x279a79(0x1f0))/0xa*(-parseInt(_0x279a79(0x1f1))/0xb);if(_0x50e2f6===_0x4d879b)break;else _0x5bd800['push'](_0x5bd800['shift']());}catch(_0x58c20a){_0x5bd800['push'](_0x5bd800['shift']());}}}(a53_0x5280,0x7965b));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_0x5280(){const _0x305de5=['205560mXKWlk','2629697MEkUOH','9260CCOJOp','27742DGHIOq','293580zndUmu','16VvSVga','1180TpWEWc','543692vTPHAl','2596851tGmLEC','224dyAzuB','45ZMLttZ'];a53_0x5280=function(){return _0x305de5;};return a53_0x5280();}import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
1
+ (function(_0x4d3538,_0x487566){const _0x31f839=a53_0x57b9,_0x2c4ed0=_0x4d3538();while(!![]){try{const _0x5b034b=parseInt(_0x31f839(0x13a))/0x1+-parseInt(_0x31f839(0x13b))/0x2*(parseInt(_0x31f839(0x139))/0x3)+-parseInt(_0x31f839(0x13e))/0x4*(-parseInt(_0x31f839(0x137))/0x5)+-parseInt(_0x31f839(0x138))/0x6*(-parseInt(_0x31f839(0x13f))/0x7)+parseInt(_0x31f839(0x13c))/0x8+parseInt(_0x31f839(0x13d))/0x9+-parseInt(_0x31f839(0x136))/0xa;if(_0x5b034b===_0x487566)break;else _0x2c4ed0['push'](_0x2c4ed0['shift']());}catch(_0x39bb06){_0x2c4ed0['push'](_0x2c4ed0['shift']());}}}(a53_0x8af2,0x1dcc2));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a53_0x57b9(_0x169f32,_0x43b0a1){_0x169f32=_0x169f32-0x136;const _0x8af203=a53_0x8af2();let _0x57b97d=_0x8af203[_0x169f32];return _0x57b97d;}function a53_0x8af2(){const _0xe33853=['3188350PwgifQ','246780opgXde','270cHhUyr','3scGWSP','165030UgXytD','335988zayofK','1281624sGalGW','1271151OzcgaT','8iJtnkq','6797vAWbhW'];a53_0x8af2=function(){return _0xe33853;};return a53_0x8af2();}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];
@@ -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", string>>;
9
+ domains: Partial<Record<"apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "appDomain" | "localDomain" | "certificateDomain", string>>;
10
10
  };
11
11
  }>;
12
12
  export declare const configInitDefinition: CommandDefinition;
@@ -1 +1 @@
1
- const a54_0x44c6de=a54_0xce89;(function(_0x58f0a6,_0x1b6810){const _0xad4015=a54_0xce89,_0x17a487=_0x58f0a6();while(!![]){try{const _0x4f96f1=parseInt(_0xad4015(0x11a))/0x1+-parseInt(_0xad4015(0x134))/0x2*(parseInt(_0xad4015(0x12b))/0x3)+parseInt(_0xad4015(0x118))/0x4+parseInt(_0xad4015(0x12a))/0x5+-parseInt(_0xad4015(0x115))/0x6+parseInt(_0xad4015(0x11c))/0x7+-parseInt(_0xad4015(0x129))/0x8;if(_0x4f96f1===_0x1b6810)break;else _0x17a487['push'](_0x17a487['shift']());}catch(_0xb95d08){_0x17a487['push'](_0x17a487['shift']());}}}(a54_0x1b10,0x39c9d));function a54_0x1b10(){const _0x39024d=['global','1353912VrpDWe','Custom\x20SkillHub\x20HTTPS\x20origin','Custom\x20User\x20HTTPS\x20origin','Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','Independent-deployment\x20Domain\x20JSON\x20file','Updates\x20the\x20global\x20Rabetbase\x20region\x20or\x20independent-deployment\x20domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','runtime-domain','region','Custom\x20knowledge-base\x20HTTPS\x20origin','Indonesia\x20(id)','join','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','str','2354400PDKPCs','1986490IHkxLG','699WSydle','Mainland\x20China\x20(cn)','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','validation','assign','domain-config','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','string','\x22\x20is\x20not\x20currently\x20available.','216btFLgU','Custom\x20platform\x20API\x20HTTPS\x20origin','Select\x20Lovrabet\x20region','api-domain','Region\x20\x22','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','init','config','length','skill-domain','ExitPromptError','keys','1741578auNOIm','Available\x20regions:\x20','app-domain','534924rAXrME','name','121983iuKtNV'];a54_0x1b10=function(){return _0x39024d;};return a54_0x1b10();}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';export const configInitFlags=[{'name':a54_0x44c6de(0x123),'type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x11f),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x44c6de(0x130),'type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x120)},{'name':'user-domain','type':'string','description':a54_0x44c6de(0x11e)},{'name':a54_0x44c6de(0x137),'type':'string','description':a54_0x44c6de(0x135)},{'name':a54_0x44c6de(0x122),'type':'string','description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':a54_0x44c6de(0x112),'type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x11d)},{'name':'kb-domain','type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x124)},{'name':a54_0x44c6de(0x117),'type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x139)}];function a54_0xce89(_0x2a9b70,_0x4ced19){_0x2a9b70=_0x2a9b70-0x110;const _0x1b100f=a54_0x1b10();let _0xce89d3=_0x1b100f[_0x2a9b70];return _0xce89d3;}async function resolveRegion(_0xf3540e){const _0xa815c8=a54_0x44c6de,_0x210a4f=_0xf3540e['str'](_0xa815c8(0x123));if(_0x210a4f){if(!isEnabledLovrabetRegion(_0x210a4f))throw CliErrors[_0xa815c8(0x12e)](_0xa815c8(0x138)+_0x210a4f+_0xa815c8(0x133),_0xa815c8(0x116)+ENABLED_LOVRABET_REGION_VALUES[_0xa815c8(0x126)](',\x20'));return _0x210a4f;}if(_0xf3540e['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0xa815c8(0x136),'default':DEFAULT_LOVRABET_REGION,'choices':[{'name':_0xa815c8(0x12c),'value':'cn'},{'name':_0xa815c8(0x125),'value':'id'}]});}catch(_0x149aa7){if(_0x149aa7?.[_0xa815c8(0x119)]===_0xa815c8(0x113))throw CliErrors['cancelled']();throw _0x149aa7;}}export async function executeConfigInit(_0xfac475){const _0xdeca92=a54_0x44c6de,_0x57c2f1=resolveDomainFlags(_0xfac475),_0x391e5b=Object[_0xdeca92(0x114)](_0x57c2f1)[_0xdeca92(0x111)]>0x0;if(_0x391e5b&&_0xfac475[_0xdeca92(0x128)](_0xdeca92(0x123)))throw CliErrors[_0xdeca92(0x12e)](_0xdeca92(0x12d));const _0x50de3e=readScopedConfig(_0xdeca92(0x11b));for(const _0x478884 of DOMAIN_CONFIG_FIELDS)delete _0x50de3e[_0x478884];for(const _0x46bdd5 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x50de3e[_0x46bdd5];let _0x2b3f4e=null;if(_0x391e5b)delete _0x50de3e[_0xdeca92(0x123)],Object[_0xdeca92(0x12f)](_0x50de3e,_0x57c2f1);else{_0x2b3f4e=await resolveRegion(_0xfac475);if(_0x2b3f4e===DEFAULT_LOVRABET_REGION)delete _0x50de3e[_0xdeca92(0x123)];else _0x50de3e[_0xdeca92(0x123)]=_0x2b3f4e;}return writeScopedConfig(_0x50de3e,_0xdeca92(0x11b)),{'ok':!![],'message':_0x391e5b?_0xdeca92(0x127)+Object[_0xdeca92(0x114)](_0x57c2f1)[_0xdeca92(0x126)](',\x20')+'.':_0xdeca92(0x131)+_0x2b3f4e+'.','data':{'mode':_0x391e5b?'independent':'official','region':_0x2b3f4e,'domains':_0x57c2f1}};}export const configInitDefinition={'service':a54_0x44c6de(0x110),'command':a54_0x44c6de(0x13a),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':a54_0x44c6de(0x121),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
1
+ const a54_0x34fd26=a54_0xb27c;(function(_0x4a4520,_0x2fed9d){const _0xa46826=a54_0xb27c,_0x2ad027=_0x4a4520();while(!![]){try{const _0x1e9555=parseInt(_0xa46826(0x143))/0x1+-parseInt(_0xa46826(0x133))/0x2+-parseInt(_0xa46826(0x13c))/0x3+-parseInt(_0xa46826(0x11d))/0x4*(-parseInt(_0xa46826(0x145))/0x5)+parseInt(_0xa46826(0x124))/0x6*(-parseInt(_0xa46826(0x148))/0x7)+parseInt(_0xa46826(0x14c))/0x8+-parseInt(_0xa46826(0x14b))/0x9*(-parseInt(_0xa46826(0x12c))/0xa);if(_0x1e9555===_0x2fed9d)break;else _0x2ad027['push'](_0x2ad027['shift']());}catch(_0x355930){_0x2ad027['push'](_0x2ad027['shift']());}}}(a54_0x5529,0x33aad));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';export const configInitFlags=[{'name':'region','type':'string','description':'Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x34fd26(0x141),'type':a54_0x34fd26(0x128),'description':a54_0x34fd26(0x121)},{'name':a54_0x34fd26(0x147),'type':a54_0x34fd26(0x128),'description':a54_0x34fd26(0x142)},{'name':a54_0x34fd26(0x132),'type':a54_0x34fd26(0x128),'description':a54_0x34fd26(0x14a)},{'name':a54_0x34fd26(0x12e),'type':a54_0x34fd26(0x128),'description':a54_0x34fd26(0x13a)},{'name':a54_0x34fd26(0x125),'type':'string','description':a54_0x34fd26(0x135)},{'name':'kb-domain','type':'string','description':a54_0x34fd26(0x127)},{'name':a54_0x34fd26(0x137),'type':a54_0x34fd26(0x128),'description':a54_0x34fd26(0x12d)},{'name':a54_0x34fd26(0x12a),'type':'string','description':'Custom\x20local\x20callback\x20HTTPS\x20origin'},{'name':'certificate-domain','type':a54_0x34fd26(0x128),'description':a54_0x34fd26(0x129)}];function a54_0x5529(){const _0x5826d2=['local-domain','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','12050heclAi','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','runtime-domain','write','keys','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','api-domain','376418UPaOFz','name','Custom\x20SkillHub\x20HTTPS\x20origin','nonInteractive','app-domain','region','\x22\x20is\x20not\x20currently\x20available.','Custom\x20Runtime\x20HTTPS\x20origin','str','125112OTClms','localDomain','Available\x20regions:\x20','independent','config','domain-config','Custom\x20User\x20HTTPS\x20origin','10029CPkvzC','assign','43495vWKtJI','validation','user-domain','1660897zNPYdp','join','Custom\x20platform\x20API\x20HTTPS\x20origin','2151pguBNm','123448okPjyo','Select\x20Lovrabet\x20region','168vxLHYf','global','official','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Independent-deployment\x20Domain\x20JSON\x20file','length','Region\x20\x22','6nVkejW','skill-domain','Indonesia\x20(id)','Custom\x20knowledge-base\x20HTTPS\x20origin','string','Custom\x20certificate\x20service\x20HTTPS\x20origin'];a54_0x5529=function(){return _0x5826d2;};return a54_0x5529();}async function resolveRegion(_0x14fcf8){const _0x5ce3e5=a54_0x34fd26,_0x2f57c5=_0x14fcf8['str'](_0x5ce3e5(0x138));if(_0x2f57c5){if(!isEnabledLovrabetRegion(_0x2f57c5))throw CliErrors[_0x5ce3e5(0x146)](_0x5ce3e5(0x123)+_0x2f57c5+_0x5ce3e5(0x139),_0x5ce3e5(0x13e)+ENABLED_LOVRABET_REGION_VALUES[_0x5ce3e5(0x149)](',\x20'));return _0x2f57c5;}if(_0x14fcf8[_0x5ce3e5(0x136)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x5ce3e5(0x14d),'default':DEFAULT_LOVRABET_REGION,'choices':[{'name':'Mainland\x20China\x20(cn)','value':'cn'},{'name':_0x5ce3e5(0x126),'value':'id'}]});}catch(_0x291b0e){if(_0x291b0e?.[_0x5ce3e5(0x134)]==='ExitPromptError')throw CliErrors['cancelled']();throw _0x291b0e;}}export async function executeConfigInit(_0x6851a){const _0x38922e=a54_0x34fd26,_0x56b539=resolveDomainFlags(_0x6851a),_0x3c7502=Object['keys'](_0x56b539)[_0x38922e(0x122)]>0x0;if(_0x3c7502&&_0x6851a[_0x38922e(0x13b)](_0x38922e(0x138)))throw CliErrors['validation'](_0x38922e(0x12b));if(!!_0x56b539[_0x38922e(0x13d)]!==!!_0x56b539['certificateDomain'])throw CliErrors[_0x38922e(0x146)]('Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.');const _0x1062fd=readScopedConfig(_0x38922e(0x11e));for(const _0x5c2b of DOMAIN_CONFIG_FIELDS)delete _0x1062fd[_0x5c2b];for(const _0x6066e7 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x1062fd[_0x6066e7];let _0x4573cd=null;if(_0x3c7502)delete _0x1062fd[_0x38922e(0x138)],Object[_0x38922e(0x144)](_0x1062fd,_0x56b539);else{_0x4573cd=await resolveRegion(_0x6851a);if(_0x4573cd===DEFAULT_LOVRABET_REGION)delete _0x1062fd['region'];else _0x1062fd[_0x38922e(0x138)]=_0x4573cd;}return writeScopedConfig(_0x1062fd,'global'),{'ok':!![],'message':_0x3c7502?_0x38922e(0x131)+Object[_0x38922e(0x130)](_0x56b539)[_0x38922e(0x149)](',\x20')+'.':_0x38922e(0x120)+_0x4573cd+'.','data':{'mode':_0x3c7502?_0x38922e(0x13f):_0x38922e(0x11f),'region':_0x4573cd,'domains':_0x56b539}};}function a54_0xb27c(_0x374d2a,_0x4a7e39){_0x374d2a=_0x374d2a-0x11d;const _0x552987=a54_0x5529();let _0xb27cb6=_0x552987[_0x374d2a];return _0xb27cb6;}export const configInitDefinition={'service':a54_0x34fd26(0x140),'command':'init','description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a54_0x34fd26(0x12f),'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_0x1be9a6=a55_0xc79c;(function(_0x378a14,_0x105b33){const _0x567a7c=a55_0xc79c,_0x499f66=_0x378a14();while(!![]){try{const _0x2727d3=parseInt(_0x567a7c(0x1db))/0x1*(-parseInt(_0x567a7c(0x1cf))/0x2)+parseInt(_0x567a7c(0x1d4))/0x3*(-parseInt(_0x567a7c(0x1cd))/0x4)+-parseInt(_0x567a7c(0x1d5))/0x5*(parseInt(_0x567a7c(0x1d8))/0x6)+-parseInt(_0x567a7c(0x1d1))/0x7*(parseInt(_0x567a7c(0x1de))/0x8)+-parseInt(_0x567a7c(0x1da))/0x9*(parseInt(_0x567a7c(0x1d3))/0xa)+-parseInt(_0x567a7c(0x1d2))/0xb+-parseInt(_0x567a7c(0x1cc))/0xc*(-parseInt(_0x567a7c(0x1d6))/0xd);if(_0x2727d3===_0x105b33)break;else _0x499f66['push'](_0x499f66['shift']());}catch(_0x27e3d5){_0x499f66['push'](_0x499f66['shift']());}}}(a55_0x62cf,0xc857e));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x52633e){const _0x2a20f1=a55_0xc79c,_0x2df35b=_0x52633e['bool'](_0x2a20f1(0x1d7))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x2df35b};}function a55_0x62cf(){const _0x43fb25=['72lJqJLq','5127844WaNJXD','config','5290bxpDcV','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','7jyhdnr','12308021QfrzmZ','15552430vmXSzJ','3DbhIfS','4792265grOMAH','15793531EAKOAv','global','6yszoEV','read','9tuzWYp','529ZjpmdZ','List\x20all\x20config\x20values','boolean','1239544qpWPnX','list'];a55_0x62cf=function(){return _0x43fb25;};return a55_0x62cf();}function a55_0xc79c(_0x2f65dd,_0x47af32){_0x2f65dd=_0x2f65dd-0x1cb;const _0x62cf23=a55_0x62cf();let _0xc79c41=_0x62cf23[_0x2f65dd];return _0xc79c41;}export const configListDefinition={'service':a55_0x1be9a6(0x1ce),'command':a55_0x1be9a6(0x1cb),'description':a55_0x1be9a6(0x1dc),'risk':a55_0x1be9a6(0x1d9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x1be9a6(0x1d7),'type':a55_0x1be9a6(0x1dd),'description':a55_0x1be9a6(0x1d0),'default':![]}],'execute':execute};
1
+ const a55_0x162573=a55_0x1217;(function(_0x30b5fa,_0x3c2caf){const _0x51b597=a55_0x1217,_0x33bd3b=_0x30b5fa();while(!![]){try{const _0x190c88=-parseInt(_0x51b597(0x11a))/0x1+-parseInt(_0x51b597(0x121))/0x2+parseInt(_0x51b597(0x125))/0x3*(-parseInt(_0x51b597(0x123))/0x4)+parseInt(_0x51b597(0x122))/0x5*(parseInt(_0x51b597(0x11e))/0x6)+-parseInt(_0x51b597(0x126))/0x7+parseInt(_0x51b597(0x127))/0x8+-parseInt(_0x51b597(0x11d))/0x9;if(_0x190c88===_0x3c2caf)break;else _0x33bd3b['push'](_0x33bd3b['shift']());}catch(_0x23c722){_0x33bd3b['push'](_0x33bd3b['shift']());}}}(a55_0x3cc1,0xe6a82));function a55_0x1217(_0x37d3e1,_0x3dcb49){_0x37d3e1=_0x37d3e1-0x11a;const _0x3cc1b4=a55_0x3cc1();let _0x1217e0=_0x3cc1b4[_0x37d3e1];return _0x1217e0;}import{readScopedConfig}from'../../commands/config/shared.js';function a55_0x3cc1(){const _0x4f8f6c=['40AjcjuV','bool','90264ZsVYoo','1617560mBNIsd','13596760cbHTfK','config','boolean','632141ckFGvp','list','read','1522746RjqpaB','6540AyOVzH','global','List\x20all\x20config\x20values','262240tIrooO','3255WbhGBH'];a55_0x3cc1=function(){return _0x4f8f6c;};return a55_0x3cc1();}import{readConfig}from'../../utils/config.js';async function execute(_0x309d46){const _0x3a256d=a55_0x1217,_0x2510e7=_0x309d46[_0x3a256d(0x124)](_0x3a256d(0x11f))?readScopedConfig(_0x3a256d(0x11f)):readConfig();return{'ok':!![],'data':_0x2510e7};}export const configListDefinition={'service':a55_0x162573(0x128),'command':a55_0x162573(0x11b),'description':a55_0x162573(0x120),'risk':a55_0x162573(0x11c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a55_0x162573(0x129),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a56_0x11ebff=a56_0x30dd;(function(_0x1aad0b,_0x2cc187){const _0xc54157=a56_0x30dd,_0x2150ea=_0x1aad0b();while(!![]){try{const _0x43b735=-parseInt(_0xc54157(0x1fa))/0x1*(-parseInt(_0xc54157(0x1de))/0x2)+parseInt(_0xc54157(0x1ff))/0x3*(-parseInt(_0xc54157(0x1ed))/0x4)+parseInt(_0xc54157(0x1ea))/0x5*(parseInt(_0xc54157(0x1cf))/0x6)+-parseInt(_0xc54157(0x1da))/0x7+parseInt(_0xc54157(0x1dd))/0x8*(-parseInt(_0xc54157(0x1e0))/0x9)+parseInt(_0xc54157(0x1d4))/0xa+-parseInt(_0xc54157(0x1cd))/0xb*(-parseInt(_0xc54157(0x1e6))/0xc);if(_0x43b735===_0x2cc187)break;else _0x2150ea['push'](_0x2150ea['shift']());}catch(_0x5e20b9){_0x2150ea['push'](_0x2150ea['shift']());}}}(a56_0xc1f2,0xb9390));import{CliErrors}from'../../errors.js';function a56_0x30dd(_0x56574f,_0x1a12b5){_0x56574f=_0x56574f-0x1ca;const _0xc1f204=a56_0xc1f2();let _0x30dd05=_0xc1f204[_0x56574f];return _0x30dd05;}import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x1be4dd){const _0x181f81=a56_0x30dd,_0xcaaa1e=_0x1be4dd[_0x181f81(0x1f4)](_0x181f81(0x1cb)),_0x1fd420=_0x1be4dd[_0x181f81(0x1f4)](_0x181f81(0x1d6));if(!_0xcaaa1e)throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x200),_0x181f81(0x1d3)+CLI_BIN_NAME+_0x181f81(0x1f9));if(_0x1fd420===undefined||_0x1fd420==='')throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1f5),_0x181f81(0x1d3)+CLI_BIN_NAME+_0x181f81(0x1f9));let _0x1a28ea=_0xcaaa1e,_0x13e53f=_0x1fd420;if(_0x1fd420[_0x181f81(0x1cc)]>0x1f4)throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1fe));if(_0xcaaa1e===_0x181f81(0x1e7))throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1d8));if(!isTopLevelConfigKey(_0xcaaa1e))throw CliErrors[_0x181f81(0x1f0)]('Top-level\x20key\x20\x22'+_0xcaaa1e+_0x181f81(0x1f2),_0x181f81(0x1e9)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0xcaaa1e]&&!CONFIG_ENUM_VALUES[_0xcaaa1e][_0x181f81(0x1d5)](_0x1fd420))throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1dc)+_0xcaaa1e+_0x181f81(0x1fc)+CONFIG_ENUM_VALUES[_0xcaaa1e][_0x181f81(0x1f6)](',\x20'));if(_0xcaaa1e===_0x181f81(0x1e3)&&!normalizeLocale(_0x1fd420))throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1ef),_0x181f81(0x1e4));DOMAIN_CONFIG_FIELDS['includes'](_0xcaaa1e)&&(_0x13e53f=normalizeDomainOrigin(_0xcaaa1e,_0x1fd420));const _0x5d7a72={'global':_0x1be4dd[_0x181f81(0x1d1)](_0x181f81(0x1df))},_0x178229=resolveWriteScope(_0x5d7a72),_0x7129ac=readScopedConfig(_0x178229);_0xcaaa1e==='app'&&(_0x1a28ea='appcode',delete _0x7129ac[_0x181f81(0x1fd)]);_0xcaaa1e===_0x181f81(0x1e3)&&(_0x13e53f=normalizeLocale(_0x1fd420));if(_0xcaaa1e===_0x181f81(0x1f3)){_0x13e53f=normalizeEnv(_0x1fd420);if(!isProduction(_0x13e53f)&&!isDaily(_0x13e53f))throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1d7),_0x181f81(0x1d0));}if(_0xcaaa1e===_0x181f81(0x1e2)){const _0x333012=_0x7129ac[_0x181f81(0x1ce)]&&typeof _0x7129ac[_0x181f81(0x1ce)]===_0x181f81(0x1d2)?Object[_0x181f81(0x1e1)](_0x7129ac[_0x181f81(0x1ce)]):[];if(_0x333012[_0x181f81(0x1cc)]>0x0)throw CliErrors[_0x181f81(0x1f0)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x181f81(0x1e5)+CLI_BIN_NAME+_0x181f81(0x1fb)+_0x13e53f+'`,\x20`'+CLI_BIN_NAME+_0x181f81(0x1db));const _0x4cd434=buildCanonicalProjectConfig({..._0x7129ac},{'appCodes':[_0x13e53f],'env':typeof _0x7129ac[_0x181f81(0x1f3)]===_0x181f81(0x1f1)?_0x7129ac[_0x181f81(0x1f3)]:undefined});writeScopedConfig(_0x4cd434,_0x178229);const _0x30d1fe=_0x178229===_0x181f81(0x1df)?_0x181f81(0x1ee):'Project';return{'ok':!![],'message':'✓\x20'+_0x30d1fe+_0x181f81(0x1ec)+_0x13e53f+'\x20(stored\x20as\x20a\x20single\x20app\x20profile)'};}_0x7129ac[_0x1a28ea]=_0x13e53f,writeScopedConfig(_0x7129ac,_0x178229);const _0x4438dc=_0x178229===_0x181f81(0x1df)?'Global':_0x181f81(0x1e8);return{'ok':!![],'message':'✓\x20'+_0x4438dc+'\x20'+_0x1a28ea+_0x181f81(0x1f7)+_0x13e53f};}export const configSetDefinition={'service':'config','command':a56_0x11ebff(0x1ca),'description':a56_0x11ebff(0x1d9),'risk':a56_0x11ebff(0x1eb),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a56_0x11ebff(0x1f1),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':'string','description':a56_0x11ebff(0x1f8),'required':!![]},{'name':a56_0x11ebff(0x1df),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};function a56_0xc1f2(){const _0x14447d=['length','21711481PnjdHT','apps','615918uUKaTE','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','bool','object','Usage:\x20','8158530LbnhHQ','includes','value','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Set\x20a\x20config\x20value','10461899bJgHRz','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Invalid\x20value\x20for\x20\x22','5690624phcIpH','8nLqTqC','global','18CnKegS','keys','appcode','locale','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Use\x20`','24BbcOMF','riskLevel','Project','Settable\x20top-level\x20keys:\x20','15GaQvfM','write','\x20appcode\x20set\x20to:\x20','5044iIgXEf','Global','Invalid\x20locale\x20value.','validation','string','\x22\x20is\x20not\x20settable.','env','str','Missing\x20value.','join','\x20set\x20to:\x20','Config\x20value','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','10833KjGcnk','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x22.\x20Allowed:\x20','app','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','3423vpuAdP','Missing\x20key.','set','key'];a56_0xc1f2=function(){return _0x14447d;};return a56_0xc1f2();}
1
+ const a56_0x3962dd=a56_0xcc61;function a56_0x2faf(){const _0x383a09=['Usage:\x20','\x22\x20is\x20not\x20settable.','config','includes','string','object','env','Invalid\x20value\x20for\x20\x22','3duhMcM','apps','\x20appcode\x20set\x20to:\x20','3570395gSZOfm','3264120xOiNgp','write','key','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','keys','168YmKwfF','set','539332SjCejS','Config\x20value','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Top-level\x20key\x20\x22','\x20workspace\x20add\x20<name>\x20--appcode\x20','app','Missing\x20value.','106iCYjQU','Project','`,\x20`','length','Global','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Use\x20`','16709AbXhNW','join','bool','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','417006TmBrFo','validation','appcode','global','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','2439AyObWY','boolean','riskLevel','5940GkiNhG','value','310696NajBBZ','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','locale'];a56_0x2faf=function(){return _0x383a09;};return a56_0x2faf();}(function(_0x1ff9f8,_0x58c77e){const _0x2ff7c9=a56_0xcc61,_0xb12043=_0x1ff9f8();while(!![]){try{const _0x17935c=parseInt(_0x2ff7c9(0x105))/0x1*(parseInt(_0x2ff7c9(0xf5))/0x2)+-parseInt(_0x2ff7c9(0x116))/0x3*(-parseInt(_0x2ff7c9(0xee))/0x4)+parseInt(_0x2ff7c9(0xe6))/0x5+-parseInt(_0x2ff7c9(0x100))/0x6+-parseInt(_0x2ff7c9(0xec))/0x7*(parseInt(_0x2ff7c9(0x10a))/0x8)+-parseInt(_0x2ff7c9(0xe7))/0x9+parseInt(_0x2ff7c9(0x108))/0xa*(parseInt(_0x2ff7c9(0xfc))/0xb);if(_0x17935c===_0x58c77e)break;else _0xb12043['push'](_0xb12043['shift']());}catch(_0x18789c){_0xb12043['push'](_0xb12043['shift']());}}}(a56_0x2faf,0x7e064));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x5c29de){const _0x2a1e91=a56_0xcc61,_0x1ad1d5=_0x5c29de['str'](_0x2a1e91(0xe9)),_0x501cf4=_0x5c29de['str'](_0x2a1e91(0x109));if(!_0x1ad1d5)throw CliErrors[_0x2a1e91(0x101)]('Missing\x20key.',_0x2a1e91(0x10e)+CLI_BIN_NAME+_0x2a1e91(0xf0));if(_0x501cf4===undefined||_0x501cf4==='')throw CliErrors[_0x2a1e91(0x101)](_0x2a1e91(0xf4),_0x2a1e91(0x10e)+CLI_BIN_NAME+_0x2a1e91(0xf0));let _0x546b78=_0x1ad1d5,_0x316199=_0x501cf4;if(_0x501cf4[_0x2a1e91(0xf8)]>0x1f4)throw CliErrors['validation'](_0x2a1e91(0xea));if(_0x1ad1d5===_0x2a1e91(0x107))throw CliErrors[_0x2a1e91(0x101)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x1ad1d5))throw CliErrors[_0x2a1e91(0x101)](_0x2a1e91(0xf1)+_0x1ad1d5+_0x2a1e91(0x10f),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x1ad1d5]&&!CONFIG_ENUM_VALUES[_0x1ad1d5][_0x2a1e91(0x111)](_0x501cf4))throw CliErrors[_0x2a1e91(0x101)](_0x2a1e91(0x115)+_0x1ad1d5+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x1ad1d5][_0x2a1e91(0xfd)](',\x20'));if(_0x1ad1d5===_0x2a1e91(0x10d)&&!normalizeLocale(_0x501cf4))throw CliErrors[_0x2a1e91(0x101)]('Invalid\x20locale\x20value.',_0x2a1e91(0x104));DOMAIN_CONFIG_FIELDS[_0x2a1e91(0x111)](_0x1ad1d5)&&(_0x316199=normalizeDomainOrigin(_0x1ad1d5,_0x501cf4));const _0x32ee6b={'global':_0x5c29de[_0x2a1e91(0xfe)](_0x2a1e91(0x103))},_0x48d5a9=resolveWriteScope(_0x32ee6b),_0x2ab3e5=readScopedConfig(_0x48d5a9);_0x1ad1d5===_0x2a1e91(0xf3)&&(_0x546b78=_0x2a1e91(0x102),delete _0x2ab3e5[_0x2a1e91(0xf3)]);_0x1ad1d5==='locale'&&(_0x316199=normalizeLocale(_0x501cf4));if(_0x1ad1d5===_0x2a1e91(0x114)){_0x316199=normalizeEnv(_0x501cf4);if(!isProduction(_0x316199)&&!isDaily(_0x316199))throw CliErrors['validation']('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x2a1e91(0xff));}if(_0x1ad1d5===_0x2a1e91(0x102)){const _0x56dc3e=_0x2ab3e5[_0x2a1e91(0x117)]&&typeof _0x2ab3e5[_0x2a1e91(0x117)]===_0x2a1e91(0x113)?Object[_0x2a1e91(0xeb)](_0x2ab3e5[_0x2a1e91(0x117)]):[];if(_0x56dc3e[_0x2a1e91(0xf8)]>0x0)throw CliErrors[_0x2a1e91(0x101)](_0x2a1e91(0x10c),_0x2a1e91(0xfb)+CLI_BIN_NAME+_0x2a1e91(0xf2)+_0x316199+_0x2a1e91(0xf7)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x398244=buildCanonicalProjectConfig({..._0x2ab3e5},{'appCodes':[_0x316199],'env':typeof _0x2ab3e5[_0x2a1e91(0x114)]===_0x2a1e91(0x112)?_0x2ab3e5['env']:undefined});writeScopedConfig(_0x398244,_0x48d5a9);const _0x4837f8=_0x48d5a9===_0x2a1e91(0x103)?_0x2a1e91(0xf9):'Project';return{'ok':!![],'message':'✓\x20'+_0x4837f8+_0x2a1e91(0x118)+_0x316199+_0x2a1e91(0xfa)};}_0x2ab3e5[_0x546b78]=_0x316199,writeScopedConfig(_0x2ab3e5,_0x48d5a9);const _0x7e25d8=_0x48d5a9===_0x2a1e91(0x103)?_0x2a1e91(0xf9):_0x2a1e91(0xf6);return{'ok':!![],'message':'✓\x20'+_0x7e25d8+'\x20'+_0x546b78+'\x20set\x20to:\x20'+_0x316199};}function a56_0xcc61(_0x122a3d,_0x33a908){_0x122a3d=_0x122a3d-0xe6;const _0x2faf9c=a56_0x2faf();let _0xcc61cc=_0x2faf9c[_0x122a3d];return _0xcc61cc;}export const configSetDefinition={'service':a56_0x3962dd(0x110),'command':a56_0x3962dd(0xed),'description':'Set\x20a\x20config\x20value','risk':a56_0x3962dd(0xe8),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a56_0x3962dd(0x112),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0x3962dd(0x109),'type':'string','description':a56_0x3962dd(0xef),'required':!![]},{'name':a56_0x3962dd(0x103),'type':a56_0x3962dd(0x106),'description':a56_0x3962dd(0x10b),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x3c02ec,_0x17c073){var _0x4d18e8=a57_0x4cb6,_0x43dd88=_0x3c02ec();while(!![]){try{var _0x39ec42=-parseInt(_0x4d18e8(0xf2))/0x1+parseInt(_0x4d18e8(0xf1))/0x2*(parseInt(_0x4d18e8(0xef))/0x3)+parseInt(_0x4d18e8(0xf0))/0x4*(-parseInt(_0x4d18e8(0xed))/0x5)+-parseInt(_0x4d18e8(0xf6))/0x6+parseInt(_0x4d18e8(0xf5))/0x7*(-parseInt(_0x4d18e8(0xee))/0x8)+parseInt(_0x4d18e8(0xeb))/0x9+parseInt(_0x4d18e8(0xec))/0xa;if(_0x39ec42===_0x17c073)break;else _0x43dd88['push'](_0x43dd88['shift']());}catch(_0x5cffd9){_0x43dd88['push'](_0x43dd88['shift']());}}}(a57_0x4c8d,0xa2a6a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a57_0x4cb6(_0x3beaca,_0x1ba338){_0x3beaca=_0x3beaca-0xe9;var _0x4c8dff=a57_0x4c8d();var _0x4cb6a2=_0x4c8dff[_0x3beaca];return _0x4cb6a2;}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(_0xd83626){var _0x2d8f05=a57_0x4cb6;if(_0xd83626[_0x2d8f05(0xf3)])return _0x2d8f05(0xf3);if(!isInProject())throw CliErrors[_0x2d8f05(0xea)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x2d8f05(0xf4)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x2d8f05(0xe9);}export function readScopedConfig(_0x114be2){return readConfigFile(resolveWriteConfigPath(_0x114be2));}function a57_0x4c8d(){var _0x4c7a39=['48gtSvrT','407373GOcCIp','770444nsLWlU','14tpRVmA','1205322sxpdxc','global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','1462706CyNTPY','2561070OHhZXi','project','validation','11505267RuXiAq','19010660azqhNj','15adQpui'];a57_0x4c8d=function(){return _0x4c7a39;};return a57_0x4c8d();}export function writeScopedConfig(_0x3ec76a,_0x55378e){writeConfigFile(resolveWriteConfigPath(_0x55378e),_0x3ec76a);}
1
+ (function(_0x5742c4,_0x5d7f37){var _0x28465d=a57_0x2511,_0x4cebad=_0x5742c4();while(!![]){try{var _0x5901e=parseInt(_0x28465d(0x167))/0x1*(parseInt(_0x28465d(0x15e))/0x2)+parseInt(_0x28465d(0x15b))/0x3+parseInt(_0x28465d(0x163))/0x4*(parseInt(_0x28465d(0x15d))/0x5)+parseInt(_0x28465d(0x159))/0x6*(-parseInt(_0x28465d(0x162))/0x7)+parseInt(_0x28465d(0x165))/0x8+parseInt(_0x28465d(0x166))/0x9*(-parseInt(_0x28465d(0x160))/0xa)+-parseInt(_0x28465d(0x161))/0xb*(parseInt(_0x28465d(0x15a))/0xc);if(_0x5901e===_0x5d7f37)break;else _0x4cebad['push'](_0x4cebad['shift']());}catch(_0x395989){_0x4cebad['push'](_0x4cebad['shift']());}}}(a57_0x55cf,0x9eb77));import{CLI_BIN_NAME}from'../../constant/cli.js';function a57_0x2511(_0x2aa3a3,_0x21e6e5){_0x2aa3a3=_0x2aa3a3-0x159;var _0x55cfe=a57_0x55cf();var _0x251120=_0x55cfe[_0x2aa3a3];return _0x251120;}function a57_0x55cf(){var _0x3ce8cf=['1194384uNYNhf','6959799gLvwHy','168809zCJezb','6286854lozYLm','219972NFBYme','3123147LOGUlz','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','17035CbeAjZ','4qPWZZF','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','10OCIudw','33GNCnFx','7DLfiAd','1172hyWxqs','global'];a57_0x55cf=function(){return _0x3ce8cf;};return a57_0x55cf();}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(_0xd41368){var _0x39750e=a57_0x2511;if(_0xd41368[_0x39750e(0x164)])return _0x39750e(0x164);if(!isInProject())throw CliErrors['validation'](_0x39750e(0x15f),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x39750e(0x15c));return'project';}export function readScopedConfig(_0x348063){return readConfigFile(resolveWriteConfigPath(_0x348063));}export function writeScopedConfig(_0x31480e,_0x3f7bfc){writeConfigFile(resolveWriteConfigPath(_0x3f7bfc),_0x31480e);}
@@ -1 +1 @@
1
- const a58_0x5037e3=a58_0x1365;(function(_0x5e9705,_0x52db56){const _0x3310e9=a58_0x1365,_0x22561b=_0x5e9705();while(!![]){try{const _0x39b31f=-parseInt(_0x3310e9(0x124))/0x1+-parseInt(_0x3310e9(0x11e))/0x2*(-parseInt(_0x3310e9(0x130))/0x3)+-parseInt(_0x3310e9(0x132))/0x4*(parseInt(_0x3310e9(0x112))/0x5)+-parseInt(_0x3310e9(0x13b))/0x6+-parseInt(_0x3310e9(0x10a))/0x7*(-parseInt(_0x3310e9(0x13e))/0x8)+-parseInt(_0x3310e9(0x108))/0x9*(parseInt(_0x3310e9(0x144))/0xa)+parseInt(_0x3310e9(0x12d))/0xb;if(_0x39b31f===_0x52db56)break;else _0x22561b['push'](_0x22561b['shift']());}catch(_0x46a77b){_0x22561b['push'](_0x22561b['shift']());}}}(a58_0xec65,0xe96a6));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a58_0x5037e3(0x12a);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3ad518,input:_0x35df20,dryRun:_0x515c54}){const _0x56dbee=a58_0x5037e3;validateInput(_0x35df20);const _0xa973a4=normalizeBusinessGroupArgument(_0x35df20[_0x56dbee(0x123)]),_0x35edad=await getDatasetDetail(_0x35df20['code']),_0x19f0d4=resolveBusinessGroupDataset(_0x35edad,_0x35df20[_0x56dbee(0x145)]),_0x55d5cc=loadCurrentBusinessGroup(_0x35edad,_0x19f0d4);assertExpectedBusinessGroup(_0x55d5cc,_0x35df20[_0x56dbee(0x117)]);const _0x100b85=buildBackendPayload(_0x3ad518,_0x19f0d4,_0xa973a4),_0x1fdb66=_0x55d5cc!==_0xa973a4;let _0x365946;if(_0x1fdb66&&!_0x515c54){await updateErBusinessGroup(_0x100b85);const _0x25e166=await getDatasetDetail(_0x19f0d4[_0x56dbee(0x145)]),_0x38a5ae=resolveBusinessGroupDataset(_0x25e166,_0x19f0d4[_0x56dbee(0x145)]),_0x345cc4=loadCurrentBusinessGroup(_0x25e166,_0x38a5ae);if(_0x345cc4!==_0xa973a4)throw CliErrors[_0x56dbee(0x107)](_0x56dbee(0x136),_0x56dbee(0x131)+JSON['stringify'](_0xa973a4)+_0x56dbee(0x10f)+JSON[_0x56dbee(0x11d)](_0x345cc4)+'.');_0x365946={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x345cc4}};}else!_0x1fdb66&&(_0x365946={'verified':!![],'status':_0x56dbee(0x110),'afterReadback':{'businessGroup':_0x55d5cc}});const _0x56afb6={'operation':_0x56dbee(0x12b),'appCode':_0x3ad518,'selector':{'code':_0x19f0d4['code']},'dataset':_0x19f0d4,'before':{'businessGroup':_0x55d5cc},'after':{'businessGroup':_0xa973a4},'changed':_0x1fdb66,'dryRun':_0x515c54,'submitted':_0x1fdb66&&!_0x515c54,'backend':{'method':_0x56dbee(0x125),'path':BACKEND_PATH,'payload':_0x100b85},..._0x365946?{'verification':_0x365946}:{},'warnings':[]};return{'ok':!![],'data':_0x56afb6,'message':_0x1fdb66?_0x515c54?_0x56dbee(0x11b)+_0x19f0d4['code']:_0x56dbee(0x11f)+_0x19f0d4[_0x56dbee(0x145)]:_0x56dbee(0x122)+_0x19f0d4[_0x56dbee(0x145)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a58_0x5037e3(0x116),'description':a58_0x5037e3(0x138),'risk':a58_0x5037e3(0x135),'flags':[CODE_FLAG,{'name':a58_0x5037e3(0x106),'type':a58_0x5037e3(0x10c),'required':!![],'description':a58_0x5037e3(0x133)},{'name':a58_0x5037e3(0x13f),'type':'string','required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x471e84){validateInput(readBusinessGroupUpdateInput(_0x471e84));},async 'dryRun'(_0x54831d){const _0x4aeacd=a58_0x5037e3,_0x4cc780=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x54831d['appCode'],'input':readBusinessGroupUpdateInput(_0x54831d),'dryRun':!![]});return{'method':_0x4aeacd(0x125),'url':BACKEND_PATH,'body':_0x4cc780[_0x4aeacd(0x12e)][_0x4aeacd(0x12c)][_0x4aeacd(0x119)],'description':_0x4cc780[_0x4aeacd(0x13c)],..._0x4cc780[_0x4aeacd(0x12e)]};},async 'execute'(_0x24d037){const _0x44cb52=a58_0x5037e3;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x24d037[_0x44cb52(0x118)],'input':readBusinessGroupUpdateInput(_0x24d037),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2b7054){const _0x3379d5=a58_0x5037e3,_0xb5520c=_0x2b7054[_0x3379d5(0x129)]('expect-business-group');return{'code':trim(_0x2b7054['str']('code')),'businessGroup':_0x2b7054[_0x3379d5(0x129)](_0x3379d5(0x106)),'expectBusinessGroup':_0xb5520c===undefined||_0xb5520c===''?undefined:_0xb5520c};}function validateInput(_0x4c90cd){const _0x5c7a7d=a58_0x5037e3;if(!trim(_0x4c90cd[_0x5c7a7d(0x145)]))throw CliErrors[_0x5c7a7d(0x139)](_0x5c7a7d(0x109));if(_0x4c90cd[_0x5c7a7d(0x123)]===undefined)throw CliErrors[_0x5c7a7d(0x139)](_0x5c7a7d(0x10b));}function resolveBusinessGroupDataset(_0x5aadaf,_0x5b8073){const _0x2cfeea=a58_0x5037e3,_0x4a8409=asPlainObject(_0x5aadaf[_0x2cfeea(0x128)]),_0x14bfe0=asPlainObject(_0x5aadaf[_0x2cfeea(0x143)]),_0x36e05b=resolveSourceType(_0x5aadaf,_0x4a8409,_0x14bfe0),_0x38d10b=firstString(_0x5aadaf[_0x2cfeea(0x10d)],_0x5aadaf[_0x2cfeea(0x145)],_0x4a8409[_0x2cfeea(0x120)],_0x5b8073)||_0x5b8073;return{'id':firstNumber(_0x5aadaf['modelId'],_0x5aadaf['id'],_0x4a8409[_0x2cfeea(0x113)])??firstString(_0x5aadaf[_0x2cfeea(0x13d)],_0x5aadaf['id'],_0x4a8409[_0x2cfeea(0x113)])??null,'code':_0x38d10b,'name':firstString(_0x5aadaf[_0x2cfeea(0x105)],_0x4a8409['datasetName'],_0x4a8409[_0x2cfeea(0x105)])||null,'sourceType':_0x36e05b};}function resolveSourceType(_0x5741b7,_0x3d7ea6,_0x4f8411){const _0x23b926=a58_0x5037e3,_0x353c95=firstString(_0x5741b7[_0x23b926(0x11c)],_0x5741b7[_0x23b926(0x134)],_0x3d7ea6['source'],_0x3d7ea6[_0x23b926(0x134)])?.['trim']()[_0x23b926(0x126)]();if(_0x353c95===_0x23b926(0x142)||_0x353c95==='METADATA')return _0x353c95;if(Object['keys'](_0x4f8411)[_0x23b926(0x141)]>0x0)return _0x23b926(0x142);throw CliErrors[_0x23b926(0x139)](_0x23b926(0x127));}function loadCurrentBusinessGroup(_0x5b480f,_0x475f4a){const _0x27c6d5=a58_0x5037e3,_0x515340=readBusinessGroupFromDatasetDetail(_0x5b480f,_0x475f4a[_0x27c6d5(0x134)]);if(_0x515340[_0x27c6d5(0x11a)])return normalizeBusinessGroup(_0x515340['value']);if(_0x475f4a[_0x27c6d5(0x134)]==='METADATA')return'';throw CliErrors[_0x27c6d5(0x139)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x27c6d5(0x140));}function readBusinessGroupFromDatasetDetail(_0xf9d65c,_0x35be9e){const _0x146fbb=a58_0x5037e3,_0x347baf=asPlainObject(_0xf9d65c[_0x146fbb(0x128)]),_0x229caa=firstPresent(_0xf9d65c[_0x146fbb(0x123)]);if(_0x229caa['found'])return _0x229caa;const _0x559446=firstPresent(_0x347baf[_0x146fbb(0x123)]);if(_0x559446['found'])return _0x559446;if(_0x35be9e===_0x146fbb(0x142))return{'found':![]};const _0x15be73=readBusinessGroupFromExtend(_0xf9d65c[_0x146fbb(0x111)]);if(_0x15be73[_0x146fbb(0x11a)])return _0x15be73;return readBusinessGroupFromExtend(_0x347baf[_0x146fbb(0x111)]);}function readBusinessGroupFromExtend(_0x2d8ab9){const _0x18f1c1=a58_0x5037e3;if(_0x2d8ab9===undefined||_0x2d8ab9===null||_0x2d8ab9==='')return{'found':![]};if(typeof _0x2d8ab9===_0x18f1c1(0x10c))try{const _0x1ff8f7=JSON[_0x18f1c1(0x121)](_0x2d8ab9);return readBusinessGroupFromExtend(_0x1ff8f7);}catch{return{'found':![]};}const _0x47849a=asPlainObject(_0x2d8ab9);if(Object[_0x18f1c1(0x137)]['hasOwnProperty'][_0x18f1c1(0x115)](_0x47849a,_0x18f1c1(0x123)))return{'found':!![],'value':_0x47849a[_0x18f1c1(0x123)]};return{'found':![]};}function firstPresent(..._0x8a9d5d){for(const _0x1b445d of _0x8a9d5d){if(_0x1b445d!==undefined&&_0x1b445d!==null)return{'found':!![],'value':_0x1b445d};}return{'found':![]};}function assertExpectedBusinessGroup(_0x484d2d,_0x4ba7be){const _0x5207e7=a58_0x5037e3;if(_0x4ba7be===undefined)return;const _0x5c576b=normalizeBusinessGroupArgument(_0x4ba7be);if(_0x484d2d!==_0x5c576b)throw CliErrors[_0x5207e7(0x139)]('Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20'+JSON[_0x5207e7(0x11d)](_0x5c576b)+_0x5207e7(0x10f)+JSON[_0x5207e7(0x11d)](_0x484d2d));}function buildBackendPayload(_0x5b6a16,_0x2e218a,_0x42f4e3){return{'appCode':_0x5b6a16,'datasetCode':_0x2e218a['code'],'businessGroup':_0x42f4e3};}function normalizeBusinessGroup(_0x2ef1ed){const _0x58ea12=a58_0x5037e3;if(_0x2ef1ed===undefined||_0x2ef1ed===null)return'';return String(_0x2ef1ed)[_0x58ea12(0x114)]();}function a58_0xec65(){const _0xa63ad7=['expect-business-group','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','length','DB_TABLE','dbtableConfig','2480MDydVO','code','name','business-group','apiError','63000zyEBeP','--code\x20is\x20required','1473941fjICym','--business-group\x20is\x20required','string','modelCode','isFinite',',\x20actual\x20','unchanged','extend','410855bzgxFE','datasetId','trim','call','business-group-update','expectBusinessGroup','appCode','payload','found','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','source','stringify','22SylIxW','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','datasetCode','parse','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','businessGroup','1591016ayJQTa','POST','toUpperCase','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','dataset','str','ungrouped','update','backend','49043896ZQaGVd','data','object','142221QqxHRy','Expected\x20','28jsEnbz','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed,\x20or\x20the\x20reserved\x20value\x20ungrouped\x20to\x20clear\x20it','sourceType','write','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','prototype','Update\x20business\x20scenario\x20group','validation','number','3257136ZWgAXs','message','modelId','16TllCtR'];a58_0xec65=function(){return _0xa63ad7;};return a58_0xec65();}function normalizeBusinessGroupArgument(_0x52ce58){const _0x9557c8=normalizeBusinessGroup(_0x52ce58);return _0x9557c8===UNGROUPED_BUSINESS_GROUP?'':_0x9557c8;}function a58_0x1365(_0x1f3b85,_0x29d997){_0x1f3b85=_0x1f3b85-0x105;const _0xec659=a58_0xec65();let _0x13658d=_0xec659[_0x1f3b85];return _0x13658d;}function asPlainObject(_0x273bad){const _0x501c3=a58_0x5037e3;if(!_0x273bad||typeof _0x273bad!==_0x501c3(0x12f)||Array['isArray'](_0x273bad))return{};return _0x273bad;}function firstString(..._0x11f338){const _0x4337e8=a58_0x5037e3;for(const _0x3bb2d7 of _0x11f338){if(typeof _0x3bb2d7===_0x4337e8(0x10c)&&_0x3bb2d7[_0x4337e8(0x114)]())return _0x3bb2d7[_0x4337e8(0x114)]();if(typeof _0x3bb2d7===_0x4337e8(0x13a)&&Number[_0x4337e8(0x10e)](_0x3bb2d7))return String(_0x3bb2d7);}return undefined;}function firstNumber(..._0x1206d1){const _0x110f00=a58_0x5037e3;for(const _0x21a97e of _0x1206d1){if(typeof _0x21a97e===_0x110f00(0x13a)&&Number[_0x110f00(0x10e)](_0x21a97e))return _0x21a97e;if(typeof _0x21a97e===_0x110f00(0x10c)&&_0x21a97e[_0x110f00(0x114)]()&&Number[_0x110f00(0x10e)](Number(_0x21a97e)))return Number(_0x21a97e);}return null;}function trim(_0x5e4681){return String(_0x5e4681||'')['trim']();}
1
+ const a58_0x1624f5=a58_0x359e;(function(_0x109cc7,_0x4f0127){const _0x56ab1c=a58_0x359e,_0xc81a98=_0x109cc7();while(!![]){try{const _0x123b3b=-parseInt(_0x56ab1c(0x110))/0x1+parseInt(_0x56ab1c(0x10e))/0x2*(parseInt(_0x56ab1c(0xfb))/0x3)+-parseInt(_0x56ab1c(0x117))/0x4+parseInt(_0x56ab1c(0x100))/0x5*(-parseInt(_0x56ab1c(0xf7))/0x6)+parseInt(_0x56ab1c(0xfd))/0x7*(parseInt(_0x56ab1c(0x105))/0x8)+-parseInt(_0x56ab1c(0x130))/0x9*(parseInt(_0x56ab1c(0xf3))/0xa)+parseInt(_0x56ab1c(0x10d))/0xb;if(_0x123b3b===_0x4f0127)break;else _0xc81a98['push'](_0xc81a98['shift']());}catch(_0x20c9f6){_0xc81a98['push'](_0xc81a98['shift']());}}}(a58_0x2b02,0xb59e4));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a58_0x1624f5(0xff);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x1e0086,input:_0x1e59a4,dryRun:_0x38b4a2}){const _0x47027c=a58_0x1624f5;validateInput(_0x1e59a4);const _0x4344bc=normalizeBusinessGroupArgument(_0x1e59a4[_0x47027c(0x135)]),_0x477d26=await getDatasetDetail(_0x1e59a4['code']),_0x303f0f=resolveBusinessGroupDataset(_0x477d26,_0x1e59a4[_0x47027c(0x102)]),_0x1866a8=loadCurrentBusinessGroup(_0x477d26,_0x303f0f);assertExpectedBusinessGroup(_0x1866a8,_0x1e59a4[_0x47027c(0x121)]);const _0x1ea34b=buildBackendPayload(_0x1e0086,_0x303f0f,_0x4344bc),_0x1a8fb8=_0x1866a8!==_0x4344bc;let _0x41c693;if(_0x1a8fb8&&!_0x38b4a2){await updateErBusinessGroup(_0x1ea34b);const _0x4404f1=await getDatasetDetail(_0x303f0f[_0x47027c(0x102)]),_0x263412=resolveBusinessGroupDataset(_0x4404f1,_0x303f0f[_0x47027c(0x102)]),_0x2cdbdb=loadCurrentBusinessGroup(_0x4404f1,_0x263412);if(_0x2cdbdb!==_0x4344bc)throw CliErrors[_0x47027c(0x119)](_0x47027c(0x10b),_0x47027c(0x123)+JSON['stringify'](_0x4344bc)+_0x47027c(0x111)+JSON[_0x47027c(0x101)](_0x2cdbdb)+'.');_0x41c693={'verified':!![],'status':_0x47027c(0x113),'afterReadback':{'businessGroup':_0x2cdbdb}};}else!_0x1a8fb8&&(_0x41c693={'verified':!![],'status':_0x47027c(0x10c),'afterReadback':{'businessGroup':_0x1866a8}});const _0x4a2f50={'operation':_0x47027c(0x10a),'appCode':_0x1e0086,'selector':{'code':_0x303f0f[_0x47027c(0x102)]},'dataset':_0x303f0f,'before':{'businessGroup':_0x1866a8},'after':{'businessGroup':_0x4344bc},'changed':_0x1a8fb8,'dryRun':_0x38b4a2,'submitted':_0x1a8fb8&&!_0x38b4a2,'backend':{'method':_0x47027c(0x127),'path':BACKEND_PATH,'payload':_0x1ea34b},..._0x41c693?{'verification':_0x41c693}:{},'warnings':[]};return{'ok':!![],'data':_0x4a2f50,'message':_0x1a8fb8?_0x38b4a2?_0x47027c(0x114)+_0x303f0f[_0x47027c(0x102)]:_0x47027c(0x125)+_0x303f0f[_0x47027c(0x102)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x303f0f[_0x47027c(0x102)]};}export const datasetBusinessGroupUpdate={'service':a58_0x1624f5(0x107),'command':a58_0x1624f5(0x11f),'description':a58_0x1624f5(0x134),'risk':'write','flags':[CODE_FLAG,{'name':a58_0x1624f5(0x12c),'type':a58_0x1624f5(0x11a),'required':!![],'description':a58_0x1624f5(0x132)},{'name':a58_0x1624f5(0xf2),'type':a58_0x1624f5(0x11a),'required':![],'description':a58_0x1624f5(0x11b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x62ae4f){validateInput(readBusinessGroupUpdateInput(_0x62ae4f));},async 'dryRun'(_0xb38a3f){const _0x82224=a58_0x1624f5,_0x1f3879=await buildDatasetBusinessGroupUpdateResult({'appCode':_0xb38a3f[_0x82224(0x12b)],'input':readBusinessGroupUpdateInput(_0xb38a3f),'dryRun':!![]});return{'method':_0x82224(0x127),'url':BACKEND_PATH,'body':_0x1f3879[_0x82224(0x12a)]['backend'][_0x82224(0x126)],'description':_0x1f3879['message'],..._0x1f3879['data']};},async 'execute'(_0x158a4a){const _0x1372bc=a58_0x1624f5;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x158a4a[_0x1372bc(0x12b)],'input':readBusinessGroupUpdateInput(_0x158a4a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5f266f){const _0x5ab237=a58_0x1624f5,_0x964f60=_0x5f266f[_0x5ab237(0x10f)](_0x5ab237(0xf2));return{'code':trim(_0x5f266f[_0x5ab237(0x10f)](_0x5ab237(0x102))),'businessGroup':_0x5f266f[_0x5ab237(0x10f)](_0x5ab237(0x12c)),'expectBusinessGroup':_0x964f60===undefined||_0x964f60===''?undefined:_0x964f60};}function a58_0x359e(_0x595fd5,_0x8f1f31){_0x595fd5=_0x595fd5-0xf1;const _0x2b02db=a58_0x2b02();let _0x359e5e=_0x2b02db[_0x595fd5];return _0x359e5e;}function validateInput(_0x238930){const _0x5afaed=a58_0x1624f5;if(!trim(_0x238930['code']))throw CliErrors['validation']('--code\x20is\x20required');if(_0x238930[_0x5afaed(0x135)]===undefined)throw CliErrors['validation'](_0x5afaed(0x128));}function resolveBusinessGroupDataset(_0x3d9744,_0x4aae12){const _0xc76096=a58_0x1624f5,_0xfc4949=asPlainObject(_0x3d9744['dataset']),_0x2b4e68=asPlainObject(_0x3d9744[_0xc76096(0x133)]),_0x2c93a2=resolveSourceType(_0x3d9744,_0xfc4949,_0x2b4e68),_0x44e065=firstString(_0x3d9744[_0xc76096(0x103)],_0x3d9744[_0xc76096(0x102)],_0xfc4949[_0xc76096(0x12f)],_0x4aae12)||_0x4aae12;return{'id':firstNumber(_0x3d9744[_0xc76096(0xf5)],_0x3d9744['id'],_0xfc4949[_0xc76096(0xf1)])??firstString(_0x3d9744[_0xc76096(0xf5)],_0x3d9744['id'],_0xfc4949[_0xc76096(0xf1)])??null,'code':_0x44e065,'name':firstString(_0x3d9744[_0xc76096(0x131)],_0xfc4949[_0xc76096(0x115)],_0xfc4949[_0xc76096(0x131)])||null,'sourceType':_0x2c93a2};}function resolveSourceType(_0x3ce03c,_0x42487c,_0x5cf11a){const _0x5ebec7=a58_0x1624f5,_0x2704ff=firstString(_0x3ce03c[_0x5ebec7(0xf6)],_0x3ce03c[_0x5ebec7(0xf4)],_0x42487c[_0x5ebec7(0xf6)],_0x42487c[_0x5ebec7(0xf4)])?.[_0x5ebec7(0x12e)]()[_0x5ebec7(0x108)]();if(_0x2704ff===_0x5ebec7(0x120)||_0x2704ff===_0x5ebec7(0xfa))return _0x2704ff;if(Object[_0x5ebec7(0x11c)](_0x5cf11a)[_0x5ebec7(0x118)]>0x0)return _0x5ebec7(0x120);throw CliErrors[_0x5ebec7(0xf8)](_0x5ebec7(0x106));}function loadCurrentBusinessGroup(_0x3f2afb,_0x2c5820){const _0x482efe=a58_0x1624f5,_0x393a77=readBusinessGroupFromDatasetDetail(_0x3f2afb,_0x2c5820[_0x482efe(0xf4)]);if(_0x393a77['found'])return normalizeBusinessGroup(_0x393a77[_0x482efe(0xfe)]);if(_0x2c5820[_0x482efe(0xf4)]===_0x482efe(0xfa))return'';throw CliErrors['validation'](_0x482efe(0x116),_0x482efe(0x12d));}function readBusinessGroupFromDatasetDetail(_0x4e344b,_0x4545f4){const _0x25f6e6=a58_0x1624f5,_0x58f61b=asPlainObject(_0x4e344b[_0x25f6e6(0x107)]),_0x5f8035=firstPresent(_0x4e344b[_0x25f6e6(0x135)]);if(_0x5f8035[_0x25f6e6(0x129)])return _0x5f8035;const _0x5351c4=firstPresent(_0x58f61b['businessGroup']);if(_0x5351c4['found'])return _0x5351c4;if(_0x4545f4===_0x25f6e6(0x120))return{'found':![]};const _0x50f74d=readBusinessGroupFromExtend(_0x4e344b[_0x25f6e6(0x109)]);if(_0x50f74d[_0x25f6e6(0x129)])return _0x50f74d;return readBusinessGroupFromExtend(_0x58f61b['extend']);}function readBusinessGroupFromExtend(_0x189119){const _0x327e21=a58_0x1624f5;if(_0x189119===undefined||_0x189119===null||_0x189119==='')return{'found':![]};if(typeof _0x189119===_0x327e21(0x11a))try{const _0x1a1837=JSON[_0x327e21(0x112)](_0x189119);return readBusinessGroupFromExtend(_0x1a1837);}catch{return{'found':![]};}const _0x29f5a5=asPlainObject(_0x189119);if(Object[_0x327e21(0x11e)]['hasOwnProperty'][_0x327e21(0x122)](_0x29f5a5,_0x327e21(0x135)))return{'found':!![],'value':_0x29f5a5['businessGroup']};return{'found':![]};}function firstPresent(..._0xff3f70){for(const _0xd2d84a of _0xff3f70){if(_0xd2d84a!==undefined&&_0xd2d84a!==null)return{'found':!![],'value':_0xd2d84a};}return{'found':![]};}function assertExpectedBusinessGroup(_0x10ad9e,_0x115b44){const _0x486b65=a58_0x1624f5;if(_0x115b44===undefined)return;const _0x462fc7=normalizeBusinessGroupArgument(_0x115b44);if(_0x10ad9e!==_0x462fc7)throw CliErrors['validation'](_0x486b65(0x11d),_0x486b65(0x123)+JSON[_0x486b65(0x101)](_0x462fc7)+_0x486b65(0x111)+JSON['stringify'](_0x10ad9e));}function buildBackendPayload(_0xf6e8e0,_0x3eb5d4,_0x5b786e){const _0x240460=a58_0x1624f5;return{'appCode':_0xf6e8e0,'datasetCode':_0x3eb5d4[_0x240460(0x102)],'businessGroup':_0x5b786e};}function normalizeBusinessGroup(_0x5203dc){const _0x232d28=a58_0x1624f5;if(_0x5203dc===undefined||_0x5203dc===null)return'';return String(_0x5203dc)[_0x232d28(0x12e)]();}function a58_0x2b02(){const _0xd95bd1=['modelCode','object','280iWUmrg','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','dataset','toUpperCase','extend','update','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','unchanged','45123133OfsJlB','1145558TaAHNG','str','753072bUlDqu',',\x20actual\x20','parse','matched','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','datasetName','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','3446828kDutnX','length','apiError','string','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','keys','Expectation\x20mismatch\x20at\x20businessGroup','prototype','business-group-update','DB_TABLE','expectBusinessGroup','call','Expected\x20','isArray','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','payload','POST','--business-group\x20is\x20required','found','data','appCode','business-group','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','trim','datasetCode','2241LkGLmF','name','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed,\x20or\x20the\x20reserved\x20value\x20ungrouped\x20to\x20clear\x20it','dbtableConfig','Update\x20business\x20scenario\x20group','businessGroup','datasetId','expect-business-group','54530QTmPCp','sourceType','modelId','source','93816dnBHPP','validation','number','METADATA','3lOtJbs','isFinite','5334nzDYst','value','ungrouped','315aJxEFB','stringify','code'];a58_0x2b02=function(){return _0xd95bd1;};return a58_0x2b02();}function normalizeBusinessGroupArgument(_0x4d578f){const _0x2b7e85=normalizeBusinessGroup(_0x4d578f);return _0x2b7e85===UNGROUPED_BUSINESS_GROUP?'':_0x2b7e85;}function asPlainObject(_0x3559ef){const _0x197bd8=a58_0x1624f5;if(!_0x3559ef||typeof _0x3559ef!==_0x197bd8(0x104)||Array[_0x197bd8(0x124)](_0x3559ef))return{};return _0x3559ef;}function firstString(..._0x134c85){const _0x4949c4=a58_0x1624f5;for(const _0x451b76 of _0x134c85){if(typeof _0x451b76===_0x4949c4(0x11a)&&_0x451b76['trim']())return _0x451b76[_0x4949c4(0x12e)]();if(typeof _0x451b76===_0x4949c4(0xf9)&&Number[_0x4949c4(0xfc)](_0x451b76))return String(_0x451b76);}return undefined;}function firstNumber(..._0x1697d8){const _0x576d97=a58_0x1624f5;for(const _0x545629 of _0x1697d8){if(typeof _0x545629===_0x576d97(0xf9)&&Number[_0x576d97(0xfc)](_0x545629))return _0x545629;if(typeof _0x545629===_0x576d97(0x11a)&&_0x545629['trim']()&&Number['isFinite'](Number(_0x545629)))return Number(_0x545629);}return null;}function trim(_0x15d937){const _0x18f586=a58_0x1624f5;return String(_0x15d937||'')[_0x18f586(0x12e)]();}
@@ -1 +1 @@
1
- const a59_0x4c4a22=a59_0x20c3;function a59_0x20c3(_0x585e11,_0x4273e5){_0x585e11=_0x585e11-0x1ea;const _0x8c4c60=a59_0x8c4c();let _0x20c3c8=_0x8c4c60[_0x585e11];return _0x20c3c8;}(function(_0x219e0e,_0x1d4446){const _0x31ae17=a59_0x20c3,_0x306c45=_0x219e0e();while(!![]){try{const _0x4a8810=parseInt(_0x31ae17(0x1eb))/0x1*(-parseInt(_0x31ae17(0x1f6))/0x2)+parseInt(_0x31ae17(0x1ef))/0x3*(-parseInt(_0x31ae17(0x1ff))/0x4)+parseInt(_0x31ae17(0x1fb))/0x5+parseInt(_0x31ae17(0x1ed))/0x6+parseInt(_0x31ae17(0x1f2))/0x7+-parseInt(_0x31ae17(0x1ec))/0x8*(parseInt(_0x31ae17(0x1f1))/0x9)+-parseInt(_0x31ae17(0x1fa))/0xa*(-parseInt(_0x31ae17(0x1f7))/0xb);if(_0x4a8810===_0x1d4446)break;else _0x306c45['push'](_0x306c45['shift']());}catch(_0x5a6272){_0x306c45['push'](_0x306c45['shift']());}}}(a59_0x8c4c,0xf405a));function a59_0x8c4c(){const _0x35454f=['370ydkhLF','934590DlhZnr','DB_TABLE','business-groups','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','116pigVYq','appCode','dbid','22rreeQN','6321688bOCAuA','2643840WKpBKM','number','79632KvBPoX','length','9gBbVxX','5323752NzjwDS','read','Found\x20','groups','157120AfoPCH','862081TuIrOJ','dataset','num'];a59_0x8c4c=function(){return _0x35454f;};return a59_0x8c4c();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a59_0x4c4a22(0x1f8),'command':a59_0x4c4a22(0x1fd),'description':'List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','risk':a59_0x4c4a22(0x1f3),'flags':[{'name':a59_0x4c4a22(0x1ea),'type':a59_0x4c4a22(0x1ee),'required':!![],'description':a59_0x4c4a22(0x1fe)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2994dc){const _0x565ac3=a59_0x4c4a22,_0x5297e6=_0x2994dc[_0x565ac3(0x1f9)](_0x565ac3(0x1ea)),_0x38a625=await getErBusinessGroupSummary(_0x2994dc[_0x565ac3(0x200)],_0x5297e6);return{'ok':!![],'data':{..._0x38a625,'scope':_0x565ac3(0x1fc)},'message':_0x565ac3(0x1f4)+_0x38a625[_0x565ac3(0x1f5)][_0x565ac3(0x1f0)]+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x5297e6};}};
1
+ const a59_0xc00941=a59_0x562f;function a59_0x562f(_0x1d646b,_0x3130b8){_0x1d646b=_0x1d646b-0x95;const _0x181c40=a59_0x181c();let _0x562f7b=_0x181c40[_0x1d646b];return _0x562f7b;}(function(_0x5b8aad,_0x5e1041){const _0x4cc8ea=a59_0x562f,_0x3026b5=_0x5b8aad();while(!![]){try{const _0x289354=parseInt(_0x4cc8ea(0x9f))/0x1*(-parseInt(_0x4cc8ea(0xa4))/0x2)+-parseInt(_0x4cc8ea(0xa2))/0x3+-parseInt(_0x4cc8ea(0xa7))/0x4*(-parseInt(_0x4cc8ea(0xa1))/0x5)+parseInt(_0x4cc8ea(0xa5))/0x6+parseInt(_0x4cc8ea(0x9b))/0x7+-parseInt(_0x4cc8ea(0x97))/0x8+parseInt(_0x4cc8ea(0xa6))/0x9;if(_0x289354===_0x5e1041)break;else _0x3026b5['push'](_0x3026b5['shift']());}catch(_0x24023e){_0x3026b5['push'](_0x3026b5['shift']());}}}(a59_0x181c,0xf32d7));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a59_0x181c(){const _0x2ffacd=['5wbAcqu','2512530LDVGZs','DB_TABLE','3420586oMylne','10863654KAudVR','5927085nQbmuY','3957664KNWpQw','Found\x20','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','8105456NIvgKD','dataset','groups','appCode','7689150qmwQsx','num','\x20business\x20group(s)\x20for\x20database\x20connection\x20','dbid','1LOIPas','number'];a59_0x181c=function(){return _0x2ffacd;};return a59_0x181c();}export const datasetBusinessGroups={'service':a59_0xc00941(0x98),'command':'business-groups','description':a59_0xc00941(0x96),'risk':'read','flags':[{'name':a59_0xc00941(0x9e),'type':a59_0xc00941(0xa0),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x222002){const _0x1d22c0=a59_0xc00941,_0x519ea1=_0x222002[_0x1d22c0(0x9c)](_0x1d22c0(0x9e)),_0xbb02c4=await getErBusinessGroupSummary(_0x222002[_0x1d22c0(0x9a)],_0x519ea1);return{'ok':!![],'data':{..._0xbb02c4,'scope':_0x1d22c0(0xa3)},'message':_0x1d22c0(0x95)+_0xbb02c4[_0x1d22c0(0x99)]['length']+_0x1d22c0(0x9d)+_0x519ea1};}};
@@ -1 +1 @@
1
- function a60_0xc503(){const _0x13c1d3=['5419376eAQtUU','6645335cDfOKw','join','source','trim','filter','496825evYmmx','dataset','149gouDve','name','8913848vUgUTY','2545197Fyeekh','getOne','lovrabet','tableName','17258WUQCaJ','\x20is\x20','object','datasetCode','2138679UJgzFG','toUpperCase','sourceType','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','102ISymai','SQL\x20schema\x20validation','170ulaNGE','dbId','The\x20current\x20dataset\x20\x22'];a60_0xc503=function(){return _0x13c1d3;};return a60_0xc503();}const a60_0x147809=a60_0x122d;(function(_0x1f1567,_0x5b166f){const _0x5c138e=a60_0x122d,_0x100a8a=_0x1f1567();while(!![]){try{const _0x473687=-parseInt(_0x5c138e(0xed))/0x1*(-parseInt(_0x5c138e(0xf4))/0x2)+parseInt(_0x5c138e(0xf0))/0x3+parseInt(_0x5c138e(0xe5))/0x4+parseInt(_0x5c138e(0xe6))/0x5+parseInt(_0x5c138e(0xfc))/0x6*(-parseInt(_0x5c138e(0xeb))/0x7)+parseInt(_0x5c138e(0xef))/0x8+-parseInt(_0x5c138e(0xf8))/0x9*(parseInt(_0x5c138e(0xfe))/0xa);if(_0x473687===_0x5b166f)break;else _0x100a8a['push'](_0x100a8a['shift']());}catch(_0x306f38){_0x100a8a['push'](_0x100a8a['shift']());}}}(a60_0xc503,0xa7788));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x147809(0xf2),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','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='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x358751){const _0x5bcd96=a60_0x147809;return _0x358751==null?'':String(_0x358751)[_0x5bcd96(0xe9)]();}function getDatasetCode(_0x38491d){const _0x37f172=a60_0x147809;return valueToString(_0x38491d['code']??_0x38491d['modelCode']??_0x38491d[_0x37f172(0xec)]?.[_0x37f172(0xf7)]);}function getDatasetName(_0x1e08d4){const _0x3ce019=a60_0x147809;return valueToString(_0x1e08d4[_0x3ce019(0xee)]??_0x1e08d4['dataset']?.['datasetName'])||'unknown';}function getDatasetSource(_0x26f005){const _0x2b0909=a60_0x147809;return valueToString(_0x26f005[_0x2b0909(0xe8)]??_0x26f005['dataset']?.[_0x2b0909(0xfa)])[_0x2b0909(0xf9)]();}function getDbtableConfig(_0x26b676){const _0x10439a=a60_0x147809,_0x2ca597=_0x26b676['dbtableConfig']??_0x26b676['dbtable'];return _0x2ca597&&typeof _0x2ca597===_0x10439a(0xf6)?_0x2ca597:{};}function a60_0x122d(_0x2dd2a7,_0x4fdf0e){_0x2dd2a7=_0x2dd2a7-0xe4;const _0xc5034f=a60_0xc503();let _0x122d50=_0xc5034f[_0x2dd2a7];return _0x122d50;}export function isDbTableBackedDataset(_0x37da95){const _0x53b1f6=a60_0x147809,_0x583a5d=getDatasetSource(_0x37da95);if(_0x583a5d==='METADATA')return![];const _0x23191f=getDbtableConfig(_0x37da95),_0x4b00c6=_0x23191f[_0x53b1f6(0xff)]??_0x23191f['id'],_0x3e3bf4=valueToString(_0x23191f[_0x53b1f6(0xf3)]??_0x37da95[_0x53b1f6(0xf3)]??_0x37da95[_0x53b1f6(0xec)]?.[_0x53b1f6(0xf3)]);return _0x4b00c6!==undefined&&_0x4b00c6!==null&&_0x3e3bf4['length']>0x0;}export function filterDbTableBackedDatasets(_0x4d6973){const _0x504844=a60_0x147809;return _0x4d6973[_0x504844(0xea)](_0x9f1bf7=>isDbTableBackedDataset(_0x9f1bf7));}export function buildDbTableBackedRequirementMessage(_0x403f87,_0x416361=a60_0x147809(0xfd)){const _0x13c42c=a60_0x147809,_0x2ed33c=getDatasetSource(_0x403f87)||'UNKNOWN',_0x4fc032=getDatasetName(_0x403f87),_0x252ee2=getDatasetCode(_0x403f87),_0x29e704=_0x252ee2?'\x20('+_0x252ee2+')':'';return[_0x13c42c(0xe4)+_0x4fc032+'\x22'+_0x29e704+_0x13c42c(0xf5)+_0x2ed33c+_0x13c42c(0xfb)+_0x416361+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x13c42c(0xea)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x13c42c(0xf1)]+'.'][_0x13c42c(0xe7)]('\x20');}export function assertDatasetIsDbTableBacked(_0x59fd25,_0x3a911a){if(!isDbTableBackedDataset(_0x59fd25))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x59fd25,_0x3a911a));}
1
+ const a60_0x425cb2=a60_0x43fe;(function(_0x52b7f6,_0xd48373){const _0x117951=a60_0x43fe,_0x15f158=_0x52b7f6();while(!![]){try{const _0x2d7fe4=parseInt(_0x117951(0x1f4))/0x1*(-parseInt(_0x117951(0x1dd))/0x2)+-parseInt(_0x117951(0x1ef))/0x3+-parseInt(_0x117951(0x1ec))/0x4*(-parseInt(_0x117951(0x1e0))/0x5)+-parseInt(_0x117951(0x1e2))/0x6*(-parseInt(_0x117951(0x1db))/0x7)+-parseInt(_0x117951(0x1f8))/0x8*(parseInt(_0x117951(0x1ed))/0x9)+-parseInt(_0x117951(0x1e4))/0xa+parseInt(_0x117951(0x1e8))/0xb*(parseInt(_0x117951(0x1e6))/0xc);if(_0x2d7fe4===_0xd48373)break;else _0x15f158['push'](_0x15f158['shift']());}catch(_0x3631bf){_0x15f158['push'](_0x15f158['shift']());}}}(a60_0x5e2f,0x1e21f));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a60_0x425cb2(0x1f7)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x425cb2(0x1e9);function valueToString(_0x161769){return _0x161769==null?'':String(_0x161769)['trim']();}function getDatasetCode(_0xb4a351){const _0x8b5f5=a60_0x425cb2;return valueToString(_0xb4a351['code']??_0xb4a351['modelCode']??_0xb4a351[_0x8b5f5(0x1fa)]?.[_0x8b5f5(0x1f2)]);}function a60_0x5e2f(){const _0x4efd03=['836mzYnhl','\x20is\x20','dbId','27740Iqmugr','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','1133172CXUNRz','METADATA','1036720jlBFSR','source','48LgJiCl','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','940467cxjxZR','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','datasetName','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','4LpmMGz','913581oSMzqZ','toUpperCase','299850FjseUY','length','The\x20current\x20dataset\x20\x22','datasetCode','getOne','258hflmkS','validation','dbtableConfig','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','8xhhkfv','filter','dataset','join','tableName','7GfqWQB','sourceType'];a60_0x5e2f=function(){return _0x4efd03;};return a60_0x5e2f();}function a60_0x43fe(_0xa8518d,_0x414ca4){_0xa8518d=_0xa8518d-0x1da;const _0x5e2f38=a60_0x5e2f();let _0x43fe4a=_0x5e2f38[_0xa8518d];return _0x43fe4a;}function getDatasetName(_0x3c47d2){const _0x40efe5=a60_0x425cb2;return valueToString(_0x3c47d2['name']??_0x3c47d2[_0x40efe5(0x1fa)]?.[_0x40efe5(0x1ea)])||'unknown';}function getDatasetSource(_0x588e0d){const _0x3c4f2b=a60_0x425cb2;return valueToString(_0x588e0d[_0x3c4f2b(0x1e5)]??_0x588e0d[_0x3c4f2b(0x1fa)]?.[_0x3c4f2b(0x1dc)])[_0x3c4f2b(0x1ee)]();}function getDbtableConfig(_0x1d9e14){const _0x249558=a60_0x425cb2,_0x11383f=_0x1d9e14[_0x249558(0x1f6)]??_0x1d9e14['dbtable'];return _0x11383f&&typeof _0x11383f==='object'?_0x11383f:{};}export function isDbTableBackedDataset(_0x37518c){const _0x34782c=a60_0x425cb2,_0x1bb3e7=getDatasetSource(_0x37518c);if(_0x1bb3e7===_0x34782c(0x1e3))return![];const _0x3062da=getDbtableConfig(_0x37518c),_0xc2faf3=_0x3062da[_0x34782c(0x1df)]??_0x3062da['id'],_0x20f03c=valueToString(_0x3062da[_0x34782c(0x1da)]??_0x37518c[_0x34782c(0x1da)]??_0x37518c[_0x34782c(0x1fa)]?.[_0x34782c(0x1da)]);return _0xc2faf3!==undefined&&_0xc2faf3!==null&&_0x20f03c[_0x34782c(0x1f0)]>0x0;}export function filterDbTableBackedDatasets(_0x163a29){const _0x1431c6=a60_0x425cb2;return _0x163a29[_0x1431c6(0x1f9)](_0x5f1fa4=>isDbTableBackedDataset(_0x5f1fa4));}export function buildDbTableBackedRequirementMessage(_0x17c783,_0x16be24='SQL\x20schema\x20validation'){const _0x341795=a60_0x425cb2,_0x3e8494=getDatasetSource(_0x17c783)||'UNKNOWN',_0x363967=getDatasetName(_0x17c783),_0x2d0c0f=getDatasetCode(_0x17c783),_0x2196e6=_0x2d0c0f?'\x20('+_0x2d0c0f+')':'';return[_0x341795(0x1f1)+_0x363967+'\x22'+_0x2196e6+_0x341795(0x1de)+_0x3e8494+'\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20'+_0x16be24+'.',_0x341795(0x1eb),_0x341795(0x1e1),_0x341795(0x1e7)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x341795(0x1f3)]+'.'][_0x341795(0x1fb)]('\x20');}export function assertDatasetIsDbTableBacked(_0x366451,_0xd3ae77){const _0x20f9ce=a60_0x425cb2;if(!isDbTableBackedDataset(_0x366451))throw CliErrors[_0x20f9ce(0x1f5)](buildDbTableBackedRequirementMessage(_0x366451,_0xd3ae77));}
@@ -1 +1 @@
1
- const a61_0x26430c=a61_0x4a63;(function(_0x35160d,_0x791563){const _0x28eeeb=a61_0x4a63,_0x85c4d8=_0x35160d();while(!![]){try{const _0x463003=-parseInt(_0x28eeeb(0xd0))/0x1+parseInt(_0x28eeeb(0xb6))/0x2+-parseInt(_0x28eeeb(0xd5))/0x3+parseInt(_0x28eeeb(0xa5))/0x4*(-parseInt(_0x28eeeb(0xc5))/0x5)+-parseInt(_0x28eeeb(0xd2))/0x6*(-parseInt(_0x28eeeb(0xc6))/0x7)+-parseInt(_0x28eeeb(0xc2))/0x8+-parseInt(_0x28eeeb(0xe5))/0x9*(-parseInt(_0x28eeeb(0xaf))/0xa);if(_0x463003===_0x791563)break;else _0x85c4d8['push'](_0x85c4d8['shift']());}catch(_0x661f90){_0x85c4d8['push'](_0x85c4d8['shift']());}}}(a61_0x58d7,0xa364e));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x26430c(0xd6),'description':a61_0x26430c(0xd3)},DBID_FLAG={'name':a61_0x26430c(0xdc),'type':a61_0x26430c(0xd6),'description':a61_0x26430c(0xad)},CONFIRM_FLAG={'name':'confirm','type':'boolean','description':a61_0x26430c(0xe2)},CASCADE_FLAG={'name':a61_0x26430c(0xd7),'type':a61_0x26430c(0xc0),'description':a61_0x26430c(0xae)},EXPECTED_COUNT_FLAG={'name':a61_0x26430c(0xc7),'type':'number','description':a61_0x26430c(0xdf)};export const datasetDelete={'service':'dataset','command':'delete','description':a61_0x26430c(0xc3),'risk':a61_0x26430c(0xe4),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2cd6c4){const _0x22bff0=a61_0x26430c,_0x565a61=_0x2cd6c4[_0x22bff0(0xbb)]('id'),_0x1f537d=_0x2cd6c4['str'](_0x22bff0(0xba)),_0x15f81a=_0x2cd6c4[_0x22bff0(0xbb)](_0x22bff0(0xdc)),_0x3aaa36=[_0x565a61>0x0,Boolean(_0x1f537d),_0x15f81a>0x0]['filter'](Boolean);if(_0x3aaa36[_0x22bff0(0xc1)]===0x0)throw CliErrors[_0x22bff0(0xaa)](_0x22bff0(0xcc));if(_0x3aaa36[_0x22bff0(0xc1)]>0x1)throw CliErrors[_0x22bff0(0xaa)](_0x22bff0(0xbc));},async 'dryRun'(_0x18a4ea){const _0xf2e17a=a61_0x26430c,_0x22fb95=await resolveTargets(_0x18a4ea),_0x1d082c=_0x18a4ea[_0xf2e17a(0xca)](_0xf2e17a(0xd7));return{'method':_0xf2e17a(0xdd),'url':_0xf2e17a(0xb3)+(_0x1d082c?_0xf2e17a(0xcf):_0xf2e17a(0xbf)),'body':{'count':_0x22fb95['length'],'cascade':_0x1d082c,'datasets':_0x22fb95},'description':_0x1d082c?_0xf2e17a(0xd9)+_0x22fb95[_0xf2e17a(0xc1)]+_0xf2e17a(0xd1):'Would\x20safely\x20delete\x20'+_0x22fb95[_0xf2e17a(0xc1)]+_0xf2e17a(0xe0)};},async 'execute'(_0x4d1d85){const _0x5bd9c5=a61_0x26430c;if(!_0x4d1d85[_0x5bd9c5(0xca)](_0x5bd9c5(0xb9)))throw CliErrors[_0x5bd9c5(0xaa)](_0x5bd9c5(0xdb),_0x5bd9c5(0xd4));const _0x38a11b=await resolveTargets(_0x4d1d85),_0x568992=_0x4d1d85[_0x5bd9c5(0xca)]('cascade'),_0x2ca144=[],_0x5de9dd=[];for(const _0x48a037 of _0x38a11b){try{await deleteDataset(_0x48a037['id'],_0x568992),_0x2ca144[_0x5bd9c5(0xb1)](_0x48a037);}catch(_0x38ce8a){_0x5de9dd['push']({..._0x48a037,'error':_0x38ce8a instanceof Error?_0x38ce8a['message']:String(_0x38ce8a)});}}if(_0x5de9dd[_0x5bd9c5(0xc1)]>0x0){const _0x211fcd=buildPageRestoreCommands(_0x4d1d85[_0x5bd9c5(0xb0)],_0x568992?_0x2ca144:[]);return{'ok':![],'data':{'requested':_0x38a11b[_0x5bd9c5(0xc1)],'cascade':_0x568992,'deletedCount':_0x2ca144['length'],'failedCount':_0x5de9dd[_0x5bd9c5(0xc1)],'deleted':_0x2ca144,'failed':_0x5de9dd,'pageRestoreCommands':_0x211fcd},'message':_0x5bd9c5(0xab)+_0x2ca144[_0x5bd9c5(0xc1)]+'/'+_0x38a11b[_0x5bd9c5(0xc1)]+_0x5bd9c5(0xa8)+_0x5de9dd[_0x5bd9c5(0xc1)]+_0x5bd9c5(0xb4)};}return{'ok':!![],'data':{'requested':_0x38a11b[_0x5bd9c5(0xc1)],'cascade':_0x568992,'deletedCount':_0x2ca144[_0x5bd9c5(0xc1)],'deleted':_0x2ca144,'pageRestoreCommands':buildPageRestoreCommands(_0x4d1d85['appCode'],_0x568992?_0x2ca144:[])},'message':'Deleted\x20'+_0x2ca144[_0x5bd9c5(0xc1)]+'\x20dataset(s)'};}};function a61_0x4a63(_0x5f3547,_0x2c0465){_0x5f3547=_0x5f3547-0xa5;const _0x58d79d=a61_0x58d7();let _0x4a630f=_0x58d79d[_0x5f3547];return _0x4a630f;}async function resolveTargets(_0x10c6e0){const _0x4ef4b6=a61_0x26430c,_0x16a700=_0x10c6e0[_0x4ef4b6(0xbb)]('id'),_0xea9acd=_0x10c6e0['str'](_0x4ef4b6(0xba)),_0x26afde=_0x10c6e0[_0x4ef4b6(0xbb)](_0x4ef4b6(0xdc));let _0x391a38;_0xea9acd?(_0x391a38=await listDatasets(_0x10c6e0[_0x4ef4b6(0xb0)],{'code':_0xea9acd}),_0x391a38=_0x391a38[_0x4ef4b6(0xc8)](_0x54cca2=>_0x54cca2[_0x4ef4b6(0xba)]===_0xea9acd)):(_0x391a38=await listDatasets(_0x10c6e0['appCode']),_0x16a700>0x0&&(_0x391a38=_0x391a38[_0x4ef4b6(0xc8)](_0x47ac3d=>_0x47ac3d['id']===_0x16a700)),_0x26afde>0x0&&(_0x391a38=_0x391a38[_0x4ef4b6(0xc8)](_0x5c1af4=>_0x5c1af4[_0x4ef4b6(0xe1)]?.[_0x4ef4b6(0xcb)]===_0x26afde)));const _0x4e142=[];for(const _0x3127f1 of _0x391a38){const _0x2a9db9=await getDatasetDetail(_0x3127f1[_0x4ef4b6(0xba)]),_0x48b273=Array[_0x4ef4b6(0xc9)](_0x2a9db9[_0x4ef4b6(0xa6)])?_0x2a9db9[_0x4ef4b6(0xa6)][_0x4ef4b6(0xc8)](_0x4ded80=>_0x4ded80!=null&&typeof _0x4ded80==='object'&&_0x4ded80[_0x4ef4b6(0xa9)]!==!![]):[];_0x4e142['push'](normalizeTarget(_0x3127f1,_0x48b273));}if(_0x4e142[_0x4ef4b6(0xc1)]===0x0){const _0x11db74=_0xea9acd||(_0x16a700>0x0?_0x4ef4b6(0xcd)+_0x16a700:_0x4ef4b6(0xac)+_0x26afde);throw CliErrors[_0x4ef4b6(0xaa)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x11db74+'.');}const _0x3c5d51=_0x10c6e0[_0x4ef4b6(0xbb)](_0x4ef4b6(0xc7));if(_0x3c5d51>0x0&&_0x4e142[_0x4ef4b6(0xc1)]!==_0x3c5d51)throw CliErrors[_0x4ef4b6(0xaa)](_0x4ef4b6(0xda)+_0x4e142[_0x4ef4b6(0xc1)]+_0x4ef4b6(0xc4)+_0x3c5d51+'.');return _0x4e142;}function a61_0x58d7(){const _0x3de706=['Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','dbtableConfig','Required\x20to\x20execute\x20dataset\x20deletion','description','high-risk-write','5747787pQXkzS','500DfcaqN','relatedPageInfoList','isInteger','\x20dataset(s);\x20','deleted','validation','Deleted\x20','dbid=','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','20aTSqoa','appCode','push','type','/smartapi/dataset/delete?cascade=','\x20failed','title','898132mApRue','relatedPages','add','confirm','code','num','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','name','map','false','boolean','length','1281320saBkCK','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','15885mpgILM','7657013enWzRz','expected-count','filter','isArray','bool','dbId','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','id=','dbName','true','467864biFEep','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','6lcAmAH','Dataset\x20id','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','3377385vUArgG','number','cascade','object','Would\x20delete\x20','Matched\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','dbid','POST','source'];a61_0x58d7=function(){return _0x3de706;};return a61_0x58d7();}function normalizeTarget(_0x3761e3,_0x51d7af){const _0x3ab5df=a61_0x26430c,_0x56c83a=_0x3761e3[_0x3ab5df(0xe1)]??{},_0x307c1a=_0x51d7af[_0x3ab5df(0xbe)](_0x2d840d=>{const _0x13c303=_0x3ab5df;if(_0x2d840d==null||typeof _0x2d840d!==_0x13c303(0xd8))return null;const _0x41ee48=_0x2d840d,_0x2205d4=Number(_0x41ee48['id']);if(!Number[_0x13c303(0xa7)](_0x2205d4)||_0x2205d4<=0x0)return null;const _0x149755=_0x41ee48[_0x13c303(0xb5)]??_0x41ee48[_0x13c303(0xbd)];return{'id':_0x2205d4,..._0x149755?{'name':String(_0x149755)}:{},..._0x41ee48['type']?{'type':String(_0x41ee48[_0x13c303(0xb2)])}:{}};})[_0x3ab5df(0xc8)](_0x32b624=>_0x32b624!==null);return{'id':_0x3761e3['id'],'code':_0x3761e3['code'],'name':_0x3761e3[_0x3ab5df(0xbd)],'description':_0x3761e3[_0x3ab5df(0xe3)],'source':_0x3761e3[_0x3ab5df(0xde)],'dbId':_0x56c83a[_0x3ab5df(0xcb)],'dbName':_0x56c83a[_0x3ab5df(0xce)],'tableName':_0x56c83a['tableName'],'relatedPageCount':_0x307c1a[_0x3ab5df(0xc1)],'relatedPages':_0x307c1a};}function buildPageRestoreCommands(_0x20f886,_0x36606b){const _0x5d12a9=a61_0x26430c,_0x26253b=new Set();for(const _0x3fe19b of _0x36606b){for(const _0x129e70 of _0x3fe19b[_0x5d12a9(0xb7)])_0x26253b[_0x5d12a9(0xb8)](_0x129e70['id']);}return[..._0x26253b]['map'](_0xd7fd40=>'rabetbase\x20page\x20restore\x20--id\x20'+_0xd7fd40+'\x20--appcode\x20'+_0x20f886);}
1
+ function a61_0x4216(){const _0x1f86a4=['\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','push','source','description','Dataset\x20id','dataset','12921858XicQFn','title','boolean','validation','rabetbase\x20page\x20restore\x20--id\x20','code','deleted','/smartapi/dataset/delete?cascade=','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','dbid=','dbName','3207610RMIFYB','140ZGWBZj','isArray','bool','map','str','high-risk-write','message','dbId','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Would\x20safely\x20delete\x20','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','Required\x20to\x20execute\x20dataset\x20deletion','12074656vYnhxs','false','\x20dataset(s);\x20','1360488lqssfP','appCode','type','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','\x20dataset(s)','length','68054028uiioXs','62832TmqDYV','confirm','id=','5RwkoxR','\x20--appcode\x20','relatedPageInfoList','11RqTnGI','dbid','6nDLBiU','num','Would\x20delete\x20','isInteger','Deleted\x20','object','expected-count','delete','filter','10tuSPhj','cascade','dbtableConfig','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','add','550854DOrsuA','relatedPages','name'];a61_0x4216=function(){return _0x1f86a4;};return a61_0x4216();}const a61_0x5eff8f=a61_0x4e98;(function(_0x20ae4f,_0x837d58){const _0x35a690=a61_0x4e98,_0x1c2da2=_0x20ae4f();while(!![]){try{const _0x1b1813=parseInt(_0x35a690(0x1c6))/0x1*(-parseInt(_0x35a690(0x1d9))/0x2)+parseInt(_0x35a690(0x1ff))/0x3+parseInt(_0x35a690(0x207))/0x4*(-parseInt(_0x35a690(0x1ee))/0x5)+parseInt(_0x35a690(0x1cb))/0x6*(-parseInt(_0x35a690(0x1ed))/0x7)+-parseInt(_0x35a690(0x1fc))/0x8+-parseInt(_0x35a690(0x1e2))/0x9*(parseInt(_0x35a690(0x1d4))/0xa)+parseInt(_0x35a690(0x1c9))/0xb*(parseInt(_0x35a690(0x206))/0xc);if(_0x1b1813===_0x837d58)break;else _0x1c2da2['push'](_0x1c2da2['shift']());}catch(_0xd219b6){_0x1c2da2['push'](_0x1c2da2['shift']());}}}(a61_0x4216,0xdccbe));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a61_0x4e98(_0x36c1e7,_0x374541){_0x36c1e7=_0x36c1e7-0x1c6;const _0x421687=a61_0x4216();let _0x4e9861=_0x421687[_0x36c1e7];return _0x4e9861;}const DATASET_ID_FLAG={'name':'id','type':'number','description':a61_0x5eff8f(0x1e0)},DBID_FLAG={'name':a61_0x5eff8f(0x1ca),'type':'number','description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':a61_0x5eff8f(0x208),'type':a61_0x5eff8f(0x1e4),'description':a61_0x5eff8f(0x1fb)},CASCADE_FLAG={'name':a61_0x5eff8f(0x1d5),'type':a61_0x5eff8f(0x1e4),'description':a61_0x5eff8f(0x1fa)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':'number','description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a61_0x5eff8f(0x1e1),'command':a61_0x5eff8f(0x1d2),'description':a61_0x5eff8f(0x1ea),'risk':a61_0x5eff8f(0x1f3),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x101d0e){const _0x58022c=a61_0x5eff8f,_0x118325=_0x101d0e[_0x58022c(0x1cc)]('id'),_0xc5665b=_0x101d0e[_0x58022c(0x1f2)]('code'),_0x4986aa=_0x101d0e['num']('dbid'),_0x4561a1=[_0x118325>0x0,Boolean(_0xc5665b),_0x4986aa>0x0][_0x58022c(0x1d3)](Boolean);if(_0x4561a1[_0x58022c(0x205)]===0x0)throw CliErrors[_0x58022c(0x1e5)](_0x58022c(0x203));if(_0x4561a1['length']>0x1)throw CliErrors[_0x58022c(0x1e5)](_0x58022c(0x202));},async 'dryRun'(_0x2d1b52){const _0x9dcd62=a61_0x5eff8f,_0x5713b1=await resolveTargets(_0x2d1b52),_0xd18c54=_0x2d1b52[_0x9dcd62(0x1f0)]('cascade');return{'method':'POST','url':_0x9dcd62(0x1e9)+(_0xd18c54?'true':_0x9dcd62(0x1fd)),'body':{'count':_0x5713b1[_0x9dcd62(0x205)],'cascade':_0xd18c54,'datasets':_0x5713b1},'description':_0xd18c54?_0x9dcd62(0x1cd)+_0x5713b1[_0x9dcd62(0x205)]+_0x9dcd62(0x1f7):_0x9dcd62(0x1f9)+_0x5713b1[_0x9dcd62(0x205)]+_0x9dcd62(0x1dc)};},async 'execute'(_0x2d66c2){const _0x2de383=a61_0x5eff8f;if(!_0x2d66c2[_0x2de383(0x1f0)](_0x2de383(0x208)))throw CliErrors[_0x2de383(0x1e5)](_0x2de383(0x1f8),_0x2de383(0x1f6));const _0x1d70d0=await resolveTargets(_0x2d66c2),_0x41f3ee=_0x2d66c2[_0x2de383(0x1f0)]('cascade'),_0x21a46e=[],_0x2980bf=[];for(const _0x5bba3a of _0x1d70d0){try{await deleteDataset(_0x5bba3a['id'],_0x41f3ee),_0x21a46e[_0x2de383(0x1dd)](_0x5bba3a);}catch(_0x2490bc){_0x2980bf['push']({..._0x5bba3a,'error':_0x2490bc instanceof Error?_0x2490bc[_0x2de383(0x1f4)]:String(_0x2490bc)});}}if(_0x2980bf[_0x2de383(0x205)]>0x0){const _0x368553=buildPageRestoreCommands(_0x2d66c2['appCode'],_0x41f3ee?_0x21a46e:[]);return{'ok':![],'data':{'requested':_0x1d70d0[_0x2de383(0x205)],'cascade':_0x41f3ee,'deletedCount':_0x21a46e[_0x2de383(0x205)],'failedCount':_0x2980bf[_0x2de383(0x205)],'deleted':_0x21a46e,'failed':_0x2980bf,'pageRestoreCommands':_0x368553},'message':_0x2de383(0x1cf)+_0x21a46e[_0x2de383(0x205)]+'/'+_0x1d70d0['length']+_0x2de383(0x1fe)+_0x2980bf['length']+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x1d70d0['length'],'cascade':_0x41f3ee,'deletedCount':_0x21a46e[_0x2de383(0x205)],'deleted':_0x21a46e,'pageRestoreCommands':buildPageRestoreCommands(_0x2d66c2[_0x2de383(0x200)],_0x41f3ee?_0x21a46e:[])},'message':'Deleted\x20'+_0x21a46e[_0x2de383(0x205)]+_0x2de383(0x204)};}};async function resolveTargets(_0x9a2b5e){const _0x529a4a=a61_0x5eff8f,_0x3439f1=_0x9a2b5e[_0x529a4a(0x1cc)]('id'),_0x4460c3=_0x9a2b5e[_0x529a4a(0x1f2)](_0x529a4a(0x1e7)),_0x17f395=_0x9a2b5e[_0x529a4a(0x1cc)](_0x529a4a(0x1ca));let _0x3143a1;_0x4460c3?(_0x3143a1=await listDatasets(_0x9a2b5e[_0x529a4a(0x200)],{'code':_0x4460c3}),_0x3143a1=_0x3143a1[_0x529a4a(0x1d3)](_0x371bbd=>_0x371bbd[_0x529a4a(0x1e7)]===_0x4460c3)):(_0x3143a1=await listDatasets(_0x9a2b5e[_0x529a4a(0x200)]),_0x3439f1>0x0&&(_0x3143a1=_0x3143a1[_0x529a4a(0x1d3)](_0x31edb4=>_0x31edb4['id']===_0x3439f1)),_0x17f395>0x0&&(_0x3143a1=_0x3143a1[_0x529a4a(0x1d3)](_0x260835=>_0x260835[_0x529a4a(0x1d6)]?.['dbId']===_0x17f395)));const _0x4b61a5=[];for(const _0x2376bc of _0x3143a1){const _0x440993=await getDatasetDetail(_0x2376bc[_0x529a4a(0x1e7)]),_0x3f74bf=Array[_0x529a4a(0x1ef)](_0x440993[_0x529a4a(0x1c8)])?_0x440993[_0x529a4a(0x1c8)][_0x529a4a(0x1d3)](_0x4660de=>_0x4660de!=null&&typeof _0x4660de===_0x529a4a(0x1d0)&&_0x4660de[_0x529a4a(0x1e8)]!==!![]):[];_0x4b61a5[_0x529a4a(0x1dd)](normalizeTarget(_0x2376bc,_0x3f74bf));}if(_0x4b61a5[_0x529a4a(0x205)]===0x0){const _0xc55f63=_0x4460c3||(_0x3439f1>0x0?_0x529a4a(0x209)+_0x3439f1:_0x529a4a(0x1eb)+_0x17f395);throw CliErrors[_0x529a4a(0x1e5)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0xc55f63+'.');}const _0x1b9841=_0x9a2b5e[_0x529a4a(0x1cc)](_0x529a4a(0x1d1));if(_0x1b9841>0x0&&_0x4b61a5[_0x529a4a(0x205)]!==_0x1b9841)throw CliErrors['validation']('Matched\x20'+_0x4b61a5[_0x529a4a(0x205)]+_0x529a4a(0x1d7)+_0x1b9841+'.');return _0x4b61a5;}function normalizeTarget(_0x299703,_0x60e437){const _0x249817=a61_0x5eff8f,_0xa79fa8=_0x299703['dbtableConfig']??{},_0x5e1339=_0x60e437[_0x249817(0x1f1)](_0x1b3adc=>{const _0x130e9c=_0x249817;if(_0x1b3adc==null||typeof _0x1b3adc!==_0x130e9c(0x1d0))return null;const _0xc2f3cd=_0x1b3adc,_0x133afe=Number(_0xc2f3cd['id']);if(!Number[_0x130e9c(0x1ce)](_0x133afe)||_0x133afe<=0x0)return null;const _0x394471=_0xc2f3cd[_0x130e9c(0x1e3)]??_0xc2f3cd[_0x130e9c(0x1db)];return{'id':_0x133afe,..._0x394471?{'name':String(_0x394471)}:{},..._0xc2f3cd[_0x130e9c(0x201)]?{'type':String(_0xc2f3cd[_0x130e9c(0x201)])}:{}};})['filter'](_0x138c8d=>_0x138c8d!==null);return{'id':_0x299703['id'],'code':_0x299703['code'],'name':_0x299703[_0x249817(0x1db)],'description':_0x299703[_0x249817(0x1df)],'source':_0x299703[_0x249817(0x1de)],'dbId':_0xa79fa8[_0x249817(0x1f5)],'dbName':_0xa79fa8[_0x249817(0x1ec)],'tableName':_0xa79fa8['tableName'],'relatedPageCount':_0x5e1339[_0x249817(0x205)],'relatedPages':_0x5e1339};}function buildPageRestoreCommands(_0x13e3d8,_0x317462){const _0x23ce21=a61_0x5eff8f,_0x87ab63=new Set();for(const _0x297429 of _0x317462){for(const _0x41c7ca of _0x297429[_0x23ce21(0x1da)])_0x87ab63[_0x23ce21(0x1d8)](_0x41c7ca['id']);}return[..._0x87ab63][_0x23ce21(0x1f1)](_0x271a71=>_0x23ce21(0x1e6)+_0x271a71+_0x23ce21(0x1c7)+_0x13e3d8);}
@@ -1 +1 @@
1
- const a62_0x3799d7=a62_0x4112;function a62_0x253f(){const _0x24f185=['object','responseBody','dblinkInfoDTO','labelField','alias','fields','dbType','indexes','tableName','columnCodeListWithDeleted','toDatasetName','length','toDatasetCode','cardinality','2411838eXKacm','formatRules','2383758QjyaXF','allFieldNames','allFields','responseFields','dbId','requestBody','20aoKwDe','main_sub','dbtableConfig','afterScriptId','requestFields','path','creatorNameField','tableComment','updateTimeField','155244wLirLD','method','displayName','modifierIdField','modifierNameField','isArray','relatedPageInfoList','relationId','relations','options','read','name','modelId','creatorIdField','datasetKey','filter','pkField','code','7726nTBfWW','logicField','deleted','trim','bizRelationType','modelCode','type','fromField','doType','doVersion','sourceType','push','2376330iXNRyA','extend','entries','required','str','toFieldLabel','beforeScriptId','description','parse','118TQOpMX','map','validateRules','dbName','string','deprecated','source','3476634DxfHWw','197400zTaHCn'];a62_0x253f=function(){return _0x24f185;};return a62_0x253f();}(function(_0x2ad19e,_0x358d27){const _0x1b91ad=a62_0x4112,_0x54e8ea=_0x2ad19e();while(!![]){try{const _0x1a019f=parseInt(_0x1b91ad(0xb4))/0x1*(parseInt(_0x1b91ad(0x7a))/0x2)+-parseInt(_0x1b91ad(0xa2))/0x3*(parseInt(_0x1b91ad(0x99))/0x4)+parseInt(_0x1b91ad(0xc0))/0x5+parseInt(_0x1b91ad(0x93))/0x6+-parseInt(_0x1b91ad(0x81))/0x7+-parseInt(_0x1b91ad(0x82))/0x8+-parseInt(_0x1b91ad(0x91))/0x9;if(_0x1a019f===_0x358d27)break;else _0x54e8ea['push'](_0x54e8ea['shift']());}catch(_0x36b9bc){_0x54e8ea['push'](_0x54e8ea['shift']());}}}(a62_0x253f,0x4470e));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x20777e){const _0x1d3d68=a62_0x4112;if(_0x20777e[_0x1d3d68(0xb6)])return null;const _0xf30840=Boolean(_0x20777e[_0x1d3d68(0xa4)]!==undefined||_0x20777e[_0x1d3d68(0xbc)]!==undefined);let _0x5d6326={};if(!_0xf30840&&typeof _0x20777e[_0x1d3d68(0xc1)]==='string')try{_0x5d6326=JSON[_0x1d3d68(0x79)](_0x20777e[_0x1d3d68(0xc1)]);}catch{}const _0x11c58d=_0xf30840?_0x20777e[_0x1d3d68(0xad)]:_0x20777e[_0x1d3d68(0xb3)],_0x18e1fd=_0xf30840?_0x20777e['displayName']:_0x20777e[_0x1d3d68(0xad)],_0x5597d6=_0xf30840?_0x20777e[_0x1d3d68(0xbc)]:_0x20777e[_0x1d3d68(0xba)]||_0x20777e['dataType'],_0x41c0c1=_0xf30840?_0x20777e['pkField']===!![]:_0x5d6326['pkField']===!![],_0x505152=_0xf30840?_0x20777e[_0x1d3d68(0xc3)]===!![]:_0x5d6326[_0x1d3d68(0xc3)]===!![],_0x4a9e1c=_0xf30840?_0x20777e[_0x1d3d68(0xab)]??null:_0x5d6326[_0x1d3d68(0xab)]??null,_0x336ebb={'name':_0x11c58d,'displayName':_0x18e1fd||_0x11c58d,'type':_0x5597d6,'dbType':_0x20777e[_0x1d3d68(0x89)],'pk':_0x41c0c1,'required':_0x505152,'deprecated':_0x20777e[_0x1d3d68(0x7f)]===!![],'description':_0x20777e['description']||undefined};return Array[_0x1d3d68(0xa7)](_0x4a9e1c)&&_0x4a9e1c[_0x1d3d68(0x8e)]>0x0&&(_0x336ebb[_0x1d3d68(0xab)]=_0x4a9e1c),_0x336ebb;}function parseJsonMaybe(_0xf85d8f){const _0x5e1755=a62_0x4112;if(typeof _0xf85d8f!==_0x5e1755(0x7e))return _0xf85d8f;try{return JSON[_0x5e1755(0x79)](_0xf85d8f);}catch{return _0xf85d8f;}}function a62_0x4112(_0x1bf98b,_0x44ec3a){_0x1bf98b=_0x1bf98b-0x77;const _0x253fea=a62_0x253f();let _0x411248=_0x253fea[_0x1bf98b];return _0x411248;}function normalizeOperationEntry(_0x121a8e,_0x3799a0){const _0x188177=a62_0x4112;if(!_0x3799a0||typeof _0x3799a0!==_0x188177(0x83))return null;if(!_0x3799a0['method']||!_0x3799a0[_0x188177(0x9e)])return null;const _0x413a63={'name':_0x121a8e,'method':_0x3799a0[_0x188177(0xa3)],'path':_0x3799a0['path']};if(_0x3799a0['host'])_0x413a63['host']=_0x3799a0['host'];if(_0x3799a0[_0x188177(0x98)]!=null){const _0x36aa18=parseJsonMaybe(_0x3799a0[_0x188177(0x98)]);_0x413a63[_0x188177(0x98)]=_0x36aa18;}if(_0x3799a0[_0x188177(0x84)]!=null){const _0x2a124a=parseJsonMaybe(_0x3799a0[_0x188177(0x84)]);_0x413a63[_0x188177(0x84)]=_0x2a124a;}if(_0x3799a0[_0x188177(0x77)]!=null)_0x413a63[_0x188177(0x77)]=_0x3799a0[_0x188177(0x77)];if(_0x3799a0['afterScriptId']!=null)_0x413a63[_0x188177(0x9c)]=_0x3799a0['afterScriptId'];if(Array['isArray'](_0x3799a0['requestFields']))_0x413a63[_0x188177(0x9d)]=_0x3799a0[_0x188177(0x9d)];if(Array[_0x188177(0xa7)](_0x3799a0['responseFields']))_0x413a63[_0x188177(0x96)]=_0x3799a0['responseFields'];return _0x413a63;}function summarizeDbtable(_0x14c60e){const _0x1ba6a4=a62_0x4112,_0x4c3aa0={},_0x16c924=['dbId','dbName',_0x1ba6a4(0x8b),_0x1ba6a4(0xb0),_0x1ba6a4(0xb2),_0x1ba6a4(0x95),_0x1ba6a4(0xb5),'createTimeField',_0x1ba6a4(0xa1),_0x1ba6a4(0xaf),_0x1ba6a4(0x9f),_0x1ba6a4(0xa5),_0x1ba6a4(0xa6),_0x1ba6a4(0x86),_0x1ba6a4(0x85)];for(const _0xd16d77 of _0x16c924){if(_0x14c60e[_0xd16d77]!==undefined)_0x4c3aa0[_0xd16d77]=_0x14c60e[_0xd16d77];}return typeof _0x4c3aa0[_0x1ba6a4(0x95)]==='string'&&_0x4c3aa0[_0x1ba6a4(0x95)][_0x1ba6a4(0x8e)]>0x0&&(_0x4c3aa0[_0x1ba6a4(0x94)]=_0x4c3aa0[_0x1ba6a4(0x95)]['split'](',')[_0x1ba6a4(0x7b)](_0x158f25=>_0x158f25[_0x1ba6a4(0xb7)]())[_0x1ba6a4(0xb1)](Boolean)),_0x4c3aa0;}function normalizeRelatedPages(_0x56716a){const _0x342072=a62_0x4112;if(!Array[_0x342072(0xa7)](_0x56716a))return[];return _0x56716a['filter'](_0x4ce9ee=>_0x4ce9ee&&typeof _0x4ce9ee===_0x342072(0x83))[_0x342072(0x7b)](_0x38cd25=>({'id':_0x38cd25['id'],'type':_0x38cd25[_0x342072(0xba)],'code':_0x38cd25[_0x342072(0xb3)],'title':_0x38cd25['title'],'deleted':_0x38cd25[_0x342072(0xb6)]===!![]}));}export const datasetDetail={'service':'dataset','command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a62_0x3799d7(0xac),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x3799d7(0x87),'type':a62_0x3799d7(0x7e),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x591d7f){const _0x4df78d=a62_0x3799d7,_0xb854f1=await getDatasetDetail(_0x591d7f[_0x4df78d(0xc4)](_0x4df78d(0xb3))),_0xd90999=Array['isArray'](_0xb854f1[_0x4df78d(0x88)])?_0xb854f1[_0x4df78d(0x88)]:Array[_0x4df78d(0xa7)](_0xb854f1['properties'])?_0xb854f1['properties']:[],_0x2d8c99=_0xd90999[_0x4df78d(0x7b)](_0x321aa1=>normalizeField(_0x321aa1))[_0x4df78d(0xb1)](_0x5c8563=>_0x5c8563!==null),_0x3421f0=_0xb854f1['operations']??{},_0x57b79e=[];for(const [_0x25ea21,_0x1487ee]of Object[_0x4df78d(0xc2)](_0x3421f0)){const _0x5e3559=normalizeOperationEntry(_0x25ea21,_0x1487ee);if(_0x5e3559)_0x57b79e[_0x4df78d(0xbf)](_0x5e3559);}const _0x128d7c=_0xb854f1[_0x4df78d(0x9b)]??{},_0x1eb5bb=_0xb854f1['dataset']??{},_0x426af0=_0x128d7c[_0x4df78d(0x97)]!=null?{'id':_0x128d7c[_0x4df78d(0x97)],'name':_0x128d7c[_0x4df78d(0x7d)]??null}:undefined;let _0x23f5af;return typeof _0xb854f1[_0x4df78d(0xc1)]===_0x4df78d(0x7e)&&(_0x23f5af=parseJsonMaybe(_0xb854f1[_0x4df78d(0xc1)])),{'ok':!![],'data':{'id':_0xb854f1[_0x4df78d(0xae)]??_0xb854f1['id'],'name':_0xb854f1[_0x4df78d(0xad)],'code':_0xb854f1[_0x4df78d(0xb9)]||_0xb854f1[_0x4df78d(0xb3)],'doVersion':_0xb854f1[_0x4df78d(0xbd)],'description':_0xb854f1[_0x4df78d(0x78)]||_0x1eb5bb[_0x4df78d(0xa0)]||undefined,'source':_0xb854f1[_0x4df78d(0x80)]||_0x1eb5bb[_0x4df78d(0xbe)],'table':_0x128d7c[_0x4df78d(0x8b)]||_0x1eb5bb[_0x4df78d(0x8b)],'datasetKey':_0x128d7c['datasetKey'],'pk':_0x128d7c[_0x4df78d(0xb2)],'db':_0x426af0,'dbtable':summarizeDbtable(_0x128d7c),'fields':_0x2d8c99,'operations':_0x57b79e,'indexes':Array[_0x4df78d(0xa7)](_0x1eb5bb['indexes'])?_0x1eb5bb[_0x4df78d(0x8a)]:[],'relations':Array[_0x4df78d(0xa7)](_0xb854f1['relations'])?_0xb854f1[_0x4df78d(0xaa)][_0x4df78d(0x7b)](_0x26e605=>({..._0x26e605[_0x4df78d(0xa9)]!=null?{'relationId':_0x26e605[_0x4df78d(0xa9)]}:{},'fromDataset':_0xb854f1[_0x4df78d(0xad)],'fromCode':_0xb854f1[_0x4df78d(0xb9)]||_0xb854f1[_0x4df78d(0xb3)],'fromTable':_0x128d7c['tableName']||_0x1eb5bb['tableName'],'fromField':_0x26e605[_0x4df78d(0xbb)],'toDataset':_0x26e605[_0x4df78d(0x8d)],'toCode':_0x26e605[_0x4df78d(0x8f)],'toTable':_0x26e605['toTableName'],'toField':_0x26e605['toField'],'labelField':_0x26e605[_0x4df78d(0xc5)]||undefined,'cardinality':_0x26e605[_0x4df78d(0x90)]||undefined,'bizRelationType':_0x26e605[_0x4df78d(0xb8)]===_0x4df78d(0x9a)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0xb854f1[_0x4df78d(0xa8)]),...Array['isArray'](_0xb854f1[_0x4df78d(0x8c)])?{'columnCodeListWithDeleted':_0xb854f1[_0x4df78d(0x8c)]}:{},'formatRules':Array[_0x4df78d(0xa7)](_0xb854f1['formatRules'])?_0xb854f1[_0x4df78d(0x92)]:[],'validateRules':Array[_0x4df78d(0xa7)](_0xb854f1[_0x4df78d(0x7c)])?_0xb854f1['validateRules']:[],..._0x23f5af!==undefined?{'extend':_0x23f5af}:{},'stats':{'fieldCount':_0x2d8c99['length'],'operationCount':_0x57b79e[_0x4df78d(0x8e)]}}};}};
1
+ function a62_0x4f8f(){const _0x8b2b85=['name','responseFields','labelField','5036460xkPCSR','642iOoxfa','76BtGYUO','4805080cWPiHP','toField','relations','alias','displayName','length','map','cardinality','str','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','11NPSHMs','45JWSVMK','columnCodeListWithDeleted','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','formatRules','allFields','19103JEpzUd','deleted','options','host','modifierNameField','trim','datasetKey','requestBody','responseBody','deprecated','modifierIdField','tableName','dbType','18831UWUBNY','validateRules','dbtableConfig','creatorIdField','parse','properties','modelId','type','modelCode','toFieldLabel','read','beforeScriptId','main_sub','afterScriptId','isArray','1543224mIpWwD','filter','split','doType','object','3810OGZPqp','fields','code','string','required','path','requestFields','method','description','dblinkInfoDTO','tableComment','updateTimeField','38286228hZnbkv','dataType','455vnrCef','dataset','pkField','extend','indexes','relatedPageInfoList','relationId','dbId','dbName','doVersion','creatorNameField','push'];a62_0x4f8f=function(){return _0x8b2b85;};return a62_0x4f8f();}const a62_0x14fd24=a62_0x39c9;(function(_0x4659e3,_0x436f28){const _0x1b4d2f=a62_0x39c9,_0x53e996=_0x4659e3();while(!![]){try{const _0x52855f=parseInt(_0x1b4d2f(0xb3))/0x1*(-parseInt(_0x1b4d2f(0xa5))/0x2)+parseInt(_0x1b4d2f(0x91))/0x3*(-parseInt(_0x1b4d2f(0xc4))/0x4)+-parseInt(_0x1b4d2f(0xc5))/0x5+-parseInt(_0x1b4d2f(0xc3))/0x6*(parseInt(_0x1b4d2f(0x84))/0x7)+parseInt(_0x1b4d2f(0xa0))/0x8*(-parseInt(_0x1b4d2f(0x7f))/0x9)+parseInt(_0x1b4d2f(0xc2))/0xa+parseInt(_0x1b4d2f(0x7e))/0xb*(parseInt(_0x1b4d2f(0xb1))/0xc);if(_0x52855f===_0x436f28)break;else _0x53e996['push'](_0x53e996['shift']());}catch(_0x2bade9){_0x53e996['push'](_0x53e996['shift']());}}}(a62_0x4f8f,0x77c61));function a62_0x39c9(_0x3a5e46,_0xa60e61){_0x3a5e46=_0x3a5e46-0x7d;const _0x4f8f10=a62_0x4f8f();let _0x39c93e=_0x4f8f10[_0x3a5e46];return _0x39c93e;}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x10f2fb){const _0x2e8fd1=a62_0x39c9;if(_0x10f2fb[_0x2e8fd1(0x85)])return null;const _0x3ccadb=Boolean(_0x10f2fb[_0x2e8fd1(0xc9)]!==undefined||_0x10f2fb[_0x2e8fd1(0xa3)]!==undefined);let _0x424f3f={};if(!_0x3ccadb&&typeof _0x10f2fb[_0x2e8fd1(0xb6)]===_0x2e8fd1(0xa8))try{_0x424f3f=JSON[_0x2e8fd1(0x95)](_0x10f2fb['extend']);}catch{}const _0x31629c=_0x3ccadb?_0x10f2fb[_0x2e8fd1(0xbf)]:_0x10f2fb[_0x2e8fd1(0xa7)],_0x4ab833=_0x3ccadb?_0x10f2fb[_0x2e8fd1(0xc9)]:_0x10f2fb[_0x2e8fd1(0xbf)],_0xe54bb3=_0x3ccadb?_0x10f2fb[_0x2e8fd1(0xa3)]:_0x10f2fb[_0x2e8fd1(0x98)]||_0x10f2fb[_0x2e8fd1(0xb2)],_0x51c145=_0x3ccadb?_0x10f2fb[_0x2e8fd1(0xb5)]===!![]:_0x424f3f[_0x2e8fd1(0xb5)]===!![],_0x27667e=_0x3ccadb?_0x10f2fb[_0x2e8fd1(0xa9)]===!![]:_0x424f3f[_0x2e8fd1(0xa9)]===!![],_0x127299=_0x3ccadb?_0x10f2fb[_0x2e8fd1(0x86)]??null:_0x424f3f['options']??null,_0x173a7f={'name':_0x31629c,'displayName':_0x4ab833||_0x31629c,'type':_0xe54bb3,'dbType':_0x10f2fb[_0x2e8fd1(0x90)],'pk':_0x51c145,'required':_0x27667e,'deprecated':_0x10f2fb[_0x2e8fd1(0x8d)]===!![],'description':_0x10f2fb[_0x2e8fd1(0xad)]||undefined};return Array[_0x2e8fd1(0x9f)](_0x127299)&&_0x127299['length']>0x0&&(_0x173a7f[_0x2e8fd1(0x86)]=_0x127299),_0x173a7f;}function parseJsonMaybe(_0x20b40a){const _0xd645c6=a62_0x39c9;if(typeof _0x20b40a!==_0xd645c6(0xa8))return _0x20b40a;try{return JSON[_0xd645c6(0x95)](_0x20b40a);}catch{return _0x20b40a;}}function normalizeOperationEntry(_0x871c0c,_0x5315f7){const _0x7b2008=a62_0x39c9;if(!_0x5315f7||typeof _0x5315f7!==_0x7b2008(0xa4))return null;if(!_0x5315f7[_0x7b2008(0xac)]||!_0x5315f7[_0x7b2008(0xaa)])return null;const _0x423501={'name':_0x871c0c,'method':_0x5315f7[_0x7b2008(0xac)],'path':_0x5315f7['path']};if(_0x5315f7[_0x7b2008(0x87)])_0x423501[_0x7b2008(0x87)]=_0x5315f7[_0x7b2008(0x87)];if(_0x5315f7['requestBody']!=null){const _0x3549a4=parseJsonMaybe(_0x5315f7[_0x7b2008(0x8b)]);_0x423501[_0x7b2008(0x8b)]=_0x3549a4;}if(_0x5315f7[_0x7b2008(0x8c)]!=null){const _0x53cac6=parseJsonMaybe(_0x5315f7[_0x7b2008(0x8c)]);_0x423501[_0x7b2008(0x8c)]=_0x53cac6;}if(_0x5315f7[_0x7b2008(0x9c)]!=null)_0x423501['beforeScriptId']=_0x5315f7[_0x7b2008(0x9c)];if(_0x5315f7['afterScriptId']!=null)_0x423501[_0x7b2008(0x9e)]=_0x5315f7['afterScriptId'];if(Array[_0x7b2008(0x9f)](_0x5315f7[_0x7b2008(0xab)]))_0x423501[_0x7b2008(0xab)]=_0x5315f7[_0x7b2008(0xab)];if(Array[_0x7b2008(0x9f)](_0x5315f7[_0x7b2008(0xc0)]))_0x423501[_0x7b2008(0xc0)]=_0x5315f7['responseFields'];return _0x423501;}function summarizeDbtable(_0x2b48b0){const _0x172d23=a62_0x39c9,_0x5e8bfa={},_0x5ab411=[_0x172d23(0xba),_0x172d23(0xbb),_0x172d23(0x8f),_0x172d23(0x8a),_0x172d23(0xb5),_0x172d23(0x83),'logicField','createTimeField',_0x172d23(0xb0),_0x172d23(0x94),_0x172d23(0xbd),_0x172d23(0x8e),_0x172d23(0x88),_0x172d23(0xc1),_0x172d23(0xae)];for(const _0x54f669 of _0x5ab411){if(_0x2b48b0[_0x54f669]!==undefined)_0x5e8bfa[_0x54f669]=_0x2b48b0[_0x54f669];}return typeof _0x5e8bfa[_0x172d23(0x83)]===_0x172d23(0xa8)&&_0x5e8bfa[_0x172d23(0x83)][_0x172d23(0xca)]>0x0&&(_0x5e8bfa['allFieldNames']=_0x5e8bfa['allFields'][_0x172d23(0xa2)](',')[_0x172d23(0xcb)](_0x9ede3d=>_0x9ede3d[_0x172d23(0x89)]())[_0x172d23(0xa1)](Boolean)),_0x5e8bfa;}function normalizeRelatedPages(_0x42ece8){const _0x28fc38=a62_0x39c9;if(!Array[_0x28fc38(0x9f)](_0x42ece8))return[];return _0x42ece8[_0x28fc38(0xa1)](_0x326ff5=>_0x326ff5&&typeof _0x326ff5===_0x28fc38(0xa4))[_0x28fc38(0xcb)](_0xd78866=>({'id':_0xd78866['id'],'type':_0xd78866[_0x28fc38(0x98)],'code':_0xd78866[_0x28fc38(0xa7)],'title':_0xd78866['title'],'deleted':_0xd78866[_0x28fc38(0x85)]===!![]}));}export const datasetDetail={'service':a62_0x14fd24(0xb4),'command':'detail','description':a62_0x14fd24(0x81),'risk':a62_0x14fd24(0x9b),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x14fd24(0xc8),'type':'string','description':a62_0x14fd24(0x7d)}],async 'execute'(_0x9dff14){const _0x1ab8f5=a62_0x14fd24,_0x1c4766=await getDatasetDetail(_0x9dff14[_0x1ab8f5(0xcd)](_0x1ab8f5(0xa7))),_0x464b99=Array[_0x1ab8f5(0x9f)](_0x1c4766['fields'])?_0x1c4766[_0x1ab8f5(0xa6)]:Array[_0x1ab8f5(0x9f)](_0x1c4766[_0x1ab8f5(0x96)])?_0x1c4766[_0x1ab8f5(0x96)]:[],_0x86004b=_0x464b99[_0x1ab8f5(0xcb)](_0x1143ea=>normalizeField(_0x1143ea))[_0x1ab8f5(0xa1)](_0x34c3ab=>_0x34c3ab!==null),_0x55d765=_0x1c4766['operations']??{},_0x2b0211=[];for(const [_0x4fa514,_0x25e1bb]of Object['entries'](_0x55d765)){const _0x2ecbda=normalizeOperationEntry(_0x4fa514,_0x25e1bb);if(_0x2ecbda)_0x2b0211[_0x1ab8f5(0xbe)](_0x2ecbda);}const _0x7ae520=_0x1c4766[_0x1ab8f5(0x93)]??{},_0x5f593b=_0x1c4766['dataset']??{},_0x19370a=_0x7ae520[_0x1ab8f5(0xba)]!=null?{'id':_0x7ae520['dbId'],'name':_0x7ae520[_0x1ab8f5(0xbb)]??null}:undefined;let _0x1df5f3;return typeof _0x1c4766[_0x1ab8f5(0xb6)]===_0x1ab8f5(0xa8)&&(_0x1df5f3=parseJsonMaybe(_0x1c4766['extend'])),{'ok':!![],'data':{'id':_0x1c4766[_0x1ab8f5(0x97)]??_0x1c4766['id'],'name':_0x1c4766[_0x1ab8f5(0xbf)],'code':_0x1c4766['modelCode']||_0x1c4766['code'],'doVersion':_0x1c4766[_0x1ab8f5(0xbc)],'description':_0x1c4766[_0x1ab8f5(0xad)]||_0x5f593b[_0x1ab8f5(0xaf)]||undefined,'source':_0x1c4766['source']||_0x5f593b['sourceType'],'table':_0x7ae520[_0x1ab8f5(0x8f)]||_0x5f593b[_0x1ab8f5(0x8f)],'datasetKey':_0x7ae520['datasetKey'],'pk':_0x7ae520[_0x1ab8f5(0xb5)],'db':_0x19370a,'dbtable':summarizeDbtable(_0x7ae520),'fields':_0x86004b,'operations':_0x2b0211,'indexes':Array['isArray'](_0x5f593b[_0x1ab8f5(0xb7)])?_0x5f593b['indexes']:[],'relations':Array[_0x1ab8f5(0x9f)](_0x1c4766[_0x1ab8f5(0xc7)])?_0x1c4766['relations']['map'](_0x1926f4=>({..._0x1926f4['relationId']!=null?{'relationId':_0x1926f4[_0x1ab8f5(0xb9)]}:{},'fromDataset':_0x1c4766[_0x1ab8f5(0xbf)],'fromCode':_0x1c4766[_0x1ab8f5(0x99)]||_0x1c4766[_0x1ab8f5(0xa7)],'fromTable':_0x7ae520['tableName']||_0x5f593b['tableName'],'fromField':_0x1926f4['fromField'],'toDataset':_0x1926f4['toDatasetName'],'toCode':_0x1926f4['toDatasetCode'],'toTable':_0x1926f4['toTableName'],'toField':_0x1926f4[_0x1ab8f5(0xc6)],'labelField':_0x1926f4[_0x1ab8f5(0x9a)]||undefined,'cardinality':_0x1926f4[_0x1ab8f5(0xcc)]||undefined,'bizRelationType':_0x1926f4['bizRelationType']===_0x1ab8f5(0x9d)?_0x1ab8f5(0x9d):null})):[],'relatedPages':normalizeRelatedPages(_0x1c4766[_0x1ab8f5(0xb8)]),...Array[_0x1ab8f5(0x9f)](_0x1c4766[_0x1ab8f5(0x80)])?{'columnCodeListWithDeleted':_0x1c4766[_0x1ab8f5(0x80)]}:{},'formatRules':Array['isArray'](_0x1c4766[_0x1ab8f5(0x82)])?_0x1c4766['formatRules']:[],'validateRules':Array[_0x1ab8f5(0x9f)](_0x1c4766[_0x1ab8f5(0x92)])?_0x1c4766[_0x1ab8f5(0x92)]:[],..._0x1df5f3!==undefined?{'extend':_0x1df5f3}:{},'stats':{'fieldCount':_0x86004b[_0x1ab8f5(0xca)],'operationCount':_0x2b0211[_0x1ab8f5(0xca)]}}};}};