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

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 (279) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/relation-audit.js +1 -1
  142. package/lib/commands/page/restore.js +1 -1
  143. package/lib/commands/page/shared.js +1 -1
  144. package/lib/commands/page/standard-page-status.js +1 -1
  145. package/lib/commands/page/sync.js +1 -1
  146. package/lib/commands/permit/index.js +1 -1
  147. package/lib/commands/permit/page-get.js +1 -1
  148. package/lib/commands/permit/page-set.js +1 -1
  149. package/lib/commands/permit/role-apis-set.js +1 -1
  150. package/lib/commands/permit/role-menus-set.js +1 -1
  151. package/lib/commands/permit/role-menus.js +1 -1
  152. package/lib/commands/permit/shared.js +1 -1
  153. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  154. package/lib/commands/project/create/format-elapsed.js +1 -1
  155. package/lib/commands/project/create/main.js +1 -1
  156. package/lib/commands/project/create/non-interactive.js +1 -1
  157. package/lib/commands/project/create/project-template-path.js +1 -1
  158. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  159. package/lib/commands/project/create/use-format-code.js +1 -1
  160. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  161. package/lib/commands/project/index.js +1 -1
  162. package/lib/commands/project/upgrade.js +1 -1
  163. package/lib/commands/registry.js +1 -1
  164. package/lib/commands/role/create.js +1 -1
  165. package/lib/commands/role/delete.js +1 -1
  166. package/lib/commands/role/detail.js +1 -1
  167. package/lib/commands/role/index.js +1 -1
  168. package/lib/commands/role/list.js +1 -1
  169. package/lib/commands/role/shared.js +1 -1
  170. package/lib/commands/role/update.js +1 -1
  171. package/lib/commands/role/user-add.js +1 -1
  172. package/lib/commands/role/user-remove.js +1 -1
  173. package/lib/commands/role/user-resolve.js +1 -1
  174. package/lib/commands/run/index.js +1 -1
  175. package/lib/commands/schema.js +1 -1
  176. package/lib/commands/sql/create.js +1 -1
  177. package/lib/commands/sql/delete.js +1 -1
  178. package/lib/commands/sql/detail.js +1 -1
  179. package/lib/commands/sql/exec.js +1 -1
  180. package/lib/commands/sql/index.js +1 -1
  181. package/lib/commands/sql/list.js +1 -1
  182. package/lib/commands/sql/pull.js +1 -1
  183. package/lib/commands/sql/push.js +1 -1
  184. package/lib/commands/sql/shared.js +1 -1
  185. package/lib/commands/sql/status.js +1 -1
  186. package/lib/commands/sql/validate.js +1 -1
  187. package/lib/commands/task/index.js +1 -1
  188. package/lib/commands/task/status.js +1 -1
  189. package/lib/commands/tenant/index.js +1 -1
  190. package/lib/commands/tenant/members-list.js +1 -1
  191. package/lib/commands/tenant/shared.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 -1
  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
  274. package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
  275. package/templates/projects/sub-app-react-demo/README.md +1 -1
  276. package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
  277. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
  278. package/lib/commands/project/init.js +0 -1
  279. package/lib/commands/sql/save.js +0 -1
@@ -1 +1 @@
1
- const a50_0xcacb52=a50_0x3d2a;(function(_0x5eda33,_0x253448){const _0x237efa=a50_0x3d2a,_0x182c05=_0x5eda33();while(!![]){try{const _0x1b7e4e=-parseInt(_0x237efa(0x184))/0x1+-parseInt(_0x237efa(0x17c))/0x2+parseInt(_0x237efa(0x17b))/0x3*(parseInt(_0x237efa(0x181))/0x4)+parseInt(_0x237efa(0x17d))/0x5+parseInt(_0x237efa(0x17e))/0x6*(-parseInt(_0x237efa(0x177))/0x7)+-parseInt(_0x237efa(0x176))/0x8+parseInt(_0x237efa(0x175))/0x9;if(_0x1b7e4e===_0x253448)break;else _0x182c05['push'](_0x182c05['shift']());}catch(_0x1aac1e){_0x182c05['push'](_0x182c05['shift']());}}}(a50_0x54bc,0x767d9));function a50_0x54bc(){const _0x592a4b=['read','967185eHIGlm','appcode','Missing\x20key.','string','Get\x20a\x20config\x20value\x20by\x20key','config','str','app','15384348tUQDgV','739224JqvixY','460453AaMPIE','key','validation','object','846GKhtrN','883724OVQqEm','2188735gSYrxv','36iIkkoj','Usage:\x20','\x20config\x20get\x20--key\x20<key>','3324DWqhry','get'];a50_0x54bc=function(){return _0x592a4b;};return a50_0x54bc();}function a50_0x3d2a(_0x425991,_0x52ddfa){_0x425991=_0x425991-0x16e;const _0x54bc55=a50_0x54bc();let _0x3d2a86=_0x54bc55[_0x425991];return _0x3d2a86;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x58caee){const _0x188688=a50_0x3d2a,_0x51c230=_0x58caee[_0x188688(0x173)](_0x188688(0x178));if(!_0x51c230)throw CliErrors[_0x188688(0x179)](_0x188688(0x16f),_0x188688(0x17f)+CLI_BIN_NAME+_0x188688(0x180));const _0x375063=readConfig(),_0x34b58c=_0x51c230===_0x188688(0x174)?_0x188688(0x16e):_0x51c230,_0x2c4f1c=_0x375063[_0x34b58c];if(_0x2c4f1c===undefined)throw CliErrors[_0x188688(0x179)]('Key\x20not\x20found:\x20'+_0x51c230);return{'ok':!![],'data':typeof _0x2c4f1c==='object'?_0x2c4f1c:{[_0x34b58c]:_0x2c4f1c},'message':typeof _0x2c4f1c===_0x188688(0x17a)?undefined:String(_0x2c4f1c)};}export const configGetDefinition={'service':a50_0xcacb52(0x172),'command':a50_0xcacb52(0x182),'description':a50_0xcacb52(0x171),'risk':a50_0xcacb52(0x183),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0xcacb52(0x178),'type':a50_0xcacb52(0x170),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ function a50_0x1087(_0xcfd28a,_0x51da95){_0xcfd28a=_0xcfd28a-0x11b;const _0x5c7292=a50_0x5c72();let _0x1087b2=_0x5c7292[_0xcfd28a];return _0x1087b2;}const a50_0x3cf459=a50_0x1087;(function(_0xebe486,_0x28a03d){const _0x722f28=a50_0x1087,_0x18fce9=_0xebe486();while(!![]){try{const _0x970dd9=parseInt(_0x722f28(0x121))/0x1*(-parseInt(_0x722f28(0x11d))/0x2)+parseInt(_0x722f28(0x11f))/0x3*(parseInt(_0x722f28(0x12c))/0x4)+parseInt(_0x722f28(0x12a))/0x5*(-parseInt(_0x722f28(0x130))/0x6)+-parseInt(_0x722f28(0x133))/0x7+parseInt(_0x722f28(0x125))/0x8*(parseInt(_0x722f28(0x126))/0x9)+-parseInt(_0x722f28(0x11e))/0xa*(parseInt(_0x722f28(0x131))/0xb)+parseInt(_0x722f28(0x123))/0xc;if(_0x970dd9===_0x28a03d)break;else _0x18fce9['push'](_0x18fce9['shift']());}catch(_0x1b740c){_0x18fce9['push'](_0x18fce9['shift']());}}}(a50_0x5c72,0x566f9));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x5798a7){const _0x1e2ffe=a50_0x1087,_0x5ad1c1=_0x5798a7['str']('key');if(!_0x5ad1c1)throw CliErrors[_0x1e2ffe(0x128)](_0x1e2ffe(0x129),_0x1e2ffe(0x122)+CLI_BIN_NAME+_0x1e2ffe(0x127));const _0x1094df=readConfig(),_0x1024da=_0x5ad1c1===_0x1e2ffe(0x124)?_0x1e2ffe(0x12e):_0x5ad1c1,_0x15715c=_0x1094df[_0x1024da];if(_0x15715c===undefined)throw CliErrors[_0x1e2ffe(0x128)](_0x1e2ffe(0x11c)+_0x5ad1c1);return{'ok':!![],'data':typeof _0x15715c===_0x1e2ffe(0x11b)?_0x15715c:{[_0x1024da]:_0x15715c},'message':typeof _0x15715c===_0x1e2ffe(0x11b)?undefined:String(_0x15715c)};}function a50_0x5c72(){const _0x3608f8=['9oBtWyb','\x20config\x20get\x20--key\x20<key>','validation','Missing\x20key.','48955mGTXll','config','4ssIHWb','get','appcode','string','66QeRbda','11bsuoBc','read','2130786MSPfzQ','object','Key\x20not\x20found:\x20','4114NqeKIq','1442810IHAqoT','1277391NinnGF','Get\x20a\x20config\x20value\x20by\x20key','27bPKMZb','Usage:\x20','1199904LtecFw','app','3521368phUEsZ'];a50_0x5c72=function(){return _0x3608f8;};return a50_0x5c72();}export const configGetDefinition={'service':a50_0x3cf459(0x12b),'command':a50_0x3cf459(0x12d),'description':a50_0x3cf459(0x120),'risk':a50_0x3cf459(0x132),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a50_0x3cf459(0x12f),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x9982d5,_0x11879b){const _0x496662=a51_0x383c,_0x2c6513=_0x9982d5();while(!![]){try{const _0x1c477b=-parseInt(_0x496662(0xa6))/0x1*(parseInt(_0x496662(0xa8))/0x2)+parseInt(_0x496662(0xa0))/0x3+-parseInt(_0x496662(0xa4))/0x4+parseInt(_0x496662(0xa5))/0x5+-parseInt(_0x496662(0xa7))/0x6*(-parseInt(_0x496662(0xa2))/0x7)+parseInt(_0x496662(0xa1))/0x8+-parseInt(_0x496662(0xa3))/0x9;if(_0x1c477b===_0x11879b)break;else _0x2c6513['push'](_0x2c6513['shift']());}catch(_0x542106){_0x2c6513['push'](_0x2c6513['shift']());}}}(a51_0x870e,0xcff06));function a51_0x870e(){const _0x33c922=['769269XVgHMq','12591248PKgnne','854EXpxhp','18002673nyvKrv','2109564tTuDjP','5776440uhftes','71gPhOoy','66726cVfmXI','27126bbSqxe'];a51_0x870e=function(){return _0x33c922;};return a51_0x870e();}function a51_0x383c(_0x340816,_0x61297a){_0x340816=_0x340816-0xa0;const _0x870ed8=a51_0x870e();let _0x383cda=_0x870ed8[_0x340816];return _0x383cda;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ function a51_0x50a5(_0xf10d9a,_0x5a138d){_0xf10d9a=_0xf10d9a-0xad;const _0x11703=a51_0x1170();let _0x50a566=_0x11703[_0xf10d9a];return _0x50a566;}(function(_0x92fb4b,_0x5cdd16){const _0x3fbfbc=a51_0x50a5,_0x4c1ca3=_0x92fb4b();while(!![]){try{const _0x4994ae=-parseInt(_0x3fbfbc(0xb3))/0x1+-parseInt(_0x3fbfbc(0xb0))/0x2+-parseInt(_0x3fbfbc(0xb1))/0x3+parseInt(_0x3fbfbc(0xb4))/0x4*(-parseInt(_0x3fbfbc(0xaf))/0x5)+-parseInt(_0x3fbfbc(0xb6))/0x6*(parseInt(_0x3fbfbc(0xb2))/0x7)+-parseInt(_0x3fbfbc(0xad))/0x8+parseInt(_0x3fbfbc(0xae))/0x9*(parseInt(_0x3fbfbc(0xb5))/0xa);if(_0x4994ae===_0x5cdd16)break;else _0x4c1ca3['push'](_0x4c1ca3['shift']());}catch(_0x1447d0){_0x4c1ca3['push'](_0x4c1ca3['shift']());}}}(a51_0x1170,0x6f8ce));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a51_0x1170(){const _0x10d1fe=['3159008FFfpOZ','7000839GAIEKd','5rsvzqy','297634Uvymoh','2132250GWaXfg','7JqWcuC','898069weMNSk','3551176jyGcok','50ovthhF','2352834MzzezL'];a51_0x1170=function(){return _0x10d1fe;};return a51_0x1170();}
@@ -1 +1 @@
1
- function a52_0x1990(){const _0x35b50b=['20Wefene','12584907UDyiUF','3437444caAqYT','993245AyvMex','config','472449iDroGC','boolean','List\x20all\x20config\x20values','list','1CSYMgg','154626OcVCWx','4XOplfa','60ezfMKY','bool','32552TbbBvJ','global','1015xJNRWf','3940190IdBQcX'];a52_0x1990=function(){return _0x35b50b;};return a52_0x1990();}const a52_0x2ced4b=a52_0x5bff;(function(_0x29acbc,_0x248c6c){const _0x25f2d9=a52_0x5bff,_0x1c4adb=_0x29acbc();while(!![]){try{const _0x38759f=parseInt(_0x25f2d9(0x6a))/0x1*(parseInt(_0x25f2d9(0x75))/0x2)+-parseInt(_0x25f2d9(0x66))/0x3*(parseInt(_0x25f2d9(0x6c))/0x4)+parseInt(_0x25f2d9(0x73))/0x5*(parseInt(_0x25f2d9(0x6b))/0x6)+-parseInt(_0x25f2d9(0x71))/0x7*(-parseInt(_0x25f2d9(0x6f))/0x8)+-parseInt(_0x25f2d9(0x74))/0x9+-parseInt(_0x25f2d9(0x72))/0xa+-parseInt(_0x25f2d9(0x76))/0xb*(-parseInt(_0x25f2d9(0x6d))/0xc);if(_0x38759f===_0x248c6c)break;else _0x1c4adb['push'](_0x1c4adb['shift']());}catch(_0x49857f){_0x1c4adb['push'](_0x1c4adb['shift']());}}}(a52_0x1990,0xdf035));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x50ded2){const _0x103db8=a52_0x5bff,_0xd74886=_0x50ded2[_0x103db8(0x6e)](_0x103db8(0x70))?readScopedConfig(_0x103db8(0x70)):readConfig();return{'ok':!![],'data':_0xd74886};}function a52_0x5bff(_0x324c19,_0x47b38e){_0x324c19=_0x324c19-0x65;const _0x199092=a52_0x1990();let _0x5bffa3=_0x199092[_0x324c19];return _0x5bffa3;}export const configListDefinition={'service':a52_0x2ced4b(0x65),'command':a52_0x2ced4b(0x69),'description':a52_0x2ced4b(0x68),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a52_0x2ced4b(0x67),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a52_0x34a42c=a52_0x419a;(function(_0x208479,_0x1f690f){const _0x6105ab=a52_0x419a,_0x2f2ea8=_0x208479();while(!![]){try{const _0x3f928f=parseInt(_0x6105ab(0xb0))/0x1*(-parseInt(_0x6105ab(0xae))/0x2)+-parseInt(_0x6105ab(0xa2))/0x3+-parseInt(_0x6105ab(0xa8))/0x4*(parseInt(_0x6105ab(0xb1))/0x5)+-parseInt(_0x6105ab(0xaa))/0x6*(-parseInt(_0x6105ab(0xad))/0x7)+-parseInt(_0x6105ab(0xaf))/0x8+parseInt(_0x6105ab(0xa7))/0x9*(-parseInt(_0x6105ab(0xa9))/0xa)+-parseInt(_0x6105ab(0xa5))/0xb*(-parseInt(_0x6105ab(0xac))/0xc);if(_0x3f928f===_0x1f690f)break;else _0x2f2ea8['push'](_0x2f2ea8['shift']());}catch(_0x593be9){_0x2f2ea8['push'](_0x2f2ea8['shift']());}}}(a52_0x7253,0x674ae));function a52_0x419a(_0x75dd1b,_0x22af62){_0x75dd1b=_0x75dd1b-0xa1;const _0x725345=a52_0x7253();let _0x419a6c=_0x725345[_0x75dd1b];return _0x419a6c;}function a52_0x7253(){const _0x4efbf5=['1GhlUzG','5855urrezu','read','1807449lmejwD','boolean','global','44GIEQPC','bool','121833GcsMTk','552HAvqHy','420iRLItf','96yuibuS','config','7565052nDNurt','78953poTAGc','1422046bDKOrb','1883232wXLpUX'];a52_0x7253=function(){return _0x4efbf5;};return a52_0x7253();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x398fce){const _0x4bb4b0=a52_0x419a,_0xe425fe=_0x398fce[_0x4bb4b0(0xa6)]('global')?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0xe425fe};}export const configListDefinition={'service':a52_0x34a42c(0xab),'command':'list','description':'List\x20all\x20config\x20values','risk':a52_0x34a42c(0xa1),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x34a42c(0xa4),'type':a52_0x34a42c(0xa3),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a53_0x3ffae3=a53_0x3843;(function(_0x1563cb,_0x510f47){const _0x8d5a81=a53_0x3843,_0x1c18e9=_0x1563cb();while(!![]){try{const _0x553be7=parseInt(_0x8d5a81(0x1b0))/0x1*(-parseInt(_0x8d5a81(0x19f))/0x2)+-parseInt(_0x8d5a81(0x1ba))/0x3*(parseInt(_0x8d5a81(0x1c9))/0x4)+parseInt(_0x8d5a81(0x1cc))/0x5*(parseInt(_0x8d5a81(0x1a3))/0x6)+parseInt(_0x8d5a81(0x1bf))/0x7+-parseInt(_0x8d5a81(0x1bb))/0x8*(-parseInt(_0x8d5a81(0x19e))/0x9)+parseInt(_0x8d5a81(0x1cd))/0xa*(parseInt(_0x8d5a81(0x1c5))/0xb)+-parseInt(_0x8d5a81(0x1c6))/0xc;if(_0x553be7===_0x510f47)break;else _0x1c18e9['push'](_0x1c18e9['shift']());}catch(_0x34f2c6){_0x1c18e9['push'](_0x1c18e9['shift']());}}}(a53_0x34c0,0x69efb));function a53_0x34c0(){const _0x401cdd=['app','\x20appcode\x20set\x20to:\x20','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22.\x20Allowed:\x20','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','220SGCHAb','17185008LyrBTX','env','keys','25472SXvBjV','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Config\x20value','155GWlyOS','193400oQycSP','includes','locale','`,\x20`','Use\x20`','Invalid\x20value\x20for\x20\x22','Global','3533265IJxaKB','206ZBdfxn','config','set','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','82074qxaNTs','Settable\x20top-level\x20keys:\x20','value','Project','string','riskLevel','write','key','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','length','global','validation','apps','1VzIsKJ','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','join','appcode','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','boolean','Set\x20a\x20config\x20value','Missing\x20value.','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','21zlLmrv','16ZhdpCi','\x20set\x20to:\x20','Usage:\x20','Invalid\x20locale\x20value.','2202613MCzMJK'];a53_0x34c0=function(){return _0x401cdd;};return a53_0x34c0();}function a53_0x3843(_0x78efc8,_0x376f42){_0x78efc8=_0x78efc8-0x19a;const _0x34c01f=a53_0x34c0();let _0x3843b2=_0x34c01f[_0x78efc8];return _0x3843b2;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x21e458){const _0x46b5e2=a53_0x3843,_0x23b89b=_0x21e458['str'](_0x46b5e2(0x1aa)),_0x309974=_0x21e458['str'](_0x46b5e2(0x1a5));if(!_0x23b89b)throw CliErrors[_0x46b5e2(0x1ae)]('Missing\x20key.',_0x46b5e2(0x1bd)+CLI_BIN_NAME+_0x46b5e2(0x1b4));if(_0x309974===undefined||_0x309974==='')throw CliErrors['validation'](_0x46b5e2(0x1b7),_0x46b5e2(0x1bd)+CLI_BIN_NAME+_0x46b5e2(0x1b4));if(_0x309974[_0x46b5e2(0x1ac)]>0x1f4)throw CliErrors['validation'](_0x46b5e2(0x1c2));if(!isTopLevelConfigKey(_0x23b89b))throw CliErrors[_0x46b5e2(0x1ae)]('Top-level\x20key\x20\x22'+_0x23b89b+'\x22\x20is\x20not\x20settable.',_0x46b5e2(0x1a4)+getTopLevelConfigKeySummary());if(_0x23b89b===_0x46b5e2(0x1a8))throw CliErrors['validation'](_0x46b5e2(0x1a2));if(CONFIG_ENUM_VALUES[_0x23b89b]&&!CONFIG_ENUM_VALUES[_0x23b89b][_0x46b5e2(0x1ce)](_0x309974))throw CliErrors[_0x46b5e2(0x1ae)](_0x46b5e2(0x19c)+_0x23b89b+_0x46b5e2(0x1c3)+CONFIG_ENUM_VALUES[_0x23b89b][_0x46b5e2(0x1b2)](',\x20'));if(_0x23b89b===_0x46b5e2(0x1cf)&&!normalizeLocale(_0x309974))throw CliErrors[_0x46b5e2(0x1ae)](_0x46b5e2(0x1be),_0x46b5e2(0x1b1));const _0x1fca8f={'global':_0x21e458['bool'](_0x46b5e2(0x1ad))},_0x5f3fb1=resolveWriteScope(_0x1fca8f),_0x211721=readScopedConfig(_0x5f3fb1);let _0x21a0d3=_0x23b89b,_0x4b54bf=_0x309974;_0x23b89b===_0x46b5e2(0x1c0)&&(_0x21a0d3=_0x46b5e2(0x1b3),delete _0x211721['app']);_0x23b89b===_0x46b5e2(0x1cf)&&(_0x4b54bf=normalizeLocale(_0x309974));if(_0x23b89b===_0x46b5e2(0x1c7)){_0x4b54bf=normalizeEnv(_0x309974);if(!isProduction(_0x4b54bf)&&!isDaily(_0x4b54bf))throw CliErrors[_0x46b5e2(0x1ae)](_0x46b5e2(0x1c4),_0x46b5e2(0x1ca));}if(_0x23b89b===_0x46b5e2(0x1b3)){const _0x13e995=_0x211721[_0x46b5e2(0x1af)]&&typeof _0x211721[_0x46b5e2(0x1af)]==='object'?Object[_0x46b5e2(0x1c8)](_0x211721[_0x46b5e2(0x1af)]):[];if(_0x13e995[_0x46b5e2(0x1ac)]>0x0)throw CliErrors['validation'](_0x46b5e2(0x1ab),_0x46b5e2(0x19b)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x4b54bf+_0x46b5e2(0x19a)+CLI_BIN_NAME+_0x46b5e2(0x1b9));const _0x358c4d=buildCanonicalProjectConfig({..._0x211721},{'appCodes':[_0x4b54bf],'env':typeof _0x211721[_0x46b5e2(0x1c7)]===_0x46b5e2(0x1a7)?_0x211721['env']:undefined});writeScopedConfig(_0x358c4d,_0x5f3fb1);const _0x172b35=_0x5f3fb1===_0x46b5e2(0x1ad)?_0x46b5e2(0x19d):'Project';return{'ok':!![],'message':'✓\x20'+_0x172b35+_0x46b5e2(0x1c1)+_0x4b54bf+_0x46b5e2(0x1b8)};}_0x211721[_0x21a0d3]=_0x4b54bf,writeScopedConfig(_0x211721,_0x5f3fb1);const _0x268d09=_0x5f3fb1===_0x46b5e2(0x1ad)?'Global':_0x46b5e2(0x1a6);return{'ok':!![],'message':'✓\x20'+_0x268d09+'\x20'+_0x21a0d3+_0x46b5e2(0x1bc)+_0x4b54bf};}export const configSetDefinition={'service':a53_0x3ffae3(0x1a0),'command':a53_0x3ffae3(0x1a1),'description':a53_0x3ffae3(0x1b6),'risk':a53_0x3ffae3(0x1a9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x3ffae3(0x1aa),'type':a53_0x3ffae3(0x1a7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x3ffae3(0x1a5),'type':'string','description':a53_0x3ffae3(0x1cb),'required':!![]},{'name':a53_0x3ffae3(0x1ad),'type':a53_0x3ffae3(0x1b5),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a53_0x1aef51=a53_0x135b;(function(_0x58b6c4,_0x25593f){const _0x3955fa=a53_0x135b,_0x25026f=_0x58b6c4();while(!![]){try{const _0x2a7646=parseInt(_0x3955fa(0xf4))/0x1*(-parseInt(_0x3955fa(0x117))/0x2)+-parseInt(_0x3955fa(0x111))/0x3+-parseInt(_0x3955fa(0xff))/0x4+-parseInt(_0x3955fa(0xf1))/0x5*(-parseInt(_0x3955fa(0x10a))/0x6)+parseInt(_0x3955fa(0xef))/0x7+-parseInt(_0x3955fa(0x10b))/0x8+parseInt(_0x3955fa(0x116))/0x9*(parseInt(_0x3955fa(0x110))/0xa);if(_0x2a7646===_0x25593f)break;else _0x25026f['push'](_0x25026f['shift']());}catch(_0x3348b9){_0x25026f['push'](_0x25026f['shift']());}}}(a53_0x181a,0x3d184));function a53_0x135b(_0xa6904c,_0x14bb67){_0xa6904c=_0xa6904c-0xe9;const _0x181a92=a53_0x181a();let _0x135bd0=_0x181a92[_0xa6904c];return _0x135bd0;}function a53_0x181a(){const _0x4bedd6=['Set\x20a\x20config\x20value','140HpxYDL','864309nIwVfv','Settable\x20top-level\x20keys:\x20','Global','riskLevel','`,\x20`','512496lFJptT','2uVuTSP','\x22.\x20Allowed:\x20','Invalid\x20locale\x20value.','\x20set\x20to:\x20','\x20workspace\x20add\x20<name>\x20--appcode\x20','keys','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','app','env','1989505PtahJO','appcode','3065PwCQyV','join','Missing\x20key.','155327wpfNZu','Missing\x20value.','config','apps','validation','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','value','Config\x20value','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Usage:\x20','685088UZFIFf','Invalid\x20value\x20for\x20\x22','\x22\x20is\x20not\x20settable.','Use\x20`','string','length','set','\x20appcode\x20set\x20to:\x20','global','object','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','1650JwNynQ','3080480gBqhgw','locale','write','str'];a53_0x181a=function(){return _0x4bedd6;};return a53_0x181a();}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x72e8ff){const _0x58aa1f=a53_0x135b,_0x4fa168=_0x72e8ff[_0x58aa1f(0x10e)]('key'),_0x2a4712=_0x72e8ff[_0x58aa1f(0x10e)](_0x58aa1f(0xfb));if(!_0x4fa168)throw CliErrors[_0x58aa1f(0xf8)](_0x58aa1f(0xf3),_0x58aa1f(0xfe)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x2a4712===undefined||_0x2a4712==='')throw CliErrors[_0x58aa1f(0xf8)](_0x58aa1f(0xf5),_0x58aa1f(0xfe)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x2a4712['length']>0x1f4)throw CliErrors[_0x58aa1f(0xf8)](_0x58aa1f(0x109));if(!isTopLevelConfigKey(_0x4fa168))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x4fa168+_0x58aa1f(0x101),_0x58aa1f(0x112)+getTopLevelConfigKeySummary());if(_0x4fa168===_0x58aa1f(0x114))throw CliErrors[_0x58aa1f(0xf8)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x4fa168]&&!CONFIG_ENUM_VALUES[_0x4fa168]['includes'](_0x2a4712))throw CliErrors['validation'](_0x58aa1f(0x100)+_0x4fa168+_0x58aa1f(0x118)+CONFIG_ENUM_VALUES[_0x4fa168][_0x58aa1f(0xf2)](',\x20'));if(_0x4fa168===_0x58aa1f(0x10c)&&!normalizeLocale(_0x2a4712))throw CliErrors[_0x58aa1f(0xf8)](_0x58aa1f(0x119),_0x58aa1f(0xfa));const _0x39fec3={'global':_0x72e8ff['bool'](_0x58aa1f(0x107))},_0x440386=resolveWriteScope(_0x39fec3),_0x94fcaa=readScopedConfig(_0x440386);let _0x2573a2=_0x4fa168,_0x11fd43=_0x2a4712;_0x4fa168==='app'&&(_0x2573a2='appcode',delete _0x94fcaa[_0x58aa1f(0xed)]);_0x4fa168==='locale'&&(_0x11fd43=normalizeLocale(_0x2a4712));if(_0x4fa168===_0x58aa1f(0xee)){_0x11fd43=normalizeEnv(_0x2a4712);if(!isProduction(_0x11fd43)&&!isDaily(_0x11fd43))throw CliErrors[_0x58aa1f(0xf8)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x58aa1f(0xfd));}if(_0x4fa168===_0x58aa1f(0xf0)){const _0x4ad8c0=_0x94fcaa[_0x58aa1f(0xf7)]&&typeof _0x94fcaa[_0x58aa1f(0xf7)]===_0x58aa1f(0x108)?Object[_0x58aa1f(0xeb)](_0x94fcaa[_0x58aa1f(0xf7)]):[];if(_0x4ad8c0[_0x58aa1f(0x104)]>0x0)throw CliErrors[_0x58aa1f(0xf8)](_0x58aa1f(0xf9),_0x58aa1f(0x102)+CLI_BIN_NAME+_0x58aa1f(0xea)+_0x11fd43+_0x58aa1f(0x115)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x4ec935=buildCanonicalProjectConfig({..._0x94fcaa},{'appCodes':[_0x11fd43],'env':typeof _0x94fcaa['env']===_0x58aa1f(0x103)?_0x94fcaa[_0x58aa1f(0xee)]:undefined});writeScopedConfig(_0x4ec935,_0x440386);const _0x3538a3=_0x440386===_0x58aa1f(0x107)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x3538a3+_0x58aa1f(0x106)+_0x11fd43+_0x58aa1f(0xec)};}_0x94fcaa[_0x2573a2]=_0x11fd43,writeScopedConfig(_0x94fcaa,_0x440386);const _0x2a2cce=_0x440386===_0x58aa1f(0x107)?_0x58aa1f(0x113):'Project';return{'ok':!![],'message':'✓\x20'+_0x2a2cce+'\x20'+_0x2573a2+_0x58aa1f(0xe9)+_0x11fd43};}export const configSetDefinition={'service':a53_0x1aef51(0xf6),'command':a53_0x1aef51(0x105),'description':a53_0x1aef51(0x10f),'risk':a53_0x1aef51(0x10d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a53_0x1aef51(0x103),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x1aef51(0xfb),'type':a53_0x1aef51(0x103),'description':a53_0x1aef51(0xfc),'required':!![]},{'name':a53_0x1aef51(0x107),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0xcf5a75,_0x585f98){var _0x55ee07=a54_0x4967,_0x424f93=_0xcf5a75();while(!![]){try{var _0x2331ac=-parseInt(_0x55ee07(0x132))/0x1*(-parseInt(_0x55ee07(0x12e))/0x2)+-parseInt(_0x55ee07(0x136))/0x3+parseInt(_0x55ee07(0x12c))/0x4*(parseInt(_0x55ee07(0x137))/0x5)+-parseInt(_0x55ee07(0x12d))/0x6+-parseInt(_0x55ee07(0x130))/0x7+-parseInt(_0x55ee07(0x135))/0x8+parseInt(_0x55ee07(0x131))/0x9*(parseInt(_0x55ee07(0x138))/0xa);if(_0x2331ac===_0x585f98)break;else _0x424f93['push'](_0x424f93['shift']());}catch(_0x482d26){_0x424f93['push'](_0x424f93['shift']());}}}(a54_0x1e68,0x91fdc));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a54_0x1e68(){var _0x2cdee4=['2174160dvqdVJ','938607jgPFhM','1405HJLmMN','5942170uHthSx','10604lzqXum','1656480xqWTOK','69338MRLZnr','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','4050711dwkWmo','18hsuvPm','3NoQPVl','global','project'];a54_0x1e68=function(){return _0x2cdee4;};return a54_0x1e68();}export{CLI_BIN_NAME};function a54_0x4967(_0x55901b,_0x4001fd){_0x55901b=_0x55901b-0x12c;var _0x1e680d=a54_0x1e68();var _0x4967b0=_0x1e680d[_0x55901b];return _0x4967b0;}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x56c4e3){var _0x507ca6=a54_0x4967;if(_0x56c4e3[_0x507ca6(0x133)])return _0x507ca6(0x133);if(!isInProject())throw CliErrors['validation'](_0x507ca6(0x12f),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return _0x507ca6(0x134);}export function readScopedConfig(_0x2431f0){return readConfigFile(resolveWriteConfigPath(_0x2431f0));}export function writeScopedConfig(_0x9af5ce,_0x45a558){writeConfigFile(resolveWriteConfigPath(_0x45a558),_0x9af5ce);}
1
+ (function(_0xe6c0c6,_0x52ad5e){var _0x47ab7f=a54_0x93da,_0x3e47d4=_0xe6c0c6();while(!![]){try{var _0x49e81c=parseInt(_0x47ab7f(0x165))/0x1*(parseInt(_0x47ab7f(0x16b))/0x2)+parseInt(_0x47ab7f(0x170))/0x3+-parseInt(_0x47ab7f(0x167))/0x4*(-parseInt(_0x47ab7f(0x171))/0x5)+parseInt(_0x47ab7f(0x172))/0x6+parseInt(_0x47ab7f(0x16e))/0x7*(-parseInt(_0x47ab7f(0x16d))/0x8)+parseInt(_0x47ab7f(0x169))/0x9+-parseInt(_0x47ab7f(0x16c))/0xa;if(_0x49e81c===_0x52ad5e)break;else _0x3e47d4['push'](_0x3e47d4['shift']());}catch(_0x768e1c){_0x3e47d4['push'](_0x3e47d4['shift']());}}}(a54_0x4d9d,0xd3a77));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x204b9f){var _0x12a0fa=a54_0x93da;if(_0x204b9f[_0x12a0fa(0x16a)])return _0x12a0fa(0x16a);if(!isInProject())throw CliErrors[_0x12a0fa(0x166)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x12a0fa(0x168));return _0x12a0fa(0x16f);}export function readScopedConfig(_0x53b165){return readConfigFile(resolveWriteConfigPath(_0x53b165));}function a54_0x93da(_0x3d4c39,_0x7cf289){_0x3d4c39=_0x3d4c39-0x165;var _0x4d9dee=a54_0x4d9d();var _0x93dae6=_0x4d9dee[_0x3d4c39];return _0x93dae6;}export function writeScopedConfig(_0x169462,_0x18b30d){writeConfigFile(resolveWriteConfigPath(_0x18b30d),_0x169462);}function a54_0x4d9d(){var _0x28a79d=['project','829110nijfCO','895DjSDTR','2845068vfMTIq','3QyhjPC','validation','4488sFytHc','\x20init`\x20first.','4219362xvZxcg','global','436092zgxWhz','1978050eNTTjE','81584DmARUQ','693XdYdiW'];a54_0x4d9d=function(){return _0x28a79d;};return a54_0x4d9d();}
@@ -1 +1 @@
1
- const a55_0x4cb517=a55_0x3afa;(function(_0x139bfa,_0x3036f1){const _0x5318aa=a55_0x3afa,_0x449361=_0x139bfa();while(!![]){try{const _0x4d7a2b=parseInt(_0x5318aa(0x1c1))/0x1*(parseInt(_0x5318aa(0x1cb))/0x2)+-parseInt(_0x5318aa(0x1c3))/0x3+-parseInt(_0x5318aa(0x1ca))/0x4+parseInt(_0x5318aa(0x1c0))/0x5*(-parseInt(_0x5318aa(0x1be))/0x6)+parseInt(_0x5318aa(0x1c2))/0x7+parseInt(_0x5318aa(0x1bc))/0x8*(parseInt(_0x5318aa(0x1c9))/0x9)+-parseInt(_0x5318aa(0x1cd))/0xa*(-parseInt(_0x5318aa(0x1c6))/0xb);if(_0x4d7a2b===_0x3036f1)break;else _0x449361['push'](_0x449361['shift']());}catch(_0x1e35b8){_0x449361['push'](_0x449361['shift']());}}}(a55_0x417e,0xb5c91));import{buildDataCommand}from'../../commands/data/shared.js';function a55_0x417e(){const _0x2e0438=['\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','40024UBihtz','Filter\x20dataset\x20records\x20with\x20query\x20conditions','6YVTXJH','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','1069265LhuDJC','14rgiBjh','4952136MiVtRt','2601840jXWggf','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','filter','583IXAlmR','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','405rpminS','2404336hFAUVX','190830vSHtwX','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','29890kPsnsQ'];a55_0x417e=function(){return _0x2e0438;};return a55_0x417e();}function a55_0x3afa(_0x49dfb4,_0x27739d){_0x49dfb4=_0x49dfb4-0x1bb;const _0x417ef4=a55_0x417e();let _0x3afa91=_0x417ef4[_0x49dfb4];return _0x3afa91;}export const dataFilter=buildDataCommand({'command':a55_0x4cb517(0x1c5),'operation':'filter','description':a55_0x4cb517(0x1bd),'paramsRequired':![],'paramsHint':a55_0x4cb517(0x1cc),'helpExtra':[a55_0x4cb517(0x1c8),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a55_0x4cb517(0x1bf),a55_0x4cb517(0x1c4),a55_0x4cb517(0x1bb),a55_0x4cb517(0x1c7)]['join']('\x0a')});
1
+ const a55_0x3454ba=a55_0x5c82;(function(_0x3b4ae2,_0x19ec9d){const _0x4ccb7b=a55_0x5c82,_0x3dc59a=_0x3b4ae2();while(!![]){try{const _0x5daf44=parseInt(_0x4ccb7b(0x130))/0x1*(-parseInt(_0x4ccb7b(0x13c))/0x2)+-parseInt(_0x4ccb7b(0x137))/0x3+-parseInt(_0x4ccb7b(0x139))/0x4+parseInt(_0x4ccb7b(0x136))/0x5*(parseInt(_0x4ccb7b(0x138))/0x6)+-parseInt(_0x4ccb7b(0x13a))/0x7+parseInt(_0x4ccb7b(0x135))/0x8*(parseInt(_0x4ccb7b(0x134))/0x9)+parseInt(_0x4ccb7b(0x13f))/0xa*(parseInt(_0x4ccb7b(0x133))/0xb);if(_0x5daf44===_0x19ec9d)break;else _0x3dc59a['push'](_0x3dc59a['shift']());}catch(_0x9c6f4f){_0x3dc59a['push'](_0x3dc59a['shift']());}}}(a55_0x1884,0x4e90d));function a55_0x5c82(_0x5ba2e1,_0x26744b){_0x5ba2e1=_0x5ba2e1-0x130;const _0x188452=a55_0x1884();let _0x5c828a=_0x188452[_0x5ba2e1];return _0x5c828a;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a55_0x3454ba(0x142),'operation':a55_0x3454ba(0x142),'description':a55_0x3454ba(0x131),'paramsRequired':![],'paramsHint':a55_0x3454ba(0x13d),'helpExtra':[a55_0x3454ba(0x13b),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a55_0x3454ba(0x13e),a55_0x3454ba(0x140),a55_0x3454ba(0x141),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a55_0x3454ba(0x132)]('\x0a')});function a55_0x1884(){const _0x1f85b8=['55979OPZtVL','90oVpSDH','263248FlVycc','996640zivgyo','1575969cbhAxw','18BWtLiN','911084whFUZV','39683kRdlxc','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','7042BiuqTY','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','530fWnsMQ','\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\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','filter','33IsRDFm','Filter\x20dataset\x20records\x20with\x20query\x20conditions','join'];a55_0x1884=function(){return _0x1f85b8;};return a55_0x1884();}
@@ -1 +1 @@
1
- const a56_0x439062=a56_0x2f77;function a56_0x2f77(_0x228060,_0x37dc23){_0x228060=_0x228060-0x182;const _0x19f948=a56_0x19f9();let _0x2f7726=_0x19f948[_0x228060];return _0x2f7726;}function a56_0x19f9(){const _0x2288b1=['1517236RgwIVi','25008DFpUhU','Get\x20a\x20single\x20record\x20by\x20ID','102MEcXBb','getOne','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','142490pbMCIF','281544lypIXk','6GQmOSi','1049144JUqMOV','494469aMDKii','63WkgdpP','1365010QBJzoc'];a56_0x19f9=function(){return _0x2288b1;};return a56_0x19f9();}(function(_0x27f91d,_0x247875){const _0x193521=a56_0x2f77,_0x3f53dd=_0x27f91d();while(!![]){try{const _0x41eda4=-parseInt(_0x193521(0x189))/0x1+-parseInt(_0x193521(0x183))/0x2*(-parseInt(_0x193521(0x185))/0x3)+-parseInt(_0x193521(0x182))/0x4+parseInt(_0x193521(0x18e))/0x5*(parseInt(_0x193521(0x18b))/0x6)+parseInt(_0x193521(0x188))/0x7+parseInt(_0x193521(0x184))/0x8+parseInt(_0x193521(0x186))/0x9*(-parseInt(_0x193521(0x187))/0xa);if(_0x41eda4===_0x247875)break;else _0x3f53dd['push'](_0x3f53dd['shift']());}catch(_0x256dbb){_0x3f53dd['push'](_0x3f53dd['shift']());}}}(a56_0x19f9,0x435d5));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x439062(0x18c),'operation':a56_0x439062(0x18c),'description':a56_0x439062(0x18a),'paramsRequired':!![],'paramsHint':a56_0x439062(0x18d)});
1
+ const a56_0x4f4aef=a56_0x2388;function a56_0x2388(_0x1824f3,_0x494363){_0x1824f3=_0x1824f3-0x1d6;const _0x2f39e3=a56_0x2f39();let _0x2388ba=_0x2f39e3[_0x1824f3];return _0x2388ba;}function a56_0x2f39(){const _0x48e4b6=['21794GuFhyN','13468191FXSrbL','getOne','78klVzJO','3897305slKvfd','2351895zyXgIx','681000HLiIKR','609UbOVgD','Get\x20a\x20single\x20record\x20by\x20ID','10MqULgQ','6rfyTwj','24651CjTucr','19056dKhPqh'];a56_0x2f39=function(){return _0x48e4b6;};return a56_0x2f39();}(function(_0x471f61,_0x8e1ce0){const _0x3f616d=a56_0x2388,_0x5f243c=_0x471f61();while(!![]){try{const _0x4ff5fc=parseInt(_0x3f616d(0x1dc))/0x1*(-parseInt(_0x3f616d(0x1df))/0x2)+-parseInt(_0x3f616d(0x1d6))/0x3*(parseInt(_0x3f616d(0x1db))/0x4)+parseInt(_0x3f616d(0x1e0))/0x5*(parseInt(_0x3f616d(0x1d9))/0x6)+parseInt(_0x3f616d(0x1e1))/0x7+parseInt(_0x3f616d(0x1e2))/0x8+-parseInt(_0x3f616d(0x1da))/0x9+-parseInt(_0x3f616d(0x1d8))/0xa*(-parseInt(_0x3f616d(0x1dd))/0xb);if(_0x4ff5fc===_0x8e1ce0)break;else _0x5f243c['push'](_0x5f243c['shift']());}catch(_0x6d91fa){_0x5f243c['push'](_0x5f243c['shift']());}}}(a56_0x2f39,0x93be3));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x4f4aef(0x1de),'operation':a56_0x4f4aef(0x1de),'description':a56_0x4f4aef(0x1d7),'paramsRequired':!![],'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'});
@@ -1 +1 @@
1
- (function(_0x47ac8e,_0x4e9b1e){const _0x41ec69=a57_0x4e22,_0x2a29d1=_0x47ac8e();while(!![]){try{const _0x3529ad=-parseInt(_0x41ec69(0x142))/0x1+-parseInt(_0x41ec69(0x13b))/0x2+parseInt(_0x41ec69(0x141))/0x3+parseInt(_0x41ec69(0x13c))/0x4*(parseInt(_0x41ec69(0x13f))/0x5)+-parseInt(_0x41ec69(0x140))/0x6+-parseInt(_0x41ec69(0x13a))/0x7*(parseInt(_0x41ec69(0x13e))/0x8)+parseInt(_0x41ec69(0x13d))/0x9;if(_0x3529ad===_0x4e9b1e)break;else _0x2a29d1['push'](_0x2a29d1['shift']());}catch(_0xe7ca0f){_0x2a29d1['push'](_0x2a29d1['shift']());}}}(a57_0x5a45,0xcacfa));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a57_0x5a45(){const _0x408710=['126mNraye','267088FFBWjf','4487768nKJpRY','23979438vDQUTH','718224MFZgKH','5kDAsqt','9587760DYnjjK','4870578DxBRmF','1231628NxIijG'];a57_0x5a45=function(){return _0x408710;};return a57_0x5a45();}function a57_0x4e22(_0x40b498,_0x47b570){_0x40b498=_0x40b498-0x13a;const _0x5a4587=a57_0x5a45();let _0x4e2255=_0x5a4587[_0x40b498];return _0x4e2255;}export const dataDefinitions=[dataFilter,dataGetOne];
1
+ (function(_0x48b54b,_0x3cdd8e){const _0x46f574=a57_0x1b74,_0x5f1694=_0x48b54b();while(!![]){try{const _0x46c4e5=-parseInt(_0x46f574(0x98))/0x1+-parseInt(_0x46f574(0x97))/0x2*(-parseInt(_0x46f574(0xa0))/0x3)+parseInt(_0x46f574(0x9e))/0x4*(-parseInt(_0x46f574(0x99))/0x5)+-parseInt(_0x46f574(0x9d))/0x6*(parseInt(_0x46f574(0x9f))/0x7)+-parseInt(_0x46f574(0x9b))/0x8+parseInt(_0x46f574(0x9a))/0x9+parseInt(_0x46f574(0x9c))/0xa;if(_0x46c4e5===_0x3cdd8e)break;else _0x5f1694['push'](_0x5f1694['shift']());}catch(_0x141ed3){_0x5f1694['push'](_0x5f1694['shift']());}}}(a57_0x1aa9,0xdb841));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a57_0x1b74(_0x59f22d,_0x45b68a){_0x59f22d=_0x59f22d-0x97;const _0x1aa994=a57_0x1aa9();let _0x1b749c=_0x1aa994[_0x59f22d];return _0x1b749c;}function a57_0x1aa9(){const _0x5a6622=['168052ONugWE','1228986lqACpE','8466390vGYIkt','10603683NPPrCM','10422784tWhlBW','46893790gvsfaL','1602SLfHKD','4LnmHAD','41517jDDDOP','30bfSSaO'];a57_0x1aa9=function(){return _0x5a6622;};return a57_0x1aa9();}export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x248574,_0x2962f4){const _0x324944=a58_0x5dc9,_0x27084c=_0x248574();while(!![]){try{const _0x46c0f7=parseInt(_0x324944(0x197))/0x1+-parseInt(_0x324944(0x193))/0x2*(-parseInt(_0x324944(0x18b))/0x3)+parseInt(_0x324944(0x17d))/0x4*(parseInt(_0x324944(0x194))/0x5)+-parseInt(_0x324944(0x17a))/0x6*(-parseInt(_0x324944(0x184))/0x7)+-parseInt(_0x324944(0x17b))/0x8+-parseInt(_0x324944(0x18e))/0x9*(parseInt(_0x324944(0x195))/0xa)+-parseInt(_0x324944(0x190))/0xb*(-parseInt(_0x324944(0x18d))/0xc);if(_0x46c0f7===_0x2962f4)break;else _0x27084c['push'](_0x27084c['shift']());}catch(_0x7cc4d1){_0x27084c['push'](_0x27084c['shift']());}}}(a58_0x1760,0xd2111));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x2e5be1){const _0x55e001=a58_0x5dc9;if(!_0x2e5be1)throw CliErrors[_0x55e001(0x185)]('params',_0x55e001(0x17e));const _0x34a620=_0x2e5be1['id'];if(_0x34a620===undefined||_0x34a620===null||_0x34a620==='')throw CliErrors[_0x55e001(0x183)](_0x55e001(0x181),_0x55e001(0x17c));}function parseCommandParams(_0x306726){return parseJsonParams(_0x306726)??{};}function a58_0x5dc9(_0x3591f3,_0x3e5741){_0x3591f3=_0x3591f3-0x17a;const _0x176046=a58_0x1760();let _0x5dc9e1=_0x176046[_0x3591f3];return _0x5dc9e1;}function a58_0x1760(){const _0x2ff402=['str','2680389gnfKbD','alias','3387732oLzkol','6959403UoLdad','getOne','11mxcVxA','\x20completed\x20in\x20','command','2ADaiCU','5xegtrC','20PrOWUa','data\x20','700929qCvQGh','paramsHint','params','7777914WmYYGD','10652576SIKDoi','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','2262068hWoJWF','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','data','description','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','appCode','validation','7osAPhs','flagMissing','operation','read','compress','helpExtra'];a58_0x1760=function(){return _0x2ff402;};return a58_0x1760();}export function buildDataCommand(_0x42f8c1){const _0x52bc99=a58_0x5dc9,_0x199468='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x52bc99(0x17f),'command':_0x42f8c1['command'],'description':_0x42f8c1[_0x52bc99(0x180)],'risk':_0x52bc99(0x187),'defaultOutputFormat':_0x52bc99(0x188),'helpExtra':_0x42f8c1[_0x52bc99(0x189)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x52bc99(0x18c),'type':'string','description':_0x199468},{'name':_0x52bc99(0x199),'type':'string','description':_0x42f8c1[_0x52bc99(0x198)]}],async 'validate'(_0x247769){const _0x47a6bb=_0x52bc99,_0x423bd7=_0x247769[_0x47a6bb(0x18a)](_0x47a6bb(0x199));if(_0x42f8c1['paramsRequired']&&!_0x423bd7)throw CliErrors[_0x47a6bb(0x185)](_0x47a6bb(0x199),_0x42f8c1[_0x47a6bb(0x198)]);const _0x1e44fe=parseJsonParams(_0x423bd7);_0x42f8c1[_0x47a6bb(0x186)]===_0x47a6bb(0x18f)&&assertGetOneId(_0x1e44fe);},async 'execute'(_0x4924ee){const _0xe2ac88=_0x52bc99,_0x40b2ad=parseCommandParams(_0x4924ee[_0xe2ac88(0x18a)](_0xe2ac88(0x199))),_0xa3a2e7=Date['now'](),_0x2e9bf1=await executeDatasetDataOperation(_0x4924ee[_0xe2ac88(0x182)],_0x4924ee['str']('code'),_0x42f8c1[_0xe2ac88(0x186)],_0x40b2ad),_0x594ecb=Date['now']()-_0xa3a2e7;return{'ok':!![],'data':{'result':_0x2e9bf1,'elapsed':_0x594ecb},'message':_0xe2ac88(0x196)+_0x42f8c1[_0xe2ac88(0x192)]+_0xe2ac88(0x191)+_0x594ecb+'ms'};}};}
1
+ (function(_0x5dd85f,_0x207523){const _0x514d97=a58_0x39c1,_0x545c12=_0x5dd85f();while(!![]){try{const _0x1be0ff=parseInt(_0x514d97(0x1a5))/0x1*(parseInt(_0x514d97(0x19e))/0x2)+-parseInt(_0x514d97(0x1b4))/0x3+-parseInt(_0x514d97(0x1b0))/0x4*(parseInt(_0x514d97(0x1a1))/0x5)+parseInt(_0x514d97(0x1aa))/0x6+-parseInt(_0x514d97(0x1b7))/0x7*(-parseInt(_0x514d97(0x1b5))/0x8)+parseInt(_0x514d97(0x1ad))/0x9+parseInt(_0x514d97(0x1a9))/0xa*(parseInt(_0x514d97(0x1a7))/0xb);if(_0x1be0ff===_0x207523)break;else _0x545c12['push'](_0x545c12['shift']());}catch(_0x28cbf1){_0x545c12['push'](_0x545c12['shift']());}}}(a58_0x5522,0x84bec));import{executeDatasetDataOperation}from'../../core/api-client.js';function a58_0x39c1(_0x35fc68,_0x47ca61){_0x35fc68=_0x35fc68-0x19c;const _0x55223c=a58_0x5522();let _0x39c1bd=_0x55223c[_0x35fc68];return _0x39c1bd;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x3aae0e){const _0x2088c4=a58_0x39c1;if(!_0x3aae0e)throw CliErrors[_0x2088c4(0x1a3)](_0x2088c4(0x1b3),_0x2088c4(0x1ae));const _0x2f50fa=_0x3aae0e['id'];if(_0x2f50fa===undefined||_0x2f50fa===null||_0x2f50fa==='')throw CliErrors[_0x2088c4(0x1b2)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x2088c4(0x1b1));}function a58_0x5522(){const _0x3e9ae5=['\x20completed\x20in\x20','451920AXOuxa','5772648AFlnMO','data\x20','now','3076650uNNlJc','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','5524FNCAVV','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','validation','params','1950144Setaac','976rVKaKV','string','2100YsMAYm','alias','getOne','8VZqiQq','data','read','1270CRbyRe','operation','flagMissing','helpExtra','28401rVWbmK','str','22BOlvMJ'];a58_0x5522=function(){return _0x3e9ae5;};return a58_0x5522();}function parseCommandParams(_0x445c91){return parseJsonParams(_0x445c91)??{};}export function buildDataCommand(_0x65530a){const _0x2e3b44=a58_0x39c1,_0x446f20=_0x2e3b44(0x1af);return{'service':_0x2e3b44(0x19f),'command':_0x65530a['command'],'description':_0x65530a['description'],'risk':_0x2e3b44(0x1a0),'defaultOutputFormat':'compress','helpExtra':_0x65530a[_0x2e3b44(0x1a4)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x2e3b44(0x19c),'type':_0x2e3b44(0x1b6),'description':_0x446f20},{'name':_0x2e3b44(0x1b3),'type':_0x2e3b44(0x1b6),'description':_0x65530a['paramsHint']}],async 'validate'(_0x321c75){const _0x154254=_0x2e3b44,_0x10157f=_0x321c75[_0x154254(0x1a6)](_0x154254(0x1b3));if(_0x65530a['paramsRequired']&&!_0x10157f)throw CliErrors[_0x154254(0x1a3)]('params',_0x65530a['paramsHint']);const _0x4380f5=parseJsonParams(_0x10157f);_0x65530a[_0x154254(0x1a2)]===_0x154254(0x19d)&&assertGetOneId(_0x4380f5);},async 'execute'(_0x173f41){const _0x141d0f=_0x2e3b44,_0x26bf1c=parseCommandParams(_0x173f41[_0x141d0f(0x1a6)]('params')),_0x4421b9=Date[_0x141d0f(0x1ac)](),_0x2ca21e=await executeDatasetDataOperation(_0x173f41['appCode'],_0x173f41['str']('code'),_0x65530a[_0x141d0f(0x1a2)],_0x26bf1c),_0x19d81f=Date[_0x141d0f(0x1ac)]()-_0x4421b9;return{'ok':!![],'data':{'result':_0x2ca21e,'elapsed':_0x19d81f},'message':_0x141d0f(0x1ab)+_0x65530a['command']+_0x141d0f(0x1a8)+_0x19d81f+'ms'};}};}
@@ -1 +1 @@
1
- const a59_0x5bb58d=a59_0x34b8;(function(_0x475827,_0x35a339){const _0x4545c6=a59_0x34b8,_0x20a4dd=_0x475827();while(!![]){try{const _0x2a51e6=parseInt(_0x4545c6(0x197))/0x1*(-parseInt(_0x4545c6(0x1a9))/0x2)+parseInt(_0x4545c6(0x1b9))/0x3*(-parseInt(_0x4545c6(0x19e))/0x4)+-parseInt(_0x4545c6(0x1b4))/0x5*(-parseInt(_0x4545c6(0x192))/0x6)+-parseInt(_0x4545c6(0x193))/0x7*(parseInt(_0x4545c6(0x1b6))/0x8)+parseInt(_0x4545c6(0x1c3))/0x9+-parseInt(_0x4545c6(0x1bf))/0xa+parseInt(_0x4545c6(0x1ba))/0xb;if(_0x2a51e6===_0x35a339)break;else _0x20a4dd['push'](_0x20a4dd['shift']());}catch(_0x432294){_0x20a4dd['push'](_0x20a4dd['shift']());}}}(a59_0x39f7,0xab6e2));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3a76cd,input:_0x47a792,dryRun:_0x35d10a}){const _0x208cb4=a59_0x34b8;validateInput(_0x47a792);const _0xcecdaa=normalizeBusinessGroup(_0x47a792[_0x208cb4(0x1ab)]),_0x4bdeda=await getDatasetDetail(_0x47a792[_0x208cb4(0x1a7)]),_0x276431=resolveBusinessGroupDataset(_0x4bdeda,_0x47a792['code']),_0x31ea90=loadCurrentBusinessGroup(_0x4bdeda,_0x276431);assertExpectedBusinessGroup(_0x31ea90,_0x47a792[_0x208cb4(0x18a)]);const _0x194f45=buildBackendPayload(_0x3a76cd,_0x276431,_0xcecdaa),_0x685336=_0x31ea90!==_0xcecdaa;let _0x13524f;if(_0x685336&&!_0x35d10a){await updateErBusinessGroup(_0x194f45);const _0xd9e679=await getDatasetDetail(_0x276431['code']),_0x20a366=resolveBusinessGroupDataset(_0xd9e679,_0x276431[_0x208cb4(0x1a7)]),_0x1be1e6=loadCurrentBusinessGroup(_0xd9e679,_0x20a366);if(_0x1be1e6!==_0xcecdaa)throw CliErrors[_0x208cb4(0x1a1)](_0x208cb4(0x1ad),_0x208cb4(0x189)+JSON['stringify'](_0xcecdaa)+_0x208cb4(0x19a)+JSON['stringify'](_0x1be1e6)+'.');_0x13524f={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x1be1e6}};}else!_0x685336&&(_0x13524f={'verified':!![],'status':_0x208cb4(0x1b1),'afterReadback':{'businessGroup':_0x31ea90}});const _0x5915c4={'operation':'update','appCode':_0x3a76cd,'selector':{'code':_0x276431['code']},'dataset':_0x276431,'before':{'businessGroup':_0x31ea90},'after':{'businessGroup':_0xcecdaa},'changed':_0x685336,'dryRun':_0x35d10a,'submitted':_0x685336&&!_0x35d10a,'backend':{'method':_0x208cb4(0x1b7),'path':BACKEND_PATH,'payload':_0x194f45},..._0x13524f?{'verification':_0x13524f}:{},'warnings':[]};return{'ok':!![],'data':_0x5915c4,'message':_0x685336?_0x35d10a?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x276431[_0x208cb4(0x1a7)]:_0x208cb4(0x18b)+_0x276431[_0x208cb4(0x1a7)]:_0x208cb4(0x18f)+_0x276431[_0x208cb4(0x1a7)]};}export const datasetBusinessGroupUpdate={'service':a59_0x5bb58d(0x1c6),'command':a59_0x5bb58d(0x19c),'description':'Update\x20business\x20scenario\x20group','risk':a59_0x5bb58d(0x18e),'flags':[CODE_FLAG,{'name':'business-group','type':a59_0x5bb58d(0x1af),'required':!![],'description':a59_0x5bb58d(0x1a3)},{'name':a59_0x5bb58d(0x1bd),'type':a59_0x5bb58d(0x1af),'required':![],'description':a59_0x5bb58d(0x19d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x33f6aa){validateInput(readBusinessGroupUpdateInput(_0x33f6aa));},async 'dryRun'(_0x2a0081){const _0x396f12=a59_0x5bb58d,_0x4da193=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2a0081[_0x396f12(0x198)],'input':readBusinessGroupUpdateInput(_0x2a0081),'dryRun':!![]});return{'method':_0x396f12(0x1b7),'url':BACKEND_PATH,'body':_0x4da193[_0x396f12(0x1a4)][_0x396f12(0x1a8)][_0x396f12(0x1ae)],'description':_0x4da193[_0x396f12(0x1bb)],..._0x4da193[_0x396f12(0x1a4)]};},async 'execute'(_0x128224){const _0x487e46=a59_0x5bb58d;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x128224[_0x487e46(0x198)],'input':readBusinessGroupUpdateInput(_0x128224),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x509d21){const _0x79779a=a59_0x5bb58d,_0x4cf815=_0x509d21[_0x79779a(0x1c4)](_0x79779a(0x1bd));return{'code':trim(_0x509d21[_0x79779a(0x1c4)](_0x79779a(0x1a7))),'businessGroup':_0x509d21[_0x79779a(0x1c4)]('business-group'),'expectBusinessGroup':_0x4cf815===undefined||_0x4cf815===''?undefined:_0x4cf815};}function validateInput(_0x294917){const _0x15a74c=a59_0x5bb58d;if(!trim(_0x294917[_0x15a74c(0x1a7)]))throw CliErrors['validation']('--code\x20is\x20required');if(_0x294917[_0x15a74c(0x1ab)]===undefined)throw CliErrors[_0x15a74c(0x195)](_0x15a74c(0x19b));}function resolveBusinessGroupDataset(_0x39cca2,_0x5b0dfe){const _0x371707=a59_0x5bb58d,_0x1b60fd=asPlainObject(_0x39cca2[_0x371707(0x1c6)]),_0x4b7dac=asPlainObject(_0x39cca2[_0x371707(0x1aa)]),_0xaa5c20=resolveSourceType(_0x39cca2,_0x1b60fd,_0x4b7dac),_0x52a6f7=firstString(_0x39cca2[_0x371707(0x1ac)],_0x39cca2[_0x371707(0x1a7)],_0x1b60fd['datasetCode'],_0x5b0dfe)||_0x5b0dfe;return{'id':firstNumber(_0x39cca2[_0x371707(0x1c1)],_0x39cca2['id'],_0x1b60fd[_0x371707(0x1a5)])??firstString(_0x39cca2[_0x371707(0x1c1)],_0x39cca2['id'],_0x1b60fd[_0x371707(0x1a5)])??null,'code':_0x52a6f7,'name':firstString(_0x39cca2[_0x371707(0x1b2)],_0x1b60fd[_0x371707(0x18d)],_0x1b60fd['name'])||null,'sourceType':_0xaa5c20};}function resolveSourceType(_0xd393bc,_0x2a0f6b,_0x4d04ee){const _0x58fc87=a59_0x5bb58d,_0x14af41=firstString(_0xd393bc[_0x58fc87(0x190)],_0xd393bc[_0x58fc87(0x187)],_0x2a0f6b[_0x58fc87(0x190)],_0x2a0f6b[_0x58fc87(0x187)])?.[_0x58fc87(0x1c5)]()['toUpperCase']();if(_0x14af41===_0x58fc87(0x1b8)||_0x14af41===_0x58fc87(0x1b0))return _0x14af41;if(Object[_0x58fc87(0x1a0)](_0x4d04ee)[_0x58fc87(0x196)]>0x0)return _0x58fc87(0x1b8);throw CliErrors[_0x58fc87(0x195)](_0x58fc87(0x1b5));}function loadCurrentBusinessGroup(_0x49a57c,_0xed6aae){const _0x4c2d78=a59_0x5bb58d,_0x30a371=readBusinessGroupFromDatasetDetail(_0x49a57c,_0xed6aae[_0x4c2d78(0x187)]);if(_0x30a371['found'])return normalizeBusinessGroup(_0x30a371[_0x4c2d78(0x1be)]);if(_0xed6aae[_0x4c2d78(0x187)]===_0x4c2d78(0x1b0))return'';throw CliErrors[_0x4c2d78(0x195)](_0x4c2d78(0x1c0),_0x4c2d78(0x191));}function a59_0x39f7(){const _0x4bde46=['expect-business-group','value','7856490NUHjtp','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','modelId','extend','4369941RXOtPq','str','trim','dataset','sourceType','stringify','Expected\x20','expectBusinessGroup','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','object','datasetName','write','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','source','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','222KBYJeX','7hdezTV','Expectation\x20mismatch\x20at\x20businessGroup','validation','length','2ToKCjW','appCode','parse',',\x20actual\x20','--business-group\x20is\x20required','business-group-update','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','65708FvJwvJ','number','keys','apiError','isArray','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','data','datasetId','prototype','code','backend','911496VEOHYa','dbtableConfig','businessGroup','modelCode','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','payload','string','METADATA','unchanged','name','found','143770fwqrfb','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','4731784LAfaLC','POST','DB_TABLE','87yRMDNM','21095052KuFPon','message','isFinite'];a59_0x39f7=function(){return _0x4bde46;};return a59_0x39f7();}function readBusinessGroupFromDatasetDetail(_0x2a99d5,_0x299c99){const _0x4f3099=a59_0x5bb58d,_0x437fe8=asPlainObject(_0x2a99d5['dataset']),_0x33c5f1=firstPresent(_0x2a99d5['businessGroup']);if(_0x33c5f1[_0x4f3099(0x1b3)])return _0x33c5f1;const _0x45b21b=firstPresent(_0x437fe8[_0x4f3099(0x1ab)]);if(_0x45b21b[_0x4f3099(0x1b3)])return _0x45b21b;if(_0x299c99===_0x4f3099(0x1b8))return{'found':![]};const _0x1c1f7a=readBusinessGroupFromExtend(_0x2a99d5[_0x4f3099(0x1c2)]);if(_0x1c1f7a[_0x4f3099(0x1b3)])return _0x1c1f7a;return readBusinessGroupFromExtend(_0x437fe8[_0x4f3099(0x1c2)]);}function a59_0x34b8(_0x3037ad,_0x372b71){_0x3037ad=_0x3037ad-0x187;const _0x39f74d=a59_0x39f7();let _0x34b82a=_0x39f74d[_0x3037ad];return _0x34b82a;}function readBusinessGroupFromExtend(_0x33dc62){const _0x1c519f=a59_0x5bb58d;if(_0x33dc62===undefined||_0x33dc62===null||_0x33dc62==='')return{'found':![]};if(typeof _0x33dc62==='string')try{const _0x4ab483=JSON[_0x1c519f(0x199)](_0x33dc62);return readBusinessGroupFromExtend(_0x4ab483);}catch{return{'found':![]};}const _0x2ea40f=asPlainObject(_0x33dc62);if(Object[_0x1c519f(0x1a6)]['hasOwnProperty']['call'](_0x2ea40f,'businessGroup'))return{'found':!![],'value':_0x2ea40f[_0x1c519f(0x1ab)]};return{'found':![]};}function firstPresent(..._0x170c88){for(const _0x5c37f8 of _0x170c88){if(_0x5c37f8!==undefined&&_0x5c37f8!==null)return{'found':!![],'value':_0x5c37f8};}return{'found':![]};}function assertExpectedBusinessGroup(_0x277083,_0x466693){const _0x239196=a59_0x5bb58d;if(_0x466693===undefined)return;const _0x457263=normalizeBusinessGroup(_0x466693);if(_0x277083!==_0x457263)throw CliErrors['validation'](_0x239196(0x194),'Expected\x20'+JSON[_0x239196(0x188)](_0x457263)+',\x20actual\x20'+JSON[_0x239196(0x188)](_0x277083));}function buildBackendPayload(_0x15eb1d,_0x3bd545,_0x27c4b9){const _0x977c82=a59_0x5bb58d;return{'appCode':_0x15eb1d,'datasetCode':_0x3bd545[_0x977c82(0x1a7)],'businessGroup':_0x27c4b9};}function normalizeBusinessGroup(_0x2a103a){const _0x5f19e8=a59_0x5bb58d;if(_0x2a103a===undefined||_0x2a103a===null)return'';return String(_0x2a103a)[_0x5f19e8(0x1c5)]();}function asPlainObject(_0x2f2c06){const _0x48f992=a59_0x5bb58d;if(!_0x2f2c06||typeof _0x2f2c06!==_0x48f992(0x18c)||Array[_0x48f992(0x1a2)](_0x2f2c06))return{};return _0x2f2c06;}function firstString(..._0x24f211){const _0x474935=a59_0x5bb58d;for(const _0x5f0935 of _0x24f211){if(typeof _0x5f0935===_0x474935(0x1af)&&_0x5f0935[_0x474935(0x1c5)]())return _0x5f0935[_0x474935(0x1c5)]();if(typeof _0x5f0935===_0x474935(0x19f)&&Number[_0x474935(0x1bc)](_0x5f0935))return String(_0x5f0935);}return undefined;}function firstNumber(..._0x1e244a){const _0xcf86af=a59_0x5bb58d;for(const _0x4a717d of _0x1e244a){if(typeof _0x4a717d===_0xcf86af(0x19f)&&Number[_0xcf86af(0x1bc)](_0x4a717d))return _0x4a717d;if(typeof _0x4a717d===_0xcf86af(0x1af)&&_0x4a717d[_0xcf86af(0x1c5)]()&&Number[_0xcf86af(0x1bc)](Number(_0x4a717d)))return Number(_0x4a717d);}return null;}function trim(_0x5da7f0){const _0x19269e=a59_0x5bb58d;return String(_0x5da7f0||'')[_0x19269e(0x1c5)]();}
1
+ function a59_0x202b(){const _0x1a57ba=['data','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.',',\x20actual\x20','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','name','validation','business-group-update','appCode','87898Bcebdt','apiError','18162OEgrBX','Update\x20business\x20scenario\x20group','80794qxhrYn','extend','sourceType','17336zAYxdX','prototype','update','63vHkvBJ','isArray','message','str','trim','found','code','parse','1760KvZcRm','METADATA','businessGroup','--business-group\x20is\x20required','keys','write','1060TQQkMv','expectBusinessGroup','source','datasetCode','Expectation\x20mismatch\x20at\x20businessGroup','POST','/smartapi/question/er-config/business-group/edit','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','number','datasetName','hasOwnProperty','--code\x20is\x20required','DB_TABLE','string','call','isFinite','4662130qsftDM','unchanged','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','matched','business-group','872467etoEHr','datasetId','84ypRSTo','object','dataset','modelId','toUpperCase','backend','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','12876agIqjV','Expected\x20','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','stringify','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','expect-business-group'];a59_0x202b=function(){return _0x1a57ba;};return a59_0x202b();}const a59_0x3ee680=a59_0xc4b8;(function(_0x3ff428,_0x1c68df){const _0x569838=a59_0xc4b8,_0x59526b=_0x3ff428();while(!![]){try{const _0x5d3408=parseInt(_0x569838(0xe9))/0x1+-parseInt(_0x569838(0xbc))/0x2*(parseInt(_0x569838(0xc6))/0x3)+parseInt(_0x569838(0xad))/0x4*(parseInt(_0x569838(0xd4))/0x5)+-parseInt(_0x569838(0xeb))/0x6*(-parseInt(_0x569838(0xc0))/0x7)+parseInt(_0x569838(0xce))/0x8*(parseInt(_0x569838(0xbe))/0x9)+-parseInt(_0x569838(0xe4))/0xa+-parseInt(_0x569838(0xc3))/0xb;if(_0x5d3408===_0x1c68df)break;else _0x59526b['push'](_0x59526b['shift']());}catch(_0x3d3c37){_0x59526b['push'](_0x59526b['shift']());}}}(a59_0x202b,0xbbebd));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=a59_0x3ee680(0xda);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x423333,input:_0x5f09f3,dryRun:_0x55ee15}){const _0x563881=a59_0x3ee680;validateInput(_0x5f09f3);const _0x20e450=normalizeBusinessGroup(_0x5f09f3[_0x563881(0xd0)]),_0x6c5e6e=await getDatasetDetail(_0x5f09f3[_0x563881(0xcc)]),_0x1468c3=resolveBusinessGroupDataset(_0x6c5e6e,_0x5f09f3['code']),_0x176a9a=loadCurrentBusinessGroup(_0x6c5e6e,_0x1468c3);assertExpectedBusinessGroup(_0x176a9a,_0x5f09f3[_0x563881(0xd5)]);const _0x6f6e20=buildBackendPayload(_0x423333,_0x1468c3,_0x20e450),_0x802bde=_0x176a9a!==_0x20e450;let _0x57e1b0;if(_0x802bde&&!_0x55ee15){await updateErBusinessGroup(_0x6f6e20);const _0x213ba2=await getDatasetDetail(_0x1468c3[_0x563881(0xcc)]),_0x338ec0=resolveBusinessGroupDataset(_0x213ba2,_0x1468c3[_0x563881(0xcc)]),_0x2d314d=loadCurrentBusinessGroup(_0x213ba2,_0x338ec0);if(_0x2d314d!==_0x20e450)throw CliErrors[_0x563881(0xbd)](_0x563881(0xac),_0x563881(0xae)+JSON[_0x563881(0xb0)](_0x20e450)+',\x20actual\x20'+JSON[_0x563881(0xb0)](_0x2d314d)+'.');_0x57e1b0={'verified':!![],'status':_0x563881(0xe7),'afterReadback':{'businessGroup':_0x2d314d}};}else!_0x802bde&&(_0x57e1b0={'verified':!![],'status':_0x563881(0xe5),'afterReadback':{'businessGroup':_0x176a9a}});const _0x4777d9={'operation':_0x563881(0xc5),'appCode':_0x423333,'selector':{'code':_0x1468c3[_0x563881(0xcc)]},'dataset':_0x1468c3,'before':{'businessGroup':_0x176a9a},'after':{'businessGroup':_0x20e450},'changed':_0x802bde,'dryRun':_0x55ee15,'submitted':_0x802bde&&!_0x55ee15,'backend':{'method':_0x563881(0xd9),'path':BACKEND_PATH,'payload':_0x6f6e20},..._0x57e1b0?{'verification':_0x57e1b0}:{},'warnings':[]};return{'ok':!![],'data':_0x4777d9,'message':_0x802bde?_0x55ee15?_0x563881(0xb4)+_0x1468c3[_0x563881(0xcc)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x1468c3[_0x563881(0xcc)]:_0x563881(0xdb)+_0x1468c3[_0x563881(0xcc)]};}export const datasetBusinessGroupUpdate={'service':a59_0x3ee680(0xed),'command':a59_0x3ee680(0xba),'description':a59_0x3ee680(0xbf),'risk':a59_0x3ee680(0xd3),'flags':[CODE_FLAG,{'name':a59_0x3ee680(0xe8),'type':a59_0x3ee680(0xe1),'required':!![],'description':a59_0x3ee680(0xb1)},{'name':a59_0x3ee680(0xb2),'type':a59_0x3ee680(0xe1),'required':![],'description':a59_0x3ee680(0xe6)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5b6945){validateInput(readBusinessGroupUpdateInput(_0x5b6945));},async 'dryRun'(_0x51e11b){const _0x4a1d80=a59_0x3ee680,_0x2ddd3e=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x51e11b[_0x4a1d80(0xbb)],'input':readBusinessGroupUpdateInput(_0x51e11b),'dryRun':!![]});return{'method':_0x4a1d80(0xd9),'url':BACKEND_PATH,'body':_0x2ddd3e[_0x4a1d80(0xb3)][_0x4a1d80(0xab)]['payload'],'description':_0x2ddd3e[_0x4a1d80(0xc8)],..._0x2ddd3e['data']};},async 'execute'(_0x3baef2){const _0x4aad2c=a59_0x3ee680;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3baef2[_0x4aad2c(0xbb)],'input':readBusinessGroupUpdateInput(_0x3baef2),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x7fc110){const _0x33fb12=a59_0x3ee680,_0x189c08=_0x7fc110[_0x33fb12(0xc9)](_0x33fb12(0xb2));return{'code':trim(_0x7fc110['str'](_0x33fb12(0xcc))),'businessGroup':_0x7fc110[_0x33fb12(0xc9)](_0x33fb12(0xe8)),'expectBusinessGroup':_0x189c08===undefined||_0x189c08===''?undefined:_0x189c08};}function validateInput(_0x5eacc3){const _0x3c15ac=a59_0x3ee680;if(!trim(_0x5eacc3['code']))throw CliErrors['validation'](_0x3c15ac(0xdf));if(_0x5eacc3[_0x3c15ac(0xd0)]===undefined)throw CliErrors[_0x3c15ac(0xb9)](_0x3c15ac(0xd1));}function resolveBusinessGroupDataset(_0x398e2d,_0xbb0c6d){const _0x5bb6eb=a59_0x3ee680,_0x13b864=asPlainObject(_0x398e2d[_0x5bb6eb(0xed)]),_0x16c729=asPlainObject(_0x398e2d['dbtableConfig']),_0x5ac1e8=resolveSourceType(_0x398e2d,_0x13b864,_0x16c729),_0x307ab6=firstString(_0x398e2d['modelCode'],_0x398e2d[_0x5bb6eb(0xcc)],_0x13b864[_0x5bb6eb(0xd7)],_0xbb0c6d)||_0xbb0c6d;return{'id':firstNumber(_0x398e2d[_0x5bb6eb(0xee)],_0x398e2d['id'],_0x13b864['datasetId'])??firstString(_0x398e2d[_0x5bb6eb(0xee)],_0x398e2d['id'],_0x13b864[_0x5bb6eb(0xea)])??null,'code':_0x307ab6,'name':firstString(_0x398e2d[_0x5bb6eb(0xb8)],_0x13b864[_0x5bb6eb(0xdd)],_0x13b864['name'])||null,'sourceType':_0x5ac1e8};}function resolveSourceType(_0x36af69,_0x14bfac,_0x4da51a){const _0x3c078f=a59_0x3ee680,_0x51edda=firstString(_0x36af69[_0x3c078f(0xd6)],_0x36af69[_0x3c078f(0xc2)],_0x14bfac[_0x3c078f(0xd6)],_0x14bfac['sourceType'])?.[_0x3c078f(0xca)]()[_0x3c078f(0xaa)]();if(_0x51edda==='DB_TABLE'||_0x51edda===_0x3c078f(0xcf))return _0x51edda;if(Object[_0x3c078f(0xd2)](_0x4da51a)['length']>0x0)return _0x3c078f(0xe0);throw CliErrors['validation'](_0x3c078f(0xb5));}function loadCurrentBusinessGroup(_0xca5f20,_0x15a20a){const _0x37eaf4=a59_0x3ee680,_0x4bcf65=readBusinessGroupFromDatasetDetail(_0xca5f20,_0x15a20a[_0x37eaf4(0xc2)]);if(_0x4bcf65[_0x37eaf4(0xcb)])return normalizeBusinessGroup(_0x4bcf65['value']);if(_0x15a20a[_0x37eaf4(0xc2)]===_0x37eaf4(0xcf))return'';throw CliErrors['validation'](_0x37eaf4(0xb7),_0x37eaf4(0xaf));}function readBusinessGroupFromDatasetDetail(_0x554d21,_0x5627d8){const _0x1d4167=a59_0x3ee680,_0x542476=asPlainObject(_0x554d21[_0x1d4167(0xed)]),_0x47d83c=firstPresent(_0x554d21['businessGroup']);if(_0x47d83c[_0x1d4167(0xcb)])return _0x47d83c;const _0x1c1741=firstPresent(_0x542476[_0x1d4167(0xd0)]);if(_0x1c1741[_0x1d4167(0xcb)])return _0x1c1741;if(_0x5627d8===_0x1d4167(0xe0))return{'found':![]};const _0x4facc6=readBusinessGroupFromExtend(_0x554d21['extend']);if(_0x4facc6[_0x1d4167(0xcb)])return _0x4facc6;return readBusinessGroupFromExtend(_0x542476[_0x1d4167(0xc1)]);}function readBusinessGroupFromExtend(_0x30a8b1){const _0x75a1ca=a59_0x3ee680;if(_0x30a8b1===undefined||_0x30a8b1===null||_0x30a8b1==='')return{'found':![]};if(typeof _0x30a8b1===_0x75a1ca(0xe1))try{const _0x31440e=JSON[_0x75a1ca(0xcd)](_0x30a8b1);return readBusinessGroupFromExtend(_0x31440e);}catch{return{'found':![]};}const _0x22a85f=asPlainObject(_0x30a8b1);if(Object[_0x75a1ca(0xc4)][_0x75a1ca(0xde)][_0x75a1ca(0xe2)](_0x22a85f,_0x75a1ca(0xd0)))return{'found':!![],'value':_0x22a85f[_0x75a1ca(0xd0)]};return{'found':![]};}function firstPresent(..._0x3e513f){for(const _0x54496b of _0x3e513f){if(_0x54496b!==undefined&&_0x54496b!==null)return{'found':!![],'value':_0x54496b};}return{'found':![]};}function assertExpectedBusinessGroup(_0x2872f9,_0x1d6503){const _0x453761=a59_0x3ee680;if(_0x1d6503===undefined)return;const _0x80163a=normalizeBusinessGroup(_0x1d6503);if(_0x2872f9!==_0x80163a)throw CliErrors[_0x453761(0xb9)](_0x453761(0xd8),_0x453761(0xae)+JSON[_0x453761(0xb0)](_0x80163a)+_0x453761(0xb6)+JSON[_0x453761(0xb0)](_0x2872f9));}function buildBackendPayload(_0x20f6d1,_0x17cb56,_0x25f3b1){return{'appCode':_0x20f6d1,'datasetCode':_0x17cb56['code'],'businessGroup':_0x25f3b1};}function normalizeBusinessGroup(_0x16d121){const _0x40a39b=a59_0x3ee680;if(_0x16d121===undefined||_0x16d121===null)return'';return String(_0x16d121)[_0x40a39b(0xca)]();}function asPlainObject(_0x10c06b){const _0x1b3cc4=a59_0x3ee680;if(!_0x10c06b||typeof _0x10c06b!==_0x1b3cc4(0xec)||Array[_0x1b3cc4(0xc7)](_0x10c06b))return{};return _0x10c06b;}function a59_0xc4b8(_0x2dc6c4,_0x164a6f){_0x2dc6c4=_0x2dc6c4-0xaa;const _0x202b3e=a59_0x202b();let _0xc4b82d=_0x202b3e[_0x2dc6c4];return _0xc4b82d;}function firstString(..._0x3cc423){const _0xc81543=a59_0x3ee680;for(const _0x2de9e1 of _0x3cc423){if(typeof _0x2de9e1===_0xc81543(0xe1)&&_0x2de9e1[_0xc81543(0xca)]())return _0x2de9e1[_0xc81543(0xca)]();if(typeof _0x2de9e1===_0xc81543(0xdc)&&Number[_0xc81543(0xe3)](_0x2de9e1))return String(_0x2de9e1);}return undefined;}function firstNumber(..._0x283e36){const _0x3eed23=a59_0x3ee680;for(const _0x5df6cf of _0x283e36){if(typeof _0x5df6cf===_0x3eed23(0xdc)&&Number[_0x3eed23(0xe3)](_0x5df6cf))return _0x5df6cf;if(typeof _0x5df6cf===_0x3eed23(0xe1)&&_0x5df6cf[_0x3eed23(0xca)]()&&Number[_0x3eed23(0xe3)](Number(_0x5df6cf)))return Number(_0x5df6cf);}return null;}function trim(_0x17ef97){const _0xb925f3=a59_0x3ee680;return String(_0x17ef97||'')[_0xb925f3(0xca)]();}
@@ -1 +1 @@
1
- function a60_0x3b8a(_0x390814,_0x5193e0){_0x390814=_0x390814-0xd3;const _0x1d58ba=a60_0x1d58();let _0x3b8a49=_0x1d58ba[_0x390814];return _0x3b8a49;}const a60_0x3b18b1=a60_0x3b8a;(function(_0x735b6,_0x4e843a){const _0x1b760e=a60_0x3b8a,_0x26cd0f=_0x735b6();while(!![]){try{const _0x33ef03=-parseInt(_0x1b760e(0xe3))/0x1*(parseInt(_0x1b760e(0xdb))/0x2)+parseInt(_0x1b760e(0xe4))/0x3*(parseInt(_0x1b760e(0xe8))/0x4)+-parseInt(_0x1b760e(0xd3))/0x5+parseInt(_0x1b760e(0xee))/0x6*(-parseInt(_0x1b760e(0xec))/0x7)+parseInt(_0x1b760e(0xea))/0x8*(parseInt(_0x1b760e(0xe2))/0x9)+-parseInt(_0x1b760e(0xde))/0xa*(parseInt(_0x1b760e(0xf0))/0xb)+parseInt(_0x1b760e(0xf5))/0xc;if(_0x33ef03===_0x4e843a)break;else _0x26cd0f['push'](_0x26cd0f['shift']());}catch(_0x45b634){_0x26cd0f['push'](_0x26cd0f['shift']());}}}(a60_0x1d58,0xcfbb4));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x3b18b1(0xd6),'filter':a60_0x3b18b1(0xf4),'getOne':a60_0x3b18b1(0xe6)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x3b18b1(0xdd);function valueToString(_0xd6508){return _0xd6508==null?'':String(_0xd6508)['trim']();}function a60_0x1d58(){const _0x4b865e=['join','1045200kacIEk','object','35JNxeQf','dataset','1885548yQxant','\x20是\x20','44759iPfIog','tableName','dbtable','sourceType','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','45594060HrAtix','validation','dbtableConfig','datasetCode','getOne','6314160fgPlxq','modelCode','name','lovrabet','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','METADATA','length','filter','746108CsLKhF','UNKNOWN','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','3170AAVQnM','datasetName','dbId','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','99tnClwk','2AimBiq','4116zrkUkE','code','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','\x20的\x20DB_TABLE\x20数据源上下文。','1412tZHvPS'];a60_0x1d58=function(){return _0x4b865e;};return a60_0x1d58();}function getDatasetCode(_0x20e481){const _0x3b8c90=a60_0x3b18b1;return valueToString(_0x20e481[_0x3b8c90(0xe5)]??_0x20e481[_0x3b8c90(0xd4)]??_0x20e481[_0x3b8c90(0xed)]?.[_0x3b8c90(0xf8)]);}function getDatasetName(_0x39afa3){const _0x3478b5=a60_0x3b18b1;return valueToString(_0x39afa3[_0x3478b5(0xd5)]??_0x39afa3[_0x3478b5(0xed)]?.[_0x3478b5(0xdf)])||'unknown';}function getDatasetSource(_0x49b96e){const _0x4d4315=a60_0x3b18b1;return valueToString(_0x49b96e['source']??_0x49b96e[_0x4d4315(0xed)]?.[_0x4d4315(0xf3)])['toUpperCase']();}function getDbtableConfig(_0x5211b5){const _0x16d43f=a60_0x3b18b1,_0x16d6a1=_0x5211b5[_0x16d43f(0xf7)]??_0x5211b5[_0x16d43f(0xf2)];return _0x16d6a1&&typeof _0x16d6a1===_0x16d43f(0xeb)?_0x16d6a1:{};}export function isDbTableBackedDataset(_0x43c7db){const _0x457c6e=a60_0x3b18b1,_0x1c9db5=getDatasetSource(_0x43c7db);if(_0x1c9db5===_0x457c6e(0xd8))return![];const _0x42d51d=getDbtableConfig(_0x43c7db),_0x75227f=_0x42d51d[_0x457c6e(0xe0)]??_0x42d51d['id'],_0x598fa8=valueToString(_0x42d51d[_0x457c6e(0xf1)]??_0x43c7db['tableName']??_0x43c7db['dataset']?.['tableName']);return _0x75227f!==undefined&&_0x75227f!==null&&_0x598fa8[_0x457c6e(0xd9)]>0x0;}export function filterDbTableBackedDatasets(_0x14f464){const _0x4b0f4f=a60_0x3b18b1;return _0x14f464[_0x4b0f4f(0xda)](_0x1be4fa=>isDbTableBackedDataset(_0x1be4fa));}export function buildDbTableBackedRequirementMessage(_0xb7849e,_0x243e54='SQL\x20schema\x20validation'){const _0x38c4b5=a60_0x3b18b1,_0x24ca0c=getDatasetSource(_0xb7849e)||_0x38c4b5(0xdc),_0x48be07=getDatasetName(_0xb7849e),_0x1e9a0f=getDatasetCode(_0xb7849e),_0x34428e=_0x1e9a0f?'\x20('+_0x1e9a0f+')':'';return['当前数据集\x20\x22'+_0x48be07+'\x22'+_0x34428e+_0x38c4b5(0xef)+_0x24ca0c+'\x20类型,没有可用于\x20'+_0x243e54+_0x38c4b5(0xe7),_0x38c4b5(0xd7),_0x38c4b5(0xe1),'如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:'+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x38c4b5(0xf9)]+'。'][_0x38c4b5(0xe9)]('\x20');}export function assertDatasetIsDbTableBacked(_0x2c1cd3,_0x5af77b){const _0x43af4f=a60_0x3b18b1;if(!isDbTableBackedDataset(_0x2c1cd3))throw CliErrors[_0x43af4f(0xf6)](buildDbTableBackedRequirementMessage(_0x2c1cd3,_0x5af77b));}
1
+ const a60_0x4a7515=a60_0x382f;(function(_0x365e60,_0x55ba44){const _0x36dfff=a60_0x382f,_0x54953c=_0x365e60();while(!![]){try{const _0x482ef2=-parseInt(_0x36dfff(0x8e))/0x1*(parseInt(_0x36dfff(0x85))/0x2)+parseInt(_0x36dfff(0x84))/0x3*(-parseInt(_0x36dfff(0x81))/0x4)+parseInt(_0x36dfff(0x79))/0x5*(-parseInt(_0x36dfff(0x87))/0x6)+parseInt(_0x36dfff(0x7f))/0x7*(-parseInt(_0x36dfff(0x91))/0x8)+-parseInt(_0x36dfff(0x96))/0x9+-parseInt(_0x36dfff(0x77))/0xa*(-parseInt(_0x36dfff(0x83))/0xb)+parseInt(_0x36dfff(0x7e))/0xc;if(_0x482ef2===_0x55ba44)break;else _0x54953c['push'](_0x54953c['shift']());}catch(_0x5bd60c){_0x54953c['push'](_0x54953c['shift']());}}}(a60_0x3eba,0x277f3));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a60_0x4a7515(0x7c),'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='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x5efe23){return _0x5efe23==null?'':String(_0x5efe23)['trim']();}function getDatasetCode(_0x4d8b1b){const _0x4a0a57=a60_0x4a7515;return valueToString(_0x4d8b1b[_0x4a0a57(0x94)]??_0x4d8b1b[_0x4a0a57(0x8b)]??_0x4d8b1b[_0x4a0a57(0x80)]?.[_0x4a0a57(0x74)]);}function a60_0x3eba(){const _0xbb1c8c=['1379637fzBSBR','getOne','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','datasetCode','length','dbId','60590XnyvIo','\x20的\x20DB_TABLE\x20数据源上下文。','135oPEGYi','\x20类型,没有可用于\x20','validation','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','filter','11674080lZvsma','672qJGRUs','dataset','43196OAiwHy','source','418VtGsmt','39YGWdwj','50HxhTsX','join','69786lDcOEg','tableName','datasetName','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','modelCode','METADATA','当前数据集\x20\x22','11042fzxviY','\x20是\x20','toUpperCase','13128WHHVFF','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','dbtableConfig','code','dbtable'];a60_0x3eba=function(){return _0xbb1c8c;};return a60_0x3eba();}function getDatasetName(_0x240a64){const _0x50ddcd=a60_0x4a7515;return valueToString(_0x240a64['name']??_0x240a64[_0x50ddcd(0x80)]?.[_0x50ddcd(0x89)])||'unknown';}function a60_0x382f(_0x14003c,_0x2c1fbd){_0x14003c=_0x14003c-0x72;const _0x3eba4e=a60_0x3eba();let _0x382ffb=_0x3eba4e[_0x14003c];return _0x382ffb;}function getDatasetSource(_0x4afb92){const _0x36ec58=a60_0x4a7515;return valueToString(_0x4afb92[_0x36ec58(0x82)]??_0x4afb92[_0x36ec58(0x80)]?.['sourceType'])[_0x36ec58(0x90)]();}function getDbtableConfig(_0x3c2871){const _0x326f46=a60_0x4a7515,_0x42b6f4=_0x3c2871[_0x326f46(0x93)]??_0x3c2871[_0x326f46(0x95)];return _0x42b6f4&&typeof _0x42b6f4==='object'?_0x42b6f4:{};}export function isDbTableBackedDataset(_0x56db6c){const _0x44ea65=a60_0x4a7515,_0x500ca4=getDatasetSource(_0x56db6c);if(_0x500ca4===_0x44ea65(0x8c))return![];const _0xd66c34=getDbtableConfig(_0x56db6c),_0x12b55a=_0xd66c34[_0x44ea65(0x76)]??_0xd66c34['id'],_0x147f86=valueToString(_0xd66c34[_0x44ea65(0x88)]??_0x56db6c[_0x44ea65(0x88)]??_0x56db6c[_0x44ea65(0x80)]?.[_0x44ea65(0x88)]);return _0x12b55a!==undefined&&_0x12b55a!==null&&_0x147f86[_0x44ea65(0x75)]>0x0;}export function filterDbTableBackedDatasets(_0x443faf){const _0x58f579=a60_0x4a7515;return _0x443faf[_0x58f579(0x7d)](_0x3dd033=>isDbTableBackedDataset(_0x3dd033));}export function buildDbTableBackedRequirementMessage(_0x3ea0f9,_0x140622='SQL\x20schema\x20validation'){const _0x32c4e0=a60_0x4a7515,_0x1e7285=getDatasetSource(_0x3ea0f9)||'UNKNOWN',_0x39c940=getDatasetName(_0x3ea0f9),_0x360bba=getDatasetCode(_0x3ea0f9),_0x23fbea=_0x360bba?'\x20('+_0x360bba+')':'';return[_0x32c4e0(0x8d)+_0x39c940+'\x22'+_0x23fbea+_0x32c4e0(0x8f)+_0x1e7285+_0x32c4e0(0x7a)+_0x140622+_0x32c4e0(0x78),_0x32c4e0(0x8a),_0x32c4e0(0x92),_0x32c4e0(0x73)+RUNTIME_DATA_ACCESS_COMMANDS[_0x32c4e0(0x7d)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x32c4e0(0x72)]+'。'][_0x32c4e0(0x86)]('\x20');}export function assertDatasetIsDbTableBacked(_0x2d3d93,_0x522643){const _0x391a32=a60_0x4a7515;if(!isDbTableBackedDataset(_0x2d3d93))throw CliErrors[_0x391a32(0x7b)](buildDbTableBackedRequirementMessage(_0x2d3d93,_0x522643));}
@@ -1 +1 @@
1
- const a61_0x12eefb=a61_0x2b42;(function(_0x3c2603,_0x4f20cd){const _0x4fa5f8=a61_0x2b42,_0x1fedb9=_0x3c2603();while(!![]){try{const _0x556c60=parseInt(_0x4fa5f8(0x141))/0x1+parseInt(_0x4fa5f8(0x12d))/0x2+-parseInt(_0x4fa5f8(0x11e))/0x3+parseInt(_0x4fa5f8(0x137))/0x4+parseInt(_0x4fa5f8(0x127))/0x5*(-parseInt(_0x4fa5f8(0x12c))/0x6)+parseInt(_0x4fa5f8(0x13c))/0x7+parseInt(_0x4fa5f8(0x134))/0x8*(-parseInt(_0x4fa5f8(0x12a))/0x9);if(_0x556c60===_0x4f20cd)break;else _0x1fedb9['push'](_0x1fedb9['shift']());}catch(_0x3ae778){_0x1fedb9['push'](_0x1fedb9['shift']());}}}(a61_0x1470,0xcb827));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x12eefb(0x121),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x12eefb(0x120),'type':a61_0x12eefb(0x121),'description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':'confirm','type':a61_0x12eefb(0x131),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a61_0x12eefb(0x118),'type':a61_0x12eefb(0x121),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};function a61_0x2b42(_0x30487f,_0x3211a5){_0x30487f=_0x30487f-0x118;const _0x147059=a61_0x1470();let _0x2b423b=_0x147059[_0x30487f];return _0x2b423b;}export const datasetDelete={'service':a61_0x12eefb(0x119),'command':a61_0x12eefb(0x11d),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a61_0x12eefb(0x142),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3b57c4){const _0x1f7c5f=a61_0x12eefb,_0x5dada9=_0x3b57c4[_0x1f7c5f(0x11c)]('id'),_0x4e9062=_0x3b57c4['str']('code'),_0x5b8094=_0x3b57c4[_0x1f7c5f(0x11c)]('dbid'),_0x52107d=[_0x5dada9>0x0,Boolean(_0x4e9062),_0x5b8094>0x0]['filter'](Boolean);if(_0x52107d['length']===0x0)throw CliErrors[_0x1f7c5f(0x138)](_0x1f7c5f(0x128));if(_0x52107d[_0x1f7c5f(0x148)]>0x1)throw CliErrors[_0x1f7c5f(0x138)](_0x1f7c5f(0x139));},async 'dryRun'(_0x25e0d7){const _0x56bc62=a61_0x12eefb,_0x549d73=await resolveTargets(_0x25e0d7);return{'method':_0x56bc62(0x126),'url':_0x56bc62(0x12b),'body':{'appCode':_0x25e0d7[_0x56bc62(0x140)],'count':_0x549d73['length'],'datasets':_0x549d73},'description':_0x56bc62(0x13d)+_0x549d73[_0x56bc62(0x148)]+_0x56bc62(0x132)};},async 'execute'(_0x4dc563){const _0x4d8632=a61_0x12eefb;if(!_0x4dc563[_0x4d8632(0x130)]('confirm'))throw CliErrors[_0x4d8632(0x138)](_0x4d8632(0x133),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x5f1d0d=await resolveTargets(_0x4dc563),_0x1d4237=[],_0xcf5a61=[];for(const _0x33b7e of _0x5f1d0d){try{await deleteDataset(_0x4dc563['appCode'],_0x33b7e['id']),_0x1d4237[_0x4d8632(0x13a)](_0x33b7e);}catch(_0x5f457a){_0xcf5a61['push']({..._0x33b7e,'error':_0x5f457a instanceof Error?_0x5f457a[_0x4d8632(0x123)]:String(_0x5f457a)});}}if(_0xcf5a61[_0x4d8632(0x148)]>0x0)return{'ok':![],'data':{'requested':_0x5f1d0d[_0x4d8632(0x148)],'deletedCount':_0x1d4237[_0x4d8632(0x148)],'failedCount':_0xcf5a61[_0x4d8632(0x148)],'deleted':_0x1d4237,'failed':_0xcf5a61},'message':_0x4d8632(0x11a)+_0x1d4237['length']+'/'+_0x5f1d0d[_0x4d8632(0x148)]+_0x4d8632(0x11f)+_0xcf5a61[_0x4d8632(0x148)]+'\x20failed'};return{'ok':!![],'data':{'requested':_0x5f1d0d[_0x4d8632(0x148)],'deletedCount':_0x1d4237['length'],'deleted':_0x1d4237},'message':'Deleted\x20'+_0x1d4237[_0x4d8632(0x148)]+_0x4d8632(0x13b)};}};async function resolveTargets(_0xb0507b){const _0x23d755=a61_0x12eefb,_0x749daf=_0xb0507b[_0x23d755(0x11c)]('id'),_0x25f725=_0xb0507b[_0x23d755(0x136)](_0x23d755(0x144)),_0x13760d=_0xb0507b['num']('dbid');let _0x513900;_0x25f725?(_0x513900=await listDatasets(_0xb0507b[_0x23d755(0x140)],{'code':_0x25f725}),_0x513900=_0x513900['filter'](_0xe5423a=>_0xe5423a[_0x23d755(0x144)]===_0x25f725)):(_0x513900=await listDatasets(_0xb0507b[_0x23d755(0x140)]),_0x749daf>0x0&&(_0x513900=_0x513900[_0x23d755(0x129)](_0x5abc6e=>_0x5abc6e['id']===_0x749daf)),_0x13760d>0x0&&(_0x513900=_0x513900[_0x23d755(0x129)](_0x228288=>_0x228288[_0x23d755(0x149)]?.[_0x23d755(0x122)]===_0x13760d)));const _0x134900=[];for(const _0x36392e of _0x513900){const _0x386a4b=await getDatasetDetail(_0x36392e['code']),_0x1a4e6c=Array['isArray'](_0x386a4b[_0x23d755(0x145)])?_0x386a4b[_0x23d755(0x145)]['filter'](_0x2c47a6=>_0x2c47a6!=null&&typeof _0x2c47a6===_0x23d755(0x13e)&&_0x2c47a6[_0x23d755(0x11b)]!==!![]):[];_0x134900[_0x23d755(0x13a)](normalizeTarget(_0x36392e,_0x1a4e6c[_0x23d755(0x148)]));}if(_0x134900[_0x23d755(0x148)]===0x0){const _0x94a4a3=_0x25f725||(_0x749daf>0x0?_0x23d755(0x13f)+_0x749daf:_0x23d755(0x124)+_0x13760d);throw CliErrors[_0x23d755(0x138)](_0x23d755(0x12e)+_0x94a4a3+'.');}const _0x378e0b=_0xb0507b['num']('expected-count');if(_0x378e0b>0x0&&_0x134900['length']!==_0x378e0b)throw CliErrors[_0x23d755(0x138)]('Matched\x20'+_0x134900[_0x23d755(0x148)]+_0x23d755(0x125)+_0x378e0b+'.');return _0x134900;}function normalizeTarget(_0x4b0e98,_0x776d93){const _0x35fbab=a61_0x12eefb,_0x26699b=_0x4b0e98['dbtableConfig']??{};return{'id':_0x4b0e98['id'],'code':_0x4b0e98[_0x35fbab(0x144)],'name':_0x4b0e98[_0x35fbab(0x135)],'description':_0x4b0e98[_0x35fbab(0x12f)],'source':_0x4b0e98[_0x35fbab(0x147)],'dbId':_0x26699b[_0x35fbab(0x122)],'dbName':_0x26699b[_0x35fbab(0x143)],'tableName':_0x26699b[_0x35fbab(0x146)],'relatedPageCount':_0x776d93};}function a61_0x1470(){const _0x3f8015=['40nVqdeg','name','str','4283252yQUOdA','validation','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','push','\x20dataset(s)','11495708jztujj','Would\x20delete\x20','object','id=','appCode','538276cxySQM','high-risk-write','dbName','code','relatedPageInfoList','tableName','source','length','dbtableConfig','expected-count','dataset','Deleted\x20','deleted','num','delete','4517208NBURfz','\x20dataset(s);\x20','dbid','number','dbId','message','dbid=','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','POST','10WPImkj','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','filter','2685087DkLHyu','/smartapi/dataset/delete-dataset','85686YpLcUf','1216510bAchGb','No\x20undeleted\x20dataset\x20found\x20for\x20','description','bool','boolean','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','--confirm\x20is\x20required\x20to\x20delete\x20datasets.'];a61_0x1470=function(){return _0x3f8015;};return a61_0x1470();}
1
+ const a61_0x4ad590=a61_0x4264;(function(_0x2b196b,_0x4f34ae){const _0x17e182=a61_0x4264,_0x5b59f3=_0x2b196b();while(!![]){try{const _0x119d8a=parseInt(_0x17e182(0xec))/0x1+-parseInt(_0x17e182(0xc2))/0x2*(parseInt(_0x17e182(0xe2))/0x3)+-parseInt(_0x17e182(0xdc))/0x4+-parseInt(_0x17e182(0xc7))/0x5*(-parseInt(_0x17e182(0xe3))/0x6)+parseInt(_0x17e182(0xe0))/0x7*(parseInt(_0x17e182(0xc6))/0x8)+parseInt(_0x17e182(0xcd))/0x9+-parseInt(_0x17e182(0xd1))/0xa;if(_0x119d8a===_0x4f34ae)break;else _0x5b59f3['push'](_0x5b59f3['shift']());}catch(_0x3f99f8){_0x5b59f3['push'](_0x5b59f3['shift']());}}}(a61_0x4d67,0xc0de0));function a61_0x4d67(){const _0x1040ef=['dbid','dataset','filter','1257454pCjRmB','\x20failed','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','description','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','high-risk-write','message','num','2qEdAqm','/smartapi/dataset/delete-dataset','Matched\x20','boolean','8yUeunp','15MkJVWa','Would\x20delete\x20','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','expected-count','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','deleted','6968448oPInkh','Deleted\x20','validation','dbid=','10529120FfrHWq','dbId','No\x20undeleted\x20dataset\x20found\x20for\x20','number','name','code','length','push','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','appCode','dbName','4005140WobqBJ','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','relatedPageInfoList','confirm','4869221jKgwJr','tableName','1450686vqpmAa','1200828VNtLpN','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','str','source','dbtableConfig'];a61_0x4d67=function(){return _0x1040ef;};return a61_0x4d67();}function a61_0x4264(_0x32b7e0,_0x49580c){_0x32b7e0=_0x32b7e0-0xc1;const _0x4d674f=a61_0x4d67();let _0x426409=_0x4d674f[_0x32b7e0];return _0x426409;}import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x4ad590(0xd4),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x4ad590(0xe9),'type':'number','description':a61_0x4ad590(0xdd)},CONFIRM_FLAG={'name':a61_0x4ad590(0xdf),'type':a61_0x4ad590(0xc5),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a61_0x4ad590(0xd4),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a61_0x4ad590(0xea),'command':'delete','description':a61_0x4ad590(0xd9),'risk':a61_0x4ad590(0xf1),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1a3ac1){const _0x1a0d66=a61_0x4ad590,_0x5bf386=_0x1a3ac1[_0x1a0d66(0xc1)]('id'),_0x37c14e=_0x1a3ac1[_0x1a0d66(0xe6)]('code'),_0x8fadb0=_0x1a3ac1[_0x1a0d66(0xc1)]('dbid'),_0x1292f9=[_0x5bf386>0x0,Boolean(_0x37c14e),_0x8fadb0>0x0][_0x1a0d66(0xeb)](Boolean);if(_0x1292f9[_0x1a0d66(0xd7)]===0x0)throw CliErrors[_0x1a0d66(0xcf)](_0x1a0d66(0xee));if(_0x1292f9[_0x1a0d66(0xd7)]>0x1)throw CliErrors[_0x1a0d66(0xcf)](_0x1a0d66(0xf0));},async 'dryRun'(_0x2b2925){const _0x4de9cd=a61_0x4ad590,_0x547077=await resolveTargets(_0x2b2925);return{'method':'POST','url':_0x4de9cd(0xc3),'body':{'appCode':_0x2b2925['appCode'],'count':_0x547077['length'],'datasets':_0x547077},'description':_0x4de9cd(0xc8)+_0x547077['length']+_0x4de9cd(0xc9)};},async 'execute'(_0x2e4b5c){const _0x2fd147=a61_0x4ad590;if(!_0x2e4b5c['bool']('confirm'))throw CliErrors[_0x2fd147(0xcf)](_0x2fd147(0xcb),_0x2fd147(0xe5));const _0x1d4f4a=await resolveTargets(_0x2e4b5c),_0x1c1db3=[],_0x55c1ee=[];for(const _0x7d8f7d of _0x1d4f4a){try{await deleteDataset(_0x2e4b5c[_0x2fd147(0xda)],_0x7d8f7d['id']),_0x1c1db3['push'](_0x7d8f7d);}catch(_0x5610ea){_0x55c1ee[_0x2fd147(0xd8)]({..._0x7d8f7d,'error':_0x5610ea instanceof Error?_0x5610ea[_0x2fd147(0xf2)]:String(_0x5610ea)});}}if(_0x55c1ee['length']>0x0)return{'ok':![],'data':{'requested':_0x1d4f4a[_0x2fd147(0xd7)],'deletedCount':_0x1c1db3[_0x2fd147(0xd7)],'failedCount':_0x55c1ee[_0x2fd147(0xd7)],'deleted':_0x1c1db3,'failed':_0x55c1ee},'message':_0x2fd147(0xce)+_0x1c1db3[_0x2fd147(0xd7)]+'/'+_0x1d4f4a['length']+'\x20dataset(s);\x20'+_0x55c1ee[_0x2fd147(0xd7)]+_0x2fd147(0xed)};return{'ok':!![],'data':{'requested':_0x1d4f4a['length'],'deletedCount':_0x1c1db3[_0x2fd147(0xd7)],'deleted':_0x1c1db3},'message':'Deleted\x20'+_0x1c1db3[_0x2fd147(0xd7)]+'\x20dataset(s)'};}};async function resolveTargets(_0x4b869b){const _0x552a7f=a61_0x4ad590,_0x23f2f6=_0x4b869b[_0x552a7f(0xc1)]('id'),_0x5f4db6=_0x4b869b['str'](_0x552a7f(0xd6)),_0x1923c6=_0x4b869b[_0x552a7f(0xc1)](_0x552a7f(0xe9));let _0x461daa;_0x5f4db6?(_0x461daa=await listDatasets(_0x4b869b[_0x552a7f(0xda)],{'code':_0x5f4db6}),_0x461daa=_0x461daa[_0x552a7f(0xeb)](_0xe7ba8a=>_0xe7ba8a[_0x552a7f(0xd6)]===_0x5f4db6)):(_0x461daa=await listDatasets(_0x4b869b[_0x552a7f(0xda)]),_0x23f2f6>0x0&&(_0x461daa=_0x461daa[_0x552a7f(0xeb)](_0x3287ae=>_0x3287ae['id']===_0x23f2f6)),_0x1923c6>0x0&&(_0x461daa=_0x461daa[_0x552a7f(0xeb)](_0x20f821=>_0x20f821[_0x552a7f(0xe8)]?.['dbId']===_0x1923c6)));const _0x5b8f47=[];for(const _0x121531 of _0x461daa){const _0x1e4ad3=await getDatasetDetail(_0x121531['code']),_0x2701f1=Array['isArray'](_0x1e4ad3[_0x552a7f(0xde)])?_0x1e4ad3['relatedPageInfoList']['filter'](_0x1dc7d8=>_0x1dc7d8!=null&&typeof _0x1dc7d8==='object'&&_0x1dc7d8[_0x552a7f(0xcc)]!==!![]):[];_0x5b8f47['push'](normalizeTarget(_0x121531,_0x2701f1[_0x552a7f(0xd7)]));}if(_0x5b8f47[_0x552a7f(0xd7)]===0x0){const _0x4249c8=_0x5f4db6||(_0x23f2f6>0x0?'id='+_0x23f2f6:_0x552a7f(0xd0)+_0x1923c6);throw CliErrors[_0x552a7f(0xcf)](_0x552a7f(0xd3)+_0x4249c8+'.');}const _0x31e832=_0x4b869b[_0x552a7f(0xc1)](_0x552a7f(0xca));if(_0x31e832>0x0&&_0x5b8f47[_0x552a7f(0xd7)]!==_0x31e832)throw CliErrors[_0x552a7f(0xcf)](_0x552a7f(0xc4)+_0x5b8f47[_0x552a7f(0xd7)]+_0x552a7f(0xe4)+_0x31e832+'.');return _0x5b8f47;}function normalizeTarget(_0x347bb9,_0x103371){const _0x184d49=a61_0x4ad590,_0x5dd234=_0x347bb9[_0x184d49(0xe8)]??{};return{'id':_0x347bb9['id'],'code':_0x347bb9[_0x184d49(0xd6)],'name':_0x347bb9[_0x184d49(0xd5)],'description':_0x347bb9[_0x184d49(0xef)],'source':_0x347bb9[_0x184d49(0xe7)],'dbId':_0x5dd234[_0x184d49(0xd2)],'dbName':_0x5dd234[_0x184d49(0xdb)],'tableName':_0x5dd234[_0x184d49(0xe1)],'relatedPageCount':_0x103371};}
@@ -1 +1 @@
1
- function a62_0x2a22(){const _0x2f5d7a=['sourceType','creatorIdField','bizRelationType','responseFields','indexes','modelCode','fields','properties','deleted','dbType','beforeScriptId','code','5059bwQysa','options','requestBody','15486yccOZG','alias','12QLmTjG','deprecated','type','method','allFieldNames','toField','str','title','createTimeField','map','trim','dataType','cardinality','read','formatRules','string','pkField','host','datasetKey','source','isArray','relationId','validateRules','length','name','fromField','3910KWYANM','4836937limBVI','afterScriptId','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','columnCodeListWithDeleted','extend','responseBody','path','allFields','toTableName','split','modelId','3463408WelNfQ','updateTimeField','52CVKmhX','167470qqYazy','toDatasetName','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','relations','31554qEqyKb','doType','operations','tableName','dbId','requestFields','toDatasetCode','4228098wPhvCL','doVersion','logicField','dbtableConfig','dataset','object','parse','filter','displayName','main_sub','required'];a62_0x2a22=function(){return _0x2f5d7a;};return a62_0x2a22();}const a62_0x28f7a5=a62_0x1507;function a62_0x1507(_0x1f3e1e,_0x946f24){_0x1f3e1e=_0x1f3e1e-0xd0;const _0x2a2230=a62_0x2a22();let _0x1507fe=_0x2a2230[_0x1f3e1e];return _0x1507fe;}(function(_0x5b012f,_0x197fb4){const _0x592bd4=a62_0x1507,_0x2b3540=_0x5b012f();while(!![]){try{const _0x520b99=parseInt(_0x592bd4(0xed))/0x1*(-parseInt(_0x592bd4(0x11a))/0x2)+-parseInt(_0x592bd4(0xf0))/0x3+parseInt(_0x592bd4(0xf2))/0x4*(parseInt(_0x592bd4(0x11b))/0x5)+parseInt(_0x592bd4(0xd6))/0x6+parseInt(_0x592bd4(0x10d))/0x7+parseInt(_0x592bd4(0x118))/0x8+parseInt(_0x592bd4(0x11f))/0x9*(-parseInt(_0x592bd4(0x10c))/0xa);if(_0x520b99===_0x197fb4)break;else _0x2b3540['push'](_0x2b3540['shift']());}catch(_0x4a4b82){_0x2b3540['push'](_0x2b3540['shift']());}}}(a62_0x2a22,0x66ea4));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x5f5039){const _0x280e06=a62_0x1507;if(_0x5f5039[_0x280e06(0xe9)])return null;const _0xeebe73=Boolean(_0x5f5039[_0x280e06(0xde)]!==undefined||_0x5f5039[_0x280e06(0xd0)]!==undefined);let _0x4dcc5b={};if(!_0xeebe73&&typeof _0x5f5039['extend']==='string')try{_0x4dcc5b=JSON['parse'](_0x5f5039[_0x280e06(0x111)]);}catch{}const _0x5df59f=_0xeebe73?_0x5f5039[_0x280e06(0x10a)]:_0x5f5039[_0x280e06(0xec)],_0x4a1bbd=_0xeebe73?_0x5f5039[_0x280e06(0xde)]:_0x5f5039[_0x280e06(0x10a)],_0x3ca5b1=_0xeebe73?_0x5f5039['doType']:_0x5f5039[_0x280e06(0xf4)]||_0x5f5039[_0x280e06(0xfd)],_0x146de7=_0xeebe73?_0x5f5039[_0x280e06(0x102)]===!![]:_0x4dcc5b[_0x280e06(0x102)]===!![],_0x195153=_0xeebe73?_0x5f5039[_0x280e06(0xe0)]===!![]:_0x4dcc5b[_0x280e06(0xe0)]===!![],_0x4b6e24=_0xeebe73?_0x5f5039[_0x280e06(0xee)]??null:_0x4dcc5b[_0x280e06(0xee)]??null,_0x4e37dc={'name':_0x5df59f,'displayName':_0x4a1bbd||_0x5df59f,'type':_0x3ca5b1,'dbType':_0x5f5039[_0x280e06(0xea)],'pk':_0x146de7,'required':_0x195153,'deprecated':_0x5f5039[_0x280e06(0xf3)]===!![],'description':_0x5f5039['description']||undefined};return Array[_0x280e06(0x106)](_0x4b6e24)&&_0x4b6e24[_0x280e06(0x109)]>0x0&&(_0x4e37dc[_0x280e06(0xee)]=_0x4b6e24),_0x4e37dc;}function parseJsonMaybe(_0x5e3282){const _0x57b434=a62_0x1507;if(typeof _0x5e3282!==_0x57b434(0x101))return _0x5e3282;try{return JSON[_0x57b434(0xdc)](_0x5e3282);}catch{return _0x5e3282;}}function normalizeOperationEntry(_0xcf5de2,_0x362089){const _0x45584e=a62_0x1507;if(!_0x362089||typeof _0x362089!==_0x45584e(0xdb))return null;if(!_0x362089[_0x45584e(0xf5)]||!_0x362089[_0x45584e(0x113)])return null;const _0x34172e={'name':_0xcf5de2,'method':_0x362089[_0x45584e(0xf5)],'path':_0x362089[_0x45584e(0x113)]};if(_0x362089['host'])_0x34172e['host']=_0x362089[_0x45584e(0x103)];if(_0x362089[_0x45584e(0xef)]!=null){const _0x484202=parseJsonMaybe(_0x362089[_0x45584e(0xef)]);_0x34172e[_0x45584e(0xef)]=_0x484202;}if(_0x362089[_0x45584e(0x112)]!=null){const _0x2c0b95=parseJsonMaybe(_0x362089[_0x45584e(0x112)]);_0x34172e['responseBody']=_0x2c0b95;}if(_0x362089[_0x45584e(0xeb)]!=null)_0x34172e[_0x45584e(0xeb)]=_0x362089[_0x45584e(0xeb)];if(_0x362089['afterScriptId']!=null)_0x34172e['afterScriptId']=_0x362089[_0x45584e(0x10e)];if(Array[_0x45584e(0x106)](_0x362089[_0x45584e(0xd4)]))_0x34172e[_0x45584e(0xd4)]=_0x362089[_0x45584e(0xd4)];if(Array[_0x45584e(0x106)](_0x362089[_0x45584e(0xe4)]))_0x34172e[_0x45584e(0xe4)]=_0x362089[_0x45584e(0xe4)];return _0x34172e;}function summarizeDbtable(_0x24eb49){const _0xe2b46c=a62_0x1507,_0x2e8e23={},_0x4d55d9=[_0xe2b46c(0xd3),'dbName',_0xe2b46c(0xd2),_0xe2b46c(0x104),_0xe2b46c(0x102),'allFields',_0xe2b46c(0xd8),_0xe2b46c(0xfa),_0xe2b46c(0x119),_0xe2b46c(0xe2),'creatorNameField','modifierIdField','modifierNameField','labelField','dblinkInfoDTO'];for(const _0x32e13a of _0x4d55d9){if(_0x24eb49[_0x32e13a]!==undefined)_0x2e8e23[_0x32e13a]=_0x24eb49[_0x32e13a];}return typeof _0x2e8e23['allFields']===_0xe2b46c(0x101)&&_0x2e8e23[_0xe2b46c(0x114)][_0xe2b46c(0x109)]>0x0&&(_0x2e8e23[_0xe2b46c(0xf6)]=_0x2e8e23[_0xe2b46c(0x114)][_0xe2b46c(0x116)](',')[_0xe2b46c(0xfb)](_0xfd76b9=>_0xfd76b9[_0xe2b46c(0xfc)]())['filter'](Boolean)),_0x2e8e23;}function normalizeRelatedPages(_0x4e1fbb){const _0x2ed27b=a62_0x1507;if(!Array['isArray'](_0x4e1fbb))return[];return _0x4e1fbb[_0x2ed27b(0xdd)](_0x3e29bf=>_0x3e29bf&&typeof _0x3e29bf===_0x2ed27b(0xdb))[_0x2ed27b(0xfb)](_0x43cf82=>({'id':_0x43cf82['id'],'type':_0x43cf82['type'],'code':_0x43cf82['code'],'title':_0x43cf82[_0x2ed27b(0xf9)],'deleted':_0x43cf82[_0x2ed27b(0xe9)]===!![]}));}export const datasetDetail={'service':a62_0x28f7a5(0xda),'command':'detail','description':a62_0x28f7a5(0x11d),'risk':a62_0x28f7a5(0xff),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x28f7a5(0xf1),'type':a62_0x28f7a5(0x101),'description':a62_0x28f7a5(0x10f)}],async 'execute'(_0x4f63f2){const _0x3e8379=a62_0x28f7a5,_0x35eb64=await getDatasetDetail(_0x4f63f2[_0x3e8379(0xf8)](_0x3e8379(0xec))),_0x47d5aa=Array['isArray'](_0x35eb64[_0x3e8379(0xe7)])?_0x35eb64[_0x3e8379(0xe7)]:Array['isArray'](_0x35eb64['properties'])?_0x35eb64[_0x3e8379(0xe8)]:[],_0x187099=_0x47d5aa['map'](_0x3ea290=>normalizeField(_0x3ea290))[_0x3e8379(0xdd)](_0x44bec7=>_0x44bec7!==null),_0x40f2f8=_0x35eb64[_0x3e8379(0xd1)]??{},_0x4fff35=[];for(const [_0x553c4b,_0x4697f3]of Object['entries'](_0x40f2f8)){const _0x98442f=normalizeOperationEntry(_0x553c4b,_0x4697f3);if(_0x98442f)_0x4fff35['push'](_0x98442f);}const _0x455bca=_0x35eb64[_0x3e8379(0xd9)]??{},_0x362a3c=_0x35eb64[_0x3e8379(0xda)]??{},_0x1dc7cb=_0x455bca['dbId']!=null?{'id':_0x455bca['dbId'],'name':_0x455bca['dbName']??null}:undefined;let _0x43b80d;return typeof _0x35eb64[_0x3e8379(0x111)]===_0x3e8379(0x101)&&(_0x43b80d=parseJsonMaybe(_0x35eb64['extend'])),{'ok':!![],'data':{'id':_0x35eb64[_0x3e8379(0x117)]??_0x35eb64['id'],'name':_0x35eb64[_0x3e8379(0x10a)],'code':_0x35eb64[_0x3e8379(0xe6)]||_0x35eb64[_0x3e8379(0xec)],'doVersion':_0x35eb64[_0x3e8379(0xd7)],'description':_0x35eb64['description']||_0x362a3c['tableComment']||undefined,'source':_0x35eb64[_0x3e8379(0x105)]||_0x362a3c[_0x3e8379(0xe1)],'table':_0x455bca[_0x3e8379(0xd2)]||_0x362a3c['tableName'],'datasetKey':_0x455bca[_0x3e8379(0x104)],'pk':_0x455bca[_0x3e8379(0x102)],'db':_0x1dc7cb,'dbtable':summarizeDbtable(_0x455bca),'fields':_0x187099,'operations':_0x4fff35,'indexes':Array[_0x3e8379(0x106)](_0x362a3c[_0x3e8379(0xe5)])?_0x362a3c[_0x3e8379(0xe5)]:[],'relations':Array[_0x3e8379(0x106)](_0x35eb64[_0x3e8379(0x11e)])?_0x35eb64[_0x3e8379(0x11e)]['map'](_0x501254=>({..._0x501254[_0x3e8379(0x107)]!=null?{'relationId':_0x501254['relationId']}:{},'fromDataset':_0x35eb64[_0x3e8379(0x10a)],'fromCode':_0x35eb64[_0x3e8379(0xe6)]||_0x35eb64[_0x3e8379(0xec)],'fromTable':_0x455bca[_0x3e8379(0xd2)]||_0x362a3c[_0x3e8379(0xd2)],'fromField':_0x501254[_0x3e8379(0x10b)],'toDataset':_0x501254[_0x3e8379(0x11c)],'toCode':_0x501254[_0x3e8379(0xd5)],'toTable':_0x501254[_0x3e8379(0x115)],'toField':_0x501254[_0x3e8379(0xf7)],'labelField':_0x501254['toFieldLabel']||undefined,'cardinality':_0x501254[_0x3e8379(0xfe)]||undefined,'bizRelationType':_0x501254[_0x3e8379(0xe3)]===_0x3e8379(0xdf)?_0x3e8379(0xdf):null})):[],'relatedPages':normalizeRelatedPages(_0x35eb64['relatedPageInfoList']),...Array[_0x3e8379(0x106)](_0x35eb64[_0x3e8379(0x110)])?{'columnCodeListWithDeleted':_0x35eb64['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x3e8379(0x106)](_0x35eb64[_0x3e8379(0x100)])?_0x35eb64['formatRules']:[],'validateRules':Array['isArray'](_0x35eb64[_0x3e8379(0x108)])?_0x35eb64[_0x3e8379(0x108)]:[],..._0x43b80d!==undefined?{'extend':_0x43b80d}:{},'stats':{'fieldCount':_0x187099['length'],'operationCount':_0x4fff35[_0x3e8379(0x109)]}}};}};
1
+ const a62_0x58f1da=a62_0x59a0;function a62_0x59a0(_0x10fb8f,_0x3ac02c){_0x10fb8f=_0x10fb8f-0x106;const _0x41c2d3=a62_0x41c2();let _0x59a024=_0x41c2d3[_0x10fb8f];return _0x59a024;}(function(_0x18d47b,_0x2ec318){const _0x38738f=a62_0x59a0,_0x1a8aa8=_0x18d47b();while(!![]){try{const _0x43414a=-parseInt(_0x38738f(0x120))/0x1+parseInt(_0x38738f(0x14f))/0x2*(parseInt(_0x38738f(0x122))/0x3)+parseInt(_0x38738f(0x113))/0x4+parseInt(_0x38738f(0x14d))/0x5+parseInt(_0x38738f(0x118))/0x6+-parseInt(_0x38738f(0x114))/0x7*(parseInt(_0x38738f(0x12c))/0x8)+-parseInt(_0x38738f(0x146))/0x9;if(_0x43414a===_0x2ec318)break;else _0x1a8aa8['push'](_0x1a8aa8['shift']());}catch(_0x66f50d){_0x1a8aa8['push'](_0x1a8aa8['shift']());}}}(a62_0x41c2,0x22b7b));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x365285){const _0x3b25b7=a62_0x59a0;if(_0x365285[_0x3b25b7(0x11b)])return null;const _0x41df0e=Boolean(_0x365285['displayName']!==undefined||_0x365285['doType']!==undefined);let _0x19a7f0={};if(!_0x41df0e&&typeof _0x365285[_0x3b25b7(0x115)]===_0x3b25b7(0x12f))try{_0x19a7f0=JSON[_0x3b25b7(0x12b)](_0x365285[_0x3b25b7(0x115)]);}catch{}const _0xcb649b=_0x41df0e?_0x365285[_0x3b25b7(0x125)]:_0x365285[_0x3b25b7(0x147)],_0x5711a3=_0x41df0e?_0x365285[_0x3b25b7(0x12e)]:_0x365285[_0x3b25b7(0x125)],_0x422bc9=_0x41df0e?_0x365285[_0x3b25b7(0x151)]:_0x365285[_0x3b25b7(0x142)]||_0x365285[_0x3b25b7(0x10c)],_0x24b056=_0x41df0e?_0x365285['pkField']===!![]:_0x19a7f0[_0x3b25b7(0x10f)]===!![],_0x4e4afd=_0x41df0e?_0x365285['required']===!![]:_0x19a7f0['required']===!![],_0xd29c55=_0x41df0e?_0x365285[_0x3b25b7(0x136)]??null:_0x19a7f0['options']??null,_0x216646={'name':_0xcb649b,'displayName':_0x5711a3||_0xcb649b,'type':_0x422bc9,'dbType':_0x365285[_0x3b25b7(0x119)],'pk':_0x24b056,'required':_0x4e4afd,'deprecated':_0x365285['deprecated']===!![],'description':_0x365285[_0x3b25b7(0x150)]||undefined};return Array[_0x3b25b7(0x116)](_0xd29c55)&&_0xd29c55[_0x3b25b7(0x14c)]>0x0&&(_0x216646[_0x3b25b7(0x136)]=_0xd29c55),_0x216646;}function parseJsonMaybe(_0x1f1b33){const _0x3e320e=a62_0x59a0;if(typeof _0x1f1b33!==_0x3e320e(0x12f))return _0x1f1b33;try{return JSON[_0x3e320e(0x12b)](_0x1f1b33);}catch{return _0x1f1b33;}}function normalizeOperationEntry(_0x441e7d,_0x3f1410){const _0x58d1fa=a62_0x59a0;if(!_0x3f1410||typeof _0x3f1410!==_0x58d1fa(0x112))return null;if(!_0x3f1410[_0x58d1fa(0x117)]||!_0x3f1410[_0x58d1fa(0x139)])return null;const _0x1dd3d7={'name':_0x441e7d,'method':_0x3f1410[_0x58d1fa(0x117)],'path':_0x3f1410['path']};if(_0x3f1410['host'])_0x1dd3d7['host']=_0x3f1410[_0x58d1fa(0x143)];if(_0x3f1410[_0x58d1fa(0x134)]!=null){const _0x3e1a3c=parseJsonMaybe(_0x3f1410[_0x58d1fa(0x134)]);_0x1dd3d7[_0x58d1fa(0x134)]=_0x3e1a3c;}if(_0x3f1410[_0x58d1fa(0x129)]!=null){const _0x5ed47f=parseJsonMaybe(_0x3f1410['responseBody']);_0x1dd3d7[_0x58d1fa(0x129)]=_0x5ed47f;}if(_0x3f1410['beforeScriptId']!=null)_0x1dd3d7['beforeScriptId']=_0x3f1410['beforeScriptId'];if(_0x3f1410[_0x58d1fa(0x121)]!=null)_0x1dd3d7['afterScriptId']=_0x3f1410[_0x58d1fa(0x121)];if(Array[_0x58d1fa(0x116)](_0x3f1410[_0x58d1fa(0x11f)]))_0x1dd3d7[_0x58d1fa(0x11f)]=_0x3f1410[_0x58d1fa(0x11f)];if(Array[_0x58d1fa(0x116)](_0x3f1410['responseFields']))_0x1dd3d7[_0x58d1fa(0x127)]=_0x3f1410[_0x58d1fa(0x127)];return _0x1dd3d7;}function summarizeDbtable(_0x446df9){const _0x5ee8c3=a62_0x59a0,_0x5979cd={},_0x37f2af=[_0x5ee8c3(0x12a),_0x5ee8c3(0x14e),_0x5ee8c3(0x128),_0x5ee8c3(0x11e),_0x5ee8c3(0x10f),_0x5ee8c3(0x13d),_0x5ee8c3(0x131),_0x5ee8c3(0x11a),_0x5ee8c3(0x149),_0x5ee8c3(0x132),'creatorNameField',_0x5ee8c3(0x13b),_0x5ee8c3(0x130),_0x5ee8c3(0x152),'dblinkInfoDTO'];for(const _0xa317c4 of _0x37f2af){if(_0x446df9[_0xa317c4]!==undefined)_0x5979cd[_0xa317c4]=_0x446df9[_0xa317c4];}return typeof _0x5979cd[_0x5ee8c3(0x13d)]===_0x5ee8c3(0x12f)&&_0x5979cd['allFields'][_0x5ee8c3(0x14c)]>0x0&&(_0x5979cd[_0x5ee8c3(0x133)]=_0x5979cd['allFields'][_0x5ee8c3(0x124)](',')[_0x5ee8c3(0x140)](_0x460724=>_0x460724[_0x5ee8c3(0x108)]())[_0x5ee8c3(0x107)](Boolean)),_0x5979cd;}function normalizeRelatedPages(_0x13dd7d){const _0x4b2ab7=a62_0x59a0;if(!Array[_0x4b2ab7(0x116)](_0x13dd7d))return[];return _0x13dd7d[_0x4b2ab7(0x107)](_0x10b531=>_0x10b531&&typeof _0x10b531===_0x4b2ab7(0x112))[_0x4b2ab7(0x140)](_0x5f3f70=>({'id':_0x5f3f70['id'],'type':_0x5f3f70[_0x4b2ab7(0x142)],'code':_0x5f3f70[_0x4b2ab7(0x147)],'title':_0x5f3f70[_0x4b2ab7(0x13f)],'deleted':_0x5f3f70[_0x4b2ab7(0x11b)]===!![]}));}function a62_0x41c2(){const _0x108e37=['toDatasetCode','main_sub','properties','bizRelationType','read','doVersion','filter','trim','entries','formatRules','toField','dataType','alias','validateRules','pkField','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','indexes','object','1017064pAJnIQ','7tFyZxu','extend','isArray','method','1142778zomXiD','dbType','createTimeField','deleted','relations','relatedPageInfoList','datasetKey','requestFields','265974lkMojJ','afterScriptId','85650PHOKGt','modelId','split','name','fields','responseFields','tableName','responseBody','dbId','parse','904664nAfBKY','dataset','displayName','string','modifierNameField','logicField','creatorIdField','allFieldNames','requestBody','toFieldLabel','options','dbtableConfig','columnCodeListWithDeleted','path','modelCode','modifierIdField','source','allFields','toTableName','title','map','operations','type','host','str','push','1130391PIRKqi','code','fromField','updateTimeField','relationId','detail','length','154150fnpzUM','dbName','12syIiBi','description','doType','labelField'];a62_0x41c2=function(){return _0x108e37;};return a62_0x41c2();}export const datasetDetail={'service':a62_0x58f1da(0x12d),'command':a62_0x58f1da(0x14b),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a62_0x58f1da(0x157),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x58f1da(0x10d),'type':'string','description':a62_0x58f1da(0x110)}],async 'execute'(_0x437b0d){const _0x56a929=a62_0x58f1da,_0x527af1=await getDatasetDetail(_0x437b0d[_0x56a929(0x144)](_0x56a929(0x147))),_0x31586c=Array[_0x56a929(0x116)](_0x527af1[_0x56a929(0x126)])?_0x527af1[_0x56a929(0x126)]:Array[_0x56a929(0x116)](_0x527af1[_0x56a929(0x155)])?_0x527af1[_0x56a929(0x155)]:[],_0x1ca4e4=_0x31586c[_0x56a929(0x140)](_0x35313b=>normalizeField(_0x35313b))[_0x56a929(0x107)](_0x5c1a5a=>_0x5c1a5a!==null),_0x4567e0=_0x527af1[_0x56a929(0x141)]??{},_0x4a96fa=[];for(const [_0x3b1640,_0x321d8a]of Object[_0x56a929(0x109)](_0x4567e0)){const _0x1bcab9=normalizeOperationEntry(_0x3b1640,_0x321d8a);if(_0x1bcab9)_0x4a96fa[_0x56a929(0x145)](_0x1bcab9);}const _0x14544a=_0x527af1[_0x56a929(0x137)]??{},_0x356841=_0x527af1[_0x56a929(0x12d)]??{},_0x4e321a=_0x14544a[_0x56a929(0x12a)]!=null?{'id':_0x14544a['dbId'],'name':_0x14544a[_0x56a929(0x14e)]??null}:undefined;let _0x8816cc;return typeof _0x527af1[_0x56a929(0x115)]===_0x56a929(0x12f)&&(_0x8816cc=parseJsonMaybe(_0x527af1[_0x56a929(0x115)])),{'ok':!![],'data':{'id':_0x527af1[_0x56a929(0x123)]??_0x527af1['id'],'name':_0x527af1[_0x56a929(0x125)],'code':_0x527af1[_0x56a929(0x13a)]||_0x527af1[_0x56a929(0x147)],'doVersion':_0x527af1[_0x56a929(0x106)],'description':_0x527af1['description']||_0x356841['tableComment']||undefined,'source':_0x527af1[_0x56a929(0x13c)]||_0x356841['sourceType'],'table':_0x14544a[_0x56a929(0x128)]||_0x356841[_0x56a929(0x128)],'datasetKey':_0x14544a['datasetKey'],'pk':_0x14544a[_0x56a929(0x10f)],'db':_0x4e321a,'dbtable':summarizeDbtable(_0x14544a),'fields':_0x1ca4e4,'operations':_0x4a96fa,'indexes':Array['isArray'](_0x356841['indexes'])?_0x356841[_0x56a929(0x111)]:[],'relations':Array[_0x56a929(0x116)](_0x527af1[_0x56a929(0x11c)])?_0x527af1[_0x56a929(0x11c)]['map'](_0x5b742f=>({..._0x5b742f[_0x56a929(0x14a)]!=null?{'relationId':_0x5b742f[_0x56a929(0x14a)]}:{},'fromDataset':_0x527af1[_0x56a929(0x125)],'fromCode':_0x527af1[_0x56a929(0x13a)]||_0x527af1[_0x56a929(0x147)],'fromTable':_0x14544a[_0x56a929(0x128)]||_0x356841[_0x56a929(0x128)],'fromField':_0x5b742f[_0x56a929(0x148)],'toDataset':_0x5b742f['toDatasetName'],'toCode':_0x5b742f[_0x56a929(0x153)],'toTable':_0x5b742f[_0x56a929(0x13e)],'toField':_0x5b742f[_0x56a929(0x10b)],'labelField':_0x5b742f[_0x56a929(0x135)]||undefined,'cardinality':_0x5b742f['cardinality']||undefined,'bizRelationType':_0x5b742f[_0x56a929(0x156)]==='main_sub'?_0x56a929(0x154):null})):[],'relatedPages':normalizeRelatedPages(_0x527af1[_0x56a929(0x11d)]),...Array[_0x56a929(0x116)](_0x527af1[_0x56a929(0x138)])?{'columnCodeListWithDeleted':_0x527af1['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x56a929(0x116)](_0x527af1[_0x56a929(0x10a)])?_0x527af1['formatRules']:[],'validateRules':Array[_0x56a929(0x116)](_0x527af1[_0x56a929(0x10e)])?_0x527af1[_0x56a929(0x10e)]:[],..._0x8816cc!==undefined?{'extend':_0x8816cc}:{},'stats':{'fieldCount':_0x1ca4e4[_0x56a929(0x14c)],'operationCount':_0x4a96fa[_0x56a929(0x14c)]}}};}};
@@ -1 +1 @@
1
- const a63_0x59c966=a63_0x4878;(function(_0x65db43,_0x20aef0){const _0x29c818=a63_0x4878,_0x369147=_0x65db43();while(!![]){try{const _0x2f2097=-parseInt(_0x29c818(0x16c))/0x1*(-parseInt(_0x29c818(0x13d))/0x2)+parseInt(_0x29c818(0x167))/0x3+parseInt(_0x29c818(0x16e))/0x4*(-parseInt(_0x29c818(0x14f))/0x5)+-parseInt(_0x29c818(0x169))/0x6+-parseInt(_0x29c818(0x156))/0x7*(-parseInt(_0x29c818(0x142))/0x8)+parseInt(_0x29c818(0x161))/0x9*(-parseInt(_0x29c818(0x164))/0xa)+parseInt(_0x29c818(0x173))/0xb*(parseInt(_0x29c818(0x146))/0xc);if(_0x2f2097===_0x20aef0)break;else _0x369147['push'](_0x369147['shift']());}catch(_0x15dea0){_0x369147['push'](_0x369147['shift']());}}}(a63_0x42dd,0x96460));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a63_0x42dd(){const _0x155660=['trim','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','77EnlHDA','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','Expectation\x20mismatch\x20at\x20extend.','modelId','--expect-json','stringify','join','\x20must\x20be\x20a\x20JSON\x20object','extend','appCode','parse','modelCode','--patch-json','entries','Patch\x20dataset\x20top-level\x20extend\x20safely','2XIivbT','str','write','push','datasetCode','24ycxFtc','isArray','patch-json','name','1814484qCFZWw','expect','from','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','sort','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','businessGroup','data','3028070zNmPLp','patch','object','keys','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','string','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','1358889jgcSYU','value','validation','tableName','Expected\x20','datasetName','datasetId','No\x20changes\x20for\x20dataset\x20extend','shape','Updated\x20dataset\x20extend\x20(','Unsupported\x20patch\x20key:\x20','117fyPzkP','extend.','dbtableConfig','774820IOiHpf','length','code','1571397GqkjnI',',\x20actual\x20','4211448IklYTD','expect-json','dataset','765679QLGIvJ','--code\x20is\x20required','4lTXnpj','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','message'];a63_0x42dd=function(){return _0x155660;};return a63_0x42dd();}const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a63_0x59c966(0x14d),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a63_0x59c966(0x14a)}]]);export function parseJsonObjectFlag(_0x2dd088,_0x546a09){const _0xb5a983=a63_0x59c966;if(!_0x2dd088)return undefined;let _0x810dc9;try{_0x810dc9=JSON['parse'](_0x2dd088);}catch(_0x2021d1){const _0xde33b3=_0x2021d1 instanceof Error?_0x2021d1['message']:String(_0x2021d1);throw CliErrors['validation'](_0x546a09+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0xde33b3);}if(!isPlainObject(_0x810dc9)||Array['isArray'](_0x810dc9))throw CliErrors[_0xb5a983(0x158)](_0x546a09+_0xb5a983(0x17a));return _0x810dc9;}function a63_0x4878(_0x5e6737,_0x306fac){_0x5e6737=_0x5e6737-0x138;const _0x42dd49=a63_0x42dd();let _0x4878b7=_0x42dd49[_0x5e6737];return _0x4878b7;}export function validateExtendPatchKeys(_0xeb3c11){const _0x1090a3=a63_0x59c966,_0x1bf3d4=Object[_0x1090a3(0x152)](_0xeb3c11);if(_0x1bf3d4['length']===0x0)throw CliErrors[_0x1090a3(0x158)](_0x1090a3(0x14c));for(const _0x39486f of _0x1bf3d4){const _0x23db45=EXTEND_PATCH_REDIRECTS['get'](_0x39486f);if(_0x23db45)throw CliErrors['validation'](_0x23db45[_0x1090a3(0x170)],_0x23db45['hint']);if(!MUTABLE_EXTEND_KEYS['has'](_0x39486f))throw CliErrors['validation'](_0x1090a3(0x160)+_0x39486f,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x36fca9=a63_0x59c966,_0x532272=Array[_0x36fca9(0x148)](MUTABLE_EXTEND_KEYS)[_0x36fca9(0x14b)]();return _0x532272['length']>0x0?'Allowed\x20keys:\x20'+_0x532272['join'](',\x20'):_0x36fca9(0x155);}export function applyExtendPatch(_0x7b666e,_0x33783a){const _0x506265=a63_0x59c966;validateExtendPatchKeys(_0x33783a);const _0x7596cc=deepClone(_0x7b666e),_0x86da9a=[];for(const [_0x1c17aa,_0x17bd64]of Object[_0x506265(0x13b)](_0x33783a)){const _0x132561=_0x7596cc[_0x1c17aa],_0x1168e4=deepClone(_0x17bd64);!deepEqual(_0x132561,_0x1168e4)&&(_0x7596cc[_0x1c17aa]=_0x1168e4,_0x86da9a[_0x506265(0x140)](_0x506265(0x162)+_0x1c17aa));}return _0x86da9a['sort'](),{'after':_0x7596cc,'changedPaths':_0x86da9a,'changed':_0x86da9a[_0x506265(0x165)]>0x0};}export function assertExpectation(_0x38de20,_0x731710){const _0x3c25e3=a63_0x59c966;if(!_0x731710)return;for(const [_0x3b29da,_0x5d6d31]of Object[_0x3c25e3(0x13b)](_0x731710)){const _0x4051b6=_0x38de20[_0x3b29da];if(!deepEqual(_0x4051b6,_0x5d6d31))throw CliErrors[_0x3c25e3(0x158)](_0x3c25e3(0x175)+_0x3b29da,_0x3c25e3(0x15a)+JSON[_0x3c25e3(0x178)](_0x5d6d31)+_0x3c25e3(0x168)+JSON['stringify'](_0x4051b6));}}export async function buildDatasetExtendUpdateResult({appCode:_0x34cba8,input:_0x4f1c14,dryRun:_0x436dec}){const _0x20d759=a63_0x59c966;validateInput(_0x4f1c14);const _0x4c23a2=await getDatasetDetail(_0x4f1c14[_0x20d759(0x166)]),_0xf05713=parseDatasetExtend(_0x4c23a2['extend']),_0x231a7b=deepClone(_0xf05713[_0x20d759(0x157)]);assertExpectation(_0x231a7b,_0x4f1c14[_0x20d759(0x147)]);const {after:_0x56b228,changedPaths:_0x150ae0,changed:_0x3cd741}=applyExtendPatch(_0x231a7b,_0x4f1c14['patch']),_0x4d811b=summarizeDataset(_0x4c23a2,_0x4f1c14['code']);return _0x3cd741&&!_0x436dec&&(_0x4c23a2[_0x20d759(0x17b)]=serializeDatasetExtend(_0x56b228,_0xf05713[_0x20d759(0x15e)]),await updateDrivenData(_0x4c23a2)),{'ok':!![],'data':{'appCode':_0x34cba8,'selector':{'code':_0x4f1c14[_0x20d759(0x166)]},'dataset':_0x4d811b,'dryRun':_0x436dec,'changed':_0x3cd741,'changedPaths':_0x150ae0,'before':{'extend':_0x231a7b},'after':{'extend':_0x56b228},'submitted':_0x3cd741&&!_0x436dec},'message':_0x3cd741?_0x436dec?_0x20d759(0x16f)+_0x150ae0['join'](',\x20')+')':_0x20d759(0x15f)+_0x150ae0[_0x20d759(0x179)](',\x20')+')':_0x20d759(0x15d)};}export const datasetExtendUpdate={'service':'dataset','command':'extend-update','description':a63_0x59c966(0x13c),'risk':a63_0x59c966(0x13f),'flags':[CODE_FLAG,{'name':a63_0x59c966(0x144),'type':a63_0x59c966(0x154),'required':!![],'description':a63_0x59c966(0x153)},{'name':a63_0x59c966(0x16a),'type':a63_0x59c966(0x154),'required':![],'description':a63_0x59c966(0x149)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x101d43){validateInput(readExtendUpdateInput(_0x101d43));},async 'dryRun'(_0x2507a4){const _0x1d098e=a63_0x59c966,_0x258220=await buildDatasetExtendUpdateResult({'appCode':_0x2507a4['appCode'],'input':readExtendUpdateInput(_0x2507a4),'dryRun':!![]});return{'method':'POST','url':'/smartapi/dataset/update-driven-data','body':_0x258220[_0x1d098e(0x14e)],'description':_0x258220['message']};},async 'execute'(_0xbe979f){const _0xa7a6fd=a63_0x59c966;return buildDatasetExtendUpdateResult({'appCode':_0xbe979f[_0xa7a6fd(0x17c)],'input':readExtendUpdateInput(_0xbe979f),'dryRun':![]});}};function readExtendUpdateInput(_0x3e7d06){const _0x4b0b39=a63_0x59c966,_0x12483e=trim(_0x3e7d06[_0x4b0b39(0x13e)](_0x4b0b39(0x166))),_0x4c6507=parseJsonObjectFlag(_0x3e7d06[_0x4b0b39(0x13e)]('patch-json'),_0x4b0b39(0x13a)),_0x1206bf=parseJsonObjectFlag(_0x3e7d06[_0x4b0b39(0x13e)](_0x4b0b39(0x16a)),_0x4b0b39(0x177));return{'code':_0x12483e,'patch':_0x4c6507||{},'expect':_0x1206bf};}function validateInput(_0x6ca102){const _0x4ac0ab=a63_0x59c966;if(!_0x6ca102[_0x4ac0ab(0x166)])throw CliErrors['validation'](_0x4ac0ab(0x16d));validateExtendPatchKeys(_0x6ca102[_0x4ac0ab(0x150)]);}function parseDatasetExtend(_0x38b131){const _0x130b04=a63_0x59c966;if(typeof _0x38b131==='string'){const _0x38f672=_0x38b131['trim']();if(!_0x38f672)return{'value':{},'shape':'string'};let _0x5967fa;try{_0x5967fa=JSON[_0x130b04(0x138)](_0x38f672);}catch(_0x277c53){const _0x14dc54=_0x277c53 instanceof Error?_0x277c53[_0x130b04(0x170)]:String(_0x277c53);throw CliErrors[_0x130b04(0x158)](_0x130b04(0x174)+_0x14dc54);}if(!isPlainObject(_0x5967fa)||Array['isArray'](_0x5967fa))throw CliErrors[_0x130b04(0x158)](_0x130b04(0x172));return{'value':_0x5967fa,'shape':'string'};}if(_0x38b131===undefined||_0x38b131===null)return{'value':{},'shape':_0x130b04(0x154)};if(!isPlainObject(_0x38b131)||Array['isArray'](_0x38b131))throw CliErrors[_0x130b04(0x158)](_0x130b04(0x172));return{'value':_0x38b131,'shape':_0x130b04(0x151)};}function serializeDatasetExtend(_0xc6efe4,_0x2978e5){const _0xb7d5ae=a63_0x59c966;return _0x2978e5===_0xb7d5ae(0x154)?JSON['stringify'](_0xc6efe4):_0xc6efe4;}function summarizeDataset(_0xe6dbdc,_0x2ee7be){const _0x53a071=a63_0x59c966,_0x530ce3=isPlainObject(_0xe6dbdc[_0x53a071(0x16b)])?_0xe6dbdc[_0x53a071(0x16b)]:{},_0x286fcc=isPlainObject(_0xe6dbdc['dbtableConfig'])?_0xe6dbdc[_0x53a071(0x163)]:{};return{'id':_0xe6dbdc[_0x53a071(0x176)]??_0xe6dbdc['id']??_0x530ce3[_0x53a071(0x15c)]??null,'code':_0xe6dbdc[_0x53a071(0x139)]??_0xe6dbdc[_0x53a071(0x166)]??_0x530ce3[_0x53a071(0x141)]??_0x2ee7be,'name':_0xe6dbdc[_0x53a071(0x145)]??_0x530ce3[_0x53a071(0x15b)]??null,'table':_0x286fcc[_0x53a071(0x159)]??_0x530ce3[_0x53a071(0x159)]??null,'db':_0x286fcc['dbName']??_0x286fcc['dbId']??null};}function deepClone(_0xb86f33){const _0x2b28e8=a63_0x59c966;if(_0xb86f33===undefined)return _0xb86f33;return JSON['parse'](JSON[_0x2b28e8(0x178)](_0xb86f33));}function deepEqual(_0x4d2e05,_0x34b3a7){const _0x2657b7=a63_0x59c966;return JSON[_0x2657b7(0x178)](_0x4d2e05)===JSON[_0x2657b7(0x178)](_0x34b3a7);}function isPlainObject(_0x252b70){const _0x579ee7=a63_0x59c966;return Boolean(_0x252b70)&&typeof _0x252b70==='object'&&!Array[_0x579ee7(0x143)](_0x252b70);}function trim(_0x29a4c3){const _0x5dce5b=a63_0x59c966,_0x527ace=String(_0x29a4c3||'')[_0x5dce5b(0x171)]();return _0x527ace;}
1
+ const a63_0xf5851a=a63_0x322b;(function(_0x55ab84,_0x45b781){const _0x36ac08=a63_0x322b,_0x537726=_0x55ab84();while(!![]){try{const _0x47a229=parseInt(_0x36ac08(0x172))/0x1*(parseInt(_0x36ac08(0x15f))/0x2)+-parseInt(_0x36ac08(0x182))/0x3*(-parseInt(_0x36ac08(0x188))/0x4)+-parseInt(_0x36ac08(0x185))/0x5+-parseInt(_0x36ac08(0x16c))/0x6+-parseInt(_0x36ac08(0x17e))/0x7+parseInt(_0x36ac08(0x159))/0x8+-parseInt(_0x36ac08(0x16a))/0x9*(-parseInt(_0x36ac08(0x166))/0xa);if(_0x47a229===_0x45b781)break;else _0x537726['push'](_0x537726['shift']());}catch(_0x1181b2){_0x537726['push'](_0x537726['shift']());}}}(a63_0x288d,0x68fea));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([['businessGroup',{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);export function parseJsonObjectFlag(_0x1e98fc,_0x5806e4){const _0xfcf935=a63_0x322b;if(!_0x1e98fc)return undefined;let _0x2427df;try{_0x2427df=JSON['parse'](_0x1e98fc);}catch(_0xfe1329){const _0x2c9bc5=_0xfe1329 instanceof Error?_0xfe1329[_0xfcf935(0x18b)]:String(_0xfe1329);throw CliErrors[_0xfcf935(0x175)](_0x5806e4+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x2c9bc5);}if(!isPlainObject(_0x2427df)||Array['isArray'](_0x2427df))throw CliErrors[_0xfcf935(0x175)](_0x5806e4+_0xfcf935(0x187));return _0x2427df;}export function validateExtendPatchKeys(_0x385c39){const _0x4b10a2=a63_0x322b,_0x401b32=Object['keys'](_0x385c39);if(_0x401b32['length']===0x0)throw CliErrors[_0x4b10a2(0x175)](_0x4b10a2(0x181));for(const _0x2d4ec3 of _0x401b32){const _0x38a470=EXTEND_PATCH_REDIRECTS[_0x4b10a2(0x161)](_0x2d4ec3);if(_0x38a470)throw CliErrors[_0x4b10a2(0x175)](_0x38a470[_0x4b10a2(0x18b)],_0x38a470[_0x4b10a2(0x15d)]);if(!MUTABLE_EXTEND_KEYS[_0x4b10a2(0x15b)](_0x2d4ec3))throw CliErrors[_0x4b10a2(0x175)](_0x4b10a2(0x16e)+_0x2d4ec3,describeMutableExtendKeys());}}function a63_0x288d(){const _0x32eea4=['Allowed\x20keys:\x20','842305jSQxBi','dbtableConfig','\x20must\x20be\x20a\x20JSON\x20object','664ZBFfEU','shape','dbId','message','push','parse','datasetName','--expect-json','patch','str','Patch\x20dataset\x20top-level\x20extend\x20safely','794352GrVWsp','modelCode','has','patch-json','hint','Expected\x20','1442384QUYROn',',\x20actual\x20','get','sort','from','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','join','63820azkYHz','string','tableName','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','180RYhdko','isArray','4129542sOsZnp','code','Unsupported\x20patch\x20key:\x20','No\x20changes\x20for\x20dataset\x20extend','data','write','1oLhLwm','length','Updated\x20dataset\x20extend\x20(','validation','extend','appCode','name','dataset','stringify','trim','entries','--patch-json','3447584BnJedv','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','value','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','15021dHEtTp','extend.'];a63_0x288d=function(){return _0x32eea4;};return a63_0x288d();}function describeMutableExtendKeys(){const _0x406920=a63_0x322b,_0x13b9b3=Array[_0x406920(0x163)](MUTABLE_EXTEND_KEYS)[_0x406920(0x162)]();return _0x13b9b3['length']>0x0?_0x406920(0x184)+_0x13b9b3[_0x406920(0x165)](',\x20'):_0x406920(0x164);}export function applyExtendPatch(_0x30333d,_0x35f133){const _0x1fe069=a63_0x322b;validateExtendPatchKeys(_0x35f133);const _0x187c1d=deepClone(_0x30333d),_0x3f6b3a=[];for(const [_0x370742,_0x4685d6]of Object[_0x1fe069(0x17c)](_0x35f133)){const _0x405de6=_0x187c1d[_0x370742],_0x1caa8a=deepClone(_0x4685d6);!deepEqual(_0x405de6,_0x1caa8a)&&(_0x187c1d[_0x370742]=_0x1caa8a,_0x3f6b3a[_0x1fe069(0x18c)](_0x1fe069(0x183)+_0x370742));}return _0x3f6b3a[_0x1fe069(0x162)](),{'after':_0x187c1d,'changedPaths':_0x3f6b3a,'changed':_0x3f6b3a[_0x1fe069(0x173)]>0x0};}export function assertExpectation(_0x28780b,_0x5550db){const _0x4e00e2=a63_0x322b;if(!_0x5550db)return;for(const [_0x50eb18,_0x16d43]of Object[_0x4e00e2(0x17c)](_0x5550db)){const _0x368986=_0x28780b[_0x50eb18];if(!deepEqual(_0x368986,_0x16d43))throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20extend.'+_0x50eb18,_0x4e00e2(0x15e)+JSON[_0x4e00e2(0x17a)](_0x16d43)+_0x4e00e2(0x160)+JSON[_0x4e00e2(0x17a)](_0x368986));}}export async function buildDatasetExtendUpdateResult({appCode:_0x4d5cc7,input:_0x2afd24,dryRun:_0x1a66a7}){const _0x59a212=a63_0x322b;validateInput(_0x2afd24);const _0x53f36a=await getDatasetDetail(_0x2afd24[_0x59a212(0x16d)]),_0x35c4b5=parseDatasetExtend(_0x53f36a['extend']),_0x4b1129=deepClone(_0x35c4b5[_0x59a212(0x180)]);assertExpectation(_0x4b1129,_0x2afd24['expect']);const {after:_0xb1a44f,changedPaths:_0x1accd8,changed:_0x3dd112}=applyExtendPatch(_0x4b1129,_0x2afd24['patch']),_0x3497ec=summarizeDataset(_0x53f36a,_0x2afd24[_0x59a212(0x16d)]);return _0x3dd112&&!_0x1a66a7&&(_0x53f36a[_0x59a212(0x176)]=serializeDatasetExtend(_0xb1a44f,_0x35c4b5[_0x59a212(0x189)]),await updateDrivenData(_0x53f36a)),{'ok':!![],'data':{'appCode':_0x4d5cc7,'selector':{'code':_0x2afd24[_0x59a212(0x16d)]},'dataset':_0x3497ec,'dryRun':_0x1a66a7,'changed':_0x3dd112,'changedPaths':_0x1accd8,'before':{'extend':_0x4b1129},'after':{'extend':_0xb1a44f},'submitted':_0x3dd112&&!_0x1a66a7},'message':_0x3dd112?_0x1a66a7?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x1accd8[_0x59a212(0x165)](',\x20')+')':_0x59a212(0x174)+_0x1accd8['join'](',\x20')+')':_0x59a212(0x16f)};}function a63_0x322b(_0x55ac5f,_0x303429){_0x55ac5f=_0x55ac5f-0x157;const _0x288dd2=a63_0x288d();let _0x322b35=_0x288dd2[_0x55ac5f];return _0x322b35;}export const datasetExtendUpdate={'service':a63_0xf5851a(0x179),'command':'extend-update','description':a63_0xf5851a(0x158),'risk':a63_0xf5851a(0x171),'flags':[CODE_FLAG,{'name':a63_0xf5851a(0x15c),'type':a63_0xf5851a(0x167),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':'expect-json','type':a63_0xf5851a(0x167),'required':![],'description':a63_0xf5851a(0x17f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x274eda){validateInput(readExtendUpdateInput(_0x274eda));},async 'dryRun'(_0x115af6){const _0x2337e5=a63_0xf5851a,_0x4c0b64=await buildDatasetExtendUpdateResult({'appCode':_0x115af6['appCode'],'input':readExtendUpdateInput(_0x115af6),'dryRun':!![]});return{'method':'POST','url':'/smartapi/dataset/update-driven-data','body':_0x4c0b64[_0x2337e5(0x170)],'description':_0x4c0b64[_0x2337e5(0x18b)]};},async 'execute'(_0x33d15f){const _0x1f242b=a63_0xf5851a;return buildDatasetExtendUpdateResult({'appCode':_0x33d15f[_0x1f242b(0x177)],'input':readExtendUpdateInput(_0x33d15f),'dryRun':![]});}};function readExtendUpdateInput(_0x3c6e05){const _0x4e728c=a63_0xf5851a,_0x489849=trim(_0x3c6e05[_0x4e728c(0x157)](_0x4e728c(0x16d))),_0x5595c4=parseJsonObjectFlag(_0x3c6e05[_0x4e728c(0x157)]('patch-json'),_0x4e728c(0x17d)),_0x36c6f1=parseJsonObjectFlag(_0x3c6e05[_0x4e728c(0x157)]('expect-json'),_0x4e728c(0x18f));return{'code':_0x489849,'patch':_0x5595c4||{},'expect':_0x36c6f1};}function validateInput(_0x3a76ac){const _0x9c3e29=a63_0xf5851a;if(!_0x3a76ac[_0x9c3e29(0x16d)])throw CliErrors[_0x9c3e29(0x175)]('--code\x20is\x20required');validateExtendPatchKeys(_0x3a76ac[_0x9c3e29(0x190)]);}function parseDatasetExtend(_0x1116bb){const _0x5042ee=a63_0xf5851a;if(typeof _0x1116bb===_0x5042ee(0x167)){const _0x425dd8=_0x1116bb[_0x5042ee(0x17b)]();if(!_0x425dd8)return{'value':{},'shape':_0x5042ee(0x167)};let _0x543c43;try{_0x543c43=JSON[_0x5042ee(0x18d)](_0x425dd8);}catch(_0x489a9c){const _0x1678d2=_0x489a9c instanceof Error?_0x489a9c[_0x5042ee(0x18b)]:String(_0x489a9c);throw CliErrors[_0x5042ee(0x175)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x1678d2);}if(!isPlainObject(_0x543c43)||Array[_0x5042ee(0x16b)](_0x543c43))throw CliErrors[_0x5042ee(0x175)](_0x5042ee(0x169));return{'value':_0x543c43,'shape':_0x5042ee(0x167)};}if(_0x1116bb===undefined||_0x1116bb===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x1116bb)||Array[_0x5042ee(0x16b)](_0x1116bb))throw CliErrors[_0x5042ee(0x175)](_0x5042ee(0x169));return{'value':_0x1116bb,'shape':'object'};}function serializeDatasetExtend(_0x56c6ab,_0x3d8c23){const _0x2ae998=a63_0xf5851a;return _0x3d8c23===_0x2ae998(0x167)?JSON['stringify'](_0x56c6ab):_0x56c6ab;}function summarizeDataset(_0xd4223f,_0x66c3c3){const _0x5294aa=a63_0xf5851a,_0x157bcb=isPlainObject(_0xd4223f[_0x5294aa(0x179)])?_0xd4223f['dataset']:{},_0x23cff1=isPlainObject(_0xd4223f[_0x5294aa(0x186)])?_0xd4223f['dbtableConfig']:{};return{'id':_0xd4223f['modelId']??_0xd4223f['id']??_0x157bcb['datasetId']??null,'code':_0xd4223f[_0x5294aa(0x15a)]??_0xd4223f[_0x5294aa(0x16d)]??_0x157bcb['datasetCode']??_0x66c3c3,'name':_0xd4223f[_0x5294aa(0x178)]??_0x157bcb[_0x5294aa(0x18e)]??null,'table':_0x23cff1[_0x5294aa(0x168)]??_0x157bcb[_0x5294aa(0x168)]??null,'db':_0x23cff1['dbName']??_0x23cff1[_0x5294aa(0x18a)]??null};}function deepClone(_0x209afc){const _0x1529ea=a63_0xf5851a;if(_0x209afc===undefined)return _0x209afc;return JSON['parse'](JSON[_0x1529ea(0x17a)](_0x209afc));}function deepEqual(_0x20622f,_0x27ae7a){const _0xa87ecc=a63_0xf5851a;return JSON[_0xa87ecc(0x17a)](_0x20622f)===JSON[_0xa87ecc(0x17a)](_0x27ae7a);}function isPlainObject(_0x1c034b){const _0x10d434=a63_0xf5851a;return Boolean(_0x1c034b)&&typeof _0x1c034b==='object'&&!Array[_0x10d434(0x16b)](_0x1c034b);}function trim(_0x202ca9){const _0x391e39=String(_0x202ca9||'')['trim']();return _0x391e39;}
@@ -1 +1 @@
1
- const a64_0x26c22a=a64_0x5f28;function a64_0x2f7c(){const _0x291e74=['datasetName','18ZcevRp','message','datasetId','pkField','5603456rJpTXm','code','deleted','findIndex','validation','125472JBEOyw','has','109899iZRHhZ','4528305UANzbt','options','fields','patch','dbFieldName','string','properties','dbTypeLen','No\x20changes\x20for\x20dataset\x20field\x20','description','211653AXVYoR','trim','deprecated','--field\x20is\x20required','Exact\x20raw\x20fields[].name\x20to\x20patch','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Allowed\x20keys:\x20','datasetCode','--expect-json','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','name','parse','dbName','dbtableConfig','write','stringify','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Forbidden\x20patch\x20key:\x20','expect','expect-json','from','required','Field\x20not\x20found:\x20','length','sort','/smartapi/dataset/update-driven-data','6xutFuQ','Dry-run:\x20dataset\x20field\x20','join','Updated\x20dataset\x20field\x20','chartRole','entries','dbTypeScale','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','appCode','\x20must\x20be\x20a\x20JSON\x20object','Expected\x20','--patch-json','tableName','POST','field-update','datetimeFormat','dbId','add','str','data','dataset','modelCode','isArray','field','keys','autoIncrement','4454534DYCvPj','patch-json','doType','1828955yHeSAo'];a64_0x2f7c=function(){return _0x291e74;};return a64_0x2f7c();}(function(_0x3f210a,_0x30df0a){const _0x470e3d=a64_0x5f28,_0x28f07d=_0x3f210a();while(!![]){try{const _0x4792db=-parseInt(_0x470e3d(0xb9))/0x1+-parseInt(_0x470e3d(0xf2))/0x2*(parseInt(_0x470e3d(0xfd))/0x3)+-parseInt(_0x470e3d(0xfb))/0x4+parseInt(_0x470e3d(0xf0))/0x5+parseInt(_0x470e3d(0xd3))/0x6*(-parseInt(_0x470e3d(0xed))/0x7)+parseInt(_0x470e3d(0xf6))/0x8+parseInt(_0x470e3d(0xfe))/0x9;if(_0x4792db===_0x30df0a)break;else _0x28f07d['push'](_0x28f07d['shift']());}catch(_0x18ad11){_0x28f07d['push'](_0x28f07d['shift']());}}}(a64_0x2f7c,0x57f60));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a64_0x5f28(_0x29c976,_0x21f8f6){_0x29c976=_0x29c976-0xb6;const _0x2f7cbf=a64_0x2f7c();let _0x5f286f=_0x2f7cbf[_0x29c976];return _0x5f286f;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a64_0x26c22a(0xef),'displayName',a64_0x26c22a(0xb8),a64_0x26c22a(0xff),a64_0x26c22a(0xce),a64_0x26c22a(0xe2),'defaultAggregation',a64_0x26c22a(0xd7),a64_0x26c22a(0xbb)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x26c22a(0xc3),'code','dbType',a64_0x26c22a(0xb6),a64_0x26c22a(0xd9),a64_0x26c22a(0x102),a64_0x26c22a(0xdf),a64_0x26c22a(0xf8),a64_0x26c22a(0xf5),a64_0x26c22a(0xec),'systemRetain']);export function parseJsonObjectFlag(_0x5bdd43,_0x236484){const _0x32d912=a64_0x26c22a;if(!_0x5bdd43)return undefined;let _0x441e8b;try{_0x441e8b=JSON['parse'](_0x5bdd43);}catch(_0x1319a1){const _0x5e3d2f=_0x1319a1 instanceof Error?_0x1319a1[_0x32d912(0xf3)]:String(_0x1319a1);throw CliErrors[_0x32d912(0xfa)](_0x236484+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x5e3d2f);}if(!isPlainObject(_0x441e8b)||Array['isArray'](_0x441e8b))throw CliErrors['validation'](_0x236484+_0x32d912(0xdc));return _0x441e8b;}export function validatePatchKeys(_0x2b7dc4){const _0x51b91a=a64_0x26c22a,_0x137905=Object[_0x51b91a(0xeb)](_0x2b7dc4);if(_0x137905[_0x51b91a(0xd0)]===0x0)throw CliErrors[_0x51b91a(0xfa)](_0x51b91a(0xbe));for(const _0x5a7636 of _0x137905){if(FORBIDDEN_FIELD_KEYS['has'](_0x5a7636))throw CliErrors[_0x51b91a(0xfa)](_0x51b91a(0xca)+_0x5a7636);if(!MUTABLE_FIELD_KEYS[_0x51b91a(0xfc)](_0x5a7636))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x5a7636,_0x51b91a(0xbf)+Array[_0x51b91a(0xcd)](MUTABLE_FIELD_KEYS)[_0x51b91a(0xd5)](',\x20'));}}export function applyFieldPatch(_0x2a27ef,_0x430fda){const _0x34b05e=a64_0x26c22a;validatePatchKeys(_0x430fda);const _0x10290e=deepClone(_0x2a27ef),_0xbeef56=new Set();for(const [_0x54483b,_0x5bb996]of Object[_0x34b05e(0xd8)](_0x430fda)){const _0x33bef8=_0x10290e[_0x54483b],_0x3c99ba=mergePatchValue(_0x33bef8,_0x5bb996);!deepEqual(_0x33bef8,_0x3c99ba)&&(_0x10290e[_0x54483b]=_0x3c99ba,_0xbeef56[_0x34b05e(0xe4)](_0x54483b),collectChangedPaths(_0x54483b,_0x33bef8,_0x3c99ba,_0xbeef56));}return{'after':_0x10290e,'changedPaths':Array[_0x34b05e(0xcd)](_0xbeef56)[_0x34b05e(0xd1)](),'changed':_0xbeef56['size']>0x0};}export function assertExpectation(_0x8feb04,_0x1208e4){const _0x213f54=a64_0x26c22a;if(!_0x1208e4)return;for(const [_0x189afd,_0x2f1420]of Object[_0x213f54(0xd8)](_0x1208e4)){const _0x428f70=_0x8feb04[_0x189afd];if(!deepEqual(_0x428f70,_0x2f1420))throw CliErrors[_0x213f54(0xfa)]('Expectation\x20mismatch\x20at\x20'+_0x189afd,_0x213f54(0xdd)+JSON[_0x213f54(0xc8)](_0x2f1420)+',\x20actual\x20'+JSON[_0x213f54(0xc8)](_0x428f70));}}export async function buildDatasetFieldUpdateResult({appCode:_0x3279a2,input:_0x5ac5f2,dryRun:_0x1c2663}){const _0x245046=a64_0x26c22a;validateInput(_0x5ac5f2);const _0x2eb7ee=await getDatasetDetail(_0x5ac5f2[_0x245046(0xf7)]),_0x1c10b8=readFieldArray(_0x2eb7ee),_0x3bcf41=_0x1c10b8[_0x245046(0xf9)](_0x4b018c=>_0x4b018c?.['name']===_0x5ac5f2[_0x245046(0xea)]);if(_0x3bcf41<0x0)throw CliErrors['validation'](_0x245046(0xcf)+_0x5ac5f2['field']);const _0x371679=deepClone(_0x1c10b8[_0x3bcf41]);assertExpectation(_0x371679,_0x5ac5f2[_0x245046(0xcb)]);const {after:_0x35c7ce,changedPaths:_0x395287,changed:_0x5f5874}=applyFieldPatch(_0x371679,_0x5ac5f2[_0x245046(0x101)]),_0x54ef21=summarizeDataset(_0x2eb7ee,_0x5ac5f2[_0x245046(0xf7)]);return _0x5f5874&&!_0x1c2663&&(_0x1c10b8[_0x3bcf41]=_0x35c7ce,await updateDrivenData(_0x2eb7ee)),{'ok':!![],'data':{'appCode':_0x3279a2,'selector':{'code':_0x5ac5f2[_0x245046(0xf7)]},'dataset':_0x54ef21,'field':{'id':_0x371679['id']??null,'name':_0x371679['name']},'dryRun':_0x1c2663,'changed':_0x5f5874,'changedPaths':_0x395287,'before':_0x371679,'after':_0x35c7ce,'submitted':_0x5f5874&&!_0x1c2663},'message':_0x5f5874?_0x1c2663?_0x245046(0xd4)+_0x5ac5f2[_0x245046(0xea)]+'\x20would\x20change\x20('+_0x395287[_0x245046(0xd5)](',\x20')+')':_0x245046(0xd6)+_0x5ac5f2[_0x245046(0xea)]+'\x20('+_0x395287[_0x245046(0xd5)](',\x20')+')':_0x245046(0xb7)+_0x5ac5f2[_0x245046(0xea)]};}export const datasetFieldUpdate={'service':'dataset','command':a64_0x26c22a(0xe1),'description':'Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','risk':a64_0x26c22a(0xc7),'flags':[CODE_FLAG,{'name':a64_0x26c22a(0xea),'type':'string','required':!![],'description':a64_0x26c22a(0xbd)},{'name':'patch-json','type':a64_0x26c22a(0x103),'required':!![],'description':a64_0x26c22a(0xc9)},{'name':a64_0x26c22a(0xcc),'type':a64_0x26c22a(0x103),'required':![],'description':a64_0x26c22a(0xc2)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x279197){validateInput(readFieldUpdateInput(_0x279197));},async 'dryRun'(_0xa4cc01){const _0x482081=a64_0x26c22a,_0x43f8e6=await buildDatasetFieldUpdateResult({'appCode':_0xa4cc01[_0x482081(0xdb)],'input':readFieldUpdateInput(_0xa4cc01),'dryRun':!![]});return{'method':_0x482081(0xe0),'url':_0x482081(0xd2),'body':_0x43f8e6[_0x482081(0xe6)],'description':_0x43f8e6['message']};},async 'execute'(_0xf846dd){const _0x1c4653=a64_0x26c22a;return buildDatasetFieldUpdateResult({'appCode':_0xf846dd[_0x1c4653(0xdb)],'input':readFieldUpdateInput(_0xf846dd),'dryRun':![]});}};function readFieldUpdateInput(_0x1df1ca){const _0x2b8d48=a64_0x26c22a,_0x16124f=trim(_0x1df1ca[_0x2b8d48(0xe5)](_0x2b8d48(0xf7))),_0x2a4a02=emptyToUndefined(_0x1df1ca['str'](_0x2b8d48(0xea))),_0x47ee64=parseJsonObjectFlag(_0x1df1ca[_0x2b8d48(0xe5)](_0x2b8d48(0xee)),_0x2b8d48(0xde)),_0x4763c6=parseJsonObjectFlag(_0x1df1ca[_0x2b8d48(0xe5)](_0x2b8d48(0xcc)),_0x2b8d48(0xc1));return{'code':_0x16124f,'field':_0x2a4a02||'','patch':_0x47ee64||{},'expect':_0x4763c6};}function validateInput(_0x4ff19e){const _0x48785b=a64_0x26c22a;if(!_0x4ff19e[_0x48785b(0xf7)])throw CliErrors['validation']('--code\x20is\x20required');if(!_0x4ff19e[_0x48785b(0xea)])throw CliErrors[_0x48785b(0xfa)](_0x48785b(0xbc));validatePatchKeys(_0x4ff19e[_0x48785b(0x101)]);}function readFieldArray(_0x4c6602){const _0x1d6d19=a64_0x26c22a;if(Array[_0x1d6d19(0xe9)](_0x4c6602[_0x1d6d19(0x100)]))return _0x4c6602[_0x1d6d19(0x100)];if(Array[_0x1d6d19(0xe9)](_0x4c6602['properties']))return _0x4c6602[_0x1d6d19(0x104)];throw CliErrors[_0x1d6d19(0xfa)](_0x1d6d19(0xda));}function summarizeDataset(_0x49150d,_0x4f25d9){const _0x9d1819=a64_0x26c22a,_0xb1c6b0=isPlainObject(_0x49150d['dataset'])?_0x49150d[_0x9d1819(0xe7)]:{},_0x1f8cd8=isPlainObject(_0x49150d['dbtableConfig'])?_0x49150d[_0x9d1819(0xc6)]:{};return{'id':_0x49150d['modelId']??_0x49150d['id']??_0xb1c6b0[_0x9d1819(0xf4)]??null,'code':_0x49150d[_0x9d1819(0xe8)]??_0x49150d[_0x9d1819(0xf7)]??_0xb1c6b0[_0x9d1819(0xc0)]??_0x4f25d9,'name':_0x49150d[_0x9d1819(0xc3)]??_0xb1c6b0[_0x9d1819(0xf1)]??null,'table':_0x1f8cd8[_0x9d1819(0xdf)]??_0xb1c6b0[_0x9d1819(0xdf)]??null,'db':_0x1f8cd8[_0x9d1819(0xc5)]??_0x1f8cd8[_0x9d1819(0xe3)]??null};}function mergePatchValue(_0x1fce51,_0x1365f3){if(isPlainObject(_0x1fce51)&&isPlainObject(_0x1365f3))return deepMerge(_0x1fce51,_0x1365f3);return deepClone(_0x1365f3);}function deepMerge(_0x5cde37,_0x4da48c){const _0x496c7f=a64_0x26c22a,_0x5092aa=deepClone(_0x5cde37);for(const [_0x58ba8d,_0x14e28e]of Object[_0x496c7f(0xd8)](_0x4da48c)){_0x5092aa[_0x58ba8d]=isPlainObject(_0x5092aa[_0x58ba8d])&&isPlainObject(_0x14e28e)?deepMerge(_0x5092aa[_0x58ba8d],_0x14e28e):deepClone(_0x14e28e);}return _0x5092aa;}function collectChangedPaths(_0xcf93a8,_0x3daf03,_0x44e34c,_0x44729f){const _0x295cac=a64_0x26c22a;if(!isPlainObject(_0x3daf03)||!isPlainObject(_0x44e34c))return;const _0x13ba16=new Set([...Object[_0x295cac(0xeb)](_0x3daf03),...Object[_0x295cac(0xeb)](_0x44e34c)]);for(const _0xe91636 of _0x13ba16){const _0x7b00d6=_0x3daf03[_0xe91636],_0x2469fc=_0x44e34c[_0xe91636];!deepEqual(_0x7b00d6,_0x2469fc)&&_0x44729f[_0x295cac(0xe4)](_0xcf93a8+'.'+_0xe91636);}}function deepClone(_0xce3753){const _0x514086=a64_0x26c22a;if(_0xce3753===undefined)return _0xce3753;return JSON[_0x514086(0xc4)](JSON['stringify'](_0xce3753));}function deepEqual(_0x428704,_0x3e3cc1){const _0x4cfbfc=a64_0x26c22a;return JSON[_0x4cfbfc(0xc8)](_0x428704)===JSON[_0x4cfbfc(0xc8)](_0x3e3cc1);}function isPlainObject(_0x33b9a5){return Boolean(_0x33b9a5)&&typeof _0x33b9a5==='object'&&!Array['isArray'](_0x33b9a5);}function emptyToUndefined(_0x246048){const _0x4e48d3=String(_0x246048||'')['trim']();return _0x4e48d3||undefined;}function trim(_0x4104a8){const _0x561026=a64_0x26c22a;return String(_0x4104a8||'')[_0x561026(0xba)]();}
1
+ function a64_0x53ad(){const _0x25a428=['Dry-run:\x20dataset\x20field\x20','parse','21MQRUFO','sort','dataset','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Field\x20not\x20found:\x20','code','5010lxnduc',',\x20actual\x20','2679924RmUKTR','\x20would\x20change\x20(','defaultAggregation','pkField','has','6225102dCGwZI','\x20must\x20be\x20valid\x20JSON\x20object:\x20','668232BuTRIm','field','1213270vSJIAw','tableName','dbTypeScale','1336AiZCbj','chartRole','keys','6799290XnVLjz','dbType','/smartapi/dataset/update-driven-data','message','POST','field-update','--expect-json','patch','Allowed\x20keys:\x20','options','Updated\x20dataset\x20field\x20','findIndex','write','autoIncrement','expect-json','Forbidden\x20patch\x20key:\x20','add','stringify','deleted','length','join','1256375khbosF','datasetCode','data','name','Exact\x20raw\x20fields[].name\x20to\x20patch','entries','description','systemRetain','isArray','displayName','datasetId','from','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','string','dbId','validation','datetimeFormat','--code\x20is\x20required','1Gylxor','\x20must\x20be\x20a\x20JSON\x20object','str','Unsupported\x20patch\x20key:\x20','dbtableConfig','trim','properties','size','patch-json','Expected\x20','modelCode'];a64_0x53ad=function(){return _0x25a428;};return a64_0x53ad();}const a64_0x3f5281=a64_0x48e9;(function(_0x28177c,_0x1b4c3a){const _0x5c6390=a64_0x48e9,_0x51a451=_0x28177c();while(!![]){try{const _0xfd5e35=parseInt(_0x5c6390(0xbd))/0x1*(parseInt(_0x5c6390(0xdb))/0x2)+-parseInt(_0x5c6390(0xd0))/0x3*(-parseInt(_0x5c6390(0xde))/0x4)+-parseInt(_0x5c6390(0xab))/0x5+-parseInt(_0x5c6390(0xd2))/0x6+-parseInt(_0x5c6390(0xca))/0x7*(-parseInt(_0x5c6390(0xd9))/0x8)+-parseInt(_0x5c6390(0xd7))/0x9+parseInt(_0x5c6390(0xe1))/0xa;if(_0xfd5e35===_0x1b4c3a)break;else _0x51a451['push'](_0x51a451['shift']());}catch(_0x1ec2a0){_0x51a451['push'](_0x51a451['shift']());}}}(a64_0x53ad,0xac32c));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a64_0x48e9(_0x3d7663,_0x1b1fb2){_0x3d7663=_0x3d7663-0xa2;const _0x53ad2e=a64_0x53ad();let _0x48e917=_0x53ad2e[_0x3d7663];return _0x48e917;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a64_0x3f5281(0xb4),a64_0x3f5281(0xb1),a64_0x3f5281(0xea),'required',a64_0x3f5281(0xbb),a64_0x3f5281(0xd4),a64_0x3f5281(0xdf),'deprecated']),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x3f5281(0xae),a64_0x3f5281(0xcf),a64_0x3f5281(0xe2),'dbTypeLen',a64_0x3f5281(0xdd),'dbFieldName','tableName',a64_0x3f5281(0xa8),a64_0x3f5281(0xd5),a64_0x3f5281(0xa3),a64_0x3f5281(0xb2)]);export function parseJsonObjectFlag(_0x4d0050,_0x5520d6){const _0x4eafde=a64_0x3f5281;if(!_0x4d0050)return undefined;let _0x3957b7;try{_0x3957b7=JSON['parse'](_0x4d0050);}catch(_0x4feeb2){const _0x47fe68=_0x4feeb2 instanceof Error?_0x4feeb2[_0x4eafde(0xe4)]:String(_0x4feeb2);throw CliErrors['validation'](_0x5520d6+_0x4eafde(0xd8)+_0x47fe68);}if(!isPlainObject(_0x3957b7)||Array[_0x4eafde(0xb3)](_0x3957b7))throw CliErrors[_0x4eafde(0xba)](_0x5520d6+_0x4eafde(0xbe));return _0x3957b7;}export function validatePatchKeys(_0x184693){const _0x208425=a64_0x3f5281,_0x2d1c5f=Object[_0x208425(0xe0)](_0x184693);if(_0x2d1c5f[_0x208425(0xa9)]===0x0)throw CliErrors[_0x208425(0xba)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x1131cc of _0x2d1c5f){if(FORBIDDEN_FIELD_KEYS[_0x208425(0xd6)](_0x1131cc))throw CliErrors[_0x208425(0xba)](_0x208425(0xa5)+_0x1131cc);if(!MUTABLE_FIELD_KEYS[_0x208425(0xd6)](_0x1131cc))throw CliErrors[_0x208425(0xba)](_0x208425(0xc0)+_0x1131cc,_0x208425(0xe9)+Array[_0x208425(0xb6)](MUTABLE_FIELD_KEYS)[_0x208425(0xaa)](',\x20'));}}export function applyFieldPatch(_0x263331,_0x53679e){const _0x1cc6ee=a64_0x3f5281;validatePatchKeys(_0x53679e);const _0x5eebec=deepClone(_0x263331),_0x42591b=new Set();for(const [_0x4fe461,_0x2505e6]of Object[_0x1cc6ee(0xb0)](_0x53679e)){const _0x8173ba=_0x5eebec[_0x4fe461],_0x2689a8=mergePatchValue(_0x8173ba,_0x2505e6);!deepEqual(_0x8173ba,_0x2689a8)&&(_0x5eebec[_0x4fe461]=_0x2689a8,_0x42591b[_0x1cc6ee(0xa6)](_0x4fe461),collectChangedPaths(_0x4fe461,_0x8173ba,_0x2689a8,_0x42591b));}return{'after':_0x5eebec,'changedPaths':Array[_0x1cc6ee(0xb6)](_0x42591b)[_0x1cc6ee(0xcb)](),'changed':_0x42591b[_0x1cc6ee(0xc4)]>0x0};}export function assertExpectation(_0xdb4f25,_0x4c808e){const _0x26352d=a64_0x3f5281;if(!_0x4c808e)return;for(const [_0x530588,_0x5e85b9]of Object[_0x26352d(0xb0)](_0x4c808e)){const _0x1dd598=_0xdb4f25[_0x530588];if(!deepEqual(_0x1dd598,_0x5e85b9))throw CliErrors[_0x26352d(0xba)]('Expectation\x20mismatch\x20at\x20'+_0x530588,_0x26352d(0xc6)+JSON[_0x26352d(0xa7)](_0x5e85b9)+_0x26352d(0xd1)+JSON[_0x26352d(0xa7)](_0x1dd598));}}export async function buildDatasetFieldUpdateResult({appCode:_0x8b06a2,input:_0x29dc27,dryRun:_0x4b7f6c}){const _0x5f4559=a64_0x3f5281;validateInput(_0x29dc27);const _0x16979f=await getDatasetDetail(_0x29dc27[_0x5f4559(0xcf)]),_0x188d91=readFieldArray(_0x16979f),_0xd5677b=_0x188d91[_0x5f4559(0xec)](_0x275015=>_0x275015?.[_0x5f4559(0xae)]===_0x29dc27[_0x5f4559(0xda)]);if(_0xd5677b<0x0)throw CliErrors['validation'](_0x5f4559(0xce)+_0x29dc27[_0x5f4559(0xda)]);const _0x105c95=deepClone(_0x188d91[_0xd5677b]);assertExpectation(_0x105c95,_0x29dc27['expect']);const {after:_0x36d030,changedPaths:_0x1d53c9,changed:_0x1abc04}=applyFieldPatch(_0x105c95,_0x29dc27[_0x5f4559(0xe8)]),_0x1d2e37=summarizeDataset(_0x16979f,_0x29dc27[_0x5f4559(0xcf)]);return _0x1abc04&&!_0x4b7f6c&&(_0x188d91[_0xd5677b]=_0x36d030,await updateDrivenData(_0x16979f)),{'ok':!![],'data':{'appCode':_0x8b06a2,'selector':{'code':_0x29dc27[_0x5f4559(0xcf)]},'dataset':_0x1d2e37,'field':{'id':_0x105c95['id']??null,'name':_0x105c95[_0x5f4559(0xae)]},'dryRun':_0x4b7f6c,'changed':_0x1abc04,'changedPaths':_0x1d53c9,'before':_0x105c95,'after':_0x36d030,'submitted':_0x1abc04&&!_0x4b7f6c},'message':_0x1abc04?_0x4b7f6c?_0x5f4559(0xc8)+_0x29dc27[_0x5f4559(0xda)]+_0x5f4559(0xd3)+_0x1d53c9['join'](',\x20')+')':_0x5f4559(0xeb)+_0x29dc27[_0x5f4559(0xda)]+'\x20('+_0x1d53c9[_0x5f4559(0xaa)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x29dc27['field']};}export const datasetFieldUpdate={'service':'dataset','command':a64_0x3f5281(0xe6),'description':a64_0x3f5281(0xb7),'risk':a64_0x3f5281(0xa2),'flags':[CODE_FLAG,{'name':a64_0x3f5281(0xda),'type':a64_0x3f5281(0xb8),'required':!![],'description':a64_0x3f5281(0xaf)},{'name':a64_0x3f5281(0xc5),'type':'string','required':!![],'description':a64_0x3f5281(0xcd)},{'name':a64_0x3f5281(0xa4),'type':a64_0x3f5281(0xb8),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x591291){validateInput(readFieldUpdateInput(_0x591291));},async 'dryRun'(_0x59c3dd){const _0x4fdbdd=a64_0x3f5281,_0x3e55f8=await buildDatasetFieldUpdateResult({'appCode':_0x59c3dd['appCode'],'input':readFieldUpdateInput(_0x59c3dd),'dryRun':!![]});return{'method':_0x4fdbdd(0xe5),'url':_0x4fdbdd(0xe3),'body':_0x3e55f8[_0x4fdbdd(0xad)],'description':_0x3e55f8[_0x4fdbdd(0xe4)]};},async 'execute'(_0x50d729){return buildDatasetFieldUpdateResult({'appCode':_0x50d729['appCode'],'input':readFieldUpdateInput(_0x50d729),'dryRun':![]});}};function readFieldUpdateInput(_0x35d869){const _0x3a72af=a64_0x3f5281,_0x29f737=trim(_0x35d869['str'](_0x3a72af(0xcf))),_0x1de2b6=emptyToUndefined(_0x35d869[_0x3a72af(0xbf)]('field')),_0x5292e2=parseJsonObjectFlag(_0x35d869[_0x3a72af(0xbf)]('patch-json'),'--patch-json'),_0x4317d6=parseJsonObjectFlag(_0x35d869[_0x3a72af(0xbf)](_0x3a72af(0xa4)),_0x3a72af(0xe7));return{'code':_0x29f737,'field':_0x1de2b6||'','patch':_0x5292e2||{},'expect':_0x4317d6};}function validateInput(_0x3d3d90){const _0x17f767=a64_0x3f5281;if(!_0x3d3d90['code'])throw CliErrors['validation'](_0x17f767(0xbc));if(!_0x3d3d90[_0x17f767(0xda)])throw CliErrors['validation']('--field\x20is\x20required');validatePatchKeys(_0x3d3d90['patch']);}function readFieldArray(_0x20ed84){const _0xfeb7c0=a64_0x3f5281;if(Array[_0xfeb7c0(0xb3)](_0x20ed84['fields']))return _0x20ed84['fields'];if(Array[_0xfeb7c0(0xb3)](_0x20ed84[_0xfeb7c0(0xc3)]))return _0x20ed84[_0xfeb7c0(0xc3)];throw CliErrors['validation']('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x3e8678,_0x5e1248){const _0x5f3558=a64_0x3f5281,_0x34f1dc=isPlainObject(_0x3e8678[_0x5f3558(0xcc)])?_0x3e8678['dataset']:{},_0x532823=isPlainObject(_0x3e8678['dbtableConfig'])?_0x3e8678[_0x5f3558(0xc1)]:{};return{'id':_0x3e8678['modelId']??_0x3e8678['id']??_0x34f1dc[_0x5f3558(0xb5)]??null,'code':_0x3e8678[_0x5f3558(0xc7)]??_0x3e8678['code']??_0x34f1dc[_0x5f3558(0xac)]??_0x5e1248,'name':_0x3e8678[_0x5f3558(0xae)]??_0x34f1dc['datasetName']??null,'table':_0x532823[_0x5f3558(0xdc)]??_0x34f1dc[_0x5f3558(0xdc)]??null,'db':_0x532823['dbName']??_0x532823[_0x5f3558(0xb9)]??null};}function mergePatchValue(_0x292ec9,_0x405112){if(isPlainObject(_0x292ec9)&&isPlainObject(_0x405112))return deepMerge(_0x292ec9,_0x405112);return deepClone(_0x405112);}function deepMerge(_0xaecb91,_0x19d161){const _0x278dcf=a64_0x3f5281,_0x49ca59=deepClone(_0xaecb91);for(const [_0x2d1010,_0x2a9b97]of Object[_0x278dcf(0xb0)](_0x19d161)){_0x49ca59[_0x2d1010]=isPlainObject(_0x49ca59[_0x2d1010])&&isPlainObject(_0x2a9b97)?deepMerge(_0x49ca59[_0x2d1010],_0x2a9b97):deepClone(_0x2a9b97);}return _0x49ca59;}function collectChangedPaths(_0xeb1b9d,_0x38b648,_0x3b0aec,_0x3698a3){const _0x4f65ee=a64_0x3f5281;if(!isPlainObject(_0x38b648)||!isPlainObject(_0x3b0aec))return;const _0x5ebade=new Set([...Object[_0x4f65ee(0xe0)](_0x38b648),...Object[_0x4f65ee(0xe0)](_0x3b0aec)]);for(const _0x1ade84 of _0x5ebade){const _0x314cd3=_0x38b648[_0x1ade84],_0x4e2ae1=_0x3b0aec[_0x1ade84];!deepEqual(_0x314cd3,_0x4e2ae1)&&_0x3698a3[_0x4f65ee(0xa6)](_0xeb1b9d+'.'+_0x1ade84);}}function deepClone(_0x36fa9e){const _0xd5b9d1=a64_0x3f5281;if(_0x36fa9e===undefined)return _0x36fa9e;return JSON[_0xd5b9d1(0xc9)](JSON['stringify'](_0x36fa9e));}function deepEqual(_0x2fa008,_0x19fa82){const _0x3266d8=a64_0x3f5281;return JSON['stringify'](_0x2fa008)===JSON[_0x3266d8(0xa7)](_0x19fa82);}function isPlainObject(_0x57765c){return Boolean(_0x57765c)&&typeof _0x57765c==='object'&&!Array['isArray'](_0x57765c);}function emptyToUndefined(_0x5cecab){const _0x408b62=String(_0x5cecab||'')['trim']();return _0x408b62||undefined;}function trim(_0x1cfb2a){const _0x2fe722=a64_0x3f5281;return String(_0x1cfb2a||'')[_0x2fe722(0xc2)]();}