@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.1

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 (348) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.d.ts +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +2 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  26. package/lib/commands/app/shared.js +1 -1
  27. package/lib/commands/app-config/delete.js +1 -1
  28. package/lib/commands/app-config/get.js +1 -1
  29. package/lib/commands/app-config/index.js +1 -1
  30. package/lib/commands/app-config/list.js +1 -1
  31. package/lib/commands/app-config/set.js +1 -1
  32. package/lib/commands/app-config/shared.js +1 -1
  33. package/lib/commands/auth/index.js +1 -1
  34. package/lib/commands/bff/create.js +1 -1
  35. package/lib/commands/bff/delete.js +1 -1
  36. package/lib/commands/bff/detail.js +1 -1
  37. package/lib/commands/bff/index.js +1 -1
  38. package/lib/commands/bff/list.js +1 -1
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.js +1 -1
  52. package/lib/commands/common/local-file.js +1 -1
  53. package/lib/commands/common/validate.js +1 -1
  54. package/lib/commands/config/delete.js +1 -1
  55. package/lib/commands/config/get.js +1 -1
  56. package/lib/commands/config/index.js +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/business-groups.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-restore.js +1 -1
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  82. package/lib/commands/db/analysis-batching.js +1 -1
  83. package/lib/commands/db/analyze-batch-plan.js +1 -1
  84. package/lib/commands/db/analyze-cancel.js +1 -1
  85. package/lib/commands/db/analyze-start.js +1 -1
  86. package/lib/commands/db/analyze-status.js +1 -1
  87. package/lib/commands/db/create.js +1 -1
  88. package/lib/commands/db/delete.js +1 -1
  89. package/lib/commands/db/detail.js +1 -1
  90. package/lib/commands/db/diff-refresh-start.js +1 -1
  91. package/lib/commands/db/diff-refresh-status.js +1 -1
  92. package/lib/commands/db/diff.js +1 -1
  93. package/lib/commands/db/index.js +1 -1
  94. package/lib/commands/db/list.js +1 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/table-diff-shared.js +1 -1
  97. package/lib/commands/db/tables.js +1 -1
  98. package/lib/commands/db/test.js +1 -1
  99. package/lib/commands/db/update.js +1 -1
  100. package/lib/commands/deployment/index.js +1 -1
  101. package/lib/commands/deployment/sync-all.js +1 -1
  102. package/lib/commands/deployment/sync-jobs.js +1 -1
  103. package/lib/commands/deployment/sync-status.js +1 -1
  104. package/lib/commands/doctor.js +1 -1
  105. package/lib/commands/file/index.js +1 -1
  106. package/lib/commands/instant-api-policy/current.js +1 -1
  107. package/lib/commands/instant-api-policy/index.js +1 -1
  108. package/lib/commands/instant-api-policy/init.js +1 -1
  109. package/lib/commands/instant-api-policy/publish.js +1 -1
  110. package/lib/commands/instant-api-policy/pull.js +1 -1
  111. package/lib/commands/instant-api-policy/revision.js +1 -1
  112. package/lib/commands/instant-api-policy/revisions.js +1 -1
  113. package/lib/commands/instant-api-policy/rollback.js +1 -1
  114. package/lib/commands/instant-api-policy/shared.js +1 -1
  115. package/lib/commands/instant-api-policy/validate.js +1 -1
  116. package/lib/commands/issue/index.js +1 -1
  117. package/lib/commands/issue/nudge.js +1 -1
  118. package/lib/commands/issue/report.js +1 -1
  119. package/lib/commands/issue/shared.js +1 -1
  120. package/lib/commands/kb/create.js +1 -1
  121. package/lib/commands/kb/delete.js +1 -1
  122. package/lib/commands/kb/detail.js +1 -1
  123. package/lib/commands/kb/index.js +1 -1
  124. package/lib/commands/kb/list.js +1 -1
  125. package/lib/commands/kb/search.js +1 -1
  126. package/lib/commands/kb/shared.js +1 -1
  127. package/lib/commands/kb/update.js +1 -1
  128. package/lib/commands/logs/index.js +1 -1
  129. package/lib/commands/menu/asset-update.js +1 -1
  130. package/lib/commands/menu/delete.js +1 -1
  131. package/lib/commands/menu/external-link-create.js +1 -1
  132. package/lib/commands/menu/external-link-update.js +1 -1
  133. package/lib/commands/menu/group-create.js +1 -1
  134. package/lib/commands/menu/group-update.js +1 -1
  135. package/lib/commands/menu/index.js +1 -1
  136. package/lib/commands/menu/list.js +1 -1
  137. package/lib/commands/menu/move.js +1 -1
  138. package/lib/commands/menu/regroup-start.js +1 -1
  139. package/lib/commands/menu/rename.js +1 -1
  140. package/lib/commands/menu/shared/compare-table.js +1 -1
  141. package/lib/commands/menu/shared/delete-plan.js +1 -1
  142. package/lib/commands/menu/shared/facts.js +1 -1
  143. package/lib/commands/menu/shared/index.js +1 -1
  144. package/lib/commands/menu/shared/inquirer.js +1 -1
  145. package/lib/commands/menu/shared/local-pages.js +1 -1
  146. package/lib/commands/menu/shared/logic.js +1 -1
  147. package/lib/commands/menu/shared/mutations.js +1 -1
  148. package/lib/commands/menu/shared/service.js +1 -1
  149. package/lib/commands/menu/shared/sync-core.js +1 -1
  150. package/lib/commands/menu/shared/update-core.js +1 -1
  151. package/lib/commands/menu/shared/valid-url.js +1 -1
  152. package/lib/commands/menu/sync.js +1 -1
  153. package/lib/commands/menu/visibility-update.js +1 -1
  154. package/lib/commands/notification/config-create.js +1 -1
  155. package/lib/commands/notification/config-delete.js +1 -1
  156. package/lib/commands/notification/config-list.js +1 -1
  157. package/lib/commands/notification/config-update.js +1 -1
  158. package/lib/commands/notification/index.js +1 -1
  159. package/lib/commands/notification/shared.js +1 -1
  160. package/lib/commands/ocr/index.js +1 -1
  161. package/lib/commands/page/create.js +1 -1
  162. package/lib/commands/page/custom/detail.js +1 -1
  163. package/lib/commands/page/custom/list.js +1 -1
  164. package/lib/commands/page/custom/publish.js +1 -1
  165. package/lib/commands/page/custom/shared.js +1 -1
  166. package/lib/commands/page/custom/syntax.js +1 -1
  167. package/lib/commands/page/custom/update.js +1 -1
  168. package/lib/commands/page/data-list-status.js +1 -1
  169. package/lib/commands/page/generate-start.js +1 -1
  170. package/lib/commands/page/generate-status.js +1 -1
  171. package/lib/commands/page/index.js +1 -1
  172. package/lib/commands/page/pull.js +1 -1
  173. package/lib/commands/page/push.js +1 -1
  174. package/lib/commands/page/relation-audit.js +1 -1
  175. package/lib/commands/page/restore.js +1 -1
  176. package/lib/commands/page/shared.js +1 -1
  177. package/lib/commands/page/sync.js +1 -1
  178. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  179. package/lib/commands/project/create/format-elapsed.js +1 -1
  180. package/lib/commands/project/create/main.js +1 -1
  181. package/lib/commands/project/create/materialize-project-template.js +1 -1
  182. package/lib/commands/project/create/project-name.js +1 -1
  183. package/lib/commands/project/create/project-template-archive.js +1 -1
  184. package/lib/commands/project/create/project-template-path.js +1 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/domain-routing-sync.js +1 -1
  189. package/lib/commands/project/index.js +1 -1
  190. package/lib/commands/project/upgrade.js +1 -1
  191. package/lib/commands/registry.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/rule/get.js +1 -1
  202. package/lib/commands/rule/index.js +1 -1
  203. package/lib/commands/rule/list.js +1 -1
  204. package/lib/commands/rule/set.js +1 -1
  205. package/lib/commands/rule/shared.js +1 -1
  206. package/lib/commands/run/index.js +1 -1
  207. package/lib/commands/schema.js +1 -1
  208. package/lib/commands/sql/create.js +1 -1
  209. package/lib/commands/sql/delete.js +1 -1
  210. package/lib/commands/sql/detail.js +1 -1
  211. package/lib/commands/sql/exec.js +1 -1
  212. package/lib/commands/sql/index.js +1 -1
  213. package/lib/commands/sql/list.js +1 -1
  214. package/lib/commands/sql/pull.js +1 -1
  215. package/lib/commands/sql/push.js +1 -1
  216. package/lib/commands/sql/shared.js +1 -1
  217. package/lib/commands/sql/status.js +1 -1
  218. package/lib/commands/sql/validate.js +1 -1
  219. package/lib/commands/task/index.js +1 -1
  220. package/lib/commands/task/status.js +1 -1
  221. package/lib/commands/tenant/index.js +1 -1
  222. package/lib/commands/tenant/members-list.js +1 -1
  223. package/lib/commands/tenant/shared.js +1 -1
  224. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  225. package/lib/commands/user-account/index.js +1 -1
  226. package/lib/commands/workspace/add.js +1 -1
  227. package/lib/commands/workspace/index.js +1 -1
  228. package/lib/commands/workspace/remove.js +1 -1
  229. package/lib/config/domain-config.js +1 -1
  230. package/lib/config/project-domain-routing.js +1 -1
  231. package/lib/config/region-config.d.ts +23 -0
  232. package/lib/config/region-config.js +1 -0
  233. package/lib/config/schema.d.ts +15 -0
  234. package/lib/config/schema.js +1 -1
  235. package/lib/constant/cdn.js +1 -1
  236. package/lib/constant/cli.js +1 -1
  237. package/lib/constant/defaults.js +1 -1
  238. package/lib/constant/domain.js +1 -1
  239. package/lib/constant/env.js +1 -1
  240. package/lib/constant/output.js +1 -1
  241. package/lib/constant/paths.js +1 -1
  242. package/lib/constant/region.js +1 -1
  243. package/lib/constant/risk.js +1 -1
  244. package/lib/constant/routing-profile.js +1 -1
  245. package/lib/context/app-resolver.d.ts +6 -0
  246. package/lib/context/app-resolver.js +1 -1
  247. package/lib/context/auth-resolver.js +1 -1
  248. package/lib/context/config-loader.js +1 -1
  249. package/lib/context.d.ts +13 -0
  250. package/lib/context.js +1 -1
  251. package/lib/core/alias-resolver.js +1 -1
  252. package/lib/core/api-client.d.ts +2 -0
  253. package/lib/core/api-client.js +1 -1
  254. package/lib/core/bff/config.js +1 -1
  255. package/lib/core/bff/file-system.js +1 -1
  256. package/lib/core/bff/hash.js +1 -1
  257. package/lib/core/bff/lock.js +1 -1
  258. package/lib/core/bff/utils.js +1 -1
  259. package/lib/core/db-resolver.js +1 -1
  260. package/lib/core/instant-api-policy/config.js +1 -1
  261. package/lib/core/kb-search-client.js +1 -1
  262. package/lib/core/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/page/lr-smart-jsx.d.ts +6 -0
  266. package/lib/core/page/lr-smart-jsx.js +1 -0
  267. package/lib/core/sql-index-auditor.js +1 -1
  268. package/lib/core/sql-sync/config.js +1 -1
  269. package/lib/core/sql-sync/file-system.js +1 -1
  270. package/lib/core/sql-sync/hash.js +1 -1
  271. package/lib/core/sql-sync/lock.js +1 -1
  272. package/lib/core/sql-sync/utils.js +1 -1
  273. package/lib/core/sql-validator.js +1 -1
  274. package/lib/errors.js +1 -1
  275. package/lib/framework/build-all-flags.js +1 -1
  276. package/lib/framework/error-output.js +1 -1
  277. package/lib/framework/explicit-yes.js +1 -1
  278. package/lib/framework/flags.js +1 -1
  279. package/lib/framework/help.js +1 -1
  280. package/lib/framework/index.js +1 -1
  281. package/lib/framework/output.js +1 -1
  282. package/lib/framework/response.js +1 -1
  283. package/lib/framework/runner-alias.js +1 -1
  284. package/lib/framework/runner.js +1 -1
  285. package/lib/framework/schema-export.js +1 -1
  286. package/lib/framework/supported-flags.js +1 -1
  287. package/lib/framework/types.js +1 -1
  288. package/lib/generated/build-info.d.ts +4 -4
  289. package/lib/generated/build-info.js +1 -1
  290. package/lib/generated/official-routing.js +1 -1
  291. package/lib/generated/routing-contract.js +1 -1
  292. package/lib/help.js +1 -1
  293. package/lib/postinstall.js +1 -1
  294. package/lib/runtime/confirmation.js +1 -1
  295. package/lib/runtime/event.js +1 -1
  296. package/lib/runtime/index.js +1 -1
  297. package/lib/runtime/queue.js +1 -1
  298. package/lib/runtime/resolve.js +1 -1
  299. package/lib/skills/builtin-skill.js +1 -1
  300. package/lib/skills/main.js +1 -1
  301. package/lib/skills/npx-skills-add.js +1 -1
  302. package/lib/skills/skill-presence.js +1 -1
  303. package/lib/telemetry/cli-command-trace.js +1 -1
  304. package/lib/telemetry/cli-help-trace.js +1 -1
  305. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  306. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  307. package/lib/telemetry/send-cli-trace-log.js +1 -1
  308. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  309. package/lib/types/index.d.ts +1 -1
  310. package/lib/utils/ai_config.js +1 -1
  311. package/lib/utils/apply-jq-filter.js +1 -1
  312. package/lib/utils/cdn-config.js +1 -1
  313. package/lib/utils/check-sdk-version.js +1 -1
  314. package/lib/utils/cli-version-check.js +1 -1
  315. package/lib/utils/cli-version-policy.js +1 -1
  316. package/lib/utils/config.d.ts +2 -8
  317. package/lib/utils/config.js +1 -1
  318. package/lib/utils/entity-with-id.js +1 -1
  319. package/lib/utils/file-utils.js +1 -1
  320. package/lib/utils/guides-cdn.js +1 -1
  321. package/lib/utils/http-client.js +1 -1
  322. package/lib/utils/is-non-interactive.js +1 -1
  323. package/lib/utils/logger.js +1 -1
  324. package/lib/utils/params.js +1 -1
  325. package/lib/utils/platform.js +1 -1
  326. package/lib/utils/sleep.js +1 -1
  327. package/lib/utils/template-replacer.d.ts +2 -1
  328. package/lib/utils/template-replacer.js +1 -1
  329. package/lib/utils/update-notice.js +1 -1
  330. package/lib/utils/version.js +1 -1
  331. package/lib/utils/with-active-cookie.js +1 -1
  332. package/lib/utils/write-cli-side-channel.js +1 -1
  333. package/package.json +1 -1
  334. package/skills/rabetbase/SKILL.md +6 -5
  335. package/skills/rabetbase/guides/page-development-workflow.md +3 -0
  336. package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
  337. package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
  338. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
  339. package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
  340. package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
  342. package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
  343. package/skills/rabetbase/references/rabetbase-config.md +10 -9
  344. package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
  345. package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
  346. package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
  347. package/skills/rabetbase.manifest.json +3 -3
  348. package/templates/generate-api/client.ts.tpl +1 -1
@@ -1 +1 @@
1
- const a189_0x5d4446=a189_0x39ed;(function(_0x7a9485,_0x5942fe){const _0x17d3de=a189_0x39ed,_0x3a0e89=_0x7a9485();while(!![]){try{const _0x544a6a=parseInt(_0x17d3de(0xf6))/0x1+parseInt(_0x17d3de(0xbf))/0x2*(parseInt(_0x17d3de(0x100))/0x3)+-parseInt(_0x17d3de(0x112))/0x4*(-parseInt(_0x17d3de(0x10d))/0x5)+-parseInt(_0x17d3de(0xca))/0x6+-parseInt(_0x17d3de(0x131))/0x7*(parseInt(_0x17d3de(0xc6))/0x8)+parseInt(_0x17d3de(0x12f))/0x9+parseInt(_0x17d3de(0xc4))/0xa*(parseInt(_0x17d3de(0x120))/0xb);if(_0x544a6a===_0x5942fe)break;else _0x3a0e89['push'](_0x3a0e89['shift']());}catch(_0x4fe872){_0x3a0e89['push'](_0x3a0e89['shift']());}}}(a189_0x5403,0xa294c));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function a189_0x39ed(_0x1d65a7,_0x435f97){_0x1d65a7=_0x1d65a7-0xbc;const _0x540320=a189_0x5403();let _0x39ed48=_0x540320[_0x1d65a7];return _0x39ed48;}function registerDefinitions(_0x4a4077){const _0x24793d=a189_0x39ed;for(const _0x48b1bc of _0x4a4077){definitions[_0x24793d(0x132)](_0x48b1bc[_0x24793d(0x127)]+':'+_0x48b1bc[_0x24793d(0xd3)],_0x48b1bc);let _0x2484ce=serviceGroups[_0x24793d(0x121)](_0x48b1bc[_0x24793d(0x127)]);!_0x2484ce&&(_0x2484ce=[],serviceGroups[_0x24793d(0x132)](_0x48b1bc[_0x24793d(0x127)],_0x2484ce)),_0x2484ce['push'](_0x48b1bc);}}function registerDeclarativeService(_0x538da5,_0x6f2f62,_0x266130){const _0x171d7c=a189_0x39ed;registerDefinitions(_0x6f2f62);_0x266130?.[_0x171d7c(0xc0)]&&registerDefinitions([_0x266130[_0x171d7c(0xc0)]]);const _0x41742a=_0x4af03e=>_0x4af03e===_0x171d7c(0x11d)?'':_0x4af03e===_0x171d7c(0x133)?'\x20\x20[write]':_0x171d7c(0x130),_0x5b2115={'service':_0x6f2f62[0x0][_0x171d7c(0x127)],'label':_0x538da5,'commands':_0x6f2f62[_0x171d7c(0xdb)](_0x30b310=>!_0x30b310[_0x171d7c(0xc2)])[_0x171d7c(0x11b)](_0x3850af=>({'command':_0x3850af[_0x171d7c(0xd3)],'description':_0x3850af[_0x171d7c(0xf4)],'tag':_0x41742a(_0x3850af[_0x171d7c(0xff)])})),'declarative':!![],'defaultCommand':_0x266130?.[_0x171d7c(0x111)]??(_0x266130?.[_0x171d7c(0xbe)]?_0x6f2f62[0x0][_0x171d7c(0xd3)]:undefined),'wildcardDef':_0x266130?.[_0x171d7c(0xc0)],'isSingleCommand':_0x266130?.['isSingleCommand']};serviceRegistry[_0x171d7c(0xce)](_0x5b2115),serviceByName[_0x171d7c(0x132)](_0x5b2115[_0x171d7c(0x127)],_0x5b2115);}registerDeclarativeService(a189_0x5d4446(0xf8),projectDefinitions),registerDeclarativeService(a189_0x5d4446(0x116),workspaceDefinitions),registerDeclarativeService(a189_0x5d4446(0xe4),appDefinitions),registerDeclarativeService(a189_0x5d4446(0xfd),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a189_0x5d4446(0xcc),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a189_0x5d4446(0xeb),bffDefinitions),registerDeclarativeService(a189_0x5d4446(0xcf),instantApiPolicyDefinitions),registerDeclarativeService(a189_0x5d4446(0x12b),notificationDefinitions),registerDeclarativeService(a189_0x5d4446(0x125),sqlDefinitions),registerDeclarativeService(a189_0x5d4446(0x10b),dbDefinitions),registerDeclarativeService(a189_0x5d4446(0x12d),deploymentDefinitions),registerDeclarativeService(a189_0x5d4446(0xd6),menuDefinitions),registerDeclarativeService(a189_0x5d4446(0x123),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a189_0x5d4446(0xfb),appConfigDefinitions),registerDeclarativeService(a189_0x5d4446(0xfa),kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a189_0x5d4446(0xcb),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a189_0x5d4446(0xda),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0xf9),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0x105),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0xe3),cliSkillDefinitions,{'defaultCommand':a189_0x5d4446(0xdc)}),registerDeclarativeService(a189_0x5d4446(0x108),logsDefinitions,{'defaultCommand':a189_0x5d4446(0xe7)}),registerDeclarativeService(a189_0x5d4446(0x126),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a189_0x5d4446(0x12e)]=[{'command':a189_0x5d4446(0xe2),'description':'Run\x20any\x20package.json\x20script','tag':'\x20\x20['+runDefinition[a189_0x5d4446(0xff)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a189_0x5d4446(0xf5),a189_0x5d4446(0x10a)],['bff:new',a189_0x5d4446(0xe9)],[a189_0x5d4446(0xf2),a189_0x5d4446(0xc3)],[a189_0x5d4446(0xe0),a189_0x5d4446(0x119)],[a189_0x5d4446(0xd4),a189_0x5d4446(0x102)],['skill:','rabetbase\x20cli-skill\x20install'],[a189_0x5d4446(0xe1),a189_0x5d4446(0xd8)],[a189_0x5d4446(0x11f),'rabetbase\x20cli-skill\x20install'],['skills:install',a189_0x5d4446(0xd8)],[a189_0x5d4446(0xc7),a189_0x5d4446(0xd2)],[a189_0x5d4446(0x11a),a189_0x5d4446(0x12a)],[a189_0x5d4446(0xf7),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a189_0x5d4446(0x11e),a189_0x5d4446(0x10e)],[a189_0x5d4446(0xf3),a189_0x5d4446(0x109)],[a189_0x5d4446(0x103),a189_0x5d4446(0xc8)],[a189_0x5d4446(0x10f),a189_0x5d4446(0x124)],[a189_0x5d4446(0xc5),a189_0x5d4446(0xe8)],[a189_0x5d4446(0x129),a189_0x5d4446(0xd7)],[a189_0x5d4446(0x118),a189_0x5d4446(0xdd)],[a189_0x5d4446(0xed),a189_0x5d4446(0xd1)],[a189_0x5d4446(0x113),a189_0x5d4446(0xe6)],[a189_0x5d4446(0xbc),a189_0x5d4446(0xef)],[a189_0x5d4446(0xd5),a189_0x5d4446(0xf0)],[a189_0x5d4446(0xd0),a189_0x5d4446(0xf0)],['page:react-list',a189_0x5d4446(0xfc)],[a189_0x5d4446(0x128),a189_0x5d4446(0xbd)],[a189_0x5d4446(0x107),a189_0x5d4446(0x117)],[a189_0x5d4446(0xc1),a189_0x5d4446(0x101)]]),REMOVED_COMMAND_HINTS=new Map([[a189_0x5d4446(0xcd),a189_0x5d4446(0xd9)],['permit:page-get','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a189_0x5d4446(0x114),a189_0x5d4446(0xde)],[a189_0x5d4446(0x104),a189_0x5d4446(0xde)],[a189_0x5d4446(0xea),a189_0x5d4446(0xde)],[a189_0x5d4446(0xe5),a189_0x5d4446(0xde)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a189_0x5d4446(0xec)],['start',a189_0x5d4446(0x10c)],[a189_0x5d4446(0x122),a189_0x5d4446(0x110)],[a189_0x5d4446(0xee),'rabetbase\x20run\x20preview'],[a189_0x5d4446(0x12c),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x13a40f,_0x1f980d){const _0x53d69e=a189_0x5d4446;if(!_0x13a40f)return undefined;const _0x3070d8=REMOVED_COMMAND_REPLACEMENTS[_0x53d69e(0x121)](_0x13a40f+':'+(_0x1f980d??'')),_0x1d1a29=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x53d69e(0x121)](_0x13a40f),_0xb028d7=_0x3070d8??_0x1d1a29,_0x22f20c=REMOVED_COMMAND_HINTS[_0x53d69e(0x121)](_0x13a40f+':'+(_0x1f980d??''));if(!_0xb028d7&&!_0x22f20c)return undefined;const _0x1649f7=_0x1d1a29?_0x13a40f:_0x1f980d?_0x13a40f+'\x20'+_0x1f980d:_0x13a40f;return{'command':_0x1649f7,'message':_0x53d69e(0xfe)+_0x1649f7+_0x53d69e(0xc9),'hint':_0x22f20c??_0x53d69e(0xf1)+_0xb028d7+_0x53d69e(0xdf)};}export function findDefinition(_0x112d32,_0x2e9bcf){const _0x131d6d=a189_0x5d4446;return definitions[_0x131d6d(0x121)](_0x112d32+':'+_0x2e9bcf);}export function isKnownService(_0x4e60bf){return serviceByName['has'](_0x4e60bf);}function a189_0x5403(){const _0x1cea0d=['rabetbase\x20workspace\x20use\x20--app\x20<name>','Notification\x20Configuration','logout','Deployment','commands','10084023JDnLGp','\x20\x20[high-risk-write]','7mknXOh','set','write','page:standard-page-status','rabetbase\x20page\x20custom-detail','isSingleCommand','156ehtNXo','wildcardDef','page:react-publish','hidden','rabetbase\x20sql\x20create','250QAyrnZ','knowledge-base:update','8798776BAmugC','app:remote','rabetbase\x20kb\x20detail','`\x20has\x20been\x20removed.','5491698KWoCBj','Platform\x20Issue','Dataset\x20&\x20Operations','deployment:sync','push','Instant\x20API\x20Policy','page:custom-create','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20app\x20list\x20--remote','command','project:init','page:react-create','Menu','rabetbase\x20kb\x20delete','rabetbase\x20cli-skill\x20install','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','Code\x20Generation','filter','install','rabetbase\x20role\x20list','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','`\x20instead.','menu:update','skill:install','<script>','CLI\x20Built-in\x20Skill','App\x20Management','permit:role-apis-set','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','show','rabetbase\x20kb\x20update','rabetbase\x20bff\x20create','permit:role-menus-set','Backend\x20Function\x20Scripts','rabetbase\x20project\x20create\x20<project-name>','data:filter','preview','rabetbase\x20page\x20data-list-status','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Use\x20`','sql:new','knowledge-base:list','description','sql:save','54047cZFneJ','app:add','Project','Schema','Company\x20Knowledge\x20Base','Runtime\x20App\x20Config\x20Management','rabetbase\x20page\x20custom-list','Authentication','`rabetbase\x20','risk','3099TQEqpP','rabetbase\x20page\x20custom-publish','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','knowledge-base:detail','permit:role-menus','Self\x20Update','from','page:react-update','Logs','rabetbase\x20kb\x20list','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Database\x20Connections','rabetbase\x20run\x20start','15OANCZj','rabetbase\x20workspace\x20remove\x20<name>','knowledge-base:create','rabetbase\x20run\x20build','defaultCommand','1491292zVhYNI','data:getOne','permit:page-set','has','Workspace','rabetbase\x20page\x20custom-update','role:create','rabetbase\x20menu\x20asset-update','app:use','map','values','read','app:remove','skills:','135311hHPjON','get','build','Async\x20Tasks','rabetbase\x20kb\x20create','SQL\x20Queries','Run\x20Scripts','service','page:react-detail','knowledge-base:delete'];a189_0x5403=function(){return _0x1cea0d;};return a189_0x5403();}export function isDeclarativeService(_0x448c92){const _0x474b2b=a189_0x5d4446;return serviceGroups[_0x474b2b(0x115)](_0x448c92)||serviceByName[_0x474b2b(0x121)](_0x448c92)?.[_0x474b2b(0xc0)]!==undefined;}export function getServiceEntry(_0xb29119){const _0x3ac06c=a189_0x5d4446;return serviceByName[_0x3ac06c(0x121)](_0xb29119);}export function getLegacyHandler(_0x24e3f2,_0x4b690c){return undefined;}export function getAllDefinitions(){const _0x4efb87=a189_0x5d4446;return Array[_0x4efb87(0x106)](definitions[_0x4efb87(0x11c)]());}
1
+ const a189_0x5e9d80=a189_0x3f33;(function(_0x35dcc8,_0x292ee6){const _0x2cf8e7=a189_0x3f33,_0x3a3b01=_0x35dcc8();while(!![]){try{const _0x4fd873=parseInt(_0x2cf8e7(0x1e7))/0x1+-parseInt(_0x2cf8e7(0x1df))/0x2+parseInt(_0x2cf8e7(0x1f7))/0x3+-parseInt(_0x2cf8e7(0x1f0))/0x4+parseInt(_0x2cf8e7(0x205))/0x5+-parseInt(_0x2cf8e7(0x1be))/0x6*(-parseInt(_0x2cf8e7(0x1e8))/0x7)+parseInt(_0x2cf8e7(0x1d3))/0x8;if(_0x4fd873===_0x292ee6)break;else _0x3a3b01['push'](_0x3a3b01['shift']());}catch(_0x1ec64f){_0x3a3b01['push'](_0x3a3b01['shift']());}}}(a189_0x2fad,0xcfa4e));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';function a189_0x3f33(_0x42b586,_0x26d438){_0x42b586=_0x42b586-0x1b8;const _0x2fad55=a189_0x2fad();let _0x3f33de=_0x2fad55[_0x42b586];return _0x3f33de;}import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';function a189_0x2fad(){const _0x2f6b4a=['rabetbase\x20page\x20custom-list','Agent\x20Context\x20Rules','User\x20Accounts','risk','skills:','permit:role-apis-set','Company\x20Knowledge\x20Base','Database\x20Connections','Workspace','Backend\x20Function\x20Scripts','Project','rabetbase\x20kb\x20detail','rabetbase\x20kb\x20delete','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','has','rabetbase\x20role\x20list','Roles','Run\x20Scripts','menu:update','File','4184776gugVRV','data:filter','login','wildcardDef','Use\x20`','build','permit:role-menus-set','Notification\x20Configuration','page:react-publish','role:create','rabetbase\x20run\x20build','rabetbase\x20cli-skill\x20install','3159344GOUNOz','filter','rabetbase\x20app\x20list\x20--remote','rabetbase\x20page\x20data-list-status','app:remove','length','Tenant\x20Members','knowledge-base:update','1433661XVloFN','766738RxyFme','read','rabetbase\x20project\x20create\x20<project-name>','page:react-detail','\x20\x20[high-risk-write]','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','API\x20Development','bff:new','6629704BsubmP','`rabetbase\x20','rabetbase\x20kb\x20create','sql:new','knowledge-base:delete','Authentication','SQL\x20Queries','1055451jqhAEH','page:custom-create','rabetbase\x20auth\x20logout','command','get','\x20\x20[','<script>','knowledge-base:list','Runtime\x20App\x20Config\x20Management','App\x20Management','rabetbase\x20page\x20custom-publish','rabetbase\x20bff\x20create','page:react-list','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','1775455YNnMXd','rabetbase\x20run\x20preview','skill:install','Code\x20Generation','skill:','Schema','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','set','logout','map','Logs','start','create','show','from','rabetbase\x20menu\x20asset-update','Run\x20any\x20package.json\x20script','rabetbase\x20workspace\x20use\x20--app\x20<name>','`\x20has\x20been\x20removed.','knowledge-base:create','app:use','preview','service','values','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','push','Instant\x20API\x20Policy','Menu','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Configuration','\x20\x20[write]','page:standard-page-status','app:add','rabetbase\x20page\x20custom-detail','skills:install','sql:save','isSingleCommand','install','defaultCommand','knowledge-base:detail','Diagnostics','Platform\x20Issue','hidden','78ujXPtt'];a189_0x2fad=function(){return _0x2f6b4a;};return a189_0x2fad();}import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x432ebe){const _0x57a48a=a189_0x3f33;for(const _0x2f50bd of _0x432ebe){definitions[_0x57a48a(0x20d)](_0x2f50bd[_0x57a48a(0x21c)]+':'+_0x2f50bd['command'],_0x2f50bd);let _0x4b1a1e=serviceGroups[_0x57a48a(0x1fb)](_0x2f50bd[_0x57a48a(0x21c)]);!_0x4b1a1e&&(_0x4b1a1e=[],serviceGroups[_0x57a48a(0x20d)](_0x2f50bd[_0x57a48a(0x21c)],_0x4b1a1e)),_0x4b1a1e[_0x57a48a(0x21f)](_0x2f50bd);}}function registerDeclarativeService(_0x3c69d9,_0x5088fd,_0x189b11){const _0x426cd2=a189_0x3f33;registerDefinitions(_0x5088fd);_0x189b11?.[_0x426cd2(0x1d6)]&&registerDefinitions([_0x189b11[_0x426cd2(0x1d6)]]);const _0x4b6e28=_0x3cad6b=>_0x3cad6b===_0x426cd2(0x1e9)?'':_0x3cad6b==='write'?_0x426cd2(0x224):_0x426cd2(0x1ec),_0xe3c211={'service':_0x5088fd[0x0][_0x426cd2(0x21c)],'label':_0x3c69d9,'commands':_0x5088fd[_0x426cd2(0x1e0)](_0x1166ba=>!_0x1166ba[_0x426cd2(0x1bd)])[_0x426cd2(0x20f)](_0x4c0a50=>({'command':_0x4c0a50[_0x426cd2(0x1fa)],'description':_0x4c0a50['description'],'tag':_0x4b6e28(_0x4c0a50['risk'])})),'declarative':!![],'defaultCommand':_0x189b11?.[_0x426cd2(0x1b9)]??(_0x189b11?.['isSingleCommand']?_0x5088fd[0x0][_0x426cd2(0x1fa)]:undefined),'wildcardDef':_0x189b11?.[_0x426cd2(0x1d6)],'isSingleCommand':_0x189b11?.[_0x426cd2(0x22a)]};serviceRegistry[_0x426cd2(0x21f)](_0xe3c211),serviceByName['set'](_0xe3c211[_0x426cd2(0x21c)],_0xe3c211);}registerDeclarativeService(a189_0x5e9d80(0x1c9),projectDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c7),workspaceDefinitions),registerDeclarativeService(a189_0x5e9d80(0x200),appDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1f5),authDefinitions,{'defaultCommand':a189_0x5e9d80(0x1d5)}),registerDeclarativeService(a189_0x5e9d80(0x1e5),tenantDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c1),userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1ee),apiDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c8),bffDefinitions),registerDeclarativeService(a189_0x5e9d80(0x220),instantApiPolicyDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1da),notificationDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1f6),sqlDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c6),dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService(a189_0x5e9d80(0x221),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1cf),roleDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1ff),appConfigDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c5),kbDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c0),ruleDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1bc),issueDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1d2),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a189_0x5e9d80(0x208),codegenDefinitions),registerDeclarativeService(a189_0x5e9d80(0x223),configDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1bb),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5e9d80(0x20a),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a189_0x5e9d80(0x1b8)}),registerDeclarativeService(a189_0x5e9d80(0x210),logsDefinitions,{'defaultCommand':a189_0x5e9d80(0x213)}),registerDeclarativeService(a189_0x5e9d80(0x1d0),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a189_0x5e9d80(0x1e4)]-0x1];last['commands']=[{'command':a189_0x5e9d80(0x1fd),'description':a189_0x5e9d80(0x216),'tag':a189_0x5e9d80(0x1fc)+runDefinition[a189_0x5e9d80(0x1c2)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a189_0x5e9d80(0x229),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a189_0x5e9d80(0x1ef),a189_0x5e9d80(0x202)],[a189_0x5e9d80(0x1f3),'rabetbase\x20sql\x20create'],[a189_0x5e9d80(0x1d1),a189_0x5e9d80(0x215)],['project:init',a189_0x5e9d80(0x1cc)],[a189_0x5e9d80(0x209),a189_0x5e9d80(0x1de)],[a189_0x5e9d80(0x207),a189_0x5e9d80(0x1de)],[a189_0x5e9d80(0x1c3),'rabetbase\x20cli-skill\x20install'],[a189_0x5e9d80(0x228),'rabetbase\x20cli-skill\x20install'],['app:remote',a189_0x5e9d80(0x1e1)],[a189_0x5e9d80(0x21a),a189_0x5e9d80(0x217)],[a189_0x5e9d80(0x226),a189_0x5e9d80(0x21e)],[a189_0x5e9d80(0x1e3),'rabetbase\x20workspace\x20remove\x20<name>'],[a189_0x5e9d80(0x1fe),'rabetbase\x20kb\x20list'],[a189_0x5e9d80(0x1ba),a189_0x5e9d80(0x1ca)],[a189_0x5e9d80(0x219),a189_0x5e9d80(0x1f2)],[a189_0x5e9d80(0x1e6),'rabetbase\x20kb\x20update'],[a189_0x5e9d80(0x1f4),a189_0x5e9d80(0x1cb)],[a189_0x5e9d80(0x1dc),a189_0x5e9d80(0x1ce)],[a189_0x5e9d80(0x1d4),a189_0x5e9d80(0x20b)],['data:getOne',a189_0x5e9d80(0x204)],[a189_0x5e9d80(0x225),a189_0x5e9d80(0x1e2)],['page:react-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a189_0x5e9d80(0x1f8),a189_0x5e9d80(0x222)],[a189_0x5e9d80(0x203),a189_0x5e9d80(0x1bf)],[a189_0x5e9d80(0x1eb),a189_0x5e9d80(0x227)],['page:react-update','rabetbase\x20page\x20custom-update'],[a189_0x5e9d80(0x1db),a189_0x5e9d80(0x201)]]),REMOVED_COMMAND_HINTS=new Map([['deployment:sync',a189_0x5e9d80(0x20c)],['permit:page-get',a189_0x5e9d80(0x1ed)],['permit:page-set',a189_0x5e9d80(0x1ed)],['permit:role-menus',a189_0x5e9d80(0x1ed)],[a189_0x5e9d80(0x1d9),a189_0x5e9d80(0x1ed)],[a189_0x5e9d80(0x1c4),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a189_0x5e9d80(0x212),a189_0x5e9d80(0x1ea)],[a189_0x5e9d80(0x211),'rabetbase\x20run\x20start'],[a189_0x5e9d80(0x1d8),a189_0x5e9d80(0x1dd)],[a189_0x5e9d80(0x21b),a189_0x5e9d80(0x206)],[a189_0x5e9d80(0x20e),a189_0x5e9d80(0x1f9)]]);export function resolveRemovedCommand(_0x6f7047,_0x3fe65e){const _0xff5f83=a189_0x5e9d80;if(!_0x6f7047)return undefined;const _0x529561=REMOVED_COMMAND_REPLACEMENTS[_0xff5f83(0x1fb)](_0x6f7047+':'+(_0x3fe65e??'')),_0x49c888=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0xff5f83(0x1fb)](_0x6f7047),_0x21ad1d=_0x529561??_0x49c888,_0x202983=REMOVED_COMMAND_HINTS[_0xff5f83(0x1fb)](_0x6f7047+':'+(_0x3fe65e??''));if(!_0x21ad1d&&!_0x202983)return undefined;const _0x1eafd4=_0x49c888?_0x6f7047:_0x3fe65e?_0x6f7047+'\x20'+_0x3fe65e:_0x6f7047;return{'command':_0x1eafd4,'message':_0xff5f83(0x1f1)+_0x1eafd4+_0xff5f83(0x218),'hint':_0x202983??_0xff5f83(0x1d7)+_0x21ad1d+'`\x20instead.'};}export function findDefinition(_0x52d95a,_0x51ca95){const _0x2fb5ca=a189_0x5e9d80;return definitions[_0x2fb5ca(0x1fb)](_0x52d95a+':'+_0x51ca95);}export function isKnownService(_0x3abeda){const _0x42f382=a189_0x5e9d80;return serviceByName[_0x42f382(0x1cd)](_0x3abeda);}export function isDeclarativeService(_0x4d77a6){const _0x5403ff=a189_0x5e9d80;return serviceGroups[_0x5403ff(0x1cd)](_0x4d77a6)||serviceByName[_0x5403ff(0x1fb)](_0x4d77a6)?.[_0x5403ff(0x1d6)]!==undefined;}export function getServiceEntry(_0x59e413){const _0x86343f=a189_0x5e9d80;return serviceByName[_0x86343f(0x1fb)](_0x59e413);}export function getLegacyHandler(_0x214f51,_0x393bdf){return undefined;}export function getAllDefinitions(){const _0x1123e7=a189_0x5e9d80;return Array[_0x1123e7(0x214)](definitions[_0x1123e7(0x21d)]());}
@@ -1 +1 @@
1
- function a190_0x3273(){const _0x3a4546=['high-risk-write','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','59683WZXbEb','8AtTrtr','567994aimGwO','Deleted\x20role\x20','6783606OsexzL','8EDGPHo','appCode','delete','295737JvYfuP','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','POST','/smartapi/permit/role/delete','Role\x20still\x20has\x20','roleName','1325265FtWvRh','num','13903533QtFFJb','dev','1982218tSHCUg'];a190_0x3273=function(){return _0x3a4546;};return a190_0x3273();}const a190_0x431b93=a190_0xeb2b;(function(_0x589547,_0x2bac00){const _0x147e87=a190_0xeb2b,_0x288ed7=_0x589547();while(!![]){try{const _0x14fe4b=parseInt(_0x147e87(0x130))/0x1+parseInt(_0x147e87(0x132))/0x2+parseInt(_0x147e87(0x123))/0x3*(-parseInt(_0x147e87(0x131))/0x4)+-parseInt(_0x147e87(0x129))/0x5+-parseInt(_0x147e87(0x134))/0x6+-parseInt(_0x147e87(0x12d))/0x7*(-parseInt(_0x147e87(0x135))/0x8)+parseInt(_0x147e87(0x12b))/0x9;if(_0x14fe4b===_0x2bac00)break;else _0x288ed7['push'](_0x288ed7['shift']());}catch(_0x4818d5){_0x288ed7['push'](_0x288ed7['shift']());}}}(a190_0x3273,0x8d53f));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a190_0x431b93(0x126);function a190_0xeb2b(_0x477b8a,_0x49e5f1){_0x477b8a=_0x477b8a-0x122;const _0x3273da=a190_0x3273();let _0xeb2b9=_0x3273da[_0x477b8a];return _0xeb2b9;}export const roleDelete={'service':'role','command':'delete','description':a190_0x431b93(0x12f),'risk':a190_0x431b93(0x12e),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4383b8){const _0xa6fcd0=a190_0x431b93,_0x4070f8=_0x4383b8[_0xa6fcd0(0x12a)]('id'),_0x458ecc=await getRoleById(_0x4383b8[_0xa6fcd0(0x136)],_0x4070f8);return assertCustomRole(_0x458ecc,'delete'),asDryRunResult({'scope':'dev','operation':'delete','selector':{'appCode':_0x4383b8[_0xa6fcd0(0x136)],'roleId':_0x4070f8,'roleName':_0x458ecc[_0xa6fcd0(0x128)]},'before':projectRole(_0x458ecc),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x458ecc['userCount']>0x0?[_0xa6fcd0(0x127)+_0x458ecc['userCount']+_0xa6fcd0(0x124)]:[]},{'method':_0xa6fcd0(0x125),'url':DELETE_PATH});},async 'execute'(_0x548fd1){const _0x45976f=a190_0x431b93,_0x371cad=_0x548fd1[_0x45976f(0x12a)]('id'),_0x13b138=await getRoleById(_0x548fd1[_0x45976f(0x136)],_0x371cad);return assertCustomRole(_0x13b138,_0x45976f(0x122)),await deleteAppRole(_0x371cad),{'ok':!![],'data':{'scope':_0x45976f(0x12c),'operation':_0x45976f(0x122),'selector':{'appCode':_0x548fd1[_0x45976f(0x136)],'roleId':_0x371cad,'roleName':_0x13b138[_0x45976f(0x128)]},'before':projectRole(_0x13b138),'after':null,'dryRun':![],'backend':{'method':_0x45976f(0x125),'path':DELETE_PATH},'warnings':[]},'message':_0x45976f(0x133)+_0x13b138[_0x45976f(0x128)]+'\x20(id='+_0x371cad+')'};}};
1
+ const a190_0x5cee7f=a190_0x1f87;function a190_0x3dfa(){const _0x1c6847=['roleName','25548DEwjlW','5bnxhFS','9922276TcQFvt','num','high-risk-write','dev','Role\x20still\x20has\x20','Deleted\x20role\x20','1387920tvPCac','2183145PxRIWa','appCode','8IjFhSB','117HEIcHr','role','userCount','257697tVZZHj','delete','8NeWkyc','POST','485540yqzouW','\x20(id=','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','3839jFTzUe','972456LQfdvp'];a190_0x3dfa=function(){return _0x1c6847;};return a190_0x3dfa();}(function(_0x39ec1e,_0x34d406){const _0x5b08af=a190_0x1f87,_0x5a2be4=_0x39ec1e();while(!![]){try{const _0x2d69a6=-parseInt(_0x5b08af(0x1c3))/0x1+parseInt(_0x5b08af(0x1bc))/0x2+-parseInt(_0x5b08af(0x1bd))/0x3*(-parseInt(_0x5b08af(0x1bf))/0x4)+-parseInt(_0x5b08af(0x1b5))/0x5*(-parseInt(_0x5b08af(0x1cb))/0x6)+parseInt(_0x5b08af(0x1b6))/0x7*(-parseInt(_0x5b08af(0x1c5))/0x8)+-parseInt(_0x5b08af(0x1c0))/0x9*(parseInt(_0x5b08af(0x1c7))/0xa)+parseInt(_0x5b08af(0x1ca))/0xb*(parseInt(_0x5b08af(0x1b4))/0xc);if(_0x2d69a6===_0x34d406)break;else _0x5a2be4['push'](_0x5a2be4['shift']());}catch(_0x285cdf){_0x5a2be4['push'](_0x5a2be4['shift']());}}}(a190_0x3dfa,0xb6a58));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';function a190_0x1f87(_0x4f08e4,_0x386c29){_0x4f08e4=_0x4f08e4-0x1b4;const _0x3dfa14=a190_0x3dfa();let _0x1f870c=_0x3dfa14[_0x4f08e4];return _0x1f870c;}export const roleDelete={'service':a190_0x5cee7f(0x1c1),'command':a190_0x5cee7f(0x1c4),'description':a190_0x5cee7f(0x1c9),'risk':a190_0x5cee7f(0x1b8),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x586ece){const _0x2266a2=a190_0x5cee7f,_0x1a1808=_0x586ece[_0x2266a2(0x1b7)]('id'),_0x6fb98a=await getRoleById(_0x586ece[_0x2266a2(0x1be)],_0x1a1808);return assertCustomRole(_0x6fb98a,_0x2266a2(0x1c4)),asDryRunResult({'scope':'dev','operation':'delete','selector':{'appCode':_0x586ece[_0x2266a2(0x1be)],'roleId':_0x1a1808,'roleName':_0x6fb98a['roleName']},'before':projectRole(_0x6fb98a),'after':null,'dryRun':!![],'backend':{'method':_0x2266a2(0x1c6),'path':DELETE_PATH},'warnings':_0x6fb98a[_0x2266a2(0x1c2)]>0x0?[_0x2266a2(0x1ba)+_0x6fb98a['userCount']+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x54a536){const _0x53b5f1=a190_0x5cee7f,_0x894217=_0x54a536[_0x53b5f1(0x1b7)]('id'),_0x57ec03=await getRoleById(_0x54a536[_0x53b5f1(0x1be)],_0x894217);return assertCustomRole(_0x57ec03,_0x53b5f1(0x1c4)),await deleteAppRole(_0x894217),{'ok':!![],'data':{'scope':_0x53b5f1(0x1b9),'operation':_0x53b5f1(0x1c4),'selector':{'appCode':_0x54a536[_0x53b5f1(0x1be)],'roleId':_0x894217,'roleName':_0x57ec03['roleName']},'before':projectRole(_0x57ec03),'after':null,'dryRun':![],'backend':{'method':_0x53b5f1(0x1c6),'path':DELETE_PATH},'warnings':[]},'message':_0x53b5f1(0x1bb)+_0x57ec03[_0x53b5f1(0x1cc)]+_0x53b5f1(0x1c8)+_0x894217+')'};}};
@@ -1 +1 @@
1
- const a191_0x19dbd8=a191_0x3c3c;(function(_0x2c4282,_0x5272ce){const _0x23f974=a191_0x3c3c,_0x1cb12a=_0x2c4282();while(!![]){try{const _0x7ee3d5=parseInt(_0x23f974(0x1ac))/0x1*(parseInt(_0x23f974(0x1ad))/0x2)+parseInt(_0x23f974(0x1a8))/0x3+parseInt(_0x23f974(0x1b1))/0x4+-parseInt(_0x23f974(0x1a7))/0x5+parseInt(_0x23f974(0x1a2))/0x6*(parseInt(_0x23f974(0x1b0))/0x7)+parseInt(_0x23f974(0x1ae))/0x8*(parseInt(_0x23f974(0x1b2))/0x9)+parseInt(_0x23f974(0x1a9))/0xa*(-parseInt(_0x23f974(0x1a5))/0xb);if(_0x7ee3d5===_0x5272ce)break;else _0x1cb12a['push'](_0x1cb12a['shift']());}catch(_0x3023ce){_0x1cb12a['push'](_0x1cb12a['shift']());}}}(a191_0x374a,0x7f0dd));function a191_0x3c3c(_0x6dff16,_0x51f978){_0x6dff16=_0x6dff16-0x1a0;const _0x374a85=a191_0x374a();let _0x3c3c49=_0x374a85[_0x6dff16];return _0x3c3c49;}function a191_0x374a(){const _0x430126=['read','role','7715213hwKQpj','appCode','4408590oLAuxL','1789527NLfMAR','20UtPIIC','Role\x20','roleName','5303eCCGNj','252oCkbaD','10032hbwtht','dev','4429838xlDJLl','1487672SiIpZJ','3843AleltN','num','detail','6DhRLLs'];a191_0x374a=function(){return _0x430126;};return a191_0x374a();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a191_0x19dbd8(0x1a4),'command':a191_0x19dbd8(0x1a1),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a191_0x19dbd8(0x1a3),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x489e4b){const _0x377b71=a191_0x19dbd8,_0x3f9a10=_0x489e4b[_0x377b71(0x1a0)]('id'),_0x249123=await getRoleById(_0x489e4b[_0x377b71(0x1a6)],_0x3f9a10);return{'ok':!![],'data':{'scope':_0x377b71(0x1af),'role':projectRole(_0x249123)},'message':_0x377b71(0x1aa)+_0x249123[_0x377b71(0x1ab)]+'\x20('+_0x249123['roleType']+')'};}};
1
+ const a191_0x1d8cc5=a191_0x76a8;(function(_0x1554ac,_0x592a32){const _0x46dd24=a191_0x76a8,_0xcac227=_0x1554ac();while(!![]){try{const _0x2c2ea7=parseInt(_0x46dd24(0x137))/0x1*(-parseInt(_0x46dd24(0x141))/0x2)+-parseInt(_0x46dd24(0x13b))/0x3+parseInt(_0x46dd24(0x139))/0x4*(parseInt(_0x46dd24(0x142))/0x5)+-parseInt(_0x46dd24(0x13f))/0x6*(parseInt(_0x46dd24(0x148))/0x7)+parseInt(_0x46dd24(0x143))/0x8+parseInt(_0x46dd24(0x144))/0x9+parseInt(_0x46dd24(0x13a))/0xa*(parseInt(_0x46dd24(0x138))/0xb);if(_0x2c2ea7===_0x592a32)break;else _0xcac227['push'](_0xcac227['shift']());}catch(_0x4b4dba){_0xcac227['push'](_0xcac227['shift']());}}}(a191_0x3c38,0x4fa8c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0x76a8(_0x80f263,_0x21279b){_0x80f263=_0x80f263-0x136;const _0x3c3852=a191_0x3c38();let _0x76a84=_0x3c3852[_0x80f263];return _0x76a84;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a191_0x3c38(){const _0x3e07aa=['Show\x20a\x20single\x20role\x27s\x20detail','77RnVNDC','roleName','2mouYkO','3582722lHvetz','4CcUVzG','20sEIkuj','267831XePigk','roleType','num','Role\x20','321162jLcPhh','appCode','238174XQgJJh','2484595sAtKGK','659760owzQMg','105651hsOBrv','role','read'];a191_0x3c38=function(){return _0x3e07aa;};return a191_0x3c38();}export const roleDetail={'service':a191_0x1d8cc5(0x145),'command':'detail','description':a191_0x1d8cc5(0x147),'risk':a191_0x1d8cc5(0x146),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5f2757){const _0x1a0ae9=a191_0x1d8cc5,_0x1011b8=_0x5f2757[_0x1a0ae9(0x13d)]('id'),_0x38b9fd=await getRoleById(_0x5f2757[_0x1a0ae9(0x140)],_0x1011b8);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x38b9fd)},'message':_0x1a0ae9(0x13e)+_0x38b9fd[_0x1a0ae9(0x136)]+'\x20('+_0x38b9fd[_0x1a0ae9(0x13c)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x5ab100,_0x353b16){const _0x3e7ff6=a192_0x4210,_0x5f41d0=_0x5ab100();while(!![]){try{const _0x4beffa=parseInt(_0x3e7ff6(0x112))/0x1*(parseInt(_0x3e7ff6(0x119))/0x2)+parseInt(_0x3e7ff6(0x115))/0x3+-parseInt(_0x3e7ff6(0x116))/0x4*(parseInt(_0x3e7ff6(0x118))/0x5)+-parseInt(_0x3e7ff6(0x111))/0x6*(parseInt(_0x3e7ff6(0x10f))/0x7)+parseInt(_0x3e7ff6(0x117))/0x8+-parseInt(_0x3e7ff6(0x113))/0x9+parseInt(_0x3e7ff6(0x110))/0xa*(-parseInt(_0x3e7ff6(0x114))/0xb);if(_0x4beffa===_0x353b16)break;else _0x5f41d0['push'](_0x5f41d0['shift']());}catch(_0x5e1f9f){_0x5f41d0['push'](_0x5f41d0['shift']());}}}(a192_0x13fd,0xe1dfa));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';function a192_0x4210(_0x30bc00,_0x806a39){_0x30bc00=_0x30bc00-0x10f;const _0x13fd68=a192_0x13fd();let _0x421088=_0x13fd68[_0x30bc00];return _0x421088;}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];function a192_0x13fd(){const _0x54b034=['5532057NnwYhD','103836XMXapW','6572328mHutYO','60rxUZaA','220wCwFry','21FgVfyq','30WVmVdx','571908Nsuzna','11840QbWGSe','4922388aLYkJj','6960756DZCRpH'];a192_0x13fd=function(){return _0x54b034;};return a192_0x13fd();}
1
+ function a192_0x46cc(_0x53c02c,_0x3fbe2b){_0x53c02c=_0x53c02c-0xc6;const _0x33f234=a192_0x33f2();let _0x46ccdb=_0x33f234[_0x53c02c];return _0x46ccdb;}(function(_0x292ac8,_0x2b28dd){const _0x3ab97f=a192_0x46cc,_0x5304f5=_0x292ac8();while(!![]){try{const _0x319f43=-parseInt(_0x3ab97f(0xc7))/0x1*(-parseInt(_0x3ab97f(0xcf))/0x2)+-parseInt(_0x3ab97f(0xc8))/0x3+parseInt(_0x3ab97f(0xcc))/0x4*(-parseInt(_0x3ab97f(0xd1))/0x5)+-parseInt(_0x3ab97f(0xca))/0x6*(parseInt(_0x3ab97f(0xc6))/0x7)+-parseInt(_0x3ab97f(0xcd))/0x8+parseInt(_0x3ab97f(0xcb))/0x9*(-parseInt(_0x3ab97f(0xd0))/0xa)+parseInt(_0x3ab97f(0xc9))/0xb*(parseInt(_0x3ab97f(0xce))/0xc);if(_0x319f43===_0x2b28dd)break;else _0x5304f5['push'](_0x5304f5['shift']());}catch(_0xb7a0ea){_0x5304f5['push'](_0x5304f5['shift']());}}}(a192_0x33f2,0x732af));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';function a192_0x33f2(){const _0x259456=['142891WeDiej','82663sRTYmb','1355355nIbNve','24472415dBUFuS','66oPSkVO','36rdfVyw','417276PBxALd','7209608aiKBuC','12ZhRJmx','14AeFaGz','1363780CGZoIN','10AtmfVq'];a192_0x33f2=function(){return _0x259456;};return a192_0x33f2();}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- function a193_0x5e8b(){const _0xc2fd93=['--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Filter\x20by\x20role\x20type','106734eJsfag','trim','toUpperCase','appCode','Page\x20size\x20(1-100)','role','7504609UKBGqp','ADMIN','num','dev','list','484748aauJGD','\x20role(s)','roleType','CUSTOM','6dPDdaH','type','page','pagesize','number','validation','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','Found\x20','5100695KdYAeq','Page\x20index\x20(1-based)','2271984qtAlNi','filter','3799736mBEqwU','read','join','map','Use\x20one\x20of:\x20','24388216agQtJz'];a193_0x5e8b=function(){return _0xc2fd93;};return a193_0x5e8b();}const a193_0x540bf1=a193_0x53d8;(function(_0x17d229,_0x3aec0e){const _0x23d4c1=a193_0x53d8,_0x2c9bd8=_0x17d229();while(!![]){try{const _0x564855=parseInt(_0x23d4c1(0xc8))/0x1+-parseInt(_0x23d4c1(0xb0))/0x2+parseInt(_0x23d4c1(0xbe))/0x3+parseInt(_0x23d4c1(0xc0))/0x4+parseInt(_0x23d4c1(0xbc))/0x5*(parseInt(_0x23d4c1(0xb4))/0x6)+parseInt(_0x23d4c1(0xce))/0x7+-parseInt(_0x23d4c1(0xc5))/0x8;if(_0x564855===_0x3aec0e)break;else _0x2c9bd8['push'](_0x2c9bd8['shift']());}catch(_0x17c1da){_0x2c9bd8['push'](_0x2c9bd8['shift']());}}}(a193_0x5e8b,0x96399));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';function a193_0x53d8(_0x577af5,_0x2a89c4){_0x577af5=_0x577af5-0xae;const _0x5e8bf6=a193_0x5e8b();let _0x53d861=_0x5e8bf6[_0x577af5];return _0x53d861;}const ROLE_TYPES=[a193_0x540bf1(0xcf),'DEV','OWNER',a193_0x540bf1(0xb3)];export const roleList={'service':a193_0x540bf1(0xcd),'command':a193_0x540bf1(0xaf),'description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':a193_0x540bf1(0xc1),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','required':![],'description':a193_0x540bf1(0xc7),'enum':ROLE_TYPES},{'name':a193_0x540bf1(0xb6),'type':a193_0x540bf1(0xb8),'description':a193_0x540bf1(0xbd),'default':0x1},{'name':a193_0x540bf1(0xb7),'type':a193_0x540bf1(0xb8),'description':a193_0x540bf1(0xcc),'default':0x64}],async 'validate'(_0x359454){const _0x46033d=a193_0x540bf1,_0x1333e5=_0x359454['str'](_0x46033d(0xb5))[_0x46033d(0xc9)]();if(_0x1333e5&&!ROLE_TYPES['includes'](_0x1333e5[_0x46033d(0xca)]()))throw CliErrors[_0x46033d(0xb9)]('Invalid\x20--type\x20\x22'+_0x1333e5+'\x22.',_0x46033d(0xc4)+ROLE_TYPES[_0x46033d(0xc2)](',\x20')+'.');const _0x26f70a=_0x359454[_0x46033d(0xd0)]('page',0x1),_0x4cf6c0=_0x359454[_0x46033d(0xd0)](_0x46033d(0xb7),0x64);if(_0x26f70a<0x1)throw CliErrors[_0x46033d(0xb9)](_0x46033d(0xba));if(_0x4cf6c0<0x1||_0x4cf6c0>0x64)throw CliErrors[_0x46033d(0xb9)](_0x46033d(0xc6));},async 'execute'(_0x617260){const _0x3fb585=a193_0x540bf1,_0x33e119=_0x617260[_0x3fb585(0xd0)]('page',0x1)||0x1,_0x210027=_0x617260['num'](_0x3fb585(0xb7),0x64)||0x64,_0x559488=_0x617260['str'](_0x3fb585(0xb5))[_0x3fb585(0xc9)]()[_0x3fb585(0xca)](),{items:_0x1a9a8e,paging:_0x2471ed}=await listAppRoles(_0x617260[_0x3fb585(0xcb)],{'currentPage':_0x33e119,'pageSize':_0x210027}),_0x3b92f2=_0x559488?_0x1a9a8e[_0x3fb585(0xbf)](_0x1e58cc=>_0x1e58cc[_0x3fb585(0xb2)]===_0x559488):_0x1a9a8e,_0x3c0132=_0x3b92f2[_0x3fb585(0xc3)](projectRole);return{'ok':!![],'data':{'scope':_0x3fb585(0xae),'roles':_0x3c0132,'paging':_0x2471ed},'message':_0x3fb585(0xbb)+_0x3c0132['length']+_0x3fb585(0xb1)};}};
1
+ function a193_0x5d42(){const _0x18370d=['type','OWNER','33540KtghXu','Use\x20one\x20of:\x20','Filter\x20by\x20role\x20type','203mFQbPd','ADMIN','appCode','10ypezRE','4268OEtENK','DEV','1043559ipTGyM','11290ABSJHA','filter','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','page','471259vAXQmh','356967OvYsEV','includes','validation','role','str','Found\x20','trim','string','length','pagesize','read','2366286kzUczJ','184xlSSwX','Page\x20size\x20(1-100)','num','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','CUSTOM','toUpperCase','31128FEZqNt','Invalid\x20--type\x20\x22','number'];a193_0x5d42=function(){return _0x18370d;};return a193_0x5d42();}const a193_0x13dfdf=a193_0x5366;(function(_0x3e1e9a,_0x57365c){const _0xccad8=a193_0x5366,_0xd13be4=_0x3e1e9a();while(!![]){try{const _0x539d6c=parseInt(_0xccad8(0x1cd))/0x1+-parseInt(_0xccad8(0x1c5))/0x2*(-parseInt(_0xccad8(0x1ce))/0x3)+-parseInt(_0xccad8(0x1da))/0x4*(parseInt(_0xccad8(0x1bf))/0x5)+parseInt(_0xccad8(0x1d9))/0x6+-parseInt(_0xccad8(0x1c2))/0x7*(parseInt(_0xccad8(0x1ba))/0x8)+-parseInt(_0xccad8(0x1c8))/0x9+-parseInt(_0xccad8(0x1c9))/0xa*(parseInt(_0xccad8(0x1c6))/0xb);if(_0x539d6c===_0x57365c)break;else _0xd13be4['push'](_0xd13be4['shift']());}catch(_0x551880){_0xd13be4['push'](_0xd13be4['shift']());}}}(a193_0x5d42,0x76737));import{listAppRoles}from'../../core/api-client.js';function a193_0x5366(_0x4a26d6,_0x5d6242){_0x4a26d6=_0x4a26d6-0x1b5;const _0x5d42bd=a193_0x5d42();let _0x5366da=_0x5d42bd[_0x4a26d6];return _0x5366da;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a193_0x13dfdf(0x1c3),a193_0x13dfdf(0x1c7),a193_0x13dfdf(0x1be),a193_0x13dfdf(0x1b8)];export const roleList={'service':a193_0x13dfdf(0x1d1),'command':'list','description':a193_0x13dfdf(0x1b7),'risk':a193_0x13dfdf(0x1d8),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a193_0x13dfdf(0x1bd),'type':a193_0x13dfdf(0x1d5),'required':![],'description':a193_0x13dfdf(0x1c1),'enum':ROLE_TYPES},{'name':'page','type':a193_0x13dfdf(0x1bc),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a193_0x13dfdf(0x1d7),'type':a193_0x13dfdf(0x1bc),'description':a193_0x13dfdf(0x1b5),'default':0x64}],async 'validate'(_0xe21167){const _0x40dbb7=a193_0x13dfdf,_0x1ebb32=_0xe21167[_0x40dbb7(0x1d2)](_0x40dbb7(0x1bd))['trim']();if(_0x1ebb32&&!ROLE_TYPES[_0x40dbb7(0x1cf)](_0x1ebb32[_0x40dbb7(0x1b9)]()))throw CliErrors[_0x40dbb7(0x1d0)](_0x40dbb7(0x1bb)+_0x1ebb32+'\x22.',_0x40dbb7(0x1c0)+ROLE_TYPES['join'](',\x20')+'.');const _0x12d5cf=_0xe21167[_0x40dbb7(0x1b6)](_0x40dbb7(0x1cc),0x1),_0x205d0a=_0xe21167[_0x40dbb7(0x1b6)](_0x40dbb7(0x1d7),0x64);if(_0x12d5cf<0x1)throw CliErrors['validation']('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x205d0a<0x1||_0x205d0a>0x64)throw CliErrors[_0x40dbb7(0x1d0)](_0x40dbb7(0x1cb));},async 'execute'(_0x425198){const _0xb9091c=a193_0x13dfdf,_0x4c0a28=_0x425198[_0xb9091c(0x1b6)](_0xb9091c(0x1cc),0x1)||0x1,_0x1ef26d=_0x425198[_0xb9091c(0x1b6)]('pagesize',0x64)||0x64,_0x12dac1=_0x425198['str']('type')[_0xb9091c(0x1d4)]()[_0xb9091c(0x1b9)](),{items:_0x30ad39,paging:_0x496c72}=await listAppRoles(_0x425198[_0xb9091c(0x1c4)],{'currentPage':_0x4c0a28,'pageSize':_0x1ef26d}),_0xea610a=_0x12dac1?_0x30ad39[_0xb9091c(0x1ca)](_0x271e6b=>_0x271e6b['roleType']===_0x12dac1):_0x30ad39,_0xc8ba11=_0xea610a['map'](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0xc8ba11,'paging':_0x496c72},'message':_0xb9091c(0x1d3)+_0xc8ba11[_0xb9091c(0x1d6)]+'\x20role(s)'};}};
@@ -1 +1 @@
1
- const a194_0x478f8f=a194_0x2124;(function(_0x12ced5,_0x42fe71){const _0x49fa12=a194_0x2124,_0xac4f53=_0x12ced5();while(!![]){try{const _0x49c2fb=-parseInt(_0x49fa12(0x7e))/0x1+-parseInt(_0x49fa12(0x96))/0x2*(parseInt(_0x49fa12(0x82))/0x3)+-parseInt(_0x49fa12(0x94))/0x4+-parseInt(_0x49fa12(0x6e))/0x5+parseInt(_0x49fa12(0x72))/0x6+-parseInt(_0x49fa12(0xab))/0x7*(parseInt(_0x49fa12(0xa2))/0x8)+parseInt(_0x49fa12(0x9c))/0x9;if(_0x49c2fb===_0x42fe71)break;else _0xac4f53['push'](_0xac4f53['shift']());}catch(_0x398c4f){_0xac4f53['push'](_0xac4f53['shift']());}}}(a194_0x3cf4,0x76d27));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':'number','required':!![],'description':a194_0x478f8f(0xa8)};export const ROLE_REF_FLAG={'name':a194_0x478f8f(0x84),'type':a194_0x478f8f(0x74),'required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};export const USER_REF_FLAG={'name':'user','type':'string','required':!![],'description':a194_0x478f8f(0x8b)};export const NAME_FLAG={'name':a194_0x478f8f(0xb6),'type':a194_0x478f8f(0x74),'required':!![],'description':a194_0x478f8f(0x79)};export const USER_NAME_FLAG={'name':a194_0x478f8f(0xb6),'type':a194_0x478f8f(0x74),'required':!![],'description':a194_0x478f8f(0x9b)};export const REMARK_FLAG={'name':a194_0x478f8f(0x87),'type':a194_0x478f8f(0x74),'required':![],'description':a194_0x478f8f(0x78)};export const EXPECT_USER_COUNT_FLAG={'name':a194_0x478f8f(0x85),'type':a194_0x478f8f(0x81),'required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=['ADMIN',a194_0x478f8f(0x90),a194_0x478f8f(0xa0)];export function isBuiltinRole(_0x1eeefe){return BUILTIN_ROLE_TYPES['includes'](_0x1eeefe);}export function assertCustomRole(_0x3a7a3e,_0x4000f6){const _0x321691=a194_0x478f8f;if(_0x3a7a3e[_0x321691(0x9f)]!==_0x321691(0x98))throw CliErrors[_0x321691(0x75)](_0x321691(0xac)+_0x4000f6+_0x321691(0x6d)+_0x3a7a3e[_0x321691(0x89)]+'\x20('+_0x3a7a3e[_0x321691(0x9f)]+').',_0x321691(0x7d));}function a194_0x2124(_0x23712b,_0x1238db){_0x23712b=_0x23712b-0x6b;const _0x3cf4b3=a194_0x3cf4();let _0x212473=_0x3cf4b3[_0x23712b];return _0x212473;}export function projectRole(_0x5f7f90){const _0x45597d=a194_0x478f8f;return{'id':_0x5f7f90['id'],'roleName':_0x5f7f90[_0x45597d(0x89)],'roleType':_0x5f7f90['roleType'],'remark':_0x5f7f90[_0x45597d(0x87)],'userCount':_0x5f7f90[_0x45597d(0x71)],'permitCount':_0x5f7f90['permitCount'],'builtin':isBuiltinRole(_0x5f7f90['roleType'])};}export async function resolveRoleRef(_0x45e636,_0x3bb83c){const _0x3f7d71=a194_0x478f8f,_0x5d3e11=_0x3bb83c['trim']();if(!_0x5d3e11)throw CliErrors['validation'](_0x3f7d71(0x8f),_0x3f7d71(0xad));if(/^\d+$/[_0x3f7d71(0xb4)](_0x5d3e11))return getRoleById(_0x45e636,Number(_0x5d3e11));const _0x32918d=await listAllAppRoles(_0x45e636),_0x548041=_0x32918d[_0x3f7d71(0x9d)](_0x33fe2b=>_0x33fe2b['roleName']===_0x5d3e11);if(_0x548041[_0x3f7d71(0x8d)]===0x0)throw CliErrors[_0x3f7d71(0x75)](_0x3f7d71(0x8e)+_0x5d3e11+_0x3f7d71(0x7c)+_0x45e636+'.',_0x3f7d71(0x93));if(_0x548041[_0x3f7d71(0x8d)]>0x1){const _0x12a4b0=_0x548041[_0x3f7d71(0xaa)](_0x1629cf=>_0x1629cf['id'])[_0x3f7d71(0x7a)](',\x20');throw CliErrors[_0x3f7d71(0x75)](_0x3f7d71(0x8e)+_0x5d3e11+_0x3f7d71(0x9e)+_0x12a4b0+').',_0x3f7d71(0x6c));}return _0x548041[0x0];}export async function getRoleById(_0x2ada89,_0x259b18){const _0x310ca0=a194_0x478f8f,_0x40ca3c=await listAllAppRoles(_0x2ada89),_0x3f81ed=_0x40ca3c[_0x310ca0(0x9d)](_0x502ac1=>_0x502ac1['id']===_0x259b18&&(!_0x502ac1[_0x310ca0(0x8a)]||_0x502ac1['appCode']===_0x2ada89));if(_0x3f81ed['length']!==0x1)throw CliErrors[_0x310ca0(0x75)](_0x310ca0(0x77)+_0x259b18+'\x20not\x20found\x20in\x20app\x20'+_0x2ada89+'.',_0x310ca0(0x76));return _0x3f81ed[0x0];}async function listAllAppRoles(_0x1383e4){const _0x19be80=a194_0x478f8f,_0x5858a8=0x64,_0x3eb60f=[];for(let _0x5b7133=0x1;;_0x5b7133+=0x1){const {items:_0xcf1544,paging:_0x29097d}=await listAppRoles(_0x1383e4,{'currentPage':_0x5b7133,'pageSize':_0x5858a8});_0x3eb60f[_0x19be80(0xaf)](..._0xcf1544);if(_0xcf1544[_0x19be80(0x8d)]<_0x5858a8||_0x29097d&&_0x3eb60f[_0x19be80(0x8d)]>=_0x29097d['totalCount'])return _0x3eb60f;}}export async function resolveTenantCode(){const _0x344874=a194_0x478f8f,_0x3d469d=await getSessionUserInfo(),_0x287520=_0x3d469d?.[_0x344874(0xb1)]?.[_0x344874(0x9a)]?.[_0x344874(0x86)];if(!_0x287520)throw CliErrors[_0x344874(0xa6)](_0x344874(0x97));return _0x287520;}function matchMember(_0x257934,_0x598482){const _0x314819=a194_0x478f8f,_0x2fcf0e=_0x598482['trim']()[_0x314819(0xb7)]();return(_0x257934[_0x314819(0x8c)]??'')[_0x314819(0xb7)]()===_0x2fcf0e||(_0x257934[_0x314819(0x91)]??'')[_0x314819(0xb7)]()===_0x2fcf0e;}function a194_0x3cf4(){const _0x307459=['string','validation','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','Role\x20id\x20','Optional\x20role\x20remark/description','Role\x20name','join','trim','\x22\x20not\x20found\x20in\x20app\x20','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','772696CYeNTF','flag','totalCount','number','2094678IRlyhl','Removed\x20','role','expect-user-count','tenant_code','remark','dev','roleName','appCode','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','nickname','length','Role\x20name\x20\x22','Missing\x20role\x20reference.','DEV','username','Check\x20the\x20nickname/username.\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','3217984JVkBgZ','userId','2Qbtcub','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','CUSTOM','\x20is\x20not\x20a\x20member\x20of\x20role\x20','tenant','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','21050694MIGSAT','filter','\x22\x20is\x20ambiguous\x20(ids:\x20','roleType','OWNER','\x20member(s)\x20but\x20role\x20has\x20','808DcMBwT','\x20members\x20of\x20the\x20OWNER\x20role.','str','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','authRequired','user-add','Role\x20id\x20(from\x20`role\x20list`)','Pass\x20--user\x20<id|name>.','map','630VJDWHZ','Cannot\x20','Pass\x20--role\x20<id|name>.','includes','push','flagMissing','user','No\x20tenant\x20member\x20matches\x20\x22','User\x20','test','\x20duplicate\x20memberships\x20for\x20user\x20','name','toLowerCase','Pass\x20--user\x20<id>.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Disambiguate\x20with\x20--role\x20<id>.','\x20built-in\x20role\x20','298265NFLpKr',';\x20no\x20change.','POST','userCount','2951340fFRVvu','/smartapi/permit/user-role/create'];a194_0x3cf4=function(){return _0x307459;};return a194_0x3cf4();}export async function resolveUserRef(_0xb7f4d0,_0x31f804=a194_0x478f8f(0xb8)){const _0x3b3d27=a194_0x478f8f,_0x3b4741=_0xb7f4d0[_0x3b3d27(0x7b)]();if(!_0x3b4741)throw CliErrors[_0x3b3d27(0x75)]('Missing\x20user\x20reference.',_0x3b3d27(0xa9));const _0x20d8c2=await resolveTenantCode(),_0x8be42c=await getTenantMembers(_0x20d8c2);if(/^\d+$/[_0x3b3d27(0xb4)](_0x3b4741)){const _0x39dc5c=Number(_0x3b4741),_0x3a6fcb=_0x8be42c['find'](_0x3a30b0=>_0x3a30b0[_0x3b3d27(0x95)]===_0x39dc5c);return{'userId':_0x39dc5c,'username':_0x3a6fcb?.[_0x3b3d27(0x91)]??String(_0x39dc5c),'nickname':_0x3a6fcb?.['nickname'],'matchedBy':'id'};}const _0x4989a5=_0x8be42c[_0x3b3d27(0x9d)](_0x1c9c49=>matchMember(_0x1c9c49,_0x3b4741));if(_0x4989a5[_0x3b3d27(0x8d)]===0x0)throw CliErrors[_0x3b3d27(0x75)](_0x3b3d27(0xb2)+_0x3b4741+'\x22.',_0x3b3d27(0x92)+_0x31f804);if(_0x4989a5[_0x3b3d27(0x8d)]>0x1){const _0x1fa3e2=_0x4989a5[_0x3b3d27(0xaa)](_0x3cffbb=>(_0x3cffbb[_0x3b3d27(0x8c)]??_0x3cffbb[_0x3b3d27(0x91)]??'?')+'('+_0x3cffbb[_0x3b3d27(0x95)]+')')['join'](',\x20');throw CliErrors['validation']('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x3b4741+'\x22:\x20'+_0x1fa3e2+'.',_0x31f804);}const _0x40ebdd=_0x4989a5[0x0];return{'userId':_0x40ebdd['userId'],'username':_0x40ebdd[_0x3b3d27(0x91)]??String(_0x40ebdd[_0x3b3d27(0x95)]),'nickname':_0x40ebdd[_0x3b3d27(0x8c)],'matchedBy':_0x3b3d27(0xb6)};}export const CREATE_USER_ROLE_PATH=a194_0x478f8f(0x73);export const DELETE_USER_ROLE_PATH='/smartapi/permit/user-role/delete';export function computeRoleUserMutation(_0x3e8281){const _0x171511=a194_0x478f8f,{operation:_0x1fcd02,appCode:_0x378959,role:_0x5f1cf4,relations:_0x3bf287,user:_0x2e0978}=_0x3e8281,_0x3a8885=[...new Set(_0x3bf287['map'](_0xbd1c09=>_0xbd1c09['userId']))],_0x300db0=[];if(_0x3e8281['expectUserCount']!==undefined&&_0x3e8281['expectUserCount']!==_0x3a8885['length'])throw CliErrors['validation']('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x3e8281['expectUserCount']+_0x171511(0xa1)+_0x3a8885[_0x171511(0x8d)]+'.',_0x171511(0xa5));const _0x1062d1=_0x3a8885[_0x171511(0xae)](_0x2e0978[_0x171511(0x95)]),_0x4e92ac=_0x3bf287[_0x171511(0x9d)](_0x1aefa6=>_0x1aefa6[_0x171511(0x95)]===_0x2e0978[_0x171511(0x95)])[_0x171511(0xaa)](_0x146d99=>_0x146d99['id']),_0x17abbc=_0x1fcd02===_0x171511(0xa7)?!_0x1062d1:_0x1062d1;let _0x17ea33=_0x3a8885;_0x1fcd02===_0x171511(0xa7)?_0x1062d1?_0x300db0[_0x171511(0xaf)](_0x171511(0xb3)+_0x2e0978[_0x171511(0x95)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x5f1cf4['roleName']+_0x171511(0x6f)):_0x17ea33=[..._0x3a8885,_0x2e0978[_0x171511(0x95)]]:!_0x1062d1?_0x300db0[_0x171511(0xaf)](_0x171511(0xb3)+_0x2e0978[_0x171511(0x95)]+_0x171511(0x99)+_0x5f1cf4[_0x171511(0x89)]+_0x171511(0x6f)):(_0x17ea33=_0x3a8885[_0x171511(0x9d)](_0x765281=>_0x765281!==_0x2e0978['userId']),_0x4e92ac['length']>0x1&&_0x300db0[_0x171511(0xaf)](_0x171511(0x83)+_0x4e92ac['length']+_0x171511(0xb5)+_0x2e0978[_0x171511(0x95)]+'.'));const _0xdbe245={'scope':_0x171511(0x88),'operation':_0x1fcd02,'selector':{'appCode':_0x378959,'roleId':_0x5f1cf4['id'],'roleName':_0x5f1cf4[_0x171511(0x89)],'userId':_0x2e0978['userId']},'before':{'userIds':_0x3a8885},'after':{'userIds':_0x17ea33},'dryRun':_0x3e8281['dryRun'],'backend':{'method':_0x171511(0x70),'path':_0x1fcd02==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x300db0};return{'mutation':_0xdbe245,'changed':_0x17abbc,'matchingRelationIds':_0x4e92ac};}export async function loadDevRoleRelations(_0x93014e,_0x4e1233){const _0xb1738b=a194_0x478f8f,_0x4381d4=0x64,_0x31fe96=[];for(let _0x3f6b48=0x1;;_0x3f6b48+=0x1){const {items:_0x48442e,paging:_0x595142}=await listDevUserRoleRelations(_0x93014e,{'roleId':_0x4e1233,'currentPage':_0x3f6b48,'pageSize':_0x4381d4});_0x31fe96[_0xb1738b(0xaf)](..._0x48442e);if(_0x48442e[_0xb1738b(0x8d)]<_0x4381d4||_0x595142&&_0x31fe96['length']>=_0x595142[_0xb1738b(0x80)])return _0x31fe96;}}export function readRoleRef(_0x450e89){const _0x23ab1b=a194_0x478f8f,_0x1cb96a=_0x450e89[_0x23ab1b(0xa4)]('role')[_0x23ab1b(0x7b)]();if(!_0x1cb96a)throw CliErrors[_0x23ab1b(0xb0)]('role',_0x23ab1b(0xad));return _0x1cb96a;}export async function prepareUserMutation(_0x1ad316,_0x2db580,_0x45a935){const _0x22c843=a194_0x478f8f,_0x1d6269=readRoleRef(_0x1ad316),_0x488c5e=_0x1ad316[_0x22c843(0xa4)](_0x22c843(0xb1))[_0x22c843(0x7b)]();if(!_0x488c5e)throw CliErrors[_0x22c843(0xb0)]('user',_0x22c843(0xa9));const _0x226746=_0x1ad316[_0x22c843(0x7f)](_0x22c843(0x85)),_0x3761c8=_0x226746===undefined||_0x226746===null?undefined:Number(_0x226746),_0x217878=await resolveRoleRef(_0x1ad316[_0x22c843(0x8a)],_0x1d6269);if(_0x217878[_0x22c843(0x9f)]===_0x22c843(0xa0))throw CliErrors[_0x22c843(0x75)](_0x22c843(0xac)+_0x2db580+_0x22c843(0xa3),_0x22c843(0x6b));const _0x4cbb06=await resolveUserRef(_0x488c5e),_0x15f5ba=await loadDevRoleRelations(_0x1ad316[_0x22c843(0x8a)],_0x217878['id']);return{...computeRoleUserMutation({'operation':_0x2db580,'appCode':_0x1ad316['appCode'],'role':_0x217878,'relations':_0x15f5ba,'user':{'userId':_0x4cbb06['userId'],'username':_0x4cbb06[_0x22c843(0x91)],'nickname':_0x4cbb06['nickname']},'dryRun':_0x45a935,..._0x3761c8!==undefined?{'expectUserCount':_0x3761c8}:{}}),'role':_0x217878,'user':_0x4cbb06};}
1
+ const a194_0x5a2978=a194_0x4732;(function(_0x4df329,_0x1f1faa){const _0x4e4bc9=a194_0x4732,_0x5f2d08=_0x4df329();while(!![]){try{const _0x16123a=parseInt(_0x4e4bc9(0xf8))/0x1*(parseInt(_0x4e4bc9(0xfe))/0x2)+parseInt(_0x4e4bc9(0xef))/0x3+parseInt(_0x4e4bc9(0x103))/0x4*(parseInt(_0x4e4bc9(0x11d))/0x5)+-parseInt(_0x4e4bc9(0xff))/0x6+-parseInt(_0x4e4bc9(0x109))/0x7*(-parseInt(_0x4e4bc9(0xf1))/0x8)+parseInt(_0x4e4bc9(0xec))/0x9*(parseInt(_0x4e4bc9(0x111))/0xa)+-parseInt(_0x4e4bc9(0x104))/0xb;if(_0x16123a===_0x1f1faa)break;else _0x5f2d08['push'](_0x5f2d08['shift']());}catch(_0x5186f8){_0x5f2d08['push'](_0x5f2d08['shift']());}}}(a194_0x4d1b,0xaa47d));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':a194_0x5a2978(0x11e),'required':!![],'description':a194_0x5a2978(0x10c)};export const ROLE_REF_FLAG={'name':a194_0x5a2978(0x116),'type':a194_0x5a2978(0x12d),'required':!![],'description':a194_0x5a2978(0x12e)};export const USER_REF_FLAG={'name':a194_0x5a2978(0x119),'type':a194_0x5a2978(0x12d),'required':!![],'description':a194_0x5a2978(0x102)};export const NAME_FLAG={'name':a194_0x5a2978(0xf4),'type':'string','required':!![],'description':'Role\x20name'};export const USER_NAME_FLAG={'name':a194_0x5a2978(0xf4),'type':a194_0x5a2978(0x12d),'required':!![],'description':a194_0x5a2978(0xf2)};export const REMARK_FLAG={'name':a194_0x5a2978(0xea),'type':'string','required':![],'description':a194_0x5a2978(0x105)};export const EXPECT_USER_COUNT_FLAG={'name':a194_0x5a2978(0x11f),'type':a194_0x5a2978(0x11e),'required':![],'description':a194_0x5a2978(0x122)};export const BUILTIN_ROLE_TYPES=['ADMIN',a194_0x5a2978(0x128),a194_0x5a2978(0x106)];export function isBuiltinRole(_0x80903a){const _0x3722c8=a194_0x5a2978;return BUILTIN_ROLE_TYPES[_0x3722c8(0xf5)](_0x80903a);}export function assertCustomRole(_0x433571,_0x216225){const _0x3e516c=a194_0x5a2978;if(_0x433571['roleType']!==_0x3e516c(0xf3))throw CliErrors[_0x3e516c(0x110)](_0x3e516c(0xe9)+_0x216225+'\x20built-in\x20role\x20'+_0x433571['roleName']+'\x20('+_0x433571[_0x3e516c(0xfb)]+').',_0x3e516c(0xee));}export function projectRole(_0x20cdda){const _0x1641ef=a194_0x5a2978;return{'id':_0x20cdda['id'],'roleName':_0x20cdda['roleName'],'roleType':_0x20cdda['roleType'],'remark':_0x20cdda[_0x1641ef(0xea)],'userCount':_0x20cdda[_0x1641ef(0xfa)],'permitCount':_0x20cdda[_0x1641ef(0x12a)],'builtin':isBuiltinRole(_0x20cdda[_0x1641ef(0xfb)])};}export async function resolveRoleRef(_0x352239,_0x10601c){const _0x45f3d3=a194_0x5a2978,_0x90817c=_0x10601c['trim']();if(!_0x90817c)throw CliErrors[_0x45f3d3(0x110)](_0x45f3d3(0x113),_0x45f3d3(0x127));if(/^\d+$/['test'](_0x90817c))return getRoleById(_0x352239,Number(_0x90817c));const _0xfcc287=await listAllAppRoles(_0x352239),_0x6e2e1c=_0xfcc287[_0x45f3d3(0x124)](_0x36ac2d=>_0x36ac2d['roleName']===_0x90817c);if(_0x6e2e1c[_0x45f3d3(0x118)]===0x0)throw CliErrors[_0x45f3d3(0x110)](_0x45f3d3(0xf9)+_0x90817c+'\x22\x20not\x20found\x20in\x20app\x20'+_0x352239+'.',_0x45f3d3(0xfc));if(_0x6e2e1c['length']>0x1){const _0x57e10f=_0x6e2e1c[_0x45f3d3(0x126)](_0x17739d=>_0x17739d['id'])[_0x45f3d3(0x117)](',\x20');throw CliErrors[_0x45f3d3(0x110)]('Role\x20name\x20\x22'+_0x90817c+_0x45f3d3(0x132)+_0x57e10f+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x6e2e1c[0x0];}export async function getRoleById(_0x2abe96,_0x221691){const _0x189b41=a194_0x5a2978,_0x414629=await listAllAppRoles(_0x2abe96),_0xa640be=_0x414629['filter'](_0x4ee034=>_0x4ee034['id']===_0x221691&&(!_0x4ee034[_0x189b41(0x10e)]||_0x4ee034['appCode']===_0x2abe96));if(_0xa640be[_0x189b41(0x118)]!==0x1)throw CliErrors[_0x189b41(0x110)](_0x189b41(0x10a)+_0x221691+'\x20not\x20found\x20in\x20app\x20'+_0x2abe96+'.',_0x189b41(0x12c));return _0xa640be[0x0];}async function listAllAppRoles(_0x228834){const _0x3f20e4=a194_0x5a2978,_0x5b9bed=0x64,_0x513768=[];for(let _0x347272=0x1;;_0x347272+=0x1){const {items:_0x1b08c0,paging:_0x3c2203}=await listAppRoles(_0x228834,{'currentPage':_0x347272,'pageSize':_0x5b9bed});_0x513768[_0x3f20e4(0x10b)](..._0x1b08c0);if(_0x1b08c0['length']<_0x5b9bed||_0x3c2203&&_0x513768[_0x3f20e4(0x118)]>=_0x3c2203[_0x3f20e4(0x134)])return _0x513768;}}export async function resolveTenantCode(){const _0x46db2c=a194_0x5a2978,_0x59647f=await getSessionUserInfo(),_0x5c5e56=_0x59647f?.[_0x46db2c(0x119)]?.['tenant']?.['tenant_code'];if(!_0x5c5e56)throw CliErrors[_0x46db2c(0x12b)](_0x46db2c(0x100));return _0x5c5e56;}function matchMember(_0x3d0ddc,_0x29f484){const _0x28ba95=a194_0x5a2978,_0x1c7d48=_0x29f484[_0x28ba95(0xf0)]()['toLowerCase']();return(_0x3d0ddc[_0x28ba95(0x10f)]??'')[_0x28ba95(0xed)]()===_0x1c7d48||(_0x3d0ddc[_0x28ba95(0x129)]??'')[_0x28ba95(0xed)]()===_0x1c7d48;}export async function resolveUserRef(_0x586bc5,_0x18e8fe='Pass\x20--user\x20<id>.'){const _0x2dcf12=a194_0x5a2978,_0xbc0f5e=_0x586bc5[_0x2dcf12(0xf0)]();if(!_0xbc0f5e)throw CliErrors[_0x2dcf12(0x110)](_0x2dcf12(0xe8),_0x2dcf12(0x11c));const _0x909f4f=await resolveTenantCode(),_0x5c2095=await getTenantMembers(_0x909f4f);if(/^\d+$/['test'](_0xbc0f5e)){const _0x3379b9=Number(_0xbc0f5e),_0x76e444=_0x5c2095[_0x2dcf12(0xf7)](_0x1d8d45=>_0x1d8d45[_0x2dcf12(0xe7)]===_0x3379b9);return{'userId':_0x3379b9,'username':_0x76e444?.[_0x2dcf12(0x129)]??String(_0x3379b9),'nickname':_0x76e444?.[_0x2dcf12(0x10f)],'matchedBy':'id'};}const _0x56a850=_0x5c2095[_0x2dcf12(0x124)](_0x24fc58=>matchMember(_0x24fc58,_0xbc0f5e));if(_0x56a850[_0x2dcf12(0x118)]===0x0)throw CliErrors[_0x2dcf12(0x110)](_0x2dcf12(0x123)+_0xbc0f5e+'\x22.',_0x2dcf12(0x12f)+_0x18e8fe);if(_0x56a850['length']>0x1){const _0x5e2dbb=_0x56a850[_0x2dcf12(0x126)](_0x246bc3=>(_0x246bc3[_0x2dcf12(0x10f)]??_0x246bc3[_0x2dcf12(0x129)]??'?')+'('+_0x246bc3[_0x2dcf12(0xe7)]+')')[_0x2dcf12(0x117)](',\x20');throw CliErrors[_0x2dcf12(0x110)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0xbc0f5e+_0x2dcf12(0xf6)+_0x5e2dbb+'.',_0x18e8fe);}const _0x20c8db=_0x56a850[0x0];return{'userId':_0x20c8db['userId'],'username':_0x20c8db['username']??String(_0x20c8db[_0x2dcf12(0xe7)]),'nickname':_0x20c8db[_0x2dcf12(0x10f)],'matchedBy':'name'};}function a194_0x4732(_0x513828,_0x8011af){_0x513828=_0x513828-0xe5;const _0x4d1b08=a194_0x4d1b();let _0x473294=_0x4d1b08[_0x513828];return _0x473294;}export const CREATE_USER_ROLE_PATH=a194_0x5a2978(0x11a);export const DELETE_USER_ROLE_PATH=a194_0x5a2978(0x131);function a194_0x4d1b(){const _0x3c754f=['299770bvkJBR','number','expect-user-count','Anti-drift\x20check\x20failed:\x20expected\x20','Removed\x20','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','No\x20tenant\x20member\x20matches\x20\x22','filter','POST','map','Pass\x20--role\x20<id|name>.','DEV','username','permitCount','authRequired','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','string','Role\x20id\x20or\x20exact\x20role\x20name','Check\x20the\x20nickname/username.\x20','roleName','/smartapi/permit/user-role/delete','\x22\x20is\x20ambiguous\x20(ids:\x20','User\x20','totalCount','\x20is\x20already\x20a\x20member\x20of\x20role\x20','\x20is\x20not\x20a\x20member\x20of\x20role\x20','userId','Missing\x20user\x20reference.','Cannot\x20','remark','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','156798CKlWUS','toLowerCase','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','3076374jSDtTj','trim','472HJLiHb','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','CUSTOM','name','includes','\x22:\x20','find','838bbVMaU','Role\x20name\x20\x22','userCount','roleType','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','flag','2818rcGalF','646104DpyARl','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','dryRun','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','44bFngwj','44453376rcyEfz','Optional\x20role\x20remark/description','OWNER','flagMissing','str','71701XtizHA','Role\x20id\x20','push','Role\x20id\x20(from\x20`role\x20list`)','\x20members\x20of\x20the\x20OWNER\x20role.','appCode','nickname','validation','790HQFVCO','user-add','Missing\x20role\x20reference.',';\x20no\x20change.','\x20member(s)\x20but\x20role\x20has\x20','role','join','length','user','/smartapi/permit/user-role/create','expectUserCount','Pass\x20--user\x20<id|name>.'];a194_0x4d1b=function(){return _0x3c754f;};return a194_0x4d1b();}export function computeRoleUserMutation(_0x1627f6){const _0xc6618c=a194_0x5a2978,{operation:_0x1f0655,appCode:_0x2bf7d2,role:_0x387a68,relations:_0x18c989,user:_0x3a2b99}=_0x1627f6,_0x8e9333=[...new Set(_0x18c989[_0xc6618c(0x126)](_0x248729=>_0x248729[_0xc6618c(0xe7)]))],_0x2af19d=[];if(_0x1627f6[_0xc6618c(0x11b)]!==undefined&&_0x1627f6[_0xc6618c(0x11b)]!==_0x8e9333[_0xc6618c(0x118)])throw CliErrors[_0xc6618c(0x110)](_0xc6618c(0x120)+_0x1627f6[_0xc6618c(0x11b)]+_0xc6618c(0x115)+_0x8e9333[_0xc6618c(0x118)]+'.',_0xc6618c(0xeb));const _0x27a047=_0x8e9333[_0xc6618c(0xf5)](_0x3a2b99[_0xc6618c(0xe7)]),_0x5ac25f=_0x18c989[_0xc6618c(0x124)](_0x903374=>_0x903374[_0xc6618c(0xe7)]===_0x3a2b99[_0xc6618c(0xe7)])[_0xc6618c(0x126)](_0x2760b4=>_0x2760b4['id']),_0x24a90a=_0x1f0655==='user-add'?!_0x27a047:_0x27a047;let _0x4bafa7=_0x8e9333;_0x1f0655===_0xc6618c(0x112)?_0x27a047?_0x2af19d['push'](_0xc6618c(0x133)+_0x3a2b99[_0xc6618c(0xe7)]+_0xc6618c(0xe5)+_0x387a68[_0xc6618c(0x130)]+_0xc6618c(0x114)):_0x4bafa7=[..._0x8e9333,_0x3a2b99[_0xc6618c(0xe7)]]:!_0x27a047?_0x2af19d[_0xc6618c(0x10b)](_0xc6618c(0x133)+_0x3a2b99[_0xc6618c(0xe7)]+_0xc6618c(0xe6)+_0x387a68['roleName']+_0xc6618c(0x114)):(_0x4bafa7=_0x8e9333[_0xc6618c(0x124)](_0xdb8920=>_0xdb8920!==_0x3a2b99[_0xc6618c(0xe7)]),_0x5ac25f[_0xc6618c(0x118)]>0x1&&_0x2af19d[_0xc6618c(0x10b)](_0xc6618c(0x121)+_0x5ac25f[_0xc6618c(0x118)]+'\x20duplicate\x20memberships\x20for\x20user\x20'+_0x3a2b99[_0xc6618c(0xe7)]+'.'));const _0x4a5878={'scope':'dev','operation':_0x1f0655,'selector':{'appCode':_0x2bf7d2,'roleId':_0x387a68['id'],'roleName':_0x387a68[_0xc6618c(0x130)],'userId':_0x3a2b99[_0xc6618c(0xe7)]},'before':{'userIds':_0x8e9333},'after':{'userIds':_0x4bafa7},'dryRun':_0x1627f6[_0xc6618c(0x101)],'backend':{'method':_0xc6618c(0x125),'path':_0x1f0655==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x2af19d};return{'mutation':_0x4a5878,'changed':_0x24a90a,'matchingRelationIds':_0x5ac25f};}export async function loadDevRoleRelations(_0x201710,_0x477355){const _0x4d4b76=a194_0x5a2978,_0x4a298b=0x64,_0x44bec6=[];for(let _0x592e6c=0x1;;_0x592e6c+=0x1){const {items:_0xfe0d7b,paging:_0x3267e8}=await listDevUserRoleRelations(_0x201710,{'roleId':_0x477355,'currentPage':_0x592e6c,'pageSize':_0x4a298b});_0x44bec6['push'](..._0xfe0d7b);if(_0xfe0d7b[_0x4d4b76(0x118)]<_0x4a298b||_0x3267e8&&_0x44bec6['length']>=_0x3267e8[_0x4d4b76(0x134)])return _0x44bec6;}}export function readRoleRef(_0x20f45c){const _0x12475c=a194_0x5a2978,_0x1ce6b0=_0x20f45c[_0x12475c(0x108)](_0x12475c(0x116))[_0x12475c(0xf0)]();if(!_0x1ce6b0)throw CliErrors[_0x12475c(0x107)](_0x12475c(0x116),'Pass\x20--role\x20<id|name>.');return _0x1ce6b0;}export async function prepareUserMutation(_0x224cfa,_0x41429,_0x5f4675){const _0x35ab40=a194_0x5a2978,_0x351798=readRoleRef(_0x224cfa),_0x4e8d7c=_0x224cfa[_0x35ab40(0x108)]('user')['trim']();if(!_0x4e8d7c)throw CliErrors['flagMissing'](_0x35ab40(0x119),_0x35ab40(0x11c));const _0x447037=_0x224cfa[_0x35ab40(0xfd)](_0x35ab40(0x11f)),_0x4e223f=_0x447037===undefined||_0x447037===null?undefined:Number(_0x447037),_0x1a0402=await resolveRoleRef(_0x224cfa[_0x35ab40(0x10e)],_0x351798);if(_0x1a0402[_0x35ab40(0xfb)]==='OWNER')throw CliErrors['validation']('Cannot\x20'+_0x41429+_0x35ab40(0x10d),'Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x3b0080=await resolveUserRef(_0x4e8d7c),_0x5f24da=await loadDevRoleRelations(_0x224cfa[_0x35ab40(0x10e)],_0x1a0402['id']);return{...computeRoleUserMutation({'operation':_0x41429,'appCode':_0x224cfa[_0x35ab40(0x10e)],'role':_0x1a0402,'relations':_0x5f24da,'user':{'userId':_0x3b0080['userId'],'username':_0x3b0080[_0x35ab40(0x129)],'nickname':_0x3b0080[_0x35ab40(0x10f)]},'dryRun':_0x5f4675,..._0x4e223f!==undefined?{'expectUserCount':_0x4e223f}:{}}),'role':_0x1a0402,'user':_0x3b0080};}
@@ -1 +1 @@
1
- const a195_0x57ef1c=a195_0x2545;(function(_0x5a5470,_0x2172c6){const _0x5030b3=a195_0x2545,_0x160230=_0x5a5470();while(!![]){try{const _0x41fe70=parseInt(_0x5030b3(0x1f5))/0x1+-parseInt(_0x5030b3(0x1f7))/0x2*(parseInt(_0x5030b3(0x1fc))/0x3)+-parseInt(_0x5030b3(0x1f3))/0x4+-parseInt(_0x5030b3(0x1fe))/0x5*(parseInt(_0x5030b3(0x1ea))/0x6)+-parseInt(_0x5030b3(0x1e7))/0x7+-parseInt(_0x5030b3(0x1e4))/0x8*(-parseInt(_0x5030b3(0x1e9))/0x9)+parseInt(_0x5030b3(0x200))/0xa;if(_0x41fe70===_0x2172c6)break;else _0x160230['push'](_0x160230['shift']());}catch(_0x590e4d){_0x160230['push'](_0x160230['shift']());}}}(a195_0x4022,0x4bd59));import{updateAppRole}from'../../core/api-client.js';function a195_0x4022(){const _0x20b9cf=['2984965mHPCsD','num','20101920FJPFLR','616JgQNrP','Nothing\x20to\x20update.','string','3462564ouYjtE','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','19746FfXKTQ','6wzWbSJ','dev','Updated\x20role\x20','update','POST','appCode','roleName','role','validation','1579144sQJsRu','remark','151707pTBIhH','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','34438IaxOSo','--name\x20cannot\x20be\x20empty.','/smartapi/permit/role/update','write','length','93CjtlTN','New\x20role\x20name'];a195_0x4022=function(){return _0x20b9cf;};return a195_0x4022();}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=a195_0x57ef1c(0x1f9);function readPatch(_0xa73ef3){const _0x52c4c2=a195_0x57ef1c,_0xbf97fd=_0xa73ef3['flag']('name'),_0x4ee9e9=_0xa73ef3['flag']('remark'),_0x469b9a={};if(_0xbf97fd!==undefined&&_0xbf97fd!==null){const _0xdddde8=String(_0xbf97fd)['trim']();if(!_0xdddde8)throw CliErrors[_0x52c4c2(0x1f2)](_0x52c4c2(0x1f8));if(_0xdddde8[_0x52c4c2(0x1fb)]>0x40)throw CliErrors[_0x52c4c2(0x1f2)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0x469b9a[_0x52c4c2(0x1f0)]=_0xdddde8;}_0x4ee9e9!==undefined&&_0x4ee9e9!==null&&(_0x469b9a[_0x52c4c2(0x1f4)]=String(_0x4ee9e9));if(_0x469b9a[_0x52c4c2(0x1f0)]===undefined&&_0x469b9a[_0x52c4c2(0x1f4)]===undefined)throw CliErrors['validation'](_0x52c4c2(0x1e5),_0x52c4c2(0x1e8));return _0x469b9a;}function a195_0x2545(_0x4f1418,_0x5a9b76){_0x4f1418=_0x4f1418-0x1e4;const _0x40220a=a195_0x4022();let _0x2545bd=_0x40220a[_0x4f1418];return _0x2545bd;}export const roleUpdate={'service':a195_0x57ef1c(0x1f1),'command':'update','description':a195_0x57ef1c(0x1f6),'risk':a195_0x57ef1c(0x1fa),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':'name','type':a195_0x57ef1c(0x1e6),'required':![],'description':a195_0x57ef1c(0x1fd)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d71f2){readPatch(_0x3d71f2);},async 'dryRun'(_0x32f79d){const _0x11a111=a195_0x57ef1c,_0x3ddcf3=_0x32f79d['num']('id'),_0x230aa3=readPatch(_0x32f79d),_0x2fb8c4=await getRoleById(_0x32f79d[_0x11a111(0x1ef)],_0x3ddcf3);return assertCustomRole(_0x2fb8c4,_0x11a111(0x1ed)),asDryRunResult({'scope':_0x11a111(0x1eb),'operation':'update','selector':{'appCode':_0x32f79d[_0x11a111(0x1ef)],'roleId':_0x3ddcf3,'roleName':_0x2fb8c4[_0x11a111(0x1f0)]},'before':projectRole(_0x2fb8c4),'after':projectRole({..._0x2fb8c4,..._0x230aa3[_0x11a111(0x1f0)]!==undefined?{'roleName':_0x230aa3[_0x11a111(0x1f0)]}:{},..._0x230aa3[_0x11a111(0x1f4)]!==undefined?{'remark':_0x230aa3[_0x11a111(0x1f4)]}:{}}),'dryRun':!![],'backend':{'method':_0x11a111(0x1ee),'path':UPDATE_PATH},'warnings':[]},{'method':_0x11a111(0x1ee),'url':UPDATE_PATH});},async 'execute'(_0x577138){const _0x3b9a41=a195_0x57ef1c,_0xe0186=_0x577138[_0x3b9a41(0x1ff)]('id'),_0x19c361=readPatch(_0x577138),_0x43fdfc=await getRoleById(_0x577138['appCode'],_0xe0186);assertCustomRole(_0x43fdfc,_0x3b9a41(0x1ed)),await updateAppRole({'id':_0xe0186,'appCode':_0x577138[_0x3b9a41(0x1ef)],..._0x19c361[_0x3b9a41(0x1f0)]!==undefined?{'roleName':_0x19c361[_0x3b9a41(0x1f0)]}:{},..._0x19c361[_0x3b9a41(0x1f4)]!==undefined?{'remark':_0x19c361['remark']}:{}});const _0x2cad78=await getRoleById(_0x577138[_0x3b9a41(0x1ef)],_0xe0186);return{'ok':!![],'data':{'scope':_0x3b9a41(0x1eb),'operation':_0x3b9a41(0x1ed),'selector':{'appCode':_0x577138[_0x3b9a41(0x1ef)],'roleId':_0xe0186,'roleName':_0x2cad78[_0x3b9a41(0x1f0)]},'before':projectRole(_0x43fdfc),'after':projectRole(_0x2cad78),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x3b9a41(0x1ec)+_0x2cad78[_0x3b9a41(0x1f0)]+'\x20(id='+_0xe0186+')'};}};
1
+ const a195_0x59dd3a=a195_0xb576;function a195_0x5299(){const _0x876593=['15594650xmaxyi','5wuNHMs','2072744ndFoeL','165516oHkSph','dev','Updated\x20role\x20','Nothing\x20to\x20update.','validation','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','appCode','flag','update','length','New\x20role\x20name','--name\x20cannot\x20be\x20empty.','140QjjSap','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','trim','205844SKitDF','num','role','remark','roleName','101800GSSsdB','778894wkPoAF','POST','name','1684248FxMUOA','/smartapi/permit/role/update','306SXwOTj','string'];a195_0x5299=function(){return _0x876593;};return a195_0x5299();}(function(_0x124718,_0x7ed20d){const _0x4e944b=a195_0xb576,_0x99681=_0x124718();while(!![]){try{const _0x44c91b=parseInt(_0x4e944b(0xd5))/0x1+-parseInt(_0x4e944b(0xdb))/0x2+-parseInt(_0x4e944b(0xde))/0x3+parseInt(_0x4e944b(0xc5))/0x4*(-parseInt(_0x4e944b(0xc4))/0x5)+parseInt(_0x4e944b(0xc6))/0x6*(parseInt(_0x4e944b(0xd2))/0x7)+parseInt(_0x4e944b(0xda))/0x8*(-parseInt(_0x4e944b(0xe0))/0x9)+parseInt(_0x4e944b(0xc3))/0xa;if(_0x44c91b===_0x7ed20d)break;else _0x99681['push'](_0x99681['shift']());}catch(_0x237692){_0x99681['push'](_0x99681['shift']());}}}(a195_0x5299,0x65662));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';function a195_0xb576(_0x24a3fc,_0x289253){_0x24a3fc=_0x24a3fc-0xc2;const _0x529951=a195_0x5299();let _0xb576b0=_0x529951[_0x24a3fc];return _0xb576b0;}const UPDATE_PATH=a195_0x59dd3a(0xdf);function readPatch(_0x2de85b){const _0x4ad3d6=a195_0x59dd3a,_0x35b395=_0x2de85b[_0x4ad3d6(0xcd)](_0x4ad3d6(0xdd)),_0x86200f=_0x2de85b[_0x4ad3d6(0xcd)]('remark'),_0x2915e4={};if(_0x35b395!==undefined&&_0x35b395!==null){const _0x3fb9da=String(_0x35b395)[_0x4ad3d6(0xd4)]();if(!_0x3fb9da)throw CliErrors[_0x4ad3d6(0xca)](_0x4ad3d6(0xd1));if(_0x3fb9da[_0x4ad3d6(0xcf)]>0x40)throw CliErrors[_0x4ad3d6(0xca)](_0x4ad3d6(0xcb));_0x2915e4[_0x4ad3d6(0xd9)]=_0x3fb9da;}_0x86200f!==undefined&&_0x86200f!==null&&(_0x2915e4[_0x4ad3d6(0xd8)]=String(_0x86200f));if(_0x2915e4[_0x4ad3d6(0xd9)]===undefined&&_0x2915e4[_0x4ad3d6(0xd8)]===undefined)throw CliErrors[_0x4ad3d6(0xca)](_0x4ad3d6(0xc9),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x2915e4;}export const roleUpdate={'service':a195_0x59dd3a(0xd7),'command':a195_0x59dd3a(0xce),'description':a195_0x59dd3a(0xd3),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a195_0x59dd3a(0xdd),'type':a195_0x59dd3a(0xc2),'required':![],'description':a195_0x59dd3a(0xd0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f7e61){readPatch(_0x1f7e61);},async 'dryRun'(_0x9e6e24){const _0x60aa55=a195_0x59dd3a,_0x1c6e2a=_0x9e6e24[_0x60aa55(0xd6)]('id'),_0x5c9e8b=readPatch(_0x9e6e24),_0x30cf26=await getRoleById(_0x9e6e24[_0x60aa55(0xcc)],_0x1c6e2a);return assertCustomRole(_0x30cf26,_0x60aa55(0xce)),asDryRunResult({'scope':_0x60aa55(0xc7),'operation':'update','selector':{'appCode':_0x9e6e24[_0x60aa55(0xcc)],'roleId':_0x1c6e2a,'roleName':_0x30cf26[_0x60aa55(0xd9)]},'before':projectRole(_0x30cf26),'after':projectRole({..._0x30cf26,..._0x5c9e8b['roleName']!==undefined?{'roleName':_0x5c9e8b[_0x60aa55(0xd9)]}:{},..._0x5c9e8b[_0x60aa55(0xd8)]!==undefined?{'remark':_0x5c9e8b[_0x60aa55(0xd8)]}:{}}),'dryRun':!![],'backend':{'method':_0x60aa55(0xdc),'path':UPDATE_PATH},'warnings':[]},{'method':_0x60aa55(0xdc),'url':UPDATE_PATH});},async 'execute'(_0x527549){const _0x59fdd3=a195_0x59dd3a,_0x59475e=_0x527549[_0x59fdd3(0xd6)]('id'),_0x616f52=readPatch(_0x527549),_0x4aeb2b=await getRoleById(_0x527549[_0x59fdd3(0xcc)],_0x59475e);assertCustomRole(_0x4aeb2b,_0x59fdd3(0xce)),await updateAppRole({'id':_0x59475e,'appCode':_0x527549['appCode'],..._0x616f52[_0x59fdd3(0xd9)]!==undefined?{'roleName':_0x616f52[_0x59fdd3(0xd9)]}:{},..._0x616f52[_0x59fdd3(0xd8)]!==undefined?{'remark':_0x616f52[_0x59fdd3(0xd8)]}:{}});const _0x1c5dcd=await getRoleById(_0x527549[_0x59fdd3(0xcc)],_0x59475e);return{'ok':!![],'data':{'scope':_0x59fdd3(0xc7),'operation':_0x59fdd3(0xce),'selector':{'appCode':_0x527549[_0x59fdd3(0xcc)],'roleId':_0x59475e,'roleName':_0x1c5dcd[_0x59fdd3(0xd9)]},'before':projectRole(_0x4aeb2b),'after':projectRole(_0x1c5dcd),'dryRun':![],'backend':{'method':_0x59fdd3(0xdc),'path':UPDATE_PATH},'warnings':[]},'message':_0x59fdd3(0xc8)+_0x1c5dcd[_0x59fdd3(0xd9)]+'\x20(id='+_0x59475e+')'};}};
@@ -1 +1 @@
1
- function a196_0x3673(_0x30030f,_0x1d5799){_0x30030f=_0x30030f-0x9a;const _0x7ec589=a196_0x7ec5();let _0x36736a=_0x7ec589[_0x30030f];return _0x36736a;}const a196_0x58a552=a196_0x3673;(function(_0x3cf743,_0x3bd05b){const _0xa1751f=a196_0x3673,_0x420544=_0x3cf743();while(!![]){try{const _0x3c77a1=-parseInt(_0xa1751f(0xb1))/0x1*(-parseInt(_0xa1751f(0x9a))/0x2)+parseInt(_0xa1751f(0xa8))/0x3+parseInt(_0xa1751f(0x9d))/0x4+parseInt(_0xa1751f(0x9b))/0x5+parseInt(_0xa1751f(0xad))/0x6+parseInt(_0xa1751f(0xa3))/0x7*(-parseInt(_0xa1751f(0xa4))/0x8)+-parseInt(_0xa1751f(0xa9))/0x9;if(_0x3c77a1===_0x3bd05b)break;else _0x420544['push'](_0x420544['shift']());}catch(_0x6e520f){_0x420544['push'](_0x420544['shift']());}}}(a196_0x7ec5,0x235df));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a196_0x7ec5(){const _0x26410e=['1101702sPgTpJ','Added\x20user\x20','appCode','role','1MLLuXP','312178CRfBPd','868430Otdbcv','POST','571800kSVFZW','No\x20change:\x20user\x20','roleName','roleType','user-add','\x20to\x20role\x20','46193JYmrKo','152bbSmNp','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','roleId','selector','809817AZRzXe','5904333oxqYNq','high-risk-write','userId','username'];a196_0x7ec5=function(){return _0x26410e;};return a196_0x7ec5();}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':a196_0x58a552(0xb0),'command':a196_0x58a552(0xa1),'description':a196_0x58a552(0xa5),'risk':a196_0x58a552(0xaa),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x7cd13f){const _0x3d62c0=a196_0x58a552,{mutation:_0x2afa74}=await prepareUserMutation(_0x7cd13f,'user-add',!![]);return asDryRunResult(_0x2afa74,{'method':_0x3d62c0(0x9c),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x10a145){const _0x3b91f4=a196_0x58a552,{mutation:_0x11c146,changed:_0x384f26,role:_0x1c305e,user:_0x53d44e}=await prepareUserMutation(_0x10a145,_0x3b91f4(0xa1),![]);return _0x384f26&&await createDevUserRole({'appCode':_0x10a145[_0x3b91f4(0xaf)],'userId':_0x53d44e[_0x3b91f4(0xab)],'username':_0x53d44e[_0x3b91f4(0xac)],'roleType':_0x1c305e[_0x3b91f4(0xa0)],'roleId':_0x11c146[_0x3b91f4(0xa7)][_0x3b91f4(0xa6)]}),{'ok':!![],'data':_0x11c146,'message':_0x384f26?_0x3b91f4(0xae)+_0x11c146[_0x3b91f4(0xa7)][_0x3b91f4(0xab)]+_0x3b91f4(0xa2)+_0x11c146[_0x3b91f4(0xa7)]['roleName']:_0x3b91f4(0x9e)+_0x11c146['selector'][_0x3b91f4(0xab)]+'\x20already\x20in\x20role\x20'+_0x11c146[_0x3b91f4(0xa7)][_0x3b91f4(0x9f)]};}};
1
+ const a196_0x1007f5=a196_0x3f3d;function a196_0x1bf5(){const _0x4ec0b5=['high-risk-write','10sKpZbi','POST','1960620DJkqBH','2921868UCmEiY','No\x20change:\x20user\x20','userId','610SunKAj','selector','32dfhdvb','Added\x20user\x20','589714lCmpiT','33884ZOWBjo','roleName','roleType','27201229WMnpkT','12pEgLTy','username','\x20already\x20in\x20role\x20','\x20to\x20role\x20','703535zjRULL','roleId','user-add','appCode','48387ZaWrCX'];a196_0x1bf5=function(){return _0x4ec0b5;};return a196_0x1bf5();}(function(_0x3927cf,_0x120b49){const _0x568549=a196_0x3f3d,_0x1c5dc8=_0x3927cf();while(!![]){try{const _0x3c0ae9=-parseInt(_0x568549(0x11b))/0x1+parseInt(_0x568549(0x12c))/0x2+-parseInt(_0x568549(0x128))/0x3+-parseInt(_0x568549(0x11c))/0x4*(parseInt(_0x568549(0x130))/0x5)+-parseInt(_0x568549(0x120))/0x6*(-parseInt(_0x568549(0x124))/0x7)+parseInt(_0x568549(0x119))/0x8*(-parseInt(_0x568549(0x12d))/0x9)+-parseInt(_0x568549(0x12a))/0xa*(-parseInt(_0x568549(0x11f))/0xb);if(_0x3c0ae9===_0x120b49)break;else _0x1c5dc8['push'](_0x1c5dc8['shift']());}catch(_0xdbd9c7){_0x1c5dc8['push'](_0x1c5dc8['shift']());}}}(a196_0x1bf5,0xaedd6));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';function a196_0x3f3d(_0x37ea2d,_0x9a970d){_0x37ea2d=_0x37ea2d-0x118;const _0x1bf5b2=a196_0x1bf5();let _0x3f3d58=_0x1bf5b2[_0x37ea2d];return _0x3f3d58;}export const roleUserAdd={'service':'role','command':a196_0x1007f5(0x126),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a196_0x1007f5(0x129),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xa02822){const _0x49b3db=a196_0x1007f5,{mutation:_0x3088e7}=await prepareUserMutation(_0xa02822,_0x49b3db(0x126),!![]);return asDryRunResult(_0x3088e7,{'method':_0x49b3db(0x12b),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x452ab6){const _0x4e60be=a196_0x1007f5,{mutation:_0x46b67a,changed:_0x1fdc9e,role:_0x3ed61e,user:_0xe6126c}=await prepareUserMutation(_0x452ab6,'user-add',![]);return _0x1fdc9e&&await createDevUserRole({'appCode':_0x452ab6[_0x4e60be(0x127)],'userId':_0xe6126c[_0x4e60be(0x12f)],'username':_0xe6126c[_0x4e60be(0x121)],'roleType':_0x3ed61e[_0x4e60be(0x11e)],'roleId':_0x46b67a['selector'][_0x4e60be(0x125)]}),{'ok':!![],'data':_0x46b67a,'message':_0x1fdc9e?_0x4e60be(0x11a)+_0x46b67a[_0x4e60be(0x118)]['userId']+_0x4e60be(0x123)+_0x46b67a[_0x4e60be(0x118)][_0x4e60be(0x11d)]:_0x4e60be(0x12e)+_0x46b67a[_0x4e60be(0x118)]['userId']+_0x4e60be(0x122)+_0x46b67a[_0x4e60be(0x118)]['roleName']};}};
@@ -1 +1 @@
1
- function a197_0x1247(){const _0x2a3a4f=['Removed\x20user\x20','high-risk-write','1514mgOcoW','1116kSqZcg','No\x20change:\x20user\x20','user-remove','roleName','1026ZkBfiZ','712257gDfzlu','POST','1108430KJRyLY','88acHAeJ','104672gWQFUq','38085sVnnOS','userId','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','20AMFAhN','role','5551147UxucfJ','selector','36958392OdgjuU','1603RZAYMg'];a197_0x1247=function(){return _0x2a3a4f;};return a197_0x1247();}function a197_0x1b33(_0x4ea181,_0x10c566){_0x4ea181=_0x4ea181-0xba;const _0x12472a=a197_0x1247();let _0x1b3361=_0x12472a[_0x4ea181];return _0x1b3361;}const a197_0x59273f=a197_0x1b33;(function(_0x482ca0,_0x55ac9d){const _0x2f3a4d=a197_0x1b33,_0x47a709=_0x482ca0();while(!![]){try{const _0x437724=parseInt(_0x2f3a4d(0xc8))/0x1*(parseInt(_0x2f3a4d(0xcb))/0x2)+parseInt(_0x2f3a4d(0xbb))/0x3*(parseInt(_0x2f3a4d(0xc3))/0x4)+-parseInt(_0x2f3a4d(0xc0))/0x5*(parseInt(_0x2f3a4d(0xba))/0x6)+-parseInt(_0x2f3a4d(0xc5))/0x7+parseInt(_0x2f3a4d(0xbf))/0x8*(-parseInt(_0x2f3a4d(0xcc))/0x9)+parseInt(_0x2f3a4d(0xbd))/0xa*(-parseInt(_0x2f3a4d(0xbe))/0xb)+parseInt(_0x2f3a4d(0xc7))/0xc;if(_0x437724===_0x55ac9d)break;else _0x47a709['push'](_0x47a709['shift']());}catch(_0x21e225){_0x47a709['push'](_0x47a709['shift']());}}}(a197_0x1247,0xd5ce0));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':a197_0x59273f(0xc4),'command':a197_0x59273f(0xce),'description':a197_0x59273f(0xc2),'risk':a197_0x59273f(0xca),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x554367){const _0x3767d5=a197_0x59273f,{mutation:_0x17193f}=await prepareUserMutation(_0x554367,_0x3767d5(0xce),!![]);return asDryRunResult(_0x17193f,{'method':_0x3767d5(0xbc),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x11714a){const _0x347f4d=a197_0x59273f,{matchingRelationIds:_0x135b54,mutation:_0x546822,changed:_0x16b536}=await prepareUserMutation(_0x11714a,_0x347f4d(0xce),![]);if(_0x16b536)for(const _0x4a920d of _0x135b54){await deleteDevUserRole(_0x4a920d);}return{'ok':!![],'data':_0x546822,'message':_0x16b536?_0x347f4d(0xc9)+_0x546822['selector'][_0x347f4d(0xc1)]+'\x20from\x20role\x20'+_0x546822[_0x347f4d(0xc6)][_0x347f4d(0xcf)]:_0x347f4d(0xcd)+_0x546822[_0x347f4d(0xc6)][_0x347f4d(0xc1)]+'\x20not\x20in\x20role\x20'+_0x546822[_0x347f4d(0xc6)][_0x347f4d(0xcf)]};}};
1
+ const a197_0x16ef4d=a197_0x2fdc;(function(_0x5e040a,_0x431ad2){const _0x270efe=a197_0x2fdc,_0x38d560=_0x5e040a();while(!![]){try{const _0x22b9b3=-parseInt(_0x270efe(0x154))/0x1*(parseInt(_0x270efe(0x153))/0x2)+-parseInt(_0x270efe(0x147))/0x3+parseInt(_0x270efe(0x158))/0x4+-parseInt(_0x270efe(0x152))/0x5+-parseInt(_0x270efe(0x14f))/0x6+-parseInt(_0x270efe(0x150))/0x7+parseInt(_0x270efe(0x144))/0x8*(parseInt(_0x270efe(0x149))/0x9);if(_0x22b9b3===_0x431ad2)break;else _0x38d560['push'](_0x38d560['shift']());}catch(_0x47c7f1){_0x38d560['push'](_0x38d560['shift']());}}}(a197_0x2ea3,0x8e20a));import{deleteDevUserRole}from'../../core/api-client.js';function a197_0x2fdc(_0x73789d,_0xb042b0){_0x73789d=_0x73789d-0x144;const _0x2ea33b=a197_0x2ea3();let _0x2fdc2b=_0x2ea33b[_0x73789d];return _0x2fdc2b;}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':a197_0x16ef4d(0x145),'command':'user-remove','description':a197_0x16ef4d(0x14b),'risk':a197_0x16ef4d(0x14a),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x14f69f){const _0x1ad7dc=a197_0x16ef4d,{mutation:_0x41ea27}=await prepareUserMutation(_0x14f69f,_0x1ad7dc(0x148),!![]);return asDryRunResult(_0x41ea27,{'method':_0x1ad7dc(0x157),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0xc62052){const _0x4e5e90=a197_0x16ef4d,{matchingRelationIds:_0x588549,mutation:_0x349471,changed:_0x6e3616}=await prepareUserMutation(_0xc62052,'user-remove',![]);if(_0x6e3616)for(const _0x44db97 of _0x588549){await deleteDevUserRole(_0x44db97);}return{'ok':!![],'data':_0x349471,'message':_0x6e3616?_0x4e5e90(0x14d)+_0x349471[_0x4e5e90(0x146)][_0x4e5e90(0x156)]+_0x4e5e90(0x14e)+_0x349471[_0x4e5e90(0x146)][_0x4e5e90(0x155)]:_0x4e5e90(0x151)+_0x349471[_0x4e5e90(0x146)]['userId']+_0x4e5e90(0x14c)+_0x349471['selector'][_0x4e5e90(0x155)]};}};function a197_0x2ea3(){const _0x57b0a8=['Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','\x20not\x20in\x20role\x20','Removed\x20user\x20','\x20from\x20role\x20','2980278tbEUwo','6415899msWCfb','No\x20change:\x20user\x20','4682265QserEo','44zlNSmR','3357AfaMnr','roleName','userId','POST','2430216tJCnti','26919760VVzUpU','role','selector','2900379UsQDrX','user-remove','9BzEPMk','high-risk-write'];a197_0x2ea3=function(){return _0x57b0a8;};return a197_0x2ea3();}
@@ -1 +1 @@
1
- function a198_0xa77f(){const _0x1ea0d4=['matchedBy','\x22\x20→\x20userId\x20','2517790rdcRgH','392EWCsSk','name','user-resolve','flagMissing','1269676jBaZwY','Resolved\x20\x22','Pass\x20--name\x20<nickname|username>.','read','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','1175904ubrpJJ','role','10496502fLhyVB','username','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','trim','1351984DoRGtK','9289aSAiCg','3823296oZlexu','str','userId','25IookBG'];a198_0xa77f=function(){return _0x1ea0d4;};return a198_0xa77f();}const a198_0x37c99c=a198_0x58d2;(function(_0x4809e4,_0x54b3f6){const _0x5c3f06=a198_0x58d2,_0x1cda5a=_0x4809e4();while(!![]){try{const _0xb3c46f=parseInt(_0x5c3f06(0x102))/0x1+parseInt(_0x5c3f06(0x10a))/0x2+parseInt(_0x5c3f06(0xfc))/0x3+-parseInt(_0x5c3f06(0xf7))/0x4*(parseInt(_0x5c3f06(0x107))/0x5)+parseInt(_0x5c3f06(0x104))/0x6+parseInt(_0x5c3f06(0x103))/0x7*(parseInt(_0x5c3f06(0x10b))/0x8)+-parseInt(_0x5c3f06(0xfe))/0x9;if(_0xb3c46f===_0x54b3f6)break;else _0x1cda5a['push'](_0x1cda5a['shift']());}catch(_0x4fc25a){_0x1cda5a['push'](_0x1cda5a['shift']());}}}(a198_0xa77f,0xe85a1));function a198_0x58d2(_0x30adb5,_0x4a03df){_0x30adb5=_0x30adb5-0xf5;const _0xa77ff0=a198_0xa77f();let _0x58d210=_0xa77ff0[_0x30adb5];return _0x58d210;}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':a198_0x37c99c(0xfd),'command':a198_0x37c99c(0xf5),'description':a198_0x37c99c(0x100),'risk':a198_0x37c99c(0xfa),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2a6d79){const _0x10e01d=a198_0x37c99c;if(!_0x2a6d79[_0x10e01d(0x105)](_0x10e01d(0x10c))['trim']())throw CliErrors[_0x10e01d(0xf6)](_0x10e01d(0x10c),_0x10e01d(0xf9));},async 'execute'(_0x5d77ed){const _0x333b66=a198_0x37c99c,_0xf8bb02=_0x5d77ed[_0x333b66(0x105)](_0x333b66(0x10c))[_0x333b66(0x101)](),_0x69fe6c=await resolveUserRef(_0xf8bb02,_0x333b66(0xfb));return{'ok':!![],'data':{'user':{'userId':_0x69fe6c[_0x333b66(0x106)],'username':_0x69fe6c[_0x333b66(0xff)],'nickname':_0x69fe6c['nickname'],'matchedBy':_0x69fe6c[_0x333b66(0x108)]}},'message':_0x333b66(0xf8)+_0xf8bb02+_0x333b66(0x109)+_0x69fe6c[_0x333b66(0x106)]};}};
1
+ const a198_0x712efb=a198_0x3aae;(function(_0x375069,_0x4a6d27){const _0x33f476=a198_0x3aae,_0x16d07a=_0x375069();while(!![]){try{const _0x25a131=-parseInt(_0x33f476(0x189))/0x1*(-parseInt(_0x33f476(0x185))/0x2)+parseInt(_0x33f476(0x199))/0x3+parseInt(_0x33f476(0x194))/0x4+-parseInt(_0x33f476(0x191))/0x5*(parseInt(_0x33f476(0x188))/0x6)+-parseInt(_0x33f476(0x18b))/0x7+-parseInt(_0x33f476(0x18d))/0x8*(parseInt(_0x33f476(0x197))/0x9)+parseInt(_0x33f476(0x18f))/0xa;if(_0x25a131===_0x4a6d27)break;else _0x16d07a['push'](_0x16d07a['shift']());}catch(_0x4b6c74){_0x16d07a['push'](_0x16d07a['shift']());}}}(a198_0x54b1,0x2271b));function a198_0x3aae(_0x7ddf09,_0x55e94e){_0x7ddf09=_0x7ddf09-0x184;const _0x54b141=a198_0x54b1();let _0x3aae84=_0x54b141[_0x7ddf09];return _0x3aae84;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a198_0x54b1(){const _0x1827cf=['userId','46592kgjtSV','nickname','3984600nVJAcT','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','10kLeMID','str','Resolved\x20\x22','173740zEJsIv','trim','flagMissing','369bDDGTH','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','91830vCrQdI','\x22\x20→\x20userId\x20','118vHtAuc','user-resolve','name','139014fhToSj','3042eyjXbr','Pass\x20--name\x20<nickname|username>.','1580446QkcGIi'];a198_0x54b1=function(){return _0x1827cf;};return a198_0x54b1();}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':'role','command':a198_0x712efb(0x186),'description':a198_0x712efb(0x190),'risk':'read','flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x27d4a8){const _0x46e6c4=a198_0x712efb;if(!_0x27d4a8[_0x46e6c4(0x192)](_0x46e6c4(0x187))[_0x46e6c4(0x195)]())throw CliErrors[_0x46e6c4(0x196)](_0x46e6c4(0x187),_0x46e6c4(0x18a));},async 'execute'(_0x10b78c){const _0x2291b8=a198_0x712efb,_0x1888a5=_0x10b78c['str'](_0x2291b8(0x187))[_0x2291b8(0x195)](),_0x55c5a7=await resolveUserRef(_0x1888a5,_0x2291b8(0x198));return{'ok':!![],'data':{'user':{'userId':_0x55c5a7['userId'],'username':_0x55c5a7['username'],'nickname':_0x55c5a7[_0x2291b8(0x18e)],'matchedBy':_0x55c5a7['matchedBy']}},'message':_0x2291b8(0x193)+_0x1888a5+_0x2291b8(0x184)+_0x55c5a7[_0x2291b8(0x18c)]};}};
@@ -1 +1 @@
1
- const a199_0x58a2a5=a199_0x4cd3;function a199_0x4cd3(_0x1be8ec,_0x57be68){_0x1be8ec=_0x1be8ec-0x189;const _0x4109f4=a199_0x4109();let _0x4cd383=_0x4109f4[_0x1be8ec];return _0x4cd383;}function a199_0x4109(){const _0x2a1fb2=['2GoFavV','\x20--file\x20<path>\x20--dry-run`.','\x20for\x20','14040342YERMah','10429140mMsXpP','rule','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','8ySZLdD','3952953NlxyfV','get','1124613UPJead','appCode','cookie','66603DNHqrf','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','content','read','1042315QoSZDX','7339464kCzFeI'];a199_0x4109=function(){return _0x2a1fb2;};return a199_0x4109();}(function(_0x595e78,_0xd2fec7){const _0x3c7991=a199_0x4cd3,_0x26b23e=_0x595e78();while(!![]){try{const _0x2e6bd3=parseInt(_0x3c7991(0x18d))/0x1*(parseInt(_0x3c7991(0x193))/0x2)+-parseInt(_0x3c7991(0x19b))/0x3+parseInt(_0x3c7991(0x19a))/0x4*(-parseInt(_0x3c7991(0x191))/0x5)+parseInt(_0x3c7991(0x197))/0x6+parseInt(_0x3c7991(0x18a))/0x7+-parseInt(_0x3c7991(0x192))/0x8+parseInt(_0x3c7991(0x196))/0x9;if(_0x2e6bd3===_0xd2fec7)break;else _0x26b23e['push'](_0x26b23e['shift']());}catch(_0xdb350c){_0x26b23e['push'](_0x26b23e['shift']());}}}(a199_0x4109,0xd5408));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':a199_0x58a2a5(0x198),'command':a199_0x58a2a5(0x189),'description':a199_0x58a2a5(0x199),'risk':a199_0x58a2a5(0x190),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x2746f2){readAppRuleType(_0x2746f2);},async 'execute'(_0x5a853a){const _0x1dc2ae=a199_0x58a2a5,_0x9672a=readAppRuleType(_0x5a853a),_0x54d848=await getAppRule(_0x5a853a[_0x1dc2ae(0x18c)],{'appCode':_0x5a853a[_0x1dc2ae(0x18b)],'type':_0x9672a});if(!_0x54d848)throw appRuleError('app_rule_not_found',appRuleFileName(_0x9672a)+'\x20is\x20not\x20configured\x20for\x20app\x20'+_0x5a853a[_0x1dc2ae(0x18b)]+'.',_0x1dc2ae(0x18e)+_0x9672a+_0x1dc2ae(0x194));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x9672a,_0x54d848),'content':_0x54d848[_0x1dc2ae(0x18f)]}},'message':'Loaded\x20'+appRuleFileName(_0x9672a)+_0x1dc2ae(0x195)+_0x5a853a[_0x1dc2ae(0x18b)]};}};
1
+ const a199_0x162f87=a199_0x1733;(function(_0x44a8d1,_0x1ca483){const _0x2f3f23=a199_0x1733,_0x590556=_0x44a8d1();while(!![]){try{const _0x1c795e=-parseInt(_0x2f3f23(0x1f3))/0x1*(parseInt(_0x2f3f23(0x1fb))/0x2)+-parseInt(_0x2f3f23(0x1fa))/0x3+parseInt(_0x2f3f23(0x202))/0x4*(parseInt(_0x2f3f23(0x1f6))/0x5)+parseInt(_0x2f3f23(0x1fe))/0x6+-parseInt(_0x2f3f23(0x1f4))/0x7+parseInt(_0x2f3f23(0x1f9))/0x8+parseInt(_0x2f3f23(0x1fd))/0x9;if(_0x1c795e===_0x1ca483)break;else _0x590556['push'](_0x590556['shift']());}catch(_0x337f59){_0x590556['push'](_0x590556['shift']());}}}(a199_0x1eb8,0x80c64));function a199_0x1eb8(){const _0x107aaf=['get','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','rule','1986188OLtNgt','Loaded\x20','\x20for\x20','\x20is\x20not\x20configured\x20for\x20app\x20','169sccgSb','466333UcaQWV','read','5tABZBM','cookie','appCode','657768Yhjgkq','1478730yVTqHa','5218AAQeWB','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','6538995WfIcbe','1335522PfJKgN'];a199_0x1eb8=function(){return _0x107aaf;};return a199_0x1eb8();}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a199_0x1733(_0x3c230a,_0x4aec80){_0x3c230a=_0x3c230a-0x1f3;const _0x1eb878=a199_0x1eb8();let _0x1733c6=_0x1eb878[_0x3c230a];return _0x1733c6;}export const ruleGet={'service':a199_0x162f87(0x201),'command':a199_0x162f87(0x1ff),'description':a199_0x162f87(0x200),'risk':a199_0x162f87(0x1f5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x35d863){readAppRuleType(_0x35d863);},async 'execute'(_0x3e10b7){const _0x47b0b4=a199_0x162f87,_0x4108eb=readAppRuleType(_0x3e10b7),_0x257034=await getAppRule(_0x3e10b7[_0x47b0b4(0x1f7)],{'appCode':_0x3e10b7[_0x47b0b4(0x1f8)],'type':_0x4108eb});if(!_0x257034)throw appRuleError('app_rule_not_found',appRuleFileName(_0x4108eb)+_0x47b0b4(0x205)+_0x3e10b7[_0x47b0b4(0x1f8)]+'.',_0x47b0b4(0x1fc)+_0x4108eb+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x4108eb,_0x257034),'content':_0x257034['content']}},'message':_0x47b0b4(0x203)+appRuleFileName(_0x4108eb)+_0x47b0b4(0x204)+_0x3e10b7[_0x47b0b4(0x1f8)]};}};
@@ -1 +1 @@
1
- (function(_0x407408,_0x28a412){const _0x44afa0=a200_0xacd3,_0x4c07e8=_0x407408();while(!![]){try{const _0x379a9e=-parseInt(_0x44afa0(0x1cb))/0x1*(-parseInt(_0x44afa0(0x1c7))/0x2)+-parseInt(_0x44afa0(0x1c2))/0x3+-parseInt(_0x44afa0(0x1c4))/0x4+-parseInt(_0x44afa0(0x1ca))/0x5+-parseInt(_0x44afa0(0x1c8))/0x6*(-parseInt(_0x44afa0(0x1c5))/0x7)+parseInt(_0x44afa0(0x1c6))/0x8*(-parseInt(_0x44afa0(0x1c3))/0x9)+-parseInt(_0x44afa0(0x1cc))/0xa*(-parseInt(_0x44afa0(0x1c9))/0xb);if(_0x379a9e===_0x28a412)break;else _0x4c07e8['push'](_0x4c07e8['shift']());}catch(_0x555020){_0x4c07e8['push'](_0x4c07e8['shift']());}}}(a200_0x2f01,0x94eb6));function a200_0xacd3(_0x3cc47a,_0x1dcf4e){_0x3cc47a=_0x3cc47a-0x1c2;const _0x2f01e3=a200_0x2f01();let _0xacd3b6=_0x2f01e3[_0x3cc47a];return _0xacd3b6;}import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';function a200_0x2f01(){const _0x488634=['890kdHCJf','186456ZATApW','3663207sbHdNg','2929248ITyVhQ','254884zfIOXv','8LFqeXG','506eJXwot','48JShfLc','182523eOvnPP','1575565cHDxYd','1417aeJAYw'];a200_0x2f01=function(){return _0x488634;};return a200_0x2f01();}export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
1
+ (function(_0x3f8240,_0x229193){const _0x448644=a200_0x1742,_0x5d087a=_0x3f8240();while(!![]){try{const _0x1b4b89=-parseInt(_0x448644(0x18c))/0x1+-parseInt(_0x448644(0x18f))/0x2*(-parseInt(_0x448644(0x191))/0x3)+parseInt(_0x448644(0x190))/0x4+-parseInt(_0x448644(0x18b))/0x5*(-parseInt(_0x448644(0x188))/0x6)+parseInt(_0x448644(0x189))/0x7+parseInt(_0x448644(0x18e))/0x8*(parseInt(_0x448644(0x18a))/0x9)+parseInt(_0x448644(0x18d))/0xa*(-parseInt(_0x448644(0x192))/0xb);if(_0x1b4b89===_0x229193)break;else _0x5d087a['push'](_0x5d087a['shift']());}catch(_0x5491e9){_0x5d087a['push'](_0x5d087a['shift']());}}}(a200_0x4160,0x3bb35));import{ruleGet}from'../../commands/rule/get.js';function a200_0x4160(){const _0x11b4c3=['77570rQdjSp','133025akXabQ','5869030teZHDW','24BKKdQz','292308xTnIel','1221584nGcXip','3MzHSSj','11IEZmOD','30HRWPEu','2268896pJFlkz','333639PlVlXB'];a200_0x4160=function(){return _0x11b4c3;};return a200_0x4160();}import{ruleList}from'../../commands/rule/list.js';function a200_0x1742(_0x321159,_0x11c39a){_0x321159=_0x321159-0x188;const _0x41600e=a200_0x4160();let _0x17427c=_0x41600e[_0x321159];return _0x17427c;}import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
@@ -1 +1 @@
1
- const a201_0x35959a=a201_0x1355;(function(_0x5a536b,_0x381ce5){const _0x2dfab0=a201_0x1355,_0x259771=_0x5a536b();while(!![]){try{const _0x20fb7c=-parseInt(_0x2dfab0(0x1e4))/0x1*(parseInt(_0x2dfab0(0x1e7))/0x2)+-parseInt(_0x2dfab0(0x1f0))/0x3*(parseInt(_0x2dfab0(0x1e2))/0x4)+-parseInt(_0x2dfab0(0x1eb))/0x5+parseInt(_0x2dfab0(0x1e3))/0x6+parseInt(_0x2dfab0(0x1e6))/0x7+parseInt(_0x2dfab0(0x1f3))/0x8*(-parseInt(_0x2dfab0(0x1ea))/0x9)+parseInt(_0x2dfab0(0x1e1))/0xa*(parseInt(_0x2dfab0(0x1ee))/0xb);if(_0x20fb7c===_0x381ce5)break;else _0x259771['push'](_0x259771['shift']());}catch(_0x1ed0a4){_0x259771['push'](_0x259771['shift']());}}}(a201_0x5e95,0x67609));import{getAppRule}from'../../core/api-client.js';function a201_0x5e95(){const _0x46e473=['map','267971hutulp','appCode','2047995ZZKcPR','read','Loaded\x20app\x20rule\x20configuration\x20for\x20','252832djPotN','610oKaiYA','4kkoyOb','2409108wqPqJd','1rIYuYV','all','5038229FuyxoS','114986qRwAOc','rule','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','171vtFZjk','4216095DjBpjT','cookie'];a201_0x5e95=function(){return _0x46e473;};return a201_0x5e95();}import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';function a201_0x1355(_0x7615f6,_0x18172f){_0x7615f6=_0x7615f6-0x1e1;const _0x5e95df=a201_0x5e95();let _0x135572=_0x5e95df[_0x7615f6];return _0x135572;}export const ruleList={'service':a201_0x35959a(0x1e8),'command':'list','description':a201_0x35959a(0x1e9),'risk':a201_0x35959a(0x1f1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x1b53a4){const _0x67ad80=a201_0x35959a,_0x562f87=await Promise[_0x67ad80(0x1e5)](APP_RULE_TYPES[_0x67ad80(0x1ed)](_0x258439=>getAppRule(_0x1b53a4[_0x67ad80(0x1ec)],{'appCode':_0x1b53a4[_0x67ad80(0x1ef)],'type':_0x258439}))),_0x594955=APP_RULE_TYPES[_0x67ad80(0x1ed)]((_0x5e0dc8,_0x4eaa69)=>projectAppRule(_0x5e0dc8,_0x562f87[_0x4eaa69]??null));return{'ok':!![],'data':{'total':_0x594955['length'],'rules':_0x594955},'message':_0x67ad80(0x1f2)+_0x1b53a4[_0x67ad80(0x1ef)]};}};
1
+ function a201_0x273f(){const _0x3dd96d=['2229IYHnuF','1020550OVTKnO','678830RdthRW','map','list','read','1314nDdnpu','279rkMMhN','cookie','482432ZjMpNT','76240MLHWck','Loaded\x20app\x20rule\x20configuration\x20for\x20','366aoXbna','71624XoMfjV','length','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','all','rule','appCode','9121PjcWkQ'];a201_0x273f=function(){return _0x3dd96d;};return a201_0x273f();}const a201_0x2d1102=a201_0x5c43;(function(_0x4b4d18,_0x7a966c){const _0x1b94f1=a201_0x5c43,_0x49f697=_0x4b4d18();while(!![]){try{const _0xa7133d=-parseInt(_0x1b94f1(0x11c))/0x1+parseInt(_0x1b94f1(0x11e))/0x2*(-parseInt(_0x1b94f1(0x112))/0x3)+parseInt(_0x1b94f1(0x11b))/0x4+parseInt(_0x1b94f1(0x114))/0x5+-parseInt(_0x1b94f1(0x118))/0x6*(-parseInt(_0x1b94f1(0x111))/0x7)+-parseInt(_0x1b94f1(0x11f))/0x8*(parseInt(_0x1b94f1(0x119))/0x9)+parseInt(_0x1b94f1(0x113))/0xa;if(_0xa7133d===_0x7a966c)break;else _0x49f697['push'](_0x49f697['shift']());}catch(_0x3c5a4e){_0x49f697['push'](_0x49f697['shift']());}}}(a201_0x273f,0x259b2));import{getAppRule}from'../../core/api-client.js';function a201_0x5c43(_0x1c4f7b,_0x3cedf6){_0x1c4f7b=_0x1c4f7b-0x10c;const _0x273fa9=a201_0x273f();let _0x5c438d=_0x273fa9[_0x1c4f7b];return _0x5c438d;}import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a201_0x2d1102(0x10f),'command':a201_0x2d1102(0x116),'description':a201_0x2d1102(0x10d),'risk':a201_0x2d1102(0x117),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x270f9b){const _0x4f4f7d=a201_0x2d1102,_0x51f2ac=await Promise[_0x4f4f7d(0x10e)](APP_RULE_TYPES[_0x4f4f7d(0x115)](_0x446459=>getAppRule(_0x270f9b[_0x4f4f7d(0x11a)],{'appCode':_0x270f9b[_0x4f4f7d(0x110)],'type':_0x446459}))),_0x33ab4a=APP_RULE_TYPES[_0x4f4f7d(0x115)]((_0x2565f1,_0x4d372b)=>projectAppRule(_0x2565f1,_0x51f2ac[_0x4d372b]??null));return{'ok':!![],'data':{'total':_0x33ab4a[_0x4f4f7d(0x10c)],'rules':_0x33ab4a},'message':_0x4f4f7d(0x11d)+_0x270f9b['appCode']};}};
@@ -1 +1 @@
1
- const a202_0x507f92=a202_0x3ab3;(function(_0x407a24,_0x530ffe){const _0x23704e=a202_0x3ab3,_0x588025=_0x407a24();while(!![]){try{const _0x2cf9b5=-parseInt(_0x23704e(0x111))/0x1+-parseInt(_0x23704e(0xe4))/0x2+-parseInt(_0x23704e(0xf8))/0x3*(parseInt(_0x23704e(0xe6))/0x4)+parseInt(_0x23704e(0x11a))/0x5*(-parseInt(_0x23704e(0xf3))/0x6)+parseInt(_0x23704e(0x100))/0x7+-parseInt(_0x23704e(0x114))/0x8*(parseInt(_0x23704e(0xe3))/0x9)+parseInt(_0x23704e(0x10b))/0xa;if(_0x2cf9b5===_0x530ffe)break;else _0x588025['push'](_0x588025['shift']());}catch(_0x560dff){_0x588025['push'](_0x588025['shift']());}}}(a202_0x19fb,0x8e7bb));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';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 a202_0x19fb(){const _0x258d1e=['byteSize','set','verified','planned','34358300aOqwRo','number','cause','content','trim','type','1164157kGJJHX','rules','write','8XXzfqU','app_rule_expected_version_invalid','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','defineProperty','\x20--format\x20compress','5mUIzGa','flag','7230807HAODxg','111122WTOkNi','rule','79832MFOUmX',';\x20current\x20version\x20is\x20','beforeRecord','\x20version\x20changed\x20before\x20write.','before','replacement','POST','app_rule_file_required','string','input','app_rule_verification_unavailable','appCode','contentHash','2638452xHhOdF','expected-version','cookie','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','app_rule_version_mismatch','171INqhkZ','app_rule_set_outcome_unknown','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','version','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','expectedVersion','push','Set\x20','5237890FJKuiw','rabetbase\x20rule\x20get\x20--type\x20','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','str','/smartapi/knowledge-base/save','--file\x20is\x20required.','file'];a202_0x19fb=function(){return _0x258d1e;};return a202_0x19fb();}const SAVE_PATH=a202_0x507f92(0x104),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.';function readSetInput(_0x31e074){const _0x520740=a202_0x507f92,_0x37e6b5=readAppRuleType(_0x31e074),_0x5cdff0=_0x31e074[_0x520740(0x103)](_0x520740(0x106))[_0x520740(0x10f)]();if(!_0x5cdff0)throw appRuleError(_0x520740(0xed),_0x520740(0x105),'Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0x509e68=_0x31e074[_0x520740(0xe2)](_0x520740(0xf4));let _0x546a64;if(_0x509e68!==undefined){_0x546a64=Number(_0x509e68);if(!Number['isSafeInteger'](_0x546a64)||_0x546a64<0x0)throw appRuleError(_0x520740(0x115),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'type':_0x37e6b5,'file':_0x5cdff0,'expectedVersion':_0x546a64};}async function prepareSet(_0x33ebee){const _0x20f9e3=a202_0x507f92,_0x582341=readSetInput(_0x33ebee),_0xac89c=await readAppRuleFile(_0x582341[_0x20f9e3(0x106)]),_0x43c2c3=await getAppRule(_0x33ebee['cookie'],{'appCode':_0x33ebee[_0x20f9e3(0xf1)],'type':_0x582341['type']});if(_0x582341[_0x20f9e3(0xfd)]!==undefined&&_0x43c2c3?.[_0x20f9e3(0xfb)]!==_0x582341[_0x20f9e3(0xfd)])throw appRuleError(_0x20f9e3(0xf7),appRuleFileName(_0x582341[_0x20f9e3(0x110)])+_0x20f9e3(0xe9),'Expected\x20'+_0x582341['expectedVersion']+_0x20f9e3(0xe7)+(_0x43c2c3?.[_0x20f9e3(0xfb)]??'unconfigured')+'.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.');return{'input':_0x582341,'replacement':_0xac89c,'beforeRecord':_0x43c2c3,'before':projectAppRule(_0x582341[_0x20f9e3(0x110)],_0x43c2c3),'planned':{'type':_0x582341[_0x20f9e3(0x110)],'fileName':appRuleFileName(_0x582341['type']),'contextScope':appRuleContextScope(_0x582341[_0x20f9e3(0x110)]),'enabled':!![],'appCode':_0x33ebee[_0x20f9e3(0xf1)],'scope':_0x20f9e3(0x112),'contentByteSize':_0xac89c[_0x20f9e3(0x107)],'contentHash':_0xac89c[_0x20f9e3(0xf2)]}};}function warningsFor(_0x586760){return _0x586760===undefined?[]:[NON_ATOMIC_WARNING];}function a202_0x3ab3(_0x72c628,_0x222bb3){_0x72c628=_0x72c628-0xe2;const _0x19fbec=a202_0x19fb();let _0x3ab31a=_0x19fbec[_0x72c628];return _0x3ab31a;}export const ruleSet={'service':a202_0x507f92(0xe5),'command':'set','description':a202_0x507f92(0x102),'risk':a202_0x507f92(0x113),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a202_0x507f92(0x106),'type':a202_0x507f92(0xee),'required':!![],'description':a202_0x507f92(0xf6)},{'name':a202_0x507f92(0xf4),'type':a202_0x507f92(0x10c),'required':![],'description':a202_0x507f92(0xfa)}],async 'validate'(_0x381b56){readSetInput(_0x381b56);},async 'dryRun'(_0x28d281){const _0x25f6db=a202_0x507f92,_0x2e4f5d=await prepareSet(_0x28d281);return asDryRunResult({'operation':_0x25f6db(0x108),'selector':{'appCode':_0x28d281[_0x25f6db(0xf1)],'scope':_0x25f6db(0x112),'type':_0x2e4f5d[_0x25f6db(0xef)][_0x25f6db(0x110)]},'before':_0x2e4f5d[_0x25f6db(0xea)],'after':_0x2e4f5d[_0x25f6db(0x10a)],'dryRun':!![],'backend':{'method':'POST','path':SAVE_PATH},'warnings':warningsFor(_0x2e4f5d[_0x25f6db(0xef)][_0x25f6db(0xfd)]),'verification':{'expectedVersion':_0x2e4f5d[_0x25f6db(0xef)][_0x25f6db(0xfd)]??null,'atomicCompareAndSet':![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x2e4f5d['input']['type']+_0x25f6db(0x119)}},{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x2e21d7){const _0x12eeca=a202_0x507f92,_0x21566d=await prepareSet(_0x2e21d7);let _0x5d6cfc=![];try{await saveAppRule(_0x2e21d7['cookie'],{'appCode':_0x2e21d7['appCode'],'type':_0x21566d[_0x12eeca(0xef)][_0x12eeca(0x110)],'content':_0x21566d[_0x12eeca(0xeb)][_0x12eeca(0x10e)]});}catch(_0x25af34){if(!isPlatformTransportFailure(_0x25af34))throw _0x25af34;_0x5d6cfc=!![];}let _0x4c62c6;try{_0x4c62c6=await getAppRule(_0x2e21d7[_0x12eeca(0xf5)],{'appCode':_0x2e21d7[_0x12eeca(0xf1)],'type':_0x21566d['input'][_0x12eeca(0x110)]});}catch(_0xc22b2d){const _0x474732=appRuleError(_0x5d6cfc?_0x12eeca(0xf9):_0x12eeca(0xf0),'The\x20set\x20request\x20was\x20sent,\x20but\x20'+appRuleFileName(_0x21566d['input'][_0x12eeca(0x110)])+'\x20could\x20not\x20be\x20verified.',_0x12eeca(0xfc));Object[_0x12eeca(0x118)](_0x474732,_0x12eeca(0x10d),{'value':_0xc22b2d,'enumerable':![]});throw _0x474732;}const _0x47cf7d=_0x4c62c6&&inspectAppRuleContent(_0x4c62c6[_0x12eeca(0x10e)])[_0x12eeca(0xf2)]===_0x21566d[_0x12eeca(0xeb)][_0x12eeca(0xf2)],_0x3355be=_0x4c62c6&&(_0x21566d[_0x12eeca(0xe8)]===null||_0x4c62c6[_0x12eeca(0xfb)]>_0x21566d[_0x12eeca(0xe8)][_0x12eeca(0xfb)]);if(!_0x4c62c6||!_0x47cf7d||!_0x3355be)throw appRuleError(_0x5d6cfc?_0x12eeca(0xf9):'app_rule_verification_failed',appRuleFileName(_0x21566d[_0x12eeca(0xef)][_0x12eeca(0x110)])+'\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.',_0x12eeca(0x117)+_0x21566d[_0x12eeca(0xef)][_0x12eeca(0x110)]+_0x12eeca(0x116));const _0x8e8e40=warningsFor(_0x21566d[_0x12eeca(0xef)][_0x12eeca(0xfd)]);_0x5d6cfc&&_0x8e8e40[_0x12eeca(0xfe)]('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x59f9d7=projectAppRule(_0x21566d[_0x12eeca(0xef)][_0x12eeca(0x110)],_0x4c62c6);return{'ok':!![],'data':{'operation':_0x12eeca(0x108),'selector':{'appCode':_0x2e21d7[_0x12eeca(0xf1)],'scope':'rules','type':_0x21566d[_0x12eeca(0xef)][_0x12eeca(0x110)]},'before':_0x21566d[_0x12eeca(0xea)],'after':_0x59f9d7,'dryRun':![],'backend':{'method':_0x12eeca(0xec),'path':SAVE_PATH},'warnings':_0x8e8e40,'verification':{'status':_0x12eeca(0x109),'recoveredAfterUnknownResponse':_0x5d6cfc,'expectedVersion':_0x21566d['input'][_0x12eeca(0xfd)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x12eeca(0x101)+_0x21566d[_0x12eeca(0xef)][_0x12eeca(0x110)]+_0x12eeca(0x119)}},'message':_0x12eeca(0xff)+appRuleFileName(_0x21566d[_0x12eeca(0xef)][_0x12eeca(0x110)])+'\x20for\x20'+_0x2e21d7[_0x12eeca(0xf1)]};}};
1
+ function a202_0x5d39(_0x61a209,_0x3671fc){_0x61a209=_0x61a209-0x1a4;const _0x218051=a202_0x2180();let _0x5d3923=_0x218051[_0x61a209];return _0x5d3923;}const a202_0x51f545=a202_0x5d39;(function(_0x1cf6aa,_0x1a4d2a){const _0x182c7a=a202_0x5d39,_0x598bce=_0x1cf6aa();while(!![]){try{const _0x4c3fb4=parseInt(_0x182c7a(0x1cd))/0x1*(parseInt(_0x182c7a(0x1d0))/0x2)+parseInt(_0x182c7a(0x1a8))/0x3+parseInt(_0x182c7a(0x1c3))/0x4*(-parseInt(_0x182c7a(0x1c9))/0x5)+parseInt(_0x182c7a(0x1cb))/0x6+-parseInt(_0x182c7a(0x1ad))/0x7*(parseInt(_0x182c7a(0x1ca))/0x8)+-parseInt(_0x182c7a(0x1d1))/0x9*(parseInt(_0x182c7a(0x1a9))/0xa)+parseInt(_0x182c7a(0x1ce))/0xb;if(_0x4c3fb4===_0x1a4d2a)break;else _0x598bce['push'](_0x598bce['shift']());}catch(_0x195712){_0x598bce['push'](_0x598bce['shift']());}}}(a202_0x2180,0x961c5));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';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';const SAVE_PATH=a202_0x51f545(0x1c6),NON_ATOMIC_WARNING=a202_0x51f545(0x1bc);function readSetInput(_0xba645d){const _0x32acb9=a202_0x51f545,_0x5d73cc=readAppRuleType(_0xba645d),_0x25d632=_0xba645d[_0x32acb9(0x1cf)](_0x32acb9(0x1b1))['trim']();if(!_0x25d632)throw appRuleError(_0x32acb9(0x1c8),'--file\x20is\x20required.',_0x32acb9(0x1ba));const _0x56686e=_0xba645d[_0x32acb9(0x1a4)](_0x32acb9(0x1d4));let _0x28a42f;if(_0x56686e!==undefined){_0x28a42f=Number(_0x56686e);if(!Number[_0x32acb9(0x1b8)](_0x28a42f)||_0x28a42f<0x0)throw appRuleError('app_rule_expected_version_invalid',_0x32acb9(0x1a5));}return{'type':_0x5d73cc,'file':_0x25d632,'expectedVersion':_0x28a42f};}async function prepareSet(_0x21c192){const _0x59df0f=a202_0x51f545,_0x8ff385=readSetInput(_0x21c192),_0x3b254c=await readAppRuleFile(_0x8ff385['file']),_0x108b20=await getAppRule(_0x21c192['cookie'],{'appCode':_0x21c192[_0x59df0f(0x1ac)],'type':_0x8ff385['type']});if(_0x8ff385[_0x59df0f(0x1d6)]!==undefined&&_0x108b20?.[_0x59df0f(0x1d3)]!==_0x8ff385[_0x59df0f(0x1d6)])throw appRuleError(_0x59df0f(0x1bb),appRuleFileName(_0x8ff385[_0x59df0f(0x1c1)])+'\x20version\x20changed\x20before\x20write.','Expected\x20'+_0x8ff385[_0x59df0f(0x1d6)]+';\x20current\x20version\x20is\x20'+(_0x108b20?.['version']??_0x59df0f(0x1dd))+_0x59df0f(0x1c5));return{'input':_0x8ff385,'replacement':_0x3b254c,'beforeRecord':_0x108b20,'before':projectAppRule(_0x8ff385[_0x59df0f(0x1c1)],_0x108b20),'planned':{'type':_0x8ff385[_0x59df0f(0x1c1)],'fileName':appRuleFileName(_0x8ff385['type']),'contextScope':appRuleContextScope(_0x8ff385[_0x59df0f(0x1c1)]),'enabled':!![],'appCode':_0x21c192['appCode'],'scope':_0x59df0f(0x1d2),'contentByteSize':_0x3b254c[_0x59df0f(0x1be)],'contentHash':_0x3b254c[_0x59df0f(0x1bf)]}};}function warningsFor(_0x48c74b){return _0x48c74b===undefined?[]:[NON_ATOMIC_WARNING];}function a202_0x2180(){const _0x6a23fb=['app_rule_file_required','170335LAPfwl','856JkTYmE','4671132ZXRXKQ','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','482343fsKufS','7612528IuHHrM','str','2izeCGu','9495657zELdXT','rules','version','expected-version','app_rule_set_outcome_unknown','expectedVersion','cookie','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','app_rule_verification_failed','string','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','unconfigured','app_rule_verification_unavailable','POST','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','\x20--format\x20compress','flag','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','rabetbase\x20rule\x20get\x20--type\x20','\x20for\x20','2211420RAJXsc','10ARvBEb','write','set','appCode','26621IvudCl','\x20could\x20not\x20be\x20verified.','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','Set\x20','file','input','verified','beforeRecord','rule','cause','before','isSafeInteger','replacement','Pass\x20a\x20UTF-8\x20Markdown\x20file.','app_rule_version_mismatch','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','number','byteSize','contentHash','defineProperty','type','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','72MmCiXE','push','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','/smartapi/knowledge-base/save','The\x20set\x20request\x20was\x20sent,\x20but\x20'];a202_0x2180=function(){return _0x6a23fb;};return a202_0x2180();}export const ruleSet={'service':a202_0x51f545(0x1b5),'command':a202_0x51f545(0x1ab),'description':a202_0x51f545(0x1cc),'risk':a202_0x51f545(0x1aa),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':'file','type':a202_0x51f545(0x1db),'required':!![],'description':a202_0x51f545(0x1af)},{'name':'expected-version','type':a202_0x51f545(0x1bd),'required':![],'description':a202_0x51f545(0x1dc)}],async 'validate'(_0x27637e){readSetInput(_0x27637e);},async 'dryRun'(_0x3d5e4f){const _0x2730b1=a202_0x51f545,_0x42755c=await prepareSet(_0x3d5e4f);return asDryRunResult({'operation':_0x2730b1(0x1ab),'selector':{'appCode':_0x3d5e4f[_0x2730b1(0x1ac)],'scope':_0x2730b1(0x1d2),'type':_0x42755c['input'][_0x2730b1(0x1c1)]},'before':_0x42755c['before'],'after':_0x42755c['planned'],'dryRun':!![],'backend':{'method':_0x2730b1(0x1df),'path':SAVE_PATH},'warnings':warningsFor(_0x42755c[_0x2730b1(0x1b2)][_0x2730b1(0x1d6)]),'verification':{'expectedVersion':_0x42755c[_0x2730b1(0x1b2)][_0x2730b1(0x1d6)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x2730b1(0x1a6)+_0x42755c[_0x2730b1(0x1b2)][_0x2730b1(0x1c1)]+_0x2730b1(0x1e2)}},{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x13b339){const _0x434f70=a202_0x51f545,_0x499750=await prepareSet(_0x13b339);let _0x2e5d91=![];try{await saveAppRule(_0x13b339[_0x434f70(0x1d7)],{'appCode':_0x13b339[_0x434f70(0x1ac)],'type':_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)],'content':_0x499750[_0x434f70(0x1b9)]['content']});}catch(_0x420943){if(!isPlatformTransportFailure(_0x420943))throw _0x420943;_0x2e5d91=!![];}let _0x7a7633;try{_0x7a7633=await getAppRule(_0x13b339[_0x434f70(0x1d7)],{'appCode':_0x13b339[_0x434f70(0x1ac)],'type':_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)]});}catch(_0x3f4d49){const _0x2f6a43=appRuleError(_0x2e5d91?_0x434f70(0x1d5):_0x434f70(0x1de),_0x434f70(0x1c7)+appRuleFileName(_0x499750['input'][_0x434f70(0x1c1)])+_0x434f70(0x1ae),_0x434f70(0x1d9));Object[_0x434f70(0x1c0)](_0x2f6a43,_0x434f70(0x1b6),{'value':_0x3f4d49,'enumerable':![]});throw _0x2f6a43;}const _0x26240f=_0x7a7633&&inspectAppRuleContent(_0x7a7633['content'])[_0x434f70(0x1bf)]===_0x499750[_0x434f70(0x1b9)][_0x434f70(0x1bf)],_0x37b43b=_0x7a7633&&(_0x499750['beforeRecord']===null||_0x7a7633[_0x434f70(0x1d3)]>_0x499750[_0x434f70(0x1b4)]['version']);if(!_0x7a7633||!_0x26240f||!_0x37b43b)throw appRuleError(_0x2e5d91?_0x434f70(0x1d5):_0x434f70(0x1da),appRuleFileName(_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)])+_0x434f70(0x1e0),_0x434f70(0x1d8)+_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)]+_0x434f70(0x1e1));const _0x40271b=warningsFor(_0x499750[_0x434f70(0x1b2)]['expectedVersion']);_0x2e5d91&&_0x40271b[_0x434f70(0x1c4)](_0x434f70(0x1c2));const _0x17325c=projectAppRule(_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)],_0x7a7633);return{'ok':!![],'data':{'operation':_0x434f70(0x1ab),'selector':{'appCode':_0x13b339['appCode'],'scope':'rules','type':_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)]},'before':_0x499750[_0x434f70(0x1b7)],'after':_0x17325c,'dryRun':![],'backend':{'method':_0x434f70(0x1df),'path':SAVE_PATH},'warnings':_0x40271b,'verification':{'status':_0x434f70(0x1b3),'recoveredAfterUnknownResponse':_0x2e5d91,'expectedVersion':_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1d6)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x434f70(0x1a6)+_0x499750['input']['type']+_0x434f70(0x1e2)}},'message':_0x434f70(0x1b0)+appRuleFileName(_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)])+_0x434f70(0x1a7)+_0x13b339[_0x434f70(0x1ac)]};}};
@@ -1 +1 @@
1
- const a203_0x4b94c7=a203_0x489f;(function(_0x40a89e,_0x41ad44){const _0x385714=a203_0x489f,_0x6f958d=_0x40a89e();while(!![]){try{const _0x64fb07=parseInt(_0x385714(0x90))/0x1*(-parseInt(_0x385714(0xb4))/0x2)+parseInt(_0x385714(0xb0))/0x3+parseInt(_0x385714(0x9c))/0x4+-parseInt(_0x385714(0xb5))/0x5+-parseInt(_0x385714(0xac))/0x6+parseInt(_0x385714(0x99))/0x7+parseInt(_0x385714(0xb8))/0x8;if(_0x64fb07===_0x41ad44)break;else _0x6f958d['push'](_0x6f958d['shift']());}catch(_0x4d351d){_0x6f958d['push'](_0x6f958d['shift']());}}}(a203_0x238e,0x498b3));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=[a203_0x4b94c7(0xae),'database'];export const MAX_APP_RULE_BYTES=0x5*0x400*0x400;function a203_0x489f(_0x26c6c2,_0x4b6db7){_0x26c6c2=_0x26c6c2-0x8a;const _0x238edd=a203_0x238e();let _0x489f26=_0x238edd[_0x26c6c2];return _0x489f26;}const APP_RULE_FILES={'rules':a203_0x4b94c7(0xa1),'database':a203_0x4b94c7(0xaa)},APP_RULE_CONTEXT_SCOPES={'rules':a203_0x4b94c7(0x93),'database':'database-analysis'};export function appRuleError(_0xe2d1e2,_0x1367dd,_0x313732){return new CliError(_0xe2d1e2,0x1,_0x1367dd,_0x313732);}export function readAppRuleType(_0x3181bb){const _0x2e2930=a203_0x4b94c7,_0x300b23=_0x3181bb[_0x2e2930(0x8a)](_0x2e2930(0x91))[_0x2e2930(0xaf)]()['toLowerCase']();if(_0x300b23!=='rules'&&_0x300b23!==_0x2e2930(0xb3))throw appRuleError(_0x2e2930(0xb1),'--type\x20must\x20be\x20either\x20rules\x20or\x20database.');return _0x300b23;}export function appRuleFileName(_0x31524c){return APP_RULE_FILES[_0x31524c];}function a203_0x238e(){const _0x4038fc=['DATABASE.md','updateTime','2158914fDaPUD','byteSize','rules','trim','338421jtqfdv','app_rule_type_invalid','app_rule_file_required','database','86790SKdbuU','2463005gGtAqe','app_rule_file_invalid','app_rule_file_unreadable','1299248FZBvjs','str','scope','utf-8','createTime','appCode','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','1RPZoWi','type','contentHash','page-api-development','App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.','size','from','App\x20rule\x20file\x20is\x20blank:\x20','Pass\x20a\x20UTF-8\x20Markdown\x20file.','2353645ssNgdz','app_rule_content_invalid','version','2342408bWGclw','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','isFile','utf8','update','RULES.md','string','message','decode','sha256','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','byteLength','digest','app_rule_content_too_large'];a203_0x238e=function(){return _0x4038fc;};return a203_0x238e();}export function appRuleContextScope(_0x36350e){return APP_RULE_CONTEXT_SCOPES[_0x36350e];}export function inspectAppRuleContent(_0x262cd7){const _0xe8ffaa=a203_0x4b94c7,_0x47e83b=Buffer[_0xe8ffaa(0x96)](_0x262cd7,_0xe8ffaa(0x9f));return{'content':_0x262cd7,'byteSize':_0x47e83b[_0xe8ffaa(0xa7)],'contentHash':'sha256:'+createHash(_0xe8ffaa(0xa5))[_0xe8ffaa(0xa0)](_0x47e83b)[_0xe8ffaa(0xa8)]('hex')};}export async function readAppRuleFile(_0x19d910){const _0x211cbb=a203_0x4b94c7,_0xa21406=_0x19d910[_0x211cbb(0xaf)]();if(!_0xa21406)throw appRuleError(_0x211cbb(0xb2),'--file\x20is\x20required.',_0x211cbb(0x98));const _0x1c9222=resolve(_0xa21406);let _0x1acb3c;try{_0x1acb3c=await stat(_0x1c9222);}catch(_0x1cdc79){throw appRuleError(_0x211cbb(0xb7),'Cannot\x20access\x20app\x20rule\x20file:\x20'+_0xa21406,_0x1cdc79 instanceof Error?_0x1cdc79[_0x211cbb(0xa3)]:String(_0x1cdc79));}if(!_0x1acb3c[_0x211cbb(0x9e)]())throw appRuleError(_0x211cbb(0xb6),_0x211cbb(0x9d)+_0xa21406);if(_0x1acb3c[_0x211cbb(0x95)]>MAX_APP_RULE_BYTES)throw appRuleError('app_rule_content_too_large','App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.');let _0x2e5dd2;try{_0x2e5dd2=await readFile(_0x1c9222);}catch(_0x1aa05d){throw appRuleError(_0x211cbb(0xb7),'Cannot\x20read\x20app\x20rule\x20file:\x20'+_0xa21406,_0x1aa05d instanceof Error?_0x1aa05d[_0x211cbb(0xa3)]:String(_0x1aa05d));}if(_0x2e5dd2[_0x211cbb(0xa7)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x211cbb(0xa9),_0x211cbb(0x94));let _0x3e5f54;try{_0x3e5f54=new TextDecoder(_0x211cbb(0x8c),{'fatal':!![],'ignoreBOM':!![]})[_0x211cbb(0xa4)](_0x2e5dd2);}catch{throw appRuleError(_0x211cbb(0x9a),_0x211cbb(0xa6)+_0xa21406);}if(!_0x3e5f54[_0x211cbb(0xaf)]())throw appRuleError('app_rule_content_invalid',_0x211cbb(0x97)+_0xa21406);return inspectAppRuleContent(_0x3e5f54);}export function projectAppRule(_0x523737,_0x46bed2){const _0x24121f=a203_0x4b94c7;if(!_0x46bed2)return{'type':_0x523737,'fileName':appRuleFileName(_0x523737),'contextScope':appRuleContextScope(_0x523737),'enabled':![]};const _0x45190c=inspectAppRuleContent(_0x46bed2['content']);return{'type':_0x523737,'fileName':appRuleFileName(_0x523737),'contextScope':appRuleContextScope(_0x523737),'enabled':!![],'id':_0x46bed2['id'],'scope':_0x46bed2[_0x24121f(0x8b)],'appCode':_0x46bed2[_0x24121f(0x8e)],'version':_0x46bed2[_0x24121f(0x9b)],'contentByteSize':_0x45190c[_0x24121f(0xad)],'contentHash':_0x45190c[_0x24121f(0x92)],..._0x46bed2[_0x24121f(0x8d)]!==undefined&&_0x46bed2['createTime']!==null?{'createTime':_0x46bed2[_0x24121f(0x8d)]}:{},..._0x46bed2['updateTime']!==undefined&&_0x46bed2[_0x24121f(0xab)]!==null?{'updateTime':_0x46bed2[_0x24121f(0xab)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a203_0x4b94c7(0x91),'type':a203_0x4b94c7(0xa2),'required':!![],'description':a203_0x4b94c7(0x8f),'enum':[...APP_RULE_TYPES]};
1
+ const a203_0x54f9da=a203_0x104c;(function(_0x1b93a3,_0xc3873d){const _0x2a14d0=a203_0x104c,_0x29ad52=_0x1b93a3();while(!![]){try{const _0x2e93a4=parseInt(_0x2a14d0(0x173))/0x1+-parseInt(_0x2a14d0(0x188))/0x2*(parseInt(_0x2a14d0(0x17f))/0x3)+parseInt(_0x2a14d0(0x170))/0x4+-parseInt(_0x2a14d0(0x182))/0x5*(-parseInt(_0x2a14d0(0x16e))/0x6)+parseInt(_0x2a14d0(0x19b))/0x7*(-parseInt(_0x2a14d0(0x192))/0x8)+-parseInt(_0x2a14d0(0x189))/0x9+parseInt(_0x2a14d0(0x178))/0xa;if(_0x2e93a4===_0xc3873d)break;else _0x29ad52['push'](_0x29ad52['shift']());}catch(_0x9bfaec){_0x29ad52['push'](_0x29ad52['shift']());}}}(a203_0x8ca6,0x21e94));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=[a203_0x54f9da(0x180),a203_0x54f9da(0x18c)];export const MAX_APP_RULE_BYTES=0x5*0x400*0x400;const APP_RULE_FILES={'rules':a203_0x54f9da(0x19f),'database':a203_0x54f9da(0x18b)},APP_RULE_CONTEXT_SCOPES={'rules':a203_0x54f9da(0x19d),'database':a203_0x54f9da(0x18f)};export function appRuleError(_0x7874eb,_0x1dd82d,_0x20de35){return new CliError(_0x7874eb,0x1,_0x1dd82d,_0x20de35);}export function readAppRuleType(_0x340d73){const _0x55bfff=a203_0x54f9da,_0x31112a=_0x340d73[_0x55bfff(0x171)](_0x55bfff(0x1a4))[_0x55bfff(0x18a)]()[_0x55bfff(0x17e)]();if(_0x31112a!==_0x55bfff(0x180)&&_0x31112a!==_0x55bfff(0x18c))throw appRuleError(_0x55bfff(0x193),_0x55bfff(0x186));return _0x31112a;}function a203_0x8ca6(){const _0x3dfe24=['update','database-analysis','createTime','decode','8ZFRwBQ','app_rule_type_invalid','digest','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','app_rule_file_invalid','app_rule_file_unreadable','size','utf-8','isFile','1111579wBjUqN','content','page-api-development','byteLength','RULES.md','app_rule_content_too_large','byteSize','utf8','sha256','type','122022CRjFKQ','App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.','942176QgGTjJ','str','hex','158819axNrem','app_rule_content_invalid','from','updateTime','Cannot\x20access\x20app\x20rule\x20file:\x20','1642380HihsiY','contentHash','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','--file\x20is\x20required.','App\x20rule\x20file\x20is\x20blank:\x20','Cannot\x20read\x20app\x20rule\x20file:\x20','toLowerCase','202956UXjZWF','rules','version','10ILxush','scope','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','message','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','appCode','2GiLmoq','2105334pxaeSh','trim','DATABASE.md','database','app_rule_file_required'];a203_0x8ca6=function(){return _0x3dfe24;};return a203_0x8ca6();}export function appRuleFileName(_0x34e1ea){return APP_RULE_FILES[_0x34e1ea];}export function appRuleContextScope(_0x597d1b){return APP_RULE_CONTEXT_SCOPES[_0x597d1b];}export function inspectAppRuleContent(_0x3e85be){const _0x3dfe05=a203_0x54f9da,_0x54827d=Buffer[_0x3dfe05(0x175)](_0x3e85be,_0x3dfe05(0x1a2));return{'content':_0x3e85be,'byteSize':_0x54827d[_0x3dfe05(0x19e)],'contentHash':'sha256:'+createHash(_0x3dfe05(0x1a3))[_0x3dfe05(0x18e)](_0x54827d)[_0x3dfe05(0x194)](_0x3dfe05(0x172))};}export async function readAppRuleFile(_0x1db151){const _0x23a030=a203_0x54f9da,_0x19214f=_0x1db151[_0x23a030(0x18a)]();if(!_0x19214f)throw appRuleError(_0x23a030(0x18d),_0x23a030(0x17b),'Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0xa83530=resolve(_0x19214f);let _0x51946f;try{_0x51946f=await stat(_0xa83530);}catch(_0x205c08){throw appRuleError(_0x23a030(0x197),_0x23a030(0x177)+_0x19214f,_0x205c08 instanceof Error?_0x205c08[_0x23a030(0x185)]:String(_0x205c08));}if(!_0x51946f[_0x23a030(0x19a)]())throw appRuleError(_0x23a030(0x196),_0x23a030(0x17a)+_0x19214f);if(_0x51946f[_0x23a030(0x198)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x23a030(0x1a0),'App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.');let _0xc381e3;try{_0xc381e3=await readFile(_0xa83530);}catch(_0x34aac4){throw appRuleError(_0x23a030(0x197),_0x23a030(0x17d)+_0x19214f,_0x34aac4 instanceof Error?_0x34aac4[_0x23a030(0x185)]:String(_0x34aac4));}if(_0xc381e3[_0x23a030(0x19e)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x23a030(0x1a0),_0x23a030(0x16f));let _0x81ddef;try{_0x81ddef=new TextDecoder(_0x23a030(0x199),{'fatal':!![],'ignoreBOM':!![]})[_0x23a030(0x191)](_0xc381e3);}catch{throw appRuleError(_0x23a030(0x174),_0x23a030(0x195)+_0x19214f);}if(!_0x81ddef[_0x23a030(0x18a)]())throw appRuleError(_0x23a030(0x174),_0x23a030(0x17c)+_0x19214f);return inspectAppRuleContent(_0x81ddef);}function a203_0x104c(_0x7fbf5,_0x74004b){_0x7fbf5=_0x7fbf5-0x16e;const _0x8ca62b=a203_0x8ca6();let _0x104cd3=_0x8ca62b[_0x7fbf5];return _0x104cd3;}export function projectAppRule(_0x39edf5,_0x4251d0){const _0x366ee4=a203_0x54f9da;if(!_0x4251d0)return{'type':_0x39edf5,'fileName':appRuleFileName(_0x39edf5),'contextScope':appRuleContextScope(_0x39edf5),'enabled':![]};const _0x2a9cea=inspectAppRuleContent(_0x4251d0[_0x366ee4(0x19c)]);return{'type':_0x39edf5,'fileName':appRuleFileName(_0x39edf5),'contextScope':appRuleContextScope(_0x39edf5),'enabled':!![],'id':_0x4251d0['id'],'scope':_0x4251d0[_0x366ee4(0x183)],'appCode':_0x4251d0[_0x366ee4(0x187)],'version':_0x4251d0[_0x366ee4(0x181)],'contentByteSize':_0x2a9cea[_0x366ee4(0x1a1)],'contentHash':_0x2a9cea[_0x366ee4(0x179)],..._0x4251d0['createTime']!==undefined&&_0x4251d0['createTime']!==null?{'createTime':_0x4251d0[_0x366ee4(0x190)]}:{},..._0x4251d0[_0x366ee4(0x176)]!==undefined&&_0x4251d0['updateTime']!==null?{'updateTime':_0x4251d0[_0x366ee4(0x176)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a203_0x54f9da(0x1a4),'type':'string','required':!![],'description':a203_0x54f9da(0x184),'enum':[...APP_RULE_TYPES]};