@lovrabet/rabetbase-cli 2.2.5-beta.2 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -0
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/index.js +1 -1
  65. package/lib/commands/dataset/list.js +1 -1
  66. package/lib/commands/dataset/operations.js +1 -1
  67. package/lib/commands/dataset/relation-create.js +1 -1
  68. package/lib/commands/dataset/relation-delete.js +1 -1
  69. package/lib/commands/dataset/relation-shared.js +1 -1
  70. package/lib/commands/dataset/relation-update.js +1 -1
  71. package/lib/commands/dataset/relations.js +1 -1
  72. package/lib/commands/dataset/rename.js +1 -1
  73. package/lib/commands/dataset/restore.js +1 -1
  74. package/lib/commands/db/analyze-cancel.js +1 -1
  75. package/lib/commands/db/analyze-start.js +1 -1
  76. package/lib/commands/db/analyze-status.js +1 -1
  77. package/lib/commands/db/create.js +1 -1
  78. package/lib/commands/db/delete.js +1 -1
  79. package/lib/commands/db/detail.js +1 -1
  80. package/lib/commands/db/diff.js +1 -1
  81. package/lib/commands/db/index.js +1 -1
  82. package/lib/commands/db/list.js +1 -1
  83. package/lib/commands/db/shared.js +1 -1
  84. package/lib/commands/db/tables.js +1 -1
  85. package/lib/commands/db/test.js +1 -1
  86. package/lib/commands/db/update.js +1 -1
  87. package/lib/commands/doctor.js +1 -1
  88. package/lib/commands/init/index.js +1 -1
  89. package/lib/commands/issue/index.js +1 -1
  90. package/lib/commands/issue/nudge.js +1 -1
  91. package/lib/commands/issue/report.js +1 -1
  92. package/lib/commands/issue/shared.js +1 -1
  93. package/lib/commands/logs/index.js +1 -1
  94. package/lib/commands/menu/index.js +1 -1
  95. package/lib/commands/menu/list.js +1 -1
  96. package/lib/commands/menu/shared/compare-table.js +1 -1
  97. package/lib/commands/menu/shared/index.js +1 -1
  98. package/lib/commands/menu/shared/inquirer.js +1 -1
  99. package/lib/commands/menu/shared/local-pages.js +1 -1
  100. package/lib/commands/menu/shared/logic.js +1 -1
  101. package/lib/commands/menu/shared/service.js +1 -1
  102. package/lib/commands/menu/shared/sync-core.js +1 -1
  103. package/lib/commands/menu/shared/update-core.js +1 -1
  104. package/lib/commands/menu/shared/valid-url.js +1 -1
  105. package/lib/commands/menu/sync.js +1 -1
  106. package/lib/commands/menu/update.js +1 -1
  107. package/lib/commands/page/generate-start.js +1 -1
  108. package/lib/commands/page/generate-status.js +1 -1
  109. package/lib/commands/page/index.js +1 -1
  110. package/lib/commands/page/pull.js +1 -1
  111. package/lib/commands/page/push.js +1 -1
  112. package/lib/commands/page/relation-audit.js +1 -1
  113. package/lib/commands/page/shared.js +1 -1
  114. package/lib/commands/page/standard-page-status.js +1 -1
  115. package/lib/commands/page/sync.js +1 -1
  116. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  117. package/lib/commands/project/create/format-elapsed.js +1 -1
  118. package/lib/commands/project/create/main.js +1 -1
  119. package/lib/commands/project/create/non-interactive.js +1 -1
  120. package/lib/commands/project/create/project-template-path.js +1 -1
  121. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  122. package/lib/commands/project/create/use-format-code.js +1 -1
  123. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  124. package/lib/commands/project/index.js +1 -1
  125. package/lib/commands/project/init.js +1 -1
  126. package/lib/commands/project/upgrade.js +1 -1
  127. package/lib/commands/registry.js +1 -1
  128. package/lib/commands/run/index.js +1 -1
  129. package/lib/commands/schema.js +1 -1
  130. package/lib/commands/sql/create.js +1 -1
  131. package/lib/commands/sql/delete.js +1 -1
  132. package/lib/commands/sql/detail.js +1 -1
  133. package/lib/commands/sql/exec.js +1 -1
  134. package/lib/commands/sql/index.js +1 -1
  135. package/lib/commands/sql/list.js +1 -1
  136. package/lib/commands/sql/pull.js +1 -1
  137. package/lib/commands/sql/push.js +1 -1
  138. package/lib/commands/sql/save.js +1 -1
  139. package/lib/commands/sql/shared.js +1 -1
  140. package/lib/commands/sql/status.js +1 -1
  141. package/lib/commands/sql/validate.js +1 -1
  142. package/lib/commands/workspace/index.js +1 -1
  143. package/lib/config/schema.js +1 -1
  144. package/lib/constant/cdn.js +1 -1
  145. package/lib/constant/cli.js +1 -1
  146. package/lib/constant/defaults.js +1 -1
  147. package/lib/constant/domain.js +1 -1
  148. package/lib/constant/env.js +1 -1
  149. package/lib/constant/output.js +1 -1
  150. package/lib/constant/paths.js +1 -1
  151. package/lib/constant/risk.js +1 -1
  152. package/lib/context/app-resolver.js +1 -1
  153. package/lib/context/auth-resolver.js +1 -1
  154. package/lib/context/config-loader.js +1 -1
  155. package/lib/context.js +1 -1
  156. package/lib/core/alias-resolver.js +1 -1
  157. package/lib/core/api-client.js +1 -1
  158. package/lib/core/bff/config.js +1 -1
  159. package/lib/core/bff/file-system.js +1 -1
  160. package/lib/core/bff/hash.js +1 -1
  161. package/lib/core/bff/lock.js +1 -1
  162. package/lib/core/bff/utils.js +1 -1
  163. package/lib/core/db-resolver.js +1 -1
  164. package/lib/core/page/file-system.js +1 -1
  165. package/lib/core/page/hash.js +1 -1
  166. package/lib/core/page/lock.js +1 -1
  167. package/lib/core/sql-sync/config.js +1 -1
  168. package/lib/core/sql-sync/file-system.js +1 -1
  169. package/lib/core/sql-sync/hash.js +1 -1
  170. package/lib/core/sql-sync/lock.js +1 -1
  171. package/lib/core/sql-sync/utils.js +1 -1
  172. package/lib/core/sql-validator.js +1 -1
  173. package/lib/errors.js +1 -1
  174. package/lib/framework/build-all-flags.js +1 -1
  175. package/lib/framework/flags.js +1 -1
  176. package/lib/framework/help.js +1 -1
  177. package/lib/framework/index.js +1 -1
  178. package/lib/framework/output.js +1 -1
  179. package/lib/framework/response.js +1 -1
  180. package/lib/framework/runner-alias.js +1 -1
  181. package/lib/framework/runner.js +1 -1
  182. package/lib/framework/schema-export.js +1 -1
  183. package/lib/framework/types.js +1 -1
  184. package/lib/generated/build-info.js +1 -1
  185. package/lib/help.js +1 -1
  186. package/lib/skills/main.js +1 -1
  187. package/lib/skills/npx-skills-add.js +1 -1
  188. package/lib/telemetry/cli-command-trace.js +1 -1
  189. package/lib/telemetry/cli-help-trace.js +1 -1
  190. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  191. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  192. package/lib/telemetry/send-cli-trace-log.js +1 -1
  193. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  194. package/lib/utils/ai_config.js +1 -1
  195. package/lib/utils/apply-jq-filter.js +1 -1
  196. package/lib/utils/cdn-config.js +1 -1
  197. package/lib/utils/check-sdk-version.js +1 -1
  198. package/lib/utils/cli-version-check.js +1 -1
  199. package/lib/utils/cli-version-policy.js +1 -1
  200. package/lib/utils/config.js +1 -1
  201. package/lib/utils/copy-directory.js +1 -1
  202. package/lib/utils/entity-with-id.js +1 -1
  203. package/lib/utils/file-utils.js +1 -1
  204. package/lib/utils/guides-cdn.js +1 -1
  205. package/lib/utils/http-client.js +1 -1
  206. package/lib/utils/is-non-interactive.js +1 -1
  207. package/lib/utils/logger.js +1 -1
  208. package/lib/utils/params.js +1 -1
  209. package/lib/utils/platform.js +1 -1
  210. package/lib/utils/rules-cdn.js +1 -1
  211. package/lib/utils/sleep.js +1 -1
  212. package/lib/utils/template-replacer.js +1 -1
  213. package/lib/utils/update-notice.js +1 -1
  214. package/lib/utils/version.js +1 -1
  215. package/lib/utils/with-active-cookie.js +1 -1
  216. package/lib/utils/write-cli-side-channel.js +1 -1
  217. package/package.json +1 -1
  218. package/lib/commands/skill/index.js +0 -1
@@ -1 +1 @@
1
- function a49_0x2c76(){const _0x1f0cbb=['List\x20all\x20config\x20values','311344GmGvKR','global','2023zRNiyC','boolean','config','1968756twIkXj','226341MEjfbl','128614fVXLAe','bool','2872sYSOSQ','list','15SFaSeD','227764iwtrXI','read','50spFZsH','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','939440pzxUOP'];a49_0x2c76=function(){return _0x1f0cbb;};return a49_0x2c76();}const a49_0xa24847=a49_0xce6d;(function(_0xf93602,_0x2e0f78){const _0xccfc5d=a49_0xce6d,_0x3caf78=_0xf93602();while(!![]){try{const _0x35bc08=parseInt(_0xccfc5d(0x74))/0x1+-parseInt(_0xccfc5d(0x6d))/0x2+-parseInt(_0xccfc5d(0x78))/0x3*(-parseInt(_0xccfc5d(0x79))/0x4)+-parseInt(_0xccfc5d(0x7d))/0x5+parseInt(_0xccfc5d(0x72))/0x6+parseInt(_0xccfc5d(0x6f))/0x7*(-parseInt(_0xccfc5d(0x76))/0x8)+parseInt(_0xccfc5d(0x73))/0x9*(-parseInt(_0xccfc5d(0x7b))/0xa);if(_0x35bc08===_0x2e0f78)break;else _0x3caf78['push'](_0x3caf78['shift']());}catch(_0xd1b921){_0x3caf78['push'](_0x3caf78['shift']());}}}(a49_0x2c76,0x291c5));function a49_0xce6d(_0x225197,_0x745585){_0x225197=_0x225197-0x6c;const _0x2c7647=a49_0x2c76();let _0xce6dad=_0x2c7647[_0x225197];return _0xce6dad;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2dfccf){const _0x383f0f=a49_0xce6d,_0x487592=_0x2dfccf[_0x383f0f(0x75)](_0x383f0f(0x6e))?readScopedConfig(_0x383f0f(0x6e)):readConfig();return{'ok':!![],'data':_0x487592};}export const configListDefinition={'service':a49_0xa24847(0x71),'command':a49_0xa24847(0x77),'description':a49_0xa24847(0x6c),'risk':a49_0xa24847(0x7a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a49_0xa24847(0x6e),'type':a49_0xa24847(0x70),'description':a49_0xa24847(0x7c),'default':![]}],'execute':execute};
1
+ const a50_0x383c5f=a50_0x18d2;(function(_0xd3ed4a,_0x286f8b){const _0x5a0fe9=a50_0x18d2,_0x16f371=_0xd3ed4a();while(!![]){try{const _0x547e92=-parseInt(_0x5a0fe9(0x1e9))/0x1*(-parseInt(_0x5a0fe9(0x1e2))/0x2)+parseInt(_0x5a0fe9(0x1ed))/0x3*(-parseInt(_0x5a0fe9(0x1e4))/0x4)+-parseInt(_0x5a0fe9(0x1e3))/0x5+parseInt(_0x5a0fe9(0x1f0))/0x6*(parseInt(_0x5a0fe9(0x1de))/0x7)+-parseInt(_0x5a0fe9(0x1e6))/0x8*(-parseInt(_0x5a0fe9(0x1e1))/0x9)+parseInt(_0x5a0fe9(0x1ee))/0xa*(-parseInt(_0x5a0fe9(0x1e8))/0xb)+parseInt(_0x5a0fe9(0x1e0))/0xc;if(_0x547e92===_0x286f8b)break;else _0x16f371['push'](_0x16f371['shift']());}catch(_0x5bff3){_0x16f371['push'](_0x16f371['shift']());}}}(a50_0x7660,0x9dde7));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x46bb9e){const _0x337460=a50_0x18d2,_0x4fa33a=_0x46bb9e[_0x337460(0x1eb)](_0x337460(0x1ec))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x4fa33a};}function a50_0x18d2(_0x21ee80,_0x48f1b3){_0x21ee80=_0x21ee80-0x1de;const _0x7660f6=a50_0x7660();let _0x18d27c=_0x7660f6[_0x21ee80];return _0x18d27c;}export const configListDefinition={'service':a50_0x383c5f(0x1e7),'command':a50_0x383c5f(0x1ea),'description':a50_0x383c5f(0x1e5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x383c5f(0x1ec),'type':a50_0x383c5f(0x1ef),'description':a50_0x383c5f(0x1df),'default':![]}],'execute':execute};function a50_0x7660(){const _0x32f5ae=['630347oUBgBb','list','bool','global','9SzDTTk','134360xgUzmi','boolean','24mpTCkX','773626hLsqPF','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','13942560ldZMZR','117cJnUht','2uDtVSr','2741960amfKOw','1068036FwIsSS','List\x20all\x20config\x20values','465240pnuxiS','config','814qcEFfe'];a50_0x7660=function(){return _0x32f5ae;};return a50_0x7660();}
@@ -1 +1 @@
1
- const a50_0x4dc8a4=a50_0x5760;function a50_0x5b27(){const _0x59fdc9=['key','288zQcowB','Config\x20value','321074uMxqni','6117199lrbMzi','appcode','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','value','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','1217740QUQUjs','str','validation','write','\x20appcode\x20set\x20to:\x20','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','set','\x22\x20is\x20not\x20settable.','Missing\x20key.','env','apps','160460lVduLI','Settable\x20top-level\x20keys:\x20','Top-level\x20key\x20\x22','2zBwVWk','3672452HzeMub','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','join','Invalid\x20locale\x20value.','Missing\x20value.','riskLevel','Use\x20`','Project','Global','config','bool','object','string','Usage:\x20','77229mtLqvv','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','locale','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','app','617792vPemHe','boolean','\x20app\x20add\x20<name>\x20--appcode\x20','4uIFBDn','12XoxKQA','global','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','keys','includes'];a50_0x5b27=function(){return _0x59fdc9;};return a50_0x5b27();}(function(_0x54d6db,_0x5c1782){const _0x54693b=a50_0x5760,_0x4a03d7=_0x54d6db();while(!![]){try{const _0x75a4e1=parseInt(_0x54693b(0xdf))/0x1*(parseInt(_0x54693b(0xf3))/0x2)+parseInt(_0x54693b(0xcc))/0x3*(-parseInt(_0x54693b(0xd5))/0x4)+-parseInt(_0x54693b(0xe5))/0x5*(parseInt(_0x54693b(0xd6))/0x6)+-parseInt(_0x54693b(0xf4))/0x7+parseInt(_0x54693b(0xd2))/0x8+-parseInt(_0x54693b(0xdd))/0x9*(-parseInt(_0x54693b(0xf0))/0xa)+parseInt(_0x54693b(0xe0))/0xb;if(_0x75a4e1===_0x5c1782)break;else _0x4a03d7['push'](_0x4a03d7['shift']());}catch(_0x3bf5ad){_0x4a03d7['push'](_0x4a03d7['shift']());}}}(a50_0x5b27,0x69144));import{CliErrors}from'../../errors.js';function a50_0x5760(_0x10723e,_0x3c9f3b){_0x10723e=_0x10723e-0xc4;const _0x5b2798=a50_0x5b27();let _0x57601b=_0x5b2798[_0x10723e];return _0x57601b;}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(_0x45d83d){const _0x32eece=a50_0x5760,_0x4a9c21=_0x45d83d['str'](_0x32eece(0xdc)),_0x1a8fb1=_0x45d83d[_0x32eece(0xe6)](_0x32eece(0xe3));if(!_0x4a9c21)throw CliErrors[_0x32eece(0xe7)](_0x32eece(0xed),_0x32eece(0xcb)+CLI_BIN_NAME+_0x32eece(0xe4));if(_0x1a8fb1===undefined||_0x1a8fb1==='')throw CliErrors['validation'](_0x32eece(0xf8),_0x32eece(0xcb)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x1a8fb1['length']>0x1f4)throw CliErrors[_0x32eece(0xe7)](_0x32eece(0xd8));if(!isTopLevelConfigKey(_0x4a9c21))throw CliErrors[_0x32eece(0xe7)](_0x32eece(0xf2)+_0x4a9c21+_0x32eece(0xec),_0x32eece(0xf1)+getTopLevelConfigKeySummary());if(_0x4a9c21===_0x32eece(0xf9))throw CliErrors[_0x32eece(0xe7)](_0x32eece(0xd0));if(CONFIG_ENUM_VALUES[_0x4a9c21]&&!CONFIG_ENUM_VALUES[_0x4a9c21][_0x32eece(0xdb)](_0x1a8fb1))throw CliErrors[_0x32eece(0xe7)]('Invalid\x20value\x20for\x20\x22'+_0x4a9c21+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x4a9c21][_0x32eece(0xf6)](',\x20'));if(_0x4a9c21===_0x32eece(0xcf)&&!normalizeLocale(_0x1a8fb1))throw CliErrors['validation'](_0x32eece(0xf7),_0x32eece(0xea));const _0x40ba01={'global':_0x45d83d[_0x32eece(0xc8)](_0x32eece(0xd7))},_0x1ebe83=resolveWriteScope(_0x40ba01),_0x78fba9=readScopedConfig(_0x1ebe83);let _0x242472=_0x4a9c21,_0x2ba5a2=_0x1a8fb1;_0x4a9c21==='app'&&(_0x242472=_0x32eece(0xe1),delete _0x78fba9[_0x32eece(0xd1)]);_0x4a9c21===_0x32eece(0xcf)&&(_0x2ba5a2=normalizeLocale(_0x1a8fb1));if(_0x4a9c21===_0x32eece(0xee)){_0x2ba5a2=normalizeEnv(_0x1a8fb1);if(!isProduction(_0x2ba5a2)&&!isDaily(_0x2ba5a2))throw CliErrors['validation'](_0x32eece(0xce),_0x32eece(0xe2));}if(_0x4a9c21===_0x32eece(0xe1)){const _0x212d94=_0x78fba9['apps']&&typeof _0x78fba9[_0x32eece(0xef)]===_0x32eece(0xc9)?Object[_0x32eece(0xda)](_0x78fba9[_0x32eece(0xef)]):[];if(_0x212d94['length']>0x0)throw CliErrors[_0x32eece(0xe7)](_0x32eece(0xcd),_0x32eece(0xc4)+CLI_BIN_NAME+_0x32eece(0xd4)+_0x2ba5a2+'`,\x20`'+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x2e13f4=buildCanonicalProjectConfig({..._0x78fba9},{'appCodes':[_0x2ba5a2],'env':typeof _0x78fba9['env']===_0x32eece(0xca)?_0x78fba9[_0x32eece(0xee)]:undefined});writeScopedConfig(_0x2e13f4,_0x1ebe83);const _0x5e60ea=_0x1ebe83===_0x32eece(0xd7)?_0x32eece(0xc6):_0x32eece(0xc5);return{'ok':!![],'message':'✓\x20'+_0x5e60ea+_0x32eece(0xe9)+_0x2ba5a2+_0x32eece(0xf5)};}_0x78fba9[_0x242472]=_0x2ba5a2,writeScopedConfig(_0x78fba9,_0x1ebe83);const _0x152f17=_0x1ebe83===_0x32eece(0xd7)?_0x32eece(0xc6):_0x32eece(0xc5);return{'ok':!![],'message':'✓\x20'+_0x152f17+'\x20'+_0x242472+'\x20set\x20to:\x20'+_0x2ba5a2};}export const configSetDefinition={'service':a50_0x4dc8a4(0xc7),'command':a50_0x4dc8a4(0xeb),'description':'Set\x20a\x20config\x20value','risk':a50_0x4dc8a4(0xe8),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x4dc8a4(0xdc),'type':a50_0x4dc8a4(0xca),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a50_0x4dc8a4(0xe3),'type':a50_0x4dc8a4(0xca),'description':a50_0x4dc8a4(0xde),'required':!![]},{'name':a50_0x4dc8a4(0xd7),'type':a50_0x4dc8a4(0xd3),'description':a50_0x4dc8a4(0xd9),'default':![]}],'execute':execute};
1
+ const a51_0x43843b=a51_0x4dd2;(function(_0x56a5c4,_0x4a3ae6){const _0x82f665=a51_0x4dd2,_0x5094dc=_0x56a5c4();while(!![]){try{const _0x3dd171=-parseInt(_0x82f665(0xf5))/0x1*(parseInt(_0x82f665(0x122))/0x2)+parseInt(_0x82f665(0x113))/0x3+parseInt(_0x82f665(0x115))/0x4*(-parseInt(_0x82f665(0xf7))/0x5)+parseInt(_0x82f665(0xfb))/0x6*(-parseInt(_0x82f665(0x11f))/0x7)+parseInt(_0x82f665(0xfd))/0x8*(parseInt(_0x82f665(0x104))/0x9)+-parseInt(_0x82f665(0x10d))/0xa*(-parseInt(_0x82f665(0x11a))/0xb)+parseInt(_0x82f665(0xff))/0xc;if(_0x3dd171===_0x4a3ae6)break;else _0x5094dc['push'](_0x5094dc['shift']());}catch(_0x1fb9a1){_0x5094dc['push'](_0x5094dc['shift']());}}}(a51_0x48aa,0x2e366));function a51_0x4dd2(_0x74ac4d,_0x5e5ca5){_0x74ac4d=_0x74ac4d-0xef;const _0x48aa94=a51_0x48aa();let _0x4dd242=_0x48aa94[_0x74ac4d];return _0x4dd242;}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(_0x5c073e){const _0x4364b6=a51_0x4dd2,_0x76166b=_0x5c073e[_0x4364b6(0x105)](_0x4364b6(0x11e)),_0x4688a8=_0x5c073e[_0x4364b6(0x105)](_0x4364b6(0x102));if(!_0x76166b)throw CliErrors['validation']('Missing\x20key.',_0x4364b6(0xf8)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x4688a8===undefined||_0x4688a8==='')throw CliErrors[_0x4364b6(0x110)]('Missing\x20value.',_0x4364b6(0xf8)+CLI_BIN_NAME+_0x4364b6(0x10b));if(_0x4688a8['length']>0x1f4)throw CliErrors[_0x4364b6(0x110)](_0x4364b6(0xf1));if(!isTopLevelConfigKey(_0x76166b))throw CliErrors[_0x4364b6(0x110)](_0x4364b6(0xf0)+_0x76166b+_0x4364b6(0xf9),_0x4364b6(0x117)+getTopLevelConfigKeySummary());if(_0x76166b===_0x4364b6(0x103))throw CliErrors[_0x4364b6(0x110)](_0x4364b6(0xfa));if(CONFIG_ENUM_VALUES[_0x76166b]&&!CONFIG_ENUM_VALUES[_0x76166b]['includes'](_0x4688a8))throw CliErrors[_0x4364b6(0x110)](_0x4364b6(0xef)+_0x76166b+_0x4364b6(0xfc)+CONFIG_ENUM_VALUES[_0x76166b]['join'](',\x20'));if(_0x76166b===_0x4364b6(0x118)&&!normalizeLocale(_0x4688a8))throw CliErrors['validation']('Invalid\x20locale\x20value.',_0x4364b6(0x11d));const _0x1422c1={'global':_0x5c073e[_0x4364b6(0xf2)](_0x4364b6(0xf4))},_0x4d7554=resolveWriteScope(_0x1422c1),_0x2105b4=readScopedConfig(_0x4d7554);let _0x4329db=_0x76166b,_0x43d15d=_0x4688a8;_0x76166b==='app'&&(_0x4329db=_0x4364b6(0x101),delete _0x2105b4[_0x4364b6(0x114)]);_0x76166b===_0x4364b6(0x118)&&(_0x43d15d=normalizeLocale(_0x4688a8));if(_0x76166b==='env'){_0x43d15d=normalizeEnv(_0x4688a8);if(!isProduction(_0x43d15d)&&!isDaily(_0x43d15d))throw CliErrors[_0x4364b6(0x110)](_0x4364b6(0x10a),_0x4364b6(0x106));}if(_0x76166b==='appcode'){const _0x14b150=_0x2105b4[_0x4364b6(0x109)]&&typeof _0x2105b4[_0x4364b6(0x109)]===_0x4364b6(0x11b)?Object['keys'](_0x2105b4['apps']):[];if(_0x14b150[_0x4364b6(0x112)]>0x0)throw CliErrors[_0x4364b6(0x110)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x4364b6(0x10e)+CLI_BIN_NAME+_0x4364b6(0x111)+_0x43d15d+'`,\x20`'+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x5caf36=buildCanonicalProjectConfig({..._0x2105b4},{'appCodes':[_0x43d15d],'env':typeof _0x2105b4[_0x4364b6(0xfe)]==='string'?_0x2105b4[_0x4364b6(0xfe)]:undefined});writeScopedConfig(_0x5caf36,_0x4d7554);const _0x307569=_0x4d7554===_0x4364b6(0xf4)?_0x4364b6(0x100):_0x4364b6(0x116);return{'ok':!![],'message':'✓\x20'+_0x307569+_0x4364b6(0x107)+_0x43d15d+_0x4364b6(0x10f)};}_0x2105b4[_0x4329db]=_0x43d15d,writeScopedConfig(_0x2105b4,_0x4d7554);const _0x2e1682=_0x4d7554===_0x4364b6(0xf4)?'Global':_0x4364b6(0x116);return{'ok':!![],'message':'✓\x20'+_0x2e1682+'\x20'+_0x4329db+_0x4364b6(0xf3)+_0x43d15d};}function a51_0x48aa(){const _0x1699c6=['appcode','value','riskLevel','153qweQAM','str','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','\x20appcode\x20set\x20to:\x20','config','apps','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','string','2010KBrIoX','Use\x20`','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','validation','\x20app\x20add\x20<name>\x20--appcode\x20','length','34149AicCmC','app','4KRxVwk','Project','Settable\x20top-level\x20keys:\x20','locale','Config\x20value','11451gJToly','object','write','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','key','7Zlkofi','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Set\x20a\x20config\x20value','191236KBzkFD','Invalid\x20value\x20for\x20\x22','Top-level\x20key\x20\x22','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','bool','\x20set\x20to:\x20','global','2MwrDdF','set','1528665fXraon','Usage:\x20','\x22\x20is\x20not\x20settable.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','2199210guUlkD','\x22.\x20Allowed:\x20','135752SvqcPs','env','6524316oCkgTt','Global'];a51_0x48aa=function(){return _0x1699c6;};return a51_0x48aa();}export const configSetDefinition={'service':a51_0x43843b(0x108),'command':a51_0x43843b(0xf6),'description':a51_0x43843b(0x121),'risk':a51_0x43843b(0x11c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0x43843b(0x10c),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a51_0x43843b(0x10c),'description':a51_0x43843b(0x119),'required':!![]},{'name':'global','type':'boolean','description':a51_0x43843b(0x120),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x58e22b,_0xe37073){var _0x2c69ba=a51_0x51d7,_0x5519fd=_0x58e22b();while(!![]){try{var _0x3aceed=-parseInt(_0x2c69ba(0xbf))/0x1*(parseInt(_0x2c69ba(0xbd))/0x2)+parseInt(_0x2c69ba(0xb3))/0x3*(-parseInt(_0x2c69ba(0xb4))/0x4)+-parseInt(_0x2c69ba(0xc0))/0x5*(-parseInt(_0x2c69ba(0xbc))/0x6)+-parseInt(_0x2c69ba(0xb5))/0x7+parseInt(_0x2c69ba(0xb2))/0x8+-parseInt(_0x2c69ba(0xba))/0x9+parseInt(_0x2c69ba(0xbe))/0xa*(parseInt(_0x2c69ba(0xb9))/0xb);if(_0x3aceed===_0xe37073)break;else _0x5519fd['push'](_0x5519fd['shift']());}catch(_0x35f614){_0x5519fd['push'](_0x5519fd['shift']());}}}(a51_0x1093,0x906b5));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a51_0x1093(){var _0x400f67=['4609094Iwqdam','global','validation','project','1166341LXCmMb','4140810XFTrmp','\x20init`\x20first.','6hQAuQw','1599028sjtSvF','200RZSPtF','1mIJtia','783685SkjgMd','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','3243480bumFml','103923zryipu','20TuMtCL'];a51_0x1093=function(){return _0x400f67;};return a51_0x1093();}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};function a51_0x51d7(_0x4d19c6,_0x4a7bb6){_0x4d19c6=_0x4d19c6-0xb2;var _0x1093f2=a51_0x1093();var _0x51d78e=_0x1093f2[_0x4d19c6];return _0x51d78e;}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x4314b0){var _0x220dec=a51_0x51d7;if(_0x4314b0[_0x220dec(0xb6)])return _0x220dec(0xb6);if(!isInProject())throw CliErrors[_0x220dec(0xb7)](_0x220dec(0xc1),_0x220dec(0xc2)+CLI_BIN_NAME+_0x220dec(0xbb));return _0x220dec(0xb8);}export function readScopedConfig(_0x2da181){return readConfigFile(resolveWriteConfigPath(_0x2da181));}export function writeScopedConfig(_0xe57418,_0x1c4084){writeConfigFile(resolveWriteConfigPath(_0x1c4084),_0xe57418);}
1
+ (function(_0x3e484a,_0x5f093b){var _0x35c780=a52_0x2669,_0x17f17d=_0x3e484a();while(!![]){try{var _0x4238cf=parseInt(_0x35c780(0x12c))/0x1*(parseInt(_0x35c780(0x11f))/0x2)+-parseInt(_0x35c780(0x120))/0x3*(parseInt(_0x35c780(0x12b))/0x4)+-parseInt(_0x35c780(0x12d))/0x5*(parseInt(_0x35c780(0x12a))/0x6)+-parseInt(_0x35c780(0x123))/0x7*(-parseInt(_0x35c780(0x128))/0x8)+-parseInt(_0x35c780(0x129))/0x9+parseInt(_0x35c780(0x126))/0xa*(parseInt(_0x35c780(0x124))/0xb)+parseInt(_0x35c780(0x121))/0xc;if(_0x4238cf===_0x5f093b)break;else _0x17f17d['push'](_0x17f17d['shift']());}catch(_0x46de83){_0x17f17d['push'](_0x17f17d['shift']());}}}(a52_0x27c3,0x57d11));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};function a52_0x2669(_0x1a16d,_0x51a348){_0x1a16d=_0x1a16d-0x11f;var _0x27c313=a52_0x27c3();var _0x266908=_0x27c313[_0x1a16d];return _0x266908;}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x3ee328){var _0x4be632=a52_0x2669;if(_0x3ee328[_0x4be632(0x125)])return'global';if(!isInProject())throw CliErrors[_0x4be632(0x122)]('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+'\x20init`\x20first.');return _0x4be632(0x127);}function a52_0x27c3(){var _0x268ea1=['330bVDlJZ','922goWimk','6OqQAYr','5400504AmqSmk','validation','196rzbgHk','11dobAvD','global','2922560XMIRsS','project','176216VAOzCG','3844431nKgfKY','59994gulSTC','943836OJUreJ','1214xGxVit'];a52_0x27c3=function(){return _0x268ea1;};return a52_0x27c3();}export function readScopedConfig(_0x2b18b1){return readConfigFile(resolveWriteConfigPath(_0x2b18b1));}export function writeScopedConfig(_0x26575d,_0x430081){writeConfigFile(resolveWriteConfigPath(_0x430081),_0x26575d);}
@@ -1 +1 @@
1
- const a52_0x1a70cc=a52_0x5baf;(function(_0x3a5f85,_0x35ceb9){const _0xcb3cd3=a52_0x5baf,_0x1f7792=_0x3a5f85();while(!![]){try{const _0x262b55=parseInt(_0xcb3cd3(0xc1))/0x1+-parseInt(_0xcb3cd3(0xc6))/0x2*(parseInt(_0xcb3cd3(0xc4))/0x3)+-parseInt(_0xcb3cd3(0xc7))/0x4+-parseInt(_0xcb3cd3(0xbf))/0x5*(-parseInt(_0xcb3cd3(0xce))/0x6)+parseInt(_0xcb3cd3(0xc2))/0x7*(parseInt(_0xcb3cd3(0xca))/0x8)+parseInt(_0xcb3cd3(0xcc))/0x9*(parseInt(_0xcb3cd3(0xcd))/0xa)+-parseInt(_0xcb3cd3(0xc0))/0xb*(parseInt(_0xcb3cd3(0xcb))/0xc);if(_0x262b55===_0x35ceb9)break;else _0x1f7792['push'](_0x1f7792['shift']());}catch(_0x496496){_0x1f7792['push'](_0x1f7792['shift']());}}}(a52_0x468f,0xe75e1));function a52_0x468f(){const _0x2b49c5=['187UDXymQ','1618975lnffvs','1132922fpwJut','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','573HEpsGt','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','16370EscrWa','5147088epGPSK','\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\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','88adPAct','2173572gHYnRH','1557tymmmF','106910iSYvep','6dcznhR','join','filter','8140955yVKDwV'];a52_0x468f=function(){return _0x2b49c5;};return a52_0x468f();}import{buildDataCommand}from'../../commands/data/shared.js';function a52_0x5baf(_0x447b12,_0x4f09fc){_0x447b12=_0x447b12-0xbd;const _0x468f28=a52_0x468f();let _0x5baf98=_0x468f28[_0x447b12];return _0x5baf98;}export const dataFilter=buildDataCommand({'command':a52_0x1a70cc(0xbe),'operation':a52_0x1a70cc(0xbe),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a52_0x1a70cc(0xc3),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a52_0x1a70cc(0xc9),a52_0x1a70cc(0xc8),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a52_0x1a70cc(0xc5)][a52_0x1a70cc(0xbd)]('\x0a')});
1
+ const a53_0x575f0b=a53_0x3779;(function(_0x1c64dd,_0x47ac15){const _0xd25bb=a53_0x3779,_0x56ebee=_0x1c64dd();while(!![]){try{const _0x222b8c=parseInt(_0xd25bb(0x18e))/0x1+-parseInt(_0xd25bb(0x185))/0x2+parseInt(_0xd25bb(0x180))/0x3+parseInt(_0xd25bb(0x186))/0x4+parseInt(_0xd25bb(0x188))/0x5+parseInt(_0xd25bb(0x181))/0x6+-parseInt(_0xd25bb(0x187))/0x7*(parseInt(_0xd25bb(0x182))/0x8);if(_0x222b8c===_0x47ac15)break;else _0x56ebee['push'](_0x56ebee['shift']());}catch(_0x6e21c8){_0x56ebee['push'](_0x56ebee['shift']());}}}(a53_0x1616,0x9bd0d));function a53_0x1616(){const _0x466012=['3604616iJYtcE','7LvXSeM','1646515IsTCkV','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','join','205311DzFUnB','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\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\x20dataset\x20records\x20with\x20query\x20conditions','2669433pRgNdo','5868348XFvJEU','17664216pRFvVP','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','filter','914778UQVscD'];a53_0x1616=function(){return _0x466012;};return a53_0x1616();}function a53_0x3779(_0x540cad,_0x5be20c){_0x540cad=_0x540cad-0x17f;const _0x16163f=a53_0x1616();let _0x377940=_0x16163f[_0x540cad];return _0x377940;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a53_0x575f0b(0x184),'operation':a53_0x575f0b(0x184),'description':a53_0x575f0b(0x17f),'paramsRequired':![],'paramsHint':a53_0x575f0b(0x18f),'helpExtra':[a53_0x575f0b(0x183),a53_0x575f0b(0x189),a53_0x575f0b(0x18a),a53_0x575f0b(0x190),a53_0x575f0b(0x18c),a53_0x575f0b(0x18b)][a53_0x575f0b(0x18d)]('\x0a')});
@@ -1 +1 @@
1
- function a53_0x1983(_0x51d13e,_0xc1eefc){_0x51d13e=_0x51d13e-0x7d;const _0xeb63a6=a53_0xeb63();let _0x1983be=_0xeb63a6[_0x51d13e];return _0x1983be;}function a53_0xeb63(){const _0x5c5c1a=['3555HWLFCZ','42278621RDKUgX','1503iRYIWG','5537490xRgfdk','Get\x20a\x20single\x20record\x20by\x20ID','600444WzOIze','getOne','6zEEmKu','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','6884KNPuRk','424445axygHF','31210uehkfD','116743YMZCUN','184xjJXec'];a53_0xeb63=function(){return _0x5c5c1a;};return a53_0xeb63();}const a53_0x130387=a53_0x1983;(function(_0x99d210,_0xb298a1){const _0xa70e8c=a53_0x1983,_0x32ff9d=_0x99d210();while(!![]){try{const _0xc482b0=parseInt(_0xa70e8c(0x89))/0x1*(-parseInt(_0xa70e8c(0x84))/0x2)+parseInt(_0xa70e8c(0x7f))/0x3*(parseInt(_0xa70e8c(0x86))/0x4)+-parseInt(_0xa70e8c(0x80))/0x5+parseInt(_0xa70e8c(0x82))/0x6+parseInt(_0xa70e8c(0x87))/0x7*(-parseInt(_0xa70e8c(0x8a))/0x8)+parseInt(_0xa70e8c(0x7d))/0x9*(-parseInt(_0xa70e8c(0x88))/0xa)+parseInt(_0xa70e8c(0x7e))/0xb;if(_0xc482b0===_0xb298a1)break;else _0x32ff9d['push'](_0x32ff9d['shift']());}catch(_0x37cd90){_0x32ff9d['push'](_0x32ff9d['shift']());}}}(a53_0xeb63,0xaff27));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a53_0x130387(0x83),'operation':a53_0x130387(0x83),'description':a53_0x130387(0x81),'paramsRequired':!![],'paramsHint':a53_0x130387(0x85)});
1
+ const a54_0x51456=a54_0x2403;(function(_0x4b2c38,_0xb4a2c4){const _0x5dd661=a54_0x2403,_0x1dfadf=_0x4b2c38();while(!![]){try{const _0x21519b=parseInt(_0x5dd661(0xb5))/0x1*(-parseInt(_0x5dd661(0xba))/0x2)+parseInt(_0x5dd661(0xbc))/0x3*(parseInt(_0x5dd661(0xb9))/0x4)+parseInt(_0x5dd661(0xb7))/0x5+parseInt(_0x5dd661(0xbe))/0x6+-parseInt(_0x5dd661(0xc0))/0x7*(-parseInt(_0x5dd661(0xbf))/0x8)+parseInt(_0x5dd661(0xb6))/0x9+-parseInt(_0x5dd661(0xb4))/0xa;if(_0x21519b===_0xb4a2c4)break;else _0x1dfadf['push'](_0x1dfadf['shift']());}catch(_0x2c602a){_0x1dfadf['push'](_0x1dfadf['shift']());}}}(a54_0x4d37,0x6ea20));import{buildDataCommand}from'../../commands/data/shared.js';function a54_0x2403(_0x1219bd,_0x143e21){_0x1219bd=_0x1219bd-0xb4;const _0x4d3744=a54_0x4d37();let _0x240346=_0x4d3744[_0x1219bd];return _0x240346;}export const dataGetOne=buildDataCommand({'command':'getOne','operation':a54_0x51456(0xbb),'description':a54_0x51456(0xbd),'paramsRequired':!![],'paramsHint':a54_0x51456(0xb8)});function a54_0x4d37(){const _0x2e5a39=['17257100GJtZXA','12833HuqjMJ','483912auWQsM','3704810baRHZi','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','27512LbfsvQ','2sdqYRw','getOne','165QovSXa','Get\x20a\x20single\x20record\x20by\x20ID','2527818ogVgau','1592992JtXVAR','21LSoqcp'];a54_0x4d37=function(){return _0x2e5a39;};return a54_0x4d37();}
@@ -1 +1 @@
1
- function a54_0x39a5(){const _0x2ecc2d=['2556828zewjuQ','171888PVxFFG','2040080tBYKCk','3725lqfUhM','48MQtsDS','1327978cCHZzP','11861600oiFCBB','398246iJRekC'];a54_0x39a5=function(){return _0x2ecc2d;};return a54_0x39a5();}(function(_0x309740,_0x18c254){const _0x254131=a54_0xdcc3,_0x463376=_0x309740();while(!![]){try{const _0x4205be=-parseInt(_0x254131(0x1b5))/0x1+parseInt(_0x254131(0x1b3))/0x2+-parseInt(_0x254131(0x1b6))/0x3+-parseInt(_0x254131(0x1b7))/0x4+parseInt(_0x254131(0x1b1))/0x5*(-parseInt(_0x254131(0x1b2))/0x6)+-parseInt(_0x254131(0x1b8))/0x7+parseInt(_0x254131(0x1b4))/0x8;if(_0x4205be===_0x18c254)break;else _0x463376['push'](_0x463376['shift']());}catch(_0x230f9c){_0x463376['push'](_0x463376['shift']());}}}(a54_0x39a5,0x87b13));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a54_0xdcc3(_0x2ff4ca,_0xf93c94){_0x2ff4ca=_0x2ff4ca-0x1b1;const _0x39a508=a54_0x39a5();let _0xdcc353=_0x39a508[_0x2ff4ca];return _0xdcc353;}export const dataDefinitions=[dataFilter,dataGetOne];
1
+ (function(_0x32ce32,_0x2ea0d0){const _0x906d45=a55_0x12ab,_0x415c59=_0x32ce32();while(!![]){try{const _0xf7af63=-parseInt(_0x906d45(0x1db))/0x1*(parseInt(_0x906d45(0x1d8))/0x2)+parseInt(_0x906d45(0x1e2))/0x3*(parseInt(_0x906d45(0x1e1))/0x4)+-parseInt(_0x906d45(0x1dd))/0x5*(-parseInt(_0x906d45(0x1df))/0x6)+parseInt(_0x906d45(0x1dc))/0x7+-parseInt(_0x906d45(0x1d7))/0x8*(parseInt(_0x906d45(0x1e0))/0x9)+-parseInt(_0x906d45(0x1d9))/0xa*(parseInt(_0x906d45(0x1de))/0xb)+-parseInt(_0x906d45(0x1da))/0xc*(-parseInt(_0x906d45(0x1e3))/0xd);if(_0xf7af63===_0x2ea0d0)break;else _0x415c59['push'](_0x415c59['shift']());}catch(_0x449ec5){_0x415c59['push'](_0x415c59['shift']());}}}(a55_0x3e88,0x4be87));import{dataFilter}from'../../commands/data/filter.js';function a55_0x3e88(){const _0x54fa35=['3236bUqumM','741DUdaek','1898zQdLEP','6088GDfKkX','4yqdGXx','340VvUnZP','11580qqGXSh','86718gWHsWt','2770194vpOnmW','465275KidwcX','147466MHghLW','36SoyaKs','4194ZvNZHY'];a55_0x3e88=function(){return _0x54fa35;};return a55_0x3e88();}import{dataGetOne}from'../../commands/data/getOne.js';function a55_0x12ab(_0xc84d3f,_0x36e957){_0xc84d3f=_0xc84d3f-0x1d7;const _0x3e88fc=a55_0x3e88();let _0x12ab96=_0x3e88fc[_0xc84d3f];return _0x12ab96;}export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x2b8c00,_0x431570){const _0x3182bc=a55_0x2672,_0x546e96=_0x2b8c00();while(!![]){try{const _0x1fa15f=parseInt(_0x3182bc(0x1f3))/0x1*(parseInt(_0x3182bc(0x1e9))/0x2)+-parseInt(_0x3182bc(0x1ed))/0x3+parseInt(_0x3182bc(0x1fb))/0x4+parseInt(_0x3182bc(0x1f1))/0x5+parseInt(_0x3182bc(0x1fa))/0x6+parseInt(_0x3182bc(0x1e8))/0x7*(parseInt(_0x3182bc(0x1e4))/0x8)+-parseInt(_0x3182bc(0x1f2))/0x9;if(_0x1fa15f===_0x431570)break;else _0x546e96['push'](_0x546e96['shift']());}catch(_0x250f6d){_0x546e96['push'](_0x546e96['shift']());}}}(a55_0x1089,0x2c4f8));import{executeDatasetDataOperation}from'../../core/api-client.js';function a55_0x1089(){const _0x654b66=['now','7XYKFvh','10LpHnpU','\x20completed\x20in\x20','flagMissing','paramsHint','417273hthkBz','alias','data\x20','command','1683095PDaCNG','3624858djxDwL','21877drlnfe','helpExtra','params','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','compress','getOne','string','752880DiHsVF','577484ukQbOS','data','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','paramsRequired','str','59952VrcMxu','read','operation'];a55_0x1089=function(){return _0x654b66;};return a55_0x1089();}function a55_0x2672(_0x504f54,_0x56ffb5){_0x504f54=_0x504f54-0x1e1;const _0x1089e7=a55_0x1089();let _0x2672a4=_0x1089e7[_0x504f54];return _0x2672a4;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x5390fb){const _0x203f6b=a55_0x2672;if(!_0x5390fb)throw CliErrors['flagMissing'](_0x203f6b(0x1f5),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x182497=_0x5390fb['id'];if(_0x182497===undefined||_0x182497===null||_0x182497==='')throw CliErrors['validation'](_0x203f6b(0x1e1),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x17132c){return parseJsonParams(_0x17132c)??{};}export function buildDataCommand(_0x5e4ed4){const _0xed8f6f=a55_0x2672,_0x225e5b=_0xed8f6f(0x1f6);return{'service':_0xed8f6f(0x1fc),'command':_0x5e4ed4[_0xed8f6f(0x1f0)],'description':_0x5e4ed4['description'],'risk':_0xed8f6f(0x1e5),'defaultOutputFormat':_0xed8f6f(0x1f7),'helpExtra':_0x5e4ed4[_0xed8f6f(0x1f4)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0xed8f6f(0x1ee),'type':_0xed8f6f(0x1f9),'description':_0x225e5b},{'name':_0xed8f6f(0x1f5),'type':_0xed8f6f(0x1f9),'description':_0x5e4ed4[_0xed8f6f(0x1ec)]}],async 'validate'(_0x26e292){const _0x3b2ae4=_0xed8f6f,_0x3004aa=_0x26e292['str'](_0x3b2ae4(0x1f5));if(_0x5e4ed4[_0x3b2ae4(0x1e2)]&&!_0x3004aa)throw CliErrors[_0x3b2ae4(0x1eb)](_0x3b2ae4(0x1f5),_0x5e4ed4[_0x3b2ae4(0x1ec)]);const _0xcf9b62=parseJsonParams(_0x3004aa);_0x5e4ed4[_0x3b2ae4(0x1e6)]===_0x3b2ae4(0x1f8)&&assertGetOneId(_0xcf9b62);},async 'execute'(_0x176584){const _0x2c7fbe=_0xed8f6f,_0x4f514e=parseCommandParams(_0x176584[_0x2c7fbe(0x1e3)]('params')),_0x1161c7=Date[_0x2c7fbe(0x1e7)](),_0x36963e=await executeDatasetDataOperation(_0x176584['appCode'],_0x176584[_0x2c7fbe(0x1e3)]('code'),_0x5e4ed4[_0x2c7fbe(0x1e6)],_0x4f514e),_0x16b1ca=Date[_0x2c7fbe(0x1e7)]()-_0x1161c7;return{'ok':!![],'data':{'result':_0x36963e,'elapsed':_0x16b1ca},'message':_0x2c7fbe(0x1ef)+_0x5e4ed4['command']+_0x2c7fbe(0x1ea)+_0x16b1ca+'ms'};}};}
1
+ function a56_0x5ad7(_0x47dd73,_0x283d80){_0x47dd73=_0x47dd73-0xab;const _0x292f02=a56_0x292f();let _0x5ad79b=_0x292f02[_0x47dd73];return _0x5ad79b;}(function(_0x183ae7,_0x5c736d){const _0x1b1def=a56_0x5ad7,_0x1e116e=_0x183ae7();while(!![]){try{const _0x2b68a5=-parseInt(_0x1b1def(0xc0))/0x1*(-parseInt(_0x1b1def(0xb1))/0x2)+parseInt(_0x1b1def(0xac))/0x3*(parseInt(_0x1b1def(0xbe))/0x4)+parseInt(_0x1b1def(0xc1))/0x5+-parseInt(_0x1b1def(0xbf))/0x6*(-parseInt(_0x1b1def(0xb2))/0x7)+parseInt(_0x1b1def(0xc7))/0x8+parseInt(_0x1b1def(0xc9))/0x9+parseInt(_0x1b1def(0xbb))/0xa*(-parseInt(_0x1b1def(0xc6))/0xb);if(_0x2b68a5===_0x5c736d)break;else _0x1e116e['push'](_0x1e116e['shift']());}catch(_0x5ad36e){_0x1e116e['push'](_0x1e116e['shift']());}}}(a56_0x292f,0x44a17));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(_0x541c50){const _0x55ddbb=a56_0x5ad7;if(!_0x541c50)throw CliErrors[_0x55ddbb(0xba)](_0x55ddbb(0xb8),_0x55ddbb(0xbc));const _0xa4cad8=_0x541c50['id'];if(_0xa4cad8===undefined||_0xa4cad8===null||_0xa4cad8==='')throw CliErrors['validation'](_0x55ddbb(0xb6),_0x55ddbb(0xad));}function a56_0x292f(){const _0x28a991=['appCode','165046yxlUxZ','844473iWRdKA','string','read','data\x20','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','paramsHint','params','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','flagMissing','20wzeGtk','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','command','12380GLpSUP','6bRNAFs','5uNbdnc','186180PeKTUE','operation','code','\x20completed\x20in\x20','str','7236482ttRefd','3588648mouZhk','getOne','882351hkeIsH','paramsRequired','465MyLbDd','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','description','compress'];a56_0x292f=function(){return _0x28a991;};return a56_0x292f();}function parseCommandParams(_0x5b80f8){return parseJsonParams(_0x5b80f8)??{};}export function buildDataCommand(_0x18038a){const _0x22b79c=a56_0x5ad7,_0xb90ed8=_0x22b79c(0xb9);return{'service':'data','command':_0x18038a['command'],'description':_0x18038a[_0x22b79c(0xae)],'risk':_0x22b79c(0xb4),'defaultOutputFormat':_0x22b79c(0xaf),'helpExtra':_0x18038a['helpExtra'],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':_0xb90ed8},{'name':'params','type':_0x22b79c(0xb3),'description':_0x18038a[_0x22b79c(0xb7)]}],async 'validate'(_0x53b34c){const _0x2859f0=_0x22b79c,_0x3b02cb=_0x53b34c[_0x2859f0(0xc5)](_0x2859f0(0xb8));if(_0x18038a[_0x2859f0(0xab)]&&!_0x3b02cb)throw CliErrors[_0x2859f0(0xba)](_0x2859f0(0xb8),_0x18038a['paramsHint']);const _0x3999a2=parseJsonParams(_0x3b02cb);_0x18038a[_0x2859f0(0xc2)]===_0x2859f0(0xc8)&&assertGetOneId(_0x3999a2);},async 'execute'(_0x106762){const _0x43a9dc=_0x22b79c,_0x438a33=parseCommandParams(_0x106762['str'](_0x43a9dc(0xb8))),_0x2fb5cc=Date['now'](),_0x5abfe7=await executeDatasetDataOperation(_0x106762[_0x43a9dc(0xb0)],_0x106762[_0x43a9dc(0xc5)](_0x43a9dc(0xc3)),_0x18038a[_0x43a9dc(0xc2)],_0x438a33),_0x4f7ab7=Date['now']()-_0x2fb5cc;return{'ok':!![],'data':{'result':_0x5abfe7,'elapsed':_0x4f7ab7},'message':_0x43a9dc(0xb5)+_0x18038a[_0x43a9dc(0xbd)]+_0x43a9dc(0xc4)+_0x4f7ab7+'ms'};}};}
@@ -1 +1 @@
1
- const a56_0x1fba35=a56_0x393b;(function(_0x7f9128,_0x2af39b){const _0x1caf4f=a56_0x393b,_0x4d3544=_0x7f9128();while(!![]){try{const _0x3f2950=-parseInt(_0x1caf4f(0xa3))/0x1+parseInt(_0x1caf4f(0x9e))/0x2*(parseInt(_0x1caf4f(0x7f))/0x3)+-parseInt(_0x1caf4f(0xb7))/0x4*(-parseInt(_0x1caf4f(0x8c))/0x5)+parseInt(_0x1caf4f(0x91))/0x6*(-parseInt(_0x1caf4f(0xa6))/0x7)+parseInt(_0x1caf4f(0xa5))/0x8*(parseInt(_0x1caf4f(0x90))/0x9)+parseInt(_0x1caf4f(0x88))/0xa*(-parseInt(_0x1caf4f(0xad))/0xb)+parseInt(_0x1caf4f(0x78))/0xc*(-parseInt(_0x1caf4f(0xa0))/0xd);if(_0x3f2950===_0x2af39b)break;else _0x4d3544['push'](_0x4d3544['shift']());}catch(_0x10aff3){_0x4d3544['push'](_0x4d3544['shift']());}}}(a56_0x1632,0x9d8c4));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';function a56_0x393b(_0x2a19f6,_0x1828f1){_0x2a19f6=_0x2a19f6-0x77;const _0x163289=a56_0x1632();let _0x393b86=_0x163289[_0x2a19f6];return _0x393b86;}import{CliErrors}from'../../errors.js';const PROTOCOL=a56_0x1fba35(0x9a),BACKEND_PATH=a56_0x1fba35(0xa8);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0xdd263d,input:_0x2af977,dryRun:_0x2d47ce}){const _0x463697=a56_0x1fba35;validateInput(_0x2af977);const _0x485e81=normalizeBusinessGroup(_0x2af977[_0x463697(0xb5)]),_0x3f2274=await getDatasetDetail(_0x2af977[_0x463697(0x7b)]),_0x1bf368=resolveBusinessGroupDataset(_0x3f2274,_0x2af977['code']),_0x5a11be=loadCurrentBusinessGroup(_0x3f2274,_0x1bf368);assertExpectedBusinessGroup(_0x5a11be,_0x2af977['expectBusinessGroup']);const _0xfb4a5=buildBackendPayload(_0xdd263d,_0x1bf368,_0x485e81),_0x31d395=_0x5a11be!==_0x485e81;let _0x1a8ccb;if(_0x31d395&&!_0x2d47ce){await updateErBusinessGroup(_0xfb4a5);const _0x17a70c=await getDatasetDetail(_0x1bf368['code']),_0xfd8aa0=resolveBusinessGroupDataset(_0x17a70c,_0x1bf368['code']),_0x16521d=loadCurrentBusinessGroup(_0x17a70c,_0xfd8aa0);if(_0x16521d!==_0x485e81)throw CliErrors[_0x463697(0xb3)](_0x463697(0x98),_0x463697(0x85)+JSON[_0x463697(0x94)](_0x485e81)+',\x20actual\x20'+JSON[_0x463697(0x94)](_0x16521d)+'.');_0x1a8ccb={'verified':!![],'status':_0x463697(0x7d),'afterReadback':{'businessGroup':_0x16521d}};}else!_0x31d395&&(_0x1a8ccb={'verified':!![],'status':_0x463697(0x86),'afterReadback':{'businessGroup':_0x5a11be}});const _0x5bf8e4={'protocol':PROTOCOL,'operation':'update','appCode':_0xdd263d,'selector':{'code':_0x1bf368['code']},'dataset':_0x1bf368,'before':{'businessGroup':_0x5a11be},'after':{'businessGroup':_0x485e81},'changed':_0x31d395,'dryRun':_0x2d47ce,'submitted':_0x31d395&&!_0x2d47ce,'backend':{'method':_0x463697(0x9b),'path':BACKEND_PATH,'payload':_0xfb4a5},..._0x1a8ccb?{'verification':_0x1a8ccb}:{},'warnings':[]};return{'ok':!![],'data':_0x5bf8e4,'message':_0x31d395?_0x2d47ce?_0x463697(0xb2)+_0x1bf368[_0x463697(0x7b)]:_0x463697(0x82)+_0x1bf368[_0x463697(0x7b)]:'No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20'+_0x1bf368[_0x463697(0x7b)]};}export const datasetBusinessGroupUpdate={'service':a56_0x1fba35(0xb1),'command':a56_0x1fba35(0x97),'description':a56_0x1fba35(0xa1),'risk':a56_0x1fba35(0x7a),'flags':[CODE_FLAG,{'name':a56_0x1fba35(0x80),'type':a56_0x1fba35(0xb0),'required':!![],'description':a56_0x1fba35(0x87)},{'name':a56_0x1fba35(0x81),'type':'string','required':![],'description':a56_0x1fba35(0x8e)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x323994){validateInput(readBusinessGroupUpdateInput(_0x323994));},async 'dryRun'(_0x37f3c1){const _0x46d4b5=a56_0x1fba35,_0x394f33=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x37f3c1[_0x46d4b5(0x7c)],'input':readBusinessGroupUpdateInput(_0x37f3c1),'dryRun':!![]});return{'method':_0x46d4b5(0x9b),'url':BACKEND_PATH,'body':_0x394f33[_0x46d4b5(0xa2)][_0x46d4b5(0x89)][_0x46d4b5(0xb8)],'description':_0x394f33[_0x46d4b5(0xaa)],..._0x394f33['data']};},async 'execute'(_0x5b146a){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x5b146a['appCode'],'input':readBusinessGroupUpdateInput(_0x5b146a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5e2a8e){const _0x5d8b12=a56_0x1fba35,_0x5c1fb3=_0x5e2a8e[_0x5d8b12(0x9c)]('expect-business-group');return{'code':trim(_0x5e2a8e[_0x5d8b12(0x9c)](_0x5d8b12(0x7b))),'businessGroup':_0x5e2a8e['str']('business-group'),'expectBusinessGroup':_0x5c1fb3===undefined||_0x5c1fb3===''?undefined:_0x5c1fb3};}function validateInput(_0x235ef2){const _0x5838b1=a56_0x1fba35;if(!trim(_0x235ef2[_0x5838b1(0x7b)]))throw CliErrors[_0x5838b1(0x9f)](_0x5838b1(0x79));if(_0x235ef2[_0x5838b1(0xb5)]===undefined)throw CliErrors['validation'](_0x5838b1(0xab));}function resolveBusinessGroupDataset(_0x32ce92,_0x55da09){const _0x31d168=a56_0x1fba35,_0x30f6f3=asPlainObject(_0x32ce92[_0x31d168(0xb1)]),_0xda7d6e=asPlainObject(_0x32ce92['dbtableConfig']),_0x93fc9e=resolveSourceType(_0x32ce92,_0x30f6f3,_0xda7d6e),_0x9e89e0=firstString(_0x32ce92[_0x31d168(0xae)],_0x32ce92['code'],_0x30f6f3[_0x31d168(0x93)],_0x55da09)||_0x55da09;return{'id':firstNumber(_0x32ce92[_0x31d168(0x92)],_0x32ce92['id'],_0x30f6f3[_0x31d168(0xb6)])??firstString(_0x32ce92[_0x31d168(0x92)],_0x32ce92['id'],_0x30f6f3[_0x31d168(0xb6)])??null,'code':_0x9e89e0,'name':firstString(_0x32ce92['name'],_0x30f6f3['datasetName'],_0x30f6f3[_0x31d168(0x8f)])||null,'sourceType':_0x93fc9e};}function resolveSourceType(_0x200324,_0x821a09,_0x4c1911){const _0x323dbd=a56_0x1fba35,_0x19654b=firstString(_0x200324['source'],_0x200324[_0x323dbd(0xa9)],_0x821a09['source'],_0x821a09[_0x323dbd(0xa9)])?.[_0x323dbd(0x9d)]()[_0x323dbd(0x99)]();if(_0x19654b==='DB_TABLE'||_0x19654b==='METADATA')return _0x19654b;if(Object[_0x323dbd(0xb4)](_0x4c1911)['length']>0x0)return _0x323dbd(0x84);throw CliErrors[_0x323dbd(0x9f)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x239855,_0x20aa55){const _0x54af8b=a56_0x1fba35,_0x94699d=readBusinessGroupFromDatasetDetail(_0x239855,_0x20aa55[_0x54af8b(0xa9)]);if(_0x94699d[_0x54af8b(0xac)])return normalizeBusinessGroup(_0x94699d['value']);if(_0x20aa55[_0x54af8b(0xa9)]===_0x54af8b(0xaf))return'';throw CliErrors[_0x54af8b(0x9f)](_0x54af8b(0x8b),_0x54af8b(0x8a));}function readBusinessGroupFromDatasetDetail(_0x18451d,_0x42ce29){const _0x505bab=a56_0x1fba35,_0x3e5e00=asPlainObject(_0x18451d['dataset']),_0x12aa31=firstPresent(_0x18451d['businessGroup']);if(_0x12aa31[_0x505bab(0xac)])return _0x12aa31;const _0x550037=firstPresent(_0x3e5e00[_0x505bab(0xb5)]);if(_0x550037[_0x505bab(0xac)])return _0x550037;if(_0x42ce29===_0x505bab(0x84))return{'found':![]};const _0x14a952=readBusinessGroupFromExtend(_0x18451d[_0x505bab(0x96)]);if(_0x14a952[_0x505bab(0xac)])return _0x14a952;return readBusinessGroupFromExtend(_0x3e5e00['extend']);}function a56_0x1632(){const _0x5c1775=['--business-group\x20is\x20required','found','22RyyanL','modelCode','METADATA','string','dataset','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','apiError','keys','businessGroup','datasetId','17556RtnFDD','payload','object','24948UAavxE','--code\x20is\x20required','write','code','appCode','matched','number','1845UOeSbk','business-group','expect-business-group','Updated\x20business\x20model\x20group\x20for\x20dataset\x20','isFinite','DB_TABLE','Expected\x20','unchanged','New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it','3284560FwkJVD','backend','Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','1450vLEhWL','Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','name','1899AwaTpo','6bvtHIC','modelId','datasetCode','stringify','hasOwnProperty','extend','business-group-update','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','toUpperCase','dataset-business-group-update.v1','POST','str','trim','3148bjxaQt','validation','611hbFcoZ','Update\x20business\x20model\x20group','data','1207188xexqOn','prototype','27728tQnmiA','2555119bWLJzA','parse','/smartapi/question/er-config/business-group/edit','sourceType','message'];a56_0x1632=function(){return _0x5c1775;};return a56_0x1632();}function readBusinessGroupFromExtend(_0x2ad23c){const _0x42f296=a56_0x1fba35;if(_0x2ad23c===undefined||_0x2ad23c===null||_0x2ad23c==='')return{'found':![]};if(typeof _0x2ad23c==='string')try{const _0x52ba85=JSON[_0x42f296(0xa7)](_0x2ad23c);return readBusinessGroupFromExtend(_0x52ba85);}catch{return{'found':![]};}const _0x158c1b=asPlainObject(_0x2ad23c);if(Object[_0x42f296(0xa4)][_0x42f296(0x95)]['call'](_0x158c1b,_0x42f296(0xb5)))return{'found':!![],'value':_0x158c1b['businessGroup']};return{'found':![]};}function firstPresent(..._0x359564){for(const _0x4db3f4 of _0x359564){if(_0x4db3f4!==undefined&&_0x4db3f4!==null)return{'found':!![],'value':_0x4db3f4};}return{'found':![]};}function assertExpectedBusinessGroup(_0x42bcc0,_0x107b12){const _0x1490d0=a56_0x1fba35;if(_0x107b12===undefined)return;const _0x27aa04=normalizeBusinessGroup(_0x107b12);if(_0x42bcc0!==_0x27aa04)throw CliErrors[_0x1490d0(0x9f)](_0x1490d0(0x8d),_0x1490d0(0x85)+JSON['stringify'](_0x27aa04)+',\x20actual\x20'+JSON['stringify'](_0x42bcc0));}function buildBackendPayload(_0x282c5c,_0x40d8af,_0x5ab734){const _0x1efd88=a56_0x1fba35;return{'appCode':_0x282c5c,'datasetCode':_0x40d8af[_0x1efd88(0x7b)],'businessGroup':_0x5ab734};}function normalizeBusinessGroup(_0x3a0769){const _0xa83991=a56_0x1fba35;if(_0x3a0769===undefined||_0x3a0769===null)return'';return String(_0x3a0769)[_0xa83991(0x9d)]();}function asPlainObject(_0x3e7543){const _0xd79d0a=a56_0x1fba35;if(!_0x3e7543||typeof _0x3e7543!==_0xd79d0a(0x77)||Array['isArray'](_0x3e7543))return{};return _0x3e7543;}function firstString(..._0x4279a7){const _0x52f7db=a56_0x1fba35;for(const _0x4a728f of _0x4279a7){if(typeof _0x4a728f===_0x52f7db(0xb0)&&_0x4a728f['trim']())return _0x4a728f[_0x52f7db(0x9d)]();if(typeof _0x4a728f==='number'&&Number['isFinite'](_0x4a728f))return String(_0x4a728f);}return undefined;}function firstNumber(..._0x27abda){const _0x9383d0=a56_0x1fba35;for(const _0x3487dc of _0x27abda){if(typeof _0x3487dc===_0x9383d0(0x7e)&&Number['isFinite'](_0x3487dc))return _0x3487dc;if(typeof _0x3487dc===_0x9383d0(0xb0)&&_0x3487dc[_0x9383d0(0x9d)]()&&Number[_0x9383d0(0x83)](Number(_0x3487dc)))return Number(_0x3487dc);}return null;}function trim(_0xbed1a4){const _0x14e4eb=a56_0x1fba35;return String(_0xbed1a4||'')[_0x14e4eb(0x9d)]();}
1
+ const a57_0x429451=a57_0x1aab;(function(_0x18b597,_0x27cf8b){const _0x392001=a57_0x1aab,_0x3981ae=_0x18b597();while(!![]){try{const _0x454035=parseInt(_0x392001(0x1e1))/0x1+-parseInt(_0x392001(0x1d7))/0x2+parseInt(_0x392001(0x1de))/0x3*(-parseInt(_0x392001(0x1d9))/0x4)+parseInt(_0x392001(0x1d3))/0x5+parseInt(_0x392001(0x1e9))/0x6*(-parseInt(_0x392001(0x1cc))/0x7)+parseInt(_0x392001(0x1e0))/0x8*(parseInt(_0x392001(0x201))/0x9)+-parseInt(_0x392001(0x1fe))/0xa*(parseInt(_0x392001(0x200))/0xb);if(_0x454035===_0x27cf8b)break;else _0x3981ae['push'](_0x3981ae['shift']());}catch(_0x3061b3){_0x3981ae['push'](_0x3981ae['shift']());}}}(a57_0x4aa3,0xd6ee3));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a57_0x1aab(_0x1f946c,_0x5de353){_0x1f946c=_0x1f946c-0x1c1;const _0x4aa3ad=a57_0x4aa3();let _0x1aab15=_0x4aa3ad[_0x1f946c];return _0x1aab15;}import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROTOCOL=a57_0x429451(0x1cb),BACKEND_PATH=a57_0x429451(0x1eb);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x92061f,input:_0xef0ba3,dryRun:_0x654d1a}){const _0x246cf2=a57_0x429451;validateInput(_0xef0ba3);const _0x171f51=normalizeBusinessGroup(_0xef0ba3['businessGroup']),_0xb82d3d=await getDatasetDetail(_0xef0ba3[_0x246cf2(0x1f7)]),_0x560a30=resolveBusinessGroupDataset(_0xb82d3d,_0xef0ba3[_0x246cf2(0x1f7)]),_0x3487b4=loadCurrentBusinessGroup(_0xb82d3d,_0x560a30);assertExpectedBusinessGroup(_0x3487b4,_0xef0ba3[_0x246cf2(0x1e6)]);const _0x57e319=buildBackendPayload(_0x92061f,_0x560a30,_0x171f51),_0x24c0e3=_0x3487b4!==_0x171f51;let _0x2804ca;if(_0x24c0e3&&!_0x654d1a){await updateErBusinessGroup(_0x57e319);const _0x22950f=await getDatasetDetail(_0x560a30[_0x246cf2(0x1f7)]),_0x4cf9ff=resolveBusinessGroupDataset(_0x22950f,_0x560a30[_0x246cf2(0x1f7)]),_0x3411e4=loadCurrentBusinessGroup(_0x22950f,_0x4cf9ff);if(_0x3411e4!==_0x171f51)throw CliErrors[_0x246cf2(0x1cf)](_0x246cf2(0x1d5),_0x246cf2(0x1ed)+JSON[_0x246cf2(0x1dc)](_0x171f51)+_0x246cf2(0x1fa)+JSON[_0x246cf2(0x1dc)](_0x3411e4)+'.');_0x2804ca={'verified':!![],'status':_0x246cf2(0x1d1),'afterReadback':{'businessGroup':_0x3411e4}};}else!_0x24c0e3&&(_0x2804ca={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x3487b4}});const _0x4aa86f={'protocol':PROTOCOL,'operation':'update','appCode':_0x92061f,'selector':{'code':_0x560a30['code']},'dataset':_0x560a30,'before':{'businessGroup':_0x3487b4},'after':{'businessGroup':_0x171f51},'changed':_0x24c0e3,'dryRun':_0x654d1a,'submitted':_0x24c0e3&&!_0x654d1a,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x57e319},..._0x2804ca?{'verification':_0x2804ca}:{},'warnings':[]};return{'ok':!![],'data':_0x4aa86f,'message':_0x24c0e3?_0x654d1a?_0x246cf2(0x1ff)+_0x560a30[_0x246cf2(0x1f7)]:_0x246cf2(0x1ea)+_0x560a30[_0x246cf2(0x1f7)]:_0x246cf2(0x1ee)+_0x560a30['code']};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a57_0x429451(0x1db),'description':a57_0x429451(0x1f2),'risk':a57_0x429451(0x1f3),'flags':[CODE_FLAG,{'name':a57_0x429451(0x1df),'type':a57_0x429451(0x1e4),'required':!![],'description':a57_0x429451(0x1c3)},{'name':a57_0x429451(0x1c4),'type':a57_0x429451(0x1e4),'required':![],'description':a57_0x429451(0x1ce)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x111e20){validateInput(readBusinessGroupUpdateInput(_0x111e20));},async 'dryRun'(_0x32a7ed){const _0x4ffa4c=a57_0x429451,_0x704882=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x32a7ed[_0x4ffa4c(0x1f5)],'input':readBusinessGroupUpdateInput(_0x32a7ed),'dryRun':!![]});return{'method':'POST','url':BACKEND_PATH,'body':_0x704882['data']['backend'][_0x4ffa4c(0x1c9)],'description':_0x704882[_0x4ffa4c(0x1fc)],..._0x704882[_0x4ffa4c(0x1d4)]};},async 'execute'(_0x4e8bd3){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x4e8bd3['appCode'],'input':readBusinessGroupUpdateInput(_0x4e8bd3),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x3938de){const _0x3255ff=a57_0x429451,_0x5264=_0x3938de['str'](_0x3255ff(0x1c4));return{'code':trim(_0x3938de['str']('code')),'businessGroup':_0x3938de[_0x3255ff(0x1c8)](_0x3255ff(0x1df)),'expectBusinessGroup':_0x5264===undefined||_0x5264===''?undefined:_0x5264};}function validateInput(_0x2250b7){const _0x411288=a57_0x429451;if(!trim(_0x2250b7[_0x411288(0x1f7)]))throw CliErrors['validation'](_0x411288(0x1ca));if(_0x2250b7[_0x411288(0x1f9)]===undefined)throw CliErrors[_0x411288(0x1e8)](_0x411288(0x1d8));}function resolveBusinessGroupDataset(_0x2c6673,_0x11c099){const _0x430b5f=a57_0x429451,_0x2c1531=asPlainObject(_0x2c6673['dataset']),_0x14fdb1=asPlainObject(_0x2c6673['dbtableConfig']),_0xa6bef3=resolveSourceType(_0x2c6673,_0x2c1531,_0x14fdb1),_0x2a7b3e=firstString(_0x2c6673[_0x430b5f(0x1f6)],_0x2c6673[_0x430b5f(0x1f7)],_0x2c1531['datasetCode'],_0x11c099)||_0x11c099;return{'id':firstNumber(_0x2c6673['modelId'],_0x2c6673['id'],_0x2c1531[_0x430b5f(0x1fd)])??firstString(_0x2c6673[_0x430b5f(0x1f4)],_0x2c6673['id'],_0x2c1531[_0x430b5f(0x1fd)])??null,'code':_0x2a7b3e,'name':firstString(_0x2c6673['name'],_0x2c1531[_0x430b5f(0x1e3)],_0x2c1531[_0x430b5f(0x1c2)])||null,'sourceType':_0xa6bef3};}function resolveSourceType(_0x233349,_0x516507,_0x477ceb){const _0x5b950f=a57_0x429451,_0x390823=firstString(_0x233349[_0x5b950f(0x1c1)],_0x233349[_0x5b950f(0x1da)],_0x516507[_0x5b950f(0x1c1)],_0x516507[_0x5b950f(0x1da)])?.['trim']()[_0x5b950f(0x1d2)]();if(_0x390823===_0x5b950f(0x1e2)||_0x390823==='METADATA')return _0x390823;if(Object[_0x5b950f(0x1c7)](_0x477ceb)['length']>0x0)return _0x5b950f(0x1e2);throw CliErrors[_0x5b950f(0x1e8)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function a57_0x4aa3(){const _0x3cfa3e=['Expected\x20','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','dataset','call','prototype','Update\x20business\x20model\x20group','write','modelId','appCode','modelCode','code','METADATA','businessGroup',',\x20actual\x20','hasOwnProperty','message','datasetId','25730OmGdJd','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','3509IblClg','82377WiOCPF','source','name','New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it','expect-business-group','extend','Expectation\x20mismatch\x20at\x20businessGroup','keys','str','payload','--code\x20is\x20required','dataset-business-group-update.v1','14VIKWna','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','apiError','number','matched','toUpperCase','4774415GZpvhh','data','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','isArray','1863644LCUQOk','--business-group\x20is\x20required','4tqrkBe','sourceType','business-group-update','stringify','trim','4035849bEKQUX','business-group','1480dDhxTC','1678987vuqXck','DB_TABLE','datasetName','string','found','expectBusinessGroup','isFinite','validation','1046784rKcThy','Updated\x20business\x20model\x20group\x20for\x20dataset\x20','/smartapi/question/er-config/business-group/edit','object'];a57_0x4aa3=function(){return _0x3cfa3e;};return a57_0x4aa3();}function loadCurrentBusinessGroup(_0x2625e2,_0x4c9ce4){const _0x57dd4a=a57_0x429451,_0x8ac9ac=readBusinessGroupFromDatasetDetail(_0x2625e2,_0x4c9ce4[_0x57dd4a(0x1da)]);if(_0x8ac9ac[_0x57dd4a(0x1e5)])return normalizeBusinessGroup(_0x8ac9ac['value']);if(_0x4c9ce4[_0x57dd4a(0x1da)]===_0x57dd4a(0x1f8))return'';throw CliErrors[_0x57dd4a(0x1e8)](_0x57dd4a(0x1cd),'Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x4526cc,_0x7516fd){const _0x3de602=a57_0x429451,_0x4598df=asPlainObject(_0x4526cc[_0x3de602(0x1ef)]),_0x13b275=firstPresent(_0x4526cc[_0x3de602(0x1f9)]);if(_0x13b275[_0x3de602(0x1e5)])return _0x13b275;const _0x430353=firstPresent(_0x4598df[_0x3de602(0x1f9)]);if(_0x430353['found'])return _0x430353;if(_0x7516fd===_0x3de602(0x1e2))return{'found':![]};const _0xf3afe3=readBusinessGroupFromExtend(_0x4526cc[_0x3de602(0x1c5)]);if(_0xf3afe3[_0x3de602(0x1e5)])return _0xf3afe3;return readBusinessGroupFromExtend(_0x4598df[_0x3de602(0x1c5)]);}function readBusinessGroupFromExtend(_0x29b04c){const _0x14e64c=a57_0x429451;if(_0x29b04c===undefined||_0x29b04c===null||_0x29b04c==='')return{'found':![]};if(typeof _0x29b04c===_0x14e64c(0x1e4))try{const _0x35b3fd=JSON['parse'](_0x29b04c);return readBusinessGroupFromExtend(_0x35b3fd);}catch{return{'found':![]};}const _0x2f3360=asPlainObject(_0x29b04c);if(Object[_0x14e64c(0x1f1)][_0x14e64c(0x1fb)][_0x14e64c(0x1f0)](_0x2f3360,_0x14e64c(0x1f9)))return{'found':!![],'value':_0x2f3360[_0x14e64c(0x1f9)]};return{'found':![]};}function firstPresent(..._0x4caa6d){for(const _0x231280 of _0x4caa6d){if(_0x231280!==undefined&&_0x231280!==null)return{'found':!![],'value':_0x231280};}return{'found':![]};}function assertExpectedBusinessGroup(_0xbcce40,_0x4c97dd){const _0x570b63=a57_0x429451;if(_0x4c97dd===undefined)return;const _0x17bb6a=normalizeBusinessGroup(_0x4c97dd);if(_0xbcce40!==_0x17bb6a)throw CliErrors[_0x570b63(0x1e8)](_0x570b63(0x1c6),_0x570b63(0x1ed)+JSON[_0x570b63(0x1dc)](_0x17bb6a)+_0x570b63(0x1fa)+JSON[_0x570b63(0x1dc)](_0xbcce40));}function buildBackendPayload(_0x5dd295,_0x324b4f,_0x57aa6f){const _0x24afcf=a57_0x429451;return{'appCode':_0x5dd295,'datasetCode':_0x324b4f[_0x24afcf(0x1f7)],'businessGroup':_0x57aa6f};}function normalizeBusinessGroup(_0x26154b){const _0x838377=a57_0x429451;if(_0x26154b===undefined||_0x26154b===null)return'';return String(_0x26154b)[_0x838377(0x1dd)]();}function asPlainObject(_0x504824){const _0x31614e=a57_0x429451;if(!_0x504824||typeof _0x504824!==_0x31614e(0x1ec)||Array[_0x31614e(0x1d6)](_0x504824))return{};return _0x504824;}function firstString(..._0x4194d1){const _0x209c42=a57_0x429451;for(const _0x3c278a of _0x4194d1){if(typeof _0x3c278a===_0x209c42(0x1e4)&&_0x3c278a[_0x209c42(0x1dd)]())return _0x3c278a[_0x209c42(0x1dd)]();if(typeof _0x3c278a===_0x209c42(0x1d0)&&Number[_0x209c42(0x1e7)](_0x3c278a))return String(_0x3c278a);}return undefined;}function firstNumber(..._0x350099){const _0x4481bf=a57_0x429451;for(const _0x2ab647 of _0x350099){if(typeof _0x2ab647===_0x4481bf(0x1d0)&&Number[_0x4481bf(0x1e7)](_0x2ab647))return _0x2ab647;if(typeof _0x2ab647==='string'&&_0x2ab647[_0x4481bf(0x1dd)]()&&Number[_0x4481bf(0x1e7)](Number(_0x2ab647)))return Number(_0x2ab647);}return null;}function trim(_0x587589){const _0x2df0a3=a57_0x429451;return String(_0x587589||'')[_0x2df0a3(0x1dd)]();}
@@ -1 +1 @@
1
- const a57_0x180f54=a57_0x17a0;(function(_0x32b632,_0x3a8aac){const _0x392877=a57_0x17a0,_0x29f3cb=_0x32b632();while(!![]){try{const _0x520242=parseInt(_0x392877(0xf5))/0x1*(parseInt(_0x392877(0x117))/0x2)+parseInt(_0x392877(0x107))/0x3*(parseInt(_0x392877(0xf9))/0x4)+-parseInt(_0x392877(0xf8))/0x5*(-parseInt(_0x392877(0x109))/0x6)+-parseInt(_0x392877(0xfe))/0x7+-parseInt(_0x392877(0x101))/0x8*(parseInt(_0x392877(0xfc))/0x9)+parseInt(_0x392877(0xf6))/0xa+parseInt(_0x392877(0x10d))/0xb*(-parseInt(_0x392877(0x105))/0xc);if(_0x520242===_0x3a8aac)break;else _0x29f3cb['push'](_0x29f3cb['shift']());}catch(_0x41856c){_0x29f3cb['push'](_0x29f3cb['shift']());}}}(a57_0xcb7f,0x89f7c));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a57_0x180f54(0x113)};export const RUNTIME_DATA_ACCESS_SUMMARY=a57_0x180f54(0x10b);function valueToString(_0x35d58c){const _0x2bf43d=a57_0x180f54;return _0x35d58c==null?'':String(_0x35d58c)[_0x2bf43d(0x112)]();}function getDatasetCode(_0x319501){const _0x311b12=a57_0x180f54;return valueToString(_0x319501[_0x311b12(0xfa)]??_0x319501[_0x311b12(0x115)]??_0x319501[_0x311b12(0xf4)]?.[_0x311b12(0x110)]);}function getDatasetName(_0x4cf74f){const _0xb0d213=a57_0x180f54;return valueToString(_0x4cf74f['name']??_0x4cf74f[_0xb0d213(0xf4)]?.[_0xb0d213(0x10a)])||_0xb0d213(0x10c);}function getDatasetSource(_0x42689e){const _0x10ecd2=a57_0x180f54;return valueToString(_0x42689e[_0x10ecd2(0xfb)]??_0x42689e[_0x10ecd2(0xf4)]?.[_0x10ecd2(0x100)])[_0x10ecd2(0x104)]();}function getDbtableConfig(_0x4ec725){const _0x1dabaf=a57_0x180f54,_0x31192b=_0x4ec725['dbtableConfig']??_0x4ec725[_0x1dabaf(0x103)];return _0x31192b&&typeof _0x31192b==='object'?_0x31192b:{};}export function isDbTableBackedDataset(_0x5c3029){const _0x355cff=a57_0x180f54,_0x3ef0ba=getDatasetSource(_0x5c3029);if(_0x3ef0ba===_0x355cff(0x116))return![];const _0x34f9c9=getDbtableConfig(_0x5c3029),_0x48df4a=_0x34f9c9['dbId']??_0x34f9c9['id'],_0x4e3163=valueToString(_0x34f9c9[_0x355cff(0x114)]??_0x5c3029['tableName']??_0x5c3029[_0x355cff(0xf4)]?.[_0x355cff(0x114)]);return _0x48df4a!==undefined&&_0x48df4a!==null&&_0x4e3163[_0x355cff(0x102)]>0x0;}function a57_0x17a0(_0x310ee7,_0x4bff0f){_0x310ee7=_0x310ee7-0xf3;const _0xcb7f84=a57_0xcb7f();let _0x17a0f6=_0xcb7f84[_0x310ee7];return _0x17a0f6;}export function filterDbTableBackedDatasets(_0x50e101){const _0x9a38f2=a57_0x180f54;return _0x50e101[_0x9a38f2(0x118)](_0x126ee1=>isDbTableBackedDataset(_0x126ee1));}export function buildDbTableBackedRequirementMessage(_0x433af9,_0x227c7c=a57_0x180f54(0x106)){const _0xb0d036=a57_0x180f54,_0x395499=getDatasetSource(_0x433af9)||_0xb0d036(0x119),_0x5091cb=getDatasetName(_0x433af9),_0x4c4da9=getDatasetCode(_0x433af9),_0x383190=_0x4c4da9?'\x20('+_0x4c4da9+')':'';return[_0xb0d036(0x111)+_0x5091cb+'\x22'+_0x383190+_0xb0d036(0xfd)+_0x395499+_0xb0d036(0xf7)+_0x227c7c+_0xb0d036(0x108),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0xb0d036(0x10e),_0xb0d036(0x10f)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0xb0d036(0xf3)]('\x20');}export function assertDatasetIsDbTableBacked(_0x631052,_0x488404){const _0x245016=a57_0x180f54;if(!isDbTableBackedDataset(_0x631052))throw CliErrors[_0x245016(0xff)](buildDbTableBackedRequirementMessage(_0x631052,_0x488404));}function a57_0xcb7f(){const _0x1a0d31=['trim','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','tableName','modelCode','METADATA','21138MXKwxQ','filter','UNKNOWN','join','dataset','97JfMTyl','7662930MQwfmz','\x20类型,没有可用于\x20','595HSoYEY','321224haqGXo','code','source','117Nqkvtr','\x20是\x20','4677470oQlfuh','validation','sourceType','450896vmbMSj','length','dbtable','toUpperCase','12BwWBuL','SQL\x20schema\x20validation','9KgehpE','\x20的\x20DB_TABLE\x20数据源上下文。','46902DbXcMN','datasetName','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','unknown','10962545lCHIKn','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','datasetCode','当前数据集\x20\x22'];a57_0xcb7f=function(){return _0x1a0d31;};return a57_0xcb7f();}
1
+ const a58_0x9973bb=a58_0x352c;(function(_0x251ba1,_0x293aff){const _0x46574a=a58_0x352c,_0x578dfb=_0x251ba1();while(!![]){try{const _0x5a0a93=parseInt(_0x46574a(0x147))/0x1*(parseInt(_0x46574a(0x134))/0x2)+parseInt(_0x46574a(0x149))/0x3+-parseInt(_0x46574a(0x131))/0x4+parseInt(_0x46574a(0x148))/0x5+parseInt(_0x46574a(0x145))/0x6*(-parseInt(_0x46574a(0x14a))/0x7)+-parseInt(_0x46574a(0x12f))/0x8+parseInt(_0x46574a(0x14e))/0x9;if(_0x5a0a93===_0x293aff)break;else _0x578dfb['push'](_0x578dfb['shift']());}catch(_0x1e2ddc){_0x578dfb['push'](_0x578dfb['shift']());}}}(a58_0xb84e,0xf2967));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a58_0x9973bb(0x14c),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','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=a58_0x9973bb(0x14b);function valueToString(_0x28bb0b){return _0x28bb0b==null?'':String(_0x28bb0b)['trim']();}function a58_0xb84e(){const _0x85e14=['UNKNOWN','\x20是\x20','当前数据集\x20\x22','6TnFThK','dataset','6fOJwpx','6066565tVYiBU','1559502egXYul','12814669nZurSZ','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','lovrabet','source','17638956fZssVa','SQL\x20schema\x20validation','dbId','1173888jquxFS','filter','7484100sUoPnJ','datasetCode','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','383012CkdlOI','dbtableConfig','\x20的\x20DB_TABLE\x20数据源上下文。','name','modelCode','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','code','validation','length','unknown','join','datasetName','METADATA','tableName'];a58_0xb84e=function(){return _0x85e14;};return a58_0xb84e();}function getDatasetCode(_0x443450){const _0x682a3b=a58_0x9973bb;return valueToString(_0x443450[_0x682a3b(0x13a)]??_0x443450[_0x682a3b(0x138)]??_0x443450[_0x682a3b(0x146)]?.[_0x682a3b(0x132)]);}function getDatasetName(_0x4c1c7a){const _0x2c5693=a58_0x9973bb;return valueToString(_0x4c1c7a[_0x2c5693(0x137)]??_0x4c1c7a['dataset']?.[_0x2c5693(0x13f)])||_0x2c5693(0x13d);}function getDatasetSource(_0xa1d4e5){const _0x421a67=a58_0x9973bb;return valueToString(_0xa1d4e5[_0x421a67(0x14d)]??_0xa1d4e5['dataset']?.['sourceType'])['toUpperCase']();}function getDbtableConfig(_0x6e44e3){const _0x5868f2=a58_0x9973bb,_0x48370d=_0x6e44e3[_0x5868f2(0x135)]??_0x6e44e3['dbtable'];return _0x48370d&&typeof _0x48370d==='object'?_0x48370d:{};}function a58_0x352c(_0x4e166b,_0x3435cb){_0x4e166b=_0x4e166b-0x12f;const _0xb84ee8=a58_0xb84e();let _0x352cfb=_0xb84ee8[_0x4e166b];return _0x352cfb;}export function isDbTableBackedDataset(_0x150e59){const _0x566096=a58_0x9973bb,_0x5e31e8=getDatasetSource(_0x150e59);if(_0x5e31e8===_0x566096(0x140))return![];const _0xebcca9=getDbtableConfig(_0x150e59),_0x10fd32=_0xebcca9[_0x566096(0x150)]??_0xebcca9['id'],_0x3cc9f2=valueToString(_0xebcca9[_0x566096(0x141)]??_0x150e59[_0x566096(0x141)]??_0x150e59['dataset']?.['tableName']);return _0x10fd32!==undefined&&_0x10fd32!==null&&_0x3cc9f2[_0x566096(0x13c)]>0x0;}export function filterDbTableBackedDatasets(_0x1a9573){const _0x179e44=a58_0x9973bb;return _0x1a9573[_0x179e44(0x130)](_0xe34122=>isDbTableBackedDataset(_0xe34122));}export function buildDbTableBackedRequirementMessage(_0x298569,_0x578b14=a58_0x9973bb(0x14f)){const _0x5a21e5=a58_0x9973bb,_0x29d269=getDatasetSource(_0x298569)||_0x5a21e5(0x142),_0x36b7e6=getDatasetName(_0x298569),_0x212369=getDatasetCode(_0x298569),_0x442e7b=_0x212369?'\x20('+_0x212369+')':'';return[_0x5a21e5(0x144)+_0x36b7e6+'\x22'+_0x442e7b+_0x5a21e5(0x143)+_0x29d269+'\x20类型,没有可用于\x20'+_0x578b14+_0x5a21e5(0x136),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0x5a21e5(0x139),_0x5a21e5(0x133)+RUNTIME_DATA_ACCESS_COMMANDS[_0x5a21e5(0x130)]+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x5a21e5(0x13e)]('\x20');}export function assertDatasetIsDbTableBacked(_0x57c307,_0x299d0c){const _0x189e29=a58_0x9973bb;if(!isDbTableBackedDataset(_0x57c307))throw CliErrors[_0x189e29(0x13b)](buildDbTableBackedRequirementMessage(_0x57c307,_0x299d0c));}
@@ -1 +1 @@
1
- const a58_0x363461=a58_0x1b49;function a58_0x1b49(_0x26ba19,_0x6ce895){_0x26ba19=_0x26ba19-0x15e;const _0x47afd1=a58_0x47af();let _0x1b4947=_0x47afd1[_0x26ba19];return _0x1b4947;}(function(_0x54c16b,_0x3f8561){const _0x416009=a58_0x1b49,_0x173adb=_0x54c16b();while(!![]){try{const _0xba81c6=parseInt(_0x416009(0x175))/0x1+-parseInt(_0x416009(0x170))/0x2*(-parseInt(_0x416009(0x171))/0x3)+-parseInt(_0x416009(0x18e))/0x4*(parseInt(_0x416009(0x188))/0x5)+-parseInt(_0x416009(0x17d))/0x6+parseInt(_0x416009(0x190))/0x7+-parseInt(_0x416009(0x17e))/0x8*(parseInt(_0x416009(0x163))/0x9)+parseInt(_0x416009(0x193))/0xa*(parseInt(_0x416009(0x174))/0xb);if(_0xba81c6===_0x3f8561)break;else _0x173adb['push'](_0x173adb['shift']());}catch(_0xd4cfea){_0x173adb['push'](_0x173adb['shift']());}}}(a58_0x47af,0xa8629));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a58_0x363461(0x185),'description':a58_0x363461(0x191)},DBID_FLAG={'name':'dbid','type':'number','description':a58_0x363461(0x160)},CONFIRM_FLAG={'name':a58_0x363461(0x186),'type':a58_0x363461(0x17b),'description':a58_0x363461(0x187)},EXPECTED_COUNT_FLAG={'name':a58_0x363461(0x165),'type':a58_0x363461(0x185),'description':a58_0x363461(0x172)};function a58_0x47af(){const _0x29a63c=['/smartapi/dataset/delete-dataset','No\x20undeleted\x20dataset\x20found\x20for\x20','number','confirm','Required\x20to\x20execute\x20dataset\x20deletion','10JGrNDK','num','relationPages','push','appCode','dbName','2708876XqMsLn','\x20dataset(s);\x20','5193692PkVSBb','Dataset\x20id','dataset','4805430YfnXNl','map','description','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','tableName','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','558iQsnMD','filter','expected-count','validation','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','length','id=','bool','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','delete','Would\x20delete\x20','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','6CIpBfW','1173294IThzjr','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','code','11zruOuF','330137CfIqPF','str','message','name','\x20failed','dbId','boolean','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','550026PqXGja','76144hlRPiz','dbid','\x20dataset(s)','POST','dbtableConfig'];a58_0x47af=function(){return _0x29a63c;};return a58_0x47af();}export const datasetDelete={'service':a58_0x363461(0x192),'command':a58_0x363461(0x16d),'description':a58_0x363461(0x16b),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e48a7){const _0xec74b6=a58_0x363461,_0x1ccdc4=_0x5e48a7[_0xec74b6(0x189)]('id'),_0x5e2c00=_0x5e48a7[_0xec74b6(0x176)](_0xec74b6(0x173)),_0x186134=_0x5e48a7[_0xec74b6(0x189)]('dbid'),_0xb595c2=[_0x1ccdc4>0x0,Boolean(_0x5e2c00),_0x186134>0x0][_0xec74b6(0x164)](Boolean);if(_0xb595c2['length']===0x0)throw CliErrors[_0xec74b6(0x166)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0xb595c2[_0xec74b6(0x168)]>0x1)throw CliErrors['validation'](_0xec74b6(0x162));},async 'dryRun'(_0xa3bff7){const _0x55ec25=a58_0x363461,_0x217f62=await resolveTargets(_0xa3bff7);return{'method':_0x55ec25(0x181),'url':_0x55ec25(0x183),'body':{'appCode':_0xa3bff7[_0x55ec25(0x18c)],'count':_0x217f62[_0x55ec25(0x168)],'datasets':_0x217f62},'description':_0x55ec25(0x16e)+_0x217f62[_0x55ec25(0x168)]+_0x55ec25(0x16f)};},async 'execute'(_0x4a2759){const _0x49d908=a58_0x363461;if(!_0x4a2759[_0x49d908(0x16a)](_0x49d908(0x186)))throw CliErrors[_0x49d908(0x166)](_0x49d908(0x16c),_0x49d908(0x17c));const _0x44e8ee=await resolveTargets(_0x4a2759),_0x548f62=[],_0x1f594f=[];for(const _0xf26729 of _0x44e8ee){try{await deleteDataset(_0x4a2759['appCode'],_0xf26729['id']),_0x548f62[_0x49d908(0x18b)](_0xf26729);}catch(_0x54cdfa){_0x1f594f[_0x49d908(0x18b)]({..._0xf26729,'error':_0x54cdfa instanceof Error?_0x54cdfa[_0x49d908(0x177)]:String(_0x54cdfa)});}}if(_0x1f594f[_0x49d908(0x168)]>0x0)return{'ok':![],'data':{'requested':_0x44e8ee[_0x49d908(0x168)],'deletedCount':_0x548f62[_0x49d908(0x168)],'failedCount':_0x1f594f['length'],'deleted':_0x548f62,'failed':_0x1f594f},'message':'Deleted\x20'+_0x548f62[_0x49d908(0x168)]+'/'+_0x44e8ee[_0x49d908(0x168)]+_0x49d908(0x18f)+_0x1f594f[_0x49d908(0x168)]+_0x49d908(0x179)};return{'ok':!![],'data':{'requested':_0x44e8ee['length'],'deletedCount':_0x548f62[_0x49d908(0x168)],'deleted':_0x548f62},'message':'Deleted\x20'+_0x548f62[_0x49d908(0x168)]+_0x49d908(0x180)};}};async function resolveTargets(_0x2fcb11){const _0x22cd10=a58_0x363461,_0x4aed73=_0x2fcb11[_0x22cd10(0x189)]('id'),_0x4d4184=_0x2fcb11['str'](_0x22cd10(0x173)),_0x5aa6d5=_0x2fcb11['num'](_0x22cd10(0x17f));let _0x17746d;_0x4d4184?(_0x17746d=await listDatasets(_0x2fcb11[_0x22cd10(0x18c)],{'code':_0x4d4184}),_0x17746d=_0x17746d[_0x22cd10(0x164)](_0x226ac1=>_0x226ac1[_0x22cd10(0x173)]===_0x4d4184)):(_0x17746d=await listDatasets(_0x2fcb11[_0x22cd10(0x18c)]),_0x4aed73>0x0&&(_0x17746d=_0x17746d[_0x22cd10(0x164)](_0x2d8cd1=>_0x2d8cd1['id']===_0x4aed73)),_0x5aa6d5>0x0&&(_0x17746d=_0x17746d[_0x22cd10(0x164)](_0x6a57e2=>_0x6a57e2[_0x22cd10(0x182)]?.[_0x22cd10(0x17a)]===_0x5aa6d5)));const _0x44ba4=_0x17746d[_0x22cd10(0x15e)](normalizeTarget);if(_0x44ba4[_0x22cd10(0x168)]===0x0){const _0x2af648=_0x4d4184||(_0x4aed73>0x0?_0x22cd10(0x169)+_0x4aed73:'dbid='+_0x5aa6d5);throw CliErrors[_0x22cd10(0x166)](_0x22cd10(0x184)+_0x2af648+'.');}const _0x16a96d=_0x2fcb11[_0x22cd10(0x189)]('expected-count');if(_0x16a96d>0x0&&_0x44ba4[_0x22cd10(0x168)]!==_0x16a96d)throw CliErrors['validation']('Matched\x20'+_0x44ba4['length']+_0x22cd10(0x167)+_0x16a96d+'.');return _0x44ba4;}function normalizeTarget(_0x13a3af){const _0x348fb8=a58_0x363461,_0xed1c30=_0x13a3af[_0x348fb8(0x182)]??{};return{'id':_0x13a3af['id'],'code':_0x13a3af[_0x348fb8(0x173)],'name':_0x13a3af[_0x348fb8(0x178)],'description':_0x13a3af[_0x348fb8(0x15f)],'source':_0x13a3af['source'],'dbId':_0xed1c30[_0x348fb8(0x17a)],'dbName':_0xed1c30[_0x348fb8(0x18d)],'tableName':_0xed1c30[_0x348fb8(0x161)],'relatedPageCount':Array['isArray'](_0x13a3af['relationPages'])?_0x13a3af[_0x348fb8(0x18a)][_0x348fb8(0x168)]:undefined};}
1
+ const a59_0x4ab409=a59_0x3afa;(function(_0x37a65a,_0x46d1e6){const _0x494580=a59_0x3afa,_0x161c3d=_0x37a65a();while(!![]){try{const _0x4fe044=parseInt(_0x494580(0x10e))/0x1+parseInt(_0x494580(0xe5))/0x2*(parseInt(_0x494580(0xed))/0x3)+-parseInt(_0x494580(0xf3))/0x4*(-parseInt(_0x494580(0xfa))/0x5)+parseInt(_0x494580(0x114))/0x6*(-parseInt(_0x494580(0x103))/0x7)+-parseInt(_0x494580(0xf7))/0x8+-parseInt(_0x494580(0xfd))/0x9*(-parseInt(_0x494580(0xe8))/0xa)+parseInt(_0x494580(0x110))/0xb;if(_0x4fe044===_0x46d1e6)break;else _0x161c3d['push'](_0x161c3d['shift']());}catch(_0x5d5a83){_0x161c3d['push'](_0x161c3d['shift']());}}}(a59_0x56b6,0xc9e12));import{deleteDataset,listDatasets}from'../../core/api-client.js';function a59_0x3afa(_0x270150,_0x4bb456){_0x270150=_0x270150-0xe5;const _0x56b6a6=a59_0x56b6();let _0x3afa46=_0x56b6a6[_0x270150];return _0x3afa46;}import{CliErrors}from'../../errors.js';function a59_0x56b6(){const _0x5693ea=['str','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','10583573dsqGuF','tableName','name','num','length','Would\x20delete\x20','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','id=','isArray','dbName','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','1253057GPbwkH','source','639034HylYeP','dbId','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','/smartapi/dataset/delete-dataset','6hIAOnM','filter','dbtableConfig','82gyekMF','\x20dataset(s);\x20','description','534430CCHYKm','Deleted\x20','message','bool','boolean','18852zeSfZg','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','No\x20undeleted\x20dataset\x20found\x20for\x20','number','Required\x20to\x20execute\x20dataset\x20deletion','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','31592PzHBYj','Matched\x20','relationPages','validation','9679864KcFQDd','appCode','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','340MWthVD','delete','confirm','243iDDSFL','dbid','code','dataset'];a59_0x56b6=function(){return _0x5693ea;};return a59_0x56b6();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':'number','description':'Dataset\x20id'},DBID_FLAG={'name':a59_0x4ab409(0xfe),'type':'number','description':a59_0x4ab409(0x10d)},CONFIRM_FLAG={'name':a59_0x4ab409(0xfc),'type':a59_0x4ab409(0xec),'description':a59_0x4ab409(0xf1)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a59_0x4ab409(0xf0),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a59_0x4ab409(0x100),'command':a59_0x4ab409(0xfb),'description':a59_0x4ab409(0xf9),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x32eaea){const _0x21421f=a59_0x4ab409,_0x578593=_0x32eaea[_0x21421f(0x106)]('id'),_0x32bd1f=_0x32eaea[_0x21421f(0x101)](_0x21421f(0xff)),_0xf2035c=_0x32eaea[_0x21421f(0x106)]('dbid'),_0x1bd401=[_0x578593>0x0,Boolean(_0x32bd1f),_0xf2035c>0x0]['filter'](Boolean);if(_0x1bd401['length']===0x0)throw CliErrors[_0x21421f(0xf6)](_0x21421f(0xf2));if(_0x1bd401[_0x21421f(0x107)]>0x1)throw CliErrors[_0x21421f(0xf6)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x36f13d){const _0x1ab6af=a59_0x4ab409,_0xf650e3=await resolveTargets(_0x36f13d);return{'method':'POST','url':_0x1ab6af(0x113),'body':{'appCode':_0x36f13d[_0x1ab6af(0xf8)],'count':_0xf650e3['length'],'datasets':_0xf650e3},'description':_0x1ab6af(0x108)+_0xf650e3[_0x1ab6af(0x107)]+_0x1ab6af(0x112)};},async 'execute'(_0x349595){const _0x51b5ef=a59_0x4ab409;if(!_0x349595[_0x51b5ef(0xeb)](_0x51b5ef(0xfc)))throw CliErrors[_0x51b5ef(0xf6)](_0x51b5ef(0x102),_0x51b5ef(0x109));const _0xa7701b=await resolveTargets(_0x349595),_0x5f05d0=[],_0x15c603=[];for(const _0xcaf324 of _0xa7701b){try{await deleteDataset(_0x349595[_0x51b5ef(0xf8)],_0xcaf324['id']),_0x5f05d0['push'](_0xcaf324);}catch(_0x121b66){_0x15c603['push']({..._0xcaf324,'error':_0x121b66 instanceof Error?_0x121b66[_0x51b5ef(0xea)]:String(_0x121b66)});}}if(_0x15c603[_0x51b5ef(0x107)]>0x0)return{'ok':![],'data':{'requested':_0xa7701b[_0x51b5ef(0x107)],'deletedCount':_0x5f05d0[_0x51b5ef(0x107)],'failedCount':_0x15c603[_0x51b5ef(0x107)],'deleted':_0x5f05d0,'failed':_0x15c603},'message':_0x51b5ef(0xe9)+_0x5f05d0[_0x51b5ef(0x107)]+'/'+_0xa7701b[_0x51b5ef(0x107)]+_0x51b5ef(0xe6)+_0x15c603[_0x51b5ef(0x107)]+'\x20failed'};return{'ok':!![],'data':{'requested':_0xa7701b[_0x51b5ef(0x107)],'deletedCount':_0x5f05d0[_0x51b5ef(0x107)],'deleted':_0x5f05d0},'message':'Deleted\x20'+_0x5f05d0[_0x51b5ef(0x107)]+'\x20dataset(s)'};}};async function resolveTargets(_0x57c988){const _0x1489a1=a59_0x4ab409,_0x5a862d=_0x57c988[_0x1489a1(0x106)]('id'),_0x3995b5=_0x57c988[_0x1489a1(0x101)](_0x1489a1(0xff)),_0xc4cc8c=_0x57c988[_0x1489a1(0x106)](_0x1489a1(0xfe));let _0x3bd2f1;_0x3995b5?(_0x3bd2f1=await listDatasets(_0x57c988['appCode'],{'code':_0x3995b5}),_0x3bd2f1=_0x3bd2f1[_0x1489a1(0x115)](_0x2fc390=>_0x2fc390['code']===_0x3995b5)):(_0x3bd2f1=await listDatasets(_0x57c988[_0x1489a1(0xf8)]),_0x5a862d>0x0&&(_0x3bd2f1=_0x3bd2f1['filter'](_0x5b2782=>_0x5b2782['id']===_0x5a862d)),_0xc4cc8c>0x0&&(_0x3bd2f1=_0x3bd2f1[_0x1489a1(0x115)](_0x1bbd0f=>_0x1bbd0f['dbtableConfig']?.[_0x1489a1(0x111)]===_0xc4cc8c)));const _0x11899c=_0x3bd2f1['map'](normalizeTarget);if(_0x11899c[_0x1489a1(0x107)]===0x0){const _0x2cad98=_0x3995b5||(_0x5a862d>0x0?_0x1489a1(0x10a)+_0x5a862d:'dbid='+_0xc4cc8c);throw CliErrors[_0x1489a1(0xf6)](_0x1489a1(0xef)+_0x2cad98+'.');}const _0x5cca90=_0x57c988['num']('expected-count');if(_0x5cca90>0x0&&_0x11899c[_0x1489a1(0x107)]!==_0x5cca90)throw CliErrors[_0x1489a1(0xf6)](_0x1489a1(0xf4)+_0x11899c[_0x1489a1(0x107)]+_0x1489a1(0xee)+_0x5cca90+'.');return _0x11899c;}function normalizeTarget(_0x320985){const _0x2d5756=a59_0x4ab409,_0x587111=_0x320985[_0x2d5756(0x116)]??{};return{'id':_0x320985['id'],'code':_0x320985[_0x2d5756(0xff)],'name':_0x320985[_0x2d5756(0x105)],'description':_0x320985[_0x2d5756(0xe7)],'source':_0x320985[_0x2d5756(0x10f)],'dbId':_0x587111[_0x2d5756(0x111)],'dbName':_0x587111[_0x2d5756(0x10c)],'tableName':_0x587111[_0x2d5756(0x104)],'relatedPageCount':Array[_0x2d5756(0x10b)](_0x320985[_0x2d5756(0xf5)])?_0x320985[_0x2d5756(0xf5)]['length']:undefined};}
@@ -1 +1 @@
1
- const a59_0x24847f=a59_0x464a;function a59_0x464a(_0x3ae718,_0x577a82){_0x3ae718=_0x3ae718-0x17f;const _0x86f246=a59_0x86f2();let _0x464a7a=_0x86f246[_0x3ae718];return _0x464a7a;}(function(_0x28d142,_0x5c0d16){const _0x35aa97=a59_0x464a,_0x5e3ee9=_0x28d142();while(!![]){try{const _0x55895d=parseInt(_0x35aa97(0x1bd))/0x1*(-parseInt(_0x35aa97(0x183))/0x2)+parseInt(_0x35aa97(0x190))/0x3+-parseInt(_0x35aa97(0x1a7))/0x4+-parseInt(_0x35aa97(0x1cb))/0x5*(parseInt(_0x35aa97(0x19a))/0x6)+parseInt(_0x35aa97(0x1ac))/0x7*(-parseInt(_0x35aa97(0x1c2))/0x8)+parseInt(_0x35aa97(0x1b4))/0x9*(-parseInt(_0x35aa97(0x1c5))/0xa)+parseInt(_0x35aa97(0x1b5))/0xb;if(_0x55895d===_0x5c0d16)break;else _0x5e3ee9['push'](_0x5e3ee9['shift']());}catch(_0x5f10d5){_0x5e3ee9['push'](_0x5e3ee9['shift']());}}}(a59_0x86f2,0xc271a));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x3c3634){const _0x45f729=a59_0x464a;if(_0x3c3634[_0x45f729(0x184)])return null;const _0x213171=Boolean(_0x3c3634[_0x45f729(0x1a1)]!==undefined||_0x3c3634[_0x45f729(0x192)]!==undefined);let _0x4619dc={};if(!_0x213171&&typeof _0x3c3634[_0x45f729(0x181)]===_0x45f729(0x1bf))try{_0x4619dc=JSON['parse'](_0x3c3634[_0x45f729(0x181)]);}catch{}const _0x1203c4=_0x213171?_0x3c3634[_0x45f729(0x1b3)]:_0x3c3634['code'],_0x4dce35=_0x213171?_0x3c3634[_0x45f729(0x1a1)]:_0x3c3634[_0x45f729(0x1b3)],_0x17a485=_0x213171?_0x3c3634['doType']:_0x3c3634[_0x45f729(0x1b1)]||_0x3c3634['dataType'],_0xb12303=_0x213171?_0x3c3634[_0x45f729(0x180)]===!![]:_0x4619dc[_0x45f729(0x180)]===!![],_0x3842d=_0x213171?_0x3c3634['required']===!![]:_0x4619dc['required']===!![],_0x3ab27c=_0x213171?_0x3c3634['options']??null:_0x4619dc[_0x45f729(0x1c3)]??null,_0x56593e={'name':_0x1203c4,'displayName':_0x4dce35||_0x1203c4,'type':_0x17a485,'dbType':_0x3c3634[_0x45f729(0x1b8)],'pk':_0xb12303,'required':_0x3842d,'description':_0x3c3634[_0x45f729(0x1b7)]||undefined};return Array[_0x45f729(0x19b)](_0x3ab27c)&&_0x3ab27c['length']>0x0&&(_0x56593e[_0x45f729(0x1c3)]=_0x3ab27c),_0x56593e;}function parseJsonMaybe(_0x1c98e9){const _0x5d2d2f=a59_0x464a;if(typeof _0x1c98e9!=='string')return _0x1c98e9;try{return JSON[_0x5d2d2f(0x191)](_0x1c98e9);}catch{return _0x1c98e9;}}function normalizeOperationEntry(_0x4ef1fe,_0x77d28a){const _0x14608b=a59_0x464a;if(!_0x77d28a||typeof _0x77d28a!==_0x14608b(0x199))return null;if(!_0x77d28a[_0x14608b(0x1b6)]||!_0x77d28a[_0x14608b(0x198)])return null;const _0x5062dd={'name':_0x4ef1fe,'method':_0x77d28a['method'],'path':_0x77d28a[_0x14608b(0x198)]};if(_0x77d28a[_0x14608b(0x194)])_0x5062dd[_0x14608b(0x194)]=_0x77d28a[_0x14608b(0x194)];if(_0x77d28a[_0x14608b(0x1a0)]!=null){const _0x416ca3=parseJsonMaybe(_0x77d28a[_0x14608b(0x1a0)]);_0x5062dd[_0x14608b(0x1a0)]=_0x416ca3;}if(_0x77d28a[_0x14608b(0x1b0)]!=null){const _0x1b313e=parseJsonMaybe(_0x77d28a[_0x14608b(0x1b0)]);_0x5062dd['responseBody']=_0x1b313e;}if(_0x77d28a[_0x14608b(0x1ae)]!=null)_0x5062dd[_0x14608b(0x1ae)]=_0x77d28a[_0x14608b(0x1ae)];if(_0x77d28a[_0x14608b(0x1a9)]!=null)_0x5062dd[_0x14608b(0x1a9)]=_0x77d28a[_0x14608b(0x1a9)];if(Array[_0x14608b(0x19b)](_0x77d28a[_0x14608b(0x185)]))_0x5062dd[_0x14608b(0x185)]=_0x77d28a[_0x14608b(0x185)];if(Array[_0x14608b(0x19b)](_0x77d28a[_0x14608b(0x1c7)]))_0x5062dd[_0x14608b(0x1c7)]=_0x77d28a['responseFields'];return _0x5062dd;}function summarizeDbtable(_0x9e4809){const _0x1da59f=a59_0x464a,_0x1acbe1={},_0x488889=[_0x1da59f(0x18e),_0x1da59f(0x18d),_0x1da59f(0x1a8),_0x1da59f(0x19d),_0x1da59f(0x180),'allFields',_0x1da59f(0x188),_0x1da59f(0x1b2),_0x1da59f(0x19e),_0x1da59f(0x1a6),_0x1da59f(0x17f),_0x1da59f(0x186),_0x1da59f(0x182),_0x1da59f(0x18f),_0x1da59f(0x1b9)];for(const _0x17364d of _0x488889){if(_0x9e4809[_0x17364d]!==undefined)_0x1acbe1[_0x17364d]=_0x9e4809[_0x17364d];}return typeof _0x1acbe1['allFields']===_0x1da59f(0x1bf)&&_0x1acbe1[_0x1da59f(0x1a2)][_0x1da59f(0x1c8)]>0x0&&(_0x1acbe1[_0x1da59f(0x19f)]=_0x1acbe1[_0x1da59f(0x1a2)][_0x1da59f(0x193)](',')[_0x1da59f(0x1ab)](_0x4b5be4=>_0x4b5be4[_0x1da59f(0x1af)]())[_0x1da59f(0x1c4)](Boolean)),_0x1acbe1;}function a59_0x86f2(){const _0x47e835=['10639727cTXQFI','relations','beforeScriptId','trim','responseBody','type','createTimeField','name','126iBGTNi','34490676OSwSbU','method','description','dbType','dblinkInfoDTO','detail','properties','dataset','68sXEadh','code','string','validateRules','toDatasetName','8LJvwLo','options','filter','1028740xgNmEQ','columnCodeListWithDeleted','responseFields','length','modelId','toField','101605EbqxeH','creatorNameField','pkField','extend','modifierNameField','4772SOaHqy','deleted','requestFields','modifierIdField','doVersion','logicField','toTableName','operations','tableComment','dbtableConfig','dbName','dbId','labelField','3945681oJeygz','parse','doType','split','host','fromField','str','toDatasetCode','path','object','12quUIvV','isArray','push','datasetKey','updateTimeField','allFieldNames','requestBody','displayName','allFields','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','source','modelCode','creatorIdField','1964856ahaTgD','tableName','afterScriptId','indexes','map'];a59_0x86f2=function(){return _0x47e835;};return a59_0x86f2();}function normalizeRelatedPages(_0x3a4989){const _0x5125e0=a59_0x464a;if(!Array[_0x5125e0(0x19b)](_0x3a4989))return[];return _0x3a4989[_0x5125e0(0x1c4)](_0x36896c=>_0x36896c&&typeof _0x36896c===_0x5125e0(0x199))[_0x5125e0(0x1ab)](_0x24e48c=>({'id':_0x24e48c['id'],'type':_0x24e48c['type'],'code':_0x24e48c['code'],'title':_0x24e48c['title'],'deleted':_0x24e48c[_0x5125e0(0x184)]===!![]}));}export const datasetDetail={'service':'dataset','command':a59_0x24847f(0x1ba),'description':a59_0x24847f(0x1a3),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x214058){const _0x32e94b=a59_0x24847f,_0x1ba2e5=await getDatasetDetail(_0x214058[_0x32e94b(0x196)]('code')),_0x2c5a25=Array[_0x32e94b(0x19b)](_0x1ba2e5['fields'])?_0x1ba2e5['fields']:Array[_0x32e94b(0x19b)](_0x1ba2e5[_0x32e94b(0x1bb)])?_0x1ba2e5['properties']:[],_0x12411c=_0x2c5a25[_0x32e94b(0x1ab)](_0x26f094=>normalizeField(_0x26f094))[_0x32e94b(0x1c4)](_0x387c57=>_0x387c57!==null),_0x861ac2=_0x1ba2e5[_0x32e94b(0x18a)]??{},_0x847dca=[];for(const [_0x465c12,_0x4fa93a]of Object['entries'](_0x861ac2)){const _0xfe01b1=normalizeOperationEntry(_0x465c12,_0x4fa93a);if(_0xfe01b1)_0x847dca[_0x32e94b(0x19c)](_0xfe01b1);}const _0xdfc8ff=_0x1ba2e5[_0x32e94b(0x18c)]??{},_0x14e573=_0x1ba2e5[_0x32e94b(0x1bc)]??{},_0x3b4ad3=_0xdfc8ff[_0x32e94b(0x18e)]!=null?{'id':_0xdfc8ff['dbId'],'name':_0xdfc8ff[_0x32e94b(0x18d)]??null}:undefined;let _0x11c952;return typeof _0x1ba2e5[_0x32e94b(0x181)]==='string'&&(_0x11c952=parseJsonMaybe(_0x1ba2e5[_0x32e94b(0x181)])),{'ok':!![],'data':{'id':_0x1ba2e5[_0x32e94b(0x1c9)]??_0x1ba2e5['id'],'name':_0x1ba2e5['name'],'code':_0x1ba2e5[_0x32e94b(0x1a5)]||_0x1ba2e5[_0x32e94b(0x1be)],'doVersion':_0x1ba2e5[_0x32e94b(0x187)],'description':_0x1ba2e5[_0x32e94b(0x1b7)]||_0x14e573[_0x32e94b(0x18b)]||undefined,'source':_0x1ba2e5[_0x32e94b(0x1a4)]||_0x14e573['sourceType'],'table':_0xdfc8ff[_0x32e94b(0x1a8)]||_0x14e573[_0x32e94b(0x1a8)],'datasetKey':_0xdfc8ff[_0x32e94b(0x19d)],'pk':_0xdfc8ff[_0x32e94b(0x180)],'db':_0x3b4ad3,'dbtable':summarizeDbtable(_0xdfc8ff),'fields':_0x12411c,'operations':_0x847dca,'indexes':Array['isArray'](_0x14e573[_0x32e94b(0x1aa)])?_0x14e573['indexes']:[],'relations':Array[_0x32e94b(0x19b)](_0x1ba2e5[_0x32e94b(0x1ad)])?_0x1ba2e5[_0x32e94b(0x1ad)][_0x32e94b(0x1ab)](_0x38043b=>({'fromField':_0x38043b[_0x32e94b(0x195)],'toDataset':_0x38043b[_0x32e94b(0x1c1)],'toCode':_0x38043b[_0x32e94b(0x197)],'toTable':_0x38043b[_0x32e94b(0x189)],'toField':_0x38043b[_0x32e94b(0x1ca)],'labelField':_0x38043b['toFieldLabel']||undefined})):[],'relatedPages':normalizeRelatedPages(_0x1ba2e5['relatedPageInfoList']),...Array[_0x32e94b(0x19b)](_0x1ba2e5[_0x32e94b(0x1c6)])?{'columnCodeListWithDeleted':_0x1ba2e5[_0x32e94b(0x1c6)]}:{},'formatRules':Array[_0x32e94b(0x19b)](_0x1ba2e5['formatRules'])?_0x1ba2e5['formatRules']:[],'validateRules':Array['isArray'](_0x1ba2e5[_0x32e94b(0x1c0)])?_0x1ba2e5[_0x32e94b(0x1c0)]:[],..._0x11c952!==undefined?{'extend':_0x11c952}:{},'stats':{'fieldCount':_0x12411c['length'],'operationCount':_0x847dca[_0x32e94b(0x1c8)]}}};}};
1
+ const a60_0x21bfeb=a60_0x1961;function a60_0x1961(_0xd49a6f,_0x322261){_0xd49a6f=_0xd49a6f-0xad;const _0x3e7fcd=a60_0x3e7f();let _0x196185=_0x3e7fcd[_0xd49a6f];return _0x196185;}(function(_0x760469,_0x4df978){const _0xbc5855=a60_0x1961,_0x54d9e5=_0x760469();while(!![]){try{const _0x53f930=-parseInt(_0xbc5855(0xf9))/0x1+parseInt(_0xbc5855(0xd3))/0x2*(-parseInt(_0xbc5855(0xe5))/0x3)+parseInt(_0xbc5855(0xc4))/0x4+-parseInt(_0xbc5855(0xd9))/0x5*(parseInt(_0xbc5855(0xe7))/0x6)+parseInt(_0xbc5855(0xf4))/0x7*(-parseInt(_0xbc5855(0xf3))/0x8)+parseInt(_0xbc5855(0xee))/0x9*(parseInt(_0xbc5855(0xae))/0xa)+parseInt(_0xbc5855(0xaf))/0xb;if(_0x53f930===_0x4df978)break;else _0x54d9e5['push'](_0x54d9e5['shift']());}catch(_0x5a7219){_0x54d9e5['push'](_0x54d9e5['shift']());}}}(a60_0x3e7f,0x4915a));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x4fc293){const _0x458e98=a60_0x1961;if(_0x4fc293['deleted'])return null;const _0x24dfe5=Boolean(_0x4fc293[_0x458e98(0xc7)]!==undefined||_0x4fc293[_0x458e98(0xde)]!==undefined);let _0x5c7e07={};if(!_0x24dfe5&&typeof _0x4fc293[_0x458e98(0xc3)]===_0x458e98(0xeb))try{_0x5c7e07=JSON[_0x458e98(0xd8)](_0x4fc293[_0x458e98(0xc3)]);}catch{}const _0x436240=_0x24dfe5?_0x4fc293['name']:_0x4fc293[_0x458e98(0xcf)],_0x5a6f17=_0x24dfe5?_0x4fc293[_0x458e98(0xc7)]:_0x4fc293['name'],_0x389ece=_0x24dfe5?_0x4fc293[_0x458e98(0xde)]:_0x4fc293[_0x458e98(0xad)]||_0x4fc293[_0x458e98(0xe8)],_0xa05609=_0x24dfe5?_0x4fc293['pkField']===!![]:_0x5c7e07[_0x458e98(0xc8)]===!![],_0x5b7ad2=_0x24dfe5?_0x4fc293[_0x458e98(0xb2)]===!![]:_0x5c7e07[_0x458e98(0xb2)]===!![],_0x283353=_0x24dfe5?_0x4fc293[_0x458e98(0xe0)]??null:_0x5c7e07[_0x458e98(0xe0)]??null,_0x30926b={'name':_0x436240,'displayName':_0x5a6f17||_0x436240,'type':_0x389ece,'dbType':_0x4fc293[_0x458e98(0xea)],'pk':_0xa05609,'required':_0x5b7ad2,'description':_0x4fc293['description']||undefined};return Array[_0x458e98(0xba)](_0x283353)&&_0x283353[_0x458e98(0xdb)]>0x0&&(_0x30926b[_0x458e98(0xe0)]=_0x283353),_0x30926b;}function parseJsonMaybe(_0x599ce8){const _0x51f686=a60_0x1961;if(typeof _0x599ce8!==_0x51f686(0xeb))return _0x599ce8;try{return JSON[_0x51f686(0xd8)](_0x599ce8);}catch{return _0x599ce8;}}function normalizeOperationEntry(_0x32727b,_0x1d139f){const _0xcd993c=a60_0x1961;if(!_0x1d139f||typeof _0x1d139f!=='object')return null;if(!_0x1d139f[_0xcd993c(0xe1)]||!_0x1d139f[_0xcd993c(0xbf)])return null;const _0x127f41={'name':_0x32727b,'method':_0x1d139f[_0xcd993c(0xe1)],'path':_0x1d139f[_0xcd993c(0xbf)]};if(_0x1d139f[_0xcd993c(0xbc)])_0x127f41[_0xcd993c(0xbc)]=_0x1d139f['host'];if(_0x1d139f[_0xcd993c(0xc9)]!=null){const _0x550300=parseJsonMaybe(_0x1d139f[_0xcd993c(0xc9)]);_0x127f41[_0xcd993c(0xc9)]=_0x550300;}if(_0x1d139f[_0xcd993c(0xd4)]!=null){const _0x1d6095=parseJsonMaybe(_0x1d139f[_0xcd993c(0xd4)]);_0x127f41['responseBody']=_0x1d6095;}if(_0x1d139f[_0xcd993c(0xd2)]!=null)_0x127f41['beforeScriptId']=_0x1d139f[_0xcd993c(0xd2)];if(_0x1d139f[_0xcd993c(0xb5)]!=null)_0x127f41[_0xcd993c(0xb5)]=_0x1d139f[_0xcd993c(0xb5)];if(Array[_0xcd993c(0xba)](_0x1d139f[_0xcd993c(0xcb)]))_0x127f41[_0xcd993c(0xcb)]=_0x1d139f[_0xcd993c(0xcb)];if(Array[_0xcd993c(0xba)](_0x1d139f[_0xcd993c(0xc6)]))_0x127f41['responseFields']=_0x1d139f[_0xcd993c(0xc6)];return _0x127f41;}function a60_0x3e7f(){const _0x8d0c05=['requestBody','properties','requestFields','alias','split','relations','code','relatedPageInfoList','allFields','beforeScriptId','12086BeGxyI','responseBody','creatorNameField','columnCodeListWithDeleted','allFieldNames','parse','5gvpCZJ','operations','length','source','modelId','doType','push','options','method','sourceType','trim','dblinkInfoDTO','159IpbnFp','modifierIdField','1995138TBioBD','dataType','fromField','dbType','string','deleted','datasetKey','227061bWjHlJ','str','filter','dbName','modifierNameField','55000qZBxGM','329dhMduK','detail','fields','doVersion','modelCode','159646SAhIpI','type','170yEjeot','5612640JlyCLJ','object','toField','required','title','tableName','afterScriptId','name','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','dataset','createTimeField','isArray','dbId','host','indexes','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','path','map','formatRules','dbtableConfig','extend','1983176SCxjMP','entries','responseFields','displayName','pkField'];a60_0x3e7f=function(){return _0x8d0c05;};return a60_0x3e7f();}function summarizeDbtable(_0x7ed523){const _0x4fd659=a60_0x1961,_0x12ec13={},_0x272a45=['dbId','dbName',_0x4fd659(0xb4),_0x4fd659(0xed),'pkField','allFields','logicField',_0x4fd659(0xb9),'updateTimeField','creatorIdField',_0x4fd659(0xd5),_0x4fd659(0xe6),_0x4fd659(0xf2),'labelField',_0x4fd659(0xe4)];for(const _0x5e4ed1 of _0x272a45){if(_0x7ed523[_0x5e4ed1]!==undefined)_0x12ec13[_0x5e4ed1]=_0x7ed523[_0x5e4ed1];}return typeof _0x12ec13[_0x4fd659(0xd1)]===_0x4fd659(0xeb)&&_0x12ec13[_0x4fd659(0xd1)][_0x4fd659(0xdb)]>0x0&&(_0x12ec13[_0x4fd659(0xd7)]=_0x12ec13['allFields'][_0x4fd659(0xcd)](',')[_0x4fd659(0xc0)](_0x26ecac=>_0x26ecac[_0x4fd659(0xe3)]())['filter'](Boolean)),_0x12ec13;}function normalizeRelatedPages(_0x19a1e9){const _0x232617=a60_0x1961;if(!Array['isArray'](_0x19a1e9))return[];return _0x19a1e9[_0x232617(0xf0)](_0x38260a=>_0x38260a&&typeof _0x38260a===_0x232617(0xb0))['map'](_0x35bb3c=>({'id':_0x35bb3c['id'],'type':_0x35bb3c[_0x232617(0xad)],'code':_0x35bb3c[_0x232617(0xcf)],'title':_0x35bb3c[_0x232617(0xb3)],'deleted':_0x35bb3c[_0x232617(0xec)]===!![]}));}export const datasetDetail={'service':a60_0x21bfeb(0xb8),'command':a60_0x21bfeb(0xf5),'description':a60_0x21bfeb(0xb7),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a60_0x21bfeb(0xcc),'type':a60_0x21bfeb(0xeb),'description':a60_0x21bfeb(0xbe)}],async 'execute'(_0x44aed0){const _0x27c3c9=a60_0x21bfeb,_0x53d73a=await getDatasetDetail(_0x44aed0[_0x27c3c9(0xef)](_0x27c3c9(0xcf))),_0x5400f8=Array[_0x27c3c9(0xba)](_0x53d73a[_0x27c3c9(0xf6)])?_0x53d73a[_0x27c3c9(0xf6)]:Array['isArray'](_0x53d73a['properties'])?_0x53d73a[_0x27c3c9(0xca)]:[],_0x162b05=_0x5400f8[_0x27c3c9(0xc0)](_0x26560f=>normalizeField(_0x26560f))[_0x27c3c9(0xf0)](_0x11e709=>_0x11e709!==null),_0x52096e=_0x53d73a[_0x27c3c9(0xda)]??{},_0x1d86c7=[];for(const [_0x106dd4,_0x5da237]of Object[_0x27c3c9(0xc5)](_0x52096e)){const _0x157152=normalizeOperationEntry(_0x106dd4,_0x5da237);if(_0x157152)_0x1d86c7[_0x27c3c9(0xdf)](_0x157152);}const _0xaa10=_0x53d73a[_0x27c3c9(0xc2)]??{},_0x38f880=_0x53d73a[_0x27c3c9(0xb8)]??{},_0x5cd708=_0xaa10['dbId']!=null?{'id':_0xaa10[_0x27c3c9(0xbb)],'name':_0xaa10[_0x27c3c9(0xf1)]??null}:undefined;let _0x104370;return typeof _0x53d73a[_0x27c3c9(0xc3)]===_0x27c3c9(0xeb)&&(_0x104370=parseJsonMaybe(_0x53d73a[_0x27c3c9(0xc3)])),{'ok':!![],'data':{'id':_0x53d73a[_0x27c3c9(0xdd)]??_0x53d73a['id'],'name':_0x53d73a[_0x27c3c9(0xb6)],'code':_0x53d73a[_0x27c3c9(0xf8)]||_0x53d73a[_0x27c3c9(0xcf)],'doVersion':_0x53d73a[_0x27c3c9(0xf7)],'description':_0x53d73a['description']||_0x38f880['tableComment']||undefined,'source':_0x53d73a[_0x27c3c9(0xdc)]||_0x38f880[_0x27c3c9(0xe2)],'table':_0xaa10[_0x27c3c9(0xb4)]||_0x38f880[_0x27c3c9(0xb4)],'datasetKey':_0xaa10['datasetKey'],'pk':_0xaa10[_0x27c3c9(0xc8)],'db':_0x5cd708,'dbtable':summarizeDbtable(_0xaa10),'fields':_0x162b05,'operations':_0x1d86c7,'indexes':Array[_0x27c3c9(0xba)](_0x38f880[_0x27c3c9(0xbd)])?_0x38f880[_0x27c3c9(0xbd)]:[],'relations':Array[_0x27c3c9(0xba)](_0x53d73a[_0x27c3c9(0xce)])?_0x53d73a[_0x27c3c9(0xce)]['map'](_0x4bf9a2=>({'fromField':_0x4bf9a2[_0x27c3c9(0xe9)],'toDataset':_0x4bf9a2['toDatasetName'],'toCode':_0x4bf9a2['toDatasetCode'],'toTable':_0x4bf9a2['toTableName'],'toField':_0x4bf9a2[_0x27c3c9(0xb1)],'labelField':_0x4bf9a2['toFieldLabel']||undefined})):[],'relatedPages':normalizeRelatedPages(_0x53d73a[_0x27c3c9(0xd0)]),...Array[_0x27c3c9(0xba)](_0x53d73a[_0x27c3c9(0xd6)])?{'columnCodeListWithDeleted':_0x53d73a['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x27c3c9(0xba)](_0x53d73a[_0x27c3c9(0xc1)])?_0x53d73a[_0x27c3c9(0xc1)]:[],'validateRules':Array[_0x27c3c9(0xba)](_0x53d73a['validateRules'])?_0x53d73a['validateRules']:[],..._0x104370!==undefined?{'extend':_0x104370}:{},'stats':{'fieldCount':_0x162b05['length'],'operationCount':_0x1d86c7[_0x27c3c9(0xdb)]}}};}};
@@ -1 +1 @@
1
- const a60_0x379451=a60_0xa466;(function(_0x160d0c,_0x245b03){const _0x54a2a4=a60_0xa466,_0x5bd371=_0x160d0c();while(!![]){try{const _0x5610ea=-parseInt(_0x54a2a4(0x129))/0x1+parseInt(_0x54a2a4(0xe6))/0x2+parseInt(_0x54a2a4(0x112))/0x3*(-parseInt(_0x54a2a4(0xfd))/0x4)+parseInt(_0x54a2a4(0xf3))/0x5*(-parseInt(_0x54a2a4(0x108))/0x6)+-parseInt(_0x54a2a4(0x113))/0x7+parseInt(_0x54a2a4(0x104))/0x8*(-parseInt(_0x54a2a4(0x124))/0x9)+-parseInt(_0x54a2a4(0x110))/0xa*(-parseInt(_0x54a2a4(0x11f))/0xb);if(_0x5610ea===_0x245b03)break;else _0x5bd371['push'](_0x5bd371['shift']());}catch(_0x20fdcd){_0x5bd371['push'](_0x5bd371['shift']());}}}(a60_0x25ff,0x2a3c0));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([[a60_0x379451(0x10c),{'message':a60_0x379451(0x102),'hint':a60_0x379451(0xfc)}]]);export function parseJsonObjectFlag(_0x581c55,_0x221ae1){const _0xad2fc2=a60_0x379451;if(!_0x581c55)return undefined;let _0x369155;try{_0x369155=JSON[_0xad2fc2(0xff)](_0x581c55);}catch(_0x2c1e1b){const _0x419967=_0x2c1e1b instanceof Error?_0x2c1e1b[_0xad2fc2(0xfa)]:String(_0x2c1e1b);throw CliErrors[_0xad2fc2(0x116)](_0x221ae1+_0xad2fc2(0x114)+_0x419967);}if(!isPlainObject(_0x369155)||Array[_0xad2fc2(0xf0)](_0x369155))throw CliErrors[_0xad2fc2(0x116)](_0x221ae1+'\x20must\x20be\x20a\x20JSON\x20object');return _0x369155;}export function validateExtendPatchKeys(_0x507ee8){const _0x526e97=a60_0x379451,_0x270abb=Object['keys'](_0x507ee8);if(_0x270abb[_0x526e97(0x105)]===0x0)throw CliErrors['validation']('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x575876 of _0x270abb){const _0x22c215=EXTEND_PATCH_REDIRECTS[_0x526e97(0xf2)](_0x575876);if(_0x22c215)throw CliErrors['validation'](_0x22c215['message'],_0x22c215[_0x526e97(0x11d)]);if(!MUTABLE_EXTEND_KEYS[_0x526e97(0xf4)](_0x575876))throw CliErrors['validation'](_0x526e97(0x111)+_0x575876,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x52367f=a60_0x379451,_0x539db3=Array['from'](MUTABLE_EXTEND_KEYS)['sort']();return _0x539db3[_0x52367f(0x105)]>0x0?_0x52367f(0x122)+_0x539db3[_0x52367f(0x11c)](',\x20'):'No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.';}export function applyExtendPatch(_0x59d41e,_0x4db73a){const _0x4df9e5=a60_0x379451;validateExtendPatchKeys(_0x4db73a);const _0xa07b44=deepClone(_0x59d41e),_0x370bad=[];for(const [_0x4038ab,_0x2634a3]of Object[_0x4df9e5(0xee)](_0x4db73a)){const _0x1da9d6=_0xa07b44[_0x4038ab],_0x478844=deepClone(_0x2634a3);!deepEqual(_0x1da9d6,_0x478844)&&(_0xa07b44[_0x4038ab]=_0x478844,_0x370bad[_0x4df9e5(0x128)](_0x4df9e5(0xf9)+_0x4038ab));}return _0x370bad[_0x4df9e5(0x109)](),{'after':_0xa07b44,'changedPaths':_0x370bad,'changed':_0x370bad[_0x4df9e5(0x105)]>0x0};}export function assertExpectation(_0x556e8e,_0x363d1c){const _0x368b00=a60_0x379451;if(!_0x363d1c)return;for(const [_0xb7d89f,_0x2bf919]of Object[_0x368b00(0xee)](_0x363d1c)){const _0x4e2c78=_0x556e8e[_0xb7d89f];if(!deepEqual(_0x4e2c78,_0x2bf919))throw CliErrors[_0x368b00(0x116)](_0x368b00(0x118)+_0xb7d89f,_0x368b00(0x11e)+JSON['stringify'](_0x2bf919)+_0x368b00(0x119)+JSON[_0x368b00(0x11a)](_0x4e2c78));}}export async function buildDatasetExtendUpdateResult({appCode:_0x5b91a3,input:_0x1b531c,dryRun:_0x31a37d}){const _0x2bebd7=a60_0x379451;validateInput(_0x1b531c);const _0x5afdae=await getDatasetDetail(_0x1b531c[_0x2bebd7(0x10f)]),_0x53e6a3=parseDatasetExtend(_0x5afdae[_0x2bebd7(0xf7)]),_0x55b464=deepClone(_0x53e6a3[_0x2bebd7(0x115)]);assertExpectation(_0x55b464,_0x1b531c[_0x2bebd7(0xe8)]);const {after:_0x2112d6,changedPaths:_0x36c97a,changed:_0xeff090}=applyExtendPatch(_0x55b464,_0x1b531c[_0x2bebd7(0xe7)]),_0xde7ce6=summarizeDataset(_0x5afdae,_0x1b531c[_0x2bebd7(0x10f)]);return _0xeff090&&!_0x31a37d&&(_0x5afdae['extend']=serializeDatasetExtend(_0x2112d6,_0x53e6a3['shape']),await updateDrivenData(_0x5afdae)),{'ok':!![],'data':{'protocol':_0x2bebd7(0x11b),'appCode':_0x5b91a3,'selector':{'code':_0x1b531c[_0x2bebd7(0x10f)]},'dataset':_0xde7ce6,'dryRun':_0x31a37d,'changed':_0xeff090,'changedPaths':_0x36c97a,'before':{'extend':_0x55b464},'after':{'extend':_0x2112d6},'submitted':_0xeff090&&!_0x31a37d},'message':_0xeff090?_0x31a37d?_0x2bebd7(0xeb)+_0x36c97a['join'](',\x20')+')':_0x2bebd7(0xf5)+_0x36c97a['join'](',\x20')+')':_0x2bebd7(0xea)};}export const datasetExtendUpdate={'service':'dataset','command':a60_0x379451(0xe9),'description':a60_0x379451(0x127),'risk':a60_0x379451(0xfb),'flags':[CODE_FLAG,{'name':a60_0x379451(0x123),'type':a60_0x379451(0xf8),'required':!![],'description':a60_0x379451(0xf1)},{'name':a60_0x379451(0x120),'type':a60_0x379451(0xf8),'required':![],'description':a60_0x379451(0x101)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x46bbb1){validateInput(readExtendUpdateInput(_0x46bbb1));},async 'dryRun'(_0x88e0bf){const _0x582507=a60_0x379451,_0x7c8eb8=await buildDatasetExtendUpdateResult({'appCode':_0x88e0bf['appCode'],'input':readExtendUpdateInput(_0x88e0bf),'dryRun':!![]});return{'method':_0x582507(0x10a),'url':_0x582507(0xef),'body':_0x7c8eb8[_0x582507(0x10e)],'description':_0x7c8eb8[_0x582507(0xfa)]};},async 'execute'(_0x1f30c2){const _0x29cb2f=a60_0x379451;return buildDatasetExtendUpdateResult({'appCode':_0x1f30c2[_0x29cb2f(0xed)],'input':readExtendUpdateInput(_0x1f30c2),'dryRun':![]});}};function readExtendUpdateInput(_0x1d08c7){const _0x3dddf5=a60_0x379451,_0x1bfbb2=trim(_0x1d08c7['str'](_0x3dddf5(0x10f))),_0x37e267=parseJsonObjectFlag(_0x1d08c7[_0x3dddf5(0x121)](_0x3dddf5(0x123)),'--patch-json'),_0x3ab32f=parseJsonObjectFlag(_0x1d08c7['str'](_0x3dddf5(0x120)),_0x3dddf5(0x126));return{'code':_0x1bfbb2,'patch':_0x37e267||{},'expect':_0x3ab32f};}function validateInput(_0x54fbdb){const _0x54c56f=a60_0x379451;if(!_0x54fbdb[_0x54c56f(0x10f)])throw CliErrors['validation'](_0x54c56f(0x117));validateExtendPatchKeys(_0x54fbdb[_0x54c56f(0xe7)]);}function a60_0xa466(_0x33a4e3,_0xa9849d){_0x33a4e3=_0x33a4e3-0xe6;const _0x25ff04=a60_0x25ff();let _0xa466ab=_0x25ff04[_0x33a4e3];return _0xa466ab;}function parseDatasetExtend(_0x3d29e7){const _0x2f8ddc=a60_0x379451;if(typeof _0x3d29e7===_0x2f8ddc(0xf8)){const _0x2bf479=_0x3d29e7[_0x2f8ddc(0x10d)]();if(!_0x2bf479)return{'value':{},'shape':_0x2f8ddc(0xf8)};let _0x37c8b0;try{_0x37c8b0=JSON[_0x2f8ddc(0xff)](_0x2bf479);}catch(_0x45f7de){const _0x434b47=_0x45f7de instanceof Error?_0x45f7de['message']:String(_0x45f7de);throw CliErrors[_0x2f8ddc(0x116)](_0x2f8ddc(0x12a)+_0x434b47);}if(!isPlainObject(_0x37c8b0)||Array[_0x2f8ddc(0xf0)](_0x37c8b0))throw CliErrors[_0x2f8ddc(0x116)](_0x2f8ddc(0x107));return{'value':_0x37c8b0,'shape':_0x2f8ddc(0xf8)};}if(_0x3d29e7===undefined||_0x3d29e7===null)return{'value':{},'shape':_0x2f8ddc(0xf8)};if(!isPlainObject(_0x3d29e7)||Array[_0x2f8ddc(0xf0)](_0x3d29e7))throw CliErrors[_0x2f8ddc(0x116)](_0x2f8ddc(0x107));return{'value':_0x3d29e7,'shape':'object'};}function serializeDatasetExtend(_0x61a723,_0x5325ca){const _0x2c196d=a60_0x379451;return _0x5325ca===_0x2c196d(0xf8)?JSON[_0x2c196d(0x11a)](_0x61a723):_0x61a723;}function summarizeDataset(_0x2192ae,_0x2d49d1){const _0x24184d=a60_0x379451,_0x190df3=isPlainObject(_0x2192ae['dataset'])?_0x2192ae[_0x24184d(0x100)]:{},_0x533b83=isPlainObject(_0x2192ae['dbtableConfig'])?_0x2192ae[_0x24184d(0x12b)]:{};return{'id':_0x2192ae[_0x24184d(0xfe)]??_0x2192ae['id']??_0x190df3['datasetId']??null,'code':_0x2192ae[_0x24184d(0xf6)]??_0x2192ae[_0x24184d(0x10f)]??_0x190df3[_0x24184d(0xec)]??_0x2d49d1,'name':_0x2192ae[_0x24184d(0x125)]??_0x190df3[_0x24184d(0x106)]??null,'table':_0x533b83[_0x24184d(0x10b)]??_0x190df3[_0x24184d(0x10b)]??null,'db':_0x533b83['dbName']??_0x533b83['dbId']??null};}function deepClone(_0x2646b6){const _0x57b144=a60_0x379451;if(_0x2646b6===undefined)return _0x2646b6;return JSON['parse'](JSON[_0x57b144(0x11a)](_0x2646b6));}function deepEqual(_0xe6c401,_0x4869b1){const _0x306e7c=a60_0x379451;return JSON[_0x306e7c(0x11a)](_0xe6c401)===JSON[_0x306e7c(0x11a)](_0x4869b1);}function a60_0x25ff(){const _0x2d33f7=['dbtableConfig','673090ndXnAu','patch','expect','extend-update','No\x20changes\x20for\x20dataset\x20extend','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','datasetCode','appCode','entries','/smartapi/dataset/update-driven-data','isArray','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','get','1190fLvpCJ','has','Updated\x20dataset\x20extend\x20(','modelCode','extend','string','extend.','message','write','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','37484BxLmSU','modelId','parse','dataset','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','object','1306776YGEpAE','length','datasetName','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','4314sYstps','sort','POST','tableName','businessGroup','trim','data','code','160ZTIbcA','Unsupported\x20patch\x20key:\x20','51nyTzla','426160ojbNyV','\x20must\x20be\x20valid\x20JSON\x20object:\x20','value','validation','--code\x20is\x20required','Expectation\x20mismatch\x20at\x20extend.',',\x20actual\x20','stringify','dataset-extend-update.v1','join','hint','Expected\x20','406604XtJyXU','expect-json','str','Allowed\x20keys:\x20','patch-json','9IvjvsM','name','--expect-json','Patch\x20dataset\x20top-level\x20extend\x20safely','push','200321ctgjNd','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'];a60_0x25ff=function(){return _0x2d33f7;};return a60_0x25ff();}function isPlainObject(_0x936bf5){const _0x374caf=a60_0x379451;return Boolean(_0x936bf5)&&typeof _0x936bf5===_0x374caf(0x103)&&!Array['isArray'](_0x936bf5);}function trim(_0x46315c){const _0x3f4856=a60_0x379451,_0x11ddb8=String(_0x46315c||'')[_0x3f4856(0x10d)]();return _0x11ddb8;}
1
+ const a61_0x1b4902=a61_0x20b5;(function(_0x2c1981,_0x3c0fc1){const _0x9a8f5=a61_0x20b5,_0x4df4c1=_0x2c1981();while(!![]){try{const _0x4b4c1a=-parseInt(_0x9a8f5(0x16c))/0x1*(-parseInt(_0x9a8f5(0x188))/0x2)+-parseInt(_0x9a8f5(0x177))/0x3*(parseInt(_0x9a8f5(0x182))/0x4)+parseInt(_0x9a8f5(0x174))/0x5*(-parseInt(_0x9a8f5(0x185))/0x6)+parseInt(_0x9a8f5(0x18f))/0x7*(parseInt(_0x9a8f5(0x16d))/0x8)+-parseInt(_0x9a8f5(0x15a))/0x9*(-parseInt(_0x9a8f5(0x172))/0xa)+-parseInt(_0x9a8f5(0x16b))/0xb+parseInt(_0x9a8f5(0x166))/0xc;if(_0x4b4c1a===_0x3c0fc1)break;else _0x4df4c1['push'](_0x4df4c1['shift']());}catch(_0x58f361){_0x4df4c1['push'](_0x4df4c1['shift']());}}}(a61_0x7c3b,0xb6aa2));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([[a61_0x1b4902(0x16a),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a61_0x1b4902(0x173)}]]);export function parseJsonObjectFlag(_0x32c955,_0x558a1a){const _0x2f3540=a61_0x1b4902;if(!_0x32c955)return undefined;let _0x169bd5;try{_0x169bd5=JSON[_0x2f3540(0x183)](_0x32c955);}catch(_0x42b3f9){const _0x3448c1=_0x42b3f9 instanceof Error?_0x42b3f9[_0x2f3540(0x14f)]:String(_0x42b3f9);throw CliErrors[_0x2f3540(0x157)](_0x558a1a+_0x2f3540(0x162)+_0x3448c1);}if(!isPlainObject(_0x169bd5)||Array[_0x2f3540(0x180)](_0x169bd5))throw CliErrors['validation'](_0x558a1a+_0x2f3540(0x170));return _0x169bd5;}export function validateExtendPatchKeys(_0x9b8112){const _0x1ce4c1=a61_0x1b4902,_0x379b60=Object['keys'](_0x9b8112);if(_0x379b60['length']===0x0)throw CliErrors['validation'](_0x1ce4c1(0x18c));for(const _0x1dd7ca of _0x379b60){const _0x486c89=EXTEND_PATCH_REDIRECTS[_0x1ce4c1(0x164)](_0x1dd7ca);if(_0x486c89)throw CliErrors['validation'](_0x486c89[_0x1ce4c1(0x14f)],_0x486c89[_0x1ce4c1(0x190)]);if(!MUTABLE_EXTEND_KEYS[_0x1ce4c1(0x15f)](_0x1dd7ca))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x1dd7ca,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x5bc5ec=a61_0x1b4902,_0x18a148=Array['from'](MUTABLE_EXTEND_KEYS)[_0x5bc5ec(0x15e)]();return _0x18a148[_0x5bc5ec(0x17e)]>0x0?_0x5bc5ec(0x15d)+_0x18a148[_0x5bc5ec(0x150)](',\x20'):_0x5bc5ec(0x17f);}export function applyExtendPatch(_0x3a053e,_0x314713){const _0x2c6406=a61_0x1b4902;validateExtendPatchKeys(_0x314713);const _0x34355a=deepClone(_0x3a053e),_0x301605=[];for(const [_0x555828,_0x541da4]of Object['entries'](_0x314713)){const _0x1bcb64=_0x34355a[_0x555828],_0x2e9f0d=deepClone(_0x541da4);!deepEqual(_0x1bcb64,_0x2e9f0d)&&(_0x34355a[_0x555828]=_0x2e9f0d,_0x301605[_0x2c6406(0x18b)](_0x2c6406(0x16f)+_0x555828));}return _0x301605['sort'](),{'after':_0x34355a,'changedPaths':_0x301605,'changed':_0x301605[_0x2c6406(0x17e)]>0x0};}export function assertExpectation(_0x5257d7,_0x2eeaa1){const _0x12418e=a61_0x1b4902;if(!_0x2eeaa1)return;for(const [_0x263f42,_0x5ddc3f]of Object[_0x12418e(0x14e)](_0x2eeaa1)){const _0x292ea0=_0x5257d7[_0x263f42];if(!deepEqual(_0x292ea0,_0x5ddc3f))throw CliErrors[_0x12418e(0x157)](_0x12418e(0x156)+_0x263f42,_0x12418e(0x155)+JSON[_0x12418e(0x15c)](_0x5ddc3f)+_0x12418e(0x158)+JSON[_0x12418e(0x15c)](_0x292ea0));}}export async function buildDatasetExtendUpdateResult({appCode:_0x4ca60c,input:_0x53f89c,dryRun:_0x25d459}){const _0x57c245=a61_0x1b4902;validateInput(_0x53f89c);const _0x1b5b51=await getDatasetDetail(_0x53f89c['code']),_0x13fd78=parseDatasetExtend(_0x1b5b51[_0x57c245(0x165)]),_0x3e8f9d=deepClone(_0x13fd78[_0x57c245(0x160)]);assertExpectation(_0x3e8f9d,_0x53f89c['expect']);const {after:_0x5d3c73,changedPaths:_0x5881d,changed:_0x38d56e}=applyExtendPatch(_0x3e8f9d,_0x53f89c['patch']),_0x267f8c=summarizeDataset(_0x1b5b51,_0x53f89c['code']);return _0x38d56e&&!_0x25d459&&(_0x1b5b51['extend']=serializeDatasetExtend(_0x5d3c73,_0x13fd78[_0x57c245(0x18d)]),await updateDrivenData(_0x1b5b51)),{'ok':!![],'data':{'protocol':_0x57c245(0x18a),'appCode':_0x4ca60c,'selector':{'code':_0x53f89c[_0x57c245(0x186)]},'dataset':_0x267f8c,'dryRun':_0x25d459,'changed':_0x38d56e,'changedPaths':_0x5881d,'before':{'extend':_0x3e8f9d},'after':{'extend':_0x5d3c73},'submitted':_0x38d56e&&!_0x25d459},'message':_0x38d56e?_0x25d459?_0x57c245(0x179)+_0x5881d['join'](',\x20')+')':_0x57c245(0x163)+_0x5881d[_0x57c245(0x150)](',\x20')+')':_0x57c245(0x161)};}function a61_0x20b5(_0x1ef788,_0x1d83a3){_0x1ef788=_0x1ef788-0x14e;const _0x7c3b77=a61_0x7c3b();let _0x20b588=_0x7c3b77[_0x1ef788];return _0x20b588;}export const datasetExtendUpdate={'service':a61_0x1b4902(0x17c),'command':a61_0x1b4902(0x178),'description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a61_0x1b4902(0x17d),'flags':[CODE_FLAG,{'name':a61_0x1b4902(0x153),'type':a61_0x1b4902(0x189),'required':!![],'description':a61_0x1b4902(0x169)},{'name':a61_0x1b4902(0x159),'type':a61_0x1b4902(0x189),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2c2d31){validateInput(readExtendUpdateInput(_0x2c2d31));},async 'dryRun'(_0x5315eb){const _0x592629=a61_0x1b4902,_0x46c297=await buildDatasetExtendUpdateResult({'appCode':_0x5315eb['appCode'],'input':readExtendUpdateInput(_0x5315eb),'dryRun':!![]});return{'method':_0x592629(0x17b),'url':'/smartapi/dataset/update-driven-data','body':_0x46c297['data'],'description':_0x46c297['message']};},async 'execute'(_0x27937c){const _0x5bedce=a61_0x1b4902;return buildDatasetExtendUpdateResult({'appCode':_0x27937c[_0x5bedce(0x15b)],'input':readExtendUpdateInput(_0x27937c),'dryRun':![]});}};function a61_0x7c3b(){const _0x36c9d1=['56kNADuy','hint','entries','message','join','--code\x20is\x20required','dbName','patch-json','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','Expected\x20','Expectation\x20mismatch\x20at\x20extend.','validation',',\x20actual\x20','expect-json','5229063eYpVWw','appCode','stringify','Allowed\x20keys:\x20','sort','has','value','No\x20changes\x20for\x20dataset\x20extend','\x20must\x20be\x20valid\x20JSON\x20object:\x20','Updated\x20dataset\x20extend\x20(','get','extend','15226284HlXcHl','datasetCode','tableName','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','businessGroup','10116117sqnSTQ','57AhNUPs','469992XNsjNq','modelCode','extend.','\x20must\x20be\x20a\x20JSON\x20object','modelId','10fuGkNc','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','10LYyGuK','name','str','15HUyXOS','extend-update','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','dbtableConfig','POST','dataset','write','length','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','isArray','dbId','1044952ZsrsGE','parse','object','1475088wsGIss','code','datasetName','40206prucGy','string','dataset-extend-update.v1','push','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','shape','trim'];a61_0x7c3b=function(){return _0x36c9d1;};return a61_0x7c3b();}function readExtendUpdateInput(_0x3a5baf){const _0x4a85c9=a61_0x1b4902,_0x8333c3=trim(_0x3a5baf['str']('code')),_0x5af9c0=parseJsonObjectFlag(_0x3a5baf['str'](_0x4a85c9(0x153)),'--patch-json'),_0x5e29d9=parseJsonObjectFlag(_0x3a5baf[_0x4a85c9(0x176)](_0x4a85c9(0x159)),'--expect-json');return{'code':_0x8333c3,'patch':_0x5af9c0||{},'expect':_0x5e29d9};}function validateInput(_0x43c501){const _0x5ec740=a61_0x1b4902;if(!_0x43c501[_0x5ec740(0x186)])throw CliErrors[_0x5ec740(0x157)](_0x5ec740(0x151));validateExtendPatchKeys(_0x43c501['patch']);}function parseDatasetExtend(_0x2dba55){const _0xfc9713=a61_0x1b4902;if(typeof _0x2dba55===_0xfc9713(0x189)){const _0x2d58d4=_0x2dba55[_0xfc9713(0x18e)]();if(!_0x2d58d4)return{'value':{},'shape':'string'};let _0x4c8f3e;try{_0x4c8f3e=JSON[_0xfc9713(0x183)](_0x2d58d4);}catch(_0x123725){const _0x59392d=_0x123725 instanceof Error?_0x123725[_0xfc9713(0x14f)]:String(_0x123725);throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x59392d);}if(!isPlainObject(_0x4c8f3e)||Array[_0xfc9713(0x180)](_0x4c8f3e))throw CliErrors[_0xfc9713(0x157)](_0xfc9713(0x154));return{'value':_0x4c8f3e,'shape':_0xfc9713(0x189)};}if(_0x2dba55===undefined||_0x2dba55===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x2dba55)||Array[_0xfc9713(0x180)](_0x2dba55))throw CliErrors[_0xfc9713(0x157)](_0xfc9713(0x154));return{'value':_0x2dba55,'shape':_0xfc9713(0x184)};}function serializeDatasetExtend(_0x549181,_0x5b06ed){const _0x26ad3a=a61_0x1b4902;return _0x5b06ed===_0x26ad3a(0x189)?JSON[_0x26ad3a(0x15c)](_0x549181):_0x549181;}function summarizeDataset(_0x2f8483,_0x2ea666){const _0x2f61a1=a61_0x1b4902,_0x2f60c6=isPlainObject(_0x2f8483[_0x2f61a1(0x17c)])?_0x2f8483['dataset']:{},_0x3460f0=isPlainObject(_0x2f8483[_0x2f61a1(0x17a)])?_0x2f8483[_0x2f61a1(0x17a)]:{};return{'id':_0x2f8483[_0x2f61a1(0x171)]??_0x2f8483['id']??_0x2f60c6['datasetId']??null,'code':_0x2f8483[_0x2f61a1(0x16e)]??_0x2f8483[_0x2f61a1(0x186)]??_0x2f60c6[_0x2f61a1(0x167)]??_0x2ea666,'name':_0x2f8483[_0x2f61a1(0x175)]??_0x2f60c6[_0x2f61a1(0x187)]??null,'table':_0x3460f0['tableName']??_0x2f60c6[_0x2f61a1(0x168)]??null,'db':_0x3460f0[_0x2f61a1(0x152)]??_0x3460f0[_0x2f61a1(0x181)]??null};}function deepClone(_0x15fcca){const _0x23d8bf=a61_0x1b4902;if(_0x15fcca===undefined)return _0x15fcca;return JSON[_0x23d8bf(0x183)](JSON['stringify'](_0x15fcca));}function deepEqual(_0x2413e5,_0x50cb76){const _0x353179=a61_0x1b4902;return JSON[_0x353179(0x15c)](_0x2413e5)===JSON[_0x353179(0x15c)](_0x50cb76);}function isPlainObject(_0x3db597){const _0x9baecf=a61_0x1b4902;return Boolean(_0x3db597)&&typeof _0x3db597===_0x9baecf(0x184)&&!Array[_0x9baecf(0x180)](_0x3db597);}function trim(_0x1cc5a4){const _0x3e6f5b=a61_0x1b4902,_0x31eadc=String(_0x1cc5a4||'')[_0x3e6f5b(0x18e)]();return _0x31eadc;}
@@ -1 +1 @@
1
- const a61_0x2e6afb=a61_0x2937;(function(_0x2af142,_0x35cc4){const _0x353c88=a61_0x2937,_0xf8840d=_0x2af142();while(!![]){try{const _0x18a52f=-parseInt(_0x353c88(0x1e5))/0x1+parseInt(_0x353c88(0x1a5))/0x2+-parseInt(_0x353c88(0x1d4))/0x3+-parseInt(_0x353c88(0x1c6))/0x4*(-parseInt(_0x353c88(0x19f))/0x5)+-parseInt(_0x353c88(0x1e2))/0x6+-parseInt(_0x353c88(0x1a2))/0x7*(parseInt(_0x353c88(0x1bd))/0x8)+parseInt(_0x353c88(0x1bc))/0x9;if(_0x18a52f===_0x35cc4)break;else _0xf8840d['push'](_0xf8840d['shift']());}catch(_0x55f094){_0xf8840d['push'](_0xf8840d['shift']());}}}(a61_0x43f7,0x5de0b));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a61_0x2937(_0x3ce100,_0x290214){_0x3ce100=_0x3ce100-0x19e;const _0x43f794=a61_0x43f7();let _0x2937df=_0x43f794[_0x3ce100];return _0x2937df;}const MUTABLE_FIELD_KEYS=new Set(['doType','displayName','description',a61_0x2e6afb(0x1da),a61_0x2e6afb(0x1d5),a61_0x2e6afb(0x1c3),a61_0x2e6afb(0x1ac),a61_0x2e6afb(0x1d3),a61_0x2e6afb(0x1d2)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a61_0x2e6afb(0x1a6),a61_0x2e6afb(0x1a3),a61_0x2e6afb(0x1ad),'dbTypeLen','dbTypeScale',a61_0x2e6afb(0x1ba),'tableName','deleted',a61_0x2e6afb(0x1b6),'autoIncrement','systemRetain']);export function parseJsonObjectFlag(_0x51e1bd,_0x3b109){const _0x27782e=a61_0x2e6afb;if(!_0x51e1bd)return undefined;let _0x494094;try{_0x494094=JSON[_0x27782e(0x1c2)](_0x51e1bd);}catch(_0x4c5200){const _0xc5ea93=_0x4c5200 instanceof Error?_0x4c5200[_0x27782e(0x1af)]:String(_0x4c5200);throw CliErrors[_0x27782e(0x1b7)](_0x3b109+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0xc5ea93);}if(!isPlainObject(_0x494094)||Array['isArray'](_0x494094))throw CliErrors[_0x27782e(0x1b7)](_0x3b109+_0x27782e(0x1b3));return _0x494094;}export function validatePatchKeys(_0xd6844b){const _0x4b4962=a61_0x2e6afb,_0x1b10ac=Object[_0x4b4962(0x1d7)](_0xd6844b);if(_0x1b10ac[_0x4b4962(0x1d6)]===0x0)throw CliErrors['validation']('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x5b61d8 of _0x1b10ac){if(FORBIDDEN_FIELD_KEYS[_0x4b4962(0x1c8)](_0x5b61d8))throw CliErrors[_0x4b4962(0x1b7)]('Forbidden\x20patch\x20key:\x20'+_0x5b61d8);if(!MUTABLE_FIELD_KEYS[_0x4b4962(0x1c8)](_0x5b61d8))throw CliErrors[_0x4b4962(0x1b7)](_0x4b4962(0x1a4)+_0x5b61d8,_0x4b4962(0x1ab)+Array[_0x4b4962(0x1e8)](MUTABLE_FIELD_KEYS)[_0x4b4962(0x1b0)](',\x20'));}}export function applyFieldPatch(_0x332f97,_0x226b02){const _0x3caf47=a61_0x2e6afb;validatePatchKeys(_0x226b02);const _0x2c56a0=deepClone(_0x332f97),_0x42f8d9=new Set();for(const [_0x47d73,_0x2a0be0]of Object['entries'](_0x226b02)){const _0x5da250=_0x2c56a0[_0x47d73],_0x47b7b9=mergePatchValue(_0x5da250,_0x2a0be0);!deepEqual(_0x5da250,_0x47b7b9)&&(_0x2c56a0[_0x47d73]=_0x47b7b9,_0x42f8d9[_0x3caf47(0x1b4)](_0x47d73),collectChangedPaths(_0x47d73,_0x5da250,_0x47b7b9,_0x42f8d9));}return{'after':_0x2c56a0,'changedPaths':Array[_0x3caf47(0x1e8)](_0x42f8d9)[_0x3caf47(0x1b8)](),'changed':_0x42f8d9[_0x3caf47(0x1a9)]>0x0};}export function assertExpectation(_0x841731,_0x3864dc){const _0x565158=a61_0x2e6afb;if(!_0x3864dc)return;for(const [_0x437c77,_0x27c256]of Object['entries'](_0x3864dc)){const _0x25e261=_0x841731[_0x437c77];if(!deepEqual(_0x25e261,_0x27c256))throw CliErrors[_0x565158(0x1b7)](_0x565158(0x1a0)+_0x437c77,_0x565158(0x1ce)+JSON[_0x565158(0x1df)](_0x27c256)+_0x565158(0x1c0)+JSON[_0x565158(0x1df)](_0x25e261));}}export async function buildDatasetFieldUpdateResult({appCode:_0x44b73d,input:_0x1aaa39,dryRun:_0x1af3f4}){const _0x1aef98=a61_0x2e6afb;validateInput(_0x1aaa39);const _0xb6c245=await getDatasetDetail(_0x1aaa39[_0x1aef98(0x1a3)]),_0x1466e3=readFieldArray(_0xb6c245),_0x52ce0d=_0x1466e3[_0x1aef98(0x1de)](_0x19511a=>_0x19511a?.['name']===_0x1aaa39[_0x1aef98(0x1e7)]);if(_0x52ce0d<0x0)throw CliErrors[_0x1aef98(0x1b7)](_0x1aef98(0x1c5)+_0x1aaa39['field']);const _0x42366a=deepClone(_0x1466e3[_0x52ce0d]);assertExpectation(_0x42366a,_0x1aaa39['expect']);const {after:_0x383b6f,changedPaths:_0x153f8c,changed:_0x556b2a}=applyFieldPatch(_0x42366a,_0x1aaa39[_0x1aef98(0x1e4)]),_0x48af6b=summarizeDataset(_0xb6c245,_0x1aaa39['code']);return _0x556b2a&&!_0x1af3f4&&(_0x1466e3[_0x52ce0d]=_0x383b6f,await updateDrivenData(_0xb6c245)),{'ok':!![],'data':{'protocol':_0x1aef98(0x1d8),'appCode':_0x44b73d,'selector':{'code':_0x1aaa39[_0x1aef98(0x1a3)]},'dataset':_0x48af6b,'field':{'id':_0x42366a['id']??null,'name':_0x42366a['name']},'dryRun':_0x1af3f4,'changed':_0x556b2a,'changedPaths':_0x153f8c,'before':_0x42366a,'after':_0x383b6f,'submitted':_0x556b2a&&!_0x1af3f4},'message':_0x556b2a?_0x1af3f4?_0x1aef98(0x19e)+_0x1aaa39[_0x1aef98(0x1e7)]+_0x1aef98(0x1c9)+_0x153f8c['join'](',\x20')+')':_0x1aef98(0x1a8)+_0x1aaa39['field']+'\x20('+_0x153f8c['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x1aaa39[_0x1aef98(0x1e7)]};}export const datasetFieldUpdate={'service':a61_0x2e6afb(0x1e0),'command':a61_0x2e6afb(0x1bf),'description':'Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','risk':'write','flags':[CODE_FLAG,{'name':a61_0x2e6afb(0x1e7),'type':a61_0x2e6afb(0x1e1),'required':!![],'description':a61_0x2e6afb(0x1c7)},{'name':'patch-json','type':a61_0x2e6afb(0x1e1),'required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a61_0x2e6afb(0x1ca),'type':a61_0x2e6afb(0x1e1),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x28c6b8){validateInput(readFieldUpdateInput(_0x28c6b8));},async 'dryRun'(_0x225f6d){const _0x47b8d0=a61_0x2e6afb,_0xaae70a=await buildDatasetFieldUpdateResult({'appCode':_0x225f6d['appCode'],'input':readFieldUpdateInput(_0x225f6d),'dryRun':!![]});return{'method':_0x47b8d0(0x1cf),'url':_0x47b8d0(0x1b5),'body':_0xaae70a[_0x47b8d0(0x1b1)],'description':_0xaae70a[_0x47b8d0(0x1af)]};},async 'execute'(_0x282c74){const _0xc0a570=a61_0x2e6afb;return buildDatasetFieldUpdateResult({'appCode':_0x282c74[_0xc0a570(0x1ae)],'input':readFieldUpdateInput(_0x282c74),'dryRun':![]});}};function readFieldUpdateInput(_0x1536b8){const _0x3cd5c5=a61_0x2e6afb,_0x14eac4=trim(_0x1536b8['str'](_0x3cd5c5(0x1a3))),_0x1efe50=emptyToUndefined(_0x1536b8[_0x3cd5c5(0x1aa)](_0x3cd5c5(0x1e7))),_0x28b040=parseJsonObjectFlag(_0x1536b8[_0x3cd5c5(0x1aa)](_0x3cd5c5(0x1d0)),_0x3cd5c5(0x1e6)),_0x3d2221=parseJsonObjectFlag(_0x1536b8[_0x3cd5c5(0x1aa)]('expect-json'),_0x3cd5c5(0x1c4));return{'code':_0x14eac4,'field':_0x1efe50||'','patch':_0x28b040||{},'expect':_0x3d2221};}function a61_0x43f7(){const _0x597959=['data','properties','\x20must\x20be\x20a\x20JSON\x20object','add','/smartapi/dataset/update-driven-data','pkField','validation','sort','modelId','dbFieldName','fields','12261456LmAeFJ','16ZwEsqg','dbName','field-update',',\x20actual\x20','dbtableConfig','parse','datetimeFormat','--expect-json','Field\x20not\x20found:\x20','4WGLZri','Exact\x20raw\x20fields[].name\x20to\x20patch','has','\x20would\x20change\x20(','expect-json','trim','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','--field\x20is\x20required','Expected\x20','POST','patch-json','--code\x20is\x20required','deprecated','chartRole','1867665HhanXb','required','length','keys','dataset-field-update.v1','isArray','options','entries','modelCode','datasetCode','findIndex','stringify','dataset','string','4129584nuNiPL','tableName','patch','16462wQkMmu','--patch-json','field','from','Dry-run:\x20dataset\x20field\x20','172745OEgAVc','Expectation\x20mismatch\x20at\x20','datasetName','1468397ZxrZjP','code','Unsupported\x20patch\x20key:\x20','1468826ojkLHD','name','object','Updated\x20dataset\x20field\x20','size','str','Allowed\x20keys:\x20','defaultAggregation','dbType','appCode','message','join'];a61_0x43f7=function(){return _0x597959;};return a61_0x43f7();}function validateInput(_0x31ac2c){const _0x4cdb9f=a61_0x2e6afb;if(!_0x31ac2c['code'])throw CliErrors[_0x4cdb9f(0x1b7)](_0x4cdb9f(0x1d1));if(!_0x31ac2c[_0x4cdb9f(0x1e7)])throw CliErrors['validation'](_0x4cdb9f(0x1cd));validatePatchKeys(_0x31ac2c['patch']);}function readFieldArray(_0x568758){const _0x20730a=a61_0x2e6afb;if(Array[_0x20730a(0x1d9)](_0x568758[_0x20730a(0x1bb)]))return _0x568758['fields'];if(Array[_0x20730a(0x1d9)](_0x568758['properties']))return _0x568758[_0x20730a(0x1b2)];throw CliErrors[_0x20730a(0x1b7)](_0x20730a(0x1cc));}function summarizeDataset(_0x281b22,_0x19e299){const _0x4c53fb=a61_0x2e6afb,_0x4b0298=isPlainObject(_0x281b22['dataset'])?_0x281b22['dataset']:{},_0x321b9d=isPlainObject(_0x281b22['dbtableConfig'])?_0x281b22[_0x4c53fb(0x1c1)]:{};return{'id':_0x281b22[_0x4c53fb(0x1b9)]??_0x281b22['id']??_0x4b0298['datasetId']??null,'code':_0x281b22[_0x4c53fb(0x1dc)]??_0x281b22[_0x4c53fb(0x1a3)]??_0x4b0298[_0x4c53fb(0x1dd)]??_0x19e299,'name':_0x281b22[_0x4c53fb(0x1a6)]??_0x4b0298[_0x4c53fb(0x1a1)]??null,'table':_0x321b9d[_0x4c53fb(0x1e3)]??_0x4b0298[_0x4c53fb(0x1e3)]??null,'db':_0x321b9d[_0x4c53fb(0x1be)]??_0x321b9d['dbId']??null};}function mergePatchValue(_0x2e4264,_0x453988){if(isPlainObject(_0x2e4264)&&isPlainObject(_0x453988))return deepMerge(_0x2e4264,_0x453988);return deepClone(_0x453988);}function deepMerge(_0x2fde14,_0xceb202){const _0x137111=a61_0x2e6afb,_0x88be1e=deepClone(_0x2fde14);for(const [_0x4e9fe4,_0x2e33de]of Object[_0x137111(0x1db)](_0xceb202)){_0x88be1e[_0x4e9fe4]=isPlainObject(_0x88be1e[_0x4e9fe4])&&isPlainObject(_0x2e33de)?deepMerge(_0x88be1e[_0x4e9fe4],_0x2e33de):deepClone(_0x2e33de);}return _0x88be1e;}function collectChangedPaths(_0x576ff2,_0x2c218c,_0x5c0ee4,_0x1ec69c){const _0x2441ba=a61_0x2e6afb;if(!isPlainObject(_0x2c218c)||!isPlainObject(_0x5c0ee4))return;const _0x532b9e=new Set([...Object[_0x2441ba(0x1d7)](_0x2c218c),...Object[_0x2441ba(0x1d7)](_0x5c0ee4)]);for(const _0x693ffc of _0x532b9e){const _0x8b50bc=_0x2c218c[_0x693ffc],_0x4d6b12=_0x5c0ee4[_0x693ffc];!deepEqual(_0x8b50bc,_0x4d6b12)&&_0x1ec69c[_0x2441ba(0x1b4)](_0x576ff2+'.'+_0x693ffc);}}function deepClone(_0x417941){const _0x57f35e=a61_0x2e6afb;if(_0x417941===undefined)return _0x417941;return JSON['parse'](JSON[_0x57f35e(0x1df)](_0x417941));}function deepEqual(_0x2922e9,_0x10a449){const _0x14db86=a61_0x2e6afb;return JSON[_0x14db86(0x1df)](_0x2922e9)===JSON['stringify'](_0x10a449);}function isPlainObject(_0x546ff2){const _0x12c55b=a61_0x2e6afb;return Boolean(_0x546ff2)&&typeof _0x546ff2===_0x12c55b(0x1a7)&&!Array['isArray'](_0x546ff2);}function emptyToUndefined(_0x2fb7f8){const _0x34db2c=a61_0x2e6afb,_0x1d4e03=String(_0x2fb7f8||'')[_0x34db2c(0x1cb)]();return _0x1d4e03||undefined;}function trim(_0x4178dc){const _0x4b1169=a61_0x2e6afb;return String(_0x4178dc||'')[_0x4b1169(0x1cb)]();}
1
+ const a62_0x308ef0=a62_0x5c50;(function(_0x7a0692,_0xbdd626){const _0xc8d8d9=a62_0x5c50,_0x253443=_0x7a0692();while(!![]){try{const _0xf22ad3=parseInt(_0xc8d8d9(0x1dc))/0x1*(parseInt(_0xc8d8d9(0x1e1))/0x2)+parseInt(_0xc8d8d9(0x1d2))/0x3*(parseInt(_0xc8d8d9(0x1d5))/0x4)+-parseInt(_0xc8d8d9(0x1b9))/0x5*(-parseInt(_0xc8d8d9(0x1c1))/0x6)+-parseInt(_0xc8d8d9(0x1f6))/0x7*(-parseInt(_0xc8d8d9(0x1e9))/0x8)+-parseInt(_0xc8d8d9(0x1cb))/0x9+-parseInt(_0xc8d8d9(0x1cc))/0xa*(-parseInt(_0xc8d8d9(0x1ec))/0xb)+parseInt(_0xc8d8d9(0x1c0))/0xc*(-parseInt(_0xc8d8d9(0x1f3))/0xd);if(_0xf22ad3===_0xbdd626)break;else _0x253443['push'](_0x253443['shift']());}catch(_0x2808c3){_0x253443['push'](_0x253443['shift']());}}}(a62_0x14f0,0x44104));function a62_0x14f0(){const _0x5b0c86=['from','dbTypeLen','length','290HqVRzZ','trim','entries','findIndex','parse','size','modelId','12eIgsAs','6414QKxsnw','datasetName','has',',\x20actual\x20','dbType','displayName','options','name','validation','doType','2043270wxzaUR','10kYbQaV','description','chartRole','Forbidden\x20patch\x20key:\x20','isArray','sort','3zVsePi','datasetId','dataset','1222120vpszRv','object','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','\x20must\x20be\x20valid\x20JSON\x20object:\x20','expect-json','/smartapi/dataset/update-driven-data','data','22789eoPINU','--patch-json','--code\x20is\x20required','join','tableName','36fDzBhw','dbtableConfig','systemRetain','dbFieldName','pkField','patch-json','--field\x20is\x20required','Expectation\x20mismatch\x20at\x20','664OGLsUv','POST','expect','3591940pwTiRK','dbName','Dry-run:\x20dataset\x20field\x20','str','string','field-update','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','11335233CVLqrD','--expect-json','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','23065SaNyex','deprecated','message','add','Updated\x20dataset\x20field\x20','appCode','properties','modelCode','code','stringify','autoIncrement','keys','field'];a62_0x14f0=function(){return _0x5b0c86;};return a62_0x14f0();}import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a62_0x308ef0(0x1ca),a62_0x308ef0(0x1c6),a62_0x308ef0(0x1cd),a62_0x308ef0(0x1c7),'required','datetimeFormat','defaultAggregation',a62_0x308ef0(0x1ce),a62_0x308ef0(0x1f7)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a62_0x308ef0(0x1c8),a62_0x308ef0(0x1fe),a62_0x308ef0(0x1c5),a62_0x308ef0(0x1b7),'dbTypeScale',a62_0x308ef0(0x1e4),a62_0x308ef0(0x1e0),'deleted',a62_0x308ef0(0x1e5),a62_0x308ef0(0x200),a62_0x308ef0(0x1e3)]);export function parseJsonObjectFlag(_0x100051,_0x72057f){const _0x362c35=a62_0x308ef0;if(!_0x100051)return undefined;let _0x538b11;try{_0x538b11=JSON[_0x362c35(0x1bd)](_0x100051);}catch(_0x1ef353){const _0x8946f9=_0x1ef353 instanceof Error?_0x1ef353[_0x362c35(0x1f8)]:String(_0x1ef353);throw CliErrors['validation'](_0x72057f+_0x362c35(0x1d8)+_0x8946f9);}if(!isPlainObject(_0x538b11)||Array[_0x362c35(0x1d0)](_0x538b11))throw CliErrors[_0x362c35(0x1c9)](_0x72057f+'\x20must\x20be\x20a\x20JSON\x20object');return _0x538b11;}export function validatePatchKeys(_0x8bcffb){const _0x5c298d=a62_0x308ef0,_0x32025b=Object['keys'](_0x8bcffb);if(_0x32025b[_0x5c298d(0x1b8)]===0x0)throw CliErrors[_0x5c298d(0x1c9)](_0x5c298d(0x1f2));for(const _0x4cd4d7 of _0x32025b){if(FORBIDDEN_FIELD_KEYS[_0x5c298d(0x1c3)](_0x4cd4d7))throw CliErrors[_0x5c298d(0x1c9)](_0x5c298d(0x1cf)+_0x4cd4d7);if(!MUTABLE_FIELD_KEYS[_0x5c298d(0x1c3)](_0x4cd4d7))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x4cd4d7,'Allowed\x20keys:\x20'+Array[_0x5c298d(0x1b6)](MUTABLE_FIELD_KEYS)[_0x5c298d(0x1df)](',\x20'));}}export function applyFieldPatch(_0x12c1d6,_0x12a97c){const _0x5e53ed=a62_0x308ef0;validatePatchKeys(_0x12a97c);const _0x3e29af=deepClone(_0x12c1d6),_0x2f88ac=new Set();for(const [_0x5ea1e6,_0x1473de]of Object[_0x5e53ed(0x1bb)](_0x12a97c)){const _0x5abcf2=_0x3e29af[_0x5ea1e6],_0x3d528a=mergePatchValue(_0x5abcf2,_0x1473de);!deepEqual(_0x5abcf2,_0x3d528a)&&(_0x3e29af[_0x5ea1e6]=_0x3d528a,_0x2f88ac['add'](_0x5ea1e6),collectChangedPaths(_0x5ea1e6,_0x5abcf2,_0x3d528a,_0x2f88ac));}return{'after':_0x3e29af,'changedPaths':Array[_0x5e53ed(0x1b6)](_0x2f88ac)[_0x5e53ed(0x1d1)](),'changed':_0x2f88ac[_0x5e53ed(0x1be)]>0x0};}export function assertExpectation(_0x36b004,_0x2884a0){const _0x5a5c93=a62_0x308ef0;if(!_0x2884a0)return;for(const [_0x280beb,_0x2175e7]of Object[_0x5a5c93(0x1bb)](_0x2884a0)){const _0x57715d=_0x36b004[_0x280beb];if(!deepEqual(_0x57715d,_0x2175e7))throw CliErrors[_0x5a5c93(0x1c9)](_0x5a5c93(0x1e8)+_0x280beb,'Expected\x20'+JSON[_0x5a5c93(0x1ff)](_0x2175e7)+_0x5a5c93(0x1c4)+JSON[_0x5a5c93(0x1ff)](_0x57715d));}}export async function buildDatasetFieldUpdateResult({appCode:_0xc13355,input:_0x4271cd,dryRun:_0x376796}){const _0x25254c=a62_0x308ef0;validateInput(_0x4271cd);const _0x593d50=await getDatasetDetail(_0x4271cd[_0x25254c(0x1fe)]),_0x1f55cf=readFieldArray(_0x593d50),_0x50e8ca=_0x1f55cf[_0x25254c(0x1bc)](_0x39acf4=>_0x39acf4?.[_0x25254c(0x1c8)]===_0x4271cd[_0x25254c(0x1b5)]);if(_0x50e8ca<0x0)throw CliErrors['validation']('Field\x20not\x20found:\x20'+_0x4271cd[_0x25254c(0x1b5)]);const _0x19478c=deepClone(_0x1f55cf[_0x50e8ca]);assertExpectation(_0x19478c,_0x4271cd[_0x25254c(0x1eb)]);const {after:_0x48c2cc,changedPaths:_0x4eb4f6,changed:_0x1e4d68}=applyFieldPatch(_0x19478c,_0x4271cd['patch']),_0x5401bf=summarizeDataset(_0x593d50,_0x4271cd[_0x25254c(0x1fe)]);return _0x1e4d68&&!_0x376796&&(_0x1f55cf[_0x50e8ca]=_0x48c2cc,await updateDrivenData(_0x593d50)),{'ok':!![],'data':{'protocol':'dataset-field-update.v1','appCode':_0xc13355,'selector':{'code':_0x4271cd[_0x25254c(0x1fe)]},'dataset':_0x5401bf,'field':{'id':_0x19478c['id']??null,'name':_0x19478c['name']},'dryRun':_0x376796,'changed':_0x1e4d68,'changedPaths':_0x4eb4f6,'before':_0x19478c,'after':_0x48c2cc,'submitted':_0x1e4d68&&!_0x376796},'message':_0x1e4d68?_0x376796?_0x25254c(0x1ee)+_0x4271cd['field']+'\x20would\x20change\x20('+_0x4eb4f6[_0x25254c(0x1df)](',\x20')+')':_0x25254c(0x1fa)+_0x4271cd[_0x25254c(0x1b5)]+'\x20('+_0x4eb4f6[_0x25254c(0x1df)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x4271cd[_0x25254c(0x1b5)]};}export const datasetFieldUpdate={'service':a62_0x308ef0(0x1d4),'command':a62_0x308ef0(0x1f1),'description':a62_0x308ef0(0x1f5),'risk':'write','flags':[CODE_FLAG,{'name':a62_0x308ef0(0x1b5),'type':a62_0x308ef0(0x1f0),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':a62_0x308ef0(0x1e6),'type':'string','required':!![],'description':a62_0x308ef0(0x1d7)},{'name':'expect-json','type':a62_0x308ef0(0x1f0),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2d23d3){validateInput(readFieldUpdateInput(_0x2d23d3));},async 'dryRun'(_0x4f9cd6){const _0x2b9024=a62_0x308ef0,_0x1d49dc=await buildDatasetFieldUpdateResult({'appCode':_0x4f9cd6['appCode'],'input':readFieldUpdateInput(_0x4f9cd6),'dryRun':!![]});return{'method':_0x2b9024(0x1ea),'url':_0x2b9024(0x1da),'body':_0x1d49dc[_0x2b9024(0x1db)],'description':_0x1d49dc[_0x2b9024(0x1f8)]};},async 'execute'(_0x49a464){const _0x3ccbd2=a62_0x308ef0;return buildDatasetFieldUpdateResult({'appCode':_0x49a464[_0x3ccbd2(0x1fb)],'input':readFieldUpdateInput(_0x49a464),'dryRun':![]});}};function readFieldUpdateInput(_0x22e548){const _0x17aa1e=a62_0x308ef0,_0x41deaa=trim(_0x22e548[_0x17aa1e(0x1ef)](_0x17aa1e(0x1fe))),_0x36a5bc=emptyToUndefined(_0x22e548['str'](_0x17aa1e(0x1b5))),_0x2bcd2b=parseJsonObjectFlag(_0x22e548['str'](_0x17aa1e(0x1e6)),_0x17aa1e(0x1dd)),_0xccd914=parseJsonObjectFlag(_0x22e548[_0x17aa1e(0x1ef)](_0x17aa1e(0x1d9)),_0x17aa1e(0x1f4));return{'code':_0x41deaa,'field':_0x36a5bc||'','patch':_0x2bcd2b||{},'expect':_0xccd914};}function validateInput(_0x52b82a){const _0x51f014=a62_0x308ef0;if(!_0x52b82a[_0x51f014(0x1fe)])throw CliErrors['validation'](_0x51f014(0x1de));if(!_0x52b82a['field'])throw CliErrors[_0x51f014(0x1c9)](_0x51f014(0x1e7));validatePatchKeys(_0x52b82a['patch']);}function readFieldArray(_0xac27fe){const _0x5bc8d6=a62_0x308ef0;if(Array['isArray'](_0xac27fe['fields']))return _0xac27fe['fields'];if(Array[_0x5bc8d6(0x1d0)](_0xac27fe[_0x5bc8d6(0x1fc)]))return _0xac27fe[_0x5bc8d6(0x1fc)];throw CliErrors[_0x5bc8d6(0x1c9)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x2f732a,_0x473c98){const _0xf98a81=a62_0x308ef0,_0x1092e9=isPlainObject(_0x2f732a[_0xf98a81(0x1d4)])?_0x2f732a[_0xf98a81(0x1d4)]:{},_0x18b2dc=isPlainObject(_0x2f732a[_0xf98a81(0x1e2)])?_0x2f732a[_0xf98a81(0x1e2)]:{};return{'id':_0x2f732a[_0xf98a81(0x1bf)]??_0x2f732a['id']??_0x1092e9[_0xf98a81(0x1d3)]??null,'code':_0x2f732a[_0xf98a81(0x1fd)]??_0x2f732a[_0xf98a81(0x1fe)]??_0x1092e9['datasetCode']??_0x473c98,'name':_0x2f732a[_0xf98a81(0x1c8)]??_0x1092e9[_0xf98a81(0x1c2)]??null,'table':_0x18b2dc[_0xf98a81(0x1e0)]??_0x1092e9[_0xf98a81(0x1e0)]??null,'db':_0x18b2dc[_0xf98a81(0x1ed)]??_0x18b2dc['dbId']??null};}function mergePatchValue(_0x411bfc,_0x4a2991){if(isPlainObject(_0x411bfc)&&isPlainObject(_0x4a2991))return deepMerge(_0x411bfc,_0x4a2991);return deepClone(_0x4a2991);}function deepMerge(_0x583675,_0x2e85db){const _0x71bdb4=deepClone(_0x583675);for(const [_0x259ef0,_0x3d5fee]of Object['entries'](_0x2e85db)){_0x71bdb4[_0x259ef0]=isPlainObject(_0x71bdb4[_0x259ef0])&&isPlainObject(_0x3d5fee)?deepMerge(_0x71bdb4[_0x259ef0],_0x3d5fee):deepClone(_0x3d5fee);}return _0x71bdb4;}function collectChangedPaths(_0x3014ea,_0x3082c0,_0x4f3613,_0x1c80c7){const _0x590539=a62_0x308ef0;if(!isPlainObject(_0x3082c0)||!isPlainObject(_0x4f3613))return;const _0x1b2493=new Set([...Object[_0x590539(0x1b4)](_0x3082c0),...Object[_0x590539(0x1b4)](_0x4f3613)]);for(const _0x2ff03a of _0x1b2493){const _0x17466f=_0x3082c0[_0x2ff03a],_0x50abfd=_0x4f3613[_0x2ff03a];!deepEqual(_0x17466f,_0x50abfd)&&_0x1c80c7[_0x590539(0x1f9)](_0x3014ea+'.'+_0x2ff03a);}}function deepClone(_0x40b10a){const _0x25c4fd=a62_0x308ef0;if(_0x40b10a===undefined)return _0x40b10a;return JSON['parse'](JSON[_0x25c4fd(0x1ff)](_0x40b10a));}function deepEqual(_0x55cd84,_0x2603f6){const _0x16eb5c=a62_0x308ef0;return JSON['stringify'](_0x55cd84)===JSON[_0x16eb5c(0x1ff)](_0x2603f6);}function isPlainObject(_0x1f4712){const _0x1b76d8=a62_0x308ef0;return Boolean(_0x1f4712)&&typeof _0x1f4712===_0x1b76d8(0x1d6)&&!Array[_0x1b76d8(0x1d0)](_0x1f4712);}function a62_0x5c50(_0x20734f,_0x7e8132){_0x20734f=_0x20734f-0x1b4;const _0x14f042=a62_0x14f0();let _0x5c5012=_0x14f042[_0x20734f];return _0x5c5012;}function emptyToUndefined(_0x33ad4d){const _0x280050=String(_0x33ad4d||'')['trim']();return _0x280050||undefined;}function trim(_0x587c3c){const _0x358529=a62_0x308ef0;return String(_0x587c3c||'')[_0x358529(0x1ba)]();}
@@ -1 +1 @@
1
- (function(_0x555fb0,_0x28316d){const _0xb12c32=a62_0xa738,_0x3babc2=_0x555fb0();while(!![]){try{const _0x18dbc2=parseInt(_0xb12c32(0x1e2))/0x1*(-parseInt(_0xb12c32(0x1e0))/0x2)+-parseInt(_0xb12c32(0x1de))/0x3*(parseInt(_0xb12c32(0x1db))/0x4)+parseInt(_0xb12c32(0x1e1))/0x5+parseInt(_0xb12c32(0x1dc))/0x6+-parseInt(_0xb12c32(0x1df))/0x7*(parseInt(_0xb12c32(0x1d9))/0x8)+parseInt(_0xb12c32(0x1e3))/0x9+parseInt(_0xb12c32(0x1dd))/0xa*(parseInt(_0xb12c32(0x1da))/0xb);if(_0x18dbc2===_0x28316d)break;else _0x3babc2['push'](_0x3babc2['shift']());}catch(_0x44e1e5){_0x3babc2['push'](_0x3babc2['shift']());}}}(a62_0x520e,0x3778b));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetOperations}from'../../commands/dataset/operations.js';import{datasetRelations}from'../../commands/dataset/relations.js';import{datasetRelationCreate}from'../../commands/dataset/relation-create.js';function a62_0x520e(){const _0x27bc86=['5110776jwScRx','284828hgjKaf','651054iYPKac','10UrgbBH','3poBtrn','7buLDNY','22010OmpIrw','1463660NdtRtv','28bvVIin','1005840cTpZbH','2968472PeamaW'];a62_0x520e=function(){return _0x27bc86;};return a62_0x520e();}import{datasetRelationUpdate}from'../../commands/dataset/relation-update.js';import{datasetRelationDelete}from'../../commands/dataset/relation-delete.js';import{datasetDelete}from'../../commands/dataset/delete.js';function a62_0xa738(_0x33f374,_0x169b74){_0x33f374=_0x33f374-0x1d9;const _0x520e95=a62_0x520e();let _0xa73884=_0x520e95[_0x33f374];return _0xa73884;}import{datasetRestore}from'../../commands/dataset/restore.js';import{datasetFieldUpdate}from'../../commands/dataset/field-update.js';import{datasetRename}from'../../commands/dataset/rename.js';import{datasetExtendUpdate}from'../../commands/dataset/extend-update.js';import{datasetBusinessGroupUpdate}from'../../commands/dataset/business-group-update.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetOperations,datasetRelations,datasetRelationCreate,datasetRelationUpdate,datasetRelationDelete,datasetDelete,datasetRestore,datasetFieldUpdate,datasetRename,datasetExtendUpdate,datasetBusinessGroupUpdate];
1
+ (function(_0x4c0df2,_0xec0e31){const _0x44f094=a63_0x2974,_0x2cb9f0=_0x4c0df2();while(!![]){try{const _0x49ec3e=-parseInt(_0x44f094(0x1bb))/0x1+-parseInt(_0x44f094(0x1b2))/0x2*(-parseInt(_0x44f094(0x1b1))/0x3)+parseInt(_0x44f094(0x1b9))/0x4*(parseInt(_0x44f094(0x1b3))/0x5)+parseInt(_0x44f094(0x1b4))/0x6*(parseInt(_0x44f094(0x1b6))/0x7)+parseInt(_0x44f094(0x1ba))/0x8+-parseInt(_0x44f094(0x1b5))/0x9+parseInt(_0x44f094(0x1b8))/0xa*(-parseInt(_0x44f094(0x1b7))/0xb);if(_0x49ec3e===_0xec0e31)break;else _0x2cb9f0['push'](_0x2cb9f0['shift']());}catch(_0x4d9b70){_0x2cb9f0['push'](_0x2cb9f0['shift']());}}}(a63_0x33ba,0xd61c7));import{datasetList}from'../../commands/dataset/list.js';function a63_0x33ba(){const _0x255549=['6PGvDWN','1654464mpXTfC','155aeGMJb','5319804qJRxXM','1696968sBFmOu','7EOXnXg','26889346Sxvmow','10ZNCFbg','137152SgbIDB','9981648GIXMio','1341695zyMuiA'];a63_0x33ba=function(){return _0x255549;};return a63_0x33ba();}import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetOperations}from'../../commands/dataset/operations.js';import{datasetRelations}from'../../commands/dataset/relations.js';function a63_0x2974(_0x44b33e,_0x2dbd46){_0x44b33e=_0x44b33e-0x1b1;const _0x33bae6=a63_0x33ba();let _0x29744a=_0x33bae6[_0x44b33e];return _0x29744a;}import{datasetRelationCreate}from'../../commands/dataset/relation-create.js';import{datasetRelationUpdate}from'../../commands/dataset/relation-update.js';import{datasetRelationDelete}from'../../commands/dataset/relation-delete.js';import{datasetDelete}from'../../commands/dataset/delete.js';import{datasetRestore}from'../../commands/dataset/restore.js';import{datasetFieldUpdate}from'../../commands/dataset/field-update.js';import{datasetRename}from'../../commands/dataset/rename.js';import{datasetExtendUpdate}from'../../commands/dataset/extend-update.js';import{datasetBusinessGroupUpdate}from'../../commands/dataset/business-group-update.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetOperations,datasetRelations,datasetRelationCreate,datasetRelationUpdate,datasetRelationDelete,datasetDelete,datasetRestore,datasetFieldUpdate,datasetRename,datasetExtendUpdate,datasetBusinessGroupUpdate];
@@ -1 +1 @@
1
- const a63_0x1665dc=a63_0x473a;function a63_0x473a(_0x4f070f,_0x16e4d3){_0x4f070f=_0x4f070f-0x183;const _0x33c5c0=a63_0x33c5();let _0x473acd=_0x33c5c0[_0x4f070f];return _0x473acd;}(function(_0x1c6f90,_0xca80f0){const _0xcfb36d=a63_0x473a,_0x51cef9=_0x1c6f90();while(!![]){try{const _0x2f3f4d=-parseInt(_0xcfb36d(0x18e))/0x1*(parseInt(_0xcfb36d(0x183))/0x2)+parseInt(_0xcfb36d(0x1a6))/0x3*(-parseInt(_0xcfb36d(0x1a5))/0x4)+parseInt(_0xcfb36d(0x19a))/0x5*(-parseInt(_0xcfb36d(0x198))/0x6)+parseInt(_0xcfb36d(0x1a0))/0x7+parseInt(_0xcfb36d(0x199))/0x8*(parseInt(_0xcfb36d(0x1a2))/0x9)+-parseInt(_0xcfb36d(0x194))/0xa+parseInt(_0xcfb36d(0x19e))/0xb*(parseInt(_0xcfb36d(0x184))/0xc);if(_0x2f3f4d===_0xca80f0)break;else _0x51cef9['push'](_0x51cef9['shift']());}catch(_0x5a2a66){_0x51cef9['push'](_0x51cef9['shift']());}}}(a63_0x33c5,0x1a711));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DO_V2_DATASET_SOURCES=new Set([a63_0x1665dc(0x1a9),a63_0x1665dc(0x185)]);function a63_0x33c5(){const _0x168092=['Filter\x20datasets\x20by\x20source\x20type','Found\x20','1554800yrwMvZ','map','read','name','480lTRdmi','12968QhdGQO','2240iQpwco','appCode','has','trim','11DWRVpi','code','1393644WoPaGj','dbName','153ZTqpkE','list','split','4424JgCWju','552zwyhAW','dbtableConfig','str','DB_TABLE','370mIBHzs','5872980SgmKtZ','METADATA','datasetKey','dataset','length','allFields','Filter\x20datasets\x20by\x20name\x20(server-side\x20fuzzy\x20match)','description','source','toUpperCase','1151ksOeZd','List\x20DO\x20V2\x20datasets\x20in\x20the\x20app','tableName','filter'];a63_0x33c5=function(){return _0x168092;};return a63_0x33c5();}function normalizeSource(_0x33eed7){const _0x41df65=a63_0x1665dc;return _0x33eed7==null?'':String(_0x33eed7)[_0x41df65(0x19d)]()[_0x41df65(0x18d)]();}export const datasetList={'service':a63_0x1665dc(0x187),'command':a63_0x1665dc(0x1a3),'description':a63_0x1665dc(0x18f),'risk':a63_0x1665dc(0x196),'flags':[{'name':a63_0x1665dc(0x197),'type':'string','description':a63_0x1665dc(0x18a)},CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':a63_0x1665dc(0x18c),'type':'string','description':a63_0x1665dc(0x192),'enum':[a63_0x1665dc(0x1a9),'METADATA']}],async 'execute'(_0x5b2954){const _0x5860aa=a63_0x1665dc,_0x593746=_0x5b2954[_0x5860aa(0x1a8)]('name'),_0x4876d2=_0x5b2954[_0x5860aa(0x1a8)](_0x5860aa(0x19f)),_0x6702cf=normalizeSource(_0x5b2954[_0x5860aa(0x1a8)](_0x5860aa(0x18c))),_0xf1fd32=await listDatasets(_0x5b2954[_0x5860aa(0x19b)],{..._0x593746&&{'name':_0x593746},..._0x4876d2&&{'code':_0x4876d2}}),_0x5209ee=_0xf1fd32['filter'](_0x3cdce8=>DO_V2_DATASET_SOURCES[_0x5860aa(0x19c)](normalizeSource(_0x3cdce8[_0x5860aa(0x18c)]))),_0x37123a=_0x6702cf?_0x5209ee[_0x5860aa(0x191)](_0x34020f=>normalizeSource(_0x34020f[_0x5860aa(0x18c)])===_0x6702cf):_0x5209ee,_0x3c354a=_0x37123a[_0x5860aa(0x195)](_0x18144d=>{const _0x422c04=_0x5860aa,_0x42a2bc=_0x18144d[_0x422c04(0x1a7)]??{};return{'id':_0x18144d['id'],'name':_0x18144d[_0x422c04(0x197)],'code':_0x18144d['code'],'description':_0x18144d[_0x422c04(0x18b)],'source':_0x18144d[_0x422c04(0x18c)],'db':_0x42a2bc[_0x422c04(0x1a1)],'table':_0x42a2bc[_0x422c04(0x190)],'datasetKey':_0x42a2bc[_0x422c04(0x186)],'pk':_0x42a2bc['pkField'],'fields':_0x42a2bc[_0x422c04(0x189)]?_0x42a2bc[_0x422c04(0x189)][_0x422c04(0x1a4)](',')[_0x422c04(0x195)](_0x2c76e0=>_0x2c76e0[_0x422c04(0x19d)]()):[]};});return{'ok':!![],'data':{'total':_0x3c354a[_0x5860aa(0x188)],'datasets':_0x3c354a},'message':_0x5860aa(0x193)+_0x3c354a[_0x5860aa(0x188)]+'\x20dataset(s)'};}};
1
+ const a64_0x41ad9b=a64_0x444f;function a64_0x444f(_0x584af3,_0xdb8053){_0x584af3=_0x584af3-0x15c;const _0x6d9145=a64_0x6d91();let _0x444f6a=_0x6d9145[_0x584af3];return _0x444f6a;}(function(_0x4a2451,_0x5f49eb){const _0x278fc9=a64_0x444f,_0x131b2c=_0x4a2451();while(!![]){try{const _0x26afca=-parseInt(_0x278fc9(0x174))/0x1*(-parseInt(_0x278fc9(0x16b))/0x2)+-parseInt(_0x278fc9(0x15d))/0x3+-parseInt(_0x278fc9(0x160))/0x4+-parseInt(_0x278fc9(0x16f))/0x5+-parseInt(_0x278fc9(0x169))/0x6+-parseInt(_0x278fc9(0x170))/0x7*(-parseInt(_0x278fc9(0x173))/0x8)+-parseInt(_0x278fc9(0x167))/0x9*(-parseInt(_0x278fc9(0x161))/0xa);if(_0x26afca===_0x5f49eb)break;else _0x131b2c['push'](_0x131b2c['shift']());}catch(_0xb25073){_0x131b2c['push'](_0x131b2c['shift']());}}}(a64_0x6d91,0xe480e));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DO_V2_DATASET_SOURCES=new Set([a64_0x41ad9b(0x16c),a64_0x41ad9b(0x178)]);function a64_0x6d91(){const _0x423777=['name','datasetKey','dataset','METADATA','appCode','allFields','dbtableConfig','3938409SCQRoP','toUpperCase','has','5303664SIQMzG','20dguqIh','trim','string','filter','pkField','Filter\x20datasets\x20by\x20source\x20type','15505902gvhefq','read','2053476slcYqP','source','1754098gQXqaz','DB_TABLE','code','Filter\x20datasets\x20by\x20name\x20(server-side\x20fuzzy\x20match)','7331595upkQGT','7423003YaWYFg','str','List\x20DO\x20V2\x20datasets\x20in\x20the\x20app','8WyoodT','1DjjDJZ'];a64_0x6d91=function(){return _0x423777;};return a64_0x6d91();}function normalizeSource(_0x2b0fbd){const _0xde3991=a64_0x41ad9b;return _0x2b0fbd==null?'':String(_0x2b0fbd)[_0xde3991(0x162)]()[_0xde3991(0x15e)]();}export const datasetList={'service':a64_0x41ad9b(0x177),'command':'list','description':a64_0x41ad9b(0x172),'risk':a64_0x41ad9b(0x168),'flags':[{'name':a64_0x41ad9b(0x175),'type':a64_0x41ad9b(0x163),'description':a64_0x41ad9b(0x16e)},CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':'source','type':'string','description':a64_0x41ad9b(0x166),'enum':['DB_TABLE',a64_0x41ad9b(0x178)]}],async 'execute'(_0x451335){const _0x2d5ca1=a64_0x41ad9b,_0x3abf49=_0x451335[_0x2d5ca1(0x171)](_0x2d5ca1(0x175)),_0xcc7508=_0x451335[_0x2d5ca1(0x171)]('code'),_0x1bd42f=normalizeSource(_0x451335['str'](_0x2d5ca1(0x16a))),_0x1eb29=await listDatasets(_0x451335[_0x2d5ca1(0x179)],{..._0x3abf49&&{'name':_0x3abf49},..._0xcc7508&&{'code':_0xcc7508}}),_0x29278d=_0x1eb29[_0x2d5ca1(0x164)](_0x371098=>DO_V2_DATASET_SOURCES[_0x2d5ca1(0x15f)](normalizeSource(_0x371098[_0x2d5ca1(0x16a)]))),_0x2e2032=_0x1bd42f?_0x29278d[_0x2d5ca1(0x164)](_0x1b3849=>normalizeSource(_0x1b3849['source'])===_0x1bd42f):_0x29278d,_0x674f72=_0x2e2032['map'](_0x29f3de=>{const _0x527770=_0x2d5ca1,_0xa84983=_0x29f3de[_0x527770(0x15c)]??{};return{'id':_0x29f3de['id'],'name':_0x29f3de[_0x527770(0x175)],'code':_0x29f3de[_0x527770(0x16d)],'description':_0x29f3de['description'],'source':_0x29f3de['source'],'db':_0xa84983['dbName'],'table':_0xa84983['tableName'],'datasetKey':_0xa84983[_0x527770(0x176)],'pk':_0xa84983[_0x527770(0x165)],'fields':_0xa84983['allFields']?_0xa84983[_0x527770(0x17a)]['split'](',')['map'](_0x3cfe5a=>_0x3cfe5a[_0x527770(0x162)]()):[]};});return{'ok':!![],'data':{'total':_0x674f72['length'],'datasets':_0x674f72},'message':'Found\x20'+_0x674f72['length']+'\x20dataset(s)'};}};