@lovrabet/rabetbase-cli 2.3.10 → 2.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -0
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x4388d3,_0x3c4a4f){const _0x5bbba9=a52_0x2891,_0x485eb7=_0x4388d3();while(!![]){try{const _0x19b643=parseInt(_0x5bbba9(0x76))/0x1*(parseInt(_0x5bbba9(0x6c))/0x2)+parseInt(_0x5bbba9(0x73))/0x3*(-parseInt(_0x5bbba9(0x78))/0x4)+parseInt(_0x5bbba9(0x77))/0x5*(-parseInt(_0x5bbba9(0x74))/0x6)+parseInt(_0x5bbba9(0x71))/0x7*(parseInt(_0x5bbba9(0x72))/0x8)+-parseInt(_0x5bbba9(0x6d))/0x9+-parseInt(_0x5bbba9(0x70))/0xa*(-parseInt(_0x5bbba9(0x75))/0xb)+-parseInt(_0x5bbba9(0x6f))/0xc*(-parseInt(_0x5bbba9(0x6e))/0xd);if(_0x19b643===_0x3c4a4f)break;else _0x485eb7['push'](_0x485eb7['shift']());}catch(_0xae0d17){_0x485eb7['push'](_0x485eb7['shift']());}}}(a52_0x1221,0xa1f7f));function a52_0x1221(){const _0x206ae9=['1149dpsRud','23154tZSHlI','480722oxdxHy','1YPsEWx','645HAGJhf','11548GitEpT','1927004XbytLy','6428079QJcrRt','17329YzJEOY','3732FbSYmL','190wHepIa','3017pfZjLU','14344zvFCQX'];a52_0x1221=function(){return _0x206ae9;};return a52_0x1221();}function a52_0x2891(_0x1d9d44,_0x5482f5){_0x1d9d44=_0x1d9d44-0x6c;const _0x122193=a52_0x1221();let _0x2891f4=_0x122193[_0x1d9d44];return _0x2891f4;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ function a52_0x1cb1(){const _0x1dff36=['77UJVhzr','1931955qikjDX','1087836dgZASW','1310868BQQnNw','194344SUYupZ','143291tSXueI','4uARlwl','7664931pNpcyr','459198jsYBaB'];a52_0x1cb1=function(){return _0x1dff36;};return a52_0x1cb1();}(function(_0x5c3f5b,_0x54d7af){const _0x45d825=a52_0x2463,_0x512054=_0x5c3f5b();while(!![]){try{const _0x3a655d=-parseInt(_0x45d825(0xdf))/0x1*(parseInt(_0x45d825(0xe0))/0x2)+-parseInt(_0x45d825(0xd9))/0x3+parseInt(_0x45d825(0xdc))/0x4+-parseInt(_0x45d825(0xdb))/0x5+parseInt(_0x45d825(0xdd))/0x6+-parseInt(_0x45d825(0xda))/0x7*(parseInt(_0x45d825(0xde))/0x8)+parseInt(_0x45d825(0xe1))/0x9;if(_0x3a655d===_0x54d7af)break;else _0x512054['push'](_0x512054['shift']());}catch(_0x1b9cdf){_0x512054['push'](_0x512054['shift']());}}}(a52_0x1cb1,0x3cc02));function a52_0x2463(_0xecaa50,_0x446cde){_0xecaa50=_0xecaa50-0xd9;const _0x1cb1bc=a52_0x1cb1();let _0x24631d=_0x1cb1bc[_0xecaa50];return _0x24631d;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- const a53_0x31b06f=a53_0x44a4;(function(_0x471ff6,_0x31789c){const _0x5a71ed=a53_0x44a4,_0x49b968=_0x471ff6();while(!![]){try{const _0x42ee72=parseInt(_0x5a71ed(0xcb))/0x1+-parseInt(_0x5a71ed(0xd0))/0x2+-parseInt(_0x5a71ed(0xca))/0x3*(parseInt(_0x5a71ed(0xd5))/0x4)+-parseInt(_0x5a71ed(0xc9))/0x5+-parseInt(_0x5a71ed(0xc7))/0x6+-parseInt(_0x5a71ed(0xd3))/0x7*(parseInt(_0x5a71ed(0xcf))/0x8)+parseInt(_0x5a71ed(0xc8))/0x9;if(_0x42ee72===_0x31789c)break;else _0x49b968['push'](_0x49b968['shift']());}catch(_0x145add){_0x49b968['push'](_0x49b968['shift']());}}}(a53_0x25e4,0x536b0));function a53_0x44a4(_0x483af2,_0x23efda){_0x483af2=_0x483af2-0xc7;const _0x25e413=a53_0x25e4();let _0x44a4c9=_0x25e413[_0x483af2];return _0x44a4c9;}function a53_0x25e4(){const _0x2974ce=['List\x20all\x20config\x20values','164SkJWjO','config','553170otSpPp','13287582prvFfi','962405XdePLX','44931ThCekK','528179cnbCcE','global','bool','boolean','26984fAqgdB','799760sZEnBy','list','read','756DMiFKF'];a53_0x25e4=function(){return _0x2974ce;};return a53_0x25e4();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2f3d56){const _0x46489e=a53_0x44a4,_0x589745=_0x2f3d56[_0x46489e(0xcd)]('global')?readScopedConfig(_0x46489e(0xcc)):readConfig();return{'ok':!![],'data':_0x589745};}export const configListDefinition={'service':a53_0x31b06f(0xd6),'command':a53_0x31b06f(0xd1),'description':a53_0x31b06f(0xd4),'risk':a53_0x31b06f(0xd2),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x31b06f(0xcc),'type':a53_0x31b06f(0xce),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a53_0xa480a7=a53_0x58bc;(function(_0x22899d,_0x47ed8d){const _0x48e562=a53_0x58bc,_0x350dbd=_0x22899d();while(!![]){try{const _0x21b8d6=parseInt(_0x48e562(0xf3))/0x1+-parseInt(_0x48e562(0xec))/0x2*(-parseInt(_0x48e562(0xef))/0x3)+parseInt(_0x48e562(0xf6))/0x4*(-parseInt(_0x48e562(0xf8))/0x5)+parseInt(_0x48e562(0xea))/0x6+parseInt(_0x48e562(0xf5))/0x7+-parseInt(_0x48e562(0xed))/0x8+parseInt(_0x48e562(0xee))/0x9*(-parseInt(_0x48e562(0xf9))/0xa);if(_0x21b8d6===_0x47ed8d)break;else _0x350dbd['push'](_0x350dbd['shift']());}catch(_0x20f8cd){_0x350dbd['push'](_0x350dbd['shift']());}}}(a53_0x48c2,0xf3224));function a53_0x58bc(_0x214c37,_0x26ba33){_0x214c37=_0x214c37-0xea;const _0x48c201=a53_0x48c2();let _0x58bc5e=_0x48c201[_0x214c37];return _0x58bc5e;}import{readScopedConfig}from'../../commands/config/shared.js';function a53_0x48c2(){const _0x148658=['37938lfmQOu','8939400QFJcLg','18601290gOfLBB','207YnQdbL','bool','config','read','1265529RpXvKl','global','7859439mnPfgo','82728MWmXFj','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','70esIyUb','10VVStRd','4634952zUwyuJ','List\x20all\x20config\x20values'];a53_0x48c2=function(){return _0x148658;};return a53_0x48c2();}import{readConfig}from'../../utils/config.js';async function execute(_0x35dc1f){const _0x3d1492=a53_0x58bc,_0x17a52d=_0x35dc1f[_0x3d1492(0xf0)](_0x3d1492(0xf4))?readScopedConfig(_0x3d1492(0xf4)):readConfig();return{'ok':!![],'data':_0x17a52d};}export const configListDefinition={'service':a53_0xa480a7(0xf1),'command':'list','description':a53_0xa480a7(0xeb),'risk':a53_0xa480a7(0xf2),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0xa480a7(0xf4),'type':'boolean','description':a53_0xa480a7(0xf7),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a54_0x1ef97a=a54_0x5905;(function(_0x5d518d,_0x546579){const _0xe03c4=a54_0x5905,_0x44e711=_0x5d518d();while(!![]){try{const _0x4d8f87=-parseInt(_0xe03c4(0x1e5))/0x1+parseInt(_0xe03c4(0x1ec))/0x2*(-parseInt(_0xe03c4(0x1ca))/0x3)+-parseInt(_0xe03c4(0x1db))/0x4*(parseInt(_0xe03c4(0x1ce))/0x5)+-parseInt(_0xe03c4(0x1e4))/0x6+-parseInt(_0xe03c4(0x1e6))/0x7*(parseInt(_0xe03c4(0x1d7))/0x8)+-parseInt(_0xe03c4(0x1cd))/0x9*(parseInt(_0xe03c4(0x1c8))/0xa)+parseInt(_0xe03c4(0x1e0))/0xb*(parseInt(_0xe03c4(0x1dc))/0xc);if(_0x4d8f87===_0x546579)break;else _0x44e711['push'](_0x44e711['shift']());}catch(_0x28df80){_0x44e711['push'](_0x44e711['shift']());}}}(a54_0x5daa,0xd2087));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a54_0x5daa(){const _0x91d100=['\x22\x20is\x20not\x20settable.','Settable\x20top-level\x20keys:\x20','str','8425440goQOWe','359312vRhjrq','4174233fKzlsD','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','locale','keys','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Config\x20value','9374syOEIM','Set\x20a\x20config\x20value','Invalid\x20locale\x20value.','string','apps','boolean','object','length','Global','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','bool','Invalid\x20value\x20for\x20\x22','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','value','global','10DdfVfi','Missing\x20key.','801QUBtvk','join','key','5901939BTcXyq','5CLUXoe','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','includes','\x20app\x20add\x20<name>\x20--appcode\x20','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','set','env','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Usage:\x20','16PoxwDB','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','validation','appcode','480772iirrHO','9852PUzJmL','\x20set\x20to:\x20','write','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','78298Sdrzws'];a54_0x5daa=function(){return _0x91d100;};return a54_0x5daa();}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(_0x3c37c7){const _0x4f05c2=a54_0x5905,_0x267db8=_0x3c37c7[_0x4f05c2(0x1e3)](_0x4f05c2(0x1cc)),_0x75e1c=_0x3c37c7[_0x4f05c2(0x1e3)](_0x4f05c2(0x1c6));if(!_0x267db8)throw CliErrors['validation'](_0x4f05c2(0x1c9),_0x4f05c2(0x1d6)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x75e1c===undefined||_0x75e1c==='')throw CliErrors['validation']('Missing\x20value.','Usage:\x20'+CLI_BIN_NAME+_0x4f05c2(0x1cf));if(_0x75e1c[_0x4f05c2(0x1c0)]>0x1f4)throw CliErrors[_0x4f05c2(0x1d9)](_0x4f05c2(0x1c2));if(!isTopLevelConfigKey(_0x267db8))throw CliErrors[_0x4f05c2(0x1d9)]('Top-level\x20key\x20\x22'+_0x267db8+_0x4f05c2(0x1e1),_0x4f05c2(0x1e2)+getTopLevelConfigKeySummary());if(_0x267db8==='riskLevel')throw CliErrors[_0x4f05c2(0x1d9)](_0x4f05c2(0x1c5));if(CONFIG_ENUM_VALUES[_0x267db8]&&!CONFIG_ENUM_VALUES[_0x267db8][_0x4f05c2(0x1d0)](_0x75e1c))throw CliErrors[_0x4f05c2(0x1d9)](_0x4f05c2(0x1c4)+_0x267db8+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x267db8][_0x4f05c2(0x1cb)](',\x20'));if(_0x267db8===_0x4f05c2(0x1e8)&&!normalizeLocale(_0x75e1c))throw CliErrors[_0x4f05c2(0x1d9)](_0x4f05c2(0x1bb),_0x4f05c2(0x1df));const _0x3a0079={'global':_0x3c37c7[_0x4f05c2(0x1c3)](_0x4f05c2(0x1c7))},_0x3fe496=resolveWriteScope(_0x3a0079),_0x475116=readScopedConfig(_0x3fe496);let _0x194f02=_0x267db8,_0x3c9cab=_0x75e1c;_0x267db8==='app'&&(_0x194f02=_0x4f05c2(0x1da),delete _0x475116['app']);_0x267db8===_0x4f05c2(0x1e8)&&(_0x3c9cab=normalizeLocale(_0x75e1c));if(_0x267db8==='env'){_0x3c9cab=normalizeEnv(_0x75e1c);if(!isProduction(_0x3c9cab)&&!isDaily(_0x3c9cab))throw CliErrors[_0x4f05c2(0x1d9)](_0x4f05c2(0x1d2),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x267db8===_0x4f05c2(0x1da)){const _0x39c095=_0x475116[_0x4f05c2(0x1bd)]&&typeof _0x475116[_0x4f05c2(0x1bd)]===_0x4f05c2(0x1bf)?Object[_0x4f05c2(0x1e9)](_0x475116[_0x4f05c2(0x1bd)]):[];if(_0x39c095['length']>0x0)throw CliErrors[_0x4f05c2(0x1d9)](_0x4f05c2(0x1d8),'Use\x20`'+CLI_BIN_NAME+_0x4f05c2(0x1d1)+_0x3c9cab+'`,\x20`'+CLI_BIN_NAME+_0x4f05c2(0x1e7));const _0x35ac2b=buildCanonicalProjectConfig({..._0x475116},{'appCodes':[_0x3c9cab],'env':typeof _0x475116[_0x4f05c2(0x1d4)]===_0x4f05c2(0x1bc)?_0x475116[_0x4f05c2(0x1d4)]:undefined});writeScopedConfig(_0x35ac2b,_0x3fe496);const _0x406b1a=_0x3fe496===_0x4f05c2(0x1c7)?_0x4f05c2(0x1c1):'Project';return{'ok':!![],'message':'✓\x20'+_0x406b1a+'\x20appcode\x20set\x20to:\x20'+_0x3c9cab+_0x4f05c2(0x1ea)};}_0x475116[_0x194f02]=_0x3c9cab,writeScopedConfig(_0x475116,_0x3fe496);const _0x2eee43=_0x3fe496===_0x4f05c2(0x1c7)?_0x4f05c2(0x1c1):'Project';return{'ok':!![],'message':'✓\x20'+_0x2eee43+'\x20'+_0x194f02+_0x4f05c2(0x1dd)+_0x3c9cab};}function a54_0x5905(_0x2ab5a4,_0x5e42b0){_0x2ab5a4=_0x2ab5a4-0x1ba;const _0x5daa98=a54_0x5daa();let _0x5905d2=_0x5daa98[_0x2ab5a4];return _0x5905d2;}export const configSetDefinition={'service':'config','command':a54_0x1ef97a(0x1d3),'description':a54_0x1ef97a(0x1ba),'risk':a54_0x1ef97a(0x1de),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x1ef97a(0x1cc),'type':a54_0x1ef97a(0x1bc),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a54_0x1ef97a(0x1c6),'type':a54_0x1ef97a(0x1bc),'description':a54_0x1ef97a(0x1eb),'required':!![]},{'name':'global','type':a54_0x1ef97a(0x1be),'description':a54_0x1ef97a(0x1d5),'default':![]}],'execute':execute};
1
+ function a54_0x4da9(_0x21ae4c,_0x525121){_0x21ae4c=_0x21ae4c-0xa1;const _0x3119d7=a54_0x3119();let _0x4da99e=_0x3119d7[_0x21ae4c];return _0x4da99e;}const a54_0x51c154=a54_0x4da9;(function(_0x233f39,_0xb9a769){const _0x1a5390=a54_0x4da9,_0x4b1ed6=_0x233f39();while(!![]){try{const _0x2d961d=-parseInt(_0x1a5390(0xb1))/0x1+parseInt(_0x1a5390(0xc8))/0x2+-parseInt(_0x1a5390(0xce))/0x3+parseInt(_0x1a5390(0xbe))/0x4+-parseInt(_0x1a5390(0xcd))/0x5+parseInt(_0x1a5390(0xa8))/0x6+parseInt(_0x1a5390(0xae))/0x7;if(_0x2d961d===_0xb9a769)break;else _0x4b1ed6['push'](_0x4b1ed6['shift']());}catch(_0x137d89){_0x4b1ed6['push'](_0x4b1ed6['shift']());}}}(a54_0x3119,0xeb260));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a54_0x3119(){const _0x1b5143=['Set\x20a\x20config\x20value','config','4816836vXavAC','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Invalid\x20locale\x20value.','validation','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','string','5695431xIXPSk','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Invalid\x20value\x20for\x20\x22','1391085UYyKIz','\x20app\x20add\x20<name>\x20--appcode\x20','Config\x20value','set','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','locale','includes','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','apps','Top-level\x20key\x20\x22','Project','env','Global','7609664QFarfW','value','bool','Use\x20`','Missing\x20key.','\x22.\x20Allowed:\x20','`,\x20`','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','join','object','680812vRqhXY','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','\x20set\x20to:\x20','str','global','3693705jkSWVB','2298801hGzUnO','appcode','Usage:\x20','Settable\x20top-level\x20keys:\x20','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','\x22\x20is\x20not\x20settable.','key','app'];a54_0x3119=function(){return _0x1b5143;};return a54_0x3119();}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(_0x1a5842){const _0x39816f=a54_0x4da9,_0xa80379=_0x1a5842[_0x39816f(0xcb)](_0x39816f(0xa4)),_0x2b4c44=_0x1a5842[_0x39816f(0xcb)](_0x39816f(0xbf));if(!_0xa80379)throw CliErrors[_0x39816f(0xab)](_0x39816f(0xc2),_0x39816f(0xd0)+CLI_BIN_NAME+_0x39816f(0xa9));if(_0x2b4c44===undefined||_0x2b4c44==='')throw CliErrors[_0x39816f(0xab)]('Missing\x20value.',_0x39816f(0xd0)+CLI_BIN_NAME+_0x39816f(0xa9));if(_0x2b4c44['length']>0x1f4)throw CliErrors[_0x39816f(0xab)](_0x39816f(0xb5));if(!isTopLevelConfigKey(_0xa80379))throw CliErrors[_0x39816f(0xab)](_0x39816f(0xba)+_0xa80379+_0x39816f(0xa3),_0x39816f(0xa1)+getTopLevelConfigKeySummary());if(_0xa80379==='riskLevel')throw CliErrors[_0x39816f(0xab)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0xa80379]&&!CONFIG_ENUM_VALUES[_0xa80379][_0x39816f(0xb7)](_0x2b4c44))throw CliErrors[_0x39816f(0xab)](_0x39816f(0xb0)+_0xa80379+_0x39816f(0xc3)+CONFIG_ENUM_VALUES[_0xa80379][_0x39816f(0xc6)](',\x20'));if(_0xa80379===_0x39816f(0xb6)&&!normalizeLocale(_0x2b4c44))throw CliErrors['validation'](_0x39816f(0xaa),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x28df95={'global':_0x1a5842[_0x39816f(0xc0)]('global')},_0x3d8f34=resolveWriteScope(_0x28df95),_0x2f8e22=readScopedConfig(_0x3d8f34);let _0x251834=_0xa80379,_0x5e5224=_0x2b4c44;_0xa80379==='app'&&(_0x251834=_0x39816f(0xcf),delete _0x2f8e22[_0x39816f(0xa5)]);_0xa80379===_0x39816f(0xb6)&&(_0x5e5224=normalizeLocale(_0x2b4c44));if(_0xa80379===_0x39816f(0xbc)){_0x5e5224=normalizeEnv(_0x2b4c44);if(!isProduction(_0x5e5224)&&!isDaily(_0x5e5224))throw CliErrors[_0x39816f(0xab)](_0x39816f(0xaf),_0x39816f(0xb8));}if(_0xa80379==='appcode'){const _0x5cb71e=_0x2f8e22['apps']&&typeof _0x2f8e22[_0x39816f(0xb9)]===_0x39816f(0xc7)?Object['keys'](_0x2f8e22['apps']):[];if(_0x5cb71e['length']>0x0)throw CliErrors[_0x39816f(0xab)](_0x39816f(0xc9),_0x39816f(0xc1)+CLI_BIN_NAME+_0x39816f(0xb2)+_0x5e5224+_0x39816f(0xc4)+CLI_BIN_NAME+_0x39816f(0xac));const _0x39efec=buildCanonicalProjectConfig({..._0x2f8e22},{'appCodes':[_0x5e5224],'env':typeof _0x2f8e22['env']==='string'?_0x2f8e22[_0x39816f(0xbc)]:undefined});writeScopedConfig(_0x39efec,_0x3d8f34);const _0x537d1b=_0x3d8f34===_0x39816f(0xcc)?_0x39816f(0xbd):_0x39816f(0xbb);return{'ok':!![],'message':'✓\x20'+_0x537d1b+'\x20appcode\x20set\x20to:\x20'+_0x5e5224+_0x39816f(0xa2)};}_0x2f8e22[_0x251834]=_0x5e5224,writeScopedConfig(_0x2f8e22,_0x3d8f34);const _0x30aea1=_0x3d8f34===_0x39816f(0xcc)?_0x39816f(0xbd):_0x39816f(0xbb);return{'ok':!![],'message':'✓\x20'+_0x30aea1+'\x20'+_0x251834+_0x39816f(0xca)+_0x5e5224};}export const configSetDefinition={'service':a54_0x51c154(0xa7),'command':a54_0x51c154(0xb4),'description':a54_0x51c154(0xa6),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x51c154(0xa4),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a54_0x51c154(0xbf),'type':a54_0x51c154(0xad),'description':a54_0x51c154(0xb3),'required':!![]},{'name':a54_0x51c154(0xcc),'type':'boolean','description':a54_0x51c154(0xc5),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x4526d5,_0x518e1a){var _0x54ccb6=a55_0x20f1,_0x4868cf=_0x4526d5();while(!![]){try{var _0x1b6a7e=-parseInt(_0x54ccb6(0x1a4))/0x1*(-parseInt(_0x54ccb6(0x1af))/0x2)+parseInt(_0x54ccb6(0x1b2))/0x3+parseInt(_0x54ccb6(0x1a7))/0x4*(-parseInt(_0x54ccb6(0x1ac))/0x5)+-parseInt(_0x54ccb6(0x1a3))/0x6*(-parseInt(_0x54ccb6(0x1a6))/0x7)+-parseInt(_0x54ccb6(0x1ae))/0x8*(-parseInt(_0x54ccb6(0x1a8))/0x9)+parseInt(_0x54ccb6(0x1ab))/0xa+-parseInt(_0x54ccb6(0x1aa))/0xb*(parseInt(_0x54ccb6(0x1a5))/0xc);if(_0x1b6a7e===_0x518e1a)break;else _0x4868cf['push'](_0x4868cf['shift']());}catch(_0x3d50af){_0x4868cf['push'](_0x4868cf['shift']());}}}(a55_0x37f1,0xd2483));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};function a55_0x20f1(_0x5be784,_0x530180){_0x5be784=_0x5be784-0x1a3;var _0x37f134=a55_0x37f1();var _0x20f126=_0x37f134[_0x5be784];return _0x20f126;}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x598129){var _0x15d7ca=a55_0x20f1;if(_0x598129['global'])return'global';if(!isInProject())throw CliErrors['validation'](_0x15d7ca(0x1ad),_0x15d7ca(0x1a9)+CLI_BIN_NAME+_0x15d7ca(0x1b1));return _0x15d7ca(0x1b0);}export function readScopedConfig(_0x216789){return readConfigFile(resolveWriteConfigPath(_0x216789));}export function writeScopedConfig(_0x4659bf,_0x1db149){writeConfigFile(resolveWriteConfigPath(_0x1db149),_0x4659bf);}function a55_0x37f1(){var _0x2935cf=['15hlFPEj','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','8XdtwGs','2DjaxRK','project','\x20init`\x20first.','2205696mGBntd','7123938bzcNZs','181283mKfOZd','14148bZsEyU','7nCpcHZ','1339628jLmLec','4451823HCblHO','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','14069PSttze','7754920MJHnNg'];a55_0x37f1=function(){return _0x2935cf;};return a55_0x37f1();}
1
+ (function(_0x9891c7,_0x11aec2){var _0x5075e1=a55_0x5d7e,_0x1a97b8=_0x9891c7();while(!![]){try{var _0x19553d=parseInt(_0x5075e1(0x1b4))/0x1*(parseInt(_0x5075e1(0x1b3))/0x2)+-parseInt(_0x5075e1(0x1b5))/0x3+parseInt(_0x5075e1(0x1ba))/0x4+-parseInt(_0x5075e1(0x1b9))/0x5+parseInt(_0x5075e1(0x1b6))/0x6*(parseInt(_0x5075e1(0x1bc))/0x7)+-parseInt(_0x5075e1(0x1b0))/0x8*(-parseInt(_0x5075e1(0x1ad))/0x9)+parseInt(_0x5075e1(0x1ae))/0xa*(-parseInt(_0x5075e1(0x1bb))/0xb);if(_0x19553d===_0x11aec2)break;else _0x1a97b8['push'](_0x1a97b8['shift']());}catch(_0x223533){_0x1a97b8['push'](_0x1a97b8['shift']());}}}(a55_0xa0de,0x2d5de));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};function a55_0xa0de(){var _0x571362=['Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','\x20init`\x20first.','162704KkXEJC','3NOticr','165759wPuPgP','6jlKJFM','global','validation','1119965VYUSNo','443120vAQOOM','11pZVRwi','1407063mRwcZH','54hniCqu','2960190vbHUdk','project','273656vHwpKR'];a55_0xa0de=function(){return _0x571362;};return a55_0xa0de();}function a55_0x5d7e(_0x59e6ee,_0x5bbd25){_0x59e6ee=_0x59e6ee-0x1ad;var _0xa0deb=a55_0xa0de();var _0x5d7e6a=_0xa0deb[_0x59e6ee];return _0x5d7e6a;}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x1a8d5a){var _0x53fc2b=a55_0x5d7e;if(_0x1a8d5a[_0x53fc2b(0x1b7)])return _0x53fc2b(0x1b7);if(!isInProject())throw CliErrors[_0x53fc2b(0x1b8)](_0x53fc2b(0x1b1),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x53fc2b(0x1b2));return _0x53fc2b(0x1af);}export function readScopedConfig(_0x128af8){return readConfigFile(resolveWriteConfigPath(_0x128af8));}export function writeScopedConfig(_0x47e673,_0x2e4909){writeConfigFile(resolveWriteConfigPath(_0x2e4909),_0x47e673);}
@@ -1 +1 @@
1
- const a56_0x45a1fa=a56_0x106e;function a56_0x3959(){const _0x3a287b=['10FrMBMH','\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]','6586914sLsBif','8nUyeJq','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','7861133otWxXT','Filter\x20dataset\x20records\x20with\x20query\x20conditions','filter','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','10228869zMrwyf','2267330qNuDAd','join','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','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','105813DbYdSR','\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}]','2WXxrfA','3067648EOmnGs','2779305kfUGvl'];a56_0x3959=function(){return _0x3a287b;};return a56_0x3959();}(function(_0x3a73e7,_0x28dcba){const _0x47808a=a56_0x106e,_0x12a4c8=_0x3a73e7();while(!![]){try{const _0x53e07b=parseInt(_0x47808a(0x150))/0x1*(parseInt(_0x47808a(0x152))/0x2)+-parseInt(_0x47808a(0x154))/0x3+parseInt(_0x47808a(0x153))/0x4+-parseInt(_0x47808a(0x15f))/0x5+parseInt(_0x47808a(0x157))/0x6+parseInt(_0x47808a(0x15a))/0x7*(-parseInt(_0x47808a(0x158))/0x8)+-parseInt(_0x47808a(0x15e))/0x9*(-parseInt(_0x47808a(0x155))/0xa);if(_0x53e07b===_0x28dcba)break;else _0x12a4c8['push'](_0x12a4c8['shift']());}catch(_0x41baf6){_0x12a4c8['push'](_0x12a4c8['shift']());}}}(a56_0x3959,0x93805));function a56_0x106e(_0x104eb1,_0xd2c88f){_0x104eb1=_0x104eb1-0x14e;const _0x39590a=a56_0x3959();let _0x106eee=_0x39590a[_0x104eb1];return _0x106eee;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':'filter','operation':a56_0x45a1fa(0x15c),'description':a56_0x45a1fa(0x15b),'paramsRequired':![],'paramsHint':a56_0x45a1fa(0x14f),'helpExtra':[a56_0x45a1fa(0x159),a56_0x45a1fa(0x14e),a56_0x45a1fa(0x156),a56_0x45a1fa(0x151),a56_0x45a1fa(0x15d),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a56_0x45a1fa(0x160)]('\x0a')});
1
+ const a56_0x5b5faf=a56_0x392b;(function(_0x7b80a8,_0x158d73){const _0x3abcf7=a56_0x392b,_0x4c45be=_0x7b80a8();while(!![]){try{const _0x143831=-parseInt(_0x3abcf7(0x93))/0x1*(-parseInt(_0x3abcf7(0x92))/0x2)+-parseInt(_0x3abcf7(0x9b))/0x3+-parseInt(_0x3abcf7(0x8c))/0x4*(-parseInt(_0x3abcf7(0x8e))/0x5)+parseInt(_0x3abcf7(0x97))/0x6*(parseInt(_0x3abcf7(0x90))/0x7)+parseInt(_0x3abcf7(0x9c))/0x8+-parseInt(_0x3abcf7(0x8f))/0x9*(-parseInt(_0x3abcf7(0x8d))/0xa)+-parseInt(_0x3abcf7(0x99))/0xb;if(_0x143831===_0x158d73)break;else _0x4c45be['push'](_0x4c45be['shift']());}catch(_0x313c60){_0x4c45be['push'](_0x4c45be['shift']());}}}(a56_0x3128,0x39e81));import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x3128(){const _0x308f26=['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','562QElSlq','1286QycVyN','filter','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','54FTXmhL','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','13492908xFjTPn','join','76350UiKabi','124872rGYGBk','\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}]','1325432oJUDoX','510woUylY','5GUAGjS','76491mLkYDp','270263IDnwsh'];a56_0x3128=function(){return _0x308f26;};return a56_0x3128();}function a56_0x392b(_0x18d7e5,_0x4e9803){_0x18d7e5=_0x18d7e5-0x8c;const _0x3128aa=a56_0x3128();let _0x392b04=_0x3128aa[_0x18d7e5];return _0x392b04;}export const dataFilter=buildDataCommand({'command':'filter','operation':a56_0x5b5faf(0x94),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a56_0x5b5faf(0x95),'helpExtra':[a56_0x5b5faf(0x91),a56_0x5b5faf(0x98),a56_0x5b5faf(0x96),a56_0x5b5faf(0x9d),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a56_0x5b5faf(0x9a)]('\x0a')});
@@ -1 +1 @@
1
- const a57_0x37629b=a57_0xad0b;(function(_0x262e01,_0x4f3e05){const _0x5dcfeb=a57_0xad0b,_0x5549b9=_0x262e01();while(!![]){try{const _0x4ccb7e=parseInt(_0x5dcfeb(0x1e6))/0x1*(parseInt(_0x5dcfeb(0x1dd))/0x2)+parseInt(_0x5dcfeb(0x1e7))/0x3+parseInt(_0x5dcfeb(0x1e4))/0x4*(parseInt(_0x5dcfeb(0x1e3))/0x5)+-parseInt(_0x5dcfeb(0x1de))/0x6+parseInt(_0x5dcfeb(0x1e1))/0x7*(-parseInt(_0x5dcfeb(0x1e2))/0x8)+-parseInt(_0x5dcfeb(0x1e5))/0x9+parseInt(_0x5dcfeb(0x1e0))/0xa;if(_0x4ccb7e===_0x4f3e05)break;else _0x5549b9['push'](_0x5549b9['shift']());}catch(_0x6aae37){_0x5549b9['push'](_0x5549b9['shift']());}}}(a57_0x1c91,0xd3de2));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a57_0x37629b(0x1df),'operation':'getOne','description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'});function a57_0xad0b(_0x4f04a7,_0x42d152){_0x4f04a7=_0x4f04a7-0x1dd;const _0x1c9141=a57_0x1c91();let _0xad0b42=_0x1c9141[_0x4f04a7];return _0xad0b42;}function a57_0x1c91(){const _0x602781=['44wIIlHs','465864YdIQza','getOne','14969220sJpkaK','56hqwZRd','791216JobkZI','520265wrHHZR','16gNDwWe','9162810vdgRzT','29550obFDIv','574578ZqsdqP'];a57_0x1c91=function(){return _0x602781;};return a57_0x1c91();}
1
+ const a57_0x400313=a57_0x53b0;(function(_0x114f8f,_0x477bc5){const _0x38d7d4=a57_0x53b0,_0x2d53cd=_0x114f8f();while(!![]){try{const _0x1af68a=parseInt(_0x38d7d4(0x155))/0x1+parseInt(_0x38d7d4(0x14e))/0x2*(parseInt(_0x38d7d4(0x14c))/0x3)+-parseInt(_0x38d7d4(0x156))/0x4*(parseInt(_0x38d7d4(0x152))/0x5)+-parseInt(_0x38d7d4(0x157))/0x6+parseInt(_0x38d7d4(0x150))/0x7*(parseInt(_0x38d7d4(0x153))/0x8)+parseInt(_0x38d7d4(0x14b))/0x9+-parseInt(_0x38d7d4(0x151))/0xa*(parseInt(_0x38d7d4(0x154))/0xb);if(_0x1af68a===_0x477bc5)break;else _0x2d53cd['push'](_0x2d53cd['shift']());}catch(_0x24cd83){_0x2d53cd['push'](_0x2d53cd['shift']());}}}(a57_0x17ef,0xed59f));import{buildDataCommand}from'../../commands/data/shared.js';function a57_0x17ef(){const _0x1227b1=['271852efmpdb','883790qLQuLO','205qHRmko','96OQMnfF','55FXxtsb','747049BZjBSL','129028hFYizc','2549226PzDPsc','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','11892924pQKjSH','110643iTVszT','Get\x20a\x20single\x20record\x20by\x20ID','34GyPYFf','getOne'];a57_0x17ef=function(){return _0x1227b1;};return a57_0x17ef();}function a57_0x53b0(_0x1f69fd,_0x4b9abf){_0x1f69fd=_0x1f69fd-0x14a;const _0x17efef=a57_0x17ef();let _0x53b09f=_0x17efef[_0x1f69fd];return _0x53b09f;}export const dataGetOne=buildDataCommand({'command':'getOne','operation':a57_0x400313(0x14f),'description':a57_0x400313(0x14d),'paramsRequired':!![],'paramsHint':a57_0x400313(0x14a)});
@@ -1 +1 @@
1
- (function(_0x38741f,_0x271bf0){const _0x44c191=a58_0x3c0b,_0x4d449f=_0x38741f();while(!![]){try{const _0xd40432=parseInt(_0x44c191(0x89))/0x1+-parseInt(_0x44c191(0x8e))/0x2*(parseInt(_0x44c191(0x90))/0x3)+-parseInt(_0x44c191(0x8c))/0x4+parseInt(_0x44c191(0x8d))/0x5*(-parseInt(_0x44c191(0x88))/0x6)+-parseInt(_0x44c191(0x8f))/0x7+-parseInt(_0x44c191(0x8a))/0x8+parseInt(_0x44c191(0x8b))/0x9;if(_0xd40432===_0x271bf0)break;else _0x4d449f['push'](_0x4d449f['shift']());}catch(_0x7f339e){_0x4d449f['push'](_0x4d449f['shift']());}}}(a58_0x7237,0x5e6fa));function a58_0x3c0b(_0x29fafd,_0x54e1c0){_0x29fafd=_0x29fafd-0x88;const _0x7237ad=a58_0x7237();let _0x3c0b74=_0x7237ad[_0x29fafd];return _0x3c0b74;}import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];function a58_0x7237(){const _0x314472=['39006nVSQHe','686497FECnaD','18ZzRNbc','197958sIcszE','422075ABFLFQ','2871336IbbAWc','14668272ybbdaW','1988772rASwRZ','90ATXzWH'];a58_0x7237=function(){return _0x314472;};return a58_0x7237();}
1
+ (function(_0x2a45aa,_0xd96128){const _0x54217f=a58_0xa8c3,_0x14e21f=_0x2a45aa();while(!![]){try{const _0x3dbd53=-parseInt(_0x54217f(0x174))/0x1+-parseInt(_0x54217f(0x172))/0x2+-parseInt(_0x54217f(0x16c))/0x3+parseInt(_0x54217f(0x16e))/0x4+-parseInt(_0x54217f(0x16d))/0x5*(-parseInt(_0x54217f(0x170))/0x6)+parseInt(_0x54217f(0x173))/0x7*(parseInt(_0x54217f(0x16f))/0x8)+parseInt(_0x54217f(0x171))/0x9;if(_0x3dbd53===_0xd96128)break;else _0x14e21f['push'](_0x14e21f['shift']());}catch(_0x5cca3d){_0x14e21f['push'](_0x14e21f['shift']());}}}(a58_0x5a84,0x904e3));import{dataFilter}from'../../commands/data/filter.js';function a58_0x5a84(){const _0x4313f9=['2002305RivYTK','34910tcPWvn','1047700ouPJXr','8OfpBhb','18PyJOpK','19756476CfHRIm','2303500soWrGe','2847103bdQpdc','474504PENgfi'];a58_0x5a84=function(){return _0x4313f9;};return a58_0x5a84();}function a58_0xa8c3(_0x15b180,_0x3b19fc){_0x15b180=_0x15b180-0x16c;const _0x5a84fe=a58_0x5a84();let _0xa8c3f4=_0x5a84fe[_0x15b180];return _0xa8c3f4;}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x5f568d,_0x27457e){const _0x26112c=a59_0x588a,_0x175b72=_0x5f568d();while(!![]){try{const _0x216472=parseInt(_0x26112c(0x10c))/0x1*(parseInt(_0x26112c(0x124))/0x2)+parseInt(_0x26112c(0x122))/0x3+-parseInt(_0x26112c(0x113))/0x4*(-parseInt(_0x26112c(0x114))/0x5)+-parseInt(_0x26112c(0x10d))/0x6+parseInt(_0x26112c(0x118))/0x7+-parseInt(_0x26112c(0x115))/0x8+-parseInt(_0x26112c(0x10b))/0x9*(parseInt(_0x26112c(0x11c))/0xa);if(_0x216472===_0x27457e)break;else _0x175b72['push'](_0x175b72['shift']());}catch(_0x16d7c9){_0x175b72['push'](_0x175b72['shift']());}}}(a59_0x28bd,0x8eb03));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0x28bd(){const _0x3fbe7e=['command','code','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','118930pxGKjc','appCode','string','validation','paramsHint','description','3171486YoLkVx','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','417302TTCvUO','str','params','flagMissing','now','441iQFaui','4SmiHCi','3773364eWsJym','operation','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','getOne','paramsRequired','\x20completed\x20in\x20','3211948LOjlDp','5ITCxuY','7847152dzDErz','data','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','575701QQgpKq'];a59_0x28bd=function(){return _0x3fbe7e;};return a59_0x28bd();}import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x4ef0e1){const _0x1a5236=a59_0x588a;if(!_0x4ef0e1)throw CliErrors['flagMissing'](_0x1a5236(0x126),_0x1a5236(0x11b));const _0x82c2f3=_0x4ef0e1['id'];if(_0x82c2f3===undefined||_0x82c2f3===null||_0x82c2f3==='')throw CliErrors[_0x1a5236(0x11f)](_0x1a5236(0x123),_0x1a5236(0x10f));}function a59_0x588a(_0x55a84e,_0x21c26f){_0x55a84e=_0x55a84e-0x10a;const _0x28bd5b=a59_0x28bd();let _0x588af6=_0x28bd5b[_0x55a84e];return _0x588af6;}function parseCommandParams(_0x4d11c6){return parseJsonParams(_0x4d11c6)??{};}export function buildDataCommand(_0x9730c6){const _0xed84e7=a59_0x588a,_0x40c6a7=_0xed84e7(0x117);return{'service':_0xed84e7(0x116),'command':_0x9730c6[_0xed84e7(0x119)],'description':_0x9730c6[_0xed84e7(0x121)],'risk':'read','defaultOutputFormat':'compress','helpExtra':_0x9730c6['helpExtra'],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':_0x40c6a7},{'name':_0xed84e7(0x126),'type':_0xed84e7(0x11e),'description':_0x9730c6[_0xed84e7(0x120)]}],async 'validate'(_0x23494a){const _0x3b5383=_0xed84e7,_0x435e33=_0x23494a[_0x3b5383(0x125)](_0x3b5383(0x126));if(_0x9730c6[_0x3b5383(0x111)]&&!_0x435e33)throw CliErrors[_0x3b5383(0x127)](_0x3b5383(0x126),_0x9730c6[_0x3b5383(0x120)]);const _0x5ebd02=parseJsonParams(_0x435e33);_0x9730c6[_0x3b5383(0x10e)]===_0x3b5383(0x110)&&assertGetOneId(_0x5ebd02);},async 'execute'(_0x11dc17){const _0x2e5180=_0xed84e7,_0x452bb5=parseCommandParams(_0x11dc17[_0x2e5180(0x125)](_0x2e5180(0x126))),_0x4e7f92=Date[_0x2e5180(0x10a)](),_0x4a8333=await executeDatasetDataOperation(_0x11dc17[_0x2e5180(0x11d)],_0x11dc17['str'](_0x2e5180(0x11a)),_0x9730c6[_0x2e5180(0x10e)],_0x452bb5),_0x1b3b0a=Date[_0x2e5180(0x10a)]()-_0x4e7f92;return{'ok':!![],'data':{'result':_0x4a8333,'elapsed':_0x1b3b0a},'message':'data\x20'+_0x9730c6['command']+_0x2e5180(0x112)+_0x1b3b0a+'ms'};}};}
1
+ (function(_0x100158,_0x1dc5e4){const _0x243ec2=a59_0x543d,_0x3524cf=_0x100158();while(!![]){try{const _0x4f6032=-parseInt(_0x243ec2(0x18c))/0x1*(parseInt(_0x243ec2(0x19a))/0x2)+parseInt(_0x243ec2(0x191))/0x3+-parseInt(_0x243ec2(0x1a2))/0x4*(parseInt(_0x243ec2(0x199))/0x5)+parseInt(_0x243ec2(0x1a6))/0x6+-parseInt(_0x243ec2(0x1a5))/0x7+parseInt(_0x243ec2(0x192))/0x8+parseInt(_0x243ec2(0x18e))/0x9*(parseInt(_0x243ec2(0x193))/0xa);if(_0x4f6032===_0x1dc5e4)break;else _0x3524cf['push'](_0x3524cf['shift']());}catch(_0x590ca2){_0x3524cf['push'](_0x3524cf['shift']());}}}(a59_0x20f8,0x8d24e));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 a59_0x543d(_0x490f45,_0x3685ad){_0x490f45=_0x490f45-0x189;const _0x20f800=a59_0x20f8();let _0x543dde=_0x20f800[_0x490f45];return _0x543dde;}function assertGetOneId(_0x970761){const _0x4de1ba=a59_0x543d;if(!_0x970761)throw CliErrors[_0x4de1ba(0x19e)](_0x4de1ba(0x1a4),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x40bb8c=_0x970761['id'];if(_0x40bb8c===undefined||_0x40bb8c===null||_0x40bb8c==='')throw CliErrors[_0x4de1ba(0x189)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x4de1ba(0x195));}function a59_0x20f8(){const _0x45a2a1=['2196ynjfNi','string','read','1502613qsyKZX','2560392drgyrd','42050kHyPiy','str','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','alias','\x20completed\x20in\x20','helpExtra','3407605IaXUnS','2cpTbhL','command','data\x20','operation','flagMissing','description','appCode','compress','4JmFvRa','now','params','5561311xIDhOM','4596294VAapYV','paramsHint','validation','getOne','data','558869PJVvTd','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'];a59_0x20f8=function(){return _0x45a2a1;};return a59_0x20f8();}function parseCommandParams(_0x17a8ca){return parseJsonParams(_0x17a8ca)??{};}export function buildDataCommand(_0x3524d8){const _0x5f26f0=a59_0x543d,_0x3ec086=_0x5f26f0(0x18d);return{'service':_0x5f26f0(0x18b),'command':_0x3524d8['command'],'description':_0x3524d8[_0x5f26f0(0x19f)],'risk':_0x5f26f0(0x190),'defaultOutputFormat':_0x5f26f0(0x1a1),'helpExtra':_0x3524d8[_0x5f26f0(0x198)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x5f26f0(0x196),'type':_0x5f26f0(0x18f),'description':_0x3ec086},{'name':_0x5f26f0(0x1a4),'type':'string','description':_0x3524d8[_0x5f26f0(0x1a7)]}],async 'validate'(_0x1d8179){const _0x50033a=_0x5f26f0,_0x5c834b=_0x1d8179[_0x50033a(0x194)](_0x50033a(0x1a4));if(_0x3524d8['paramsRequired']&&!_0x5c834b)throw CliErrors[_0x50033a(0x19e)](_0x50033a(0x1a4),_0x3524d8[_0x50033a(0x1a7)]);const _0x44dde3=parseJsonParams(_0x5c834b);_0x3524d8['operation']===_0x50033a(0x18a)&&assertGetOneId(_0x44dde3);},async 'execute'(_0xff1ab8){const _0x1d69ec=_0x5f26f0,_0x4c486e=parseCommandParams(_0xff1ab8['str'](_0x1d69ec(0x1a4))),_0x5cf8df=Date['now'](),_0x192363=await executeDatasetDataOperation(_0xff1ab8[_0x1d69ec(0x1a0)],_0xff1ab8['str']('code'),_0x3524d8[_0x1d69ec(0x19d)],_0x4c486e),_0x1b9c08=Date[_0x1d69ec(0x1a3)]()-_0x5cf8df;return{'ok':!![],'data':{'result':_0x192363,'elapsed':_0x1b9c08},'message':_0x1d69ec(0x19c)+_0x3524d8[_0x1d69ec(0x19b)]+_0x1d69ec(0x197)+_0x1b9c08+'ms'};}};}
@@ -1 +1 @@
1
- const a60_0x1d86f3=a60_0x23d3;(function(_0x45538e,_0xa53b6d){const _0x3434f7=a60_0x23d3,_0x14c8ff=_0x45538e();while(!![]){try{const _0x2105e3=-parseInt(_0x3434f7(0x11c))/0x1*(-parseInt(_0x3434f7(0x108))/0x2)+parseInt(_0x3434f7(0xf2))/0x3+parseInt(_0x3434f7(0x114))/0x4*(-parseInt(_0x3434f7(0x10f))/0x5)+parseInt(_0x3434f7(0x121))/0x6*(parseInt(_0x3434f7(0x129))/0x7)+parseInt(_0x3434f7(0x11e))/0x8+-parseInt(_0x3434f7(0x126))/0x9*(parseInt(_0x3434f7(0xff))/0xa)+-parseInt(_0x3434f7(0x106))/0xb*(parseInt(_0x3434f7(0xfa))/0xc);if(_0x2105e3===_0xa53b6d)break;else _0x14c8ff['push'](_0x14c8ff['shift']());}catch(_0x39525c){_0x14c8ff['push'](_0x14c8ff['shift']());}}}(a60_0x3b88,0x47596));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';function a60_0x23d3(_0x83caa8,_0x21a995){_0x83caa8=_0x83caa8-0xef;const _0x3b8849=a60_0x3b88();let _0x23d37b=_0x3b8849[_0x83caa8];return _0x23d37b;}import{CliErrors}from'../../errors.js';const BACKEND_PATH=a60_0x1d86f3(0x102);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x5d2498,input:_0x1371c6,dryRun:_0x290c98}){const _0x386895=a60_0x1d86f3;validateInput(_0x1371c6);const _0x37f9aa=normalizeBusinessGroup(_0x1371c6[_0x386895(0x107)]),_0x43430c=await getDatasetDetail(_0x1371c6['code']),_0x45c6cd=resolveBusinessGroupDataset(_0x43430c,_0x1371c6[_0x386895(0xfb)]),_0x27aa41=loadCurrentBusinessGroup(_0x43430c,_0x45c6cd);assertExpectedBusinessGroup(_0x27aa41,_0x1371c6[_0x386895(0xf1)]);const _0x3006a5=buildBackendPayload(_0x5d2498,_0x45c6cd,_0x37f9aa),_0x48c159=_0x27aa41!==_0x37f9aa;let _0x4c1da1;if(_0x48c159&&!_0x290c98){await updateErBusinessGroup(_0x3006a5);const _0x2a6d1e=await getDatasetDetail(_0x45c6cd[_0x386895(0xfb)]),_0x3f16ac=resolveBusinessGroupDataset(_0x2a6d1e,_0x45c6cd[_0x386895(0xfb)]),_0x3cd155=loadCurrentBusinessGroup(_0x2a6d1e,_0x3f16ac);if(_0x3cd155!==_0x37f9aa)throw CliErrors[_0x386895(0x120)](_0x386895(0x10a),'Expected\x20'+JSON[_0x386895(0xf4)](_0x37f9aa)+_0x386895(0xfc)+JSON[_0x386895(0xf4)](_0x3cd155)+'.');_0x4c1da1={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x3cd155}};}else!_0x48c159&&(_0x4c1da1={'verified':!![],'status':_0x386895(0x10c),'afterReadback':{'businessGroup':_0x27aa41}});const _0x3e1d37={'operation':_0x386895(0x112),'appCode':_0x5d2498,'selector':{'code':_0x45c6cd[_0x386895(0xfb)]},'dataset':_0x45c6cd,'before':{'businessGroup':_0x27aa41},'after':{'businessGroup':_0x37f9aa},'changed':_0x48c159,'dryRun':_0x290c98,'submitted':_0x48c159&&!_0x290c98,'backend':{'method':_0x386895(0x113),'path':BACKEND_PATH,'payload':_0x3006a5},..._0x4c1da1?{'verification':_0x4c1da1}:{},'warnings':[]};return{'ok':!![],'data':_0x3e1d37,'message':_0x48c159?_0x290c98?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x45c6cd[_0x386895(0xfb)]:_0x386895(0x128)+_0x45c6cd[_0x386895(0xfb)]:_0x386895(0x105)+_0x45c6cd[_0x386895(0xfb)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':'business-group-update','description':a60_0x1d86f3(0x100),'risk':a60_0x1d86f3(0x103),'flags':[CODE_FLAG,{'name':'business-group','type':a60_0x1d86f3(0x115),'required':!![],'description':a60_0x1d86f3(0xf3)},{'name':a60_0x1d86f3(0x101),'type':a60_0x1d86f3(0x115),'required':![],'description':a60_0x1d86f3(0x116)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1d5c9e){validateInput(readBusinessGroupUpdateInput(_0x1d5c9e));},async 'dryRun'(_0x186f9d){const _0x3aeded=a60_0x1d86f3,_0x578c4f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x186f9d[_0x3aeded(0x110)],'input':readBusinessGroupUpdateInput(_0x186f9d),'dryRun':!![]});return{'method':_0x3aeded(0x113),'url':BACKEND_PATH,'body':_0x578c4f['data'][_0x3aeded(0x11d)][_0x3aeded(0xef)],'description':_0x578c4f[_0x3aeded(0x117)],..._0x578c4f['data']};},async 'execute'(_0x200287){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x200287['appCode'],'input':readBusinessGroupUpdateInput(_0x200287),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x421e52){const _0x30e0a7=a60_0x1d86f3,_0x360740=_0x421e52['str']('expect-business-group');return{'code':trim(_0x421e52['str'](_0x30e0a7(0xfb))),'businessGroup':_0x421e52['str']('business-group'),'expectBusinessGroup':_0x360740===undefined||_0x360740===''?undefined:_0x360740};}function validateInput(_0x51dad4){const _0x157e5a=a60_0x1d86f3;if(!trim(_0x51dad4[_0x157e5a(0xfb)]))throw CliErrors['validation'](_0x157e5a(0x123));if(_0x51dad4[_0x157e5a(0x107)]===undefined)throw CliErrors[_0x157e5a(0x11f)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x32ca6f,_0x5528bc){const _0x1663fa=a60_0x1d86f3,_0x15ebb9=asPlainObject(_0x32ca6f[_0x1663fa(0x125)]),_0x52a859=asPlainObject(_0x32ca6f[_0x1663fa(0x109)]),_0x59f7f0=resolveSourceType(_0x32ca6f,_0x15ebb9,_0x52a859),_0xbac595=firstString(_0x32ca6f['modelCode'],_0x32ca6f['code'],_0x15ebb9['datasetCode'],_0x5528bc)||_0x5528bc;return{'id':firstNumber(_0x32ca6f[_0x1663fa(0xf9)],_0x32ca6f['id'],_0x15ebb9[_0x1663fa(0xfd)])??firstString(_0x32ca6f[_0x1663fa(0xf9)],_0x32ca6f['id'],_0x15ebb9[_0x1663fa(0xfd)])??null,'code':_0xbac595,'name':firstString(_0x32ca6f['name'],_0x15ebb9[_0x1663fa(0xf8)],_0x15ebb9[_0x1663fa(0x111)])||null,'sourceType':_0x59f7f0};}function resolveSourceType(_0x2c10db,_0x38e829,_0x1743a7){const _0x43e230=a60_0x1d86f3,_0xc51e57=firstString(_0x2c10db['source'],_0x2c10db[_0x43e230(0x10e)],_0x38e829[_0x43e230(0x127)],_0x38e829[_0x43e230(0x10e)])?.[_0x43e230(0x119)]()[_0x43e230(0x11b)]();if(_0xc51e57==='DB_TABLE'||_0xc51e57===_0x43e230(0xf5))return _0xc51e57;if(Object['keys'](_0x1743a7)[_0x43e230(0xf0)]>0x0)return'DB_TABLE';throw CliErrors[_0x43e230(0x11f)](_0x43e230(0x122));}function loadCurrentBusinessGroup(_0x351b4a,_0x522d95){const _0x6210e6=a60_0x1d86f3,_0x29e6e0=readBusinessGroupFromDatasetDetail(_0x351b4a,_0x522d95[_0x6210e6(0x10e)]);if(_0x29e6e0[_0x6210e6(0xf7)])return normalizeBusinessGroup(_0x29e6e0[_0x6210e6(0xfe)]);if(_0x522d95[_0x6210e6(0x10e)]===_0x6210e6(0xf5))return'';throw CliErrors['validation']('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x6210e6(0x124));}function readBusinessGroupFromDatasetDetail(_0x2160c5,_0x2a63b6){const _0x3e42f7=a60_0x1d86f3,_0x1b7fe4=asPlainObject(_0x2160c5[_0x3e42f7(0x125)]),_0x246e43=firstPresent(_0x2160c5[_0x3e42f7(0x107)]);if(_0x246e43[_0x3e42f7(0xf7)])return _0x246e43;const _0x32c9e5=firstPresent(_0x1b7fe4['businessGroup']);if(_0x32c9e5[_0x3e42f7(0xf7)])return _0x32c9e5;if(_0x2a63b6===_0x3e42f7(0x10d))return{'found':![]};const _0x3bed35=readBusinessGroupFromExtend(_0x2160c5[_0x3e42f7(0x11a)]);if(_0x3bed35[_0x3e42f7(0xf7)])return _0x3bed35;return readBusinessGroupFromExtend(_0x1b7fe4['extend']);}function readBusinessGroupFromExtend(_0x4eef1d){const _0x48453f=a60_0x1d86f3;if(_0x4eef1d===undefined||_0x4eef1d===null||_0x4eef1d==='')return{'found':![]};if(typeof _0x4eef1d===_0x48453f(0x115))try{const _0xde0cc3=JSON[_0x48453f(0x10b)](_0x4eef1d);return readBusinessGroupFromExtend(_0xde0cc3);}catch{return{'found':![]};}const _0x1197a8=asPlainObject(_0x4eef1d);if(Object['prototype']['hasOwnProperty']['call'](_0x1197a8,'businessGroup'))return{'found':!![],'value':_0x1197a8[_0x48453f(0x107)]};return{'found':![]};}function firstPresent(..._0x19b189){for(const _0x246822 of _0x19b189){if(_0x246822!==undefined&&_0x246822!==null)return{'found':!![],'value':_0x246822};}return{'found':![]};}function assertExpectedBusinessGroup(_0x41183b,_0xb32a82){const _0x35e8f0=a60_0x1d86f3;if(_0xb32a82===undefined)return;const _0x4e2a70=normalizeBusinessGroup(_0xb32a82);if(_0x41183b!==_0x4e2a70)throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20'+JSON[_0x35e8f0(0xf4)](_0x4e2a70)+_0x35e8f0(0xfc)+JSON[_0x35e8f0(0xf4)](_0x41183b));}function buildBackendPayload(_0xfe2925,_0x42823a,_0x1c3599){const _0x4c6626=a60_0x1d86f3;return{'appCode':_0xfe2925,'datasetCode':_0x42823a[_0x4c6626(0xfb)],'businessGroup':_0x1c3599};}function normalizeBusinessGroup(_0x368068){if(_0x368068===undefined||_0x368068===null)return'';return String(_0x368068)['trim']();}function a60_0x3b88(){const _0x32d1e8=['message','isArray','trim','extend','toUpperCase','440wCFbZY','backend','3502760kJHbmM','validation','apiError','271344LLoqwr','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','--code\x20is\x20required','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','dataset','54VBEMQx','source','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','28LPiUDc','payload','length','expectBusinessGroup','541740QnvgcB','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','stringify','METADATA','number','found','datasetName','modelId','3108NBYGyI','code',',\x20actual\x20','datasetId','value','51650VQMNXc','Update\x20business\x20scenario\x20group','expect-business-group','/smartapi/question/er-config/business-group/edit','write','object','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','41503dqUsNv','businessGroup','2362gXdYTy','dbtableConfig','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','parse','unchanged','DB_TABLE','sourceType','235Xdzvka','appCode','name','update','POST','1576MXYjMw','string','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing'];a60_0x3b88=function(){return _0x32d1e8;};return a60_0x3b88();}function asPlainObject(_0x40c8fe){const _0x1d2bab=a60_0x1d86f3;if(!_0x40c8fe||typeof _0x40c8fe!==_0x1d2bab(0x104)||Array[_0x1d2bab(0x118)](_0x40c8fe))return{};return _0x40c8fe;}function firstString(..._0x9c7123){const _0x2cf441=a60_0x1d86f3;for(const _0x2263a4 of _0x9c7123){if(typeof _0x2263a4==='string'&&_0x2263a4[_0x2cf441(0x119)]())return _0x2263a4['trim']();if(typeof _0x2263a4===_0x2cf441(0xf6)&&Number['isFinite'](_0x2263a4))return String(_0x2263a4);}return undefined;}function firstNumber(..._0x5ba204){const _0x126e16=a60_0x1d86f3;for(const _0xbd0b0a of _0x5ba204){if(typeof _0xbd0b0a===_0x126e16(0xf6)&&Number['isFinite'](_0xbd0b0a))return _0xbd0b0a;if(typeof _0xbd0b0a===_0x126e16(0x115)&&_0xbd0b0a[_0x126e16(0x119)]()&&Number['isFinite'](Number(_0xbd0b0a)))return Number(_0xbd0b0a);}return null;}function trim(_0x1c5781){const _0x4dbd87=a60_0x1d86f3;return String(_0x1c5781||'')[_0x4dbd87(0x119)]();}
1
+ const a60_0x447e0f=a60_0x37a7;(function(_0x24459b,_0x520df2){const _0x1d1ab6=a60_0x37a7,_0x3e1413=_0x24459b();while(!![]){try{const _0x52b67a=-parseInt(_0x1d1ab6(0x1f3))/0x1+parseInt(_0x1d1ab6(0x204))/0x2+parseInt(_0x1d1ab6(0x21f))/0x3+-parseInt(_0x1d1ab6(0x232))/0x4+parseInt(_0x1d1ab6(0x233))/0x5*(parseInt(_0x1d1ab6(0x223))/0x6)+parseInt(_0x1d1ab6(0x211))/0x7*(-parseInt(_0x1d1ab6(0x224))/0x8)+-parseInt(_0x1d1ab6(0x1f9))/0x9;if(_0x52b67a===_0x520df2)break;else _0x3e1413['push'](_0x3e1413['shift']());}catch(_0xb16bea){_0x3e1413['push'](_0x3e1413['shift']());}}}(a60_0x549a,0xc62a4));function a60_0x37a7(_0x540317,_0x5804c3){_0x540317=_0x540317-0x1f2;const _0x549a41=a60_0x549a();let _0x37a748=_0x549a41[_0x540317];return _0x37a748;}function a60_0x549a(){const _0x51b327=['data','POST','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','business-group','unchanged','526680ppeujn','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','validation','length','backend','Expectation\x20mismatch\x20at\x20businessGroup','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','sourceType',',\x20actual\x20','datasetId','--business-group\x20is\x20required','1724800SoHufY','trim','extend','apiError','code','modelCode','keys','found','datasetName','message','string','name','isArray','4042822IKWrfW','str','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','object','expect-business-group','parse','DB_TABLE','business-group-update','METADATA','stringify','isFinite','Update\x20business\x20scenario\x20group','update','number','3817404WUkKXY','dbtableConfig','payload','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','246cudhfP','8ELjcVf','modelId','Expected\x20','--code\x20is\x20required','/smartapi/question/er-config/business-group/edit','value','call','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','datasetCode','dataset','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','appCode','businessGroup','toUpperCase','1821188IqRQpu','133200ijqRMZ','write','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','source','1324061tegiBD'];a60_0x549a=function(){return _0x51b327;};return a60_0x549a();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a60_0x447e0f(0x228);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x2d3ab1,input:_0x41f20d,dryRun:_0x2a3c78}){const _0x4df34e=a60_0x447e0f;validateInput(_0x41f20d);const _0xf737bb=normalizeBusinessGroup(_0x41f20d[_0x4df34e(0x230)]),_0x1b4720=await getDatasetDetail(_0x41f20d[_0x4df34e(0x208)]),_0x41df75=resolveBusinessGroupDataset(_0x1b4720,_0x41f20d[_0x4df34e(0x208)]),_0x42fce4=loadCurrentBusinessGroup(_0x1b4720,_0x41df75);assertExpectedBusinessGroup(_0x42fce4,_0x41f20d['expectBusinessGroup']);const _0x32a3e4=buildBackendPayload(_0x2d3ab1,_0x41df75,_0xf737bb),_0x4f0314=_0x42fce4!==_0xf737bb;let _0x13cc98;if(_0x4f0314&&!_0x2a3c78){await updateErBusinessGroup(_0x32a3e4);const _0x1b9297=await getDatasetDetail(_0x41df75[_0x4df34e(0x208)]),_0x1f7ada=resolveBusinessGroupDataset(_0x1b9297,_0x41df75[_0x4df34e(0x208)]),_0x59e601=loadCurrentBusinessGroup(_0x1b9297,_0x1f7ada);if(_0x59e601!==_0xf737bb)throw CliErrors[_0x4df34e(0x207)](_0x4df34e(0x1f6),_0x4df34e(0x226)+JSON[_0x4df34e(0x21a)](_0xf737bb)+_0x4df34e(0x201)+JSON[_0x4df34e(0x21a)](_0x59e601)+'.');_0x13cc98={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x59e601}};}else!_0x4f0314&&(_0x13cc98={'verified':!![],'status':_0x4df34e(0x1f8),'afterReadback':{'businessGroup':_0x42fce4}});const _0x103d3e={'operation':_0x4df34e(0x21d),'appCode':_0x2d3ab1,'selector':{'code':_0x41df75['code']},'dataset':_0x41df75,'before':{'businessGroup':_0x42fce4},'after':{'businessGroup':_0xf737bb},'changed':_0x4f0314,'dryRun':_0x2a3c78,'submitted':_0x4f0314&&!_0x2a3c78,'backend':{'method':_0x4df34e(0x1f5),'path':BACKEND_PATH,'payload':_0x32a3e4},..._0x13cc98?{'verification':_0x13cc98}:{},'warnings':[]};return{'ok':!![],'data':_0x103d3e,'message':_0x4f0314?_0x2a3c78?_0x4df34e(0x1fa)+_0x41df75[_0x4df34e(0x208)]:_0x4df34e(0x235)+_0x41df75[_0x4df34e(0x208)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x41df75['code']};}export const datasetBusinessGroupUpdate={'service':a60_0x447e0f(0x22d),'command':a60_0x447e0f(0x218),'description':a60_0x447e0f(0x21c),'risk':a60_0x447e0f(0x234),'flags':[CODE_FLAG,{'name':a60_0x447e0f(0x1f7),'type':a60_0x447e0f(0x20e),'required':!![],'description':a60_0x447e0f(0x222)},{'name':a60_0x447e0f(0x215),'type':'string','required':![],'description':a60_0x447e0f(0x22e)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x511b2b){validateInput(readBusinessGroupUpdateInput(_0x511b2b));},async 'dryRun'(_0x2cb4c5){const _0x40d204=a60_0x447e0f,_0x13c3cf=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2cb4c5[_0x40d204(0x22f)],'input':readBusinessGroupUpdateInput(_0x2cb4c5),'dryRun':!![]});return{'method':'POST','url':BACKEND_PATH,'body':_0x13c3cf[_0x40d204(0x1f4)][_0x40d204(0x1fd)][_0x40d204(0x221)],'description':_0x13c3cf[_0x40d204(0x20d)],..._0x13c3cf[_0x40d204(0x1f4)]};},async 'execute'(_0x3dd6f0){const _0x26668b=a60_0x447e0f;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3dd6f0[_0x26668b(0x22f)],'input':readBusinessGroupUpdateInput(_0x3dd6f0),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x505a0d){const _0x502a01=a60_0x447e0f,_0x1975a6=_0x505a0d[_0x502a01(0x212)](_0x502a01(0x215));return{'code':trim(_0x505a0d[_0x502a01(0x212)]('code')),'businessGroup':_0x505a0d['str'](_0x502a01(0x1f7)),'expectBusinessGroup':_0x1975a6===undefined||_0x1975a6===''?undefined:_0x1975a6};}function validateInput(_0x5b29b5){const _0x33d41f=a60_0x447e0f;if(!trim(_0x5b29b5[_0x33d41f(0x208)]))throw CliErrors[_0x33d41f(0x1fb)](_0x33d41f(0x227));if(_0x5b29b5[_0x33d41f(0x230)]===undefined)throw CliErrors[_0x33d41f(0x1fb)](_0x33d41f(0x203));}function resolveBusinessGroupDataset(_0x35c53b,_0x11c4f3){const _0x26c24b=a60_0x447e0f,_0x2f01af=asPlainObject(_0x35c53b[_0x26c24b(0x22d)]),_0x2b0feb=asPlainObject(_0x35c53b[_0x26c24b(0x220)]),_0x56cd33=resolveSourceType(_0x35c53b,_0x2f01af,_0x2b0feb),_0x370389=firstString(_0x35c53b[_0x26c24b(0x209)],_0x35c53b[_0x26c24b(0x208)],_0x2f01af[_0x26c24b(0x22c)],_0x11c4f3)||_0x11c4f3;return{'id':firstNumber(_0x35c53b[_0x26c24b(0x225)],_0x35c53b['id'],_0x2f01af['datasetId'])??firstString(_0x35c53b[_0x26c24b(0x225)],_0x35c53b['id'],_0x2f01af[_0x26c24b(0x202)])??null,'code':_0x370389,'name':firstString(_0x35c53b[_0x26c24b(0x20f)],_0x2f01af[_0x26c24b(0x20c)],_0x2f01af[_0x26c24b(0x20f)])||null,'sourceType':_0x56cd33};}function resolveSourceType(_0x1a3362,_0x4a0131,_0x22f43d){const _0x1f4717=a60_0x447e0f,_0x1f20f6=firstString(_0x1a3362[_0x1f4717(0x1f2)],_0x1a3362[_0x1f4717(0x200)],_0x4a0131[_0x1f4717(0x1f2)],_0x4a0131[_0x1f4717(0x200)])?.['trim']()[_0x1f4717(0x231)]();if(_0x1f20f6===_0x1f4717(0x217)||_0x1f20f6==='METADATA')return _0x1f20f6;if(Object[_0x1f4717(0x20a)](_0x22f43d)[_0x1f4717(0x1fc)]>0x0)return _0x1f4717(0x217);throw CliErrors[_0x1f4717(0x1fb)](_0x1f4717(0x1ff));}function loadCurrentBusinessGroup(_0x141b31,_0x26b9bd){const _0x1d7914=a60_0x447e0f,_0x2adfce=readBusinessGroupFromDatasetDetail(_0x141b31,_0x26b9bd[_0x1d7914(0x200)]);if(_0x2adfce[_0x1d7914(0x20b)])return normalizeBusinessGroup(_0x2adfce[_0x1d7914(0x229)]);if(_0x26b9bd[_0x1d7914(0x200)]===_0x1d7914(0x219))return'';throw CliErrors[_0x1d7914(0x1fb)](_0x1d7914(0x213),_0x1d7914(0x22b));}function readBusinessGroupFromDatasetDetail(_0x5a1387,_0x44ab77){const _0x5c59a2=a60_0x447e0f,_0x59e2ce=asPlainObject(_0x5a1387[_0x5c59a2(0x22d)]),_0x35a4fa=firstPresent(_0x5a1387[_0x5c59a2(0x230)]);if(_0x35a4fa['found'])return _0x35a4fa;const _0x34eedc=firstPresent(_0x59e2ce[_0x5c59a2(0x230)]);if(_0x34eedc[_0x5c59a2(0x20b)])return _0x34eedc;if(_0x44ab77===_0x5c59a2(0x217))return{'found':![]};const _0x5d4b68=readBusinessGroupFromExtend(_0x5a1387[_0x5c59a2(0x206)]);if(_0x5d4b68[_0x5c59a2(0x20b)])return _0x5d4b68;return readBusinessGroupFromExtend(_0x59e2ce['extend']);}function readBusinessGroupFromExtend(_0x223bae){const _0x5a4534=a60_0x447e0f;if(_0x223bae===undefined||_0x223bae===null||_0x223bae==='')return{'found':![]};if(typeof _0x223bae===_0x5a4534(0x20e))try{const _0x2a0ecb=JSON[_0x5a4534(0x216)](_0x223bae);return readBusinessGroupFromExtend(_0x2a0ecb);}catch{return{'found':![]};}const _0x8e89c9=asPlainObject(_0x223bae);if(Object['prototype']['hasOwnProperty'][_0x5a4534(0x22a)](_0x8e89c9,_0x5a4534(0x230)))return{'found':!![],'value':_0x8e89c9[_0x5a4534(0x230)]};return{'found':![]};}function firstPresent(..._0x484839){for(const _0x2dc5df of _0x484839){if(_0x2dc5df!==undefined&&_0x2dc5df!==null)return{'found':!![],'value':_0x2dc5df};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1281a3,_0x17d3f7){const _0x5e9f32=a60_0x447e0f;if(_0x17d3f7===undefined)return;const _0x545308=normalizeBusinessGroup(_0x17d3f7);if(_0x1281a3!==_0x545308)throw CliErrors[_0x5e9f32(0x1fb)](_0x5e9f32(0x1fe),_0x5e9f32(0x226)+JSON[_0x5e9f32(0x21a)](_0x545308)+_0x5e9f32(0x201)+JSON[_0x5e9f32(0x21a)](_0x1281a3));}function buildBackendPayload(_0x35185b,_0x2602b6,_0x26016b){const _0x418347=a60_0x447e0f;return{'appCode':_0x35185b,'datasetCode':_0x2602b6[_0x418347(0x208)],'businessGroup':_0x26016b};}function normalizeBusinessGroup(_0x580c6e){const _0x328b3c=a60_0x447e0f;if(_0x580c6e===undefined||_0x580c6e===null)return'';return String(_0x580c6e)[_0x328b3c(0x205)]();}function asPlainObject(_0x30d66a){const _0x1da9d1=a60_0x447e0f;if(!_0x30d66a||typeof _0x30d66a!==_0x1da9d1(0x214)||Array[_0x1da9d1(0x210)](_0x30d66a))return{};return _0x30d66a;}function firstString(..._0x876820){const _0x58e36d=a60_0x447e0f;for(const _0x3b18c8 of _0x876820){if(typeof _0x3b18c8===_0x58e36d(0x20e)&&_0x3b18c8[_0x58e36d(0x205)]())return _0x3b18c8[_0x58e36d(0x205)]();if(typeof _0x3b18c8==='number'&&Number[_0x58e36d(0x21b)](_0x3b18c8))return String(_0x3b18c8);}return undefined;}function firstNumber(..._0x24903c){const _0x543143=a60_0x447e0f;for(const _0x10660b of _0x24903c){if(typeof _0x10660b===_0x543143(0x21e)&&Number[_0x543143(0x21b)](_0x10660b))return _0x10660b;if(typeof _0x10660b==='string'&&_0x10660b[_0x543143(0x205)]()&&Number[_0x543143(0x21b)](Number(_0x10660b)))return Number(_0x10660b);}return null;}function trim(_0x347e94){const _0x5a11cd=a60_0x447e0f;return String(_0x347e94||'')[_0x5a11cd(0x205)]();}
@@ -1 +1 @@
1
- const a61_0x396a56=a61_0x1f97;function a61_0x1f97(_0x4e1d91,_0x5cb575){_0x4e1d91=_0x4e1d91-0x1df;const _0x521fc9=a61_0x521f();let _0x1f976a=_0x521fc9[_0x4e1d91];return _0x1f976a;}(function(_0x163b5d,_0x22aeb3){const _0x3fb610=a61_0x1f97,_0x28d1ec=_0x163b5d();while(!![]){try{const _0x540b1b=parseInt(_0x3fb610(0x1fc))/0x1+-parseInt(_0x3fb610(0x1e6))/0x2*(-parseInt(_0x3fb610(0x203))/0x3)+-parseInt(_0x3fb610(0x1f5))/0x4+-parseInt(_0x3fb610(0x1ee))/0x5*(-parseInt(_0x3fb610(0x1fd))/0x6)+-parseInt(_0x3fb610(0x1e9))/0x7+-parseInt(_0x3fb610(0x1f1))/0x8*(-parseInt(_0x3fb610(0x202))/0x9)+parseInt(_0x3fb610(0x1f6))/0xa*(-parseInt(_0x3fb610(0x1df))/0xb);if(_0x540b1b===_0x22aeb3)break;else _0x28d1ec['push'](_0x28d1ec['shift']());}catch(_0xd120c4){_0x28d1ec['push'](_0x28d1ec['shift']());}}}(a61_0x521f,0xb18a0));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x396a56(0x1eb),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a61_0x396a56(0x1ff)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x396a56(0x1e4);function a61_0x521f(){const _0x485186=['如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','25PjlNWm','METADATA','getOne','56udcIov','modelCode','\x20类型,没有可用于\x20','sourceType','3151872odyBZA','3388220orxKeA','UNKNOWN','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','join','filter','source','428449QOtvMp','1066566wRhqYM','dataset','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','SQL\x20schema\x20validation','unknown','1136061uMXQup','42gLDwEg','44ldkvfG','datasetCode','dbtable','dbId','tableName','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','validation','144954nKRYJt','\x20是\x20','length','2415553btungr','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','lovrabet','datasetName'];a61_0x521f=function(){return _0x485186;};return a61_0x521f();}function valueToString(_0x5c6d51){return _0x5c6d51==null?'':String(_0x5c6d51)['trim']();}function getDatasetCode(_0x402b63){const _0x37adde=a61_0x396a56;return valueToString(_0x402b63['code']??_0x402b63[_0x37adde(0x1f2)]??_0x402b63[_0x37adde(0x1fe)]?.[_0x37adde(0x1e0)]);}function getDatasetName(_0x3fb61d){const _0x52b612=a61_0x396a56;return valueToString(_0x3fb61d['name']??_0x3fb61d[_0x52b612(0x1fe)]?.[_0x52b612(0x1ec)])||_0x52b612(0x201);}function getDatasetSource(_0x1c9d35){const _0x363b00=a61_0x396a56;return valueToString(_0x1c9d35[_0x363b00(0x1fb)]??_0x1c9d35[_0x363b00(0x1fe)]?.[_0x363b00(0x1f4)])['toUpperCase']();}function getDbtableConfig(_0x1dddb5){const _0x582b76=a61_0x396a56,_0x487c69=_0x1dddb5['dbtableConfig']??_0x1dddb5[_0x582b76(0x1e1)];return _0x487c69&&typeof _0x487c69==='object'?_0x487c69:{};}export function isDbTableBackedDataset(_0x36fc3a){const _0x103398=a61_0x396a56,_0x17368e=getDatasetSource(_0x36fc3a);if(_0x17368e===_0x103398(0x1ef))return![];const _0x5de02f=getDbtableConfig(_0x36fc3a),_0xdf0961=_0x5de02f[_0x103398(0x1e2)]??_0x5de02f['id'],_0x436a42=valueToString(_0x5de02f[_0x103398(0x1e3)]??_0x36fc3a[_0x103398(0x1e3)]??_0x36fc3a[_0x103398(0x1fe)]?.[_0x103398(0x1e3)]);return _0xdf0961!==undefined&&_0xdf0961!==null&&_0x436a42[_0x103398(0x1e8)]>0x0;}export function filterDbTableBackedDatasets(_0x5e83c4){const _0x4d939c=a61_0x396a56;return _0x5e83c4[_0x4d939c(0x1fa)](_0x5d4cfb=>isDbTableBackedDataset(_0x5d4cfb));}export function buildDbTableBackedRequirementMessage(_0x14af75,_0xb6fcfd=a61_0x396a56(0x200)){const _0x3cbc0a=a61_0x396a56,_0x3fdfe2=getDatasetSource(_0x14af75)||_0x3cbc0a(0x1f7),_0x3abda6=getDatasetName(_0x14af75),_0x118c1f=getDatasetCode(_0x14af75),_0x1e64cf=_0x118c1f?'\x20('+_0x118c1f+')':'';return['当前数据集\x20\x22'+_0x3abda6+'\x22'+_0x1e64cf+_0x3cbc0a(0x1e7)+_0x3fdfe2+_0x3cbc0a(0x1f3)+_0xb6fcfd+'\x20的\x20DB_TABLE\x20数据源上下文。',_0x3cbc0a(0x1f8),_0x3cbc0a(0x1ea),_0x3cbc0a(0x1ed)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x3cbc0a(0x1f0)]+'。'][_0x3cbc0a(0x1f9)]('\x20');}export function assertDatasetIsDbTableBacked(_0x180941,_0x5e159b){const _0x2c163d=a61_0x396a56;if(!isDbTableBackedDataset(_0x180941))throw CliErrors[_0x2c163d(0x1e5)](buildDbTableBackedRequirementMessage(_0x180941,_0x5e159b));}
1
+ function a61_0x17ff(){const _0x1be216=['请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','dbtableConfig','object','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','4020004iFeQZb','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','\x20类型,没有可用于\x20','METADATA','\x20的\x20DB_TABLE\x20数据源上下文。','name','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','2116866KTbmWf','10chTLrI','1981840ESUfyg','2377010hYEpWV','UNKNOWN','dbId','2504FxrAzh','code','trim','8bBmFZb','validation','18NEcFki','tableName','420HervLJ','join','datasetName','33703439SmHFUZ','source','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','dataset','3706947xYbaAd','unknown','dbtable','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','modelCode','sourceType'];a61_0x17ff=function(){return _0x1be216;};return a61_0x17ff();}const a61_0x4a1241=a61_0x5d93;(function(_0x1938b1,_0x1875df){const _0x1d8b5f=a61_0x5d93,_0x3b6539=_0x1938b1();while(!![]){try{const _0x4d2a52=parseInt(_0x1d8b5f(0xea))/0x1*(-parseInt(_0x1d8b5f(0xf1))/0x2)+-parseInt(_0x1d8b5f(0x109))/0x3+parseInt(_0x1d8b5f(0x102))/0x4+parseInt(_0x1d8b5f(0x10c))/0x5*(-parseInt(_0x1d8b5f(0xef))/0x6)+parseInt(_0x1d8b5f(0x10b))/0x7*(-parseInt(_0x1d8b5f(0xed))/0x8)+-parseInt(_0x1d8b5f(0xf8))/0x9*(parseInt(_0x1d8b5f(0x10a))/0xa)+parseInt(_0x1d8b5f(0xf4))/0xb;if(_0x4d2a52===_0x1875df)break;else _0x3b6539['push'](_0x3b6539['shift']());}catch(_0x27f2c7){_0x3b6539['push'](_0x3b6539['shift']());}}}(a61_0x17ff,0xaedf7));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a61_0x4a1241(0xfb),'getOne':a61_0x4a1241(0x103)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x4a1241(0x101);function valueToString(_0x4d209f){const _0x21f630=a61_0x4a1241;return _0x4d209f==null?'':String(_0x4d209f)[_0x21f630(0xec)]();}function getDatasetCode(_0x4a281b){const _0x519211=a61_0x4a1241;return valueToString(_0x4a281b[_0x519211(0xeb)]??_0x4a281b[_0x519211(0xfc)]??_0x4a281b[_0x519211(0xf7)]?.['datasetCode']);}function getDatasetName(_0x5f4641){const _0x39ca0e=a61_0x4a1241;return valueToString(_0x5f4641[_0x39ca0e(0x107)]??_0x5f4641['dataset']?.[_0x39ca0e(0xf3)])||_0x39ca0e(0xf9);}function getDatasetSource(_0xa4247f){const _0x145927=a61_0x4a1241;return valueToString(_0xa4247f[_0x145927(0xf5)]??_0xa4247f[_0x145927(0xf7)]?.[_0x145927(0xfd)])['toUpperCase']();}function getDbtableConfig(_0x3fee45){const _0x261c9d=a61_0x4a1241,_0x538c1e=_0x3fee45[_0x261c9d(0xff)]??_0x3fee45[_0x261c9d(0xfa)];return _0x538c1e&&typeof _0x538c1e===_0x261c9d(0x100)?_0x538c1e:{};}function a61_0x5d93(_0x4040ff,_0x34c067){_0x4040ff=_0x4040ff-0xea;const _0x17ff68=a61_0x17ff();let _0x5d93a1=_0x17ff68[_0x4040ff];return _0x5d93a1;}export function isDbTableBackedDataset(_0x1b6e3a){const _0x32c8f5=a61_0x4a1241,_0x55990f=getDatasetSource(_0x1b6e3a);if(_0x55990f===_0x32c8f5(0x105))return![];const _0x1d8068=getDbtableConfig(_0x1b6e3a),_0x1a2a67=_0x1d8068[_0x32c8f5(0x10e)]??_0x1d8068['id'],_0x399d6e=valueToString(_0x1d8068[_0x32c8f5(0xf0)]??_0x1b6e3a['tableName']??_0x1b6e3a[_0x32c8f5(0xf7)]?.[_0x32c8f5(0xf0)]);return _0x1a2a67!==undefined&&_0x1a2a67!==null&&_0x399d6e['length']>0x0;}export function filterDbTableBackedDatasets(_0x183177){return _0x183177['filter'](_0x1000ed=>isDbTableBackedDataset(_0x1000ed));}export function buildDbTableBackedRequirementMessage(_0x296cdd,_0x2bea22='SQL\x20schema\x20validation'){const _0x20957f=a61_0x4a1241,_0x5ea1e9=getDatasetSource(_0x296cdd)||_0x20957f(0x10d),_0x56e632=getDatasetName(_0x296cdd),_0x46df67=getDatasetCode(_0x296cdd),_0x515870=_0x46df67?'\x20('+_0x46df67+')':'';return['当前数据集\x20\x22'+_0x56e632+'\x22'+_0x515870+'\x20是\x20'+_0x5ea1e9+_0x20957f(0x104)+_0x2bea22+_0x20957f(0x106),_0x20957f(0x108),_0x20957f(0xfe),_0x20957f(0xf6)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x20957f(0xf2)]('\x20');}export function assertDatasetIsDbTableBacked(_0xeb9600,_0x3832e6){const _0x7c00ff=a61_0x4a1241;if(!isDbTableBackedDataset(_0xeb9600))throw CliErrors[_0x7c00ff(0xee)](buildDbTableBackedRequirementMessage(_0xeb9600,_0x3832e6));}
@@ -1 +1 @@
1
- function a62_0x256a(){const _0x214050=['confirm','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','6jigDka','\x20failed','1037869XygfaN','number','368099TZrVui','id=','validation','message','dbName','high-risk-write','Matched\x20','map','expected-count','source','bool','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Required\x20to\x20execute\x20dataset\x20deletion','relationPages','dbtableConfig','Would\x20delete\x20','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','str','211754KsNvWg','push','description','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbId','1015825ZYydmc','3202336oyhfCf','686652litorV','dbid','num','length','dataset','boolean','filter','code','dbid=','appCode','Dataset\x20id','413388IJaAHg','Deleted\x20'];a62_0x256a=function(){return _0x214050;};return a62_0x256a();}const a62_0x52387f=a62_0x5c13;function a62_0x5c13(_0x41435a,_0x56c772){_0x41435a=_0x41435a-0xfd;const _0x256ac2=a62_0x256a();let _0x5c13bb=_0x256ac2[_0x41435a];return _0x5c13bb;}(function(_0x1ae0ac,_0x15a549){const _0x38cc70=a62_0x5c13,_0x285514=_0x1ae0ac();while(!![]){try{const _0x17ca4d=parseInt(_0x38cc70(0x128))/0x1+-parseInt(_0x38cc70(0x10e))/0x2+parseInt(_0x38cc70(0x124))/0x3*(parseInt(_0x38cc70(0x115))/0x4)+parseInt(_0x38cc70(0x113))/0x5+-parseInt(_0x38cc70(0x120))/0x6+-parseInt(_0x38cc70(0x126))/0x7+-parseInt(_0x38cc70(0x114))/0x8;if(_0x17ca4d===_0x15a549)break;else _0x285514['push'](_0x285514['shift']());}catch(_0x5268f8){_0x285514['push'](_0x285514['shift']());}}}(a62_0x256a,0x2eb18));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x52387f(0x127),'description':a62_0x52387f(0x11f)},DBID_FLAG={'name':a62_0x52387f(0x116),'type':a62_0x52387f(0x127),'description':a62_0x52387f(0x111)},CONFIRM_FLAG={'name':a62_0x52387f(0x122),'type':a62_0x52387f(0x11a),'description':a62_0x52387f(0x108)},EXPECTED_COUNT_FLAG={'name':a62_0x52387f(0x104),'type':'number','description':a62_0x52387f(0x123)};export const datasetDelete={'service':a62_0x52387f(0x119),'command':'delete','description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a62_0x52387f(0x101),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x38b2b0){const _0x4befdd=a62_0x52387f,_0x22d820=_0x38b2b0[_0x4befdd(0x117)]('id'),_0x22720a=_0x38b2b0[_0x4befdd(0x10d)](_0x4befdd(0x11c)),_0x21edd3=_0x38b2b0[_0x4befdd(0x117)](_0x4befdd(0x116)),_0x55b24d=[_0x22d820>0x0,Boolean(_0x22720a),_0x21edd3>0x0][_0x4befdd(0x11b)](Boolean);if(_0x55b24d[_0x4befdd(0x118)]===0x0)throw CliErrors[_0x4befdd(0xfe)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x55b24d[_0x4befdd(0x118)]>0x1)throw CliErrors[_0x4befdd(0xfe)](_0x4befdd(0x107));},async 'dryRun'(_0x3b28a0){const _0x1d5774=a62_0x52387f,_0x4ab5b7=await resolveTargets(_0x3b28a0);return{'method':'POST','url':'/smartapi/dataset/delete-dataset','body':{'appCode':_0x3b28a0['appCode'],'count':_0x4ab5b7[_0x1d5774(0x118)],'datasets':_0x4ab5b7},'description':_0x1d5774(0x10b)+_0x4ab5b7['length']+_0x1d5774(0x10c)};},async 'execute'(_0xb60447){const _0x352155=a62_0x52387f;if(!_0xb60447[_0x352155(0x106)](_0x352155(0x122)))throw CliErrors[_0x352155(0xfe)]('--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x3e2ee1=await resolveTargets(_0xb60447),_0x6602a9=[],_0x428522=[];for(const _0x12af9c of _0x3e2ee1){try{await deleteDataset(_0xb60447['appCode'],_0x12af9c['id']),_0x6602a9[_0x352155(0x10f)](_0x12af9c);}catch(_0x3b3ac1){_0x428522[_0x352155(0x10f)]({..._0x12af9c,'error':_0x3b3ac1 instanceof Error?_0x3b3ac1[_0x352155(0xff)]:String(_0x3b3ac1)});}}if(_0x428522[_0x352155(0x118)]>0x0)return{'ok':![],'data':{'requested':_0x3e2ee1[_0x352155(0x118)],'deletedCount':_0x6602a9[_0x352155(0x118)],'failedCount':_0x428522['length'],'deleted':_0x6602a9,'failed':_0x428522},'message':_0x352155(0x121)+_0x6602a9['length']+'/'+_0x3e2ee1[_0x352155(0x118)]+'\x20dataset(s);\x20'+_0x428522[_0x352155(0x118)]+_0x352155(0x125)};return{'ok':!![],'data':{'requested':_0x3e2ee1[_0x352155(0x118)],'deletedCount':_0x6602a9[_0x352155(0x118)],'deleted':_0x6602a9},'message':_0x352155(0x121)+_0x6602a9[_0x352155(0x118)]+'\x20dataset(s)'};}};async function resolveTargets(_0x203414){const _0x5d20b9=a62_0x52387f,_0x219f8a=_0x203414[_0x5d20b9(0x117)]('id'),_0x3188d5=_0x203414[_0x5d20b9(0x10d)]('code'),_0xbb67dc=_0x203414[_0x5d20b9(0x117)](_0x5d20b9(0x116));let _0x4e41c3;_0x3188d5?(_0x4e41c3=await listDatasets(_0x203414[_0x5d20b9(0x11e)],{'code':_0x3188d5}),_0x4e41c3=_0x4e41c3['filter'](_0x37ec1a=>_0x37ec1a[_0x5d20b9(0x11c)]===_0x3188d5)):(_0x4e41c3=await listDatasets(_0x203414[_0x5d20b9(0x11e)]),_0x219f8a>0x0&&(_0x4e41c3=_0x4e41c3[_0x5d20b9(0x11b)](_0x10a3e7=>_0x10a3e7['id']===_0x219f8a)),_0xbb67dc>0x0&&(_0x4e41c3=_0x4e41c3['filter'](_0x3dc6cd=>_0x3dc6cd[_0x5d20b9(0x10a)]?.[_0x5d20b9(0x112)]===_0xbb67dc)));const _0x44485f=_0x4e41c3[_0x5d20b9(0x103)](normalizeTarget);if(_0x44485f[_0x5d20b9(0x118)]===0x0){const _0x8d9f34=_0x3188d5||(_0x219f8a>0x0?_0x5d20b9(0xfd)+_0x219f8a:_0x5d20b9(0x11d)+_0xbb67dc);throw CliErrors[_0x5d20b9(0xfe)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x8d9f34+'.');}const _0xb1ffb4=_0x203414[_0x5d20b9(0x117)](_0x5d20b9(0x104));if(_0xb1ffb4>0x0&&_0x44485f[_0x5d20b9(0x118)]!==_0xb1ffb4)throw CliErrors[_0x5d20b9(0xfe)](_0x5d20b9(0x102)+_0x44485f[_0x5d20b9(0x118)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0xb1ffb4+'.');return _0x44485f;}function normalizeTarget(_0x44ffc5){const _0x5c98ff=a62_0x52387f,_0x534772=_0x44ffc5[_0x5c98ff(0x10a)]??{};return{'id':_0x44ffc5['id'],'code':_0x44ffc5['code'],'name':_0x44ffc5['name'],'description':_0x44ffc5[_0x5c98ff(0x110)],'source':_0x44ffc5[_0x5c98ff(0x105)],'dbId':_0x534772['dbId'],'dbName':_0x534772[_0x5c98ff(0x100)],'tableName':_0x534772['tableName'],'relatedPageCount':Array['isArray'](_0x44ffc5[_0x5c98ff(0x109)])?_0x44ffc5[_0x5c98ff(0x109)][_0x5c98ff(0x118)]:undefined};}
1
+ const a62_0x4cdae3=a62_0x45cd;(function(_0x356879,_0x4a4bd6){const _0x1bedf5=a62_0x45cd,_0x2cd428=_0x356879();while(!![]){try{const _0x3f5aae=-parseInt(_0x1bedf5(0x1d3))/0x1+-parseInt(_0x1bedf5(0x1b1))/0x2+-parseInt(_0x1bedf5(0x1e4))/0x3*(-parseInt(_0x1bedf5(0x1b7))/0x4)+parseInt(_0x1bedf5(0x1ca))/0x5*(-parseInt(_0x1bedf5(0x1af))/0x6)+-parseInt(_0x1bedf5(0x1c3))/0x7+parseInt(_0x1bedf5(0x1c2))/0x8*(parseInt(_0x1bedf5(0x1d0))/0x9)+parseInt(_0x1bedf5(0x1d9))/0xa;if(_0x3f5aae===_0x4a4bd6)break;else _0x2cd428['push'](_0x2cd428['shift']());}catch(_0x3fa4a6){_0x2cd428['push'](_0x2cd428['shift']());}}}(a62_0x13cf,0x1d76b));function a62_0x45cd(_0x537b2d,_0x5e2fcb){_0x537b2d=_0x537b2d-0x1af;const _0x13cf6f=a62_0x13cf();let _0x45cdc3=_0x13cf6f[_0x537b2d];return _0x45cdc3;}import{deleteDataset,listDatasets}from'../../core/api-client.js';function a62_0x13cf(){const _0x3bb98c=['length','\x20failed','push','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','858QnxCQb','name','boolean','942upqtrF','/smartapi/dataset/delete-dataset','466610qESwNO','str','map','expected-count','id=','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','1516nAWjeo','Would\x20delete\x20','high-risk-write','isArray','validation','\x20dataset(s);\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','description','confirm','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','12776GuMNQV','85295XoYMen','dbtableConfig','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','delete','code','POST','dbid','465XSSEEi','appCode','Dataset\x20id','tableName','dbId','filter','1035EhLwFI','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','num','214782KQjgvy','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','dbName','dbid=','Deleted\x20','message','3035070IWeUKg','Required\x20to\x20execute\x20dataset\x20deletion','\x20dataset(s)','bool','source','relationPages','number'];a62_0x13cf=function(){return _0x3bb98c;};return a62_0x13cf();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x4cdae3(0x1df),'description':a62_0x4cdae3(0x1cc)},DBID_FLAG={'name':a62_0x4cdae3(0x1c9),'type':a62_0x4cdae3(0x1df),'description':a62_0x4cdae3(0x1d1)},CONFIRM_FLAG={'name':a62_0x4cdae3(0x1bf),'type':a62_0x4cdae3(0x1e6),'description':a62_0x4cdae3(0x1da)},EXPECTED_COUNT_FLAG={'name':a62_0x4cdae3(0x1b4),'type':a62_0x4cdae3(0x1df),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':'dataset','command':a62_0x4cdae3(0x1c6),'description':a62_0x4cdae3(0x1c0),'risk':a62_0x4cdae3(0x1b9),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x531b93){const _0x4e5854=a62_0x4cdae3,_0x2b1219=_0x531b93['num']('id'),_0x3ef47c=_0x531b93['str'](_0x4e5854(0x1c7)),_0x17200a=_0x531b93['num'](_0x4e5854(0x1c9)),_0x7a9fd5=[_0x2b1219>0x0,Boolean(_0x3ef47c),_0x17200a>0x0][_0x4e5854(0x1cf)](Boolean);if(_0x7a9fd5['length']===0x0)throw CliErrors[_0x4e5854(0x1bb)](_0x4e5854(0x1bd));if(_0x7a9fd5[_0x4e5854(0x1e0)]>0x1)throw CliErrors[_0x4e5854(0x1bb)](_0x4e5854(0x1d4));},async 'dryRun'(_0x54324a){const _0x2e7deb=a62_0x4cdae3,_0x428898=await resolveTargets(_0x54324a);return{'method':_0x2e7deb(0x1c8),'url':_0x2e7deb(0x1b0),'body':{'appCode':_0x54324a[_0x2e7deb(0x1cb)],'count':_0x428898[_0x2e7deb(0x1e0)],'datasets':_0x428898},'description':_0x2e7deb(0x1b8)+_0x428898[_0x2e7deb(0x1e0)]+_0x2e7deb(0x1c5)};},async 'execute'(_0x349be7){const _0x43eb6d=a62_0x4cdae3;if(!_0x349be7[_0x43eb6d(0x1dc)](_0x43eb6d(0x1bf)))throw CliErrors[_0x43eb6d(0x1bb)](_0x43eb6d(0x1e3),_0x43eb6d(0x1b6));const _0x15d5ad=await resolveTargets(_0x349be7),_0x3dc4e6=[],_0x9da9f5=[];for(const _0x130c1c of _0x15d5ad){try{await deleteDataset(_0x349be7[_0x43eb6d(0x1cb)],_0x130c1c['id']),_0x3dc4e6['push'](_0x130c1c);}catch(_0x4bcb0e){_0x9da9f5[_0x43eb6d(0x1e2)]({..._0x130c1c,'error':_0x4bcb0e instanceof Error?_0x4bcb0e[_0x43eb6d(0x1d8)]:String(_0x4bcb0e)});}}if(_0x9da9f5[_0x43eb6d(0x1e0)]>0x0)return{'ok':![],'data':{'requested':_0x15d5ad[_0x43eb6d(0x1e0)],'deletedCount':_0x3dc4e6['length'],'failedCount':_0x9da9f5[_0x43eb6d(0x1e0)],'deleted':_0x3dc4e6,'failed':_0x9da9f5},'message':_0x43eb6d(0x1d7)+_0x3dc4e6[_0x43eb6d(0x1e0)]+'/'+_0x15d5ad[_0x43eb6d(0x1e0)]+_0x43eb6d(0x1bc)+_0x9da9f5['length']+_0x43eb6d(0x1e1)};return{'ok':!![],'data':{'requested':_0x15d5ad['length'],'deletedCount':_0x3dc4e6[_0x43eb6d(0x1e0)],'deleted':_0x3dc4e6},'message':_0x43eb6d(0x1d7)+_0x3dc4e6['length']+_0x43eb6d(0x1db)};}};async function resolveTargets(_0x2da6b9){const _0x4624f2=a62_0x4cdae3,_0x4c0e80=_0x2da6b9[_0x4624f2(0x1d2)]('id'),_0x2e406a=_0x2da6b9[_0x4624f2(0x1b2)](_0x4624f2(0x1c7)),_0xc5b345=_0x2da6b9[_0x4624f2(0x1d2)](_0x4624f2(0x1c9));let _0x1b123d;_0x2e406a?(_0x1b123d=await listDatasets(_0x2da6b9[_0x4624f2(0x1cb)],{'code':_0x2e406a}),_0x1b123d=_0x1b123d['filter'](_0x218f43=>_0x218f43[_0x4624f2(0x1c7)]===_0x2e406a)):(_0x1b123d=await listDatasets(_0x2da6b9[_0x4624f2(0x1cb)]),_0x4c0e80>0x0&&(_0x1b123d=_0x1b123d[_0x4624f2(0x1cf)](_0x1a457e=>_0x1a457e['id']===_0x4c0e80)),_0xc5b345>0x0&&(_0x1b123d=_0x1b123d[_0x4624f2(0x1cf)](_0x1ede9a=>_0x1ede9a[_0x4624f2(0x1c4)]?.[_0x4624f2(0x1ce)]===_0xc5b345)));const _0x20fcea=_0x1b123d[_0x4624f2(0x1b3)](normalizeTarget);if(_0x20fcea[_0x4624f2(0x1e0)]===0x0){const _0x14f37a=_0x2e406a||(_0x4c0e80>0x0?_0x4624f2(0x1b5)+_0x4c0e80:_0x4624f2(0x1d6)+_0xc5b345);throw CliErrors[_0x4624f2(0x1bb)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x14f37a+'.');}const _0x5bda9d=_0x2da6b9[_0x4624f2(0x1d2)](_0x4624f2(0x1b4));if(_0x5bda9d>0x0&&_0x20fcea[_0x4624f2(0x1e0)]!==_0x5bda9d)throw CliErrors[_0x4624f2(0x1bb)]('Matched\x20'+_0x20fcea[_0x4624f2(0x1e0)]+_0x4624f2(0x1c1)+_0x5bda9d+'.');return _0x20fcea;}function normalizeTarget(_0x12e4da){const _0x4f19be=a62_0x4cdae3,_0x1b8df2=_0x12e4da[_0x4f19be(0x1c4)]??{};return{'id':_0x12e4da['id'],'code':_0x12e4da['code'],'name':_0x12e4da[_0x4f19be(0x1e5)],'description':_0x12e4da[_0x4f19be(0x1be)],'source':_0x12e4da[_0x4f19be(0x1dd)],'dbId':_0x1b8df2['dbId'],'dbName':_0x1b8df2[_0x4f19be(0x1d5)],'tableName':_0x1b8df2[_0x4f19be(0x1cd)],'relatedPageCount':Array[_0x4f19be(0x1ba)](_0x12e4da[_0x4f19be(0x1de)])?_0x12e4da[_0x4f19be(0x1de)][_0x4f19be(0x1e0)]:undefined};}
@@ -1 +1 @@
1
- const a63_0x33e88d=a63_0x48b7;function a63_0x48b7(_0x5b0029,_0x317540){_0x5b0029=_0x5b0029-0xf1;const _0x24c6dc=a63_0x24c6();let _0x48b778=_0x24c6dc[_0x5b0029];return _0x48b778;}(function(_0x16ae02,_0x59e027){const _0x176b79=a63_0x48b7,_0x4151c6=_0x16ae02();while(!![]){try{const _0xb12943=-parseInt(_0x176b79(0x130))/0x1*(-parseInt(_0x176b79(0x118))/0x2)+-parseInt(_0x176b79(0x132))/0x3*(-parseInt(_0x176b79(0x120))/0x4)+parseInt(_0x176b79(0x144))/0x5*(-parseInt(_0x176b79(0x143))/0x6)+parseInt(_0x176b79(0x11b))/0x7+-parseInt(_0x176b79(0xf6))/0x8*(parseInt(_0x176b79(0x135))/0x9)+-parseInt(_0x176b79(0x11d))/0xa+parseInt(_0x176b79(0x114))/0xb;if(_0xb12943===_0x59e027)break;else _0x4151c6['push'](_0x4151c6['shift']());}catch(_0xa7dc3d){_0x4151c6['push'](_0x4151c6['shift']());}}}(a63_0x24c6,0x74b54));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x455582){const _0x6097a2=a63_0x48b7;if(_0x455582[_0x6097a2(0x123)])return null;const _0x583940=Boolean(_0x455582[_0x6097a2(0x145)]!==undefined||_0x455582[_0x6097a2(0x12f)]!==undefined);let _0x46ea0e={};if(!_0x583940&&typeof _0x455582['extend']===_0x6097a2(0x104))try{_0x46ea0e=JSON['parse'](_0x455582['extend']);}catch{}const _0x57a9b5=_0x583940?_0x455582['name']:_0x455582[_0x6097a2(0xf3)],_0x30cd40=_0x583940?_0x455582['displayName']:_0x455582[_0x6097a2(0x140)],_0x1bdb48=_0x583940?_0x455582[_0x6097a2(0x12f)]:_0x455582[_0x6097a2(0xfc)]||_0x455582[_0x6097a2(0x107)],_0x35c2a2=_0x583940?_0x455582[_0x6097a2(0x103)]===!![]:_0x46ea0e['pkField']===!![],_0x240ec2=_0x583940?_0x455582[_0x6097a2(0x11a)]===!![]:_0x46ea0e[_0x6097a2(0x11a)]===!![],_0x36a45e=_0x583940?_0x455582['options']??null:_0x46ea0e[_0x6097a2(0x10b)]??null,_0x995060={'name':_0x57a9b5,'displayName':_0x30cd40||_0x57a9b5,'type':_0x1bdb48,'dbType':_0x455582[_0x6097a2(0x110)],'pk':_0x35c2a2,'required':_0x240ec2,'deprecated':_0x455582[_0x6097a2(0x127)]===!![],'description':_0x455582['description']||undefined};return Array[_0x6097a2(0x13f)](_0x36a45e)&&_0x36a45e['length']>0x0&&(_0x995060[_0x6097a2(0x10b)]=_0x36a45e),_0x995060;}function parseJsonMaybe(_0x506505){const _0x322dbd=a63_0x48b7;if(typeof _0x506505!==_0x322dbd(0x104))return _0x506505;try{return JSON[_0x322dbd(0xfb)](_0x506505);}catch{return _0x506505;}}function normalizeOperationEntry(_0x1f49d7,_0x3c7353){const _0x38667d=a63_0x48b7;if(!_0x3c7353||typeof _0x3c7353!==_0x38667d(0x13a))return null;if(!_0x3c7353[_0x38667d(0x137)]||!_0x3c7353[_0x38667d(0x11e)])return null;const _0x4eea48={'name':_0x1f49d7,'method':_0x3c7353['method'],'path':_0x3c7353[_0x38667d(0x11e)]};if(_0x3c7353[_0x38667d(0x105)])_0x4eea48['host']=_0x3c7353[_0x38667d(0x105)];if(_0x3c7353[_0x38667d(0x13b)]!=null){const _0x251443=parseJsonMaybe(_0x3c7353['requestBody']);_0x4eea48[_0x38667d(0x13b)]=_0x251443;}if(_0x3c7353[_0x38667d(0x136)]!=null){const _0x26eaff=parseJsonMaybe(_0x3c7353[_0x38667d(0x136)]);_0x4eea48[_0x38667d(0x136)]=_0x26eaff;}if(_0x3c7353[_0x38667d(0x12b)]!=null)_0x4eea48['beforeScriptId']=_0x3c7353['beforeScriptId'];if(_0x3c7353[_0x38667d(0x125)]!=null)_0x4eea48['afterScriptId']=_0x3c7353['afterScriptId'];if(Array['isArray'](_0x3c7353[_0x38667d(0xf9)]))_0x4eea48[_0x38667d(0xf9)]=_0x3c7353[_0x38667d(0xf9)];if(Array[_0x38667d(0x13f)](_0x3c7353[_0x38667d(0x119)]))_0x4eea48[_0x38667d(0x119)]=_0x3c7353['responseFields'];return _0x4eea48;}function a63_0x24c6(){const _0x2bead5=['type','filter','read','modelId','relationId','fields','tableName','pkField','string','host','creatorNameField','dataType','length','dbName','extend','options','dbtableConfig','toFieldLabel','createTimeField','modifierNameField','dbType','toDatasetCode','properties','relations','4154513VTZxoD','source','columnCodeListWithDeleted','toField','6FHTLhQ','responseFields','required','5672877kJuYYw','push','7384720ppoyhv','path','alias','40ejAJIG','validateRules','datasetKey','deleted','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','afterScriptId','cardinality','deprecated','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','tableComment','dblinkInfoDTO','beforeScriptId','doVersion','title','toTableName','doType','130885vfmGAJ','allFields','158481zrIpYf','formatRules','bizRelationType','117prPTdz','responseBody','method','main_sub','str','object','requestBody','allFieldNames','description','map','isArray','name','toDatasetName','indexes','90PqLZoA','177635xSOtIv','displayName','labelField','logicField','code','operations','fromField','221296ChhTyd','dbId','detail','requestFields','dataset','parse'];a63_0x24c6=function(){return _0x2bead5;};return a63_0x24c6();}function summarizeDbtable(_0x27c3ff){const _0x1e5d8c=a63_0x48b7,_0x220a17={},_0x42edc9=['dbId',_0x1e5d8c(0x109),'tableName',_0x1e5d8c(0x122),_0x1e5d8c(0x103),_0x1e5d8c(0x131),_0x1e5d8c(0xf2),_0x1e5d8c(0x10e),'updateTimeField','creatorIdField',_0x1e5d8c(0x106),'modifierIdField',_0x1e5d8c(0x10f),_0x1e5d8c(0xf1),_0x1e5d8c(0x12a)];for(const _0x19a02c of _0x42edc9){if(_0x27c3ff[_0x19a02c]!==undefined)_0x220a17[_0x19a02c]=_0x27c3ff[_0x19a02c];}return typeof _0x220a17[_0x1e5d8c(0x131)]===_0x1e5d8c(0x104)&&_0x220a17['allFields'][_0x1e5d8c(0x108)]>0x0&&(_0x220a17[_0x1e5d8c(0x13c)]=_0x220a17[_0x1e5d8c(0x131)]['split'](',')[_0x1e5d8c(0x13e)](_0x47fd17=>_0x47fd17['trim']())[_0x1e5d8c(0xfd)](Boolean)),_0x220a17;}function normalizeRelatedPages(_0x4c7be6){const _0x186143=a63_0x48b7;if(!Array['isArray'](_0x4c7be6))return[];return _0x4c7be6[_0x186143(0xfd)](_0x346adc=>_0x346adc&&typeof _0x346adc===_0x186143(0x13a))[_0x186143(0x13e)](_0x27458b=>({'id':_0x27458b['id'],'type':_0x27458b[_0x186143(0xfc)],'code':_0x27458b['code'],'title':_0x27458b[_0x186143(0x12d)],'deleted':_0x27458b[_0x186143(0x123)]===!![]}));}export const datasetDetail={'service':a63_0x33e88d(0xfa),'command':a63_0x33e88d(0xf8),'description':a63_0x33e88d(0x128),'risk':a63_0x33e88d(0xfe),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x33e88d(0x11f),'type':'string','description':a63_0x33e88d(0x124)}],async 'execute'(_0x6a4e4f){const _0x271624=a63_0x33e88d,_0x2d285f=await getDatasetDetail(_0x6a4e4f[_0x271624(0x139)](_0x271624(0xf3))),_0x25e423=Array[_0x271624(0x13f)](_0x2d285f[_0x271624(0x101)])?_0x2d285f['fields']:Array[_0x271624(0x13f)](_0x2d285f['properties'])?_0x2d285f[_0x271624(0x112)]:[],_0x3a2b97=_0x25e423[_0x271624(0x13e)](_0x105b34=>normalizeField(_0x105b34))['filter'](_0x51c0c0=>_0x51c0c0!==null),_0x501ed5=_0x2d285f[_0x271624(0xf4)]??{},_0x2ec770=[];for(const [_0x3859cb,_0x52ba56]of Object['entries'](_0x501ed5)){const _0x2e032c=normalizeOperationEntry(_0x3859cb,_0x52ba56);if(_0x2e032c)_0x2ec770[_0x271624(0x11c)](_0x2e032c);}const _0x8265ba=_0x2d285f[_0x271624(0x10c)]??{},_0x267d2e=_0x2d285f[_0x271624(0xfa)]??{},_0x39539f=_0x8265ba['dbId']!=null?{'id':_0x8265ba[_0x271624(0xf7)],'name':_0x8265ba[_0x271624(0x109)]??null}:undefined;let _0xe26eb8;return typeof _0x2d285f[_0x271624(0x10a)]===_0x271624(0x104)&&(_0xe26eb8=parseJsonMaybe(_0x2d285f[_0x271624(0x10a)])),{'ok':!![],'data':{'id':_0x2d285f[_0x271624(0xff)]??_0x2d285f['id'],'name':_0x2d285f[_0x271624(0x140)],'code':_0x2d285f['modelCode']||_0x2d285f['code'],'doVersion':_0x2d285f[_0x271624(0x12c)],'description':_0x2d285f[_0x271624(0x13d)]||_0x267d2e[_0x271624(0x129)]||undefined,'source':_0x2d285f[_0x271624(0x115)]||_0x267d2e['sourceType'],'table':_0x8265ba['tableName']||_0x267d2e['tableName'],'datasetKey':_0x8265ba['datasetKey'],'pk':_0x8265ba['pkField'],'db':_0x39539f,'dbtable':summarizeDbtable(_0x8265ba),'fields':_0x3a2b97,'operations':_0x2ec770,'indexes':Array[_0x271624(0x13f)](_0x267d2e[_0x271624(0x142)])?_0x267d2e['indexes']:[],'relations':Array[_0x271624(0x13f)](_0x2d285f[_0x271624(0x113)])?_0x2d285f['relations']['map'](_0x469e24=>({..._0x469e24[_0x271624(0x100)]!=null?{'relationId':_0x469e24['relationId']}:{},'fromDataset':_0x2d285f[_0x271624(0x140)],'fromCode':_0x2d285f['modelCode']||_0x2d285f[_0x271624(0xf3)],'fromTable':_0x8265ba[_0x271624(0x102)]||_0x267d2e[_0x271624(0x102)],'fromField':_0x469e24[_0x271624(0xf5)],'toDataset':_0x469e24[_0x271624(0x141)],'toCode':_0x469e24[_0x271624(0x111)],'toTable':_0x469e24[_0x271624(0x12e)],'toField':_0x469e24[_0x271624(0x117)],'labelField':_0x469e24[_0x271624(0x10d)]||undefined,'cardinality':_0x469e24[_0x271624(0x126)]||undefined,'bizRelationType':_0x469e24[_0x271624(0x134)]==='main_sub'?_0x271624(0x138):null})):[],'relatedPages':normalizeRelatedPages(_0x2d285f['relatedPageInfoList']),...Array[_0x271624(0x13f)](_0x2d285f[_0x271624(0x116)])?{'columnCodeListWithDeleted':_0x2d285f[_0x271624(0x116)]}:{},'formatRules':Array[_0x271624(0x13f)](_0x2d285f['formatRules'])?_0x2d285f[_0x271624(0x133)]:[],'validateRules':Array[_0x271624(0x13f)](_0x2d285f[_0x271624(0x121)])?_0x2d285f[_0x271624(0x121)]:[],..._0xe26eb8!==undefined?{'extend':_0xe26eb8}:{},'stats':{'fieldCount':_0x3a2b97[_0x271624(0x108)],'operationCount':_0x2ec770[_0x271624(0x108)]}}};}};
1
+ const a63_0x57cb21=a63_0x45e7;(function(_0x5597b1,_0x3bdd00){const _0x359fb1=a63_0x45e7,_0xf2402=_0x5597b1();while(!![]){try{const _0x372b07=-parseInt(_0x359fb1(0xba))/0x1+parseInt(_0x359fb1(0x96))/0x2+parseInt(_0x359fb1(0x7c))/0x3+parseInt(_0x359fb1(0xcc))/0x4*(parseInt(_0x359fb1(0xbe))/0x5)+parseInt(_0x359fb1(0x8f))/0x6+-parseInt(_0x359fb1(0xc9))/0x7*(parseInt(_0x359fb1(0x7e))/0x8)+-parseInt(_0x359fb1(0x80))/0x9;if(_0x372b07===_0x3bdd00)break;else _0xf2402['push'](_0xf2402['shift']());}catch(_0xd5cf8e){_0xf2402['push'](_0xf2402['shift']());}}}(a63_0xd340,0xd1b77));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x295823){const _0x263d1b=a63_0x45e7;if(_0x295823[_0x263d1b(0xac)])return null;const _0x568623=Boolean(_0x295823[_0x263d1b(0xa4)]!==undefined||_0x295823[_0x263d1b(0xa5)]!==undefined);let _0x534ff7={};if(!_0x568623&&typeof _0x295823[_0x263d1b(0xb0)]===_0x263d1b(0xc7))try{_0x534ff7=JSON[_0x263d1b(0xbc)](_0x295823[_0x263d1b(0xb0)]);}catch{}const _0x532b8e=_0x568623?_0x295823['name']:_0x295823['code'],_0x3b826b=_0x568623?_0x295823[_0x263d1b(0xa4)]:_0x295823[_0x263d1b(0xb5)],_0x4d116d=_0x568623?_0x295823[_0x263d1b(0xa5)]:_0x295823[_0x263d1b(0xa3)]||_0x295823[_0x263d1b(0x7d)],_0x573897=_0x568623?_0x295823['pkField']===!![]:_0x534ff7[_0x263d1b(0x9f)]===!![],_0x2c5d0b=_0x568623?_0x295823['required']===!![]:_0x534ff7[_0x263d1b(0xa0)]===!![],_0x1a6e23=_0x568623?_0x295823[_0x263d1b(0xc4)]??null:_0x534ff7[_0x263d1b(0xc4)]??null,_0x149c86={'name':_0x532b8e,'displayName':_0x3b826b||_0x532b8e,'type':_0x4d116d,'dbType':_0x295823[_0x263d1b(0x9a)],'pk':_0x573897,'required':_0x2c5d0b,'deprecated':_0x295823[_0x263d1b(0xca)]===!![],'description':_0x295823[_0x263d1b(0xb2)]||undefined};return Array['isArray'](_0x1a6e23)&&_0x1a6e23[_0x263d1b(0xa6)]>0x0&&(_0x149c86[_0x263d1b(0xc4)]=_0x1a6e23),_0x149c86;}function parseJsonMaybe(_0x2de4ae){const _0x5981f1=a63_0x45e7;if(typeof _0x2de4ae!==_0x5981f1(0xc7))return _0x2de4ae;try{return JSON[_0x5981f1(0xbc)](_0x2de4ae);}catch{return _0x2de4ae;}}function a63_0x45e7(_0x4626a6,_0x4946af){_0x4626a6=_0x4626a6-0x7a;const _0xd34009=a63_0xd340();let _0x45e72f=_0xd34009[_0x4626a6];return _0x45e72f;}function normalizeOperationEntry(_0x2c98c0,_0x3641ae){const _0x222c5d=a63_0x45e7;if(!_0x3641ae||typeof _0x3641ae!==_0x222c5d(0xaa))return null;if(!_0x3641ae[_0x222c5d(0xc0)]||!_0x3641ae[_0x222c5d(0xb8)])return null;const _0x4b4972={'name':_0x2c98c0,'method':_0x3641ae['method'],'path':_0x3641ae['path']};if(_0x3641ae['host'])_0x4b4972['host']=_0x3641ae[_0x222c5d(0x95)];if(_0x3641ae['requestBody']!=null){const _0x23c726=parseJsonMaybe(_0x3641ae[_0x222c5d(0x8a)]);_0x4b4972[_0x222c5d(0x8a)]=_0x23c726;}if(_0x3641ae[_0x222c5d(0x84)]!=null){const _0x57067d=parseJsonMaybe(_0x3641ae[_0x222c5d(0x84)]);_0x4b4972[_0x222c5d(0x84)]=_0x57067d;}if(_0x3641ae[_0x222c5d(0xc5)]!=null)_0x4b4972[_0x222c5d(0xc5)]=_0x3641ae['beforeScriptId'];if(_0x3641ae[_0x222c5d(0xad)]!=null)_0x4b4972[_0x222c5d(0xad)]=_0x3641ae['afterScriptId'];if(Array[_0x222c5d(0xb3)](_0x3641ae[_0x222c5d(0xa8)]))_0x4b4972[_0x222c5d(0xa8)]=_0x3641ae[_0x222c5d(0xa8)];if(Array['isArray'](_0x3641ae['responseFields']))_0x4b4972[_0x222c5d(0xbb)]=_0x3641ae[_0x222c5d(0xbb)];return _0x4b4972;}function summarizeDbtable(_0x3bdc76){const _0x29315c=a63_0x45e7,_0x29ddef={},_0x21256b=[_0x29315c(0xcb),_0x29315c(0xa1),'tableName',_0x29315c(0x9b),_0x29315c(0x9f),'allFields','logicField','createTimeField',_0x29315c(0xb4),_0x29315c(0x89),_0x29315c(0xbf),_0x29315c(0x86),_0x29315c(0xab),_0x29315c(0x87),_0x29315c(0xaf)];for(const _0x455a97 of _0x21256b){if(_0x3bdc76[_0x455a97]!==undefined)_0x29ddef[_0x455a97]=_0x3bdc76[_0x455a97];}return typeof _0x29ddef[_0x29315c(0x9c)]===_0x29315c(0xc7)&&_0x29ddef[_0x29315c(0x9c)][_0x29315c(0xa6)]>0x0&&(_0x29ddef[_0x29315c(0xc2)]=_0x29ddef[_0x29315c(0x9c)][_0x29315c(0x9d)](',')[_0x29315c(0x7f)](_0xc55320=>_0xc55320['trim']())[_0x29315c(0x82)](Boolean)),_0x29ddef;}function a63_0xd340(){const _0x545e08=['3601119bHpcZf','dataType','8YoYeRD','map','22842495XSYreM','alias','filter','fromField','responseBody','properties','modifierIdField','labelField','main_sub','creatorIdField','requestBody','code','toDatasetCode','dataset','tableName','9834456PmThjO','dbtableConfig','push','modelCode','toFieldLabel','tableComment','host','1301906iUBLsy','bizRelationType','toDatasetName','sourceType','dbType','datasetKey','allFields','split','toTableName','pkField','required','dbName','fields','type','displayName','doType','length','source','requestFields','formatRules','object','modifierNameField','deleted','afterScriptId','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','dblinkInfoDTO','extend','entries','description','isArray','updateTimeField','name','columnCodeListWithDeleted','toField','path','modelId','804902sFBvau','responseFields','parse','relatedPageInfoList','8574575TDciPC','creatorNameField','method','indexes','allFieldNames','validateRules','options','beforeScriptId','cardinality','string','relationId','7023527GkSMPT','deprecated','dbId','4bOEtxx','doVersion','relations'];a63_0xd340=function(){return _0x545e08;};return a63_0xd340();}function normalizeRelatedPages(_0x46b105){const _0x46ac37=a63_0x45e7;if(!Array['isArray'](_0x46b105))return[];return _0x46b105['filter'](_0x5c5774=>_0x5c5774&&typeof _0x5c5774===_0x46ac37(0xaa))[_0x46ac37(0x7f)](_0x57f8da=>({'id':_0x57f8da['id'],'type':_0x57f8da[_0x46ac37(0xa3)],'code':_0x57f8da[_0x46ac37(0x8b)],'title':_0x57f8da['title'],'deleted':_0x57f8da[_0x46ac37(0xac)]===!![]}));}export const datasetDetail={'service':'dataset','command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x57cb21(0x81),'type':a63_0x57cb21(0xc7),'description':a63_0x57cb21(0xae)}],async 'execute'(_0x2a826a){const _0x2ce39d=a63_0x57cb21,_0x51b003=await getDatasetDetail(_0x2a826a['str'](_0x2ce39d(0x8b))),_0x1109ac=Array['isArray'](_0x51b003[_0x2ce39d(0xa2)])?_0x51b003[_0x2ce39d(0xa2)]:Array[_0x2ce39d(0xb3)](_0x51b003[_0x2ce39d(0x85)])?_0x51b003[_0x2ce39d(0x85)]:[],_0x3cb72f=_0x1109ac[_0x2ce39d(0x7f)](_0x4747b9=>normalizeField(_0x4747b9))['filter'](_0x382b24=>_0x382b24!==null),_0x577c8a=_0x51b003['operations']??{},_0x7462a3=[];for(const [_0x2d5966,_0x4ce558]of Object[_0x2ce39d(0xb1)](_0x577c8a)){const _0x730779=normalizeOperationEntry(_0x2d5966,_0x4ce558);if(_0x730779)_0x7462a3[_0x2ce39d(0x91)](_0x730779);}const _0x1199d6=_0x51b003[_0x2ce39d(0x90)]??{},_0x580e23=_0x51b003[_0x2ce39d(0x8d)]??{},_0x2c2361=_0x1199d6['dbId']!=null?{'id':_0x1199d6[_0x2ce39d(0xcb)],'name':_0x1199d6[_0x2ce39d(0xa1)]??null}:undefined;let _0x3ff7e6;return typeof _0x51b003[_0x2ce39d(0xb0)]===_0x2ce39d(0xc7)&&(_0x3ff7e6=parseJsonMaybe(_0x51b003[_0x2ce39d(0xb0)])),{'ok':!![],'data':{'id':_0x51b003[_0x2ce39d(0xb9)]??_0x51b003['id'],'name':_0x51b003[_0x2ce39d(0xb5)],'code':_0x51b003['modelCode']||_0x51b003[_0x2ce39d(0x8b)],'doVersion':_0x51b003[_0x2ce39d(0x7a)],'description':_0x51b003[_0x2ce39d(0xb2)]||_0x580e23[_0x2ce39d(0x94)]||undefined,'source':_0x51b003[_0x2ce39d(0xa7)]||_0x580e23[_0x2ce39d(0x99)],'table':_0x1199d6[_0x2ce39d(0x8e)]||_0x580e23[_0x2ce39d(0x8e)],'datasetKey':_0x1199d6[_0x2ce39d(0x9b)],'pk':_0x1199d6[_0x2ce39d(0x9f)],'db':_0x2c2361,'dbtable':summarizeDbtable(_0x1199d6),'fields':_0x3cb72f,'operations':_0x7462a3,'indexes':Array[_0x2ce39d(0xb3)](_0x580e23[_0x2ce39d(0xc1)])?_0x580e23[_0x2ce39d(0xc1)]:[],'relations':Array['isArray'](_0x51b003[_0x2ce39d(0x7b)])?_0x51b003['relations']['map'](_0x16e0d3=>({..._0x16e0d3[_0x2ce39d(0xc8)]!=null?{'relationId':_0x16e0d3[_0x2ce39d(0xc8)]}:{},'fromDataset':_0x51b003[_0x2ce39d(0xb5)],'fromCode':_0x51b003[_0x2ce39d(0x92)]||_0x51b003[_0x2ce39d(0x8b)],'fromTable':_0x1199d6[_0x2ce39d(0x8e)]||_0x580e23[_0x2ce39d(0x8e)],'fromField':_0x16e0d3[_0x2ce39d(0x83)],'toDataset':_0x16e0d3[_0x2ce39d(0x98)],'toCode':_0x16e0d3[_0x2ce39d(0x8c)],'toTable':_0x16e0d3[_0x2ce39d(0x9e)],'toField':_0x16e0d3[_0x2ce39d(0xb7)],'labelField':_0x16e0d3[_0x2ce39d(0x93)]||undefined,'cardinality':_0x16e0d3[_0x2ce39d(0xc6)]||undefined,'bizRelationType':_0x16e0d3[_0x2ce39d(0x97)]===_0x2ce39d(0x88)?_0x2ce39d(0x88):null})):[],'relatedPages':normalizeRelatedPages(_0x51b003[_0x2ce39d(0xbd)]),...Array[_0x2ce39d(0xb3)](_0x51b003[_0x2ce39d(0xb6)])?{'columnCodeListWithDeleted':_0x51b003[_0x2ce39d(0xb6)]}:{},'formatRules':Array['isArray'](_0x51b003[_0x2ce39d(0xa9)])?_0x51b003[_0x2ce39d(0xa9)]:[],'validateRules':Array[_0x2ce39d(0xb3)](_0x51b003[_0x2ce39d(0xc3)])?_0x51b003[_0x2ce39d(0xc3)]:[],..._0x3ff7e6!==undefined?{'extend':_0x3ff7e6}:{},'stats':{'fieldCount':_0x3cb72f[_0x2ce39d(0xa6)],'operationCount':_0x7462a3[_0x2ce39d(0xa6)]}}};}};
@@ -1 +1 @@
1
- const a64_0x5e8c2e=a64_0x3047;(function(_0x101a3c,_0x6ab068){const _0x4e68f0=a64_0x3047,_0x593e08=_0x101a3c();while(!![]){try{const _0x405fd7=-parseInt(_0x4e68f0(0xf5))/0x1+-parseInt(_0x4e68f0(0xfc))/0x2+-parseInt(_0x4e68f0(0xe0))/0x3*(parseInt(_0x4e68f0(0xe6))/0x4)+parseInt(_0x4e68f0(0x10e))/0x5*(parseInt(_0x4e68f0(0xdb))/0x6)+parseInt(_0x4e68f0(0x119))/0x7+-parseInt(_0x4e68f0(0xf8))/0x8*(-parseInt(_0x4e68f0(0x115))/0x9)+-parseInt(_0x4e68f0(0xe4))/0xa;if(_0x405fd7===_0x6ab068)break;else _0x593e08['push'](_0x593e08['shift']());}catch(_0x5e5f7a){_0x593e08['push'](_0x593e08['shift']());}}}(a64_0x523f,0x6bbf3));function a64_0x3047(_0x33796e,_0x5c1599){_0x33796e=_0x33796e-0xda;const _0x523f38=a64_0x523f();let _0x3047cd=_0x523f38[_0x33796e];return _0x3047cd;}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':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a64_0x5e8c2e(0xdd)}]]);export function parseJsonObjectFlag(_0x455775,_0x2debf0){const _0x224a58=a64_0x5e8c2e;if(!_0x455775)return undefined;let _0x3578a1;try{_0x3578a1=JSON['parse'](_0x455775);}catch(_0xd0b9bc){const _0x15db3d=_0xd0b9bc instanceof Error?_0xd0b9bc[_0x224a58(0x10d)]:String(_0xd0b9bc);throw CliErrors[_0x224a58(0x106)](_0x2debf0+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x15db3d);}if(!isPlainObject(_0x3578a1)||Array[_0x224a58(0xdf)](_0x3578a1))throw CliErrors[_0x224a58(0x106)](_0x2debf0+_0x224a58(0x116));return _0x3578a1;}export function validateExtendPatchKeys(_0x2f12e8){const _0x12e908=a64_0x5e8c2e,_0x1457e0=Object[_0x12e908(0xea)](_0x2f12e8);if(_0x1457e0['length']===0x0)throw CliErrors['validation'](_0x12e908(0xe3));for(const _0x5560eb of _0x1457e0){const _0x9698a6=EXTEND_PATCH_REDIRECTS['get'](_0x5560eb);if(_0x9698a6)throw CliErrors['validation'](_0x9698a6[_0x12e908(0x10d)],_0x9698a6[_0x12e908(0xeb)]);if(!MUTABLE_EXTEND_KEYS[_0x12e908(0xe7)](_0x5560eb))throw CliErrors[_0x12e908(0x106)](_0x12e908(0xee)+_0x5560eb,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x1723e7=a64_0x5e8c2e,_0x4f6f13=Array[_0x1723e7(0xf3)](MUTABLE_EXTEND_KEYS)[_0x1723e7(0xe9)]();return _0x4f6f13[_0x1723e7(0x10f)]>0x0?_0x1723e7(0x10a)+_0x4f6f13[_0x1723e7(0xed)](',\x20'):_0x1723e7(0x10b);}export function applyExtendPatch(_0x2e3c0c,_0x25368a){const _0x17d804=a64_0x5e8c2e;validateExtendPatchKeys(_0x25368a);const _0x2c5442=deepClone(_0x2e3c0c),_0x3e8d25=[];for(const [_0x5bf49c,_0x5a5a4c]of Object[_0x17d804(0xe5)](_0x25368a)){const _0x3f8c62=_0x2c5442[_0x5bf49c],_0x45c81=deepClone(_0x5a5a4c);!deepEqual(_0x3f8c62,_0x45c81)&&(_0x2c5442[_0x5bf49c]=_0x45c81,_0x3e8d25[_0x17d804(0x114)](_0x17d804(0xdc)+_0x5bf49c));}return _0x3e8d25['sort'](),{'after':_0x2c5442,'changedPaths':_0x3e8d25,'changed':_0x3e8d25[_0x17d804(0x10f)]>0x0};}export function assertExpectation(_0x5221ed,_0x2a4e90){const _0x33af8b=a64_0x5e8c2e;if(!_0x2a4e90)return;for(const [_0x9f400b,_0x81fb4c]of Object[_0x33af8b(0xe5)](_0x2a4e90)){const _0x7719c6=_0x5221ed[_0x9f400b];if(!deepEqual(_0x7719c6,_0x81fb4c))throw CliErrors[_0x33af8b(0x106)](_0x33af8b(0x102)+_0x9f400b,_0x33af8b(0x113)+JSON['stringify'](_0x81fb4c)+_0x33af8b(0xf7)+JSON[_0x33af8b(0xe1)](_0x7719c6));}}export async function buildDatasetExtendUpdateResult({appCode:_0x484e46,input:_0x10153b,dryRun:_0x79f81f}){const _0x3a4de1=a64_0x5e8c2e;validateInput(_0x10153b);const _0x294b1c=await getDatasetDetail(_0x10153b['code']),_0x4611fe=parseDatasetExtend(_0x294b1c[_0x3a4de1(0xfe)]),_0x6e77e=deepClone(_0x4611fe['value']);assertExpectation(_0x6e77e,_0x10153b[_0x3a4de1(0x109)]);const {after:_0x20c1e1,changedPaths:_0x226faa,changed:_0x89a01b}=applyExtendPatch(_0x6e77e,_0x10153b[_0x3a4de1(0xef)]),_0x44c962=summarizeDataset(_0x294b1c,_0x10153b[_0x3a4de1(0xe8)]);return _0x89a01b&&!_0x79f81f&&(_0x294b1c[_0x3a4de1(0xfe)]=serializeDatasetExtend(_0x20c1e1,_0x4611fe['shape']),await updateDrivenData(_0x294b1c)),{'ok':!![],'data':{'appCode':_0x484e46,'selector':{'code':_0x10153b[_0x3a4de1(0xe8)]},'dataset':_0x44c962,'dryRun':_0x79f81f,'changed':_0x89a01b,'changedPaths':_0x226faa,'before':{'extend':_0x6e77e},'after':{'extend':_0x20c1e1},'submitted':_0x89a01b&&!_0x79f81f},'message':_0x89a01b?_0x79f81f?_0x3a4de1(0x107)+_0x226faa['join'](',\x20')+')':_0x3a4de1(0xfa)+_0x226faa[_0x3a4de1(0xed)](',\x20')+')':_0x3a4de1(0x117)};}export const datasetExtendUpdate={'service':a64_0x5e8c2e(0xff),'command':'extend-update','description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a64_0x5e8c2e(0x100),'flags':[CODE_FLAG,{'name':a64_0x5e8c2e(0x11a),'type':a64_0x5e8c2e(0xf6),'required':!![],'description':a64_0x5e8c2e(0x112)},{'name':a64_0x5e8c2e(0xf9),'type':'string','required':![],'description':a64_0x5e8c2e(0xf0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x62004d){validateInput(readExtendUpdateInput(_0x62004d));},async 'dryRun'(_0x374698){const _0x4d17da=a64_0x5e8c2e,_0x3f0aa5=await buildDatasetExtendUpdateResult({'appCode':_0x374698[_0x4d17da(0x104)],'input':readExtendUpdateInput(_0x374698),'dryRun':!![]});return{'method':_0x4d17da(0x108),'url':_0x4d17da(0xfd),'body':_0x3f0aa5['data'],'description':_0x3f0aa5[_0x4d17da(0x10d)]};},async 'execute'(_0x240e20){const _0x527abc=a64_0x5e8c2e;return buildDatasetExtendUpdateResult({'appCode':_0x240e20[_0x527abc(0x104)],'input':readExtendUpdateInput(_0x240e20),'dryRun':![]});}};function readExtendUpdateInput(_0x39e074){const _0x53c7cc=a64_0x5e8c2e,_0x29a408=trim(_0x39e074[_0x53c7cc(0x111)](_0x53c7cc(0xe8))),_0x2b1a1d=parseJsonObjectFlag(_0x39e074[_0x53c7cc(0x111)](_0x53c7cc(0x11a)),_0x53c7cc(0x10c)),_0x343b74=parseJsonObjectFlag(_0x39e074[_0x53c7cc(0x111)]('expect-json'),_0x53c7cc(0x110));return{'code':_0x29a408,'patch':_0x2b1a1d||{},'expect':_0x343b74};}function a64_0x523f(){const _0x1478ae=['expect','Allowed\x20keys:\x20','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','--patch-json','message','2961290xenGMe','length','--expect-json','str','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','Expected\x20','push','1054206cmNNzw','\x20must\x20be\x20a\x20JSON\x20object','No\x20changes\x20for\x20dataset\x20extend','tableName','5941733NRHtaY','patch-json','parse','6rhVabd','extend.','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','dbName','isArray','166818iDerbv','stringify','dbId','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','7442910xNdRxj','entries','24cEcXcR','has','code','sort','keys','hint','object','join','Unsupported\x20patch\x20key:\x20','patch','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','name','datasetCode','from','--code\x20is\x20required','77174SGekIG','string',',\x20actual\x20','40ftQEAo','expect-json','Updated\x20dataset\x20extend\x20(','modelId','860630uvULxK','/smartapi/dataset/update-driven-data','extend','dataset','write','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','Expectation\x20mismatch\x20at\x20extend.','trim','appCode','dbtableConfig','validation','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','POST'];a64_0x523f=function(){return _0x1478ae;};return a64_0x523f();}function validateInput(_0x1eb9df){const _0x48cefb=a64_0x5e8c2e;if(!_0x1eb9df[_0x48cefb(0xe8)])throw CliErrors[_0x48cefb(0x106)](_0x48cefb(0xf4));validateExtendPatchKeys(_0x1eb9df[_0x48cefb(0xef)]);}function parseDatasetExtend(_0x353fd8){const _0x329115=a64_0x5e8c2e;if(typeof _0x353fd8==='string'){const _0xa8bf03=_0x353fd8[_0x329115(0x103)]();if(!_0xa8bf03)return{'value':{},'shape':_0x329115(0xf6)};let _0x498846;try{_0x498846=JSON[_0x329115(0xda)](_0xa8bf03);}catch(_0x2444be){const _0x2908ad=_0x2444be instanceof Error?_0x2444be[_0x329115(0x10d)]:String(_0x2444be);throw CliErrors[_0x329115(0x106)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x2908ad);}if(!isPlainObject(_0x498846)||Array['isArray'](_0x498846))throw CliErrors[_0x329115(0x106)](_0x329115(0x101));return{'value':_0x498846,'shape':_0x329115(0xf6)};}if(_0x353fd8===undefined||_0x353fd8===null)return{'value':{},'shape':_0x329115(0xf6)};if(!isPlainObject(_0x353fd8)||Array[_0x329115(0xdf)](_0x353fd8))throw CliErrors[_0x329115(0x106)](_0x329115(0x101));return{'value':_0x353fd8,'shape':_0x329115(0xec)};}function serializeDatasetExtend(_0x53c835,_0x32ee61){const _0x3a7b3f=a64_0x5e8c2e;return _0x32ee61===_0x3a7b3f(0xf6)?JSON[_0x3a7b3f(0xe1)](_0x53c835):_0x53c835;}function summarizeDataset(_0x1aac54,_0x5d3862){const _0x1922e8=a64_0x5e8c2e,_0x5eddf0=isPlainObject(_0x1aac54[_0x1922e8(0xff)])?_0x1aac54[_0x1922e8(0xff)]:{},_0x57ceab=isPlainObject(_0x1aac54[_0x1922e8(0x105)])?_0x1aac54[_0x1922e8(0x105)]:{};return{'id':_0x1aac54[_0x1922e8(0xfb)]??_0x1aac54['id']??_0x5eddf0['datasetId']??null,'code':_0x1aac54['modelCode']??_0x1aac54['code']??_0x5eddf0[_0x1922e8(0xf2)]??_0x5d3862,'name':_0x1aac54[_0x1922e8(0xf1)]??_0x5eddf0['datasetName']??null,'table':_0x57ceab[_0x1922e8(0x118)]??_0x5eddf0[_0x1922e8(0x118)]??null,'db':_0x57ceab[_0x1922e8(0xde)]??_0x57ceab[_0x1922e8(0xe2)]??null};}function deepClone(_0x105f06){const _0x2cffda=a64_0x5e8c2e;if(_0x105f06===undefined)return _0x105f06;return JSON[_0x2cffda(0xda)](JSON['stringify'](_0x105f06));}function deepEqual(_0x4f9582,_0x58c18f){const _0x46f83c=a64_0x5e8c2e;return JSON['stringify'](_0x4f9582)===JSON[_0x46f83c(0xe1)](_0x58c18f);}function isPlainObject(_0x22f148){const _0x20a7af=a64_0x5e8c2e;return Boolean(_0x22f148)&&typeof _0x22f148===_0x20a7af(0xec)&&!Array['isArray'](_0x22f148);}function trim(_0x2aa1cf){const _0x3997e6=a64_0x5e8c2e,_0x1b4e56=String(_0x2aa1cf||'')[_0x3997e6(0x103)]();return _0x1b4e56;}
1
+ const a64_0x35b0ce=a64_0x247a;function a64_0x440d(){const _0x2f5c64=['expect-json','614IlofOV','--patch-json','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','datasetName','patch-json','string','length','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','keys','--code\x20is\x20required','datasetCode','\x20must\x20be\x20valid\x20JSON\x20object:\x20','value','56gYDIcm','1318508GYmzCg','649tAwdgE','data','\x20must\x20be\x20a\x20JSON\x20object','1643845GTgcSn','6dZbvDS','from','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','565FOobgJ','extend-update','hint','extend.','modelId','/smartapi/dataset/update-driven-data','trim','validation','186753RjKHyQ','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','sort','isArray','Patch\x20dataset\x20top-level\x20extend\x20safely','Unsupported\x20patch\x20key:\x20','code','195036GhTJqE','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','shape','message','join','576015vgHtlx','write','entries','patch','expect','stringify','push','object','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','parse','name','Expected\x20','modelCode','2870QursMR','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','extend','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','1593PkMfAl','Updated\x20dataset\x20extend\x20(','appCode','has','dataset','dbtableConfig','str','dbId'];a64_0x440d=function(){return _0x2f5c64;};return a64_0x440d();}(function(_0x21a6b0,_0x372619){const _0x360085=a64_0x247a,_0x164069=_0x21a6b0();while(!![]){try{const _0x597360=-parseInt(_0x360085(0x1b4))/0x1*(parseInt(_0x360085(0x1e2))/0x2)+parseInt(_0x360085(0x1c8))/0x3+-parseInt(_0x360085(0x1f0))/0x4+-parseInt(_0x360085(0x1f4))/0x5*(parseInt(_0x360085(0x1f5))/0x6)+-parseInt(_0x360085(0x1bc))/0x7*(parseInt(_0x360085(0x1ef))/0x8)+parseInt(_0x360085(0x1d9))/0x9*(parseInt(_0x360085(0x1d5))/0xa)+-parseInt(_0x360085(0x1f1))/0xb*(-parseInt(_0x360085(0x1c3))/0xc);if(_0x597360===_0x372619)break;else _0x164069['push'](_0x164069['shift']());}catch(_0x469196){_0x164069['push'](_0x164069['shift']());}}}(a64_0x440d,0x2cb57));function a64_0x247a(_0xca0ee,_0x364718){_0xca0ee=_0xca0ee-0x1b4;const _0x440dc6=a64_0x440d();let _0x247a9f=_0x440dc6[_0xca0ee];return _0x247a9f;}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':a64_0x35b0ce(0x1e4),'hint':a64_0x35b0ce(0x1f7)}]]);export function parseJsonObjectFlag(_0x92de40,_0x109645){const _0x4310d5=a64_0x35b0ce;if(!_0x92de40)return undefined;let _0x493954;try{_0x493954=JSON['parse'](_0x92de40);}catch(_0x270559){const _0x4d9335=_0x270559 instanceof Error?_0x270559[_0x4310d5(0x1c6)]:String(_0x270559);throw CliErrors[_0x4310d5(0x1bb)](_0x109645+_0x4310d5(0x1ed)+_0x4d9335);}if(!isPlainObject(_0x493954)||Array[_0x4310d5(0x1bf)](_0x493954))throw CliErrors['validation'](_0x109645+_0x4310d5(0x1f3));return _0x493954;}export function validateExtendPatchKeys(_0x4e6f91){const _0x40f453=a64_0x35b0ce,_0x51e64a=Object[_0x40f453(0x1ea)](_0x4e6f91);if(_0x51e64a[_0x40f453(0x1e8)]===0x0)throw CliErrors['validation'](_0x40f453(0x1c4));for(const _0xaf64e3 of _0x51e64a){const _0x1aa6ca=EXTEND_PATCH_REDIRECTS['get'](_0xaf64e3);if(_0x1aa6ca)throw CliErrors[_0x40f453(0x1bb)](_0x1aa6ca[_0x40f453(0x1c6)],_0x1aa6ca[_0x40f453(0x1b6)]);if(!MUTABLE_EXTEND_KEYS[_0x40f453(0x1dc)](_0xaf64e3))throw CliErrors[_0x40f453(0x1bb)](_0x40f453(0x1c1)+_0xaf64e3,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x13b337=a64_0x35b0ce,_0x239ae8=Array[_0x13b337(0x1f6)](MUTABLE_EXTEND_KEYS)[_0x13b337(0x1be)]();return _0x239ae8[_0x13b337(0x1e8)]>0x0?'Allowed\x20keys:\x20'+_0x239ae8[_0x13b337(0x1c7)](',\x20'):_0x13b337(0x1bd);}export function applyExtendPatch(_0x41ca29,_0x4663e5){const _0x38bedc=a64_0x35b0ce;validateExtendPatchKeys(_0x4663e5);const _0x203cc2=deepClone(_0x41ca29),_0x2cf0aa=[];for(const [_0x2c3b7e,_0x2c4382]of Object[_0x38bedc(0x1ca)](_0x4663e5)){const _0x35318b=_0x203cc2[_0x2c3b7e],_0x22abb8=deepClone(_0x2c4382);!deepEqual(_0x35318b,_0x22abb8)&&(_0x203cc2[_0x2c3b7e]=_0x22abb8,_0x2cf0aa[_0x38bedc(0x1ce)](_0x38bedc(0x1b7)+_0x2c3b7e));}return _0x2cf0aa[_0x38bedc(0x1be)](),{'after':_0x203cc2,'changedPaths':_0x2cf0aa,'changed':_0x2cf0aa[_0x38bedc(0x1e8)]>0x0};}export function assertExpectation(_0x1d210c,_0x54a0e5){const _0xaf8749=a64_0x35b0ce;if(!_0x54a0e5)return;for(const [_0x2c8a4a,_0x5b5690]of Object[_0xaf8749(0x1ca)](_0x54a0e5)){const _0x4925bd=_0x1d210c[_0x2c8a4a];if(!deepEqual(_0x4925bd,_0x5b5690))throw CliErrors[_0xaf8749(0x1bb)]('Expectation\x20mismatch\x20at\x20extend.'+_0x2c8a4a,_0xaf8749(0x1d3)+JSON[_0xaf8749(0x1cd)](_0x5b5690)+',\x20actual\x20'+JSON[_0xaf8749(0x1cd)](_0x4925bd));}}export async function buildDatasetExtendUpdateResult({appCode:_0x4b8156,input:_0x459827,dryRun:_0x1db283}){const _0x4f1c41=a64_0x35b0ce;validateInput(_0x459827);const _0x5c80b2=await getDatasetDetail(_0x459827[_0x4f1c41(0x1c2)]),_0x1355cc=parseDatasetExtend(_0x5c80b2[_0x4f1c41(0x1d7)]),_0x273bfd=deepClone(_0x1355cc[_0x4f1c41(0x1ee)]);assertExpectation(_0x273bfd,_0x459827[_0x4f1c41(0x1cc)]);const {after:_0x39e49d,changedPaths:_0x38e52e,changed:_0xaaef5d}=applyExtendPatch(_0x273bfd,_0x459827[_0x4f1c41(0x1cb)]),_0x6a922=summarizeDataset(_0x5c80b2,_0x459827['code']);return _0xaaef5d&&!_0x1db283&&(_0x5c80b2[_0x4f1c41(0x1d7)]=serializeDatasetExtend(_0x39e49d,_0x1355cc[_0x4f1c41(0x1c5)]),await updateDrivenData(_0x5c80b2)),{'ok':!![],'data':{'appCode':_0x4b8156,'selector':{'code':_0x459827[_0x4f1c41(0x1c2)]},'dataset':_0x6a922,'dryRun':_0x1db283,'changed':_0xaaef5d,'changedPaths':_0x38e52e,'before':{'extend':_0x273bfd},'after':{'extend':_0x39e49d},'submitted':_0xaaef5d&&!_0x1db283},'message':_0xaaef5d?_0x1db283?_0x4f1c41(0x1d6)+_0x38e52e[_0x4f1c41(0x1c7)](',\x20')+')':_0x4f1c41(0x1da)+_0x38e52e[_0x4f1c41(0x1c7)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a64_0x35b0ce(0x1dd),'command':a64_0x35b0ce(0x1b5),'description':a64_0x35b0ce(0x1c0),'risk':a64_0x35b0ce(0x1c9),'flags':[CODE_FLAG,{'name':a64_0x35b0ce(0x1e6),'type':'string','required':!![],'description':a64_0x35b0ce(0x1d0)},{'name':a64_0x35b0ce(0x1e1),'type':a64_0x35b0ce(0x1e7),'required':![],'description':a64_0x35b0ce(0x1d8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29a5f5){validateInput(readExtendUpdateInput(_0x29a5f5));},async 'dryRun'(_0x510907){const _0xe1bc97=a64_0x35b0ce,_0x50ea19=await buildDatasetExtendUpdateResult({'appCode':_0x510907[_0xe1bc97(0x1db)],'input':readExtendUpdateInput(_0x510907),'dryRun':!![]});return{'method':'POST','url':_0xe1bc97(0x1b9),'body':_0x50ea19[_0xe1bc97(0x1f2)],'description':_0x50ea19[_0xe1bc97(0x1c6)]};},async 'execute'(_0x364b6e){const _0x1fba35=a64_0x35b0ce;return buildDatasetExtendUpdateResult({'appCode':_0x364b6e[_0x1fba35(0x1db)],'input':readExtendUpdateInput(_0x364b6e),'dryRun':![]});}};function readExtendUpdateInput(_0x1fdff9){const _0x5807b0=a64_0x35b0ce,_0x1b7b71=trim(_0x1fdff9['str'](_0x5807b0(0x1c2))),_0x109f6a=parseJsonObjectFlag(_0x1fdff9[_0x5807b0(0x1df)](_0x5807b0(0x1e6)),_0x5807b0(0x1e3)),_0x168256=parseJsonObjectFlag(_0x1fdff9[_0x5807b0(0x1df)](_0x5807b0(0x1e1)),'--expect-json');return{'code':_0x1b7b71,'patch':_0x109f6a||{},'expect':_0x168256};}function validateInput(_0x5d06a2){const _0xec08e6=a64_0x35b0ce;if(!_0x5d06a2[_0xec08e6(0x1c2)])throw CliErrors['validation'](_0xec08e6(0x1eb));validateExtendPatchKeys(_0x5d06a2[_0xec08e6(0x1cb)]);}function parseDatasetExtend(_0xb74034){const _0x576b93=a64_0x35b0ce;if(typeof _0xb74034===_0x576b93(0x1e7)){const _0x46bf99=_0xb74034[_0x576b93(0x1ba)]();if(!_0x46bf99)return{'value':{},'shape':_0x576b93(0x1e7)};let _0x45d202;try{_0x45d202=JSON[_0x576b93(0x1d1)](_0x46bf99);}catch(_0x355f70){const _0x5f2f14=_0x355f70 instanceof Error?_0x355f70['message']:String(_0x355f70);throw CliErrors[_0x576b93(0x1bb)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x5f2f14);}if(!isPlainObject(_0x45d202)||Array[_0x576b93(0x1bf)](_0x45d202))throw CliErrors[_0x576b93(0x1bb)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x45d202,'shape':_0x576b93(0x1e7)};}if(_0xb74034===undefined||_0xb74034===null)return{'value':{},'shape':_0x576b93(0x1e7)};if(!isPlainObject(_0xb74034)||Array[_0x576b93(0x1bf)](_0xb74034))throw CliErrors['validation'](_0x576b93(0x1e9));return{'value':_0xb74034,'shape':'object'};}function serializeDatasetExtend(_0x25774a,_0x57368f){return _0x57368f==='string'?JSON['stringify'](_0x25774a):_0x25774a;}function summarizeDataset(_0x2edf0c,_0x1a358c){const _0x20b979=a64_0x35b0ce,_0x5d4827=isPlainObject(_0x2edf0c[_0x20b979(0x1dd)])?_0x2edf0c[_0x20b979(0x1dd)]:{},_0x5e0ce4=isPlainObject(_0x2edf0c[_0x20b979(0x1de)])?_0x2edf0c[_0x20b979(0x1de)]:{};return{'id':_0x2edf0c[_0x20b979(0x1b8)]??_0x2edf0c['id']??_0x5d4827['datasetId']??null,'code':_0x2edf0c[_0x20b979(0x1d4)]??_0x2edf0c[_0x20b979(0x1c2)]??_0x5d4827[_0x20b979(0x1ec)]??_0x1a358c,'name':_0x2edf0c[_0x20b979(0x1d2)]??_0x5d4827[_0x20b979(0x1e5)]??null,'table':_0x5e0ce4['tableName']??_0x5d4827['tableName']??null,'db':_0x5e0ce4['dbName']??_0x5e0ce4[_0x20b979(0x1e0)]??null};}function deepClone(_0x36e3e7){const _0x2e7656=a64_0x35b0ce;if(_0x36e3e7===undefined)return _0x36e3e7;return JSON[_0x2e7656(0x1d1)](JSON[_0x2e7656(0x1cd)](_0x36e3e7));}function deepEqual(_0x399286,_0x2225f6){const _0x4c5faa=a64_0x35b0ce;return JSON[_0x4c5faa(0x1cd)](_0x399286)===JSON[_0x4c5faa(0x1cd)](_0x2225f6);}function isPlainObject(_0x2d6d90){const _0x5ad6af=a64_0x35b0ce;return Boolean(_0x2d6d90)&&typeof _0x2d6d90===_0x5ad6af(0x1cf)&&!Array[_0x5ad6af(0x1bf)](_0x2d6d90);}function trim(_0xd331bc){const _0x4edb7d=String(_0xd331bc||'')['trim']();return _0x4edb7d;}
@@ -1 +1 @@
1
- const a65_0x56b673=a65_0x523e;(function(_0x437854,_0xba305f){const _0x5d9642=a65_0x523e,_0x8db4af=_0x437854();while(!![]){try{const _0x13833c=parseInt(_0x5d9642(0x1de))/0x1*(-parseInt(_0x5d9642(0x1bf))/0x2)+-parseInt(_0x5d9642(0x1eb))/0x3*(parseInt(_0x5d9642(0x1fc))/0x4)+-parseInt(_0x5d9642(0x1b5))/0x5+-parseInt(_0x5d9642(0x1f7))/0x6*(parseInt(_0x5d9642(0x1b3))/0x7)+parseInt(_0x5d9642(0x1cf))/0x8+-parseInt(_0x5d9642(0x1ca))/0x9*(-parseInt(_0x5d9642(0x1fd))/0xa)+parseInt(_0x5d9642(0x1f9))/0xb;if(_0x13833c===_0xba305f)break;else _0x8db4af['push'](_0x8db4af['shift']());}catch(_0x5255ea){_0x8db4af['push'](_0x8db4af['shift']());}}}(a65_0x316a,0xcc193));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',a65_0x56b673(0x1cc),'description',a65_0x56b673(0x202),a65_0x56b673(0x1f4),a65_0x56b673(0x1df),a65_0x56b673(0x1f3),a65_0x56b673(0x1c5),a65_0x56b673(0x1dc)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name',a65_0x56b673(0x201),a65_0x56b673(0x1f8),a65_0x56b673(0x1e4),'dbTypeScale',a65_0x56b673(0x1cd),a65_0x56b673(0x1e9),a65_0x56b673(0x1c7),a65_0x56b673(0x1b1),a65_0x56b673(0x1f5),a65_0x56b673(0x1fa)]);export function parseJsonObjectFlag(_0x422231,_0x3f7e00){const _0x1b7c7c=a65_0x56b673;if(!_0x422231)return undefined;let _0x5af98c;try{_0x5af98c=JSON[_0x1b7c7c(0x1db)](_0x422231);}catch(_0x53f539){const _0x2c35dd=_0x53f539 instanceof Error?_0x53f539[_0x1b7c7c(0x1b4)]:String(_0x53f539);throw CliErrors['validation'](_0x3f7e00+_0x1b7c7c(0x1d1)+_0x2c35dd);}if(!isPlainObject(_0x5af98c)||Array['isArray'](_0x5af98c))throw CliErrors[_0x1b7c7c(0x1e1)](_0x3f7e00+'\x20must\x20be\x20a\x20JSON\x20object');return _0x5af98c;}export function validatePatchKeys(_0x34b305){const _0x1433b4=a65_0x56b673,_0x57d583=Object['keys'](_0x34b305);if(_0x57d583[_0x1433b4(0x1e5)]===0x0)throw CliErrors[_0x1433b4(0x1e1)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x8bb3da of _0x57d583){if(FORBIDDEN_FIELD_KEYS[_0x1433b4(0x1c2)](_0x8bb3da))throw CliErrors['validation']('Forbidden\x20patch\x20key:\x20'+_0x8bb3da);if(!MUTABLE_FIELD_KEYS[_0x1433b4(0x1c2)](_0x8bb3da))throw CliErrors[_0x1433b4(0x1e1)]('Unsupported\x20patch\x20key:\x20'+_0x8bb3da,'Allowed\x20keys:\x20'+Array[_0x1433b4(0x1c1)](MUTABLE_FIELD_KEYS)[_0x1433b4(0x1f1)](',\x20'));}}export function applyFieldPatch(_0x257bf4,_0x17e9d7){const _0x444db4=a65_0x56b673;validatePatchKeys(_0x17e9d7);const _0x47a597=deepClone(_0x257bf4),_0x4c20a2=new Set();for(const [_0x1a95a0,_0xf191b7]of Object[_0x444db4(0x1bb)](_0x17e9d7)){const _0x8932b0=_0x47a597[_0x1a95a0],_0x10f680=mergePatchValue(_0x8932b0,_0xf191b7);!deepEqual(_0x8932b0,_0x10f680)&&(_0x47a597[_0x1a95a0]=_0x10f680,_0x4c20a2[_0x444db4(0x1b9)](_0x1a95a0),collectChangedPaths(_0x1a95a0,_0x8932b0,_0x10f680,_0x4c20a2));}return{'after':_0x47a597,'changedPaths':Array['from'](_0x4c20a2)[_0x444db4(0x1ea)](),'changed':_0x4c20a2[_0x444db4(0x1bd)]>0x0};}export function assertExpectation(_0x4338df,_0x1134df){const _0x574720=a65_0x56b673;if(!_0x1134df)return;for(const [_0xf4d4ba,_0x7580d2]of Object[_0x574720(0x1bb)](_0x1134df)){const _0x4d9ee5=_0x4338df[_0xf4d4ba];if(!deepEqual(_0x4d9ee5,_0x7580d2))throw CliErrors['validation'](_0x574720(0x1d2)+_0xf4d4ba,_0x574720(0x1ce)+JSON['stringify'](_0x7580d2)+_0x574720(0x1da)+JSON[_0x574720(0x1cb)](_0x4d9ee5));}}function a65_0x523e(_0x32e986,_0x5ceb41){_0x32e986=_0x32e986-0x1b1;const _0x316a4b=a65_0x316a();let _0x523efd=_0x316a4b[_0x32e986];return _0x523efd;}export async function buildDatasetFieldUpdateResult({appCode:_0x1ab942,input:_0x536d91,dryRun:_0x542dd9}){const _0x5d2459=a65_0x56b673;validateInput(_0x536d91);const _0x5472d4=await getDatasetDetail(_0x536d91[_0x5d2459(0x201)]),_0x48fe89=readFieldArray(_0x5472d4),_0x1b0a5e=_0x48fe89[_0x5d2459(0x1e6)](_0x136d17=>_0x136d17?.[_0x5d2459(0x1e0)]===_0x536d91[_0x5d2459(0x1c9)]);if(_0x1b0a5e<0x0)throw CliErrors[_0x5d2459(0x1e1)](_0x5d2459(0x1b2)+_0x536d91[_0x5d2459(0x1c9)]);const _0x1ae293=deepClone(_0x48fe89[_0x1b0a5e]);assertExpectation(_0x1ae293,_0x536d91[_0x5d2459(0x1d4)]);const {after:_0x2fcbb7,changedPaths:_0xbaba10,changed:_0x3e8bfe}=applyFieldPatch(_0x1ae293,_0x536d91[_0x5d2459(0x1d3)]),_0x340642=summarizeDataset(_0x5472d4,_0x536d91[_0x5d2459(0x201)]);return _0x3e8bfe&&!_0x542dd9&&(_0x48fe89[_0x1b0a5e]=_0x2fcbb7,await updateDrivenData(_0x5472d4)),{'ok':!![],'data':{'appCode':_0x1ab942,'selector':{'code':_0x536d91[_0x5d2459(0x201)]},'dataset':_0x340642,'field':{'id':_0x1ae293['id']??null,'name':_0x1ae293['name']},'dryRun':_0x542dd9,'changed':_0x3e8bfe,'changedPaths':_0xbaba10,'before':_0x1ae293,'after':_0x2fcbb7,'submitted':_0x3e8bfe&&!_0x542dd9},'message':_0x3e8bfe?_0x542dd9?'Dry-run:\x20dataset\x20field\x20'+_0x536d91['field']+_0x5d2459(0x1ed)+_0xbaba10[_0x5d2459(0x1f1)](',\x20')+')':_0x5d2459(0x1bc)+_0x536d91[_0x5d2459(0x1c9)]+'\x20('+_0xbaba10[_0x5d2459(0x1f1)](',\x20')+')':_0x5d2459(0x1d9)+_0x536d91['field']};}export const datasetFieldUpdate={'service':a65_0x56b673(0x1d8),'command':'field-update','description':a65_0x56b673(0x1d6),'risk':a65_0x56b673(0x1c4),'flags':[CODE_FLAG,{'name':a65_0x56b673(0x1c9),'type':a65_0x56b673(0x1be),'required':!![],'description':a65_0x56b673(0x1c3)},{'name':'patch-json','type':'string','required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a65_0x56b673(0x1c6),'type':a65_0x56b673(0x1be),'required':![],'description':a65_0x56b673(0x1fe)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x21baa8){validateInput(readFieldUpdateInput(_0x21baa8));},async 'dryRun'(_0x20c08c){const _0xb9bafe=a65_0x56b673,_0x20f238=await buildDatasetFieldUpdateResult({'appCode':_0x20c08c[_0xb9bafe(0x1d0)],'input':readFieldUpdateInput(_0x20c08c),'dryRun':!![]});return{'method':_0xb9bafe(0x1e2),'url':'/smartapi/dataset/update-driven-data','body':_0x20f238[_0xb9bafe(0x1e3)],'description':_0x20f238[_0xb9bafe(0x1b4)]};},async 'execute'(_0xfbd119){const _0x21729f=a65_0x56b673;return buildDatasetFieldUpdateResult({'appCode':_0xfbd119[_0x21729f(0x1d0)],'input':readFieldUpdateInput(_0xfbd119),'dryRun':![]});}};function readFieldUpdateInput(_0x4891fa){const _0x27bd36=a65_0x56b673,_0x124b20=trim(_0x4891fa[_0x27bd36(0x1b6)](_0x27bd36(0x201))),_0x4daeac=emptyToUndefined(_0x4891fa[_0x27bd36(0x1b6)](_0x27bd36(0x1c9))),_0x41191d=parseJsonObjectFlag(_0x4891fa[_0x27bd36(0x1b6)](_0x27bd36(0x1b8)),_0x27bd36(0x1ff)),_0x4c82cb=parseJsonObjectFlag(_0x4891fa[_0x27bd36(0x1b6)]('expect-json'),_0x27bd36(0x1d5));return{'code':_0x124b20,'field':_0x4daeac||'','patch':_0x41191d||{},'expect':_0x4c82cb};}function validateInput(_0x4e61a0){const _0x28838c=a65_0x56b673;if(!_0x4e61a0[_0x28838c(0x201)])throw CliErrors[_0x28838c(0x1e1)](_0x28838c(0x1d7));if(!_0x4e61a0[_0x28838c(0x1c9)])throw CliErrors[_0x28838c(0x1e1)](_0x28838c(0x1f6));validatePatchKeys(_0x4e61a0['patch']);}function readFieldArray(_0x202731){const _0x501aaf=a65_0x56b673;if(Array['isArray'](_0x202731[_0x501aaf(0x1fb)]))return _0x202731['fields'];if(Array['isArray'](_0x202731[_0x501aaf(0x1e7)]))return _0x202731[_0x501aaf(0x1e7)];throw CliErrors['validation'](_0x501aaf(0x1b7));}function summarizeDataset(_0x552205,_0x33b344){const _0x25ee99=a65_0x56b673,_0x4ac56f=isPlainObject(_0x552205[_0x25ee99(0x1d8)])?_0x552205[_0x25ee99(0x1d8)]:{},_0x143f06=isPlainObject(_0x552205[_0x25ee99(0x1c0)])?_0x552205[_0x25ee99(0x1c0)]:{};return{'id':_0x552205[_0x25ee99(0x1ee)]??_0x552205['id']??_0x4ac56f[_0x25ee99(0x1f0)]??null,'code':_0x552205[_0x25ee99(0x1f2)]??_0x552205[_0x25ee99(0x201)]??_0x4ac56f[_0x25ee99(0x1dd)]??_0x33b344,'name':_0x552205['name']??_0x4ac56f[_0x25ee99(0x1c8)]??null,'table':_0x143f06[_0x25ee99(0x1e9)]??_0x4ac56f[_0x25ee99(0x1e9)]??null,'db':_0x143f06[_0x25ee99(0x1ec)]??_0x143f06[_0x25ee99(0x1ef)]??null};}function a65_0x316a(){const _0x45a4a1=['dbType','38033446pHptYw','systemRetain','fields','780XYAWRZ','6134090zqdNdO','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','--patch-json','trim','code','options','pkField','Field\x20not\x20found:\x20','380023bpgZav','message','1833025ogjlnm','str','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','patch-json','add','keys','entries','Updated\x20dataset\x20field\x20','size','string','3267042lUnAPd','dbtableConfig','from','has','Exact\x20raw\x20fields[].name\x20to\x20patch','write','chartRole','expect-json','deleted','datasetName','field','9wXieSB','stringify','displayName','dbFieldName','Expected\x20','930816xXKiYE','appCode','\x20must\x20be\x20valid\x20JSON\x20object:\x20','Expectation\x20mismatch\x20at\x20','patch','expect','--expect-json','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','--code\x20is\x20required','dataset','No\x20changes\x20for\x20dataset\x20field\x20',',\x20actual\x20','parse','deprecated','datasetCode','1HOUaHr','datetimeFormat','name','validation','POST','data','dbTypeLen','length','findIndex','properties','object','tableName','sort','19953wkGCLx','dbName','\x20would\x20change\x20(','modelId','dbId','datasetId','join','modelCode','defaultAggregation','required','autoIncrement','--field\x20is\x20required','6OaDVyc'];a65_0x316a=function(){return _0x45a4a1;};return a65_0x316a();}function mergePatchValue(_0x1c5af8,_0x4e88e2){if(isPlainObject(_0x1c5af8)&&isPlainObject(_0x4e88e2))return deepMerge(_0x1c5af8,_0x4e88e2);return deepClone(_0x4e88e2);}function deepMerge(_0x233255,_0x360473){const _0x2856ce=a65_0x56b673,_0x381819=deepClone(_0x233255);for(const [_0x381d4b,_0x33239c]of Object[_0x2856ce(0x1bb)](_0x360473)){_0x381819[_0x381d4b]=isPlainObject(_0x381819[_0x381d4b])&&isPlainObject(_0x33239c)?deepMerge(_0x381819[_0x381d4b],_0x33239c):deepClone(_0x33239c);}return _0x381819;}function collectChangedPaths(_0x1563e2,_0x3e2c5a,_0x4b92df,_0x396297){const _0x1499db=a65_0x56b673;if(!isPlainObject(_0x3e2c5a)||!isPlainObject(_0x4b92df))return;const _0x475145=new Set([...Object['keys'](_0x3e2c5a),...Object[_0x1499db(0x1ba)](_0x4b92df)]);for(const _0xda5854 of _0x475145){const _0x1e8b06=_0x3e2c5a[_0xda5854],_0x3cda49=_0x4b92df[_0xda5854];!deepEqual(_0x1e8b06,_0x3cda49)&&_0x396297['add'](_0x1563e2+'.'+_0xda5854);}}function deepClone(_0x18ce43){const _0x5ba6dc=a65_0x56b673;if(_0x18ce43===undefined)return _0x18ce43;return JSON[_0x5ba6dc(0x1db)](JSON[_0x5ba6dc(0x1cb)](_0x18ce43));}function deepEqual(_0x3e3c88,_0x5d3a03){const _0x921188=a65_0x56b673;return JSON[_0x921188(0x1cb)](_0x3e3c88)===JSON[_0x921188(0x1cb)](_0x5d3a03);}function isPlainObject(_0x1b342e){const _0x39dbc9=a65_0x56b673;return Boolean(_0x1b342e)&&typeof _0x1b342e===_0x39dbc9(0x1e8)&&!Array['isArray'](_0x1b342e);}function emptyToUndefined(_0x5aa4cc){const _0x49ae00=a65_0x56b673,_0x38b91e=String(_0x5aa4cc||'')[_0x49ae00(0x200)]();return _0x38b91e||undefined;}function trim(_0x52927d){return String(_0x52927d||'')['trim']();}
1
+ const a65_0x21eedf=a65_0x3b8b;(function(_0x483234,_0x3db8f0){const _0x99d85b=a65_0x3b8b,_0x296e7f=_0x483234();while(!![]){try{const _0x1b5824=parseInt(_0x99d85b(0x225))/0x1*(-parseInt(_0x99d85b(0x216))/0x2)+parseInt(_0x99d85b(0x208))/0x3+-parseInt(_0x99d85b(0x1f8))/0x4+-parseInt(_0x99d85b(0x217))/0x5*(-parseInt(_0x99d85b(0x200))/0x6)+parseInt(_0x99d85b(0x1e7))/0x7*(parseInt(_0x99d85b(0x202))/0x8)+parseInt(_0x99d85b(0x231))/0x9*(parseInt(_0x99d85b(0x1f6))/0xa)+-parseInt(_0x99d85b(0x21a))/0xb*(parseInt(_0x99d85b(0x21f))/0xc);if(_0x1b5824===_0x3db8f0)break;else _0x296e7f['push'](_0x296e7f['shift']());}catch(_0x24d594){_0x296e7f['push'](_0x296e7f['shift']());}}}(a65_0x1b0f,0xd02ac));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a65_0x21eedf(0x21b),'displayName',a65_0x21eedf(0x1f3),'options',a65_0x21eedf(0x222),'datetimeFormat',a65_0x21eedf(0x227),a65_0x21eedf(0x1f1),a65_0x21eedf(0x1f7)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name',a65_0x21eedf(0x214),a65_0x21eedf(0x219),'dbTypeLen','dbTypeScale',a65_0x21eedf(0x22f),a65_0x21eedf(0x1f5),a65_0x21eedf(0x1fc),'pkField',a65_0x21eedf(0x1e6),a65_0x21eedf(0x205)]);export function parseJsonObjectFlag(_0x4971ed,_0x5975f2){const _0x504abc=a65_0x21eedf;if(!_0x4971ed)return undefined;let _0x305817;try{_0x305817=JSON[_0x504abc(0x1e8)](_0x4971ed);}catch(_0xf6d19d){const _0x137f07=_0xf6d19d instanceof Error?_0xf6d19d[_0x504abc(0x1ed)]:String(_0xf6d19d);throw CliErrors[_0x504abc(0x22b)](_0x5975f2+_0x504abc(0x21c)+_0x137f07);}if(!isPlainObject(_0x305817)||Array['isArray'](_0x305817))throw CliErrors[_0x504abc(0x22b)](_0x5975f2+'\x20must\x20be\x20a\x20JSON\x20object');return _0x305817;}function a65_0x1b0f(){const _0x2c5c94=['has','keys','systemRetain','Expectation\x20mismatch\x20at\x20','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','3951417KeXZSD','patch','modelId','expect','Dry-run:\x20dataset\x20field\x20','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','Forbidden\x20patch\x20key:\x20','No\x20changes\x20for\x20dataset\x20field\x20','Unsupported\x20patch\x20key:\x20','isArray','from','dbtableConfig','code','Expected\x20','239386oSHkGs','917685dbfExp','Field\x20not\x20found:\x20','dbType','11qvjvCk','doType','\x20must\x20be\x20valid\x20JSON\x20object:\x20','string','findIndex','110208dMExtb','/smartapi/dataset/update-driven-data','--field\x20is\x20required','required','data','add','11AtIgeJ','join','defaultAggregation','str','datasetId','fields','validation','datasetName','name','properties','dbFieldName','dbId','5661JeKjPe','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','--patch-json','autoIncrement','769643DuLOpR','parse','--expect-json','\x20would\x20change\x20(','POST','field','message','Updated\x20dataset\x20field\x20','trim','patch-json','chartRole','write','description','appCode','tableName','12130GeAGoG','deprecated','6646828YGMvos','sort','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','dataset','deleted','stringify','entries','size','18JJMKzF','expect-json','88pypnbL'];a65_0x1b0f=function(){return _0x2c5c94;};return a65_0x1b0f();}export function validatePatchKeys(_0x4309e5){const _0x2cd6ce=a65_0x21eedf,_0x3b3d3a=Object['keys'](_0x4309e5);if(_0x3b3d3a['length']===0x0)throw CliErrors[_0x2cd6ce(0x22b)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x207db7 of _0x3b3d3a){if(FORBIDDEN_FIELD_KEYS[_0x2cd6ce(0x203)](_0x207db7))throw CliErrors[_0x2cd6ce(0x22b)](_0x2cd6ce(0x20e)+_0x207db7);if(!MUTABLE_FIELD_KEYS['has'](_0x207db7))throw CliErrors[_0x2cd6ce(0x22b)](_0x2cd6ce(0x210)+_0x207db7,'Allowed\x20keys:\x20'+Array[_0x2cd6ce(0x212)](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}export function applyFieldPatch(_0x1af0c3,_0x247867){const _0x44ebfc=a65_0x21eedf;validatePatchKeys(_0x247867);const _0x444033=deepClone(_0x1af0c3),_0x4372dd=new Set();for(const [_0x2389e7,_0x353b55]of Object[_0x44ebfc(0x1fe)](_0x247867)){const _0x3d94c3=_0x444033[_0x2389e7],_0x44aedd=mergePatchValue(_0x3d94c3,_0x353b55);!deepEqual(_0x3d94c3,_0x44aedd)&&(_0x444033[_0x2389e7]=_0x44aedd,_0x4372dd[_0x44ebfc(0x224)](_0x2389e7),collectChangedPaths(_0x2389e7,_0x3d94c3,_0x44aedd,_0x4372dd));}return{'after':_0x444033,'changedPaths':Array[_0x44ebfc(0x212)](_0x4372dd)[_0x44ebfc(0x1f9)](),'changed':_0x4372dd[_0x44ebfc(0x1ff)]>0x0};}export function assertExpectation(_0x58523b,_0x9e29f5){const _0xc211d2=a65_0x21eedf;if(!_0x9e29f5)return;for(const [_0x242e60,_0x4923dc]of Object[_0xc211d2(0x1fe)](_0x9e29f5)){const _0x109830=_0x58523b[_0x242e60];if(!deepEqual(_0x109830,_0x4923dc))throw CliErrors[_0xc211d2(0x22b)](_0xc211d2(0x206)+_0x242e60,_0xc211d2(0x215)+JSON[_0xc211d2(0x1fd)](_0x4923dc)+',\x20actual\x20'+JSON[_0xc211d2(0x1fd)](_0x109830));}}export async function buildDatasetFieldUpdateResult({appCode:_0x333891,input:_0x42d886,dryRun:_0x2a3773}){const _0x4df271=a65_0x21eedf;validateInput(_0x42d886);const _0x494ca9=await getDatasetDetail(_0x42d886[_0x4df271(0x214)]),_0x264180=readFieldArray(_0x494ca9),_0x3d4c01=_0x264180[_0x4df271(0x21e)](_0x4dce51=>_0x4dce51?.[_0x4df271(0x22d)]===_0x42d886[_0x4df271(0x1ec)]);if(_0x3d4c01<0x0)throw CliErrors['validation'](_0x4df271(0x218)+_0x42d886[_0x4df271(0x1ec)]);const _0x4faf09=deepClone(_0x264180[_0x3d4c01]);assertExpectation(_0x4faf09,_0x42d886[_0x4df271(0x20b)]);const {after:_0x4c44ac,changedPaths:_0x503c1d,changed:_0x98d6b2}=applyFieldPatch(_0x4faf09,_0x42d886[_0x4df271(0x209)]),_0x1d8fb1=summarizeDataset(_0x494ca9,_0x42d886[_0x4df271(0x214)]);return _0x98d6b2&&!_0x2a3773&&(_0x264180[_0x3d4c01]=_0x4c44ac,await updateDrivenData(_0x494ca9)),{'ok':!![],'data':{'appCode':_0x333891,'selector':{'code':_0x42d886[_0x4df271(0x214)]},'dataset':_0x1d8fb1,'field':{'id':_0x4faf09['id']??null,'name':_0x4faf09[_0x4df271(0x22d)]},'dryRun':_0x2a3773,'changed':_0x98d6b2,'changedPaths':_0x503c1d,'before':_0x4faf09,'after':_0x4c44ac,'submitted':_0x98d6b2&&!_0x2a3773},'message':_0x98d6b2?_0x2a3773?_0x4df271(0x20c)+_0x42d886[_0x4df271(0x1ec)]+_0x4df271(0x1ea)+_0x503c1d[_0x4df271(0x226)](',\x20')+')':_0x4df271(0x1ee)+_0x42d886['field']+'\x20('+_0x503c1d[_0x4df271(0x226)](',\x20')+')':_0x4df271(0x20f)+_0x42d886[_0x4df271(0x1ec)]};}export const datasetFieldUpdate={'service':'dataset','command':'field-update','description':a65_0x21eedf(0x232),'risk':a65_0x21eedf(0x1f2),'flags':[CODE_FLAG,{'name':'field','type':a65_0x21eedf(0x21d),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':a65_0x21eedf(0x1f0),'type':a65_0x21eedf(0x21d),'required':!![],'description':a65_0x21eedf(0x1fa)},{'name':a65_0x21eedf(0x201),'type':a65_0x21eedf(0x21d),'required':![],'description':a65_0x21eedf(0x207)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x23f9f8){validateInput(readFieldUpdateInput(_0x23f9f8));},async 'dryRun'(_0x4fcc82){const _0x1e8f71=a65_0x21eedf,_0x243aad=await buildDatasetFieldUpdateResult({'appCode':_0x4fcc82['appCode'],'input':readFieldUpdateInput(_0x4fcc82),'dryRun':!![]});return{'method':_0x1e8f71(0x1eb),'url':_0x1e8f71(0x220),'body':_0x243aad[_0x1e8f71(0x223)],'description':_0x243aad['message']};},async 'execute'(_0x44127e){const _0x1c118d=a65_0x21eedf;return buildDatasetFieldUpdateResult({'appCode':_0x44127e[_0x1c118d(0x1f4)],'input':readFieldUpdateInput(_0x44127e),'dryRun':![]});}};function readFieldUpdateInput(_0x53c64e){const _0x1c87ed=a65_0x21eedf,_0x13f040=trim(_0x53c64e[_0x1c87ed(0x228)](_0x1c87ed(0x214))),_0x8a9321=emptyToUndefined(_0x53c64e['str'](_0x1c87ed(0x1ec))),_0xdf44d4=parseJsonObjectFlag(_0x53c64e['str'](_0x1c87ed(0x1f0)),_0x1c87ed(0x233)),_0x131dda=parseJsonObjectFlag(_0x53c64e[_0x1c87ed(0x228)](_0x1c87ed(0x201)),_0x1c87ed(0x1e9));return{'code':_0x13f040,'field':_0x8a9321||'','patch':_0xdf44d4||{},'expect':_0x131dda};}function validateInput(_0x4cc7d2){const _0x482fb3=a65_0x21eedf;if(!_0x4cc7d2[_0x482fb3(0x214)])throw CliErrors[_0x482fb3(0x22b)]('--code\x20is\x20required');if(!_0x4cc7d2[_0x482fb3(0x1ec)])throw CliErrors['validation'](_0x482fb3(0x221));validatePatchKeys(_0x4cc7d2['patch']);}function readFieldArray(_0x31b90a){const _0x3f02ce=a65_0x21eedf;if(Array[_0x3f02ce(0x211)](_0x31b90a['fields']))return _0x31b90a[_0x3f02ce(0x22a)];if(Array[_0x3f02ce(0x211)](_0x31b90a[_0x3f02ce(0x22e)]))return _0x31b90a[_0x3f02ce(0x22e)];throw CliErrors[_0x3f02ce(0x22b)](_0x3f02ce(0x20d));}function summarizeDataset(_0x5796b2,_0x4725da){const _0x5b9f01=a65_0x21eedf,_0x2aed37=isPlainObject(_0x5796b2[_0x5b9f01(0x1fb)])?_0x5796b2[_0x5b9f01(0x1fb)]:{},_0xac7eca=isPlainObject(_0x5796b2['dbtableConfig'])?_0x5796b2[_0x5b9f01(0x213)]:{};return{'id':_0x5796b2[_0x5b9f01(0x20a)]??_0x5796b2['id']??_0x2aed37[_0x5b9f01(0x229)]??null,'code':_0x5796b2['modelCode']??_0x5796b2[_0x5b9f01(0x214)]??_0x2aed37['datasetCode']??_0x4725da,'name':_0x5796b2[_0x5b9f01(0x22d)]??_0x2aed37[_0x5b9f01(0x22c)]??null,'table':_0xac7eca['tableName']??_0x2aed37[_0x5b9f01(0x1f5)]??null,'db':_0xac7eca['dbName']??_0xac7eca[_0x5b9f01(0x230)]??null};}function mergePatchValue(_0x5f4b5a,_0x4e88f2){if(isPlainObject(_0x5f4b5a)&&isPlainObject(_0x4e88f2))return deepMerge(_0x5f4b5a,_0x4e88f2);return deepClone(_0x4e88f2);}function deepMerge(_0xe5e8d3,_0x4b8032){const _0x346bde=deepClone(_0xe5e8d3);for(const [_0x7369b4,_0xb24b9a]of Object['entries'](_0x4b8032)){_0x346bde[_0x7369b4]=isPlainObject(_0x346bde[_0x7369b4])&&isPlainObject(_0xb24b9a)?deepMerge(_0x346bde[_0x7369b4],_0xb24b9a):deepClone(_0xb24b9a);}return _0x346bde;}function collectChangedPaths(_0x3a4b49,_0x458cfb,_0xd8bb1f,_0x19ea2e){const _0x160e91=a65_0x21eedf;if(!isPlainObject(_0x458cfb)||!isPlainObject(_0xd8bb1f))return;const _0x3078b2=new Set([...Object[_0x160e91(0x204)](_0x458cfb),...Object['keys'](_0xd8bb1f)]);for(const _0x4f0f4b of _0x3078b2){const _0x1ab2d5=_0x458cfb[_0x4f0f4b],_0x334072=_0xd8bb1f[_0x4f0f4b];!deepEqual(_0x1ab2d5,_0x334072)&&_0x19ea2e[_0x160e91(0x224)](_0x3a4b49+'.'+_0x4f0f4b);}}function a65_0x3b8b(_0x3058d6,_0x5a9b96){_0x3058d6=_0x3058d6-0x1e6;const _0x1b0f29=a65_0x1b0f();let _0x3b8be3=_0x1b0f29[_0x3058d6];return _0x3b8be3;}function deepClone(_0x381203){const _0x39ccad=a65_0x21eedf;if(_0x381203===undefined)return _0x381203;return JSON['parse'](JSON[_0x39ccad(0x1fd)](_0x381203));}function deepEqual(_0x2fbca9,_0x27676e){const _0x3751a5=a65_0x21eedf;return JSON[_0x3751a5(0x1fd)](_0x2fbca9)===JSON['stringify'](_0x27676e);}function isPlainObject(_0x542e2a){return Boolean(_0x542e2a)&&typeof _0x542e2a==='object'&&!Array['isArray'](_0x542e2a);}function emptyToUndefined(_0xf613e5){const _0x181c53=a65_0x21eedf,_0x52c56b=String(_0xf613e5||'')[_0x181c53(0x1ef)]();return _0x52c56b||undefined;}function trim(_0x4707c5){const _0x1d33a8=a65_0x21eedf;return String(_0x4707c5||'')[_0x1d33a8(0x1ef)]();}