@lovrabet/rabetbase-cli 2.5.1-beta.3 → 2.5.1-beta.5

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 (346) hide show
  1. package/README.md +75 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +0 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  26. package/lib/commands/app/shared.js +1 -1
  27. package/lib/commands/app-config/delete.js +1 -1
  28. package/lib/commands/app-config/get.js +1 -1
  29. package/lib/commands/app-config/index.js +1 -1
  30. package/lib/commands/app-config/list.js +1 -1
  31. package/lib/commands/app-config/set.js +1 -1
  32. package/lib/commands/app-config/shared.js +1 -1
  33. package/lib/commands/auth/index.js +1 -1
  34. package/lib/commands/bff/create.js +1 -1
  35. package/lib/commands/bff/delete.js +1 -1
  36. package/lib/commands/bff/detail.js +1 -1
  37. package/lib/commands/bff/index.js +1 -1
  38. package/lib/commands/bff/list.js +1 -1
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.d.ts +2 -0
  52. package/lib/commands/common/flags.js +1 -1
  53. package/lib/commands/common/local-file.js +1 -1
  54. package/lib/commands/common/validate.js +1 -1
  55. package/lib/commands/config/delete.js +1 -1
  56. package/lib/commands/config/get.js +1 -1
  57. package/lib/commands/config/index.js +1 -1
  58. package/lib/commands/config/init.d.ts +3 -1
  59. package/lib/commands/config/init.js +1 -1
  60. package/lib/commands/config/list.js +1 -1
  61. package/lib/commands/config/set.js +1 -1
  62. package/lib/commands/config/shared.js +1 -1
  63. package/lib/commands/dataset/business-group-update.js +1 -1
  64. package/lib/commands/dataset/business-groups.js +1 -1
  65. package/lib/commands/dataset/capability.js +1 -1
  66. package/lib/commands/dataset/delete.js +1 -1
  67. package/lib/commands/dataset/detail.js +1 -1
  68. package/lib/commands/dataset/extend-update.js +1 -1
  69. package/lib/commands/dataset/field-restore.js +1 -1
  70. package/lib/commands/dataset/field-update.js +1 -1
  71. package/lib/commands/dataset/generate.js +1 -1
  72. package/lib/commands/dataset/index.js +1 -1
  73. package/lib/commands/dataset/list.js +1 -1
  74. package/lib/commands/dataset/operations.js +1 -1
  75. package/lib/commands/dataset/relation-audit.js +1 -1
  76. package/lib/commands/dataset/relation-create.js +1 -1
  77. package/lib/commands/dataset/relation-delete.js +1 -1
  78. package/lib/commands/dataset/relation-shared.js +1 -1
  79. package/lib/commands/dataset/relation-update.js +1 -1
  80. package/lib/commands/dataset/relations.js +1 -1
  81. package/lib/commands/dataset/rename.js +1 -1
  82. package/lib/commands/dataset/restore.js +1 -1
  83. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  84. package/lib/commands/db/analysis-batching.js +1 -1
  85. package/lib/commands/db/analyze-batch-plan.js +1 -1
  86. package/lib/commands/db/analyze-cancel.js +1 -1
  87. package/lib/commands/db/analyze-start.js +1 -1
  88. package/lib/commands/db/analyze-status.js +1 -1
  89. package/lib/commands/db/create.js +1 -1
  90. package/lib/commands/db/delete.js +1 -1
  91. package/lib/commands/db/detail.js +1 -1
  92. package/lib/commands/db/diff-refresh-start.js +1 -1
  93. package/lib/commands/db/diff-refresh-status.js +1 -1
  94. package/lib/commands/db/diff.js +1 -1
  95. package/lib/commands/db/index.js +1 -1
  96. package/lib/commands/db/list.js +1 -1
  97. package/lib/commands/db/shared.js +1 -1
  98. package/lib/commands/db/table-diff-shared.js +1 -1
  99. package/lib/commands/db/tables.js +1 -1
  100. package/lib/commands/db/test.js +1 -1
  101. package/lib/commands/db/update.js +1 -1
  102. package/lib/commands/deployment/auto-sync.js +1 -1
  103. package/lib/commands/deployment/index.js +1 -1
  104. package/lib/commands/deployment/sync.js +1 -1
  105. package/lib/commands/doctor.js +1 -1
  106. package/lib/commands/file/index.js +1 -1
  107. package/lib/commands/issue/index.js +1 -1
  108. package/lib/commands/issue/nudge.js +1 -1
  109. package/lib/commands/issue/report.js +1 -1
  110. package/lib/commands/issue/shared.js +1 -1
  111. package/lib/commands/kb/create.js +1 -1
  112. package/lib/commands/kb/delete.js +1 -1
  113. package/lib/commands/kb/detail.js +1 -1
  114. package/lib/commands/kb/index.js +1 -1
  115. package/lib/commands/kb/list.js +1 -1
  116. package/lib/commands/kb/search.js +1 -1
  117. package/lib/commands/kb/shared.js +1 -1
  118. package/lib/commands/kb/update.js +1 -1
  119. package/lib/commands/logs/index.js +1 -1
  120. package/lib/commands/menu/asset-update.js +1 -1
  121. package/lib/commands/menu/delete.js +1 -1
  122. package/lib/commands/menu/external-link-create.js +1 -1
  123. package/lib/commands/menu/external-link-update.js +1 -1
  124. package/lib/commands/menu/group-create.js +1 -1
  125. package/lib/commands/menu/group-update.js +1 -1
  126. package/lib/commands/menu/index.js +1 -1
  127. package/lib/commands/menu/list.js +1 -1
  128. package/lib/commands/menu/move.js +1 -1
  129. package/lib/commands/menu/regroup-start.js +1 -1
  130. package/lib/commands/menu/rename.js +1 -1
  131. package/lib/commands/menu/shared/compare-table.js +1 -1
  132. package/lib/commands/menu/shared/delete-plan.js +1 -1
  133. package/lib/commands/menu/shared/facts.js +1 -1
  134. package/lib/commands/menu/shared/index.js +1 -1
  135. package/lib/commands/menu/shared/inquirer.js +1 -1
  136. package/lib/commands/menu/shared/local-pages.js +1 -1
  137. package/lib/commands/menu/shared/logic.js +1 -1
  138. package/lib/commands/menu/shared/mutations.js +1 -1
  139. package/lib/commands/menu/shared/service.js +1 -1
  140. package/lib/commands/menu/shared/sync-core.js +1 -1
  141. package/lib/commands/menu/shared/update-core.js +1 -1
  142. package/lib/commands/menu/shared/valid-url.js +1 -1
  143. package/lib/commands/menu/sync.js +1 -1
  144. package/lib/commands/menu/visibility-update.js +1 -1
  145. package/lib/commands/notification/config-create.js +1 -1
  146. package/lib/commands/notification/config-delete.js +1 -1
  147. package/lib/commands/notification/config-list.js +1 -1
  148. package/lib/commands/notification/config-update.js +1 -1
  149. package/lib/commands/notification/index.js +1 -1
  150. package/lib/commands/notification/shared.js +1 -1
  151. package/lib/commands/ocr/index.js +1 -1
  152. package/lib/commands/page/create.js +1 -1
  153. package/lib/commands/page/custom/detail.js +1 -1
  154. package/lib/commands/page/custom/list.js +1 -1
  155. package/lib/commands/page/custom/publish.js +1 -1
  156. package/lib/commands/page/custom/shared.js +1 -1
  157. package/lib/commands/page/custom/syntax.js +1 -1
  158. package/lib/commands/page/custom/template.js +1 -1
  159. package/lib/commands/page/custom/update.js +1 -1
  160. package/lib/commands/page/data-list-status.js +1 -1
  161. package/lib/commands/page/generate-start.js +1 -1
  162. package/lib/commands/page/generate-status.js +1 -1
  163. package/lib/commands/page/index.js +1 -1
  164. package/lib/commands/page/pull.js +1 -1
  165. package/lib/commands/page/push.js +1 -1
  166. package/lib/commands/page/relation-audit.js +1 -1
  167. package/lib/commands/page/restore.js +1 -1
  168. package/lib/commands/page/shared.js +1 -1
  169. package/lib/commands/page/sync.js +1 -1
  170. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  171. package/lib/commands/project/create/format-elapsed.js +1 -1
  172. package/lib/commands/project/create/main.d.ts +1 -0
  173. package/lib/commands/project/create/main.js +1 -1
  174. package/lib/commands/project/create/materialize-project-template.js +1 -1
  175. package/lib/commands/project/create/project-name.js +1 -1
  176. package/lib/commands/project/create/project-template-archive.js +1 -1
  177. package/lib/commands/project/create/project-template-path.js +1 -1
  178. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  179. package/lib/commands/project/create/use-format-code.js +1 -1
  180. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  181. package/lib/commands/project/domain-routing-sync.d.ts +2 -0
  182. package/lib/commands/project/domain-routing-sync.js +1 -0
  183. package/lib/commands/project/index.js +1 -1
  184. package/lib/commands/project/upgrade.js +1 -1
  185. package/lib/commands/registry.js +1 -1
  186. package/lib/commands/role/delete.js +1 -1
  187. package/lib/commands/role/detail.js +1 -1
  188. package/lib/commands/role/index.js +1 -1
  189. package/lib/commands/role/list.js +1 -1
  190. package/lib/commands/role/shared.js +1 -1
  191. package/lib/commands/role/update.js +1 -1
  192. package/lib/commands/role/user-add.js +1 -1
  193. package/lib/commands/role/user-remove.js +1 -1
  194. package/lib/commands/role/user-resolve.js +1 -1
  195. package/lib/commands/rule/get.d.ts +2 -0
  196. package/lib/commands/rule/get.js +1 -0
  197. package/lib/commands/rule/index.d.ts +2 -0
  198. package/lib/commands/rule/index.js +1 -0
  199. package/lib/commands/rule/list.d.ts +2 -0
  200. package/lib/commands/rule/list.js +1 -0
  201. package/lib/commands/rule/set.d.ts +2 -0
  202. package/lib/commands/rule/set.js +1 -0
  203. package/lib/commands/rule/shared.d.ts +43 -0
  204. package/lib/commands/rule/shared.js +1 -0
  205. package/lib/commands/run/index.js +1 -1
  206. package/lib/commands/schema.js +1 -1
  207. package/lib/commands/sql/create.js +1 -1
  208. package/lib/commands/sql/delete.js +1 -1
  209. package/lib/commands/sql/detail.js +1 -1
  210. package/lib/commands/sql/exec.js +1 -1
  211. package/lib/commands/sql/index.js +1 -1
  212. package/lib/commands/sql/list.js +1 -1
  213. package/lib/commands/sql/pull.js +1 -1
  214. package/lib/commands/sql/push.js +1 -1
  215. package/lib/commands/sql/shared.js +1 -1
  216. package/lib/commands/sql/status.js +1 -1
  217. package/lib/commands/sql/validate.js +1 -1
  218. package/lib/commands/task/index.js +1 -1
  219. package/lib/commands/task/status.js +1 -1
  220. package/lib/commands/tenant/index.js +1 -1
  221. package/lib/commands/tenant/members-list.js +1 -1
  222. package/lib/commands/tenant/shared.js +1 -1
  223. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  224. package/lib/commands/user-account/index.js +1 -1
  225. package/lib/commands/workspace/add.js +1 -1
  226. package/lib/commands/workspace/index.js +1 -1
  227. package/lib/commands/workspace/remove.js +1 -1
  228. package/lib/config/deployment-sync.js +1 -1
  229. package/lib/config/domain-config.d.ts +38 -2
  230. package/lib/config/domain-config.js +1 -1
  231. package/lib/config/project-domain-routing.d.ts +27 -0
  232. package/lib/config/project-domain-routing.js +1 -0
  233. package/lib/config/schema.d.ts +1 -1
  234. package/lib/config/schema.js +1 -1
  235. package/lib/constant/cdn.js +1 -1
  236. package/lib/constant/cli.js +1 -1
  237. package/lib/constant/defaults.js +1 -1
  238. package/lib/constant/domain.d.ts +10 -6
  239. package/lib/constant/domain.js +1 -1
  240. package/lib/constant/env.js +1 -1
  241. package/lib/constant/output.js +1 -1
  242. package/lib/constant/paths.js +1 -1
  243. package/lib/constant/region.d.ts +4 -1
  244. package/lib/constant/region.js +1 -1
  245. package/lib/constant/risk.js +1 -1
  246. package/lib/constant/routing-profile.d.ts +43 -49
  247. package/lib/constant/routing-profile.js +1 -1
  248. package/lib/context/app-resolver.js +1 -1
  249. package/lib/context/auth-resolver.js +1 -1
  250. package/lib/context/config-loader.js +1 -1
  251. package/lib/context.d.ts +2 -0
  252. package/lib/context.js +1 -1
  253. package/lib/core/alias-resolver.js +1 -1
  254. package/lib/core/api-client.d.ts +37 -0
  255. package/lib/core/api-client.js +1 -1
  256. package/lib/core/bff/config.js +1 -1
  257. package/lib/core/bff/file-system.js +1 -1
  258. package/lib/core/bff/hash.js +1 -1
  259. package/lib/core/bff/lock.js +1 -1
  260. package/lib/core/bff/utils.js +1 -1
  261. package/lib/core/db-resolver.js +1 -1
  262. package/lib/core/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/sql-index-auditor.js +1 -1
  266. package/lib/core/sql-sync/config.js +1 -1
  267. package/lib/core/sql-sync/file-system.js +1 -1
  268. package/lib/core/sql-sync/hash.js +1 -1
  269. package/lib/core/sql-sync/lock.js +1 -1
  270. package/lib/core/sql-sync/utils.js +1 -1
  271. package/lib/core/sql-validator.js +1 -1
  272. package/lib/errors.js +1 -1
  273. package/lib/framework/build-all-flags.js +1 -1
  274. package/lib/framework/error-output.js +1 -1
  275. package/lib/framework/explicit-yes.js +1 -1
  276. package/lib/framework/flags.js +1 -1
  277. package/lib/framework/help.js +1 -1
  278. package/lib/framework/index.js +1 -1
  279. package/lib/framework/output.js +1 -1
  280. package/lib/framework/response.js +1 -1
  281. package/lib/framework/runner-alias.js +1 -1
  282. package/lib/framework/runner.js +1 -1
  283. package/lib/framework/schema-export.js +1 -1
  284. package/lib/framework/types.d.ts +0 -1
  285. package/lib/framework/types.js +1 -1
  286. package/lib/generated/build-info.d.ts +4 -4
  287. package/lib/generated/build-info.js +1 -1
  288. package/lib/generated/official-routing.d.ts +83 -0
  289. package/lib/generated/official-routing.js +1 -0
  290. package/lib/generated/routing-contract.d.ts +9 -0
  291. package/lib/generated/routing-contract.js +1 -0
  292. package/lib/help.js +1 -1
  293. package/lib/postinstall.js +1 -1
  294. package/lib/runtime/confirmation.js +1 -1
  295. package/lib/runtime/event.js +1 -1
  296. package/lib/runtime/index.js +1 -1
  297. package/lib/runtime/queue.js +1 -1
  298. package/lib/runtime/resolve.js +1 -1
  299. package/lib/skills/builtin-skill.js +1 -1
  300. package/lib/skills/main.js +1 -1
  301. package/lib/skills/npx-skills-add.js +1 -1
  302. package/lib/skills/skill-presence.js +1 -1
  303. package/lib/telemetry/cli-command-trace.js +1 -1
  304. package/lib/telemetry/cli-help-trace.js +1 -1
  305. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  306. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  307. package/lib/telemetry/send-cli-trace-log.js +1 -1
  308. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  309. package/lib/types/index.d.ts +0 -1
  310. package/lib/utils/ai_config.js +1 -1
  311. package/lib/utils/apply-jq-filter.js +1 -1
  312. package/lib/utils/cdn-config.js +1 -1
  313. package/lib/utils/check-sdk-version.js +1 -1
  314. package/lib/utils/cli-version-check.js +1 -1
  315. package/lib/utils/cli-version-policy.js +1 -1
  316. package/lib/utils/config.js +1 -1
  317. package/lib/utils/entity-with-id.js +1 -1
  318. package/lib/utils/file-utils.js +1 -1
  319. package/lib/utils/guides-cdn.js +1 -1
  320. package/lib/utils/http-client.js +1 -1
  321. package/lib/utils/is-non-interactive.js +1 -1
  322. package/lib/utils/logger.js +1 -1
  323. package/lib/utils/params.js +1 -1
  324. package/lib/utils/platform.js +1 -1
  325. package/lib/utils/sleep.js +1 -1
  326. package/lib/utils/template-replacer.js +1 -1
  327. package/lib/utils/update-notice.js +1 -1
  328. package/lib/utils/version.js +1 -1
  329. package/lib/utils/with-active-cookie.js +1 -1
  330. package/lib/utils/write-cli-side-channel.js +1 -1
  331. package/package.json +2 -1
  332. package/skills/rabetbase/SKILL.md +16 -13
  333. package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
  334. package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
  335. package/skills/rabetbase/references/rabetbase-config.md +3 -6
  336. package/skills/rabetbase/references/rabetbase-doctor.md +2 -1
  337. package/skills/rabetbase/references/rabetbase-init.md +32 -10
  338. package/skills/rabetbase/references/rabetbase-kb.md +7 -7
  339. package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
  340. package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
  341. package/skills/rabetbase/references/rabetbase-rule.md +49 -0
  342. package/skills/rabetbase.manifest.json +5 -3
  343. package/lib/config/project-routing.d.ts +0 -30
  344. package/lib/config/project-routing.js +0 -1
  345. package/lib/core/kb-search-client.d.ts +0 -30
  346. package/lib/core/kb-search-client.js +0 -1
@@ -1 +1 @@
1
- const a46_0x4161e3=a46_0x1de9;(function(_0x390a51,_0x1257cb){const _0x51710e=a46_0x1de9,_0x5e44f2=_0x390a51();while(!![]){try{const _0x5841bb=-parseInt(_0x51710e(0x198))/0x1*(-parseInt(_0x51710e(0x1a3))/0x2)+parseInt(_0x51710e(0x1a0))/0x3*(parseInt(_0x51710e(0x197))/0x4)+parseInt(_0x51710e(0x187))/0x5*(parseInt(_0x51710e(0x191))/0x6)+-parseInt(_0x51710e(0x195))/0x7*(parseInt(_0x51710e(0x18d))/0x8)+-parseInt(_0x51710e(0x185))/0x9+parseInt(_0x51710e(0x190))/0xa+-parseInt(_0x51710e(0x18b))/0xb;if(_0x5841bb===_0x1257cb)break;else _0x5e44f2['push'](_0x5e44f2['shift']());}catch(_0x2bf166){_0x5e44f2['push'](_0x5e44f2['shift']());}}}(a46_0x47aa,0xb9231));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a46_0x1de9(_0x59b360,_0x2efab2){_0x59b360=_0x59b360-0x183;const _0x47aa14=a46_0x47aa();let _0x1de994=_0x47aa14[_0x59b360];return _0x1de994;}const TERMINAL_STATUSES=new Set([a46_0x4161e3(0x186),a46_0x4161e3(0x18c)]),NON_TERMINAL_STATUSES=new Set([a46_0x4161e3(0x19a),a46_0x4161e3(0x19d)]);function a46_0x47aa(){const _0x1da66f=['11813cEbZPf','\x20failed.','PENDING','Task\x20','status','PROCESSING','\x20returned\x20unknown\x20status\x20','\x20is\x20processing.','51eVpdIR','has','\x20is\x20pending.','218Ixbjew','taskId','trim','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x27\x5c\x27\x27','string','6883938VLOwKw','SUCCESS','20ceXBRG','toUpperCase','\x20--format\x20compress','\x20--appcode\x20','5020818vtjPls','FAILED','8BnuqKY','apiError','\x20task\x20status\x20--task-id\x20','4811100yzSWCw','127854bqITsl','errorMessage','replace','\x20completed\x20successfully.','8707370Tqwkpw','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','322256GcKYpV'];a46_0x47aa=function(){return _0x1da66f;};return a46_0x47aa();}export function normalizeAsyncTask(_0x363a7c){const _0x4c3354=a46_0x4161e3,_0x3ba0e3=typeof _0x363a7c?.[_0x4c3354(0x1a4)]==='string'?_0x363a7c[_0x4c3354(0x1a4)][_0x4c3354(0x1a5)]():'';if(!_0x3ba0e3)throw CliErrors[_0x4c3354(0x18e)](_0x4c3354(0x196));const _0x10a21d=typeof _0x363a7c[_0x4c3354(0x19c)]===_0x4c3354(0x184)?_0x363a7c['status']['trim']()[_0x4c3354(0x188)]():'';if(!_0x10a21d)throw CliErrors[_0x4c3354(0x18e)]('Async\x20task\x20'+_0x3ba0e3+_0x4c3354(0x1a6));return{'taskId':_0x3ba0e3,'status':_0x10a21d,'errorMessage':typeof _0x363a7c['errorMessage']===_0x4c3354(0x184)&&_0x363a7c[_0x4c3354(0x192)][_0x4c3354(0x1a5)]()?_0x363a7c['errorMessage'][_0x4c3354(0x1a5)]():null,'isTerminal':TERMINAL_STATUSES[_0x4c3354(0x1a1)](_0x10a21d),'knownStatus':TERMINAL_STATUSES['has'](_0x10a21d)||NON_TERMINAL_STATUSES[_0x4c3354(0x1a1)](_0x10a21d)};}export function buildAsyncTaskStatusCommand(_0x76cae3,_0x13def0){const _0xb8fe67=a46_0x4161e3;return CLI_BIN_NAME+_0xb8fe67(0x18f)+quoteShellArg(_0x76cae3)+_0xb8fe67(0x18a)+quoteShellArg(_0x13def0)+_0xb8fe67(0x189);}export function asyncTaskMessage(_0x2a3652){const _0x499038=a46_0x4161e3;switch(_0x2a3652['status']){case _0x499038(0x19a):return _0x499038(0x19b)+_0x2a3652[_0x499038(0x1a4)]+_0x499038(0x1a2);case _0x499038(0x19d):return'Task\x20'+_0x2a3652['taskId']+_0x499038(0x19f);case _0x499038(0x186):return _0x499038(0x19b)+_0x2a3652[_0x499038(0x1a4)]+_0x499038(0x194);case _0x499038(0x18c):return _0x2a3652[_0x499038(0x192)]?_0x499038(0x19b)+_0x2a3652[_0x499038(0x1a4)]+'\x20failed:\x20'+_0x2a3652['errorMessage']:'Task\x20'+_0x2a3652[_0x499038(0x1a4)]+_0x499038(0x199);default:return _0x499038(0x19b)+_0x2a3652[_0x499038(0x1a4)]+_0x499038(0x19e)+_0x2a3652[_0x499038(0x19c)]+'.';}}function quoteShellArg(_0x5bdd8b){const _0x550e01=a46_0x4161e3;return'\x27'+_0x5bdd8b[_0x550e01(0x193)](/'/g,_0x550e01(0x183))+'\x27';}
1
+ const a46_0x123af4=a46_0x4e22;(function(_0x1920be,_0x1e62e0){const _0x4b791e=a46_0x4e22,_0x394a6b=_0x1920be();while(!![]){try{const _0xaf6373=parseInt(_0x4b791e(0x1c6))/0x1+parseInt(_0x4b791e(0x1c8))/0x2*(-parseInt(_0x4b791e(0x1b9))/0x3)+-parseInt(_0x4b791e(0x1ca))/0x4+parseInt(_0x4b791e(0x1c7))/0x5+-parseInt(_0x4b791e(0x1d3))/0x6+parseInt(_0x4b791e(0x1c3))/0x7*(parseInt(_0x4b791e(0x1d5))/0x8)+-parseInt(_0x4b791e(0x1b6))/0x9*(-parseInt(_0x4b791e(0x1bf))/0xa);if(_0xaf6373===_0x1e62e0)break;else _0x394a6b['push'](_0x394a6b['shift']());}catch(_0x1ee209){_0x394a6b['push'](_0x394a6b['shift']());}}}(a46_0x4483,0x5f01f));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a46_0x4e22(_0x1c3cc3,_0x1a8139){_0x1c3cc3=_0x1c3cc3-0x1b6;const _0x4483bb=a46_0x4483();let _0x4e22ec=_0x4483bb[_0x1c3cc3];return _0x4e22ec;}const TERMINAL_STATUSES=new Set([a46_0x123af4(0x1c0),a46_0x123af4(0x1d2)]),NON_TERMINAL_STATUSES=new Set(['PENDING','PROCESSING']);export function normalizeAsyncTask(_0x29aa06){const _0x55e208=a46_0x123af4,_0x4ad6c6=typeof _0x29aa06?.[_0x55e208(0x1c1)]==='string'?_0x29aa06[_0x55e208(0x1c1)][_0x55e208(0x1b8)]():'';if(!_0x4ad6c6)throw CliErrors[_0x55e208(0x1bb)](_0x55e208(0x1cd));const _0x28fe22=typeof _0x29aa06[_0x55e208(0x1d7)]==='string'?_0x29aa06['status'][_0x55e208(0x1b8)]()['toUpperCase']():'';if(!_0x28fe22)throw CliErrors['apiError'](_0x55e208(0x1cf)+_0x4ad6c6+_0x55e208(0x1ba));return{'taskId':_0x4ad6c6,'status':_0x28fe22,'errorMessage':typeof _0x29aa06[_0x55e208(0x1be)]===_0x55e208(0x1b7)&&_0x29aa06[_0x55e208(0x1be)][_0x55e208(0x1b8)]()?_0x29aa06[_0x55e208(0x1be)][_0x55e208(0x1b8)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x28fe22),'knownStatus':TERMINAL_STATUSES[_0x55e208(0x1c9)](_0x28fe22)||NON_TERMINAL_STATUSES[_0x55e208(0x1c9)](_0x28fe22)};}export function buildAsyncTaskStatusCommand(_0x3c4c08,_0x17af37){const _0x40960e=a46_0x123af4;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x3c4c08)+_0x40960e(0x1cc)+quoteShellArg(_0x17af37)+_0x40960e(0x1bc);}export function asyncTaskMessage(_0x458630){const _0x172a78=a46_0x123af4;switch(_0x458630[_0x172a78(0x1d7)]){case _0x172a78(0x1d0):return _0x172a78(0x1cb)+_0x458630['taskId']+_0x172a78(0x1ce);case _0x172a78(0x1d4):return'Task\x20'+_0x458630[_0x172a78(0x1c1)]+_0x172a78(0x1d6);case _0x172a78(0x1c0):return'Task\x20'+_0x458630[_0x172a78(0x1c1)]+_0x172a78(0x1c2);case _0x172a78(0x1d2):return _0x458630[_0x172a78(0x1be)]?_0x172a78(0x1cb)+_0x458630[_0x172a78(0x1c1)]+_0x172a78(0x1c4)+_0x458630[_0x172a78(0x1be)]:_0x172a78(0x1cb)+_0x458630[_0x172a78(0x1c1)]+_0x172a78(0x1c5);default:return _0x172a78(0x1cb)+_0x458630['taskId']+_0x172a78(0x1bd)+_0x458630[_0x172a78(0x1d7)]+'.';}}function a46_0x4483(){const _0x2caa02=['string','trim','552OlMYsb','\x20response\x20did\x20not\x20contain\x20a\x20status.','apiError','\x20--format\x20compress','\x20returned\x20unknown\x20status\x20','errorMessage','95050UHRIKm','SUCCESS','taskId','\x20completed\x20successfully.','74669AzyrFP','\x20failed:\x20','\x20failed.','631536YRkGPD','279610lNlgaa','6938NBiQGS','has','1715112aBjhSZ','Task\x20','\x20--appcode\x20','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20is\x20pending.','Async\x20task\x20','PENDING','replace','FAILED','264792DVAhzX','PROCESSING','296mEARds','\x20is\x20processing.','status','396XSOQqN'];a46_0x4483=function(){return _0x2caa02;};return a46_0x4483();}function quoteShellArg(_0x1f844d){const _0x262389=a46_0x123af4;return'\x27'+_0x1f844d[_0x262389(0x1d1)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
@@ -1 +1 @@
1
- function a47_0x191c(_0x133a11,_0x57d2d4){_0x133a11=_0x133a11-0xb7;var _0x55ed2d=a47_0x55ed();var _0x191cf0=_0x55ed2d[_0x133a11];return _0x191cf0;}(function(_0x87c8ab,_0x1dac2c){var _0x1bb98d=a47_0x191c,_0x2876b8=_0x87c8ab();while(!![]){try{var _0x4c04ab=-parseInt(_0x1bb98d(0xbe))/0x1*(parseInt(_0x1bb98d(0xc2))/0x2)+parseInt(_0x1bb98d(0xc3))/0x3*(parseInt(_0x1bb98d(0xba))/0x4)+-parseInt(_0x1bb98d(0xb8))/0x5+parseInt(_0x1bb98d(0xc1))/0x6*(parseInt(_0x1bb98d(0xbd))/0x7)+-parseInt(_0x1bb98d(0xb9))/0x8*(parseInt(_0x1bb98d(0xbb))/0x9)+parseInt(_0x1bb98d(0xb7))/0xa+-parseInt(_0x1bb98d(0xbf))/0xb;if(_0x4c04ab===_0x1dac2c)break;else _0x2876b8['push'](_0x2876b8['shift']());}catch(_0x363efa){_0x2876b8['push'](_0x2876b8['shift']());}}}(a47_0x55ed,0xde604));export function asDryRunResult(_0x471826,_0xcc71d8){var _0x4e308e=a47_0x191c;return Object[_0x4e308e(0xbc)](_0x471826,{'method':{'value':_0xcc71d8[_0x4e308e(0xc5)],'enumerable':![]},'url':{'value':_0xcc71d8[_0x4e308e(0xc4)],'enumerable':![]},..._0xcc71d8['description']?{'description':{'value':_0xcc71d8[_0x4e308e(0xc0)],'enumerable':![]}}:{}});}function a47_0x55ed(){var _0x5b0a43=['9clJUGr','defineProperties','35714jgdYyL','392827HDwGEK','6297841ojwRsh','description','252BiNQzh','2kyHHqn','27BDLcUq','url','method','4180350YeEnzR','1017815Pnbgkb','1244072sHFWmO','712428MPGbWz'];a47_0x55ed=function(){return _0x5b0a43;};return a47_0x55ed();}
1
+ (function(_0x1f93c2,_0x540c51){var _0x55ffd8=a47_0x3db0,_0x29636a=_0x1f93c2();while(!![]){try{var _0x42e79d=parseInt(_0x55ffd8(0x198))/0x1+parseInt(_0x55ffd8(0x1a2))/0x2*(-parseInt(_0x55ffd8(0x1a4))/0x3)+parseInt(_0x55ffd8(0x19c))/0x4*(-parseInt(_0x55ffd8(0x19d))/0x5)+-parseInt(_0x55ffd8(0x1a1))/0x6*(-parseInt(_0x55ffd8(0x19f))/0x7)+-parseInt(_0x55ffd8(0x19a))/0x8*(parseInt(_0x55ffd8(0x1a3))/0x9)+parseInt(_0x55ffd8(0x19e))/0xa*(parseInt(_0x55ffd8(0x1a0))/0xb)+-parseInt(_0x55ffd8(0x196))/0xc;if(_0x42e79d===_0x540c51)break;else _0x29636a['push'](_0x29636a['shift']());}catch(_0x3913a5){_0x29636a['push'](_0x29636a['shift']());}}}(a47_0x2c99,0x3234b));function a47_0x2c99(){var _0x43f4f1=['49000CcJHwt','description','6784zpGIFE','defineProperties','196kBrGQV','30105udrHQm','1639630gZqdRs','91ExiKhH','11nRzbgB','180834PeWJTy','6NJMKPj','270oSYKNt','1194FGKSxy','url','929568RQryrS','method'];a47_0x2c99=function(){return _0x43f4f1;};return a47_0x2c99();}function a47_0x3db0(_0x411464,_0x50967e){_0x411464=_0x411464-0x195;var _0x2c996e=a47_0x2c99();var _0x3db0a4=_0x2c996e[_0x411464];return _0x3db0a4;}export function asDryRunResult(_0x4214f9,_0x324c50){var _0x35af8b=a47_0x3db0;return Object[_0x35af8b(0x19b)](_0x4214f9,{'method':{'value':_0x324c50[_0x35af8b(0x197)],'enumerable':![]},'url':{'value':_0x324c50[_0x35af8b(0x195)],'enumerable':![]},..._0x324c50['description']?{'description':{'value':_0x324c50[_0x35af8b(0x199)],'enumerable':![]}}:{}});}
@@ -5,6 +5,8 @@
5
5
  * 确保 pattern / description / required 等元数据保持一致。
6
6
  */
7
7
  import type { FlagDef } from "../../framework/types.js";
8
+ /** Write configuration to the user-level config instead of the current project. */
9
+ export declare const GLOBAL_SCOPE_FLAG: FlagDef;
8
10
  export declare const DATASET_CODE_PATTERN: NonNullable<FlagDef["pattern"]>;
9
11
  /** Dataset --code:32 位十六进制 UUID,用于 dataset / data 等命令 */
10
12
  export declare const CODE_FLAG: FlagDef;
@@ -1 +1 @@
1
- const a48_0x5601d8=a48_0x13d8;(function(_0x528462,_0x20e6ef){const _0x232c13=a48_0x13d8,_0x4a7c8f=_0x528462();while(!![]){try{const _0x2fb39d=-parseInt(_0x232c13(0x15c))/0x1*(-parseInt(_0x232c13(0x160))/0x2)+-parseInt(_0x232c13(0x153))/0x3*(-parseInt(_0x232c13(0x169))/0x4)+parseInt(_0x232c13(0x159))/0x5+parseInt(_0x232c13(0x165))/0x6+-parseInt(_0x232c13(0x154))/0x7*(-parseInt(_0x232c13(0x156))/0x8)+-parseInt(_0x232c13(0x15a))/0x9+-parseInt(_0x232c13(0x164))/0xa*(parseInt(_0x232c13(0x158))/0xb);if(_0x2fb39d===_0x20e6ef)break;else _0x4a7c8f['push'](_0x4a7c8f['shift']());}catch(_0xff9428){_0x4a7c8f['push'](_0x4a7c8f['shift']());}}}(a48_0x2dd1,0xcee76));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x5601d8(0x168)};export const CODE_FLAG={'name':'code','type':a48_0x5601d8(0x163),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x5601d8(0x167),'description':a48_0x5601d8(0x152)};export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x5601d8(0x163),'required':!![],'description':a48_0x5601d8(0x166),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x5601d8(0x15b)}};function a48_0x13d8(_0x206b76,_0x15b206){_0x206b76=_0x206b76-0x152;const _0x2dd181=a48_0x2dd1();let _0x13d855=_0x2dd181[_0x206b76];return _0x13d855;}export const APPCODE_FLAG_OPTIONAL={'name':a48_0x5601d8(0x161),'type':a48_0x5601d8(0x163),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x5601d8(0x15e)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x5601d8(0x15f),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};function a48_0x2dd1(){const _0x17139b=['a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','444kCMLvr','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','14103GnSnUU','11511395xaNXGN','skip-connection-test','8XVcZIs','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','28424MXoJnP','4777980rBkwFZ','15018165NDHvDl','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','126ZRiQAT','Database\x20product\x20type','App\x20code\x20(e.g.\x20app-xxxxx)','number','916NfSgFq','appcode','POSTGRESQL','string','8270cMApbc','8841186LgTZPy','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','datasetcode'];a48_0x2dd1=function(){return _0x17139b;};return a48_0x2dd1();}export const DB_TYPE_FLAG={'name':'dbtype','type':a48_0x5601d8(0x163),'required':!![],'description':a48_0x5601d8(0x15d),'enum':['MYSQL',a48_0x5601d8(0x162)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x5601d8(0x155),'type':'boolean','description':a48_0x5601d8(0x157)};
1
+ function a48_0x33a1(){const _0x2be48c=['3602820agQNPC','appcode','11670YwmSuM','Database\x20product\x20type','dbtype','3348UViygB','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','code','3926380JyQdBd','App\x20code\x20(e.g.\x20app-xxxxx)','1896598vYtMxV','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','POSTGRESQL','datasetcode','global','number','336MxsiYk','11022VqpDIU','651228GnGfni','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','string','MYSQL','boolean','Write\x20to\x20the\x20global\x20configuration','1BeEBrV','6814745KBxhrb','8HQvfCD','3UXnpCA','35uhjJJW','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'];a48_0x33a1=function(){return _0x2be48c;};return a48_0x33a1();}function a48_0x1fe7(_0x1fd3eb,_0x57f612){_0x1fd3eb=_0x1fd3eb-0x19d;const _0x33a1e1=a48_0x33a1();let _0x1fe7c8=_0x33a1e1[_0x1fd3eb];return _0x1fe7c8;}const a48_0x4efa89=a48_0x1fe7;(function(_0x709434,_0x33cc83){const _0x519458=a48_0x1fe7,_0x2370d6=_0x709434();while(!![]){try{const _0x2c7148=-parseInt(_0x519458(0x1b9))/0x1*(parseInt(_0x519458(0x1aa))/0x2)+-parseInt(_0x519458(0x19d))/0x3*(-parseInt(_0x519458(0x1a8))/0x4)+-parseInt(_0x519458(0x19e))/0x5*(-parseInt(_0x519458(0x1b3))/0x6)+parseInt(_0x519458(0x1ba))/0x7*(-parseInt(_0x519458(0x1bb))/0x8)+-parseInt(_0x519458(0x1a5))/0x9*(-parseInt(_0x519458(0x1a2))/0xa)+-parseInt(_0x519458(0x1b2))/0xb*(parseInt(_0x519458(0x1b1))/0xc)+parseInt(_0x519458(0x1a0))/0xd;if(_0x2c7148===_0x33cc83)break;else _0x2370d6['push'](_0x2370d6['shift']());}catch(_0x249bc0){_0x2370d6['push'](_0x2370d6['shift']());}}}(a48_0x33a1,0x7abcf));export const GLOBAL_SCOPE_FLAG={'name':a48_0x4efa89(0x1af),'type':a48_0x4efa89(0x1b7),'default':![],'description':a48_0x4efa89(0x1b8)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x4efa89(0x1ab)};export const CODE_FLAG={'name':a48_0x4efa89(0x1a7),'type':a48_0x4efa89(0x1b5),'required':!![],'description':a48_0x4efa89(0x19f),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x4efa89(0x1ae),'description':a48_0x4efa89(0x19f)};export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x4efa89(0x1b5),'required':!![],'description':a48_0x4efa89(0x1a6),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x4efa89(0x1a1),'type':'string','required':![],'description':a48_0x4efa89(0x1ac)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x4efa89(0x1a9)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x4efa89(0x1b0),'required':!![],'description':a48_0x4efa89(0x1b4)};export const DB_TYPE_FLAG={'name':a48_0x4efa89(0x1a4),'type':'string','required':!![],'description':a48_0x4efa89(0x1a3),'enum':[a48_0x4efa89(0x1b6),a48_0x4efa89(0x1ad)]};export const SKIP_CONNECTION_TEST_FLAG={'name':'skip-connection-test','type':a48_0x4efa89(0x1b7),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
@@ -1 +1 @@
1
- (function(_0x2bed6a,_0x4ab6c6){const _0x4f85ca=a49_0x8625,_0x26b5a9=_0x2bed6a();while(!![]){try{const _0x47d881=parseInt(_0x4f85ca(0xee))/0x1+-parseInt(_0x4f85ca(0xe6))/0x2*(-parseInt(_0x4f85ca(0xe4))/0x3)+parseInt(_0x4f85ca(0xe1))/0x4+parseInt(_0x4f85ca(0xe7))/0x5*(-parseInt(_0x4f85ca(0xf2))/0x6)+parseInt(_0x4f85ca(0xe2))/0x7*(parseInt(_0x4f85ca(0xf0))/0x8)+parseInt(_0x4f85ca(0xef))/0x9*(parseInt(_0x4f85ca(0xe5))/0xa)+-parseInt(_0x4f85ca(0xe9))/0xb;if(_0x47d881===_0x4ab6c6)break;else _0x26b5a9['push'](_0x26b5a9['shift']());}catch(_0x541b5e){_0x26b5a9['push'](_0x26b5a9['shift']());}}}(a49_0x4820,0x6177b));function a49_0x4820(){const _0x487d81=['233280NjwTVt','1315517elXJUV','File\x20is\x20not\x20a\x20regular\x20file:\x20','1276737MEFbfA','10lmphjB','2OBFzsY','658255zmPvWF','trim','11890131ORJkEn','\x20path\x20is\x20required.','isFile','size','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','204400DkREyA','3237363PtiNxF','24FkSGmb','\x20MB','6rymTIa','validation','ceil','File\x20not\x20found:\x20'];a49_0x4820=function(){return _0x487d81;};return a49_0x4820();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x8625(_0x110f46,_0xc03e9d){_0x110f46=_0x110f46-0xe0;const _0x48200c=a49_0x4820();let _0x8625f=_0x48200c[_0x110f46];return _0x8625f;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x46d2a9){const _0x3ae74f=a49_0x8625;if(_0x46d2a9>=BYTES_PER_MB){const _0xffbd42=Math[_0x3ae74f(0xf4)](_0x46d2a9/BYTES_PER_MB*0x64)/0x64;return _0xffbd42['toFixed'](0x2)+_0x3ae74f(0xf1);}return _0x46d2a9+'\x20B';}export function requireDevelopmentUploadFile(_0xfb76f8,_0x2c07da){const _0x269c43=a49_0x8625,_0x26384b=_0xfb76f8[_0x269c43(0xe8)]();if(!_0x26384b)throw CliErrors[_0x269c43(0xf3)](_0x2c07da+_0x269c43(0xea));if(!existsSync(_0x26384b))throw CliErrors['validation'](_0x269c43(0xe0)+_0x26384b);const _0x466860=statSync(_0x26384b);if(!_0x466860[_0x269c43(0xeb)]())throw CliErrors['validation'](_0x269c43(0xe3)+_0x26384b);if(_0x466860[_0x269c43(0xec)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x269c43(0xed)+_0x26384b+'\x20('+formatBytes(_0x466860[_0x269c43(0xec)])+')');return{'path':_0x26384b,'size':_0x466860['size']};}
1
+ (function(_0x22ac73,_0x3d5621){const _0x402065=a49_0x3434,_0x276b4a=_0x22ac73();while(!![]){try{const _0x2dd92e=-parseInt(_0x402065(0xf4))/0x1+parseInt(_0x402065(0xf9))/0x2+-parseInt(_0x402065(0xf5))/0x3*(-parseInt(_0x402065(0xef))/0x4)+parseInt(_0x402065(0xfb))/0x5*(parseInt(_0x402065(0xf0))/0x6)+-parseInt(_0x402065(0xee))/0x7*(parseInt(_0x402065(0xec))/0x8)+parseInt(_0x402065(0xf7))/0x9*(-parseInt(_0x402065(0xf1))/0xa)+parseInt(_0x402065(0xeb))/0xb;if(_0x2dd92e===_0x3d5621)break;else _0x276b4a['push'](_0x276b4a['shift']());}catch(_0x292537){_0x276b4a['push'](_0x276b4a['shift']());}}}(a49_0x5dc1,0xc4fc0));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x5dc1(){const _0x292dd0=['\x20MB','9341941LUNlyb','668UVlxwk','413982VGffHc','60EkhzCH','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20not\x20found:\x20','1149791aBDTbx','26463syUtdC','validation','1569123dEqKVD','isFile','2955038iZLrKI','size','95fbjjLW','832865TmmftZ','8cVebNR'];a49_0x5dc1=function(){return _0x292dd0;};return a49_0x5dc1();}const BYTES_PER_MB=0x400*0x400;function a49_0x3434(_0xce0297,_0x55bdad){_0xce0297=_0xce0297-0xeb;const _0x5dc1d8=a49_0x5dc1();let _0x34345f=_0x5dc1d8[_0xce0297];return _0x34345f;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3c8b4a){const _0x12f96d=a49_0x3434;if(_0x3c8b4a>=BYTES_PER_MB){const _0x5e52d2=Math['ceil'](_0x3c8b4a/BYTES_PER_MB*0x64)/0x64;return _0x5e52d2['toFixed'](0x2)+_0x12f96d(0xed);}return _0x3c8b4a+'\x20B';}export function requireDevelopmentUploadFile(_0xa82801,_0x2696eb){const _0x215f34=a49_0x3434,_0x4aa1a8=_0xa82801['trim']();if(!_0x4aa1a8)throw CliErrors[_0x215f34(0xf6)](_0x2696eb+'\x20path\x20is\x20required.');if(!existsSync(_0x4aa1a8))throw CliErrors[_0x215f34(0xf6)](_0x215f34(0xf3)+_0x4aa1a8);const _0xdc355=statSync(_0x4aa1a8);if(!_0xdc355[_0x215f34(0xf8)]())throw CliErrors[_0x215f34(0xf6)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4aa1a8);if(_0xdc355[_0x215f34(0xfa)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x215f34(0xf2)+_0x4aa1a8+'\x20('+formatBytes(_0xdc355[_0x215f34(0xfa)])+')');return{'path':_0x4aa1a8,'size':_0xdc355[_0x215f34(0xfa)]};}
@@ -1 +1 @@
1
- (function(_0x3d7e6a,_0x400993){const _0x5543dd=a50_0x1d54,_0x359cbf=_0x3d7e6a();while(!![]){try{const _0x55392d=-parseInt(_0x5543dd(0x152))/0x1+-parseInt(_0x5543dd(0x148))/0x2+-parseInt(_0x5543dd(0x154))/0x3+-parseInt(_0x5543dd(0x14d))/0x4*(-parseInt(_0x5543dd(0x14c))/0x5)+-parseInt(_0x5543dd(0x151))/0x6+parseInt(_0x5543dd(0x153))/0x7+parseInt(_0x5543dd(0x150))/0x8;if(_0x55392d===_0x400993)break;else _0x359cbf['push'](_0x359cbf['shift']());}catch(_0x343f5e){_0x359cbf['push'](_0x359cbf['shift']());}}}(a50_0x2a76,0x3ff5d));function a50_0x1d54(_0x3f3d82,_0x220269){_0x3f3d82=_0x3f3d82-0x148;const _0x2a760c=a50_0x2a76();let _0x1d54ed=_0x2a760c[_0x3f3d82];return _0x1d54ed;}function a50_0x2a76(){const _0x49238a=['App\x20Code\x20cannot\x20be\x20empty','8520iyXZGw','864dVehxK','App\x20Code\x20cannot\x20exceed\x20100\x20characters','trim','6239368ZGlAOa','1876098kRNLyI','133326dkmLHd','1249668XVdYRt','1546260REtPao','206198HwZJzy','test','length'];a50_0x2a76=function(){return _0x49238a;};return a50_0x2a76();}export function validateAppcode(_0x537d02){const _0x21143a=a50_0x1d54,_0x18e0e6=_0x537d02[_0x21143a(0x14f)]();if(!_0x18e0e6)return{'valid':![],'message':_0x21143a(0x14b)};if(_0x18e0e6[_0x21143a(0x14a)]>0x64)return{'valid':![],'message':_0x21143a(0x14e)};if(!/^[A-Za-z0-9_-]+$/[_0x21143a(0x149)](_0x18e0e6))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
1
+ (function(_0x463ae5,_0x2c5842){const _0x3c8208=a50_0x4c02,_0xe19060=_0x463ae5();while(!![]){try{const _0x59e6a2=parseInt(_0x3c8208(0xb0))/0x1*(-parseInt(_0x3c8208(0xa7))/0x2)+-parseInt(_0x3c8208(0xab))/0x3+-parseInt(_0x3c8208(0xa6))/0x4*(-parseInt(_0x3c8208(0xaf))/0x5)+-parseInt(_0x3c8208(0xb3))/0x6*(parseInt(_0x3c8208(0xaa))/0x7)+parseInt(_0x3c8208(0xa9))/0x8*(-parseInt(_0x3c8208(0xb4))/0x9)+-parseInt(_0x3c8208(0xac))/0xa+parseInt(_0x3c8208(0xad))/0xb;if(_0x59e6a2===_0x2c5842)break;else _0xe19060['push'](_0xe19060['shift']());}catch(_0x1409b2){_0xe19060['push'](_0xe19060['shift']());}}}(a50_0x5422,0xa1d8d));function a50_0x4c02(_0x558c65,_0x1acd52){_0x558c65=_0x558c65-0xa6;const _0x542295=a50_0x5422();let _0x4c02a8=_0x542295[_0x558c65];return _0x4c02a8;}export function validateAppcode(_0x306418){const _0x485ae2=a50_0x4c02,_0x2c3672=_0x306418['trim']();if(!_0x2c3672)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x2c3672[_0x485ae2(0xa8)]>0x64)return{'valid':![],'message':_0x485ae2(0xb1)};if(!/^[A-Za-z0-9_-]+$/[_0x485ae2(0xae)](_0x2c3672))return{'valid':![],'message':_0x485ae2(0xb2)};return{'valid':!![]};}function a50_0x5422(){const _0x2ee799=['length','824mvIwyE','136836IjiNdq','777168PXHtwM','10020380XoillZ','25657126TAYTXM','test','5esyjoh','137324akOsDH','App\x20Code\x20cannot\x20exceed\x20100\x20characters','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','108zXFapD','31554EJHbMT','1767436ilolRf','2tKoKuu'];a50_0x5422=function(){return _0x2ee799;};return a50_0x5422();}
@@ -1 +1 @@
1
- const a51_0x5e1b6b=a51_0x21fd;(function(_0x2d9244,_0x5858e7){const _0x11f1d8=a51_0x21fd,_0x35d4ae=_0x2d9244();while(!![]){try{const _0xed1759=parseInt(_0x11f1d8(0x1ff))/0x1+-parseInt(_0x11f1d8(0x201))/0x2+-parseInt(_0x11f1d8(0x1f2))/0x3+parseInt(_0x11f1d8(0x1f9))/0x4*(parseInt(_0x11f1d8(0x1f5))/0x5)+-parseInt(_0x11f1d8(0x1ec))/0x6+parseInt(_0x11f1d8(0x1fd))/0x7*(parseInt(_0x11f1d8(0x202))/0x8)+parseInt(_0x11f1d8(0x208))/0x9;if(_0xed1759===_0x5858e7)break;else _0x35d4ae['push'](_0x35d4ae['shift']());}catch(_0x3a09b7){_0x35d4ae['push'](_0x35d4ae['shift']());}}}(a51_0xd276,0xd6e3c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a51_0x5e1b6b(0x205)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x5e1b6b(0x1fa)]);function a51_0x21fd(_0x1fc6f0,_0x19e986){_0x1fc6f0=_0x1fc6f0-0x1ea;const _0xd27662=a51_0xd276();let _0x21fd9e=_0xd27662[_0x1fc6f0];return _0x21fd9e;}async function execute(_0x58dc17){const _0x5c0e25=a51_0x5e1b6b,_0x280270=_0x58dc17[_0x5c0e25(0x1ea)][0x0]?.[_0x5c0e25(0x20a)]();if(!_0x280270)throw CliErrors[_0x5c0e25(0x1f8)](_0x5c0e25(0x1ed),'Usage:\x20'+CLI_BIN_NAME+_0x5c0e25(0x204));if(_0x280270===_0x5c0e25(0x1eb))throw CliErrors[_0x5c0e25(0x1f8)](_0x5c0e25(0x1ef));if(!isTopLevelConfigKey(_0x280270)&&!EXTRA_DELETABLE_KEYS[_0x5c0e25(0x1fc)](_0x280270)&&!LEGACY_DELETABLE_KEYS[_0x5c0e25(0x1fc)](_0x280270))throw CliErrors[_0x5c0e25(0x1f8)]('Top-level\x20key\x20\x22'+_0x280270+_0x5c0e25(0x1f7),_0x5c0e25(0x1f6));const _0x43a3dd=resolveWriteScope({'global':_0x58dc17['bool']('global')}),_0x400bb2=readScopedConfig(_0x43a3dd),_0x56dde9=Object[_0x5c0e25(0x1ee)][_0x5c0e25(0x203)][_0x5c0e25(0x1fe)](_0x400bb2,_0x280270);_0x56dde9&&(delete _0x400bb2[_0x280270],writeScopedConfig(_0x400bb2,_0x43a3dd));const _0x175420=_0x43a3dd===_0x5c0e25(0x1f1)?'Global':_0x5c0e25(0x200);return{'ok':!![],'message':_0x56dde9?'✓\x20'+_0x175420+'\x20'+_0x280270+_0x5c0e25(0x1f4):'✓\x20'+_0x175420+'\x20'+_0x280270+_0x5c0e25(0x206),'data':{'key':_0x280270,'scope':_0x43a3dd,'changed':_0x56dde9}};}function a51_0xd276(){const _0x521468=['write','\x20deleted','2217170jXiWwf','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x22\x20is\x20not\x20deletable.','validation','12iZPVcT','defaultApp','delete','has','7QdZzYK','call','1191627Fnydcq','Project','976496fRUiMI','474000qmdeEs','hasOwnProperty','\x20config\x20delete\x20<key>\x20[--global]','inherit','\x20already\x20absent','config','12660948LRJkda','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','trim','args','riskLevel','6286764mXaxno','Missing\x20key\x20argument.','prototype','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','boolean','global','4715163cBPtJS'];a51_0xd276=function(){return _0x521468;};return a51_0xd276();}export const configDeleteDefinition={'service':a51_0x5e1b6b(0x207),'command':a51_0x5e1b6b(0x1fb),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':a51_0x5e1b6b(0x1f3),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a51_0x5e1b6b(0x209),'required':!![]}],'flags':[{'name':'global','type':a51_0x5e1b6b(0x1f0),'description':'Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ function a51_0x462a(){const _0x52e79c=['794832WQpZWb','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','riskLevel','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20config\x20delete\x20<key>\x20[--global]','5766254XgVMGw','693828wsizmp','2aeoWKm','91Egumci','14913INWUeo','Top-level\x20key\x20\x22','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','call','269224bZIOUS','boolean','Project','defaultApp','prototype','args','validation','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','routing','361345HmPpbX','1120xgmfRu','trim','Global','55VyQhPW','write','Usage:\x20','8HlLdny','inherit','13080SgRmNZ','\x22\x20is\x20not\x20deletable.','global','\x20deleted','has','390zolgri'];a51_0x462a=function(){return _0x52e79c;};return a51_0x462a();}const a51_0x542fea=a51_0x59c0;(function(_0x2acdc4,_0xfae65a){const _0x4f0333=a51_0x59c0,_0x810d7f=_0x2acdc4();while(!![]){try{const _0x3d58ef=-parseInt(_0x4f0333(0xb6))/0x1*(-parseInt(_0x4f0333(0xcc))/0x2)+-parseInt(_0x4f0333(0xcb))/0x3*(-parseInt(_0x4f0333(0xbd))/0x4)+parseInt(_0x4f0333(0xb7))/0x5*(-parseInt(_0x4f0333(0xbf))/0x6)+-parseInt(_0x4f0333(0xcd))/0x7*(-parseInt(_0x4f0333(0xd2))/0x8)+-parseInt(_0x4f0333(0xce))/0x9*(parseInt(_0x4f0333(0xc4))/0xa)+-parseInt(_0x4f0333(0xba))/0xb*(-parseInt(_0x4f0333(0xc5))/0xc)+-parseInt(_0x4f0333(0xca))/0xd;if(_0x3d58ef===_0xfae65a)break;else _0x810d7f['push'](_0x810d7f['shift']());}catch(_0x4781b3){_0x810d7f['push'](_0x810d7f['shift']());}}}(a51_0x462a,0x91861));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a51_0x542fea(0xbe)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x542fea(0xd5),a51_0x542fea(0xb5)]);async function execute(_0x56d184){const _0xbbeed3=a51_0x542fea,_0x186e25=_0x56d184[_0xbbeed3(0xd7)][0x0]?.[_0xbbeed3(0xb8)]();if(!_0x186e25)throw CliErrors[_0xbbeed3(0xd8)]('Missing\x20key\x20argument.',_0xbbeed3(0xbc)+CLI_BIN_NAME+_0xbbeed3(0xc9));if(_0x186e25===_0xbbeed3(0xc7))throw CliErrors[_0xbbeed3(0xd8)](_0xbbeed3(0xc8));if(!isTopLevelConfigKey(_0x186e25)&&!EXTRA_DELETABLE_KEYS[_0xbbeed3(0xc3)](_0x186e25)&&!LEGACY_DELETABLE_KEYS[_0xbbeed3(0xc3)](_0x186e25))throw CliErrors['validation'](_0xbbeed3(0xcf)+_0x186e25+_0xbbeed3(0xc0),_0xbbeed3(0xc6));const _0xbd70fb=resolveWriteScope({'global':_0x56d184['bool']('global')}),_0x51e406=readScopedConfig(_0xbd70fb),_0x4db64b=Object[_0xbbeed3(0xd6)]['hasOwnProperty'][_0xbbeed3(0xd1)](_0x51e406,_0x186e25);_0x4db64b&&(delete _0x51e406[_0x186e25],writeScopedConfig(_0x51e406,_0xbd70fb));const _0x546560=_0xbd70fb===_0xbbeed3(0xc1)?_0xbbeed3(0xb9):_0xbbeed3(0xd4);return{'ok':!![],'message':_0x4db64b?'✓\x20'+_0x546560+'\x20'+_0x186e25+_0xbbeed3(0xc2):'✓\x20'+_0x546560+'\x20'+_0x186e25+'\x20already\x20absent','data':{'key':_0x186e25,'scope':_0xbd70fb,'changed':_0x4db64b}};}function a51_0x59c0(_0x25c54d,_0x274c45){_0x25c54d=_0x25c54d-0xb5;const _0x462ada=a51_0x462a();let _0x59c016=_0x462ada[_0x25c54d];return _0x59c016;}export const configDeleteDefinition={'service':'config','command':'delete','description':a51_0x542fea(0xd0),'risk':a51_0x542fea(0xbb),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a51_0x542fea(0xd9),'required':!![]}],'flags':[{'name':a51_0x542fea(0xc1),'type':a51_0x542fea(0xd3),'description':'Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- function a52_0x3116(){const _0xbccb80=['2642282tUCuFz','56UreUSd','875OCOxhR','appcode','app','Missing\x20key.','validation','Key\x20not\x20found:\x20','627948rBTAuI','55617ncctlP','\x20config\x20get\x20--key\x20<key>','7339480GQoNlq','object','string','8518433BDCWtu','143mKgENm','config','1PLwNks','key','27nkdEPR','57804vwrHGp','str','Get\x20a\x20config\x20value\x20by\x20key','get','1102952vgCufg'];a52_0x3116=function(){return _0xbccb80;};return a52_0x3116();}const a52_0x37b6fd=a52_0x143c;(function(_0x51b22f,_0x22c339){const _0x2669be=a52_0x143c,_0x470873=_0x51b22f();while(!![]){try{const _0x3eb9af=-parseInt(_0x2669be(0x1e9))/0x1*(parseInt(_0x2669be(0x1f1))/0x2)+parseInt(_0x2669be(0x1e1))/0x3*(-parseInt(_0x2669be(0x1f2))/0x4)+parseInt(_0x2669be(0x1f3))/0x5*(parseInt(_0x2669be(0x1ec))/0x6)+parseInt(_0x2669be(0x1e6))/0x7+-parseInt(_0x2669be(0x1f0))/0x8*(parseInt(_0x2669be(0x1eb))/0x9)+parseInt(_0x2669be(0x1e3))/0xa+-parseInt(_0x2669be(0x1e7))/0xb*(parseInt(_0x2669be(0x1e0))/0xc);if(_0x3eb9af===_0x22c339)break;else _0x470873['push'](_0x470873['shift']());}catch(_0x5d2c03){_0x470873['push'](_0x470873['shift']());}}}(a52_0x3116,0xeaec6));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x1b294f){const _0x245a33=a52_0x143c,_0x1648ad=_0x1b294f[_0x245a33(0x1ed)](_0x245a33(0x1ea));if(!_0x1648ad)throw CliErrors[_0x245a33(0x1f7)](_0x245a33(0x1f6),'Usage:\x20'+CLI_BIN_NAME+_0x245a33(0x1e2));const _0x1388bb=readConfig(),_0x24149b=_0x1648ad===_0x245a33(0x1f5)?_0x245a33(0x1f4):_0x1648ad,_0x2bc474=_0x1388bb[_0x24149b];if(_0x2bc474===undefined)throw CliErrors[_0x245a33(0x1f7)](_0x245a33(0x1df)+_0x1648ad);return{'ok':!![],'data':typeof _0x2bc474===_0x245a33(0x1e4)?_0x2bc474:{[_0x24149b]:_0x2bc474},'message':typeof _0x2bc474===_0x245a33(0x1e4)?undefined:String(_0x2bc474)};}function a52_0x143c(_0x371130,_0x2a2a22){_0x371130=_0x371130-0x1df;const _0x31165f=a52_0x3116();let _0x143caa=_0x31165f[_0x371130];return _0x143caa;}export const configGetDefinition={'service':a52_0x37b6fd(0x1e8),'command':a52_0x37b6fd(0x1ef),'description':a52_0x37b6fd(0x1ee),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x37b6fd(0x1ea),'type':a52_0x37b6fd(0x1e5),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ function a52_0x178d(){const _0x3f8492=['10OgflRx','key','45WtnACO','object','str','get','Usage:\x20','2641071Zjhfwh','Key\x20not\x20found:\x20','35jmdGgN','74396377OFBuMh','674088BCyUKq','854686jIbCDd','string','Get\x20a\x20config\x20value\x20by\x20key','8zDgqLt','1655736UqVaKS','19131XfxQCO','\x20config\x20get\x20--key\x20<key>','1607474afoQCc','validation','config'];a52_0x178d=function(){return _0x3f8492;};return a52_0x178d();}const a52_0x3ac98b=a52_0x41b0;function a52_0x41b0(_0xf82023,_0x4b6d6c){_0xf82023=_0xf82023-0xa0;const _0x178d7c=a52_0x178d();let _0x41b07b=_0x178d7c[_0xf82023];return _0x41b07b;}(function(_0x2276b8,_0xc03f5){const _0x33b048=a52_0x41b0,_0x42b0f3=_0x2276b8();while(!![]){try{const _0x3b4991=-parseInt(_0x33b048(0xad))/0x1+-parseInt(_0x33b048(0xb4))/0x2+parseInt(_0x33b048(0xa8))/0x3*(-parseInt(_0x33b048(0xb0))/0x4)+parseInt(_0x33b048(0xaa))/0x5*(-parseInt(_0x33b048(0xb1))/0x6)+-parseInt(_0x33b048(0xb2))/0x7+-parseInt(_0x33b048(0xac))/0x8*(parseInt(_0x33b048(0xa3))/0x9)+-parseInt(_0x33b048(0xa1))/0xa*(-parseInt(_0x33b048(0xab))/0xb);if(_0x3b4991===_0xc03f5)break;else _0x42b0f3['push'](_0x42b0f3['shift']());}catch(_0x2f4f53){_0x42b0f3['push'](_0x42b0f3['shift']());}}}(a52_0x178d,0xf1518));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x48e3ed){const _0x2d482b=a52_0x41b0,_0x259534=_0x48e3ed[_0x2d482b(0xa5)](_0x2d482b(0xa2));if(!_0x259534)throw CliErrors['validation']('Missing\x20key.',_0x2d482b(0xa7)+CLI_BIN_NAME+_0x2d482b(0xb3));const _0xa25e05=readConfig(),_0x2ddc86=_0x259534==='app'?'appcode':_0x259534,_0x3db6f1=_0xa25e05[_0x2ddc86];if(_0x3db6f1===undefined)throw CliErrors[_0x2d482b(0xb5)](_0x2d482b(0xa9)+_0x259534);return{'ok':!![],'data':typeof _0x3db6f1===_0x2d482b(0xa4)?_0x3db6f1:{[_0x2ddc86]:_0x3db6f1},'message':typeof _0x3db6f1===_0x2d482b(0xa4)?undefined:String(_0x3db6f1)};}export const configGetDefinition={'service':a52_0x3ac98b(0xa0),'command':a52_0x3ac98b(0xa6),'description':a52_0x3ac98b(0xaf),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x3ac98b(0xa2),'type':a52_0x3ac98b(0xae),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x418997,_0x5de5ef){const _0x3c500d=a53_0x1b8e,_0x205d66=_0x418997();while(!![]){try{const _0x34e702=-parseInt(_0x3c500d(0x15d))/0x1*(parseInt(_0x3c500d(0x15f))/0x2)+-parseInt(_0x3c500d(0x160))/0x3*(parseInt(_0x3c500d(0x15a))/0x4)+parseInt(_0x3c500d(0x15e))/0x5+parseInt(_0x3c500d(0x159))/0x6+-parseInt(_0x3c500d(0x162))/0x7*(-parseInt(_0x3c500d(0x158))/0x8)+-parseInt(_0x3c500d(0x161))/0x9*(-parseInt(_0x3c500d(0x15b))/0xa)+parseInt(_0x3c500d(0x15c))/0xb;if(_0x34e702===_0x5de5ef)break;else _0x205d66['push'](_0x205d66['shift']());}catch(_0x543e7b){_0x205d66['push'](_0x205d66['shift']());}}}(a53_0x17e1,0xdf1af));function a53_0x1b8e(_0x4eb79d,_0x3598f2){_0x4eb79d=_0x4eb79d-0x158;const _0x17e103=a53_0x17e1();let _0x1b8ef7=_0x17e103[_0x4eb79d];return _0x1b8ef7;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';function a53_0x17e1(){const _0x5dbcdb=['8jSNodT','9964872QpcpUE','684524KXVBem','120SoiEAF','15650261knNvyR','2493mIfsLo','211625YvXWhr','1214CgBGxR','27ErDtEV','406431alTAhy','2096311MZYkKn'];a53_0x17e1=function(){return _0x5dbcdb;};return a53_0x17e1();}import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
1
+ (function(_0x58185c,_0x201d1a){const _0x5c1cc5=a53_0x103f,_0x142767=_0x58185c();while(!![]){try{const _0x506a26=-parseInt(_0x5c1cc5(0x10d))/0x1+-parseInt(_0x5c1cc5(0x105))/0x2*(parseInt(_0x5c1cc5(0x10e))/0x3)+-parseInt(_0x5c1cc5(0x10a))/0x4*(-parseInt(_0x5c1cc5(0x10c))/0x5)+-parseInt(_0x5c1cc5(0x107))/0x6*(parseInt(_0x5c1cc5(0x104))/0x7)+-parseInt(_0x5c1cc5(0x109))/0x8*(parseInt(_0x5c1cc5(0x10b))/0x9)+parseInt(_0x5c1cc5(0x108))/0xa+parseInt(_0x5c1cc5(0x106))/0xb;if(_0x506a26===_0x201d1a)break;else _0x142767['push'](_0x142767['shift']());}catch(_0x2fc1f0){_0x142767['push'](_0x142767['shift']());}}}(a53_0xbfb4,0x9ad3e));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a53_0x103f(_0x5cd38a,_0x630917){_0x5cd38a=_0x5cd38a-0x104;const _0xbfb4ee=a53_0xbfb4();let _0x103fc7=_0xbfb4ee[_0x5cd38a];return _0x103fc7;}import{configSetDefinition}from'../../commands/config/set.js';function a53_0xbfb4(){const _0x5fa608=['8atYFLP','4433444qGdFQB','3110805WBlGkR','5qQGyRy','1009633qrCeMT','3HyvieH','1161335pnKTOa','1355126LGPLfa','5667002UeYWvG','6TwwpUc','12093770UwrZxz'];a53_0xbfb4=function(){return _0x5fa608;};return a53_0xbfb4();}import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
@@ -5,8 +5,10 @@ export declare function executeConfigInit(ctx: RuntimeContext): Promise<{
5
5
  message: string;
6
6
  data: {
7
7
  mode: string;
8
+ protocol: "lovrabet-routing/v1" | undefined;
8
9
  region: "global" | "id" | "cn" | null;
9
- domains: Partial<Record<"apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "kbSearchDomain" | "appDomain" | "localDomain" | "certificateDomain", string>>;
10
+ domains: Partial<Record<"apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "appDomain" | "localDomain" | "certificateDomain", string>>;
11
+ cdn: import("../../config/domain-config.js").EnterpriseRoutingCdn | undefined;
10
12
  };
11
13
  }>;
12
14
  export declare const configInitDefinition: CommandDefinition;
@@ -1 +1 @@
1
- const a54_0x484684=a54_0xac5f;function a54_0x2868(){const _0x3e1f56=['Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','global','2004303tbYSlv','region','186230OjRyXs','26TumLGB','Custom\x20local\x20callback\x20HTTPS\x20origin','name','string','Mainland\x20China\x20(cn)','Custom\x20KB\x20Search\x20HTTPS\x20origin','domain-config','independent','ExitPromptError','Available\x20regions:\x20','Select\x20Lovrabet\x20region','15372744oqfoZS','Indonesia\x20(id)','keys','assign','Custom\x20SkillHub\x20HTTPS\x20origin','Independent-deployment\x20Domain\x20JSON\x20file','kb-domain','Custom\x20certificate\x20service\x20HTTPS\x20origin','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','7sservq','2126460jGKZCY','11HfoOzO','str','301096BbBHIv','certificate-domain','official','Custom\x20knowledge-base\x20HTTPS\x20origin','Region\x20\x22','local-domain','write','24874lDRTGe','length','Custom\x20platform\x20API\x20HTTPS\x20origin','cancelled','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','153gnaDsS','kb-search-domain','76PquYub','12cVfiYz','Custom\x20Runtime\x20HTTPS\x20origin','8209100NZImEb','\x22\x20is\x20not\x20currently\x20available.','Custom\x20User\x20HTTPS\x20origin','validation','join','api-domain','user-domain','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.'];a54_0x2868=function(){return _0x3e1f56;};return a54_0x2868();}(function(_0x7378a0,_0x977329){const _0x25df64=a54_0xac5f,_0x36d943=_0x7378a0();while(!![]){try{const _0x5cb96c=parseInt(_0x25df64(0x15f))/0x1*(parseInt(_0x25df64(0x133))/0x2)+-parseInt(_0x25df64(0x148))/0x3+parseInt(_0x25df64(0x13a))/0x4*(-parseInt(_0x25df64(0x14a))/0x5)+parseInt(_0x25df64(0x13b))/0x6*(parseInt(_0x25df64(0x160))/0x7)+-parseInt(_0x25df64(0x163))/0x8*(parseInt(_0x25df64(0x138))/0x9)+-parseInt(_0x25df64(0x13d))/0xa*(parseInt(_0x25df64(0x161))/0xb)+parseInt(_0x25df64(0x156))/0xc*(parseInt(_0x25df64(0x14b))/0xd);if(_0x5cb96c===_0x977329)break;else _0x36d943['push'](_0x36d943['shift']());}catch(_0x7a6ac8){_0x36d943['push'](_0x36d943['shift']());}}}(a54_0x2868,0x66985));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';function a54_0xac5f(_0x4cc2dc,_0x309796){_0x4cc2dc=_0x4cc2dc-0x12d;const _0x2868c8=a54_0x2868();let _0xac5fb5=_0x2868c8[_0x4cc2dc];return _0xac5fb5;}import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainFlags}from'../../config/domain-config.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';export const configInitFlags=[{'name':a54_0x484684(0x149),'type':a54_0x484684(0x14e),'description':'Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x484684(0x151),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x15b)},{'name':a54_0x484684(0x143),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x13f)},{'name':a54_0x484684(0x142),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x135)},{'name':'runtime-domain','type':a54_0x484684(0x14e),'description':a54_0x484684(0x13c)},{'name':'skill-domain','type':a54_0x484684(0x14e),'description':a54_0x484684(0x15a)},{'name':a54_0x484684(0x15c),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x12f)},{'name':a54_0x484684(0x139),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x150)},{'name':'app-domain','type':'string','description':a54_0x484684(0x15e)},{'name':a54_0x484684(0x131),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x14c)},{'name':a54_0x484684(0x12d),'type':a54_0x484684(0x14e),'description':a54_0x484684(0x15d)}];async function resolveRegion(_0x4137c4){const _0x59dbe0=a54_0x484684,_0x2800b9=_0x4137c4[_0x59dbe0(0x162)](_0x59dbe0(0x149));if(_0x2800b9){if(!isEnabledLovrabetRegion(_0x2800b9))throw CliErrors[_0x59dbe0(0x140)](_0x59dbe0(0x130)+_0x2800b9+_0x59dbe0(0x13e),_0x59dbe0(0x154)+ENABLED_LOVRABET_REGION_VALUES[_0x59dbe0(0x141)](',\x20'));return _0x2800b9;}if(_0x4137c4['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x59dbe0(0x155),'default':DEFAULT_LOVRABET_REGION,'choices':[{'name':_0x59dbe0(0x14f),'value':'cn'},{'name':_0x59dbe0(0x157),'value':'id'}]});}catch(_0x50cf74){if(_0x50cf74?.[_0x59dbe0(0x14d)]===_0x59dbe0(0x153))throw CliErrors[_0x59dbe0(0x136)]();throw _0x50cf74;}}export async function executeConfigInit(_0x34ade7){const _0x51cf55=a54_0x484684,_0x334bb1=resolveDomainFlags(_0x34ade7),_0x4e71f5=Object['keys'](_0x334bb1)[_0x51cf55(0x134)]>0x0;if(_0x4e71f5&&_0x34ade7[_0x51cf55(0x162)](_0x51cf55(0x149)))throw CliErrors[_0x51cf55(0x140)]('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0x334bb1['localDomain']!==!!_0x334bb1['certificateDomain'])throw CliErrors[_0x51cf55(0x140)](_0x51cf55(0x144));const _0x1663a9=readScopedConfig('global');for(const _0x4fa530 of DOMAIN_CONFIG_FIELDS)delete _0x1663a9[_0x4fa530];for(const _0x406a0d of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x1663a9[_0x406a0d];let _0x2def00=null;if(_0x4e71f5)delete _0x1663a9[_0x51cf55(0x149)],Object[_0x51cf55(0x159)](_0x1663a9,_0x334bb1);else{_0x2def00=await resolveRegion(_0x34ade7);if(_0x2def00===DEFAULT_LOVRABET_REGION)delete _0x1663a9[_0x51cf55(0x149)];else _0x1663a9[_0x51cf55(0x149)]=_0x2def00;}return writeScopedConfig(_0x1663a9,_0x51cf55(0x147)),{'ok':!![],'message':_0x4e71f5?_0x51cf55(0x145)+Object[_0x51cf55(0x158)](_0x334bb1)[_0x51cf55(0x141)](',\x20')+'.':_0x51cf55(0x146)+_0x2def00+'.','data':{'mode':_0x4e71f5?_0x51cf55(0x152):_0x51cf55(0x12e),'region':_0x2def00,'domains':_0x334bb1}};}export const configInitDefinition={'service':'config','command':'init','description':a54_0x484684(0x137),'risk':a54_0x484684(0x132),'confirmationDescription':'Updates\x20the\x20global\x20Rabetbase\x20region\x20or\x20independent-deployment\x20domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
1
+ const a54_0x1ce1f4=a54_0x4439;(function(_0x4f3039,_0x4fc762){const _0x2b1edf=a54_0x4439,_0x33df77=_0x4f3039();while(!![]){try{const _0x1106ad=parseInt(_0x2b1edf(0x17b))/0x1*(-parseInt(_0x2b1edf(0x161))/0x2)+parseInt(_0x2b1edf(0x170))/0x3+-parseInt(_0x2b1edf(0x16c))/0x4*(parseInt(_0x2b1edf(0x152))/0x5)+parseInt(_0x2b1edf(0x168))/0x6+-parseInt(_0x2b1edf(0x15d))/0x7*(parseInt(_0x2b1edf(0x172))/0x8)+-parseInt(_0x2b1edf(0x14f))/0x9*(-parseInt(_0x2b1edf(0x15b))/0xa)+parseInt(_0x2b1edf(0x163))/0xb;if(_0x1106ad===_0x4fc762)break;else _0x33df77['push'](_0x33df77['shift']());}catch(_0x4f3b76){_0x33df77['push'](_0x33df77['shift']());}}}(a54_0x1379,0xdf4af));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':'region','type':a54_0x1ce1f4(0x146),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a54_0x1ce1f4(0x14e)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x1ce1f4(0x14a),'type':'string','description':a54_0x1ce1f4(0x160)},{'name':a54_0x1ce1f4(0x177),'type':a54_0x1ce1f4(0x146),'description':a54_0x1ce1f4(0x16f)},{'name':'api-domain','type':a54_0x1ce1f4(0x146),'description':a54_0x1ce1f4(0x14b)},{'name':a54_0x1ce1f4(0x148),'type':a54_0x1ce1f4(0x146),'description':a54_0x1ce1f4(0x154)},{'name':a54_0x1ce1f4(0x149),'type':a54_0x1ce1f4(0x146),'description':'Custom\x20SkillHub\x20HTTPS\x20origin'},{'name':'kb-domain','type':'string','description':a54_0x1ce1f4(0x15c)},{'name':a54_0x1ce1f4(0x171),'type':a54_0x1ce1f4(0x146),'description':a54_0x1ce1f4(0x145)},{'name':a54_0x1ce1f4(0x173),'type':a54_0x1ce1f4(0x146),'description':a54_0x1ce1f4(0x150)},{'name':a54_0x1ce1f4(0x15e),'type':'string','description':a54_0x1ce1f4(0x17d)}];function a54_0x4439(_0x4bc525,_0x57b164){_0x4bc525=_0x4bc525-0x144;const _0x137978=a54_0x1379();let _0x443985=_0x137978[_0x4bc525];return _0x443985;}async function resolveRegion(_0x959c4a){const _0x244d8c=a54_0x1ce1f4,_0x232299=_0x959c4a[_0x244d8c(0x174)]('region');if(_0x232299){if(!isEnabledLovrabetRegion(_0x232299))throw CliErrors[_0x244d8c(0x164)](_0x244d8c(0x14c)+_0x232299+_0x244d8c(0x17e),_0x244d8c(0x16a)+ENABLED_LOVRABET_REGION_VALUES[_0x244d8c(0x14e)](',\x20'));return _0x232299;}if(_0x959c4a[_0x244d8c(0x169)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x244d8c(0x156)](_0x4f15e9=>({'name':getOfficialRoutingProfile(_0x4f15e9)['label']+'\x20('+_0x4f15e9+')','value':_0x4f15e9}))});}catch(_0x4d60e5){if(_0x4d60e5?.['name']===_0x244d8c(0x159))throw CliErrors[_0x244d8c(0x147)]();throw _0x4d60e5;}}export async function executeConfigInit(_0x4c70f8){const _0x41b9b0=a54_0x1ce1f4,_0x4a7833=resolveDomainConfigInput(_0x4c70f8),_0x20f37e=_0x4a7833[_0x41b9b0(0x157)],_0x1bfe1c=Object[_0x41b9b0(0x176)](_0x20f37e)['length']>0x0;if(_0x1bfe1c&&_0x4c70f8[_0x41b9b0(0x174)](_0x41b9b0(0x15f)))throw CliErrors['validation'](_0x41b9b0(0x15a));if(!!_0x20f37e[_0x41b9b0(0x179)]!==!!_0x20f37e['certificateDomain'])throw CliErrors[_0x41b9b0(0x164)](_0x41b9b0(0x162));const _0x36d3d5=_0x4c70f8[_0x41b9b0(0x14d)](_0x41b9b0(0x16e))?_0x41b9b0(0x16e):_0x41b9b0(0x151),_0x36f869=readScopedConfig(_0x36d3d5);for(const _0x46e5fd of DOMAIN_CONFIG_FIELDS)delete _0x36f869[_0x46e5fd];for(const _0x386a59 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x36f869[_0x386a59];delete _0x36f869[_0x41b9b0(0x175)];let _0x38f8ed=null;if(_0x1bfe1c)delete _0x36f869[_0x41b9b0(0x15f)],_0x4a7833['mode']==='enterprise-v1'?_0x36f869[_0x41b9b0(0x175)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x4a7833[_0x41b9b0(0x16d)],'cdn':_0x4a7833[_0x41b9b0(0x166)]}:Object[_0x41b9b0(0x155)](_0x36f869,_0x20f37e);else{_0x38f8ed=await resolveRegion(_0x4c70f8);if(_0x38f8ed===DEFAULT_LOVRABET_REGION)delete _0x36f869[_0x41b9b0(0x15f)];else _0x36f869[_0x41b9b0(0x15f)]=_0x38f8ed;}return writeScopedConfig(_0x36f869,_0x36d3d5),{'ok':!![],'message':_0x1bfe1c?_0x41b9b0(0x158)+Object[_0x41b9b0(0x176)](_0x4a7833[_0x41b9b0(0x144)]===_0x41b9b0(0x167)?_0x4a7833['manifestDomains']:_0x20f37e)[_0x41b9b0(0x14e)](',\x20')+'.':_0x41b9b0(0x165)+_0x38f8ed+'.','data':{'mode':_0x1bfe1c?_0x41b9b0(0x153):_0x41b9b0(0x17a),'protocol':_0x4a7833[_0x41b9b0(0x144)]==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x38f8ed,'domains':_0x20f37e,'cdn':_0x4a7833['mode']===_0x41b9b0(0x167)?_0x4a7833[_0x41b9b0(0x166)]:undefined}};}export const configInitDefinition={'service':'config','command':a54_0x1ce1f4(0x17c),'description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a54_0x1ce1f4(0x178),'confirmationDescription':a54_0x1ce1f4(0x16b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};function a54_0x1379(){const _0x59c29a=['domains','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','ExitPromptError','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','860ZpkdoN','Custom\x20knowledge-base\x20HTTPS\x20origin','473263elpvSE','certificate-domain','region','Independent-deployment\x20Domain\x20JSON\x20file','1978106eqSQws','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','2713029WnIywt','validation','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','cdn','enterprise-v1','4403166lXtIrW','nonInteractive','Available\x20regions:\x20','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','21472atEESA','manifestDomains','global','Custom\x20User\x20HTTPS\x20origin','1094580gZzKkI','app-domain','48FeucxX','local-domain','str','routing','keys','user-domain','write','localDomain','official','1JqGpOB','init','Custom\x20certificate\x20service\x20HTTPS\x20origin','\x22\x20is\x20not\x20currently\x20available.','mode','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','string','cancelled','runtime-domain','skill-domain','domain-config','Custom\x20platform\x20API\x20HTTPS\x20origin','Region\x20\x22','bool','join','119979cTqFbm','Custom\x20local\x20callback\x20HTTPS\x20origin','project','170MDOrMv','independent','Custom\x20Runtime\x20HTTPS\x20origin','assign','map'];a54_0x1379=function(){return _0x59c29a;};return a54_0x1379();}
@@ -1 +1 @@
1
- const a55_0x4004c8=a55_0x2568;function a55_0x2568(_0x3d8af6,_0x2f7d4b){_0x3d8af6=_0x3d8af6-0x154;const _0x58e32f=a55_0x58e3();let _0x2568da=_0x58e32f[_0x3d8af6];return _0x2568da;}(function(_0x498f32,_0x57793c){const _0x3bf424=a55_0x2568,_0x4d4c80=_0x498f32();while(!![]){try{const _0x254322=-parseInt(_0x3bf424(0x160))/0x1*(-parseInt(_0x3bf424(0x157))/0x2)+parseInt(_0x3bf424(0x15a))/0x3*(-parseInt(_0x3bf424(0x155))/0x4)+parseInt(_0x3bf424(0x159))/0x5+-parseInt(_0x3bf424(0x15d))/0x6*(parseInt(_0x3bf424(0x156))/0x7)+-parseInt(_0x3bf424(0x154))/0x8+parseInt(_0x3bf424(0x162))/0x9+parseInt(_0x3bf424(0x164))/0xa;if(_0x254322===_0x57793c)break;else _0x4d4c80['push'](_0x4d4c80['shift']());}catch(_0x2aecb0){_0x4d4c80['push'](_0x4d4c80['shift']());}}}(a55_0x58e3,0xcbe34));function a55_0x58e3(){const _0x4f21c6=['15174lXVIbP','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','2336490YWbuqE','3AefrUU','List\x20all\x20config\x20values','config','18zMOkzW','boolean','read','141HmevyY','bool','6665949PhikUV','global','22038970ApAWYD','9885256npiGCC','5429988otDXPJ','2457805uSCkfH'];a55_0x58e3=function(){return _0x4f21c6;};return a55_0x58e3();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x42cc25){const _0x47791d=a55_0x2568,_0x323f10=_0x42cc25[_0x47791d(0x161)](_0x47791d(0x163))?readScopedConfig(_0x47791d(0x163)):readConfig();return{'ok':!![],'data':_0x323f10};}export const configListDefinition={'service':a55_0x4004c8(0x15c),'command':'list','description':a55_0x4004c8(0x15b),'risk':a55_0x4004c8(0x15f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x4004c8(0x163),'type':a55_0x4004c8(0x15e),'description':a55_0x4004c8(0x158),'default':![]}],'execute':execute};
1
+ const a55_0x1cd4b2=a55_0xca35;(function(_0x11e9ea,_0x27a308){const _0x59d25e=a55_0xca35,_0x4e6be2=_0x11e9ea();while(!![]){try{const _0xbe90a0=parseInt(_0x59d25e(0x165))/0x1+-parseInt(_0x59d25e(0x15d))/0x2+parseInt(_0x59d25e(0x15f))/0x3*(parseInt(_0x59d25e(0x168))/0x4)+-parseInt(_0x59d25e(0x164))/0x5*(parseInt(_0x59d25e(0x163))/0x6)+-parseInt(_0x59d25e(0x16d))/0x7*(-parseInt(_0x59d25e(0x16b))/0x8)+parseInt(_0x59d25e(0x15e))/0x9*(parseInt(_0x59d25e(0x169))/0xa)+-parseInt(_0x59d25e(0x16f))/0xb;if(_0xbe90a0===_0x27a308)break;else _0x4e6be2['push'](_0x4e6be2['shift']());}catch(_0x78d2a0){_0x4e6be2['push'](_0x4e6be2['shift']());}}}(a55_0x4c14,0xbdfa7));import{readScopedConfig}from'../../commands/config/shared.js';function a55_0x4c14(){const _0x2961c7=['178244RDtmHt','398565bMlpWE','3OKoNFI','boolean','List\x20all\x20config\x20values','bool','216zjqysf','120620mzPImA','758853zopGef','config','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','3893224HQhtka','120dFNzGd','global','704PPRoen','list','48825XgAvkA','read','12558062PjfSsn'];a55_0x4c14=function(){return _0x2961c7;};return a55_0x4c14();}function a55_0xca35(_0xe11c86,_0x1462cf){_0xe11c86=_0xe11c86-0x15d;const _0x4c1468=a55_0x4c14();let _0xca35ee=_0x4c1468[_0xe11c86];return _0xca35ee;}import{readConfig}from'../../utils/config.js';async function execute(_0x84864c){const _0x8d841=a55_0xca35,_0x2c9cfb=_0x84864c[_0x8d841(0x162)](_0x8d841(0x16a))?readScopedConfig(_0x8d841(0x16a)):readConfig();return{'ok':!![],'data':_0x2c9cfb};}export const configListDefinition={'service':a55_0x1cd4b2(0x166),'command':a55_0x1cd4b2(0x16c),'description':a55_0x1cd4b2(0x161),'risk':a55_0x1cd4b2(0x16e),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x1cd4b2(0x16a),'type':a55_0x1cd4b2(0x160),'description':a55_0x1cd4b2(0x167),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a56_0x3f2f2a=a56_0x226a;(function(_0x54e9f5,_0x570e2e){const _0x4956e1=a56_0x226a,_0x2368e2=_0x54e9f5();while(!![]){try{const _0x16f66e=-parseInt(_0x4956e1(0xbf))/0x1*(parseInt(_0x4956e1(0xab))/0x2)+-parseInt(_0x4956e1(0xac))/0x3+parseInt(_0x4956e1(0xdc))/0x4*(-parseInt(_0x4956e1(0xd1))/0x5)+-parseInt(_0x4956e1(0xc4))/0x6*(-parseInt(_0x4956e1(0xba))/0x7)+parseInt(_0x4956e1(0xd0))/0x8*(-parseInt(_0x4956e1(0xb8))/0x9)+parseInt(_0x4956e1(0xc1))/0xa+parseInt(_0x4956e1(0xd9))/0xb*(parseInt(_0x4956e1(0xd6))/0xc);if(_0x16f66e===_0x570e2e)break;else _0x2368e2['push'](_0x2368e2['shift']());}catch(_0x5aee96){_0x2368e2['push'](_0x2368e2['shift']());}}}(a56_0x3a69,0xe7c26));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 a56_0x3a69(){const _0x37a992=['12874240IXRNpa','\x22.\x20Allowed:\x20','value','1986SVIIox','write','length','string','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','\x20appcode\x20set\x20to:\x20','app','Project','validation','Top-level\x20key\x20\x22','keys','Usage:\x20','24cNdBCA','99050uNvxRB','`,\x20`','Use\x20`','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','riskLevel','444tZirLr','Set\x20a\x20config\x20value','env','704066mZyniU','includes','boolean','4MNQXFn','apps','locale','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20workspace\x20add\x20<name>\x20--appcode\x20','2rphTxT','313152gypjjJ','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','appcode','str','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','config','key','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','object','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','global','\x20set\x20to:\x20','5057901TuUuAC','set','13622ZOwRbN','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Invalid\x20value\x20for\x20\x22','bool','Missing\x20value.','1540325WEdsbU','Missing\x20key.'];a56_0x3a69=function(){return _0x37a992;};return a56_0x3a69();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';function a56_0x226a(_0x4b383b,_0x2ddf2d){_0x4b383b=_0x4b383b-0xa7;const _0x3a691a=a56_0x3a69();let _0x226ae1=_0x3a691a[_0x4b383b];return _0x226ae1;}async function execute(_0x2a1ef1){const _0x41ab73=a56_0x226a,_0x40cb92=_0x2a1ef1[_0x41ab73(0xaf)](_0x41ab73(0xb2)),_0x1621dc=_0x2a1ef1[_0x41ab73(0xaf)](_0x41ab73(0xc3));if(!_0x40cb92)throw CliErrors[_0x41ab73(0xcc)](_0x41ab73(0xc0),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x1621dc===undefined||_0x1621dc==='')throw CliErrors[_0x41ab73(0xcc)](_0x41ab73(0xbe),_0x41ab73(0xcf)+CLI_BIN_NAME+_0x41ab73(0xa9));let _0x2788ed=_0x40cb92,_0x323ff2=_0x1621dc;if(_0x1621dc['length']>0x1f4)throw CliErrors['validation'](_0x41ab73(0xb0));if(_0x40cb92===_0x41ab73(0xd5))throw CliErrors[_0x41ab73(0xcc)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x40cb92))throw CliErrors['validation'](_0x41ab73(0xcd)+_0x40cb92+'\x22\x20is\x20not\x20settable.','Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x40cb92]&&!CONFIG_ENUM_VALUES[_0x40cb92][_0x41ab73(0xda)](_0x1621dc))throw CliErrors[_0x41ab73(0xcc)](_0x41ab73(0xbc)+_0x40cb92+_0x41ab73(0xc2)+CONFIG_ENUM_VALUES[_0x40cb92]['join'](',\x20'));if(_0x40cb92===_0x41ab73(0xa8)&&!normalizeLocale(_0x1621dc))throw CliErrors[_0x41ab73(0xcc)]('Invalid\x20locale\x20value.',_0x41ab73(0xbb));DOMAIN_CONFIG_FIELDS[_0x41ab73(0xda)](_0x40cb92)&&(_0x323ff2=normalizeDomainOrigin(_0x40cb92,_0x1621dc));const _0x9b4821={'global':_0x2a1ef1[_0x41ab73(0xbd)](_0x41ab73(0xb6))},_0x4ce0d1=resolveWriteScope(_0x9b4821),_0x5d0f90=readScopedConfig(_0x4ce0d1);_0x40cb92==='app'&&(_0x2788ed=_0x41ab73(0xae),delete _0x5d0f90[_0x41ab73(0xca)]);_0x40cb92==='locale'&&(_0x323ff2=normalizeLocale(_0x1621dc));if(_0x40cb92===_0x41ab73(0xd8)){_0x323ff2=normalizeEnv(_0x1621dc);if(!isProduction(_0x323ff2)&&!isDaily(_0x323ff2))throw CliErrors['validation'](_0x41ab73(0xd4),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x40cb92===_0x41ab73(0xae)){const _0x164d7b=_0x5d0f90[_0x41ab73(0xa7)]&&typeof _0x5d0f90[_0x41ab73(0xa7)]===_0x41ab73(0xb4)?Object[_0x41ab73(0xce)](_0x5d0f90[_0x41ab73(0xa7)]):[];if(_0x164d7b[_0x41ab73(0xc6)]>0x0)throw CliErrors[_0x41ab73(0xcc)](_0x41ab73(0xad),_0x41ab73(0xd3)+CLI_BIN_NAME+_0x41ab73(0xaa)+_0x323ff2+_0x41ab73(0xd2)+CLI_BIN_NAME+_0x41ab73(0xb3));const _0x2a3055=buildCanonicalProjectConfig({..._0x5d0f90},{'appCodes':[_0x323ff2],'env':typeof _0x5d0f90['env']===_0x41ab73(0xc7)?_0x5d0f90[_0x41ab73(0xd8)]:undefined});writeScopedConfig(_0x2a3055,_0x4ce0d1);const _0x1e4568=_0x4ce0d1===_0x41ab73(0xb6)?'Global':_0x41ab73(0xcb);return{'ok':!![],'message':'✓\x20'+_0x1e4568+_0x41ab73(0xc9)+_0x323ff2+_0x41ab73(0xb5)};}_0x5d0f90[_0x2788ed]=_0x323ff2,writeScopedConfig(_0x5d0f90,_0x4ce0d1);const _0x3d7337=_0x4ce0d1===_0x41ab73(0xb6)?'Global':_0x41ab73(0xcb);return{'ok':!![],'message':'✓\x20'+_0x3d7337+'\x20'+_0x2788ed+_0x41ab73(0xb7)+_0x323ff2};}export const configSetDefinition={'service':a56_0x3f2f2a(0xb1),'command':a56_0x3f2f2a(0xb9),'description':a56_0x3f2f2a(0xd7),'risk':a56_0x3f2f2a(0xc5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x3f2f2a(0xb2),'type':a56_0x3f2f2a(0xc7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0x3f2f2a(0xc3),'type':a56_0x3f2f2a(0xc7),'description':'Config\x20value','required':!![]},{'name':a56_0x3f2f2a(0xb6),'type':a56_0x3f2f2a(0xdb),'description':a56_0x3f2f2a(0xc8),'default':![]}],'execute':execute};
1
+ const a56_0x4ce4c5=a56_0x2859;(function(_0x5cdb42,_0x3ec57c){const _0x4389d9=a56_0x2859,_0x67b8c3=_0x5cdb42();while(!![]){try{const _0x4fc2ef=-parseInt(_0x4389d9(0x117))/0x1*(parseInt(_0x4389d9(0x112))/0x2)+-parseInt(_0x4389d9(0xf8))/0x3*(-parseInt(_0x4389d9(0xeb))/0x4)+-parseInt(_0x4389d9(0xe5))/0x5*(-parseInt(_0x4389d9(0xf7))/0x6)+parseInt(_0x4389d9(0x10a))/0x7+-parseInt(_0x4389d9(0xfd))/0x8+-parseInt(_0x4389d9(0xf3))/0x9+parseInt(_0x4389d9(0x111))/0xa*(parseInt(_0x4389d9(0x107))/0xb);if(_0x4fc2ef===_0x3ec57c)break;else _0x67b8c3['push'](_0x67b8c3['shift']());}catch(_0x474b66){_0x67b8c3['push'](_0x67b8c3['shift']());}}}(a56_0x411b,0x6db5a));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 a56_0x411b(){const _0x1b6708=['958104xrFmAV','env','write','\x20set\x20to:\x20','5095422yckQNl','3jpfEmM','Invalid\x20locale\x20value.','str','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','app','6158040fDFSsX','string','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Missing\x20key.','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Config\x20value','apps','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Missing\x20value.','length','38401qVDUbW','riskLevel','validation','4225669LNGdrR','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Global','Project','\x22\x20is\x20not\x20settable.','join','\x20appcode\x20set\x20to:\x20','530sGkjlb','612642BbFuvK','bool','global','boolean','appcode','2TQTOMV','5VWbFvI','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Usage:\x20','Top-level\x20key\x20\x22','Use\x20`','1201184BrxQSN','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x22.\x20Allowed:\x20','includes','key','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','object'];a56_0x411b=function(){return _0x1b6708;};return a56_0x411b();}function a56_0x2859(_0x4b1ee0,_0x5ae3c3){_0x4b1ee0=_0x4b1ee0-0xe5;const _0x411b54=a56_0x411b();let _0x28598b=_0x411b54[_0x4b1ee0];return _0x28598b;}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x59a624){const _0x53076b=a56_0x2859,_0x457c6a=_0x59a624['str'](_0x53076b(0xef)),_0x5039e7=_0x59a624[_0x53076b(0xfa)]('value');if(!_0x457c6a)throw CliErrors[_0x53076b(0x109)](_0x53076b(0x100),_0x53076b(0xe8)+CLI_BIN_NAME+_0x53076b(0xf1));if(_0x5039e7===undefined||_0x5039e7==='')throw CliErrors['validation'](_0x53076b(0x105),_0x53076b(0xe8)+CLI_BIN_NAME+_0x53076b(0xf1));let _0x238929=_0x457c6a,_0x222600=_0x5039e7;if(_0x5039e7[_0x53076b(0x106)]>0x1f4)throw CliErrors[_0x53076b(0x109)](_0x53076b(0xe6));if(_0x457c6a===_0x53076b(0x108))throw CliErrors[_0x53076b(0x109)](_0x53076b(0xec));if(!isTopLevelConfigKey(_0x457c6a))throw CliErrors[_0x53076b(0x109)](_0x53076b(0xe9)+_0x457c6a+_0x53076b(0x10e),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x457c6a]&&!CONFIG_ENUM_VALUES[_0x457c6a][_0x53076b(0xee)](_0x5039e7))throw CliErrors[_0x53076b(0x109)]('Invalid\x20value\x20for\x20\x22'+_0x457c6a+_0x53076b(0xed)+CONFIG_ENUM_VALUES[_0x457c6a][_0x53076b(0x10f)](',\x20'));if(_0x457c6a==='locale'&&!normalizeLocale(_0x5039e7))throw CliErrors[_0x53076b(0x109)](_0x53076b(0xf9),_0x53076b(0xfb));DOMAIN_CONFIG_FIELDS[_0x53076b(0xee)](_0x457c6a)&&(_0x222600=normalizeDomainOrigin(_0x457c6a,_0x5039e7));const _0x11da87={'global':_0x59a624[_0x53076b(0x113)](_0x53076b(0x114))},_0x59d0b0=resolveWriteScope(_0x11da87),_0xbc4479=readScopedConfig(_0x59d0b0);_0x457c6a===_0x53076b(0xfc)&&(_0x238929=_0x53076b(0x116),delete _0xbc4479[_0x53076b(0xfc)]);_0x457c6a==='locale'&&(_0x222600=normalizeLocale(_0x5039e7));if(_0x457c6a===_0x53076b(0xf4)){_0x222600=normalizeEnv(_0x5039e7);if(!isProduction(_0x222600)&&!isDaily(_0x222600))throw CliErrors[_0x53076b(0x109)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x53076b(0x104));}if(_0x457c6a===_0x53076b(0x116)){const _0xe3df71=_0xbc4479[_0x53076b(0x103)]&&typeof _0xbc4479[_0x53076b(0x103)]===_0x53076b(0xf2)?Object['keys'](_0xbc4479[_0x53076b(0x103)]):[];if(_0xe3df71[_0x53076b(0x106)]>0x0)throw CliErrors['validation'](_0x53076b(0xff),_0x53076b(0xea)+CLI_BIN_NAME+_0x53076b(0xf0)+_0x222600+'`,\x20`'+CLI_BIN_NAME+_0x53076b(0x10b));const _0x25a521=buildCanonicalProjectConfig({..._0xbc4479},{'appCodes':[_0x222600],'env':typeof _0xbc4479[_0x53076b(0xf4)]===_0x53076b(0xfe)?_0xbc4479[_0x53076b(0xf4)]:undefined});writeScopedConfig(_0x25a521,_0x59d0b0);const _0x5e866e=_0x59d0b0==='global'?_0x53076b(0x10c):_0x53076b(0x10d);return{'ok':!![],'message':'✓\x20'+_0x5e866e+_0x53076b(0x110)+_0x222600+_0x53076b(0x101)};}_0xbc4479[_0x238929]=_0x222600,writeScopedConfig(_0xbc4479,_0x59d0b0);const _0x55cdda=_0x59d0b0===_0x53076b(0x114)?_0x53076b(0x10c):_0x53076b(0x10d);return{'ok':!![],'message':'✓\x20'+_0x55cdda+'\x20'+_0x238929+_0x53076b(0xf6)+_0x222600};}export const configSetDefinition={'service':'config','command':'set','description':'Set\x20a\x20config\x20value','risk':a56_0x4ce4c5(0xf5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x4ce4c5(0xef),'type':a56_0x4ce4c5(0xfe),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a56_0x4ce4c5(0xfe),'description':a56_0x4ce4c5(0x102),'required':!![]},{'name':a56_0x4ce4c5(0x114),'type':a56_0x4ce4c5(0x115),'description':a56_0x4ce4c5(0xe7),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x459676,_0x374f56){var _0x47a843=a57_0xabe0,_0x588f61=_0x459676();while(!![]){try{var _0x423005=-parseInt(_0x47a843(0x7c))/0x1*(-parseInt(_0x47a843(0x76))/0x2)+parseInt(_0x47a843(0x77))/0x3*(parseInt(_0x47a843(0x6f))/0x4)+parseInt(_0x47a843(0x74))/0x5*(parseInt(_0x47a843(0x78))/0x6)+parseInt(_0x47a843(0x6e))/0x7+-parseInt(_0x47a843(0x6c))/0x8*(-parseInt(_0x47a843(0x73))/0x9)+-parseInt(_0x47a843(0x7b))/0xa*(-parseInt(_0x47a843(0x72))/0xb)+-parseInt(_0x47a843(0x6d))/0xc;if(_0x423005===_0x374f56)break;else _0x588f61['push'](_0x588f61['shift']());}catch(_0x24ec9b){_0x588f61['push'](_0x588f61['shift']());}}}(a57_0x52bc,0x3e55a));function a57_0xabe0(_0x420d9a,_0xe12cf3){_0x420d9a=_0x420d9a-0x6c;var _0x52bcbe=a57_0x52bc();var _0xabe0ef=_0x52bcbe[_0x420d9a];return _0xabe0ef;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x394799){var _0x1025bb=a57_0xabe0;if(_0x394799[_0x1025bb(0x71)])return _0x1025bb(0x71);if(!isInProject())throw CliErrors[_0x1025bb(0x7a)](_0x1025bb(0x70),_0x1025bb(0x79)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x1025bb(0x75);}function a57_0x52bc(){var _0x5aa592=['1LIniIm','8tQgPEX','14434068cSIzCI','1771455xMtpzN','356PoWsgy','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','global','1871452BPvVXe','1310058MhscCc','5FoMZwM','project','156676VMQHnb','5331logPQL','2896674wQCbpV','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','validation','20CMLaqK'];a57_0x52bc=function(){return _0x5aa592;};return a57_0x52bc();}export function readScopedConfig(_0x34ad00){return readConfigFile(resolveWriteConfigPath(_0x34ad00));}export function writeScopedConfig(_0x3f3ae6,_0x13c463){writeConfigFile(resolveWriteConfigPath(_0x13c463),_0x3f3ae6);}
1
+ (function(_0x15bc77,_0x75d653){var _0x2348a4=a57_0x4c81,_0x4236d4=_0x15bc77();while(!![]){try{var _0x224502=-parseInt(_0x2348a4(0x7e))/0x1*(parseInt(_0x2348a4(0x7b))/0x2)+-parseInt(_0x2348a4(0x79))/0x3+parseInt(_0x2348a4(0x76))/0x4+parseInt(_0x2348a4(0x73))/0x5+-parseInt(_0x2348a4(0x72))/0x6*(-parseInt(_0x2348a4(0x7f))/0x7)+-parseInt(_0x2348a4(0x7a))/0x8+parseInt(_0x2348a4(0x7d))/0x9;if(_0x224502===_0x75d653)break;else _0x4236d4['push'](_0x4236d4['shift']());}catch(_0x31858d){_0x4236d4['push'](_0x4236d4['shift']());}}}(a57_0x2e5f,0xf240a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a57_0x2e5f(){var _0x155f66=['642265qiBjpW','global','project','505272ebKfHo','validation','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','1278126pjbLOm','9923624XOvIIz','14OPDoTm','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','36342261AuaAHC','261743mSABfv','2289hUMjqQ','3636urIwOm'];a57_0x2e5f=function(){return _0x155f66;};return a57_0x2e5f();}import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a57_0x4c81(_0x25840e,_0x5d8633){_0x25840e=_0x25840e-0x72;var _0x2e5fd8=a57_0x2e5f();var _0x4c8122=_0x2e5fd8[_0x25840e];return _0x4c8122;}export function resolveWriteScope(_0x3bee9b){var _0x371656=a57_0x4c81;if(_0x3bee9b[_0x371656(0x74)])return _0x371656(0x74);if(!isInProject())throw CliErrors[_0x371656(0x77)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x371656(0x7c)+CLI_BIN_NAME+_0x371656(0x78));return _0x371656(0x75);}export function readScopedConfig(_0x8aff63){return readConfigFile(resolveWriteConfigPath(_0x8aff63));}export function writeScopedConfig(_0x48091d,_0x9bad59){writeConfigFile(resolveWriteConfigPath(_0x9bad59),_0x48091d);}
@@ -1 +1 @@
1
- const a58_0x5f0563=a58_0x1869;(function(_0x549d34,_0x27fb6a){const _0x2704c0=a58_0x1869,_0x42fe5a=_0x549d34();while(!![]){try{const _0x3c16d2=-parseInt(_0x2704c0(0x90))/0x1*(-parseInt(_0x2704c0(0x88))/0x2)+-parseInt(_0x2704c0(0xb2))/0x3*(-parseInt(_0x2704c0(0x9b))/0x4)+parseInt(_0x2704c0(0x8f))/0x5*(-parseInt(_0x2704c0(0x89))/0x6)+parseInt(_0x2704c0(0xa4))/0x7*(parseInt(_0x2704c0(0x8c))/0x8)+-parseInt(_0x2704c0(0xac))/0x9+-parseInt(_0x2704c0(0x96))/0xa+parseInt(_0x2704c0(0xb0))/0xb;if(_0x3c16d2===_0x27fb6a)break;else _0x42fe5a['push'](_0x42fe5a['shift']());}catch(_0xcba2d3){_0x42fe5a['push'](_0x42fe5a['shift']());}}}(a58_0x46a4,0x89fc6));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x5f0563(0x82),METADATA_BACKEND_PATH=a58_0x5f0563(0x7e),UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x50219a,input:_0x2aa422,dryRun:_0x5b3760}){const _0x4ba0c3=a58_0x5f0563;validateInput(_0x2aa422);const _0x237545=normalizeBusinessGroupArgument(_0x2aa422[_0x4ba0c3(0xae)]),_0x3ae3db=await getDatasetDetail(_0x2aa422['code']),_0x3fb986=resolveBusinessGroupDataset(_0x3ae3db,_0x2aa422['code']);assertBusinessGroupUpdateSupported(_0x3fb986,_0x237545);const _0x3d6bcc=loadCurrentBusinessGroup(_0x3ae3db,_0x3fb986);assertExpectedBusinessGroup(_0x3d6bcc,_0x2aa422['expectBusinessGroup']);const _0x2197a9=buildBackendPlan(_0x50219a,_0x3fb986,_0x237545),_0x456479=_0x3d6bcc!==_0x237545;let _0x19d5e4;if(_0x456479&&!_0x5b3760){_0x2197a9['kind']==='db-table'?await updateDbTableBusinessGroup(_0x2197a9[_0x4ba0c3(0x87)]):await updateErBusinessGroup(_0x2197a9[_0x4ba0c3(0x87)]);const _0x18b688=await getDatasetDetail(_0x3fb986[_0x4ba0c3(0x85)]),_0x486bfc=resolveBusinessGroupDataset(_0x18b688,_0x3fb986[_0x4ba0c3(0x85)]),_0x4ba39b=loadCurrentBusinessGroup(_0x18b688,_0x486bfc);if(_0x4ba39b!==_0x237545)throw CliErrors[_0x4ba0c3(0xb7)]('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x4ba0c3(0xb3)+JSON[_0x4ba0c3(0xab)](displayBusinessGroup(_0x237545))+',\x20actual\x20'+JSON[_0x4ba0c3(0xab)](displayBusinessGroup(_0x4ba39b))+'.');_0x19d5e4={'verified':!![],'status':_0x4ba0c3(0xb8),'afterReadback':{'businessGroup':displayBusinessGroup(_0x4ba39b)}};}else!_0x456479&&(_0x19d5e4={'verified':!![],'status':_0x4ba0c3(0x71),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3d6bcc)}});const _0x2e665e={'operation':_0x4ba0c3(0xa6),'appCode':_0x50219a,'selector':{'code':_0x3fb986['code']},'dataset':{'id':_0x3fb986['id'],'code':_0x3fb986[_0x4ba0c3(0x85)],'name':_0x3fb986[_0x4ba0c3(0xb9)],'sourceType':_0x3fb986['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x3d6bcc)},'after':{'businessGroup':displayBusinessGroup(_0x237545)},'changed':_0x456479,'dryRun':_0x5b3760,'submitted':_0x456479&&!_0x5b3760,'backend':{'method':_0x2197a9['method'],'path':_0x2197a9[_0x4ba0c3(0x9c)],'payload':_0x2197a9[_0x4ba0c3(0x87)]},..._0x19d5e4?{'verification':_0x19d5e4}:{},'warnings':[]};return{'ok':!![],'data':_0x2e665e,'message':_0x456479?_0x5b3760?_0x4ba0c3(0xb6)+_0x3fb986[_0x4ba0c3(0x85)]:_0x4ba0c3(0x72)+_0x3fb986[_0x4ba0c3(0x85)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x3fb986['code']};}export const datasetBusinessGroupUpdate={'service':a58_0x5f0563(0x70),'command':a58_0x5f0563(0x84),'description':a58_0x5f0563(0x7a),'risk':'write','flags':[CODE_FLAG,{'name':a58_0x5f0563(0x7b),'type':a58_0x5f0563(0x9f),'required':!![],'description':a58_0x5f0563(0x7d)},{'name':'expect-business-group','type':a58_0x5f0563(0x9f),'required':![],'description':a58_0x5f0563(0xa5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1574d6){validateInput(readBusinessGroupUpdateInput(_0x1574d6));},async 'dryRun'(_0x4b150f){const _0x1efcb2=a58_0x5f0563,_0x114471=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4b150f[_0x1efcb2(0x73)],'input':readBusinessGroupUpdateInput(_0x4b150f),'dryRun':!![]});return{'method':_0x114471['data'][_0x1efcb2(0x81)][_0x1efcb2(0x9a)],'url':_0x114471[_0x1efcb2(0x92)][_0x1efcb2(0x81)][_0x1efcb2(0x9c)],'body':_0x114471[_0x1efcb2(0x92)]['backend'][_0x1efcb2(0x87)],'description':_0x114471[_0x1efcb2(0xa7)],..._0x114471[_0x1efcb2(0x92)]};},async 'execute'(_0x38e112){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x38e112['appCode'],'input':readBusinessGroupUpdateInput(_0x38e112),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1a9a35){const _0x514a1e=a58_0x5f0563,_0x566918=_0x1a9a35[_0x514a1e(0x75)](_0x514a1e(0x98));return{'code':trim(_0x1a9a35[_0x514a1e(0x75)](_0x514a1e(0x85))),'businessGroup':_0x1a9a35[_0x514a1e(0x75)](_0x514a1e(0x7b)),'expectBusinessGroup':_0x566918===undefined||_0x566918===''?undefined:_0x566918};}function validateInput(_0x345bed){const _0x3ddd7a=a58_0x5f0563;if(!trim(_0x345bed[_0x3ddd7a(0x85)]))throw CliErrors['validation'](_0x3ddd7a(0x8e));if(_0x345bed[_0x3ddd7a(0xae)]===undefined)throw CliErrors[_0x3ddd7a(0x8b)]('--business-group\x20is\x20required');if(!trim(_0x345bed[_0x3ddd7a(0xae)]))throw CliErrors[_0x3ddd7a(0x8b)](_0x3ddd7a(0x86));}function assertBusinessGroupUpdateSupported(_0x2545c1,_0x23939d){const _0x869a6=a58_0x5f0563;if(_0x2545c1[_0x869a6(0xb4)]===_0x869a6(0x83)&&!_0x23939d)throw CliErrors['validation'](_0x869a6(0xa8));}function resolveBusinessGroupDataset(_0x19df03,_0xf77afd){const _0x24698d=a58_0x5f0563,_0x196c6c=asPlainObject(_0x19df03[_0x24698d(0x70)]),_0x5c9d32=asPlainObject(_0x19df03[_0x24698d(0x77)]),_0x4f4edd=resolveSourceType(_0x19df03,_0x196c6c,_0x5c9d32),_0x467023=firstString(_0x19df03['modelCode'],_0x19df03[_0x24698d(0x85)],_0x196c6c[_0x24698d(0x78)],_0xf77afd)||_0xf77afd;return{'id':firstNumber(_0x19df03['modelId'],_0x19df03['id'],_0x196c6c[_0x24698d(0x8a)])??firstString(_0x19df03[_0x24698d(0x6f)],_0x19df03['id'],_0x196c6c[_0x24698d(0x8a)])??null,'code':_0x467023,'name':firstString(_0x19df03[_0x24698d(0xb9)],_0x196c6c['datasetName'],_0x196c6c[_0x24698d(0xb9)])||null,'sourceType':_0x4f4edd,'dbTableSelector':_0x4f4edd==='DB_TABLE'?{'dbLinkId':firstNumber(_0x5c9d32[_0x24698d(0xad)]),'tableName':firstString(_0x5c9d32[_0x24698d(0x93)])||null}:null};}function resolveSourceType(_0x16aa25,_0x2fd045,_0xf53cb0){const _0x539eda=a58_0x5f0563,_0x27b1a3=firstString(_0x16aa25[_0x539eda(0x9d)],_0x16aa25['sourceType'],_0x2fd045[_0x539eda(0x9d)],_0x2fd045['sourceType'])?.['trim']()[_0x539eda(0x80)]();if(_0x27b1a3==='DB_TABLE'||_0x27b1a3===_0x539eda(0x7c))return _0x27b1a3;if(Object[_0x539eda(0x99)](_0xf53cb0)[_0x539eda(0xaf)]>0x0)return _0x539eda(0x83);throw CliErrors[_0x539eda(0x8b)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x11bad4,_0x31a978){const _0x5af8de=a58_0x5f0563,_0x5eb1de=readBusinessGroupFromDatasetDetail(_0x11bad4,_0x31a978['sourceType']);if(_0x5eb1de[_0x5af8de(0xb1)])return normalizeBusinessGroup(_0x5eb1de[_0x5af8de(0x8d)]);return'';}function readBusinessGroupFromDatasetDetail(_0x2a6c9e,_0x5c1db1){const _0x2eb0c2=a58_0x5f0563,_0x36e8a4=asPlainObject(_0x2a6c9e[_0x2eb0c2(0x70)]),_0x3bbb1c=firstPresent(_0x2a6c9e[_0x2eb0c2(0xae)]);if(_0x3bbb1c[_0x2eb0c2(0xb1)])return _0x3bbb1c;const _0x2455bc=firstPresent(_0x36e8a4['businessGroup']);if(_0x2455bc[_0x2eb0c2(0xb1)])return _0x2455bc;if(_0x5c1db1===_0x2eb0c2(0x83))return{'found':![]};const _0x5a115d=readBusinessGroupFromExtend(_0x2a6c9e[_0x2eb0c2(0x95)]);if(_0x5a115d[_0x2eb0c2(0xb1)])return _0x5a115d;return readBusinessGroupFromExtend(_0x36e8a4['extend']);}function readBusinessGroupFromExtend(_0x19dd14){const _0x4b4d3e=a58_0x5f0563;if(_0x19dd14===undefined||_0x19dd14===null||_0x19dd14==='')return{'found':![]};if(typeof _0x19dd14===_0x4b4d3e(0x9f))try{const _0x32f42=JSON[_0x4b4d3e(0x76)](_0x19dd14);return readBusinessGroupFromExtend(_0x32f42);}catch{return{'found':![]};}const _0x350da7=asPlainObject(_0x19dd14);if(Object[_0x4b4d3e(0xa0)][_0x4b4d3e(0xa3)]['call'](_0x350da7,_0x4b4d3e(0xae)))return{'found':!![],'value':_0x350da7[_0x4b4d3e(0xae)]};return{'found':![]};}function firstPresent(..._0x503820){for(const _0x42f610 of _0x503820){if(_0x42f610!==undefined&&_0x42f610!==null)return{'found':!![],'value':_0x42f610};}return{'found':![]};}function assertExpectedBusinessGroup(_0x3029f9,_0x5cfb42){const _0x17a05a=a58_0x5f0563;if(_0x5cfb42===undefined)return;const _0x52145e=normalizeBusinessGroupArgument(_0x5cfb42);if(_0x3029f9!==_0x52145e)throw CliErrors[_0x17a05a(0x8b)](_0x17a05a(0xaa),_0x17a05a(0xb3)+JSON['stringify'](_0x52145e)+',\x20actual\x20'+JSON[_0x17a05a(0xab)](_0x3029f9));}function buildBackendPlan(_0x3fe323,_0x2595fb,_0x13832d){const _0x450639=a58_0x5f0563;if(_0x2595fb[_0x450639(0xb4)]===_0x450639(0x83)){if(!_0x2595fb[_0x450639(0xa2)]||_0x2595fb[_0x450639(0xa2)]['dbLinkId']===null||!_0x2595fb[_0x450639(0xa2)][_0x450639(0x93)])throw CliErrors[_0x450639(0x8b)](_0x450639(0x91),_0x450639(0x79));return{'kind':'db-table','method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x2595fb['dbTableSelector'][_0x450639(0x7f)],'tableName':_0x2595fb[_0x450639(0xa2)][_0x450639(0x93)],'businessGroup':_0x13832d}};}return{'kind':_0x450639(0x74),'method':_0x450639(0xa1),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x3fe323,'datasetCode':_0x2595fb[_0x450639(0x85)],'businessGroup':_0x13832d}};}function normalizeBusinessGroup(_0x2b7f50){const _0x8153bd=a58_0x5f0563;if(_0x2b7f50===undefined||_0x2b7f50===null)return'';return String(_0x2b7f50)[_0x8153bd(0x94)]();}function a58_0x46a4(){const _0xa76dd2=['str','parse','dbtableConfig','datasetCode','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','Update\x20business\x20scenario\x20group','business-group','METADATA','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','/smartapi/question/er-config/business-group/edit','dbLinkId','toUpperCase','backend','/smartapi/dblink/updateTableBusinessGroup','DB_TABLE','business-group-update','code','--business-group\x20must\x20not\x20be\x20blank','payload','762XltThg','898278EvhEFs','datasetId','validation','40MLoBRz','value','--code\x20is\x20required','25IQrgKP','2941dwRvlX','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','data','tableName','trim','extend','3645930QXjQav','object','expect-business-group','keys','method','123748XlUOuN','path','source','isArray','string','prototype','POST','dbTableSelector','hasOwnProperty','137277cklbII','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','update','message','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','isFinite','Expectation\x20mismatch\x20at\x20businessGroup','stringify','9694890nvltXV','dbId','businessGroup','length','11121583EXgGSv','found','51heFQRQ','Expected\x20','sourceType','number','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','apiError','matched','name','modelId','dataset','unchanged','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','appCode','metadata'];a58_0x46a4=function(){return _0xa76dd2;};return a58_0x46a4();}function normalizeBusinessGroupArgument(_0x9e457c){const _0x1360f5=normalizeBusinessGroup(_0x9e457c);return _0x1360f5===UNGROUPED_BUSINESS_GROUP?'':_0x1360f5;}function displayBusinessGroup(_0x48becc){return _0x48becc||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x48e242){const _0x4b5f0d=a58_0x5f0563;if(!_0x48e242||typeof _0x48e242!==_0x4b5f0d(0x97)||Array[_0x4b5f0d(0x9e)](_0x48e242))return{};return _0x48e242;}function firstString(..._0x4f311f){const _0x210eb3=a58_0x5f0563;for(const _0x375c8a of _0x4f311f){if(typeof _0x375c8a===_0x210eb3(0x9f)&&_0x375c8a[_0x210eb3(0x94)]())return _0x375c8a['trim']();if(typeof _0x375c8a==='number'&&Number[_0x210eb3(0xa9)](_0x375c8a))return String(_0x375c8a);}return undefined;}function a58_0x1869(_0x5adb83,_0x394248){_0x5adb83=_0x5adb83-0x6f;const _0x46a4c7=a58_0x46a4();let _0x1869b8=_0x46a4c7[_0x5adb83];return _0x1869b8;}function firstNumber(..._0x20403b){const _0x3ee363=a58_0x5f0563;for(const _0x25b8bd of _0x20403b){if(typeof _0x25b8bd===_0x3ee363(0xb5)&&Number[_0x3ee363(0xa9)](_0x25b8bd))return _0x25b8bd;if(typeof _0x25b8bd==='string'&&_0x25b8bd['trim']()&&Number[_0x3ee363(0xa9)](Number(_0x25b8bd)))return Number(_0x25b8bd);}return null;}function trim(_0x50933d){return String(_0x50933d||'')['trim']();}
1
+ function a58_0x34cc(){const _0x51a6fc=['--business-group\x20is\x20required','dbTableSelector','kind','toUpperCase','1006831MMbWsw','trim','message','businessGroup','modelCode','dbLinkId','isArray','195465afjHBm','sourceType','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','data','1596726rvuePs','hasOwnProperty','522999BNUGMu','32VXlUAt','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','value','isFinite','--code\x20is\x20required','expect-business-group','method',',\x20actual\x20','code','str','Expectation\x20mismatch\x20at\x20businessGroup','datasetName','name','POST','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','Update\x20business\x20scenario\x20group','business-group-update','dbtableConfig','apiError','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','string','datasetCode','2512741ArlBkc','60ZQsbWb','found','expectBusinessGroup','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','unchanged','object','--business-group\x20must\x20not\x20be\x20blank','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','tableName','prototype','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','89978WfDrdI','business-group','/smartapi/dblink/updateTableBusinessGroup','parse','10hkrSOY','modelId','length','DB_TABLE','backend','274074RvBkop','dataset','extend','stringify','number','payload','dbId','validation','call','write','keys','db-table','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','datasetId','3RPkOvE','METADATA','update','ungrouped'];a58_0x34cc=function(){return _0x51a6fc;};return a58_0x34cc();}const a58_0x42c080=a58_0x3971;(function(_0x56774e,_0xdbff4e){const _0x208e04=a58_0x3971,_0xd765e0=_0x56774e();while(!![]){try{const _0x24f5a1=parseInt(_0x208e04(0x166))/0x1+parseInt(_0x208e04(0x15d))/0x2*(parseInt(_0x208e04(0x125))/0x3)+-parseInt(_0x208e04(0x152))/0x4*(-parseInt(_0x208e04(0x134))/0x5)+-parseInt(_0x208e04(0x138))/0x6+-parseInt(_0x208e04(0x12d))/0x7*(parseInt(_0x208e04(0x13b))/0x8)+parseInt(_0x208e04(0x13a))/0x9*(parseInt(_0x208e04(0x161))/0xa)+parseInt(_0x208e04(0x151))/0xb;if(_0x24f5a1===_0xdbff4e)break;else _0xd765e0['push'](_0xd765e0['shift']());}catch(_0xfc00a){_0xd765e0['push'](_0xd765e0['shift']());}}}(a58_0x34cc,0x55953));function a58_0x3971(_0x1610b8,_0x48aa90){_0x1610b8=_0x1610b8-0x125;const _0x34ccc4=a58_0x34cc();let _0x397188=_0x34ccc4[_0x1610b8];return _0x397188;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x42c080(0x15f),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a58_0x42c080(0x128);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3886af,input:_0x19f909,dryRun:_0x11d404}){const _0x1b6220=a58_0x42c080;validateInput(_0x19f909);const _0x254e68=normalizeBusinessGroupArgument(_0x19f909[_0x1b6220(0x130)]),_0x1ba527=await getDatasetDetail(_0x19f909[_0x1b6220(0x143)]),_0x25ea65=resolveBusinessGroupDataset(_0x1ba527,_0x19f909['code']);assertBusinessGroupUpdateSupported(_0x25ea65,_0x254e68);const _0x368b10=loadCurrentBusinessGroup(_0x1ba527,_0x25ea65);assertExpectedBusinessGroup(_0x368b10,_0x19f909[_0x1b6220(0x154)]);const _0x4c8676=buildBackendPlan(_0x3886af,_0x25ea65,_0x254e68),_0x3f455f=_0x368b10!==_0x254e68;let _0x56d1e9;if(_0x3f455f&&!_0x11d404){_0x4c8676[_0x1b6220(0x12b)]===_0x1b6220(0x171)?await updateDbTableBusinessGroup(_0x4c8676[_0x1b6220(0x16b)]):await updateErBusinessGroup(_0x4c8676[_0x1b6220(0x16b)]);const _0x492e4b=await getDatasetDetail(_0x25ea65[_0x1b6220(0x143)]),_0x515789=resolveBusinessGroupDataset(_0x492e4b,_0x25ea65[_0x1b6220(0x143)]),_0x28f8a3=loadCurrentBusinessGroup(_0x492e4b,_0x515789);if(_0x28f8a3!==_0x254e68)throw CliErrors[_0x1b6220(0x14d)](_0x1b6220(0x155),'Expected\x20'+JSON[_0x1b6220(0x169)](displayBusinessGroup(_0x254e68))+_0x1b6220(0x142)+JSON[_0x1b6220(0x169)](displayBusinessGroup(_0x28f8a3))+'.');_0x56d1e9={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x28f8a3)}};}else!_0x3f455f&&(_0x56d1e9={'verified':!![],'status':_0x1b6220(0x156),'afterReadback':{'businessGroup':displayBusinessGroup(_0x368b10)}});const _0x5bf773={'operation':_0x1b6220(0x127),'appCode':_0x3886af,'selector':{'code':_0x25ea65[_0x1b6220(0x143)]},'dataset':{'id':_0x25ea65['id'],'code':_0x25ea65['code'],'name':_0x25ea65[_0x1b6220(0x147)],'sourceType':_0x25ea65[_0x1b6220(0x135)]},'before':{'businessGroup':displayBusinessGroup(_0x368b10)},'after':{'businessGroup':displayBusinessGroup(_0x254e68)},'changed':_0x3f455f,'dryRun':_0x11d404,'submitted':_0x3f455f&&!_0x11d404,'backend':{'method':_0x4c8676[_0x1b6220(0x141)],'path':_0x4c8676['path'],'payload':_0x4c8676['payload']},..._0x56d1e9?{'verification':_0x56d1e9}:{},'warnings':[]};return{'ok':!![],'data':_0x5bf773,'message':_0x3f455f?_0x11d404?_0x1b6220(0x136)+_0x25ea65[_0x1b6220(0x143)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x25ea65[_0x1b6220(0x143)]:_0x1b6220(0x159)+_0x25ea65[_0x1b6220(0x143)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a58_0x42c080(0x14b),'description':a58_0x42c080(0x14a),'risk':a58_0x42c080(0x16f),'flags':[CODE_FLAG,{'name':a58_0x42c080(0x15e),'type':a58_0x42c080(0x14f),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':'expect-business-group','type':a58_0x42c080(0x14f),'required':![],'description':a58_0x42c080(0x149)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c822b){validateInput(readBusinessGroupUpdateInput(_0x4c822b));},async 'dryRun'(_0x24b5bd){const _0x2c6d89=a58_0x42c080,_0x4448c1=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x24b5bd['appCode'],'input':readBusinessGroupUpdateInput(_0x24b5bd),'dryRun':!![]});return{'method':_0x4448c1['data'][_0x2c6d89(0x165)][_0x2c6d89(0x141)],'url':_0x4448c1['data'][_0x2c6d89(0x165)]['path'],'body':_0x4448c1['data'][_0x2c6d89(0x165)]['payload'],'description':_0x4448c1[_0x2c6d89(0x12f)],..._0x4448c1[_0x2c6d89(0x137)]};},async 'execute'(_0x31b039){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x31b039['appCode'],'input':readBusinessGroupUpdateInput(_0x31b039),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x3f09a0){const _0x5926f8=a58_0x42c080,_0x516117=_0x3f09a0['str'](_0x5926f8(0x140));return{'code':trim(_0x3f09a0[_0x5926f8(0x144)]('code')),'businessGroup':_0x3f09a0[_0x5926f8(0x144)](_0x5926f8(0x15e)),'expectBusinessGroup':_0x516117===undefined||_0x516117===''?undefined:_0x516117};}function validateInput(_0x1c74d5){const _0x1249da=a58_0x42c080;if(!trim(_0x1c74d5['code']))throw CliErrors[_0x1249da(0x16d)](_0x1249da(0x13f));if(_0x1c74d5[_0x1249da(0x130)]===undefined)throw CliErrors['validation'](_0x1249da(0x129));if(!trim(_0x1c74d5[_0x1249da(0x130)]))throw CliErrors[_0x1249da(0x16d)](_0x1249da(0x158));}function assertBusinessGroupUpdateSupported(_0x38251b,_0x196278){const _0x3157e6=a58_0x42c080;if(_0x38251b['sourceType']===_0x3157e6(0x164)&&!_0x196278)throw CliErrors[_0x3157e6(0x16d)](_0x3157e6(0x13c));}function resolveBusinessGroupDataset(_0xef22e9,_0x13ff53){const _0x16e499=a58_0x42c080,_0x40366d=asPlainObject(_0xef22e9[_0x16e499(0x167)]),_0x10c782=asPlainObject(_0xef22e9[_0x16e499(0x14c)]),_0x109fb5=resolveSourceType(_0xef22e9,_0x40366d,_0x10c782),_0x5b30ef=firstString(_0xef22e9[_0x16e499(0x131)],_0xef22e9['code'],_0x40366d[_0x16e499(0x150)],_0x13ff53)||_0x13ff53;return{'id':firstNumber(_0xef22e9['modelId'],_0xef22e9['id'],_0x40366d[_0x16e499(0x173)])??firstString(_0xef22e9[_0x16e499(0x162)],_0xef22e9['id'],_0x40366d['datasetId'])??null,'code':_0x5b30ef,'name':firstString(_0xef22e9[_0x16e499(0x147)],_0x40366d[_0x16e499(0x146)],_0x40366d[_0x16e499(0x147)])||null,'sourceType':_0x109fb5,'dbTableSelector':_0x109fb5===_0x16e499(0x164)?{'dbLinkId':firstNumber(_0x10c782[_0x16e499(0x16c)]),'tableName':firstString(_0x10c782[_0x16e499(0x15a)])||null}:null};}function resolveSourceType(_0x4a627d,_0x2e3923,_0x404e12){const _0x34df45=a58_0x42c080,_0x125178=firstString(_0x4a627d['source'],_0x4a627d[_0x34df45(0x135)],_0x2e3923['source'],_0x2e3923['sourceType'])?.[_0x34df45(0x12e)]()[_0x34df45(0x12c)]();if(_0x125178===_0x34df45(0x164)||_0x125178===_0x34df45(0x126))return _0x125178;if(Object[_0x34df45(0x170)](_0x404e12)[_0x34df45(0x163)]>0x0)return _0x34df45(0x164);throw CliErrors[_0x34df45(0x16d)](_0x34df45(0x14e));}function loadCurrentBusinessGroup(_0x430a56,_0x2eb8d2){const _0x953035=a58_0x42c080,_0xa7cbc9=readBusinessGroupFromDatasetDetail(_0x430a56,_0x2eb8d2[_0x953035(0x135)]);if(_0xa7cbc9[_0x953035(0x153)])return normalizeBusinessGroup(_0xa7cbc9[_0x953035(0x13d)]);return'';}function readBusinessGroupFromDatasetDetail(_0x3a3061,_0x9539dc){const _0x9ec9ea=a58_0x42c080,_0x963bc7=asPlainObject(_0x3a3061[_0x9ec9ea(0x167)]),_0x53d305=firstPresent(_0x3a3061['businessGroup']);if(_0x53d305['found'])return _0x53d305;const _0xb35d8a=firstPresent(_0x963bc7[_0x9ec9ea(0x130)]);if(_0xb35d8a[_0x9ec9ea(0x153)])return _0xb35d8a;if(_0x9539dc===_0x9ec9ea(0x164))return{'found':![]};const _0x5b85a6=readBusinessGroupFromExtend(_0x3a3061[_0x9ec9ea(0x168)]);if(_0x5b85a6['found'])return _0x5b85a6;return readBusinessGroupFromExtend(_0x963bc7[_0x9ec9ea(0x168)]);}function readBusinessGroupFromExtend(_0x620b89){const _0x328c20=a58_0x42c080;if(_0x620b89===undefined||_0x620b89===null||_0x620b89==='')return{'found':![]};if(typeof _0x620b89==='string')try{const _0x442dd5=JSON[_0x328c20(0x160)](_0x620b89);return readBusinessGroupFromExtend(_0x442dd5);}catch{return{'found':![]};}const _0x4e60e3=asPlainObject(_0x620b89);if(Object[_0x328c20(0x15b)][_0x328c20(0x139)][_0x328c20(0x16e)](_0x4e60e3,_0x328c20(0x130)))return{'found':!![],'value':_0x4e60e3[_0x328c20(0x130)]};return{'found':![]};}function firstPresent(..._0x51a11d){for(const _0x33b35a of _0x51a11d){if(_0x33b35a!==undefined&&_0x33b35a!==null)return{'found':!![],'value':_0x33b35a};}return{'found':![]};}function assertExpectedBusinessGroup(_0x67ea2a,_0xe24558){const _0xd6823a=a58_0x42c080;if(_0xe24558===undefined)return;const _0x71ed41=normalizeBusinessGroupArgument(_0xe24558);if(_0x67ea2a!==_0x71ed41)throw CliErrors[_0xd6823a(0x16d)](_0xd6823a(0x145),'Expected\x20'+JSON[_0xd6823a(0x169)](_0x71ed41)+_0xd6823a(0x142)+JSON[_0xd6823a(0x169)](_0x67ea2a));}function buildBackendPlan(_0x251b87,_0x903e4c,_0x25227c){const _0x15cb27=a58_0x42c080;if(_0x903e4c[_0x15cb27(0x135)]===_0x15cb27(0x164)){if(!_0x903e4c[_0x15cb27(0x12a)]||_0x903e4c[_0x15cb27(0x12a)][_0x15cb27(0x132)]===null||!_0x903e4c[_0x15cb27(0x12a)][_0x15cb27(0x15a)])throw CliErrors[_0x15cb27(0x16d)](_0x15cb27(0x172),_0x15cb27(0x15c));return{'kind':_0x15cb27(0x171),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x903e4c['dbTableSelector'][_0x15cb27(0x132)],'tableName':_0x903e4c[_0x15cb27(0x12a)][_0x15cb27(0x15a)],'businessGroup':_0x25227c}};}return{'kind':'metadata','method':_0x15cb27(0x148),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x251b87,'datasetCode':_0x903e4c[_0x15cb27(0x143)],'businessGroup':_0x25227c}};}function normalizeBusinessGroup(_0x22b39f){const _0x522fdd=a58_0x42c080;if(_0x22b39f===undefined||_0x22b39f===null)return'';return String(_0x22b39f)[_0x522fdd(0x12e)]();}function normalizeBusinessGroupArgument(_0x2aef49){const _0x342712=normalizeBusinessGroup(_0x2aef49);return _0x342712===UNGROUPED_BUSINESS_GROUP?'':_0x342712;}function displayBusinessGroup(_0x4cffee){return _0x4cffee||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x133933){const _0x17174f=a58_0x42c080;if(!_0x133933||typeof _0x133933!==_0x17174f(0x157)||Array[_0x17174f(0x133)](_0x133933))return{};return _0x133933;}function firstString(..._0x38d06c){const _0x42bb50=a58_0x42c080;for(const _0x5b2de8 of _0x38d06c){if(typeof _0x5b2de8==='string'&&_0x5b2de8['trim']())return _0x5b2de8[_0x42bb50(0x12e)]();if(typeof _0x5b2de8===_0x42bb50(0x16a)&&Number[_0x42bb50(0x13e)](_0x5b2de8))return String(_0x5b2de8);}return undefined;}function firstNumber(..._0x2489fe){const _0x109036=a58_0x42c080;for(const _0x2dd7b2 of _0x2489fe){if(typeof _0x2dd7b2===_0x109036(0x16a)&&Number[_0x109036(0x13e)](_0x2dd7b2))return _0x2dd7b2;if(typeof _0x2dd7b2===_0x109036(0x14f)&&_0x2dd7b2['trim']()&&Number[_0x109036(0x13e)](Number(_0x2dd7b2)))return Number(_0x2dd7b2);}return null;}function trim(_0x37641d){return String(_0x37641d||'')['trim']();}
@@ -1 +1 @@
1
- const a59_0x40e851=a59_0x5e54;(function(_0xd414f5,_0x5e2d54){const _0x436d16=a59_0x5e54,_0x392e6a=_0xd414f5();while(!![]){try{const _0x481493=parseInt(_0x436d16(0x155))/0x1*(parseInt(_0x436d16(0x166))/0x2)+-parseInt(_0x436d16(0x15a))/0x3*(parseInt(_0x436d16(0x167))/0x4)+-parseInt(_0x436d16(0x159))/0x5*(parseInt(_0x436d16(0x152))/0x6)+-parseInt(_0x436d16(0x161))/0x7*(-parseInt(_0x436d16(0x156))/0x8)+-parseInt(_0x436d16(0x157))/0x9+-parseInt(_0x436d16(0x15c))/0xa*(-parseInt(_0x436d16(0x15d))/0xb)+-parseInt(_0x436d16(0x15e))/0xc*(-parseInt(_0x436d16(0x164))/0xd);if(_0x481493===_0x5e2d54)break;else _0x392e6a['push'](_0x392e6a['shift']());}catch(_0x2fc381){_0x392e6a['push'](_0x392e6a['shift']());}}}(a59_0x27f3,0x57df4));function a59_0x5e54(_0x10303f,_0x12f8a4){_0x10303f=_0x10303f-0x152;const _0x27f338=a59_0x27f3();let _0x5e5477=_0x27f338[_0x10303f];return _0x5e5477;}function a59_0x27f3(){const _0x3453a0=['DB_TABLE','21bovKnl','map','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','131443grOcaC','number','6zxIhoJ','1865316UIGCzk','length','business-groups','num','appCode','dbid','23442nIoTCT','dataset','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','113543RXlBEY','27224oWgjDr','5572368WkuCfX','ungrouped','30dDaYsG','3tTpDZK','\x20business\x20group(s)\x20for\x20database\x20connection\x20','200gJutWd','64361YkJTTX','1188FkIlVh','businessGroup'];a59_0x27f3=function(){return _0x3453a0;};return a59_0x27f3();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a59_0x40e851(0x153),'command':a59_0x40e851(0x169),'description':a59_0x40e851(0x163),'risk':'read','flags':[{'name':a59_0x40e851(0x16c),'type':a59_0x40e851(0x165),'required':!![],'description':a59_0x40e851(0x154)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4e6dce){const _0x40044d=a59_0x40e851,_0x3e6715=_0x4e6dce[_0x40044d(0x16a)](_0x40044d(0x16c)),_0x2ddc80=await getErBusinessGroupSummary(_0x4e6dce[_0x40044d(0x16b)],_0x3e6715),_0x370a18=_0x2ddc80['groups'][_0x40044d(0x162)](_0x4d0927=>({..._0x4d0927,'businessGroup':_0x4d0927[_0x40044d(0x15f)]['trim']()||_0x40044d(0x158)}));return{'ok':!![],'data':{..._0x2ddc80,'groups':_0x370a18,'scope':_0x40044d(0x160)},'message':'Found\x20'+_0x370a18[_0x40044d(0x168)]+_0x40044d(0x15b)+_0x3e6715};}};
1
+ const a59_0x1489b1=a59_0x1177;(function(_0x32a71f,_0x271f58){const _0x5dd818=a59_0x1177,_0x4a611f=_0x32a71f();while(!![]){try{const _0x443cf8=-parseInt(_0x5dd818(0x7d))/0x1+-parseInt(_0x5dd818(0x75))/0x2*(parseInt(_0x5dd818(0x70))/0x3)+-parseInt(_0x5dd818(0x7f))/0x4*(parseInt(_0x5dd818(0x81))/0x5)+-parseInt(_0x5dd818(0x82))/0x6+parseInt(_0x5dd818(0x6d))/0x7+-parseInt(_0x5dd818(0x7b))/0x8*(-parseInt(_0x5dd818(0x7c))/0x9)+parseInt(_0x5dd818(0x73))/0xa;if(_0x443cf8===_0x271f58)break;else _0x4a611f['push'](_0x4a611f['shift']());}catch(_0xd81713){_0x4a611f['push'](_0x4a611f['shift']());}}}(a59_0x3b95,0xa3f0e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0x1177(_0x2bef97,_0x112358){_0x2bef97=_0x2bef97-0x69;const _0x3b9523=a59_0x3b95();let _0x11777d=_0x3b9523[_0x2bef97];return _0x11777d;}function a59_0x3b95(){const _0x4dfbd5=['dataset','Found\x20','25268650tcidkP','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','3590kZCngW','\x20business\x20group(s)\x20for\x20database\x20connection\x20','length','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','trim','map','7557752fcFvui','9CTDUeF','729883tVpTsx','business-groups','4JwUnmy','ungrouped','1511705BnpTBE','6902724JMetxg','groups','dbid','number','appCode','4335457OBEKlZ','read','businessGroup','2067XMbeeW'];a59_0x3b95=function(){return _0x4dfbd5;};return a59_0x3b95();}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a59_0x1489b1(0x71),'command':a59_0x1489b1(0x7e),'description':a59_0x1489b1(0x74),'risk':a59_0x1489b1(0x6e),'flags':[{'name':'dbid','type':a59_0x1489b1(0x6b),'required':!![],'description':a59_0x1489b1(0x78)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1bf208){const _0x5121aa=a59_0x1489b1,_0x173052=_0x1bf208['num'](_0x5121aa(0x6a)),_0x26741e=await getErBusinessGroupSummary(_0x1bf208[_0x5121aa(0x6c)],_0x173052),_0x1e1182=_0x26741e[_0x5121aa(0x69)][_0x5121aa(0x7a)](_0x5ad69b=>({..._0x5ad69b,'businessGroup':_0x5ad69b[_0x5121aa(0x6f)][_0x5121aa(0x79)]()||_0x5121aa(0x80)}));return{'ok':!![],'data':{..._0x26741e,'groups':_0x1e1182,'scope':'DB_TABLE'},'message':_0x5121aa(0x72)+_0x1e1182[_0x5121aa(0x77)]+_0x5121aa(0x76)+_0x173052};}};
@@ -1 +1 @@
1
- const a60_0x4d8ec8=a60_0x4bcd;(function(_0x39deab,_0x33575a){const _0x3c9be9=a60_0x4bcd,_0x5dca32=_0x39deab();while(!![]){try{const _0xab5392=parseInt(_0x3c9be9(0xfa))/0x1+-parseInt(_0x3c9be9(0x101))/0x2*(-parseInt(_0x3c9be9(0xf9))/0x3)+-parseInt(_0x3c9be9(0x106))/0x4+-parseInt(_0x3c9be9(0x102))/0x5+-parseInt(_0x3c9be9(0xef))/0x6+parseInt(_0x3c9be9(0xfe))/0x7+parseInt(_0x3c9be9(0x103))/0x8;if(_0xab5392===_0x33575a)break;else _0x5dca32['push'](_0x5dca32['shift']());}catch(_0x44c91c){_0x5dca32['push'](_0x5dca32['shift']());}}}(a60_0x1cc0,0xd209f));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a60_0x4d8ec8(0x105),'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_0x4d8ec8(0xf8);function valueToString(_0x248225){const _0x3a5b57=a60_0x4d8ec8;return _0x248225==null?'':String(_0x248225)[_0x3a5b57(0xee)]();}function getDatasetCode(_0xd10653){const _0x4686da=a60_0x4d8ec8;return valueToString(_0xd10653[_0x4686da(0xf3)]??_0xd10653['modelCode']??_0xd10653['dataset']?.[_0x4686da(0xf5)]);}function getDatasetName(_0x5cde9d){const _0x24c984=a60_0x4d8ec8;return valueToString(_0x5cde9d['name']??_0x5cde9d[_0x24c984(0x100)]?.[_0x24c984(0xf7)])||_0x24c984(0xe7);}function getDatasetSource(_0x1dd319){const _0x170381=a60_0x4d8ec8;return valueToString(_0x1dd319[_0x170381(0xf1)]??_0x1dd319[_0x170381(0x100)]?.[_0x170381(0xf2)])[_0x170381(0x107)]();}function getDbtableConfig(_0x48b0e2){const _0x2bbb39=a60_0x4d8ec8,_0xa79b9b=_0x48b0e2[_0x2bbb39(0xed)]??_0x48b0e2[_0x2bbb39(0x109)];return _0xa79b9b&&typeof _0xa79b9b===_0x2bbb39(0xf0)?_0xa79b9b:{};}export function isDbTableBackedDataset(_0x3c5384){const _0x4cb8e3=a60_0x4d8ec8,_0x11ae19=getDatasetSource(_0x3c5384);if(_0x11ae19===_0x4cb8e3(0x10a))return![];const _0x343764=getDbtableConfig(_0x3c5384),_0x154fd3=_0x343764['dbId']??_0x343764['id'],_0x4c06bf=valueToString(_0x343764['tableName']??_0x3c5384[_0x4cb8e3(0xfb)]??_0x3c5384[_0x4cb8e3(0x100)]?.['tableName']);return _0x154fd3!==undefined&&_0x154fd3!==null&&_0x4c06bf[_0x4cb8e3(0xe8)]>0x0;}export function filterDbTableBackedDatasets(_0x433c3d){const _0x1edf10=a60_0x4d8ec8;return _0x433c3d[_0x1edf10(0xf6)](_0x8bf593=>isDbTableBackedDataset(_0x8bf593));}function a60_0x4bcd(_0x25d066,_0x36974d){_0x25d066=_0x25d066-0xe6;const _0x1cc04c=a60_0x1cc0();let _0x4bcdd0=_0x1cc04c[_0x25d066];return _0x4bcdd0;}function a60_0x1cc0(){const _0x3ab15b=['sourceType','code','SQL\x20schema\x20validation','datasetCode','filter','datasetName','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','1288086pwNYau','42284mWYJYk','tableName','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','UNKNOWN','7302855nCoirQ','join','dataset','2weyleG','4028830JOMmIl','12096000mLBzzk','The\x20current\x20dataset\x20\x22','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','3988580evXMUj','toUpperCase','getOne','dbtable','METADATA','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','unknown','length','\x20is\x20','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','validation','dbtableConfig','trim','2182086acovTt','object','source'];a60_0x1cc0=function(){return _0x3ab15b;};return a60_0x1cc0();}export function buildDbTableBackedRequirementMessage(_0x4cbb86,_0x2dacf0=a60_0x4d8ec8(0xf4)){const _0x23481e=a60_0x4d8ec8,_0x15832a=getDatasetSource(_0x4cbb86)||_0x23481e(0xfd),_0x6be775=getDatasetName(_0x4cbb86),_0x4acfbf=getDatasetCode(_0x4cbb86),_0x4d597e=_0x4acfbf?'\x20('+_0x4acfbf+')':'';return[_0x23481e(0x104)+_0x6be775+'\x22'+_0x4d597e+_0x23481e(0xe9)+_0x15832a+_0x23481e(0xeb)+_0x2dacf0+'.',_0x23481e(0xfc),_0x23481e(0xe6),_0x23481e(0xea)+RUNTIME_DATA_ACCESS_COMMANDS[_0x23481e(0xf6)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x23481e(0x108)]+'.'][_0x23481e(0xff)]('\x20');}export function assertDatasetIsDbTableBacked(_0x450546,_0x24a9b6){const _0x326142=a60_0x4d8ec8;if(!isDbTableBackedDataset(_0x450546))throw CliErrors[_0x326142(0xec)](buildDbTableBackedRequirementMessage(_0x450546,_0x24a9b6));}
1
+ function a60_0x3af1(_0x542108,_0x4fa340){_0x542108=_0x542108-0xb9;const _0x16bb12=a60_0x16bb();let _0x3af12d=_0x16bb12[_0x542108];return _0x3af12d;}const a60_0x27a1fb=a60_0x3af1;(function(_0x39c7ad,_0x4a61de){const _0x304d9f=a60_0x3af1,_0x5e6ced=_0x39c7ad();while(!![]){try{const _0x56aac4=parseInt(_0x304d9f(0xc0))/0x1*(-parseInt(_0x304d9f(0xba))/0x2)+parseInt(_0x304d9f(0xc9))/0x3+-parseInt(_0x304d9f(0xca))/0x4+parseInt(_0x304d9f(0xbb))/0x5+parseInt(_0x304d9f(0xc5))/0x6+parseInt(_0x304d9f(0xbe))/0x7*(parseInt(_0x304d9f(0xda))/0x8)+-parseInt(_0x304d9f(0xcc))/0x9*(parseInt(_0x304d9f(0xd7))/0xa);if(_0x56aac4===_0x4a61de)break;else _0x5e6ced['push'](_0x5e6ced['shift']());}catch(_0x2ec79c){_0x5e6ced['push'](_0x5e6ced['shift']());}}}(a60_0x16bb,0x5cec2));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x27a1fb(0xb9),'filter':a60_0x27a1fb(0xd5),'getOne':a60_0x27a1fb(0xc3)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x27a1fb(0xd0);function a60_0x16bb(){const _0x38280b=['filter','130797GJDQTD','sourceType','object','trim','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','The\x20current\x20dataset\x20\x22','modelCode','dbtableConfig','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','unknown','170rlfCAT','dbId','tableName','72VGktZM','dataset','length','datasetName','lovrabet','10798CvBpso','534540GzGDBZ','\x20is\x20','join','178346dlrYIz','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','1lKphSM','toUpperCase','METADATA','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','getOne','3147114vUbcNu','name','validation','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','426351ZWUNov','1479104nKcqhL'];a60_0x16bb=function(){return _0x38280b;};return a60_0x16bb();}function valueToString(_0x6f90ba){const _0x419861=a60_0x27a1fb;return _0x6f90ba==null?'':String(_0x6f90ba)[_0x419861(0xcf)]();}function getDatasetCode(_0x266c48){const _0x2263f8=a60_0x27a1fb;return valueToString(_0x266c48['code']??_0x266c48[_0x2263f8(0xd3)]??_0x266c48['dataset']?.['datasetCode']);}function getDatasetName(_0x7e6d98){const _0x30ee0a=a60_0x27a1fb;return valueToString(_0x7e6d98[_0x30ee0a(0xc6)]??_0x7e6d98[_0x30ee0a(0xdb)]?.[_0x30ee0a(0xdd)])||_0x30ee0a(0xd6);}function getDatasetSource(_0x4b4a49){const _0x26f2f8=a60_0x27a1fb;return valueToString(_0x4b4a49['source']??_0x4b4a49['dataset']?.[_0x26f2f8(0xcd)])[_0x26f2f8(0xc1)]();}function getDbtableConfig(_0x333738){const _0x4f3b70=a60_0x27a1fb,_0x2423d1=_0x333738[_0x4f3b70(0xd4)]??_0x333738['dbtable'];return _0x2423d1&&typeof _0x2423d1===_0x4f3b70(0xce)?_0x2423d1:{};}export function isDbTableBackedDataset(_0x5d499f){const _0x52451d=a60_0x27a1fb,_0x1fc4ba=getDatasetSource(_0x5d499f);if(_0x1fc4ba===_0x52451d(0xc2))return![];const _0x1ca43d=getDbtableConfig(_0x5d499f),_0x10e970=_0x1ca43d[_0x52451d(0xd8)]??_0x1ca43d['id'],_0x3fe710=valueToString(_0x1ca43d[_0x52451d(0xd9)]??_0x5d499f[_0x52451d(0xd9)]??_0x5d499f[_0x52451d(0xdb)]?.['tableName']);return _0x10e970!==undefined&&_0x10e970!==null&&_0x3fe710[_0x52451d(0xdc)]>0x0;}export function filterDbTableBackedDatasets(_0x5b2637){const _0xd918af=a60_0x27a1fb;return _0x5b2637[_0xd918af(0xcb)](_0x564b39=>isDbTableBackedDataset(_0x564b39));}export function buildDbTableBackedRequirementMessage(_0x94f70,_0x286b88='SQL\x20schema\x20validation'){const _0x561a07=a60_0x27a1fb,_0x558438=getDatasetSource(_0x94f70)||'UNKNOWN',_0x30a0f=getDatasetName(_0x94f70),_0x3ac7ee=getDatasetCode(_0x94f70),_0x26d6a4=_0x3ac7ee?'\x20('+_0x3ac7ee+')':'';return[_0x561a07(0xd2)+_0x30a0f+'\x22'+_0x26d6a4+_0x561a07(0xbc)+_0x558438+_0x561a07(0xd1)+_0x286b88+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.',_0x561a07(0xc8),_0x561a07(0xbf)+RUNTIME_DATA_ACCESS_COMMANDS[_0x561a07(0xcb)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x561a07(0xc4)]+'.'][_0x561a07(0xbd)]('\x20');}export function assertDatasetIsDbTableBacked(_0x5ada99,_0x2cf3dc){const _0x54c8a4=a60_0x27a1fb;if(!isDbTableBackedDataset(_0x5ada99))throw CliErrors[_0x54c8a4(0xc7)](buildDbTableBackedRequirementMessage(_0x5ada99,_0x2cf3dc));}
@@ -1 +1 @@
1
- const a61_0x1226f5=a61_0x3768;(function(_0x33ab60,_0x7d0e3b){const _0xbc281=a61_0x3768,_0x343ddd=_0x33ab60();while(!![]){try{const _0x36c0cf=parseInt(_0xbc281(0x214))/0x1+parseInt(_0xbc281(0x201))/0x2*(-parseInt(_0xbc281(0x1f0))/0x3)+-parseInt(_0xbc281(0x215))/0x4*(parseInt(_0xbc281(0x1dd))/0x5)+parseInt(_0xbc281(0x1db))/0x6*(-parseInt(_0xbc281(0x1fd))/0x7)+parseInt(_0xbc281(0x20c))/0x8*(-parseInt(_0xbc281(0x213))/0x9)+parseInt(_0xbc281(0x212))/0xa+parseInt(_0xbc281(0x1d7))/0xb*(parseInt(_0xbc281(0x210))/0xc);if(_0x36c0cf===_0x7d0e3b)break;else _0x343ddd['push'](_0x343ddd['shift']());}catch(_0x2a003e){_0x343ddd['push'](_0x343ddd['shift']());}}}(a61_0x4b7e,0x7c4e0));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x3768(_0x133cae,_0x29db03){_0x133cae=_0x133cae-0x1d5;const _0x4b7ee6=a61_0x4b7e();let _0x376861=_0x4b7ee6[_0x133cae];return _0x376861;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x1226f5(0x20e),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x1226f5(0x20f),'type':a61_0x1226f5(0x20e),'description':a61_0x1226f5(0x211)},CONFIRM_FLAG={'name':'confirm','type':a61_0x1226f5(0x217),'description':a61_0x1226f5(0x1e8)},CASCADE_FLAG={'name':'cascade','type':a61_0x1226f5(0x217),'description':a61_0x1226f5(0x209)},EXPECTED_COUNT_FLAG={'name':a61_0x1226f5(0x1e2),'type':a61_0x1226f5(0x20e),'description':a61_0x1226f5(0x1df)};function a61_0x4b7e(){const _0x3d0a6b=['object','6023598mkjEny','relatedPages','80yltMrE','bool','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','message','push','expected-count','relatedPageInfoList','deleted','dbId','dbid=','tableName','Required\x20to\x20execute\x20dataset\x20deletion','type','Deleted\x20','false','\x20--appcode\x20','name','validation','No\x20undeleted\x20dataset\x20found\x20for\x20','540021qTlIBc','title','Would\x20delete\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','filter','delete','isInteger','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','rabetbase\x20page\x20restore\x20--id\x20','code','str','dbtableConfig','Would\x20safely\x20delete\x20','7KuiEWJ','description','dataset','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','10IXBSlc','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','num','\x20dataset(s);\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','true','\x20dataset(s)','cascade','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','length','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','152eOxGut','add','number','dbid','20705400QNHDmX','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','8059040jMzzfY','93366emIKBN','694888AdvpZR','154004dZuqaH','\x20failed','boolean','/smartapi/dataset/delete?cascade=','dbName','11qkNBgu','confirm','appCode'];a61_0x4b7e=function(){return _0x3d0a6b;};return a61_0x4b7e();}export const datasetDelete={'service':a61_0x1226f5(0x1ff),'command':a61_0x1226f5(0x1f5),'description':a61_0x1226f5(0x20b),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4e414b){const _0x2bd3b2=a61_0x1226f5,_0x46660b=_0x4e414b['num']('id'),_0x3456e0=_0x4e414b[_0x2bd3b2(0x1fa)](_0x2bd3b2(0x1f9)),_0x1f8076=_0x4e414b[_0x2bd3b2(0x203)](_0x2bd3b2(0x20f)),_0x39f9ad=[_0x46660b>0x0,Boolean(_0x3456e0),_0x1f8076>0x0][_0x2bd3b2(0x1f4)](Boolean);if(_0x39f9ad[_0x2bd3b2(0x20a)]===0x0)throw CliErrors[_0x2bd3b2(0x1ee)](_0x2bd3b2(0x1f3));if(_0x39f9ad['length']>0x1)throw CliErrors[_0x2bd3b2(0x1ee)](_0x2bd3b2(0x202));},async 'dryRun'(_0x434077){const _0x37e46f=a61_0x1226f5,_0x2d3e3c=await resolveTargets(_0x434077),_0x4a3b29=_0x434077[_0x37e46f(0x1de)](_0x37e46f(0x208));return{'method':'POST','url':_0x37e46f(0x1d5)+(_0x4a3b29?_0x37e46f(0x206):_0x37e46f(0x1eb)),'body':{'count':_0x2d3e3c[_0x37e46f(0x20a)],'cascade':_0x4a3b29,'datasets':_0x2d3e3c},'description':_0x4a3b29?_0x37e46f(0x1f2)+_0x2d3e3c[_0x37e46f(0x20a)]+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':_0x37e46f(0x1fc)+_0x2d3e3c['length']+_0x37e46f(0x1f7)};},async 'execute'(_0x2bbfc9){const _0x173137=a61_0x1226f5;if(!_0x2bbfc9[_0x173137(0x1de)](_0x173137(0x1d8)))throw CliErrors['validation'](_0x173137(0x205),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x2f29d1=await resolveTargets(_0x2bbfc9),_0x5b592c=_0x2bbfc9[_0x173137(0x1de)](_0x173137(0x208)),_0x43a804=[],_0x171ea9=[];for(const _0x23b417 of _0x2f29d1){try{await deleteDataset(_0x23b417['id'],_0x5b592c),_0x43a804[_0x173137(0x1e1)](_0x23b417);}catch(_0xf8e0e8){_0x171ea9['push']({..._0x23b417,'error':_0xf8e0e8 instanceof Error?_0xf8e0e8[_0x173137(0x1e0)]:String(_0xf8e0e8)});}}if(_0x171ea9[_0x173137(0x20a)]>0x0){const _0xbf0ef6=buildPageRestoreCommands(_0x2bbfc9[_0x173137(0x1d9)],_0x5b592c?_0x43a804:[]);return{'ok':![],'data':{'requested':_0x2f29d1[_0x173137(0x20a)],'cascade':_0x5b592c,'deletedCount':_0x43a804['length'],'failedCount':_0x171ea9[_0x173137(0x20a)],'deleted':_0x43a804,'failed':_0x171ea9,'pageRestoreCommands':_0xbf0ef6},'message':'Deleted\x20'+_0x43a804[_0x173137(0x20a)]+'/'+_0x2f29d1[_0x173137(0x20a)]+_0x173137(0x204)+_0x171ea9['length']+_0x173137(0x216)};}return{'ok':!![],'data':{'requested':_0x2f29d1['length'],'cascade':_0x5b592c,'deletedCount':_0x43a804[_0x173137(0x20a)],'deleted':_0x43a804,'pageRestoreCommands':buildPageRestoreCommands(_0x2bbfc9[_0x173137(0x1d9)],_0x5b592c?_0x43a804:[])},'message':_0x173137(0x1ea)+_0x43a804[_0x173137(0x20a)]+_0x173137(0x207)};}};async function resolveTargets(_0x324bcd){const _0x4ec2db=a61_0x1226f5,_0x41a077=_0x324bcd[_0x4ec2db(0x203)]('id'),_0x5b41af=_0x324bcd['str'](_0x4ec2db(0x1f9)),_0x63b231=_0x324bcd['num']('dbid');let _0x4017d6;_0x5b41af?(_0x4017d6=await listDatasets(_0x324bcd[_0x4ec2db(0x1d9)],{'code':_0x5b41af}),_0x4017d6=_0x4017d6[_0x4ec2db(0x1f4)](_0x11a405=>_0x11a405[_0x4ec2db(0x1f9)]===_0x5b41af)):(_0x4017d6=await listDatasets(_0x324bcd[_0x4ec2db(0x1d9)]),_0x41a077>0x0&&(_0x4017d6=_0x4017d6[_0x4ec2db(0x1f4)](_0x5d69fd=>_0x5d69fd['id']===_0x41a077)),_0x63b231>0x0&&(_0x4017d6=_0x4017d6[_0x4ec2db(0x1f4)](_0x5849e9=>_0x5849e9['dbtableConfig']?.[_0x4ec2db(0x1e5)]===_0x63b231)));const _0x26f1a8=[];for(const _0x3b410b of _0x4017d6){const _0x16403d=await getDatasetDetail(_0x3b410b['code']),_0x5098e1=Array['isArray'](_0x16403d[_0x4ec2db(0x1e3)])?_0x16403d[_0x4ec2db(0x1e3)]['filter'](_0x45c273=>_0x45c273!=null&&typeof _0x45c273===_0x4ec2db(0x1da)&&_0x45c273[_0x4ec2db(0x1e4)]!==!![]):[];_0x26f1a8[_0x4ec2db(0x1e1)](normalizeTarget(_0x3b410b,_0x5098e1));}if(_0x26f1a8['length']===0x0){const _0x2d37a7=_0x5b41af||(_0x41a077>0x0?'id='+_0x41a077:_0x4ec2db(0x1e6)+_0x63b231);throw CliErrors['validation'](_0x4ec2db(0x1ef)+_0x2d37a7+'.');}const _0x468b11=_0x324bcd[_0x4ec2db(0x203)]('expected-count');if(_0x468b11>0x0&&_0x26f1a8[_0x4ec2db(0x20a)]!==_0x468b11)throw CliErrors[_0x4ec2db(0x1ee)]('Matched\x20'+_0x26f1a8[_0x4ec2db(0x20a)]+_0x4ec2db(0x200)+_0x468b11+'.');return _0x26f1a8;}function normalizeTarget(_0x13366e,_0x5840c6){const _0x240793=a61_0x1226f5,_0x54b08f=_0x13366e[_0x240793(0x1fb)]??{},_0x6c3571=_0x5840c6['map'](_0x17be3f=>{const _0x4c8905=_0x240793;if(_0x17be3f==null||typeof _0x17be3f!==_0x4c8905(0x1da))return null;const _0x5b2350=_0x17be3f,_0x2a1c5a=Number(_0x5b2350['id']);if(!Number[_0x4c8905(0x1f6)](_0x2a1c5a)||_0x2a1c5a<=0x0)return null;const _0x50956d=_0x5b2350[_0x4c8905(0x1f1)]??_0x5b2350[_0x4c8905(0x1ed)];return{'id':_0x2a1c5a,..._0x50956d?{'name':String(_0x50956d)}:{},..._0x5b2350[_0x4c8905(0x1e9)]?{'type':String(_0x5b2350[_0x4c8905(0x1e9)])}:{}};})[_0x240793(0x1f4)](_0x136a32=>_0x136a32!==null);return{'id':_0x13366e['id'],'code':_0x13366e['code'],'name':_0x13366e[_0x240793(0x1ed)],'description':_0x13366e[_0x240793(0x1fe)],'source':_0x13366e['source'],'dbId':_0x54b08f['dbId'],'dbName':_0x54b08f[_0x240793(0x1d6)],'tableName':_0x54b08f[_0x240793(0x1e7)],'relatedPageCount':_0x6c3571[_0x240793(0x20a)],'relatedPages':_0x6c3571};}function buildPageRestoreCommands(_0x50e1c7,_0x5e7d78){const _0x5ea02f=a61_0x1226f5,_0x34f030=new Set();for(const _0x4d56ad of _0x5e7d78){for(const _0x39f364 of _0x4d56ad[_0x5ea02f(0x1dc)])_0x34f030[_0x5ea02f(0x20d)](_0x39f364['id']);}return[..._0x34f030]['map'](_0x22f7fb=>_0x5ea02f(0x1f8)+_0x22f7fb+_0x5ea02f(0x1ec)+_0x50e1c7);}
1
+ const a61_0x57a076=a61_0x265e;(function(_0x5e5f2d,_0x6ad323){const _0x51a2f0=a61_0x265e,_0x430e4c=_0x5e5f2d();while(!![]){try{const _0x23d11a=parseInt(_0x51a2f0(0x1a3))/0x1*(-parseInt(_0x51a2f0(0x1d1))/0x2)+-parseInt(_0x51a2f0(0x1b3))/0x3+parseInt(_0x51a2f0(0x1d6))/0x4+parseInt(_0x51a2f0(0x1c1))/0x5+-parseInt(_0x51a2f0(0x1b4))/0x6+parseInt(_0x51a2f0(0x19f))/0x7*(-parseInt(_0x51a2f0(0x1b1))/0x8)+parseInt(_0x51a2f0(0x1a0))/0x9;if(_0x23d11a===_0x6ad323)break;else _0x430e4c['push'](_0x430e4c['shift']());}catch(_0x525331){_0x430e4c['push'](_0x430e4c['shift']());}}}(a61_0x5777,0xbfba1));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x5777(){const _0x249c50=['dbid','\x20--appcode\x20','relatedPageInfoList','message','expected-count','cascade','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','name','tableName','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','14QkSfnL','No\x20undeleted\x20dataset\x20found\x20for\x20','\x20failed','Would\x20delete\x20','isInteger','3154300DqPfdd','isArray','dataset','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','appCode','927493tLrUzZ','35391546tKvaTe','description','validation','149971MGXrIo','Matched\x20','map','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','push','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','object','add','dbtableConfig','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','POST','length','relatedPages','\x20dataset(s)','88WQCRaV','dbName','2812551KIjQWY','3276474iYYtvu','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','true','filter','bool','/smartapi/dataset/delete?cascade=','str','code','number','type','Deleted\x20','dbId','num','276130yevRYV','confirm','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','id='];a61_0x5777=function(){return _0x249c50;};return a61_0x5777();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':'number','description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x57a076(0x1c5),'type':a61_0x57a076(0x1bc),'description':a61_0x57a076(0x1ac)},CONFIRM_FLAG={'name':'confirm','type':'boolean','description':'Required\x20to\x20execute\x20dataset\x20deletion'},CASCADE_FLAG={'name':a61_0x57a076(0x1ca),'type':'boolean','description':a61_0x57a076(0x1cb)},EXPECTED_COUNT_FLAG={'name':a61_0x57a076(0x1c9),'type':a61_0x57a076(0x1bc),'description':a61_0x57a076(0x1b5)};export const datasetDelete={'service':a61_0x57a076(0x1d8),'command':'delete','description':a61_0x57a076(0x19d),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x57ef0d){const _0x38610b=a61_0x57a076,_0xeff216=_0x57ef0d[_0x38610b(0x1c0)]('id'),_0x3a1e4c=_0x57ef0d['str'](_0x38610b(0x1bb)),_0x226947=_0x57ef0d[_0x38610b(0x1c0)](_0x38610b(0x1c5)),_0x4ced6d=[_0xeff216>0x0,Boolean(_0x3a1e4c),_0x226947>0x0][_0x38610b(0x1b7)](Boolean);if(_0x4ced6d['length']===0x0)throw CliErrors[_0x38610b(0x1a2)](_0x38610b(0x1c3));if(_0x4ced6d[_0x38610b(0x1ae)]>0x1)throw CliErrors[_0x38610b(0x1a2)](_0x38610b(0x1a6));},async 'dryRun'(_0x45ee5f){const _0x317a97=a61_0x57a076,_0x12f5eb=await resolveTargets(_0x45ee5f),_0x9eecfa=_0x45ee5f[_0x317a97(0x1b8)](_0x317a97(0x1ca));return{'method':_0x317a97(0x1ad),'url':_0x317a97(0x1b9)+(_0x9eecfa?_0x317a97(0x1b6):'false'),'body':{'count':_0x12f5eb[_0x317a97(0x1ae)],'cascade':_0x9eecfa,'datasets':_0x12f5eb},'description':_0x9eecfa?_0x317a97(0x1d4)+_0x12f5eb[_0x317a97(0x1ae)]+_0x317a97(0x1cf):'Would\x20safely\x20delete\x20'+_0x12f5eb['length']+'\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.'};},async 'execute'(_0x582012){const _0x3b338b=a61_0x57a076;if(!_0x582012['bool'](_0x3b338b(0x1c2)))throw CliErrors['validation'](_0x3b338b(0x1a8),_0x3b338b(0x1d0));const _0x1605ee=await resolveTargets(_0x582012),_0x5409ed=_0x582012[_0x3b338b(0x1b8)](_0x3b338b(0x1ca)),_0x4de63c=[],_0x4c99f5=[];for(const _0x5011cb of _0x1605ee){try{await deleteDataset(_0x5011cb['id'],_0x5409ed),_0x4de63c['push'](_0x5011cb);}catch(_0x54cfa1){_0x4c99f5['push']({..._0x5011cb,'error':_0x54cfa1 instanceof Error?_0x54cfa1[_0x3b338b(0x1c8)]:String(_0x54cfa1)});}}if(_0x4c99f5[_0x3b338b(0x1ae)]>0x0){const _0xc63b97=buildPageRestoreCommands(_0x582012['appCode'],_0x5409ed?_0x4de63c:[]);return{'ok':![],'data':{'requested':_0x1605ee[_0x3b338b(0x1ae)],'cascade':_0x5409ed,'deletedCount':_0x4de63c[_0x3b338b(0x1ae)],'failedCount':_0x4c99f5[_0x3b338b(0x1ae)],'deleted':_0x4de63c,'failed':_0x4c99f5,'pageRestoreCommands':_0xc63b97},'message':_0x3b338b(0x1be)+_0x4de63c[_0x3b338b(0x1ae)]+'/'+_0x1605ee['length']+'\x20dataset(s);\x20'+_0x4c99f5[_0x3b338b(0x1ae)]+_0x3b338b(0x1d3)};}return{'ok':!![],'data':{'requested':_0x1605ee[_0x3b338b(0x1ae)],'cascade':_0x5409ed,'deletedCount':_0x4de63c['length'],'deleted':_0x4de63c,'pageRestoreCommands':buildPageRestoreCommands(_0x582012[_0x3b338b(0x19e)],_0x5409ed?_0x4de63c:[])},'message':_0x3b338b(0x1be)+_0x4de63c[_0x3b338b(0x1ae)]+_0x3b338b(0x1b0)};}};async function resolveTargets(_0x13c44b){const _0x394fb9=a61_0x57a076,_0x51b1bd=_0x13c44b[_0x394fb9(0x1c0)]('id'),_0x4ae546=_0x13c44b[_0x394fb9(0x1ba)](_0x394fb9(0x1bb)),_0x1716a7=_0x13c44b[_0x394fb9(0x1c0)](_0x394fb9(0x1c5));let _0x2e026e;_0x4ae546?(_0x2e026e=await listDatasets(_0x13c44b[_0x394fb9(0x19e)],{'code':_0x4ae546}),_0x2e026e=_0x2e026e[_0x394fb9(0x1b7)](_0x952f30=>_0x952f30[_0x394fb9(0x1bb)]===_0x4ae546)):(_0x2e026e=await listDatasets(_0x13c44b['appCode']),_0x51b1bd>0x0&&(_0x2e026e=_0x2e026e[_0x394fb9(0x1b7)](_0x36cd17=>_0x36cd17['id']===_0x51b1bd)),_0x1716a7>0x0&&(_0x2e026e=_0x2e026e[_0x394fb9(0x1b7)](_0xd6d894=>_0xd6d894[_0x394fb9(0x1ab)]?.[_0x394fb9(0x1bf)]===_0x1716a7)));const _0x1c4426=[];for(const _0x272d69 of _0x2e026e){const _0x463f03=await getDatasetDetail(_0x272d69[_0x394fb9(0x1bb)]),_0x5a675a=Array[_0x394fb9(0x1d7)](_0x463f03[_0x394fb9(0x1c7)])?_0x463f03[_0x394fb9(0x1c7)][_0x394fb9(0x1b7)](_0x2af34c=>_0x2af34c!=null&&typeof _0x2af34c===_0x394fb9(0x1a9)&&_0x2af34c['deleted']!==!![]):[];_0x1c4426[_0x394fb9(0x1a7)](normalizeTarget(_0x272d69,_0x5a675a));}if(_0x1c4426[_0x394fb9(0x1ae)]===0x0){const _0xf9c920=_0x4ae546||(_0x51b1bd>0x0?_0x394fb9(0x1c4)+_0x51b1bd:'dbid='+_0x1716a7);throw CliErrors[_0x394fb9(0x1a2)](_0x394fb9(0x1d2)+_0xf9c920+'.');}const _0x1f2b58=_0x13c44b[_0x394fb9(0x1c0)](_0x394fb9(0x1c9));if(_0x1f2b58>0x0&&_0x1c4426[_0x394fb9(0x1ae)]!==_0x1f2b58)throw CliErrors['validation'](_0x394fb9(0x1a4)+_0x1c4426[_0x394fb9(0x1ae)]+_0x394fb9(0x1cc)+_0x1f2b58+'.');return _0x1c4426;}function a61_0x265e(_0x3ad2e9,_0x315f06){_0x3ad2e9=_0x3ad2e9-0x19d;const _0x5777df=a61_0x5777();let _0x265ee5=_0x5777df[_0x3ad2e9];return _0x265ee5;}function normalizeTarget(_0x3aaaf6,_0x5f727c){const _0x23d2c3=a61_0x57a076,_0x327bd7=_0x3aaaf6[_0x23d2c3(0x1ab)]??{},_0x563b62=_0x5f727c[_0x23d2c3(0x1a5)](_0x3d12c5=>{const _0x3f746a=_0x23d2c3;if(_0x3d12c5==null||typeof _0x3d12c5!=='object')return null;const _0x382382=_0x3d12c5,_0x3430cd=Number(_0x382382['id']);if(!Number[_0x3f746a(0x1d5)](_0x3430cd)||_0x3430cd<=0x0)return null;const _0x5993ac=_0x382382['title']??_0x382382[_0x3f746a(0x1cd)];return{'id':_0x3430cd,..._0x5993ac?{'name':String(_0x5993ac)}:{},..._0x382382[_0x3f746a(0x1bd)]?{'type':String(_0x382382[_0x3f746a(0x1bd)])}:{}};})[_0x23d2c3(0x1b7)](_0x2cfef5=>_0x2cfef5!==null);return{'id':_0x3aaaf6['id'],'code':_0x3aaaf6['code'],'name':_0x3aaaf6[_0x23d2c3(0x1cd)],'description':_0x3aaaf6[_0x23d2c3(0x1a1)],'source':_0x3aaaf6['source'],'dbId':_0x327bd7[_0x23d2c3(0x1bf)],'dbName':_0x327bd7[_0x23d2c3(0x1b2)],'tableName':_0x327bd7[_0x23d2c3(0x1ce)],'relatedPageCount':_0x563b62[_0x23d2c3(0x1ae)],'relatedPages':_0x563b62};}function buildPageRestoreCommands(_0x485f47,_0x1b5a13){const _0x19dfed=a61_0x57a076,_0x328b5a=new Set();for(const _0x2bc2fa of _0x1b5a13){for(const _0x5a7862 of _0x2bc2fa[_0x19dfed(0x1af)])_0x328b5a[_0x19dfed(0x1aa)](_0x5a7862['id']);}return[..._0x328b5a]['map'](_0x307975=>'rabetbase\x20page\x20restore\x20--id\x20'+_0x307975+_0x19dfed(0x1c6)+_0x485f47);}