@lovrabet/rabetbase-cli 2.3.7-beta.1 → 2.3.7-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 (243) 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 -0
  79. package/lib/commands/db/analyze-batch-plan.js +1 -0
  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/page/generate-start.js +1 -1
  115. package/lib/commands/page/generate-status.js +1 -1
  116. package/lib/commands/page/index.js +1 -1
  117. package/lib/commands/page/pull.js +1 -1
  118. package/lib/commands/page/push.js +1 -1
  119. package/lib/commands/page/relation-audit.js +1 -1
  120. package/lib/commands/page/shared.js +1 -1
  121. package/lib/commands/page/standard-page-status.js +1 -1
  122. package/lib/commands/page/sync.js +1 -1
  123. package/lib/commands/permit/index.js +1 -1
  124. package/lib/commands/permit/page-get.js +1 -1
  125. package/lib/commands/permit/page-set.js +1 -1
  126. package/lib/commands/permit/role-apis-set.js +1 -1
  127. package/lib/commands/permit/role-menus-set.js +1 -1
  128. package/lib/commands/permit/role-menus.js +1 -1
  129. package/lib/commands/permit/shared.js +1 -1
  130. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  131. package/lib/commands/project/create/format-elapsed.js +1 -1
  132. package/lib/commands/project/create/main.js +1 -1
  133. package/lib/commands/project/create/non-interactive.js +1 -1
  134. package/lib/commands/project/create/project-template-path.js +1 -1
  135. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  136. package/lib/commands/project/create/use-format-code.js +1 -1
  137. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  138. package/lib/commands/project/index.js +1 -1
  139. package/lib/commands/project/init.js +1 -1
  140. package/lib/commands/project/upgrade.js +1 -1
  141. package/lib/commands/registry.js +1 -1
  142. package/lib/commands/role/create.js +1 -1
  143. package/lib/commands/role/delete.js +1 -1
  144. package/lib/commands/role/detail.js +1 -1
  145. package/lib/commands/role/index.js +1 -1
  146. package/lib/commands/role/list.js +1 -1
  147. package/lib/commands/role/shared.js +1 -1
  148. package/lib/commands/role/update.js +1 -1
  149. package/lib/commands/role/user-add.js +1 -1
  150. package/lib/commands/role/user-remove.js +1 -1
  151. package/lib/commands/role/user-resolve.js +1 -1
  152. package/lib/commands/run/index.js +1 -1
  153. package/lib/commands/schema.js +1 -1
  154. package/lib/commands/sql/create.js +1 -1
  155. package/lib/commands/sql/delete.js +1 -1
  156. package/lib/commands/sql/detail.js +1 -1
  157. package/lib/commands/sql/exec.js +1 -1
  158. package/lib/commands/sql/index.js +1 -1
  159. package/lib/commands/sql/list.js +1 -1
  160. package/lib/commands/sql/pull.js +1 -1
  161. package/lib/commands/sql/push.js +1 -1
  162. package/lib/commands/sql/save.js +1 -1
  163. package/lib/commands/sql/shared.js +1 -1
  164. package/lib/commands/sql/status.js +1 -1
  165. package/lib/commands/sql/validate.js +1 -1
  166. package/lib/commands/workspace/add.js +1 -1
  167. package/lib/commands/workspace/index.js +1 -1
  168. package/lib/commands/workspace/remove.js +1 -1
  169. package/lib/config/schema.js +1 -1
  170. package/lib/constant/cdn.js +1 -1
  171. package/lib/constant/cli.js +1 -1
  172. package/lib/constant/defaults.js +1 -1
  173. package/lib/constant/domain.js +1 -1
  174. package/lib/constant/env.js +1 -1
  175. package/lib/constant/output.js +1 -1
  176. package/lib/constant/paths.js +1 -1
  177. package/lib/constant/risk.js +1 -1
  178. package/lib/context/app-resolver.js +1 -1
  179. package/lib/context/auth-resolver.js +1 -1
  180. package/lib/context/config-loader.js +1 -1
  181. package/lib/context.js +1 -1
  182. package/lib/core/alias-resolver.js +1 -1
  183. package/lib/core/api-client.js +1 -1
  184. package/lib/core/bff/config.js +1 -1
  185. package/lib/core/bff/file-system.js +1 -1
  186. package/lib/core/bff/hash.js +1 -1
  187. package/lib/core/bff/lock.js +1 -1
  188. package/lib/core/bff/utils.js +1 -1
  189. package/lib/core/db-resolver.js +1 -1
  190. package/lib/core/page/file-system.js +1 -1
  191. package/lib/core/page/hash.js +1 -1
  192. package/lib/core/page/lock.js +1 -1
  193. package/lib/core/sql-sync/config.js +1 -1
  194. package/lib/core/sql-sync/file-system.js +1 -1
  195. package/lib/core/sql-sync/hash.js +1 -1
  196. package/lib/core/sql-sync/lock.js +1 -1
  197. package/lib/core/sql-sync/utils.js +1 -1
  198. package/lib/core/sql-validator.js +1 -1
  199. package/lib/errors.js +1 -1
  200. package/lib/framework/build-all-flags.js +1 -1
  201. package/lib/framework/flags.js +1 -1
  202. package/lib/framework/help.js +1 -1
  203. package/lib/framework/index.js +1 -1
  204. package/lib/framework/output.js +1 -1
  205. package/lib/framework/response.js +1 -1
  206. package/lib/framework/runner-alias.js +1 -1
  207. package/lib/framework/runner.js +1 -1
  208. package/lib/framework/schema-export.js +1 -1
  209. package/lib/framework/types.js +1 -1
  210. package/lib/generated/build-info.js +1 -1
  211. package/lib/help.js +1 -1
  212. package/lib/skills/main.js +1 -1
  213. package/lib/skills/npx-skills-add.js +1 -1
  214. package/lib/telemetry/cli-command-trace.js +1 -1
  215. package/lib/telemetry/cli-help-trace.js +1 -1
  216. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  217. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  218. package/lib/telemetry/send-cli-trace-log.js +1 -1
  219. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  220. package/lib/utils/ai_config.js +1 -1
  221. package/lib/utils/apply-jq-filter.js +1 -1
  222. package/lib/utils/cdn-config.js +1 -1
  223. package/lib/utils/check-sdk-version.js +1 -1
  224. package/lib/utils/cli-version-check.js +1 -1
  225. package/lib/utils/cli-version-policy.js +1 -1
  226. package/lib/utils/config.js +1 -1
  227. package/lib/utils/copy-directory.js +1 -1
  228. package/lib/utils/entity-with-id.js +1 -1
  229. package/lib/utils/file-utils.js +1 -1
  230. package/lib/utils/guides-cdn.js +1 -1
  231. package/lib/utils/http-client.js +1 -1
  232. package/lib/utils/is-non-interactive.js +1 -1
  233. package/lib/utils/logger.js +1 -1
  234. package/lib/utils/params.js +1 -1
  235. package/lib/utils/platform.js +1 -1
  236. package/lib/utils/rules-cdn.js +1 -1
  237. package/lib/utils/sleep.js +1 -1
  238. package/lib/utils/template-replacer.js +1 -1
  239. package/lib/utils/update-notice.js +1 -1
  240. package/lib/utils/version.js +1 -1
  241. package/lib/utils/with-active-cookie.js +1 -1
  242. package/lib/utils/write-cli-side-channel.js +1 -1
  243. package/package.json +1 -1
@@ -1 +1 @@
1
- const a53_0x3353a5=a53_0x4d13;function a53_0x4d13(_0x3876d4,_0x99a44e){_0x3876d4=_0x3876d4-0x80;const _0x32f5a4=a53_0x32f5();let _0x4d13dc=_0x32f5a4[_0x3876d4];return _0x4d13dc;}(function(_0x12f953,_0xe9506b){const _0x4b74df=a53_0x4d13,_0x3aff19=_0x12f953();while(!![]){try{const _0x9b6a10=-parseInt(_0x4b74df(0x8a))/0x1+-parseInt(_0x4b74df(0x88))/0x2+-parseInt(_0x4b74df(0xa0))/0x3+-parseInt(_0x4b74df(0xaf))/0x4+parseInt(_0x4b74df(0xa6))/0x5*(-parseInt(_0x4b74df(0xb4))/0x6)+parseInt(_0x4b74df(0xb3))/0x7+-parseInt(_0x4b74df(0xae))/0x8*(-parseInt(_0x4b74df(0x9a))/0x9);if(_0x9b6a10===_0xe9506b)break;else _0x3aff19['push'](_0x3aff19['shift']());}catch(_0x33c764){_0x3aff19['push'](_0x3aff19['shift']());}}}(a53_0x32f5,0xd460f));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a53_0x32f5(){const _0x533e40=['boolean','8jbQgBR','2949408mVCjvn','env','Invalid\x20value\x20for\x20\x22','Config\x20value','3784340XiDVZy','6010722Ikghpm','config','bool','string','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x22\x20is\x20not\x20settable.','`,\x20`','\x20set\x20to:\x20','length','426152OclBrp','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','1635432CiqIDg','Settable\x20top-level\x20keys:\x20','write','\x20appcode\x20set\x20to:\x20','Set\x20a\x20config\x20value','Use\x20`','apps','set','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','app','Usage:\x20','Global','locale','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','appcode','44062479QJbQEp','Invalid\x20locale\x20value.','global','includes','\x20app\x20add\x20<name>\x20--appcode\x20','Missing\x20value.','2936703jzHMYc','object','key','Project','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','keys','5okSGBS','str','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','validation','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x22.\x20Allowed:\x20','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)'];a53_0x32f5=function(){return _0x533e40;};return a53_0x32f5();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x3b76f1){const _0x290784=a53_0x4d13,_0x404bfe=_0x3b76f1[_0x290784(0xa7)](_0x290784(0xa2)),_0x34980f=_0x3b76f1[_0x290784(0xa7)]('value');if(!_0x404bfe)throw CliErrors[_0x290784(0xa9)]('Missing\x20key.',_0x290784(0x95)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x34980f===undefined||_0x34980f==='')throw CliErrors[_0x290784(0xa9)](_0x290784(0x9f),_0x290784(0x95)+CLI_BIN_NAME+_0x290784(0xaa));if(_0x34980f[_0x290784(0x87)]>0x1f4)throw CliErrors[_0x290784(0xa9)](_0x290784(0x89));if(!isTopLevelConfigKey(_0x404bfe))throw CliErrors[_0x290784(0xa9)]('Top-level\x20key\x20\x22'+_0x404bfe+_0x290784(0x84),_0x290784(0x8b)+getTopLevelConfigKeySummary());if(_0x404bfe==='riskLevel')throw CliErrors[_0x290784(0xa9)](_0x290784(0x98));if(CONFIG_ENUM_VALUES[_0x404bfe]&&!CONFIG_ENUM_VALUES[_0x404bfe][_0x290784(0x9d)](_0x34980f))throw CliErrors['validation'](_0x290784(0xb1)+_0x404bfe+_0x290784(0xab)+CONFIG_ENUM_VALUES[_0x404bfe]['join'](',\x20'));if(_0x404bfe===_0x290784(0x97)&&!normalizeLocale(_0x34980f))throw CliErrors[_0x290784(0xa9)](_0x290784(0x9b),_0x290784(0x93));const _0x5c8e32={'global':_0x3b76f1[_0x290784(0x81)](_0x290784(0x9c))},_0x2daae5=resolveWriteScope(_0x5c8e32),_0x4c6b90=readScopedConfig(_0x2daae5);let _0x5ea1cf=_0x404bfe,_0x268e55=_0x34980f;_0x404bfe===_0x290784(0x94)&&(_0x5ea1cf='appcode',delete _0x4c6b90[_0x290784(0x94)]);_0x404bfe===_0x290784(0x97)&&(_0x268e55=normalizeLocale(_0x34980f));if(_0x404bfe===_0x290784(0xb0)){_0x268e55=normalizeEnv(_0x34980f);if(!isProduction(_0x268e55)&&!isDaily(_0x268e55))throw CliErrors[_0x290784(0xa9)](_0x290784(0x83),_0x290784(0xa4));}if(_0x404bfe===_0x290784(0x99)){const _0x485177=_0x4c6b90[_0x290784(0x90)]&&typeof _0x4c6b90['apps']===_0x290784(0xa1)?Object[_0x290784(0xa5)](_0x4c6b90[_0x290784(0x90)]):[];if(_0x485177[_0x290784(0x87)]>0x0)throw CliErrors[_0x290784(0xa9)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x290784(0x8f)+CLI_BIN_NAME+_0x290784(0x9e)+_0x268e55+_0x290784(0x85)+CLI_BIN_NAME+_0x290784(0xa8));const _0x2693a4=buildCanonicalProjectConfig({..._0x4c6b90},{'appCodes':[_0x268e55],'env':typeof _0x4c6b90[_0x290784(0xb0)]==='string'?_0x4c6b90[_0x290784(0xb0)]:undefined});writeScopedConfig(_0x2693a4,_0x2daae5);const _0x37dcc4=_0x2daae5===_0x290784(0x9c)?_0x290784(0x96):_0x290784(0xa3);return{'ok':!![],'message':'✓\x20'+_0x37dcc4+_0x290784(0x8d)+_0x268e55+_0x290784(0x92)};}_0x4c6b90[_0x5ea1cf]=_0x268e55,writeScopedConfig(_0x4c6b90,_0x2daae5);const _0x246a11=_0x2daae5===_0x290784(0x9c)?_0x290784(0x96):_0x290784(0xa3);return{'ok':!![],'message':'✓\x20'+_0x246a11+'\x20'+_0x5ea1cf+_0x290784(0x86)+_0x268e55};}export const configSetDefinition={'service':a53_0x3353a5(0x80),'command':a53_0x3353a5(0x91),'description':a53_0x3353a5(0x8e),'risk':a53_0x3353a5(0x8c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x3353a5(0xa2),'type':a53_0x3353a5(0x82),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a53_0x3353a5(0x82),'description':a53_0x3353a5(0xb2),'required':!![]},{'name':'global','type':a53_0x3353a5(0xad),'description':a53_0x3353a5(0xac),'default':![]}],'execute':execute};
1
+ const a53_0x493d3f=a53_0x286d;(function(_0x59bf30,_0x441070){const _0x498c9b=a53_0x286d,_0x4e8636=_0x59bf30();while(!![]){try{const _0x233864=-parseInt(_0x498c9b(0x1cb))/0x1*(-parseInt(_0x498c9b(0x1c0))/0x2)+parseInt(_0x498c9b(0x1c8))/0x3*(-parseInt(_0x498c9b(0x1d5))/0x4)+-parseInt(_0x498c9b(0x1c9))/0x5*(parseInt(_0x498c9b(0x1ce))/0x6)+parseInt(_0x498c9b(0x1e0))/0x7*(parseInt(_0x498c9b(0x1c6))/0x8)+parseInt(_0x498c9b(0x1cf))/0x9+parseInt(_0x498c9b(0x1c3))/0xa*(-parseInt(_0x498c9b(0x1be))/0xb)+parseInt(_0x498c9b(0x1ba))/0xc;if(_0x233864===_0x441070)break;else _0x4e8636['push'](_0x4e8636['shift']());}catch(_0x1d62cf){_0x4e8636['push'](_0x4e8636['shift']());}}}(a53_0x4d79,0x1880d));function a53_0x286d(_0x5dfd3d,_0x120616){_0x5dfd3d=_0x5dfd3d-0x1b7;const _0x4d7979=a53_0x4d79();let _0x286d46=_0x4d7979[_0x5dfd3d];return _0x286d46;}import{CliErrors}from'../../errors.js';function a53_0x4d79(){const _0x420a53=['Missing\x20value.','353316fnFWpR','1783602QXsiWV','object','set','Top-level\x20key\x20\x22','apps','global','28SGRZCS','Global','env','riskLevel','bool','app','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Usage:\x20','str','write','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','10969vuczOr','\x20set\x20to:\x20','keys','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','appcode','key','Settable\x20top-level\x20keys:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','`,\x20`','\x22.\x20Allowed:\x20','711000mrNGKM','Set\x20a\x20config\x20value','boolean','Invalid\x20value\x20for\x20\x22','8393YrrcpF','Project','30ZwtrGX','locale','config','1250ghXMGP','value','length','648HSjOsU','includes','78312HintrQ','10tBpGWU','\x20appcode\x20set\x20to:\x20','7459PDAUrb','validation'];a53_0x4d79=function(){return _0x420a53;};return a53_0x4d79();}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(_0x5ba7e7){const _0x56a3b0=a53_0x286d,_0x35f34d=_0x5ba7e7[_0x56a3b0(0x1dd)]('key'),_0x5eb0de=_0x5ba7e7[_0x56a3b0(0x1dd)](_0x56a3b0(0x1c4));if(!_0x35f34d)throw CliErrors[_0x56a3b0(0x1cc)]('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x56a3b0(0x1db));if(_0x5eb0de===undefined||_0x5eb0de==='')throw CliErrors[_0x56a3b0(0x1cc)](_0x56a3b0(0x1cd),_0x56a3b0(0x1dc)+CLI_BIN_NAME+_0x56a3b0(0x1db));if(_0x5eb0de['length']>0x1f4)throw CliErrors[_0x56a3b0(0x1cc)](_0x56a3b0(0x1df));if(!isTopLevelConfigKey(_0x35f34d))throw CliErrors['validation'](_0x56a3b0(0x1d2)+_0x35f34d+'\x22\x20is\x20not\x20settable.',_0x56a3b0(0x1e6)+getTopLevelConfigKeySummary());if(_0x35f34d===_0x56a3b0(0x1d8))throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x35f34d]&&!CONFIG_ENUM_VALUES[_0x35f34d][_0x56a3b0(0x1c7)](_0x5eb0de))throw CliErrors['validation'](_0x56a3b0(0x1bd)+_0x35f34d+_0x56a3b0(0x1b9)+CONFIG_ENUM_VALUES[_0x35f34d]['join'](',\x20'));if(_0x35f34d===_0x56a3b0(0x1c1)&&!normalizeLocale(_0x5eb0de))throw CliErrors[_0x56a3b0(0x1cc)]('Invalid\x20locale\x20value.',_0x56a3b0(0x1e3));const _0x33c40f={'global':_0x5ba7e7[_0x56a3b0(0x1d9)](_0x56a3b0(0x1d4))},_0x3e9985=resolveWriteScope(_0x33c40f),_0x36619b=readScopedConfig(_0x3e9985);let _0x4ed971=_0x35f34d,_0x466f3d=_0x5eb0de;_0x35f34d===_0x56a3b0(0x1da)&&(_0x4ed971=_0x56a3b0(0x1e4),delete _0x36619b[_0x56a3b0(0x1da)]);_0x35f34d==='locale'&&(_0x466f3d=normalizeLocale(_0x5eb0de));if(_0x35f34d==='env'){_0x466f3d=normalizeEnv(_0x5eb0de);if(!isProduction(_0x466f3d)&&!isDaily(_0x466f3d))throw CliErrors['validation']('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x56a3b0(0x1b7));}if(_0x35f34d==='appcode'){const _0x525ec0=_0x36619b[_0x56a3b0(0x1d3)]&&typeof _0x36619b[_0x56a3b0(0x1d3)]===_0x56a3b0(0x1d0)?Object[_0x56a3b0(0x1e2)](_0x36619b['apps']):[];if(_0x525ec0[_0x56a3b0(0x1c5)]>0x0)throw CliErrors[_0x56a3b0(0x1cc)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20'+_0x466f3d+_0x56a3b0(0x1b8)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x41e88d=buildCanonicalProjectConfig({..._0x36619b},{'appCodes':[_0x466f3d],'env':typeof _0x36619b[_0x56a3b0(0x1d7)]==='string'?_0x36619b[_0x56a3b0(0x1d7)]:undefined});writeScopedConfig(_0x41e88d,_0x3e9985);const _0x4cba16=_0x3e9985===_0x56a3b0(0x1d4)?_0x56a3b0(0x1d6):_0x56a3b0(0x1bf);return{'ok':!![],'message':'✓\x20'+_0x4cba16+_0x56a3b0(0x1ca)+_0x466f3d+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x36619b[_0x4ed971]=_0x466f3d,writeScopedConfig(_0x36619b,_0x3e9985);const _0x186fdd=_0x3e9985===_0x56a3b0(0x1d4)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x186fdd+'\x20'+_0x4ed971+_0x56a3b0(0x1e1)+_0x466f3d};}export const configSetDefinition={'service':a53_0x493d3f(0x1c2),'command':a53_0x493d3f(0x1d1),'description':a53_0x493d3f(0x1bb),'risk':a53_0x493d3f(0x1de),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x493d3f(0x1e5),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x493d3f(0x1c4),'type':'string','description':'Config\x20value','required':!![]},{'name':a53_0x493d3f(0x1d4),'type':a53_0x493d3f(0x1bc),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x580f8f,_0x182d2f){var _0x1752ad=a54_0x2c50,_0x22be09=_0x580f8f();while(!![]){try{var _0x224dbb=parseInt(_0x1752ad(0x1ce))/0x1*(parseInt(_0x1752ad(0x1d8))/0x2)+parseInt(_0x1752ad(0x1cf))/0x3+-parseInt(_0x1752ad(0x1d1))/0x4+parseInt(_0x1752ad(0x1d3))/0x5*(-parseInt(_0x1752ad(0x1d5))/0x6)+-parseInt(_0x1752ad(0x1d4))/0x7+-parseInt(_0x1752ad(0x1cd))/0x8+parseInt(_0x1752ad(0x1d7))/0x9;if(_0x224dbb===_0x182d2f)break;else _0x22be09['push'](_0x22be09['shift']());}catch(_0x5f2f17){_0x22be09['push'](_0x22be09['shift']());}}}(a54_0x4784,0x2f92c));function a54_0x4784(){var _0x2c39e0=['global','10109457XwUyOU','1370JfftBr','\x20init`\x20first.','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','project','1846488yQXnCQ','48vQLgCl','430260becjkG','validation','1348908MVIMGc','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','122315hayxOP','2558038HUjQML','42AFddUE'];a54_0x4784=function(){return _0x2c39e0;};return a54_0x4784();}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_0x2c50(_0x47822b,_0x39ccb9){_0x47822b=_0x47822b-0x1cd;var _0x478493=a54_0x4784();var _0x2c5015=_0x478493[_0x47822b];return _0x2c5015;}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x2188ea){var _0x245a92=a54_0x2c50;if(_0x2188ea[_0x245a92(0x1d6)])return _0x245a92(0x1d6);if(!isInProject())throw CliErrors[_0x245a92(0x1d0)](_0x245a92(0x1d2),_0x245a92(0x1da)+CLI_BIN_NAME+_0x245a92(0x1d9));return _0x245a92(0x1db);}export function readScopedConfig(_0x1f5a1e){return readConfigFile(resolveWriteConfigPath(_0x1f5a1e));}export function writeScopedConfig(_0xa1df25,_0x5dc96f){writeConfigFile(resolveWriteConfigPath(_0x5dc96f),_0xa1df25);}
1
+ (function(_0x22002d,_0x8aa2dc){var _0x5bb528=a54_0x4aa5,_0x1999d4=_0x22002d();while(!![]){try{var _0x2acbaa=-parseInt(_0x5bb528(0xfe))/0x1+-parseInt(_0x5bb528(0x103))/0x2+parseInt(_0x5bb528(0xfb))/0x3*(parseInt(_0x5bb528(0x102))/0x4)+parseInt(_0x5bb528(0xff))/0x5+parseInt(_0x5bb528(0x106))/0x6*(parseInt(_0x5bb528(0x100))/0x7)+-parseInt(_0x5bb528(0x105))/0x8+parseInt(_0x5bb528(0x108))/0x9;if(_0x2acbaa===_0x8aa2dc)break;else _0x1999d4['push'](_0x1999d4['shift']());}catch(_0x47aa9e){_0x1999d4['push'](_0x1999d4['shift']());}}}(a54_0x40d3,0x56887));function a54_0x4aa5(_0x15c945,_0x530ea2){_0x15c945=_0x15c945-0xfb;var _0x40d370=a54_0x40d3();var _0x4aa56b=_0x40d370[_0x15c945];return _0x4aa56b;}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_0x40d3(){var _0x38d4c9=['6rkdNeD','validation','5712066iPOKIC','101685fFhckY','global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','42952jDannr','400185SxJUSm','2696561qZDbQl','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','36VFBKPj','1126062tXFCQc','\x20init`\x20first.','3556536GNyfGQ'];a54_0x40d3=function(){return _0x38d4c9;};return a54_0x40d3();}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x19ddd0){var _0x1e73bc=a54_0x4aa5;if(_0x19ddd0['global'])return _0x1e73bc(0xfc);if(!isInProject())throw CliErrors[_0x1e73bc(0x107)](_0x1e73bc(0x101),_0x1e73bc(0xfd)+CLI_BIN_NAME+_0x1e73bc(0x104));return'project';}export function readScopedConfig(_0x287262){return readConfigFile(resolveWriteConfigPath(_0x287262));}export function writeScopedConfig(_0x32be86,_0x199fb2){writeConfigFile(resolveWriteConfigPath(_0x199fb2),_0x32be86);}
@@ -1 +1 @@
1
- const a55_0x1ca9ca=a55_0x2d4d;function a55_0x44a0(){const _0x47873c=['join','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','484Cyeezr','110YZvBlH','214317yfNBwh','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','392KQHqth','filter','6900JaRVmB','370216ECCzBT','118812cSdFfQ','8zPfquf','1gzNWCW','1265KggicT','256191xdTFaC','Filter\x20dataset\x20records\x20with\x20query\x20conditions','99853nroosR','4tTQUIZ','1221878FmAEpv','\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_0x44a0=function(){return _0x47873c;};return a55_0x44a0();}(function(_0x40b2d2,_0x5b8ab7){const _0x38555a=a55_0x2d4d,_0x272492=_0x40b2d2();while(!![]){try{const _0x40e364=-parseInt(_0x38555a(0xeb))/0x1*(-parseInt(_0x38555a(0xe8))/0x2)+-parseInt(_0x38555a(0xed))/0x3*(parseInt(_0x38555a(0xf0))/0x4)+parseInt(_0x38555a(0xec))/0x5*(-parseInt(_0x38555a(0xe7))/0x6)+-parseInt(_0x38555a(0xf1))/0x7*(-parseInt(_0x38555a(0xea))/0x8)+parseInt(_0x38555a(0xf7))/0x9*(parseInt(_0x38555a(0xf6))/0xa)+-parseInt(_0x38555a(0xf5))/0xb*(-parseInt(_0x38555a(0xe9))/0xc)+-parseInt(_0x38555a(0xef))/0xd*(parseInt(_0x38555a(0xf9))/0xe);if(_0x40e364===_0x5b8ab7)break;else _0x272492['push'](_0x272492['shift']());}catch(_0x5be479){_0x272492['push'](_0x272492['shift']());}}}(a55_0x44a0,0x71baa));function a55_0x2d4d(_0x25b5a0,_0x193e6c){_0x25b5a0=_0x25b5a0-0xe7;const _0x44a0d4=a55_0x44a0();let _0x2d4deb=_0x44a0d4[_0x25b5a0];return _0x2d4deb;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':'filter','operation':a55_0x1ca9ca(0xfa),'description':a55_0x1ca9ca(0xee),'paramsRequired':![],'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a55_0x1ca9ca(0xf2),a55_0x1ca9ca(0xf4),a55_0x1ca9ca(0xf8)][a55_0x1ca9ca(0xf3)]('\x0a')});
1
+ const a55_0x3c5af5=a55_0x3e7e;(function(_0x14633c,_0xeff764){const _0x394075=a55_0x3e7e,_0x10f260=_0x14633c();while(!![]){try{const _0x55c1c8=-parseInt(_0x394075(0x182))/0x1+parseInt(_0x394075(0x185))/0x2*(parseInt(_0x394075(0x187))/0x3)+parseInt(_0x394075(0x18b))/0x4+-parseInt(_0x394075(0x17e))/0x5+-parseInt(_0x394075(0x181))/0x6+parseInt(_0x394075(0x18a))/0x7*(parseInt(_0x394075(0x18c))/0x8)+-parseInt(_0x394075(0x17b))/0x9*(-parseInt(_0x394075(0x180))/0xa);if(_0x55c1c8===_0xeff764)break;else _0x10f260['push'](_0x10f260['shift']());}catch(_0x1e5634){_0x10f260['push'](_0x10f260['shift']());}}}(a55_0x23dd,0xa92a8));import{buildDataCommand}from'../../commands/data/shared.js';function a55_0x3e7e(_0x56740a,_0x2e21d2){_0x56740a=_0x56740a-0x17b;const _0x23dd96=a55_0x23dd();let _0x3e7e08=_0x23dd96[_0x56740a];return _0x3e7e08;}export const dataFilter=buildDataCommand({'command':a55_0x3c5af5(0x186),'operation':a55_0x3c5af5(0x186),'description':a55_0x3c5af5(0x17d),'paramsRequired':![],'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a55_0x3c5af5(0x17c),a55_0x3c5af5(0x184),a55_0x3c5af5(0x189),a55_0x3c5af5(0x17f),a55_0x3c5af5(0x188),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a55_0x3c5af5(0x183)]('\x0a')});function a55_0x23dd(){const _0x31820e=['5438536XsMWXC','8IhlbHe','376011CjFotB','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Filter\x20dataset\x20records\x20with\x20query\x20conditions','2132945oUoAZL','\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}]','130liICWK','5053602MHnirF','682885hJGOQJ','join','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','3862vLYfAx','filter','501RWmfYi','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\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]','2935849Gcmfbk'];a55_0x23dd=function(){return _0x31820e;};return a55_0x23dd();}
@@ -1 +1 @@
1
- const a56_0x1a9a2b=a56_0x25d4;(function(_0x28e03a,_0x152e73){const _0x29ad8e=a56_0x25d4,_0x282667=_0x28e03a();while(!![]){try{const _0xd251e1=-parseInt(_0x29ad8e(0xbb))/0x1*(-parseInt(_0x29ad8e(0xbc))/0x2)+parseInt(_0x29ad8e(0xb5))/0x3+parseInt(_0x29ad8e(0xb3))/0x4*(-parseInt(_0x29ad8e(0xb8))/0x5)+-parseInt(_0x29ad8e(0xb9))/0x6*(-parseInt(_0x29ad8e(0xb6))/0x7)+parseInt(_0x29ad8e(0xb2))/0x8+parseInt(_0x29ad8e(0xba))/0x9*(-parseInt(_0x29ad8e(0xb1))/0xa)+-parseInt(_0x29ad8e(0xb7))/0xb;if(_0xd251e1===_0x152e73)break;else _0x282667['push'](_0x282667['shift']());}catch(_0x3de479){_0x282667['push'](_0x282667['shift']());}}}(a56_0x58f8,0xe0b1c));function a56_0x58f8(){const _0x346b7c=['63OHWklL','635CpQVGJ','194wnHnlS','getOne','384530YzxlSe','6770088tvjnLx','8616GxaQMk','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','2241201gTzmYQ','57659gDmpKk','933042UhjqCT','1610KUXwaf','228vFZLqI'];a56_0x58f8=function(){return _0x346b7c;};return a56_0x58f8();}import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x25d4(_0x190ee4,_0x3e01a2){_0x190ee4=_0x190ee4-0xb1;const _0x58f876=a56_0x58f8();let _0x25d45e=_0x58f876[_0x190ee4];return _0x25d45e;}export const dataGetOne=buildDataCommand({'command':a56_0x1a9a2b(0xbd),'operation':'getOne','description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a56_0x1a9a2b(0xb4)});
1
+ function a56_0x53e3(_0x5e6cda,_0x4c062a){_0x5e6cda=_0x5e6cda-0x64;const _0x1b620f=a56_0x1b62();let _0x53e33c=_0x1b620f[_0x5e6cda];return _0x53e33c;}const a56_0x3d5698=a56_0x53e3;(function(_0x2e5371,_0x529d1b){const _0x2aaf30=a56_0x53e3,_0x2c4f8e=_0x2e5371();while(!![]){try{const _0xa7ec2e=parseInt(_0x2aaf30(0x66))/0x1+-parseInt(_0x2aaf30(0x6d))/0x2+parseInt(_0x2aaf30(0x67))/0x3*(-parseInt(_0x2aaf30(0x65))/0x4)+parseInt(_0x2aaf30(0x69))/0x5+parseInt(_0x2aaf30(0x6e))/0x6*(parseInt(_0x2aaf30(0x6a))/0x7)+parseInt(_0x2aaf30(0x70))/0x8*(-parseInt(_0x2aaf30(0x6b))/0x9)+-parseInt(_0x2aaf30(0x64))/0xa;if(_0xa7ec2e===_0x529d1b)break;else _0x2c4f8e['push'](_0x2c4f8e['shift']());}catch(_0x196101){_0x2c4f8e['push'](_0x2c4f8e['shift']());}}}(a56_0x1b62,0x1d4f7));import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x1b62(){const _0x2e0090=['21QURcew','24210dsoDvE','getOne','113314EECOyd','363648XaUigV','Get\x20a\x20single\x20record\x20by\x20ID','16guRbiG','654440XPYJJt','611092iWmgWN','96211iEhxcs','3krsyxe','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','611370YYWyOU'];a56_0x1b62=function(){return _0x2e0090;};return a56_0x1b62();}export const dataGetOne=buildDataCommand({'command':'getOne','operation':a56_0x3d5698(0x6c),'description':a56_0x3d5698(0x6f),'paramsRequired':!![],'paramsHint':a56_0x3d5698(0x68)});
@@ -1 +1 @@
1
- (function(_0x54ee59,_0x36c0bb){const _0x239c18=a57_0x1fd6,_0x3a2cba=_0x54ee59();while(!![]){try{const _0x5a2772=-parseInt(_0x239c18(0x122))/0x1+parseInt(_0x239c18(0x123))/0x2+parseInt(_0x239c18(0x124))/0x3*(-parseInt(_0x239c18(0x11b))/0x4)+parseInt(_0x239c18(0x125))/0x5*(parseInt(_0x239c18(0x11d))/0x6)+-parseInt(_0x239c18(0x11e))/0x7*(-parseInt(_0x239c18(0x11c))/0x8)+-parseInt(_0x239c18(0x121))/0x9+parseInt(_0x239c18(0x120))/0xa*(parseInt(_0x239c18(0x11f))/0xb);if(_0x5a2772===_0x36c0bb)break;else _0x3a2cba['push'](_0x3a2cba['shift']());}catch(_0x399f94){_0x3a2cba['push'](_0x3a2cba['shift']());}}}(a57_0x51fe,0xdc127));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a57_0x1fd6(_0x231f36,_0x4061f6){_0x231f36=_0x231f36-0x11b;const _0x51fe41=a57_0x51fe();let _0x1fd685=_0x51fe41[_0x231f36];return _0x1fd685;}function a57_0x51fe(){const _0x334596=['3DuSDWM','80nYBOyU','2620712kmwOJT','16fryliW','107466LRtQfK','1278634CybowI','44PuVMMp','5162410gdjpHi','14276727dowfwO','379385SddrZh','1610834WFljNv'];a57_0x51fe=function(){return _0x334596;};return a57_0x51fe();}export const dataDefinitions=[dataFilter,dataGetOne];
1
+ function a57_0x429f(){const _0x130d50=['194krEYPp','14814970lFwMhV','6904440tTCwgj','15535mfIwrQ','11PJBBwi','4NPrkib','16dagcvs','1597752LmEyFy','16134djmLlC','3070374rnRLAG','4990286sytSWg','805jxgPGf'];a57_0x429f=function(){return _0x130d50;};return a57_0x429f();}(function(_0xdb5edd,_0x8fb6d9){const _0x3f1f3d=a57_0x20db,_0x5585a9=_0xdb5edd();while(!![]){try{const _0x2687ca=-parseInt(_0x3f1f3d(0x6d))/0x1*(parseInt(_0x3f1f3d(0x6a))/0x2)+-parseInt(_0x3f1f3d(0x73))/0x3*(parseInt(_0x3f1f3d(0x6f))/0x4)+parseInt(_0x3f1f3d(0x69))/0x5*(-parseInt(_0x3f1f3d(0x72))/0x6)+parseInt(_0x3f1f3d(0x74))/0x7+parseInt(_0x3f1f3d(0x70))/0x8*(parseInt(_0x3f1f3d(0x6c))/0x9)+parseInt(_0x3f1f3d(0x6b))/0xa+parseInt(_0x3f1f3d(0x6e))/0xb*(parseInt(_0x3f1f3d(0x71))/0xc);if(_0x2687ca===_0x8fb6d9)break;else _0x5585a9['push'](_0x5585a9['shift']());}catch(_0x5bfd26){_0x5585a9['push'](_0x5585a9['shift']());}}}(a57_0x429f,0xdb613));import{dataFilter}from'../../commands/data/filter.js';function a57_0x20db(_0xf3797f,_0x428299){_0xf3797f=_0xf3797f-0x69;const _0x429faf=a57_0x429f();let _0x20db15=_0x429faf[_0xf3797f];return _0x20db15;}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x2d9f24,_0x1dbd11){const _0x3f74be=a58_0x3d59,_0x293539=_0x2d9f24();while(!![]){try{const _0x5b0752=parseInt(_0x3f74be(0xd0))/0x1+-parseInt(_0x3f74be(0xd5))/0x2*(-parseInt(_0x3f74be(0xbe))/0x3)+-parseInt(_0x3f74be(0xc9))/0x4*(parseInt(_0x3f74be(0xc7))/0x5)+-parseInt(_0x3f74be(0xbd))/0x6+parseInt(_0x3f74be(0xd8))/0x7*(-parseInt(_0x3f74be(0xc5))/0x8)+parseInt(_0x3f74be(0xcc))/0x9+-parseInt(_0x3f74be(0xc6))/0xa*(-parseInt(_0x3f74be(0xc1))/0xb);if(_0x5b0752===_0x1dbd11)break;else _0x293539['push'](_0x293539['shift']());}catch(_0x406008){_0x293539['push'](_0x293539['shift']());}}}(a58_0x119e,0xaf470));function a58_0x3d59(_0x6977e6,_0x530da2){_0x6977e6=_0x6977e6-0xbd;const _0x119e6f=a58_0x119e();let _0x3d5989=_0x119e6f[_0x6977e6];return _0x3d5989;}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x33f13a){const _0x4dd25c=a58_0x3d59;if(!_0x33f13a)throw CliErrors[_0x4dd25c(0xce)]('params',_0x4dd25c(0xd1));const _0x38d427=_0x33f13a['id'];if(_0x38d427===undefined||_0x38d427===null||_0x38d427==='')throw CliErrors[_0x4dd25c(0xbf)](_0x4dd25c(0xd3),_0x4dd25c(0xd6));}function a58_0x119e(){const _0x4f7217=['7mRlBid','appCode','params','str','8490750AkieyP','27CSMAwb','validation','string','11yQZoEZ','operation','\x20completed\x20in\x20','paramsRequired','6942904fQFtzN','30432570fEAwOa','5pxLGLU','read','5192644HVNvGI','code','description','189405dzfDyz','helpExtra','flagMissing','command','266149OYWUio','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','paramsHint','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','data\x20','215252xQChFp','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','now'];a58_0x119e=function(){return _0x4f7217;};return a58_0x119e();}function parseCommandParams(_0x1bd889){return parseJsonParams(_0x1bd889)??{};}export function buildDataCommand(_0x286133){const _0x26d379=a58_0x3d59,_0x1935c1='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':'data','command':_0x286133[_0x26d379(0xcf)],'description':_0x286133[_0x26d379(0xcb)],'risk':_0x26d379(0xc8),'defaultOutputFormat':'compress','helpExtra':_0x286133[_0x26d379(0xcd)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x26d379(0xc0),'description':_0x1935c1},{'name':'params','type':_0x26d379(0xc0),'description':_0x286133['paramsHint']}],async 'validate'(_0x5a0907){const _0x2a1931=_0x26d379,_0x5d6733=_0x5a0907['str'](_0x2a1931(0xda));if(_0x286133[_0x2a1931(0xc4)]&&!_0x5d6733)throw CliErrors['flagMissing']('params',_0x286133[_0x2a1931(0xd2)]);const _0x3018c2=parseJsonParams(_0x5d6733);_0x286133[_0x2a1931(0xc2)]==='getOne'&&assertGetOneId(_0x3018c2);},async 'execute'(_0x481ffa){const _0x473523=_0x26d379,_0x164327=parseCommandParams(_0x481ffa[_0x473523(0xdb)](_0x473523(0xda))),_0xf56ff6=Date[_0x473523(0xd7)](),_0x83dd97=await executeDatasetDataOperation(_0x481ffa[_0x473523(0xd9)],_0x481ffa[_0x473523(0xdb)](_0x473523(0xca)),_0x286133[_0x473523(0xc2)],_0x164327),_0x45ac29=Date['now']()-_0xf56ff6;return{'ok':!![],'data':{'result':_0x83dd97,'elapsed':_0x45ac29},'message':_0x473523(0xd4)+_0x286133['command']+_0x473523(0xc3)+_0x45ac29+'ms'};}};}
1
+ (function(_0x44bffa,_0x4e5f65){const _0x351b6c=a58_0x8aab,_0x5e05c1=_0x44bffa();while(!![]){try{const _0x339140=-parseInt(_0x351b6c(0x14e))/0x1*(-parseInt(_0x351b6c(0x142))/0x2)+-parseInt(_0x351b6c(0x143))/0x3*(parseInt(_0x351b6c(0x158))/0x4)+-parseInt(_0x351b6c(0x159))/0x5*(parseInt(_0x351b6c(0x14f))/0x6)+-parseInt(_0x351b6c(0x145))/0x7+parseInt(_0x351b6c(0x146))/0x8+parseInt(_0x351b6c(0x148))/0x9*(parseInt(_0x351b6c(0x14d))/0xa)+parseInt(_0x351b6c(0x15c))/0xb;if(_0x339140===_0x4e5f65)break;else _0x5e05c1['push'](_0x5e05c1['shift']());}catch(_0x470224){_0x5e05c1['push'](_0x5e05c1['shift']());}}}(a58_0x5842,0x9a595));import{executeDatasetDataOperation}from'../../core/api-client.js';function a58_0x5842(){const _0x58811b=['appCode','1081380fmeAWL','1UdShCL','282030MNGLhI','paramsRequired','code','data\x20','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','flagMissing','helpExtra','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','compress','8qTsaPp','30thnVRT','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','\x20completed\x20in\x20','9594200KHkMyG','str','description','string','paramsHint','now','427122DiYnli','617979IplctE','data','5743381HFlyqI','5892296OuSQeB','read','27GoGanp','params','command','alias'];a58_0x5842=function(){return _0x58811b;};return a58_0x5842();}function a58_0x8aab(_0x3b0692,_0x482bb7){_0x3b0692=_0x3b0692-0x140;const _0x5842bd=a58_0x5842();let _0x8aab4a=_0x5842bd[_0x3b0692];return _0x8aab4a;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x5ca118){const _0x18c411=a58_0x8aab;if(!_0x5ca118)throw CliErrors[_0x18c411(0x154)](_0x18c411(0x149),_0x18c411(0x153));const _0x669ddd=_0x5ca118['id'];if(_0x669ddd===undefined||_0x669ddd===null||_0x669ddd==='')throw CliErrors['validation'](_0x18c411(0x156),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x22ab9b){return parseJsonParams(_0x22ab9b)??{};}export function buildDataCommand(_0x18b5dc){const _0x10ad26=a58_0x8aab,_0x43885f=_0x10ad26(0x15a);return{'service':_0x10ad26(0x144),'command':_0x18b5dc[_0x10ad26(0x14a)],'description':_0x18b5dc[_0x10ad26(0x15e)],'risk':_0x10ad26(0x147),'defaultOutputFormat':_0x10ad26(0x157),'helpExtra':_0x18b5dc[_0x10ad26(0x155)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x10ad26(0x14b),'type':_0x10ad26(0x15f),'description':_0x43885f},{'name':_0x10ad26(0x149),'type':'string','description':_0x18b5dc[_0x10ad26(0x140)]}],async 'validate'(_0x4bee3c){const _0x261656=_0x10ad26,_0x7b8da3=_0x4bee3c['str'](_0x261656(0x149));if(_0x18b5dc[_0x261656(0x150)]&&!_0x7b8da3)throw CliErrors['flagMissing']('params',_0x18b5dc[_0x261656(0x140)]);const _0x2a2a48=parseJsonParams(_0x7b8da3);_0x18b5dc['operation']==='getOne'&&assertGetOneId(_0x2a2a48);},async 'execute'(_0xf7be23){const _0x1e4fc6=_0x10ad26,_0x25498f=parseCommandParams(_0xf7be23[_0x1e4fc6(0x15d)](_0x1e4fc6(0x149))),_0x402d5d=Date[_0x1e4fc6(0x141)](),_0x47c298=await executeDatasetDataOperation(_0xf7be23[_0x1e4fc6(0x14c)],_0xf7be23[_0x1e4fc6(0x15d)](_0x1e4fc6(0x151)),_0x18b5dc['operation'],_0x25498f),_0x468506=Date['now']()-_0x402d5d;return{'ok':!![],'data':{'result':_0x47c298,'elapsed':_0x468506},'message':_0x1e4fc6(0x152)+_0x18b5dc[_0x1e4fc6(0x14a)]+_0x1e4fc6(0x15b)+_0x468506+'ms'};}};}
@@ -1 +1 @@
1
- const a59_0xc4451c=a59_0x112f;(function(_0x479b73,_0x216a83){const _0x39d5d6=a59_0x112f,_0x15d312=_0x479b73();while(!![]){try{const _0x5b1b9e=parseInt(_0x39d5d6(0x1c3))/0x1*(parseInt(_0x39d5d6(0x1a9))/0x2)+-parseInt(_0x39d5d6(0x1c5))/0x3+parseInt(_0x39d5d6(0x1a3))/0x4+parseInt(_0x39d5d6(0x1b0))/0x5+parseInt(_0x39d5d6(0x1a7))/0x6+-parseInt(_0x39d5d6(0x1bd))/0x7+-parseInt(_0x39d5d6(0x1e2))/0x8;if(_0x5b1b9e===_0x216a83)break;else _0x15d312['push'](_0x15d312['shift']());}catch(_0xeebf97){_0x15d312['push'](_0x15d312['shift']());}}}(a59_0x4cd4,0xef471));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_0xc4451c(0x1b2);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x2944b4,input:_0x52b72a,dryRun:_0x5134a9}){const _0x261978=a59_0xc4451c;validateInput(_0x52b72a);const _0x31eba9=normalizeBusinessGroup(_0x52b72a[_0x261978(0x1bf)]),_0x30bfbe=await getDatasetDetail(_0x52b72a['code']),_0x3d3033=resolveBusinessGroupDataset(_0x30bfbe,_0x52b72a['code']),_0x4379dc=loadCurrentBusinessGroup(_0x30bfbe,_0x3d3033);assertExpectedBusinessGroup(_0x4379dc,_0x52b72a[_0x261978(0x1ca)]);const _0x30419e=buildBackendPayload(_0x2944b4,_0x3d3033,_0x31eba9),_0x2cae7c=_0x4379dc!==_0x31eba9;let _0x379d86;if(_0x2cae7c&&!_0x5134a9){await updateErBusinessGroup(_0x30419e);const _0x50f740=await getDatasetDetail(_0x3d3033[_0x261978(0x1d2)]),_0x2ab709=resolveBusinessGroupDataset(_0x50f740,_0x3d3033[_0x261978(0x1d2)]),_0x4972e2=loadCurrentBusinessGroup(_0x50f740,_0x2ab709);if(_0x4972e2!==_0x31eba9)throw CliErrors[_0x261978(0x1b1)](_0x261978(0x1c4),'Expected\x20'+JSON['stringify'](_0x31eba9)+',\x20actual\x20'+JSON[_0x261978(0x1b7)](_0x4972e2)+'.');_0x379d86={'verified':!![],'status':_0x261978(0x1cb),'afterReadback':{'businessGroup':_0x4972e2}};}else!_0x2cae7c&&(_0x379d86={'verified':!![],'status':_0x261978(0x1ba),'afterReadback':{'businessGroup':_0x4379dc}});const _0x1e5cd4={'operation':_0x261978(0x1b9),'appCode':_0x2944b4,'selector':{'code':_0x3d3033[_0x261978(0x1d2)]},'dataset':_0x3d3033,'before':{'businessGroup':_0x4379dc},'after':{'businessGroup':_0x31eba9},'changed':_0x2cae7c,'dryRun':_0x5134a9,'submitted':_0x2cae7c&&!_0x5134a9,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x30419e},..._0x379d86?{'verification':_0x379d86}:{},'warnings':[]};return{'ok':!![],'data':_0x1e5cd4,'message':_0x2cae7c?_0x5134a9?_0x261978(0x1bb)+_0x3d3033[_0x261978(0x1d2)]:_0x261978(0x1df)+_0x3d3033['code']:_0x261978(0x1de)+_0x3d3033[_0x261978(0x1d2)]};}export const datasetBusinessGroupUpdate={'service':a59_0xc4451c(0x1b8),'command':a59_0xc4451c(0x1a1),'description':'Update\x20business\x20model\x20group','risk':a59_0xc4451c(0x1c1),'flags':[CODE_FLAG,{'name':a59_0xc4451c(0x1d8),'type':a59_0xc4451c(0x1db),'required':!![],'description':a59_0xc4451c(0x1d3)},{'name':a59_0xc4451c(0x1c8),'type':a59_0xc4451c(0x1db),'required':![],'description':a59_0xc4451c(0x1c2)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x53ab2){validateInput(readBusinessGroupUpdateInput(_0x53ab2));},async 'dryRun'(_0x4f9f33){const _0x1c17d0=a59_0xc4451c,_0x1f4f7b=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4f9f33[_0x1c17d0(0x1a8)],'input':readBusinessGroupUpdateInput(_0x4f9f33),'dryRun':!![]});return{'method':_0x1c17d0(0x1dd),'url':BACKEND_PATH,'body':_0x1f4f7b[_0x1c17d0(0x1ac)][_0x1c17d0(0x1e1)][_0x1c17d0(0x1da)],'description':_0x1f4f7b['message'],..._0x1f4f7b['data']};},async 'execute'(_0x24cd63){const _0x46c035=a59_0xc4451c;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x24cd63[_0x46c035(0x1a8)],'input':readBusinessGroupUpdateInput(_0x24cd63),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1067a0){const _0x5a2014=a59_0xc4451c,_0x54355c=_0x1067a0[_0x5a2014(0x1e0)](_0x5a2014(0x1c8));return{'code':trim(_0x1067a0[_0x5a2014(0x1e0)](_0x5a2014(0x1d2))),'businessGroup':_0x1067a0['str'](_0x5a2014(0x1d8)),'expectBusinessGroup':_0x54355c===undefined||_0x54355c===''?undefined:_0x54355c};}function validateInput(_0xfa0d6e){const _0x3ddbc5=a59_0xc4451c;if(!trim(_0xfa0d6e[_0x3ddbc5(0x1d2)]))throw CliErrors[_0x3ddbc5(0x1d4)]('--code\x20is\x20required');if(_0xfa0d6e[_0x3ddbc5(0x1bf)]===undefined)throw CliErrors[_0x3ddbc5(0x1d4)](_0x3ddbc5(0x1d7));}function resolveBusinessGroupDataset(_0x51ae09,_0x2672c3){const _0x149338=a59_0xc4451c,_0x2b5744=asPlainObject(_0x51ae09[_0x149338(0x1b8)]),_0x72a357=asPlainObject(_0x51ae09[_0x149338(0x1a5)]),_0x1ba109=resolveSourceType(_0x51ae09,_0x2b5744,_0x72a357),_0xeb49=firstString(_0x51ae09[_0x149338(0x1d9)],_0x51ae09[_0x149338(0x1d2)],_0x2b5744[_0x149338(0x1c7)],_0x2672c3)||_0x2672c3;return{'id':firstNumber(_0x51ae09[_0x149338(0x1cd)],_0x51ae09['id'],_0x2b5744[_0x149338(0x1af)])??firstString(_0x51ae09['modelId'],_0x51ae09['id'],_0x2b5744[_0x149338(0x1af)])??null,'code':_0xeb49,'name':firstString(_0x51ae09[_0x149338(0x1b3)],_0x2b5744[_0x149338(0x1aa)],_0x2b5744[_0x149338(0x1b3)])||null,'sourceType':_0x1ba109};}function resolveSourceType(_0x42e825,_0x29ddc0,_0x2d80a7){const _0x227cd9=a59_0xc4451c,_0x3224bc=firstString(_0x42e825[_0x227cd9(0x1c0)],_0x42e825[_0x227cd9(0x1a4)],_0x29ddc0[_0x227cd9(0x1c0)],_0x29ddc0['sourceType'])?.['trim']()[_0x227cd9(0x1bc)]();if(_0x3224bc===_0x227cd9(0x1ad)||_0x3224bc===_0x227cd9(0x1be))return _0x3224bc;if(Object[_0x227cd9(0x1cf)](_0x2d80a7)[_0x227cd9(0x1d6)]>0x0)return'DB_TABLE';throw CliErrors[_0x227cd9(0x1d4)](_0x227cd9(0x1d0));}function loadCurrentBusinessGroup(_0x37f211,_0x547a55){const _0x59a6b8=a59_0xc4451c,_0x3e0e87=readBusinessGroupFromDatasetDetail(_0x37f211,_0x547a55['sourceType']);if(_0x3e0e87['found'])return normalizeBusinessGroup(_0x3e0e87['value']);if(_0x547a55[_0x59a6b8(0x1a4)]===_0x59a6b8(0x1be))return'';throw CliErrors[_0x59a6b8(0x1d4)](_0x59a6b8(0x1a6),_0x59a6b8(0x1b5));}function readBusinessGroupFromDatasetDetail(_0x3f537f,_0x21c31d){const _0x3ed4e3=a59_0xc4451c,_0x419a7f=asPlainObject(_0x3f537f[_0x3ed4e3(0x1b8)]),_0x53e17a=firstPresent(_0x3f537f[_0x3ed4e3(0x1bf)]);if(_0x53e17a[_0x3ed4e3(0x1c9)])return _0x53e17a;const _0x423d03=firstPresent(_0x419a7f['businessGroup']);if(_0x423d03[_0x3ed4e3(0x1c9)])return _0x423d03;if(_0x21c31d===_0x3ed4e3(0x1ad))return{'found':![]};const _0x551cd5=readBusinessGroupFromExtend(_0x3f537f[_0x3ed4e3(0x1a2)]);if(_0x551cd5['found'])return _0x551cd5;return readBusinessGroupFromExtend(_0x419a7f[_0x3ed4e3(0x1a2)]);}function readBusinessGroupFromExtend(_0x5e1411){const _0x33dc17=a59_0xc4451c;if(_0x5e1411===undefined||_0x5e1411===null||_0x5e1411==='')return{'found':![]};if(typeof _0x5e1411===_0x33dc17(0x1db))try{const _0x31ee28=JSON['parse'](_0x5e1411);return readBusinessGroupFromExtend(_0x31ee28);}catch{return{'found':![]};}const _0x2ae931=asPlainObject(_0x5e1411);if(Object[_0x33dc17(0x1d5)][_0x33dc17(0x1b6)][_0x33dc17(0x1ab)](_0x2ae931,_0x33dc17(0x1bf)))return{'found':!![],'value':_0x2ae931['businessGroup']};return{'found':![]};}function firstPresent(..._0x2bfbdd){for(const _0x547ce6 of _0x2bfbdd){if(_0x547ce6!==undefined&&_0x547ce6!==null)return{'found':!![],'value':_0x547ce6};}return{'found':![]};}function assertExpectedBusinessGroup(_0x179bf0,_0x38757a){const _0x4b0a1a=a59_0xc4451c;if(_0x38757a===undefined)return;const _0x1e9fb8=normalizeBusinessGroup(_0x38757a);if(_0x179bf0!==_0x1e9fb8)throw CliErrors['validation'](_0x4b0a1a(0x1b4),_0x4b0a1a(0x1c6)+JSON['stringify'](_0x1e9fb8)+',\x20actual\x20'+JSON['stringify'](_0x179bf0));}function buildBackendPayload(_0x55c4bb,_0x28ff1c,_0x9ef7f5){const _0x306525=a59_0xc4451c;return{'appCode':_0x55c4bb,'datasetCode':_0x28ff1c[_0x306525(0x1d2)],'businessGroup':_0x9ef7f5};}function normalizeBusinessGroup(_0x40ba78){const _0x32f0da=a59_0xc4451c;if(_0x40ba78===undefined||_0x40ba78===null)return'';return String(_0x40ba78)[_0x32f0da(0x1ae)]();}function a59_0x4cd4(){const _0x23e250=['Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','isArray','code','New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it','validation','prototype','length','--business-group\x20is\x20required','business-group','modelCode','payload','string','number','POST','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','Updated\x20business\x20model\x20group\x20for\x20dataset\x20','str','backend','14529544eYzkNA','business-group-update','extend','3304156JyuXpA','sourceType','dbtableConfig','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','7112982nYYWza','appCode','2780354DJYiUs','datasetName','call','data','DB_TABLE','trim','datasetId','6822700tSJsNv','apiError','/smartapi/question/er-config/business-group/edit','name','Expectation\x20mismatch\x20at\x20businessGroup','Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','hasOwnProperty','stringify','dataset','update','unchanged','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','toUpperCase','13344912BiZspG','METADATA','businessGroup','source','write','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','1HPILwn','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','190689liShbd','Expected\x20','datasetCode','expect-business-group','found','expectBusinessGroup','matched','isFinite','modelId','object','keys'];a59_0x4cd4=function(){return _0x23e250;};return a59_0x4cd4();}function asPlainObject(_0x320d5e){const _0x382a81=a59_0xc4451c;if(!_0x320d5e||typeof _0x320d5e!==_0x382a81(0x1ce)||Array[_0x382a81(0x1d1)](_0x320d5e))return{};return _0x320d5e;}function firstString(..._0x3b4cfa){const _0x2ddac2=a59_0xc4451c;for(const _0x2b9a45 of _0x3b4cfa){if(typeof _0x2b9a45===_0x2ddac2(0x1db)&&_0x2b9a45[_0x2ddac2(0x1ae)]())return _0x2b9a45[_0x2ddac2(0x1ae)]();if(typeof _0x2b9a45===_0x2ddac2(0x1dc)&&Number[_0x2ddac2(0x1cc)](_0x2b9a45))return String(_0x2b9a45);}return undefined;}function a59_0x112f(_0x13c678,_0x1b8b92){_0x13c678=_0x13c678-0x1a1;const _0x4cd426=a59_0x4cd4();let _0x112f57=_0x4cd426[_0x13c678];return _0x112f57;}function firstNumber(..._0x6ce0a){const _0x3d4a40=a59_0xc4451c;for(const _0x1cb416 of _0x6ce0a){if(typeof _0x1cb416==='number'&&Number[_0x3d4a40(0x1cc)](_0x1cb416))return _0x1cb416;if(typeof _0x1cb416==='string'&&_0x1cb416[_0x3d4a40(0x1ae)]()&&Number[_0x3d4a40(0x1cc)](Number(_0x1cb416)))return Number(_0x1cb416);}return null;}function trim(_0x5b6db4){const _0x6eeecc=a59_0xc4451c;return String(_0x5b6db4||'')[_0x6eeecc(0x1ae)]();}
1
+ function a59_0x375b(_0x55af21,_0x580b2e){_0x55af21=_0x55af21-0x1d1;const _0x4c2e85=a59_0x4c2e();let _0x375b3a=_0x4c2e85[_0x55af21];return _0x375b3a;}const a59_0x3beea6=a59_0x375b;(function(_0x152503,_0x4cce13){const _0x2e6faf=a59_0x375b,_0x59ff01=_0x152503();while(!![]){try{const _0x5cebd9=parseInt(_0x2e6faf(0x1e3))/0x1+-parseInt(_0x2e6faf(0x1d7))/0x2+-parseInt(_0x2e6faf(0x1db))/0x3+-parseInt(_0x2e6faf(0x1e7))/0x4+parseInt(_0x2e6faf(0x1f3))/0x5+parseInt(_0x2e6faf(0x1e9))/0x6*(parseInt(_0x2e6faf(0x1d9))/0x7)+parseInt(_0x2e6faf(0x1e5))/0x8*(parseInt(_0x2e6faf(0x1d4))/0x9);if(_0x5cebd9===_0x4cce13)break;else _0x59ff01['push'](_0x59ff01['shift']());}catch(_0x45aec7){_0x59ff01['push'](_0x59ff01['shift']());}}}(a59_0x4c2e,0x70484));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_0x3beea6(0x1ff);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x38e6b4,input:_0x5f6b36,dryRun:_0x57344b}){const _0x45e3fb=a59_0x3beea6;validateInput(_0x5f6b36);const _0x2d055a=normalizeBusinessGroup(_0x5f6b36['businessGroup']),_0x2ec842=await getDatasetDetail(_0x5f6b36[_0x45e3fb(0x1e8)]),_0x3f9012=resolveBusinessGroupDataset(_0x2ec842,_0x5f6b36['code']),_0x6ace0b=loadCurrentBusinessGroup(_0x2ec842,_0x3f9012);assertExpectedBusinessGroup(_0x6ace0b,_0x5f6b36['expectBusinessGroup']);const _0x477d75=buildBackendPayload(_0x38e6b4,_0x3f9012,_0x2d055a),_0x42c256=_0x6ace0b!==_0x2d055a;let _0x1b819e;if(_0x42c256&&!_0x57344b){await updateErBusinessGroup(_0x477d75);const _0x45d415=await getDatasetDetail(_0x3f9012[_0x45e3fb(0x1e8)]),_0x37d643=resolveBusinessGroupDataset(_0x45d415,_0x3f9012['code']),_0x5c5c35=loadCurrentBusinessGroup(_0x45d415,_0x37d643);if(_0x5c5c35!==_0x2d055a)throw CliErrors[_0x45e3fb(0x1df)]('Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x45e3fb(0x1d1)+JSON[_0x45e3fb(0x201)](_0x2d055a)+_0x45e3fb(0x209)+JSON[_0x45e3fb(0x201)](_0x5c5c35)+'.');_0x1b819e={'verified':!![],'status':_0x45e3fb(0x1e4),'afterReadback':{'businessGroup':_0x5c5c35}};}else!_0x42c256&&(_0x1b819e={'verified':!![],'status':_0x45e3fb(0x1ee),'afterReadback':{'businessGroup':_0x6ace0b}});const _0x41260e={'operation':_0x45e3fb(0x208),'appCode':_0x38e6b4,'selector':{'code':_0x3f9012[_0x45e3fb(0x1e8)]},'dataset':_0x3f9012,'before':{'businessGroup':_0x6ace0b},'after':{'businessGroup':_0x2d055a},'changed':_0x42c256,'dryRun':_0x57344b,'submitted':_0x42c256&&!_0x57344b,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x477d75},..._0x1b819e?{'verification':_0x1b819e}:{},'warnings':[]};return{'ok':!![],'data':_0x41260e,'message':_0x42c256?_0x57344b?_0x45e3fb(0x1d5)+_0x3f9012[_0x45e3fb(0x1e8)]:'Updated\x20business\x20model\x20group\x20for\x20dataset\x20'+_0x3f9012[_0x45e3fb(0x1e8)]:'No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20'+_0x3f9012['code']};}function a59_0x4c2e(){const _0x396865=['DB_TABLE','toUpperCase','update',',\x20actual\x20','isFinite','appCode','extend','keys','trim','Expected\x20','--business-group\x20is\x20required','string','702ezGEgJ','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','length','1652566BXeiEK','payload','84IsPmJg','Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','476850yEpGSG','prototype','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','business-group','apiError','name','backend','sourceType','319390khhfXa','matched','56808ZkmmCJ','dbtableConfig','1627392usqqYz','code','367194vZwrfr','found','datasetName','datasetId','validation','unchanged','parse','modelId','dataset','businessGroup','1221665aLZfYP','expect-business-group','datasetCode','number','object','str','write','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','Update\x20business\x20model\x20group','value','METADATA','data','/smartapi/question/er-config/business-group/edit','isArray','stringify','source','message','New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it','Expectation\x20mismatch\x20at\x20businessGroup'];a59_0x4c2e=function(){return _0x396865;};return a59_0x4c2e();}export const datasetBusinessGroupUpdate={'service':a59_0x3beea6(0x1f1),'command':'business-group-update','description':a59_0x3beea6(0x1fb),'risk':a59_0x3beea6(0x1f9),'flags':[CODE_FLAG,{'name':'business-group','type':a59_0x3beea6(0x1d3),'required':!![],'description':a59_0x3beea6(0x204)},{'name':a59_0x3beea6(0x1f4),'type':'string','required':![],'description':'Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xbd40c9){validateInput(readBusinessGroupUpdateInput(_0xbd40c9));},async 'dryRun'(_0x4a2d34){const _0x460702=a59_0x3beea6,_0x109591=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4a2d34[_0x460702(0x20b)],'input':readBusinessGroupUpdateInput(_0x4a2d34),'dryRun':!![]});return{'method':'POST','url':BACKEND_PATH,'body':_0x109591[_0x460702(0x1fe)][_0x460702(0x1e1)][_0x460702(0x1d8)],'description':_0x109591[_0x460702(0x203)],..._0x109591[_0x460702(0x1fe)]};},async 'execute'(_0x37a239){const _0x3f211d=a59_0x3beea6;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x37a239[_0x3f211d(0x20b)],'input':readBusinessGroupUpdateInput(_0x37a239),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x45227b){const _0x5ecc64=a59_0x3beea6,_0x4ec7a8=_0x45227b[_0x5ecc64(0x1f8)](_0x5ecc64(0x1f4));return{'code':trim(_0x45227b[_0x5ecc64(0x1f8)](_0x5ecc64(0x1e8))),'businessGroup':_0x45227b[_0x5ecc64(0x1f8)](_0x5ecc64(0x1de)),'expectBusinessGroup':_0x4ec7a8===undefined||_0x4ec7a8===''?undefined:_0x4ec7a8};}function validateInput(_0x439f6d){const _0x141e7c=a59_0x3beea6;if(!trim(_0x439f6d['code']))throw CliErrors[_0x141e7c(0x1ed)]('--code\x20is\x20required');if(_0x439f6d['businessGroup']===undefined)throw CliErrors[_0x141e7c(0x1ed)](_0x141e7c(0x1d2));}function resolveBusinessGroupDataset(_0x36e5b0,_0x318711){const _0x1bb860=a59_0x3beea6,_0x106e8d=asPlainObject(_0x36e5b0['dataset']),_0x3082b9=asPlainObject(_0x36e5b0[_0x1bb860(0x1e6)]),_0x1c3393=resolveSourceType(_0x36e5b0,_0x106e8d,_0x3082b9),_0x3df182=firstString(_0x36e5b0['modelCode'],_0x36e5b0['code'],_0x106e8d[_0x1bb860(0x1f5)],_0x318711)||_0x318711;return{'id':firstNumber(_0x36e5b0[_0x1bb860(0x1f0)],_0x36e5b0['id'],_0x106e8d[_0x1bb860(0x1ec)])??firstString(_0x36e5b0['modelId'],_0x36e5b0['id'],_0x106e8d[_0x1bb860(0x1ec)])??null,'code':_0x3df182,'name':firstString(_0x36e5b0[_0x1bb860(0x1e0)],_0x106e8d[_0x1bb860(0x1eb)],_0x106e8d[_0x1bb860(0x1e0)])||null,'sourceType':_0x1c3393};}function resolveSourceType(_0x4e803d,_0x3d04be,_0x4317e9){const _0x40badb=a59_0x3beea6,_0x289bde=firstString(_0x4e803d[_0x40badb(0x202)],_0x4e803d[_0x40badb(0x1e2)],_0x3d04be['source'],_0x3d04be[_0x40badb(0x1e2)])?.[_0x40badb(0x20e)]()[_0x40badb(0x207)]();if(_0x289bde===_0x40badb(0x206)||_0x289bde==='METADATA')return _0x289bde;if(Object[_0x40badb(0x20d)](_0x4317e9)[_0x40badb(0x1d6)]>0x0)return _0x40badb(0x206);throw CliErrors[_0x40badb(0x1ed)](_0x40badb(0x1dd));}function loadCurrentBusinessGroup(_0x256f4f,_0x3d85ca){const _0x29b38f=a59_0x3beea6,_0x10c627=readBusinessGroupFromDatasetDetail(_0x256f4f,_0x3d85ca[_0x29b38f(0x1e2)]);if(_0x10c627[_0x29b38f(0x1ea)])return normalizeBusinessGroup(_0x10c627[_0x29b38f(0x1fc)]);if(_0x3d85ca[_0x29b38f(0x1e2)]===_0x29b38f(0x1fd))return'';throw CliErrors[_0x29b38f(0x1ed)](_0x29b38f(0x1fa),_0x29b38f(0x1da));}function readBusinessGroupFromDatasetDetail(_0x30e16f,_0x3cfeb6){const _0x3bddf2=a59_0x3beea6,_0x26f42c=asPlainObject(_0x30e16f['dataset']),_0x572ce8=firstPresent(_0x30e16f[_0x3bddf2(0x1f2)]);if(_0x572ce8['found'])return _0x572ce8;const _0x3c9945=firstPresent(_0x26f42c['businessGroup']);if(_0x3c9945['found'])return _0x3c9945;if(_0x3cfeb6===_0x3bddf2(0x206))return{'found':![]};const _0x9e16da=readBusinessGroupFromExtend(_0x30e16f[_0x3bddf2(0x20c)]);if(_0x9e16da['found'])return _0x9e16da;return readBusinessGroupFromExtend(_0x26f42c['extend']);}function readBusinessGroupFromExtend(_0x403da7){const _0xbc4d1c=a59_0x3beea6;if(_0x403da7===undefined||_0x403da7===null||_0x403da7==='')return{'found':![]};if(typeof _0x403da7===_0xbc4d1c(0x1d3))try{const _0x5f36c9=JSON[_0xbc4d1c(0x1ef)](_0x403da7);return readBusinessGroupFromExtend(_0x5f36c9);}catch{return{'found':![]};}const _0x2ac22f=asPlainObject(_0x403da7);if(Object[_0xbc4d1c(0x1dc)]['hasOwnProperty']['call'](_0x2ac22f,_0xbc4d1c(0x1f2)))return{'found':!![],'value':_0x2ac22f[_0xbc4d1c(0x1f2)]};return{'found':![]};}function firstPresent(..._0x4e5dcc){for(const _0x2810bb of _0x4e5dcc){if(_0x2810bb!==undefined&&_0x2810bb!==null)return{'found':!![],'value':_0x2810bb};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1c83fa,_0x54e33e){const _0x1a0f8a=a59_0x3beea6;if(_0x54e33e===undefined)return;const _0xabc755=normalizeBusinessGroup(_0x54e33e);if(_0x1c83fa!==_0xabc755)throw CliErrors[_0x1a0f8a(0x1ed)](_0x1a0f8a(0x205),_0x1a0f8a(0x1d1)+JSON[_0x1a0f8a(0x201)](_0xabc755)+_0x1a0f8a(0x209)+JSON[_0x1a0f8a(0x201)](_0x1c83fa));}function buildBackendPayload(_0x497468,_0x5bbff2,_0x51471c){const _0x17d475=a59_0x3beea6;return{'appCode':_0x497468,'datasetCode':_0x5bbff2[_0x17d475(0x1e8)],'businessGroup':_0x51471c};}function normalizeBusinessGroup(_0x566db6){const _0x5635cc=a59_0x3beea6;if(_0x566db6===undefined||_0x566db6===null)return'';return String(_0x566db6)[_0x5635cc(0x20e)]();}function asPlainObject(_0xd58b99){const _0x4d1dcf=a59_0x3beea6;if(!_0xd58b99||typeof _0xd58b99!==_0x4d1dcf(0x1f7)||Array[_0x4d1dcf(0x200)](_0xd58b99))return{};return _0xd58b99;}function firstString(..._0xdeb6d9){const _0x167dfc=a59_0x3beea6;for(const _0x2bd764 of _0xdeb6d9){if(typeof _0x2bd764===_0x167dfc(0x1d3)&&_0x2bd764[_0x167dfc(0x20e)]())return _0x2bd764[_0x167dfc(0x20e)]();if(typeof _0x2bd764===_0x167dfc(0x1f6)&&Number[_0x167dfc(0x20a)](_0x2bd764))return String(_0x2bd764);}return undefined;}function firstNumber(..._0x266881){const _0x55ad14=a59_0x3beea6;for(const _0x184390 of _0x266881){if(typeof _0x184390===_0x55ad14(0x1f6)&&Number['isFinite'](_0x184390))return _0x184390;if(typeof _0x184390===_0x55ad14(0x1d3)&&_0x184390['trim']()&&Number[_0x55ad14(0x20a)](Number(_0x184390)))return Number(_0x184390);}return null;}function trim(_0x382a01){const _0x5f112d=a59_0x3beea6;return String(_0x382a01||'')[_0x5f112d(0x20e)]();}
@@ -1 +1 @@
1
- const a60_0x488b12=a60_0x4e74;(function(_0x123ea5,_0x260d5e){const _0x5edaec=a60_0x4e74,_0x49102e=_0x123ea5();while(!![]){try{const _0x312916=parseInt(_0x5edaec(0x155))/0x1*(parseInt(_0x5edaec(0x146))/0x2)+-parseInt(_0x5edaec(0x150))/0x3*(-parseInt(_0x5edaec(0x14c))/0x4)+-parseInt(_0x5edaec(0x160))/0x5+-parseInt(_0x5edaec(0x158))/0x6+parseInt(_0x5edaec(0x148))/0x7*(parseInt(_0x5edaec(0x14f))/0x8)+-parseInt(_0x5edaec(0x165))/0x9+parseInt(_0x5edaec(0x149))/0xa;if(_0x312916===_0x260d5e)break;else _0x49102e['push'](_0x49102e['shift']());}catch(_0x3ae120){_0x49102e['push'](_0x49102e['shift']());}}}(a60_0x179c,0xcbf64));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x488b12(0x162),'filter':a60_0x488b12(0x145),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};function a60_0x179c(){const _0x58a79d=['length','9046740juxtxj','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','object','tableName','\x20是\x20','\x20类型,没有可用于\x20','\x20的\x20DB_TABLE\x20数据源上下文。','datasetName','5097095GeGwmM','trim','lovrabet','filter','SQL\x20schema\x20validation','3846051fTsKxy','join','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','name','METADATA','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','698008cmkGty','UNKNOWN','7kOQvRW','13357490cZpepW','dataset','当前数据集\x20\x22','688gAOjOs','toUpperCase','source','7883896LZdVYM','13443UvZrsn','dbId','datasetCode','validation','modelCode','2UuwKvj','dbtable'];a60_0x179c=function(){return _0x58a79d;};return a60_0x179c();}export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x425b08){const _0x44758c=a60_0x488b12;return _0x425b08==null?'':String(_0x425b08)[_0x44758c(0x161)]();}function getDatasetCode(_0x33e927){const _0x54558d=a60_0x488b12;return valueToString(_0x33e927['code']??_0x33e927[_0x54558d(0x154)]??_0x33e927[_0x54558d(0x14a)]?.[_0x54558d(0x152)]);}function getDatasetName(_0x426d7c){const _0x3ac08d=a60_0x488b12;return valueToString(_0x426d7c[_0x3ac08d(0x143)]??_0x426d7c[_0x3ac08d(0x14a)]?.[_0x3ac08d(0x15f)])||'unknown';}function getDatasetSource(_0x522bcc){const _0x13e916=a60_0x488b12;return valueToString(_0x522bcc[_0x13e916(0x14e)]??_0x522bcc[_0x13e916(0x14a)]?.['sourceType'])[_0x13e916(0x14d)]();}function a60_0x4e74(_0x51ac7a,_0x398a63){_0x51ac7a=_0x51ac7a-0x142;const _0x179cb4=a60_0x179c();let _0x4e7449=_0x179cb4[_0x51ac7a];return _0x4e7449;}function getDbtableConfig(_0x42781f){const _0xedda38=a60_0x488b12,_0x329ac3=_0x42781f['dbtableConfig']??_0x42781f[_0xedda38(0x156)];return _0x329ac3&&typeof _0x329ac3===_0xedda38(0x15a)?_0x329ac3:{};}export function isDbTableBackedDataset(_0x28bbf2){const _0x246d4f=a60_0x488b12,_0x11a27d=getDatasetSource(_0x28bbf2);if(_0x11a27d===_0x246d4f(0x144))return![];const _0x5dfe25=getDbtableConfig(_0x28bbf2),_0x42101b=_0x5dfe25[_0x246d4f(0x151)]??_0x5dfe25['id'],_0x123621=valueToString(_0x5dfe25[_0x246d4f(0x15b)]??_0x28bbf2['tableName']??_0x28bbf2[_0x246d4f(0x14a)]?.[_0x246d4f(0x15b)]);return _0x42101b!==undefined&&_0x42101b!==null&&_0x123621[_0x246d4f(0x157)]>0x0;}export function filterDbTableBackedDatasets(_0x1dae01){const _0x5bd758=a60_0x488b12;return _0x1dae01[_0x5bd758(0x163)](_0x3ccad0=>isDbTableBackedDataset(_0x3ccad0));}export function buildDbTableBackedRequirementMessage(_0x2f7aca,_0x34ba92=a60_0x488b12(0x164)){const _0x3339f0=a60_0x488b12,_0x4f4b6f=getDatasetSource(_0x2f7aca)||_0x3339f0(0x147),_0x4a4dd6=getDatasetName(_0x2f7aca),_0x57bc4a=getDatasetCode(_0x2f7aca),_0xbb913b=_0x57bc4a?'\x20('+_0x57bc4a+')':'';return[_0x3339f0(0x14b)+_0x4a4dd6+'\x22'+_0xbb913b+_0x3339f0(0x15c)+_0x4f4b6f+_0x3339f0(0x15d)+_0x34ba92+_0x3339f0(0x15e),_0x3339f0(0x142),_0x3339f0(0x159),'如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:'+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x3339f0(0x166)]('\x20');}export function assertDatasetIsDbTableBacked(_0x371805,_0x5ef3cc){const _0x5b51be=a60_0x488b12;if(!isDbTableBackedDataset(_0x371805))throw CliErrors[_0x5b51be(0x153)](buildDbTableBackedRequirementMessage(_0x371805,_0x5ef3cc));}
1
+ const a60_0x510a6c=a60_0x5341;(function(_0x5ddf72,_0x1e1651){const _0x495918=a60_0x5341,_0x3af634=_0x5ddf72();while(!![]){try{const _0x5e5559=-parseInt(_0x495918(0x154))/0x1*(parseInt(_0x495918(0x135))/0x2)+parseInt(_0x495918(0x156))/0x3*(parseInt(_0x495918(0x134))/0x4)+parseInt(_0x495918(0x143))/0x5*(parseInt(_0x495918(0x148))/0x6)+parseInt(_0x495918(0x155))/0x7*(parseInt(_0x495918(0x145))/0x8)+parseInt(_0x495918(0x151))/0x9*(-parseInt(_0x495918(0x146))/0xa)+-parseInt(_0x495918(0x138))/0xb+parseInt(_0x495918(0x14f))/0xc;if(_0x5e5559===_0x1e1651)break;else _0x3af634['push'](_0x3af634['shift']());}catch(_0x5184e4){_0x3af634['push'](_0x3af634['shift']());}}}(a60_0x2b6d,0x6a4f6));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x510a6c(0x136),'filter':a60_0x510a6c(0x13a),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x510a6c(0x157);function valueToString(_0x4b8565){const _0x119eb1=a60_0x510a6c;return _0x4b8565==null?'':String(_0x4b8565)[_0x119eb1(0x158)]();}function a60_0x5341(_0x58f14e,_0x2fe411){_0x58f14e=_0x58f14e-0x133;const _0x2b6dd1=a60_0x2b6d();let _0x5341d7=_0x2b6dd1[_0x58f14e];return _0x5341d7;}function getDatasetCode(_0x2c2936){const _0x2441ba=a60_0x510a6c;return valueToString(_0x2c2936[_0x2441ba(0x159)]??_0x2c2936['modelCode']??_0x2c2936[_0x2441ba(0x13b)]?.[_0x2441ba(0x150)]);}function getDatasetName(_0x4afe81){const _0x5e21af=a60_0x510a6c;return valueToString(_0x4afe81[_0x5e21af(0x133)]??_0x4afe81[_0x5e21af(0x13b)]?.[_0x5e21af(0x14d)])||_0x5e21af(0x13e);}function a60_0x2b6d(){const _0x3ee9de=['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','dataset','filter','dbtableConfig','unknown','dbId','object','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','join','60VbFSvE','length','1384qAOBXE','21430SQOeHA','\x20类型,没有可用于\x20','84264MSwsPs','当前数据集\x20\x22','UNKNOWN','getOne','SQL\x20schema\x20validation','datasetName','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','9796236GWLKyG','datasetCode','2223kkQlbr','\x20的\x20DB_TABLE\x20数据源上下文。','sourceType','684458jjtNJo','30737TnFFNY','397857nlgBBw','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','trim','code','tableName','name','8cbLzxm','2Bxdcyu','lovrabet','dbtable','3965907jskUlR','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。'];a60_0x2b6d=function(){return _0x3ee9de;};return a60_0x2b6d();}function getDatasetSource(_0x5be6db){const _0x46834a=a60_0x510a6c;return valueToString(_0x5be6db['source']??_0x5be6db[_0x46834a(0x13b)]?.[_0x46834a(0x153)])['toUpperCase']();}function getDbtableConfig(_0x14d792){const _0x287f61=a60_0x510a6c,_0x24baca=_0x14d792[_0x287f61(0x13d)]??_0x14d792[_0x287f61(0x137)];return _0x24baca&&typeof _0x24baca===_0x287f61(0x140)?_0x24baca:{};}export function isDbTableBackedDataset(_0xa070d1){const _0x33e7b2=a60_0x510a6c,_0x33f1d1=getDatasetSource(_0xa070d1);if(_0x33f1d1==='METADATA')return![];const _0x4e5072=getDbtableConfig(_0xa070d1),_0x1a644d=_0x4e5072[_0x33e7b2(0x13f)]??_0x4e5072['id'],_0x499de5=valueToString(_0x4e5072[_0x33e7b2(0x15a)]??_0xa070d1[_0x33e7b2(0x15a)]??_0xa070d1['dataset']?.[_0x33e7b2(0x15a)]);return _0x1a644d!==undefined&&_0x1a644d!==null&&_0x499de5[_0x33e7b2(0x144)]>0x0;}export function filterDbTableBackedDatasets(_0x223157){const _0x5301a4=a60_0x510a6c;return _0x223157[_0x5301a4(0x13c)](_0x4c42ae=>isDbTableBackedDataset(_0x4c42ae));}export function buildDbTableBackedRequirementMessage(_0x5657ff,_0x7d854c=a60_0x510a6c(0x14c)){const _0x4b859e=a60_0x510a6c,_0x5aefe6=getDatasetSource(_0x5657ff)||_0x4b859e(0x14a),_0x407117=getDatasetName(_0x5657ff),_0x5f41a5=getDatasetCode(_0x5657ff),_0x4b0ce3=_0x5f41a5?'\x20('+_0x5f41a5+')':'';return[_0x4b859e(0x149)+_0x407117+'\x22'+_0x4b0ce3+'\x20是\x20'+_0x5aefe6+_0x4b859e(0x147)+_0x7d854c+_0x4b859e(0x152),_0x4b859e(0x141),_0x4b859e(0x139),_0x4b859e(0x14e)+RUNTIME_DATA_ACCESS_COMMANDS[_0x4b859e(0x13c)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x4b859e(0x14b)]+'。'][_0x4b859e(0x142)]('\x20');}export function assertDatasetIsDbTableBacked(_0x511b51,_0x4267ef){if(!isDbTableBackedDataset(_0x511b51))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x511b51,_0x4267ef));}
@@ -1 +1 @@
1
- const a61_0x4a4c36=a61_0x14cc;(function(_0x37475f,_0x57f56e){const _0x2b528c=a61_0x14cc,_0x4ab6a3=_0x37475f();while(!![]){try{const _0x4b65e6=-parseInt(_0x2b528c(0xa1))/0x1+-parseInt(_0x2b528c(0x94))/0x2*(parseInt(_0x2b528c(0x8f))/0x3)+parseInt(_0x2b528c(0x97))/0x4*(-parseInt(_0x2b528c(0x95))/0x5)+parseInt(_0x2b528c(0xa6))/0x6+-parseInt(_0x2b528c(0x80))/0x7*(-parseInt(_0x2b528c(0x7c))/0x8)+parseInt(_0x2b528c(0x89))/0x9*(-parseInt(_0x2b528c(0xa3))/0xa)+parseInt(_0x2b528c(0x9c))/0xb;if(_0x4b65e6===_0x57f56e)break;else _0x4ab6a3['push'](_0x4ab6a3['shift']());}catch(_0xf654c3){_0x4ab6a3['push'](_0x4ab6a3['shift']());}}}(a61_0x273c,0x47549));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_0x4a4c36(0x9f),'description':a61_0x4a4c36(0xa5)},DBID_FLAG={'name':a61_0x4a4c36(0x83),'type':a61_0x4a4c36(0x9f),'description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':'confirm','type':'boolean','description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a61_0x4a4c36(0x8c),'type':a61_0x4a4c36(0x9f),'description':a61_0x4a4c36(0x96)};function a61_0x273c(){const _0x365a94=['code','dataset','8025787SDVJyd','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','appCode','number','dbid=','312587zgGZSr','bool','2357380niPhwl','Deleted\x20','Dataset\x20id','1286712mMsoRq','length','num','relationPages','\x20dataset(s);\x20','3448wcwgJh','id=','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','7637McSdMd','POST','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','dbid','str','\x20failed','Would\x20delete\x20','isArray','validation','9YEctSk','delete','push','expected-count','Matched\x20','high-risk-write','1381614dVJBGx','filter','description','dbtableConfig','name','2JZfpYe','5FAEJAu','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','453032fbgFmN','/smartapi/dataset/delete-dataset','message'];a61_0x273c=function(){return _0x365a94;};return a61_0x273c();}export const datasetDelete={'service':a61_0x4a4c36(0x9b),'command':a61_0x4a4c36(0x8a),'description':a61_0x4a4c36(0x9d),'risk':a61_0x4a4c36(0x8e),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4485dc){const _0x465f5d=a61_0x4a4c36,_0x41274f=_0x4485dc['num']('id'),_0x426674=_0x4485dc[_0x465f5d(0x84)](_0x465f5d(0x9a)),_0x577489=_0x4485dc[_0x465f5d(0xa8)](_0x465f5d(0x83)),_0x5058f8=[_0x41274f>0x0,Boolean(_0x426674),_0x577489>0x0][_0x465f5d(0x90)](Boolean);if(_0x5058f8[_0x465f5d(0xa7)]===0x0)throw CliErrors[_0x465f5d(0x88)](_0x465f5d(0x82));if(_0x5058f8[_0x465f5d(0xa7)]>0x1)throw CliErrors[_0x465f5d(0x88)](_0x465f5d(0x7f));},async 'dryRun'(_0x9fe801){const _0xf46215=a61_0x4a4c36,_0x290192=await resolveTargets(_0x9fe801);return{'method':_0xf46215(0x81),'url':_0xf46215(0x98),'body':{'appCode':_0x9fe801[_0xf46215(0x9e)],'count':_0x290192['length'],'datasets':_0x290192},'description':_0xf46215(0x86)+_0x290192[_0xf46215(0xa7)]+'\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.'};},async 'execute'(_0x47a1ba){const _0x562386=a61_0x4a4c36;if(!_0x47a1ba[_0x562386(0xa2)]('confirm'))throw CliErrors['validation'](_0x562386(0x7e),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x275b86=await resolveTargets(_0x47a1ba),_0x1d1f28=[],_0x3bef20=[];for(const _0x5bd306 of _0x275b86){try{await deleteDataset(_0x47a1ba['appCode'],_0x5bd306['id']),_0x1d1f28[_0x562386(0x8b)](_0x5bd306);}catch(_0x448890){_0x3bef20[_0x562386(0x8b)]({..._0x5bd306,'error':_0x448890 instanceof Error?_0x448890[_0x562386(0x99)]:String(_0x448890)});}}if(_0x3bef20[_0x562386(0xa7)]>0x0)return{'ok':![],'data':{'requested':_0x275b86[_0x562386(0xa7)],'deletedCount':_0x1d1f28['length'],'failedCount':_0x3bef20['length'],'deleted':_0x1d1f28,'failed':_0x3bef20},'message':_0x562386(0xa4)+_0x1d1f28[_0x562386(0xa7)]+'/'+_0x275b86[_0x562386(0xa7)]+_0x562386(0x7b)+_0x3bef20[_0x562386(0xa7)]+_0x562386(0x85)};return{'ok':!![],'data':{'requested':_0x275b86[_0x562386(0xa7)],'deletedCount':_0x1d1f28['length'],'deleted':_0x1d1f28},'message':_0x562386(0xa4)+_0x1d1f28[_0x562386(0xa7)]+'\x20dataset(s)'};}};function a61_0x14cc(_0xdea332,_0x3ed1fc){_0xdea332=_0xdea332-0x7b;const _0x273c4a=a61_0x273c();let _0x14ccdb=_0x273c4a[_0xdea332];return _0x14ccdb;}async function resolveTargets(_0x47a36b){const _0x508e74=a61_0x4a4c36,_0x2b6379=_0x47a36b[_0x508e74(0xa8)]('id'),_0x4f272e=_0x47a36b[_0x508e74(0x84)](_0x508e74(0x9a)),_0x234707=_0x47a36b[_0x508e74(0xa8)](_0x508e74(0x83));let _0x1e66cd;_0x4f272e?(_0x1e66cd=await listDatasets(_0x47a36b[_0x508e74(0x9e)],{'code':_0x4f272e}),_0x1e66cd=_0x1e66cd[_0x508e74(0x90)](_0x83845b=>_0x83845b['code']===_0x4f272e)):(_0x1e66cd=await listDatasets(_0x47a36b['appCode']),_0x2b6379>0x0&&(_0x1e66cd=_0x1e66cd[_0x508e74(0x90)](_0x576f81=>_0x576f81['id']===_0x2b6379)),_0x234707>0x0&&(_0x1e66cd=_0x1e66cd[_0x508e74(0x90)](_0x4d1888=>_0x4d1888['dbtableConfig']?.['dbId']===_0x234707)));const _0x23b44b=_0x1e66cd['map'](normalizeTarget);if(_0x23b44b[_0x508e74(0xa7)]===0x0){const _0x2a7954=_0x4f272e||(_0x2b6379>0x0?_0x508e74(0x7d)+_0x2b6379:_0x508e74(0xa0)+_0x234707);throw CliErrors[_0x508e74(0x88)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x2a7954+'.');}const _0x5fda41=_0x47a36b[_0x508e74(0xa8)](_0x508e74(0x8c));if(_0x5fda41>0x0&&_0x23b44b[_0x508e74(0xa7)]!==_0x5fda41)throw CliErrors[_0x508e74(0x88)](_0x508e74(0x8d)+_0x23b44b[_0x508e74(0xa7)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x5fda41+'.');return _0x23b44b;}function normalizeTarget(_0x2c4365){const _0x206e22=a61_0x4a4c36,_0x490861=_0x2c4365[_0x206e22(0x92)]??{};return{'id':_0x2c4365['id'],'code':_0x2c4365['code'],'name':_0x2c4365[_0x206e22(0x93)],'description':_0x2c4365[_0x206e22(0x91)],'source':_0x2c4365['source'],'dbId':_0x490861['dbId'],'dbName':_0x490861['dbName'],'tableName':_0x490861['tableName'],'relatedPageCount':Array[_0x206e22(0x87)](_0x2c4365[_0x206e22(0xa9)])?_0x2c4365['relationPages'][_0x206e22(0xa7)]:undefined};}
1
+ const a61_0x27afcd=a61_0x5c97;(function(_0x1d411b,_0x1ae8c2){const _0x2e88ad=a61_0x5c97,_0x7f0cb3=_0x1d411b();while(!![]){try{const _0xcd387f=parseInt(_0x2e88ad(0x21b))/0x1*(parseInt(_0x2e88ad(0x1ec))/0x2)+-parseInt(_0x2e88ad(0x1f1))/0x3*(-parseInt(_0x2e88ad(0x1f5))/0x4)+parseInt(_0x2e88ad(0x216))/0x5+-parseInt(_0x2e88ad(0x1f6))/0x6*(-parseInt(_0x2e88ad(0x204))/0x7)+-parseInt(_0x2e88ad(0x1f7))/0x8*(parseInt(_0x2e88ad(0x1ea))/0x9)+parseInt(_0x2e88ad(0x1ee))/0xa+-parseInt(_0x2e88ad(0x1f9))/0xb*(parseInt(_0x2e88ad(0x1fe))/0xc);if(_0xcd387f===_0x1ae8c2)break;else _0x7f0cb3['push'](_0x7f0cb3['shift']());}catch(_0x1c638f){_0x7f0cb3['push'](_0x7f0cb3['shift']());}}}(a61_0x29aa,0xe8b4e));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_0x27afcd(0x1f4),'description':a61_0x27afcd(0x1f0)},DBID_FLAG={'name':a61_0x27afcd(0x1f3),'type':'number','description':a61_0x27afcd(0x21d)},CONFIRM_FLAG={'name':a61_0x27afcd(0x1ff),'type':'boolean','description':a61_0x27afcd(0x210)},EXPECTED_COUNT_FLAG={'name':a61_0x27afcd(0x201),'type':a61_0x27afcd(0x1f4),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':'dataset','command':'delete','description':a61_0x27afcd(0x207),'risk':a61_0x27afcd(0x209),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xb0ac06){const _0x2446c1=a61_0x27afcd,_0x5b0ddf=_0xb0ac06[_0x2446c1(0x202)]('id'),_0x20ea87=_0xb0ac06[_0x2446c1(0x21a)](_0x2446c1(0x211)),_0xb4abbf=_0xb0ac06[_0x2446c1(0x202)](_0x2446c1(0x1f3)),_0xee66dc=[_0x5b0ddf>0x0,Boolean(_0x20ea87),_0xb4abbf>0x0][_0x2446c1(0x1ef)](Boolean);if(_0xee66dc['length']===0x0)throw CliErrors[_0x2446c1(0x1fa)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0xee66dc['length']>0x1)throw CliErrors[_0x2446c1(0x1fa)](_0x2446c1(0x20a));},async 'dryRun'(_0x1e90a8){const _0x8ed088=a61_0x27afcd,_0x2c57ea=await resolveTargets(_0x1e90a8);return{'method':_0x8ed088(0x1fc),'url':_0x8ed088(0x21c),'body':{'appCode':_0x1e90a8['appCode'],'count':_0x2c57ea[_0x8ed088(0x206)],'datasets':_0x2c57ea},'description':_0x8ed088(0x20f)+_0x2c57ea['length']+_0x8ed088(0x20d)};},async 'execute'(_0x22b451){const _0x26441e=a61_0x27afcd;if(!_0x22b451[_0x26441e(0x20c)]('confirm'))throw CliErrors['validation']('--confirm\x20is\x20required\x20to\x20delete\x20datasets.',_0x26441e(0x1ed));const _0x355b6f=await resolveTargets(_0x22b451),_0x2bfaea=[],_0x12e8ea=[];for(const _0x2ca4a9 of _0x355b6f){try{await deleteDataset(_0x22b451['appCode'],_0x2ca4a9['id']),_0x2bfaea[_0x26441e(0x215)](_0x2ca4a9);}catch(_0x453d27){_0x12e8ea['push']({..._0x2ca4a9,'error':_0x453d27 instanceof Error?_0x453d27[_0x26441e(0x1fb)]:String(_0x453d27)});}}if(_0x12e8ea[_0x26441e(0x206)]>0x0)return{'ok':![],'data':{'requested':_0x355b6f[_0x26441e(0x206)],'deletedCount':_0x2bfaea[_0x26441e(0x206)],'failedCount':_0x12e8ea['length'],'deleted':_0x2bfaea,'failed':_0x12e8ea},'message':_0x26441e(0x217)+_0x2bfaea[_0x26441e(0x206)]+'/'+_0x355b6f[_0x26441e(0x206)]+_0x26441e(0x20b)+_0x12e8ea['length']+'\x20failed'};return{'ok':!![],'data':{'requested':_0x355b6f[_0x26441e(0x206)],'deletedCount':_0x2bfaea[_0x26441e(0x206)],'deleted':_0x2bfaea},'message':'Deleted\x20'+_0x2bfaea['length']+_0x26441e(0x218)};}};async function resolveTargets(_0x4d1b9f){const _0x16d1a3=a61_0x27afcd,_0x202389=_0x4d1b9f[_0x16d1a3(0x202)]('id'),_0x10e98c=_0x4d1b9f[_0x16d1a3(0x21a)](_0x16d1a3(0x211)),_0x4f5b9e=_0x4d1b9f[_0x16d1a3(0x202)]('dbid');let _0x576fd7;_0x10e98c?(_0x576fd7=await listDatasets(_0x4d1b9f[_0x16d1a3(0x1f2)],{'code':_0x10e98c}),_0x576fd7=_0x576fd7[_0x16d1a3(0x1ef)](_0x5643ff=>_0x5643ff[_0x16d1a3(0x211)]===_0x10e98c)):(_0x576fd7=await listDatasets(_0x4d1b9f[_0x16d1a3(0x1f2)]),_0x202389>0x0&&(_0x576fd7=_0x576fd7[_0x16d1a3(0x1ef)](_0x411d17=>_0x411d17['id']===_0x202389)),_0x4f5b9e>0x0&&(_0x576fd7=_0x576fd7[_0x16d1a3(0x1ef)](_0x48d218=>_0x48d218['dbtableConfig']?.['dbId']===_0x4f5b9e)));const _0x2a12e4=_0x576fd7[_0x16d1a3(0x208)](normalizeTarget);if(_0x2a12e4[_0x16d1a3(0x206)]===0x0){const _0x5931dd=_0x10e98c||(_0x202389>0x0?_0x16d1a3(0x20e)+_0x202389:'dbid='+_0x4f5b9e);throw CliErrors['validation'](_0x16d1a3(0x205)+_0x5931dd+'.');}const _0x3bdb61=_0x4d1b9f[_0x16d1a3(0x202)]('expected-count');if(_0x3bdb61>0x0&&_0x2a12e4[_0x16d1a3(0x206)]!==_0x3bdb61)throw CliErrors[_0x16d1a3(0x1fa)](_0x16d1a3(0x1eb)+_0x2a12e4['length']+_0x16d1a3(0x203)+_0x3bdb61+'.');return _0x2a12e4;}function a61_0x29aa(){const _0x5cb7cb=['3CTLEFj','appCode','dbid','number','1900496lBhVsQ','1021578tcgBta','32RfiOSB','dbName','133089JfvLIq','validation','message','POST','name','3276vLmDqZ','confirm','isArray','expected-count','num','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','14zJSyJI','No\x20undeleted\x20dataset\x20found\x20for\x20','length','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','map','high-risk-write','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','\x20dataset(s);\x20','bool','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','id=','Would\x20delete\x20','Required\x20to\x20execute\x20dataset\x20deletion','code','dbtableConfig','relationPages','description','push','5401515tcdhcM','Deleted\x20','\x20dataset(s)','source','str','772864AJlBjA','/smartapi/dataset/delete-dataset','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbId','308538BFoOiB','Matched\x20','2cFaEGJ','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','17245040JTrtdF','filter','Dataset\x20id'];a61_0x29aa=function(){return _0x5cb7cb;};return a61_0x29aa();}function a61_0x5c97(_0x2680bb,_0x4cd65e){_0x2680bb=_0x2680bb-0x1e9;const _0x29aaa2=a61_0x29aa();let _0x5c9746=_0x29aaa2[_0x2680bb];return _0x5c9746;}function normalizeTarget(_0x41d0c0){const _0x38dc01=a61_0x27afcd,_0x36a921=_0x41d0c0[_0x38dc01(0x212)]??{};return{'id':_0x41d0c0['id'],'code':_0x41d0c0[_0x38dc01(0x211)],'name':_0x41d0c0[_0x38dc01(0x1fd)],'description':_0x41d0c0[_0x38dc01(0x214)],'source':_0x41d0c0[_0x38dc01(0x219)],'dbId':_0x36a921[_0x38dc01(0x1e9)],'dbName':_0x36a921[_0x38dc01(0x1f8)],'tableName':_0x36a921['tableName'],'relatedPageCount':Array[_0x38dc01(0x200)](_0x41d0c0[_0x38dc01(0x213)])?_0x41d0c0[_0x38dc01(0x213)][_0x38dc01(0x206)]:undefined};}
@@ -1 +1 @@
1
- const a62_0x515489=a62_0x534f;function a62_0x47af(){const _0x1badd2=['38385DNKNTS','requestBody','required','isArray','operations','method','relationId','options','relations','dblinkInfoDTO','sourceType','3826734wlKaKK','relatedPageInfoList','entries','type','338956OzuLMP','dbType','title','10GCOQbr','fromField','doType','detail','string','updateTimeField','tableComment','logicField','str','592YVIWDr','source','creatorIdField','name','indexes','alias','responseBody','requestFields','read','toTableName','extend','path','formatRules','deprecated','1547364LClMtH','modelCode','labelField','90xOIZgO','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','allFieldNames','cardinality','parse','modelId','displayName','doVersion','fields','allFields','744106aBoMAX','object','beforeScriptId','columnCodeListWithDeleted','pkField','responseFields','trim','dbId','bizRelationType','7gJWUTn','dataType','afterScriptId','deleted','code','toDatasetName','host','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','main_sub','2xjMqBc','1588436aivTYS','length','toFieldLabel','properties','filter','tableName','createTimeField','validateRules','map','dataset','18812232LNPlTF'];a62_0x47af=function(){return _0x1badd2;};return a62_0x47af();}(function(_0x2bfdad,_0x51eb5e){const _0x219d6c=a62_0x534f,_0x303b76=_0x2bfdad();while(!![]){try{const _0x4c4511=-parseInt(_0x219d6c(0x140))/0x1*(parseInt(_0x219d6c(0x15b))/0x2)+parseInt(_0x219d6c(0x121))/0x3+-parseInt(_0x219d6c(0x141))/0x4*(parseInt(_0x219d6c(0x15e))/0x5)+-parseInt(_0x219d6c(0x157))/0x6*(-parseInt(_0x219d6c(0x137))/0x7)+-parseInt(_0x219d6c(0x113))/0x8*(parseInt(_0x219d6c(0x14c))/0x9)+parseInt(_0x219d6c(0x124))/0xa*(-parseInt(_0x219d6c(0x12e))/0xb)+parseInt(_0x219d6c(0x14b))/0xc;if(_0x4c4511===_0x51eb5e)break;else _0x303b76['push'](_0x303b76['shift']());}catch(_0x59523b){_0x303b76['push'](_0x303b76['shift']());}}}(a62_0x47af,0xa2071));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x36a408){const _0x4df4ac=a62_0x534f;if(_0x36a408[_0x4df4ac(0x13a)])return null;const _0x2f3e9c=Boolean(_0x36a408[_0x4df4ac(0x12a)]!==undefined||_0x36a408[_0x4df4ac(0x10c)]!==undefined);let _0xfce34f={};if(!_0x2f3e9c&&typeof _0x36a408[_0x4df4ac(0x11d)]==='string')try{_0xfce34f=JSON[_0x4df4ac(0x128)](_0x36a408[_0x4df4ac(0x11d)]);}catch{}const _0x489426=_0x2f3e9c?_0x36a408[_0x4df4ac(0x116)]:_0x36a408['code'],_0x5556eb=_0x2f3e9c?_0x36a408[_0x4df4ac(0x12a)]:_0x36a408[_0x4df4ac(0x116)],_0x2f6e27=_0x2f3e9c?_0x36a408[_0x4df4ac(0x10c)]:_0x36a408[_0x4df4ac(0x15a)]||_0x36a408[_0x4df4ac(0x138)],_0x249f2f=_0x2f3e9c?_0x36a408[_0x4df4ac(0x132)]===!![]:_0xfce34f['pkField']===!![],_0x5c005b=_0x2f3e9c?_0x36a408['required']===!![]:_0xfce34f[_0x4df4ac(0x14e)]===!![],_0x4df1eb=_0x2f3e9c?_0x36a408[_0x4df4ac(0x153)]??null:_0xfce34f[_0x4df4ac(0x153)]??null,_0x50ce71={'name':_0x489426,'displayName':_0x5556eb||_0x489426,'type':_0x2f6e27,'dbType':_0x36a408[_0x4df4ac(0x15c)],'pk':_0x249f2f,'required':_0x5c005b,'deprecated':_0x36a408[_0x4df4ac(0x120)]===!![],'description':_0x36a408['description']||undefined};return Array['isArray'](_0x4df1eb)&&_0x4df1eb[_0x4df4ac(0x142)]>0x0&&(_0x50ce71[_0x4df4ac(0x153)]=_0x4df1eb),_0x50ce71;}function parseJsonMaybe(_0x37344d){if(typeof _0x37344d!=='string')return _0x37344d;try{return JSON['parse'](_0x37344d);}catch{return _0x37344d;}}function a62_0x534f(_0x232f6d,_0x4c753c){_0x232f6d=_0x232f6d-0x10c;const _0x47af77=a62_0x47af();let _0x534fea=_0x47af77[_0x232f6d];return _0x534fea;}function normalizeOperationEntry(_0x46ac28,_0x2bde12){const _0x525059=a62_0x534f;if(!_0x2bde12||typeof _0x2bde12!==_0x525059(0x12f))return null;if(!_0x2bde12[_0x525059(0x151)]||!_0x2bde12[_0x525059(0x11e)])return null;const _0x42b8a5={'name':_0x46ac28,'method':_0x2bde12[_0x525059(0x151)],'path':_0x2bde12[_0x525059(0x11e)]};if(_0x2bde12[_0x525059(0x13d)])_0x42b8a5[_0x525059(0x13d)]=_0x2bde12[_0x525059(0x13d)];if(_0x2bde12['requestBody']!=null){const _0x13a69c=parseJsonMaybe(_0x2bde12[_0x525059(0x14d)]);_0x42b8a5[_0x525059(0x14d)]=_0x13a69c;}if(_0x2bde12[_0x525059(0x119)]!=null){const _0x1f9662=parseJsonMaybe(_0x2bde12[_0x525059(0x119)]);_0x42b8a5[_0x525059(0x119)]=_0x1f9662;}if(_0x2bde12[_0x525059(0x130)]!=null)_0x42b8a5[_0x525059(0x130)]=_0x2bde12[_0x525059(0x130)];if(_0x2bde12[_0x525059(0x139)]!=null)_0x42b8a5[_0x525059(0x139)]=_0x2bde12['afterScriptId'];if(Array[_0x525059(0x14f)](_0x2bde12[_0x525059(0x11a)]))_0x42b8a5['requestFields']=_0x2bde12[_0x525059(0x11a)];if(Array['isArray'](_0x2bde12[_0x525059(0x133)]))_0x42b8a5[_0x525059(0x133)]=_0x2bde12[_0x525059(0x133)];return _0x42b8a5;}function summarizeDbtable(_0x303efc){const _0x53d184=a62_0x534f,_0x2953b2={},_0x124672=['dbId','dbName',_0x53d184(0x146),'datasetKey',_0x53d184(0x132),'allFields',_0x53d184(0x111),_0x53d184(0x147),_0x53d184(0x10f),_0x53d184(0x115),'creatorNameField','modifierIdField','modifierNameField',_0x53d184(0x123),_0x53d184(0x155)];for(const _0x11a497 of _0x124672){if(_0x303efc[_0x11a497]!==undefined)_0x2953b2[_0x11a497]=_0x303efc[_0x11a497];}return typeof _0x2953b2[_0x53d184(0x12d)]===_0x53d184(0x10e)&&_0x2953b2['allFields']['length']>0x0&&(_0x2953b2[_0x53d184(0x126)]=_0x2953b2[_0x53d184(0x12d)]['split'](',')[_0x53d184(0x149)](_0x3b0fd8=>_0x3b0fd8[_0x53d184(0x134)]())[_0x53d184(0x145)](Boolean)),_0x2953b2;}function normalizeRelatedPages(_0x25ba80){const _0x5d7bba=a62_0x534f;if(!Array[_0x5d7bba(0x14f)](_0x25ba80))return[];return _0x25ba80['filter'](_0x4bfa9e=>_0x4bfa9e&&typeof _0x4bfa9e===_0x5d7bba(0x12f))[_0x5d7bba(0x149)](_0x466af5=>({'id':_0x466af5['id'],'type':_0x466af5[_0x5d7bba(0x15a)],'code':_0x466af5[_0x5d7bba(0x13b)],'title':_0x466af5[_0x5d7bba(0x15d)],'deleted':_0x466af5[_0x5d7bba(0x13a)]===!![]}));}export const datasetDetail={'service':a62_0x515489(0x14a),'command':a62_0x515489(0x10d),'description':a62_0x515489(0x13e),'risk':a62_0x515489(0x11b),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x515489(0x118),'type':'string','description':a62_0x515489(0x125)}],async 'execute'(_0x2818bd){const _0x55ec91=a62_0x515489,_0x520e18=await getDatasetDetail(_0x2818bd[_0x55ec91(0x112)](_0x55ec91(0x13b))),_0x236019=Array['isArray'](_0x520e18[_0x55ec91(0x12c)])?_0x520e18[_0x55ec91(0x12c)]:Array[_0x55ec91(0x14f)](_0x520e18[_0x55ec91(0x144)])?_0x520e18[_0x55ec91(0x144)]:[],_0xa2ef2c=_0x236019[_0x55ec91(0x149)](_0x410e2d=>normalizeField(_0x410e2d))[_0x55ec91(0x145)](_0x543e7d=>_0x543e7d!==null),_0x432d94=_0x520e18[_0x55ec91(0x150)]??{},_0x27deef=[];for(const [_0x67df3d,_0x5bc947]of Object[_0x55ec91(0x159)](_0x432d94)){const _0x3a9ad1=normalizeOperationEntry(_0x67df3d,_0x5bc947);if(_0x3a9ad1)_0x27deef['push'](_0x3a9ad1);}const _0x380caf=_0x520e18['dbtableConfig']??{},_0x47d754=_0x520e18[_0x55ec91(0x14a)]??{},_0x4015b8=_0x380caf[_0x55ec91(0x135)]!=null?{'id':_0x380caf[_0x55ec91(0x135)],'name':_0x380caf['dbName']??null}:undefined;let _0x5ca20f;return typeof _0x520e18[_0x55ec91(0x11d)]===_0x55ec91(0x10e)&&(_0x5ca20f=parseJsonMaybe(_0x520e18[_0x55ec91(0x11d)])),{'ok':!![],'data':{'id':_0x520e18[_0x55ec91(0x129)]??_0x520e18['id'],'name':_0x520e18[_0x55ec91(0x116)],'code':_0x520e18[_0x55ec91(0x122)]||_0x520e18['code'],'doVersion':_0x520e18[_0x55ec91(0x12b)],'description':_0x520e18['description']||_0x47d754[_0x55ec91(0x110)]||undefined,'source':_0x520e18[_0x55ec91(0x114)]||_0x47d754[_0x55ec91(0x156)],'table':_0x380caf[_0x55ec91(0x146)]||_0x47d754[_0x55ec91(0x146)],'datasetKey':_0x380caf['datasetKey'],'pk':_0x380caf[_0x55ec91(0x132)],'db':_0x4015b8,'dbtable':summarizeDbtable(_0x380caf),'fields':_0xa2ef2c,'operations':_0x27deef,'indexes':Array['isArray'](_0x47d754['indexes'])?_0x47d754[_0x55ec91(0x117)]:[],'relations':Array[_0x55ec91(0x14f)](_0x520e18[_0x55ec91(0x154)])?_0x520e18[_0x55ec91(0x154)][_0x55ec91(0x149)](_0x3394b4=>({..._0x3394b4[_0x55ec91(0x152)]!=null?{'relationId':_0x3394b4['relationId']}:{},'fromDataset':_0x520e18[_0x55ec91(0x116)],'fromCode':_0x520e18[_0x55ec91(0x122)]||_0x520e18[_0x55ec91(0x13b)],'fromTable':_0x380caf[_0x55ec91(0x146)]||_0x47d754[_0x55ec91(0x146)],'fromField':_0x3394b4[_0x55ec91(0x15f)],'toDataset':_0x3394b4[_0x55ec91(0x13c)],'toCode':_0x3394b4['toDatasetCode'],'toTable':_0x3394b4[_0x55ec91(0x11c)],'toField':_0x3394b4['toField'],'labelField':_0x3394b4[_0x55ec91(0x143)]||undefined,'cardinality':_0x3394b4[_0x55ec91(0x127)]||undefined,'bizRelationType':_0x3394b4[_0x55ec91(0x136)]===_0x55ec91(0x13f)?_0x55ec91(0x13f):null})):[],'relatedPages':normalizeRelatedPages(_0x520e18[_0x55ec91(0x158)]),...Array[_0x55ec91(0x14f)](_0x520e18[_0x55ec91(0x131)])?{'columnCodeListWithDeleted':_0x520e18[_0x55ec91(0x131)]}:{},'formatRules':Array[_0x55ec91(0x14f)](_0x520e18[_0x55ec91(0x11f)])?_0x520e18[_0x55ec91(0x11f)]:[],'validateRules':Array[_0x55ec91(0x14f)](_0x520e18['validateRules'])?_0x520e18[_0x55ec91(0x148)]:[],..._0x5ca20f!==undefined?{'extend':_0x5ca20f}:{},'stats':{'fieldCount':_0xa2ef2c[_0x55ec91(0x142)],'operationCount':_0x27deef[_0x55ec91(0x142)]}}};}};
1
+ function a62_0x43df(_0x166ac4,_0x4bbb7b){_0x166ac4=_0x166ac4-0x16d;const _0x36a949=a62_0x36a9();let _0x43dfd0=_0x36a949[_0x166ac4];return _0x43dfd0;}const a62_0xa0b59c=a62_0x43df;(function(_0x8ea739,_0x145994){const _0x5effcb=a62_0x43df,_0x4dcf50=_0x8ea739();while(!![]){try{const _0x30f689=-parseInt(_0x5effcb(0x19d))/0x1*(-parseInt(_0x5effcb(0x195))/0x2)+-parseInt(_0x5effcb(0x19a))/0x3*(-parseInt(_0x5effcb(0x1b1))/0x4)+parseInt(_0x5effcb(0x1ac))/0x5*(parseInt(_0x5effcb(0x18b))/0x6)+-parseInt(_0x5effcb(0x19c))/0x7+-parseInt(_0x5effcb(0x17a))/0x8+-parseInt(_0x5effcb(0x18d))/0x9+parseInt(_0x5effcb(0x197))/0xa;if(_0x30f689===_0x145994)break;else _0x4dcf50['push'](_0x4dcf50['shift']());}catch(_0x25f75a){_0x4dcf50['push'](_0x4dcf50['shift']());}}}(a62_0x36a9,0x44c89));function a62_0x36a9(){const _0x14b014=['filter','labelField','updateTimeField','6FrwJjG','requestFields','3880818oiNzQC','dblinkInfoDTO','modifierIdField','source','extend','deprecated','detail','allFieldNames','40OhRBLd','allFields','2143060HMUjaz','relatedPageInfoList','split','645izWYwo','doType','704543PNokLI','1585qqbwEM','length','string','path','host','dbName','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','toDatasetName','operations','validateRules','required','relationId','datasetKey','beforeScriptId','main_sub','2730440lIOtua','bizRelationType','fields','displayName','method','2012xgOgNC','code','dbType','toFieldLabel','isArray','read','properties','parse','dbId','toDatasetCode','toTableName','name','logicField','tableComment','dataset','description','trim','type','responseBody','createTimeField','fromField','creatorIdField','requestBody','columnCodeListWithDeleted','tableName','afterScriptId','sourceType','responseFields','693208PkvxOp','formatRules','map','indexes','pkField','object','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','title','options','modelId','toField','str','modelCode','dbtableConfig'];a62_0x36a9=function(){return _0x14b014;};return a62_0x36a9();}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x12093e){const _0x3a83f8=a62_0x43df;if(_0x12093e['deleted'])return null;const _0x2671ea=Boolean(_0x12093e['displayName']!==undefined||_0x12093e['doType']!==undefined);let _0x1f0aef={};if(!_0x2671ea&&typeof _0x12093e[_0x3a83f8(0x191)]===_0x3a83f8(0x19f))try{_0x1f0aef=JSON['parse'](_0x12093e[_0x3a83f8(0x191)]);}catch{}const _0x4bbadf=_0x2671ea?_0x12093e[_0x3a83f8(0x1bc)]:_0x12093e[_0x3a83f8(0x1b2)],_0x1c004c=_0x2671ea?_0x12093e[_0x3a83f8(0x1af)]:_0x12093e[_0x3a83f8(0x1bc)],_0x5137f1=_0x2671ea?_0x12093e[_0x3a83f8(0x19b)]:_0x12093e[_0x3a83f8(0x16f)]||_0x12093e['dataType'],_0x2bb7fa=_0x2671ea?_0x12093e['pkField']===!![]:_0x1f0aef[_0x3a83f8(0x17e)]===!![],_0xfbbebe=_0x2671ea?_0x12093e[_0x3a83f8(0x1a7)]===!![]:_0x1f0aef[_0x3a83f8(0x1a7)]===!![],_0x3eb8ed=_0x2671ea?_0x12093e[_0x3a83f8(0x182)]??null:_0x1f0aef[_0x3a83f8(0x182)]??null,_0x10bbfe={'name':_0x4bbadf,'displayName':_0x1c004c||_0x4bbadf,'type':_0x5137f1,'dbType':_0x12093e[_0x3a83f8(0x1b3)],'pk':_0x2bb7fa,'required':_0xfbbebe,'deprecated':_0x12093e[_0x3a83f8(0x192)]===!![],'description':_0x12093e['description']||undefined};return Array[_0x3a83f8(0x1b5)](_0x3eb8ed)&&_0x3eb8ed[_0x3a83f8(0x19e)]>0x0&&(_0x10bbfe[_0x3a83f8(0x182)]=_0x3eb8ed),_0x10bbfe;}function parseJsonMaybe(_0x3c95ec){const _0x321e46=a62_0x43df;if(typeof _0x3c95ec!==_0x321e46(0x19f))return _0x3c95ec;try{return JSON[_0x321e46(0x1b8)](_0x3c95ec);}catch{return _0x3c95ec;}}function normalizeOperationEntry(_0x16d763,_0x45fba9){const _0x107c36=a62_0x43df;if(!_0x45fba9||typeof _0x45fba9!==_0x107c36(0x17f))return null;if(!_0x45fba9[_0x107c36(0x1b0)]||!_0x45fba9[_0x107c36(0x1a0)])return null;const _0x35ddde={'name':_0x16d763,'method':_0x45fba9[_0x107c36(0x1b0)],'path':_0x45fba9[_0x107c36(0x1a0)]};if(_0x45fba9[_0x107c36(0x1a1)])_0x35ddde[_0x107c36(0x1a1)]=_0x45fba9[_0x107c36(0x1a1)];if(_0x45fba9['requestBody']!=null){const _0x1fd515=parseJsonMaybe(_0x45fba9[_0x107c36(0x174)]);_0x35ddde[_0x107c36(0x174)]=_0x1fd515;}if(_0x45fba9['responseBody']!=null){const _0x16673d=parseJsonMaybe(_0x45fba9[_0x107c36(0x170)]);_0x35ddde['responseBody']=_0x16673d;}if(_0x45fba9[_0x107c36(0x1aa)]!=null)_0x35ddde[_0x107c36(0x1aa)]=_0x45fba9[_0x107c36(0x1aa)];if(_0x45fba9[_0x107c36(0x177)]!=null)_0x35ddde[_0x107c36(0x177)]=_0x45fba9[_0x107c36(0x177)];if(Array['isArray'](_0x45fba9[_0x107c36(0x18c)]))_0x35ddde[_0x107c36(0x18c)]=_0x45fba9[_0x107c36(0x18c)];if(Array['isArray'](_0x45fba9[_0x107c36(0x179)]))_0x35ddde[_0x107c36(0x179)]=_0x45fba9['responseFields'];return _0x35ddde;}function summarizeDbtable(_0x283b0d){const _0x242390=a62_0x43df,_0x1b3d39={},_0xaedb75=[_0x242390(0x1b9),'dbName',_0x242390(0x176),'datasetKey',_0x242390(0x17e),_0x242390(0x196),_0x242390(0x1bd),_0x242390(0x171),_0x242390(0x18a),_0x242390(0x173),'creatorNameField',_0x242390(0x18f),'modifierNameField',_0x242390(0x189),_0x242390(0x18e)];for(const _0x295cb5 of _0xaedb75){if(_0x283b0d[_0x295cb5]!==undefined)_0x1b3d39[_0x295cb5]=_0x283b0d[_0x295cb5];}return typeof _0x1b3d39[_0x242390(0x196)]==='string'&&_0x1b3d39[_0x242390(0x196)]['length']>0x0&&(_0x1b3d39[_0x242390(0x194)]=_0x1b3d39[_0x242390(0x196)][_0x242390(0x199)](',')[_0x242390(0x17c)](_0x104d97=>_0x104d97[_0x242390(0x16e)]())['filter'](Boolean)),_0x1b3d39;}function normalizeRelatedPages(_0x3b9632){const _0x820156=a62_0x43df;if(!Array[_0x820156(0x1b5)](_0x3b9632))return[];return _0x3b9632[_0x820156(0x188)](_0x8a8438=>_0x8a8438&&typeof _0x8a8438===_0x820156(0x17f))[_0x820156(0x17c)](_0x23968b=>({'id':_0x23968b['id'],'type':_0x23968b['type'],'code':_0x23968b[_0x820156(0x1b2)],'title':_0x23968b[_0x820156(0x181)],'deleted':_0x23968b['deleted']===!![]}));}export const datasetDetail={'service':a62_0xa0b59c(0x1bf),'command':a62_0xa0b59c(0x193),'description':a62_0xa0b59c(0x1a3),'risk':a62_0xa0b59c(0x1b6),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a62_0xa0b59c(0x180)}],async 'execute'(_0x1a1008){const _0x1d9c5b=a62_0xa0b59c,_0x233bc8=await getDatasetDetail(_0x1a1008[_0x1d9c5b(0x185)](_0x1d9c5b(0x1b2))),_0x3245ce=Array['isArray'](_0x233bc8[_0x1d9c5b(0x1ae)])?_0x233bc8[_0x1d9c5b(0x1ae)]:Array[_0x1d9c5b(0x1b5)](_0x233bc8[_0x1d9c5b(0x1b7)])?_0x233bc8[_0x1d9c5b(0x1b7)]:[],_0x13d62e=_0x3245ce[_0x1d9c5b(0x17c)](_0x54eb5b=>normalizeField(_0x54eb5b))[_0x1d9c5b(0x188)](_0x286e04=>_0x286e04!==null),_0x26c06a=_0x233bc8[_0x1d9c5b(0x1a5)]??{},_0x5eb244=[];for(const [_0x1f27b8,_0x23915b]of Object['entries'](_0x26c06a)){const _0x4116fb=normalizeOperationEntry(_0x1f27b8,_0x23915b);if(_0x4116fb)_0x5eb244['push'](_0x4116fb);}const _0x3355cb=_0x233bc8[_0x1d9c5b(0x187)]??{},_0x1e5ed9=_0x233bc8[_0x1d9c5b(0x1bf)]??{},_0x531afc=_0x3355cb[_0x1d9c5b(0x1b9)]!=null?{'id':_0x3355cb[_0x1d9c5b(0x1b9)],'name':_0x3355cb[_0x1d9c5b(0x1a2)]??null}:undefined;let _0x11c157;return typeof _0x233bc8[_0x1d9c5b(0x191)]===_0x1d9c5b(0x19f)&&(_0x11c157=parseJsonMaybe(_0x233bc8[_0x1d9c5b(0x191)])),{'ok':!![],'data':{'id':_0x233bc8[_0x1d9c5b(0x183)]??_0x233bc8['id'],'name':_0x233bc8[_0x1d9c5b(0x1bc)],'code':_0x233bc8[_0x1d9c5b(0x186)]||_0x233bc8[_0x1d9c5b(0x1b2)],'doVersion':_0x233bc8['doVersion'],'description':_0x233bc8[_0x1d9c5b(0x16d)]||_0x1e5ed9[_0x1d9c5b(0x1be)]||undefined,'source':_0x233bc8[_0x1d9c5b(0x190)]||_0x1e5ed9[_0x1d9c5b(0x178)],'table':_0x3355cb['tableName']||_0x1e5ed9[_0x1d9c5b(0x176)],'datasetKey':_0x3355cb[_0x1d9c5b(0x1a9)],'pk':_0x3355cb[_0x1d9c5b(0x17e)],'db':_0x531afc,'dbtable':summarizeDbtable(_0x3355cb),'fields':_0x13d62e,'operations':_0x5eb244,'indexes':Array[_0x1d9c5b(0x1b5)](_0x1e5ed9[_0x1d9c5b(0x17d)])?_0x1e5ed9[_0x1d9c5b(0x17d)]:[],'relations':Array[_0x1d9c5b(0x1b5)](_0x233bc8['relations'])?_0x233bc8['relations'][_0x1d9c5b(0x17c)](_0x353d3d=>({..._0x353d3d['relationId']!=null?{'relationId':_0x353d3d[_0x1d9c5b(0x1a8)]}:{},'fromDataset':_0x233bc8[_0x1d9c5b(0x1bc)],'fromCode':_0x233bc8[_0x1d9c5b(0x186)]||_0x233bc8[_0x1d9c5b(0x1b2)],'fromTable':_0x3355cb[_0x1d9c5b(0x176)]||_0x1e5ed9[_0x1d9c5b(0x176)],'fromField':_0x353d3d[_0x1d9c5b(0x172)],'toDataset':_0x353d3d[_0x1d9c5b(0x1a4)],'toCode':_0x353d3d[_0x1d9c5b(0x1ba)],'toTable':_0x353d3d[_0x1d9c5b(0x1bb)],'toField':_0x353d3d[_0x1d9c5b(0x184)],'labelField':_0x353d3d[_0x1d9c5b(0x1b4)]||undefined,'cardinality':_0x353d3d['cardinality']||undefined,'bizRelationType':_0x353d3d[_0x1d9c5b(0x1ad)]===_0x1d9c5b(0x1ab)?_0x1d9c5b(0x1ab):null})):[],'relatedPages':normalizeRelatedPages(_0x233bc8[_0x1d9c5b(0x198)]),...Array[_0x1d9c5b(0x1b5)](_0x233bc8[_0x1d9c5b(0x175)])?{'columnCodeListWithDeleted':_0x233bc8[_0x1d9c5b(0x175)]}:{},'formatRules':Array[_0x1d9c5b(0x1b5)](_0x233bc8[_0x1d9c5b(0x17b)])?_0x233bc8[_0x1d9c5b(0x17b)]:[],'validateRules':Array[_0x1d9c5b(0x1b5)](_0x233bc8[_0x1d9c5b(0x1a6)])?_0x233bc8[_0x1d9c5b(0x1a6)]:[],..._0x11c157!==undefined?{'extend':_0x11c157}:{},'stats':{'fieldCount':_0x13d62e['length'],'operationCount':_0x5eb244[_0x1d9c5b(0x19e)]}}};}};
@@ -1 +1 @@
1
- const a63_0x2de992=a63_0x242f;(function(_0x5b0b6b,_0x520f43){const _0x5481fe=a63_0x242f,_0x499d41=_0x5b0b6b();while(!![]){try{const _0x5aeb5d=-parseInt(_0x5481fe(0xc1))/0x1+parseInt(_0x5481fe(0xb7))/0x2+-parseInt(_0x5481fe(0xd8))/0x3+-parseInt(_0x5481fe(0xb5))/0x4*(parseInt(_0x5481fe(0xd9))/0x5)+parseInt(_0x5481fe(0xbb))/0x6+parseInt(_0x5481fe(0xd7))/0x7+-parseInt(_0x5481fe(0xf1))/0x8;if(_0x5aeb5d===_0x520f43)break;else _0x499d41['push'](_0x499d41['shift']());}catch(_0x30ce8c){_0x499d41['push'](_0x499d41['shift']());}}}(a63_0x1673,0x74cab));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_0x2de992(0xf2),{'message':a63_0x2de992(0xd6),'hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);export function parseJsonObjectFlag(_0x3ae96e,_0x499d52){const _0x166776=a63_0x2de992;if(!_0x3ae96e)return undefined;let _0x2ff18a;try{_0x2ff18a=JSON[_0x166776(0xc8)](_0x3ae96e);}catch(_0x5a26f5){const _0x4ef11b=_0x5a26f5 instanceof Error?_0x5a26f5['message']:String(_0x5a26f5);throw CliErrors[_0x166776(0xd4)](_0x499d52+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x4ef11b);}if(!isPlainObject(_0x2ff18a)||Array[_0x166776(0xd5)](_0x2ff18a))throw CliErrors[_0x166776(0xd4)](_0x499d52+_0x166776(0xbe));return _0x2ff18a;}export function validateExtendPatchKeys(_0x11520c){const _0x25497e=a63_0x2de992,_0xf56910=Object[_0x25497e(0xf3)](_0x11520c);if(_0xf56910[_0x25497e(0xc5)]===0x0)throw CliErrors[_0x25497e(0xd4)](_0x25497e(0xb6));for(const _0x1fb6f7 of _0xf56910){const _0x47527a=EXTEND_PATCH_REDIRECTS[_0x25497e(0xc6)](_0x1fb6f7);if(_0x47527a)throw CliErrors[_0x25497e(0xd4)](_0x47527a[_0x25497e(0xcf)],_0x47527a[_0x25497e(0xec)]);if(!MUTABLE_EXTEND_KEYS[_0x25497e(0xe6)](_0x1fb6f7))throw CliErrors[_0x25497e(0xd4)](_0x25497e(0xeb)+_0x1fb6f7,describeMutableExtendKeys());}}function a63_0x242f(_0x13f878,_0x3ab951){_0x13f878=_0x13f878-0xb5;const _0x1673f1=a63_0x1673();let _0x242f48=_0x1673f1[_0x13f878];return _0x242f48;}function describeMutableExtendKeys(){const _0x26f0bb=a63_0x2de992,_0x3a33eb=Array[_0x26f0bb(0xba)](MUTABLE_EXTEND_KEYS)[_0x26f0bb(0xe3)]();return _0x3a33eb['length']>0x0?_0x26f0bb(0xe7)+_0x3a33eb[_0x26f0bb(0xe0)](',\x20'):'No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.';}export function applyExtendPatch(_0x550bc4,_0x5013b8){const _0x554c1e=a63_0x2de992;validateExtendPatchKeys(_0x5013b8);const _0xaac8b3=deepClone(_0x550bc4),_0x44e7f7=[];for(const [_0x290ee3,_0x5c6717]of Object[_0x554c1e(0xe8)](_0x5013b8)){const _0x50a3ee=_0xaac8b3[_0x290ee3],_0x289b98=deepClone(_0x5c6717);!deepEqual(_0x50a3ee,_0x289b98)&&(_0xaac8b3[_0x290ee3]=_0x289b98,_0x44e7f7['push'](_0x554c1e(0xdf)+_0x290ee3));}return _0x44e7f7[_0x554c1e(0xe3)](),{'after':_0xaac8b3,'changedPaths':_0x44e7f7,'changed':_0x44e7f7[_0x554c1e(0xc5)]>0x0};}export function assertExpectation(_0x44f93d,_0x497544){const _0x4c98a4=a63_0x2de992;if(!_0x497544)return;for(const [_0x4fb046,_0x888fec]of Object['entries'](_0x497544)){const _0x1689b1=_0x44f93d[_0x4fb046];if(!deepEqual(_0x1689b1,_0x888fec))throw CliErrors[_0x4c98a4(0xd4)]('Expectation\x20mismatch\x20at\x20extend.'+_0x4fb046,_0x4c98a4(0xf0)+JSON['stringify'](_0x888fec)+',\x20actual\x20'+JSON[_0x4c98a4(0xb8)](_0x1689b1));}}export async function buildDatasetExtendUpdateResult({appCode:_0x203296,input:_0x5c1a87,dryRun:_0x3b4ab9}){const _0x2bd3a4=a63_0x2de992;validateInput(_0x5c1a87);const _0xef07d2=await getDatasetDetail(_0x5c1a87[_0x2bd3a4(0xc0)]),_0x566a09=parseDatasetExtend(_0xef07d2['extend']),_0x24e90b=deepClone(_0x566a09[_0x2bd3a4(0xe5)]);assertExpectation(_0x24e90b,_0x5c1a87[_0x2bd3a4(0xe2)]);const {after:_0x36ecad,changedPaths:_0x3792c8,changed:_0xae9e61}=applyExtendPatch(_0x24e90b,_0x5c1a87[_0x2bd3a4(0xce)]),_0x5088d3=summarizeDataset(_0xef07d2,_0x5c1a87[_0x2bd3a4(0xc0)]);return _0xae9e61&&!_0x3b4ab9&&(_0xef07d2[_0x2bd3a4(0xbf)]=serializeDatasetExtend(_0x36ecad,_0x566a09[_0x2bd3a4(0xc3)]),await updateDrivenData(_0xef07d2)),{'ok':!![],'data':{'appCode':_0x203296,'selector':{'code':_0x5c1a87[_0x2bd3a4(0xc0)]},'dataset':_0x5088d3,'dryRun':_0x3b4ab9,'changed':_0xae9e61,'changedPaths':_0x3792c8,'before':{'extend':_0x24e90b},'after':{'extend':_0x36ecad},'submitted':_0xae9e61&&!_0x3b4ab9},'message':_0xae9e61?_0x3b4ab9?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x3792c8[_0x2bd3a4(0xe0)](',\x20')+')':_0x2bd3a4(0xc4)+_0x3792c8['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a63_0x2de992(0xe9),'command':a63_0x2de992(0xda),'description':a63_0x2de992(0xee),'risk':a63_0x2de992(0xca),'flags':[CODE_FLAG,{'name':a63_0x2de992(0xc7),'type':a63_0x2de992(0xbc),'required':!![],'description':a63_0x2de992(0xdd)},{'name':'expect-json','type':a63_0x2de992(0xbc),'required':![],'description':a63_0x2de992(0xd2)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29e429){validateInput(readExtendUpdateInput(_0x29e429));},async 'dryRun'(_0x5e39ff){const _0x4a41d4=a63_0x2de992,_0x57c6d4=await buildDatasetExtendUpdateResult({'appCode':_0x5e39ff[_0x4a41d4(0xdb)],'input':readExtendUpdateInput(_0x5e39ff),'dryRun':!![]});return{'method':_0x4a41d4(0xd1),'url':_0x4a41d4(0xc9),'body':_0x57c6d4[_0x4a41d4(0xe1)],'description':_0x57c6d4[_0x4a41d4(0xcf)]};},async 'execute'(_0x52e396){const _0x541277=a63_0x2de992;return buildDatasetExtendUpdateResult({'appCode':_0x52e396[_0x541277(0xdb)],'input':readExtendUpdateInput(_0x52e396),'dryRun':![]});}};function readExtendUpdateInput(_0x225a99){const _0x2caec3=a63_0x2de992,_0x171c30=trim(_0x225a99[_0x2caec3(0xd3)](_0x2caec3(0xc0))),_0x1a4d02=parseJsonObjectFlag(_0x225a99[_0x2caec3(0xd3)](_0x2caec3(0xc7)),_0x2caec3(0xe4)),_0x519534=parseJsonObjectFlag(_0x225a99[_0x2caec3(0xd3)]('expect-json'),_0x2caec3(0xdc));return{'code':_0x171c30,'patch':_0x1a4d02||{},'expect':_0x519534};}function validateInput(_0x64fd77){const _0x3fbeba=a63_0x2de992;if(!_0x64fd77[_0x3fbeba(0xc0)])throw CliErrors[_0x3fbeba(0xd4)](_0x3fbeba(0xd0));validateExtendPatchKeys(_0x64fd77['patch']);}function a63_0x1673(){const _0x1ac943=['parse','/smartapi/dataset/update-driven-data','write','modelId','tableName','trim','patch','message','--code\x20is\x20required','POST','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','str','validation','isArray','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','3487323XUHFNI','42948KduewK','15NzzHII','extend-update','appCode','--expect-json','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','dbtableConfig','extend.','join','data','expect','sort','--patch-json','value','has','Allowed\x20keys:\x20','entries','dataset','modelCode','Unsupported\x20patch\x20key:\x20','hint','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','Patch\x20dataset\x20top-level\x20extend\x20safely','name','Expected\x20','11551176kWpsOQ','businessGroup','keys','203060FItRXd','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','1753306qbLxoj','stringify','datasetId','from','5051346ULQbzZ','string','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','\x20must\x20be\x20a\x20JSON\x20object','extend','code','127846gwpuox','object','shape','Updated\x20dataset\x20extend\x20(','length','get','patch-json'];a63_0x1673=function(){return _0x1ac943;};return a63_0x1673();}function parseDatasetExtend(_0x528cfb){const _0x167054=a63_0x2de992;if(typeof _0x528cfb===_0x167054(0xbc)){const _0x2e9fd5=_0x528cfb[_0x167054(0xcd)]();if(!_0x2e9fd5)return{'value':{},'shape':'string'};let _0x3d632e;try{_0x3d632e=JSON[_0x167054(0xc8)](_0x2e9fd5);}catch(_0x382776){const _0x2e9f7e=_0x382776 instanceof Error?_0x382776[_0x167054(0xcf)]:String(_0x382776);throw CliErrors[_0x167054(0xd4)](_0x167054(0xbd)+_0x2e9f7e);}if(!isPlainObject(_0x3d632e)||Array[_0x167054(0xd5)](_0x3d632e))throw CliErrors[_0x167054(0xd4)](_0x167054(0xed));return{'value':_0x3d632e,'shape':_0x167054(0xbc)};}if(_0x528cfb===undefined||_0x528cfb===null)return{'value':{},'shape':_0x167054(0xbc)};if(!isPlainObject(_0x528cfb)||Array[_0x167054(0xd5)](_0x528cfb))throw CliErrors[_0x167054(0xd4)](_0x167054(0xed));return{'value':_0x528cfb,'shape':_0x167054(0xc2)};}function serializeDatasetExtend(_0x23ec83,_0x5dedaf){const _0x34d48c=a63_0x2de992;return _0x5dedaf===_0x34d48c(0xbc)?JSON[_0x34d48c(0xb8)](_0x23ec83):_0x23ec83;}function summarizeDataset(_0x23648d,_0x23ca3f){const _0x3b13f9=a63_0x2de992,_0x2ba7d2=isPlainObject(_0x23648d[_0x3b13f9(0xe9)])?_0x23648d['dataset']:{},_0x281a45=isPlainObject(_0x23648d['dbtableConfig'])?_0x23648d[_0x3b13f9(0xde)]:{};return{'id':_0x23648d[_0x3b13f9(0xcb)]??_0x23648d['id']??_0x2ba7d2[_0x3b13f9(0xb9)]??null,'code':_0x23648d[_0x3b13f9(0xea)]??_0x23648d[_0x3b13f9(0xc0)]??_0x2ba7d2['datasetCode']??_0x23ca3f,'name':_0x23648d[_0x3b13f9(0xef)]??_0x2ba7d2['datasetName']??null,'table':_0x281a45[_0x3b13f9(0xcc)]??_0x2ba7d2[_0x3b13f9(0xcc)]??null,'db':_0x281a45['dbName']??_0x281a45['dbId']??null};}function deepClone(_0x4cf9c9){const _0x124a84=a63_0x2de992;if(_0x4cf9c9===undefined)return _0x4cf9c9;return JSON[_0x124a84(0xc8)](JSON[_0x124a84(0xb8)](_0x4cf9c9));}function deepEqual(_0x3c6fe7,_0x1dc1d4){const _0x2d7c33=a63_0x2de992;return JSON[_0x2d7c33(0xb8)](_0x3c6fe7)===JSON['stringify'](_0x1dc1d4);}function isPlainObject(_0x5f303c){const _0x20787a=a63_0x2de992;return Boolean(_0x5f303c)&&typeof _0x5f303c==='object'&&!Array[_0x20787a(0xd5)](_0x5f303c);}function trim(_0xc919f2){const _0x37940c=String(_0xc919f2||'')['trim']();return _0x37940c;}
1
+ const a63_0xc4bca4=a63_0x1dd0;(function(_0x2e5ca1,_0x546909){const _0x33e3a0=a63_0x1dd0,_0x392229=_0x2e5ca1();while(!![]){try{const _0x20ca1b=parseInt(_0x33e3a0(0x208))/0x1+-parseInt(_0x33e3a0(0x1e0))/0x2+-parseInt(_0x33e3a0(0x210))/0x3+parseInt(_0x33e3a0(0x1d7))/0x4*(parseInt(_0x33e3a0(0x1e5))/0x5)+parseInt(_0x33e3a0(0x1e9))/0x6*(parseInt(_0x33e3a0(0x1d5))/0x7)+parseInt(_0x33e3a0(0x1fa))/0x8+-parseInt(_0x33e3a0(0x1f0))/0x9;if(_0x20ca1b===_0x546909)break;else _0x392229['push'](_0x392229['shift']());}catch(_0x32f376){_0x392229['push'](_0x392229['shift']());}}}(a63_0x4f27,0x5dd1c));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a63_0x1dd0(_0xc04686,_0x1ddcdf){_0xc04686=_0xc04686-0x1d2;const _0x4f2749=a63_0x4f27();let _0x1dd0af=_0x4f2749[_0xc04686];return _0x1dd0af;}import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a63_0xc4bca4(0x1de),{'message':a63_0xc4bca4(0x20a),'hint':a63_0xc4bca4(0x1fc)}]]);export function parseJsonObjectFlag(_0x73e7b0,_0xd1546a){const _0x7086d4=a63_0xc4bca4;if(!_0x73e7b0)return undefined;let _0x81ba81;try{_0x81ba81=JSON[_0x7086d4(0x1f8)](_0x73e7b0);}catch(_0x5eb7e1){const _0x5d5e1a=_0x5eb7e1 instanceof Error?_0x5eb7e1[_0x7086d4(0x20d)]:String(_0x5eb7e1);throw CliErrors[_0x7086d4(0x213)](_0xd1546a+_0x7086d4(0x1db)+_0x5d5e1a);}if(!isPlainObject(_0x81ba81)||Array[_0x7086d4(0x212)](_0x81ba81))throw CliErrors[_0x7086d4(0x213)](_0xd1546a+_0x7086d4(0x1f4));return _0x81ba81;}export function validateExtendPatchKeys(_0x31e471){const _0x56ed48=a63_0xc4bca4,_0xf349a1=Object[_0x56ed48(0x1ec)](_0x31e471);if(_0xf349a1['length']===0x0)throw CliErrors['validation']('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x256742 of _0xf349a1){const _0x2ab38f=EXTEND_PATCH_REDIRECTS[_0x56ed48(0x1fd)](_0x256742);if(_0x2ab38f)throw CliErrors[_0x56ed48(0x213)](_0x2ab38f[_0x56ed48(0x20d)],_0x2ab38f[_0x56ed48(0x1f5)]);if(!MUTABLE_EXTEND_KEYS[_0x56ed48(0x1f6)](_0x256742))throw CliErrors[_0x56ed48(0x213)](_0x56ed48(0x1dc)+_0x256742,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x199988=a63_0xc4bca4,_0x4d9c8d=Array[_0x199988(0x1ee)](MUTABLE_EXTEND_KEYS)[_0x199988(0x202)]();return _0x4d9c8d[_0x199988(0x209)]>0x0?_0x199988(0x211)+_0x4d9c8d[_0x199988(0x1e2)](',\x20'):_0x199988(0x1e3);}export function applyExtendPatch(_0x2927f6,_0x33b8d6){const _0x467a30=a63_0xc4bca4;validateExtendPatchKeys(_0x33b8d6);const _0x4695f2=deepClone(_0x2927f6),_0x3de24f=[];for(const [_0x516717,_0x67476b]of Object[_0x467a30(0x1f9)](_0x33b8d6)){const _0x3ae9a2=_0x4695f2[_0x516717],_0x122bd9=deepClone(_0x67476b);!deepEqual(_0x3ae9a2,_0x122bd9)&&(_0x4695f2[_0x516717]=_0x122bd9,_0x3de24f[_0x467a30(0x1e1)]('extend.'+_0x516717));}return _0x3de24f[_0x467a30(0x202)](),{'after':_0x4695f2,'changedPaths':_0x3de24f,'changed':_0x3de24f[_0x467a30(0x209)]>0x0};}export function assertExpectation(_0x573f76,_0x60f619){const _0x8f2a5e=a63_0xc4bca4;if(!_0x60f619)return;for(const [_0x19deff,_0x363e7d]of Object[_0x8f2a5e(0x1f9)](_0x60f619)){const _0x5a329d=_0x573f76[_0x19deff];if(!deepEqual(_0x5a329d,_0x363e7d))throw CliErrors[_0x8f2a5e(0x213)]('Expectation\x20mismatch\x20at\x20extend.'+_0x19deff,_0x8f2a5e(0x1da)+JSON[_0x8f2a5e(0x1d3)](_0x363e7d)+_0x8f2a5e(0x200)+JSON[_0x8f2a5e(0x1d3)](_0x5a329d));}}export async function buildDatasetExtendUpdateResult({appCode:_0x3b9d34,input:_0x40483c,dryRun:_0x47e7e4}){const _0x385ba2=a63_0xc4bca4;validateInput(_0x40483c);const _0x501d3f=await getDatasetDetail(_0x40483c[_0x385ba2(0x206)]),_0x3fc2df=parseDatasetExtend(_0x501d3f[_0x385ba2(0x1fe)]),_0x33b370=deepClone(_0x3fc2df[_0x385ba2(0x1e4)]);assertExpectation(_0x33b370,_0x40483c[_0x385ba2(0x1fb)]);const {after:_0xf183,changedPaths:_0x318b9f,changed:_0x557a16}=applyExtendPatch(_0x33b370,_0x40483c[_0x385ba2(0x1df)]),_0x1b9ae5=summarizeDataset(_0x501d3f,_0x40483c['code']);return _0x557a16&&!_0x47e7e4&&(_0x501d3f['extend']=serializeDatasetExtend(_0xf183,_0x3fc2df[_0x385ba2(0x1f1)]),await updateDrivenData(_0x501d3f)),{'ok':!![],'data':{'appCode':_0x3b9d34,'selector':{'code':_0x40483c['code']},'dataset':_0x1b9ae5,'dryRun':_0x47e7e4,'changed':_0x557a16,'changedPaths':_0x318b9f,'before':{'extend':_0x33b370},'after':{'extend':_0xf183},'submitted':_0x557a16&&!_0x47e7e4},'message':_0x557a16?_0x47e7e4?_0x385ba2(0x1e6)+_0x318b9f[_0x385ba2(0x1e2)](',\x20')+')':_0x385ba2(0x20b)+_0x318b9f[_0x385ba2(0x1e2)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a63_0xc4bca4(0x1e8),'command':a63_0xc4bca4(0x207),'description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a63_0xc4bca4(0x1d9),'flags':[CODE_FLAG,{'name':a63_0xc4bca4(0x1d4),'type':a63_0xc4bca4(0x1eb),'required':!![],'description':a63_0xc4bca4(0x1ed)},{'name':a63_0xc4bca4(0x1dd),'type':a63_0xc4bca4(0x1eb),'required':![],'description':a63_0xc4bca4(0x1d2)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x15dca7){validateInput(readExtendUpdateInput(_0x15dca7));},async 'dryRun'(_0x14ff62){const _0x591412=a63_0xc4bca4,_0x24873b=await buildDatasetExtendUpdateResult({'appCode':_0x14ff62['appCode'],'input':readExtendUpdateInput(_0x14ff62),'dryRun':!![]});return{'method':'POST','url':_0x591412(0x1ff),'body':_0x24873b[_0x591412(0x203)],'description':_0x24873b[_0x591412(0x20d)]};},async 'execute'(_0x17d5ae){const _0x557aa5=a63_0xc4bca4;return buildDatasetExtendUpdateResult({'appCode':_0x17d5ae[_0x557aa5(0x1f3)],'input':readExtendUpdateInput(_0x17d5ae),'dryRun':![]});}};function readExtendUpdateInput(_0x45da6a){const _0x3cff30=a63_0xc4bca4,_0x335a94=trim(_0x45da6a[_0x3cff30(0x1f7)](_0x3cff30(0x206))),_0x22eb19=parseJsonObjectFlag(_0x45da6a[_0x3cff30(0x1f7)](_0x3cff30(0x1d4)),_0x3cff30(0x20f)),_0x1cc3f0=parseJsonObjectFlag(_0x45da6a[_0x3cff30(0x1f7)](_0x3cff30(0x1dd)),'--expect-json');return{'code':_0x335a94,'patch':_0x22eb19||{},'expect':_0x1cc3f0};}function validateInput(_0x2c51b4){const _0x954707=a63_0xc4bca4;if(!_0x2c51b4['code'])throw CliErrors[_0x954707(0x213)]('--code\x20is\x20required');validateExtendPatchKeys(_0x2c51b4[_0x954707(0x1df)]);}function parseDatasetExtend(_0x4a9baa){const _0x147d2c=a63_0xc4bca4;if(typeof _0x4a9baa===_0x147d2c(0x1eb)){const _0xb86f4a=_0x4a9baa[_0x147d2c(0x1ef)]();if(!_0xb86f4a)return{'value':{},'shape':_0x147d2c(0x1eb)};let _0x1aa850;try{_0x1aa850=JSON[_0x147d2c(0x1f8)](_0xb86f4a);}catch(_0xa26060){const _0x1ead39=_0xa26060 instanceof Error?_0xa26060[_0x147d2c(0x20d)]:String(_0xa26060);throw CliErrors[_0x147d2c(0x213)](_0x147d2c(0x1e7)+_0x1ead39);}if(!isPlainObject(_0x1aa850)||Array['isArray'](_0x1aa850))throw CliErrors[_0x147d2c(0x213)](_0x147d2c(0x201));return{'value':_0x1aa850,'shape':_0x147d2c(0x1eb)};}if(_0x4a9baa===undefined||_0x4a9baa===null)return{'value':{},'shape':_0x147d2c(0x1eb)};if(!isPlainObject(_0x4a9baa)||Array[_0x147d2c(0x212)](_0x4a9baa))throw CliErrors['validation'](_0x147d2c(0x201));return{'value':_0x4a9baa,'shape':_0x147d2c(0x20e)};}function serializeDatasetExtend(_0x5bb0e8,_0x188ffb){const _0x5c1f0e=a63_0xc4bca4;return _0x188ffb==='string'?JSON[_0x5c1f0e(0x1d3)](_0x5bb0e8):_0x5bb0e8;}function summarizeDataset(_0x3b8e83,_0x3a633d){const _0x459340=a63_0xc4bca4,_0x23b0a4=isPlainObject(_0x3b8e83[_0x459340(0x1e8)])?_0x3b8e83[_0x459340(0x1e8)]:{},_0x1d75b1=isPlainObject(_0x3b8e83[_0x459340(0x1ea)])?_0x3b8e83[_0x459340(0x1ea)]:{};return{'id':_0x3b8e83[_0x459340(0x1f2)]??_0x3b8e83['id']??_0x23b0a4[_0x459340(0x205)]??null,'code':_0x3b8e83[_0x459340(0x204)]??_0x3b8e83[_0x459340(0x206)]??_0x23b0a4[_0x459340(0x1d8)]??_0x3a633d,'name':_0x3b8e83[_0x459340(0x1d6)]??_0x23b0a4['datasetName']??null,'table':_0x1d75b1['tableName']??_0x23b0a4[_0x459340(0x20c)]??null,'db':_0x1d75b1['dbName']??_0x1d75b1['dbId']??null};}function deepClone(_0x19f3f9){const _0x3ccb32=a63_0xc4bca4;if(_0x19f3f9===undefined)return _0x19f3f9;return JSON[_0x3ccb32(0x1f8)](JSON[_0x3ccb32(0x1d3)](_0x19f3f9));}function a63_0x4f27(){const _0x20b941=['No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','value','3574520FeyqNb','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','dataset','20688EVMpKe','dbtableConfig','string','keys','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','from','trim','7132509ZHJCNF','shape','modelId','appCode','\x20must\x20be\x20a\x20JSON\x20object','hint','has','str','parse','entries','4361320tNvnJf','expect','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','get','extend','/smartapi/dataset/update-driven-data',',\x20actual\x20','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','sort','data','modelCode','datasetId','code','extend-update','339212PnYbnE','length','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','Updated\x20dataset\x20extend\x20(','tableName','message','object','--patch-json','1167906MDDfFS','Allowed\x20keys:\x20','isArray','validation','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','stringify','patch-json','70resmTn','name','4BJzifX','datasetCode','write','Expected\x20','\x20must\x20be\x20valid\x20JSON\x20object:\x20','Unsupported\x20patch\x20key:\x20','expect-json','businessGroup','patch','135348uHfmNw','push','join'];a63_0x4f27=function(){return _0x20b941;};return a63_0x4f27();}function deepEqual(_0x55c932,_0x30494f){const _0x88a8de=a63_0xc4bca4;return JSON[_0x88a8de(0x1d3)](_0x55c932)===JSON[_0x88a8de(0x1d3)](_0x30494f);}function isPlainObject(_0xbbf91){const _0x41b49e=a63_0xc4bca4;return Boolean(_0xbbf91)&&typeof _0xbbf91===_0x41b49e(0x20e)&&!Array['isArray'](_0xbbf91);}function trim(_0x23024c){const _0x2f8c22=a63_0xc4bca4,_0x5cb4da=String(_0x23024c||'')[_0x2f8c22(0x1ef)]();return _0x5cb4da;}
@@ -1 +1 @@
1
- const a64_0x2f3550=a64_0x37fe;(function(_0x588d24,_0x1d2ea6){const _0xd9e1d4=a64_0x37fe,_0x2a217f=_0x588d24();while(!![]){try{const _0x66944b=parseInt(_0xd9e1d4(0xb0))/0x1+parseInt(_0xd9e1d4(0xb2))/0x2*(-parseInt(_0xd9e1d4(0x91))/0x3)+parseInt(_0xd9e1d4(0xaf))/0x4*(-parseInt(_0xd9e1d4(0xbe))/0x5)+-parseInt(_0xd9e1d4(0x9e))/0x6*(parseInt(_0xd9e1d4(0xbd))/0x7)+parseInt(_0xd9e1d4(0xa9))/0x8+parseInt(_0xd9e1d4(0xa7))/0x9+parseInt(_0xd9e1d4(0x90))/0xa;if(_0x66944b===_0x1d2ea6)break;else _0x2a217f['push'](_0x2a217f['shift']());}catch(_0xae41a0){_0x2a217f['push'](_0x2a217f['shift']());}}}(a64_0x124d,0x9e484));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a64_0x2f3550(0xca),a64_0x2f3550(0x8b),a64_0x2f3550(0xa2),'options',a64_0x2f3550(0xd3),a64_0x2f3550(0xb3),a64_0x2f3550(0xc5),a64_0x2f3550(0xc3),a64_0x2f3550(0xb5)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name','code',a64_0x2f3550(0xd2),a64_0x2f3550(0x9b),a64_0x2f3550(0xd4),a64_0x2f3550(0x9a),a64_0x2f3550(0xcf),'deleted',a64_0x2f3550(0xb6),a64_0x2f3550(0x8f),a64_0x2f3550(0xd7)]);function a64_0x37fe(_0x3b0274,_0x4a82f8){_0x3b0274=_0x3b0274-0x8a;const _0x124d22=a64_0x124d();let _0x37fe42=_0x124d22[_0x3b0274];return _0x37fe42;}export function parseJsonObjectFlag(_0x346f1f,_0x4a9c90){const _0x2ff216=a64_0x2f3550;if(!_0x346f1f)return undefined;let _0x1a4ad0;try{_0x1a4ad0=JSON[_0x2ff216(0xb4)](_0x346f1f);}catch(_0x4b57a0){const _0x15df6e=_0x4b57a0 instanceof Error?_0x4b57a0[_0x2ff216(0x92)]:String(_0x4b57a0);throw CliErrors['validation'](_0x4a9c90+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x15df6e);}if(!isPlainObject(_0x1a4ad0)||Array[_0x2ff216(0x9f)](_0x1a4ad0))throw CliErrors[_0x2ff216(0xd1)](_0x4a9c90+_0x2ff216(0xaa));return _0x1a4ad0;}export function validatePatchKeys(_0x303109){const _0x4b6e99=a64_0x2f3550,_0x3bd526=Object[_0x4b6e99(0xcd)](_0x303109);if(_0x3bd526['length']===0x0)throw CliErrors[_0x4b6e99(0xd1)](_0x4b6e99(0xb9));for(const _0x418ae2 of _0x3bd526){if(FORBIDDEN_FIELD_KEYS[_0x4b6e99(0x9d)](_0x418ae2))throw CliErrors[_0x4b6e99(0xd1)](_0x4b6e99(0xba)+_0x418ae2);if(!MUTABLE_FIELD_KEYS[_0x4b6e99(0x9d)](_0x418ae2))throw CliErrors[_0x4b6e99(0xd1)](_0x4b6e99(0x95)+_0x418ae2,_0x4b6e99(0xa5)+Array[_0x4b6e99(0xa0)](MUTABLE_FIELD_KEYS)[_0x4b6e99(0xc6)](',\x20'));}}export function applyFieldPatch(_0x101b8b,_0x2b1eb9){const _0x56e315=a64_0x2f3550;validatePatchKeys(_0x2b1eb9);const _0x355fbb=deepClone(_0x101b8b),_0x35ec8d=new Set();for(const [_0x4745aa,_0xa1ce6b]of Object['entries'](_0x2b1eb9)){const _0x482bc6=_0x355fbb[_0x4745aa],_0x4f9e43=mergePatchValue(_0x482bc6,_0xa1ce6b);!deepEqual(_0x482bc6,_0x4f9e43)&&(_0x355fbb[_0x4745aa]=_0x4f9e43,_0x35ec8d[_0x56e315(0xce)](_0x4745aa),collectChangedPaths(_0x4745aa,_0x482bc6,_0x4f9e43,_0x35ec8d));}return{'after':_0x355fbb,'changedPaths':Array[_0x56e315(0xa0)](_0x35ec8d)[_0x56e315(0xd6)](),'changed':_0x35ec8d[_0x56e315(0xbf)]>0x0};}export function assertExpectation(_0x44157f,_0x1a52a9){const _0x5cb63f=a64_0x2f3550;if(!_0x1a52a9)return;for(const [_0x55ea13,_0x1eeeb4]of Object[_0x5cb63f(0xa6)](_0x1a52a9)){const _0x255c02=_0x44157f[_0x55ea13];if(!deepEqual(_0x255c02,_0x1eeeb4))throw CliErrors[_0x5cb63f(0xd1)](_0x5cb63f(0xab)+_0x55ea13,_0x5cb63f(0xd0)+JSON['stringify'](_0x1eeeb4)+',\x20actual\x20'+JSON[_0x5cb63f(0x97)](_0x255c02));}}export async function buildDatasetFieldUpdateResult({appCode:_0xb56019,input:_0x7e2c9f,dryRun:_0x3eb540}){const _0xe54ec2=a64_0x2f3550;validateInput(_0x7e2c9f);const _0x20d58b=await getDatasetDetail(_0x7e2c9f[_0xe54ec2(0xc4)]),_0x528201=readFieldArray(_0x20d58b),_0x2d3600=_0x528201['findIndex'](_0x1d7aa9=>_0x1d7aa9?.[_0xe54ec2(0xcc)]===_0x7e2c9f[_0xe54ec2(0x99)]);if(_0x2d3600<0x0)throw CliErrors['validation']('Field\x20not\x20found:\x20'+_0x7e2c9f[_0xe54ec2(0x99)]);const _0xf952b6=deepClone(_0x528201[_0x2d3600]);assertExpectation(_0xf952b6,_0x7e2c9f[_0xe54ec2(0xae)]);const {after:_0x3b5518,changedPaths:_0x1a9f26,changed:_0x1c7fe5}=applyFieldPatch(_0xf952b6,_0x7e2c9f[_0xe54ec2(0xad)]),_0x288f8a=summarizeDataset(_0x20d58b,_0x7e2c9f['code']);return _0x1c7fe5&&!_0x3eb540&&(_0x528201[_0x2d3600]=_0x3b5518,await updateDrivenData(_0x20d58b)),{'ok':!![],'data':{'appCode':_0xb56019,'selector':{'code':_0x7e2c9f['code']},'dataset':_0x288f8a,'field':{'id':_0xf952b6['id']??null,'name':_0xf952b6[_0xe54ec2(0xcc)]},'dryRun':_0x3eb540,'changed':_0x1c7fe5,'changedPaths':_0x1a9f26,'before':_0xf952b6,'after':_0x3b5518,'submitted':_0x1c7fe5&&!_0x3eb540},'message':_0x1c7fe5?_0x3eb540?_0xe54ec2(0xb1)+_0x7e2c9f[_0xe54ec2(0x99)]+_0xe54ec2(0xc7)+_0x1a9f26['join'](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x7e2c9f[_0xe54ec2(0x99)]+'\x20('+_0x1a9f26[_0xe54ec2(0xc6)](',\x20')+')':_0xe54ec2(0x8e)+_0x7e2c9f[_0xe54ec2(0x99)]};}export const datasetFieldUpdate={'service':a64_0x2f3550(0xbc),'command':'field-update','description':a64_0x2f3550(0xcb),'risk':'write','flags':[CODE_FLAG,{'name':a64_0x2f3550(0x99),'type':a64_0x2f3550(0x93),'required':!![],'description':a64_0x2f3550(0xa1)},{'name':a64_0x2f3550(0x94),'type':a64_0x2f3550(0x93),'required':!![],'description':a64_0x2f3550(0xbb)},{'name':a64_0x2f3550(0x96),'type':a64_0x2f3550(0x93),'required':![],'description':a64_0x2f3550(0x8a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3112d6){validateInput(readFieldUpdateInput(_0x3112d6));},async 'dryRun'(_0x3dd6d8){const _0x2c8029=a64_0x2f3550,_0x2a9852=await buildDatasetFieldUpdateResult({'appCode':_0x3dd6d8['appCode'],'input':readFieldUpdateInput(_0x3dd6d8),'dryRun':!![]});return{'method':_0x2c8029(0xb8),'url':_0x2c8029(0xa4),'body':_0x2a9852[_0x2c8029(0xa8)],'description':_0x2a9852[_0x2c8029(0x92)]};},async 'execute'(_0x9980e){const _0x3b0bb2=a64_0x2f3550;return buildDatasetFieldUpdateResult({'appCode':_0x9980e[_0x3b0bb2(0xc1)],'input':readFieldUpdateInput(_0x9980e),'dryRun':![]});}};function readFieldUpdateInput(_0x15cd2e){const _0x413c1a=a64_0x2f3550,_0x2c1545=trim(_0x15cd2e['str']('code')),_0x4a4760=emptyToUndefined(_0x15cd2e[_0x413c1a(0xac)](_0x413c1a(0x99))),_0x277895=parseJsonObjectFlag(_0x15cd2e[_0x413c1a(0xac)](_0x413c1a(0x94)),_0x413c1a(0xc9)),_0x26dc8f=parseJsonObjectFlag(_0x15cd2e[_0x413c1a(0xac)]('expect-json'),_0x413c1a(0xa3));return{'code':_0x2c1545,'field':_0x4a4760||'','patch':_0x277895||{},'expect':_0x26dc8f};}function validateInput(_0x3f2529){const _0xd6f649=a64_0x2f3550;if(!_0x3f2529[_0xd6f649(0xc4)])throw CliErrors['validation'](_0xd6f649(0xc2));if(!_0x3f2529[_0xd6f649(0x99)])throw CliErrors['validation'](_0xd6f649(0xd8));validatePatchKeys(_0x3f2529[_0xd6f649(0xad)]);}function readFieldArray(_0x44ad53){const _0x3c3078=a64_0x2f3550;if(Array[_0x3c3078(0x9f)](_0x44ad53[_0x3c3078(0xd9)]))return _0x44ad53[_0x3c3078(0xd9)];if(Array[_0x3c3078(0x9f)](_0x44ad53['properties']))return _0x44ad53[_0x3c3078(0x8d)];throw CliErrors[_0x3c3078(0xd1)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x3d0a03,_0x20503b){const _0x24b6c3=a64_0x2f3550,_0x4a2b34=isPlainObject(_0x3d0a03[_0x24b6c3(0xbc)])?_0x3d0a03[_0x24b6c3(0xbc)]:{},_0x3df31f=isPlainObject(_0x3d0a03[_0x24b6c3(0xc0)])?_0x3d0a03[_0x24b6c3(0xc0)]:{};return{'id':_0x3d0a03[_0x24b6c3(0xc8)]??_0x3d0a03['id']??_0x4a2b34['datasetId']??null,'code':_0x3d0a03['modelCode']??_0x3d0a03[_0x24b6c3(0xc4)]??_0x4a2b34['datasetCode']??_0x20503b,'name':_0x3d0a03['name']??_0x4a2b34[_0x24b6c3(0xd5)]??null,'table':_0x3df31f['tableName']??_0x4a2b34[_0x24b6c3(0xcf)]??null,'db':_0x3df31f[_0x24b6c3(0x9c)]??_0x3df31f[_0x24b6c3(0xb7)]??null};}function mergePatchValue(_0x1436b6,_0x5d2d91){if(isPlainObject(_0x1436b6)&&isPlainObject(_0x5d2d91))return deepMerge(_0x1436b6,_0x5d2d91);return deepClone(_0x5d2d91);}function deepMerge(_0x14206d,_0x482d74){const _0x350302=a64_0x2f3550,_0xeb50b0=deepClone(_0x14206d);for(const [_0x36d8bd,_0x5b17ce]of Object[_0x350302(0xa6)](_0x482d74)){_0xeb50b0[_0x36d8bd]=isPlainObject(_0xeb50b0[_0x36d8bd])&&isPlainObject(_0x5b17ce)?deepMerge(_0xeb50b0[_0x36d8bd],_0x5b17ce):deepClone(_0x5b17ce);}return _0xeb50b0;}function collectChangedPaths(_0xcebd88,_0x17ffc6,_0x4073ac,_0x12da6c){const _0xf4c9a2=a64_0x2f3550;if(!isPlainObject(_0x17ffc6)||!isPlainObject(_0x4073ac))return;const _0x37a642=new Set([...Object[_0xf4c9a2(0xcd)](_0x17ffc6),...Object[_0xf4c9a2(0xcd)](_0x4073ac)]);for(const _0x5b6829 of _0x37a642){const _0x1e8830=_0x17ffc6[_0x5b6829],_0x475dff=_0x4073ac[_0x5b6829];!deepEqual(_0x1e8830,_0x475dff)&&_0x12da6c['add'](_0xcebd88+'.'+_0x5b6829);}}function a64_0x124d(){const _0x2d06d2=['stringify','object','field','dbFieldName','dbTypeLen','dbName','has','3234oTCIzi','isArray','from','Exact\x20raw\x20fields[].name\x20to\x20patch','description','--expect-json','/smartapi/dataset/update-driven-data','Allowed\x20keys:\x20','entries','605142WgnfVW','data','3949808yLvOpB','\x20must\x20be\x20a\x20JSON\x20object','Expectation\x20mismatch\x20at\x20','str','patch','expect','4hLYgLB','59458tYcmZj','Dry-run:\x20dataset\x20field\x20','1508686NkkJMe','datetimeFormat','parse','deprecated','pkField','dbId','POST','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Forbidden\x20patch\x20key:\x20','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','dataset','4739CSJTFp','4053610VQXRMq','size','dbtableConfig','appCode','--code\x20is\x20required','chartRole','code','defaultAggregation','join','\x20would\x20change\x20(','modelId','--patch-json','doType','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','name','keys','add','tableName','Expected\x20','validation','dbType','required','dbTypeScale','datasetName','sort','systemRetain','--field\x20is\x20required','fields','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','displayName','trim','properties','No\x20changes\x20for\x20dataset\x20field\x20','autoIncrement','19578700wPpMtN','3IWYdkR','message','string','patch-json','Unsupported\x20patch\x20key:\x20','expect-json'];a64_0x124d=function(){return _0x2d06d2;};return a64_0x124d();}function deepClone(_0x4f1ff9){const _0xa804d3=a64_0x2f3550;if(_0x4f1ff9===undefined)return _0x4f1ff9;return JSON[_0xa804d3(0xb4)](JSON[_0xa804d3(0x97)](_0x4f1ff9));}function deepEqual(_0x529786,_0x2bc71b){const _0x1e3403=a64_0x2f3550;return JSON[_0x1e3403(0x97)](_0x529786)===JSON['stringify'](_0x2bc71b);}function isPlainObject(_0x3d3f80){const _0x2b520e=a64_0x2f3550;return Boolean(_0x3d3f80)&&typeof _0x3d3f80===_0x2b520e(0x98)&&!Array[_0x2b520e(0x9f)](_0x3d3f80);}function emptyToUndefined(_0x27f396){const _0x1def0d=String(_0x27f396||'')['trim']();return _0x1def0d||undefined;}function trim(_0x56ef6a){const _0x4defb9=a64_0x2f3550;return String(_0x56ef6a||'')[_0x4defb9(0x8c)]();}
1
+ const a64_0xdcba90=a64_0x4554;(function(_0x13a55a,_0x456ae1){const _0x128b54=a64_0x4554,_0x2242c7=_0x13a55a();while(!![]){try{const _0x1978c9=parseInt(_0x128b54(0x210))/0x1*(parseInt(_0x128b54(0x215))/0x2)+-parseInt(_0x128b54(0x1fd))/0x3*(parseInt(_0x128b54(0x22a))/0x4)+-parseInt(_0x128b54(0x226))/0x5+-parseInt(_0x128b54(0x222))/0x6+parseInt(_0x128b54(0x208))/0x7*(parseInt(_0x128b54(0x1f4))/0x8)+-parseInt(_0x128b54(0x220))/0x9+parseInt(_0x128b54(0x207))/0xa*(parseInt(_0x128b54(0x20d))/0xb);if(_0x1978c9===_0x456ae1)break;else _0x2242c7['push'](_0x2242c7['shift']());}catch(_0x39c803){_0x2242c7['push'](_0x2242c7['shift']());}}}(a64_0x9b9e,0x2722a));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a64_0x4554(_0x4d1962,_0x5dab19){_0x4d1962=_0x4d1962-0x1e5;const _0x9b9eb4=a64_0x9b9e();let _0x4554cf=_0x9b9eb4[_0x4d1962];return _0x4554cf;}const MUTABLE_FIELD_KEYS=new Set([a64_0xdcba90(0x21a),'displayName',a64_0xdcba90(0x22c),a64_0xdcba90(0x203),'required',a64_0xdcba90(0x205),a64_0xdcba90(0x225),a64_0xdcba90(0x213),a64_0xdcba90(0x21e)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name',a64_0xdcba90(0x218),a64_0xdcba90(0x227),'dbTypeLen',a64_0xdcba90(0x1ea),a64_0xdcba90(0x1ec),a64_0xdcba90(0x1f7),a64_0xdcba90(0x1ee),a64_0xdcba90(0x21b),'autoIncrement',a64_0xdcba90(0x1e7)]);export function parseJsonObjectFlag(_0x22355c,_0x3ecd7d){const _0x3563fc=a64_0xdcba90;if(!_0x22355c)return undefined;let _0x44222f;try{_0x44222f=JSON['parse'](_0x22355c);}catch(_0x5d7811){const _0x2ee54c=_0x5d7811 instanceof Error?_0x5d7811[_0x3563fc(0x1f9)]:String(_0x5d7811);throw CliErrors['validation'](_0x3ecd7d+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x2ee54c);}if(!isPlainObject(_0x44222f)||Array[_0x3563fc(0x22d)](_0x44222f))throw CliErrors[_0x3563fc(0x200)](_0x3ecd7d+_0x3563fc(0x1eb));return _0x44222f;}export function validatePatchKeys(_0x424363){const _0x58dfe8=a64_0xdcba90,_0x49b256=Object[_0x58dfe8(0x214)](_0x424363);if(_0x49b256[_0x58dfe8(0x206)]===0x0)throw CliErrors['validation'](_0x58dfe8(0x1ed));for(const _0x529de1 of _0x49b256){if(FORBIDDEN_FIELD_KEYS[_0x58dfe8(0x1fb)](_0x529de1))throw CliErrors['validation'](_0x58dfe8(0x216)+_0x529de1);if(!MUTABLE_FIELD_KEYS[_0x58dfe8(0x1fb)](_0x529de1))throw CliErrors[_0x58dfe8(0x200)](_0x58dfe8(0x20b)+_0x529de1,'Allowed\x20keys:\x20'+Array[_0x58dfe8(0x1e9)](MUTABLE_FIELD_KEYS)[_0x58dfe8(0x236)](',\x20'));}}function a64_0x9b9e(){const _0x9ae19a=['isArray','dbName','dataset','Updated\x20dataset\x20field\x20','Expectation\x20mismatch\x20at\x20','patch','Field\x20not\x20found:\x20','datasetCode','stringify','join','appCode','patch-json','systemRetain','sort','from','dbTypeScale','\x20must\x20be\x20a\x20JSON\x20object','dbFieldName','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','deleted','parse','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','findIndex','Dry-run:\x20dataset\x20field\x20','write','16YZnlvH','--code\x20is\x20required','fields','tableName','expect','message','Exact\x20raw\x20fields[].name\x20to\x20patch','has','properties','32145dPUaBU','modelCode','size','validation','trim','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','options','/smartapi/dataset/update-driven-data','datetimeFormat','length','90hFAXsa','388829qzGxAA','field','expect-json','Unsupported\x20patch\x20key:\x20','string','577379ntrBIz','datasetId','--expect-json','303jCTXwv','dbtableConfig','datasetName','chartRole','keys','270NVnJCK','Forbidden\x20patch\x20key:\x20','add','code','object','doType','pkField','entries','--patch-json','deprecated','\x20would\x20change\x20(','138339jVDouE','modelId','491166PstDAK','name','data','defaultAggregation','1084300XUrqhc','dbType','No\x20changes\x20for\x20dataset\x20field\x20','str','56jeeOwv','Expected\x20','description'];a64_0x9b9e=function(){return _0x9ae19a;};return a64_0x9b9e();}export function applyFieldPatch(_0x25d28b,_0x5a454b){const _0x2d9c7b=a64_0xdcba90;validatePatchKeys(_0x5a454b);const _0x1f5258=deepClone(_0x25d28b),_0x547a04=new Set();for(const [_0x178821,_0x2bcca9]of Object[_0x2d9c7b(0x21c)](_0x5a454b)){const _0x4e1984=_0x1f5258[_0x178821],_0x29023e=mergePatchValue(_0x4e1984,_0x2bcca9);!deepEqual(_0x4e1984,_0x29023e)&&(_0x1f5258[_0x178821]=_0x29023e,_0x547a04[_0x2d9c7b(0x217)](_0x178821),collectChangedPaths(_0x178821,_0x4e1984,_0x29023e,_0x547a04));}return{'after':_0x1f5258,'changedPaths':Array[_0x2d9c7b(0x1e9)](_0x547a04)[_0x2d9c7b(0x1e8)](),'changed':_0x547a04[_0x2d9c7b(0x1ff)]>0x0};}export function assertExpectation(_0x5abb1d,_0x106276){const _0x47331d=a64_0xdcba90;if(!_0x106276)return;for(const [_0x200b62,_0x19fc7d]of Object['entries'](_0x106276)){const _0x577341=_0x5abb1d[_0x200b62];if(!deepEqual(_0x577341,_0x19fc7d))throw CliErrors[_0x47331d(0x200)](_0x47331d(0x231)+_0x200b62,_0x47331d(0x22b)+JSON['stringify'](_0x19fc7d)+',\x20actual\x20'+JSON[_0x47331d(0x235)](_0x577341));}}export async function buildDatasetFieldUpdateResult({appCode:_0x3456e7,input:_0x36089b,dryRun:_0x3c2de2}){const _0x2ac649=a64_0xdcba90;validateInput(_0x36089b);const _0x61fa17=await getDatasetDetail(_0x36089b[_0x2ac649(0x218)]),_0x3e8991=readFieldArray(_0x61fa17),_0x35efb1=_0x3e8991[_0x2ac649(0x1f1)](_0xe58aaf=>_0xe58aaf?.['name']===_0x36089b[_0x2ac649(0x209)]);if(_0x35efb1<0x0)throw CliErrors['validation'](_0x2ac649(0x233)+_0x36089b[_0x2ac649(0x209)]);const _0x577e29=deepClone(_0x3e8991[_0x35efb1]);assertExpectation(_0x577e29,_0x36089b[_0x2ac649(0x1f8)]);const {after:_0x440f67,changedPaths:_0x2f05b4,changed:_0x13e7bf}=applyFieldPatch(_0x577e29,_0x36089b[_0x2ac649(0x232)]),_0x5b659a=summarizeDataset(_0x61fa17,_0x36089b[_0x2ac649(0x218)]);return _0x13e7bf&&!_0x3c2de2&&(_0x3e8991[_0x35efb1]=_0x440f67,await updateDrivenData(_0x61fa17)),{'ok':!![],'data':{'appCode':_0x3456e7,'selector':{'code':_0x36089b[_0x2ac649(0x218)]},'dataset':_0x5b659a,'field':{'id':_0x577e29['id']??null,'name':_0x577e29[_0x2ac649(0x223)]},'dryRun':_0x3c2de2,'changed':_0x13e7bf,'changedPaths':_0x2f05b4,'before':_0x577e29,'after':_0x440f67,'submitted':_0x13e7bf&&!_0x3c2de2},'message':_0x13e7bf?_0x3c2de2?_0x2ac649(0x1f2)+_0x36089b[_0x2ac649(0x209)]+_0x2ac649(0x21f)+_0x2f05b4['join'](',\x20')+')':_0x2ac649(0x230)+_0x36089b[_0x2ac649(0x209)]+'\x20('+_0x2f05b4[_0x2ac649(0x236)](',\x20')+')':_0x2ac649(0x228)+_0x36089b[_0x2ac649(0x209)]};}export const datasetFieldUpdate={'service':a64_0xdcba90(0x22f),'command':'field-update','description':a64_0xdcba90(0x1f0),'risk':a64_0xdcba90(0x1f3),'flags':[CODE_FLAG,{'name':a64_0xdcba90(0x209),'type':'string','required':!![],'description':a64_0xdcba90(0x1fa)},{'name':a64_0xdcba90(0x1e6),'type':a64_0xdcba90(0x20c),'required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a64_0xdcba90(0x20a),'type':a64_0xdcba90(0x20c),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5d2751){validateInput(readFieldUpdateInput(_0x5d2751));},async 'dryRun'(_0x53394c){const _0x32c9c0=a64_0xdcba90,_0x343705=await buildDatasetFieldUpdateResult({'appCode':_0x53394c[_0x32c9c0(0x1e5)],'input':readFieldUpdateInput(_0x53394c),'dryRun':!![]});return{'method':'POST','url':_0x32c9c0(0x204),'body':_0x343705[_0x32c9c0(0x224)],'description':_0x343705[_0x32c9c0(0x1f9)]};},async 'execute'(_0x19d51b){const _0x5900f5=a64_0xdcba90;return buildDatasetFieldUpdateResult({'appCode':_0x19d51b[_0x5900f5(0x1e5)],'input':readFieldUpdateInput(_0x19d51b),'dryRun':![]});}};function readFieldUpdateInput(_0x41ad01){const _0x682354=a64_0xdcba90,_0xda089e=trim(_0x41ad01[_0x682354(0x229)]('code')),_0x4602b5=emptyToUndefined(_0x41ad01[_0x682354(0x229)](_0x682354(0x209))),_0x4470bf=parseJsonObjectFlag(_0x41ad01[_0x682354(0x229)](_0x682354(0x1e6)),_0x682354(0x21d)),_0x4b8bb1=parseJsonObjectFlag(_0x41ad01[_0x682354(0x229)](_0x682354(0x20a)),_0x682354(0x20f));return{'code':_0xda089e,'field':_0x4602b5||'','patch':_0x4470bf||{},'expect':_0x4b8bb1};}function validateInput(_0x31ed99){const _0x328323=a64_0xdcba90;if(!_0x31ed99['code'])throw CliErrors[_0x328323(0x200)](_0x328323(0x1f5));if(!_0x31ed99[_0x328323(0x209)])throw CliErrors['validation']('--field\x20is\x20required');validatePatchKeys(_0x31ed99['patch']);}function readFieldArray(_0x1d5c6d){const _0x88ef6e=a64_0xdcba90;if(Array[_0x88ef6e(0x22d)](_0x1d5c6d[_0x88ef6e(0x1f6)]))return _0x1d5c6d['fields'];if(Array['isArray'](_0x1d5c6d['properties']))return _0x1d5c6d[_0x88ef6e(0x1fc)];throw CliErrors[_0x88ef6e(0x200)](_0x88ef6e(0x202));}function summarizeDataset(_0x2df755,_0x519eb1){const _0x380680=a64_0xdcba90,_0x4c1c02=isPlainObject(_0x2df755[_0x380680(0x22f)])?_0x2df755['dataset']:{},_0x31a7d9=isPlainObject(_0x2df755[_0x380680(0x211)])?_0x2df755[_0x380680(0x211)]:{};return{'id':_0x2df755[_0x380680(0x221)]??_0x2df755['id']??_0x4c1c02[_0x380680(0x20e)]??null,'code':_0x2df755[_0x380680(0x1fe)]??_0x2df755[_0x380680(0x218)]??_0x4c1c02[_0x380680(0x234)]??_0x519eb1,'name':_0x2df755[_0x380680(0x223)]??_0x4c1c02[_0x380680(0x212)]??null,'table':_0x31a7d9[_0x380680(0x1f7)]??_0x4c1c02[_0x380680(0x1f7)]??null,'db':_0x31a7d9[_0x380680(0x22e)]??_0x31a7d9['dbId']??null};}function mergePatchValue(_0x121e0,_0x44cb85){if(isPlainObject(_0x121e0)&&isPlainObject(_0x44cb85))return deepMerge(_0x121e0,_0x44cb85);return deepClone(_0x44cb85);}function deepMerge(_0x269391,_0x52656f){const _0x3e41bb=a64_0xdcba90,_0x279b0e=deepClone(_0x269391);for(const [_0x24c499,_0x3fde48]of Object[_0x3e41bb(0x21c)](_0x52656f)){_0x279b0e[_0x24c499]=isPlainObject(_0x279b0e[_0x24c499])&&isPlainObject(_0x3fde48)?deepMerge(_0x279b0e[_0x24c499],_0x3fde48):deepClone(_0x3fde48);}return _0x279b0e;}function collectChangedPaths(_0xe3b1d5,_0x223024,_0x4a3671,_0x69ad52){const _0x4b43df=a64_0xdcba90;if(!isPlainObject(_0x223024)||!isPlainObject(_0x4a3671))return;const _0x5a761f=new Set([...Object[_0x4b43df(0x214)](_0x223024),...Object[_0x4b43df(0x214)](_0x4a3671)]);for(const _0x3d5580 of _0x5a761f){const _0x5b614b=_0x223024[_0x3d5580],_0xad4de9=_0x4a3671[_0x3d5580];!deepEqual(_0x5b614b,_0xad4de9)&&_0x69ad52[_0x4b43df(0x217)](_0xe3b1d5+'.'+_0x3d5580);}}function deepClone(_0x1314b4){const _0x547bf9=a64_0xdcba90;if(_0x1314b4===undefined)return _0x1314b4;return JSON[_0x547bf9(0x1ef)](JSON[_0x547bf9(0x235)](_0x1314b4));}function deepEqual(_0x3d486c,_0xa35909){const _0x3b349c=a64_0xdcba90;return JSON[_0x3b349c(0x235)](_0x3d486c)===JSON[_0x3b349c(0x235)](_0xa35909);}function isPlainObject(_0x24c1b2){const _0x4c64f3=a64_0xdcba90;return Boolean(_0x24c1b2)&&typeof _0x24c1b2===_0x4c64f3(0x219)&&!Array[_0x4c64f3(0x22d)](_0x24c1b2);}function emptyToUndefined(_0x2a1ab6){const _0x36eed7=String(_0x2a1ab6||'')['trim']();return _0x36eed7||undefined;}function trim(_0x27702c){const _0x12ba56=a64_0xdcba90;return String(_0x27702c||'')[_0x12ba56(0x201)]();}