@lovrabet/rabetbase-cli 2.3.15 → 2.3.16-beta.2

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 (277) hide show
  1. package/README.md +8 -3
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -0
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/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.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -0
  102. package/lib/commands/kb/delete.js +1 -0
  103. package/lib/commands/kb/detail.js +1 -0
  104. package/lib/commands/kb/index.js +1 -0
  105. package/lib/commands/kb/list.js +1 -0
  106. package/lib/commands/kb/shared.js +1 -0
  107. package/lib/commands/kb/update.js +1 -0
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/relation-audit.js +1 -1
  142. package/lib/commands/page/restore.js +1 -1
  143. package/lib/commands/page/shared.js +1 -1
  144. package/lib/commands/page/standard-page-status.js +1 -1
  145. package/lib/commands/page/sync.js +1 -1
  146. package/lib/commands/permit/index.js +1 -1
  147. package/lib/commands/permit/page-get.js +1 -1
  148. package/lib/commands/permit/page-set.js +1 -1
  149. package/lib/commands/permit/role-apis-set.js +1 -1
  150. package/lib/commands/permit/role-menus-set.js +1 -1
  151. package/lib/commands/permit/role-menus.js +1 -1
  152. package/lib/commands/permit/shared.js +1 -1
  153. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  154. package/lib/commands/project/create/format-elapsed.js +1 -1
  155. package/lib/commands/project/create/main.js +1 -1
  156. package/lib/commands/project/create/non-interactive.js +1 -1
  157. package/lib/commands/project/create/project-template-path.js +1 -1
  158. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  159. package/lib/commands/project/create/use-format-code.js +1 -1
  160. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  161. package/lib/commands/project/index.js +1 -1
  162. package/lib/commands/project/init.js +1 -1
  163. package/lib/commands/project/upgrade.js +1 -1
  164. package/lib/commands/registry.js +1 -1
  165. package/lib/commands/role/create.js +1 -1
  166. package/lib/commands/role/delete.js +1 -1
  167. package/lib/commands/role/detail.js +1 -1
  168. package/lib/commands/role/index.js +1 -1
  169. package/lib/commands/role/list.js +1 -1
  170. package/lib/commands/role/shared.js +1 -1
  171. package/lib/commands/role/update.js +1 -1
  172. package/lib/commands/role/user-add.js +1 -1
  173. package/lib/commands/role/user-remove.js +1 -1
  174. package/lib/commands/role/user-resolve.js +1 -1
  175. package/lib/commands/run/index.js +1 -1
  176. package/lib/commands/schema.js +1 -1
  177. package/lib/commands/sql/create.js +1 -1
  178. package/lib/commands/sql/delete.js +1 -1
  179. package/lib/commands/sql/detail.js +1 -1
  180. package/lib/commands/sql/exec.js +1 -1
  181. package/lib/commands/sql/index.js +1 -1
  182. package/lib/commands/sql/list.js +1 -1
  183. package/lib/commands/sql/pull.js +1 -1
  184. package/lib/commands/sql/push.js +1 -1
  185. package/lib/commands/sql/save.js +1 -1
  186. package/lib/commands/sql/shared.js +1 -1
  187. package/lib/commands/sql/status.js +1 -1
  188. package/lib/commands/sql/validate.js +1 -1
  189. package/lib/commands/task/index.js +1 -1
  190. package/lib/commands/task/status.js +1 -1
  191. package/lib/commands/tenant/index.js +1 -0
  192. package/lib/commands/tenant/members-list.js +1 -0
  193. package/lib/commands/tenant/shared.js +1 -0
  194. package/lib/commands/workspace/add.js +1 -1
  195. package/lib/commands/workspace/index.js +1 -1
  196. package/lib/commands/workspace/remove.js +1 -1
  197. package/lib/config/schema.js +1 -1
  198. package/lib/constant/cdn.js +1 -1
  199. package/lib/constant/cli.js +1 -1
  200. package/lib/constant/defaults.js +1 -1
  201. package/lib/constant/domain.js +1 -1
  202. package/lib/constant/env.js +1 -1
  203. package/lib/constant/output.js +1 -1
  204. package/lib/constant/paths.js +1 -1
  205. package/lib/constant/risk.js +1 -1
  206. package/lib/context/app-resolver.js +1 -1
  207. package/lib/context/auth-resolver.js +1 -1
  208. package/lib/context/config-loader.js +1 -1
  209. package/lib/context.js +1 -1
  210. package/lib/core/alias-resolver.js +1 -1
  211. package/lib/core/api-client.js +1 -1
  212. package/lib/core/bff/config.js +1 -1
  213. package/lib/core/bff/file-system.js +1 -1
  214. package/lib/core/bff/hash.js +1 -1
  215. package/lib/core/bff/lock.js +1 -1
  216. package/lib/core/bff/utils.js +1 -1
  217. package/lib/core/db-resolver.js +1 -1
  218. package/lib/core/page/file-system.js +1 -1
  219. package/lib/core/page/hash.js +1 -1
  220. package/lib/core/page/lock.js +1 -1
  221. package/lib/core/sql-index-auditor.js +1 -1
  222. package/lib/core/sql-sync/config.js +1 -1
  223. package/lib/core/sql-sync/file-system.js +1 -1
  224. package/lib/core/sql-sync/hash.js +1 -1
  225. package/lib/core/sql-sync/lock.js +1 -1
  226. package/lib/core/sql-sync/utils.js +1 -1
  227. package/lib/core/sql-validator.js +1 -1
  228. package/lib/errors.js +1 -1
  229. package/lib/framework/build-all-flags.js +1 -1
  230. package/lib/framework/error-output.js +1 -1
  231. package/lib/framework/explicit-yes.js +1 -1
  232. package/lib/framework/flags.js +1 -1
  233. package/lib/framework/help.js +1 -1
  234. package/lib/framework/index.js +1 -1
  235. package/lib/framework/output.js +1 -1
  236. package/lib/framework/response.js +1 -1
  237. package/lib/framework/runner-alias.js +1 -1
  238. package/lib/framework/runner.js +1 -1
  239. package/lib/framework/schema-export.js +1 -1
  240. package/lib/framework/types.js +1 -1
  241. package/lib/generated/build-info.js +1 -1
  242. package/lib/help.js +1 -1
  243. package/lib/skills/main.js +1 -1
  244. package/lib/skills/npx-skills-add.js +1 -1
  245. package/lib/skills/skill-presence.js +1 -0
  246. package/lib/telemetry/cli-command-trace.js +1 -1
  247. package/lib/telemetry/cli-help-trace.js +1 -1
  248. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  249. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  250. package/lib/telemetry/send-cli-trace-log.js +1 -1
  251. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  252. package/lib/utils/ai_config.js +1 -1
  253. package/lib/utils/apply-jq-filter.js +1 -1
  254. package/lib/utils/cdn-config.js +1 -1
  255. package/lib/utils/check-sdk-version.js +1 -1
  256. package/lib/utils/cli-version-check.js +1 -1
  257. package/lib/utils/cli-version-policy.js +1 -1
  258. package/lib/utils/config.js +1 -1
  259. package/lib/utils/copy-directory.js +1 -1
  260. package/lib/utils/entity-with-id.js +1 -1
  261. package/lib/utils/file-utils.js +1 -1
  262. package/lib/utils/guides-cdn.js +1 -1
  263. package/lib/utils/http-client.js +1 -1
  264. package/lib/utils/is-non-interactive.js +1 -1
  265. package/lib/utils/logger.js +1 -1
  266. package/lib/utils/params.js +1 -1
  267. package/lib/utils/platform.js +1 -1
  268. package/lib/utils/rules-cdn.js +1 -1
  269. package/lib/utils/sleep.js +1 -1
  270. package/lib/utils/template-replacer.js +1 -1
  271. package/lib/utils/update-notice.js +1 -1
  272. package/lib/utils/version.js +1 -1
  273. package/lib/utils/with-active-cookie.js +1 -1
  274. package/lib/utils/write-cli-side-channel.js +1 -1
  275. package/package.json +2 -2
  276. package/lib/commands/app/add.js +0 -1
  277. package/lib/commands/app/remove.js +0 -1
@@ -1 +1 @@
1
- function a52_0xeb9a(){const _0x2843f5=['1665340WotMsd','8kXdYNw','3446648nEnVaw','2177517Ybwpwm','73263Wvasuk','4837IWAXAY','4ozOJuz','240skbXQs','12196558NtIJAc','146808aVRAXX','5646HxCKfD'];a52_0xeb9a=function(){return _0x2843f5;};return a52_0xeb9a();}(function(_0x288e29,_0x15c599){const _0x4879dd=a52_0x1008,_0x18d5a9=_0x288e29();while(!![]){try{const _0x370644=parseInt(_0x4879dd(0xf3))/0x1*(-parseInt(_0x4879dd(0xf0))/0x2)+parseInt(_0x4879dd(0xf2))/0x3+-parseInt(_0x4879dd(0xf5))/0x4*(-parseInt(_0x4879dd(0xef))/0x5)+parseInt(_0x4879dd(0xee))/0x6*(-parseInt(_0x4879dd(0xf4))/0x7)+-parseInt(_0x4879dd(0xf1))/0x8+parseInt(_0x4879dd(0xed))/0x9*(-parseInt(_0x4879dd(0xf6))/0xa)+parseInt(_0x4879dd(0xec))/0xb;if(_0x370644===_0x15c599)break;else _0x18d5a9['push'](_0x18d5a9['shift']());}catch(_0x6db0f9){_0x18d5a9['push'](_0x18d5a9['shift']());}}}(a52_0xeb9a,0x622a3));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a52_0x1008(_0x573b28,_0x775d01){_0x573b28=_0x573b28-0xec;const _0xeb9a92=a52_0xeb9a();let _0x100893=_0xeb9a92[_0x573b28];return _0x100893;}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ (function(_0x9982d5,_0x11879b){const _0x496662=a51_0x383c,_0x2c6513=_0x9982d5();while(!![]){try{const _0x1c477b=-parseInt(_0x496662(0xa6))/0x1*(parseInt(_0x496662(0xa8))/0x2)+parseInt(_0x496662(0xa0))/0x3+-parseInt(_0x496662(0xa4))/0x4+parseInt(_0x496662(0xa5))/0x5+-parseInt(_0x496662(0xa7))/0x6*(-parseInt(_0x496662(0xa2))/0x7)+parseInt(_0x496662(0xa1))/0x8+-parseInt(_0x496662(0xa3))/0x9;if(_0x1c477b===_0x11879b)break;else _0x2c6513['push'](_0x2c6513['shift']());}catch(_0x542106){_0x2c6513['push'](_0x2c6513['shift']());}}}(a51_0x870e,0xcff06));function a51_0x870e(){const _0x33c922=['769269XVgHMq','12591248PKgnne','854EXpxhp','18002673nyvKrv','2109564tTuDjP','5776440uhftes','71gPhOoy','66726cVfmXI','27126bbSqxe'];a51_0x870e=function(){return _0x33c922;};return a51_0x870e();}function a51_0x383c(_0x340816,_0x61297a){_0x340816=_0x340816-0xa0;const _0x870ed8=a51_0x870e();let _0x383cda=_0x870ed8[_0x340816];return _0x383cda;}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];
@@ -1 +1 @@
1
- const a53_0x1ab065=a53_0x4181;(function(_0x16b020,_0x101c1a){const _0x54c038=a53_0x4181,_0x3d97be=_0x16b020();while(!![]){try{const _0x42bd9c=-parseInt(_0x54c038(0x7a))/0x1*(parseInt(_0x54c038(0x84))/0x2)+-parseInt(_0x54c038(0x86))/0x3*(parseInt(_0x54c038(0x82))/0x4)+parseInt(_0x54c038(0x78))/0x5+parseInt(_0x54c038(0x81))/0x6+-parseInt(_0x54c038(0x7c))/0x7+parseInt(_0x54c038(0x7d))/0x8+-parseInt(_0x54c038(0x87))/0x9*(parseInt(_0x54c038(0x7e))/0xa);if(_0x42bd9c===_0x101c1a)break;else _0x3d97be['push'](_0x3d97be['shift']());}catch(_0x4daaf0){_0x3d97be['push'](_0x3d97be['shift']());}}}(a53_0x1de9,0x417f0));import{readScopedConfig}from'../../commands/config/shared.js';function a53_0x4181(_0x5e9d07,_0x259c09){_0x5e9d07=_0x5e9d07-0x78;const _0x1de954=a53_0x1de9();let _0x4181e6=_0x1de954[_0x5e9d07];return _0x4181e6;}import{readConfig}from'../../utils/config.js';async function execute(_0x54b5ac){const _0x5a1e4e=a53_0x4181,_0x21c91a=_0x54b5ac['bool']('global')?readScopedConfig(_0x5a1e4e(0x83)):readConfig();return{'ok':!![],'data':_0x21c91a};}export const configListDefinition={'service':a53_0x1ab065(0x7f),'command':'list','description':a53_0x1ab065(0x80),'risk':a53_0x1ab065(0x85),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x1ab065(0x83),'type':a53_0x1ab065(0x7b),'description':a53_0x1ab065(0x79),'default':![]}],'execute':execute};function a53_0x1de9(){const _0x241eb6=['153316SdHocY','global','36KAGsoH','read','27yCjYbE','8307ACIRhD','1903965OIdYeA','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','625TYenYJ','boolean','3175466OdKqlm','3424128qJaafk','2440YJBpxw','config','List\x20all\x20config\x20values','2967144JKTQvj'];a53_0x1de9=function(){return _0x241eb6;};return a53_0x1de9();}
1
+ function a52_0x1990(){const _0x35b50b=['20Wefene','12584907UDyiUF','3437444caAqYT','993245AyvMex','config','472449iDroGC','boolean','List\x20all\x20config\x20values','list','1CSYMgg','154626OcVCWx','4XOplfa','60ezfMKY','bool','32552TbbBvJ','global','1015xJNRWf','3940190IdBQcX'];a52_0x1990=function(){return _0x35b50b;};return a52_0x1990();}const a52_0x2ced4b=a52_0x5bff;(function(_0x29acbc,_0x248c6c){const _0x25f2d9=a52_0x5bff,_0x1c4adb=_0x29acbc();while(!![]){try{const _0x38759f=parseInt(_0x25f2d9(0x6a))/0x1*(parseInt(_0x25f2d9(0x75))/0x2)+-parseInt(_0x25f2d9(0x66))/0x3*(parseInt(_0x25f2d9(0x6c))/0x4)+parseInt(_0x25f2d9(0x73))/0x5*(parseInt(_0x25f2d9(0x6b))/0x6)+-parseInt(_0x25f2d9(0x71))/0x7*(-parseInt(_0x25f2d9(0x6f))/0x8)+-parseInt(_0x25f2d9(0x74))/0x9+-parseInt(_0x25f2d9(0x72))/0xa+-parseInt(_0x25f2d9(0x76))/0xb*(-parseInt(_0x25f2d9(0x6d))/0xc);if(_0x38759f===_0x248c6c)break;else _0x1c4adb['push'](_0x1c4adb['shift']());}catch(_0x49857f){_0x1c4adb['push'](_0x1c4adb['shift']());}}}(a52_0x1990,0xdf035));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x50ded2){const _0x103db8=a52_0x5bff,_0xd74886=_0x50ded2[_0x103db8(0x6e)](_0x103db8(0x70))?readScopedConfig(_0x103db8(0x70)):readConfig();return{'ok':!![],'data':_0xd74886};}function a52_0x5bff(_0x324c19,_0x47b38e){_0x324c19=_0x324c19-0x65;const _0x199092=a52_0x1990();let _0x5bffa3=_0x199092[_0x324c19];return _0x5bffa3;}export const configListDefinition={'service':a52_0x2ced4b(0x65),'command':a52_0x2ced4b(0x69),'description':a52_0x2ced4b(0x68),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a52_0x2ced4b(0x67),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a54_0x56f481=a54_0x5236;(function(_0x100171,_0x284823){const _0x3237f8=a54_0x5236,_0x3cb80a=_0x100171();while(!![]){try{const _0x1c4a30=parseInt(_0x3237f8(0x11b))/0x1*(-parseInt(_0x3237f8(0x11d))/0x2)+-parseInt(_0x3237f8(0x136))/0x3*(parseInt(_0x3237f8(0x12d))/0x4)+parseInt(_0x3237f8(0x120))/0x5+-parseInt(_0x3237f8(0x10c))/0x6+parseInt(_0x3237f8(0x114))/0x7+parseInt(_0x3237f8(0x116))/0x8+parseInt(_0x3237f8(0x134))/0x9;if(_0x1c4a30===_0x284823)break;else _0x3cb80a['push'](_0x3cb80a['shift']());}catch(_0x552b69){_0x3cb80a['push'](_0x3cb80a['shift']());}}}(a54_0x5aa7,0x7b93b));function a54_0x5236(_0x246727,_0xf83183){_0x246727=_0x246727-0x10c;const _0x5aa720=a54_0x5aa7();let _0x5236c9=_0x5aa720[_0x246727];return _0x5236c9;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a54_0x5aa7(){const _0x3e8771=['locale','\x20set\x20to:\x20','21220LVioXe','keys','bool','app','Usage:\x20','object','\x20appcode\x20set\x20to:\x20','5352552VXZgKD','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','309VycJCO','Config\x20value','boolean','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Use\x20`','2586330UdKYbH','appcode','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','set','validation','\x20app\x20add\x20<name>\x20--appcode\x20','env','4439736OUksAh','includes','954280BFPcLM','Invalid\x20locale\x20value.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','join','Project','1YHuyIv','\x22\x20is\x20not\x20settable.','696000gLmmfW','apps','Top-level\x20key\x20\x22','2416900vAkAAs','key','string','length','`,\x20`','riskLevel','Global','Missing\x20key.','global','Invalid\x20value\x20for\x20\x22','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.'];a54_0x5aa7=function(){return _0x3e8771;};return a54_0x5aa7();}async function execute(_0x4d56a6){const _0x15813f=a54_0x5236,_0x3f3597=_0x4d56a6['str'](_0x15813f(0x121)),_0x3fb2eb=_0x4d56a6['str']('value');if(!_0x3f3597)throw CliErrors[_0x15813f(0x111)](_0x15813f(0x127),_0x15813f(0x131)+CLI_BIN_NAME+_0x15813f(0x139));if(_0x3fb2eb===undefined||_0x3fb2eb==='')throw CliErrors[_0x15813f(0x111)]('Missing\x20value.',_0x15813f(0x131)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x3fb2eb[_0x15813f(0x123)]>0x1f4)throw CliErrors[_0x15813f(0x111)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x3f3597))throw CliErrors[_0x15813f(0x111)](_0x15813f(0x11f)+_0x3f3597+_0x15813f(0x11c),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x3f3597===_0x15813f(0x125))throw CliErrors[_0x15813f(0x111)](_0x15813f(0x135));if(CONFIG_ENUM_VALUES[_0x3f3597]&&!CONFIG_ENUM_VALUES[_0x3f3597][_0x15813f(0x115)](_0x3fb2eb))throw CliErrors[_0x15813f(0x111)](_0x15813f(0x129)+_0x3f3597+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x3f3597][_0x15813f(0x119)](',\x20'));if(_0x3f3597===_0x15813f(0x12b)&&!normalizeLocale(_0x3fb2eb))throw CliErrors[_0x15813f(0x111)](_0x15813f(0x117),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0xf1ad17={'global':_0x4d56a6[_0x15813f(0x12f)](_0x15813f(0x128))},_0x380905=resolveWriteScope(_0xf1ad17),_0x5dd79e=readScopedConfig(_0x380905);let _0x669e42=_0x3f3597,_0x139a1a=_0x3fb2eb;_0x3f3597==='app'&&(_0x669e42=_0x15813f(0x10d),delete _0x5dd79e[_0x15813f(0x130)]);_0x3f3597==='locale'&&(_0x139a1a=normalizeLocale(_0x3fb2eb));if(_0x3f3597===_0x15813f(0x113)){_0x139a1a=normalizeEnv(_0x3fb2eb);if(!isProduction(_0x139a1a)&&!isDaily(_0x139a1a))throw CliErrors['validation'](_0x15813f(0x12a),_0x15813f(0x118));}if(_0x3f3597===_0x15813f(0x10d)){const _0x432725=_0x5dd79e['apps']&&typeof _0x5dd79e['apps']===_0x15813f(0x132)?Object[_0x15813f(0x12e)](_0x5dd79e[_0x15813f(0x11e)]):[];if(_0x432725[_0x15813f(0x123)]>0x0)throw CliErrors[_0x15813f(0x111)](_0x15813f(0x10f),_0x15813f(0x13a)+CLI_BIN_NAME+_0x15813f(0x112)+_0x139a1a+_0x15813f(0x124)+CLI_BIN_NAME+_0x15813f(0x10e));const _0x124aa4=buildCanonicalProjectConfig({..._0x5dd79e},{'appCodes':[_0x139a1a],'env':typeof _0x5dd79e['env']===_0x15813f(0x122)?_0x5dd79e['env']:undefined});writeScopedConfig(_0x124aa4,_0x380905);const _0x66d289=_0x380905===_0x15813f(0x128)?_0x15813f(0x126):_0x15813f(0x11a);return{'ok':!![],'message':'✓\x20'+_0x66d289+_0x15813f(0x133)+_0x139a1a+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x5dd79e[_0x669e42]=_0x139a1a,writeScopedConfig(_0x5dd79e,_0x380905);const _0x151db1=_0x380905==='global'?'Global':_0x15813f(0x11a);return{'ok':!![],'message':'✓\x20'+_0x151db1+'\x20'+_0x669e42+_0x15813f(0x12c)+_0x139a1a};}export const configSetDefinition={'service':'config','command':a54_0x56f481(0x110),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x56f481(0x121),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a54_0x56f481(0x122),'description':a54_0x56f481(0x137),'required':!![]},{'name':a54_0x56f481(0x128),'type':a54_0x56f481(0x138),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a53_0x3ffae3=a53_0x3843;(function(_0x1563cb,_0x510f47){const _0x8d5a81=a53_0x3843,_0x1c18e9=_0x1563cb();while(!![]){try{const _0x553be7=parseInt(_0x8d5a81(0x1b0))/0x1*(-parseInt(_0x8d5a81(0x19f))/0x2)+-parseInt(_0x8d5a81(0x1ba))/0x3*(parseInt(_0x8d5a81(0x1c9))/0x4)+parseInt(_0x8d5a81(0x1cc))/0x5*(parseInt(_0x8d5a81(0x1a3))/0x6)+parseInt(_0x8d5a81(0x1bf))/0x7+-parseInt(_0x8d5a81(0x1bb))/0x8*(-parseInt(_0x8d5a81(0x19e))/0x9)+parseInt(_0x8d5a81(0x1cd))/0xa*(parseInt(_0x8d5a81(0x1c5))/0xb)+-parseInt(_0x8d5a81(0x1c6))/0xc;if(_0x553be7===_0x510f47)break;else _0x1c18e9['push'](_0x1c18e9['shift']());}catch(_0x34f2c6){_0x1c18e9['push'](_0x1c18e9['shift']());}}}(a53_0x34c0,0x69efb));function a53_0x34c0(){const _0x401cdd=['app','\x20appcode\x20set\x20to:\x20','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22.\x20Allowed:\x20','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','220SGCHAb','17185008LyrBTX','env','keys','25472SXvBjV','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Config\x20value','155GWlyOS','193400oQycSP','includes','locale','`,\x20`','Use\x20`','Invalid\x20value\x20for\x20\x22','Global','3533265IJxaKB','206ZBdfxn','config','set','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','82074qxaNTs','Settable\x20top-level\x20keys:\x20','value','Project','string','riskLevel','write','key','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','length','global','validation','apps','1VzIsKJ','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','join','appcode','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','boolean','Set\x20a\x20config\x20value','Missing\x20value.','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','21zlLmrv','16ZhdpCi','\x20set\x20to:\x20','Usage:\x20','Invalid\x20locale\x20value.','2202613MCzMJK'];a53_0x34c0=function(){return _0x401cdd;};return a53_0x34c0();}function a53_0x3843(_0x78efc8,_0x376f42){_0x78efc8=_0x78efc8-0x19a;const _0x34c01f=a53_0x34c0();let _0x3843b2=_0x34c01f[_0x78efc8];return _0x3843b2;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x21e458){const _0x46b5e2=a53_0x3843,_0x23b89b=_0x21e458['str'](_0x46b5e2(0x1aa)),_0x309974=_0x21e458['str'](_0x46b5e2(0x1a5));if(!_0x23b89b)throw CliErrors[_0x46b5e2(0x1ae)]('Missing\x20key.',_0x46b5e2(0x1bd)+CLI_BIN_NAME+_0x46b5e2(0x1b4));if(_0x309974===undefined||_0x309974==='')throw CliErrors['validation'](_0x46b5e2(0x1b7),_0x46b5e2(0x1bd)+CLI_BIN_NAME+_0x46b5e2(0x1b4));if(_0x309974[_0x46b5e2(0x1ac)]>0x1f4)throw CliErrors['validation'](_0x46b5e2(0x1c2));if(!isTopLevelConfigKey(_0x23b89b))throw CliErrors[_0x46b5e2(0x1ae)]('Top-level\x20key\x20\x22'+_0x23b89b+'\x22\x20is\x20not\x20settable.',_0x46b5e2(0x1a4)+getTopLevelConfigKeySummary());if(_0x23b89b===_0x46b5e2(0x1a8))throw CliErrors['validation'](_0x46b5e2(0x1a2));if(CONFIG_ENUM_VALUES[_0x23b89b]&&!CONFIG_ENUM_VALUES[_0x23b89b][_0x46b5e2(0x1ce)](_0x309974))throw CliErrors[_0x46b5e2(0x1ae)](_0x46b5e2(0x19c)+_0x23b89b+_0x46b5e2(0x1c3)+CONFIG_ENUM_VALUES[_0x23b89b][_0x46b5e2(0x1b2)](',\x20'));if(_0x23b89b===_0x46b5e2(0x1cf)&&!normalizeLocale(_0x309974))throw CliErrors[_0x46b5e2(0x1ae)](_0x46b5e2(0x1be),_0x46b5e2(0x1b1));const _0x1fca8f={'global':_0x21e458['bool'](_0x46b5e2(0x1ad))},_0x5f3fb1=resolveWriteScope(_0x1fca8f),_0x211721=readScopedConfig(_0x5f3fb1);let _0x21a0d3=_0x23b89b,_0x4b54bf=_0x309974;_0x23b89b===_0x46b5e2(0x1c0)&&(_0x21a0d3=_0x46b5e2(0x1b3),delete _0x211721['app']);_0x23b89b===_0x46b5e2(0x1cf)&&(_0x4b54bf=normalizeLocale(_0x309974));if(_0x23b89b===_0x46b5e2(0x1c7)){_0x4b54bf=normalizeEnv(_0x309974);if(!isProduction(_0x4b54bf)&&!isDaily(_0x4b54bf))throw CliErrors[_0x46b5e2(0x1ae)](_0x46b5e2(0x1c4),_0x46b5e2(0x1ca));}if(_0x23b89b===_0x46b5e2(0x1b3)){const _0x13e995=_0x211721[_0x46b5e2(0x1af)]&&typeof _0x211721[_0x46b5e2(0x1af)]==='object'?Object[_0x46b5e2(0x1c8)](_0x211721[_0x46b5e2(0x1af)]):[];if(_0x13e995[_0x46b5e2(0x1ac)]>0x0)throw CliErrors['validation'](_0x46b5e2(0x1ab),_0x46b5e2(0x19b)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x4b54bf+_0x46b5e2(0x19a)+CLI_BIN_NAME+_0x46b5e2(0x1b9));const _0x358c4d=buildCanonicalProjectConfig({..._0x211721},{'appCodes':[_0x4b54bf],'env':typeof _0x211721[_0x46b5e2(0x1c7)]===_0x46b5e2(0x1a7)?_0x211721['env']:undefined});writeScopedConfig(_0x358c4d,_0x5f3fb1);const _0x172b35=_0x5f3fb1===_0x46b5e2(0x1ad)?_0x46b5e2(0x19d):'Project';return{'ok':!![],'message':'✓\x20'+_0x172b35+_0x46b5e2(0x1c1)+_0x4b54bf+_0x46b5e2(0x1b8)};}_0x211721[_0x21a0d3]=_0x4b54bf,writeScopedConfig(_0x211721,_0x5f3fb1);const _0x268d09=_0x5f3fb1===_0x46b5e2(0x1ad)?'Global':_0x46b5e2(0x1a6);return{'ok':!![],'message':'✓\x20'+_0x268d09+'\x20'+_0x21a0d3+_0x46b5e2(0x1bc)+_0x4b54bf};}export const configSetDefinition={'service':a53_0x3ffae3(0x1a0),'command':a53_0x3ffae3(0x1a1),'description':a53_0x3ffae3(0x1b6),'risk':a53_0x3ffae3(0x1a9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x3ffae3(0x1aa),'type':a53_0x3ffae3(0x1a7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x3ffae3(0x1a5),'type':'string','description':a53_0x3ffae3(0x1cb),'required':!![]},{'name':a53_0x3ffae3(0x1ad),'type':a53_0x3ffae3(0x1b5),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0xd2729b,_0x4f9767){var _0xe9ed3d=a55_0x32a2,_0x69921b=_0xd2729b();while(!![]){try{var _0x5ee65f=parseInt(_0xe9ed3d(0xf1))/0x1+-parseInt(_0xe9ed3d(0xee))/0x2*(-parseInt(_0xe9ed3d(0xe9))/0x3)+parseInt(_0xe9ed3d(0xf3))/0x4+parseInt(_0xe9ed3d(0xeb))/0x5*(parseInt(_0xe9ed3d(0xf2))/0x6)+parseInt(_0xe9ed3d(0xf0))/0x7+-parseInt(_0xe9ed3d(0xf5))/0x8+-parseInt(_0xe9ed3d(0xf4))/0x9;if(_0x5ee65f===_0x4f9767)break;else _0x69921b['push'](_0x69921b['shift']());}catch(_0x1a3829){_0x69921b['push'](_0x69921b['shift']());}}}(a55_0x27fa,0x85e9f));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';function a55_0x27fa(){var _0x51eb89=['4109084hpTmtX','640013jEdVxL','3774xcybsb','113384ohnWcx','13105935SNDuWp','1852232KjHPIj','2127rQegWZ','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','7645jcTTTq','\x20init`\x20first.','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','54LWnEvh','validation'];a55_0x27fa=function(){return _0x51eb89;};return a55_0x27fa();}function a55_0x32a2(_0x2501ec,_0x4531d3){_0x2501ec=_0x2501ec-0xe9;var _0x27fa91=a55_0x27fa();var _0x32a243=_0x27fa91[_0x2501ec];return _0x32a243;}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x475c44){var _0x73c0d8=a55_0x32a2;if(_0x475c44['global'])return'global';if(!isInProject())throw CliErrors[_0x73c0d8(0xef)](_0x73c0d8(0xea),_0x73c0d8(0xed)+CLI_BIN_NAME+_0x73c0d8(0xec));return'project';}export function readScopedConfig(_0x5b7be9){return readConfigFile(resolveWriteConfigPath(_0x5b7be9));}export function writeScopedConfig(_0x26729f,_0x3f282e){writeConfigFile(resolveWriteConfigPath(_0x3f282e),_0x26729f);}
1
+ (function(_0xcf5a75,_0x585f98){var _0x55ee07=a54_0x4967,_0x424f93=_0xcf5a75();while(!![]){try{var _0x2331ac=-parseInt(_0x55ee07(0x132))/0x1*(-parseInt(_0x55ee07(0x12e))/0x2)+-parseInt(_0x55ee07(0x136))/0x3+parseInt(_0x55ee07(0x12c))/0x4*(parseInt(_0x55ee07(0x137))/0x5)+-parseInt(_0x55ee07(0x12d))/0x6+-parseInt(_0x55ee07(0x130))/0x7+-parseInt(_0x55ee07(0x135))/0x8+parseInt(_0x55ee07(0x131))/0x9*(parseInt(_0x55ee07(0x138))/0xa);if(_0x2331ac===_0x585f98)break;else _0x424f93['push'](_0x424f93['shift']());}catch(_0x482d26){_0x424f93['push'](_0x424f93['shift']());}}}(a54_0x1e68,0x91fdc));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';function a54_0x1e68(){var _0x2cdee4=['2174160dvqdVJ','938607jgPFhM','1405HJLmMN','5942170uHthSx','10604lzqXum','1656480xqWTOK','69338MRLZnr','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','4050711dwkWmo','18hsuvPm','3NoQPVl','global','project'];a54_0x1e68=function(){return _0x2cdee4;};return a54_0x1e68();}export{CLI_BIN_NAME};function a54_0x4967(_0x55901b,_0x4001fd){_0x55901b=_0x55901b-0x12c;var _0x1e680d=a54_0x1e68();var _0x4967b0=_0x1e680d[_0x55901b];return _0x4967b0;}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x56c4e3){var _0x507ca6=a54_0x4967;if(_0x56c4e3[_0x507ca6(0x133)])return _0x507ca6(0x133);if(!isInProject())throw CliErrors['validation'](_0x507ca6(0x12f),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return _0x507ca6(0x134);}export function readScopedConfig(_0x2431f0){return readConfigFile(resolveWriteConfigPath(_0x2431f0));}export function writeScopedConfig(_0x9af5ce,_0x45a558){writeConfigFile(resolveWriteConfigPath(_0x45a558),_0x9af5ce);}
@@ -1 +1 @@
1
- function a56_0x4703(_0x271cd2,_0x5c7b23){_0x271cd2=_0x271cd2-0x94;const _0x629f1e=a56_0x629f();let _0x470390=_0x629f1e[_0x271cd2];return _0x470390;}const a56_0x5e57fb=a56_0x4703;(function(_0x4d445a,_0x5ec98d){const _0x2e9de1=a56_0x4703,_0x72e996=_0x4d445a();while(!![]){try{const _0x22eee7=-parseInt(_0x2e9de1(0xa6))/0x1*(-parseInt(_0x2e9de1(0x9d))/0x2)+-parseInt(_0x2e9de1(0x9b))/0x3*(parseInt(_0x2e9de1(0x9c))/0x4)+-parseInt(_0x2e9de1(0x9f))/0x5*(parseInt(_0x2e9de1(0xa7))/0x6)+parseInt(_0x2e9de1(0xa1))/0x7*(parseInt(_0x2e9de1(0x97))/0x8)+-parseInt(_0x2e9de1(0x98))/0x9+parseInt(_0x2e9de1(0xa0))/0xa*(parseInt(_0x2e9de1(0x94))/0xb)+parseInt(_0x2e9de1(0xa2))/0xc;if(_0x22eee7===_0x5ec98d)break;else _0x72e996['push'](_0x72e996['shift']());}catch(_0x365ca1){_0x72e996['push'](_0x72e996['shift']());}}}(a56_0x629f,0x512f0));function a56_0x629f(){const _0x2d0bab=['\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','774429YlbKcX','4GAXoDV','89242rWstFg','join','889340SJWzSC','10RPCAzU','711578jjGYaw','10027668DjMfJL','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','1XNSAET','18cOLmfM','4539029BzPiCX','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','filter','16KocncS','3347388JlFXSm','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions'];a56_0x629f=function(){return _0x2d0bab;};return a56_0x629f();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a56_0x5e57fb(0x96),'operation':a56_0x5e57fb(0x96),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a56_0x5e57fb(0x95),'helpExtra':[a56_0x5e57fb(0xa4),a56_0x5e57fb(0x99),'\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]',a56_0x5e57fb(0xa3),a56_0x5e57fb(0x9a),a56_0x5e57fb(0xa5)][a56_0x5e57fb(0x9e)]('\x0a')});
1
+ const a55_0x4cb517=a55_0x3afa;(function(_0x139bfa,_0x3036f1){const _0x5318aa=a55_0x3afa,_0x449361=_0x139bfa();while(!![]){try{const _0x4d7a2b=parseInt(_0x5318aa(0x1c1))/0x1*(parseInt(_0x5318aa(0x1cb))/0x2)+-parseInt(_0x5318aa(0x1c3))/0x3+-parseInt(_0x5318aa(0x1ca))/0x4+parseInt(_0x5318aa(0x1c0))/0x5*(-parseInt(_0x5318aa(0x1be))/0x6)+parseInt(_0x5318aa(0x1c2))/0x7+parseInt(_0x5318aa(0x1bc))/0x8*(parseInt(_0x5318aa(0x1c9))/0x9)+-parseInt(_0x5318aa(0x1cd))/0xa*(-parseInt(_0x5318aa(0x1c6))/0xb);if(_0x4d7a2b===_0x3036f1)break;else _0x449361['push'](_0x449361['shift']());}catch(_0x1e35b8){_0x449361['push'](_0x449361['shift']());}}}(a55_0x417e,0xb5c91));import{buildDataCommand}from'../../commands/data/shared.js';function a55_0x417e(){const _0x2e0438=['\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','40024UBihtz','Filter\x20dataset\x20records\x20with\x20query\x20conditions','6YVTXJH','\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]','1069265LhuDJC','14rgiBjh','4952136MiVtRt','2601840jXWggf','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','filter','583IXAlmR','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','405rpminS','2404336hFAUVX','190830vSHtwX','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','29890kPsnsQ'];a55_0x417e=function(){return _0x2e0438;};return a55_0x417e();}function a55_0x3afa(_0x49dfb4,_0x27739d){_0x49dfb4=_0x49dfb4-0x1bb;const _0x417ef4=a55_0x417e();let _0x3afa91=_0x417ef4[_0x49dfb4];return _0x3afa91;}export const dataFilter=buildDataCommand({'command':a55_0x4cb517(0x1c5),'operation':'filter','description':a55_0x4cb517(0x1bd),'paramsRequired':![],'paramsHint':a55_0x4cb517(0x1cc),'helpExtra':[a55_0x4cb517(0x1c8),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a55_0x4cb517(0x1bf),a55_0x4cb517(0x1c4),a55_0x4cb517(0x1bb),a55_0x4cb517(0x1c7)]['join']('\x0a')});
@@ -1 +1 @@
1
- function a57_0x1626(){const _0x233997=['410931WRgPfS','70606eYKGZP','1686632MMJXEs','19809550WFgTzw','27xHexyP','148165YzfKal','19542CgUCyu','getOne','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','1883OULfzN','8jPUtnX','5255172fmGnHf'];a57_0x1626=function(){return _0x233997;};return a57_0x1626();}const a57_0x148926=a57_0x51f5;function a57_0x51f5(_0x1a62da,_0x146f0a){_0x1a62da=_0x1a62da-0x158;const _0x16260d=a57_0x1626();let _0x51f5c7=_0x16260d[_0x1a62da];return _0x51f5c7;}(function(_0x4b7124,_0x4ce52f){const _0x18ec8e=a57_0x51f5,_0x2beebe=_0x4b7124();while(!![]){try{const _0x3f1712=parseInt(_0x18ec8e(0x164))/0x1+-parseInt(_0x18ec8e(0x158))/0x2*(parseInt(_0x18ec8e(0x15b))/0x3)+-parseInt(_0x18ec8e(0x162))/0x4*(-parseInt(_0x18ec8e(0x15c))/0x5)+parseInt(_0x18ec8e(0x15d))/0x6*(-parseInt(_0x18ec8e(0x161))/0x7)+-parseInt(_0x18ec8e(0x159))/0x8+-parseInt(_0x18ec8e(0x163))/0x9+parseInt(_0x18ec8e(0x15a))/0xa;if(_0x3f1712===_0x4ce52f)break;else _0x2beebe['push'](_0x2beebe['shift']());}catch(_0x347f27){_0x2beebe['push'](_0x2beebe['shift']());}}}(a57_0x1626,0x70edb));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a57_0x148926(0x15e),'operation':'getOne','description':a57_0x148926(0x15f),'paramsRequired':!![],'paramsHint':a57_0x148926(0x160)});
1
+ const a56_0x439062=a56_0x2f77;function a56_0x2f77(_0x228060,_0x37dc23){_0x228060=_0x228060-0x182;const _0x19f948=a56_0x19f9();let _0x2f7726=_0x19f948[_0x228060];return _0x2f7726;}function a56_0x19f9(){const _0x2288b1=['1517236RgwIVi','25008DFpUhU','Get\x20a\x20single\x20record\x20by\x20ID','102MEcXBb','getOne','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','142490pbMCIF','281544lypIXk','6GQmOSi','1049144JUqMOV','494469aMDKii','63WkgdpP','1365010QBJzoc'];a56_0x19f9=function(){return _0x2288b1;};return a56_0x19f9();}(function(_0x27f91d,_0x247875){const _0x193521=a56_0x2f77,_0x3f53dd=_0x27f91d();while(!![]){try{const _0x41eda4=-parseInt(_0x193521(0x189))/0x1+-parseInt(_0x193521(0x183))/0x2*(-parseInt(_0x193521(0x185))/0x3)+-parseInt(_0x193521(0x182))/0x4+parseInt(_0x193521(0x18e))/0x5*(parseInt(_0x193521(0x18b))/0x6)+parseInt(_0x193521(0x188))/0x7+parseInt(_0x193521(0x184))/0x8+parseInt(_0x193521(0x186))/0x9*(-parseInt(_0x193521(0x187))/0xa);if(_0x41eda4===_0x247875)break;else _0x3f53dd['push'](_0x3f53dd['shift']());}catch(_0x256dbb){_0x3f53dd['push'](_0x3f53dd['shift']());}}}(a56_0x19f9,0x435d5));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x439062(0x18c),'operation':a56_0x439062(0x18c),'description':a56_0x439062(0x18a),'paramsRequired':!![],'paramsHint':a56_0x439062(0x18d)});
@@ -1 +1 @@
1
- (function(_0x2f9767,_0x486b63){const _0x42e1a7=a58_0x2844,_0x1575b2=_0x2f9767();while(!![]){try{const _0x36216e=-parseInt(_0x42e1a7(0x13d))/0x1+-parseInt(_0x42e1a7(0x136))/0x2+-parseInt(_0x42e1a7(0x137))/0x3*(parseInt(_0x42e1a7(0x13a))/0x4)+-parseInt(_0x42e1a7(0x13f))/0x5*(-parseInt(_0x42e1a7(0x138))/0x6)+parseInt(_0x42e1a7(0x13b))/0x7+parseInt(_0x42e1a7(0x139))/0x8+-parseInt(_0x42e1a7(0x13e))/0x9*(-parseInt(_0x42e1a7(0x13c))/0xa);if(_0x36216e===_0x486b63)break;else _0x1575b2['push'](_0x1575b2['shift']());}catch(_0x5d773a){_0x1575b2['push'](_0x1575b2['shift']());}}}(a58_0x36ce,0x891c5));import{dataFilter}from'../../commands/data/filter.js';function a58_0x36ce(){const _0x5ba68a=['1551771WYYVeX','4543740JgBiiz','2048270yrrXSI','2247tsTLyc','6WVKNId','3074952cdUrGM','1228YziYWq','2903138opNaRD','50hNoZRX','754263RiCTJf'];a58_0x36ce=function(){return _0x5ba68a;};return a58_0x36ce();}import{dataGetOne}from'../../commands/data/getOne.js';function a58_0x2844(_0x3d5cdd,_0x59406f){_0x3d5cdd=_0x3d5cdd-0x136;const _0x36ce40=a58_0x36ce();let _0x2844bf=_0x36ce40[_0x3d5cdd];return _0x2844bf;}export const dataDefinitions=[dataFilter,dataGetOne];
1
+ (function(_0x47ac8e,_0x4e9b1e){const _0x41ec69=a57_0x4e22,_0x2a29d1=_0x47ac8e();while(!![]){try{const _0x3529ad=-parseInt(_0x41ec69(0x142))/0x1+-parseInt(_0x41ec69(0x13b))/0x2+parseInt(_0x41ec69(0x141))/0x3+parseInt(_0x41ec69(0x13c))/0x4*(parseInt(_0x41ec69(0x13f))/0x5)+-parseInt(_0x41ec69(0x140))/0x6+-parseInt(_0x41ec69(0x13a))/0x7*(parseInt(_0x41ec69(0x13e))/0x8)+parseInt(_0x41ec69(0x13d))/0x9;if(_0x3529ad===_0x4e9b1e)break;else _0x2a29d1['push'](_0x2a29d1['shift']());}catch(_0xe7ca0f){_0x2a29d1['push'](_0x2a29d1['shift']());}}}(a57_0x5a45,0xcacfa));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a57_0x5a45(){const _0x408710=['126mNraye','267088FFBWjf','4487768nKJpRY','23979438vDQUTH','718224MFZgKH','5kDAsqt','9587760DYnjjK','4870578DxBRmF','1231628NxIijG'];a57_0x5a45=function(){return _0x408710;};return a57_0x5a45();}function a57_0x4e22(_0x40b498,_0x47b570){_0x40b498=_0x40b498-0x13a;const _0x5a4587=a57_0x5a45();let _0x4e2255=_0x5a4587[_0x40b498];return _0x4e2255;}export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x462f39,_0x4f315c){const _0x294f63=a59_0xba46,_0xa6dcd1=_0x462f39();while(!![]){try{const _0x27a70f=-parseInt(_0x294f63(0xcb))/0x1+parseInt(_0x294f63(0xd4))/0x2+parseInt(_0x294f63(0xda))/0x3*(parseInt(_0x294f63(0xdf))/0x4)+parseInt(_0x294f63(0xe5))/0x5+parseInt(_0x294f63(0xdc))/0x6*(-parseInt(_0x294f63(0xe9))/0x7)+parseInt(_0x294f63(0xd3))/0x8*(parseInt(_0x294f63(0xe2))/0x9)+parseInt(_0x294f63(0xe4))/0xa*(-parseInt(_0x294f63(0xd6))/0xb);if(_0x27a70f===_0x4f315c)break;else _0xa6dcd1['push'](_0xa6dcd1['shift']());}catch(_0x260b76){_0xa6dcd1['push'](_0xa6dcd1['shift']());}}}(a59_0x392d,0x26916));function a59_0x392d(){const _0x4bbdc3=['63393JaBKUT','appCode','params','\x20completed\x20in\x20','17931XbSixY','command','360CIqkSM','flagMissing','helpExtra','4VRxzGo','paramsRequired','paramsHint','1794699FuxMCR','now','310MafrGt','1111650gpImDy','validation','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','15253utepLi','data\x20','264730dBlPQV','operation','string','code','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','alias','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','str','8GqopiF','608758BdCRNo','description'];a59_0x392d=function(){return _0x4bbdc3;};return a59_0x392d();}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0xba46(_0x583a57,_0x512ba3){_0x583a57=_0x583a57-0xcb;const _0x392deb=a59_0x392d();let _0xba46a6=_0x392deb[_0x583a57];return _0xba46a6;}import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x50c42a){const _0x41bc55=a59_0xba46;if(!_0x50c42a)throw CliErrors[_0x41bc55(0xdd)](_0x41bc55(0xd8),_0x41bc55(0xe7));const _0x447010=_0x50c42a['id'];if(_0x447010===undefined||_0x447010===null||_0x447010==='')throw CliErrors[_0x41bc55(0xe6)](_0x41bc55(0xcf),_0x41bc55(0xe8));}function parseCommandParams(_0x56c2d4){return parseJsonParams(_0x56c2d4)??{};}export function buildDataCommand(_0x169761){const _0x58a323=a59_0xba46,_0x258229=_0x58a323(0xd1);return{'service':'data','command':_0x169761[_0x58a323(0xdb)],'description':_0x169761[_0x58a323(0xd5)],'risk':'read','defaultOutputFormat':'compress','helpExtra':_0x169761[_0x58a323(0xde)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x58a323(0xd0),'type':_0x58a323(0xcd),'description':_0x258229},{'name':'params','type':_0x58a323(0xcd),'description':_0x169761[_0x58a323(0xe1)]}],async 'validate'(_0x2c7f91){const _0x4ee61c=_0x58a323,_0xc21b46=_0x2c7f91[_0x4ee61c(0xd2)]('params');if(_0x169761[_0x4ee61c(0xe0)]&&!_0xc21b46)throw CliErrors[_0x4ee61c(0xdd)](_0x4ee61c(0xd8),_0x169761[_0x4ee61c(0xe1)]);const _0x3108b4=parseJsonParams(_0xc21b46);_0x169761[_0x4ee61c(0xcc)]==='getOne'&&assertGetOneId(_0x3108b4);},async 'execute'(_0xc0c181){const _0x37fd3b=_0x58a323,_0x1402d1=parseCommandParams(_0xc0c181[_0x37fd3b(0xd2)](_0x37fd3b(0xd8))),_0x5c6854=Date[_0x37fd3b(0xe3)](),_0x17656f=await executeDatasetDataOperation(_0xc0c181[_0x37fd3b(0xd7)],_0xc0c181[_0x37fd3b(0xd2)](_0x37fd3b(0xce)),_0x169761[_0x37fd3b(0xcc)],_0x1402d1),_0x345b48=Date[_0x37fd3b(0xe3)]()-_0x5c6854;return{'ok':!![],'data':{'result':_0x17656f,'elapsed':_0x345b48},'message':_0x37fd3b(0xea)+_0x169761[_0x37fd3b(0xdb)]+_0x37fd3b(0xd9)+_0x345b48+'ms'};}};}
1
+ (function(_0x248574,_0x2962f4){const _0x324944=a58_0x5dc9,_0x27084c=_0x248574();while(!![]){try{const _0x46c0f7=parseInt(_0x324944(0x197))/0x1+-parseInt(_0x324944(0x193))/0x2*(-parseInt(_0x324944(0x18b))/0x3)+parseInt(_0x324944(0x17d))/0x4*(parseInt(_0x324944(0x194))/0x5)+-parseInt(_0x324944(0x17a))/0x6*(-parseInt(_0x324944(0x184))/0x7)+-parseInt(_0x324944(0x17b))/0x8+-parseInt(_0x324944(0x18e))/0x9*(parseInt(_0x324944(0x195))/0xa)+-parseInt(_0x324944(0x190))/0xb*(-parseInt(_0x324944(0x18d))/0xc);if(_0x46c0f7===_0x2962f4)break;else _0x27084c['push'](_0x27084c['shift']());}catch(_0x7cc4d1){_0x27084c['push'](_0x27084c['shift']());}}}(a58_0x1760,0xd2111));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x2e5be1){const _0x55e001=a58_0x5dc9;if(!_0x2e5be1)throw CliErrors[_0x55e001(0x185)]('params',_0x55e001(0x17e));const _0x34a620=_0x2e5be1['id'];if(_0x34a620===undefined||_0x34a620===null||_0x34a620==='')throw CliErrors[_0x55e001(0x183)](_0x55e001(0x181),_0x55e001(0x17c));}function parseCommandParams(_0x306726){return parseJsonParams(_0x306726)??{};}function a58_0x5dc9(_0x3591f3,_0x3e5741){_0x3591f3=_0x3591f3-0x17a;const _0x176046=a58_0x1760();let _0x5dc9e1=_0x176046[_0x3591f3];return _0x5dc9e1;}function a58_0x1760(){const _0x2ff402=['str','2680389gnfKbD','alias','3387732oLzkol','6959403UoLdad','getOne','11mxcVxA','\x20completed\x20in\x20','command','2ADaiCU','5xegtrC','20PrOWUa','data\x20','700929qCvQGh','paramsHint','params','7777914WmYYGD','10652576SIKDoi','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','2262068hWoJWF','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','data','description','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','appCode','validation','7osAPhs','flagMissing','operation','read','compress','helpExtra'];a58_0x1760=function(){return _0x2ff402;};return a58_0x1760();}export function buildDataCommand(_0x42f8c1){const _0x52bc99=a58_0x5dc9,_0x199468='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x52bc99(0x17f),'command':_0x42f8c1['command'],'description':_0x42f8c1[_0x52bc99(0x180)],'risk':_0x52bc99(0x187),'defaultOutputFormat':_0x52bc99(0x188),'helpExtra':_0x42f8c1[_0x52bc99(0x189)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x52bc99(0x18c),'type':'string','description':_0x199468},{'name':_0x52bc99(0x199),'type':'string','description':_0x42f8c1[_0x52bc99(0x198)]}],async 'validate'(_0x247769){const _0x47a6bb=_0x52bc99,_0x423bd7=_0x247769[_0x47a6bb(0x18a)](_0x47a6bb(0x199));if(_0x42f8c1['paramsRequired']&&!_0x423bd7)throw CliErrors[_0x47a6bb(0x185)](_0x47a6bb(0x199),_0x42f8c1[_0x47a6bb(0x198)]);const _0x1e44fe=parseJsonParams(_0x423bd7);_0x42f8c1[_0x47a6bb(0x186)]===_0x47a6bb(0x18f)&&assertGetOneId(_0x1e44fe);},async 'execute'(_0x4924ee){const _0xe2ac88=_0x52bc99,_0x40b2ad=parseCommandParams(_0x4924ee[_0xe2ac88(0x18a)](_0xe2ac88(0x199))),_0xa3a2e7=Date['now'](),_0x2e9bf1=await executeDatasetDataOperation(_0x4924ee[_0xe2ac88(0x182)],_0x4924ee['str']('code'),_0x42f8c1[_0xe2ac88(0x186)],_0x40b2ad),_0x594ecb=Date['now']()-_0xa3a2e7;return{'ok':!![],'data':{'result':_0x2e9bf1,'elapsed':_0x594ecb},'message':_0xe2ac88(0x196)+_0x42f8c1[_0xe2ac88(0x192)]+_0xe2ac88(0x191)+_0x594ecb+'ms'};}};}
@@ -1 +1 @@
1
- const a60_0x3a79aa=a60_0x4c12;function a60_0x4c12(_0xdb0f6,_0x54e520){_0xdb0f6=_0xdb0f6-0x1ab;const _0x4162a5=a60_0x4162();let _0x4c12ac=_0x4162a5[_0xdb0f6];return _0x4c12ac;}(function(_0x53472a,_0x11634b){const _0x2a1b65=a60_0x4c12,_0x1b237e=_0x53472a();while(!![]){try{const _0x1a7519=parseInt(_0x2a1b65(0x1b3))/0x1*(parseInt(_0x2a1b65(0x1d4))/0x2)+parseInt(_0x2a1b65(0x1cd))/0x3*(-parseInt(_0x2a1b65(0x1cc))/0x4)+parseInt(_0x2a1b65(0x1b0))/0x5*(parseInt(_0x2a1b65(0x1d7))/0x6)+-parseInt(_0x2a1b65(0x1dc))/0x7+parseInt(_0x2a1b65(0x1e7))/0x8+-parseInt(_0x2a1b65(0x1bd))/0x9+-parseInt(_0x2a1b65(0x1ac))/0xa*(-parseInt(_0x2a1b65(0x1da))/0xb);if(_0x1a7519===_0x11634b)break;else _0x1b237e['push'](_0x1b237e['shift']());}catch(_0x1c163e){_0x1b237e['push'](_0x1b237e['shift']());}}}(a60_0x4162,0xcf1a9));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=a60_0x3a79aa(0x1c1);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x91a54a,input:_0x5694e6,dryRun:_0x54bc76}){const _0x1f9fef=a60_0x3a79aa;validateInput(_0x5694e6);const _0x1055d9=normalizeBusinessGroup(_0x5694e6['businessGroup']),_0xd28575=await getDatasetDetail(_0x5694e6['code']),_0x4ff87e=resolveBusinessGroupDataset(_0xd28575,_0x5694e6[_0x1f9fef(0x1e6)]),_0x28f9cf=loadCurrentBusinessGroup(_0xd28575,_0x4ff87e);assertExpectedBusinessGroup(_0x28f9cf,_0x5694e6[_0x1f9fef(0x1e5)]);const _0x3c68e5=buildBackendPayload(_0x91a54a,_0x4ff87e,_0x1055d9),_0x57ce31=_0x28f9cf!==_0x1055d9;let _0x3d7567;if(_0x57ce31&&!_0x54bc76){await updateErBusinessGroup(_0x3c68e5);const _0xa28020=await getDatasetDetail(_0x4ff87e[_0x1f9fef(0x1e6)]),_0xa1ae52=resolveBusinessGroupDataset(_0xa28020,_0x4ff87e[_0x1f9fef(0x1e6)]),_0x4d1908=loadCurrentBusinessGroup(_0xa28020,_0xa1ae52);if(_0x4d1908!==_0x1055d9)throw CliErrors[_0x1f9fef(0x1c9)]('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x1f9fef(0x1b8)+JSON[_0x1f9fef(0x1df)](_0x1055d9)+_0x1f9fef(0x1ad)+JSON['stringify'](_0x4d1908)+'.');_0x3d7567={'verified':!![],'status':_0x1f9fef(0x1e2),'afterReadback':{'businessGroup':_0x4d1908}};}else!_0x57ce31&&(_0x3d7567={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x28f9cf}});const _0x11cab9={'operation':'update','appCode':_0x91a54a,'selector':{'code':_0x4ff87e[_0x1f9fef(0x1e6)]},'dataset':_0x4ff87e,'before':{'businessGroup':_0x28f9cf},'after':{'businessGroup':_0x1055d9},'changed':_0x57ce31,'dryRun':_0x54bc76,'submitted':_0x57ce31&&!_0x54bc76,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x3c68e5},..._0x3d7567?{'verification':_0x3d7567}:{},'warnings':[]};return{'ok':!![],'data':_0x11cab9,'message':_0x57ce31?_0x54bc76?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x4ff87e[_0x1f9fef(0x1e6)]:_0x1f9fef(0x1b2)+_0x4ff87e[_0x1f9fef(0x1e6)]:_0x1f9fef(0x1db)+_0x4ff87e[_0x1f9fef(0x1e6)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a60_0x3a79aa(0x1b1),'description':a60_0x3a79aa(0x1b6),'risk':a60_0x3a79aa(0x1d1),'flags':[CODE_FLAG,{'name':a60_0x3a79aa(0x1ab),'type':a60_0x3a79aa(0x1e3),'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':a60_0x3a79aa(0x1dd),'type':'string','required':![],'description':a60_0x3a79aa(0x1c6)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x15247c){validateInput(readBusinessGroupUpdateInput(_0x15247c));},async 'dryRun'(_0x947a11){const _0x53fbdc=a60_0x3a79aa,_0x1b1419=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x947a11[_0x53fbdc(0x1b4)],'input':readBusinessGroupUpdateInput(_0x947a11),'dryRun':!![]});return{'method':_0x53fbdc(0x1bb),'url':BACKEND_PATH,'body':_0x1b1419[_0x53fbdc(0x1c4)][_0x53fbdc(0x1d9)][_0x53fbdc(0x1d0)],'description':_0x1b1419[_0x53fbdc(0x1e8)],..._0x1b1419['data']};},async 'execute'(_0x4bcffb){const _0x1a245c=a60_0x3a79aa;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x4bcffb[_0x1a245c(0x1b4)],'input':readBusinessGroupUpdateInput(_0x4bcffb),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x70ac9d){const _0x3ae6ad=a60_0x3a79aa,_0x1a0de2=_0x70ac9d[_0x3ae6ad(0x1bc)]('expect-business-group');return{'code':trim(_0x70ac9d['str'](_0x3ae6ad(0x1e6))),'businessGroup':_0x70ac9d[_0x3ae6ad(0x1bc)](_0x3ae6ad(0x1ab)),'expectBusinessGroup':_0x1a0de2===undefined||_0x1a0de2===''?undefined:_0x1a0de2};}function validateInput(_0x22a891){const _0xf247b8=a60_0x3a79aa;if(!trim(_0x22a891['code']))throw CliErrors[_0xf247b8(0x1ce)]('--code\x20is\x20required');if(_0x22a891[_0xf247b8(0x1d5)]===undefined)throw CliErrors[_0xf247b8(0x1ce)](_0xf247b8(0x1ea));}function resolveBusinessGroupDataset(_0x681ef2,_0x35756c){const _0x1551e0=a60_0x3a79aa,_0x3fdb28=asPlainObject(_0x681ef2[_0x1551e0(0x1cb)]),_0x5ed14c=asPlainObject(_0x681ef2[_0x1551e0(0x1c0)]),_0x29db6d=resolveSourceType(_0x681ef2,_0x3fdb28,_0x5ed14c),_0x1dc452=firstString(_0x681ef2[_0x1551e0(0x1af)],_0x681ef2[_0x1551e0(0x1e6)],_0x3fdb28['datasetCode'],_0x35756c)||_0x35756c;return{'id':firstNumber(_0x681ef2[_0x1551e0(0x1c3)],_0x681ef2['id'],_0x3fdb28[_0x1551e0(0x1e9)])??firstString(_0x681ef2['modelId'],_0x681ef2['id'],_0x3fdb28[_0x1551e0(0x1e9)])??null,'code':_0x1dc452,'name':firstString(_0x681ef2[_0x1551e0(0x1e0)],_0x3fdb28['datasetName'],_0x3fdb28[_0x1551e0(0x1e0)])||null,'sourceType':_0x29db6d};}function resolveSourceType(_0x520f66,_0x57219b,_0x2a81f9){const _0x442f33=a60_0x3a79aa,_0x326ef3=firstString(_0x520f66['source'],_0x520f66[_0x442f33(0x1ca)],_0x57219b[_0x442f33(0x1b5)],_0x57219b[_0x442f33(0x1ca)])?.[_0x442f33(0x1d3)]()[_0x442f33(0x1c5)]();if(_0x326ef3===_0x442f33(0x1ba)||_0x326ef3===_0x442f33(0x1be))return _0x326ef3;if(Object[_0x442f33(0x1d6)](_0x2a81f9)['length']>0x0)return'DB_TABLE';throw CliErrors[_0x442f33(0x1ce)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x2727fd,_0xe11754){const _0x45970a=a60_0x3a79aa,_0xc9fc61=readBusinessGroupFromDatasetDetail(_0x2727fd,_0xe11754[_0x45970a(0x1ca)]);if(_0xc9fc61['found'])return normalizeBusinessGroup(_0xc9fc61[_0x45970a(0x1de)]);if(_0xe11754[_0x45970a(0x1ca)]===_0x45970a(0x1be))return'';throw CliErrors[_0x45970a(0x1ce)](_0x45970a(0x1d8),_0x45970a(0x1bf));}function readBusinessGroupFromDatasetDetail(_0x326246,_0x447bc1){const _0x4a6ab5=a60_0x3a79aa,_0x5d65ca=asPlainObject(_0x326246['dataset']),_0x18484a=firstPresent(_0x326246['businessGroup']);if(_0x18484a[_0x4a6ab5(0x1c2)])return _0x18484a;const _0xb2464d=firstPresent(_0x5d65ca[_0x4a6ab5(0x1d5)]);if(_0xb2464d[_0x4a6ab5(0x1c2)])return _0xb2464d;if(_0x447bc1===_0x4a6ab5(0x1ba))return{'found':![]};const _0x49cc03=readBusinessGroupFromExtend(_0x326246[_0x4a6ab5(0x1c8)]);if(_0x49cc03[_0x4a6ab5(0x1c2)])return _0x49cc03;return readBusinessGroupFromExtend(_0x5d65ca[_0x4a6ab5(0x1c8)]);}function readBusinessGroupFromExtend(_0x265022){const _0x509e6c=a60_0x3a79aa;if(_0x265022===undefined||_0x265022===null||_0x265022==='')return{'found':![]};if(typeof _0x265022===_0x509e6c(0x1e3))try{const _0x39a837=JSON[_0x509e6c(0x1ae)](_0x265022);return readBusinessGroupFromExtend(_0x39a837);}catch{return{'found':![]};}const _0x13a749=asPlainObject(_0x265022);if(Object[_0x509e6c(0x1e4)][_0x509e6c(0x1b9)][_0x509e6c(0x1d2)](_0x13a749,_0x509e6c(0x1d5)))return{'found':!![],'value':_0x13a749[_0x509e6c(0x1d5)]};return{'found':![]};}function firstPresent(..._0x30978e){for(const _0x147d5f of _0x30978e){if(_0x147d5f!==undefined&&_0x147d5f!==null)return{'found':!![],'value':_0x147d5f};}return{'found':![]};}function assertExpectedBusinessGroup(_0x12651f,_0x34d3de){const _0x1487a3=a60_0x3a79aa;if(_0x34d3de===undefined)return;const _0x2d9596=normalizeBusinessGroup(_0x34d3de);if(_0x12651f!==_0x2d9596)throw CliErrors['validation'](_0x1487a3(0x1e1),_0x1487a3(0x1b8)+JSON['stringify'](_0x2d9596)+_0x1487a3(0x1ad)+JSON[_0x1487a3(0x1df)](_0x12651f));}function buildBackendPayload(_0x5e11c8,_0xa51819,_0x5cee04){const _0x54c23a=a60_0x3a79aa;return{'appCode':_0x5e11c8,'datasetCode':_0xa51819[_0x54c23a(0x1e6)],'businessGroup':_0x5cee04};}function normalizeBusinessGroup(_0x4ab2f9){if(_0x4ab2f9===undefined||_0x4ab2f9===null)return'';return String(_0x4ab2f9)['trim']();}function asPlainObject(_0x1ac0b6){const _0xe32a17=a60_0x3a79aa;if(!_0x1ac0b6||typeof _0x1ac0b6!==_0xe32a17(0x1b7)||Array[_0xe32a17(0x1c7)](_0x1ac0b6))return{};return _0x1ac0b6;}function firstString(..._0x1ab30f){const _0x921a1e=a60_0x3a79aa;for(const _0x7637f0 of _0x1ab30f){if(typeof _0x7637f0===_0x921a1e(0x1e3)&&_0x7637f0[_0x921a1e(0x1d3)]())return _0x7637f0[_0x921a1e(0x1d3)]();if(typeof _0x7637f0==='number'&&Number[_0x921a1e(0x1cf)](_0x7637f0))return String(_0x7637f0);}return undefined;}function firstNumber(..._0x29cab2){const _0x1e1349=a60_0x3a79aa;for(const _0x3b4459 of _0x29cab2){if(typeof _0x3b4459==='number'&&Number[_0x1e1349(0x1cf)](_0x3b4459))return _0x3b4459;if(typeof _0x3b4459===_0x1e1349(0x1e3)&&_0x3b4459[_0x1e1349(0x1d3)]()&&Number[_0x1e1349(0x1cf)](Number(_0x3b4459)))return Number(_0x3b4459);}return null;}function a60_0x4162(){const _0x1a2312=['prototype','expectBusinessGroup','code','3590168lrzYzL','message','datasetId','--business-group\x20is\x20required','business-group','3074970nYDByX',',\x20actual\x20','parse','modelCode','7615VUSSOU','business-group-update','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','4684xEOKXU','appCode','source','Update\x20business\x20scenario\x20group','object','Expected\x20','hasOwnProperty','DB_TABLE','POST','str','13374603LTBzvu','METADATA','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','dbtableConfig','/smartapi/question/er-config/business-group/edit','found','modelId','data','toUpperCase','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','isArray','extend','apiError','sourceType','dataset','2252572erQCpA','9wxFOMo','validation','isFinite','payload','write','call','trim','380NXJPku','businessGroup','keys','6480ijKrxW','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','backend','55xjaLxW','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','3480841HubRkE','expect-business-group','value','stringify','name','Expectation\x20mismatch\x20at\x20businessGroup','matched','string'];a60_0x4162=function(){return _0x1a2312;};return a60_0x4162();}function trim(_0x3d4dbc){const _0x141162=a60_0x3a79aa;return String(_0x3d4dbc||'')[_0x141162(0x1d3)]();}
1
+ const a59_0x5bb58d=a59_0x34b8;(function(_0x475827,_0x35a339){const _0x4545c6=a59_0x34b8,_0x20a4dd=_0x475827();while(!![]){try{const _0x2a51e6=parseInt(_0x4545c6(0x197))/0x1*(-parseInt(_0x4545c6(0x1a9))/0x2)+parseInt(_0x4545c6(0x1b9))/0x3*(-parseInt(_0x4545c6(0x19e))/0x4)+-parseInt(_0x4545c6(0x1b4))/0x5*(-parseInt(_0x4545c6(0x192))/0x6)+-parseInt(_0x4545c6(0x193))/0x7*(parseInt(_0x4545c6(0x1b6))/0x8)+parseInt(_0x4545c6(0x1c3))/0x9+-parseInt(_0x4545c6(0x1bf))/0xa+parseInt(_0x4545c6(0x1ba))/0xb;if(_0x2a51e6===_0x35a339)break;else _0x20a4dd['push'](_0x20a4dd['shift']());}catch(_0x432294){_0x20a4dd['push'](_0x20a4dd['shift']());}}}(a59_0x39f7,0xab6e2));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3a76cd,input:_0x47a792,dryRun:_0x35d10a}){const _0x208cb4=a59_0x34b8;validateInput(_0x47a792);const _0xcecdaa=normalizeBusinessGroup(_0x47a792[_0x208cb4(0x1ab)]),_0x4bdeda=await getDatasetDetail(_0x47a792[_0x208cb4(0x1a7)]),_0x276431=resolveBusinessGroupDataset(_0x4bdeda,_0x47a792['code']),_0x31ea90=loadCurrentBusinessGroup(_0x4bdeda,_0x276431);assertExpectedBusinessGroup(_0x31ea90,_0x47a792[_0x208cb4(0x18a)]);const _0x194f45=buildBackendPayload(_0x3a76cd,_0x276431,_0xcecdaa),_0x685336=_0x31ea90!==_0xcecdaa;let _0x13524f;if(_0x685336&&!_0x35d10a){await updateErBusinessGroup(_0x194f45);const _0xd9e679=await getDatasetDetail(_0x276431['code']),_0x20a366=resolveBusinessGroupDataset(_0xd9e679,_0x276431[_0x208cb4(0x1a7)]),_0x1be1e6=loadCurrentBusinessGroup(_0xd9e679,_0x20a366);if(_0x1be1e6!==_0xcecdaa)throw CliErrors[_0x208cb4(0x1a1)](_0x208cb4(0x1ad),_0x208cb4(0x189)+JSON['stringify'](_0xcecdaa)+_0x208cb4(0x19a)+JSON['stringify'](_0x1be1e6)+'.');_0x13524f={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x1be1e6}};}else!_0x685336&&(_0x13524f={'verified':!![],'status':_0x208cb4(0x1b1),'afterReadback':{'businessGroup':_0x31ea90}});const _0x5915c4={'operation':'update','appCode':_0x3a76cd,'selector':{'code':_0x276431['code']},'dataset':_0x276431,'before':{'businessGroup':_0x31ea90},'after':{'businessGroup':_0xcecdaa},'changed':_0x685336,'dryRun':_0x35d10a,'submitted':_0x685336&&!_0x35d10a,'backend':{'method':_0x208cb4(0x1b7),'path':BACKEND_PATH,'payload':_0x194f45},..._0x13524f?{'verification':_0x13524f}:{},'warnings':[]};return{'ok':!![],'data':_0x5915c4,'message':_0x685336?_0x35d10a?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x276431[_0x208cb4(0x1a7)]:_0x208cb4(0x18b)+_0x276431[_0x208cb4(0x1a7)]:_0x208cb4(0x18f)+_0x276431[_0x208cb4(0x1a7)]};}export const datasetBusinessGroupUpdate={'service':a59_0x5bb58d(0x1c6),'command':a59_0x5bb58d(0x19c),'description':'Update\x20business\x20scenario\x20group','risk':a59_0x5bb58d(0x18e),'flags':[CODE_FLAG,{'name':'business-group','type':a59_0x5bb58d(0x1af),'required':!![],'description':a59_0x5bb58d(0x1a3)},{'name':a59_0x5bb58d(0x1bd),'type':a59_0x5bb58d(0x1af),'required':![],'description':a59_0x5bb58d(0x19d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x33f6aa){validateInput(readBusinessGroupUpdateInput(_0x33f6aa));},async 'dryRun'(_0x2a0081){const _0x396f12=a59_0x5bb58d,_0x4da193=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2a0081[_0x396f12(0x198)],'input':readBusinessGroupUpdateInput(_0x2a0081),'dryRun':!![]});return{'method':_0x396f12(0x1b7),'url':BACKEND_PATH,'body':_0x4da193[_0x396f12(0x1a4)][_0x396f12(0x1a8)][_0x396f12(0x1ae)],'description':_0x4da193[_0x396f12(0x1bb)],..._0x4da193[_0x396f12(0x1a4)]};},async 'execute'(_0x128224){const _0x487e46=a59_0x5bb58d;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x128224[_0x487e46(0x198)],'input':readBusinessGroupUpdateInput(_0x128224),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x509d21){const _0x79779a=a59_0x5bb58d,_0x4cf815=_0x509d21[_0x79779a(0x1c4)](_0x79779a(0x1bd));return{'code':trim(_0x509d21[_0x79779a(0x1c4)](_0x79779a(0x1a7))),'businessGroup':_0x509d21[_0x79779a(0x1c4)]('business-group'),'expectBusinessGroup':_0x4cf815===undefined||_0x4cf815===''?undefined:_0x4cf815};}function validateInput(_0x294917){const _0x15a74c=a59_0x5bb58d;if(!trim(_0x294917[_0x15a74c(0x1a7)]))throw CliErrors['validation']('--code\x20is\x20required');if(_0x294917[_0x15a74c(0x1ab)]===undefined)throw CliErrors[_0x15a74c(0x195)](_0x15a74c(0x19b));}function resolveBusinessGroupDataset(_0x39cca2,_0x5b0dfe){const _0x371707=a59_0x5bb58d,_0x1b60fd=asPlainObject(_0x39cca2[_0x371707(0x1c6)]),_0x4b7dac=asPlainObject(_0x39cca2[_0x371707(0x1aa)]),_0xaa5c20=resolveSourceType(_0x39cca2,_0x1b60fd,_0x4b7dac),_0x52a6f7=firstString(_0x39cca2[_0x371707(0x1ac)],_0x39cca2[_0x371707(0x1a7)],_0x1b60fd['datasetCode'],_0x5b0dfe)||_0x5b0dfe;return{'id':firstNumber(_0x39cca2[_0x371707(0x1c1)],_0x39cca2['id'],_0x1b60fd[_0x371707(0x1a5)])??firstString(_0x39cca2[_0x371707(0x1c1)],_0x39cca2['id'],_0x1b60fd[_0x371707(0x1a5)])??null,'code':_0x52a6f7,'name':firstString(_0x39cca2[_0x371707(0x1b2)],_0x1b60fd[_0x371707(0x18d)],_0x1b60fd['name'])||null,'sourceType':_0xaa5c20};}function resolveSourceType(_0xd393bc,_0x2a0f6b,_0x4d04ee){const _0x58fc87=a59_0x5bb58d,_0x14af41=firstString(_0xd393bc[_0x58fc87(0x190)],_0xd393bc[_0x58fc87(0x187)],_0x2a0f6b[_0x58fc87(0x190)],_0x2a0f6b[_0x58fc87(0x187)])?.[_0x58fc87(0x1c5)]()['toUpperCase']();if(_0x14af41===_0x58fc87(0x1b8)||_0x14af41===_0x58fc87(0x1b0))return _0x14af41;if(Object[_0x58fc87(0x1a0)](_0x4d04ee)[_0x58fc87(0x196)]>0x0)return _0x58fc87(0x1b8);throw CliErrors[_0x58fc87(0x195)](_0x58fc87(0x1b5));}function loadCurrentBusinessGroup(_0x49a57c,_0xed6aae){const _0x4c2d78=a59_0x5bb58d,_0x30a371=readBusinessGroupFromDatasetDetail(_0x49a57c,_0xed6aae[_0x4c2d78(0x187)]);if(_0x30a371['found'])return normalizeBusinessGroup(_0x30a371[_0x4c2d78(0x1be)]);if(_0xed6aae[_0x4c2d78(0x187)]===_0x4c2d78(0x1b0))return'';throw CliErrors[_0x4c2d78(0x195)](_0x4c2d78(0x1c0),_0x4c2d78(0x191));}function a59_0x39f7(){const _0x4bde46=['expect-business-group','value','7856490NUHjtp','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','modelId','extend','4369941RXOtPq','str','trim','dataset','sourceType','stringify','Expected\x20','expectBusinessGroup','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','object','datasetName','write','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','source','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','222KBYJeX','7hdezTV','Expectation\x20mismatch\x20at\x20businessGroup','validation','length','2ToKCjW','appCode','parse',',\x20actual\x20','--business-group\x20is\x20required','business-group-update','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','65708FvJwvJ','number','keys','apiError','isArray','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','data','datasetId','prototype','code','backend','911496VEOHYa','dbtableConfig','businessGroup','modelCode','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','payload','string','METADATA','unchanged','name','found','143770fwqrfb','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','4731784LAfaLC','POST','DB_TABLE','87yRMDNM','21095052KuFPon','message','isFinite'];a59_0x39f7=function(){return _0x4bde46;};return a59_0x39f7();}function readBusinessGroupFromDatasetDetail(_0x2a99d5,_0x299c99){const _0x4f3099=a59_0x5bb58d,_0x437fe8=asPlainObject(_0x2a99d5['dataset']),_0x33c5f1=firstPresent(_0x2a99d5['businessGroup']);if(_0x33c5f1[_0x4f3099(0x1b3)])return _0x33c5f1;const _0x45b21b=firstPresent(_0x437fe8[_0x4f3099(0x1ab)]);if(_0x45b21b[_0x4f3099(0x1b3)])return _0x45b21b;if(_0x299c99===_0x4f3099(0x1b8))return{'found':![]};const _0x1c1f7a=readBusinessGroupFromExtend(_0x2a99d5[_0x4f3099(0x1c2)]);if(_0x1c1f7a[_0x4f3099(0x1b3)])return _0x1c1f7a;return readBusinessGroupFromExtend(_0x437fe8[_0x4f3099(0x1c2)]);}function a59_0x34b8(_0x3037ad,_0x372b71){_0x3037ad=_0x3037ad-0x187;const _0x39f74d=a59_0x39f7();let _0x34b82a=_0x39f74d[_0x3037ad];return _0x34b82a;}function readBusinessGroupFromExtend(_0x33dc62){const _0x1c519f=a59_0x5bb58d;if(_0x33dc62===undefined||_0x33dc62===null||_0x33dc62==='')return{'found':![]};if(typeof _0x33dc62==='string')try{const _0x4ab483=JSON[_0x1c519f(0x199)](_0x33dc62);return readBusinessGroupFromExtend(_0x4ab483);}catch{return{'found':![]};}const _0x2ea40f=asPlainObject(_0x33dc62);if(Object[_0x1c519f(0x1a6)]['hasOwnProperty']['call'](_0x2ea40f,'businessGroup'))return{'found':!![],'value':_0x2ea40f[_0x1c519f(0x1ab)]};return{'found':![]};}function firstPresent(..._0x170c88){for(const _0x5c37f8 of _0x170c88){if(_0x5c37f8!==undefined&&_0x5c37f8!==null)return{'found':!![],'value':_0x5c37f8};}return{'found':![]};}function assertExpectedBusinessGroup(_0x277083,_0x466693){const _0x239196=a59_0x5bb58d;if(_0x466693===undefined)return;const _0x457263=normalizeBusinessGroup(_0x466693);if(_0x277083!==_0x457263)throw CliErrors['validation'](_0x239196(0x194),'Expected\x20'+JSON[_0x239196(0x188)](_0x457263)+',\x20actual\x20'+JSON[_0x239196(0x188)](_0x277083));}function buildBackendPayload(_0x15eb1d,_0x3bd545,_0x27c4b9){const _0x977c82=a59_0x5bb58d;return{'appCode':_0x15eb1d,'datasetCode':_0x3bd545[_0x977c82(0x1a7)],'businessGroup':_0x27c4b9};}function normalizeBusinessGroup(_0x2a103a){const _0x5f19e8=a59_0x5bb58d;if(_0x2a103a===undefined||_0x2a103a===null)return'';return String(_0x2a103a)[_0x5f19e8(0x1c5)]();}function asPlainObject(_0x2f2c06){const _0x48f992=a59_0x5bb58d;if(!_0x2f2c06||typeof _0x2f2c06!==_0x48f992(0x18c)||Array[_0x48f992(0x1a2)](_0x2f2c06))return{};return _0x2f2c06;}function firstString(..._0x24f211){const _0x474935=a59_0x5bb58d;for(const _0x5f0935 of _0x24f211){if(typeof _0x5f0935===_0x474935(0x1af)&&_0x5f0935[_0x474935(0x1c5)]())return _0x5f0935[_0x474935(0x1c5)]();if(typeof _0x5f0935===_0x474935(0x19f)&&Number[_0x474935(0x1bc)](_0x5f0935))return String(_0x5f0935);}return undefined;}function firstNumber(..._0x1e244a){const _0xcf86af=a59_0x5bb58d;for(const _0x4a717d of _0x1e244a){if(typeof _0x4a717d===_0xcf86af(0x19f)&&Number[_0xcf86af(0x1bc)](_0x4a717d))return _0x4a717d;if(typeof _0x4a717d===_0xcf86af(0x1af)&&_0x4a717d[_0xcf86af(0x1c5)]()&&Number[_0xcf86af(0x1bc)](Number(_0x4a717d)))return Number(_0x4a717d);}return null;}function trim(_0x5da7f0){const _0x19269e=a59_0x5bb58d;return String(_0x5da7f0||'')[_0x19269e(0x1c5)]();}
@@ -1 +1 @@
1
- const a61_0x5d27aa=a61_0x3a92;(function(_0x3c274b,_0x5854b8){const _0x3812bc=a61_0x3a92,_0x30ec18=_0x3c274b();while(!![]){try{const _0x4a245b=-parseInt(_0x3812bc(0x17a))/0x1*(parseInt(_0x3812bc(0x18b))/0x2)+parseInt(_0x3812bc(0x16f))/0x3*(-parseInt(_0x3812bc(0x186))/0x4)+parseInt(_0x3812bc(0x17b))/0x5*(-parseInt(_0x3812bc(0x16c))/0x6)+parseInt(_0x3812bc(0x175))/0x7+-parseInt(_0x3812bc(0x16d))/0x8+-parseInt(_0x3812bc(0x184))/0x9*(parseInt(_0x3812bc(0x18c))/0xa)+parseInt(_0x3812bc(0x185))/0xb;if(_0x4a245b===_0x5854b8)break;else _0x30ec18['push'](_0x30ec18['shift']());}catch(_0x15cd7e){_0x30ec18['push'](_0x30ec18['shift']());}}}(a61_0xd8fd,0xbd988));import{CliErrors}from'../../errors.js';function a61_0x3a92(_0x22bd58,_0x4d0961){_0x22bd58=_0x22bd58-0x16a;const _0xd8fdb=a61_0xd8fd();let _0x3a92fd=_0xd8fdb[_0x22bd58];return _0x3a92fd;}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x5d27aa(0x182),'filter':a61_0x5d27aa(0x178),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x5d27aa(0x17e);function valueToString(_0x1c2e32){const _0x2b62a7=a61_0x5d27aa;return _0x1c2e32==null?'':String(_0x1c2e32)[_0x2b62a7(0x171)]();}function getDatasetCode(_0x3caca2){const _0x44eb6c=a61_0x5d27aa;return valueToString(_0x3caca2[_0x44eb6c(0x16a)]??_0x3caca2[_0x44eb6c(0x176)]??_0x3caca2[_0x44eb6c(0x17f)]?.[_0x44eb6c(0x183)]);}function getDatasetName(_0x4d7e3f){const _0x25bdfc=a61_0x5d27aa;return valueToString(_0x4d7e3f[_0x25bdfc(0x17d)]??_0x4d7e3f['dataset']?.[_0x25bdfc(0x17c)])||'unknown';}function getDatasetSource(_0x11f535){const _0x3a435f=a61_0x5d27aa;return valueToString(_0x11f535[_0x3a435f(0x173)]??_0x11f535[_0x3a435f(0x17f)]?.[_0x3a435f(0x174)])[_0x3a435f(0x181)]();}function getDbtableConfig(_0x35a78b){const _0x3de5ba=a61_0x5d27aa,_0x2a33cc=_0x35a78b[_0x3de5ba(0x187)]??_0x35a78b['dbtable'];return _0x2a33cc&&typeof _0x2a33cc===_0x3de5ba(0x188)?_0x2a33cc:{};}export function isDbTableBackedDataset(_0x3737f0){const _0x3640a9=a61_0x5d27aa,_0xbd5364=getDatasetSource(_0x3737f0);if(_0xbd5364===_0x3640a9(0x170))return![];const _0x42bf6b=getDbtableConfig(_0x3737f0),_0x504ea4=_0x42bf6b[_0x3640a9(0x177)]??_0x42bf6b['id'],_0x37838c=valueToString(_0x42bf6b[_0x3640a9(0x16b)]??_0x3737f0[_0x3640a9(0x16b)]??_0x3737f0[_0x3640a9(0x17f)]?.[_0x3640a9(0x16b)]);return _0x504ea4!==undefined&&_0x504ea4!==null&&_0x37838c['length']>0x0;}export function filterDbTableBackedDatasets(_0x34d86c){return _0x34d86c['filter'](_0x3f5ecc=>isDbTableBackedDataset(_0x3f5ecc));}export function buildDbTableBackedRequirementMessage(_0x47464a,_0x3afa41=a61_0x5d27aa(0x18d)){const _0x58f550=a61_0x5d27aa,_0x2e5969=getDatasetSource(_0x47464a)||_0x58f550(0x16e),_0x4b2040=getDatasetName(_0x47464a),_0x1e4a1b=getDatasetCode(_0x47464a),_0xa551dc=_0x1e4a1b?'\x20('+_0x1e4a1b+')':'';return['当前数据集\x20\x22'+_0x4b2040+'\x22'+_0xa551dc+'\x20是\x20'+_0x2e5969+'\x20类型,没有可用于\x20'+_0x3afa41+_0x58f550(0x189),_0x58f550(0x172),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x58f550(0x180)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x58f550(0x18a)]('\x20');}function a61_0xd8fd(){const _0x1d3fe6=['20105PnCFPe','datasetName','name','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','dataset','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','toUpperCase','lovrabet','datasetCode','3057534siGWfX','42242607ZOJDIi','4VLfnmT','dbtableConfig','object','\x20的\x20DB_TABLE\x20数据源上下文。','join','928366ESlzFG','20BsSzkr','SQL\x20schema\x20validation','code','tableName','1266ustyxa','2619600zqRKrE','UNKNOWN','3139308mBFjyz','METADATA','trim','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','source','sourceType','8614655ajAifB','modelCode','dbId','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','validation','3cMxsMa'];a61_0xd8fd=function(){return _0x1d3fe6;};return a61_0xd8fd();}export function assertDatasetIsDbTableBacked(_0x2b0ed1,_0x296629){const _0x39070e=a61_0x5d27aa;if(!isDbTableBackedDataset(_0x2b0ed1))throw CliErrors[_0x39070e(0x179)](buildDbTableBackedRequirementMessage(_0x2b0ed1,_0x296629));}
1
+ function a60_0x3b8a(_0x390814,_0x5193e0){_0x390814=_0x390814-0xd3;const _0x1d58ba=a60_0x1d58();let _0x3b8a49=_0x1d58ba[_0x390814];return _0x3b8a49;}const a60_0x3b18b1=a60_0x3b8a;(function(_0x735b6,_0x4e843a){const _0x1b760e=a60_0x3b8a,_0x26cd0f=_0x735b6();while(!![]){try{const _0x33ef03=-parseInt(_0x1b760e(0xe3))/0x1*(parseInt(_0x1b760e(0xdb))/0x2)+parseInt(_0x1b760e(0xe4))/0x3*(parseInt(_0x1b760e(0xe8))/0x4)+-parseInt(_0x1b760e(0xd3))/0x5+parseInt(_0x1b760e(0xee))/0x6*(-parseInt(_0x1b760e(0xec))/0x7)+parseInt(_0x1b760e(0xea))/0x8*(parseInt(_0x1b760e(0xe2))/0x9)+-parseInt(_0x1b760e(0xde))/0xa*(parseInt(_0x1b760e(0xf0))/0xb)+parseInt(_0x1b760e(0xf5))/0xc;if(_0x33ef03===_0x4e843a)break;else _0x26cd0f['push'](_0x26cd0f['shift']());}catch(_0x45b634){_0x26cd0f['push'](_0x26cd0f['shift']());}}}(a60_0x1d58,0xcfbb4));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x3b18b1(0xd6),'filter':a60_0x3b18b1(0xf4),'getOne':a60_0x3b18b1(0xe6)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x3b18b1(0xdd);function valueToString(_0xd6508){return _0xd6508==null?'':String(_0xd6508)['trim']();}function a60_0x1d58(){const _0x4b865e=['join','1045200kacIEk','object','35JNxeQf','dataset','1885548yQxant','\x20是\x20','44759iPfIog','tableName','dbtable','sourceType','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','45594060HrAtix','validation','dbtableConfig','datasetCode','getOne','6314160fgPlxq','modelCode','name','lovrabet','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','METADATA','length','filter','746108CsLKhF','UNKNOWN','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','3170AAVQnM','datasetName','dbId','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','99tnClwk','2AimBiq','4116zrkUkE','code','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','\x20的\x20DB_TABLE\x20数据源上下文。','1412tZHvPS'];a60_0x1d58=function(){return _0x4b865e;};return a60_0x1d58();}function getDatasetCode(_0x20e481){const _0x3b8c90=a60_0x3b18b1;return valueToString(_0x20e481[_0x3b8c90(0xe5)]??_0x20e481[_0x3b8c90(0xd4)]??_0x20e481[_0x3b8c90(0xed)]?.[_0x3b8c90(0xf8)]);}function getDatasetName(_0x39afa3){const _0x3478b5=a60_0x3b18b1;return valueToString(_0x39afa3[_0x3478b5(0xd5)]??_0x39afa3[_0x3478b5(0xed)]?.[_0x3478b5(0xdf)])||'unknown';}function getDatasetSource(_0x49b96e){const _0x4d4315=a60_0x3b18b1;return valueToString(_0x49b96e['source']??_0x49b96e[_0x4d4315(0xed)]?.[_0x4d4315(0xf3)])['toUpperCase']();}function getDbtableConfig(_0x5211b5){const _0x16d43f=a60_0x3b18b1,_0x16d6a1=_0x5211b5[_0x16d43f(0xf7)]??_0x5211b5[_0x16d43f(0xf2)];return _0x16d6a1&&typeof _0x16d6a1===_0x16d43f(0xeb)?_0x16d6a1:{};}export function isDbTableBackedDataset(_0x43c7db){const _0x457c6e=a60_0x3b18b1,_0x1c9db5=getDatasetSource(_0x43c7db);if(_0x1c9db5===_0x457c6e(0xd8))return![];const _0x42d51d=getDbtableConfig(_0x43c7db),_0x75227f=_0x42d51d[_0x457c6e(0xe0)]??_0x42d51d['id'],_0x598fa8=valueToString(_0x42d51d[_0x457c6e(0xf1)]??_0x43c7db['tableName']??_0x43c7db['dataset']?.['tableName']);return _0x75227f!==undefined&&_0x75227f!==null&&_0x598fa8[_0x457c6e(0xd9)]>0x0;}export function filterDbTableBackedDatasets(_0x14f464){const _0x4b0f4f=a60_0x3b18b1;return _0x14f464[_0x4b0f4f(0xda)](_0x1be4fa=>isDbTableBackedDataset(_0x1be4fa));}export function buildDbTableBackedRequirementMessage(_0xb7849e,_0x243e54='SQL\x20schema\x20validation'){const _0x38c4b5=a60_0x3b18b1,_0x24ca0c=getDatasetSource(_0xb7849e)||_0x38c4b5(0xdc),_0x48be07=getDatasetName(_0xb7849e),_0x1e9a0f=getDatasetCode(_0xb7849e),_0x34428e=_0x1e9a0f?'\x20('+_0x1e9a0f+')':'';return['当前数据集\x20\x22'+_0x48be07+'\x22'+_0x34428e+_0x38c4b5(0xef)+_0x24ca0c+'\x20类型,没有可用于\x20'+_0x243e54+_0x38c4b5(0xe7),_0x38c4b5(0xd7),_0x38c4b5(0xe1),'如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:'+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x38c4b5(0xf9)]+'。'][_0x38c4b5(0xe9)]('\x20');}export function assertDatasetIsDbTableBacked(_0x2c1cd3,_0x5af77b){const _0x43af4f=a60_0x3b18b1;if(!isDbTableBackedDataset(_0x2c1cd3))throw CliErrors[_0x43af4f(0xf6)](buildDbTableBackedRequirementMessage(_0x2c1cd3,_0x5af77b));}
@@ -1 +1 @@
1
- function a62_0xc717(_0x5f5ad1,_0x4dee6f){_0x5f5ad1=_0x5f5ad1-0x91;const _0x36680e=a62_0x3668();let _0xc71732=_0x36680e[_0x5f5ad1];return _0xc71732;}const a62_0x567567=a62_0xc717;(function(_0x303234,_0x77f6e6){const _0x5a9d25=a62_0xc717,_0xbb9f8b=_0x303234();while(!![]){try{const _0x386fe3=-parseInt(_0x5a9d25(0x9b))/0x1+-parseInt(_0x5a9d25(0xa6))/0x2*(-parseInt(_0x5a9d25(0xbf))/0x3)+-parseInt(_0x5a9d25(0x99))/0x4+parseInt(_0x5a9d25(0xa1))/0x5+parseInt(_0x5a9d25(0xb8))/0x6*(-parseInt(_0x5a9d25(0xa8))/0x7)+parseInt(_0x5a9d25(0x97))/0x8*(parseInt(_0x5a9d25(0x95))/0x9)+parseInt(_0x5a9d25(0xae))/0xa;if(_0x386fe3===_0x77f6e6)break;else _0xbb9f8b['push'](_0xbb9f8b['shift']());}catch(_0x47f275){_0xbb9f8b['push'](_0xbb9f8b['shift']());}}}(a62_0x3668,0x75209));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_0x567567(0xb3),'description':'Dataset\x20id'},DBID_FLAG={'name':'dbid','type':a62_0x567567(0xb3),'description':a62_0x567567(0xa5)},CONFIRM_FLAG={'name':a62_0x567567(0xad),'type':'boolean','description':a62_0x567567(0xbd)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a62_0x567567(0xb3),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a62_0x567567(0x9c),'command':a62_0x567567(0x92),'description':a62_0x567567(0xba),'risk':a62_0x567567(0xab),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4b902f){const _0xcbc53a=a62_0x567567,_0x56263e=_0x4b902f[_0xcbc53a(0xc2)]('id'),_0x26d792=_0x4b902f['str'](_0xcbc53a(0x98)),_0x5ef0a3=_0x4b902f[_0xcbc53a(0xc2)](_0xcbc53a(0xac)),_0x23a209=[_0x56263e>0x0,Boolean(_0x26d792),_0x5ef0a3>0x0][_0xcbc53a(0x94)](Boolean);if(_0x23a209[_0xcbc53a(0x93)]===0x0)throw CliErrors[_0xcbc53a(0xa0)](_0xcbc53a(0xaa));if(_0x23a209['length']>0x1)throw CliErrors[_0xcbc53a(0xa0)](_0xcbc53a(0xb4));},async 'dryRun'(_0xa64dbc){const _0x3aef13=a62_0x567567,_0x34f9ba=await resolveTargets(_0xa64dbc);return{'method':_0x3aef13(0xa2),'url':_0x3aef13(0xaf),'body':{'appCode':_0xa64dbc[_0x3aef13(0xb5)],'count':_0x34f9ba[_0x3aef13(0x93)],'datasets':_0x34f9ba},'description':_0x3aef13(0xa9)+_0x34f9ba[_0x3aef13(0x93)]+_0x3aef13(0xb1)};},async 'execute'(_0x29b1d3){const _0x3f9511=a62_0x567567;if(!_0x29b1d3[_0x3f9511(0xb7)](_0x3f9511(0xad)))throw CliErrors[_0x3f9511(0xa0)](_0x3f9511(0xb6),_0x3f9511(0x91));const _0x4303ad=await resolveTargets(_0x29b1d3),_0x14ccfd=[],_0x143922=[];for(const _0x5b4bce of _0x4303ad){try{await deleteDataset(_0x29b1d3[_0x3f9511(0xb5)],_0x5b4bce['id']),_0x14ccfd['push'](_0x5b4bce);}catch(_0x2de5b9){_0x143922[_0x3f9511(0x96)]({..._0x5b4bce,'error':_0x2de5b9 instanceof Error?_0x2de5b9[_0x3f9511(0xbb)]:String(_0x2de5b9)});}}if(_0x143922['length']>0x0)return{'ok':![],'data':{'requested':_0x4303ad[_0x3f9511(0x93)],'deletedCount':_0x14ccfd['length'],'failedCount':_0x143922[_0x3f9511(0x93)],'deleted':_0x14ccfd,'failed':_0x143922},'message':_0x3f9511(0xbc)+_0x14ccfd[_0x3f9511(0x93)]+'/'+_0x4303ad[_0x3f9511(0x93)]+_0x3f9511(0xbe)+_0x143922[_0x3f9511(0x93)]+_0x3f9511(0xa3)};return{'ok':!![],'data':{'requested':_0x4303ad[_0x3f9511(0x93)],'deletedCount':_0x14ccfd['length'],'deleted':_0x14ccfd},'message':_0x3f9511(0xbc)+_0x14ccfd[_0x3f9511(0x93)]+'\x20dataset(s)'};}};async function resolveTargets(_0x4b15ba){const _0x48f559=a62_0x567567,_0x456e6b=_0x4b15ba['num']('id'),_0x378b9f=_0x4b15ba[_0x48f559(0xc0)]('code'),_0x1f5432=_0x4b15ba[_0x48f559(0xc2)](_0x48f559(0xac));let _0x4ecd8a;_0x378b9f?(_0x4ecd8a=await listDatasets(_0x4b15ba['appCode'],{'code':_0x378b9f}),_0x4ecd8a=_0x4ecd8a[_0x48f559(0x94)](_0xf4d410=>_0xf4d410[_0x48f559(0x98)]===_0x378b9f)):(_0x4ecd8a=await listDatasets(_0x4b15ba[_0x48f559(0xb5)]),_0x456e6b>0x0&&(_0x4ecd8a=_0x4ecd8a[_0x48f559(0x94)](_0xc83acf=>_0xc83acf['id']===_0x456e6b)),_0x1f5432>0x0&&(_0x4ecd8a=_0x4ecd8a[_0x48f559(0x94)](_0x14b4f7=>_0x14b4f7[_0x48f559(0x9e)]?.[_0x48f559(0x9d)]===_0x1f5432)));const _0x14a997=[];for(const _0x5f45ba of _0x4ecd8a){const _0xfeb23e=await getDatasetDetail(_0x5f45ba['code']),_0x343d5e=Array[_0x48f559(0xb2)](_0xfeb23e['relatedPageInfoList'])?_0xfeb23e[_0x48f559(0xa4)]['filter'](_0x572068=>_0x572068!=null&&typeof _0x572068==='object'&&_0x572068[_0x48f559(0x9f)]!==!![]):[];_0x14a997[_0x48f559(0x96)](normalizeTarget(_0x5f45ba,_0x343d5e[_0x48f559(0x93)]));}if(_0x14a997[_0x48f559(0x93)]===0x0){const _0xff4b71=_0x378b9f||(_0x456e6b>0x0?'id='+_0x456e6b:_0x48f559(0xb0)+_0x1f5432);throw CliErrors[_0x48f559(0xa0)](_0x48f559(0x9a)+_0xff4b71+'.');}const _0x2d2638=_0x4b15ba[_0x48f559(0xc2)](_0x48f559(0xc1));if(_0x2d2638>0x0&&_0x14a997[_0x48f559(0x93)]!==_0x2d2638)throw CliErrors[_0x48f559(0xa0)](_0x48f559(0xa7)+_0x14a997[_0x48f559(0x93)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x2d2638+'.');return _0x14a997;}function a62_0x3668(){const _0x1a221c=['Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','appCode','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','bool','168EUZoCb','dbName','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','message','Deleted\x20','Required\x20to\x20execute\x20dataset\x20deletion','\x20dataset(s);\x20','8325cncBod','str','expected-count','num','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','delete','length','filter','9ZqUybZ','push','5568440QUsuex','code','2695256WVuiLc','No\x20undeleted\x20dataset\x20found\x20for\x20','910351iSJOPL','dataset','dbId','dbtableConfig','deleted','validation','2019260rBuQFp','POST','\x20failed','relatedPageInfoList','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','230aawSIc','Matched\x20','44408hrPlbX','Would\x20delete\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','high-risk-write','dbid','confirm','8225180gUJFyP','/smartapi/dataset/delete-dataset','dbid=','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','isArray','number'];a62_0x3668=function(){return _0x1a221c;};return a62_0x3668();}function normalizeTarget(_0x41f489,_0xb906cb){const _0x10d1db=a62_0x567567,_0x47f307=_0x41f489[_0x10d1db(0x9e)]??{};return{'id':_0x41f489['id'],'code':_0x41f489[_0x10d1db(0x98)],'name':_0x41f489['name'],'description':_0x41f489['description'],'source':_0x41f489['source'],'dbId':_0x47f307['dbId'],'dbName':_0x47f307[_0x10d1db(0xb9)],'tableName':_0x47f307['tableName'],'relatedPageCount':_0xb906cb};}
1
+ const a61_0x12eefb=a61_0x2b42;(function(_0x3c2603,_0x4f20cd){const _0x4fa5f8=a61_0x2b42,_0x1fedb9=_0x3c2603();while(!![]){try{const _0x556c60=parseInt(_0x4fa5f8(0x141))/0x1+parseInt(_0x4fa5f8(0x12d))/0x2+-parseInt(_0x4fa5f8(0x11e))/0x3+parseInt(_0x4fa5f8(0x137))/0x4+parseInt(_0x4fa5f8(0x127))/0x5*(-parseInt(_0x4fa5f8(0x12c))/0x6)+parseInt(_0x4fa5f8(0x13c))/0x7+parseInt(_0x4fa5f8(0x134))/0x8*(-parseInt(_0x4fa5f8(0x12a))/0x9);if(_0x556c60===_0x4f20cd)break;else _0x1fedb9['push'](_0x1fedb9['shift']());}catch(_0x3ae778){_0x1fedb9['push'](_0x1fedb9['shift']());}}}(a61_0x1470,0xcb827));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x12eefb(0x121),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x12eefb(0x120),'type':a61_0x12eefb(0x121),'description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':'confirm','type':a61_0x12eefb(0x131),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a61_0x12eefb(0x118),'type':a61_0x12eefb(0x121),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};function a61_0x2b42(_0x30487f,_0x3211a5){_0x30487f=_0x30487f-0x118;const _0x147059=a61_0x1470();let _0x2b423b=_0x147059[_0x30487f];return _0x2b423b;}export const datasetDelete={'service':a61_0x12eefb(0x119),'command':a61_0x12eefb(0x11d),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a61_0x12eefb(0x142),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3b57c4){const _0x1f7c5f=a61_0x12eefb,_0x5dada9=_0x3b57c4[_0x1f7c5f(0x11c)]('id'),_0x4e9062=_0x3b57c4['str']('code'),_0x5b8094=_0x3b57c4[_0x1f7c5f(0x11c)]('dbid'),_0x52107d=[_0x5dada9>0x0,Boolean(_0x4e9062),_0x5b8094>0x0]['filter'](Boolean);if(_0x52107d['length']===0x0)throw CliErrors[_0x1f7c5f(0x138)](_0x1f7c5f(0x128));if(_0x52107d[_0x1f7c5f(0x148)]>0x1)throw CliErrors[_0x1f7c5f(0x138)](_0x1f7c5f(0x139));},async 'dryRun'(_0x25e0d7){const _0x56bc62=a61_0x12eefb,_0x549d73=await resolveTargets(_0x25e0d7);return{'method':_0x56bc62(0x126),'url':_0x56bc62(0x12b),'body':{'appCode':_0x25e0d7[_0x56bc62(0x140)],'count':_0x549d73['length'],'datasets':_0x549d73},'description':_0x56bc62(0x13d)+_0x549d73[_0x56bc62(0x148)]+_0x56bc62(0x132)};},async 'execute'(_0x4dc563){const _0x4d8632=a61_0x12eefb;if(!_0x4dc563[_0x4d8632(0x130)]('confirm'))throw CliErrors[_0x4d8632(0x138)](_0x4d8632(0x133),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x5f1d0d=await resolveTargets(_0x4dc563),_0x1d4237=[],_0xcf5a61=[];for(const _0x33b7e of _0x5f1d0d){try{await deleteDataset(_0x4dc563['appCode'],_0x33b7e['id']),_0x1d4237[_0x4d8632(0x13a)](_0x33b7e);}catch(_0x5f457a){_0xcf5a61['push']({..._0x33b7e,'error':_0x5f457a instanceof Error?_0x5f457a[_0x4d8632(0x123)]:String(_0x5f457a)});}}if(_0xcf5a61[_0x4d8632(0x148)]>0x0)return{'ok':![],'data':{'requested':_0x5f1d0d[_0x4d8632(0x148)],'deletedCount':_0x1d4237[_0x4d8632(0x148)],'failedCount':_0xcf5a61[_0x4d8632(0x148)],'deleted':_0x1d4237,'failed':_0xcf5a61},'message':_0x4d8632(0x11a)+_0x1d4237['length']+'/'+_0x5f1d0d[_0x4d8632(0x148)]+_0x4d8632(0x11f)+_0xcf5a61[_0x4d8632(0x148)]+'\x20failed'};return{'ok':!![],'data':{'requested':_0x5f1d0d[_0x4d8632(0x148)],'deletedCount':_0x1d4237['length'],'deleted':_0x1d4237},'message':'Deleted\x20'+_0x1d4237[_0x4d8632(0x148)]+_0x4d8632(0x13b)};}};async function resolveTargets(_0xb0507b){const _0x23d755=a61_0x12eefb,_0x749daf=_0xb0507b[_0x23d755(0x11c)]('id'),_0x25f725=_0xb0507b[_0x23d755(0x136)](_0x23d755(0x144)),_0x13760d=_0xb0507b['num']('dbid');let _0x513900;_0x25f725?(_0x513900=await listDatasets(_0xb0507b[_0x23d755(0x140)],{'code':_0x25f725}),_0x513900=_0x513900['filter'](_0xe5423a=>_0xe5423a[_0x23d755(0x144)]===_0x25f725)):(_0x513900=await listDatasets(_0xb0507b[_0x23d755(0x140)]),_0x749daf>0x0&&(_0x513900=_0x513900[_0x23d755(0x129)](_0x5abc6e=>_0x5abc6e['id']===_0x749daf)),_0x13760d>0x0&&(_0x513900=_0x513900[_0x23d755(0x129)](_0x228288=>_0x228288[_0x23d755(0x149)]?.[_0x23d755(0x122)]===_0x13760d)));const _0x134900=[];for(const _0x36392e of _0x513900){const _0x386a4b=await getDatasetDetail(_0x36392e['code']),_0x1a4e6c=Array['isArray'](_0x386a4b[_0x23d755(0x145)])?_0x386a4b[_0x23d755(0x145)]['filter'](_0x2c47a6=>_0x2c47a6!=null&&typeof _0x2c47a6===_0x23d755(0x13e)&&_0x2c47a6[_0x23d755(0x11b)]!==!![]):[];_0x134900[_0x23d755(0x13a)](normalizeTarget(_0x36392e,_0x1a4e6c[_0x23d755(0x148)]));}if(_0x134900[_0x23d755(0x148)]===0x0){const _0x94a4a3=_0x25f725||(_0x749daf>0x0?_0x23d755(0x13f)+_0x749daf:_0x23d755(0x124)+_0x13760d);throw CliErrors[_0x23d755(0x138)](_0x23d755(0x12e)+_0x94a4a3+'.');}const _0x378e0b=_0xb0507b['num']('expected-count');if(_0x378e0b>0x0&&_0x134900['length']!==_0x378e0b)throw CliErrors[_0x23d755(0x138)]('Matched\x20'+_0x134900[_0x23d755(0x148)]+_0x23d755(0x125)+_0x378e0b+'.');return _0x134900;}function normalizeTarget(_0x4b0e98,_0x776d93){const _0x35fbab=a61_0x12eefb,_0x26699b=_0x4b0e98['dbtableConfig']??{};return{'id':_0x4b0e98['id'],'code':_0x4b0e98[_0x35fbab(0x144)],'name':_0x4b0e98[_0x35fbab(0x135)],'description':_0x4b0e98[_0x35fbab(0x12f)],'source':_0x4b0e98[_0x35fbab(0x147)],'dbId':_0x26699b[_0x35fbab(0x122)],'dbName':_0x26699b[_0x35fbab(0x143)],'tableName':_0x26699b[_0x35fbab(0x146)],'relatedPageCount':_0x776d93};}function a61_0x1470(){const _0x3f8015=['40nVqdeg','name','str','4283252yQUOdA','validation','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','push','\x20dataset(s)','11495708jztujj','Would\x20delete\x20','object','id=','appCode','538276cxySQM','high-risk-write','dbName','code','relatedPageInfoList','tableName','source','length','dbtableConfig','expected-count','dataset','Deleted\x20','deleted','num','delete','4517208NBURfz','\x20dataset(s);\x20','dbid','number','dbId','message','dbid=','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','POST','10WPImkj','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','filter','2685087DkLHyu','/smartapi/dataset/delete-dataset','85686YpLcUf','1216510bAchGb','No\x20undeleted\x20dataset\x20found\x20for\x20','description','bool','boolean','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','--confirm\x20is\x20required\x20to\x20delete\x20datasets.'];a61_0x1470=function(){return _0x3f8015;};return a61_0x1470();}
@@ -1 +1 @@
1
- const a63_0x1973d1=a63_0x1045;function a63_0x1045(_0x17eb3d,_0x8852d9){_0x17eb3d=_0x17eb3d-0x15c;const _0x10ee1f=a63_0x10ee();let _0x1045b2=_0x10ee1f[_0x17eb3d];return _0x1045b2;}(function(_0x246a6d,_0x5987b0){const _0x3acc77=a63_0x1045,_0xf1bb2f=_0x246a6d();while(!![]){try{const _0x413801=parseInt(_0x3acc77(0x1a2))/0x1+-parseInt(_0x3acc77(0x192))/0x2*(parseInt(_0x3acc77(0x164))/0x3)+parseInt(_0x3acc77(0x1a9))/0x4+parseInt(_0x3acc77(0x194))/0x5*(parseInt(_0x3acc77(0x1a0))/0x6)+-parseInt(_0x3acc77(0x19e))/0x7+parseInt(_0x3acc77(0x174))/0x8*(-parseInt(_0x3acc77(0x1a7))/0x9)+parseInt(_0x3acc77(0x161))/0xa;if(_0x413801===_0x5987b0)break;else _0xf1bb2f['push'](_0xf1bb2f['shift']());}catch(_0x18c7d4){_0xf1bb2f['push'](_0xf1bb2f['shift']());}}}(a63_0x10ee,0x67b08));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x5c72ff){const _0x56bc8c=a63_0x1045;if(_0x5c72ff[_0x56bc8c(0x191)])return null;const _0x26fc6d=Boolean(_0x5c72ff[_0x56bc8c(0x170)]!==undefined||_0x5c72ff[_0x56bc8c(0x186)]!==undefined);let _0x30c69f={};if(!_0x26fc6d&&typeof _0x5c72ff[_0x56bc8c(0x17a)]===_0x56bc8c(0x175))try{_0x30c69f=JSON[_0x56bc8c(0x1a8)](_0x5c72ff[_0x56bc8c(0x17a)]);}catch{}const _0x23b188=_0x26fc6d?_0x5c72ff[_0x56bc8c(0x173)]:_0x5c72ff['code'],_0x2a1969=_0x26fc6d?_0x5c72ff['displayName']:_0x5c72ff[_0x56bc8c(0x173)],_0x399a49=_0x26fc6d?_0x5c72ff[_0x56bc8c(0x186)]:_0x5c72ff[_0x56bc8c(0x188)]||_0x5c72ff[_0x56bc8c(0x15c)],_0x3f7c9a=_0x26fc6d?_0x5c72ff['pkField']===!![]:_0x30c69f[_0x56bc8c(0x16a)]===!![],_0x31bde2=_0x26fc6d?_0x5c72ff[_0x56bc8c(0x169)]===!![]:_0x30c69f['required']===!![],_0x52ea33=_0x26fc6d?_0x5c72ff[_0x56bc8c(0x19a)]??null:_0x30c69f[_0x56bc8c(0x19a)]??null,_0x39f7fe={'name':_0x23b188,'displayName':_0x2a1969||_0x23b188,'type':_0x399a49,'dbType':_0x5c72ff[_0x56bc8c(0x1a6)],'pk':_0x3f7c9a,'required':_0x31bde2,'deprecated':_0x5c72ff[_0x56bc8c(0x187)]===!![],'description':_0x5c72ff[_0x56bc8c(0x17c)]||undefined};return Array[_0x56bc8c(0x189)](_0x52ea33)&&_0x52ea33['length']>0x0&&(_0x39f7fe[_0x56bc8c(0x19a)]=_0x52ea33),_0x39f7fe;}function parseJsonMaybe(_0x563d10){const _0x135f37=a63_0x1045;if(typeof _0x563d10!=='string')return _0x563d10;try{return JSON[_0x135f37(0x1a8)](_0x563d10);}catch{return _0x563d10;}}function normalizeOperationEntry(_0x4e55bc,_0x506dd5){const _0xea633f=a63_0x1045;if(!_0x506dd5||typeof _0x506dd5!==_0xea633f(0x19f))return null;if(!_0x506dd5[_0xea633f(0x184)]||!_0x506dd5[_0xea633f(0x177)])return null;const _0x409eaa={'name':_0x4e55bc,'method':_0x506dd5['method'],'path':_0x506dd5[_0xea633f(0x177)]};if(_0x506dd5[_0xea633f(0x17b)])_0x409eaa[_0xea633f(0x17b)]=_0x506dd5[_0xea633f(0x17b)];if(_0x506dd5[_0xea633f(0x180)]!=null){const _0x3b91db=parseJsonMaybe(_0x506dd5['requestBody']);_0x409eaa['requestBody']=_0x3b91db;}if(_0x506dd5['responseBody']!=null){const _0x5d61aa=parseJsonMaybe(_0x506dd5[_0xea633f(0x18b)]);_0x409eaa[_0xea633f(0x18b)]=_0x5d61aa;}if(_0x506dd5['beforeScriptId']!=null)_0x409eaa[_0xea633f(0x19b)]=_0x506dd5[_0xea633f(0x19b)];if(_0x506dd5[_0xea633f(0x193)]!=null)_0x409eaa[_0xea633f(0x193)]=_0x506dd5[_0xea633f(0x193)];if(Array[_0xea633f(0x189)](_0x506dd5[_0xea633f(0x185)]))_0x409eaa[_0xea633f(0x185)]=_0x506dd5['requestFields'];if(Array[_0xea633f(0x189)](_0x506dd5[_0xea633f(0x196)]))_0x409eaa['responseFields']=_0x506dd5[_0xea633f(0x196)];return _0x409eaa;}function a63_0x10ee(){const _0x2ec601=['759225zYSMXj','datasetKey','relations','validateRules','dbType','1225422hdeZLd','parse','1534752FMqFyH','main_sub','dataType','properties','fromField','columnCodeListWithDeleted','trim','2268780uLdGuS','code','allFields','148647xEEkpO','split','modifierNameField','filter','indexes','required','pkField','toDatasetCode','dblinkInfoDTO','dbtableConfig','tableName','creatorNameField','displayName','logicField','sourceType','name','32euGAaM','string','toField','path','read','formatRules','extend','host','description','doVersion','source','operations','requestBody','dbName','labelField','toTableName','method','requestFields','doType','deprecated','type','isArray','tableComment','responseBody','length','fields','creatorIdField','updateTimeField','relatedPageInfoList','deleted','2NuwIUb','afterScriptId','5kGVEdp','detail','responseFields','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','bizRelationType','map','options','beforeScriptId','str','dbId','3965696TkfTFT','object','1293780iSepSo','relationId'];a63_0x10ee=function(){return _0x2ec601;};return a63_0x10ee();}function summarizeDbtable(_0x48df19){const _0x21c9f8=a63_0x1045,_0x24ce99={},_0x2c5d39=[_0x21c9f8(0x19d),'dbName',_0x21c9f8(0x16e),_0x21c9f8(0x1a3),_0x21c9f8(0x16a),'allFields',_0x21c9f8(0x171),'createTimeField',_0x21c9f8(0x18f),_0x21c9f8(0x18e),_0x21c9f8(0x16f),'modifierIdField',_0x21c9f8(0x166),_0x21c9f8(0x182),_0x21c9f8(0x16c)];for(const _0xa5081b of _0x2c5d39){if(_0x48df19[_0xa5081b]!==undefined)_0x24ce99[_0xa5081b]=_0x48df19[_0xa5081b];}return typeof _0x24ce99['allFields']==='string'&&_0x24ce99[_0x21c9f8(0x163)][_0x21c9f8(0x18c)]>0x0&&(_0x24ce99['allFieldNames']=_0x24ce99[_0x21c9f8(0x163)][_0x21c9f8(0x165)](',')[_0x21c9f8(0x199)](_0x2a1a33=>_0x2a1a33[_0x21c9f8(0x160)]())['filter'](Boolean)),_0x24ce99;}function normalizeRelatedPages(_0x33ab6f){const _0x54bb89=a63_0x1045;if(!Array[_0x54bb89(0x189)](_0x33ab6f))return[];return _0x33ab6f[_0x54bb89(0x167)](_0x502911=>_0x502911&&typeof _0x502911==='object')[_0x54bb89(0x199)](_0x3542b4=>({'id':_0x3542b4['id'],'type':_0x3542b4[_0x54bb89(0x188)],'code':_0x3542b4['code'],'title':_0x3542b4['title'],'deleted':_0x3542b4[_0x54bb89(0x191)]===!![]}));}export const datasetDetail={'service':'dataset','command':a63_0x1973d1(0x195),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a63_0x1973d1(0x178),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a63_0x1973d1(0x197)}],async 'execute'(_0x30f22c){const _0x3aabb0=a63_0x1973d1,_0x27585d=await getDatasetDetail(_0x30f22c[_0x3aabb0(0x19c)](_0x3aabb0(0x162))),_0x36a792=Array['isArray'](_0x27585d[_0x3aabb0(0x18d)])?_0x27585d[_0x3aabb0(0x18d)]:Array[_0x3aabb0(0x189)](_0x27585d[_0x3aabb0(0x15d)])?_0x27585d[_0x3aabb0(0x15d)]:[],_0xd6688d=_0x36a792[_0x3aabb0(0x199)](_0x46a7f8=>normalizeField(_0x46a7f8))[_0x3aabb0(0x167)](_0x4271b4=>_0x4271b4!==null),_0x4dd783=_0x27585d[_0x3aabb0(0x17f)]??{},_0x42811a=[];for(const [_0x431589,_0x461566]of Object['entries'](_0x4dd783)){const _0x16052d=normalizeOperationEntry(_0x431589,_0x461566);if(_0x16052d)_0x42811a['push'](_0x16052d);}const _0x37e0a5=_0x27585d[_0x3aabb0(0x16d)]??{},_0x20fdb1=_0x27585d['dataset']??{},_0x8ca88a=_0x37e0a5['dbId']!=null?{'id':_0x37e0a5[_0x3aabb0(0x19d)],'name':_0x37e0a5[_0x3aabb0(0x181)]??null}:undefined;let _0x538193;return typeof _0x27585d['extend']==='string'&&(_0x538193=parseJsonMaybe(_0x27585d[_0x3aabb0(0x17a)])),{'ok':!![],'data':{'id':_0x27585d['modelId']??_0x27585d['id'],'name':_0x27585d[_0x3aabb0(0x173)],'code':_0x27585d['modelCode']||_0x27585d[_0x3aabb0(0x162)],'doVersion':_0x27585d[_0x3aabb0(0x17d)],'description':_0x27585d[_0x3aabb0(0x17c)]||_0x20fdb1[_0x3aabb0(0x18a)]||undefined,'source':_0x27585d[_0x3aabb0(0x17e)]||_0x20fdb1[_0x3aabb0(0x172)],'table':_0x37e0a5[_0x3aabb0(0x16e)]||_0x20fdb1[_0x3aabb0(0x16e)],'datasetKey':_0x37e0a5[_0x3aabb0(0x1a3)],'pk':_0x37e0a5['pkField'],'db':_0x8ca88a,'dbtable':summarizeDbtable(_0x37e0a5),'fields':_0xd6688d,'operations':_0x42811a,'indexes':Array[_0x3aabb0(0x189)](_0x20fdb1[_0x3aabb0(0x168)])?_0x20fdb1['indexes']:[],'relations':Array[_0x3aabb0(0x189)](_0x27585d[_0x3aabb0(0x1a4)])?_0x27585d['relations'][_0x3aabb0(0x199)](_0x37d3ec=>({..._0x37d3ec[_0x3aabb0(0x1a1)]!=null?{'relationId':_0x37d3ec[_0x3aabb0(0x1a1)]}:{},'fromDataset':_0x27585d[_0x3aabb0(0x173)],'fromCode':_0x27585d['modelCode']||_0x27585d[_0x3aabb0(0x162)],'fromTable':_0x37e0a5['tableName']||_0x20fdb1['tableName'],'fromField':_0x37d3ec[_0x3aabb0(0x15e)],'toDataset':_0x37d3ec['toDatasetName'],'toCode':_0x37d3ec[_0x3aabb0(0x16b)],'toTable':_0x37d3ec[_0x3aabb0(0x183)],'toField':_0x37d3ec[_0x3aabb0(0x176)],'labelField':_0x37d3ec['toFieldLabel']||undefined,'cardinality':_0x37d3ec['cardinality']||undefined,'bizRelationType':_0x37d3ec[_0x3aabb0(0x198)]===_0x3aabb0(0x1aa)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x27585d[_0x3aabb0(0x190)]),...Array[_0x3aabb0(0x189)](_0x27585d[_0x3aabb0(0x15f)])?{'columnCodeListWithDeleted':_0x27585d[_0x3aabb0(0x15f)]}:{},'formatRules':Array['isArray'](_0x27585d[_0x3aabb0(0x179)])?_0x27585d['formatRules']:[],'validateRules':Array[_0x3aabb0(0x189)](_0x27585d[_0x3aabb0(0x1a5)])?_0x27585d[_0x3aabb0(0x1a5)]:[],..._0x538193!==undefined?{'extend':_0x538193}:{},'stats':{'fieldCount':_0xd6688d['length'],'operationCount':_0x42811a[_0x3aabb0(0x18c)]}}};}};
1
+ function a62_0x2a22(){const _0x2f5d7a=['sourceType','creatorIdField','bizRelationType','responseFields','indexes','modelCode','fields','properties','deleted','dbType','beforeScriptId','code','5059bwQysa','options','requestBody','15486yccOZG','alias','12QLmTjG','deprecated','type','method','allFieldNames','toField','str','title','createTimeField','map','trim','dataType','cardinality','read','formatRules','string','pkField','host','datasetKey','source','isArray','relationId','validateRules','length','name','fromField','3910KWYANM','4836937limBVI','afterScriptId','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','columnCodeListWithDeleted','extend','responseBody','path','allFields','toTableName','split','modelId','3463408WelNfQ','updateTimeField','52CVKmhX','167470qqYazy','toDatasetName','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','relations','31554qEqyKb','doType','operations','tableName','dbId','requestFields','toDatasetCode','4228098wPhvCL','doVersion','logicField','dbtableConfig','dataset','object','parse','filter','displayName','main_sub','required'];a62_0x2a22=function(){return _0x2f5d7a;};return a62_0x2a22();}const a62_0x28f7a5=a62_0x1507;function a62_0x1507(_0x1f3e1e,_0x946f24){_0x1f3e1e=_0x1f3e1e-0xd0;const _0x2a2230=a62_0x2a22();let _0x1507fe=_0x2a2230[_0x1f3e1e];return _0x1507fe;}(function(_0x5b012f,_0x197fb4){const _0x592bd4=a62_0x1507,_0x2b3540=_0x5b012f();while(!![]){try{const _0x520b99=parseInt(_0x592bd4(0xed))/0x1*(-parseInt(_0x592bd4(0x11a))/0x2)+-parseInt(_0x592bd4(0xf0))/0x3+parseInt(_0x592bd4(0xf2))/0x4*(parseInt(_0x592bd4(0x11b))/0x5)+parseInt(_0x592bd4(0xd6))/0x6+parseInt(_0x592bd4(0x10d))/0x7+parseInt(_0x592bd4(0x118))/0x8+parseInt(_0x592bd4(0x11f))/0x9*(-parseInt(_0x592bd4(0x10c))/0xa);if(_0x520b99===_0x197fb4)break;else _0x2b3540['push'](_0x2b3540['shift']());}catch(_0x4a4b82){_0x2b3540['push'](_0x2b3540['shift']());}}}(a62_0x2a22,0x66ea4));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x5f5039){const _0x280e06=a62_0x1507;if(_0x5f5039[_0x280e06(0xe9)])return null;const _0xeebe73=Boolean(_0x5f5039[_0x280e06(0xde)]!==undefined||_0x5f5039[_0x280e06(0xd0)]!==undefined);let _0x4dcc5b={};if(!_0xeebe73&&typeof _0x5f5039['extend']==='string')try{_0x4dcc5b=JSON['parse'](_0x5f5039[_0x280e06(0x111)]);}catch{}const _0x5df59f=_0xeebe73?_0x5f5039[_0x280e06(0x10a)]:_0x5f5039[_0x280e06(0xec)],_0x4a1bbd=_0xeebe73?_0x5f5039[_0x280e06(0xde)]:_0x5f5039[_0x280e06(0x10a)],_0x3ca5b1=_0xeebe73?_0x5f5039['doType']:_0x5f5039[_0x280e06(0xf4)]||_0x5f5039[_0x280e06(0xfd)],_0x146de7=_0xeebe73?_0x5f5039[_0x280e06(0x102)]===!![]:_0x4dcc5b[_0x280e06(0x102)]===!![],_0x195153=_0xeebe73?_0x5f5039[_0x280e06(0xe0)]===!![]:_0x4dcc5b[_0x280e06(0xe0)]===!![],_0x4b6e24=_0xeebe73?_0x5f5039[_0x280e06(0xee)]??null:_0x4dcc5b[_0x280e06(0xee)]??null,_0x4e37dc={'name':_0x5df59f,'displayName':_0x4a1bbd||_0x5df59f,'type':_0x3ca5b1,'dbType':_0x5f5039[_0x280e06(0xea)],'pk':_0x146de7,'required':_0x195153,'deprecated':_0x5f5039[_0x280e06(0xf3)]===!![],'description':_0x5f5039['description']||undefined};return Array[_0x280e06(0x106)](_0x4b6e24)&&_0x4b6e24[_0x280e06(0x109)]>0x0&&(_0x4e37dc[_0x280e06(0xee)]=_0x4b6e24),_0x4e37dc;}function parseJsonMaybe(_0x5e3282){const _0x57b434=a62_0x1507;if(typeof _0x5e3282!==_0x57b434(0x101))return _0x5e3282;try{return JSON[_0x57b434(0xdc)](_0x5e3282);}catch{return _0x5e3282;}}function normalizeOperationEntry(_0xcf5de2,_0x362089){const _0x45584e=a62_0x1507;if(!_0x362089||typeof _0x362089!==_0x45584e(0xdb))return null;if(!_0x362089[_0x45584e(0xf5)]||!_0x362089[_0x45584e(0x113)])return null;const _0x34172e={'name':_0xcf5de2,'method':_0x362089[_0x45584e(0xf5)],'path':_0x362089[_0x45584e(0x113)]};if(_0x362089['host'])_0x34172e['host']=_0x362089[_0x45584e(0x103)];if(_0x362089[_0x45584e(0xef)]!=null){const _0x484202=parseJsonMaybe(_0x362089[_0x45584e(0xef)]);_0x34172e[_0x45584e(0xef)]=_0x484202;}if(_0x362089[_0x45584e(0x112)]!=null){const _0x2c0b95=parseJsonMaybe(_0x362089[_0x45584e(0x112)]);_0x34172e['responseBody']=_0x2c0b95;}if(_0x362089[_0x45584e(0xeb)]!=null)_0x34172e[_0x45584e(0xeb)]=_0x362089[_0x45584e(0xeb)];if(_0x362089['afterScriptId']!=null)_0x34172e['afterScriptId']=_0x362089[_0x45584e(0x10e)];if(Array[_0x45584e(0x106)](_0x362089[_0x45584e(0xd4)]))_0x34172e[_0x45584e(0xd4)]=_0x362089[_0x45584e(0xd4)];if(Array[_0x45584e(0x106)](_0x362089[_0x45584e(0xe4)]))_0x34172e[_0x45584e(0xe4)]=_0x362089[_0x45584e(0xe4)];return _0x34172e;}function summarizeDbtable(_0x24eb49){const _0xe2b46c=a62_0x1507,_0x2e8e23={},_0x4d55d9=[_0xe2b46c(0xd3),'dbName',_0xe2b46c(0xd2),_0xe2b46c(0x104),_0xe2b46c(0x102),'allFields',_0xe2b46c(0xd8),_0xe2b46c(0xfa),_0xe2b46c(0x119),_0xe2b46c(0xe2),'creatorNameField','modifierIdField','modifierNameField','labelField','dblinkInfoDTO'];for(const _0x32e13a of _0x4d55d9){if(_0x24eb49[_0x32e13a]!==undefined)_0x2e8e23[_0x32e13a]=_0x24eb49[_0x32e13a];}return typeof _0x2e8e23['allFields']===_0xe2b46c(0x101)&&_0x2e8e23[_0xe2b46c(0x114)][_0xe2b46c(0x109)]>0x0&&(_0x2e8e23[_0xe2b46c(0xf6)]=_0x2e8e23[_0xe2b46c(0x114)][_0xe2b46c(0x116)](',')[_0xe2b46c(0xfb)](_0xfd76b9=>_0xfd76b9[_0xe2b46c(0xfc)]())['filter'](Boolean)),_0x2e8e23;}function normalizeRelatedPages(_0x4e1fbb){const _0x2ed27b=a62_0x1507;if(!Array['isArray'](_0x4e1fbb))return[];return _0x4e1fbb[_0x2ed27b(0xdd)](_0x3e29bf=>_0x3e29bf&&typeof _0x3e29bf===_0x2ed27b(0xdb))[_0x2ed27b(0xfb)](_0x43cf82=>({'id':_0x43cf82['id'],'type':_0x43cf82['type'],'code':_0x43cf82['code'],'title':_0x43cf82[_0x2ed27b(0xf9)],'deleted':_0x43cf82[_0x2ed27b(0xe9)]===!![]}));}export const datasetDetail={'service':a62_0x28f7a5(0xda),'command':'detail','description':a62_0x28f7a5(0x11d),'risk':a62_0x28f7a5(0xff),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x28f7a5(0xf1),'type':a62_0x28f7a5(0x101),'description':a62_0x28f7a5(0x10f)}],async 'execute'(_0x4f63f2){const _0x3e8379=a62_0x28f7a5,_0x35eb64=await getDatasetDetail(_0x4f63f2[_0x3e8379(0xf8)](_0x3e8379(0xec))),_0x47d5aa=Array['isArray'](_0x35eb64[_0x3e8379(0xe7)])?_0x35eb64[_0x3e8379(0xe7)]:Array['isArray'](_0x35eb64['properties'])?_0x35eb64[_0x3e8379(0xe8)]:[],_0x187099=_0x47d5aa['map'](_0x3ea290=>normalizeField(_0x3ea290))[_0x3e8379(0xdd)](_0x44bec7=>_0x44bec7!==null),_0x40f2f8=_0x35eb64[_0x3e8379(0xd1)]??{},_0x4fff35=[];for(const [_0x553c4b,_0x4697f3]of Object['entries'](_0x40f2f8)){const _0x98442f=normalizeOperationEntry(_0x553c4b,_0x4697f3);if(_0x98442f)_0x4fff35['push'](_0x98442f);}const _0x455bca=_0x35eb64[_0x3e8379(0xd9)]??{},_0x362a3c=_0x35eb64[_0x3e8379(0xda)]??{},_0x1dc7cb=_0x455bca['dbId']!=null?{'id':_0x455bca['dbId'],'name':_0x455bca['dbName']??null}:undefined;let _0x43b80d;return typeof _0x35eb64[_0x3e8379(0x111)]===_0x3e8379(0x101)&&(_0x43b80d=parseJsonMaybe(_0x35eb64['extend'])),{'ok':!![],'data':{'id':_0x35eb64[_0x3e8379(0x117)]??_0x35eb64['id'],'name':_0x35eb64[_0x3e8379(0x10a)],'code':_0x35eb64[_0x3e8379(0xe6)]||_0x35eb64[_0x3e8379(0xec)],'doVersion':_0x35eb64[_0x3e8379(0xd7)],'description':_0x35eb64['description']||_0x362a3c['tableComment']||undefined,'source':_0x35eb64[_0x3e8379(0x105)]||_0x362a3c[_0x3e8379(0xe1)],'table':_0x455bca[_0x3e8379(0xd2)]||_0x362a3c['tableName'],'datasetKey':_0x455bca[_0x3e8379(0x104)],'pk':_0x455bca[_0x3e8379(0x102)],'db':_0x1dc7cb,'dbtable':summarizeDbtable(_0x455bca),'fields':_0x187099,'operations':_0x4fff35,'indexes':Array[_0x3e8379(0x106)](_0x362a3c[_0x3e8379(0xe5)])?_0x362a3c[_0x3e8379(0xe5)]:[],'relations':Array[_0x3e8379(0x106)](_0x35eb64[_0x3e8379(0x11e)])?_0x35eb64[_0x3e8379(0x11e)]['map'](_0x501254=>({..._0x501254[_0x3e8379(0x107)]!=null?{'relationId':_0x501254['relationId']}:{},'fromDataset':_0x35eb64[_0x3e8379(0x10a)],'fromCode':_0x35eb64[_0x3e8379(0xe6)]||_0x35eb64[_0x3e8379(0xec)],'fromTable':_0x455bca[_0x3e8379(0xd2)]||_0x362a3c[_0x3e8379(0xd2)],'fromField':_0x501254[_0x3e8379(0x10b)],'toDataset':_0x501254[_0x3e8379(0x11c)],'toCode':_0x501254[_0x3e8379(0xd5)],'toTable':_0x501254[_0x3e8379(0x115)],'toField':_0x501254[_0x3e8379(0xf7)],'labelField':_0x501254['toFieldLabel']||undefined,'cardinality':_0x501254[_0x3e8379(0xfe)]||undefined,'bizRelationType':_0x501254[_0x3e8379(0xe3)]===_0x3e8379(0xdf)?_0x3e8379(0xdf):null})):[],'relatedPages':normalizeRelatedPages(_0x35eb64['relatedPageInfoList']),...Array[_0x3e8379(0x106)](_0x35eb64[_0x3e8379(0x110)])?{'columnCodeListWithDeleted':_0x35eb64['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x3e8379(0x106)](_0x35eb64[_0x3e8379(0x100)])?_0x35eb64['formatRules']:[],'validateRules':Array['isArray'](_0x35eb64[_0x3e8379(0x108)])?_0x35eb64[_0x3e8379(0x108)]:[],..._0x43b80d!==undefined?{'extend':_0x43b80d}:{},'stats':{'fieldCount':_0x187099['length'],'operationCount':_0x4fff35[_0x3e8379(0x109)]}}};}};
@@ -1 +1 @@
1
- const a64_0x3410f9=a64_0x4224;(function(_0x3c9240,_0x57acc4){const _0x3da0db=a64_0x4224,_0x1cbb30=_0x3c9240();while(!![]){try{const _0x3c083f=-parseInt(_0x3da0db(0x133))/0x1+-parseInt(_0x3da0db(0x12b))/0x2*(-parseInt(_0x3da0db(0x11d))/0x3)+-parseInt(_0x3da0db(0x136))/0x4*(parseInt(_0x3da0db(0x109))/0x5)+parseInt(_0x3da0db(0xfe))/0x6+parseInt(_0x3da0db(0xfb))/0x7+parseInt(_0x3da0db(0x131))/0x8*(parseInt(_0x3da0db(0x11f))/0x9)+-parseInt(_0x3da0db(0x115))/0xa*(-parseInt(_0x3da0db(0xf3))/0xb);if(_0x3c083f===_0x57acc4)break;else _0x1cbb30['push'](_0x1cbb30['shift']());}catch(_0x4f0326){_0x1cbb30['push'](_0x1cbb30['shift']());}}}(a64_0x22b1,0x38faa));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a64_0x22b1(){const _0x2df995=['87439VSZRUV','expect-json','extend.','code','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','Allowed\x20keys:\x20','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','Expectation\x20mismatch\x20at\x20extend.','338254FoWSbC','object','dataset','982326Dydhov','datasetName','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','str','data','dbName','--patch-json','push','entries','businessGroup','355zRDrfX','write','trim','patch','parse','\x20must\x20be\x20valid\x20JSON\x20object:\x20','length','string','Updated\x20dataset\x20extend\x20(','patch-json','validation','datasetId','10mAjGxR','--expect-json','dbId','sort','Patch\x20dataset\x20top-level\x20extend\x20safely','value','--code\x20is\x20required','name','6ewlQCM','/smartapi/dataset/update-driven-data','1224XSaHxG',',\x20actual\x20','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','join','tableName','has','modelId','keys','shape','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','isArray','stringify','347216mObzHN','\x20must\x20be\x20a\x20JSON\x20object','from','appCode','Expected\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','10424YdzSjw','message','125997LRWsNf','extend','Unsupported\x20patch\x20key:\x20','21692bQQWRj','No\x20changes\x20for\x20dataset\x20extend','datasetCode'];a64_0x22b1=function(){return _0x2df995;};return a64_0x22b1();}import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0x3410f9(0x108),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a64_0x3410f9(0x100)}]]);export function parseJsonObjectFlag(_0x295a6c,_0x3509f4){const _0x4a3f83=a64_0x3410f9;if(!_0x295a6c)return undefined;let _0x3ee051;try{_0x3ee051=JSON[_0x4a3f83(0x10d)](_0x295a6c);}catch(_0x3bcb53){const _0x1dcb15=_0x3bcb53 instanceof Error?_0x3bcb53['message']:String(_0x3bcb53);throw CliErrors[_0x4a3f83(0x113)](_0x3509f4+_0x4a3f83(0x10e)+_0x1dcb15);}if(!isPlainObject(_0x3ee051)||Array[_0x4a3f83(0x129)](_0x3ee051))throw CliErrors['validation'](_0x3509f4+_0x4a3f83(0x12c));return _0x3ee051;}export function validateExtendPatchKeys(_0x4c941a){const _0x13bb45=a64_0x3410f9,_0x5c770b=Object[_0x13bb45(0x126)](_0x4c941a);if(_0x5c770b[_0x13bb45(0x10f)]===0x0)throw CliErrors['validation'](_0x13bb45(0x130));for(const _0x1c7685 of _0x5c770b){const _0x5ebf1a=EXTEND_PATCH_REDIRECTS['get'](_0x1c7685);if(_0x5ebf1a)throw CliErrors[_0x13bb45(0x113)](_0x5ebf1a[_0x13bb45(0x132)],_0x5ebf1a['hint']);if(!MUTABLE_EXTEND_KEYS[_0x13bb45(0x124)](_0x1c7685))throw CliErrors[_0x13bb45(0x113)](_0x13bb45(0x135)+_0x1c7685,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x3ea827=a64_0x3410f9,_0x9dac32=Array[_0x3ea827(0x12d)](MUTABLE_EXTEND_KEYS)[_0x3ea827(0x118)]();return _0x9dac32[_0x3ea827(0x10f)]>0x0?_0x3ea827(0xf8)+_0x9dac32['join'](',\x20'):_0x3ea827(0xf9);}export function applyExtendPatch(_0x4e3588,_0x306055){const _0x35196a=a64_0x3410f9;validateExtendPatchKeys(_0x306055);const _0x3d0c25=deepClone(_0x4e3588),_0x32f0ad=[];for(const [_0x55ba94,_0x4fabce]of Object[_0x35196a(0x107)](_0x306055)){const _0x4c7e58=_0x3d0c25[_0x55ba94],_0x18b1e2=deepClone(_0x4fabce);!deepEqual(_0x4c7e58,_0x18b1e2)&&(_0x3d0c25[_0x55ba94]=_0x18b1e2,_0x32f0ad[_0x35196a(0x106)](_0x35196a(0xf5)+_0x55ba94));}return _0x32f0ad['sort'](),{'after':_0x3d0c25,'changedPaths':_0x32f0ad,'changed':_0x32f0ad['length']>0x0};}export function assertExpectation(_0x340d87,_0x26a0df){const _0x2fcbf1=a64_0x3410f9;if(!_0x26a0df)return;for(const [_0x207822,_0x50ffba]of Object['entries'](_0x26a0df)){const _0x3c2e60=_0x340d87[_0x207822];if(!deepEqual(_0x3c2e60,_0x50ffba))throw CliErrors[_0x2fcbf1(0x113)](_0x2fcbf1(0xfa)+_0x207822,_0x2fcbf1(0x12f)+JSON[_0x2fcbf1(0x12a)](_0x50ffba)+_0x2fcbf1(0x120)+JSON[_0x2fcbf1(0x12a)](_0x3c2e60));}}export async function buildDatasetExtendUpdateResult({appCode:_0x18730e,input:_0x805d79,dryRun:_0x157531}){const _0x5617b8=a64_0x3410f9;validateInput(_0x805d79);const _0xa1159a=await getDatasetDetail(_0x805d79[_0x5617b8(0xf6)]),_0x2d3ea7=parseDatasetExtend(_0xa1159a[_0x5617b8(0x134)]),_0x4c6ce9=deepClone(_0x2d3ea7[_0x5617b8(0x11a)]);assertExpectation(_0x4c6ce9,_0x805d79['expect']);const {after:_0xa95cc9,changedPaths:_0x5c8461,changed:_0x5cc30d}=applyExtendPatch(_0x4c6ce9,_0x805d79[_0x5617b8(0x10c)]),_0xd1b716=summarizeDataset(_0xa1159a,_0x805d79[_0x5617b8(0xf6)]);return _0x5cc30d&&!_0x157531&&(_0xa1159a[_0x5617b8(0x134)]=serializeDatasetExtend(_0xa95cc9,_0x2d3ea7[_0x5617b8(0x127)]),await updateDrivenData(_0xa1159a)),{'ok':!![],'data':{'appCode':_0x18730e,'selector':{'code':_0x805d79['code']},'dataset':_0xd1b716,'dryRun':_0x157531,'changed':_0x5cc30d,'changedPaths':_0x5c8461,'before':{'extend':_0x4c6ce9},'after':{'extend':_0xa95cc9},'submitted':_0x5cc30d&&!_0x157531},'message':_0x5cc30d?_0x157531?_0x5617b8(0xf7)+_0x5c8461[_0x5617b8(0x122)](',\x20')+')':_0x5617b8(0x111)+_0x5c8461[_0x5617b8(0x122)](',\x20')+')':_0x5617b8(0xf1)};}export const datasetExtendUpdate={'service':a64_0x3410f9(0xfd),'command':'extend-update','description':a64_0x3410f9(0x119),'risk':a64_0x3410f9(0x10a),'flags':[CODE_FLAG,{'name':a64_0x3410f9(0x112),'type':a64_0x3410f9(0x110),'required':!![],'description':a64_0x3410f9(0x128)},{'name':a64_0x3410f9(0xf4),'type':a64_0x3410f9(0x110),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x56ab18){validateInput(readExtendUpdateInput(_0x56ab18));},async 'dryRun'(_0x463ad6){const _0x24d1e8=a64_0x3410f9,_0x4c6d98=await buildDatasetExtendUpdateResult({'appCode':_0x463ad6[_0x24d1e8(0x12e)],'input':readExtendUpdateInput(_0x463ad6),'dryRun':!![]});return{'method':'POST','url':_0x24d1e8(0x11e),'body':_0x4c6d98[_0x24d1e8(0x103)],'description':_0x4c6d98['message']};},async 'execute'(_0x4978b1){const _0x1ad95b=a64_0x3410f9;return buildDatasetExtendUpdateResult({'appCode':_0x4978b1[_0x1ad95b(0x12e)],'input':readExtendUpdateInput(_0x4978b1),'dryRun':![]});}};function readExtendUpdateInput(_0x451232){const _0x430c4d=a64_0x3410f9,_0x28edd3=trim(_0x451232['str']('code')),_0x1c9435=parseJsonObjectFlag(_0x451232[_0x430c4d(0x102)](_0x430c4d(0x112)),_0x430c4d(0x105)),_0xe46fc1=parseJsonObjectFlag(_0x451232[_0x430c4d(0x102)](_0x430c4d(0xf4)),_0x430c4d(0x116));return{'code':_0x28edd3,'patch':_0x1c9435||{},'expect':_0xe46fc1};}function validateInput(_0xed4f6a){const _0x10eb33=a64_0x3410f9;if(!_0xed4f6a['code'])throw CliErrors['validation'](_0x10eb33(0x11b));validateExtendPatchKeys(_0xed4f6a[_0x10eb33(0x10c)]);}function parseDatasetExtend(_0x3136e7){const _0x1816f6=a64_0x3410f9;if(typeof _0x3136e7===_0x1816f6(0x110)){const _0x34950e=_0x3136e7[_0x1816f6(0x10b)]();if(!_0x34950e)return{'value':{},'shape':_0x1816f6(0x110)};let _0x3f4e92;try{_0x3f4e92=JSON[_0x1816f6(0x10d)](_0x34950e);}catch(_0x15f7ca){const _0x57eaee=_0x15f7ca instanceof Error?_0x15f7ca[_0x1816f6(0x132)]:String(_0x15f7ca);throw CliErrors[_0x1816f6(0x113)](_0x1816f6(0x101)+_0x57eaee);}if(!isPlainObject(_0x3f4e92)||Array[_0x1816f6(0x129)](_0x3f4e92))throw CliErrors[_0x1816f6(0x113)](_0x1816f6(0x121));return{'value':_0x3f4e92,'shape':_0x1816f6(0x110)};}if(_0x3136e7===undefined||_0x3136e7===null)return{'value':{},'shape':_0x1816f6(0x110)};if(!isPlainObject(_0x3136e7)||Array['isArray'](_0x3136e7))throw CliErrors[_0x1816f6(0x113)](_0x1816f6(0x121));return{'value':_0x3136e7,'shape':_0x1816f6(0xfc)};}function serializeDatasetExtend(_0x5424f8,_0x2088a8){const _0x397d6d=a64_0x3410f9;return _0x2088a8===_0x397d6d(0x110)?JSON['stringify'](_0x5424f8):_0x5424f8;}function summarizeDataset(_0x4dbd53,_0x4c007b){const _0x292e7f=a64_0x3410f9,_0x30e0ed=isPlainObject(_0x4dbd53[_0x292e7f(0xfd)])?_0x4dbd53['dataset']:{},_0x145e62=isPlainObject(_0x4dbd53['dbtableConfig'])?_0x4dbd53['dbtableConfig']:{};return{'id':_0x4dbd53[_0x292e7f(0x125)]??_0x4dbd53['id']??_0x30e0ed[_0x292e7f(0x114)]??null,'code':_0x4dbd53['modelCode']??_0x4dbd53['code']??_0x30e0ed[_0x292e7f(0xf2)]??_0x4c007b,'name':_0x4dbd53[_0x292e7f(0x11c)]??_0x30e0ed[_0x292e7f(0xff)]??null,'table':_0x145e62[_0x292e7f(0x123)]??_0x30e0ed['tableName']??null,'db':_0x145e62[_0x292e7f(0x104)]??_0x145e62[_0x292e7f(0x117)]??null};}function deepClone(_0x3478e9){const _0x50f010=a64_0x3410f9;if(_0x3478e9===undefined)return _0x3478e9;return JSON[_0x50f010(0x10d)](JSON[_0x50f010(0x12a)](_0x3478e9));}function deepEqual(_0x46da79,_0x4e60cc){const _0x4125f0=a64_0x3410f9;return JSON[_0x4125f0(0x12a)](_0x46da79)===JSON[_0x4125f0(0x12a)](_0x4e60cc);}function a64_0x4224(_0x450fcd,_0x5e8ab6){_0x450fcd=_0x450fcd-0xf1;const _0x22b19d=a64_0x22b1();let _0x422479=_0x22b19d[_0x450fcd];return _0x422479;}function isPlainObject(_0xec56f8){const _0x410e30=a64_0x3410f9;return Boolean(_0xec56f8)&&typeof _0xec56f8===_0x410e30(0xfc)&&!Array[_0x410e30(0x129)](_0xec56f8);}function trim(_0x50300a){const _0x436546=a64_0x3410f9,_0x2fbe8c=String(_0x50300a||'')[_0x436546(0x10b)]();return _0x2fbe8c;}
1
+ const a63_0x59c966=a63_0x4878;(function(_0x65db43,_0x20aef0){const _0x29c818=a63_0x4878,_0x369147=_0x65db43();while(!![]){try{const _0x2f2097=-parseInt(_0x29c818(0x16c))/0x1*(-parseInt(_0x29c818(0x13d))/0x2)+parseInt(_0x29c818(0x167))/0x3+parseInt(_0x29c818(0x16e))/0x4*(-parseInt(_0x29c818(0x14f))/0x5)+-parseInt(_0x29c818(0x169))/0x6+-parseInt(_0x29c818(0x156))/0x7*(-parseInt(_0x29c818(0x142))/0x8)+parseInt(_0x29c818(0x161))/0x9*(-parseInt(_0x29c818(0x164))/0xa)+parseInt(_0x29c818(0x173))/0xb*(parseInt(_0x29c818(0x146))/0xc);if(_0x2f2097===_0x20aef0)break;else _0x369147['push'](_0x369147['shift']());}catch(_0x15dea0){_0x369147['push'](_0x369147['shift']());}}}(a63_0x42dd,0x96460));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a63_0x42dd(){const _0x155660=['trim','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','77EnlHDA','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','Expectation\x20mismatch\x20at\x20extend.','modelId','--expect-json','stringify','join','\x20must\x20be\x20a\x20JSON\x20object','extend','appCode','parse','modelCode','--patch-json','entries','Patch\x20dataset\x20top-level\x20extend\x20safely','2XIivbT','str','write','push','datasetCode','24ycxFtc','isArray','patch-json','name','1814484qCFZWw','expect','from','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','sort','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','businessGroup','data','3028070zNmPLp','patch','object','keys','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','string','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','1358889jgcSYU','value','validation','tableName','Expected\x20','datasetName','datasetId','No\x20changes\x20for\x20dataset\x20extend','shape','Updated\x20dataset\x20extend\x20(','Unsupported\x20patch\x20key:\x20','117fyPzkP','extend.','dbtableConfig','774820IOiHpf','length','code','1571397GqkjnI',',\x20actual\x20','4211448IklYTD','expect-json','dataset','765679QLGIvJ','--code\x20is\x20required','4lTXnpj','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','message'];a63_0x42dd=function(){return _0x155660;};return a63_0x42dd();}const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a63_0x59c966(0x14d),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a63_0x59c966(0x14a)}]]);export function parseJsonObjectFlag(_0x2dd088,_0x546a09){const _0xb5a983=a63_0x59c966;if(!_0x2dd088)return undefined;let _0x810dc9;try{_0x810dc9=JSON['parse'](_0x2dd088);}catch(_0x2021d1){const _0xde33b3=_0x2021d1 instanceof Error?_0x2021d1['message']:String(_0x2021d1);throw CliErrors['validation'](_0x546a09+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0xde33b3);}if(!isPlainObject(_0x810dc9)||Array['isArray'](_0x810dc9))throw CliErrors[_0xb5a983(0x158)](_0x546a09+_0xb5a983(0x17a));return _0x810dc9;}function a63_0x4878(_0x5e6737,_0x306fac){_0x5e6737=_0x5e6737-0x138;const _0x42dd49=a63_0x42dd();let _0x4878b7=_0x42dd49[_0x5e6737];return _0x4878b7;}export function validateExtendPatchKeys(_0xeb3c11){const _0x1090a3=a63_0x59c966,_0x1bf3d4=Object[_0x1090a3(0x152)](_0xeb3c11);if(_0x1bf3d4['length']===0x0)throw CliErrors[_0x1090a3(0x158)](_0x1090a3(0x14c));for(const _0x39486f of _0x1bf3d4){const _0x23db45=EXTEND_PATCH_REDIRECTS['get'](_0x39486f);if(_0x23db45)throw CliErrors['validation'](_0x23db45[_0x1090a3(0x170)],_0x23db45['hint']);if(!MUTABLE_EXTEND_KEYS['has'](_0x39486f))throw CliErrors['validation'](_0x1090a3(0x160)+_0x39486f,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x36fca9=a63_0x59c966,_0x532272=Array[_0x36fca9(0x148)](MUTABLE_EXTEND_KEYS)[_0x36fca9(0x14b)]();return _0x532272['length']>0x0?'Allowed\x20keys:\x20'+_0x532272['join'](',\x20'):_0x36fca9(0x155);}export function applyExtendPatch(_0x7b666e,_0x33783a){const _0x506265=a63_0x59c966;validateExtendPatchKeys(_0x33783a);const _0x7596cc=deepClone(_0x7b666e),_0x86da9a=[];for(const [_0x1c17aa,_0x17bd64]of Object[_0x506265(0x13b)](_0x33783a)){const _0x132561=_0x7596cc[_0x1c17aa],_0x1168e4=deepClone(_0x17bd64);!deepEqual(_0x132561,_0x1168e4)&&(_0x7596cc[_0x1c17aa]=_0x1168e4,_0x86da9a[_0x506265(0x140)](_0x506265(0x162)+_0x1c17aa));}return _0x86da9a['sort'](),{'after':_0x7596cc,'changedPaths':_0x86da9a,'changed':_0x86da9a[_0x506265(0x165)]>0x0};}export function assertExpectation(_0x38de20,_0x731710){const _0x3c25e3=a63_0x59c966;if(!_0x731710)return;for(const [_0x3b29da,_0x5d6d31]of Object[_0x3c25e3(0x13b)](_0x731710)){const _0x4051b6=_0x38de20[_0x3b29da];if(!deepEqual(_0x4051b6,_0x5d6d31))throw CliErrors[_0x3c25e3(0x158)](_0x3c25e3(0x175)+_0x3b29da,_0x3c25e3(0x15a)+JSON[_0x3c25e3(0x178)](_0x5d6d31)+_0x3c25e3(0x168)+JSON['stringify'](_0x4051b6));}}export async function buildDatasetExtendUpdateResult({appCode:_0x34cba8,input:_0x4f1c14,dryRun:_0x436dec}){const _0x20d759=a63_0x59c966;validateInput(_0x4f1c14);const _0x4c23a2=await getDatasetDetail(_0x4f1c14[_0x20d759(0x166)]),_0xf05713=parseDatasetExtend(_0x4c23a2['extend']),_0x231a7b=deepClone(_0xf05713[_0x20d759(0x157)]);assertExpectation(_0x231a7b,_0x4f1c14[_0x20d759(0x147)]);const {after:_0x56b228,changedPaths:_0x150ae0,changed:_0x3cd741}=applyExtendPatch(_0x231a7b,_0x4f1c14['patch']),_0x4d811b=summarizeDataset(_0x4c23a2,_0x4f1c14['code']);return _0x3cd741&&!_0x436dec&&(_0x4c23a2[_0x20d759(0x17b)]=serializeDatasetExtend(_0x56b228,_0xf05713[_0x20d759(0x15e)]),await updateDrivenData(_0x4c23a2)),{'ok':!![],'data':{'appCode':_0x34cba8,'selector':{'code':_0x4f1c14[_0x20d759(0x166)]},'dataset':_0x4d811b,'dryRun':_0x436dec,'changed':_0x3cd741,'changedPaths':_0x150ae0,'before':{'extend':_0x231a7b},'after':{'extend':_0x56b228},'submitted':_0x3cd741&&!_0x436dec},'message':_0x3cd741?_0x436dec?_0x20d759(0x16f)+_0x150ae0['join'](',\x20')+')':_0x20d759(0x15f)+_0x150ae0[_0x20d759(0x179)](',\x20')+')':_0x20d759(0x15d)};}export const datasetExtendUpdate={'service':'dataset','command':'extend-update','description':a63_0x59c966(0x13c),'risk':a63_0x59c966(0x13f),'flags':[CODE_FLAG,{'name':a63_0x59c966(0x144),'type':a63_0x59c966(0x154),'required':!![],'description':a63_0x59c966(0x153)},{'name':a63_0x59c966(0x16a),'type':a63_0x59c966(0x154),'required':![],'description':a63_0x59c966(0x149)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x101d43){validateInput(readExtendUpdateInput(_0x101d43));},async 'dryRun'(_0x2507a4){const _0x1d098e=a63_0x59c966,_0x258220=await buildDatasetExtendUpdateResult({'appCode':_0x2507a4['appCode'],'input':readExtendUpdateInput(_0x2507a4),'dryRun':!![]});return{'method':'POST','url':'/smartapi/dataset/update-driven-data','body':_0x258220[_0x1d098e(0x14e)],'description':_0x258220['message']};},async 'execute'(_0xbe979f){const _0xa7a6fd=a63_0x59c966;return buildDatasetExtendUpdateResult({'appCode':_0xbe979f[_0xa7a6fd(0x17c)],'input':readExtendUpdateInput(_0xbe979f),'dryRun':![]});}};function readExtendUpdateInput(_0x3e7d06){const _0x4b0b39=a63_0x59c966,_0x12483e=trim(_0x3e7d06[_0x4b0b39(0x13e)](_0x4b0b39(0x166))),_0x4c6507=parseJsonObjectFlag(_0x3e7d06[_0x4b0b39(0x13e)]('patch-json'),_0x4b0b39(0x13a)),_0x1206bf=parseJsonObjectFlag(_0x3e7d06[_0x4b0b39(0x13e)](_0x4b0b39(0x16a)),_0x4b0b39(0x177));return{'code':_0x12483e,'patch':_0x4c6507||{},'expect':_0x1206bf};}function validateInput(_0x6ca102){const _0x4ac0ab=a63_0x59c966;if(!_0x6ca102[_0x4ac0ab(0x166)])throw CliErrors['validation'](_0x4ac0ab(0x16d));validateExtendPatchKeys(_0x6ca102[_0x4ac0ab(0x150)]);}function parseDatasetExtend(_0x38b131){const _0x130b04=a63_0x59c966;if(typeof _0x38b131==='string'){const _0x38f672=_0x38b131['trim']();if(!_0x38f672)return{'value':{},'shape':'string'};let _0x5967fa;try{_0x5967fa=JSON[_0x130b04(0x138)](_0x38f672);}catch(_0x277c53){const _0x14dc54=_0x277c53 instanceof Error?_0x277c53[_0x130b04(0x170)]:String(_0x277c53);throw CliErrors[_0x130b04(0x158)](_0x130b04(0x174)+_0x14dc54);}if(!isPlainObject(_0x5967fa)||Array['isArray'](_0x5967fa))throw CliErrors[_0x130b04(0x158)](_0x130b04(0x172));return{'value':_0x5967fa,'shape':'string'};}if(_0x38b131===undefined||_0x38b131===null)return{'value':{},'shape':_0x130b04(0x154)};if(!isPlainObject(_0x38b131)||Array['isArray'](_0x38b131))throw CliErrors[_0x130b04(0x158)](_0x130b04(0x172));return{'value':_0x38b131,'shape':_0x130b04(0x151)};}function serializeDatasetExtend(_0xc6efe4,_0x2978e5){const _0xb7d5ae=a63_0x59c966;return _0x2978e5===_0xb7d5ae(0x154)?JSON['stringify'](_0xc6efe4):_0xc6efe4;}function summarizeDataset(_0xe6dbdc,_0x2ee7be){const _0x53a071=a63_0x59c966,_0x530ce3=isPlainObject(_0xe6dbdc[_0x53a071(0x16b)])?_0xe6dbdc[_0x53a071(0x16b)]:{},_0x286fcc=isPlainObject(_0xe6dbdc['dbtableConfig'])?_0xe6dbdc[_0x53a071(0x163)]:{};return{'id':_0xe6dbdc[_0x53a071(0x176)]??_0xe6dbdc['id']??_0x530ce3[_0x53a071(0x15c)]??null,'code':_0xe6dbdc[_0x53a071(0x139)]??_0xe6dbdc[_0x53a071(0x166)]??_0x530ce3[_0x53a071(0x141)]??_0x2ee7be,'name':_0xe6dbdc[_0x53a071(0x145)]??_0x530ce3[_0x53a071(0x15b)]??null,'table':_0x286fcc[_0x53a071(0x159)]??_0x530ce3[_0x53a071(0x159)]??null,'db':_0x286fcc['dbName']??_0x286fcc['dbId']??null};}function deepClone(_0xb86f33){const _0x2b28e8=a63_0x59c966;if(_0xb86f33===undefined)return _0xb86f33;return JSON['parse'](JSON[_0x2b28e8(0x178)](_0xb86f33));}function deepEqual(_0x4d2e05,_0x34b3a7){const _0x2657b7=a63_0x59c966;return JSON[_0x2657b7(0x178)](_0x4d2e05)===JSON[_0x2657b7(0x178)](_0x34b3a7);}function isPlainObject(_0x252b70){const _0x579ee7=a63_0x59c966;return Boolean(_0x252b70)&&typeof _0x252b70==='object'&&!Array[_0x579ee7(0x143)](_0x252b70);}function trim(_0x29a4c3){const _0x5dce5b=a63_0x59c966,_0x527ace=String(_0x29a4c3||'')[_0x5dce5b(0x171)]();return _0x527ace;}
@@ -1 +1 @@
1
- const a65_0x5cc5f9=a65_0x51cc;(function(_0x52cbb5,_0x3b939b){const _0x3e2e8a=a65_0x51cc,_0x375947=_0x52cbb5();while(!![]){try{const _0x1d301c=-parseInt(_0x3e2e8a(0x162))/0x1+-parseInt(_0x3e2e8a(0x12d))/0x2+parseInt(_0x3e2e8a(0x158))/0x3+parseInt(_0x3e2e8a(0x136))/0x4+parseInt(_0x3e2e8a(0x16c))/0x5+-parseInt(_0x3e2e8a(0x14c))/0x6*(parseInt(_0x3e2e8a(0x153))/0x7)+-parseInt(_0x3e2e8a(0x148))/0x8;if(_0x1d301c===_0x3b939b)break;else _0x375947['push'](_0x375947['shift']());}catch(_0x53311b){_0x375947['push'](_0x375947['shift']());}}}(a65_0x239a,0xbac46));function a65_0x51cc(_0x2902c4,_0x74adad){_0x2902c4=_0x2902c4-0x12d;const _0x239aa0=a65_0x239a();let _0x51cc80=_0x239aa0[_0x2902c4];return _0x51cc80;}import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a65_0x5cc5f9(0x13d),a65_0x5cc5f9(0x160),a65_0x5cc5f9(0x156),a65_0x5cc5f9(0x135),'required',a65_0x5cc5f9(0x12e),'defaultAggregation','chartRole',a65_0x5cc5f9(0x131)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x5cc5f9(0x164),a65_0x5cc5f9(0x165),a65_0x5cc5f9(0x168),a65_0x5cc5f9(0x16a),a65_0x5cc5f9(0x139),a65_0x5cc5f9(0x15b),'tableName',a65_0x5cc5f9(0x159),a65_0x5cc5f9(0x174),a65_0x5cc5f9(0x13b),a65_0x5cc5f9(0x14d)]);export function parseJsonObjectFlag(_0x57f0ad,_0x5d9fc7){const _0x5bdf0c=a65_0x5cc5f9;if(!_0x57f0ad)return undefined;let _0x2af705;try{_0x2af705=JSON[_0x5bdf0c(0x15e)](_0x57f0ad);}catch(_0x11e593){const _0x2acd43=_0x11e593 instanceof Error?_0x11e593[_0x5bdf0c(0x167)]:String(_0x11e593);throw CliErrors[_0x5bdf0c(0x146)](_0x5d9fc7+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x2acd43);}if(!isPlainObject(_0x2af705)||Array['isArray'](_0x2af705))throw CliErrors[_0x5bdf0c(0x146)](_0x5d9fc7+_0x5bdf0c(0x15d));return _0x2af705;}export function validatePatchKeys(_0x2f8c75){const _0x147ab9=a65_0x5cc5f9,_0x2ea7a5=Object['keys'](_0x2f8c75);if(_0x2ea7a5[_0x147ab9(0x15c)]===0x0)throw CliErrors['validation'](_0x147ab9(0x12f));for(const _0x3f0737 of _0x2ea7a5){if(FORBIDDEN_FIELD_KEYS[_0x147ab9(0x14e)](_0x3f0737))throw CliErrors['validation'](_0x147ab9(0x176)+_0x3f0737);if(!MUTABLE_FIELD_KEYS[_0x147ab9(0x14e)](_0x3f0737))throw CliErrors[_0x147ab9(0x146)](_0x147ab9(0x130)+_0x3f0737,'Allowed\x20keys:\x20'+Array[_0x147ab9(0x16e)](MUTABLE_FIELD_KEYS)[_0x147ab9(0x134)](',\x20'));}}export function applyFieldPatch(_0x21402c,_0x402b72){const _0x2458cb=a65_0x5cc5f9;validatePatchKeys(_0x402b72);const _0x505834=deepClone(_0x21402c),_0xf7b443=new Set();for(const [_0x3e2e48,_0x454552]of Object[_0x2458cb(0x175)](_0x402b72)){const _0x233e4e=_0x505834[_0x3e2e48],_0xb2c900=mergePatchValue(_0x233e4e,_0x454552);!deepEqual(_0x233e4e,_0xb2c900)&&(_0x505834[_0x3e2e48]=_0xb2c900,_0xf7b443[_0x2458cb(0x142)](_0x3e2e48),collectChangedPaths(_0x3e2e48,_0x233e4e,_0xb2c900,_0xf7b443));}return{'after':_0x505834,'changedPaths':Array[_0x2458cb(0x16e)](_0xf7b443)[_0x2458cb(0x138)](),'changed':_0xf7b443[_0x2458cb(0x17a)]>0x0};}export function assertExpectation(_0x29c70c,_0x3d7371){const _0x12b9b4=a65_0x5cc5f9;if(!_0x3d7371)return;for(const [_0x428f22,_0x33cec9]of Object[_0x12b9b4(0x175)](_0x3d7371)){const _0x368357=_0x29c70c[_0x428f22];if(!deepEqual(_0x368357,_0x33cec9))throw CliErrors[_0x12b9b4(0x146)](_0x12b9b4(0x16f)+_0x428f22,_0x12b9b4(0x16b)+JSON['stringify'](_0x33cec9)+_0x12b9b4(0x14a)+JSON[_0x12b9b4(0x157)](_0x368357));}}export async function buildDatasetFieldUpdateResult({appCode:_0x21a72e,input:_0x182c76,dryRun:_0xce0274}){const _0xef3bf1=a65_0x5cc5f9;validateInput(_0x182c76);const _0x4bb3bc=await getDatasetDetail(_0x182c76['code']),_0x138d8=readFieldArray(_0x4bb3bc),_0x1609dd=_0x138d8[_0xef3bf1(0x179)](_0x18c393=>_0x18c393?.[_0xef3bf1(0x164)]===_0x182c76[_0xef3bf1(0x141)]);if(_0x1609dd<0x0)throw CliErrors[_0xef3bf1(0x146)]('Field\x20not\x20found:\x20'+_0x182c76['field']);const _0xcc6532=deepClone(_0x138d8[_0x1609dd]);assertExpectation(_0xcc6532,_0x182c76[_0xef3bf1(0x13a)]);const {after:_0x1948cf,changedPaths:_0x30e5d6,changed:_0x41560f}=applyFieldPatch(_0xcc6532,_0x182c76[_0xef3bf1(0x133)]),_0x7fc4ce=summarizeDataset(_0x4bb3bc,_0x182c76[_0xef3bf1(0x165)]);return _0x41560f&&!_0xce0274&&(_0x138d8[_0x1609dd]=_0x1948cf,await updateDrivenData(_0x4bb3bc)),{'ok':!![],'data':{'appCode':_0x21a72e,'selector':{'code':_0x182c76[_0xef3bf1(0x165)]},'dataset':_0x7fc4ce,'field':{'id':_0xcc6532['id']??null,'name':_0xcc6532['name']},'dryRun':_0xce0274,'changed':_0x41560f,'changedPaths':_0x30e5d6,'before':_0xcc6532,'after':_0x1948cf,'submitted':_0x41560f&&!_0xce0274},'message':_0x41560f?_0xce0274?_0xef3bf1(0x173)+_0x182c76['field']+_0xef3bf1(0x161)+_0x30e5d6[_0xef3bf1(0x134)](',\x20')+')':_0xef3bf1(0x17b)+_0x182c76[_0xef3bf1(0x141)]+'\x20('+_0x30e5d6[_0xef3bf1(0x134)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x182c76[_0xef3bf1(0x141)]};}export const datasetFieldUpdate={'service':a65_0x5cc5f9(0x140),'command':a65_0x5cc5f9(0x147),'description':a65_0x5cc5f9(0x151),'risk':'write','flags':[CODE_FLAG,{'name':'field','type':a65_0x5cc5f9(0x16d),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':a65_0x5cc5f9(0x154),'type':a65_0x5cc5f9(0x16d),'required':!![],'description':a65_0x5cc5f9(0x132)},{'name':'expect-json','type':a65_0x5cc5f9(0x16d),'required':![],'description':a65_0x5cc5f9(0x178)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d3219){validateInput(readFieldUpdateInput(_0x3d3219));},async 'dryRun'(_0x374f11){const _0x39d1c8=a65_0x5cc5f9,_0x8ee146=await buildDatasetFieldUpdateResult({'appCode':_0x374f11['appCode'],'input':readFieldUpdateInput(_0x374f11),'dryRun':!![]});return{'method':_0x39d1c8(0x177),'url':_0x39d1c8(0x15a),'body':_0x8ee146[_0x39d1c8(0x163)],'description':_0x8ee146[_0x39d1c8(0x167)]};},async 'execute'(_0x1dab3b){return buildDatasetFieldUpdateResult({'appCode':_0x1dab3b['appCode'],'input':readFieldUpdateInput(_0x1dab3b),'dryRun':![]});}};function readFieldUpdateInput(_0x5cb3af){const _0xede626=a65_0x5cc5f9,_0x5591ff=trim(_0x5cb3af[_0xede626(0x13c)](_0xede626(0x165))),_0x340e42=emptyToUndefined(_0x5cb3af[_0xede626(0x13c)](_0xede626(0x141))),_0xfd35c5=parseJsonObjectFlag(_0x5cb3af[_0xede626(0x13c)]('patch-json'),'--patch-json'),_0x4e3d80=parseJsonObjectFlag(_0x5cb3af[_0xede626(0x13c)](_0xede626(0x137)),_0xede626(0x155));return{'code':_0x5591ff,'field':_0x340e42||'','patch':_0xfd35c5||{},'expect':_0x4e3d80};}function validateInput(_0x37c693){const _0x4b5284=a65_0x5cc5f9;if(!_0x37c693[_0x4b5284(0x165)])throw CliErrors[_0x4b5284(0x146)](_0x4b5284(0x143));if(!_0x37c693['field'])throw CliErrors[_0x4b5284(0x146)](_0x4b5284(0x166));validatePatchKeys(_0x37c693[_0x4b5284(0x133)]);}function readFieldArray(_0x30d275){const _0x231522=a65_0x5cc5f9;if(Array[_0x231522(0x169)](_0x30d275[_0x231522(0x13e)]))return _0x30d275['fields'];if(Array[_0x231522(0x169)](_0x30d275[_0x231522(0x14f)]))return _0x30d275[_0x231522(0x14f)];throw CliErrors[_0x231522(0x146)](_0x231522(0x15f));}function summarizeDataset(_0x5a4bd2,_0xe98645){const _0x5bd100=a65_0x5cc5f9,_0x442950=isPlainObject(_0x5a4bd2[_0x5bd100(0x140)])?_0x5a4bd2[_0x5bd100(0x140)]:{},_0x3fbc25=isPlainObject(_0x5a4bd2[_0x5bd100(0x14b)])?_0x5a4bd2['dbtableConfig']:{};return{'id':_0x5a4bd2[_0x5bd100(0x170)]??_0x5a4bd2['id']??_0x442950['datasetId']??null,'code':_0x5a4bd2[_0x5bd100(0x172)]??_0x5a4bd2[_0x5bd100(0x165)]??_0x442950[_0x5bd100(0x149)]??_0xe98645,'name':_0x5a4bd2[_0x5bd100(0x164)]??_0x442950[_0x5bd100(0x145)]??null,'table':_0x3fbc25[_0x5bd100(0x171)]??_0x442950[_0x5bd100(0x171)]??null,'db':_0x3fbc25[_0x5bd100(0x150)]??_0x3fbc25['dbId']??null};}function mergePatchValue(_0x828eeb,_0x4a8b2f){if(isPlainObject(_0x828eeb)&&isPlainObject(_0x4a8b2f))return deepMerge(_0x828eeb,_0x4a8b2f);return deepClone(_0x4a8b2f);}function deepMerge(_0x2f0df9,_0x552f4a){const _0x34ad42=a65_0x5cc5f9,_0x2a9e14=deepClone(_0x2f0df9);for(const [_0x3bf782,_0x2c1abe]of Object[_0x34ad42(0x175)](_0x552f4a)){_0x2a9e14[_0x3bf782]=isPlainObject(_0x2a9e14[_0x3bf782])&&isPlainObject(_0x2c1abe)?deepMerge(_0x2a9e14[_0x3bf782],_0x2c1abe):deepClone(_0x2c1abe);}return _0x2a9e14;}function collectChangedPaths(_0x312ecb,_0x2e89e4,_0x32a20e,_0x265abc){const _0xa2a432=a65_0x5cc5f9;if(!isPlainObject(_0x2e89e4)||!isPlainObject(_0x32a20e))return;const _0x3288f6=new Set([...Object[_0xa2a432(0x152)](_0x2e89e4),...Object[_0xa2a432(0x152)](_0x32a20e)]);for(const _0x2fe2fa of _0x3288f6){const _0x36729a=_0x2e89e4[_0x2fe2fa],_0x2f67e9=_0x32a20e[_0x2fe2fa];!deepEqual(_0x36729a,_0x2f67e9)&&_0x265abc[_0xa2a432(0x142)](_0x312ecb+'.'+_0x2fe2fa);}}function a65_0x239a(){const _0x65f990=['JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','findIndex','size','Updated\x20dataset\x20field\x20','2243020iGCnbQ','datetimeFormat','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Unsupported\x20patch\x20key:\x20','deprecated','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','patch','join','options','6084688hMZUDZ','expect-json','sort','dbTypeScale','expect','autoIncrement','str','doType','fields','object','dataset','field','add','--code\x20is\x20required','trim','datasetName','validation','field-update','4025224CpDIam','datasetCode',',\x20actual\x20','dbtableConfig','7284168vTQJpj','systemRetain','has','properties','dbName','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','keys','7lhSUMZ','patch-json','--expect-json','description','stringify','3909780hVbBjN','deleted','/smartapi/dataset/update-driven-data','dbFieldName','length','\x20must\x20be\x20a\x20JSON\x20object','parse','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','displayName','\x20would\x20change\x20(','60524RssQtC','data','name','code','--field\x20is\x20required','message','dbType','isArray','dbTypeLen','Expected\x20','4198905zhKKZL','string','from','Expectation\x20mismatch\x20at\x20','modelId','tableName','modelCode','Dry-run:\x20dataset\x20field\x20','pkField','entries','Forbidden\x20patch\x20key:\x20','POST'];a65_0x239a=function(){return _0x65f990;};return a65_0x239a();}function deepClone(_0x2f893e){const _0x348e59=a65_0x5cc5f9;if(_0x2f893e===undefined)return _0x2f893e;return JSON[_0x348e59(0x15e)](JSON[_0x348e59(0x157)](_0x2f893e));}function deepEqual(_0x1b2772,_0x429c79){const _0x3447ba=a65_0x5cc5f9;return JSON[_0x3447ba(0x157)](_0x1b2772)===JSON['stringify'](_0x429c79);}function isPlainObject(_0x2414a7){const _0x37d210=a65_0x5cc5f9;return Boolean(_0x2414a7)&&typeof _0x2414a7===_0x37d210(0x13f)&&!Array['isArray'](_0x2414a7);}function emptyToUndefined(_0x1b5b2c){const _0x1b47bd=a65_0x5cc5f9,_0x19d507=String(_0x1b5b2c||'')[_0x1b47bd(0x144)]();return _0x19d507||undefined;}function trim(_0x2ff438){const _0x27092b=a65_0x5cc5f9;return String(_0x2ff438||'')[_0x27092b(0x144)]();}
1
+ const a64_0x26c22a=a64_0x5f28;function a64_0x2f7c(){const _0x291e74=['datasetName','18ZcevRp','message','datasetId','pkField','5603456rJpTXm','code','deleted','findIndex','validation','125472JBEOyw','has','109899iZRHhZ','4528305UANzbt','options','fields','patch','dbFieldName','string','properties','dbTypeLen','No\x20changes\x20for\x20dataset\x20field\x20','description','211653AXVYoR','trim','deprecated','--field\x20is\x20required','Exact\x20raw\x20fields[].name\x20to\x20patch','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Allowed\x20keys:\x20','datasetCode','--expect-json','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','name','parse','dbName','dbtableConfig','write','stringify','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Forbidden\x20patch\x20key:\x20','expect','expect-json','from','required','Field\x20not\x20found:\x20','length','sort','/smartapi/dataset/update-driven-data','6xutFuQ','Dry-run:\x20dataset\x20field\x20','join','Updated\x20dataset\x20field\x20','chartRole','entries','dbTypeScale','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','appCode','\x20must\x20be\x20a\x20JSON\x20object','Expected\x20','--patch-json','tableName','POST','field-update','datetimeFormat','dbId','add','str','data','dataset','modelCode','isArray','field','keys','autoIncrement','4454534DYCvPj','patch-json','doType','1828955yHeSAo'];a64_0x2f7c=function(){return _0x291e74;};return a64_0x2f7c();}(function(_0x3f210a,_0x30df0a){const _0x470e3d=a64_0x5f28,_0x28f07d=_0x3f210a();while(!![]){try{const _0x4792db=-parseInt(_0x470e3d(0xb9))/0x1+-parseInt(_0x470e3d(0xf2))/0x2*(parseInt(_0x470e3d(0xfd))/0x3)+-parseInt(_0x470e3d(0xfb))/0x4+parseInt(_0x470e3d(0xf0))/0x5+parseInt(_0x470e3d(0xd3))/0x6*(-parseInt(_0x470e3d(0xed))/0x7)+parseInt(_0x470e3d(0xf6))/0x8+parseInt(_0x470e3d(0xfe))/0x9;if(_0x4792db===_0x30df0a)break;else _0x28f07d['push'](_0x28f07d['shift']());}catch(_0x18ad11){_0x28f07d['push'](_0x28f07d['shift']());}}}(a64_0x2f7c,0x57f60));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a64_0x5f28(_0x29c976,_0x21f8f6){_0x29c976=_0x29c976-0xb6;const _0x2f7cbf=a64_0x2f7c();let _0x5f286f=_0x2f7cbf[_0x29c976];return _0x5f286f;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a64_0x26c22a(0xef),'displayName',a64_0x26c22a(0xb8),a64_0x26c22a(0xff),a64_0x26c22a(0xce),a64_0x26c22a(0xe2),'defaultAggregation',a64_0x26c22a(0xd7),a64_0x26c22a(0xbb)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x26c22a(0xc3),'code','dbType',a64_0x26c22a(0xb6),a64_0x26c22a(0xd9),a64_0x26c22a(0x102),a64_0x26c22a(0xdf),a64_0x26c22a(0xf8),a64_0x26c22a(0xf5),a64_0x26c22a(0xec),'systemRetain']);export function parseJsonObjectFlag(_0x5bdd43,_0x236484){const _0x32d912=a64_0x26c22a;if(!_0x5bdd43)return undefined;let _0x441e8b;try{_0x441e8b=JSON['parse'](_0x5bdd43);}catch(_0x1319a1){const _0x5e3d2f=_0x1319a1 instanceof Error?_0x1319a1[_0x32d912(0xf3)]:String(_0x1319a1);throw CliErrors[_0x32d912(0xfa)](_0x236484+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x5e3d2f);}if(!isPlainObject(_0x441e8b)||Array['isArray'](_0x441e8b))throw CliErrors['validation'](_0x236484+_0x32d912(0xdc));return _0x441e8b;}export function validatePatchKeys(_0x2b7dc4){const _0x51b91a=a64_0x26c22a,_0x137905=Object[_0x51b91a(0xeb)](_0x2b7dc4);if(_0x137905[_0x51b91a(0xd0)]===0x0)throw CliErrors[_0x51b91a(0xfa)](_0x51b91a(0xbe));for(const _0x5a7636 of _0x137905){if(FORBIDDEN_FIELD_KEYS['has'](_0x5a7636))throw CliErrors[_0x51b91a(0xfa)](_0x51b91a(0xca)+_0x5a7636);if(!MUTABLE_FIELD_KEYS[_0x51b91a(0xfc)](_0x5a7636))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x5a7636,_0x51b91a(0xbf)+Array[_0x51b91a(0xcd)](MUTABLE_FIELD_KEYS)[_0x51b91a(0xd5)](',\x20'));}}export function applyFieldPatch(_0x2a27ef,_0x430fda){const _0x34b05e=a64_0x26c22a;validatePatchKeys(_0x430fda);const _0x10290e=deepClone(_0x2a27ef),_0xbeef56=new Set();for(const [_0x54483b,_0x5bb996]of Object[_0x34b05e(0xd8)](_0x430fda)){const _0x33bef8=_0x10290e[_0x54483b],_0x3c99ba=mergePatchValue(_0x33bef8,_0x5bb996);!deepEqual(_0x33bef8,_0x3c99ba)&&(_0x10290e[_0x54483b]=_0x3c99ba,_0xbeef56[_0x34b05e(0xe4)](_0x54483b),collectChangedPaths(_0x54483b,_0x33bef8,_0x3c99ba,_0xbeef56));}return{'after':_0x10290e,'changedPaths':Array[_0x34b05e(0xcd)](_0xbeef56)[_0x34b05e(0xd1)](),'changed':_0xbeef56['size']>0x0};}export function assertExpectation(_0x8feb04,_0x1208e4){const _0x213f54=a64_0x26c22a;if(!_0x1208e4)return;for(const [_0x189afd,_0x2f1420]of Object[_0x213f54(0xd8)](_0x1208e4)){const _0x428f70=_0x8feb04[_0x189afd];if(!deepEqual(_0x428f70,_0x2f1420))throw CliErrors[_0x213f54(0xfa)]('Expectation\x20mismatch\x20at\x20'+_0x189afd,_0x213f54(0xdd)+JSON[_0x213f54(0xc8)](_0x2f1420)+',\x20actual\x20'+JSON[_0x213f54(0xc8)](_0x428f70));}}export async function buildDatasetFieldUpdateResult({appCode:_0x3279a2,input:_0x5ac5f2,dryRun:_0x1c2663}){const _0x245046=a64_0x26c22a;validateInput(_0x5ac5f2);const _0x2eb7ee=await getDatasetDetail(_0x5ac5f2[_0x245046(0xf7)]),_0x1c10b8=readFieldArray(_0x2eb7ee),_0x3bcf41=_0x1c10b8[_0x245046(0xf9)](_0x4b018c=>_0x4b018c?.['name']===_0x5ac5f2[_0x245046(0xea)]);if(_0x3bcf41<0x0)throw CliErrors['validation'](_0x245046(0xcf)+_0x5ac5f2['field']);const _0x371679=deepClone(_0x1c10b8[_0x3bcf41]);assertExpectation(_0x371679,_0x5ac5f2[_0x245046(0xcb)]);const {after:_0x35c7ce,changedPaths:_0x395287,changed:_0x5f5874}=applyFieldPatch(_0x371679,_0x5ac5f2[_0x245046(0x101)]),_0x54ef21=summarizeDataset(_0x2eb7ee,_0x5ac5f2[_0x245046(0xf7)]);return _0x5f5874&&!_0x1c2663&&(_0x1c10b8[_0x3bcf41]=_0x35c7ce,await updateDrivenData(_0x2eb7ee)),{'ok':!![],'data':{'appCode':_0x3279a2,'selector':{'code':_0x5ac5f2[_0x245046(0xf7)]},'dataset':_0x54ef21,'field':{'id':_0x371679['id']??null,'name':_0x371679['name']},'dryRun':_0x1c2663,'changed':_0x5f5874,'changedPaths':_0x395287,'before':_0x371679,'after':_0x35c7ce,'submitted':_0x5f5874&&!_0x1c2663},'message':_0x5f5874?_0x1c2663?_0x245046(0xd4)+_0x5ac5f2[_0x245046(0xea)]+'\x20would\x20change\x20('+_0x395287[_0x245046(0xd5)](',\x20')+')':_0x245046(0xd6)+_0x5ac5f2[_0x245046(0xea)]+'\x20('+_0x395287[_0x245046(0xd5)](',\x20')+')':_0x245046(0xb7)+_0x5ac5f2[_0x245046(0xea)]};}export const datasetFieldUpdate={'service':'dataset','command':a64_0x26c22a(0xe1),'description':'Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','risk':a64_0x26c22a(0xc7),'flags':[CODE_FLAG,{'name':a64_0x26c22a(0xea),'type':'string','required':!![],'description':a64_0x26c22a(0xbd)},{'name':'patch-json','type':a64_0x26c22a(0x103),'required':!![],'description':a64_0x26c22a(0xc9)},{'name':a64_0x26c22a(0xcc),'type':a64_0x26c22a(0x103),'required':![],'description':a64_0x26c22a(0xc2)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x279197){validateInput(readFieldUpdateInput(_0x279197));},async 'dryRun'(_0xa4cc01){const _0x482081=a64_0x26c22a,_0x43f8e6=await buildDatasetFieldUpdateResult({'appCode':_0xa4cc01[_0x482081(0xdb)],'input':readFieldUpdateInput(_0xa4cc01),'dryRun':!![]});return{'method':_0x482081(0xe0),'url':_0x482081(0xd2),'body':_0x43f8e6[_0x482081(0xe6)],'description':_0x43f8e6['message']};},async 'execute'(_0xf846dd){const _0x1c4653=a64_0x26c22a;return buildDatasetFieldUpdateResult({'appCode':_0xf846dd[_0x1c4653(0xdb)],'input':readFieldUpdateInput(_0xf846dd),'dryRun':![]});}};function readFieldUpdateInput(_0x1df1ca){const _0x2b8d48=a64_0x26c22a,_0x16124f=trim(_0x1df1ca[_0x2b8d48(0xe5)](_0x2b8d48(0xf7))),_0x2a4a02=emptyToUndefined(_0x1df1ca['str'](_0x2b8d48(0xea))),_0x47ee64=parseJsonObjectFlag(_0x1df1ca[_0x2b8d48(0xe5)](_0x2b8d48(0xee)),_0x2b8d48(0xde)),_0x4763c6=parseJsonObjectFlag(_0x1df1ca[_0x2b8d48(0xe5)](_0x2b8d48(0xcc)),_0x2b8d48(0xc1));return{'code':_0x16124f,'field':_0x2a4a02||'','patch':_0x47ee64||{},'expect':_0x4763c6};}function validateInput(_0x4ff19e){const _0x48785b=a64_0x26c22a;if(!_0x4ff19e[_0x48785b(0xf7)])throw CliErrors['validation']('--code\x20is\x20required');if(!_0x4ff19e[_0x48785b(0xea)])throw CliErrors[_0x48785b(0xfa)](_0x48785b(0xbc));validatePatchKeys(_0x4ff19e[_0x48785b(0x101)]);}function readFieldArray(_0x4c6602){const _0x1d6d19=a64_0x26c22a;if(Array[_0x1d6d19(0xe9)](_0x4c6602[_0x1d6d19(0x100)]))return _0x4c6602[_0x1d6d19(0x100)];if(Array[_0x1d6d19(0xe9)](_0x4c6602['properties']))return _0x4c6602[_0x1d6d19(0x104)];throw CliErrors[_0x1d6d19(0xfa)](_0x1d6d19(0xda));}function summarizeDataset(_0x49150d,_0x4f25d9){const _0x9d1819=a64_0x26c22a,_0xb1c6b0=isPlainObject(_0x49150d['dataset'])?_0x49150d[_0x9d1819(0xe7)]:{},_0x1f8cd8=isPlainObject(_0x49150d['dbtableConfig'])?_0x49150d[_0x9d1819(0xc6)]:{};return{'id':_0x49150d['modelId']??_0x49150d['id']??_0xb1c6b0[_0x9d1819(0xf4)]??null,'code':_0x49150d[_0x9d1819(0xe8)]??_0x49150d[_0x9d1819(0xf7)]??_0xb1c6b0[_0x9d1819(0xc0)]??_0x4f25d9,'name':_0x49150d[_0x9d1819(0xc3)]??_0xb1c6b0[_0x9d1819(0xf1)]??null,'table':_0x1f8cd8[_0x9d1819(0xdf)]??_0xb1c6b0[_0x9d1819(0xdf)]??null,'db':_0x1f8cd8[_0x9d1819(0xc5)]??_0x1f8cd8[_0x9d1819(0xe3)]??null};}function mergePatchValue(_0x1fce51,_0x1365f3){if(isPlainObject(_0x1fce51)&&isPlainObject(_0x1365f3))return deepMerge(_0x1fce51,_0x1365f3);return deepClone(_0x1365f3);}function deepMerge(_0x5cde37,_0x4da48c){const _0x496c7f=a64_0x26c22a,_0x5092aa=deepClone(_0x5cde37);for(const [_0x58ba8d,_0x14e28e]of Object[_0x496c7f(0xd8)](_0x4da48c)){_0x5092aa[_0x58ba8d]=isPlainObject(_0x5092aa[_0x58ba8d])&&isPlainObject(_0x14e28e)?deepMerge(_0x5092aa[_0x58ba8d],_0x14e28e):deepClone(_0x14e28e);}return _0x5092aa;}function collectChangedPaths(_0xcf93a8,_0x3daf03,_0x44e34c,_0x44729f){const _0x295cac=a64_0x26c22a;if(!isPlainObject(_0x3daf03)||!isPlainObject(_0x44e34c))return;const _0x13ba16=new Set([...Object[_0x295cac(0xeb)](_0x3daf03),...Object[_0x295cac(0xeb)](_0x44e34c)]);for(const _0xe91636 of _0x13ba16){const _0x7b00d6=_0x3daf03[_0xe91636],_0x2469fc=_0x44e34c[_0xe91636];!deepEqual(_0x7b00d6,_0x2469fc)&&_0x44729f[_0x295cac(0xe4)](_0xcf93a8+'.'+_0xe91636);}}function deepClone(_0xce3753){const _0x514086=a64_0x26c22a;if(_0xce3753===undefined)return _0xce3753;return JSON[_0x514086(0xc4)](JSON['stringify'](_0xce3753));}function deepEqual(_0x428704,_0x3e3cc1){const _0x4cfbfc=a64_0x26c22a;return JSON[_0x4cfbfc(0xc8)](_0x428704)===JSON[_0x4cfbfc(0xc8)](_0x3e3cc1);}function isPlainObject(_0x33b9a5){return Boolean(_0x33b9a5)&&typeof _0x33b9a5==='object'&&!Array['isArray'](_0x33b9a5);}function emptyToUndefined(_0x246048){const _0x4e48d3=String(_0x246048||'')['trim']();return _0x4e48d3||undefined;}function trim(_0x4104a8){const _0x561026=a64_0x26c22a;return String(_0x4104a8||'')[_0x561026(0xba)]();}