@lovrabet/rabetbase-cli 2.3.3-beta.2 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) 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/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/generate.js +1 -1
  65. package/lib/commands/dataset/index.js +1 -1
  66. package/lib/commands/dataset/list.js +1 -1
  67. package/lib/commands/dataset/operations.js +1 -1
  68. package/lib/commands/dataset/relation-audit.js +1 -1
  69. package/lib/commands/dataset/relation-create.js +1 -1
  70. package/lib/commands/dataset/relation-delete.js +1 -1
  71. package/lib/commands/dataset/relation-shared.js +1 -1
  72. package/lib/commands/dataset/relation-update.js +1 -1
  73. package/lib/commands/dataset/relations.js +1 -1
  74. package/lib/commands/dataset/rename.js +1 -1
  75. package/lib/commands/dataset/restore.js +1 -1
  76. package/lib/commands/db/analyze-cancel.js +1 -1
  77. package/lib/commands/db/analyze-start.js +1 -1
  78. package/lib/commands/db/analyze-status.js +1 -1
  79. package/lib/commands/db/create.js +1 -1
  80. package/lib/commands/db/delete.js +1 -1
  81. package/lib/commands/db/detail.js +1 -1
  82. package/lib/commands/db/diff.js +1 -1
  83. package/lib/commands/db/index.js +1 -1
  84. package/lib/commands/db/list.js +1 -1
  85. package/lib/commands/db/shared.js +1 -1
  86. package/lib/commands/db/tables.js +1 -1
  87. package/lib/commands/db/test.js +1 -1
  88. package/lib/commands/db/update.js +1 -1
  89. package/lib/commands/doctor.js +1 -1
  90. package/lib/commands/init/index.js +1 -1
  91. package/lib/commands/issue/index.js +1 -1
  92. package/lib/commands/issue/nudge.js +1 -1
  93. package/lib/commands/issue/report.js +1 -1
  94. package/lib/commands/issue/shared.js +1 -1
  95. package/lib/commands/logs/index.js +1 -1
  96. package/lib/commands/menu/index.js +1 -1
  97. package/lib/commands/menu/list.js +1 -1
  98. package/lib/commands/menu/shared/compare-table.js +1 -1
  99. package/lib/commands/menu/shared/index.js +1 -1
  100. package/lib/commands/menu/shared/inquirer.js +1 -1
  101. package/lib/commands/menu/shared/local-pages.js +1 -1
  102. package/lib/commands/menu/shared/logic.js +1 -1
  103. package/lib/commands/menu/shared/service.js +1 -1
  104. package/lib/commands/menu/shared/sync-core.js +1 -1
  105. package/lib/commands/menu/shared/update-core.js +1 -1
  106. package/lib/commands/menu/shared/valid-url.js +1 -1
  107. package/lib/commands/menu/sync.js +1 -1
  108. package/lib/commands/menu/update.js +1 -1
  109. package/lib/commands/page/generate-start.js +1 -1
  110. package/lib/commands/page/generate-status.js +1 -1
  111. package/lib/commands/page/index.js +1 -1
  112. package/lib/commands/page/pull.js +1 -1
  113. package/lib/commands/page/push.js +1 -1
  114. package/lib/commands/page/relation-audit.js +1 -1
  115. package/lib/commands/page/shared.js +1 -1
  116. package/lib/commands/page/standard-page-status.js +1 -1
  117. package/lib/commands/page/sync.js +1 -1
  118. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  119. package/lib/commands/project/create/format-elapsed.js +1 -1
  120. package/lib/commands/project/create/main.js +1 -1
  121. package/lib/commands/project/create/non-interactive.js +1 -1
  122. package/lib/commands/project/create/project-template-path.js +1 -1
  123. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  124. package/lib/commands/project/create/use-format-code.js +1 -1
  125. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  126. package/lib/commands/project/index.js +1 -1
  127. package/lib/commands/project/init.js +1 -1
  128. package/lib/commands/project/upgrade.js +1 -1
  129. package/lib/commands/registry.js +1 -1
  130. package/lib/commands/run/index.js +1 -1
  131. package/lib/commands/schema.js +1 -1
  132. package/lib/commands/sql/create.js +1 -1
  133. package/lib/commands/sql/delete.js +1 -1
  134. package/lib/commands/sql/detail.js +1 -1
  135. package/lib/commands/sql/exec.js +1 -1
  136. package/lib/commands/sql/index.js +1 -1
  137. package/lib/commands/sql/list.js +1 -1
  138. package/lib/commands/sql/pull.js +1 -1
  139. package/lib/commands/sql/push.js +1 -1
  140. package/lib/commands/sql/save.js +1 -1
  141. package/lib/commands/sql/shared.js +1 -1
  142. package/lib/commands/sql/status.js +1 -1
  143. package/lib/commands/sql/validate.js +1 -1
  144. package/lib/commands/workspace/index.js +1 -1
  145. package/lib/config/schema.js +1 -1
  146. package/lib/constant/cdn.js +1 -1
  147. package/lib/constant/cli.js +1 -1
  148. package/lib/constant/defaults.js +1 -1
  149. package/lib/constant/domain.js +1 -1
  150. package/lib/constant/env.js +1 -1
  151. package/lib/constant/output.js +1 -1
  152. package/lib/constant/paths.js +1 -1
  153. package/lib/constant/risk.js +1 -1
  154. package/lib/context/app-resolver.js +1 -1
  155. package/lib/context/auth-resolver.js +1 -1
  156. package/lib/context/config-loader.js +1 -1
  157. package/lib/context.js +1 -1
  158. package/lib/core/alias-resolver.js +1 -1
  159. package/lib/core/api-client.js +1 -1
  160. package/lib/core/bff/config.js +1 -1
  161. package/lib/core/bff/file-system.js +1 -1
  162. package/lib/core/bff/hash.js +1 -1
  163. package/lib/core/bff/lock.js +1 -1
  164. package/lib/core/bff/utils.js +1 -1
  165. package/lib/core/db-resolver.js +1 -1
  166. package/lib/core/page/file-system.js +1 -1
  167. package/lib/core/page/hash.js +1 -1
  168. package/lib/core/page/lock.js +1 -1
  169. package/lib/core/sql-sync/config.js +1 -1
  170. package/lib/core/sql-sync/file-system.js +1 -1
  171. package/lib/core/sql-sync/hash.js +1 -1
  172. package/lib/core/sql-sync/lock.js +1 -1
  173. package/lib/core/sql-sync/utils.js +1 -1
  174. package/lib/core/sql-validator.js +1 -1
  175. package/lib/errors.js +1 -1
  176. package/lib/framework/build-all-flags.js +1 -1
  177. package/lib/framework/flags.js +1 -1
  178. package/lib/framework/help.js +1 -1
  179. package/lib/framework/index.js +1 -1
  180. package/lib/framework/output.js +1 -1
  181. package/lib/framework/response.js +1 -1
  182. package/lib/framework/runner-alias.js +1 -1
  183. package/lib/framework/runner.js +1 -1
  184. package/lib/framework/schema-export.js +1 -1
  185. package/lib/framework/types.js +1 -1
  186. package/lib/generated/build-info.js +1 -1
  187. package/lib/help.js +1 -1
  188. package/lib/skills/main.js +1 -1
  189. package/lib/skills/npx-skills-add.js +1 -1
  190. package/lib/telemetry/cli-command-trace.js +1 -1
  191. package/lib/telemetry/cli-help-trace.js +1 -1
  192. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  193. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  194. package/lib/telemetry/send-cli-trace-log.js +1 -1
  195. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  196. package/lib/utils/ai_config.js +1 -1
  197. package/lib/utils/apply-jq-filter.js +1 -1
  198. package/lib/utils/cdn-config.js +1 -1
  199. package/lib/utils/check-sdk-version.js +1 -1
  200. package/lib/utils/cli-version-check.js +1 -1
  201. package/lib/utils/cli-version-policy.js +1 -1
  202. package/lib/utils/config.js +1 -1
  203. package/lib/utils/copy-directory.js +1 -1
  204. package/lib/utils/entity-with-id.js +1 -1
  205. package/lib/utils/file-utils.js +1 -1
  206. package/lib/utils/guides-cdn.js +1 -1
  207. package/lib/utils/http-client.js +1 -1
  208. package/lib/utils/is-non-interactive.js +1 -1
  209. package/lib/utils/logger.js +1 -1
  210. package/lib/utils/params.js +1 -1
  211. package/lib/utils/platform.js +1 -1
  212. package/lib/utils/rules-cdn.js +1 -1
  213. package/lib/utils/sleep.js +1 -1
  214. package/lib/utils/template-replacer.js +1 -1
  215. package/lib/utils/update-notice.js +1 -1
  216. package/lib/utils/version.js +1 -1
  217. package/lib/utils/with-active-cookie.js +1 -1
  218. package/lib/utils/write-cli-side-channel.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x1f6ab1,_0x49a4cb){const _0x1d87ec=a49_0x2e1b,_0x3aa50a=_0x1f6ab1();while(!![]){try{const _0x15bcca=parseInt(_0x1d87ec(0x1c5))/0x1+-parseInt(_0x1d87ec(0x1c4))/0x2+-parseInt(_0x1d87ec(0x1ce))/0x3*(-parseInt(_0x1d87ec(0x1cd))/0x4)+-parseInt(_0x1d87ec(0x1cc))/0x5*(parseInt(_0x1d87ec(0x1c6))/0x6)+parseInt(_0x1d87ec(0x1c9))/0x7*(-parseInt(_0x1d87ec(0x1ca))/0x8)+parseInt(_0x1d87ec(0x1c7))/0x9*(-parseInt(_0x1d87ec(0x1c8))/0xa)+parseInt(_0x1d87ec(0x1cb))/0xb;if(_0x15bcca===_0x49a4cb)break;else _0x3aa50a['push'](_0x3aa50a['shift']());}catch(_0x5f4c46){_0x3aa50a['push'](_0x3aa50a['shift']());}}}(a49_0x3884,0xd25e7));function a49_0x2e1b(_0x128db8,_0x5ac1d0){_0x128db8=_0x128db8-0x1c4;const _0x388481=a49_0x3884();let _0x2e1b5e=_0x388481[_0x128db8];return _0x2e1b5e;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a49_0x3884(){const _0x350fce=['788FbDrfm','11172agSQwN','3036512azyNws','264816eBsclM','5806038EAbbZj','123354DwwVKb','10zYlvfU','7rWJqfY','11835152yYSGTV','42264816QFftFY','5QiuhCn'];a49_0x3884=function(){return _0x350fce;};return a49_0x3884();}
1
+ (function(_0x465d43,_0x496d7b){const _0x7e848a=a49_0x24ca,_0x5644dc=_0x465d43();while(!![]){try{const _0x466431=parseInt(_0x7e848a(0x1e6))/0x1+parseInt(_0x7e848a(0x1e7))/0x2*(-parseInt(_0x7e848a(0x1e9))/0x3)+parseInt(_0x7e848a(0x1ed))/0x4*(-parseInt(_0x7e848a(0x1f0))/0x5)+parseInt(_0x7e848a(0x1ea))/0x6+-parseInt(_0x7e848a(0x1ec))/0x7*(parseInt(_0x7e848a(0x1e5))/0x8)+-parseInt(_0x7e848a(0x1ee))/0x9*(-parseInt(_0x7e848a(0x1ef))/0xa)+parseInt(_0x7e848a(0x1e8))/0xb*(parseInt(_0x7e848a(0x1eb))/0xc);if(_0x466431===_0x496d7b)break;else _0x5644dc['push'](_0x5644dc['shift']());}catch(_0x4d283b){_0x5644dc['push'](_0x5644dc['shift']());}}}(a49_0x32bc,0x2e09d));function a49_0x24ca(_0x5e054,_0x42051e){_0x5e054=_0x5e054-0x1e5;const _0x32bc32=a49_0x32bc();let _0x24ca42=_0x32bc32[_0x5e054];return _0x24ca42;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a49_0x32bc(){const _0x1e63b6=['1103874phDtMu','1360740DqfMjy','308Ukdfkl','16424LBJxJE','207ymnTdR','61150eFJgFu','225dBoBcf','14856frWbfn','119344kJNXwT','25578KLyNNU','11UTRcHX','24BxEfgL'];a49_0x32bc=function(){return _0x1e63b6;};return a49_0x32bc();}
@@ -1 +1 @@
1
- const a50_0x24c352=a50_0x18bb;(function(_0x2e9f17,_0x138d0a){const _0x352290=a50_0x18bb,_0x116440=_0x2e9f17();while(!![]){try{const _0x1f2fed=-parseInt(_0x352290(0x1a5))/0x1+-parseInt(_0x352290(0x1ad))/0x2+parseInt(_0x352290(0x1a4))/0x3*(parseInt(_0x352290(0x1a8))/0x4)+parseInt(_0x352290(0x1b0))/0x5+-parseInt(_0x352290(0x1a3))/0x6+-parseInt(_0x352290(0x1aa))/0x7+-parseInt(_0x352290(0x1ab))/0x8*(-parseInt(_0x352290(0x1ac))/0x9);if(_0x1f2fed===_0x138d0a)break;else _0x116440['push'](_0x116440['shift']());}catch(_0x1cab6d){_0x116440['push'](_0x116440['shift']());}}}(a50_0x45da,0xd11e2));function a50_0x45da(){const _0x4b9c60=['54KQADTr','1677844cCeMtb','global','list','3361585RIuBVP','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','read','6415110GFpheW','1515PPwvYr','407868rEYrYN','boolean','config','12676svlmVR','bool','7057323UzyZWF','2544064kifDHj'];a50_0x45da=function(){return _0x4b9c60;};return a50_0x45da();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x373a26){const _0x4f70cd=a50_0x18bb,_0x58b8d3=_0x373a26[_0x4f70cd(0x1a9)](_0x4f70cd(0x1ae))?readScopedConfig(_0x4f70cd(0x1ae)):readConfig();return{'ok':!![],'data':_0x58b8d3};}function a50_0x18bb(_0x56bf54,_0x48e5f5){_0x56bf54=_0x56bf54-0x1a1;const _0x45dac9=a50_0x45da();let _0x18bb6b=_0x45dac9[_0x56bf54];return _0x18bb6b;}export const configListDefinition={'service':a50_0x24c352(0x1a7),'command':a50_0x24c352(0x1af),'description':'List\x20all\x20config\x20values','risk':a50_0x24c352(0x1a2),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x24c352(0x1ae),'type':a50_0x24c352(0x1a6),'description':a50_0x24c352(0x1a1),'default':![]}],'execute':execute};
1
+ function a50_0x6ea4(_0x3cf5d,_0x120e20){_0x3cf5d=_0x3cf5d-0x1d4;const _0x820b8e=a50_0x820b();let _0x6ea49a=_0x820b8e[_0x3cf5d];return _0x6ea49a;}const a50_0x14e9f6=a50_0x6ea4;(function(_0x134194,_0x5aa007){const _0x3a2052=a50_0x6ea4,_0x5e538e=_0x134194();while(!![]){try{const _0x28c383=parseInt(_0x3a2052(0x1d6))/0x1*(-parseInt(_0x3a2052(0x1e0))/0x2)+-parseInt(_0x3a2052(0x1e1))/0x3+parseInt(_0x3a2052(0x1df))/0x4*(-parseInt(_0x3a2052(0x1de))/0x5)+-parseInt(_0x3a2052(0x1e3))/0x6+-parseInt(_0x3a2052(0x1dd))/0x7*(-parseInt(_0x3a2052(0x1d8))/0x8)+parseInt(_0x3a2052(0x1d5))/0x9+-parseInt(_0x3a2052(0x1e2))/0xa*(-parseInt(_0x3a2052(0x1dc))/0xb);if(_0x28c383===_0x5aa007)break;else _0x5e538e['push'](_0x5e538e['shift']());}catch(_0x3d18c8){_0x5e538e['push'](_0x5e538e['shift']());}}}(a50_0x820b,0x889a0));import{readScopedConfig}from'../../commands/config/shared.js';function a50_0x820b(){const _0x122a3a=['110989iQnYZT','global','20464XxuvbI','bool','List\x20all\x20config\x20values','read','11zogDnR','553EvEQKn','910wRZYrj','22156YGRfzl','18upZoGH','1787151GcCJrQ','30456590ngfJgF','676194qpnjmQ','list','244746OFEynh'];a50_0x820b=function(){return _0x122a3a;};return a50_0x820b();}import{readConfig}from'../../utils/config.js';async function execute(_0x3ca65a){const _0x29f4e0=a50_0x6ea4,_0xcaa08=_0x3ca65a[_0x29f4e0(0x1d9)](_0x29f4e0(0x1d7))?readScopedConfig(_0x29f4e0(0x1d7)):readConfig();return{'ok':!![],'data':_0xcaa08};}export const configListDefinition={'service':'config','command':a50_0x14e9f6(0x1d4),'description':a50_0x14e9f6(0x1da),'risk':a50_0x14e9f6(0x1db),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':'boolean','description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a51_0x2106cc=a51_0x1146;function a51_0x5768(){const _0x20db0b=['str','501RtLlMB','riskLevel','env','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Project','appcode','Invalid\x20locale\x20value.','6obAPtU','\x22.\x20Allowed:\x20','config','5521352bfYhRo','445700mBnYkz','\x20app\x20add\x20<name>\x20--appcode\x20','write','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','string','16056PgLlQt','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Usage:\x20','1903713aewtdW','join','Settable\x20top-level\x20keys:\x20','1568200tyDawa','775104lQXnrd','`,\x20`','Config\x20value','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Top-level\x20key\x20\x22','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','value','Use\x20`','object','key','1810efUJEy','apps','Set\x20a\x20config\x20value','9zPpemf','\x22\x20is\x20not\x20settable.','length','includes','global','locale','app','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','validation','set','Invalid\x20value\x20for\x20\x22','Missing\x20key.','556CoFCXh','boolean','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','keys'];a51_0x5768=function(){return _0x20db0b;};return a51_0x5768();}function a51_0x1146(_0x1788d5,_0x11c5da){_0x1788d5=_0x1788d5-0xb3;const _0x576886=a51_0x5768();let _0x114618=_0x576886[_0x1788d5];return _0x114618;}(function(_0x64539e,_0x5554ab){const _0x4dd67b=a51_0x1146,_0x497792=_0x64539e();while(!![]){try{const _0x5eebc6=-parseInt(_0x4dd67b(0xdd))/0x1*(-parseInt(_0x4dd67b(0xce))/0x2)+parseInt(_0x4dd67b(0xe2))/0x3*(-parseInt(_0x4dd67b(0xbd))/0x4)+-parseInt(_0x4dd67b(0xb7))/0x5+-parseInt(_0x4dd67b(0xb3))/0x6*(-parseInt(_0x4dd67b(0xc0))/0x7)+parseInt(_0x4dd67b(0xb6))/0x8*(parseInt(_0x4dd67b(0xd1))/0x9)+-parseInt(_0x4dd67b(0xc3))/0xa+-parseInt(_0x4dd67b(0xc4))/0xb;if(_0x5eebc6===_0x5554ab)break;else _0x497792['push'](_0x497792['shift']());}catch(_0x37518a){_0x497792['push'](_0x497792['shift']());}}}(a51_0x5768,0x74d52));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x35e00d){const _0x34e318=a51_0x1146,_0x139035=_0x35e00d[_0x34e318(0xe1)](_0x34e318(0xcd)),_0x1ff1af=_0x35e00d[_0x34e318(0xe1)]('value');if(!_0x139035)throw CliErrors['validation'](_0x34e318(0xdc),_0x34e318(0xbf)+CLI_BIN_NAME+_0x34e318(0xd8));if(_0x1ff1af===undefined||_0x1ff1af==='')throw CliErrors[_0x34e318(0xd9)]('Missing\x20value.',_0x34e318(0xbf)+CLI_BIN_NAME+_0x34e318(0xd8));if(_0x1ff1af['length']>0x1f4)throw CliErrors[_0x34e318(0xd9)](_0x34e318(0xbb));if(!isTopLevelConfigKey(_0x139035))throw CliErrors[_0x34e318(0xd9)](_0x34e318(0xc8)+_0x139035+_0x34e318(0xd2),_0x34e318(0xc2)+getTopLevelConfigKeySummary());if(_0x139035===_0x34e318(0xe3))throw CliErrors['validation'](_0x34e318(0xbe));if(CONFIG_ENUM_VALUES[_0x139035]&&!CONFIG_ENUM_VALUES[_0x139035][_0x34e318(0xd4)](_0x1ff1af))throw CliErrors[_0x34e318(0xd9)](_0x34e318(0xdb)+_0x139035+_0x34e318(0xb4)+CONFIG_ENUM_VALUES[_0x139035][_0x34e318(0xc1)](',\x20'));if(_0x139035===_0x34e318(0xd6)&&!normalizeLocale(_0x1ff1af))throw CliErrors[_0x34e318(0xd9)](_0x34e318(0xe8),_0x34e318(0xe5));const _0x40d936={'global':_0x35e00d['bool'](_0x34e318(0xd5))},_0x8693fc=resolveWriteScope(_0x40d936),_0x295867=readScopedConfig(_0x8693fc);let _0x2d8833=_0x139035,_0x21e17e=_0x1ff1af;_0x139035===_0x34e318(0xd7)&&(_0x2d8833=_0x34e318(0xe7),delete _0x295867['app']);_0x139035===_0x34e318(0xd6)&&(_0x21e17e=normalizeLocale(_0x1ff1af));if(_0x139035===_0x34e318(0xe4)){_0x21e17e=normalizeEnv(_0x1ff1af);if(!isProduction(_0x21e17e)&&!isDaily(_0x21e17e))throw CliErrors[_0x34e318(0xd9)](_0x34e318(0xba),_0x34e318(0xc7));}if(_0x139035===_0x34e318(0xe7)){const _0x259ebf=_0x295867[_0x34e318(0xcf)]&&typeof _0x295867[_0x34e318(0xcf)]===_0x34e318(0xcc)?Object[_0x34e318(0xe0)](_0x295867[_0x34e318(0xcf)]):[];if(_0x259ebf[_0x34e318(0xd3)]>0x0)throw CliErrors[_0x34e318(0xd9)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x34e318(0xcb)+CLI_BIN_NAME+_0x34e318(0xb8)+_0x21e17e+_0x34e318(0xc5)+CLI_BIN_NAME+_0x34e318(0xdf));const _0x1c61f7=buildCanonicalProjectConfig({..._0x295867},{'appCodes':[_0x21e17e],'env':typeof _0x295867['env']===_0x34e318(0xbc)?_0x295867['env']:undefined});writeScopedConfig(_0x1c61f7,_0x8693fc);const _0x2ba959=_0x8693fc===_0x34e318(0xd5)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x2ba959+'\x20appcode\x20set\x20to:\x20'+_0x21e17e+_0x34e318(0xc9)};}_0x295867[_0x2d8833]=_0x21e17e,writeScopedConfig(_0x295867,_0x8693fc);const _0x20c0fd=_0x8693fc===_0x34e318(0xd5)?'Global':_0x34e318(0xe6);return{'ok':!![],'message':'✓\x20'+_0x20c0fd+'\x20'+_0x2d8833+'\x20set\x20to:\x20'+_0x21e17e};}export const configSetDefinition={'service':a51_0x2106cc(0xb5),'command':a51_0x2106cc(0xda),'description':a51_0x2106cc(0xd0),'risk':a51_0x2106cc(0xb9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x2106cc(0xcd),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a51_0x2106cc(0xca),'type':a51_0x2106cc(0xbc),'description':a51_0x2106cc(0xc6),'required':!![]},{'name':a51_0x2106cc(0xd5),'type':a51_0x2106cc(0xde),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a51_0x5b1100=a51_0x4047;(function(_0x37955d,_0x185f0a){const _0x28e604=a51_0x4047,_0xff86f1=_0x37955d();while(!![]){try{const _0xe76715=-parseInt(_0x28e604(0x7d))/0x1*(parseInt(_0x28e604(0x8f))/0x2)+-parseInt(_0x28e604(0x7a))/0x3+-parseInt(_0x28e604(0x91))/0x4+parseInt(_0x28e604(0x6e))/0x5+parseInt(_0x28e604(0x96))/0x6+-parseInt(_0x28e604(0x73))/0x7*(-parseInt(_0x28e604(0x67))/0x8)+parseInt(_0x28e604(0x87))/0x9;if(_0xe76715===_0x185f0a)break;else _0xff86f1['push'](_0xff86f1['shift']());}catch(_0x3624ed){_0xff86f1['push'](_0xff86f1['shift']());}}}(a51_0x1455,0xbd067));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a51_0x4047(_0x3728f3,_0x553407){_0x3728f3=_0x3728f3-0x67;const _0x145500=a51_0x1455();let _0x4047a0=_0x145500[_0x3728f3];return _0x4047a0;}import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a51_0x1455(){const _0x4d33e1=['boolean','Invalid\x20locale\x20value.','Project','228eKnkLw','key','6127884OtKEXj','str','validation','Settable\x20top-level\x20keys:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','1430574PtZezO','2402280TRgsgw','object','riskLevel','Invalid\x20value\x20for\x20\x22','length','join','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','2372555Ajbdxr','Config\x20value','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Usage:\x20','env','21trkTbU','apps','Top-level\x20key\x20\x22','Use\x20`','string','\x20app\x20add\x20<name>\x20--appcode\x20','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','899355XoxLSO','includes','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','77rMOqzf','locale','bool','set','value','Global','Missing\x20key.','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Set\x20a\x20config\x20value','keys','9008874qfTpfb','\x22\x20is\x20not\x20settable.','global','appcode','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US'];a51_0x1455=function(){return _0x4d33e1;};return a51_0x1455();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0xe2a7dd){const _0x245efa=a51_0x4047,_0x339e66=_0xe2a7dd[_0x245efa(0x92)](_0x245efa(0x90)),_0x2cf158=_0xe2a7dd[_0x245efa(0x92)](_0x245efa(0x81));if(!_0x339e66)throw CliErrors['validation'](_0x245efa(0x83),_0x245efa(0x71)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x2cf158===undefined||_0x2cf158==='')throw CliErrors[_0x245efa(0x93)]('Missing\x20value.',_0x245efa(0x71)+CLI_BIN_NAME+_0x245efa(0x6d));if(_0x2cf158[_0x245efa(0x6b)]>0x1f4)throw CliErrors[_0x245efa(0x93)](_0x245efa(0x70));if(!isTopLevelConfigKey(_0x339e66))throw CliErrors[_0x245efa(0x93)](_0x245efa(0x75)+_0x339e66+_0x245efa(0x88),_0x245efa(0x94)+getTopLevelConfigKeySummary());if(_0x339e66===_0x245efa(0x69))throw CliErrors[_0x245efa(0x93)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x339e66]&&!CONFIG_ENUM_VALUES[_0x339e66][_0x245efa(0x7b)](_0x2cf158))throw CliErrors[_0x245efa(0x93)](_0x245efa(0x6a)+_0x339e66+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x339e66][_0x245efa(0x6c)](',\x20'));if(_0x339e66==='locale'&&!normalizeLocale(_0x2cf158))throw CliErrors['validation'](_0x245efa(0x8d),_0x245efa(0x8b));const _0x30ba42={'global':_0xe2a7dd[_0x245efa(0x7f)](_0x245efa(0x89))},_0x415b47=resolveWriteScope(_0x30ba42),_0x1035c7=readScopedConfig(_0x415b47);let _0x5668ca=_0x339e66,_0x563e1e=_0x2cf158;_0x339e66==='app'&&(_0x5668ca='appcode',delete _0x1035c7['app']);_0x339e66===_0x245efa(0x7e)&&(_0x563e1e=normalizeLocale(_0x2cf158));if(_0x339e66==='env'){_0x563e1e=normalizeEnv(_0x2cf158);if(!isProduction(_0x563e1e)&&!isDaily(_0x563e1e))throw CliErrors[_0x245efa(0x93)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x245efa(0x95));}if(_0x339e66===_0x245efa(0x8a)){const _0x2e8742=_0x1035c7[_0x245efa(0x74)]&&typeof _0x1035c7['apps']===_0x245efa(0x68)?Object[_0x245efa(0x86)](_0x1035c7['apps']):[];if(_0x2e8742[_0x245efa(0x6b)]>0x0)throw CliErrors[_0x245efa(0x93)](_0x245efa(0x79),_0x245efa(0x76)+CLI_BIN_NAME+_0x245efa(0x78)+_0x563e1e+'`,\x20`'+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x7deb7=buildCanonicalProjectConfig({..._0x1035c7},{'appCodes':[_0x563e1e],'env':typeof _0x1035c7[_0x245efa(0x72)]===_0x245efa(0x77)?_0x1035c7[_0x245efa(0x72)]:undefined});writeScopedConfig(_0x7deb7,_0x415b47);const _0x59cff9=_0x415b47===_0x245efa(0x89)?'Global':_0x245efa(0x8e);return{'ok':!![],'message':'✓\x20'+_0x59cff9+'\x20appcode\x20set\x20to:\x20'+_0x563e1e+_0x245efa(0x7c)};}_0x1035c7[_0x5668ca]=_0x563e1e,writeScopedConfig(_0x1035c7,_0x415b47);const _0x1fa626=_0x415b47==='global'?_0x245efa(0x82):_0x245efa(0x8e);return{'ok':!![],'message':'✓\x20'+_0x1fa626+'\x20'+_0x5668ca+'\x20set\x20to:\x20'+_0x563e1e};}export const configSetDefinition={'service':'config','command':a51_0x5b1100(0x80),'description':a51_0x5b1100(0x85),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x5b1100(0x90),'type':a51_0x5b1100(0x77),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a51_0x5b1100(0x81),'type':a51_0x5b1100(0x77),'description':a51_0x5b1100(0x6f),'required':!![]},{'name':'global','type':a51_0x5b1100(0x8c),'description':a51_0x5b1100(0x84),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x12cb42,_0x2b0b3c){var _0x9de955=a52_0x4789,_0xe0fc70=_0x12cb42();while(!![]){try{var _0x49d17d=-parseInt(_0x9de955(0x1d6))/0x1+-parseInt(_0x9de955(0x1e0))/0x2*(-parseInt(_0x9de955(0x1e5))/0x3)+parseInt(_0x9de955(0x1d8))/0x4*(parseInt(_0x9de955(0x1dd))/0x5)+parseInt(_0x9de955(0x1d9))/0x6*(parseInt(_0x9de955(0x1dc))/0x7)+parseInt(_0x9de955(0x1db))/0x8+parseInt(_0x9de955(0x1e3))/0x9*(-parseInt(_0x9de955(0x1e2))/0xa)+-parseInt(_0x9de955(0x1e4))/0xb;if(_0x49d17d===_0x2b0b3c)break;else _0xe0fc70['push'](_0xe0fc70['shift']());}catch(_0x1304b9){_0xe0fc70['push'](_0xe0fc70['shift']());}}}(a52_0x3ca2,0x947a6));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a52_0x4789(_0x495b3d,_0x2b6241){_0x495b3d=_0x495b3d-0x1d6;var _0x3ca2fb=a52_0x3ca2();var _0x478910=_0x3ca2fb[_0x495b3d];return _0x478910;}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};function a52_0x3ca2(){var _0xac56b4=['7812761MWRkhV','3pCJNbX','368942QzjUsX','project','20WjoHov','13626tUlguG','validation','5453864CBtFHS','3171wUWthC','84155XjCtFs','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','global','1789534yKBDru','\x20init`\x20first.','10HuaDeW','9018531KLTJkQ'];a52_0x3ca2=function(){return _0xac56b4;};return a52_0x3ca2();}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x4db2fe){var _0x26defa=a52_0x4789;if(_0x4db2fe[_0x26defa(0x1df)])return _0x26defa(0x1df);if(!isInProject())throw CliErrors[_0x26defa(0x1da)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x26defa(0x1de)+CLI_BIN_NAME+_0x26defa(0x1e1));return _0x26defa(0x1d7);}export function readScopedConfig(_0x5cac06){return readConfigFile(resolveWriteConfigPath(_0x5cac06));}export function writeScopedConfig(_0x3f9968,_0x433a5f){writeConfigFile(resolveWriteConfigPath(_0x433a5f),_0x3f9968);}
1
+ function a52_0x4949(){var _0x366e2f=['1491473TnOdeX','project','10472424zgeuqE','global','13277230XQDpIG','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','87380smceyu','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','150yGvYrA','2XMQvPh','14vHFhTd','79194OvtcLU','46094378ydEJoV','762546iuTyLP','validation','9CxwXcu'];a52_0x4949=function(){return _0x366e2f;};return a52_0x4949();}(function(_0x1a0db6,_0x1b341c){var _0x54d39a=a52_0x5f57,_0x1e874a=_0x1a0db6();while(!![]){try{var _0x1795bf=-parseInt(_0x54d39a(0x1d2))/0x1+-parseInt(_0x54d39a(0x1cb))/0x2*(parseInt(_0x54d39a(0x1cd))/0x3)+-parseInt(_0x54d39a(0x1d8))/0x4*(-parseInt(_0x54d39a(0x1ca))/0x5)+-parseInt(_0x54d39a(0x1cf))/0x6*(-parseInt(_0x54d39a(0x1cc))/0x7)+-parseInt(_0x54d39a(0x1d4))/0x8+parseInt(_0x54d39a(0x1d1))/0x9*(-parseInt(_0x54d39a(0x1d6))/0xa)+parseInt(_0x54d39a(0x1ce))/0xb;if(_0x1795bf===_0x1b341c)break;else _0x1e874a['push'](_0x1e874a['shift']());}catch(_0x30bdb3){_0x1e874a['push'](_0x1e874a['shift']());}}}(a52_0x4949,0xe6c83));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(_0x397610){var _0xe04a7=a52_0x5f57;if(_0x397610[_0xe04a7(0x1d5)])return'global';if(!isInProject())throw CliErrors[_0xe04a7(0x1d0)](_0xe04a7(0x1d7),_0xe04a7(0x1d9)+CLI_BIN_NAME+'\x20init`\x20first.');return _0xe04a7(0x1d3);}export function readScopedConfig(_0x34f699){return readConfigFile(resolveWriteConfigPath(_0x34f699));}function a52_0x5f57(_0x107c9e,_0x4df427){_0x107c9e=_0x107c9e-0x1ca;var _0x494926=a52_0x4949();var _0x5f57bf=_0x494926[_0x107c9e];return _0x5f57bf;}export function writeScopedConfig(_0x23c61c,_0x26c1fe){writeConfigFile(resolveWriteConfigPath(_0x26c1fe),_0x23c61c);}
@@ -1 +1 @@
1
- function a53_0x1d75(){const _0x408465=['join','\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}]','995160DFwLUz','Filter\x20dataset\x20records\x20with\x20query\x20conditions','filter','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','7715EfbXjJ','\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]','70666OHhEYi','114413yWuzsw','126132mPsMGe','5322282ZZfTdR','526422TLgMji','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)'];a53_0x1d75=function(){return _0x408465;};return a53_0x1d75();}const a53_0xbb2484=a53_0x2c71;(function(_0x4c4286,_0xed1ab5){const _0x27deba=a53_0x2c71,_0x57767a=_0x4c4286();while(!![]){try{const _0x27924d=-parseInt(_0x27deba(0x150))/0x1+-parseInt(_0x27deba(0x14f))/0x2+-parseInt(_0x27deba(0x151))/0x3+-parseInt(_0x27deba(0x149))/0x4+parseInt(_0x27deba(0x14d))/0x5+parseInt(_0x27deba(0x144))/0x6+parseInt(_0x27deba(0x152))/0x7;if(_0x27924d===_0xed1ab5)break;else _0x57767a['push'](_0x57767a['shift']());}catch(_0x1062b3){_0x57767a['push'](_0x57767a['shift']());}}}(a53_0x1d75,0x63dc2));import{buildDataCommand}from'../../commands/data/shared.js';function a53_0x2c71(_0x1d09ea,_0x697c6f){_0x1d09ea=_0x1d09ea-0x144;const _0x1d75b3=a53_0x1d75();let _0x2c71ad=_0x1d75b3[_0x1d09ea];return _0x2c71ad;}export const dataFilter=buildDataCommand({'command':a53_0xbb2484(0x14b),'operation':a53_0xbb2484(0x14b),'description':a53_0xbb2484(0x14a),'paramsRequired':![],'paramsHint':a53_0xbb2484(0x145),'helpExtra':[a53_0xbb2484(0x146),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a53_0xbb2484(0x14e),a53_0xbb2484(0x148),a53_0xbb2484(0x14c),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a53_0xbb2484(0x147)]('\x0a')});
1
+ const a53_0x576aeb=a53_0x1358;(function(_0x1c5c5c,_0x625aa3){const _0xb62511=a53_0x1358,_0x136fe6=_0x1c5c5c();while(!![]){try{const _0x425ed2=parseInt(_0xb62511(0x92))/0x1+parseInt(_0xb62511(0x8e))/0x2*(parseInt(_0xb62511(0x96))/0x3)+parseInt(_0xb62511(0x9a))/0x4+parseInt(_0xb62511(0x9c))/0x5+-parseInt(_0xb62511(0x95))/0x6*(parseInt(_0xb62511(0x99))/0x7)+parseInt(_0xb62511(0x8d))/0x8+parseInt(_0xb62511(0x9b))/0x9*(-parseInt(_0xb62511(0x98))/0xa);if(_0x425ed2===_0x625aa3)break;else _0x136fe6['push'](_0x136fe6['shift']());}catch(_0x5467a7){_0x136fe6['push'](_0x136fe6['shift']());}}}(a53_0x64b6,0xabc34));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a53_0x576aeb(0x97),'operation':a53_0x576aeb(0x97),'description':a53_0x576aeb(0x8b),'paramsRequired':![],'paramsHint':a53_0x576aeb(0x8a),'helpExtra':[a53_0x576aeb(0x93),a53_0x576aeb(0x8f),a53_0x576aeb(0x90),a53_0x576aeb(0x94),a53_0x576aeb(0x91),a53_0x576aeb(0x89)][a53_0x576aeb(0x8c)]('\x0a')});function a53_0x1358(_0x28590e,_0xb0c217){_0x28590e=_0x28590e-0x89;const _0x64b69d=a53_0x64b6();let _0x135876=_0x64b69d[_0x28590e];return _0x135876;}function a53_0x64b6(){const _0x468c88=['21uiierc','filter','7845640CxzyeM','385RkvVFa','1421172uBUTQB','27ydfUuM','6646695oVABjA','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Filter\x20dataset\x20records\x20with\x20query\x20conditions','join','8876296zoBTfW','66890ktjmJN','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','747138PKWnKE','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\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}]','78348IPxZAl'];a53_0x64b6=function(){return _0x468c88;};return a53_0x64b6();}
@@ -1 +1 @@
1
- const a54_0x5ef270=a54_0x189c;function a54_0x75f2(){const _0x194400=['JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','760170QkZnyW','28TqtlDa','5048424zwaYLu','getOne','291515nvOITO','79877eCakor','6001616xhkBHG','1761333vHDMju','Get\x20a\x20single\x20record\x20by\x20ID','318DIktBK','631131BjQMhb'];a54_0x75f2=function(){return _0x194400;};return a54_0x75f2();}(function(_0x2bd444,_0x490865){const _0x1b52c0=a54_0x189c,_0x500447=_0x2bd444();while(!![]){try{const _0x5b8674=parseInt(_0x1b52c0(0x168))/0x1+parseInt(_0x1b52c0(0x15e))/0x2+parseInt(_0x1b52c0(0x165))/0x3+-parseInt(_0x1b52c0(0x15f))/0x4*(parseInt(_0x1b52c0(0x162))/0x5)+-parseInt(_0x1b52c0(0x167))/0x6*(parseInt(_0x1b52c0(0x163))/0x7)+-parseInt(_0x1b52c0(0x164))/0x8+parseInt(_0x1b52c0(0x160))/0x9;if(_0x5b8674===_0x490865)break;else _0x500447['push'](_0x500447['shift']());}catch(_0x7c368a){_0x500447['push'](_0x500447['shift']());}}}(a54_0x75f2,0x60b7d));function a54_0x189c(_0x5a99bd,_0x1d8d2c){_0x5a99bd=_0x5a99bd-0x15d;const _0x75f2d2=a54_0x75f2();let _0x189cba=_0x75f2d2[_0x5a99bd];return _0x189cba;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a54_0x5ef270(0x161),'operation':'getOne','description':a54_0x5ef270(0x166),'paramsRequired':!![],'paramsHint':a54_0x5ef270(0x15d)});
1
+ function a54_0x5c93(){const _0x34a930=['7UFxfEe','8078620VxveKO','27288WxeAEZ','Get\x20a\x20single\x20record\x20by\x20ID','686802aMhmSi','29445pRqelP','1552310zhvJBm','837sZlPpS','171626FqQqDF','225052ooqVAs','6NFQOuW','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'];a54_0x5c93=function(){return _0x34a930;};return a54_0x5c93();}const a54_0x480da7=a54_0x531b;(function(_0x330d08,_0x4b9db7){const _0x22e7b8=a54_0x531b,_0x3e03bb=_0x330d08();while(!![]){try{const _0x1cd730=parseInt(_0x22e7b8(0x10e))/0x1+parseInt(_0x22e7b8(0x111))/0x2+-parseInt(_0x22e7b8(0x113))/0x3*(-parseInt(_0x22e7b8(0x112))/0x4)+parseInt(_0x22e7b8(0x10f))/0x5+-parseInt(_0x22e7b8(0x10d))/0x6*(-parseInt(_0x22e7b8(0x109))/0x7)+-parseInt(_0x22e7b8(0x10b))/0x8*(-parseInt(_0x22e7b8(0x110))/0x9)+-parseInt(_0x22e7b8(0x10a))/0xa;if(_0x1cd730===_0x4b9db7)break;else _0x3e03bb['push'](_0x3e03bb['shift']());}catch(_0x68f6cc){_0x3e03bb['push'](_0x3e03bb['shift']());}}}(a54_0x5c93,0x2791a));import{buildDataCommand}from'../../commands/data/shared.js';function a54_0x531b(_0x4bd264,_0x38d202){_0x4bd264=_0x4bd264-0x108;const _0x5c93da=a54_0x5c93();let _0x531ba9=_0x5c93da[_0x4bd264];return _0x531ba9;}export const dataGetOne=buildDataCommand({'command':'getOne','operation':'getOne','description':a54_0x480da7(0x10c),'paramsRequired':!![],'paramsHint':a54_0x480da7(0x108)});
@@ -1 +1 @@
1
- (function(_0x27f5bf,_0x14f713){const _0x4deb5c=a55_0x4152,_0x1c32e6=_0x27f5bf();while(!![]){try{const _0x28aaa9=parseInt(_0x4deb5c(0x10b))/0x1+-parseInt(_0x4deb5c(0x10f))/0x2+-parseInt(_0x4deb5c(0x10a))/0x3+parseInt(_0x4deb5c(0x10d))/0x4+-parseInt(_0x4deb5c(0x110))/0x5*(-parseInt(_0x4deb5c(0x109))/0x6)+parseInt(_0x4deb5c(0x10e))/0x7*(parseInt(_0x4deb5c(0x10c))/0x8)+parseInt(_0x4deb5c(0x111))/0x9;if(_0x28aaa9===_0x14f713)break;else _0x1c32e6['push'](_0x1c32e6['shift']());}catch(_0xac6b21){_0x1c32e6['push'](_0x1c32e6['shift']());}}}(a55_0x1ab2,0xad232));function a55_0x1ab2(){const _0x34d0bf=['12805956LrigZh','3936PWzXWZ','1774944TiLTxY','129964btFniy','7088hVwBsV','2050464MzmkDl','245qIcAxs','2066256cauWwm','1810xnuYyF'];a55_0x1ab2=function(){return _0x34d0bf;};return a55_0x1ab2();}function a55_0x4152(_0x54d046,_0x474969){_0x54d046=_0x54d046-0x109;const _0x1ab24d=a55_0x1ab2();let _0x415231=_0x1ab24d[_0x54d046];return _0x415231;}import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
1
+ (function(_0x5e3f62,_0x223256){const _0x3b7404=a55_0x2f0b,_0x2b1935=_0x5e3f62();while(!![]){try{const _0x38c453=-parseInt(_0x3b7404(0x106))/0x1+-parseInt(_0x3b7404(0x10b))/0x2+parseInt(_0x3b7404(0x10d))/0x3*(parseInt(_0x3b7404(0x10e))/0x4)+parseInt(_0x3b7404(0x10a))/0x5+-parseInt(_0x3b7404(0x107))/0x6*(-parseInt(_0x3b7404(0x108))/0x7)+-parseInt(_0x3b7404(0x105))/0x8*(-parseInt(_0x3b7404(0x109))/0x9)+-parseInt(_0x3b7404(0x10c))/0xa;if(_0x38c453===_0x223256)break;else _0x2b1935['push'](_0x2b1935['shift']());}catch(_0x25a750){_0x2b1935['push'](_0x2b1935['shift']());}}}(a55_0x31ce,0xd4c80));import{dataFilter}from'../../commands/data/filter.js';function a55_0x2f0b(_0x472720,_0x332855){_0x472720=_0x472720-0x105;const _0x31ce05=a55_0x31ce();let _0x2f0b80=_0x31ce05[_0x472720];return _0x2f0b80;}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];function a55_0x31ce(){const _0x4f8c80=['4884030poEiGi','60NFtSPt','30788gwpZRF','1688NQtJpX','1599163PmEEHz','435162HxahNw','161xILNUC','56421SAzakw','1968125JZWiJk','1158654IeKRRa'];a55_0x31ce=function(){return _0x4f8c80;};return a55_0x31ce();}
@@ -1 +1 @@
1
- (function(_0x1ead63,_0x57062b){const _0x4bd52c=a56_0x373d,_0x5cdde2=_0x1ead63();while(!![]){try{const _0x2840f2=-parseInt(_0x4bd52c(0x172))/0x1*(parseInt(_0x4bd52c(0x164))/0x2)+-parseInt(_0x4bd52c(0x17d))/0x3*(-parseInt(_0x4bd52c(0x16b))/0x4)+parseInt(_0x4bd52c(0x168))/0x5+parseInt(_0x4bd52c(0x16a))/0x6*(-parseInt(_0x4bd52c(0x16d))/0x7)+-parseInt(_0x4bd52c(0x16e))/0x8*(parseInt(_0x4bd52c(0x161))/0x9)+parseInt(_0x4bd52c(0x15f))/0xa+parseInt(_0x4bd52c(0x17b))/0xb;if(_0x2840f2===_0x57062b)break;else _0x5cdde2['push'](_0x5cdde2['shift']());}catch(_0x3f1198){_0x5cdde2['push'](_0x5cdde2['shift']());}}}(a56_0x551b,0xb04fa));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 a56_0x551b(){const _0x577446=['params','9DCksdC','alias','description','127766vpOWTq','paramsRequired','compress','flagMissing','4357680PLWBat','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','132240xcYcrl','124dwwkcn','str','343dUesFD','436336wreajJ','paramsHint','validation','appCode','22aVEDJE','helpExtra','getOne','string','now','data','operation','code','data\x20','18650016VjABKy','\x20completed\x20in\x20','5790LYXISH','command','6352760vmKsFZ'];a56_0x551b=function(){return _0x577446;};return a56_0x551b();}function a56_0x373d(_0x30698a,_0x1c1ae1){_0x30698a=_0x30698a-0x15f;const _0x551b0e=a56_0x551b();let _0x373d57=_0x551b0e[_0x30698a];return _0x373d57;}function assertGetOneId(_0x51df47){const _0x543958=a56_0x373d;if(!_0x51df47)throw CliErrors[_0x543958(0x167)](_0x543958(0x160),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x32dfe0=_0x51df47['id'];if(_0x32dfe0===undefined||_0x32dfe0===null||_0x32dfe0==='')throw CliErrors[_0x543958(0x170)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x543958(0x169));}function parseCommandParams(_0x1a4a0a){return parseJsonParams(_0x1a4a0a)??{};}export function buildDataCommand(_0x17c02f){const _0x4eb053=a56_0x373d,_0x3fce46='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x4eb053(0x177),'command':_0x17c02f[_0x4eb053(0x17e)],'description':_0x17c02f[_0x4eb053(0x163)],'risk':'read','defaultOutputFormat':_0x4eb053(0x166),'helpExtra':_0x17c02f[_0x4eb053(0x173)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x4eb053(0x162),'type':_0x4eb053(0x175),'description':_0x3fce46},{'name':_0x4eb053(0x160),'type':'string','description':_0x17c02f[_0x4eb053(0x16f)]}],async 'validate'(_0x549b88){const _0x5179ec=_0x4eb053,_0x2e3021=_0x549b88[_0x5179ec(0x16c)](_0x5179ec(0x160));if(_0x17c02f[_0x5179ec(0x165)]&&!_0x2e3021)throw CliErrors[_0x5179ec(0x167)](_0x5179ec(0x160),_0x17c02f[_0x5179ec(0x16f)]);const _0x3b4118=parseJsonParams(_0x2e3021);_0x17c02f[_0x5179ec(0x178)]===_0x5179ec(0x174)&&assertGetOneId(_0x3b4118);},async 'execute'(_0x219b69){const _0x507684=_0x4eb053,_0x21ceb1=parseCommandParams(_0x219b69[_0x507684(0x16c)](_0x507684(0x160))),_0x28ceec=Date[_0x507684(0x176)](),_0x2dac09=await executeDatasetDataOperation(_0x219b69[_0x507684(0x171)],_0x219b69['str'](_0x507684(0x179)),_0x17c02f[_0x507684(0x178)],_0x21ceb1),_0x32c423=Date[_0x507684(0x176)]()-_0x28ceec;return{'ok':!![],'data':{'result':_0x2dac09,'elapsed':_0x32c423},'message':_0x507684(0x17a)+_0x17c02f['command']+_0x507684(0x17c)+_0x32c423+'ms'};}};}
1
+ function a56_0x47a5(_0x2bc646,_0x39861c){_0x2bc646=_0x2bc646-0xf4;const _0x3e71e2=a56_0x3e71();let _0x47a549=_0x3e71e2[_0x2bc646];return _0x47a549;}(function(_0x348d17,_0x12e475){const _0x5bf1c3=a56_0x47a5,_0xebf33d=_0x348d17();while(!![]){try{const _0x1f76ab=parseInt(_0x5bf1c3(0x109))/0x1*(parseInt(_0x5bf1c3(0xf8))/0x2)+parseInt(_0x5bf1c3(0x110))/0x3+-parseInt(_0x5bf1c3(0x106))/0x4+parseInt(_0x5bf1c3(0x100))/0x5+parseInt(_0x5bf1c3(0x104))/0x6*(parseInt(_0x5bf1c3(0x10a))/0x7)+-parseInt(_0x5bf1c3(0x108))/0x8*(parseInt(_0x5bf1c3(0xfe))/0x9)+-parseInt(_0x5bf1c3(0xff))/0xa;if(_0x1f76ab===_0x12e475)break;else _0xebf33d['push'](_0xebf33d['shift']());}catch(_0x346022){_0xebf33d['push'](_0xebf33d['shift']());}}}(a56_0x3e71,0xd59b3));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(_0x450adf){const _0x4f3265=a56_0x47a5;if(!_0x450adf)throw CliErrors[_0x4f3265(0xfc)](_0x4f3265(0x10f),_0x4f3265(0x10e));const _0x5f02df=_0x450adf['id'];if(_0x5f02df===undefined||_0x5f02df===null||_0x5f02df==='')throw CliErrors[_0x4f3265(0xf9)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x4f3265(0x102));}function parseCommandParams(_0x28e1d9){return parseJsonParams(_0x28e1d9)??{};}function a56_0x3e71(){const _0x431434=['Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','161524DruYzJ','appCode','104XLdegF','1343PpIynR','161GFIRzP','code','alias','\x20completed\x20in\x20','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','params','2498541ZgyRqQ','paramsRequired','paramsHint','operation','str','1644pMHGjG','validation','description','helpExtra','flagMissing','compress','195849ksYmMN','28841750wTnMUJ','7844655aWuDAj','data\x20','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','string','150432soCqMs'];a56_0x3e71=function(){return _0x431434;};return a56_0x3e71();}export function buildDataCommand(_0x62de56){const _0x3ff865=a56_0x47a5,_0x3af48a=_0x3ff865(0x105);return{'service':'data','command':_0x62de56['command'],'description':_0x62de56[_0x3ff865(0xfa)],'risk':'read','defaultOutputFormat':_0x3ff865(0xfd),'helpExtra':_0x62de56[_0x3ff865(0xfb)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x3ff865(0x10c),'type':'string','description':_0x3af48a},{'name':_0x3ff865(0x10f),'type':_0x3ff865(0x103),'description':_0x62de56['paramsHint']}],async 'validate'(_0x345de3){const _0x3cc67e=_0x3ff865,_0x14fa91=_0x345de3[_0x3cc67e(0xf7)]('params');if(_0x62de56[_0x3cc67e(0xf4)]&&!_0x14fa91)throw CliErrors[_0x3cc67e(0xfc)](_0x3cc67e(0x10f),_0x62de56[_0x3cc67e(0xf5)]);const _0x477932=parseJsonParams(_0x14fa91);_0x62de56[_0x3cc67e(0xf6)]==='getOne'&&assertGetOneId(_0x477932);},async 'execute'(_0x202e56){const _0x62f20d=_0x3ff865,_0x4b22fc=parseCommandParams(_0x202e56[_0x62f20d(0xf7)](_0x62f20d(0x10f))),_0x145694=Date['now'](),_0x4196e2=await executeDatasetDataOperation(_0x202e56[_0x62f20d(0x107)],_0x202e56[_0x62f20d(0xf7)](_0x62f20d(0x10b)),_0x62de56[_0x62f20d(0xf6)],_0x4b22fc),_0x538a03=Date['now']()-_0x145694;return{'ok':!![],'data':{'result':_0x4196e2,'elapsed':_0x538a03},'message':_0x62f20d(0x101)+_0x62de56['command']+_0x62f20d(0x10d)+_0x538a03+'ms'};}};}
@@ -1 +1 @@
1
- const a57_0x1beb24=a57_0x2c80;(function(_0x3c4525,_0x5cf881){const _0x500821=a57_0x2c80,_0x598e4f=_0x3c4525();while(!![]){try{const _0x1ef915=parseInt(_0x500821(0x170))/0x1*(-parseInt(_0x500821(0x17d))/0x2)+-parseInt(_0x500821(0x179))/0x3+-parseInt(_0x500821(0x183))/0x4+parseInt(_0x500821(0x15c))/0x5+-parseInt(_0x500821(0x180))/0x6*(parseInt(_0x500821(0x187))/0x7)+parseInt(_0x500821(0x184))/0x8*(parseInt(_0x500821(0x17c))/0x9)+parseInt(_0x500821(0x165))/0xa;if(_0x1ef915===_0x5cf881)break;else _0x598e4f['push'](_0x598e4f['shift']());}catch(_0x2d1994){_0x598e4f['push'](_0x598e4f['shift']());}}}(a57_0x3da0,0xbd9eb));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x52bdb7,input:_0x4ff54c,dryRun:_0x51b8d8}){const _0x13e671=a57_0x2c80;validateInput(_0x4ff54c);const _0x5e379a=normalizeBusinessGroup(_0x4ff54c['businessGroup']),_0x34de1f=await getDatasetDetail(_0x4ff54c[_0x13e671(0x169)]),_0x1e66af=resolveBusinessGroupDataset(_0x34de1f,_0x4ff54c[_0x13e671(0x169)]),_0x67b4ee=loadCurrentBusinessGroup(_0x34de1f,_0x1e66af);assertExpectedBusinessGroup(_0x67b4ee,_0x4ff54c[_0x13e671(0x171)]);const _0x81476=buildBackendPayload(_0x52bdb7,_0x1e66af,_0x5e379a),_0x44be23=_0x67b4ee!==_0x5e379a;let _0x41bb80;if(_0x44be23&&!_0x51b8d8){await updateErBusinessGroup(_0x81476);const _0x57fd50=await getDatasetDetail(_0x1e66af[_0x13e671(0x169)]),_0x55eb20=resolveBusinessGroupDataset(_0x57fd50,_0x1e66af[_0x13e671(0x169)]),_0x378222=loadCurrentBusinessGroup(_0x57fd50,_0x55eb20);if(_0x378222!==_0x5e379a)throw CliErrors[_0x13e671(0x15a)](_0x13e671(0x18a),_0x13e671(0x186)+JSON[_0x13e671(0x176)](_0x5e379a)+_0x13e671(0x178)+JSON[_0x13e671(0x176)](_0x378222)+'.');_0x41bb80={'verified':!![],'status':_0x13e671(0x189),'afterReadback':{'businessGroup':_0x378222}};}else!_0x44be23&&(_0x41bb80={'verified':!![],'status':_0x13e671(0x15e),'afterReadback':{'businessGroup':_0x67b4ee}});const _0x4aa861={'operation':_0x13e671(0x167),'appCode':_0x52bdb7,'selector':{'code':_0x1e66af['code']},'dataset':_0x1e66af,'before':{'businessGroup':_0x67b4ee},'after':{'businessGroup':_0x5e379a},'changed':_0x44be23,'dryRun':_0x51b8d8,'submitted':_0x44be23&&!_0x51b8d8,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x81476},..._0x41bb80?{'verification':_0x41bb80}:{},'warnings':[]};return{'ok':!![],'data':_0x4aa861,'message':_0x44be23?_0x51b8d8?_0x13e671(0x18d)+_0x1e66af['code']:'Updated\x20business\x20model\x20group\x20for\x20dataset\x20'+_0x1e66af[_0x13e671(0x169)]:'No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20'+_0x1e66af[_0x13e671(0x169)]};}export const datasetBusinessGroupUpdate={'service':a57_0x1beb24(0x192),'command':'business-group-update','description':a57_0x1beb24(0x173),'risk':'write','flags':[CODE_FLAG,{'name':'business-group','type':'string','required':!![],'description':a57_0x1beb24(0x18f)},{'name':a57_0x1beb24(0x16b),'type':a57_0x1beb24(0x160),'required':![],'description':a57_0x1beb24(0x17a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x21dbf0){validateInput(readBusinessGroupUpdateInput(_0x21dbf0));},async 'dryRun'(_0x41ed15){const _0x16b54a=a57_0x1beb24,_0x520bfc=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x41ed15[_0x16b54a(0x16a)],'input':readBusinessGroupUpdateInput(_0x41ed15),'dryRun':!![]});return{'method':_0x16b54a(0x163),'url':BACKEND_PATH,'body':_0x520bfc['data']['backend'][_0x16b54a(0x181)],'description':_0x520bfc[_0x16b54a(0x161)],..._0x520bfc[_0x16b54a(0x15f)]};},async 'execute'(_0x1cf2d5){const _0x224501=a57_0x1beb24;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1cf2d5[_0x224501(0x16a)],'input':readBusinessGroupUpdateInput(_0x1cf2d5),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x51b0e9){const _0x22588c=a57_0x1beb24,_0x20aa94=_0x51b0e9[_0x22588c(0x164)](_0x22588c(0x16b));return{'code':trim(_0x51b0e9[_0x22588c(0x164)](_0x22588c(0x169))),'businessGroup':_0x51b0e9[_0x22588c(0x164)](_0x22588c(0x18b)),'expectBusinessGroup':_0x20aa94===undefined||_0x20aa94===''?undefined:_0x20aa94};}function validateInput(_0xfb61e0){const _0x21428e=a57_0x1beb24;if(!trim(_0xfb61e0[_0x21428e(0x169)]))throw CliErrors['validation'](_0x21428e(0x191));if(_0xfb61e0[_0x21428e(0x166)]===undefined)throw CliErrors[_0x21428e(0x177)]('--business-group\x20is\x20required');}function a57_0x3da0(){const _0x3ea537=['trim','stringify','validation',',\x20actual\x20','1926231aBXeOb','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','name','63uQzQHd','4mALPBN','number','datasetCode','198744wxkZpn','payload','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','2908464KwVTtT','1429888rGZktZ','isArray','Expected\x20','56dKzvuL','datasetName','matched','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','business-group','call','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','sourceType','New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it','found','--code\x20is\x20required','dataset','Expectation\x20mismatch\x20at\x20businessGroup','apiError','parse','7617865bnYsMr','isFinite','unchanged','data','string','message','Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','POST','str','8979530joQMEJ','businessGroup','update','extend','code','appCode','expect-business-group','DB_TABLE','modelCode','length','modelId','630905hmTboq','expectBusinessGroup','datasetId','Update\x20business\x20model\x20group','source'];a57_0x3da0=function(){return _0x3ea537;};return a57_0x3da0();}function resolveBusinessGroupDataset(_0x5e3fd2,_0xced15e){const _0x1556d1=a57_0x1beb24,_0x58a786=asPlainObject(_0x5e3fd2[_0x1556d1(0x192)]),_0x20b920=asPlainObject(_0x5e3fd2['dbtableConfig']),_0x39b739=resolveSourceType(_0x5e3fd2,_0x58a786,_0x20b920),_0xb5bd91=firstString(_0x5e3fd2[_0x1556d1(0x16d)],_0x5e3fd2[_0x1556d1(0x169)],_0x58a786[_0x1556d1(0x17f)],_0xced15e)||_0xced15e;return{'id':firstNumber(_0x5e3fd2[_0x1556d1(0x16f)],_0x5e3fd2['id'],_0x58a786[_0x1556d1(0x172)])??firstString(_0x5e3fd2['modelId'],_0x5e3fd2['id'],_0x58a786['datasetId'])??null,'code':_0xb5bd91,'name':firstString(_0x5e3fd2[_0x1556d1(0x17b)],_0x58a786[_0x1556d1(0x188)],_0x58a786[_0x1556d1(0x17b)])||null,'sourceType':_0x39b739};}function resolveSourceType(_0x41efd0,_0x48fb3e,_0x52ce28){const _0x9ecf0=a57_0x1beb24,_0x2c9846=firstString(_0x41efd0['source'],_0x41efd0[_0x9ecf0(0x18e)],_0x48fb3e[_0x9ecf0(0x174)],_0x48fb3e[_0x9ecf0(0x18e)])?.[_0x9ecf0(0x175)]()['toUpperCase']();if(_0x2c9846===_0x9ecf0(0x16c)||_0x2c9846==='METADATA')return _0x2c9846;if(Object['keys'](_0x52ce28)[_0x9ecf0(0x16e)]>0x0)return _0x9ecf0(0x16c);throw CliErrors[_0x9ecf0(0x177)](_0x9ecf0(0x182));}function loadCurrentBusinessGroup(_0x4ff44a,_0x2865f1){const _0x3ecfd0=a57_0x1beb24,_0x3fa731=readBusinessGroupFromDatasetDetail(_0x4ff44a,_0x2865f1['sourceType']);if(_0x3fa731[_0x3ecfd0(0x190)])return normalizeBusinessGroup(_0x3fa731['value']);if(_0x2865f1[_0x3ecfd0(0x18e)]==='METADATA')return'';throw CliErrors[_0x3ecfd0(0x177)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x3ecfd0(0x162));}function readBusinessGroupFromDatasetDetail(_0x2b2e90,_0x28e3ae){const _0x131f55=a57_0x1beb24,_0x488f45=asPlainObject(_0x2b2e90[_0x131f55(0x192)]),_0x8fa25c=firstPresent(_0x2b2e90[_0x131f55(0x166)]);if(_0x8fa25c['found'])return _0x8fa25c;const _0x13fee5=firstPresent(_0x488f45[_0x131f55(0x166)]);if(_0x13fee5[_0x131f55(0x190)])return _0x13fee5;if(_0x28e3ae===_0x131f55(0x16c))return{'found':![]};const _0x520d5a=readBusinessGroupFromExtend(_0x2b2e90[_0x131f55(0x168)]);if(_0x520d5a[_0x131f55(0x190)])return _0x520d5a;return readBusinessGroupFromExtend(_0x488f45['extend']);}function readBusinessGroupFromExtend(_0x271b4a){const _0x31762d=a57_0x1beb24;if(_0x271b4a===undefined||_0x271b4a===null||_0x271b4a==='')return{'found':![]};if(typeof _0x271b4a===_0x31762d(0x160))try{const _0x2f4830=JSON[_0x31762d(0x15b)](_0x271b4a);return readBusinessGroupFromExtend(_0x2f4830);}catch{return{'found':![]};}const _0x4533fa=asPlainObject(_0x271b4a);if(Object['prototype']['hasOwnProperty'][_0x31762d(0x18c)](_0x4533fa,_0x31762d(0x166)))return{'found':!![],'value':_0x4533fa[_0x31762d(0x166)]};return{'found':![]};}function firstPresent(..._0x4b6f95){for(const _0xf4c08e of _0x4b6f95){if(_0xf4c08e!==undefined&&_0xf4c08e!==null)return{'found':!![],'value':_0xf4c08e};}return{'found':![]};}function assertExpectedBusinessGroup(_0x552081,_0x18fc95){const _0x449199=a57_0x1beb24;if(_0x18fc95===undefined)return;const _0x1a6c4d=normalizeBusinessGroup(_0x18fc95);if(_0x552081!==_0x1a6c4d)throw CliErrors[_0x449199(0x177)](_0x449199(0x193),_0x449199(0x186)+JSON[_0x449199(0x176)](_0x1a6c4d)+_0x449199(0x178)+JSON[_0x449199(0x176)](_0x552081));}function buildBackendPayload(_0x53fc90,_0x156b07,_0x4ba735){const _0x6f4cb4=a57_0x1beb24;return{'appCode':_0x53fc90,'datasetCode':_0x156b07[_0x6f4cb4(0x169)],'businessGroup':_0x4ba735};}function a57_0x2c80(_0x165f3e,_0x3a604a){_0x165f3e=_0x165f3e-0x15a;const _0x3da0ac=a57_0x3da0();let _0x2c8044=_0x3da0ac[_0x165f3e];return _0x2c8044;}function normalizeBusinessGroup(_0x181b04){const _0x6e842d=a57_0x1beb24;if(_0x181b04===undefined||_0x181b04===null)return'';return String(_0x181b04)[_0x6e842d(0x175)]();}function asPlainObject(_0x186705){const _0x3a087b=a57_0x1beb24;if(!_0x186705||typeof _0x186705!=='object'||Array[_0x3a087b(0x185)](_0x186705))return{};return _0x186705;}function firstString(..._0x56f1db){const _0x518fc8=a57_0x1beb24;for(const _0x4cecdd of _0x56f1db){if(typeof _0x4cecdd==='string'&&_0x4cecdd[_0x518fc8(0x175)]())return _0x4cecdd[_0x518fc8(0x175)]();if(typeof _0x4cecdd==='number'&&Number[_0x518fc8(0x15d)](_0x4cecdd))return String(_0x4cecdd);}return undefined;}function firstNumber(..._0x210be0){const _0x32496d=a57_0x1beb24;for(const _0x378fb4 of _0x210be0){if(typeof _0x378fb4===_0x32496d(0x17e)&&Number[_0x32496d(0x15d)](_0x378fb4))return _0x378fb4;if(typeof _0x378fb4===_0x32496d(0x160)&&_0x378fb4['trim']()&&Number['isFinite'](Number(_0x378fb4)))return Number(_0x378fb4);}return null;}function trim(_0x548285){const _0x5a0127=a57_0x1beb24;return String(_0x548285||'')[_0x5a0127(0x175)]();}
1
+ const a57_0x391ec3=a57_0x1b46;function a57_0x1b46(_0x2fc4f4,_0x37deb9){_0x2fc4f4=_0x2fc4f4-0xfa;const _0x507da0=a57_0x507d();let _0x1b46d8=_0x507da0[_0x2fc4f4];return _0x1b46d8;}(function(_0x5cde23,_0x248d20){const _0x596483=a57_0x1b46,_0x1e555c=_0x5cde23();while(!![]){try{const _0x150f0e=parseInt(_0x596483(0x107))/0x1+-parseInt(_0x596483(0x128))/0x2*(-parseInt(_0x596483(0x110))/0x3)+parseInt(_0x596483(0x112))/0x4*(parseInt(_0x596483(0x123))/0x5)+-parseInt(_0x596483(0x134))/0x6+-parseInt(_0x596483(0x11d))/0x7*(-parseInt(_0x596483(0x10b))/0x8)+parseInt(_0x596483(0x124))/0x9+-parseInt(_0x596483(0xfb))/0xa;if(_0x150f0e===_0x248d20)break;else _0x1e555c['push'](_0x1e555c['shift']());}catch(_0x44f6ac){_0x1e555c['push'](_0x1e555c['shift']());}}}(a57_0x507d,0xcf592));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';function a57_0x507d(){const _0x6d8dfc=['found','2UjUrgA','string','Update\x20business\x20model\x20group','apiError','prototype','modelId','name','str','keys','DB_TABLE','hasOwnProperty','expectBusinessGroup','6925260fylwQE','Expectation\x20mismatch\x20at\x20businessGroup','business-group-update','backend','25902480jYGOei','datasetId','POST','dataset','object','toUpperCase','business-group','source','write','number','/smartapi/question/er-config/business-group/edit','data','1536424rvzWrt','extend','isFinite','METADATA','583448lmvQVR','trim','code',',\x20actual\x20','datasetName','1281309vOYYAS','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','3269744gszHyO','call','isArray','payload','dbtableConfig','New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it','--business-group\x20is\x20required','Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','expect-business-group','businessGroup','validation','126WwFytH','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','appCode','message','stringify','sourceType','5sxNrCI','4500315aEoLZH','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing'];a57_0x507d=function(){return _0x6d8dfc;};return a57_0x507d();}import{CliErrors}from'../../errors.js';const BACKEND_PATH=a57_0x391ec3(0x105);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x36ca8a,input:_0x63aae1,dryRun:_0x5d42ce}){const _0x404cee=a57_0x391ec3;validateInput(_0x63aae1);const _0x1ce74e=normalizeBusinessGroup(_0x63aae1['businessGroup']),_0x573f4c=await getDatasetDetail(_0x63aae1[_0x404cee(0x10d)]),_0x4eaa94=resolveBusinessGroupDataset(_0x573f4c,_0x63aae1['code']),_0x547041=loadCurrentBusinessGroup(_0x573f4c,_0x4eaa94);assertExpectedBusinessGroup(_0x547041,_0x63aae1[_0x404cee(0x133)]);const _0x220f76=buildBackendPayload(_0x36ca8a,_0x4eaa94,_0x1ce74e),_0x457631=_0x547041!==_0x1ce74e;let _0x483297;if(_0x457631&&!_0x5d42ce){await updateErBusinessGroup(_0x220f76);const _0x5e9db9=await getDatasetDetail(_0x4eaa94[_0x404cee(0x10d)]),_0x4dd630=resolveBusinessGroupDataset(_0x5e9db9,_0x4eaa94[_0x404cee(0x10d)]),_0x347a50=loadCurrentBusinessGroup(_0x5e9db9,_0x4dd630);if(_0x347a50!==_0x1ce74e)throw CliErrors[_0x404cee(0x12b)]('Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Expected\x20'+JSON[_0x404cee(0x121)](_0x1ce74e)+_0x404cee(0x10e)+JSON['stringify'](_0x347a50)+'.');_0x483297={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x347a50}};}else!_0x457631&&(_0x483297={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x547041}});const _0x5f4666={'operation':'update','appCode':_0x36ca8a,'selector':{'code':_0x4eaa94['code']},'dataset':_0x4eaa94,'before':{'businessGroup':_0x547041},'after':{'businessGroup':_0x1ce74e},'changed':_0x457631,'dryRun':_0x5d42ce,'submitted':_0x457631&&!_0x5d42ce,'backend':{'method':_0x404cee(0xfd),'path':BACKEND_PATH,'payload':_0x220f76},..._0x483297?{'verification':_0x483297}:{},'warnings':[]};return{'ok':!![],'data':_0x5f4666,'message':_0x457631?_0x5d42ce?_0x404cee(0x125)+_0x4eaa94[_0x404cee(0x10d)]:'Updated\x20business\x20model\x20group\x20for\x20dataset\x20'+_0x4eaa94[_0x404cee(0x10d)]:_0x404cee(0x111)+_0x4eaa94[_0x404cee(0x10d)]};}export const datasetBusinessGroupUpdate={'service':a57_0x391ec3(0xfe),'command':a57_0x391ec3(0x136),'description':a57_0x391ec3(0x12a),'risk':a57_0x391ec3(0x103),'flags':[CODE_FLAG,{'name':a57_0x391ec3(0x101),'type':a57_0x391ec3(0x129),'required':!![],'description':a57_0x391ec3(0x117)},{'name':a57_0x391ec3(0x11a),'type':a57_0x391ec3(0x129),'required':![],'description':a57_0x391ec3(0x126)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xbf7a01){validateInput(readBusinessGroupUpdateInput(_0xbf7a01));},async 'dryRun'(_0x375d29){const _0x2fac3c=a57_0x391ec3,_0x27e722=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x375d29[_0x2fac3c(0x11f)],'input':readBusinessGroupUpdateInput(_0x375d29),'dryRun':!![]});return{'method':'POST','url':BACKEND_PATH,'body':_0x27e722[_0x2fac3c(0x106)][_0x2fac3c(0xfa)][_0x2fac3c(0x115)],'description':_0x27e722[_0x2fac3c(0x120)],..._0x27e722[_0x2fac3c(0x106)]};},async 'execute'(_0x12b4f7){const _0x4b2525=a57_0x391ec3;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x12b4f7[_0x4b2525(0x11f)],'input':readBusinessGroupUpdateInput(_0x12b4f7),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x382264){const _0x3cae33=a57_0x391ec3,_0x141737=_0x382264[_0x3cae33(0x12f)](_0x3cae33(0x11a));return{'code':trim(_0x382264[_0x3cae33(0x12f)](_0x3cae33(0x10d))),'businessGroup':_0x382264[_0x3cae33(0x12f)]('business-group'),'expectBusinessGroup':_0x141737===undefined||_0x141737===''?undefined:_0x141737};}function validateInput(_0x37f867){const _0x2a09ef=a57_0x391ec3;if(!trim(_0x37f867[_0x2a09ef(0x10d)]))throw CliErrors[_0x2a09ef(0x11c)]('--code\x20is\x20required');if(_0x37f867[_0x2a09ef(0x11b)]===undefined)throw CliErrors[_0x2a09ef(0x11c)](_0x2a09ef(0x118));}function resolveBusinessGroupDataset(_0x3dfae7,_0x131d14){const _0x39f5bc=a57_0x391ec3,_0x2b3ef5=asPlainObject(_0x3dfae7[_0x39f5bc(0xfe)]),_0x36f1bf=asPlainObject(_0x3dfae7[_0x39f5bc(0x116)]),_0xb07ba7=resolveSourceType(_0x3dfae7,_0x2b3ef5,_0x36f1bf),_0x3efd5b=firstString(_0x3dfae7['modelCode'],_0x3dfae7[_0x39f5bc(0x10d)],_0x2b3ef5['datasetCode'],_0x131d14)||_0x131d14;return{'id':firstNumber(_0x3dfae7[_0x39f5bc(0x12d)],_0x3dfae7['id'],_0x2b3ef5[_0x39f5bc(0xfc)])??firstString(_0x3dfae7['modelId'],_0x3dfae7['id'],_0x2b3ef5[_0x39f5bc(0xfc)])??null,'code':_0x3efd5b,'name':firstString(_0x3dfae7[_0x39f5bc(0x12e)],_0x2b3ef5[_0x39f5bc(0x10f)],_0x2b3ef5[_0x39f5bc(0x12e)])||null,'sourceType':_0xb07ba7};}function resolveSourceType(_0x171cb4,_0x2e3ea2,_0x563b52){const _0x11c1c7=a57_0x391ec3,_0x28a36e=firstString(_0x171cb4[_0x11c1c7(0x102)],_0x171cb4[_0x11c1c7(0x122)],_0x2e3ea2[_0x11c1c7(0x102)],_0x2e3ea2[_0x11c1c7(0x122)])?.[_0x11c1c7(0x10c)]()[_0x11c1c7(0x100)]();if(_0x28a36e===_0x11c1c7(0x131)||_0x28a36e===_0x11c1c7(0x10a))return _0x28a36e;if(Object[_0x11c1c7(0x130)](_0x563b52)['length']>0x0)return _0x11c1c7(0x131);throw CliErrors[_0x11c1c7(0x11c)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x47cb41,_0x31cb68){const _0x581a7f=a57_0x391ec3,_0x25519f=readBusinessGroupFromDatasetDetail(_0x47cb41,_0x31cb68[_0x581a7f(0x122)]);if(_0x25519f[_0x581a7f(0x127)])return normalizeBusinessGroup(_0x25519f['value']);if(_0x31cb68[_0x581a7f(0x122)]===_0x581a7f(0x10a))return'';throw CliErrors[_0x581a7f(0x11c)](_0x581a7f(0x11e),_0x581a7f(0x119));}function readBusinessGroupFromDatasetDetail(_0x51b102,_0x2996d9){const _0x5e7126=a57_0x391ec3,_0x56ee78=asPlainObject(_0x51b102[_0x5e7126(0xfe)]),_0x4151d1=firstPresent(_0x51b102[_0x5e7126(0x11b)]);if(_0x4151d1['found'])return _0x4151d1;const _0x2072e1=firstPresent(_0x56ee78[_0x5e7126(0x11b)]);if(_0x2072e1['found'])return _0x2072e1;if(_0x2996d9===_0x5e7126(0x131))return{'found':![]};const _0x139566=readBusinessGroupFromExtend(_0x51b102[_0x5e7126(0x108)]);if(_0x139566[_0x5e7126(0x127)])return _0x139566;return readBusinessGroupFromExtend(_0x56ee78[_0x5e7126(0x108)]);}function readBusinessGroupFromExtend(_0x23cd56){const _0x5b6fb8=a57_0x391ec3;if(_0x23cd56===undefined||_0x23cd56===null||_0x23cd56==='')return{'found':![]};if(typeof _0x23cd56===_0x5b6fb8(0x129))try{const _0x402549=JSON['parse'](_0x23cd56);return readBusinessGroupFromExtend(_0x402549);}catch{return{'found':![]};}const _0x28602b=asPlainObject(_0x23cd56);if(Object[_0x5b6fb8(0x12c)][_0x5b6fb8(0x132)][_0x5b6fb8(0x113)](_0x28602b,_0x5b6fb8(0x11b)))return{'found':!![],'value':_0x28602b[_0x5b6fb8(0x11b)]};return{'found':![]};}function firstPresent(..._0x2528e4){for(const _0x57da0c of _0x2528e4){if(_0x57da0c!==undefined&&_0x57da0c!==null)return{'found':!![],'value':_0x57da0c};}return{'found':![]};}function assertExpectedBusinessGroup(_0x40ea68,_0x56c665){const _0x3c6481=a57_0x391ec3;if(_0x56c665===undefined)return;const _0x1711ee=normalizeBusinessGroup(_0x56c665);if(_0x40ea68!==_0x1711ee)throw CliErrors['validation'](_0x3c6481(0x135),'Expected\x20'+JSON[_0x3c6481(0x121)](_0x1711ee)+_0x3c6481(0x10e)+JSON[_0x3c6481(0x121)](_0x40ea68));}function buildBackendPayload(_0x164dc0,_0x27e98f,_0x4d6e69){const _0x469f88=a57_0x391ec3;return{'appCode':_0x164dc0,'datasetCode':_0x27e98f[_0x469f88(0x10d)],'businessGroup':_0x4d6e69};}function normalizeBusinessGroup(_0x23098f){const _0x1850b8=a57_0x391ec3;if(_0x23098f===undefined||_0x23098f===null)return'';return String(_0x23098f)[_0x1850b8(0x10c)]();}function asPlainObject(_0x3ef8c6){const _0x353f02=a57_0x391ec3;if(!_0x3ef8c6||typeof _0x3ef8c6!==_0x353f02(0xff)||Array[_0x353f02(0x114)](_0x3ef8c6))return{};return _0x3ef8c6;}function firstString(..._0x93feb2){const _0x3cd7bd=a57_0x391ec3;for(const _0x2d4470 of _0x93feb2){if(typeof _0x2d4470===_0x3cd7bd(0x129)&&_0x2d4470['trim']())return _0x2d4470['trim']();if(typeof _0x2d4470==='number'&&Number[_0x3cd7bd(0x109)](_0x2d4470))return String(_0x2d4470);}return undefined;}function firstNumber(..._0x4ad34b){const _0x3504fb=a57_0x391ec3;for(const _0x2441c2 of _0x4ad34b){if(typeof _0x2441c2===_0x3504fb(0x104)&&Number[_0x3504fb(0x109)](_0x2441c2))return _0x2441c2;if(typeof _0x2441c2==='string'&&_0x2441c2['trim']()&&Number[_0x3504fb(0x109)](Number(_0x2441c2)))return Number(_0x2441c2);}return null;}function trim(_0x468e66){const _0x43298d=a57_0x391ec3;return String(_0x468e66||'')[_0x43298d(0x10c)]();}
@@ -1 +1 @@
1
- const a58_0x5143db=a58_0x4cfe;(function(_0xd0e81a,_0xe1497a){const _0x6926a1=a58_0x4cfe,_0x27295b=_0xd0e81a();while(!![]){try{const _0x3f4e53=parseInt(_0x6926a1(0x79))/0x1+parseInt(_0x6926a1(0x74))/0x2+-parseInt(_0x6926a1(0x6e))/0x3+-parseInt(_0x6926a1(0x70))/0x4*(parseInt(_0x6926a1(0x6c))/0x5)+-parseInt(_0x6926a1(0x71))/0x6*(parseInt(_0x6926a1(0x75))/0x7)+-parseInt(_0x6926a1(0x83))/0x8*(parseInt(_0x6926a1(0x8c))/0x9)+parseInt(_0x6926a1(0x6d))/0xa;if(_0x3f4e53===_0xe1497a)break;else _0x27295b['push'](_0x27295b['shift']());}catch(_0x15a316){_0x27295b['push'](_0x27295b['shift']());}}}(a58_0x3a75,0xea88d));function a58_0x4cfe(_0x1a6199,_0x41d1f2){_0x1a6199=_0x1a6199-0x6b;const _0x3a7583=a58_0x3a75();let _0x4cfe17=_0x3a7583[_0x1a6199];return _0x4cfe17;}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a58_0x5143db(0x8e),'filter':a58_0x5143db(0x6b),'getOne':a58_0x5143db(0x8b)};export const RUNTIME_DATA_ACCESS_SUMMARY=a58_0x5143db(0x87);function valueToString(_0x5f1f16){return _0x5f1f16==null?'':String(_0x5f1f16)['trim']();}function getDatasetCode(_0x4ecb50){const _0x45e7c5=a58_0x5143db;return valueToString(_0x4ecb50[_0x45e7c5(0x80)]??_0x4ecb50[_0x45e7c5(0x7a)]??_0x4ecb50[_0x45e7c5(0x85)]?.[_0x45e7c5(0x86)]);}function getDatasetName(_0x362a79){const _0x27059a=a58_0x5143db;return valueToString(_0x362a79[_0x27059a(0x7e)]??_0x362a79[_0x27059a(0x85)]?.[_0x27059a(0x8d)])||'unknown';}function a58_0x3a75(){const _0x54d77f=['SQL\x20schema\x20validation','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','1199895GNHkqv','42195980SsVoYc','4576536HzbjJU','tableName','28uKjwlG','3872214scPsQZ','join','toUpperCase','1969396NgFiXu','7nRMmGr','filter','validation','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','412549WbikgL','modelCode','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','当前数据集\x20\x22','getOne','name','sourceType','code','\x20是\x20','\x20的\x20DB_TABLE\x20数据源上下文。','48lGtonI','dbtableConfig','dataset','datasetCode','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','METADATA','UNKNOWN','dbtable','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','1208187wOFaUN','datasetName','lovrabet'];a58_0x3a75=function(){return _0x54d77f;};return a58_0x3a75();}function getDatasetSource(_0x3e08c4){const _0x2576d4=a58_0x5143db;return valueToString(_0x3e08c4['source']??_0x3e08c4[_0x2576d4(0x85)]?.[_0x2576d4(0x7f)])[_0x2576d4(0x73)]();}function getDbtableConfig(_0x39c300){const _0x63fe93=a58_0x5143db,_0x15d58e=_0x39c300[_0x63fe93(0x84)]??_0x39c300[_0x63fe93(0x8a)];return _0x15d58e&&typeof _0x15d58e==='object'?_0x15d58e:{};}export function isDbTableBackedDataset(_0x52b43f){const _0x4146c7=a58_0x5143db,_0x4d959c=getDatasetSource(_0x52b43f);if(_0x4d959c===_0x4146c7(0x88))return![];const _0x2b7fe0=getDbtableConfig(_0x52b43f),_0xfce00f=_0x2b7fe0['dbId']??_0x2b7fe0['id'],_0x24fe6f=valueToString(_0x2b7fe0[_0x4146c7(0x6f)]??_0x52b43f[_0x4146c7(0x6f)]??_0x52b43f['dataset']?.['tableName']);return _0xfce00f!==undefined&&_0xfce00f!==null&&_0x24fe6f['length']>0x0;}export function filterDbTableBackedDatasets(_0x4eb98e){const _0x490b17=a58_0x5143db;return _0x4eb98e[_0x490b17(0x76)](_0x36abef=>isDbTableBackedDataset(_0x36abef));}export function buildDbTableBackedRequirementMessage(_0x28b567,_0x58dd52=a58_0x5143db(0x8f)){const _0x332f1f=a58_0x5143db,_0x25eb2e=getDatasetSource(_0x28b567)||_0x332f1f(0x89),_0xc9b6db=getDatasetName(_0x28b567),_0x3537c0=getDatasetCode(_0x28b567),_0x2147b5=_0x3537c0?'\x20('+_0x3537c0+')':'';return[_0x332f1f(0x7c)+_0xc9b6db+'\x22'+_0x2147b5+_0x332f1f(0x81)+_0x25eb2e+'\x20类型,没有可用于\x20'+_0x58dd52+_0x332f1f(0x82),_0x332f1f(0x78),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x332f1f(0x7b)+RUNTIME_DATA_ACCESS_COMMANDS[_0x332f1f(0x76)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x332f1f(0x7d)]+'。'][_0x332f1f(0x72)]('\x20');}export function assertDatasetIsDbTableBacked(_0xf44af0,_0x5c2932){const _0x27b406=a58_0x5143db;if(!isDbTableBackedDataset(_0xf44af0))throw CliErrors[_0x27b406(0x77)](buildDbTableBackedRequirementMessage(_0xf44af0,_0x5c2932));}
1
+ const a58_0x2c0e56=a58_0x2ede;(function(_0x102f78,_0x4bc8f5){const _0x4c57cc=a58_0x2ede,_0x33b7ca=_0x102f78();while(!![]){try{const _0x2242f3=-parseInt(_0x4c57cc(0x10e))/0x1*(parseInt(_0x4c57cc(0x128))/0x2)+parseInt(_0x4c57cc(0x11c))/0x3+parseInt(_0x4c57cc(0x121))/0x4*(parseInt(_0x4c57cc(0x124))/0x5)+parseInt(_0x4c57cc(0x118))/0x6+parseInt(_0x4c57cc(0x106))/0x7*(parseInt(_0x4c57cc(0x107))/0x8)+-parseInt(_0x4c57cc(0x10a))/0x9*(parseInt(_0x4c57cc(0x11a))/0xa)+parseInt(_0x4c57cc(0x11f))/0xb;if(_0x2242f3===_0x4bc8f5)break;else _0x33b7ca['push'](_0x33b7ca['shift']());}catch(_0x27e251){_0x33b7ca['push'](_0x33b7ca['shift']());}}}(a58_0x5614,0xafdf9));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a58_0x2c0e56(0x127),'filter':a58_0x2c0e56(0x11d),'getOne':a58_0x2c0e56(0x129)};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x2ecdab){const _0x2cf608=a58_0x2c0e56;return _0x2ecdab==null?'':String(_0x2ecdab)[_0x2cf608(0x10b)]();}function getDatasetCode(_0x4319ac){const _0xae75f5=a58_0x2c0e56;return valueToString(_0x4319ac[_0xae75f5(0x11e)]??_0x4319ac[_0xae75f5(0x113)]??_0x4319ac[_0xae75f5(0x116)]?.['datasetCode']);}function getDatasetName(_0x51d95c){const _0x4c1134=a58_0x2c0e56;return valueToString(_0x51d95c[_0x4c1134(0x10d)]??_0x51d95c[_0x4c1134(0x116)]?.[_0x4c1134(0x105)])||_0x4c1134(0x125);}function a58_0x5614(){const _0x31e57d=['code','4416731YkYYHG','tableName','20eEhvAg','object','toUpperCase','1085870ArMsZl','unknown','UNKNOWN','lovrabet','28RorSWe','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','length','datasetName','154rGzDuz','104080FUGvHs','METADATA','dbtable','117meMOov','trim','getOne','name','92041wmRvLK','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','dbtableConfig','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','filter','modelCode','dbId','validation','dataset','\x20的\x20DB_TABLE\x20数据源上下文。','874200JKNeIe','当前数据集\x20\x22','507940hdjUIb','sourceType','2249886JzbVjW','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress'];a58_0x5614=function(){return _0x31e57d;};return a58_0x5614();}function getDatasetSource(_0x59fe2d){const _0x19a0b7=a58_0x2c0e56;return valueToString(_0x59fe2d['source']??_0x59fe2d[_0x19a0b7(0x116)]?.[_0x19a0b7(0x11b)])[_0x19a0b7(0x123)]();}function getDbtableConfig(_0xd8a98b){const _0x19233d=a58_0x2c0e56,_0x3c699b=_0xd8a98b[_0x19233d(0x110)]??_0xd8a98b[_0x19233d(0x109)];return _0x3c699b&&typeof _0x3c699b===_0x19233d(0x122)?_0x3c699b:{};}function a58_0x2ede(_0x582bf0,_0x521298){_0x582bf0=_0x582bf0-0x105;const _0x56144a=a58_0x5614();let _0x2eded0=_0x56144a[_0x582bf0];return _0x2eded0;}export function isDbTableBackedDataset(_0x5c66f0){const _0x1a768e=a58_0x2c0e56,_0xfd4b25=getDatasetSource(_0x5c66f0);if(_0xfd4b25===_0x1a768e(0x108))return![];const _0x2083d8=getDbtableConfig(_0x5c66f0),_0x114fa4=_0x2083d8[_0x1a768e(0x114)]??_0x2083d8['id'],_0x514a33=valueToString(_0x2083d8[_0x1a768e(0x120)]??_0x5c66f0['tableName']??_0x5c66f0['dataset']?.[_0x1a768e(0x120)]);return _0x114fa4!==undefined&&_0x114fa4!==null&&_0x514a33[_0x1a768e(0x12a)]>0x0;}export function filterDbTableBackedDatasets(_0xe2cd51){return _0xe2cd51['filter'](_0x5bd7ae=>isDbTableBackedDataset(_0x5bd7ae));}export function buildDbTableBackedRequirementMessage(_0x48e8c4,_0x30b796='SQL\x20schema\x20validation'){const _0x225b66=a58_0x2c0e56,_0xe97f84=getDatasetSource(_0x48e8c4)||_0x225b66(0x126),_0x4f9b2c=getDatasetName(_0x48e8c4),_0x1bc5f6=getDatasetCode(_0x48e8c4),_0x4eec77=_0x1bc5f6?'\x20('+_0x1bc5f6+')':'';return[_0x225b66(0x119)+_0x4f9b2c+'\x22'+_0x4eec77+'\x20是\x20'+_0xe97f84+'\x20类型,没有可用于\x20'+_0x30b796+_0x225b66(0x117),_0x225b66(0x111),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x225b66(0x10f)+RUNTIME_DATA_ACCESS_COMMANDS[_0x225b66(0x112)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x225b66(0x10c)]+'。']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x30ddc5,_0x35e16c){const _0x40d8bb=a58_0x2c0e56;if(!isDbTableBackedDataset(_0x30ddc5))throw CliErrors[_0x40d8bb(0x115)](buildDbTableBackedRequirementMessage(_0x30ddc5,_0x35e16c));}
@@ -1 +1 @@
1
- const a59_0xe72775=a59_0x1b8a;(function(_0x5b8a22,_0x10025a){const _0x1f8260=a59_0x1b8a,_0x4852c4=_0x5b8a22();while(!![]){try{const _0x31b7c4=parseInt(_0x1f8260(0xaf))/0x1+parseInt(_0x1f8260(0xab))/0x2+parseInt(_0x1f8260(0xc6))/0x3*(-parseInt(_0x1f8260(0xc1))/0x4)+-parseInt(_0x1f8260(0xa4))/0x5+-parseInt(_0x1f8260(0xcd))/0x6*(parseInt(_0x1f8260(0xb9))/0x7)+parseInt(_0x1f8260(0x9c))/0x8*(parseInt(_0x1f8260(0xb5))/0x9)+-parseInt(_0x1f8260(0xce))/0xa;if(_0x31b7c4===_0x10025a)break;else _0x4852c4['push'](_0x4852c4['shift']());}catch(_0x37be2e){_0x4852c4['push'](_0x4852c4['shift']());}}}(a59_0x2c19,0x942f0));import{deleteDataset,listDatasets}from'../../core/api-client.js';function a59_0x2c19(){const _0x554c6b=['1035895MJPSAT','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','num','dbid=','description','Required\x20to\x20execute\x20dataset\x20deletion','str','1527742XlrebO','dbName','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','/smartapi/dataset/delete-dataset','597688scixSP','high-risk-write','delete','expected-count','isArray','dataset','36DRVjwD','code','\x20dataset(s);\x20','Deleted\x20','1622971VUyhrE','dbtableConfig','appCode','No\x20undeleted\x20dataset\x20found\x20for\x20','push','length','dbid','name','49732IkjIfZ','relationPages','map','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','tableName','57KrGfYs','Dataset\x20id','confirm','\x20failed','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','\x20dataset(s)','filter','6qTpock','11323520iulfwP','POST','message','2106024EKSTsg','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Would\x20delete\x20','number','bool','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','id=','validation'];a59_0x2c19=function(){return _0x554c6b;};return a59_0x2c19();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a59_0xe72775(0x9f),'description':a59_0xe72775(0xc7)},DBID_FLAG={'name':a59_0xe72775(0xbf),'type':a59_0xe72775(0x9f),'description':a59_0xe72775(0xa5)},CONFIRM_FLAG={'name':a59_0xe72775(0xc8),'type':'boolean','description':a59_0xe72775(0xa9)},EXPECTED_COUNT_FLAG={'name':a59_0xe72775(0xb2),'type':a59_0xe72775(0x9f),'description':a59_0xe72775(0xca)};export const datasetDelete={'service':a59_0xe72775(0xb4),'command':a59_0xe72775(0xb1),'description':a59_0xe72775(0xc4),'risk':a59_0xe72775(0xb0),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4b63c0){const _0x284dd2=a59_0xe72775,_0x27b5eb=_0x4b63c0[_0x284dd2(0xa6)]('id'),_0x5f1fd9=_0x4b63c0[_0x284dd2(0xaa)](_0x284dd2(0xb6)),_0x48f140=_0x4b63c0[_0x284dd2(0xa6)](_0x284dd2(0xbf)),_0x4df4a6=[_0x27b5eb>0x0,Boolean(_0x5f1fd9),_0x48f140>0x0][_0x284dd2(0xcc)](Boolean);if(_0x4df4a6[_0x284dd2(0xbe)]===0x0)throw CliErrors[_0x284dd2(0xa3)](_0x284dd2(0xad));if(_0x4df4a6[_0x284dd2(0xbe)]>0x1)throw CliErrors[_0x284dd2(0xa3)](_0x284dd2(0x9d));},async 'dryRun'(_0x49b69a){const _0x39eb00=a59_0xe72775,_0x4fd5be=await resolveTargets(_0x49b69a);return{'method':_0x39eb00(0x9a),'url':_0x39eb00(0xae),'body':{'appCode':_0x49b69a[_0x39eb00(0xbb)],'count':_0x4fd5be[_0x39eb00(0xbe)],'datasets':_0x4fd5be},'description':_0x39eb00(0x9e)+_0x4fd5be['length']+'\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.'};},async 'execute'(_0x106d58){const _0x288e48=a59_0xe72775;if(!_0x106d58[_0x288e48(0xa0)](_0x288e48(0xc8)))throw CliErrors[_0x288e48(0xa3)](_0x288e48(0xa1),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x1b072e=await resolveTargets(_0x106d58),_0x24229e=[],_0x11c729=[];for(const _0x363bd3 of _0x1b072e){try{await deleteDataset(_0x106d58[_0x288e48(0xbb)],_0x363bd3['id']),_0x24229e[_0x288e48(0xbd)](_0x363bd3);}catch(_0x5cbf5b){_0x11c729[_0x288e48(0xbd)]({..._0x363bd3,'error':_0x5cbf5b instanceof Error?_0x5cbf5b[_0x288e48(0x9b)]:String(_0x5cbf5b)});}}if(_0x11c729[_0x288e48(0xbe)]>0x0)return{'ok':![],'data':{'requested':_0x1b072e[_0x288e48(0xbe)],'deletedCount':_0x24229e['length'],'failedCount':_0x11c729[_0x288e48(0xbe)],'deleted':_0x24229e,'failed':_0x11c729},'message':_0x288e48(0xb8)+_0x24229e['length']+'/'+_0x1b072e[_0x288e48(0xbe)]+_0x288e48(0xb7)+_0x11c729[_0x288e48(0xbe)]+_0x288e48(0xc9)};return{'ok':!![],'data':{'requested':_0x1b072e[_0x288e48(0xbe)],'deletedCount':_0x24229e[_0x288e48(0xbe)],'deleted':_0x24229e},'message':_0x288e48(0xb8)+_0x24229e['length']+_0x288e48(0xcb)};}};async function resolveTargets(_0x4a54bb){const _0x3af20c=a59_0xe72775,_0x585621=_0x4a54bb[_0x3af20c(0xa6)]('id'),_0x54f293=_0x4a54bb[_0x3af20c(0xaa)](_0x3af20c(0xb6)),_0x24b884=_0x4a54bb[_0x3af20c(0xa6)](_0x3af20c(0xbf));let _0x163734;_0x54f293?(_0x163734=await listDatasets(_0x4a54bb[_0x3af20c(0xbb)],{'code':_0x54f293}),_0x163734=_0x163734[_0x3af20c(0xcc)](_0x558970=>_0x558970[_0x3af20c(0xb6)]===_0x54f293)):(_0x163734=await listDatasets(_0x4a54bb['appCode']),_0x585621>0x0&&(_0x163734=_0x163734[_0x3af20c(0xcc)](_0x4747ee=>_0x4747ee['id']===_0x585621)),_0x24b884>0x0&&(_0x163734=_0x163734[_0x3af20c(0xcc)](_0x48a23a=>_0x48a23a[_0x3af20c(0xba)]?.['dbId']===_0x24b884)));const _0x31ec09=_0x163734[_0x3af20c(0xc3)](normalizeTarget);if(_0x31ec09[_0x3af20c(0xbe)]===0x0){const _0x28b43b=_0x54f293||(_0x585621>0x0?_0x3af20c(0xa2)+_0x585621:_0x3af20c(0xa7)+_0x24b884);throw CliErrors['validation'](_0x3af20c(0xbc)+_0x28b43b+'.');}const _0x5c10f3=_0x4a54bb[_0x3af20c(0xa6)](_0x3af20c(0xb2));if(_0x5c10f3>0x0&&_0x31ec09[_0x3af20c(0xbe)]!==_0x5c10f3)throw CliErrors['validation']('Matched\x20'+_0x31ec09[_0x3af20c(0xbe)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x5c10f3+'.');return _0x31ec09;}function a59_0x1b8a(_0x205236,_0x21f9a8){_0x205236=_0x205236-0x9a;const _0x2c19bc=a59_0x2c19();let _0x1b8a32=_0x2c19bc[_0x205236];return _0x1b8a32;}function normalizeTarget(_0x2488b2){const _0xa5348c=a59_0xe72775,_0x1bde2a=_0x2488b2[_0xa5348c(0xba)]??{};return{'id':_0x2488b2['id'],'code':_0x2488b2[_0xa5348c(0xb6)],'name':_0x2488b2[_0xa5348c(0xc0)],'description':_0x2488b2[_0xa5348c(0xa8)],'source':_0x2488b2['source'],'dbId':_0x1bde2a['dbId'],'dbName':_0x1bde2a[_0xa5348c(0xac)],'tableName':_0x1bde2a[_0xa5348c(0xc5)],'relatedPageCount':Array[_0xa5348c(0xb3)](_0x2488b2[_0xa5348c(0xc2)])?_0x2488b2[_0xa5348c(0xc2)][_0xa5348c(0xbe)]:undefined};}
1
+ const a59_0x1a197d=a59_0x5074;(function(_0x2865ed,_0x2d0a3d){const _0x326b1d=a59_0x5074,_0x30fa2d=_0x2865ed();while(!![]){try{const _0x29ed86=-parseInt(_0x326b1d(0x17a))/0x1+-parseInt(_0x326b1d(0x15c))/0x2*(-parseInt(_0x326b1d(0x152))/0x3)+parseInt(_0x326b1d(0x170))/0x4+-parseInt(_0x326b1d(0x153))/0x5*(-parseInt(_0x326b1d(0x151))/0x6)+parseInt(_0x326b1d(0x178))/0x7*(parseInt(_0x326b1d(0x176))/0x8)+-parseInt(_0x326b1d(0x179))/0x9*(parseInt(_0x326b1d(0x16b))/0xa)+-parseInt(_0x326b1d(0x165))/0xb*(parseInt(_0x326b1d(0x148))/0xc);if(_0x29ed86===_0x2d0a3d)break;else _0x30fa2d['push'](_0x30fa2d['shift']());}catch(_0x349f93){_0x30fa2d['push'](_0x30fa2d['shift']());}}}(a59_0x22ad,0x5f79c));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 a59_0x22ad(){const _0x586f79=['9044jOMHGZ','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbtableConfig','filter','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','1184104CVfwjh','\x20failed','35oWvqBM','104778UAJHBM','465578HdTVvn','dbid=','dbid','str','24BGNLgb','POST','length','relationPages','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','validation','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','dbId','136656FIiqUw','3XMgxjy','20AXALtC','Dataset\x20id','Matched\x20','appCode','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','tableName','id=','high-risk-write','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','1324912gbmYrO','message','description','bool','No\x20undeleted\x20dataset\x20found\x20for\x20','confirm','delete','boolean','expected-count','1530859vpVaUp','isArray','\x20dataset(s)','number','code','num','310spEAfq','Deleted\x20','/smartapi/dataset/delete-dataset','source','\x20dataset(s);\x20'];a59_0x22ad=function(){return _0x586f79;};return a59_0x22ad();}const DATASET_ID_FLAG={'name':'id','type':'number','description':a59_0x1a197d(0x154)},DBID_FLAG={'name':a59_0x1a197d(0x17c),'type':a59_0x1a197d(0x168),'description':a59_0x1a197d(0x171)},CONFIRM_FLAG={'name':a59_0x1a197d(0x161),'type':a59_0x1a197d(0x163),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a59_0x1a197d(0x164),'type':'number','description':a59_0x1a197d(0x157)};export const datasetDelete={'service':'dataset','command':a59_0x1a197d(0x162),'description':a59_0x1a197d(0x14d),'risk':a59_0x1a197d(0x15a),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x276288){const _0x27a0e7=a59_0x1a197d,_0x5dce53=_0x276288['num']('id'),_0x11655f=_0x276288[_0x27a0e7(0x147)](_0x27a0e7(0x169)),_0xcfecc8=_0x276288[_0x27a0e7(0x16a)](_0x27a0e7(0x17c)),_0x2bab9f=[_0x5dce53>0x0,Boolean(_0x11655f),_0xcfecc8>0x0][_0x27a0e7(0x173)](Boolean);if(_0x2bab9f[_0x27a0e7(0x14a)]===0x0)throw CliErrors[_0x27a0e7(0x14e)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x2bab9f[_0x27a0e7(0x14a)]>0x1)throw CliErrors[_0x27a0e7(0x14e)](_0x27a0e7(0x15b));},async 'dryRun'(_0x261b93){const _0x9fe967=a59_0x1a197d,_0x5ec6d3=await resolveTargets(_0x261b93);return{'method':_0x9fe967(0x149),'url':_0x9fe967(0x16d),'body':{'appCode':_0x261b93['appCode'],'count':_0x5ec6d3[_0x9fe967(0x14a)],'datasets':_0x5ec6d3},'description':'Would\x20delete\x20'+_0x5ec6d3[_0x9fe967(0x14a)]+_0x9fe967(0x174)};},async 'execute'(_0x17dc66){const _0xdfc97c=a59_0x1a197d;if(!_0x17dc66[_0xdfc97c(0x15f)]('confirm'))throw CliErrors[_0xdfc97c(0x14e)](_0xdfc97c(0x14f),_0xdfc97c(0x14c));const _0x5c3ee8=await resolveTargets(_0x17dc66),_0x204f43=[],_0xf4c5d0=[];for(const _0x2fd5a of _0x5c3ee8){try{await deleteDataset(_0x17dc66[_0xdfc97c(0x156)],_0x2fd5a['id']),_0x204f43['push'](_0x2fd5a);}catch(_0xf4bd5f){_0xf4c5d0['push']({..._0x2fd5a,'error':_0xf4bd5f instanceof Error?_0xf4bd5f[_0xdfc97c(0x15d)]:String(_0xf4bd5f)});}}if(_0xf4c5d0[_0xdfc97c(0x14a)]>0x0)return{'ok':![],'data':{'requested':_0x5c3ee8[_0xdfc97c(0x14a)],'deletedCount':_0x204f43[_0xdfc97c(0x14a)],'failedCount':_0xf4c5d0[_0xdfc97c(0x14a)],'deleted':_0x204f43,'failed':_0xf4c5d0},'message':_0xdfc97c(0x16c)+_0x204f43[_0xdfc97c(0x14a)]+'/'+_0x5c3ee8[_0xdfc97c(0x14a)]+_0xdfc97c(0x16f)+_0xf4c5d0['length']+_0xdfc97c(0x177)};return{'ok':!![],'data':{'requested':_0x5c3ee8[_0xdfc97c(0x14a)],'deletedCount':_0x204f43[_0xdfc97c(0x14a)],'deleted':_0x204f43},'message':_0xdfc97c(0x16c)+_0x204f43[_0xdfc97c(0x14a)]+_0xdfc97c(0x167)};}};async function resolveTargets(_0x29dec6){const _0x2b5ec1=a59_0x1a197d,_0x1fc277=_0x29dec6[_0x2b5ec1(0x16a)]('id'),_0x452e6f=_0x29dec6[_0x2b5ec1(0x147)](_0x2b5ec1(0x169)),_0x1bbfae=_0x29dec6[_0x2b5ec1(0x16a)](_0x2b5ec1(0x17c));let _0x313802;_0x452e6f?(_0x313802=await listDatasets(_0x29dec6[_0x2b5ec1(0x156)],{'code':_0x452e6f}),_0x313802=_0x313802[_0x2b5ec1(0x173)](_0x31a68b=>_0x31a68b[_0x2b5ec1(0x169)]===_0x452e6f)):(_0x313802=await listDatasets(_0x29dec6[_0x2b5ec1(0x156)]),_0x1fc277>0x0&&(_0x313802=_0x313802['filter'](_0x21f6da=>_0x21f6da['id']===_0x1fc277)),_0x1bbfae>0x0&&(_0x313802=_0x313802[_0x2b5ec1(0x173)](_0x516e39=>_0x516e39[_0x2b5ec1(0x172)]?.[_0x2b5ec1(0x150)]===_0x1bbfae)));const _0x37622b=_0x313802['map'](normalizeTarget);if(_0x37622b[_0x2b5ec1(0x14a)]===0x0){const _0x149448=_0x452e6f||(_0x1fc277>0x0?_0x2b5ec1(0x159)+_0x1fc277:_0x2b5ec1(0x17b)+_0x1bbfae);throw CliErrors[_0x2b5ec1(0x14e)](_0x2b5ec1(0x160)+_0x149448+'.');}const _0x2efc64=_0x29dec6['num'](_0x2b5ec1(0x164));if(_0x2efc64>0x0&&_0x37622b[_0x2b5ec1(0x14a)]!==_0x2efc64)throw CliErrors[_0x2b5ec1(0x14e)](_0x2b5ec1(0x155)+_0x37622b[_0x2b5ec1(0x14a)]+_0x2b5ec1(0x175)+_0x2efc64+'.');return _0x37622b;}function a59_0x5074(_0x2bfb01,_0x2cade5){_0x2bfb01=_0x2bfb01-0x147;const _0x22ad45=a59_0x22ad();let _0x50748d=_0x22ad45[_0x2bfb01];return _0x50748d;}function normalizeTarget(_0x3df168){const _0x44c509=a59_0x1a197d,_0xb85836=_0x3df168['dbtableConfig']??{};return{'id':_0x3df168['id'],'code':_0x3df168['code'],'name':_0x3df168['name'],'description':_0x3df168[_0x44c509(0x15e)],'source':_0x3df168[_0x44c509(0x16e)],'dbId':_0xb85836['dbId'],'dbName':_0xb85836['dbName'],'tableName':_0xb85836[_0x44c509(0x158)],'relatedPageCount':Array[_0x44c509(0x166)](_0x3df168['relationPages'])?_0x3df168[_0x44c509(0x14b)][_0x44c509(0x14a)]:undefined};}
@@ -1 +1 @@
1
- const a60_0x193483=a60_0x1299;(function(_0xe7112c,_0x5f4cd7){const _0x59a69c=a60_0x1299,_0xf3ec9f=_0xe7112c();while(!![]){try{const _0x46d1c5=parseInt(_0x59a69c(0x8b))/0x1*(-parseInt(_0x59a69c(0x90))/0x2)+-parseInt(_0x59a69c(0x7a))/0x3*(-parseInt(_0x59a69c(0x79))/0x4)+-parseInt(_0x59a69c(0x69))/0x5*(parseInt(_0x59a69c(0xaf))/0x6)+-parseInt(_0x59a69c(0x8f))/0x7+parseInt(_0x59a69c(0x94))/0x8+parseInt(_0x59a69c(0x95))/0x9+parseInt(_0x59a69c(0x9d))/0xa;if(_0x46d1c5===_0x5f4cd7)break;else _0xf3ec9f['push'](_0xf3ec9f['shift']());}catch(_0x503e6b){_0xf3ec9f['push'](_0xf3ec9f['shift']());}}}(a60_0x1b63,0x64078));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a60_0x1299(_0x30a5cf,_0x57ef44){_0x30a5cf=_0x30a5cf-0x64;const _0x1b63d5=a60_0x1b63();let _0x129918=_0x1b63d5[_0x30a5cf];return _0x129918;}function normalizeField(_0x269434){const _0x3282cc=a60_0x1299;if(_0x269434[_0x3282cc(0x7e)])return null;const _0x23f9e2=Boolean(_0x269434[_0x3282cc(0x67)]!==undefined||_0x269434[_0x3282cc(0x7c)]!==undefined);let _0x24980a={};if(!_0x23f9e2&&typeof _0x269434[_0x3282cc(0xad)]===_0x3282cc(0x85))try{_0x24980a=JSON[_0x3282cc(0x7d)](_0x269434['extend']);}catch{}const _0x3bf49e=_0x23f9e2?_0x269434[_0x3282cc(0xa3)]:_0x269434['code'],_0xae124d=_0x23f9e2?_0x269434[_0x3282cc(0x67)]:_0x269434[_0x3282cc(0xa3)],_0x1a71f1=_0x23f9e2?_0x269434[_0x3282cc(0x7c)]:_0x269434['type']||_0x269434['dataType'],_0x574c66=_0x23f9e2?_0x269434[_0x3282cc(0xac)]===!![]:_0x24980a[_0x3282cc(0xac)]===!![],_0x3d28fe=_0x23f9e2?_0x269434['required']===!![]:_0x24980a[_0x3282cc(0x9f)]===!![],_0x1784d1=_0x23f9e2?_0x269434[_0x3282cc(0xb0)]??null:_0x24980a[_0x3282cc(0xb0)]??null,_0x105db6={'name':_0x3bf49e,'displayName':_0xae124d||_0x3bf49e,'type':_0x1a71f1,'dbType':_0x269434[_0x3282cc(0x74)],'pk':_0x574c66,'required':_0x3d28fe,'description':_0x269434[_0x3282cc(0x93)]||undefined};return Array[_0x3282cc(0x98)](_0x1784d1)&&_0x1784d1[_0x3282cc(0x86)]>0x0&&(_0x105db6[_0x3282cc(0xb0)]=_0x1784d1),_0x105db6;}function parseJsonMaybe(_0x2d63a9){const _0x26dd72=a60_0x1299;if(typeof _0x2d63a9!=='string')return _0x2d63a9;try{return JSON[_0x26dd72(0x7d)](_0x2d63a9);}catch{return _0x2d63a9;}}function normalizeOperationEntry(_0x4708c0,_0x32061b){const _0x408650=a60_0x1299;if(!_0x32061b||typeof _0x32061b!=='object')return null;if(!_0x32061b['method']||!_0x32061b[_0x408650(0x92)])return null;const _0x3041d1={'name':_0x4708c0,'method':_0x32061b[_0x408650(0x73)],'path':_0x32061b[_0x408650(0x92)]};if(_0x32061b[_0x408650(0x6f)])_0x3041d1[_0x408650(0x6f)]=_0x32061b[_0x408650(0x6f)];if(_0x32061b['requestBody']!=null){const _0x127ce8=parseJsonMaybe(_0x32061b[_0x408650(0xa1)]);_0x3041d1['requestBody']=_0x127ce8;}if(_0x32061b['responseBody']!=null){const _0x44a358=parseJsonMaybe(_0x32061b[_0x408650(0x91)]);_0x3041d1['responseBody']=_0x44a358;}if(_0x32061b[_0x408650(0xa4)]!=null)_0x3041d1[_0x408650(0xa4)]=_0x32061b[_0x408650(0xa4)];if(_0x32061b[_0x408650(0x68)]!=null)_0x3041d1[_0x408650(0x68)]=_0x32061b[_0x408650(0x68)];if(Array[_0x408650(0x98)](_0x32061b[_0x408650(0x8e)]))_0x3041d1[_0x408650(0x8e)]=_0x32061b[_0x408650(0x8e)];if(Array[_0x408650(0x98)](_0x32061b['responseFields']))_0x3041d1[_0x408650(0xaa)]=_0x32061b[_0x408650(0xaa)];return _0x3041d1;}function summarizeDbtable(_0x5ac295){const _0x29770b=a60_0x1299,_0x17b34c={},_0x157d13=[_0x29770b(0xa9),_0x29770b(0x80),_0x29770b(0x9c),_0x29770b(0x6c),_0x29770b(0xac),_0x29770b(0x96),'logicField','createTimeField',_0x29770b(0x66),_0x29770b(0x82),_0x29770b(0xb3),_0x29770b(0xa2),_0x29770b(0x72),_0x29770b(0x76),'dblinkInfoDTO'];for(const _0x4fbeab of _0x157d13){if(_0x5ac295[_0x4fbeab]!==undefined)_0x17b34c[_0x4fbeab]=_0x5ac295[_0x4fbeab];}return typeof _0x17b34c[_0x29770b(0x96)]===_0x29770b(0x85)&&_0x17b34c[_0x29770b(0x96)][_0x29770b(0x86)]>0x0&&(_0x17b34c[_0x29770b(0x6d)]=_0x17b34c['allFields']['split'](',')[_0x29770b(0xa5)](_0x1b6643=>_0x1b6643[_0x29770b(0x9e)]())['filter'](Boolean)),_0x17b34c;}function normalizeRelatedPages(_0x2d3dac){const _0x3e22d1=a60_0x1299;if(!Array[_0x3e22d1(0x98)](_0x2d3dac))return[];return _0x2d3dac[_0x3e22d1(0x65)](_0x48e934=>_0x48e934&&typeof _0x48e934===_0x3e22d1(0xae))[_0x3e22d1(0xa5)](_0x56479b=>({'id':_0x56479b['id'],'type':_0x56479b[_0x3e22d1(0xa8)],'code':_0x56479b[_0x3e22d1(0x77)],'title':_0x56479b[_0x3e22d1(0x97)],'deleted':_0x56479b[_0x3e22d1(0x7e)]===!![]}));}function a60_0x1b63(){const _0x4b23df=['datasetKey','allFieldNames','properties','host','indexes','relatedPageInfoList','modifierNameField','method','dbType','relations','labelField','code','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','4gofRxb','1513179QxQhgh','toDatasetCode','doType','parse','deleted','dbtableConfig','dbName','push','creatorIdField','formatRules','fields','string','length','modelId','toDatasetName','toFieldLabel','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','213Jzecbp','doVersion','modelCode','requestFields','3680334QeUfmm','1670GAvnUP','responseBody','path','description','2389480YMUcPh','5833926warFov','allFields','title','isArray','read','columnCodeListWithDeleted','source','tableName','271260hqoHpl','trim','required','sourceType','requestBody','modifierIdField','name','beforeScriptId','map','dataset','validateRules','type','dbId','responseFields','toField','pkField','extend','object','6JpUajE','options','str','detail','creatorNameField','alias','operations','filter','updateTimeField','displayName','afterScriptId','1825405xzqKEL','fromField','tableComment'];a60_0x1b63=function(){return _0x4b23df;};return a60_0x1b63();}export const datasetDetail={'service':a60_0x193483(0xa6),'command':a60_0x193483(0xb2),'description':a60_0x193483(0x8a),'risk':a60_0x193483(0x99),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a60_0x193483(0xb4),'type':'string','description':a60_0x193483(0x78)}],async 'execute'(_0x56da18){const _0x32201f=a60_0x193483,_0x12b0ab=await getDatasetDetail(_0x56da18[_0x32201f(0xb1)](_0x32201f(0x77))),_0x57196c=Array[_0x32201f(0x98)](_0x12b0ab[_0x32201f(0x84)])?_0x12b0ab['fields']:Array[_0x32201f(0x98)](_0x12b0ab[_0x32201f(0x6e)])?_0x12b0ab[_0x32201f(0x6e)]:[],_0x4fc7ab=_0x57196c[_0x32201f(0xa5)](_0x345bbc=>normalizeField(_0x345bbc))[_0x32201f(0x65)](_0x5eef66=>_0x5eef66!==null),_0xf640dd=_0x12b0ab[_0x32201f(0x64)]??{},_0x439d66=[];for(const [_0x2739bd,_0x36b2c4]of Object['entries'](_0xf640dd)){const _0x15d39b=normalizeOperationEntry(_0x2739bd,_0x36b2c4);if(_0x15d39b)_0x439d66[_0x32201f(0x81)](_0x15d39b);}const _0x2ff4c6=_0x12b0ab[_0x32201f(0x7f)]??{},_0x277359=_0x12b0ab[_0x32201f(0xa6)]??{},_0x33e81c=_0x2ff4c6['dbId']!=null?{'id':_0x2ff4c6[_0x32201f(0xa9)],'name':_0x2ff4c6[_0x32201f(0x80)]??null}:undefined;let _0x26b13f;return typeof _0x12b0ab[_0x32201f(0xad)]==='string'&&(_0x26b13f=parseJsonMaybe(_0x12b0ab[_0x32201f(0xad)])),{'ok':!![],'data':{'id':_0x12b0ab[_0x32201f(0x87)]??_0x12b0ab['id'],'name':_0x12b0ab[_0x32201f(0xa3)],'code':_0x12b0ab[_0x32201f(0x8d)]||_0x12b0ab[_0x32201f(0x77)],'doVersion':_0x12b0ab[_0x32201f(0x8c)],'description':_0x12b0ab[_0x32201f(0x93)]||_0x277359[_0x32201f(0x6b)]||undefined,'source':_0x12b0ab[_0x32201f(0x9b)]||_0x277359[_0x32201f(0xa0)],'table':_0x2ff4c6[_0x32201f(0x9c)]||_0x277359['tableName'],'datasetKey':_0x2ff4c6[_0x32201f(0x6c)],'pk':_0x2ff4c6[_0x32201f(0xac)],'db':_0x33e81c,'dbtable':summarizeDbtable(_0x2ff4c6),'fields':_0x4fc7ab,'operations':_0x439d66,'indexes':Array['isArray'](_0x277359[_0x32201f(0x70)])?_0x277359[_0x32201f(0x70)]:[],'relations':Array[_0x32201f(0x98)](_0x12b0ab['relations'])?_0x12b0ab[_0x32201f(0x75)][_0x32201f(0xa5)](_0x1cf0a3=>({'fromField':_0x1cf0a3[_0x32201f(0x6a)],'toDataset':_0x1cf0a3[_0x32201f(0x88)],'toCode':_0x1cf0a3[_0x32201f(0x7b)],'toTable':_0x1cf0a3['toTableName'],'toField':_0x1cf0a3[_0x32201f(0xab)],'labelField':_0x1cf0a3[_0x32201f(0x89)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x12b0ab[_0x32201f(0x71)]),...Array[_0x32201f(0x98)](_0x12b0ab[_0x32201f(0x9a)])?{'columnCodeListWithDeleted':_0x12b0ab['columnCodeListWithDeleted']}:{},'formatRules':Array['isArray'](_0x12b0ab[_0x32201f(0x83)])?_0x12b0ab[_0x32201f(0x83)]:[],'validateRules':Array['isArray'](_0x12b0ab[_0x32201f(0xa7)])?_0x12b0ab[_0x32201f(0xa7)]:[],..._0x26b13f!==undefined?{'extend':_0x26b13f}:{},'stats':{'fieldCount':_0x4fc7ab[_0x32201f(0x86)],'operationCount':_0x439d66['length']}}};}};
1
+ const a60_0xbab67c=a60_0x577f;(function(_0x1a2598,_0x52b5d3){const _0x53e8c7=a60_0x577f,_0x589e96=_0x1a2598();while(!![]){try{const _0x37d20a=parseInt(_0x53e8c7(0x1e1))/0x1*(parseInt(_0x53e8c7(0x208))/0x2)+-parseInt(_0x53e8c7(0x1ea))/0x3+parseInt(_0x53e8c7(0x1da))/0x4+-parseInt(_0x53e8c7(0x1dc))/0x5+-parseInt(_0x53e8c7(0x1e6))/0x6*(parseInt(_0x53e8c7(0x212))/0x7)+-parseInt(_0x53e8c7(0x1c8))/0x8*(-parseInt(_0x53e8c7(0x1fc))/0x9)+-parseInt(_0x53e8c7(0x206))/0xa*(-parseInt(_0x53e8c7(0x1ec))/0xb);if(_0x37d20a===_0x52b5d3)break;else _0x589e96['push'](_0x589e96['shift']());}catch(_0x4c0971){_0x589e96['push'](_0x589e96['shift']());}}}(a60_0x34c5,0x60b74));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x1cf11f){const _0x1c1f9c=a60_0x577f;if(_0x1cf11f[_0x1c1f9c(0x1e3)])return null;const _0x4db490=Boolean(_0x1cf11f[_0x1c1f9c(0x1ed)]!==undefined||_0x1cf11f['doType']!==undefined);let _0x4a5ad1={};if(!_0x4db490&&typeof _0x1cf11f[_0x1c1f9c(0x1f7)]===_0x1c1f9c(0x1cc))try{_0x4a5ad1=JSON[_0x1c1f9c(0x20c)](_0x1cf11f[_0x1c1f9c(0x1f7)]);}catch{}const _0x175b93=_0x4db490?_0x1cf11f[_0x1c1f9c(0x1ee)]:_0x1cf11f[_0x1c1f9c(0x204)],_0x5dc75e=_0x4db490?_0x1cf11f['displayName']:_0x1cf11f[_0x1c1f9c(0x1ee)],_0x4b73f2=_0x4db490?_0x1cf11f[_0x1c1f9c(0x1cd)]:_0x1cf11f['type']||_0x1cf11f[_0x1c1f9c(0x1dd)],_0x498921=_0x4db490?_0x1cf11f[_0x1c1f9c(0x1e0)]===!![]:_0x4a5ad1[_0x1c1f9c(0x1e0)]===!![],_0x3921ca=_0x4db490?_0x1cf11f[_0x1c1f9c(0x1f2)]===!![]:_0x4a5ad1[_0x1c1f9c(0x1f2)]===!![],_0x3030d3=_0x4db490?_0x1cf11f['options']??null:_0x4a5ad1[_0x1c1f9c(0x1d1)]??null,_0x2b6bd7={'name':_0x175b93,'displayName':_0x5dc75e||_0x175b93,'type':_0x4b73f2,'dbType':_0x1cf11f[_0x1c1f9c(0x1d9)],'pk':_0x498921,'required':_0x3921ca,'description':_0x1cf11f[_0x1c1f9c(0x1fe)]||undefined};return Array[_0x1c1f9c(0x1f5)](_0x3030d3)&&_0x3030d3[_0x1c1f9c(0x1fd)]>0x0&&(_0x2b6bd7[_0x1c1f9c(0x1d1)]=_0x3030d3),_0x2b6bd7;}function parseJsonMaybe(_0x4a9dc7){const _0xa58f0=a60_0x577f;if(typeof _0x4a9dc7!==_0xa58f0(0x1cc))return _0x4a9dc7;try{return JSON[_0xa58f0(0x20c)](_0x4a9dc7);}catch{return _0x4a9dc7;}}function normalizeOperationEntry(_0x1c2665,_0x469dbf){const _0x4ea181=a60_0x577f;if(!_0x469dbf||typeof _0x469dbf!=='object')return null;if(!_0x469dbf[_0x4ea181(0x207)]||!_0x469dbf[_0x4ea181(0x210)])return null;const _0x230fd7={'name':_0x1c2665,'method':_0x469dbf[_0x4ea181(0x207)],'path':_0x469dbf['path']};if(_0x469dbf[_0x4ea181(0x1ff)])_0x230fd7[_0x4ea181(0x1ff)]=_0x469dbf['host'];if(_0x469dbf[_0x4ea181(0x1eb)]!=null){const _0x4b4942=parseJsonMaybe(_0x469dbf[_0x4ea181(0x1eb)]);_0x230fd7[_0x4ea181(0x1eb)]=_0x4b4942;}if(_0x469dbf['responseBody']!=null){const _0x4e5c6d=parseJsonMaybe(_0x469dbf[_0x4ea181(0x1c9)]);_0x230fd7[_0x4ea181(0x1c9)]=_0x4e5c6d;}if(_0x469dbf[_0x4ea181(0x21a)]!=null)_0x230fd7[_0x4ea181(0x21a)]=_0x469dbf[_0x4ea181(0x21a)];if(_0x469dbf[_0x4ea181(0x1e4)]!=null)_0x230fd7[_0x4ea181(0x1e4)]=_0x469dbf[_0x4ea181(0x1e4)];if(Array['isArray'](_0x469dbf['requestFields']))_0x230fd7[_0x4ea181(0x209)]=_0x469dbf[_0x4ea181(0x209)];if(Array[_0x4ea181(0x1f5)](_0x469dbf[_0x4ea181(0x1db)]))_0x230fd7['responseFields']=_0x469dbf[_0x4ea181(0x1db)];return _0x230fd7;}function a60_0x577f(_0x409780,_0x226db0){_0x409780=_0x409780-0x1c8;const _0x34c5e9=a60_0x34c5();let _0x577fb3=_0x34c5e9[_0x409780];return _0x577fb3;}function a60_0x34c5(){const _0xab175f=['doType','createTimeField','modelCode','read','options','trim','type','relatedPageInfoList','datasetKey','operations','allFieldNames','tableName','dbType','2867288dqgMRT','responseFields','942615pvbqhC','dataType','toField','split','pkField','3xKZzNh','toFieldLabel','deleted','afterScriptId','relations','577956yrDsnK','modifierNameField','updateTimeField','formatRules','2151465jpctxu','requestBody','22gOpNwZ','displayName','name','fields','properties','logicField','required','alias','creatorNameField','isArray','columnCodeListWithDeleted','extend','fromField','labelField','indexes','toDatasetName','63rBHSMp','length','description','host','dbId','dblinkInfoDTO','detail','creatorIdField','code','modifierIdField','2579050SQTvmW','method','333792zLgZYd','requestFields','str','allFields','parse','object','push','modelId','path','dataset','49CaiIXh','validateRules','sourceType','map','filter','source','doVersion','dbtableConfig','beforeScriptId','277472JbTeBk','responseBody','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','dbName','string'];a60_0x34c5=function(){return _0xab175f;};return a60_0x34c5();}function summarizeDbtable(_0x67a22e){const _0x3b4be7=a60_0x577f,_0x407ca3={},_0x246f4d=[_0x3b4be7(0x200),_0x3b4be7(0x1cb),'tableName',_0x3b4be7(0x1d5),'pkField',_0x3b4be7(0x20b),_0x3b4be7(0x1f1),_0x3b4be7(0x1ce),_0x3b4be7(0x1e8),_0x3b4be7(0x203),_0x3b4be7(0x1f4),_0x3b4be7(0x205),_0x3b4be7(0x1e7),_0x3b4be7(0x1f9),_0x3b4be7(0x201)];for(const _0x13937e of _0x246f4d){if(_0x67a22e[_0x13937e]!==undefined)_0x407ca3[_0x13937e]=_0x67a22e[_0x13937e];}return typeof _0x407ca3[_0x3b4be7(0x20b)]===_0x3b4be7(0x1cc)&&_0x407ca3[_0x3b4be7(0x20b)][_0x3b4be7(0x1fd)]>0x0&&(_0x407ca3[_0x3b4be7(0x1d7)]=_0x407ca3[_0x3b4be7(0x20b)][_0x3b4be7(0x1df)](',')[_0x3b4be7(0x215)](_0x21c1be=>_0x21c1be[_0x3b4be7(0x1d2)]())[_0x3b4be7(0x216)](Boolean)),_0x407ca3;}function normalizeRelatedPages(_0x3488c9){const _0x2fabc7=a60_0x577f;if(!Array[_0x2fabc7(0x1f5)](_0x3488c9))return[];return _0x3488c9[_0x2fabc7(0x216)](_0x515d32=>_0x515d32&&typeof _0x515d32===_0x2fabc7(0x20d))[_0x2fabc7(0x215)](_0x3c975c=>({'id':_0x3c975c['id'],'type':_0x3c975c[_0x2fabc7(0x1d3)],'code':_0x3c975c['code'],'title':_0x3c975c['title'],'deleted':_0x3c975c[_0x2fabc7(0x1e3)]===!![]}));}export const datasetDetail={'service':a60_0xbab67c(0x211),'command':a60_0xbab67c(0x202),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a60_0xbab67c(0x1d0),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a60_0xbab67c(0x1f3),'type':a60_0xbab67c(0x1cc),'description':a60_0xbab67c(0x1ca)}],async 'execute'(_0x5ed4b7){const _0x444d00=a60_0xbab67c,_0x220efa=await getDatasetDetail(_0x5ed4b7[_0x444d00(0x20a)]('code')),_0x5117d9=Array['isArray'](_0x220efa['fields'])?_0x220efa[_0x444d00(0x1ef)]:Array['isArray'](_0x220efa['properties'])?_0x220efa[_0x444d00(0x1f0)]:[],_0x1086a0=_0x5117d9['map'](_0x24aa67=>normalizeField(_0x24aa67))[_0x444d00(0x216)](_0x154017=>_0x154017!==null),_0x4d446c=_0x220efa[_0x444d00(0x1d6)]??{},_0x2c843f=[];for(const [_0x14da91,_0x10da42]of Object['entries'](_0x4d446c)){const _0x5708b0=normalizeOperationEntry(_0x14da91,_0x10da42);if(_0x5708b0)_0x2c843f[_0x444d00(0x20e)](_0x5708b0);}const _0x555687=_0x220efa[_0x444d00(0x219)]??{},_0x3120fe=_0x220efa[_0x444d00(0x211)]??{},_0x340627=_0x555687['dbId']!=null?{'id':_0x555687[_0x444d00(0x200)],'name':_0x555687[_0x444d00(0x1cb)]??null}:undefined;let _0x1f1875;return typeof _0x220efa[_0x444d00(0x1f7)]===_0x444d00(0x1cc)&&(_0x1f1875=parseJsonMaybe(_0x220efa['extend'])),{'ok':!![],'data':{'id':_0x220efa[_0x444d00(0x20f)]??_0x220efa['id'],'name':_0x220efa[_0x444d00(0x1ee)],'code':_0x220efa[_0x444d00(0x1cf)]||_0x220efa[_0x444d00(0x204)],'doVersion':_0x220efa[_0x444d00(0x218)],'description':_0x220efa[_0x444d00(0x1fe)]||_0x3120fe['tableComment']||undefined,'source':_0x220efa[_0x444d00(0x217)]||_0x3120fe[_0x444d00(0x214)],'table':_0x555687[_0x444d00(0x1d8)]||_0x3120fe['tableName'],'datasetKey':_0x555687[_0x444d00(0x1d5)],'pk':_0x555687[_0x444d00(0x1e0)],'db':_0x340627,'dbtable':summarizeDbtable(_0x555687),'fields':_0x1086a0,'operations':_0x2c843f,'indexes':Array[_0x444d00(0x1f5)](_0x3120fe[_0x444d00(0x1fa)])?_0x3120fe[_0x444d00(0x1fa)]:[],'relations':Array[_0x444d00(0x1f5)](_0x220efa[_0x444d00(0x1e5)])?_0x220efa[_0x444d00(0x1e5)][_0x444d00(0x215)](_0x453849=>({'fromField':_0x453849[_0x444d00(0x1f8)],'toDataset':_0x453849[_0x444d00(0x1fb)],'toCode':_0x453849['toDatasetCode'],'toTable':_0x453849['toTableName'],'toField':_0x453849[_0x444d00(0x1de)],'labelField':_0x453849[_0x444d00(0x1e2)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x220efa[_0x444d00(0x1d4)]),...Array[_0x444d00(0x1f5)](_0x220efa[_0x444d00(0x1f6)])?{'columnCodeListWithDeleted':_0x220efa[_0x444d00(0x1f6)]}:{},'formatRules':Array[_0x444d00(0x1f5)](_0x220efa[_0x444d00(0x1e9)])?_0x220efa[_0x444d00(0x1e9)]:[],'validateRules':Array[_0x444d00(0x1f5)](_0x220efa[_0x444d00(0x213)])?_0x220efa['validateRules']:[],..._0x1f1875!==undefined?{'extend':_0x1f1875}:{},'stats':{'fieldCount':_0x1086a0['length'],'operationCount':_0x2c843f[_0x444d00(0x1fd)]}}};}};
@@ -1 +1 @@
1
- const a61_0x594ebe=a61_0x5d27;(function(_0x24c60e,_0x73b355){const _0x21f17e=a61_0x5d27,_0x4a5e74=_0x24c60e();while(!![]){try{const _0x4c986e=-parseInt(_0x21f17e(0x109))/0x1+-parseInt(_0x21f17e(0xe2))/0x2+-parseInt(_0x21f17e(0x116))/0x3+parseInt(_0x21f17e(0xed))/0x4*(parseInt(_0x21f17e(0x102))/0x5)+-parseInt(_0x21f17e(0xd7))/0x6+parseInt(_0x21f17e(0xfe))/0x7+parseInt(_0x21f17e(0xe9))/0x8;if(_0x4c986e===_0x73b355)break;else _0x4a5e74['push'](_0x4a5e74['shift']());}catch(_0x36b791){_0x4a5e74['push'](_0x4a5e74['shift']());}}}(a61_0x49f4,0xb1338));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x49f4(){const _0x354d29=['Expected\x20','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','validation','message','--patch-json','str','data','dbId','shape','4442956HwYbCS','object','value','isArray','262505igTuax','extend','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','get','join','patch-json','keys','106862DJAcpr','patch','string','trim','businessGroup','datasetCode','--expect-json','stringify','write','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','length','push','3897921nWcBSW','parse','3753840pmBLdA','\x20must\x20be\x20valid\x20JSON\x20object:\x20','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','modelCode','dataset','Allowed\x20keys:\x20','Updated\x20dataset\x20extend\x20(','Patch\x20dataset\x20top-level\x20extend\x20safely','hint','\x20must\x20be\x20a\x20JSON\x20object','code','2459520onozZC','extend-update','datasetName','dbtableConfig','modelId','extend.','expect-json','22201328LtyTcC','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','Expectation\x20mismatch\x20at\x20extend.','tableName','44XsBKWG','Unsupported\x20patch\x20key:\x20','entries','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','sort','appCode','POST','No\x20changes\x20for\x20dataset\x20extend'];a61_0x49f4=function(){return _0x354d29;};return a61_0x49f4();}const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a61_0x594ebe(0x10d),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a61_0x594ebe(0x104)}]]);export function parseJsonObjectFlag(_0x38a742,_0x53f7cb){const _0xc1c79f=a61_0x594ebe;if(!_0x38a742)return undefined;let _0xdae526;try{_0xdae526=JSON[_0xc1c79f(0x117)](_0x38a742);}catch(_0x278e73){const _0x37c16d=_0x278e73 instanceof Error?_0x278e73[_0xc1c79f(0xf8)]:String(_0x278e73);throw CliErrors[_0xc1c79f(0xf7)](_0x53f7cb+_0xc1c79f(0xd8)+_0x37c16d);}if(!isPlainObject(_0xdae526)||Array[_0xc1c79f(0x101)](_0xdae526))throw CliErrors[_0xc1c79f(0xf7)](_0x53f7cb+_0xc1c79f(0xe0));return _0xdae526;}export function validateExtendPatchKeys(_0x55c61c){const _0x194622=a61_0x594ebe,_0x53f202=Object[_0x194622(0x108)](_0x55c61c);if(_0x53f202['length']===0x0)throw CliErrors[_0x194622(0xf7)](_0x194622(0x113));for(const _0x54400f of _0x53f202){const _0x5c5f13=EXTEND_PATCH_REDIRECTS[_0x194622(0x105)](_0x54400f);if(_0x5c5f13)throw CliErrors[_0x194622(0xf7)](_0x5c5f13[_0x194622(0xf8)],_0x5c5f13[_0x194622(0xdf)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x54400f))throw CliErrors[_0x194622(0xf7)](_0x194622(0xee)+_0x54400f,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x385c44=a61_0x594ebe,_0x707ee4=Array['from'](MUTABLE_EXTEND_KEYS)[_0x385c44(0xf1)]();return _0x707ee4[_0x385c44(0x114)]>0x0?_0x385c44(0xdc)+_0x707ee4['join'](',\x20'):'No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.';}export function applyExtendPatch(_0x47a84c,_0x4190c9){const _0x303ecb=a61_0x594ebe;validateExtendPatchKeys(_0x4190c9);const _0x1848bb=deepClone(_0x47a84c),_0x4f22e4=[];for(const [_0x46430b,_0x43891a]of Object[_0x303ecb(0xef)](_0x4190c9)){const _0x27888c=_0x1848bb[_0x46430b],_0x2fc2cd=deepClone(_0x43891a);!deepEqual(_0x27888c,_0x2fc2cd)&&(_0x1848bb[_0x46430b]=_0x2fc2cd,_0x4f22e4[_0x303ecb(0x115)](_0x303ecb(0xe7)+_0x46430b));}return _0x4f22e4[_0x303ecb(0xf1)](),{'after':_0x1848bb,'changedPaths':_0x4f22e4,'changed':_0x4f22e4[_0x303ecb(0x114)]>0x0};}export function assertExpectation(_0x25e48a,_0x50b892){const _0x32200c=a61_0x594ebe;if(!_0x50b892)return;for(const [_0x45997c,_0x41839f]of Object[_0x32200c(0xef)](_0x50b892)){const _0x34da11=_0x25e48a[_0x45997c];if(!deepEqual(_0x34da11,_0x41839f))throw CliErrors[_0x32200c(0xf7)](_0x32200c(0xeb)+_0x45997c,_0x32200c(0xf5)+JSON[_0x32200c(0x110)](_0x41839f)+',\x20actual\x20'+JSON['stringify'](_0x34da11));}}export async function buildDatasetExtendUpdateResult({appCode:_0x202c33,input:_0x48c2eb,dryRun:_0x73d073}){const _0x3b42c6=a61_0x594ebe;validateInput(_0x48c2eb);const _0x4fd173=await getDatasetDetail(_0x48c2eb[_0x3b42c6(0xe1)]),_0x9517f6=parseDatasetExtend(_0x4fd173[_0x3b42c6(0x103)]),_0x8e1a4c=deepClone(_0x9517f6[_0x3b42c6(0x100)]);assertExpectation(_0x8e1a4c,_0x48c2eb['expect']);const {after:_0x16cdd5,changedPaths:_0x2078d4,changed:_0x258f0d}=applyExtendPatch(_0x8e1a4c,_0x48c2eb[_0x3b42c6(0x10a)]),_0x438d26=summarizeDataset(_0x4fd173,_0x48c2eb[_0x3b42c6(0xe1)]);return _0x258f0d&&!_0x73d073&&(_0x4fd173[_0x3b42c6(0x103)]=serializeDatasetExtend(_0x16cdd5,_0x9517f6[_0x3b42c6(0xfd)]),await updateDrivenData(_0x4fd173)),{'ok':!![],'data':{'appCode':_0x202c33,'selector':{'code':_0x48c2eb['code']},'dataset':_0x438d26,'dryRun':_0x73d073,'changed':_0x258f0d,'changedPaths':_0x2078d4,'before':{'extend':_0x8e1a4c},'after':{'extend':_0x16cdd5},'submitted':_0x258f0d&&!_0x73d073},'message':_0x258f0d?_0x73d073?_0x3b42c6(0xf6)+_0x2078d4[_0x3b42c6(0x106)](',\x20')+')':_0x3b42c6(0xdd)+_0x2078d4[_0x3b42c6(0x106)](',\x20')+')':_0x3b42c6(0xf4)};}export const datasetExtendUpdate={'service':a61_0x594ebe(0xdb),'command':a61_0x594ebe(0xe3),'description':a61_0x594ebe(0xde),'risk':a61_0x594ebe(0x111),'flags':[CODE_FLAG,{'name':a61_0x594ebe(0x107),'type':a61_0x594ebe(0x10b),'required':!![],'description':a61_0x594ebe(0x112)},{'name':a61_0x594ebe(0xe8),'type':'string','required':![],'description':a61_0x594ebe(0xea)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3c4242){validateInput(readExtendUpdateInput(_0x3c4242));},async 'dryRun'(_0x20dee0){const _0x4e4eff=a61_0x594ebe,_0x4c2bfb=await buildDatasetExtendUpdateResult({'appCode':_0x20dee0[_0x4e4eff(0xf2)],'input':readExtendUpdateInput(_0x20dee0),'dryRun':!![]});return{'method':_0x4e4eff(0xf3),'url':'/smartapi/dataset/update-driven-data','body':_0x4c2bfb[_0x4e4eff(0xfb)],'description':_0x4c2bfb[_0x4e4eff(0xf8)]};},async 'execute'(_0x2cb4d5){const _0x27f33f=a61_0x594ebe;return buildDatasetExtendUpdateResult({'appCode':_0x2cb4d5[_0x27f33f(0xf2)],'input':readExtendUpdateInput(_0x2cb4d5),'dryRun':![]});}};function readExtendUpdateInput(_0x483e3e){const _0x55d4d9=a61_0x594ebe,_0x1d2e97=trim(_0x483e3e['str']('code')),_0x583f0f=parseJsonObjectFlag(_0x483e3e['str'](_0x55d4d9(0x107)),_0x55d4d9(0xf9)),_0x6389dc=parseJsonObjectFlag(_0x483e3e[_0x55d4d9(0xfa)](_0x55d4d9(0xe8)),_0x55d4d9(0x10f));return{'code':_0x1d2e97,'patch':_0x583f0f||{},'expect':_0x6389dc};}function validateInput(_0x176ec3){const _0x5b5340=a61_0x594ebe;if(!_0x176ec3[_0x5b5340(0xe1)])throw CliErrors['validation']('--code\x20is\x20required');validateExtendPatchKeys(_0x176ec3[_0x5b5340(0x10a)]);}function parseDatasetExtend(_0x6006e9){const _0x4af572=a61_0x594ebe;if(typeof _0x6006e9===_0x4af572(0x10b)){const _0x15ecf3=_0x6006e9[_0x4af572(0x10c)]();if(!_0x15ecf3)return{'value':{},'shape':_0x4af572(0x10b)};let _0x1410ff;try{_0x1410ff=JSON[_0x4af572(0x117)](_0x15ecf3);}catch(_0x5ae586){const _0x92b8e=_0x5ae586 instanceof Error?_0x5ae586[_0x4af572(0xf8)]:String(_0x5ae586);throw CliErrors[_0x4af572(0xf7)](_0x4af572(0xd9)+_0x92b8e);}if(!isPlainObject(_0x1410ff)||Array[_0x4af572(0x101)](_0x1410ff))throw CliErrors['validation'](_0x4af572(0xf0));return{'value':_0x1410ff,'shape':_0x4af572(0x10b)};}if(_0x6006e9===undefined||_0x6006e9===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x6006e9)||Array[_0x4af572(0x101)](_0x6006e9))throw CliErrors[_0x4af572(0xf7)](_0x4af572(0xf0));return{'value':_0x6006e9,'shape':_0x4af572(0xff)};}function serializeDatasetExtend(_0x542dcb,_0xacd550){const _0x21d163=a61_0x594ebe;return _0xacd550===_0x21d163(0x10b)?JSON[_0x21d163(0x110)](_0x542dcb):_0x542dcb;}function summarizeDataset(_0x4d3978,_0x2d0935){const _0x960b4c=a61_0x594ebe,_0x3b1583=isPlainObject(_0x4d3978['dataset'])?_0x4d3978[_0x960b4c(0xdb)]:{},_0x3620f9=isPlainObject(_0x4d3978[_0x960b4c(0xe5)])?_0x4d3978[_0x960b4c(0xe5)]:{};return{'id':_0x4d3978[_0x960b4c(0xe6)]??_0x4d3978['id']??_0x3b1583['datasetId']??null,'code':_0x4d3978[_0x960b4c(0xda)]??_0x4d3978[_0x960b4c(0xe1)]??_0x3b1583[_0x960b4c(0x10e)]??_0x2d0935,'name':_0x4d3978['name']??_0x3b1583[_0x960b4c(0xe4)]??null,'table':_0x3620f9['tableName']??_0x3b1583[_0x960b4c(0xec)]??null,'db':_0x3620f9['dbName']??_0x3620f9[_0x960b4c(0xfc)]??null};}function deepClone(_0x6b647c){if(_0x6b647c===undefined)return _0x6b647c;return JSON['parse'](JSON['stringify'](_0x6b647c));}function a61_0x5d27(_0x2f638a,_0x43dee6){_0x2f638a=_0x2f638a-0xd7;const _0x49f4ab=a61_0x49f4();let _0x5d2757=_0x49f4ab[_0x2f638a];return _0x5d2757;}function deepEqual(_0x4cce05,_0xac22d2){const _0x334f7a=a61_0x594ebe;return JSON['stringify'](_0x4cce05)===JSON[_0x334f7a(0x110)](_0xac22d2);}function isPlainObject(_0x10516a){const _0x5b1545=a61_0x594ebe;return Boolean(_0x10516a)&&typeof _0x10516a===_0x5b1545(0xff)&&!Array[_0x5b1545(0x101)](_0x10516a);}function trim(_0x29c68c){const _0x2a1979=a61_0x594ebe,_0x3d20e5=String(_0x29c68c||'')[_0x2a1979(0x10c)]();return _0x3d20e5;}
1
+ const a61_0x3a0ef3=a61_0x19d6;(function(_0x20a123,_0x23a0d9){const _0x3cb77a=a61_0x19d6,_0x54fcda=_0x20a123();while(!![]){try{const _0x449040=-parseInt(_0x3cb77a(0x11c))/0x1+-parseInt(_0x3cb77a(0x12b))/0x2+-parseInt(_0x3cb77a(0x115))/0x3+-parseInt(_0x3cb77a(0xf9))/0x4+-parseInt(_0x3cb77a(0x103))/0x5+-parseInt(_0x3cb77a(0x10d))/0x6+parseInt(_0x3cb77a(0x109))/0x7;if(_0x449040===_0x23a0d9)break;else _0x54fcda['push'](_0x54fcda['shift']());}catch(_0x2856ab){_0x54fcda['push'](_0x54fcda['shift']());}}}(a61_0x3883,0xcf736));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([['businessGroup',{'message':a61_0x3a0ef3(0x12d),'hint':a61_0x3a0ef3(0x12a)}]]);export function parseJsonObjectFlag(_0x202c12,_0x551f19){const _0x5ec920=a61_0x3a0ef3;if(!_0x202c12)return undefined;let _0x38452c;try{_0x38452c=JSON[_0x5ec920(0x121)](_0x202c12);}catch(_0x1075c2){const _0xf2d6f4=_0x1075c2 instanceof Error?_0x1075c2[_0x5ec920(0x11a)]:String(_0x1075c2);throw CliErrors[_0x5ec920(0x112)](_0x551f19+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0xf2d6f4);}if(!isPlainObject(_0x38452c)||Array[_0x5ec920(0x10e)](_0x38452c))throw CliErrors['validation'](_0x551f19+'\x20must\x20be\x20a\x20JSON\x20object');return _0x38452c;}export function validateExtendPatchKeys(_0xcc9455){const _0x11a1f0=a61_0x3a0ef3,_0x1263b0=Object[_0x11a1f0(0x10b)](_0xcc9455);if(_0x1263b0['length']===0x0)throw CliErrors[_0x11a1f0(0x112)](_0x11a1f0(0x123));for(const _0x5279cb of _0x1263b0){const _0x110b57=EXTEND_PATCH_REDIRECTS[_0x11a1f0(0x11e)](_0x5279cb);if(_0x110b57)throw CliErrors[_0x11a1f0(0x112)](_0x110b57[_0x11a1f0(0x11a)],_0x110b57['hint']);if(!MUTABLE_EXTEND_KEYS[_0x11a1f0(0x10f)](_0x5279cb))throw CliErrors[_0x11a1f0(0x112)](_0x11a1f0(0xfd)+_0x5279cb,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x51422f=a61_0x3a0ef3,_0x2b7e0b=Array['from'](MUTABLE_EXTEND_KEYS)[_0x51422f(0xfa)]();return _0x2b7e0b['length']>0x0?_0x51422f(0xff)+_0x2b7e0b[_0x51422f(0x12f)](',\x20'):_0x51422f(0x133);}export function applyExtendPatch(_0x1335cd,_0x33c66c){const _0x4f0371=a61_0x3a0ef3;validateExtendPatchKeys(_0x33c66c);const _0x33ae4e=deepClone(_0x1335cd),_0x18275c=[];for(const [_0x51c7d6,_0x4072e3]of Object[_0x4f0371(0x12e)](_0x33c66c)){const _0x32a1f2=_0x33ae4e[_0x51c7d6],_0x18dabf=deepClone(_0x4072e3);!deepEqual(_0x32a1f2,_0x18dabf)&&(_0x33ae4e[_0x51c7d6]=_0x18dabf,_0x18275c[_0x4f0371(0x108)]('extend.'+_0x51c7d6));}return _0x18275c[_0x4f0371(0xfa)](),{'after':_0x33ae4e,'changedPaths':_0x18275c,'changed':_0x18275c[_0x4f0371(0x102)]>0x0};}export function assertExpectation(_0x48b490,_0x207195){const _0x2661d0=a61_0x3a0ef3;if(!_0x207195)return;for(const [_0x80018b,_0x1b44be]of Object[_0x2661d0(0x12e)](_0x207195)){const _0x1250f4=_0x48b490[_0x80018b];if(!deepEqual(_0x1250f4,_0x1b44be))throw CliErrors[_0x2661d0(0x112)]('Expectation\x20mismatch\x20at\x20extend.'+_0x80018b,_0x2661d0(0x110)+JSON['stringify'](_0x1b44be)+_0x2661d0(0x120)+JSON[_0x2661d0(0xfb)](_0x1250f4));}}export async function buildDatasetExtendUpdateResult({appCode:_0x160f13,input:_0x238c1f,dryRun:_0x4bd0c8}){const _0x5620aa=a61_0x3a0ef3;validateInput(_0x238c1f);const _0x5df265=await getDatasetDetail(_0x238c1f[_0x5620aa(0x130)]),_0x5d87f4=parseDatasetExtend(_0x5df265['extend']),_0x2beb77=deepClone(_0x5d87f4[_0x5620aa(0x129)]);assertExpectation(_0x2beb77,_0x238c1f[_0x5620aa(0x117)]);const {after:_0x5530ab,changedPaths:_0xb47f31,changed:_0xe00dd5}=applyExtendPatch(_0x2beb77,_0x238c1f[_0x5620aa(0x11d)]),_0x253268=summarizeDataset(_0x5df265,_0x238c1f['code']);return _0xe00dd5&&!_0x4bd0c8&&(_0x5df265[_0x5620aa(0x128)]=serializeDatasetExtend(_0x5530ab,_0x5d87f4[_0x5620aa(0x114)]),await updateDrivenData(_0x5df265)),{'ok':!![],'data':{'appCode':_0x160f13,'selector':{'code':_0x238c1f[_0x5620aa(0x130)]},'dataset':_0x253268,'dryRun':_0x4bd0c8,'changed':_0xe00dd5,'changedPaths':_0xb47f31,'before':{'extend':_0x2beb77},'after':{'extend':_0x5530ab},'submitted':_0xe00dd5&&!_0x4bd0c8},'message':_0xe00dd5?_0x4bd0c8?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0xb47f31['join'](',\x20')+')':'Updated\x20dataset\x20extend\x20('+_0xb47f31[_0x5620aa(0x12f)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':'dataset','command':'extend-update','description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a61_0x3a0ef3(0x113),'flags':[CODE_FLAG,{'name':a61_0x3a0ef3(0xfe),'type':'string','required':!![],'description':a61_0x3a0ef3(0x10a)},{'name':a61_0x3a0ef3(0x127),'type':a61_0x3a0ef3(0xfc),'required':![],'description':a61_0x3a0ef3(0x100)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2b336c){validateInput(readExtendUpdateInput(_0x2b336c));},async 'dryRun'(_0x399689){const _0x45cac4=a61_0x3a0ef3,_0x39b7e8=await buildDatasetExtendUpdateResult({'appCode':_0x399689[_0x45cac4(0x105)],'input':readExtendUpdateInput(_0x399689),'dryRun':!![]});return{'method':_0x45cac4(0x106),'url':'/smartapi/dataset/update-driven-data','body':_0x39b7e8[_0x45cac4(0x101)],'description':_0x39b7e8[_0x45cac4(0x11a)]};},async 'execute'(_0x3f3673){const _0x41d41d=a61_0x3a0ef3;return buildDatasetExtendUpdateResult({'appCode':_0x3f3673[_0x41d41d(0x105)],'input':readExtendUpdateInput(_0x3f3673),'dryRun':![]});}};function a61_0x19d6(_0x5ebd60,_0x5541a3){_0x5ebd60=_0x5ebd60-0xf9;const _0x388368=a61_0x3883();let _0x19d65a=_0x388368[_0x5ebd60];return _0x19d65a;}function readExtendUpdateInput(_0x4c32c8){const _0x21b4ee=a61_0x3a0ef3,_0x264906=trim(_0x4c32c8[_0x21b4ee(0x125)]('code')),_0x552611=parseJsonObjectFlag(_0x4c32c8['str'](_0x21b4ee(0xfe)),_0x21b4ee(0x126)),_0xef12c=parseJsonObjectFlag(_0x4c32c8[_0x21b4ee(0x125)](_0x21b4ee(0x127)),'--expect-json');return{'code':_0x264906,'patch':_0x552611||{},'expect':_0xef12c};}function validateInput(_0x5a11ac){const _0x296a6a=a61_0x3a0ef3;if(!_0x5a11ac['code'])throw CliErrors[_0x296a6a(0x112)](_0x296a6a(0x134));validateExtendPatchKeys(_0x5a11ac['patch']);}function parseDatasetExtend(_0x3aae4a){const _0x599c89=a61_0x3a0ef3;if(typeof _0x3aae4a===_0x599c89(0xfc)){const _0x5dc2ff=_0x3aae4a[_0x599c89(0x124)]();if(!_0x5dc2ff)return{'value':{},'shape':'string'};let _0x3f01b4;try{_0x3f01b4=JSON[_0x599c89(0x121)](_0x5dc2ff);}catch(_0x14ba5e){const _0x33ac94=_0x14ba5e instanceof Error?_0x14ba5e[_0x599c89(0x11a)]:String(_0x14ba5e);throw CliErrors[_0x599c89(0x112)](_0x599c89(0x12c)+_0x33ac94);}if(!isPlainObject(_0x3f01b4)||Array[_0x599c89(0x10e)](_0x3f01b4))throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x3f01b4,'shape':'string'};}if(_0x3aae4a===undefined||_0x3aae4a===null)return{'value':{},'shape':_0x599c89(0xfc)};if(!isPlainObject(_0x3aae4a)||Array['isArray'](_0x3aae4a))throw CliErrors[_0x599c89(0x112)](_0x599c89(0x122));return{'value':_0x3aae4a,'shape':'object'};}function a61_0x3883(){const _0x11dfa4=['stringify','string','Unsupported\x20patch\x20key:\x20','patch-json','Allowed\x20keys:\x20','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','data','length','3428765RsGtgf','object','appCode','POST','datasetId','push','42483483HGyHsE','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','keys','dataset','2262066QRmQtl','isArray','has','Expected\x20','datasetName','validation','write','shape','2961117dndVuh','modelCode','expect','dbName','dbtableConfig','message','dbId','1549759AKvkUh','patch','get','datasetCode',',\x20actual\x20','parse','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','trim','str','--patch-json','expect-json','extend','value','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','2094158iHYLda','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','entries','join','code','name','tableName','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','--code\x20is\x20required','2290840hiLoUS','sort'];a61_0x3883=function(){return _0x11dfa4;};return a61_0x3883();}function serializeDatasetExtend(_0x5e8610,_0x5ab734){const _0x3895ca=a61_0x3a0ef3;return _0x5ab734===_0x3895ca(0xfc)?JSON[_0x3895ca(0xfb)](_0x5e8610):_0x5e8610;}function summarizeDataset(_0x1228fc,_0x2f8aea){const _0x16cbfc=a61_0x3a0ef3,_0x2c1929=isPlainObject(_0x1228fc[_0x16cbfc(0x10c)])?_0x1228fc[_0x16cbfc(0x10c)]:{},_0x1eb447=isPlainObject(_0x1228fc[_0x16cbfc(0x119)])?_0x1228fc[_0x16cbfc(0x119)]:{};return{'id':_0x1228fc['modelId']??_0x1228fc['id']??_0x2c1929[_0x16cbfc(0x107)]??null,'code':_0x1228fc[_0x16cbfc(0x116)]??_0x1228fc['code']??_0x2c1929[_0x16cbfc(0x11f)]??_0x2f8aea,'name':_0x1228fc[_0x16cbfc(0x131)]??_0x2c1929[_0x16cbfc(0x111)]??null,'table':_0x1eb447[_0x16cbfc(0x132)]??_0x2c1929[_0x16cbfc(0x132)]??null,'db':_0x1eb447[_0x16cbfc(0x118)]??_0x1eb447[_0x16cbfc(0x11b)]??null};}function deepClone(_0xeaf3f1){const _0x5bfdfb=a61_0x3a0ef3;if(_0xeaf3f1===undefined)return _0xeaf3f1;return JSON[_0x5bfdfb(0x121)](JSON[_0x5bfdfb(0xfb)](_0xeaf3f1));}function deepEqual(_0x4a3386,_0x46fa11){const _0xaccac7=a61_0x3a0ef3;return JSON[_0xaccac7(0xfb)](_0x4a3386)===JSON[_0xaccac7(0xfb)](_0x46fa11);}function isPlainObject(_0x2592f6){const _0x213dcf=a61_0x3a0ef3;return Boolean(_0x2592f6)&&typeof _0x2592f6===_0x213dcf(0x104)&&!Array[_0x213dcf(0x10e)](_0x2592f6);}function trim(_0x3f0eda){const _0x42e4c1=a61_0x3a0ef3,_0x4c916b=String(_0x3f0eda||'')[_0x42e4c1(0x124)]();return _0x4c916b;}
@@ -1 +1 @@
1
- const a62_0x26e6e0=a62_0x2690;(function(_0xb20830,_0xbb6bfa){const _0x3f762e=a62_0x2690,_0x6e2db1=_0xb20830();while(!![]){try{const _0xcc9b6f=-parseInt(_0x3f762e(0xd2))/0x1+-parseInt(_0x3f762e(0x90))/0x2+parseInt(_0x3f762e(0xaa))/0x3*(-parseInt(_0x3f762e(0xa9))/0x4)+-parseInt(_0x3f762e(0xbd))/0x5+parseInt(_0x3f762e(0xa8))/0x6*(parseInt(_0x3f762e(0xb6))/0x7)+parseInt(_0x3f762e(0x91))/0x8+parseInt(_0x3f762e(0xca))/0x9;if(_0xcc9b6f===_0xbb6bfa)break;else _0x6e2db1['push'](_0x6e2db1['shift']());}catch(_0x1fb8ff){_0x6e2db1['push'](_0x6e2db1['shift']());}}}(a62_0x472a,0x76d5d));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a62_0x2690(_0x54f733,_0x25bcee){_0x54f733=_0x54f733-0x8b;const _0x472a58=a62_0x472a();let _0x269072=_0x472a58[_0x54f733];return _0x269072;}const MUTABLE_FIELD_KEYS=new Set([a62_0x26e6e0(0xb4),'displayName',a62_0x26e6e0(0xa2),'options',a62_0x26e6e0(0xd6),'datetimeFormat',a62_0x26e6e0(0xa4),a62_0x26e6e0(0xab),'deprecated']),FORBIDDEN_FIELD_KEYS=new Set(['id',a62_0x26e6e0(0xba),'code',a62_0x26e6e0(0xce),'dbTypeLen',a62_0x26e6e0(0xd4),a62_0x26e6e0(0x9d),'tableName',a62_0x26e6e0(0xa3),a62_0x26e6e0(0x92),a62_0x26e6e0(0xc3),a62_0x26e6e0(0xc4)]);export function parseJsonObjectFlag(_0xc29f25,_0x5c8b83){const _0x7f0f41=a62_0x26e6e0;if(!_0xc29f25)return undefined;let _0x441a80;try{_0x441a80=JSON[_0x7f0f41(0xc6)](_0xc29f25);}catch(_0x231721){const _0x2dc3e3=_0x231721 instanceof Error?_0x231721[_0x7f0f41(0x99)]:String(_0x231721);throw CliErrors[_0x7f0f41(0xa5)](_0x5c8b83+_0x7f0f41(0x96)+_0x2dc3e3);}if(!isPlainObject(_0x441a80)||Array[_0x7f0f41(0xb1)](_0x441a80))throw CliErrors['validation'](_0x5c8b83+_0x7f0f41(0xd0));return _0x441a80;}export function validatePatchKeys(_0x8c79ff){const _0x23906b=a62_0x26e6e0,_0x38a52f=Object['keys'](_0x8c79ff);if(_0x38a52f[_0x23906b(0xc1)]===0x0)throw CliErrors['validation'](_0x23906b(0xb3));for(const _0x3e0c5e of _0x38a52f){if(FORBIDDEN_FIELD_KEYS[_0x23906b(0xad)](_0x3e0c5e))throw CliErrors['validation']('Forbidden\x20patch\x20key:\x20'+_0x3e0c5e);if(!MUTABLE_FIELD_KEYS[_0x23906b(0xad)](_0x3e0c5e))throw CliErrors[_0x23906b(0xa5)](_0x23906b(0x9f)+_0x3e0c5e,'Allowed\x20keys:\x20'+Array[_0x23906b(0xbf)](MUTABLE_FIELD_KEYS)[_0x23906b(0xd1)](',\x20'));}}export function applyFieldPatch(_0x1990c3,_0x50270a){const _0x1e45a2=a62_0x26e6e0;validatePatchKeys(_0x50270a);const _0xee6948=deepClone(_0x1990c3),_0x492d75=new Set();for(const [_0x56fa84,_0xe93418]of Object[_0x1e45a2(0x8f)](_0x50270a)){const _0xba6d30=_0xee6948[_0x56fa84],_0x158dbf=mergePatchValue(_0xba6d30,_0xe93418);!deepEqual(_0xba6d30,_0x158dbf)&&(_0xee6948[_0x56fa84]=_0x158dbf,_0x492d75['add'](_0x56fa84),collectChangedPaths(_0x56fa84,_0xba6d30,_0x158dbf,_0x492d75));}return{'after':_0xee6948,'changedPaths':Array[_0x1e45a2(0xbf)](_0x492d75)[_0x1e45a2(0xae)](),'changed':_0x492d75[_0x1e45a2(0xc9)]>0x0};}export function assertExpectation(_0x53742a,_0x4dfa8c){const _0x50c048=a62_0x26e6e0;if(!_0x4dfa8c)return;for(const [_0x52fb04,_0xf14715]of Object[_0x50c048(0x8f)](_0x4dfa8c)){const _0x4b06ba=_0x53742a[_0x52fb04];if(!deepEqual(_0x4b06ba,_0xf14715))throw CliErrors['validation'](_0x50c048(0xa0)+_0x52fb04,_0x50c048(0xaf)+JSON[_0x50c048(0xbe)](_0xf14715)+_0x50c048(0x8c)+JSON[_0x50c048(0xbe)](_0x4b06ba));}}export async function buildDatasetFieldUpdateResult({appCode:_0x549305,input:_0x1519ce,dryRun:_0x313a82}){const _0x500171=a62_0x26e6e0;validateInput(_0x1519ce);const _0x43a408=await getDatasetDetail(_0x1519ce['code']),_0x310268=readFieldArray(_0x43a408),_0x4193ca=_0x310268['findIndex'](_0x5900ef=>_0x5900ef?.[_0x500171(0xba)]===_0x1519ce[_0x500171(0xbc)]);if(_0x4193ca<0x0)throw CliErrors[_0x500171(0xa5)](_0x500171(0xa1)+_0x1519ce[_0x500171(0xbc)]);const _0x2e500f=deepClone(_0x310268[_0x4193ca]);assertExpectation(_0x2e500f,_0x1519ce[_0x500171(0x9a)]);const {after:_0x587f2f,changedPaths:_0x23d795,changed:_0x390bff}=applyFieldPatch(_0x2e500f,_0x1519ce[_0x500171(0xd8)]),_0x5a7288=summarizeDataset(_0x43a408,_0x1519ce['code']);return _0x390bff&&!_0x313a82&&(_0x310268[_0x4193ca]=_0x587f2f,await updateDrivenData(_0x43a408)),{'ok':!![],'data':{'appCode':_0x549305,'selector':{'code':_0x1519ce['code']},'dataset':_0x5a7288,'field':{'id':_0x2e500f['id']??null,'name':_0x2e500f[_0x500171(0xba)]},'dryRun':_0x313a82,'changed':_0x390bff,'changedPaths':_0x23d795,'before':_0x2e500f,'after':_0x587f2f,'submitted':_0x390bff&&!_0x313a82},'message':_0x390bff?_0x313a82?_0x500171(0x9e)+_0x1519ce[_0x500171(0xbc)]+'\x20would\x20change\x20('+_0x23d795[_0x500171(0xd1)](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x1519ce['field']+'\x20('+_0x23d795[_0x500171(0xd1)](',\x20')+')':_0x500171(0x8b)+_0x1519ce[_0x500171(0xbc)]};}function a62_0x472a(){const _0x1b64e2=['str','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','field-update','dbType','modelCode','\x20must\x20be\x20a\x20JSON\x20object','join','634643dlDNDS','modelId','dbTypeScale','trim','required','data','patch','No\x20changes\x20for\x20dataset\x20field\x20',',\x20actual\x20','datasetCode','datasetId','entries','1792852HOVhgG','804288vlWPle','pkField','--expect-json','object','string','\x20must\x20be\x20valid\x20JSON\x20object:\x20','POST','add','message','expect','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','code','dbFieldName','Dry-run:\x20dataset\x20field\x20','Unsupported\x20patch\x20key:\x20','Expectation\x20mismatch\x20at\x20','Field\x20not\x20found:\x20','description','deleted','defaultAggregation','validation','tableName','properties','6azdXCA','52SaQqBq','18579ESxdXG','chartRole','dbtableConfig','has','sort','Expected\x20','write','isArray','Exact\x20raw\x20fields[].name\x20to\x20patch','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','doType','appCode','4614162PIwyZc','/smartapi/dataset/update-driven-data','expect-json','dataset','name','--patch-json','field','512410psCiph','stringify','from','dbId','length','keys','autoIncrement','systemRetain','fields','parse','dbName','--code\x20is\x20required','size','12969963CTecLv'];a62_0x472a=function(){return _0x1b64e2;};return a62_0x472a();}export const datasetFieldUpdate={'service':'dataset','command':a62_0x26e6e0(0xcd),'description':'Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','risk':a62_0x26e6e0(0xb0),'flags':[CODE_FLAG,{'name':a62_0x26e6e0(0xbc),'type':a62_0x26e6e0(0x95),'required':!![],'description':a62_0x26e6e0(0xb2)},{'name':'patch-json','type':'string','required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a62_0x26e6e0(0xb8),'type':a62_0x26e6e0(0x95),'required':![],'description':a62_0x26e6e0(0x9b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xc147fe){validateInput(readFieldUpdateInput(_0xc147fe));},async 'dryRun'(_0x99d082){const _0x417688=a62_0x26e6e0,_0x49ac15=await buildDatasetFieldUpdateResult({'appCode':_0x99d082[_0x417688(0xb5)],'input':readFieldUpdateInput(_0x99d082),'dryRun':!![]});return{'method':_0x417688(0x97),'url':_0x417688(0xb7),'body':_0x49ac15[_0x417688(0xd7)],'description':_0x49ac15['message']};},async 'execute'(_0x521b17){const _0x3743f7=a62_0x26e6e0;return buildDatasetFieldUpdateResult({'appCode':_0x521b17[_0x3743f7(0xb5)],'input':readFieldUpdateInput(_0x521b17),'dryRun':![]});}};function readFieldUpdateInput(_0x4ca7e3){const _0x3399c6=a62_0x26e6e0,_0x5e599e=trim(_0x4ca7e3['str'](_0x3399c6(0x9c))),_0x172365=emptyToUndefined(_0x4ca7e3[_0x3399c6(0xcb)]('field')),_0x2a6898=parseJsonObjectFlag(_0x4ca7e3[_0x3399c6(0xcb)]('patch-json'),_0x3399c6(0xbb)),_0x5d75ef=parseJsonObjectFlag(_0x4ca7e3[_0x3399c6(0xcb)](_0x3399c6(0xb8)),_0x3399c6(0x93));return{'code':_0x5e599e,'field':_0x172365||'','patch':_0x2a6898||{},'expect':_0x5d75ef};}function validateInput(_0x566696){const _0x1f9fab=a62_0x26e6e0;if(!_0x566696['code'])throw CliErrors[_0x1f9fab(0xa5)](_0x1f9fab(0xc8));if(!_0x566696[_0x1f9fab(0xbc)])throw CliErrors[_0x1f9fab(0xa5)]('--field\x20is\x20required');validatePatchKeys(_0x566696['patch']);}function readFieldArray(_0x433d04){const _0x1b1283=a62_0x26e6e0;if(Array[_0x1b1283(0xb1)](_0x433d04['fields']))return _0x433d04[_0x1b1283(0xc5)];if(Array[_0x1b1283(0xb1)](_0x433d04[_0x1b1283(0xa7)]))return _0x433d04[_0x1b1283(0xa7)];throw CliErrors[_0x1b1283(0xa5)](_0x1b1283(0xcc));}function summarizeDataset(_0x30fa00,_0x39f3cd){const _0x2852c3=a62_0x26e6e0,_0xa537bd=isPlainObject(_0x30fa00['dataset'])?_0x30fa00[_0x2852c3(0xb9)]:{},_0x3a1079=isPlainObject(_0x30fa00[_0x2852c3(0xac)])?_0x30fa00['dbtableConfig']:{};return{'id':_0x30fa00[_0x2852c3(0xd3)]??_0x30fa00['id']??_0xa537bd[_0x2852c3(0x8e)]??null,'code':_0x30fa00[_0x2852c3(0xcf)]??_0x30fa00[_0x2852c3(0x9c)]??_0xa537bd[_0x2852c3(0x8d)]??_0x39f3cd,'name':_0x30fa00[_0x2852c3(0xba)]??_0xa537bd['datasetName']??null,'table':_0x3a1079[_0x2852c3(0xa6)]??_0xa537bd[_0x2852c3(0xa6)]??null,'db':_0x3a1079[_0x2852c3(0xc7)]??_0x3a1079[_0x2852c3(0xc0)]??null};}function mergePatchValue(_0x1a210c,_0x408cb1){if(isPlainObject(_0x1a210c)&&isPlainObject(_0x408cb1))return deepMerge(_0x1a210c,_0x408cb1);return deepClone(_0x408cb1);}function deepMerge(_0xc06063,_0x5d8522){const _0x153625=a62_0x26e6e0,_0x580983=deepClone(_0xc06063);for(const [_0x560569,_0x8fbbc6]of Object[_0x153625(0x8f)](_0x5d8522)){_0x580983[_0x560569]=isPlainObject(_0x580983[_0x560569])&&isPlainObject(_0x8fbbc6)?deepMerge(_0x580983[_0x560569],_0x8fbbc6):deepClone(_0x8fbbc6);}return _0x580983;}function collectChangedPaths(_0x119f61,_0x216640,_0x237591,_0x42a2c7){const _0x2d8192=a62_0x26e6e0;if(!isPlainObject(_0x216640)||!isPlainObject(_0x237591))return;const _0x46df30=new Set([...Object[_0x2d8192(0xc2)](_0x216640),...Object[_0x2d8192(0xc2)](_0x237591)]);for(const _0x3c9f43 of _0x46df30){const _0x43557c=_0x216640[_0x3c9f43],_0x30b57c=_0x237591[_0x3c9f43];!deepEqual(_0x43557c,_0x30b57c)&&_0x42a2c7[_0x2d8192(0x98)](_0x119f61+'.'+_0x3c9f43);}}function deepClone(_0x143129){const _0x382607=a62_0x26e6e0;if(_0x143129===undefined)return _0x143129;return JSON[_0x382607(0xc6)](JSON[_0x382607(0xbe)](_0x143129));}function deepEqual(_0x5de51a,_0xf25d05){const _0x1b34ae=a62_0x26e6e0;return JSON[_0x1b34ae(0xbe)](_0x5de51a)===JSON[_0x1b34ae(0xbe)](_0xf25d05);}function isPlainObject(_0x103520){const _0x275f9a=a62_0x26e6e0;return Boolean(_0x103520)&&typeof _0x103520===_0x275f9a(0x94)&&!Array['isArray'](_0x103520);}function emptyToUndefined(_0x30401e){const _0x2cefc0=a62_0x26e6e0,_0x3e2b8b=String(_0x30401e||'')[_0x2cefc0(0xd5)]();return _0x3e2b8b||undefined;}function trim(_0x5440a2){const _0x13877b=a62_0x26e6e0;return String(_0x5440a2||'')[_0x13877b(0xd5)]();}
1
+ const a62_0xcf12c8=a62_0x3570;(function(_0x4a6a29,_0x7722a3){const _0x31d2a3=a62_0x3570,_0x3b2fd2=_0x4a6a29();while(!![]){try{const _0x2d4da1=-parseInt(_0x31d2a3(0x108))/0x1*(-parseInt(_0x31d2a3(0x115))/0x2)+parseInt(_0x31d2a3(0x134))/0x3+-parseInt(_0x31d2a3(0x130))/0x4*(parseInt(_0x31d2a3(0x149))/0x5)+parseInt(_0x31d2a3(0x12d))/0x6+parseInt(_0x31d2a3(0xff))/0x7*(-parseInt(_0x31d2a3(0x10f))/0x8)+parseInt(_0x31d2a3(0x135))/0x9+-parseInt(_0x31d2a3(0x13c))/0xa*(-parseInt(_0x31d2a3(0x146))/0xb);if(_0x2d4da1===_0x7722a3)break;else _0x3b2fd2['push'](_0x3b2fd2['shift']());}catch(_0x5b166c){_0x3b2fd2['push'](_0x3b2fd2['shift']());}}}(a62_0x557a,0x91f2c));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a62_0xcf12c8(0x101),a62_0xcf12c8(0x103),a62_0xcf12c8(0x148),a62_0xcf12c8(0x11b),a62_0xcf12c8(0x128),a62_0xcf12c8(0x112),a62_0xcf12c8(0x129),a62_0xcf12c8(0x143)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a62_0xcf12c8(0x144),a62_0xcf12c8(0x138),a62_0xcf12c8(0xfa),a62_0xcf12c8(0x10a),'dbTypeScale',a62_0xcf12c8(0x125),a62_0xcf12c8(0x119),a62_0xcf12c8(0x11d),a62_0xcf12c8(0x110),a62_0xcf12c8(0x122),a62_0xcf12c8(0x106)]);export function parseJsonObjectFlag(_0x262a12,_0x43d5bc){const _0x346842=a62_0xcf12c8;if(!_0x262a12)return undefined;let _0x353538;try{_0x353538=JSON['parse'](_0x262a12);}catch(_0x342b84){const _0x49e6dc=_0x342b84 instanceof Error?_0x342b84[_0x346842(0x12b)]:String(_0x342b84);throw CliErrors[_0x346842(0x14a)](_0x43d5bc+_0x346842(0x120)+_0x49e6dc);}if(!isPlainObject(_0x353538)||Array['isArray'](_0x353538))throw CliErrors[_0x346842(0x14a)](_0x43d5bc+_0x346842(0x111));return _0x353538;}export function validatePatchKeys(_0x1710e7){const _0x1e086c=a62_0xcf12c8,_0x4c466a=Object[_0x1e086c(0x116)](_0x1710e7);if(_0x4c466a[_0x1e086c(0x13a)]===0x0)throw CliErrors[_0x1e086c(0x14a)](_0x1e086c(0x13e));for(const _0x2c4135 of _0x4c466a){if(FORBIDDEN_FIELD_KEYS[_0x1e086c(0x11e)](_0x2c4135))throw CliErrors['validation'](_0x1e086c(0xfc)+_0x2c4135);if(!MUTABLE_FIELD_KEYS[_0x1e086c(0x11e)](_0x2c4135))throw CliErrors[_0x1e086c(0x14a)](_0x1e086c(0x126)+_0x2c4135,'Allowed\x20keys:\x20'+Array[_0x1e086c(0xfd)](MUTABLE_FIELD_KEYS)[_0x1e086c(0x133)](',\x20'));}}function a62_0x3570(_0x1e19d9,_0x37b37b){_0x1e19d9=_0x1e19d9-0xf9;const _0x557aed=a62_0x557a();let _0x357001=_0x557aed[_0x1e19d9];return _0x357001;}export function applyFieldPatch(_0x3dcae2,_0x2b9b57){const _0x48f396=a62_0xcf12c8;validatePatchKeys(_0x2b9b57);const _0x505654=deepClone(_0x3dcae2),_0x21e764=new Set();for(const [_0x2f9b84,_0x2e9d1e]of Object[_0x48f396(0x139)](_0x2b9b57)){const _0x1f3db2=_0x505654[_0x2f9b84],_0x36ec6a=mergePatchValue(_0x1f3db2,_0x2e9d1e);!deepEqual(_0x1f3db2,_0x36ec6a)&&(_0x505654[_0x2f9b84]=_0x36ec6a,_0x21e764['add'](_0x2f9b84),collectChangedPaths(_0x2f9b84,_0x1f3db2,_0x36ec6a,_0x21e764));}return{'after':_0x505654,'changedPaths':Array['from'](_0x21e764)[_0x48f396(0x12a)](),'changed':_0x21e764[_0x48f396(0xfe)]>0x0};}export function assertExpectation(_0xb898d5,_0x53b8be){const _0x4c302d=a62_0xcf12c8;if(!_0x53b8be)return;for(const [_0x4965cc,_0x4a8d19]of Object['entries'](_0x53b8be)){const _0x44abd0=_0xb898d5[_0x4965cc];if(!deepEqual(_0x44abd0,_0x4a8d19))throw CliErrors[_0x4c302d(0x14a)](_0x4c302d(0x10b)+_0x4965cc,_0x4c302d(0x136)+JSON['stringify'](_0x4a8d19)+_0x4c302d(0x147)+JSON[_0x4c302d(0x12e)](_0x44abd0));}}export async function buildDatasetFieldUpdateResult({appCode:_0x5ab75e,input:_0x4c4cb1,dryRun:_0x5cdc77}){const _0x36753c=a62_0xcf12c8;validateInput(_0x4c4cb1);const _0x564920=await getDatasetDetail(_0x4c4cb1[_0x36753c(0x138)]),_0x56bfaa=readFieldArray(_0x564920),_0x4905f1=_0x56bfaa[_0x36753c(0x105)](_0x5aaec5=>_0x5aaec5?.[_0x36753c(0x144)]===_0x4c4cb1['field']);if(_0x4905f1<0x0)throw CliErrors['validation'](_0x36753c(0x12f)+_0x4c4cb1[_0x36753c(0x100)]);const _0x205c83=deepClone(_0x56bfaa[_0x4905f1]);assertExpectation(_0x205c83,_0x4c4cb1[_0x36753c(0x137)]);const {after:_0x5f2438,changedPaths:_0x81fe4d,changed:_0x3360fa}=applyFieldPatch(_0x205c83,_0x4c4cb1[_0x36753c(0x10c)]),_0x17f96a=summarizeDataset(_0x564920,_0x4c4cb1[_0x36753c(0x138)]);return _0x3360fa&&!_0x5cdc77&&(_0x56bfaa[_0x4905f1]=_0x5f2438,await updateDrivenData(_0x564920)),{'ok':!![],'data':{'appCode':_0x5ab75e,'selector':{'code':_0x4c4cb1[_0x36753c(0x138)]},'dataset':_0x17f96a,'field':{'id':_0x205c83['id']??null,'name':_0x205c83[_0x36753c(0x144)]},'dryRun':_0x5cdc77,'changed':_0x3360fa,'changedPaths':_0x81fe4d,'before':_0x205c83,'after':_0x5f2438,'submitted':_0x3360fa&&!_0x5cdc77},'message':_0x3360fa?_0x5cdc77?'Dry-run:\x20dataset\x20field\x20'+_0x4c4cb1[_0x36753c(0x100)]+'\x20would\x20change\x20('+_0x81fe4d[_0x36753c(0x133)](',\x20')+')':_0x36753c(0x10e)+_0x4c4cb1['field']+'\x20('+_0x81fe4d['join'](',\x20')+')':_0x36753c(0x124)+_0x4c4cb1[_0x36753c(0x100)]};}export const datasetFieldUpdate={'service':a62_0xcf12c8(0x117),'command':a62_0xcf12c8(0x121),'description':a62_0xcf12c8(0xf9),'risk':'write','flags':[CODE_FLAG,{'name':'field','type':a62_0xcf12c8(0x102),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':'patch-json','type':a62_0xcf12c8(0x102),'required':!![],'description':a62_0xcf12c8(0x140)},{'name':'expect-json','type':a62_0xcf12c8(0x102),'required':![],'description':a62_0xcf12c8(0x142)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1c4aec){validateInput(readFieldUpdateInput(_0x1c4aec));},async 'dryRun'(_0x4d6970){const _0x1c8d9f=a62_0xcf12c8,_0xd9d864=await buildDatasetFieldUpdateResult({'appCode':_0x4d6970[_0x1c8d9f(0x109)],'input':readFieldUpdateInput(_0x4d6970),'dryRun':!![]});return{'method':_0x1c8d9f(0xfb),'url':_0x1c8d9f(0x141),'body':_0xd9d864[_0x1c8d9f(0x13f)],'description':_0xd9d864[_0x1c8d9f(0x12b)]};},async 'execute'(_0x6b7039){return buildDatasetFieldUpdateResult({'appCode':_0x6b7039['appCode'],'input':readFieldUpdateInput(_0x6b7039),'dryRun':![]});}};function readFieldUpdateInput(_0x32ab61){const _0x3a64ee=a62_0xcf12c8,_0x5a658f=trim(_0x32ab61['str'](_0x3a64ee(0x138))),_0x54ea5c=emptyToUndefined(_0x32ab61['str'](_0x3a64ee(0x100))),_0x57406c=parseJsonObjectFlag(_0x32ab61[_0x3a64ee(0x107)](_0x3a64ee(0x104)),'--patch-json'),_0x20c0e8=parseJsonObjectFlag(_0x32ab61[_0x3a64ee(0x107)](_0x3a64ee(0x113)),'--expect-json');return{'code':_0x5a658f,'field':_0x54ea5c||'','patch':_0x57406c||{},'expect':_0x20c0e8};}function validateInput(_0xd10a31){const _0x21333e=a62_0xcf12c8;if(!_0xd10a31[_0x21333e(0x138)])throw CliErrors[_0x21333e(0x14a)]('--code\x20is\x20required');if(!_0xd10a31['field'])throw CliErrors[_0x21333e(0x14a)](_0x21333e(0x13d));validatePatchKeys(_0xd10a31[_0x21333e(0x10c)]);}function readFieldArray(_0x28f6a3){const _0x117de5=a62_0xcf12c8;if(Array['isArray'](_0x28f6a3[_0x117de5(0x12c)]))return _0x28f6a3[_0x117de5(0x12c)];if(Array['isArray'](_0x28f6a3[_0x117de5(0x118)]))return _0x28f6a3['properties'];throw CliErrors[_0x117de5(0x14a)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x2c9c2c,_0x3e3cb2){const _0x113a2f=a62_0xcf12c8,_0x1cc6b6=isPlainObject(_0x2c9c2c['dataset'])?_0x2c9c2c[_0x113a2f(0x117)]:{},_0x311ab2=isPlainObject(_0x2c9c2c[_0x113a2f(0x132)])?_0x2c9c2c[_0x113a2f(0x132)]:{};return{'id':_0x2c9c2c['modelId']??_0x2c9c2c['id']??_0x1cc6b6[_0x113a2f(0x11f)]??null,'code':_0x2c9c2c[_0x113a2f(0x127)]??_0x2c9c2c[_0x113a2f(0x138)]??_0x1cc6b6[_0x113a2f(0x11c)]??_0x3e3cb2,'name':_0x2c9c2c[_0x113a2f(0x144)]??_0x1cc6b6[_0x113a2f(0x13b)]??null,'table':_0x311ab2[_0x113a2f(0x119)]??_0x1cc6b6[_0x113a2f(0x119)]??null,'db':_0x311ab2[_0x113a2f(0x123)]??_0x311ab2[_0x113a2f(0x114)]??null};}function mergePatchValue(_0x26b198,_0xce283f){if(isPlainObject(_0x26b198)&&isPlainObject(_0xce283f))return deepMerge(_0x26b198,_0xce283f);return deepClone(_0xce283f);}function deepMerge(_0x17ed35,_0x45906c){const _0x5b0007=a62_0xcf12c8,_0x5f2e47=deepClone(_0x17ed35);for(const [_0x4cc0a4,_0x4f76fe]of Object[_0x5b0007(0x139)](_0x45906c)){_0x5f2e47[_0x4cc0a4]=isPlainObject(_0x5f2e47[_0x4cc0a4])&&isPlainObject(_0x4f76fe)?deepMerge(_0x5f2e47[_0x4cc0a4],_0x4f76fe):deepClone(_0x4f76fe);}return _0x5f2e47;}function collectChangedPaths(_0x528495,_0x203ca,_0x1f4718,_0x13822f){const _0x45c142=a62_0xcf12c8;if(!isPlainObject(_0x203ca)||!isPlainObject(_0x1f4718))return;const _0xb6e30b=new Set([...Object[_0x45c142(0x116)](_0x203ca),...Object[_0x45c142(0x116)](_0x1f4718)]);for(const _0x1fcf16 of _0xb6e30b){const _0x3719b7=_0x203ca[_0x1fcf16],_0x58f534=_0x1f4718[_0x1fcf16];!deepEqual(_0x3719b7,_0x58f534)&&_0x13822f[_0x45c142(0x131)](_0x528495+'.'+_0x1fcf16);}}function deepClone(_0x35a9d0){const _0xc49649=a62_0xcf12c8;if(_0x35a9d0===undefined)return _0x35a9d0;return JSON[_0xc49649(0x10d)](JSON[_0xc49649(0x12e)](_0x35a9d0));}function deepEqual(_0x1abe9d,_0x51c72e){const _0x3416a7=a62_0xcf12c8;return JSON[_0x3416a7(0x12e)](_0x1abe9d)===JSON['stringify'](_0x51c72e);}function isPlainObject(_0x60c47a){const _0x1bec59=a62_0xcf12c8;return Boolean(_0x60c47a)&&typeof _0x60c47a===_0x1bec59(0x11a)&&!Array['isArray'](_0x60c47a);}function emptyToUndefined(_0x839d52){const _0x2b0988=a62_0xcf12c8,_0x4ffc18=String(_0x839d52||'')[_0x2b0988(0x145)]();return _0x4ffc18||undefined;}function a62_0x557a(){const _0x2c0918=['length','datasetName','6420MzCkwm','--field\x20is\x20required','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','data','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','/smartapi/dataset/update-driven-data','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','deprecated','name','trim','1705OZYqfA',',\x20actual\x20','options','107035shGNfg','validation','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','dbType','POST','Forbidden\x20patch\x20key:\x20','from','size','28Vzqpca','field','displayName','string','description','patch-json','findIndex','systemRetain','str','695701HIgqjj','appCode','dbTypeLen','Expectation\x20mismatch\x20at\x20','patch','parse','Updated\x20dataset\x20field\x20','951128VhHovx','pkField','\x20must\x20be\x20a\x20JSON\x20object','defaultAggregation','expect-json','dbId','2EqsnvY','keys','dataset','properties','tableName','object','required','datasetCode','deleted','has','datasetId','\x20must\x20be\x20valid\x20JSON\x20object:\x20','field-update','autoIncrement','dbName','No\x20changes\x20for\x20dataset\x20field\x20','dbFieldName','Unsupported\x20patch\x20key:\x20','modelCode','datetimeFormat','chartRole','sort','message','fields','1357068SXHDKY','stringify','Field\x20not\x20found:\x20','208BSAVRP','add','dbtableConfig','join','1987224mrvIKV','4524615LFRaoH','Expected\x20','expect','code','entries'];a62_0x557a=function(){return _0x2c0918;};return a62_0x557a();}function trim(_0x194d27){const _0x906910=a62_0xcf12c8;return String(_0x194d27||'')[_0x906910(0x145)]();}