@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.11

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 (376) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.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.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  375. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  376. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a235_0x1f828e=a235_0x5389;(function(_0x248671,_0x4c890a){const _0xf10414=a235_0x5389,_0x25f5c2=_0x248671();while(!![]){try{const _0x3ea8fe=parseInt(_0xf10414(0x121))/0x1*(-parseInt(_0xf10414(0xe1))/0x2)+parseInt(_0xf10414(0xe0))/0x3*(parseInt(_0xf10414(0xeb))/0x4)+parseInt(_0xf10414(0xf6))/0x5+parseInt(_0xf10414(0xf0))/0x6*(parseInt(_0xf10414(0x107))/0x7)+-parseInt(_0xf10414(0xdb))/0x8*(parseInt(_0xf10414(0x119))/0x9)+-parseInt(_0xf10414(0x11c))/0xa*(-parseInt(_0xf10414(0xe2))/0xb)+-parseInt(_0xf10414(0xf7))/0xc;if(_0x3ea8fe===_0x4c890a)break;else _0x25f5c2['push'](_0x25f5c2['shift']());}catch(_0x5a2bc5){_0x25f5c2['push'](_0x25f5c2['shift']());}}}(a235_0x1673,0x5f37d));function a235_0x5389(_0x2b0605,_0x1ac3cb){_0x2b0605=_0x2b0605-0xda;const _0x167315=a235_0x1673();let _0x5389cf=_0x167315[_0x2b0605];return _0x5389cf;}import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a235_0x1f828e(0xf5),'required':!![],'description':a235_0x1f828e(0x105)};export const ROLE_REF_FLAG={'name':'role','type':a235_0x1f828e(0x10c),'required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};export const USER_REF_FLAG={'name':a235_0x1f828e(0xfe),'type':'string','required':!![],'description':'User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId'};function a235_0x1673(){const _0x3a60d9=['expect-user-count','user-add','\x20not\x20found\x20in\x20app\x20','dev','map','Cannot\x20','No\x20tenant\x20member\x20matches\x20\x22','push','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','5802471IneMyg','username','nickname','408230EFDjCv','Role\x20id\x20','\x20member(s)\x20but\x20role\x20has\x20','appCode','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','15CCHPjj','\x22\x20not\x20found\x20in\x20app\x20','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','userCount','flagMissing','POST','\x20members\x20of\x20the\x20OWNER\x20role.','Pass\x20--user\x20<id|name>.','Role\x20name','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','join','8ePQeZH','remark','Pass\x20--role\x20<id|name>.','length','totalCount','1023kwfAia','2144kGRBHR','88KyNiLO','flag','\x20built-in\x20role\x20','authRequired','tenant_code','Missing\x20user\x20reference.','roleType','test','\x20duplicate\x20memberships\x20for\x20user\x20','12xnLEpz','validation','tenant','permitCount','userId','6uwjjen','toLowerCase',';\x20no\x20change.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','\x22:\x20','number','1410770CDogHL','1021200PCfTFh','roleName','role','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Anti-drift\x20check\x20failed:\x20expected\x20','trim','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','user','includes','Role\x20name\x20\x22','Pass\x20--user\x20<id>.','Removed\x20','filter','User\x20','Role\x20id\x20(from\x20`role\x20list`)','str','3683057hGnmDQ','\x20is\x20already\x20a\x20member\x20of\x20role\x20','name','find','DEV','string','OWNER','/smartapi/permit/user-role/create','expectUserCount'];a235_0x1673=function(){return _0x3a60d9;};return a235_0x1673();}export const NAME_FLAG={'name':a235_0x1f828e(0x109),'type':a235_0x1f828e(0x10c),'required':!![],'description':a235_0x1f828e(0x129)};export const USER_NAME_FLAG={'name':a235_0x1f828e(0x109),'type':a235_0x1f828e(0x10c),'required':!![],'description':a235_0x1f828e(0x123)};export const REMARK_FLAG={'name':a235_0x1f828e(0xdc),'type':a235_0x1f828e(0x10c),'required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x1f828e(0x110),'type':a235_0x1f828e(0xf5),'required':![],'description':a235_0x1f828e(0x12a)};export const BUILTIN_ROLE_TYPES=['ADMIN',a235_0x1f828e(0x10b),a235_0x1f828e(0x10d)];export function isBuiltinRole(_0x537c25){return BUILTIN_ROLE_TYPES['includes'](_0x537c25);}export function assertCustomRole(_0x2063e8,_0x5cf8ef){const _0x4d1fb8=a235_0x1f828e;if(_0x2063e8['roleType']!=='CUSTOM')throw CliErrors[_0x4d1fb8(0xec)](_0x4d1fb8(0x115)+_0x5cf8ef+_0x4d1fb8(0xe4)+_0x2063e8[_0x4d1fb8(0xf8)]+'\x20('+_0x2063e8[_0x4d1fb8(0xe8)]+').',_0x4d1fb8(0x120));}export function projectRole(_0x287d2f){const _0x24838c=a235_0x1f828e;return{'id':_0x287d2f['id'],'roleName':_0x287d2f[_0x24838c(0xf8)],'roleType':_0x287d2f['roleType'],'remark':_0x287d2f[_0x24838c(0xdc)],'userCount':_0x287d2f[_0x24838c(0x124)],'permitCount':_0x287d2f[_0x24838c(0xee)],'builtin':isBuiltinRole(_0x287d2f[_0x24838c(0xe8)])};}export async function resolveRoleRef(_0x519f76,_0x515f3b){const _0x22c3f6=a235_0x1f828e,_0x4a932c=_0x515f3b['trim']();if(!_0x4a932c)throw CliErrors[_0x22c3f6(0xec)]('Missing\x20role\x20reference.',_0x22c3f6(0xdd));if(/^\d+$/[_0x22c3f6(0xe9)](_0x4a932c))return getRoleById(_0x519f76,Number(_0x4a932c));const _0x2974f8=await listAllAppRoles(_0x519f76),_0x297102=_0x2974f8[_0x22c3f6(0x103)](_0x5e0bb0=>_0x5e0bb0[_0x22c3f6(0xf8)]===_0x4a932c);if(_0x297102[_0x22c3f6(0xde)]===0x0)throw CliErrors[_0x22c3f6(0xec)](_0x22c3f6(0x100)+_0x4a932c+_0x22c3f6(0x122)+_0x519f76+'.',_0x22c3f6(0xfd));if(_0x297102[_0x22c3f6(0xde)]>0x1){const _0x28e6bb=_0x297102[_0x22c3f6(0x114)](_0x366612=>_0x366612['id'])[_0x22c3f6(0xda)](',\x20');throw CliErrors[_0x22c3f6(0xec)](_0x22c3f6(0x100)+_0x4a932c+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x28e6bb+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x297102[0x0];}export async function getRoleById(_0x53be9a,_0x30ccf1){const _0x26deb3=a235_0x1f828e,_0x427820=await listAllAppRoles(_0x53be9a),_0x2e775a=_0x427820[_0x26deb3(0x103)](_0xa490c4=>_0xa490c4['id']===_0x30ccf1&&(!_0xa490c4[_0x26deb3(0x11f)]||_0xa490c4['appCode']===_0x53be9a));if(_0x2e775a[_0x26deb3(0xde)]!==0x1)throw CliErrors[_0x26deb3(0xec)](_0x26deb3(0x11d)+_0x30ccf1+_0x26deb3(0x112)+_0x53be9a+'.',_0x26deb3(0x118));return _0x2e775a[0x0];}async function listAllAppRoles(_0x5507d0){const _0x21659f=a235_0x1f828e,_0x4b92e5=0x64,_0x2aa18c=[];for(let _0x5b4bbb=0x1;;_0x5b4bbb+=0x1){const {items:_0x34d9d8,paging:_0xd9078}=await listAppRoles(_0x5507d0,{'currentPage':_0x5b4bbb,'pageSize':_0x4b92e5});_0x2aa18c[_0x21659f(0x117)](..._0x34d9d8);if(_0x34d9d8['length']<_0x4b92e5||_0xd9078&&_0x2aa18c[_0x21659f(0xde)]>=_0xd9078['totalCount'])return _0x2aa18c;}}export async function resolveTenantCode(){const _0x142f1d=a235_0x1f828e,_0x12df2c=await getSessionUserInfo(),_0x5778ce=_0x12df2c?.[_0x142f1d(0xfe)]?.[_0x142f1d(0xed)]?.[_0x142f1d(0xe6)];if(!_0x5778ce)throw CliErrors[_0x142f1d(0xe5)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x5778ce;}function matchMember(_0x2e15b4,_0x43a7d4){const _0x3a4be8=a235_0x1f828e,_0x3b9532=_0x43a7d4[_0x3a4be8(0xfc)]()[_0x3a4be8(0xf1)]();return(_0x2e15b4[_0x3a4be8(0x11b)]??'')['toLowerCase']()===_0x3b9532||(_0x2e15b4['username']??'')[_0x3a4be8(0xf1)]()===_0x3b9532;}export async function resolveUserRef(_0xb05d9f,_0x546318=a235_0x1f828e(0x101)){const _0x5072de=a235_0x1f828e,_0x4d7b4d=_0xb05d9f[_0x5072de(0xfc)]();if(!_0x4d7b4d)throw CliErrors[_0x5072de(0xec)](_0x5072de(0xe7),_0x5072de(0x128));const _0x1514e9=await resolveTenantCode(),_0x438aea=await getTenantMembers(_0x1514e9);if(/^\d+$/[_0x5072de(0xe9)](_0x4d7b4d)){const _0x385ec9=Number(_0x4d7b4d),_0x21ffca=_0x438aea[_0x5072de(0x10a)](_0x1a26d0=>_0x1a26d0[_0x5072de(0xef)]===_0x385ec9);return{'userId':_0x385ec9,'username':_0x21ffca?.[_0x5072de(0x11a)]??String(_0x385ec9),'nickname':_0x21ffca?.[_0x5072de(0x11b)],'matchedBy':'id'};}const _0x2274f7=_0x438aea['filter'](_0x47b0ac=>matchMember(_0x47b0ac,_0x4d7b4d));if(_0x2274f7[_0x5072de(0xde)]===0x0)throw CliErrors[_0x5072de(0xec)](_0x5072de(0x116)+_0x4d7b4d+'\x22.','Check\x20the\x20nickname/username.\x20'+_0x546318);if(_0x2274f7['length']>0x1){const _0x5c02c5=_0x2274f7['map'](_0x57ab2e=>(_0x57ab2e[_0x5072de(0x11b)]??_0x57ab2e['username']??'?')+'('+_0x57ab2e[_0x5072de(0xef)]+')')[_0x5072de(0xda)](',\x20');throw CliErrors[_0x5072de(0xec)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x4d7b4d+_0x5072de(0xf4)+_0x5c02c5+'.',_0x546318);}const _0x1790f5=_0x2274f7[0x0];return{'userId':_0x1790f5[_0x5072de(0xef)],'username':_0x1790f5['username']??String(_0x1790f5[_0x5072de(0xef)]),'nickname':_0x1790f5[_0x5072de(0x11b)],'matchedBy':_0x5072de(0x109)};}export const CREATE_USER_ROLE_PATH=a235_0x1f828e(0x10e);export const DELETE_USER_ROLE_PATH='/smartapi/permit/user-role/delete';export function computeRoleUserMutation(_0x15357c){const _0x346d91=a235_0x1f828e,{operation:_0x175f59,appCode:_0x3027cf,role:_0x372426,relations:_0x11512c,user:_0x154f3e}=_0x15357c,_0x36aa30=[...new Set(_0x11512c[_0x346d91(0x114)](_0x186435=>_0x186435[_0x346d91(0xef)]))],_0xe8b05f=[];if(_0x15357c[_0x346d91(0x10f)]!==undefined&&_0x15357c['expectUserCount']!==_0x36aa30[_0x346d91(0xde)])throw CliErrors[_0x346d91(0xec)](_0x346d91(0xfb)+_0x15357c[_0x346d91(0x10f)]+_0x346d91(0x11e)+_0x36aa30[_0x346d91(0xde)]+'.',_0x346d91(0xf3));const _0x5067d6=_0x36aa30[_0x346d91(0xff)](_0x154f3e[_0x346d91(0xef)]),_0x1b464d=_0x11512c[_0x346d91(0x103)](_0x2cef16=>_0x2cef16[_0x346d91(0xef)]===_0x154f3e['userId'])[_0x346d91(0x114)](_0x18f5e6=>_0x18f5e6['id']),_0x536811=_0x175f59===_0x346d91(0x111)?!_0x5067d6:_0x5067d6;let _0x48fed3=_0x36aa30;_0x175f59===_0x346d91(0x111)?_0x5067d6?_0xe8b05f['push'](_0x346d91(0x104)+_0x154f3e[_0x346d91(0xef)]+_0x346d91(0x108)+_0x372426[_0x346d91(0xf8)]+';\x20no\x20change.'):_0x48fed3=[..._0x36aa30,_0x154f3e['userId']]:!_0x5067d6?_0xe8b05f[_0x346d91(0x117)](_0x346d91(0x104)+_0x154f3e['userId']+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x372426[_0x346d91(0xf8)]+_0x346d91(0xf2)):(_0x48fed3=_0x36aa30[_0x346d91(0x103)](_0x143b22=>_0x143b22!==_0x154f3e[_0x346d91(0xef)]),_0x1b464d[_0x346d91(0xde)]>0x1&&_0xe8b05f['push'](_0x346d91(0x102)+_0x1b464d[_0x346d91(0xde)]+_0x346d91(0xea)+_0x154f3e[_0x346d91(0xef)]+'.'));const _0x34d665={'scope':_0x346d91(0x113),'operation':_0x175f59,'selector':{'appCode':_0x3027cf,'roleId':_0x372426['id'],'roleName':_0x372426[_0x346d91(0xf8)],'userId':_0x154f3e[_0x346d91(0xef)]},'before':{'userIds':_0x36aa30},'after':{'userIds':_0x48fed3},'dryRun':_0x15357c['dryRun'],'backend':{'method':_0x346d91(0x126),'path':_0x175f59===_0x346d91(0x111)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0xe8b05f};return{'mutation':_0x34d665,'changed':_0x536811,'matchingRelationIds':_0x1b464d};}export async function loadDevRoleRelations(_0x3dcb03,_0x542d17){const _0x3edf12=a235_0x1f828e,_0xdf43c=0x64,_0x29d6f5=[];for(let _0xee1322=0x1;;_0xee1322+=0x1){const {items:_0x13a8c0,paging:_0x1b4332}=await listDevUserRoleRelations(_0x3dcb03,{'roleId':_0x542d17,'currentPage':_0xee1322,'pageSize':_0xdf43c});_0x29d6f5[_0x3edf12(0x117)](..._0x13a8c0);if(_0x13a8c0[_0x3edf12(0xde)]<_0xdf43c||_0x1b4332&&_0x29d6f5[_0x3edf12(0xde)]>=_0x1b4332[_0x3edf12(0xdf)])return _0x29d6f5;}}export function readRoleRef(_0x405ea4){const _0x130e3b=a235_0x1f828e,_0x10caef=_0x405ea4[_0x130e3b(0x106)](_0x130e3b(0xf9))['trim']();if(!_0x10caef)throw CliErrors[_0x130e3b(0x125)](_0x130e3b(0xf9),_0x130e3b(0xdd));return _0x10caef;}export async function prepareUserMutation(_0x15e913,_0x4ddb0b,_0x3cd7dd){const _0x1466aa=a235_0x1f828e,_0x10917b=readRoleRef(_0x15e913),_0x5df929=_0x15e913[_0x1466aa(0x106)]('user')[_0x1466aa(0xfc)]();if(!_0x5df929)throw CliErrors['flagMissing'](_0x1466aa(0xfe),'Pass\x20--user\x20<id|name>.');const _0x271966=_0x15e913[_0x1466aa(0xe3)](_0x1466aa(0x110)),_0x45ab81=_0x271966===undefined||_0x271966===null?undefined:Number(_0x271966),_0x3290bf=await resolveRoleRef(_0x15e913[_0x1466aa(0x11f)],_0x10917b);if(_0x3290bf['roleType']===_0x1466aa(0x10d))throw CliErrors[_0x1466aa(0xec)](_0x1466aa(0x115)+_0x4ddb0b+_0x1466aa(0x127),_0x1466aa(0xfa));const _0x5a73a1=await resolveUserRef(_0x5df929),_0x1ab54a=await loadDevRoleRelations(_0x15e913[_0x1466aa(0x11f)],_0x3290bf['id']);return{...computeRoleUserMutation({'operation':_0x4ddb0b,'appCode':_0x15e913[_0x1466aa(0x11f)],'role':_0x3290bf,'relations':_0x1ab54a,'user':{'userId':_0x5a73a1['userId'],'username':_0x5a73a1[_0x1466aa(0x11a)],'nickname':_0x5a73a1[_0x1466aa(0x11b)]},'dryRun':_0x3cd7dd,..._0x45ab81!==undefined?{'expectUserCount':_0x45ab81}:{}}),'role':_0x3290bf,'user':_0x5a73a1};}
1
+ const a235_0x4625a3=a235_0x3de6;(function(_0x5f47d4,_0x275507){const _0x3c571a=a235_0x3de6,_0x5c9ca3=_0x5f47d4();while(!![]){try{const _0x328bfd=parseInt(_0x3c571a(0xd3))/0x1*(-parseInt(_0x3c571a(0xef))/0x2)+parseInt(_0x3c571a(0xf3))/0x3+-parseInt(_0x3c571a(0xfc))/0x4+parseInt(_0x3c571a(0xcb))/0x5+-parseInt(_0x3c571a(0xd1))/0x6*(parseInt(_0x3c571a(0xf6))/0x7)+-parseInt(_0x3c571a(0xe4))/0x8*(-parseInt(_0x3c571a(0xd7))/0x9)+-parseInt(_0x3c571a(0x10b))/0xa;if(_0x328bfd===_0x275507)break;else _0x5c9ca3['push'](_0x5c9ca3['shift']());}catch(_0x1c675a){_0x5c9ca3['push'](_0x5c9ca3['shift']());}}}(a235_0x162a,0x49e16));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a235_0x4625a3(0x112),'required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};export const USER_REF_FLAG={'name':'user','type':'string','required':!![],'description':a235_0x4625a3(0x100)};export const NAME_FLAG={'name':a235_0x4625a3(0x103),'type':a235_0x4625a3(0xe3),'required':!![],'description':a235_0x4625a3(0xe0)};function a235_0x3de6(_0x30c043,_0x48964d){_0x30c043=_0x30c043-0xc8;const _0x162a43=a235_0x162a();let _0x3de66e=_0x162a43[_0x30c043];return _0x3de66e;}export const USER_NAME_FLAG={'name':'name','type':a235_0x4625a3(0xe3),'required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a235_0x4625a3(0x105),'type':a235_0x4625a3(0xe3),'required':![],'description':a235_0x4625a3(0x10f)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a235_0x4625a3(0x112),'required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=[a235_0x4625a3(0x104),'DEV',a235_0x4625a3(0xcd)];export function isBuiltinRole(_0x4d15f9){const _0x270dd8=a235_0x4625a3;return BUILTIN_ROLE_TYPES[_0x270dd8(0xcc)](_0x4d15f9);}export function assertCustomRole(_0x1c975a,_0x45c5ec){const _0x820a1f=a235_0x4625a3;if(_0x1c975a[_0x820a1f(0xec)]!==_0x820a1f(0xf5))throw CliErrors[_0x820a1f(0xd4)](_0x820a1f(0x113)+_0x45c5ec+_0x820a1f(0xe6)+_0x1c975a[_0x820a1f(0xc8)]+'\x20('+_0x1c975a['roleType']+').',_0x820a1f(0xde));}export function projectRole(_0x36f6e9){const _0x113beb=a235_0x4625a3;return{'id':_0x36f6e9['id'],'roleName':_0x36f6e9[_0x113beb(0xc8)],'roleType':_0x36f6e9[_0x113beb(0xec)],'remark':_0x36f6e9[_0x113beb(0x105)],'userCount':_0x36f6e9['userCount'],'permitCount':_0x36f6e9['permitCount'],'builtin':isBuiltinRole(_0x36f6e9['roleType'])};}export async function resolveRoleRef(_0x1b0783,_0x3fae53){const _0x5e62bd=a235_0x4625a3,_0x1c4dcf=_0x3fae53[_0x5e62bd(0xff)]();if(!_0x1c4dcf)throw CliErrors['validation'](_0x5e62bd(0xeb),_0x5e62bd(0xfb));if(/^\d+$/[_0x5e62bd(0xdc)](_0x1c4dcf))return getRoleById(_0x1b0783,Number(_0x1c4dcf));const _0x3edf86=await listAllAppRoles(_0x1b0783),_0xaaa540=_0x3edf86[_0x5e62bd(0xed)](_0x5259ef=>_0x5259ef['roleName']===_0x1c4dcf);if(_0xaaa540['length']===0x0)throw CliErrors[_0x5e62bd(0xd4)](_0x5e62bd(0xd5)+_0x1c4dcf+'\x22\x20not\x20found\x20in\x20app\x20'+_0x1b0783+'.',_0x5e62bd(0xf0));if(_0xaaa540['length']>0x1){const _0x36f314=_0xaaa540[_0x5e62bd(0x10d)](_0x491abe=>_0x491abe['id'])['join'](',\x20');throw CliErrors[_0x5e62bd(0xd4)](_0x5e62bd(0xd5)+_0x1c4dcf+_0x5e62bd(0x106)+_0x36f314+').',_0x5e62bd(0xc9));}return _0xaaa540[0x0];}export async function getRoleById(_0x441ffc,_0x2058f9){const _0x1860ac=a235_0x4625a3,_0x149f6a=await listAllAppRoles(_0x441ffc),_0x5ca7e0=_0x149f6a[_0x1860ac(0xed)](_0xdd6b53=>_0xdd6b53['id']===_0x2058f9&&(!_0xdd6b53[_0x1860ac(0xce)]||_0xdd6b53[_0x1860ac(0xce)]===_0x441ffc));if(_0x5ca7e0[_0x1860ac(0xd8)]!==0x1)throw CliErrors[_0x1860ac(0xd4)](_0x1860ac(0x10e)+_0x2058f9+_0x1860ac(0xda)+_0x441ffc+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x5ca7e0[0x0];}async function listAllAppRoles(_0x435abc){const _0x14cd8d=a235_0x4625a3,_0x1690bb=0x64,_0x5b6188=[];for(let _0x3f7887=0x1;;_0x3f7887+=0x1){const {items:_0x4207e1,paging:_0x4dbc94}=await listAppRoles(_0x435abc,{'currentPage':_0x3f7887,'pageSize':_0x1690bb});_0x5b6188[_0x14cd8d(0xdb)](..._0x4207e1);if(_0x4207e1[_0x14cd8d(0xd8)]<_0x1690bb||_0x4dbc94&&_0x5b6188['length']>=_0x4dbc94[_0x14cd8d(0x10a)])return _0x5b6188;}}export async function resolveTenantCode(){const _0x89c860=a235_0x4625a3,_0x49aa5a=await getSessionUserInfo(),_0x2ee9a7=_0x49aa5a?.[_0x89c860(0xca)]?.[_0x89c860(0xf2)]?.['tenant_code'];if(!_0x2ee9a7)throw CliErrors[_0x89c860(0xfe)](_0x89c860(0x111));return _0x2ee9a7;}function matchMember(_0x3aea6a,_0x26a3ad){const _0x48a848=a235_0x4625a3,_0x346af0=_0x26a3ad[_0x48a848(0xff)]()['toLowerCase']();return(_0x3aea6a[_0x48a848(0xd2)]??'')[_0x48a848(0xf7)]()===_0x346af0||(_0x3aea6a[_0x48a848(0xdd)]??'')[_0x48a848(0xf7)]()===_0x346af0;}export async function resolveUserRef(_0x98308a,_0x5ac47c=a235_0x4625a3(0xe2)){const _0x456165=a235_0x4625a3,_0x3d3aa8=_0x98308a[_0x456165(0xff)]();if(!_0x3d3aa8)throw CliErrors['validation'](_0x456165(0x107),_0x456165(0xf9));const _0x1da376=await resolveTenantCode(),_0xb44cb6=await getTenantMembers(_0x1da376);if(/^\d+$/[_0x456165(0xdc)](_0x3d3aa8)){const _0x2a856b=Number(_0x3d3aa8),_0x2c6f82=_0xb44cb6[_0x456165(0xf8)](_0x5a0e8e=>_0x5a0e8e[_0x456165(0xcf)]===_0x2a856b);return{'userId':_0x2a856b,'username':_0x2c6f82?.['username']??String(_0x2a856b),'nickname':_0x2c6f82?.[_0x456165(0xd2)],'matchedBy':'id'};}const _0x53fda2=_0xb44cb6[_0x456165(0xed)](_0x3a51d9=>matchMember(_0x3a51d9,_0x3d3aa8));if(_0x53fda2[_0x456165(0xd8)]===0x0)throw CliErrors[_0x456165(0xd4)](_0x456165(0xfd)+_0x3d3aa8+'\x22.',_0x456165(0xd6)+_0x5ac47c);if(_0x53fda2[_0x456165(0xd8)]>0x1){const _0xa492e5=_0x53fda2[_0x456165(0x10d)](_0x2030a5=>(_0x2030a5['nickname']??_0x2030a5[_0x456165(0xdd)]??'?')+'('+_0x2030a5['userId']+')')['join'](',\x20');throw CliErrors[_0x456165(0xd4)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x3d3aa8+_0x456165(0xea)+_0xa492e5+'.',_0x5ac47c);}const _0x100a88=_0x53fda2[0x0];return{'userId':_0x100a88[_0x456165(0xcf)],'username':_0x100a88['username']??String(_0x100a88['userId']),'nickname':_0x100a88[_0x456165(0xd2)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a235_0x4625a3(0xe9);function a235_0x162a(){const _0x3bcb22=['User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','POST','dryRun','name','ADMIN','remark','\x22\x20is\x20ambiguous\x20(ids:\x20','Missing\x20user\x20reference.','/smartapi/permit/user-role/delete','User\x20','totalCount','49890pJinsV','\x20duplicate\x20memberships\x20for\x20user\x20','map','Role\x20id\x20','Optional\x20role\x20remark/description','Removed\x20','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','number','Cannot\x20','roleName','Disambiguate\x20with\x20--role\x20<id>.','user','2978125EhwItv','includes','OWNER','appCode','userId','expect-user-count','4494dOCYgS','nickname','5Ggfysw','validation','Role\x20name\x20\x22','Check\x20the\x20nickname/username.\x20','2179557jpMInp','length','\x20is\x20already\x20a\x20member\x20of\x20role\x20','\x20not\x20found\x20in\x20app\x20','push','test','username','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','expectUserCount','Role\x20name','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','Pass\x20--user\x20<id>.','string','8RkeIEY','str','\x20built-in\x20role\x20','Anti-drift\x20check\x20failed:\x20expected\x20','flagMissing','/smartapi/permit/user-role/create','\x22:\x20','Missing\x20role\x20reference.','roleType','filter','role','29996EJnRGc','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','user-add','tenant','189426nIFAid',';\x20no\x20change.','CUSTOM','3829pfhOBR','toLowerCase','find','Pass\x20--user\x20<id|name>.','flag','Pass\x20--role\x20<id|name>.','434576ZolkEA','No\x20tenant\x20member\x20matches\x20\x22','authRequired','trim'];a235_0x162a=function(){return _0x3bcb22;};return a235_0x162a();}export const DELETE_USER_ROLE_PATH=a235_0x4625a3(0x108);export function computeRoleUserMutation(_0x429443){const _0x216b5c=a235_0x4625a3,{operation:_0x637185,appCode:_0x293b07,role:_0x5f11e7,relations:_0x4aaaa7,user:_0x15469a}=_0x429443,_0x3e6651=[...new Set(_0x4aaaa7[_0x216b5c(0x10d)](_0x170551=>_0x170551[_0x216b5c(0xcf)]))],_0x19d3dc=[];if(_0x429443['expectUserCount']!==undefined&&_0x429443['expectUserCount']!==_0x3e6651[_0x216b5c(0xd8)])throw CliErrors[_0x216b5c(0xd4)](_0x216b5c(0xe7)+_0x429443[_0x216b5c(0xdf)]+'\x20member(s)\x20but\x20role\x20has\x20'+_0x3e6651['length']+'.',_0x216b5c(0xe1));const _0x5c0dd0=_0x3e6651[_0x216b5c(0xcc)](_0x15469a[_0x216b5c(0xcf)]),_0x161168=_0x4aaaa7[_0x216b5c(0xed)](_0xf6e72b=>_0xf6e72b[_0x216b5c(0xcf)]===_0x15469a[_0x216b5c(0xcf)])[_0x216b5c(0x10d)](_0x50855f=>_0x50855f['id']),_0x30b3f3=_0x637185===_0x216b5c(0xf1)?!_0x5c0dd0:_0x5c0dd0;let _0x30417c=_0x3e6651;_0x637185===_0x216b5c(0xf1)?_0x5c0dd0?_0x19d3dc[_0x216b5c(0xdb)](_0x216b5c(0x109)+_0x15469a[_0x216b5c(0xcf)]+_0x216b5c(0xd9)+_0x5f11e7['roleName']+_0x216b5c(0xf4)):_0x30417c=[..._0x3e6651,_0x15469a[_0x216b5c(0xcf)]]:!_0x5c0dd0?_0x19d3dc[_0x216b5c(0xdb)]('User\x20'+_0x15469a[_0x216b5c(0xcf)]+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x5f11e7[_0x216b5c(0xc8)]+_0x216b5c(0xf4)):(_0x30417c=_0x3e6651[_0x216b5c(0xed)](_0x43fe01=>_0x43fe01!==_0x15469a['userId']),_0x161168[_0x216b5c(0xd8)]>0x1&&_0x19d3dc[_0x216b5c(0xdb)](_0x216b5c(0x110)+_0x161168[_0x216b5c(0xd8)]+_0x216b5c(0x10c)+_0x15469a[_0x216b5c(0xcf)]+'.'));const _0x4a90cf={'scope':'dev','operation':_0x637185,'selector':{'appCode':_0x293b07,'roleId':_0x5f11e7['id'],'roleName':_0x5f11e7[_0x216b5c(0xc8)],'userId':_0x15469a['userId']},'before':{'userIds':_0x3e6651},'after':{'userIds':_0x30417c},'dryRun':_0x429443[_0x216b5c(0x102)],'backend':{'method':_0x216b5c(0x101),'path':_0x637185==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x19d3dc};return{'mutation':_0x4a90cf,'changed':_0x30b3f3,'matchingRelationIds':_0x161168};}export async function loadDevRoleRelations(_0x2f4aa1,_0x1bea0d){const _0x2720c1=a235_0x4625a3,_0x38c299=0x64,_0x389459=[];for(let _0xffced2=0x1;;_0xffced2+=0x1){const {items:_0x28039b,paging:_0x1b9875}=await listDevUserRoleRelations(_0x2f4aa1,{'roleId':_0x1bea0d,'currentPage':_0xffced2,'pageSize':_0x38c299});_0x389459[_0x2720c1(0xdb)](..._0x28039b);if(_0x28039b['length']<_0x38c299||_0x1b9875&&_0x389459[_0x2720c1(0xd8)]>=_0x1b9875[_0x2720c1(0x10a)])return _0x389459;}}export function readRoleRef(_0x3c1519){const _0x2c5ef0=a235_0x4625a3,_0x2b0d10=_0x3c1519[_0x2c5ef0(0xe5)](_0x2c5ef0(0xee))[_0x2c5ef0(0xff)]();if(!_0x2b0d10)throw CliErrors['flagMissing'](_0x2c5ef0(0xee),'Pass\x20--role\x20<id|name>.');return _0x2b0d10;}export async function prepareUserMutation(_0x517b5c,_0x51bb36,_0x1d62ff){const _0x519104=a235_0x4625a3,_0x128f2a=readRoleRef(_0x517b5c),_0x4435e1=_0x517b5c['str']('user')[_0x519104(0xff)]();if(!_0x4435e1)throw CliErrors[_0x519104(0xe8)]('user',_0x519104(0xf9));const _0x56b89e=_0x517b5c[_0x519104(0xfa)](_0x519104(0xd0)),_0x440d54=_0x56b89e===undefined||_0x56b89e===null?undefined:Number(_0x56b89e),_0x4f38cc=await resolveRoleRef(_0x517b5c[_0x519104(0xce)],_0x128f2a);if(_0x4f38cc[_0x519104(0xec)]===_0x519104(0xcd))throw CliErrors[_0x519104(0xd4)](_0x519104(0x113)+_0x51bb36+'\x20members\x20of\x20the\x20OWNER\x20role.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x112afe=await resolveUserRef(_0x4435e1),_0x229605=await loadDevRoleRelations(_0x517b5c[_0x519104(0xce)],_0x4f38cc['id']);return{...computeRoleUserMutation({'operation':_0x51bb36,'appCode':_0x517b5c[_0x519104(0xce)],'role':_0x4f38cc,'relations':_0x229605,'user':{'userId':_0x112afe[_0x519104(0xcf)],'username':_0x112afe[_0x519104(0xdd)],'nickname':_0x112afe[_0x519104(0xd2)]},'dryRun':_0x1d62ff,..._0x440d54!==undefined?{'expectUserCount':_0x440d54}:{}}),'role':_0x4f38cc,'user':_0x112afe};}
@@ -1 +1 @@
1
- const a236_0x5b9f41=a236_0x4cef;(function(_0x19689d,_0x2fc6fd){const _0x16af85=a236_0x4cef,_0x411b9c=_0x19689d();while(!![]){try{const _0xa8685d=-parseInt(_0x16af85(0x20e))/0x1*(-parseInt(_0x16af85(0x206))/0x2)+-parseInt(_0x16af85(0x1f3))/0x3+parseInt(_0x16af85(0x1fd))/0x4*(parseInt(_0x16af85(0x1f6))/0x5)+parseInt(_0x16af85(0x212))/0x6*(-parseInt(_0x16af85(0x1fb))/0x7)+parseInt(_0x16af85(0x214))/0x8*(parseInt(_0x16af85(0x210))/0x9)+-parseInt(_0x16af85(0x20b))/0xa*(parseInt(_0x16af85(0x213))/0xb)+parseInt(_0x16af85(0x1f7))/0xc;if(_0xa8685d===_0x2fc6fd)break;else _0x411b9c['push'](_0x411b9c['shift']());}catch(_0x2f6493){_0x411b9c['push'](_0x411b9c['shift']());}}}(a236_0x5b57,0xe895d));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a236_0x4cef(_0x358f71,_0x3f1f0c){_0x358f71=_0x358f71-0x1f3;const _0x5b57e4=a236_0x5b57();let _0x4cefa0=_0x5b57e4[_0x358f71];return _0x4cefa0;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a236_0x5b9f41(0x1fa);function readPatch(_0x1fe088){const _0xeaec2a=a236_0x5b9f41,_0x1a7e4f=_0x1fe088[_0xeaec2a(0x207)](_0xeaec2a(0x1ff)),_0xa7f62a=_0x1fe088[_0xeaec2a(0x207)](_0xeaec2a(0x200)),_0x1eb0dc={};if(_0x1a7e4f!==undefined&&_0x1a7e4f!==null){const _0x3f183f=String(_0x1a7e4f)[_0xeaec2a(0x20c)]();if(!_0x3f183f)throw CliErrors['validation'](_0xeaec2a(0x1f5));if(_0x3f183f[_0xeaec2a(0x205)]>0x40)throw CliErrors[_0xeaec2a(0x211)](_0xeaec2a(0x208));_0x1eb0dc[_0xeaec2a(0x1fc)]=_0x3f183f;}_0xa7f62a!==undefined&&_0xa7f62a!==null&&(_0x1eb0dc['remark']=String(_0xa7f62a));if(_0x1eb0dc['roleName']===undefined&&_0x1eb0dc[_0xeaec2a(0x200)]===undefined)throw CliErrors[_0xeaec2a(0x211)]('Nothing\x20to\x20update.',_0xeaec2a(0x209));return _0x1eb0dc;}export const roleUpdate={'service':'role','command':a236_0x5b9f41(0x204),'description':a236_0x5b9f41(0x20a),'risk':a236_0x5b9f41(0x1fe),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x5b9f41(0x1ff),'type':a236_0x5b9f41(0x1f4),'required':![],'description':a236_0x5b9f41(0x20d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3a0023){readPatch(_0x3a0023);},async 'dryRun'(_0x1ab135){const _0x3751d1=a236_0x5b9f41,_0x422d15=_0x1ab135['num']('id'),_0x18d90c=readPatch(_0x1ab135),_0x10207d=await getRoleById(_0x1ab135[_0x3751d1(0x20f)],_0x422d15);return assertCustomRole(_0x10207d,'update'),asDryRunResult({'scope':'dev','operation':_0x3751d1(0x204),'selector':{'appCode':_0x1ab135[_0x3751d1(0x20f)],'roleId':_0x422d15,'roleName':_0x10207d[_0x3751d1(0x1fc)]},'before':projectRole(_0x10207d),'after':projectRole({..._0x10207d,..._0x18d90c[_0x3751d1(0x1fc)]!==undefined?{'roleName':_0x18d90c[_0x3751d1(0x1fc)]}:{},..._0x18d90c[_0x3751d1(0x200)]!==undefined?{'remark':_0x18d90c[_0x3751d1(0x200)]}:{}}),'dryRun':!![],'backend':{'method':_0x3751d1(0x201),'path':UPDATE_PATH},'warnings':[]},{'method':_0x3751d1(0x201),'url':UPDATE_PATH});},async 'execute'(_0xc09f92){const _0x4badb5=a236_0x5b9f41,_0x32dba8=_0xc09f92[_0x4badb5(0x202)]('id'),_0x35b936=readPatch(_0xc09f92),_0x31387f=await getRoleById(_0xc09f92[_0x4badb5(0x20f)],_0x32dba8);assertCustomRole(_0x31387f,'update'),await updateAppRole({'id':_0x32dba8,'appCode':_0xc09f92[_0x4badb5(0x20f)],..._0x35b936[_0x4badb5(0x1fc)]!==undefined?{'roleName':_0x35b936['roleName']}:{},..._0x35b936[_0x4badb5(0x200)]!==undefined?{'remark':_0x35b936[_0x4badb5(0x200)]}:{}});const _0x2cf8f3=await getRoleById(_0xc09f92[_0x4badb5(0x20f)],_0x32dba8);return{'ok':!![],'data':{'scope':_0x4badb5(0x203),'operation':_0x4badb5(0x204),'selector':{'appCode':_0xc09f92[_0x4badb5(0x20f)],'roleId':_0x32dba8,'roleName':_0x2cf8f3[_0x4badb5(0x1fc)]},'before':projectRole(_0x31387f),'after':projectRole(_0x2cf8f3),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x4badb5(0x1f8)+_0x2cf8f3[_0x4badb5(0x1fc)]+_0x4badb5(0x1f9)+_0x32dba8+')'};}};function a236_0x5b57(){const _0x21c255=['POST','num','dev','update','length','10adxgOu','flag','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','18328270CGwUHl','trim','New\x20role\x20name','11453EgbRcq','appCode','13649247RjIhIA','validation','222KlpeFX','11kFgtol','8bbtbMk','631398akEmre','string','--name\x20cannot\x20be\x20empty.','565IgvXXj','17077032hmnmbf','Updated\x20role\x20','\x20(id=','/smartapi/permit/role/update','156695bpExVj','roleName','29284WLiKIV','write','name','remark'];a236_0x5b57=function(){return _0x21c255;};return a236_0x5b57();}
1
+ const a236_0x422e36=a236_0x12b7;function a236_0x4d8f(){const _0x309331=['102080TcnTIs','remark','New\x20role\x20name','num','2TFKUWn','name','/smartapi/permit/role/update','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','dev','--name\x20cannot\x20be\x20empty.','roleName','39244byzoBX','Nothing\x20to\x20update.','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','update','1010qxPyhk','795906tPBbam','appCode','464Sesnzc','9isAmUz','write','84195zKiTIy','2161545MlUmtP','validation','5661803xJYibx','865397KeGlAo','role','trim','\x20(id=','flag'];a236_0x4d8f=function(){return _0x309331;};return a236_0x4d8f();}(function(_0x2a7e48,_0x11df11){const _0x1947ab=a236_0x12b7,_0xf99b2a=_0x2a7e48();while(!![]){try{const _0x52c818=parseInt(_0x1947ab(0x141))/0x1*(parseInt(_0x1947ab(0x14a))/0x2)+parseInt(_0x1947ab(0x159))/0x3*(-parseInt(_0x1947ab(0x151))/0x4)+-parseInt(_0x1947ab(0x13e))/0x5+-parseInt(_0x1947ab(0x156))/0x6+parseInt(_0x1947ab(0x140))/0x7+-parseInt(_0x1947ab(0x158))/0x8*(-parseInt(_0x1947ab(0x15b))/0x9)+-parseInt(_0x1947ab(0x155))/0xa*(parseInt(_0x1947ab(0x146))/0xb);if(_0x52c818===_0x11df11)break;else _0xf99b2a['push'](_0xf99b2a['shift']());}catch(_0x375f96){_0xf99b2a['push'](_0xf99b2a['shift']());}}}(a236_0x4d8f,0xa7457));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a236_0x422e36(0x14c);function readPatch(_0x3fffda){const _0x5a5f18=a236_0x422e36,_0x52119d=_0x3fffda[_0x5a5f18(0x145)](_0x5a5f18(0x14b)),_0x20b50b=_0x3fffda[_0x5a5f18(0x145)](_0x5a5f18(0x147)),_0xe6d16d={};if(_0x52119d!==undefined&&_0x52119d!==null){const _0x121fdf=String(_0x52119d)[_0x5a5f18(0x143)]();if(!_0x121fdf)throw CliErrors[_0x5a5f18(0x13f)](_0x5a5f18(0x14f));if(_0x121fdf['length']>0x40)throw CliErrors['validation'](_0x5a5f18(0x153));_0xe6d16d[_0x5a5f18(0x150)]=_0x121fdf;}_0x20b50b!==undefined&&_0x20b50b!==null&&(_0xe6d16d[_0x5a5f18(0x147)]=String(_0x20b50b));if(_0xe6d16d['roleName']===undefined&&_0xe6d16d[_0x5a5f18(0x147)]===undefined)throw CliErrors[_0x5a5f18(0x13f)](_0x5a5f18(0x152),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0xe6d16d;}function a236_0x12b7(_0x5960a3,_0x3a531b){_0x5960a3=_0x5960a3-0x13e;const _0x4d8f10=a236_0x4d8f();let _0x12b7e0=_0x4d8f10[_0x5960a3];return _0x12b7e0;}export const roleUpdate={'service':a236_0x422e36(0x142),'command':a236_0x422e36(0x154),'description':a236_0x422e36(0x14d),'risk':a236_0x422e36(0x15a),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x422e36(0x14b),'type':'string','required':![],'description':a236_0x422e36(0x148)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x22288e){readPatch(_0x22288e);},async 'dryRun'(_0x27e9e6){const _0x5b7ad8=a236_0x422e36,_0x33c7f2=_0x27e9e6['num']('id'),_0xd27724=readPatch(_0x27e9e6),_0x79fd4f=await getRoleById(_0x27e9e6[_0x5b7ad8(0x157)],_0x33c7f2);return assertCustomRole(_0x79fd4f,_0x5b7ad8(0x154)),asDryRunResult({'scope':_0x5b7ad8(0x14e),'operation':_0x5b7ad8(0x154),'selector':{'appCode':_0x27e9e6[_0x5b7ad8(0x157)],'roleId':_0x33c7f2,'roleName':_0x79fd4f[_0x5b7ad8(0x150)]},'before':projectRole(_0x79fd4f),'after':projectRole({..._0x79fd4f,..._0xd27724[_0x5b7ad8(0x150)]!==undefined?{'roleName':_0xd27724['roleName']}:{},..._0xd27724[_0x5b7ad8(0x147)]!==undefined?{'remark':_0xd27724[_0x5b7ad8(0x147)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x5b0876){const _0xd43264=a236_0x422e36,_0x12fb1e=_0x5b0876[_0xd43264(0x149)]('id'),_0x8d7575=readPatch(_0x5b0876),_0x34c345=await getRoleById(_0x5b0876[_0xd43264(0x157)],_0x12fb1e);assertCustomRole(_0x34c345,'update'),await updateAppRole({'id':_0x12fb1e,'appCode':_0x5b0876[_0xd43264(0x157)],..._0x8d7575[_0xd43264(0x150)]!==undefined?{'roleName':_0x8d7575[_0xd43264(0x150)]}:{},..._0x8d7575[_0xd43264(0x147)]!==undefined?{'remark':_0x8d7575[_0xd43264(0x147)]}:{}});const _0x9777b6=await getRoleById(_0x5b0876[_0xd43264(0x157)],_0x12fb1e);return{'ok':!![],'data':{'scope':_0xd43264(0x14e),'operation':_0xd43264(0x154),'selector':{'appCode':_0x5b0876[_0xd43264(0x157)],'roleId':_0x12fb1e,'roleName':_0x9777b6[_0xd43264(0x150)]},'before':projectRole(_0x34c345),'after':projectRole(_0x9777b6),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x9777b6[_0xd43264(0x150)]+_0xd43264(0x144)+_0x12fb1e+')'};}};
@@ -1 +1 @@
1
- function a237_0x5af3(_0x40ca4a,_0x3391a6){_0x40ca4a=_0x40ca4a-0xfe;const _0x53b300=a237_0x53b3();let _0x5af383=_0x53b300[_0x40ca4a];return _0x5af383;}function a237_0x53b3(){const _0x275276=['user-add','userId','No\x20change:\x20user\x20','9068983RoWScm','20208NEkiLQ','79043BlyUzg','4zqIdoh','410XPKXhq','high-risk-write','16938hLUelN','4135312OHZjuM','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','roleName','130TTOSud','\x20already\x20in\x20role\x20','59742dQVkUa','appCode','296856KbyQBT','username','selector','role','roleType','1057WQwFNR'];a237_0x53b3=function(){return _0x275276;};return a237_0x53b3();}const a237_0x2ba698=a237_0x5af3;(function(_0x192943,_0x3abf00){const _0x2b5336=a237_0x5af3,_0x3ee46a=_0x192943();while(!![]){try{const _0x304ca2=parseInt(_0x2b5336(0x112))/0x1*(-parseInt(_0x2b5336(0x113))/0x2)+parseInt(_0x2b5336(0x107))/0x3+-parseInt(_0x2b5336(0x111))/0x4*(-parseInt(_0x2b5336(0x114))/0x5)+-parseInt(_0x2b5336(0xff))/0x6*(-parseInt(_0x2b5336(0x10c))/0x7)+parseInt(_0x2b5336(0x100))/0x8+parseInt(_0x2b5336(0x105))/0x9*(-parseInt(_0x2b5336(0x103))/0xa)+-parseInt(_0x2b5336(0x110))/0xb;if(_0x304ca2===_0x3abf00)break;else _0x3ee46a['push'](_0x3ee46a['shift']());}catch(_0x474b25){_0x3ee46a['push'](_0x3ee46a['shift']());}}}(a237_0x53b3,0x5e9f2));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a237_0x2ba698(0x10a),'command':'user-add','description':a237_0x2ba698(0x101),'risk':a237_0x2ba698(0xfe),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2b3637){const _0x220844=a237_0x2ba698,{mutation:_0x5a1c24}=await prepareUserMutation(_0x2b3637,_0x220844(0x10d),!![]);return asDryRunResult(_0x5a1c24,{'method':'POST','url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x11a3e3){const _0x577841=a237_0x2ba698,{mutation:_0x36b127,changed:_0x94a97e,role:_0x4bef95,user:_0x343f7e}=await prepareUserMutation(_0x11a3e3,'user-add',![]);return _0x94a97e&&await createDevUserRole({'appCode':_0x11a3e3[_0x577841(0x106)],'userId':_0x343f7e['userId'],'username':_0x343f7e[_0x577841(0x108)],'roleType':_0x4bef95[_0x577841(0x10b)],'roleId':_0x36b127[_0x577841(0x109)]['roleId']}),{'ok':!![],'data':_0x36b127,'message':_0x94a97e?'Added\x20user\x20'+_0x36b127['selector'][_0x577841(0x10e)]+'\x20to\x20role\x20'+_0x36b127[_0x577841(0x109)][_0x577841(0x102)]:_0x577841(0x10f)+_0x36b127[_0x577841(0x109)][_0x577841(0x10e)]+_0x577841(0x104)+_0x36b127[_0x577841(0x109)]['roleName']};}};
1
+ const a237_0x3118a7=a237_0x269d;(function(_0x39b8eb,_0x27e041){const _0x45c6b9=a237_0x269d,_0x885dfa=_0x39b8eb();while(!![]){try{const _0x3f1419=-parseInt(_0x45c6b9(0x107))/0x1*(-parseInt(_0x45c6b9(0x104))/0x2)+-parseInt(_0x45c6b9(0x106))/0x3+-parseInt(_0x45c6b9(0xf5))/0x4+-parseInt(_0x45c6b9(0xf3))/0x5*(parseInt(_0x45c6b9(0xfd))/0x6)+-parseInt(_0x45c6b9(0x103))/0x7*(parseInt(_0x45c6b9(0xff))/0x8)+parseInt(_0x45c6b9(0xfb))/0x9*(-parseInt(_0x45c6b9(0xf1))/0xa)+parseInt(_0x45c6b9(0x100))/0xb;if(_0x3f1419===_0x27e041)break;else _0x885dfa['push'](_0x885dfa['shift']());}catch(_0x59b5ef){_0x885dfa['push'](_0x885dfa['shift']());}}}(a237_0x3cb2,0x7a8d5));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a237_0x269d(_0x56af1f,_0x278b9b){_0x56af1f=_0x56af1f-0xf0;const _0x3cb283=a237_0x3cb2();let _0x269d25=_0x3cb283[_0x56af1f];return _0x269d25;}import{asDryRunResult}from'../../commands/common/dry-run.js';function a237_0x3cb2(){const _0x49977a=['23442hPyvfK','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','485343rVGgKu','3YeXiHP','POST','username','5033590nxewVK','selector','376180fRRtFQ','Added\x20user\x20','2619900MhukYx','high-risk-write','user-add','userId','role','roleName','9Mztkat','\x20to\x20role\x20','18ZkzVhz','roleType','169248dmbtuG','25396987qWiNFK','appCode','\x20already\x20in\x20role\x20','98GdTYkf'];a237_0x3cb2=function(){return _0x49977a;};return a237_0x3cb2();}import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a237_0x3118a7(0xf9),'command':'user-add','description':a237_0x3118a7(0x105),'risk':a237_0x3118a7(0xf6),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x549bee){const _0x229729=a237_0x3118a7,{mutation:_0x5f02fc}=await prepareUserMutation(_0x549bee,_0x229729(0xf7),!![]);return asDryRunResult(_0x5f02fc,{'method':_0x229729(0x108),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x1619e6){const _0x39af81=a237_0x3118a7,{mutation:_0x149cfb,changed:_0x2c4e1c,role:_0x28bdf8,user:_0x5d5a7b}=await prepareUserMutation(_0x1619e6,_0x39af81(0xf7),![]);return _0x2c4e1c&&await createDevUserRole({'appCode':_0x1619e6[_0x39af81(0x101)],'userId':_0x5d5a7b[_0x39af81(0xf8)],'username':_0x5d5a7b[_0x39af81(0xf0)],'roleType':_0x28bdf8[_0x39af81(0xfe)],'roleId':_0x149cfb[_0x39af81(0xf2)]['roleId']}),{'ok':!![],'data':_0x149cfb,'message':_0x2c4e1c?_0x39af81(0xf4)+_0x149cfb[_0x39af81(0xf2)][_0x39af81(0xf8)]+_0x39af81(0xfc)+_0x149cfb[_0x39af81(0xf2)][_0x39af81(0xfa)]:'No\x20change:\x20user\x20'+_0x149cfb[_0x39af81(0xf2)][_0x39af81(0xf8)]+_0x39af81(0x102)+_0x149cfb[_0x39af81(0xf2)]['roleName']};}};
@@ -1 +1 @@
1
- const a238_0x4d7b56=a238_0x14b0;(function(_0x3edc87,_0xac560e){const _0x2dd2d9=a238_0x14b0,_0x1847d9=_0x3edc87();while(!![]){try{const _0x5ceeed=parseInt(_0x2dd2d9(0x109))/0x1+-parseInt(_0x2dd2d9(0x11a))/0x2+parseInt(_0x2dd2d9(0x110))/0x3+parseInt(_0x2dd2d9(0x119))/0x4*(parseInt(_0x2dd2d9(0x111))/0x5)+-parseInt(_0x2dd2d9(0x112))/0x6+-parseInt(_0x2dd2d9(0x10e))/0x7*(-parseInt(_0x2dd2d9(0x113))/0x8)+parseInt(_0x2dd2d9(0x118))/0x9*(-parseInt(_0x2dd2d9(0x10b))/0xa);if(_0x5ceeed===_0xac560e)break;else _0x1847d9['push'](_0x1847d9['shift']());}catch(_0xf1c415){_0x1847d9['push'](_0x1847d9['shift']());}}}(a238_0x2dc7,0x4ed94));import{deleteDevUserRole}from'../../core/api-client.js';function a238_0x2dc7(){const _0x3a04aa=['roleName','814854vBBiAA','459065QVIVNu','793602YykGBB','877408yZxrmB','Removed\x20user\x20','userId','role','high-risk-write','97938PiovhE','8pFyfPL','730286MyuoEI','253742hkJoKo','POST','200sZxOZl','user-remove','selector','21vkFNrO'];a238_0x2dc7=function(){return _0x3a04aa;};return a238_0x2dc7();}function a238_0x14b0(_0x50a26f,_0x513b53){_0x50a26f=_0x50a26f-0x109;const _0x2dc7e8=a238_0x2dc7();let _0x14b0b0=_0x2dc7e8[_0x50a26f];return _0x14b0b0;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a238_0x4d7b56(0x116),'command':a238_0x4d7b56(0x10c),'description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a238_0x4d7b56(0x117),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x5cbcfa){const _0x4474f6=a238_0x4d7b56,{mutation:_0x5954e5}=await prepareUserMutation(_0x5cbcfa,_0x4474f6(0x10c),!![]);return asDryRunResult(_0x5954e5,{'method':_0x4474f6(0x10a),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x1a1f8e){const _0x51144f=a238_0x4d7b56,{matchingRelationIds:_0x20a1fa,mutation:_0x20250b,changed:_0x26ff03}=await prepareUserMutation(_0x1a1f8e,_0x51144f(0x10c),![]);if(_0x26ff03)for(const _0x3bf667 of _0x20a1fa){await deleteDevUserRole(_0x3bf667);}return{'ok':!![],'data':_0x20250b,'message':_0x26ff03?_0x51144f(0x114)+_0x20250b[_0x51144f(0x10d)]['userId']+'\x20from\x20role\x20'+_0x20250b[_0x51144f(0x10d)][_0x51144f(0x10f)]:'No\x20change:\x20user\x20'+_0x20250b[_0x51144f(0x10d)][_0x51144f(0x115)]+'\x20not\x20in\x20role\x20'+_0x20250b[_0x51144f(0x10d)][_0x51144f(0x10f)]};}};
1
+ const a238_0x5ef0c5=a238_0x4499;(function(_0xe98b55,_0x211265){const _0x4e4611=a238_0x4499,_0x33ec5d=_0xe98b55();while(!![]){try{const _0x1987d1=parseInt(_0x4e4611(0x10f))/0x1*(parseInt(_0x4e4611(0x10a))/0x2)+-parseInt(_0x4e4611(0x115))/0x3+-parseInt(_0x4e4611(0x105))/0x4*(-parseInt(_0x4e4611(0x108))/0x5)+-parseInt(_0x4e4611(0xfe))/0x6*(parseInt(_0x4e4611(0x106))/0x7)+-parseInt(_0x4e4611(0x109))/0x8+-parseInt(_0x4e4611(0x100))/0x9*(parseInt(_0x4e4611(0xff))/0xa)+-parseInt(_0x4e4611(0x10d))/0xb*(-parseInt(_0x4e4611(0x113))/0xc);if(_0x1987d1===_0x211265)break;else _0x33ec5d['push'](_0x33ec5d['shift']());}catch(_0x202ccd){_0x33ec5d['push'](_0x33ec5d['shift']());}}}(a238_0x35e1,0x7e92f));function a238_0x4499(_0x8b365e,_0x5af37b){_0x8b365e=_0x8b365e-0xfe;const _0x35e121=a238_0x35e1();let _0x4499ec=_0x35e121[_0x8b365e];return _0x4499ec;}function a238_0x35e1(){const _0x331c94=['13326laKAON','36070wPQBcq','459MtkeYT','userId','No\x20change:\x20user\x20','POST','high-risk-write','12myuRXY','2149EARprQ','role','1156585WDjUxm','281136FxTQyf','22dbmViv','user-remove','\x20from\x20role\x20','11zqANBr','Removed\x20user\x20','31216wFzQlb','selector','roleName','\x20not\x20in\x20role\x20','16395708wFJdji','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','2952729wJvOkk'];a238_0x35e1=function(){return _0x331c94;};return a238_0x35e1();}import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a238_0x5ef0c5(0x107),'command':a238_0x5ef0c5(0x10b),'description':a238_0x5ef0c5(0x114),'risk':a238_0x5ef0c5(0x104),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x581643){const _0x1f6949=a238_0x5ef0c5,{mutation:_0x5ed2a0}=await prepareUserMutation(_0x581643,_0x1f6949(0x10b),!![]);return asDryRunResult(_0x5ed2a0,{'method':_0x1f6949(0x103),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0xa756db){const _0x1912ce=a238_0x5ef0c5,{matchingRelationIds:_0x584287,mutation:_0x44b0ce,changed:_0x56782a}=await prepareUserMutation(_0xa756db,_0x1912ce(0x10b),![]);if(_0x56782a)for(const _0x5cf5b9 of _0x584287){await deleteDevUserRole(_0x5cf5b9);}return{'ok':!![],'data':_0x44b0ce,'message':_0x56782a?_0x1912ce(0x10e)+_0x44b0ce[_0x1912ce(0x110)][_0x1912ce(0x101)]+_0x1912ce(0x10c)+_0x44b0ce[_0x1912ce(0x110)][_0x1912ce(0x111)]:_0x1912ce(0x102)+_0x44b0ce[_0x1912ce(0x110)]['userId']+_0x1912ce(0x112)+_0x44b0ce[_0x1912ce(0x110)][_0x1912ce(0x111)]};}};
@@ -1 +1 @@
1
- const a239_0xfacab3=a239_0x4037;function a239_0x4037(_0x2ce07f,_0x1c1502){_0x2ce07f=_0x2ce07f-0x19d;const _0x78d83d=a239_0x78d8();let _0x403771=_0x78d83d[_0x2ce07f];return _0x403771;}(function(_0x140fc2,_0x3a46f2){const _0x3ec675=a239_0x4037,_0x3d708c=_0x140fc2();while(!![]){try{const _0x4b09a=-parseInt(_0x3ec675(0x1aa))/0x1+-parseInt(_0x3ec675(0x1b1))/0x2*(-parseInt(_0x3ec675(0x1ae))/0x3)+parseInt(_0x3ec675(0x19f))/0x4+-parseInt(_0x3ec675(0x1ad))/0x5*(parseInt(_0x3ec675(0x1a8))/0x6)+-parseInt(_0x3ec675(0x1a1))/0x7+parseInt(_0x3ec675(0x19e))/0x8*(parseInt(_0x3ec675(0x1b4))/0x9)+parseInt(_0x3ec675(0x1a4))/0xa;if(_0x4b09a===_0x3a46f2)break;else _0x3d708c['push'](_0x3d708c['shift']());}catch(_0xe33980){_0x3d708c['push'](_0x3d708c['shift']());}}}(a239_0x78d8,0x588e2));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a239_0x78d8(){const _0x1580bc=['user-resolve','username','3472260oAQOdU','str','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','userId','3243918YwOCQz','\x22\x20→\x20userId\x20','3386jKcAKN','Pass\x20--name\x20<nickname|username>.','nickname','5mJZAyQ','3ODcGlW','matchedBy','Resolved\x20\x22','457954MJtUFf','role','name','942255UnNTbX','trim','32tfdflw','939888Glousu','read','2262358kcdhxH'];a239_0x78d8=function(){return _0x1580bc;};return a239_0x78d8();}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0xfacab3(0x1b2),'command':a239_0xfacab3(0x1a2),'description':a239_0xfacab3(0x1a6),'risk':a239_0xfacab3(0x1a0),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5a6575){const _0x232ccb=a239_0xfacab3;if(!_0x5a6575[_0x232ccb(0x1a5)](_0x232ccb(0x1b3))[_0x232ccb(0x19d)]())throw CliErrors['flagMissing'](_0x232ccb(0x1b3),_0x232ccb(0x1ab));},async 'execute'(_0x14ae23){const _0x2c4815=a239_0xfacab3,_0x3cca27=_0x14ae23[_0x2c4815(0x1a5)](_0x2c4815(0x1b3))[_0x2c4815(0x19d)](),_0x4de02c=await resolveUserRef(_0x3cca27,'Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.');return{'ok':!![],'data':{'user':{'userId':_0x4de02c['userId'],'username':_0x4de02c[_0x2c4815(0x1a3)],'nickname':_0x4de02c[_0x2c4815(0x1ac)],'matchedBy':_0x4de02c[_0x2c4815(0x1af)]}},'message':_0x2c4815(0x1b0)+_0x3cca27+_0x2c4815(0x1a9)+_0x4de02c[_0x2c4815(0x1a7)]};}};
1
+ const a239_0xebfa89=a239_0x8b16;(function(_0x287af1,_0x354bcf){const _0xc3a20a=a239_0x8b16,_0x4b8bb8=_0x287af1();while(!![]){try{const _0x4e7213=-parseInt(_0xc3a20a(0x1ab))/0x1*(-parseInt(_0xc3a20a(0x1af))/0x2)+-parseInt(_0xc3a20a(0x1b2))/0x3+parseInt(_0xc3a20a(0x1b7))/0x4+-parseInt(_0xc3a20a(0x1ae))/0x5*(-parseInt(_0xc3a20a(0x1ad))/0x6)+parseInt(_0xc3a20a(0x1a8))/0x7*(parseInt(_0xc3a20a(0x1b4))/0x8)+-parseInt(_0xc3a20a(0x1b0))/0x9*(parseInt(_0xc3a20a(0x1bc))/0xa)+parseInt(_0xc3a20a(0x1b1))/0xb*(parseInt(_0xc3a20a(0x1ba))/0xc);if(_0x4e7213===_0x354bcf)break;else _0x4b8bb8['push'](_0x4b8bb8['shift']());}catch(_0x40c5ef){_0x4b8bb8['push'](_0x4b8bb8['shift']());}}}(a239_0x245c,0x1a2e4));function a239_0x245c(){const _0x4141d0=['userId','7gBklRI','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','role','5LxYNoB','user-resolve','6lvlvbd','569085IaybiB','4082ycaNfr','63dlVGth','11vEltHx','633432oFttVT','Resolved\x20\x22','1261192CWcazL','Pass\x20--name\x20<nickname|username>.','str','46328VoKcqN','trim','username','1971612PIVJhX','name','198820lMvwOv'];a239_0x245c=function(){return _0x4141d0;};return a239_0x245c();}function a239_0x8b16(_0x261b4a,_0x5134e9){_0x261b4a=_0x261b4a-0x1a8;const _0x245c4b=a239_0x245c();let _0x8b164c=_0x245c4b[_0x261b4a];return _0x8b164c;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0xebfa89(0x1aa),'command':a239_0xebfa89(0x1ac),'description':a239_0xebfa89(0x1a9),'risk':'read','flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5021c9){const _0x5d7197=a239_0xebfa89;if(!_0x5021c9[_0x5d7197(0x1b6)](_0x5d7197(0x1bb))[_0x5d7197(0x1b8)]())throw CliErrors['flagMissing'](_0x5d7197(0x1bb),_0x5d7197(0x1b5));},async 'execute'(_0x1df88b){const _0x29fcfa=a239_0xebfa89,_0x4f5b50=_0x1df88b[_0x29fcfa(0x1b6)]('name')[_0x29fcfa(0x1b8)](),_0x438498=await resolveUserRef(_0x4f5b50,'Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.');return{'ok':!![],'data':{'user':{'userId':_0x438498[_0x29fcfa(0x1bd)],'username':_0x438498[_0x29fcfa(0x1b9)],'nickname':_0x438498['nickname'],'matchedBy':_0x438498['matchedBy']}},'message':_0x29fcfa(0x1b3)+_0x4f5b50+'\x22\x20→\x20userId\x20'+_0x438498[_0x29fcfa(0x1bd)]};}};
@@ -1 +1 @@
1
- const a240_0x3a059c=a240_0x2732;(function(_0x508e81,_0x68697a){const _0x261ac8=a240_0x2732,_0x28225d=_0x508e81();while(!![]){try{const _0x2f8c57=-parseInt(_0x261ac8(0x122))/0x1*(parseInt(_0x261ac8(0x12a))/0x2)+-parseInt(_0x261ac8(0x131))/0x3*(-parseInt(_0x261ac8(0x123))/0x4)+-parseInt(_0x261ac8(0x129))/0x5*(parseInt(_0x261ac8(0x12c))/0x6)+-parseInt(_0x261ac8(0x126))/0x7*(-parseInt(_0x261ac8(0x121))/0x8)+parseInt(_0x261ac8(0x12b))/0x9*(parseInt(_0x261ac8(0x12d))/0xa)+-parseInt(_0x261ac8(0x124))/0xb+-parseInt(_0x261ac8(0x11c))/0xc*(parseInt(_0x261ac8(0x130))/0xd);if(_0x2f8c57===_0x68697a)break;else _0x28225d['push'](_0x28225d['shift']());}catch(_0x9920d1){_0x28225d['push'](_0x28225d['shift']());}}}(a240_0x18e2,0x22648));import{getAppRule}from'../../core/api-client.js';function a240_0x2732(_0x22f09e,_0xdae7e3){_0x22f09e=_0x22f09e-0x11c;const _0x18e2d8=a240_0x18e2();let _0x27324f=_0x18e2d8[_0x22f09e];return _0x27324f;}import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a240_0x3a059c(0x127),'command':'get','description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':a240_0x3a059c(0x12f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x53c73b){readAppRuleType(_0x53c73b);},async 'execute'(_0x29077f){const _0x5840ef=a240_0x3a059c,_0x5934d9=readAppRuleType(_0x29077f),_0x28fe6c=await getAppRule(_0x29077f[_0x5840ef(0x11f)],{'appCode':_0x29077f[_0x5840ef(0x132)],'type':_0x5934d9});if(!_0x28fe6c)throw appRuleError(_0x5840ef(0x11e),appRuleFileName(_0x5934d9)+_0x5840ef(0x125)+_0x29077f[_0x5840ef(0x132)]+'.',_0x5840ef(0x128)+_0x5934d9+_0x5840ef(0x11d));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x5934d9,_0x28fe6c),'content':_0x28fe6c[_0x5840ef(0x12e)]}},'message':'Loaded\x20'+appRuleFileName(_0x5934d9)+_0x5840ef(0x120)+_0x29077f['appCode']};}};function a240_0x18e2(){const _0x16dd1d=['112qYnClf','459HplGDD','186rIpSwB','53190vkANyc','content','read','377416cBenpZ','829659xoOmja','appCode','24yqVsOF','\x20--file\x20<path>\x20--dry-run`.','app_rule_not_found','cookie','\x20for\x20','12632oxgazr','3379YYqHyw','4GNTtWX','670560srnLkA','\x20is\x20not\x20configured\x20for\x20app\x20','427erqcoY','rule','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','31455MVMXoZ'];a240_0x18e2=function(){return _0x16dd1d;};return a240_0x18e2();}
1
+ const a240_0x17e939=a240_0x2246;(function(_0x4fde5c,_0x14e6cc){const _0x22058d=a240_0x2246,_0x45e4c7=_0x4fde5c();while(!![]){try{const _0x2f7752=-parseInt(_0x22058d(0x94))/0x1+parseInt(_0x22058d(0x93))/0x2+-parseInt(_0x22058d(0x8c))/0x3+-parseInt(_0x22058d(0x9d))/0x4+-parseInt(_0x22058d(0x9a))/0x5*(-parseInt(_0x22058d(0x92))/0x6)+-parseInt(_0x22058d(0xa2))/0x7*(-parseInt(_0x22058d(0x9e))/0x8)+-parseInt(_0x22058d(0x95))/0x9*(-parseInt(_0x22058d(0x8e))/0xa);if(_0x2f7752===_0x14e6cc)break;else _0x45e4c7['push'](_0x45e4c7['shift']());}catch(_0x5d566b){_0x45e4c7['push'](_0x45e4c7['shift']());}}}(a240_0x14b1,0xc48f7));function a240_0x14b1(){const _0x342415=['6gupyyn','2989414UWDwxv','973627PoQKhs','238599idshmA','\x20--file\x20<path>\x20--dry-run`.','\x20for\x20','get','appCode','6070105cCsYpb','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','read','2584880pSVyQG','11544ZbYvUA','Loaded\x20','app_rule_not_found','content','1967osGpsb','2147292UnzDmz','\x20is\x20not\x20configured\x20for\x20app\x20','10YsPVoL','cookie','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','rule'];a240_0x14b1=function(){return _0x342415;};return a240_0x14b1();}function a240_0x2246(_0x1a39cd,_0x58bfec){_0x1a39cd=_0x1a39cd-0x8c;const _0x14b14e=a240_0x14b1();let _0x2246c3=_0x14b14e[_0x1a39cd];return _0x2246c3;}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a240_0x17e939(0x91),'command':a240_0x17e939(0x98),'description':a240_0x17e939(0x9b),'risk':a240_0x17e939(0x9c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x5a9fa8){readAppRuleType(_0x5a9fa8);},async 'execute'(_0x3ad14e){const _0x5c6b88=a240_0x17e939,_0x17060e=readAppRuleType(_0x3ad14e),_0x23bbba=await getAppRule(_0x3ad14e[_0x5c6b88(0x8f)],{'appCode':_0x3ad14e['appCode'],'type':_0x17060e});if(!_0x23bbba)throw appRuleError(_0x5c6b88(0xa0),appRuleFileName(_0x17060e)+_0x5c6b88(0x8d)+_0x3ad14e[_0x5c6b88(0x99)]+'.',_0x5c6b88(0x90)+_0x17060e+_0x5c6b88(0x96));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x17060e,_0x23bbba),'content':_0x23bbba[_0x5c6b88(0xa1)]}},'message':_0x5c6b88(0x9f)+appRuleFileName(_0x17060e)+_0x5c6b88(0x97)+_0x3ad14e['appCode']};}};
@@ -1 +1 @@
1
- const a241_0x3b1d39=a241_0x2915;function a241_0x25d0(){const _0xe1932a=['16aZBAsF','2852055nGdSSP','991368AxSupN','dryRun','330743qfPZCw','execute','2949RksERO','639238nGiCeo','4990968OHYxQg','3288rJkpxV','map','signal','529555fwTWeM'];a241_0x25d0=function(){return _0xe1932a;};return a241_0x25d0();}(function(_0xddcffa,_0x4fdd31){const _0x4636f7=a241_0x2915,_0x2c8940=_0xddcffa();while(!![]){try{const _0x53426f=parseInt(_0x4636f7(0x113))/0x1+-parseInt(_0x4636f7(0x10e))/0x2+-parseInt(_0x4636f7(0x112))/0x3*(parseInt(_0x4636f7(0x115))/0x4)+parseInt(_0x4636f7(0x10b))/0x5+parseInt(_0x4636f7(0x114))/0x6+parseInt(_0x4636f7(0x110))/0x7*(parseInt(_0x4636f7(0x10c))/0x8)+parseInt(_0x4636f7(0x10d))/0x9;if(_0x53426f===_0x4fdd31)break;else _0x2c8940['push'](_0x2c8940['shift']());}catch(_0xe231ed){_0x2c8940['push'](_0x2c8940['shift']());}}}(a241_0x25d0,0xa7274));import{withKbManagementSession}from'../../core/kb-management-client.js';function a241_0x2915(_0xec1034,_0x2a6331){_0xec1034=_0xec1034-0x10a;const _0x25d056=a241_0x25d0();let _0x2915ab=_0x25d056[_0xec1034];return _0x2915ab;}import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet][a241_0x3b1d39(0x116)](_0x4b995e=>({..._0x4b995e,'execute':_0x490c2d=>withKbManagementSession(_0x490c2d[a241_0x3b1d39(0x10a)],()=>_0x4b995e[a241_0x3b1d39(0x111)](_0x490c2d)),..._0x4b995e[a241_0x3b1d39(0x10f)]?{'dryRun':_0x26783a=>withKbManagementSession(_0x26783a[a241_0x3b1d39(0x10a)],()=>_0x4b995e[a241_0x3b1d39(0x10f)](_0x26783a))}:{}}));
1
+ function a241_0x2a89(){const _0x3bc11e=['246CTzOIQ','3325hpviAy','6597720ZwLcfW','map','15426RmDxmI','signal','27129GbwgTM','1128834BjpCvU','execute','632pHYDWD','147843UpuvUX','798000SWigzw','10MLThuf','dryRun','5759853AmnYna'];a241_0x2a89=function(){return _0x3bc11e;};return a241_0x2a89();}const a241_0x147eb1=a241_0x412c;function a241_0x412c(_0x24f1f7,_0x3cda37){_0x24f1f7=_0x24f1f7-0x116;const _0x2a8991=a241_0x2a89();let _0x412c22=_0x2a8991[_0x24f1f7];return _0x412c22;}(function(_0xd26f00,_0xd36f04){const _0x49b630=a241_0x412c,_0x2ca8ca=_0xd26f00();while(!![]){try{const _0x386947=parseInt(_0x49b630(0x119))/0x1+-parseInt(_0x49b630(0x121))/0x2*(parseInt(_0x49b630(0x118))/0x3)+parseInt(_0x49b630(0x123))/0x4+-parseInt(_0x49b630(0x11d))/0x5+parseInt(_0x49b630(0x116))/0x6*(parseInt(_0x49b630(0x122))/0x7)+-parseInt(_0x49b630(0x11b))/0x8*(parseInt(_0x49b630(0x11c))/0x9)+parseInt(_0x49b630(0x11e))/0xa*(-parseInt(_0x49b630(0x120))/0xb);if(_0x386947===_0xd36f04)break;else _0x2ca8ca['push'](_0x2ca8ca['shift']());}catch(_0x21fa8f){_0x2ca8ca['push'](_0x2ca8ca['shift']());}}}(a241_0x2a89,0xdd404));import{withKbManagementSession}from'../../core/kb-management-client.js';import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet][a241_0x147eb1(0x124)](_0x5479e0=>({..._0x5479e0,'execute':_0x110e6e=>withKbManagementSession(_0x110e6e[a241_0x147eb1(0x117)],()=>_0x5479e0[a241_0x147eb1(0x11a)](_0x110e6e)),..._0x5479e0[a241_0x147eb1(0x11f)]?{'dryRun':_0x103c5f=>withKbManagementSession(_0x103c5f[a241_0x147eb1(0x117)],()=>_0x5479e0[a241_0x147eb1(0x11f)](_0x103c5f))}:{}}));
@@ -1 +1 @@
1
- const a242_0x5e3137=a242_0x1603;function a242_0x4b26(){const _0xd85fa7=['79472WyFoth','69ekAvtP','read','3352761xgrtWs','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','2470000BQZpps','243506tSxQSl','Loaded\x20app\x20rule\x20configuration\x20for\x20','5823640uSAogq','4190538wYvDaL','2017736gpRkXT','2bmQiSu','8qbSPZv','cookie','length','map','appCode'];a242_0x4b26=function(){return _0xd85fa7;};return a242_0x4b26();}(function(_0x1226eb,_0xb5b071){const _0x457e30=a242_0x1603,_0x201695=_0x1226eb();while(!![]){try{const _0x5be033=-parseInt(_0x457e30(0x1db))/0x1*(-parseInt(_0x457e30(0x1e7))/0x2)+-parseInt(_0x457e30(0x1e2))/0x3*(-parseInt(_0x457e30(0x1e1))/0x4)+parseInt(_0x457e30(0x1d8))/0x5+-parseInt(_0x457e30(0x1d9))/0x6+parseInt(_0x457e30(0x1da))/0x7+-parseInt(_0x457e30(0x1dc))/0x8*(parseInt(_0x457e30(0x1e4))/0x9)+-parseInt(_0x457e30(0x1e6))/0xa;if(_0x5be033===_0xb5b071)break;else _0x201695['push'](_0x201695['shift']());}catch(_0x400ad3){_0x201695['push'](_0x201695['shift']());}}}(a242_0x4b26,0xcbfa6));import{getAppRule}from'../../core/api-client.js';function a242_0x1603(_0x2044d2,_0x3eaa6d){_0x2044d2=_0x2044d2-0x1d8;const _0x4b2616=a242_0x4b26();let _0x1603cf=_0x4b2616[_0x2044d2];return _0x1603cf;}import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':'rule','command':'list','description':a242_0x5e3137(0x1e5),'risk':a242_0x5e3137(0x1e3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x5cea91){const _0x1f5ce0=a242_0x5e3137,_0x27a3fd=await Promise['all'](APP_RULE_TYPES[_0x1f5ce0(0x1df)](_0x35b9fa=>getAppRule(_0x5cea91[_0x1f5ce0(0x1dd)],{'appCode':_0x5cea91[_0x1f5ce0(0x1e0)],'type':_0x35b9fa}))),_0x2ef084=APP_RULE_TYPES['map']((_0x98df8f,_0xa544bf)=>projectAppRule(_0x98df8f,_0x27a3fd[_0xa544bf]??null));return{'ok':!![],'data':{'total':_0x2ef084[_0x1f5ce0(0x1de)],'rules':_0x2ef084},'message':_0x1f5ce0(0x1e8)+_0x5cea91[_0x1f5ce0(0x1e0)]};}};
1
+ const a242_0x182ba7=a242_0x49f0;(function(_0x81daf6,_0x4afa16){const _0x12767f=a242_0x49f0,_0x4d80ca=_0x81daf6();while(!![]){try{const _0x447d69=parseInt(_0x12767f(0x116))/0x1+-parseInt(_0x12767f(0x120))/0x2+-parseInt(_0x12767f(0x114))/0x3+-parseInt(_0x12767f(0x117))/0x4+parseInt(_0x12767f(0x11d))/0x5+parseInt(_0x12767f(0x11b))/0x6+-parseInt(_0x12767f(0x123))/0x7;if(_0x447d69===_0x4afa16)break;else _0x4d80ca['push'](_0x4d80ca['shift']());}catch(_0x1229ec){_0x4d80ca['push'](_0x4d80ca['shift']());}}}(a242_0x4f13,0x75b04));function a242_0x49f0(_0x5bdc4e,_0x5a50b6){_0x5bdc4e=_0x5bdc4e-0x114;const _0x4f13ca=a242_0x4f13();let _0x49f0fc=_0x4f13ca[_0x5bdc4e];return _0x49f0fc;}import{getAppRule}from'../../core/api-client.js';function a242_0x4f13(){const _0x1bd802=['length','Loaded\x20app\x20rule\x20configuration\x20for\x20','121198irIvpn','410562FKptIp','map','48107smfCLG','824364pEhAat','all','read','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','3120144GFKoqO','rule','3404885iFRMjX','cookie','appCode','813594IIyvvs'];a242_0x4f13=function(){return _0x1bd802;};return a242_0x4f13();}import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a242_0x182ba7(0x11c),'command':'list','description':a242_0x182ba7(0x11a),'risk':a242_0x182ba7(0x119),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x5b037a){const _0x1d4447=a242_0x182ba7,_0xc5f0bf=await Promise[_0x1d4447(0x118)](APP_RULE_TYPES[_0x1d4447(0x115)](_0x4e7a77=>getAppRule(_0x5b037a[_0x1d4447(0x11e)],{'appCode':_0x5b037a['appCode'],'type':_0x4e7a77}))),_0x4bd3c5=APP_RULE_TYPES[_0x1d4447(0x115)]((_0x1cf4bf,_0x390b4b)=>projectAppRule(_0x1cf4bf,_0xc5f0bf[_0x390b4b]??null));return{'ok':!![],'data':{'total':_0x4bd3c5[_0x1d4447(0x121)],'rules':_0x4bd3c5},'message':_0x1d4447(0x122)+_0x5b037a[_0x1d4447(0x11f)]};}};
@@ -1 +1 @@
1
- const a243_0x3a4a87=a243_0x457a;(function(_0x5307f8,_0x1676fe){const _0x2e32f3=a243_0x457a,_0x525b34=_0x5307f8();while(!![]){try{const _0x528312=-parseInt(_0x2e32f3(0xc2))/0x1+-parseInt(_0x2e32f3(0xd4))/0x2+-parseInt(_0x2e32f3(0xec))/0x3*(-parseInt(_0x2e32f3(0xcf))/0x4)+-parseInt(_0x2e32f3(0xf5))/0x5*(-parseInt(_0x2e32f3(0xf4))/0x6)+parseInt(_0x2e32f3(0xd7))/0x7*(-parseInt(_0x2e32f3(0xde))/0x8)+parseInt(_0x2e32f3(0xf1))/0x9+parseInt(_0x2e32f3(0xea))/0xa*(parseInt(_0x2e32f3(0xd6))/0xb);if(_0x528312===_0x1676fe)break;else _0x525b34['push'](_0x525b34['shift']());}catch(_0x13ac74){_0x525b34['push'](_0x525b34['shift']());}}}(a243_0x25e2,0x3c434));function a243_0x457a(_0x481ab8,_0x16d318){_0x481ab8=_0x481ab8-0xc1;const _0x25e220=a243_0x25e2();let _0x457a08=_0x25e220[_0x481ab8];return _0x457a08;}import{knowledgeDocumentsPath}from'../../core/api-client.js';import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';function a243_0x25e2(){const _0x3945c2=['Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','6egYoKl','1842890hzxHxQ','app_rule_content_too_large','DATABASE','isSafeInteger','input','length','unconfigured','beforeRecord','Pass\x20a\x20UTF-8\x20Markdown\x20file.','appCode','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','31864tfawxe','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','rules','app_rule_verification_unavailable','\x20for\x20','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','file','type','replacement','expected-version','string','Expected\x20','byteSize','20XFVjHe','The\x20received\x20rule\x20state\x20contradicts\x20the\x20requested\x20changes.','--file\x20is\x20required.','app_rule_set_outcome_unknown',';\x20current\x20version\x20is\x20','818984NpIOpz','\x20--format\x20compress','1211947QihOix','2480086IoViji','cookie','RULES','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','POST','flag','The\x20set\x20request\x20was\x20sent,\x20but\x20','8sEfSHV','update','verified','push','number','before','contentHash','planned','content','set','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','app_rule_verification_failed','10tfYFsK','\x20could\x20not\x20be\x20verified.','100797wzvKcT','rabetbase\x20rule\x20get\x20--type\x20','RULES\x20content\x20exceeds\x202000\x20UTF-16\x20units.','expectedVersion','version','3561660hANhoc','create'];a243_0x25e2=function(){return _0x3945c2;};return a243_0x25e2();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function readSetInput(_0x7e0133){const _0x1073f6=a243_0x457a,_0x3f6d7d=readAppRuleType(_0x7e0133),_0x4815d3=_0x7e0133['str'](_0x1073f6(0xc8))['trim']();if(!_0x4815d3)throw appRuleError('app_rule_file_required',_0x1073f6(0xd1),_0x1073f6(0xfd));const _0x2520cb=_0x7e0133[_0x1073f6(0xdc)](_0x1073f6(0xcb));let _0x15e25a;if(_0x2520cb!==undefined){_0x15e25a=Number(_0x2520cb);if(!Number[_0x1073f6(0xf8)](_0x15e25a)||_0x15e25a<0x0)throw appRuleError('app_rule_expected_version_invalid','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'type':_0x3f6d7d,'file':_0x4815d3,'expectedVersion':_0x15e25a};}async function prepareSet(_0x1cf1ca){const _0x400dfb=a243_0x457a,_0x1ba3ad=readSetInput(_0x1cf1ca),_0x4cca26=await readAppRuleFile(_0x1ba3ad[_0x400dfb(0xc8)]);if(_0x1ba3ad['type']===_0x400dfb(0xc4)&&_0x4cca26[_0x400dfb(0xe6)][_0x400dfb(0xfa)]>0x7d0)throw appRuleError(_0x400dfb(0xf6),_0x400dfb(0xee));const _0x2adbaa=await getAppRule(_0x1cf1ca[_0x400dfb(0xd8)],{'appCode':_0x1cf1ca[_0x400dfb(0xfe)],'type':_0x1ba3ad[_0x400dfb(0xc9)]});if(_0x1ba3ad['expectedVersion']!==undefined&&(_0x2adbaa?.['version']??0x0)!==_0x1ba3ad[_0x400dfb(0xef)])throw appRuleError('app_rule_version_mismatch',appRuleFileName(_0x1ba3ad[_0x400dfb(0xc9)])+'\x20version\x20changed\x20before\x20write.',_0x400dfb(0xcd)+_0x1ba3ad[_0x400dfb(0xef)]+_0x400dfb(0xd3)+(_0x2adbaa?.[_0x400dfb(0xf0)]??_0x400dfb(0xfb))+_0x400dfb(0xe8));return{'input':_0x1ba3ad,'replacement':_0x4cca26,'beforeRecord':_0x2adbaa,'before':projectAppRule(_0x1ba3ad[_0x400dfb(0xc9)],_0x2adbaa),'planned':{'type':_0x1ba3ad[_0x400dfb(0xc9)],'fileName':appRuleFileName(_0x1ba3ad['type']),'contextScope':appRuleContextScope(_0x1ba3ad[_0x400dfb(0xc9)]),'enabled':!![],'appCode':_0x1cf1ca[_0x400dfb(0xfe)],'scope':'rules','contentByteSize':_0x4cca26['byteSize'],'contentHash':_0x4cca26[_0x400dfb(0xe4)]}};}function warningsFor(_0x32ecbe){return[];}export const ruleSet={'service':'rule','command':a243_0x3a4a87(0xe7),'description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x3a4a87(0xc8),'type':a243_0x3a4a87(0xcc),'required':!![],'description':'UTF-8\x20Markdown\x20file\x20(RULES:\x202000\x20UTF-16\x20units;\x20DATABASE:\x205242880\x20units)'},{'name':'expected-version','type':a243_0x3a4a87(0xe2),'required':![],'description':a243_0x3a4a87(0xf3)}],async 'validate'(_0x4dd49b){readSetInput(_0x4dd49b);},async 'dryRun'(_0x15df51){const _0x1b2760=a243_0x3a4a87,_0x482f62=await prepareSet(_0x15df51);return asDryRunResult({'operation':_0x1b2760(0xe7),'selector':{'appCode':_0x15df51[_0x1b2760(0xfe)],'scope':'rules','type':_0x482f62[_0x1b2760(0xf9)][_0x1b2760(0xc9)]},'before':_0x482f62[_0x1b2760(0xe3)],'after':_0x482f62[_0x1b2760(0xe5)],'dryRun':!![],'backend':{'method':_0x1b2760(0xdb),'path':knowledgeDocumentsPath('rules',_0x482f62[_0x1b2760(0xfc)]?_0x1b2760(0xdf):_0x1b2760(0xf2)),'body':{'appCode':_0x15df51['appCode'],..._0x482f62[_0x1b2760(0xfc)]?{'id':_0x482f62[_0x1b2760(0xfc)]['id']}:{},'title':_0x482f62[_0x1b2760(0xf9)][_0x1b2760(0xc9)]===_0x1b2760(0xc4)?_0x1b2760(0xd9):_0x1b2760(0xf7),'contentHash':_0x482f62[_0x1b2760(0xca)][_0x1b2760(0xe4)],'contentByteSize':_0x482f62[_0x1b2760(0xca)][_0x1b2760(0xce)],..._0x482f62[_0x1b2760(0xfc)]?{'expectedVersion':_0x482f62['beforeRecord'][_0x1b2760(0xf0)]}:{}}},'warnings':warningsFor(_0x482f62[_0x1b2760(0xf9)]['expectedVersion']),'verification':{'expectedVersion':_0x482f62['beforeRecord']?.['version']??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x1b2760(0xed)+_0x482f62['input'][_0x1b2760(0xc9)]+_0x1b2760(0xd5)}},{'method':_0x1b2760(0xdb),'url':knowledgeDocumentsPath(_0x1b2760(0xc4),_0x482f62[_0x1b2760(0xfc)]?'update':_0x1b2760(0xf2))});},async 'execute'(_0x542289){const _0x4b71c7=a243_0x3a4a87,_0x463058=await prepareSet(_0x542289),_0x47b545=_0x463058[_0x4b71c7(0xfc)]===null?0x1:_0x463058[_0x4b71c7(0xfc)][_0x4b71c7(0xf0)]+(_0x463058[_0x4b71c7(0xfc)][_0x4b71c7(0xe6)]===_0x463058[_0x4b71c7(0xca)][_0x4b71c7(0xe6)]?0x0:0x1);let _0x190d8e,_0x5501cf=![];try{_0x190d8e=await saveAppRule(_0x542289[_0x4b71c7(0xd8)],{'appCode':_0x542289['appCode'],'type':_0x463058[_0x4b71c7(0xf9)][_0x4b71c7(0xc9)],'content':_0x463058[_0x4b71c7(0xca)][_0x4b71c7(0xe6)],'expectedVersion':_0x463058[_0x4b71c7(0xfc)]?.[_0x4b71c7(0xf0)]??0x0,..._0x463058[_0x4b71c7(0xfc)]?{'id':_0x463058[_0x4b71c7(0xfc)]['id']}:{}});if(_0x190d8e[_0x4b71c7(0xf0)]!==_0x47b545||_0x190d8e[_0x4b71c7(0xe6)]!==_0x463058['replacement']['content']||_0x463058[_0x4b71c7(0xfc)]!==null&&_0x190d8e['id']!==_0x463058[_0x4b71c7(0xfc)]['id'])throw appRuleError('app_rule_verification_failed',_0x4b71c7(0xd0),'Use\x20read-only\x20rule\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.');}catch(_0x476125){if(!isPlatformTransportFailure(_0x476125))throw _0x476125;_0x5501cf=!![];}let _0x213f60;try{_0x213f60=await getAppRule(_0x542289[_0x4b71c7(0xd8)],{'appCode':_0x542289[_0x4b71c7(0xfe)],'type':_0x463058[_0x4b71c7(0xf9)][_0x4b71c7(0xc9)]});}catch(_0x38b4cb){const _0x15fa46=appRuleError(_0x5501cf?_0x4b71c7(0xd2):_0x4b71c7(0xc5),_0x4b71c7(0xdd)+appRuleFileName(_0x463058['input'][_0x4b71c7(0xc9)])+_0x4b71c7(0xeb),_0x4b71c7(0xda));Object['defineProperty'](_0x15fa46,'cause',{'value':_0x38b4cb,'enumerable':![]});throw _0x15fa46;}const _0x4ab1a7=_0x213f60&&inspectAppRuleContent(_0x213f60['content'])[_0x4b71c7(0xe4)]===_0x463058[_0x4b71c7(0xca)][_0x4b71c7(0xe4)],_0x4346b7=_0x213f60&&_0x213f60[_0x4b71c7(0xf0)]===_0x47b545&&(!_0x190d8e||_0x213f60['id']===_0x190d8e['id']&&_0x213f60[_0x4b71c7(0xf0)]===_0x190d8e['version']);if(!_0x213f60||!_0x4ab1a7||!_0x4346b7||_0x463058[_0x4b71c7(0xfc)]!==null&&_0x213f60['id']!==_0x463058[_0x4b71c7(0xfc)]['id'])throw appRuleError(_0x5501cf?_0x4b71c7(0xd2):_0x4b71c7(0xe9),appRuleFileName(_0x463058[_0x4b71c7(0xf9)][_0x4b71c7(0xc9)])+_0x4b71c7(0xc7),_0x4b71c7(0xc1)+_0x463058['input'][_0x4b71c7(0xc9)]+_0x4b71c7(0xc3));const _0x1c7a48=warningsFor(_0x463058['input'][_0x4b71c7(0xef)]);_0x5501cf&&_0x1c7a48[_0x4b71c7(0xe1)]('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x4bf8e5=projectAppRule(_0x463058['input'][_0x4b71c7(0xc9)],_0x213f60);return{'ok':!![],'data':{'operation':_0x4b71c7(0xe7),'selector':{'appCode':_0x542289[_0x4b71c7(0xfe)],'scope':_0x4b71c7(0xc4),'type':_0x463058[_0x4b71c7(0xf9)][_0x4b71c7(0xc9)]},'before':_0x463058[_0x4b71c7(0xe3)],'after':_0x4bf8e5,'dryRun':![],'backend':{'method':_0x4b71c7(0xdb),'path':knowledgeDocumentsPath(_0x4b71c7(0xc4),_0x463058[_0x4b71c7(0xfc)]?_0x4b71c7(0xdf):_0x4b71c7(0xf2))},'warnings':_0x1c7a48,'verification':{'status':_0x4b71c7(0xe0),'recoveredAfterUnknownResponse':_0x5501cf,'expectedVersion':_0x463058[_0x4b71c7(0xfc)]?.[_0x4b71c7(0xf0)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x4b71c7(0xed)+_0x463058['input'][_0x4b71c7(0xc9)]+_0x4b71c7(0xd5)}},'message':'Set\x20'+appRuleFileName(_0x463058[_0x4b71c7(0xf9)][_0x4b71c7(0xc9)])+_0x4b71c7(0xc6)+_0x542289[_0x4b71c7(0xfe)]};}};
1
+ const a243_0x4a3ca9=a243_0x3886;(function(_0x176ae7,_0x1616e4){const _0x523c9a=a243_0x3886,_0x170245=_0x176ae7();while(!![]){try{const _0x107b2f=parseInt(_0x523c9a(0x1aa))/0x1+-parseInt(_0x523c9a(0x1b3))/0x2*(-parseInt(_0x523c9a(0x197))/0x3)+-parseInt(_0x523c9a(0x19a))/0x4*(-parseInt(_0x523c9a(0x1b8))/0x5)+parseInt(_0x523c9a(0x1ba))/0x6*(-parseInt(_0x523c9a(0x1ae))/0x7)+-parseInt(_0x523c9a(0x18f))/0x8*(parseInt(_0x523c9a(0x18b))/0x9)+-parseInt(_0x523c9a(0x1ab))/0xa*(parseInt(_0x523c9a(0x1bf))/0xb)+-parseInt(_0x523c9a(0x1c6))/0xc;if(_0x107b2f===_0x1616e4)break;else _0x170245['push'](_0x170245['shift']());}catch(_0x5960df){_0x170245['push'](_0x170245['shift']());}}}(a243_0x168e,0xcc601));function a243_0x3886(_0x2748d1,_0x3a6ca7){_0x2748d1=_0x2748d1-0x18b;const _0x168ea9=a243_0x168e();let _0x3886ee=_0x168ea9[_0x2748d1];return _0x3886ee;}import{knowledgeDocumentsPath}from'../../core/api-client.js';import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a243_0x168e(){const _0x5bc196=['Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','POST','replacement','cookie','create','Use\x20read-only\x20rule\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','input','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','rule','expectedVersion','rules','verified','1314624feIGrB','10zVHVVz','push','The\x20received\x20rule\x20state\x20contradicts\x20the\x20requested\x20changes.','2128chGPod','appCode','cause','unconfigured','--file\x20is\x20required.','276vwRaqf','byteSize','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','content','15TMOaAZ','RULES\x20content\x20exceeds\x202000\x20UTF-16\x20units.','7194CUmFYU','set','app_rule_file_required','app_rule_version_mismatch','type','11932393QuCfaf','app_rule_set_outcome_unknown','RULES','app_rule_verification_failed','isSafeInteger','Set\x20','rabetbase\x20rule\x20get\x20--type\x20','8785272kypgoJ','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','DATABASE','The\x20set\x20request\x20was\x20sent,\x20but\x20','Pass\x20a\x20UTF-8\x20Markdown\x20file.','711351fEyUKg','beforeRecord','expected-version','before','24akCqwg','\x20--format\x20compress','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','string','app_rule_verification_unavailable','defineProperty','app_rule_content_too_large','31737BKlAfT','update','planned','641436RuOqgj','contentHash','version','file'];a243_0x168e=function(){return _0x5bc196;};return a243_0x168e();}import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function readSetInput(_0x51e5cc){const _0x18843b=a243_0x3886,_0x41a3df=readAppRuleType(_0x51e5cc),_0x4b870f=_0x51e5cc['str']('file')['trim']();if(!_0x4b870f)throw appRuleError(_0x18843b(0x1bc),_0x18843b(0x1b2),_0x18843b(0x1ca));const _0x3a9e45=_0x51e5cc['flag'](_0x18843b(0x18d));let _0x2d6669;if(_0x3a9e45!==undefined){_0x2d6669=Number(_0x3a9e45);if(!Number[_0x18843b(0x1c3)](_0x2d6669)||_0x2d6669<0x0)throw appRuleError('app_rule_expected_version_invalid','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'type':_0x41a3df,'file':_0x4b870f,'expectedVersion':_0x2d6669};}async function prepareSet(_0x4eccd1){const _0x2bca56=a243_0x3886,_0x27dcab=readSetInput(_0x4eccd1),_0x17b1dc=await readAppRuleFile(_0x27dcab[_0x2bca56(0x19d)]);if(_0x27dcab[_0x2bca56(0x1be)]===_0x2bca56(0x1a8)&&_0x17b1dc[_0x2bca56(0x1b7)]['length']>0x7d0)throw appRuleError(_0x2bca56(0x196),_0x2bca56(0x1b9));const _0x5257fc=await getAppRule(_0x4eccd1[_0x2bca56(0x1a1)],{'appCode':_0x4eccd1[_0x2bca56(0x1af)],'type':_0x27dcab['type']});if(_0x27dcab[_0x2bca56(0x1a7)]!==undefined&&(_0x5257fc?.[_0x2bca56(0x19c)]??0x0)!==_0x27dcab[_0x2bca56(0x1a7)])throw appRuleError(_0x2bca56(0x1bd),appRuleFileName(_0x27dcab[_0x2bca56(0x1be)])+'\x20version\x20changed\x20before\x20write.','Expected\x20'+_0x27dcab[_0x2bca56(0x1a7)]+';\x20current\x20version\x20is\x20'+(_0x5257fc?.[_0x2bca56(0x19c)]??_0x2bca56(0x1b1))+_0x2bca56(0x1c7));return{'input':_0x27dcab,'replacement':_0x17b1dc,'beforeRecord':_0x5257fc,'before':projectAppRule(_0x27dcab['type'],_0x5257fc),'planned':{'type':_0x27dcab[_0x2bca56(0x1be)],'fileName':appRuleFileName(_0x27dcab[_0x2bca56(0x1be)]),'contextScope':appRuleContextScope(_0x27dcab[_0x2bca56(0x1be)]),'enabled':!![],'appCode':_0x4eccd1[_0x2bca56(0x1af)],'scope':_0x2bca56(0x1a8),'contentByteSize':_0x17b1dc[_0x2bca56(0x1b4)],'contentHash':_0x17b1dc['contentHash']}};}function warningsFor(_0x4c17ad){return[];}export const ruleSet={'service':a243_0x4a3ca9(0x1a6),'command':a243_0x4a3ca9(0x1bb),'description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x4a3ca9(0x19d),'type':a243_0x4a3ca9(0x193),'required':!![],'description':'UTF-8\x20Markdown\x20file\x20(RULES:\x202000\x20UTF-16\x20units;\x20DATABASE:\x205242880\x20units)'},{'name':'expected-version','type':'number','required':![],'description':a243_0x4a3ca9(0x19e)}],async 'validate'(_0x1ae992){readSetInput(_0x1ae992);},async 'dryRun'(_0x42f445){const _0x5f5a6d=a243_0x4a3ca9,_0x331048=await prepareSet(_0x42f445);return asDryRunResult({'operation':_0x5f5a6d(0x1bb),'selector':{'appCode':_0x42f445[_0x5f5a6d(0x1af)],'scope':'rules','type':_0x331048['input'][_0x5f5a6d(0x1be)]},'before':_0x331048[_0x5f5a6d(0x18e)],'after':_0x331048[_0x5f5a6d(0x199)],'dryRun':!![],'backend':{'method':_0x5f5a6d(0x19f),'path':knowledgeDocumentsPath(_0x5f5a6d(0x1a8),_0x331048[_0x5f5a6d(0x18c)]?'update':_0x5f5a6d(0x1a2)),'body':{'appCode':_0x42f445['appCode'],..._0x331048['beforeRecord']?{'id':_0x331048['beforeRecord']['id']}:{},'title':_0x331048[_0x5f5a6d(0x1a4)]['type']===_0x5f5a6d(0x1a8)?_0x5f5a6d(0x1c1):_0x5f5a6d(0x1c8),'contentHash':_0x331048[_0x5f5a6d(0x1a0)][_0x5f5a6d(0x19b)],'contentByteSize':_0x331048[_0x5f5a6d(0x1a0)][_0x5f5a6d(0x1b4)],..._0x331048[_0x5f5a6d(0x18c)]?{'expectedVersion':_0x331048[_0x5f5a6d(0x18c)][_0x5f5a6d(0x19c)]}:{}}},'warnings':warningsFor(_0x331048[_0x5f5a6d(0x1a4)][_0x5f5a6d(0x1a7)]),'verification':{'expectedVersion':_0x331048[_0x5f5a6d(0x18c)]?.[_0x5f5a6d(0x19c)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x5f5a6d(0x1c5)+_0x331048[_0x5f5a6d(0x1a4)]['type']+_0x5f5a6d(0x190)}},{'method':_0x5f5a6d(0x19f),'url':knowledgeDocumentsPath(_0x5f5a6d(0x1a8),_0x331048[_0x5f5a6d(0x18c)]?_0x5f5a6d(0x198):_0x5f5a6d(0x1a2))});},async 'execute'(_0x38f476){const _0x5bcb5d=a243_0x4a3ca9,_0xeb77fe=await prepareSet(_0x38f476),_0x41eb6d=_0xeb77fe[_0x5bcb5d(0x18c)]===null?0x1:_0xeb77fe[_0x5bcb5d(0x18c)][_0x5bcb5d(0x19c)]+(_0xeb77fe['beforeRecord']['content']===_0xeb77fe[_0x5bcb5d(0x1a0)][_0x5bcb5d(0x1b7)]?0x0:0x1);let _0x539417,_0x47ec25=![];try{_0x539417=await saveAppRule(_0x38f476['cookie'],{'appCode':_0x38f476[_0x5bcb5d(0x1af)],'type':_0xeb77fe[_0x5bcb5d(0x1a4)][_0x5bcb5d(0x1be)],'content':_0xeb77fe[_0x5bcb5d(0x1a0)][_0x5bcb5d(0x1b7)],'expectedVersion':_0xeb77fe[_0x5bcb5d(0x18c)]?.[_0x5bcb5d(0x19c)]??0x0,..._0xeb77fe['beforeRecord']?{'id':_0xeb77fe['beforeRecord']['id']}:{}});if(_0x539417[_0x5bcb5d(0x19c)]!==_0x41eb6d||_0x539417[_0x5bcb5d(0x1b7)]!==_0xeb77fe['replacement'][_0x5bcb5d(0x1b7)]||_0xeb77fe[_0x5bcb5d(0x18c)]!==null&&_0x539417['id']!==_0xeb77fe['beforeRecord']['id'])throw appRuleError('app_rule_verification_failed',_0x5bcb5d(0x1ad),_0x5bcb5d(0x1a3));}catch(_0x21862d){if(!isPlatformTransportFailure(_0x21862d))throw _0x21862d;_0x47ec25=!![];}let _0x37730e;try{_0x37730e=await getAppRule(_0x38f476[_0x5bcb5d(0x1a1)],{'appCode':_0x38f476['appCode'],'type':_0xeb77fe['input']['type']});}catch(_0x43cf7e){const _0x5e3039=appRuleError(_0x47ec25?'app_rule_set_outcome_unknown':_0x5bcb5d(0x194),_0x5bcb5d(0x1c9)+appRuleFileName(_0xeb77fe[_0x5bcb5d(0x1a4)]['type'])+'\x20could\x20not\x20be\x20verified.',_0x5bcb5d(0x191));Object[_0x5bcb5d(0x195)](_0x5e3039,_0x5bcb5d(0x1b0),{'value':_0x43cf7e,'enumerable':![]});throw _0x5e3039;}const _0x5f41b2=_0x37730e&&inspectAppRuleContent(_0x37730e[_0x5bcb5d(0x1b7)])['contentHash']===_0xeb77fe['replacement'][_0x5bcb5d(0x19b)],_0xe77f37=_0x37730e&&_0x37730e[_0x5bcb5d(0x19c)]===_0x41eb6d&&(!_0x539417||_0x37730e['id']===_0x539417['id']&&_0x37730e['version']===_0x539417[_0x5bcb5d(0x19c)]);if(!_0x37730e||!_0x5f41b2||!_0xe77f37||_0xeb77fe[_0x5bcb5d(0x18c)]!==null&&_0x37730e['id']!==_0xeb77fe[_0x5bcb5d(0x18c)]['id'])throw appRuleError(_0x47ec25?_0x5bcb5d(0x1c0):_0x5bcb5d(0x1c2),appRuleFileName(_0xeb77fe[_0x5bcb5d(0x1a4)]['type'])+_0x5bcb5d(0x1b5),_0x5bcb5d(0x1b6)+_0xeb77fe[_0x5bcb5d(0x1a4)][_0x5bcb5d(0x1be)]+_0x5bcb5d(0x1a5));const _0x9c8522=warningsFor(_0xeb77fe[_0x5bcb5d(0x1a4)][_0x5bcb5d(0x1a7)]);_0x47ec25&&_0x9c8522[_0x5bcb5d(0x1ac)](_0x5bcb5d(0x192));const _0x1f0e89=projectAppRule(_0xeb77fe[_0x5bcb5d(0x1a4)][_0x5bcb5d(0x1be)],_0x37730e);return{'ok':!![],'data':{'operation':_0x5bcb5d(0x1bb),'selector':{'appCode':_0x38f476[_0x5bcb5d(0x1af)],'scope':_0x5bcb5d(0x1a8),'type':_0xeb77fe[_0x5bcb5d(0x1a4)][_0x5bcb5d(0x1be)]},'before':_0xeb77fe[_0x5bcb5d(0x18e)],'after':_0x1f0e89,'dryRun':![],'backend':{'method':_0x5bcb5d(0x19f),'path':knowledgeDocumentsPath(_0x5bcb5d(0x1a8),_0xeb77fe[_0x5bcb5d(0x18c)]?_0x5bcb5d(0x198):_0x5bcb5d(0x1a2))},'warnings':_0x9c8522,'verification':{'status':_0x5bcb5d(0x1a9),'recoveredAfterUnknownResponse':_0x47ec25,'expectedVersion':_0xeb77fe[_0x5bcb5d(0x18c)]?.[_0x5bcb5d(0x19c)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0xeb77fe[_0x5bcb5d(0x1a4)]['type']+_0x5bcb5d(0x190)}},'message':_0x5bcb5d(0x1c4)+appRuleFileName(_0xeb77fe[_0x5bcb5d(0x1a4)]['type'])+'\x20for\x20'+_0x38f476[_0x5bcb5d(0x1af)]};}};
@@ -1 +1 @@
1
- const a244_0x4d9b6d=a244_0x8d69;(function(_0x29e328,_0x38dc03){const _0x21a69c=a244_0x8d69,_0x2290fd=_0x29e328();while(!![]){try{const _0x3d93fa=parseInt(_0x21a69c(0x1ab))/0x1*(-parseInt(_0x21a69c(0x1a2))/0x2)+parseInt(_0x21a69c(0x1b4))/0x3+parseInt(_0x21a69c(0x1ae))/0x4*(parseInt(_0x21a69c(0x19a))/0x5)+-parseInt(_0x21a69c(0x1a4))/0x6+-parseInt(_0x21a69c(0x1ba))/0x7+parseInt(_0x21a69c(0x1bf))/0x8*(parseInt(_0x21a69c(0x197))/0x9)+parseInt(_0x21a69c(0x1a6))/0xa;if(_0x3d93fa===_0x38dc03)break;else _0x2290fd['push'](_0x2290fd['shift']());}catch(_0x2ec1a8){_0x2290fd['push'](_0x2290fd['shift']());}}}(a244_0x31a9,0x342de));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=[a244_0x4d9b6d(0x1b5),'database'];export const MAX_APP_RULE_UNITS=0x5*0x400*0x400;export const MAX_APP_RULE_BYTES=MAX_APP_RULE_UNITS*0x4;const APP_RULE_FILES={'rules':a244_0x4d9b6d(0x1c0),'database':a244_0x4d9b6d(0x1a8)},APP_RULE_CONTEXT_SCOPES={'rules':'page-api-development','database':'database-analysis'};function a244_0x8d69(_0x41f4b9,_0x4bd798){_0x41f4b9=_0x41f4b9-0x192;const _0x31a916=a244_0x31a9();let _0x8d69e3=_0x31a916[_0x41f4b9];return _0x8d69e3;}function a244_0x31a9(){const _0xea8c29=['8xCVsoL','RULES.md','App\x20rule\x20file\x20is\x20blank:\x20','updateTime','appCode','message','Pass\x20a\x20UTF-8\x20Markdown\x20file.','byteLength','createTime','size','app_rule_content_invalid','isFile','213309sYGdkH','app_rule_file_invalid','indexStatus','95lbjQpm','App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.','content','hex','utf8','app_rule_type_invalid','decode','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','13388hjEsbc','byteSize','2339778BZXoCs','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','6891290WJPaNS','str','DATABASE.md','Cannot\x20access\x20app\x20rule\x20file:\x20','contentHash','11zoqmkv','update','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','3268atAhzV','length','app_rule_file_unreadable','--file\x20is\x20required.','type','App\x20rule\x20content\x20exceeds\x205242880\x20UTF-16\x20units.','457464kLqgvA','rules','digest','string','app_rule_content_too_large','database','1424626zGaaeT','app_rule_file_required','Cannot\x20read\x20app\x20rule\x20file:\x20','trim','from'];a244_0x31a9=function(){return _0xea8c29;};return a244_0x31a9();}export function appRuleError(_0x22c938,_0x314636,_0x241c5c){return new CliError(_0x22c938,0x1,_0x314636,_0x241c5c);}export function readAppRuleType(_0x198825){const _0x40a5b0=a244_0x4d9b6d,_0x2ba2b7=_0x198825[_0x40a5b0(0x1a7)](_0x40a5b0(0x1b2))[_0x40a5b0(0x1bd)]()['toLowerCase']();if(_0x2ba2b7!==_0x40a5b0(0x1b5)&&_0x2ba2b7!==_0x40a5b0(0x1b9))throw appRuleError(_0x40a5b0(0x19f),_0x40a5b0(0x1a5));return _0x2ba2b7;}export function appRuleFileName(_0x54ea0b){return APP_RULE_FILES[_0x54ea0b];}export function appRuleContextScope(_0x3733a4){return APP_RULE_CONTEXT_SCOPES[_0x3733a4];}export function inspectAppRuleContent(_0x25559f){const _0xdb166b=a244_0x4d9b6d,_0x60e866=Buffer[_0xdb166b(0x1be)](_0x25559f,_0xdb166b(0x19e));return{'content':_0x25559f,'byteSize':_0x60e866['byteLength'],'contentHash':'sha256:'+createHash('sha256')[_0xdb166b(0x1ac)](_0x60e866)[_0xdb166b(0x1b6)](_0xdb166b(0x19d))};}export async function readAppRuleFile(_0x1df64f){const _0x1e1b9d=a244_0x4d9b6d,_0x5e5579=_0x1df64f[_0x1e1b9d(0x1bd)]();if(!_0x5e5579)throw appRuleError(_0x1e1b9d(0x1bb),_0x1e1b9d(0x1b1),_0x1e1b9d(0x1c5));const _0xec515a=resolve(_0x5e5579);let _0x2c4dc2;try{_0x2c4dc2=await stat(_0xec515a);}catch(_0x2d8d26){throw appRuleError(_0x1e1b9d(0x1b0),_0x1e1b9d(0x1a9)+_0x5e5579,_0x2d8d26 instanceof Error?_0x2d8d26[_0x1e1b9d(0x1c4)]:String(_0x2d8d26));}if(!_0x2c4dc2[_0x1e1b9d(0x196)]())throw appRuleError(_0x1e1b9d(0x198),'App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5e5579);if(_0x2c4dc2[_0x1e1b9d(0x194)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x1e1b9d(0x1b8),_0x1e1b9d(0x19b));let _0x5c9e5f;try{_0x5c9e5f=await readFile(_0xec515a);}catch(_0x2f3d9a){throw appRuleError('app_rule_file_unreadable',_0x1e1b9d(0x1bc)+_0x5e5579,_0x2f3d9a instanceof Error?_0x2f3d9a[_0x1e1b9d(0x1c4)]:String(_0x2f3d9a));}if(_0x5c9e5f[_0x1e1b9d(0x192)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x1e1b9d(0x1b8),_0x1e1b9d(0x19b));let _0x3e9f34;try{_0x3e9f34=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x1e1b9d(0x1a0)](_0x5c9e5f);}catch{throw appRuleError(_0x1e1b9d(0x195),_0x1e1b9d(0x1a1)+_0x5e5579);}if(_0x3e9f34[_0x1e1b9d(0x1af)]>MAX_APP_RULE_UNITS)throw appRuleError(_0x1e1b9d(0x1b8),_0x1e1b9d(0x1b3));if(!_0x3e9f34[_0x1e1b9d(0x1bd)]())throw appRuleError(_0x1e1b9d(0x195),_0x1e1b9d(0x1c1)+_0x5e5579);return inspectAppRuleContent(_0x3e9f34);}export function projectAppRule(_0x478422,_0x28fea3){const _0x24931c=a244_0x4d9b6d;if(!_0x28fea3)return{'type':_0x478422,'fileName':appRuleFileName(_0x478422),'contextScope':appRuleContextScope(_0x478422),'enabled':![]};const _0x34fc5d=inspectAppRuleContent(_0x28fea3[_0x24931c(0x19c)]);return{'type':_0x478422,'fileName':appRuleFileName(_0x478422),'contextScope':appRuleContextScope(_0x478422),'enabled':!![],'id':_0x28fea3['id'],'scope':_0x28fea3['scope'],'appCode':_0x28fea3[_0x24931c(0x1c3)],'version':_0x28fea3['version'],..._0x28fea3[_0x24931c(0x199)]!==undefined?{'indexStatus':_0x28fea3[_0x24931c(0x199)]}:{},'contentByteSize':_0x34fc5d[_0x24931c(0x1a3)],'contentHash':_0x34fc5d[_0x24931c(0x1aa)],..._0x28fea3[_0x24931c(0x193)]!==undefined&&_0x28fea3[_0x24931c(0x193)]!==null?{'createTime':_0x28fea3[_0x24931c(0x193)]}:{},..._0x28fea3['updateTime']!==undefined&&_0x28fea3[_0x24931c(0x1c2)]!==null?{'updateTime':_0x28fea3[_0x24931c(0x1c2)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x4d9b6d(0x1b2),'type':a244_0x4d9b6d(0x1b7),'required':!![],'description':a244_0x4d9b6d(0x1ad),'enum':[...APP_RULE_TYPES]};
1
+ const a244_0x56ab79=a244_0x3ffa;(function(_0x5c9dfd,_0x19ad01){const _0x54df8a=a244_0x3ffa,_0x48f154=_0x5c9dfd();while(!![]){try{const _0xa86d9a=-parseInt(_0x54df8a(0x1cc))/0x1*(-parseInt(_0x54df8a(0x1da))/0x2)+-parseInt(_0x54df8a(0x1d0))/0x3+parseInt(_0x54df8a(0x1c5))/0x4*(parseInt(_0x54df8a(0x1bc))/0x5)+parseInt(_0x54df8a(0x1c4))/0x6*(-parseInt(_0x54df8a(0x1ba))/0x7)+-parseInt(_0x54df8a(0x1ae))/0x8*(parseInt(_0x54df8a(0x1c1))/0x9)+-parseInt(_0x54df8a(0x1b6))/0xa+-parseInt(_0x54df8a(0x1bb))/0xb*(-parseInt(_0x54df8a(0x1ce))/0xc);if(_0xa86d9a===_0x19ad01)break;else _0x48f154['push'](_0x48f154['shift']());}catch(_0xd59254){_0x48f154['push'](_0x48f154['shift']());}}}(a244_0x508f,0x80c38));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';function a244_0x508f(){const _0x150c80=['scope','byteSize','digest','app_rule_content_too_large','type','database','464KpgCbO','app_rule_file_required','App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.','indexStatus','decode','app_rule_type_invalid','appCode','message','9172030ksJooQ','utf-8','updateTime','page-api-development','539651TPaYNa','11FQvvbC','170TySZEN','Pass\x20a\x20UTF-8\x20Markdown\x20file.','length','update','toLowerCase','129204zWYVnG','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','app_rule_content_invalid','36ZgUruQ','120016wfFDHg','sha256:','hex','utf8','content','DATABASE.md','from','410745yIfncI','Cannot\x20read\x20app\x20rule\x20file:\x20','15516852yPkSaB','sha256','1184616FgAzbO','Cannot\x20access\x20app\x20rule\x20file:\x20','app_rule_file_invalid','RULES.md','byteLength','App\x20rule\x20file\x20is\x20blank:\x20','rules','createTime','version','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','4AoYnpx','trim','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','app_rule_file_unreadable','contentHash','--type\x20must\x20be\x20either\x20rules\x20or\x20database.'];a244_0x508f=function(){return _0x150c80;};return a244_0x508f();}export const APP_RULE_TYPES=[a244_0x56ab79(0x1d6),a244_0x56ab79(0x1ad)];export const MAX_APP_RULE_UNITS=0x5*0x400*0x400;export const MAX_APP_RULE_BYTES=MAX_APP_RULE_UNITS*0x4;const APP_RULE_FILES={'rules':a244_0x56ab79(0x1d3),'database':a244_0x56ab79(0x1ca)},APP_RULE_CONTEXT_SCOPES={'rules':a244_0x56ab79(0x1b9),'database':'database-analysis'};export function appRuleError(_0x26cf63,_0x4e8bdb,_0x491302){return new CliError(_0x26cf63,0x1,_0x4e8bdb,_0x491302);}export function readAppRuleType(_0x425888){const _0x4968c9=a244_0x56ab79,_0x1d8b85=_0x425888['str']('type')[_0x4968c9(0x1db)]()[_0x4968c9(0x1c0)]();if(_0x1d8b85!=='rules'&&_0x1d8b85!==_0x4968c9(0x1ad))throw appRuleError(_0x4968c9(0x1b3),_0x4968c9(0x1a7));return _0x1d8b85;}export function appRuleFileName(_0x20b215){return APP_RULE_FILES[_0x20b215];}function a244_0x3ffa(_0x1a5851,_0xa0c518){_0x1a5851=_0x1a5851-0x1a5;const _0x508f35=a244_0x508f();let _0x3ffafd=_0x508f35[_0x1a5851];return _0x3ffafd;}export function appRuleContextScope(_0x49ed1e){return APP_RULE_CONTEXT_SCOPES[_0x49ed1e];}export function inspectAppRuleContent(_0xabf31b){const _0x55cf3b=a244_0x56ab79,_0x41a4aa=Buffer[_0x55cf3b(0x1cb)](_0xabf31b,_0x55cf3b(0x1c8));return{'content':_0xabf31b,'byteSize':_0x41a4aa['byteLength'],'contentHash':_0x55cf3b(0x1c6)+createHash(_0x55cf3b(0x1cf))[_0x55cf3b(0x1bf)](_0x41a4aa)[_0x55cf3b(0x1aa)](_0x55cf3b(0x1c7))};}export async function readAppRuleFile(_0x179290){const _0x5408a6=a244_0x56ab79,_0x717b8=_0x179290[_0x5408a6(0x1db)]();if(!_0x717b8)throw appRuleError(_0x5408a6(0x1af),'--file\x20is\x20required.',_0x5408a6(0x1bd));const _0x546a3c=resolve(_0x717b8);let _0x4d98cb;try{_0x4d98cb=await stat(_0x546a3c);}catch(_0x29bcfc){throw appRuleError(_0x5408a6(0x1a5),_0x5408a6(0x1d1)+_0x717b8,_0x29bcfc instanceof Error?_0x29bcfc[_0x5408a6(0x1b5)]:String(_0x29bcfc));}if(!_0x4d98cb['isFile']())throw appRuleError(_0x5408a6(0x1d2),_0x5408a6(0x1c2)+_0x717b8);if(_0x4d98cb['size']>MAX_APP_RULE_BYTES)throw appRuleError(_0x5408a6(0x1ab),_0x5408a6(0x1b0));let _0x393112;try{_0x393112=await readFile(_0x546a3c);}catch(_0x2ee87b){throw appRuleError('app_rule_file_unreadable',_0x5408a6(0x1cd)+_0x717b8,_0x2ee87b instanceof Error?_0x2ee87b[_0x5408a6(0x1b5)]:String(_0x2ee87b));}if(_0x393112[_0x5408a6(0x1d4)]>MAX_APP_RULE_BYTES)throw appRuleError('app_rule_content_too_large',_0x5408a6(0x1b0));let _0x5322a2;try{_0x5322a2=new TextDecoder(_0x5408a6(0x1b7),{'fatal':!![],'ignoreBOM':!![]})[_0x5408a6(0x1b2)](_0x393112);}catch{throw appRuleError('app_rule_content_invalid',_0x5408a6(0x1d9)+_0x717b8);}if(_0x5322a2[_0x5408a6(0x1be)]>MAX_APP_RULE_UNITS)throw appRuleError(_0x5408a6(0x1ab),'App\x20rule\x20content\x20exceeds\x205242880\x20UTF-16\x20units.');if(!_0x5322a2[_0x5408a6(0x1db)]())throw appRuleError(_0x5408a6(0x1c3),_0x5408a6(0x1d5)+_0x717b8);return inspectAppRuleContent(_0x5322a2);}export function projectAppRule(_0x141dd3,_0x4664d3){const _0x2a3dd2=a244_0x56ab79;if(!_0x4664d3)return{'type':_0x141dd3,'fileName':appRuleFileName(_0x141dd3),'contextScope':appRuleContextScope(_0x141dd3),'enabled':![]};const _0x279985=inspectAppRuleContent(_0x4664d3[_0x2a3dd2(0x1c9)]);return{'type':_0x141dd3,'fileName':appRuleFileName(_0x141dd3),'contextScope':appRuleContextScope(_0x141dd3),'enabled':!![],'id':_0x4664d3['id'],'scope':_0x4664d3[_0x2a3dd2(0x1a8)],'appCode':_0x4664d3[_0x2a3dd2(0x1b4)],'version':_0x4664d3[_0x2a3dd2(0x1d8)],..._0x4664d3['indexStatus']!==undefined?{'indexStatus':_0x4664d3[_0x2a3dd2(0x1b1)]}:{},'contentByteSize':_0x279985[_0x2a3dd2(0x1a9)],'contentHash':_0x279985[_0x2a3dd2(0x1a6)],..._0x4664d3['createTime']!==undefined&&_0x4664d3[_0x2a3dd2(0x1d7)]!==null?{'createTime':_0x4664d3[_0x2a3dd2(0x1d7)]}:{},..._0x4664d3[_0x2a3dd2(0x1b8)]!==undefined&&_0x4664d3[_0x2a3dd2(0x1b8)]!==null?{'updateTime':_0x4664d3[_0x2a3dd2(0x1b8)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x56ab79(0x1ac),'type':'string','required':!![],'description':a244_0x56ab79(0x1dc),'enum':[...APP_RULE_TYPES]};
@@ -1 +1 @@
1
- const a245_0x1d51dc=a245_0x35d2;(function(_0x1733ef,_0x3d9b48){const _0xdf22f4=a245_0x35d2,_0x2bcec1=_0x1733ef();while(!![]){try{const _0x394928=-parseInt(_0xdf22f4(0x1dc))/0x1+parseInt(_0xdf22f4(0x1df))/0x2+parseInt(_0xdf22f4(0x1f7))/0x3+parseInt(_0xdf22f4(0x20a))/0x4+parseInt(_0xdf22f4(0x1d3))/0x5+-parseInt(_0xdf22f4(0x20d))/0x6+-parseInt(_0xdf22f4(0x1ed))/0x7;if(_0x394928===_0x3d9b48)break;else _0x2bcec1['push'](_0x2bcec1['shift']());}catch(_0x515de8){_0x2bcec1['push'](_0x2bcec1['shift']());}}}(a245_0x3f23,0xeaefa));function a245_0x3f23(){const _0x5471b5=['node_modules','\x20\x20EXAMPLES','needsUpgrade','\x20run\x20preview\x20--watch','slice','run','start','(none)','inherit','dev','4730026QgpQEH','close','length','npm','log','watch','Script\x20name\x20defined\x20in\x20package.json','pnpm','yarn.lock','\x20run\x20','881385scCNWb','bool','Available:\x20','\x20run\x20start','bun.lockb','.bin','args','--watch','scripts','preview','\x20\x20\x20\x20','bun','path','No\x20package.json\x20found\x20in\x20current\x20directory.','\x0a\x20\x20Available\x20scripts:\x0a','vite\x20preview\x20exited\x20with\x20code\x20','bun.lock','build','write','5399528rwyXpV','cwd','parse','10054344hkqccO','6568390RgqcIi','belowMinimum','has','Enable\x20watch\x20mode\x20for\x20preview','pnpm-lock.yaml','push','error','Domain\x20routing\x20synchronized:\x20','changed','1211828aHzXvf','script','validation','3136426oGDquB','Script\x20\x22','vite','vite\x20build\x20--watch\x20exited\x20with\x20code\x20'];a245_0x3f23=function(){return _0x5471b5;};return a245_0x3f23();}import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';function a245_0x35d2(_0x11ed10,_0x15cbdb){_0x11ed10=_0x11ed10-0x1d3;const _0x3f237b=a245_0x3f23();let _0x35d289=_0x3f237b[_0x11ed10];return _0x35d289;}import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a245_0x1d51dc(0x1e9),a245_0x1d51dc(0x1ec)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0x1d51dc(0x1e9),a245_0x1d51dc(0x1ec),a245_0x1d51dc(0x208),a245_0x1d51dc(0x200)]);export function syncProjectDomainRoutingBeforeScript(_0x31c3ab,_0x5bb64c){const _0x2590e6=a245_0x1d51dc;if(!DOMAIN_ROUTING_SYNC_SCRIPTS['has'](_0x5bb64c))return null;const _0x1a3c3d=findProjectRootDirectory(_0x31c3ab);if(!resolveConfigPath(_0x1a3c3d))return null;const _0xcd0090=writeProjectDomainRoutingManifest(_0x1a3c3d);return{'path':_0xcd0090['path'],'changed':_0xcd0090[_0x2590e6(0x1db)]};}function readPackageScripts(_0x2ca0db){const _0x358fa7=a245_0x1d51dc,_0x54c697=resolve(_0x2ca0db,'package.json');if(!existsSync(_0x54c697))return null;try{const _0x18dd8b=JSON[_0x358fa7(0x20c)](readFileSync(_0x54c697,'utf-8'));return _0x18dd8b[_0x358fa7(0x1ff)]??{};}catch{return null;}}function detectPackageManager(_0x5bccec){const _0x5c5745=a245_0x1d51dc;if(existsSync(resolve(_0x5bccec,_0x5c5745(0x1fb)))||existsSync(resolve(_0x5bccec,_0x5c5745(0x207))))return _0x5c5745(0x202);if(existsSync(resolve(_0x5bccec,_0x5c5745(0x1d7))))return _0x5c5745(0x1f4);if(existsSync(resolve(_0x5bccec,_0x5c5745(0x1f5))))return'yarn';return _0x5c5745(0x1f0);}async function versionCheck(_0x459206){const _0x2f0892=a245_0x1d51dc,_0x3aab20=await checkCliVersion();(_0x3aab20[_0x2f0892(0x1e5)]||_0x3aab20[_0x2f0892(0x1d4)])&&(printCliUpgradeWarning(_0x3aab20),assertCliVersionSupported(_0x3aab20));const _0x57c5c1=await checkSdkVersion(_0x459206);if(_0x57c5c1[_0x2f0892(0x1e5)])printSdkUpgradeWarning(_0x57c5c1);}function spawnScript(_0x6f292a,_0x26ace4,_0x282e2e,_0xe75507){return new Promise((_0x672ca5,_0x48d093)=>{const _0x26c104=a245_0x35d2,_0x358cf5=[_0x26c104(0x1e8),_0x26ace4,..._0x282e2e],_0x43176a=spawn(_0x6f292a,_0x358cf5,{'cwd':_0xe75507,'stdio':_0x26c104(0x1eb),'shell':!![],'env':{...process.env,'PATH':''+join(_0xe75507,_0x26c104(0x1e3),_0x26c104(0x1fc))+delimiter+process.env.PATH}});_0x43176a['on'](_0x26c104(0x1ee),_0x1d1058=>{const _0x16b97c=_0x26c104;if(_0x1d1058===0x0||_0x1d1058===null)_0x672ca5();else _0x48d093(new Error(_0x6f292a+_0x16b97c(0x1f6)+_0x26ace4+'\x20exited\x20with\x20code\x20'+_0x1d1058));}),_0x43176a['on'](_0x26c104(0x1d9),_0x48d093);});}function spawnViteBuildWatch(_0x355a76){return new Promise((_0x220283,_0x8eccd1)=>{const _0x4cdc9a=a245_0x35d2,_0x385b77=spawn(_0x4cdc9a(0x1e1),[_0x4cdc9a(0x208),_0x4cdc9a(0x1fe)],{'cwd':_0x355a76,'stdio':_0x4cdc9a(0x1eb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x355a76,'node_modules',_0x4cdc9a(0x1fc))+delimiter+process.env.PATH}});_0x385b77['on'](_0x4cdc9a(0x1ee),_0x1a8619=>{const _0x1483bf=_0x4cdc9a;if(_0x1a8619===0x0||_0x1a8619===null)_0x220283();else _0x8eccd1(new Error(_0x1483bf(0x1e2)+_0x1a8619));}),_0x385b77['on']('error',_0x8eccd1);});}function spawnVitePreview(_0x1656f8){return new Promise((_0x4cb262,_0x1d668d)=>{const _0x396cb2=a245_0x35d2,_0x3d1436=spawn('vite',[_0x396cb2(0x200)],{'cwd':_0x1656f8,'stdio':_0x396cb2(0x1eb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x1656f8,_0x396cb2(0x1e3),_0x396cb2(0x1fc))+delimiter+process.env.PATH}});_0x3d1436['on'](_0x396cb2(0x1ee),_0x1a4e8c=>{const _0x3740c9=_0x396cb2;if(_0x1a4e8c===0x0||_0x1a4e8c===null)_0x4cb262();else _0x1d668d(new Error(_0x3740c9(0x206)+_0x1a4e8c));}),_0x3d1436['on']('error',_0x1d668d);});}const runFlags=[{'name':a245_0x1d51dc(0x1f2),'type':'boolean','description':a245_0x1d51dc(0x1d6),'default':![]}];export const runDefinition={'service':a245_0x1d51dc(0x1e8),'command':'run','description':'Run\x20a\x20package.json\x20script','risk':a245_0x1d51dc(0x209),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a245_0x1d51dc(0x1dd),'description':a245_0x1d51dc(0x1f3),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3bd86a=a245_0x1d51dc,_0x470235=[];return _0x470235[_0x3bd86a(0x1d8)](_0x3bd86a(0x1e4)),_0x470235[_0x3bd86a(0x1d8)](_0x3bd86a(0x201)+CLI_BIN_NAME+_0x3bd86a(0x1fa)),_0x470235['push'](_0x3bd86a(0x201)+CLI_BIN_NAME+'\x20run\x20build'),_0x470235[_0x3bd86a(0x1d8)](_0x3bd86a(0x201)+CLI_BIN_NAME+'\x20run\x20preview'),_0x470235[_0x3bd86a(0x1d8)](_0x3bd86a(0x201)+CLI_BIN_NAME+_0x3bd86a(0x1e6)),_0x470235['join']('\x0a');},async 'execute'(_0x15e8e5){const _0x571dd2=a245_0x1d51dc,_0x5ea0d1=process[_0x571dd2(0x20b)](),_0x546839=_0x15e8e5[_0x571dd2(0x1fd)][0x0],_0x5b6fba=_0x15e8e5[_0x571dd2(0x1fd)][_0x571dd2(0x1e7)](0x1),_0x2bffa4=readPackageScripts(_0x5ea0d1);if(!_0x2bffa4)throw CliErrors['validation'](_0x571dd2(0x204));if(!_0x546839){const _0x4c5165=Object['keys'](_0x2bffa4);if(_0x4c5165[_0x571dd2(0x1ef)]===0x0)console[_0x571dd2(0x1f1)]('No\x20scripts\x20defined\x20in\x20package.json.');else{console[_0x571dd2(0x1f1)](_0x571dd2(0x205));for(const _0xdf48cd of _0x4c5165){console[_0x571dd2(0x1f1)](_0x571dd2(0x201)+_0xdf48cd);}console[_0x571dd2(0x1f1)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x2bffa4[_0x546839])throw CliErrors[_0x571dd2(0x1de)](_0x571dd2(0x1e0)+_0x546839+'\x22\x20not\x20found\x20in\x20package.json.',_0x571dd2(0x1f9)+(Object['keys'](_0x2bffa4)['join'](',\x20')||_0x571dd2(0x1ea)));const _0x5d9e36=detectPackageManager(_0x5ea0d1),_0x3df0ae=syncProjectDomainRoutingBeforeScript(_0x5ea0d1,_0x546839);_0x3df0ae?.[_0x571dd2(0x1db)]&&console[_0x571dd2(0x1d9)](_0x571dd2(0x1da)+_0x3df0ae[_0x571dd2(0x203)]);VERSION_CHECK_SCRIPTS[_0x571dd2(0x1d5)](_0x546839)&&await versionCheck(_0x5ea0d1);if(_0x546839===_0x571dd2(0x200)&&_0x15e8e5[_0x571dd2(0x1f8)](_0x571dd2(0x1f2)))return await Promise['all']([spawnViteBuildWatch(_0x5ea0d1),spawnVitePreview(_0x5ea0d1)]),{'ok':!![]};return await spawnScript(_0x5d9e36,_0x546839,_0x5b6fba,_0x5ea0d1),{'ok':!![]};}};
1
+ const a245_0x292b46=a245_0xc3d2;(function(_0xe0ed03,_0x138b6f){const _0x4bccea=a245_0xc3d2,_0x4df90e=_0xe0ed03();while(!![]){try{const _0x2ea666=parseInt(_0x4bccea(0x164))/0x1*(parseInt(_0x4bccea(0x156))/0x2)+parseInt(_0x4bccea(0x15a))/0x3+parseInt(_0x4bccea(0x17b))/0x4*(parseInt(_0x4bccea(0x188))/0x5)+-parseInt(_0x4bccea(0x15c))/0x6+parseInt(_0x4bccea(0x192))/0x7+-parseInt(_0x4bccea(0x154))/0x8*(parseInt(_0x4bccea(0x161))/0x9)+-parseInt(_0x4bccea(0x187))/0xa;if(_0x2ea666===_0x138b6f)break;else _0x4df90e['push'](_0x4df90e['shift']());}catch(_0x624ffa){_0x4df90e['push'](_0x4df90e['shift']());}}}(a245_0xc62d,0x6b4eb));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a245_0x292b46(0x18a),a245_0x292b46(0x151)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0x292b46(0x18a),'dev',a245_0x292b46(0x178),a245_0x292b46(0x17a)]);export function syncProjectDomainRoutingBeforeScript(_0x3ac302,_0xfa62b3){const _0x237b46=a245_0x292b46;if(!DOMAIN_ROUTING_SYNC_SCRIPTS['has'](_0xfa62b3))return null;const _0x3bd0f5=findProjectRootDirectory(_0x3ac302);if(!resolveConfigPath(_0x3bd0f5))return null;const _0x413b06=writeProjectDomainRoutingManifest(_0x3bd0f5);return{'path':_0x413b06['path'],'changed':_0x413b06[_0x237b46(0x14f)]};}function readPackageScripts(_0x258761){const _0x3adddd=a245_0x292b46,_0x1ccb51=resolve(_0x258761,_0x3adddd(0x15d));if(!existsSync(_0x1ccb51))return null;try{const _0x179149=JSON[_0x3adddd(0x17f)](readFileSync(_0x1ccb51,_0x3adddd(0x18e)));return _0x179149['scripts']??{};}catch{return null;}}function detectPackageManager(_0x1d77a5){const _0x241fcb=a245_0x292b46;if(existsSync(resolve(_0x1d77a5,_0x241fcb(0x155)))||existsSync(resolve(_0x1d77a5,_0x241fcb(0x167))))return'bun';if(existsSync(resolve(_0x1d77a5,_0x241fcb(0x18f))))return _0x241fcb(0x158);if(existsSync(resolve(_0x1d77a5,_0x241fcb(0x182))))return _0x241fcb(0x16a);return _0x241fcb(0x157);}async function versionCheck(_0x5f2fb6){const _0x35854e=a245_0x292b46,_0x43410b=await checkCliVersion();(_0x43410b['needsUpgrade']||_0x43410b[_0x35854e(0x163)])&&(printCliUpgradeWarning(_0x43410b),assertCliVersionSupported(_0x43410b));const _0x52d589=await checkSdkVersion(_0x5f2fb6);if(_0x52d589[_0x35854e(0x172)])printSdkUpgradeWarning(_0x52d589);}function spawnScript(_0xd88b2a,_0x355c8e,_0x5142d2,_0x307c21){return new Promise((_0x5f13aa,_0x2f17e1)=>{const _0x4bff6b=a245_0xc3d2,_0x4920bd=[_0x4bff6b(0x17d),_0x355c8e,..._0x5142d2],_0x4e0bd4=spawn(_0xd88b2a,_0x4920bd,{'cwd':_0x307c21,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x307c21,_0x4bff6b(0x16e),_0x4bff6b(0x15f))+delimiter+process.env.PATH}});_0x4e0bd4['on'](_0x4bff6b(0x16b),_0x5579a9=>{const _0x2b3f92=_0x4bff6b;if(_0x5579a9===0x0||_0x5579a9===null)_0x5f13aa();else _0x2f17e1(new Error(_0xd88b2a+'\x20run\x20'+_0x355c8e+_0x2b3f92(0x168)+_0x5579a9));}),_0x4e0bd4['on']('error',_0x2f17e1);});}function spawnViteBuildWatch(_0x2d6e36){return new Promise((_0x1c28e1,_0x27dd0a)=>{const _0x1f3f62=a245_0xc3d2,_0x4b2226=spawn(_0x1f3f62(0x16d),[_0x1f3f62(0x178),_0x1f3f62(0x170)],{'cwd':_0x2d6e36,'stdio':_0x1f3f62(0x169),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2d6e36,_0x1f3f62(0x16e),_0x1f3f62(0x15f))+delimiter+process.env.PATH}});_0x4b2226['on'](_0x1f3f62(0x16b),_0x60c34d=>{const _0x479fdf=_0x1f3f62;if(_0x60c34d===0x0||_0x60c34d===null)_0x1c28e1();else _0x27dd0a(new Error(_0x479fdf(0x152)+_0x60c34d));}),_0x4b2226['on']('error',_0x27dd0a);});}function a245_0xc3d2(_0x2f4c60,_0x578de1){_0x2f4c60=_0x2f4c60-0x14f;const _0xc62da7=a245_0xc62d();let _0xc3d283=_0xc62da7[_0x2f4c60];return _0xc3d283;}function spawnVitePreview(_0x3337de){return new Promise((_0x71474d,_0x11417a)=>{const _0x11d62e=a245_0xc3d2,_0x4adb00=spawn('vite',[_0x11d62e(0x17a)],{'cwd':_0x3337de,'stdio':_0x11d62e(0x169),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3337de,'node_modules','.bin')+delimiter+process.env.PATH}});_0x4adb00['on'](_0x11d62e(0x16b),_0x14c5a8=>{const _0x21ea11=_0x11d62e;if(_0x14c5a8===0x0||_0x14c5a8===null)_0x71474d();else _0x11417a(new Error(_0x21ea11(0x18d)+_0x14c5a8));}),_0x4adb00['on'](_0x11d62e(0x18c),_0x11417a);});}function a245_0xc62d(){const _0x2f93f3=['\x20run\x20build','bool','slice','watch','10169650YSGrws','4885jWrTMH','write','start','cwd','error','vite\x20preview\x20exited\x20with\x20code\x20','utf-8','pnpm-lock.yaml','push','\x0a\x20\x20Available\x20scripts:\x0a','4366376TSerLW','changed','\x20\x20EXAMPLES','dev','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','path','88YZsNWD','bun.lockb','6OcqvGX','npm','pnpm','log','1005207EGzqaS','keys','3631962fsKuup','package.json','\x20\x20\x20\x20','.bin','\x22\x20not\x20found\x20in\x20package.json.','204003OiKPMf','(none)','belowMinimum','246907GMrmgD','Run\x20a\x20package.json\x20script','Available:\x20','bun.lock','\x20exited\x20with\x20code\x20','inherit','yarn','close','join','vite','node_modules','has','--watch','Enable\x20watch\x20mode\x20for\x20preview','needsUpgrade','\x20run\x20<script>\x0a','\x20run\x20preview\x20--watch','Domain\x20routing\x20synchronized:\x20','script','boolean','build','args','preview','2504WrKacG','all','run','length','parse','No\x20scripts\x20defined\x20in\x20package.json.','validation','yarn.lock'];a245_0xc62d=function(){return _0x2f93f3;};return a245_0xc62d();}const runFlags=[{'name':a245_0x292b46(0x186),'type':a245_0x292b46(0x177),'description':a245_0x292b46(0x171),'default':![]}];export const runDefinition={'service':a245_0x292b46(0x17d),'command':'run','description':a245_0x292b46(0x165),'risk':a245_0x292b46(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a245_0x292b46(0x176),'description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3d3719=a245_0x292b46,_0x1be3e0=[];return _0x1be3e0[_0x3d3719(0x190)](_0x3d3719(0x150)),_0x1be3e0[_0x3d3719(0x190)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20start'),_0x1be3e0['push'](_0x3d3719(0x15e)+CLI_BIN_NAME+_0x3d3719(0x183)),_0x1be3e0[_0x3d3719(0x190)](_0x3d3719(0x15e)+CLI_BIN_NAME+'\x20run\x20preview'),_0x1be3e0['push'](_0x3d3719(0x15e)+CLI_BIN_NAME+_0x3d3719(0x174)),_0x1be3e0[_0x3d3719(0x16c)]('\x0a');},async 'execute'(_0x310ce2){const _0x2b6b06=a245_0x292b46,_0x14b4a2=process[_0x2b6b06(0x18b)](),_0x2e9e78=_0x310ce2[_0x2b6b06(0x179)][0x0],_0x43ca43=_0x310ce2[_0x2b6b06(0x179)][_0x2b6b06(0x185)](0x1),_0x2365c6=readPackageScripts(_0x14b4a2);if(!_0x2365c6)throw CliErrors[_0x2b6b06(0x181)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x2e9e78){const _0x34c6ec=Object[_0x2b6b06(0x15b)](_0x2365c6);if(_0x34c6ec[_0x2b6b06(0x17e)]===0x0)console[_0x2b6b06(0x159)](_0x2b6b06(0x180));else{console['log'](_0x2b6b06(0x191));for(const _0x229d4b of _0x34c6ec){console[_0x2b6b06(0x159)](_0x2b6b06(0x15e)+_0x229d4b);}console[_0x2b6b06(0x159)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x2b6b06(0x173));}return{'ok':!![]};}if(!_0x2365c6[_0x2e9e78])throw CliErrors[_0x2b6b06(0x181)]('Script\x20\x22'+_0x2e9e78+_0x2b6b06(0x160),_0x2b6b06(0x166)+(Object['keys'](_0x2365c6)[_0x2b6b06(0x16c)](',\x20')||_0x2b6b06(0x162)));const _0x33fa3d=detectPackageManager(_0x14b4a2),_0x345072=syncProjectDomainRoutingBeforeScript(_0x14b4a2,_0x2e9e78);_0x345072?.['changed']&&console['error'](_0x2b6b06(0x175)+_0x345072[_0x2b6b06(0x153)]);VERSION_CHECK_SCRIPTS[_0x2b6b06(0x16f)](_0x2e9e78)&&await versionCheck(_0x14b4a2);if(_0x2e9e78===_0x2b6b06(0x17a)&&_0x310ce2[_0x2b6b06(0x184)](_0x2b6b06(0x186)))return await Promise[_0x2b6b06(0x17c)]([spawnViteBuildWatch(_0x14b4a2),spawnVitePreview(_0x14b4a2)]),{'ok':!![]};return await spawnScript(_0x33fa3d,_0x2e9e78,_0x43ca43,_0x14b4a2),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a246_0x53e3b5=a246_0xfc5a;function a246_0x2667(){const _0x88114a=['260ftUywh','98412QkWroQ','818044xPEOXY','642342pVAhUh','schema','11FVbbyJ','1626639RhQruI','999122xXpDRb','read','4261914PfGeZD','15294910QHSqtV','json','8PEUJFn','8zaHuqB'];a246_0x2667=function(){return _0x88114a;};return a246_0x2667();}function a246_0xfc5a(_0xd98708,_0x1b223a){_0xd98708=_0xd98708-0x139;const _0x2667f4=a246_0x2667();let _0xfc5ae3=_0x2667f4[_0xd98708];return _0xfc5ae3;}(function(_0x1d847d,_0x41fa46){const _0x24a8d2=a246_0xfc5a,_0x3f9314=_0x1d847d();while(!![]){try{const _0x493d64=-parseInt(_0x24a8d2(0x13d))/0x1+parseInt(_0x24a8d2(0x142))/0x2+-parseInt(_0x24a8d2(0x13e))/0x3*(parseInt(_0x24a8d2(0x139))/0x4)+parseInt(_0x24a8d2(0x13b))/0x5*(-parseInt(_0x24a8d2(0x13c))/0x6)+parseInt(_0x24a8d2(0x141))/0x7+-parseInt(_0x24a8d2(0x13a))/0x8*(-parseInt(_0x24a8d2(0x144))/0x9)+-parseInt(_0x24a8d2(0x145))/0xa*(-parseInt(_0x24a8d2(0x140))/0xb);if(_0x493d64===_0x41fa46)break;else _0x3f9314['push'](_0x3f9314['shift']());}catch(_0x19cf2b){_0x3f9314['push'](_0x3f9314['shift']());}}}(a246_0x2667,0x9b397));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x123b18){const _0x1886f3=await buildSchemaPayload();return{'ok':!![],'data':_0x1886f3};}export const schemaDefinition={'service':a246_0x53e3b5(0x13f),'command':'export','description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a246_0x53e3b5(0x143),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a246_0x53e3b5(0x146),'flags':[],'execute':execute};
1
+ function a246_0x3add(_0x565b80,_0x39a4b4){_0x565b80=_0x565b80-0x6e;const _0x58f633=a246_0x58f6();let _0x3addb7=_0x58f633[_0x565b80];return _0x3addb7;}const a246_0x30f462=a246_0x3add;(function(_0x267ee2,_0x5629ff){const _0x38174d=a246_0x3add,_0x13d24e=_0x267ee2();while(!![]){try{const _0x38f168=parseInt(_0x38174d(0x6f))/0x1+parseInt(_0x38174d(0x74))/0x2*(-parseInt(_0x38174d(0x70))/0x3)+-parseInt(_0x38174d(0x77))/0x4*(parseInt(_0x38174d(0x75))/0x5)+-parseInt(_0x38174d(0x73))/0x6*(parseInt(_0x38174d(0x72))/0x7)+parseInt(_0x38174d(0x71))/0x8+parseInt(_0x38174d(0x7a))/0x9+-parseInt(_0x38174d(0x7c))/0xa*(parseInt(_0x38174d(0x79))/0xb);if(_0x38f168===_0x5629ff)break;else _0x13d24e['push'](_0x13d24e['shift']());}catch(_0x3efea8){_0x13d24e['push'](_0x13d24e['shift']());}}}(a246_0x58f6,0x5140c));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x297ccb){const _0x47e393=await buildSchemaPayload();return{'ok':!![],'data':_0x47e393};}export const schemaDefinition={'service':a246_0x30f462(0x7b),'command':a246_0x30f462(0x76),'description':a246_0x30f462(0x6e),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a246_0x30f462(0x78),'flags':[],'execute':execute};function a246_0x58f6(){const _0x3ebf5f=['20CqjdOD','Export\x20machine-readable\x20command\x20schema\x20(JSON)','631469BWGJnS','2469PihtZn','3819096criBGb','67137ZkNozB','198TfxtRF','122dhglWq','5ucCfxN','export','334052pjdUAR','json','2977711KgDYIv','1940193QAjTTD','schema'];a246_0x58f6=function(){return _0x3ebf5f;};return a246_0x58f6();}
@@ -1 +1 @@
1
- const a247_0x2ee645=a247_0x51f5;(function(_0x3b3638,_0x1f9d7a){const _0xdb2c7e=a247_0x51f5,_0xadf74c=_0x3b3638();while(!![]){try{const _0x42ec41=parseInt(_0xdb2c7e(0x123))/0x1+parseInt(_0xdb2c7e(0x157))/0x2*(parseInt(_0xdb2c7e(0x14f))/0x3)+parseInt(_0xdb2c7e(0x14e))/0x4*(-parseInt(_0xdb2c7e(0x117))/0x5)+parseInt(_0xdb2c7e(0x129))/0x6*(parseInt(_0xdb2c7e(0x124))/0x7)+parseInt(_0xdb2c7e(0x13d))/0x8*(-parseInt(_0xdb2c7e(0x13e))/0x9)+-parseInt(_0xdb2c7e(0x12b))/0xa+-parseInt(_0xdb2c7e(0x15d))/0xb*(-parseInt(_0xdb2c7e(0x135))/0xc);if(_0x42ec41===_0x1f9d7a)break;else _0xadf74c['push'](_0xadf74c['shift']());}catch(_0x5c5245){_0xadf74c['push'](_0xadf74c['shift']());}}}(a247_0x5213,0xd5b0e));import{writeFile}from'node:fs/promises';import{input,select}from'@inquirer/prompts';function a247_0x51f5(_0x5b0c99,_0xcc300b){_0x5b0c99=_0x5b0c99-0x117;const _0x5213ef=a247_0x5213();let _0x51f51c=_0x5213ef[_0x5b0c99];return _0x51f51c;}import{createSqlQuery}from'../../core/api-client.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a247_0x5213(){const _0x212a81=['<select\x20id=\x22query\x22\x20resultType=\x22map\x22>','db-id','create','new','toISOString','sqls','sqlRootDir','description','179418FrjtkX','11241587UWsLss','SELECT\x201\x20AS\x20id;','str','sqlCode','isInteger','6gqvRyW','Target\x20database\x20ID','15469440THOTOg','dbId','string','catch','sqlRoot','Create\x20a\x20new\x20custom\x20SQL\x20and\x20scaffold\x20it\x20locally','stringify','dbId\x20must\x20be\x20a\x20positive\x20integer','map','SQL\x20query\x20display\x20name','36fKPgBJ','join','Select\x20the\x20local\x20SQL\x20mode:','--name\x20is\x20required\x20in\x20non-interactive\x20mode.','length','lastSync','POST','parse','2328xPzdxs','5589LLAWxH','/smartapi/custom/saveUserCustomSql','--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.','SQL\x20name\x20cannot\x20be\x20empty','nonInteractive','lockFilePath','dbId\x20cannot\x20be\x20empty','number','__manual__','trim','write','Select\x20the\x20target\x20database:','For\x20MyBatis\x20XML\x20SQL\x20with\x20dynamic\x20tags','Would\x20create\x20a\x20new\x20SQL\x20query\x20and\x20scaffold\x20it\x20under\x20','dbName','sql','48tMDvJE','105MZmrEq','flagMissing','mybatisXml','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.','Created\x20SQL\x20query\x20','\x20\x20SELECT\x201\x20AS\x20id','For\x20SELECT\x20/\x20INSERT\x20/\x20UPDATE\x20/\x20DELETE\x20statements\x20that\x20run\x20directly','appCode','49190tTzgbY','validation','✎\x20Enter\x20dbId\x20manually','mode','MyBatis\x20XML\x20(mybatisXml)','name','3718649bNAsBX','440595yUKdXo','isFinite','sqlName','Invalid\x20database\x20selection\x20payload:\x20'];a247_0x5213=function(){return _0x212a81;};return a247_0x5213();}import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{buildSqlRelativePath}from'../../core/sql-sync/utils.js';import{CliErrors}from'../../errors.js';import{buildLocalSqlFileContent,buildSqlLockEntry,ensureRemoteSqlContent}from'./shared.js';function generateSqlTemplate(_0x2fa646){const _0x3b42e4=a247_0x51f5;if(_0x2fa646===_0x3b42e4(0x151))return[_0x3b42e4(0x11b),_0x3b42e4(0x154),'</select>',''][_0x3b42e4(0x136)]('\x0a');return[_0x3b42e4(0x125),'']['join']('\x0a');}export const sqlCreate={'service':a247_0x2ee645(0x14d),'command':a247_0x2ee645(0x11d),'description':a247_0x2ee645(0x130),'risk':a247_0x2ee645(0x148),'flags':[{'name':'name','type':a247_0x2ee645(0x12d),'description':a247_0x2ee645(0x134)},{'name':a247_0x2ee645(0x11c),'type':a247_0x2ee645(0x145),'description':a247_0x2ee645(0x12a)},{'name':a247_0x2ee645(0x15a),'type':a247_0x2ee645(0x12d),'enum':[a247_0x2ee645(0x14d),a247_0x2ee645(0x151)],'description':'Local\x20SQL\x20file\x20mode'}],async 'validate'(_0x358a3e){const _0x380627=a247_0x2ee645;if(!_0x358a3e[_0x380627(0x142)])return;if(!_0x358a3e[_0x380627(0x126)](_0x380627(0x15c))[_0x380627(0x147)]())throw CliErrors['flagMissing'](_0x380627(0x15c),_0x380627(0x138));const _0x3d2928=resolveProvidedDbId(_0x358a3e);if(typeof _0x3d2928!==_0x380627(0x145)||!Number[_0x380627(0x118)](_0x3d2928)||_0x3d2928<=0x0)throw CliErrors[_0x380627(0x150)](_0x380627(0x11c),'--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.');if(!_0x358a3e[_0x380627(0x126)](_0x380627(0x15a))['trim']())throw CliErrors[_0x380627(0x150)](_0x380627(0x15a),_0x380627(0x152));},async 'dryRun'(_0x206882){const _0x1a978e=a247_0x2ee645,_0x568aaa=loadSqlProjectConfig(_0x206882['appCode']),{sqlName:_0x13af2c,dbId:_0x3e8a15,dbName:_0x45a7c9,mode:_0x9b8441}=await resolveSqlNewInputs(_0x206882),_0x597127=buildSqlRelativePath('<server-generated-sqlCode>',_0x13af2c,_0x45a7c9,_0x9b8441,_0x3e8a15),_0x41c465=_0x568aaa['sqlRootDir']+'/'+_0x597127;return{'method':_0x1a978e(0x13b),'url':_0x1a978e(0x13f),'body':{'appCode':_0x206882[_0x1a978e(0x156)],'sqlName':_0x13af2c,'dbId':_0x3e8a15,'mode':_0x9b8441,'localPath':_0x41c465},'description':_0x1a978e(0x14b)+_0x568aaa[_0x1a978e(0x121)]};},async 'execute'(_0x20abb3){const _0x357500=a247_0x2ee645,_0x2ce8e5=loadSqlProjectConfig(_0x20abb3[_0x357500(0x156)]),{sqlName:_0x56fdcb,dbId:_0x258966,dbName:_0x417189,mode:_0x3d8932}=await resolveSqlNewInputs(_0x20abb3),_0x3b00aa=generateSqlTemplate(_0x3d8932),_0x6d2040=await createSqlQuery({'appCode':_0x20abb3[_0x357500(0x156)],'sqlName':_0x56fdcb,'dbId':_0x258966,'sqlContent':_0x3b00aa}),_0x320cf8=ensureRemoteSqlContent(_0x6d2040),_0x319eb2=_0x417189||await getDbName(_0x20abb3[_0x357500(0x156)],_0x258966)[_0x357500(0x12e)](()=>undefined),_0x2b8a43=buildSqlRelativePath(_0x6d2040[_0x357500(0x127)],_0x6d2040[_0x357500(0x119)],_0x319eb2,_0x3d8932,_0x258966),_0x798366=_0x2ce8e5['sqlRootDir']+'/'+_0x2b8a43,_0x266dbf=buildLocalSqlFileContent({'sqlCode':_0x6d2040[_0x357500(0x127)],'sqlName':_0x6d2040[_0x357500(0x119)],'dbId':_0x6d2040[_0x357500(0x12c)]},_0x320cf8,{'dbName':_0x319eb2,'mode':_0x3d8932,'syncedAt':new Date()[_0x357500(0x11f)](),'description':_0x6d2040[_0x357500(0x122)]});if(await fileExists(_0x798366))throw CliErrors[_0x357500(0x158)]('File\x20already\x20exists:\x20'+_0x798366);await ensureParentDirectory(_0x798366),await writeFile(_0x798366,_0x266dbf,'utf8');const _0x472cf3=await readSqlLockFile(_0x2ce8e5[_0x357500(0x143)]),{lockData:_0x25eb6d,appLock:_0x4aef70}=ensureSqlLockScope(_0x472cf3??createEmptySqlLock(),_0x2ce8e5['appCode'],_0x2ce8e5[_0x357500(0x12f)],_0x357500(0x11e));return _0x4aef70[_0x357500(0x120)][_0x6d2040[_0x357500(0x127)]]={...buildSqlLockEntry(_0x6d2040,_0x320cf8,computeSqlContentHash(_0x266dbf),{'dbName':_0x319eb2}),'path':_0x2b8a43,'mode':_0x3d8932},_0x4aef70[_0x357500(0x13a)]=new Date()[_0x357500(0x11f)](),await writeSqlLockFile(_0x2ce8e5[_0x357500(0x143)],_0x25eb6d),{'ok':!![],'data':{'id':_0x6d2040['id'],'sqlCode':_0x6d2040[_0x357500(0x127)],'sqlName':_0x6d2040[_0x357500(0x119)],'dbId':_0x6d2040[_0x357500(0x12c)],'path':_0x798366,'mode':_0x3d8932},'message':_0x357500(0x153)+_0x6d2040[_0x357500(0x127)]};}};async function resolveSqlNewInputs(_0x479911){const _0xcdbdf1=await resolveSqlNameInput(_0x479911),{dbId:_0xbcccc6,dbName:_0x2413fe}=await resolveDbSelection(_0x479911),_0x3d678d=await resolveSqlModeInput(_0x479911);return{'sqlName':_0xcdbdf1,'dbId':_0xbcccc6,'dbName':_0x2413fe,'mode':_0x3d678d};}async function resolveSqlNameInput(_0x31015e){const _0x2e03f3=a247_0x2ee645,_0x4f3308=_0x31015e[_0x2e03f3(0x126)](_0x2e03f3(0x15c))[_0x2e03f3(0x147)]();if(_0x4f3308)return _0x4f3308;if(_0x31015e[_0x2e03f3(0x142)])throw CliErrors[_0x2e03f3(0x150)](_0x2e03f3(0x15c),'--name\x20is\x20required\x20in\x20non-interactive\x20mode.');return(await input({'message':'SQL\x20name:','validate':_0x1c4bb1=>_0x1c4bb1[_0x2e03f3(0x147)]()?!![]:_0x2e03f3(0x141)}))[_0x2e03f3(0x147)]();}async function resolveDbSelection(_0x5be8d9){const _0x19e46e=a247_0x2ee645,_0x6230c4=resolveProvidedDbId(_0x5be8d9);if(typeof _0x6230c4===_0x19e46e(0x145)&&Number[_0x19e46e(0x118)](_0x6230c4)&&_0x6230c4>0x0)return{'dbId':_0x6230c4,'dbName':await getDbName(_0x5be8d9[_0x19e46e(0x156)],_0x6230c4)[_0x19e46e(0x12e)](()=>undefined)};if(_0x5be8d9[_0x19e46e(0x142)])throw CliErrors[_0x19e46e(0x150)](_0x19e46e(0x11c),_0x19e46e(0x140));const _0x12650c=await listDatabases(_0x5be8d9[_0x19e46e(0x156)])['catch'](()=>[]);if(_0x12650c[_0x19e46e(0x139)]===0x1)return{'dbId':_0x12650c[0x0][_0x19e46e(0x12c)],'dbName':_0x12650c[0x0]['dbName']};if(_0x12650c[_0x19e46e(0x139)]>0x1){const _0x3af36c=await select({'message':_0x19e46e(0x149),'choices':[..._0x12650c[_0x19e46e(0x133)](_0x1d2c52=>({'name':_0x1d2c52[_0x19e46e(0x14c)]+'\x20('+_0x1d2c52[_0x19e46e(0x12c)]+')','value':serializeDbSelection(_0x1d2c52)})),{'name':_0x19e46e(0x159),'value':_0x19e46e(0x146)}]});if(_0x3af36c!==_0x19e46e(0x146))return deserializeDbSelection(_0x3af36c);}const _0x3c53d=await input({'message':'Target\x20database\x20dbId:','validate':_0x126e1d=>{const _0x1937ac=_0x19e46e,_0x1282f7=_0x126e1d[_0x1937ac(0x147)]();if(!_0x1282f7)return _0x1937ac(0x144);const _0x421421=Number(_0x1282f7);if(!Number[_0x1937ac(0x128)](_0x421421)||_0x421421<=0x0)return _0x1937ac(0x132);return!![];}});return{'dbId':Number(_0x3c53d[_0x19e46e(0x147)]())};}async function resolveSqlModeInput(_0x11cc5b){const _0x5a6ed6=a247_0x2ee645,_0x573647=_0x11cc5b[_0x5a6ed6(0x126)](_0x5a6ed6(0x15a))[_0x5a6ed6(0x147)]();if(_0x573647===_0x5a6ed6(0x14d)||_0x573647===_0x5a6ed6(0x151))return _0x573647;if(_0x11cc5b[_0x5a6ed6(0x142)])throw CliErrors[_0x5a6ed6(0x150)](_0x5a6ed6(0x15a),_0x5a6ed6(0x152));return await select({'message':_0x5a6ed6(0x137),'choices':[{'name':'Plain\x20SQL\x20(sql)','value':_0x5a6ed6(0x14d),'description':_0x5a6ed6(0x155)},{'name':_0x5a6ed6(0x15b),'value':_0x5a6ed6(0x151),'description':_0x5a6ed6(0x14a)}]});}function serializeDbSelection(_0x53ae49){const _0x20b54c=a247_0x2ee645;return JSON[_0x20b54c(0x131)]({'dbId':_0x53ae49['dbId'],'dbName':_0x53ae49[_0x20b54c(0x14c)]});}function deserializeDbSelection(_0x1e734d){const _0x3b3636=a247_0x2ee645;try{const _0x25e50b=JSON[_0x3b3636(0x13c)](_0x1e734d);if(typeof _0x25e50b['dbId']===_0x3b3636(0x145)&&Number['isFinite'](_0x25e50b[_0x3b3636(0x12c)]))return{'dbId':_0x25e50b['dbId'],'dbName':_0x25e50b[_0x3b3636(0x14c)]};}catch{}throw CliErrors[_0x3b3636(0x158)](_0x3b3636(0x11a)+_0x1e734d);}function resolveProvidedDbId(_0x39d80e){const _0xb3cbf0=a247_0x2ee645,_0x230a02=_0x39d80e['flag'](_0xb3cbf0(0x11c));if(typeof _0x230a02===_0xb3cbf0(0x145)&&Number[_0xb3cbf0(0x118)](_0x230a02))return _0x230a02;return undefined;}
1
+ const a247_0x49cbfa=a247_0x38bb;(function(_0x5beb94,_0x408b4a){const _0x2ed220=a247_0x38bb,_0xef2281=_0x5beb94();while(!![]){try{const _0x269ac6=-parseInt(_0x2ed220(0x13c))/0x1+-parseInt(_0x2ed220(0x124))/0x2+parseInt(_0x2ed220(0x130))/0x3*(parseInt(_0x2ed220(0x135))/0x4)+parseInt(_0x2ed220(0x125))/0x5+-parseInt(_0x2ed220(0x143))/0x6+parseInt(_0x2ed220(0x12b))/0x7*(-parseInt(_0x2ed220(0x134))/0x8)+parseInt(_0x2ed220(0x118))/0x9;if(_0x269ac6===_0x408b4a)break;else _0xef2281['push'](_0xef2281['shift']());}catch(_0x32ec54){_0xef2281['push'](_0xef2281['shift']());}}}(a247_0x518c,0x6314d));import{writeFile}from'node:fs/promises';import{input,select}from'@inquirer/prompts';import{createSqlQuery}from'../../core/api-client.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{buildSqlRelativePath}from'../../core/sql-sync/utils.js';import{CliErrors}from'../../errors.js';import{buildLocalSqlFileContent,buildSqlLockEntry,ensureRemoteSqlContent}from'./shared.js';function generateSqlTemplate(_0x1e045a){const _0x1909f0=a247_0x38bb;if(_0x1e045a==='mybatisXml')return[_0x1909f0(0x132),'\x20\x20SELECT\x201\x20AS\x20id',_0x1909f0(0x11e),''][_0x1909f0(0x136)]('\x0a');return['SELECT\x201\x20AS\x20id;',''][_0x1909f0(0x136)]('\x0a');}function a247_0x518c(){const _0x418244=['write','For\x20MyBatis\x20XML\x20SQL\x20with\x20dynamic\x20tags','lastSync','138bxAwjB','POST','<select\x20id=\x22query\x22\x20resultType=\x22map\x22>','sqlCode','2238584kAqXtt','41960DQqwCL','join','validation','catch','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.','db-id','dbId','307163OLZZXT','new','dbId\x20cannot\x20be\x20empty','lockFilePath','Local\x20SQL\x20file\x20mode','mode','SQL\x20name\x20cannot\x20be\x20empty','2970072LWregp','dbName','trim','Would\x20create\x20a\x20new\x20SQL\x20query\x20and\x20scaffold\x20it\x20under\x20','__manual__','MyBatis\x20XML\x20(mybatisXml)','isInteger','sqlRootDir','name','toISOString','isFinite','create','SQL\x20name:','utf8','mybatisXml','flagMissing','Target\x20database\x20dbId:','Plain\x20SQL\x20(sql)','sql','Create\x20a\x20new\x20custom\x20SQL\x20and\x20scaffold\x20it\x20locally','length','number','/smartapi/custom/saveUserCustomSql','For\x20SELECT\x20/\x20INSERT\x20/\x20UPDATE\x20/\x20DELETE\x20statements\x20that\x20run\x20directly','10625652YBDWGM','nonInteractive','stringify','sqlRoot','--name\x20is\x20required\x20in\x20non-interactive\x20mode.','str','</select>','--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.','Created\x20SQL\x20query\x20','Select\x20the\x20target\x20database:','string','dbId\x20must\x20be\x20a\x20positive\x20integer','1578304mlkQQr','3069095fitGaT','SQL\x20query\x20display\x20name','✎\x20Enter\x20dbId\x20manually','File\x20already\x20exists:\x20','appCode','sqls','7VDtQjI','sqlName'];a247_0x518c=function(){return _0x418244;};return a247_0x518c();}export const sqlCreate={'service':a247_0x49cbfa(0x155),'command':a247_0x49cbfa(0x14e),'description':a247_0x49cbfa(0x113),'risk':a247_0x49cbfa(0x12d),'flags':[{'name':a247_0x49cbfa(0x14b),'type':a247_0x49cbfa(0x122),'description':a247_0x49cbfa(0x126)},{'name':a247_0x49cbfa(0x13a),'type':a247_0x49cbfa(0x115),'description':'Target\x20database\x20ID'},{'name':'mode','type':a247_0x49cbfa(0x122),'enum':[a247_0x49cbfa(0x155),a247_0x49cbfa(0x151)],'description':a247_0x49cbfa(0x140)}],async 'validate'(_0x1b7ab7){const _0x33b73a=a247_0x49cbfa;if(!_0x1b7ab7[_0x33b73a(0x119)])return;if(!_0x1b7ab7['str'](_0x33b73a(0x14b))[_0x33b73a(0x145)]())throw CliErrors['flagMissing'](_0x33b73a(0x14b),_0x33b73a(0x11c));const _0x202d25=resolveProvidedDbId(_0x1b7ab7);if(typeof _0x202d25!==_0x33b73a(0x115)||!Number['isFinite'](_0x202d25)||_0x202d25<=0x0)throw CliErrors[_0x33b73a(0x152)](_0x33b73a(0x13a),_0x33b73a(0x11f));if(!_0x1b7ab7[_0x33b73a(0x11d)](_0x33b73a(0x141))[_0x33b73a(0x145)]())throw CliErrors[_0x33b73a(0x152)](_0x33b73a(0x141),_0x33b73a(0x139));},async 'dryRun'(_0x1e0c5f){const _0x306d2a=a247_0x49cbfa,_0x586d77=loadSqlProjectConfig(_0x1e0c5f[_0x306d2a(0x129)]),{sqlName:_0x2e836f,dbId:_0x119e14,dbName:_0x3e67f7,mode:_0x338f6a}=await resolveSqlNewInputs(_0x1e0c5f),_0x3be948=buildSqlRelativePath('<server-generated-sqlCode>',_0x2e836f,_0x3e67f7,_0x338f6a,_0x119e14),_0x3a3740=_0x586d77[_0x306d2a(0x14a)]+'/'+_0x3be948;return{'method':_0x306d2a(0x131),'url':_0x306d2a(0x116),'body':{'appCode':_0x1e0c5f[_0x306d2a(0x129)],'sqlName':_0x2e836f,'dbId':_0x119e14,'mode':_0x338f6a,'localPath':_0x3a3740},'description':_0x306d2a(0x146)+_0x586d77[_0x306d2a(0x14a)]};},async 'execute'(_0x3c18fd){const _0x53bd6e=a247_0x49cbfa,_0x43777a=loadSqlProjectConfig(_0x3c18fd[_0x53bd6e(0x129)]),{sqlName:_0x19278c,dbId:_0x3037c4,dbName:_0x51b023,mode:_0x34e31f}=await resolveSqlNewInputs(_0x3c18fd),_0x569e3c=generateSqlTemplate(_0x34e31f),_0x5eeeac=await createSqlQuery({'appCode':_0x3c18fd[_0x53bd6e(0x129)],'sqlName':_0x19278c,'dbId':_0x3037c4,'sqlContent':_0x569e3c}),_0x1a4fbd=ensureRemoteSqlContent(_0x5eeeac),_0x1c2f03=_0x51b023||await getDbName(_0x3c18fd[_0x53bd6e(0x129)],_0x3037c4)[_0x53bd6e(0x138)](()=>undefined),_0x5f2bf8=buildSqlRelativePath(_0x5eeeac[_0x53bd6e(0x133)],_0x5eeeac[_0x53bd6e(0x12c)],_0x1c2f03,_0x34e31f,_0x3037c4),_0x4d7640=_0x43777a[_0x53bd6e(0x14a)]+'/'+_0x5f2bf8,_0xea5b0a=buildLocalSqlFileContent({'sqlCode':_0x5eeeac[_0x53bd6e(0x133)],'sqlName':_0x5eeeac[_0x53bd6e(0x12c)],'dbId':_0x5eeeac[_0x53bd6e(0x13b)]},_0x1a4fbd,{'dbName':_0x1c2f03,'mode':_0x34e31f,'syncedAt':new Date()[_0x53bd6e(0x14c)](),'description':_0x5eeeac['description']});if(await fileExists(_0x4d7640))throw CliErrors[_0x53bd6e(0x137)](_0x53bd6e(0x128)+_0x4d7640);await ensureParentDirectory(_0x4d7640),await writeFile(_0x4d7640,_0xea5b0a,_0x53bd6e(0x150));const _0x197176=await readSqlLockFile(_0x43777a[_0x53bd6e(0x13f)]),{lockData:_0x539266,appLock:_0x1efd4}=ensureSqlLockScope(_0x197176??createEmptySqlLock(),_0x43777a[_0x53bd6e(0x129)],_0x43777a[_0x53bd6e(0x11b)],_0x53bd6e(0x13d));return _0x1efd4[_0x53bd6e(0x12a)][_0x5eeeac[_0x53bd6e(0x133)]]={...buildSqlLockEntry(_0x5eeeac,_0x1a4fbd,computeSqlContentHash(_0xea5b0a),{'dbName':_0x1c2f03}),'path':_0x5f2bf8,'mode':_0x34e31f},_0x1efd4[_0x53bd6e(0x12f)]=new Date()['toISOString'](),await writeSqlLockFile(_0x43777a[_0x53bd6e(0x13f)],_0x539266),{'ok':!![],'data':{'id':_0x5eeeac['id'],'sqlCode':_0x5eeeac[_0x53bd6e(0x133)],'sqlName':_0x5eeeac['sqlName'],'dbId':_0x5eeeac[_0x53bd6e(0x13b)],'path':_0x4d7640,'mode':_0x34e31f},'message':_0x53bd6e(0x120)+_0x5eeeac[_0x53bd6e(0x133)]};}};function a247_0x38bb(_0x1d9c50,_0x2c27fc){_0x1d9c50=_0x1d9c50-0x113;const _0x518c19=a247_0x518c();let _0x38bb89=_0x518c19[_0x1d9c50];return _0x38bb89;}async function resolveSqlNewInputs(_0x3221af){const _0x12ef57=await resolveSqlNameInput(_0x3221af),{dbId:_0x2dd68a,dbName:_0x375b94}=await resolveDbSelection(_0x3221af),_0x2ee0ec=await resolveSqlModeInput(_0x3221af);return{'sqlName':_0x12ef57,'dbId':_0x2dd68a,'dbName':_0x375b94,'mode':_0x2ee0ec};}async function resolveSqlNameInput(_0x36e8f6){const _0x2c5203=a247_0x49cbfa,_0x46a0db=_0x36e8f6[_0x2c5203(0x11d)](_0x2c5203(0x14b))[_0x2c5203(0x145)]();if(_0x46a0db)return _0x46a0db;if(_0x36e8f6[_0x2c5203(0x119)])throw CliErrors[_0x2c5203(0x152)](_0x2c5203(0x14b),_0x2c5203(0x11c));return(await input({'message':_0x2c5203(0x14f),'validate':_0x3f3bbf=>_0x3f3bbf[_0x2c5203(0x145)]()?!![]:_0x2c5203(0x142)}))[_0x2c5203(0x145)]();}async function resolveDbSelection(_0x4ada0f){const _0x1097d2=a247_0x49cbfa,_0x500666=resolveProvidedDbId(_0x4ada0f);if(typeof _0x500666==='number'&&Number['isFinite'](_0x500666)&&_0x500666>0x0)return{'dbId':_0x500666,'dbName':await getDbName(_0x4ada0f[_0x1097d2(0x129)],_0x500666)['catch'](()=>undefined)};if(_0x4ada0f['nonInteractive'])throw CliErrors[_0x1097d2(0x152)]('db-id',_0x1097d2(0x11f));const _0x2702e6=await listDatabases(_0x4ada0f[_0x1097d2(0x129)])[_0x1097d2(0x138)](()=>[]);if(_0x2702e6[_0x1097d2(0x114)]===0x1)return{'dbId':_0x2702e6[0x0][_0x1097d2(0x13b)],'dbName':_0x2702e6[0x0]['dbName']};if(_0x2702e6[_0x1097d2(0x114)]>0x1){const _0x5ef435=await select({'message':_0x1097d2(0x121),'choices':[..._0x2702e6['map'](_0x2dbf96=>({'name':_0x2dbf96[_0x1097d2(0x144)]+'\x20('+_0x2dbf96[_0x1097d2(0x13b)]+')','value':serializeDbSelection(_0x2dbf96)})),{'name':_0x1097d2(0x127),'value':'__manual__'}]});if(_0x5ef435!==_0x1097d2(0x147))return deserializeDbSelection(_0x5ef435);}const _0x43ad2e=await input({'message':_0x1097d2(0x153),'validate':_0x45df7e=>{const _0x43254e=_0x1097d2,_0x28eabb=_0x45df7e['trim']();if(!_0x28eabb)return _0x43254e(0x13e);const _0x232ab6=Number(_0x28eabb);if(!Number[_0x43254e(0x149)](_0x232ab6)||_0x232ab6<=0x0)return _0x43254e(0x123);return!![];}});return{'dbId':Number(_0x43ad2e[_0x1097d2(0x145)]())};}async function resolveSqlModeInput(_0x2ef2be){const _0x1b2fe9=a247_0x49cbfa,_0x247d7c=_0x2ef2be[_0x1b2fe9(0x11d)](_0x1b2fe9(0x141))['trim']();if(_0x247d7c==='sql'||_0x247d7c===_0x1b2fe9(0x151))return _0x247d7c;if(_0x2ef2be[_0x1b2fe9(0x119)])throw CliErrors[_0x1b2fe9(0x152)](_0x1b2fe9(0x141),_0x1b2fe9(0x139));return await select({'message':'Select\x20the\x20local\x20SQL\x20mode:','choices':[{'name':_0x1b2fe9(0x154),'value':_0x1b2fe9(0x155),'description':_0x1b2fe9(0x117)},{'name':_0x1b2fe9(0x148),'value':_0x1b2fe9(0x151),'description':_0x1b2fe9(0x12e)}]});}function serializeDbSelection(_0x4f4850){const _0x3b1137=a247_0x49cbfa;return JSON[_0x3b1137(0x11a)]({'dbId':_0x4f4850['dbId'],'dbName':_0x4f4850[_0x3b1137(0x144)]});}function deserializeDbSelection(_0x364398){const _0x37f7d7=a247_0x49cbfa;try{const _0x46913d=JSON['parse'](_0x364398);if(typeof _0x46913d[_0x37f7d7(0x13b)]===_0x37f7d7(0x115)&&Number[_0x37f7d7(0x14d)](_0x46913d[_0x37f7d7(0x13b)]))return{'dbId':_0x46913d[_0x37f7d7(0x13b)],'dbName':_0x46913d[_0x37f7d7(0x144)]};}catch{}throw CliErrors[_0x37f7d7(0x137)]('Invalid\x20database\x20selection\x20payload:\x20'+_0x364398);}function resolveProvidedDbId(_0x2cc19c){const _0x3f5b38=a247_0x49cbfa,_0x4de5c5=_0x2cc19c['flag'](_0x3f5b38(0x13a));if(typeof _0x4de5c5===_0x3f5b38(0x115)&&Number['isFinite'](_0x4de5c5))return _0x4de5c5;return undefined;}
@@ -1 +1 @@
1
- const a248_0x3cc8dd=a248_0x36be;(function(_0xa41f16,_0x2297b2){const _0xc1427a=a248_0x36be,_0x24eb75=_0xa41f16();while(!![]){try{const _0x1a74fa=-parseInt(_0xc1427a(0x7b))/0x1*(parseInt(_0xc1427a(0x81))/0x2)+parseInt(_0xc1427a(0x74))/0x3*(-parseInt(_0xc1427a(0x83))/0x4)+-parseInt(_0xc1427a(0x7d))/0x5+parseInt(_0xc1427a(0x6f))/0x6*(parseInt(_0xc1427a(0x79))/0x7)+parseInt(_0xc1427a(0x67))/0x8*(parseInt(_0xc1427a(0x7f))/0x9)+parseInt(_0xc1427a(0x87))/0xa+parseInt(_0xc1427a(0x78))/0xb*(parseInt(_0xc1427a(0x77))/0xc);if(_0x1a74fa===_0x2297b2)break;else _0x24eb75['push'](_0x24eb75['shift']());}catch(_0xda93b6){_0x24eb75['push'](_0x24eb75['shift']());}}}(a248_0x16ca,0x54726));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{fileExists}from'../../core/bff/file-system.js';function a248_0x16ca(){const _0x559c77=['sqlcode','sqls','314859HAoKdU','toISOString','trashDir','4591752BjVmBK','11GDZCMK','1156932kDVmlg','Delete\x20a\x20SQL\x20query\x20from\x20remote\x20and\x20local','608nSdQTP','trashedTo','1321130cLAbeB','SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.','1246473NFEIMr','lockFilePath','2182ilKvXt','fromEntries','12ySYKiN','high-risk-write','projectRoot','Would\x20delete\x20SQL\x20','4328390iRoytS','Deleted\x20','No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22','sqlRootDir','filter','16ihePpu','delete','startsWith','validation','POST','\x20(local\x20file\x20moved\x20to\x20trash)','sqlRoot','appCode','18uhsQrZ','sql','str'];a248_0x16ca=function(){return _0x559c77;};return a248_0x16ca();}function a248_0x36be(_0x316271,_0x49ed00){_0x316271=_0x316271-0x66;const _0x16ca35=a248_0x16ca();let _0x36be45=_0x16ca35[_0x316271];return _0x36be45;}import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDelete={'service':a248_0x3cc8dd(0x70),'command':'delete','description':a248_0x3cc8dd(0x7a),'risk':a248_0x3cc8dd(0x84),'flags':[SQLCODE_FLAG],async 'validate'(_0x552dd1){const _0x536002=a248_0x3cc8dd,_0x1d6f31=loadSqlProjectConfig(_0x552dd1['appCode']),_0x162918=await readSqlLockFile(_0x1d6f31[_0x536002(0x80)]);if(!_0x162918)throw CliErrors[_0x536002(0x6a)](_0x536002(0x7e));},async 'dryRun'(_0x28b444){const _0x4f09d0=a248_0x3cc8dd,_0x732023=loadSqlProjectConfig(_0x28b444['appCode']),_0x4e82c0=await readSqlLockFile(_0x732023['lockFilePath']);if(!_0x4e82c0)throw CliErrors[_0x4f09d0(0x6a)](_0x4f09d0(0x7e));const {appLock:_0x1c147e}=ensureSqlLockScope(_0x4e82c0,_0x28b444[_0x4f09d0(0x6e)],_0x732023['sqlRoot'],_0x4f09d0(0x68)),_0x53db5e=_0x28b444[_0x4f09d0(0x71)](_0x4f09d0(0x72)),_0x10e5ad=_0x1c147e['sqls'][_0x53db5e];if(!_0x10e5ad)throw CliErrors[_0x4f09d0(0x6a)](_0x4f09d0(0x89)+_0x53db5e+'\x22.');return{'method':_0x4f09d0(0x6b),'url':'/smartapi/custom/deleteUserCustomSql','body':{'sqlCode':_0x53db5e,'id':_0x10e5ad['remoteId'],'localPath':resolveLocalSqlFilePath(_0x732023,_0x53db5e,_0x10e5ad)},'description':_0x4f09d0(0x86)+_0x53db5e+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20'+_0x732023['trashDir']};},async 'execute'(_0x4eb3df){const _0xe13078=a248_0x3cc8dd,_0x9c9df9=loadSqlProjectConfig(_0x4eb3df[_0xe13078(0x6e)]),_0x3c80c2=await readSqlLockFile(_0x9c9df9[_0xe13078(0x80)]);if(!_0x3c80c2)throw CliErrors['validation']('SQL\x20lock\x20file\x20not\x20found.');const {lockData:_0x3254b3,appLock:_0x1e962d}=ensureSqlLockScope(_0x3c80c2,_0x4eb3df['appCode'],_0x9c9df9[_0xe13078(0x6d)],_0xe13078(0x68)),_0x2d13e0=_0x4eb3df[_0xe13078(0x71)](_0xe13078(0x72)),_0x4d2194=_0x1e962d['sqls'][_0x2d13e0];if(!_0x4d2194)throw CliErrors[_0xe13078(0x6a)]('No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22'+_0x2d13e0+'\x22.');await deleteSqlQuery({'id':_0x4d2194['remoteId'],'sqlCode':_0x2d13e0}),_0x1e962d[_0xe13078(0x73)]=Object[_0xe13078(0x82)](Object['entries'](_0x1e962d[_0xe13078(0x73)])[_0xe13078(0x66)](([_0x54cbf6])=>_0x54cbf6!==_0x2d13e0)),_0x1e962d['lastSync']=new Date()[_0xe13078(0x75)](),await writeSqlLockFile(_0x9c9df9[_0xe13078(0x80)],_0x3254b3);const _0xbaa2f8=resolveLocalSqlFilePath(_0x9c9df9,_0x2d13e0,_0x4d2194);let _0x575b63;await fileExists(_0xbaa2f8)&&(_0x575b63=await moveToTrash(_0x9c9df9[_0xe13078(0x85)],_0x9c9df9[_0xe13078(0x76)],_0xbaa2f8),await cleanupEmptyDirectories(dirname(_0xbaa2f8),_0x9c9df9[_0xe13078(0x8a)]));const _0x5c45fd={'deleted':_0x2d13e0,'remoteId':_0x4d2194['remoteId']};if(_0x575b63)_0x5c45fd[_0xe13078(0x7c)]=_0x575b63;return{'ok':!![],'data':_0x5c45fd,'message':_0xe13078(0x88)+_0x2d13e0+(_0x575b63?_0xe13078(0x6c):'')};}};async function moveToTrash(_0x8f1203,_0x358488,_0x42005f){const _0x1d4255=a248_0x3cc8dd,_0x90f61b=new Date()[_0x1d4255(0x75)]()['replace'](/[:.]/g,'-'),_0x5982e3=relative(_0x8f1203,_0x42005f),_0x3866c4=join(_0x358488,_0x90f61b,_0x5982e3);return await mkdir(dirname(_0x3866c4),{'recursive':!![]}),await rename(_0x42005f,_0x3866c4),_0x3866c4;}async function cleanupEmptyDirectories(_0x45f982,_0x1730c){const _0x568ba7=a248_0x3cc8dd;let _0x6cc443=resolve(_0x45f982);const _0x135b79=resolve(_0x1730c);while(_0x6cc443[_0x568ba7(0x69)](''+_0x135b79+sep)||_0x6cc443===_0x135b79){if(_0x6cc443===_0x135b79)return;try{const _0x113699=await readdir(_0x6cc443);if(_0x113699['length']>0x0)return;await rmdir(_0x6cc443);}catch{return;}_0x6cc443=dirname(_0x6cc443);}}
1
+ const a248_0x4cdb09=a248_0x244b;(function(_0x2e7d66,_0x2055e1){const _0xf8748b=a248_0x244b,_0x5052be=_0x2e7d66();while(!![]){try{const _0x48cd2b=-parseInt(_0xf8748b(0xd2))/0x1*(parseInt(_0xf8748b(0xca))/0x2)+parseInt(_0xf8748b(0xbe))/0x3*(-parseInt(_0xf8748b(0xc3))/0x4)+parseInt(_0xf8748b(0xde))/0x5*(parseInt(_0xf8748b(0xd7))/0x6)+-parseInt(_0xf8748b(0xe5))/0x7*(parseInt(_0xf8748b(0xe3))/0x8)+-parseInt(_0xf8748b(0xd1))/0x9+-parseInt(_0xf8748b(0xe4))/0xa+parseInt(_0xf8748b(0xc8))/0xb;if(_0x48cd2b===_0x2055e1)break;else _0x5052be['push'](_0x5052be['shift']());}catch(_0x1ea723){_0x5052be['push'](_0x5052be['shift']());}}}(a248_0x145f,0x36f56));function a248_0x244b(_0x2fa155,_0xc7e6be){_0x2fa155=_0x2fa155-0xbe;const _0x145ff5=a248_0x145f();let _0x244bb6=_0x145ff5[_0x2fa155];return _0x244bb6;}import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{fileExists}from'../../core/bff/file-system.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a248_0x145f(){const _0x1c3574=['904WWchag','3750490LJweeS','16205RiTdei','5637BuRCMO','high-risk-write','entries','remoteId','lastSync','252HDHvgA','No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22','replace','Delete\x20a\x20SQL\x20query\x20from\x20remote\x20and\x20local','appCode','14228225GjuZiV','SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.','91752NhyXfv','filter','projectRoot','Would\x20delete\x20SQL\x20','trashDir','str','delete','3628701ZglAOK','1AEHTsg','sqls','SQL\x20lock\x20file\x20not\x20found.','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20','startsWith','6DMMAXA','sqlcode','length','validation','sqlRoot','POST','lockFilePath','678605CYNyxF','toISOString','Deleted\x20','fromEntries','/smartapi/custom/deleteUserCustomSql'];a248_0x145f=function(){return _0x1c3574;};return a248_0x145f();}export const sqlDelete={'service':'sql','command':a248_0x4cdb09(0xd0),'description':a248_0x4cdb09(0xc6),'risk':a248_0x4cdb09(0xbf),'flags':[SQLCODE_FLAG],async 'validate'(_0x536aff){const _0x2994c7=a248_0x4cdb09,_0x31ffe2=loadSqlProjectConfig(_0x536aff['appCode']),_0x36804b=await readSqlLockFile(_0x31ffe2[_0x2994c7(0xdd)]);if(!_0x36804b)throw CliErrors['validation'](_0x2994c7(0xc9));},async 'dryRun'(_0x3f8648){const _0x1420e2=a248_0x4cdb09,_0x3e2f81=loadSqlProjectConfig(_0x3f8648['appCode']),_0x5a6d8f=await readSqlLockFile(_0x3e2f81[_0x1420e2(0xdd)]);if(!_0x5a6d8f)throw CliErrors['validation'](_0x1420e2(0xc9));const {appLock:_0x4ae23c}=ensureSqlLockScope(_0x5a6d8f,_0x3f8648[_0x1420e2(0xc7)],_0x3e2f81[_0x1420e2(0xdb)],_0x1420e2(0xd0)),_0xe50acf=_0x3f8648[_0x1420e2(0xcf)](_0x1420e2(0xd8)),_0x309ad6=_0x4ae23c[_0x1420e2(0xd3)][_0xe50acf];if(!_0x309ad6)throw CliErrors[_0x1420e2(0xda)](_0x1420e2(0xc4)+_0xe50acf+'\x22.');return{'method':_0x1420e2(0xdc),'url':_0x1420e2(0xe2),'body':{'sqlCode':_0xe50acf,'id':_0x309ad6[_0x1420e2(0xc1)],'localPath':resolveLocalSqlFilePath(_0x3e2f81,_0xe50acf,_0x309ad6)},'description':_0x1420e2(0xcd)+_0xe50acf+_0x1420e2(0xd5)+_0x3e2f81[_0x1420e2(0xce)]};},async 'execute'(_0x2b5d77){const _0x58bad1=a248_0x4cdb09,_0x2dedee=loadSqlProjectConfig(_0x2b5d77[_0x58bad1(0xc7)]),_0x1103aa=await readSqlLockFile(_0x2dedee[_0x58bad1(0xdd)]);if(!_0x1103aa)throw CliErrors[_0x58bad1(0xda)](_0x58bad1(0xd4));const {lockData:_0x23ea15,appLock:_0x2b2dfe}=ensureSqlLockScope(_0x1103aa,_0x2b5d77[_0x58bad1(0xc7)],_0x2dedee['sqlRoot'],_0x58bad1(0xd0)),_0x19b401=_0x2b5d77['str'](_0x58bad1(0xd8)),_0x2d227e=_0x2b2dfe['sqls'][_0x19b401];if(!_0x2d227e)throw CliErrors['validation'](_0x58bad1(0xc4)+_0x19b401+'\x22.');await deleteSqlQuery({'id':_0x2d227e[_0x58bad1(0xc1)],'sqlCode':_0x19b401}),_0x2b2dfe[_0x58bad1(0xd3)]=Object[_0x58bad1(0xe1)](Object[_0x58bad1(0xc0)](_0x2b2dfe[_0x58bad1(0xd3)])[_0x58bad1(0xcb)](([_0x4c50fe])=>_0x4c50fe!==_0x19b401)),_0x2b2dfe[_0x58bad1(0xc2)]=new Date()[_0x58bad1(0xdf)](),await writeSqlLockFile(_0x2dedee[_0x58bad1(0xdd)],_0x23ea15);const _0x47a827=resolveLocalSqlFilePath(_0x2dedee,_0x19b401,_0x2d227e);let _0x5249ca;await fileExists(_0x47a827)&&(_0x5249ca=await moveToTrash(_0x2dedee[_0x58bad1(0xcc)],_0x2dedee[_0x58bad1(0xce)],_0x47a827),await cleanupEmptyDirectories(dirname(_0x47a827),_0x2dedee['sqlRootDir']));const _0x11754b={'deleted':_0x19b401,'remoteId':_0x2d227e[_0x58bad1(0xc1)]};if(_0x5249ca)_0x11754b['trashedTo']=_0x5249ca;return{'ok':!![],'data':_0x11754b,'message':_0x58bad1(0xe0)+_0x19b401+(_0x5249ca?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};async function moveToTrash(_0x5b844c,_0x4d9ba3,_0x5ea2a6){const _0x50105c=a248_0x4cdb09,_0x3bbad0=new Date()[_0x50105c(0xdf)]()[_0x50105c(0xc5)](/[:.]/g,'-'),_0x17e269=relative(_0x5b844c,_0x5ea2a6),_0x51e2ba=join(_0x4d9ba3,_0x3bbad0,_0x17e269);return await mkdir(dirname(_0x51e2ba),{'recursive':!![]}),await rename(_0x5ea2a6,_0x51e2ba),_0x51e2ba;}async function cleanupEmptyDirectories(_0x536a42,_0x17be2e){const _0x2c71cf=a248_0x4cdb09;let _0x2144c7=resolve(_0x536a42);const _0x373407=resolve(_0x17be2e);while(_0x2144c7[_0x2c71cf(0xd6)](''+_0x373407+sep)||_0x2144c7===_0x373407){if(_0x2144c7===_0x373407)return;try{const _0x1e5421=await readdir(_0x2144c7);if(_0x1e5421[_0x2c71cf(0xd9)]>0x0)return;await rmdir(_0x2144c7);}catch{return;}_0x2144c7=dirname(_0x2144c7);}}
@@ -1 +1 @@
1
- function a249_0x5889(){const _0x4d6466=['361867HnbKYc','verbose','Return\x20full\x20raw\x20SQL\x20query\x20object','detail','1453368OrVkbc','22075LAKalz','sqlName','read','36PINjXb','sqlCode','2156355lXkPjT','54668SlRMHi','319325zzLewj','appCode','152TcWUoC','sqlcode','1592521cMKrhN','10fKcfQJ','str','dbId','boolean','9kYQleL','sqlContent','6MyFUxh'];a249_0x5889=function(){return _0x4d6466;};return a249_0x5889();}const a249_0x4002e8=a249_0x21d5;function a249_0x21d5(_0x2cd7b1,_0x84346b){_0x2cd7b1=_0x2cd7b1-0x129;const _0x5889cb=a249_0x5889();let _0x21d58b=_0x5889cb[_0x2cd7b1];return _0x21d58b;}(function(_0x34496c,_0x48db78){const _0x525551=a249_0x21d5,_0x115ecd=_0x34496c();while(!![]){try{const _0xf2670=-parseInt(_0x525551(0x137))/0x1+-parseInt(_0x525551(0x136))/0x2*(-parseInt(_0x525551(0x140))/0x3)+parseInt(_0x525551(0x139))/0x4*(parseInt(_0x525551(0x130))/0x5)+parseInt(_0x525551(0x12a))/0x6*(-parseInt(_0x525551(0x13b))/0x7)+parseInt(_0x525551(0x12f))/0x8+-parseInt(_0x525551(0x135))/0x9*(-parseInt(_0x525551(0x13c))/0xa)+-parseInt(_0x525551(0x12b))/0xb*(-parseInt(_0x525551(0x133))/0xc);if(_0xf2670===_0x48db78)break;else _0x115ecd['push'](_0x115ecd['shift']());}catch(_0x4a9bd4){_0x115ecd['push'](_0x115ecd['shift']());}}}(a249_0x5889,0x366b5));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':'sql','command':a249_0x4002e8(0x12e),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a249_0x4002e8(0x132),'flags':[SQLCODE_FLAG,{'name':a249_0x4002e8(0x12c),'type':a249_0x4002e8(0x13f),'description':a249_0x4002e8(0x12d)}],async 'execute'(_0x22e8c2){const _0x2b492c=a249_0x4002e8,_0x4f722a=await getSqlQueryInfo(_0x22e8c2[_0x2b492c(0x138)],_0x22e8c2[_0x2b492c(0x13d)](_0x2b492c(0x13a))),_0x4d7a91=_0x22e8c2['bool'](_0x2b492c(0x12c));if(_0x4d7a91)return{'ok':!![],'data':_0x4f722a};const _0xcac02=_0x4f722a[_0x2b492c(0x13e)]?await getDbName(_0x22e8c2['appCode'],_0x4f722a[_0x2b492c(0x13e)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x4f722a[_0x2b492c(0x134)],'sqlName':_0x4f722a[_0x2b492c(0x131)],'db':_0xcac02?_0xcac02+'\x20('+_0x4f722a['dbId']+')':_0x4f722a[_0x2b492c(0x13e)]??'','description':_0x4f722a['description']??'','sqlContent':_0x4f722a[_0x2b492c(0x129)]??''}};}};
1
+ const a249_0xf39ec7=a249_0x297c;(function(_0x39f3ad,_0x335ecf){const _0x405c8=a249_0x297c,_0x187099=_0x39f3ad();while(!![]){try{const _0x2e262f=parseInt(_0x405c8(0x1a6))/0x1*(parseInt(_0x405c8(0x1b9))/0x2)+parseInt(_0x405c8(0x1b5))/0x3*(parseInt(_0x405c8(0x1a5))/0x4)+-parseInt(_0x405c8(0x1b3))/0x5+parseInt(_0x405c8(0x1a2))/0x6*(parseInt(_0x405c8(0x1b8))/0x7)+-parseInt(_0x405c8(0x1ac))/0x8*(parseInt(_0x405c8(0x1a4))/0x9)+parseInt(_0x405c8(0x1b1))/0xa*(parseInt(_0x405c8(0x1ad))/0xb)+parseInt(_0x405c8(0x1ae))/0xc*(-parseInt(_0x405c8(0x1a8))/0xd);if(_0x2e262f===_0x335ecf)break;else _0x187099['push'](_0x187099['shift']());}catch(_0x1cf79a){_0x187099['push'](_0x187099['shift']());}}}(a249_0x3107,0xe8daa));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a249_0x297c(_0x53afe6,_0x309aee){_0x53afe6=_0x53afe6-0x1a1;const _0x31073a=a249_0x3107();let _0x297c69=_0x31073a[_0x53afe6];return _0x297c69;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a249_0xf39ec7(0x1b4),'command':a249_0xf39ec7(0x1b2),'description':a249_0xf39ec7(0x1b6),'risk':a249_0xf39ec7(0x1b7),'flags':[SQLCODE_FLAG,{'name':a249_0xf39ec7(0x1a9),'type':a249_0xf39ec7(0x1ba),'description':a249_0xf39ec7(0x1a3)}],async 'execute'(_0x4ebf8f){const _0x553d53=a249_0xf39ec7,_0x5bea84=await getSqlQueryInfo(_0x4ebf8f['appCode'],_0x4ebf8f['str'](_0x553d53(0x1b0))),_0x14b151=_0x4ebf8f['bool'](_0x553d53(0x1a9));if(_0x14b151)return{'ok':!![],'data':_0x5bea84};const _0x5bd6db=_0x5bea84[_0x553d53(0x1aa)]?await getDbName(_0x4ebf8f['appCode'],_0x5bea84[_0x553d53(0x1aa)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x5bea84[_0x553d53(0x1ab)],'sqlName':_0x5bea84[_0x553d53(0x1af)],'db':_0x5bd6db?_0x5bd6db+'\x20('+_0x5bea84['dbId']+')':_0x5bea84[_0x553d53(0x1aa)]??'','description':_0x5bea84[_0x553d53(0x1a7)]??'','sqlContent':_0x5bea84[_0x553d53(0x1a1)]??''}};}};function a249_0x3107(){const _0x590d76=['detail','6817960IdmALo','sql','1402890TcaZQS','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','read','1831683MsMxGU','2hvwaGi','boolean','sqlContent','42zHEeiF','Return\x20full\x20raw\x20SQL\x20query\x20object','954xNoLFt','8bBeLdt','309503iQAlvL','description','26zwFgLp','verbose','dbId','sqlCode','54968XnFdCZ','3241634EkerRl','1952712xLIZnF','sqlName','sqlcode','10YEdwTf'];a249_0x3107=function(){return _0x590d76;};return a249_0x3107();}