@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.4

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 (355) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/index.js +1 -1
  26. package/lib/commands/app/list.js +1 -1
  27. package/lib/commands/app/members-list.js +1 -1
  28. package/lib/commands/app/remote-directory.js +1 -1
  29. package/lib/commands/app/shared.js +1 -1
  30. package/lib/commands/app-config/delete.js +1 -1
  31. package/lib/commands/app-config/get.js +1 -1
  32. package/lib/commands/app-config/index.js +1 -1
  33. package/lib/commands/app-config/list.js +1 -1
  34. package/lib/commands/app-config/set.js +1 -1
  35. package/lib/commands/app-config/shared.js +1 -1
  36. package/lib/commands/auth/index.js +1 -1
  37. package/lib/commands/bff/create.js +1 -1
  38. package/lib/commands/bff/delete.js +1 -1
  39. package/lib/commands/bff/detail.js +1 -1
  40. package/lib/commands/bff/index.js +1 -1
  41. package/lib/commands/bff/list.js +1 -1
  42. package/lib/commands/bff/logs.js +1 -1
  43. package/lib/commands/bff/pull.js +1 -1
  44. package/lib/commands/bff/push.js +1 -1
  45. package/lib/commands/bff/status.js +1 -1
  46. package/lib/commands/cli-skill/index.js +1 -1
  47. package/lib/commands/cli-update.js +1 -1
  48. package/lib/commands/codegen/index.js +1 -1
  49. package/lib/commands/codegen/sdk.js +1 -1
  50. package/lib/commands/codegen/sql.js +1 -1
  51. package/lib/commands/common/app-registry.js +1 -1
  52. package/lib/commands/common/app-selector.js +1 -1
  53. package/lib/commands/common/async-task.js +1 -1
  54. package/lib/commands/common/dry-run.js +1 -1
  55. package/lib/commands/common/flags.js +1 -1
  56. package/lib/commands/common/local-file.js +1 -1
  57. package/lib/commands/common/validate.js +1 -1
  58. package/lib/commands/config/delete.js +1 -1
  59. package/lib/commands/config/get.js +1 -1
  60. package/lib/commands/config/index.js +1 -1
  61. package/lib/commands/config/init.js +1 -1
  62. package/lib/commands/config/list.js +1 -1
  63. package/lib/commands/config/set.js +1 -1
  64. package/lib/commands/config/shared.js +1 -1
  65. package/lib/commands/dataset/batch-design.js +1 -1
  66. package/lib/commands/dataset/business-group-update.js +1 -1
  67. package/lib/commands/dataset/business-groups.js +1 -1
  68. package/lib/commands/dataset/capability.js +1 -1
  69. package/lib/commands/dataset/cross-relation-create.js +1 -1
  70. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  71. package/lib/commands/dataset/cross-relation-list.js +1 -1
  72. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  73. package/lib/commands/dataset/cross-relation-update.js +1 -1
  74. package/lib/commands/dataset/delete.js +1 -1
  75. package/lib/commands/dataset/detail.js +1 -1
  76. package/lib/commands/dataset/extend-update.js +1 -1
  77. package/lib/commands/dataset/field-restore.js +1 -1
  78. package/lib/commands/dataset/field-update.js +1 -1
  79. package/lib/commands/dataset/generate.js +1 -1
  80. package/lib/commands/dataset/index.js +1 -1
  81. package/lib/commands/dataset/list.js +1 -1
  82. package/lib/commands/dataset/operations.js +1 -1
  83. package/lib/commands/dataset/relation-audit.js +1 -1
  84. package/lib/commands/dataset/relation-create.js +1 -1
  85. package/lib/commands/dataset/relation-delete.js +1 -1
  86. package/lib/commands/dataset/relation-shared.js +1 -1
  87. package/lib/commands/dataset/relation-update.js +1 -1
  88. package/lib/commands/dataset/relations.js +1 -1
  89. package/lib/commands/dataset/rename.js +1 -1
  90. package/lib/commands/dataset/restore.js +1 -1
  91. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  92. package/lib/commands/db/analysis-batching.js +1 -1
  93. package/lib/commands/db/analyze-batch-plan.js +1 -1
  94. package/lib/commands/db/analyze-cancel.js +1 -1
  95. package/lib/commands/db/analyze-start.js +1 -1
  96. package/lib/commands/db/analyze-status.js +1 -1
  97. package/lib/commands/db/create.js +1 -1
  98. package/lib/commands/db/delete.js +1 -1
  99. package/lib/commands/db/detail.js +1 -1
  100. package/lib/commands/db/diff-refresh-start.js +1 -1
  101. package/lib/commands/db/diff-refresh-status.js +1 -1
  102. package/lib/commands/db/diff.js +1 -1
  103. package/lib/commands/db/index.js +1 -1
  104. package/lib/commands/db/list.js +1 -1
  105. package/lib/commands/db/shared.js +1 -1
  106. package/lib/commands/db/table-diff-shared.js +1 -1
  107. package/lib/commands/db/tables.js +1 -1
  108. package/lib/commands/db/test.js +1 -1
  109. package/lib/commands/db/update.js +1 -1
  110. package/lib/commands/deployment/index.js +1 -1
  111. package/lib/commands/deployment/sync-all.js +1 -1
  112. package/lib/commands/deployment/sync-jobs.js +1 -1
  113. package/lib/commands/deployment/sync-status.js +1 -1
  114. package/lib/commands/doctor.js +1 -1
  115. package/lib/commands/file/index.js +1 -1
  116. package/lib/commands/flow/create.js +1 -1
  117. package/lib/commands/flow/detail.js +1 -1
  118. package/lib/commands/flow/index.js +1 -1
  119. package/lib/commands/flow/list.js +1 -1
  120. package/lib/commands/flow/publish.js +1 -1
  121. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  122. package/lib/commands/flow/runtime-role-list.js +1 -1
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  124. package/lib/commands/flow/runtime-user-search.js +1 -1
  125. package/lib/commands/flow/shared.js +1 -1
  126. package/lib/commands/flow/update.js +1 -1
  127. package/lib/commands/flow/validate.js +1 -1
  128. package/lib/commands/instant-api-policy/current.js +1 -1
  129. package/lib/commands/instant-api-policy/index.js +1 -1
  130. package/lib/commands/instant-api-policy/init.js +1 -1
  131. package/lib/commands/instant-api-policy/publish.js +1 -1
  132. package/lib/commands/instant-api-policy/pull.js +1 -1
  133. package/lib/commands/instant-api-policy/revision.js +1 -1
  134. package/lib/commands/instant-api-policy/revisions.js +1 -1
  135. package/lib/commands/instant-api-policy/rollback.js +1 -1
  136. package/lib/commands/instant-api-policy/shared.js +1 -1
  137. package/lib/commands/instant-api-policy/validate.js +1 -1
  138. package/lib/commands/issue/index.js +1 -1
  139. package/lib/commands/issue/nudge.js +1 -1
  140. package/lib/commands/issue/report.js +1 -1
  141. package/lib/commands/issue/shared.js +1 -1
  142. package/lib/commands/kb/create.js +1 -1
  143. package/lib/commands/kb/delete.js +1 -1
  144. package/lib/commands/kb/detail.js +1 -1
  145. package/lib/commands/kb/index.js +1 -1
  146. package/lib/commands/kb/list.js +1 -1
  147. package/lib/commands/kb/search.js +1 -1
  148. package/lib/commands/kb/shared.js +1 -1
  149. package/lib/commands/kb/update.js +1 -1
  150. package/lib/commands/logs/index.js +1 -1
  151. package/lib/commands/menu/asset-update.js +1 -1
  152. package/lib/commands/menu/delete.js +1 -1
  153. package/lib/commands/menu/external-link-create.js +1 -1
  154. package/lib/commands/menu/external-link-update.js +1 -1
  155. package/lib/commands/menu/group-create.js +1 -1
  156. package/lib/commands/menu/group-update.js +1 -1
  157. package/lib/commands/menu/index.js +1 -1
  158. package/lib/commands/menu/list.js +1 -1
  159. package/lib/commands/menu/move.js +1 -1
  160. package/lib/commands/menu/regroup-start.js +1 -1
  161. package/lib/commands/menu/rename.js +1 -1
  162. package/lib/commands/menu/shared/compare-table.js +1 -1
  163. package/lib/commands/menu/shared/delete-plan.js +1 -1
  164. package/lib/commands/menu/shared/facts.js +1 -1
  165. package/lib/commands/menu/shared/index.js +1 -1
  166. package/lib/commands/menu/shared/inquirer.js +1 -1
  167. package/lib/commands/menu/shared/local-pages.js +1 -1
  168. package/lib/commands/menu/shared/logic.js +1 -1
  169. package/lib/commands/menu/shared/mutations.js +1 -1
  170. package/lib/commands/menu/shared/service.js +1 -1
  171. package/lib/commands/menu/shared/sync-core.js +1 -1
  172. package/lib/commands/menu/shared/update-core.js +1 -1
  173. package/lib/commands/menu/shared/valid-url.js +1 -1
  174. package/lib/commands/menu/sync.js +1 -1
  175. package/lib/commands/menu/visibility-update.js +1 -1
  176. package/lib/commands/notification/config-create.js +1 -1
  177. package/lib/commands/notification/config-delete.js +1 -1
  178. package/lib/commands/notification/config-list.js +1 -1
  179. package/lib/commands/notification/config-update.js +1 -1
  180. package/lib/commands/notification/index.js +1 -1
  181. package/lib/commands/notification/shared.js +1 -1
  182. package/lib/commands/ocr/index.js +1 -1
  183. package/lib/commands/page/create.js +1 -1
  184. package/lib/commands/page/custom/detail.js +1 -1
  185. package/lib/commands/page/custom/list.js +1 -1
  186. package/lib/commands/page/custom/publish.js +1 -1
  187. package/lib/commands/page/custom/shared.js +1 -1
  188. package/lib/commands/page/custom/syntax.js +1 -1
  189. package/lib/commands/page/custom/update.js +1 -1
  190. package/lib/commands/page/data-list-status.js +1 -1
  191. package/lib/commands/page/generate-start.js +1 -1
  192. package/lib/commands/page/generate-status.js +1 -1
  193. package/lib/commands/page/index.js +1 -1
  194. package/lib/commands/page/pull.js +1 -1
  195. package/lib/commands/page/push.js +1 -1
  196. package/lib/commands/page/relation-audit.js +1 -1
  197. package/lib/commands/page/restore.js +1 -1
  198. package/lib/commands/page/shared.js +1 -1
  199. package/lib/commands/page/sync.js +1 -1
  200. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  201. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  202. package/lib/commands/project/create/format-elapsed.js +1 -1
  203. package/lib/commands/project/create/main.js +1 -1
  204. package/lib/commands/project/create/materialize-project-template.js +1 -1
  205. package/lib/commands/project/create/project-name.js +1 -1
  206. package/lib/commands/project/create/project-template-archive.js +1 -1
  207. package/lib/commands/project/create/project-template-path.js +1 -1
  208. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  209. package/lib/commands/project/create/use-format-code.js +1 -1
  210. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  211. package/lib/commands/project/domain-routing-sync.js +1 -1
  212. package/lib/commands/project/index.js +1 -1
  213. package/lib/commands/project/upgrade.js +1 -1
  214. package/lib/commands/registry.js +1 -1
  215. package/lib/commands/role/delete.js +1 -1
  216. package/lib/commands/role/detail.js +1 -1
  217. package/lib/commands/role/index.js +1 -1
  218. package/lib/commands/role/list.js +1 -1
  219. package/lib/commands/role/shared.js +1 -1
  220. package/lib/commands/role/update.js +1 -1
  221. package/lib/commands/role/user-add.js +1 -1
  222. package/lib/commands/role/user-remove.js +1 -1
  223. package/lib/commands/role/user-resolve.js +1 -1
  224. package/lib/commands/rule/get.js +1 -1
  225. package/lib/commands/rule/index.js +1 -1
  226. package/lib/commands/rule/list.js +1 -1
  227. package/lib/commands/rule/set.js +1 -1
  228. package/lib/commands/rule/shared.js +1 -1
  229. package/lib/commands/run/index.js +1 -1
  230. package/lib/commands/schema.js +1 -1
  231. package/lib/commands/sql/create.js +1 -1
  232. package/lib/commands/sql/delete.js +1 -1
  233. package/lib/commands/sql/detail.js +1 -1
  234. package/lib/commands/sql/exec.js +1 -1
  235. package/lib/commands/sql/index.js +1 -1
  236. package/lib/commands/sql/list.js +1 -1
  237. package/lib/commands/sql/pull.js +1 -1
  238. package/lib/commands/sql/push.js +1 -1
  239. package/lib/commands/sql/shared.js +1 -1
  240. package/lib/commands/sql/status.js +1 -1
  241. package/lib/commands/sql/validate.js +1 -1
  242. package/lib/commands/task/index.js +1 -1
  243. package/lib/commands/task/status.js +1 -1
  244. package/lib/commands/tenant/index.js +1 -1
  245. package/lib/commands/tenant/members-list.js +1 -1
  246. package/lib/commands/tenant/shared.js +1 -1
  247. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  248. package/lib/commands/user-account/feishu-bind.js +1 -1
  249. package/lib/commands/user-account/index.js +1 -1
  250. package/lib/commands/workspace/add.js +1 -1
  251. package/lib/commands/workspace/index.js +1 -1
  252. package/lib/commands/workspace/remove.js +1 -1
  253. package/lib/config/domain-config.js +1 -1
  254. package/lib/config/project-domain-routing.js +1 -1
  255. package/lib/config/region-config.js +1 -1
  256. package/lib/config/schema.js +1 -1
  257. package/lib/constant/cdn.js +1 -1
  258. package/lib/constant/cli.js +1 -1
  259. package/lib/constant/defaults.js +1 -1
  260. package/lib/constant/domain.js +1 -1
  261. package/lib/constant/env.js +1 -1
  262. package/lib/constant/output.js +1 -1
  263. package/lib/constant/paths.js +1 -1
  264. package/lib/constant/region.js +1 -1
  265. package/lib/constant/risk.js +1 -1
  266. package/lib/constant/routing-profile.js +1 -1
  267. package/lib/context/app-resolver.js +1 -1
  268. package/lib/context/auth-resolver.js +1 -1
  269. package/lib/context/config-loader.js +1 -1
  270. package/lib/context.js +1 -1
  271. package/lib/core/alias-resolver.js +1 -1
  272. package/lib/core/api-client.d.ts +1 -1
  273. package/lib/core/api-client.js +1 -1
  274. package/lib/core/bff/config.js +1 -1
  275. package/lib/core/bff/file-system.js +1 -1
  276. package/lib/core/bff/hash.js +1 -1
  277. package/lib/core/bff/hook-directory.js +1 -1
  278. package/lib/core/bff/lock.js +1 -1
  279. package/lib/core/bff/utils.js +1 -1
  280. package/lib/core/cross-db-relation.js +1 -1
  281. package/lib/core/db-resolver.js +1 -1
  282. package/lib/core/flow-config.js +1 -1
  283. package/lib/core/instant-api-policy/config.js +1 -1
  284. package/lib/core/kb-search-client.js +1 -1
  285. package/lib/core/page/file-system.js +1 -1
  286. package/lib/core/page/hash.js +1 -1
  287. package/lib/core/page/lock.js +1 -1
  288. package/lib/core/page/lr-smart-jsx.js +1 -1
  289. package/lib/core/sql-index-auditor.js +1 -1
  290. package/lib/core/sql-sync/config.js +1 -1
  291. package/lib/core/sql-sync/file-system.js +1 -1
  292. package/lib/core/sql-sync/hash.js +1 -1
  293. package/lib/core/sql-sync/lock.js +1 -1
  294. package/lib/core/sql-sync/utils.js +1 -1
  295. package/lib/core/sql-validator.js +1 -1
  296. package/lib/errors.js +1 -1
  297. package/lib/framework/build-all-flags.js +1 -1
  298. package/lib/framework/error-output.js +1 -1
  299. package/lib/framework/explicit-yes.js +1 -1
  300. package/lib/framework/flags.js +1 -1
  301. package/lib/framework/help.js +1 -1
  302. package/lib/framework/index.js +1 -1
  303. package/lib/framework/output.js +1 -1
  304. package/lib/framework/response.js +1 -1
  305. package/lib/framework/runner-alias.js +1 -1
  306. package/lib/framework/runner.js +1 -1
  307. package/lib/framework/schema-export.js +1 -1
  308. package/lib/framework/supported-flags.js +1 -1
  309. package/lib/framework/types.js +1 -1
  310. package/lib/generated/build-info.d.ts +4 -4
  311. package/lib/generated/build-info.js +1 -1
  312. package/lib/generated/official-routing.js +1 -1
  313. package/lib/generated/routing-contract.js +1 -1
  314. package/lib/help.js +1 -1
  315. package/lib/postinstall.js +1 -1
  316. package/lib/runtime/confirmation.js +1 -1
  317. package/lib/runtime/event.js +1 -1
  318. package/lib/runtime/index.js +1 -1
  319. package/lib/runtime/queue.js +1 -1
  320. package/lib/runtime/resolve.js +1 -1
  321. package/lib/skills/builtin-skill.js +1 -1
  322. package/lib/skills/main.js +1 -1
  323. package/lib/skills/npx-skills-add.js +1 -1
  324. package/lib/skills/skill-presence.js +1 -1
  325. package/lib/telemetry/cli-command-trace.js +1 -1
  326. package/lib/telemetry/cli-help-trace.js +1 -1
  327. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  328. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  329. package/lib/telemetry/send-cli-trace-log.js +1 -1
  330. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  331. package/lib/utils/ai_config.js +1 -1
  332. package/lib/utils/apply-jq-filter.js +1 -1
  333. package/lib/utils/cdn-config.js +1 -1
  334. package/lib/utils/check-sdk-version.js +1 -1
  335. package/lib/utils/cli-version-check.js +1 -1
  336. package/lib/utils/cli-version-policy.js +1 -1
  337. package/lib/utils/config.js +1 -1
  338. package/lib/utils/entity-with-id.js +1 -1
  339. package/lib/utils/file-utils.js +1 -1
  340. package/lib/utils/guides-cdn.js +1 -1
  341. package/lib/utils/http-client.js +1 -1
  342. package/lib/utils/is-non-interactive.js +1 -1
  343. package/lib/utils/logger.js +1 -1
  344. package/lib/utils/params.js +1 -1
  345. package/lib/utils/platform.js +1 -1
  346. package/lib/utils/sleep.js +1 -1
  347. package/lib/utils/template-replacer.js +1 -1
  348. package/lib/utils/update-notice.js +1 -1
  349. package/lib/utils/version.js +1 -1
  350. package/lib/utils/with-active-cookie.js +1 -1
  351. package/lib/utils/write-cli-side-channel.js +1 -1
  352. package/package.json +1 -1
  353. package/skills/rabetbase/SKILL.md +2 -2
  354. package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
  355. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x867f0d,_0x3ab1d5){const _0x3d15a6=a213_0x2df8,_0x4c2fb2=_0x867f0d();while(!![]){try{const _0x172cc8=parseInt(_0x3d15a6(0xdd))/0x1*(-parseInt(_0x3d15a6(0x108))/0x2)+parseInt(_0x3d15a6(0xcc))/0x3*(parseInt(_0x3d15a6(0xc4))/0x4)+parseInt(_0x3d15a6(0xf3))/0x5*(-parseInt(_0x3d15a6(0xe6))/0x6)+parseInt(_0x3d15a6(0x10f))/0x7*(parseInt(_0x3d15a6(0xe4))/0x8)+parseInt(_0x3d15a6(0xcd))/0x9+-parseInt(_0x3d15a6(0x104))/0xa+parseInt(_0x3d15a6(0xe5))/0xb*(-parseInt(_0x3d15a6(0xe3))/0xc);if(_0x172cc8===_0x3ab1d5)break;else _0x4c2fb2['push'](_0x4c2fb2['shift']());}catch(_0x4157de){_0x4c2fb2['push'](_0x4c2fb2['shift']());}}}(a213_0x5a60,0x29dfa));import a213_0x503330 from'chalk';function a213_0x5a60(){const _0x13f442=['cwd','cyan','label','message','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','manualMergeRequired','35138TGyHpw','utf8','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','\x20\x20npm\x20install','@lovrabet/sdk:','latest','324OAEVsq','10792QNrYEE','63789biLRDb','749874RmzOAr','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','detail','===\x20Upgrade\x20Summary\x20===','action','done','step','files','Upgrade\x20cancelled.','profiles','package.json','padEnd','\x20\x20Step\x20','5aCERKE','bold','\x20→\x20','stringify','yellow','apiDir','white','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','@lovrabet/sdk','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','Proceed\x20with\x20upgrade?','apiArchitecture','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','candidatePath','skippedLegacyDirectories','join','1587830KZOLoa','Application\x20source:','[\x22@lovrabet/sdk\x22]:\x20','dependencies','8iFslgV','source\x20structure\x20is\x20current','push','object','Step\x202/2:\x20Application\x20source\x20—\x20','yes','\x20\x20\x20\x20','1386RJiZjZ','up-to-date','sdkUpgrade','log','gray','succeed','needed','4GrOkyH','start','green','\x20→\x20latest','failed','Upgrade\x20@lovrabet/sdk','groups','===\x20Upgrade\x20Analysis\x20===','706983LXTcwp','2246742rsfPZW','FAIL','\x20\x20\x20\x20\x20\x20candidate:\x20','devDependencies','Upgrade\x20application\x20source','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','upgrade\x20needed','parse','\x20\x20Current\x20version\x20in\x20','CANCEL'];a213_0x5a60=function(){return _0x13f442;};return a213_0x5a60();}import a213_0x599c15 from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0xce117a){const _0x329f9a=a213_0x2df8;try{const _0xa6e9a5=JSON[_0x329f9a(0xd4)](readFileSync(_0xce117a,'utf8'));return _0xa6e9a5&&typeof _0xa6e9a5===_0x329f9a(0x10b)?_0xa6e9a5:{};}catch{return{};}}export function analyseProjectUpgrade(_0x10236b){const _0x143af3=a213_0x2df8;let _0x52020a=null;const _0x2a6522=resolve(_0x10236b,_0x143af3(0xf0));if(existsSync(_0x2a6522))try{const _0x4ec0a4=JSON['parse'](readFileSync(_0x2a6522,_0x143af3(0xde)));for(const _0x4234dc of[_0x143af3(0x107),_0x143af3(0xd0)]){const _0x3fb954=_0x4ec0a4?.[_0x4234dc]?.[_0x143af3(0xfb)];if(typeof _0x3fb954==='string'){_0x3fb954!=='latest'&&(_0x52020a={'pkgPath':_0x2a6522,'currentVersion':_0x3fb954,'field':_0x4234dc});break;}}}catch{}const _0x41fb98=resolve(_0x10236b,NEW_CONFIG_NAME),_0x34bf11=existsSync(_0x41fb98)?readProjectConfig(_0x41fb98):{},_0x1f7fd2=analyzeProjectApiArchitecture(_0x10236b,_0x34bf11);return{'sdkUpgrade':_0x52020a,'apiArchitecture':_0x1f7fd2};}function printReport(_0x29985d){const _0x4b87eb=a213_0x2df8;console[_0x4b87eb(0xc0)](''),console[_0x4b87eb(0xc0)](a213_0x503330[_0x4b87eb(0xf4)](_0x4b87eb(0xcb))),console['log'](''),console[_0x4b87eb(0xc0)](a213_0x503330[_0x4b87eb(0xd8)](_0x4b87eb(0x105))+('\x20\x20'+(_0x29985d['apiArchitecture'][_0x4b87eb(0xc3)]?a213_0x503330[_0x4b87eb(0xf7)](_0x4b87eb(0xd3)):a213_0x503330[_0x4b87eb(0xc6)](_0x4b87eb(0x110)))));for(const _0x22a7e5 of _0x29985d[_0x4b87eb(0xfe)][_0x4b87eb(0xca)]){console['log']('\x20\x20'+_0x22a7e5[_0x4b87eb(0xf8)]+'\x20('+_0x22a7e5[_0x4b87eb(0xef)][_0x4b87eb(0x103)](',\x20')+')');for(const _0x354ba9 of _0x22a7e5[_0x4b87eb(0xed)]){console[_0x4b87eb(0xc0)](_0x4b87eb(0x10e)+_0x354ba9[_0x4b87eb(0xea)][_0x4b87eb(0xf1)](0x11)+'\x20'+_0x354ba9['path']),_0x354ba9[_0x4b87eb(0x101)]&&console[_0x4b87eb(0xc0)](_0x4b87eb(0xcf)+_0x354ba9[_0x4b87eb(0x101)]);}}_0x29985d[_0x4b87eb(0xfe)][_0x4b87eb(0x102)]['length']>0x0&&console[_0x4b87eb(0xc0)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console[_0x4b87eb(0xc0)]('');if(_0x29985d[_0x4b87eb(0xbf)]){const {currentVersion:_0x4e8aa9,field:_0x306fed,pkgPath:_0x33aa3b}=_0x29985d[_0x4b87eb(0xbf)];console['log'](a213_0x503330[_0x4b87eb(0xd8)](_0x4b87eb(0xe1))+('\x20\x20'+a213_0x503330[_0x4b87eb(0xf7)](_0x33aa3b))),console[_0x4b87eb(0xc0)](_0x4b87eb(0xd5)+_0x306fed+':\x20'+a213_0x503330['yellow'](_0x4e8aa9)+_0x4b87eb(0xf5)+a213_0x503330[_0x4b87eb(0xc6)](_0x4b87eb(0xe2))),console[_0x4b87eb(0xc0)](_0x4b87eb(0xfa));}else console[_0x4b87eb(0xc0)](a213_0x503330[_0x4b87eb(0xd8)]('@lovrabet/sdk:')+'\x20\x20'+a213_0x503330['gray']('not\x20found\x20or\x20already\x20at\x20latest'));console['log']('');}function execUpgradeSdk(_0x3c47c0){const _0x28dc6f=a213_0x2df8;if(!_0x3c47c0[_0x28dc6f(0xbf)])return{'step':0x1,'label':_0x28dc6f(0xc9),'ok':!![],'detail':_0x28dc6f(0xe7)};const {pkgPath:_0x13877c,currentVersion:_0x44ff3e,field:_0x8925e5}=_0x3c47c0[_0x28dc6f(0xbf)];try{const _0x45b0b5=readFileSync(_0x13877c,_0x28dc6f(0xde)),_0x1cd712=JSON['parse'](_0x45b0b5);return _0x1cd712[_0x8925e5][_0x28dc6f(0xfb)]='latest',writeFileSync(_0x13877c,JSON[_0x28dc6f(0xf6)](_0x1cd712,null,0x2)+'\x0a',_0x28dc6f(0xde)),{'step':0x1,'label':_0x28dc6f(0xc9),'ok':!![],'detail':_0x8925e5+_0x28dc6f(0x106)+_0x44ff3e+_0x28dc6f(0xc7)};}catch(_0x44adf4){return{'step':0x1,'label':_0x28dc6f(0xc9),'ok':![],'detail':_0x44adf4 instanceof Error?_0x44adf4[_0x28dc6f(0xda)]:String(_0x44adf4)};}}function printSummary(_0x285dac){const _0x4163d8=a213_0x2df8;console[_0x4163d8(0xc0)](''),console[_0x4163d8(0xc0)](a213_0x503330[_0x4163d8(0xf4)](_0x4163d8(0xe9))),console['log']('');for(const _0x330a9b of _0x285dac){const _0x173c1b=_0x330a9b['ok']?a213_0x503330[_0x4163d8(0xc6)]('OK'):a213_0x503330['red'](_0x4163d8(0xce));console[_0x4163d8(0xc0)]('\x20\x20'+_0x173c1b+_0x4163d8(0xf2)+_0x330a9b[_0x4163d8(0xec)]+':\x20'+_0x330a9b[_0x4163d8(0xd9)]);if(_0x330a9b['detail'])console[_0x4163d8(0xc0)]('\x20\x20\x20\x20\x20\x20\x20'+a213_0x503330['gray'](_0x330a9b[_0x4163d8(0xe8)]));}console['log']('');}function a213_0x2df8(_0x1947ec,_0x4bfb23){_0x1947ec=_0x1947ec-0xbf;const _0x5a60e4=a213_0x5a60();let _0x2df87c=_0x5a60e4[_0x1947ec];return _0x2df87c;}export async function upgradeApp(_0x21b55e,_0x3c767a){const _0x17c196=a213_0x2df8,_0x29424e=process[_0x17c196(0xd7)](),_0x18683f=analyseProjectUpgrade(_0x29424e);if(!_0x18683f['sdkUpgrade']&&!_0x18683f['apiArchitecture'][_0x17c196(0xc3)])return console['log'](a213_0x503330[_0x17c196(0xc6)]('Your\x20project\x20is\x20already\x20up-to-date.')),{'analysis':_0x18683f,'steps':[],'completed':!![]};printReport(_0x18683f);const _0x15d86c=!!(_0x3c767a[_0x17c196(0x10d)]||_0x3c767a['Y']||_0x21b55e);if(!_0x15d86c)try{const _0x1230e2=await askConfirm(_0x17c196(0xfd));if(!_0x1230e2)return console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xc1)](_0x17c196(0xee))),{'analysis':_0x18683f,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x1b4c11){if(_0x1b4c11?.['message']===_0x17c196(0xd6))return console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xc1)](_0x17c196(0xee))),{'analysis':_0x18683f,'steps':[],'completed':![],'cancelled':!![]};throw _0x1b4c11;}const _0x453082=[],_0x442f2e=a213_0x599c15({'text':'Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x17c196(0xd8)})[_0x17c196(0xc5)](),_0x3a54a2=execUpgradeSdk(_0x18683f);_0x453082[_0x17c196(0x10a)](_0x3a54a2),_0x442f2e[_0x3a54a2['ok']?_0x17c196(0xc2):'fail'](_0x17c196(0xdf)+(_0x3a54a2['detail']??(_0x3a54a2['ok']?_0x17c196(0xeb):_0x17c196(0xc8))));const _0x17232f=a213_0x599c15({'text':_0x17c196(0xfc),'color':_0x17c196(0xd8)})[_0x17c196(0xc5)]();let _0x4b7015;try{_0x4b7015=await upgradeProjectApiArchitecture(_0x29424e);const _0x35c118=_0x4b7015['manualMergeRequired']?_0x17c196(0x100):_0x17c196(0x109);_0x17232f[_0x17c196(0xc2)]('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x35c118),_0x453082['push']({'step':0x2,'label':_0x17c196(0xd1),'ok':!![],'detail':_0x35c118});}catch(_0x582ecb){const _0x34572f=_0x582ecb instanceof Error?_0x582ecb[_0x17c196(0xda)]:String(_0x582ecb);_0x17232f['fail'](_0x17c196(0x10c)+_0x34572f),_0x453082['push']({'step':0x2,'label':_0x17c196(0xd1),'ok':![],'detail':_0x34572f});}printSummary(_0x453082);const _0x568775=_0x453082['some'](_0x1014c7=>!_0x1014c7['ok']);if(_0x568775)console[_0x17c196(0xc0)](a213_0x503330['yellow'](_0x17c196(0xdb)));else _0x4b7015?.[_0x17c196(0xdc)]?console['log'](a213_0x503330[_0x17c196(0xf7)](_0x17c196(0xd2))):console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xc6)]('Upgrade\x20completed\x20successfully!'));return _0x3a54a2['ok']&&_0x18683f[_0x17c196(0xbf)]&&(console[_0x17c196(0xc0)](''),console['log'](a213_0x503330[_0x17c196(0xf4)]['cyan'](_0x17c196(0xff))),console['log'](a213_0x503330[_0x17c196(0xd8)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x17c196(0xc0)](''),console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xf9)](_0x17c196(0xe0))),console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xf9)]('\x20\x20#\x20or')),console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xf9)]('\x20\x20bun\x20install')),console[_0x17c196(0xc0)]('')),{'analysis':_0x18683f,'steps':_0x453082,'apiArchitecture':_0x4b7015,'completed':!_0x568775&&!_0x4b7015?.[_0x17c196(0xdc)]};}
1
+ (function(_0x549cd4,_0x155782){const _0x40a808=a213_0x3f47,_0x3a7d56=_0x549cd4();while(!![]){try{const _0x1e850d=parseInt(_0x40a808(0x1f5))/0x1+parseInt(_0x40a808(0x1e4))/0x2+-parseInt(_0x40a808(0x20d))/0x3*(-parseInt(_0x40a808(0x1e2))/0x4)+parseInt(_0x40a808(0x1ff))/0x5+parseInt(_0x40a808(0x1d8))/0x6*(-parseInt(_0x40a808(0x1fe))/0x7)+-parseInt(_0x40a808(0x1ea))/0x8*(-parseInt(_0x40a808(0x1d9))/0x9)+-parseInt(_0x40a808(0x200))/0xa;if(_0x1e850d===_0x155782)break;else _0x3a7d56['push'](_0x3a7d56['shift']());}catch(_0x14f1d1){_0x3a7d56['push'](_0x3a7d56['shift']());}}}(a213_0x11bc,0xea397));import a213_0x49de56 from'chalk';import a213_0x50be76 from'ora';function a213_0x3f47(_0x22db37,_0x1fc900){_0x22db37=_0x22db37-0x1ce;const _0x11bcfe=a213_0x11bc();let _0x3f4718=_0x11bcfe[_0x22db37];return _0x3f4718;}import{existsSync,readFileSync,writeFileSync}from'node:fs';function a213_0x11bc(){const _0x4c03bf=['\x20→\x20latest','@lovrabet/sdk:','cyan','apiArchitecture','devDependencies','Upgrade\x20application\x20source','CANCEL','@lovrabet/sdk','487041CAiJfq','parse','length','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','detail','source\x20structure\x20is\x20current','green','Step\x202/2:\x20Application\x20source\x20—\x20','\x20\x20npm\x20install','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','upgrade\x20needed','sdkUpgrade','candidatePath','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20\x20\x20','log','===\x20Upgrade\x20Analysis\x20===','\x20\x20#\x20or','bold','message','stringify','done','path','Proceed\x20with\x20upgrade?','profiles','6SMjjRc','7704lMQajF','Upgrade\x20@lovrabet/sdk','groups','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20bun\x20install','fail','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','\x20\x20\x20\x20\x20\x20\x20','Upgrade\x20cancelled.','36Wswpjx','needed','2386802SJIGnk','red','up-to-date','label','cwd','Your\x20project\x20is\x20already\x20up-to-date.','5800OsmTKK','string','gray','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','utf8','FAIL','\x20→\x20','white','object','latest','step','1156824UVxyAf','===\x20Upgrade\x20Summary\x20===','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','\x20\x20\x20\x20\x20\x20candidate:\x20','package.json','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','skippedLegacyDirectories','failed','start','427441EjPjsV','3194690YnACyc','40504400uZCJOx','manualMergeRequired','push','yellow','\x20\x20Step\x20'];a213_0x11bc=function(){return _0x4c03bf;};return a213_0x11bc();}import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x27861f){const _0x520cca=a213_0x3f47;try{const _0x290e5f=JSON[_0x520cca(0x20e)](readFileSync(_0x27861f,_0x520cca(0x1ee)));return _0x290e5f&&typeof _0x290e5f===_0x520cca(0x1f2)?_0x290e5f:{};}catch{return{};}}export function analyseProjectUpgrade(_0x44edc9){const _0x3a2d63=a213_0x3f47;let _0x5b1c82=null;const _0x1ae884=resolve(_0x44edc9,_0x3a2d63(0x1f9));if(existsSync(_0x1ae884))try{const _0x134005=JSON[_0x3a2d63(0x20e)](readFileSync(_0x1ae884,_0x3a2d63(0x1ee)));for(const _0xc3621c of['dependencies',_0x3a2d63(0x209)]){const _0x1c3d91=_0x134005?.[_0xc3621c]?.[_0x3a2d63(0x20c)];if(typeof _0x1c3d91===_0x3a2d63(0x1eb)){_0x1c3d91!==_0x3a2d63(0x1f3)&&(_0x5b1c82={'pkgPath':_0x1ae884,'currentVersion':_0x1c3d91,'field':_0xc3621c});break;}}}catch{}const _0x43e945=resolve(_0x44edc9,NEW_CONFIG_NAME),_0xed27e0=existsSync(_0x43e945)?readProjectConfig(_0x43e945):{},_0x18e005=analyzeProjectApiArchitecture(_0x44edc9,_0xed27e0);return{'sdkUpgrade':_0x5b1c82,'apiArchitecture':_0x18e005};}function printReport(_0x37c904){const _0x4588e1=a213_0x3f47;console[_0x4588e1(0x1ce)](''),console[_0x4588e1(0x1ce)](a213_0x49de56[_0x4588e1(0x1d1)](_0x4588e1(0x1cf))),console[_0x4588e1(0x1ce)](''),console[_0x4588e1(0x1ce)](a213_0x49de56[_0x4588e1(0x207)]('Application\x20source:')+('\x20\x20'+(_0x37c904[_0x4588e1(0x208)][_0x4588e1(0x1e3)]?a213_0x49de56[_0x4588e1(0x203)](_0x4588e1(0x217)):a213_0x49de56[_0x4588e1(0x213)](_0x4588e1(0x1e6)))));for(const _0x56e3e3 of _0x37c904['apiArchitecture'][_0x4588e1(0x1db)]){console[_0x4588e1(0x1ce)]('\x20\x20'+_0x56e3e3['apiDir']+'\x20('+_0x56e3e3[_0x4588e1(0x1d7)]['join'](',\x20')+')');for(const _0x2694d9 of _0x56e3e3['files']){console['log'](_0x4588e1(0x21c)+_0x2694d9['action']['padEnd'](0x11)+'\x20'+_0x2694d9[_0x4588e1(0x1d5)]),_0x2694d9[_0x4588e1(0x219)]&&console[_0x4588e1(0x1ce)](_0x4588e1(0x1f8)+_0x2694d9['candidatePath']);}}_0x37c904[_0x4588e1(0x208)][_0x4588e1(0x1fb)][_0x4588e1(0x20f)]>0x0&&console[_0x4588e1(0x1ce)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console[_0x4588e1(0x1ce)]('');if(_0x37c904[_0x4588e1(0x218)]){const {currentVersion:_0x56613b,field:_0x33406a,pkgPath:_0x59e7a3}=_0x37c904[_0x4588e1(0x218)];console['log'](a213_0x49de56[_0x4588e1(0x207)](_0x4588e1(0x206))+('\x20\x20'+a213_0x49de56[_0x4588e1(0x203)](_0x59e7a3))),console[_0x4588e1(0x1ce)]('\x20\x20Current\x20version\x20in\x20'+_0x33406a+':\x20'+a213_0x49de56[_0x4588e1(0x203)](_0x56613b)+_0x4588e1(0x1f0)+a213_0x49de56[_0x4588e1(0x213)]('latest')),console[_0x4588e1(0x1ce)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x4588e1(0x1ce)](a213_0x49de56[_0x4588e1(0x207)](_0x4588e1(0x206))+'\x20\x20'+a213_0x49de56[_0x4588e1(0x1ec)](_0x4588e1(0x21b)));console[_0x4588e1(0x1ce)]('');}function execUpgradeSdk(_0x313e11){const _0x313f73=a213_0x3f47;if(!_0x313e11[_0x313f73(0x218)])return{'step':0x1,'label':_0x313f73(0x1da),'ok':!![],'detail':_0x313f73(0x210)};const {pkgPath:_0x321059,currentVersion:_0x1efb1c,field:_0x40fac4}=_0x313e11[_0x313f73(0x218)];try{const _0x1f577f=readFileSync(_0x321059,_0x313f73(0x1ee)),_0x2008ab=JSON[_0x313f73(0x20e)](_0x1f577f);return _0x2008ab[_0x40fac4][_0x313f73(0x20c)]=_0x313f73(0x1f3),writeFileSync(_0x321059,JSON[_0x313f73(0x1d3)](_0x2008ab,null,0x2)+'\x0a','utf8'),{'step':0x1,'label':_0x313f73(0x1da),'ok':!![],'detail':_0x40fac4+_0x313f73(0x1dc)+_0x1efb1c+_0x313f73(0x205)};}catch(_0x87530f){return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x87530f instanceof Error?_0x87530f[_0x313f73(0x1d2)]:String(_0x87530f)};}}function printSummary(_0x1a123e){const _0x5afd33=a213_0x3f47;console[_0x5afd33(0x1ce)](''),console['log'](a213_0x49de56[_0x5afd33(0x1d1)](_0x5afd33(0x1f6))),console[_0x5afd33(0x1ce)]('');for(const _0x2a59ac of _0x1a123e){const _0x361cee=_0x2a59ac['ok']?a213_0x49de56[_0x5afd33(0x213)]('OK'):a213_0x49de56[_0x5afd33(0x1e5)](_0x5afd33(0x1ef));console['log']('\x20\x20'+_0x361cee+_0x5afd33(0x204)+_0x2a59ac[_0x5afd33(0x1f4)]+':\x20'+_0x2a59ac[_0x5afd33(0x1e7)]);if(_0x2a59ac[_0x5afd33(0x211)])console['log'](_0x5afd33(0x1e0)+a213_0x49de56['gray'](_0x2a59ac['detail']));}console[_0x5afd33(0x1ce)]('');}export async function upgradeApp(_0x105009,_0x72d3b2){const _0x3af8d1=a213_0x3f47,_0x5459f3=process[_0x3af8d1(0x1e8)](),_0x6d8634=analyseProjectUpgrade(_0x5459f3);if(!_0x6d8634['sdkUpgrade']&&!_0x6d8634[_0x3af8d1(0x208)][_0x3af8d1(0x1e3)])return console['log'](a213_0x49de56[_0x3af8d1(0x213)](_0x3af8d1(0x1e9))),{'analysis':_0x6d8634,'steps':[],'completed':!![]};printReport(_0x6d8634);const _0x7d1022=!!(_0x72d3b2['yes']||_0x72d3b2['Y']||_0x105009);if(!_0x7d1022)try{const _0x1eb855=await askConfirm(_0x3af8d1(0x1d6));if(!_0x1eb855)return console[_0x3af8d1(0x1ce)](a213_0x49de56[_0x3af8d1(0x1ec)](_0x3af8d1(0x1e1))),{'analysis':_0x6d8634,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x54fb04){if(_0x54fb04?.['message']===_0x3af8d1(0x20b))return console[_0x3af8d1(0x1ce)](a213_0x49de56['gray'](_0x3af8d1(0x1e1))),{'analysis':_0x6d8634,'steps':[],'completed':![],'cancelled':!![]};throw _0x54fb04;}const _0x5bf143=[],_0x4bdf58=a213_0x50be76({'text':'Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x3af8d1(0x207)})[_0x3af8d1(0x1fd)](),_0x532ad9=execUpgradeSdk(_0x6d8634);_0x5bf143[_0x3af8d1(0x202)](_0x532ad9),_0x4bdf58[_0x532ad9['ok']?'succeed':_0x3af8d1(0x1de)](_0x3af8d1(0x1fa)+(_0x532ad9[_0x3af8d1(0x211)]??(_0x532ad9['ok']?_0x3af8d1(0x1d4):_0x3af8d1(0x1fc))));const _0x38e4cc=a213_0x50be76({'text':'Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','color':_0x3af8d1(0x207)})[_0x3af8d1(0x1fd)]();let _0x3a0ffa;try{_0x3a0ffa=await upgradeProjectApiArchitecture(_0x5459f3);const _0x2cbd66=_0x3a0ffa[_0x3af8d1(0x201)]?_0x3af8d1(0x1f7):_0x3af8d1(0x212);_0x38e4cc['succeed'](_0x3af8d1(0x214)+_0x2cbd66),_0x5bf143[_0x3af8d1(0x202)]({'step':0x2,'label':_0x3af8d1(0x20a),'ok':!![],'detail':_0x2cbd66});}catch(_0x41b672){const _0x20439a=_0x41b672 instanceof Error?_0x41b672[_0x3af8d1(0x1d2)]:String(_0x41b672);_0x38e4cc[_0x3af8d1(0x1de)](_0x3af8d1(0x214)+_0x20439a),_0x5bf143[_0x3af8d1(0x202)]({'step':0x2,'label':_0x3af8d1(0x20a),'ok':![],'detail':_0x20439a});}printSummary(_0x5bf143);const _0x599b2a=_0x5bf143['some'](_0x381b2d=>!_0x381b2d['ok']);if(_0x599b2a)console[_0x3af8d1(0x1ce)](a213_0x49de56[_0x3af8d1(0x203)](_0x3af8d1(0x216)));else _0x3a0ffa?.[_0x3af8d1(0x201)]?console[_0x3af8d1(0x1ce)](a213_0x49de56['yellow'](_0x3af8d1(0x1df))):console[_0x3af8d1(0x1ce)](a213_0x49de56['green']('Upgrade\x20completed\x20successfully!'));return _0x532ad9['ok']&&_0x6d8634['sdkUpgrade']&&(console[_0x3af8d1(0x1ce)](''),console[_0x3af8d1(0x1ce)](a213_0x49de56['bold'][_0x3af8d1(0x207)](_0x3af8d1(0x21a))),console['log'](a213_0x49de56['cyan'](_0x3af8d1(0x1ed))),console[_0x3af8d1(0x1ce)](''),console[_0x3af8d1(0x1ce)](a213_0x49de56['white'](_0x3af8d1(0x215))),console[_0x3af8d1(0x1ce)](a213_0x49de56[_0x3af8d1(0x1f1)](_0x3af8d1(0x1d0))),console['log'](a213_0x49de56['white'](_0x3af8d1(0x1dd))),console['log']('')),{'analysis':_0x6d8634,'steps':_0x5bf143,'apiArchitecture':_0x3a0ffa,'completed':!_0x599b2a&&!_0x3a0ffa?.[_0x3af8d1(0x201)]};}
@@ -1 +1 @@
1
- const a214_0x1c9491=a214_0x3495;(function(_0x27375e,_0x18e11d){const _0x1a8a05=a214_0x3495,_0x31be0c=_0x27375e();while(!![]){try{const _0x59f518=-parseInt(_0x1a8a05(0x193))/0x1*(parseInt(_0x1a8a05(0x1ca))/0x2)+-parseInt(_0x1a8a05(0x188))/0x3+-parseInt(_0x1a8a05(0x17f))/0x4*(parseInt(_0x1a8a05(0x191))/0x5)+-parseInt(_0x1a8a05(0x196))/0x6*(-parseInt(_0x1a8a05(0x1b9))/0x7)+-parseInt(_0x1a8a05(0x176))/0x8*(-parseInt(_0x1a8a05(0x1b0))/0x9)+parseInt(_0x1a8a05(0x1ba))/0xa+-parseInt(_0x1a8a05(0x1d5))/0xb*(-parseInt(_0x1a8a05(0x1c0))/0xc);if(_0x59f518===_0x18e11d)break;else _0x31be0c['push'](_0x31be0c['shift']());}catch(_0x280c7d){_0x31be0c['push'](_0x31be0c['shift']());}}}(a214_0x1475,0x71fab));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';function a214_0x1475(){const _0x5c92fa=['rabetbase\x20page\x20custom-list','app:use','knowledge-base:create','page:react-update','rabetbase\x20workspace\x20remove\x20<name>','permit:role-menus-set','filter','length','User\x20Accounts','\x20\x20[high-risk-write]','Deployment','rabetbase\x20page\x20custom-publish','File','rabetbase\x20run\x20build','show','skills:install','project:init','502101lgvCDV','rabetbase\x20kb\x20create','Schema','values','push','Run\x20Scripts','`\x20instead.','Run\x20any\x20package.json\x20script','sql:save','6424152lpxreq','3981390lfPbwd','page:standard-page-status','permit:role-apis-set','wildcardDef','risk','rabetbase\x20project\x20create\x20<project-name>','3121884wVpggu','has','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Use\x20`','rabetbase\x20kb\x20detail','app:remote','rabetbase\x20role\x20list','Roles','rabetbase\x20cli-skill\x20install','rabetbase\x20bff\x20create','200258wbBMfT','rabetbase\x20kb\x20delete','rabetbase\x20kb\x20update','\x20\x20[','install','menu:update','SQL\x20Queries','hidden','page:react-detail','Async\x20Tasks','knowledge-base:list','11QowNQO','set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','flow:enable','Backend\x20Function\x20Scripts','service','Database\x20Connections','rabetbase\x20page\x20data-list-status','data:filter','read','Menu','rabetbase\x20auth\x20logout','rabetbase\x20workspace\x20use\x20--app\x20<name>','Notification\x20Configuration','rabetbase\x20app\x20list\x20--remote','`\x20has\x20been\x20removed.','Diagnostics','knowledge-base:delete','rabetbase\x20run\x20preview','8XAqmhc','start','page:react-create','knowledge-base:detail','isSingleCommand','Self\x20Update','Dataset\x20&\x20Operations','Code\x20Generation','skills:','23624rswwfu','skill:install','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','rabetbase\x20sql\x20create','permit:page-get','Authentication','page:react-list','rabetbase\x20page\x20custom-update','Logs','1617597kgMMMo','sql:new','data:getOne','page:custom-create','login','get','write','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','bff:new','445MsEmtf','rabetbase\x20kb\x20list','1bLTkGS','app:add','Runtime\x20App\x20Config\x20Management','6DIKzDM','permit:page-set','logout','Project','Platform\x20Issue','map','Workspace','command','defaultCommand'];a214_0x1475=function(){return _0x5c92fa;};return a214_0x1475();}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';function a214_0x3495(_0x6fdc72,_0xbd60a2){_0x6fdc72=_0x6fdc72-0x173;const _0x1475c9=a214_0x1475();let _0x349516=_0x1475c9[_0x6fdc72];return _0x349516;}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{flowDefinitions}from'../commands/flow/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 registerDefinitions(_0x122f77){const _0x1b3321=a214_0x3495;for(const _0x418962 of _0x122f77){definitions[_0x1b3321(0x1d6)](_0x418962[_0x1b3321(0x1da)]+':'+_0x418962[_0x1b3321(0x19d)],_0x418962);let _0x29d430=serviceGroups[_0x1b3321(0x18d)](_0x418962[_0x1b3321(0x1da)]);!_0x29d430&&(_0x29d430=[],serviceGroups[_0x1b3321(0x1d6)](_0x418962['service'],_0x29d430)),_0x29d430[_0x1b3321(0x1b4)](_0x418962);}}function registerDeclarativeService(_0x28c2de,_0x16332e,_0x3538da){const _0x8912b4=a214_0x3495;registerDefinitions(_0x16332e);_0x3538da?.[_0x8912b4(0x1bd)]&&registerDefinitions([_0x3538da[_0x8912b4(0x1bd)]]);const _0x3a357b=_0xa51049=>_0xa51049===_0x8912b4(0x1de)?'':_0xa51049===_0x8912b4(0x18e)?'\x20\x20[write]':_0x8912b4(0x1a8),_0x6b1b82={'service':_0x16332e[0x0][_0x8912b4(0x1da)],'label':_0x28c2de,'commands':_0x16332e[_0x8912b4(0x1a5)](_0x2e6843=>!_0x2e6843[_0x8912b4(0x1d1)])[_0x8912b4(0x19b)](_0x440769=>({'command':_0x440769[_0x8912b4(0x19d)],'description':_0x440769['description'],'tag':_0x3a357b(_0x440769[_0x8912b4(0x1be)])})),'declarative':!![],'defaultCommand':_0x3538da?.[_0x8912b4(0x19e)]??(_0x3538da?.['isSingleCommand']?_0x16332e[0x0][_0x8912b4(0x19d)]:undefined),'wildcardDef':_0x3538da?.[_0x8912b4(0x1bd)],'isSingleCommand':_0x3538da?.[_0x8912b4(0x17a)]};serviceRegistry[_0x8912b4(0x1b4)](_0x6b1b82),serviceByName[_0x8912b4(0x1d6)](_0x6b1b82[_0x8912b4(0x1da)],_0x6b1b82);}registerDeclarativeService(a214_0x1c9491(0x199),projectDefinitions),registerDeclarativeService(a214_0x1c9491(0x19c),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a214_0x1c9491(0x184),authDefinitions,{'defaultCommand':a214_0x1c9491(0x18c)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService(a214_0x1c9491(0x1a7),userAccountDefinitions),registerDeclarativeService(a214_0x1c9491(0x17c),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a214_0x1c9491(0x1d9),bffDefinitions),registerDeclarativeService('Instant\x20API\x20Policy',instantApiPolicyDefinitions),registerDeclarativeService(a214_0x1c9491(0x1e2),notificationDefinitions),registerDeclarativeService(a214_0x1c9491(0x1d0),sqlDefinitions),registerDeclarativeService(a214_0x1c9491(0x1db),dbDefinitions),registerDeclarativeService(a214_0x1c9491(0x1a9),deploymentDefinitions),registerDeclarativeService(a214_0x1c9491(0x1df),menuDefinitions),registerDeclarativeService(a214_0x1c9491(0x1d3),taskDefinitions),registerDeclarativeService(a214_0x1c9491(0x1c7),roleDefinitions),registerDeclarativeService(a214_0x1c9491(0x195),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a214_0x1c9491(0x19a),issueDefinitions),registerDeclarativeService(a214_0x1c9491(0x1ab),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a214_0x1c9491(0x17d),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a214_0x1c9491(0x173),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x1c9491(0x1b2),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x1c9491(0x17b),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a214_0x1c9491(0x1ce)}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a214_0x1c9491(0x187),logsDefinitions,{'defaultCommand':a214_0x1c9491(0x1ad)}),registerDeclarativeService(a214_0x1c9491(0x1b5),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a214_0x1c9491(0x1a6)]-0x1];last['commands']=[{'command':'<script>','description':a214_0x1c9491(0x1b7),'tag':a214_0x1c9491(0x1cd)+runDefinition[a214_0x1c9491(0x1be)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a214_0x1c9491(0x1b8),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a214_0x1c9491(0x190),a214_0x1c9491(0x1c9)],[a214_0x1c9491(0x189),a214_0x1c9491(0x182)],[a214_0x1c9491(0x1cf),'rabetbase\x20menu\x20asset-update'],[a214_0x1c9491(0x1af),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],['skill:',a214_0x1c9491(0x1c8)],[a214_0x1c9491(0x180),a214_0x1c9491(0x1c8)],[a214_0x1c9491(0x17e),a214_0x1c9491(0x1c8)],[a214_0x1c9491(0x1ae),a214_0x1c9491(0x1c8)],[a214_0x1c9491(0x1c5),a214_0x1c9491(0x1e3)],[a214_0x1c9491(0x1a0),a214_0x1c9491(0x1e1)],[a214_0x1c9491(0x194),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],['app:remove',a214_0x1c9491(0x1a3)],[a214_0x1c9491(0x1d4),a214_0x1c9491(0x192)],[a214_0x1c9491(0x179),a214_0x1c9491(0x1c4)],[a214_0x1c9491(0x1a1),a214_0x1c9491(0x1b1)],['knowledge-base:update',a214_0x1c9491(0x1cc)],[a214_0x1c9491(0x174),a214_0x1c9491(0x1cb)],['role:create',a214_0x1c9491(0x1c6)],[a214_0x1c9491(0x1dd),'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27'],[a214_0x1c9491(0x18a),'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],[a214_0x1c9491(0x1bb),a214_0x1c9491(0x1dc)],[a214_0x1c9491(0x178),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a214_0x1c9491(0x18b),a214_0x1c9491(0x1c2)],[a214_0x1c9491(0x185),a214_0x1c9491(0x19f)],[a214_0x1c9491(0x1d2),'rabetbase\x20page\x20custom-detail'],[a214_0x1c9491(0x1a2),a214_0x1c9491(0x186)],['page:react-publish',a214_0x1c9491(0x1aa)]]),REMOVED_COMMAND_HINTS=new Map([[a214_0x1c9491(0x1d8),a214_0x1c9491(0x18f)],['flow:disable',a214_0x1c9491(0x18f)],['deployment:sync',a214_0x1c9491(0x181)],[a214_0x1c9491(0x183),a214_0x1c9491(0x1d7)],[a214_0x1c9491(0x197),a214_0x1c9491(0x1d7)],['permit:role-menus',a214_0x1c9491(0x1d7)],[a214_0x1c9491(0x1a4),a214_0x1c9491(0x1d7)],[a214_0x1c9491(0x1bc),a214_0x1c9491(0x1d7)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a214_0x1c9491(0x1bf)],[a214_0x1c9491(0x177),'rabetbase\x20run\x20start'],['build',a214_0x1c9491(0x1ac)],['preview',a214_0x1c9491(0x175)],[a214_0x1c9491(0x198),a214_0x1c9491(0x1e0)]]);export function resolveRemovedCommand(_0x2a97e6,_0x5e4208){const _0x1cc728=a214_0x1c9491;if(!_0x2a97e6)return undefined;const _0x3ad60e=REMOVED_COMMAND_REPLACEMENTS['get'](_0x2a97e6+':'+(_0x5e4208??'')),_0x2c6e7f=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x1cc728(0x18d)](_0x2a97e6),_0x17599b=_0x3ad60e??_0x2c6e7f,_0x115344=REMOVED_COMMAND_HINTS['get'](_0x2a97e6+':'+(_0x5e4208??''));if(!_0x17599b&&!_0x115344)return undefined;const _0xed8c3=_0x2c6e7f?_0x2a97e6:_0x5e4208?_0x2a97e6+'\x20'+_0x5e4208:_0x2a97e6;return{'command':_0xed8c3,'message':'`rabetbase\x20'+_0xed8c3+_0x1cc728(0x1e4),'hint':_0x115344??_0x1cc728(0x1c3)+_0x17599b+_0x1cc728(0x1b6)};}export function findDefinition(_0x46a2f3,_0x46a1a5){const _0x13fc8e=a214_0x1c9491;return definitions[_0x13fc8e(0x18d)](_0x46a2f3+':'+_0x46a1a5);}export function isKnownService(_0x3951e0){const _0x553609=a214_0x1c9491;return serviceByName[_0x553609(0x1c1)](_0x3951e0);}export function isDeclarativeService(_0x3b3165){return serviceGroups['has'](_0x3b3165)||serviceByName['get'](_0x3b3165)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x5f58c3){const _0x5c222d=a214_0x1c9491;return serviceByName[_0x5c222d(0x18d)](_0x5f58c3);}export function getLegacyHandler(_0x591318,_0xa58352){return undefined;}export function getAllDefinitions(){const _0x1c2767=a214_0x1c9491;return Array['from'](definitions[_0x1c2767(0x1b3)]());}
1
+ const a214_0x173b09=a214_0x29ee;(function(_0x8389bc,_0x199505){const _0x338684=a214_0x29ee,_0x3932a1=_0x8389bc();while(!![]){try{const _0x205625=-parseInt(_0x338684(0x215))/0x1*(parseInt(_0x338684(0x227))/0x2)+parseInt(_0x338684(0x20c))/0x3*(-parseInt(_0x338684(0x211))/0x4)+-parseInt(_0x338684(0x212))/0x5+-parseInt(_0x338684(0x229))/0x6+parseInt(_0x338684(0x1ed))/0x7+-parseInt(_0x338684(0x241))/0x8+parseInt(_0x338684(0x20f))/0x9*(parseInt(_0x338684(0x242))/0xa);if(_0x205625===_0x199505)break;else _0x3932a1['push'](_0x3932a1['shift']());}catch(_0x2198a1){_0x3932a1['push'](_0x3932a1['shift']());}}}(a214_0x4712,0x4fa00));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{flowDefinitions}from'../commands/flow/index.js';function a214_0x4712(){const _0x5a0889=['8aZgPbs','825330kmmduN','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','sql:new','1wMOiJW','risk','rabetbase\x20page\x20custom-publish','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','knowledge-base:detail','rabetbase\x20sql\x20create','rabetbase\x20page\x20custom-detail','\x20\x20[high-risk-write]','hidden','push','bff:new','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Tenant\x20Members','User\x20Accounts','rabetbase\x20workspace\x20use\x20--app\x20<name>','install','start','127010ssXkKB','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','3306534zlWwjq','Schema','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','from','commands','page:react-list','values','rabetbase\x20kb\x20update','rabetbase\x20page\x20custom-update','File','preview','Dataset\x20&\x20Operations','rabetbase\x20kb\x20delete','rabetbase\x20project\x20create\x20<project-name>','flow:enable','rabetbase\x20run\x20build','write','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','flow:disable','permit:role-apis-set','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Self\x20Update','Notification\x20Configuration','permit:role-menus','3897248nfDAAt','10BZxZmA','Authentication','Project','Deployment','filter','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','knowledge-base:create','CLI\x20Built-in\x20Skill','app:add','rabetbase\x20menu\x20asset-update','Menu','Backend\x20Function\x20Scripts','service','app:remote','build','has','rabetbase\x20role\x20list','rabetbase\x20run\x20preview','skills:','`rabetbase\x20','\x20\x20[write]','permit:page-get','login','map','set','data:filter','wildcardDef','read','permit:page-set','permit:role-menus-set','get','knowledge-base:update','638533gzSxly','Code\x20Generation','Diagnostics','Runtime\x20App\x20Config\x20Management','isSingleCommand','rabetbase\x20cli-skill\x20install','Logs','Run\x20Scripts','Instant\x20API\x20Policy','page:react-detail','Platform\x20Issue','rabetbase\x20kb\x20list','menu:update','length','rabetbase\x20app\x20list\x20--remote','<script>','Configuration','API\x20Development','`\x20has\x20been\x20removed.','skill:','app:use','rabetbase\x20workspace\x20remove\x20<name>','Roles','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','command','role:create','rabetbase\x20page\x20data-list-status','logout','rabetbase\x20bff\x20create','show','page:react-create','617634QXpXkw','\x20\x20[','rabetbase\x20auth\x20logout','17221473RmoMSc','Async\x20Tasks'];a214_0x4712=function(){return _0x5a0889;};return a214_0x4712();}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 a214_0x29ee(_0x5d20ce,_0x4fc089){_0x5d20ce=_0x5d20ce-0x1e8;const _0x471240=a214_0x4712();let _0x29eee2=_0x471240[_0x5d20ce];return _0x29eee2;}function registerDefinitions(_0x2ba541){const _0x49f090=a214_0x29ee;for(const _0x521c71 of _0x2ba541){definitions['set'](_0x521c71[_0x49f090(0x24e)]+':'+_0x521c71[_0x49f090(0x205)],_0x521c71);let _0x323667=serviceGroups['get'](_0x521c71[_0x49f090(0x24e)]);!_0x323667&&(_0x323667=[],serviceGroups['set'](_0x521c71[_0x49f090(0x24e)],_0x323667)),_0x323667[_0x49f090(0x21f)](_0x521c71);}}function registerDeclarativeService(_0xaeff03,_0x5dc84f,_0x59a9cf){const _0x3e518e=a214_0x29ee;registerDefinitions(_0x5dc84f);_0x59a9cf?.[_0x3e518e(0x25c)]&&registerDefinitions([_0x59a9cf[_0x3e518e(0x25c)]]);const _0x29ca93=_0x4db830=>_0x4db830===_0x3e518e(0x1e8)?'':_0x4db830===_0x3e518e(0x239)?_0x3e518e(0x256):_0x3e518e(0x21d),_0x4e7983={'service':_0x5dc84f[0x0]['service'],'label':_0xaeff03,'commands':_0x5dc84f[_0x3e518e(0x246)](_0xd0bfef=>!_0xd0bfef[_0x3e518e(0x21e)])[_0x3e518e(0x259)](_0x181791=>({'command':_0x181791[_0x3e518e(0x205)],'description':_0x181791['description'],'tag':_0x29ca93(_0x181791[_0x3e518e(0x216)])})),'declarative':!![],'defaultCommand':_0x59a9cf?.['defaultCommand']??(_0x59a9cf?.[_0x3e518e(0x1f1)]?_0x5dc84f[0x0][_0x3e518e(0x205)]:undefined),'wildcardDef':_0x59a9cf?.[_0x3e518e(0x25c)],'isSingleCommand':_0x59a9cf?.[_0x3e518e(0x1f1)]};serviceRegistry[_0x3e518e(0x21f)](_0x4e7983),serviceByName[_0x3e518e(0x25a)](_0x4e7983[_0x3e518e(0x24e)],_0x4e7983);}registerDeclarativeService(a214_0x173b09(0x244),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a214_0x173b09(0x243),authDefinitions,{'defaultCommand':a214_0x173b09(0x258)}),registerDeclarativeService(a214_0x173b09(0x222),tenantDefinitions),registerDeclarativeService(a214_0x173b09(0x223),userAccountDefinitions),registerDeclarativeService(a214_0x173b09(0x234),datasetDefinitions),registerDeclarativeService(a214_0x173b09(0x22b),pageDefinitions),registerDeclarativeService(a214_0x173b09(0x1fe),apiDefinitions),registerDeclarativeService(a214_0x173b09(0x24d),bffDefinitions),registerDeclarativeService(a214_0x173b09(0x1f5),instantApiPolicyDefinitions),registerDeclarativeService(a214_0x173b09(0x23f),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a214_0x173b09(0x245),deploymentDefinitions),registerDeclarativeService(a214_0x173b09(0x24c),menuDefinitions),registerDeclarativeService(a214_0x173b09(0x210),taskDefinitions),registerDeclarativeService(a214_0x173b09(0x203),roleDefinitions),registerDeclarativeService(a214_0x173b09(0x1f0),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a214_0x173b09(0x1f7),issueDefinitions),registerDeclarativeService(a214_0x173b09(0x232),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a214_0x173b09(0x1ee),codegenDefinitions),registerDeclarativeService(a214_0x173b09(0x1fd),configDefinitions),registerDeclarativeService(a214_0x173b09(0x1ef),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x173b09(0x22a),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x173b09(0x23e),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x173b09(0x249),cliSkillDefinitions,{'defaultCommand':a214_0x173b09(0x225)}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a214_0x173b09(0x1f3),logsDefinitions,{'defaultCommand':a214_0x173b09(0x20a)}),registerDeclarativeService(a214_0x173b09(0x1f4),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a214_0x173b09(0x1fa)]-0x1];last[a214_0x173b09(0x22d)]=[{'command':a214_0x173b09(0x1fc),'description':'Run\x20any\x20package.json\x20script','tag':a214_0x173b09(0x20d)+runDefinition[a214_0x173b09(0x216)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save',a214_0x173b09(0x23d)],[a214_0x173b09(0x220),a214_0x173b09(0x209)],[a214_0x173b09(0x214),a214_0x173b09(0x21b)],[a214_0x173b09(0x1f9),a214_0x173b09(0x24b)],['project:init',a214_0x173b09(0x213)],[a214_0x173b09(0x200),'rabetbase\x20cli-skill\x20install'],['skill:install','rabetbase\x20cli-skill\x20install'],[a214_0x173b09(0x254),'rabetbase\x20cli-skill\x20install'],['skills:install',a214_0x173b09(0x1f2)],[a214_0x173b09(0x24f),a214_0x173b09(0x1fb)],[a214_0x173b09(0x201),a214_0x173b09(0x224)],[a214_0x173b09(0x24a),a214_0x173b09(0x204)],['app:remove',a214_0x173b09(0x202)],['knowledge-base:list',a214_0x173b09(0x1f8)],[a214_0x173b09(0x21a),'rabetbase\x20kb\x20detail'],[a214_0x173b09(0x248),'rabetbase\x20kb\x20create'],[a214_0x173b09(0x1ec),a214_0x173b09(0x230)],['knowledge-base:delete',a214_0x173b09(0x235)],[a214_0x173b09(0x206),a214_0x173b09(0x252)],[a214_0x173b09(0x25b),a214_0x173b09(0x219)],['data:getOne',a214_0x173b09(0x228)],['page:standard-page-status',a214_0x173b09(0x207)],[a214_0x173b09(0x20b),a214_0x173b09(0x221)],['page:custom-create',a214_0x173b09(0x221)],[a214_0x173b09(0x22e),'rabetbase\x20page\x20custom-list'],[a214_0x173b09(0x1f6),a214_0x173b09(0x21c)],['page:react-update',a214_0x173b09(0x231)],['page:react-publish',a214_0x173b09(0x217)]]),REMOVED_COMMAND_HINTS=new Map([[a214_0x173b09(0x237),a214_0x173b09(0x247)],[a214_0x173b09(0x23b),a214_0x173b09(0x247)],['deployment:sync',a214_0x173b09(0x23a)],[a214_0x173b09(0x257),a214_0x173b09(0x218)],[a214_0x173b09(0x1e9),a214_0x173b09(0x218)],[a214_0x173b09(0x240),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a214_0x173b09(0x1ea),a214_0x173b09(0x218)],[a214_0x173b09(0x23c),a214_0x173b09(0x218)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a214_0x173b09(0x236)],[a214_0x173b09(0x226),'rabetbase\x20run\x20start'],[a214_0x173b09(0x250),a214_0x173b09(0x238)],[a214_0x173b09(0x233),a214_0x173b09(0x253)],[a214_0x173b09(0x208),a214_0x173b09(0x20e)]]);export function resolveRemovedCommand(_0x139e5b,_0x3bb7b3){const _0x229e40=a214_0x173b09;if(!_0x139e5b)return undefined;const _0x5ef665=REMOVED_COMMAND_REPLACEMENTS[_0x229e40(0x1eb)](_0x139e5b+':'+(_0x3bb7b3??'')),_0x2d8a78=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x229e40(0x1eb)](_0x139e5b),_0x5f57a4=_0x5ef665??_0x2d8a78,_0x2b56bb=REMOVED_COMMAND_HINTS[_0x229e40(0x1eb)](_0x139e5b+':'+(_0x3bb7b3??''));if(!_0x5f57a4&&!_0x2b56bb)return undefined;const _0x1af795=_0x2d8a78?_0x139e5b:_0x3bb7b3?_0x139e5b+'\x20'+_0x3bb7b3:_0x139e5b;return{'command':_0x1af795,'message':_0x229e40(0x255)+_0x1af795+_0x229e40(0x1ff),'hint':_0x2b56bb??'Use\x20`'+_0x5f57a4+'`\x20instead.'};}export function findDefinition(_0x1d6440,_0x14b9f6){const _0x2ee8fc=a214_0x173b09;return definitions[_0x2ee8fc(0x1eb)](_0x1d6440+':'+_0x14b9f6);}export function isKnownService(_0x3b522){const _0x5a8b87=a214_0x173b09;return serviceByName[_0x5a8b87(0x251)](_0x3b522);}export function isDeclarativeService(_0x5e68b4){const _0x47f87b=a214_0x173b09;return serviceGroups[_0x47f87b(0x251)](_0x5e68b4)||serviceByName[_0x47f87b(0x1eb)](_0x5e68b4)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x3ae0e6){const _0x34e6f6=a214_0x173b09;return serviceByName[_0x34e6f6(0x1eb)](_0x3ae0e6);}export function getLegacyHandler(_0x5f5481,_0x213384){return undefined;}export function getAllDefinitions(){const _0x31ea34=a214_0x173b09;return Array[_0x31ea34(0x22c)](definitions[_0x31ea34(0x22f)]());}
@@ -1 +1 @@
1
- const a215_0x466381=a215_0x59c3;(function(_0x14f210,_0x390e8a){const _0x49a56=a215_0x59c3,_0x2ac250=_0x14f210();while(!![]){try{const _0x583094=parseInt(_0x49a56(0x1ac))/0x1+-parseInt(_0x49a56(0x1b2))/0x2*(parseInt(_0x49a56(0x1a2))/0x3)+-parseInt(_0x49a56(0x1a4))/0x4+parseInt(_0x49a56(0x1af))/0x5*(parseInt(_0x49a56(0x1a1))/0x6)+-parseInt(_0x49a56(0x1ae))/0x7*(-parseInt(_0x49a56(0x1aa))/0x8)+-parseInt(_0x49a56(0x1b0))/0x9*(-parseInt(_0x49a56(0x1a5))/0xa)+parseInt(_0x49a56(0x1b1))/0xb*(-parseInt(_0x49a56(0x1a8))/0xc);if(_0x583094===_0x390e8a)break;else _0x2ac250['push'](_0x2ac250['shift']());}catch(_0x346a78){_0x2ac250['push'](_0x2ac250['shift']());}}}(a215_0x23e2,0xe1134));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';function a215_0x59c3(_0x23ab93,_0x5823c3){_0x23ab93=_0x23ab93-0x1a1;const _0x23e249=a215_0x23e2();let _0x59c39e=_0x23e249[_0x23ab93];return _0x59c39e;}function a215_0x23e2(){const _0x5ee5f7=['5215kaqgRC','1055nhcOsc','67833QYPXiG','2893gjrJRF','2anluuv','userCount','appCode','roleName','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','POST','role','/smartapi/permit/role/delete','49944rOIPTI','2171625eqNJRB','Deleted\x20role\x20','6170128LTqiak','1720BLIrmo','dev','delete','81948rgeyht','\x20(id=','3208weFrsO','num','1632869zNidKZ','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes'];a215_0x23e2=function(){return _0x5ee5f7;};return a215_0x23e2();}const DELETE_PATH=a215_0x466381(0x1b9);export const roleDelete={'service':a215_0x466381(0x1b8),'command':'delete','description':a215_0x466381(0x1ad),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x333ce0){const _0x166e3e=a215_0x466381,_0x5916b0=_0x333ce0[_0x166e3e(0x1ab)]('id'),_0x1dc2ac=await getRoleById(_0x333ce0['appCode'],_0x5916b0);return assertCustomRole(_0x1dc2ac,_0x166e3e(0x1a7)),asDryRunResult({'scope':_0x166e3e(0x1a6),'operation':_0x166e3e(0x1a7),'selector':{'appCode':_0x333ce0[_0x166e3e(0x1b4)],'roleId':_0x5916b0,'roleName':_0x1dc2ac['roleName']},'before':projectRole(_0x1dc2ac),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1dc2ac[_0x166e3e(0x1b3)]>0x0?['Role\x20still\x20has\x20'+_0x1dc2ac[_0x166e3e(0x1b3)]+_0x166e3e(0x1b6)]:[]},{'method':_0x166e3e(0x1b7),'url':DELETE_PATH});},async 'execute'(_0xf13eea){const _0x54eb47=a215_0x466381,_0x14206a=_0xf13eea[_0x54eb47(0x1ab)]('id'),_0x18d3be=await getRoleById(_0xf13eea['appCode'],_0x14206a);return assertCustomRole(_0x18d3be,_0x54eb47(0x1a7)),await deleteAppRole(_0x14206a),{'ok':!![],'data':{'scope':_0x54eb47(0x1a6),'operation':_0x54eb47(0x1a7),'selector':{'appCode':_0xf13eea[_0x54eb47(0x1b4)],'roleId':_0x14206a,'roleName':_0x18d3be[_0x54eb47(0x1b5)]},'before':projectRole(_0x18d3be),'after':null,'dryRun':![],'backend':{'method':_0x54eb47(0x1b7),'path':DELETE_PATH},'warnings':[]},'message':_0x54eb47(0x1a3)+_0x18d3be['roleName']+_0x54eb47(0x1a9)+_0x14206a+')'};}};
1
+ const a215_0x4a462d=a215_0x42ce;(function(_0x131a6c,_0xc607b3){const _0x968626=a215_0x42ce,_0x32026d=_0x131a6c();while(!![]){try{const _0x4d64e4=parseInt(_0x968626(0x1e2))/0x1*(-parseInt(_0x968626(0x1e5))/0x2)+-parseInt(_0x968626(0x1f1))/0x3+parseInt(_0x968626(0x1e3))/0x4+parseInt(_0x968626(0x1f0))/0x5+-parseInt(_0x968626(0x1df))/0x6+parseInt(_0x968626(0x1f4))/0x7*(parseInt(_0x968626(0x1ee))/0x8)+-parseInt(_0x968626(0x1f2))/0x9*(parseInt(_0x968626(0x1de))/0xa);if(_0x4d64e4===_0xc607b3)break;else _0x32026d['push'](_0x32026d['shift']());}catch(_0x1cc1bb){_0x32026d['push'](_0x32026d['shift']());}}}(a215_0x3218,0x9082e));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=a215_0x4a462d(0x1e0);export const roleDelete={'service':a215_0x4a462d(0x1e8),'command':a215_0x4a462d(0x1e9),'description':a215_0x4a462d(0x1e7),'risk':a215_0x4a462d(0x1e4),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x237c35){const _0x4dd7a8=a215_0x4a462d,_0x449dc5=_0x237c35[_0x4dd7a8(0x1f3)]('id'),_0x169b1f=await getRoleById(_0x237c35['appCode'],_0x449dc5);return assertCustomRole(_0x169b1f,_0x4dd7a8(0x1e9)),asDryRunResult({'scope':_0x4dd7a8(0x1e1),'operation':'delete','selector':{'appCode':_0x237c35['appCode'],'roleId':_0x449dc5,'roleName':_0x169b1f[_0x4dd7a8(0x1ed)]},'before':projectRole(_0x169b1f),'after':null,'dryRun':!![],'backend':{'method':_0x4dd7a8(0x1ef),'path':DELETE_PATH},'warnings':_0x169b1f[_0x4dd7a8(0x1ea)]>0x0?[_0x4dd7a8(0x1e6)+_0x169b1f[_0x4dd7a8(0x1ea)]+_0x4dd7a8(0x1f5)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x57306b){const _0x4ee8dc=a215_0x4a462d,_0x4d8a2e=_0x57306b[_0x4ee8dc(0x1f3)]('id'),_0x2e8d9c=await getRoleById(_0x57306b[_0x4ee8dc(0x1ec)],_0x4d8a2e);return assertCustomRole(_0x2e8d9c,'delete'),await deleteAppRole(_0x4d8a2e),{'ok':!![],'data':{'scope':_0x4ee8dc(0x1e1),'operation':'delete','selector':{'appCode':_0x57306b[_0x4ee8dc(0x1ec)],'roleId':_0x4d8a2e,'roleName':_0x2e8d9c['roleName']},'before':projectRole(_0x2e8d9c),'after':null,'dryRun':![],'backend':{'method':_0x4ee8dc(0x1ef),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x2e8d9c['roleName']+_0x4ee8dc(0x1eb)+_0x4d8a2e+')'};}};function a215_0x42ce(_0x4366ae,_0x12e0fa){_0x4366ae=_0x4366ae-0x1de;const _0x321822=a215_0x3218();let _0x42ce25=_0x321822[_0x4366ae];return _0x42ce25;}function a215_0x3218(){const _0x3b61ee=['5151275wGSHHQ','537345YaaiVk','5247eQDoVo','num','791EVyiOT','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','8840hfwnSD','2752728VtQYYr','/smartapi/permit/role/delete','dev','1AEeMFd','3830204muYGrt','high-risk-write','2364190AvzgGf','Role\x20still\x20has\x20','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','role','delete','userCount','\x20(id=','appCode','roleName','66512KduvNy','POST'];a215_0x3218=function(){return _0x3b61ee;};return a215_0x3218();}
@@ -1 +1 @@
1
- const a216_0x2d44de=a216_0x212c;function a216_0x212c(_0x4f4baf,_0x38cd41){_0x4f4baf=_0x4f4baf-0x1d7;const _0x1d1050=a216_0x1d10();let _0x212c87=_0x1d1050[_0x4f4baf];return _0x212c87;}(function(_0x30243d,_0x92879c){const _0x4aadba=a216_0x212c,_0x5e1107=_0x30243d();while(!![]){try{const _0x3c617f=parseInt(_0x4aadba(0x1da))/0x1*(parseInt(_0x4aadba(0x1db))/0x2)+-parseInt(_0x4aadba(0x1d8))/0x3*(parseInt(_0x4aadba(0x1e1))/0x4)+-parseInt(_0x4aadba(0x1d9))/0x5*(-parseInt(_0x4aadba(0x1e0))/0x6)+parseInt(_0x4aadba(0x1dd))/0x7+-parseInt(_0x4aadba(0x1e5))/0x8+-parseInt(_0x4aadba(0x1e9))/0x9+-parseInt(_0x4aadba(0x1e4))/0xa*(-parseInt(_0x4aadba(0x1ea))/0xb);if(_0x3c617f===_0x92879c)break;else _0x5e1107['push'](_0x5e1107['shift']());}catch(_0x1d0931){_0x5e1107['push'](_0x5e1107['shift']());}}}(a216_0x1d10,0x486ad));function a216_0x1d10(){const _0x47c28d=['role','3000wuSBVt','3184aJbmgm','Role\x20','num','2630WWtpdR','3333320cVyqmS','roleName','appCode','roleType','2504637vRlHhZ','10318nrFWup','read','1197XsrXBS','3755nrtvhq','1yMeUME','1150946Iejulr','dev','780612CvZpsZ','detail'];a216_0x1d10=function(){return _0x47c28d;};return a216_0x1d10();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a216_0x2d44de(0x1df),'command':a216_0x2d44de(0x1de),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a216_0x2d44de(0x1d7),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x347ac6){const _0x3c5dc1=a216_0x2d44de,_0x174d6e=_0x347ac6[_0x3c5dc1(0x1e3)]('id'),_0xeb6291=await getRoleById(_0x347ac6[_0x3c5dc1(0x1e7)],_0x174d6e);return{'ok':!![],'data':{'scope':_0x3c5dc1(0x1dc),'role':projectRole(_0xeb6291)},'message':_0x3c5dc1(0x1e2)+_0xeb6291[_0x3c5dc1(0x1e6)]+'\x20('+_0xeb6291[_0x3c5dc1(0x1e8)]+')'};}};
1
+ const a216_0x307c12=a216_0x4c5c;function a216_0x4c5c(_0xbdc584,_0x2881e0){_0xbdc584=_0xbdc584-0x114;const _0x2af93f=a216_0x2af9();let _0x4c5c6c=_0x2af93f[_0xbdc584];return _0x4c5c6c;}function a216_0x2af9(){const _0x2fcceb=['28428ygdGXJ','Show\x20a\x20single\x20role\x27s\x20detail','33UlTZYR','appCode','327xMiilQ','1900242ePysyI','1EQGBxq','Role\x20','roleType','2441515zoZYRX','dev','roleName','detail','7laQJqL','9871368UVIfWb','710378XaQTbh','read','10418508cAqDSM','1404980MkZQpv'];a216_0x2af9=function(){return _0x2fcceb;};return a216_0x2af9();}(function(_0x1170da,_0x5126c1){const _0x3e9ad8=a216_0x4c5c,_0xaa9ec2=_0x1170da();while(!![]){try{const _0x20fecc=-parseInt(_0x3e9ad8(0x11a))/0x1*(-parseInt(_0x3e9ad8(0x123))/0x2)+parseInt(_0x3e9ad8(0x118))/0x3*(-parseInt(_0x3e9ad8(0x114))/0x4)+parseInt(_0x3e9ad8(0x11d))/0x5+parseInt(_0x3e9ad8(0x119))/0x6+parseInt(_0x3e9ad8(0x121))/0x7*(-parseInt(_0x3e9ad8(0x122))/0x8)+parseInt(_0x3e9ad8(0x125))/0x9+parseInt(_0x3e9ad8(0x126))/0xa*(parseInt(_0x3e9ad8(0x116))/0xb);if(_0x20fecc===_0x5126c1)break;else _0xaa9ec2['push'](_0xaa9ec2['shift']());}catch(_0x4589e0){_0xaa9ec2['push'](_0xaa9ec2['shift']());}}}(a216_0x2af9,0xb2661));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a216_0x307c12(0x120),'description':a216_0x307c12(0x115),'risk':a216_0x307c12(0x124),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xc053a3){const _0x35cd65=a216_0x307c12,_0x868b4b=_0xc053a3['num']('id'),_0x123428=await getRoleById(_0xc053a3[_0x35cd65(0x117)],_0x868b4b);return{'ok':!![],'data':{'scope':_0x35cd65(0x11e),'role':projectRole(_0x123428)},'message':_0x35cd65(0x11b)+_0x123428[_0x35cd65(0x11f)]+'\x20('+_0x123428[_0x35cd65(0x11c)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x2c6420,_0x27040d){const _0x17989f=a217_0x150b,_0x531c16=_0x2c6420();while(!![]){try{const _0x191371=-parseInt(_0x17989f(0xb4))/0x1+-parseInt(_0x17989f(0xb1))/0x2+parseInt(_0x17989f(0xb6))/0x3*(-parseInt(_0x17989f(0xb7))/0x4)+parseInt(_0x17989f(0xb5))/0x5+-parseInt(_0x17989f(0xb8))/0x6*(-parseInt(_0x17989f(0xba))/0x7)+parseInt(_0x17989f(0xb9))/0x8+-parseInt(_0x17989f(0xb2))/0x9*(-parseInt(_0x17989f(0xb3))/0xa);if(_0x191371===_0x27040d)break;else _0x531c16['push'](_0x531c16['shift']());}catch(_0x28da08){_0x531c16['push'](_0x531c16['shift']());}}}(a217_0x1441,0x36dac));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';function a217_0x1441(){const _0x157f75=['319708RlmHWS','261500fKxJpQ','3nnMpjB','1455224vrHhWm','7440RvYexJ','265608zFNLJr','2275PEgMzh','62600YfQwUf','4058973nxelNz','10AvOULR'];a217_0x1441=function(){return _0x157f75;};return a217_0x1441();}import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';function a217_0x150b(_0x22badd,_0x3967ac){_0x22badd=_0x22badd-0xb1;const _0x14411c=a217_0x1441();let _0x150ba1=_0x14411c[_0x22badd];return _0x150ba1;}export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0xf15e84,_0x4e32fb){const _0x5bedcf=a217_0x4233,_0x57501e=_0xf15e84();while(!![]){try{const _0x54983a=parseInt(_0x5bedcf(0x1ad))/0x1*(-parseInt(_0x5bedcf(0x1a7))/0x2)+-parseInt(_0x5bedcf(0x1a8))/0x3*(parseInt(_0x5bedcf(0x1a4))/0x4)+-parseInt(_0x5bedcf(0x1aa))/0x5*(parseInt(_0x5bedcf(0x1a6))/0x6)+parseInt(_0x5bedcf(0x1a2))/0x7*(-parseInt(_0x5bedcf(0x1ab))/0x8)+parseInt(_0x5bedcf(0x1a1))/0x9+parseInt(_0x5bedcf(0x1a9))/0xa*(parseInt(_0x5bedcf(0x1a5))/0xb)+-parseInt(_0x5bedcf(0x1ac))/0xc*(-parseInt(_0x5bedcf(0x1a3))/0xd);if(_0x54983a===_0x4e32fb)break;else _0x57501e['push'](_0x57501e['shift']());}catch(_0x5c6a3a){_0x57501e['push'](_0x57501e['shift']());}}}(a217_0x24d0,0x2fe4a));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';import{roleUserRemove}from'../../commands/role/user-remove.js';function a217_0x4233(_0x14f5e8,_0x5bb9f6){_0x14f5e8=_0x14f5e8-0x1a1;const _0x24d060=a217_0x24d0();let _0x42333e=_0x24d060[_0x14f5e8];return _0x42333e;}function a217_0x24d0(){const _0x4d55c6=['261124TnRmhs','8811qIZOJX','6UECxDT','2nMetRi','3qBCCPz','1310AzPYBO','870335etSxUB','2280qqbJNJ','3562164sCZACP','22393mZzPSZ','1423467akCrsL','2506mUfHOr','13VbHZhP'];a217_0x24d0=function(){return _0x4d55c6;};return a217_0x24d0();}export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a218_0x26a7ab=a218_0x14a7;(function(_0xa72e39,_0x39b26d){const _0x38a6da=a218_0x14a7,_0x5a4853=_0xa72e39();while(!![]){try{const _0x1597fb=parseInt(_0x38a6da(0x116))/0x1+parseInt(_0x38a6da(0x104))/0x2+-parseInt(_0x38a6da(0x117))/0x3+parseInt(_0x38a6da(0x10d))/0x4*(-parseInt(_0x38a6da(0x101))/0x5)+-parseInt(_0x38a6da(0x109))/0x6+-parseInt(_0x38a6da(0x107))/0x7*(parseInt(_0x38a6da(0x112))/0x8)+parseInt(_0x38a6da(0x118))/0x9*(parseInt(_0x38a6da(0x110))/0xa);if(_0x1597fb===_0x39b26d)break;else _0x5a4853['push'](_0x5a4853['shift']());}catch(_0x5f58fb){_0x5a4853['push'](_0x5a4853['shift']());}}}(a218_0x3ca5,0xdd2c7));import{listAppRoles}from'../../core/api-client.js';function a218_0x3ca5(){const _0x3db69e=['ADMIN','appCode','1891460aEGcov','toUpperCase','trim','807972FEaaEm','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','Found\x20','190078uOpFDI','DEV','8577678hsxsSc','join','type','length','16AHYsfS','Page\x20size\x20(1-100)','\x20role(s)','20MWwSFz','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','8qVOtyt','list','OWNER','str','140571taoynX','1963887asgLII','17936703CdnQys','Invalid\x20--type\x20\x22','number','Filter\x20by\x20role\x20type','validation','page','role','includes','dev','num','pagesize'];a218_0x3ca5=function(){return _0x3db69e;};return a218_0x3ca5();}function a218_0x14a7(_0xf821a9,_0x54bde3){_0xf821a9=_0xf821a9-0xf7;const _0x3ca532=a218_0x3ca5();let _0x14a7ef=_0x3ca532[_0xf821a9];return _0x14a7ef;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a218_0x26a7ab(0xff),a218_0x26a7ab(0x108),a218_0x26a7ab(0x114),'CUSTOM'];export const roleList={'service':a218_0x26a7ab(0xfa),'command':a218_0x26a7ab(0x113),'description':a218_0x26a7ab(0x105),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a218_0x26a7ab(0x10b),'type':'string','required':![],'description':a218_0x26a7ab(0xf7),'enum':ROLE_TYPES},{'name':a218_0x26a7ab(0xf9),'type':a218_0x26a7ab(0x11a),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a218_0x26a7ab(0xfe),'type':'number','description':a218_0x26a7ab(0x10e),'default':0x64}],async 'validate'(_0x2c809a){const _0x1b5aae=a218_0x26a7ab,_0x52a043=_0x2c809a[_0x1b5aae(0x115)](_0x1b5aae(0x10b))[_0x1b5aae(0x103)]();if(_0x52a043&&!ROLE_TYPES[_0x1b5aae(0xfb)](_0x52a043['toUpperCase']()))throw CliErrors[_0x1b5aae(0xf8)](_0x1b5aae(0x119)+_0x52a043+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x1b5aae(0x10a)](',\x20')+'.');const _0x4b50c5=_0x2c809a['num']('page',0x1),_0x149ced=_0x2c809a[_0x1b5aae(0xfd)](_0x1b5aae(0xfe),0x64);if(_0x4b50c5<0x1)throw CliErrors[_0x1b5aae(0xf8)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x149ced<0x1||_0x149ced>0x64)throw CliErrors[_0x1b5aae(0xf8)](_0x1b5aae(0x111));},async 'execute'(_0x305dbe){const _0x3e5fe4=a218_0x26a7ab,_0x5a35a2=_0x305dbe[_0x3e5fe4(0xfd)](_0x3e5fe4(0xf9),0x1)||0x1,_0x47c081=_0x305dbe[_0x3e5fe4(0xfd)](_0x3e5fe4(0xfe),0x64)||0x64,_0x5b5022=_0x305dbe[_0x3e5fe4(0x115)](_0x3e5fe4(0x10b))[_0x3e5fe4(0x103)]()[_0x3e5fe4(0x102)](),{items:_0x31a533,paging:_0xaf3ba6}=await listAppRoles(_0x305dbe[_0x3e5fe4(0x100)],{'currentPage':_0x5a35a2,'pageSize':_0x47c081}),_0x1a9e51=_0x5b5022?_0x31a533['filter'](_0x20611b=>_0x20611b['roleType']===_0x5b5022):_0x31a533,_0x2e2fb8=_0x1a9e51['map'](projectRole);return{'ok':!![],'data':{'scope':_0x3e5fe4(0xfc),'roles':_0x2e2fb8,'paging':_0xaf3ba6},'message':_0x3e5fe4(0x106)+_0x2e2fb8[_0x3e5fe4(0x10c)]+_0x3e5fe4(0x10f)};}};
1
+ function a218_0x2e9c(_0x16caf1,_0x49ee9b){_0x16caf1=_0x16caf1-0x150;const _0x5097a6=a218_0x5097();let _0x2e9c5a=_0x5097a6[_0x16caf1];return _0x2e9c5a;}const a218_0x1a47e6=a218_0x2e9c;(function(_0xa86c5e,_0x4c8f72){const _0x2f4762=a218_0x2e9c,_0x58c4cf=_0xa86c5e();while(!![]){try{const _0x48e0ae=-parseInt(_0x2f4762(0x166))/0x1+parseInt(_0x2f4762(0x16c))/0x2*(-parseInt(_0x2f4762(0x153))/0x3)+parseInt(_0x2f4762(0x156))/0x4*(parseInt(_0x2f4762(0x159))/0x5)+-parseInt(_0x2f4762(0x158))/0x6+parseInt(_0x2f4762(0x15f))/0x7+-parseInt(_0x2f4762(0x171))/0x8*(-parseInt(_0x2f4762(0x178))/0x9)+parseInt(_0x2f4762(0x165))/0xa;if(_0x48e0ae===_0x4c8f72)break;else _0x58c4cf['push'](_0x58c4cf['shift']());}catch(_0x44de29){_0x58c4cf['push'](_0x58c4cf['shift']());}}}(a218_0x5097,0xc345e));import{listAppRoles}from'../../core/api-client.js';function a218_0x5097(){const _0x51108d=['roleType','1895508ZXYDvY','filter','Found\x20','includes','type','Filter\x20by\x20role\x20type','36FGYRCa','Invalid\x20--type\x20\x22','role','446484jVevBg','toUpperCase','6287076lUbQZO','5MHpnqG','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','page','number','join','map','9063467bRwCTy','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Page\x20index\x20(1-based)','length','pagesize','str','16650480gaAhiL','1225002LxDgxR','OWNER','Use\x20one\x20of:\x20','trim','Page\x20size\x20(1-100)','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','69998KKkVYu','ADMIN','CUSTOM','dev','read','16GDwsyT','list','num','DEV','validation','\x20role(s)'];a218_0x5097=function(){return _0x51108d;};return a218_0x5097();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a218_0x1a47e6(0x16d),a218_0x1a47e6(0x174),a218_0x1a47e6(0x167),a218_0x1a47e6(0x16e)];export const roleList={'service':a218_0x1a47e6(0x155),'command':a218_0x1a47e6(0x172),'description':a218_0x1a47e6(0x15a),'risk':a218_0x1a47e6(0x170),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','required':![],'description':a218_0x1a47e6(0x152),'enum':ROLE_TYPES},{'name':'page','type':'number','description':a218_0x1a47e6(0x161),'default':0x1},{'name':a218_0x1a47e6(0x163),'type':a218_0x1a47e6(0x15c),'description':a218_0x1a47e6(0x16a),'default':0x64}],async 'validate'(_0x46a582){const _0x3535e9=a218_0x1a47e6,_0x557df5=_0x46a582[_0x3535e9(0x164)](_0x3535e9(0x151))[_0x3535e9(0x169)]();if(_0x557df5&&!ROLE_TYPES[_0x3535e9(0x150)](_0x557df5[_0x3535e9(0x157)]()))throw CliErrors[_0x3535e9(0x175)](_0x3535e9(0x154)+_0x557df5+'\x22.',_0x3535e9(0x168)+ROLE_TYPES[_0x3535e9(0x15d)](',\x20')+'.');const _0x48db74=_0x46a582['num'](_0x3535e9(0x15b),0x1),_0x3a7998=_0x46a582[_0x3535e9(0x173)](_0x3535e9(0x163),0x64);if(_0x48db74<0x1)throw CliErrors[_0x3535e9(0x175)](_0x3535e9(0x16b));if(_0x3a7998<0x1||_0x3a7998>0x64)throw CliErrors[_0x3535e9(0x175)](_0x3535e9(0x160));},async 'execute'(_0x515edc){const _0x558c46=a218_0x1a47e6,_0x2d08fe=_0x515edc[_0x558c46(0x173)](_0x558c46(0x15b),0x1)||0x1,_0x2135e5=_0x515edc[_0x558c46(0x173)](_0x558c46(0x163),0x64)||0x64,_0x49f15f=_0x515edc[_0x558c46(0x164)]('type')[_0x558c46(0x169)]()['toUpperCase'](),{items:_0x55f377,paging:_0x410995}=await listAppRoles(_0x515edc['appCode'],{'currentPage':_0x2d08fe,'pageSize':_0x2135e5}),_0x16f734=_0x49f15f?_0x55f377[_0x558c46(0x179)](_0x54b9b4=>_0x54b9b4[_0x558c46(0x177)]===_0x49f15f):_0x55f377,_0x23c823=_0x16f734[_0x558c46(0x15e)](projectRole);return{'ok':!![],'data':{'scope':_0x558c46(0x16f),'roles':_0x23c823,'paging':_0x410995},'message':_0x558c46(0x17a)+_0x23c823[_0x558c46(0x162)]+_0x558c46(0x176)};}};
@@ -1 +1 @@
1
- const a219_0x120286=a219_0xc230;(function(_0x482296,_0x496138){const _0x12f744=a219_0xc230,_0x11ff7d=_0x482296();while(!![]){try{const _0x3d472d=-parseInt(_0x12f744(0xab))/0x1+-parseInt(_0x12f744(0xc3))/0x2*(parseInt(_0x12f744(0xb1))/0x3)+-parseInt(_0x12f744(0xbf))/0x4+-parseInt(_0x12f744(0xb3))/0x5+-parseInt(_0x12f744(0xc5))/0x6*(parseInt(_0x12f744(0xc1))/0x7)+parseInt(_0x12f744(0xdf))/0x8*(-parseInt(_0x12f744(0xaf))/0x9)+parseInt(_0x12f744(0xc8))/0xa;if(_0x3d472d===_0x496138)break;else _0x11ff7d['push'](_0x11ff7d['shift']());}catch(_0x3b0c6d){_0x11ff7d['push'](_0x11ff7d['shift']());}}}(a219_0x2f1b,0x3bae7));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':a219_0x120286(0xd5),'required':!![],'description':a219_0x120286(0xe6)};export const ROLE_REF_FLAG={'name':a219_0x120286(0xbc),'type':a219_0x120286(0xdc),'required':!![],'description':a219_0x120286(0xa4)};function a219_0xc230(_0x3f0b2a,_0x39c580){_0x3f0b2a=_0x3f0b2a-0x96;const _0x2f1b1a=a219_0x2f1b();let _0xc2305d=_0x2f1b1a[_0x3f0b2a];return _0xc2305d;}export const USER_REF_FLAG={'name':a219_0x120286(0xcc),'type':a219_0x120286(0xdc),'required':!![],'description':a219_0x120286(0xd7)};export const NAME_FLAG={'name':a219_0x120286(0xbe),'type':a219_0x120286(0xdc),'required':!![],'description':a219_0x120286(0xc7)};export const USER_NAME_FLAG={'name':a219_0x120286(0xbe),'type':a219_0x120286(0xdc),'required':!![],'description':a219_0x120286(0x9f)};export const REMARK_FLAG={'name':a219_0x120286(0x9e),'type':a219_0x120286(0xdc),'required':![],'description':a219_0x120286(0xa9)};export const EXPECT_USER_COUNT_FLAG={'name':a219_0x120286(0xd3),'type':'number','required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=['ADMIN',a219_0x120286(0x97),a219_0x120286(0xdb)];export function isBuiltinRole(_0x42ff50){const _0x528a05=a219_0x120286;return BUILTIN_ROLE_TYPES[_0x528a05(0xb8)](_0x42ff50);}export function assertCustomRole(_0x12782f,_0x384f5f){const _0x35d13d=a219_0x120286;if(_0x12782f[_0x35d13d(0xa6)]!==_0x35d13d(0xb0))throw CliErrors[_0x35d13d(0xb5)](_0x35d13d(0xa7)+_0x384f5f+_0x35d13d(0xe7)+_0x12782f['roleName']+'\x20('+_0x12782f[_0x35d13d(0xa6)]+').',_0x35d13d(0xde));}export function projectRole(_0x42b9d1){const _0x49c713=a219_0x120286;return{'id':_0x42b9d1['id'],'roleName':_0x42b9d1['roleName'],'roleType':_0x42b9d1[_0x49c713(0xa6)],'remark':_0x42b9d1[_0x49c713(0x9e)],'userCount':_0x42b9d1[_0x49c713(0xc2)],'permitCount':_0x42b9d1[_0x49c713(0xaa)],'builtin':isBuiltinRole(_0x42b9d1[_0x49c713(0xa6)])};}export async function resolveRoleRef(_0x43ad0a,_0x243ac6){const _0x561010=a219_0x120286,_0x1f283c=_0x243ac6[_0x561010(0xe4)]();if(!_0x1f283c)throw CliErrors[_0x561010(0xb5)](_0x561010(0xce),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x1f283c))return getRoleById(_0x43ad0a,Number(_0x1f283c));const _0x58c80f=await listAllAppRoles(_0x43ad0a),_0x35d43f=_0x58c80f[_0x561010(0xcb)](_0x3742b0=>_0x3742b0['roleName']===_0x1f283c);if(_0x35d43f[_0x561010(0xa2)]===0x0)throw CliErrors[_0x561010(0xb5)]('Role\x20name\x20\x22'+_0x1f283c+_0x561010(0xb4)+_0x43ad0a+'.',_0x561010(0xa1));if(_0x35d43f[_0x561010(0xa2)]>0x1){const _0x3353aa=_0x35d43f[_0x561010(0xac)](_0x140995=>_0x140995['id'])['join'](',\x20');throw CliErrors[_0x561010(0xb5)](_0x561010(0x99)+_0x1f283c+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x3353aa+').',_0x561010(0xda));}return _0x35d43f[0x0];}export async function getRoleById(_0x360641,_0x15337a){const _0xed5c73=a219_0x120286,_0x4f82a2=await listAllAppRoles(_0x360641),_0x33d257=_0x4f82a2['filter'](_0x1ccc4b=>_0x1ccc4b['id']===_0x15337a&&(!_0x1ccc4b[_0xed5c73(0xd4)]||_0x1ccc4b['appCode']===_0x360641));if(_0x33d257[_0xed5c73(0xa2)]!==0x1)throw CliErrors[_0xed5c73(0xb5)](_0xed5c73(0x9b)+_0x15337a+_0xed5c73(0x9d)+_0x360641+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x33d257[0x0];}function a219_0x2f1b(){const _0x32fd5d=['appCode','number','Anti-drift\x20check\x20failed:\x20expected\x20','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','POST','userId','Disambiguate\x20with\x20--role\x20<id>.','OWNER','string','\x20duplicate\x20memberships\x20for\x20user\x20','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','6824pCjOnR','Removed\x20','push','Pass\x20--user\x20<id|name>.','username','trim','flag','Role\x20id\x20(from\x20`role\x20list`)','\x20built-in\x20role\x20','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','str','DEV','Pass\x20--role\x20<id|name>.','Role\x20name\x20\x22','join','Role\x20id\x20','authRequired','\x20not\x20found\x20in\x20app\x20','remark','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','nickname','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','length','expectUserCount','Role\x20id\x20or\x20exact\x20role\x20name','dev','roleType','Cannot\x20','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Optional\x20role\x20remark/description','permitCount','170190elFJJV','map','/smartapi/permit/user-role/delete','tenant','4203iOFcZi','CUSTOM','635961NUaSXl','user-add','1836840GpsdZK','\x22\x20not\x20found\x20in\x20app\x20','validation','User\x20','roleName','includes','Pass\x20--user\x20<id>.','\x20member(s)\x20but\x20role\x20has\x20','find','role','\x22:\x20','name','1799068IkIBse','/smartapi/permit/user-role/create','133vDcyyS','userCount','2MUiKAz','toLowerCase','72138KewlBK',';\x20no\x20change.','Role\x20name','20705550MhFATw','tenant_code','flagMissing','filter','user','totalCount','Missing\x20role\x20reference.','Multiple\x20tenant\x20members\x20match\x20\x22','Check\x20the\x20nickname/username.\x20','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','dryRun','expect-user-count'];a219_0x2f1b=function(){return _0x32fd5d;};return a219_0x2f1b();}async function listAllAppRoles(_0x159237){const _0x1da8c4=a219_0x120286,_0x19633=0x64,_0x102f1c=[];for(let _0x7106fb=0x1;;_0x7106fb+=0x1){const {items:_0x48c5b8,paging:_0x14fe31}=await listAppRoles(_0x159237,{'currentPage':_0x7106fb,'pageSize':_0x19633});_0x102f1c[_0x1da8c4(0xe1)](..._0x48c5b8);if(_0x48c5b8[_0x1da8c4(0xa2)]<_0x19633||_0x14fe31&&_0x102f1c[_0x1da8c4(0xa2)]>=_0x14fe31[_0x1da8c4(0xcd)])return _0x102f1c;}}export async function resolveTenantCode(){const _0x114c23=a219_0x120286,_0x504e06=await getSessionUserInfo(),_0xfefb24=_0x504e06?.[_0x114c23(0xcc)]?.[_0x114c23(0xae)]?.[_0x114c23(0xc9)];if(!_0xfefb24)throw CliErrors[_0x114c23(0x9c)](_0x114c23(0xd1));return _0xfefb24;}function matchMember(_0x3c2dc6,_0x59b853){const _0x122ba9=a219_0x120286,_0x3055c9=_0x59b853[_0x122ba9(0xe4)]()[_0x122ba9(0xc4)]();return(_0x3c2dc6[_0x122ba9(0xa0)]??'')[_0x122ba9(0xc4)]()===_0x3055c9||(_0x3c2dc6['username']??'')[_0x122ba9(0xc4)]()===_0x3055c9;}export async function resolveUserRef(_0x16d545,_0x1b7a0f=a219_0x120286(0xb9)){const _0x230bdc=a219_0x120286,_0x37430d=_0x16d545[_0x230bdc(0xe4)]();if(!_0x37430d)throw CliErrors[_0x230bdc(0xb5)]('Missing\x20user\x20reference.','Pass\x20--user\x20<id|name>.');const _0x4c85da=await resolveTenantCode(),_0x323fcd=await getTenantMembers(_0x4c85da);if(/^\d+$/['test'](_0x37430d)){const _0x418179=Number(_0x37430d),_0xa921f2=_0x323fcd[_0x230bdc(0xbb)](_0x5d66b4=>_0x5d66b4[_0x230bdc(0xd9)]===_0x418179);return{'userId':_0x418179,'username':_0xa921f2?.['username']??String(_0x418179),'nickname':_0xa921f2?.[_0x230bdc(0xa0)],'matchedBy':'id'};}const _0x57e574=_0x323fcd[_0x230bdc(0xcb)](_0x41f788=>matchMember(_0x41f788,_0x37430d));if(_0x57e574['length']===0x0)throw CliErrors[_0x230bdc(0xb5)]('No\x20tenant\x20member\x20matches\x20\x22'+_0x37430d+'\x22.',_0x230bdc(0xd0)+_0x1b7a0f);if(_0x57e574[_0x230bdc(0xa2)]>0x1){const _0x719f97=_0x57e574[_0x230bdc(0xac)](_0x3bba03=>(_0x3bba03[_0x230bdc(0xa0)]??_0x3bba03[_0x230bdc(0xe3)]??'?')+'('+_0x3bba03['userId']+')')[_0x230bdc(0x9a)](',\x20');throw CliErrors[_0x230bdc(0xb5)](_0x230bdc(0xcf)+_0x37430d+_0x230bdc(0xbd)+_0x719f97+'.',_0x1b7a0f);}const _0x254f54=_0x57e574[0x0];return{'userId':_0x254f54[_0x230bdc(0xd9)],'username':_0x254f54['username']??String(_0x254f54[_0x230bdc(0xd9)]),'nickname':_0x254f54[_0x230bdc(0xa0)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a219_0x120286(0xc0);export const DELETE_USER_ROLE_PATH=a219_0x120286(0xad);export function computeRoleUserMutation(_0x33dd16){const _0x27cef8=a219_0x120286,{operation:_0x1ca31d,appCode:_0x5428a2,role:_0x411a60,relations:_0x4b38a7,user:_0x56c138}=_0x33dd16,_0x423130=[...new Set(_0x4b38a7[_0x27cef8(0xac)](_0x3c7d61=>_0x3c7d61['userId']))],_0x554bf6=[];if(_0x33dd16[_0x27cef8(0xa3)]!==undefined&&_0x33dd16[_0x27cef8(0xa3)]!==_0x423130['length'])throw CliErrors['validation'](_0x27cef8(0xd6)+_0x33dd16[_0x27cef8(0xa3)]+_0x27cef8(0xba)+_0x423130[_0x27cef8(0xa2)]+'.',_0x27cef8(0xe8));const _0x2bf3a6=_0x423130[_0x27cef8(0xb8)](_0x56c138[_0x27cef8(0xd9)]),_0x51dbf0=_0x4b38a7[_0x27cef8(0xcb)](_0x573921=>_0x573921[_0x27cef8(0xd9)]===_0x56c138[_0x27cef8(0xd9)])[_0x27cef8(0xac)](_0x5e58cd=>_0x5e58cd['id']),_0x25fe15=_0x1ca31d===_0x27cef8(0xb2)?!_0x2bf3a6:_0x2bf3a6;let _0x4f64ae=_0x423130;_0x1ca31d===_0x27cef8(0xb2)?_0x2bf3a6?_0x554bf6['push'](_0x27cef8(0xb6)+_0x56c138[_0x27cef8(0xd9)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x411a60[_0x27cef8(0xb7)]+_0x27cef8(0xc6)):_0x4f64ae=[..._0x423130,_0x56c138['userId']]:!_0x2bf3a6?_0x554bf6[_0x27cef8(0xe1)](_0x27cef8(0xb6)+_0x56c138[_0x27cef8(0xd9)]+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x411a60[_0x27cef8(0xb7)]+_0x27cef8(0xc6)):(_0x4f64ae=_0x423130[_0x27cef8(0xcb)](_0x390689=>_0x390689!==_0x56c138[_0x27cef8(0xd9)]),_0x51dbf0[_0x27cef8(0xa2)]>0x1&&_0x554bf6['push'](_0x27cef8(0xe0)+_0x51dbf0[_0x27cef8(0xa2)]+_0x27cef8(0xdd)+_0x56c138[_0x27cef8(0xd9)]+'.'));const _0x1afe0d={'scope':_0x27cef8(0xa5),'operation':_0x1ca31d,'selector':{'appCode':_0x5428a2,'roleId':_0x411a60['id'],'roleName':_0x411a60['roleName'],'userId':_0x56c138['userId']},'before':{'userIds':_0x423130},'after':{'userIds':_0x4f64ae},'dryRun':_0x33dd16[_0x27cef8(0xd2)],'backend':{'method':_0x27cef8(0xd8),'path':_0x1ca31d==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x554bf6};return{'mutation':_0x1afe0d,'changed':_0x25fe15,'matchingRelationIds':_0x51dbf0};}export async function loadDevRoleRelations(_0x1aeaec,_0x58d463){const _0x3c2170=a219_0x120286,_0x3136f0=0x64,_0x4e37b8=[];for(let _0x49e9c1=0x1;;_0x49e9c1+=0x1){const {items:_0x1bc7f9,paging:_0xd66052}=await listDevUserRoleRelations(_0x1aeaec,{'roleId':_0x58d463,'currentPage':_0x49e9c1,'pageSize':_0x3136f0});_0x4e37b8[_0x3c2170(0xe1)](..._0x1bc7f9);if(_0x1bc7f9['length']<_0x3136f0||_0xd66052&&_0x4e37b8[_0x3c2170(0xa2)]>=_0xd66052['totalCount'])return _0x4e37b8;}}export function readRoleRef(_0x486dcc){const _0x29ae69=a219_0x120286,_0x1a2fc9=_0x486dcc[_0x29ae69(0x96)](_0x29ae69(0xbc))[_0x29ae69(0xe4)]();if(!_0x1a2fc9)throw CliErrors[_0x29ae69(0xca)](_0x29ae69(0xbc),_0x29ae69(0x98));return _0x1a2fc9;}export async function prepareUserMutation(_0x1c0af1,_0x3a9c65,_0x2c809b){const _0x3bc380=a219_0x120286,_0x11a3e3=readRoleRef(_0x1c0af1),_0x36c5f2=_0x1c0af1['str']('user')[_0x3bc380(0xe4)]();if(!_0x36c5f2)throw CliErrors[_0x3bc380(0xca)]('user',_0x3bc380(0xe2));const _0x1e106b=_0x1c0af1[_0x3bc380(0xe5)](_0x3bc380(0xd3)),_0x44daee=_0x1e106b===undefined||_0x1e106b===null?undefined:Number(_0x1e106b),_0x35f2c0=await resolveRoleRef(_0x1c0af1[_0x3bc380(0xd4)],_0x11a3e3);if(_0x35f2c0[_0x3bc380(0xa6)]===_0x3bc380(0xdb))throw CliErrors[_0x3bc380(0xb5)]('Cannot\x20'+_0x3a9c65+'\x20members\x20of\x20the\x20OWNER\x20role.',_0x3bc380(0xa8));const _0x16f436=await resolveUserRef(_0x36c5f2),_0x540887=await loadDevRoleRelations(_0x1c0af1[_0x3bc380(0xd4)],_0x35f2c0['id']);return{...computeRoleUserMutation({'operation':_0x3a9c65,'appCode':_0x1c0af1[_0x3bc380(0xd4)],'role':_0x35f2c0,'relations':_0x540887,'user':{'userId':_0x16f436[_0x3bc380(0xd9)],'username':_0x16f436['username'],'nickname':_0x16f436['nickname']},'dryRun':_0x2c809b,..._0x44daee!==undefined?{'expectUserCount':_0x44daee}:{}}),'role':_0x35f2c0,'user':_0x16f436};}
1
+ const a219_0x14d093=a219_0x3397;(function(_0x4b68a7,_0x1bf900){const _0x42419d=a219_0x3397,_0x35ca4b=_0x4b68a7();while(!![]){try{const _0x278839=-parseInt(_0x42419d(0xa9))/0x1+parseInt(_0x42419d(0xd8))/0x2+parseInt(_0x42419d(0xb5))/0x3+-parseInt(_0x42419d(0xb1))/0x4+-parseInt(_0x42419d(0xbe))/0x5+-parseInt(_0x42419d(0xf0))/0x6*(parseInt(_0x42419d(0xe0))/0x7)+parseInt(_0x42419d(0xf2))/0x8;if(_0x278839===_0x1bf900)break;else _0x35ca4b['push'](_0x35ca4b['shift']());}catch(_0x132358){_0x35ca4b['push'](_0x35ca4b['shift']());}}}(a219_0x5cc1,0x9a945));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':a219_0x14d093(0xd9),'required':!![],'description':a219_0x14d093(0xd7)};export const ROLE_REF_FLAG={'name':a219_0x14d093(0xf4),'type':a219_0x14d093(0xeb),'required':!![],'description':a219_0x14d093(0xdf)};export const USER_REF_FLAG={'name':a219_0x14d093(0xa8),'type':a219_0x14d093(0xeb),'required':!![],'description':a219_0x14d093(0xb8)};export const NAME_FLAG={'name':a219_0x14d093(0xc5),'type':a219_0x14d093(0xeb),'required':!![],'description':a219_0x14d093(0xb4)};export const USER_NAME_FLAG={'name':'name','type':a219_0x14d093(0xeb),'required':!![],'description':a219_0x14d093(0xd1)};export const REMARK_FLAG={'name':'remark','type':a219_0x14d093(0xeb),'required':![],'description':a219_0x14d093(0xf6)};export const EXPECT_USER_COUNT_FLAG={'name':a219_0x14d093(0xcb),'type':a219_0x14d093(0xd9),'required':![],'description':a219_0x14d093(0xab)};export const BUILTIN_ROLE_TYPES=[a219_0x14d093(0xb7),a219_0x14d093(0xda),a219_0x14d093(0xb0)];export function isBuiltinRole(_0x31523e){const _0x4d6f90=a219_0x14d093;return BUILTIN_ROLE_TYPES[_0x4d6f90(0xb2)](_0x31523e);}export function assertCustomRole(_0x2d33b0,_0x4c4f8e){const _0x27c059=a219_0x14d093;if(_0x2d33b0[_0x27c059(0xc0)]!==_0x27c059(0xc2))throw CliErrors[_0x27c059(0xad)](_0x27c059(0xe2)+_0x4c4f8e+_0x27c059(0xdd)+_0x2d33b0[_0x27c059(0xaa)]+'\x20('+_0x2d33b0[_0x27c059(0xc0)]+').',_0x27c059(0xd3));}export function projectRole(_0x412fc2){const _0x2d44f7=a219_0x14d093;return{'id':_0x412fc2['id'],'roleName':_0x412fc2[_0x2d44f7(0xaa)],'roleType':_0x412fc2[_0x2d44f7(0xc0)],'remark':_0x412fc2['remark'],'userCount':_0x412fc2[_0x2d44f7(0xe3)],'permitCount':_0x412fc2['permitCount'],'builtin':isBuiltinRole(_0x412fc2['roleType'])};}export async function resolveRoleRef(_0x5cd510,_0x35ae64){const _0x43064b=a219_0x14d093,_0x438ceb=_0x35ae64[_0x43064b(0xe1)]();if(!_0x438ceb)throw CliErrors[_0x43064b(0xad)](_0x43064b(0xf5),_0x43064b(0xe8));if(/^\d+$/[_0x43064b(0xd5)](_0x438ceb))return getRoleById(_0x5cd510,Number(_0x438ceb));const _0x2cef3f=await listAllAppRoles(_0x5cd510),_0x2a1535=_0x2cef3f[_0x43064b(0xb6)](_0x1f0c6e=>_0x1f0c6e[_0x43064b(0xaa)]===_0x438ceb);if(_0x2a1535[_0x43064b(0xb3)]===0x0)throw CliErrors[_0x43064b(0xad)](_0x43064b(0xe7)+_0x438ceb+_0x43064b(0xac)+_0x5cd510+'.',_0x43064b(0xbf));if(_0x2a1535[_0x43064b(0xb3)]>0x1){const _0x537d75=_0x2a1535['map'](_0x2592ab=>_0x2592ab['id'])['join'](',\x20');throw CliErrors[_0x43064b(0xad)]('Role\x20name\x20\x22'+_0x438ceb+_0x43064b(0xbb)+_0x537d75+').',_0x43064b(0xd4));}return _0x2a1535[0x0];}export async function getRoleById(_0x43ffc6,_0x3feedd){const _0x12e386=a219_0x14d093,_0x583075=await listAllAppRoles(_0x43ffc6),_0x3292fa=_0x583075[_0x12e386(0xb6)](_0xe9a368=>_0xe9a368['id']===_0x3feedd&&(!_0xe9a368[_0x12e386(0xd2)]||_0xe9a368[_0x12e386(0xd2)]===_0x43ffc6));if(_0x3292fa['length']!==0x1)throw CliErrors[_0x12e386(0xad)]('Role\x20id\x20'+_0x3feedd+_0x12e386(0xb9)+_0x43ffc6+'.',_0x12e386(0xdb));return _0x3292fa[0x0];}async function listAllAppRoles(_0x1a4662){const _0x3cfb53=a219_0x14d093,_0x4294fc=0x64,_0x2c725c=[];for(let _0x40031f=0x1;;_0x40031f+=0x1){const {items:_0x192035,paging:_0x3bd34e}=await listAppRoles(_0x1a4662,{'currentPage':_0x40031f,'pageSize':_0x4294fc});_0x2c725c[_0x3cfb53(0xed)](..._0x192035);if(_0x192035['length']<_0x4294fc||_0x3bd34e&&_0x2c725c[_0x3cfb53(0xb3)]>=_0x3bd34e['totalCount'])return _0x2c725c;}}export async function resolveTenantCode(){const _0x13428b=a219_0x14d093,_0x3c9944=await getSessionUserInfo(),_0x5058ae=_0x3c9944?.[_0x13428b(0xa8)]?.[_0x13428b(0xcf)]?.[_0x13428b(0xbc)];if(!_0x5058ae)throw CliErrors[_0x13428b(0xef)](_0x13428b(0xae));return _0x5058ae;}function matchMember(_0x41d1bd,_0x6e4183){const _0x5806ae=a219_0x14d093,_0x5e545c=_0x6e4183['trim']()['toLowerCase']();return(_0x41d1bd[_0x5806ae(0xc6)]??'')[_0x5806ae(0xe9)]()===_0x5e545c||(_0x41d1bd[_0x5806ae(0xce)]??'')[_0x5806ae(0xe9)]()===_0x5e545c;}export async function resolveUserRef(_0x32ec12,_0x4c0db0='Pass\x20--user\x20<id>.'){const _0x35c711=a219_0x14d093,_0x911de6=_0x32ec12[_0x35c711(0xe1)]();if(!_0x911de6)throw CliErrors[_0x35c711(0xad)]('Missing\x20user\x20reference.',_0x35c711(0xaf));const _0x5b3e78=await resolveTenantCode(),_0x30dd2b=await getTenantMembers(_0x5b3e78);if(/^\d+$/[_0x35c711(0xd5)](_0x911de6)){const _0x3cfdf2=Number(_0x911de6),_0x418118=_0x30dd2b[_0x35c711(0xe6)](_0x11e04e=>_0x11e04e[_0x35c711(0xf7)]===_0x3cfdf2);return{'userId':_0x3cfdf2,'username':_0x418118?.[_0x35c711(0xce)]??String(_0x3cfdf2),'nickname':_0x418118?.[_0x35c711(0xc6)],'matchedBy':'id'};}const _0x245139=_0x30dd2b[_0x35c711(0xb6)](_0x50969e=>matchMember(_0x50969e,_0x911de6));if(_0x245139[_0x35c711(0xb3)]===0x0)throw CliErrors[_0x35c711(0xad)](_0x35c711(0xdc)+_0x911de6+'\x22.',_0x35c711(0xa7)+_0x4c0db0);if(_0x245139['length']>0x1){const _0x432ed7=_0x245139[_0x35c711(0xcc)](_0x1d9755=>(_0x1d9755[_0x35c711(0xc6)]??_0x1d9755[_0x35c711(0xce)]??'?')+'('+_0x1d9755['userId']+')')[_0x35c711(0xe4)](',\x20');throw CliErrors[_0x35c711(0xad)](_0x35c711(0xc9)+_0x911de6+'\x22:\x20'+_0x432ed7+'.',_0x4c0db0);}const _0x28030b=_0x245139[0x0];return{'userId':_0x28030b['userId'],'username':_0x28030b[_0x35c711(0xce)]??String(_0x28030b['userId']),'nickname':_0x28030b[_0x35c711(0xc6)],'matchedBy':_0x35c711(0xc5)};}export const CREATE_USER_ROLE_PATH=a219_0x14d093(0xea);export const DELETE_USER_ROLE_PATH=a219_0x14d093(0xca);export function computeRoleUserMutation(_0x2b9c2d){const _0x92539b=a219_0x14d093,{operation:_0x14ecea,appCode:_0x3dfb8e,role:_0x491f00,relations:_0x43af9b,user:_0x47a4f0}=_0x2b9c2d,_0x41bc92=[...new Set(_0x43af9b[_0x92539b(0xcc)](_0x28bbc1=>_0x28bbc1['userId']))],_0x97f4a4=[];if(_0x2b9c2d[_0x92539b(0xc1)]!==undefined&&_0x2b9c2d[_0x92539b(0xc1)]!==_0x41bc92[_0x92539b(0xb3)])throw CliErrors[_0x92539b(0xad)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x2b9c2d[_0x92539b(0xc1)]+_0x92539b(0xd6)+_0x41bc92[_0x92539b(0xb3)]+'.',_0x92539b(0xcd));const _0x93b1a9=_0x41bc92[_0x92539b(0xb2)](_0x47a4f0['userId']),_0x8f7d5f=_0x43af9b[_0x92539b(0xb6)](_0x817b5b=>_0x817b5b[_0x92539b(0xf7)]===_0x47a4f0[_0x92539b(0xf7)])['map'](_0x41cc15=>_0x41cc15['id']),_0x9f9ac8=_0x14ecea===_0x92539b(0xbd)?!_0x93b1a9:_0x93b1a9;let _0x4de105=_0x41bc92;_0x14ecea===_0x92539b(0xbd)?_0x93b1a9?_0x97f4a4['push'](_0x92539b(0xe5)+_0x47a4f0[_0x92539b(0xf7)]+_0x92539b(0xc3)+_0x491f00[_0x92539b(0xaa)]+_0x92539b(0xf1)):_0x4de105=[..._0x41bc92,_0x47a4f0[_0x92539b(0xf7)]]:!_0x93b1a9?_0x97f4a4[_0x92539b(0xed)]('User\x20'+_0x47a4f0[_0x92539b(0xf7)]+_0x92539b(0xee)+_0x491f00[_0x92539b(0xaa)]+_0x92539b(0xf1)):(_0x4de105=_0x41bc92[_0x92539b(0xb6)](_0x5c8ad6=>_0x5c8ad6!==_0x47a4f0[_0x92539b(0xf7)]),_0x8f7d5f['length']>0x1&&_0x97f4a4[_0x92539b(0xed)](_0x92539b(0xd0)+_0x8f7d5f[_0x92539b(0xb3)]+'\x20duplicate\x20memberships\x20for\x20user\x20'+_0x47a4f0[_0x92539b(0xf7)]+'.'));const _0x2f5a8d={'scope':_0x92539b(0xf3),'operation':_0x14ecea,'selector':{'appCode':_0x3dfb8e,'roleId':_0x491f00['id'],'roleName':_0x491f00[_0x92539b(0xaa)],'userId':_0x47a4f0[_0x92539b(0xf7)]},'before':{'userIds':_0x41bc92},'after':{'userIds':_0x4de105},'dryRun':_0x2b9c2d['dryRun'],'backend':{'method':_0x92539b(0xde),'path':_0x14ecea==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x97f4a4};return{'mutation':_0x2f5a8d,'changed':_0x9f9ac8,'matchingRelationIds':_0x8f7d5f};}function a219_0x3397(_0x92d656,_0x51e8bf){_0x92d656=_0x92d656-0xa7;const _0x5cc124=a219_0x5cc1();let _0x3397d4=_0x5cc124[_0x92d656];return _0x3397d4;}export async function loadDevRoleRelations(_0x392850,_0x634ba){const _0x1210ff=a219_0x14d093,_0xf64214=0x64,_0x3ca357=[];for(let _0x4a9a9a=0x1;;_0x4a9a9a+=0x1){const {items:_0x5d071e,paging:_0x2eee6b}=await listDevUserRoleRelations(_0x392850,{'roleId':_0x634ba,'currentPage':_0x4a9a9a,'pageSize':_0xf64214});_0x3ca357['push'](..._0x5d071e);if(_0x5d071e[_0x1210ff(0xb3)]<_0xf64214||_0x2eee6b&&_0x3ca357[_0x1210ff(0xb3)]>=_0x2eee6b[_0x1210ff(0xc7)])return _0x3ca357;}}export function readRoleRef(_0x38d103){const _0x2a91fc=a219_0x14d093,_0x1739d4=_0x38d103[_0x2a91fc(0xba)](_0x2a91fc(0xf4))[_0x2a91fc(0xe1)]();if(!_0x1739d4)throw CliErrors[_0x2a91fc(0xc8)](_0x2a91fc(0xf4),_0x2a91fc(0xe8));return _0x1739d4;}function a219_0x5cc1(){const _0x16bb32=['1581505FnCODH','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','roleType','expectUserCount','CUSTOM','\x20is\x20already\x20a\x20member\x20of\x20role\x20','flag','name','nickname','totalCount','flagMissing','Multiple\x20tenant\x20members\x20match\x20\x22','/smartapi/permit/user-role/delete','expect-user-count','map','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','username','tenant','Removed\x20','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','appCode','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Disambiguate\x20with\x20--role\x20<id>.','test','\x20member(s)\x20but\x20role\x20has\x20','Role\x20id\x20(from\x20`role\x20list`)','855952PYdWOi','number','DEV','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','No\x20tenant\x20member\x20matches\x20\x22','\x20built-in\x20role\x20','POST','Role\x20id\x20or\x20exact\x20role\x20name','7119sNWotm','trim','Cannot\x20','userCount','join','User\x20','find','Role\x20name\x20\x22','Pass\x20--role\x20<id|name>.','toLowerCase','/smartapi/permit/user-role/create','string','\x20members\x20of\x20the\x20OWNER\x20role.','push','\x20is\x20not\x20a\x20member\x20of\x20role\x20','authRequired','174yojTuh',';\x20no\x20change.','15611848wMGfaX','dev','role','Missing\x20role\x20reference.','Optional\x20role\x20remark/description','userId','Check\x20the\x20nickname/username.\x20','user','1016346Dbgzjx','roleName','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','\x22\x20not\x20found\x20in\x20app\x20','validation','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Pass\x20--user\x20<id|name>.','OWNER','3218084pmpHyH','includes','length','Role\x20name','1261083cRrfGQ','filter','ADMIN','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','\x20not\x20found\x20in\x20app\x20','str','\x22\x20is\x20ambiguous\x20(ids:\x20','tenant_code','user-add'];a219_0x5cc1=function(){return _0x16bb32;};return a219_0x5cc1();}export async function prepareUserMutation(_0x2ccc8d,_0x294fff,_0xb36a5){const _0x5a2b32=a219_0x14d093,_0x2f5de8=readRoleRef(_0x2ccc8d),_0x323951=_0x2ccc8d[_0x5a2b32(0xba)](_0x5a2b32(0xa8))[_0x5a2b32(0xe1)]();if(!_0x323951)throw CliErrors['flagMissing'](_0x5a2b32(0xa8),_0x5a2b32(0xaf));const _0x57f2c9=_0x2ccc8d[_0x5a2b32(0xc4)]('expect-user-count'),_0x253a5a=_0x57f2c9===undefined||_0x57f2c9===null?undefined:Number(_0x57f2c9),_0x333906=await resolveRoleRef(_0x2ccc8d['appCode'],_0x2f5de8);if(_0x333906[_0x5a2b32(0xc0)]===_0x5a2b32(0xb0))throw CliErrors[_0x5a2b32(0xad)](_0x5a2b32(0xe2)+_0x294fff+_0x5a2b32(0xec),'Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x30be37=await resolveUserRef(_0x323951),_0x3ed31f=await loadDevRoleRelations(_0x2ccc8d[_0x5a2b32(0xd2)],_0x333906['id']);return{...computeRoleUserMutation({'operation':_0x294fff,'appCode':_0x2ccc8d[_0x5a2b32(0xd2)],'role':_0x333906,'relations':_0x3ed31f,'user':{'userId':_0x30be37[_0x5a2b32(0xf7)],'username':_0x30be37['username'],'nickname':_0x30be37[_0x5a2b32(0xc6)]},'dryRun':_0xb36a5,..._0x253a5a!==undefined?{'expectUserCount':_0x253a5a}:{}}),'role':_0x333906,'user':_0x30be37};}
@@ -1 +1 @@
1
- const a220_0x15254d=a220_0x1462;function a220_0x1462(_0x37bda2,_0xc631b8){_0x37bda2=_0x37bda2-0xe6;const _0xa94a6=a220_0xa94a();let _0x1462c8=_0xa94a6[_0x37bda2];return _0x1462c8;}(function(_0x867647,_0x56b665){const _0xc84419=a220_0x1462,_0x2445c2=_0x867647();while(!![]){try{const _0x5a85ea=parseInt(_0xc84419(0xea))/0x1+parseInt(_0xc84419(0xff))/0x2*(parseInt(_0xc84419(0xf8))/0x3)+parseInt(_0xc84419(0xec))/0x4+parseInt(_0xc84419(0xfb))/0x5+parseInt(_0xc84419(0xf1))/0x6+-parseInt(_0xc84419(0x102))/0x7*(parseInt(_0xc84419(0xfc))/0x8)+-parseInt(_0xc84419(0xe9))/0x9*(parseInt(_0xc84419(0xf9))/0xa);if(_0x5a85ea===_0x56b665)break;else _0x2445c2['push'](_0x2445c2['shift']());}catch(_0x42f178){_0x2445c2['push'](_0x2445c2['shift']());}}}(a220_0xa94a,0x9615b));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a220_0x15254d(0xeb);function a220_0xa94a(){const _0x5cbd76=['/smartapi/permit/role/update','1135948UzGqwk','length','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','num','Nothing\x20to\x20update.','829008QsHvFg','dev','name','New\x20role\x20name','update','trim','remark','49047QGjXlq','68230ozXFpy','flag','3044955iXfVAB','16DwJnjK','validation','POST','94SQRZvr','string','appCode','2109142dQZVnF','Updated\x20role\x20','--name\x20cannot\x20be\x20empty.','roleName','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','1953KQqGFz','898401pdbXYD'];a220_0xa94a=function(){return _0x5cbd76;};return a220_0xa94a();}function readPatch(_0x35673e){const _0x34f4e3=a220_0x15254d,_0x53d26f=_0x35673e[_0x34f4e3(0xfa)](_0x34f4e3(0xf3)),_0x3366b4=_0x35673e[_0x34f4e3(0xfa)](_0x34f4e3(0xf7)),_0x5712c5={};if(_0x53d26f!==undefined&&_0x53d26f!==null){const _0x58738f=String(_0x53d26f)[_0x34f4e3(0xf6)]();if(!_0x58738f)throw CliErrors['validation'](_0x34f4e3(0xe6));if(_0x58738f[_0x34f4e3(0xed)]>0x40)throw CliErrors[_0x34f4e3(0xfd)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0x5712c5['roleName']=_0x58738f;}_0x3366b4!==undefined&&_0x3366b4!==null&&(_0x5712c5['remark']=String(_0x3366b4));if(_0x5712c5[_0x34f4e3(0xe7)]===undefined&&_0x5712c5['remark']===undefined)throw CliErrors['validation'](_0x34f4e3(0xf0),_0x34f4e3(0xe8));return _0x5712c5;}export const roleUpdate={'service':'role','command':a220_0x15254d(0xf5),'description':a220_0x15254d(0xee),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a220_0x15254d(0xf3),'type':a220_0x15254d(0x100),'required':![],'description':a220_0x15254d(0xf4)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x35c6b6){readPatch(_0x35c6b6);},async 'dryRun'(_0x334589){const _0x13a95d=a220_0x15254d,_0x4f75c0=_0x334589['num']('id'),_0x2d8686=readPatch(_0x334589),_0x54e9e1=await getRoleById(_0x334589[_0x13a95d(0x101)],_0x4f75c0);return assertCustomRole(_0x54e9e1,_0x13a95d(0xf5)),asDryRunResult({'scope':_0x13a95d(0xf2),'operation':_0x13a95d(0xf5),'selector':{'appCode':_0x334589[_0x13a95d(0x101)],'roleId':_0x4f75c0,'roleName':_0x54e9e1[_0x13a95d(0xe7)]},'before':projectRole(_0x54e9e1),'after':projectRole({..._0x54e9e1,..._0x2d8686[_0x13a95d(0xe7)]!==undefined?{'roleName':_0x2d8686['roleName']}:{},..._0x2d8686[_0x13a95d(0xf7)]!==undefined?{'remark':_0x2d8686[_0x13a95d(0xf7)]}:{}}),'dryRun':!![],'backend':{'method':_0x13a95d(0xfe),'path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x1bdad8){const _0xd9b1cc=a220_0x15254d,_0x1039bd=_0x1bdad8[_0xd9b1cc(0xef)]('id'),_0x18ee28=readPatch(_0x1bdad8),_0x20bd38=await getRoleById(_0x1bdad8[_0xd9b1cc(0x101)],_0x1039bd);assertCustomRole(_0x20bd38,_0xd9b1cc(0xf5)),await updateAppRole({'id':_0x1039bd,'appCode':_0x1bdad8['appCode'],..._0x18ee28[_0xd9b1cc(0xe7)]!==undefined?{'roleName':_0x18ee28[_0xd9b1cc(0xe7)]}:{},..._0x18ee28[_0xd9b1cc(0xf7)]!==undefined?{'remark':_0x18ee28['remark']}:{}});const _0xe58a02=await getRoleById(_0x1bdad8[_0xd9b1cc(0x101)],_0x1039bd);return{'ok':!![],'data':{'scope':_0xd9b1cc(0xf2),'operation':_0xd9b1cc(0xf5),'selector':{'appCode':_0x1bdad8[_0xd9b1cc(0x101)],'roleId':_0x1039bd,'roleName':_0xe58a02[_0xd9b1cc(0xe7)]},'before':projectRole(_0x20bd38),'after':projectRole(_0xe58a02),'dryRun':![],'backend':{'method':_0xd9b1cc(0xfe),'path':UPDATE_PATH},'warnings':[]},'message':_0xd9b1cc(0x103)+_0xe58a02[_0xd9b1cc(0xe7)]+'\x20(id='+_0x1039bd+')'};}};
1
+ const a220_0x5b65d1=a220_0x3c46;(function(_0x213c10,_0x4cfda0){const _0x5a1175=a220_0x3c46,_0x450192=_0x213c10();while(!![]){try{const _0x11132a=-parseInt(_0x5a1175(0x1df))/0x1*(parseInt(_0x5a1175(0x1e3))/0x2)+parseInt(_0x5a1175(0x1f6))/0x3+-parseInt(_0x5a1175(0x1f2))/0x4+-parseInt(_0x5a1175(0x1e4))/0x5+-parseInt(_0x5a1175(0x1e9))/0x6*(parseInt(_0x5a1175(0x1f8))/0x7)+parseInt(_0x5a1175(0x1f4))/0x8+-parseInt(_0x5a1175(0x1e8))/0x9*(-parseInt(_0x5a1175(0x1e7))/0xa);if(_0x11132a===_0x4cfda0)break;else _0x450192['push'](_0x450192['shift']());}catch(_0x32b591){_0x450192['push'](_0x450192['shift']());}}}(a220_0x549a,0x711c2));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';function a220_0x3c46(_0xdf6e24,_0x1cb421){_0xdf6e24=_0xdf6e24-0x1dd;const _0x549aad=a220_0x549a();let _0x3c46d2=_0x549aad[_0xdf6e24];return _0x3c46d2;}import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';function readPatch(_0x2927d9){const _0x4b1c7a=a220_0x3c46,_0x42531c=_0x2927d9[_0x4b1c7a(0x1ee)](_0x4b1c7a(0x1ea)),_0x1dbb6c=_0x2927d9[_0x4b1c7a(0x1ee)]('remark'),_0x419b80={};if(_0x42531c!==undefined&&_0x42531c!==null){const _0x59ddcb=String(_0x42531c)[_0x4b1c7a(0x1f1)]();if(!_0x59ddcb)throw CliErrors[_0x4b1c7a(0x1e0)]('--name\x20cannot\x20be\x20empty.');if(_0x59ddcb['length']>0x40)throw CliErrors[_0x4b1c7a(0x1e0)](_0x4b1c7a(0x1f9));_0x419b80['roleName']=_0x59ddcb;}_0x1dbb6c!==undefined&&_0x1dbb6c!==null&&(_0x419b80[_0x4b1c7a(0x1e2)]=String(_0x1dbb6c));if(_0x419b80[_0x4b1c7a(0x1eb)]===undefined&&_0x419b80['remark']===undefined)throw CliErrors[_0x4b1c7a(0x1e0)](_0x4b1c7a(0x1f7),_0x4b1c7a(0x1f5));return _0x419b80;}export const roleUpdate={'service':a220_0x5b65d1(0x1e1),'command':a220_0x5b65d1(0x1f0),'description':'Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','risk':a220_0x5b65d1(0x1de),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a220_0x5b65d1(0x1ea),'type':a220_0x5b65d1(0x1ec),'required':![],'description':a220_0x5b65d1(0x1e5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x20ddd7){readPatch(_0x20ddd7);},async 'dryRun'(_0x406fc1){const _0x16e9d0=a220_0x5b65d1,_0x1053dd=_0x406fc1[_0x16e9d0(0x1e6)]('id'),_0x3b6cf9=readPatch(_0x406fc1),_0x5e8ff5=await getRoleById(_0x406fc1[_0x16e9d0(0x1dd)],_0x1053dd);return assertCustomRole(_0x5e8ff5,_0x16e9d0(0x1f0)),asDryRunResult({'scope':_0x16e9d0(0x1f3),'operation':'update','selector':{'appCode':_0x406fc1['appCode'],'roleId':_0x1053dd,'roleName':_0x5e8ff5['roleName']},'before':projectRole(_0x5e8ff5),'after':projectRole({..._0x5e8ff5,..._0x3b6cf9[_0x16e9d0(0x1eb)]!==undefined?{'roleName':_0x3b6cf9[_0x16e9d0(0x1eb)]}:{},..._0x3b6cf9[_0x16e9d0(0x1e2)]!==undefined?{'remark':_0x3b6cf9[_0x16e9d0(0x1e2)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':_0x16e9d0(0x1ed),'url':UPDATE_PATH});},async 'execute'(_0x572ab7){const _0x1864a8=a220_0x5b65d1,_0x87a5b=_0x572ab7[_0x1864a8(0x1e6)]('id'),_0x1c7988=readPatch(_0x572ab7),_0x1d106d=await getRoleById(_0x572ab7[_0x1864a8(0x1dd)],_0x87a5b);assertCustomRole(_0x1d106d,_0x1864a8(0x1f0)),await updateAppRole({'id':_0x87a5b,'appCode':_0x572ab7['appCode'],..._0x1c7988[_0x1864a8(0x1eb)]!==undefined?{'roleName':_0x1c7988[_0x1864a8(0x1eb)]}:{},..._0x1c7988[_0x1864a8(0x1e2)]!==undefined?{'remark':_0x1c7988[_0x1864a8(0x1e2)]}:{}});const _0x598f23=await getRoleById(_0x572ab7[_0x1864a8(0x1dd)],_0x87a5b);return{'ok':!![],'data':{'scope':_0x1864a8(0x1f3),'operation':_0x1864a8(0x1f0),'selector':{'appCode':_0x572ab7[_0x1864a8(0x1dd)],'roleId':_0x87a5b,'roleName':_0x598f23['roleName']},'before':projectRole(_0x1d106d),'after':projectRole(_0x598f23),'dryRun':![],'backend':{'method':_0x1864a8(0x1ed),'path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x598f23[_0x1864a8(0x1eb)]+_0x1864a8(0x1ef)+_0x87a5b+')'};}};function a220_0x549a(){const _0x1029c7=['update','trim','1642200rCWdVm','dev','5189448MyzDUH','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','190494qglNYh','Nothing\x20to\x20update.','21mrxBwV','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','appCode','write','97385FHqHgt','validation','role','remark','8MZxKrI','843910SiLyVy','New\x20role\x20name','num','180CrQcTs','447507SwRcWC','350046dyQTln','name','roleName','string','POST','flag','\x20(id='];a220_0x549a=function(){return _0x1029c7;};return a220_0x549a();}
@@ -1 +1 @@
1
- function a221_0x330f(){const _0x4aa7c2=['selector','\x20already\x20in\x20role\x20','7AJBeGN','2395ugdvdU','role','2947879EisKvS','552080Ernwos','roleName','24561vOsGbd','Added\x20user\x20','userId','336456mtVPoH','roleId','POST','user-add','19959bZuDll','1048krZQFq','730wJKHmo','No\x20change:\x20user\x20','high-risk-write','134WhxZgF','136195dUuJRg','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','48hUCvpP'];a221_0x330f=function(){return _0x4aa7c2;};return a221_0x330f();}function a221_0x3763(_0x2afdd5,_0x475c04){_0x2afdd5=_0x2afdd5-0x12f;const _0x330f5b=a221_0x330f();let _0x376333=_0x330f5b[_0x2afdd5];return _0x376333;}const a221_0x4b8856=a221_0x3763;(function(_0x2ef4a4,_0x1b5540){const _0x37608e=a221_0x3763,_0x1be897=_0x2ef4a4();while(!![]){try{const _0x3e494f=-parseInt(_0x37608e(0x144))/0x1+-parseInt(_0x37608e(0x143))/0x2*(parseInt(_0x37608e(0x13e))/0x3)+-parseInt(_0x37608e(0x13f))/0x4*(parseInt(_0x37608e(0x132))/0x5)+parseInt(_0x37608e(0x13a))/0x6+parseInt(_0x37608e(0x131))/0x7*(parseInt(_0x37608e(0x135))/0x8)+parseInt(_0x37608e(0x137))/0x9*(-parseInt(_0x37608e(0x140))/0xa)+parseInt(_0x37608e(0x134))/0xb*(parseInt(_0x37608e(0x146))/0xc);if(_0x3e494f===_0x1b5540)break;else _0x1be897['push'](_0x1be897['shift']());}catch(_0x4fdc15){_0x1be897['push'](_0x1be897['shift']());}}}(a221_0x330f,0x46e4d));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a221_0x4b8856(0x133),'command':a221_0x4b8856(0x13d),'description':a221_0x4b8856(0x145),'risk':a221_0x4b8856(0x142),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3462a7){const _0x2eb08d=a221_0x4b8856,{mutation:_0x57e016}=await prepareUserMutation(_0x3462a7,_0x2eb08d(0x13d),!![]);return asDryRunResult(_0x57e016,{'method':_0x2eb08d(0x13c),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x2b954c){const _0x5f3845=a221_0x4b8856,{mutation:_0x1c546a,changed:_0x34b7c4,role:_0x42632d,user:_0x355fff}=await prepareUserMutation(_0x2b954c,'user-add',![]);return _0x34b7c4&&await createDevUserRole({'appCode':_0x2b954c['appCode'],'userId':_0x355fff[_0x5f3845(0x139)],'username':_0x355fff['username'],'roleType':_0x42632d['roleType'],'roleId':_0x1c546a[_0x5f3845(0x12f)][_0x5f3845(0x13b)]}),{'ok':!![],'data':_0x1c546a,'message':_0x34b7c4?_0x5f3845(0x138)+_0x1c546a[_0x5f3845(0x12f)]['userId']+'\x20to\x20role\x20'+_0x1c546a[_0x5f3845(0x12f)][_0x5f3845(0x136)]:_0x5f3845(0x141)+_0x1c546a['selector']['userId']+_0x5f3845(0x130)+_0x1c546a['selector']['roleName']};}};
1
+ const a221_0x59a583=a221_0x2d7a;(function(_0x1862eb,_0x568808){const _0x4b6df3=a221_0x2d7a,_0x2ba0d8=_0x1862eb();while(!![]){try{const _0x4099b9=parseInt(_0x4b6df3(0x107))/0x1+parseInt(_0x4b6df3(0x102))/0x2*(parseInt(_0x4b6df3(0x108))/0x3)+-parseInt(_0x4b6df3(0xff))/0x4+parseInt(_0x4b6df3(0x105))/0x5*(-parseInt(_0x4b6df3(0x10a))/0x6)+-parseInt(_0x4b6df3(0xfb))/0x7*(parseInt(_0x4b6df3(0x109))/0x8)+-parseInt(_0x4b6df3(0xf7))/0x9+parseInt(_0x4b6df3(0x103))/0xa;if(_0x4099b9===_0x568808)break;else _0x2ba0d8['push'](_0x2ba0d8['shift']());}catch(_0x46bbd1){_0x2ba0d8['push'](_0x2ba0d8['shift']());}}}(a221_0x311f,0x6a3ac));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a221_0x2d7a(_0x47e887,_0x383c62){_0x47e887=_0x47e887-0xf4;const _0x311f26=a221_0x311f();let _0x2d7a37=_0x311f26[_0x47e887];return _0x2d7a37;}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':a221_0x59a583(0xfe),'command':a221_0x59a583(0x101),'description':a221_0x59a583(0xf9),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x410bb4){const {mutation:_0x66ac2a}=await prepareUserMutation(_0x410bb4,'user-add',!![]);return asDryRunResult(_0x66ac2a,{'method':'POST','url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x1516ab){const _0x2fb710=a221_0x59a583,{mutation:_0x1314a5,changed:_0x3c44fc,role:_0x1f9247,user:_0x1d6bf9}=await prepareUserMutation(_0x1516ab,_0x2fb710(0x101),![]);return _0x3c44fc&&await createDevUserRole({'appCode':_0x1516ab[_0x2fb710(0xf8)],'userId':_0x1d6bf9[_0x2fb710(0xfd)],'username':_0x1d6bf9[_0x2fb710(0xfa)],'roleType':_0x1f9247[_0x2fb710(0x100)],'roleId':_0x1314a5[_0x2fb710(0xfc)][_0x2fb710(0x106)]}),{'ok':!![],'data':_0x1314a5,'message':_0x3c44fc?_0x2fb710(0xf6)+_0x1314a5[_0x2fb710(0xfc)][_0x2fb710(0xfd)]+_0x2fb710(0xf5)+_0x1314a5[_0x2fb710(0xfc)][_0x2fb710(0x104)]:'No\x20change:\x20user\x20'+_0x1314a5['selector'][_0x2fb710(0xfd)]+_0x2fb710(0xf4)+_0x1314a5[_0x2fb710(0xfc)][_0x2fb710(0x104)]};}};function a221_0x311f(){const _0x691dfd=['selector','userId','role','450600lxOOOk','roleType','user-add','1438ARuXhR','6064080GqyQlF','roleName','70FNmrZW','roleId','622068VIFsQi','357HwLpGG','296uLFSiV','948SzhzYF','\x20already\x20in\x20role\x20','\x20to\x20role\x20','Added\x20user\x20','3201210eMdYcl','appCode','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','username','77259Sxkubv'];a221_0x311f=function(){return _0x691dfd;};return a221_0x311f();}
@@ -1 +1 @@
1
- function a222_0x5d2a(_0x4e07c4,_0x52ea99){_0x4e07c4=_0x4e07c4-0x112;const _0x107968=a222_0x1079();let _0x5d2ac5=_0x107968[_0x4e07c4];return _0x5d2ac5;}const a222_0x48b2a0=a222_0x5d2a;(function(_0x132e9a,_0x5682c3){const _0x2032bc=a222_0x5d2a,_0x441f9a=_0x132e9a();while(!![]){try{const _0x17965d=-parseInt(_0x2032bc(0x11f))/0x1*(parseInt(_0x2032bc(0x124))/0x2)+parseInt(_0x2032bc(0x116))/0x3*(parseInt(_0x2032bc(0x119))/0x4)+-parseInt(_0x2032bc(0x125))/0x5+-parseInt(_0x2032bc(0x11c))/0x6*(-parseInt(_0x2032bc(0x118))/0x7)+parseInt(_0x2032bc(0x120))/0x8*(-parseInt(_0x2032bc(0x115))/0x9)+-parseInt(_0x2032bc(0x126))/0xa*(-parseInt(_0x2032bc(0x123))/0xb)+parseInt(_0x2032bc(0x113))/0xc;if(_0x17965d===_0x5682c3)break;else _0x441f9a['push'](_0x441f9a['shift']());}catch(_0x1dc32e){_0x441f9a['push'](_0x441f9a['shift']());}}}(a222_0x1079,0xee614));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':a222_0x48b2a0(0x122),'command':a222_0x48b2a0(0x11d),'description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a222_0x48b2a0(0x121),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x45e80d){const _0x530ce7=a222_0x48b2a0,{mutation:_0x4714bc}=await prepareUserMutation(_0x45e80d,_0x530ce7(0x11d),!![]);return asDryRunResult(_0x4714bc,{'method':_0x530ce7(0x11e),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x5aeeeb){const _0x383c66=a222_0x48b2a0,{matchingRelationIds:_0x57f8fa,mutation:_0x995fcb,changed:_0xc509b3}=await prepareUserMutation(_0x5aeeeb,_0x383c66(0x11d),![]);if(_0xc509b3)for(const _0x1c36b1 of _0x57f8fa){await deleteDevUserRole(_0x1c36b1);}return{'ok':!![],'data':_0x995fcb,'message':_0xc509b3?_0x383c66(0x127)+_0x995fcb['selector'][_0x383c66(0x112)]+_0x383c66(0x114)+_0x995fcb['selector']['roleName']:'No\x20change:\x20user\x20'+_0x995fcb[_0x383c66(0x117)]['userId']+_0x383c66(0x11b)+_0x995fcb[_0x383c66(0x117)][_0x383c66(0x11a)]};}};function a222_0x1079(){const _0x3a1490=['753208iakoKU','high-risk-write','role','22TEPFcZ','34dOjlEv','5674200sWfweA','6150670QHlsNg','Removed\x20user\x20','userId','4885716KxtGce','\x20from\x20role\x20','63RkYJEx','2788293XKGLfu','selector','2524900KfTtGn','8LpYWLO','roleName','\x20not\x20in\x20role\x20','6nxtxCZ','user-remove','POST','63914OhcUjo'];a222_0x1079=function(){return _0x3a1490;};return a222_0x1079();}
1
+ function a222_0x3ba3(_0x5f5051,_0x57a63d){_0x5f5051=_0x5f5051-0x1bd;const _0x3e29c3=a222_0x3e29();let _0x3ba315=_0x3e29c3[_0x5f5051];return _0x3ba315;}const a222_0xecce39=a222_0x3ba3;(function(_0x4d9f56,_0x868c29){const _0x4ba2f9=a222_0x3ba3,_0xd969ca=_0x4d9f56();while(!![]){try{const _0x49c2bd=-parseInt(_0x4ba2f9(0x1c8))/0x1+-parseInt(_0x4ba2f9(0x1ce))/0x2*(parseInt(_0x4ba2f9(0x1cb))/0x3)+parseInt(_0x4ba2f9(0x1cd))/0x4*(-parseInt(_0x4ba2f9(0x1c0))/0x5)+-parseInt(_0x4ba2f9(0x1c1))/0x6+-parseInt(_0x4ba2f9(0x1c5))/0x7+parseInt(_0x4ba2f9(0x1ca))/0x8*(parseInt(_0x4ba2f9(0x1bd))/0x9)+-parseInt(_0x4ba2f9(0x1cc))/0xa*(-parseInt(_0x4ba2f9(0x1c6))/0xb);if(_0x49c2bd===_0x868c29)break;else _0xd969ca['push'](_0xd969ca['shift']());}catch(_0x2f0e24){_0xd969ca['push'](_0xd969ca['shift']());}}}(a222_0x3e29,0x7f64b));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':a222_0xecce39(0x1bf),'command':a222_0xecce39(0x1be),'description':a222_0xecce39(0x1c7),'risk':a222_0xecce39(0x1c9),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4bf249){const _0x16a417=a222_0xecce39,{mutation:_0x323b88}=await prepareUserMutation(_0x4bf249,_0x16a417(0x1be),!![]);return asDryRunResult(_0x323b88,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x12294a){const _0x9b1da9=a222_0xecce39,{matchingRelationIds:_0x34085d,mutation:_0x27a954,changed:_0x51510f}=await prepareUserMutation(_0x12294a,'user-remove',![]);if(_0x51510f)for(const _0x34cae6 of _0x34085d){await deleteDevUserRole(_0x34cae6);}return{'ok':!![],'data':_0x27a954,'message':_0x51510f?_0x9b1da9(0x1c2)+_0x27a954[_0x9b1da9(0x1c4)]['userId']+_0x9b1da9(0x1cf)+_0x27a954[_0x9b1da9(0x1c4)][_0x9b1da9(0x1d1)]:'No\x20change:\x20user\x20'+_0x27a954['selector'][_0x9b1da9(0x1d0)]+_0x9b1da9(0x1c3)+_0x27a954[_0x9b1da9(0x1c4)][_0x9b1da9(0x1d1)]};}};function a222_0x3e29(){const _0x5093dc=['role','5RXjJmN','1769766emqoRb','Removed\x20user\x20','\x20not\x20in\x20role\x20','selector','5825701oGXBCn','117381wSrfBK','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','356249PjfGsZ','high-risk-write','2635168yAeygV','298161yMJHRM','1910qJFRTB','2096632sArpRZ','10WnKSbZ','\x20from\x20role\x20','userId','roleName','27sOCCPh','user-remove'];a222_0x3e29=function(){return _0x5093dc;};return a222_0x3e29();}
@@ -1 +1 @@
1
- function a223_0x5dcb(){const _0x5dd181=['username','Pass\x20--name\x20<nickname|username>.','userId','517200pyFIfQ','396wXXLCs','13848FrAzWM','flagMissing','name','read','156759lRdPwM','Resolved\x20\x22','52456FsyDEb','str','11866lzJpWw','matchedBy','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','143290BeCIqz','nickname','trim','2466Qpoknn','702YTUied','12nwwGOZ','215DisSMU','306ocQDBT','1117907ATaCBC'];a223_0x5dcb=function(){return _0x5dd181;};return a223_0x5dcb();}const a223_0x4b90c3=a223_0x33e0;(function(_0x12aa4f,_0x5c48e7){const _0x1c7719=a223_0x33e0,_0x3f4847=_0x12aa4f();while(!![]){try{const _0x5d7da3=-parseInt(_0x1c7719(0xb2))/0x1+parseInt(_0x1c7719(0xb6))/0x2*(-parseInt(_0x1c7719(0xa7))/0x3)+parseInt(_0x1c7719(0xb4))/0x4*(-parseInt(_0x1c7719(0xa6))/0x5)+-parseInt(_0x1c7719(0xa5))/0x6*(-parseInt(_0x1c7719(0xa8))/0x7)+-parseInt(_0x1c7719(0xae))/0x8*(parseInt(_0x1c7719(0xa3))/0x9)+-parseInt(_0x1c7719(0xa0))/0xa*(parseInt(_0x1c7719(0xad))/0xb)+parseInt(_0x1c7719(0xac))/0xc*(parseInt(_0x1c7719(0xa4))/0xd);if(_0x5d7da3===_0x5c48e7)break;else _0x3f4847['push'](_0x3f4847['shift']());}catch(_0x2f6b8b){_0x3f4847['push'](_0x3f4847['shift']());}}}(a223_0x5dcb,0x50c55));import{CliErrors}from'../../errors.js';function a223_0x33e0(_0x3e0a55,_0x37fa36){_0x3e0a55=_0x3e0a55-0x9e;const _0x5dcb45=a223_0x5dcb();let _0x33e04a=_0x5dcb45[_0x3e0a55];return _0x33e04a;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':'role','command':'user-resolve','description':a223_0x4b90c3(0x9f),'risk':a223_0x4b90c3(0xb1),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x13f1e2){const _0x4537a3=a223_0x4b90c3;if(!_0x13f1e2[_0x4537a3(0xb5)](_0x4537a3(0xb0))[_0x4537a3(0xa2)]())throw CliErrors[_0x4537a3(0xaf)]('name',_0x4537a3(0xaa));},async 'execute'(_0x51cda9){const _0x1adcdc=a223_0x4b90c3,_0x581cc6=_0x51cda9['str']('name')['trim'](),_0x255ce8=await resolveUserRef(_0x581cc6,'Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.');return{'ok':!![],'data':{'user':{'userId':_0x255ce8[_0x1adcdc(0xab)],'username':_0x255ce8[_0x1adcdc(0xa9)],'nickname':_0x255ce8[_0x1adcdc(0xa1)],'matchedBy':_0x255ce8[_0x1adcdc(0x9e)]}},'message':_0x1adcdc(0xb3)+_0x581cc6+'\x22\x20→\x20userId\x20'+_0x255ce8[_0x1adcdc(0xab)]};}};
1
+ const a223_0x2c78e6=a223_0xd3b5;(function(_0x14e6ec,_0x22d806){const _0x49b9bd=a223_0xd3b5,_0x8e1f4a=_0x14e6ec();while(!![]){try{const _0x24636d=-parseInt(_0x49b9bd(0xb2))/0x1*(-parseInt(_0x49b9bd(0xb8))/0x2)+-parseInt(_0x49b9bd(0xc5))/0x3+parseInt(_0x49b9bd(0xbb))/0x4*(-parseInt(_0x49b9bd(0xb9))/0x5)+-parseInt(_0x49b9bd(0xb4))/0x6+parseInt(_0x49b9bd(0xc3))/0x7+parseInt(_0x49b9bd(0xc4))/0x8+parseInt(_0x49b9bd(0xba))/0x9;if(_0x24636d===_0x22d806)break;else _0x8e1f4a['push'](_0x8e1f4a['shift']());}catch(_0x2ef446){_0x8e1f4a['push'](_0x8e1f4a['shift']());}}}(a223_0x3d78,0xe32d7));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':a223_0x2c78e6(0xb5),'command':a223_0x2c78e6(0xb7),'description':a223_0x2c78e6(0xb3),'risk':a223_0x2c78e6(0xbc),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1bf156){const _0x422e71=a223_0x2c78e6;if(!_0x1bf156[_0x422e71(0xc1)]('name')['trim']())throw CliErrors[_0x422e71(0xc6)](_0x422e71(0xbd),_0x422e71(0xbe));},async 'execute'(_0x218cb6){const _0x1e1273=a223_0x2c78e6,_0x2e7fe1=_0x218cb6[_0x1e1273(0xc1)]('name')[_0x1e1273(0xb6)](),_0x155e90=await resolveUserRef(_0x2e7fe1,_0x1e1273(0xc7));return{'ok':!![],'data':{'user':{'userId':_0x155e90[_0x1e1273(0xbf)],'username':_0x155e90['username'],'nickname':_0x155e90[_0x1e1273(0xc0)],'matchedBy':_0x155e90['matchedBy']}},'message':_0x1e1273(0xc2)+_0x2e7fe1+'\x22\x20→\x20userId\x20'+_0x155e90[_0x1e1273(0xbf)]};}};function a223_0xd3b5(_0x2afe75,_0x746037){_0x2afe75=_0x2afe75-0xb2;const _0x3d78bf=a223_0x3d78();let _0xd3b5e1=_0x3d78bf[_0x2afe75];return _0xd3b5e1;}function a223_0x3d78(){const _0x54e534=['Resolved\x20\x22','3499993cLRZDV','564080kbEKZR','699276JwpSXy','flagMissing','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','79kfgSVy','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','4583358zKKiZh','role','trim','user-resolve','9574EGpMTN','15zgETIz','12026907sbSoDy','476668dEsTdI','read','name','Pass\x20--name\x20<nickname|username>.','userId','nickname','str'];a223_0x3d78=function(){return _0x54e534;};return a223_0x3d78();}
@@ -1 +1 @@
1
- const a224_0x225ee7=a224_0x51d9;(function(_0x4a3e0b,_0x3a30ea){const _0x13142e=a224_0x51d9,_0x2147e8=_0x4a3e0b();while(!![]){try{const _0x56631e=-parseInt(_0x13142e(0xcc))/0x1+-parseInt(_0x13142e(0xbf))/0x2+parseInt(_0x13142e(0xce))/0x3+parseInt(_0x13142e(0xc7))/0x4*(-parseInt(_0x13142e(0xcb))/0x5)+-parseInt(_0x13142e(0xc3))/0x6*(-parseInt(_0x13142e(0xc1))/0x7)+-parseInt(_0x13142e(0xc4))/0x8*(parseInt(_0x13142e(0xc5))/0x9)+parseInt(_0x13142e(0xd2))/0xa*(parseInt(_0x13142e(0xc6))/0xb);if(_0x56631e===_0x3a30ea)break;else _0x2147e8['push'](_0x2147e8['shift']());}catch(_0x36ae07){_0x2147e8['push'](_0x2147e8['shift']());}}}(a224_0x32f1,0x7f4ab));import{getAppRule}from'../../core/api-client.js';function a224_0x32f1(){const _0x27f5e3=['get','content','cookie','16385620yNrvui','1303086xtVnjw','\x20--file\x20<path>\x20--dry-run`.','863023MmCWeO','rule','36yyuLuH','552OeSogb','118215ztnXLZ','11YqfVHx','827324txpDMr','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','\x20is\x20not\x20configured\x20for\x20app\x20','app_rule_not_found','5jldisj','189999Sioanb','appCode','293337cpvbqY'];a224_0x32f1=function(){return _0x27f5e3;};return a224_0x32f1();}function a224_0x51d9(_0xa3eb42,_0x4786b2){_0xa3eb42=_0xa3eb42-0xbf;const _0x32f1c8=a224_0x32f1();let _0x51d9ff=_0x32f1c8[_0xa3eb42];return _0x51d9ff;}import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a224_0x225ee7(0xc2),'command':a224_0x225ee7(0xcf),'description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x1cc82e){readAppRuleType(_0x1cc82e);},async 'execute'(_0x516f69){const _0x4a51eb=a224_0x225ee7,_0x26745f=readAppRuleType(_0x516f69),_0x22b5fb=await getAppRule(_0x516f69[_0x4a51eb(0xd1)],{'appCode':_0x516f69[_0x4a51eb(0xcd)],'type':_0x26745f});if(!_0x22b5fb)throw appRuleError(_0x4a51eb(0xca),appRuleFileName(_0x26745f)+_0x4a51eb(0xc9)+_0x516f69[_0x4a51eb(0xcd)]+'.',_0x4a51eb(0xc8)+_0x26745f+_0x4a51eb(0xc0));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x26745f,_0x22b5fb),'content':_0x22b5fb[_0x4a51eb(0xd0)]}},'message':'Loaded\x20'+appRuleFileName(_0x26745f)+'\x20for\x20'+_0x516f69[_0x4a51eb(0xcd)]};}};
1
+ const a224_0x53d9e3=a224_0x57cd;(function(_0x350900,_0x1ddc0f){const _0x4cfb30=a224_0x57cd,_0x7f6617=_0x350900();while(!![]){try{const _0x47ca50=-parseInt(_0x4cfb30(0x1e9))/0x1+parseInt(_0x4cfb30(0x1e5))/0x2*(parseInt(_0x4cfb30(0x1e3))/0x3)+parseInt(_0x4cfb30(0x1ed))/0x4+-parseInt(_0x4cfb30(0x1e6))/0x5*(-parseInt(_0x4cfb30(0x1e0))/0x6)+-parseInt(_0x4cfb30(0x1eb))/0x7+parseInt(_0x4cfb30(0x1e7))/0x8+-parseInt(_0x4cfb30(0x1ee))/0x9;if(_0x47ca50===_0x1ddc0f)break;else _0x7f6617['push'](_0x7f6617['shift']());}catch(_0x590b23){_0x7f6617['push'](_0x7f6617['shift']());}}}(a224_0x3b7f,0x48ff1));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a224_0x57cd(_0x24638d,_0x3b0448){_0x24638d=_0x24638d-0x1df;const _0x3b7f40=a224_0x3b7f();let _0x57cdff=_0x3b7f40[_0x24638d];return _0x57cdff;}export const ruleGet={'service':a224_0x53d9e3(0x1e2),'command':a224_0x53d9e3(0x1e1),'description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x3a72e8){readAppRuleType(_0x3a72e8);},async 'execute'(_0x2d09c8){const _0x3bbad8=a224_0x53d9e3,_0x186d19=readAppRuleType(_0x2d09c8),_0x420397=await getAppRule(_0x2d09c8['cookie'],{'appCode':_0x2d09c8[_0x3bbad8(0x1e8)],'type':_0x186d19});if(!_0x420397)throw appRuleError(_0x3bbad8(0x1ea),appRuleFileName(_0x186d19)+_0x3bbad8(0x1e4)+_0x2d09c8[_0x3bbad8(0x1e8)]+'.','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20'+_0x186d19+_0x3bbad8(0x1df));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x186d19,_0x420397),'content':_0x420397[_0x3bbad8(0x1ec)]}},'message':'Loaded\x20'+appRuleFileName(_0x186d19)+'\x20for\x20'+_0x2d09c8[_0x3bbad8(0x1e8)]};}};function a224_0x3b7f(){const _0x22e9aa=['appCode','526312oQDeaF','app_rule_not_found','466683kQXzMm','content','130848OaPEog','2000439pOfsgr','\x20--file\x20<path>\x20--dry-run`.','30UKPhKD','get','rule','1061445zoKxkn','\x20is\x20not\x20configured\x20for\x20app\x20','2lgoXlc','309395vLCFlU','3346584PgmiVG'];a224_0x3b7f=function(){return _0x22e9aa;};return a224_0x3b7f();}
@@ -1 +1 @@
1
- (function(_0x3915d5,_0x276877){const _0x4991f8=a225_0x307a,_0x348f92=_0x3915d5();while(!![]){try{const _0x4b9efc=-parseInt(_0x4991f8(0xd7))/0x1+-parseInt(_0x4991f8(0xd9))/0x2*(-parseInt(_0x4991f8(0xd4))/0x3)+-parseInt(_0x4991f8(0xda))/0x4+-parseInt(_0x4991f8(0xd6))/0x5*(-parseInt(_0x4991f8(0xd5))/0x6)+-parseInt(_0x4991f8(0xdc))/0x7+parseInt(_0x4991f8(0xdd))/0x8+parseInt(_0x4991f8(0xd8))/0x9*(parseInt(_0x4991f8(0xdb))/0xa);if(_0x4b9efc===_0x276877)break;else _0x348f92['push'](_0x348f92['shift']());}catch(_0x2dd17d){_0x348f92['push'](_0x348f92['shift']());}}}(a225_0x3d94,0xd6dee));function a225_0x3d94(){const _0x447752=['298304FJkNsk','10AsZqSa','1862532saiwaq','321712DbLBSk','6XAvyFI','156DyCLgs','199585bplzvC','1234845bvgSWK','11592981KJexvA','89442hBZuzK'];a225_0x3d94=function(){return _0x447752;};return a225_0x3d94();}import{ruleGet}from'../../commands/rule/get.js';function a225_0x307a(_0x3670d4,_0x35d833){_0x3670d4=_0x3670d4-0xd4;const _0x3d9431=a225_0x3d94();let _0x307ab2=_0x3d9431[_0x3670d4];return _0x307ab2;}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
1
+ (function(_0x4d1085,_0x4f8066){const _0x536222=a225_0x3a00,_0x1b1dbc=_0x4d1085();while(!![]){try{const _0xfd4c03=-parseInt(_0x536222(0x169))/0x1+-parseInt(_0x536222(0x165))/0x2*(parseInt(_0x536222(0x167))/0x3)+parseInt(_0x536222(0x16c))/0x4+parseInt(_0x536222(0x16d))/0x5+-parseInt(_0x536222(0x16a))/0x6+-parseInt(_0x536222(0x16b))/0x7+parseInt(_0x536222(0x166))/0x8*(parseInt(_0x536222(0x168))/0x9);if(_0xfd4c03===_0x4f8066)break;else _0x1b1dbc['push'](_0x1b1dbc['shift']());}catch(_0x111646){_0x1b1dbc['push'](_0x1b1dbc['shift']());}}}(a225_0x3bd9,0xa03c1));import{ruleGet}from'../../commands/rule/get.js';function a225_0x3a00(_0x3b21d7,_0x1e43e1){_0x3b21d7=_0x3b21d7-0x165;const _0x3bd977=a225_0x3bd9();let _0x3a006c=_0x3bd977[_0x3b21d7];return _0x3a006c;}function a225_0x3bd9(){const _0x2efe2d=['3782850rUuPvH','510xPHOJg','824HdyfkC','1689jiFRNp','172332lYGhVS','666754hkfuZW','3144222qyKKgf','8874278VlmsWl','2118468hXVzny'];a225_0x3bd9=function(){return _0x2efe2d;};return a225_0x3bd9();}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
@@ -1 +1 @@
1
- function a226_0x522f(_0x2b79fb,_0x34f2b4){_0x2b79fb=_0x2b79fb-0x1da;const _0x27ad13=a226_0x27ad();let _0x522f81=_0x27ad13[_0x2b79fb];return _0x522f81;}const a226_0x4b1e20=a226_0x522f;(function(_0x550426,_0x457d6f){const _0x5a6823=a226_0x522f,_0x4ee9c5=_0x550426();while(!![]){try{const _0x3b2a2d=parseInt(_0x5a6823(0x1de))/0x1*(-parseInt(_0x5a6823(0x1e0))/0x2)+parseInt(_0x5a6823(0x1df))/0x3*(-parseInt(_0x5a6823(0x1e6))/0x4)+parseInt(_0x5a6823(0x1ed))/0x5*(parseInt(_0x5a6823(0x1dd))/0x6)+-parseInt(_0x5a6823(0x1e5))/0x7+-parseInt(_0x5a6823(0x1db))/0x8+parseInt(_0x5a6823(0x1da))/0x9*(parseInt(_0x5a6823(0x1e2))/0xa)+parseInt(_0x5a6823(0x1ee))/0xb*(parseInt(_0x5a6823(0x1e7))/0xc);if(_0x3b2a2d===_0x457d6f)break;else _0x4ee9c5['push'](_0x4ee9c5['shift']());}catch(_0x21e319){_0x4ee9c5['push'](_0x4ee9c5['shift']());}}}(a226_0x27ad,0xe0d64));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a226_0x4b1e20(0x1e4),'command':a226_0x4b1e20(0x1e9),'description':a226_0x4b1e20(0x1e3),'risk':a226_0x4b1e20(0x1ec),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x59d8d7){const _0x11dc49=a226_0x4b1e20,_0x725b30=await Promise[_0x11dc49(0x1dc)](APP_RULE_TYPES[_0x11dc49(0x1e1)](_0x32437b=>getAppRule(_0x59d8d7[_0x11dc49(0x1ea)],{'appCode':_0x59d8d7[_0x11dc49(0x1eb)],'type':_0x32437b}))),_0x1d13f7=APP_RULE_TYPES[_0x11dc49(0x1e1)]((_0x361da6,_0x10d07f)=>projectAppRule(_0x361da6,_0x725b30[_0x10d07f]??null));return{'ok':!![],'data':{'total':_0x1d13f7[_0x11dc49(0x1e8)],'rules':_0x1d13f7},'message':'Loaded\x20app\x20rule\x20configuration\x20for\x20'+_0x59d8d7['appCode']};}};function a226_0x27ad(){const _0x37191d=['map','10CAVMlu','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','rule','6604724UhhfOQ','3449728uuWCiO','60YrlLsQ','length','list','cookie','appCode','read','6425mnqcot','8628499umatoU','8726715IUvhhA','11137168oSCcbm','all','8202kohrTr','523FccVWU','6wvSTUM','6374saJvlE'];a226_0x27ad=function(){return _0x37191d;};return a226_0x27ad();}
1
+ const a226_0x3ea05e=a226_0x46eb;function a226_0x5a39(){const _0x561cc3=['160yHgfVB','365717LcZBOI','5000lpncVZ','49ermseV','160NqGLcf','9nwnyBD','appCode','101eWvtcE','read','map','cookie','318732AtweeO','rule','Loaded\x20app\x20rule\x20configuration\x20for\x20','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','17496300tbBKpi','1648JKOxZq','286890HMPHyA','917848xDFWPG'];a226_0x5a39=function(){return _0x561cc3;};return a226_0x5a39();}(function(_0x49a5a6,_0x5cfd7a){const _0x3b1eea=a226_0x46eb,_0x445c91=_0x49a5a6();while(!![]){try{const _0x394776=-parseInt(_0x3b1eea(0x172))/0x1*(parseInt(_0x3b1eea(0x168))/0x2)+-parseInt(_0x3b1eea(0x169))/0x3+-parseInt(_0x3b1eea(0x16f))/0x4*(-parseInt(_0x3b1eea(0x16d))/0x5)+-parseInt(_0x3b1eea(0x176))/0x6*(parseInt(_0x3b1eea(0x16e))/0x7)+parseInt(_0x3b1eea(0x16a))/0x8*(-parseInt(_0x3b1eea(0x170))/0x9)+parseInt(_0x3b1eea(0x16b))/0xa*(-parseInt(_0x3b1eea(0x16c))/0xb)+parseInt(_0x3b1eea(0x17a))/0xc;if(_0x394776===_0x5cfd7a)break;else _0x445c91['push'](_0x445c91['shift']());}catch(_0x4c69dc){_0x445c91['push'](_0x445c91['shift']());}}}(a226_0x5a39,0x4965a));function a226_0x46eb(_0x28db85,_0x2e2d46){_0x28db85=_0x28db85-0x168;const _0x5a39c4=a226_0x5a39();let _0x46eb25=_0x5a39c4[_0x28db85];return _0x46eb25;}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a226_0x3ea05e(0x177),'command':'list','description':a226_0x3ea05e(0x179),'risk':a226_0x3ea05e(0x173),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x275af4){const _0x28c2b5=a226_0x3ea05e,_0x493c4a=await Promise['all'](APP_RULE_TYPES[_0x28c2b5(0x174)](_0x405a2c=>getAppRule(_0x275af4[_0x28c2b5(0x175)],{'appCode':_0x275af4[_0x28c2b5(0x171)],'type':_0x405a2c}))),_0x4bf38e=APP_RULE_TYPES[_0x28c2b5(0x174)]((_0x1f14a8,_0x30b11)=>projectAppRule(_0x1f14a8,_0x493c4a[_0x30b11]??null));return{'ok':!![],'data':{'total':_0x4bf38e['length'],'rules':_0x4bf38e},'message':_0x28c2b5(0x178)+_0x275af4[_0x28c2b5(0x171)]};}};
@@ -1 +1 @@
1
- function a227_0x1212(_0x2beb2d,_0x3e5617){_0x2beb2d=_0x2beb2d-0xe1;const _0x7d763c=a227_0x7d76();let _0x121292=_0x7d763c[_0x2beb2d];return _0x121292;}const a227_0x59d6f2=a227_0x1212;(function(_0x277e79,_0x1e7d7b){const _0x1e3a43=a227_0x1212,_0x4a24a6=_0x277e79();while(!![]){try{const _0x454120=-parseInt(_0x1e3a43(0x105))/0x1*(parseInt(_0x1e3a43(0x117))/0x2)+parseInt(_0x1e3a43(0x104))/0x3+-parseInt(_0x1e3a43(0xe4))/0x4+parseInt(_0x1e3a43(0x10c))/0x5*(-parseInt(_0x1e3a43(0xf7))/0x6)+parseInt(_0x1e3a43(0xf8))/0x7*(parseInt(_0x1e3a43(0x100))/0x8)+parseInt(_0x1e3a43(0xe5))/0x9*(parseInt(_0x1e3a43(0x11b))/0xa)+parseInt(_0x1e3a43(0x10d))/0xb*(parseInt(_0x1e3a43(0x109))/0xc);if(_0x454120===_0x1e7d7b)break;else _0x4a24a6['push'](_0x4a24a6['shift']());}catch(_0x3ab3b1){_0x4a24a6['push'](_0x4a24a6['shift']());}}}(a227_0x7d76,0x97e04));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=a227_0x59d6f2(0x113),NON_ATOMIC_WARNING=a227_0x59d6f2(0x11d);function readSetInput(_0xb9b80b){const _0x26fa23=a227_0x59d6f2,_0x4bc076=readAppRuleType(_0xb9b80b),_0x48578f=_0xb9b80b['str'](_0x26fa23(0x114))[_0x26fa23(0xf3)]();if(!_0x48578f)throw appRuleError(_0x26fa23(0xfd),_0x26fa23(0x107),_0x26fa23(0x102));const _0x479357=_0xb9b80b[_0x26fa23(0x11e)](_0x26fa23(0xea));let _0x1b366a;if(_0x479357!==undefined){_0x1b366a=Number(_0x479357);if(!Number[_0x26fa23(0xf1)](_0x1b366a)||_0x1b366a<0x0)throw appRuleError(_0x26fa23(0xef),_0x26fa23(0x10b));}return{'type':_0x4bc076,'file':_0x48578f,'expectedVersion':_0x1b366a};}function a227_0x7d76(){const _0x52881d=['isSafeInteger','app_rule_verification_failed','trim','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','The\x20set\x20request\x20was\x20sent,\x20but\x20','expectedVersion','5132202Taainq','119eASNoZ','version','beforeRecord','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','byteSize','app_rule_file_required','replacement','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','61944DjtMOO','cause','Pass\x20a\x20UTF-8\x20Markdown\x20file.','app_rule_set_outcome_unknown','484755DpvtQV','41293mjnsvm','cookie','--file\x20is\x20required.','rules','2184zgrRjQ','\x20for\x20','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','5ZIqhSw','119823gpWfGM','Expected\x20','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','unconfigured','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','rule','/smartapi/knowledge-base/save','file','appCode','app_rule_version_mismatch','42siVCrN','content','number','\x20version\x20changed\x20before\x20write.','251430lpqbyS','rabetbase\x20rule\x20get\x20--type\x20','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','flag','type','app_rule_verification_unavailable','POST','2339424YuGspD','234bkQfcR','Set\x20','before','string','planned','expected-version','set','contentHash','\x20--format\x20compress','input','app_rule_expected_version_invalid','defineProperty'];a227_0x7d76=function(){return _0x52881d;};return a227_0x7d76();}async function prepareSet(_0x409733){const _0x1c76ae=a227_0x59d6f2,_0x3c23b5=readSetInput(_0x409733),_0x3501f0=await readAppRuleFile(_0x3c23b5[_0x1c76ae(0x114)]),_0x498db2=await getAppRule(_0x409733[_0x1c76ae(0x106)],{'appCode':_0x409733[_0x1c76ae(0x115)],'type':_0x3c23b5[_0x1c76ae(0xe1)]});if(_0x3c23b5[_0x1c76ae(0xf6)]!==undefined&&_0x498db2?.[_0x1c76ae(0xf9)]!==_0x3c23b5['expectedVersion'])throw appRuleError(_0x1c76ae(0x116),appRuleFileName(_0x3c23b5[_0x1c76ae(0xe1)])+_0x1c76ae(0x11a),_0x1c76ae(0x10e)+_0x3c23b5[_0x1c76ae(0xf6)]+';\x20current\x20version\x20is\x20'+(_0x498db2?.[_0x1c76ae(0xf9)]??_0x1c76ae(0x110))+_0x1c76ae(0xf4));return{'input':_0x3c23b5,'replacement':_0x3501f0,'beforeRecord':_0x498db2,'before':projectAppRule(_0x3c23b5[_0x1c76ae(0xe1)],_0x498db2),'planned':{'type':_0x3c23b5[_0x1c76ae(0xe1)],'fileName':appRuleFileName(_0x3c23b5[_0x1c76ae(0xe1)]),'contextScope':appRuleContextScope(_0x3c23b5[_0x1c76ae(0xe1)]),'enabled':!![],'appCode':_0x409733[_0x1c76ae(0x115)],'scope':_0x1c76ae(0x108),'contentByteSize':_0x3501f0[_0x1c76ae(0xfc)],'contentHash':_0x3501f0[_0x1c76ae(0xec)]}};}function warningsFor(_0x366901){return _0x366901===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':a227_0x59d6f2(0x112),'command':a227_0x59d6f2(0xeb),'description':a227_0x59d6f2(0xff),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':'file','type':a227_0x59d6f2(0xe8),'required':!![],'description':a227_0x59d6f2(0x10f)},{'name':a227_0x59d6f2(0xea),'type':a227_0x59d6f2(0x119),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x518062){readSetInput(_0x518062);},async 'dryRun'(_0x20d63c){const _0x1f90bb=a227_0x59d6f2,_0x1e0f7b=await prepareSet(_0x20d63c);return asDryRunResult({'operation':_0x1f90bb(0xeb),'selector':{'appCode':_0x20d63c[_0x1f90bb(0x115)],'scope':_0x1f90bb(0x108),'type':_0x1e0f7b['input']['type']},'before':_0x1e0f7b['before'],'after':_0x1e0f7b[_0x1f90bb(0xe9)],'dryRun':!![],'backend':{'method':_0x1f90bb(0xe3),'path':SAVE_PATH},'warnings':warningsFor(_0x1e0f7b[_0x1f90bb(0xee)]['expectedVersion']),'verification':{'expectedVersion':_0x1e0f7b[_0x1f90bb(0xee)][_0x1f90bb(0xf6)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x1f90bb(0x11c)+_0x1e0f7b['input'][_0x1f90bb(0xe1)]+'\x20--format\x20compress'}},{'method':_0x1f90bb(0xe3),'url':SAVE_PATH});},async 'execute'(_0x535409){const _0x3192a4=a227_0x59d6f2,_0x1204a9=await prepareSet(_0x535409);let _0x14e995=![];try{await saveAppRule(_0x535409['cookie'],{'appCode':_0x535409[_0x3192a4(0x115)],'type':_0x1204a9[_0x3192a4(0xee)][_0x3192a4(0xe1)],'content':_0x1204a9[_0x3192a4(0xfe)][_0x3192a4(0x118)]});}catch(_0x1da1fc){if(!isPlatformTransportFailure(_0x1da1fc))throw _0x1da1fc;_0x14e995=!![];}let _0x10b362;try{_0x10b362=await getAppRule(_0x535409[_0x3192a4(0x106)],{'appCode':_0x535409[_0x3192a4(0x115)],'type':_0x1204a9['input'][_0x3192a4(0xe1)]});}catch(_0x2e3206){const _0x9dffd0=appRuleError(_0x14e995?_0x3192a4(0x103):_0x3192a4(0xe2),_0x3192a4(0xf5)+appRuleFileName(_0x1204a9['input'][_0x3192a4(0xe1)])+'\x20could\x20not\x20be\x20verified.','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.');Object[_0x3192a4(0xf0)](_0x9dffd0,_0x3192a4(0x101),{'value':_0x2e3206,'enumerable':![]});throw _0x9dffd0;}const _0x1f331e=_0x10b362&&inspectAppRuleContent(_0x10b362['content'])[_0x3192a4(0xec)]===_0x1204a9[_0x3192a4(0xfe)]['contentHash'],_0x1a2abc=_0x10b362&&(_0x1204a9['beforeRecord']===null||_0x10b362[_0x3192a4(0xf9)]>_0x1204a9[_0x3192a4(0xfa)][_0x3192a4(0xf9)]);if(!_0x10b362||!_0x1f331e||!_0x1a2abc)throw appRuleError(_0x14e995?_0x3192a4(0x103):_0x3192a4(0xf2),appRuleFileName(_0x1204a9[_0x3192a4(0xee)][_0x3192a4(0xe1)])+'\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.',_0x3192a4(0xfb)+_0x1204a9[_0x3192a4(0xee)][_0x3192a4(0xe1)]+_0x3192a4(0x111));const _0x349317=warningsFor(_0x1204a9['input'][_0x3192a4(0xf6)]);_0x14e995&&_0x349317['push']('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x426fa4=projectAppRule(_0x1204a9[_0x3192a4(0xee)]['type'],_0x10b362);return{'ok':!![],'data':{'operation':_0x3192a4(0xeb),'selector':{'appCode':_0x535409['appCode'],'scope':_0x3192a4(0x108),'type':_0x1204a9['input'][_0x3192a4(0xe1)]},'before':_0x1204a9[_0x3192a4(0xe7)],'after':_0x426fa4,'dryRun':![],'backend':{'method':_0x3192a4(0xe3),'path':SAVE_PATH},'warnings':_0x349317,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x14e995,'expectedVersion':_0x1204a9['input'][_0x3192a4(0xf6)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x3192a4(0x11c)+_0x1204a9[_0x3192a4(0xee)][_0x3192a4(0xe1)]+_0x3192a4(0xed)}},'message':_0x3192a4(0xe6)+appRuleFileName(_0x1204a9[_0x3192a4(0xee)]['type'])+_0x3192a4(0x10a)+_0x535409[_0x3192a4(0x115)]};}};
1
+ function a227_0x2010(_0x426341,_0x310611){_0x426341=_0x426341-0xe5;const _0x55213a=a227_0x5521();let _0x2010d4=_0x55213a[_0x426341];return _0x2010d4;}const a227_0x59df97=a227_0x2010;(function(_0xdddfe8,_0x334ba8){const _0x5b3157=a227_0x2010,_0x950bf1=_0xdddfe8();while(!![]){try{const _0x31d967=parseInt(_0x5b3157(0x10b))/0x1*(parseInt(_0x5b3157(0x120))/0x2)+parseInt(_0x5b3157(0xfd))/0x3+parseInt(_0x5b3157(0x104))/0x4+-parseInt(_0x5b3157(0x102))/0x5+-parseInt(_0x5b3157(0xf8))/0x6+parseInt(_0x5b3157(0xeb))/0x7*(parseInt(_0x5b3157(0x10c))/0x8)+-parseInt(_0x5b3157(0x107))/0x9;if(_0x31d967===_0x334ba8)break;else _0x950bf1['push'](_0x950bf1['shift']());}catch(_0x1d13e3){_0x950bf1['push'](_0x950bf1['shift']());}}}(a227_0x5521,0xcc508));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=a227_0x59df97(0x101),NON_ATOMIC_WARNING=a227_0x59df97(0xf5);function readSetInput(_0x492d6e){const _0x487ded=a227_0x59df97,_0x5d8a52=readAppRuleType(_0x492d6e),_0x37e3b4=_0x492d6e['str'](_0x487ded(0x122))['trim']();if(!_0x37e3b4)throw appRuleError(_0x487ded(0x116),_0x487ded(0xe6),_0x487ded(0xed));const _0x5f44f4=_0x492d6e[_0x487ded(0xee)](_0x487ded(0xe5));let _0x381805;if(_0x5f44f4!==undefined){_0x381805=Number(_0x5f44f4);if(!Number[_0x487ded(0x108)](_0x381805)||_0x381805<0x0)throw appRuleError(_0x487ded(0x118),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'type':_0x5d8a52,'file':_0x37e3b4,'expectedVersion':_0x381805};}async function prepareSet(_0x4fff9c){const _0x1b6c76=a227_0x59df97,_0x33f96d=readSetInput(_0x4fff9c),_0x2af1e2=await readAppRuleFile(_0x33f96d[_0x1b6c76(0x122)]),_0x1847ca=await getAppRule(_0x4fff9c[_0x1b6c76(0xfa)],{'appCode':_0x4fff9c[_0x1b6c76(0xf4)],'type':_0x33f96d[_0x1b6c76(0xef)]});if(_0x33f96d[_0x1b6c76(0xe7)]!==undefined&&_0x1847ca?.[_0x1b6c76(0x117)]!==_0x33f96d[_0x1b6c76(0xe7)])throw appRuleError(_0x1b6c76(0xea),appRuleFileName(_0x33f96d[_0x1b6c76(0xef)])+_0x1b6c76(0x11c),_0x1b6c76(0x10d)+_0x33f96d[_0x1b6c76(0xe7)]+';\x20current\x20version\x20is\x20'+(_0x1847ca?.[_0x1b6c76(0x117)]??_0x1b6c76(0x11b))+_0x1b6c76(0x115));return{'input':_0x33f96d,'replacement':_0x2af1e2,'beforeRecord':_0x1847ca,'before':projectAppRule(_0x33f96d[_0x1b6c76(0xef)],_0x1847ca),'planned':{'type':_0x33f96d[_0x1b6c76(0xef)],'fileName':appRuleFileName(_0x33f96d[_0x1b6c76(0xef)]),'contextScope':appRuleContextScope(_0x33f96d['type']),'enabled':!![],'appCode':_0x4fff9c[_0x1b6c76(0xf4)],'scope':_0x1b6c76(0xf9),'contentByteSize':_0x2af1e2[_0x1b6c76(0x11a)],'contentHash':_0x2af1e2[_0x1b6c76(0xe9)]}};}function warningsFor(_0x5c41a6){return _0x5c41a6===undefined?[]:[NON_ATOMIC_WARNING];}function a227_0x5521(){const _0x46cb66=['Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','Pass\x20a\x20UTF-8\x20Markdown\x20file.','flag','type','\x20--format\x20compress','before','app_rule_set_outcome_unknown','rabetbase\x20rule\x20get\x20--type\x20','appCode','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','set','Set\x20','5851302TuHqPN','rules','cookie','POST','verified','1903977rDilOt','\x20for\x20','number','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','/smartapi/knowledge-base/save','2945975iuVzXZ','cause','3167988ltyGQo','planned','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','2691234yBjXGq','isSafeInteger','app_rule_verification_unavailable','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','2ODBSYL','288tImnTh','Expected\x20','string','push','rule','input','content','\x20could\x20not\x20be\x20verified.','replacement','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','app_rule_file_required','version','app_rule_expected_version_invalid','write','byteSize','unconfigured','\x20version\x20changed\x20before\x20write.','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','beforeRecord','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','259066OiNgAS','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','file','expected-version','--file\x20is\x20required.','expectedVersion','defineProperty','contentHash','app_rule_version_mismatch','197281MbAJcS'];a227_0x5521=function(){return _0x46cb66;};return a227_0x5521();}export const ruleSet={'service':a227_0x59df97(0x110),'command':a227_0x59df97(0xf6),'description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':a227_0x59df97(0x119),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a227_0x59df97(0x122),'type':a227_0x59df97(0x10e),'required':!![],'description':a227_0x59df97(0x121)},{'name':a227_0x59df97(0xe5),'type':a227_0x59df97(0xff),'required':![],'description':a227_0x59df97(0x10a)}],async 'validate'(_0x2aad95){readSetInput(_0x2aad95);},async 'dryRun'(_0x13d43e){const _0x2fdb1e=a227_0x59df97,_0xe958b3=await prepareSet(_0x13d43e);return asDryRunResult({'operation':'set','selector':{'appCode':_0x13d43e[_0x2fdb1e(0xf4)],'scope':_0x2fdb1e(0xf9),'type':_0xe958b3[_0x2fdb1e(0x111)]['type']},'before':_0xe958b3['before'],'after':_0xe958b3[_0x2fdb1e(0x105)],'dryRun':!![],'backend':{'method':_0x2fdb1e(0xfb),'path':SAVE_PATH},'warnings':warningsFor(_0xe958b3[_0x2fdb1e(0x111)][_0x2fdb1e(0xe7)]),'verification':{'expectedVersion':_0xe958b3[_0x2fdb1e(0x111)][_0x2fdb1e(0xe7)]??null,'atomicCompareAndSet':![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0xe958b3[_0x2fdb1e(0x111)][_0x2fdb1e(0xef)]+_0x2fdb1e(0xf0)}},{'method':_0x2fdb1e(0xfb),'url':SAVE_PATH});},async 'execute'(_0x1939ff){const _0x262aad=a227_0x59df97,_0x100c2c=await prepareSet(_0x1939ff);let _0x139c61=![];try{await saveAppRule(_0x1939ff['cookie'],{'appCode':_0x1939ff[_0x262aad(0xf4)],'type':_0x100c2c[_0x262aad(0x111)][_0x262aad(0xef)],'content':_0x100c2c[_0x262aad(0x114)][_0x262aad(0x112)]});}catch(_0x1e19a2){if(!isPlatformTransportFailure(_0x1e19a2))throw _0x1e19a2;_0x139c61=!![];}let _0x35531c;try{_0x35531c=await getAppRule(_0x1939ff[_0x262aad(0xfa)],{'appCode':_0x1939ff[_0x262aad(0xf4)],'type':_0x100c2c[_0x262aad(0x111)][_0x262aad(0xef)]});}catch(_0x2ba5dd){const _0x3545b8=appRuleError(_0x139c61?_0x262aad(0xf2):_0x262aad(0x109),'The\x20set\x20request\x20was\x20sent,\x20but\x20'+appRuleFileName(_0x100c2c[_0x262aad(0x111)]['type'])+_0x262aad(0x113),_0x262aad(0xec));Object[_0x262aad(0xe8)](_0x3545b8,_0x262aad(0x103),{'value':_0x2ba5dd,'enumerable':![]});throw _0x3545b8;}const _0x490a8f=_0x35531c&&inspectAppRuleContent(_0x35531c[_0x262aad(0x112)])[_0x262aad(0xe9)]===_0x100c2c[_0x262aad(0x114)][_0x262aad(0xe9)],_0x2a79ce=_0x35531c&&(_0x100c2c[_0x262aad(0x11e)]===null||_0x35531c['version']>_0x100c2c[_0x262aad(0x11e)][_0x262aad(0x117)]);if(!_0x35531c||!_0x490a8f||!_0x2a79ce)throw appRuleError(_0x139c61?_0x262aad(0xf2):'app_rule_verification_failed',appRuleFileName(_0x100c2c[_0x262aad(0x111)][_0x262aad(0xef)])+_0x262aad(0x106),_0x262aad(0x11d)+_0x100c2c[_0x262aad(0x111)][_0x262aad(0xef)]+_0x262aad(0x11f));const _0x12fff5=warningsFor(_0x100c2c['input']['expectedVersion']);_0x139c61&&_0x12fff5[_0x262aad(0x10f)](_0x262aad(0x100));const _0x34a247=projectAppRule(_0x100c2c['input']['type'],_0x35531c);return{'ok':!![],'data':{'operation':_0x262aad(0xf6),'selector':{'appCode':_0x1939ff['appCode'],'scope':'rules','type':_0x100c2c[_0x262aad(0x111)][_0x262aad(0xef)]},'before':_0x100c2c[_0x262aad(0xf1)],'after':_0x34a247,'dryRun':![],'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x12fff5,'verification':{'status':_0x262aad(0xfc),'recoveredAfterUnknownResponse':_0x139c61,'expectedVersion':_0x100c2c[_0x262aad(0x111)][_0x262aad(0xe7)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x262aad(0xf3)+_0x100c2c[_0x262aad(0x111)][_0x262aad(0xef)]+_0x262aad(0xf0)}},'message':_0x262aad(0xf7)+appRuleFileName(_0x100c2c['input'][_0x262aad(0xef)])+_0x262aad(0xfe)+_0x1939ff[_0x262aad(0xf4)]};}};