@lovrabet/rabetbase-cli 2.3.7-beta.3 → 2.3.7

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 (245) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/logs/index.js +1 -1
  101. package/lib/commands/menu/index.js +1 -1
  102. package/lib/commands/menu/list.js +1 -1
  103. package/lib/commands/menu/shared/compare-table.js +1 -1
  104. package/lib/commands/menu/shared/index.js +1 -1
  105. package/lib/commands/menu/shared/inquirer.js +1 -1
  106. package/lib/commands/menu/shared/local-pages.js +1 -1
  107. package/lib/commands/menu/shared/logic.js +1 -1
  108. package/lib/commands/menu/shared/service.js +1 -1
  109. package/lib/commands/menu/shared/sync-core.js +1 -1
  110. package/lib/commands/menu/shared/update-core.js +1 -1
  111. package/lib/commands/menu/shared/valid-url.js +1 -1
  112. package/lib/commands/menu/sync.js +1 -1
  113. package/lib/commands/menu/update.js +1 -1
  114. package/lib/commands/notification/config-list.js +1 -0
  115. package/lib/commands/notification/index.js +1 -0
  116. package/lib/commands/page/generate-start.js +1 -1
  117. package/lib/commands/page/generate-status.js +1 -1
  118. package/lib/commands/page/index.js +1 -1
  119. package/lib/commands/page/pull.js +1 -1
  120. package/lib/commands/page/push.js +1 -1
  121. package/lib/commands/page/relation-audit.js +1 -1
  122. package/lib/commands/page/shared.js +1 -1
  123. package/lib/commands/page/standard-page-status.js +1 -1
  124. package/lib/commands/page/sync.js +1 -1
  125. package/lib/commands/permit/index.js +1 -1
  126. package/lib/commands/permit/page-get.js +1 -1
  127. package/lib/commands/permit/page-set.js +1 -1
  128. package/lib/commands/permit/role-apis-set.js +1 -1
  129. package/lib/commands/permit/role-menus-set.js +1 -1
  130. package/lib/commands/permit/role-menus.js +1 -1
  131. package/lib/commands/permit/shared.js +1 -1
  132. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  133. package/lib/commands/project/create/format-elapsed.js +1 -1
  134. package/lib/commands/project/create/main.js +1 -1
  135. package/lib/commands/project/create/non-interactive.js +1 -1
  136. package/lib/commands/project/create/project-template-path.js +1 -1
  137. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  138. package/lib/commands/project/create/use-format-code.js +1 -1
  139. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  140. package/lib/commands/project/index.js +1 -1
  141. package/lib/commands/project/init.js +1 -1
  142. package/lib/commands/project/upgrade.js +1 -1
  143. package/lib/commands/registry.js +1 -1
  144. package/lib/commands/role/create.js +1 -1
  145. package/lib/commands/role/delete.js +1 -1
  146. package/lib/commands/role/detail.js +1 -1
  147. package/lib/commands/role/index.js +1 -1
  148. package/lib/commands/role/list.js +1 -1
  149. package/lib/commands/role/shared.js +1 -1
  150. package/lib/commands/role/update.js +1 -1
  151. package/lib/commands/role/user-add.js +1 -1
  152. package/lib/commands/role/user-remove.js +1 -1
  153. package/lib/commands/role/user-resolve.js +1 -1
  154. package/lib/commands/run/index.js +1 -1
  155. package/lib/commands/schema.js +1 -1
  156. package/lib/commands/sql/create.js +1 -1
  157. package/lib/commands/sql/delete.js +1 -1
  158. package/lib/commands/sql/detail.js +1 -1
  159. package/lib/commands/sql/exec.js +1 -1
  160. package/lib/commands/sql/index.js +1 -1
  161. package/lib/commands/sql/list.js +1 -1
  162. package/lib/commands/sql/pull.js +1 -1
  163. package/lib/commands/sql/push.js +1 -1
  164. package/lib/commands/sql/save.js +1 -1
  165. package/lib/commands/sql/shared.js +1 -1
  166. package/lib/commands/sql/status.js +1 -1
  167. package/lib/commands/sql/validate.js +1 -1
  168. package/lib/commands/workspace/add.js +1 -1
  169. package/lib/commands/workspace/index.js +1 -1
  170. package/lib/commands/workspace/remove.js +1 -1
  171. package/lib/config/schema.js +1 -1
  172. package/lib/constant/cdn.js +1 -1
  173. package/lib/constant/cli.js +1 -1
  174. package/lib/constant/defaults.js +1 -1
  175. package/lib/constant/domain.js +1 -1
  176. package/lib/constant/env.js +1 -1
  177. package/lib/constant/output.js +1 -1
  178. package/lib/constant/paths.js +1 -1
  179. package/lib/constant/risk.js +1 -1
  180. package/lib/context/app-resolver.js +1 -1
  181. package/lib/context/auth-resolver.js +1 -1
  182. package/lib/context/config-loader.js +1 -1
  183. package/lib/context.js +1 -1
  184. package/lib/core/alias-resolver.js +1 -1
  185. package/lib/core/api-client.js +1 -1
  186. package/lib/core/bff/config.js +1 -1
  187. package/lib/core/bff/file-system.js +1 -1
  188. package/lib/core/bff/hash.js +1 -1
  189. package/lib/core/bff/lock.js +1 -1
  190. package/lib/core/bff/utils.js +1 -1
  191. package/lib/core/db-resolver.js +1 -1
  192. package/lib/core/page/file-system.js +1 -1
  193. package/lib/core/page/hash.js +1 -1
  194. package/lib/core/page/lock.js +1 -1
  195. package/lib/core/sql-sync/config.js +1 -1
  196. package/lib/core/sql-sync/file-system.js +1 -1
  197. package/lib/core/sql-sync/hash.js +1 -1
  198. package/lib/core/sql-sync/lock.js +1 -1
  199. package/lib/core/sql-sync/utils.js +1 -1
  200. package/lib/core/sql-validator.js +1 -1
  201. package/lib/errors.js +1 -1
  202. package/lib/framework/build-all-flags.js +1 -1
  203. package/lib/framework/flags.js +1 -1
  204. package/lib/framework/help.js +1 -1
  205. package/lib/framework/index.js +1 -1
  206. package/lib/framework/output.js +1 -1
  207. package/lib/framework/response.js +1 -1
  208. package/lib/framework/runner-alias.js +1 -1
  209. package/lib/framework/runner.js +1 -1
  210. package/lib/framework/schema-export.js +1 -1
  211. package/lib/framework/types.js +1 -1
  212. package/lib/generated/build-info.js +1 -1
  213. package/lib/help.js +1 -1
  214. package/lib/skills/main.js +1 -1
  215. package/lib/skills/npx-skills-add.js +1 -1
  216. package/lib/telemetry/cli-command-trace.js +1 -1
  217. package/lib/telemetry/cli-help-trace.js +1 -1
  218. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  219. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  220. package/lib/telemetry/send-cli-trace-log.js +1 -1
  221. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  222. package/lib/utils/ai_config.js +1 -1
  223. package/lib/utils/apply-jq-filter.js +1 -1
  224. package/lib/utils/cdn-config.js +1 -1
  225. package/lib/utils/check-sdk-version.js +1 -1
  226. package/lib/utils/cli-version-check.js +1 -1
  227. package/lib/utils/cli-version-policy.js +1 -1
  228. package/lib/utils/config.js +1 -1
  229. package/lib/utils/copy-directory.js +1 -1
  230. package/lib/utils/entity-with-id.js +1 -1
  231. package/lib/utils/file-utils.js +1 -1
  232. package/lib/utils/guides-cdn.js +1 -1
  233. package/lib/utils/http-client.js +1 -1
  234. package/lib/utils/is-non-interactive.js +1 -1
  235. package/lib/utils/logger.js +1 -1
  236. package/lib/utils/params.js +1 -1
  237. package/lib/utils/platform.js +1 -1
  238. package/lib/utils/rules-cdn.js +1 -1
  239. package/lib/utils/sleep.js +1 -1
  240. package/lib/utils/template-replacer.js +1 -1
  241. package/lib/utils/update-notice.js +1 -1
  242. package/lib/utils/version.js +1 -1
  243. package/lib/utils/with-active-cookie.js +1 -1
  244. package/lib/utils/write-cli-side-channel.js +1 -1
  245. package/package.json +1 -1
@@ -1 +1 @@
1
- const a53_0x3e90ba=a53_0x51d2;function a53_0x1421(){const _0x7c2b98=['\x20app\x20add\x20<name>\x20--appcode\x20','key','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','apps','global','5974835dVokXo','\x20set\x20to:\x20','305431EanvoR','app','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','riskLevel','locale','Settable\x20top-level\x20keys:\x20','validation','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','includes','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Missing\x20key.','\x20appcode\x20set\x20to:\x20','set','keys','config','398947MWZsGt','Project','Usage:\x20','boolean','2mzWCzA','string','value','692964yYjPQx','Invalid\x20value\x20for\x20\x22','length','2248815qNaMcY','Global','write','42ZLMwQJ','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','str','join','Use\x20`','137528VlfMRM','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','`,\x20`','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Invalid\x20locale\x20value.','appcode','\x22.\x20Allowed:\x20','bool','24093IvixQN','1730xyBlnt','env'];a53_0x1421=function(){return _0x7c2b98;};return a53_0x1421();}function a53_0x51d2(_0x5cf05d,_0x149242){_0x5cf05d=_0x5cf05d-0x10d;const _0x1421d2=a53_0x1421();let _0x51d295=_0x1421d2[_0x5cf05d];return _0x51d295;}(function(_0x59e9c4,_0x121eb8){const _0x296d5d=a53_0x51d2,_0xc21988=_0x59e9c4();while(!![]){try{const _0x188a6c=-parseInt(_0x296d5d(0x123))/0x1*(-parseInt(_0x296d5d(0x127))/0x2)+-parseInt(_0x296d5d(0x12d))/0x3+parseInt(_0x296d5d(0x12a))/0x4+parseInt(_0x296d5d(0x112))/0x5+parseInt(_0x296d5d(0x130))/0x6*(parseInt(_0x296d5d(0x114))/0x7)+-parseInt(_0x296d5d(0x135))/0x8+-parseInt(_0x296d5d(0x13f))/0x9*(parseInt(_0x296d5d(0x140))/0xa);if(_0x188a6c===_0x121eb8)break;else _0xc21988['push'](_0xc21988['shift']());}catch(_0x1f9cce){_0xc21988['push'](_0xc21988['shift']());}}}(a53_0x1421,0xcdbad));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(_0x16ff6c){const _0x117578=a53_0x51d2,_0x3eb29d=_0x16ff6c['str'](_0x117578(0x10e)),_0x4db96d=_0x16ff6c[_0x117578(0x132)](_0x117578(0x129));if(!_0x3eb29d)throw CliErrors['validation'](_0x117578(0x11e),_0x117578(0x125)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x4db96d===undefined||_0x4db96d==='')throw CliErrors[_0x117578(0x11a)]('Missing\x20value.',_0x117578(0x125)+CLI_BIN_NAME+_0x117578(0x137));if(_0x4db96d[_0x117578(0x12c)]>0x1f4)throw CliErrors[_0x117578(0x11a)](_0x117578(0x11b));if(!isTopLevelConfigKey(_0x3eb29d))throw CliErrors[_0x117578(0x11a)]('Top-level\x20key\x20\x22'+_0x3eb29d+'\x22\x20is\x20not\x20settable.',_0x117578(0x119)+getTopLevelConfigKeySummary());if(_0x3eb29d===_0x117578(0x117))throw CliErrors[_0x117578(0x11a)](_0x117578(0x136));if(CONFIG_ENUM_VALUES[_0x3eb29d]&&!CONFIG_ENUM_VALUES[_0x3eb29d][_0x117578(0x11c)](_0x4db96d))throw CliErrors[_0x117578(0x11a)](_0x117578(0x12b)+_0x3eb29d+_0x117578(0x13d)+CONFIG_ENUM_VALUES[_0x3eb29d][_0x117578(0x133)](',\x20'));if(_0x3eb29d===_0x117578(0x118)&&!normalizeLocale(_0x4db96d))throw CliErrors[_0x117578(0x11a)](_0x117578(0x13b),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x49a9ff={'global':_0x16ff6c[_0x117578(0x13e)](_0x117578(0x111))},_0x440900=resolveWriteScope(_0x49a9ff),_0x58622e=readScopedConfig(_0x440900);let _0x4ae1b7=_0x3eb29d,_0x3aeb9c=_0x4db96d;_0x3eb29d===_0x117578(0x115)&&(_0x4ae1b7='appcode',delete _0x58622e['app']);_0x3eb29d===_0x117578(0x118)&&(_0x3aeb9c=normalizeLocale(_0x4db96d));if(_0x3eb29d===_0x117578(0x141)){_0x3aeb9c=normalizeEnv(_0x4db96d);if(!isProduction(_0x3aeb9c)&&!isDaily(_0x3aeb9c))throw CliErrors[_0x117578(0x11a)](_0x117578(0x131),_0x117578(0x138));}if(_0x3eb29d===_0x117578(0x13c)){const _0x56d971=_0x58622e[_0x117578(0x110)]&&typeof _0x58622e[_0x117578(0x110)]==='object'?Object[_0x117578(0x121)](_0x58622e[_0x117578(0x110)]):[];if(_0x56d971[_0x117578(0x12c)]>0x0)throw CliErrors[_0x117578(0x11a)](_0x117578(0x13a),_0x117578(0x134)+CLI_BIN_NAME+_0x117578(0x10d)+_0x3aeb9c+_0x117578(0x139)+CLI_BIN_NAME+_0x117578(0x11d));const _0x2e570b=buildCanonicalProjectConfig({..._0x58622e},{'appCodes':[_0x3aeb9c],'env':typeof _0x58622e[_0x117578(0x141)]===_0x117578(0x128)?_0x58622e[_0x117578(0x141)]:undefined});writeScopedConfig(_0x2e570b,_0x440900);const _0x396fa7=_0x440900===_0x117578(0x111)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x396fa7+_0x117578(0x11f)+_0x3aeb9c+_0x117578(0x116)};}_0x58622e[_0x4ae1b7]=_0x3aeb9c,writeScopedConfig(_0x58622e,_0x440900);const _0x346f27=_0x440900===_0x117578(0x111)?_0x117578(0x12e):_0x117578(0x124);return{'ok':!![],'message':'✓\x20'+_0x346f27+'\x20'+_0x4ae1b7+_0x117578(0x113)+_0x3aeb9c};}export const configSetDefinition={'service':a53_0x3e90ba(0x122),'command':a53_0x3e90ba(0x120),'description':'Set\x20a\x20config\x20value','risk':a53_0x3e90ba(0x12f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x3e90ba(0x10e),'type':a53_0x3e90ba(0x128),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a53_0x3e90ba(0x128),'description':'Config\x20value','required':!![]},{'name':'global','type':a53_0x3e90ba(0x126),'description':a53_0x3e90ba(0x10f),'default':![]}],'execute':execute};
1
+ const a53_0x5cea5b=a53_0x5db5;(function(_0xdaf4bc,_0x6a1981){const _0x1caa40=a53_0x5db5,_0x24d688=_0xdaf4bc();while(!![]){try{const _0x3cb8ea=parseInt(_0x1caa40(0xc2))/0x1*(parseInt(_0x1caa40(0xb8))/0x2)+parseInt(_0x1caa40(0xd5))/0x3+-parseInt(_0x1caa40(0xd9))/0x4+parseInt(_0x1caa40(0xdc))/0x5*(parseInt(_0x1caa40(0xd7))/0x6)+parseInt(_0x1caa40(0xd8))/0x7+parseInt(_0x1caa40(0xb5))/0x8+-parseInt(_0x1caa40(0xbd))/0x9;if(_0x3cb8ea===_0x6a1981)break;else _0x24d688['push'](_0x24d688['shift']());}catch(_0x3e4007){_0x24d688['push'](_0x24d688['shift']());}}}(a53_0x2c31,0x74463));function a53_0x5db5(_0x27331d,_0x7366a5){_0x27331d=_0x27331d-0xae;const _0x2c3113=a53_0x2c31();let _0x5db54a=_0x2c3113[_0x27331d];return _0x5db54a;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a53_0x2c31(){const _0x2bff58=['Missing\x20value.','Settable\x20top-level\x20keys:\x20','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Project','app','Invalid\x20locale\x20value.','Global','appcode','string','1617564hULjSF','Missing\x20key.','4392dlbIMb','891443ikwXtq','1096704aTZusE','\x20appcode\x20set\x20to:\x20','Use\x20`','2290Gqgugo','Set\x20a\x20config\x20value','locale','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','boolean','`,\x20`','config','value','Invalid\x20value\x20for\x20\x22','3890680vAIcUP','global','Usage:\x20','6tRbaZJ','length','env','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','13460166jCrOVC','set','str','\x22\x20is\x20not\x20settable.','join','252627HIJrEC','bool','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','keys','key','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','validation','write','riskLevel','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.'];a53_0x2c31=function(){return _0x2bff58;};return a53_0x2c31();}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(_0xcb4f51){const _0x401a88=a53_0x5db5,_0x127d39=_0xcb4f51[_0x401a88(0xbf)](_0x401a88(0xc6)),_0x119b63=_0xcb4f51[_0x401a88(0xbf)](_0x401a88(0xb3));if(!_0x127d39)throw CliErrors[_0x401a88(0xc8)](_0x401a88(0xd6),_0x401a88(0xb7)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x119b63===undefined||_0x119b63==='')throw CliErrors[_0x401a88(0xc8)](_0x401a88(0xcc),_0x401a88(0xb7)+CLI_BIN_NAME+_0x401a88(0xc7));if(_0x119b63[_0x401a88(0xb9)]>0x1f4)throw CliErrors[_0x401a88(0xc8)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x127d39))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x127d39+_0x401a88(0xc0),_0x401a88(0xcd)+getTopLevelConfigKeySummary());if(_0x127d39===_0x401a88(0xca))throw CliErrors['validation'](_0x401a88(0xbb));if(CONFIG_ENUM_VALUES[_0x127d39]&&!CONFIG_ENUM_VALUES[_0x127d39]['includes'](_0x119b63))throw CliErrors[_0x401a88(0xc8)](_0x401a88(0xb4)+_0x127d39+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x127d39][_0x401a88(0xc1)](',\x20'));if(_0x127d39===_0x401a88(0xae)&&!normalizeLocale(_0x119b63))throw CliErrors[_0x401a88(0xc8)](_0x401a88(0xd1),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0xbc98b1={'global':_0xcb4f51[_0x401a88(0xc3)]('global')},_0x2063ea=resolveWriteScope(_0xbc98b1),_0x45c5b6=readScopedConfig(_0x2063ea);let _0x3e121c=_0x127d39,_0x72388b=_0x119b63;_0x127d39===_0x401a88(0xd0)&&(_0x3e121c=_0x401a88(0xd3),delete _0x45c5b6[_0x401a88(0xd0)]);_0x127d39==='locale'&&(_0x72388b=normalizeLocale(_0x119b63));if(_0x127d39===_0x401a88(0xba)){_0x72388b=normalizeEnv(_0x119b63);if(!isProduction(_0x72388b)&&!isDaily(_0x72388b))throw CliErrors['validation'](_0x401a88(0xaf),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x127d39===_0x401a88(0xd3)){const _0x39f526=_0x45c5b6['apps']&&typeof _0x45c5b6['apps']==='object'?Object[_0x401a88(0xc5)](_0x45c5b6['apps']):[];if(_0x39f526[_0x401a88(0xb9)]>0x0)throw CliErrors['validation'](_0x401a88(0xcb),_0x401a88(0xdb)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20'+_0x72388b+_0x401a88(0xb1)+CLI_BIN_NAME+_0x401a88(0xc4));const _0x2ed5cf=buildCanonicalProjectConfig({..._0x45c5b6},{'appCodes':[_0x72388b],'env':typeof _0x45c5b6[_0x401a88(0xba)]===_0x401a88(0xd4)?_0x45c5b6[_0x401a88(0xba)]:undefined});writeScopedConfig(_0x2ed5cf,_0x2063ea);const _0x2b1e5b=_0x2063ea===_0x401a88(0xb6)?_0x401a88(0xd2):_0x401a88(0xcf);return{'ok':!![],'message':'✓\x20'+_0x2b1e5b+_0x401a88(0xda)+_0x72388b+_0x401a88(0xce)};}_0x45c5b6[_0x3e121c]=_0x72388b,writeScopedConfig(_0x45c5b6,_0x2063ea);const _0x1e702b=_0x2063ea==='global'?_0x401a88(0xd2):'Project';return{'ok':!![],'message':'✓\x20'+_0x1e702b+'\x20'+_0x3e121c+'\x20set\x20to:\x20'+_0x72388b};}export const configSetDefinition={'service':a53_0x5cea5b(0xb2),'command':a53_0x5cea5b(0xbe),'description':a53_0x5cea5b(0xdd),'risk':a53_0x5cea5b(0xc9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a53_0x5cea5b(0xd4),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a53_0x5cea5b(0xd4),'description':'Config\x20value','required':!![]},{'name':a53_0x5cea5b(0xb6),'type':a53_0x5cea5b(0xb0),'description':a53_0x5cea5b(0xbc),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x350583,_0x30fc7c){var _0x4803cb=a54_0x4796,_0x345f92=_0x350583();while(!![]){try{var _0x31c6fc=parseInt(_0x4803cb(0x16e))/0x1*(-parseInt(_0x4803cb(0x173))/0x2)+parseInt(_0x4803cb(0x167))/0x3*(-parseInt(_0x4803cb(0x164))/0x4)+parseInt(_0x4803cb(0x171))/0x5+-parseInt(_0x4803cb(0x170))/0x6*(-parseInt(_0x4803cb(0x169))/0x7)+parseInt(_0x4803cb(0x16c))/0x8+parseInt(_0x4803cb(0x168))/0x9*(-parseInt(_0x4803cb(0x165))/0xa)+parseInt(_0x4803cb(0x16d))/0xb;if(_0x31c6fc===_0x30fc7c)break;else _0x345f92['push'](_0x345f92['shift']());}catch(_0x466bab){_0x345f92['push'](_0x345f92['shift']());}}}(a54_0x424f,0x3c92a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a54_0x424f(){var _0x565fe8=['1094570FjsTpG','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','4530xhjsFp','18GINYec','74571WPXRId','global','\x20init`\x20first.','2051920tydiwJ','584760FqFxWG','1ZshyRa','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','204lwINaj','1321295FIqhov','project','808322Rjhdju','validation','172YeqPGv'];a54_0x424f=function(){return _0x565fe8;};return a54_0x424f();}export function resolveWriteScope(_0x2352b5){var _0x31903f=a54_0x4796;if(_0x2352b5[_0x31903f(0x16a)])return _0x31903f(0x16a);if(!isInProject())throw CliErrors[_0x31903f(0x174)](_0x31903f(0x16f),_0x31903f(0x166)+CLI_BIN_NAME+_0x31903f(0x16b));return _0x31903f(0x172);}export function readScopedConfig(_0x2861a1){return readConfigFile(resolveWriteConfigPath(_0x2861a1));}function a54_0x4796(_0x203dd1,_0x17266c){_0x203dd1=_0x203dd1-0x164;var _0x424f77=a54_0x424f();var _0x479666=_0x424f77[_0x203dd1];return _0x479666;}export function writeScopedConfig(_0x1c68d0,_0x56fccf){writeConfigFile(resolveWriteConfigPath(_0x56fccf),_0x1c68d0);}
1
+ (function(_0x51030e,_0x292164){var _0x3d0043=a54_0x3966,_0x245c26=_0x51030e();while(!![]){try{var _0x18d027=-parseInt(_0x3d0043(0xe3))/0x1*(-parseInt(_0x3d0043(0xdf))/0x2)+-parseInt(_0x3d0043(0xdc))/0x3+-parseInt(_0x3d0043(0xde))/0x4*(parseInt(_0x3d0043(0xdb))/0x5)+-parseInt(_0x3d0043(0xe0))/0x6+parseInt(_0x3d0043(0xe1))/0x7*(-parseInt(_0x3d0043(0xe4))/0x8)+-parseInt(_0x3d0043(0xd6))/0x9*(parseInt(_0x3d0043(0xd7))/0xa)+-parseInt(_0x3d0043(0xd5))/0xb*(-parseInt(_0x3d0043(0xd8))/0xc);if(_0x18d027===_0x292164)break;else _0x245c26['push'](_0x245c26['shift']());}catch(_0x54c855){_0x245c26['push'](_0x245c26['shift']());}}}(a54_0x1762,0x286e4));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a54_0x3966(_0x406705,_0x5b6c95){_0x406705=_0x406705-0xd5;var _0x1762d3=a54_0x1762();var _0x39666d=_0x1762d3[_0x406705];return _0x39666d;}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};function a54_0x1762(){var _0x366206=['2755434mjVgXf','9QscOpy','1964680AMRpnc','36IQYVMV','global','project','5pGQIwM','42030yQedQG','validation','992700sFdPmf','16978rxPAIM','758580dKQqGY','7WQyPlY','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','10XKPevs','685480Vajfyi'];a54_0x1762=function(){return _0x366206;};return a54_0x1762();}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0xd04055){var _0x55b75d=a54_0x3966;if(_0xd04055[_0x55b75d(0xd9)])return _0x55b75d(0xd9);if(!isInProject())throw CliErrors[_0x55b75d(0xdd)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x55b75d(0xe2)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x55b75d(0xda);}export function readScopedConfig(_0x587e42){return readConfigFile(resolveWriteConfigPath(_0x587e42));}export function writeScopedConfig(_0x293a61,_0x5ddbfe){writeConfigFile(resolveWriteConfigPath(_0x5ddbfe),_0x293a61);}
@@ -1 +1 @@
1
- function a55_0x1dd0(_0x4f53b9,_0x111164){_0x4f53b9=_0x4f53b9-0x179;const _0x53a9e=a55_0x53a9();let _0x1dd09f=_0x53a9e[_0x4f53b9];return _0x1dd09f;}const a55_0x89a866=a55_0x1dd0;(function(_0x6dd28,_0x3927d9){const _0x4a8806=a55_0x1dd0,_0xfcc1b=_0x6dd28();while(!![]){try{const _0x3492ce=-parseInt(_0x4a8806(0x188))/0x1+-parseInt(_0x4a8806(0x181))/0x2*(-parseInt(_0x4a8806(0x186))/0x3)+parseInt(_0x4a8806(0x17e))/0x4*(-parseInt(_0x4a8806(0x185))/0x5)+parseInt(_0x4a8806(0x182))/0x6+parseInt(_0x4a8806(0x17a))/0x7+parseInt(_0x4a8806(0x180))/0x8+parseInt(_0x4a8806(0x187))/0x9*(parseInt(_0x4a8806(0x17b))/0xa);if(_0x3492ce===_0x3927d9)break;else _0xfcc1b['push'](_0xfcc1b['shift']());}catch(_0x5a748a){_0xfcc1b['push'](_0xfcc1b['shift']());}}}(a55_0x53a9,0x19452));import{buildDataCommand}from'../../commands/data/shared.js';function a55_0x53a9(){const _0x6e38a2=['2FSeHdn','365676FOeqMt','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}]','851785wTvwjA','3177KasiJi','1815876KKrplI','202880TWXyvw','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','1416863EpUABi','10NufkZG','\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]','filter','4KZbSbX','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','84520hSBzyE'];a55_0x53a9=function(){return _0x6e38a2;};return a55_0x53a9();}export const dataFilter=buildDataCommand({'command':a55_0x89a866(0x17d),'operation':a55_0x89a866(0x17d),'description':a55_0x89a866(0x189),'paramsRequired':![],'paramsHint':a55_0x89a866(0x183),'helpExtra':[a55_0x89a866(0x179),a55_0x89a866(0x18b),a55_0x89a866(0x17c),a55_0x89a866(0x184),a55_0x89a866(0x18a),a55_0x89a866(0x17f)]['join']('\x0a')});
1
+ const a55_0xaa03e=a55_0x1199;(function(_0xe634c7,_0x348b1b){const _0x1a9881=a55_0x1199,_0x595ede=_0xe634c7();while(!![]){try{const _0x319fa5=parseInt(_0x1a9881(0x1c2))/0x1*(-parseInt(_0x1a9881(0x1c6))/0x2)+parseInt(_0x1a9881(0x1c7))/0x3+parseInt(_0x1a9881(0x1c0))/0x4*(parseInt(_0x1a9881(0x1c5))/0x5)+parseInt(_0x1a9881(0x1bc))/0x6*(-parseInt(_0x1a9881(0x1c3))/0x7)+parseInt(_0x1a9881(0x1bb))/0x8+-parseInt(_0x1a9881(0x1bf))/0x9+parseInt(_0x1a9881(0x1c1))/0xa;if(_0x319fa5===_0x348b1b)break;else _0x595ede['push'](_0x595ede['shift']());}catch(_0x46ff17){_0x595ede['push'](_0x595ede['shift']());}}}(a55_0x143d,0x7496d));function a55_0x1199(_0x30639d,_0x340e18){_0x30639d=_0x30639d-0x1b6;const _0x143d8c=a55_0x143d();let _0x119953=_0x143d8c[_0x30639d];return _0x119953;}function a55_0x143d(){const _0x27027f=['70090wBlHBa','1888350IlrLWu','\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','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}]','6188600CUsFRJ','5298aPHMtQ','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','filter','3580434yshtNP','1260PTFWpA','3220060ngNwtx','11xIbcIs','6454vmLzBc','\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]','5555QIIuRS'];a55_0x143d=function(){return _0x27027f;};return a55_0x143d();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a55_0xaa03e(0x1be),'operation':a55_0xaa03e(0x1be),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a55_0xaa03e(0x1b9),'helpExtra':[a55_0xaa03e(0x1bd),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a55_0xaa03e(0x1c4),a55_0xaa03e(0x1ba),a55_0xaa03e(0x1b7),a55_0xaa03e(0x1b6)][a55_0xaa03e(0x1b8)]('\x0a')});
@@ -1 +1 @@
1
- function a56_0xee60(_0x48ed66,_0x101ced){_0x48ed66=_0x48ed66-0x132;const _0x1e1967=a56_0x1e19();let _0xee6029=_0x1e1967[_0x48ed66];return _0xee6029;}const a56_0x484ed7=a56_0xee60;function a56_0x1e19(){const _0x40f290=['7654149HGxVvq','4841459LmHgGl','10894728KyWEsY','6cJAyuQ','645mnKQIg','9552JYaiky','560318lhWzat','363778upnsoJ','Get\x20a\x20single\x20record\x20by\x20ID','getOne','2057157FjyQjs'];a56_0x1e19=function(){return _0x40f290;};return a56_0x1e19();}(function(_0x2d59c6,_0x2bee58){const _0x7c3abb=a56_0xee60,_0x5d662b=_0x2d59c6();while(!![]){try{const _0x48b02a=-parseInt(_0x7c3abb(0x139))/0x1+parseInt(_0x7c3abb(0x138))/0x2+parseInt(_0x7c3abb(0x13c))/0x3+-parseInt(_0x7c3abb(0x137))/0x4*(-parseInt(_0x7c3abb(0x136))/0x5)+parseInt(_0x7c3abb(0x135))/0x6*(-parseInt(_0x7c3abb(0x133))/0x7)+parseInt(_0x7c3abb(0x134))/0x8+-parseInt(_0x7c3abb(0x132))/0x9;if(_0x48b02a===_0x2bee58)break;else _0x5d662b['push'](_0x5d662b['shift']());}catch(_0x9cda03){_0x5d662b['push'](_0x5d662b['shift']());}}}(a56_0x1e19,0xb2327));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x484ed7(0x13b),'operation':a56_0x484ed7(0x13b),'description':a56_0x484ed7(0x13a),'paramsRequired':!![],'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'});
1
+ const a56_0xab672=a56_0x5ab6;function a56_0x5ab6(_0x903ab5,_0x8e72bf){_0x903ab5=_0x903ab5-0x81;const _0x205454=a56_0x2054();let _0x5ab68d=_0x205454[_0x903ab5];return _0x5ab68d;}(function(_0x1a9459,_0x46aff9){const _0xe0cff2=a56_0x5ab6,_0x29fa26=_0x1a9459();while(!![]){try{const _0x4c6b46=-parseInt(_0xe0cff2(0x8b))/0x1*(parseInt(_0xe0cff2(0x83))/0x2)+-parseInt(_0xe0cff2(0x8a))/0x3+parseInt(_0xe0cff2(0x85))/0x4*(-parseInt(_0xe0cff2(0x8f))/0x5)+-parseInt(_0xe0cff2(0x89))/0x6*(-parseInt(_0xe0cff2(0x81))/0x7)+parseInt(_0xe0cff2(0x8d))/0x8*(parseInt(_0xe0cff2(0x84))/0x9)+parseInt(_0xe0cff2(0x8c))/0xa*(parseInt(_0xe0cff2(0x86))/0xb)+-parseInt(_0xe0cff2(0x88))/0xc;if(_0x4c6b46===_0x46aff9)break;else _0x29fa26['push'](_0x29fa26['shift']());}catch(_0x5d0664){_0x29fa26['push'](_0x29fa26['shift']());}}}(a56_0x2054,0x69798));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0xab672(0x87),'operation':a56_0xab672(0x87),'description':a56_0xab672(0x8e),'paramsRequired':!![],'paramsHint':a56_0xab672(0x82)});function a56_0x2054(){const _0x5861a2=['2230893yBGHmX','25261OSvHSv','6441370ZhLIpJ','56zVfPBq','Get\x20a\x20single\x20record\x20by\x20ID','380cPZRdA','7zxXoMW','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','38qettUv','999261Miqrxr','7220rKJCAP','11lSzyjg','getOne','1896156CnLGQA','3176802cSatSS'];a56_0x2054=function(){return _0x5861a2;};return a56_0x2054();}
@@ -1 +1 @@
1
- function a57_0x3186(_0x159e56,_0x446c6d){_0x159e56=_0x159e56-0x173;const _0x2ec580=a57_0x2ec5();let _0x31869e=_0x2ec580[_0x159e56];return _0x31869e;}(function(_0x373bfc,_0x4b1d44){const _0x2fd5af=a57_0x3186,_0x23a868=_0x373bfc();while(!![]){try{const _0x133585=-parseInt(_0x2fd5af(0x179))/0x1+-parseInt(_0x2fd5af(0x17a))/0x2+parseInt(_0x2fd5af(0x17c))/0x3*(parseInt(_0x2fd5af(0x177))/0x4)+-parseInt(_0x2fd5af(0x178))/0x5*(-parseInt(_0x2fd5af(0x174))/0x6)+parseInt(_0x2fd5af(0x175))/0x7+parseInt(_0x2fd5af(0x17b))/0x8*(parseInt(_0x2fd5af(0x173))/0x9)+-parseInt(_0x2fd5af(0x176))/0xa;if(_0x133585===_0x4b1d44)break;else _0x23a868['push'](_0x23a868['shift']());}catch(_0x52493a){_0x23a868['push'](_0x23a868['shift']());}}}(a57_0x2ec5,0x4da0b));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];function a57_0x2ec5(){const _0xe2fd33=['2571SaUoYc','9lBFrep','12UropEP','2773470LEnzAO','10486700HUrbEW','2788XdvgRg','828805iBoVLD','45405FaXTwm','496592aZZqOE','2682184PoDVvQ'];a57_0x2ec5=function(){return _0xe2fd33;};return a57_0x2ec5();}
1
+ (function(_0x2b53e5,_0x223b52){const _0x207860=a57_0x57fc,_0x3c2e93=_0x2b53e5();while(!![]){try{const _0x5854b2=parseInt(_0x207860(0xf3))/0x1*(-parseInt(_0x207860(0xf4))/0x2)+-parseInt(_0x207860(0xf0))/0x3*(-parseInt(_0x207860(0xef))/0x4)+parseInt(_0x207860(0xf5))/0x5+parseInt(_0x207860(0xf7))/0x6*(-parseInt(_0x207860(0xf6))/0x7)+-parseInt(_0x207860(0xf2))/0x8+parseInt(_0x207860(0xf1))/0x9+parseInt(_0x207860(0xee))/0xa;if(_0x5854b2===_0x223b52)break;else _0x3c2e93['push'](_0x3c2e93['shift']());}catch(_0x5679a5){_0x3c2e93['push'](_0x3c2e93['shift']());}}}(a57_0x22f1,0x8377c));import{dataFilter}from'../../commands/data/filter.js';function a57_0x57fc(_0x56c01e,_0x89ab7a){_0x56c01e=_0x56c01e-0xee;const _0x22f127=a57_0x22f1();let _0x57fc9c=_0x22f127[_0x56c01e];return _0x57fc9c;}function a57_0x22f1(){const _0x2b76d9=['1IGvgpp','1314862UxjJSf','836545gayajQ','3522554oLludp','6oeQYjY','5135180dbbhyY','2072ubndSp','3993TiPaOw','6093162xnvDtE','2785264mRNTTf'];a57_0x22f1=function(){return _0x2b76d9;};return a57_0x22f1();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- function a58_0x2c0f(_0x119617,_0x48c996){_0x119617=_0x119617-0x1be;const _0xd9f826=a58_0xd9f8();let _0x2c0fd8=_0xd9f826[_0x119617];return _0x2c0fd8;}(function(_0x202b62,_0x514865){const _0x12ba76=a58_0x2c0f,_0x1f2898=_0x202b62();while(!![]){try{const _0x43c28f=-parseInt(_0x12ba76(0x1c4))/0x1*(parseInt(_0x12ba76(0x1dc))/0x2)+parseInt(_0x12ba76(0x1d8))/0x3*(parseInt(_0x12ba76(0x1d7))/0x4)+parseInt(_0x12ba76(0x1c7))/0x5+-parseInt(_0x12ba76(0x1c3))/0x6*(-parseInt(_0x12ba76(0x1d3))/0x7)+-parseInt(_0x12ba76(0x1c6))/0x8*(parseInt(_0x12ba76(0x1d5))/0x9)+parseInt(_0x12ba76(0x1c0))/0xa*(parseInt(_0x12ba76(0x1cc))/0xb)+-parseInt(_0x12ba76(0x1c5))/0xc;if(_0x43c28f===_0x514865)break;else _0x1f2898['push'](_0x1f2898['shift']());}catch(_0x541eb9){_0x1f2898['push'](_0x1f2898['shift']());}}}(a58_0xd9f8,0x71c4b));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(_0x492521){const _0x155e75=a58_0x2c0f;if(!_0x492521)throw CliErrors[_0x155e75(0x1d1)](_0x155e75(0x1cf),_0x155e75(0x1be));const _0x4b99ab=_0x492521['id'];if(_0x4b99ab===undefined||_0x4b99ab===null||_0x4b99ab==='')throw CliErrors['validation']('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x155e75(0x1bf));}function parseCommandParams(_0x40efc1){return parseJsonParams(_0x40efc1)??{};}export function buildDataCommand(_0x4daeb2){const _0x15841a=a58_0x2c0f,_0x522067=_0x15841a(0x1c2);return{'service':_0x15841a(0x1d9),'command':_0x4daeb2[_0x15841a(0x1c9)],'description':_0x4daeb2[_0x15841a(0x1ce)],'risk':_0x15841a(0x1d0),'defaultOutputFormat':_0x15841a(0x1da),'helpExtra':_0x4daeb2['helpExtra'],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x15841a(0x1db),'description':_0x522067},{'name':_0x15841a(0x1cf),'type':'string','description':_0x4daeb2['paramsHint']}],async 'validate'(_0xfef365){const _0x244cfe=_0x15841a,_0x2759c2=_0xfef365[_0x244cfe(0x1d4)](_0x244cfe(0x1cf));if(_0x4daeb2[_0x244cfe(0x1c8)]&&!_0x2759c2)throw CliErrors[_0x244cfe(0x1d1)](_0x244cfe(0x1cf),_0x4daeb2['paramsHint']);const _0x415f38=parseJsonParams(_0x2759c2);_0x4daeb2['operation']===_0x244cfe(0x1cd)&&assertGetOneId(_0x415f38);},async 'execute'(_0xac4222){const _0x4500e4=_0x15841a,_0x5b6b50=parseCommandParams(_0xac4222[_0x4500e4(0x1d4)](_0x4500e4(0x1cf))),_0x49dfda=Date[_0x4500e4(0x1cb)](),_0x3b7f0a=await executeDatasetDataOperation(_0xac4222[_0x4500e4(0x1d6)],_0xac4222[_0x4500e4(0x1d4)]('code'),_0x4daeb2[_0x4500e4(0x1ca)],_0x5b6b50),_0x12abd6=Date[_0x4500e4(0x1cb)]()-_0x49dfda;return{'ok':!![],'data':{'result':_0x3b7f0a,'elapsed':_0x12abd6},'message':_0x4500e4(0x1c1)+_0x4daeb2['command']+_0x4500e4(0x1d2)+_0x12abd6+'ms'};}};}function a58_0xd9f8(){const _0x5ecfda=['params','read','flagMissing','\x20completed\x20in\x20','5894tOCvuo','str','45vfTIQU','appCode','4040qLwneG','45bekJym','data','compress','string','4OEjdbR','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','4748630adLXlH','data\x20','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','5784zqZNWi','171867qLCiEU','1358772JiFMXX','685288WOXRkT','247820mhEGzR','paramsRequired','command','operation','now','11zjSukG','getOne','description'];a58_0xd9f8=function(){return _0x5ecfda;};return a58_0xd9f8();}
1
+ (function(_0x318da9,_0x636eb0){const _0x2dbb09=a58_0x3f9b,_0x529208=_0x318da9();while(!![]){try{const _0x512dfa=parseInt(_0x2dbb09(0x11a))/0x1*(-parseInt(_0x2dbb09(0x120))/0x2)+parseInt(_0x2dbb09(0x126))/0x3+-parseInt(_0x2dbb09(0x12d))/0x4+parseInt(_0x2dbb09(0x127))/0x5+-parseInt(_0x2dbb09(0x124))/0x6*(parseInt(_0x2dbb09(0x125))/0x7)+parseInt(_0x2dbb09(0x133))/0x8+parseInt(_0x2dbb09(0x119))/0x9;if(_0x512dfa===_0x636eb0)break;else _0x529208['push'](_0x529208['shift']());}catch(_0xa7ebd5){_0x529208['push'](_0x529208['shift']());}}}(a58_0x2692,0x2e7d9));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a58_0x2692(){const _0xee8a50=['flagMissing','paramsHint','218414vKZvFY','now','compress','read','54402dsLjJo','105CtAkue','235290fbDhSZ','926185YsSsET','operation','data\x20','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','alias','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','516564uMXzDC','command','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','str','validation','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','708600hhAFdZ','helpExtra','params','1912824MHUEBi','1DKsVVM','data','getOne','code'];a58_0x2692=function(){return _0xee8a50;};return a58_0x2692();}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x279e13){const _0xa1dc29=a58_0x3f9b;if(!_0x279e13)throw CliErrors[_0xa1dc29(0x11e)](_0xa1dc29(0x118),_0xa1dc29(0x132));const _0x201fac=_0x279e13['id'];if(_0x201fac===undefined||_0x201fac===null||_0x201fac==='')throw CliErrors[_0xa1dc29(0x131)](_0xa1dc29(0x12c),_0xa1dc29(0x12f));}function a58_0x3f9b(_0x114ee5,_0xfa0ed2){_0x114ee5=_0x114ee5-0x117;const _0x26928a=a58_0x2692();let _0x3f9b42=_0x26928a[_0x114ee5];return _0x3f9b42;}function parseCommandParams(_0x2bddb4){return parseJsonParams(_0x2bddb4)??{};}export function buildDataCommand(_0x39b981){const _0x57485d=a58_0x3f9b,_0xc835fe=_0x57485d(0x12a);return{'service':_0x57485d(0x11b),'command':_0x39b981[_0x57485d(0x12e)],'description':_0x39b981['description'],'risk':_0x57485d(0x123),'defaultOutputFormat':_0x57485d(0x122),'helpExtra':_0x39b981[_0x57485d(0x117)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x57485d(0x12b),'type':'string','description':_0xc835fe},{'name':_0x57485d(0x118),'type':'string','description':_0x39b981[_0x57485d(0x11f)]}],async 'validate'(_0xe485fc){const _0x4f140b=_0x57485d,_0x509e1c=_0xe485fc['str'](_0x4f140b(0x118));if(_0x39b981['paramsRequired']&&!_0x509e1c)throw CliErrors['flagMissing'](_0x4f140b(0x118),_0x39b981[_0x4f140b(0x11f)]);const _0x16c2fb=parseJsonParams(_0x509e1c);_0x39b981[_0x4f140b(0x128)]===_0x4f140b(0x11c)&&assertGetOneId(_0x16c2fb);},async 'execute'(_0x15d4b0){const _0x158e6c=_0x57485d,_0x3c0cab=parseCommandParams(_0x15d4b0['str'](_0x158e6c(0x118))),_0x9500a9=Date[_0x158e6c(0x121)](),_0x1f9183=await executeDatasetDataOperation(_0x15d4b0['appCode'],_0x15d4b0[_0x158e6c(0x130)](_0x158e6c(0x11d)),_0x39b981[_0x158e6c(0x128)],_0x3c0cab),_0x16e650=Date[_0x158e6c(0x121)]()-_0x9500a9;return{'ok':!![],'data':{'result':_0x1f9183,'elapsed':_0x16e650},'message':_0x158e6c(0x129)+_0x39b981[_0x158e6c(0x12e)]+'\x20completed\x20in\x20'+_0x16e650+'ms'};}};}
@@ -1 +1 @@
1
- const a59_0x1f6f3c=a59_0x57bb;(function(_0x2cdc30,_0x528364){const _0x55c72f=a59_0x57bb,_0x4eca7c=_0x2cdc30();while(!![]){try{const _0x267922=parseInt(_0x55c72f(0x181))/0x1+parseInt(_0x55c72f(0x18a))/0x2+-parseInt(_0x55c72f(0x16a))/0x3+parseInt(_0x55c72f(0x163))/0x4*(-parseInt(_0x55c72f(0x15d))/0x5)+parseInt(_0x55c72f(0x179))/0x6*(parseInt(_0x55c72f(0x170))/0x7)+-parseInt(_0x55c72f(0x173))/0x8*(parseInt(_0x55c72f(0x160))/0x9)+parseInt(_0x55c72f(0x17b))/0xa*(-parseInt(_0x55c72f(0x158))/0xb);if(_0x267922===_0x528364)break;else _0x4eca7c['push'](_0x4eca7c['shift']());}catch(_0x9fa0f2){_0x4eca7c['push'](_0x4eca7c['shift']());}}}(a59_0x49ed,0x2cb2e));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x31a1fb,input:_0x218990,dryRun:_0x51b2eb}){const _0x37ec3b=a59_0x57bb;validateInput(_0x218990);const _0x255ef7=normalizeBusinessGroup(_0x218990[_0x37ec3b(0x18c)]),_0x5d3dab=await getDatasetDetail(_0x218990['code']),_0x5a1d6b=resolveBusinessGroupDataset(_0x5d3dab,_0x218990[_0x37ec3b(0x185)]),_0x1ccef1=loadCurrentBusinessGroup(_0x5d3dab,_0x5a1d6b);assertExpectedBusinessGroup(_0x1ccef1,_0x218990[_0x37ec3b(0x18d)]);const _0x3f74d1=buildBackendPayload(_0x31a1fb,_0x5a1d6b,_0x255ef7),_0x20b523=_0x1ccef1!==_0x255ef7;let _0x505e46;if(_0x20b523&&!_0x51b2eb){await updateErBusinessGroup(_0x3f74d1);const _0x59076f=await getDatasetDetail(_0x5a1d6b[_0x37ec3b(0x185)]),_0xece61a=resolveBusinessGroupDataset(_0x59076f,_0x5a1d6b[_0x37ec3b(0x185)]),_0x5ea0de=loadCurrentBusinessGroup(_0x59076f,_0xece61a);if(_0x5ea0de!==_0x255ef7)throw CliErrors[_0x37ec3b(0x18e)](_0x37ec3b(0x187),_0x37ec3b(0x186)+JSON[_0x37ec3b(0x167)](_0x255ef7)+_0x37ec3b(0x180)+JSON['stringify'](_0x5ea0de)+'.');_0x505e46={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x5ea0de}};}else!_0x20b523&&(_0x505e46={'verified':!![],'status':_0x37ec3b(0x18f),'afterReadback':{'businessGroup':_0x1ccef1}});const _0x542110={'operation':'update','appCode':_0x31a1fb,'selector':{'code':_0x5a1d6b[_0x37ec3b(0x185)]},'dataset':_0x5a1d6b,'before':{'businessGroup':_0x1ccef1},'after':{'businessGroup':_0x255ef7},'changed':_0x20b523,'dryRun':_0x51b2eb,'submitted':_0x20b523&&!_0x51b2eb,'backend':{'method':_0x37ec3b(0x188),'path':BACKEND_PATH,'payload':_0x3f74d1},..._0x505e46?{'verification':_0x505e46}:{},'warnings':[]};return{'ok':!![],'data':_0x542110,'message':_0x20b523?_0x51b2eb?'Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x5a1d6b[_0x37ec3b(0x185)]:_0x37ec3b(0x178)+_0x5a1d6b[_0x37ec3b(0x185)]:_0x37ec3b(0x161)+_0x5a1d6b[_0x37ec3b(0x185)]};}export const datasetBusinessGroupUpdate={'service':a59_0x1f6f3c(0x182),'command':'business-group-update','description':a59_0x1f6f3c(0x16b),'risk':a59_0x1f6f3c(0x16e),'flags':[CODE_FLAG,{'name':a59_0x1f6f3c(0x176),'type':a59_0x1f6f3c(0x183),'required':!![],'description':'New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it'},{'name':a59_0x1f6f3c(0x15f),'type':a59_0x1f6f3c(0x183),'required':![],'description':a59_0x1f6f3c(0x177)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ef57e){validateInput(readBusinessGroupUpdateInput(_0x3ef57e));},async 'dryRun'(_0x4ddcf5){const _0x5702b1=a59_0x1f6f3c,_0x3b7d9f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4ddcf5[_0x5702b1(0x16f)],'input':readBusinessGroupUpdateInput(_0x4ddcf5),'dryRun':!![]});return{'method':_0x5702b1(0x188),'url':BACKEND_PATH,'body':_0x3b7d9f['data']['backend'][_0x5702b1(0x15a)],'description':_0x3b7d9f['message'],..._0x3b7d9f['data']};},async 'execute'(_0xbe10ba){return buildDatasetBusinessGroupUpdateResult({'appCode':_0xbe10ba['appCode'],'input':readBusinessGroupUpdateInput(_0xbe10ba),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x325880){const _0x2bf685=a59_0x1f6f3c,_0xc7ea56=_0x325880['str'](_0x2bf685(0x15f));return{'code':trim(_0x325880[_0x2bf685(0x17f)](_0x2bf685(0x185))),'businessGroup':_0x325880[_0x2bf685(0x17f)]('business-group'),'expectBusinessGroup':_0xc7ea56===undefined||_0xc7ea56===''?undefined:_0xc7ea56};}function validateInput(_0x517427){const _0x3f5cee=a59_0x1f6f3c;if(!trim(_0x517427['code']))throw CliErrors[_0x3f5cee(0x17a)](_0x3f5cee(0x17e));if(_0x517427[_0x3f5cee(0x18c)]===undefined)throw CliErrors[_0x3f5cee(0x17a)](_0x3f5cee(0x15e));}function resolveBusinessGroupDataset(_0x4ea43e,_0x95295){const _0x46f369=a59_0x1f6f3c,_0x11db24=asPlainObject(_0x4ea43e[_0x46f369(0x182)]),_0x1ae082=asPlainObject(_0x4ea43e[_0x46f369(0x16c)]),_0x241831=resolveSourceType(_0x4ea43e,_0x11db24,_0x1ae082),_0x27c363=firstString(_0x4ea43e[_0x46f369(0x191)],_0x4ea43e[_0x46f369(0x185)],_0x11db24[_0x46f369(0x17c)],_0x95295)||_0x95295;return{'id':firstNumber(_0x4ea43e['modelId'],_0x4ea43e['id'],_0x11db24['datasetId'])??firstString(_0x4ea43e[_0x46f369(0x15b)],_0x4ea43e['id'],_0x11db24[_0x46f369(0x165)])??null,'code':_0x27c363,'name':firstString(_0x4ea43e[_0x46f369(0x175)],_0x11db24['datasetName'],_0x11db24[_0x46f369(0x175)])||null,'sourceType':_0x241831};}function resolveSourceType(_0x1b978c,_0x9c6869,_0x1d9f15){const _0x2ac7ef=a59_0x1f6f3c,_0x2e3c57=firstString(_0x1b978c[_0x2ac7ef(0x16d)],_0x1b978c[_0x2ac7ef(0x172)],_0x9c6869['source'],_0x9c6869[_0x2ac7ef(0x172)])?.[_0x2ac7ef(0x166)]()[_0x2ac7ef(0x159)]();if(_0x2e3c57===_0x2ac7ef(0x192)||_0x2e3c57===_0x2ac7ef(0x164))return _0x2e3c57;if(Object['keys'](_0x1d9f15)[_0x2ac7ef(0x18b)]>0x0)return _0x2ac7ef(0x192);throw CliErrors[_0x2ac7ef(0x17a)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x580e0e,_0x36291c){const _0xcce396=a59_0x1f6f3c,_0x49725f=readBusinessGroupFromDatasetDetail(_0x580e0e,_0x36291c[_0xcce396(0x172)]);if(_0x49725f['found'])return normalizeBusinessGroup(_0x49725f[_0xcce396(0x162)]);if(_0x36291c[_0xcce396(0x172)]===_0xcce396(0x164))return'';throw CliErrors[_0xcce396(0x17a)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x11587b,_0x3c2f03){const _0x1e0540=a59_0x1f6f3c,_0x116a1d=asPlainObject(_0x11587b[_0x1e0540(0x182)]),_0x1016c1=firstPresent(_0x11587b['businessGroup']);if(_0x1016c1[_0x1e0540(0x171)])return _0x1016c1;const _0x32dba9=firstPresent(_0x116a1d[_0x1e0540(0x18c)]);if(_0x32dba9[_0x1e0540(0x171)])return _0x32dba9;if(_0x3c2f03===_0x1e0540(0x192))return{'found':![]};const _0x104aa2=readBusinessGroupFromExtend(_0x11587b[_0x1e0540(0x17d)]);if(_0x104aa2[_0x1e0540(0x171)])return _0x104aa2;return readBusinessGroupFromExtend(_0x116a1d[_0x1e0540(0x17d)]);}function readBusinessGroupFromExtend(_0x2b7cb1){const _0x2d5924=a59_0x1f6f3c;if(_0x2b7cb1===undefined||_0x2b7cb1===null||_0x2b7cb1==='')return{'found':![]};if(typeof _0x2b7cb1===_0x2d5924(0x183))try{const _0x300ee8=JSON[_0x2d5924(0x174)](_0x2b7cb1);return readBusinessGroupFromExtend(_0x300ee8);}catch{return{'found':![]};}const _0x15ea31=asPlainObject(_0x2b7cb1);if(Object[_0x2d5924(0x15c)]['hasOwnProperty']['call'](_0x15ea31,_0x2d5924(0x18c)))return{'found':!![],'value':_0x15ea31[_0x2d5924(0x18c)]};return{'found':![]};}function firstPresent(..._0x349a34){for(const _0x28e479 of _0x349a34){if(_0x28e479!==undefined&&_0x28e479!==null)return{'found':!![],'value':_0x28e479};}return{'found':![]};}function assertExpectedBusinessGroup(_0x3a5581,_0x451919){const _0x403a8d=a59_0x1f6f3c;if(_0x451919===undefined)return;const _0x49a908=normalizeBusinessGroup(_0x451919);if(_0x3a5581!==_0x49a908)throw CliErrors[_0x403a8d(0x17a)](_0x403a8d(0x168),_0x403a8d(0x186)+JSON['stringify'](_0x49a908)+_0x403a8d(0x180)+JSON['stringify'](_0x3a5581));}function buildBackendPayload(_0x25cd2d,_0x10b131,_0x5e15a5){return{'appCode':_0x25cd2d,'datasetCode':_0x10b131['code'],'businessGroup':_0x5e15a5};}function normalizeBusinessGroup(_0x114568){const _0x24769e=a59_0x1f6f3c;if(_0x114568===undefined||_0x114568===null)return'';return String(_0x114568)[_0x24769e(0x166)]();}function asPlainObject(_0xf64771){const _0x427705=a59_0x1f6f3c;if(!_0xf64771||typeof _0xf64771!==_0x427705(0x190)||Array[_0x427705(0x169)](_0xf64771))return{};return _0xf64771;}function firstString(..._0x16dd10){const _0x48317e=a59_0x1f6f3c;for(const _0x22a52c of _0x16dd10){if(typeof _0x22a52c==='string'&&_0x22a52c['trim']())return _0x22a52c[_0x48317e(0x166)]();if(typeof _0x22a52c===_0x48317e(0x189)&&Number[_0x48317e(0x184)](_0x22a52c))return String(_0x22a52c);}return undefined;}function a59_0x49ed(){const _0xed9632=['code','Expected\x20','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','POST','number','679682eyQROz','length','businessGroup','expectBusinessGroup','apiError','unchanged','object','modelCode','DB_TABLE','2167plAGPN','toUpperCase','payload','modelId','prototype','235XlHpDQ','--business-group\x20is\x20required','expect-business-group','2289807pfvLmQ','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','value','1964ieeqhj','METADATA','datasetId','trim','stringify','Expectation\x20mismatch\x20at\x20businessGroup','isArray','42000gaNnVg','Update\x20business\x20model\x20group','dbtableConfig','source','write','appCode','7sYGVGz','found','sourceType','8tfCVAj','parse','name','business-group','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','Updated\x20business\x20model\x20group\x20for\x20dataset\x20','1536750hmOAHc','validation','17410uxfNBg','datasetCode','extend','--code\x20is\x20required','str',',\x20actual\x20','221597mLgzft','dataset','string','isFinite'];a59_0x49ed=function(){return _0xed9632;};return a59_0x49ed();}function a59_0x57bb(_0x44ae2c,_0xaf6d41){_0x44ae2c=_0x44ae2c-0x158;const _0x49edb9=a59_0x49ed();let _0x57bb61=_0x49edb9[_0x44ae2c];return _0x57bb61;}function firstNumber(..._0x19fb66){const _0x12127f=a59_0x1f6f3c;for(const _0xf2321 of _0x19fb66){if(typeof _0xf2321==='number'&&Number[_0x12127f(0x184)](_0xf2321))return _0xf2321;if(typeof _0xf2321===_0x12127f(0x183)&&_0xf2321[_0x12127f(0x166)]()&&Number[_0x12127f(0x184)](Number(_0xf2321)))return Number(_0xf2321);}return null;}function trim(_0xbe407b){const _0x1354d8=a59_0x1f6f3c;return String(_0xbe407b||'')[_0x1354d8(0x166)]();}
1
+ const a59_0x3fb515=a59_0x43e4;(function(_0x242ff2,_0xdd6140){const _0x467fe1=a59_0x43e4,_0xe23541=_0x242ff2();while(!![]){try{const _0x145d51=parseInt(_0x467fe1(0x15b))/0x1*(-parseInt(_0x467fe1(0x16a))/0x2)+-parseInt(_0x467fe1(0x14d))/0x3+-parseInt(_0x467fe1(0x179))/0x4*(parseInt(_0x467fe1(0x143))/0x5)+-parseInt(_0x467fe1(0x163))/0x6*(-parseInt(_0x467fe1(0x17c))/0x7)+-parseInt(_0x467fe1(0x145))/0x8*(-parseInt(_0x467fe1(0x184))/0x9)+parseInt(_0x467fe1(0x173))/0xa*(-parseInt(_0x467fe1(0x170))/0xb)+parseInt(_0x467fe1(0x161))/0xc;if(_0x145d51===_0xdd6140)break;else _0xe23541['push'](_0xe23541['shift']());}catch(_0x4675da){_0xe23541['push'](_0xe23541['shift']());}}}(a59_0xbab2,0xb9324));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x3fb515(0x181);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x4d25c3,input:_0x451730,dryRun:_0x5f0c81}){const _0x5c9e35=a59_0x3fb515;validateInput(_0x451730);const _0x1292fa=normalizeBusinessGroup(_0x451730[_0x5c9e35(0x16e)]),_0x56898d=await getDatasetDetail(_0x451730['code']),_0x415b7c=resolveBusinessGroupDataset(_0x56898d,_0x451730[_0x5c9e35(0x159)]),_0x148306=loadCurrentBusinessGroup(_0x56898d,_0x415b7c);assertExpectedBusinessGroup(_0x148306,_0x451730[_0x5c9e35(0x177)]);const _0x54cec4=buildBackendPayload(_0x4d25c3,_0x415b7c,_0x1292fa),_0x5d53e7=_0x148306!==_0x1292fa;let _0x9d7a10;if(_0x5d53e7&&!_0x5f0c81){await updateErBusinessGroup(_0x54cec4);const _0x5f5b2f=await getDatasetDetail(_0x415b7c['code']),_0xb8f801=resolveBusinessGroupDataset(_0x5f5b2f,_0x415b7c['code']),_0x545b5e=loadCurrentBusinessGroup(_0x5f5b2f,_0xb8f801);if(_0x545b5e!==_0x1292fa)throw CliErrors[_0x5c9e35(0x155)](_0x5c9e35(0x158),_0x5c9e35(0x169)+JSON[_0x5c9e35(0x166)](_0x1292fa)+_0x5c9e35(0x171)+JSON[_0x5c9e35(0x166)](_0x545b5e)+'.');_0x9d7a10={'verified':!![],'status':_0x5c9e35(0x17e),'afterReadback':{'businessGroup':_0x545b5e}};}else!_0x5d53e7&&(_0x9d7a10={'verified':!![],'status':_0x5c9e35(0x16b),'afterReadback':{'businessGroup':_0x148306}});const _0x22f113={'operation':_0x5c9e35(0x15d),'appCode':_0x4d25c3,'selector':{'code':_0x415b7c[_0x5c9e35(0x159)]},'dataset':_0x415b7c,'before':{'businessGroup':_0x148306},'after':{'businessGroup':_0x1292fa},'changed':_0x5d53e7,'dryRun':_0x5f0c81,'submitted':_0x5d53e7&&!_0x5f0c81,'backend':{'method':_0x5c9e35(0x151),'path':BACKEND_PATH,'payload':_0x54cec4},..._0x9d7a10?{'verification':_0x9d7a10}:{},'warnings':[]};return{'ok':!![],'data':_0x22f113,'message':_0x5d53e7?_0x5f0c81?_0x5c9e35(0x148)+_0x415b7c[_0x5c9e35(0x159)]:_0x5c9e35(0x16f)+_0x415b7c[_0x5c9e35(0x159)]:_0x5c9e35(0x17d)+_0x415b7c['code']};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a59_0x3fb515(0x165),'description':'Update\x20business\x20model\x20group','risk':a59_0x3fb515(0x146),'flags':[CODE_FLAG,{'name':a59_0x3fb515(0x144),'type':a59_0x3fb515(0x182),'required':!![],'description':a59_0x3fb515(0x14b)},{'name':'expect-business-group','type':'string','required':![],'description':a59_0x3fb515(0x178)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4b014b){validateInput(readBusinessGroupUpdateInput(_0x4b014b));},async 'dryRun'(_0x26b30b){const _0x51b0dc=a59_0x3fb515,_0x48863d=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x26b30b[_0x51b0dc(0x142)],'input':readBusinessGroupUpdateInput(_0x26b30b),'dryRun':!![]});return{'method':_0x51b0dc(0x151),'url':BACKEND_PATH,'body':_0x48863d['data'][_0x51b0dc(0x14c)][_0x51b0dc(0x14a)],'description':_0x48863d[_0x51b0dc(0x17f)],..._0x48863d[_0x51b0dc(0x149)]};},async 'execute'(_0x3768fe){const _0x512e28=a59_0x3fb515;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3768fe[_0x512e28(0x142)],'input':readBusinessGroupUpdateInput(_0x3768fe),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2f172d){const _0x3292e0=a59_0x3fb515,_0x16d4f9=_0x2f172d[_0x3292e0(0x154)](_0x3292e0(0x153));return{'code':trim(_0x2f172d[_0x3292e0(0x154)](_0x3292e0(0x159))),'businessGroup':_0x2f172d[_0x3292e0(0x154)](_0x3292e0(0x144)),'expectBusinessGroup':_0x16d4f9===undefined||_0x16d4f9===''?undefined:_0x16d4f9};}function validateInput(_0x4cace3){const _0x5e3f30=a59_0x3fb515;if(!trim(_0x4cace3[_0x5e3f30(0x159)]))throw CliErrors[_0x5e3f30(0x16c)](_0x5e3f30(0x14f));if(_0x4cace3['businessGroup']===undefined)throw CliErrors[_0x5e3f30(0x16c)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x472404,_0x36e67c){const _0x435352=a59_0x3fb515,_0x151773=asPlainObject(_0x472404[_0x435352(0x15e)]),_0x36f43a=asPlainObject(_0x472404[_0x435352(0x162)]),_0x3096d3=resolveSourceType(_0x472404,_0x151773,_0x36f43a),_0x31ebd3=firstString(_0x472404[_0x435352(0x174)],_0x472404[_0x435352(0x159)],_0x151773['datasetCode'],_0x36e67c)||_0x36e67c;return{'id':firstNumber(_0x472404[_0x435352(0x157)],_0x472404['id'],_0x151773[_0x435352(0x167)])??firstString(_0x472404[_0x435352(0x157)],_0x472404['id'],_0x151773[_0x435352(0x167)])??null,'code':_0x31ebd3,'name':firstString(_0x472404[_0x435352(0x175)],_0x151773['datasetName'],_0x151773['name'])||null,'sourceType':_0x3096d3};}function resolveSourceType(_0x51de81,_0x108764,_0x220a2c){const _0x18d67f=a59_0x3fb515,_0x23d68a=firstString(_0x51de81[_0x18d67f(0x15a)],_0x51de81[_0x18d67f(0x17b)],_0x108764[_0x18d67f(0x15a)],_0x108764[_0x18d67f(0x17b)])?.[_0x18d67f(0x15c)]()['toUpperCase']();if(_0x23d68a===_0x18d67f(0x183)||_0x23d68a===_0x18d67f(0x180))return _0x23d68a;if(Object['keys'](_0x220a2c)[_0x18d67f(0x17a)]>0x0)return'DB_TABLE';throw CliErrors[_0x18d67f(0x16c)](_0x18d67f(0x147));}function loadCurrentBusinessGroup(_0x3a188c,_0x534d0a){const _0x5dc2bd=a59_0x3fb515,_0x2c1b83=readBusinessGroupFromDatasetDetail(_0x3a188c,_0x534d0a[_0x5dc2bd(0x17b)]);if(_0x2c1b83[_0x5dc2bd(0x150)])return normalizeBusinessGroup(_0x2c1b83[_0x5dc2bd(0x172)]);if(_0x534d0a[_0x5dc2bd(0x17b)]===_0x5dc2bd(0x180))return'';throw CliErrors[_0x5dc2bd(0x16c)](_0x5dc2bd(0x160),_0x5dc2bd(0x176));}function readBusinessGroupFromDatasetDetail(_0x1666e4,_0x5a017a){const _0x83963e=a59_0x3fb515,_0x2a834c=asPlainObject(_0x1666e4[_0x83963e(0x15e)]),_0x10fc77=firstPresent(_0x1666e4[_0x83963e(0x16e)]);if(_0x10fc77[_0x83963e(0x150)])return _0x10fc77;const _0x3480b0=firstPresent(_0x2a834c[_0x83963e(0x16e)]);if(_0x3480b0[_0x83963e(0x150)])return _0x3480b0;if(_0x5a017a===_0x83963e(0x183))return{'found':![]};const _0x4e85ff=readBusinessGroupFromExtend(_0x1666e4[_0x83963e(0x141)]);if(_0x4e85ff['found'])return _0x4e85ff;return readBusinessGroupFromExtend(_0x2a834c[_0x83963e(0x141)]);}function readBusinessGroupFromExtend(_0x3345a5){const _0x3a142b=a59_0x3fb515;if(_0x3345a5===undefined||_0x3345a5===null||_0x3345a5==='')return{'found':![]};if(typeof _0x3345a5===_0x3a142b(0x182))try{const _0x2e9cde=JSON['parse'](_0x3345a5);return readBusinessGroupFromExtend(_0x2e9cde);}catch{return{'found':![]};}const _0x432a60=asPlainObject(_0x3345a5);if(Object[_0x3a142b(0x15f)][_0x3a142b(0x164)][_0x3a142b(0x152)](_0x432a60,'businessGroup'))return{'found':!![],'value':_0x432a60[_0x3a142b(0x16e)]};return{'found':![]};}function firstPresent(..._0x14a0cf){for(const _0xf926fc of _0x14a0cf){if(_0xf926fc!==undefined&&_0xf926fc!==null)return{'found':!![],'value':_0xf926fc};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1d59c0,_0x582f93){const _0x24a495=a59_0x3fb515;if(_0x582f93===undefined)return;const _0xcf171e=normalizeBusinessGroup(_0x582f93);if(_0x1d59c0!==_0xcf171e)throw CliErrors[_0x24a495(0x16c)](_0x24a495(0x14e),_0x24a495(0x169)+JSON[_0x24a495(0x166)](_0xcf171e)+_0x24a495(0x171)+JSON[_0x24a495(0x166)](_0x1d59c0));}function a59_0x43e4(_0x1427af,_0x181429){_0x1427af=_0x1427af-0x141;const _0xbab240=a59_0xbab2();let _0x43e43f=_0xbab240[_0x1427af];return _0x43e43f;}function buildBackendPayload(_0x5aa0c0,_0x5ee23f,_0x44962f){const _0x188484=a59_0x3fb515;return{'appCode':_0x5aa0c0,'datasetCode':_0x5ee23f[_0x188484(0x159)],'businessGroup':_0x44962f};}function normalizeBusinessGroup(_0x1be3b0){if(_0x1be3b0===undefined||_0x1be3b0===null)return'';return String(_0x1be3b0)['trim']();}function asPlainObject(_0x4899a0){const _0x5e8b64=a59_0x3fb515;if(!_0x4899a0||typeof _0x4899a0!==_0x5e8b64(0x168)||Array['isArray'](_0x4899a0))return{};return _0x4899a0;}function firstString(..._0x519b45){const _0xab92a3=a59_0x3fb515;for(const _0x3c5162 of _0x519b45){if(typeof _0x3c5162===_0xab92a3(0x182)&&_0x3c5162[_0xab92a3(0x15c)]())return _0x3c5162[_0xab92a3(0x15c)]();if(typeof _0x3c5162===_0xab92a3(0x156)&&Number['isFinite'](_0x3c5162))return String(_0x3c5162);}return undefined;}function firstNumber(..._0x2e6760){const _0x20ceb7=a59_0x3fb515;for(const _0x39259b of _0x2e6760){if(typeof _0x39259b===_0x20ceb7(0x156)&&Number[_0x20ceb7(0x16d)](_0x39259b))return _0x39259b;if(typeof _0x39259b===_0x20ceb7(0x182)&&_0x39259b['trim']()&&Number['isFinite'](Number(_0x39259b)))return Number(_0x39259b);}return null;}function trim(_0x160c16){return String(_0x160c16||'')['trim']();}function a59_0xbab2(){const _0x170a18=['appCode','95YDmMbL','business-group','56EOfmIO','write','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','data','payload','New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it','backend','3571287zuOiSj','Expectation\x20mismatch\x20at\x20businessGroup','--code\x20is\x20required','found','POST','call','expect-business-group','str','apiError','number','modelId','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','code','source','302361DSfvJC','trim','update','dataset','prototype','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','39806664dSPfWp','dbtableConfig','4878dcukMj','hasOwnProperty','business-group-update','stringify','datasetId','object','Expected\x20','8AHhaCx','unchanged','validation','isFinite','businessGroup','Updated\x20business\x20model\x20group\x20for\x20dataset\x20','64009hgqQcf',',\x20actual\x20','value','1160eifmwf','modelCode','name','Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','expectBusinessGroup','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','270932zqsDxD','length','sourceType','4571ADJsZF','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','matched','message','METADATA','/smartapi/question/er-config/business-group/edit','string','DB_TABLE','1635759RxWiLP','extend'];a59_0xbab2=function(){return _0x170a18;};return a59_0xbab2();}
@@ -1 +1 @@
1
- const a60_0x263fb8=a60_0x248d;(function(_0x1a6387,_0x409add){const _0x43c320=a60_0x248d,_0x2cfb3c=_0x1a6387();while(!![]){try{const _0x40ccab=-parseInt(_0x43c320(0x1d9))/0x1*(-parseInt(_0x43c320(0x1c1))/0x2)+-parseInt(_0x43c320(0x1dc))/0x3*(-parseInt(_0x43c320(0x1dd))/0x4)+-parseInt(_0x43c320(0x1ce))/0x5+parseInt(_0x43c320(0x1cf))/0x6+-parseInt(_0x43c320(0x1de))/0x7+-parseInt(_0x43c320(0x1d4))/0x8*(-parseInt(_0x43c320(0x1e1))/0x9)+parseInt(_0x43c320(0x1c7))/0xa;if(_0x40ccab===_0x409add)break;else _0x2cfb3c['push'](_0x2cfb3c['shift']());}catch(_0x1a5ebc){_0x2cfb3c['push'](_0x2cfb3c['shift']());}}}(a60_0x32c5,0x5427d));function a60_0x248d(_0x3a1d17,_0x5535f5){_0x3a1d17=_0x3a1d17-0x1c0;const _0x32c5ee=a60_0x32c5();let _0x248d62=_0x32c5ee[_0x3a1d17];return _0x248d62;}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x263fb8(0x1e6),'filter':a60_0x263fb8(0x1d0),'getOne':a60_0x263fb8(0x1c0)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x263fb8(0x1c9);function valueToString(_0x418e74){const _0x5bf027=a60_0x263fb8;return _0x418e74==null?'':String(_0x418e74)[_0x5bf027(0x1da)]();}function getDatasetCode(_0x1da51b){const _0x2fb2e0=a60_0x263fb8;return valueToString(_0x1da51b[_0x2fb2e0(0x1e2)]??_0x1da51b[_0x2fb2e0(0x1d3)]??_0x1da51b[_0x2fb2e0(0x1d7)]?.[_0x2fb2e0(0x1c6)]);}function getDatasetName(_0x839f2e){const _0x4c3a7a=a60_0x263fb8;return valueToString(_0x839f2e[_0x4c3a7a(0x1c4)]??_0x839f2e[_0x4c3a7a(0x1d7)]?.[_0x4c3a7a(0x1e3)])||'unknown';}function a60_0x32c5(){const _0x2c7b8f=['tableName','dbtable','当前数据集\x20\x22','1650225EBExEY','441702wDVPLk','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','dbtableConfig','getOne','modelCode','1322800vBHlXD','join','source','dataset','dbId','5305naLSLI','trim','length','456gQDXEn','4496gDbGyb','4164405OEWzeY','\x20的\x20DB_TABLE\x20数据源上下文。','filter','18vLPpSW','code','datasetName','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','UNKNOWN','lovrabet','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','184icmPKg','METADATA','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','name','sourceType','datasetCode','2064360qUrPJL','validation','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','\x20是\x20'];a60_0x32c5=function(){return _0x2c7b8f;};return a60_0x32c5();}function getDatasetSource(_0x27410e){const _0x36af52=a60_0x263fb8;return valueToString(_0x27410e[_0x36af52(0x1d6)]??_0x27410e['dataset']?.[_0x36af52(0x1c5)])['toUpperCase']();}function getDbtableConfig(_0x4b964b){const _0x5b19eb=a60_0x263fb8,_0x130573=_0x4b964b[_0x5b19eb(0x1d1)]??_0x4b964b[_0x5b19eb(0x1cc)];return _0x130573&&typeof _0x130573==='object'?_0x130573:{};}export function isDbTableBackedDataset(_0x499bd2){const _0x571b47=a60_0x263fb8,_0x306f07=getDatasetSource(_0x499bd2);if(_0x306f07===_0x571b47(0x1c2))return![];const _0x1edeec=getDbtableConfig(_0x499bd2),_0x56be10=_0x1edeec[_0x571b47(0x1d8)]??_0x1edeec['id'],_0xa2a979=valueToString(_0x1edeec[_0x571b47(0x1cb)]??_0x499bd2['tableName']??_0x499bd2[_0x571b47(0x1d7)]?.['tableName']);return _0x56be10!==undefined&&_0x56be10!==null&&_0xa2a979[_0x571b47(0x1db)]>0x0;}export function filterDbTableBackedDatasets(_0xd3ee4b){return _0xd3ee4b['filter'](_0xe2ed80=>isDbTableBackedDataset(_0xe2ed80));}export function buildDbTableBackedRequirementMessage(_0x76566d,_0x308944='SQL\x20schema\x20validation'){const _0x3519a7=a60_0x263fb8,_0x4e2889=getDatasetSource(_0x76566d)||_0x3519a7(0x1e5),_0x3902f3=getDatasetName(_0x76566d),_0x463547=getDatasetCode(_0x76566d),_0x5235b7=_0x463547?'\x20('+_0x463547+')':'';return[_0x3519a7(0x1cd)+_0x3902f3+'\x22'+_0x5235b7+_0x3519a7(0x1ca)+_0x4e2889+'\x20类型,没有可用于\x20'+_0x308944+_0x3519a7(0x1df),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0x3519a7(0x1c3),_0x3519a7(0x1e4)+RUNTIME_DATA_ACCESS_COMMANDS[_0x3519a7(0x1e0)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x3519a7(0x1d2)]+'。'][_0x3519a7(0x1d5)]('\x20');}export function assertDatasetIsDbTableBacked(_0x2a6aa4,_0x439f27){const _0x37962c=a60_0x263fb8;if(!isDbTableBackedDataset(_0x2a6aa4))throw CliErrors[_0x37962c(0x1c8)](buildDbTableBackedRequirementMessage(_0x2a6aa4,_0x439f27));}
1
+ function a60_0x435e(){const _0x49a9a2=['lovrabet','trim','229504gZQtqN','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','8zcSMgk','METADATA','384202QUpNQL','source','dbtable','modelCode','当前数据集\x20\x22','code','toUpperCase','\x20的\x20DB_TABLE\x20数据源上下文。','\x20是\x20','3196QTsuQv','SQL\x20schema\x20validation','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','sourceType','length','5558BFZkEs','UNKNOWN','822tFBrKP','3869091nTmqNx','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','71080SdBLnX','validation','unknown','dbtableConfig','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','dataset','object','1465ZvUlzk','tableName','\x20类型,没有可用于\x20','790791NLIHHJ','getOne','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','name','filter'];a60_0x435e=function(){return _0x49a9a2;};return a60_0x435e();}const a60_0x29e4f7=a60_0x3844;(function(_0x482799,_0x26959f){const _0x21220d=a60_0x3844,_0x48cdc2=_0x482799();while(!![]){try{const _0x49446c=parseInt(_0x21220d(0x152))/0x1+-parseInt(_0x21220d(0x14e))/0x2+parseInt(_0x21220d(0x147))/0x3+-parseInt(_0x21220d(0x15b))/0x4*(-parseInt(_0x21220d(0x144))/0x5)+-parseInt(_0x21220d(0x13a))/0x6*(parseInt(_0x21220d(0x138))/0x7)+-parseInt(_0x21220d(0x150))/0x8*(parseInt(_0x21220d(0x13b))/0x9)+-parseInt(_0x21220d(0x13d))/0xa;if(_0x49446c===_0x26959f)break;else _0x48cdc2['push'](_0x48cdc2['shift']());}catch(_0x1634d9){_0x48cdc2['push'](_0x48cdc2['shift']());}}}(a60_0x435e,0x360b9));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x29e4f7(0x14c),'filter':a60_0x29e4f7(0x13c),'getOne':a60_0x29e4f7(0x149)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x29e4f7(0x141);function valueToString(_0x1abe31){const _0x3c0795=a60_0x29e4f7;return _0x1abe31==null?'':String(_0x1abe31)[_0x3c0795(0x14d)]();}function getDatasetCode(_0x40cf49){const _0x25761e=a60_0x29e4f7;return valueToString(_0x40cf49[_0x25761e(0x157)]??_0x40cf49[_0x25761e(0x155)]??_0x40cf49[_0x25761e(0x142)]?.['datasetCode']);}function getDatasetName(_0x29e3c6){const _0x1cfe62=a60_0x29e4f7;return valueToString(_0x29e3c6[_0x1cfe62(0x14a)]??_0x29e3c6[_0x1cfe62(0x142)]?.['datasetName'])||_0x1cfe62(0x13f);}function getDatasetSource(_0x1e6d25){const _0x533407=a60_0x29e4f7;return valueToString(_0x1e6d25[_0x533407(0x153)]??_0x1e6d25[_0x533407(0x142)]?.[_0x533407(0x15e)])[_0x533407(0x158)]();}function getDbtableConfig(_0x81105c){const _0x1760ef=a60_0x29e4f7,_0x4e8984=_0x81105c[_0x1760ef(0x140)]??_0x81105c[_0x1760ef(0x154)];return _0x4e8984&&typeof _0x4e8984===_0x1760ef(0x143)?_0x4e8984:{};}export function isDbTableBackedDataset(_0x1c81e1){const _0x4601c7=a60_0x29e4f7,_0x43d45d=getDatasetSource(_0x1c81e1);if(_0x43d45d===_0x4601c7(0x151))return![];const _0x505a44=getDbtableConfig(_0x1c81e1),_0x5545eb=_0x505a44['dbId']??_0x505a44['id'],_0x32c83f=valueToString(_0x505a44['tableName']??_0x1c81e1['tableName']??_0x1c81e1['dataset']?.[_0x4601c7(0x145)]);return _0x5545eb!==undefined&&_0x5545eb!==null&&_0x32c83f[_0x4601c7(0x137)]>0x0;}export function filterDbTableBackedDatasets(_0xf9b03){const _0x4b303b=a60_0x29e4f7;return _0xf9b03[_0x4b303b(0x14b)](_0x2caa38=>isDbTableBackedDataset(_0x2caa38));}export function buildDbTableBackedRequirementMessage(_0x276c7b,_0x1b039d=a60_0x29e4f7(0x15c)){const _0x170e88=a60_0x29e4f7,_0x5e3a80=getDatasetSource(_0x276c7b)||_0x170e88(0x139),_0x210aaf=getDatasetName(_0x276c7b),_0x406bbf=getDatasetCode(_0x276c7b),_0x16060f=_0x406bbf?'\x20('+_0x406bbf+')':'';return[_0x170e88(0x156)+_0x210aaf+'\x22'+_0x16060f+_0x170e88(0x15a)+_0x5e3a80+_0x170e88(0x146)+_0x1b039d+_0x170e88(0x159),_0x170e88(0x14f),_0x170e88(0x15d),'如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:'+RUNTIME_DATA_ACCESS_COMMANDS[_0x170e88(0x14b)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x170e88(0x148)]+'。']['join']('\x20');}function a60_0x3844(_0x467adb,_0x49cd66){_0x467adb=_0x467adb-0x137;const _0x435e88=a60_0x435e();let _0x3844f1=_0x435e88[_0x467adb];return _0x3844f1;}export function assertDatasetIsDbTableBacked(_0x548051,_0x1bc2ec){const _0x57edf5=a60_0x29e4f7;if(!isDbTableBackedDataset(_0x548051))throw CliErrors[_0x57edf5(0x13e)](buildDbTableBackedRequirementMessage(_0x548051,_0x1bc2ec));}
@@ -1 +1 @@
1
- const a61_0x3144f9=a61_0x98e3;(function(_0x446cb1,_0x36860d){const _0xec698e=a61_0x98e3,_0x29bffc=_0x446cb1();while(!![]){try{const _0x4f8b4e=-parseInt(_0xec698e(0x109))/0x1+parseInt(_0xec698e(0x128))/0x2*(-parseInt(_0xec698e(0x115))/0x3)+parseInt(_0xec698e(0x101))/0x4+parseInt(_0xec698e(0x118))/0x5+-parseInt(_0xec698e(0x12b))/0x6*(parseInt(_0xec698e(0x129))/0x7)+-parseInt(_0xec698e(0x133))/0x8*(parseInt(_0xec698e(0x121))/0x9)+parseInt(_0xec698e(0x10c))/0xa*(parseInt(_0xec698e(0x125))/0xb);if(_0x4f8b4e===_0x36860d)break;else _0x29bffc['push'](_0x29bffc['shift']());}catch(_0x2fe403){_0x29bffc['push'](_0x29bffc['shift']());}}}(a61_0x28f9,0xd8554));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a61_0x28f9(){const _0x53258e=['isArray','64359qVuFos','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','/smartapi/dataset/delete-dataset','dbid=','1866623wVkwiw','Matched\x20','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','26DboTkn','49nRRZiu','filter','193434vyqLSn','confirm','delete','code','\x20dataset(s);\x20','dbName','source','Would\x20delete\x20','672XBtkOh','appCode','\x20failed','3583600dxKUId','POST','expected-count','Required\x20to\x20execute\x20dataset\x20deletion','name','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','tableName','boolean','1552856Gzqryj','high-risk-write','dataset','170OyCDEm','str','dbtableConfig','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Deleted\x20','num','push','relationPages','bool','138399pgtRil','dbid','message','421805EABoCF','length','number','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','map','dbId','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','validation'];a61_0x28f9=function(){return _0x53258e;};return a61_0x28f9();}const DATASET_ID_FLAG={'name':'id','type':a61_0x3144f9(0x11a),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x3144f9(0x116),'type':a61_0x3144f9(0x11a),'description':a61_0x3144f9(0x11b)},CONFIRM_FLAG={'name':'confirm','type':a61_0x3144f9(0x108),'description':a61_0x3144f9(0x104)},EXPECTED_COUNT_FLAG={'name':a61_0x3144f9(0x103),'type':a61_0x3144f9(0x11a),'description':a61_0x3144f9(0x106)};export const datasetDelete={'service':a61_0x3144f9(0x10b),'command':a61_0x3144f9(0x12d),'description':a61_0x3144f9(0x127),'risk':a61_0x3144f9(0x10a),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x529a5a){const _0x16d4b2=a61_0x3144f9,_0x34b780=_0x529a5a[_0x16d4b2(0x111)]('id'),_0x84d5ee=_0x529a5a['str'](_0x16d4b2(0x12e)),_0x4a7192=_0x529a5a[_0x16d4b2(0x111)]('dbid'),_0x115f90=[_0x34b780>0x0,Boolean(_0x84d5ee),_0x4a7192>0x0]['filter'](Boolean);if(_0x115f90['length']===0x0)throw CliErrors[_0x16d4b2(0x11f)](_0x16d4b2(0x11e));if(_0x115f90[_0x16d4b2(0x119)]>0x1)throw CliErrors['validation'](_0x16d4b2(0x10f));},async 'dryRun'(_0x586c21){const _0x48fe53=a61_0x3144f9,_0xcb560e=await resolveTargets(_0x586c21);return{'method':_0x48fe53(0x102),'url':_0x48fe53(0x123),'body':{'appCode':_0x586c21[_0x48fe53(0x134)],'count':_0xcb560e['length'],'datasets':_0xcb560e},'description':_0x48fe53(0x132)+_0xcb560e[_0x48fe53(0x119)]+_0x48fe53(0x122)};},async 'execute'(_0x205ecf){const _0xbf6570=a61_0x3144f9;if(!_0x205ecf[_0xbf6570(0x114)](_0xbf6570(0x12c)))throw CliErrors[_0xbf6570(0x11f)]('--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x3682db=await resolveTargets(_0x205ecf),_0x34641b=[],_0x57f283=[];for(const _0x349fe7 of _0x3682db){try{await deleteDataset(_0x205ecf[_0xbf6570(0x134)],_0x349fe7['id']),_0x34641b[_0xbf6570(0x112)](_0x349fe7);}catch(_0x7c0b17){_0x57f283[_0xbf6570(0x112)]({..._0x349fe7,'error':_0x7c0b17 instanceof Error?_0x7c0b17[_0xbf6570(0x117)]:String(_0x7c0b17)});}}if(_0x57f283[_0xbf6570(0x119)]>0x0)return{'ok':![],'data':{'requested':_0x3682db['length'],'deletedCount':_0x34641b[_0xbf6570(0x119)],'failedCount':_0x57f283[_0xbf6570(0x119)],'deleted':_0x34641b,'failed':_0x57f283},'message':'Deleted\x20'+_0x34641b[_0xbf6570(0x119)]+'/'+_0x3682db[_0xbf6570(0x119)]+_0xbf6570(0x12f)+_0x57f283['length']+_0xbf6570(0x135)};return{'ok':!![],'data':{'requested':_0x3682db[_0xbf6570(0x119)],'deletedCount':_0x34641b[_0xbf6570(0x119)],'deleted':_0x34641b},'message':_0xbf6570(0x110)+_0x34641b[_0xbf6570(0x119)]+'\x20dataset(s)'};}};function a61_0x98e3(_0x3b3833,_0x3cf387){_0x3b3833=_0x3b3833-0x101;const _0x28f9d2=a61_0x28f9();let _0x98e36a=_0x28f9d2[_0x3b3833];return _0x98e36a;}async function resolveTargets(_0x461bdd){const _0x118c92=a61_0x3144f9,_0x209725=_0x461bdd[_0x118c92(0x111)]('id'),_0x2daf47=_0x461bdd[_0x118c92(0x10d)](_0x118c92(0x12e)),_0x3c3709=_0x461bdd[_0x118c92(0x111)](_0x118c92(0x116));let _0x170d6d;_0x2daf47?(_0x170d6d=await listDatasets(_0x461bdd['appCode'],{'code':_0x2daf47}),_0x170d6d=_0x170d6d[_0x118c92(0x12a)](_0x3d78f5=>_0x3d78f5[_0x118c92(0x12e)]===_0x2daf47)):(_0x170d6d=await listDatasets(_0x461bdd[_0x118c92(0x134)]),_0x209725>0x0&&(_0x170d6d=_0x170d6d[_0x118c92(0x12a)](_0x3b303f=>_0x3b303f['id']===_0x209725)),_0x3c3709>0x0&&(_0x170d6d=_0x170d6d[_0x118c92(0x12a)](_0x1a280a=>_0x1a280a[_0x118c92(0x10e)]?.[_0x118c92(0x11d)]===_0x3c3709)));const _0x97cf62=_0x170d6d[_0x118c92(0x11c)](normalizeTarget);if(_0x97cf62['length']===0x0){const _0x5d1c1e=_0x2daf47||(_0x209725>0x0?'id='+_0x209725:_0x118c92(0x124)+_0x3c3709);throw CliErrors['validation']('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x5d1c1e+'.');}const _0x1d346f=_0x461bdd['num']('expected-count');if(_0x1d346f>0x0&&_0x97cf62[_0x118c92(0x119)]!==_0x1d346f)throw CliErrors['validation'](_0x118c92(0x126)+_0x97cf62['length']+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x1d346f+'.');return _0x97cf62;}function normalizeTarget(_0x328d37){const _0x12901e=a61_0x3144f9,_0x1e0350=_0x328d37['dbtableConfig']??{};return{'id':_0x328d37['id'],'code':_0x328d37[_0x12901e(0x12e)],'name':_0x328d37[_0x12901e(0x105)],'description':_0x328d37['description'],'source':_0x328d37[_0x12901e(0x131)],'dbId':_0x1e0350['dbId'],'dbName':_0x1e0350[_0x12901e(0x130)],'tableName':_0x1e0350[_0x12901e(0x107)],'relatedPageCount':Array[_0x12901e(0x120)](_0x328d37['relationPages'])?_0x328d37[_0x12901e(0x113)]['length']:undefined};}
1
+ const a61_0x4c6523=a61_0x2a38;(function(_0x807d3d,_0x5d68f7){const _0x113a15=a61_0x2a38,_0x5a8662=_0x807d3d();while(!![]){try{const _0x4f0203=-parseInt(_0x113a15(0x161))/0x1+parseInt(_0x113a15(0x173))/0x2*(-parseInt(_0x113a15(0x17e))/0x3)+-parseInt(_0x113a15(0x193))/0x4*(-parseInt(_0x113a15(0x187))/0x5)+-parseInt(_0x113a15(0x171))/0x6+-parseInt(_0x113a15(0x191))/0x7*(-parseInt(_0x113a15(0x18a))/0x8)+parseInt(_0x113a15(0x16a))/0x9+parseInt(_0x113a15(0x17c))/0xa*(parseInt(_0x113a15(0x168))/0xb);if(_0x4f0203===_0x5d68f7)break;else _0x5a8662['push'](_0x5a8662['shift']());}catch(_0x276413){_0x5a8662['push'](_0x5a8662['shift']());}}}(a61_0x3d07,0xe2d16));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x2a38(_0x237795,_0x4ea224){_0x237795=_0x237795-0x161;const _0x3d07cd=a61_0x3d07();let _0x2a38a4=_0x3d07cd[_0x237795];return _0x2a38a4;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':'number','description':a61_0x4c6523(0x190)},DBID_FLAG={'name':a61_0x4c6523(0x18e),'type':'number','description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':a61_0x4c6523(0x183),'type':a61_0x4c6523(0x18b),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a61_0x4c6523(0x18d),'type':'number','description':a61_0x4c6523(0x189)};export const datasetDelete={'service':a61_0x4c6523(0x175),'command':a61_0x4c6523(0x179),'description':a61_0x4c6523(0x172),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x118044){const _0x519584=a61_0x4c6523,_0x4ec2f9=_0x118044['num']('id'),_0x52e8ab=_0x118044[_0x519584(0x176)](_0x519584(0x17b)),_0x5240f3=_0x118044[_0x519584(0x17a)](_0x519584(0x18e)),_0x2ab9e=[_0x4ec2f9>0x0,Boolean(_0x52e8ab),_0x5240f3>0x0][_0x519584(0x16f)](Boolean);if(_0x2ab9e['length']===0x0)throw CliErrors['validation']('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x2ab9e['length']>0x1)throw CliErrors[_0x519584(0x185)](_0x519584(0x18f));},async 'dryRun'(_0x1a1b99){const _0x49ed19=a61_0x4c6523,_0x2d5e40=await resolveTargets(_0x1a1b99);return{'method':_0x49ed19(0x16d),'url':'/smartapi/dataset/delete-dataset','body':{'appCode':_0x1a1b99[_0x49ed19(0x16b)],'count':_0x2d5e40[_0x49ed19(0x167)],'datasets':_0x2d5e40},'description':_0x49ed19(0x165)+_0x2d5e40[_0x49ed19(0x167)]+_0x49ed19(0x166)};},async 'execute'(_0x1d7d01){const _0x59a7a6=a61_0x4c6523;if(!_0x1d7d01['bool']('confirm'))throw CliErrors[_0x59a7a6(0x185)](_0x59a7a6(0x177),_0x59a7a6(0x186));const _0x5228c3=await resolveTargets(_0x1d7d01),_0x3c7163=[],_0x3511fb=[];for(const _0x5c38ae of _0x5228c3){try{await deleteDataset(_0x1d7d01[_0x59a7a6(0x16b)],_0x5c38ae['id']),_0x3c7163[_0x59a7a6(0x164)](_0x5c38ae);}catch(_0x482e69){_0x3511fb[_0x59a7a6(0x164)]({..._0x5c38ae,'error':_0x482e69 instanceof Error?_0x482e69[_0x59a7a6(0x178)]:String(_0x482e69)});}}if(_0x3511fb[_0x59a7a6(0x167)]>0x0)return{'ok':![],'data':{'requested':_0x5228c3['length'],'deletedCount':_0x3c7163[_0x59a7a6(0x167)],'failedCount':_0x3511fb[_0x59a7a6(0x167)],'deleted':_0x3c7163,'failed':_0x3511fb},'message':'Deleted\x20'+_0x3c7163[_0x59a7a6(0x167)]+'/'+_0x5228c3[_0x59a7a6(0x167)]+_0x59a7a6(0x188)+_0x3511fb[_0x59a7a6(0x167)]+_0x59a7a6(0x192)};return{'ok':!![],'data':{'requested':_0x5228c3[_0x59a7a6(0x167)],'deletedCount':_0x3c7163[_0x59a7a6(0x167)],'deleted':_0x3c7163},'message':_0x59a7a6(0x163)+_0x3c7163[_0x59a7a6(0x167)]+_0x59a7a6(0x16c)};}};async function resolveTargets(_0x2c3f20){const _0x5e999d=a61_0x4c6523,_0x32907b=_0x2c3f20[_0x5e999d(0x17a)]('id'),_0x1c8bcc=_0x2c3f20[_0x5e999d(0x176)](_0x5e999d(0x17b)),_0x5e48ad=_0x2c3f20['num'](_0x5e999d(0x18e));let _0x22b827;_0x1c8bcc?(_0x22b827=await listDatasets(_0x2c3f20[_0x5e999d(0x16b)],{'code':_0x1c8bcc}),_0x22b827=_0x22b827[_0x5e999d(0x16f)](_0x1db15e=>_0x1db15e['code']===_0x1c8bcc)):(_0x22b827=await listDatasets(_0x2c3f20[_0x5e999d(0x16b)]),_0x32907b>0x0&&(_0x22b827=_0x22b827[_0x5e999d(0x16f)](_0x5b3502=>_0x5b3502['id']===_0x32907b)),_0x5e48ad>0x0&&(_0x22b827=_0x22b827[_0x5e999d(0x16f)](_0xcc5a64=>_0xcc5a64[_0x5e999d(0x16e)]?.[_0x5e999d(0x162)]===_0x5e48ad)));const _0x947b24=_0x22b827[_0x5e999d(0x169)](normalizeTarget);if(_0x947b24[_0x5e999d(0x167)]===0x0){const _0x1daccc=_0x1c8bcc||(_0x32907b>0x0?_0x5e999d(0x182)+_0x32907b:_0x5e999d(0x184)+_0x5e48ad);throw CliErrors[_0x5e999d(0x185)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x1daccc+'.');}const _0x33656c=_0x2c3f20[_0x5e999d(0x17a)](_0x5e999d(0x18d));if(_0x33656c>0x0&&_0x947b24[_0x5e999d(0x167)]!==_0x33656c)throw CliErrors[_0x5e999d(0x185)](_0x5e999d(0x17f)+_0x947b24[_0x5e999d(0x167)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x33656c+'.');return _0x947b24;}function normalizeTarget(_0x2e49e3){const _0x5b905d=a61_0x4c6523,_0x31401e=_0x2e49e3['dbtableConfig']??{};return{'id':_0x2e49e3['id'],'code':_0x2e49e3[_0x5b905d(0x17b)],'name':_0x2e49e3[_0x5b905d(0x170)],'description':_0x2e49e3[_0x5b905d(0x18c)],'source':_0x2e49e3[_0x5b905d(0x174)],'dbId':_0x31401e[_0x5b905d(0x162)],'dbName':_0x31401e[_0x5b905d(0x17d)],'tableName':_0x31401e[_0x5b905d(0x180)],'relatedPageCount':Array['isArray'](_0x2e49e3[_0x5b905d(0x181)])?_0x2e49e3[_0x5b905d(0x181)][_0x5b905d(0x167)]:undefined};}function a61_0x3d07(){const _0x140fae=['dbName','166407FjUfTf','Matched\x20','tableName','relationPages','id=','confirm','dbid=','validation','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','5HdyqVG','\x20dataset(s);\x20','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','1090800TTrAdw','boolean','description','expected-count','dbid','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Dataset\x20id','7BEyaif','\x20failed','3094516NKbHpf','1245635TUoyjg','dbId','Deleted\x20','push','Would\x20delete\x20','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','length','380633aUuXsL','map','8286822PPozAW','appCode','\x20dataset(s)','POST','dbtableConfig','filter','name','9254148qZoxLH','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','58NBsvtC','source','dataset','str','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','message','delete','num','code','1010ORgRLN'];a61_0x3d07=function(){return _0x140fae;};return a61_0x3d07();}
@@ -1 +1 @@
1
- const a62_0x1532f4=a62_0x1a22;function a62_0x1a22(_0x54f8cc,_0x2a8d9f){_0x54f8cc=_0x54f8cc-0xc2;const _0x253bf5=a62_0x253b();let _0x1a2296=_0x253bf5[_0x54f8cc];return _0x1a2296;}(function(_0x578830,_0x53ceaa){const _0x470184=a62_0x1a22,_0x44099d=_0x578830();while(!![]){try{const _0x122abd=-parseInt(_0x470184(0xf7))/0x1+-parseInt(_0x470184(0x112))/0x2*(parseInt(_0x470184(0x103))/0x3)+-parseInt(_0x470184(0xfb))/0x4*(-parseInt(_0x470184(0x107))/0x5)+parseInt(_0x470184(0xf2))/0x6*(parseInt(_0x470184(0x117))/0x7)+parseInt(_0x470184(0xfc))/0x8+parseInt(_0x470184(0x118))/0x9*(-parseInt(_0x470184(0x10d))/0xa)+parseInt(_0x470184(0x109))/0xb;if(_0x122abd===_0x53ceaa)break;else _0x44099d['push'](_0x44099d['shift']());}catch(_0x956d9d){_0x44099d['push'](_0x44099d['shift']());}}}(a62_0x253b,0xa7d32));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x3c0e2){const _0x2979de=a62_0x1a22;if(_0x3c0e2['deleted'])return null;const _0x1622f9=Boolean(_0x3c0e2[_0x2979de(0xcc)]!==undefined||_0x3c0e2[_0x2979de(0xd0)]!==undefined);let _0x214127={};if(!_0x1622f9&&typeof _0x3c0e2['extend']==='string')try{_0x214127=JSON['parse'](_0x3c0e2['extend']);}catch{}const _0x394bb5=_0x1622f9?_0x3c0e2[_0x2979de(0xfe)]:_0x3c0e2['code'],_0x57a04e=_0x1622f9?_0x3c0e2[_0x2979de(0xcc)]:_0x3c0e2['name'],_0x417ebb=_0x1622f9?_0x3c0e2[_0x2979de(0xd0)]:_0x3c0e2['type']||_0x3c0e2[_0x2979de(0xda)],_0x2f7210=_0x1622f9?_0x3c0e2[_0x2979de(0xe2)]===!![]:_0x214127[_0x2979de(0xe2)]===!![],_0x5503d9=_0x1622f9?_0x3c0e2[_0x2979de(0xde)]===!![]:_0x214127[_0x2979de(0xde)]===!![],_0x35065a=_0x1622f9?_0x3c0e2['options']??null:_0x214127[_0x2979de(0x119)]??null,_0x42cfe1={'name':_0x394bb5,'displayName':_0x57a04e||_0x394bb5,'type':_0x417ebb,'dbType':_0x3c0e2[_0x2979de(0xd8)],'pk':_0x2f7210,'required':_0x5503d9,'deprecated':_0x3c0e2[_0x2979de(0xd3)]===!![],'description':_0x3c0e2[_0x2979de(0xc4)]||undefined};return Array[_0x2979de(0x113)](_0x35065a)&&_0x35065a[_0x2979de(0x105)]>0x0&&(_0x42cfe1[_0x2979de(0x119)]=_0x35065a),_0x42cfe1;}function parseJsonMaybe(_0x1eb938){const _0x33e6b3=a62_0x1a22;if(typeof _0x1eb938!=='string')return _0x1eb938;try{return JSON[_0x33e6b3(0xe1)](_0x1eb938);}catch{return _0x1eb938;}}function normalizeOperationEntry(_0x17c863,_0x445280){const _0x541169=a62_0x1a22;if(!_0x445280||typeof _0x445280!==_0x541169(0xe3))return null;if(!_0x445280[_0x541169(0xcf)]||!_0x445280['path'])return null;const _0x267cff={'name':_0x17c863,'method':_0x445280['method'],'path':_0x445280[_0x541169(0xd2)]};if(_0x445280[_0x541169(0xca)])_0x267cff['host']=_0x445280[_0x541169(0xca)];if(_0x445280[_0x541169(0xe4)]!=null){const _0x184389=parseJsonMaybe(_0x445280[_0x541169(0xe4)]);_0x267cff[_0x541169(0xe4)]=_0x184389;}if(_0x445280[_0x541169(0xe9)]!=null){const _0x4adc36=parseJsonMaybe(_0x445280[_0x541169(0xe9)]);_0x267cff[_0x541169(0xe9)]=_0x4adc36;}if(_0x445280[_0x541169(0xf8)]!=null)_0x267cff['beforeScriptId']=_0x445280[_0x541169(0xf8)];if(_0x445280[_0x541169(0xd5)]!=null)_0x267cff[_0x541169(0xd5)]=_0x445280[_0x541169(0xd5)];if(Array[_0x541169(0x113)](_0x445280['requestFields']))_0x267cff[_0x541169(0x115)]=_0x445280['requestFields'];if(Array[_0x541169(0x113)](_0x445280[_0x541169(0x10a)]))_0x267cff[_0x541169(0x10a)]=_0x445280[_0x541169(0x10a)];return _0x267cff;}function summarizeDbtable(_0x495c63){const _0x14ab3f=a62_0x1a22,_0x2c6cf2={},_0xc22375=[_0x14ab3f(0xf9),_0x14ab3f(0xfa),_0x14ab3f(0x11a),_0x14ab3f(0xf4),'pkField','allFields',_0x14ab3f(0x114),_0x14ab3f(0xc2),_0x14ab3f(0xe6),_0x14ab3f(0xf3),_0x14ab3f(0xf6),_0x14ab3f(0x100),_0x14ab3f(0xdf),_0x14ab3f(0xeb),'dblinkInfoDTO'];for(const _0x393bc7 of _0xc22375){if(_0x495c63[_0x393bc7]!==undefined)_0x2c6cf2[_0x393bc7]=_0x495c63[_0x393bc7];}return typeof _0x2c6cf2[_0x14ab3f(0xc8)]===_0x14ab3f(0xe5)&&_0x2c6cf2[_0x14ab3f(0xc8)][_0x14ab3f(0x105)]>0x0&&(_0x2c6cf2[_0x14ab3f(0xc5)]=_0x2c6cf2[_0x14ab3f(0xc8)][_0x14ab3f(0x116)](',')[_0x14ab3f(0xd7)](_0x528c35=>_0x528c35[_0x14ab3f(0xce)]())['filter'](Boolean)),_0x2c6cf2;}function normalizeRelatedPages(_0x51c207){const _0x491c29=a62_0x1a22;if(!Array['isArray'](_0x51c207))return[];return _0x51c207[_0x491c29(0x10e)](_0xe5ec1a=>_0xe5ec1a&&typeof _0xe5ec1a===_0x491c29(0xe3))[_0x491c29(0xd7)](_0x52e813=>({'id':_0x52e813['id'],'type':_0x52e813[_0x491c29(0xea)],'code':_0x52e813['code'],'title':_0x52e813['title'],'deleted':_0x52e813['deleted']===!![]}));}function a62_0x253b(){const _0x8d0b04=['validateRules','properties','relationId','fromField','code','extend','42ynZKsM','creatorIdField','datasetKey','modelId','creatorNameField','837037fZgAJu','beforeScriptId','dbId','dbName','28BENnEd','6990536FbuQGO','formatRules','name','columnCodeListWithDeleted','modifierIdField','toTableName','toDatasetCode','111102hNAUfF','sourceType','length','indexes','210835VJFSdH','main_sub','2033460WaPndY','responseFields','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','relations','50PiDViv','filter','entries','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','read','4IsCqUs','isArray','logicField','requestFields','split','418789nuOSlP','313416XucYYM','options','tableName','createTimeField','operations','description','allFieldNames','cardinality','str','allFields','fields','host','modelCode','displayName','dbtableConfig','trim','method','doType','alias','path','deprecated','push','afterScriptId','toField','map','dbType','bizRelationType','dataType','doVersion','relatedPageInfoList','source','required','modifierNameField','dataset','parse','pkField','object','requestBody','string','updateTimeField','detail','toDatasetName','responseBody','type','labelField'];a62_0x253b=function(){return _0x8d0b04;};return a62_0x253b();}export const datasetDetail={'service':'dataset','command':a62_0x1532f4(0xe7),'description':a62_0x1532f4(0x110),'risk':a62_0x1532f4(0x111),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x1532f4(0xd1),'type':'string','description':a62_0x1532f4(0x10b)}],async 'execute'(_0x15cb11){const _0x485ff5=a62_0x1532f4,_0x24c412=await getDatasetDetail(_0x15cb11[_0x485ff5(0xc7)](_0x485ff5(0xf0))),_0x2c38db=Array[_0x485ff5(0x113)](_0x24c412['fields'])?_0x24c412[_0x485ff5(0xc9)]:Array[_0x485ff5(0x113)](_0x24c412[_0x485ff5(0xed)])?_0x24c412[_0x485ff5(0xed)]:[],_0x4ce827=_0x2c38db[_0x485ff5(0xd7)](_0x7111b3=>normalizeField(_0x7111b3))[_0x485ff5(0x10e)](_0xf738da=>_0xf738da!==null),_0x15d0a1=_0x24c412[_0x485ff5(0xc3)]??{},_0x3a6082=[];for(const [_0x1cbe7e,_0x2b30ac]of Object[_0x485ff5(0x10f)](_0x15d0a1)){const _0x555eea=normalizeOperationEntry(_0x1cbe7e,_0x2b30ac);if(_0x555eea)_0x3a6082[_0x485ff5(0xd4)](_0x555eea);}const _0x5c9c13=_0x24c412[_0x485ff5(0xcd)]??{},_0x317ba1=_0x24c412[_0x485ff5(0xe0)]??{},_0x3949a3=_0x5c9c13[_0x485ff5(0xf9)]!=null?{'id':_0x5c9c13[_0x485ff5(0xf9)],'name':_0x5c9c13[_0x485ff5(0xfa)]??null}:undefined;let _0x47007a;return typeof _0x24c412[_0x485ff5(0xf1)]==='string'&&(_0x47007a=parseJsonMaybe(_0x24c412[_0x485ff5(0xf1)])),{'ok':!![],'data':{'id':_0x24c412[_0x485ff5(0xf5)]??_0x24c412['id'],'name':_0x24c412['name'],'code':_0x24c412['modelCode']||_0x24c412['code'],'doVersion':_0x24c412[_0x485ff5(0xdb)],'description':_0x24c412[_0x485ff5(0xc4)]||_0x317ba1['tableComment']||undefined,'source':_0x24c412[_0x485ff5(0xdd)]||_0x317ba1[_0x485ff5(0x104)],'table':_0x5c9c13[_0x485ff5(0x11a)]||_0x317ba1[_0x485ff5(0x11a)],'datasetKey':_0x5c9c13[_0x485ff5(0xf4)],'pk':_0x5c9c13[_0x485ff5(0xe2)],'db':_0x3949a3,'dbtable':summarizeDbtable(_0x5c9c13),'fields':_0x4ce827,'operations':_0x3a6082,'indexes':Array[_0x485ff5(0x113)](_0x317ba1[_0x485ff5(0x106)])?_0x317ba1[_0x485ff5(0x106)]:[],'relations':Array[_0x485ff5(0x113)](_0x24c412[_0x485ff5(0x10c)])?_0x24c412['relations'][_0x485ff5(0xd7)](_0x5d6e00=>({..._0x5d6e00[_0x485ff5(0xee)]!=null?{'relationId':_0x5d6e00[_0x485ff5(0xee)]}:{},'fromDataset':_0x24c412[_0x485ff5(0xfe)],'fromCode':_0x24c412[_0x485ff5(0xcb)]||_0x24c412[_0x485ff5(0xf0)],'fromTable':_0x5c9c13[_0x485ff5(0x11a)]||_0x317ba1[_0x485ff5(0x11a)],'fromField':_0x5d6e00[_0x485ff5(0xef)],'toDataset':_0x5d6e00[_0x485ff5(0xe8)],'toCode':_0x5d6e00[_0x485ff5(0x102)],'toTable':_0x5d6e00[_0x485ff5(0x101)],'toField':_0x5d6e00[_0x485ff5(0xd6)],'labelField':_0x5d6e00['toFieldLabel']||undefined,'cardinality':_0x5d6e00[_0x485ff5(0xc6)]||undefined,'bizRelationType':_0x5d6e00[_0x485ff5(0xd9)]===_0x485ff5(0x108)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x24c412[_0x485ff5(0xdc)]),...Array[_0x485ff5(0x113)](_0x24c412[_0x485ff5(0xff)])?{'columnCodeListWithDeleted':_0x24c412['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x485ff5(0x113)](_0x24c412[_0x485ff5(0xfd)])?_0x24c412[_0x485ff5(0xfd)]:[],'validateRules':Array[_0x485ff5(0x113)](_0x24c412[_0x485ff5(0xec)])?_0x24c412['validateRules']:[],..._0x47007a!==undefined?{'extend':_0x47007a}:{},'stats':{'fieldCount':_0x4ce827[_0x485ff5(0x105)],'operationCount':_0x3a6082['length']}}};}};
1
+ const a62_0x35054b=a62_0x19d6;function a62_0x19d6(_0x233d3c,_0xfad048){_0x233d3c=_0x233d3c-0xdc;const _0x3986a9=a62_0x3986();let _0x19d6cc=_0x3986a9[_0x233d3c];return _0x19d6cc;}(function(_0x520a3b,_0x26028a){const _0x4b414c=a62_0x19d6,_0x14c9f8=_0x520a3b();while(!![]){try{const _0x746cda=-parseInt(_0x4b414c(0xf3))/0x1+-parseInt(_0x4b414c(0x12d))/0x2*(parseInt(_0x4b414c(0x105))/0x3)+parseInt(_0x4b414c(0x106))/0x4*(-parseInt(_0x4b414c(0x125))/0x5)+parseInt(_0x4b414c(0x10c))/0x6*(-parseInt(_0x4b414c(0x11a))/0x7)+-parseInt(_0x4b414c(0x122))/0x8*(parseInt(_0x4b414c(0xe0))/0x9)+-parseInt(_0x4b414c(0x115))/0xa+parseInt(_0x4b414c(0xe3))/0xb*(parseInt(_0x4b414c(0xfe))/0xc);if(_0x746cda===_0x26028a)break;else _0x14c9f8['push'](_0x14c9f8['shift']());}catch(_0x2df573){_0x14c9f8['push'](_0x14c9f8['shift']());}}}(a62_0x3986,0x23c0b));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x568f58){const _0x5d198a=a62_0x19d6;if(_0x568f58[_0x5d198a(0xf9)])return null;const _0x2f36f3=Boolean(_0x568f58[_0x5d198a(0x117)]!==undefined||_0x568f58[_0x5d198a(0xef)]!==undefined);let _0x1198e2={};if(!_0x2f36f3&&typeof _0x568f58[_0x5d198a(0xf6)]===_0x5d198a(0xe7))try{_0x1198e2=JSON[_0x5d198a(0xfa)](_0x568f58[_0x5d198a(0xf6)]);}catch{}const _0x1d443a=_0x2f36f3?_0x568f58[_0x5d198a(0x118)]:_0x568f58[_0x5d198a(0x119)],_0x20d07e=_0x2f36f3?_0x568f58['displayName']:_0x568f58[_0x5d198a(0x118)],_0x19361f=_0x2f36f3?_0x568f58[_0x5d198a(0xef)]:_0x568f58[_0x5d198a(0xee)]||_0x568f58[_0x5d198a(0x102)],_0x13f94f=_0x2f36f3?_0x568f58[_0x5d198a(0x126)]===!![]:_0x1198e2['pkField']===!![],_0x439a92=_0x2f36f3?_0x568f58[_0x5d198a(0x10d)]===!![]:_0x1198e2[_0x5d198a(0x10d)]===!![],_0x338d60=_0x2f36f3?_0x568f58[_0x5d198a(0x127)]??null:_0x1198e2[_0x5d198a(0x127)]??null,_0x28aec3={'name':_0x1d443a,'displayName':_0x20d07e||_0x1d443a,'type':_0x19361f,'dbType':_0x568f58['dbType'],'pk':_0x13f94f,'required':_0x439a92,'deprecated':_0x568f58[_0x5d198a(0xf0)]===!![],'description':_0x568f58['description']||undefined};return Array[_0x5d198a(0x107)](_0x338d60)&&_0x338d60[_0x5d198a(0x112)]>0x0&&(_0x28aec3[_0x5d198a(0x127)]=_0x338d60),_0x28aec3;}function parseJsonMaybe(_0x41c010){const _0x4b9058=a62_0x19d6;if(typeof _0x41c010!=='string')return _0x41c010;try{return JSON[_0x4b9058(0xfa)](_0x41c010);}catch{return _0x41c010;}}function normalizeOperationEntry(_0x1994a0,_0x3d74f4){const _0x5c8fac=a62_0x19d6;if(!_0x3d74f4||typeof _0x3d74f4!==_0x5c8fac(0x10b))return null;if(!_0x3d74f4['method']||!_0x3d74f4[_0x5c8fac(0x11e)])return null;const _0x59754d={'name':_0x1994a0,'method':_0x3d74f4['method'],'path':_0x3d74f4[_0x5c8fac(0x11e)]};if(_0x3d74f4[_0x5c8fac(0xe2)])_0x59754d[_0x5c8fac(0xe2)]=_0x3d74f4['host'];if(_0x3d74f4['requestBody']!=null){const _0x389c34=parseJsonMaybe(_0x3d74f4[_0x5c8fac(0xe5)]);_0x59754d[_0x5c8fac(0xe5)]=_0x389c34;}if(_0x3d74f4['responseBody']!=null){const _0xa40810=parseJsonMaybe(_0x3d74f4[_0x5c8fac(0x120)]);_0x59754d[_0x5c8fac(0x120)]=_0xa40810;}if(_0x3d74f4[_0x5c8fac(0x12c)]!=null)_0x59754d['beforeScriptId']=_0x3d74f4[_0x5c8fac(0x12c)];if(_0x3d74f4[_0x5c8fac(0x109)]!=null)_0x59754d[_0x5c8fac(0x109)]=_0x3d74f4[_0x5c8fac(0x109)];if(Array['isArray'](_0x3d74f4[_0x5c8fac(0x128)]))_0x59754d[_0x5c8fac(0x128)]=_0x3d74f4[_0x5c8fac(0x128)];if(Array[_0x5c8fac(0x107)](_0x3d74f4[_0x5c8fac(0xf5)]))_0x59754d[_0x5c8fac(0xf5)]=_0x3d74f4['responseFields'];return _0x59754d;}function summarizeDbtable(_0x2113ce){const _0x3397e1=a62_0x19d6,_0x4198f4={},_0x2f3f48=['dbId',_0x3397e1(0xdf),_0x3397e1(0x101),_0x3397e1(0x11c),'pkField',_0x3397e1(0xfd),'logicField',_0x3397e1(0xe4),_0x3397e1(0x121),_0x3397e1(0x10a),_0x3397e1(0x114),_0x3397e1(0x11b),_0x3397e1(0x116),'labelField',_0x3397e1(0xf7)];for(const _0x369d55 of _0x2f3f48){if(_0x2113ce[_0x369d55]!==undefined)_0x4198f4[_0x369d55]=_0x2113ce[_0x369d55];}return typeof _0x4198f4[_0x3397e1(0xfd)]==='string'&&_0x4198f4[_0x3397e1(0xfd)]['length']>0x0&&(_0x4198f4[_0x3397e1(0x104)]=_0x4198f4[_0x3397e1(0xfd)][_0x3397e1(0x129)](',')[_0x3397e1(0x11d)](_0x1e2fcf=>_0x1e2fcf[_0x3397e1(0x123)]())[_0x3397e1(0xe6)](Boolean)),_0x4198f4;}function normalizeRelatedPages(_0xa78fe3){const _0x22c69f=a62_0x19d6;if(!Array[_0x22c69f(0x107)](_0xa78fe3))return[];return _0xa78fe3[_0x22c69f(0xe6)](_0x122aca=>_0x122aca&&typeof _0x122aca===_0x22c69f(0x10b))[_0x22c69f(0x11d)](_0x3d7af2=>({'id':_0x3d7af2['id'],'type':_0x3d7af2[_0x22c69f(0xee)],'code':_0x3d7af2[_0x22c69f(0x119)],'title':_0x3d7af2[_0x22c69f(0xe1)],'deleted':_0x3d7af2[_0x22c69f(0xf9)]===!![]}));}function a62_0x3986(){const _0x1190d2=['modifierIdField','datasetKey','map','path','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','responseBody','updateTimeField','41336YDltLN','trim','push','45DEgSQl','pkField','options','requestFields','split','validateRules','modelId','beforeScriptId','2aGvnXE','fromField','cardinality','fields','columnCodeListWithDeleted','read','dbName','36EEQfMX','title','host','138512CBronq','createTimeField','requestBody','filter','string','alias','toTableName','tableComment','toField','indexes','main_sub','type','doType','deprecated','entries','doVersion','266939NBTfcu','detail','responseFields','extend','dblinkInfoDTO','properties','deleted','parse','bizRelationType','toDatasetName','allFields','948qbEXTA','relations','description','tableName','dataType','dataset','allFieldNames','305130AZfGcS','24052zchiVe','isArray','formatRules','afterScriptId','creatorIdField','object','2910YaxGSy','required','operations','relationId','sourceType','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','length','modelCode','creatorNameField','1560860GuAMBG','modifierNameField','displayName','name','code','3591Yopohy'];a62_0x3986=function(){return _0x1190d2;};return a62_0x3986();}export const datasetDetail={'service':a62_0x35054b(0x103),'command':a62_0x35054b(0xf4),'description':a62_0x35054b(0x11f),'risk':a62_0x35054b(0xde),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x35054b(0xe8),'type':'string','description':a62_0x35054b(0x111)}],async 'execute'(_0x110fb6){const _0x559fda=a62_0x35054b,_0xe78302=await getDatasetDetail(_0x110fb6['str']('code')),_0x348c88=Array[_0x559fda(0x107)](_0xe78302[_0x559fda(0xdc)])?_0xe78302[_0x559fda(0xdc)]:Array[_0x559fda(0x107)](_0xe78302[_0x559fda(0xf8)])?_0xe78302[_0x559fda(0xf8)]:[],_0x209574=_0x348c88[_0x559fda(0x11d)](_0x20462f=>normalizeField(_0x20462f))[_0x559fda(0xe6)](_0x1a4b29=>_0x1a4b29!==null),_0x3f94af=_0xe78302[_0x559fda(0x10e)]??{},_0x4c7e57=[];for(const [_0x349c4c,_0x12aecd]of Object[_0x559fda(0xf1)](_0x3f94af)){const _0x430d44=normalizeOperationEntry(_0x349c4c,_0x12aecd);if(_0x430d44)_0x4c7e57[_0x559fda(0x124)](_0x430d44);}const _0x4ffd0e=_0xe78302['dbtableConfig']??{},_0x2e97bf=_0xe78302[_0x559fda(0x103)]??{},_0x315863=_0x4ffd0e['dbId']!=null?{'id':_0x4ffd0e['dbId'],'name':_0x4ffd0e[_0x559fda(0xdf)]??null}:undefined;let _0x102d24;return typeof _0xe78302[_0x559fda(0xf6)]===_0x559fda(0xe7)&&(_0x102d24=parseJsonMaybe(_0xe78302[_0x559fda(0xf6)])),{'ok':!![],'data':{'id':_0xe78302[_0x559fda(0x12b)]??_0xe78302['id'],'name':_0xe78302['name'],'code':_0xe78302['modelCode']||_0xe78302[_0x559fda(0x119)],'doVersion':_0xe78302[_0x559fda(0xf2)],'description':_0xe78302[_0x559fda(0x100)]||_0x2e97bf[_0x559fda(0xea)]||undefined,'source':_0xe78302['source']||_0x2e97bf[_0x559fda(0x110)],'table':_0x4ffd0e['tableName']||_0x2e97bf[_0x559fda(0x101)],'datasetKey':_0x4ffd0e[_0x559fda(0x11c)],'pk':_0x4ffd0e[_0x559fda(0x126)],'db':_0x315863,'dbtable':summarizeDbtable(_0x4ffd0e),'fields':_0x209574,'operations':_0x4c7e57,'indexes':Array[_0x559fda(0x107)](_0x2e97bf['indexes'])?_0x2e97bf[_0x559fda(0xec)]:[],'relations':Array[_0x559fda(0x107)](_0xe78302[_0x559fda(0xff)])?_0xe78302['relations'][_0x559fda(0x11d)](_0x160cbf=>({..._0x160cbf[_0x559fda(0x10f)]!=null?{'relationId':_0x160cbf[_0x559fda(0x10f)]}:{},'fromDataset':_0xe78302[_0x559fda(0x118)],'fromCode':_0xe78302[_0x559fda(0x113)]||_0xe78302['code'],'fromTable':_0x4ffd0e[_0x559fda(0x101)]||_0x2e97bf[_0x559fda(0x101)],'fromField':_0x160cbf[_0x559fda(0x12e)],'toDataset':_0x160cbf[_0x559fda(0xfc)],'toCode':_0x160cbf['toDatasetCode'],'toTable':_0x160cbf[_0x559fda(0xe9)],'toField':_0x160cbf[_0x559fda(0xeb)],'labelField':_0x160cbf['toFieldLabel']||undefined,'cardinality':_0x160cbf[_0x559fda(0x12f)]||undefined,'bizRelationType':_0x160cbf[_0x559fda(0xfb)]===_0x559fda(0xed)?_0x559fda(0xed):null})):[],'relatedPages':normalizeRelatedPages(_0xe78302['relatedPageInfoList']),...Array[_0x559fda(0x107)](_0xe78302[_0x559fda(0xdd)])?{'columnCodeListWithDeleted':_0xe78302['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x559fda(0x107)](_0xe78302[_0x559fda(0x108)])?_0xe78302[_0x559fda(0x108)]:[],'validateRules':Array[_0x559fda(0x107)](_0xe78302[_0x559fda(0x12a)])?_0xe78302[_0x559fda(0x12a)]:[],..._0x102d24!==undefined?{'extend':_0x102d24}:{},'stats':{'fieldCount':_0x209574[_0x559fda(0x112)],'operationCount':_0x4c7e57['length']}}};}};
@@ -1 +1 @@
1
- const a63_0x86eada=a63_0x2f2c;(function(_0x144d8b,_0x1d7318){const _0x234ad9=a63_0x2f2c,_0x377f3f=_0x144d8b();while(!![]){try{const _0x1c3637=-parseInt(_0x234ad9(0x232))/0x1*(parseInt(_0x234ad9(0x21e))/0x2)+-parseInt(_0x234ad9(0x213))/0x3+parseInt(_0x234ad9(0x204))/0x4*(parseInt(_0x234ad9(0x216))/0x5)+-parseInt(_0x234ad9(0x234))/0x6+parseInt(_0x234ad9(0x221))/0x7+-parseInt(_0x234ad9(0x202))/0x8+parseInt(_0x234ad9(0x1fd))/0x9*(parseInt(_0x234ad9(0x1f9))/0xa);if(_0x1c3637===_0x1d7318)break;else _0x377f3f['push'](_0x377f3f['shift']());}catch(_0x152dd4){_0x377f3f['push'](_0x377f3f['shift']());}}}(a63_0x2610,0xb8e95));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([[a63_0x86eada(0x207),{'message':a63_0x86eada(0x224),'hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);export function parseJsonObjectFlag(_0x5df9a7,_0x36c8ac){const _0x5946cc=a63_0x86eada;if(!_0x5df9a7)return undefined;let _0x138462;try{_0x138462=JSON['parse'](_0x5df9a7);}catch(_0x36b36b){const _0x27eea9=_0x36b36b instanceof Error?_0x36b36b['message']:String(_0x36b36b);throw CliErrors[_0x5946cc(0x233)](_0x36c8ac+_0x5946cc(0x21b)+_0x27eea9);}if(!isPlainObject(_0x138462)||Array['isArray'](_0x138462))throw CliErrors[_0x5946cc(0x233)](_0x36c8ac+_0x5946cc(0x20c));return _0x138462;}function a63_0x2610(){const _0x4fb519=['join','isArray','104938lWiPKx','datasetName','string','9792237KhBMyc','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','expect-json','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','Expected\x20','datasetCode','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','modelId','length','No\x20changes\x20for\x20dataset\x20extend','/smartapi/dataset/update-driven-data','from','code','has','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','write','value','22xNNIRo','validation','3354546eyQHQC','trim','str','expect','patch-json','sort','push','keys','3886360PZxTay','message','parse','POST','36ivglah','hint','patch','entries','dataset','3211392WLkALd','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','1283364dPNbCi','stringify','datasetId','businessGroup','--expect-json','extend','appCode','Expectation\x20mismatch\x20at\x20extend.','\x20must\x20be\x20a\x20JSON\x20object','--patch-json','shape','modelCode','Allowed\x20keys:\x20','tableName','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','4093707pInQSY','dbName','Patch\x20dataset\x20top-level\x20extend\x20safely','20MFmjnR','object',',\x20actual\x20','extend.','Updated\x20dataset\x20extend\x20(','\x20must\x20be\x20valid\x20JSON\x20object:\x20'];a63_0x2610=function(){return _0x4fb519;};return a63_0x2610();}export function validateExtendPatchKeys(_0x216d47){const _0x287d55=a63_0x86eada,_0x257460=Object[_0x287d55(0x1f8)](_0x216d47);if(_0x257460[_0x287d55(0x229)]===0x0)throw CliErrors[_0x287d55(0x233)](_0x287d55(0x203));for(const _0x129f90 of _0x257460){const _0xff0f99=EXTEND_PATCH_REDIRECTS['get'](_0x129f90);if(_0xff0f99)throw CliErrors[_0x287d55(0x233)](_0xff0f99['message'],_0xff0f99[_0x287d55(0x1fe)]);if(!MUTABLE_EXTEND_KEYS[_0x287d55(0x22e)](_0x129f90))throw CliErrors[_0x287d55(0x233)]('Unsupported\x20patch\x20key:\x20'+_0x129f90,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x30531d=a63_0x86eada,_0x32d107=Array[_0x30531d(0x22c)](MUTABLE_EXTEND_KEYS)[_0x30531d(0x1f6)]();return _0x32d107[_0x30531d(0x229)]>0x0?_0x30531d(0x210)+_0x32d107[_0x30531d(0x21c)](',\x20'):_0x30531d(0x227);}export function applyExtendPatch(_0x3d37e6,_0x415cc7){const _0xe5ed1c=a63_0x86eada;validateExtendPatchKeys(_0x415cc7);const _0x2b02ab=deepClone(_0x3d37e6),_0x121007=[];for(const [_0x1d917d,_0x674e79]of Object[_0xe5ed1c(0x200)](_0x415cc7)){const _0x4e4429=_0x2b02ab[_0x1d917d],_0x1d843f=deepClone(_0x674e79);!deepEqual(_0x4e4429,_0x1d843f)&&(_0x2b02ab[_0x1d917d]=_0x1d843f,_0x121007[_0xe5ed1c(0x1f7)](_0xe5ed1c(0x219)+_0x1d917d));}return _0x121007[_0xe5ed1c(0x1f6)](),{'after':_0x2b02ab,'changedPaths':_0x121007,'changed':_0x121007['length']>0x0};}export function assertExpectation(_0x582be4,_0x5b2d2d){const _0x56186f=a63_0x86eada;if(!_0x5b2d2d)return;for(const [_0x264e50,_0x35a82d]of Object[_0x56186f(0x200)](_0x5b2d2d)){const _0x42518c=_0x582be4[_0x264e50];if(!deepEqual(_0x42518c,_0x35a82d))throw CliErrors[_0x56186f(0x233)](_0x56186f(0x20b)+_0x264e50,_0x56186f(0x225)+JSON['stringify'](_0x35a82d)+_0x56186f(0x218)+JSON['stringify'](_0x42518c));}}export async function buildDatasetExtendUpdateResult({appCode:_0x5525c0,input:_0x3a280a,dryRun:_0x5f0fcc}){const _0x3618fc=a63_0x86eada;validateInput(_0x3a280a);const _0x1022e8=await getDatasetDetail(_0x3a280a[_0x3618fc(0x22d)]),_0x22373c=parseDatasetExtend(_0x1022e8[_0x3618fc(0x209)]),_0x3d0940=deepClone(_0x22373c[_0x3618fc(0x231)]);assertExpectation(_0x3d0940,_0x3a280a[_0x3618fc(0x1f4)]);const {after:_0x150ac9,changedPaths:_0x352e9f,changed:_0x271a9d}=applyExtendPatch(_0x3d0940,_0x3a280a['patch']),_0x2b34a4=summarizeDataset(_0x1022e8,_0x3a280a[_0x3618fc(0x22d)]);return _0x271a9d&&!_0x5f0fcc&&(_0x1022e8[_0x3618fc(0x209)]=serializeDatasetExtend(_0x150ac9,_0x22373c[_0x3618fc(0x20e)]),await updateDrivenData(_0x1022e8)),{'ok':!![],'data':{'appCode':_0x5525c0,'selector':{'code':_0x3a280a['code']},'dataset':_0x2b34a4,'dryRun':_0x5f0fcc,'changed':_0x271a9d,'changedPaths':_0x352e9f,'before':{'extend':_0x3d0940},'after':{'extend':_0x150ac9},'submitted':_0x271a9d&&!_0x5f0fcc},'message':_0x271a9d?_0x5f0fcc?_0x3618fc(0x22f)+_0x352e9f[_0x3618fc(0x21c)](',\x20')+')':_0x3618fc(0x21a)+_0x352e9f[_0x3618fc(0x21c)](',\x20')+')':_0x3618fc(0x22a)};}export const datasetExtendUpdate={'service':'dataset','command':'extend-update','description':a63_0x86eada(0x215),'risk':a63_0x86eada(0x230),'flags':[CODE_FLAG,{'name':a63_0x86eada(0x1f5),'type':'string','required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a63_0x86eada(0x223),'type':a63_0x86eada(0x220),'required':![],'description':a63_0x86eada(0x212)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x375b01){validateInput(readExtendUpdateInput(_0x375b01));},async 'dryRun'(_0x5f0d43){const _0x4dd7de=a63_0x86eada,_0x331848=await buildDatasetExtendUpdateResult({'appCode':_0x5f0d43[_0x4dd7de(0x20a)],'input':readExtendUpdateInput(_0x5f0d43),'dryRun':!![]});return{'method':_0x4dd7de(0x1fc),'url':_0x4dd7de(0x22b),'body':_0x331848['data'],'description':_0x331848[_0x4dd7de(0x1fa)]};},async 'execute'(_0x4aa866){const _0x3fa3a5=a63_0x86eada;return buildDatasetExtendUpdateResult({'appCode':_0x4aa866[_0x3fa3a5(0x20a)],'input':readExtendUpdateInput(_0x4aa866),'dryRun':![]});}};function readExtendUpdateInput(_0x90e21d){const _0x2d3998=a63_0x86eada,_0x36025e=trim(_0x90e21d['str'](_0x2d3998(0x22d))),_0xde0b1c=parseJsonObjectFlag(_0x90e21d[_0x2d3998(0x236)](_0x2d3998(0x1f5)),_0x2d3998(0x20d)),_0x1cd8df=parseJsonObjectFlag(_0x90e21d['str'](_0x2d3998(0x223)),_0x2d3998(0x208));return{'code':_0x36025e,'patch':_0xde0b1c||{},'expect':_0x1cd8df};}function validateInput(_0x8914ba){const _0x2c7a2f=a63_0x86eada;if(!_0x8914ba[_0x2c7a2f(0x22d)])throw CliErrors[_0x2c7a2f(0x233)]('--code\x20is\x20required');validateExtendPatchKeys(_0x8914ba[_0x2c7a2f(0x1ff)]);}function parseDatasetExtend(_0x50a5a5){const _0x140657=a63_0x86eada;if(typeof _0x50a5a5==='string'){const _0x3edf2f=_0x50a5a5[_0x140657(0x235)]();if(!_0x3edf2f)return{'value':{},'shape':_0x140657(0x220)};let _0x52fe58;try{_0x52fe58=JSON[_0x140657(0x1fb)](_0x3edf2f);}catch(_0x37459d){const _0x4c4d1f=_0x37459d instanceof Error?_0x37459d['message']:String(_0x37459d);throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x4c4d1f);}if(!isPlainObject(_0x52fe58)||Array['isArray'](_0x52fe58))throw CliErrors['validation'](_0x140657(0x222));return{'value':_0x52fe58,'shape':_0x140657(0x220)};}if(_0x50a5a5===undefined||_0x50a5a5===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x50a5a5)||Array['isArray'](_0x50a5a5))throw CliErrors[_0x140657(0x233)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x50a5a5,'shape':_0x140657(0x217)};}function serializeDatasetExtend(_0x24f5b4,_0x16669e){const _0x3a322c=a63_0x86eada;return _0x16669e===_0x3a322c(0x220)?JSON[_0x3a322c(0x205)](_0x24f5b4):_0x24f5b4;}function summarizeDataset(_0x2dcb6a,_0x24ec85){const _0x14e99b=a63_0x86eada,_0x17cb83=isPlainObject(_0x2dcb6a[_0x14e99b(0x201)])?_0x2dcb6a['dataset']:{},_0xd2d20=isPlainObject(_0x2dcb6a['dbtableConfig'])?_0x2dcb6a['dbtableConfig']:{};return{'id':_0x2dcb6a[_0x14e99b(0x228)]??_0x2dcb6a['id']??_0x17cb83[_0x14e99b(0x206)]??null,'code':_0x2dcb6a[_0x14e99b(0x20f)]??_0x2dcb6a['code']??_0x17cb83[_0x14e99b(0x226)]??_0x24ec85,'name':_0x2dcb6a['name']??_0x17cb83[_0x14e99b(0x21f)]??null,'table':_0xd2d20[_0x14e99b(0x211)]??_0x17cb83[_0x14e99b(0x211)]??null,'db':_0xd2d20[_0x14e99b(0x214)]??_0xd2d20['dbId']??null};}function deepClone(_0x4e6c8c){const _0x4c0b7a=a63_0x86eada;if(_0x4e6c8c===undefined)return _0x4e6c8c;return JSON[_0x4c0b7a(0x1fb)](JSON[_0x4c0b7a(0x205)](_0x4e6c8c));}function a63_0x2f2c(_0x33fd78,_0x6a8857){_0x33fd78=_0x33fd78-0x1f4;const _0x2610f4=a63_0x2610();let _0x2f2c24=_0x2610f4[_0x33fd78];return _0x2f2c24;}function deepEqual(_0x29b4be,_0x162a29){const _0x3500e5=a63_0x86eada;return JSON['stringify'](_0x29b4be)===JSON[_0x3500e5(0x205)](_0x162a29);}function isPlainObject(_0x51b0e0){const _0x5ade2f=a63_0x86eada;return Boolean(_0x51b0e0)&&typeof _0x51b0e0===_0x5ade2f(0x217)&&!Array[_0x5ade2f(0x21d)](_0x51b0e0);}function trim(_0x114a34){const _0x52f748=a63_0x86eada,_0x12d8a8=String(_0x114a34||'')[_0x52f748(0x235)]();return _0x12d8a8;}
1
+ const a63_0x24a127=a63_0x4a42;(function(_0x5b7df4,_0x48ff60){const _0x1391e7=a63_0x4a42,_0x1ad73c=_0x5b7df4();while(!![]){try{const _0x1eac9b=parseInt(_0x1391e7(0x198))/0x1*(-parseInt(_0x1391e7(0x189))/0x2)+parseInt(_0x1391e7(0x18b))/0x3*(-parseInt(_0x1391e7(0x19b))/0x4)+parseInt(_0x1391e7(0x186))/0x5*(-parseInt(_0x1391e7(0x190))/0x6)+parseInt(_0x1391e7(0x182))/0x7*(-parseInt(_0x1391e7(0x196))/0x8)+-parseInt(_0x1391e7(0x173))/0x9*(parseInt(_0x1391e7(0x174))/0xa)+parseInt(_0x1391e7(0x178))/0xb+parseInt(_0x1391e7(0x19e))/0xc;if(_0x1eac9b===_0x48ff60)break;else _0x1ad73c['push'](_0x1ad73c['shift']());}catch(_0x2f785a){_0x1ad73c['push'](_0x1ad73c['shift']());}}}(a63_0x11d0,0x597ba));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([[a63_0x24a127(0x16a),{'message':a63_0x24a127(0x195),'hint':a63_0x24a127(0x162)}]]);export function parseJsonObjectFlag(_0x3aa687,_0x538a71){const _0x261019=a63_0x24a127;if(!_0x3aa687)return undefined;let _0x2fe4ff;try{_0x2fe4ff=JSON[_0x261019(0x166)](_0x3aa687);}catch(_0x50546d){const _0x14cc18=_0x50546d instanceof Error?_0x50546d[_0x261019(0x167)]:String(_0x50546d);throw CliErrors[_0x261019(0x168)](_0x538a71+_0x261019(0x18e)+_0x14cc18);}if(!isPlainObject(_0x2fe4ff)||Array[_0x261019(0x179)](_0x2fe4ff))throw CliErrors['validation'](_0x538a71+'\x20must\x20be\x20a\x20JSON\x20object');return _0x2fe4ff;}export function validateExtendPatchKeys(_0x4ae258){const _0x38e737=a63_0x24a127,_0x4d5922=Object[_0x38e737(0x17f)](_0x4ae258);if(_0x4d5922[_0x38e737(0x191)]===0x0)throw CliErrors[_0x38e737(0x168)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x1364b1 of _0x4d5922){const _0x4e999d=EXTEND_PATCH_REDIRECTS['get'](_0x1364b1);if(_0x4e999d)throw CliErrors[_0x38e737(0x168)](_0x4e999d[_0x38e737(0x167)],_0x4e999d[_0x38e737(0x175)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x1364b1))throw CliErrors[_0x38e737(0x168)](_0x38e737(0x197)+_0x1364b1,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x35d3a9=a63_0x24a127,_0x574acb=Array['from'](MUTABLE_EXTEND_KEYS)['sort']();return _0x574acb['length']>0x0?_0x35d3a9(0x17a)+_0x574acb[_0x35d3a9(0x183)](',\x20'):'No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.';}function a63_0x4a42(_0x5d6734,_0x2d6b60){_0x5d6734=_0x5d6734-0x161;const _0x11d07b=a63_0x11d0();let _0x4a429b=_0x11d07b[_0x5d6734];return _0x4a429b;}export function applyExtendPatch(_0x4f04d5,_0x392693){const _0x34f45f=a63_0x24a127;validateExtendPatchKeys(_0x392693);const _0x11daf0=deepClone(_0x4f04d5),_0x3fa6d5=[];for(const [_0x258a7c,_0x2dad39]of Object[_0x34f45f(0x185)](_0x392693)){const _0x3805fb=_0x11daf0[_0x258a7c],_0x478f60=deepClone(_0x2dad39);!deepEqual(_0x3805fb,_0x478f60)&&(_0x11daf0[_0x258a7c]=_0x478f60,_0x3fa6d5[_0x34f45f(0x17c)](_0x34f45f(0x164)+_0x258a7c));}return _0x3fa6d5['sort'](),{'after':_0x11daf0,'changedPaths':_0x3fa6d5,'changed':_0x3fa6d5['length']>0x0};}function a63_0x11d0(){const _0x5c3ad4=['tableName','shape','patch','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','No\x20changes\x20for\x20dataset\x20extend','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','Updated\x20dataset\x20extend\x20(','extend.','dbId','parse','message','validation','datasetCode','businessGroup','expect','--expect-json','str','string','dataset','Expected\x20','value','datasetId','279KXavbK','59960ThHlEr','hint','extend','appCode','6472180jZkLJf','isArray','Allowed\x20keys:\x20',',\x20actual\x20','push','expect-json','stringify','keys','POST','object','30877HJHvvT','join','name','entries','98535sboZAH','code','modelCode','14066xHzjFQ','/smartapi/dataset/update-driven-data','2069703osSwuK','write','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','\x20must\x20be\x20valid\x20JSON\x20object:\x20','datasetName','198jSIfZC','length','extend-update','patch-json','Patch\x20dataset\x20top-level\x20extend\x20safely','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','944keIDsg','Unsupported\x20patch\x20key:\x20','2OGMyiN','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','--code\x20is\x20required','4UtmJkE','trim','modelId','22065768nXNXDJ','dbtableConfig'];a63_0x11d0=function(){return _0x5c3ad4;};return a63_0x11d0();}export function assertExpectation(_0x2669dd,_0x91e375){const _0x16ef14=a63_0x24a127;if(!_0x91e375)return;for(const [_0xeeaf14,_0x10287d]of Object['entries'](_0x91e375)){const _0x5c3907=_0x2669dd[_0xeeaf14];if(!deepEqual(_0x5c3907,_0x10287d))throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20extend.'+_0xeeaf14,_0x16ef14(0x170)+JSON[_0x16ef14(0x17e)](_0x10287d)+_0x16ef14(0x17b)+JSON['stringify'](_0x5c3907));}}export async function buildDatasetExtendUpdateResult({appCode:_0x2f6ae5,input:_0x262772,dryRun:_0x40117c}){const _0x269cfb=a63_0x24a127;validateInput(_0x262772);const _0x92cd38=await getDatasetDetail(_0x262772[_0x269cfb(0x187)]),_0x15ce71=parseDatasetExtend(_0x92cd38[_0x269cfb(0x176)]),_0x30f950=deepClone(_0x15ce71[_0x269cfb(0x171)]);assertExpectation(_0x30f950,_0x262772[_0x269cfb(0x16b)]);const {after:_0xb411f3,changedPaths:_0xad20bb,changed:_0x2655ce}=applyExtendPatch(_0x30f950,_0x262772['patch']),_0x49eadf=summarizeDataset(_0x92cd38,_0x262772[_0x269cfb(0x187)]);return _0x2655ce&&!_0x40117c&&(_0x92cd38['extend']=serializeDatasetExtend(_0xb411f3,_0x15ce71[_0x269cfb(0x1a1)]),await updateDrivenData(_0x92cd38)),{'ok':!![],'data':{'appCode':_0x2f6ae5,'selector':{'code':_0x262772['code']},'dataset':_0x49eadf,'dryRun':_0x40117c,'changed':_0x2655ce,'changedPaths':_0xad20bb,'before':{'extend':_0x30f950},'after':{'extend':_0xb411f3},'submitted':_0x2655ce&&!_0x40117c},'message':_0x2655ce?_0x40117c?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0xad20bb[_0x269cfb(0x183)](',\x20')+')':_0x269cfb(0x163)+_0xad20bb[_0x269cfb(0x183)](',\x20')+')':_0x269cfb(0x161)};}export const datasetExtendUpdate={'service':a63_0x24a127(0x16f),'command':a63_0x24a127(0x192),'description':a63_0x24a127(0x194),'risk':a63_0x24a127(0x18c),'flags':[CODE_FLAG,{'name':'patch-json','type':'string','required':!![],'description':a63_0x24a127(0x199)},{'name':'expect-json','type':a63_0x24a127(0x16e),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xf44ff7){validateInput(readExtendUpdateInput(_0xf44ff7));},async 'dryRun'(_0x2ed9be){const _0x2b4a1c=a63_0x24a127,_0x4728ae=await buildDatasetExtendUpdateResult({'appCode':_0x2ed9be['appCode'],'input':readExtendUpdateInput(_0x2ed9be),'dryRun':!![]});return{'method':_0x2b4a1c(0x180),'url':_0x2b4a1c(0x18a),'body':_0x4728ae['data'],'description':_0x4728ae[_0x2b4a1c(0x167)]};},async 'execute'(_0x3a0706){const _0x2e6e6c=a63_0x24a127;return buildDatasetExtendUpdateResult({'appCode':_0x3a0706[_0x2e6e6c(0x177)],'input':readExtendUpdateInput(_0x3a0706),'dryRun':![]});}};function readExtendUpdateInput(_0x522c13){const _0x7bcca1=a63_0x24a127,_0x559de1=trim(_0x522c13[_0x7bcca1(0x16d)](_0x7bcca1(0x187))),_0x482955=parseJsonObjectFlag(_0x522c13[_0x7bcca1(0x16d)](_0x7bcca1(0x193)),'--patch-json'),_0x1fda84=parseJsonObjectFlag(_0x522c13['str'](_0x7bcca1(0x17d)),_0x7bcca1(0x16c));return{'code':_0x559de1,'patch':_0x482955||{},'expect':_0x1fda84};}function validateInput(_0x328221){const _0x6e6473=a63_0x24a127;if(!_0x328221[_0x6e6473(0x187)])throw CliErrors[_0x6e6473(0x168)](_0x6e6473(0x19a));validateExtendPatchKeys(_0x328221[_0x6e6473(0x1a2)]);}function parseDatasetExtend(_0x3d47ea){const _0x23d96c=a63_0x24a127;if(typeof _0x3d47ea==='string'){const _0x391fa2=_0x3d47ea['trim']();if(!_0x391fa2)return{'value':{},'shape':_0x23d96c(0x16e)};let _0x5d5f45;try{_0x5d5f45=JSON[_0x23d96c(0x166)](_0x391fa2);}catch(_0x5d66ab){const _0x34b223=_0x5d66ab instanceof Error?_0x5d66ab[_0x23d96c(0x167)]:String(_0x5d66ab);throw CliErrors[_0x23d96c(0x168)](_0x23d96c(0x18d)+_0x34b223);}if(!isPlainObject(_0x5d5f45)||Array[_0x23d96c(0x179)](_0x5d5f45))throw CliErrors['validation'](_0x23d96c(0x1a3));return{'value':_0x5d5f45,'shape':_0x23d96c(0x16e)};}if(_0x3d47ea===undefined||_0x3d47ea===null)return{'value':{},'shape':_0x23d96c(0x16e)};if(!isPlainObject(_0x3d47ea)||Array[_0x23d96c(0x179)](_0x3d47ea))throw CliErrors[_0x23d96c(0x168)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x3d47ea,'shape':'object'};}function serializeDatasetExtend(_0x19c652,_0x39fc88){const _0x173178=a63_0x24a127;return _0x39fc88===_0x173178(0x16e)?JSON[_0x173178(0x17e)](_0x19c652):_0x19c652;}function summarizeDataset(_0x2d4539,_0x2be88d){const _0x35b9f2=a63_0x24a127,_0x4c7dee=isPlainObject(_0x2d4539[_0x35b9f2(0x16f)])?_0x2d4539[_0x35b9f2(0x16f)]:{},_0x550e5b=isPlainObject(_0x2d4539['dbtableConfig'])?_0x2d4539[_0x35b9f2(0x19f)]:{};return{'id':_0x2d4539[_0x35b9f2(0x19d)]??_0x2d4539['id']??_0x4c7dee[_0x35b9f2(0x172)]??null,'code':_0x2d4539[_0x35b9f2(0x188)]??_0x2d4539['code']??_0x4c7dee[_0x35b9f2(0x169)]??_0x2be88d,'name':_0x2d4539[_0x35b9f2(0x184)]??_0x4c7dee[_0x35b9f2(0x18f)]??null,'table':_0x550e5b['tableName']??_0x4c7dee[_0x35b9f2(0x1a0)]??null,'db':_0x550e5b['dbName']??_0x550e5b[_0x35b9f2(0x165)]??null};}function deepClone(_0x5597f0){const _0x17a3c1=a63_0x24a127;if(_0x5597f0===undefined)return _0x5597f0;return JSON[_0x17a3c1(0x166)](JSON[_0x17a3c1(0x17e)](_0x5597f0));}function deepEqual(_0x47ef5c,_0x165104){const _0x33b37d=a63_0x24a127;return JSON[_0x33b37d(0x17e)](_0x47ef5c)===JSON[_0x33b37d(0x17e)](_0x165104);}function isPlainObject(_0x2c24ab){const _0x4f21d3=a63_0x24a127;return Boolean(_0x2c24ab)&&typeof _0x2c24ab===_0x4f21d3(0x181)&&!Array[_0x4f21d3(0x179)](_0x2c24ab);}function trim(_0x31d944){const _0x443973=a63_0x24a127,_0x39eb3=String(_0x31d944||'')[_0x443973(0x19c)]();return _0x39eb3;}
@@ -1 +1 @@
1
- const a64_0x271f65=a64_0x45d5;(function(_0x877b8b,_0x55a4ee){const _0x33573a=a64_0x45d5,_0x485d2d=_0x877b8b();while(!![]){try{const _0xd366e7=parseInt(_0x33573a(0x1bf))/0x1+parseInt(_0x33573a(0x1e8))/0x2+parseInt(_0x33573a(0x1d1))/0x3*(parseInt(_0x33573a(0x1a9))/0x4)+-parseInt(_0x33573a(0x1db))/0x5+-parseInt(_0x33573a(0x1f4))/0x6*(parseInt(_0x33573a(0x1ce))/0x7)+-parseInt(_0x33573a(0x1cd))/0x8*(parseInt(_0x33573a(0x1e9))/0x9)+parseInt(_0x33573a(0x1dd))/0xa*(parseInt(_0x33573a(0x1d0))/0xb);if(_0xd366e7===_0x55a4ee)break;else _0x485d2d['push'](_0x485d2d['shift']());}catch(_0x6c58f7){_0x485d2d['push'](_0x485d2d['shift']());}}}(a64_0x4039,0xd8ded));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([a64_0x271f65(0x1e6),a64_0x271f65(0x1a6),'description',a64_0x271f65(0x1e3),'required',a64_0x271f65(0x1bc),a64_0x271f65(0x1e7),a64_0x271f65(0x1b0),'deprecated']),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x271f65(0x1bd),'code',a64_0x271f65(0x1ab),a64_0x271f65(0x1ca),a64_0x271f65(0x1b6),a64_0x271f65(0x1d8),a64_0x271f65(0x1e0),a64_0x271f65(0x1f5),a64_0x271f65(0x1cf),'autoIncrement',a64_0x271f65(0x1d3)]);export function parseJsonObjectFlag(_0x58e6a7,_0x1d57fc){const _0x558cb2=a64_0x271f65;if(!_0x58e6a7)return undefined;let _0x280075;try{_0x280075=JSON[_0x558cb2(0x1aa)](_0x58e6a7);}catch(_0x22dada){const _0x1be9d6=_0x22dada instanceof Error?_0x22dada[_0x558cb2(0x1d2)]:String(_0x22dada);throw CliErrors[_0x558cb2(0x1e5)](_0x1d57fc+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x1be9d6);}if(!isPlainObject(_0x280075)||Array[_0x558cb2(0x1c8)](_0x280075))throw CliErrors[_0x558cb2(0x1e5)](_0x1d57fc+_0x558cb2(0x1df));return _0x280075;}export function validatePatchKeys(_0x46efeb){const _0x231a04=a64_0x271f65,_0x586bea=Object[_0x231a04(0x1ae)](_0x46efeb);if(_0x586bea[_0x231a04(0x1c5)]===0x0)throw CliErrors['validation'](_0x231a04(0x1b7));for(const _0x411900 of _0x586bea){if(FORBIDDEN_FIELD_KEYS[_0x231a04(0x1c0)](_0x411900))throw CliErrors[_0x231a04(0x1e5)](_0x231a04(0x1bb)+_0x411900);if(!MUTABLE_FIELD_KEYS['has'](_0x411900))throw CliErrors[_0x231a04(0x1e5)](_0x231a04(0x1ac)+_0x411900,_0x231a04(0x1cc)+Array[_0x231a04(0x1c3)](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}function a64_0x4039(){const _0x5006d7=['dbName','dbFieldName','/smartapi/dataset/update-driven-data','object','4599835bFOFKO','write','1040XJCakr','string','\x20must\x20be\x20a\x20JSON\x20object','tableName','datasetCode','size','options','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','validation','doType','defaultAggregation','746636LVhbBP','450awjfxV','appCode','findIndex','Exact\x20raw\x20fields[].name\x20to\x20patch','--code\x20is\x20required','patch-json','--field\x20is\x20required','str','POST','stringify','dbtableConfig','2802pplGLo','deleted','displayName','field','add','168rgQgSy','parse','dbType','Unsupported\x20patch\x20key:\x20','--expect-json','keys','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','chartRole','patch','\x20would\x20change\x20(','join','datasetName','properties','dbTypeScale','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','modelId','trim','entries','Forbidden\x20patch\x20key:\x20','datetimeFormat','name','dataset','34027iTXVob','has','code',',\x20actual\x20','from','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','length','Expected\x20','expect-json','isArray','fields','dbTypeLen','Field\x20not\x20found:\x20','Allowed\x20keys:\x20','233968MCKyRq','3633UNjkQe','pkField','254441vDQzak','49998Yodqxy','message','systemRetain','--patch-json','No\x20changes\x20for\x20dataset\x20field\x20','sort'];a64_0x4039=function(){return _0x5006d7;};return a64_0x4039();}export function applyFieldPatch(_0x399f16,_0x9dc86c){const _0x183346=a64_0x271f65;validatePatchKeys(_0x9dc86c);const _0x4aab8f=deepClone(_0x399f16),_0x304a87=new Set();for(const [_0x3a27c7,_0x16d537]of Object[_0x183346(0x1ba)](_0x9dc86c)){const _0x45c949=_0x4aab8f[_0x3a27c7],_0x5813ce=mergePatchValue(_0x45c949,_0x16d537);!deepEqual(_0x45c949,_0x5813ce)&&(_0x4aab8f[_0x3a27c7]=_0x5813ce,_0x304a87[_0x183346(0x1a8)](_0x3a27c7),collectChangedPaths(_0x3a27c7,_0x45c949,_0x5813ce,_0x304a87));}return{'after':_0x4aab8f,'changedPaths':Array[_0x183346(0x1c3)](_0x304a87)[_0x183346(0x1d6)](),'changed':_0x304a87[_0x183346(0x1e2)]>0x0};}export function assertExpectation(_0x7650b2,_0x38035d){const _0x4cf05e=a64_0x271f65;if(!_0x38035d)return;for(const [_0x1fb58a,_0x57ce34]of Object['entries'](_0x38035d)){const _0x53172a=_0x7650b2[_0x1fb58a];if(!deepEqual(_0x53172a,_0x57ce34))throw CliErrors[_0x4cf05e(0x1e5)]('Expectation\x20mismatch\x20at\x20'+_0x1fb58a,_0x4cf05e(0x1c6)+JSON[_0x4cf05e(0x1f2)](_0x57ce34)+_0x4cf05e(0x1c2)+JSON[_0x4cf05e(0x1f2)](_0x53172a));}}export async function buildDatasetFieldUpdateResult({appCode:_0x3b5027,input:_0x57a088,dryRun:_0x36a0f7}){const _0x14b83e=a64_0x271f65;validateInput(_0x57a088);const _0x3aef4c=await getDatasetDetail(_0x57a088[_0x14b83e(0x1c1)]),_0x5e1deb=readFieldArray(_0x3aef4c),_0xa1e347=_0x5e1deb[_0x14b83e(0x1eb)](_0x284ad7=>_0x284ad7?.[_0x14b83e(0x1bd)]===_0x57a088['field']);if(_0xa1e347<0x0)throw CliErrors[_0x14b83e(0x1e5)](_0x14b83e(0x1cb)+_0x57a088['field']);const _0x3baec2=deepClone(_0x5e1deb[_0xa1e347]);assertExpectation(_0x3baec2,_0x57a088['expect']);const {after:_0x55f54b,changedPaths:_0x26277c,changed:_0x30577b}=applyFieldPatch(_0x3baec2,_0x57a088[_0x14b83e(0x1b1)]),_0x3a381c=summarizeDataset(_0x3aef4c,_0x57a088['code']);return _0x30577b&&!_0x36a0f7&&(_0x5e1deb[_0xa1e347]=_0x55f54b,await updateDrivenData(_0x3aef4c)),{'ok':!![],'data':{'appCode':_0x3b5027,'selector':{'code':_0x57a088['code']},'dataset':_0x3a381c,'field':{'id':_0x3baec2['id']??null,'name':_0x3baec2['name']},'dryRun':_0x36a0f7,'changed':_0x30577b,'changedPaths':_0x26277c,'before':_0x3baec2,'after':_0x55f54b,'submitted':_0x30577b&&!_0x36a0f7},'message':_0x30577b?_0x36a0f7?'Dry-run:\x20dataset\x20field\x20'+_0x57a088[_0x14b83e(0x1a7)]+_0x14b83e(0x1b2)+_0x26277c[_0x14b83e(0x1b3)](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x57a088[_0x14b83e(0x1a7)]+'\x20('+_0x26277c[_0x14b83e(0x1b3)](',\x20')+')':_0x14b83e(0x1d5)+_0x57a088['field']};}export const datasetFieldUpdate={'service':a64_0x271f65(0x1be),'command':'field-update','description':a64_0x271f65(0x1c4),'risk':a64_0x271f65(0x1dc),'flags':[CODE_FLAG,{'name':'field','type':a64_0x271f65(0x1de),'required':!![],'description':a64_0x271f65(0x1ec)},{'name':a64_0x271f65(0x1ee),'type':a64_0x271f65(0x1de),'required':!![],'description':a64_0x271f65(0x1af)},{'name':a64_0x271f65(0x1c7),'type':a64_0x271f65(0x1de),'required':![],'description':a64_0x271f65(0x1e4)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4a280a){validateInput(readFieldUpdateInput(_0x4a280a));},async 'dryRun'(_0x2d6932){const _0x282988=a64_0x271f65,_0x3c7833=await buildDatasetFieldUpdateResult({'appCode':_0x2d6932[_0x282988(0x1ea)],'input':readFieldUpdateInput(_0x2d6932),'dryRun':!![]});return{'method':_0x282988(0x1f1),'url':_0x282988(0x1d9),'body':_0x3c7833['data'],'description':_0x3c7833[_0x282988(0x1d2)]};},async 'execute'(_0x5db709){const _0x227f99=a64_0x271f65;return buildDatasetFieldUpdateResult({'appCode':_0x5db709[_0x227f99(0x1ea)],'input':readFieldUpdateInput(_0x5db709),'dryRun':![]});}};function readFieldUpdateInput(_0x33055f){const _0x527e80=a64_0x271f65,_0x5b4c58=trim(_0x33055f[_0x527e80(0x1f0)](_0x527e80(0x1c1))),_0x504391=emptyToUndefined(_0x33055f[_0x527e80(0x1f0)](_0x527e80(0x1a7))),_0x286249=parseJsonObjectFlag(_0x33055f[_0x527e80(0x1f0)]('patch-json'),_0x527e80(0x1d4)),_0xf01ea8=parseJsonObjectFlag(_0x33055f[_0x527e80(0x1f0)](_0x527e80(0x1c7)),_0x527e80(0x1ad));return{'code':_0x5b4c58,'field':_0x504391||'','patch':_0x286249||{},'expect':_0xf01ea8};}function validateInput(_0x319144){const _0x3fe6a1=a64_0x271f65;if(!_0x319144[_0x3fe6a1(0x1c1)])throw CliErrors['validation'](_0x3fe6a1(0x1ed));if(!_0x319144[_0x3fe6a1(0x1a7)])throw CliErrors['validation'](_0x3fe6a1(0x1ef));validatePatchKeys(_0x319144[_0x3fe6a1(0x1b1)]);}function readFieldArray(_0x38c7d2){const _0x30dfc4=a64_0x271f65;if(Array[_0x30dfc4(0x1c8)](_0x38c7d2['fields']))return _0x38c7d2[_0x30dfc4(0x1c9)];if(Array[_0x30dfc4(0x1c8)](_0x38c7d2[_0x30dfc4(0x1b5)]))return _0x38c7d2['properties'];throw CliErrors[_0x30dfc4(0x1e5)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x53d615,_0x135593){const _0x3ce85f=a64_0x271f65,_0x13137c=isPlainObject(_0x53d615['dataset'])?_0x53d615['dataset']:{},_0x3c3e84=isPlainObject(_0x53d615[_0x3ce85f(0x1f3)])?_0x53d615['dbtableConfig']:{};return{'id':_0x53d615[_0x3ce85f(0x1b8)]??_0x53d615['id']??_0x13137c['datasetId']??null,'code':_0x53d615['modelCode']??_0x53d615['code']??_0x13137c[_0x3ce85f(0x1e1)]??_0x135593,'name':_0x53d615['name']??_0x13137c[_0x3ce85f(0x1b4)]??null,'table':_0x3c3e84[_0x3ce85f(0x1e0)]??_0x13137c[_0x3ce85f(0x1e0)]??null,'db':_0x3c3e84[_0x3ce85f(0x1d7)]??_0x3c3e84['dbId']??null};}function mergePatchValue(_0xc25cca,_0x12b321){if(isPlainObject(_0xc25cca)&&isPlainObject(_0x12b321))return deepMerge(_0xc25cca,_0x12b321);return deepClone(_0x12b321);}function deepMerge(_0x2d7f8a,_0x38a929){const _0x2bd9d9=deepClone(_0x2d7f8a);for(const [_0x24bbf4,_0x1a34a2]of Object['entries'](_0x38a929)){_0x2bd9d9[_0x24bbf4]=isPlainObject(_0x2bd9d9[_0x24bbf4])&&isPlainObject(_0x1a34a2)?deepMerge(_0x2bd9d9[_0x24bbf4],_0x1a34a2):deepClone(_0x1a34a2);}return _0x2bd9d9;}function collectChangedPaths(_0x3c2f87,_0x46c2c0,_0x345e33,_0x3f002b){const _0x4d554c=a64_0x271f65;if(!isPlainObject(_0x46c2c0)||!isPlainObject(_0x345e33))return;const _0x3d643a=new Set([...Object[_0x4d554c(0x1ae)](_0x46c2c0),...Object[_0x4d554c(0x1ae)](_0x345e33)]);for(const _0x4e5136 of _0x3d643a){const _0x3d0280=_0x46c2c0[_0x4e5136],_0x1078f4=_0x345e33[_0x4e5136];!deepEqual(_0x3d0280,_0x1078f4)&&_0x3f002b['add'](_0x3c2f87+'.'+_0x4e5136);}}function deepClone(_0x2c91e1){const _0x44ee0f=a64_0x271f65;if(_0x2c91e1===undefined)return _0x2c91e1;return JSON[_0x44ee0f(0x1aa)](JSON['stringify'](_0x2c91e1));}function deepEqual(_0x416cf5,_0x3bdc76){const _0x565de4=a64_0x271f65;return JSON[_0x565de4(0x1f2)](_0x416cf5)===JSON[_0x565de4(0x1f2)](_0x3bdc76);}function isPlainObject(_0x2bc616){const _0x4981b1=a64_0x271f65;return Boolean(_0x2bc616)&&typeof _0x2bc616===_0x4981b1(0x1da)&&!Array[_0x4981b1(0x1c8)](_0x2bc616);}function a64_0x45d5(_0x4dbc72,_0xcfd25e){_0x4dbc72=_0x4dbc72-0x1a6;const _0x40392b=a64_0x4039();let _0x45d56e=_0x40392b[_0x4dbc72];return _0x45d56e;}function emptyToUndefined(_0x457e33){const _0x2a0029=a64_0x271f65,_0x518535=String(_0x457e33||'')[_0x2a0029(0x1b9)]();return _0x518535||undefined;}function trim(_0x5c143a){const _0x553518=a64_0x271f65;return String(_0x5c143a||'')[_0x553518(0x1b9)]();}
1
+ const a64_0x1e16b4=a64_0x429c;(function(_0x2f6d6f,_0x5c10f1){const _0x56e7a9=a64_0x429c,_0x563394=_0x2f6d6f();while(!![]){try{const _0xe2a310=parseInt(_0x56e7a9(0x209))/0x1+-parseInt(_0x56e7a9(0x1e4))/0x2+parseInt(_0x56e7a9(0x1ce))/0x3+-parseInt(_0x56e7a9(0x1dd))/0x4+parseInt(_0x56e7a9(0x1d7))/0x5*(parseInt(_0x56e7a9(0x1c3))/0x6)+-parseInt(_0x56e7a9(0x1c8))/0x7*(-parseInt(_0x56e7a9(0x1c4))/0x8)+-parseInt(_0x56e7a9(0x1ca))/0x9*(-parseInt(_0x56e7a9(0x1e0))/0xa);if(_0xe2a310===_0x5c10f1)break;else _0x563394['push'](_0x563394['shift']());}catch(_0x27e137){_0x563394['push'](_0x563394['shift']());}}}(a64_0x49af,0x1880f));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([a64_0x1e16b4(0x205),a64_0x1e16b4(0x1cf),a64_0x1e16b4(0x1fb),'options',a64_0x1e16b4(0x1cb),'datetimeFormat',a64_0x1e16b4(0x1d9),a64_0x1e16b4(0x206),a64_0x1e16b4(0x210)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x1e16b4(0x20a),a64_0x1e16b4(0x1eb),a64_0x1e16b4(0x204),'dbTypeLen','dbTypeScale',a64_0x1e16b4(0x201),'tableName',a64_0x1e16b4(0x200),'pkField',a64_0x1e16b4(0x1e7),'systemRetain']);export function parseJsonObjectFlag(_0x153392,_0x41b099){const _0x23b9f3=a64_0x1e16b4;if(!_0x153392)return undefined;let _0xe58d7f;try{_0xe58d7f=JSON['parse'](_0x153392);}catch(_0x2c1bf4){const _0xbd6598=_0x2c1bf4 instanceof Error?_0x2c1bf4['message']:String(_0x2c1bf4);throw CliErrors[_0x23b9f3(0x1e8)](_0x41b099+_0x23b9f3(0x1d1)+_0xbd6598);}if(!isPlainObject(_0xe58d7f)||Array['isArray'](_0xe58d7f))throw CliErrors[_0x23b9f3(0x1e8)](_0x41b099+_0x23b9f3(0x20d));return _0xe58d7f;}export function validatePatchKeys(_0x201d39){const _0x55c8b8=a64_0x1e16b4,_0x420e75=Object['keys'](_0x201d39);if(_0x420e75[_0x55c8b8(0x1cd)]===0x0)throw CliErrors[_0x55c8b8(0x1e8)](_0x55c8b8(0x1fa));for(const _0x2f94e8 of _0x420e75){if(FORBIDDEN_FIELD_KEYS[_0x55c8b8(0x1ec)](_0x2f94e8))throw CliErrors[_0x55c8b8(0x1e8)](_0x55c8b8(0x1d3)+_0x2f94e8);if(!MUTABLE_FIELD_KEYS[_0x55c8b8(0x1ec)](_0x2f94e8))throw CliErrors[_0x55c8b8(0x1e8)](_0x55c8b8(0x1d6)+_0x2f94e8,_0x55c8b8(0x203)+Array[_0x55c8b8(0x1c2)](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}export function applyFieldPatch(_0xfaff30,_0x1be330){const _0x290091=a64_0x1e16b4;validatePatchKeys(_0x1be330);const _0x490a7e=deepClone(_0xfaff30),_0x5c0034=new Set();for(const [_0x1b075f,_0x4a081b]of Object[_0x290091(0x1d2)](_0x1be330)){const _0x3307bf=_0x490a7e[_0x1b075f],_0x2471f5=mergePatchValue(_0x3307bf,_0x4a081b);!deepEqual(_0x3307bf,_0x2471f5)&&(_0x490a7e[_0x1b075f]=_0x2471f5,_0x5c0034['add'](_0x1b075f),collectChangedPaths(_0x1b075f,_0x3307bf,_0x2471f5,_0x5c0034));}return{'after':_0x490a7e,'changedPaths':Array['from'](_0x5c0034)['sort'](),'changed':_0x5c0034['size']>0x0};}export function assertExpectation(_0x4b2dc2,_0x662f43){const _0x380337=a64_0x1e16b4;if(!_0x662f43)return;for(const [_0x6029e1,_0x12c981]of Object[_0x380337(0x1d2)](_0x662f43)){const _0x5b610a=_0x4b2dc2[_0x6029e1];if(!deepEqual(_0x5b610a,_0x12c981))throw CliErrors[_0x380337(0x1e8)](_0x380337(0x1f3)+_0x6029e1,_0x380337(0x1e1)+JSON[_0x380337(0x1de)](_0x12c981)+_0x380337(0x1c7)+JSON[_0x380337(0x1de)](_0x5b610a));}}export async function buildDatasetFieldUpdateResult({appCode:_0x4c12a9,input:_0x54a736,dryRun:_0xa8622a}){const _0x19ed2c=a64_0x1e16b4;validateInput(_0x54a736);const _0x19095f=await getDatasetDetail(_0x54a736[_0x19ed2c(0x1eb)]),_0x4a9952=readFieldArray(_0x19095f),_0x5e4893=_0x4a9952[_0x19ed2c(0x1f7)](_0x343fbf=>_0x343fbf?.[_0x19ed2c(0x20a)]===_0x54a736[_0x19ed2c(0x1e6)]);if(_0x5e4893<0x0)throw CliErrors['validation']('Field\x20not\x20found:\x20'+_0x54a736[_0x19ed2c(0x1e6)]);const _0xa5d03f=deepClone(_0x4a9952[_0x5e4893]);assertExpectation(_0xa5d03f,_0x54a736[_0x19ed2c(0x1d4)]);const {after:_0x3987a4,changedPaths:_0x344ba8,changed:_0x24d6e7}=applyFieldPatch(_0xa5d03f,_0x54a736[_0x19ed2c(0x1ee)]),_0x82d21b=summarizeDataset(_0x19095f,_0x54a736[_0x19ed2c(0x1eb)]);return _0x24d6e7&&!_0xa8622a&&(_0x4a9952[_0x5e4893]=_0x3987a4,await updateDrivenData(_0x19095f)),{'ok':!![],'data':{'appCode':_0x4c12a9,'selector':{'code':_0x54a736[_0x19ed2c(0x1eb)]},'dataset':_0x82d21b,'field':{'id':_0xa5d03f['id']??null,'name':_0xa5d03f['name']},'dryRun':_0xa8622a,'changed':_0x24d6e7,'changedPaths':_0x344ba8,'before':_0xa5d03f,'after':_0x3987a4,'submitted':_0x24d6e7&&!_0xa8622a},'message':_0x24d6e7?_0xa8622a?_0x19ed2c(0x1fd)+_0x54a736[_0x19ed2c(0x1e6)]+_0x19ed2c(0x1f9)+_0x344ba8[_0x19ed2c(0x1fc)](',\x20')+')':_0x19ed2c(0x1cc)+_0x54a736[_0x19ed2c(0x1e6)]+'\x20('+_0x344ba8[_0x19ed2c(0x1fc)](',\x20')+')':_0x19ed2c(0x1ff)+_0x54a736[_0x19ed2c(0x1e6)]};}export const datasetFieldUpdate={'service':a64_0x1e16b4(0x1e5),'command':a64_0x1e16b4(0x1df),'description':a64_0x1e16b4(0x1f6),'risk':a64_0x1e16b4(0x20c),'flags':[CODE_FLAG,{'name':a64_0x1e16b4(0x1e6),'type':'string','required':!![],'description':a64_0x1e16b4(0x1e3)},{'name':a64_0x1e16b4(0x1ed),'type':'string','required':!![],'description':a64_0x1e16b4(0x1e2)},{'name':a64_0x1e16b4(0x1c5),'type':a64_0x1e16b4(0x211),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xd0c81b){validateInput(readFieldUpdateInput(_0xd0c81b));},async 'dryRun'(_0x2e0a72){const _0x20c480=a64_0x1e16b4,_0x3d4593=await buildDatasetFieldUpdateResult({'appCode':_0x2e0a72['appCode'],'input':readFieldUpdateInput(_0x2e0a72),'dryRun':!![]});return{'method':_0x20c480(0x1f1),'url':_0x20c480(0x1d0),'body':_0x3d4593[_0x20c480(0x1f4)],'description':_0x3d4593[_0x20c480(0x1d8)]};},async 'execute'(_0x329600){const _0x538d27=a64_0x1e16b4;return buildDatasetFieldUpdateResult({'appCode':_0x329600[_0x538d27(0x20e)],'input':readFieldUpdateInput(_0x329600),'dryRun':![]});}};function readFieldUpdateInput(_0x56a1b9){const _0x33de93=a64_0x1e16b4,_0x3fdefe=trim(_0x56a1b9[_0x33de93(0x1f0)](_0x33de93(0x1eb))),_0xa0ac32=emptyToUndefined(_0x56a1b9[_0x33de93(0x1f0)](_0x33de93(0x1e6))),_0x30d7d4=parseJsonObjectFlag(_0x56a1b9[_0x33de93(0x1f0)](_0x33de93(0x1ed)),_0x33de93(0x20f)),_0x4158d5=parseJsonObjectFlag(_0x56a1b9[_0x33de93(0x1f0)](_0x33de93(0x1c5)),_0x33de93(0x20b));return{'code':_0x3fdefe,'field':_0xa0ac32||'','patch':_0x30d7d4||{},'expect':_0x4158d5};}function validateInput(_0x5a7d56){const _0x4a1554=a64_0x1e16b4;if(!_0x5a7d56[_0x4a1554(0x1eb)])throw CliErrors[_0x4a1554(0x1e8)]('--code\x20is\x20required');if(!_0x5a7d56['field'])throw CliErrors[_0x4a1554(0x1e8)](_0x4a1554(0x1dc));validatePatchKeys(_0x5a7d56['patch']);}function readFieldArray(_0x503d30){const _0xc67b34=a64_0x1e16b4;if(Array[_0xc67b34(0x1da)](_0x503d30['fields']))return _0x503d30[_0xc67b34(0x1db)];if(Array[_0xc67b34(0x1da)](_0x503d30[_0xc67b34(0x207)]))return _0x503d30[_0xc67b34(0x207)];throw CliErrors[_0xc67b34(0x1e8)](_0xc67b34(0x208));}function summarizeDataset(_0x1a0593,_0x4034a0){const _0x461305=a64_0x1e16b4,_0x29dc2f=isPlainObject(_0x1a0593[_0x461305(0x1e5)])?_0x1a0593['dataset']:{},_0x5bc568=isPlainObject(_0x1a0593[_0x461305(0x1d5)])?_0x1a0593['dbtableConfig']:{};return{'id':_0x1a0593['modelId']??_0x1a0593['id']??_0x29dc2f[_0x461305(0x1c9)]??null,'code':_0x1a0593[_0x461305(0x1ea)]??_0x1a0593['code']??_0x29dc2f[_0x461305(0x1ef)]??_0x4034a0,'name':_0x1a0593[_0x461305(0x20a)]??_0x29dc2f[_0x461305(0x1f2)]??null,'table':_0x5bc568[_0x461305(0x1e9)]??_0x29dc2f[_0x461305(0x1e9)]??null,'db':_0x5bc568[_0x461305(0x1f8)]??_0x5bc568['dbId']??null};}function mergePatchValue(_0x3cd520,_0x42f434){if(isPlainObject(_0x3cd520)&&isPlainObject(_0x42f434))return deepMerge(_0x3cd520,_0x42f434);return deepClone(_0x42f434);}function a64_0x429c(_0x286af1,_0x1e18f9){_0x286af1=_0x286af1-0x1c2;const _0x49af2d=a64_0x49af();let _0x429c92=_0x49af2d[_0x286af1];return _0x429c92;}function deepMerge(_0x2f207e,_0x26d252){const _0x531244=a64_0x1e16b4,_0x487b3b=deepClone(_0x2f207e);for(const [_0x1bd62f,_0x2898f6]of Object[_0x531244(0x1d2)](_0x26d252)){_0x487b3b[_0x1bd62f]=isPlainObject(_0x487b3b[_0x1bd62f])&&isPlainObject(_0x2898f6)?deepMerge(_0x487b3b[_0x1bd62f],_0x2898f6):deepClone(_0x2898f6);}return _0x487b3b;}function collectChangedPaths(_0x558721,_0x1f022c,_0x177da2,_0x1554e0){const _0x130355=a64_0x1e16b4;if(!isPlainObject(_0x1f022c)||!isPlainObject(_0x177da2))return;const _0x12e22d=new Set([...Object[_0x130355(0x1c6)](_0x1f022c),...Object[_0x130355(0x1c6)](_0x177da2)]);for(const _0x1ecd4f of _0x12e22d){const _0x56ff5c=_0x1f022c[_0x1ecd4f],_0x2e4ccc=_0x177da2[_0x1ecd4f];!deepEqual(_0x56ff5c,_0x2e4ccc)&&_0x1554e0[_0x130355(0x1f5)](_0x558721+'.'+_0x1ecd4f);}}function deepClone(_0x445804){const _0x626a58=a64_0x1e16b4;if(_0x445804===undefined)return _0x445804;return JSON[_0x626a58(0x1fe)](JSON[_0x626a58(0x1de)](_0x445804));}function deepEqual(_0x404ef9,_0x5936a4){const _0x164b7e=a64_0x1e16b4;return JSON[_0x164b7e(0x1de)](_0x404ef9)===JSON[_0x164b7e(0x1de)](_0x5936a4);}function isPlainObject(_0x284eb7){return Boolean(_0x284eb7)&&typeof _0x284eb7==='object'&&!Array['isArray'](_0x284eb7);}function a64_0x49af(){const _0x4703d0=['9yVzpiv','required','Updated\x20dataset\x20field\x20','length','200973rDZWWw','displayName','/smartapi/dataset/update-driven-data','\x20must\x20be\x20valid\x20JSON\x20object:\x20','entries','Forbidden\x20patch\x20key:\x20','expect','dbtableConfig','Unsupported\x20patch\x20key:\x20','30195TarmZc','message','defaultAggregation','isArray','fields','--field\x20is\x20required','377124lHUbqX','stringify','field-update','654490NdLkHC','Expected\x20','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Exact\x20raw\x20fields[].name\x20to\x20patch','350106exeHIN','dataset','field','autoIncrement','validation','tableName','modelCode','code','has','patch-json','patch','datasetCode','str','POST','datasetName','Expectation\x20mismatch\x20at\x20','data','add','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','findIndex','dbName','\x20would\x20change\x20(','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','description','join','Dry-run:\x20dataset\x20field\x20','parse','No\x20changes\x20for\x20dataset\x20field\x20','deleted','dbFieldName','trim','Allowed\x20keys:\x20','dbType','doType','chartRole','properties','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','176655ePJCGF','name','--expect-json','write','\x20must\x20be\x20a\x20JSON\x20object','appCode','--patch-json','deprecated','string','from','42QNOzWO','72ITZJFX','expect-json','keys',',\x20actual\x20','14259XwTCax','datasetId'];a64_0x49af=function(){return _0x4703d0;};return a64_0x49af();}function emptyToUndefined(_0xa1b39a){const _0x13898e=a64_0x1e16b4,_0x426f03=String(_0xa1b39a||'')[_0x13898e(0x202)]();return _0x426f03||undefined;}function trim(_0x495d47){return String(_0x495d47||'')['trim']();}