@lovrabet/rabetbase-cli 2.3.12-beta.1 → 2.3.12

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 (260) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.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/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.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/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- const a51_0xaca1d5=a51_0x19ca;(function(_0x2c79f1,_0x1beee5){const _0x136410=a51_0x19ca,_0x3443d5=_0x2c79f1();while(!![]){try{const _0x69cc44=parseInt(_0x136410(0x1a9))/0x1*(-parseInt(_0x136410(0x1ab))/0x2)+parseInt(_0x136410(0x1b0))/0x3+parseInt(_0x136410(0x1b8))/0x4+parseInt(_0x136410(0x1b9))/0x5+-parseInt(_0x136410(0x1bb))/0x6+parseInt(_0x136410(0x1be))/0x7*(parseInt(_0x136410(0x1bc))/0x8)+parseInt(_0x136410(0x1b3))/0x9*(-parseInt(_0x136410(0x1b7))/0xa);if(_0x69cc44===_0x1beee5)break;else _0x3443d5['push'](_0x3443d5['shift']());}catch(_0x171181){_0x3443d5['push'](_0x3443d5['shift']());}}}(a51_0x276c,0xd8f3a));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a51_0x276c(){const _0x290ae7=['9wjgzxH','Missing\x20key.','Get\x20a\x20config\x20value\x20by\x20key','Key\x20not\x20found:\x20','14283290ACwICJ','2581924iskkXK','7456825ZiTpWx','get','909720MMRgvy','43024FtJxTr','string','1463ijuSXd','13382qQcrZL','read','248LaYXXo','validation','\x20config\x20get\x20--key\x20<key>','str','object','2601309qcuZXC','app','Usage:\x20'];a51_0x276c=function(){return _0x290ae7;};return a51_0x276c();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a51_0x19ca(_0x327cc4,_0x9001e){_0x327cc4=_0x327cc4-0x1a9;const _0x276c4f=a51_0x276c();let _0x19ca50=_0x276c4f[_0x327cc4];return _0x19ca50;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3febef){const _0x5cab39=a51_0x19ca,_0x10d982=_0x3febef[_0x5cab39(0x1ae)]('key');if(!_0x10d982)throw CliErrors[_0x5cab39(0x1ac)](_0x5cab39(0x1b4),_0x5cab39(0x1b2)+CLI_BIN_NAME+_0x5cab39(0x1ad));const _0x172a0a=readConfig(),_0x22d1d3=_0x10d982===_0x5cab39(0x1b1)?'appcode':_0x10d982,_0xc3cba2=_0x172a0a[_0x22d1d3];if(_0xc3cba2===undefined)throw CliErrors[_0x5cab39(0x1ac)](_0x5cab39(0x1b6)+_0x10d982);return{'ok':!![],'data':typeof _0xc3cba2==='object'?_0xc3cba2:{[_0x22d1d3]:_0xc3cba2},'message':typeof _0xc3cba2===_0x5cab39(0x1af)?undefined:String(_0xc3cba2)};}export const configGetDefinition={'service':'config','command':a51_0xaca1d5(0x1ba),'description':a51_0xaca1d5(0x1b5),'risk':a51_0xaca1d5(0x1aa),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0xaca1d5(0x1bd),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ function a51_0x2502(_0x4cf525,_0x12af6){_0x4cf525=_0x4cf525-0xec;const _0x34881b=a51_0x3488();let _0x25029c=_0x34881b[_0x4cf525];return _0x25029c;}const a51_0x2a8b21=a51_0x2502;(function(_0x50f312,_0x1f8f39){const _0xc13c3c=a51_0x2502,_0x2330b5=_0x50f312();while(!![]){try{const _0x329a56=-parseInt(_0xc13c3c(0x101))/0x1+parseInt(_0xc13c3c(0xf3))/0x2*(-parseInt(_0xc13c3c(0x102))/0x3)+-parseInt(_0xc13c3c(0xed))/0x4*(-parseInt(_0xc13c3c(0xf9))/0x5)+-parseInt(_0xc13c3c(0xf4))/0x6+parseInt(_0xc13c3c(0xfb))/0x7*(parseInt(_0xc13c3c(0xf6))/0x8)+parseInt(_0xc13c3c(0xf5))/0x9*(-parseInt(_0xc13c3c(0xff))/0xa)+parseInt(_0xc13c3c(0xf1))/0xb*(parseInt(_0xc13c3c(0xf0))/0xc);if(_0x329a56===_0x1f8f39)break;else _0x2330b5['push'](_0x2330b5['shift']());}catch(_0x32f6e1){_0x2330b5['push'](_0x2330b5['shift']());}}}(a51_0x3488,0x655fc));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a51_0x3488(){const _0x533522=['Get\x20a\x20config\x20value\x20by\x20key','146045IoAFWn','Key\x20not\x20found:\x20','7aSpkfY','Missing\x20key.','str','appcode','10uQyUgR','Usage:\x20','76987KIkNwL','3YXSjiQ','\x20config\x20get\x20--key\x20<key>','config','4qnTYOO','string','object','996kLdxli','128931Xthqgo','validation','1252774sXUbzs','2905776ZVSNvl','88983lnXzWh','4885864vkxVqO','read'];a51_0x3488=function(){return _0x533522;};return a51_0x3488();}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3965dc){const _0x547ea6=a51_0x2502,_0x286b4b=_0x3965dc[_0x547ea6(0xfd)]('key');if(!_0x286b4b)throw CliErrors[_0x547ea6(0xf2)](_0x547ea6(0xfc),_0x547ea6(0x100)+CLI_BIN_NAME+_0x547ea6(0x103));const _0x1b1f3c=readConfig(),_0x581d51=_0x286b4b==='app'?_0x547ea6(0xfe):_0x286b4b,_0x1458f1=_0x1b1f3c[_0x581d51];if(_0x1458f1===undefined)throw CliErrors['validation'](_0x547ea6(0xfa)+_0x286b4b);return{'ok':!![],'data':typeof _0x1458f1===_0x547ea6(0xef)?_0x1458f1:{[_0x581d51]:_0x1458f1},'message':typeof _0x1458f1==='object'?undefined:String(_0x1458f1)};}export const configGetDefinition={'service':a51_0x2a8b21(0xec),'command':'get','description':a51_0x2a8b21(0xf8),'risk':a51_0x2a8b21(0xf7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0x2a8b21(0xee),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a52_0x1594(){const _0x577292=['3818691qnownO','860276zkvQPI','24frPnjH','3042456zelDey','3820397zFjTEr','4375368RBEeeA','8WcvMEI','1749565zLSzQv','23714ftLhKP'];a52_0x1594=function(){return _0x577292;};return a52_0x1594();}function a52_0x5da6(_0x20b19a,_0x3b026e){_0x20b19a=_0x20b19a-0x184;const _0x1594e8=a52_0x1594();let _0x5da67d=_0x1594e8[_0x20b19a];return _0x5da67d;}(function(_0x280c66,_0x295b77){const _0x45167b=a52_0x5da6,_0x327f10=_0x280c66();while(!![]){try{const _0x55b37d=-parseInt(_0x45167b(0x189))/0x1*(parseInt(_0x45167b(0x18c))/0x2)+parseInt(_0x45167b(0x184))/0x3+-parseInt(_0x45167b(0x18b))/0x4+parseInt(_0x45167b(0x188))/0x5+parseInt(_0x45167b(0x186))/0x6+parseInt(_0x45167b(0x185))/0x7*(-parseInt(_0x45167b(0x187))/0x8)+-parseInt(_0x45167b(0x18a))/0x9;if(_0x55b37d===_0x295b77)break;else _0x327f10['push'](_0x327f10['shift']());}catch(_0x57367d){_0x327f10['push'](_0x327f10['shift']());}}}(a52_0x1594,0x983e2));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
+ (function(_0x2ace80,_0x503d25){const _0x4a35f4=a52_0x21c1,_0x31bc1a=_0x2ace80();while(!![]){try{const _0x341826=parseInt(_0x4a35f4(0x165))/0x1*(-parseInt(_0x4a35f4(0x15f))/0x2)+parseInt(_0x4a35f4(0x161))/0x3+parseInt(_0x4a35f4(0x15e))/0x4+parseInt(_0x4a35f4(0x160))/0x5+-parseInt(_0x4a35f4(0x164))/0x6*(parseInt(_0x4a35f4(0x15d))/0x7)+-parseInt(_0x4a35f4(0x162))/0x8*(-parseInt(_0x4a35f4(0x15c))/0x9)+-parseInt(_0x4a35f4(0x163))/0xa;if(_0x341826===_0x503d25)break;else _0x31bc1a['push'](_0x31bc1a['shift']());}catch(_0x4527b7){_0x31bc1a['push'](_0x31bc1a['shift']());}}}(a52_0x4441,0x7d44e));function a52_0x4441(){const _0x14e85e=['130056rtZYtr','8LpPnlO','4774700zEDCpw','6bqPRrD','3638jFbJyv','8285769dCoHyG','5376406pWLAmK','1692604PUlzFn','214pnkLRW','3803760edPlGG'];a52_0x4441=function(){return _0x14e85e;};return a52_0x4441();}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a52_0x21c1(_0x24923f,_0x421287){_0x24923f=_0x24923f-0x15c;const _0x444193=a52_0x4441();let _0x21c1c0=_0x444193[_0x24923f];return _0x21c1c0;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- function a53_0x30b2(){const _0x112d41=['24BNFqNs','72370QgjnxV','read','33639zXQqQk','409125FZqAhg','173607Gapofe','171XBNtHE','603992xiCykD','4ZdwXas','bool','List\x20all\x20config\x20values','boolean','1569536Panswv','global','3364460BQHPUC','10JDSffg'];a53_0x30b2=function(){return _0x112d41;};return a53_0x30b2();}const a53_0x29140d=a53_0x1c20;(function(_0x2d6bb2,_0x537910){const _0x22f726=a53_0x1c20,_0x28c586=_0x2d6bb2();while(!![]){try{const _0x11e2cf=-parseInt(_0x22f726(0xcc))/0x1*(-parseInt(_0x22f726(0xc1))/0x2)+parseInt(_0x22f726(0xcd))/0x3+parseInt(_0x22f726(0xd0))/0x4*(-parseInt(_0x22f726(0xc8))/0x5)+-parseInt(_0x22f726(0xc9))/0x6*(parseInt(_0x22f726(0xce))/0x7)+parseInt(_0x22f726(0xc5))/0x8+parseInt(_0x22f726(0xcf))/0x9*(-parseInt(_0x22f726(0xca))/0xa)+parseInt(_0x22f726(0xc7))/0xb;if(_0x11e2cf===_0x537910)break;else _0x28c586['push'](_0x28c586['shift']());}catch(_0x4a8b94){_0x28c586['push'](_0x28c586['shift']());}}}(a53_0x30b2,0x28c5a));function a53_0x1c20(_0x22db6c,_0x1c999d){_0x22db6c=_0x22db6c-0xc1;const _0x30b227=a53_0x30b2();let _0x1c20ee=_0x30b227[_0x22db6c];return _0x1c20ee;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2ef20c){const _0x3d34e9=a53_0x1c20,_0x3447bb=_0x2ef20c[_0x3d34e9(0xc2)](_0x3d34e9(0xc6))?readScopedConfig(_0x3d34e9(0xc6)):readConfig();return{'ok':!![],'data':_0x3447bb};}export const configListDefinition={'service':'config','command':'list','description':a53_0x29140d(0xc3),'risk':a53_0x29140d(0xcb),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x29140d(0xc6),'type':a53_0x29140d(0xc4),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ function a53_0x167e(_0x1a9c5b,_0x44a0c2){_0x1a9c5b=_0x1a9c5b-0x65;const _0x206307=a53_0x2063();let _0x167e73=_0x206307[_0x1a9c5b];return _0x167e73;}const a53_0x4518a5=a53_0x167e;(function(_0x2cdb6c,_0x51098a){const _0x1d2652=a53_0x167e,_0x537a8e=_0x2cdb6c();while(!![]){try{const _0x541bf9=parseInt(_0x1d2652(0x6a))/0x1*(parseInt(_0x1d2652(0x67))/0x2)+-parseInt(_0x1d2652(0x6d))/0x3+-parseInt(_0x1d2652(0x73))/0x4*(-parseInt(_0x1d2652(0x75))/0x5)+-parseInt(_0x1d2652(0x6b))/0x6+-parseInt(_0x1d2652(0x68))/0x7*(-parseInt(_0x1d2652(0x72))/0x8)+parseInt(_0x1d2652(0x74))/0x9*(-parseInt(_0x1d2652(0x6c))/0xa)+parseInt(_0x1d2652(0x70))/0xb;if(_0x541bf9===_0x51098a)break;else _0x537a8e['push'](_0x537a8e['shift']());}catch(_0x410b41){_0x537a8e['push'](_0x537a8e['shift']());}}}(a53_0x2063,0x43e70));import{readScopedConfig}from'../../commands/config/shared.js';function a53_0x2063(){const _0x5dc24e=['global','2pUrPSG','14MdaRNy','bool','504019PFtCuq','2741550MCMQPZ','10uThkZF','1530951aFrdAU','List\x20all\x20config\x20values','read','4206675zVvUXn','config','1980472XcnRQy','124gWjgCe','1590102GPvPXV','6530lLFQzb','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','boolean'];a53_0x2063=function(){return _0x5dc24e;};return a53_0x2063();}import{readConfig}from'../../utils/config.js';async function execute(_0x25cea3){const _0x5545c6=a53_0x167e,_0x385c83=_0x25cea3[_0x5545c6(0x69)](_0x5545c6(0x66))?readScopedConfig(_0x5545c6(0x66)):readConfig();return{'ok':!![],'data':_0x385c83};}export const configListDefinition={'service':a53_0x4518a5(0x71),'command':'list','description':a53_0x4518a5(0x6e),'risk':a53_0x4518a5(0x6f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x4518a5(0x66),'type':a53_0x4518a5(0x65),'description':a53_0x4518a5(0x76),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a54_0x1cff7c=a54_0x33e6;(function(_0x2a8b47,_0x504c42){const _0x65df40=a54_0x33e6,_0x4101bd=_0x2a8b47();while(!![]){try{const _0x184e0d=parseInt(_0x65df40(0x1a7))/0x1*(parseInt(_0x65df40(0x18f))/0x2)+-parseInt(_0x65df40(0x189))/0x3+-parseInt(_0x65df40(0x196))/0x4*(-parseInt(_0x65df40(0x1ab))/0x5)+-parseInt(_0x65df40(0x181))/0x6*(parseInt(_0x65df40(0x18a))/0x7)+-parseInt(_0x65df40(0x18c))/0x8*(parseInt(_0x65df40(0x17d))/0x9)+parseInt(_0x65df40(0x18d))/0xa+-parseInt(_0x65df40(0x194))/0xb*(-parseInt(_0x65df40(0x1a4))/0xc);if(_0x184e0d===_0x504c42)break;else _0x4101bd['push'](_0x4101bd['shift']());}catch(_0x2a3cd7){_0x4101bd['push'](_0x4101bd['shift']());}}}(a54_0x4494,0x49108));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a54_0x33e6(_0x2be770,_0x3a3781){_0x2be770=_0x2be770-0x17c;const _0x4494d4=a54_0x4494();let _0x33e651=_0x4494d4[_0x2be770];return _0x33e651;}function a54_0x4494(){const _0xc8d4be=['app','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','78fgWBab','Global','bool','apps','length','`,\x20`','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','1109103wAYcTw','268478lhoFPO','Use\x20`','40552hLQjbC','2682370jZdHfV','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','1684lSmHri','Usage:\x20','Invalid\x20value\x20for\x20\x22','\x20set\x20to:\x20','riskLevel','9361682wZVlNS','\x20app\x20add\x20<name>\x20--appcode\x20','4foeXeW','Project','Config\x20value','env','\x22.\x20Allowed:\x20','keys','locale','string','Settable\x20top-level\x20keys:\x20','global','write','key','config','validation','12dACGej','join','Set\x20a\x20config\x20value','9GMigDy','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','object','\x20appcode\x20set\x20to:\x20','1546775yueBfs','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Missing\x20key.','Missing\x20value.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','477fCpIUp','Top-level\x20key\x20\x22'];a54_0x4494=function(){return _0xc8d4be;};return a54_0x4494();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x239d7d){const _0x4aa00b=a54_0x33e6,_0x1d2f83=_0x239d7d['str']('key'),_0x1ee510=_0x239d7d['str']('value');if(!_0x1d2f83)throw CliErrors['validation'](_0x4aa00b(0x1ad),_0x4aa00b(0x190)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x1ee510===undefined||_0x1ee510==='')throw CliErrors['validation'](_0x4aa00b(0x1ae),_0x4aa00b(0x190)+CLI_BIN_NAME+_0x4aa00b(0x180));if(_0x1ee510[_0x4aa00b(0x185)]>0x1f4)throw CliErrors['validation']('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x1d2f83))throw CliErrors[_0x4aa00b(0x1a3)](_0x4aa00b(0x17e)+_0x1d2f83+'\x22\x20is\x20not\x20settable.',_0x4aa00b(0x19e)+getTopLevelConfigKeySummary());if(_0x1d2f83===_0x4aa00b(0x193))throw CliErrors[_0x4aa00b(0x1a3)](_0x4aa00b(0x188));if(CONFIG_ENUM_VALUES[_0x1d2f83]&&!CONFIG_ENUM_VALUES[_0x1d2f83]['includes'](_0x1ee510))throw CliErrors[_0x4aa00b(0x1a3)](_0x4aa00b(0x191)+_0x1d2f83+_0x4aa00b(0x19a)+CONFIG_ENUM_VALUES[_0x1d2f83][_0x4aa00b(0x1a5)](',\x20'));if(_0x1d2f83===_0x4aa00b(0x19c)&&!normalizeLocale(_0x1ee510))throw CliErrors[_0x4aa00b(0x1a3)]('Invalid\x20locale\x20value.',_0x4aa00b(0x17c));const _0xd01cf6={'global':_0x239d7d[_0x4aa00b(0x183)](_0x4aa00b(0x19f))},_0xa9b71f=resolveWriteScope(_0xd01cf6),_0x4384d9=readScopedConfig(_0xa9b71f);let _0x544bb2=_0x1d2f83,_0x2538bf=_0x1ee510;_0x1d2f83===_0x4aa00b(0x17f)&&(_0x544bb2='appcode',delete _0x4384d9[_0x4aa00b(0x17f)]);_0x1d2f83===_0x4aa00b(0x19c)&&(_0x2538bf=normalizeLocale(_0x1ee510));if(_0x1d2f83===_0x4aa00b(0x199)){_0x2538bf=normalizeEnv(_0x1ee510);if(!isProduction(_0x2538bf)&&!isDaily(_0x2538bf))throw CliErrors[_0x4aa00b(0x1a3)](_0x4aa00b(0x1a8),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x1d2f83==='appcode'){const _0x24462c=_0x4384d9[_0x4aa00b(0x184)]&&typeof _0x4384d9[_0x4aa00b(0x184)]===_0x4aa00b(0x1a9)?Object[_0x4aa00b(0x19b)](_0x4384d9[_0x4aa00b(0x184)]):[];if(_0x24462c[_0x4aa00b(0x185)]>0x0)throw CliErrors[_0x4aa00b(0x1a3)](_0x4aa00b(0x1ac),_0x4aa00b(0x18b)+CLI_BIN_NAME+_0x4aa00b(0x195)+_0x2538bf+_0x4aa00b(0x186)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x4811cc=buildCanonicalProjectConfig({..._0x4384d9},{'appCodes':[_0x2538bf],'env':typeof _0x4384d9[_0x4aa00b(0x199)]===_0x4aa00b(0x19d)?_0x4384d9[_0x4aa00b(0x199)]:undefined});writeScopedConfig(_0x4811cc,_0xa9b71f);const _0x3f0caf=_0xa9b71f===_0x4aa00b(0x19f)?'Global':_0x4aa00b(0x197);return{'ok':!![],'message':'✓\x20'+_0x3f0caf+_0x4aa00b(0x1aa)+_0x2538bf+_0x4aa00b(0x18e)};}_0x4384d9[_0x544bb2]=_0x2538bf,writeScopedConfig(_0x4384d9,_0xa9b71f);const _0x5c9e93=_0xa9b71f===_0x4aa00b(0x19f)?_0x4aa00b(0x182):_0x4aa00b(0x197);return{'ok':!![],'message':'✓\x20'+_0x5c9e93+'\x20'+_0x544bb2+_0x4aa00b(0x192)+_0x2538bf};}export const configSetDefinition={'service':a54_0x1cff7c(0x1a2),'command':'set','description':a54_0x1cff7c(0x1a6),'risk':a54_0x1cff7c(0x1a0),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x1cff7c(0x1a1),'type':a54_0x1cff7c(0x19d),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a54_0x1cff7c(0x19d),'description':a54_0x1cff7c(0x198),'required':!![]},{'name':a54_0x1cff7c(0x19f),'type':'boolean','description':a54_0x1cff7c(0x187),'default':![]}],'execute':execute};
1
+ function a54_0x269b(){const _0x3f5f76=['Config\x20value','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','6596916zkqbTJ','Project','env','includes','appcode','432593egIjsX','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','key','locale','object','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Missing\x20value.','global','2223276hAHPuh','config','Global','24kwFUKa','\x22.\x20Allowed:\x20','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','\x20set\x20to:\x20','\x20appcode\x20set\x20to:\x20','keys','513tnyczR','416343WdUZHk','boolean','Usage:\x20','Settable\x20top-level\x20keys:\x20','Top-level\x20key\x20\x22','Invalid\x20locale\x20value.','app','131828MkHQkS','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','109864jVveLX','string','write','Invalid\x20value\x20for\x20\x22','Missing\x20key.','value','20aFGnFD','\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.','306980lstNJq','validation','30XZftsG','riskLevel','apps','Use\x20`','str','length','\x22\x20is\x20not\x20settable.','join','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','2khgOTm'];a54_0x269b=function(){return _0x3f5f76;};return a54_0x269b();}const a54_0x9367cf=a54_0x4434;(function(_0x3a4901,_0x520512){const _0x16f410=a54_0x4434,_0x196dd5=_0x3a4901();while(!![]){try{const _0x18be71=-parseInt(_0x16f410(0xa1))/0x1*(-parseInt(_0x16f410(0x7f))/0x2)+parseInt(_0x16f410(0x9a))/0x3*(parseInt(_0x16f410(0x71))/0x4)+parseInt(_0x16f410(0x74))/0x5+parseInt(_0x16f410(0x92))/0x6*(parseInt(_0x16f410(0x87))/0x7)+parseInt(_0x16f410(0x6b))/0x8*(-parseInt(_0x16f410(0x99))/0x9)+-parseInt(_0x16f410(0x76))/0xa*(-parseInt(_0x16f410(0x8f))/0xb)+-parseInt(_0x16f410(0x82))/0xc;if(_0x18be71===_0x520512)break;else _0x196dd5['push'](_0x196dd5['shift']());}catch(_0x245024){_0x196dd5['push'](_0x196dd5['shift']());}}}(a54_0x269b,0x63a55));import{CliErrors}from'../../errors.js';function a54_0x4434(_0xedd360,_0x32f6c2){_0xedd360=_0xedd360-0x6a;const _0x269b1d=a54_0x269b();let _0x4434aa=_0x269b1d[_0xedd360];return _0x4434aa;}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(_0x5875de){const _0x2b5765=a54_0x4434,_0x202a11=_0x5875de['str'](_0x2b5765(0x89)),_0x3da6fa=_0x5875de[_0x2b5765(0x7a)]('value');if(!_0x202a11)throw CliErrors[_0x2b5765(0x75)](_0x2b5765(0x6f),_0x2b5765(0x9c)+CLI_BIN_NAME+_0x2b5765(0x6a));if(_0x3da6fa===undefined||_0x3da6fa==='')throw CliErrors[_0x2b5765(0x75)](_0x2b5765(0x8d),_0x2b5765(0x9c)+CLI_BIN_NAME+_0x2b5765(0x6a));if(_0x3da6fa[_0x2b5765(0x7b)]>0x1f4)throw CliErrors['validation'](_0x2b5765(0x8c));if(!isTopLevelConfigKey(_0x202a11))throw CliErrors[_0x2b5765(0x75)](_0x2b5765(0x9e)+_0x202a11+_0x2b5765(0x7c),_0x2b5765(0x9d)+getTopLevelConfigKeySummary());if(_0x202a11===_0x2b5765(0x77))throw CliErrors[_0x2b5765(0x75)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x202a11]&&!CONFIG_ENUM_VALUES[_0x202a11][_0x2b5765(0x85)](_0x3da6fa))throw CliErrors[_0x2b5765(0x75)](_0x2b5765(0x6e)+_0x202a11+_0x2b5765(0x93)+CONFIG_ENUM_VALUES[_0x202a11][_0x2b5765(0x7d)](',\x20'));if(_0x202a11===_0x2b5765(0x8a)&&!normalizeLocale(_0x3da6fa))throw CliErrors[_0x2b5765(0x75)](_0x2b5765(0x9f),_0x2b5765(0x95));const _0x53a744={'global':_0x5875de['bool']('global')},_0x2d3e79=resolveWriteScope(_0x53a744),_0x2bc4ae=readScopedConfig(_0x2d3e79);let _0x23f408=_0x202a11,_0x5666b6=_0x3da6fa;_0x202a11===_0x2b5765(0xa0)&&(_0x23f408=_0x2b5765(0x86),delete _0x2bc4ae[_0x2b5765(0xa0)]);_0x202a11===_0x2b5765(0x8a)&&(_0x5666b6=normalizeLocale(_0x3da6fa));if(_0x202a11===_0x2b5765(0x84)){_0x5666b6=normalizeEnv(_0x3da6fa);if(!isProduction(_0x5666b6)&&!isDaily(_0x5666b6))throw CliErrors[_0x2b5765(0x75)](_0x2b5765(0x81),_0x2b5765(0x7e));}if(_0x202a11===_0x2b5765(0x86)){const _0x2dca11=_0x2bc4ae['apps']&&typeof _0x2bc4ae[_0x2b5765(0x78)]===_0x2b5765(0x8b)?Object[_0x2b5765(0x98)](_0x2bc4ae[_0x2b5765(0x78)]):[];if(_0x2dca11[_0x2b5765(0x7b)]>0x0)throw CliErrors[_0x2b5765(0x75)](_0x2b5765(0x73),_0x2b5765(0x79)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20'+_0x5666b6+'`,\x20`'+CLI_BIN_NAME+_0x2b5765(0x72));const _0x13c8c7=buildCanonicalProjectConfig({..._0x2bc4ae},{'appCodes':[_0x5666b6],'env':typeof _0x2bc4ae[_0x2b5765(0x84)]===_0x2b5765(0x6c)?_0x2bc4ae[_0x2b5765(0x84)]:undefined});writeScopedConfig(_0x13c8c7,_0x2d3e79);const _0x208ba0=_0x2d3e79===_0x2b5765(0x8e)?_0x2b5765(0x91):_0x2b5765(0x83);return{'ok':!![],'message':'✓\x20'+_0x208ba0+_0x2b5765(0x97)+_0x5666b6+_0x2b5765(0x88)};}_0x2bc4ae[_0x23f408]=_0x5666b6,writeScopedConfig(_0x2bc4ae,_0x2d3e79);const _0x5ddb07=_0x2d3e79==='global'?_0x2b5765(0x91):'Project';return{'ok':!![],'message':'✓\x20'+_0x5ddb07+'\x20'+_0x23f408+_0x2b5765(0x96)+_0x5666b6};}export const configSetDefinition={'service':a54_0x9367cf(0x90),'command':'set','description':'Set\x20a\x20config\x20value','risk':a54_0x9367cf(0x6d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x9367cf(0x89),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a54_0x9367cf(0x70),'type':a54_0x9367cf(0x6c),'description':a54_0x9367cf(0x80),'required':!![]},{'name':a54_0x9367cf(0x8e),'type':a54_0x9367cf(0x9b),'description':a54_0x9367cf(0x94),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x164b19,_0x556bc7){var _0x2a6d47=a55_0x3033,_0x443f75=_0x164b19();while(!![]){try{var _0x29e546=parseInt(_0x2a6d47(0x19c))/0x1+parseInt(_0x2a6d47(0x19f))/0x2+parseInt(_0x2a6d47(0x198))/0x3*(-parseInt(_0x2a6d47(0x1a1))/0x4)+-parseInt(_0x2a6d47(0x1a6))/0x5*(-parseInt(_0x2a6d47(0x1a0))/0x6)+parseInt(_0x2a6d47(0x19b))/0x7*(-parseInt(_0x2a6d47(0x1a7))/0x8)+parseInt(_0x2a6d47(0x1a4))/0x9+parseInt(_0x2a6d47(0x19e))/0xa;if(_0x29e546===_0x556bc7)break;else _0x443f75['push'](_0x443f75['shift']());}catch(_0x30d7af){_0x443f75['push'](_0x443f75['shift']());}}}(a55_0x4f26,0x42cb2));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x2c22df){var _0x50a12d=a55_0x3033;if(_0x2c22df[_0x50a12d(0x199)])return _0x50a12d(0x199);if(!isInProject())throw CliErrors[_0x50a12d(0x1a3)](_0x50a12d(0x19d),_0x50a12d(0x1a2)+CLI_BIN_NAME+_0x50a12d(0x1a5));return _0x50a12d(0x19a);}function a55_0x4f26(){var _0x2739ca=['6TQIyZN','1261716ztMZAh','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','validation','121599vswhyW','\x20init`\x20first.','116495skBAgh','8hZLYwe','3IXWLyC','global','project','3470411OhpHUB','121229vLpxQV','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','8411690wPmwpy','171160RBKqal'];a55_0x4f26=function(){return _0x2739ca;};return a55_0x4f26();}export function readScopedConfig(_0x20d560){return readConfigFile(resolveWriteConfigPath(_0x20d560));}function a55_0x3033(_0x2ce6f9,_0x1ada36){_0x2ce6f9=_0x2ce6f9-0x198;var _0x4f26bb=a55_0x4f26();var _0x3033d5=_0x4f26bb[_0x2ce6f9];return _0x3033d5;}export function writeScopedConfig(_0x5a71c5,_0x4589a4){writeConfigFile(resolveWriteConfigPath(_0x4589a4),_0x5a71c5);}
1
+ (function(_0x1ff690,_0x32615e){var _0x41978c=a55_0x29ac,_0x1fb649=_0x1ff690();while(!![]){try{var _0x2abccf=-parseInt(_0x41978c(0x1e4))/0x1+parseInt(_0x41978c(0x1d5))/0x2*(parseInt(_0x41978c(0x1df))/0x3)+parseInt(_0x41978c(0x1d6))/0x4*(-parseInt(_0x41978c(0x1dc))/0x5)+-parseInt(_0x41978c(0x1d4))/0x6*(-parseInt(_0x41978c(0x1d8))/0x7)+-parseInt(_0x41978c(0x1e2))/0x8+-parseInt(_0x41978c(0x1d9))/0x9*(parseInt(_0x41978c(0x1de))/0xa)+parseInt(_0x41978c(0x1e3))/0xb*(parseInt(_0x41978c(0x1db))/0xc);if(_0x2abccf===_0x32615e)break;else _0x1fb649['push'](_0x1fb649['shift']());}catch(_0x4c2d03){_0x1fb649['push'](_0x1fb649['shift']());}}}(a55_0x5e53,0xe4435));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x10f2b4){var _0xe34707=a55_0x29ac;if(_0x10f2b4[_0xe34707(0x1dd)])return _0xe34707(0x1dd);if(!isInProject())throw CliErrors[_0xe34707(0x1e0)](_0xe34707(0x1e1),_0xe34707(0x1d7)+CLI_BIN_NAME+_0xe34707(0x1da));return'project';}export function readScopedConfig(_0x422af9){return readConfigFile(resolveWriteConfigPath(_0x422af9));}function a55_0x5e53(){var _0x5564aa=['validation','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','11957472LsjkgC','211222sZXcje','1313718wQpFEy','736206UQrwMc','2gGXZaQ','748100uGXdat','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','21BXolBB','1995183piqUQM','\x20init`\x20first.','2520yTIgej','15zKVHvP','global','70pqXGzs','4367184BzsGfd'];a55_0x5e53=function(){return _0x5564aa;};return a55_0x5e53();}function a55_0x29ac(_0x27d5d0,_0x4fe67a){_0x27d5d0=_0x27d5d0-0x1d4;var _0x5e5355=a55_0x5e53();var _0x29ac79=_0x5e5355[_0x27d5d0];return _0x29ac79;}export function writeScopedConfig(_0x5b46e2,_0x303e31){writeConfigFile(resolveWriteConfigPath(_0x303e31),_0x5b46e2);}
@@ -1 +1 @@
1
- function a56_0x2a60(_0x50abd5,_0x151a42){_0x50abd5=_0x50abd5-0x1cd;const _0x5bc987=a56_0x5bc9();let _0x2a60a9=_0x5bc987[_0x50abd5];return _0x2a60a9;}const a56_0x2066cf=a56_0x2a60;function a56_0x5bc9(){const _0x3a8c84=['3591lfHbuE','\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}]','20mWYOMR','3587470UIrSAZ','Filter\x20dataset\x20records\x20with\x20query\x20conditions','526092TYdHyY','206912StsDiL','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','8502290WTSGLc','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','2968CQOIob','filter','1996435WdBrrt','21859JxHYmp','join','6DCvcRD'];a56_0x5bc9=function(){return _0x3a8c84;};return a56_0x5bc9();}(function(_0x2067fb,_0x2bf50f){const _0x280fd9=a56_0x2a60,_0x170f54=_0x2067fb();while(!![]){try{const _0x1b9d36=parseInt(_0x280fd9(0x1d1))/0x1+-parseInt(_0x280fd9(0x1da))/0x2+-parseInt(_0x280fd9(0x1d9))/0x3*(-parseInt(_0x280fd9(0x1d6))/0x4)+-parseInt(_0x280fd9(0x1d7))/0x5+-parseInt(_0x280fd9(0x1d3))/0x6*(parseInt(_0x280fd9(0x1d0))/0x7)+-parseInt(_0x280fd9(0x1ce))/0x8*(-parseInt(_0x280fd9(0x1d4))/0x9)+parseInt(_0x280fd9(0x1dc))/0xa;if(_0x1b9d36===_0x2bf50f)break;else _0x170f54['push'](_0x170f54['shift']());}catch(_0x40eff7){_0x170f54['push'](_0x170f54['shift']());}}}(a56_0x5bc9,0xc10fe));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a56_0x2066cf(0x1cf),'operation':'filter','description':a56_0x2066cf(0x1d8),'paramsRequired':![],'paramsHint':'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','helpExtra':[a56_0x2066cf(0x1db),a56_0x2066cf(0x1dd),'\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_0x2066cf(0x1d5),a56_0x2066cf(0x1cd),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a56_0x2066cf(0x1d2)]('\x0a')});
1
+ function a56_0x5470(_0x5b5eaf,_0x21e88a){_0x5b5eaf=_0x5b5eaf-0x1c0;const _0x52ded0=a56_0x52de();let _0x54700c=_0x52ded0[_0x5b5eaf];return _0x54700c;}const a56_0x5a3a8e=a56_0x5470;(function(_0x490c4b,_0x19dd63){const _0x2a2fce=a56_0x5470,_0x4daff6=_0x490c4b();while(!![]){try{const _0x3d91e6=-parseInt(_0x2a2fce(0x1c2))/0x1*(parseInt(_0x2a2fce(0x1ce))/0x2)+-parseInt(_0x2a2fce(0x1ca))/0x3*(-parseInt(_0x2a2fce(0x1d0))/0x4)+parseInt(_0x2a2fce(0x1cf))/0x5+parseInt(_0x2a2fce(0x1c1))/0x6+-parseInt(_0x2a2fce(0x1c6))/0x7+parseInt(_0x2a2fce(0x1c7))/0x8*(parseInt(_0x2a2fce(0x1c8))/0x9)+-parseInt(_0x2a2fce(0x1c4))/0xa;if(_0x3d91e6===_0x19dd63)break;else _0x4daff6['push'](_0x4daff6['shift']());}catch(_0x302fb1){_0x4daff6['push'](_0x4daff6['shift']());}}}(a56_0x52de,0xd5eaf));import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x52de(){const _0x4f0c01=['Filter\x20dataset\x20records\x20with\x20query\x20conditions','24584850cWfMnW','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','4859848YSFAQa','8ukJXWo','7672131fukHdY','\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]','3HAqzCJ','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','214HrWNFw','7542175tBVzmD','6477788byXuoB','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','1093548tthyJR','1249XJSbGj'];a56_0x52de=function(){return _0x4f0c01;};return a56_0x52de();}export const dataFilter=buildDataCommand({'command':'filter','operation':'filter','description':a56_0x5a3a8e(0x1c3),'paramsRequired':![],'paramsHint':a56_0x5a3a8e(0x1c5),'helpExtra':[a56_0x5a3a8e(0x1cd),a56_0x5a3a8e(0x1c0),a56_0x5a3a8e(0x1c9),'\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}]',a56_0x5a3a8e(0x1cb),a56_0x5a3a8e(0x1cc)]['join']('\x0a')});
@@ -1 +1 @@
1
- const a57_0x1f84fe=a57_0x4578;function a57_0x4578(_0x33502d,_0x3e1a1a){_0x33502d=_0x33502d-0xcc;const _0x36d385=a57_0x36d3();let _0x4578cb=_0x36d385[_0x33502d];return _0x4578cb;}(function(_0x38fb15,_0x340641){const _0x124833=a57_0x4578,_0x114244=_0x38fb15();while(!![]){try{const _0x1e2080=-parseInt(_0x124833(0xd2))/0x1*(parseInt(_0x124833(0xd9))/0x2)+-parseInt(_0x124833(0xcf))/0x3+-parseInt(_0x124833(0xd0))/0x4*(-parseInt(_0x124833(0xcc))/0x5)+parseInt(_0x124833(0xd6))/0x6*(parseInt(_0x124833(0xd1))/0x7)+-parseInt(_0x124833(0xd4))/0x8*(parseInt(_0x124833(0xd5))/0x9)+-parseInt(_0x124833(0xd8))/0xa*(parseInt(_0x124833(0xda))/0xb)+parseInt(_0x124833(0xdb))/0xc*(parseInt(_0x124833(0xcd))/0xd);if(_0x1e2080===_0x340641)break;else _0x114244['push'](_0x114244['shift']());}catch(_0x16edde){_0x114244['push'](_0x114244['shift']());}}}(a57_0x36d3,0xd75d8));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a57_0x1f84fe(0xd7),'operation':a57_0x1f84fe(0xd7),'description':a57_0x1f84fe(0xce),'paramsRequired':!![],'paramsHint':a57_0x1f84fe(0xd3)});function a57_0x36d3(){const _0x3cbb45=['140032qICKOS','7217hMFoYV','1293024rxWozo','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','96HDIJwn','163467zILDrR','714rsjiQX','getOne','330huruEX','2tqLodb','92697kNIxwG','636PnIJhD','125iQnOJW','668889OWMqlz','Get\x20a\x20single\x20record\x20by\x20ID','3161073qHtiax'];a57_0x36d3=function(){return _0x3cbb45;};return a57_0x36d3();}
1
+ function a57_0x83b6(_0x4a73aa,_0x50eb9e){_0x4a73aa=_0x4a73aa-0x1a3;const _0x402cde=a57_0x402c();let _0x83b691=_0x402cde[_0x4a73aa];return _0x83b691;}const a57_0x5ad458=a57_0x83b6;function a57_0x402c(){const _0x1bebba=['3322938nLoWrt','7WTaxny','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','2261154WKuiyk','1136530aookWb','84317ixnsEU','7161680SHuRui','getOne','243cJBUCV','15YqmBOq','Get\x20a\x20single\x20record\x20by\x20ID','252784wzIWGq','255932PMvcsh'];a57_0x402c=function(){return _0x1bebba;};return a57_0x402c();}(function(_0x310c25,_0x10099a){const _0x2ee91d=a57_0x83b6,_0x1d7d25=_0x310c25();while(!![]){try{const _0x324323=-parseInt(_0x2ee91d(0x1ae))/0x1+parseInt(_0x2ee91d(0x1ad))/0x2+-parseInt(_0x2ee91d(0x1ac))/0x3+parseInt(_0x2ee91d(0x1a8))/0x4*(-parseInt(_0x2ee91d(0x1a5))/0x5)+-parseInt(_0x2ee91d(0x1a9))/0x6*(parseInt(_0x2ee91d(0x1aa))/0x7)+-parseInt(_0x2ee91d(0x1a7))/0x8*(-parseInt(_0x2ee91d(0x1a4))/0x9)+parseInt(_0x2ee91d(0x1af))/0xa;if(_0x324323===_0x10099a)break;else _0x1d7d25['push'](_0x1d7d25['shift']());}catch(_0x12eb6e){_0x1d7d25['push'](_0x1d7d25['shift']());}}}(a57_0x402c,0x8732c));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a57_0x5ad458(0x1a3),'operation':'getOne','description':a57_0x5ad458(0x1a6),'paramsRequired':!![],'paramsHint':a57_0x5ad458(0x1ab)});
@@ -1 +1 @@
1
- (function(_0x32a1c5,_0x53161b){const _0x4e7f83=a58_0x10a9,_0x114e49=_0x32a1c5();while(!![]){try{const _0x386926=parseInt(_0x4e7f83(0x95))/0x1+parseInt(_0x4e7f83(0x92))/0x2*(-parseInt(_0x4e7f83(0x9d))/0x3)+-parseInt(_0x4e7f83(0x99))/0x4*(parseInt(_0x4e7f83(0x94))/0x5)+-parseInt(_0x4e7f83(0x93))/0x6*(parseInt(_0x4e7f83(0x9a))/0x7)+-parseInt(_0x4e7f83(0x96))/0x8*(parseInt(_0x4e7f83(0x98))/0x9)+-parseInt(_0x4e7f83(0x9b))/0xa*(-parseInt(_0x4e7f83(0x9c))/0xb)+parseInt(_0x4e7f83(0x9e))/0xc*(parseInt(_0x4e7f83(0x97))/0xd);if(_0x386926===_0x53161b)break;else _0x114e49['push'](_0x114e49['shift']());}catch(_0x5aa755){_0x114e49['push'](_0x114e49['shift']());}}}(a58_0x226e,0x39af4));import{dataFilter}from'../../commands/data/filter.js';function a58_0x226e(){const _0x35ddc2=['2376639xSzXrw','136smCNqo','63zrcCeX','91990zPazvc','407hgboOf','10431rSmyqG','12xMfLfm','228CiHWdY','31854YZraEQ','1245RogwOf','181982CekXPn','8AyBepC','5598151TRYANS'];a58_0x226e=function(){return _0x35ddc2;};return a58_0x226e();}import{dataGetOne}from'../../commands/data/getOne.js';function a58_0x10a9(_0xd7ec8a,_0x44db0d){_0xd7ec8a=_0xd7ec8a-0x92;const _0x226e3e=a58_0x226e();let _0x10a9ab=_0x226e3e[_0xd7ec8a];return _0x10a9ab;}export const dataDefinitions=[dataFilter,dataGetOne];
1
+ function a58_0x4ac1(_0x5ff89,_0x44e71c){_0x5ff89=_0x5ff89-0x1da;const _0x44447d=a58_0x4444();let _0x4ac112=_0x44447d[_0x5ff89];return _0x4ac112;}function a58_0x4444(){const _0x40290a=['155007NzKOTb','3682DhqqiW','626157BThzTv','585128ieFGQH','40wfIQCs','510KhyvqI','1278048XjxndJ','1660995fVLVQV','5mcUZsy'];a58_0x4444=function(){return _0x40290a;};return a58_0x4444();}(function(_0x43c2af,_0x53ccee){const _0x337582=a58_0x4ac1,_0x31fa49=_0x43c2af();while(!![]){try{const _0x341732=-parseInt(_0x337582(0x1da))/0x1*(-parseInt(_0x337582(0x1dc))/0x2)+parseInt(_0x337582(0x1dd))/0x3+-parseInt(_0x337582(0x1de))/0x4+parseInt(_0x337582(0x1e0))/0x5+parseInt(_0x337582(0x1e1))/0x6+-parseInt(_0x337582(0x1e2))/0x7+-parseInt(_0x337582(0x1df))/0x8*(-parseInt(_0x337582(0x1db))/0x9);if(_0x341732===_0x53ccee)break;else _0x31fa49['push'](_0x31fa49['shift']());}catch(_0x22f90b){_0x31fa49['push'](_0x31fa49['shift']());}}}(a58_0x4444,0x209ce));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x38b78b,_0x5336b6){const _0x4015a2=a59_0x431f,_0x1458c9=_0x38b78b();while(!![]){try{const _0x25ccd8=parseInt(_0x4015a2(0x71))/0x1+parseInt(_0x4015a2(0x80))/0x2*(parseInt(_0x4015a2(0x75))/0x3)+parseInt(_0x4015a2(0x77))/0x4+-parseInt(_0x4015a2(0x7c))/0x5*(-parseInt(_0x4015a2(0x85))/0x6)+parseInt(_0x4015a2(0x6e))/0x7*(parseInt(_0x4015a2(0x7d))/0x8)+parseInt(_0x4015a2(0x76))/0x9*(parseInt(_0x4015a2(0x8b))/0xa)+-parseInt(_0x4015a2(0x86))/0xb*(parseInt(_0x4015a2(0x72))/0xc);if(_0x25ccd8===_0x5336b6)break;else _0x1458c9['push'](_0x1458c9['shift']());}catch(_0x101789){_0x1458c9['push'](_0x1458c9['shift']());}}}(a59_0x1a6b,0xd6d32));function a59_0x431f(_0x265077,_0x12b0fc){_0x265077=_0x265077-0x6e;const _0x1a6bae=a59_0x1a6b();let _0x431f80=_0x1a6bae[_0x265077];return _0x431f80;}function a59_0x1a6b(){const _0x30d00d=['operation','243762ZjxoWa','18dMJnNT','608432JGDjVh','string','helpExtra','appCode','str','309605meuphU','16VWNEun','params','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','18jWXqOd','flagMissing','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','code','114wrAEVw','1903PDLjpK','command','description','validation','paramsHint','4068950taFujc','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','\x20completed\x20in\x20','alias','getOne','748027wQNDgS','now','data','1180376UrSTDZ','234996JgvRRw','read'];a59_0x1a6b=function(){return _0x30d00d;};return a59_0x1a6b();}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(_0x176e14){const _0x334f52=a59_0x431f;if(!_0x176e14)throw CliErrors[_0x334f52(0x81)](_0x334f52(0x7e),_0x334f52(0x8c));const _0x2afe2d=_0x176e14['id'];if(_0x2afe2d===undefined||_0x2afe2d===null||_0x2afe2d==='')throw CliErrors[_0x334f52(0x89)](_0x334f52(0x83),_0x334f52(0x7f));}function parseCommandParams(_0x4e22a6){return parseJsonParams(_0x4e22a6)??{};}export function buildDataCommand(_0x2d5057){const _0x5d6b21=a59_0x431f,_0x471f9e=_0x5d6b21(0x82);return{'service':_0x5d6b21(0x70),'command':_0x2d5057[_0x5d6b21(0x87)],'description':_0x2d5057[_0x5d6b21(0x88)],'risk':_0x5d6b21(0x73),'defaultOutputFormat':'compress','helpExtra':_0x2d5057[_0x5d6b21(0x79)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x5d6b21(0x8e),'type':_0x5d6b21(0x78),'description':_0x471f9e},{'name':'params','type':_0x5d6b21(0x78),'description':_0x2d5057[_0x5d6b21(0x8a)]}],async 'validate'(_0x546149){const _0xa73b3f=_0x5d6b21,_0x42bd2b=_0x546149[_0xa73b3f(0x7b)](_0xa73b3f(0x7e));if(_0x2d5057['paramsRequired']&&!_0x42bd2b)throw CliErrors['flagMissing'](_0xa73b3f(0x7e),_0x2d5057[_0xa73b3f(0x8a)]);const _0x3464e5=parseJsonParams(_0x42bd2b);_0x2d5057[_0xa73b3f(0x74)]===_0xa73b3f(0x8f)&&assertGetOneId(_0x3464e5);},async 'execute'(_0xed89f0){const _0x42f258=_0x5d6b21,_0x1e76de=parseCommandParams(_0xed89f0[_0x42f258(0x7b)]('params')),_0x23ad84=Date[_0x42f258(0x6f)](),_0x1448c7=await executeDatasetDataOperation(_0xed89f0[_0x42f258(0x7a)],_0xed89f0[_0x42f258(0x7b)](_0x42f258(0x84)),_0x2d5057[_0x42f258(0x74)],_0x1e76de),_0x5e446f=Date[_0x42f258(0x6f)]()-_0x23ad84;return{'ok':!![],'data':{'result':_0x1448c7,'elapsed':_0x5e446f},'message':'data\x20'+_0x2d5057[_0x42f258(0x87)]+_0x42f258(0x8d)+_0x5e446f+'ms'};}};}
1
+ function a59_0x3c15(){const _0x3d7b99=['paramsHint','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','string','2386835SdRSbB','8ygJTVn','3329982mfEZPM','flagMissing','description','6963DIUoEa','read','params','helpExtra','3720836rxNPyV','123vtvrXp','791104bFoxhT','42924WuXDtm','paramsRequired','\x20completed\x20in\x20','415817amcAow','alias','str','appCode','36870zCLChd','operation','command','getOne','data\x20','6ZGXEZF','validation','Example:\x20--params\x20\x27{\x22id\x22:123}\x27'];a59_0x3c15=function(){return _0x3d7b99;};return a59_0x3c15();}(function(_0x19fb55,_0x4122b9){const _0x431894=a59_0x26e5,_0xfc8c06=_0x19fb55();while(!![]){try{const _0x3de714=parseInt(_0x431894(0x13a))/0x1+parseInt(_0x431894(0x136))/0x2+parseInt(_0x431894(0x135))/0x3*(parseInt(_0x431894(0x137))/0x4)+-parseInt(_0x431894(0x12b))/0x5*(-parseInt(_0x431894(0x125))/0x6)+-parseInt(_0x431894(0x134))/0x7*(-parseInt(_0x431894(0x12c))/0x8)+parseInt(_0x431894(0x12d))/0x9+parseInt(_0x431894(0x13e))/0xa*(-parseInt(_0x431894(0x130))/0xb);if(_0x3de714===_0x4122b9)break;else _0xfc8c06['push'](_0xfc8c06['shift']());}catch(_0x3763c1){_0xfc8c06['push'](_0xfc8c06['shift']());}}}(a59_0x3c15,0x485be));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0x26e5(_0x5fc2d4,_0x10f1b7){_0x5fc2d4=_0x5fc2d4-0x121;const _0x3c1588=a59_0x3c15();let _0x26e57e=_0x3c1588[_0x5fc2d4];return _0x26e57e;}import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x1c4fec){const _0x2e4258=a59_0x26e5;if(!_0x1c4fec)throw CliErrors[_0x2e4258(0x12e)]('params',_0x2e4258(0x129));const _0x582daa=_0x1c4fec['id'];if(_0x582daa===undefined||_0x582daa===null||_0x582daa==='')throw CliErrors[_0x2e4258(0x126)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x2e4258(0x127));}function parseCommandParams(_0x232300){return parseJsonParams(_0x232300)??{};}export function buildDataCommand(_0x4fcec1){const _0x51cf90=a59_0x26e5,_0x1edd14='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':'data','command':_0x4fcec1[_0x51cf90(0x122)],'description':_0x4fcec1[_0x51cf90(0x12f)],'risk':_0x51cf90(0x131),'defaultOutputFormat':'compress','helpExtra':_0x4fcec1[_0x51cf90(0x133)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x51cf90(0x13b),'type':_0x51cf90(0x12a),'description':_0x1edd14},{'name':_0x51cf90(0x132),'type':'string','description':_0x4fcec1[_0x51cf90(0x128)]}],async 'validate'(_0x372954){const _0xe4e016=_0x51cf90,_0x165703=_0x372954[_0xe4e016(0x13c)]('params');if(_0x4fcec1[_0xe4e016(0x138)]&&!_0x165703)throw CliErrors[_0xe4e016(0x12e)](_0xe4e016(0x132),_0x4fcec1[_0xe4e016(0x128)]);const _0x3d815e=parseJsonParams(_0x165703);_0x4fcec1['operation']===_0xe4e016(0x123)&&assertGetOneId(_0x3d815e);},async 'execute'(_0x13eb0b){const _0x351b57=_0x51cf90,_0x2e7140=parseCommandParams(_0x13eb0b[_0x351b57(0x13c)](_0x351b57(0x132))),_0x293495=Date['now'](),_0x27b447=await executeDatasetDataOperation(_0x13eb0b[_0x351b57(0x13d)],_0x13eb0b[_0x351b57(0x13c)]('code'),_0x4fcec1[_0x351b57(0x121)],_0x2e7140),_0x302460=Date['now']()-_0x293495;return{'ok':!![],'data':{'result':_0x27b447,'elapsed':_0x302460},'message':_0x351b57(0x124)+_0x4fcec1[_0x351b57(0x122)]+_0x351b57(0x139)+_0x302460+'ms'};}};}
@@ -1 +1 @@
1
- const a60_0x137fde=a60_0xf778;(function(_0x42ca11,_0x1a892b){const _0x1cc16a=a60_0xf778,_0x232c76=_0x42ca11();while(!![]){try{const _0x17373d=parseInt(_0x1cc16a(0x7f))/0x1*(parseInt(_0x1cc16a(0xaa))/0x2)+-parseInt(_0x1cc16a(0x80))/0x3*(parseInt(_0x1cc16a(0xac))/0x4)+parseInt(_0x1cc16a(0x75))/0x5+parseInt(_0x1cc16a(0x74))/0x6*(parseInt(_0x1cc16a(0x7c))/0x7)+-parseInt(_0x1cc16a(0x94))/0x8+parseInt(_0x1cc16a(0x96))/0x9+-parseInt(_0x1cc16a(0x8b))/0xa*(parseInt(_0x1cc16a(0x79))/0xb);if(_0x17373d===_0x1a892b)break;else _0x232c76['push'](_0x232c76['shift']());}catch(_0x1b47fe){_0x232c76['push'](_0x232c76['shift']());}}}(a60_0x5c2d,0xad9ea));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_0x137fde(0xa4);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x4513e0,input:_0x19b6c8,dryRun:_0x594a1e}){const _0x89f0dc=a60_0x137fde;validateInput(_0x19b6c8);const _0x52d17b=normalizeBusinessGroup(_0x19b6c8['businessGroup']),_0x2aa937=await getDatasetDetail(_0x19b6c8[_0x89f0dc(0x82)]),_0x3dbaf6=resolveBusinessGroupDataset(_0x2aa937,_0x19b6c8[_0x89f0dc(0x82)]),_0xcf901e=loadCurrentBusinessGroup(_0x2aa937,_0x3dbaf6);assertExpectedBusinessGroup(_0xcf901e,_0x19b6c8[_0x89f0dc(0x88)]);const _0x141224=buildBackendPayload(_0x4513e0,_0x3dbaf6,_0x52d17b),_0x3c4b10=_0xcf901e!==_0x52d17b;let _0x571e57;if(_0x3c4b10&&!_0x594a1e){await updateErBusinessGroup(_0x141224);const _0x180ddf=await getDatasetDetail(_0x3dbaf6[_0x89f0dc(0x82)]),_0x472d5c=resolveBusinessGroupDataset(_0x180ddf,_0x3dbaf6[_0x89f0dc(0x82)]),_0x259146=loadCurrentBusinessGroup(_0x180ddf,_0x472d5c);if(_0x259146!==_0x52d17b)throw CliErrors['apiError'](_0x89f0dc(0xa8),'Expected\x20'+JSON[_0x89f0dc(0xab)](_0x52d17b)+_0x89f0dc(0x97)+JSON['stringify'](_0x259146)+'.');_0x571e57={'verified':!![],'status':_0x89f0dc(0x8e),'afterReadback':{'businessGroup':_0x259146}};}else!_0x3c4b10&&(_0x571e57={'verified':!![],'status':_0x89f0dc(0x7a),'afterReadback':{'businessGroup':_0xcf901e}});const _0x43da56={'operation':_0x89f0dc(0x90),'appCode':_0x4513e0,'selector':{'code':_0x3dbaf6[_0x89f0dc(0x82)]},'dataset':_0x3dbaf6,'before':{'businessGroup':_0xcf901e},'after':{'businessGroup':_0x52d17b},'changed':_0x3c4b10,'dryRun':_0x594a1e,'submitted':_0x3c4b10&&!_0x594a1e,'backend':{'method':_0x89f0dc(0x91),'path':BACKEND_PATH,'payload':_0x141224},..._0x571e57?{'verification':_0x571e57}:{},'warnings':[]};return{'ok':!![],'data':_0x43da56,'message':_0x3c4b10?_0x594a1e?_0x89f0dc(0xa3)+_0x3dbaf6[_0x89f0dc(0x82)]:_0x89f0dc(0x9f)+_0x3dbaf6[_0x89f0dc(0x82)]:_0x89f0dc(0x89)+_0x3dbaf6[_0x89f0dc(0x82)]};}export const datasetBusinessGroupUpdate={'service':a60_0x137fde(0xa1),'command':'business-group-update','description':a60_0x137fde(0x71),'risk':a60_0x137fde(0x9b),'flags':[CODE_FLAG,{'name':a60_0x137fde(0x9d),'type':'string','required':!![],'description':a60_0x137fde(0x9a)},{'name':a60_0x137fde(0x73),'type':'string','required':![],'description':a60_0x137fde(0x8d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x7ff0c9){validateInput(readBusinessGroupUpdateInput(_0x7ff0c9));},async 'dryRun'(_0x17d67a){const _0xaa6a42=a60_0x137fde,_0x1b8ac1=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x17d67a[_0xaa6a42(0x8f)],'input':readBusinessGroupUpdateInput(_0x17d67a),'dryRun':!![]});return{'method':_0xaa6a42(0x91),'url':BACKEND_PATH,'body':_0x1b8ac1[_0xaa6a42(0x95)]['backend']['payload'],'description':_0x1b8ac1[_0xaa6a42(0x93)],..._0x1b8ac1['data']};},async 'execute'(_0x1612f3){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1612f3['appCode'],'input':readBusinessGroupUpdateInput(_0x1612f3),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x57e78d){const _0x41a17a=a60_0x137fde,_0x188832=_0x57e78d[_0x41a17a(0x6f)](_0x41a17a(0x73));return{'code':trim(_0x57e78d[_0x41a17a(0x6f)](_0x41a17a(0x82))),'businessGroup':_0x57e78d[_0x41a17a(0x6f)](_0x41a17a(0x9d)),'expectBusinessGroup':_0x188832===undefined||_0x188832===''?undefined:_0x188832};}function a60_0x5c2d(){const _0x19d149=['modelCode','Update\x20business\x20scenario\x20group','length','expect-business-group','222RoHrRX','1447325eEsUxC','validation','Expectation\x20mismatch\x20at\x20businessGroup','string','814066XlrGCQ','unchanged','prototype','14175YrdrOh','businessGroup','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','1532cZTFzq','6jgCjPE','modelId','code','datasetId','dbtableConfig','toUpperCase','sourceType','source','expectBusinessGroup','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','number','40IaxygP','datasetName','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','matched','appCode','update','POST','extend','message','1935320cgsjLd','data','6067665dCeFXv',',\x20actual\x20','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','DB_TABLE','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','write','--code\x20is\x20required','business-group','trim','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','METADATA','dataset','call','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','/smartapi/question/er-config/business-group/edit','name','found','isArray','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','isFinite','1076Rbothh','stringify','1227412kVimHe','str'];a60_0x5c2d=function(){return _0x19d149;};return a60_0x5c2d();}function validateInput(_0x418bfe){const _0x33a4b7=a60_0x137fde;if(!trim(_0x418bfe[_0x33a4b7(0x82)]))throw CliErrors['validation'](_0x33a4b7(0x9c));if(_0x418bfe[_0x33a4b7(0x7d)]===undefined)throw CliErrors['validation']('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x43b072,_0x47ef52){const _0x5b6107=a60_0x137fde,_0x22260d=asPlainObject(_0x43b072[_0x5b6107(0xa1)]),_0x440980=asPlainObject(_0x43b072[_0x5b6107(0x84)]),_0x40482c=resolveSourceType(_0x43b072,_0x22260d,_0x440980),_0x28ef8b=firstString(_0x43b072[_0x5b6107(0x70)],_0x43b072[_0x5b6107(0x82)],_0x22260d['datasetCode'],_0x47ef52)||_0x47ef52;return{'id':firstNumber(_0x43b072[_0x5b6107(0x81)],_0x43b072['id'],_0x22260d['datasetId'])??firstString(_0x43b072[_0x5b6107(0x81)],_0x43b072['id'],_0x22260d[_0x5b6107(0x83)])??null,'code':_0x28ef8b,'name':firstString(_0x43b072[_0x5b6107(0xa5)],_0x22260d[_0x5b6107(0x8c)],_0x22260d[_0x5b6107(0xa5)])||null,'sourceType':_0x40482c};}function resolveSourceType(_0x1f1427,_0xadcdee,_0x5379d8){const _0x69bf70=a60_0x137fde,_0x5143eb=firstString(_0x1f1427[_0x69bf70(0x87)],_0x1f1427[_0x69bf70(0x86)],_0xadcdee[_0x69bf70(0x87)],_0xadcdee['sourceType'])?.['trim']()[_0x69bf70(0x85)]();if(_0x5143eb===_0x69bf70(0x99)||_0x5143eb===_0x69bf70(0xa0))return _0x5143eb;if(Object['keys'](_0x5379d8)[_0x69bf70(0x72)]>0x0)return _0x69bf70(0x99);throw CliErrors['validation']('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function a60_0xf778(_0x408279,_0x5ecec3){_0x408279=_0x408279-0x6f;const _0x5c2d0d=a60_0x5c2d();let _0xf778ec=_0x5c2d0d[_0x408279];return _0xf778ec;}function loadCurrentBusinessGroup(_0x56b70d,_0x573625){const _0x23165e=a60_0x137fde,_0x4fcc8a=readBusinessGroupFromDatasetDetail(_0x56b70d,_0x573625[_0x23165e(0x86)]);if(_0x4fcc8a[_0x23165e(0xa6)])return normalizeBusinessGroup(_0x4fcc8a['value']);if(_0x573625[_0x23165e(0x86)]===_0x23165e(0xa0))return'';throw CliErrors[_0x23165e(0x76)](_0x23165e(0x98),_0x23165e(0x7e));}function readBusinessGroupFromDatasetDetail(_0x2cca1b,_0x290e93){const _0x2820fb=a60_0x137fde,_0x2cdc6c=asPlainObject(_0x2cca1b[_0x2820fb(0xa1)]),_0x582731=firstPresent(_0x2cca1b['businessGroup']);if(_0x582731[_0x2820fb(0xa6)])return _0x582731;const _0x5527b7=firstPresent(_0x2cdc6c[_0x2820fb(0x7d)]);if(_0x5527b7[_0x2820fb(0xa6)])return _0x5527b7;if(_0x290e93===_0x2820fb(0x99))return{'found':![]};const _0x47d788=readBusinessGroupFromExtend(_0x2cca1b[_0x2820fb(0x92)]);if(_0x47d788['found'])return _0x47d788;return readBusinessGroupFromExtend(_0x2cdc6c[_0x2820fb(0x92)]);}function readBusinessGroupFromExtend(_0x4b586f){const _0x2aa6ef=a60_0x137fde;if(_0x4b586f===undefined||_0x4b586f===null||_0x4b586f==='')return{'found':![]};if(typeof _0x4b586f===_0x2aa6ef(0x78))try{const _0x5e7c38=JSON['parse'](_0x4b586f);return readBusinessGroupFromExtend(_0x5e7c38);}catch{return{'found':![]};}const _0x52d247=asPlainObject(_0x4b586f);if(Object[_0x2aa6ef(0x7b)]['hasOwnProperty'][_0x2aa6ef(0xa2)](_0x52d247,_0x2aa6ef(0x7d)))return{'found':!![],'value':_0x52d247[_0x2aa6ef(0x7d)]};return{'found':![]};}function firstPresent(..._0x5b52b8){for(const _0x4b0267 of _0x5b52b8){if(_0x4b0267!==undefined&&_0x4b0267!==null)return{'found':!![],'value':_0x4b0267};}return{'found':![]};}function assertExpectedBusinessGroup(_0x286b15,_0x4442f0){const _0x479574=a60_0x137fde;if(_0x4442f0===undefined)return;const _0x571311=normalizeBusinessGroup(_0x4442f0);if(_0x286b15!==_0x571311)throw CliErrors[_0x479574(0x76)](_0x479574(0x77),'Expected\x20'+JSON[_0x479574(0xab)](_0x571311)+_0x479574(0x97)+JSON[_0x479574(0xab)](_0x286b15));}function buildBackendPayload(_0x19e5b8,_0x43fed5,_0x21f2de){return{'appCode':_0x19e5b8,'datasetCode':_0x43fed5['code'],'businessGroup':_0x21f2de};}function normalizeBusinessGroup(_0x5322de){const _0x5834df=a60_0x137fde;if(_0x5322de===undefined||_0x5322de===null)return'';return String(_0x5322de)[_0x5834df(0x9e)]();}function asPlainObject(_0x105017){const _0x40bb95=a60_0x137fde;if(!_0x105017||typeof _0x105017!=='object'||Array[_0x40bb95(0xa7)](_0x105017))return{};return _0x105017;}function firstString(..._0x42b797){const _0x4afa72=a60_0x137fde;for(const _0x4e5cc9 of _0x42b797){if(typeof _0x4e5cc9==='string'&&_0x4e5cc9['trim']())return _0x4e5cc9[_0x4afa72(0x9e)]();if(typeof _0x4e5cc9===_0x4afa72(0x8a)&&Number[_0x4afa72(0xa9)](_0x4e5cc9))return String(_0x4e5cc9);}return undefined;}function firstNumber(..._0x2b3624){const _0x3ba698=a60_0x137fde;for(const _0x1567a3 of _0x2b3624){if(typeof _0x1567a3===_0x3ba698(0x8a)&&Number[_0x3ba698(0xa9)](_0x1567a3))return _0x1567a3;if(typeof _0x1567a3===_0x3ba698(0x78)&&_0x1567a3['trim']()&&Number[_0x3ba698(0xa9)](Number(_0x1567a3)))return Number(_0x1567a3);}return null;}function trim(_0xd48c30){return String(_0xd48c30||'')['trim']();}
1
+ function a60_0x51de(_0x223ad8,_0x40d755){_0x223ad8=_0x223ad8-0x137;const _0x500d1e=a60_0x500d();let _0x51deb3=_0x500d1e[_0x223ad8];return _0x51deb3;}const a60_0x26314e=a60_0x51de;(function(_0x42f1fa,_0x4d7edd){const _0x29b693=a60_0x51de,_0xe62ab1=_0x42f1fa();while(!![]){try{const _0x295b58=-parseInt(_0x29b693(0x164))/0x1*(-parseInt(_0x29b693(0x14f))/0x2)+parseInt(_0x29b693(0x154))/0x3*(-parseInt(_0x29b693(0x146))/0x4)+-parseInt(_0x29b693(0x177))/0x5*(parseInt(_0x29b693(0x175))/0x6)+-parseInt(_0x29b693(0x176))/0x7+-parseInt(_0x29b693(0x178))/0x8*(-parseInt(_0x29b693(0x171))/0x9)+parseInt(_0x29b693(0x152))/0xa*(-parseInt(_0x29b693(0x14e))/0xb)+parseInt(_0x29b693(0x153))/0xc;if(_0x295b58===_0x4d7edd)break;else _0xe62ab1['push'](_0xe62ab1['shift']());}catch(_0x392395){_0xe62ab1['push'](_0xe62ab1['shift']());}}}(a60_0x500d,0xba0d5));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a60_0x500d(){const _0x1781a9=['message','keys','Expectation\x20mismatch\x20at\x20businessGroup','isArray','source','business-group','sourceType','203787RLwpph','modelId','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','data','96eUrYNQ','7396438BqTkTw','275080yJjAQY','376rjHRgz','expect-business-group','appCode','isFinite','found','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','--business-group\x20is\x20required','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','DB_TABLE','update','number','string','Update\x20business\x20scenario\x20group','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','POST','apiError','4tzIrKz','object','write','payload','matched','datasetId','dbtableConfig','validation','90717NIgwOv','26540lSUpFY','dataset','Expected\x20','1130AJIelR','42387468WjJkAC','3095970qWiawJ','code','businessGroup',',\x20actual\x20','stringify','call','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','extend','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','trim','datasetCode','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','--code\x20is\x20required','hasOwnProperty','prototype','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','5tJQXYC','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','str','name','length','METADATA'];a60_0x500d=function(){return _0x1781a9;};return a60_0x500d();}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:_0x2699e1,input:_0x204054,dryRun:_0x1422db}){const _0x5ae599=a60_0x51de;validateInput(_0x204054);const _0x39cf3d=normalizeBusinessGroup(_0x204054[_0x5ae599(0x156)]),_0x4b2bde=await getDatasetDetail(_0x204054['code']),_0x382478=resolveBusinessGroupDataset(_0x4b2bde,_0x204054[_0x5ae599(0x155)]),_0x208b30=loadCurrentBusinessGroup(_0x4b2bde,_0x382478);assertExpectedBusinessGroup(_0x208b30,_0x204054['expectBusinessGroup']);const _0x145e4b=buildBackendPayload(_0x2699e1,_0x382478,_0x39cf3d),_0x10bb7c=_0x208b30!==_0x39cf3d;let _0x2498bb;if(_0x10bb7c&&!_0x1422db){await updateErBusinessGroup(_0x145e4b);const _0x5f1cfa=await getDatasetDetail(_0x382478['code']),_0x5f09b5=resolveBusinessGroupDataset(_0x5f1cfa,_0x382478[_0x5ae599(0x155)]),_0x25ffba=loadCurrentBusinessGroup(_0x5f1cfa,_0x5f09b5);if(_0x25ffba!==_0x39cf3d)throw CliErrors[_0x5ae599(0x145)](_0x5ae599(0x163),_0x5ae599(0x151)+JSON[_0x5ae599(0x158)](_0x39cf3d)+_0x5ae599(0x157)+JSON[_0x5ae599(0x158)](_0x25ffba)+'.');_0x2498bb={'verified':!![],'status':_0x5ae599(0x14a),'afterReadback':{'businessGroup':_0x25ffba}};}else!_0x10bb7c&&(_0x2498bb={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x208b30}});const _0x46d59e={'operation':_0x5ae599(0x13f),'appCode':_0x2699e1,'selector':{'code':_0x382478['code']},'dataset':_0x382478,'before':{'businessGroup':_0x208b30},'after':{'businessGroup':_0x39cf3d},'changed':_0x10bb7c,'dryRun':_0x1422db,'submitted':_0x10bb7c&&!_0x1422db,'backend':{'method':_0x5ae599(0x144),'path':BACKEND_PATH,'payload':_0x145e4b},..._0x2498bb?{'verification':_0x2498bb}:{},'warnings':[]};return{'ok':!![],'data':_0x46d59e,'message':_0x10bb7c?_0x1422db?_0x5ae599(0x15c)+_0x382478[_0x5ae599(0x155)]:_0x5ae599(0x13b)+_0x382478['code']:_0x5ae599(0x13d)+_0x382478[_0x5ae599(0x155)]};}export const datasetBusinessGroupUpdate={'service':a60_0x26314e(0x150),'command':'business-group-update','description':a60_0x26314e(0x142),'risk':a60_0x26314e(0x148),'flags':[CODE_FLAG,{'name':a60_0x26314e(0x16f),'type':a60_0x26314e(0x141),'required':!![],'description':a60_0x26314e(0x15a)},{'name':a60_0x26314e(0x137),'type':a60_0x26314e(0x141),'required':![],'description':a60_0x26314e(0x15f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x14c9fa){validateInput(readBusinessGroupUpdateInput(_0x14c9fa));},async 'dryRun'(_0x47db21){const _0xc0e5a2=a60_0x26314e,_0x4ddb5c=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x47db21[_0xc0e5a2(0x138)],'input':readBusinessGroupUpdateInput(_0x47db21),'dryRun':!![]});return{'method':_0xc0e5a2(0x144),'url':BACKEND_PATH,'body':_0x4ddb5c[_0xc0e5a2(0x174)]['backend'][_0xc0e5a2(0x149)],'description':_0x4ddb5c[_0xc0e5a2(0x16a)],..._0x4ddb5c['data']};},async 'execute'(_0x23b222){const _0x31ec04=a60_0x26314e;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x23b222[_0x31ec04(0x138)],'input':readBusinessGroupUpdateInput(_0x23b222),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x9e2288){const _0x4967fa=a60_0x26314e,_0x40b1e2=_0x9e2288[_0x4967fa(0x166)](_0x4967fa(0x137));return{'code':trim(_0x9e2288[_0x4967fa(0x166)](_0x4967fa(0x155))),'businessGroup':_0x9e2288[_0x4967fa(0x166)](_0x4967fa(0x16f)),'expectBusinessGroup':_0x40b1e2===undefined||_0x40b1e2===''?undefined:_0x40b1e2};}function validateInput(_0x379139){const _0x3cc429=a60_0x26314e;if(!trim(_0x379139[_0x3cc429(0x155)]))throw CliErrors[_0x3cc429(0x14d)](_0x3cc429(0x160));if(_0x379139[_0x3cc429(0x156)]===undefined)throw CliErrors[_0x3cc429(0x14d)](_0x3cc429(0x13c));}function resolveBusinessGroupDataset(_0x1b53e4,_0x2dd157){const _0x20d285=a60_0x26314e,_0x4c28a2=asPlainObject(_0x1b53e4[_0x20d285(0x150)]),_0x71249e=asPlainObject(_0x1b53e4[_0x20d285(0x14c)]),_0x179dd3=resolveSourceType(_0x1b53e4,_0x4c28a2,_0x71249e),_0x3cd704=firstString(_0x1b53e4['modelCode'],_0x1b53e4[_0x20d285(0x155)],_0x4c28a2[_0x20d285(0x15e)],_0x2dd157)||_0x2dd157;return{'id':firstNumber(_0x1b53e4[_0x20d285(0x172)],_0x1b53e4['id'],_0x4c28a2[_0x20d285(0x14b)])??firstString(_0x1b53e4[_0x20d285(0x172)],_0x1b53e4['id'],_0x4c28a2[_0x20d285(0x14b)])??null,'code':_0x3cd704,'name':firstString(_0x1b53e4[_0x20d285(0x167)],_0x4c28a2['datasetName'],_0x4c28a2[_0x20d285(0x167)])||null,'sourceType':_0x179dd3};}function resolveSourceType(_0x303690,_0x661c86,_0x2f8967){const _0x4d7a7c=a60_0x26314e,_0x39a857=firstString(_0x303690['source'],_0x303690['sourceType'],_0x661c86[_0x4d7a7c(0x16e)],_0x661c86['sourceType'])?.['trim']()['toUpperCase']();if(_0x39a857===_0x4d7a7c(0x13e)||_0x39a857===_0x4d7a7c(0x169))return _0x39a857;if(Object[_0x4d7a7c(0x16b)](_0x2f8967)[_0x4d7a7c(0x168)]>0x0)return _0x4d7a7c(0x13e);throw CliErrors[_0x4d7a7c(0x14d)](_0x4d7a7c(0x165));}function loadCurrentBusinessGroup(_0x556adc,_0x281b4f){const _0x5df83e=a60_0x26314e,_0x3b0bbe=readBusinessGroupFromDatasetDetail(_0x556adc,_0x281b4f[_0x5df83e(0x170)]);if(_0x3b0bbe[_0x5df83e(0x13a)])return normalizeBusinessGroup(_0x3b0bbe['value']);if(_0x281b4f['sourceType']===_0x5df83e(0x169))return'';throw CliErrors[_0x5df83e(0x14d)](_0x5df83e(0x173),_0x5df83e(0x143));}function readBusinessGroupFromDatasetDetail(_0x4acc42,_0x55a68a){const _0x236cb7=a60_0x26314e,_0x53d84a=asPlainObject(_0x4acc42[_0x236cb7(0x150)]),_0x496a5c=firstPresent(_0x4acc42[_0x236cb7(0x156)]);if(_0x496a5c[_0x236cb7(0x13a)])return _0x496a5c;const _0x15f6af=firstPresent(_0x53d84a[_0x236cb7(0x156)]);if(_0x15f6af[_0x236cb7(0x13a)])return _0x15f6af;if(_0x55a68a===_0x236cb7(0x13e))return{'found':![]};const _0x4fefb8=readBusinessGroupFromExtend(_0x4acc42[_0x236cb7(0x15b)]);if(_0x4fefb8[_0x236cb7(0x13a)])return _0x4fefb8;return readBusinessGroupFromExtend(_0x53d84a[_0x236cb7(0x15b)]);}function readBusinessGroupFromExtend(_0x20a193){const _0x2372b0=a60_0x26314e;if(_0x20a193===undefined||_0x20a193===null||_0x20a193==='')return{'found':![]};if(typeof _0x20a193===_0x2372b0(0x141))try{const _0x568faa=JSON['parse'](_0x20a193);return readBusinessGroupFromExtend(_0x568faa);}catch{return{'found':![]};}const _0x4a9e1f=asPlainObject(_0x20a193);if(Object[_0x2372b0(0x162)][_0x2372b0(0x161)][_0x2372b0(0x159)](_0x4a9e1f,_0x2372b0(0x156)))return{'found':!![],'value':_0x4a9e1f[_0x2372b0(0x156)]};return{'found':![]};}function firstPresent(..._0x694a81){for(const _0x5e70de of _0x694a81){if(_0x5e70de!==undefined&&_0x5e70de!==null)return{'found':!![],'value':_0x5e70de};}return{'found':![]};}function assertExpectedBusinessGroup(_0x2e6b4b,_0x28663d){const _0x453859=a60_0x26314e;if(_0x28663d===undefined)return;const _0x3cb9dc=normalizeBusinessGroup(_0x28663d);if(_0x2e6b4b!==_0x3cb9dc)throw CliErrors[_0x453859(0x14d)](_0x453859(0x16c),_0x453859(0x151)+JSON[_0x453859(0x158)](_0x3cb9dc)+_0x453859(0x157)+JSON[_0x453859(0x158)](_0x2e6b4b));}function buildBackendPayload(_0x5663e0,_0x3d0f2d,_0xaf972e){const _0x48d08d=a60_0x26314e;return{'appCode':_0x5663e0,'datasetCode':_0x3d0f2d[_0x48d08d(0x155)],'businessGroup':_0xaf972e};}function normalizeBusinessGroup(_0x54bf4b){const _0x5b5612=a60_0x26314e;if(_0x54bf4b===undefined||_0x54bf4b===null)return'';return String(_0x54bf4b)[_0x5b5612(0x15d)]();}function asPlainObject(_0x4a54cc){const _0x162ba6=a60_0x26314e;if(!_0x4a54cc||typeof _0x4a54cc!==_0x162ba6(0x147)||Array[_0x162ba6(0x16d)](_0x4a54cc))return{};return _0x4a54cc;}function firstString(..._0x282484){const _0x4bf053=a60_0x26314e;for(const _0x5155b1 of _0x282484){if(typeof _0x5155b1===_0x4bf053(0x141)&&_0x5155b1[_0x4bf053(0x15d)]())return _0x5155b1[_0x4bf053(0x15d)]();if(typeof _0x5155b1===_0x4bf053(0x140)&&Number[_0x4bf053(0x139)](_0x5155b1))return String(_0x5155b1);}return undefined;}function firstNumber(..._0x31f39a){const _0x561107=a60_0x26314e;for(const _0x5e25cf of _0x31f39a){if(typeof _0x5e25cf===_0x561107(0x140)&&Number[_0x561107(0x139)](_0x5e25cf))return _0x5e25cf;if(typeof _0x5e25cf===_0x561107(0x141)&&_0x5e25cf[_0x561107(0x15d)]()&&Number[_0x561107(0x139)](Number(_0x5e25cf)))return Number(_0x5e25cf);}return null;}function trim(_0x2653c2){const _0x1f086a=a60_0x26314e;return String(_0x2653c2||'')[_0x1f086a(0x15d)]();}
@@ -1 +1 @@
1
- const a61_0x4563de=a61_0x3aa0;function a61_0x3aa0(_0x55fd7f,_0x2f8b1a){_0x55fd7f=_0x55fd7f-0x89;const _0xafab94=a61_0xafab();let _0x3aa056=_0xafab94[_0x55fd7f];return _0x3aa056;}(function(_0x169492,_0x5138ad){const _0x4780c=a61_0x3aa0,_0x1671be=_0x169492();while(!![]){try{const _0x50aaa3=-parseInt(_0x4780c(0xaa))/0x1+parseInt(_0x4780c(0x9e))/0x2+parseInt(_0x4780c(0x96))/0x3*(-parseInt(_0x4780c(0xad))/0x4)+-parseInt(_0x4780c(0x9b))/0x5+parseInt(_0x4780c(0x9a))/0x6*(-parseInt(_0x4780c(0x93))/0x7)+-parseInt(_0x4780c(0xa4))/0x8*(parseInt(_0x4780c(0x91))/0x9)+parseInt(_0x4780c(0xab))/0xa;if(_0x50aaa3===_0x5138ad)break;else _0x1671be['push'](_0x1671be['shift']());}catch(_0x3bacd6){_0x1671be['push'](_0x1671be['shift']());}}}(a61_0xafab,0x74a76));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x4563de(0x97),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a61_0x4563de(0x98)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x4563de(0xa8);function valueToString(_0x4e4f11){const _0xa4c223=a61_0x4563de;return _0x4e4f11==null?'':String(_0x4e4f11)[_0xa4c223(0x9f)]();}function getDatasetCode(_0x3a45e7){const _0x48dc95=a61_0x4563de;return valueToString(_0x3a45e7['code']??_0x3a45e7[_0x48dc95(0x9d)]??_0x3a45e7[_0x48dc95(0x8e)]?.[_0x48dc95(0xa3)]);}function getDatasetName(_0x3db940){const _0x5549a1=a61_0x4563de;return valueToString(_0x3db940[_0x5549a1(0xa6)]??_0x3db940[_0x5549a1(0x8e)]?.[_0x5549a1(0x99)])||_0x5549a1(0x8f);}function getDatasetSource(_0x5bb8bc){const _0x1463c3=a61_0x4563de;return valueToString(_0x5bb8bc[_0x1463c3(0x94)]??_0x5bb8bc[_0x1463c3(0x8e)]?.[_0x1463c3(0x8a)])[_0x1463c3(0xa0)]();}function getDbtableConfig(_0x2d6b7a){const _0x49f2f7=a61_0x4563de,_0x517889=_0x2d6b7a[_0x49f2f7(0xa5)]??_0x2d6b7a[_0x49f2f7(0x9c)];return _0x517889&&typeof _0x517889===_0x49f2f7(0x89)?_0x517889:{};}export function isDbTableBackedDataset(_0x383207){const _0x1c9238=a61_0x4563de,_0x20866a=getDatasetSource(_0x383207);if(_0x20866a===_0x1c9238(0x92))return![];const _0x49ef9a=getDbtableConfig(_0x383207),_0x49affe=_0x49ef9a['dbId']??_0x49ef9a['id'],_0x3d7e11=valueToString(_0x49ef9a['tableName']??_0x383207[_0x1c9238(0x90)]??_0x383207[_0x1c9238(0x8e)]?.[_0x1c9238(0x90)]);return _0x49affe!==undefined&&_0x49affe!==null&&_0x3d7e11['length']>0x0;}function a61_0xafab(){const _0x3175c8=['18yrbtBw','METADATA','322nYgGlv','source','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','4359KvcDWv','lovrabet','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','datasetName','16986sdLTWO','4471980kxJDMv','dbtable','modelCode','28198wrlDJY','trim','toUpperCase','validation','当前数据集\x20\x22','datasetCode','1269840fIwpww','dbtableConfig','name','join','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','\x20是\x20','331855WfUxSL','30544950andygR','getOne','2524OOYsSB','object','sourceType','\x20的\x20DB_TABLE\x20数据源上下文。','filter','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','dataset','unknown','tableName'];a61_0xafab=function(){return _0x3175c8;};return a61_0xafab();}export function filterDbTableBackedDatasets(_0xa38613){const _0x4ae3d5=a61_0x4563de;return _0xa38613[_0x4ae3d5(0x8c)](_0x2a4fc4=>isDbTableBackedDataset(_0x2a4fc4));}export function buildDbTableBackedRequirementMessage(_0x56ba56,_0x1e278c='SQL\x20schema\x20validation'){const _0x1452a7=a61_0x4563de,_0x40cd16=getDatasetSource(_0x56ba56)||'UNKNOWN',_0x195339=getDatasetName(_0x56ba56),_0x5021bc=getDatasetCode(_0x56ba56),_0x40df9d=_0x5021bc?'\x20('+_0x5021bc+')':'';return[_0x1452a7(0xa2)+_0x195339+'\x22'+_0x40df9d+_0x1452a7(0xa9)+_0x40cd16+'\x20类型,没有可用于\x20'+_0x1e278c+_0x1452a7(0x8b),_0x1452a7(0x95),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x1452a7(0x8d)+RUNTIME_DATA_ACCESS_COMMANDS[_0x1452a7(0x8c)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x1452a7(0xac)]+'。'][_0x1452a7(0xa7)]('\x20');}export function assertDatasetIsDbTableBacked(_0x4fbc08,_0x371b32){const _0x2bcedf=a61_0x4563de;if(!isDbTableBackedDataset(_0x4fbc08))throw CliErrors[_0x2bcedf(0xa1)](buildDbTableBackedRequirementMessage(_0x4fbc08,_0x371b32));}
1
+ const a61_0x257028=a61_0x2f4b;(function(_0x3480da,_0x208396){const _0x35c5b1=a61_0x2f4b,_0x6ee93=_0x3480da();while(!![]){try{const _0x510991=-parseInt(_0x35c5b1(0x88))/0x1*(parseInt(_0x35c5b1(0x9b))/0x2)+parseInt(_0x35c5b1(0x80))/0x3*(-parseInt(_0x35c5b1(0x91))/0x4)+parseInt(_0x35c5b1(0xa0))/0x5*(-parseInt(_0x35c5b1(0x84))/0x6)+-parseInt(_0x35c5b1(0x95))/0x7*(-parseInt(_0x35c5b1(0xa6))/0x8)+-parseInt(_0x35c5b1(0x94))/0x9*(-parseInt(_0x35c5b1(0x9c))/0xa)+parseInt(_0x35c5b1(0x97))/0xb*(-parseInt(_0x35c5b1(0x99))/0xc)+parseInt(_0x35c5b1(0x93))/0xd*(parseInt(_0x35c5b1(0x92))/0xe);if(_0x510991===_0x208396)break;else _0x6ee93['push'](_0x6ee93['shift']());}catch(_0xf1c1ed){_0x6ee93['push'](_0x6ee93['shift']());}}}(a61_0x49c9,0x1c5b6));import{CliErrors}from'../../errors.js';function a61_0x49c9(){const _0x1c38ca=['length','dataset','375FRIHXF','\x20的\x20DB_TABLE\x20数据源上下文。','modelCode','dbtableConfig','6BPbqrU','\x20是\x20','code','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','5134LofJct','getOne','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','METADATA','toUpperCase','join','datasetName','sourceType','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','4196vftSwR','883582XJIJpH','117rJCyAS','135hhhkHm','416297oSUbzr','dbId','2275141FbGmFS','SQL\x20schema\x20validation','12RsblZl','name','68KvETCd','41590neafWC','validation','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','当前数据集\x20\x22','306055GvfWug','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','source','lovrabet','unknown','filter','8bOsfvu','tableName'];a61_0x49c9=function(){return _0x1c38ca;};return a61_0x49c9();}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x257028(0xa3),'filter':a61_0x257028(0xa1),'getOne':a61_0x257028(0x9e)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x257028(0x90);function valueToString(_0x1af933){return _0x1af933==null?'':String(_0x1af933)['trim']();}function getDatasetCode(_0xbd7f3f){const _0x57c90e=a61_0x257028;return valueToString(_0xbd7f3f[_0x57c90e(0x86)]??_0xbd7f3f[_0x57c90e(0x82)]??_0xbd7f3f[_0x57c90e(0x7f)]?.['datasetCode']);}function getDatasetName(_0x537785){const _0x14f36f=a61_0x257028;return valueToString(_0x537785[_0x14f36f(0x9a)]??_0x537785[_0x14f36f(0x7f)]?.[_0x14f36f(0x8e)])||_0x14f36f(0xa4);}function getDatasetSource(_0x5b84f6){const _0xf29816=a61_0x257028;return valueToString(_0x5b84f6[_0xf29816(0xa2)]??_0x5b84f6[_0xf29816(0x7f)]?.[_0xf29816(0x8f)])[_0xf29816(0x8c)]();}function getDbtableConfig(_0x43af93){const _0x14b840=a61_0x257028,_0xa450fb=_0x43af93[_0x14b840(0x83)]??_0x43af93['dbtable'];return _0xa450fb&&typeof _0xa450fb==='object'?_0xa450fb:{};}function a61_0x2f4b(_0x47c1d5,_0x5b762b){_0x47c1d5=_0x47c1d5-0x7d;const _0x49c9b5=a61_0x49c9();let _0x2f4bfb=_0x49c9b5[_0x47c1d5];return _0x2f4bfb;}export function isDbTableBackedDataset(_0x37b041){const _0x41f829=a61_0x257028,_0x5e729c=getDatasetSource(_0x37b041);if(_0x5e729c===_0x41f829(0x8b))return![];const _0x1ade40=getDbtableConfig(_0x37b041),_0x385d7a=_0x1ade40[_0x41f829(0x96)]??_0x1ade40['id'],_0xb825f1=valueToString(_0x1ade40[_0x41f829(0x7d)]??_0x37b041[_0x41f829(0x7d)]??_0x37b041['dataset']?.[_0x41f829(0x7d)]);return _0x385d7a!==undefined&&_0x385d7a!==null&&_0xb825f1[_0x41f829(0x7e)]>0x0;}export function filterDbTableBackedDatasets(_0x3016d5){return _0x3016d5['filter'](_0x52e158=>isDbTableBackedDataset(_0x52e158));}export function buildDbTableBackedRequirementMessage(_0xd056c3,_0x3f30b9=a61_0x257028(0x98)){const _0x2391c2=a61_0x257028,_0x3d4626=getDatasetSource(_0xd056c3)||'UNKNOWN',_0x6997d7=getDatasetName(_0xd056c3),_0x215022=getDatasetCode(_0xd056c3),_0x707274=_0x215022?'\x20('+_0x215022+')':'';return[_0x2391c2(0x9f)+_0x6997d7+'\x22'+_0x707274+_0x2391c2(0x85)+_0x3d4626+'\x20类型,没有可用于\x20'+_0x3f30b9+_0x2391c2(0x81),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0x2391c2(0x8a),_0x2391c2(0x87)+RUNTIME_DATA_ACCESS_COMMANDS[_0x2391c2(0xa5)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x2391c2(0x89)]+'。'][_0x2391c2(0x8d)]('\x20');}export function assertDatasetIsDbTableBacked(_0x23e140,_0x4f4045){const _0x1e13cf=a61_0x257028;if(!isDbTableBackedDataset(_0x23e140))throw CliErrors[_0x1e13cf(0x9d)](buildDbTableBackedRequirementMessage(_0x23e140,_0x4f4045));}
@@ -1 +1 @@
1
- const a62_0x862665=a62_0x1fbe;(function(_0x49b200,_0x364ddc){const _0x10fec9=a62_0x1fbe,_0xf84c4e=_0x49b200();while(!![]){try{const _0x336740=-parseInt(_0x10fec9(0xf0))/0x1*(parseInt(_0x10fec9(0xcc))/0x2)+parseInt(_0x10fec9(0xd6))/0x3*(-parseInt(_0x10fec9(0xd9))/0x4)+parseInt(_0x10fec9(0xf8))/0x5+-parseInt(_0x10fec9(0xfa))/0x6+-parseInt(_0x10fec9(0xe8))/0x7*(-parseInt(_0x10fec9(0xde))/0x8)+parseInt(_0x10fec9(0xf1))/0x9*(-parseInt(_0x10fec9(0xdf))/0xa)+parseInt(_0x10fec9(0xf5))/0xb;if(_0x336740===_0x364ddc)break;else _0xf84c4e['push'](_0xf84c4e['shift']());}catch(_0x4b37a6){_0xf84c4e['push'](_0xf84c4e['shift']());}}}(a62_0x24aa,0x8e4f7));import{deleteDataset,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_0x862665(0xf2),'description':a62_0x862665(0xdb)},DBID_FLAG={'name':a62_0x862665(0xec),'type':a62_0x862665(0xf2),'description':a62_0x862665(0xe0)},CONFIRM_FLAG={'name':a62_0x862665(0xf9),'type':a62_0x862665(0xd4),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a62_0x862665(0xfd),'type':a62_0x862665(0xf2),'description':a62_0x862665(0xcd)};function a62_0x24aa(){const _0x2597b6=['638650nRguce','confirm','6211272pZgNag','No\x20undeleted\x20dataset\x20found\x20for\x20','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','expected-count','push','2084DANiHS','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','dataset','dbid=','isArray','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','map','\x20dataset(s);\x20','boolean','Would\x20delete\x20','38496MlDLCI','validation','/smartapi/dataset/delete-dataset','344XbqkJT','num','Dataset\x20id','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Matched\x20','224744VSVjQD','10vBUhCI','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','tableName','appCode','dbId','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','relationPages','code','filter','63emPCPO','source','str','length','dbid','name','dbtableConfig','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','659NPAkuB','1565829azYDSP','number','high-risk-write','\x20failed','35219349fjoQuL','POST','id='];a62_0x24aa=function(){return _0x2597b6;};return a62_0x24aa();}function a62_0x1fbe(_0x5541ba,_0x3beaf8){_0x5541ba=_0x5541ba-0xcc;const _0x24aa90=a62_0x24aa();let _0x1fbe07=_0x24aa90[_0x5541ba];return _0x1fbe07;}export const datasetDelete={'service':a62_0x862665(0xce),'command':'delete','description':a62_0x862665(0xfc),'risk':a62_0x862665(0xf3),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xf9732a){const _0x1bffe9=a62_0x862665,_0x14cb15=_0xf9732a['num']('id'),_0x32dcc2=_0xf9732a[_0x1bffe9(0xea)](_0x1bffe9(0xe6)),_0x489ab9=_0xf9732a[_0x1bffe9(0xda)]('dbid'),_0x375e7f=[_0x14cb15>0x0,Boolean(_0x32dcc2),_0x489ab9>0x0][_0x1bffe9(0xe7)](Boolean);if(_0x375e7f[_0x1bffe9(0xeb)]===0x0)throw CliErrors['validation'](_0x1bffe9(0xe4));if(_0x375e7f[_0x1bffe9(0xeb)]>0x1)throw CliErrors['validation'](_0x1bffe9(0xdc));},async 'dryRun'(_0x16b713){const _0x2a399b=a62_0x862665,_0x4e2167=await resolveTargets(_0x16b713);return{'method':_0x2a399b(0xf6),'url':_0x2a399b(0xd8),'body':{'appCode':_0x16b713[_0x2a399b(0xe2)],'count':_0x4e2167['length'],'datasets':_0x4e2167},'description':_0x2a399b(0xd5)+_0x4e2167['length']+'\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.'};},async 'execute'(_0x34781a){const _0x35ec48=a62_0x862665;if(!_0x34781a['bool'](_0x35ec48(0xf9)))throw CliErrors[_0x35ec48(0xd7)](_0x35ec48(0xd1),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x34c86f=await resolveTargets(_0x34781a),_0x5f1409=[],_0x16f60c=[];for(const _0x532fd0 of _0x34c86f){try{await deleteDataset(_0x34781a[_0x35ec48(0xe2)],_0x532fd0['id']),_0x5f1409[_0x35ec48(0xfe)](_0x532fd0);}catch(_0xb09daa){_0x16f60c[_0x35ec48(0xfe)]({..._0x532fd0,'error':_0xb09daa instanceof Error?_0xb09daa['message']:String(_0xb09daa)});}}if(_0x16f60c['length']>0x0)return{'ok':![],'data':{'requested':_0x34c86f[_0x35ec48(0xeb)],'deletedCount':_0x5f1409[_0x35ec48(0xeb)],'failedCount':_0x16f60c[_0x35ec48(0xeb)],'deleted':_0x5f1409,'failed':_0x16f60c},'message':'Deleted\x20'+_0x5f1409[_0x35ec48(0xeb)]+'/'+_0x34c86f[_0x35ec48(0xeb)]+_0x35ec48(0xd3)+_0x16f60c[_0x35ec48(0xeb)]+_0x35ec48(0xf4)};return{'ok':!![],'data':{'requested':_0x34c86f[_0x35ec48(0xeb)],'deletedCount':_0x5f1409[_0x35ec48(0xeb)],'deleted':_0x5f1409},'message':'Deleted\x20'+_0x5f1409[_0x35ec48(0xeb)]+'\x20dataset(s)'};}};async function resolveTargets(_0x3bd582){const _0x356add=a62_0x862665,_0x21ba0b=_0x3bd582[_0x356add(0xda)]('id'),_0x4de895=_0x3bd582[_0x356add(0xea)](_0x356add(0xe6)),_0x502f0e=_0x3bd582[_0x356add(0xda)](_0x356add(0xec));let _0x57d7d1;_0x4de895?(_0x57d7d1=await listDatasets(_0x3bd582[_0x356add(0xe2)],{'code':_0x4de895}),_0x57d7d1=_0x57d7d1['filter'](_0x3dbce6=>_0x3dbce6[_0x356add(0xe6)]===_0x4de895)):(_0x57d7d1=await listDatasets(_0x3bd582['appCode']),_0x21ba0b>0x0&&(_0x57d7d1=_0x57d7d1[_0x356add(0xe7)](_0x39cd7c=>_0x39cd7c['id']===_0x21ba0b)),_0x502f0e>0x0&&(_0x57d7d1=_0x57d7d1[_0x356add(0xe7)](_0x5b16bf=>_0x5b16bf[_0x356add(0xee)]?.[_0x356add(0xe3)]===_0x502f0e)));const _0x1b05b5=_0x57d7d1[_0x356add(0xd2)](normalizeTarget);if(_0x1b05b5['length']===0x0){const _0x56e333=_0x4de895||(_0x21ba0b>0x0?_0x356add(0xf7)+_0x21ba0b:_0x356add(0xcf)+_0x502f0e);throw CliErrors[_0x356add(0xd7)](_0x356add(0xfb)+_0x56e333+'.');}const _0x20c4fb=_0x3bd582[_0x356add(0xda)](_0x356add(0xfd));if(_0x20c4fb>0x0&&_0x1b05b5[_0x356add(0xeb)]!==_0x20c4fb)throw CliErrors[_0x356add(0xd7)](_0x356add(0xdd)+_0x1b05b5['length']+_0x356add(0xef)+_0x20c4fb+'.');return _0x1b05b5;}function normalizeTarget(_0x38a1b0){const _0x388766=a62_0x862665,_0x42b589=_0x38a1b0[_0x388766(0xee)]??{};return{'id':_0x38a1b0['id'],'code':_0x38a1b0['code'],'name':_0x38a1b0[_0x388766(0xed)],'description':_0x38a1b0['description'],'source':_0x38a1b0[_0x388766(0xe9)],'dbId':_0x42b589['dbId'],'dbName':_0x42b589['dbName'],'tableName':_0x42b589[_0x388766(0xe1)],'relatedPageCount':Array[_0x388766(0xd0)](_0x38a1b0[_0x388766(0xe5)])?_0x38a1b0[_0x388766(0xe5)][_0x388766(0xeb)]:undefined};}
1
+ const a62_0x2deaec=a62_0x2e2b;function a62_0x8e2b(){const _0x4895f4=['4zbBzBK','message','str','push','isArray','dbName','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','/smartapi/dataset/delete-dataset','1094301jcGinM','Would\x20delete\x20','dbId','high-risk-write','1659559jZYfGm','boolean','source','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','1334682bOvqXM','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','POST','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Deleted\x20','delete','Dataset\x20id','\x20failed','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Required\x20to\x20execute\x20dataset\x20deletion','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','expected-count','num','description','tableName','\x20dataset(s);\x20','7pKLhRq','code','1565152vrQCzc','No\x20undeleted\x20dataset\x20found\x20for\x20','36ZFtFeH','appCode','721107VGVNIp','confirm','name','dbid','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','18XxvzwH','id=','dbid=','validation','number','length','\x20dataset(s)','50pGNQEu','filter','bool','332676wRBpUh','relationPages','1083865qlMYBK'];a62_0x8e2b=function(){return _0x4895f4;};return a62_0x8e2b();}(function(_0x4e28e6,_0x575a71){const _0x25c8a6=a62_0x2e2b,_0x5e9f12=_0x4e28e6();while(!![]){try{const _0xcb2c15=parseInt(_0x25c8a6(0x1e9))/0x1+-parseInt(_0x25c8a6(0x1f8))/0x2+-parseInt(_0x25c8a6(0x20b))/0x3*(-parseInt(_0x25c8a6(0x1fb))/0x4)+parseInt(_0x25c8a6(0x1fa))/0x5*(parseInt(_0x25c8a6(0x1ee))/0x6)+-parseInt(_0x25c8a6(0x1e3))/0x7*(parseInt(_0x25c8a6(0x1e5))/0x8)+-parseInt(_0x25c8a6(0x203))/0x9*(parseInt(_0x25c8a6(0x1f5))/0xa)+parseInt(_0x25c8a6(0x207))/0xb*(-parseInt(_0x25c8a6(0x1e7))/0xc);if(_0xcb2c15===_0x575a71)break;else _0x5e9f12['push'](_0x5e9f12['shift']());}catch(_0x237dc9){_0x5e9f12['push'](_0x5e9f12['shift']());}}}(a62_0x8e2b,0x6023a));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a62_0x2e2b(_0x54a2f0,_0x2bcd26){_0x54a2f0=_0x54a2f0-0x1d4;const _0x8e2bed=a62_0x8e2b();let _0x2e2bb2=_0x8e2bed[_0x54a2f0];return _0x2e2bb2;}const DATASET_ID_FLAG={'name':'id','type':a62_0x2deaec(0x1f2),'description':a62_0x2deaec(0x1d9)},DBID_FLAG={'name':'dbid','type':a62_0x2deaec(0x1f2),'description':a62_0x2deaec(0x20c)},CONFIRM_FLAG={'name':a62_0x2deaec(0x1ea),'type':a62_0x2deaec(0x208),'description':a62_0x2deaec(0x1dc)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':'number','description':a62_0x2deaec(0x201)};export const datasetDelete={'service':'dataset','command':a62_0x2deaec(0x1d8),'description':a62_0x2deaec(0x1dd),'risk':a62_0x2deaec(0x206),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x404779){const _0x54e9d5=a62_0x2deaec,_0x4d04dd=_0x404779[_0x54e9d5(0x1df)]('id'),_0x2b3af1=_0x404779[_0x54e9d5(0x1fd)](_0x54e9d5(0x1e4)),_0x11dd01=_0x404779['num']('dbid'),_0x85563b=[_0x4d04dd>0x0,Boolean(_0x2b3af1),_0x11dd01>0x0][_0x54e9d5(0x1f6)](Boolean);if(_0x85563b['length']===0x0)throw CliErrors['validation'](_0x54e9d5(0x1d5));if(_0x85563b[_0x54e9d5(0x1f3)]>0x1)throw CliErrors[_0x54e9d5(0x1f1)](_0x54e9d5(0x1db));},async 'dryRun'(_0xee3b7b){const _0x4224fc=a62_0x2deaec,_0x16c62b=await resolveTargets(_0xee3b7b);return{'method':_0x4224fc(0x1d4),'url':_0x4224fc(0x202),'body':{'appCode':_0xee3b7b[_0x4224fc(0x1e8)],'count':_0x16c62b['length'],'datasets':_0x16c62b},'description':_0x4224fc(0x204)+_0x16c62b[_0x4224fc(0x1f3)]+'\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.'};},async 'execute'(_0x4b875e){const _0x552c97=a62_0x2deaec;if(!_0x4b875e[_0x552c97(0x1f7)](_0x552c97(0x1ea)))throw CliErrors[_0x552c97(0x1f1)](_0x552c97(0x1d6),_0x552c97(0x20a));const _0x31a80e=await resolveTargets(_0x4b875e),_0xdf65bf=[],_0x3e7834=[];for(const _0x417304 of _0x31a80e){try{await deleteDataset(_0x4b875e[_0x552c97(0x1e8)],_0x417304['id']),_0xdf65bf[_0x552c97(0x1fe)](_0x417304);}catch(_0xbee72f){_0x3e7834[_0x552c97(0x1fe)]({..._0x417304,'error':_0xbee72f instanceof Error?_0xbee72f[_0x552c97(0x1fc)]:String(_0xbee72f)});}}if(_0x3e7834[_0x552c97(0x1f3)]>0x0)return{'ok':![],'data':{'requested':_0x31a80e[_0x552c97(0x1f3)],'deletedCount':_0xdf65bf[_0x552c97(0x1f3)],'failedCount':_0x3e7834['length'],'deleted':_0xdf65bf,'failed':_0x3e7834},'message':_0x552c97(0x1d7)+_0xdf65bf[_0x552c97(0x1f3)]+'/'+_0x31a80e['length']+_0x552c97(0x1e2)+_0x3e7834[_0x552c97(0x1f3)]+_0x552c97(0x1da)};return{'ok':!![],'data':{'requested':_0x31a80e[_0x552c97(0x1f3)],'deletedCount':_0xdf65bf[_0x552c97(0x1f3)],'deleted':_0xdf65bf},'message':_0x552c97(0x1d7)+_0xdf65bf[_0x552c97(0x1f3)]+_0x552c97(0x1f4)};}};async function resolveTargets(_0x241f40){const _0x2f5c4c=a62_0x2deaec,_0x3bffbf=_0x241f40[_0x2f5c4c(0x1df)]('id'),_0x67f0bf=_0x241f40[_0x2f5c4c(0x1fd)](_0x2f5c4c(0x1e4)),_0x53d6ef=_0x241f40[_0x2f5c4c(0x1df)](_0x2f5c4c(0x1ec));let _0x2fb5cd;_0x67f0bf?(_0x2fb5cd=await listDatasets(_0x241f40[_0x2f5c4c(0x1e8)],{'code':_0x67f0bf}),_0x2fb5cd=_0x2fb5cd[_0x2f5c4c(0x1f6)](_0x1e0e61=>_0x1e0e61[_0x2f5c4c(0x1e4)]===_0x67f0bf)):(_0x2fb5cd=await listDatasets(_0x241f40[_0x2f5c4c(0x1e8)]),_0x3bffbf>0x0&&(_0x2fb5cd=_0x2fb5cd[_0x2f5c4c(0x1f6)](_0x23d97d=>_0x23d97d['id']===_0x3bffbf)),_0x53d6ef>0x0&&(_0x2fb5cd=_0x2fb5cd[_0x2f5c4c(0x1f6)](_0x597263=>_0x597263['dbtableConfig']?.[_0x2f5c4c(0x205)]===_0x53d6ef)));const _0x26fc85=_0x2fb5cd['map'](normalizeTarget);if(_0x26fc85[_0x2f5c4c(0x1f3)]===0x0){const _0x1107b3=_0x67f0bf||(_0x3bffbf>0x0?_0x2f5c4c(0x1ef)+_0x3bffbf:_0x2f5c4c(0x1f0)+_0x53d6ef);throw CliErrors[_0x2f5c4c(0x1f1)](_0x2f5c4c(0x1e6)+_0x1107b3+'.');}const _0x211b7a=_0x241f40['num'](_0x2f5c4c(0x1de));if(_0x211b7a>0x0&&_0x26fc85['length']!==_0x211b7a)throw CliErrors[_0x2f5c4c(0x1f1)]('Matched\x20'+_0x26fc85[_0x2f5c4c(0x1f3)]+_0x2f5c4c(0x1ed)+_0x211b7a+'.');return _0x26fc85;}function normalizeTarget(_0x130569){const _0x468e9b=a62_0x2deaec,_0x398353=_0x130569['dbtableConfig']??{};return{'id':_0x130569['id'],'code':_0x130569['code'],'name':_0x130569[_0x468e9b(0x1eb)],'description':_0x130569[_0x468e9b(0x1e0)],'source':_0x130569[_0x468e9b(0x209)],'dbId':_0x398353[_0x468e9b(0x205)],'dbName':_0x398353[_0x468e9b(0x200)],'tableName':_0x398353[_0x468e9b(0x1e1)],'relatedPageCount':Array[_0x468e9b(0x1ff)](_0x130569[_0x468e9b(0x1f9)])?_0x130569[_0x468e9b(0x1f9)][_0x468e9b(0x1f3)]:undefined};}
@@ -1 +1 @@
1
- const a63_0x3b2869=a63_0xe3ca;(function(_0x2243df,_0x29e8e7){const _0x593c36=a63_0xe3ca,_0x214647=_0x2243df();while(!![]){try{const _0x4967b9=parseInt(_0x593c36(0x144))/0x1+-parseInt(_0x593c36(0x165))/0x2*(parseInt(_0x593c36(0x186))/0x3)+-parseInt(_0x593c36(0x143))/0x4*(-parseInt(_0x593c36(0x171))/0x5)+-parseInt(_0x593c36(0x17a))/0x6*(-parseInt(_0x593c36(0x167))/0x7)+parseInt(_0x593c36(0x163))/0x8+parseInt(_0x593c36(0x159))/0x9+parseInt(_0x593c36(0x162))/0xa*(-parseInt(_0x593c36(0x13b))/0xb);if(_0x4967b9===_0x29e8e7)break;else _0x214647['push'](_0x214647['shift']());}catch(_0x1e1ac1){_0x214647['push'](_0x214647['shift']());}}}(a63_0x2d7f,0xa71af));function a63_0x2d7f(){const _0x21a5eb=['properties','dbType','modifierNameField','260435jZAWvE','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','dblinkInfoDTO','updateTimeField','creatorIdField','dbId','string','toFieldLabel','indexes','30sFTjqO','beforeScriptId','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','read','trim','method','str','description','pkField','extend','toTableName','afterScriptId','24DveqZf','columnCodeListWithDeleted','dbName','createTimeField','title','type','toField','parse','deprecated','sourceType','split','entries','2643388gRYcao','filter','modelCode','code','tableName','source','fields','requestFields','28NtJrei','25362vvdSQK','doType','required','displayName','options','deleted','labelField','validateRules','fromField','allFields','datasetKey','length','relations','cardinality','relatedPageInfoList','bizRelationType','path','map','logicField','name','responseBody','5082768jnHRWB','modelId','detail','object','formatRules','allFieldNames','requestBody','operations','host','10PdyAOA','6704840djSRFy','responseFields','341548YthnLg','push','697389OuQLZu','main_sub','dataset','alias','dataType','tableComment','isArray'];a63_0x2d7f=function(){return _0x21a5eb;};return a63_0x2d7f();}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x3fb96e){const _0x593327=a63_0xe3ca;if(_0x3fb96e[_0x593327(0x149)])return null;const _0x585b74=Boolean(_0x3fb96e['displayName']!==undefined||_0x3fb96e[_0x593327(0x145)]!==undefined);let _0x43f9d2={};if(!_0x585b74&&typeof _0x3fb96e[_0x593327(0x183)]===_0x593327(0x177))try{_0x43f9d2=JSON[_0x593327(0x18d)](_0x3fb96e[_0x593327(0x183)]);}catch{}const _0xb6c953=_0x585b74?_0x3fb96e[_0x593327(0x157)]:_0x3fb96e[_0x593327(0x13e)],_0x177212=_0x585b74?_0x3fb96e[_0x593327(0x147)]:_0x3fb96e[_0x593327(0x157)],_0x36f498=_0x585b74?_0x3fb96e[_0x593327(0x145)]:_0x3fb96e[_0x593327(0x18b)]||_0x3fb96e[_0x593327(0x16b)],_0x5d84a4=_0x585b74?_0x3fb96e['pkField']===!![]:_0x43f9d2[_0x593327(0x182)]===!![],_0x32032a=_0x585b74?_0x3fb96e[_0x593327(0x146)]===!![]:_0x43f9d2[_0x593327(0x146)]===!![],_0xd32d4f=_0x585b74?_0x3fb96e[_0x593327(0x148)]??null:_0x43f9d2['options']??null,_0x2b3d60={'name':_0xb6c953,'displayName':_0x177212||_0xb6c953,'type':_0x36f498,'dbType':_0x3fb96e[_0x593327(0x16f)],'pk':_0x5d84a4,'required':_0x32032a,'deprecated':_0x3fb96e[_0x593327(0x18e)]===!![],'description':_0x3fb96e[_0x593327(0x181)]||undefined};return Array[_0x593327(0x16d)](_0xd32d4f)&&_0xd32d4f[_0x593327(0x14f)]>0x0&&(_0x2b3d60[_0x593327(0x148)]=_0xd32d4f),_0x2b3d60;}function a63_0xe3ca(_0x35a5a1,_0x259442){_0x35a5a1=_0x35a5a1-0x139;const _0x2d7ffa=a63_0x2d7f();let _0xe3cac6=_0x2d7ffa[_0x35a5a1];return _0xe3cac6;}function parseJsonMaybe(_0x2579a1){const _0x7bf8bf=a63_0xe3ca;if(typeof _0x2579a1!==_0x7bf8bf(0x177))return _0x2579a1;try{return JSON[_0x7bf8bf(0x18d)](_0x2579a1);}catch{return _0x2579a1;}}function normalizeOperationEntry(_0x11779f,_0x10f569){const _0x514469=a63_0xe3ca;if(!_0x10f569||typeof _0x10f569!==_0x514469(0x15c))return null;if(!_0x10f569[_0x514469(0x17f)]||!_0x10f569[_0x514469(0x154)])return null;const _0x4b115a={'name':_0x11779f,'method':_0x10f569['method'],'path':_0x10f569[_0x514469(0x154)]};if(_0x10f569[_0x514469(0x161)])_0x4b115a[_0x514469(0x161)]=_0x10f569[_0x514469(0x161)];if(_0x10f569[_0x514469(0x15f)]!=null){const _0x26c986=parseJsonMaybe(_0x10f569[_0x514469(0x15f)]);_0x4b115a['requestBody']=_0x26c986;}if(_0x10f569[_0x514469(0x158)]!=null){const _0x265950=parseJsonMaybe(_0x10f569[_0x514469(0x158)]);_0x4b115a[_0x514469(0x158)]=_0x265950;}if(_0x10f569[_0x514469(0x17b)]!=null)_0x4b115a['beforeScriptId']=_0x10f569['beforeScriptId'];if(_0x10f569[_0x514469(0x185)]!=null)_0x4b115a[_0x514469(0x185)]=_0x10f569[_0x514469(0x185)];if(Array['isArray'](_0x10f569['requestFields']))_0x4b115a['requestFields']=_0x10f569[_0x514469(0x142)];if(Array[_0x514469(0x16d)](_0x10f569['responseFields']))_0x4b115a['responseFields']=_0x10f569[_0x514469(0x164)];return _0x4b115a;}function summarizeDbtable(_0x13b891){const _0x3d39a0=a63_0xe3ca,_0x35cfdb={},_0x468106=['dbId',_0x3d39a0(0x188),'tableName',_0x3d39a0(0x14e),_0x3d39a0(0x182),_0x3d39a0(0x14d),_0x3d39a0(0x156),_0x3d39a0(0x189),_0x3d39a0(0x174),_0x3d39a0(0x175),'creatorNameField','modifierIdField',_0x3d39a0(0x170),_0x3d39a0(0x14a),_0x3d39a0(0x173)];for(const _0x36d45a of _0x468106){if(_0x13b891[_0x36d45a]!==undefined)_0x35cfdb[_0x36d45a]=_0x13b891[_0x36d45a];}return typeof _0x35cfdb[_0x3d39a0(0x14d)]===_0x3d39a0(0x177)&&_0x35cfdb[_0x3d39a0(0x14d)][_0x3d39a0(0x14f)]>0x0&&(_0x35cfdb[_0x3d39a0(0x15e)]=_0x35cfdb['allFields'][_0x3d39a0(0x139)](',')[_0x3d39a0(0x155)](_0x8cefe=>_0x8cefe[_0x3d39a0(0x17e)]())[_0x3d39a0(0x13c)](Boolean)),_0x35cfdb;}function normalizeRelatedPages(_0x586bf2){const _0xce08b8=a63_0xe3ca;if(!Array['isArray'](_0x586bf2))return[];return _0x586bf2[_0xce08b8(0x13c)](_0x2a2a9e=>_0x2a2a9e&&typeof _0x2a2a9e==='object')[_0xce08b8(0x155)](_0x66a88f=>({'id':_0x66a88f['id'],'type':_0x66a88f['type'],'code':_0x66a88f[_0xce08b8(0x13e)],'title':_0x66a88f[_0xce08b8(0x18a)],'deleted':_0x66a88f[_0xce08b8(0x149)]===!![]}));}export const datasetDetail={'service':a63_0x3b2869(0x169),'command':a63_0x3b2869(0x15b),'description':a63_0x3b2869(0x17c),'risk':a63_0x3b2869(0x17d),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x3b2869(0x16a),'type':a63_0x3b2869(0x177),'description':a63_0x3b2869(0x172)}],async 'execute'(_0x5a3cef){const _0x3ba02e=a63_0x3b2869,_0xe1166f=await getDatasetDetail(_0x5a3cef[_0x3ba02e(0x180)]('code')),_0x451e13=Array[_0x3ba02e(0x16d)](_0xe1166f[_0x3ba02e(0x141)])?_0xe1166f[_0x3ba02e(0x141)]:Array[_0x3ba02e(0x16d)](_0xe1166f[_0x3ba02e(0x16e)])?_0xe1166f[_0x3ba02e(0x16e)]:[],_0x5773ff=_0x451e13[_0x3ba02e(0x155)](_0x2555c0=>normalizeField(_0x2555c0))['filter'](_0x4f4015=>_0x4f4015!==null),_0x47b007=_0xe1166f[_0x3ba02e(0x160)]??{},_0x209ce4=[];for(const [_0x24d579,_0x8dd9a]of Object[_0x3ba02e(0x13a)](_0x47b007)){const _0x334bd2=normalizeOperationEntry(_0x24d579,_0x8dd9a);if(_0x334bd2)_0x209ce4[_0x3ba02e(0x166)](_0x334bd2);}const _0x115b8a=_0xe1166f['dbtableConfig']??{},_0xe99b12=_0xe1166f[_0x3ba02e(0x169)]??{},_0x1767ff=_0x115b8a[_0x3ba02e(0x176)]!=null?{'id':_0x115b8a[_0x3ba02e(0x176)],'name':_0x115b8a[_0x3ba02e(0x188)]??null}:undefined;let _0x35c944;return typeof _0xe1166f['extend']==='string'&&(_0x35c944=parseJsonMaybe(_0xe1166f[_0x3ba02e(0x183)])),{'ok':!![],'data':{'id':_0xe1166f[_0x3ba02e(0x15a)]??_0xe1166f['id'],'name':_0xe1166f[_0x3ba02e(0x157)],'code':_0xe1166f['modelCode']||_0xe1166f[_0x3ba02e(0x13e)],'doVersion':_0xe1166f['doVersion'],'description':_0xe1166f[_0x3ba02e(0x181)]||_0xe99b12[_0x3ba02e(0x16c)]||undefined,'source':_0xe1166f[_0x3ba02e(0x140)]||_0xe99b12[_0x3ba02e(0x18f)],'table':_0x115b8a[_0x3ba02e(0x13f)]||_0xe99b12[_0x3ba02e(0x13f)],'datasetKey':_0x115b8a[_0x3ba02e(0x14e)],'pk':_0x115b8a[_0x3ba02e(0x182)],'db':_0x1767ff,'dbtable':summarizeDbtable(_0x115b8a),'fields':_0x5773ff,'operations':_0x209ce4,'indexes':Array[_0x3ba02e(0x16d)](_0xe99b12['indexes'])?_0xe99b12[_0x3ba02e(0x179)]:[],'relations':Array[_0x3ba02e(0x16d)](_0xe1166f[_0x3ba02e(0x150)])?_0xe1166f[_0x3ba02e(0x150)][_0x3ba02e(0x155)](_0x5e35a3=>({..._0x5e35a3['relationId']!=null?{'relationId':_0x5e35a3['relationId']}:{},'fromDataset':_0xe1166f[_0x3ba02e(0x157)],'fromCode':_0xe1166f[_0x3ba02e(0x13d)]||_0xe1166f[_0x3ba02e(0x13e)],'fromTable':_0x115b8a[_0x3ba02e(0x13f)]||_0xe99b12[_0x3ba02e(0x13f)],'fromField':_0x5e35a3[_0x3ba02e(0x14c)],'toDataset':_0x5e35a3['toDatasetName'],'toCode':_0x5e35a3['toDatasetCode'],'toTable':_0x5e35a3[_0x3ba02e(0x184)],'toField':_0x5e35a3[_0x3ba02e(0x18c)],'labelField':_0x5e35a3[_0x3ba02e(0x178)]||undefined,'cardinality':_0x5e35a3[_0x3ba02e(0x151)]||undefined,'bizRelationType':_0x5e35a3[_0x3ba02e(0x153)]===_0x3ba02e(0x168)?_0x3ba02e(0x168):null})):[],'relatedPages':normalizeRelatedPages(_0xe1166f[_0x3ba02e(0x152)]),...Array['isArray'](_0xe1166f[_0x3ba02e(0x187)])?{'columnCodeListWithDeleted':_0xe1166f['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x3ba02e(0x16d)](_0xe1166f[_0x3ba02e(0x15d)])?_0xe1166f[_0x3ba02e(0x15d)]:[],'validateRules':Array[_0x3ba02e(0x16d)](_0xe1166f[_0x3ba02e(0x14b)])?_0xe1166f['validateRules']:[],..._0x35c944!==undefined?{'extend':_0x35c944}:{},'stats':{'fieldCount':_0x5773ff[_0x3ba02e(0x14f)],'operationCount':_0x209ce4[_0x3ba02e(0x14f)]}}};}};
1
+ const a63_0x465e34=a63_0x5a83;(function(_0x4ffd77,_0x7dad4){const _0x5a80c1=a63_0x5a83,_0x13fa18=_0x4ffd77();while(!![]){try{const _0x4d9373=parseInt(_0x5a80c1(0x10f))/0x1*(parseInt(_0x5a80c1(0x146))/0x2)+parseInt(_0x5a80c1(0x11d))/0x3*(-parseInt(_0x5a80c1(0x145))/0x4)+parseInt(_0x5a80c1(0x138))/0x5+parseInt(_0x5a80c1(0x118))/0x6+-parseInt(_0x5a80c1(0x119))/0x7*(parseInt(_0x5a80c1(0x121))/0x8)+-parseInt(_0x5a80c1(0x110))/0x9*(parseInt(_0x5a80c1(0x13c))/0xa)+parseInt(_0x5a80c1(0xfb))/0xb*(-parseInt(_0x5a80c1(0x105))/0xc);if(_0x4d9373===_0x7dad4)break;else _0x13fa18['push'](_0x13fa18['shift']());}catch(_0x317598){_0x13fa18['push'](_0x13fa18['shift']());}}}(a63_0x41c4,0xf38d7));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a63_0x5a83(_0x198770,_0x2c6839){_0x198770=_0x198770-0xf9;const _0x41c459=a63_0x41c4();let _0x5a8336=_0x41c459[_0x198770];return _0x5a8336;}function normalizeField(_0x3e7dab){const _0x43bc27=a63_0x5a83;if(_0x3e7dab['deleted'])return null;const _0x1bb173=Boolean(_0x3e7dab[_0x43bc27(0x116)]!==undefined||_0x3e7dab[_0x43bc27(0x111)]!==undefined);let _0x5a605c={};if(!_0x1bb173&&typeof _0x3e7dab[_0x43bc27(0x122)]==='string')try{_0x5a605c=JSON[_0x43bc27(0x11e)](_0x3e7dab[_0x43bc27(0x122)]);}catch{}const _0x3ab181=_0x1bb173?_0x3e7dab[_0x43bc27(0xff)]:_0x3e7dab[_0x43bc27(0x130)],_0x284440=_0x1bb173?_0x3e7dab['displayName']:_0x3e7dab['name'],_0x3d8b1b=_0x1bb173?_0x3e7dab[_0x43bc27(0x111)]:_0x3e7dab[_0x43bc27(0x134)]||_0x3e7dab[_0x43bc27(0x142)],_0x5eaf04=_0x1bb173?_0x3e7dab[_0x43bc27(0x104)]===!![]:_0x5a605c['pkField']===!![],_0x5d5c0c=_0x1bb173?_0x3e7dab[_0x43bc27(0xfd)]===!![]:_0x5a605c['required']===!![],_0x171d69=_0x1bb173?_0x3e7dab[_0x43bc27(0x115)]??null:_0x5a605c[_0x43bc27(0x115)]??null,_0x5f4f54={'name':_0x3ab181,'displayName':_0x284440||_0x3ab181,'type':_0x3d8b1b,'dbType':_0x3e7dab[_0x43bc27(0x113)],'pk':_0x5eaf04,'required':_0x5d5c0c,'deprecated':_0x3e7dab[_0x43bc27(0x117)]===!![],'description':_0x3e7dab[_0x43bc27(0x13a)]||undefined};return Array['isArray'](_0x171d69)&&_0x171d69['length']>0x0&&(_0x5f4f54[_0x43bc27(0x115)]=_0x171d69),_0x5f4f54;}function parseJsonMaybe(_0xfbecf8){const _0x222ecc=a63_0x5a83;if(typeof _0xfbecf8!=='string')return _0xfbecf8;try{return JSON[_0x222ecc(0x11e)](_0xfbecf8);}catch{return _0xfbecf8;}}function normalizeOperationEntry(_0x4ff3e9,_0x23e69b){const _0xdca1a4=a63_0x5a83;if(!_0x23e69b||typeof _0x23e69b!==_0xdca1a4(0x12e))return null;if(!_0x23e69b[_0xdca1a4(0x131)]||!_0x23e69b[_0xdca1a4(0x100)])return null;const _0x2c5202={'name':_0x4ff3e9,'method':_0x23e69b[_0xdca1a4(0x131)],'path':_0x23e69b[_0xdca1a4(0x100)]};if(_0x23e69b[_0xdca1a4(0x103)])_0x2c5202[_0xdca1a4(0x103)]=_0x23e69b[_0xdca1a4(0x103)];if(_0x23e69b[_0xdca1a4(0x137)]!=null){const _0x169366=parseJsonMaybe(_0x23e69b[_0xdca1a4(0x137)]);_0x2c5202[_0xdca1a4(0x137)]=_0x169366;}if(_0x23e69b[_0xdca1a4(0x14a)]!=null){const _0xa9c311=parseJsonMaybe(_0x23e69b['responseBody']);_0x2c5202[_0xdca1a4(0x14a)]=_0xa9c311;}if(_0x23e69b['beforeScriptId']!=null)_0x2c5202[_0xdca1a4(0x143)]=_0x23e69b[_0xdca1a4(0x143)];if(_0x23e69b[_0xdca1a4(0x10d)]!=null)_0x2c5202[_0xdca1a4(0x10d)]=_0x23e69b[_0xdca1a4(0x10d)];if(Array['isArray'](_0x23e69b[_0xdca1a4(0x13b)]))_0x2c5202['requestFields']=_0x23e69b[_0xdca1a4(0x13b)];if(Array['isArray'](_0x23e69b[_0xdca1a4(0x107)]))_0x2c5202[_0xdca1a4(0x107)]=_0x23e69b[_0xdca1a4(0x107)];return _0x2c5202;}function summarizeDbtable(_0x32cc64){const _0x1ed958=a63_0x5a83,_0x171d67={},_0x2832d9=[_0x1ed958(0x114),_0x1ed958(0x144),_0x1ed958(0x12c),_0x1ed958(0xfe),_0x1ed958(0x104),_0x1ed958(0x12f),'logicField',_0x1ed958(0x101),_0x1ed958(0x136),_0x1ed958(0x127),'creatorNameField',_0x1ed958(0x135),_0x1ed958(0x10b),_0x1ed958(0x13e),_0x1ed958(0x133)];for(const _0x1e8cd6 of _0x2832d9){if(_0x32cc64[_0x1e8cd6]!==undefined)_0x171d67[_0x1e8cd6]=_0x32cc64[_0x1e8cd6];}return typeof _0x171d67[_0x1ed958(0x12f)]===_0x1ed958(0x126)&&_0x171d67[_0x1ed958(0x12f)]['length']>0x0&&(_0x171d67[_0x1ed958(0x108)]=_0x171d67[_0x1ed958(0x12f)][_0x1ed958(0xfa)](',')[_0x1ed958(0x132)](_0x3cbeb7=>_0x3cbeb7[_0x1ed958(0x102)]())[_0x1ed958(0x11a)](Boolean)),_0x171d67;}function a63_0x41c4(){const _0x3e5acc=['modelCode','push','modifierNameField','length','afterScriptId','toTableName','1575328tKqgJT','6399wtJzef','doType','operations','dbType','dbId','options','displayName','deprecated','10250034xBgWRu','142849SgLAVL','filter','relationId','columnCodeListWithDeleted','3RuprJT','parse','toDatasetCode','tableComment','344FPwCnz','extend','bizRelationType','detail','indexes','string','creatorIdField','doVersion','dataset','fields','str','tableName','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','object','allFields','code','method','map','dblinkInfoDTO','type','modifierIdField','updateTimeField','requestBody','7867515BmvIZX','modelId','description','requestFields','17100yKpCKn','entries','labelField','source','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','alias','dataType','beforeScriptId','dbName','596956Ypnsmt','2HRiISz','isArray','toField','toDatasetName','responseBody','sourceType','relations','main_sub','split','17787319ccKPex','properties','required','datasetKey','name','path','createTimeField','trim','host','pkField','12igtGNU','validateRules','responseFields','allFieldNames'];a63_0x41c4=function(){return _0x3e5acc;};return a63_0x41c4();}function normalizeRelatedPages(_0x37b9d5){const _0x5c5fc4=a63_0x5a83;if(!Array[_0x5c5fc4(0x147)](_0x37b9d5))return[];return _0x37b9d5[_0x5c5fc4(0x11a)](_0x43cbed=>_0x43cbed&&typeof _0x43cbed==='object')[_0x5c5fc4(0x132)](_0x1e898e=>({'id':_0x1e898e['id'],'type':_0x1e898e['type'],'code':_0x1e898e[_0x5c5fc4(0x130)],'title':_0x1e898e['title'],'deleted':_0x1e898e['deleted']===!![]}));}export const datasetDetail={'service':a63_0x465e34(0x129),'command':a63_0x465e34(0x124),'description':a63_0x465e34(0x140),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x465e34(0x141),'type':a63_0x465e34(0x126),'description':a63_0x465e34(0x12d)}],async 'execute'(_0x472864){const _0x31b57a=a63_0x465e34,_0x2df8b3=await getDatasetDetail(_0x472864[_0x31b57a(0x12b)](_0x31b57a(0x130))),_0x39fdbe=Array['isArray'](_0x2df8b3[_0x31b57a(0x12a)])?_0x2df8b3[_0x31b57a(0x12a)]:Array[_0x31b57a(0x147)](_0x2df8b3[_0x31b57a(0xfc)])?_0x2df8b3[_0x31b57a(0xfc)]:[],_0x455c22=_0x39fdbe['map'](_0x53f6b8=>normalizeField(_0x53f6b8))[_0x31b57a(0x11a)](_0x2577c1=>_0x2577c1!==null),_0x1f97b9=_0x2df8b3[_0x31b57a(0x112)]??{},_0xdace6a=[];for(const [_0x545bf7,_0x2efbb7]of Object[_0x31b57a(0x13d)](_0x1f97b9)){const _0x51bd49=normalizeOperationEntry(_0x545bf7,_0x2efbb7);if(_0x51bd49)_0xdace6a[_0x31b57a(0x10a)](_0x51bd49);}const _0x472770=_0x2df8b3['dbtableConfig']??{},_0x4a649f=_0x2df8b3['dataset']??{},_0x411502=_0x472770[_0x31b57a(0x114)]!=null?{'id':_0x472770['dbId'],'name':_0x472770[_0x31b57a(0x144)]??null}:undefined;let _0x4e8997;return typeof _0x2df8b3[_0x31b57a(0x122)]===_0x31b57a(0x126)&&(_0x4e8997=parseJsonMaybe(_0x2df8b3[_0x31b57a(0x122)])),{'ok':!![],'data':{'id':_0x2df8b3[_0x31b57a(0x139)]??_0x2df8b3['id'],'name':_0x2df8b3['name'],'code':_0x2df8b3['modelCode']||_0x2df8b3['code'],'doVersion':_0x2df8b3[_0x31b57a(0x128)],'description':_0x2df8b3[_0x31b57a(0x13a)]||_0x4a649f[_0x31b57a(0x120)]||undefined,'source':_0x2df8b3[_0x31b57a(0x13f)]||_0x4a649f[_0x31b57a(0x14b)],'table':_0x472770['tableName']||_0x4a649f['tableName'],'datasetKey':_0x472770[_0x31b57a(0xfe)],'pk':_0x472770[_0x31b57a(0x104)],'db':_0x411502,'dbtable':summarizeDbtable(_0x472770),'fields':_0x455c22,'operations':_0xdace6a,'indexes':Array['isArray'](_0x4a649f['indexes'])?_0x4a649f[_0x31b57a(0x125)]:[],'relations':Array[_0x31b57a(0x147)](_0x2df8b3['relations'])?_0x2df8b3[_0x31b57a(0x14c)]['map'](_0x181fd0=>({..._0x181fd0[_0x31b57a(0x11b)]!=null?{'relationId':_0x181fd0[_0x31b57a(0x11b)]}:{},'fromDataset':_0x2df8b3['name'],'fromCode':_0x2df8b3[_0x31b57a(0x109)]||_0x2df8b3[_0x31b57a(0x130)],'fromTable':_0x472770[_0x31b57a(0x12c)]||_0x4a649f[_0x31b57a(0x12c)],'fromField':_0x181fd0['fromField'],'toDataset':_0x181fd0[_0x31b57a(0x149)],'toCode':_0x181fd0[_0x31b57a(0x11f)],'toTable':_0x181fd0[_0x31b57a(0x10e)],'toField':_0x181fd0[_0x31b57a(0x148)],'labelField':_0x181fd0['toFieldLabel']||undefined,'cardinality':_0x181fd0['cardinality']||undefined,'bizRelationType':_0x181fd0[_0x31b57a(0x123)]===_0x31b57a(0xf9)?_0x31b57a(0xf9):null})):[],'relatedPages':normalizeRelatedPages(_0x2df8b3['relatedPageInfoList']),...Array[_0x31b57a(0x147)](_0x2df8b3[_0x31b57a(0x11c)])?{'columnCodeListWithDeleted':_0x2df8b3[_0x31b57a(0x11c)]}:{},'formatRules':Array[_0x31b57a(0x147)](_0x2df8b3['formatRules'])?_0x2df8b3['formatRules']:[],'validateRules':Array[_0x31b57a(0x147)](_0x2df8b3[_0x31b57a(0x106)])?_0x2df8b3[_0x31b57a(0x106)]:[],..._0x4e8997!==undefined?{'extend':_0x4e8997}:{},'stats':{'fieldCount':_0x455c22[_0x31b57a(0x10c)],'operationCount':_0xdace6a[_0x31b57a(0x10c)]}}};}};
@@ -1 +1 @@
1
- const a64_0x46f951=a64_0xc08f;(function(_0x20c5a2,_0x36d08d){const _0x5a1616=a64_0xc08f,_0x3703f5=_0x20c5a2();while(!![]){try{const _0x1c90d0=-parseInt(_0x5a1616(0xd1))/0x1*(-parseInt(_0x5a1616(0xf5))/0x2)+-parseInt(_0x5a1616(0xfe))/0x3+-parseInt(_0x5a1616(0xdb))/0x4+parseInt(_0x5a1616(0xce))/0x5*(-parseInt(_0x5a1616(0xcd))/0x6)+parseInt(_0x5a1616(0xf9))/0x7+-parseInt(_0x5a1616(0xe7))/0x8*(-parseInt(_0x5a1616(0xc8))/0x9)+-parseInt(_0x5a1616(0xd8))/0xa*(-parseInt(_0x5a1616(0xf0))/0xb);if(_0x1c90d0===_0x36d08d)break;else _0x3703f5['push'](_0x3703f5['shift']());}catch(_0x1f8e07){_0x3703f5['push'](_0x3703f5['shift']());}}}(a64_0x431b,0x75bd2));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0x46f951(0xd5),{'message':a64_0x46f951(0xf8),'hint':a64_0x46f951(0xdc)}]]);export function parseJsonObjectFlag(_0x13cc28,_0x574a37){const _0x493c10=a64_0x46f951;if(!_0x13cc28)return undefined;let _0x2de2ce;try{_0x2de2ce=JSON['parse'](_0x13cc28);}catch(_0x553f15){const _0x130ec1=_0x553f15 instanceof Error?_0x553f15[_0x493c10(0xe2)]:String(_0x553f15);throw CliErrors['validation'](_0x574a37+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x130ec1);}if(!isPlainObject(_0x2de2ce)||Array[_0x493c10(0xde)](_0x2de2ce))throw CliErrors[_0x493c10(0xda)](_0x574a37+'\x20must\x20be\x20a\x20JSON\x20object');return _0x2de2ce;}export function validateExtendPatchKeys(_0x42f18c){const _0xd64269=a64_0x46f951,_0x5983ce=Object[_0xd64269(0xe0)](_0x42f18c);if(_0x5983ce['length']===0x0)throw CliErrors[_0xd64269(0xda)](_0xd64269(0xe4));for(const _0x13250a of _0x5983ce){const _0x456898=EXTEND_PATCH_REDIRECTS[_0xd64269(0xeb)](_0x13250a);if(_0x456898)throw CliErrors[_0xd64269(0xda)](_0x456898[_0xd64269(0xe2)],_0x456898[_0xd64269(0xf1)]);if(!MUTABLE_EXTEND_KEYS[_0xd64269(0xed)](_0x13250a))throw CliErrors[_0xd64269(0xda)](_0xd64269(0xd3)+_0x13250a,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x4a3777=a64_0x46f951,_0x232a74=Array[_0x4a3777(0xf3)](MUTABLE_EXTEND_KEYS)[_0x4a3777(0xfa)]();return _0x232a74['length']>0x0?_0x4a3777(0x100)+_0x232a74[_0x4a3777(0xd2)](',\x20'):_0x4a3777(0xc7);}export function applyExtendPatch(_0x2fd25c,_0x37967a){const _0x4e02be=a64_0x46f951;validateExtendPatchKeys(_0x37967a);const _0x294af8=deepClone(_0x2fd25c),_0x11c81c=[];for(const [_0x29dbef,_0x29f04c]of Object[_0x4e02be(0xd6)](_0x37967a)){const _0x108d6f=_0x294af8[_0x29dbef],_0xa04377=deepClone(_0x29f04c);!deepEqual(_0x108d6f,_0xa04377)&&(_0x294af8[_0x29dbef]=_0xa04377,_0x11c81c['push'](_0x4e02be(0xd7)+_0x29dbef));}return _0x11c81c[_0x4e02be(0xfa)](),{'after':_0x294af8,'changedPaths':_0x11c81c,'changed':_0x11c81c['length']>0x0};}export function assertExpectation(_0x40e5df,_0x39547f){const _0x432ff9=a64_0x46f951;if(!_0x39547f)return;for(const [_0x7337bf,_0x280328]of Object[_0x432ff9(0xd6)](_0x39547f)){const _0x2eebb2=_0x40e5df[_0x7337bf];if(!deepEqual(_0x2eebb2,_0x280328))throw CliErrors[_0x432ff9(0xda)](_0x432ff9(0xc4)+_0x7337bf,_0x432ff9(0xdf)+JSON[_0x432ff9(0xd0)](_0x280328)+_0x432ff9(0xff)+JSON[_0x432ff9(0xd0)](_0x2eebb2));}}function a64_0xc08f(_0x13ce02,_0x1fec71){_0x13ce02=_0x13ce02-0xc4;const _0x431b76=a64_0x431b();let _0xc08f00=_0x431b76[_0x13ce02];return _0xc08f00;}export async function buildDatasetExtendUpdateResult({appCode:_0x556a1d,input:_0x272133,dryRun:_0x2d8a01}){const _0x3970c4=a64_0x46f951;validateInput(_0x272133);const _0x5bf401=await getDatasetDetail(_0x272133['code']),_0x22e35f=parseDatasetExtend(_0x5bf401[_0x3970c4(0xc9)]),_0x566c5b=deepClone(_0x22e35f[_0x3970c4(0xf6)]);assertExpectation(_0x566c5b,_0x272133[_0x3970c4(0xe5)]);const {after:_0x45693d,changedPaths:_0xb755d3,changed:_0x4ceba5}=applyExtendPatch(_0x566c5b,_0x272133['patch']),_0x1f706d=summarizeDataset(_0x5bf401,_0x272133[_0x3970c4(0xfc)]);return _0x4ceba5&&!_0x2d8a01&&(_0x5bf401[_0x3970c4(0xc9)]=serializeDatasetExtend(_0x45693d,_0x22e35f[_0x3970c4(0x102)]),await updateDrivenData(_0x5bf401)),{'ok':!![],'data':{'appCode':_0x556a1d,'selector':{'code':_0x272133[_0x3970c4(0xfc)]},'dataset':_0x1f706d,'dryRun':_0x2d8a01,'changed':_0x4ceba5,'changedPaths':_0xb755d3,'before':{'extend':_0x566c5b},'after':{'extend':_0x45693d},'submitted':_0x4ceba5&&!_0x2d8a01},'message':_0x4ceba5?_0x2d8a01?_0x3970c4(0xfb)+_0xb755d3['join'](',\x20')+')':'Updated\x20dataset\x20extend\x20('+_0xb755d3['join'](',\x20')+')':_0x3970c4(0xfd)};}export const datasetExtendUpdate={'service':a64_0x46f951(0xf4),'command':'extend-update','description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a64_0x46f951(0xcb),'flags':[CODE_FLAG,{'name':a64_0x46f951(0xf7),'type':'string','required':!![],'description':a64_0x46f951(0xef)},{'name':'expect-json','type':a64_0x46f951(0xe1),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x41eca1){validateInput(readExtendUpdateInput(_0x41eca1));},async 'dryRun'(_0x9a84cc){const _0x26c75a=a64_0x46f951,_0xa028b2=await buildDatasetExtendUpdateResult({'appCode':_0x9a84cc['appCode'],'input':readExtendUpdateInput(_0x9a84cc),'dryRun':!![]});return{'method':'POST','url':_0x26c75a(0xf2),'body':_0xa028b2[_0x26c75a(0xc6)],'description':_0xa028b2[_0x26c75a(0xe2)]};},async 'execute'(_0x5b5604){return buildDatasetExtendUpdateResult({'appCode':_0x5b5604['appCode'],'input':readExtendUpdateInput(_0x5b5604),'dryRun':![]});}};function readExtendUpdateInput(_0x10260f){const _0x39a3d9=a64_0x46f951,_0xb3afc=trim(_0x10260f[_0x39a3d9(0xea)](_0x39a3d9(0xfc))),_0x5288cb=parseJsonObjectFlag(_0x10260f['str']('patch-json'),_0x39a3d9(0xe8)),_0xd6698f=parseJsonObjectFlag(_0x10260f['str'](_0x39a3d9(0xd4)),_0x39a3d9(0xe9));return{'code':_0xb3afc,'patch':_0x5288cb||{},'expect':_0xd6698f};}function validateInput(_0x2cfe7e){const _0x5b9577=a64_0x46f951;if(!_0x2cfe7e[_0x5b9577(0xfc)])throw CliErrors['validation'](_0x5b9577(0xcf));validateExtendPatchKeys(_0x2cfe7e[_0x5b9577(0xe3)]);}function parseDatasetExtend(_0x1ef860){const _0x2b00d5=a64_0x46f951;if(typeof _0x1ef860===_0x2b00d5(0xe1)){const _0x36a7f6=_0x1ef860[_0x2b00d5(0xca)]();if(!_0x36a7f6)return{'value':{},'shape':_0x2b00d5(0xe1)};let _0x188cd3;try{_0x188cd3=JSON[_0x2b00d5(0x101)](_0x36a7f6);}catch(_0x1f655f){const _0xf11f5=_0x1f655f instanceof Error?_0x1f655f[_0x2b00d5(0xe2)]:String(_0x1f655f);throw CliErrors[_0x2b00d5(0xda)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0xf11f5);}if(!isPlainObject(_0x188cd3)||Array[_0x2b00d5(0xde)](_0x188cd3))throw CliErrors[_0x2b00d5(0xda)](_0x2b00d5(0xe6));return{'value':_0x188cd3,'shape':_0x2b00d5(0xe1)};}if(_0x1ef860===undefined||_0x1ef860===null)return{'value':{},'shape':_0x2b00d5(0xe1)};if(!isPlainObject(_0x1ef860)||Array[_0x2b00d5(0xde)](_0x1ef860))throw CliErrors['validation'](_0x2b00d5(0xe6));return{'value':_0x1ef860,'shape':_0x2b00d5(0xc5)};}function serializeDatasetExtend(_0x1c62af,_0x22ab98){const _0xccaff3=a64_0x46f951;return _0x22ab98===_0xccaff3(0xe1)?JSON[_0xccaff3(0xd0)](_0x1c62af):_0x1c62af;}function summarizeDataset(_0x4bba0b,_0x111d34){const _0x5e2c28=a64_0x46f951,_0x13be3d=isPlainObject(_0x4bba0b[_0x5e2c28(0xf4)])?_0x4bba0b[_0x5e2c28(0xf4)]:{},_0xba94d2=isPlainObject(_0x4bba0b[_0x5e2c28(0xdd)])?_0x4bba0b[_0x5e2c28(0xdd)]:{};return{'id':_0x4bba0b[_0x5e2c28(0xd9)]??_0x4bba0b['id']??_0x13be3d['datasetId']??null,'code':_0x4bba0b['modelCode']??_0x4bba0b[_0x5e2c28(0xfc)]??_0x13be3d[_0x5e2c28(0xcc)]??_0x111d34,'name':_0x4bba0b[_0x5e2c28(0xec)]??_0x13be3d['datasetName']??null,'table':_0xba94d2['tableName']??_0x13be3d['tableName']??null,'db':_0xba94d2[_0x5e2c28(0xee)]??_0xba94d2['dbId']??null};}function deepClone(_0x5c8e16){const _0x29561c=a64_0x46f951;if(_0x5c8e16===undefined)return _0x5c8e16;return JSON['parse'](JSON[_0x29561c(0xd0)](_0x5c8e16));}function a64_0x431b(){const _0x24e67a=['No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','210465VUqYJa','extend','trim','write','datasetCode','71166YLOYYd','20GpULHa','--code\x20is\x20required','stringify','1511WCYLdy','join','Unsupported\x20patch\x20key:\x20','expect-json','businessGroup','entries','extend.','27250CoHSXv','modelId','validation','145788iumsEr','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','dbtableConfig','isArray','Expected\x20','keys','string','message','patch','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','expect','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','296wboTKv','--patch-json','--expect-json','str','get','name','has','dbName','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','33GDyJSJ','hint','/smartapi/dataset/update-driven-data','from','dataset','424SJTUyW','value','patch-json','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','750169UlfnWD','sort','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','code','No\x20changes\x20for\x20dataset\x20extend','2204310YkcuYa',',\x20actual\x20','Allowed\x20keys:\x20','parse','shape','Expectation\x20mismatch\x20at\x20extend.','object','data'];a64_0x431b=function(){return _0x24e67a;};return a64_0x431b();}function deepEqual(_0x4194b2,_0xfb52e1){const _0x51cee3=a64_0x46f951;return JSON[_0x51cee3(0xd0)](_0x4194b2)===JSON['stringify'](_0xfb52e1);}function isPlainObject(_0x51c811){const _0x145647=a64_0x46f951;return Boolean(_0x51c811)&&typeof _0x51c811===_0x145647(0xc5)&&!Array[_0x145647(0xde)](_0x51c811);}function trim(_0x270c1c){const _0x34d4d9=a64_0x46f951,_0xb0473d=String(_0x270c1c||'')[_0x34d4d9(0xca)]();return _0xb0473d;}
1
+ const a64_0xa1036d=a64_0x574e;(function(_0x30ffe2,_0x4285ac){const _0x1d3b59=a64_0x574e,_0x3ce200=_0x30ffe2();while(!![]){try{const _0x35954b=-parseInt(_0x1d3b59(0x121))/0x1*(parseInt(_0x1d3b59(0x13e))/0x2)+parseInt(_0x1d3b59(0x141))/0x3+-parseInt(_0x1d3b59(0x12e))/0x4*(parseInt(_0x1d3b59(0x135))/0x5)+-parseInt(_0x1d3b59(0x14c))/0x6+parseInt(_0x1d3b59(0x13a))/0x7+parseInt(_0x1d3b59(0x120))/0x8+-parseInt(_0x1d3b59(0x14d))/0x9;if(_0x35954b===_0x4285ac)break;else _0x3ce200['push'](_0x3ce200['shift']());}catch(_0x13337c){_0x3ce200['push'](_0x3ce200['shift']());}}}(a64_0x4763,0x37d72));function a64_0x4763(){const _0xd15af=['from','--patch-json','tableName','validation','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','dbtableConfig','\x20must\x20be\x20valid\x20JSON\x20object:\x20','isArray','220KfJcte','dbName','keys','value','join','Unsupported\x20patch\x20key:\x20','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','6115xwAOjc','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','hint','businessGroup','Expectation\x20mismatch\x20at\x20extend.','1987860oNgJig','appCode','code','Expected\x20','212354vRpJyE','get','datasetCode','865959EhMFxG','Allowed\x20keys:\x20','message','name','str','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','parse','stringify','expect','entries',',\x20actual\x20','561762IKnTXk','1125576NHyXmp','shape','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','extend','dataset','trim','write','Patch\x20dataset\x20top-level\x20extend\x20safely','extend.','--code\x20is\x20required','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','length','patch','modelCode','extend-update','sort','--expect-json','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','dbId','No\x20changes\x20for\x20dataset\x20extend','object','datasetName','patch-json','/smartapi/dataset/update-driven-data','has','datasetId','string','1235192krQJsq','2MLhdmv','\x20must\x20be\x20a\x20JSON\x20object','expect-json','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'];a64_0x4763=function(){return _0xd15af;};return a64_0x4763();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0xa1036d(0x138),{'message':a64_0xa1036d(0x14f),'hint':a64_0xa1036d(0x129)}]]);export function parseJsonObjectFlag(_0xe1a9da,_0x1d71a4){const _0xd0f68d=a64_0xa1036d;if(!_0xe1a9da)return undefined;let _0x174cb9;try{_0x174cb9=JSON[_0xd0f68d(0x147)](_0xe1a9da);}catch(_0x55d4d7){const _0x25c9e1=_0x55d4d7 instanceof Error?_0x55d4d7['message']:String(_0x55d4d7);throw CliErrors[_0xd0f68d(0x128)](_0x1d71a4+_0xd0f68d(0x12c)+_0x25c9e1);}if(!isPlainObject(_0x174cb9)||Array['isArray'](_0x174cb9))throw CliErrors[_0xd0f68d(0x128)](_0x1d71a4+_0xd0f68d(0x122));return _0x174cb9;}export function validateExtendPatchKeys(_0x54233f){const _0x3136c4=a64_0xa1036d,_0x278aad=Object[_0x3136c4(0x130)](_0x54233f);if(_0x278aad[_0x3136c4(0x158)]===0x0)throw CliErrors[_0x3136c4(0x128)](_0x3136c4(0x146));for(const _0x5b9c79 of _0x278aad){const _0x1a8af7=EXTEND_PATCH_REDIRECTS[_0x3136c4(0x13f)](_0x5b9c79);if(_0x1a8af7)throw CliErrors[_0x3136c4(0x128)](_0x1a8af7[_0x3136c4(0x143)],_0x1a8af7[_0x3136c4(0x137)]);if(!MUTABLE_EXTEND_KEYS[_0x3136c4(0x11d)](_0x5b9c79))throw CliErrors['validation'](_0x3136c4(0x133)+_0x5b9c79,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x24b8dd=a64_0xa1036d,_0x5db3ce=Array[_0x24b8dd(0x125)](MUTABLE_EXTEND_KEYS)[_0x24b8dd(0x15c)]();return _0x5db3ce[_0x24b8dd(0x158)]>0x0?_0x24b8dd(0x142)+_0x5db3ce[_0x24b8dd(0x132)](',\x20'):_0x24b8dd(0x134);}export function applyExtendPatch(_0x5dedc2,_0x42e280){const _0x4e09ed=a64_0xa1036d;validateExtendPatchKeys(_0x42e280);const _0x32e6a4=deepClone(_0x5dedc2),_0x3064a1=[];for(const [_0x480dd6,_0x238c24]of Object[_0x4e09ed(0x14a)](_0x42e280)){const _0x3ab7d2=_0x32e6a4[_0x480dd6],_0x4c5ca2=deepClone(_0x238c24);!deepEqual(_0x3ab7d2,_0x4c5ca2)&&(_0x32e6a4[_0x480dd6]=_0x4c5ca2,_0x3064a1['push'](_0x4e09ed(0x155)+_0x480dd6));}return _0x3064a1['sort'](),{'after':_0x32e6a4,'changedPaths':_0x3064a1,'changed':_0x3064a1['length']>0x0};}function a64_0x574e(_0x2bced9,_0xf61ebb){_0x2bced9=_0x2bced9-0x11a;const _0x476348=a64_0x4763();let _0x574e06=_0x476348[_0x2bced9];return _0x574e06;}export function assertExpectation(_0x42333f,_0x5f2327){const _0x34b6a2=a64_0xa1036d;if(!_0x5f2327)return;for(const [_0x1fd151,_0x52019b]of Object[_0x34b6a2(0x14a)](_0x5f2327)){const _0x304f52=_0x42333f[_0x1fd151];if(!deepEqual(_0x304f52,_0x52019b))throw CliErrors[_0x34b6a2(0x128)](_0x34b6a2(0x139)+_0x1fd151,_0x34b6a2(0x13d)+JSON[_0x34b6a2(0x148)](_0x52019b)+_0x34b6a2(0x14b)+JSON[_0x34b6a2(0x148)](_0x304f52));}}export async function buildDatasetExtendUpdateResult({appCode:_0x54528a,input:_0x526a9d,dryRun:_0x3c5651}){const _0x304e72=a64_0xa1036d;validateInput(_0x526a9d);const _0x1af0ca=await getDatasetDetail(_0x526a9d['code']),_0x4dfd8b=parseDatasetExtend(_0x1af0ca['extend']),_0x10ebcb=deepClone(_0x4dfd8b[_0x304e72(0x131)]);assertExpectation(_0x10ebcb,_0x526a9d[_0x304e72(0x149)]);const {after:_0x1d803d,changedPaths:_0x4caeca,changed:_0x15cf2d}=applyExtendPatch(_0x10ebcb,_0x526a9d[_0x304e72(0x159)]),_0x38481b=summarizeDataset(_0x1af0ca,_0x526a9d['code']);return _0x15cf2d&&!_0x3c5651&&(_0x1af0ca[_0x304e72(0x150)]=serializeDatasetExtend(_0x1d803d,_0x4dfd8b[_0x304e72(0x14e)]),await updateDrivenData(_0x1af0ca)),{'ok':!![],'data':{'appCode':_0x54528a,'selector':{'code':_0x526a9d[_0x304e72(0x13c)]},'dataset':_0x38481b,'dryRun':_0x3c5651,'changed':_0x15cf2d,'changedPaths':_0x4caeca,'before':{'extend':_0x10ebcb},'after':{'extend':_0x1d803d},'submitted':_0x15cf2d&&!_0x3c5651},'message':_0x15cf2d?_0x3c5651?_0x304e72(0x15e)+_0x4caeca[_0x304e72(0x132)](',\x20')+')':'Updated\x20dataset\x20extend\x20('+_0x4caeca['join'](',\x20')+')':_0x304e72(0x160)};}export const datasetExtendUpdate={'service':a64_0xa1036d(0x151),'command':a64_0xa1036d(0x15b),'description':a64_0xa1036d(0x154),'risk':a64_0xa1036d(0x153),'flags':[CODE_FLAG,{'name':a64_0xa1036d(0x11b),'type':a64_0xa1036d(0x11f),'required':!![],'description':a64_0xa1036d(0x124)},{'name':a64_0xa1036d(0x123),'type':'string','required':![],'description':a64_0xa1036d(0x136)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xdba45e){validateInput(readExtendUpdateInput(_0xdba45e));},async 'dryRun'(_0x294817){const _0x3a75f4=a64_0xa1036d,_0x5e7ca7=await buildDatasetExtendUpdateResult({'appCode':_0x294817[_0x3a75f4(0x13b)],'input':readExtendUpdateInput(_0x294817),'dryRun':!![]});return{'method':'POST','url':_0x3a75f4(0x11c),'body':_0x5e7ca7['data'],'description':_0x5e7ca7['message']};},async 'execute'(_0x48a77f){return buildDatasetExtendUpdateResult({'appCode':_0x48a77f['appCode'],'input':readExtendUpdateInput(_0x48a77f),'dryRun':![]});}};function readExtendUpdateInput(_0x37a564){const _0x1aa3c0=a64_0xa1036d,_0x691662=trim(_0x37a564[_0x1aa3c0(0x145)](_0x1aa3c0(0x13c))),_0x1a9bb5=parseJsonObjectFlag(_0x37a564[_0x1aa3c0(0x145)](_0x1aa3c0(0x11b)),_0x1aa3c0(0x126)),_0x59a778=parseJsonObjectFlag(_0x37a564[_0x1aa3c0(0x145)](_0x1aa3c0(0x123)),_0x1aa3c0(0x15d));return{'code':_0x691662,'patch':_0x1a9bb5||{},'expect':_0x59a778};}function validateInput(_0x158047){const _0xc84bd2=a64_0xa1036d;if(!_0x158047[_0xc84bd2(0x13c)])throw CliErrors[_0xc84bd2(0x128)](_0xc84bd2(0x156));validateExtendPatchKeys(_0x158047[_0xc84bd2(0x159)]);}function parseDatasetExtend(_0x2d35dd){const _0x5362d3=a64_0xa1036d;if(typeof _0x2d35dd===_0x5362d3(0x11f)){const _0x58f5b0=_0x2d35dd['trim']();if(!_0x58f5b0)return{'value':{},'shape':_0x5362d3(0x11f)};let _0x253b32;try{_0x253b32=JSON['parse'](_0x58f5b0);}catch(_0x4ad456){const _0x4efa07=_0x4ad456 instanceof Error?_0x4ad456[_0x5362d3(0x143)]:String(_0x4ad456);throw CliErrors[_0x5362d3(0x128)](_0x5362d3(0x157)+_0x4efa07);}if(!isPlainObject(_0x253b32)||Array[_0x5362d3(0x12d)](_0x253b32))throw CliErrors['validation'](_0x5362d3(0x12a));return{'value':_0x253b32,'shape':_0x5362d3(0x11f)};}if(_0x2d35dd===undefined||_0x2d35dd===null)return{'value':{},'shape':_0x5362d3(0x11f)};if(!isPlainObject(_0x2d35dd)||Array[_0x5362d3(0x12d)](_0x2d35dd))throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x2d35dd,'shape':_0x5362d3(0x161)};}function serializeDatasetExtend(_0x13d185,_0x1fd311){const _0x45aa61=a64_0xa1036d;return _0x1fd311==='string'?JSON[_0x45aa61(0x148)](_0x13d185):_0x13d185;}function summarizeDataset(_0x4a8e6b,_0x5e06ef){const _0x7f690f=a64_0xa1036d,_0x5ca052=isPlainObject(_0x4a8e6b['dataset'])?_0x4a8e6b[_0x7f690f(0x151)]:{},_0x1d2ab7=isPlainObject(_0x4a8e6b[_0x7f690f(0x12b)])?_0x4a8e6b['dbtableConfig']:{};return{'id':_0x4a8e6b['modelId']??_0x4a8e6b['id']??_0x5ca052[_0x7f690f(0x11e)]??null,'code':_0x4a8e6b[_0x7f690f(0x15a)]??_0x4a8e6b['code']??_0x5ca052[_0x7f690f(0x140)]??_0x5e06ef,'name':_0x4a8e6b[_0x7f690f(0x144)]??_0x5ca052[_0x7f690f(0x11a)]??null,'table':_0x1d2ab7[_0x7f690f(0x127)]??_0x5ca052[_0x7f690f(0x127)]??null,'db':_0x1d2ab7[_0x7f690f(0x12f)]??_0x1d2ab7[_0x7f690f(0x15f)]??null};}function deepClone(_0x137e56){const _0x116e64=a64_0xa1036d;if(_0x137e56===undefined)return _0x137e56;return JSON[_0x116e64(0x147)](JSON['stringify'](_0x137e56));}function deepEqual(_0x2c6c80,_0x5d4fd6){const _0x30ca69=a64_0xa1036d;return JSON[_0x30ca69(0x148)](_0x2c6c80)===JSON[_0x30ca69(0x148)](_0x5d4fd6);}function isPlainObject(_0x4fb6d2){const _0x1b1053=a64_0xa1036d;return Boolean(_0x4fb6d2)&&typeof _0x4fb6d2===_0x1b1053(0x161)&&!Array[_0x1b1053(0x12d)](_0x4fb6d2);}function trim(_0x22ce3e){const _0x4f0816=a64_0xa1036d,_0x2766fd=String(_0x22ce3e||'')[_0x4f0816(0x152)]();return _0x2766fd;}
@@ -1 +1 @@
1
- const a65_0x4108b3=a65_0x6402;(function(_0x24225c,_0x359517){const _0x2a6f0f=a65_0x6402,_0x1595e7=_0x24225c();while(!![]){try{const _0x4fb94a=-parseInt(_0x2a6f0f(0xa6))/0x1*(parseInt(_0x2a6f0f(0x8c))/0x2)+parseInt(_0x2a6f0f(0xbb))/0x3+parseInt(_0x2a6f0f(0xad))/0x4*(parseInt(_0x2a6f0f(0xca))/0x5)+-parseInt(_0x2a6f0f(0xa2))/0x6*(parseInt(_0x2a6f0f(0x93))/0x7)+-parseInt(_0x2a6f0f(0x8b))/0x8+parseInt(_0x2a6f0f(0xb5))/0x9*(parseInt(_0x2a6f0f(0xaf))/0xa)+-parseInt(_0x2a6f0f(0x89))/0xb*(-parseInt(_0x2a6f0f(0x98))/0xc);if(_0x4fb94a===_0x359517)break;else _0x1595e7['push'](_0x1595e7['shift']());}catch(_0x42f5ca){_0x1595e7['push'](_0x1595e7['shift']());}}}(a65_0x3150,0x917f3));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a65_0x3150(){const _0x3b90d9=['pkField','fields','69971gjqosX','options','7594600UGvmRg','134aZvzXk','dbName','code','autoIncrement','--field\x20is\x20required','Forbidden\x20patch\x20key:\x20','object','75229GKoild','write','deprecated','from','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','1308CabIlO','systemRetain','--patch-json','properties','Expectation\x20mismatch\x20at\x20','str','patch-json','--code\x20is\x20required','dbtableConfig','--expect-json','174eevZtp','name','isArray','sort','11458OlpHxF','deleted','string','has','modelCode','dataset','/smartapi/dataset/update-driven-data','9388ewfNEG','Expected\x20','630XGYrym','appCode','tableName','field-update','doType','data','103365cUZSXe','modelId','description','datasetId','dbTypeScale','entries','1841802jjbtjQ','Field\x20not\x20found:\x20','Dry-run:\x20dataset\x20field\x20','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','validation',',\x20actual\x20','POST','field','expect-json','patch','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','parse','dbFieldName','\x20would\x20change\x20(','1265mOATqY','Updated\x20dataset\x20field\x20','keys','chartRole','message','stringify','defaultAggregation','Exact\x20raw\x20fields[].name\x20to\x20patch','dbId','size','No\x20changes\x20for\x20dataset\x20field\x20','join','\x20must\x20be\x20valid\x20JSON\x20object:\x20','trim','add','datetimeFormat','required','dbTypeLen'];a65_0x3150=function(){return _0x3b90d9;};return a65_0x3150();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a65_0x4108b3(0xb3),'displayName',a65_0x4108b3(0xb7),a65_0x4108b3(0x8a),a65_0x4108b3(0xda),a65_0x4108b3(0xd9),a65_0x4108b3(0xd0),a65_0x4108b3(0xcd),a65_0x4108b3(0x95)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name',a65_0x4108b3(0x8e),'dbType',a65_0x4108b3(0xdb),a65_0x4108b3(0xb9),a65_0x4108b3(0xc8),a65_0x4108b3(0xb1),a65_0x4108b3(0xa7),a65_0x4108b3(0xdc),a65_0x4108b3(0x8f),a65_0x4108b3(0x99)]);export function parseJsonObjectFlag(_0x2ed2be,_0xa971d2){const _0xdc2b7e=a65_0x4108b3;if(!_0x2ed2be)return undefined;let _0x1ca096;try{_0x1ca096=JSON[_0xdc2b7e(0xc7)](_0x2ed2be);}catch(_0x448d62){const _0x45aa2a=_0x448d62 instanceof Error?_0x448d62[_0xdc2b7e(0xce)]:String(_0x448d62);throw CliErrors[_0xdc2b7e(0xc0)](_0xa971d2+_0xdc2b7e(0xd6)+_0x45aa2a);}if(!isPlainObject(_0x1ca096)||Array[_0xdc2b7e(0xa4)](_0x1ca096))throw CliErrors[_0xdc2b7e(0xc0)](_0xa971d2+'\x20must\x20be\x20a\x20JSON\x20object');return _0x1ca096;}export function validatePatchKeys(_0x2eacfc){const _0x1f743f=a65_0x4108b3,_0x2d60ee=Object[_0x1f743f(0xcc)](_0x2eacfc);if(_0x2d60ee['length']===0x0)throw CliErrors[_0x1f743f(0xc0)](_0x1f743f(0xbf));for(const _0x34f8fa of _0x2d60ee){if(FORBIDDEN_FIELD_KEYS[_0x1f743f(0xa9)](_0x34f8fa))throw CliErrors[_0x1f743f(0xc0)](_0x1f743f(0x91)+_0x34f8fa);if(!MUTABLE_FIELD_KEYS[_0x1f743f(0xa9)](_0x34f8fa))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x34f8fa,'Allowed\x20keys:\x20'+Array['from'](MUTABLE_FIELD_KEYS)[_0x1f743f(0xd5)](',\x20'));}}export function applyFieldPatch(_0x9ed308,_0x127e12){const _0x300606=a65_0x4108b3;validatePatchKeys(_0x127e12);const _0x4c9902=deepClone(_0x9ed308),_0x25ceef=new Set();for(const [_0x512002,_0x2c35b0]of Object[_0x300606(0xba)](_0x127e12)){const _0x2d53f7=_0x4c9902[_0x512002],_0x4a605f=mergePatchValue(_0x2d53f7,_0x2c35b0);!deepEqual(_0x2d53f7,_0x4a605f)&&(_0x4c9902[_0x512002]=_0x4a605f,_0x25ceef[_0x300606(0xd8)](_0x512002),collectChangedPaths(_0x512002,_0x2d53f7,_0x4a605f,_0x25ceef));}return{'after':_0x4c9902,'changedPaths':Array[_0x300606(0x96)](_0x25ceef)[_0x300606(0xa5)](),'changed':_0x25ceef[_0x300606(0xd3)]>0x0};}export function assertExpectation(_0x58fbed,_0x2eeb04){const _0x3ff84d=a65_0x4108b3;if(!_0x2eeb04)return;for(const [_0x4b9e87,_0x248569]of Object[_0x3ff84d(0xba)](_0x2eeb04)){const _0x3a0b15=_0x58fbed[_0x4b9e87];if(!deepEqual(_0x3a0b15,_0x248569))throw CliErrors['validation'](_0x3ff84d(0x9c)+_0x4b9e87,_0x3ff84d(0xae)+JSON['stringify'](_0x248569)+_0x3ff84d(0xc1)+JSON['stringify'](_0x3a0b15));}}export async function buildDatasetFieldUpdateResult({appCode:_0x32e9ad,input:_0x10ce13,dryRun:_0x386e85}){const _0x7bce6b=a65_0x4108b3;validateInput(_0x10ce13);const _0x272e97=await getDatasetDetail(_0x10ce13[_0x7bce6b(0x8e)]),_0xad6b93=readFieldArray(_0x272e97),_0x24bbe1=_0xad6b93['findIndex'](_0x392102=>_0x392102?.[_0x7bce6b(0xa3)]===_0x10ce13[_0x7bce6b(0xc3)]);if(_0x24bbe1<0x0)throw CliErrors[_0x7bce6b(0xc0)](_0x7bce6b(0xbc)+_0x10ce13[_0x7bce6b(0xc3)]);const _0x38d3c8=deepClone(_0xad6b93[_0x24bbe1]);assertExpectation(_0x38d3c8,_0x10ce13['expect']);const {after:_0x43d88e,changedPaths:_0xf67c1d,changed:_0x24d48b}=applyFieldPatch(_0x38d3c8,_0x10ce13[_0x7bce6b(0xc5)]),_0x2f3fe2=summarizeDataset(_0x272e97,_0x10ce13[_0x7bce6b(0x8e)]);return _0x24d48b&&!_0x386e85&&(_0xad6b93[_0x24bbe1]=_0x43d88e,await updateDrivenData(_0x272e97)),{'ok':!![],'data':{'appCode':_0x32e9ad,'selector':{'code':_0x10ce13[_0x7bce6b(0x8e)]},'dataset':_0x2f3fe2,'field':{'id':_0x38d3c8['id']??null,'name':_0x38d3c8[_0x7bce6b(0xa3)]},'dryRun':_0x386e85,'changed':_0x24d48b,'changedPaths':_0xf67c1d,'before':_0x38d3c8,'after':_0x43d88e,'submitted':_0x24d48b&&!_0x386e85},'message':_0x24d48b?_0x386e85?_0x7bce6b(0xbd)+_0x10ce13['field']+_0x7bce6b(0xc9)+_0xf67c1d[_0x7bce6b(0xd5)](',\x20')+')':_0x7bce6b(0xcb)+_0x10ce13[_0x7bce6b(0xc3)]+'\x20('+_0xf67c1d[_0x7bce6b(0xd5)](',\x20')+')':_0x7bce6b(0xd4)+_0x10ce13[_0x7bce6b(0xc3)]};}export const datasetFieldUpdate={'service':a65_0x4108b3(0xab),'command':a65_0x4108b3(0xb2),'description':'Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','risk':a65_0x4108b3(0x94),'flags':[CODE_FLAG,{'name':a65_0x4108b3(0xc3),'type':a65_0x4108b3(0xa8),'required':!![],'description':a65_0x4108b3(0xd1)},{'name':a65_0x4108b3(0x9e),'type':'string','required':!![],'description':a65_0x4108b3(0xbe)},{'name':a65_0x4108b3(0xc4),'type':a65_0x4108b3(0xa8),'required':![],'description':a65_0x4108b3(0x97)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f0159){validateInput(readFieldUpdateInput(_0x1f0159));},async 'dryRun'(_0x2bd345){const _0x3cbe91=a65_0x4108b3,_0x371562=await buildDatasetFieldUpdateResult({'appCode':_0x2bd345[_0x3cbe91(0xb0)],'input':readFieldUpdateInput(_0x2bd345),'dryRun':!![]});return{'method':_0x3cbe91(0xc2),'url':_0x3cbe91(0xac),'body':_0x371562[_0x3cbe91(0xb4)],'description':_0x371562['message']};},async 'execute'(_0x4b759e){const _0x5a070e=a65_0x4108b3;return buildDatasetFieldUpdateResult({'appCode':_0x4b759e[_0x5a070e(0xb0)],'input':readFieldUpdateInput(_0x4b759e),'dryRun':![]});}};function readFieldUpdateInput(_0xda7194){const _0x42ba0a=a65_0x4108b3,_0x680b60=trim(_0xda7194['str'](_0x42ba0a(0x8e))),_0x1a776b=emptyToUndefined(_0xda7194[_0x42ba0a(0x9d)]('field')),_0x3d32c3=parseJsonObjectFlag(_0xda7194['str']('patch-json'),_0x42ba0a(0x9a)),_0x1bb10c=parseJsonObjectFlag(_0xda7194['str'](_0x42ba0a(0xc4)),_0x42ba0a(0xa1));return{'code':_0x680b60,'field':_0x1a776b||'','patch':_0x3d32c3||{},'expect':_0x1bb10c};}function validateInput(_0x2eea39){const _0x2da78c=a65_0x4108b3;if(!_0x2eea39[_0x2da78c(0x8e)])throw CliErrors['validation'](_0x2da78c(0x9f));if(!_0x2eea39['field'])throw CliErrors[_0x2da78c(0xc0)](_0x2da78c(0x90));validatePatchKeys(_0x2eea39[_0x2da78c(0xc5)]);}function readFieldArray(_0x56d32f){const _0x36497b=a65_0x4108b3;if(Array['isArray'](_0x56d32f[_0x36497b(0x88)]))return _0x56d32f[_0x36497b(0x88)];if(Array[_0x36497b(0xa4)](_0x56d32f[_0x36497b(0x9b)]))return _0x56d32f[_0x36497b(0x9b)];throw CliErrors[_0x36497b(0xc0)](_0x36497b(0xc6));}function summarizeDataset(_0x3a68d7,_0x355f42){const _0x5bc164=a65_0x4108b3,_0xb13982=isPlainObject(_0x3a68d7['dataset'])?_0x3a68d7['dataset']:{},_0x231980=isPlainObject(_0x3a68d7[_0x5bc164(0xa0)])?_0x3a68d7[_0x5bc164(0xa0)]:{};return{'id':_0x3a68d7[_0x5bc164(0xb6)]??_0x3a68d7['id']??_0xb13982[_0x5bc164(0xb8)]??null,'code':_0x3a68d7[_0x5bc164(0xaa)]??_0x3a68d7[_0x5bc164(0x8e)]??_0xb13982['datasetCode']??_0x355f42,'name':_0x3a68d7[_0x5bc164(0xa3)]??_0xb13982['datasetName']??null,'table':_0x231980[_0x5bc164(0xb1)]??_0xb13982['tableName']??null,'db':_0x231980[_0x5bc164(0x8d)]??_0x231980[_0x5bc164(0xd2)]??null};}function mergePatchValue(_0x334dea,_0x397d90){if(isPlainObject(_0x334dea)&&isPlainObject(_0x397d90))return deepMerge(_0x334dea,_0x397d90);return deepClone(_0x397d90);}function a65_0x6402(_0x3edcb8,_0x4f7b0d){_0x3edcb8=_0x3edcb8-0x88;const _0x31505a=a65_0x3150();let _0x64026a=_0x31505a[_0x3edcb8];return _0x64026a;}function deepMerge(_0x21d597,_0x2f3270){const _0x314cc4=deepClone(_0x21d597);for(const [_0x3c7050,_0x545417]of Object['entries'](_0x2f3270)){_0x314cc4[_0x3c7050]=isPlainObject(_0x314cc4[_0x3c7050])&&isPlainObject(_0x545417)?deepMerge(_0x314cc4[_0x3c7050],_0x545417):deepClone(_0x545417);}return _0x314cc4;}function collectChangedPaths(_0x547198,_0x72f174,_0x1cc9e2,_0x2185c2){const _0x474c3e=a65_0x4108b3;if(!isPlainObject(_0x72f174)||!isPlainObject(_0x1cc9e2))return;const _0x2cacf6=new Set([...Object[_0x474c3e(0xcc)](_0x72f174),...Object['keys'](_0x1cc9e2)]);for(const _0x17f9be of _0x2cacf6){const _0x98bd12=_0x72f174[_0x17f9be],_0x2f82a1=_0x1cc9e2[_0x17f9be];!deepEqual(_0x98bd12,_0x2f82a1)&&_0x2185c2[_0x474c3e(0xd8)](_0x547198+'.'+_0x17f9be);}}function deepClone(_0x39e2d1){if(_0x39e2d1===undefined)return _0x39e2d1;return JSON['parse'](JSON['stringify'](_0x39e2d1));}function deepEqual(_0x3b45ac,_0x169c15){const _0xe166ad=a65_0x4108b3;return JSON[_0xe166ad(0xcf)](_0x3b45ac)===JSON[_0xe166ad(0xcf)](_0x169c15);}function isPlainObject(_0x4b7e11){const _0x12a84e=a65_0x4108b3;return Boolean(_0x4b7e11)&&typeof _0x4b7e11===_0x12a84e(0x92)&&!Array[_0x12a84e(0xa4)](_0x4b7e11);}function emptyToUndefined(_0x135be4){const _0x45b132=a65_0x4108b3,_0x50ec79=String(_0x135be4||'')[_0x45b132(0xd7)]();return _0x50ec79||undefined;}function trim(_0x4d451a){const _0x4d9228=a65_0x4108b3;return String(_0x4d451a||'')[_0x4d9228(0xd7)]();}
1
+ function a65_0x4d08(_0x28e12c,_0x4c0a18){_0x28e12c=_0x28e12c-0xf3;const _0x4da25a=a65_0x4da2();let _0x4d08aa=_0x4da25a[_0x28e12c];return _0x4d08aa;}const a65_0x2a7988=a65_0x4d08;(function(_0x23fbad,_0x325bcc){const _0x36ef2c=a65_0x4d08,_0x298a2d=_0x23fbad();while(!![]){try{const _0x5ced41=-parseInt(_0x36ef2c(0x110))/0x1+parseInt(_0x36ef2c(0x132))/0x2+parseInt(_0x36ef2c(0x122))/0x3*(parseInt(_0x36ef2c(0x13e))/0x4)+-parseInt(_0x36ef2c(0x12e))/0x5*(-parseInt(_0x36ef2c(0x116))/0x6)+-parseInt(_0x36ef2c(0x10e))/0x7+parseInt(_0x36ef2c(0x115))/0x8+parseInt(_0x36ef2c(0xff))/0x9;if(_0x5ced41===_0x325bcc)break;else _0x298a2d['push'](_0x298a2d['shift']());}catch(_0x37f437){_0x298a2d['push'](_0x298a2d['shift']());}}}(a65_0x4da2,0x64156));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a65_0x4da2(){const _0x538260=['JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','datasetName','patch','--field\x20is\x20required','/smartapi/dataset/update-driven-data','\x20must\x20be\x20a\x20JSON\x20object','\x20must\x20be\x20valid\x20JSON\x20object:\x20','message','4294934RSFAPz','datetimeFormat','536648BIqdiD','code','dbType','dbTypeScale','Expected\x20','5865864quYCBm','919134ZOoIfm','Forbidden\x20patch\x20key:\x20','patch-json','str','description','parse','name',',\x20actual\x20','properties','appCode','join','entries','118173KSbbai','autoIncrement','dbFieldName','options','displayName','dataset','deprecated','Dry-run:\x20dataset\x20field\x20','Exact\x20raw\x20fields[].name\x20to\x20patch','Updated\x20dataset\x20field\x20','No\x20changes\x20for\x20dataset\x20field\x20','modelId','10feaKnQ','fields','string','dbTypeLen','520522mWvVfy','object','datasetId','pkField','datasetCode','expect-json','required','keys','tableName','has','data','validation','4bdsaix','POST','--patch-json','trim','\x20would\x20change\x20(','Field\x20not\x20found:\x20','dbtableConfig','--expect-json','Expectation\x20mismatch\x20at\x20','doType','size','sort','from','systemRetain','add','1988001kbMbGv','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','Allowed\x20keys:\x20','stringify','field','isArray'];a65_0x4da2=function(){return _0x538260;};return a65_0x4da2();}import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a65_0x2a7988(0xf9),a65_0x2a7988(0x126),a65_0x2a7988(0x11a),a65_0x2a7988(0x125),a65_0x2a7988(0x138),a65_0x2a7988(0x10f),'defaultAggregation','chartRole',a65_0x2a7988(0x128)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name','code',a65_0x2a7988(0x112),a65_0x2a7988(0x131),a65_0x2a7988(0x113),a65_0x2a7988(0x124),'tableName','deleted',a65_0x2a7988(0x135),a65_0x2a7988(0x123),a65_0x2a7988(0xfd)]);export function parseJsonObjectFlag(_0x38a3a6,_0x55ad0f){const _0x516caa=a65_0x2a7988;if(!_0x38a3a6)return undefined;let _0x2f4ca1;try{_0x2f4ca1=JSON[_0x516caa(0x11b)](_0x38a3a6);}catch(_0x5b9031){const _0x43b529=_0x5b9031 instanceof Error?_0x5b9031['message']:String(_0x5b9031);throw CliErrors['validation'](_0x55ad0f+_0x516caa(0x10c)+_0x43b529);}if(!isPlainObject(_0x2f4ca1)||Array['isArray'](_0x2f4ca1))throw CliErrors['validation'](_0x55ad0f+_0x516caa(0x10b));return _0x2f4ca1;}export function validatePatchKeys(_0x3186a2){const _0x3a741b=a65_0x2a7988,_0x1f8b24=Object[_0x3a741b(0x139)](_0x3186a2);if(_0x1f8b24['length']===0x0)throw CliErrors[_0x3a741b(0x13d)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x2a26a2 of _0x1f8b24){if(FORBIDDEN_FIELD_KEYS['has'](_0x2a26a2))throw CliErrors[_0x3a741b(0x13d)](_0x3a741b(0x117)+_0x2a26a2);if(!MUTABLE_FIELD_KEYS[_0x3a741b(0x13b)](_0x2a26a2))throw CliErrors[_0x3a741b(0x13d)]('Unsupported\x20patch\x20key:\x20'+_0x2a26a2,_0x3a741b(0x102)+Array['from'](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}export function applyFieldPatch(_0x2e9632,_0x39faaa){const _0xa0908=a65_0x2a7988;validatePatchKeys(_0x39faaa);const _0x31c099=deepClone(_0x2e9632),_0x7dc35c=new Set();for(const [_0x376183,_0x37b92f]of Object['entries'](_0x39faaa)){const _0x5b71d7=_0x31c099[_0x376183],_0x47c1e7=mergePatchValue(_0x5b71d7,_0x37b92f);!deepEqual(_0x5b71d7,_0x47c1e7)&&(_0x31c099[_0x376183]=_0x47c1e7,_0x7dc35c[_0xa0908(0xfe)](_0x376183),collectChangedPaths(_0x376183,_0x5b71d7,_0x47c1e7,_0x7dc35c));}return{'after':_0x31c099,'changedPaths':Array[_0xa0908(0xfc)](_0x7dc35c)[_0xa0908(0xfb)](),'changed':_0x7dc35c[_0xa0908(0xfa)]>0x0};}export function assertExpectation(_0x3b5c20,_0x379c03){const _0x522d12=a65_0x2a7988;if(!_0x379c03)return;for(const [_0x2b4d02,_0x1dd42f]of Object[_0x522d12(0x121)](_0x379c03)){const _0xb7a4d6=_0x3b5c20[_0x2b4d02];if(!deepEqual(_0xb7a4d6,_0x1dd42f))throw CliErrors[_0x522d12(0x13d)](_0x522d12(0xf8)+_0x2b4d02,_0x522d12(0x114)+JSON[_0x522d12(0x103)](_0x1dd42f)+_0x522d12(0x11d)+JSON[_0x522d12(0x103)](_0xb7a4d6));}}export async function buildDatasetFieldUpdateResult({appCode:_0x7d6930,input:_0x51e270,dryRun:_0x298e3c}){const _0x18777f=a65_0x2a7988;validateInput(_0x51e270);const _0x52cfed=await getDatasetDetail(_0x51e270['code']),_0x2640f2=readFieldArray(_0x52cfed),_0x5998f2=_0x2640f2['findIndex'](_0x478b41=>_0x478b41?.[_0x18777f(0x11c)]===_0x51e270['field']);if(_0x5998f2<0x0)throw CliErrors[_0x18777f(0x13d)](_0x18777f(0xf5)+_0x51e270[_0x18777f(0x104)]);const _0x523d5b=deepClone(_0x2640f2[_0x5998f2]);assertExpectation(_0x523d5b,_0x51e270['expect']);const {after:_0x48ce39,changedPaths:_0x402096,changed:_0x3d6021}=applyFieldPatch(_0x523d5b,_0x51e270['patch']),_0x37cdb4=summarizeDataset(_0x52cfed,_0x51e270[_0x18777f(0x111)]);return _0x3d6021&&!_0x298e3c&&(_0x2640f2[_0x5998f2]=_0x48ce39,await updateDrivenData(_0x52cfed)),{'ok':!![],'data':{'appCode':_0x7d6930,'selector':{'code':_0x51e270[_0x18777f(0x111)]},'dataset':_0x37cdb4,'field':{'id':_0x523d5b['id']??null,'name':_0x523d5b[_0x18777f(0x11c)]},'dryRun':_0x298e3c,'changed':_0x3d6021,'changedPaths':_0x402096,'before':_0x523d5b,'after':_0x48ce39,'submitted':_0x3d6021&&!_0x298e3c},'message':_0x3d6021?_0x298e3c?_0x18777f(0x129)+_0x51e270[_0x18777f(0x104)]+_0x18777f(0xf4)+_0x402096[_0x18777f(0x120)](',\x20')+')':_0x18777f(0x12b)+_0x51e270[_0x18777f(0x104)]+'\x20('+_0x402096['join'](',\x20')+')':_0x18777f(0x12c)+_0x51e270[_0x18777f(0x104)]};}export const datasetFieldUpdate={'service':a65_0x2a7988(0x127),'command':'field-update','description':a65_0x2a7988(0x101),'risk':'write','flags':[CODE_FLAG,{'name':a65_0x2a7988(0x104),'type':'string','required':!![],'description':a65_0x2a7988(0x12a)},{'name':a65_0x2a7988(0x118),'type':a65_0x2a7988(0x130),'required':!![],'description':a65_0x2a7988(0x106)},{'name':a65_0x2a7988(0x137),'type':a65_0x2a7988(0x130),'required':![],'description':a65_0x2a7988(0x100)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1de516){validateInput(readFieldUpdateInput(_0x1de516));},async 'dryRun'(_0x3430ff){const _0x4c50be=a65_0x2a7988,_0x37710a=await buildDatasetFieldUpdateResult({'appCode':_0x3430ff[_0x4c50be(0x11f)],'input':readFieldUpdateInput(_0x3430ff),'dryRun':!![]});return{'method':_0x4c50be(0x13f),'url':_0x4c50be(0x10a),'body':_0x37710a[_0x4c50be(0x13c)],'description':_0x37710a[_0x4c50be(0x10d)]};},async 'execute'(_0xef7ae3){const _0x3459be=a65_0x2a7988;return buildDatasetFieldUpdateResult({'appCode':_0xef7ae3[_0x3459be(0x11f)],'input':readFieldUpdateInput(_0xef7ae3),'dryRun':![]});}};function readFieldUpdateInput(_0xc55ce){const _0x4ebc9b=a65_0x2a7988,_0x50fb07=trim(_0xc55ce[_0x4ebc9b(0x119)](_0x4ebc9b(0x111))),_0x4c8c1a=emptyToUndefined(_0xc55ce['str']('field')),_0x1ad9e2=parseJsonObjectFlag(_0xc55ce[_0x4ebc9b(0x119)](_0x4ebc9b(0x118)),_0x4ebc9b(0x140)),_0x5cd526=parseJsonObjectFlag(_0xc55ce[_0x4ebc9b(0x119)](_0x4ebc9b(0x137)),_0x4ebc9b(0xf7));return{'code':_0x50fb07,'field':_0x4c8c1a||'','patch':_0x1ad9e2||{},'expect':_0x5cd526};}function validateInput(_0x22ec11){const _0xc4a55d=a65_0x2a7988;if(!_0x22ec11[_0xc4a55d(0x111)])throw CliErrors['validation']('--code\x20is\x20required');if(!_0x22ec11[_0xc4a55d(0x104)])throw CliErrors[_0xc4a55d(0x13d)](_0xc4a55d(0x109));validatePatchKeys(_0x22ec11[_0xc4a55d(0x108)]);}function readFieldArray(_0x1ec18a){const _0x320572=a65_0x2a7988;if(Array[_0x320572(0x105)](_0x1ec18a[_0x320572(0x12f)]))return _0x1ec18a[_0x320572(0x12f)];if(Array[_0x320572(0x105)](_0x1ec18a[_0x320572(0x11e)]))return _0x1ec18a[_0x320572(0x11e)];throw CliErrors['validation']('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x5800aa,_0x4e68b5){const _0x1c15cf=a65_0x2a7988,_0x29d279=isPlainObject(_0x5800aa[_0x1c15cf(0x127)])?_0x5800aa[_0x1c15cf(0x127)]:{},_0x5c7c37=isPlainObject(_0x5800aa[_0x1c15cf(0xf6)])?_0x5800aa[_0x1c15cf(0xf6)]:{};return{'id':_0x5800aa[_0x1c15cf(0x12d)]??_0x5800aa['id']??_0x29d279[_0x1c15cf(0x134)]??null,'code':_0x5800aa['modelCode']??_0x5800aa[_0x1c15cf(0x111)]??_0x29d279[_0x1c15cf(0x136)]??_0x4e68b5,'name':_0x5800aa[_0x1c15cf(0x11c)]??_0x29d279[_0x1c15cf(0x107)]??null,'table':_0x5c7c37[_0x1c15cf(0x13a)]??_0x29d279['tableName']??null,'db':_0x5c7c37['dbName']??_0x5c7c37['dbId']??null};}function mergePatchValue(_0x53dda2,_0x5041b8){if(isPlainObject(_0x53dda2)&&isPlainObject(_0x5041b8))return deepMerge(_0x53dda2,_0x5041b8);return deepClone(_0x5041b8);}function deepMerge(_0x2b2acf,_0x3f02dd){const _0x49aeb3=a65_0x2a7988,_0x417adc=deepClone(_0x2b2acf);for(const [_0x4bcc70,_0x3b9469]of Object[_0x49aeb3(0x121)](_0x3f02dd)){_0x417adc[_0x4bcc70]=isPlainObject(_0x417adc[_0x4bcc70])&&isPlainObject(_0x3b9469)?deepMerge(_0x417adc[_0x4bcc70],_0x3b9469):deepClone(_0x3b9469);}return _0x417adc;}function collectChangedPaths(_0x21eab5,_0x28cc79,_0x3775e9,_0x5632a5){const _0x326ca5=a65_0x2a7988;if(!isPlainObject(_0x28cc79)||!isPlainObject(_0x3775e9))return;const _0x1ccec0=new Set([...Object[_0x326ca5(0x139)](_0x28cc79),...Object[_0x326ca5(0x139)](_0x3775e9)]);for(const _0x4a4c68 of _0x1ccec0){const _0x51b219=_0x28cc79[_0x4a4c68],_0xdd6fd4=_0x3775e9[_0x4a4c68];!deepEqual(_0x51b219,_0xdd6fd4)&&_0x5632a5[_0x326ca5(0xfe)](_0x21eab5+'.'+_0x4a4c68);}}function deepClone(_0x3c5817){const _0x1a3496=a65_0x2a7988;if(_0x3c5817===undefined)return _0x3c5817;return JSON[_0x1a3496(0x11b)](JSON['stringify'](_0x3c5817));}function deepEqual(_0x711de3,_0x48d70e){const _0x164dfa=a65_0x2a7988;return JSON['stringify'](_0x711de3)===JSON[_0x164dfa(0x103)](_0x48d70e);}function isPlainObject(_0x3a7e77){const _0x1f2f5f=a65_0x2a7988;return Boolean(_0x3a7e77)&&typeof _0x3a7e77===_0x1f2f5f(0x133)&&!Array[_0x1f2f5f(0x105)](_0x3a7e77);}function emptyToUndefined(_0x16358f){const _0x41ede5=a65_0x2a7988,_0x1c99ed=String(_0x16358f||'')[_0x41ede5(0xf3)]();return _0x1c99ed||undefined;}function trim(_0x23dd66){const _0x51a517=a65_0x2a7988;return String(_0x23dd66||'')[_0x51a517(0xf3)]();}