@lovrabet/rabetbase-cli 2.3.8 → 2.3.9-beta.2

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 -1
  115. package/lib/commands/notification/index.js +1 -1
  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_0x2d56b9=a53_0x460f;(function(_0x3d6012,_0x4be1e3){const _0x3aee5d=a53_0x460f,_0x5c375d=_0x3d6012();while(!![]){try{const _0x22a19e=-parseInt(_0x3aee5d(0x146))/0x1*(-parseInt(_0x3aee5d(0x147))/0x2)+-parseInt(_0x3aee5d(0x14f))/0x3+parseInt(_0x3aee5d(0x13a))/0x4+-parseInt(_0x3aee5d(0x12c))/0x5+parseInt(_0x3aee5d(0x14c))/0x6+parseInt(_0x3aee5d(0x13b))/0x7*(-parseInt(_0x3aee5d(0x157))/0x8)+parseInt(_0x3aee5d(0x15c))/0x9*(parseInt(_0x3aee5d(0x12e))/0xa);if(_0x22a19e===_0x4be1e3)break;else _0x5c375d['push'](_0x5c375d['shift']());}catch(_0x4034dc){_0x5c375d['push'](_0x5c375d['shift']());}}}(a53_0x5e5e,0x60b2a));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a53_0x460f(_0x11a799,_0x418842){_0x11a799=_0x11a799-0x12a;const _0x5e5e91=a53_0x5e5e();let _0x460ff1=_0x5e5e91[_0x11a799];return _0x460ff1;}function a53_0x5e5e(){const _0x36dade=['Use\x20`','locale','env','set','18FXxXGX','59292defgFD','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','str','validation','keys','3531066dfVmqs','config','global','2215089TeSZsZ','Settable\x20top-level\x20keys:\x20','Top-level\x20key\x20\x22','length','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Global','Project','\x20appcode\x20set\x20to:\x20','8fOwHHY','\x22\x20is\x20not\x20settable.','app','Invalid\x20locale\x20value.','appcode','1736442BCBZIb','key','object','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','\x20app\x20add\x20<name>\x20--appcode\x20','includes','3186480bomfYP','boolean','50pPHxLY','Missing\x20value.','string','join','bool','riskLevel','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','\x20set\x20to:\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Invalid\x20value\x20for\x20\x22','value','write','176812DYzbfk','2515093zDnYYd','apps','Missing\x20key.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Usage:\x20','`,\x20`'];a53_0x5e5e=function(){return _0x36dade;};return a53_0x5e5e();}async function execute(_0x2cbcc6){const _0x8a0e20=a53_0x460f,_0x1767a9=_0x2cbcc6['str'](_0x8a0e20(0x15d)),_0x3672d2=_0x2cbcc6[_0x8a0e20(0x149)](_0x8a0e20(0x138));if(!_0x1767a9)throw CliErrors[_0x8a0e20(0x14a)](_0x8a0e20(0x13d),_0x8a0e20(0x140)+CLI_BIN_NAME+_0x8a0e20(0x13e));if(_0x3672d2===undefined||_0x3672d2==='')throw CliErrors[_0x8a0e20(0x14a)](_0x8a0e20(0x12f),_0x8a0e20(0x140)+CLI_BIN_NAME+_0x8a0e20(0x13e));if(_0x3672d2['length']>0x1f4)throw CliErrors[_0x8a0e20(0x14a)](_0x8a0e20(0x153));if(!isTopLevelConfigKey(_0x1767a9))throw CliErrors[_0x8a0e20(0x14a)](_0x8a0e20(0x151)+_0x1767a9+_0x8a0e20(0x158),_0x8a0e20(0x150)+getTopLevelConfigKeySummary());if(_0x1767a9===_0x8a0e20(0x133))throw CliErrors[_0x8a0e20(0x14a)](_0x8a0e20(0x136));if(CONFIG_ENUM_VALUES[_0x1767a9]&&!CONFIG_ENUM_VALUES[_0x1767a9][_0x8a0e20(0x12b)](_0x3672d2))throw CliErrors['validation'](_0x8a0e20(0x137)+_0x1767a9+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x1767a9][_0x8a0e20(0x131)](',\x20'));if(_0x1767a9===_0x8a0e20(0x143)&&!normalizeLocale(_0x3672d2))throw CliErrors[_0x8a0e20(0x14a)](_0x8a0e20(0x15a),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x1997a5={'global':_0x2cbcc6[_0x8a0e20(0x132)](_0x8a0e20(0x14e))},_0xb2a661=resolveWriteScope(_0x1997a5),_0x40d8f1=readScopedConfig(_0xb2a661);let _0x55aec6=_0x1767a9,_0x15becd=_0x3672d2;_0x1767a9===_0x8a0e20(0x159)&&(_0x55aec6=_0x8a0e20(0x15b),delete _0x40d8f1[_0x8a0e20(0x159)]);_0x1767a9===_0x8a0e20(0x143)&&(_0x15becd=normalizeLocale(_0x3672d2));if(_0x1767a9===_0x8a0e20(0x144)){_0x15becd=normalizeEnv(_0x3672d2);if(!isProduction(_0x15becd)&&!isDaily(_0x15becd))throw CliErrors[_0x8a0e20(0x14a)](_0x8a0e20(0x148),_0x8a0e20(0x15f));}if(_0x1767a9===_0x8a0e20(0x15b)){const _0x122bde=_0x40d8f1[_0x8a0e20(0x13c)]&&typeof _0x40d8f1[_0x8a0e20(0x13c)]===_0x8a0e20(0x15e)?Object[_0x8a0e20(0x14b)](_0x40d8f1[_0x8a0e20(0x13c)]):[];if(_0x122bde[_0x8a0e20(0x152)]>0x0)throw CliErrors[_0x8a0e20(0x14a)](_0x8a0e20(0x13f),_0x8a0e20(0x142)+CLI_BIN_NAME+_0x8a0e20(0x12a)+_0x15becd+_0x8a0e20(0x141)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x463d0b=buildCanonicalProjectConfig({..._0x40d8f1},{'appCodes':[_0x15becd],'env':typeof _0x40d8f1['env']===_0x8a0e20(0x130)?_0x40d8f1[_0x8a0e20(0x144)]:undefined});writeScopedConfig(_0x463d0b,_0xb2a661);const _0x35cfed=_0xb2a661==='global'?'Global':_0x8a0e20(0x155);return{'ok':!![],'message':'✓\x20'+_0x35cfed+_0x8a0e20(0x156)+_0x15becd+_0x8a0e20(0x134)};}_0x40d8f1[_0x55aec6]=_0x15becd,writeScopedConfig(_0x40d8f1,_0xb2a661);const _0x31a993=_0xb2a661===_0x8a0e20(0x14e)?_0x8a0e20(0x154):_0x8a0e20(0x155);return{'ok':!![],'message':'✓\x20'+_0x31a993+'\x20'+_0x55aec6+_0x8a0e20(0x135)+_0x15becd};}export const configSetDefinition={'service':a53_0x2d56b9(0x14d),'command':a53_0x2d56b9(0x145),'description':'Set\x20a\x20config\x20value','risk':a53_0x2d56b9(0x139),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a53_0x2d56b9(0x130),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x2d56b9(0x138),'type':a53_0x2d56b9(0x130),'description':'Config\x20value','required':!![]},{'name':a53_0x2d56b9(0x14e),'type':a53_0x2d56b9(0x12d),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a53_0x1c2150=a53_0x2ad9;function a53_0x3155(){const _0x47fde1=['value','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','str','Settable\x20top-level\x20keys:\x20','Set\x20a\x20config\x20value','set','463674EvkYwc','Usage:\x20','riskLevel','2482288OGWhhd','length','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','apps','env','1935388CoeSoS','Project','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','4isRLWv','bool','Config\x20value','\x20set\x20to:\x20','locale','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','2184055Gcovnl','21QZBDgq','\x22.\x20Allowed:\x20','keys','85113poOBDA','663192KrKxMA','\x20app\x20add\x20<name>\x20--appcode\x20','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Missing\x20value.','join','Invalid\x20locale\x20value.','appcode','`,\x20`','20XnuJqx','Top-level\x20key\x20\x22','app','Global','boolean','Use\x20`','3JVbtuD','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','validation','global','config','key','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','2773422smBUwz','506bgriwA','Missing\x20key.'];a53_0x3155=function(){return _0x47fde1;};return a53_0x3155();}(function(_0x53219c,_0x41ac96){const _0x529660=a53_0x2ad9,_0x3fa75e=_0x53219c();while(!![]){try{const _0xb47705=-parseInt(_0x529660(0x19f))/0x1*(-parseInt(_0x529660(0x1ab))/0x2)+-parseInt(_0x529660(0x1c4))/0x3*(parseInt(_0x529660(0x1a7))/0x4)+-parseInt(_0x529660(0x1b1))/0x5+parseInt(_0x529660(0x196))/0x6*(-parseInt(_0x529660(0x1b2))/0x7)+-parseInt(_0x529660(0x1a2))/0x8+parseInt(_0x529660(0x1b5))/0x9*(parseInt(_0x529660(0x1be))/0xa)+parseInt(_0x529660(0x197))/0xb*(parseInt(_0x529660(0x1b6))/0xc);if(_0xb47705===_0x41ac96)break;else _0x3fa75e['push'](_0x3fa75e['shift']());}catch(_0x1e8b1d){_0x3fa75e['push'](_0x3fa75e['shift']());}}}(a53_0x3155,0xd49bb));import{CliErrors}from'../../errors.js';function a53_0x2ad9(_0x4ab6c1,_0x5b920e){_0x4ab6c1=_0x4ab6c1-0x18f;const _0x315581=a53_0x3155();let _0x2ad9a8=_0x315581[_0x4ab6c1];return _0x2ad9a8;}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(_0x615dac){const _0xe00236=a53_0x2ad9,_0x1703b3=_0x615dac[_0xe00236(0x19b)](_0xe00236(0x193)),_0x235e9d=_0x615dac[_0xe00236(0x19b)](_0xe00236(0x199));if(!_0x1703b3)throw CliErrors[_0xe00236(0x190)](_0xe00236(0x198),_0xe00236(0x1a0)+CLI_BIN_NAME+_0xe00236(0x18f));if(_0x235e9d===undefined||_0x235e9d==='')throw CliErrors[_0xe00236(0x190)](_0xe00236(0x1b9),_0xe00236(0x1a0)+CLI_BIN_NAME+_0xe00236(0x18f));if(_0x235e9d['length']>0x1f4)throw CliErrors[_0xe00236(0x190)](_0xe00236(0x19a));if(!isTopLevelConfigKey(_0x1703b3))throw CliErrors['validation'](_0xe00236(0x1bf)+_0x1703b3+'\x22\x20is\x20not\x20settable.',_0xe00236(0x19c)+getTopLevelConfigKeySummary());if(_0x1703b3===_0xe00236(0x1a1))throw CliErrors['validation'](_0xe00236(0x1a4));if(CONFIG_ENUM_VALUES[_0x1703b3]&&!CONFIG_ENUM_VALUES[_0x1703b3]['includes'](_0x235e9d))throw CliErrors[_0xe00236(0x190)]('Invalid\x20value\x20for\x20\x22'+_0x1703b3+_0xe00236(0x1b3)+CONFIG_ENUM_VALUES[_0x1703b3][_0xe00236(0x1ba)](',\x20'));if(_0x1703b3===_0xe00236(0x1af)&&!normalizeLocale(_0x235e9d))throw CliErrors[_0xe00236(0x190)](_0xe00236(0x1bb),_0xe00236(0x195));const _0x2bcc92={'global':_0x615dac[_0xe00236(0x1ac)](_0xe00236(0x191))},_0x53a594=resolveWriteScope(_0x2bcc92),_0x8b5688=readScopedConfig(_0x53a594);let _0x1c8cc5=_0x1703b3,_0x4034e9=_0x235e9d;_0x1703b3===_0xe00236(0x1c0)&&(_0x1c8cc5=_0xe00236(0x1bc),delete _0x8b5688[_0xe00236(0x1c0)]);_0x1703b3==='locale'&&(_0x4034e9=normalizeLocale(_0x235e9d));if(_0x1703b3===_0xe00236(0x1a6)){_0x4034e9=normalizeEnv(_0x235e9d);if(!isProduction(_0x4034e9)&&!isDaily(_0x4034e9))throw CliErrors[_0xe00236(0x190)](_0xe00236(0x1a9),_0xe00236(0x1aa));}if(_0x1703b3==='appcode'){const _0x10e388=_0x8b5688[_0xe00236(0x1a5)]&&typeof _0x8b5688[_0xe00236(0x1a5)]==='object'?Object[_0xe00236(0x1b4)](_0x8b5688['apps']):[];if(_0x10e388[_0xe00236(0x1a3)]>0x0)throw CliErrors[_0xe00236(0x190)](_0xe00236(0x194),_0xe00236(0x1c3)+CLI_BIN_NAME+_0xe00236(0x1b7)+_0x4034e9+_0xe00236(0x1bd)+CLI_BIN_NAME+_0xe00236(0x1b0));const _0x483097=buildCanonicalProjectConfig({..._0x8b5688},{'appCodes':[_0x4034e9],'env':typeof _0x8b5688['env']==='string'?_0x8b5688[_0xe00236(0x1a6)]:undefined});writeScopedConfig(_0x483097,_0x53a594);const _0x1f79e5=_0x53a594===_0xe00236(0x191)?_0xe00236(0x1c1):_0xe00236(0x1a8);return{'ok':!![],'message':'✓\x20'+_0x1f79e5+'\x20appcode\x20set\x20to:\x20'+_0x4034e9+_0xe00236(0x1b8)};}_0x8b5688[_0x1c8cc5]=_0x4034e9,writeScopedConfig(_0x8b5688,_0x53a594);const _0x2bb9fb=_0x53a594===_0xe00236(0x191)?'Global':_0xe00236(0x1a8);return{'ok':!![],'message':'✓\x20'+_0x2bb9fb+'\x20'+_0x1c8cc5+_0xe00236(0x1ae)+_0x4034e9};}export const configSetDefinition={'service':a53_0x1c2150(0x192),'command':a53_0x1c2150(0x19e),'description':a53_0x1c2150(0x19d),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x1c2150(0x193),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x1c2150(0x199),'type':'string','description':a53_0x1c2150(0x1ad),'required':!![]},{'name':a53_0x1c2150(0x191),'type':a53_0x1c2150(0x1c2),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x426323,_0x187831){var _0x471bf0=a54_0x3ef7,_0x5704db=_0x426323();while(!![]){try{var _0x189df3=-parseInt(_0x471bf0(0x1ae))/0x1+parseInt(_0x471bf0(0x1af))/0x2+parseInt(_0x471bf0(0x1a8))/0x3+parseInt(_0x471bf0(0x1aa))/0x4+parseInt(_0x471bf0(0x1b1))/0x5*(parseInt(_0x471bf0(0x1b4))/0x6)+parseInt(_0x471bf0(0x1ad))/0x7+-parseInt(_0x471bf0(0x1ac))/0x8*(parseInt(_0x471bf0(0x1a7))/0x9);if(_0x189df3===_0x187831)break;else _0x5704db['push'](_0x5704db['shift']());}catch(_0x1d4d0d){_0x5704db['push'](_0x5704db['shift']());}}}(a54_0x1e51,0x36617));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x71663d){var _0x3f76bb=a54_0x3ef7;if(_0x71663d[_0x3f76bb(0x1b0)])return'global';if(!isInProject())throw CliErrors['validation'](_0x3f76bb(0x1a9),_0x3f76bb(0x1b3)+CLI_BIN_NAME+_0x3f76bb(0x1ab));return _0x3f76bb(0x1b2);}function a54_0x1e51(){var _0x4dede2=['Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','6BKwAkt','2700bkWvJm','1080294AHjQNv','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','618028vpJEMA','\x20init`\x20first.','17808AtSQoF','917539smzacl','97963vNlNEz','85304mscGmq','global','1500860wwrNhm','project'];a54_0x1e51=function(){return _0x4dede2;};return a54_0x1e51();}function a54_0x3ef7(_0x4d2c46,_0xd786f0){_0x4d2c46=_0x4d2c46-0x1a7;var _0x1e51aa=a54_0x1e51();var _0x3ef748=_0x1e51aa[_0x4d2c46];return _0x3ef748;}export function readScopedConfig(_0x35211f){return readConfigFile(resolveWriteConfigPath(_0x35211f));}export function writeScopedConfig(_0x408e7a,_0x1f794e){writeConfigFile(resolveWriteConfigPath(_0x1f794e),_0x408e7a);}
1
+ (function(_0x35a97a,_0x28c8b6){var _0x30d0f0=a54_0x2e5e,_0x21daaf=_0x35a97a();while(!![]){try{var _0x1a4312=-parseInt(_0x30d0f0(0x149))/0x1+parseInt(_0x30d0f0(0x148))/0x2+-parseInt(_0x30d0f0(0x14e))/0x3*(-parseInt(_0x30d0f0(0x14a))/0x4)+-parseInt(_0x30d0f0(0x150))/0x5+-parseInt(_0x30d0f0(0x14f))/0x6*(-parseInt(_0x30d0f0(0x151))/0x7)+-parseInt(_0x30d0f0(0x14c))/0x8*(-parseInt(_0x30d0f0(0x14b))/0x9)+parseInt(_0x30d0f0(0x143))/0xa*(-parseInt(_0x30d0f0(0x145))/0xb);if(_0x1a4312===_0x28c8b6)break;else _0x21daaf['push'](_0x21daaf['shift']());}catch(_0x14c040){_0x21daaf['push'](_0x21daaf['shift']());}}}(a54_0x12ac,0xaecdb));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a54_0x12ac(){var _0x22a4e9=['12qWCXQP','2143865mNYYwD','654101VNJldM','10DEqAji','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','5707471AvjfWn','\x20init`\x20first.','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','1154216fImPQj','898336OXAKyM','2050436hMXVzD','889866RWMHrn','104QzVcwM','global','3xiRirx'];a54_0x12ac=function(){return _0x22a4e9;};return a54_0x12ac();}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x36a8fc){var _0x106f8e=a54_0x2e5e;if(_0x36a8fc[_0x106f8e(0x14d)])return _0x106f8e(0x14d);if(!isInProject())throw CliErrors['validation'](_0x106f8e(0x144),_0x106f8e(0x147)+CLI_BIN_NAME+_0x106f8e(0x146));return'project';}function a54_0x2e5e(_0x146206,_0x378437){_0x146206=_0x146206-0x143;var _0x12ac41=a54_0x12ac();var _0x2e5ed5=_0x12ac41[_0x146206];return _0x2e5ed5;}export function readScopedConfig(_0x2488c2){return readConfigFile(resolveWriteConfigPath(_0x2488c2));}export function writeScopedConfig(_0x45f325,_0x5a390f){writeConfigFile(resolveWriteConfigPath(_0x5a390f),_0x45f325);}
@@ -1 +1 @@
1
- const a55_0x711f21=a55_0x5af7;(function(_0x4f1bf1,_0x5e9968){const _0x3e4896=a55_0x5af7,_0x159d5d=_0x4f1bf1();while(!![]){try{const _0x5d0910=-parseInt(_0x3e4896(0x148))/0x1*(parseInt(_0x3e4896(0x145))/0x2)+parseInt(_0x3e4896(0x14a))/0x3+parseInt(_0x3e4896(0x153))/0x4+-parseInt(_0x3e4896(0x151))/0x5+-parseInt(_0x3e4896(0x14c))/0x6*(-parseInt(_0x3e4896(0x14f))/0x7)+-parseInt(_0x3e4896(0x146))/0x8*(parseInt(_0x3e4896(0x154))/0x9)+-parseInt(_0x3e4896(0x149))/0xa;if(_0x5d0910===_0x5e9968)break;else _0x159d5d['push'](_0x159d5d['shift']());}catch(_0x21f475){_0x159d5d['push'](_0x159d5d['shift']());}}}(a55_0x1bd5,0xd2113));import{buildDataCommand}from'../../commands/data/shared.js';function a55_0x5af7(_0x217b7b,_0x57f1b2){_0x217b7b=_0x217b7b-0x143;const _0x1bd509=a55_0x1bd5();let _0x5af78d=_0x1bd509[_0x217b7b];return _0x5af78d;}function a55_0x1bd5(){const _0x42c9aa=['\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]','1081793ypDxTo','6655440VXFDHN','3724296PmJgnq','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','78zaDixm','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','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','632807zArNJK','filter','5658795PnPSHm','Filter\x20dataset\x20records\x20with\x20query\x20conditions','5529500AnOtXV','171xWiZXJ','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','2eJNvUd','25048iYaaaN'];a55_0x1bd5=function(){return _0x42c9aa;};return a55_0x1bd5();}export const dataFilter=buildDataCommand({'command':a55_0x711f21(0x150),'operation':'filter','description':a55_0x711f21(0x152),'paramsRequired':![],'paramsHint':a55_0x711f21(0x14e),'helpExtra':[a55_0x711f21(0x14d),a55_0x711f21(0x14b),a55_0x711f21(0x147),'\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}]',a55_0x711f21(0x143),a55_0x711f21(0x144)]['join']('\x0a')});
1
+ const a55_0x26da45=a55_0x4403;function a55_0x13ee(){const _0x9aa452=['3582726kiPfIb','7oeseTx','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','join','3lXRKAU','2032188wnIQFY','48879919hcNNjR','1069339spyZcq','10ZQpZoy','65898ZPYcND','2303096rrNgMz','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','filter','2746064qFWzxQ','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','110ztvdcu','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'];a55_0x13ee=function(){return _0x9aa452;};return a55_0x13ee();}(function(_0x271a64,_0x34ea72){const _0x39816a=a55_0x4403,_0x5daa8c=_0x271a64();while(!![]){try{const _0x44cbc4=-parseInt(_0x39816a(0x1f3))/0x1+parseInt(_0x39816a(0x1f9))/0x2*(-parseInt(_0x39816a(0x1f0))/0x3)+parseInt(_0x39816a(0x1f1))/0x4*(-parseInt(_0x39816a(0x1f4))/0x5)+-parseInt(_0x39816a(0x1ea))/0x6*(parseInt(_0x39816a(0x1eb))/0x7)+parseInt(_0x39816a(0x1f6))/0x8+parseInt(_0x39816a(0x1f5))/0x9*(parseInt(_0x39816a(0x1e8))/0xa)+parseInt(_0x39816a(0x1f2))/0xb;if(_0x44cbc4===_0x34ea72)break;else _0x5daa8c['push'](_0x5daa8c['shift']());}catch(_0x4aebab){_0x5daa8c['push'](_0x5daa8c['shift']());}}}(a55_0x13ee,0xb8af8));function a55_0x4403(_0xf4728b,_0x77310){_0xf4728b=_0xf4728b-0x1e7;const _0x13eeb5=a55_0x13ee();let _0x44039a=_0x13eeb5[_0xf4728b];return _0x44039a;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a55_0x26da45(0x1f8),'operation':a55_0x26da45(0x1f8),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a55_0x26da45(0x1e9),'helpExtra':[a55_0x26da45(0x1ec),a55_0x26da45(0x1f7),a55_0x26da45(0x1ed),a55_0x26da45(0x1ee),a55_0x26da45(0x1fa),a55_0x26da45(0x1e7)][a55_0x26da45(0x1ef)]('\x0a')});
@@ -1 +1 @@
1
- const a56_0x48d1b8=a56_0xb340;(function(_0x405bee,_0x31cb87){const _0x1f1721=a56_0xb340,_0x200bba=_0x405bee();while(!![]){try{const _0x592927=parseInt(_0x1f1721(0x1ec))/0x1+-parseInt(_0x1f1721(0x1f2))/0x2*(parseInt(_0x1f1721(0x1eb))/0x3)+parseInt(_0x1f1721(0x1f3))/0x4*(parseInt(_0x1f1721(0x1f0))/0x5)+parseInt(_0x1f1721(0x1ee))/0x6+parseInt(_0x1f1721(0x1e8))/0x7+-parseInt(_0x1f1721(0x1ef))/0x8*(parseInt(_0x1f1721(0x1f5))/0x9)+parseInt(_0x1f1721(0x1f4))/0xa*(-parseInt(_0x1f1721(0x1e9))/0xb);if(_0x592927===_0x31cb87)break;else _0x200bba['push'](_0x200bba['shift']());}catch(_0x56591d){_0x200bba['push'](_0x200bba['shift']());}}}(a56_0x21bd,0xa8a4b));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x48d1b8(0x1f1),'operation':a56_0x48d1b8(0x1f1),'description':a56_0x48d1b8(0x1ed),'paramsRequired':!![],'paramsHint':a56_0x48d1b8(0x1ea)});function a56_0xb340(_0x122aca,_0x234d94){_0x122aca=_0x122aca-0x1e8;const _0x21bd96=a56_0x21bd();let _0xb340a2=_0x21bd96[_0x122aca];return _0xb340a2;}function a56_0x21bd(){const _0x33071c=['8949591rVZEoD','8030QmibWy','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','2962149rGrRsK','1216365APgolY','Get\x20a\x20single\x20record\x20by\x20ID','419322OKxCID','8TZhnqr','41930gSAdBu','getOne','2wgpWGf','188MnAqqz','5230EZenla','8090739ZMaXpe'];a56_0x21bd=function(){return _0x33071c;};return a56_0x21bd();}
1
+ const a56_0x5c362e=a56_0x537b;(function(_0x5afa1c,_0x12b32f){const _0x5aff7a=a56_0x537b,_0x12dc83=_0x5afa1c();while(!![]){try{const _0x187dd3=parseInt(_0x5aff7a(0x1f3))/0x1+-parseInt(_0x5aff7a(0x1ed))/0x2+-parseInt(_0x5aff7a(0x1ef))/0x3*(parseInt(_0x5aff7a(0x1f0))/0x4)+-parseInt(_0x5aff7a(0x1ee))/0x5*(parseInt(_0x5aff7a(0x1e8))/0x6)+-parseInt(_0x5aff7a(0x1ec))/0x7*(-parseInt(_0x5aff7a(0x1f1))/0x8)+parseInt(_0x5aff7a(0x1e9))/0x9*(-parseInt(_0x5aff7a(0x1e5))/0xa)+parseInt(_0x5aff7a(0x1ea))/0xb*(parseInt(_0x5aff7a(0x1f2))/0xc);if(_0x187dd3===_0x12b32f)break;else _0x12dc83['push'](_0x12dc83['shift']());}catch(_0x2d0ab4){_0x12dc83['push'](_0x12dc83['shift']());}}}(a56_0x4142,0x9af62));function a56_0x537b(_0x42c03c,_0x200c37){_0x42c03c=_0x42c03c-0x1e5;const _0x414293=a56_0x4142();let _0x537b08=_0x414293[_0x42c03c];return _0x537b08;}import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x4142(){const _0x31d173=['132100TdsINC','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','Get\x20a\x20single\x20record\x20by\x20ID','2567004VgxtIL','99IQusBC','2732994Cwxljl','getOne','14ZMjFyS','531154TFeXSe','5UPNgXt','9ghlQXe','961648RAjaFL','2118712viuqnk','24uBSzAz','1168093wcjyyK'];a56_0x4142=function(){return _0x31d173;};return a56_0x4142();}export const dataGetOne=buildDataCommand({'command':a56_0x5c362e(0x1eb),'operation':a56_0x5c362e(0x1eb),'description':a56_0x5c362e(0x1e7),'paramsRequired':!![],'paramsHint':a56_0x5c362e(0x1e6)});
@@ -1 +1 @@
1
- (function(_0x3fa914,_0x227757){const _0x3bae35=a57_0x40b3,_0x4573a6=_0x3fa914();while(!![]){try{const _0x14cea4=-parseInt(_0x3bae35(0x1f7))/0x1*(-parseInt(_0x3bae35(0x1f6))/0x2)+-parseInt(_0x3bae35(0x1f5))/0x3*(-parseInt(_0x3bae35(0x1fa))/0x4)+-parseInt(_0x3bae35(0x1f3))/0x5*(parseInt(_0x3bae35(0x1f0))/0x6)+-parseInt(_0x3bae35(0x1f8))/0x7*(parseInt(_0x3bae35(0x1f4))/0x8)+parseInt(_0x3bae35(0x1f1))/0x9*(parseInt(_0x3bae35(0x1f9))/0xa)+parseInt(_0x3bae35(0x1f2))/0xb+-parseInt(_0x3bae35(0x1ef))/0xc;if(_0x14cea4===_0x227757)break;else _0x4573a6['push'](_0x4573a6['shift']());}catch(_0x1a074b){_0x4573a6['push'](_0x4573a6['shift']());}}}(a57_0x29ef,0xe4589));import{dataFilter}from'../../commands/data/filter.js';function a57_0x29ef(){const _0x30103d=['765rdmnZF','12186548MqIbUh','22735wyHgcz','13672hdbtpc','2097IGsgIN','1388AVKzSW','2247aRPECh','98dVhOTG','157190czEXqL','2608jTClYE','39652764vjJglz','258fAHBXn'];a57_0x29ef=function(){return _0x30103d;};return a57_0x29ef();}function a57_0x40b3(_0x3967a8,_0x3f6220){_0x3967a8=_0x3967a8-0x1ef;const _0x29efe9=a57_0x29ef();let _0x40b3e9=_0x29efe9[_0x3967a8];return _0x40b3e9;}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
1
+ (function(_0x104c80,_0x4e8b86){const _0x540875=a57_0xa58c,_0x400ea2=_0x104c80();while(!![]){try{const _0xd5d575=parseInt(_0x540875(0x7d))/0x1*(parseInt(_0x540875(0x82))/0x2)+parseInt(_0x540875(0x84))/0x3*(-parseInt(_0x540875(0x83))/0x4)+-parseInt(_0x540875(0x87))/0x5*(parseInt(_0x540875(0x81))/0x6)+parseInt(_0x540875(0x7e))/0x7*(parseInt(_0x540875(0x85))/0x8)+parseInt(_0x540875(0x80))/0x9+parseInt(_0x540875(0x86))/0xa*(parseInt(_0x540875(0x7c))/0xb)+-parseInt(_0x540875(0x7f))/0xc;if(_0xd5d575===_0x4e8b86)break;else _0x400ea2['push'](_0x400ea2['shift']());}catch(_0x3aee36){_0x400ea2['push'](_0x400ea2['shift']());}}}(a57_0x5824,0x4d7e4));import{dataFilter}from'../../commands/data/filter.js';function a57_0xa58c(_0x222e9e,_0x23604f){_0x222e9e=_0x222e9e-0x7c;const _0x58243c=a57_0x5824();let _0xa58ca4=_0x58243c[_0x222e9e];return _0xa58ca4;}import{dataGetOne}from'../../commands/data/getOne.js';function a57_0x5824(){const _0x383f92=['2zjRkhQ','522011HzWXnk','8466768aHBblP','3278448xxEHJp','30990DIeHTB','575998iiEijA','4AWEBJC','1103361VmNzBI','24dltapZ','10bbqQeR','335NhKfgk','6301119FRWkWW'];a57_0x5824=function(){return _0x383f92;};return a57_0x5824();}export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x949853,_0x21a0e6){const _0x273f78=a58_0x3d20,_0x361438=_0x949853();while(!![]){try{const _0x730360=parseInt(_0x273f78(0x94))/0x1*(-parseInt(_0x273f78(0x9b))/0x2)+-parseInt(_0x273f78(0x85))/0x3+parseInt(_0x273f78(0x9c))/0x4*(parseInt(_0x273f78(0x7c))/0x5)+-parseInt(_0x273f78(0x89))/0x6*(parseInt(_0x273f78(0x9d))/0x7)+-parseInt(_0x273f78(0x8b))/0x8*(-parseInt(_0x273f78(0x80))/0x9)+parseInt(_0x273f78(0x84))/0xa+parseInt(_0x273f78(0x96))/0xb*(parseInt(_0x273f78(0x9e))/0xc);if(_0x730360===_0x21a0e6)break;else _0x361438['push'](_0x361438['shift']());}catch(_0x17b072){_0x361438['push'](_0x361438['shift']());}}}(a58_0x2e19,0xd25d8));function a58_0x3d20(_0x39f148,_0x5f27c4){_0x39f148=_0x39f148-0x7c;const _0x2e193f=a58_0x2e19();let _0x3d2015=_0x2e193f[_0x39f148];return _0x3d2015;}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a58_0x2e19(){const _0x334587=['\x20completed\x20in\x20','read','6282uNUvME','84QqGoos','6213242LWzbzo','591684SECuLl','112745vsOwSV','operation','helpExtra','description','403569FpxVQk','compress','validation','code','208270WfUZLZ','1489809UfUbru','flagMissing','getOne','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','6iDcSjU','data\x20','24OLjPHs','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','paramsHint','command','now','data','alias','paramsRequired','str','223PxFXBS','string','517PvccyZ','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','params'];a58_0x2e19=function(){return _0x334587;};return a58_0x2e19();}import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x4d36db){const _0x1942dc=a58_0x3d20;if(!_0x4d36db)throw CliErrors['flagMissing'](_0x1942dc(0x98),_0x1942dc(0x8c));const _0x5652dc=_0x4d36db['id'];if(_0x5652dc===undefined||_0x5652dc===null||_0x5652dc==='')throw CliErrors[_0x1942dc(0x82)](_0x1942dc(0x88),_0x1942dc(0x97));}function parseCommandParams(_0x256f33){return parseJsonParams(_0x256f33)??{};}export function buildDataCommand(_0x572b7e){const _0xf05060=a58_0x3d20,_0x320cf0='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0xf05060(0x90),'command':_0x572b7e[_0xf05060(0x8e)],'description':_0x572b7e[_0xf05060(0x7f)],'risk':_0xf05060(0x9a),'defaultOutputFormat':_0xf05060(0x81),'helpExtra':_0x572b7e[_0xf05060(0x7e)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0xf05060(0x91),'type':_0xf05060(0x95),'description':_0x320cf0},{'name':'params','type':_0xf05060(0x95),'description':_0x572b7e[_0xf05060(0x8d)]}],async 'validate'(_0x17b110){const _0x543088=_0xf05060,_0x36d63e=_0x17b110[_0x543088(0x93)](_0x543088(0x98));if(_0x572b7e[_0x543088(0x92)]&&!_0x36d63e)throw CliErrors[_0x543088(0x86)](_0x543088(0x98),_0x572b7e['paramsHint']);const _0x4436b3=parseJsonParams(_0x36d63e);_0x572b7e['operation']===_0x543088(0x87)&&assertGetOneId(_0x4436b3);},async 'execute'(_0x5f0310){const _0x33bc8a=_0xf05060,_0xb4d0f=parseCommandParams(_0x5f0310[_0x33bc8a(0x93)]('params')),_0x5c3ee8=Date[_0x33bc8a(0x8f)](),_0x109a36=await executeDatasetDataOperation(_0x5f0310['appCode'],_0x5f0310['str'](_0x33bc8a(0x83)),_0x572b7e[_0x33bc8a(0x7d)],_0xb4d0f),_0x356a15=Date[_0x33bc8a(0x8f)]()-_0x5c3ee8;return{'ok':!![],'data':{'result':_0x109a36,'elapsed':_0x356a15},'message':_0x33bc8a(0x8a)+_0x572b7e[_0x33bc8a(0x8e)]+_0x33bc8a(0x99)+_0x356a15+'ms'};}};}
1
+ (function(_0x2e038c,_0x30abca){const _0x3d8b31=a58_0x127e,_0x4b7f73=_0x2e038c();while(!![]){try{const _0x415127=parseInt(_0x3d8b31(0x148))/0x1+-parseInt(_0x3d8b31(0x143))/0x2+parseInt(_0x3d8b31(0x145))/0x3*(-parseInt(_0x3d8b31(0x15e))/0x4)+parseInt(_0x3d8b31(0x140))/0x5+parseInt(_0x3d8b31(0x142))/0x6+parseInt(_0x3d8b31(0x152))/0x7+-parseInt(_0x3d8b31(0x14b))/0x8;if(_0x415127===_0x30abca)break;else _0x4b7f73['push'](_0x4b7f73['shift']());}catch(_0x8de033){_0x4b7f73['push'](_0x4b7f73['shift']());}}}(a58_0x292d,0xd8a98));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 a58_0x127e(_0xb0afa2,_0x99f12a){_0xb0afa2=_0xb0afa2-0x13e;const _0x292d68=a58_0x292d();let _0x127e0b=_0x292d68[_0xb0afa2];return _0x127e0b;}function a58_0x292d(){const _0x4c86fc=['Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','data','4569845yNqkZe','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','7708770MdAwcq','18722bruVHD','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','3swZtSU','description','read','1623897qnTpUE','alias','command','24067736tdVNqx','code','data\x20','flagMissing','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','getOne','paramsHint','11184418XztapP','string','str','now','compress','\x20completed\x20in\x20','appCode','paramsRequired','params','helpExtra','operation','validation','6060636RfDXEl'];a58_0x292d=function(){return _0x4c86fc;};return a58_0x292d();}function assertGetOneId(_0x3e5d59){const _0x2370b7=a58_0x127e;if(!_0x3e5d59)throw CliErrors[_0x2370b7(0x14e)](_0x2370b7(0x15a),_0x2370b7(0x14f));const _0x1e1aa7=_0x3e5d59['id'];if(_0x1e1aa7===undefined||_0x1e1aa7===null||_0x1e1aa7==='')throw CliErrors[_0x2370b7(0x15d)](_0x2370b7(0x144),_0x2370b7(0x141));}function parseCommandParams(_0x2ca8a5){return parseJsonParams(_0x2ca8a5)??{};}export function buildDataCommand(_0x7d3071){const _0x18ffa5=a58_0x127e,_0x389ab=_0x18ffa5(0x13e);return{'service':_0x18ffa5(0x13f),'command':_0x7d3071['command'],'description':_0x7d3071[_0x18ffa5(0x146)],'risk':_0x18ffa5(0x147),'defaultOutputFormat':_0x18ffa5(0x156),'helpExtra':_0x7d3071[_0x18ffa5(0x15b)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x18ffa5(0x149),'type':'string','description':_0x389ab},{'name':_0x18ffa5(0x15a),'type':_0x18ffa5(0x153),'description':_0x7d3071[_0x18ffa5(0x151)]}],async 'validate'(_0x4fc5bc){const _0xe0dd9=_0x18ffa5,_0x5b30c0=_0x4fc5bc[_0xe0dd9(0x154)](_0xe0dd9(0x15a));if(_0x7d3071[_0xe0dd9(0x159)]&&!_0x5b30c0)throw CliErrors[_0xe0dd9(0x14e)](_0xe0dd9(0x15a),_0x7d3071['paramsHint']);const _0x4dcd05=parseJsonParams(_0x5b30c0);_0x7d3071[_0xe0dd9(0x15c)]===_0xe0dd9(0x150)&&assertGetOneId(_0x4dcd05);},async 'execute'(_0x395ca7){const _0x1fb0c5=_0x18ffa5,_0x23fee6=parseCommandParams(_0x395ca7[_0x1fb0c5(0x154)](_0x1fb0c5(0x15a))),_0xd3df01=Date[_0x1fb0c5(0x155)](),_0x5252e1=await executeDatasetDataOperation(_0x395ca7[_0x1fb0c5(0x158)],_0x395ca7[_0x1fb0c5(0x154)](_0x1fb0c5(0x14c)),_0x7d3071[_0x1fb0c5(0x15c)],_0x23fee6),_0x52e034=Date[_0x1fb0c5(0x155)]()-_0xd3df01;return{'ok':!![],'data':{'result':_0x5252e1,'elapsed':_0x52e034},'message':_0x1fb0c5(0x14d)+_0x7d3071[_0x1fb0c5(0x14a)]+_0x1fb0c5(0x157)+_0x52e034+'ms'};}};}
@@ -1 +1 @@
1
- function a59_0x2c58(){const _0x298950=['code','apiError','extend','unchanged','write','toUpperCase','Update\x20business\x20model\x20group','str','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','130RoWPGQ','businessGroup','prototype','payload','1QwRWst','4807780BqExRY','DB_TABLE','83702ghPXjx','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','isFinite','call','keys','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','3948637ezTWyP','expect-business-group','8BHBimK','21IbqFVO','5679882iYZdrV','message','dataset','Expectation\x20mismatch\x20at\x20businessGroup','Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','parse','data','appCode','/smartapi/question/er-config/business-group/edit',',\x20actual\x20','trim','1595166DKcckx','number','stringify','found','modelId','validation','2191800QTvEOA','isArray','sourceType','expectBusinessGroup','update','POST','string','datasetId','matched','hasOwnProperty','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','object','Expected\x20','METADATA','business-group','76572OTHmIn'];a59_0x2c58=function(){return _0x298950;};return a59_0x2c58();}const a59_0x39161b=a59_0x4f71;(function(_0x77b791,_0x30564f){const _0x56f41f=a59_0x4f71,_0x496138=_0x77b791();while(!![]){try{const _0xb9b7eb=parseInt(_0x56f41f(0x1e1))/0x1*(parseInt(_0x56f41f(0x1e4))/0x2)+parseInt(_0x56f41f(0x1c4))/0x3+-parseInt(_0x56f41f(0x1d3))/0x4*(-parseInt(_0x56f41f(0x1dd))/0x5)+parseInt(_0x56f41f(0x1be))/0x6*(-parseInt(_0x56f41f(0x1b2))/0x7)+parseInt(_0x56f41f(0x1b1))/0x8*(-parseInt(_0x56f41f(0x1b3))/0x9)+parseInt(_0x56f41f(0x1e2))/0xa+parseInt(_0x56f41f(0x1af))/0xb;if(_0xb9b7eb===_0x30564f)break;else _0x496138['push'](_0x496138['shift']());}catch(_0x253a01){_0x496138['push'](_0x496138['shift']());}}}(a59_0x2c58,0xa6511));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_0x39161b(0x1bb);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3cfbda,input:_0xb40cd5,dryRun:_0x4ce254}){const _0x23aefd=a59_0x39161b;validateInput(_0xb40cd5);const _0x533b73=normalizeBusinessGroup(_0xb40cd5['businessGroup']),_0x3a74ca=await getDatasetDetail(_0xb40cd5[_0x23aefd(0x1d4)]),_0x1a0ee2=resolveBusinessGroupDataset(_0x3a74ca,_0xb40cd5[_0x23aefd(0x1d4)]),_0x1e93c0=loadCurrentBusinessGroup(_0x3a74ca,_0x1a0ee2);assertExpectedBusinessGroup(_0x1e93c0,_0xb40cd5[_0x23aefd(0x1c7)]);const _0x21ffa9=buildBackendPayload(_0x3cfbda,_0x1a0ee2,_0x533b73),_0x5b11e1=_0x1e93c0!==_0x533b73;let _0x29820d;if(_0x5b11e1&&!_0x4ce254){await updateErBusinessGroup(_0x21ffa9);const _0x5bb34b=await getDatasetDetail(_0x1a0ee2[_0x23aefd(0x1d4)]),_0x81058a=resolveBusinessGroupDataset(_0x5bb34b,_0x1a0ee2['code']),_0x32076a=loadCurrentBusinessGroup(_0x5bb34b,_0x81058a);if(_0x32076a!==_0x533b73)throw CliErrors[_0x23aefd(0x1d5)]('Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x23aefd(0x1d0)+JSON['stringify'](_0x533b73)+_0x23aefd(0x1bc)+JSON[_0x23aefd(0x1c0)](_0x32076a)+'.');_0x29820d={'verified':!![],'status':_0x23aefd(0x1cc),'afterReadback':{'businessGroup':_0x32076a}};}else!_0x5b11e1&&(_0x29820d={'verified':!![],'status':_0x23aefd(0x1d7),'afterReadback':{'businessGroup':_0x1e93c0}});const _0x1218a1={'operation':_0x23aefd(0x1c8),'appCode':_0x3cfbda,'selector':{'code':_0x1a0ee2['code']},'dataset':_0x1a0ee2,'before':{'businessGroup':_0x1e93c0},'after':{'businessGroup':_0x533b73},'changed':_0x5b11e1,'dryRun':_0x4ce254,'submitted':_0x5b11e1&&!_0x4ce254,'backend':{'method':_0x23aefd(0x1c9),'path':BACKEND_PATH,'payload':_0x21ffa9},..._0x29820d?{'verification':_0x29820d}:{},'warnings':[]};return{'ok':!![],'data':_0x1218a1,'message':_0x5b11e1?_0x4ce254?_0x23aefd(0x1e5)+_0x1a0ee2[_0x23aefd(0x1d4)]:'Updated\x20business\x20model\x20group\x20for\x20dataset\x20'+_0x1a0ee2[_0x23aefd(0x1d4)]:_0x23aefd(0x1dc)+_0x1a0ee2[_0x23aefd(0x1d4)]};}export const datasetBusinessGroupUpdate={'service':a59_0x39161b(0x1b5),'command':'business-group-update','description':a59_0x39161b(0x1da),'risk':a59_0x39161b(0x1d8),'flags':[CODE_FLAG,{'name':'business-group','type':a59_0x39161b(0x1ca),'required':!![],'description':'New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it'},{'name':'expect-business-group','type':'string','required':![],'description':a59_0x39161b(0x1ce)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x515245){validateInput(readBusinessGroupUpdateInput(_0x515245));},async 'dryRun'(_0xf61c56){const _0x331ee7=a59_0x39161b,_0x9310cf=await buildDatasetBusinessGroupUpdateResult({'appCode':_0xf61c56[_0x331ee7(0x1ba)],'input':readBusinessGroupUpdateInput(_0xf61c56),'dryRun':!![]});return{'method':_0x331ee7(0x1c9),'url':BACKEND_PATH,'body':_0x9310cf['data']['backend'][_0x331ee7(0x1e0)],'description':_0x9310cf[_0x331ee7(0x1b4)],..._0x9310cf[_0x331ee7(0x1b9)]};},async 'execute'(_0x1e364d){const _0x5d2b58=a59_0x39161b;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1e364d[_0x5d2b58(0x1ba)],'input':readBusinessGroupUpdateInput(_0x1e364d),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5a65e1){const _0x30cc07=a59_0x39161b,_0x25a3ae=_0x5a65e1[_0x30cc07(0x1db)](_0x30cc07(0x1b0));return{'code':trim(_0x5a65e1[_0x30cc07(0x1db)](_0x30cc07(0x1d4))),'businessGroup':_0x5a65e1[_0x30cc07(0x1db)](_0x30cc07(0x1d2)),'expectBusinessGroup':_0x25a3ae===undefined||_0x25a3ae===''?undefined:_0x25a3ae};}function validateInput(_0x12ea92){const _0x4fd53f=a59_0x39161b;if(!trim(_0x12ea92[_0x4fd53f(0x1d4)]))throw CliErrors[_0x4fd53f(0x1c3)]('--code\x20is\x20required');if(_0x12ea92['businessGroup']===undefined)throw CliErrors[_0x4fd53f(0x1c3)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x116b06,_0x26f83d){const _0x494198=a59_0x39161b,_0x4fb2f8=asPlainObject(_0x116b06[_0x494198(0x1b5)]),_0x30088c=asPlainObject(_0x116b06['dbtableConfig']),_0x22cf5b=resolveSourceType(_0x116b06,_0x4fb2f8,_0x30088c),_0x181dd2=firstString(_0x116b06['modelCode'],_0x116b06[_0x494198(0x1d4)],_0x4fb2f8['datasetCode'],_0x26f83d)||_0x26f83d;return{'id':firstNumber(_0x116b06[_0x494198(0x1c2)],_0x116b06['id'],_0x4fb2f8[_0x494198(0x1cb)])??firstString(_0x116b06[_0x494198(0x1c2)],_0x116b06['id'],_0x4fb2f8[_0x494198(0x1cb)])??null,'code':_0x181dd2,'name':firstString(_0x116b06['name'],_0x4fb2f8['datasetName'],_0x4fb2f8['name'])||null,'sourceType':_0x22cf5b};}function resolveSourceType(_0x31c03a,_0x555a2,_0x579108){const _0x2710dd=a59_0x39161b,_0x115da8=firstString(_0x31c03a['source'],_0x31c03a[_0x2710dd(0x1c6)],_0x555a2['source'],_0x555a2[_0x2710dd(0x1c6)])?.[_0x2710dd(0x1bd)]()[_0x2710dd(0x1d9)]();if(_0x115da8===_0x2710dd(0x1e3)||_0x115da8===_0x2710dd(0x1d1))return _0x115da8;if(Object[_0x2710dd(0x1e8)](_0x579108)['length']>0x0)return _0x2710dd(0x1e3);throw CliErrors[_0x2710dd(0x1c3)](_0x2710dd(0x1ae));}function loadCurrentBusinessGroup(_0x478722,_0xdab0bf){const _0x1b14a3=a59_0x39161b,_0xe55146=readBusinessGroupFromDatasetDetail(_0x478722,_0xdab0bf[_0x1b14a3(0x1c6)]);if(_0xe55146[_0x1b14a3(0x1c1)])return normalizeBusinessGroup(_0xe55146['value']);if(_0xdab0bf[_0x1b14a3(0x1c6)]===_0x1b14a3(0x1d1))return'';throw CliErrors[_0x1b14a3(0x1c3)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x1b14a3(0x1b7));}function readBusinessGroupFromDatasetDetail(_0x306578,_0x5538f5){const _0xcbe888=a59_0x39161b,_0x4593cd=asPlainObject(_0x306578[_0xcbe888(0x1b5)]),_0x155fb6=firstPresent(_0x306578['businessGroup']);if(_0x155fb6[_0xcbe888(0x1c1)])return _0x155fb6;const _0x3224c2=firstPresent(_0x4593cd['businessGroup']);if(_0x3224c2[_0xcbe888(0x1c1)])return _0x3224c2;if(_0x5538f5===_0xcbe888(0x1e3))return{'found':![]};const _0x4b7393=readBusinessGroupFromExtend(_0x306578[_0xcbe888(0x1d6)]);if(_0x4b7393[_0xcbe888(0x1c1)])return _0x4b7393;return readBusinessGroupFromExtend(_0x4593cd[_0xcbe888(0x1d6)]);}function readBusinessGroupFromExtend(_0x16ff32){const _0x47c5c7=a59_0x39161b;if(_0x16ff32===undefined||_0x16ff32===null||_0x16ff32==='')return{'found':![]};if(typeof _0x16ff32==='string')try{const _0x2ec23e=JSON[_0x47c5c7(0x1b8)](_0x16ff32);return readBusinessGroupFromExtend(_0x2ec23e);}catch{return{'found':![]};}const _0xe230de=asPlainObject(_0x16ff32);if(Object[_0x47c5c7(0x1df)][_0x47c5c7(0x1cd)][_0x47c5c7(0x1e7)](_0xe230de,'businessGroup'))return{'found':!![],'value':_0xe230de[_0x47c5c7(0x1de)]};return{'found':![]};}function firstPresent(..._0x25f284){for(const _0x40584f of _0x25f284){if(_0x40584f!==undefined&&_0x40584f!==null)return{'found':!![],'value':_0x40584f};}return{'found':![]};}function assertExpectedBusinessGroup(_0x151aaf,_0x27a9af){const _0x166c30=a59_0x39161b;if(_0x27a9af===undefined)return;const _0x358b48=normalizeBusinessGroup(_0x27a9af);if(_0x151aaf!==_0x358b48)throw CliErrors[_0x166c30(0x1c3)](_0x166c30(0x1b6),_0x166c30(0x1d0)+JSON[_0x166c30(0x1c0)](_0x358b48)+',\x20actual\x20'+JSON[_0x166c30(0x1c0)](_0x151aaf));}function buildBackendPayload(_0x11703b,_0x2115d7,_0x241c8f){const _0x453443=a59_0x39161b;return{'appCode':_0x11703b,'datasetCode':_0x2115d7[_0x453443(0x1d4)],'businessGroup':_0x241c8f};}function normalizeBusinessGroup(_0x2cf89b){if(_0x2cf89b===undefined||_0x2cf89b===null)return'';return String(_0x2cf89b)['trim']();}function a59_0x4f71(_0x3c16b9,_0x2c4f6b){_0x3c16b9=_0x3c16b9-0x1ae;const _0x2c58b3=a59_0x2c58();let _0x4f7179=_0x2c58b3[_0x3c16b9];return _0x4f7179;}function asPlainObject(_0x18a09f){const _0x1ab117=a59_0x39161b;if(!_0x18a09f||typeof _0x18a09f!==_0x1ab117(0x1cf)||Array[_0x1ab117(0x1c5)](_0x18a09f))return{};return _0x18a09f;}function firstString(..._0xb59ede){const _0x33195d=a59_0x39161b;for(const _0x5d0d06 of _0xb59ede){if(typeof _0x5d0d06===_0x33195d(0x1ca)&&_0x5d0d06[_0x33195d(0x1bd)]())return _0x5d0d06['trim']();if(typeof _0x5d0d06===_0x33195d(0x1bf)&&Number[_0x33195d(0x1e6)](_0x5d0d06))return String(_0x5d0d06);}return undefined;}function firstNumber(..._0x15142b){const _0x30427d=a59_0x39161b;for(const _0x5853c9 of _0x15142b){if(typeof _0x5853c9===_0x30427d(0x1bf)&&Number['isFinite'](_0x5853c9))return _0x5853c9;if(typeof _0x5853c9===_0x30427d(0x1ca)&&_0x5853c9[_0x30427d(0x1bd)]()&&Number[_0x30427d(0x1e6)](Number(_0x5853c9)))return Number(_0x5853c9);}return null;}function trim(_0x51e497){const _0x5ccaea=a59_0x39161b;return String(_0x51e497||'')[_0x5ccaea(0x1bd)]();}
1
+ const a59_0x541e58=a59_0x1bbf;(function(_0x5ad9c0,_0x232a10){const _0x258de7=a59_0x1bbf,_0xa27b87=_0x5ad9c0();while(!![]){try{const _0x11d1d0=-parseInt(_0x258de7(0x1ed))/0x1*(-parseInt(_0x258de7(0x1d9))/0x2)+parseInt(_0x258de7(0x1e4))/0x3*(-parseInt(_0x258de7(0x1f8))/0x4)+parseInt(_0x258de7(0x1cd))/0x5*(parseInt(_0x258de7(0x1e3))/0x6)+parseInt(_0x258de7(0x1f4))/0x7+-parseInt(_0x258de7(0x1d4))/0x8*(-parseInt(_0x258de7(0x1db))/0x9)+-parseInt(_0x258de7(0x1ce))/0xa+-parseInt(_0x258de7(0x1e5))/0xb;if(_0x11d1d0===_0x232a10)break;else _0xa27b87['push'](_0xa27b87['shift']());}catch(_0x50fa98){_0xa27b87['push'](_0xa27b87['shift']());}}}(a59_0xeaa4,0x45556));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_0x541e58(0x1c2);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x256f77,input:_0x5dba29,dryRun:_0x628e32}){const _0x10824b=a59_0x541e58;validateInput(_0x5dba29);const _0x255e03=normalizeBusinessGroup(_0x5dba29[_0x10824b(0x1c3)]),_0x4337ed=await getDatasetDetail(_0x5dba29[_0x10824b(0x1cf)]),_0x1da7bc=resolveBusinessGroupDataset(_0x4337ed,_0x5dba29['code']),_0x182d5c=loadCurrentBusinessGroup(_0x4337ed,_0x1da7bc);assertExpectedBusinessGroup(_0x182d5c,_0x5dba29[_0x10824b(0x1c4)]);const _0x3cfe3f=buildBackendPayload(_0x256f77,_0x1da7bc,_0x255e03),_0xb11ce0=_0x182d5c!==_0x255e03;let _0x175777;if(_0xb11ce0&&!_0x628e32){await updateErBusinessGroup(_0x3cfe3f);const _0x5bc85e=await getDatasetDetail(_0x1da7bc[_0x10824b(0x1cf)]),_0x462e4b=resolveBusinessGroupDataset(_0x5bc85e,_0x1da7bc[_0x10824b(0x1cf)]),_0x5cafe2=loadCurrentBusinessGroup(_0x5bc85e,_0x462e4b);if(_0x5cafe2!==_0x255e03)throw CliErrors[_0x10824b(0x1c7)](_0x10824b(0x1f2),_0x10824b(0x1c5)+JSON[_0x10824b(0x1e2)](_0x255e03)+',\x20actual\x20'+JSON[_0x10824b(0x1e2)](_0x5cafe2)+'.');_0x175777={'verified':!![],'status':_0x10824b(0x1c1),'afterReadback':{'businessGroup':_0x5cafe2}};}else!_0xb11ce0&&(_0x175777={'verified':!![],'status':_0x10824b(0x1e1),'afterReadback':{'businessGroup':_0x182d5c}});const _0xcd5e95={'operation':_0x10824b(0x1ea),'appCode':_0x256f77,'selector':{'code':_0x1da7bc[_0x10824b(0x1cf)]},'dataset':_0x1da7bc,'before':{'businessGroup':_0x182d5c},'after':{'businessGroup':_0x255e03},'changed':_0xb11ce0,'dryRun':_0x628e32,'submitted':_0xb11ce0&&!_0x628e32,'backend':{'method':_0x10824b(0x1be),'path':BACKEND_PATH,'payload':_0x3cfe3f},..._0x175777?{'verification':_0x175777}:{},'warnings':[]};return{'ok':!![],'data':_0xcd5e95,'message':_0xb11ce0?_0x628e32?_0x10824b(0x1d0)+_0x1da7bc[_0x10824b(0x1cf)]:'Updated\x20business\x20model\x20group\x20for\x20dataset\x20'+_0x1da7bc[_0x10824b(0x1cf)]:_0x10824b(0x1c6)+_0x1da7bc[_0x10824b(0x1cf)]};}export const datasetBusinessGroupUpdate={'service':a59_0x541e58(0x1f1),'command':a59_0x541e58(0x1d2),'description':'Update\x20business\x20model\x20group','risk':a59_0x541e58(0x1bc),'flags':[CODE_FLAG,{'name':'business-group','type':a59_0x541e58(0x1e6),'required':!![],'description':'New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it'},{'name':'expect-business-group','type':a59_0x541e58(0x1e6),'required':![],'description':a59_0x541e58(0x1ca)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3f8161){validateInput(readBusinessGroupUpdateInput(_0x3f8161));},async 'dryRun'(_0x4b4e52){const _0x2a05dd=a59_0x541e58,_0x4e7c8a=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4b4e52['appCode'],'input':readBusinessGroupUpdateInput(_0x4b4e52),'dryRun':!![]});return{'method':_0x2a05dd(0x1be),'url':BACKEND_PATH,'body':_0x4e7c8a['data']['backend'][_0x2a05dd(0x1da)],'description':_0x4e7c8a[_0x2a05dd(0x1c9)],..._0x4e7c8a[_0x2a05dd(0x1e9)]};},async 'execute'(_0x4fda73){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x4fda73['appCode'],'input':readBusinessGroupUpdateInput(_0x4fda73),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x23e9fd){const _0x484b4d=a59_0x541e58,_0x1dead3=_0x23e9fd[_0x484b4d(0x1bf)](_0x484b4d(0x1d5));return{'code':trim(_0x23e9fd[_0x484b4d(0x1bf)]('code')),'businessGroup':_0x23e9fd[_0x484b4d(0x1bf)](_0x484b4d(0x1f3)),'expectBusinessGroup':_0x1dead3===undefined||_0x1dead3===''?undefined:_0x1dead3};}function validateInput(_0x1fcd7f){const _0x1ccb03=a59_0x541e58;if(!trim(_0x1fcd7f['code']))throw CliErrors[_0x1ccb03(0x1e8)](_0x1ccb03(0x1ec));if(_0x1fcd7f[_0x1ccb03(0x1c3)]===undefined)throw CliErrors[_0x1ccb03(0x1e8)](_0x1ccb03(0x1cb));}function resolveBusinessGroupDataset(_0x37d51e,_0xcc5a23){const _0x51b0d0=a59_0x541e58,_0x221176=asPlainObject(_0x37d51e[_0x51b0d0(0x1f1)]),_0x22de1a=asPlainObject(_0x37d51e['dbtableConfig']),_0x4148d0=resolveSourceType(_0x37d51e,_0x221176,_0x22de1a),_0x182f2f=firstString(_0x37d51e[_0x51b0d0(0x1eb)],_0x37d51e['code'],_0x221176[_0x51b0d0(0x1d3)],_0xcc5a23)||_0xcc5a23;return{'id':firstNumber(_0x37d51e[_0x51b0d0(0x1ba)],_0x37d51e['id'],_0x221176[_0x51b0d0(0x1dc)])??firstString(_0x37d51e[_0x51b0d0(0x1ba)],_0x37d51e['id'],_0x221176['datasetId'])??null,'code':_0x182f2f,'name':firstString(_0x37d51e['name'],_0x221176[_0x51b0d0(0x1c0)],_0x221176[_0x51b0d0(0x1e7)])||null,'sourceType':_0x4148d0};}function resolveSourceType(_0x431d1e,_0x1d86eb,_0x306c84){const _0x41b5d4=a59_0x541e58,_0x3256ab=firstString(_0x431d1e[_0x41b5d4(0x1f7)],_0x431d1e[_0x41b5d4(0x1d7)],_0x1d86eb['source'],_0x1d86eb[_0x41b5d4(0x1d7)])?.[_0x41b5d4(0x1d1)]()[_0x41b5d4(0x1d8)]();if(_0x3256ab==='DB_TABLE'||_0x3256ab==='METADATA')return _0x3256ab;if(Object['keys'](_0x306c84)[_0x41b5d4(0x1f9)]>0x0)return _0x41b5d4(0x1df);throw CliErrors[_0x41b5d4(0x1e8)](_0x41b5d4(0x1ee));}function loadCurrentBusinessGroup(_0x52023b,_0x532a15){const _0x163a54=a59_0x541e58,_0x45dc44=readBusinessGroupFromDatasetDetail(_0x52023b,_0x532a15[_0x163a54(0x1d7)]);if(_0x45dc44['found'])return normalizeBusinessGroup(_0x45dc44['value']);if(_0x532a15['sourceType']==='METADATA')return'';throw CliErrors[_0x163a54(0x1e8)](_0x163a54(0x1d6),'Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x377f0d,_0x21ec94){const _0x2fe2ef=a59_0x541e58,_0x4c7fa5=asPlainObject(_0x377f0d[_0x2fe2ef(0x1f1)]),_0x5e048e=firstPresent(_0x377f0d[_0x2fe2ef(0x1c3)]);if(_0x5e048e[_0x2fe2ef(0x1cc)])return _0x5e048e;const _0x313901=firstPresent(_0x4c7fa5[_0x2fe2ef(0x1c3)]);if(_0x313901[_0x2fe2ef(0x1cc)])return _0x313901;if(_0x21ec94===_0x2fe2ef(0x1df))return{'found':![]};const _0x11db47=readBusinessGroupFromExtend(_0x377f0d[_0x2fe2ef(0x1c8)]);if(_0x11db47[_0x2fe2ef(0x1cc)])return _0x11db47;return readBusinessGroupFromExtend(_0x4c7fa5[_0x2fe2ef(0x1c8)]);}function readBusinessGroupFromExtend(_0x432165){const _0x5864d6=a59_0x541e58;if(_0x432165===undefined||_0x432165===null||_0x432165==='')return{'found':![]};if(typeof _0x432165===_0x5864d6(0x1e6))try{const _0x48de14=JSON[_0x5864d6(0x1bb)](_0x432165);return readBusinessGroupFromExtend(_0x48de14);}catch{return{'found':![]};}const _0x201b17=asPlainObject(_0x432165);if(Object[_0x5864d6(0x1f5)][_0x5864d6(0x1f6)]['call'](_0x201b17,_0x5864d6(0x1c3)))return{'found':!![],'value':_0x201b17['businessGroup']};return{'found':![]};}function a59_0xeaa4(){const _0xcf439f=['update','modelCode','--code\x20is\x20required','1HuMJZq','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','isFinite','object','dataset','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','business-group','3968391ppdkms','prototype','hasOwnProperty','source','4wvmCwW','length','modelId','parse','write','isArray','POST','str','datasetName','matched','/smartapi/question/er-config/business-group/edit','businessGroup','expectBusinessGroup','Expected\x20','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','apiError','extend','message','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','--business-group\x20is\x20required','found','5NpTaAg','3683260ZIsGxL','code','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','trim','business-group-update','datasetCode','24wQEMeH','expect-business-group','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','sourceType','toUpperCase','643362rejbHT','payload','1345833sOujgZ','datasetId','number',',\x20actual\x20','DB_TABLE','Expectation\x20mismatch\x20at\x20businessGroup','unchanged','stringify','2264964LWtUEN','110613lIRfeo','11280632TQVueS','string','name','validation','data'];a59_0xeaa4=function(){return _0xcf439f;};return a59_0xeaa4();}function a59_0x1bbf(_0x3a6d9b,_0x382cb5){_0x3a6d9b=_0x3a6d9b-0x1ba;const _0xeaa4cb=a59_0xeaa4();let _0x1bbf10=_0xeaa4cb[_0x3a6d9b];return _0x1bbf10;}function firstPresent(..._0x56f524){for(const _0x228c11 of _0x56f524){if(_0x228c11!==undefined&&_0x228c11!==null)return{'found':!![],'value':_0x228c11};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1dde3f,_0x226816){const _0x45fc31=a59_0x541e58;if(_0x226816===undefined)return;const _0x4f5d93=normalizeBusinessGroup(_0x226816);if(_0x1dde3f!==_0x4f5d93)throw CliErrors[_0x45fc31(0x1e8)](_0x45fc31(0x1e0),'Expected\x20'+JSON['stringify'](_0x4f5d93)+_0x45fc31(0x1de)+JSON['stringify'](_0x1dde3f));}function buildBackendPayload(_0x30dfbd,_0x50a54e,_0x2b6564){const _0x43c52e=a59_0x541e58;return{'appCode':_0x30dfbd,'datasetCode':_0x50a54e[_0x43c52e(0x1cf)],'businessGroup':_0x2b6564};}function normalizeBusinessGroup(_0x1fb5db){const _0x32b924=a59_0x541e58;if(_0x1fb5db===undefined||_0x1fb5db===null)return'';return String(_0x1fb5db)[_0x32b924(0x1d1)]();}function asPlainObject(_0x4a1e0a){const _0x4a8031=a59_0x541e58;if(!_0x4a1e0a||typeof _0x4a1e0a!==_0x4a8031(0x1f0)||Array[_0x4a8031(0x1bd)](_0x4a1e0a))return{};return _0x4a1e0a;}function firstString(..._0x2ab6ef){const _0x23a792=a59_0x541e58;for(const _0x19a6f6 of _0x2ab6ef){if(typeof _0x19a6f6===_0x23a792(0x1e6)&&_0x19a6f6[_0x23a792(0x1d1)]())return _0x19a6f6[_0x23a792(0x1d1)]();if(typeof _0x19a6f6===_0x23a792(0x1dd)&&Number[_0x23a792(0x1ef)](_0x19a6f6))return String(_0x19a6f6);}return undefined;}function firstNumber(..._0x2b4c20){const _0x3450a6=a59_0x541e58;for(const _0x239959 of _0x2b4c20){if(typeof _0x239959===_0x3450a6(0x1dd)&&Number[_0x3450a6(0x1ef)](_0x239959))return _0x239959;if(typeof _0x239959===_0x3450a6(0x1e6)&&_0x239959[_0x3450a6(0x1d1)]()&&Number['isFinite'](Number(_0x239959)))return Number(_0x239959);}return null;}function trim(_0x587ccf){const _0x3110ed=a59_0x541e58;return String(_0x587ccf||'')[_0x3110ed(0x1d1)]();}
@@ -1 +1 @@
1
- const a60_0x282067=a60_0x2ae7;(function(_0x66887f,_0x36caac){const _0x3cf9ab=a60_0x2ae7,_0x4a500e=_0x66887f();while(!![]){try{const _0xf02b70=-parseInt(_0x3cf9ab(0x1d7))/0x1*(parseInt(_0x3cf9ab(0x1dd))/0x2)+-parseInt(_0x3cf9ab(0x1d3))/0x3*(parseInt(_0x3cf9ab(0x1da))/0x4)+parseInt(_0x3cf9ab(0x1e2))/0x5*(parseInt(_0x3cf9ab(0x1d8))/0x6)+parseInt(_0x3cf9ab(0x1e5))/0x7*(-parseInt(_0x3cf9ab(0x1db))/0x8)+parseInt(_0x3cf9ab(0x1df))/0x9+parseInt(_0x3cf9ab(0x1d0))/0xa+parseInt(_0x3cf9ab(0x1cf))/0xb;if(_0xf02b70===_0x36caac)break;else _0x4a500e['push'](_0x4a500e['shift']());}catch(_0x42a164){_0x4a500e['push'](_0x4a500e['shift']());}}}(a60_0x55b8,0xb326e));function a60_0x55b8(){const _0x1be8e5=['dataset','3909ateRXO','source','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','lovrabet','458324mzDCgw','937956pSpdsV','\x20的\x20DB_TABLE\x20数据源上下文。','4016dvfWEA','10088gvkrrL','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','2EZNfRQ','name','6354990IytvRi','filter','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','35TWTZxK','object','sourceType','3766AMbRRp','validation','trim','join','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','dbtable','datasetName','datasetCode','toUpperCase','getOne','当前数据集\x20\x22','SQL\x20schema\x20validation','tableName','9326537MDRpat','5305010LrCnAg','unknown'];a60_0x55b8=function(){return _0x1be8e5;};return a60_0x55b8();}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x282067(0x1d6),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a60_0x282067(0x1d5)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x282067(0x1e1);function valueToString(_0x49658e){const _0x3fae68=a60_0x282067;return _0x49658e==null?'':String(_0x49658e)[_0x3fae68(0x1e7)]();}function getDatasetCode(_0x5a2c9c){const _0xc977d9=a60_0x282067;return valueToString(_0x5a2c9c['code']??_0x5a2c9c['modelCode']??_0x5a2c9c[_0xc977d9(0x1d2)]?.[_0xc977d9(0x1ec)]);}function getDatasetName(_0x3bd97b){const _0x5f3b39=a60_0x282067;return valueToString(_0x3bd97b[_0x5f3b39(0x1de)]??_0x3bd97b[_0x5f3b39(0x1d2)]?.[_0x5f3b39(0x1eb)])||_0x5f3b39(0x1d1);}function getDatasetSource(_0x390651){const _0x1704ba=a60_0x282067;return valueToString(_0x390651[_0x1704ba(0x1d4)]??_0x390651[_0x1704ba(0x1d2)]?.[_0x1704ba(0x1e4)])[_0x1704ba(0x1ed)]();}function getDbtableConfig(_0x5e0de0){const _0x5544db=a60_0x282067,_0x210ab2=_0x5e0de0['dbtableConfig']??_0x5e0de0[_0x5544db(0x1ea)];return _0x210ab2&&typeof _0x210ab2===_0x5544db(0x1e3)?_0x210ab2:{};}function a60_0x2ae7(_0x4114b2,_0x573a6d){_0x4114b2=_0x4114b2-0x1cd;const _0x55b8d4=a60_0x55b8();let _0x2ae7a5=_0x55b8d4[_0x4114b2];return _0x2ae7a5;}export function isDbTableBackedDataset(_0x51c478){const _0x3b540a=a60_0x282067,_0x41a0b6=getDatasetSource(_0x51c478);if(_0x41a0b6==='METADATA')return![];const _0x1926c0=getDbtableConfig(_0x51c478),_0x428151=_0x1926c0['dbId']??_0x1926c0['id'],_0x289ae5=valueToString(_0x1926c0[_0x3b540a(0x1ce)]??_0x51c478['tableName']??_0x51c478[_0x3b540a(0x1d2)]?.['tableName']);return _0x428151!==undefined&&_0x428151!==null&&_0x289ae5['length']>0x0;}export function filterDbTableBackedDatasets(_0x88d665){const _0x1726b=a60_0x282067;return _0x88d665[_0x1726b(0x1e0)](_0x572770=>isDbTableBackedDataset(_0x572770));}export function buildDbTableBackedRequirementMessage(_0x1a9870,_0x2dddb9=a60_0x282067(0x1cd)){const _0x416483=a60_0x282067,_0x564792=getDatasetSource(_0x1a9870)||'UNKNOWN',_0x2b9302=getDatasetName(_0x1a9870),_0x23e6d5=getDatasetCode(_0x1a9870),_0x39ed90=_0x23e6d5?'\x20('+_0x23e6d5+')':'';return[_0x416483(0x1ef)+_0x2b9302+'\x22'+_0x39ed90+'\x20是\x20'+_0x564792+'\x20类型,没有可用于\x20'+_0x2dddb9+_0x416483(0x1d9),_0x416483(0x1e9),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x416483(0x1dc)+RUNTIME_DATA_ACCESS_COMMANDS[_0x416483(0x1e0)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x416483(0x1ee)]+'。'][_0x416483(0x1e8)]('\x20');}export function assertDatasetIsDbTableBacked(_0x2096ea,_0x4cba49){const _0x103d61=a60_0x282067;if(!isDbTableBackedDataset(_0x2096ea))throw CliErrors[_0x103d61(0x1e6)](buildDbTableBackedRequirementMessage(_0x2096ea,_0x4cba49));}
1
+ const a60_0x4b2d17=a60_0x4203;(function(_0x1fed50,_0x5dd4c3){const _0x5d97d0=a60_0x4203,_0x2a3849=_0x1fed50();while(!![]){try{const _0xe278b9=parseInt(_0x5d97d0(0x8b))/0x1+parseInt(_0x5d97d0(0x82))/0x2*(parseInt(_0x5d97d0(0x88))/0x3)+-parseInt(_0x5d97d0(0x99))/0x4+-parseInt(_0x5d97d0(0x9d))/0x5*(parseInt(_0x5d97d0(0x87))/0x6)+-parseInt(_0x5d97d0(0x8a))/0x7*(-parseInt(_0x5d97d0(0x83))/0x8)+-parseInt(_0x5d97d0(0x95))/0x9*(parseInt(_0x5d97d0(0x8c))/0xa)+-parseInt(_0x5d97d0(0x8e))/0xb*(-parseInt(_0x5d97d0(0x96))/0xc);if(_0xe278b9===_0x5dd4c3)break;else _0x2a3849['push'](_0x2a3849['shift']());}catch(_0x58ae4c){_0x2a3849['push'](_0x2a3849['shift']());}}}(a60_0x1912,0x89412));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a60_0x4b2d17(0x9a),'getOne':a60_0x4b2d17(0xa5)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x4b2d17(0x9f);function valueToString(_0x3c2612){const _0x54b208=a60_0x4b2d17;return _0x3c2612==null?'':String(_0x3c2612)[_0x54b208(0x85)]();}function getDatasetCode(_0x318da8){const _0x5d5a48=a60_0x4b2d17;return valueToString(_0x318da8[_0x5d5a48(0x9e)]??_0x318da8[_0x5d5a48(0x9b)]??_0x318da8[_0x5d5a48(0x93)]?.[_0x5d5a48(0x7d)]);}function getDatasetName(_0x3ccf10){const _0x5222af=a60_0x4b2d17;return valueToString(_0x3ccf10[_0x5222af(0x7e)]??_0x3ccf10[_0x5222af(0x93)]?.[_0x5222af(0x92)])||'unknown';}function getDatasetSource(_0x1cee8e){const _0x2dcc03=a60_0x4b2d17;return valueToString(_0x1cee8e[_0x2dcc03(0xa0)]??_0x1cee8e['dataset']?.[_0x2dcc03(0xa4)])[_0x2dcc03(0x89)]();}function getDbtableConfig(_0x252b84){const _0x34c8ae=a60_0x4b2d17,_0x47cccb=_0x252b84[_0x34c8ae(0x91)]??_0x252b84[_0x34c8ae(0xa3)];return _0x47cccb&&typeof _0x47cccb==='object'?_0x47cccb:{};}function a60_0x1912(){const _0x399ca0=['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','modelCode','validation','20MfuRLN','code','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','source','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','dbtable','sourceType','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','join','datasetCode','name','getOne','\x20是\x20','UNKNOWN','204UiUcBU','48VtiqIo','\x20类型,没有可用于\x20','trim','dbId','800592ukThyJ','21834MGUANP','toUpperCase','315224XCLygv','263372GhXrca','17370gvUHoD','\x20的\x20DB_TABLE\x20数据源上下文。','88GNyzDT','METADATA','tableName','dbtableConfig','datasetName','dataset','filter','3267yxnyNh','1694892vBziUZ','length','SQL\x20schema\x20validation','2717580lbPcSC'];a60_0x1912=function(){return _0x399ca0;};return a60_0x1912();}function a60_0x4203(_0xb699aa,_0x192679){_0xb699aa=_0xb699aa-0x7c;const _0x191223=a60_0x1912();let _0x4203e6=_0x191223[_0xb699aa];return _0x4203e6;}export function isDbTableBackedDataset(_0x26d4b6){const _0x4421a6=a60_0x4b2d17,_0x1d37de=getDatasetSource(_0x26d4b6);if(_0x1d37de===_0x4421a6(0x8f))return![];const _0x181353=getDbtableConfig(_0x26d4b6),_0x5a9d1d=_0x181353[_0x4421a6(0x86)]??_0x181353['id'],_0x3047bb=valueToString(_0x181353['tableName']??_0x26d4b6['tableName']??_0x26d4b6[_0x4421a6(0x93)]?.[_0x4421a6(0x90)]);return _0x5a9d1d!==undefined&&_0x5a9d1d!==null&&_0x3047bb[_0x4421a6(0x97)]>0x0;}export function filterDbTableBackedDatasets(_0x4acca8){const _0x2aafe0=a60_0x4b2d17;return _0x4acca8[_0x2aafe0(0x94)](_0xedad1f=>isDbTableBackedDataset(_0xedad1f));}export function buildDbTableBackedRequirementMessage(_0x17cbb1,_0x445cb8=a60_0x4b2d17(0x98)){const _0x2b7cb9=a60_0x4b2d17,_0x144cab=getDatasetSource(_0x17cbb1)||_0x2b7cb9(0x81),_0x5196d2=getDatasetName(_0x17cbb1),_0x16660b=getDatasetCode(_0x17cbb1),_0x74f9f1=_0x16660b?'\x20('+_0x16660b+')':'';return['当前数据集\x20\x22'+_0x5196d2+'\x22'+_0x74f9f1+_0x2b7cb9(0x80)+_0x144cab+_0x2b7cb9(0x84)+_0x445cb8+_0x2b7cb9(0x8d),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0x2b7cb9(0xa2),_0x2b7cb9(0xa1)+RUNTIME_DATA_ACCESS_COMMANDS[_0x2b7cb9(0x94)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x2b7cb9(0x7f)]+'。'][_0x2b7cb9(0x7c)]('\x20');}export function assertDatasetIsDbTableBacked(_0x1aba19,_0x3f23fb){const _0x236879=a60_0x4b2d17;if(!isDbTableBackedDataset(_0x1aba19))throw CliErrors[_0x236879(0x9c)](buildDbTableBackedRequirementMessage(_0x1aba19,_0x3f23fb));}
@@ -1 +1 @@
1
- const a61_0x5def29=a61_0x2b01;function a61_0x2b01(_0x55f8ec,_0x14dc1c){_0x55f8ec=_0x55f8ec-0x79;const _0x133581=a61_0x1335();let _0x2b0198=_0x133581[_0x55f8ec];return _0x2b0198;}(function(_0x1925ae,_0x104b69){const _0xbbc46a=a61_0x2b01,_0x525b6f=_0x1925ae();while(!![]){try{const _0x1c9220=-parseInt(_0xbbc46a(0x9a))/0x1*(-parseInt(_0xbbc46a(0x95))/0x2)+parseInt(_0xbbc46a(0x87))/0x3*(parseInt(_0xbbc46a(0xaa))/0x4)+parseInt(_0xbbc46a(0x8a))/0x5*(parseInt(_0xbbc46a(0x91))/0x6)+-parseInt(_0xbbc46a(0x7f))/0x7*(-parseInt(_0xbbc46a(0xa5))/0x8)+parseInt(_0xbbc46a(0x93))/0x9*(-parseInt(_0xbbc46a(0x7c))/0xa)+-parseInt(_0xbbc46a(0x7b))/0xb*(-parseInt(_0xbbc46a(0xa9))/0xc)+-parseInt(_0xbbc46a(0x99))/0xd;if(_0x1c9220===_0x104b69)break;else _0x525b6f['push'](_0x525b6f['shift']());}catch(_0x2fe738){_0x525b6f['push'](_0x525b6f['shift']());}}}(a61_0x1335,0xdddd1));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x1335(){const _0x3959f8=['135545OdIDrt','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','push','No\x20undeleted\x20dataset\x20found\x20for\x20','description','\x20failed','bool','78UpHLCI','/smartapi/dataset/delete-dataset','144vCGgje','expected-count','2134142fPabcT','Required\x20to\x20execute\x20dataset\x20deletion','relationPages','dbId','45533397FTQhSh','1SdqMiE','dbName','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbid','validation','boolean','id=','dbtableConfig','str','length','filter','301480ncLVlM','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','dataset','876frtCWv','15212FYAoqt','source','Deleted\x20','code','2717qoRIcd','91940qxzWeC','num','tableName','259gVGYve','dbid=','isArray','name','appCode','\x20dataset(s);\x20','POST','Dataset\x20id','1362bOLxDf','number','--confirm\x20is\x20required\x20to\x20delete\x20datasets.'];a61_0x1335=function(){return _0x3959f8;};return a61_0x1335();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x5def29(0x88),'description':a61_0x5def29(0x86)},DBID_FLAG={'name':a61_0x5def29(0x9d),'type':a61_0x5def29(0x88),'description':a61_0x5def29(0x9c)},CONFIRM_FLAG={'name':'confirm','type':a61_0x5def29(0x9f),'description':a61_0x5def29(0x96)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a61_0x5def29(0x88),'description':a61_0x5def29(0xa7)};export const datasetDelete={'service':a61_0x5def29(0xa8),'command':'delete','description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x50334b){const _0x320fed=a61_0x5def29,_0xb6db5c=_0x50334b[_0x320fed(0x7d)]('id'),_0x58241d=_0x50334b[_0x320fed(0xa2)](_0x320fed(0x7a)),_0x560ab7=_0x50334b[_0x320fed(0x7d)](_0x320fed(0x9d)),_0x1b98b0=[_0xb6db5c>0x0,Boolean(_0x58241d),_0x560ab7>0x0][_0x320fed(0xa4)](Boolean);if(_0x1b98b0[_0x320fed(0xa3)]===0x0)throw CliErrors[_0x320fed(0x9e)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x1b98b0[_0x320fed(0xa3)]>0x1)throw CliErrors[_0x320fed(0x9e)](_0x320fed(0x8b));},async 'dryRun'(_0x45bc12){const _0xbfeb17=a61_0x5def29,_0x1ba5e1=await resolveTargets(_0x45bc12);return{'method':_0xbfeb17(0x85),'url':_0xbfeb17(0x92),'body':{'appCode':_0x45bc12[_0xbfeb17(0x83)],'count':_0x1ba5e1[_0xbfeb17(0xa3)],'datasets':_0x1ba5e1},'description':'Would\x20delete\x20'+_0x1ba5e1['length']+'\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.'};},async 'execute'(_0x56318a){const _0x114151=a61_0x5def29;if(!_0x56318a[_0x114151(0x90)]('confirm'))throw CliErrors[_0x114151(0x9e)](_0x114151(0x89),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x51145d=await resolveTargets(_0x56318a),_0x5a218a=[],_0x3e4946=[];for(const _0x2ae620 of _0x51145d){try{await deleteDataset(_0x56318a[_0x114151(0x83)],_0x2ae620['id']),_0x5a218a[_0x114151(0x8c)](_0x2ae620);}catch(_0x1387d3){_0x3e4946[_0x114151(0x8c)]({..._0x2ae620,'error':_0x1387d3 instanceof Error?_0x1387d3['message']:String(_0x1387d3)});}}if(_0x3e4946[_0x114151(0xa3)]>0x0)return{'ok':![],'data':{'requested':_0x51145d[_0x114151(0xa3)],'deletedCount':_0x5a218a[_0x114151(0xa3)],'failedCount':_0x3e4946[_0x114151(0xa3)],'deleted':_0x5a218a,'failed':_0x3e4946},'message':'Deleted\x20'+_0x5a218a[_0x114151(0xa3)]+'/'+_0x51145d['length']+_0x114151(0x84)+_0x3e4946[_0x114151(0xa3)]+_0x114151(0x8f)};return{'ok':!![],'data':{'requested':_0x51145d[_0x114151(0xa3)],'deletedCount':_0x5a218a[_0x114151(0xa3)],'deleted':_0x5a218a},'message':_0x114151(0x79)+_0x5a218a[_0x114151(0xa3)]+'\x20dataset(s)'};}};async function resolveTargets(_0x4be9e3){const _0x2ce90e=a61_0x5def29,_0x57de40=_0x4be9e3[_0x2ce90e(0x7d)]('id'),_0x1b4f7b=_0x4be9e3[_0x2ce90e(0xa2)](_0x2ce90e(0x7a)),_0x25d241=_0x4be9e3[_0x2ce90e(0x7d)](_0x2ce90e(0x9d));let _0x1fa758;_0x1b4f7b?(_0x1fa758=await listDatasets(_0x4be9e3[_0x2ce90e(0x83)],{'code':_0x1b4f7b}),_0x1fa758=_0x1fa758[_0x2ce90e(0xa4)](_0x482e5c=>_0x482e5c[_0x2ce90e(0x7a)]===_0x1b4f7b)):(_0x1fa758=await listDatasets(_0x4be9e3[_0x2ce90e(0x83)]),_0x57de40>0x0&&(_0x1fa758=_0x1fa758['filter'](_0x43eca4=>_0x43eca4['id']===_0x57de40)),_0x25d241>0x0&&(_0x1fa758=_0x1fa758['filter'](_0x3a58b8=>_0x3a58b8[_0x2ce90e(0xa1)]?.[_0x2ce90e(0x98)]===_0x25d241)));const _0x18aeb1=_0x1fa758['map'](normalizeTarget);if(_0x18aeb1[_0x2ce90e(0xa3)]===0x0){const _0x975cc4=_0x1b4f7b||(_0x57de40>0x0?_0x2ce90e(0xa0)+_0x57de40:_0x2ce90e(0x80)+_0x25d241);throw CliErrors[_0x2ce90e(0x9e)](_0x2ce90e(0x8d)+_0x975cc4+'.');}const _0x1dd85c=_0x4be9e3[_0x2ce90e(0x7d)](_0x2ce90e(0x94));if(_0x1dd85c>0x0&&_0x18aeb1[_0x2ce90e(0xa3)]!==_0x1dd85c)throw CliErrors[_0x2ce90e(0x9e)]('Matched\x20'+_0x18aeb1[_0x2ce90e(0xa3)]+_0x2ce90e(0xa6)+_0x1dd85c+'.');return _0x18aeb1;}function normalizeTarget(_0x23efd0){const _0x39b94f=a61_0x5def29,_0xb7db5c=_0x23efd0[_0x39b94f(0xa1)]??{};return{'id':_0x23efd0['id'],'code':_0x23efd0[_0x39b94f(0x7a)],'name':_0x23efd0[_0x39b94f(0x82)],'description':_0x23efd0[_0x39b94f(0x8e)],'source':_0x23efd0[_0x39b94f(0xab)],'dbId':_0xb7db5c[_0x39b94f(0x98)],'dbName':_0xb7db5c[_0x39b94f(0x9b)],'tableName':_0xb7db5c[_0x39b94f(0x7e)],'relatedPageCount':Array[_0x39b94f(0x81)](_0x23efd0['relationPages'])?_0x23efd0[_0x39b94f(0x97)][_0x39b94f(0xa3)]:undefined};}
1
+ const a61_0x5018e3=a61_0x15d4;(function(_0x6a195c,_0x285226){const _0x4dc5bc=a61_0x15d4,_0x55920a=_0x6a195c();while(!![]){try{const _0x4f468b=-parseInt(_0x4dc5bc(0x1e8))/0x1+parseInt(_0x4dc5bc(0x200))/0x2+-parseInt(_0x4dc5bc(0x1fc))/0x3+-parseInt(_0x4dc5bc(0x1e3))/0x4*(-parseInt(_0x4dc5bc(0x1eb))/0x5)+parseInt(_0x4dc5bc(0x1e2))/0x6*(-parseInt(_0x4dc5bc(0x1d9))/0x7)+-parseInt(_0x4dc5bc(0x1f4))/0x8*(parseInt(_0x4dc5bc(0x1ea))/0x9)+parseInt(_0x4dc5bc(0x1d6))/0xa*(parseInt(_0x4dc5bc(0x1ec))/0xb);if(_0x4f468b===_0x285226)break;else _0x55920a['push'](_0x55920a['shift']());}catch(_0x411a23){_0x55920a['push'](_0x55920a['shift']());}}}(a61_0x4c0c,0x40d5e));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x5018e3(0x1de),'description':a61_0x5018e3(0x1f3)},DBID_FLAG={'name':a61_0x5018e3(0x1ee),'type':a61_0x5018e3(0x1de),'description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':a61_0x5018e3(0x1f1),'type':a61_0x5018e3(0x1df),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a61_0x5018e3(0x1f8),'type':'number','description':a61_0x5018e3(0x1e1)};function a61_0x4c0c(){const _0x5020d1=['push','tableName','expected-count','name','filter','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','98805zjUAYH','dataset','num','appCode','1058900tomtkC','validation','Would\x20delete\x20','id=','relationPages','message','Matched\x20','No\x20undeleted\x20dataset\x20found\x20for\x20','str','6058370hZxqMQ','code','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','21EHwBTJ','description','length','high-risk-write','\x20failed','number','boolean','/smartapi/dataset/delete-dataset','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','243792fcpNEF','477628yeyWhg','bool','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','isArray','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','520209HmXSwO','dbtableConfig','2484cAXZyP','5wrwxzu','11hTYGwg','map','dbid','dbId','Deleted\x20','confirm','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','Dataset\x20id','9104iDddJl','dbName'];a61_0x4c0c=function(){return _0x5020d1;};return a61_0x4c0c();}function a61_0x15d4(_0x2d6bf8,_0x1352d3){_0x2d6bf8=_0x2d6bf8-0x1d5;const _0x4c0c41=a61_0x4c0c();let _0x15d4f4=_0x4c0c41[_0x2d6bf8];return _0x15d4f4;}export const datasetDelete={'service':a61_0x5018e3(0x1fd),'command':'delete','description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a61_0x5018e3(0x1dc),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x410537){const _0x4cfce3=a61_0x5018e3,_0x3b0516=_0x410537[_0x4cfce3(0x1fe)]('id'),_0x467ab5=_0x410537['str'](_0x4cfce3(0x1d7)),_0x30cf2b=_0x410537['num'](_0x4cfce3(0x1ee)),_0x48aaf6=[_0x3b0516>0x0,Boolean(_0x467ab5),_0x30cf2b>0x0][_0x4cfce3(0x1fa)](Boolean);if(_0x48aaf6[_0x4cfce3(0x1db)]===0x0)throw CliErrors[_0x4cfce3(0x201)](_0x4cfce3(0x1e7));if(_0x48aaf6[_0x4cfce3(0x1db)]>0x1)throw CliErrors[_0x4cfce3(0x201)](_0x4cfce3(0x1d8));},async 'dryRun'(_0x35e5fc){const _0x2a72b1=a61_0x5018e3,_0x1eadbf=await resolveTargets(_0x35e5fc);return{'method':'POST','url':_0x2a72b1(0x1e0),'body':{'appCode':_0x35e5fc[_0x2a72b1(0x1ff)],'count':_0x1eadbf[_0x2a72b1(0x1db)],'datasets':_0x1eadbf},'description':_0x2a72b1(0x202)+_0x1eadbf[_0x2a72b1(0x1db)]+_0x2a72b1(0x1f2)};},async 'execute'(_0x54d4d9){const _0x3272dc=a61_0x5018e3;if(!_0x54d4d9[_0x3272dc(0x1e4)](_0x3272dc(0x1f1)))throw CliErrors[_0x3272dc(0x201)](_0x3272dc(0x1fb),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x4dff9e=await resolveTargets(_0x54d4d9),_0x393868=[],_0x5094f=[];for(const _0x3834f2 of _0x4dff9e){try{await deleteDataset(_0x54d4d9['appCode'],_0x3834f2['id']),_0x393868['push'](_0x3834f2);}catch(_0x18d6e3){_0x5094f[_0x3272dc(0x1f6)]({..._0x3834f2,'error':_0x18d6e3 instanceof Error?_0x18d6e3[_0x3272dc(0x205)]:String(_0x18d6e3)});}}if(_0x5094f[_0x3272dc(0x1db)]>0x0)return{'ok':![],'data':{'requested':_0x4dff9e['length'],'deletedCount':_0x393868['length'],'failedCount':_0x5094f[_0x3272dc(0x1db)],'deleted':_0x393868,'failed':_0x5094f},'message':_0x3272dc(0x1f0)+_0x393868['length']+'/'+_0x4dff9e[_0x3272dc(0x1db)]+'\x20dataset(s);\x20'+_0x5094f[_0x3272dc(0x1db)]+_0x3272dc(0x1dd)};return{'ok':!![],'data':{'requested':_0x4dff9e[_0x3272dc(0x1db)],'deletedCount':_0x393868[_0x3272dc(0x1db)],'deleted':_0x393868},'message':_0x3272dc(0x1f0)+_0x393868[_0x3272dc(0x1db)]+'\x20dataset(s)'};}};async function resolveTargets(_0x1a4d7a){const _0xea1745=a61_0x5018e3,_0x58b0c8=_0x1a4d7a['num']('id'),_0x1f00e1=_0x1a4d7a[_0xea1745(0x1d5)](_0xea1745(0x1d7)),_0x81e586=_0x1a4d7a[_0xea1745(0x1fe)](_0xea1745(0x1ee));let _0x2632bf;_0x1f00e1?(_0x2632bf=await listDatasets(_0x1a4d7a[_0xea1745(0x1ff)],{'code':_0x1f00e1}),_0x2632bf=_0x2632bf[_0xea1745(0x1fa)](_0x3b8ed5=>_0x3b8ed5['code']===_0x1f00e1)):(_0x2632bf=await listDatasets(_0x1a4d7a['appCode']),_0x58b0c8>0x0&&(_0x2632bf=_0x2632bf[_0xea1745(0x1fa)](_0x227e3a=>_0x227e3a['id']===_0x58b0c8)),_0x81e586>0x0&&(_0x2632bf=_0x2632bf[_0xea1745(0x1fa)](_0x1db030=>_0x1db030[_0xea1745(0x1e9)]?.[_0xea1745(0x1ef)]===_0x81e586)));const _0x12d8d2=_0x2632bf[_0xea1745(0x1ed)](normalizeTarget);if(_0x12d8d2[_0xea1745(0x1db)]===0x0){const _0x28b812=_0x1f00e1||(_0x58b0c8>0x0?_0xea1745(0x203)+_0x58b0c8:'dbid='+_0x81e586);throw CliErrors[_0xea1745(0x201)](_0xea1745(0x207)+_0x28b812+'.');}const _0x168366=_0x1a4d7a['num']('expected-count');if(_0x168366>0x0&&_0x12d8d2[_0xea1745(0x1db)]!==_0x168366)throw CliErrors[_0xea1745(0x201)](_0xea1745(0x206)+_0x12d8d2[_0xea1745(0x1db)]+_0xea1745(0x1e5)+_0x168366+'.');return _0x12d8d2;}function normalizeTarget(_0x5e63e0){const _0xaab51d=a61_0x5018e3,_0x5e8dd8=_0x5e63e0[_0xaab51d(0x1e9)]??{};return{'id':_0x5e63e0['id'],'code':_0x5e63e0['code'],'name':_0x5e63e0[_0xaab51d(0x1f9)],'description':_0x5e63e0[_0xaab51d(0x1da)],'source':_0x5e63e0['source'],'dbId':_0x5e8dd8[_0xaab51d(0x1ef)],'dbName':_0x5e8dd8[_0xaab51d(0x1f5)],'tableName':_0x5e8dd8[_0xaab51d(0x1f7)],'relatedPageCount':Array[_0xaab51d(0x1e6)](_0x5e63e0['relationPages'])?_0x5e63e0[_0xaab51d(0x204)][_0xaab51d(0x1db)]:undefined};}
@@ -1 +1 @@
1
- function a62_0x5592(_0x44bdcc,_0x2b047b){_0x44bdcc=_0x44bdcc-0x1e4;const _0x5cdc3c=a62_0x5cdc();let _0x55922e=_0x5cdc3c[_0x44bdcc];return _0x55922e;}const a62_0x463b4d=a62_0x5592;(function(_0x1daf71,_0x25991c){const _0x3b8131=a62_0x5592,_0x4f35bf=_0x1daf71();while(!![]){try{const _0x2393b5=parseInt(_0x3b8131(0x1f9))/0x1+parseInt(_0x3b8131(0x205))/0x2+-parseInt(_0x3b8131(0x1e7))/0x3*(-parseInt(_0x3b8131(0x1f7))/0x4)+parseInt(_0x3b8131(0x200))/0x5+parseInt(_0x3b8131(0x1fb))/0x6+parseInt(_0x3b8131(0x203))/0x7*(parseInt(_0x3b8131(0x1f6))/0x8)+-parseInt(_0x3b8131(0x225))/0x9;if(_0x2393b5===_0x25991c)break;else _0x4f35bf['push'](_0x4f35bf['shift']());}catch(_0x28139c){_0x4f35bf['push'](_0x4f35bf['shift']());}}}(a62_0x5cdc,0xc76b5));function a62_0x5cdc(){const _0x2302a8=['beforeScriptId','fromField','toField','toFieldLabel','relations','modelCode','creatorNameField','tableComment','description','path','doType','125896hkGCWM','16QFEikM','extend','296408TKBcyU','properties','3394878UgzGnW','responseFields','cardinality','string','dataset','7439405LzKqzv','dbtableConfig','modifierNameField','77FUdWTH','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','2784754izILTU','labelField','tableName','alias','validateRules','dbId','pkField','main_sub','type','relationId','fields','method','name','read','parse','responseBody','detail','deleted','doVersion','code','dbType','filter','modifierIdField','allFields','requestFields','str','displayName','object','sourceType','deprecated','required','columnCodeListWithDeleted','40824837MWZxLm','allFieldNames','title','toDatasetCode','length','requestBody','formatRules','datasetKey','host','entries','dbName','indexes','map','options','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','dblinkInfoDTO','toTableName','1077996PeCizQ','source','logicField','isArray'];a62_0x5cdc=function(){return _0x2302a8;};return a62_0x5cdc();}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x54343c){const _0x3a8f09=a62_0x5592;if(_0x54343c[_0x3a8f09(0x216)])return null;const _0x120620=Boolean(_0x54343c['displayName']!==undefined||_0x54343c[_0x3a8f09(0x1f5)]!==undefined);let _0x2cdae1={};if(!_0x120620&&typeof _0x54343c[_0x3a8f09(0x1f8)]===_0x3a8f09(0x1fe))try{_0x2cdae1=JSON[_0x3a8f09(0x213)](_0x54343c[_0x3a8f09(0x1f8)]);}catch{}const _0x3ca9da=_0x120620?_0x54343c[_0x3a8f09(0x211)]:_0x54343c[_0x3a8f09(0x218)],_0x10bc7d=_0x120620?_0x54343c[_0x3a8f09(0x21f)]:_0x54343c[_0x3a8f09(0x211)],_0x18e12b=_0x120620?_0x54343c[_0x3a8f09(0x1f5)]:_0x54343c[_0x3a8f09(0x20d)]||_0x54343c['dataType'],_0x2b0524=_0x120620?_0x54343c[_0x3a8f09(0x20b)]===!![]:_0x2cdae1['pkField']===!![],_0x48a2b9=_0x120620?_0x54343c['required']===!![]:_0x2cdae1[_0x3a8f09(0x223)]===!![],_0x59abc2=_0x120620?_0x54343c[_0x3a8f09(0x232)]??null:_0x2cdae1[_0x3a8f09(0x232)]??null,_0x21d1f1={'name':_0x3ca9da,'displayName':_0x10bc7d||_0x3ca9da,'type':_0x18e12b,'dbType':_0x54343c[_0x3a8f09(0x219)],'pk':_0x2b0524,'required':_0x48a2b9,'deprecated':_0x54343c[_0x3a8f09(0x222)]===!![],'description':_0x54343c[_0x3a8f09(0x1f3)]||undefined};return Array[_0x3a8f09(0x1ea)](_0x59abc2)&&_0x59abc2[_0x3a8f09(0x229)]>0x0&&(_0x21d1f1[_0x3a8f09(0x232)]=_0x59abc2),_0x21d1f1;}function parseJsonMaybe(_0x38882c){if(typeof _0x38882c!=='string')return _0x38882c;try{return JSON['parse'](_0x38882c);}catch{return _0x38882c;}}function normalizeOperationEntry(_0x231d2d,_0xf0ef32){const _0x8c0227=a62_0x5592;if(!_0xf0ef32||typeof _0xf0ef32!==_0x8c0227(0x220))return null;if(!_0xf0ef32['method']||!_0xf0ef32['path'])return null;const _0x396077={'name':_0x231d2d,'method':_0xf0ef32[_0x8c0227(0x210)],'path':_0xf0ef32[_0x8c0227(0x1f4)]};if(_0xf0ef32[_0x8c0227(0x22d)])_0x396077[_0x8c0227(0x22d)]=_0xf0ef32['host'];if(_0xf0ef32[_0x8c0227(0x22a)]!=null){const _0x28bf8c=parseJsonMaybe(_0xf0ef32['requestBody']);_0x396077['requestBody']=_0x28bf8c;}if(_0xf0ef32['responseBody']!=null){const _0x55e597=parseJsonMaybe(_0xf0ef32[_0x8c0227(0x214)]);_0x396077[_0x8c0227(0x214)]=_0x55e597;}if(_0xf0ef32[_0x8c0227(0x1eb)]!=null)_0x396077['beforeScriptId']=_0xf0ef32['beforeScriptId'];if(_0xf0ef32['afterScriptId']!=null)_0x396077['afterScriptId']=_0xf0ef32['afterScriptId'];if(Array['isArray'](_0xf0ef32['requestFields']))_0x396077['requestFields']=_0xf0ef32[_0x8c0227(0x21d)];if(Array[_0x8c0227(0x1ea)](_0xf0ef32[_0x8c0227(0x1fc)]))_0x396077[_0x8c0227(0x1fc)]=_0xf0ef32['responseFields'];return _0x396077;}function summarizeDbtable(_0x1424d1){const _0x55b8fd=a62_0x5592,_0x474f95={},_0xae1160=[_0x55b8fd(0x20a),'dbName','tableName',_0x55b8fd(0x22c),'pkField',_0x55b8fd(0x21c),_0x55b8fd(0x1e9),'createTimeField','updateTimeField','creatorIdField',_0x55b8fd(0x1f1),_0x55b8fd(0x21b),_0x55b8fd(0x202),_0x55b8fd(0x206),_0x55b8fd(0x1e5)];for(const _0x220bd6 of _0xae1160){if(_0x1424d1[_0x220bd6]!==undefined)_0x474f95[_0x220bd6]=_0x1424d1[_0x220bd6];}return typeof _0x474f95[_0x55b8fd(0x21c)]==='string'&&_0x474f95[_0x55b8fd(0x21c)][_0x55b8fd(0x229)]>0x0&&(_0x474f95[_0x55b8fd(0x226)]=_0x474f95[_0x55b8fd(0x21c)]['split'](',')[_0x55b8fd(0x231)](_0x1ccff8=>_0x1ccff8['trim']())['filter'](Boolean)),_0x474f95;}function normalizeRelatedPages(_0x3fc309){const _0x32a5b1=a62_0x5592;if(!Array[_0x32a5b1(0x1ea)](_0x3fc309))return[];return _0x3fc309[_0x32a5b1(0x21a)](_0xac6db4=>_0xac6db4&&typeof _0xac6db4===_0x32a5b1(0x220))[_0x32a5b1(0x231)](_0x165667=>({'id':_0x165667['id'],'type':_0x165667[_0x32a5b1(0x20d)],'code':_0x165667['code'],'title':_0x165667[_0x32a5b1(0x227)],'deleted':_0x165667[_0x32a5b1(0x216)]===!![]}));}export const datasetDetail={'service':a62_0x463b4d(0x1ff),'command':a62_0x463b4d(0x215),'description':a62_0x463b4d(0x1e4),'risk':a62_0x463b4d(0x212),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x463b4d(0x208),'type':a62_0x463b4d(0x1fe),'description':a62_0x463b4d(0x204)}],async 'execute'(_0xe22333){const _0x58e7e0=a62_0x463b4d,_0x3b960d=await getDatasetDetail(_0xe22333[_0x58e7e0(0x21e)](_0x58e7e0(0x218))),_0x399832=Array[_0x58e7e0(0x1ea)](_0x3b960d[_0x58e7e0(0x20f)])?_0x3b960d['fields']:Array[_0x58e7e0(0x1ea)](_0x3b960d[_0x58e7e0(0x1fa)])?_0x3b960d[_0x58e7e0(0x1fa)]:[],_0xa4ef16=_0x399832[_0x58e7e0(0x231)](_0x496f6d=>normalizeField(_0x496f6d))['filter'](_0x3496c7=>_0x3496c7!==null),_0x45fe21=_0x3b960d['operations']??{},_0x5a7a8e=[];for(const [_0x18d7c2,_0x4940b1]of Object[_0x58e7e0(0x22e)](_0x45fe21)){const _0x2325e7=normalizeOperationEntry(_0x18d7c2,_0x4940b1);if(_0x2325e7)_0x5a7a8e['push'](_0x2325e7);}const _0x3aa0da=_0x3b960d[_0x58e7e0(0x201)]??{},_0x164086=_0x3b960d['dataset']??{},_0x4aa17b=_0x3aa0da[_0x58e7e0(0x20a)]!=null?{'id':_0x3aa0da[_0x58e7e0(0x20a)],'name':_0x3aa0da[_0x58e7e0(0x22f)]??null}:undefined;let _0xba2292;return typeof _0x3b960d[_0x58e7e0(0x1f8)]===_0x58e7e0(0x1fe)&&(_0xba2292=parseJsonMaybe(_0x3b960d['extend'])),{'ok':!![],'data':{'id':_0x3b960d['modelId']??_0x3b960d['id'],'name':_0x3b960d[_0x58e7e0(0x211)],'code':_0x3b960d[_0x58e7e0(0x1f0)]||_0x3b960d['code'],'doVersion':_0x3b960d[_0x58e7e0(0x217)],'description':_0x3b960d[_0x58e7e0(0x1f3)]||_0x164086[_0x58e7e0(0x1f2)]||undefined,'source':_0x3b960d[_0x58e7e0(0x1e8)]||_0x164086[_0x58e7e0(0x221)],'table':_0x3aa0da[_0x58e7e0(0x207)]||_0x164086[_0x58e7e0(0x207)],'datasetKey':_0x3aa0da[_0x58e7e0(0x22c)],'pk':_0x3aa0da['pkField'],'db':_0x4aa17b,'dbtable':summarizeDbtable(_0x3aa0da),'fields':_0xa4ef16,'operations':_0x5a7a8e,'indexes':Array[_0x58e7e0(0x1ea)](_0x164086[_0x58e7e0(0x230)])?_0x164086['indexes']:[],'relations':Array[_0x58e7e0(0x1ea)](_0x3b960d[_0x58e7e0(0x1ef)])?_0x3b960d[_0x58e7e0(0x1ef)][_0x58e7e0(0x231)](_0x1442e6=>({..._0x1442e6[_0x58e7e0(0x20e)]!=null?{'relationId':_0x1442e6[_0x58e7e0(0x20e)]}:{},'fromDataset':_0x3b960d['name'],'fromCode':_0x3b960d[_0x58e7e0(0x1f0)]||_0x3b960d['code'],'fromTable':_0x3aa0da[_0x58e7e0(0x207)]||_0x164086['tableName'],'fromField':_0x1442e6[_0x58e7e0(0x1ec)],'toDataset':_0x1442e6['toDatasetName'],'toCode':_0x1442e6[_0x58e7e0(0x228)],'toTable':_0x1442e6[_0x58e7e0(0x1e6)],'toField':_0x1442e6[_0x58e7e0(0x1ed)],'labelField':_0x1442e6[_0x58e7e0(0x1ee)]||undefined,'cardinality':_0x1442e6[_0x58e7e0(0x1fd)]||undefined,'bizRelationType':_0x1442e6['bizRelationType']==='main_sub'?_0x58e7e0(0x20c):null})):[],'relatedPages':normalizeRelatedPages(_0x3b960d['relatedPageInfoList']),...Array[_0x58e7e0(0x1ea)](_0x3b960d[_0x58e7e0(0x224)])?{'columnCodeListWithDeleted':_0x3b960d[_0x58e7e0(0x224)]}:{},'formatRules':Array[_0x58e7e0(0x1ea)](_0x3b960d[_0x58e7e0(0x22b)])?_0x3b960d['formatRules']:[],'validateRules':Array[_0x58e7e0(0x1ea)](_0x3b960d['validateRules'])?_0x3b960d[_0x58e7e0(0x209)]:[],..._0xba2292!==undefined?{'extend':_0xba2292}:{},'stats':{'fieldCount':_0xa4ef16[_0x58e7e0(0x229)],'operationCount':_0x5a7a8e[_0x58e7e0(0x229)]}}};}};
1
+ const a62_0x2fa9ca=a62_0x53a7;(function(_0x3cbf8e,_0x1a2fd5){const _0x52cd5f=a62_0x53a7,_0x563edb=_0x3cbf8e();while(!![]){try{const _0x49e038=-parseInt(_0x52cd5f(0x148))/0x1*(-parseInt(_0x52cd5f(0x133))/0x2)+parseInt(_0x52cd5f(0x13f))/0x3*(parseInt(_0x52cd5f(0x108))/0x4)+-parseInt(_0x52cd5f(0x130))/0x5+-parseInt(_0x52cd5f(0x12f))/0x6*(-parseInt(_0x52cd5f(0x10d))/0x7)+parseInt(_0x52cd5f(0x11a))/0x8*(-parseInt(_0x52cd5f(0x14b))/0x9)+parseInt(_0x52cd5f(0x11f))/0xa*(-parseInt(_0x52cd5f(0x112))/0xb)+parseInt(_0x52cd5f(0x116))/0xc*(parseInt(_0x52cd5f(0x120))/0xd);if(_0x49e038===_0x1a2fd5)break;else _0x563edb['push'](_0x563edb['shift']());}catch(_0x438c0a){_0x563edb['push'](_0x563edb['shift']());}}}(a62_0x1149,0x61a59));function a62_0x53a7(_0x3f6b81,_0x4f2f5e){_0x3f6b81=_0x3f6b81-0x106;const _0x114977=a62_0x1149();let _0x53a750=_0x114977[_0x3f6b81];return _0x53a750;}function a62_0x1149(){const _0x251b17=['parse','main_sub','allFieldNames','requestBody','deleted','beforeScriptId','filter','requestFields','dataset','creatorIdField','title','toDatasetName','toField','extend','138clZJGO','3778740PRSTyt','trim','path','498SorPAY','host','responseFields','createTimeField','doType','tableName','split','pkField','labelField','properties','relations','allFields','197214MDOCiF','dataType','isArray','validateRules','afterScriptId','modelId','name','type','required','216FkldkO','fromField','relatedPageInfoList','9EXnDPd','code','map','string','description','indexes','responseBody','str','dblinkInfoDTO','bizRelationType','formatRules','dbId','object','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','tableComment','8XCIemo','logicField','options','creatorNameField','length','200627uDEFvN','dbType','fields','toFieldLabel','modelCode','1661143KdQahN','method','alias','dbName','484740kVYyST','datasetKey','columnCodeListWithDeleted','relationId','4634536nQbrwF','read','entries','toTableName','deprecated','40tHvqgE','481BxhBVw'];a62_0x1149=function(){return _0x251b17;};return a62_0x1149();}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x136d48){const _0x2c502a=a62_0x53a7;if(_0x136d48[_0x2c502a(0x125)])return null;const _0x445b83=Boolean(_0x136d48['displayName']!==undefined||_0x136d48[_0x2c502a(0x137)]!==undefined);let _0x5730fb={};if(!_0x445b83&&typeof _0x136d48[_0x2c502a(0x12e)]===_0x2c502a(0x14e))try{_0x5730fb=JSON[_0x2c502a(0x121)](_0x136d48[_0x2c502a(0x12e)]);}catch{}const _0x222e4d=_0x445b83?_0x136d48[_0x2c502a(0x145)]:_0x136d48[_0x2c502a(0x14c)],_0x5511fc=_0x445b83?_0x136d48['displayName']:_0x136d48[_0x2c502a(0x145)],_0x33f310=_0x445b83?_0x136d48[_0x2c502a(0x137)]:_0x136d48['type']||_0x136d48[_0x2c502a(0x140)],_0x196e63=_0x445b83?_0x136d48[_0x2c502a(0x13a)]===!![]:_0x5730fb[_0x2c502a(0x13a)]===!![],_0x570e7d=_0x445b83?_0x136d48[_0x2c502a(0x147)]===!![]:_0x5730fb[_0x2c502a(0x147)]===!![],_0x368ff3=_0x445b83?_0x136d48['options']??null:_0x5730fb[_0x2c502a(0x10a)]??null,_0x82e275={'name':_0x222e4d,'displayName':_0x5511fc||_0x222e4d,'type':_0x33f310,'dbType':_0x136d48[_0x2c502a(0x10e)],'pk':_0x196e63,'required':_0x570e7d,'deprecated':_0x136d48[_0x2c502a(0x11e)]===!![],'description':_0x136d48[_0x2c502a(0x14f)]||undefined};return Array[_0x2c502a(0x141)](_0x368ff3)&&_0x368ff3[_0x2c502a(0x10c)]>0x0&&(_0x82e275[_0x2c502a(0x10a)]=_0x368ff3),_0x82e275;}function parseJsonMaybe(_0x1e7b2a){const _0x424bb9=a62_0x53a7;if(typeof _0x1e7b2a!=='string')return _0x1e7b2a;try{return JSON[_0x424bb9(0x121)](_0x1e7b2a);}catch{return _0x1e7b2a;}}function normalizeOperationEntry(_0x1d1935,_0xde832f){const _0x344956=a62_0x53a7;if(!_0xde832f||typeof _0xde832f!==_0x344956(0x157))return null;if(!_0xde832f[_0x344956(0x113)]||!_0xde832f[_0x344956(0x132)])return null;const _0xa69c92={'name':_0x1d1935,'method':_0xde832f[_0x344956(0x113)],'path':_0xde832f['path']};if(_0xde832f[_0x344956(0x134)])_0xa69c92[_0x344956(0x134)]=_0xde832f[_0x344956(0x134)];if(_0xde832f[_0x344956(0x124)]!=null){const _0x35240d=parseJsonMaybe(_0xde832f[_0x344956(0x124)]);_0xa69c92[_0x344956(0x124)]=_0x35240d;}if(_0xde832f[_0x344956(0x151)]!=null){const _0x4dc63f=parseJsonMaybe(_0xde832f[_0x344956(0x151)]);_0xa69c92[_0x344956(0x151)]=_0x4dc63f;}if(_0xde832f[_0x344956(0x126)]!=null)_0xa69c92[_0x344956(0x126)]=_0xde832f['beforeScriptId'];if(_0xde832f['afterScriptId']!=null)_0xa69c92[_0x344956(0x143)]=_0xde832f['afterScriptId'];if(Array[_0x344956(0x141)](_0xde832f[_0x344956(0x128)]))_0xa69c92[_0x344956(0x128)]=_0xde832f['requestFields'];if(Array[_0x344956(0x141)](_0xde832f[_0x344956(0x135)]))_0xa69c92[_0x344956(0x135)]=_0xde832f[_0x344956(0x135)];return _0xa69c92;}function summarizeDbtable(_0x351553){const _0x2c6dee=a62_0x53a7,_0x1572c3={},_0x1705c2=[_0x2c6dee(0x156),'dbName','tableName','datasetKey',_0x2c6dee(0x13a),_0x2c6dee(0x13e),_0x2c6dee(0x109),_0x2c6dee(0x136),'updateTimeField',_0x2c6dee(0x12a),_0x2c6dee(0x10b),'modifierIdField','modifierNameField',_0x2c6dee(0x13b),_0x2c6dee(0x153)];for(const _0x2328a2 of _0x1705c2){if(_0x351553[_0x2328a2]!==undefined)_0x1572c3[_0x2328a2]=_0x351553[_0x2328a2];}return typeof _0x1572c3[_0x2c6dee(0x13e)]==='string'&&_0x1572c3[_0x2c6dee(0x13e)]['length']>0x0&&(_0x1572c3[_0x2c6dee(0x123)]=_0x1572c3[_0x2c6dee(0x13e)][_0x2c6dee(0x139)](',')['map'](_0x5b706a=>_0x5b706a[_0x2c6dee(0x131)]())[_0x2c6dee(0x127)](Boolean)),_0x1572c3;}function normalizeRelatedPages(_0x4e3927){const _0x9a78d9=a62_0x53a7;if(!Array[_0x9a78d9(0x141)](_0x4e3927))return[];return _0x4e3927[_0x9a78d9(0x127)](_0x175bdd=>_0x175bdd&&typeof _0x175bdd===_0x9a78d9(0x157))['map'](_0x20ff44=>({'id':_0x20ff44['id'],'type':_0x20ff44[_0x9a78d9(0x146)],'code':_0x20ff44[_0x9a78d9(0x14c)],'title':_0x20ff44[_0x9a78d9(0x12b)],'deleted':_0x20ff44[_0x9a78d9(0x125)]===!![]}));}export const datasetDetail={'service':a62_0x2fa9ca(0x129),'command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a62_0x2fa9ca(0x11b),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x2fa9ca(0x114),'type':a62_0x2fa9ca(0x14e),'description':a62_0x2fa9ca(0x106)}],async 'execute'(_0x2ec43b){const _0x39d274=a62_0x2fa9ca,_0x106640=await getDatasetDetail(_0x2ec43b[_0x39d274(0x152)]('code')),_0xc77852=Array[_0x39d274(0x141)](_0x106640[_0x39d274(0x10f)])?_0x106640[_0x39d274(0x10f)]:Array[_0x39d274(0x141)](_0x106640[_0x39d274(0x13c)])?_0x106640[_0x39d274(0x13c)]:[],_0x4e63fe=_0xc77852[_0x39d274(0x14d)](_0x183b72=>normalizeField(_0x183b72))[_0x39d274(0x127)](_0x5a73a5=>_0x5a73a5!==null),_0xd0c34e=_0x106640['operations']??{},_0x28b1f8=[];for(const [_0x4ae631,_0x26dc54]of Object[_0x39d274(0x11c)](_0xd0c34e)){const _0x535347=normalizeOperationEntry(_0x4ae631,_0x26dc54);if(_0x535347)_0x28b1f8['push'](_0x535347);}const _0x3c9508=_0x106640['dbtableConfig']??{},_0x10eaab=_0x106640['dataset']??{},_0x59f6c0=_0x3c9508[_0x39d274(0x156)]!=null?{'id':_0x3c9508[_0x39d274(0x156)],'name':_0x3c9508[_0x39d274(0x115)]??null}:undefined;let _0x381b2f;return typeof _0x106640['extend']===_0x39d274(0x14e)&&(_0x381b2f=parseJsonMaybe(_0x106640['extend'])),{'ok':!![],'data':{'id':_0x106640[_0x39d274(0x144)]??_0x106640['id'],'name':_0x106640[_0x39d274(0x145)],'code':_0x106640[_0x39d274(0x111)]||_0x106640[_0x39d274(0x14c)],'doVersion':_0x106640['doVersion'],'description':_0x106640[_0x39d274(0x14f)]||_0x10eaab[_0x39d274(0x107)]||undefined,'source':_0x106640['source']||_0x10eaab['sourceType'],'table':_0x3c9508[_0x39d274(0x138)]||_0x10eaab[_0x39d274(0x138)],'datasetKey':_0x3c9508[_0x39d274(0x117)],'pk':_0x3c9508[_0x39d274(0x13a)],'db':_0x59f6c0,'dbtable':summarizeDbtable(_0x3c9508),'fields':_0x4e63fe,'operations':_0x28b1f8,'indexes':Array[_0x39d274(0x141)](_0x10eaab[_0x39d274(0x150)])?_0x10eaab[_0x39d274(0x150)]:[],'relations':Array['isArray'](_0x106640[_0x39d274(0x13d)])?_0x106640['relations'][_0x39d274(0x14d)](_0x2dde90=>({..._0x2dde90[_0x39d274(0x119)]!=null?{'relationId':_0x2dde90[_0x39d274(0x119)]}:{},'fromDataset':_0x106640[_0x39d274(0x145)],'fromCode':_0x106640['modelCode']||_0x106640[_0x39d274(0x14c)],'fromTable':_0x3c9508[_0x39d274(0x138)]||_0x10eaab['tableName'],'fromField':_0x2dde90[_0x39d274(0x149)],'toDataset':_0x2dde90[_0x39d274(0x12c)],'toCode':_0x2dde90['toDatasetCode'],'toTable':_0x2dde90[_0x39d274(0x11d)],'toField':_0x2dde90[_0x39d274(0x12d)],'labelField':_0x2dde90[_0x39d274(0x110)]||undefined,'cardinality':_0x2dde90['cardinality']||undefined,'bizRelationType':_0x2dde90[_0x39d274(0x154)]===_0x39d274(0x122)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x106640[_0x39d274(0x14a)]),...Array[_0x39d274(0x141)](_0x106640[_0x39d274(0x118)])?{'columnCodeListWithDeleted':_0x106640[_0x39d274(0x118)]}:{},'formatRules':Array[_0x39d274(0x141)](_0x106640['formatRules'])?_0x106640[_0x39d274(0x155)]:[],'validateRules':Array[_0x39d274(0x141)](_0x106640[_0x39d274(0x142)])?_0x106640[_0x39d274(0x142)]:[],..._0x381b2f!==undefined?{'extend':_0x381b2f}:{},'stats':{'fieldCount':_0x4e63fe[_0x39d274(0x10c)],'operationCount':_0x28b1f8[_0x39d274(0x10c)]}}};}};
@@ -1 +1 @@
1
- const a63_0x4e662c=a63_0x5945;(function(_0x51f4c0,_0x221fb2){const _0x527e55=a63_0x5945,_0x226a40=_0x51f4c0();while(!![]){try{const _0x4ad5a1=parseInt(_0x527e55(0x12d))/0x1*(-parseInt(_0x527e55(0x10c))/0x2)+-parseInt(_0x527e55(0x138))/0x3*(-parseInt(_0x527e55(0x123))/0x4)+parseInt(_0x527e55(0x144))/0x5*(-parseInt(_0x527e55(0x145))/0x6)+-parseInt(_0x527e55(0x146))/0x7+-parseInt(_0x527e55(0x112))/0x8+parseInt(_0x527e55(0x10b))/0x9*(-parseInt(_0x527e55(0x142))/0xa)+parseInt(_0x527e55(0x12a))/0xb;if(_0x4ad5a1===_0x221fb2)break;else _0x226a40['push'](_0x226a40['shift']());}catch(_0xa64491){_0x226a40['push'](_0x226a40['shift']());}}}(a63_0x50f5,0x76d17));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_0x4e662c(0x132),{'message':a63_0x4e662c(0x117),'hint':a63_0x4e662c(0x125)}]]);export function parseJsonObjectFlag(_0x50c349,_0x264457){const _0x4b5ce4=a63_0x4e662c;if(!_0x50c349)return undefined;let _0x576241;try{_0x576241=JSON['parse'](_0x50c349);}catch(_0x2f0394){const _0x225c81=_0x2f0394 instanceof Error?_0x2f0394[_0x4b5ce4(0x135)]:String(_0x2f0394);throw CliErrors[_0x4b5ce4(0x110)](_0x264457+_0x4b5ce4(0x148)+_0x225c81);}if(!isPlainObject(_0x576241)||Array[_0x4b5ce4(0x139)](_0x576241))throw CliErrors[_0x4b5ce4(0x110)](_0x264457+'\x20must\x20be\x20a\x20JSON\x20object');return _0x576241;}export function validateExtendPatchKeys(_0x659caf){const _0x37e3ac=a63_0x4e662c,_0x3e2204=Object['keys'](_0x659caf);if(_0x3e2204[_0x37e3ac(0x140)]===0x0)throw CliErrors[_0x37e3ac(0x110)](_0x37e3ac(0x11e));for(const _0x4a1c4a of _0x3e2204){const _0x28fb13=EXTEND_PATCH_REDIRECTS[_0x37e3ac(0x12c)](_0x4a1c4a);if(_0x28fb13)throw CliErrors['validation'](_0x28fb13[_0x37e3ac(0x135)],_0x28fb13['hint']);if(!MUTABLE_EXTEND_KEYS[_0x37e3ac(0x120)](_0x4a1c4a))throw CliErrors[_0x37e3ac(0x110)]('Unsupported\x20patch\x20key:\x20'+_0x4a1c4a,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x5984bf=a63_0x4e662c,_0xa47888=Array[_0x5984bf(0x121)](MUTABLE_EXTEND_KEYS)[_0x5984bf(0x107)]();return _0xa47888[_0x5984bf(0x140)]>0x0?_0x5984bf(0x119)+_0xa47888['join'](',\x20'):_0x5984bf(0x122);}export function applyExtendPatch(_0x33feb8,_0x5a9ffe){const _0x2ee6f5=a63_0x4e662c;validateExtendPatchKeys(_0x5a9ffe);const _0x3cf66b=deepClone(_0x33feb8),_0x2b66e0=[];for(const [_0x2df745,_0x3d81e6]of Object[_0x2ee6f5(0x124)](_0x5a9ffe)){const _0x5ee638=_0x3cf66b[_0x2df745],_0x1daa01=deepClone(_0x3d81e6);!deepEqual(_0x5ee638,_0x1daa01)&&(_0x3cf66b[_0x2df745]=_0x1daa01,_0x2b66e0[_0x2ee6f5(0x111)](_0x2ee6f5(0x133)+_0x2df745));}return _0x2b66e0[_0x2ee6f5(0x107)](),{'after':_0x3cf66b,'changedPaths':_0x2b66e0,'changed':_0x2b66e0['length']>0x0};}export function assertExpectation(_0x202dad,_0x171769){const _0x4f2022=a63_0x4e662c;if(!_0x171769)return;for(const [_0x3080dc,_0x3d9495]of Object['entries'](_0x171769)){const _0x486d90=_0x202dad[_0x3080dc];if(!deepEqual(_0x486d90,_0x3d9495))throw CliErrors[_0x4f2022(0x110)]('Expectation\x20mismatch\x20at\x20extend.'+_0x3080dc,_0x4f2022(0x143)+JSON[_0x4f2022(0x13c)](_0x3d9495)+_0x4f2022(0x13f)+JSON['stringify'](_0x486d90));}}export async function buildDatasetExtendUpdateResult({appCode:_0x5d42c9,input:_0x4b7328,dryRun:_0x4ae32c}){const _0x2ac7d2=a63_0x4e662c;validateInput(_0x4b7328);const _0x40668c=await getDatasetDetail(_0x4b7328[_0x2ac7d2(0x118)]),_0x1007c5=parseDatasetExtend(_0x40668c['extend']),_0x51eb7b=deepClone(_0x1007c5['value']);assertExpectation(_0x51eb7b,_0x4b7328['expect']);const {after:_0x2fcefb,changedPaths:_0x155d45,changed:_0x1c6089}=applyExtendPatch(_0x51eb7b,_0x4b7328[_0x2ac7d2(0x10e)]),_0x14aa58=summarizeDataset(_0x40668c,_0x4b7328[_0x2ac7d2(0x118)]);return _0x1c6089&&!_0x4ae32c&&(_0x40668c[_0x2ac7d2(0x127)]=serializeDatasetExtend(_0x2fcefb,_0x1007c5['shape']),await updateDrivenData(_0x40668c)),{'ok':!![],'data':{'appCode':_0x5d42c9,'selector':{'code':_0x4b7328[_0x2ac7d2(0x118)]},'dataset':_0x14aa58,'dryRun':_0x4ae32c,'changed':_0x1c6089,'changedPaths':_0x155d45,'before':{'extend':_0x51eb7b},'after':{'extend':_0x2fcefb},'submitted':_0x1c6089&&!_0x4ae32c},'message':_0x1c6089?_0x4ae32c?_0x2ac7d2(0x136)+_0x155d45[_0x2ac7d2(0x11c)](',\x20')+')':_0x2ac7d2(0x13b)+_0x155d45[_0x2ac7d2(0x11c)](',\x20')+')':_0x2ac7d2(0x10f)};}function a63_0x5945(_0x4bf38e,_0x577977){_0x4bf38e=_0x4bf38e-0x106;const _0x50f585=a63_0x50f5();let _0x5945a8=_0x50f585[_0x4bf38e];return _0x5945a8;}export const datasetExtendUpdate={'service':a63_0x4e662c(0x106),'command':a63_0x4e662c(0x11b),'description':a63_0x4e662c(0x12f),'risk':a63_0x4e662c(0x108),'flags':[CODE_FLAG,{'name':a63_0x4e662c(0x141),'type':a63_0x4e662c(0x147),'required':!![],'description':a63_0x4e662c(0x10d)},{'name':a63_0x4e662c(0x11d),'type':a63_0x4e662c(0x147),'required':![],'description':a63_0x4e662c(0x115)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x759985){validateInput(readExtendUpdateInput(_0x759985));},async 'dryRun'(_0x3122f9){const _0x4e7528=a63_0x4e662c,_0x22c800=await buildDatasetExtendUpdateResult({'appCode':_0x3122f9[_0x4e7528(0x128)],'input':readExtendUpdateInput(_0x3122f9),'dryRun':!![]});return{'method':_0x4e7528(0x13e),'url':_0x4e7528(0x11f),'body':_0x22c800['data'],'description':_0x22c800[_0x4e7528(0x135)]};},async 'execute'(_0x40dfff){const _0x39d12f=a63_0x4e662c;return buildDatasetExtendUpdateResult({'appCode':_0x40dfff[_0x39d12f(0x128)],'input':readExtendUpdateInput(_0x40dfff),'dryRun':![]});}};function readExtendUpdateInput(_0x2898d3){const _0x2efa6f=a63_0x4e662c,_0x341b1a=trim(_0x2898d3[_0x2efa6f(0x13a)](_0x2efa6f(0x118))),_0xfd77e0=parseJsonObjectFlag(_0x2898d3[_0x2efa6f(0x13a)](_0x2efa6f(0x141)),'--patch-json'),_0x218672=parseJsonObjectFlag(_0x2898d3[_0x2efa6f(0x13a)](_0x2efa6f(0x11d)),_0x2efa6f(0x113));return{'code':_0x341b1a,'patch':_0xfd77e0||{},'expect':_0x218672};}function validateInput(_0x451777){const _0x1897be=a63_0x4e662c;if(!_0x451777[_0x1897be(0x118)])throw CliErrors['validation'](_0x1897be(0x134));validateExtendPatchKeys(_0x451777[_0x1897be(0x10e)]);}function parseDatasetExtend(_0x2759ed){const _0x41e652=a63_0x4e662c;if(typeof _0x2759ed==='string'){const _0x467a48=_0x2759ed[_0x41e652(0x126)]();if(!_0x467a48)return{'value':{},'shape':_0x41e652(0x147)};let _0x596437;try{_0x596437=JSON[_0x41e652(0x12e)](_0x467a48);}catch(_0x33f1ae){const _0x3fed4c=_0x33f1ae instanceof Error?_0x33f1ae[_0x41e652(0x135)]:String(_0x33f1ae);throw CliErrors['validation'](_0x41e652(0x109)+_0x3fed4c);}if(!isPlainObject(_0x596437)||Array[_0x41e652(0x139)](_0x596437))throw CliErrors[_0x41e652(0x110)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x596437,'shape':'string'};}if(_0x2759ed===undefined||_0x2759ed===null)return{'value':{},'shape':_0x41e652(0x147)};if(!isPlainObject(_0x2759ed)||Array[_0x41e652(0x139)](_0x2759ed))throw CliErrors['validation'](_0x41e652(0x11a));return{'value':_0x2759ed,'shape':_0x41e652(0x116)};}function a63_0x50f5(){const _0x126369=['--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','/smartapi/dataset/update-driven-data','has','from','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','28tEunAt','entries','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','trim','extend','appCode','datasetCode','35486528UNmBQX','dbName','get','9ROAnPV','parse','Patch\x20dataset\x20top-level\x20extend\x20safely','name','tableName','businessGroup','extend.','--code\x20is\x20required','message','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','datasetName','63300GFyiBR','isArray','str','Updated\x20dataset\x20extend\x20(','stringify','dbId','POST',',\x20actual\x20','length','patch-json','4281110szAQWx','Expected\x20','225MbtXPn','73482sdvwmY','2897496cHrApT','string','\x20must\x20be\x20valid\x20JSON\x20object:\x20','dataset','sort','write','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','modelId','18AgMAgB','44754ziiZis','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','patch','No\x20changes\x20for\x20dataset\x20extend','validation','push','6915288PHRWlt','--expect-json','dbtableConfig','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','object','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','code','Allowed\x20keys:\x20','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','extend-update','join','expect-json'];a63_0x50f5=function(){return _0x126369;};return a63_0x50f5();}function serializeDatasetExtend(_0x305477,_0x5122ce){const _0x56409e=a63_0x4e662c;return _0x5122ce===_0x56409e(0x147)?JSON['stringify'](_0x305477):_0x305477;}function summarizeDataset(_0x2b1e0b,_0x2fef30){const _0x22bf42=a63_0x4e662c,_0x2fedb8=isPlainObject(_0x2b1e0b[_0x22bf42(0x106)])?_0x2b1e0b['dataset']:{},_0x3da7ee=isPlainObject(_0x2b1e0b[_0x22bf42(0x114)])?_0x2b1e0b[_0x22bf42(0x114)]:{};return{'id':_0x2b1e0b[_0x22bf42(0x10a)]??_0x2b1e0b['id']??_0x2fedb8['datasetId']??null,'code':_0x2b1e0b['modelCode']??_0x2b1e0b[_0x22bf42(0x118)]??_0x2fedb8[_0x22bf42(0x129)]??_0x2fef30,'name':_0x2b1e0b[_0x22bf42(0x130)]??_0x2fedb8[_0x22bf42(0x137)]??null,'table':_0x3da7ee['tableName']??_0x2fedb8[_0x22bf42(0x131)]??null,'db':_0x3da7ee[_0x22bf42(0x12b)]??_0x3da7ee[_0x22bf42(0x13d)]??null};}function deepClone(_0x37b11e){const _0x339361=a63_0x4e662c;if(_0x37b11e===undefined)return _0x37b11e;return JSON[_0x339361(0x12e)](JSON[_0x339361(0x13c)](_0x37b11e));}function deepEqual(_0x3e9c14,_0x2750c0){const _0x38bf59=a63_0x4e662c;return JSON[_0x38bf59(0x13c)](_0x3e9c14)===JSON[_0x38bf59(0x13c)](_0x2750c0);}function isPlainObject(_0x55553c){return Boolean(_0x55553c)&&typeof _0x55553c==='object'&&!Array['isArray'](_0x55553c);}function trim(_0x2cff3a){const _0x575097=String(_0x2cff3a||'')['trim']();return _0x575097;}
1
+ const a63_0x2389a8=a63_0x5218;(function(_0xdb47a3,_0x44f82c){const _0x225930=a63_0x5218,_0x2d98d7=_0xdb47a3();while(!![]){try{const _0x568973=-parseInt(_0x225930(0x1da))/0x1+-parseInt(_0x225930(0x1f9))/0x2*(parseInt(_0x225930(0x20e))/0x3)+parseInt(_0x225930(0x200))/0x4*(parseInt(_0x225930(0x212))/0x5)+-parseInt(_0x225930(0x1fd))/0x6*(-parseInt(_0x225930(0x1ed))/0x7)+parseInt(_0x225930(0x214))/0x8+parseInt(_0x225930(0x209))/0x9+-parseInt(_0x225930(0x1ee))/0xa;if(_0x568973===_0x44f82c)break;else _0x2d98d7['push'](_0x2d98d7['shift']());}catch(_0x5b5bf6){_0x2d98d7['push'](_0x2d98d7['shift']());}}}(a63_0x5213,0xda01e));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a63_0x5213(){const _0x3fd267=['--patch-json','1661275bdjdAg','patch','stringify','push','Unsupported\x20patch\x20key:\x20','trim','\x20must\x20be\x20a\x20JSON\x20object','modelCode','datasetCode','value','dataset','data','from','isArray','--code\x20is\x20required','object','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','get','validation','854917UNoGIC','1806140yILcMA','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','join','extend.','entries','Patch\x20dataset\x20top-level\x20extend\x20safely','Updated\x20dataset\x20extend\x20(','keys','patch-json','/smartapi/dataset/update-driven-data','length','14GUHjXh','businessGroup','name','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','48HHLSIm','code','parse','4fpYGse','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','Expected\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','string','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','write','tableName','9107964PgRCEU','datasetId','extend','modelId','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','92799HbmMye','\x20must\x20be\x20valid\x20JSON\x20object:\x20','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','POST','4579235xCCEdy','extend-update','371896tJPxaf','dbtableConfig','Allowed\x20keys:\x20','shape',',\x20actual\x20','message','str','sort','appCode'];a63_0x5213=function(){return _0x3fd267;};return a63_0x5213();}const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a63_0x2389a8(0x1fa),{'message':a63_0x2389a8(0x201),'hint':a63_0x2389a8(0x1fc)}]]);export function parseJsonObjectFlag(_0x49e3f4,_0x2da579){const _0x57d92f=a63_0x2389a8;if(!_0x49e3f4)return undefined;let _0x49bf0e;try{_0x49bf0e=JSON['parse'](_0x49e3f4);}catch(_0x43e36a){const _0x4beec0=_0x43e36a instanceof Error?_0x43e36a['message']:String(_0x43e36a);throw CliErrors['validation'](_0x2da579+_0x57d92f(0x20f)+_0x4beec0);}if(!isPlainObject(_0x49bf0e)||Array['isArray'](_0x49bf0e))throw CliErrors[_0x57d92f(0x1ec)](_0x2da579+_0x57d92f(0x1e0));return _0x49bf0e;}export function validateExtendPatchKeys(_0x3c2497){const _0x30ce=a63_0x2389a8,_0x572b22=Object[_0x30ce(0x1f5)](_0x3c2497);if(_0x572b22[_0x30ce(0x1f8)]===0x0)throw CliErrors[_0x30ce(0x1ec)](_0x30ce(0x204));for(const _0xa7a327 of _0x572b22){const _0x1f06c4=EXTEND_PATCH_REDIRECTS[_0x30ce(0x1eb)](_0xa7a327);if(_0x1f06c4)throw CliErrors[_0x30ce(0x1ec)](_0x1f06c4[_0x30ce(0x219)],_0x1f06c4['hint']);if(!MUTABLE_EXTEND_KEYS['has'](_0xa7a327))throw CliErrors[_0x30ce(0x1ec)](_0x30ce(0x1de)+_0xa7a327,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x1bd2ee=a63_0x2389a8,_0x64ae4=Array[_0x1bd2ee(0x1e6)](MUTABLE_EXTEND_KEYS)[_0x1bd2ee(0x21b)]();return _0x64ae4[_0x1bd2ee(0x1f8)]>0x0?_0x1bd2ee(0x216)+_0x64ae4[_0x1bd2ee(0x1f0)](',\x20'):_0x1bd2ee(0x210);}export function applyExtendPatch(_0x74e072,_0x2bf78b){const _0x5c385e=a63_0x2389a8;validateExtendPatchKeys(_0x2bf78b);const _0x2619d8=deepClone(_0x74e072),_0x5b8fb4=[];for(const [_0x22a5d4,_0x4eecc6]of Object[_0x5c385e(0x1f2)](_0x2bf78b)){const _0x204f13=_0x2619d8[_0x22a5d4],_0x1713b2=deepClone(_0x4eecc6);!deepEqual(_0x204f13,_0x1713b2)&&(_0x2619d8[_0x22a5d4]=_0x1713b2,_0x5b8fb4[_0x5c385e(0x1dd)](_0x5c385e(0x1f1)+_0x22a5d4));}return _0x5b8fb4['sort'](),{'after':_0x2619d8,'changedPaths':_0x5b8fb4,'changed':_0x5b8fb4[_0x5c385e(0x1f8)]>0x0};}export function assertExpectation(_0x2c0832,_0x56a14a){const _0x681e44=a63_0x2389a8;if(!_0x56a14a)return;for(const [_0x13110f,_0x249827]of Object[_0x681e44(0x1f2)](_0x56a14a)){const _0x9d3809=_0x2c0832[_0x13110f];if(!deepEqual(_0x9d3809,_0x249827))throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20extend.'+_0x13110f,_0x681e44(0x203)+JSON[_0x681e44(0x1dc)](_0x249827)+_0x681e44(0x218)+JSON[_0x681e44(0x1dc)](_0x9d3809));}}export async function buildDatasetExtendUpdateResult({appCode:_0x45e9d3,input:_0x343df6,dryRun:_0x4c813e}){const _0x5816e5=a63_0x2389a8;validateInput(_0x343df6);const _0x4ccc77=await getDatasetDetail(_0x343df6[_0x5816e5(0x1fe)]),_0x35de7f=parseDatasetExtend(_0x4ccc77[_0x5816e5(0x20b)]),_0x53fc78=deepClone(_0x35de7f[_0x5816e5(0x1e3)]);assertExpectation(_0x53fc78,_0x343df6['expect']);const {after:_0x54ec3a,changedPaths:_0x3d0a10,changed:_0x4eefef}=applyExtendPatch(_0x53fc78,_0x343df6['patch']),_0x21a8e1=summarizeDataset(_0x4ccc77,_0x343df6[_0x5816e5(0x1fe)]);return _0x4eefef&&!_0x4c813e&&(_0x4ccc77[_0x5816e5(0x20b)]=serializeDatasetExtend(_0x54ec3a,_0x35de7f[_0x5816e5(0x217)]),await updateDrivenData(_0x4ccc77)),{'ok':!![],'data':{'appCode':_0x45e9d3,'selector':{'code':_0x343df6['code']},'dataset':_0x21a8e1,'dryRun':_0x4c813e,'changed':_0x4eefef,'changedPaths':_0x3d0a10,'before':{'extend':_0x53fc78},'after':{'extend':_0x54ec3a},'submitted':_0x4eefef&&!_0x4c813e},'message':_0x4eefef?_0x4c813e?_0x5816e5(0x20d)+_0x3d0a10[_0x5816e5(0x1f0)](',\x20')+')':_0x5816e5(0x1f4)+_0x3d0a10['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a63_0x2389a8(0x1e4),'command':a63_0x2389a8(0x213),'description':a63_0x2389a8(0x1f3),'risk':a63_0x2389a8(0x207),'flags':[CODE_FLAG,{'name':'patch-json','type':a63_0x2389a8(0x205),'required':!![],'description':a63_0x2389a8(0x202)},{'name':'expect-json','type':a63_0x2389a8(0x205),'required':![],'description':a63_0x2389a8(0x1ef)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x178c88){validateInput(readExtendUpdateInput(_0x178c88));},async 'dryRun'(_0x489516){const _0x175d8b=a63_0x2389a8,_0x1fdbce=await buildDatasetExtendUpdateResult({'appCode':_0x489516['appCode'],'input':readExtendUpdateInput(_0x489516),'dryRun':!![]});return{'method':_0x175d8b(0x211),'url':_0x175d8b(0x1f7),'body':_0x1fdbce[_0x175d8b(0x1e5)],'description':_0x1fdbce[_0x175d8b(0x219)]};},async 'execute'(_0x307610){const _0x27ec1d=a63_0x2389a8;return buildDatasetExtendUpdateResult({'appCode':_0x307610[_0x27ec1d(0x21c)],'input':readExtendUpdateInput(_0x307610),'dryRun':![]});}};function a63_0x5218(_0x2cd377,_0x1503f7){_0x2cd377=_0x2cd377-0x1da;const _0x521307=a63_0x5213();let _0x521834=_0x521307[_0x2cd377];return _0x521834;}function readExtendUpdateInput(_0x534baf){const _0x47d30b=a63_0x2389a8,_0x58df0a=trim(_0x534baf[_0x47d30b(0x21a)](_0x47d30b(0x1fe))),_0xd41951=parseJsonObjectFlag(_0x534baf['str'](_0x47d30b(0x1f6)),_0x47d30b(0x21d)),_0xe1359f=parseJsonObjectFlag(_0x534baf[_0x47d30b(0x21a)]('expect-json'),'--expect-json');return{'code':_0x58df0a,'patch':_0xd41951||{},'expect':_0xe1359f};}function validateInput(_0x349a21){const _0x2390bc=a63_0x2389a8;if(!_0x349a21[_0x2390bc(0x1fe)])throw CliErrors['validation'](_0x2390bc(0x1e8));validateExtendPatchKeys(_0x349a21[_0x2390bc(0x1db)]);}function parseDatasetExtend(_0x1b30e4){const _0xd5abd8=a63_0x2389a8;if(typeof _0x1b30e4===_0xd5abd8(0x205)){const _0x26451d=_0x1b30e4[_0xd5abd8(0x1df)]();if(!_0x26451d)return{'value':{},'shape':'string'};let _0x3093f4;try{_0x3093f4=JSON[_0xd5abd8(0x1ff)](_0x26451d);}catch(_0x4be8e2){const _0x540322=_0x4be8e2 instanceof Error?_0x4be8e2['message']:String(_0x4be8e2);throw CliErrors[_0xd5abd8(0x1ec)](_0xd5abd8(0x206)+_0x540322);}if(!isPlainObject(_0x3093f4)||Array['isArray'](_0x3093f4))throw CliErrors['validation'](_0xd5abd8(0x1ea));return{'value':_0x3093f4,'shape':_0xd5abd8(0x205)};}if(_0x1b30e4===undefined||_0x1b30e4===null)return{'value':{},'shape':_0xd5abd8(0x205)};if(!isPlainObject(_0x1b30e4)||Array[_0xd5abd8(0x1e7)](_0x1b30e4))throw CliErrors[_0xd5abd8(0x1ec)](_0xd5abd8(0x1ea));return{'value':_0x1b30e4,'shape':_0xd5abd8(0x1e9)};}function serializeDatasetExtend(_0x5eb650,_0x5b2c5b){const _0xc74fb5=a63_0x2389a8;return _0x5b2c5b===_0xc74fb5(0x205)?JSON[_0xc74fb5(0x1dc)](_0x5eb650):_0x5eb650;}function summarizeDataset(_0x50e5ea,_0x1d80b2){const _0x245cbf=a63_0x2389a8,_0x1712b8=isPlainObject(_0x50e5ea[_0x245cbf(0x1e4)])?_0x50e5ea[_0x245cbf(0x1e4)]:{},_0x2272d5=isPlainObject(_0x50e5ea[_0x245cbf(0x215)])?_0x50e5ea['dbtableConfig']:{};return{'id':_0x50e5ea[_0x245cbf(0x20c)]??_0x50e5ea['id']??_0x1712b8[_0x245cbf(0x20a)]??null,'code':_0x50e5ea[_0x245cbf(0x1e1)]??_0x50e5ea[_0x245cbf(0x1fe)]??_0x1712b8[_0x245cbf(0x1e2)]??_0x1d80b2,'name':_0x50e5ea[_0x245cbf(0x1fb)]??_0x1712b8['datasetName']??null,'table':_0x2272d5[_0x245cbf(0x208)]??_0x1712b8[_0x245cbf(0x208)]??null,'db':_0x2272d5['dbName']??_0x2272d5['dbId']??null};}function deepClone(_0x3a0316){const _0x4ead31=a63_0x2389a8;if(_0x3a0316===undefined)return _0x3a0316;return JSON[_0x4ead31(0x1ff)](JSON[_0x4ead31(0x1dc)](_0x3a0316));}function deepEqual(_0x22928f,_0x3ec50f){const _0x31a7eb=a63_0x2389a8;return JSON['stringify'](_0x22928f)===JSON[_0x31a7eb(0x1dc)](_0x3ec50f);}function isPlainObject(_0x3d9b69){const _0x885449=a63_0x2389a8;return Boolean(_0x3d9b69)&&typeof _0x3d9b69==='object'&&!Array[_0x885449(0x1e7)](_0x3d9b69);}function trim(_0x270cc3){const _0xef3fda=a63_0x2389a8,_0x1ca53b=String(_0x270cc3||'')[_0xef3fda(0x1df)]();return _0x1ca53b;}
@@ -1 +1 @@
1
- const a64_0x297f07=a64_0x4824;function a64_0x2b7e(){const _0x243947=['length','data','Exact\x20raw\x20fields[].name\x20to\x20patch','patch-json','str','message','code','\x20must\x20be\x20valid\x20JSON\x20object:\x20','size','modelCode','properties','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','Dry-run:\x20dataset\x20field\x20','Forbidden\x20patch\x20key:\x20','datetimeFormat','findIndex','Field\x20not\x20found:\x20','entries','from','systemRetain','dbType','870576wsJWJs','object','\x20would\x20change\x20(','deprecated','304185DyjGYD','\x20must\x20be\x20a\x20JSON\x20object','138iYtnsS','tableName','required','displayName','description','98469YUFqlO','No\x20changes\x20for\x20dataset\x20field\x20','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','string','70VEQlkk','81323XlgXbM','modelId','chartRole','dbId','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','stringify','write','24AmXKmX','fields','--field\x20is\x20required','field-update','dbName','datasetCode','trim','has','isArray','validation','Unsupported\x20patch\x20key:\x20','join','258621hAwGxu','143nMtADV','appCode','expect-json','dataset','dbTypeLen','patch','keys','dbtableConfig','name','parse','field','autoIncrement','32270voQhYO','dbFieldName','POST','2402PsNqHD','--expect-json'];a64_0x2b7e=function(){return _0x243947;};return a64_0x2b7e();}(function(_0x276d8c,_0x5cb07d){const _0x595c27=a64_0x4824,_0x240f66=_0x276d8c();while(!![]){try{const _0x3b89fa=-parseInt(_0x595c27(0x117))/0x1*(-parseInt(_0x595c27(0xdc))/0x2)+parseInt(_0x595c27(0x116))/0x3+-parseInt(_0x595c27(0xf3))/0x4+parseInt(_0x595c27(0x123))/0x5*(parseInt(_0x595c27(0xf9))/0x6)+parseInt(_0x595c27(0xf7))/0x7*(-parseInt(_0x595c27(0x10a))/0x8)+parseInt(_0x595c27(0xfe))/0x9+parseInt(_0x595c27(0x102))/0xa*(parseInt(_0x595c27(0x103))/0xb);if(_0x3b89fa===_0x5cb07d)break;else _0x240f66['push'](_0x240f66['shift']());}catch(_0x4464e8){_0x240f66['push'](_0x240f66['shift']());}}}(a64_0x2b7e,0x1d8f3));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a64_0x297f07(0xfc),a64_0x297f07(0xfd),'options',a64_0x297f07(0xfb),a64_0x297f07(0xec),'defaultAggregation',a64_0x297f07(0x105),a64_0x297f07(0xf6)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x297f07(0x11f),a64_0x297f07(0xe4),a64_0x297f07(0xf2),a64_0x297f07(0x11b),'dbTypeScale',a64_0x297f07(0x124),a64_0x297f07(0xfa),'deleted','pkField',a64_0x297f07(0x122),a64_0x297f07(0xf1)]);export function parseJsonObjectFlag(_0x2f8b18,_0x1cffaf){const _0x53a6ae=a64_0x297f07;if(!_0x2f8b18)return undefined;let _0xc8cde5;try{_0xc8cde5=JSON[_0x53a6ae(0x120)](_0x2f8b18);}catch(_0xfbb2c9){const _0x568ba0=_0xfbb2c9 instanceof Error?_0xfbb2c9[_0x53a6ae(0xe3)]:String(_0xfbb2c9);throw CliErrors[_0x53a6ae(0x113)](_0x1cffaf+_0x53a6ae(0xe5)+_0x568ba0);}if(!isPlainObject(_0xc8cde5)||Array['isArray'](_0xc8cde5))throw CliErrors[_0x53a6ae(0x113)](_0x1cffaf+_0x53a6ae(0xf8));return _0xc8cde5;}export function validatePatchKeys(_0x35cc0b){const _0xebcb10=a64_0x297f07,_0x5d5740=Object[_0xebcb10(0x11d)](_0x35cc0b);if(_0x5d5740[_0xebcb10(0xde)]===0x0)throw CliErrors[_0xebcb10(0x113)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x3beaf1 of _0x5d5740){if(FORBIDDEN_FIELD_KEYS[_0xebcb10(0x111)](_0x3beaf1))throw CliErrors[_0xebcb10(0x113)](_0xebcb10(0xeb)+_0x3beaf1);if(!MUTABLE_FIELD_KEYS[_0xebcb10(0x111)](_0x3beaf1))throw CliErrors[_0xebcb10(0x113)](_0xebcb10(0x114)+_0x3beaf1,'Allowed\x20keys:\x20'+Array[_0xebcb10(0xf0)](MUTABLE_FIELD_KEYS)[_0xebcb10(0x115)](',\x20'));}}export function applyFieldPatch(_0x2617ab,_0x595e28){const _0x53234a=a64_0x297f07;validatePatchKeys(_0x595e28);const _0x3d9504=deepClone(_0x2617ab),_0xe4989d=new Set();for(const [_0x265bfa,_0x3e385b]of Object[_0x53234a(0xef)](_0x595e28)){const _0x3489bf=_0x3d9504[_0x265bfa],_0x33663d=mergePatchValue(_0x3489bf,_0x3e385b);!deepEqual(_0x3489bf,_0x33663d)&&(_0x3d9504[_0x265bfa]=_0x33663d,_0xe4989d['add'](_0x265bfa),collectChangedPaths(_0x265bfa,_0x3489bf,_0x33663d,_0xe4989d));}return{'after':_0x3d9504,'changedPaths':Array[_0x53234a(0xf0)](_0xe4989d)['sort'](),'changed':_0xe4989d[_0x53234a(0xe6)]>0x0};}export function assertExpectation(_0x3d01cc,_0x5382b5){const _0x26fa7a=a64_0x297f07;if(!_0x5382b5)return;for(const [_0x5ed7de,_0x2dfdd8]of Object[_0x26fa7a(0xef)](_0x5382b5)){const _0x4e3cc8=_0x3d01cc[_0x5ed7de];if(!deepEqual(_0x4e3cc8,_0x2dfdd8))throw CliErrors[_0x26fa7a(0x113)]('Expectation\x20mismatch\x20at\x20'+_0x5ed7de,'Expected\x20'+JSON[_0x26fa7a(0x108)](_0x2dfdd8)+',\x20actual\x20'+JSON[_0x26fa7a(0x108)](_0x4e3cc8));}}export async function buildDatasetFieldUpdateResult({appCode:_0x1c239a,input:_0x3d4e93,dryRun:_0xdf6825}){const _0x5cd473=a64_0x297f07;validateInput(_0x3d4e93);const _0x2e9e4c=await getDatasetDetail(_0x3d4e93['code']),_0x297a7a=readFieldArray(_0x2e9e4c),_0x505c84=_0x297a7a[_0x5cd473(0xed)](_0x219062=>_0x219062?.[_0x5cd473(0x11f)]===_0x3d4e93[_0x5cd473(0x121)]);if(_0x505c84<0x0)throw CliErrors[_0x5cd473(0x113)](_0x5cd473(0xee)+_0x3d4e93['field']);const _0x522769=deepClone(_0x297a7a[_0x505c84]);assertExpectation(_0x522769,_0x3d4e93['expect']);const {after:_0x27485,changedPaths:_0x277826,changed:_0x50d825}=applyFieldPatch(_0x522769,_0x3d4e93[_0x5cd473(0x11c)]),_0x157e08=summarizeDataset(_0x2e9e4c,_0x3d4e93[_0x5cd473(0xe4)]);return _0x50d825&&!_0xdf6825&&(_0x297a7a[_0x505c84]=_0x27485,await updateDrivenData(_0x2e9e4c)),{'ok':!![],'data':{'appCode':_0x1c239a,'selector':{'code':_0x3d4e93['code']},'dataset':_0x157e08,'field':{'id':_0x522769['id']??null,'name':_0x522769['name']},'dryRun':_0xdf6825,'changed':_0x50d825,'changedPaths':_0x277826,'before':_0x522769,'after':_0x27485,'submitted':_0x50d825&&!_0xdf6825},'message':_0x50d825?_0xdf6825?_0x5cd473(0xea)+_0x3d4e93[_0x5cd473(0x121)]+_0x5cd473(0xf5)+_0x277826[_0x5cd473(0x115)](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x3d4e93[_0x5cd473(0x121)]+'\x20('+_0x277826[_0x5cd473(0x115)](',\x20')+')':_0x5cd473(0xff)+_0x3d4e93[_0x5cd473(0x121)]};}export const datasetFieldUpdate={'service':a64_0x297f07(0x11a),'command':a64_0x297f07(0x10d),'description':a64_0x297f07(0xe9),'risk':a64_0x297f07(0x109),'flags':[CODE_FLAG,{'name':a64_0x297f07(0x121),'type':a64_0x297f07(0x101),'required':!![],'description':a64_0x297f07(0xe0)},{'name':'patch-json','type':'string','required':!![],'description':a64_0x297f07(0x100)},{'name':a64_0x297f07(0x119),'type':'string','required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x31b907){validateInput(readFieldUpdateInput(_0x31b907));},async 'dryRun'(_0x547a97){const _0x3d0839=a64_0x297f07,_0x1c2058=await buildDatasetFieldUpdateResult({'appCode':_0x547a97[_0x3d0839(0x118)],'input':readFieldUpdateInput(_0x547a97),'dryRun':!![]});return{'method':_0x3d0839(0x125),'url':'/smartapi/dataset/update-driven-data','body':_0x1c2058[_0x3d0839(0xdf)],'description':_0x1c2058['message']};},async 'execute'(_0x4f08b8){return buildDatasetFieldUpdateResult({'appCode':_0x4f08b8['appCode'],'input':readFieldUpdateInput(_0x4f08b8),'dryRun':![]});}};function readFieldUpdateInput(_0x1e07f4){const _0x9aa0f2=a64_0x297f07,_0x1e3623=trim(_0x1e07f4[_0x9aa0f2(0xe2)](_0x9aa0f2(0xe4))),_0x101007=emptyToUndefined(_0x1e07f4[_0x9aa0f2(0xe2)]('field')),_0x9d274c=parseJsonObjectFlag(_0x1e07f4['str'](_0x9aa0f2(0xe1)),'--patch-json'),_0x4d735d=parseJsonObjectFlag(_0x1e07f4[_0x9aa0f2(0xe2)](_0x9aa0f2(0x119)),_0x9aa0f2(0xdd));return{'code':_0x1e3623,'field':_0x101007||'','patch':_0x9d274c||{},'expect':_0x4d735d};}function validateInput(_0x4e525c){const _0x2cac29=a64_0x297f07;if(!_0x4e525c[_0x2cac29(0xe4)])throw CliErrors['validation']('--code\x20is\x20required');if(!_0x4e525c[_0x2cac29(0x121)])throw CliErrors[_0x2cac29(0x113)](_0x2cac29(0x10c));validatePatchKeys(_0x4e525c[_0x2cac29(0x11c)]);}function readFieldArray(_0x2d1e88){const _0x3dab52=a64_0x297f07;if(Array[_0x3dab52(0x112)](_0x2d1e88[_0x3dab52(0x10b)]))return _0x2d1e88['fields'];if(Array['isArray'](_0x2d1e88['properties']))return _0x2d1e88[_0x3dab52(0xe8)];throw CliErrors[_0x3dab52(0x113)](_0x3dab52(0x107));}function a64_0x4824(_0x1790e8,_0x32a42c){_0x1790e8=_0x1790e8-0xdc;const _0x2b7eb0=a64_0x2b7e();let _0x482467=_0x2b7eb0[_0x1790e8];return _0x482467;}function summarizeDataset(_0x30a1c7,_0x2e350a){const _0x3a1c6f=a64_0x297f07,_0x37e454=isPlainObject(_0x30a1c7[_0x3a1c6f(0x11a)])?_0x30a1c7[_0x3a1c6f(0x11a)]:{},_0x1f035a=isPlainObject(_0x30a1c7[_0x3a1c6f(0x11e)])?_0x30a1c7[_0x3a1c6f(0x11e)]:{};return{'id':_0x30a1c7[_0x3a1c6f(0x104)]??_0x30a1c7['id']??_0x37e454['datasetId']??null,'code':_0x30a1c7[_0x3a1c6f(0xe7)]??_0x30a1c7[_0x3a1c6f(0xe4)]??_0x37e454[_0x3a1c6f(0x10f)]??_0x2e350a,'name':_0x30a1c7[_0x3a1c6f(0x11f)]??_0x37e454['datasetName']??null,'table':_0x1f035a['tableName']??_0x37e454['tableName']??null,'db':_0x1f035a[_0x3a1c6f(0x10e)]??_0x1f035a[_0x3a1c6f(0x106)]??null};}function mergePatchValue(_0x2b152c,_0xfe07ba){if(isPlainObject(_0x2b152c)&&isPlainObject(_0xfe07ba))return deepMerge(_0x2b152c,_0xfe07ba);return deepClone(_0xfe07ba);}function deepMerge(_0x5f116b,_0x56e081){const _0x161717=deepClone(_0x5f116b);for(const [_0x588a16,_0x2e47d2]of Object['entries'](_0x56e081)){_0x161717[_0x588a16]=isPlainObject(_0x161717[_0x588a16])&&isPlainObject(_0x2e47d2)?deepMerge(_0x161717[_0x588a16],_0x2e47d2):deepClone(_0x2e47d2);}return _0x161717;}function collectChangedPaths(_0x4efd07,_0x3e0744,_0x30fb66,_0x1a74d0){const _0x24e351=a64_0x297f07;if(!isPlainObject(_0x3e0744)||!isPlainObject(_0x30fb66))return;const _0x11a5d6=new Set([...Object[_0x24e351(0x11d)](_0x3e0744),...Object[_0x24e351(0x11d)](_0x30fb66)]);for(const _0x4805ac of _0x11a5d6){const _0x4d6675=_0x3e0744[_0x4805ac],_0x4633ee=_0x30fb66[_0x4805ac];!deepEqual(_0x4d6675,_0x4633ee)&&_0x1a74d0['add'](_0x4efd07+'.'+_0x4805ac);}}function deepClone(_0x26746c){const _0x5e5be2=a64_0x297f07;if(_0x26746c===undefined)return _0x26746c;return JSON[_0x5e5be2(0x120)](JSON[_0x5e5be2(0x108)](_0x26746c));}function deepEqual(_0x402ad9,_0x43c4c6){const _0x236ced=a64_0x297f07;return JSON['stringify'](_0x402ad9)===JSON[_0x236ced(0x108)](_0x43c4c6);}function isPlainObject(_0x1ac1e9){const _0x5b299c=a64_0x297f07;return Boolean(_0x1ac1e9)&&typeof _0x1ac1e9===_0x5b299c(0xf4)&&!Array[_0x5b299c(0x112)](_0x1ac1e9);}function emptyToUndefined(_0x4935a9){const _0x47ad5c=a64_0x297f07,_0xe96e67=String(_0x4935a9||'')[_0x47ad5c(0x110)]();return _0xe96e67||undefined;}function trim(_0x40501d){const _0x1839df=a64_0x297f07;return String(_0x40501d||'')[_0x1839df(0x110)]();}
1
+ const a64_0x2ac64e=a64_0x3de8;(function(_0x16bc9b,_0x94ff83){const _0x4900d5=a64_0x3de8,_0x4ffcee=_0x16bc9b();while(!![]){try{const _0x33ab78=parseInt(_0x4900d5(0x9d))/0x1*(parseInt(_0x4900d5(0xc3))/0x2)+-parseInt(_0x4900d5(0xa3))/0x3*(-parseInt(_0x4900d5(0x97))/0x4)+parseInt(_0x4900d5(0xa1))/0x5+parseInt(_0x4900d5(0x7c))/0x6*(parseInt(_0x4900d5(0xb3))/0x7)+-parseInt(_0x4900d5(0x89))/0x8+-parseInt(_0x4900d5(0x80))/0x9+-parseInt(_0x4900d5(0xb5))/0xa*(parseInt(_0x4900d5(0x9e))/0xb);if(_0x33ab78===_0x94ff83)break;else _0x4ffcee['push'](_0x4ffcee['shift']());}catch(_0xd5f2b3){_0x4ffcee['push'](_0x4ffcee['shift']());}}}(a64_0x316b,0xd7fd6));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a64_0x2ac64e(0x7e),a64_0x2ac64e(0x93),a64_0x2ac64e(0xc0),a64_0x2ac64e(0x8e),a64_0x2ac64e(0xc1),a64_0x2ac64e(0x96),a64_0x2ac64e(0x94),a64_0x2ac64e(0x83)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x2ac64e(0xa0),a64_0x2ac64e(0xc4),a64_0x2ac64e(0xba),a64_0x2ac64e(0x85),a64_0x2ac64e(0x7b),a64_0x2ac64e(0xb4),a64_0x2ac64e(0xbe),a64_0x2ac64e(0x81),'pkField',a64_0x2ac64e(0x9a),'systemRetain']);export function parseJsonObjectFlag(_0x414d6f,_0x3635fe){const _0x2a85a7=a64_0x2ac64e;if(!_0x414d6f)return undefined;let _0x5925ef;try{_0x5925ef=JSON[_0x2a85a7(0x99)](_0x414d6f);}catch(_0x5e32f4){const _0x449648=_0x5e32f4 instanceof Error?_0x5e32f4['message']:String(_0x5e32f4);throw CliErrors[_0x2a85a7(0x7d)](_0x3635fe+_0x2a85a7(0x82)+_0x449648);}if(!isPlainObject(_0x5925ef)||Array['isArray'](_0x5925ef))throw CliErrors['validation'](_0x3635fe+'\x20must\x20be\x20a\x20JSON\x20object');return _0x5925ef;}export function validatePatchKeys(_0x55dbc4){const _0x21d13d=a64_0x2ac64e,_0x5eadd6=Object[_0x21d13d(0x87)](_0x55dbc4);if(_0x5eadd6[_0x21d13d(0xbb)]===0x0)throw CliErrors['validation'](_0x21d13d(0xaf));for(const _0x325e99 of _0x5eadd6){if(FORBIDDEN_FIELD_KEYS[_0x21d13d(0xa6)](_0x325e99))throw CliErrors['validation'](_0x21d13d(0xb6)+_0x325e99);if(!MUTABLE_FIELD_KEYS[_0x21d13d(0xa6)](_0x325e99))throw CliErrors[_0x21d13d(0x7d)](_0x21d13d(0x95)+_0x325e99,'Allowed\x20keys:\x20'+Array[_0x21d13d(0xb2)](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}export function applyFieldPatch(_0x100b2f,_0x5a3d30){const _0x513890=a64_0x2ac64e;validatePatchKeys(_0x5a3d30);const _0x67e647=deepClone(_0x100b2f),_0x4daa0b=new Set();for(const [_0x1734b6,_0x205695]of Object[_0x513890(0xab)](_0x5a3d30)){const _0x58d739=_0x67e647[_0x1734b6],_0x5a9f31=mergePatchValue(_0x58d739,_0x205695);!deepEqual(_0x58d739,_0x5a9f31)&&(_0x67e647[_0x1734b6]=_0x5a9f31,_0x4daa0b[_0x513890(0x8d)](_0x1734b6),collectChangedPaths(_0x1734b6,_0x58d739,_0x5a9f31,_0x4daa0b));}return{'after':_0x67e647,'changedPaths':Array['from'](_0x4daa0b)[_0x513890(0xa4)](),'changed':_0x4daa0b['size']>0x0};}export function assertExpectation(_0x4adf8a,_0x5d0caf){const _0x78c309=a64_0x2ac64e;if(!_0x5d0caf)return;for(const [_0x1f9ef,_0x874c62]of Object[_0x78c309(0xab)](_0x5d0caf)){const _0x15271c=_0x4adf8a[_0x1f9ef];if(!deepEqual(_0x15271c,_0x874c62))throw CliErrors['validation'](_0x78c309(0xb0)+_0x1f9ef,_0x78c309(0x8f)+JSON[_0x78c309(0xc5)](_0x874c62)+_0x78c309(0x9b)+JSON[_0x78c309(0xc5)](_0x15271c));}}export async function buildDatasetFieldUpdateResult({appCode:_0x1bfcd2,input:_0x11a0f5,dryRun:_0x3f7b5a}){const _0x1ebd37=a64_0x2ac64e;validateInput(_0x11a0f5);const _0x253901=await getDatasetDetail(_0x11a0f5[_0x1ebd37(0xc4)]),_0x3b4620=readFieldArray(_0x253901),_0x455b35=_0x3b4620[_0x1ebd37(0xb8)](_0x45c9af=>_0x45c9af?.[_0x1ebd37(0xa0)]===_0x11a0f5[_0x1ebd37(0x84)]);if(_0x455b35<0x0)throw CliErrors[_0x1ebd37(0x7d)]('Field\x20not\x20found:\x20'+_0x11a0f5[_0x1ebd37(0x84)]);const _0x5f5782=deepClone(_0x3b4620[_0x455b35]);assertExpectation(_0x5f5782,_0x11a0f5[_0x1ebd37(0x8b)]);const {after:_0x14df37,changedPaths:_0x4d0a21,changed:_0xd5398e}=applyFieldPatch(_0x5f5782,_0x11a0f5['patch']),_0x6e6e12=summarizeDataset(_0x253901,_0x11a0f5[_0x1ebd37(0xc4)]);return _0xd5398e&&!_0x3f7b5a&&(_0x3b4620[_0x455b35]=_0x14df37,await updateDrivenData(_0x253901)),{'ok':!![],'data':{'appCode':_0x1bfcd2,'selector':{'code':_0x11a0f5[_0x1ebd37(0xc4)]},'dataset':_0x6e6e12,'field':{'id':_0x5f5782['id']??null,'name':_0x5f5782[_0x1ebd37(0xa0)]},'dryRun':_0x3f7b5a,'changed':_0xd5398e,'changedPaths':_0x4d0a21,'before':_0x5f5782,'after':_0x14df37,'submitted':_0xd5398e&&!_0x3f7b5a},'message':_0xd5398e?_0x3f7b5a?_0x1ebd37(0x92)+_0x11a0f5[_0x1ebd37(0x84)]+'\x20would\x20change\x20('+_0x4d0a21[_0x1ebd37(0x7f)](',\x20')+')':_0x1ebd37(0xae)+_0x11a0f5[_0x1ebd37(0x84)]+'\x20('+_0x4d0a21[_0x1ebd37(0x7f)](',\x20')+')':_0x1ebd37(0xbc)+_0x11a0f5['field']};}export const datasetFieldUpdate={'service':'dataset','command':a64_0x2ac64e(0x90),'description':a64_0x2ac64e(0xaa),'risk':'write','flags':[CODE_FLAG,{'name':a64_0x2ac64e(0x84),'type':a64_0x2ac64e(0x7a),'required':!![],'description':a64_0x2ac64e(0xa8)},{'name':a64_0x2ac64e(0xa7),'type':'string','required':!![],'description':a64_0x2ac64e(0xa2)},{'name':a64_0x2ac64e(0xb9),'type':a64_0x2ac64e(0x7a),'required':![],'description':a64_0x2ac64e(0x9f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x826ac1){validateInput(readFieldUpdateInput(_0x826ac1));},async 'dryRun'(_0x232746){const _0x3e68dd=a64_0x2ac64e,_0x462aee=await buildDatasetFieldUpdateResult({'appCode':_0x232746[_0x3e68dd(0x86)],'input':readFieldUpdateInput(_0x232746),'dryRun':!![]});return{'method':_0x3e68dd(0xbf),'url':_0x3e68dd(0xb7),'body':_0x462aee[_0x3e68dd(0xa9)],'description':_0x462aee['message']};},async 'execute'(_0x56f1bc){const _0x5a6643=a64_0x2ac64e;return buildDatasetFieldUpdateResult({'appCode':_0x56f1bc[_0x5a6643(0x86)],'input':readFieldUpdateInput(_0x56f1bc),'dryRun':![]});}};function readFieldUpdateInput(_0x2b7e70){const _0x3eb638=a64_0x2ac64e,_0x54c83d=trim(_0x2b7e70[_0x3eb638(0xad)]('code')),_0x11cdbc=emptyToUndefined(_0x2b7e70['str'](_0x3eb638(0x84))),_0x2e1192=parseJsonObjectFlag(_0x2b7e70['str']('patch-json'),'--patch-json'),_0x1e773f=parseJsonObjectFlag(_0x2b7e70[_0x3eb638(0xad)](_0x3eb638(0xb9)),'--expect-json');return{'code':_0x54c83d,'field':_0x11cdbc||'','patch':_0x2e1192||{},'expect':_0x1e773f};}function validateInput(_0x442463){const _0x433035=a64_0x2ac64e;if(!_0x442463[_0x433035(0xc4)])throw CliErrors['validation']('--code\x20is\x20required');if(!_0x442463[_0x433035(0x84)])throw CliErrors['validation'](_0x433035(0x98));validatePatchKeys(_0x442463[_0x433035(0x9c)]);}function a64_0x316b(){const _0x13113b=['2VFexoE','code','stringify','string','dbTypeScale','113994TGjFmG','validation','displayName','join','12164499EfWjxE','deleted','\x20must\x20be\x20valid\x20JSON\x20object:\x20','deprecated','field','dbTypeLen','appCode','keys','datasetId','6322200HSzdrv','datasetCode','expect','dataset','add','required','Expected\x20','field-update','dbId','Dry-run:\x20dataset\x20field\x20','description','chartRole','Unsupported\x20patch\x20key:\x20','defaultAggregation','3656172yiHdYo','--field\x20is\x20required','parse','autoIncrement',',\x20actual\x20','patch','1319705dLRJzh','16456fuVBYH','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','name','7938375pgkUEL','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','3qfWeXD','sort','object','has','patch-json','Exact\x20raw\x20fields[].name\x20to\x20patch','data','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','entries','properties','str','Updated\x20dataset\x20field\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Expectation\x20mismatch\x20at\x20','isArray','from','637LrMayb','dbFieldName','16870EVzRWz','Forbidden\x20patch\x20key:\x20','/smartapi/dataset/update-driven-data','findIndex','expect-json','dbType','length','No\x20changes\x20for\x20dataset\x20field\x20','dbtableConfig','tableName','POST','options','datetimeFormat','fields'];a64_0x316b=function(){return _0x13113b;};return a64_0x316b();}function readFieldArray(_0x46bf6e){const _0x4deb5e=a64_0x2ac64e;if(Array[_0x4deb5e(0xb1)](_0x46bf6e[_0x4deb5e(0xc2)]))return _0x46bf6e[_0x4deb5e(0xc2)];if(Array['isArray'](_0x46bf6e[_0x4deb5e(0xac)]))return _0x46bf6e[_0x4deb5e(0xac)];throw CliErrors[_0x4deb5e(0x7d)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function a64_0x3de8(_0x1c8c79,_0x3c6ade){_0x1c8c79=_0x1c8c79-0x7a;const _0x316b10=a64_0x316b();let _0x3de824=_0x316b10[_0x1c8c79];return _0x3de824;}function summarizeDataset(_0x23e477,_0x62eb61){const _0x397288=a64_0x2ac64e,_0x23dfb1=isPlainObject(_0x23e477[_0x397288(0x8c)])?_0x23e477[_0x397288(0x8c)]:{},_0x584740=isPlainObject(_0x23e477[_0x397288(0xbd)])?_0x23e477[_0x397288(0xbd)]:{};return{'id':_0x23e477['modelId']??_0x23e477['id']??_0x23dfb1[_0x397288(0x88)]??null,'code':_0x23e477['modelCode']??_0x23e477[_0x397288(0xc4)]??_0x23dfb1[_0x397288(0x8a)]??_0x62eb61,'name':_0x23e477[_0x397288(0xa0)]??_0x23dfb1['datasetName']??null,'table':_0x584740[_0x397288(0xbe)]??_0x23dfb1[_0x397288(0xbe)]??null,'db':_0x584740['dbName']??_0x584740[_0x397288(0x91)]??null};}function mergePatchValue(_0x52989f,_0x3631f1){if(isPlainObject(_0x52989f)&&isPlainObject(_0x3631f1))return deepMerge(_0x52989f,_0x3631f1);return deepClone(_0x3631f1);}function deepMerge(_0x39c3c7,_0x2dccd3){const _0x3686a1=a64_0x2ac64e,_0x574d19=deepClone(_0x39c3c7);for(const [_0x58dc43,_0x5b0607]of Object[_0x3686a1(0xab)](_0x2dccd3)){_0x574d19[_0x58dc43]=isPlainObject(_0x574d19[_0x58dc43])&&isPlainObject(_0x5b0607)?deepMerge(_0x574d19[_0x58dc43],_0x5b0607):deepClone(_0x5b0607);}return _0x574d19;}function collectChangedPaths(_0x3ee433,_0x5a259f,_0x25651d,_0x1f5fa5){const _0x12524c=a64_0x2ac64e;if(!isPlainObject(_0x5a259f)||!isPlainObject(_0x25651d))return;const _0x5aade5=new Set([...Object[_0x12524c(0x87)](_0x5a259f),...Object[_0x12524c(0x87)](_0x25651d)]);for(const _0x4fadd0 of _0x5aade5){const _0x4d162f=_0x5a259f[_0x4fadd0],_0x177889=_0x25651d[_0x4fadd0];!deepEqual(_0x4d162f,_0x177889)&&_0x1f5fa5['add'](_0x3ee433+'.'+_0x4fadd0);}}function deepClone(_0x239d2a){if(_0x239d2a===undefined)return _0x239d2a;return JSON['parse'](JSON['stringify'](_0x239d2a));}function deepEqual(_0xb48cdb,_0x193194){const _0x340714=a64_0x2ac64e;return JSON[_0x340714(0xc5)](_0xb48cdb)===JSON[_0x340714(0xc5)](_0x193194);}function isPlainObject(_0x63a40a){const _0x4060a5=a64_0x2ac64e;return Boolean(_0x63a40a)&&typeof _0x63a40a===_0x4060a5(0xa5)&&!Array[_0x4060a5(0xb1)](_0x63a40a);}function emptyToUndefined(_0xfeeaaf){const _0x1a2874=String(_0xfeeaaf||'')['trim']();return _0x1a2874||undefined;}function trim(_0xd12614){return String(_0xd12614||'')['trim']();}