@lovrabet/rabetbase-cli 2.4.6-beta.1 → 2.4.6-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.d.ts +8 -7
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/types.d.ts +17 -2
  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.d.ts +2 -0
  138. package/lib/commands/menu/visibility-update.js +1 -0
  139. package/lib/commands/notification/config-create.js +1 -1
  140. package/lib/commands/notification/config-delete.js +1 -1
  141. package/lib/commands/notification/config-list.js +1 -1
  142. package/lib/commands/notification/config-update.js +1 -1
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.js +1 -1
  145. package/lib/commands/ocr/index.js +1 -1
  146. package/lib/commands/page/create.js +1 -1
  147. package/lib/commands/page/custom/detail.js +1 -1
  148. package/lib/commands/page/custom/list.js +1 -1
  149. package/lib/commands/page/custom/publish.js +1 -1
  150. package/lib/commands/page/custom/shared.js +1 -1
  151. package/lib/commands/page/custom/syntax.js +1 -1
  152. package/lib/commands/page/custom/template.js +1 -1
  153. package/lib/commands/page/custom/update.js +1 -1
  154. package/lib/commands/page/data-list-status.js +1 -1
  155. package/lib/commands/page/generate-start.js +1 -1
  156. package/lib/commands/page/generate-status.js +1 -1
  157. package/lib/commands/page/index.js +1 -1
  158. package/lib/commands/page/pull.js +1 -1
  159. package/lib/commands/page/push.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/sync.js +1 -1
  164. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  165. package/lib/commands/project/create/format-elapsed.js +1 -1
  166. package/lib/commands/project/create/main.js +1 -1
  167. package/lib/commands/project/create/materialize-project-template.js +1 -1
  168. package/lib/commands/project/create/project-name.js +1 -1
  169. package/lib/commands/project/create/project-template-archive.js +1 -1
  170. package/lib/commands/project/create/project-template-path.js +1 -1
  171. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  172. package/lib/commands/project/create/use-format-code.js +1 -1
  173. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  174. package/lib/commands/project/index.js +1 -1
  175. package/lib/commands/project/upgrade.js +1 -1
  176. package/lib/commands/registry.js +1 -1
  177. package/lib/commands/role/delete.js +1 -1
  178. package/lib/commands/role/detail.js +1 -1
  179. package/lib/commands/role/index.js +1 -1
  180. package/lib/commands/role/list.js +1 -1
  181. package/lib/commands/role/shared.js +1 -1
  182. package/lib/commands/role/update.js +1 -1
  183. package/lib/commands/role/user-add.js +1 -1
  184. package/lib/commands/role/user-remove.js +1 -1
  185. package/lib/commands/role/user-resolve.js +1 -1
  186. package/lib/commands/run/index.js +1 -1
  187. package/lib/commands/schema.js +1 -1
  188. package/lib/commands/sql/create.js +1 -1
  189. package/lib/commands/sql/delete.js +1 -1
  190. package/lib/commands/sql/detail.js +1 -1
  191. package/lib/commands/sql/exec.js +1 -1
  192. package/lib/commands/sql/index.js +1 -1
  193. package/lib/commands/sql/list.js +1 -1
  194. package/lib/commands/sql/pull.js +1 -1
  195. package/lib/commands/sql/push.js +1 -1
  196. package/lib/commands/sql/shared.js +1 -1
  197. package/lib/commands/sql/status.js +1 -1
  198. package/lib/commands/sql/validate.js +1 -1
  199. package/lib/commands/task/index.js +1 -1
  200. package/lib/commands/task/status.js +1 -1
  201. package/lib/commands/tenant/index.js +1 -1
  202. package/lib/commands/tenant/members-list.js +1 -1
  203. package/lib/commands/tenant/shared.js +1 -1
  204. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  205. package/lib/commands/user-account/index.js +1 -1
  206. package/lib/commands/workspace/add.js +1 -1
  207. package/lib/commands/workspace/index.js +1 -1
  208. package/lib/commands/workspace/remove.js +1 -1
  209. package/lib/config/schema.js +1 -1
  210. package/lib/constant/cdn.js +1 -1
  211. package/lib/constant/cli.js +1 -1
  212. package/lib/constant/defaults.js +1 -1
  213. package/lib/constant/domain.js +1 -1
  214. package/lib/constant/env.js +1 -1
  215. package/lib/constant/output.js +1 -1
  216. package/lib/constant/paths.js +1 -1
  217. package/lib/constant/risk.js +1 -1
  218. package/lib/context/app-resolver.js +1 -1
  219. package/lib/context/auth-resolver.js +1 -1
  220. package/lib/context/config-loader.js +1 -1
  221. package/lib/context.js +1 -1
  222. package/lib/core/alias-resolver.js +1 -1
  223. package/lib/core/api-client.js +1 -1
  224. package/lib/core/bff/config.js +1 -1
  225. package/lib/core/bff/file-system.js +1 -1
  226. package/lib/core/bff/hash.js +1 -1
  227. package/lib/core/bff/lock.js +1 -1
  228. package/lib/core/bff/utils.js +1 -1
  229. package/lib/core/db-resolver.js +1 -1
  230. package/lib/core/page/file-system.js +1 -1
  231. package/lib/core/page/hash.js +1 -1
  232. package/lib/core/page/lock.js +1 -1
  233. package/lib/core/sql-index-auditor.js +1 -1
  234. package/lib/core/sql-sync/config.js +1 -1
  235. package/lib/core/sql-sync/file-system.js +1 -1
  236. package/lib/core/sql-sync/hash.js +1 -1
  237. package/lib/core/sql-sync/lock.js +1 -1
  238. package/lib/core/sql-sync/utils.js +1 -1
  239. package/lib/core/sql-validator.js +1 -1
  240. package/lib/errors.js +1 -1
  241. package/lib/framework/build-all-flags.js +1 -1
  242. package/lib/framework/error-output.js +1 -1
  243. package/lib/framework/explicit-yes.js +1 -1
  244. package/lib/framework/flags.js +1 -1
  245. package/lib/framework/help.js +1 -1
  246. package/lib/framework/index.js +1 -1
  247. package/lib/framework/output.js +1 -1
  248. package/lib/framework/response.js +1 -1
  249. package/lib/framework/runner-alias.js +1 -1
  250. package/lib/framework/runner.js +1 -1
  251. package/lib/framework/schema-export.js +1 -1
  252. package/lib/framework/types.js +1 -1
  253. package/lib/generated/build-info.d.ts +4 -4
  254. package/lib/generated/build-info.js +1 -1
  255. package/lib/help.js +1 -1
  256. package/lib/postinstall.js +1 -1
  257. package/lib/runtime/confirmation.js +1 -1
  258. package/lib/runtime/event.js +1 -1
  259. package/lib/runtime/index.js +1 -1
  260. package/lib/runtime/queue.js +1 -1
  261. package/lib/runtime/resolve.js +1 -1
  262. package/lib/skills/builtin-skill.js +1 -1
  263. package/lib/skills/main.js +1 -1
  264. package/lib/skills/npx-skills-add.js +1 -1
  265. package/lib/skills/skill-presence.js +1 -1
  266. package/lib/telemetry/cli-command-trace.js +1 -1
  267. package/lib/telemetry/cli-help-trace.js +1 -1
  268. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  269. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  270. package/lib/telemetry/send-cli-trace-log.js +1 -1
  271. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  272. package/lib/utils/ai_config.js +1 -1
  273. package/lib/utils/apply-jq-filter.js +1 -1
  274. package/lib/utils/cdn-config.js +1 -1
  275. package/lib/utils/check-sdk-version.js +1 -1
  276. package/lib/utils/cli-version-check.js +1 -1
  277. package/lib/utils/cli-version-policy.js +1 -1
  278. package/lib/utils/config.js +1 -1
  279. package/lib/utils/entity-with-id.js +1 -1
  280. package/lib/utils/file-utils.js +1 -1
  281. package/lib/utils/guides-cdn.js +1 -1
  282. package/lib/utils/http-client.js +1 -1
  283. package/lib/utils/is-non-interactive.js +1 -1
  284. package/lib/utils/logger.js +1 -1
  285. package/lib/utils/params.js +1 -1
  286. package/lib/utils/platform.js +1 -1
  287. package/lib/utils/rules-cdn.js +1 -1
  288. package/lib/utils/sleep.js +1 -1
  289. package/lib/utils/template-replacer.js +1 -1
  290. package/lib/utils/update-notice.js +1 -1
  291. package/lib/utils/version.js +1 -1
  292. package/lib/utils/with-active-cookie.js +1 -1
  293. package/lib/utils/write-cli-side-channel.js +1 -1
  294. package/package.json +1 -1
  295. package/skills/rabetbase/SKILL.md +4 -3
  296. package/skills/rabetbase/references/rabetbase-menu-list.md +3 -1
  297. package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +59 -0
  298. package/skills/rabetbase/references/rabetbase-ocr.md +17 -2
  299. package/skills/rabetbase.manifest.json +4 -3
@@ -1 +1 @@
1
- const a50_0x449ad0=a50_0x3c3c;function a50_0x3c3c(_0x5db744,_0x3b6aee){_0x5db744=_0x5db744-0x8d;const _0xe4275d=a50_0xe427();let _0x3c3c30=_0xe4275d[_0x5db744];return _0x3c3c30;}(function(_0x467d12,_0xab8408){const _0x252756=a50_0x3c3c,_0x32fd3c=_0x467d12();while(!![]){try{const _0x47dd04=parseInt(_0x252756(0x9c))/0x1*(parseInt(_0x252756(0x95))/0x2)+-parseInt(_0x252756(0x97))/0x3+parseInt(_0x252756(0x99))/0x4*(parseInt(_0x252756(0xa0))/0x5)+-parseInt(_0x252756(0x8d))/0x6+-parseInt(_0x252756(0x92))/0x7*(-parseInt(_0x252756(0x96))/0x8)+-parseInt(_0x252756(0x8f))/0x9+parseInt(_0x252756(0x91))/0xa;if(_0x47dd04===_0xab8408)break;else _0x32fd3c['push'](_0x32fd3c['shift']());}catch(_0x15b79b){_0x32fd3c['push'](_0x32fd3c['shift']());}}}(a50_0xe427,0x499e2));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3534c2){const _0x51b203=a50_0x3c3c,_0x49a1cd=_0x3534c2[_0x51b203(0x9a)](_0x51b203(0x9f));if(!_0x49a1cd)throw CliErrors[_0x51b203(0x9b)]('Missing\x20key.',_0x51b203(0x94)+CLI_BIN_NAME+_0x51b203(0x9d));const _0x24e5b9=readConfig(),_0xd17efd=_0x49a1cd==='app'?_0x51b203(0x93):_0x49a1cd,_0xcda66c=_0x24e5b9[_0xd17efd];if(_0xcda66c===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x49a1cd);return{'ok':!![],'data':typeof _0xcda66c===_0x51b203(0xa1)?_0xcda66c:{[_0xd17efd]:_0xcda66c},'message':typeof _0xcda66c==='object'?undefined:String(_0xcda66c)};}export const configGetDefinition={'service':a50_0x449ad0(0x8e),'command':a50_0x449ad0(0x9e),'description':a50_0x449ad0(0x90),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a50_0x449ad0(0x98),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a50_0xe427(){const _0xaf2edb=['4773663KPwlmv','Get\x20a\x20config\x20value\x20by\x20key','8128550yutKEe','161BzLirA','appcode','Usage:\x20','14wLhkki','149496PJFZTS','1524270dkIZUR','string','8IpUvTP','str','validation','17674hZuGhF','\x20config\x20get\x20--key\x20<key>','get','key','263530fShQhx','object','790506GVWvDR','config'];a50_0xe427=function(){return _0xaf2edb;};return a50_0xe427();}
1
+ const a50_0x4c2fd5=a50_0x501b;(function(_0x15e554,_0x4c80d2){const _0x176c56=a50_0x501b,_0x21217b=_0x15e554();while(!![]){try{const _0x17338b=parseInt(_0x176c56(0x1f8))/0x1+-parseInt(_0x176c56(0x207))/0x2*(-parseInt(_0x176c56(0x205))/0x3)+-parseInt(_0x176c56(0x1fc))/0x4+parseInt(_0x176c56(0x202))/0x5+parseInt(_0x176c56(0x1f5))/0x6*(-parseInt(_0x176c56(0x1f9))/0x7)+-parseInt(_0x176c56(0x201))/0x8*(parseInt(_0x176c56(0x1ff))/0x9)+parseInt(_0x176c56(0x1f3))/0xa*(-parseInt(_0x176c56(0x206))/0xb);if(_0x17338b===_0x4c80d2)break;else _0x21217b['push'](_0x21217b['shift']());}catch(_0x4eb6d1){_0x21217b['push'](_0x21217b['shift']());}}}(a50_0x3428,0xe168f));function a50_0x501b(_0x520418,_0x425a52){_0x520418=_0x520418-0x1f3;const _0x342824=a50_0x3428();let _0x501b2d=_0x342824[_0x520418];return _0x501b2d;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x5605da){const _0x1ef601=a50_0x501b,_0x14e000=_0x5605da[_0x1ef601(0x1f4)](_0x1ef601(0x204));if(!_0x14e000)throw CliErrors[_0x1ef601(0x200)](_0x1ef601(0x208),_0x1ef601(0x209)+CLI_BIN_NAME+_0x1ef601(0x1fd));const _0x107716=readConfig(),_0x290485=_0x14e000===_0x1ef601(0x1fb)?_0x1ef601(0x1f7):_0x14e000,_0x17e9c3=_0x107716[_0x290485];if(_0x17e9c3===undefined)throw CliErrors[_0x1ef601(0x200)](_0x1ef601(0x1fa)+_0x14e000);return{'ok':!![],'data':typeof _0x17e9c3===_0x1ef601(0x1f6)?_0x17e9c3:{[_0x290485]:_0x17e9c3},'message':typeof _0x17e9c3===_0x1ef601(0x1f6)?undefined:String(_0x17e9c3)};}function a50_0x3428(){const _0x4dd01e=['str','256866xGQYQN','object','appcode','938849IrIeXm','49dfSyGJ','Key\x20not\x20found:\x20','app','3511340RvfMwZ','\x20config\x20get\x20--key\x20<key>','string','11397663OQWMIA','validation','8rfagpq','6615170cHeMMt','get','key','29109HuYphM','25212orVPqe','362wYOZbW','Missing\x20key.','Usage:\x20','2840QfxAtI'];a50_0x3428=function(){return _0x4dd01e;};return a50_0x3428();}export const configGetDefinition={'service':'config','command':a50_0x4c2fd5(0x203),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a50_0x4c2fd5(0x1fe),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a51_0x1a81(_0x16efb6,_0x4e9395){_0x16efb6=_0x16efb6-0x1d1;const _0x5ac9f0=a51_0x5ac9();let _0x1a81ac=_0x5ac9f0[_0x16efb6];return _0x1a81ac;}(function(_0x2d664a,_0x530680){const _0x1ded75=a51_0x1a81,_0x341a09=_0x2d664a();while(!![]){try{const _0x376651=parseInt(_0x1ded75(0x1d7))/0x1+-parseInt(_0x1ded75(0x1d1))/0x2+-parseInt(_0x1ded75(0x1d5))/0x3+-parseInt(_0x1ded75(0x1d6))/0x4*(parseInt(_0x1ded75(0x1d4))/0x5)+-parseInt(_0x1ded75(0x1da))/0x6*(-parseInt(_0x1ded75(0x1d8))/0x7)+-parseInt(_0x1ded75(0x1d9))/0x8*(parseInt(_0x1ded75(0x1d3))/0x9)+-parseInt(_0x1ded75(0x1d2))/0xa;if(_0x376651===_0x530680)break;else _0x341a09['push'](_0x341a09['shift']());}catch(_0xa91cd1){_0x341a09['push'](_0x341a09['shift']());}}}(a51_0x5ac9,0xb5bcf));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a51_0x5ac9(){const _0x10ac9f=['296734tEXRsj','6807440spZGSX','1062SYwoGK','381065YChaXw','373791rZKhTN','8eakUVu','740692lTVGXR','119dNTbGX','11120phTsKl','449598gsWFvA'];a51_0x5ac9=function(){return _0x10ac9f;};return a51_0x5ac9();}
1
+ function a51_0x30cf(){const _0x491414=['841184pjfobU','334896HKTQVw','1377315UUlfmm','170923dlTCIP','8TxKdOV','1373715GGxuEo','31115knWkoi','93741TGMvlu','102EWvbCu'];a51_0x30cf=function(){return _0x491414;};return a51_0x30cf();}(function(_0x1231d9,_0x3d2712){const _0x800a1=a51_0x4276,_0x5c375e=_0x1231d9();while(!![]){try{const _0x365c3d=-parseInt(_0x800a1(0xf8))/0x1+parseInt(_0x800a1(0xff))/0x2+parseInt(_0x800a1(0xfc))/0x3*(parseInt(_0x800a1(0xf9))/0x4)+parseInt(_0x800a1(0xfb))/0x5*(parseInt(_0x800a1(0xfd))/0x6)+parseInt(_0x800a1(0xfa))/0x7+-parseInt(_0x800a1(0xfe))/0x8+-parseInt(_0x800a1(0xf7))/0x9;if(_0x365c3d===_0x3d2712)break;else _0x5c375e['push'](_0x5c375e['shift']());}catch(_0x12c42e){_0x5c375e['push'](_0x5c375e['shift']());}}}(a51_0x30cf,0x191d8));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a51_0x4276(_0x4b37b0,_0x58b0ce){_0x4b37b0=_0x4b37b0-0xf7;const _0x30cf84=a51_0x30cf();let _0x4276a5=_0x30cf84[_0x4b37b0];return _0x4276a5;}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- const a52_0x5a6038=a52_0x26cc;(function(_0x1df960,_0x122596){const _0x16c642=a52_0x26cc,_0x4a0145=_0x1df960();while(!![]){try{const _0x51744e=-parseInt(_0x16c642(0x1e3))/0x1+-parseInt(_0x16c642(0x1f2))/0x2*(parseInt(_0x16c642(0x1f3))/0x3)+-parseInt(_0x16c642(0x1ee))/0x4*(parseInt(_0x16c642(0x1e7))/0x5)+parseInt(_0x16c642(0x1ec))/0x6*(-parseInt(_0x16c642(0x1e4))/0x7)+-parseInt(_0x16c642(0x1ef))/0x8+parseInt(_0x16c642(0x1ed))/0x9+parseInt(_0x16c642(0x1e6))/0xa*(parseInt(_0x16c642(0x1e8))/0xb);if(_0x51744e===_0x122596)break;else _0x4a0145['push'](_0x4a0145['shift']());}catch(_0x5c820a){_0x4a0145['push'](_0x4a0145['shift']());}}}(a52_0x50d1,0xd51bf));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a52_0x50d1(){const _0x171466=['82cAYfSB','80814ZQKrzO','1088793eOOPld','12026qxNDvi','read','6216010duHzUN','10OdjimE','121jCuGsx','config','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','5118FliuPt','5632866jmytGF','2707952JnZmPZ','12623272bQRUyS','bool','list'];a52_0x50d1=function(){return _0x171466;};return a52_0x50d1();}async function execute(_0x1cecac){const _0x220df5=a52_0x26cc,_0x2c78ae=_0x1cecac[_0x220df5(0x1f0)]('global')?readScopedConfig(_0x220df5(0x1eb)):readConfig();return{'ok':!![],'data':_0x2c78ae};}function a52_0x26cc(_0x35b180,_0x3abf0f){_0x35b180=_0x35b180-0x1e3;const _0x50d15d=a52_0x50d1();let _0x26cc90=_0x50d15d[_0x35b180];return _0x26cc90;}export const configListDefinition={'service':a52_0x5a6038(0x1e9),'command':a52_0x5a6038(0x1f1),'description':'List\x20all\x20config\x20values','risk':a52_0x5a6038(0x1e5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':'boolean','description':a52_0x5a6038(0x1ea),'default':![]}],'execute':execute};
1
+ const a52_0x3f14e3=a52_0x3adf;(function(_0x4bb3ec,_0x186607){const _0x340672=a52_0x3adf,_0x17e2f9=_0x4bb3ec();while(!![]){try{const _0x5ad45e=-parseInt(_0x340672(0x84))/0x1+parseInt(_0x340672(0x79))/0x2+parseInt(_0x340672(0x80))/0x3*(-parseInt(_0x340672(0x7d))/0x4)+-parseInt(_0x340672(0x7e))/0x5+parseInt(_0x340672(0x78))/0x6+parseInt(_0x340672(0x7a))/0x7*(-parseInt(_0x340672(0x77))/0x8)+parseInt(_0x340672(0x7c))/0x9;if(_0x5ad45e===_0x186607)break;else _0x17e2f9['push'](_0x17e2f9['shift']());}catch(_0x401128){_0x17e2f9['push'](_0x17e2f9['shift']());}}}(a52_0x3c3d,0x29018));import{readScopedConfig}from'../../commands/config/shared.js';function a52_0x3adf(_0x189f24,_0x1e2fea){_0x189f24=_0x189f24-0x76;const _0x3c3d03=a52_0x3c3d();let _0x3adf9b=_0x3c3d03[_0x189f24];return _0x3adf9b;}function a52_0x3c3d(){const _0x521aed=['912536qHngXl','927395xYfXTv','List\x20all\x20config\x20values','3xXzfzN','read','bool','global','255837lNjjjC','list','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','145728yvpuwp','332508nGRgAf','401580hsPzAh','7CIPyZl','config','5394762GGQANL'];a52_0x3c3d=function(){return _0x521aed;};return a52_0x3c3d();}import{readConfig}from'../../utils/config.js';async function execute(_0x27c1a9){const _0x3be007=a52_0x3adf,_0x170946=_0x27c1a9[_0x3be007(0x82)]('global')?readScopedConfig(_0x3be007(0x83)):readConfig();return{'ok':!![],'data':_0x170946};}export const configListDefinition={'service':a52_0x3f14e3(0x7b),'command':a52_0x3f14e3(0x85),'description':a52_0x3f14e3(0x7f),'risk':a52_0x3f14e3(0x81),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':'boolean','description':a52_0x3f14e3(0x76),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- function a53_0x3bed(_0xdf30af,_0x113838){_0xdf30af=_0xdf30af-0x7b;const _0x3964a0=a53_0x3964();let _0x3bedaf=_0x3964a0[_0xdf30af];return _0x3bedaf;}const a53_0x3fa766=a53_0x3bed;(function(_0x2f84cd,_0x1b9fb5){const _0x3fcb2e=a53_0x3bed,_0x3f0eb6=_0x2f84cd();while(!![]){try{const _0xf819bf=parseInt(_0x3fcb2e(0x99))/0x1+-parseInt(_0x3fcb2e(0x91))/0x2+-parseInt(_0x3fcb2e(0x8f))/0x3*(-parseInt(_0x3fcb2e(0xa3))/0x4)+parseInt(_0x3fcb2e(0xb0))/0x5*(parseInt(_0x3fcb2e(0x9d))/0x6)+parseInt(_0x3fcb2e(0x95))/0x7+-parseInt(_0x3fcb2e(0x9a))/0x8*(parseInt(_0x3fcb2e(0xa8))/0x9)+parseInt(_0x3fcb2e(0x9b))/0xa*(parseInt(_0x3fcb2e(0x85))/0xb);if(_0xf819bf===_0x1b9fb5)break;else _0x3f0eb6['push'](_0x3f0eb6['shift']());}catch(_0x1abdd3){_0x3f0eb6['push'](_0x3f0eb6['shift']());}}}(a53_0x3964,0x18f86));import{CliErrors}from'../../errors.js';function a53_0x3964(){const _0x13da32=['Config\x20value','386545FOzVpD','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','apps','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','global','set','\x20appcode\x20set\x20to:\x20','Invalid\x20locale\x20value.','config','join','boolean','11fGPnIY','key','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','app','appcode','validation','write','value','Missing\x20value.','bool','3VGpTQX','Invalid\x20value\x20for\x20\x22','333672lLtrTH','Project','Top-level\x20key\x20\x22','length','17976uPprAI','`,\x20`','\x22.\x20Allowed:\x20','string','81809GvPycM','420328FcDcTM','140470ifMEfO','Settable\x20top-level\x20keys:\x20','6aVNIue','Global','keys','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','object','locale','583688ZPtJrJ','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','env','str','Missing\x20key.','9BSDVAh','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Usage:\x20','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x22\x20is\x20not\x20settable.','\x20(stored\x20as\x20apps\x20+\x20defaultApp)'];a53_0x3964=function(){return _0x13da32;};return a53_0x3964();}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';async function execute(_0x7ce4ac){const _0x47d3ab=a53_0x3bed,_0x5f47f5=_0x7ce4ac[_0x47d3ab(0xa6)](_0x47d3ab(0x86)),_0x192dc9=_0x7ce4ac[_0x47d3ab(0xa6)](_0x47d3ab(0x8c));if(!_0x5f47f5)throw CliErrors[_0x47d3ab(0x8a)](_0x47d3ab(0xa7),_0x47d3ab(0xab)+CLI_BIN_NAME+_0x47d3ab(0xac));if(_0x192dc9===undefined||_0x192dc9==='')throw CliErrors[_0x47d3ab(0x8a)](_0x47d3ab(0x8d),_0x47d3ab(0xab)+CLI_BIN_NAME+_0x47d3ab(0xac));if(_0x192dc9['length']>0x1f4)throw CliErrors['validation'](_0x47d3ab(0xa0));if(!isTopLevelConfigKey(_0x5f47f5))throw CliErrors[_0x47d3ab(0x8a)](_0x47d3ab(0x93)+_0x5f47f5+_0x47d3ab(0xad),_0x47d3ab(0x9c)+getTopLevelConfigKeySummary());if(_0x5f47f5==='riskLevel')throw CliErrors[_0x47d3ab(0x8a)](_0x47d3ab(0xa9));if(CONFIG_ENUM_VALUES[_0x5f47f5]&&!CONFIG_ENUM_VALUES[_0x5f47f5]['includes'](_0x192dc9))throw CliErrors[_0x47d3ab(0x8a)](_0x47d3ab(0x90)+_0x5f47f5+_0x47d3ab(0x97)+CONFIG_ENUM_VALUES[_0x5f47f5][_0x47d3ab(0x83)](',\x20'));if(_0x5f47f5===_0x47d3ab(0xa2)&&!normalizeLocale(_0x192dc9))throw CliErrors[_0x47d3ab(0x8a)](_0x47d3ab(0x81),_0x47d3ab(0x7d));const _0x4ffd68={'global':_0x7ce4ac[_0x47d3ab(0x8e)](_0x47d3ab(0x7e))},_0xfaa953=resolveWriteScope(_0x4ffd68),_0x309a56=readScopedConfig(_0xfaa953);let _0x592e4a=_0x5f47f5,_0x158a67=_0x192dc9;_0x5f47f5===_0x47d3ab(0x88)&&(_0x592e4a=_0x47d3ab(0x89),delete _0x309a56[_0x47d3ab(0x88)]);_0x5f47f5==='locale'&&(_0x158a67=normalizeLocale(_0x192dc9));if(_0x5f47f5===_0x47d3ab(0xa5)){_0x158a67=normalizeEnv(_0x192dc9);if(!isProduction(_0x158a67)&&!isDaily(_0x158a67))throw CliErrors[_0x47d3ab(0x8a)](_0x47d3ab(0xaa),_0x47d3ab(0xa4));}if(_0x5f47f5===_0x47d3ab(0x89)){const _0x4ffabd=_0x309a56[_0x47d3ab(0x7c)]&&typeof _0x309a56[_0x47d3ab(0x7c)]===_0x47d3ab(0xa1)?Object[_0x47d3ab(0x9f)](_0x309a56[_0x47d3ab(0x7c)]):[];if(_0x4ffabd[_0x47d3ab(0x94)]>0x0)throw CliErrors['validation']('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x158a67+_0x47d3ab(0x96)+CLI_BIN_NAME+_0x47d3ab(0x7b));const _0x4ffc95=buildCanonicalProjectConfig({..._0x309a56},{'appCodes':[_0x158a67],'env':typeof _0x309a56[_0x47d3ab(0xa5)]===_0x47d3ab(0x98)?_0x309a56[_0x47d3ab(0xa5)]:undefined});writeScopedConfig(_0x4ffc95,_0xfaa953);const _0x175ce6=_0xfaa953===_0x47d3ab(0x7e)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x175ce6+_0x47d3ab(0x80)+_0x158a67+_0x47d3ab(0xae)};}_0x309a56[_0x592e4a]=_0x158a67,writeScopedConfig(_0x309a56,_0xfaa953);const _0x3948db=_0xfaa953===_0x47d3ab(0x7e)?_0x47d3ab(0x9e):_0x47d3ab(0x92);return{'ok':!![],'message':'✓\x20'+_0x3948db+'\x20'+_0x592e4a+'\x20set\x20to:\x20'+_0x158a67};}export const configSetDefinition={'service':a53_0x3fa766(0x82),'command':a53_0x3fa766(0x7f),'description':'Set\x20a\x20config\x20value','risk':a53_0x3fa766(0x8b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x3fa766(0x86),'type':a53_0x3fa766(0x98),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x3fa766(0x8c),'type':'string','description':a53_0x3fa766(0xaf),'required':!![]},{'name':a53_0x3fa766(0x7e),'type':a53_0x3fa766(0x84),'description':a53_0x3fa766(0x87),'default':![]}],'execute':execute};
1
+ function a53_0x4206(_0x3aaa81,_0xa6ee68){_0x3aaa81=_0x3aaa81-0x7f;const _0x379e43=a53_0x379e();let _0x42061f=_0x379e43[_0x3aaa81];return _0x42061f;}const a53_0x41d532=a53_0x4206;(function(_0x1b7c30,_0x297801){const _0x586d10=a53_0x4206,_0x15bb66=_0x1b7c30();while(!![]){try{const _0x2d3088=parseInt(_0x586d10(0x98))/0x1+parseInt(_0x586d10(0x99))/0x2*(-parseInt(_0x586d10(0x9a))/0x3)+-parseInt(_0x586d10(0x90))/0x4*(parseInt(_0x586d10(0x86))/0x5)+-parseInt(_0x586d10(0xa0))/0x6+-parseInt(_0x586d10(0x7f))/0x7+parseInt(_0x586d10(0x9b))/0x8+parseInt(_0x586d10(0x8c))/0x9*(parseInt(_0x586d10(0xa2))/0xa);if(_0x2d3088===_0x297801)break;else _0x15bb66['push'](_0x15bb66['shift']());}catch(_0x6e88e8){_0x15bb66['push'](_0x15bb66['shift']());}}}(a53_0x379e,0xadca1));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a53_0x379e(){const _0x1fd395=['env','Global','keys','set','includes','Settable\x20top-level\x20keys:\x20','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Top-level\x20key\x20\x22','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','bool','global','write','Missing\x20value.','1829184RrsmbJ','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','appcode','join','Config\x20value','Set\x20a\x20config\x20value','object','485kttKBz','key','`,\x20`','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x22\x20is\x20not\x20settable.','\x20set\x20to:\x20','20539026hgUTCN','validation','length','str','5692vAJiIa','Use\x20`','Usage:\x20','apps','Project','locale','Missing\x20key.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','1316627tkUCbg','796TutLeA','8952rOVhGI','799808QPWvLW','Invalid\x20value\x20for\x20\x22','string','value','boolean','8399406QNmqeC','app','10tbwEXi'];a53_0x379e=function(){return _0x1fd395;};return a53_0x379e();}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';async function execute(_0x1b1737){const _0x46e9ea=a53_0x4206,_0x5bba00=_0x1b1737['str'](_0x46e9ea(0x87)),_0x29119e=_0x1b1737[_0x46e9ea(0x8f)]('value');if(!_0x5bba00)throw CliErrors[_0x46e9ea(0x8d)](_0x46e9ea(0x96),_0x46e9ea(0x92)+CLI_BIN_NAME+_0x46e9ea(0x80));if(_0x29119e===undefined||_0x29119e==='')throw CliErrors[_0x46e9ea(0x8d)](_0x46e9ea(0xb0),_0x46e9ea(0x92)+CLI_BIN_NAME+_0x46e9ea(0x80));if(_0x29119e[_0x46e9ea(0x8e)]>0x1f4)throw CliErrors[_0x46e9ea(0x8d)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x5bba00))throw CliErrors['validation'](_0x46e9ea(0xab)+_0x5bba00+_0x46e9ea(0x8a),_0x46e9ea(0xa8)+getTopLevelConfigKeySummary());if(_0x5bba00==='riskLevel')throw CliErrors[_0x46e9ea(0x8d)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x5bba00]&&!CONFIG_ENUM_VALUES[_0x5bba00][_0x46e9ea(0xa7)](_0x29119e))throw CliErrors['validation'](_0x46e9ea(0x9c)+_0x5bba00+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x5bba00][_0x46e9ea(0x82)](',\x20'));if(_0x5bba00==='locale'&&!normalizeLocale(_0x29119e))throw CliErrors[_0x46e9ea(0x8d)]('Invalid\x20locale\x20value.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x6383a0={'global':_0x1b1737[_0x46e9ea(0xad)](_0x46e9ea(0xae))},_0x31c3d6=resolveWriteScope(_0x6383a0),_0x1599dc=readScopedConfig(_0x31c3d6);let _0x4d3c43=_0x5bba00,_0x496670=_0x29119e;_0x5bba00===_0x46e9ea(0xa1)&&(_0x4d3c43=_0x46e9ea(0x81),delete _0x1599dc[_0x46e9ea(0xa1)]);_0x5bba00===_0x46e9ea(0x95)&&(_0x496670=normalizeLocale(_0x29119e));if(_0x5bba00===_0x46e9ea(0xa3)){_0x496670=normalizeEnv(_0x29119e);if(!isProduction(_0x496670)&&!isDaily(_0x496670))throw CliErrors['validation'](_0x46e9ea(0x89),_0x46e9ea(0x97));}if(_0x5bba00===_0x46e9ea(0x81)){const _0x4c7b65=_0x1599dc[_0x46e9ea(0x93)]&&typeof _0x1599dc[_0x46e9ea(0x93)]===_0x46e9ea(0x85)?Object[_0x46e9ea(0xa5)](_0x1599dc[_0x46e9ea(0x93)]):[];if(_0x4c7b65[_0x46e9ea(0x8e)]>0x0)throw CliErrors[_0x46e9ea(0x8d)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x46e9ea(0x91)+CLI_BIN_NAME+_0x46e9ea(0xa9)+_0x496670+_0x46e9ea(0x88)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x23233d=buildCanonicalProjectConfig({..._0x1599dc},{'appCodes':[_0x496670],'env':typeof _0x1599dc['env']==='string'?_0x1599dc[_0x46e9ea(0xa3)]:undefined});writeScopedConfig(_0x23233d,_0x31c3d6);const _0x12f128=_0x31c3d6===_0x46e9ea(0xae)?'Global':_0x46e9ea(0x94);return{'ok':!![],'message':'✓\x20'+_0x12f128+'\x20appcode\x20set\x20to:\x20'+_0x496670+_0x46e9ea(0xaa)};}_0x1599dc[_0x4d3c43]=_0x496670,writeScopedConfig(_0x1599dc,_0x31c3d6);const _0x1ad108=_0x31c3d6===_0x46e9ea(0xae)?_0x46e9ea(0xa4):'Project';return{'ok':!![],'message':'✓\x20'+_0x1ad108+'\x20'+_0x4d3c43+_0x46e9ea(0x8b)+_0x496670};}export const configSetDefinition={'service':'config','command':a53_0x41d532(0xa6),'description':a53_0x41d532(0x84),'risk':a53_0x41d532(0xaf),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x41d532(0x87),'type':a53_0x41d532(0x9d),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x41d532(0x9e),'type':a53_0x41d532(0x9d),'description':a53_0x41d532(0x83),'required':!![]},{'name':a53_0x41d532(0xae),'type':a53_0x41d532(0x9f),'description':a53_0x41d532(0xac),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x185198,_0x35720c){var _0x40cdc6=a54_0x194b,_0x4d10c5=_0x185198();while(!![]){try{var _0x1cddb0=parseInt(_0x40cdc6(0x87))/0x1*(-parseInt(_0x40cdc6(0x7e))/0x2)+-parseInt(_0x40cdc6(0x81))/0x3*(-parseInt(_0x40cdc6(0x86))/0x4)+-parseInt(_0x40cdc6(0x7d))/0x5*(-parseInt(_0x40cdc6(0x7f))/0x6)+parseInt(_0x40cdc6(0x88))/0x7*(parseInt(_0x40cdc6(0x84))/0x8)+-parseInt(_0x40cdc6(0x83))/0x9*(-parseInt(_0x40cdc6(0x7c))/0xa)+parseInt(_0x40cdc6(0x85))/0xb+-parseInt(_0x40cdc6(0x89))/0xc;if(_0x1cddb0===_0x35720c)break;else _0x4d10c5['push'](_0x4d10c5['shift']());}catch(_0x2d92ed){_0x4d10c5['push'](_0x4d10c5['shift']());}}}(a54_0xd167,0x23e0a));function a54_0x194b(_0x15405a,_0x9f1cd7){_0x15405a=_0x15405a-0x7a;var _0xd1674c=a54_0xd167();var _0x194bb6=_0xd1674c[_0x15405a];return _0x194bb6;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x3d9fec){var _0x55f1f9=a54_0x194b;if(_0x3d9fec[_0x55f1f9(0x82)])return _0x55f1f9(0x82);if(!isInProject())throw CliErrors[_0x55f1f9(0x80)](_0x55f1f9(0x7b),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return _0x55f1f9(0x7a);}function a54_0xd167(){var _0x18e2c1=['3GLCPNQ','global','9DnbgUk','30440hujRdY','2875554WNWhTo','946472oydkKA','3179VrorbI','77wPVMqT','3848820OBeana','project','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','534710HOvHlH','1195EvJmST','178biAeKG','3948pWVHvR','validation'];a54_0xd167=function(){return _0x18e2c1;};return a54_0xd167();}export function readScopedConfig(_0x184d46){return readConfigFile(resolveWriteConfigPath(_0x184d46));}export function writeScopedConfig(_0x1d452f,_0x1a4d1c){writeConfigFile(resolveWriteConfigPath(_0x1a4d1c),_0x1d452f);}
1
+ function a54_0x13fb(_0x21e945,_0x20a334){_0x21e945=_0x21e945-0x100;var _0x4d9aff=a54_0x4d9a();var _0x13fb3c=_0x4d9aff[_0x21e945];return _0x13fb3c;}(function(_0x4cc19e,_0x3c0031){var _0x496574=a54_0x13fb,_0x388e62=_0x4cc19e();while(!![]){try{var _0x106242=parseInt(_0x496574(0x101))/0x1+parseInt(_0x496574(0x100))/0x2*(-parseInt(_0x496574(0x107))/0x3)+parseInt(_0x496574(0x10e))/0x4+-parseInt(_0x496574(0x103))/0x5*(parseInt(_0x496574(0x109))/0x6)+-parseInt(_0x496574(0x10d))/0x7*(-parseInt(_0x496574(0x105))/0x8)+parseInt(_0x496574(0x10a))/0x9*(-parseInt(_0x496574(0x104))/0xa)+-parseInt(_0x496574(0x10b))/0xb;if(_0x106242===_0x3c0031)break;else _0x388e62['push'](_0x388e62['shift']());}catch(_0x579cce){_0x388e62['push'](_0x388e62['shift']());}}}(a54_0x4d9a,0x40e19));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a54_0x4d9a(){var _0x40d7ab=['434530mEBpxl','21104AllXfV','global','3duhOus','project','562494UllgqZ','72skqOZb','39743Fddamn','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','483YrocMh','1924584PhYOLg','544572fpRTQx','319857SsUBID','validation','5pEMJpe'];a54_0x4d9a=function(){return _0x40d7ab;};return a54_0x4d9a();}export function resolveWriteScope(_0x345dc4){var _0x5063f6=a54_0x13fb;if(_0x345dc4[_0x5063f6(0x106)])return _0x5063f6(0x106);if(!isInProject())throw CliErrors[_0x5063f6(0x102)](_0x5063f6(0x10c),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return _0x5063f6(0x108);}export function readScopedConfig(_0x3c0ffd){return readConfigFile(resolveWriteConfigPath(_0x3c0ffd));}export function writeScopedConfig(_0x87057a,_0xc3630a){writeConfigFile(resolveWriteConfigPath(_0xc3630a),_0x87057a);}
@@ -1 +1 @@
1
- const a55_0x367223=a55_0x42f0;(function(_0x47e52a,_0x47121c){const _0x240036=a55_0x42f0,_0x271546=_0x47e52a();while(!![]){try{const _0x29d83e=parseInt(_0x240036(0x116))/0x1*(-parseInt(_0x240036(0x113))/0x2)+-parseInt(_0x240036(0x115))/0x3+-parseInt(_0x240036(0x108))/0x4*(parseInt(_0x240036(0x114))/0x5)+-parseInt(_0x240036(0x106))/0x6*(-parseInt(_0x240036(0x10c))/0x7)+parseInt(_0x240036(0x10f))/0x8*(parseInt(_0x240036(0x10e))/0x9)+parseInt(_0x240036(0x110))/0xa+-parseInt(_0x240036(0x10d))/0xb*(-parseInt(_0x240036(0x10b))/0xc);if(_0x29d83e===_0x47121c)break;else _0x271546['push'](_0x271546['shift']());}catch(_0x5c5591){_0x271546['push'](_0x271546['shift']());}}}(a55_0x3f6d,0x3b286));function a55_0x3f6d(){const _0x341d8d=['356094iZjbCg','8xqgqTK','1605730VreLDl','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','523062RRuSeP','10DghUZu','210615bbzVLo','1XzzBML','46974UJVPDe','Filter\x20dataset\x20records\x20with\x20query\x20conditions','254288UeRZks','filter','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','12oRseIM','210qaTJWb','2927991pmtrgA'];a55_0x3f6d=function(){return _0x341d8d;};return a55_0x3f6d();}function a55_0x42f0(_0x5a8d6c,_0x54611e){_0x5a8d6c=_0x5a8d6c-0x106;const _0x3f6db6=a55_0x3f6d();let _0x42f04d=_0x3f6db6[_0x5a8d6c];return _0x42f04d;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a55_0x367223(0x109),'operation':a55_0x367223(0x109),'description':a55_0x367223(0x107),'paramsRequired':![],'paramsHint':a55_0x367223(0x112),'helpExtra':[a55_0x367223(0x111),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a55_0x367223(0x10a),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page']['join']('\x0a')});
1
+ const a55_0x375bd4=a55_0x22ec;(function(_0x4f2022,_0xabd27){const _0x355fc5=a55_0x22ec,_0x455cb7=_0x4f2022();while(!![]){try{const _0x33cc15=parseInt(_0x355fc5(0x85))/0x1*(-parseInt(_0x355fc5(0x87))/0x2)+-parseInt(_0x355fc5(0x7f))/0x3+-parseInt(_0x355fc5(0x7c))/0x4+parseInt(_0x355fc5(0x80))/0x5*(-parseInt(_0x355fc5(0x7d))/0x6)+-parseInt(_0x355fc5(0x83))/0x7+-parseInt(_0x355fc5(0x84))/0x8+parseInt(_0x355fc5(0x86))/0x9*(parseInt(_0x355fc5(0x7b))/0xa);if(_0x33cc15===_0xabd27)break;else _0x455cb7['push'](_0x455cb7['shift']());}catch(_0x4ff1fc){_0x455cb7['push'](_0x455cb7['shift']());}}}(a55_0x580a,0x5b4c5));import{buildDataCommand}from'../../commands/data/shared.js';function a55_0x22ec(_0x3976f7,_0x15a701){_0x3976f7=_0x3976f7-0x78;const _0x580a80=a55_0x580a();let _0x22ec6d=_0x580a80[_0x3976f7];return _0x22ec6d;}export const dataFilter=buildDataCommand({'command':a55_0x375bd4(0x7e),'operation':a55_0x375bd4(0x7e),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a55_0x375bd4(0x79),'helpExtra':[a55_0x375bd4(0x82),a55_0x375bd4(0x81),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a55_0x375bd4(0x7a),a55_0x375bd4(0x78)]['join']('\x0a')});function a55_0x580a(){const _0x53a75d=['4727808sOkwNX','66MSYAHM','18pzfGPZ','21568zoqWkh','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','14346760zWXoNA','454272OeSGMX','12GsApWL','filter','2044707fbuINP','829275tEfbZc','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','460796juvapf'];a55_0x580a=function(){return _0x53a75d;};return a55_0x580a();}
@@ -1 +1 @@
1
- const a56_0x3ec3c4=a56_0x1ea6;(function(_0x3497de,_0x568a5d){const _0x481aa1=a56_0x1ea6,_0x525e16=_0x3497de();while(!![]){try{const _0x4a8c1e=-parseInt(_0x481aa1(0x17e))/0x1*(parseInt(_0x481aa1(0x17b))/0x2)+parseInt(_0x481aa1(0x177))/0x3*(parseInt(_0x481aa1(0x180))/0x4)+parseInt(_0x481aa1(0x181))/0x5*(parseInt(_0x481aa1(0x179))/0x6)+parseInt(_0x481aa1(0x17a))/0x7+parseInt(_0x481aa1(0x182))/0x8+-parseInt(_0x481aa1(0x17c))/0x9+-parseInt(_0x481aa1(0x17f))/0xa;if(_0x4a8c1e===_0x568a5d)break;else _0x525e16['push'](_0x525e16['shift']());}catch(_0x281bbf){_0x525e16['push'](_0x525e16['shift']());}}}(a56_0x46a0,0x57dcb));import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x46a0(){const _0x4c50f8=['165SWtbPI','3051784FiNZwK','3EghZat','getOne','129852iCuSvT','25851WsDwFs','268420bxSNqK','2377107ryLSZe','Get\x20a\x20single\x20record\x20by\x20ID','3sNMEis','6594990RWnJhu','2347132ZMrovz'];a56_0x46a0=function(){return _0x4c50f8;};return a56_0x46a0();}function a56_0x1ea6(_0x481ea7,_0x342654){_0x481ea7=_0x481ea7-0x177;const _0x46a0d3=a56_0x46a0();let _0x1ea66f=_0x46a0d3[_0x481ea7];return _0x1ea66f;}export const dataGetOne=buildDataCommand({'command':a56_0x3ec3c4(0x178),'operation':a56_0x3ec3c4(0x178),'description':a56_0x3ec3c4(0x17d),'paramsRequired':!![],'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'});
1
+ function a56_0x8a86(_0x24de81,_0x5c963b){_0x24de81=_0x24de81-0x16a;const _0x298e1c=a56_0x298e();let _0x8a865=_0x298e1c[_0x24de81];return _0x8a865;}const a56_0x49dde9=a56_0x8a86;(function(_0x501c47,_0x965d8a){const _0x13f424=a56_0x8a86,_0x268e9d=_0x501c47();while(!![]){try{const _0x5ce32e=parseInt(_0x13f424(0x16e))/0x1+-parseInt(_0x13f424(0x16f))/0x2*(-parseInt(_0x13f424(0x176))/0x3)+-parseInt(_0x13f424(0x170))/0x4*(-parseInt(_0x13f424(0x171))/0x5)+-parseInt(_0x13f424(0x16a))/0x6*(-parseInt(_0x13f424(0x175))/0x7)+-parseInt(_0x13f424(0x16d))/0x8+parseInt(_0x13f424(0x16b))/0x9+-parseInt(_0x13f424(0x16c))/0xa;if(_0x5ce32e===_0x965d8a)break;else _0x268e9d['push'](_0x268e9d['shift']());}catch(_0x442369){_0x268e9d['push'](_0x268e9d['shift']());}}}(a56_0x298e,0x6caed));import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x298e(){const _0x33d4cd=['2300zXNHbK','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','getOne','Get\x20a\x20single\x20record\x20by\x20ID','1895383nqkTsQ','3MpOswM','18ZzfVus','2941758nJhmRa','8932560kcziLm','6355928JwEABK','307320keVRmT','1261526bPkqHf','484LjtkvZ'];a56_0x298e=function(){return _0x33d4cd;};return a56_0x298e();}export const dataGetOne=buildDataCommand({'command':a56_0x49dde9(0x173),'operation':'getOne','description':a56_0x49dde9(0x174),'paramsRequired':!![],'paramsHint':a56_0x49dde9(0x172)});
@@ -1 +1 @@
1
- (function(_0x51b1ee,_0x55c5bf){const _0x3fdaaa=a57_0x110d,_0x6af5f=_0x51b1ee();while(!![]){try{const _0x375a05=parseInt(_0x3fdaaa(0xa8))/0x1*(parseInt(_0x3fdaaa(0xa4))/0x2)+parseInt(_0x3fdaaa(0xa7))/0x3+-parseInt(_0x3fdaaa(0xaa))/0x4*(parseInt(_0x3fdaaa(0xa5))/0x5)+-parseInt(_0x3fdaaa(0xac))/0x6+-parseInt(_0x3fdaaa(0xa9))/0x7+-parseInt(_0x3fdaaa(0xab))/0x8+-parseInt(_0x3fdaaa(0xad))/0x9*(-parseInt(_0x3fdaaa(0xa6))/0xa);if(_0x375a05===_0x55c5bf)break;else _0x6af5f['push'](_0x6af5f['shift']());}catch(_0x2af2ec){_0x6af5f['push'](_0x6af5f['shift']());}}}(a57_0x28f0,0xed829));function a57_0x110d(_0xd4a6b9,_0x2bcc11){_0xd4a6b9=_0xd4a6b9-0xa4;const _0x28f0af=a57_0x28f0();let _0x110de3=_0x28f0af[_0xd4a6b9];return _0x110de3;}import{dataFilter}from'../../commands/data/filter.js';function a57_0x28f0(){const _0x2056bc=['102398NCQtVR','5wvFzoY','10BxnQRX','4629006mEHYsQ','12rroGFc','5540367AejOMW','6921736KMqxHs','14680184epkuML','7077900YKucfD','39168351DvHYjQ'];a57_0x28f0=function(){return _0x2056bc;};return a57_0x28f0();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
1
+ (function(_0x17b999,_0x424ef2){const _0x3c6413=a57_0x4b6d,_0x250620=_0x17b999();while(!![]){try{const _0x1f46ad=parseInt(_0x3c6413(0x1a6))/0x1+parseInt(_0x3c6413(0x1a1))/0x2*(parseInt(_0x3c6413(0x1a3))/0x3)+parseInt(_0x3c6413(0x1a2))/0x4*(parseInt(_0x3c6413(0x1a4))/0x5)+-parseInt(_0x3c6413(0x19f))/0x6+parseInt(_0x3c6413(0x1a5))/0x7+-parseInt(_0x3c6413(0x1a0))/0x8+parseInt(_0x3c6413(0x1a7))/0x9;if(_0x1f46ad===_0x424ef2)break;else _0x250620['push'](_0x250620['shift']());}catch(_0x81eb1a){_0x250620['push'](_0x250620['shift']());}}}(a57_0x38e0,0x958ca));import{dataFilter}from'../../commands/data/filter.js';function a57_0x4b6d(_0x19387d,_0x17cef8){_0x19387d=_0x19387d-0x19f;const _0x38e09d=a57_0x38e0();let _0x4b6dd7=_0x38e09d[_0x19387d];return _0x4b6dd7;}function a57_0x38e0(){const _0xf75f9=['12gkPdpN','79302qASNUA','1821025MlpJYj','1223621OrKKMY','620515HShYLk','743742oWuNhr','3263712soqAVf','8627240iOyhCU','20BTLrHf'];a57_0x38e0=function(){return _0xf75f9;};return a57_0x38e0();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- function a58_0x52df(){const _0x5b6821=['Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','params','data\x20','705872ApjUJu','\x20completed\x20in\x20','762660UkADJj','read','getOne','28UmrtPV','now','compress','helpExtra','1253612yKovQY','paramsRequired','211720monirX','validation','248161wppXfF','2IVvAbS','string','alias','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','flagMissing','command','str','180CloscJ','code','paramsHint','appCode','915882FQazEi','description','358758MAMBQM'];a58_0x52df=function(){return _0x5b6821;};return a58_0x52df();}(function(_0x380a8d,_0x583995){const _0x4b4b9d=a58_0x3607,_0x39c4cd=_0x380a8d();while(!![]){try{const _0x57ea24=-parseInt(_0x4b4b9d(0x116))/0x1+parseInt(_0x4b4b9d(0x117))/0x2*(parseInt(_0x4b4b9d(0x122))/0x3)+-parseInt(_0x4b4b9d(0x112))/0x4+-parseInt(_0x4b4b9d(0x10b))/0x5+-parseInt(_0x4b4b9d(0x105))/0x6*(-parseInt(_0x4b4b9d(0x10e))/0x7)+-parseInt(_0x4b4b9d(0x109))/0x8+-parseInt(_0x4b4b9d(0x11e))/0x9*(-parseInt(_0x4b4b9d(0x114))/0xa);if(_0x57ea24===_0x583995)break;else _0x39c4cd['push'](_0x39c4cd['shift']());}catch(_0x2f1629){_0x39c4cd['push'](_0x39c4cd['shift']());}}}(a58_0x52df,0x286c8));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a58_0x3607(_0x28a6ee,_0x1c4690){_0x28a6ee=_0x28a6ee-0x105;const _0x52dfce=a58_0x52df();let _0x3607b8=_0x52dfce[_0x28a6ee];return _0x3607b8;}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0xb7fb04){const _0xedf69=a58_0x3607;if(!_0xb7fb04)throw CliErrors[_0xedf69(0x11b)](_0xedf69(0x107),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x42a8f4=_0xb7fb04['id'];if(_0x42a8f4===undefined||_0x42a8f4===null||_0x42a8f4==='')throw CliErrors[_0xedf69(0x115)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0xedf69(0x11a));}function parseCommandParams(_0x3d4486){return parseJsonParams(_0x3d4486)??{};}export function buildDataCommand(_0x1fa342){const _0x5cd898=a58_0x3607,_0x5b4fcd=_0x5cd898(0x106);return{'service':'data','command':_0x1fa342['command'],'description':_0x1fa342[_0x5cd898(0x123)],'risk':_0x5cd898(0x10c),'defaultOutputFormat':_0x5cd898(0x110),'helpExtra':_0x1fa342[_0x5cd898(0x111)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x5cd898(0x119),'type':_0x5cd898(0x118),'description':_0x5b4fcd},{'name':_0x5cd898(0x107),'type':_0x5cd898(0x118),'description':_0x1fa342['paramsHint']}],async 'validate'(_0x2788c3){const _0x199dca=_0x5cd898,_0x159bf1=_0x2788c3[_0x199dca(0x11d)](_0x199dca(0x107));if(_0x1fa342[_0x199dca(0x113)]&&!_0x159bf1)throw CliErrors[_0x199dca(0x11b)](_0x199dca(0x107),_0x1fa342[_0x199dca(0x120)]);const _0x4a8f14=parseJsonParams(_0x159bf1);_0x1fa342['operation']===_0x199dca(0x10d)&&assertGetOneId(_0x4a8f14);},async 'execute'(_0x5a06fa){const _0x2ba8da=_0x5cd898,_0x138d22=parseCommandParams(_0x5a06fa['str']('params')),_0x771802=Date[_0x2ba8da(0x10f)](),_0x24dd72=await executeDatasetDataOperation(_0x5a06fa[_0x2ba8da(0x121)],_0x5a06fa[_0x2ba8da(0x11d)](_0x2ba8da(0x11f)),_0x1fa342['operation'],_0x138d22),_0x473472=Date[_0x2ba8da(0x10f)]()-_0x771802;return{'ok':!![],'data':{'result':_0x24dd72,'elapsed':_0x473472},'message':_0x2ba8da(0x108)+_0x1fa342[_0x2ba8da(0x11c)]+_0x2ba8da(0x10a)+_0x473472+'ms'};}};}
1
+ (function(_0x207a7f,_0x207e39){const _0x364926=a58_0x2204,_0x27f85a=_0x207a7f();while(!![]){try{const _0xc77cb8=-parseInt(_0x364926(0x1ba))/0x1+parseInt(_0x364926(0x1b0))/0x2+parseInt(_0x364926(0x1b1))/0x3+-parseInt(_0x364926(0x1a8))/0x4+parseInt(_0x364926(0x1ad))/0x5+parseInt(_0x364926(0x1c0))/0x6+-parseInt(_0x364926(0x1b5))/0x7;if(_0xc77cb8===_0x207e39)break;else _0x27f85a['push'](_0x27f85a['shift']());}catch(_0x336871){_0x27f85a['push'](_0x27f85a['shift']());}}}(a58_0x3036,0x3ffd3));function a58_0x3036(){const _0x1ecd1c=['data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','params','description','now','1283988yDhqHH','\x20completed\x20in\x20','appCode','validation','paramsRequired','1775510DhHTJu','string','read','501372KjSMCa','1477419tzhPgR','command','alias','flagMissing','1709106TiSeAg','helpExtra','code','operation','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','334531femBnd','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','paramsHint','compress','data\x20','str','381144IJEHra'];a58_0x3036=function(){return _0x1ecd1c;};return a58_0x3036();}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function a58_0x2204(_0x256c8,_0xd11ee2){_0x256c8=_0x256c8-0x1a8;const _0x3036e5=a58_0x3036();let _0x22042a=_0x3036e5[_0x256c8];return _0x22042a;}function assertGetOneId(_0x5f1ec2){const _0x4418cf=a58_0x2204;if(!_0x5f1ec2)throw CliErrors[_0x4418cf(0x1b4)](_0x4418cf(0x1c2),_0x4418cf(0x1b9));const _0x1f649f=_0x5f1ec2['id'];if(_0x1f649f===undefined||_0x1f649f===null||_0x1f649f==='')throw CliErrors[_0x4418cf(0x1ab)](_0x4418cf(0x1c1),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x30b2de){return parseJsonParams(_0x30b2de)??{};}export function buildDataCommand(_0x654e94){const _0x5b5713=a58_0x2204,_0x57a033=_0x5b5713(0x1bb);return{'service':'data','command':_0x654e94[_0x5b5713(0x1b2)],'description':_0x654e94[_0x5b5713(0x1c3)],'risk':_0x5b5713(0x1af),'defaultOutputFormat':_0x5b5713(0x1bd),'helpExtra':_0x654e94[_0x5b5713(0x1b6)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x5b5713(0x1b3),'type':'string','description':_0x57a033},{'name':_0x5b5713(0x1c2),'type':_0x5b5713(0x1ae),'description':_0x654e94[_0x5b5713(0x1bc)]}],async 'validate'(_0x103eb9){const _0x348f39=_0x5b5713,_0x21353d=_0x103eb9[_0x348f39(0x1bf)](_0x348f39(0x1c2));if(_0x654e94[_0x348f39(0x1ac)]&&!_0x21353d)throw CliErrors[_0x348f39(0x1b4)](_0x348f39(0x1c2),_0x654e94[_0x348f39(0x1bc)]);const _0x452016=parseJsonParams(_0x21353d);_0x654e94['operation']==='getOne'&&assertGetOneId(_0x452016);},async 'execute'(_0x2abc5e){const _0x425e54=_0x5b5713,_0x1425bf=parseCommandParams(_0x2abc5e['str']('params')),_0x4c78f3=Date[_0x425e54(0x1c4)](),_0x2ef517=await executeDatasetDataOperation(_0x2abc5e[_0x425e54(0x1aa)],_0x2abc5e[_0x425e54(0x1bf)](_0x425e54(0x1b7)),_0x654e94[_0x425e54(0x1b8)],_0x1425bf),_0x48ac23=Date['now']()-_0x4c78f3;return{'ok':!![],'data':{'result':_0x2ef517,'elapsed':_0x48ac23},'message':_0x425e54(0x1be)+_0x654e94['command']+_0x425e54(0x1a9)+_0x48ac23+'ms'};}};}
@@ -1 +1 @@
1
- const a59_0xb60c4a=a59_0x1a62;(function(_0x32d1e3,_0x3f8add){const _0x4ab942=a59_0x1a62,_0x2bb697=_0x32d1e3();while(!![]){try{const _0x16ccbd=parseInt(_0x4ab942(0x184))/0x1+parseInt(_0x4ab942(0x197))/0x2*(-parseInt(_0x4ab942(0x17f))/0x3)+parseInt(_0x4ab942(0x19c))/0x4+-parseInt(_0x4ab942(0x18f))/0x5+parseInt(_0x4ab942(0x192))/0x6+-parseInt(_0x4ab942(0x189))/0x7+parseInt(_0x4ab942(0x17e))/0x8;if(_0x16ccbd===_0x3f8add)break;else _0x2bb697['push'](_0x2bb697['shift']());}catch(_0x10756f){_0x2bb697['push'](_0x2bb697['shift']());}}}(a59_0x45e5,0x9dbf4));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0xb60c4a(0x19d);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x1e4bd4,input:_0x24af6c,dryRun:_0x1237dc}){const _0x878efb=a59_0xb60c4a;validateInput(_0x24af6c);const _0x5979e6=normalizeBusinessGroup(_0x24af6c[_0x878efb(0x16e)]),_0x46e7b1=await getDatasetDetail(_0x24af6c[_0x878efb(0x160)]),_0x129252=resolveBusinessGroupDataset(_0x46e7b1,_0x24af6c[_0x878efb(0x160)]),_0x58e329=loadCurrentBusinessGroup(_0x46e7b1,_0x129252);assertExpectedBusinessGroup(_0x58e329,_0x24af6c[_0x878efb(0x181)]);const _0x4ab2b7=buildBackendPayload(_0x1e4bd4,_0x129252,_0x5979e6),_0x2526e9=_0x58e329!==_0x5979e6;let _0x8862b;if(_0x2526e9&&!_0x1237dc){await updateErBusinessGroup(_0x4ab2b7);const _0x1337ce=await getDatasetDetail(_0x129252[_0x878efb(0x160)]),_0x42f0f4=resolveBusinessGroupDataset(_0x1337ce,_0x129252['code']),_0x499876=loadCurrentBusinessGroup(_0x1337ce,_0x42f0f4);if(_0x499876!==_0x5979e6)throw CliErrors[_0x878efb(0x171)](_0x878efb(0x187),_0x878efb(0x170)+JSON[_0x878efb(0x17c)](_0x5979e6)+_0x878efb(0x18b)+JSON[_0x878efb(0x17c)](_0x499876)+'.');_0x8862b={'verified':!![],'status':_0x878efb(0x18e),'afterReadback':{'businessGroup':_0x499876}};}else!_0x2526e9&&(_0x8862b={'verified':!![],'status':_0x878efb(0x190),'afterReadback':{'businessGroup':_0x58e329}});const _0x203cc7={'operation':_0x878efb(0x17a),'appCode':_0x1e4bd4,'selector':{'code':_0x129252[_0x878efb(0x160)]},'dataset':_0x129252,'before':{'businessGroup':_0x58e329},'after':{'businessGroup':_0x5979e6},'changed':_0x2526e9,'dryRun':_0x1237dc,'submitted':_0x2526e9&&!_0x1237dc,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x4ab2b7},..._0x8862b?{'verification':_0x8862b}:{},'warnings':[]};return{'ok':!![],'data':_0x203cc7,'message':_0x2526e9?_0x1237dc?_0x878efb(0x16b)+_0x129252['code']:_0x878efb(0x188)+_0x129252[_0x878efb(0x160)]:_0x878efb(0x196)+_0x129252['code']};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a59_0xb60c4a(0x177),'description':a59_0xb60c4a(0x173),'risk':a59_0xb60c4a(0x179),'flags':[CODE_FLAG,{'name':a59_0xb60c4a(0x183),'type':a59_0xb60c4a(0x180),'required':!![],'description':a59_0xb60c4a(0x176)},{'name':a59_0xb60c4a(0x168),'type':a59_0xb60c4a(0x180),'required':![],'description':a59_0xb60c4a(0x161)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1eaea4){validateInput(readBusinessGroupUpdateInput(_0x1eaea4));},async 'dryRun'(_0x5c798a){const _0x56ec78=a59_0xb60c4a,_0x43f444=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x5c798a[_0x56ec78(0x16a)],'input':readBusinessGroupUpdateInput(_0x5c798a),'dryRun':!![]});return{'method':_0x56ec78(0x19b),'url':BACKEND_PATH,'body':_0x43f444[_0x56ec78(0x17d)][_0x56ec78(0x175)][_0x56ec78(0x198)],'description':_0x43f444[_0x56ec78(0x18c)],..._0x43f444['data']};},async 'execute'(_0x5a4c10){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x5a4c10['appCode'],'input':readBusinessGroupUpdateInput(_0x5a4c10),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1453b1){const _0x64a489=a59_0xb60c4a,_0x33407b=_0x1453b1[_0x64a489(0x178)](_0x64a489(0x168));return{'code':trim(_0x1453b1[_0x64a489(0x178)](_0x64a489(0x160))),'businessGroup':_0x1453b1[_0x64a489(0x178)]('business-group'),'expectBusinessGroup':_0x33407b===undefined||_0x33407b===''?undefined:_0x33407b};}function validateInput(_0x227140){const _0x46c863=a59_0xb60c4a;if(!trim(_0x227140[_0x46c863(0x160)]))throw CliErrors[_0x46c863(0x18d)]('--code\x20is\x20required');if(_0x227140[_0x46c863(0x16e)]===undefined)throw CliErrors[_0x46c863(0x18d)](_0x46c863(0x169));}function resolveBusinessGroupDataset(_0x512641,_0x390ea5){const _0x19b7ba=a59_0xb60c4a,_0x1614f8=asPlainObject(_0x512641[_0x19b7ba(0x19e)]),_0x22cc1d=asPlainObject(_0x512641['dbtableConfig']),_0x21c4f1=resolveSourceType(_0x512641,_0x1614f8,_0x22cc1d),_0xc800f0=firstString(_0x512641[_0x19b7ba(0x19a)],_0x512641['code'],_0x1614f8[_0x19b7ba(0x199)],_0x390ea5)||_0x390ea5;return{'id':firstNumber(_0x512641[_0x19b7ba(0x191)],_0x512641['id'],_0x1614f8['datasetId'])??firstString(_0x512641[_0x19b7ba(0x191)],_0x512641['id'],_0x1614f8['datasetId'])??null,'code':_0xc800f0,'name':firstString(_0x512641[_0x19b7ba(0x16f)],_0x1614f8['datasetName'],_0x1614f8[_0x19b7ba(0x16f)])||null,'sourceType':_0x21c4f1};}function resolveSourceType(_0x5d5a10,_0xde4271,_0x27645e){const _0x1dec81=a59_0xb60c4a,_0x25bba0=firstString(_0x5d5a10[_0x1dec81(0x172)],_0x5d5a10['sourceType'],_0xde4271[_0x1dec81(0x172)],_0xde4271[_0x1dec81(0x16d)])?.['trim']()[_0x1dec81(0x17b)]();if(_0x25bba0===_0x1dec81(0x163)||_0x25bba0==='METADATA')return _0x25bba0;if(Object[_0x1dec81(0x182)](_0x27645e)[_0x1dec81(0x194)]>0x0)return _0x1dec81(0x163);throw CliErrors[_0x1dec81(0x18d)](_0x1dec81(0x174));}function a59_0x1a62(_0x3c46bc,_0x5148c1){_0x3c46bc=_0x3c46bc-0x160;const _0x45e527=a59_0x45e5();let _0x1a6232=_0x45e527[_0x3c46bc];return _0x1a6232;}function loadCurrentBusinessGroup(_0x5b6f1d,_0x29a352){const _0x229898=a59_0xb60c4a,_0x4f990a=readBusinessGroupFromDatasetDetail(_0x5b6f1d,_0x29a352[_0x229898(0x16d)]);if(_0x4f990a[_0x229898(0x16c)])return normalizeBusinessGroup(_0x4f990a[_0x229898(0x167)]);if(_0x29a352['sourceType']==='METADATA')return'';throw CliErrors[_0x229898(0x18d)](_0x229898(0x164),_0x229898(0x166));}function readBusinessGroupFromDatasetDetail(_0x4e6dc5,_0x1b5212){const _0xd2938d=a59_0xb60c4a,_0x3842c8=asPlainObject(_0x4e6dc5[_0xd2938d(0x19e)]),_0x22239a=firstPresent(_0x4e6dc5[_0xd2938d(0x16e)]);if(_0x22239a['found'])return _0x22239a;const _0x4344d2=firstPresent(_0x3842c8[_0xd2938d(0x16e)]);if(_0x4344d2[_0xd2938d(0x16c)])return _0x4344d2;if(_0x1b5212===_0xd2938d(0x163))return{'found':![]};const _0x462fdc=readBusinessGroupFromExtend(_0x4e6dc5[_0xd2938d(0x162)]);if(_0x462fdc['found'])return _0x462fdc;return readBusinessGroupFromExtend(_0x3842c8['extend']);}function readBusinessGroupFromExtend(_0x5501b9){const _0x25e814=a59_0xb60c4a;if(_0x5501b9===undefined||_0x5501b9===null||_0x5501b9==='')return{'found':![]};if(typeof _0x5501b9===_0x25e814(0x180))try{const _0x2a0b48=JSON[_0x25e814(0x165)](_0x5501b9);return readBusinessGroupFromExtend(_0x2a0b48);}catch{return{'found':![]};}const _0x4e46e0=asPlainObject(_0x5501b9);if(Object['prototype']['hasOwnProperty'][_0x25e814(0x193)](_0x4e46e0,_0x25e814(0x16e)))return{'found':!![],'value':_0x4e46e0['businessGroup']};return{'found':![]};}function firstPresent(..._0x8c0d24){for(const _0x34ab43 of _0x8c0d24){if(_0x34ab43!==undefined&&_0x34ab43!==null)return{'found':!![],'value':_0x34ab43};}return{'found':![]};}function assertExpectedBusinessGroup(_0x270d13,_0x45e7ac){const _0x2f4f95=a59_0xb60c4a;if(_0x45e7ac===undefined)return;const _0x228958=normalizeBusinessGroup(_0x45e7ac);if(_0x270d13!==_0x228958)throw CliErrors[_0x2f4f95(0x18d)](_0x2f4f95(0x195),'Expected\x20'+JSON[_0x2f4f95(0x17c)](_0x228958)+',\x20actual\x20'+JSON['stringify'](_0x270d13));}function buildBackendPayload(_0x1521ce,_0x2acc35,_0x45245a){return{'appCode':_0x1521ce,'datasetCode':_0x2acc35['code'],'businessGroup':_0x45245a};}function a59_0x45e5(){const _0x392ce9=['expectBusinessGroup','keys','business-group','462182KJsoCO','trim','number','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','7481789laFVPQ','isFinite',',\x20actual\x20','message','validation','matched','3119935JSZszj','unchanged','modelId','6532872DynCfc','call','length','Expectation\x20mismatch\x20at\x20businessGroup','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','2pNTQns','payload','datasetCode','modelCode','POST','4554652tVmgVJ','/smartapi/question/er-config/business-group/edit','dataset','code','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','extend','DB_TABLE','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','parse','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','value','expect-business-group','--business-group\x20is\x20required','appCode','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','found','sourceType','businessGroup','name','Expected\x20','apiError','source','Update\x20business\x20scenario\x20group','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','backend','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','business-group-update','str','write','update','toUpperCase','stringify','data','832680UCLjeS','1364388HxLLHx','string'];a59_0x45e5=function(){return _0x392ce9;};return a59_0x45e5();}function normalizeBusinessGroup(_0x54b392){const _0x427ba4=a59_0xb60c4a;if(_0x54b392===undefined||_0x54b392===null)return'';return String(_0x54b392)[_0x427ba4(0x185)]();}function asPlainObject(_0x3e1d70){if(!_0x3e1d70||typeof _0x3e1d70!=='object'||Array['isArray'](_0x3e1d70))return{};return _0x3e1d70;}function firstString(..._0x50e096){const _0x4fc723=a59_0xb60c4a;for(const _0x45bee1 of _0x50e096){if(typeof _0x45bee1==='string'&&_0x45bee1[_0x4fc723(0x185)]())return _0x45bee1[_0x4fc723(0x185)]();if(typeof _0x45bee1===_0x4fc723(0x186)&&Number['isFinite'](_0x45bee1))return String(_0x45bee1);}return undefined;}function firstNumber(..._0x2d1cf0){const _0x1681bf=a59_0xb60c4a;for(const _0x32b53d of _0x2d1cf0){if(typeof _0x32b53d===_0x1681bf(0x186)&&Number[_0x1681bf(0x18a)](_0x32b53d))return _0x32b53d;if(typeof _0x32b53d===_0x1681bf(0x180)&&_0x32b53d[_0x1681bf(0x185)]()&&Number[_0x1681bf(0x18a)](Number(_0x32b53d)))return Number(_0x32b53d);}return null;}function trim(_0x22fac0){const _0x29eac9=a59_0xb60c4a;return String(_0x22fac0||'')[_0x29eac9(0x185)]();}
1
+ function a59_0x3715(_0x432fbd,_0xba0d71){_0x432fbd=_0x432fbd-0x18f;const _0x2212a9=a59_0x2212();let _0x3715cf=_0x2212a9[_0x432fbd];return _0x3715cf;}const a59_0x366214=a59_0x3715;(function(_0xecc696,_0xf207dc){const _0x580627=a59_0x3715,_0x10bd14=_0xecc696();while(!![]){try{const _0x5834f8=parseInt(_0x580627(0x1b6))/0x1+parseInt(_0x580627(0x1ad))/0x2+-parseInt(_0x580627(0x18f))/0x3+-parseInt(_0x580627(0x1a3))/0x4+-parseInt(_0x580627(0x1c3))/0x5+-parseInt(_0x580627(0x19e))/0x6+parseInt(_0x580627(0x1a7))/0x7*(parseInt(_0x580627(0x1bc))/0x8);if(_0x5834f8===_0xf207dc)break;else _0x10bd14['push'](_0x10bd14['shift']());}catch(_0x2a340f){_0x10bd14['push'](_0x10bd14['shift']());}}}(a59_0x2212,0xc28ae));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x366214(0x1bb);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x150dfb,input:_0x3e0e9e,dryRun:_0x479643}){const _0x5d467e=a59_0x366214;validateInput(_0x3e0e9e);const _0x1e3f56=normalizeBusinessGroup(_0x3e0e9e[_0x5d467e(0x19c)]),_0x23730e=await getDatasetDetail(_0x3e0e9e[_0x5d467e(0x197)]),_0x357207=resolveBusinessGroupDataset(_0x23730e,_0x3e0e9e[_0x5d467e(0x197)]),_0x139e7d=loadCurrentBusinessGroup(_0x23730e,_0x357207);assertExpectedBusinessGroup(_0x139e7d,_0x3e0e9e[_0x5d467e(0x1bd)]);const _0x5787a2=buildBackendPayload(_0x150dfb,_0x357207,_0x1e3f56),_0x3c5e29=_0x139e7d!==_0x1e3f56;let _0x10fe62;if(_0x3c5e29&&!_0x479643){await updateErBusinessGroup(_0x5787a2);const _0x3d81de=await getDatasetDetail(_0x357207[_0x5d467e(0x197)]),_0x4d4515=resolveBusinessGroupDataset(_0x3d81de,_0x357207[_0x5d467e(0x197)]),_0x440217=loadCurrentBusinessGroup(_0x3d81de,_0x4d4515);if(_0x440217!==_0x1e3f56)throw CliErrors['apiError']('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x5d467e(0x1ae)+JSON['stringify'](_0x1e3f56)+_0x5d467e(0x1a4)+JSON[_0x5d467e(0x1ab)](_0x440217)+'.');_0x10fe62={'verified':!![],'status':_0x5d467e(0x1aa),'afterReadback':{'businessGroup':_0x440217}};}else!_0x3c5e29&&(_0x10fe62={'verified':!![],'status':_0x5d467e(0x1b5),'afterReadback':{'businessGroup':_0x139e7d}});const _0x4315ce={'operation':'update','appCode':_0x150dfb,'selector':{'code':_0x357207['code']},'dataset':_0x357207,'before':{'businessGroup':_0x139e7d},'after':{'businessGroup':_0x1e3f56},'changed':_0x3c5e29,'dryRun':_0x479643,'submitted':_0x3c5e29&&!_0x479643,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x5787a2},..._0x10fe62?{'verification':_0x10fe62}:{},'warnings':[]};return{'ok':!![],'data':_0x4315ce,'message':_0x3c5e29?_0x479643?_0x5d467e(0x1b1)+_0x357207[_0x5d467e(0x197)]:_0x5d467e(0x1af)+_0x357207['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x357207[_0x5d467e(0x197)]};}function a59_0x2212(){const _0x2f6dd3=['Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','number','found','/smartapi/question/er-config/business-group/edit','32SigOvR','expectBusinessGroup','METADATA','dataset','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','isArray','object','4523650QBtZtu','extend','backend','Update\x20business\x20scenario\x20group','message','string','toUpperCase','appCode','2689608vBrANh','datasetCode','isFinite','data','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','source','trim','datasetId','code','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','modelId','DB_TABLE','hasOwnProperty','businessGroup','modelCode','5009034IxCvPU','name','length','sourceType','keys','5767056PjGzgq',',\x20actual\x20','validation','POST','7057183nxwGSY','business-group','--business-group\x20is\x20required','matched','stringify','payload','1084914OMJZQT','Expected\x20','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','business-group-update','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','datasetName','str','expect-business-group','unchanged','299582OiSJJP','Expectation\x20mismatch\x20at\x20businessGroup'];a59_0x2212=function(){return _0x2f6dd3;};return a59_0x2212();}export const datasetBusinessGroupUpdate={'service':a59_0x366214(0x1bf),'command':a59_0x366214(0x1b0),'description':a59_0x366214(0x1c6),'risk':'write','flags':[CODE_FLAG,{'name':a59_0x366214(0x1a8),'type':'string','required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it'},{'name':'expect-business-group','type':'string','required':![],'description':a59_0x366214(0x1b8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x24444c){validateInput(readBusinessGroupUpdateInput(_0x24444c));},async 'dryRun'(_0x34ed46){const _0x198590=a59_0x366214,_0x2150dd=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x34ed46[_0x198590(0x1ca)],'input':readBusinessGroupUpdateInput(_0x34ed46),'dryRun':!![]});return{'method':_0x198590(0x1a6),'url':BACKEND_PATH,'body':_0x2150dd[_0x198590(0x192)][_0x198590(0x1c5)][_0x198590(0x1ac)],'description':_0x2150dd[_0x198590(0x1c7)],..._0x2150dd['data']};},async 'execute'(_0x234f2a){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x234f2a['appCode'],'input':readBusinessGroupUpdateInput(_0x234f2a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1ff1be){const _0xeffb33=a59_0x366214,_0x44ed5f=_0x1ff1be[_0xeffb33(0x1b3)](_0xeffb33(0x1b4));return{'code':trim(_0x1ff1be[_0xeffb33(0x1b3)]('code')),'businessGroup':_0x1ff1be[_0xeffb33(0x1b3)]('business-group'),'expectBusinessGroup':_0x44ed5f===undefined||_0x44ed5f===''?undefined:_0x44ed5f};}function validateInput(_0x1aa707){const _0x15d60d=a59_0x366214;if(!trim(_0x1aa707[_0x15d60d(0x197)]))throw CliErrors[_0x15d60d(0x1a5)]('--code\x20is\x20required');if(_0x1aa707[_0x15d60d(0x19c)]===undefined)throw CliErrors['validation'](_0x15d60d(0x1a9));}function resolveBusinessGroupDataset(_0x559165,_0x1a4db5){const _0x681961=a59_0x366214,_0x3b7922=asPlainObject(_0x559165[_0x681961(0x1bf)]),_0x44fb14=asPlainObject(_0x559165['dbtableConfig']),_0x5f54af=resolveSourceType(_0x559165,_0x3b7922,_0x44fb14),_0x141a6a=firstString(_0x559165[_0x681961(0x19d)],_0x559165[_0x681961(0x197)],_0x3b7922[_0x681961(0x190)],_0x1a4db5)||_0x1a4db5;return{'id':firstNumber(_0x559165[_0x681961(0x199)],_0x559165['id'],_0x3b7922[_0x681961(0x196)])??firstString(_0x559165['modelId'],_0x559165['id'],_0x3b7922[_0x681961(0x196)])??null,'code':_0x141a6a,'name':firstString(_0x559165['name'],_0x3b7922[_0x681961(0x1b2)],_0x3b7922[_0x681961(0x19f)])||null,'sourceType':_0x5f54af};}function resolveSourceType(_0x435a47,_0x149471,_0x5e1874){const _0x2d556d=a59_0x366214,_0x187cfa=firstString(_0x435a47[_0x2d556d(0x194)],_0x435a47[_0x2d556d(0x1a1)],_0x149471['source'],_0x149471[_0x2d556d(0x1a1)])?.['trim']()[_0x2d556d(0x1c9)]();if(_0x187cfa===_0x2d556d(0x19a)||_0x187cfa===_0x2d556d(0x1be))return _0x187cfa;if(Object[_0x2d556d(0x1a2)](_0x5e1874)[_0x2d556d(0x1a0)]>0x0)return _0x2d556d(0x19a);throw CliErrors[_0x2d556d(0x1a5)](_0x2d556d(0x193));}function loadCurrentBusinessGroup(_0x393bfb,_0x487fa5){const _0x36eac4=a59_0x366214,_0x276025=readBusinessGroupFromDatasetDetail(_0x393bfb,_0x487fa5[_0x36eac4(0x1a1)]);if(_0x276025[_0x36eac4(0x1ba)])return normalizeBusinessGroup(_0x276025['value']);if(_0x487fa5[_0x36eac4(0x1a1)]==='METADATA')return'';throw CliErrors[_0x36eac4(0x1a5)](_0x36eac4(0x1c0),_0x36eac4(0x198));}function readBusinessGroupFromDatasetDetail(_0x2d3d55,_0x7b705c){const _0x13d6d0=a59_0x366214,_0x1acbbd=asPlainObject(_0x2d3d55['dataset']),_0x484f51=firstPresent(_0x2d3d55[_0x13d6d0(0x19c)]);if(_0x484f51[_0x13d6d0(0x1ba)])return _0x484f51;const _0x5d5e4d=firstPresent(_0x1acbbd['businessGroup']);if(_0x5d5e4d['found'])return _0x5d5e4d;if(_0x7b705c===_0x13d6d0(0x19a))return{'found':![]};const _0x33f984=readBusinessGroupFromExtend(_0x2d3d55[_0x13d6d0(0x1c4)]);if(_0x33f984[_0x13d6d0(0x1ba)])return _0x33f984;return readBusinessGroupFromExtend(_0x1acbbd[_0x13d6d0(0x1c4)]);}function readBusinessGroupFromExtend(_0x2e527f){const _0x172879=a59_0x366214;if(_0x2e527f===undefined||_0x2e527f===null||_0x2e527f==='')return{'found':![]};if(typeof _0x2e527f==='string')try{const _0x5d4499=JSON['parse'](_0x2e527f);return readBusinessGroupFromExtend(_0x5d4499);}catch{return{'found':![]};}const _0x4c6836=asPlainObject(_0x2e527f);if(Object['prototype'][_0x172879(0x19b)]['call'](_0x4c6836,_0x172879(0x19c)))return{'found':!![],'value':_0x4c6836['businessGroup']};return{'found':![]};}function firstPresent(..._0x5dd589){for(const _0xd0726e of _0x5dd589){if(_0xd0726e!==undefined&&_0xd0726e!==null)return{'found':!![],'value':_0xd0726e};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4ff81c,_0x720493){const _0x3538aa=a59_0x366214;if(_0x720493===undefined)return;const _0x486b64=normalizeBusinessGroup(_0x720493);if(_0x4ff81c!==_0x486b64)throw CliErrors[_0x3538aa(0x1a5)](_0x3538aa(0x1b7),_0x3538aa(0x1ae)+JSON[_0x3538aa(0x1ab)](_0x486b64)+',\x20actual\x20'+JSON[_0x3538aa(0x1ab)](_0x4ff81c));}function buildBackendPayload(_0x3369af,_0x17c1a7,_0xc248f6){const _0x5cad7b=a59_0x366214;return{'appCode':_0x3369af,'datasetCode':_0x17c1a7[_0x5cad7b(0x197)],'businessGroup':_0xc248f6};}function normalizeBusinessGroup(_0x250658){const _0x17800b=a59_0x366214;if(_0x250658===undefined||_0x250658===null)return'';return String(_0x250658)[_0x17800b(0x195)]();}function asPlainObject(_0x1a6e3f){const _0x6adcf4=a59_0x366214;if(!_0x1a6e3f||typeof _0x1a6e3f!==_0x6adcf4(0x1c2)||Array[_0x6adcf4(0x1c1)](_0x1a6e3f))return{};return _0x1a6e3f;}function firstString(..._0x43f217){const _0x4480ce=a59_0x366214;for(const _0x3bd00f of _0x43f217){if(typeof _0x3bd00f===_0x4480ce(0x1c8)&&_0x3bd00f[_0x4480ce(0x195)]())return _0x3bd00f[_0x4480ce(0x195)]();if(typeof _0x3bd00f===_0x4480ce(0x1b9)&&Number[_0x4480ce(0x191)](_0x3bd00f))return String(_0x3bd00f);}return undefined;}function firstNumber(..._0x1b3472){const _0x587226=a59_0x366214;for(const _0xb76f61 of _0x1b3472){if(typeof _0xb76f61==='number'&&Number[_0x587226(0x191)](_0xb76f61))return _0xb76f61;if(typeof _0xb76f61==='string'&&_0xb76f61[_0x587226(0x195)]()&&Number[_0x587226(0x191)](Number(_0xb76f61)))return Number(_0xb76f61);}return null;}function trim(_0x58b6fa){return String(_0x58b6fa||'')['trim']();}
@@ -1 +1 @@
1
- function a60_0x5e12(_0x58c238,_0x30499a){_0x58c238=_0x58c238-0xfe;const _0xf331e7=a60_0xf331();let _0x5e1269=_0xf331e7[_0x58c238];return _0x5e1269;}const a60_0x560333=a60_0x5e12;(function(_0x409726,_0x20f697){const _0x523b84=a60_0x5e12,_0x1c79bc=_0x409726();while(!![]){try{const _0x276198=-parseInt(_0x523b84(0x10c))/0x1*(parseInt(_0x523b84(0x111))/0x2)+parseInt(_0x523b84(0x101))/0x3+parseInt(_0x523b84(0x100))/0x4*(-parseInt(_0x523b84(0x108))/0x5)+-parseInt(_0x523b84(0xfe))/0x6*(parseInt(_0x523b84(0x10d))/0x7)+-parseInt(_0x523b84(0x102))/0x8*(parseInt(_0x523b84(0x112))/0x9)+parseInt(_0x523b84(0x103))/0xa+-parseInt(_0x523b84(0x10a))/0xb*(-parseInt(_0x523b84(0x104))/0xc);if(_0x276198===_0x20f697)break;else _0x1c79bc['push'](_0x1c79bc['shift']());}catch(_0x39c5bd){_0x1c79bc['push'](_0x1c79bc['shift']());}}}(a60_0xf331,0xe941e));function a60_0xf331(){const _0x5c96bc=['4238RhRBsj','7065jqesEe','18wqmgST','DB_TABLE','10412fJOKba','2146923XVLrqy','4632wZdnvw','3524060LKEMyP','36sOBlsI','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','dbid','Found\x20','105mHPojY','number','7106143pJHQQC','\x20business\x20group(s)\x20for\x20database\x20connection\x20','491wQYZPD','1169133vfnZTW','groups','num','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'];a60_0xf331=function(){return _0x5c96bc;};return a60_0xf331();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':'dataset','command':'business-groups','description':a60_0x560333(0x105),'risk':'read','flags':[{'name':a60_0x560333(0x106),'type':a60_0x560333(0x109),'required':!![],'description':a60_0x560333(0x110)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1fca53){const _0x1da30c=a60_0x560333,_0x224721=_0x1fca53[_0x1da30c(0x10f)](_0x1da30c(0x106)),_0x599cbf=await getErBusinessGroupSummary(_0x1fca53['appCode'],_0x224721);return{'ok':!![],'data':{..._0x599cbf,'scope':_0x1da30c(0xff)},'message':_0x1da30c(0x107)+_0x599cbf[_0x1da30c(0x10e)]['length']+_0x1da30c(0x10b)+_0x224721};}};
1
+ function a60_0x1d20(){const _0x20aa41=['280dVwWsL','1946064ycOKcr','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','2380266VkJvOs','num','number','10895490UbDCPN','33978WepwGW','2372148HIUOTr','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','appCode','9855145OykXSu','326506mcLufn','30TTNhHI','business-groups','4vopqGP','2tofvQQ','read','99eRKdfG','dataset','dbid'];a60_0x1d20=function(){return _0x20aa41;};return a60_0x1d20();}const a60_0x52b5d6=a60_0x6249;(function(_0x168813,_0x1d6b1f){const _0x25248b=a60_0x6249,_0x42e8ed=_0x168813();while(!![]){try{const _0x4cd7c5=parseInt(_0x25248b(0x197))/0x1*(parseInt(_0x25248b(0x186))/0x2)+-parseInt(_0x25248b(0x18c))/0x3+-parseInt(_0x25248b(0x19a))/0x4*(-parseInt(_0x25248b(0x196))/0x5)+-parseInt(_0x25248b(0x191))/0x6+parseInt(_0x25248b(0x192))/0x7*(parseInt(_0x25248b(0x18b))/0x8)+-parseInt(_0x25248b(0x18e))/0x9*(parseInt(_0x25248b(0x198))/0xa)+parseInt(_0x25248b(0x188))/0xb*(parseInt(_0x25248b(0x193))/0xc);if(_0x4cd7c5===_0x1d6b1f)break;else _0x42e8ed['push'](_0x42e8ed['shift']());}catch(_0x318eae){_0x42e8ed['push'](_0x42e8ed['shift']());}}}(a60_0x1d20,0xf155f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a60_0x6249(_0x379e51,_0x45c06b){_0x379e51=_0x379e51-0x186;const _0x1d204b=a60_0x1d20();let _0x6249cc=_0x1d204b[_0x379e51];return _0x6249cc;}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a60_0x52b5d6(0x189),'command':a60_0x52b5d6(0x199),'description':a60_0x52b5d6(0x18d),'risk':a60_0x52b5d6(0x187),'flags':[{'name':a60_0x52b5d6(0x18a),'type':a60_0x52b5d6(0x190),'required':!![],'description':a60_0x52b5d6(0x194)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x36753b){const _0x1417f7=a60_0x52b5d6,_0x2d858a=_0x36753b[_0x1417f7(0x18f)]('dbid'),_0x56e176=await getErBusinessGroupSummary(_0x36753b[_0x1417f7(0x195)],_0x2d858a);return{'ok':!![],'data':{..._0x56e176,'scope':'DB_TABLE'},'message':'Found\x20'+_0x56e176['groups']['length']+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x2d858a};}};
@@ -1 +1 @@
1
- const a61_0x3d62aa=a61_0x2aa2;(function(_0x3e9931,_0x42b011){const _0x194c1a=a61_0x2aa2,_0x5c55d1=_0x3e9931();while(!![]){try{const _0x198b6f=parseInt(_0x194c1a(0x1f3))/0x1+parseInt(_0x194c1a(0x1ef))/0x2+-parseInt(_0x194c1a(0x1f6))/0x3*(parseInt(_0x194c1a(0x1f0))/0x4)+-parseInt(_0x194c1a(0x1eb))/0x5+-parseInt(_0x194c1a(0x1dc))/0x6+parseInt(_0x194c1a(0x1fd))/0x7+-parseInt(_0x194c1a(0x1f2))/0x8*(-parseInt(_0x194c1a(0x1df))/0x9);if(_0x198b6f===_0x42b011)break;else _0x5c55d1['push'](_0x5c55d1['shift']());}catch(_0x32aa8a){_0x5c55d1['push'](_0x5c55d1['shift']());}}}(a61_0x4153,0x5f096));import{CliErrors}from'../../errors.js';function a61_0x4153(){const _0x23c166=['length','4131846OhGeQK','METADATA','source','18ubjOuE','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','\x20类型,没有可用于\x20','modelCode','trim','dbtable','dbId','filter','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','\x20的\x20DB_TABLE\x20数据源上下文。','dbtableConfig','join','1285520KblGDZ','SQL\x20schema\x20validation','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','59280kliCuB','724qoZGAw','code','4089784KGZpel','478815TfFFif','datasetName','tableName','12030yNypDM','unknown','lovrabet','dataset','toUpperCase','validation','当前数据集\x20\x22','3709468GgMXmk','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','datasetCode','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','UNKNOWN'];a61_0x4153=function(){return _0x23c166;};return a61_0x4153();}function a61_0x2aa2(_0x1b5de0,_0x3ab837){_0x1b5de0=_0x1b5de0-0x1db;const _0x4153f0=a61_0x4153();let _0x2aa246=_0x4153f0[_0x1b5de0];return _0x2aa246;}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x3d62aa(0x1f8),'filter':a61_0x3d62aa(0x1fe),'getOne':a61_0x3d62aa(0x200)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x3d62aa(0x1e7);function valueToString(_0x41f0b3){const _0xe7376b=a61_0x3d62aa;return _0x41f0b3==null?'':String(_0x41f0b3)[_0xe7376b(0x1e3)]();}function getDatasetCode(_0x84ace1){const _0x3c4bb8=a61_0x3d62aa;return valueToString(_0x84ace1[_0x3c4bb8(0x1f1)]??_0x84ace1[_0x3c4bb8(0x1e2)]??_0x84ace1[_0x3c4bb8(0x1f9)]?.[_0x3c4bb8(0x1ff)]);}function getDatasetName(_0x482bc0){const _0x10b4bf=a61_0x3d62aa;return valueToString(_0x482bc0['name']??_0x482bc0[_0x10b4bf(0x1f9)]?.[_0x10b4bf(0x1f4)])||_0x10b4bf(0x1f7);}function getDatasetSource(_0x36bee1){const _0x4d39ab=a61_0x3d62aa;return valueToString(_0x36bee1[_0x4d39ab(0x1de)]??_0x36bee1[_0x4d39ab(0x1f9)]?.['sourceType'])[_0x4d39ab(0x1fa)]();}function getDbtableConfig(_0x5058ab){const _0x4d240f=a61_0x3d62aa,_0x410502=_0x5058ab[_0x4d240f(0x1e9)]??_0x5058ab[_0x4d240f(0x1e4)];return _0x410502&&typeof _0x410502==='object'?_0x410502:{};}export function isDbTableBackedDataset(_0x53dde4){const _0x1f769a=a61_0x3d62aa,_0x17ac4d=getDatasetSource(_0x53dde4);if(_0x17ac4d===_0x1f769a(0x1dd))return![];const _0x1691c5=getDbtableConfig(_0x53dde4),_0x472101=_0x1691c5[_0x1f769a(0x1e5)]??_0x1691c5['id'],_0x99ad71=valueToString(_0x1691c5[_0x1f769a(0x1f5)]??_0x53dde4[_0x1f769a(0x1f5)]??_0x53dde4[_0x1f769a(0x1f9)]?.[_0x1f769a(0x1f5)]);return _0x472101!==undefined&&_0x472101!==null&&_0x99ad71[_0x1f769a(0x1db)]>0x0;}export function filterDbTableBackedDatasets(_0x223a7f){const _0x4ddacd=a61_0x3d62aa;return _0x223a7f[_0x4ddacd(0x1e6)](_0x496345=>isDbTableBackedDataset(_0x496345));}export function buildDbTableBackedRequirementMessage(_0x304795,_0x142082=a61_0x3d62aa(0x1ec)){const _0x1d4789=a61_0x3d62aa,_0x34cd12=getDatasetSource(_0x304795)||_0x1d4789(0x201),_0x32f98e=getDatasetName(_0x304795),_0x3303a2=getDatasetCode(_0x304795),_0x4e4d4c=_0x3303a2?'\x20('+_0x3303a2+')':'';return[_0x1d4789(0x1fc)+_0x32f98e+'\x22'+_0x4e4d4c+'\x20是\x20'+_0x34cd12+_0x1d4789(0x1e1)+_0x142082+_0x1d4789(0x1e8),_0x1d4789(0x1ee),_0x1d4789(0x1ed),_0x1d4789(0x1e0)+RUNTIME_DATA_ACCESS_COMMANDS[_0x1d4789(0x1e6)]+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x1d4789(0x1ea)]('\x20');}export function assertDatasetIsDbTableBacked(_0xadee57,_0x5afe26){const _0x302cc9=a61_0x3d62aa;if(!isDbTableBackedDataset(_0xadee57))throw CliErrors[_0x302cc9(0x1fb)](buildDbTableBackedRequirementMessage(_0xadee57,_0x5afe26));}
1
+ const a61_0x552253=a61_0xe585;(function(_0x2e3249,_0xb7fea2){const _0x275a0a=a61_0xe585,_0x88da88=_0x2e3249();while(!![]){try{const _0x600b2c=parseInt(_0x275a0a(0x1b5))/0x1*(parseInt(_0x275a0a(0x1c9))/0x2)+parseInt(_0x275a0a(0x1ce))/0x3+parseInt(_0x275a0a(0x1cc))/0x4+parseInt(_0x275a0a(0x1c5))/0x5*(parseInt(_0x275a0a(0x1cd))/0x6)+parseInt(_0x275a0a(0x1b9))/0x7+parseInt(_0x275a0a(0x1d1))/0x8*(-parseInt(_0x275a0a(0x1d4))/0x9)+-parseInt(_0x275a0a(0x1c3))/0xa*(parseInt(_0x275a0a(0x1c0))/0xb);if(_0x600b2c===_0xb7fea2)break;else _0x88da88['push'](_0x88da88['shift']());}catch(_0x599243){_0x88da88['push'](_0x88da88['shift']());}}}(a61_0x34ec,0xbfbb7));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a61_0x552253(0x1bc),'getOne':a61_0x552253(0x1d3)};function a61_0xe585(_0x5b9cbf,_0x96ba41){_0x5b9cbf=_0x5b9cbf-0x1b5;const _0x34ec13=a61_0x34ec();let _0xe5855d=_0x34ec13[_0x5b9cbf];return _0xe5855d;}export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x552253(0x1d6);function valueToString(_0x8697b){return _0x8697b==null?'':String(_0x8697b)['trim']();}function getDatasetCode(_0x2b82c7){const _0x20d2fb=a61_0x552253;return valueToString(_0x2b82c7[_0x20d2fb(0x1c6)]??_0x2b82c7[_0x20d2fb(0x1b6)]??_0x2b82c7['dataset']?.[_0x20d2fb(0x1c2)]);}function getDatasetName(_0x5d0597){const _0x59eab1=a61_0x552253;return valueToString(_0x5d0597['name']??_0x5d0597[_0x59eab1(0x1ba)]?.[_0x59eab1(0x1bf)])||_0x59eab1(0x1be);}function getDatasetSource(_0x381c1a){const _0x31dd31=a61_0x552253;return valueToString(_0x381c1a[_0x31dd31(0x1ca)]??_0x381c1a[_0x31dd31(0x1ba)]?.['sourceType'])['toUpperCase']();}function getDbtableConfig(_0x49cede){const _0x356a35=a61_0x552253,_0x15aac5=_0x49cede['dbtableConfig']??_0x49cede['dbtable'];return _0x15aac5&&typeof _0x15aac5===_0x356a35(0x1c7)?_0x15aac5:{};}export function isDbTableBackedDataset(_0x21335b){const _0x21cbdd=a61_0x552253,_0x21c4e1=getDatasetSource(_0x21335b);if(_0x21c4e1===_0x21cbdd(0x1b7))return![];const _0x4155b2=getDbtableConfig(_0x21335b),_0x5abdbd=_0x4155b2['dbId']??_0x4155b2['id'],_0x3cd10c=valueToString(_0x4155b2[_0x21cbdd(0x1bd)]??_0x21335b['tableName']??_0x21335b[_0x21cbdd(0x1ba)]?.[_0x21cbdd(0x1bd)]);return _0x5abdbd!==undefined&&_0x5abdbd!==null&&_0x3cd10c['length']>0x0;}function a61_0x34ec(){const _0x1b906e=['5024243jAdlZD','dataset','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','tableName','unknown','datasetName','8736299TRcUlA','UNKNOWN','datasetCode','20GWzbhH','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','115bPgzGx','code','object','SQL\x20schema\x20validation','57538QxjZUm','source','\x20是\x20','1720516kUxRpN','125232sHhXHj','195414GBdRys','\x20类型,没有可用于\x20','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','3376304OhSOih','当前数据集\x20\x22','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','18QBDjzp','join','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','53dJKDhm','modelCode','METADATA','getOne'];a61_0x34ec=function(){return _0x1b906e;};return a61_0x34ec();}export function filterDbTableBackedDatasets(_0x151100){return _0x151100['filter'](_0x13ca13=>isDbTableBackedDataset(_0x13ca13));}export function buildDbTableBackedRequirementMessage(_0x3ef001,_0x7e00a8=a61_0x552253(0x1c8)){const _0x464314=a61_0x552253,_0x2c1ed8=getDatasetSource(_0x3ef001)||_0x464314(0x1c1),_0x105209=getDatasetName(_0x3ef001),_0x5ea831=getDatasetCode(_0x3ef001),_0x4fc159=_0x5ea831?'\x20('+_0x5ea831+')':'';return[_0x464314(0x1d2)+_0x105209+'\x22'+_0x4fc159+_0x464314(0x1cb)+_0x2c1ed8+_0x464314(0x1cf)+_0x7e00a8+'\x20的\x20DB_TABLE\x20数据源上下文。',_0x464314(0x1c4),_0x464314(0x1d0),_0x464314(0x1bb)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x464314(0x1b8)]+'。'][_0x464314(0x1d5)]('\x20');}export function assertDatasetIsDbTableBacked(_0x45fb18,_0x33d16f){if(!isDbTableBackedDataset(_0x45fb18))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x45fb18,_0x33d16f));}
@@ -1 +1 @@
1
- const a62_0x262e42=a62_0x4b14;(function(_0x2a6b13,_0x57d2a7){const _0x17745d=a62_0x4b14,_0x33b773=_0x2a6b13();while(!![]){try{const _0x1cd233=-parseInt(_0x17745d(0x130))/0x1+-parseInt(_0x17745d(0x129))/0x2+parseInt(_0x17745d(0x140))/0x3+-parseInt(_0x17745d(0x13b))/0x4+parseInt(_0x17745d(0x123))/0x5*(-parseInt(_0x17745d(0x148))/0x6)+parseInt(_0x17745d(0x10a))/0x7*(parseInt(_0x17745d(0x13d))/0x8)+-parseInt(_0x17745d(0x128))/0x9*(-parseInt(_0x17745d(0x11c))/0xa);if(_0x1cd233===_0x57d2a7)break;else _0x33b773['push'](_0x33b773['shift']());}catch(_0x1f88e8){_0x33b773['push'](_0x33b773['shift']());}}}(a62_0x253a,0xbdfef));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':'number','description':a62_0x262e42(0x10d)},DBID_FLAG={'name':'dbid','type':a62_0x262e42(0x10f),'description':a62_0x262e42(0x11a)},CONFIRM_FLAG={'name':a62_0x262e42(0x10e),'type':a62_0x262e42(0x11f),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},CASCADE_FLAG={'name':'cascade','type':a62_0x262e42(0x11f),'description':a62_0x262e42(0x126)},EXPECTED_COUNT_FLAG={'name':a62_0x262e42(0x10b),'type':a62_0x262e42(0x10f),'description':a62_0x262e42(0x137)};function a62_0x253a(){const _0x415f20=['relatedPageInfoList','18544FovsUD','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','dbtableConfig','3629847WiePkd','true','tableName','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','/smartapi/dataset/delete?cascade=','high-risk-write','dbid=','Deleted\x20','6rMrdkx','filter','4557KLYxRO','expected-count','num','Dataset\x20id','confirm','number','source','delete','\x20--appcode\x20','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','dbName','bool','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','rabetbase\x20page\x20restore\x20--id\x20','id=','dbId','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','description','5996710USAmJw','length','name','boolean','validation','POST','appCode','6802595BsFmxy','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','code','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','36qFawmv','1453584GyfwOU','\x20failed','dataset','message','str','Would\x20safely\x20delete\x20','add','1552616tZxMfX','map','push','object','false','\x20dataset(s);\x20','cascade','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','dbid','type','2798004ozTpId'];a62_0x253a=function(){return _0x415f20;};return a62_0x253a();}function a62_0x4b14(_0x5793bd,_0x384e85){_0x5793bd=_0x5793bd-0x109;const _0x253a0e=a62_0x253a();let _0x4b1401=_0x253a0e[_0x5793bd];return _0x4b1401;}export const datasetDelete={'service':a62_0x262e42(0x12b),'command':a62_0x262e42(0x111),'description':a62_0x262e42(0x138),'risk':a62_0x262e42(0x145),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4e90bd){const _0x22bceb=a62_0x262e42,_0x21990d=_0x4e90bd['num']('id'),_0x1beba0=_0x4e90bd[_0x22bceb(0x12d)](_0x22bceb(0x125)),_0x2baf33=_0x4e90bd[_0x22bceb(0x10c)](_0x22bceb(0x139)),_0x3ee1a2=[_0x21990d>0x0,Boolean(_0x1beba0),_0x2baf33>0x0][_0x22bceb(0x109)](Boolean);if(_0x3ee1a2[_0x22bceb(0x11d)]===0x0)throw CliErrors[_0x22bceb(0x120)](_0x22bceb(0x143));if(_0x3ee1a2[_0x22bceb(0x11d)]>0x1)throw CliErrors[_0x22bceb(0x120)](_0x22bceb(0x124));},async 'dryRun'(_0x51d8c6){const _0x104799=a62_0x262e42,_0x418743=await resolveTargets(_0x51d8c6),_0x2ec70c=_0x51d8c6[_0x104799(0x115)](_0x104799(0x136));return{'method':_0x104799(0x121),'url':_0x104799(0x144)+(_0x2ec70c?_0x104799(0x141):_0x104799(0x134)),'body':{'count':_0x418743[_0x104799(0x11d)],'cascade':_0x2ec70c,'datasets':_0x418743},'description':_0x2ec70c?'Would\x20delete\x20'+_0x418743[_0x104799(0x11d)]+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':_0x104799(0x12e)+_0x418743[_0x104799(0x11d)]+_0x104799(0x13e)};},async 'execute'(_0x4bb36f){const _0x4362e7=a62_0x262e42;if(!_0x4bb36f['bool'](_0x4362e7(0x10e)))throw CliErrors[_0x4362e7(0x120)](_0x4362e7(0x116),_0x4362e7(0x127));const _0x589583=await resolveTargets(_0x4bb36f),_0x112e93=_0x4bb36f[_0x4362e7(0x115)](_0x4362e7(0x136)),_0x3c9614=[],_0x16039b=[];for(const _0x139cf5 of _0x589583){try{await deleteDataset(_0x139cf5['id'],_0x112e93),_0x3c9614['push'](_0x139cf5);}catch(_0x8a766d){_0x16039b['push']({..._0x139cf5,'error':_0x8a766d instanceof Error?_0x8a766d[_0x4362e7(0x12c)]:String(_0x8a766d)});}}if(_0x16039b[_0x4362e7(0x11d)]>0x0){const _0x15be04=buildPageRestoreCommands(_0x4bb36f[_0x4362e7(0x122)],_0x112e93?_0x3c9614:[]);return{'ok':![],'data':{'requested':_0x589583[_0x4362e7(0x11d)],'cascade':_0x112e93,'deletedCount':_0x3c9614['length'],'failedCount':_0x16039b[_0x4362e7(0x11d)],'deleted':_0x3c9614,'failed':_0x16039b,'pageRestoreCommands':_0x15be04},'message':_0x4362e7(0x147)+_0x3c9614[_0x4362e7(0x11d)]+'/'+_0x589583[_0x4362e7(0x11d)]+_0x4362e7(0x135)+_0x16039b[_0x4362e7(0x11d)]+_0x4362e7(0x12a)};}return{'ok':!![],'data':{'requested':_0x589583[_0x4362e7(0x11d)],'cascade':_0x112e93,'deletedCount':_0x3c9614[_0x4362e7(0x11d)],'deleted':_0x3c9614,'pageRestoreCommands':buildPageRestoreCommands(_0x4bb36f[_0x4362e7(0x122)],_0x112e93?_0x3c9614:[])},'message':_0x4362e7(0x147)+_0x3c9614['length']+'\x20dataset(s)'};}};async function resolveTargets(_0xc4f1df){const _0x14eae2=a62_0x262e42,_0xaae53e=_0xc4f1df['num']('id'),_0xb9685=_0xc4f1df[_0x14eae2(0x12d)](_0x14eae2(0x125)),_0x3ca6b2=_0xc4f1df[_0x14eae2(0x10c)](_0x14eae2(0x139));let _0x5554b0;_0xb9685?(_0x5554b0=await listDatasets(_0xc4f1df['appCode'],{'code':_0xb9685}),_0x5554b0=_0x5554b0['filter'](_0xfb22a9=>_0xfb22a9[_0x14eae2(0x125)]===_0xb9685)):(_0x5554b0=await listDatasets(_0xc4f1df[_0x14eae2(0x122)]),_0xaae53e>0x0&&(_0x5554b0=_0x5554b0[_0x14eae2(0x109)](_0x4a1e2a=>_0x4a1e2a['id']===_0xaae53e)),_0x3ca6b2>0x0&&(_0x5554b0=_0x5554b0[_0x14eae2(0x109)](_0x26ef4f=>_0x26ef4f[_0x14eae2(0x13f)]?.[_0x14eae2(0x119)]===_0x3ca6b2)));const _0x540ea6=[];for(const _0x43b06c of _0x5554b0){const _0x45cfbc=await getDatasetDetail(_0x43b06c[_0x14eae2(0x125)]),_0x2b68ba=Array['isArray'](_0x45cfbc[_0x14eae2(0x13c)])?_0x45cfbc[_0x14eae2(0x13c)][_0x14eae2(0x109)](_0x46aaed=>_0x46aaed!=null&&typeof _0x46aaed===_0x14eae2(0x133)&&_0x46aaed['deleted']!==!![]):[];_0x540ea6[_0x14eae2(0x132)](normalizeTarget(_0x43b06c,_0x2b68ba));}if(_0x540ea6[_0x14eae2(0x11d)]===0x0){const _0x3b4974=_0xb9685||(_0xaae53e>0x0?_0x14eae2(0x118)+_0xaae53e:_0x14eae2(0x146)+_0x3ca6b2);throw CliErrors[_0x14eae2(0x120)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x3b4974+'.');}const _0x4b6592=_0xc4f1df[_0x14eae2(0x10c)](_0x14eae2(0x10b));if(_0x4b6592>0x0&&_0x540ea6['length']!==_0x4b6592)throw CliErrors['validation']('Matched\x20'+_0x540ea6[_0x14eae2(0x11d)]+_0x14eae2(0x113)+_0x4b6592+'.');return _0x540ea6;}function normalizeTarget(_0x3a4e89,_0x571d46){const _0x24df52=a62_0x262e42,_0x160e63=_0x3a4e89[_0x24df52(0x13f)]??{},_0x2ee30b=_0x571d46[_0x24df52(0x131)](_0x492779=>{const _0x251ad6=_0x24df52;if(_0x492779==null||typeof _0x492779!=='object')return null;const _0x3d0d82=_0x492779,_0x49d1b2=Number(_0x3d0d82['id']);if(!Number['isInteger'](_0x49d1b2)||_0x49d1b2<=0x0)return null;const _0x126f8e=_0x3d0d82['title']??_0x3d0d82[_0x251ad6(0x11e)];return{'id':_0x49d1b2,..._0x126f8e?{'name':String(_0x126f8e)}:{},..._0x3d0d82[_0x251ad6(0x13a)]?{'type':String(_0x3d0d82['type'])}:{}};})[_0x24df52(0x109)](_0x3404f1=>_0x3404f1!==null);return{'id':_0x3a4e89['id'],'code':_0x3a4e89[_0x24df52(0x125)],'name':_0x3a4e89[_0x24df52(0x11e)],'description':_0x3a4e89[_0x24df52(0x11b)],'source':_0x3a4e89[_0x24df52(0x110)],'dbId':_0x160e63['dbId'],'dbName':_0x160e63[_0x24df52(0x114)],'tableName':_0x160e63[_0x24df52(0x142)],'relatedPageCount':_0x2ee30b[_0x24df52(0x11d)],'relatedPages':_0x2ee30b};}function buildPageRestoreCommands(_0x13bd0f,_0x423643){const _0x368e70=a62_0x262e42,_0x25186f=new Set();for(const _0x114ba7 of _0x423643){for(const _0x5c9458 of _0x114ba7['relatedPages'])_0x25186f[_0x368e70(0x12f)](_0x5c9458['id']);}return[..._0x25186f][_0x368e70(0x131)](_0xcd4401=>_0x368e70(0x117)+_0xcd4401+_0x368e70(0x112)+_0x13bd0f);}
1
+ const a62_0x54e99e=a62_0x121d;(function(_0x3b72fd,_0x113f91){const _0x49d456=a62_0x121d,_0x241b07=_0x3b72fd();while(!![]){try{const _0x584779=parseInt(_0x49d456(0x1cb))/0x1*(parseInt(_0x49d456(0x1b6))/0x2)+parseInt(_0x49d456(0x1a2))/0x3+-parseInt(_0x49d456(0x1b3))/0x4+parseInt(_0x49d456(0x1e2))/0x5*(parseInt(_0x49d456(0x1d1))/0x6)+-parseInt(_0x49d456(0x1e1))/0x7*(-parseInt(_0x49d456(0x1c8))/0x8)+-parseInt(_0x49d456(0x1ce))/0x9+-parseInt(_0x49d456(0x1df))/0xa;if(_0x584779===_0x113f91)break;else _0x241b07['push'](_0x241b07['shift']());}catch(_0x5a8c8c){_0x241b07['push'](_0x241b07['shift']());}}}(a62_0x1877,0x737c3));function a62_0x121d(_0x3adb4f,_0x4a884e){_0x3adb4f=_0x3adb4f-0x19f;const _0x187745=a62_0x1877();let _0x121da4=_0x187745[_0x3adb4f];return _0x121da4;}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':a62_0x54e99e(0x1ca),'description':'Dataset\x20id'},DBID_FLAG={'name':a62_0x54e99e(0x1ae),'type':a62_0x54e99e(0x1ca),'description':a62_0x54e99e(0x1d9)},CONFIRM_FLAG={'name':a62_0x54e99e(0x1ba),'type':'boolean','description':a62_0x54e99e(0x1db)},CASCADE_FLAG={'name':'cascade','type':a62_0x54e99e(0x1c4),'description':'Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm'},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a62_0x54e99e(0x1ca),'description':a62_0x54e99e(0x1bf)};function a62_0x1877(){const _0x26ccb9=['num','106424WYFwir','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','number','30QuVFOG','object','\x20failed','3049281NKbNte','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','message','12mGVmjl','name','add','id=','bool','\x20dataset(s)','No\x20undeleted\x20dataset\x20found\x20for\x20','delete','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','isInteger','Required\x20to\x20execute\x20dataset\x20deletion','expected-count','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','description','1691550wFBpDu','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','259RPFnJs','491440mUcpuQ','map','true','POST','934512eToVML','relatedPageInfoList','length','dbId','push','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','str','/smartapi/dataset/delete?cascade=','\x20--appcode\x20','source','dbName','isArray','dbid','validation','title','type','cascade','1793920wSjwoN','filter','Would\x20delete\x20','28612UBUiNO','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','tableName','false','confirm','Would\x20safely\x20delete\x20','dataset','dbid=','deleted','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','high-risk-write','dbtableConfig','code','Deleted\x20','boolean','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','appCode'];a62_0x1877=function(){return _0x26ccb9;};return a62_0x1877();}export const datasetDelete={'service':a62_0x54e99e(0x1bc),'command':a62_0x54e99e(0x1d8),'description':a62_0x54e99e(0x1c5),'risk':a62_0x54e99e(0x1c0),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x51eb57){const _0x5eeac3=a62_0x54e99e,_0x8dbfae=_0x51eb57[_0x5eeac3(0x1c7)]('id'),_0x545c2b=_0x51eb57[_0x5eeac3(0x1a8)](_0x5eeac3(0x1c2)),_0x5c7354=_0x51eb57['num'](_0x5eeac3(0x1ae)),_0x4bf3fb=[_0x8dbfae>0x0,Boolean(_0x545c2b),_0x5c7354>0x0][_0x5eeac3(0x1b4)](Boolean);if(_0x4bf3fb[_0x5eeac3(0x1a4)]===0x0)throw CliErrors[_0x5eeac3(0x1af)](_0x5eeac3(0x1c9));if(_0x4bf3fb[_0x5eeac3(0x1a4)]>0x1)throw CliErrors['validation'](_0x5eeac3(0x1b7));},async 'dryRun'(_0x1d8585){const _0x365a5c=a62_0x54e99e,_0x4065e7=await resolveTargets(_0x1d8585),_0x1105a7=_0x1d8585[_0x365a5c(0x1d5)](_0x365a5c(0x1b2));return{'method':_0x365a5c(0x1a1),'url':_0x365a5c(0x1a9)+(_0x1105a7?_0x365a5c(0x1a0):_0x365a5c(0x1b9)),'body':{'count':_0x4065e7[_0x365a5c(0x1a4)],'cascade':_0x1105a7,'datasets':_0x4065e7},'description':_0x1105a7?_0x365a5c(0x1b5)+_0x4065e7[_0x365a5c(0x1a4)]+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':_0x365a5c(0x1bb)+_0x4065e7[_0x365a5c(0x1a4)]+_0x365a5c(0x1e0)};},async 'execute'(_0x41289f){const _0x2d0e52=a62_0x54e99e;if(!_0x41289f[_0x2d0e52(0x1d5)](_0x2d0e52(0x1ba)))throw CliErrors['validation'](_0x2d0e52(0x1cf),_0x2d0e52(0x1dd));const _0x3537e6=await resolveTargets(_0x41289f),_0x8cc52c=_0x41289f[_0x2d0e52(0x1d5)](_0x2d0e52(0x1b2)),_0x38302c=[],_0x1ba46e=[];for(const _0x58d18 of _0x3537e6){try{await deleteDataset(_0x58d18['id'],_0x8cc52c),_0x38302c[_0x2d0e52(0x1a6)](_0x58d18);}catch(_0x4635ff){_0x1ba46e[_0x2d0e52(0x1a6)]({..._0x58d18,'error':_0x4635ff instanceof Error?_0x4635ff[_0x2d0e52(0x1d0)]:String(_0x4635ff)});}}if(_0x1ba46e[_0x2d0e52(0x1a4)]>0x0){const _0x3096ba=buildPageRestoreCommands(_0x41289f[_0x2d0e52(0x1c6)],_0x8cc52c?_0x38302c:[]);return{'ok':![],'data':{'requested':_0x3537e6['length'],'cascade':_0x8cc52c,'deletedCount':_0x38302c[_0x2d0e52(0x1a4)],'failedCount':_0x1ba46e[_0x2d0e52(0x1a4)],'deleted':_0x38302c,'failed':_0x1ba46e,'pageRestoreCommands':_0x3096ba},'message':'Deleted\x20'+_0x38302c[_0x2d0e52(0x1a4)]+'/'+_0x3537e6[_0x2d0e52(0x1a4)]+'\x20dataset(s);\x20'+_0x1ba46e['length']+_0x2d0e52(0x1cd)};}return{'ok':!![],'data':{'requested':_0x3537e6['length'],'cascade':_0x8cc52c,'deletedCount':_0x38302c['length'],'deleted':_0x38302c,'pageRestoreCommands':buildPageRestoreCommands(_0x41289f[_0x2d0e52(0x1c6)],_0x8cc52c?_0x38302c:[])},'message':_0x2d0e52(0x1c3)+_0x38302c[_0x2d0e52(0x1a4)]+_0x2d0e52(0x1d6)};}};async function resolveTargets(_0x4db3fe){const _0x5b0fdb=a62_0x54e99e,_0x33c10a=_0x4db3fe['num']('id'),_0x2cfb88=_0x4db3fe[_0x5b0fdb(0x1a8)](_0x5b0fdb(0x1c2)),_0x4a12e0=_0x4db3fe[_0x5b0fdb(0x1c7)](_0x5b0fdb(0x1ae));let _0x35743f;_0x2cfb88?(_0x35743f=await listDatasets(_0x4db3fe['appCode'],{'code':_0x2cfb88}),_0x35743f=_0x35743f[_0x5b0fdb(0x1b4)](_0x52228f=>_0x52228f[_0x5b0fdb(0x1c2)]===_0x2cfb88)):(_0x35743f=await listDatasets(_0x4db3fe[_0x5b0fdb(0x1c6)]),_0x33c10a>0x0&&(_0x35743f=_0x35743f['filter'](_0x20b41a=>_0x20b41a['id']===_0x33c10a)),_0x4a12e0>0x0&&(_0x35743f=_0x35743f[_0x5b0fdb(0x1b4)](_0x3a49f8=>_0x3a49f8[_0x5b0fdb(0x1c1)]?.[_0x5b0fdb(0x1a5)]===_0x4a12e0)));const _0xd9a68d=[];for(const _0x17917d of _0x35743f){const _0xd27fb4=await getDatasetDetail(_0x17917d[_0x5b0fdb(0x1c2)]),_0x13625a=Array[_0x5b0fdb(0x1ad)](_0xd27fb4[_0x5b0fdb(0x1a3)])?_0xd27fb4[_0x5b0fdb(0x1a3)][_0x5b0fdb(0x1b4)](_0x36dcf3=>_0x36dcf3!=null&&typeof _0x36dcf3===_0x5b0fdb(0x1cc)&&_0x36dcf3[_0x5b0fdb(0x1be)]!==!![]):[];_0xd9a68d[_0x5b0fdb(0x1a6)](normalizeTarget(_0x17917d,_0x13625a));}if(_0xd9a68d[_0x5b0fdb(0x1a4)]===0x0){const _0x509e92=_0x2cfb88||(_0x33c10a>0x0?_0x5b0fdb(0x1d4)+_0x33c10a:_0x5b0fdb(0x1bd)+_0x4a12e0);throw CliErrors[_0x5b0fdb(0x1af)](_0x5b0fdb(0x1d7)+_0x509e92+'.');}const _0x578d58=_0x4db3fe[_0x5b0fdb(0x1c7)](_0x5b0fdb(0x1dc));if(_0x578d58>0x0&&_0xd9a68d[_0x5b0fdb(0x1a4)]!==_0x578d58)throw CliErrors[_0x5b0fdb(0x1af)]('Matched\x20'+_0xd9a68d[_0x5b0fdb(0x1a4)]+_0x5b0fdb(0x1a7)+_0x578d58+'.');return _0xd9a68d;}function normalizeTarget(_0x58d762,_0x2291e9){const _0x144e9c=a62_0x54e99e,_0x35f573=_0x58d762[_0x144e9c(0x1c1)]??{},_0x2d743c=_0x2291e9[_0x144e9c(0x19f)](_0x274eb5=>{const _0x2ba107=_0x144e9c;if(_0x274eb5==null||typeof _0x274eb5!==_0x2ba107(0x1cc))return null;const _0x4f1086=_0x274eb5,_0x42e7a0=Number(_0x4f1086['id']);if(!Number[_0x2ba107(0x1da)](_0x42e7a0)||_0x42e7a0<=0x0)return null;const _0x47bc05=_0x4f1086[_0x2ba107(0x1b0)]??_0x4f1086[_0x2ba107(0x1d2)];return{'id':_0x42e7a0,..._0x47bc05?{'name':String(_0x47bc05)}:{},..._0x4f1086[_0x2ba107(0x1b1)]?{'type':String(_0x4f1086[_0x2ba107(0x1b1)])}:{}};})[_0x144e9c(0x1b4)](_0x429f6c=>_0x429f6c!==null);return{'id':_0x58d762['id'],'code':_0x58d762['code'],'name':_0x58d762[_0x144e9c(0x1d2)],'description':_0x58d762[_0x144e9c(0x1de)],'source':_0x58d762[_0x144e9c(0x1ab)],'dbId':_0x35f573[_0x144e9c(0x1a5)],'dbName':_0x35f573[_0x144e9c(0x1ac)],'tableName':_0x35f573[_0x144e9c(0x1b8)],'relatedPageCount':_0x2d743c[_0x144e9c(0x1a4)],'relatedPages':_0x2d743c};}function buildPageRestoreCommands(_0x38101b,_0x5173e3){const _0xb96f51=a62_0x54e99e,_0x4c9c42=new Set();for(const _0x4871e3 of _0x5173e3){for(const _0x1bf082 of _0x4871e3['relatedPages'])_0x4c9c42[_0xb96f51(0x1d3)](_0x1bf082['id']);}return[..._0x4c9c42][_0xb96f51(0x19f)](_0x34d7de=>'rabetbase\x20page\x20restore\x20--id\x20'+_0x34d7de+_0xb96f51(0x1aa)+_0x38101b);}
@@ -1 +1 @@
1
- const a63_0x266c5e=a63_0x29bc;(function(_0x2328cc,_0x1832d5){const _0x2e9638=a63_0x29bc,_0x288c4c=_0x2328cc();while(!![]){try{const _0x1e62d5=parseInt(_0x2e9638(0x1ed))/0x1+parseInt(_0x2e9638(0x1bd))/0x2*(parseInt(_0x2e9638(0x1e6))/0x3)+-parseInt(_0x2e9638(0x1cb))/0x4*(parseInt(_0x2e9638(0x1d8))/0x5)+parseInt(_0x2e9638(0x1e1))/0x6*(-parseInt(_0x2e9638(0x1b2))/0x7)+-parseInt(_0x2e9638(0x1e0))/0x8+parseInt(_0x2e9638(0x1c6))/0x9+parseInt(_0x2e9638(0x1a9))/0xa*(parseInt(_0x2e9638(0x1ab))/0xb);if(_0x1e62d5===_0x1832d5)break;else _0x288c4c['push'](_0x288c4c['shift']());}catch(_0x3f6dba){_0x288c4c['push'](_0x288c4c['shift']());}}}(a63_0x566b,0xa7ceb));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x3f4b6b){const _0x2ac66f=a63_0x29bc;if(_0x3f4b6b[_0x2ac66f(0x1be)])return null;const _0x397fbd=Boolean(_0x3f4b6b[_0x2ac66f(0x1b6)]!==undefined||_0x3f4b6b[_0x2ac66f(0x1c5)]!==undefined);let _0xfc5302={};if(!_0x397fbd&&typeof _0x3f4b6b[_0x2ac66f(0x1af)]===_0x2ac66f(0x1f7))try{_0xfc5302=JSON[_0x2ac66f(0x1f4)](_0x3f4b6b[_0x2ac66f(0x1af)]);}catch{}const _0x46bc5b=_0x397fbd?_0x3f4b6b['name']:_0x3f4b6b[_0x2ac66f(0x1ac)],_0x50049b=_0x397fbd?_0x3f4b6b[_0x2ac66f(0x1b6)]:_0x3f4b6b['name'],_0x3e073f=_0x397fbd?_0x3f4b6b[_0x2ac66f(0x1c5)]:_0x3f4b6b[_0x2ac66f(0x1c7)]||_0x3f4b6b[_0x2ac66f(0x1c2)],_0x1d286e=_0x397fbd?_0x3f4b6b[_0x2ac66f(0x1eb)]===!![]:_0xfc5302['pkField']===!![],_0x16a0ad=_0x397fbd?_0x3f4b6b[_0x2ac66f(0x1dd)]===!![]:_0xfc5302[_0x2ac66f(0x1dd)]===!![],_0x1f0722=_0x397fbd?_0x3f4b6b[_0x2ac66f(0x1b4)]??null:_0xfc5302[_0x2ac66f(0x1b4)]??null,_0x14ca07={'name':_0x46bc5b,'displayName':_0x50049b||_0x46bc5b,'type':_0x3e073f,'dbType':_0x3f4b6b['dbType'],'pk':_0x1d286e,'required':_0x16a0ad,'deprecated':_0x3f4b6b[_0x2ac66f(0x1aa)]===!![],'description':_0x3f4b6b[_0x2ac66f(0x1b5)]||undefined};return Array['isArray'](_0x1f0722)&&_0x1f0722['length']>0x0&&(_0x14ca07[_0x2ac66f(0x1b4)]=_0x1f0722),_0x14ca07;}function parseJsonMaybe(_0x54d6e6){const _0x30136c=a63_0x29bc;if(typeof _0x54d6e6!==_0x30136c(0x1f7))return _0x54d6e6;try{return JSON[_0x30136c(0x1f4)](_0x54d6e6);}catch{return _0x54d6e6;}}function normalizeOperationEntry(_0x5ed244,_0x45b87d){const _0x5e5386=a63_0x29bc;if(!_0x45b87d||typeof _0x45b87d!==_0x5e5386(0x1ff))return null;if(!_0x45b87d[_0x5e5386(0x1d4)]||!_0x45b87d[_0x5e5386(0x1fa)])return null;const _0x5d9ae2={'name':_0x5ed244,'method':_0x45b87d['method'],'path':_0x45b87d['path']};if(_0x45b87d[_0x5e5386(0x1f6)])_0x5d9ae2[_0x5e5386(0x1f6)]=_0x45b87d[_0x5e5386(0x1f6)];if(_0x45b87d[_0x5e5386(0x1b3)]!=null){const _0x5e0b7c=parseJsonMaybe(_0x45b87d[_0x5e5386(0x1b3)]);_0x5d9ae2['requestBody']=_0x5e0b7c;}if(_0x45b87d[_0x5e5386(0x1b9)]!=null){const _0x48e722=parseJsonMaybe(_0x45b87d[_0x5e5386(0x1b9)]);_0x5d9ae2[_0x5e5386(0x1b9)]=_0x48e722;}if(_0x45b87d[_0x5e5386(0x1fb)]!=null)_0x5d9ae2[_0x5e5386(0x1fb)]=_0x45b87d[_0x5e5386(0x1fb)];if(_0x45b87d['afterScriptId']!=null)_0x5d9ae2[_0x5e5386(0x1d0)]=_0x45b87d[_0x5e5386(0x1d0)];if(Array[_0x5e5386(0x1f1)](_0x45b87d[_0x5e5386(0x1ba)]))_0x5d9ae2['requestFields']=_0x45b87d[_0x5e5386(0x1ba)];if(Array[_0x5e5386(0x1f1)](_0x45b87d['responseFields']))_0x5d9ae2[_0x5e5386(0x1ec)]=_0x45b87d[_0x5e5386(0x1ec)];return _0x5d9ae2;}function summarizeDbtable(_0xabbd63){const _0x32390b=a63_0x29bc,_0x489ed4={},_0x253bd9=['dbId','dbName',_0x32390b(0x1bb),_0x32390b(0x1ee),'pkField',_0x32390b(0x1c1),_0x32390b(0x1e7),_0x32390b(0x1cc),_0x32390b(0x1d3),_0x32390b(0x1f9),_0x32390b(0x1b7),'modifierIdField',_0x32390b(0x1e4),_0x32390b(0x1d2),_0x32390b(0x1ce)];for(const _0x39559a of _0x253bd9){if(_0xabbd63[_0x39559a]!==undefined)_0x489ed4[_0x39559a]=_0xabbd63[_0x39559a];}return typeof _0x489ed4[_0x32390b(0x1c1)]==='string'&&_0x489ed4[_0x32390b(0x1c1)][_0x32390b(0x1d9)]>0x0&&(_0x489ed4['allFieldNames']=_0x489ed4['allFields'][_0x32390b(0x1db)](',')[_0x32390b(0x1ca)](_0x37d31e=>_0x37d31e[_0x32390b(0x1fc)]())['filter'](Boolean)),_0x489ed4;}function a63_0x29bc(_0x52770d,_0x2800db){_0x52770d=_0x52770d-0x1a9;const _0x566b86=a63_0x566b();let _0x29bcf2=_0x566b86[_0x52770d];return _0x29bcf2;}function normalizeRelatedPages(_0x40a2c8){const _0x59e8bf=a63_0x29bc;if(!Array['isArray'](_0x40a2c8))return[];return _0x40a2c8[_0x59e8bf(0x1b1)](_0x19cfec=>_0x19cfec&&typeof _0x19cfec===_0x59e8bf(0x1ff))[_0x59e8bf(0x1ca)](_0x2be589=>({'id':_0x2be589['id'],'type':_0x2be589['type'],'code':_0x2be589['code'],'title':_0x2be589[_0x59e8bf(0x1e2)],'deleted':_0x2be589['deleted']===!![]}));}function a63_0x566b(){const _0x506c47=['dbId','extend','fields','filter','7gmuQfl','requestBody','options','description','displayName','creatorNameField','cardinality','responseBody','requestFields','tableName','dataset','2CFEzuR','deleted','bizRelationType','toField','allFields','dataType','sourceType','operations','doType','9534303kbVhDL','type','indexes','dbName','map','1188lDvgrP','createTimeField','fromField','dblinkInfoDTO','toFieldLabel','afterScriptId','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','labelField','updateTimeField','method','relations','entries','properties','9605BkVBmH','length','toDatasetName','split','source','required','formatRules','tableComment','10412880xfvDbi','8196708PVwcKu','title','push','modifierNameField','doVersion','1114509eVhDlU','logicField','columnCodeListWithDeleted','validateRules','modelId','pkField','responseFields','847101ScIPoc','datasetKey','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','read','isArray','modelCode','detail','parse','name','host','string','dbtableConfig','creatorIdField','path','beforeScriptId','trim','alias','relationId','object','5090OQFmjF','deprecated','35607eNqffH','code','str'];a63_0x566b=function(){return _0x506c47;};return a63_0x566b();}export const datasetDetail={'service':a63_0x266c5e(0x1bc),'command':a63_0x266c5e(0x1f3),'description':a63_0x266c5e(0x1d1),'risk':a63_0x266c5e(0x1f0),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x266c5e(0x1fd),'type':'string','description':a63_0x266c5e(0x1ef)}],async 'execute'(_0x485b40){const _0x36d018=a63_0x266c5e,_0x4b5eae=await getDatasetDetail(_0x485b40[_0x36d018(0x1ad)](_0x36d018(0x1ac))),_0x3212c0=Array[_0x36d018(0x1f1)](_0x4b5eae[_0x36d018(0x1b0)])?_0x4b5eae[_0x36d018(0x1b0)]:Array['isArray'](_0x4b5eae['properties'])?_0x4b5eae[_0x36d018(0x1d7)]:[],_0xad17e8=_0x3212c0['map'](_0x2b49a4=>normalizeField(_0x2b49a4))[_0x36d018(0x1b1)](_0xe36340=>_0xe36340!==null),_0x2c6aeb=_0x4b5eae[_0x36d018(0x1c4)]??{},_0x2a715b=[];for(const [_0x59b19f,_0x23c5f9]of Object[_0x36d018(0x1d6)](_0x2c6aeb)){const _0x17b35=normalizeOperationEntry(_0x59b19f,_0x23c5f9);if(_0x17b35)_0x2a715b[_0x36d018(0x1e3)](_0x17b35);}const _0xf680e0=_0x4b5eae[_0x36d018(0x1f8)]??{},_0x3be0d4=_0x4b5eae[_0x36d018(0x1bc)]??{},_0x57451a=_0xf680e0[_0x36d018(0x1ae)]!=null?{'id':_0xf680e0[_0x36d018(0x1ae)],'name':_0xf680e0[_0x36d018(0x1c9)]??null}:undefined;let _0x1c25b1;return typeof _0x4b5eae['extend']===_0x36d018(0x1f7)&&(_0x1c25b1=parseJsonMaybe(_0x4b5eae[_0x36d018(0x1af)])),{'ok':!![],'data':{'id':_0x4b5eae[_0x36d018(0x1ea)]??_0x4b5eae['id'],'name':_0x4b5eae[_0x36d018(0x1f5)],'code':_0x4b5eae['modelCode']||_0x4b5eae['code'],'doVersion':_0x4b5eae[_0x36d018(0x1e5)],'description':_0x4b5eae[_0x36d018(0x1b5)]||_0x3be0d4[_0x36d018(0x1df)]||undefined,'source':_0x4b5eae[_0x36d018(0x1dc)]||_0x3be0d4[_0x36d018(0x1c3)],'table':_0xf680e0[_0x36d018(0x1bb)]||_0x3be0d4[_0x36d018(0x1bb)],'datasetKey':_0xf680e0[_0x36d018(0x1ee)],'pk':_0xf680e0[_0x36d018(0x1eb)],'db':_0x57451a,'dbtable':summarizeDbtable(_0xf680e0),'fields':_0xad17e8,'operations':_0x2a715b,'indexes':Array[_0x36d018(0x1f1)](_0x3be0d4[_0x36d018(0x1c8)])?_0x3be0d4['indexes']:[],'relations':Array['isArray'](_0x4b5eae[_0x36d018(0x1d5)])?_0x4b5eae[_0x36d018(0x1d5)][_0x36d018(0x1ca)](_0x266c66=>({..._0x266c66[_0x36d018(0x1fe)]!=null?{'relationId':_0x266c66['relationId']}:{},'fromDataset':_0x4b5eae[_0x36d018(0x1f5)],'fromCode':_0x4b5eae[_0x36d018(0x1f2)]||_0x4b5eae['code'],'fromTable':_0xf680e0[_0x36d018(0x1bb)]||_0x3be0d4['tableName'],'fromField':_0x266c66[_0x36d018(0x1cd)],'toDataset':_0x266c66[_0x36d018(0x1da)],'toCode':_0x266c66['toDatasetCode'],'toTable':_0x266c66['toTableName'],'toField':_0x266c66[_0x36d018(0x1c0)],'labelField':_0x266c66[_0x36d018(0x1cf)]||undefined,'cardinality':_0x266c66[_0x36d018(0x1b8)]||undefined,'bizRelationType':_0x266c66[_0x36d018(0x1bf)]==='main_sub'?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x4b5eae['relatedPageInfoList']),...Array['isArray'](_0x4b5eae[_0x36d018(0x1e8)])?{'columnCodeListWithDeleted':_0x4b5eae[_0x36d018(0x1e8)]}:{},'formatRules':Array[_0x36d018(0x1f1)](_0x4b5eae['formatRules'])?_0x4b5eae[_0x36d018(0x1de)]:[],'validateRules':Array['isArray'](_0x4b5eae[_0x36d018(0x1e9)])?_0x4b5eae[_0x36d018(0x1e9)]:[],..._0x1c25b1!==undefined?{'extend':_0x1c25b1}:{},'stats':{'fieldCount':_0xad17e8['length'],'operationCount':_0x2a715b['length']}}};}};
1
+ const a63_0x15785d=a63_0x2eac;(function(_0x1d6818,_0x3e86da){const _0x5ab22=a63_0x2eac,_0x5132b5=_0x1d6818();while(!![]){try{const _0x1dec3c=parseInt(_0x5ab22(0x1c9))/0x1+-parseInt(_0x5ab22(0x1ca))/0x2+-parseInt(_0x5ab22(0x19e))/0x3+parseInt(_0x5ab22(0x1b9))/0x4+-parseInt(_0x5ab22(0x19f))/0x5*(-parseInt(_0x5ab22(0x1c2))/0x6)+parseInt(_0x5ab22(0x1c0))/0x7*(parseInt(_0x5ab22(0x1b1))/0x8)+-parseInt(_0x5ab22(0x1e4))/0x9*(parseInt(_0x5ab22(0x1a0))/0xa);if(_0x1dec3c===_0x3e86da)break;else _0x5132b5['push'](_0x5132b5['shift']());}catch(_0x4833a8){_0x5132b5['push'](_0x5132b5['shift']());}}}(a63_0x454c,0x59115));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a63_0x454c(){const _0x4712a2=['required','3331962UmkBVF','responseBody','properties','requestBody','deleted','datasetKey','trim','split','extend','modelId','options','labelField','modifierNameField','fromField','object','1275234WFqKBo','672935hYuzxj','20fdGjBt','updateTimeField','toDatasetName','requestFields','alias','relationId','modelCode','validateRules','dbType','host','displayName','length','deprecated','toFieldLabel','sourceType','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','tableName','376WbvYNc','formatRules','title','parse','string','indexes','read','relations','2880788TzvfIH','relatedPageInfoList','columnCodeListWithDeleted','tableComment','map','fields','toDatasetCode','87353QOJLJb','createTimeField','6hhXfIy','description','toField','isArray','creatorIdField','filter','cardinality','543683VHtMmx','909290KfAzky','dataset','main_sub','push','toTableName','pkField','beforeScriptId','detail','entries','name','type','dbtableConfig','dbName','source','method','creatorNameField','doType','dataType','dbId','allFields','bizRelationType','afterScriptId','code','path','logicField'];a63_0x454c=function(){return _0x4712a2;};return a63_0x454c();}function normalizeField(_0x6b014c){const _0x3c735d=a63_0x2eac;if(_0x6b014c[_0x3c735d(0x1e8)])return null;const _0x5157ba=Boolean(_0x6b014c[_0x3c735d(0x1aa)]!==undefined||_0x6b014c[_0x3c735d(0x1da)]!==undefined);let _0x20a3aa={};if(!_0x5157ba&&typeof _0x6b014c[_0x3c735d(0x1ec)]==='string')try{_0x20a3aa=JSON[_0x3c735d(0x1b4)](_0x6b014c[_0x3c735d(0x1ec)]);}catch{}const _0x1fe014=_0x5157ba?_0x6b014c[_0x3c735d(0x1d3)]:_0x6b014c['code'],_0x2bc15e=_0x5157ba?_0x6b014c[_0x3c735d(0x1aa)]:_0x6b014c['name'],_0x2bfb3e=_0x5157ba?_0x6b014c[_0x3c735d(0x1da)]:_0x6b014c['type']||_0x6b014c[_0x3c735d(0x1db)],_0x270534=_0x5157ba?_0x6b014c[_0x3c735d(0x1cf)]===!![]:_0x20a3aa[_0x3c735d(0x1cf)]===!![],_0xd5f020=_0x5157ba?_0x6b014c[_0x3c735d(0x1e3)]===!![]:_0x20a3aa[_0x3c735d(0x1e3)]===!![],_0x21e246=_0x5157ba?_0x6b014c['options']??null:_0x20a3aa[_0x3c735d(0x1ee)]??null,_0x1af0f5={'name':_0x1fe014,'displayName':_0x2bc15e||_0x1fe014,'type':_0x2bfb3e,'dbType':_0x6b014c[_0x3c735d(0x1a8)],'pk':_0x270534,'required':_0xd5f020,'deprecated':_0x6b014c[_0x3c735d(0x1ac)]===!![],'description':_0x6b014c['description']||undefined};return Array[_0x3c735d(0x1c5)](_0x21e246)&&_0x21e246[_0x3c735d(0x1ab)]>0x0&&(_0x1af0f5['options']=_0x21e246),_0x1af0f5;}function a63_0x2eac(_0x12359f,_0xcf0d54){_0x12359f=_0x12359f-0x19c;const _0x454c9a=a63_0x454c();let _0x2eacf9=_0x454c9a[_0x12359f];return _0x2eacf9;}function parseJsonMaybe(_0x5b342c){const _0x2fcab8=a63_0x2eac;if(typeof _0x5b342c!==_0x2fcab8(0x1b5))return _0x5b342c;try{return JSON['parse'](_0x5b342c);}catch{return _0x5b342c;}}function normalizeOperationEntry(_0x2d8e49,_0x209aa1){const _0xa425d3=a63_0x2eac;if(!_0x209aa1||typeof _0x209aa1!==_0xa425d3(0x19d))return null;if(!_0x209aa1[_0xa425d3(0x1d8)]||!_0x209aa1['path'])return null;const _0x71b622={'name':_0x2d8e49,'method':_0x209aa1[_0xa425d3(0x1d8)],'path':_0x209aa1[_0xa425d3(0x1e1)]};if(_0x209aa1[_0xa425d3(0x1a9)])_0x71b622[_0xa425d3(0x1a9)]=_0x209aa1[_0xa425d3(0x1a9)];if(_0x209aa1[_0xa425d3(0x1e7)]!=null){const _0x25b0e4=parseJsonMaybe(_0x209aa1[_0xa425d3(0x1e7)]);_0x71b622[_0xa425d3(0x1e7)]=_0x25b0e4;}if(_0x209aa1['responseBody']!=null){const _0x376f8b=parseJsonMaybe(_0x209aa1[_0xa425d3(0x1e5)]);_0x71b622[_0xa425d3(0x1e5)]=_0x376f8b;}if(_0x209aa1[_0xa425d3(0x1d0)]!=null)_0x71b622['beforeScriptId']=_0x209aa1[_0xa425d3(0x1d0)];if(_0x209aa1[_0xa425d3(0x1df)]!=null)_0x71b622[_0xa425d3(0x1df)]=_0x209aa1[_0xa425d3(0x1df)];if(Array[_0xa425d3(0x1c5)](_0x209aa1[_0xa425d3(0x1a3)]))_0x71b622[_0xa425d3(0x1a3)]=_0x209aa1[_0xa425d3(0x1a3)];if(Array[_0xa425d3(0x1c5)](_0x209aa1['responseFields']))_0x71b622['responseFields']=_0x209aa1['responseFields'];return _0x71b622;}function summarizeDbtable(_0x345de2){const _0x48140c=a63_0x2eac,_0x12693b={},_0x2e9181=[_0x48140c(0x1dc),_0x48140c(0x1d6),_0x48140c(0x1b0),'datasetKey',_0x48140c(0x1cf),_0x48140c(0x1dd),_0x48140c(0x1e2),_0x48140c(0x1c1),_0x48140c(0x1a1),_0x48140c(0x1c6),_0x48140c(0x1d9),'modifierIdField',_0x48140c(0x1f0),_0x48140c(0x1ef),'dblinkInfoDTO'];for(const _0x5cad6f of _0x2e9181){if(_0x345de2[_0x5cad6f]!==undefined)_0x12693b[_0x5cad6f]=_0x345de2[_0x5cad6f];}return typeof _0x12693b[_0x48140c(0x1dd)]===_0x48140c(0x1b5)&&_0x12693b[_0x48140c(0x1dd)][_0x48140c(0x1ab)]>0x0&&(_0x12693b['allFieldNames']=_0x12693b[_0x48140c(0x1dd)][_0x48140c(0x1eb)](',')[_0x48140c(0x1bd)](_0x134fdd=>_0x134fdd[_0x48140c(0x1ea)]())[_0x48140c(0x1c7)](Boolean)),_0x12693b;}function normalizeRelatedPages(_0x4a6951){const _0x1f3ccc=a63_0x2eac;if(!Array[_0x1f3ccc(0x1c5)](_0x4a6951))return[];return _0x4a6951['filter'](_0x4b1728=>_0x4b1728&&typeof _0x4b1728===_0x1f3ccc(0x19d))['map'](_0x540d56=>({'id':_0x540d56['id'],'type':_0x540d56[_0x1f3ccc(0x1d4)],'code':_0x540d56['code'],'title':_0x540d56[_0x1f3ccc(0x1b3)],'deleted':_0x540d56[_0x1f3ccc(0x1e8)]===!![]}));}export const datasetDetail={'service':a63_0x15785d(0x1cb),'command':a63_0x15785d(0x1d1),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a63_0x15785d(0x1b7),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x15785d(0x1a4),'type':a63_0x15785d(0x1b5),'description':a63_0x15785d(0x1af)}],async 'execute'(_0x2d94f1){const _0xeeedb5=a63_0x15785d,_0x1f8c84=await getDatasetDetail(_0x2d94f1['str'](_0xeeedb5(0x1e0))),_0x272e57=Array[_0xeeedb5(0x1c5)](_0x1f8c84[_0xeeedb5(0x1be)])?_0x1f8c84[_0xeeedb5(0x1be)]:Array[_0xeeedb5(0x1c5)](_0x1f8c84[_0xeeedb5(0x1e6)])?_0x1f8c84[_0xeeedb5(0x1e6)]:[],_0x383a6d=_0x272e57[_0xeeedb5(0x1bd)](_0x5e471f=>normalizeField(_0x5e471f))[_0xeeedb5(0x1c7)](_0x2ffe2b=>_0x2ffe2b!==null),_0x4d92f9=_0x1f8c84['operations']??{},_0x46a8b9=[];for(const [_0x2234d8,_0x14d123]of Object[_0xeeedb5(0x1d2)](_0x4d92f9)){const _0x2f49d2=normalizeOperationEntry(_0x2234d8,_0x14d123);if(_0x2f49d2)_0x46a8b9[_0xeeedb5(0x1cd)](_0x2f49d2);}const _0x178d1d=_0x1f8c84[_0xeeedb5(0x1d5)]??{},_0x207c35=_0x1f8c84[_0xeeedb5(0x1cb)]??{},_0x328ce6=_0x178d1d[_0xeeedb5(0x1dc)]!=null?{'id':_0x178d1d[_0xeeedb5(0x1dc)],'name':_0x178d1d[_0xeeedb5(0x1d6)]??null}:undefined;let _0x30bbe8;return typeof _0x1f8c84['extend']==='string'&&(_0x30bbe8=parseJsonMaybe(_0x1f8c84['extend'])),{'ok':!![],'data':{'id':_0x1f8c84[_0xeeedb5(0x1ed)]??_0x1f8c84['id'],'name':_0x1f8c84['name'],'code':_0x1f8c84['modelCode']||_0x1f8c84[_0xeeedb5(0x1e0)],'doVersion':_0x1f8c84['doVersion'],'description':_0x1f8c84[_0xeeedb5(0x1c3)]||_0x207c35[_0xeeedb5(0x1bc)]||undefined,'source':_0x1f8c84[_0xeeedb5(0x1d7)]||_0x207c35[_0xeeedb5(0x1ae)],'table':_0x178d1d[_0xeeedb5(0x1b0)]||_0x207c35[_0xeeedb5(0x1b0)],'datasetKey':_0x178d1d[_0xeeedb5(0x1e9)],'pk':_0x178d1d['pkField'],'db':_0x328ce6,'dbtable':summarizeDbtable(_0x178d1d),'fields':_0x383a6d,'operations':_0x46a8b9,'indexes':Array[_0xeeedb5(0x1c5)](_0x207c35['indexes'])?_0x207c35[_0xeeedb5(0x1b6)]:[],'relations':Array[_0xeeedb5(0x1c5)](_0x1f8c84[_0xeeedb5(0x1b8)])?_0x1f8c84[_0xeeedb5(0x1b8)][_0xeeedb5(0x1bd)](_0x16e05c=>({..._0x16e05c[_0xeeedb5(0x1a5)]!=null?{'relationId':_0x16e05c[_0xeeedb5(0x1a5)]}:{},'fromDataset':_0x1f8c84['name'],'fromCode':_0x1f8c84[_0xeeedb5(0x1a6)]||_0x1f8c84[_0xeeedb5(0x1e0)],'fromTable':_0x178d1d['tableName']||_0x207c35[_0xeeedb5(0x1b0)],'fromField':_0x16e05c[_0xeeedb5(0x19c)],'toDataset':_0x16e05c[_0xeeedb5(0x1a2)],'toCode':_0x16e05c[_0xeeedb5(0x1bf)],'toTable':_0x16e05c[_0xeeedb5(0x1ce)],'toField':_0x16e05c[_0xeeedb5(0x1c4)],'labelField':_0x16e05c[_0xeeedb5(0x1ad)]||undefined,'cardinality':_0x16e05c[_0xeeedb5(0x1c8)]||undefined,'bizRelationType':_0x16e05c[_0xeeedb5(0x1de)]===_0xeeedb5(0x1cc)?_0xeeedb5(0x1cc):null})):[],'relatedPages':normalizeRelatedPages(_0x1f8c84[_0xeeedb5(0x1ba)]),...Array[_0xeeedb5(0x1c5)](_0x1f8c84['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x1f8c84[_0xeeedb5(0x1bb)]}:{},'formatRules':Array[_0xeeedb5(0x1c5)](_0x1f8c84['formatRules'])?_0x1f8c84[_0xeeedb5(0x1b2)]:[],'validateRules':Array[_0xeeedb5(0x1c5)](_0x1f8c84[_0xeeedb5(0x1a7)])?_0x1f8c84['validateRules']:[],..._0x30bbe8!==undefined?{'extend':_0x30bbe8}:{},'stats':{'fieldCount':_0x383a6d['length'],'operationCount':_0x46a8b9[_0xeeedb5(0x1ab)]}}};}};
@@ -1 +1 @@
1
- const a64_0xa93775=a64_0x503a;(function(_0x224f6e,_0x35fed6){const _0x1fa319=a64_0x503a,_0x4a2537=_0x224f6e();while(!![]){try{const _0xe0c171=-parseInt(_0x1fa319(0x201))/0x1*(parseInt(_0x1fa319(0x1ee))/0x2)+parseInt(_0x1fa319(0x203))/0x3*(parseInt(_0x1fa319(0x1f7))/0x4)+parseInt(_0x1fa319(0x1da))/0x5*(parseInt(_0x1fa319(0x1fe))/0x6)+parseInt(_0x1fa319(0x1de))/0x7*(-parseInt(_0x1fa319(0x1d9))/0x8)+-parseInt(_0x1fa319(0x1ce))/0x9*(-parseInt(_0x1fa319(0x1ff))/0xa)+parseInt(_0x1fa319(0x1d6))/0xb*(-parseInt(_0x1fa319(0x1d3))/0xc)+-parseInt(_0x1fa319(0x1df))/0xd;if(_0xe0c171===_0x35fed6)break;else _0x4a2537['push'](_0x4a2537['shift']());}catch(_0x5baa78){_0x4a2537['push'](_0x4a2537['shift']());}}}(a64_0x34ce,0x83a75));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0xa93775(0x1f0),{'message':a64_0xa93775(0x1f2),'hint':a64_0xa93775(0x200)}]]);export function parseJsonObjectFlag(_0x195d5d,_0x5badf3){const _0x264dde=a64_0xa93775;if(!_0x195d5d)return undefined;let _0x266ad5;try{_0x266ad5=JSON[_0x264dde(0x1e6)](_0x195d5d);}catch(_0x34f7f1){const _0x1a13bb=_0x34f7f1 instanceof Error?_0x34f7f1[_0x264dde(0x1f1)]:String(_0x34f7f1);throw CliErrors[_0x264dde(0x1f6)](_0x5badf3+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x1a13bb);}if(!isPlainObject(_0x266ad5)||Array[_0x264dde(0x1cd)](_0x266ad5))throw CliErrors[_0x264dde(0x1f6)](_0x5badf3+_0x264dde(0x1ec));return _0x266ad5;}export function validateExtendPatchKeys(_0x238821){const _0x2cb809=a64_0xa93775,_0x223907=Object[_0x2cb809(0x1e3)](_0x238821);if(_0x223907[_0x2cb809(0x1dc)]===0x0)throw CliErrors[_0x2cb809(0x1f6)](_0x2cb809(0x1d7));for(const _0x20dd68 of _0x223907){const _0x58afa0=EXTEND_PATCH_REDIRECTS[_0x2cb809(0x1f5)](_0x20dd68);if(_0x58afa0)throw CliErrors[_0x2cb809(0x1f6)](_0x58afa0['message'],_0x58afa0['hint']);if(!MUTABLE_EXTEND_KEYS[_0x2cb809(0x1fa)](_0x20dd68))throw CliErrors[_0x2cb809(0x1f6)]('Unsupported\x20patch\x20key:\x20'+_0x20dd68,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x42246f=a64_0xa93775,_0x48ddff=Array[_0x42246f(0x1e0)](MUTABLE_EXTEND_KEYS)[_0x42246f(0x204)]();return _0x48ddff[_0x42246f(0x1dc)]>0x0?_0x42246f(0x1c8)+_0x48ddff[_0x42246f(0x1ef)](',\x20'):_0x42246f(0x1ea);}export function applyExtendPatch(_0x47ec76,_0x5d9dce){const _0x425948=a64_0xa93775;validateExtendPatchKeys(_0x5d9dce);const _0x3caf53=deepClone(_0x47ec76),_0x498324=[];for(const [_0x41d16f,_0x3ea180]of Object[_0x425948(0x1e9)](_0x5d9dce)){const _0x551ca3=_0x3caf53[_0x41d16f],_0x49e5ad=deepClone(_0x3ea180);!deepEqual(_0x551ca3,_0x49e5ad)&&(_0x3caf53[_0x41d16f]=_0x49e5ad,_0x498324['push'](_0x425948(0x1cb)+_0x41d16f));}return _0x498324[_0x425948(0x204)](),{'after':_0x3caf53,'changedPaths':_0x498324,'changed':_0x498324[_0x425948(0x1dc)]>0x0};}export function assertExpectation(_0x49e8e2,_0x36e462){const _0x4cdb0f=a64_0xa93775;if(!_0x36e462)return;for(const [_0x59c0ea,_0x5c22d3]of Object[_0x4cdb0f(0x1e9)](_0x36e462)){const _0x362f91=_0x49e8e2[_0x59c0ea];if(!deepEqual(_0x362f91,_0x5c22d3))throw CliErrors[_0x4cdb0f(0x1f6)](_0x4cdb0f(0x1c9)+_0x59c0ea,_0x4cdb0f(0x205)+JSON[_0x4cdb0f(0x1f8)](_0x5c22d3)+',\x20actual\x20'+JSON['stringify'](_0x362f91));}}export async function buildDatasetExtendUpdateResult({appCode:_0x42bcb8,input:_0x69876a,dryRun:_0xaedfde}){const _0x13c919=a64_0xa93775;validateInput(_0x69876a);const _0x407dd8=await getDatasetDetail(_0x69876a['code']),_0x5953e1=parseDatasetExtend(_0x407dd8[_0x13c919(0x1e8)]),_0x5a3059=deepClone(_0x5953e1['value']);assertExpectation(_0x5a3059,_0x69876a[_0x13c919(0x209)]);const {after:_0x2970f1,changedPaths:_0x496b2c,changed:_0x5b42cb}=applyExtendPatch(_0x5a3059,_0x69876a[_0x13c919(0x1e5)]),_0x59614f=summarizeDataset(_0x407dd8,_0x69876a['code']);return _0x5b42cb&&!_0xaedfde&&(_0x407dd8[_0x13c919(0x1e8)]=serializeDatasetExtend(_0x2970f1,_0x5953e1[_0x13c919(0x1d8)]),await updateDrivenData(_0x407dd8)),{'ok':!![],'data':{'appCode':_0x42bcb8,'selector':{'code':_0x69876a[_0x13c919(0x1d4)]},'dataset':_0x59614f,'dryRun':_0xaedfde,'changed':_0x5b42cb,'changedPaths':_0x496b2c,'before':{'extend':_0x5a3059},'after':{'extend':_0x2970f1},'submitted':_0x5b42cb&&!_0xaedfde},'message':_0x5b42cb?_0xaedfde?_0x13c919(0x1f3)+_0x496b2c[_0x13c919(0x1ef)](',\x20')+')':'Updated\x20dataset\x20extend\x20('+_0x496b2c[_0x13c919(0x1ef)](',\x20')+')':_0x13c919(0x1e2)};}export const datasetExtendUpdate={'service':a64_0xa93775(0x1cc),'command':a64_0xa93775(0x1f4),'description':a64_0xa93775(0x1eb),'risk':'write','flags':[CODE_FLAG,{'name':'patch-json','type':a64_0xa93775(0x202),'required':!![],'description':a64_0xa93775(0x1ed)},{'name':a64_0xa93775(0x1e1),'type':a64_0xa93775(0x202),'required':![],'description':a64_0xa93775(0x1e7)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b0864){validateInput(readExtendUpdateInput(_0x1b0864));},async 'dryRun'(_0x4800ed){const _0x96a582=a64_0xa93775,_0x291b04=await buildDatasetExtendUpdateResult({'appCode':_0x4800ed[_0x96a582(0x1f9)],'input':readExtendUpdateInput(_0x4800ed),'dryRun':!![]});return{'method':'POST','url':_0x96a582(0x208),'body':_0x291b04[_0x96a582(0x1d1)],'description':_0x291b04[_0x96a582(0x1f1)]};},async 'execute'(_0x60614a){const _0x33d424=a64_0xa93775;return buildDatasetExtendUpdateResult({'appCode':_0x60614a[_0x33d424(0x1f9)],'input':readExtendUpdateInput(_0x60614a),'dryRun':![]});}};function readExtendUpdateInput(_0x209693){const _0x31c0cf=a64_0xa93775,_0x3295ec=trim(_0x209693[_0x31c0cf(0x1dd)](_0x31c0cf(0x1d4))),_0x4b5815=parseJsonObjectFlag(_0x209693[_0x31c0cf(0x1dd)]('patch-json'),'--patch-json'),_0x2fa765=parseJsonObjectFlag(_0x209693[_0x31c0cf(0x1dd)](_0x31c0cf(0x1e1)),_0x31c0cf(0x1cf));return{'code':_0x3295ec,'patch':_0x4b5815||{},'expect':_0x2fa765};}function validateInput(_0x102373){const _0x189d72=a64_0xa93775;if(!_0x102373[_0x189d72(0x1d4)])throw CliErrors[_0x189d72(0x1f6)]('--code\x20is\x20required');validateExtendPatchKeys(_0x102373[_0x189d72(0x1e5)]);}function parseDatasetExtend(_0x134efc){const _0x1d6430=a64_0xa93775;if(typeof _0x134efc===_0x1d6430(0x202)){const _0xa0b6=_0x134efc['trim']();if(!_0xa0b6)return{'value':{},'shape':_0x1d6430(0x202)};let _0x809188;try{_0x809188=JSON[_0x1d6430(0x1e6)](_0xa0b6);}catch(_0x5c4ee1){const _0x4c2906=_0x5c4ee1 instanceof Error?_0x5c4ee1[_0x1d6430(0x1f1)]:String(_0x5c4ee1);throw CliErrors[_0x1d6430(0x1f6)](_0x1d6430(0x1ca)+_0x4c2906);}if(!isPlainObject(_0x809188)||Array[_0x1d6430(0x1cd)](_0x809188))throw CliErrors['validation'](_0x1d6430(0x1fd));return{'value':_0x809188,'shape':_0x1d6430(0x202)};}if(_0x134efc===undefined||_0x134efc===null)return{'value':{},'shape':_0x1d6430(0x202)};if(!isPlainObject(_0x134efc)||Array['isArray'](_0x134efc))throw CliErrors[_0x1d6430(0x1f6)](_0x1d6430(0x1fd));return{'value':_0x134efc,'shape':'object'};}function serializeDatasetExtend(_0x38b6e3,_0x168295){const _0x374dba=a64_0xa93775;return _0x168295===_0x374dba(0x202)?JSON[_0x374dba(0x1f8)](_0x38b6e3):_0x38b6e3;}function summarizeDataset(_0x427f33,_0x488bc2){const _0x1300fe=a64_0xa93775,_0x54fe23=isPlainObject(_0x427f33['dataset'])?_0x427f33[_0x1300fe(0x1cc)]:{},_0xf5c5c8=isPlainObject(_0x427f33['dbtableConfig'])?_0x427f33[_0x1300fe(0x1d2)]:{};return{'id':_0x427f33['modelId']??_0x427f33['id']??_0x54fe23['datasetId']??null,'code':_0x427f33[_0x1300fe(0x1e4)]??_0x427f33['code']??_0x54fe23[_0x1300fe(0x1db)]??_0x488bc2,'name':_0x427f33[_0x1300fe(0x206)]??_0x54fe23[_0x1300fe(0x1fb)]??null,'table':_0xf5c5c8[_0x1300fe(0x207)]??_0x54fe23[_0x1300fe(0x207)]??null,'db':_0xf5c5c8[_0x1300fe(0x1fc)]??_0xf5c5c8['dbId']??null};}function a64_0x503a(_0x4a639e,_0x89d161){_0x4a639e=_0x4a639e-0x1c8;const _0x34ceea=a64_0x34ce();let _0x503ad8=_0x34ceea[_0x4a639e];return _0x503ad8;}function deepClone(_0x275700){const _0x11694a=a64_0xa93775;if(_0x275700===undefined)return _0x275700;return JSON[_0x11694a(0x1e6)](JSON['stringify'](_0x275700));}function a64_0x34ce(){const _0x2ca679=['object','data','dbtableConfig','444jfRSxj','code','trim','113817iJsrPj','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','shape','32nqOWFY','4832135VTPrsT','datasetCode','length','str','97293upgAHH','13237146RPteWv','from','expect-json','No\x20changes\x20for\x20dataset\x20extend','keys','modelCode','patch','parse','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','extend','entries','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','Patch\x20dataset\x20top-level\x20extend\x20safely','\x20must\x20be\x20a\x20JSON\x20object','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','2wcnirb','join','businessGroup','message','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','extend-update','get','validation','2508536CtSryz','stringify','appCode','has','datasetName','dbName','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','6SMaeab','20GwZsuk','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','246133edwjXw','string','3EpJuTz','sort','Expected\x20','name','tableName','/smartapi/dataset/update-driven-data','expect','Allowed\x20keys:\x20','Expectation\x20mismatch\x20at\x20extend.','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','extend.','dataset','isArray','2918259xpigMG','--expect-json'];a64_0x34ce=function(){return _0x2ca679;};return a64_0x34ce();}function deepEqual(_0x15dec8,_0x16724f){const _0x4396c0=a64_0xa93775;return JSON['stringify'](_0x15dec8)===JSON[_0x4396c0(0x1f8)](_0x16724f);}function isPlainObject(_0x2ae0d1){const _0x38f6d6=a64_0xa93775;return Boolean(_0x2ae0d1)&&typeof _0x2ae0d1===_0x38f6d6(0x1d0)&&!Array[_0x38f6d6(0x1cd)](_0x2ae0d1);}function trim(_0x4592a3){const _0x2c6f0f=a64_0xa93775,_0x5486ac=String(_0x4592a3||'')[_0x2c6f0f(0x1d5)]();return _0x5486ac;}
1
+ const a64_0x161670=a64_0x5cd6;(function(_0x411845,_0xccefe9){const _0x51c7a0=a64_0x5cd6,_0x53c4b6=_0x411845();while(!![]){try{const _0x37404d=-parseInt(_0x51c7a0(0xb3))/0x1+parseInt(_0x51c7a0(0xb2))/0x2*(-parseInt(_0x51c7a0(0xc3))/0x3)+-parseInt(_0x51c7a0(0xcb))/0x4*(parseInt(_0x51c7a0(0xc4))/0x5)+parseInt(_0x51c7a0(0xe0))/0x6*(parseInt(_0x51c7a0(0xbf))/0x7)+-parseInt(_0x51c7a0(0xd6))/0x8*(-parseInt(_0x51c7a0(0xed))/0x9)+parseInt(_0x51c7a0(0xc9))/0xa*(parseInt(_0x51c7a0(0xc2))/0xb)+parseInt(_0x51c7a0(0xee))/0xc*(parseInt(_0x51c7a0(0xd0))/0xd);if(_0x37404d===_0xccefe9)break;else _0x53c4b6['push'](_0x53c4b6['shift']());}catch(_0x4e11a9){_0x53c4b6['push'](_0x53c4b6['shift']());}}}(a64_0x3a80,0x62b40));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0x161670(0xba),{'message':a64_0x161670(0xc5),'hint':a64_0x161670(0xbc)}]]);export function parseJsonObjectFlag(_0x5c7a1e,_0x164451){const _0x304dc2=a64_0x161670;if(!_0x5c7a1e)return undefined;let _0x11c05f;try{_0x11c05f=JSON['parse'](_0x5c7a1e);}catch(_0x395a5b){const _0x909742=_0x395a5b instanceof Error?_0x395a5b[_0x304dc2(0xeb)]:String(_0x395a5b);throw CliErrors[_0x304dc2(0xd3)](_0x164451+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x909742);}if(!isPlainObject(_0x11c05f)||Array[_0x304dc2(0xd4)](_0x11c05f))throw CliErrors[_0x304dc2(0xd3)](_0x164451+_0x304dc2(0xb4));return _0x11c05f;}export function validateExtendPatchKeys(_0x100033){const _0x267aa7=a64_0x161670,_0x37b4aa=Object['keys'](_0x100033);if(_0x37b4aa[_0x267aa7(0xe6)]===0x0)throw CliErrors[_0x267aa7(0xd3)](_0x267aa7(0xe2));for(const _0x817617 of _0x37b4aa){const _0x45c19b=EXTEND_PATCH_REDIRECTS[_0x267aa7(0xc1)](_0x817617);if(_0x45c19b)throw CliErrors[_0x267aa7(0xd3)](_0x45c19b[_0x267aa7(0xeb)],_0x45c19b[_0x267aa7(0xe9)]);if(!MUTABLE_EXTEND_KEYS[_0x267aa7(0xb1)](_0x817617))throw CliErrors[_0x267aa7(0xd3)](_0x267aa7(0xb5)+_0x817617,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x2e5b82=a64_0x161670,_0x269a85=Array[_0x2e5b82(0xbe)](MUTABLE_EXTEND_KEYS)['sort']();return _0x269a85[_0x2e5b82(0xe6)]>0x0?_0x2e5b82(0xe7)+_0x269a85['join'](',\x20'):'No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.';}export function applyExtendPatch(_0x12994b,_0x132660){const _0x3750b5=a64_0x161670;validateExtendPatchKeys(_0x132660);const _0x2a546e=deepClone(_0x12994b),_0x26a439=[];for(const [_0x34e2ea,_0x31cb55]of Object['entries'](_0x132660)){const _0x1def24=_0x2a546e[_0x34e2ea],_0x3657b8=deepClone(_0x31cb55);!deepEqual(_0x1def24,_0x3657b8)&&(_0x2a546e[_0x34e2ea]=_0x3657b8,_0x26a439[_0x3750b5(0xc6)]('extend.'+_0x34e2ea));}return _0x26a439['sort'](),{'after':_0x2a546e,'changedPaths':_0x26a439,'changed':_0x26a439[_0x3750b5(0xe6)]>0x0};}export function assertExpectation(_0x540cf6,_0x25cd1d){const _0x562f49=a64_0x161670;if(!_0x25cd1d)return;for(const [_0x709037,_0x4bcaff]of Object['entries'](_0x25cd1d)){const _0x3d3e2c=_0x540cf6[_0x709037];if(!deepEqual(_0x3d3e2c,_0x4bcaff))throw CliErrors[_0x562f49(0xd3)]('Expectation\x20mismatch\x20at\x20extend.'+_0x709037,'Expected\x20'+JSON[_0x562f49(0xdb)](_0x4bcaff)+_0x562f49(0xcc)+JSON[_0x562f49(0xdb)](_0x3d3e2c));}}export async function buildDatasetExtendUpdateResult({appCode:_0x1052fe,input:_0x18229f,dryRun:_0x5306fd}){const _0x3d10e6=a64_0x161670;validateInput(_0x18229f);const _0x238fa4=await getDatasetDetail(_0x18229f['code']),_0x46b1cc=parseDatasetExtend(_0x238fa4[_0x3d10e6(0xe8)]),_0x4a752f=deepClone(_0x46b1cc[_0x3d10e6(0xc7)]);assertExpectation(_0x4a752f,_0x18229f[_0x3d10e6(0xe5)]);const {after:_0xf8470a,changedPaths:_0x18023c,changed:_0x4139e0}=applyExtendPatch(_0x4a752f,_0x18229f[_0x3d10e6(0xd9)]),_0x6ee126=summarizeDataset(_0x238fa4,_0x18229f[_0x3d10e6(0xe1)]);return _0x4139e0&&!_0x5306fd&&(_0x238fa4[_0x3d10e6(0xe8)]=serializeDatasetExtend(_0xf8470a,_0x46b1cc['shape']),await updateDrivenData(_0x238fa4)),{'ok':!![],'data':{'appCode':_0x1052fe,'selector':{'code':_0x18229f[_0x3d10e6(0xe1)]},'dataset':_0x6ee126,'dryRun':_0x5306fd,'changed':_0x4139e0,'changedPaths':_0x18023c,'before':{'extend':_0x4a752f},'after':{'extend':_0xf8470a},'submitted':_0x4139e0&&!_0x5306fd},'message':_0x4139e0?_0x5306fd?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x18023c['join'](',\x20')+')':'Updated\x20dataset\x20extend\x20('+_0x18023c['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a64_0x161670(0xda),'command':a64_0x161670(0xce),'description':a64_0x161670(0xd8),'risk':a64_0x161670(0xd1),'flags':[CODE_FLAG,{'name':a64_0x161670(0xb0),'type':a64_0x161670(0xdf),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a64_0x161670(0xb8),'type':a64_0x161670(0xdf),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xa84d90){validateInput(readExtendUpdateInput(_0xa84d90));},async 'dryRun'(_0x59b931){const _0x5e1bdd=a64_0x161670,_0x5d2da5=await buildDatasetExtendUpdateResult({'appCode':_0x59b931[_0x5e1bdd(0xdd)],'input':readExtendUpdateInput(_0x59b931),'dryRun':!![]});return{'method':_0x5e1bdd(0xb7),'url':'/smartapi/dataset/update-driven-data','body':_0x5d2da5[_0x5e1bdd(0xe3)],'description':_0x5d2da5[_0x5e1bdd(0xeb)]};},async 'execute'(_0xec4e97){const _0x302c05=a64_0x161670;return buildDatasetExtendUpdateResult({'appCode':_0xec4e97[_0x302c05(0xdd)],'input':readExtendUpdateInput(_0xec4e97),'dryRun':![]});}};function readExtendUpdateInput(_0x3e1d21){const _0x5e3bbf=a64_0x161670,_0x37888d=trim(_0x3e1d21[_0x5e3bbf(0xd5)](_0x5e3bbf(0xe1))),_0x214d6d=parseJsonObjectFlag(_0x3e1d21[_0x5e3bbf(0xd5)]('patch-json'),_0x5e3bbf(0xb9)),_0x1d55fc=parseJsonObjectFlag(_0x3e1d21[_0x5e3bbf(0xd5)]('expect-json'),_0x5e3bbf(0xcf));return{'code':_0x37888d,'patch':_0x214d6d||{},'expect':_0x1d55fc};}function validateInput(_0x575c9f){const _0x4c6386=a64_0x161670;if(!_0x575c9f[_0x4c6386(0xe1)])throw CliErrors['validation'](_0x4c6386(0xb6));validateExtendPatchKeys(_0x575c9f[_0x4c6386(0xd9)]);}function parseDatasetExtend(_0x2f4cef){const _0x536f72=a64_0x161670;if(typeof _0x2f4cef===_0x536f72(0xdf)){const _0x3e9244=_0x2f4cef[_0x536f72(0xbd)]();if(!_0x3e9244)return{'value':{},'shape':_0x536f72(0xdf)};let _0x572eff;try{_0x572eff=JSON[_0x536f72(0xaf)](_0x3e9244);}catch(_0x35467d){const _0x2a5fcb=_0x35467d instanceof Error?_0x35467d[_0x536f72(0xeb)]:String(_0x35467d);throw CliErrors[_0x536f72(0xd3)](_0x536f72(0xe4)+_0x2a5fcb);}if(!isPlainObject(_0x572eff)||Array[_0x536f72(0xd4)](_0x572eff))throw CliErrors[_0x536f72(0xd3)](_0x536f72(0xdc));return{'value':_0x572eff,'shape':'string'};}if(_0x2f4cef===undefined||_0x2f4cef===null)return{'value':{},'shape':_0x536f72(0xdf)};if(!isPlainObject(_0x2f4cef)||Array[_0x536f72(0xd4)](_0x2f4cef))throw CliErrors['validation'](_0x536f72(0xdc));return{'value':_0x2f4cef,'shape':_0x536f72(0xea)};}function serializeDatasetExtend(_0x3bf58b,_0x315d72){const _0xffdb01=a64_0x161670;return _0x315d72===_0xffdb01(0xdf)?JSON[_0xffdb01(0xdb)](_0x3bf58b):_0x3bf58b;}function summarizeDataset(_0x5079e0,_0x102eb1){const _0x43a4d6=a64_0x161670,_0x1dd153=isPlainObject(_0x5079e0[_0x43a4d6(0xda)])?_0x5079e0['dataset']:{},_0x172c91=isPlainObject(_0x5079e0[_0x43a4d6(0xd2)])?_0x5079e0[_0x43a4d6(0xd2)]:{};return{'id':_0x5079e0[_0x43a4d6(0xde)]??_0x5079e0['id']??_0x1dd153[_0x43a4d6(0xbb)]??null,'code':_0x5079e0[_0x43a4d6(0xc0)]??_0x5079e0[_0x43a4d6(0xe1)]??_0x1dd153[_0x43a4d6(0xcd)]??_0x102eb1,'name':_0x5079e0['name']??_0x1dd153[_0x43a4d6(0xc8)]??null,'table':_0x172c91[_0x43a4d6(0xd7)]??_0x1dd153[_0x43a4d6(0xd7)]??null,'db':_0x172c91[_0x43a4d6(0xca)]??_0x172c91[_0x43a4d6(0xec)]??null};}function deepClone(_0x49ad41){const _0x34fc6a=a64_0x161670;if(_0x49ad41===undefined)return _0x49ad41;return JSON[_0x34fc6a(0xaf)](JSON['stringify'](_0x49ad41));}function deepEqual(_0x278251,_0x502abe){const _0x1d5c43=a64_0x161670;return JSON['stringify'](_0x278251)===JSON[_0x1d5c43(0xdb)](_0x502abe);}function isPlainObject(_0x398e07){const _0x2cc820=a64_0x161670;return Boolean(_0x398e07)&&typeof _0x398e07===_0x2cc820(0xea)&&!Array[_0x2cc820(0xd4)](_0x398e07);}function trim(_0x46543b){const _0x538a86=a64_0x161670,_0x189459=String(_0x46543b||'')[_0x538a86(0xbd)]();return _0x189459;}function a64_0x5cd6(_0x19ba38,_0x22cfa0){_0x19ba38=_0x19ba38-0xaf;const _0x3a8058=a64_0x3a80();let _0x5cd677=_0x3a8058[_0x19ba38];return _0x5cd677;}function a64_0x3a80(){const _0x421549=['value','datasetName','3853510VPlqZC','dbName','169308CqZEyU',',\x20actual\x20','datasetCode','extend-update','--expect-json','78GQuFbR','write','dbtableConfig','validation','isArray','str','80616GlOxPU','tableName','Patch\x20dataset\x20top-level\x20extend\x20safely','patch','dataset','stringify','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','appCode','modelId','string','7476TOisxS','code','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','data','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','expect','length','Allowed\x20keys:\x20','extend','hint','object','message','dbId','495KCqZAw','2140764EMNZVf','parse','patch-json','has','2bOdeyL','624798YBlEIL','\x20must\x20be\x20a\x20JSON\x20object','Unsupported\x20patch\x20key:\x20','--code\x20is\x20required','POST','expect-json','--patch-json','businessGroup','datasetId','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','trim','from','1897gBXvAY','modelCode','get','11uBkxYl','1796967SEguSR','85mmdbRK','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','push'];a64_0x3a80=function(){return _0x421549;};return a64_0x3a80();}