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

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 (273) hide show
  1. package/README.md +7 -2
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/init/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/kb/create.js +1 -0
  103. package/lib/commands/kb/delete.js +1 -0
  104. package/lib/commands/kb/detail.js +1 -0
  105. package/lib/commands/kb/index.js +1 -0
  106. package/lib/commands/kb/list.js +1 -0
  107. package/lib/commands/kb/shared.js +1 -0
  108. package/lib/commands/kb/update.js +1 -0
  109. package/lib/commands/logs/index.js +1 -1
  110. package/lib/commands/menu/asset-update.js +1 -1
  111. package/lib/commands/menu/delete.js +1 -1
  112. package/lib/commands/menu/external-link-create.js +1 -1
  113. package/lib/commands/menu/external-link-update.js +1 -1
  114. package/lib/commands/menu/group-create.js +1 -1
  115. package/lib/commands/menu/group-update.js +1 -1
  116. package/lib/commands/menu/index.js +1 -1
  117. package/lib/commands/menu/list.js +1 -1
  118. package/lib/commands/menu/move.js +1 -1
  119. package/lib/commands/menu/regroup-start.js +1 -1
  120. package/lib/commands/menu/rename.js +1 -1
  121. package/lib/commands/menu/shared/compare-table.js +1 -1
  122. package/lib/commands/menu/shared/delete-plan.js +1 -1
  123. package/lib/commands/menu/shared/facts.js +1 -1
  124. package/lib/commands/menu/shared/index.js +1 -1
  125. package/lib/commands/menu/shared/inquirer.js +1 -1
  126. package/lib/commands/menu/shared/local-pages.js +1 -1
  127. package/lib/commands/menu/shared/logic.js +1 -1
  128. package/lib/commands/menu/shared/mutations.js +1 -1
  129. package/lib/commands/menu/shared/service.js +1 -1
  130. package/lib/commands/menu/shared/sync-core.js +1 -1
  131. package/lib/commands/menu/shared/update-core.js +1 -1
  132. package/lib/commands/menu/shared/valid-url.js +1 -1
  133. package/lib/commands/menu/sync.js +1 -1
  134. package/lib/commands/notification/config-list.js +1 -1
  135. package/lib/commands/notification/index.js +1 -1
  136. package/lib/commands/ocr/index.js +1 -1
  137. package/lib/commands/page/generate-start.js +1 -1
  138. package/lib/commands/page/generate-status.js +1 -1
  139. package/lib/commands/page/index.js +1 -1
  140. package/lib/commands/page/pull.js +1 -1
  141. package/lib/commands/page/push.js +1 -1
  142. package/lib/commands/page/relation-audit.js +1 -1
  143. package/lib/commands/page/restore.js +1 -1
  144. package/lib/commands/page/shared.js +1 -1
  145. package/lib/commands/page/standard-page-status.js +1 -1
  146. package/lib/commands/page/sync.js +1 -1
  147. package/lib/commands/permit/index.js +1 -1
  148. package/lib/commands/permit/page-get.js +1 -1
  149. package/lib/commands/permit/page-set.js +1 -1
  150. package/lib/commands/permit/role-apis-set.js +1 -1
  151. package/lib/commands/permit/role-menus-set.js +1 -1
  152. package/lib/commands/permit/role-menus.js +1 -1
  153. package/lib/commands/permit/shared.js +1 -1
  154. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  155. package/lib/commands/project/create/format-elapsed.js +1 -1
  156. package/lib/commands/project/create/main.js +1 -1
  157. package/lib/commands/project/create/non-interactive.js +1 -1
  158. package/lib/commands/project/create/project-template-path.js +1 -1
  159. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  160. package/lib/commands/project/create/use-format-code.js +1 -1
  161. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  162. package/lib/commands/project/index.js +1 -1
  163. package/lib/commands/project/init.js +1 -1
  164. package/lib/commands/project/upgrade.js +1 -1
  165. package/lib/commands/registry.js +1 -1
  166. package/lib/commands/role/create.js +1 -1
  167. package/lib/commands/role/delete.js +1 -1
  168. package/lib/commands/role/detail.js +1 -1
  169. package/lib/commands/role/index.js +1 -1
  170. package/lib/commands/role/list.js +1 -1
  171. package/lib/commands/role/shared.js +1 -1
  172. package/lib/commands/role/update.js +1 -1
  173. package/lib/commands/role/user-add.js +1 -1
  174. package/lib/commands/role/user-remove.js +1 -1
  175. package/lib/commands/role/user-resolve.js +1 -1
  176. package/lib/commands/run/index.js +1 -1
  177. package/lib/commands/schema.js +1 -1
  178. package/lib/commands/sql/create.js +1 -1
  179. package/lib/commands/sql/delete.js +1 -1
  180. package/lib/commands/sql/detail.js +1 -1
  181. package/lib/commands/sql/exec.js +1 -1
  182. package/lib/commands/sql/index.js +1 -1
  183. package/lib/commands/sql/list.js +1 -1
  184. package/lib/commands/sql/pull.js +1 -1
  185. package/lib/commands/sql/push.js +1 -1
  186. package/lib/commands/sql/save.js +1 -1
  187. package/lib/commands/sql/shared.js +1 -1
  188. package/lib/commands/sql/status.js +1 -1
  189. package/lib/commands/sql/validate.js +1 -1
  190. package/lib/commands/task/index.js +1 -1
  191. package/lib/commands/task/status.js +1 -1
  192. package/lib/commands/workspace/add.js +1 -1
  193. package/lib/commands/workspace/index.js +1 -1
  194. package/lib/commands/workspace/remove.js +1 -1
  195. package/lib/config/schema.js +1 -1
  196. package/lib/constant/cdn.js +1 -1
  197. package/lib/constant/cli.js +1 -1
  198. package/lib/constant/defaults.js +1 -1
  199. package/lib/constant/domain.js +1 -1
  200. package/lib/constant/env.js +1 -1
  201. package/lib/constant/output.js +1 -1
  202. package/lib/constant/paths.js +1 -1
  203. package/lib/constant/risk.js +1 -1
  204. package/lib/context/app-resolver.js +1 -1
  205. package/lib/context/auth-resolver.js +1 -1
  206. package/lib/context/config-loader.js +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/skills/main.js +1 -1
  242. package/lib/skills/npx-skills-add.js +1 -1
  243. package/lib/skills/skill-presence.js +1 -0
  244. package/lib/telemetry/cli-command-trace.js +1 -1
  245. package/lib/telemetry/cli-help-trace.js +1 -1
  246. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  247. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  248. package/lib/telemetry/send-cli-trace-log.js +1 -1
  249. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  250. package/lib/utils/ai_config.js +1 -1
  251. package/lib/utils/apply-jq-filter.js +1 -1
  252. package/lib/utils/cdn-config.js +1 -1
  253. package/lib/utils/check-sdk-version.js +1 -1
  254. package/lib/utils/cli-version-check.js +1 -1
  255. package/lib/utils/cli-version-policy.js +1 -1
  256. package/lib/utils/config.js +1 -1
  257. package/lib/utils/copy-directory.js +1 -1
  258. package/lib/utils/entity-with-id.js +1 -1
  259. package/lib/utils/file-utils.js +1 -1
  260. package/lib/utils/guides-cdn.js +1 -1
  261. package/lib/utils/http-client.js +1 -1
  262. package/lib/utils/is-non-interactive.js +1 -1
  263. package/lib/utils/logger.js +1 -1
  264. package/lib/utils/params.js +1 -1
  265. package/lib/utils/platform.js +1 -1
  266. package/lib/utils/rules-cdn.js +1 -1
  267. package/lib/utils/sleep.js +1 -1
  268. package/lib/utils/template-replacer.js +1 -1
  269. package/lib/utils/update-notice.js +1 -1
  270. package/lib/utils/version.js +1 -1
  271. package/lib/utils/with-active-cookie.js +1 -1
  272. package/lib/utils/write-cli-side-channel.js +1 -1
  273. package/package.json +1 -1
@@ -1 +1 @@
1
- const a51_0x2dfc0b=a51_0x1ca5;(function(_0x57328e,_0x2dd503){const _0x43719b=a51_0x1ca5,_0x434712=_0x57328e();while(!![]){try{const _0x24f641=-parseInt(_0x43719b(0x108))/0x1+-parseInt(_0x43719b(0x117))/0x2*(parseInt(_0x43719b(0x103))/0x3)+parseInt(_0x43719b(0x10b))/0x4*(parseInt(_0x43719b(0x110))/0x5)+-parseInt(_0x43719b(0x112))/0x6*(parseInt(_0x43719b(0x10c))/0x7)+-parseInt(_0x43719b(0x10a))/0x8*(parseInt(_0x43719b(0x114))/0x9)+-parseInt(_0x43719b(0x115))/0xa+-parseInt(_0x43719b(0x10d))/0xb*(-parseInt(_0x43719b(0x111))/0xc);if(_0x24f641===_0x2dd503)break;else _0x434712['push'](_0x434712['shift']());}catch(_0x2f767d){_0x434712['push'](_0x434712['shift']());}}}(a51_0x37b4,0xf0ff7));function a51_0x1ca5(_0x5793c4,_0x53f302){_0x5793c4=_0x5793c4-0x100;const _0x37b430=a51_0x37b4();let _0x1ca54e=_0x37b430[_0x5793c4];return _0x1ca54e;}import{CliErrors}from'../../errors.js';function a51_0x37b4(){const _0x521d90=['get','Key\x20not\x20found:\x20','685wrwHUX','44929716RbWhTe','348qVBdQg','validation','81Bsthly','297790NNqJGj','string','158bIdPuh','app','read','key','30930qUjKCS','object','Get\x20a\x20config\x20value\x20by\x20key','appcode','Missing\x20key.','406891ckYAPv','str','1265848zbHrRu','36524zabdeu','160846jTHMem','11uAcjAJ'];a51_0x37b4=function(){return _0x521d90;};return a51_0x37b4();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2da5e9){const _0x2f0972=a51_0x1ca5,_0x349610=_0x2da5e9[_0x2f0972(0x109)](_0x2f0972(0x102));if(!_0x349610)throw CliErrors['validation'](_0x2f0972(0x107),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x935a02=readConfig(),_0x329ff2=_0x349610===_0x2f0972(0x100)?_0x2f0972(0x106):_0x349610,_0x547b20=_0x935a02[_0x329ff2];if(_0x547b20===undefined)throw CliErrors[_0x2f0972(0x113)](_0x2f0972(0x10f)+_0x349610);return{'ok':!![],'data':typeof _0x547b20===_0x2f0972(0x104)?_0x547b20:{[_0x329ff2]:_0x547b20},'message':typeof _0x547b20===_0x2f0972(0x104)?undefined:String(_0x547b20)};}export const configGetDefinition={'service':'config','command':a51_0x2dfc0b(0x10e),'description':a51_0x2dfc0b(0x105),'risk':a51_0x2dfc0b(0x101),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0x2dfc0b(0x116),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a51_0x369f18=a51_0x378a;function a51_0x378a(_0x50f551,_0x15d57b){_0x50f551=_0x50f551-0xa5;const _0x1c5098=a51_0x1c50();let _0x378af9=_0x1c5098[_0x50f551];return _0x378af9;}(function(_0x55960f,_0x1686d9){const _0x4b1e86=a51_0x378a,_0x33f1b2=_0x55960f();while(!![]){try{const _0x3086f4=-parseInt(_0x4b1e86(0xb3))/0x1+parseInt(_0x4b1e86(0xb5))/0x2*(parseInt(_0x4b1e86(0xb2))/0x3)+-parseInt(_0x4b1e86(0xbb))/0x4*(-parseInt(_0x4b1e86(0xb8))/0x5)+parseInt(_0x4b1e86(0xba))/0x6+-parseInt(_0x4b1e86(0xb4))/0x7*(-parseInt(_0x4b1e86(0xb9))/0x8)+-parseInt(_0x4b1e86(0xa5))/0x9*(-parseInt(_0x4b1e86(0xa7))/0xa)+-parseInt(_0x4b1e86(0xaa))/0xb*(parseInt(_0x4b1e86(0xad))/0xc);if(_0x3086f4===_0x1686d9)break;else _0x33f1b2['push'](_0x33f1b2['shift']());}catch(_0x46748c){_0x33f1b2['push'](_0x33f1b2['shift']());}}}(a51_0x1c50,0xaad58));import{CliErrors}from'../../errors.js';function a51_0x1c50(){const _0x4a1741=['string','key','6OapSRA','1227140HKMDtH','5215IamrXp','1088898dYkNBI','Missing\x20key.','Get\x20a\x20config\x20value\x20by\x20key','93230BAzRyF','11504cqXHMo','269904MQsWit','8vuFvsx','\x20config\x20get\x20--key\x20<key>','2709fbpDdG','Usage:\x20','12550qDNBuK','str','object','231121kQBWgQ','Key\x20not\x20found:\x20','app','396JsKfoY','get','appcode'];a51_0x1c50=function(){return _0x4a1741;};return a51_0x1c50();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3c9a5e){const _0x4ae367=a51_0x378a,_0x3d19b3=_0x3c9a5e[_0x4ae367(0xa8)](_0x4ae367(0xb1));if(!_0x3d19b3)throw CliErrors['validation'](_0x4ae367(0xb6),_0x4ae367(0xa6)+CLI_BIN_NAME+_0x4ae367(0xbc));const _0x5b4764=readConfig(),_0x19e98e=_0x3d19b3===_0x4ae367(0xac)?_0x4ae367(0xaf):_0x3d19b3,_0x1270c2=_0x5b4764[_0x19e98e];if(_0x1270c2===undefined)throw CliErrors['validation'](_0x4ae367(0xab)+_0x3d19b3);return{'ok':!![],'data':typeof _0x1270c2===_0x4ae367(0xa9)?_0x1270c2:{[_0x19e98e]:_0x1270c2},'message':typeof _0x1270c2===_0x4ae367(0xa9)?undefined:String(_0x1270c2)};}export const configGetDefinition={'service':'config','command':a51_0x369f18(0xae),'description':a51_0x369f18(0xb7),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x369f18(0xb1),'type':a51_0x369f18(0xb0),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a52_0xeb9a(){const _0x2843f5=['1665340WotMsd','8kXdYNw','3446648nEnVaw','2177517Ybwpwm','73263Wvasuk','4837IWAXAY','4ozOJuz','240skbXQs','12196558NtIJAc','146808aVRAXX','5646HxCKfD'];a52_0xeb9a=function(){return _0x2843f5;};return a52_0xeb9a();}(function(_0x288e29,_0x15c599){const _0x4879dd=a52_0x1008,_0x18d5a9=_0x288e29();while(!![]){try{const _0x370644=parseInt(_0x4879dd(0xf3))/0x1*(-parseInt(_0x4879dd(0xf0))/0x2)+parseInt(_0x4879dd(0xf2))/0x3+-parseInt(_0x4879dd(0xf5))/0x4*(-parseInt(_0x4879dd(0xef))/0x5)+parseInt(_0x4879dd(0xee))/0x6*(-parseInt(_0x4879dd(0xf4))/0x7)+-parseInt(_0x4879dd(0xf1))/0x8+parseInt(_0x4879dd(0xed))/0x9*(-parseInt(_0x4879dd(0xf6))/0xa)+parseInt(_0x4879dd(0xec))/0xb;if(_0x370644===_0x15c599)break;else _0x18d5a9['push'](_0x18d5a9['shift']());}catch(_0x6db0f9){_0x18d5a9['push'](_0x18d5a9['shift']());}}}(a52_0xeb9a,0x622a3));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a52_0x1008(_0x573b28,_0x775d01){_0x573b28=_0x573b28-0xec;const _0xeb9a92=a52_0xeb9a();let _0x100893=_0xeb9a92[_0x573b28];return _0x100893;}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ (function(_0x7f57b3,_0x1acdac){const _0x25c1d4=a52_0xc885,_0xc772fc=_0x7f57b3();while(!![]){try{const _0x167eaf=-parseInt(_0x25c1d4(0x188))/0x1+parseInt(_0x25c1d4(0x18a))/0x2+parseInt(_0x25c1d4(0x187))/0x3*(-parseInt(_0x25c1d4(0x18b))/0x4)+parseInt(_0x25c1d4(0x18e))/0x5*(-parseInt(_0x25c1d4(0x186))/0x6)+parseInt(_0x25c1d4(0x18d))/0x7+parseInt(_0x25c1d4(0x189))/0x8+parseInt(_0x25c1d4(0x18c))/0x9;if(_0x167eaf===_0x1acdac)break;else _0xc772fc['push'](_0xc772fc['shift']());}catch(_0x31a1e7){_0xc772fc['push'](_0xc772fc['shift']());}}}(a52_0xcd14,0x8ddff));function a52_0xc885(_0x184617,_0x4a10a8){_0x184617=_0x184617-0x186;const _0xcd14f8=a52_0xcd14();let _0xc885f2=_0xcd14f8[_0x184617];return _0xc885f2;}import{configListDefinition}from'../../commands/config/list.js';function a52_0xcd14(){const _0x5b439d=['7187736NdmXze','1350098dmspqj','20816cRWsSU','5334165FOUjLH','4471180qfhTXY','5CgOhRc','6541818jCEAHV','321xxCYPk','576691EVdXRz'];a52_0xcd14=function(){return _0x5b439d;};return a52_0xcd14();}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- const a53_0x1ab065=a53_0x4181;(function(_0x16b020,_0x101c1a){const _0x54c038=a53_0x4181,_0x3d97be=_0x16b020();while(!![]){try{const _0x42bd9c=-parseInt(_0x54c038(0x7a))/0x1*(parseInt(_0x54c038(0x84))/0x2)+-parseInt(_0x54c038(0x86))/0x3*(parseInt(_0x54c038(0x82))/0x4)+parseInt(_0x54c038(0x78))/0x5+parseInt(_0x54c038(0x81))/0x6+-parseInt(_0x54c038(0x7c))/0x7+parseInt(_0x54c038(0x7d))/0x8+-parseInt(_0x54c038(0x87))/0x9*(parseInt(_0x54c038(0x7e))/0xa);if(_0x42bd9c===_0x101c1a)break;else _0x3d97be['push'](_0x3d97be['shift']());}catch(_0x4daaf0){_0x3d97be['push'](_0x3d97be['shift']());}}}(a53_0x1de9,0x417f0));import{readScopedConfig}from'../../commands/config/shared.js';function a53_0x4181(_0x5e9d07,_0x259c09){_0x5e9d07=_0x5e9d07-0x78;const _0x1de954=a53_0x1de9();let _0x4181e6=_0x1de954[_0x5e9d07];return _0x4181e6;}import{readConfig}from'../../utils/config.js';async function execute(_0x54b5ac){const _0x5a1e4e=a53_0x4181,_0x21c91a=_0x54b5ac['bool']('global')?readScopedConfig(_0x5a1e4e(0x83)):readConfig();return{'ok':!![],'data':_0x21c91a};}export const configListDefinition={'service':a53_0x1ab065(0x7f),'command':'list','description':a53_0x1ab065(0x80),'risk':a53_0x1ab065(0x85),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x1ab065(0x83),'type':a53_0x1ab065(0x7b),'description':a53_0x1ab065(0x79),'default':![]}],'execute':execute};function a53_0x1de9(){const _0x241eb6=['153316SdHocY','global','36KAGsoH','read','27yCjYbE','8307ACIRhD','1903965OIdYeA','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','625TYenYJ','boolean','3175466OdKqlm','3424128qJaafk','2440YJBpxw','config','List\x20all\x20config\x20values','2967144JKTQvj'];a53_0x1de9=function(){return _0x241eb6;};return a53_0x1de9();}
1
+ const a53_0x37874d=a53_0x4bd3;(function(_0x299ef7,_0x4bd009){const _0x198f9d=a53_0x4bd3,_0x6fd0e=_0x299ef7();while(!![]){try{const _0x31c50b=-parseInt(_0x198f9d(0x8f))/0x1+parseInt(_0x198f9d(0x91))/0x2*(-parseInt(_0x198f9d(0x92))/0x3)+-parseInt(_0x198f9d(0x9e))/0x4+parseInt(_0x198f9d(0x95))/0x5*(parseInt(_0x198f9d(0x98))/0x6)+parseInt(_0x198f9d(0xa0))/0x7*(-parseInt(_0x198f9d(0x97))/0x8)+-parseInt(_0x198f9d(0x9a))/0x9+parseInt(_0x198f9d(0x9f))/0xa;if(_0x31c50b===_0x4bd009)break;else _0x6fd0e['push'](_0x6fd0e['shift']());}catch(_0x4179b6){_0x6fd0e['push'](_0x6fd0e['shift']());}}}(a53_0x20a8,0x91d3a));function a53_0x20a8(){const _0x4643e0=['bool','205iIJFTw','config','104PYUpFJ','5298WBUKDp','global','4901697gBsJQI','boolean','read','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','2742980qJmYWa','38009260zAiIPp','204505xaLbxK','837132cNhCKK','list','1585036MmBPcj','3coqNgu','List\x20all\x20config\x20values'];a53_0x20a8=function(){return _0x4643e0;};return a53_0x20a8();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x28bb9e){const _0x255748=a53_0x4bd3,_0x25ed64=_0x28bb9e[_0x255748(0x94)](_0x255748(0x99))?readScopedConfig(_0x255748(0x99)):readConfig();return{'ok':!![],'data':_0x25ed64};}function a53_0x4bd3(_0x11ce86,_0x245257){_0x11ce86=_0x11ce86-0x8f;const _0x20a8b9=a53_0x20a8();let _0x4bd3b1=_0x20a8b9[_0x11ce86];return _0x4bd3b1;}export const configListDefinition={'service':a53_0x37874d(0x96),'command':a53_0x37874d(0x90),'description':a53_0x37874d(0x93),'risk':a53_0x37874d(0x9c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x37874d(0x99),'type':a53_0x37874d(0x9b),'description':a53_0x37874d(0x9d),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a54_0x56f481=a54_0x5236;(function(_0x100171,_0x284823){const _0x3237f8=a54_0x5236,_0x3cb80a=_0x100171();while(!![]){try{const _0x1c4a30=parseInt(_0x3237f8(0x11b))/0x1*(-parseInt(_0x3237f8(0x11d))/0x2)+-parseInt(_0x3237f8(0x136))/0x3*(parseInt(_0x3237f8(0x12d))/0x4)+parseInt(_0x3237f8(0x120))/0x5+-parseInt(_0x3237f8(0x10c))/0x6+parseInt(_0x3237f8(0x114))/0x7+parseInt(_0x3237f8(0x116))/0x8+parseInt(_0x3237f8(0x134))/0x9;if(_0x1c4a30===_0x284823)break;else _0x3cb80a['push'](_0x3cb80a['shift']());}catch(_0x552b69){_0x3cb80a['push'](_0x3cb80a['shift']());}}}(a54_0x5aa7,0x7b93b));function a54_0x5236(_0x246727,_0xf83183){_0x246727=_0x246727-0x10c;const _0x5aa720=a54_0x5aa7();let _0x5236c9=_0x5aa720[_0x246727];return _0x5236c9;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a54_0x5aa7(){const _0x3e8771=['locale','\x20set\x20to:\x20','21220LVioXe','keys','bool','app','Usage:\x20','object','\x20appcode\x20set\x20to:\x20','5352552VXZgKD','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','309VycJCO','Config\x20value','boolean','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Use\x20`','2586330UdKYbH','appcode','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','set','validation','\x20app\x20add\x20<name>\x20--appcode\x20','env','4439736OUksAh','includes','954280BFPcLM','Invalid\x20locale\x20value.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','join','Project','1YHuyIv','\x22\x20is\x20not\x20settable.','696000gLmmfW','apps','Top-level\x20key\x20\x22','2416900vAkAAs','key','string','length','`,\x20`','riskLevel','Global','Missing\x20key.','global','Invalid\x20value\x20for\x20\x22','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.'];a54_0x5aa7=function(){return _0x3e8771;};return a54_0x5aa7();}async function execute(_0x4d56a6){const _0x15813f=a54_0x5236,_0x3f3597=_0x4d56a6['str'](_0x15813f(0x121)),_0x3fb2eb=_0x4d56a6['str']('value');if(!_0x3f3597)throw CliErrors[_0x15813f(0x111)](_0x15813f(0x127),_0x15813f(0x131)+CLI_BIN_NAME+_0x15813f(0x139));if(_0x3fb2eb===undefined||_0x3fb2eb==='')throw CliErrors[_0x15813f(0x111)]('Missing\x20value.',_0x15813f(0x131)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x3fb2eb[_0x15813f(0x123)]>0x1f4)throw CliErrors[_0x15813f(0x111)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x3f3597))throw CliErrors[_0x15813f(0x111)](_0x15813f(0x11f)+_0x3f3597+_0x15813f(0x11c),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x3f3597===_0x15813f(0x125))throw CliErrors[_0x15813f(0x111)](_0x15813f(0x135));if(CONFIG_ENUM_VALUES[_0x3f3597]&&!CONFIG_ENUM_VALUES[_0x3f3597][_0x15813f(0x115)](_0x3fb2eb))throw CliErrors[_0x15813f(0x111)](_0x15813f(0x129)+_0x3f3597+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x3f3597][_0x15813f(0x119)](',\x20'));if(_0x3f3597===_0x15813f(0x12b)&&!normalizeLocale(_0x3fb2eb))throw CliErrors[_0x15813f(0x111)](_0x15813f(0x117),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0xf1ad17={'global':_0x4d56a6[_0x15813f(0x12f)](_0x15813f(0x128))},_0x380905=resolveWriteScope(_0xf1ad17),_0x5dd79e=readScopedConfig(_0x380905);let _0x669e42=_0x3f3597,_0x139a1a=_0x3fb2eb;_0x3f3597==='app'&&(_0x669e42=_0x15813f(0x10d),delete _0x5dd79e[_0x15813f(0x130)]);_0x3f3597==='locale'&&(_0x139a1a=normalizeLocale(_0x3fb2eb));if(_0x3f3597===_0x15813f(0x113)){_0x139a1a=normalizeEnv(_0x3fb2eb);if(!isProduction(_0x139a1a)&&!isDaily(_0x139a1a))throw CliErrors['validation'](_0x15813f(0x12a),_0x15813f(0x118));}if(_0x3f3597===_0x15813f(0x10d)){const _0x432725=_0x5dd79e['apps']&&typeof _0x5dd79e['apps']===_0x15813f(0x132)?Object[_0x15813f(0x12e)](_0x5dd79e[_0x15813f(0x11e)]):[];if(_0x432725[_0x15813f(0x123)]>0x0)throw CliErrors[_0x15813f(0x111)](_0x15813f(0x10f),_0x15813f(0x13a)+CLI_BIN_NAME+_0x15813f(0x112)+_0x139a1a+_0x15813f(0x124)+CLI_BIN_NAME+_0x15813f(0x10e));const _0x124aa4=buildCanonicalProjectConfig({..._0x5dd79e},{'appCodes':[_0x139a1a],'env':typeof _0x5dd79e['env']===_0x15813f(0x122)?_0x5dd79e['env']:undefined});writeScopedConfig(_0x124aa4,_0x380905);const _0x66d289=_0x380905===_0x15813f(0x128)?_0x15813f(0x126):_0x15813f(0x11a);return{'ok':!![],'message':'✓\x20'+_0x66d289+_0x15813f(0x133)+_0x139a1a+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x5dd79e[_0x669e42]=_0x139a1a,writeScopedConfig(_0x5dd79e,_0x380905);const _0x151db1=_0x380905==='global'?'Global':_0x15813f(0x11a);return{'ok':!![],'message':'✓\x20'+_0x151db1+'\x20'+_0x669e42+_0x15813f(0x12c)+_0x139a1a};}export const configSetDefinition={'service':'config','command':a54_0x56f481(0x110),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x56f481(0x121),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a54_0x56f481(0x122),'description':a54_0x56f481(0x137),'required':!![]},{'name':a54_0x56f481(0x128),'type':a54_0x56f481(0x138),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a54_0x2bb464=a54_0x3cbb;(function(_0x4fa191,_0x2040fd){const _0x4edfea=a54_0x3cbb,_0x5741fc=_0x4fa191();while(!![]){try{const _0x44cead=-parseInt(_0x4edfea(0x89))/0x1*(-parseInt(_0x4edfea(0x79))/0x2)+parseInt(_0x4edfea(0x7d))/0x3+-parseInt(_0x4edfea(0x77))/0x4*(parseInt(_0x4edfea(0x85))/0x5)+parseInt(_0x4edfea(0x99))/0x6+-parseInt(_0x4edfea(0x9e))/0x7*(parseInt(_0x4edfea(0x78))/0x8)+parseInt(_0x4edfea(0x87))/0x9+-parseInt(_0x4edfea(0x8c))/0xa;if(_0x44cead===_0x2040fd)break;else _0x5741fc['push'](_0x5741fc['shift']());}catch(_0x35b485){_0x5741fc['push'](_0x5741fc['shift']());}}}(a54_0x3b3c,0xcb94d));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a54_0x3b3c(){const _0x8d9167=['app','Missing\x20value.','1192938wyPxMl','value','length','key','Missing\x20key.','7600803srsZuR','locale','Set\x20a\x20config\x20value','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','write','str','\x20set\x20to:\x20','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','appcode','Top-level\x20key\x20\x22','39752WVSjBj','8dTITsI','2138658VcFNQL','global','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','1786047jviaXm','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','validation','\x22\x20is\x20not\x20settable.','config','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Invalid\x20value\x20for\x20\x22','\x22.\x20Allowed:\x20','75hzLrei','join','4905963foghlr','Project','1MhKDdJ','env','apps','3398400KSupYt','Usage:\x20','Config\x20value','Invalid\x20locale\x20value.','includes','string','object','set','\x20app\x20add\x20<name>\x20--appcode\x20','boolean','keys'];a54_0x3b3c=function(){return _0x8d9167;};return a54_0x3b3c();}function a54_0x3cbb(_0x52c849,_0x2ae340){_0x52c849=_0x52c849-0x75;const _0x3b3ca0=a54_0x3b3c();let _0x3cbbad=_0x3b3ca0[_0x52c849];return _0x3cbbad;}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x34ed21){const _0x275f17=a54_0x3cbb,_0x4c58c7=_0x34ed21[_0x275f17(0xa4)]('key'),_0x207699=_0x34ed21[_0x275f17(0xa4)](_0x275f17(0x9a));if(!_0x4c58c7)throw CliErrors[_0x275f17(0x7f)](_0x275f17(0x9d),_0x275f17(0x8d)+CLI_BIN_NAME+_0x275f17(0x7e));if(_0x207699===undefined||_0x207699==='')throw CliErrors[_0x275f17(0x7f)](_0x275f17(0x98),_0x275f17(0x8d)+CLI_BIN_NAME+_0x275f17(0x7e));if(_0x207699[_0x275f17(0x9b)]>0x1f4)throw CliErrors['validation'](_0x275f17(0x7c));if(!isTopLevelConfigKey(_0x4c58c7))throw CliErrors[_0x275f17(0x7f)](_0x275f17(0x76)+_0x4c58c7+_0x275f17(0x80),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x4c58c7==='riskLevel')throw CliErrors[_0x275f17(0x7f)](_0x275f17(0xa1));if(CONFIG_ENUM_VALUES[_0x4c58c7]&&!CONFIG_ENUM_VALUES[_0x4c58c7][_0x275f17(0x90)](_0x207699))throw CliErrors[_0x275f17(0x7f)](_0x275f17(0x83)+_0x4c58c7+_0x275f17(0x84)+CONFIG_ENUM_VALUES[_0x4c58c7][_0x275f17(0x86)](',\x20'));if(_0x4c58c7===_0x275f17(0x9f)&&!normalizeLocale(_0x207699))throw CliErrors['validation'](_0x275f17(0x8f),_0x275f17(0x7b));const _0xf5e289={'global':_0x34ed21['bool'](_0x275f17(0x7a))},_0x5d2b10=resolveWriteScope(_0xf5e289),_0x1f732e=readScopedConfig(_0x5d2b10);let _0x3f4e4f=_0x4c58c7,_0x3206ea=_0x207699;_0x4c58c7===_0x275f17(0x97)&&(_0x3f4e4f=_0x275f17(0x75),delete _0x1f732e[_0x275f17(0x97)]);_0x4c58c7===_0x275f17(0x9f)&&(_0x3206ea=normalizeLocale(_0x207699));if(_0x4c58c7===_0x275f17(0x8a)){_0x3206ea=normalizeEnv(_0x207699);if(!isProduction(_0x3206ea)&&!isDaily(_0x3206ea))throw CliErrors[_0x275f17(0x7f)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x4c58c7===_0x275f17(0x75)){const _0x4d2083=_0x1f732e[_0x275f17(0x8b)]&&typeof _0x1f732e[_0x275f17(0x8b)]===_0x275f17(0x92)?Object[_0x275f17(0x96)](_0x1f732e[_0x275f17(0x8b)]):[];if(_0x4d2083[_0x275f17(0x9b)]>0x0)throw CliErrors[_0x275f17(0x7f)](_0x275f17(0xa2),'Use\x20`'+CLI_BIN_NAME+_0x275f17(0x94)+_0x3206ea+'`,\x20`'+CLI_BIN_NAME+_0x275f17(0xa6));const _0xa61ad7=buildCanonicalProjectConfig({..._0x1f732e},{'appCodes':[_0x3206ea],'env':typeof _0x1f732e[_0x275f17(0x8a)]===_0x275f17(0x91)?_0x1f732e[_0x275f17(0x8a)]:undefined});writeScopedConfig(_0xa61ad7,_0x5d2b10);const _0x22f6d5=_0x5d2b10===_0x275f17(0x7a)?'Global':_0x275f17(0x88);return{'ok':!![],'message':'✓\x20'+_0x22f6d5+'\x20appcode\x20set\x20to:\x20'+_0x3206ea+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x1f732e[_0x3f4e4f]=_0x3206ea,writeScopedConfig(_0x1f732e,_0x5d2b10);const _0x54edba=_0x5d2b10===_0x275f17(0x7a)?'Global':_0x275f17(0x88);return{'ok':!![],'message':'✓\x20'+_0x54edba+'\x20'+_0x3f4e4f+_0x275f17(0xa5)+_0x3206ea};}export const configSetDefinition={'service':a54_0x2bb464(0x81),'command':a54_0x2bb464(0x93),'description':a54_0x2bb464(0xa0),'risk':a54_0x2bb464(0xa3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x2bb464(0x9c),'type':a54_0x2bb464(0x91),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a54_0x2bb464(0x9a),'type':a54_0x2bb464(0x91),'description':a54_0x2bb464(0x8e),'required':!![]},{'name':a54_0x2bb464(0x7a),'type':a54_0x2bb464(0x95),'description':a54_0x2bb464(0x82),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0xd2729b,_0x4f9767){var _0xe9ed3d=a55_0x32a2,_0x69921b=_0xd2729b();while(!![]){try{var _0x5ee65f=parseInt(_0xe9ed3d(0xf1))/0x1+-parseInt(_0xe9ed3d(0xee))/0x2*(-parseInt(_0xe9ed3d(0xe9))/0x3)+parseInt(_0xe9ed3d(0xf3))/0x4+parseInt(_0xe9ed3d(0xeb))/0x5*(parseInt(_0xe9ed3d(0xf2))/0x6)+parseInt(_0xe9ed3d(0xf0))/0x7+-parseInt(_0xe9ed3d(0xf5))/0x8+-parseInt(_0xe9ed3d(0xf4))/0x9;if(_0x5ee65f===_0x4f9767)break;else _0x69921b['push'](_0x69921b['shift']());}catch(_0x1a3829){_0x69921b['push'](_0x69921b['shift']());}}}(a55_0x27fa,0x85e9f));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a55_0x27fa(){var _0x51eb89=['4109084hpTmtX','640013jEdVxL','3774xcybsb','113384ohnWcx','13105935SNDuWp','1852232KjHPIj','2127rQegWZ','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','7645jcTTTq','\x20init`\x20first.','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','54LWnEvh','validation'];a55_0x27fa=function(){return _0x51eb89;};return a55_0x27fa();}function a55_0x32a2(_0x2501ec,_0x4531d3){_0x2501ec=_0x2501ec-0xe9;var _0x27fa91=a55_0x27fa();var _0x32a243=_0x27fa91[_0x2501ec];return _0x32a243;}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x475c44){var _0x73c0d8=a55_0x32a2;if(_0x475c44['global'])return'global';if(!isInProject())throw CliErrors[_0x73c0d8(0xef)](_0x73c0d8(0xea),_0x73c0d8(0xed)+CLI_BIN_NAME+_0x73c0d8(0xec));return'project';}export function readScopedConfig(_0x5b7be9){return readConfigFile(resolveWriteConfigPath(_0x5b7be9));}export function writeScopedConfig(_0x26729f,_0x3f282e){writeConfigFile(resolveWriteConfigPath(_0x3f282e),_0x26729f);}
1
+ (function(_0x5bdd4d,_0x1580c1){var _0x4e40e3=a55_0x1544,_0x3f124d=_0x5bdd4d();while(!![]){try{var _0x35aff5=-parseInt(_0x4e40e3(0xcb))/0x1+parseInt(_0x4e40e3(0xd7))/0x2*(-parseInt(_0x4e40e3(0xd3))/0x3)+parseInt(_0x4e40e3(0xcf))/0x4+-parseInt(_0x4e40e3(0xce))/0x5*(parseInt(_0x4e40e3(0xd0))/0x6)+-parseInt(_0x4e40e3(0xd2))/0x7+-parseInt(_0x4e40e3(0xd1))/0x8+parseInt(_0x4e40e3(0xcd))/0x9*(parseInt(_0x4e40e3(0xd4))/0xa);if(_0x35aff5===_0x1580c1)break;else _0x3f124d['push'](_0x3f124d['shift']());}catch(_0x4c8e45){_0x3f124d['push'](_0x3f124d['shift']());}}}(a55_0x53e0,0x3233d));import{CLI_BIN_NAME}from'../../constant/cli.js';function a55_0x1544(_0x24feba,_0x549285){_0x24feba=_0x24feba-0xc8;var _0x53e008=a55_0x53e0();var _0x15440e=_0x53e008[_0x24feba];return _0x15440e;}import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x25c878){var _0x4373fb=a55_0x1544;if(_0x25c878[_0x4373fb(0xc8)])return _0x4373fb(0xc8);if(!isInProject())throw CliErrors[_0x4373fb(0xc9)](_0x4373fb(0xd5),_0x4373fb(0xcc)+CLI_BIN_NAME+_0x4373fb(0xca));return _0x4373fb(0xd6);}export function readScopedConfig(_0x503874){return readConfigFile(resolveWriteConfigPath(_0x503874));}export function writeScopedConfig(_0x425488,_0x34f823){writeConfigFile(resolveWriteConfigPath(_0x34f823),_0x425488);}function a55_0x53e0(){var _0x3fdbbb=['4398CPCbPj','1817312yOmHGg','1104194jeYNFf','149157ulMfpE','1459270YoByYH','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','project','6Bcxrly','global','validation','\x20init`\x20first.','340900owkLqg','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','63ryMJVl','1445eMHiuY','1083760OdeHbM'];a55_0x53e0=function(){return _0x3fdbbb;};return a55_0x53e0();}
@@ -1 +1 @@
1
- function a56_0x4703(_0x271cd2,_0x5c7b23){_0x271cd2=_0x271cd2-0x94;const _0x629f1e=a56_0x629f();let _0x470390=_0x629f1e[_0x271cd2];return _0x470390;}const a56_0x5e57fb=a56_0x4703;(function(_0x4d445a,_0x5ec98d){const _0x2e9de1=a56_0x4703,_0x72e996=_0x4d445a();while(!![]){try{const _0x22eee7=-parseInt(_0x2e9de1(0xa6))/0x1*(-parseInt(_0x2e9de1(0x9d))/0x2)+-parseInt(_0x2e9de1(0x9b))/0x3*(parseInt(_0x2e9de1(0x9c))/0x4)+-parseInt(_0x2e9de1(0x9f))/0x5*(parseInt(_0x2e9de1(0xa7))/0x6)+parseInt(_0x2e9de1(0xa1))/0x7*(parseInt(_0x2e9de1(0x97))/0x8)+-parseInt(_0x2e9de1(0x98))/0x9+parseInt(_0x2e9de1(0xa0))/0xa*(parseInt(_0x2e9de1(0x94))/0xb)+parseInt(_0x2e9de1(0xa2))/0xc;if(_0x22eee7===_0x5ec98d)break;else _0x72e996['push'](_0x72e996['shift']());}catch(_0x365ca1){_0x72e996['push'](_0x72e996['shift']());}}}(a56_0x629f,0x512f0));function a56_0x629f(){const _0x2d0bab=['\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','774429YlbKcX','4GAXoDV','89242rWstFg','join','889340SJWzSC','10RPCAzU','711578jjGYaw','10027668DjMfJL','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','1XNSAET','18cOLmfM','4539029BzPiCX','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','filter','16KocncS','3347388JlFXSm','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions'];a56_0x629f=function(){return _0x2d0bab;};return a56_0x629f();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a56_0x5e57fb(0x96),'operation':a56_0x5e57fb(0x96),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a56_0x5e57fb(0x95),'helpExtra':[a56_0x5e57fb(0xa4),a56_0x5e57fb(0x99),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a56_0x5e57fb(0xa3),a56_0x5e57fb(0x9a),a56_0x5e57fb(0xa5)][a56_0x5e57fb(0x9e)]('\x0a')});
1
+ const a56_0x22c216=a56_0xa30b;(function(_0x563ca9,_0x4f9d0a){const _0x446806=a56_0xa30b,_0x3e05f9=_0x563ca9();while(!![]){try{const _0x1b6cd6=parseInt(_0x446806(0x7d))/0x1+parseInt(_0x446806(0x77))/0x2*(parseInt(_0x446806(0x72))/0x3)+-parseInt(_0x446806(0x6d))/0x4+parseInt(_0x446806(0x6b))/0x5+parseInt(_0x446806(0x79))/0x6*(parseInt(_0x446806(0x7a))/0x7)+-parseInt(_0x446806(0x7c))/0x8*(-parseInt(_0x446806(0x7b))/0x9)+-parseInt(_0x446806(0x75))/0xa*(parseInt(_0x446806(0x71))/0xb);if(_0x1b6cd6===_0x4f9d0a)break;else _0x3e05f9['push'](_0x3e05f9['shift']());}catch(_0xa97bc2){_0x3e05f9['push'](_0x3e05f9['shift']());}}}(a56_0x4842,0xa886a));function a56_0x4842(){const _0x2e554a=['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','24XYfzFM','1713082sBhdtc','7479864MRqCjp','8MyRHrV','931307YOoJwd','\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}]','2808675klLBxD','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','1903532PHIIUJ','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','join','41888uzTJYG','3kmzLIB','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','Filter\x20dataset\x20records\x20with\x20query\x20conditions','8480uYucli','filter','2184614FedQAi'];a56_0x4842=function(){return _0x2e554a;};return a56_0x4842();}function a56_0xa30b(_0x166d2c,_0x8654a2){_0x166d2c=_0x166d2c-0x6a;const _0x48420b=a56_0x4842();let _0xa30b48=_0x48420b[_0x166d2c];return _0xa30b48;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a56_0x22c216(0x76),'operation':'filter','description':a56_0x22c216(0x74),'paramsRequired':![],'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a56_0x22c216(0x78),a56_0x22c216(0x6c),a56_0x22c216(0x6e),a56_0x22c216(0x6a),a56_0x22c216(0x6f),a56_0x22c216(0x73)][a56_0x22c216(0x70)]('\x0a')});
@@ -1 +1 @@
1
- function a57_0x1626(){const _0x233997=['410931WRgPfS','70606eYKGZP','1686632MMJXEs','19809550WFgTzw','27xHexyP','148165YzfKal','19542CgUCyu','getOne','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','1883OULfzN','8jPUtnX','5255172fmGnHf'];a57_0x1626=function(){return _0x233997;};return a57_0x1626();}const a57_0x148926=a57_0x51f5;function a57_0x51f5(_0x1a62da,_0x146f0a){_0x1a62da=_0x1a62da-0x158;const _0x16260d=a57_0x1626();let _0x51f5c7=_0x16260d[_0x1a62da];return _0x51f5c7;}(function(_0x4b7124,_0x4ce52f){const _0x18ec8e=a57_0x51f5,_0x2beebe=_0x4b7124();while(!![]){try{const _0x3f1712=parseInt(_0x18ec8e(0x164))/0x1+-parseInt(_0x18ec8e(0x158))/0x2*(parseInt(_0x18ec8e(0x15b))/0x3)+-parseInt(_0x18ec8e(0x162))/0x4*(-parseInt(_0x18ec8e(0x15c))/0x5)+parseInt(_0x18ec8e(0x15d))/0x6*(-parseInt(_0x18ec8e(0x161))/0x7)+-parseInt(_0x18ec8e(0x159))/0x8+-parseInt(_0x18ec8e(0x163))/0x9+parseInt(_0x18ec8e(0x15a))/0xa;if(_0x3f1712===_0x4ce52f)break;else _0x2beebe['push'](_0x2beebe['shift']());}catch(_0x347f27){_0x2beebe['push'](_0x2beebe['shift']());}}}(a57_0x1626,0x70edb));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a57_0x148926(0x15e),'operation':'getOne','description':a57_0x148926(0x15f),'paramsRequired':!![],'paramsHint':a57_0x148926(0x160)});
1
+ const a57_0x1d1c94=a57_0x565c;(function(_0x1a64c2,_0x3eee75){const _0x4c27de=a57_0x565c,_0x13fdb2=_0x1a64c2();while(!![]){try{const _0x2d78aa=parseInt(_0x4c27de(0xde))/0x1+-parseInt(_0x4c27de(0xd3))/0x2*(-parseInt(_0x4c27de(0xda))/0x3)+parseInt(_0x4c27de(0xdc))/0x4*(parseInt(_0x4c27de(0xdd))/0x5)+-parseInt(_0x4c27de(0xd4))/0x6*(-parseInt(_0x4c27de(0xd5))/0x7)+-parseInt(_0x4c27de(0xdb))/0x8+parseInt(_0x4c27de(0xd6))/0x9+-parseInt(_0x4c27de(0xd8))/0xa;if(_0x2d78aa===_0x3eee75)break;else _0x13fdb2['push'](_0x13fdb2['shift']());}catch(_0x3a93c5){_0x13fdb2['push'](_0x13fdb2['shift']());}}}(a57_0x2517,0x932d9));function a57_0x2517(){const _0x15bc82=['91KfVnAX','1761669azDbtX','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','15996040CAwtby','Get\x20a\x20single\x20record\x20by\x20ID','1080120iKmOsM','4254680VqqVaP','647772dWkpEX','25alLWus','900597xXgpAR','4oRRTtH','49914fhyuhm'];a57_0x2517=function(){return _0x15bc82;};return a57_0x2517();}import{buildDataCommand}from'../../commands/data/shared.js';function a57_0x565c(_0x424b98,_0x2309b8){_0x424b98=_0x424b98-0xd3;const _0x251766=a57_0x2517();let _0x565cb3=_0x251766[_0x424b98];return _0x565cb3;}export const dataGetOne=buildDataCommand({'command':'getOne','operation':'getOne','description':a57_0x1d1c94(0xd9),'paramsRequired':!![],'paramsHint':a57_0x1d1c94(0xd7)});
@@ -1 +1 @@
1
- (function(_0x2f9767,_0x486b63){const _0x42e1a7=a58_0x2844,_0x1575b2=_0x2f9767();while(!![]){try{const _0x36216e=-parseInt(_0x42e1a7(0x13d))/0x1+-parseInt(_0x42e1a7(0x136))/0x2+-parseInt(_0x42e1a7(0x137))/0x3*(parseInt(_0x42e1a7(0x13a))/0x4)+-parseInt(_0x42e1a7(0x13f))/0x5*(-parseInt(_0x42e1a7(0x138))/0x6)+parseInt(_0x42e1a7(0x13b))/0x7+parseInt(_0x42e1a7(0x139))/0x8+-parseInt(_0x42e1a7(0x13e))/0x9*(-parseInt(_0x42e1a7(0x13c))/0xa);if(_0x36216e===_0x486b63)break;else _0x1575b2['push'](_0x1575b2['shift']());}catch(_0x5d773a){_0x1575b2['push'](_0x1575b2['shift']());}}}(a58_0x36ce,0x891c5));import{dataFilter}from'../../commands/data/filter.js';function a58_0x36ce(){const _0x5ba68a=['1551771WYYVeX','4543740JgBiiz','2048270yrrXSI','2247tsTLyc','6WVKNId','3074952cdUrGM','1228YziYWq','2903138opNaRD','50hNoZRX','754263RiCTJf'];a58_0x36ce=function(){return _0x5ba68a;};return a58_0x36ce();}import{dataGetOne}from'../../commands/data/getOne.js';function a58_0x2844(_0x3d5cdd,_0x59406f){_0x3d5cdd=_0x3d5cdd-0x136;const _0x36ce40=a58_0x36ce();let _0x2844bf=_0x36ce40[_0x3d5cdd];return _0x2844bf;}export const dataDefinitions=[dataFilter,dataGetOne];
1
+ (function(_0xf29f0e,_0x383e8c){const _0x1917e3=a58_0x1f26,_0x4686ee=_0xf29f0e();while(!![]){try{const _0x18ab0d=parseInt(_0x1917e3(0x1e0))/0x1*(parseInt(_0x1917e3(0x1df))/0x2)+-parseInt(_0x1917e3(0x1e6))/0x3+-parseInt(_0x1917e3(0x1e1))/0x4+-parseInt(_0x1917e3(0x1e5))/0x5*(parseInt(_0x1917e3(0x1e3))/0x6)+-parseInt(_0x1917e3(0x1e7))/0x7+-parseInt(_0x1917e3(0x1e4))/0x8+parseInt(_0x1917e3(0x1e2))/0x9;if(_0x18ab0d===_0x383e8c)break;else _0x4686ee['push'](_0x4686ee['shift']());}catch(_0xa4e9b6){_0x4686ee['push'](_0x4686ee['shift']());}}}(a58_0x1f03,0xabeb3));function a58_0x1f03(){const _0x1e40a8=['31782240YEXWpk','48vLlAfR','5781768qQwhxc','111985HSnius','3902205xNewnF','8631567VrcxUZ','2tRmXBa','1194759ffXyfq','2344908AsVwEh'];a58_0x1f03=function(){return _0x1e40a8;};return a58_0x1f03();}import{dataFilter}from'../../commands/data/filter.js';function a58_0x1f26(_0x18b2e8,_0x3f8d5a){_0x18b2e8=_0x18b2e8-0x1df;const _0x1f0374=a58_0x1f03();let _0x1f26ac=_0x1f0374[_0x18b2e8];return _0x1f26ac;}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x462f39,_0x4f315c){const _0x294f63=a59_0xba46,_0xa6dcd1=_0x462f39();while(!![]){try{const _0x27a70f=-parseInt(_0x294f63(0xcb))/0x1+parseInt(_0x294f63(0xd4))/0x2+parseInt(_0x294f63(0xda))/0x3*(parseInt(_0x294f63(0xdf))/0x4)+parseInt(_0x294f63(0xe5))/0x5+parseInt(_0x294f63(0xdc))/0x6*(-parseInt(_0x294f63(0xe9))/0x7)+parseInt(_0x294f63(0xd3))/0x8*(parseInt(_0x294f63(0xe2))/0x9)+parseInt(_0x294f63(0xe4))/0xa*(-parseInt(_0x294f63(0xd6))/0xb);if(_0x27a70f===_0x4f315c)break;else _0xa6dcd1['push'](_0xa6dcd1['shift']());}catch(_0x260b76){_0xa6dcd1['push'](_0xa6dcd1['shift']());}}}(a59_0x392d,0x26916));function a59_0x392d(){const _0x4bbdc3=['63393JaBKUT','appCode','params','\x20completed\x20in\x20','17931XbSixY','command','360CIqkSM','flagMissing','helpExtra','4VRxzGo','paramsRequired','paramsHint','1794699FuxMCR','now','310MafrGt','1111650gpImDy','validation','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','15253utepLi','data\x20','264730dBlPQV','operation','string','code','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','alias','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','str','8GqopiF','608758BdCRNo','description'];a59_0x392d=function(){return _0x4bbdc3;};return a59_0x392d();}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0xba46(_0x583a57,_0x512ba3){_0x583a57=_0x583a57-0xcb;const _0x392deb=a59_0x392d();let _0xba46a6=_0x392deb[_0x583a57];return _0xba46a6;}import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x50c42a){const _0x41bc55=a59_0xba46;if(!_0x50c42a)throw CliErrors[_0x41bc55(0xdd)](_0x41bc55(0xd8),_0x41bc55(0xe7));const _0x447010=_0x50c42a['id'];if(_0x447010===undefined||_0x447010===null||_0x447010==='')throw CliErrors[_0x41bc55(0xe6)](_0x41bc55(0xcf),_0x41bc55(0xe8));}function parseCommandParams(_0x56c2d4){return parseJsonParams(_0x56c2d4)??{};}export function buildDataCommand(_0x169761){const _0x58a323=a59_0xba46,_0x258229=_0x58a323(0xd1);return{'service':'data','command':_0x169761[_0x58a323(0xdb)],'description':_0x169761[_0x58a323(0xd5)],'risk':'read','defaultOutputFormat':'compress','helpExtra':_0x169761[_0x58a323(0xde)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x58a323(0xd0),'type':_0x58a323(0xcd),'description':_0x258229},{'name':'params','type':_0x58a323(0xcd),'description':_0x169761[_0x58a323(0xe1)]}],async 'validate'(_0x2c7f91){const _0x4ee61c=_0x58a323,_0xc21b46=_0x2c7f91[_0x4ee61c(0xd2)]('params');if(_0x169761[_0x4ee61c(0xe0)]&&!_0xc21b46)throw CliErrors[_0x4ee61c(0xdd)](_0x4ee61c(0xd8),_0x169761[_0x4ee61c(0xe1)]);const _0x3108b4=parseJsonParams(_0xc21b46);_0x169761[_0x4ee61c(0xcc)]==='getOne'&&assertGetOneId(_0x3108b4);},async 'execute'(_0xc0c181){const _0x37fd3b=_0x58a323,_0x1402d1=parseCommandParams(_0xc0c181[_0x37fd3b(0xd2)](_0x37fd3b(0xd8))),_0x5c6854=Date[_0x37fd3b(0xe3)](),_0x17656f=await executeDatasetDataOperation(_0xc0c181[_0x37fd3b(0xd7)],_0xc0c181[_0x37fd3b(0xd2)](_0x37fd3b(0xce)),_0x169761[_0x37fd3b(0xcc)],_0x1402d1),_0x345b48=Date[_0x37fd3b(0xe3)]()-_0x5c6854;return{'ok':!![],'data':{'result':_0x17656f,'elapsed':_0x345b48},'message':_0x37fd3b(0xea)+_0x169761[_0x37fd3b(0xdb)]+_0x37fd3b(0xd9)+_0x345b48+'ms'};}};}
1
+ (function(_0x2774da,_0x448b2c){const _0x2b705b=a59_0x5d17,_0x5a0fd8=_0x2774da();while(!![]){try{const _0x2b3eb0=-parseInt(_0x2b705b(0xe5))/0x1*(-parseInt(_0x2b705b(0xe2))/0x2)+-parseInt(_0x2b705b(0xde))/0x3+-parseInt(_0x2b705b(0xee))/0x4+-parseInt(_0x2b705b(0xf0))/0x5*(-parseInt(_0x2b705b(0xf1))/0x6)+parseInt(_0x2b705b(0xe9))/0x7+parseInt(_0x2b705b(0xf6))/0x8*(-parseInt(_0x2b705b(0xe0))/0x9)+parseInt(_0x2b705b(0xef))/0xa;if(_0x2b3eb0===_0x448b2c)break;else _0x5a0fd8['push'](_0x5a0fd8['shift']());}catch(_0xa4a0b3){_0x5a0fd8['push'](_0x5a0fd8['shift']());}}}(a59_0x30ae,0x8fa27));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_0x30ae(){const _0x184517=['5211xFetHm','helpExtra','57620ZzxChY','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','validation','15AxnwZf','code','str','appCode','4055786SPtpGg','compress','flagMissing','now','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','1010572aEoGKk','6662410CQkvzw','6595ogokST','5232fCtHRW','params','paramsHint','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','command','13712rMmIeC','string','operation','paramsRequired','2983743UZBhdd','data'];a59_0x30ae=function(){return _0x184517;};return a59_0x30ae();}function a59_0x5d17(_0x55936a,_0x18dd3d){_0x55936a=_0x55936a-0xdb;const _0x30aef3=a59_0x30ae();let _0x5d1795=_0x30aef3[_0x55936a];return _0x5d1795;}function assertGetOneId(_0x579adf){const _0x888369=a59_0x5d17;if(!_0x579adf)throw CliErrors[_0x888369(0xeb)](_0x888369(0xf2),_0x888369(0xe3));const _0x2c14e6=_0x579adf['id'];if(_0x2c14e6===undefined||_0x2c14e6===null||_0x2c14e6==='')throw CliErrors[_0x888369(0xe4)](_0x888369(0xed),_0x888369(0xf4));}function parseCommandParams(_0x3b1bcc){return parseJsonParams(_0x3b1bcc)??{};}export function buildDataCommand(_0x4ef26f){const _0x4a1473=a59_0x5d17,_0x484616='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x4a1473(0xdf),'command':_0x4ef26f[_0x4a1473(0xf5)],'description':_0x4ef26f['description'],'risk':'read','defaultOutputFormat':_0x4a1473(0xea),'helpExtra':_0x4ef26f[_0x4a1473(0xe1)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x4a1473(0xdb),'description':_0x484616},{'name':'params','type':'string','description':_0x4ef26f[_0x4a1473(0xf3)]}],async 'validate'(_0x36be29){const _0x2eef0e=_0x4a1473,_0x28a722=_0x36be29[_0x2eef0e(0xe7)]('params');if(_0x4ef26f[_0x2eef0e(0xdd)]&&!_0x28a722)throw CliErrors[_0x2eef0e(0xeb)](_0x2eef0e(0xf2),_0x4ef26f[_0x2eef0e(0xf3)]);const _0x20e9af=parseJsonParams(_0x28a722);_0x4ef26f[_0x2eef0e(0xdc)]==='getOne'&&assertGetOneId(_0x20e9af);},async 'execute'(_0x5cdbe8){const _0x32fa53=_0x4a1473,_0x225940=parseCommandParams(_0x5cdbe8[_0x32fa53(0xe7)](_0x32fa53(0xf2))),_0x1e7aa3=Date[_0x32fa53(0xec)](),_0x2644ad=await executeDatasetDataOperation(_0x5cdbe8[_0x32fa53(0xe8)],_0x5cdbe8[_0x32fa53(0xe7)](_0x32fa53(0xe6)),_0x4ef26f[_0x32fa53(0xdc)],_0x225940),_0x1c8177=Date['now']()-_0x1e7aa3;return{'ok':!![],'data':{'result':_0x2644ad,'elapsed':_0x1c8177},'message':'data\x20'+_0x4ef26f[_0x32fa53(0xf5)]+'\x20completed\x20in\x20'+_0x1c8177+'ms'};}};}
@@ -1 +1 @@
1
- const a60_0x3a79aa=a60_0x4c12;function a60_0x4c12(_0xdb0f6,_0x54e520){_0xdb0f6=_0xdb0f6-0x1ab;const _0x4162a5=a60_0x4162();let _0x4c12ac=_0x4162a5[_0xdb0f6];return _0x4c12ac;}(function(_0x53472a,_0x11634b){const _0x2a1b65=a60_0x4c12,_0x1b237e=_0x53472a();while(!![]){try{const _0x1a7519=parseInt(_0x2a1b65(0x1b3))/0x1*(parseInt(_0x2a1b65(0x1d4))/0x2)+parseInt(_0x2a1b65(0x1cd))/0x3*(-parseInt(_0x2a1b65(0x1cc))/0x4)+parseInt(_0x2a1b65(0x1b0))/0x5*(parseInt(_0x2a1b65(0x1d7))/0x6)+-parseInt(_0x2a1b65(0x1dc))/0x7+parseInt(_0x2a1b65(0x1e7))/0x8+-parseInt(_0x2a1b65(0x1bd))/0x9+-parseInt(_0x2a1b65(0x1ac))/0xa*(-parseInt(_0x2a1b65(0x1da))/0xb);if(_0x1a7519===_0x11634b)break;else _0x1b237e['push'](_0x1b237e['shift']());}catch(_0x1c163e){_0x1b237e['push'](_0x1b237e['shift']());}}}(a60_0x4162,0xcf1a9));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a60_0x3a79aa(0x1c1);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x91a54a,input:_0x5694e6,dryRun:_0x54bc76}){const _0x1f9fef=a60_0x3a79aa;validateInput(_0x5694e6);const _0x1055d9=normalizeBusinessGroup(_0x5694e6['businessGroup']),_0xd28575=await getDatasetDetail(_0x5694e6['code']),_0x4ff87e=resolveBusinessGroupDataset(_0xd28575,_0x5694e6[_0x1f9fef(0x1e6)]),_0x28f9cf=loadCurrentBusinessGroup(_0xd28575,_0x4ff87e);assertExpectedBusinessGroup(_0x28f9cf,_0x5694e6[_0x1f9fef(0x1e5)]);const _0x3c68e5=buildBackendPayload(_0x91a54a,_0x4ff87e,_0x1055d9),_0x57ce31=_0x28f9cf!==_0x1055d9;let _0x3d7567;if(_0x57ce31&&!_0x54bc76){await updateErBusinessGroup(_0x3c68e5);const _0xa28020=await getDatasetDetail(_0x4ff87e[_0x1f9fef(0x1e6)]),_0xa1ae52=resolveBusinessGroupDataset(_0xa28020,_0x4ff87e[_0x1f9fef(0x1e6)]),_0x4d1908=loadCurrentBusinessGroup(_0xa28020,_0xa1ae52);if(_0x4d1908!==_0x1055d9)throw CliErrors[_0x1f9fef(0x1c9)]('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x1f9fef(0x1b8)+JSON[_0x1f9fef(0x1df)](_0x1055d9)+_0x1f9fef(0x1ad)+JSON['stringify'](_0x4d1908)+'.');_0x3d7567={'verified':!![],'status':_0x1f9fef(0x1e2),'afterReadback':{'businessGroup':_0x4d1908}};}else!_0x57ce31&&(_0x3d7567={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x28f9cf}});const _0x11cab9={'operation':'update','appCode':_0x91a54a,'selector':{'code':_0x4ff87e[_0x1f9fef(0x1e6)]},'dataset':_0x4ff87e,'before':{'businessGroup':_0x28f9cf},'after':{'businessGroup':_0x1055d9},'changed':_0x57ce31,'dryRun':_0x54bc76,'submitted':_0x57ce31&&!_0x54bc76,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x3c68e5},..._0x3d7567?{'verification':_0x3d7567}:{},'warnings':[]};return{'ok':!![],'data':_0x11cab9,'message':_0x57ce31?_0x54bc76?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x4ff87e[_0x1f9fef(0x1e6)]:_0x1f9fef(0x1b2)+_0x4ff87e[_0x1f9fef(0x1e6)]:_0x1f9fef(0x1db)+_0x4ff87e[_0x1f9fef(0x1e6)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a60_0x3a79aa(0x1b1),'description':a60_0x3a79aa(0x1b6),'risk':a60_0x3a79aa(0x1d1),'flags':[CODE_FLAG,{'name':a60_0x3a79aa(0x1ab),'type':a60_0x3a79aa(0x1e3),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it'},{'name':a60_0x3a79aa(0x1dd),'type':'string','required':![],'description':a60_0x3a79aa(0x1c6)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x15247c){validateInput(readBusinessGroupUpdateInput(_0x15247c));},async 'dryRun'(_0x947a11){const _0x53fbdc=a60_0x3a79aa,_0x1b1419=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x947a11[_0x53fbdc(0x1b4)],'input':readBusinessGroupUpdateInput(_0x947a11),'dryRun':!![]});return{'method':_0x53fbdc(0x1bb),'url':BACKEND_PATH,'body':_0x1b1419[_0x53fbdc(0x1c4)][_0x53fbdc(0x1d9)][_0x53fbdc(0x1d0)],'description':_0x1b1419[_0x53fbdc(0x1e8)],..._0x1b1419['data']};},async 'execute'(_0x4bcffb){const _0x1a245c=a60_0x3a79aa;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x4bcffb[_0x1a245c(0x1b4)],'input':readBusinessGroupUpdateInput(_0x4bcffb),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x70ac9d){const _0x3ae6ad=a60_0x3a79aa,_0x1a0de2=_0x70ac9d[_0x3ae6ad(0x1bc)]('expect-business-group');return{'code':trim(_0x70ac9d['str'](_0x3ae6ad(0x1e6))),'businessGroup':_0x70ac9d[_0x3ae6ad(0x1bc)](_0x3ae6ad(0x1ab)),'expectBusinessGroup':_0x1a0de2===undefined||_0x1a0de2===''?undefined:_0x1a0de2};}function validateInput(_0x22a891){const _0xf247b8=a60_0x3a79aa;if(!trim(_0x22a891['code']))throw CliErrors[_0xf247b8(0x1ce)]('--code\x20is\x20required');if(_0x22a891[_0xf247b8(0x1d5)]===undefined)throw CliErrors[_0xf247b8(0x1ce)](_0xf247b8(0x1ea));}function resolveBusinessGroupDataset(_0x681ef2,_0x35756c){const _0x1551e0=a60_0x3a79aa,_0x3fdb28=asPlainObject(_0x681ef2[_0x1551e0(0x1cb)]),_0x5ed14c=asPlainObject(_0x681ef2[_0x1551e0(0x1c0)]),_0x29db6d=resolveSourceType(_0x681ef2,_0x3fdb28,_0x5ed14c),_0x1dc452=firstString(_0x681ef2[_0x1551e0(0x1af)],_0x681ef2[_0x1551e0(0x1e6)],_0x3fdb28['datasetCode'],_0x35756c)||_0x35756c;return{'id':firstNumber(_0x681ef2[_0x1551e0(0x1c3)],_0x681ef2['id'],_0x3fdb28[_0x1551e0(0x1e9)])??firstString(_0x681ef2['modelId'],_0x681ef2['id'],_0x3fdb28[_0x1551e0(0x1e9)])??null,'code':_0x1dc452,'name':firstString(_0x681ef2[_0x1551e0(0x1e0)],_0x3fdb28['datasetName'],_0x3fdb28[_0x1551e0(0x1e0)])||null,'sourceType':_0x29db6d};}function resolveSourceType(_0x520f66,_0x57219b,_0x2a81f9){const _0x442f33=a60_0x3a79aa,_0x326ef3=firstString(_0x520f66['source'],_0x520f66[_0x442f33(0x1ca)],_0x57219b[_0x442f33(0x1b5)],_0x57219b[_0x442f33(0x1ca)])?.[_0x442f33(0x1d3)]()[_0x442f33(0x1c5)]();if(_0x326ef3===_0x442f33(0x1ba)||_0x326ef3===_0x442f33(0x1be))return _0x326ef3;if(Object[_0x442f33(0x1d6)](_0x2a81f9)['length']>0x0)return'DB_TABLE';throw CliErrors[_0x442f33(0x1ce)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x2727fd,_0xe11754){const _0x45970a=a60_0x3a79aa,_0xc9fc61=readBusinessGroupFromDatasetDetail(_0x2727fd,_0xe11754[_0x45970a(0x1ca)]);if(_0xc9fc61['found'])return normalizeBusinessGroup(_0xc9fc61[_0x45970a(0x1de)]);if(_0xe11754[_0x45970a(0x1ca)]===_0x45970a(0x1be))return'';throw CliErrors[_0x45970a(0x1ce)](_0x45970a(0x1d8),_0x45970a(0x1bf));}function readBusinessGroupFromDatasetDetail(_0x326246,_0x447bc1){const _0x4a6ab5=a60_0x3a79aa,_0x5d65ca=asPlainObject(_0x326246['dataset']),_0x18484a=firstPresent(_0x326246['businessGroup']);if(_0x18484a[_0x4a6ab5(0x1c2)])return _0x18484a;const _0xb2464d=firstPresent(_0x5d65ca[_0x4a6ab5(0x1d5)]);if(_0xb2464d[_0x4a6ab5(0x1c2)])return _0xb2464d;if(_0x447bc1===_0x4a6ab5(0x1ba))return{'found':![]};const _0x49cc03=readBusinessGroupFromExtend(_0x326246[_0x4a6ab5(0x1c8)]);if(_0x49cc03[_0x4a6ab5(0x1c2)])return _0x49cc03;return readBusinessGroupFromExtend(_0x5d65ca[_0x4a6ab5(0x1c8)]);}function readBusinessGroupFromExtend(_0x265022){const _0x509e6c=a60_0x3a79aa;if(_0x265022===undefined||_0x265022===null||_0x265022==='')return{'found':![]};if(typeof _0x265022===_0x509e6c(0x1e3))try{const _0x39a837=JSON[_0x509e6c(0x1ae)](_0x265022);return readBusinessGroupFromExtend(_0x39a837);}catch{return{'found':![]};}const _0x13a749=asPlainObject(_0x265022);if(Object[_0x509e6c(0x1e4)][_0x509e6c(0x1b9)][_0x509e6c(0x1d2)](_0x13a749,_0x509e6c(0x1d5)))return{'found':!![],'value':_0x13a749[_0x509e6c(0x1d5)]};return{'found':![]};}function firstPresent(..._0x30978e){for(const _0x147d5f of _0x30978e){if(_0x147d5f!==undefined&&_0x147d5f!==null)return{'found':!![],'value':_0x147d5f};}return{'found':![]};}function assertExpectedBusinessGroup(_0x12651f,_0x34d3de){const _0x1487a3=a60_0x3a79aa;if(_0x34d3de===undefined)return;const _0x2d9596=normalizeBusinessGroup(_0x34d3de);if(_0x12651f!==_0x2d9596)throw CliErrors['validation'](_0x1487a3(0x1e1),_0x1487a3(0x1b8)+JSON['stringify'](_0x2d9596)+_0x1487a3(0x1ad)+JSON[_0x1487a3(0x1df)](_0x12651f));}function buildBackendPayload(_0x5e11c8,_0xa51819,_0x5cee04){const _0x54c23a=a60_0x3a79aa;return{'appCode':_0x5e11c8,'datasetCode':_0xa51819[_0x54c23a(0x1e6)],'businessGroup':_0x5cee04};}function normalizeBusinessGroup(_0x4ab2f9){if(_0x4ab2f9===undefined||_0x4ab2f9===null)return'';return String(_0x4ab2f9)['trim']();}function asPlainObject(_0x1ac0b6){const _0xe32a17=a60_0x3a79aa;if(!_0x1ac0b6||typeof _0x1ac0b6!==_0xe32a17(0x1b7)||Array[_0xe32a17(0x1c7)](_0x1ac0b6))return{};return _0x1ac0b6;}function firstString(..._0x1ab30f){const _0x921a1e=a60_0x3a79aa;for(const _0x7637f0 of _0x1ab30f){if(typeof _0x7637f0===_0x921a1e(0x1e3)&&_0x7637f0[_0x921a1e(0x1d3)]())return _0x7637f0[_0x921a1e(0x1d3)]();if(typeof _0x7637f0==='number'&&Number[_0x921a1e(0x1cf)](_0x7637f0))return String(_0x7637f0);}return undefined;}function firstNumber(..._0x29cab2){const _0x1e1349=a60_0x3a79aa;for(const _0x3b4459 of _0x29cab2){if(typeof _0x3b4459==='number'&&Number[_0x1e1349(0x1cf)](_0x3b4459))return _0x3b4459;if(typeof _0x3b4459===_0x1e1349(0x1e3)&&_0x3b4459[_0x1e1349(0x1d3)]()&&Number[_0x1e1349(0x1cf)](Number(_0x3b4459)))return Number(_0x3b4459);}return null;}function a60_0x4162(){const _0x1a2312=['prototype','expectBusinessGroup','code','3590168lrzYzL','message','datasetId','--business-group\x20is\x20required','business-group','3074970nYDByX',',\x20actual\x20','parse','modelCode','7615VUSSOU','business-group-update','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','4684xEOKXU','appCode','source','Update\x20business\x20scenario\x20group','object','Expected\x20','hasOwnProperty','DB_TABLE','POST','str','13374603LTBzvu','METADATA','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','dbtableConfig','/smartapi/question/er-config/business-group/edit','found','modelId','data','toUpperCase','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','isArray','extend','apiError','sourceType','dataset','2252572erQCpA','9wxFOMo','validation','isFinite','payload','write','call','trim','380NXJPku','businessGroup','keys','6480ijKrxW','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','backend','55xjaLxW','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','3480841HubRkE','expect-business-group','value','stringify','name','Expectation\x20mismatch\x20at\x20businessGroup','matched','string'];a60_0x4162=function(){return _0x1a2312;};return a60_0x4162();}function trim(_0x3d4dbc){const _0x141162=a60_0x3a79aa;return String(_0x3d4dbc||'')[_0x141162(0x1d3)]();}
1
+ const a60_0x2e7b1d=a60_0x12ec;(function(_0x1ac9f6,_0x33d7cd){const _0x5de4cc=a60_0x12ec,_0x80c1f9=_0x1ac9f6();while(!![]){try{const _0x36acc4=parseInt(_0x5de4cc(0x160))/0x1*(-parseInt(_0x5de4cc(0x139))/0x2)+-parseInt(_0x5de4cc(0x150))/0x3*(-parseInt(_0x5de4cc(0x16b))/0x4)+parseInt(_0x5de4cc(0x156))/0x5*(parseInt(_0x5de4cc(0x168))/0x6)+-parseInt(_0x5de4cc(0x12c))/0x7+parseInt(_0x5de4cc(0x134))/0x8*(-parseInt(_0x5de4cc(0x142))/0x9)+parseInt(_0x5de4cc(0x13d))/0xa+parseInt(_0x5de4cc(0x141))/0xb;if(_0x36acc4===_0x33d7cd)break;else _0x80c1f9['push'](_0x80c1f9['shift']());}catch(_0xd65f26){_0x80c1f9['push'](_0x80c1f9['shift']());}}}(a60_0x16ad,0x65dbb));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_0x2e7b1d(0x13b);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x269f6b,input:_0x1e41fa,dryRun:_0x4c0dbd}){const _0x4484c2=a60_0x2e7b1d;validateInput(_0x1e41fa);const _0x1dfb5b=normalizeBusinessGroup(_0x1e41fa['businessGroup']),_0x19e6b8=await getDatasetDetail(_0x1e41fa[_0x4484c2(0x15b)]),_0x1b28b5=resolveBusinessGroupDataset(_0x19e6b8,_0x1e41fa['code']),_0x48fa23=loadCurrentBusinessGroup(_0x19e6b8,_0x1b28b5);assertExpectedBusinessGroup(_0x48fa23,_0x1e41fa['expectBusinessGroup']);const _0x47fca6=buildBackendPayload(_0x269f6b,_0x1b28b5,_0x1dfb5b),_0x3f1e32=_0x48fa23!==_0x1dfb5b;let _0x369b9a;if(_0x3f1e32&&!_0x4c0dbd){await updateErBusinessGroup(_0x47fca6);const _0x2f97a1=await getDatasetDetail(_0x1b28b5[_0x4484c2(0x15b)]),_0x209c18=resolveBusinessGroupDataset(_0x2f97a1,_0x1b28b5[_0x4484c2(0x15b)]),_0x11cc17=loadCurrentBusinessGroup(_0x2f97a1,_0x209c18);if(_0x11cc17!==_0x1dfb5b)throw CliErrors[_0x4484c2(0x165)](_0x4484c2(0x14c),_0x4484c2(0x14f)+JSON[_0x4484c2(0x157)](_0x1dfb5b)+_0x4484c2(0x146)+JSON[_0x4484c2(0x157)](_0x11cc17)+'.');_0x369b9a={'verified':!![],'status':_0x4484c2(0x147),'afterReadback':{'businessGroup':_0x11cc17}};}else!_0x3f1e32&&(_0x369b9a={'verified':!![],'status':_0x4484c2(0x12d),'afterReadback':{'businessGroup':_0x48fa23}});const _0x4a53ad={'operation':_0x4484c2(0x15f),'appCode':_0x269f6b,'selector':{'code':_0x1b28b5['code']},'dataset':_0x1b28b5,'before':{'businessGroup':_0x48fa23},'after':{'businessGroup':_0x1dfb5b},'changed':_0x3f1e32,'dryRun':_0x4c0dbd,'submitted':_0x3f1e32&&!_0x4c0dbd,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x47fca6},..._0x369b9a?{'verification':_0x369b9a}:{},'warnings':[]};return{'ok':!![],'data':_0x4a53ad,'message':_0x3f1e32?_0x4c0dbd?_0x4484c2(0x159)+_0x1b28b5['code']:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x1b28b5[_0x4484c2(0x15b)]:_0x4484c2(0x14b)+_0x1b28b5[_0x4484c2(0x15b)]};}export const datasetBusinessGroupUpdate={'service':a60_0x2e7b1d(0x144),'command':a60_0x2e7b1d(0x14e),'description':'Update\x20business\x20scenario\x20group','risk':'write','flags':[CODE_FLAG,{'name':a60_0x2e7b1d(0x163),'type':'string','required':!![],'description':a60_0x2e7b1d(0x138)},{'name':a60_0x2e7b1d(0x151),'type':a60_0x2e7b1d(0x154),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xd03a54){validateInput(readBusinessGroupUpdateInput(_0xd03a54));},async 'dryRun'(_0x50b465){const _0x53d6b1=a60_0x2e7b1d,_0x3d0a1e=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x50b465[_0x53d6b1(0x137)],'input':readBusinessGroupUpdateInput(_0x50b465),'dryRun':!![]});return{'method':_0x53d6b1(0x145),'url':BACKEND_PATH,'body':_0x3d0a1e['data'][_0x53d6b1(0x133)][_0x53d6b1(0x16d)],'description':_0x3d0a1e[_0x53d6b1(0x14d)],..._0x3d0a1e[_0x53d6b1(0x169)]};},async 'execute'(_0x1221e7){const _0x2492fc=a60_0x2e7b1d;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1221e7[_0x2492fc(0x137)],'input':readBusinessGroupUpdateInput(_0x1221e7),'dryRun':![]});}};function a60_0x12ec(_0x224efd,_0x32be25){_0x224efd=_0x224efd-0x12b;const _0x16ad16=a60_0x16ad();let _0x12ec42=_0x16ad16[_0x224efd];return _0x12ec42;}function readBusinessGroupUpdateInput(_0x15c5ab){const _0x4ba82a=a60_0x2e7b1d,_0x16395d=_0x15c5ab['str'](_0x4ba82a(0x151));return{'code':trim(_0x15c5ab[_0x4ba82a(0x135)](_0x4ba82a(0x15b))),'businessGroup':_0x15c5ab[_0x4ba82a(0x135)]('business-group'),'expectBusinessGroup':_0x16395d===undefined||_0x16395d===''?undefined:_0x16395d};}function validateInput(_0x390969){const _0xee8b8f=a60_0x2e7b1d;if(!trim(_0x390969[_0xee8b8f(0x15b)]))throw CliErrors[_0xee8b8f(0x13a)](_0xee8b8f(0x158));if(_0x390969[_0xee8b8f(0x152)]===undefined)throw CliErrors[_0xee8b8f(0x13a)](_0xee8b8f(0x14a));}function resolveBusinessGroupDataset(_0x4fdce9,_0x1a43c4){const _0x32316b=a60_0x2e7b1d,_0xbcb2a7=asPlainObject(_0x4fdce9['dataset']),_0xcf66fe=asPlainObject(_0x4fdce9[_0x32316b(0x12e)]),_0x375f5a=resolveSourceType(_0x4fdce9,_0xbcb2a7,_0xcf66fe),_0x7cf6e5=firstString(_0x4fdce9[_0x32316b(0x12b)],_0x4fdce9[_0x32316b(0x15b)],_0xbcb2a7['datasetCode'],_0x1a43c4)||_0x1a43c4;return{'id':firstNumber(_0x4fdce9[_0x32316b(0x136)],_0x4fdce9['id'],_0xbcb2a7[_0x32316b(0x162)])??firstString(_0x4fdce9[_0x32316b(0x136)],_0x4fdce9['id'],_0xbcb2a7[_0x32316b(0x162)])??null,'code':_0x7cf6e5,'name':firstString(_0x4fdce9[_0x32316b(0x140)],_0xbcb2a7[_0x32316b(0x164)],_0xbcb2a7[_0x32316b(0x140)])||null,'sourceType':_0x375f5a};}function resolveSourceType(_0x1189a7,_0x4f2eee,_0x247ce3){const _0x38a462=a60_0x2e7b1d,_0x1220eb=firstString(_0x1189a7['source'],_0x1189a7[_0x38a462(0x15e)],_0x4f2eee[_0x38a462(0x143)],_0x4f2eee[_0x38a462(0x15e)])?.['trim']()[_0x38a462(0x132)]();if(_0x1220eb===_0x38a462(0x13e)||_0x1220eb==='METADATA')return _0x1220eb;if(Object[_0x38a462(0x161)](_0x247ce3)['length']>0x0)return _0x38a462(0x13e);throw CliErrors[_0x38a462(0x13a)](_0x38a462(0x12f));}function loadCurrentBusinessGroup(_0x7b61e4,_0x30d2da){const _0x3d55e5=a60_0x2e7b1d,_0x40f6bb=readBusinessGroupFromDatasetDetail(_0x7b61e4,_0x30d2da[_0x3d55e5(0x15e)]);if(_0x40f6bb['found'])return normalizeBusinessGroup(_0x40f6bb[_0x3d55e5(0x16c)]);if(_0x30d2da[_0x3d55e5(0x15e)]===_0x3d55e5(0x167))return'';throw CliErrors[_0x3d55e5(0x13a)](_0x3d55e5(0x149),_0x3d55e5(0x153));}function readBusinessGroupFromDatasetDetail(_0x26059c,_0x278d6b){const _0x5d4da2=a60_0x2e7b1d,_0x2af8bd=asPlainObject(_0x26059c[_0x5d4da2(0x144)]),_0x4df007=firstPresent(_0x26059c[_0x5d4da2(0x152)]);if(_0x4df007[_0x5d4da2(0x16a)])return _0x4df007;const _0x3947c7=firstPresent(_0x2af8bd['businessGroup']);if(_0x3947c7[_0x5d4da2(0x16a)])return _0x3947c7;if(_0x278d6b===_0x5d4da2(0x13e))return{'found':![]};const _0x2ec158=readBusinessGroupFromExtend(_0x26059c[_0x5d4da2(0x166)]);if(_0x2ec158[_0x5d4da2(0x16a)])return _0x2ec158;return readBusinessGroupFromExtend(_0x2af8bd['extend']);}function readBusinessGroupFromExtend(_0x30cfbe){const _0x54d9fa=a60_0x2e7b1d;if(_0x30cfbe===undefined||_0x30cfbe===null||_0x30cfbe==='')return{'found':![]};if(typeof _0x30cfbe==='string')try{const _0x52b07b=JSON[_0x54d9fa(0x148)](_0x30cfbe);return readBusinessGroupFromExtend(_0x52b07b);}catch{return{'found':![]};}const _0x46c814=asPlainObject(_0x30cfbe);if(Object[_0x54d9fa(0x155)][_0x54d9fa(0x13f)]['call'](_0x46c814,_0x54d9fa(0x152)))return{'found':!![],'value':_0x46c814[_0x54d9fa(0x152)]};return{'found':![]};}function firstPresent(..._0x52f15b){for(const _0x23c4e3 of _0x52f15b){if(_0x23c4e3!==undefined&&_0x23c4e3!==null)return{'found':!![],'value':_0x23c4e3};}return{'found':![]};}function assertExpectedBusinessGroup(_0x2b19e8,_0x10c631){const _0x4bdc55=a60_0x2e7b1d;if(_0x10c631===undefined)return;const _0x31f7e5=normalizeBusinessGroup(_0x10c631);if(_0x2b19e8!==_0x31f7e5)throw CliErrors[_0x4bdc55(0x13a)](_0x4bdc55(0x131),_0x4bdc55(0x14f)+JSON[_0x4bdc55(0x157)](_0x31f7e5)+_0x4bdc55(0x146)+JSON[_0x4bdc55(0x157)](_0x2b19e8));}function buildBackendPayload(_0xec6408,_0x507694,_0x3ade54){const _0x152d22=a60_0x2e7b1d;return{'appCode':_0xec6408,'datasetCode':_0x507694[_0x152d22(0x15b)],'businessGroup':_0x3ade54};}function normalizeBusinessGroup(_0x521e08){const _0x570240=a60_0x2e7b1d;if(_0x521e08===undefined||_0x521e08===null)return'';return String(_0x521e08)[_0x570240(0x15a)]();}function a60_0x16ad(){const _0x528c70=['code','object','isArray','sourceType','update','95961SXSdKW','keys','datasetId','business-group','datasetName','apiError','extend','METADATA','12fXvBLw','data','found','142008pezjzw','value','payload','modelCode','3624558KGdKEU','unchanged','dbtableConfig','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','isFinite','Expectation\x20mismatch\x20at\x20businessGroup','toUpperCase','backend','490040KFEGPt','str','modelId','appCode','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','8lumdiI','validation','/smartapi/question/er-config/business-group/edit','number','4718860dWJXey','DB_TABLE','hasOwnProperty','name','1114531sskVBC','108QHaVNv','source','dataset','POST',',\x20actual\x20','matched','parse','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','--business-group\x20is\x20required','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','message','business-group-update','Expected\x20','63LCxMrq','expect-business-group','businessGroup','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','string','prototype','1837900qBzzDD','stringify','--code\x20is\x20required','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','trim'];a60_0x16ad=function(){return _0x528c70;};return a60_0x16ad();}function asPlainObject(_0x41a52e){const _0x4b216a=a60_0x2e7b1d;if(!_0x41a52e||typeof _0x41a52e!==_0x4b216a(0x15c)||Array[_0x4b216a(0x15d)](_0x41a52e))return{};return _0x41a52e;}function firstString(..._0x1e945d){const _0x2adc6e=a60_0x2e7b1d;for(const _0x41a0e4 of _0x1e945d){if(typeof _0x41a0e4===_0x2adc6e(0x154)&&_0x41a0e4[_0x2adc6e(0x15a)]())return _0x41a0e4[_0x2adc6e(0x15a)]();if(typeof _0x41a0e4===_0x2adc6e(0x13c)&&Number['isFinite'](_0x41a0e4))return String(_0x41a0e4);}return undefined;}function firstNumber(..._0x3e21b3){const _0x419e46=a60_0x2e7b1d;for(const _0x4f09f7 of _0x3e21b3){if(typeof _0x4f09f7==='number'&&Number[_0x419e46(0x130)](_0x4f09f7))return _0x4f09f7;if(typeof _0x4f09f7===_0x419e46(0x154)&&_0x4f09f7[_0x419e46(0x15a)]()&&Number[_0x419e46(0x130)](Number(_0x4f09f7)))return Number(_0x4f09f7);}return null;}function trim(_0x106f9a){const _0x56e399=a60_0x2e7b1d;return String(_0x106f9a||'')[_0x56e399(0x15a)]();}
@@ -1 +1 @@
1
- const a61_0x5d27aa=a61_0x3a92;(function(_0x3c274b,_0x5854b8){const _0x3812bc=a61_0x3a92,_0x30ec18=_0x3c274b();while(!![]){try{const _0x4a245b=-parseInt(_0x3812bc(0x17a))/0x1*(parseInt(_0x3812bc(0x18b))/0x2)+parseInt(_0x3812bc(0x16f))/0x3*(-parseInt(_0x3812bc(0x186))/0x4)+parseInt(_0x3812bc(0x17b))/0x5*(-parseInt(_0x3812bc(0x16c))/0x6)+parseInt(_0x3812bc(0x175))/0x7+-parseInt(_0x3812bc(0x16d))/0x8+-parseInt(_0x3812bc(0x184))/0x9*(parseInt(_0x3812bc(0x18c))/0xa)+parseInt(_0x3812bc(0x185))/0xb;if(_0x4a245b===_0x5854b8)break;else _0x30ec18['push'](_0x30ec18['shift']());}catch(_0x15cd7e){_0x30ec18['push'](_0x30ec18['shift']());}}}(a61_0xd8fd,0xbd988));import{CliErrors}from'../../errors.js';function a61_0x3a92(_0x22bd58,_0x4d0961){_0x22bd58=_0x22bd58-0x16a;const _0xd8fdb=a61_0xd8fd();let _0x3a92fd=_0xd8fdb[_0x22bd58];return _0x3a92fd;}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x5d27aa(0x182),'filter':a61_0x5d27aa(0x178),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x5d27aa(0x17e);function valueToString(_0x1c2e32){const _0x2b62a7=a61_0x5d27aa;return _0x1c2e32==null?'':String(_0x1c2e32)[_0x2b62a7(0x171)]();}function getDatasetCode(_0x3caca2){const _0x44eb6c=a61_0x5d27aa;return valueToString(_0x3caca2[_0x44eb6c(0x16a)]??_0x3caca2[_0x44eb6c(0x176)]??_0x3caca2[_0x44eb6c(0x17f)]?.[_0x44eb6c(0x183)]);}function getDatasetName(_0x4d7e3f){const _0x25bdfc=a61_0x5d27aa;return valueToString(_0x4d7e3f[_0x25bdfc(0x17d)]??_0x4d7e3f['dataset']?.[_0x25bdfc(0x17c)])||'unknown';}function getDatasetSource(_0x11f535){const _0x3a435f=a61_0x5d27aa;return valueToString(_0x11f535[_0x3a435f(0x173)]??_0x11f535[_0x3a435f(0x17f)]?.[_0x3a435f(0x174)])[_0x3a435f(0x181)]();}function getDbtableConfig(_0x35a78b){const _0x3de5ba=a61_0x5d27aa,_0x2a33cc=_0x35a78b[_0x3de5ba(0x187)]??_0x35a78b['dbtable'];return _0x2a33cc&&typeof _0x2a33cc===_0x3de5ba(0x188)?_0x2a33cc:{};}export function isDbTableBackedDataset(_0x3737f0){const _0x3640a9=a61_0x5d27aa,_0xbd5364=getDatasetSource(_0x3737f0);if(_0xbd5364===_0x3640a9(0x170))return![];const _0x42bf6b=getDbtableConfig(_0x3737f0),_0x504ea4=_0x42bf6b[_0x3640a9(0x177)]??_0x42bf6b['id'],_0x37838c=valueToString(_0x42bf6b[_0x3640a9(0x16b)]??_0x3737f0[_0x3640a9(0x16b)]??_0x3737f0[_0x3640a9(0x17f)]?.[_0x3640a9(0x16b)]);return _0x504ea4!==undefined&&_0x504ea4!==null&&_0x37838c['length']>0x0;}export function filterDbTableBackedDatasets(_0x34d86c){return _0x34d86c['filter'](_0x3f5ecc=>isDbTableBackedDataset(_0x3f5ecc));}export function buildDbTableBackedRequirementMessage(_0x47464a,_0x3afa41=a61_0x5d27aa(0x18d)){const _0x58f550=a61_0x5d27aa,_0x2e5969=getDatasetSource(_0x47464a)||_0x58f550(0x16e),_0x4b2040=getDatasetName(_0x47464a),_0x1e4a1b=getDatasetCode(_0x47464a),_0xa551dc=_0x1e4a1b?'\x20('+_0x1e4a1b+')':'';return['当前数据集\x20\x22'+_0x4b2040+'\x22'+_0xa551dc+'\x20是\x20'+_0x2e5969+'\x20类型,没有可用于\x20'+_0x3afa41+_0x58f550(0x189),_0x58f550(0x172),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x58f550(0x180)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x58f550(0x18a)]('\x20');}function a61_0xd8fd(){const _0x1d3fe6=['20105PnCFPe','datasetName','name','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','dataset','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','toUpperCase','lovrabet','datasetCode','3057534siGWfX','42242607ZOJDIi','4VLfnmT','dbtableConfig','object','\x20的\x20DB_TABLE\x20数据源上下文。','join','928366ESlzFG','20BsSzkr','SQL\x20schema\x20validation','code','tableName','1266ustyxa','2619600zqRKrE','UNKNOWN','3139308mBFjyz','METADATA','trim','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','source','sourceType','8614655ajAifB','modelCode','dbId','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','validation','3cMxsMa'];a61_0xd8fd=function(){return _0x1d3fe6;};return a61_0xd8fd();}export function assertDatasetIsDbTableBacked(_0x2b0ed1,_0x296629){const _0x39070e=a61_0x5d27aa;if(!isDbTableBackedDataset(_0x2b0ed1))throw CliErrors[_0x39070e(0x179)](buildDbTableBackedRequirementMessage(_0x2b0ed1,_0x296629));}
1
+ const a61_0x26b587=a61_0x4328;(function(_0x252eaf,_0x103d85){const _0x1c3b41=a61_0x4328,_0x321b27=_0x252eaf();while(!![]){try{const _0x491b4f=parseInt(_0x1c3b41(0x13a))/0x1*(-parseInt(_0x1c3b41(0x127))/0x2)+-parseInt(_0x1c3b41(0x124))/0x3+-parseInt(_0x1c3b41(0x13f))/0x4*(parseInt(_0x1c3b41(0x131))/0x5)+-parseInt(_0x1c3b41(0x135))/0x6*(parseInt(_0x1c3b41(0x13e))/0x7)+-parseInt(_0x1c3b41(0x12c))/0x8*(parseInt(_0x1c3b41(0x140))/0x9)+-parseInt(_0x1c3b41(0x12f))/0xa+parseInt(_0x1c3b41(0x128))/0xb*(parseInt(_0x1c3b41(0x121))/0xc);if(_0x491b4f===_0x103d85)break;else _0x321b27['push'](_0x321b27['shift']());}catch(_0x1b0260){_0x321b27['push'](_0x321b27['shift']());}}}(a61_0x238a,0x48b94));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x26b587(0x13d),'filter':a61_0x26b587(0x136),'getOne':a61_0x26b587(0x133)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x26b587(0x13b);function valueToString(_0x596fee){return _0x596fee==null?'':String(_0x596fee)['trim']();}function a61_0x4328(_0x5b0b45,_0x532c36){_0x5b0b45=_0x5b0b45-0x121;const _0x238a0a=a61_0x238a();let _0x4328e0=_0x238a0a[_0x5b0b45];return _0x4328e0;}function getDatasetCode(_0x1a49a8){const _0x1614a1=a61_0x26b587;return valueToString(_0x1a49a8['code']??_0x1a49a8[_0x1614a1(0x139)]??_0x1a49a8[_0x1614a1(0x12a)]?.['datasetCode']);}function getDatasetName(_0x115578){const _0x57164f=a61_0x26b587;return valueToString(_0x115578[_0x57164f(0x126)]??_0x115578[_0x57164f(0x12a)]?.['datasetName'])||_0x57164f(0x141);}function a61_0x238a(){const _0xcacea8=['当前数据集\x20\x22','2802490rHroaU','tableName','5ybnuxz','METADATA','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','filter','21936OvSlYi','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','dbtable','UNKNOWN','modelCode','386coGVVc','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','lovrabet','567QrBONc','152824PsQSNK','5046849ajDDkU','unknown','sourceType','length','72924dCtDEt','\x20类型,没有可用于\x20','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','1558923DODPEU','getOne','name','1230vXVQQG','4037uYOtgc','object','dataset','source','8nxqmFf','\x20的\x20DB_TABLE\x20数据源上下文。'];a61_0x238a=function(){return _0xcacea8;};return a61_0x238a();}function getDatasetSource(_0x142291){const _0x234f42=a61_0x26b587;return valueToString(_0x142291[_0x234f42(0x12b)]??_0x142291['dataset']?.[_0x234f42(0x142)])['toUpperCase']();}function getDbtableConfig(_0x5aaf22){const _0x270b21=a61_0x26b587,_0x33d68d=_0x5aaf22['dbtableConfig']??_0x5aaf22[_0x270b21(0x137)];return _0x33d68d&&typeof _0x33d68d===_0x270b21(0x129)?_0x33d68d:{};}export function isDbTableBackedDataset(_0x50ea50){const _0x3b74d1=a61_0x26b587,_0x422d4e=getDatasetSource(_0x50ea50);if(_0x422d4e===_0x3b74d1(0x132))return![];const _0x162f4a=getDbtableConfig(_0x50ea50),_0x292634=_0x162f4a['dbId']??_0x162f4a['id'],_0x5e0f75=valueToString(_0x162f4a[_0x3b74d1(0x130)]??_0x50ea50[_0x3b74d1(0x130)]??_0x50ea50[_0x3b74d1(0x12a)]?.['tableName']);return _0x292634!==undefined&&_0x292634!==null&&_0x5e0f75[_0x3b74d1(0x143)]>0x0;}export function filterDbTableBackedDatasets(_0x51f988){const _0x5c9b5a=a61_0x26b587;return _0x51f988[_0x5c9b5a(0x134)](_0x38967d=>isDbTableBackedDataset(_0x38967d));}export function buildDbTableBackedRequirementMessage(_0xc4cb13,_0x7460cb='SQL\x20schema\x20validation'){const _0x276dc9=a61_0x26b587,_0x2877a0=getDatasetSource(_0xc4cb13)||_0x276dc9(0x138),_0xe62c1e=getDatasetName(_0xc4cb13),_0x3573a0=getDatasetCode(_0xc4cb13),_0x5ab381=_0x3573a0?'\x20('+_0x3573a0+')':'';return[_0x276dc9(0x12e)+_0xe62c1e+'\x22'+_0x5ab381+'\x20是\x20'+_0x2877a0+_0x276dc9(0x122)+_0x7460cb+_0x276dc9(0x12d),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0x276dc9(0x123),_0x276dc9(0x13c)+RUNTIME_DATA_ACCESS_COMMANDS[_0x276dc9(0x134)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x276dc9(0x125)]+'。']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x39f6e5,_0x20108a){if(!isDbTableBackedDataset(_0x39f6e5))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x39f6e5,_0x20108a));}
@@ -1 +1 @@
1
- function a62_0xc717(_0x5f5ad1,_0x4dee6f){_0x5f5ad1=_0x5f5ad1-0x91;const _0x36680e=a62_0x3668();let _0xc71732=_0x36680e[_0x5f5ad1];return _0xc71732;}const a62_0x567567=a62_0xc717;(function(_0x303234,_0x77f6e6){const _0x5a9d25=a62_0xc717,_0xbb9f8b=_0x303234();while(!![]){try{const _0x386fe3=-parseInt(_0x5a9d25(0x9b))/0x1+-parseInt(_0x5a9d25(0xa6))/0x2*(-parseInt(_0x5a9d25(0xbf))/0x3)+-parseInt(_0x5a9d25(0x99))/0x4+parseInt(_0x5a9d25(0xa1))/0x5+parseInt(_0x5a9d25(0xb8))/0x6*(-parseInt(_0x5a9d25(0xa8))/0x7)+parseInt(_0x5a9d25(0x97))/0x8*(parseInt(_0x5a9d25(0x95))/0x9)+parseInt(_0x5a9d25(0xae))/0xa;if(_0x386fe3===_0x77f6e6)break;else _0xbb9f8b['push'](_0xbb9f8b['shift']());}catch(_0x47f275){_0xbb9f8b['push'](_0xbb9f8b['shift']());}}}(a62_0x3668,0x75209));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x567567(0xb3),'description':'Dataset\x20id'},DBID_FLAG={'name':'dbid','type':a62_0x567567(0xb3),'description':a62_0x567567(0xa5)},CONFIRM_FLAG={'name':a62_0x567567(0xad),'type':'boolean','description':a62_0x567567(0xbd)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a62_0x567567(0xb3),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a62_0x567567(0x9c),'command':a62_0x567567(0x92),'description':a62_0x567567(0xba),'risk':a62_0x567567(0xab),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4b902f){const _0xcbc53a=a62_0x567567,_0x56263e=_0x4b902f[_0xcbc53a(0xc2)]('id'),_0x26d792=_0x4b902f['str'](_0xcbc53a(0x98)),_0x5ef0a3=_0x4b902f[_0xcbc53a(0xc2)](_0xcbc53a(0xac)),_0x23a209=[_0x56263e>0x0,Boolean(_0x26d792),_0x5ef0a3>0x0][_0xcbc53a(0x94)](Boolean);if(_0x23a209[_0xcbc53a(0x93)]===0x0)throw CliErrors[_0xcbc53a(0xa0)](_0xcbc53a(0xaa));if(_0x23a209['length']>0x1)throw CliErrors[_0xcbc53a(0xa0)](_0xcbc53a(0xb4));},async 'dryRun'(_0xa64dbc){const _0x3aef13=a62_0x567567,_0x34f9ba=await resolveTargets(_0xa64dbc);return{'method':_0x3aef13(0xa2),'url':_0x3aef13(0xaf),'body':{'appCode':_0xa64dbc[_0x3aef13(0xb5)],'count':_0x34f9ba[_0x3aef13(0x93)],'datasets':_0x34f9ba},'description':_0x3aef13(0xa9)+_0x34f9ba[_0x3aef13(0x93)]+_0x3aef13(0xb1)};},async 'execute'(_0x29b1d3){const _0x3f9511=a62_0x567567;if(!_0x29b1d3[_0x3f9511(0xb7)](_0x3f9511(0xad)))throw CliErrors[_0x3f9511(0xa0)](_0x3f9511(0xb6),_0x3f9511(0x91));const _0x4303ad=await resolveTargets(_0x29b1d3),_0x14ccfd=[],_0x143922=[];for(const _0x5b4bce of _0x4303ad){try{await deleteDataset(_0x29b1d3[_0x3f9511(0xb5)],_0x5b4bce['id']),_0x14ccfd['push'](_0x5b4bce);}catch(_0x2de5b9){_0x143922[_0x3f9511(0x96)]({..._0x5b4bce,'error':_0x2de5b9 instanceof Error?_0x2de5b9[_0x3f9511(0xbb)]:String(_0x2de5b9)});}}if(_0x143922['length']>0x0)return{'ok':![],'data':{'requested':_0x4303ad[_0x3f9511(0x93)],'deletedCount':_0x14ccfd['length'],'failedCount':_0x143922[_0x3f9511(0x93)],'deleted':_0x14ccfd,'failed':_0x143922},'message':_0x3f9511(0xbc)+_0x14ccfd[_0x3f9511(0x93)]+'/'+_0x4303ad[_0x3f9511(0x93)]+_0x3f9511(0xbe)+_0x143922[_0x3f9511(0x93)]+_0x3f9511(0xa3)};return{'ok':!![],'data':{'requested':_0x4303ad[_0x3f9511(0x93)],'deletedCount':_0x14ccfd['length'],'deleted':_0x14ccfd},'message':_0x3f9511(0xbc)+_0x14ccfd[_0x3f9511(0x93)]+'\x20dataset(s)'};}};async function resolveTargets(_0x4b15ba){const _0x48f559=a62_0x567567,_0x456e6b=_0x4b15ba['num']('id'),_0x378b9f=_0x4b15ba[_0x48f559(0xc0)]('code'),_0x1f5432=_0x4b15ba[_0x48f559(0xc2)](_0x48f559(0xac));let _0x4ecd8a;_0x378b9f?(_0x4ecd8a=await listDatasets(_0x4b15ba['appCode'],{'code':_0x378b9f}),_0x4ecd8a=_0x4ecd8a[_0x48f559(0x94)](_0xf4d410=>_0xf4d410[_0x48f559(0x98)]===_0x378b9f)):(_0x4ecd8a=await listDatasets(_0x4b15ba[_0x48f559(0xb5)]),_0x456e6b>0x0&&(_0x4ecd8a=_0x4ecd8a[_0x48f559(0x94)](_0xc83acf=>_0xc83acf['id']===_0x456e6b)),_0x1f5432>0x0&&(_0x4ecd8a=_0x4ecd8a[_0x48f559(0x94)](_0x14b4f7=>_0x14b4f7[_0x48f559(0x9e)]?.[_0x48f559(0x9d)]===_0x1f5432)));const _0x14a997=[];for(const _0x5f45ba of _0x4ecd8a){const _0xfeb23e=await getDatasetDetail(_0x5f45ba['code']),_0x343d5e=Array[_0x48f559(0xb2)](_0xfeb23e['relatedPageInfoList'])?_0xfeb23e[_0x48f559(0xa4)]['filter'](_0x572068=>_0x572068!=null&&typeof _0x572068==='object'&&_0x572068[_0x48f559(0x9f)]!==!![]):[];_0x14a997[_0x48f559(0x96)](normalizeTarget(_0x5f45ba,_0x343d5e[_0x48f559(0x93)]));}if(_0x14a997[_0x48f559(0x93)]===0x0){const _0xff4b71=_0x378b9f||(_0x456e6b>0x0?'id='+_0x456e6b:_0x48f559(0xb0)+_0x1f5432);throw CliErrors[_0x48f559(0xa0)](_0x48f559(0x9a)+_0xff4b71+'.');}const _0x2d2638=_0x4b15ba[_0x48f559(0xc2)](_0x48f559(0xc1));if(_0x2d2638>0x0&&_0x14a997[_0x48f559(0x93)]!==_0x2d2638)throw CliErrors[_0x48f559(0xa0)](_0x48f559(0xa7)+_0x14a997[_0x48f559(0x93)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x2d2638+'.');return _0x14a997;}function a62_0x3668(){const _0x1a221c=['Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','appCode','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','bool','168EUZoCb','dbName','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','message','Deleted\x20','Required\x20to\x20execute\x20dataset\x20deletion','\x20dataset(s);\x20','8325cncBod','str','expected-count','num','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','delete','length','filter','9ZqUybZ','push','5568440QUsuex','code','2695256WVuiLc','No\x20undeleted\x20dataset\x20found\x20for\x20','910351iSJOPL','dataset','dbId','dbtableConfig','deleted','validation','2019260rBuQFp','POST','\x20failed','relatedPageInfoList','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','230aawSIc','Matched\x20','44408hrPlbX','Would\x20delete\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','high-risk-write','dbid','confirm','8225180gUJFyP','/smartapi/dataset/delete-dataset','dbid=','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','isArray','number'];a62_0x3668=function(){return _0x1a221c;};return a62_0x3668();}function normalizeTarget(_0x41f489,_0xb906cb){const _0x10d1db=a62_0x567567,_0x47f307=_0x41f489[_0x10d1db(0x9e)]??{};return{'id':_0x41f489['id'],'code':_0x41f489[_0x10d1db(0x98)],'name':_0x41f489['name'],'description':_0x41f489['description'],'source':_0x41f489['source'],'dbId':_0x47f307['dbId'],'dbName':_0x47f307[_0x10d1db(0xb9)],'tableName':_0x47f307['tableName'],'relatedPageCount':_0xb906cb};}
1
+ const a62_0x5351e6=a62_0x10c9;(function(_0x158e35,_0xf73861){const _0x2c67f7=a62_0x10c9,_0x3e1e0d=_0x158e35();while(!![]){try{const _0x2b81e2=-parseInt(_0x2c67f7(0x10b))/0x1*(parseInt(_0x2c67f7(0x10f))/0x2)+parseInt(_0x2c67f7(0xff))/0x3*(parseInt(_0x2c67f7(0xec))/0x4)+parseInt(_0x2c67f7(0x107))/0x5*(-parseInt(_0x2c67f7(0xf5))/0x6)+-parseInt(_0x2c67f7(0x10c))/0x7+parseInt(_0x2c67f7(0xe3))/0x8+parseInt(_0x2c67f7(0xd9))/0x9*(parseInt(_0x2c67f7(0xf6))/0xa)+-parseInt(_0x2c67f7(0xf7))/0xb*(-parseInt(_0x2c67f7(0x10e))/0xc);if(_0x2b81e2===_0xf73861)break;else _0x3e1e0d['push'](_0x3e1e0d['shift']());}catch(_0x376dcd){_0x3e1e0d['push'](_0x3e1e0d['shift']());}}}(a62_0x31c3,0xd8e3e));function a62_0x31c3(){const _0x3438b7=['bool','Dataset\x20id','dbid','length','\x20failed','32kkPFqt','message','dbtableConfig','dbName','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','validation','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','8388222IwMUKF','10ozVbNz','53174NMmLQN','delete','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','POST','\x20dataset(s)','dataset','object','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','271923xljWfP','isArray','high-risk-write','source','id=','push','str','dbId','5LJAOMt','appCode','boolean','No\x20undeleted\x20dataset\x20found\x20for\x20','65xpEiei','2807728LvkUDD','relatedPageInfoList','1884Kdgprd','20912BlxSRt','Deleted\x20','\x20dataset(s);\x20','description','15484437TmDCFs','confirm','Matched\x20','number','dbid=','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Required\x20to\x20execute\x20dataset\x20deletion','filter','deleted','num','1300832nAznmT','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','code','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.'];a62_0x31c3=function(){return _0x3438b7;};return a62_0x31c3();}function a62_0x10c9(_0x13b2a0,_0x258941){_0x13b2a0=_0x13b2a0-0xd9;const _0x31c349=a62_0x31c3();let _0x10c9f7=_0x31c349[_0x13b2a0];return _0x10c9f7;}import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x5351e6(0xdc),'description':a62_0x5351e6(0xe8)},DBID_FLAG={'name':a62_0x5351e6(0xe9),'type':'number','description':a62_0x5351e6(0xf9)},CONFIRM_FLAG={'name':a62_0x5351e6(0xda),'type':a62_0x5351e6(0x109),'description':a62_0x5351e6(0xdf)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a62_0x5351e6(0xdc),'description':a62_0x5351e6(0xf3)};export const datasetDelete={'service':a62_0x5351e6(0xfc),'command':a62_0x5351e6(0xf8),'description':a62_0x5351e6(0xf2),'risk':a62_0x5351e6(0x101),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2c6f40){const _0x3e9861=a62_0x5351e6,_0x19fe0e=_0x2c6f40['num']('id'),_0xd2ea51=_0x2c6f40['str'](_0x3e9861(0xe5)),_0x56c5cf=_0x2c6f40[_0x3e9861(0xe2)]('dbid'),_0x401e2c=[_0x19fe0e>0x0,Boolean(_0xd2ea51),_0x56c5cf>0x0][_0x3e9861(0xe0)](Boolean);if(_0x401e2c[_0x3e9861(0xea)]===0x0)throw CliErrors[_0x3e9861(0xf1)](_0x3e9861(0xe4));if(_0x401e2c[_0x3e9861(0xea)]>0x1)throw CliErrors[_0x3e9861(0xf1)](_0x3e9861(0xf4));},async 'dryRun'(_0x4bc1bc){const _0x460164=a62_0x5351e6,_0x115f32=await resolveTargets(_0x4bc1bc);return{'method':_0x460164(0xfa),'url':'/smartapi/dataset/delete-dataset','body':{'appCode':_0x4bc1bc[_0x460164(0x108)],'count':_0x115f32['length'],'datasets':_0x115f32},'description':'Would\x20delete\x20'+_0x115f32[_0x460164(0xea)]+_0x460164(0xe6)};},async 'execute'(_0x154fd1){const _0x448892=a62_0x5351e6;if(!_0x154fd1[_0x448892(0xe7)](_0x448892(0xda)))throw CliErrors['validation'](_0x448892(0xde),_0x448892(0xfe));const _0x32f6f0=await resolveTargets(_0x154fd1),_0x3aad59=[],_0x5e2067=[];for(const _0x101409 of _0x32f6f0){try{await deleteDataset(_0x154fd1[_0x448892(0x108)],_0x101409['id']),_0x3aad59['push'](_0x101409);}catch(_0x2e261c){_0x5e2067[_0x448892(0x104)]({..._0x101409,'error':_0x2e261c instanceof Error?_0x2e261c[_0x448892(0xed)]:String(_0x2e261c)});}}if(_0x5e2067[_0x448892(0xea)]>0x0)return{'ok':![],'data':{'requested':_0x32f6f0[_0x448892(0xea)],'deletedCount':_0x3aad59[_0x448892(0xea)],'failedCount':_0x5e2067[_0x448892(0xea)],'deleted':_0x3aad59,'failed':_0x5e2067},'message':_0x448892(0x110)+_0x3aad59['length']+'/'+_0x32f6f0[_0x448892(0xea)]+_0x448892(0x111)+_0x5e2067[_0x448892(0xea)]+_0x448892(0xeb)};return{'ok':!![],'data':{'requested':_0x32f6f0[_0x448892(0xea)],'deletedCount':_0x3aad59[_0x448892(0xea)],'deleted':_0x3aad59},'message':_0x448892(0x110)+_0x3aad59[_0x448892(0xea)]+_0x448892(0xfb)};}};async function resolveTargets(_0x2bb42f){const _0x144e71=a62_0x5351e6,_0x3e2e6d=_0x2bb42f[_0x144e71(0xe2)]('id'),_0x51799d=_0x2bb42f[_0x144e71(0x105)]('code'),_0x55ea6d=_0x2bb42f['num']('dbid');let _0x10a4f6;_0x51799d?(_0x10a4f6=await listDatasets(_0x2bb42f[_0x144e71(0x108)],{'code':_0x51799d}),_0x10a4f6=_0x10a4f6['filter'](_0x51d6bc=>_0x51d6bc[_0x144e71(0xe5)]===_0x51799d)):(_0x10a4f6=await listDatasets(_0x2bb42f[_0x144e71(0x108)]),_0x3e2e6d>0x0&&(_0x10a4f6=_0x10a4f6['filter'](_0x4732ac=>_0x4732ac['id']===_0x3e2e6d)),_0x55ea6d>0x0&&(_0x10a4f6=_0x10a4f6[_0x144e71(0xe0)](_0x138669=>_0x138669[_0x144e71(0xee)]?.[_0x144e71(0x106)]===_0x55ea6d)));const _0x3ec487=[];for(const _0x235d1c of _0x10a4f6){const _0x7f71da=await getDatasetDetail(_0x235d1c[_0x144e71(0xe5)]),_0x335bd2=Array[_0x144e71(0x100)](_0x7f71da[_0x144e71(0x10d)])?_0x7f71da['relatedPageInfoList'][_0x144e71(0xe0)](_0x1cbbbb=>_0x1cbbbb!=null&&typeof _0x1cbbbb===_0x144e71(0xfd)&&_0x1cbbbb[_0x144e71(0xe1)]!==!![]):[];_0x3ec487[_0x144e71(0x104)](normalizeTarget(_0x235d1c,_0x335bd2[_0x144e71(0xea)]));}if(_0x3ec487[_0x144e71(0xea)]===0x0){const _0x4c6adc=_0x51799d||(_0x3e2e6d>0x0?_0x144e71(0x103)+_0x3e2e6d:_0x144e71(0xdd)+_0x55ea6d);throw CliErrors[_0x144e71(0xf1)](_0x144e71(0x10a)+_0x4c6adc+'.');}const _0x374399=_0x2bb42f[_0x144e71(0xe2)]('expected-count');if(_0x374399>0x0&&_0x3ec487[_0x144e71(0xea)]!==_0x374399)throw CliErrors['validation'](_0x144e71(0xdb)+_0x3ec487['length']+_0x144e71(0xf0)+_0x374399+'.');return _0x3ec487;}function normalizeTarget(_0x1d4704,_0x2da86c){const _0x1d2b13=a62_0x5351e6,_0x339780=_0x1d4704[_0x1d2b13(0xee)]??{};return{'id':_0x1d4704['id'],'code':_0x1d4704['code'],'name':_0x1d4704['name'],'description':_0x1d4704[_0x1d2b13(0x112)],'source':_0x1d4704[_0x1d2b13(0x102)],'dbId':_0x339780['dbId'],'dbName':_0x339780[_0x1d2b13(0xef)],'tableName':_0x339780['tableName'],'relatedPageCount':_0x2da86c};}
@@ -1 +1 @@
1
- const a63_0x1973d1=a63_0x1045;function a63_0x1045(_0x17eb3d,_0x8852d9){_0x17eb3d=_0x17eb3d-0x15c;const _0x10ee1f=a63_0x10ee();let _0x1045b2=_0x10ee1f[_0x17eb3d];return _0x1045b2;}(function(_0x246a6d,_0x5987b0){const _0x3acc77=a63_0x1045,_0xf1bb2f=_0x246a6d();while(!![]){try{const _0x413801=parseInt(_0x3acc77(0x1a2))/0x1+-parseInt(_0x3acc77(0x192))/0x2*(parseInt(_0x3acc77(0x164))/0x3)+parseInt(_0x3acc77(0x1a9))/0x4+parseInt(_0x3acc77(0x194))/0x5*(parseInt(_0x3acc77(0x1a0))/0x6)+-parseInt(_0x3acc77(0x19e))/0x7+parseInt(_0x3acc77(0x174))/0x8*(-parseInt(_0x3acc77(0x1a7))/0x9)+parseInt(_0x3acc77(0x161))/0xa;if(_0x413801===_0x5987b0)break;else _0xf1bb2f['push'](_0xf1bb2f['shift']());}catch(_0x18c7d4){_0xf1bb2f['push'](_0xf1bb2f['shift']());}}}(a63_0x10ee,0x67b08));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x5c72ff){const _0x56bc8c=a63_0x1045;if(_0x5c72ff[_0x56bc8c(0x191)])return null;const _0x26fc6d=Boolean(_0x5c72ff[_0x56bc8c(0x170)]!==undefined||_0x5c72ff[_0x56bc8c(0x186)]!==undefined);let _0x30c69f={};if(!_0x26fc6d&&typeof _0x5c72ff[_0x56bc8c(0x17a)]===_0x56bc8c(0x175))try{_0x30c69f=JSON[_0x56bc8c(0x1a8)](_0x5c72ff[_0x56bc8c(0x17a)]);}catch{}const _0x23b188=_0x26fc6d?_0x5c72ff[_0x56bc8c(0x173)]:_0x5c72ff['code'],_0x2a1969=_0x26fc6d?_0x5c72ff['displayName']:_0x5c72ff[_0x56bc8c(0x173)],_0x399a49=_0x26fc6d?_0x5c72ff[_0x56bc8c(0x186)]:_0x5c72ff[_0x56bc8c(0x188)]||_0x5c72ff[_0x56bc8c(0x15c)],_0x3f7c9a=_0x26fc6d?_0x5c72ff['pkField']===!![]:_0x30c69f[_0x56bc8c(0x16a)]===!![],_0x31bde2=_0x26fc6d?_0x5c72ff[_0x56bc8c(0x169)]===!![]:_0x30c69f['required']===!![],_0x52ea33=_0x26fc6d?_0x5c72ff[_0x56bc8c(0x19a)]??null:_0x30c69f[_0x56bc8c(0x19a)]??null,_0x39f7fe={'name':_0x23b188,'displayName':_0x2a1969||_0x23b188,'type':_0x399a49,'dbType':_0x5c72ff[_0x56bc8c(0x1a6)],'pk':_0x3f7c9a,'required':_0x31bde2,'deprecated':_0x5c72ff[_0x56bc8c(0x187)]===!![],'description':_0x5c72ff[_0x56bc8c(0x17c)]||undefined};return Array[_0x56bc8c(0x189)](_0x52ea33)&&_0x52ea33['length']>0x0&&(_0x39f7fe[_0x56bc8c(0x19a)]=_0x52ea33),_0x39f7fe;}function parseJsonMaybe(_0x563d10){const _0x135f37=a63_0x1045;if(typeof _0x563d10!=='string')return _0x563d10;try{return JSON[_0x135f37(0x1a8)](_0x563d10);}catch{return _0x563d10;}}function normalizeOperationEntry(_0x4e55bc,_0x506dd5){const _0xea633f=a63_0x1045;if(!_0x506dd5||typeof _0x506dd5!==_0xea633f(0x19f))return null;if(!_0x506dd5[_0xea633f(0x184)]||!_0x506dd5[_0xea633f(0x177)])return null;const _0x409eaa={'name':_0x4e55bc,'method':_0x506dd5['method'],'path':_0x506dd5[_0xea633f(0x177)]};if(_0x506dd5[_0xea633f(0x17b)])_0x409eaa[_0xea633f(0x17b)]=_0x506dd5[_0xea633f(0x17b)];if(_0x506dd5[_0xea633f(0x180)]!=null){const _0x3b91db=parseJsonMaybe(_0x506dd5['requestBody']);_0x409eaa['requestBody']=_0x3b91db;}if(_0x506dd5['responseBody']!=null){const _0x5d61aa=parseJsonMaybe(_0x506dd5[_0xea633f(0x18b)]);_0x409eaa[_0xea633f(0x18b)]=_0x5d61aa;}if(_0x506dd5['beforeScriptId']!=null)_0x409eaa[_0xea633f(0x19b)]=_0x506dd5[_0xea633f(0x19b)];if(_0x506dd5[_0xea633f(0x193)]!=null)_0x409eaa[_0xea633f(0x193)]=_0x506dd5[_0xea633f(0x193)];if(Array[_0xea633f(0x189)](_0x506dd5[_0xea633f(0x185)]))_0x409eaa[_0xea633f(0x185)]=_0x506dd5['requestFields'];if(Array[_0xea633f(0x189)](_0x506dd5[_0xea633f(0x196)]))_0x409eaa['responseFields']=_0x506dd5[_0xea633f(0x196)];return _0x409eaa;}function a63_0x10ee(){const _0x2ec601=['759225zYSMXj','datasetKey','relations','validateRules','dbType','1225422hdeZLd','parse','1534752FMqFyH','main_sub','dataType','properties','fromField','columnCodeListWithDeleted','trim','2268780uLdGuS','code','allFields','148647xEEkpO','split','modifierNameField','filter','indexes','required','pkField','toDatasetCode','dblinkInfoDTO','dbtableConfig','tableName','creatorNameField','displayName','logicField','sourceType','name','32euGAaM','string','toField','path','read','formatRules','extend','host','description','doVersion','source','operations','requestBody','dbName','labelField','toTableName','method','requestFields','doType','deprecated','type','isArray','tableComment','responseBody','length','fields','creatorIdField','updateTimeField','relatedPageInfoList','deleted','2NuwIUb','afterScriptId','5kGVEdp','detail','responseFields','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','bizRelationType','map','options','beforeScriptId','str','dbId','3965696TkfTFT','object','1293780iSepSo','relationId'];a63_0x10ee=function(){return _0x2ec601;};return a63_0x10ee();}function summarizeDbtable(_0x48df19){const _0x21c9f8=a63_0x1045,_0x24ce99={},_0x2c5d39=[_0x21c9f8(0x19d),'dbName',_0x21c9f8(0x16e),_0x21c9f8(0x1a3),_0x21c9f8(0x16a),'allFields',_0x21c9f8(0x171),'createTimeField',_0x21c9f8(0x18f),_0x21c9f8(0x18e),_0x21c9f8(0x16f),'modifierIdField',_0x21c9f8(0x166),_0x21c9f8(0x182),_0x21c9f8(0x16c)];for(const _0xa5081b of _0x2c5d39){if(_0x48df19[_0xa5081b]!==undefined)_0x24ce99[_0xa5081b]=_0x48df19[_0xa5081b];}return typeof _0x24ce99['allFields']==='string'&&_0x24ce99[_0x21c9f8(0x163)][_0x21c9f8(0x18c)]>0x0&&(_0x24ce99['allFieldNames']=_0x24ce99[_0x21c9f8(0x163)][_0x21c9f8(0x165)](',')[_0x21c9f8(0x199)](_0x2a1a33=>_0x2a1a33[_0x21c9f8(0x160)]())['filter'](Boolean)),_0x24ce99;}function normalizeRelatedPages(_0x33ab6f){const _0x54bb89=a63_0x1045;if(!Array[_0x54bb89(0x189)](_0x33ab6f))return[];return _0x33ab6f[_0x54bb89(0x167)](_0x502911=>_0x502911&&typeof _0x502911==='object')[_0x54bb89(0x199)](_0x3542b4=>({'id':_0x3542b4['id'],'type':_0x3542b4[_0x54bb89(0x188)],'code':_0x3542b4['code'],'title':_0x3542b4['title'],'deleted':_0x3542b4[_0x54bb89(0x191)]===!![]}));}export const datasetDetail={'service':'dataset','command':a63_0x1973d1(0x195),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a63_0x1973d1(0x178),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a63_0x1973d1(0x197)}],async 'execute'(_0x30f22c){const _0x3aabb0=a63_0x1973d1,_0x27585d=await getDatasetDetail(_0x30f22c[_0x3aabb0(0x19c)](_0x3aabb0(0x162))),_0x36a792=Array['isArray'](_0x27585d[_0x3aabb0(0x18d)])?_0x27585d[_0x3aabb0(0x18d)]:Array[_0x3aabb0(0x189)](_0x27585d[_0x3aabb0(0x15d)])?_0x27585d[_0x3aabb0(0x15d)]:[],_0xd6688d=_0x36a792[_0x3aabb0(0x199)](_0x46a7f8=>normalizeField(_0x46a7f8))[_0x3aabb0(0x167)](_0x4271b4=>_0x4271b4!==null),_0x4dd783=_0x27585d[_0x3aabb0(0x17f)]??{},_0x42811a=[];for(const [_0x431589,_0x461566]of Object['entries'](_0x4dd783)){const _0x16052d=normalizeOperationEntry(_0x431589,_0x461566);if(_0x16052d)_0x42811a['push'](_0x16052d);}const _0x37e0a5=_0x27585d[_0x3aabb0(0x16d)]??{},_0x20fdb1=_0x27585d['dataset']??{},_0x8ca88a=_0x37e0a5['dbId']!=null?{'id':_0x37e0a5[_0x3aabb0(0x19d)],'name':_0x37e0a5[_0x3aabb0(0x181)]??null}:undefined;let _0x538193;return typeof _0x27585d['extend']==='string'&&(_0x538193=parseJsonMaybe(_0x27585d[_0x3aabb0(0x17a)])),{'ok':!![],'data':{'id':_0x27585d['modelId']??_0x27585d['id'],'name':_0x27585d[_0x3aabb0(0x173)],'code':_0x27585d['modelCode']||_0x27585d[_0x3aabb0(0x162)],'doVersion':_0x27585d[_0x3aabb0(0x17d)],'description':_0x27585d[_0x3aabb0(0x17c)]||_0x20fdb1[_0x3aabb0(0x18a)]||undefined,'source':_0x27585d[_0x3aabb0(0x17e)]||_0x20fdb1[_0x3aabb0(0x172)],'table':_0x37e0a5[_0x3aabb0(0x16e)]||_0x20fdb1[_0x3aabb0(0x16e)],'datasetKey':_0x37e0a5[_0x3aabb0(0x1a3)],'pk':_0x37e0a5['pkField'],'db':_0x8ca88a,'dbtable':summarizeDbtable(_0x37e0a5),'fields':_0xd6688d,'operations':_0x42811a,'indexes':Array[_0x3aabb0(0x189)](_0x20fdb1[_0x3aabb0(0x168)])?_0x20fdb1['indexes']:[],'relations':Array[_0x3aabb0(0x189)](_0x27585d[_0x3aabb0(0x1a4)])?_0x27585d['relations'][_0x3aabb0(0x199)](_0x37d3ec=>({..._0x37d3ec[_0x3aabb0(0x1a1)]!=null?{'relationId':_0x37d3ec[_0x3aabb0(0x1a1)]}:{},'fromDataset':_0x27585d[_0x3aabb0(0x173)],'fromCode':_0x27585d['modelCode']||_0x27585d[_0x3aabb0(0x162)],'fromTable':_0x37e0a5['tableName']||_0x20fdb1['tableName'],'fromField':_0x37d3ec[_0x3aabb0(0x15e)],'toDataset':_0x37d3ec['toDatasetName'],'toCode':_0x37d3ec[_0x3aabb0(0x16b)],'toTable':_0x37d3ec[_0x3aabb0(0x183)],'toField':_0x37d3ec[_0x3aabb0(0x176)],'labelField':_0x37d3ec['toFieldLabel']||undefined,'cardinality':_0x37d3ec['cardinality']||undefined,'bizRelationType':_0x37d3ec[_0x3aabb0(0x198)]===_0x3aabb0(0x1aa)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x27585d[_0x3aabb0(0x190)]),...Array[_0x3aabb0(0x189)](_0x27585d[_0x3aabb0(0x15f)])?{'columnCodeListWithDeleted':_0x27585d[_0x3aabb0(0x15f)]}:{},'formatRules':Array['isArray'](_0x27585d[_0x3aabb0(0x179)])?_0x27585d['formatRules']:[],'validateRules':Array[_0x3aabb0(0x189)](_0x27585d[_0x3aabb0(0x1a5)])?_0x27585d[_0x3aabb0(0x1a5)]:[],..._0x538193!==undefined?{'extend':_0x538193}:{},'stats':{'fieldCount':_0xd6688d['length'],'operationCount':_0x42811a[_0x3aabb0(0x18c)]}}};}};
1
+ const a63_0x532a4c=a63_0x4a62;(function(_0x3086fa,_0x2a8f76){const _0x414e72=a63_0x4a62,_0x1f7ba3=_0x3086fa();while(!![]){try{const _0x5bb201=-parseInt(_0x414e72(0x139))/0x1*(parseInt(_0x414e72(0x11a))/0x2)+parseInt(_0x414e72(0xfe))/0x3*(-parseInt(_0x414e72(0x111))/0x4)+parseInt(_0x414e72(0x130))/0x5*(-parseInt(_0x414e72(0xef))/0x6)+parseInt(_0x414e72(0xe8))/0x7*(parseInt(_0x414e72(0x121))/0x8)+parseInt(_0x414e72(0xf1))/0x9*(parseInt(_0x414e72(0x12d))/0xa)+parseInt(_0x414e72(0x110))/0xb*(-parseInt(_0x414e72(0x101))/0xc)+-parseInt(_0x414e72(0xfc))/0xd*(-parseInt(_0x414e72(0xe7))/0xe);if(_0x5bb201===_0x2a8f76)break;else _0x1f7ba3['push'](_0x1f7ba3['shift']());}catch(_0x35c119){_0x1f7ba3['push'](_0x1f7ba3['shift']());}}}(a63_0x3f7c,0x66e0e));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x2af2f6){const _0x2c4ca7=a63_0x4a62;if(_0x2af2f6[_0x2c4ca7(0x102)])return null;const _0x2ff5d0=Boolean(_0x2af2f6[_0x2c4ca7(0xeb)]!==undefined||_0x2af2f6['doType']!==undefined);let _0xdc43f9={};if(!_0x2ff5d0&&typeof _0x2af2f6[_0x2c4ca7(0x137)]===_0x2c4ca7(0xfd))try{_0xdc43f9=JSON[_0x2c4ca7(0xea)](_0x2af2f6['extend']);}catch{}const _0x498464=_0x2ff5d0?_0x2af2f6[_0x2c4ca7(0xed)]:_0x2af2f6['code'],_0x1caede=_0x2ff5d0?_0x2af2f6['displayName']:_0x2af2f6[_0x2c4ca7(0xed)],_0x50b985=_0x2ff5d0?_0x2af2f6[_0x2c4ca7(0x119)]:_0x2af2f6[_0x2c4ca7(0xf6)]||_0x2af2f6[_0x2c4ca7(0x118)],_0x243f7f=_0x2ff5d0?_0x2af2f6['pkField']===!![]:_0xdc43f9['pkField']===!![],_0x5830bf=_0x2ff5d0?_0x2af2f6['required']===!![]:_0xdc43f9[_0x2c4ca7(0x126)]===!![],_0x2fe89f=_0x2ff5d0?_0x2af2f6[_0x2c4ca7(0x138)]??null:_0xdc43f9[_0x2c4ca7(0x138)]??null,_0x4a08b1={'name':_0x498464,'displayName':_0x1caede||_0x498464,'type':_0x50b985,'dbType':_0x2af2f6[_0x2c4ca7(0x114)],'pk':_0x243f7f,'required':_0x5830bf,'deprecated':_0x2af2f6[_0x2c4ca7(0x12b)]===!![],'description':_0x2af2f6['description']||undefined};return Array[_0x2c4ca7(0x10d)](_0x2fe89f)&&_0x2fe89f['length']>0x0&&(_0x4a08b1[_0x2c4ca7(0x138)]=_0x2fe89f),_0x4a08b1;}function a63_0x4a62(_0x4ae6b1,_0x44d04c){_0x4ae6b1=_0x4ae6b1-0xe6;const _0x3f7cce=a63_0x3f7c();let _0x4a623e=_0x3f7cce[_0x4ae6b1];return _0x4a623e;}function parseJsonMaybe(_0x4c79cc){const _0x4cd557=a63_0x4a62;if(typeof _0x4c79cc!==_0x4cd557(0xfd))return _0x4c79cc;try{return JSON[_0x4cd557(0xea)](_0x4c79cc);}catch{return _0x4c79cc;}}function a63_0x3f7c(){const _0x178cd9=['deprecated','requestFields','6846750vxlGfA','str','relations','2004195dgImiF','tableComment','code','filter','formatRules','logicField','datasetKey','extend','options','797077RbhZjj','properties','trim','5467000VPQPxz','28bYtmlt','dbtableConfig','parse','displayName','toFieldLabel','name','detail','6CRRmWp','afterScriptId','9HkKaOH','description','tableName','modifierIdField','creatorIdField','type','entries','columnCodeListWithDeleted','relationId','modifierNameField','allFieldNames','39CvKLsC','string','669eeQINy','toDatasetCode','sourceType','12cmgzYz','deleted','modelId','alias','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','toDatasetName','fields','dbId','responseFields','cardinality','beforeScriptId','allFields','isArray','requestBody','indexes','5617711CDmRjI','9136WfaMwI','pkField','title','dbType','toField','split','bizRelationType','dataType','doType','2MTpmMH','object','length','path','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','modelCode','dblinkInfoDTO','1566328OTkaJH','map','main_sub','doVersion','method','required','fromField','operations','dbName','responseBody'];a63_0x3f7c=function(){return _0x178cd9;};return a63_0x3f7c();}function normalizeOperationEntry(_0x49c0b2,_0x28dff6){const _0x5c97e3=a63_0x4a62;if(!_0x28dff6||typeof _0x28dff6!==_0x5c97e3(0x11b))return null;if(!_0x28dff6[_0x5c97e3(0x125)]||!_0x28dff6[_0x5c97e3(0x11d)])return null;const _0x50eff2={'name':_0x49c0b2,'method':_0x28dff6[_0x5c97e3(0x125)],'path':_0x28dff6[_0x5c97e3(0x11d)]};if(_0x28dff6['host'])_0x50eff2['host']=_0x28dff6['host'];if(_0x28dff6[_0x5c97e3(0x10e)]!=null){const _0x1837ce=parseJsonMaybe(_0x28dff6[_0x5c97e3(0x10e)]);_0x50eff2[_0x5c97e3(0x10e)]=_0x1837ce;}if(_0x28dff6[_0x5c97e3(0x12a)]!=null){const _0x26d7bb=parseJsonMaybe(_0x28dff6[_0x5c97e3(0x12a)]);_0x50eff2['responseBody']=_0x26d7bb;}if(_0x28dff6[_0x5c97e3(0x10b)]!=null)_0x50eff2[_0x5c97e3(0x10b)]=_0x28dff6[_0x5c97e3(0x10b)];if(_0x28dff6[_0x5c97e3(0xf0)]!=null)_0x50eff2[_0x5c97e3(0xf0)]=_0x28dff6[_0x5c97e3(0xf0)];if(Array[_0x5c97e3(0x10d)](_0x28dff6[_0x5c97e3(0x12c)]))_0x50eff2[_0x5c97e3(0x12c)]=_0x28dff6[_0x5c97e3(0x12c)];if(Array['isArray'](_0x28dff6['responseFields']))_0x50eff2['responseFields']=_0x28dff6[_0x5c97e3(0x109)];return _0x50eff2;}function summarizeDbtable(_0x254ba6){const _0x172873=a63_0x4a62,_0x3a448d={},_0x2b0cb1=['dbId',_0x172873(0x129),_0x172873(0xf3),_0x172873(0x136),_0x172873(0x112),'allFields',_0x172873(0x135),'createTimeField','updateTimeField',_0x172873(0xf5),'creatorNameField',_0x172873(0xf4),_0x172873(0xfa),'labelField',_0x172873(0x120)];for(const _0x539b8c of _0x2b0cb1){if(_0x254ba6[_0x539b8c]!==undefined)_0x3a448d[_0x539b8c]=_0x254ba6[_0x539b8c];}return typeof _0x3a448d['allFields']===_0x172873(0xfd)&&_0x3a448d[_0x172873(0x10c)][_0x172873(0x11c)]>0x0&&(_0x3a448d[_0x172873(0xfb)]=_0x3a448d[_0x172873(0x10c)][_0x172873(0x116)](',')[_0x172873(0x122)](_0x135faa=>_0x135faa[_0x172873(0xe6)]())[_0x172873(0x133)](Boolean)),_0x3a448d;}function normalizeRelatedPages(_0x13195a){const _0x3a95f6=a63_0x4a62;if(!Array['isArray'](_0x13195a))return[];return _0x13195a[_0x3a95f6(0x133)](_0x4d007e=>_0x4d007e&&typeof _0x4d007e==='object')[_0x3a95f6(0x122)](_0x436392=>({'id':_0x436392['id'],'type':_0x436392[_0x3a95f6(0xf6)],'code':_0x436392[_0x3a95f6(0x132)],'title':_0x436392[_0x3a95f6(0x113)],'deleted':_0x436392[_0x3a95f6(0x102)]===!![]}));}export const datasetDetail={'service':'dataset','command':a63_0x532a4c(0xee),'description':a63_0x532a4c(0x11e),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x532a4c(0x104),'type':a63_0x532a4c(0xfd),'description':a63_0x532a4c(0x105)}],async 'execute'(_0x5e1295){const _0x51ca7b=a63_0x532a4c,_0x23ef66=await getDatasetDetail(_0x5e1295[_0x51ca7b(0x12e)](_0x51ca7b(0x132))),_0x242b64=Array[_0x51ca7b(0x10d)](_0x23ef66[_0x51ca7b(0x107)])?_0x23ef66[_0x51ca7b(0x107)]:Array[_0x51ca7b(0x10d)](_0x23ef66[_0x51ca7b(0x13a)])?_0x23ef66[_0x51ca7b(0x13a)]:[],_0x35906c=_0x242b64[_0x51ca7b(0x122)](_0x3c8af6=>normalizeField(_0x3c8af6))[_0x51ca7b(0x133)](_0x4650ae=>_0x4650ae!==null),_0x1b888d=_0x23ef66[_0x51ca7b(0x128)]??{},_0x5af92d=[];for(const [_0x13a70c,_0x42ab0e]of Object[_0x51ca7b(0xf7)](_0x1b888d)){const _0x2f88dd=normalizeOperationEntry(_0x13a70c,_0x42ab0e);if(_0x2f88dd)_0x5af92d['push'](_0x2f88dd);}const _0x1ac0a3=_0x23ef66[_0x51ca7b(0xe9)]??{},_0x2a782c=_0x23ef66['dataset']??{},_0x555874=_0x1ac0a3['dbId']!=null?{'id':_0x1ac0a3[_0x51ca7b(0x108)],'name':_0x1ac0a3[_0x51ca7b(0x129)]??null}:undefined;let _0x55818a;return typeof _0x23ef66[_0x51ca7b(0x137)]==='string'&&(_0x55818a=parseJsonMaybe(_0x23ef66[_0x51ca7b(0x137)])),{'ok':!![],'data':{'id':_0x23ef66[_0x51ca7b(0x103)]??_0x23ef66['id'],'name':_0x23ef66[_0x51ca7b(0xed)],'code':_0x23ef66[_0x51ca7b(0x11f)]||_0x23ef66[_0x51ca7b(0x132)],'doVersion':_0x23ef66[_0x51ca7b(0x124)],'description':_0x23ef66[_0x51ca7b(0xf2)]||_0x2a782c[_0x51ca7b(0x131)]||undefined,'source':_0x23ef66['source']||_0x2a782c[_0x51ca7b(0x100)],'table':_0x1ac0a3[_0x51ca7b(0xf3)]||_0x2a782c[_0x51ca7b(0xf3)],'datasetKey':_0x1ac0a3['datasetKey'],'pk':_0x1ac0a3[_0x51ca7b(0x112)],'db':_0x555874,'dbtable':summarizeDbtable(_0x1ac0a3),'fields':_0x35906c,'operations':_0x5af92d,'indexes':Array[_0x51ca7b(0x10d)](_0x2a782c[_0x51ca7b(0x10f)])?_0x2a782c[_0x51ca7b(0x10f)]:[],'relations':Array[_0x51ca7b(0x10d)](_0x23ef66[_0x51ca7b(0x12f)])?_0x23ef66[_0x51ca7b(0x12f)][_0x51ca7b(0x122)](_0x6b5ed9=>({..._0x6b5ed9[_0x51ca7b(0xf9)]!=null?{'relationId':_0x6b5ed9[_0x51ca7b(0xf9)]}:{},'fromDataset':_0x23ef66['name'],'fromCode':_0x23ef66[_0x51ca7b(0x11f)]||_0x23ef66[_0x51ca7b(0x132)],'fromTable':_0x1ac0a3[_0x51ca7b(0xf3)]||_0x2a782c['tableName'],'fromField':_0x6b5ed9[_0x51ca7b(0x127)],'toDataset':_0x6b5ed9[_0x51ca7b(0x106)],'toCode':_0x6b5ed9[_0x51ca7b(0xff)],'toTable':_0x6b5ed9['toTableName'],'toField':_0x6b5ed9[_0x51ca7b(0x115)],'labelField':_0x6b5ed9[_0x51ca7b(0xec)]||undefined,'cardinality':_0x6b5ed9[_0x51ca7b(0x10a)]||undefined,'bizRelationType':_0x6b5ed9[_0x51ca7b(0x117)]===_0x51ca7b(0x123)?_0x51ca7b(0x123):null})):[],'relatedPages':normalizeRelatedPages(_0x23ef66['relatedPageInfoList']),...Array[_0x51ca7b(0x10d)](_0x23ef66['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x23ef66[_0x51ca7b(0xf8)]}:{},'formatRules':Array[_0x51ca7b(0x10d)](_0x23ef66['formatRules'])?_0x23ef66[_0x51ca7b(0x134)]:[],'validateRules':Array[_0x51ca7b(0x10d)](_0x23ef66['validateRules'])?_0x23ef66['validateRules']:[],..._0x55818a!==undefined?{'extend':_0x55818a}:{},'stats':{'fieldCount':_0x35906c[_0x51ca7b(0x11c)],'operationCount':_0x5af92d[_0x51ca7b(0x11c)]}}};}};
@@ -1 +1 @@
1
- const a64_0x3410f9=a64_0x4224;(function(_0x3c9240,_0x57acc4){const _0x3da0db=a64_0x4224,_0x1cbb30=_0x3c9240();while(!![]){try{const _0x3c083f=-parseInt(_0x3da0db(0x133))/0x1+-parseInt(_0x3da0db(0x12b))/0x2*(-parseInt(_0x3da0db(0x11d))/0x3)+-parseInt(_0x3da0db(0x136))/0x4*(parseInt(_0x3da0db(0x109))/0x5)+parseInt(_0x3da0db(0xfe))/0x6+parseInt(_0x3da0db(0xfb))/0x7+parseInt(_0x3da0db(0x131))/0x8*(parseInt(_0x3da0db(0x11f))/0x9)+-parseInt(_0x3da0db(0x115))/0xa*(-parseInt(_0x3da0db(0xf3))/0xb);if(_0x3c083f===_0x57acc4)break;else _0x1cbb30['push'](_0x1cbb30['shift']());}catch(_0x4f0326){_0x1cbb30['push'](_0x1cbb30['shift']());}}}(a64_0x22b1,0x38faa));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a64_0x22b1(){const _0x2df995=['87439VSZRUV','expect-json','extend.','code','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','Allowed\x20keys:\x20','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','Expectation\x20mismatch\x20at\x20extend.','338254FoWSbC','object','dataset','982326Dydhov','datasetName','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','str','data','dbName','--patch-json','push','entries','businessGroup','355zRDrfX','write','trim','patch','parse','\x20must\x20be\x20valid\x20JSON\x20object:\x20','length','string','Updated\x20dataset\x20extend\x20(','patch-json','validation','datasetId','10mAjGxR','--expect-json','dbId','sort','Patch\x20dataset\x20top-level\x20extend\x20safely','value','--code\x20is\x20required','name','6ewlQCM','/smartapi/dataset/update-driven-data','1224XSaHxG',',\x20actual\x20','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','join','tableName','has','modelId','keys','shape','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','isArray','stringify','347216mObzHN','\x20must\x20be\x20a\x20JSON\x20object','from','appCode','Expected\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','10424YdzSjw','message','125997LRWsNf','extend','Unsupported\x20patch\x20key:\x20','21692bQQWRj','No\x20changes\x20for\x20dataset\x20extend','datasetCode'];a64_0x22b1=function(){return _0x2df995;};return a64_0x22b1();}import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0x3410f9(0x108),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a64_0x3410f9(0x100)}]]);export function parseJsonObjectFlag(_0x295a6c,_0x3509f4){const _0x4a3f83=a64_0x3410f9;if(!_0x295a6c)return undefined;let _0x3ee051;try{_0x3ee051=JSON[_0x4a3f83(0x10d)](_0x295a6c);}catch(_0x3bcb53){const _0x1dcb15=_0x3bcb53 instanceof Error?_0x3bcb53['message']:String(_0x3bcb53);throw CliErrors[_0x4a3f83(0x113)](_0x3509f4+_0x4a3f83(0x10e)+_0x1dcb15);}if(!isPlainObject(_0x3ee051)||Array[_0x4a3f83(0x129)](_0x3ee051))throw CliErrors['validation'](_0x3509f4+_0x4a3f83(0x12c));return _0x3ee051;}export function validateExtendPatchKeys(_0x4c941a){const _0x13bb45=a64_0x3410f9,_0x5c770b=Object[_0x13bb45(0x126)](_0x4c941a);if(_0x5c770b[_0x13bb45(0x10f)]===0x0)throw CliErrors['validation'](_0x13bb45(0x130));for(const _0x1c7685 of _0x5c770b){const _0x5ebf1a=EXTEND_PATCH_REDIRECTS['get'](_0x1c7685);if(_0x5ebf1a)throw CliErrors[_0x13bb45(0x113)](_0x5ebf1a[_0x13bb45(0x132)],_0x5ebf1a['hint']);if(!MUTABLE_EXTEND_KEYS[_0x13bb45(0x124)](_0x1c7685))throw CliErrors[_0x13bb45(0x113)](_0x13bb45(0x135)+_0x1c7685,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x3ea827=a64_0x3410f9,_0x9dac32=Array[_0x3ea827(0x12d)](MUTABLE_EXTEND_KEYS)[_0x3ea827(0x118)]();return _0x9dac32[_0x3ea827(0x10f)]>0x0?_0x3ea827(0xf8)+_0x9dac32['join'](',\x20'):_0x3ea827(0xf9);}export function applyExtendPatch(_0x4e3588,_0x306055){const _0x35196a=a64_0x3410f9;validateExtendPatchKeys(_0x306055);const _0x3d0c25=deepClone(_0x4e3588),_0x32f0ad=[];for(const [_0x55ba94,_0x4fabce]of Object[_0x35196a(0x107)](_0x306055)){const _0x4c7e58=_0x3d0c25[_0x55ba94],_0x18b1e2=deepClone(_0x4fabce);!deepEqual(_0x4c7e58,_0x18b1e2)&&(_0x3d0c25[_0x55ba94]=_0x18b1e2,_0x32f0ad[_0x35196a(0x106)](_0x35196a(0xf5)+_0x55ba94));}return _0x32f0ad['sort'](),{'after':_0x3d0c25,'changedPaths':_0x32f0ad,'changed':_0x32f0ad['length']>0x0};}export function assertExpectation(_0x340d87,_0x26a0df){const _0x2fcbf1=a64_0x3410f9;if(!_0x26a0df)return;for(const [_0x207822,_0x50ffba]of Object['entries'](_0x26a0df)){const _0x3c2e60=_0x340d87[_0x207822];if(!deepEqual(_0x3c2e60,_0x50ffba))throw CliErrors[_0x2fcbf1(0x113)](_0x2fcbf1(0xfa)+_0x207822,_0x2fcbf1(0x12f)+JSON[_0x2fcbf1(0x12a)](_0x50ffba)+_0x2fcbf1(0x120)+JSON[_0x2fcbf1(0x12a)](_0x3c2e60));}}export async function buildDatasetExtendUpdateResult({appCode:_0x18730e,input:_0x805d79,dryRun:_0x157531}){const _0x5617b8=a64_0x3410f9;validateInput(_0x805d79);const _0xa1159a=await getDatasetDetail(_0x805d79[_0x5617b8(0xf6)]),_0x2d3ea7=parseDatasetExtend(_0xa1159a[_0x5617b8(0x134)]),_0x4c6ce9=deepClone(_0x2d3ea7[_0x5617b8(0x11a)]);assertExpectation(_0x4c6ce9,_0x805d79['expect']);const {after:_0xa95cc9,changedPaths:_0x5c8461,changed:_0x5cc30d}=applyExtendPatch(_0x4c6ce9,_0x805d79[_0x5617b8(0x10c)]),_0xd1b716=summarizeDataset(_0xa1159a,_0x805d79[_0x5617b8(0xf6)]);return _0x5cc30d&&!_0x157531&&(_0xa1159a[_0x5617b8(0x134)]=serializeDatasetExtend(_0xa95cc9,_0x2d3ea7[_0x5617b8(0x127)]),await updateDrivenData(_0xa1159a)),{'ok':!![],'data':{'appCode':_0x18730e,'selector':{'code':_0x805d79['code']},'dataset':_0xd1b716,'dryRun':_0x157531,'changed':_0x5cc30d,'changedPaths':_0x5c8461,'before':{'extend':_0x4c6ce9},'after':{'extend':_0xa95cc9},'submitted':_0x5cc30d&&!_0x157531},'message':_0x5cc30d?_0x157531?_0x5617b8(0xf7)+_0x5c8461[_0x5617b8(0x122)](',\x20')+')':_0x5617b8(0x111)+_0x5c8461[_0x5617b8(0x122)](',\x20')+')':_0x5617b8(0xf1)};}export const datasetExtendUpdate={'service':a64_0x3410f9(0xfd),'command':'extend-update','description':a64_0x3410f9(0x119),'risk':a64_0x3410f9(0x10a),'flags':[CODE_FLAG,{'name':a64_0x3410f9(0x112),'type':a64_0x3410f9(0x110),'required':!![],'description':a64_0x3410f9(0x128)},{'name':a64_0x3410f9(0xf4),'type':a64_0x3410f9(0x110),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x56ab18){validateInput(readExtendUpdateInput(_0x56ab18));},async 'dryRun'(_0x463ad6){const _0x24d1e8=a64_0x3410f9,_0x4c6d98=await buildDatasetExtendUpdateResult({'appCode':_0x463ad6[_0x24d1e8(0x12e)],'input':readExtendUpdateInput(_0x463ad6),'dryRun':!![]});return{'method':'POST','url':_0x24d1e8(0x11e),'body':_0x4c6d98[_0x24d1e8(0x103)],'description':_0x4c6d98['message']};},async 'execute'(_0x4978b1){const _0x1ad95b=a64_0x3410f9;return buildDatasetExtendUpdateResult({'appCode':_0x4978b1[_0x1ad95b(0x12e)],'input':readExtendUpdateInput(_0x4978b1),'dryRun':![]});}};function readExtendUpdateInput(_0x451232){const _0x430c4d=a64_0x3410f9,_0x28edd3=trim(_0x451232['str']('code')),_0x1c9435=parseJsonObjectFlag(_0x451232[_0x430c4d(0x102)](_0x430c4d(0x112)),_0x430c4d(0x105)),_0xe46fc1=parseJsonObjectFlag(_0x451232[_0x430c4d(0x102)](_0x430c4d(0xf4)),_0x430c4d(0x116));return{'code':_0x28edd3,'patch':_0x1c9435||{},'expect':_0xe46fc1};}function validateInput(_0xed4f6a){const _0x10eb33=a64_0x3410f9;if(!_0xed4f6a['code'])throw CliErrors['validation'](_0x10eb33(0x11b));validateExtendPatchKeys(_0xed4f6a[_0x10eb33(0x10c)]);}function parseDatasetExtend(_0x3136e7){const _0x1816f6=a64_0x3410f9;if(typeof _0x3136e7===_0x1816f6(0x110)){const _0x34950e=_0x3136e7[_0x1816f6(0x10b)]();if(!_0x34950e)return{'value':{},'shape':_0x1816f6(0x110)};let _0x3f4e92;try{_0x3f4e92=JSON[_0x1816f6(0x10d)](_0x34950e);}catch(_0x15f7ca){const _0x57eaee=_0x15f7ca instanceof Error?_0x15f7ca[_0x1816f6(0x132)]:String(_0x15f7ca);throw CliErrors[_0x1816f6(0x113)](_0x1816f6(0x101)+_0x57eaee);}if(!isPlainObject(_0x3f4e92)||Array[_0x1816f6(0x129)](_0x3f4e92))throw CliErrors[_0x1816f6(0x113)](_0x1816f6(0x121));return{'value':_0x3f4e92,'shape':_0x1816f6(0x110)};}if(_0x3136e7===undefined||_0x3136e7===null)return{'value':{},'shape':_0x1816f6(0x110)};if(!isPlainObject(_0x3136e7)||Array['isArray'](_0x3136e7))throw CliErrors[_0x1816f6(0x113)](_0x1816f6(0x121));return{'value':_0x3136e7,'shape':_0x1816f6(0xfc)};}function serializeDatasetExtend(_0x5424f8,_0x2088a8){const _0x397d6d=a64_0x3410f9;return _0x2088a8===_0x397d6d(0x110)?JSON['stringify'](_0x5424f8):_0x5424f8;}function summarizeDataset(_0x4dbd53,_0x4c007b){const _0x292e7f=a64_0x3410f9,_0x30e0ed=isPlainObject(_0x4dbd53[_0x292e7f(0xfd)])?_0x4dbd53['dataset']:{},_0x145e62=isPlainObject(_0x4dbd53['dbtableConfig'])?_0x4dbd53['dbtableConfig']:{};return{'id':_0x4dbd53[_0x292e7f(0x125)]??_0x4dbd53['id']??_0x30e0ed[_0x292e7f(0x114)]??null,'code':_0x4dbd53['modelCode']??_0x4dbd53['code']??_0x30e0ed[_0x292e7f(0xf2)]??_0x4c007b,'name':_0x4dbd53[_0x292e7f(0x11c)]??_0x30e0ed[_0x292e7f(0xff)]??null,'table':_0x145e62[_0x292e7f(0x123)]??_0x30e0ed['tableName']??null,'db':_0x145e62[_0x292e7f(0x104)]??_0x145e62[_0x292e7f(0x117)]??null};}function deepClone(_0x3478e9){const _0x50f010=a64_0x3410f9;if(_0x3478e9===undefined)return _0x3478e9;return JSON[_0x50f010(0x10d)](JSON[_0x50f010(0x12a)](_0x3478e9));}function deepEqual(_0x46da79,_0x4e60cc){const _0x4125f0=a64_0x3410f9;return JSON[_0x4125f0(0x12a)](_0x46da79)===JSON[_0x4125f0(0x12a)](_0x4e60cc);}function a64_0x4224(_0x450fcd,_0x5e8ab6){_0x450fcd=_0x450fcd-0xf1;const _0x22b19d=a64_0x22b1();let _0x422479=_0x22b19d[_0x450fcd];return _0x422479;}function isPlainObject(_0xec56f8){const _0x410e30=a64_0x3410f9;return Boolean(_0xec56f8)&&typeof _0xec56f8===_0x410e30(0xfc)&&!Array[_0x410e30(0x129)](_0xec56f8);}function trim(_0x50300a){const _0x436546=a64_0x3410f9,_0x2fbe8c=String(_0x50300a||'')[_0x436546(0x10b)]();return _0x2fbe8c;}
1
+ function a64_0x2189(){const _0x544d07=['modelCode','from','235270RBqhct','join','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','string','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','dbtableConfig','4002QCWtbk','Unsupported\x20patch\x20key:\x20','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','has','patch','\x20must\x20be\x20a\x20JSON\x20object','14vATtmt','tableName','businessGroup',',\x20actual\x20','Patch\x20dataset\x20top-level\x20extend\x20safely','object','extend','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','286973xhmlVU','dataset','No\x20changes\x20for\x20dataset\x20extend','patch-json','parse','stringify','45UztwjK','extend-update','code','/smartapi/dataset/update-driven-data','642590xCUvvf','925096wmjrms','get','165hieexu','POST','length','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','write','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','--patch-json','sort','validation','--code\x20is\x20required','dbName','str','value','shape','\x20must\x20be\x20valid\x20JSON\x20object:\x20','568974mqlMYm','push','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','datasetCode','datasetName','name','keys','modelId','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','trim','extend.','appCode','message','Updated\x20dataset\x20extend\x20(','entries','Allowed\x20keys:\x20','445336TPbMbq','isArray'];a64_0x2189=function(){return _0x544d07;};return a64_0x2189();}const a64_0x5775a6=a64_0x46cc;(function(_0x317c66,_0x200398){const _0x552827=a64_0x46cc,_0x280ac8=_0x317c66();while(!![]){try{const _0x534b36=parseInt(_0x552827(0x1fe))/0x1+parseInt(_0x552827(0x1ea))/0x2+-parseInt(_0x552827(0x1d6))/0x3+parseInt(_0x552827(0x1e6))/0x4+parseInt(_0x552827(0x1c7))/0x5*(-parseInt(_0x552827(0x1f0))/0x6)+-parseInt(_0x552827(0x1f6))/0x7*(-parseInt(_0x552827(0x1c5))/0x8)+-parseInt(_0x552827(0x1c0))/0x9*(parseInt(_0x552827(0x1c4))/0xa);if(_0x534b36===_0x200398)break;else _0x280ac8['push'](_0x280ac8['shift']());}catch(_0x41e982){_0x280ac8['push'](_0x280ac8['shift']());}}}(a64_0x2189,0x344ec));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0x5775a6(0x1f8),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a64_0x5775a6(0x1cc)}]]);export function parseJsonObjectFlag(_0x591bc4,_0x521100){const _0x31b840=a64_0x5775a6;if(!_0x591bc4)return undefined;let _0x29b9e2;try{_0x29b9e2=JSON[_0x31b840(0x1be)](_0x591bc4);}catch(_0x4fe73f){const _0x45b120=_0x4fe73f instanceof Error?_0x4fe73f['message']:String(_0x4fe73f);throw CliErrors[_0x31b840(0x1cf)](_0x521100+_0x31b840(0x1d5)+_0x45b120);}if(!isPlainObject(_0x29b9e2)||Array[_0x31b840(0x1e7)](_0x29b9e2))throw CliErrors[_0x31b840(0x1cf)](_0x521100+_0x31b840(0x1f5));return _0x29b9e2;}export function validateExtendPatchKeys(_0x108655){const _0x5add14=a64_0x5775a6,_0x18e0c6=Object[_0x5add14(0x1dc)](_0x108655);if(_0x18e0c6[_0x5add14(0x1c9)]===0x0)throw CliErrors[_0x5add14(0x1cf)](_0x5add14(0x1ec));for(const _0x13d40d of _0x18e0c6){const _0x1c6690=EXTEND_PATCH_REDIRECTS[_0x5add14(0x1c6)](_0x13d40d);if(_0x1c6690)throw CliErrors[_0x5add14(0x1cf)](_0x1c6690[_0x5add14(0x1e2)],_0x1c6690['hint']);if(!MUTABLE_EXTEND_KEYS[_0x5add14(0x1f3)](_0x13d40d))throw CliErrors[_0x5add14(0x1cf)](_0x5add14(0x1f1)+_0x13d40d,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x16ae50=a64_0x5775a6,_0x4ea81e=Array[_0x16ae50(0x1e9)](MUTABLE_EXTEND_KEYS)[_0x16ae50(0x1ce)]();return _0x4ea81e[_0x16ae50(0x1c9)]>0x0?_0x16ae50(0x1e5)+_0x4ea81e[_0x16ae50(0x1eb)](',\x20'):_0x16ae50(0x1ca);}export function applyExtendPatch(_0x379e08,_0x42941d){const _0x491eec=a64_0x5775a6;validateExtendPatchKeys(_0x42941d);const _0x38afe3=deepClone(_0x379e08),_0x589962=[];for(const [_0x510938,_0x3bd065]of Object['entries'](_0x42941d)){const _0x4325b6=_0x38afe3[_0x510938],_0x25e980=deepClone(_0x3bd065);!deepEqual(_0x4325b6,_0x25e980)&&(_0x38afe3[_0x510938]=_0x25e980,_0x589962[_0x491eec(0x1d7)](_0x491eec(0x1e0)+_0x510938));}return _0x589962[_0x491eec(0x1ce)](),{'after':_0x38afe3,'changedPaths':_0x589962,'changed':_0x589962[_0x491eec(0x1c9)]>0x0};}export function assertExpectation(_0x1aba72,_0x25e8b2){const _0x36cc0f=a64_0x5775a6;if(!_0x25e8b2)return;for(const [_0x3859e1,_0x19ae68]of Object[_0x36cc0f(0x1e4)](_0x25e8b2)){const _0x4b31ef=_0x1aba72[_0x3859e1];if(!deepEqual(_0x4b31ef,_0x19ae68))throw CliErrors[_0x36cc0f(0x1cf)]('Expectation\x20mismatch\x20at\x20extend.'+_0x3859e1,'Expected\x20'+JSON[_0x36cc0f(0x1bf)](_0x19ae68)+_0x36cc0f(0x1f9)+JSON[_0x36cc0f(0x1bf)](_0x4b31ef));}}export async function buildDatasetExtendUpdateResult({appCode:_0x237f53,input:_0xcf93b7,dryRun:_0x30e82f}){const _0x1f6461=a64_0x5775a6;validateInput(_0xcf93b7);const _0x4b2d2c=await getDatasetDetail(_0xcf93b7[_0x1f6461(0x1c2)]),_0x212c42=parseDatasetExtend(_0x4b2d2c[_0x1f6461(0x1fc)]),_0x3f46ec=deepClone(_0x212c42[_0x1f6461(0x1d3)]);assertExpectation(_0x3f46ec,_0xcf93b7['expect']);const {after:_0x97978f,changedPaths:_0x1cf81d,changed:_0x53b13f}=applyExtendPatch(_0x3f46ec,_0xcf93b7[_0x1f6461(0x1f4)]),_0x51a094=summarizeDataset(_0x4b2d2c,_0xcf93b7[_0x1f6461(0x1c2)]);return _0x53b13f&&!_0x30e82f&&(_0x4b2d2c[_0x1f6461(0x1fc)]=serializeDatasetExtend(_0x97978f,_0x212c42[_0x1f6461(0x1d4)]),await updateDrivenData(_0x4b2d2c)),{'ok':!![],'data':{'appCode':_0x237f53,'selector':{'code':_0xcf93b7['code']},'dataset':_0x51a094,'dryRun':_0x30e82f,'changed':_0x53b13f,'changedPaths':_0x1cf81d,'before':{'extend':_0x3f46ec},'after':{'extend':_0x97978f},'submitted':_0x53b13f&&!_0x30e82f},'message':_0x53b13f?_0x30e82f?_0x1f6461(0x1ee)+_0x1cf81d[_0x1f6461(0x1eb)](',\x20')+')':_0x1f6461(0x1e3)+_0x1cf81d['join'](',\x20')+')':_0x1f6461(0x1bc)};}export const datasetExtendUpdate={'service':a64_0x5775a6(0x1ff),'command':a64_0x5775a6(0x1c1),'description':a64_0x5775a6(0x1fa),'risk':a64_0x5775a6(0x1cb),'flags':[CODE_FLAG,{'name':a64_0x5775a6(0x1bd),'type':a64_0x5775a6(0x1ed),'required':!![],'description':a64_0x5775a6(0x1f2)},{'name':'expect-json','type':a64_0x5775a6(0x1ed),'required':![],'description':a64_0x5775a6(0x1de)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x53deaa){validateInput(readExtendUpdateInput(_0x53deaa));},async 'dryRun'(_0x4d1ce6){const _0x53477e=a64_0x5775a6,_0x497edc=await buildDatasetExtendUpdateResult({'appCode':_0x4d1ce6[_0x53477e(0x1e1)],'input':readExtendUpdateInput(_0x4d1ce6),'dryRun':!![]});return{'method':_0x53477e(0x1c8),'url':_0x53477e(0x1c3),'body':_0x497edc['data'],'description':_0x497edc['message']};},async 'execute'(_0x58426c){return buildDatasetExtendUpdateResult({'appCode':_0x58426c['appCode'],'input':readExtendUpdateInput(_0x58426c),'dryRun':![]});}};function a64_0x46cc(_0x32a58d,_0x2c3b9e){_0x32a58d=_0x32a58d-0x1bc;const _0x218945=a64_0x2189();let _0x46cc4b=_0x218945[_0x32a58d];return _0x46cc4b;}function readExtendUpdateInput(_0x73213){const _0x4a991b=a64_0x5775a6,_0x3e80e9=trim(_0x73213[_0x4a991b(0x1d2)]('code')),_0x2c9e88=parseJsonObjectFlag(_0x73213[_0x4a991b(0x1d2)]('patch-json'),_0x4a991b(0x1cd)),_0x192847=parseJsonObjectFlag(_0x73213[_0x4a991b(0x1d2)]('expect-json'),'--expect-json');return{'code':_0x3e80e9,'patch':_0x2c9e88||{},'expect':_0x192847};}function validateInput(_0x1f19bb){const _0x3dfb8f=a64_0x5775a6;if(!_0x1f19bb[_0x3dfb8f(0x1c2)])throw CliErrors[_0x3dfb8f(0x1cf)](_0x3dfb8f(0x1d0));validateExtendPatchKeys(_0x1f19bb[_0x3dfb8f(0x1f4)]);}function parseDatasetExtend(_0x174cee){const _0x258f11=a64_0x5775a6;if(typeof _0x174cee===_0x258f11(0x1ed)){const _0x2f0188=_0x174cee[_0x258f11(0x1df)]();if(!_0x2f0188)return{'value':{},'shape':_0x258f11(0x1ed)};let _0x1e4d45;try{_0x1e4d45=JSON['parse'](_0x2f0188);}catch(_0x502658){const _0x27f7e0=_0x502658 instanceof Error?_0x502658[_0x258f11(0x1e2)]:String(_0x502658);throw CliErrors[_0x258f11(0x1cf)](_0x258f11(0x1d8)+_0x27f7e0);}if(!isPlainObject(_0x1e4d45)||Array['isArray'](_0x1e4d45))throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x1e4d45,'shape':_0x258f11(0x1ed)};}if(_0x174cee===undefined||_0x174cee===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x174cee)||Array[_0x258f11(0x1e7)](_0x174cee))throw CliErrors[_0x258f11(0x1cf)](_0x258f11(0x1fd));return{'value':_0x174cee,'shape':_0x258f11(0x1fb)};}function serializeDatasetExtend(_0x4dfca0,_0x5017c9){const _0x491e2c=a64_0x5775a6;return _0x5017c9===_0x491e2c(0x1ed)?JSON[_0x491e2c(0x1bf)](_0x4dfca0):_0x4dfca0;}function summarizeDataset(_0x417b39,_0x491cee){const _0x183b47=a64_0x5775a6,_0x42ed49=isPlainObject(_0x417b39['dataset'])?_0x417b39['dataset']:{},_0x2ac0c7=isPlainObject(_0x417b39[_0x183b47(0x1ef)])?_0x417b39['dbtableConfig']:{};return{'id':_0x417b39[_0x183b47(0x1dd)]??_0x417b39['id']??_0x42ed49['datasetId']??null,'code':_0x417b39[_0x183b47(0x1e8)]??_0x417b39[_0x183b47(0x1c2)]??_0x42ed49[_0x183b47(0x1d9)]??_0x491cee,'name':_0x417b39[_0x183b47(0x1db)]??_0x42ed49[_0x183b47(0x1da)]??null,'table':_0x2ac0c7[_0x183b47(0x1f7)]??_0x42ed49[_0x183b47(0x1f7)]??null,'db':_0x2ac0c7[_0x183b47(0x1d1)]??_0x2ac0c7['dbId']??null};}function deepClone(_0x17b850){const _0x1591ec=a64_0x5775a6;if(_0x17b850===undefined)return _0x17b850;return JSON[_0x1591ec(0x1be)](JSON[_0x1591ec(0x1bf)](_0x17b850));}function deepEqual(_0x225eef,_0x29a3d9){const _0x239923=a64_0x5775a6;return JSON[_0x239923(0x1bf)](_0x225eef)===JSON[_0x239923(0x1bf)](_0x29a3d9);}function isPlainObject(_0x5cd87b){return Boolean(_0x5cd87b)&&typeof _0x5cd87b==='object'&&!Array['isArray'](_0x5cd87b);}function trim(_0x3d4f15){const _0xf8f0e1=String(_0x3d4f15||'')['trim']();return _0xf8f0e1;}
@@ -1 +1 @@
1
- const a65_0x5cc5f9=a65_0x51cc;(function(_0x52cbb5,_0x3b939b){const _0x3e2e8a=a65_0x51cc,_0x375947=_0x52cbb5();while(!![]){try{const _0x1d301c=-parseInt(_0x3e2e8a(0x162))/0x1+-parseInt(_0x3e2e8a(0x12d))/0x2+parseInt(_0x3e2e8a(0x158))/0x3+parseInt(_0x3e2e8a(0x136))/0x4+parseInt(_0x3e2e8a(0x16c))/0x5+-parseInt(_0x3e2e8a(0x14c))/0x6*(parseInt(_0x3e2e8a(0x153))/0x7)+-parseInt(_0x3e2e8a(0x148))/0x8;if(_0x1d301c===_0x3b939b)break;else _0x375947['push'](_0x375947['shift']());}catch(_0x53311b){_0x375947['push'](_0x375947['shift']());}}}(a65_0x239a,0xbac46));function a65_0x51cc(_0x2902c4,_0x74adad){_0x2902c4=_0x2902c4-0x12d;const _0x239aa0=a65_0x239a();let _0x51cc80=_0x239aa0[_0x2902c4];return _0x51cc80;}import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a65_0x5cc5f9(0x13d),a65_0x5cc5f9(0x160),a65_0x5cc5f9(0x156),a65_0x5cc5f9(0x135),'required',a65_0x5cc5f9(0x12e),'defaultAggregation','chartRole',a65_0x5cc5f9(0x131)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x5cc5f9(0x164),a65_0x5cc5f9(0x165),a65_0x5cc5f9(0x168),a65_0x5cc5f9(0x16a),a65_0x5cc5f9(0x139),a65_0x5cc5f9(0x15b),'tableName',a65_0x5cc5f9(0x159),a65_0x5cc5f9(0x174),a65_0x5cc5f9(0x13b),a65_0x5cc5f9(0x14d)]);export function parseJsonObjectFlag(_0x57f0ad,_0x5d9fc7){const _0x5bdf0c=a65_0x5cc5f9;if(!_0x57f0ad)return undefined;let _0x2af705;try{_0x2af705=JSON[_0x5bdf0c(0x15e)](_0x57f0ad);}catch(_0x11e593){const _0x2acd43=_0x11e593 instanceof Error?_0x11e593[_0x5bdf0c(0x167)]:String(_0x11e593);throw CliErrors[_0x5bdf0c(0x146)](_0x5d9fc7+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x2acd43);}if(!isPlainObject(_0x2af705)||Array['isArray'](_0x2af705))throw CliErrors[_0x5bdf0c(0x146)](_0x5d9fc7+_0x5bdf0c(0x15d));return _0x2af705;}export function validatePatchKeys(_0x2f8c75){const _0x147ab9=a65_0x5cc5f9,_0x2ea7a5=Object['keys'](_0x2f8c75);if(_0x2ea7a5[_0x147ab9(0x15c)]===0x0)throw CliErrors['validation'](_0x147ab9(0x12f));for(const _0x3f0737 of _0x2ea7a5){if(FORBIDDEN_FIELD_KEYS[_0x147ab9(0x14e)](_0x3f0737))throw CliErrors['validation'](_0x147ab9(0x176)+_0x3f0737);if(!MUTABLE_FIELD_KEYS[_0x147ab9(0x14e)](_0x3f0737))throw CliErrors[_0x147ab9(0x146)](_0x147ab9(0x130)+_0x3f0737,'Allowed\x20keys:\x20'+Array[_0x147ab9(0x16e)](MUTABLE_FIELD_KEYS)[_0x147ab9(0x134)](',\x20'));}}export function applyFieldPatch(_0x21402c,_0x402b72){const _0x2458cb=a65_0x5cc5f9;validatePatchKeys(_0x402b72);const _0x505834=deepClone(_0x21402c),_0xf7b443=new Set();for(const [_0x3e2e48,_0x454552]of Object[_0x2458cb(0x175)](_0x402b72)){const _0x233e4e=_0x505834[_0x3e2e48],_0xb2c900=mergePatchValue(_0x233e4e,_0x454552);!deepEqual(_0x233e4e,_0xb2c900)&&(_0x505834[_0x3e2e48]=_0xb2c900,_0xf7b443[_0x2458cb(0x142)](_0x3e2e48),collectChangedPaths(_0x3e2e48,_0x233e4e,_0xb2c900,_0xf7b443));}return{'after':_0x505834,'changedPaths':Array[_0x2458cb(0x16e)](_0xf7b443)[_0x2458cb(0x138)](),'changed':_0xf7b443[_0x2458cb(0x17a)]>0x0};}export function assertExpectation(_0x29c70c,_0x3d7371){const _0x12b9b4=a65_0x5cc5f9;if(!_0x3d7371)return;for(const [_0x428f22,_0x33cec9]of Object[_0x12b9b4(0x175)](_0x3d7371)){const _0x368357=_0x29c70c[_0x428f22];if(!deepEqual(_0x368357,_0x33cec9))throw CliErrors[_0x12b9b4(0x146)](_0x12b9b4(0x16f)+_0x428f22,_0x12b9b4(0x16b)+JSON['stringify'](_0x33cec9)+_0x12b9b4(0x14a)+JSON[_0x12b9b4(0x157)](_0x368357));}}export async function buildDatasetFieldUpdateResult({appCode:_0x21a72e,input:_0x182c76,dryRun:_0xce0274}){const _0xef3bf1=a65_0x5cc5f9;validateInput(_0x182c76);const _0x4bb3bc=await getDatasetDetail(_0x182c76['code']),_0x138d8=readFieldArray(_0x4bb3bc),_0x1609dd=_0x138d8[_0xef3bf1(0x179)](_0x18c393=>_0x18c393?.[_0xef3bf1(0x164)]===_0x182c76[_0xef3bf1(0x141)]);if(_0x1609dd<0x0)throw CliErrors[_0xef3bf1(0x146)]('Field\x20not\x20found:\x20'+_0x182c76['field']);const _0xcc6532=deepClone(_0x138d8[_0x1609dd]);assertExpectation(_0xcc6532,_0x182c76[_0xef3bf1(0x13a)]);const {after:_0x1948cf,changedPaths:_0x30e5d6,changed:_0x41560f}=applyFieldPatch(_0xcc6532,_0x182c76[_0xef3bf1(0x133)]),_0x7fc4ce=summarizeDataset(_0x4bb3bc,_0x182c76[_0xef3bf1(0x165)]);return _0x41560f&&!_0xce0274&&(_0x138d8[_0x1609dd]=_0x1948cf,await updateDrivenData(_0x4bb3bc)),{'ok':!![],'data':{'appCode':_0x21a72e,'selector':{'code':_0x182c76[_0xef3bf1(0x165)]},'dataset':_0x7fc4ce,'field':{'id':_0xcc6532['id']??null,'name':_0xcc6532['name']},'dryRun':_0xce0274,'changed':_0x41560f,'changedPaths':_0x30e5d6,'before':_0xcc6532,'after':_0x1948cf,'submitted':_0x41560f&&!_0xce0274},'message':_0x41560f?_0xce0274?_0xef3bf1(0x173)+_0x182c76['field']+_0xef3bf1(0x161)+_0x30e5d6[_0xef3bf1(0x134)](',\x20')+')':_0xef3bf1(0x17b)+_0x182c76[_0xef3bf1(0x141)]+'\x20('+_0x30e5d6[_0xef3bf1(0x134)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x182c76[_0xef3bf1(0x141)]};}export const datasetFieldUpdate={'service':a65_0x5cc5f9(0x140),'command':a65_0x5cc5f9(0x147),'description':a65_0x5cc5f9(0x151),'risk':'write','flags':[CODE_FLAG,{'name':'field','type':a65_0x5cc5f9(0x16d),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':a65_0x5cc5f9(0x154),'type':a65_0x5cc5f9(0x16d),'required':!![],'description':a65_0x5cc5f9(0x132)},{'name':'expect-json','type':a65_0x5cc5f9(0x16d),'required':![],'description':a65_0x5cc5f9(0x178)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d3219){validateInput(readFieldUpdateInput(_0x3d3219));},async 'dryRun'(_0x374f11){const _0x39d1c8=a65_0x5cc5f9,_0x8ee146=await buildDatasetFieldUpdateResult({'appCode':_0x374f11['appCode'],'input':readFieldUpdateInput(_0x374f11),'dryRun':!![]});return{'method':_0x39d1c8(0x177),'url':_0x39d1c8(0x15a),'body':_0x8ee146[_0x39d1c8(0x163)],'description':_0x8ee146[_0x39d1c8(0x167)]};},async 'execute'(_0x1dab3b){return buildDatasetFieldUpdateResult({'appCode':_0x1dab3b['appCode'],'input':readFieldUpdateInput(_0x1dab3b),'dryRun':![]});}};function readFieldUpdateInput(_0x5cb3af){const _0xede626=a65_0x5cc5f9,_0x5591ff=trim(_0x5cb3af[_0xede626(0x13c)](_0xede626(0x165))),_0x340e42=emptyToUndefined(_0x5cb3af[_0xede626(0x13c)](_0xede626(0x141))),_0xfd35c5=parseJsonObjectFlag(_0x5cb3af[_0xede626(0x13c)]('patch-json'),'--patch-json'),_0x4e3d80=parseJsonObjectFlag(_0x5cb3af[_0xede626(0x13c)](_0xede626(0x137)),_0xede626(0x155));return{'code':_0x5591ff,'field':_0x340e42||'','patch':_0xfd35c5||{},'expect':_0x4e3d80};}function validateInput(_0x37c693){const _0x4b5284=a65_0x5cc5f9;if(!_0x37c693[_0x4b5284(0x165)])throw CliErrors[_0x4b5284(0x146)](_0x4b5284(0x143));if(!_0x37c693['field'])throw CliErrors[_0x4b5284(0x146)](_0x4b5284(0x166));validatePatchKeys(_0x37c693[_0x4b5284(0x133)]);}function readFieldArray(_0x30d275){const _0x231522=a65_0x5cc5f9;if(Array[_0x231522(0x169)](_0x30d275[_0x231522(0x13e)]))return _0x30d275['fields'];if(Array[_0x231522(0x169)](_0x30d275[_0x231522(0x14f)]))return _0x30d275[_0x231522(0x14f)];throw CliErrors[_0x231522(0x146)](_0x231522(0x15f));}function summarizeDataset(_0x5a4bd2,_0xe98645){const _0x5bd100=a65_0x5cc5f9,_0x442950=isPlainObject(_0x5a4bd2[_0x5bd100(0x140)])?_0x5a4bd2[_0x5bd100(0x140)]:{},_0x3fbc25=isPlainObject(_0x5a4bd2[_0x5bd100(0x14b)])?_0x5a4bd2['dbtableConfig']:{};return{'id':_0x5a4bd2[_0x5bd100(0x170)]??_0x5a4bd2['id']??_0x442950['datasetId']??null,'code':_0x5a4bd2[_0x5bd100(0x172)]??_0x5a4bd2[_0x5bd100(0x165)]??_0x442950[_0x5bd100(0x149)]??_0xe98645,'name':_0x5a4bd2[_0x5bd100(0x164)]??_0x442950[_0x5bd100(0x145)]??null,'table':_0x3fbc25[_0x5bd100(0x171)]??_0x442950[_0x5bd100(0x171)]??null,'db':_0x3fbc25[_0x5bd100(0x150)]??_0x3fbc25['dbId']??null};}function mergePatchValue(_0x828eeb,_0x4a8b2f){if(isPlainObject(_0x828eeb)&&isPlainObject(_0x4a8b2f))return deepMerge(_0x828eeb,_0x4a8b2f);return deepClone(_0x4a8b2f);}function deepMerge(_0x2f0df9,_0x552f4a){const _0x34ad42=a65_0x5cc5f9,_0x2a9e14=deepClone(_0x2f0df9);for(const [_0x3bf782,_0x2c1abe]of Object[_0x34ad42(0x175)](_0x552f4a)){_0x2a9e14[_0x3bf782]=isPlainObject(_0x2a9e14[_0x3bf782])&&isPlainObject(_0x2c1abe)?deepMerge(_0x2a9e14[_0x3bf782],_0x2c1abe):deepClone(_0x2c1abe);}return _0x2a9e14;}function collectChangedPaths(_0x312ecb,_0x2e89e4,_0x32a20e,_0x265abc){const _0xa2a432=a65_0x5cc5f9;if(!isPlainObject(_0x2e89e4)||!isPlainObject(_0x32a20e))return;const _0x3288f6=new Set([...Object[_0xa2a432(0x152)](_0x2e89e4),...Object[_0xa2a432(0x152)](_0x32a20e)]);for(const _0x2fe2fa of _0x3288f6){const _0x36729a=_0x2e89e4[_0x2fe2fa],_0x2f67e9=_0x32a20e[_0x2fe2fa];!deepEqual(_0x36729a,_0x2f67e9)&&_0x265abc[_0xa2a432(0x142)](_0x312ecb+'.'+_0x2fe2fa);}}function a65_0x239a(){const _0x65f990=['JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','findIndex','size','Updated\x20dataset\x20field\x20','2243020iGCnbQ','datetimeFormat','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Unsupported\x20patch\x20key:\x20','deprecated','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','patch','join','options','6084688hMZUDZ','expect-json','sort','dbTypeScale','expect','autoIncrement','str','doType','fields','object','dataset','field','add','--code\x20is\x20required','trim','datasetName','validation','field-update','4025224CpDIam','datasetCode',',\x20actual\x20','dbtableConfig','7284168vTQJpj','systemRetain','has','properties','dbName','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','keys','7lhSUMZ','patch-json','--expect-json','description','stringify','3909780hVbBjN','deleted','/smartapi/dataset/update-driven-data','dbFieldName','length','\x20must\x20be\x20a\x20JSON\x20object','parse','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','displayName','\x20would\x20change\x20(','60524RssQtC','data','name','code','--field\x20is\x20required','message','dbType','isArray','dbTypeLen','Expected\x20','4198905zhKKZL','string','from','Expectation\x20mismatch\x20at\x20','modelId','tableName','modelCode','Dry-run:\x20dataset\x20field\x20','pkField','entries','Forbidden\x20patch\x20key:\x20','POST'];a65_0x239a=function(){return _0x65f990;};return a65_0x239a();}function deepClone(_0x2f893e){const _0x348e59=a65_0x5cc5f9;if(_0x2f893e===undefined)return _0x2f893e;return JSON[_0x348e59(0x15e)](JSON[_0x348e59(0x157)](_0x2f893e));}function deepEqual(_0x1b2772,_0x429c79){const _0x3447ba=a65_0x5cc5f9;return JSON[_0x3447ba(0x157)](_0x1b2772)===JSON['stringify'](_0x429c79);}function isPlainObject(_0x2414a7){const _0x37d210=a65_0x5cc5f9;return Boolean(_0x2414a7)&&typeof _0x2414a7===_0x37d210(0x13f)&&!Array['isArray'](_0x2414a7);}function emptyToUndefined(_0x1b5b2c){const _0x1b47bd=a65_0x5cc5f9,_0x19d507=String(_0x1b5b2c||'')[_0x1b47bd(0x144)]();return _0x19d507||undefined;}function trim(_0x2ff438){const _0x27092b=a65_0x5cc5f9;return String(_0x2ff438||'')[_0x27092b(0x144)]();}
1
+ const a65_0x118b09=a65_0x3057;(function(_0x599162,_0x27b735){const _0x996c6c=a65_0x3057,_0x25783c=_0x599162();while(!![]){try{const _0x5f17de=-parseInt(_0x996c6c(0x1ee))/0x1+parseInt(_0x996c6c(0x213))/0x2+parseInt(_0x996c6c(0x1ec))/0x3+parseInt(_0x996c6c(0x220))/0x4*(parseInt(_0x996c6c(0x227))/0x5)+-parseInt(_0x996c6c(0x20d))/0x6+parseInt(_0x996c6c(0x1ea))/0x7*(-parseInt(_0x996c6c(0x20e))/0x8)+parseInt(_0x996c6c(0x217))/0x9;if(_0x5f17de===_0x27b735)break;else _0x25783c['push'](_0x25783c['shift']());}catch(_0x5d1fe8){_0x25783c['push'](_0x25783c['shift']());}}}(a65_0xd240,0x8e5cd));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a65_0xd240(){const _0x1aec92=['add','doType','options','write','trim','required','4363380WYoLOZ','8LhbKxd','tableName','--field\x20is\x20required','entries','datasetId','1345588CGeQNn','stringify','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','sort','1525077Ezbrcy','datasetCode','defaultAggregation','Field\x20not\x20found:\x20','--expect-json','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','dbName','parse','from','4tlbUik','dbType','deprecated','expect-json','dbFieldName','No\x20changes\x20for\x20dataset\x20field\x20','appCode','4734770ToOpbE','length','Unsupported\x20patch\x20key:\x20','description','string','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','deleted','Forbidden\x20patch\x20key:\x20','dataset','--patch-json','has','modelId','datetimeFormat','dbTypeLen','validation','properties','5908581zovEOZ','patch-json','3143556llVpat','size','682623FkYVat','field','data','fields','dbTypeScale','POST',',\x20actual\x20','Expectation\x20mismatch\x20at\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Exact\x20raw\x20fields[].name\x20to\x20patch','str','Allowed\x20keys:\x20','keys','isArray','join','findIndex','patch','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','message','dbtableConfig','\x20would\x20change\x20(','code','name','pkField','\x20must\x20be\x20a\x20JSON\x20object'];a65_0xd240=function(){return _0x1aec92;};return a65_0xd240();}import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a65_0x118b09(0x208),'displayName',a65_0x118b09(0x22a),a65_0x118b09(0x209),a65_0x118b09(0x20c),a65_0x118b09(0x1e6),a65_0x118b09(0x219),'chartRole',a65_0x118b09(0x222)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x118b09(0x204),a65_0x118b09(0x203),a65_0x118b09(0x221),a65_0x118b09(0x1e7),a65_0x118b09(0x1f2),a65_0x118b09(0x224),'tableName',a65_0x118b09(0x22d),a65_0x118b09(0x205),'autoIncrement','systemRetain']);export function parseJsonObjectFlag(_0x5ce4f1,_0x496dac){const _0x460e96=a65_0x118b09;if(!_0x5ce4f1)return undefined;let _0x3ac642;try{_0x3ac642=JSON['parse'](_0x5ce4f1);}catch(_0x5afc77){const _0x3aa17d=_0x5afc77 instanceof Error?_0x5afc77[_0x460e96(0x200)]:String(_0x5afc77);throw CliErrors[_0x460e96(0x1e8)](_0x496dac+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x3aa17d);}if(!isPlainObject(_0x3ac642)||Array[_0x460e96(0x1fb)](_0x3ac642))throw CliErrors[_0x460e96(0x1e8)](_0x496dac+_0x460e96(0x206));return _0x3ac642;}export function validatePatchKeys(_0x58e9e8){const _0x14637c=a65_0x118b09,_0x41733c=Object['keys'](_0x58e9e8);if(_0x41733c[_0x14637c(0x228)]===0x0)throw CliErrors['validation'](_0x14637c(0x1f6));for(const _0x2feb09 of _0x41733c){if(FORBIDDEN_FIELD_KEYS[_0x14637c(0x1e4)](_0x2feb09))throw CliErrors['validation'](_0x14637c(0x1e1)+_0x2feb09);if(!MUTABLE_FIELD_KEYS[_0x14637c(0x1e4)](_0x2feb09))throw CliErrors['validation'](_0x14637c(0x229)+_0x2feb09,_0x14637c(0x1f9)+Array['from'](MUTABLE_FIELD_KEYS)[_0x14637c(0x1fc)](',\x20'));}}export function applyFieldPatch(_0x51615f,_0x2df657){const _0x4379d7=a65_0x118b09;validatePatchKeys(_0x2df657);const _0x6c3b7=deepClone(_0x51615f),_0x2710a3=new Set();for(const [_0x58648f,_0x15e4e0]of Object[_0x4379d7(0x211)](_0x2df657)){const _0x45f957=_0x6c3b7[_0x58648f],_0xec78d1=mergePatchValue(_0x45f957,_0x15e4e0);!deepEqual(_0x45f957,_0xec78d1)&&(_0x6c3b7[_0x58648f]=_0xec78d1,_0x2710a3[_0x4379d7(0x207)](_0x58648f),collectChangedPaths(_0x58648f,_0x45f957,_0xec78d1,_0x2710a3));}return{'after':_0x6c3b7,'changedPaths':Array[_0x4379d7(0x21f)](_0x2710a3)[_0x4379d7(0x216)](),'changed':_0x2710a3[_0x4379d7(0x1ed)]>0x0};}export function assertExpectation(_0x45de91,_0x423afa){const _0x2ff79c=a65_0x118b09;if(!_0x423afa)return;for(const [_0x335c06,_0x5ef9d3]of Object[_0x2ff79c(0x211)](_0x423afa)){const _0xd642ba=_0x45de91[_0x335c06];if(!deepEqual(_0xd642ba,_0x5ef9d3))throw CliErrors[_0x2ff79c(0x1e8)](_0x2ff79c(0x1f5)+_0x335c06,'Expected\x20'+JSON['stringify'](_0x5ef9d3)+_0x2ff79c(0x1f4)+JSON[_0x2ff79c(0x214)](_0xd642ba));}}export async function buildDatasetFieldUpdateResult({appCode:_0x2c52f1,input:_0x4584e4,dryRun:_0x2c4d77}){const _0x1a5185=a65_0x118b09;validateInput(_0x4584e4);const _0x3e4257=await getDatasetDetail(_0x4584e4[_0x1a5185(0x203)]),_0x390eb2=readFieldArray(_0x3e4257),_0x4f5f8c=_0x390eb2[_0x1a5185(0x1fd)](_0x34ad4c=>_0x34ad4c?.['name']===_0x4584e4[_0x1a5185(0x1ef)]);if(_0x4f5f8c<0x0)throw CliErrors['validation'](_0x1a5185(0x21a)+_0x4584e4['field']);const _0x4e5606=deepClone(_0x390eb2[_0x4f5f8c]);assertExpectation(_0x4e5606,_0x4584e4['expect']);const {after:_0x451cc4,changedPaths:_0x505cdc,changed:_0x1501ec}=applyFieldPatch(_0x4e5606,_0x4584e4[_0x1a5185(0x1fe)]),_0x3eb900=summarizeDataset(_0x3e4257,_0x4584e4[_0x1a5185(0x203)]);return _0x1501ec&&!_0x2c4d77&&(_0x390eb2[_0x4f5f8c]=_0x451cc4,await updateDrivenData(_0x3e4257)),{'ok':!![],'data':{'appCode':_0x2c52f1,'selector':{'code':_0x4584e4['code']},'dataset':_0x3eb900,'field':{'id':_0x4e5606['id']??null,'name':_0x4e5606['name']},'dryRun':_0x2c4d77,'changed':_0x1501ec,'changedPaths':_0x505cdc,'before':_0x4e5606,'after':_0x451cc4,'submitted':_0x1501ec&&!_0x2c4d77},'message':_0x1501ec?_0x2c4d77?'Dry-run:\x20dataset\x20field\x20'+_0x4584e4['field']+_0x1a5185(0x202)+_0x505cdc[_0x1a5185(0x1fc)](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x4584e4[_0x1a5185(0x1ef)]+'\x20('+_0x505cdc[_0x1a5185(0x1fc)](',\x20')+')':_0x1a5185(0x225)+_0x4584e4['field']};}export const datasetFieldUpdate={'service':'dataset','command':'field-update','description':a65_0x118b09(0x21c),'risk':a65_0x118b09(0x20a),'flags':[CODE_FLAG,{'name':'field','type':a65_0x118b09(0x22b),'required':!![],'description':a65_0x118b09(0x1f7)},{'name':a65_0x118b09(0x1eb),'type':'string','required':!![],'description':a65_0x118b09(0x22c)},{'name':'expect-json','type':a65_0x118b09(0x22b),'required':![],'description':a65_0x118b09(0x1ff)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x48d36e){validateInput(readFieldUpdateInput(_0x48d36e));},async 'dryRun'(_0x497e63){const _0x1d13a3=a65_0x118b09,_0x112de9=await buildDatasetFieldUpdateResult({'appCode':_0x497e63[_0x1d13a3(0x226)],'input':readFieldUpdateInput(_0x497e63),'dryRun':!![]});return{'method':_0x1d13a3(0x1f3),'url':'/smartapi/dataset/update-driven-data','body':_0x112de9[_0x1d13a3(0x1f0)],'description':_0x112de9['message']};},async 'execute'(_0x52775f){return buildDatasetFieldUpdateResult({'appCode':_0x52775f['appCode'],'input':readFieldUpdateInput(_0x52775f),'dryRun':![]});}};function readFieldUpdateInput(_0x5d1c55){const _0x1d115c=a65_0x118b09,_0x57fc06=trim(_0x5d1c55[_0x1d115c(0x1f8)](_0x1d115c(0x203))),_0x13ee75=emptyToUndefined(_0x5d1c55['str'](_0x1d115c(0x1ef))),_0x518172=parseJsonObjectFlag(_0x5d1c55['str'](_0x1d115c(0x1eb)),_0x1d115c(0x1e3)),_0x102d25=parseJsonObjectFlag(_0x5d1c55[_0x1d115c(0x1f8)](_0x1d115c(0x223)),_0x1d115c(0x21b));return{'code':_0x57fc06,'field':_0x13ee75||'','patch':_0x518172||{},'expect':_0x102d25};}function validateInput(_0x4036e5){const _0x4e09f5=a65_0x118b09;if(!_0x4036e5[_0x4e09f5(0x203)])throw CliErrors[_0x4e09f5(0x1e8)]('--code\x20is\x20required');if(!_0x4036e5[_0x4e09f5(0x1ef)])throw CliErrors['validation'](_0x4e09f5(0x210));validatePatchKeys(_0x4036e5[_0x4e09f5(0x1fe)]);}function readFieldArray(_0x5672b5){const _0x4a4a1f=a65_0x118b09;if(Array['isArray'](_0x5672b5[_0x4a4a1f(0x1f1)]))return _0x5672b5['fields'];if(Array[_0x4a4a1f(0x1fb)](_0x5672b5[_0x4a4a1f(0x1e9)]))return _0x5672b5[_0x4a4a1f(0x1e9)];throw CliErrors[_0x4a4a1f(0x1e8)](_0x4a4a1f(0x215));}function summarizeDataset(_0x93619b,_0x2f2f49){const _0x47cc09=a65_0x118b09,_0x5ed320=isPlainObject(_0x93619b[_0x47cc09(0x1e2)])?_0x93619b[_0x47cc09(0x1e2)]:{},_0x3fd7c1=isPlainObject(_0x93619b[_0x47cc09(0x201)])?_0x93619b[_0x47cc09(0x201)]:{};return{'id':_0x93619b[_0x47cc09(0x1e5)]??_0x93619b['id']??_0x5ed320[_0x47cc09(0x212)]??null,'code':_0x93619b['modelCode']??_0x93619b['code']??_0x5ed320[_0x47cc09(0x218)]??_0x2f2f49,'name':_0x93619b[_0x47cc09(0x204)]??_0x5ed320['datasetName']??null,'table':_0x3fd7c1[_0x47cc09(0x20f)]??_0x5ed320['tableName']??null,'db':_0x3fd7c1[_0x47cc09(0x21d)]??_0x3fd7c1['dbId']??null};}function mergePatchValue(_0x2bbb55,_0x56caa4){if(isPlainObject(_0x2bbb55)&&isPlainObject(_0x56caa4))return deepMerge(_0x2bbb55,_0x56caa4);return deepClone(_0x56caa4);}function deepMerge(_0x1cb884,_0x1cdf6d){const _0x9baa63=a65_0x118b09,_0x2ff5ad=deepClone(_0x1cb884);for(const [_0xeeaa92,_0x899619]of Object[_0x9baa63(0x211)](_0x1cdf6d)){_0x2ff5ad[_0xeeaa92]=isPlainObject(_0x2ff5ad[_0xeeaa92])&&isPlainObject(_0x899619)?deepMerge(_0x2ff5ad[_0xeeaa92],_0x899619):deepClone(_0x899619);}return _0x2ff5ad;}function collectChangedPaths(_0x5d682c,_0x4d94ab,_0x41b1a9,_0x582294){const _0x3f0ec9=a65_0x118b09;if(!isPlainObject(_0x4d94ab)||!isPlainObject(_0x41b1a9))return;const _0x24b156=new Set([...Object['keys'](_0x4d94ab),...Object[_0x3f0ec9(0x1fa)](_0x41b1a9)]);for(const _0x32d1a0 of _0x24b156){const _0x5044f8=_0x4d94ab[_0x32d1a0],_0x39e59b=_0x41b1a9[_0x32d1a0];!deepEqual(_0x5044f8,_0x39e59b)&&_0x582294[_0x3f0ec9(0x207)](_0x5d682c+'.'+_0x32d1a0);}}function deepClone(_0x521664){const _0x18113b=a65_0x118b09;if(_0x521664===undefined)return _0x521664;return JSON[_0x18113b(0x21e)](JSON[_0x18113b(0x214)](_0x521664));}function deepEqual(_0x4e7275,_0x130ab0){const _0xbf5eba=a65_0x118b09;return JSON[_0xbf5eba(0x214)](_0x4e7275)===JSON['stringify'](_0x130ab0);}function a65_0x3057(_0x5e1be9,_0x29b002){_0x5e1be9=_0x5e1be9-0x1e1;const _0xd2407c=a65_0xd240();let _0x305796=_0xd2407c[_0x5e1be9];return _0x305796;}function isPlainObject(_0x3ac4b2){const _0x178846=a65_0x118b09;return Boolean(_0x3ac4b2)&&typeof _0x3ac4b2==='object'&&!Array[_0x178846(0x1fb)](_0x3ac4b2);}function emptyToUndefined(_0x37a054){const _0x449838=String(_0x37a054||'')['trim']();return _0x449838||undefined;}function trim(_0x1b8696){const _0x48d884=a65_0x118b09;return String(_0x1b8696||'')[_0x48d884(0x20b)]();}