@lovrabet/rabetbase-cli 2.3.16-beta.5 → 2.3.16-beta.6

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 (279) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/kb/create.js +1 -1
  101. package/lib/commands/kb/delete.js +1 -1
  102. package/lib/commands/kb/detail.js +1 -1
  103. package/lib/commands/kb/index.js +1 -1
  104. package/lib/commands/kb/list.js +1 -1
  105. package/lib/commands/kb/shared.js +1 -1
  106. package/lib/commands/kb/update.js +1 -1
  107. package/lib/commands/logs/index.js +1 -1
  108. package/lib/commands/menu/asset-update.js +1 -1
  109. package/lib/commands/menu/delete.js +1 -1
  110. package/lib/commands/menu/external-link-create.js +1 -1
  111. package/lib/commands/menu/external-link-update.js +1 -1
  112. package/lib/commands/menu/group-create.js +1 -1
  113. package/lib/commands/menu/group-update.js +1 -1
  114. package/lib/commands/menu/index.js +1 -1
  115. package/lib/commands/menu/list.js +1 -1
  116. package/lib/commands/menu/move.js +1 -1
  117. package/lib/commands/menu/regroup-start.js +1 -1
  118. package/lib/commands/menu/rename.js +1 -1
  119. package/lib/commands/menu/shared/compare-table.js +1 -1
  120. package/lib/commands/menu/shared/delete-plan.js +1 -1
  121. package/lib/commands/menu/shared/facts.js +1 -1
  122. package/lib/commands/menu/shared/index.js +1 -1
  123. package/lib/commands/menu/shared/inquirer.js +1 -1
  124. package/lib/commands/menu/shared/local-pages.js +1 -1
  125. package/lib/commands/menu/shared/logic.js +1 -1
  126. package/lib/commands/menu/shared/mutations.js +1 -1
  127. package/lib/commands/menu/shared/service.js +1 -1
  128. package/lib/commands/menu/shared/sync-core.js +1 -1
  129. package/lib/commands/menu/shared/update-core.js +1 -1
  130. package/lib/commands/menu/shared/valid-url.js +1 -1
  131. package/lib/commands/menu/sync.js +1 -1
  132. package/lib/commands/notification/config-list.js +1 -1
  133. package/lib/commands/notification/index.js +1 -1
  134. package/lib/commands/ocr/index.js +1 -1
  135. package/lib/commands/page/generate-start.js +1 -1
  136. package/lib/commands/page/generate-status.js +1 -1
  137. package/lib/commands/page/index.js +1 -1
  138. package/lib/commands/page/pull.js +1 -1
  139. package/lib/commands/page/push.js +1 -1
  140. package/lib/commands/page/relation-audit.js +1 -1
  141. package/lib/commands/page/restore.js +1 -1
  142. package/lib/commands/page/shared.js +1 -1
  143. package/lib/commands/page/standard-page-status.js +1 -1
  144. package/lib/commands/page/sync.js +1 -1
  145. package/lib/commands/permit/index.js +1 -1
  146. package/lib/commands/permit/page-get.js +1 -1
  147. package/lib/commands/permit/page-set.js +1 -1
  148. package/lib/commands/permit/role-apis-set.js +1 -1
  149. package/lib/commands/permit/role-menus-set.js +1 -1
  150. package/lib/commands/permit/role-menus.js +1 -1
  151. package/lib/commands/permit/shared.js +1 -1
  152. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  153. package/lib/commands/project/create/format-elapsed.js +1 -1
  154. package/lib/commands/project/create/main.js +1 -1
  155. package/lib/commands/project/create/non-interactive.js +1 -1
  156. package/lib/commands/project/create/project-template-path.js +1 -1
  157. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  158. package/lib/commands/project/create/use-format-code.js +1 -1
  159. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  160. package/lib/commands/project/index.js +1 -1
  161. package/lib/commands/project/upgrade.js +1 -1
  162. package/lib/commands/registry.js +1 -1
  163. package/lib/commands/role/create.js +1 -1
  164. package/lib/commands/role/delete.js +1 -1
  165. package/lib/commands/role/detail.js +1 -1
  166. package/lib/commands/role/index.js +1 -1
  167. package/lib/commands/role/list.js +1 -1
  168. package/lib/commands/role/shared.js +1 -1
  169. package/lib/commands/role/update.js +1 -1
  170. package/lib/commands/role/user-add.js +1 -1
  171. package/lib/commands/role/user-remove.js +1 -1
  172. package/lib/commands/role/user-resolve.js +1 -1
  173. package/lib/commands/run/index.js +1 -1
  174. package/lib/commands/schema.js +1 -1
  175. package/lib/commands/sql/create.js +1 -1
  176. package/lib/commands/sql/delete.js +1 -1
  177. package/lib/commands/sql/detail.js +1 -1
  178. package/lib/commands/sql/exec.js +1 -1
  179. package/lib/commands/sql/index.js +1 -1
  180. package/lib/commands/sql/list.js +1 -1
  181. package/lib/commands/sql/pull.js +1 -1
  182. package/lib/commands/sql/push.js +1 -1
  183. package/lib/commands/sql/shared.js +1 -1
  184. package/lib/commands/sql/status.js +1 -1
  185. package/lib/commands/sql/validate.js +1 -1
  186. package/lib/commands/task/index.js +1 -1
  187. package/lib/commands/task/status.js +1 -1
  188. package/lib/commands/tenant/index.js +1 -1
  189. package/lib/commands/tenant/members-list.js +1 -1
  190. package/lib/commands/tenant/shared.js +1 -1
  191. package/lib/commands/workspace/add.js +1 -1
  192. package/lib/commands/workspace/index.js +1 -1
  193. package/lib/commands/workspace/remove.js +1 -1
  194. package/lib/config/schema.js +1 -1
  195. package/lib/constant/cdn.js +1 -1
  196. package/lib/constant/cli.js +1 -1
  197. package/lib/constant/defaults.js +1 -1
  198. package/lib/constant/domain.js +1 -1
  199. package/lib/constant/env.js +1 -1
  200. package/lib/constant/output.js +1 -1
  201. package/lib/constant/paths.js +1 -1
  202. package/lib/constant/risk.js +1 -1
  203. package/lib/context/app-resolver.js +1 -1
  204. package/lib/context/auth-resolver.js +1 -1
  205. package/lib/context/config-loader.js +1 -1
  206. package/lib/context.d.ts +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.d.ts +4 -4
  240. package/lib/generated/build-info.js +1 -1
  241. package/lib/help.js +1 -1
  242. package/lib/runtime/confirmation.js +1 -1
  243. package/lib/runtime/event.js +1 -1
  244. package/lib/runtime/index.js +1 -1
  245. package/lib/runtime/queue.js +1 -1
  246. package/lib/runtime/resolve.js +1 -1
  247. package/lib/skills/main.js +1 -1
  248. package/lib/skills/npx-skills-add.js +1 -1
  249. package/lib/skills/skill-presence.js +1 -1
  250. package/lib/telemetry/cli-command-trace.js +1 -1
  251. package/lib/telemetry/cli-help-trace.js +1 -1
  252. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  253. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  254. package/lib/telemetry/send-cli-trace-log.js +1 -1
  255. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  256. package/lib/utils/ai_config.js +1 -1
  257. package/lib/utils/apply-jq-filter.js +1 -1
  258. package/lib/utils/cdn-config.js +1 -1
  259. package/lib/utils/check-sdk-version.js +1 -1
  260. package/lib/utils/cli-version-check.js +1 -1
  261. package/lib/utils/cli-version-policy.js +1 -1
  262. package/lib/utils/config.js +1 -1
  263. package/lib/utils/copy-directory.js +1 -1
  264. package/lib/utils/entity-with-id.js +1 -1
  265. package/lib/utils/file-utils.js +1 -1
  266. package/lib/utils/guides-cdn.js +1 -1
  267. package/lib/utils/http-client.js +1 -1
  268. package/lib/utils/is-non-interactive.js +1 -1
  269. package/lib/utils/logger.js +1 -1
  270. package/lib/utils/params.js +1 -1
  271. package/lib/utils/platform.js +1 -1
  272. package/lib/utils/rules-cdn.js +1 -1
  273. package/lib/utils/sleep.js +1 -1
  274. package/lib/utils/template-replacer.js +1 -1
  275. package/lib/utils/update-notice.js +1 -1
  276. package/lib/utils/version.js +1 -1
  277. package/lib/utils/with-active-cookie.js +1 -1
  278. package/lib/utils/write-cli-side-channel.js +1 -1
  279. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x378a3e,_0x4e86fe){const _0x4d368f=a159_0x3c35,_0x549233=_0x378a3e();while(!![]){try{const _0x3f0361=-parseInt(_0x4d368f(0x138))/0x1+-parseInt(_0x4d368f(0x13e))/0x2*(parseInt(_0x4d368f(0x13c))/0x3)+parseInt(_0x4d368f(0x13f))/0x4+-parseInt(_0x4d368f(0x135))/0x5+-parseInt(_0x4d368f(0x13d))/0x6+parseInt(_0x4d368f(0x134))/0x7+parseInt(_0x4d368f(0x140))/0x8;if(_0x3f0361===_0x4e86fe)break;else _0x549233['push'](_0x549233['shift']());}catch(_0x4556e4){_0x549233['push'](_0x549233['shift']());}}}(a159_0x7071,0xd2677));import a159_0xeaca24 from'node:path';import{execa}from'execa';function a159_0x3c35(_0x1904b2,_0x5c1497){_0x1904b2=_0x1904b2-0x134;const _0x7071e5=a159_0x7071();let _0x3c35e6=_0x7071e5[_0x1904b2];return _0x3c35e6;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4b5886){const _0x45cd5a=a159_0x3c35,_0x3773ea=Date[_0x45cd5a(0x143)](),_0x19b1c1=a159_0xeaca24[_0x45cd5a(0x136)](process['cwd'](),_0x4b5886);try{logger[_0x45cd5a(0x139)](_0x45cd5a(0x141),_0x45cd5a(0x13a),{'projectCode':_0x4b5886,'registry':_0x45cd5a(0x13b)}),await execa(resolveNpmBin('npm'),[_0x45cd5a(0x141),'--registry',_0x45cd5a(0x13b)],{'cwd':_0x19b1c1});const _0x11f171=Date[_0x45cd5a(0x143)]()-_0x3773ea;logger['success'](_0x45cd5a(0x141),_0x45cd5a(0x142),_0x11f171,{'projectCode':_0x4b5886});}catch(_0x33c27e){const _0x90a18a=Date[_0x45cd5a(0x143)]()-_0x3773ea;logger['error'](_0x45cd5a(0x141),'依赖安装失败',{'projectCode':_0x4b5886,'error':_0x33c27e instanceof Error?_0x33c27e[_0x45cd5a(0x137)]:String(_0x33c27e),'duration':_0x90a18a});throw _0x33c27e;}return formatElapsed(_0x3773ea);}function a159_0x7071(){const _0x18ce74=['resolve','message','1264852gfZEeu','info','开始安装依赖','https://registry.npmmirror.com','3evuKxP','1070142ZLlGKD','2528910epZVYp','4624796TImOfG','20987816vKXBiP','install','依赖安装完成','now','4707101WbtLze','4413200JKQxCu'];a159_0x7071=function(){return _0x18ce74;};return a159_0x7071();}
1
+ (function(_0x46d0e8,_0x49a1f5){const _0x37fd0d=a159_0xdcd4,_0x43e8cc=_0x46d0e8();while(!![]){try{const _0x42c972=parseInt(_0x37fd0d(0x162))/0x1+parseInt(_0x37fd0d(0x15b))/0x2+parseInt(_0x37fd0d(0x15c))/0x3*(parseInt(_0x37fd0d(0x159))/0x4)+-parseInt(_0x37fd0d(0x153))/0x5+parseInt(_0x37fd0d(0x15a))/0x6+parseInt(_0x37fd0d(0x152))/0x7*(parseInt(_0x37fd0d(0x15e))/0x8)+-parseInt(_0x37fd0d(0x161))/0x9*(parseInt(_0x37fd0d(0x15d))/0xa);if(_0x42c972===_0x49a1f5)break;else _0x43e8cc['push'](_0x43e8cc['shift']());}catch(_0x1af927){_0x43e8cc['push'](_0x43e8cc['shift']());}}}(a159_0x326c,0x79364));import a159_0x3377eb from'node:path';import{execa}from'execa';function a159_0xdcd4(_0xab0867,_0x5da34c){_0xab0867=_0xab0867-0x152;const _0x326c06=a159_0x326c();let _0xdcd4bc=_0x326c06[_0xab0867];return _0xdcd4bc;}function a159_0x326c(){const _0x1f5620=['490136TnVzWB','info','install','error','resolve','45052dpNdes','1351385ThzDzC','message','开始安装依赖','npm','cwd','--registry','68TNDvPK','1110588kopfNU','233002WoXSYf','150723cVWsHL','350lovcCo','1072twcsWc','依赖安装完成','now','447813hswJPc'];a159_0x326c=function(){return _0x1f5620;};return a159_0x326c();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x323a0d){const _0x408c2d=a159_0xdcd4,_0x204f9d=Date['now'](),_0x19ff30=a159_0x3377eb[_0x408c2d(0x166)](process[_0x408c2d(0x157)](),_0x323a0d);try{logger[_0x408c2d(0x163)](_0x408c2d(0x164),_0x408c2d(0x155),{'projectCode':_0x323a0d,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x408c2d(0x156)),[_0x408c2d(0x164),_0x408c2d(0x158),'https://registry.npmmirror.com'],{'cwd':_0x19ff30});const _0x45aaf6=Date[_0x408c2d(0x160)]()-_0x204f9d;logger['success'](_0x408c2d(0x164),_0x408c2d(0x15f),_0x45aaf6,{'projectCode':_0x323a0d});}catch(_0x57f7b9){const _0x2584d8=Date[_0x408c2d(0x160)]()-_0x204f9d;logger[_0x408c2d(0x165)](_0x408c2d(0x164),'依赖安装失败',{'projectCode':_0x323a0d,'error':_0x57f7b9 instanceof Error?_0x57f7b9[_0x408c2d(0x154)]:String(_0x57f7b9),'duration':_0x2584d8});throw _0x57f7b9;}return formatElapsed(_0x204f9d);}
@@ -1 +1 @@
1
- const a160_0x3030fa=a160_0x2f2f;(function(_0x1e5374,_0x20a8ef){const _0x187586=a160_0x2f2f,_0x109e94=_0x1e5374();while(!![]){try{const _0x352cac=parseInt(_0x187586(0x19e))/0x1*(parseInt(_0x187586(0x19a))/0x2)+parseInt(_0x187586(0x198))/0x3*(parseInt(_0x187586(0x1b0))/0x4)+-parseInt(_0x187586(0x1a9))/0x5+-parseInt(_0x187586(0x197))/0x6+-parseInt(_0x187586(0x1b3))/0x7*(-parseInt(_0x187586(0x1a4))/0x8)+parseInt(_0x187586(0x1a8))/0x9*(parseInt(_0x187586(0x1a0))/0xa)+parseInt(_0x187586(0x1af))/0xb*(parseInt(_0x187586(0x1ac))/0xc);if(_0x352cac===_0x20a8ef)break;else _0x109e94['push'](_0x109e94['shift']());}catch(_0x184e55){_0x109e94['push'](_0x109e94['shift']());}}}(a160_0x11c9,0x6d9ac));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a160_0x2f2f(_0x116c2a,_0x10f23d){_0x116c2a=_0x116c2a-0x195;const _0x11c9d8=a160_0x11c9();let _0x2f2fd4=_0x11c9d8[_0x116c2a];return _0x2f2fd4;}const createFlags=[{'name':a160_0x3030fa(0x1b9),'type':'string','description':a160_0x3030fa(0x1b2)},{'name':a160_0x3030fa(0x1a2),'type':a160_0x3030fa(0x1a3),'description':a160_0x3030fa(0x199)},{'name':a160_0x3030fa(0x19c),'type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a160_0x3030fa(0x1ad),'type':'boolean','description':a160_0x3030fa(0x1a7),'default':![]}];export const projectDefinitions=[{'service':'project','command':a160_0x3030fa(0x1a5),'description':'Create\x20a\x20new\x20project','risk':a160_0x3030fa(0x1b4),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a160_0x3030fa(0x1ab),'description':a160_0x3030fa(0x1b5),'required':![]}],'flags':createFlags,async 'execute'(_0x5079ed){const _0x49a604=a160_0x3030fa,{createApp:_0x38374c}=await import(_0x49a604(0x1a1)),{createProjectNonInteractive:_0x56d023}=await import(_0x49a604(0x1a6)),_0x41fb32=_0x5079ed[_0x49a604(0x1ae)](_0x49a604(0x1b9))[_0x49a604(0x19d)]()||_0x5079ed[_0x49a604(0x1b8)][0x0]?.[_0x49a604(0x19d)](),_0x2fb792=_0x5079ed['str'](_0x49a604(0x1a2))||undefined,_0x5856ae=_0x5079ed[_0x49a604(0x1ae)](_0x49a604(0x19c))||undefined;if(_0x5079ed[_0x49a604(0x195)]){if(!_0x41fb32)throw CliErrors['validation'](_0x49a604(0x196),_0x49a604(0x19f)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x56d023(_0x41fb32,_0x2fb792,_0x5856ae,_0x5079ed[_0x49a604(0x19b)]);}else await _0x38374c({'projectCode':_0x41fb32,'appCode':_0x5856ae,'env':_0x2fb792,'cookie':_0x5079ed['cookie']});return{'ok':!![]};}},{'service':a160_0x3030fa(0x1b7),'command':a160_0x3030fa(0x1aa),'description':a160_0x3030fa(0x1b1),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5d5a71){const _0xa165ff=a160_0x3030fa;return await upgradeApp(_0x5d5a71[_0xa165ff(0x195)],{'yes':_0x5d5a71[_0xa165ff(0x1b6)](_0xa165ff(0x1ad))}),{'ok':!![]};}}];function a160_0x11c9(){const _0x1e246f=['6092YIUmkh','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Project\x20name','458255UurCYR','write','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','bool','project','args','name','nonInteractive','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','2852766DMybGb','321MSaIwV','Target\x20environment','28942wETYOj','cookie','appcode','trim','1eeaeEL','Usage:\x20','1110UCfgQI','../../commands/project/create/main.js','env','string','40fbzBfl','create','../../commands/project/create/non-interactive.js','Skip\x20confirmation\x20prompt','15264yglgqG','3961600cFUtnU','upgrade','project-name','62676XYqDbs','yes','str','2156cHdvLN'];a160_0x11c9=function(){return _0x1e246f;};return a160_0x11c9();}
1
+ function a160_0x5bab(){const _0x2a0ee4=['nonInteractive','project','5628762bnSRLo','cookie','11086LOdFOa','string','str','7EnwyMo','project-name','create','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','name','validation','write','args','7125792tRmyxn','trim','appcode','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','bool','Usage:\x20','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','env','22xhWXbY','6306664riuJAr','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','../../commands/project/create/non-interactive.js','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','173427JuPkER','../../commands/project/create/main.js','7636635LuBxxC','13378491cKhBoc','yes'];a160_0x5bab=function(){return _0x2a0ee4;};return a160_0x5bab();}function a160_0x15da(_0x26ede5,_0x56702e){_0x26ede5=_0x26ede5-0x95;const _0x5babf9=a160_0x5bab();let _0x15da53=_0x5babf9[_0x26ede5];return _0x15da53;}const a160_0x46cda0=a160_0x15da;(function(_0x31889d,_0x2c7621){const _0x509adf=a160_0x15da,_0x44fe92=_0x31889d();while(!![]){try{const _0x5bbdfb=-parseInt(_0x509adf(0xa1))/0x1+parseInt(_0x509adf(0xb4))/0x2*(-parseInt(_0x509adf(0x98))/0x3)+parseInt(_0x509adf(0xac))/0x4+-parseInt(_0x509adf(0x9a))/0x5+-parseInt(_0x509adf(0x9f))/0x6*(parseInt(_0x509adf(0xa4))/0x7)+parseInt(_0x509adf(0xb5))/0x8+parseInt(_0x509adf(0x9b))/0x9;if(_0x5bbdfb===_0x2c7621)break;else _0x44fe92['push'](_0x44fe92['shift']());}catch(_0x37c9cf){_0x44fe92['push'](_0x44fe92['shift']());}}}(a160_0x5bab,0xe66e1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':'name','type':a160_0x46cda0(0xa2),'description':'Project\x20name'},{'name':a160_0x46cda0(0xb3),'type':a160_0x46cda0(0xa2),'description':'Target\x20environment'},{'name':a160_0x46cda0(0xae),'type':a160_0x46cda0(0xa2),'description':a160_0x46cda0(0xb2)}],upgradeFlags=[{'name':a160_0x46cda0(0x9c),'type':'boolean','description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a160_0x46cda0(0x9e),'command':a160_0x46cda0(0xa6),'description':'Create\x20a\x20new\x20project','risk':a160_0x46cda0(0xaa),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a160_0x46cda0(0xa5),'description':a160_0x46cda0(0xa7),'required':![]}],'flags':createFlags,async 'execute'(_0x3b5c4){const _0x2c3727=a160_0x46cda0,{createApp:_0x5038f6}=await import(_0x2c3727(0x99)),{createProjectNonInteractive:_0xa105c1}=await import(_0x2c3727(0x96)),_0x229da2=_0x3b5c4[_0x2c3727(0xa3)](_0x2c3727(0xa8))[_0x2c3727(0xad)]()||_0x3b5c4[_0x2c3727(0xab)][0x0]?.[_0x2c3727(0xad)](),_0x52c236=_0x3b5c4[_0x2c3727(0xa3)](_0x2c3727(0xb3))||undefined,_0x2dec75=_0x3b5c4[_0x2c3727(0xa3)]('appcode')||undefined;if(_0x3b5c4[_0x2c3727(0x9d)]){if(!_0x229da2)throw CliErrors[_0x2c3727(0xa9)](_0x2c3727(0xaf),_0x2c3727(0xb1)+CLI_BIN_NAME+_0x2c3727(0x95));await _0xa105c1(_0x229da2,_0x52c236,_0x2dec75,_0x3b5c4[_0x2c3727(0xa0)]);}else await _0x5038f6({'projectCode':_0x229da2,'appCode':_0x2dec75,'env':_0x52c236,'cookie':_0x3b5c4[_0x2c3727(0xa0)]});return{'ok':!![]};}},{'service':'project','command':'upgrade','description':a160_0x46cda0(0x97),'risk':a160_0x46cda0(0xaa),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x395c54){const _0x9eca9b=a160_0x46cda0;return await upgradeApp(_0x395c54['nonInteractive'],{'yes':_0x395c54[_0x9eca9b(0xb0)]('yes')}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a161_0x5e2746=a161_0x24d0;(function(_0x19955a,_0x39f4bc){const _0x4626=a161_0x24d0,_0x381231=_0x19955a();while(!![]){try{const _0x18ceb1=-parseInt(_0x4626(0x19f))/0x1+-parseInt(_0x4626(0x17f))/0x2+-parseInt(_0x4626(0x1f4))/0x3*(parseInt(_0x4626(0x1dc))/0x4)+parseInt(_0x4626(0x192))/0x5+-parseInt(_0x4626(0x1eb))/0x6+-parseInt(_0x4626(0x18b))/0x7+parseInt(_0x4626(0x1c3))/0x8;if(_0x18ceb1===_0x39f4bc)break;else _0x381231['push'](_0x381231['shift']());}catch(_0x4105ef){_0x381231['push'](_0x381231['shift']());}}}(a161_0x5216,0x58892));import a161_0x5d44b4 from'chalk';function a161_0x5216(){const _0x12de62=['white','.cursor/rules/lovrabet_rules.mdc','yes','\x20\x20Action:\x20delete','\x20→\x20latest','Install\x20new\x20skill','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','not\x20found\x20(will\x20create)','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','[\x22@lovrabet/sdk\x22]:\x20','fail','\x20removed','Step\x201/7:\x20Config\x20migration\x20—\x20','\x20removed\x20(','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Skill\x20swap:','push','length','object','\x20\x20bun\x20install','\x20\x20Fields\x20to\x20migrate:\x20','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Clean\x20MCP\x20config','log','\x20\x20npm\x20install','includes','\x20\x20Current\x20version\x20in\x20','16998304ArHjDc','oldPath','keys','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','FOUND','detail','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','oldMcpConfig','error','done','green','exit\x20','.bak','gray','Legacy\x20artifacts:','\x20→\x20keys:\x20','no\x20legacy\x20entry','Upgrade\x20completed\x20successfully!','label','inherit','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20(backup:\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','none\x20found','utf8','8Pauihd','skipped\x20(no\x20legacy\x20config)','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','@lovrabet/sdk:','Config\x20file:','Step\x206/7:\x20Installing\x20new\x20skill...','no\x20legacy\x20config\x20found','hasNewConfig','bold','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','path','start','Step\x201/7:\x20Migrating\x20config...','\x20\x20New\x20config\x20(.rabetbase.json):\x20','skipped','2249148fIjryF','Upgrade\x20cancelled.','red','isDirectory','yellow','Remove\x20.lovrabet/','values','MCP\x20config:','mcpServers','763629FwtoDb','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','.cursor/mcp.json','step','===\x20Upgrade\x20Analysis\x20===','configMigration','failed','info','not\x20found\x20or\x20already\x20at\x20latest','isArray','cyan','sdkUpgrade','1309028JRoHWn','needsSkillSwap','@lovrabet/sdk','parse','.lovrabet','undefined','@lovrabet/dataset-mcp-server','Proceed\x20with\x20upgrade?','\x20\x20\x20\x20\x20\x20\x20','args','lovrabet/lovrabet-skill\x20removed','Remove\x20old\x20skill','5008542dSgfRn','message','join','Config\x20migration','===\x20Upgrade\x20Summary\x20===','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','entries','2555550VNOoFK','Upgrade\x20@lovrabet/sdk','\x20from\x20','\x20\x20#\x20or','oldArtifacts','some','Remove\x20legacy\x20artifacts','FAIL','latest','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','dependencies','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x204/7:\x20Cleaning\x20MCP\x20config...','19292NxRicV','succeed','\x20→\x20','lovrabet/rabetbase','needed','already\x20exists\x20(will\x20merge)','filter','string','not\x20needed'];a161_0x5216=function(){return _0x12de62;};return a161_0x5216();}import a161_0x37604d from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';function a161_0x24d0(_0x1e2c4e,_0x8b6c27){_0x1e2c4e=_0x1e2c4e-0x17b;const _0x521612=a161_0x5216();let _0x24d0cc=_0x521612[_0x1e2c4e];return _0x24d0cc;}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a161_0x5e2746(0x1a5)](_0x5db05c=>_0x5db05c!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0xce1e51){const _0x5a1bf5=a161_0x5e2746,_0x498d53=[];for(const _0x29c9a1 of Object[_0x5a1bf5(0x1f1)](CORE_IDE_CONFIGS)){if(_0x29c9a1['files'])for(const _0x5d2962 of _0x29c9a1['files']){_0x498d53[_0x5a1bf5(0x1b8)](resolve(_0xce1e51,_0x5d2962['path']));}}return _0x498d53;}function analyse(_0x367247){const _0x2ab20b=a161_0x5e2746;let _0x5d9b01=null;const _0x17eebf=resolve(_0x367247,NEW_CONFIG_NAME),_0x332641=existsSync(_0x17eebf);for(const _0x36d6c8 of LEGACY_CONFIG_NAMES){const _0x20b1ff=resolve(_0x367247,_0x36d6c8);if(existsSync(_0x20b1ff)){const _0x3098c9=readConfigFile(_0x20b1ff),_0x587ef6=Object[_0x2ab20b(0x1c5)](_0x3098c9)[_0x2ab20b(0x1a5)](_0x4061df=>typeof _0x3098c9[_0x4061df]!==_0x2ab20b(0x184));_0x5d9b01={'oldPath':_0x20b1ff,'hasNewConfig':_0x332641,'fields':_0x587ef6};break;}}const _0x354c61=[],_0x2545a7=resolve(_0x367247,_0x2ab20b(0x183));if(existsSync(_0x2545a7))_0x354c61[_0x2ab20b(0x1b8)](_0x2545a7);const _0x4d9202=resolve(_0x367247,_0x2ab20b(0x1a9));if(existsSync(_0x4d9202))_0x354c61[_0x2ab20b(0x1b8)](_0x4d9202);const _0x832cfd=resolve(_0x367247,'.claude/skills/lovrabet');if(existsSync(_0x832cfd))_0x354c61[_0x2ab20b(0x1b8)](_0x832cfd);for(const _0x54e9b1 of collectIdeSkillFiles(_0x367247)){if(existsSync(_0x54e9b1))_0x354c61[_0x2ab20b(0x1b8)](_0x54e9b1);}let _0x4c9993=null;const _0x2d9378=resolve(_0x367247,_0x2ab20b(0x1f6));if(existsSync(_0x2d9378))try{const _0x584164=JSON[_0x2ab20b(0x182)](readFileSync(_0x2d9378,'utf8'));if(_0x584164?.[_0x2ab20b(0x1f3)]&&typeof _0x584164[_0x2ab20b(0x1f3)]===_0x2ab20b(0x1ba)){const _0x14ed79=[];for(const [_0x5983b0,_0xcc698e]of Object[_0x2ab20b(0x191)](_0x584164[_0x2ab20b(0x1f3)])){const _0x4e3dd2=_0xcc698e;_0x4e3dd2?.['args']&&Array[_0x2ab20b(0x17c)](_0x4e3dd2[_0x2ab20b(0x188)])&&_0x4e3dd2[_0x2ab20b(0x188)]['some'](_0x33ed62=>typeof _0x33ed62==='string'&&_0x33ed62[_0x2ab20b(0x1c1)](_0x2ab20b(0x185)))&&_0x14ed79['push'](_0x5983b0);}_0x14ed79[_0x2ab20b(0x1b9)]>0x0&&(_0x4c9993={'path':_0x2d9378,'keys':_0x14ed79});}}catch{}const _0x45f32b=_0x354c61[_0x2ab20b(0x1b9)]>0x0||_0x5d9b01!==null;let _0x7cdc77=null;const _0x55ee6d=resolve(_0x367247,'package.json');if(existsSync(_0x55ee6d))try{const _0x45d64f=JSON[_0x2ab20b(0x182)](readFileSync(_0x55ee6d,'utf8'));for(const _0x1cb3ee of[_0x2ab20b(0x19c),'devDependencies']){const _0x2a8c43=_0x45d64f?.[_0x1cb3ee]?.[_0x2ab20b(0x181)];if(typeof _0x2a8c43===_0x2ab20b(0x1a6)){_0x2a8c43!==_0x2ab20b(0x19a)&&(_0x7cdc77={'pkgPath':_0x55ee6d,'currentVersion':_0x2a8c43,'field':_0x1cb3ee});break;}}}catch{}return{'configMigration':_0x5d9b01,'oldArtifacts':_0x354c61,'oldMcpConfig':_0x4c9993,'needsSkillSwap':_0x45f32b,'sdkUpgrade':_0x7cdc77};}function printReport(_0x3fdc85){const _0x7d98ad=a161_0x5e2746,{configMigration:_0x19a294,oldArtifacts:_0x37f799,oldMcpConfig:_0x37dda7,needsSkillSwap:_0x309740}=_0x3fdc85;console[_0x7d98ad(0x1bf)](''),console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x1e4)](_0x7d98ad(0x1f8))),console[_0x7d98ad(0x1bf)]('');_0x19a294?(console['log'](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1e0))+('\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1ef)](_0x19a294[_0x7d98ad(0x1c4)]))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1e9)+(_0x19a294[_0x7d98ad(0x1e3)]?a161_0x5d44b4[_0x7d98ad(0x1cd)](_0x7d98ad(0x1a4)):a161_0x5d44b4['gray'](_0x7d98ad(0x1af)))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1bc)+_0x19a294['fields'][_0x7d98ad(0x18d)](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)]('Config\x20file:')+'\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1d0)](_0x7d98ad(0x1e2)));console[_0x7d98ad(0x1bf)]('');if(_0x37f799['length']>0x0){console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1d1)));for(const _0x124bdc of _0x37f799){console[_0x7d98ad(0x1bf)]('\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1ed)](_0x7d98ad(0x1c7))+'\x20\x20'+_0x124bdc);}console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1ab));}else console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1d1))+'\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1d0)](_0x7d98ad(0x1da)));console[_0x7d98ad(0x1bf)]('');_0x37dda7?(console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1f2))+('\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1ef)](_0x37dda7[_0x7d98ad(0x1e6)])+_0x7d98ad(0x1d2)+_0x37dda7['keys'][_0x7d98ad(0x18d)](',\x20'))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x19d))):console[_0x7d98ad(0x1bf)](a161_0x5d44b4['cyan'](_0x7d98ad(0x1f2))+'\x20\x20'+a161_0x5d44b4[_0x7d98ad(0x1d0)](_0x7d98ad(0x1d3)));console['log'](''),console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1b7))+('\x20\x20'+(_0x309740?a161_0x5d44b4['yellow'](_0x7d98ad(0x1a3)):a161_0x5d44b4['green'](_0x7d98ad(0x1a7)))));_0x309740&&console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1b6)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x7d98ad(0x1bf)]('');if(_0x3fdc85[_0x7d98ad(0x17e)]){const {currentVersion:_0x4f61c3,field:_0x42cbfe,pkgPath:_0x141674}=_0x3fdc85[_0x7d98ad(0x17e)];console[_0x7d98ad(0x1bf)](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1df))+('\x20\x20'+a161_0x5d44b4['yellow'](_0x141674))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1c2)+_0x42cbfe+':\x20'+a161_0x5d44b4[_0x7d98ad(0x1ef)](_0x4f61c3)+_0x7d98ad(0x1a1)+a161_0x5d44b4[_0x7d98ad(0x1cd)](_0x7d98ad(0x19a))),console[_0x7d98ad(0x1bf)](_0x7d98ad(0x1d7));}else console['log'](a161_0x5d44b4[_0x7d98ad(0x17d)](_0x7d98ad(0x1df))+'\x20\x20'+a161_0x5d44b4['gray'](_0x7d98ad(0x17b)));console[_0x7d98ad(0x1bf)]('');}function execConfigMigration(_0x7f00a6,_0x332bbe){const _0x1d8feb=a161_0x5e2746,{configMigration:_0x5cfd24}=_0x7f00a6;if(!_0x5cfd24?.['oldPath'])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x1d8feb(0x1dd)};const _0x47d35e=readConfigFile(_0x5cfd24[_0x1d8feb(0x1c4)]),_0x30c171=resolve(_0x332bbe,NEW_CONFIG_NAME),_0x671295=_0x5cfd24[_0x1d8feb(0x1e3)]?readConfigFile(_0x30c171):{};for(const [_0x1ef765,_0x555167]of Object[_0x1d8feb(0x191)](_0x47d35e)){!(_0x1ef765 in _0x671295)&&(_0x671295[_0x1ef765]=_0x555167);}writeConfigFile(_0x30c171,_0x671295);const _0x2e2cfb=_0x5cfd24[_0x1d8feb(0x1c4)]+_0x1d8feb(0x1cf);return renameSync(_0x5cfd24['oldPath'],_0x2e2cfb),{'step':0x1,'label':_0x1d8feb(0x18e),'ok':!![],'detail':_0x5cfd24[_0x1d8feb(0x1c4)]+_0x1d8feb(0x1a1)+_0x30c171+_0x1d8feb(0x1d8)+_0x2e2cfb+')'};}function execRemoveOldArtifacts(_0xdf9d6b){const _0x1db979=a161_0x5e2746,_0x2a16fb=[];for(const _0x4add9a of _0xdf9d6b){try{if(!existsSync(_0x4add9a))continue;const _0x46c9ee=tryStat(_0x4add9a);_0x46c9ee?.[_0x1db979(0x1ee)]()?rmSync(_0x4add9a,{'recursive':!![],'force':!![]}):unlinkSync(_0x4add9a);}catch(_0x5c77f1){_0x2a16fb['push'](_0x4add9a+':\x20'+_0x5c77f1[_0x1db979(0x18c)]);}}return{'step':0x3,'label':_0x1db979(0x198),'ok':_0x2a16fb[_0x1db979(0x1b9)]===0x0,'detail':_0x2a16fb[_0x1db979(0x1b9)]>0x0?_0xdf9d6b[_0x1db979(0x1b9)]-_0x2a16fb[_0x1db979(0x1b9)]+'/'+_0xdf9d6b[_0x1db979(0x1b9)]+_0x1db979(0x1b5)+_0x2a16fb[_0x1db979(0x18d)](';\x20')+')':_0xdf9d6b[_0x1db979(0x1b9)]+_0x1db979(0x1b3)};}function execCleanMcp(_0x1e78a3){const _0x2d8f5f=a161_0x5e2746;if(!_0x1e78a3[_0x2d8f5f(0x1ca)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x2d8f5f(0x1ea)};try{const _0x10d37e=readFileSync(_0x1e78a3[_0x2d8f5f(0x1ca)][_0x2d8f5f(0x1e6)],_0x2d8f5f(0x1db)),_0x4fb701=JSON['parse'](_0x10d37e);if(_0x4fb701?.[_0x2d8f5f(0x1f3)]&&typeof _0x4fb701[_0x2d8f5f(0x1f3)]===_0x2d8f5f(0x1ba)){const _0x175fee=[];for(const [_0x1cdfb2,_0x187357]of Object[_0x2d8f5f(0x191)](_0x4fb701[_0x2d8f5f(0x1f3)])){_0x187357?.[_0x2d8f5f(0x188)]&&Array['isArray'](_0x187357[_0x2d8f5f(0x188)])&&_0x187357['args'][_0x2d8f5f(0x197)](_0x16b10a=>typeof _0x16b10a===_0x2d8f5f(0x1a6)&&_0x16b10a[_0x2d8f5f(0x1c1)](_0x2d8f5f(0x185)))&&_0x175fee[_0x2d8f5f(0x1b8)](_0x1cdfb2);}for(const _0x3f4b38 of _0x175fee){delete _0x4fb701[_0x2d8f5f(0x1f3)][_0x3f4b38];}return _0x175fee[_0x2d8f5f(0x1b9)]>0x0&&writeFileSync(_0x1e78a3[_0x2d8f5f(0x1ca)][_0x2d8f5f(0x1e6)],JSON['stringify'](_0x4fb701,null,0x2)+'\x0a',_0x2d8f5f(0x1db)),{'step':0x4,'label':_0x2d8f5f(0x1be),'ok':!![],'detail':'removed\x20'+_0x175fee[_0x2d8f5f(0x18d)](',\x20')+_0x2d8f5f(0x194)+_0x1e78a3['oldMcpConfig'][_0x2d8f5f(0x1e6)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x50c61a){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x50c61a[_0x2d8f5f(0x18c)]};}}function execSkillsRemove(_0x2855d9,_0x380d88){const _0x1a552d=a161_0x5e2746,_0x300b47=runNpxSkillsRemove(_0x2855d9,{'stdio':'inherit','yes':_0x380d88});return{'step':0x5,'label':_0x1a552d(0x18a),'ok':_0x300b47['ok'],'detail':_0x300b47['ok']?_0x1a552d(0x189):_0x300b47[_0x1a552d(0x1cb)]??_0x1a552d(0x1ce)+_0x300b47['status']};}function execSkillsAdd(_0x21e9fb,_0x1d1fb5){const _0x2951ba=a161_0x5e2746,_0x77fd27=runNpxSkillsAddGlobal(_0x21e9fb,_0x2951ba(0x1a2),{'stdio':_0x2951ba(0x1d6),'yes':_0x1d1fb5});return{'step':0x6,'label':_0x2951ba(0x1ad),'ok':_0x77fd27['ok'],'detail':_0x77fd27['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x77fd27[_0x2951ba(0x1cb)]??_0x2951ba(0x1ce)+_0x77fd27['status']};}function execUpgradeSdk(_0x3f9f8f){const _0x20080a=a161_0x5e2746;if(!_0x3f9f8f[_0x20080a(0x17e)])return{'step':0x7,'label':_0x20080a(0x193),'ok':!![],'detail':_0x20080a(0x1d9)};const {pkgPath:_0x48b32c,currentVersion:_0x30d151,field:_0x4f936d}=_0x3f9f8f['sdkUpgrade'];try{const _0x100c37=readFileSync(_0x48b32c,_0x20080a(0x1db)),_0x362b82=JSON[_0x20080a(0x182)](_0x100c37);return _0x362b82[_0x4f936d]['@lovrabet/sdk']='latest',writeFileSync(_0x48b32c,JSON['stringify'](_0x362b82,null,0x2)+'\x0a',_0x20080a(0x1db)),{'step':0x7,'label':_0x20080a(0x193),'ok':!![],'detail':_0x4f936d+_0x20080a(0x1b1)+_0x30d151+_0x20080a(0x1ac)};}catch(_0x7be355){return{'step':0x7,'label':_0x20080a(0x193),'ok':![],'detail':_0x7be355['message']};}}function tryStat(_0x4452be){try{return statSync(_0x4452be);}catch{return undefined;}}function printSummary(_0x351859){const _0x2f9405=a161_0x5e2746;console[_0x2f9405(0x1bf)](''),console[_0x2f9405(0x1bf)](a161_0x5d44b4[_0x2f9405(0x1e4)](_0x2f9405(0x18f))),console[_0x2f9405(0x1bf)]('');for(const _0xd4debe of _0x351859){const _0x7c1b6e=_0xd4debe['ok']?a161_0x5d44b4[_0x2f9405(0x1cd)]('OK'):a161_0x5d44b4[_0x2f9405(0x1ed)](_0x2f9405(0x199));console[_0x2f9405(0x1bf)]('\x20\x20'+_0x7c1b6e+'\x20\x20Step\x20'+_0xd4debe[_0x2f9405(0x1f7)]+':\x20'+_0xd4debe[_0x2f9405(0x1d5)]);if(_0xd4debe['detail'])console[_0x2f9405(0x1bf)](_0x2f9405(0x187)+a161_0x5d44b4[_0x2f9405(0x1d0)](_0xd4debe['detail']));}console[_0x2f9405(0x1bf)]('');}export async function upgradeApp(_0x1f1f16,_0x882959){const _0xda1423=a161_0x5e2746,_0x1091bf=process['cwd'](),_0x3161d0=analyse(_0x1091bf),_0x2276b6=!_0x3161d0[_0xda1423(0x1f9)]&&_0x3161d0[_0xda1423(0x196)][_0xda1423(0x1b9)]===0x0&&!_0x3161d0[_0xda1423(0x1ca)]&&!_0x3161d0[_0xda1423(0x180)]&&!_0x3161d0[_0xda1423(0x17e)];if(_0x2276b6){console[_0xda1423(0x1bf)](a161_0x5d44b4[_0xda1423(0x1cd)](_0xda1423(0x1de)));return;}printReport(_0x3161d0);const _0x44fada=!!(_0x882959[_0xda1423(0x1aa)]||_0x882959['Y']||_0x1f1f16);if(!_0x44fada)try{const _0x3e44e5=await askConfirm(_0xda1423(0x186));if(!_0x3e44e5){console['log'](a161_0x5d44b4[_0xda1423(0x1d0)](_0xda1423(0x1ec)));return;}}catch(_0x3a2359){if(_0x3a2359?.[_0xda1423(0x18c)]==='CANCEL'){console[_0xda1423(0x1bf)](a161_0x5d44b4[_0xda1423(0x1d0)](_0xda1423(0x1ec)));return;}throw _0x3a2359;}const _0x58c857=[],_0x573a66=a161_0x37604d({'text':_0xda1423(0x1e8),'color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x3c5297=execConfigMigration(_0x3161d0,_0x1091bf);_0x58c857[_0xda1423(0x1b8)](_0x3c5297),_0x573a66[_0x3c5297['ok']?_0xda1423(0x1a0):_0xda1423(0x1b2)](_0xda1423(0x1b4)+(_0x3c5297[_0xda1423(0x1c8)]??(_0x3c5297['ok']?_0xda1423(0x1cc):'failed')));const _0x4df075=resolve(_0x1091bf,'.lovrabet'),_0x293877=a161_0x37604d({'text':_0xda1423(0x1b0),'color':'cyan'})[_0xda1423(0x1e7)]();if(existsSync(_0x4df075))try{rmSync(_0x4df075,{'recursive':!![],'force':!![]}),_0x293877[_0xda1423(0x1a0)](_0xda1423(0x19b)),_0x58c857[_0xda1423(0x1b8)]({'step':0x2,'label':_0xda1423(0x1f0),'ok':!![]});}catch(_0x2dc6c3){_0x293877[_0xda1423(0x1b2)](_0xda1423(0x1ae)+_0x2dc6c3[_0xda1423(0x18c)]),_0x58c857[_0xda1423(0x1b8)]({'step':0x2,'label':_0xda1423(0x1f0),'ok':![],'detail':_0x2dc6c3[_0xda1423(0x18c)]});}else _0x293877[_0xda1423(0x1fb)](_0xda1423(0x1c6)),_0x58c857['push']({'step':0x2,'label':_0xda1423(0x1f0),'ok':!![],'detail':'skipped'});const _0x170576=a161_0x37604d({'text':_0xda1423(0x1e5),'color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x304594=execRemoveOldArtifacts(_0x3161d0[_0xda1423(0x196)]);_0x58c857['push'](_0x304594),_0x170576[_0x304594['ok']?_0xda1423(0x1a0):_0xda1423(0x1b2)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x304594[_0xda1423(0x1c8)]??(_0x304594['ok']?_0xda1423(0x1cc):'failed')));const _0x309d5e=a161_0x37604d({'text':_0xda1423(0x19e),'color':'cyan'})['start'](),_0x29f61e=execCleanMcp(_0x3161d0);_0x58c857[_0xda1423(0x1b8)](_0x29f61e),_0x309d5e[_0x29f61e['ok']?_0xda1423(0x1a0):_0xda1423(0x1b2)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x29f61e[_0xda1423(0x1c8)]??(_0x29f61e['ok']?_0xda1423(0x1cc):'failed')));const _0x20eeab=a161_0x37604d({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x2ad0a4=execSkillsRemove(_0x1091bf,_0x44fada);_0x58c857['push'](_0x2ad0a4),_0x20eeab[_0x2ad0a4['ok']?_0xda1423(0x1a0):_0xda1423(0x1b2)](_0xda1423(0x1f5)+(_0x2ad0a4[_0xda1423(0x1c8)]??(_0x2ad0a4['ok']?_0xda1423(0x1cc):_0xda1423(0x1fa))));const _0x214160=a161_0x37604d({'text':_0xda1423(0x1e1),'color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x182cb0=execSkillsAdd(_0x1091bf,_0x44fada);_0x58c857[_0xda1423(0x1b8)](_0x182cb0),_0x214160[_0x182cb0['ok']?'succeed':_0xda1423(0x1b2)](_0xda1423(0x1c9)+(_0x182cb0['detail']??(_0x182cb0['ok']?_0xda1423(0x1cc):'failed')));const _0x6971c0=a161_0x37604d({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0xda1423(0x17d)})[_0xda1423(0x1e7)](),_0x185e10=execUpgradeSdk(_0x3161d0);_0x58c857[_0xda1423(0x1b8)](_0x185e10),_0x6971c0[_0x185e10['ok']?'succeed':'fail'](_0xda1423(0x190)+(_0x185e10[_0xda1423(0x1c8)]??(_0x185e10['ok']?_0xda1423(0x1cc):'failed'))),printSummary(_0x58c857);const _0x305375=_0x58c857[_0xda1423(0x197)](_0x4fba2b=>!_0x4fba2b['ok']);_0x305375?console[_0xda1423(0x1bf)](a161_0x5d44b4['yellow']('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0xda1423(0x1bf)](a161_0x5d44b4['green'](_0xda1423(0x1d4))),_0x185e10['ok']&&_0x3161d0[_0xda1423(0x17e)]&&(console[_0xda1423(0x1bf)](''),console[_0xda1423(0x1bf)](a161_0x5d44b4[_0xda1423(0x1e4)][_0xda1423(0x17d)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0xda1423(0x1bf)](a161_0x5d44b4[_0xda1423(0x17d)](_0xda1423(0x1bd))),console[_0xda1423(0x1bf)](''),console[_0xda1423(0x1bf)](a161_0x5d44b4['white'](_0xda1423(0x1c0))),console['log'](a161_0x5d44b4[_0xda1423(0x1a8)](_0xda1423(0x195))),console[_0xda1423(0x1bf)](a161_0x5d44b4['white'](_0xda1423(0x1bb))),console[_0xda1423(0x1bf)](''));}
1
+ (function(_0x177d03,_0x267507){const _0x3041be=a161_0x5081,_0xdecd8=_0x177d03();while(!![]){try{const _0x48df19=parseInt(_0x3041be(0xa1))/0x1*(parseInt(_0x3041be(0xe8))/0x2)+-parseInt(_0x3041be(0xc2))/0x3+parseInt(_0x3041be(0xf8))/0x4+-parseInt(_0x3041be(0x105))/0x5+parseInt(_0x3041be(0xae))/0x6*(-parseInt(_0x3041be(0x10b))/0x7)+parseInt(_0x3041be(0xcb))/0x8+parseInt(_0x3041be(0xc3))/0x9;if(_0x48df19===_0x267507)break;else _0xdecd8['push'](_0xdecd8['shift']());}catch(_0xa6201e){_0xdecd8['push'](_0xdecd8['shift']());}}}(a161_0xcd73,0xd3691));import a161_0xedf86f from'chalk';import a161_0x35b839 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';function a161_0x5081(_0x1e485b,_0x2cf2b7){_0x1e485b=_0x1e485b-0x90;const _0xcd73d3=a161_0xcd73();let _0x5081ff=_0xcd73d3[_0x1e485b];return _0x5081ff;}const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0xf82426=>_0xf82426!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x10d5d8){const _0x59b3e5=a161_0x5081,_0x2128c9=[];for(const _0x587ce3 of Object[_0x59b3e5(0xe9)](CORE_IDE_CONFIGS)){if(_0x587ce3[_0x59b3e5(0xda)])for(const _0x3caf4b of _0x587ce3[_0x59b3e5(0xda)]){_0x2128c9['push'](resolve(_0x10d5d8,_0x3caf4b['path']));}}return _0x2128c9;}function analyse(_0x1e4240){const _0x2e9289=a161_0x5081;let _0x3046d6=null;const _0x721d4a=resolve(_0x1e4240,NEW_CONFIG_NAME),_0x327175=existsSync(_0x721d4a);for(const _0x3e0323 of LEGACY_CONFIG_NAMES){const _0x39a9f2=resolve(_0x1e4240,_0x3e0323);if(existsSync(_0x39a9f2)){const _0x4bb279=readConfigFile(_0x39a9f2),_0x4d8028=Object[_0x2e9289(0x104)](_0x4bb279)[_0x2e9289(0xa2)](_0x19e264=>typeof _0x4bb279[_0x19e264]!==_0x2e9289(0x99));_0x3046d6={'oldPath':_0x39a9f2,'hasNewConfig':_0x327175,'fields':_0x4d8028};break;}}const _0x2e8be4=[],_0x2c1556=resolve(_0x1e4240,_0x2e9289(0x9f));if(existsSync(_0x2c1556))_0x2e8be4[_0x2e9289(0xe4)](_0x2c1556);const _0x53bdfe=resolve(_0x1e4240,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x53bdfe))_0x2e8be4[_0x2e9289(0xe4)](_0x53bdfe);const _0xc41ccd=resolve(_0x1e4240,_0x2e9289(0xa0));if(existsSync(_0xc41ccd))_0x2e8be4['push'](_0xc41ccd);for(const _0x195010 of collectIdeSkillFiles(_0x1e4240)){if(existsSync(_0x195010))_0x2e8be4['push'](_0x195010);}let _0x10fbb5=null;const _0x5f42df=resolve(_0x1e4240,_0x2e9289(0xd5));if(existsSync(_0x5f42df))try{const _0x11e83b=JSON['parse'](readFileSync(_0x5f42df,_0x2e9289(0xab)));if(_0x11e83b?.[_0x2e9289(0xfd)]&&typeof _0x11e83b[_0x2e9289(0xfd)]===_0x2e9289(0xc0)){const _0x5284a7=[];for(const [_0x3286b7,_0x4af255]of Object[_0x2e9289(0x10f)](_0x11e83b['mcpServers'])){const _0x3a099e=_0x4af255;_0x3a099e?.[_0x2e9289(0xd7)]&&Array[_0x2e9289(0xc9)](_0x3a099e[_0x2e9289(0xd7)])&&_0x3a099e[_0x2e9289(0xd7)]['some'](_0x39922f=>typeof _0x39922f===_0x2e9289(0xb8)&&_0x39922f[_0x2e9289(0xb3)](_0x2e9289(0x92)))&&_0x5284a7[_0x2e9289(0xe4)](_0x3286b7);}_0x5284a7[_0x2e9289(0xd2)]>0x0&&(_0x10fbb5={'path':_0x5f42df,'keys':_0x5284a7});}}catch{}const _0x1e7d10=_0x2e8be4[_0x2e9289(0xd2)]>0x0||_0x3046d6!==null;let _0x448038=null;const _0x3dd46a=resolve(_0x1e4240,_0x2e9289(0xcd));if(existsSync(_0x3dd46a))try{const _0x1707f0=JSON[_0x2e9289(0xde)](readFileSync(_0x3dd46a,_0x2e9289(0xab)));for(const _0x58b602 of[_0x2e9289(0xbd),_0x2e9289(0xeb)]){const _0x568d11=_0x1707f0?.[_0x58b602]?.[_0x2e9289(0x9d)];if(typeof _0x568d11===_0x2e9289(0xb8)){_0x568d11!==_0x2e9289(0x101)&&(_0x448038={'pkgPath':_0x3dd46a,'currentVersion':_0x568d11,'field':_0x58b602});break;}}}catch{}return{'configMigration':_0x3046d6,'oldArtifacts':_0x2e8be4,'oldMcpConfig':_0x10fbb5,'needsSkillSwap':_0x1e7d10,'sdkUpgrade':_0x448038};}function printReport(_0x3f953c){const _0x46e378=a161_0x5081,{configMigration:_0x325046,oldArtifacts:_0x479cd9,oldMcpConfig:_0x2d3cba,needsSkillSwap:_0x331eb5}=_0x3f953c;console[_0x46e378(0xf1)](''),console['log'](a161_0xedf86f[_0x46e378(0xaf)](_0x46e378(0x97))),console[_0x46e378(0xf1)]('');_0x325046?(console['log'](a161_0xedf86f[_0x46e378(0xa3)]('Config\x20file:')+('\x20\x20'+a161_0xedf86f['yellow'](_0x325046[_0x46e378(0xe2)]))),console[_0x46e378(0xf1)](_0x46e378(0x9a)+(_0x325046[_0x46e378(0x102)]?a161_0xedf86f[_0x46e378(0xad)](_0x46e378(0xdc)):a161_0xedf86f['gray'](_0x46e378(0x10d)))),console[_0x46e378(0xf1)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x325046['fields'][_0x46e378(0xd3)](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x46e378(0xf1)](a161_0xedf86f[_0x46e378(0xa3)]('Config\x20file:')+'\x20\x20'+a161_0xedf86f[_0x46e378(0xa8)](_0x46e378(0xfe)));console['log']('');if(_0x479cd9['length']>0x0){console[_0x46e378(0xf1)](a161_0xedf86f['cyan'](_0x46e378(0xca)));for(const _0x2de8cf of _0x479cd9){console[_0x46e378(0xf1)]('\x20\x20'+a161_0xedf86f[_0x46e378(0x9b)]('FOUND')+'\x20\x20'+_0x2de8cf);}console[_0x46e378(0xf1)](_0x46e378(0xc8));}else console[_0x46e378(0xf1)](a161_0xedf86f['cyan'](_0x46e378(0xca))+'\x20\x20'+a161_0xedf86f[_0x46e378(0xa8)](_0x46e378(0xf6)));console[_0x46e378(0xf1)]('');_0x2d3cba?(console[_0x46e378(0xf1)](a161_0xedf86f[_0x46e378(0xa3)](_0x46e378(0xcf))+('\x20\x20'+a161_0xedf86f[_0x46e378(0x108)](_0x2d3cba[_0x46e378(0xe5)])+_0x46e378(0xac)+_0x2d3cba[_0x46e378(0x104)][_0x46e378(0xd3)](',\x20'))),console[_0x46e378(0xf1)](_0x46e378(0xa4))):console[_0x46e378(0xf1)](a161_0xedf86f[_0x46e378(0xa3)]('MCP\x20config:')+'\x20\x20'+a161_0xedf86f[_0x46e378(0xa8)]('no\x20legacy\x20entry'));console['log'](''),console[_0x46e378(0xf1)](a161_0xedf86f[_0x46e378(0xa3)](_0x46e378(0x96))+('\x20\x20'+(_0x331eb5?a161_0xedf86f['yellow'](_0x46e378(0x9e)):a161_0xedf86f[_0x46e378(0xad)](_0x46e378(0xed)))));_0x331eb5&&console[_0x46e378(0xf1)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x46e378(0xf1)]('');if(_0x3f953c[_0x46e378(0xb6)]){const {currentVersion:_0x255bba,field:_0x2da99d,pkgPath:_0x1751ce}=_0x3f953c[_0x46e378(0xb6)];console['log'](a161_0xedf86f[_0x46e378(0xa3)](_0x46e378(0xf2))+('\x20\x20'+a161_0xedf86f[_0x46e378(0x108)](_0x1751ce))),console[_0x46e378(0xf1)](_0x46e378(0xf0)+_0x2da99d+':\x20'+a161_0xedf86f[_0x46e378(0x108)](_0x255bba)+_0x46e378(0xc6)+a161_0xedf86f['green']('latest')),console['log'](_0x46e378(0xb7));}else console[_0x46e378(0xf1)](a161_0xedf86f[_0x46e378(0xa3)](_0x46e378(0xf2))+'\x20\x20'+a161_0xedf86f[_0x46e378(0xa8)](_0x46e378(0x90)));console[_0x46e378(0xf1)]('');}function execConfigMigration(_0x39c9d4,_0x5d040b){const _0xc86adc=a161_0x5081,{configMigration:_0x4aa2ad}=_0x39c9d4;if(!_0x4aa2ad?.[_0xc86adc(0xe2)])return{'step':0x1,'label':_0xc86adc(0x91),'ok':!![],'detail':_0xc86adc(0xb4)};const _0x549eb9=readConfigFile(_0x4aa2ad['oldPath']),_0x3b435d=resolve(_0x5d040b,NEW_CONFIG_NAME),_0x452aa2=_0x4aa2ad[_0xc86adc(0x102)]?readConfigFile(_0x3b435d):{};for(const [_0x17e52b,_0x361f01]of Object['entries'](_0x549eb9)){!(_0x17e52b in _0x452aa2)&&(_0x452aa2[_0x17e52b]=_0x361f01);}writeConfigFile(_0x3b435d,_0x452aa2);const _0x4aa0eb=_0x4aa2ad['oldPath']+'.bak';return renameSync(_0x4aa2ad[_0xc86adc(0xe2)],_0x4aa0eb),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x4aa2ad['oldPath']+_0xc86adc(0xc6)+_0x3b435d+_0xc86adc(0xf4)+_0x4aa0eb+')'};}function execRemoveOldArtifacts(_0x20d7ab){const _0x28c648=a161_0x5081,_0x3be4c9=[];for(const _0x85aa of _0x20d7ab){try{if(!existsSync(_0x85aa))continue;const _0x363a08=tryStat(_0x85aa);_0x363a08?.[_0x28c648(0xb5)]()?rmSync(_0x85aa,{'recursive':!![],'force':!![]}):unlinkSync(_0x85aa);}catch(_0x10dfde){_0x3be4c9[_0x28c648(0xe4)](_0x85aa+':\x20'+_0x10dfde[_0x28c648(0xf5)]);}}return{'step':0x3,'label':_0x28c648(0x95),'ok':_0x3be4c9[_0x28c648(0xd2)]===0x0,'detail':_0x3be4c9[_0x28c648(0xd2)]>0x0?_0x20d7ab['length']-_0x3be4c9['length']+'/'+_0x20d7ab['length']+_0x28c648(0xc4)+_0x3be4c9[_0x28c648(0xd3)](';\x20')+')':_0x20d7ab[_0x28c648(0xd2)]+_0x28c648(0xa9)};}function execCleanMcp(_0x40a2a4){const _0x4028b4=a161_0x5081;if(!_0x40a2a4[_0x4028b4(0x110)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x4028b4(0x106)};try{const _0x53828b=readFileSync(_0x40a2a4[_0x4028b4(0x110)][_0x4028b4(0xe5)],_0x4028b4(0xab)),_0x769dc1=JSON[_0x4028b4(0xde)](_0x53828b);if(_0x769dc1?.[_0x4028b4(0xfd)]&&typeof _0x769dc1['mcpServers']===_0x4028b4(0xc0)){const _0x572e8f=[];for(const [_0x1a4c2c,_0xbcbaa3]of Object[_0x4028b4(0x10f)](_0x769dc1['mcpServers'])){_0xbcbaa3?.[_0x4028b4(0xd7)]&&Array[_0x4028b4(0xc9)](_0xbcbaa3[_0x4028b4(0xd7)])&&_0xbcbaa3[_0x4028b4(0xd7)][_0x4028b4(0xd4)](_0x4d6cac=>typeof _0x4d6cac===_0x4028b4(0xb8)&&_0x4d6cac[_0x4028b4(0xb3)](_0x4028b4(0x92)))&&_0x572e8f['push'](_0x1a4c2c);}for(const _0xb25e59 of _0x572e8f){delete _0x769dc1[_0x4028b4(0xfd)][_0xb25e59];}return _0x572e8f[_0x4028b4(0xd2)]>0x0&&writeFileSync(_0x40a2a4['oldMcpConfig'][_0x4028b4(0xe5)],JSON[_0x4028b4(0xe6)](_0x769dc1,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x4028b4(0xce)+_0x572e8f[_0x4028b4(0xd3)](',\x20')+_0x4028b4(0x103)+_0x40a2a4[_0x4028b4(0x110)][_0x4028b4(0xe5)]};}return{'step':0x4,'label':_0x4028b4(0x9c),'ok':!![],'detail':_0x4028b4(0xc1)};}catch(_0x4621dc){return{'step':0x4,'label':_0x4028b4(0x9c),'ok':![],'detail':_0x4621dc[_0x4028b4(0xf5)]};}}function execSkillsRemove(_0x537f7c,_0x4af115){const _0x26e289=a161_0x5081,_0x5a7f79=runNpxSkillsRemove(_0x537f7c,{'stdio':'inherit','yes':_0x4af115});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x5a7f79['ok'],'detail':_0x5a7f79['ok']?_0x26e289(0x10c):_0x5a7f79[_0x26e289(0xaa)]??_0x26e289(0x107)+_0x5a7f79[_0x26e289(0xfb)]};}function execSkillsAdd(_0x3d6020,_0x5ce3d8){const _0xbac686=a161_0x5081,_0x73d2df=runNpxSkillsAddGlobal(_0x3d6020,_0xbac686(0x100),{'stdio':_0xbac686(0xfa),'yes':_0x5ce3d8});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x73d2df['ok'],'detail':_0x73d2df['ok']?_0xbac686(0x10a):_0x73d2df['error']??'exit\x20'+_0x73d2df['status']};}function execUpgradeSdk(_0x385552){const _0x2411ba=a161_0x5081;if(!_0x385552['sdkUpgrade'])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x2411ba(0xd8)};const {pkgPath:_0x17c9de,currentVersion:_0x303870,field:_0x4ba727}=_0x385552[_0x2411ba(0xb6)];try{const _0x1a1307=readFileSync(_0x17c9de,_0x2411ba(0xab)),_0x3f3935=JSON[_0x2411ba(0xde)](_0x1a1307);return _0x3f3935[_0x4ba727][_0x2411ba(0x9d)]=_0x2411ba(0x101),writeFileSync(_0x17c9de,JSON[_0x2411ba(0xe6)](_0x3f3935,null,0x2)+'\x0a',_0x2411ba(0xab)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x4ba727+_0x2411ba(0xd9)+_0x303870+'\x20→\x20latest'};}catch(_0xe05918){return{'step':0x7,'label':_0x2411ba(0xe7),'ok':![],'detail':_0xe05918[_0x2411ba(0xf5)]};}}function a161_0xcd73(){const _0x3be7c0=['start','\x20→\x20','failed','\x20\x20Action:\x20delete','isArray','Legacy\x20artifacts:','11683448SPGroD','Remove\x20.lovrabet/','package.json','removed\x20','MCP\x20config:','FAIL','succeed','length','join','some','.cursor/mcp.json','detail','args','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','[\x22@lovrabet/sdk\x22]:\x20','files','fail','already\x20exists\x20(will\x20merge)','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','parse','label','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','done','oldPath','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','push','path','stringify','Upgrade\x20@lovrabet/sdk','881218LmJLyG','values','Step\x206/7:\x20Installing\x20new\x20skill...','devDependencies','Step\x204/7:\x20MCP\x20config\x20—\x20','not\x20needed','\x20\x20npm\x20install','Step\x201/7:\x20Config\x20migration\x20—\x20','\x20\x20Current\x20version\x20in\x20','log','@lovrabet/sdk:','step','\x20(backup:\x20','message','none\x20found','Upgrade\x20cancelled.','2081444TDhNaK','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','inherit','status','Proceed\x20with\x20upgrade?','mcpServers','no\x20legacy\x20config\x20found','Step\x204/7:\x20Cleaning\x20MCP\x20config...','lovrabet/rabetbase','latest','hasNewConfig','\x20from\x20','keys','6967140ZaFCKK','skipped','exit\x20','yellow','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','lovrabet/rabetbase\x20installed\x20globally','9793119qoWjXx','lovrabet/lovrabet-skill\x20removed','not\x20found\x20(will\x20create)','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','entries','oldMcpConfig','not\x20found\x20or\x20already\x20at\x20latest','Config\x20migration','@lovrabet/dataset-mcp-server','configMigration','cwd','Remove\x20legacy\x20artifacts','Skill\x20swap:','===\x20Upgrade\x20Analysis\x20===','Step\x205/7:\x20Removing\x20old\x20skill...','undefined','\x20\x20New\x20config\x20(.rabetbase.json):\x20','red','Clean\x20MCP\x20config','@lovrabet/sdk','needed','.lovrabet','.claude/skills/lovrabet','2VcyNXM','filter','cyan','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','yes','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','gray','\x20removed','error','utf8','\x20→\x20keys:\x20','green','6xAsRSY','bold','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','\x20\x20#\x20or','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','includes','skipped\x20(no\x20legacy\x20config)','isDirectory','sdkUpgrade','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','string','white','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','info','needsSkillSwap','dependencies','===\x20Upgrade\x20Summary\x20===','Upgrade\x20completed\x20successfully!','object','no\x20matching\x20entry\x20found','4080462qUwXPR','19408734kVwGrM','\x20removed\x20('];a161_0xcd73=function(){return _0x3be7c0;};return a161_0xcd73();}function tryStat(_0x3b7a3d){try{return statSync(_0x3b7a3d);}catch{return undefined;}}function printSummary(_0x44fd60){const _0x504504=a161_0x5081;console[_0x504504(0xf1)](''),console['log'](a161_0xedf86f['bold'](_0x504504(0xbe))),console[_0x504504(0xf1)]('');for(const _0x132d6f of _0x44fd60){const _0x45fe14=_0x132d6f['ok']?a161_0xedf86f[_0x504504(0xad)]('OK'):a161_0xedf86f[_0x504504(0x9b)](_0x504504(0xd0));console[_0x504504(0xf1)]('\x20\x20'+_0x45fe14+'\x20\x20Step\x20'+_0x132d6f[_0x504504(0xf3)]+':\x20'+_0x132d6f[_0x504504(0xdf)]);if(_0x132d6f[_0x504504(0xd6)])console['log']('\x20\x20\x20\x20\x20\x20\x20'+a161_0xedf86f['gray'](_0x132d6f[_0x504504(0xd6)]));}console['log']('');}export async function upgradeApp(_0x58edeb,_0x15a6ed){const _0x4e6a4b=a161_0x5081,_0x3294fe=process[_0x4e6a4b(0x94)](),_0x16c080=analyse(_0x3294fe),_0x53ca3a=!_0x16c080[_0x4e6a4b(0x93)]&&_0x16c080['oldArtifacts']['length']===0x0&&!_0x16c080[_0x4e6a4b(0x110)]&&!_0x16c080[_0x4e6a4b(0xbc)]&&!_0x16c080[_0x4e6a4b(0xb6)];if(_0x53ca3a){console[_0x4e6a4b(0xf1)](a161_0xedf86f[_0x4e6a4b(0xad)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x16c080);const _0x1324e8=!!(_0x15a6ed[_0x4e6a4b(0xa6)]||_0x15a6ed['Y']||_0x58edeb);if(!_0x1324e8)try{const _0x59f098=await askConfirm(_0x4e6a4b(0xfc));if(!_0x59f098){console[_0x4e6a4b(0xf1)](a161_0xedf86f[_0x4e6a4b(0xa8)](_0x4e6a4b(0xf7)));return;}}catch(_0x2faeb7){if(_0x2faeb7?.['message']==='CANCEL'){console['log'](a161_0xedf86f['gray'](_0x4e6a4b(0xf7)));return;}throw _0x2faeb7;}const _0x47e9b5=[],_0x3e9774=a161_0x35b839({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x4e6a4b(0xa3)})[_0x4e6a4b(0xc5)](),_0x2b2bd1=execConfigMigration(_0x16c080,_0x3294fe);_0x47e9b5[_0x4e6a4b(0xe4)](_0x2b2bd1),_0x3e9774[_0x2b2bd1['ok']?'succeed':_0x4e6a4b(0xdb)](_0x4e6a4b(0xef)+(_0x2b2bd1['detail']??(_0x2b2bd1['ok']?_0x4e6a4b(0xe1):_0x4e6a4b(0xc7))));const _0x2fe313=resolve(_0x3294fe,'.lovrabet'),_0x5f45f6=a161_0x35b839({'text':_0x4e6a4b(0xb0),'color':_0x4e6a4b(0xa3)})[_0x4e6a4b(0xc5)]();if(existsSync(_0x2fe313))try{rmSync(_0x2fe313,{'recursive':!![],'force':!![]}),_0x5f45f6[_0x4e6a4b(0xd1)](_0x4e6a4b(0xa7)),_0x47e9b5['push']({'step':0x2,'label':_0x4e6a4b(0xcc),'ok':!![]});}catch(_0x1632f0){_0x5f45f6[_0x4e6a4b(0xdb)](_0x4e6a4b(0xb2)+_0x1632f0[_0x4e6a4b(0xf5)]),_0x47e9b5['push']({'step':0x2,'label':_0x4e6a4b(0xcc),'ok':![],'detail':_0x1632f0[_0x4e6a4b(0xf5)]});}else _0x5f45f6[_0x4e6a4b(0xbb)](_0x4e6a4b(0xdd)),_0x47e9b5[_0x4e6a4b(0xe4)]({'step':0x2,'label':_0x4e6a4b(0xcc),'ok':!![],'detail':_0x4e6a4b(0x106)});const _0x197ed7=a161_0x35b839({'text':_0x4e6a4b(0xba),'color':_0x4e6a4b(0xa3)})[_0x4e6a4b(0xc5)](),_0x3d59da=execRemoveOldArtifacts(_0x16c080['oldArtifacts']);_0x47e9b5[_0x4e6a4b(0xe4)](_0x3d59da),_0x197ed7[_0x3d59da['ok']?_0x4e6a4b(0xd1):_0x4e6a4b(0xdb)](_0x4e6a4b(0xe0)+(_0x3d59da[_0x4e6a4b(0xd6)]??(_0x3d59da['ok']?_0x4e6a4b(0xe1):_0x4e6a4b(0xc7))));const _0x42db00=a161_0x35b839({'text':_0x4e6a4b(0xff),'color':_0x4e6a4b(0xa3)})[_0x4e6a4b(0xc5)](),_0x295650=execCleanMcp(_0x16c080);_0x47e9b5[_0x4e6a4b(0xe4)](_0x295650),_0x42db00[_0x295650['ok']?_0x4e6a4b(0xd1):_0x4e6a4b(0xdb)](_0x4e6a4b(0xec)+(_0x295650[_0x4e6a4b(0xd6)]??(_0x295650['ok']?_0x4e6a4b(0xe1):_0x4e6a4b(0xc7))));const _0x5454de=a161_0x35b839({'text':_0x4e6a4b(0x98),'color':_0x4e6a4b(0xa3)})[_0x4e6a4b(0xc5)](),_0x359d6a=execSkillsRemove(_0x3294fe,_0x1324e8);_0x47e9b5[_0x4e6a4b(0xe4)](_0x359d6a),_0x5454de[_0x359d6a['ok']?_0x4e6a4b(0xd1):'fail'](_0x4e6a4b(0x109)+(_0x359d6a[_0x4e6a4b(0xd6)]??(_0x359d6a['ok']?_0x4e6a4b(0xe1):_0x4e6a4b(0xc7))));const _0x1caab0=a161_0x35b839({'text':_0x4e6a4b(0xea),'color':_0x4e6a4b(0xa3)})[_0x4e6a4b(0xc5)](),_0x1a6825=execSkillsAdd(_0x3294fe,_0x1324e8);_0x47e9b5['push'](_0x1a6825),_0x1caab0[_0x1a6825['ok']?'succeed':_0x4e6a4b(0xdb)](_0x4e6a4b(0xf9)+(_0x1a6825[_0x4e6a4b(0xd6)]??(_0x1a6825['ok']?_0x4e6a4b(0xe1):_0x4e6a4b(0xc7))));const _0x51e723=a161_0x35b839({'text':_0x4e6a4b(0xe3),'color':_0x4e6a4b(0xa3)})['start'](),_0x2a2583=execUpgradeSdk(_0x16c080);_0x47e9b5[_0x4e6a4b(0xe4)](_0x2a2583),_0x51e723[_0x2a2583['ok']?_0x4e6a4b(0xd1):_0x4e6a4b(0xdb)](_0x4e6a4b(0x10e)+(_0x2a2583['detail']??(_0x2a2583['ok']?_0x4e6a4b(0xe1):_0x4e6a4b(0xc7)))),printSummary(_0x47e9b5);const _0x52d2bd=_0x47e9b5[_0x4e6a4b(0xd4)](_0x2bbab3=>!_0x2bbab3['ok']);_0x52d2bd?console[_0x4e6a4b(0xf1)](a161_0xedf86f[_0x4e6a4b(0x108)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x4e6a4b(0xf1)](a161_0xedf86f[_0x4e6a4b(0xad)](_0x4e6a4b(0xbf))),_0x2a2583['ok']&&_0x16c080[_0x4e6a4b(0xb6)]&&(console[_0x4e6a4b(0xf1)](''),console[_0x4e6a4b(0xf1)](a161_0xedf86f['bold'][_0x4e6a4b(0xa3)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a161_0xedf86f[_0x4e6a4b(0xa3)](_0x4e6a4b(0xa5))),console[_0x4e6a4b(0xf1)](''),console[_0x4e6a4b(0xf1)](a161_0xedf86f['white'](_0x4e6a4b(0xee))),console[_0x4e6a4b(0xf1)](a161_0xedf86f[_0x4e6a4b(0xb9)](_0x4e6a4b(0xb1))),console['log'](a161_0xedf86f['white']('\x20\x20bun\x20install')),console[_0x4e6a4b(0xf1)](''));}
@@ -1 +1 @@
1
- const a162_0x2cec0b=a162_0x31db;(function(_0x12213f,_0x98c1cd){const _0x34212c=a162_0x31db,_0x50292b=_0x12213f();while(!![]){try{const _0x552610=-parseInt(_0x34212c(0x1b1))/0x1+-parseInt(_0x34212c(0x1bc))/0x2*(-parseInt(_0x34212c(0x1de))/0x3)+-parseInt(_0x34212c(0x1b7))/0x4*(parseInt(_0x34212c(0x1a7))/0x5)+parseInt(_0x34212c(0x1a5))/0x6+-parseInt(_0x34212c(0x1bb))/0x7*(parseInt(_0x34212c(0x1d6))/0x8)+parseInt(_0x34212c(0x1b0))/0x9*(parseInt(_0x34212c(0x1e6))/0xa)+-parseInt(_0x34212c(0x1a1))/0xb*(-parseInt(_0x34212c(0x18b))/0xc);if(_0x552610===_0x98c1cd)break;else _0x50292b['push'](_0x50292b['shift']());}catch(_0x17bd38){_0x50292b['push'](_0x50292b['shift']());}}}(a162_0x4f7d,0x7c1be));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{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/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{permitDefinitions}from'../commands/permit/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{notificationDefinitions}from'../commands/notification/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{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';function a162_0x31db(_0x22c9e6,_0x3092ec){_0x22c9e6=_0x22c9e6-0x18a;const _0x4f7d51=a162_0x4f7d();let _0x31db35=_0x4f7d51[_0x22c9e6];return _0x31db35;}function a162_0x4f7d(){const _0x4def4d=['File','login','2778587AhTlOi','1986umjwFf','knowledge-base:update','`\x20has\x20been\x20removed.','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Use\x20`','knowledge-base:delete','skill:','Run\x20any\x20package.json\x20script','rabetbase\x20kb\x20delete','Permissions','`\x20instead.','show','Configuration','rabetbase\x20run\x20build','from','bff:new','rabetbase\x20bff\x20create','set','map','Quick\x20Start','Notification\x20Configuration','build','\x20\x20[write]','defaultCommand','Authentication','rabetbase\x20app\x20list\x20--remote','8qTpzIZ','rabetbase\x20project\x20create\x20<project-name>','sql:save','isSingleCommand','app:use','rabetbase\x20run\x20preview','rabetbase\x20sql\x20create','push','9QuCBnm','write','Diagnostics','Schema','skill:install','wildcardDef','Run\x20Scripts','Self\x20Update','26470qTjlWO','Logs','Instant\x20API','project:init','12972RMJShT','has','SQL\x20Queries','Code\x20Generation','BFF\x20Scripts','rabetbase\x20run\x20start','hidden','Tenant\x20Members','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','CLI\x20Built-in\x20Skill','create','description','Runtime\x20App\x20Config\x20Management','App\x20Management','service','rabetbase\x20kb\x20detail','knowledge-base:list','skills:','Project','Platform\x20Issue','Async\x20Tasks','<script>','13453rCscVS','rabetbase\x20kb\x20create','install','get','2684970nmLHVv','knowledge-base:create','1100oMEIkU','\x20\x20[high-risk-write]','values','preview','commands','rabetbase\x20cli-skill\x20install','run','rabetbase\x20auth\x20logout','`rabetbase\x20','2025caaEoT','449501cIQebo','command','rabetbase\x20kb\x20update','Smart\x20List\x20Pages','length','menu:update','18424KOSFhn','knowledge-base:detail'];a162_0x4f7d=function(){return _0x4def4d;};return a162_0x4f7d();}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(_0x3dc1d5){const _0x2809d0=a162_0x31db;for(const _0x2c397d of _0x3dc1d5){definitions[_0x2809d0(0x1cd)](_0x2c397d[_0x2809d0(0x199)]+':'+_0x2c397d[_0x2809d0(0x1b2)],_0x2c397d);let _0x5ac1a3=serviceGroups['get'](_0x2c397d[_0x2809d0(0x199)]);!_0x5ac1a3&&(_0x5ac1a3=[],serviceGroups[_0x2809d0(0x1cd)](_0x2c397d[_0x2809d0(0x199)],_0x5ac1a3)),_0x5ac1a3[_0x2809d0(0x1dd)](_0x2c397d);}}function registerDeclarativeService(_0x5e140e,_0x58460f,_0x24523f){const _0x313c7e=a162_0x31db;registerDefinitions(_0x58460f);_0x24523f?.[_0x313c7e(0x1e3)]&&registerDefinitions([_0x24523f['wildcardDef']]);const _0xb9f903=_0x217182=>_0x217182==='read'?'':_0x217182===_0x313c7e(0x1df)?_0x313c7e(0x1d2):_0x313c7e(0x1a8),_0x8dd7c6={'service':_0x58460f[0x0][_0x313c7e(0x199)],'label':_0x5e140e,'commands':_0x58460f['filter'](_0x4114bf=>!_0x4114bf[_0x313c7e(0x191)])[_0x313c7e(0x1ce)](_0x26a2a5=>({'command':_0x26a2a5['command'],'description':_0x26a2a5[_0x313c7e(0x196)],'tag':_0xb9f903(_0x26a2a5['risk'])})),'declarative':!![],'defaultCommand':_0x24523f?.[_0x313c7e(0x1d3)]??(_0x24523f?.[_0x313c7e(0x1d9)]?_0x58460f[0x0][_0x313c7e(0x1b2)]:undefined),'wildcardDef':_0x24523f?.['wildcardDef'],'isSingleCommand':_0x24523f?.[_0x313c7e(0x1d9)]};serviceRegistry[_0x313c7e(0x1dd)](_0x8dd7c6),serviceByName[_0x313c7e(0x1cd)](_0x8dd7c6[_0x313c7e(0x199)],_0x8dd7c6);}registerDeclarativeService(a162_0x2cec0b(0x1cf),initDefinitions,{'defaultCommand':a162_0x2cec0b(0x1ad),'isSingleCommand':!![]}),registerDeclarativeService(a162_0x2cec0b(0x19d),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a162_0x2cec0b(0x198),appDefinitions),registerDeclarativeService(a162_0x2cec0b(0x1d4),authDefinitions,{'defaultCommand':a162_0x2cec0b(0x1ba)}),registerDeclarativeService(a162_0x2cec0b(0x192),tenantDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a162_0x2cec0b(0x1b4),pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a162_0x2cec0b(0x1e8),dataDefinitions),registerDeclarativeService(a162_0x2cec0b(0x18f),bffDefinitions),registerDeclarativeService(a162_0x2cec0b(0x1d0),notificationDefinitions),registerDeclarativeService(a162_0x2cec0b(0x18d),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a162_0x2cec0b(0x19f),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a162_0x2cec0b(0x1c5),permitDefinitions),registerDeclarativeService(a162_0x2cec0b(0x197),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService(a162_0x2cec0b(0x19e),issueDefinitions),registerDeclarativeService(a162_0x2cec0b(0x1b9),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a162_0x2cec0b(0x18e),codegenDefinitions),registerDeclarativeService(a162_0x2cec0b(0x1c8),configDefinitions),registerDeclarativeService(a162_0x2cec0b(0x1e0),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a162_0x2cec0b(0x1e1),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a162_0x2cec0b(0x1e5),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a162_0x2cec0b(0x194),cliSkillDefinitions,{'defaultCommand':a162_0x2cec0b(0x1a3)}),registerDeclarativeService(a162_0x2cec0b(0x1e7),logsDefinitions,{'defaultCommand':a162_0x2cec0b(0x1c7)}),registerDeclarativeService(a162_0x2cec0b(0x1e4),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a162_0x2cec0b(0x1b5)]-0x1];last[a162_0x2cec0b(0x1ab)]=[{'command':a162_0x2cec0b(0x1a0),'description':a162_0x2cec0b(0x1c3),'tag':''}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a162_0x2cec0b(0x1d8),a162_0x2cec0b(0x1bf)],[a162_0x2cec0b(0x1cb),a162_0x2cec0b(0x1cc)],['sql:new',a162_0x2cec0b(0x1dc)],[a162_0x2cec0b(0x1b6),'rabetbase\x20menu\x20asset-update'],[a162_0x2cec0b(0x18a),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a162_0x2cec0b(0x1c2),'rabetbase\x20cli-skill\x20install'],[a162_0x2cec0b(0x1e2),a162_0x2cec0b(0x1ac)],[a162_0x2cec0b(0x19c),a162_0x2cec0b(0x1ac)],['skills:install',a162_0x2cec0b(0x1ac)],['app:remote',a162_0x2cec0b(0x1d5)],[a162_0x2cec0b(0x1da),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],['app:add',a162_0x2cec0b(0x193)],['app:remove','rabetbase\x20workspace\x20remove\x20<name>'],[a162_0x2cec0b(0x19b),'rabetbase\x20kb\x20list'],[a162_0x2cec0b(0x1b8),a162_0x2cec0b(0x19a)],[a162_0x2cec0b(0x1a6),a162_0x2cec0b(0x1a2)],[a162_0x2cec0b(0x1bd),a162_0x2cec0b(0x1b3)],[a162_0x2cec0b(0x1c1),a162_0x2cec0b(0x1c4)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a162_0x2cec0b(0x195),a162_0x2cec0b(0x1d7)],['start',a162_0x2cec0b(0x190)],[a162_0x2cec0b(0x1d1),a162_0x2cec0b(0x1c9)],[a162_0x2cec0b(0x1aa),a162_0x2cec0b(0x1db)],['logout',a162_0x2cec0b(0x1ae)]]);export function resolveRemovedCommand(_0x39c779,_0x2a78e8){const _0x5d51ac=a162_0x2cec0b;if(!_0x39c779)return undefined;const _0x3ba584=REMOVED_COMMAND_REPLACEMENTS[_0x5d51ac(0x1a4)](_0x39c779+':'+(_0x2a78e8??'')),_0x523e51=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x5d51ac(0x1a4)](_0x39c779),_0x5d641e=_0x3ba584??_0x523e51;if(!_0x5d641e)return undefined;const _0x19ea55=_0x523e51?_0x39c779:_0x2a78e8?_0x39c779+'\x20'+_0x2a78e8:_0x39c779;return{'command':_0x19ea55,'message':_0x5d51ac(0x1af)+_0x19ea55+_0x5d51ac(0x1be),'hint':_0x5d51ac(0x1c0)+_0x5d641e+_0x5d51ac(0x1c6)};}export function findDefinition(_0x13f9ba,_0x508563){const _0x24b192=a162_0x2cec0b;return definitions[_0x24b192(0x1a4)](_0x13f9ba+':'+_0x508563);}export function isKnownService(_0x29d5d4){const _0x6e3f37=a162_0x2cec0b;return serviceByName[_0x6e3f37(0x18c)](_0x29d5d4);}export function isDeclarativeService(_0x1d546f){const _0x530b46=a162_0x2cec0b;return serviceGroups['has'](_0x1d546f)||serviceByName[_0x530b46(0x1a4)](_0x1d546f)?.[_0x530b46(0x1e3)]!==undefined;}export function getServiceEntry(_0x58f92e){const _0x4260c7=a162_0x2cec0b;return serviceByName[_0x4260c7(0x1a4)](_0x58f92e);}export function getLegacyHandler(_0xacb196,_0x30b8c5){return undefined;}export function getAllDefinitions(){const _0x3ec15b=a162_0x2cec0b;return Array[_0x3ec15b(0x1ca)](definitions[_0x3ec15b(0x1a9)]());}
1
+ const a162_0x488395=a162_0x2dac;(function(_0x3e1b5a,_0x4bb0af){const _0x543fe9=a162_0x2dac,_0x3b4ad8=_0x3e1b5a();while(!![]){try{const _0x2e5d16=-parseInt(_0x543fe9(0xc7))/0x1+parseInt(_0x543fe9(0x84))/0x2*(parseInt(_0x543fe9(0x86))/0x3)+parseInt(_0x543fe9(0x99))/0x4+parseInt(_0x543fe9(0xd4))/0x5+-parseInt(_0x543fe9(0xb7))/0x6*(parseInt(_0x543fe9(0x91))/0x7)+-parseInt(_0x543fe9(0xac))/0x8*(-parseInt(_0x543fe9(0xb6))/0x9)+parseInt(_0x543fe9(0xd1))/0xa*(-parseInt(_0x543fe9(0xab))/0xb);if(_0x2e5d16===_0x4bb0af)break;else _0x3b4ad8['push'](_0x3b4ad8['shift']());}catch(_0x373365){_0x3b4ad8['push'](_0x3b4ad8['shift']());}}}(a162_0x48e3,0x8ce7b));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{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/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{permitDefinitions}from'../commands/permit/index.js';function a162_0x48e3(){const _0x3e92bf=['build','2191185mmknEW','rabetbase\x20cli-skill\x20install','Database\x20Connections','Code\x20Generation','rabetbase\x20sql\x20create','bff:new','from','<script>','command','OCR','rabetbase\x20app\x20list\x20--remote','sql:new','skills:install','CLI\x20Built-in\x20Skill','rabetbase\x20project\x20create\x20<project-name>','Run\x20any\x20package.json\x20script','678086BEQDHe','isSingleCommand','3pKFfFd','Self\x20Update','create','API\x20Development','Smart\x20List\x20Pages','Run\x20Scripts','map','risk','rabetbase\x20kb\x20update','rabetbase\x20auth\x20logout','run','42gltirv','rabetbase\x20kb\x20create','knowledge-base:create','Use\x20`','Schema','Platform\x20Issue','Dataset\x20&\x20Operations','rabetbase\x20workspace\x20use\x20--app\x20<name>','2852396ithiJB','rabetbase\x20workspace\x20remove\x20<name>','rabetbase\x20kb\x20list','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','skill:','wildcardDef','SQL\x20Queries','project:init','set','get','BFF\x20Scripts','\x20\x20[','app:use','`rabetbase\x20','commands','Logs','knowledge-base:update','rabetbase\x20run\x20build','319uEqFHb','2639192jPpCkc','knowledge-base:delete','\x20\x20[high-risk-write]','defaultCommand','app:remote','hidden','read','`\x20instead.','File','Async\x20Tasks','9AkooFR','43242LZQgRq','menu:update','Notification\x20Configuration','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','skill:install','show','Instant\x20API','preview','logout','rabetbase\x20kb\x20detail','rabetbase\x20bff\x20create','rabetbase\x20run\x20preview','skills:','login','Quick\x20Start','Permissions','19705YoMYes','Menu','Authentication','`\x20has\x20been\x20removed.','sql:save','Project','knowledge-base:detail','service','write','values','406960FqPhEc','Diagnostics'];a162_0x48e3=function(){return _0x3e92bf;};return a162_0x48e3();}import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/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';function a162_0x2dac(_0x2b5bef,_0x209c0b){_0x2b5bef=_0x2b5bef-0x79;const _0x48e32f=a162_0x48e3();let _0x2dac24=_0x48e32f[_0x2b5bef];return _0x2dac24;}import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/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(_0x4adeb8){const _0x16523b=a162_0x2dac;for(const _0x13e74f of _0x4adeb8){definitions[_0x16523b(0xa1)](_0x13e74f[_0x16523b(0xce)]+':'+_0x13e74f['command'],_0x13e74f);let _0x28d1b6=serviceGroups[_0x16523b(0xa2)](_0x13e74f[_0x16523b(0xce)]);!_0x28d1b6&&(_0x28d1b6=[],serviceGroups[_0x16523b(0xa1)](_0x13e74f[_0x16523b(0xce)],_0x28d1b6)),_0x28d1b6['push'](_0x13e74f);}}function registerDeclarativeService(_0x64781b,_0x47736d,_0xa9aaa3){const _0x15bb90=a162_0x2dac;registerDefinitions(_0x47736d);_0xa9aaa3?.[_0x15bb90(0x9e)]&&registerDefinitions([_0xa9aaa3['wildcardDef']]);const _0x19e181=_0x53eb99=>_0x53eb99===_0x15bb90(0xb2)?'':_0x53eb99===_0x15bb90(0xcf)?'\x20\x20[write]':_0x15bb90(0xae),_0x3fde63={'service':_0x47736d[0x0]['service'],'label':_0x64781b,'commands':_0x47736d['filter'](_0x4c0107=>!_0x4c0107[_0x15bb90(0xb1)])[_0x15bb90(0x8c)](_0x1b6f78=>({'command':_0x1b6f78[_0x15bb90(0x7c)],'description':_0x1b6f78['description'],'tag':_0x19e181(_0x1b6f78[_0x15bb90(0x8d)])})),'declarative':!![],'defaultCommand':_0xa9aaa3?.[_0x15bb90(0xaf)]??(_0xa9aaa3?.[_0x15bb90(0x85)]?_0x47736d[0x0]['command']:undefined),'wildcardDef':_0xa9aaa3?.[_0x15bb90(0x9e)],'isSingleCommand':_0xa9aaa3?.[_0x15bb90(0x85)]};serviceRegistry['push'](_0x3fde63),serviceByName[_0x15bb90(0xa1)](_0x3fde63[_0x15bb90(0xce)],_0x3fde63);}registerDeclarativeService(a162_0x488395(0xc5),initDefinitions,{'defaultCommand':a162_0x488395(0x90),'isSingleCommand':!![]}),registerDeclarativeService(a162_0x488395(0xcc),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a162_0x488395(0xc9),authDefinitions,{'defaultCommand':a162_0x488395(0xc4)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService(a162_0x488395(0x97),datasetDefinitions),registerDeclarativeService(a162_0x488395(0x8a),pageDefinitions),registerDeclarativeService(a162_0x488395(0x89),apiDefinitions),registerDeclarativeService(a162_0x488395(0xbd),dataDefinitions),registerDeclarativeService(a162_0x488395(0xa3),bffDefinitions),registerDeclarativeService(a162_0x488395(0xb9),notificationDefinitions),registerDeclarativeService(a162_0x488395(0x9f),sqlDefinitions),registerDeclarativeService(a162_0x488395(0xd6),dbDefinitions),registerDeclarativeService(a162_0x488395(0xc8),menuDefinitions),registerDeclarativeService(a162_0x488395(0xb5),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a162_0x488395(0xc6),permitDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService(a162_0x488395(0x96),issueDefinitions),registerDeclarativeService(a162_0x488395(0xb4),fileDefinitions),registerDeclarativeService(a162_0x488395(0x7d),ocrDefinitions),registerDeclarativeService(a162_0x488395(0xd7),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a162_0x488395(0xd2),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a162_0x488395(0x95),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a162_0x488395(0x87),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a162_0x488395(0x81),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a162_0x488395(0xa8),logsDefinitions,{'defaultCommand':a162_0x488395(0xbc)}),registerDeclarativeService(a162_0x488395(0x8b),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a162_0x488395(0xa7)]=[{'command':a162_0x488395(0x7b),'description':a162_0x488395(0x83),'tag':a162_0x488395(0xa4)+runDefinition[a162_0x488395(0x8d)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a162_0x488395(0xcb),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a162_0x488395(0x79),a162_0x488395(0xc1)],[a162_0x488395(0x7f),a162_0x488395(0xd8)],[a162_0x488395(0xb8),'rabetbase\x20menu\x20asset-update'],[a162_0x488395(0xa0),a162_0x488395(0xba)],[a162_0x488395(0x9d),a162_0x488395(0xd5)],[a162_0x488395(0xbb),a162_0x488395(0xd5)],[a162_0x488395(0xc3),a162_0x488395(0xd5)],[a162_0x488395(0x80),a162_0x488395(0xd5)],[a162_0x488395(0xb0),a162_0x488395(0x7e)],[a162_0x488395(0xa5),a162_0x488395(0x98)],['app:add',a162_0x488395(0x9c)],['app:remove',a162_0x488395(0x9a)],['knowledge-base:list',a162_0x488395(0x9b)],[a162_0x488395(0xcd),a162_0x488395(0xc0)],[a162_0x488395(0x93),a162_0x488395(0x92)],[a162_0x488395(0xa9),a162_0x488395(0x8e)],[a162_0x488395(0xad),'rabetbase\x20kb\x20delete']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a162_0x488395(0x88),a162_0x488395(0x82)],['start','rabetbase\x20run\x20start'],[a162_0x488395(0xd3),a162_0x488395(0xaa)],[a162_0x488395(0xbe),a162_0x488395(0xc2)],[a162_0x488395(0xbf),a162_0x488395(0x8f)]]);export function resolveRemovedCommand(_0x55fc0e,_0x10b63b){const _0x1fac9e=a162_0x488395;if(!_0x55fc0e)return undefined;const _0x2a25f7=REMOVED_COMMAND_REPLACEMENTS[_0x1fac9e(0xa2)](_0x55fc0e+':'+(_0x10b63b??'')),_0x3397c1=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x1fac9e(0xa2)](_0x55fc0e),_0xaba252=_0x2a25f7??_0x3397c1;if(!_0xaba252)return undefined;const _0x336b0e=_0x3397c1?_0x55fc0e:_0x10b63b?_0x55fc0e+'\x20'+_0x10b63b:_0x55fc0e;return{'command':_0x336b0e,'message':_0x1fac9e(0xa6)+_0x336b0e+_0x1fac9e(0xca),'hint':_0x1fac9e(0x94)+_0xaba252+_0x1fac9e(0xb3)};}export function findDefinition(_0x5b7771,_0x179be8){const _0x54a9ff=a162_0x488395;return definitions[_0x54a9ff(0xa2)](_0x5b7771+':'+_0x179be8);}export function isKnownService(_0x141a17){return serviceByName['has'](_0x141a17);}export function isDeclarativeService(_0x2f9d53){const _0x3daaf7=a162_0x488395;return serviceGroups['has'](_0x2f9d53)||serviceByName[_0x3daaf7(0xa2)](_0x2f9d53)?.[_0x3daaf7(0x9e)]!==undefined;}export function getServiceEntry(_0x10e63a){const _0x3657d9=a162_0x488395;return serviceByName[_0x3657d9(0xa2)](_0x10e63a);}export function getLegacyHandler(_0x3456d6,_0x43c754){return undefined;}export function getAllDefinitions(){const _0x3557c8=a162_0x488395;return Array[_0x3557c8(0x7a)](definitions[_0x3557c8(0xd0)]());}
@@ -1 +1 @@
1
- const a163_0x45dfd3=a163_0x1549;function a163_0x86e4(){const _0xd91974=['6OGsBPZ','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','19697496AiHpRt','appCode','name','135CcPOPJ','create','2098EDYAHy','write','1612911Ypiqht','CUSTOM','250397bqcnFd','trim','POST','673ZtahHg','remark','6784515LMvnGt','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','length','validation','Pass\x20--name\x20<roleName>.','4RJxVgb','184KFqQVM','flagMissing','roleName','7499360nrPaon','Created\x20role\x20','str','\x20(id=','612190qJicjl'];a163_0x86e4=function(){return _0xd91974;};return a163_0x86e4();}(function(_0x45c2a5,_0x4eecc5){const _0x1a1946=a163_0x1549,_0x88b40c=_0x45c2a5();while(!![]){try{const _0x2b0421=-parseInt(_0x1a1946(0x87))/0x1*(-parseInt(_0x1a1946(0x80))/0x2)+-parseInt(_0x1a1946(0x82))/0x3*(-parseInt(_0x1a1946(0x70))/0x4)+-parseInt(_0x1a1946(0x89))/0x5*(parseInt(_0x1a1946(0x79))/0x6)+-parseInt(_0x1a1946(0x84))/0x7*(-parseInt(_0x1a1946(0x71))/0x8)+-parseInt(_0x1a1946(0x7e))/0x9*(parseInt(_0x1a1946(0x78))/0xa)+-parseInt(_0x1a1946(0x74))/0xb+parseInt(_0x1a1946(0x7b))/0xc;if(_0x2b0421===_0x4eecc5)break;else _0x88b40c['push'](_0x88b40c['shift']());}catch(_0x390967){_0x88b40c['push'](_0x88b40c['shift']());}}}(a163_0x86e4,0xb7509));function a163_0x1549(_0x58bd11,_0x4082ad){_0x58bd11=_0x58bd11-0x6e;const _0x86e4ea=a163_0x86e4();let _0x1549eb=_0x86e4ea[_0x58bd11];return _0x1549eb;}import{createAppRole}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{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH='/smartapi/permit/role/create';function readName(_0x2c4450){const _0x4bd6ab=a163_0x1549,_0x219cfb=_0x2c4450[_0x4bd6ab(0x76)](_0x4bd6ab(0x7d))[_0x4bd6ab(0x85)]();if(!_0x219cfb)throw CliErrors[_0x4bd6ab(0x72)]('name',_0x4bd6ab(0x6f));if(_0x219cfb[_0x4bd6ab(0x8b)]>0x40)throw CliErrors[_0x4bd6ab(0x6e)](_0x4bd6ab(0x7a));return _0x219cfb;}export const roleCreate={'service':'role','command':'create','description':a163_0x45dfd3(0x8a),'risk':a163_0x45dfd3(0x81),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x51aedd){readName(_0x51aedd);},async 'dryRun'(_0x5023eb){const _0x2ccb85=a163_0x45dfd3,_0x394251=readName(_0x5023eb),_0x1f4b78=_0x5023eb['str'](_0x2ccb85(0x88))['trim']()||undefined;return asDryRunResult({'operation':_0x2ccb85(0x7f),'selector':{'appCode':_0x5023eb[_0x2ccb85(0x7c)],'roleName':_0x394251},'before':null,'after':{'roleName':_0x394251,'roleType':_0x2ccb85(0x83),'remark':_0x1f4b78},'dryRun':!![],'backend':{'method':_0x2ccb85(0x86),'path':CREATE_PATH},'warnings':[]},{'method':_0x2ccb85(0x86),'url':CREATE_PATH});},async 'execute'(_0x104c80){const _0x256837=a163_0x45dfd3,_0x276a4d=readName(_0x104c80),_0x43b308=_0x104c80[_0x256837(0x76)]('remark')[_0x256837(0x85)]()||undefined,_0x4303bb=await createAppRole({'appCode':_0x104c80[_0x256837(0x7c)],'roleName':_0x276a4d,..._0x43b308?{'remark':_0x43b308}:{}});return{'ok':!![],'data':{'operation':_0x256837(0x7f),'selector':{'appCode':_0x104c80[_0x256837(0x7c)],'roleId':_0x4303bb['id'],'roleName':_0x276a4d},'before':null,'after':projectRole(_0x4303bb),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[]},'message':_0x256837(0x75)+_0x4303bb[_0x256837(0x73)]+_0x256837(0x77)+_0x4303bb['id']+')'};}};
1
+ const a163_0x7bdea0=a163_0x40e0;(function(_0xb176b9,_0x5e686e){const _0x4ff845=a163_0x40e0,_0x2370e6=_0xb176b9();while(!![]){try{const _0x21e9af=-parseInt(_0x4ff845(0x106))/0x1+-parseInt(_0x4ff845(0x117))/0x2*(parseInt(_0x4ff845(0x107))/0x3)+parseInt(_0x4ff845(0x116))/0x4*(parseInt(_0x4ff845(0xff))/0x5)+-parseInt(_0x4ff845(0x108))/0x6+parseInt(_0x4ff845(0x109))/0x7*(parseInt(_0x4ff845(0x105))/0x8)+parseInt(_0x4ff845(0x111))/0x9+parseInt(_0x4ff845(0x10c))/0xa;if(_0x21e9af===_0x5e686e)break;else _0x2370e6['push'](_0x2370e6['shift']());}catch(_0x5285bd){_0x2370e6['push'](_0x2370e6['shift']());}}}(a163_0xf64f,0xa10c3));import{createAppRole}from'../../core/api-client.js';function a163_0x40e0(_0x2e859d,_0x667be2){_0x2e859d=_0x2e859d-0xfe;const _0xf64fec=a163_0xf64f();let _0x40e0bc=_0xf64fec[_0x2e859d];return _0x40e0bc;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a163_0x7bdea0(0x101);function a163_0xf64f(){const _0x1d9503=['role','Created\x20role\x20','8465Nrytob','flagMissing','/smartapi/permit/role/create','create','str','remark','21416wgHQDc','452419wAoRaN','435PQBDjR','6474930gVBhqs','1127YpIuYa','validation','appCode','14214070mkcNXP','length','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','\x20(id=','trim','554931fdzbrK','write','name','Pass\x20--name\x20<roleName>.','CUSTOM','1796GMftjG','6662DJXIZC','POST'];a163_0xf64f=function(){return _0x1d9503;};return a163_0xf64f();}function readName(_0x47da2e){const _0x9078d0=a163_0x7bdea0,_0x54077a=_0x47da2e[_0x9078d0(0x103)](_0x9078d0(0x113))['trim']();if(!_0x54077a)throw CliErrors[_0x9078d0(0x100)](_0x9078d0(0x113),_0x9078d0(0x114));if(_0x54077a[_0x9078d0(0x10d)]>0x40)throw CliErrors[_0x9078d0(0x10a)](_0x9078d0(0x10e));return _0x54077a;}export const roleCreate={'service':a163_0x7bdea0(0x119),'command':'create','description':'Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','risk':a163_0x7bdea0(0x112),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1c1f7a){readName(_0x1c1f7a);},async 'dryRun'(_0x17629d){const _0x4ad3b8=a163_0x7bdea0,_0x57bfdb=readName(_0x17629d),_0x190258=_0x17629d[_0x4ad3b8(0x103)]('remark')[_0x4ad3b8(0x110)]()||undefined;return asDryRunResult({'operation':'create','selector':{'appCode':_0x17629d[_0x4ad3b8(0x10b)],'roleName':_0x57bfdb},'before':null,'after':{'roleName':_0x57bfdb,'roleType':_0x4ad3b8(0x115),'remark':_0x190258},'dryRun':!![],'backend':{'method':_0x4ad3b8(0x118),'path':CREATE_PATH},'warnings':[]},{'method':_0x4ad3b8(0x118),'url':CREATE_PATH});},async 'execute'(_0x3f55b5){const _0x5a1933=a163_0x7bdea0,_0x3c86df=readName(_0x3f55b5),_0x5b0c6a=_0x3f55b5['str'](_0x5a1933(0x104))['trim']()||undefined,_0x196cb8=await createAppRole({'appCode':_0x3f55b5['appCode'],'roleName':_0x3c86df,..._0x5b0c6a?{'remark':_0x5b0c6a}:{}});return{'ok':!![],'data':{'operation':_0x5a1933(0x102),'selector':{'appCode':_0x3f55b5['appCode'],'roleId':_0x196cb8['id'],'roleName':_0x3c86df},'before':null,'after':projectRole(_0x196cb8),'dryRun':![],'backend':{'method':_0x5a1933(0x118),'path':CREATE_PATH},'warnings':[]},'message':_0x5a1933(0xfe)+_0x196cb8['roleName']+_0x5a1933(0x10f)+_0x196cb8['id']+')'};}};
@@ -1 +1 @@
1
- const a164_0x51a89b=a164_0x5012;(function(_0x1a4b0a,_0x40b852){const _0x4cd205=a164_0x5012,_0x528744=_0x1a4b0a();while(!![]){try{const _0x2ec956=-parseInt(_0x4cd205(0x170))/0x1*(-parseInt(_0x4cd205(0x174))/0x2)+parseInt(_0x4cd205(0x178))/0x3*(parseInt(_0x4cd205(0x175))/0x4)+parseInt(_0x4cd205(0x180))/0x5*(parseInt(_0x4cd205(0x16e))/0x6)+parseInt(_0x4cd205(0x179))/0x7*(-parseInt(_0x4cd205(0x177))/0x8)+parseInt(_0x4cd205(0x173))/0x9*(-parseInt(_0x4cd205(0x183))/0xa)+-parseInt(_0x4cd205(0x181))/0xb+parseInt(_0x4cd205(0x17d))/0xc;if(_0x2ec956===_0x40b852)break;else _0x528744['push'](_0x528744['shift']());}catch(_0x260b05){_0x528744['push'](_0x528744['shift']());}}}(a164_0x307c,0x94959));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a164_0x5012(_0x363d95,_0x460893){_0x363d95=_0x363d95-0x16e;const _0x307c26=a164_0x307c();let _0x5012f0=_0x307c26[_0x363d95];return _0x5012f0;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a164_0x307c(){const _0x4c1771=['4226035QZeyRV','appCode','30yTfrKv','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','8226ftdPgh','num','101SKHtMb','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','userCount','3601413JlurkK','23378KsWsDa','2276ZVAbfM','delete','4454768nhvLaL','1335yuSPII','14hTMRgS','Role\x20still\x20has\x20','\x20(id=','roleName','10023696TMbWRQ','POST','role','3785DHTFmy'];a164_0x307c=function(){return _0x4c1771;};return a164_0x307c();}const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a164_0x51a89b(0x17f),'command':a164_0x51a89b(0x176),'description':a164_0x51a89b(0x171),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1dbb0c){const _0x1106ca=a164_0x51a89b,_0x445ddf=_0x1dbb0c[_0x1106ca(0x16f)]('id'),_0x1486bf=await getRoleById(_0x1dbb0c['appCode'],_0x445ddf);return assertCustomRole(_0x1486bf,'delete'),asDryRunResult({'operation':'delete','selector':{'appCode':_0x1dbb0c['appCode'],'roleId':_0x445ddf,'roleName':_0x1486bf['roleName']},'before':projectRole(_0x1486bf),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1486bf[_0x1106ca(0x172)]>0x0?[_0x1106ca(0x17a)+_0x1486bf[_0x1106ca(0x172)]+_0x1106ca(0x184)]:[]},{'method':_0x1106ca(0x17e),'url':DELETE_PATH});},async 'execute'(_0x3aefd2){const _0x459b0a=a164_0x51a89b,_0xe93427=_0x3aefd2[_0x459b0a(0x16f)]('id'),_0x3ec44e=await getRoleById(_0x3aefd2[_0x459b0a(0x182)],_0xe93427);return assertCustomRole(_0x3ec44e,_0x459b0a(0x176)),await deleteAppRole(_0xe93427),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0x3aefd2[_0x459b0a(0x182)],'roleId':_0xe93427,'roleName':_0x3ec44e[_0x459b0a(0x17c)]},'before':projectRole(_0x3ec44e),'after':null,'dryRun':![],'backend':{'method':_0x459b0a(0x17e),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x3ec44e[_0x459b0a(0x17c)]+_0x459b0a(0x17b)+_0xe93427+')'};}};
1
+ const a164_0x393b92=a164_0x2577;function a164_0x2577(_0x453ff9,_0x5c4db0){_0x453ff9=_0x453ff9-0x1e2;const _0x214547=a164_0x2145();let _0x25779b=_0x214547[_0x453ff9];return _0x25779b;}(function(_0x30ff5a,_0x48c83f){const _0x248476=a164_0x2577,_0x1b3306=_0x30ff5a();while(!![]){try{const _0x3f695e=parseInt(_0x248476(0x1e9))/0x1*(-parseInt(_0x248476(0x1ea))/0x2)+-parseInt(_0x248476(0x1f2))/0x3*(parseInt(_0x248476(0x1f7))/0x4)+parseInt(_0x248476(0x1e4))/0x5+-parseInt(_0x248476(0x1f6))/0x6+-parseInt(_0x248476(0x1ed))/0x7+parseInt(_0x248476(0x1e2))/0x8*(-parseInt(_0x248476(0x1e5))/0x9)+parseInt(_0x248476(0x1ef))/0xa*(parseInt(_0x248476(0x1ec))/0xb);if(_0x3f695e===_0x48c83f)break;else _0x1b3306['push'](_0x1b3306['shift']());}catch(_0xf558f4){_0x1b3306['push'](_0x1b3306['shift']());}}}(a164_0x2145,0xb8f8a));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=a164_0x393b92(0x1ee);export const roleDelete={'service':a164_0x393b92(0x1f1),'command':a164_0x393b92(0x1e3),'description':a164_0x393b92(0x1e6),'risk':a164_0x393b92(0x1f4),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3ac3d1){const _0x1366ee=a164_0x393b92,_0x530fc8=_0x3ac3d1[_0x1366ee(0x1f3)]('id'),_0x3f7ebc=await getRoleById(_0x3ac3d1['appCode'],_0x530fc8);return assertCustomRole(_0x3f7ebc,_0x1366ee(0x1e3)),asDryRunResult({'operation':_0x1366ee(0x1e3),'selector':{'appCode':_0x3ac3d1['appCode'],'roleId':_0x530fc8,'roleName':_0x3f7ebc['roleName']},'before':projectRole(_0x3f7ebc),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x3f7ebc['userCount']>0x0?[_0x1366ee(0x1f8)+_0x3f7ebc[_0x1366ee(0x1f0)]+_0x1366ee(0x1e7)]:[]},{'method':_0x1366ee(0x1eb),'url':DELETE_PATH});},async 'execute'(_0x3e3803){const _0x3218cf=a164_0x393b92,_0x45c2c7=_0x3e3803['num']('id'),_0x3904c0=await getRoleById(_0x3e3803[_0x3218cf(0x1e8)],_0x45c2c7);return assertCustomRole(_0x3904c0,'delete'),await deleteAppRole(_0x45c2c7),{'ok':!![],'data':{'operation':_0x3218cf(0x1e3),'selector':{'appCode':_0x3e3803[_0x3218cf(0x1e8)],'roleId':_0x45c2c7,'roleName':_0x3904c0[_0x3218cf(0x1f5)]},'before':projectRole(_0x3904c0),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x3904c0['roleName']+'\x20(id='+_0x45c2c7+')'};}};function a164_0x2145(){const _0x335b58=['Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','appCode','4358UkzeKo','214AktZVq','POST','11DGBsqs','953974ljOAJG','/smartapi/permit/role/delete','11523450cOprfP','userCount','role','99GcrgOL','num','high-risk-write','roleName','1177464ihiZEm','39992WpcRzg','Role\x20still\x20has\x20','4474344wdjSaX','delete','6466780kFyBaw','9XgCmJG'];a164_0x2145=function(){return _0x335b58;};return a164_0x2145();}
@@ -1 +1 @@
1
- const a165_0x5e41f2=a165_0x722a;function a165_0x722a(_0x45c9cc,_0x2f4190){_0x45c9cc=_0x45c9cc-0x1dc;const _0x530725=a165_0x5307();let _0x722ac7=_0x530725[_0x45c9cc];return _0x722ac7;}(function(_0x421173,_0x593a71){const _0x2bb806=a165_0x722a,_0x3e19b2=_0x421173();while(!![]){try{const _0x814b8d=-parseInt(_0x2bb806(0x1e6))/0x1*(parseInt(_0x2bb806(0x1df))/0x2)+-parseInt(_0x2bb806(0x1dd))/0x3+parseInt(_0x2bb806(0x1e0))/0x4+-parseInt(_0x2bb806(0x1e2))/0x5+parseInt(_0x2bb806(0x1e4))/0x6+-parseInt(_0x2bb806(0x1eb))/0x7*(-parseInt(_0x2bb806(0x1e8))/0x8)+-parseInt(_0x2bb806(0x1e5))/0x9*(-parseInt(_0x2bb806(0x1dc))/0xa);if(_0x814b8d===_0x593a71)break;else _0x3e19b2['push'](_0x3e19b2['shift']());}catch(_0x1e2eb4){_0x3e19b2['push'](_0x3e19b2['shift']());}}}(a165_0x5307,0xb459d));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a165_0x5307(){const _0xbdb73e=['role','read','41780ehkUhC','3924858oJrtEt','detail','2YwTcPa','1717604fiQXCr','Role\x20','4366810JiEqsS','appCode','7421196pIJPsh','2700FmnImk','265678kbLFFa','Show\x20a\x20single\x20role\x27s\x20detail','24OjGapA','roleName','roleType','621544cUuIQz'];a165_0x5307=function(){return _0xbdb73e;};return a165_0x5307();}export const roleDetail={'service':a165_0x5e41f2(0x1ec),'command':a165_0x5e41f2(0x1de),'description':a165_0x5e41f2(0x1e7),'risk':a165_0x5e41f2(0x1ed),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4950dc){const _0x459ac0=a165_0x5e41f2,_0xcdd6fc=_0x4950dc['num']('id'),_0xeeeea5=await getRoleById(_0x4950dc[_0x459ac0(0x1e3)],_0xcdd6fc);return{'ok':!![],'data':{'role':projectRole(_0xeeeea5)},'message':_0x459ac0(0x1e1)+_0xeeeea5[_0x459ac0(0x1e9)]+'\x20('+_0xeeeea5[_0x459ac0(0x1ea)]+')'};}};
1
+ const a165_0x14af5f=a165_0x4bc4;function a165_0xeb48(){const _0x51d5ab=['1174868NPLmsF','num','appCode','detail','roleType','roleName','1576595jqeeYn','12164080fqKKKP','role','3631398HbtkQJ','15900YZgkbT','416971VYIbwa','2329880pDeHuc','Role\x20','62sGhwla','Show\x20a\x20single\x20role\x27s\x20detail'];a165_0xeb48=function(){return _0x51d5ab;};return a165_0xeb48();}(function(_0x3fae6b,_0x31301a){const _0x632cf5=a165_0x4bc4,_0xcf749e=_0x3fae6b();while(!![]){try{const _0x33ca64=-parseInt(_0x632cf5(0x1bb))/0x1+-parseInt(_0x632cf5(0x1be))/0x2*(-parseInt(_0x632cf5(0x1ba))/0x3)+-parseInt(_0x632cf5(0x1c0))/0x4+parseInt(_0x632cf5(0x1c6))/0x5+-parseInt(_0x632cf5(0x1c9))/0x6+-parseInt(_0x632cf5(0x1bc))/0x7+parseInt(_0x632cf5(0x1c7))/0x8;if(_0x33ca64===_0x31301a)break;else _0xcf749e['push'](_0xcf749e['shift']());}catch(_0x50afce){_0xcf749e['push'](_0xcf749e['shift']());}}}(a165_0xeb48,0x55c88));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a165_0x4bc4(_0x4907bd,_0x323458){_0x4907bd=_0x4907bd-0x1ba;const _0xeb48a2=a165_0xeb48();let _0x4bc451=_0xeb48a2[_0x4907bd];return _0x4bc451;}export const roleDetail={'service':a165_0x14af5f(0x1c8),'command':a165_0x14af5f(0x1c3),'description':a165_0x14af5f(0x1bf),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2c677c){const _0x3b0a75=a165_0x14af5f,_0x25966f=_0x2c677c[_0x3b0a75(0x1c1)]('id'),_0x3eb01b=await getRoleById(_0x2c677c[_0x3b0a75(0x1c2)],_0x25966f);return{'ok':!![],'data':{'role':projectRole(_0x3eb01b)},'message':_0x3b0a75(0x1bd)+_0x3eb01b[_0x3b0a75(0x1c5)]+'\x20('+_0x3eb01b[_0x3b0a75(0x1c4)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x34aef9,_0x131989){const _0x14a1bb=a166_0x4002,_0x302d0e=_0x34aef9();while(!![]){try{const _0x5379cd=parseInt(_0x14a1bb(0x110))/0x1*(-parseInt(_0x14a1bb(0x10f))/0x2)+-parseInt(_0x14a1bb(0x112))/0x3+parseInt(_0x14a1bb(0x111))/0x4*(parseInt(_0x14a1bb(0x10c))/0x5)+parseInt(_0x14a1bb(0x10e))/0x6+-parseInt(_0x14a1bb(0x10d))/0x7+parseInt(_0x14a1bb(0x10b))/0x8+parseInt(_0x14a1bb(0x113))/0x9;if(_0x5379cd===_0x131989)break;else _0x302d0e['push'](_0x302d0e['shift']());}catch(_0x3714de){_0x302d0e['push'](_0x302d0e['shift']());}}}(a166_0xe547,0x961b4));function a166_0x4002(_0x5aa227,_0xecb253){_0x5aa227=_0x5aa227-0x10b;const _0xe547e7=a166_0xe547();let _0x400250=_0xe547e7[_0x5aa227];return _0x400250;}import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.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';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];function a166_0xe547(){const _0x102b02=['5eimAhC','3075632WNGsdw','7363314DLelyQ','2kHrjvr','1107767lBFEob','766252LKpiuZ','598836QJclcR','3524949lVNwUc','4409184WwDMDm'];a166_0xe547=function(){return _0x102b02;};return a166_0xe547();}
1
+ (function(_0x1fe42b,_0x1ff2e1){const _0x49f303=a166_0x28cf,_0x4f4783=_0x1fe42b();while(!![]){try{const _0x470f78=-parseInt(_0x49f303(0x8e))/0x1+-parseInt(_0x49f303(0x89))/0x2*(-parseInt(_0x49f303(0x8a))/0x3)+parseInt(_0x49f303(0x90))/0x4+parseInt(_0x49f303(0x88))/0x5*(-parseInt(_0x49f303(0x8c))/0x6)+parseInt(_0x49f303(0x8b))/0x7+-parseInt(_0x49f303(0x8f))/0x8*(-parseInt(_0x49f303(0x8d))/0x9)+-parseInt(_0x49f303(0x91))/0xa*(parseInt(_0x49f303(0x92))/0xb);if(_0x470f78===_0x1ff2e1)break;else _0x4f4783['push'](_0x4f4783['shift']());}catch(_0xed772d){_0x4f4783['push'](_0x4f4783['shift']());}}}(a166_0x26ef,0xeee1e));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';function a166_0x26ef(){const _0x2dda18=['48MAIJJX','128989oEtdZk','5245518HvZfHd','9TDZQsK','1723360QBamjY','13567672pcIWtR','7809640hLoups','3198830HotUJU','33XipjEK','5mnJXBq','108616XuKVGv'];a166_0x26ef=function(){return _0x2dda18;};return a166_0x26ef();}import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';function a166_0x28cf(_0x59abd8,_0x23ce2d){_0x59abd8=_0x59abd8-0x88;const _0x26ef18=a166_0x26ef();let _0x28cf87=_0x26ef18[_0x59abd8];return _0x28cf87;}import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a167_0x54cc0a=a167_0x3e4a;(function(_0x3e1839,_0x194974){const _0x834bc7=a167_0x3e4a,_0x2e1933=_0x3e1839();while(!![]){try{const _0x46b6ba=parseInt(_0x834bc7(0xf3))/0x1+-parseInt(_0x834bc7(0xe1))/0x2+parseInt(_0x834bc7(0xee))/0x3+-parseInt(_0x834bc7(0xef))/0x4*(parseInt(_0x834bc7(0xdc))/0x5)+parseInt(_0x834bc7(0xe8))/0x6*(-parseInt(_0x834bc7(0xeb))/0x7)+parseInt(_0x834bc7(0xe3))/0x8*(-parseInt(_0x834bc7(0xce))/0x9)+parseInt(_0x834bc7(0xd2))/0xa*(parseInt(_0x834bc7(0xd1))/0xb);if(_0x46b6ba===_0x194974)break;else _0x2e1933['push'](_0x2e1933['shift']());}catch(_0x55a18f){_0x2e1933['push'](_0x2e1933['shift']());}}}(a167_0x5962,0xcb31e));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a167_0x3e4a(_0x1f604f,_0x504a84){_0x1f604f=_0x1f604f-0xce;const _0x5962f8=a167_0x5962();let _0x3e4a02=_0x5962f8[_0x1f604f];return _0x3e4a02;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a167_0x54cc0a(0xe2),a167_0x54cc0a(0xf1),a167_0x54cc0a(0xd7),'CUSTOM'];function a167_0x5962(){const _0x15712f=['join','trim','11CAbGKV','47849210UMLIiq','includes','Found\x20','\x20role(s)','filter','USER','num','type','Filter\x20by\x20role\x20type','validation','1205SUgDGf','roleType','toUpperCase','appCode','role','3227484LzLUPG','ADMIN','11665992UsrSJq','map','list','pagesize','number','12978VexmkQ','string','Invalid\x20--type\x20\x22','3115mVVrDM','page','str','679722KdVrky','17628evoqJC','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','DEV','Page\x20size\x20(1-100)','917404oTECvd','length','9yCSmMk'];a167_0x5962=function(){return _0x15712f;};return a167_0x5962();}export const roleList={'service':a167_0x54cc0a(0xe0),'command':a167_0x54cc0a(0xe5),'description':a167_0x54cc0a(0xf0),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a167_0x54cc0a(0xd9),'type':a167_0x54cc0a(0xe9),'required':![],'description':a167_0x54cc0a(0xda),'enum':ROLE_TYPES},{'name':a167_0x54cc0a(0xec),'type':a167_0x54cc0a(0xe7),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':'pagesize','type':a167_0x54cc0a(0xe7),'description':a167_0x54cc0a(0xf2),'default':0x64}],async 'validate'(_0x4ea334){const _0x3ac19c=a167_0x54cc0a,_0x2e0915=_0x4ea334[_0x3ac19c(0xed)](_0x3ac19c(0xd9))[_0x3ac19c(0xd0)]();if(_0x2e0915&&!ROLE_TYPES[_0x3ac19c(0xd3)](_0x2e0915[_0x3ac19c(0xde)]()))throw CliErrors['validation'](_0x3ac19c(0xea)+_0x2e0915+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x3ac19c(0xcf)](',\x20')+'.');const _0x4057b6=_0x4ea334[_0x3ac19c(0xd8)](_0x3ac19c(0xec),0x1),_0xecd8de=_0x4ea334[_0x3ac19c(0xd8)]('pagesize',0x64);if(_0x4057b6<0x1)throw CliErrors['validation']('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0xecd8de<0x1||_0xecd8de>0x64)throw CliErrors[_0x3ac19c(0xdb)]('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x499b0e){const _0x428e90=a167_0x54cc0a,_0x1be5eb=_0x499b0e[_0x428e90(0xd8)](_0x428e90(0xec),0x1)||0x1,_0x4eb06e=_0x499b0e['num'](_0x428e90(0xe6),0x64)||0x64,_0x7a0b20=_0x499b0e[_0x428e90(0xed)](_0x428e90(0xd9))[_0x428e90(0xd0)]()[_0x428e90(0xde)](),{items:_0x4b6150,paging:_0x1426af}=await listAppRoles(_0x499b0e[_0x428e90(0xdf)],{'currentPage':_0x1be5eb,'pageSize':_0x4eb06e}),_0x350b5e=_0x7a0b20?_0x4b6150[_0x428e90(0xd6)](_0x45e1da=>_0x45e1da[_0x428e90(0xdd)]===_0x7a0b20):_0x4b6150,_0x472a27=_0x350b5e[_0x428e90(0xe4)](projectRole);return{'ok':!![],'data':{'roles':_0x472a27,'paging':_0x1426af},'message':_0x428e90(0xd4)+_0x472a27[_0x428e90(0xf4)]+_0x428e90(0xd5)};}};
1
+ const a167_0x407a8f=a167_0x1e57;(function(_0x57a6ae,_0x39a649){const _0x15fd89=a167_0x1e57,_0x41f2b1=_0x57a6ae();while(!![]){try{const _0x4b668b=-parseInt(_0x15fd89(0xf7))/0x1*(-parseInt(_0x15fd89(0x106))/0x2)+-parseInt(_0x15fd89(0x118))/0x3*(-parseInt(_0x15fd89(0x10e))/0x4)+-parseInt(_0x15fd89(0x10b))/0x5*(-parseInt(_0x15fd89(0xfe))/0x6)+-parseInt(_0x15fd89(0x101))/0x7*(parseInt(_0x15fd89(0x10c))/0x8)+-parseInt(_0x15fd89(0x11c))/0x9*(-parseInt(_0x15fd89(0x105))/0xa)+parseInt(_0x15fd89(0x107))/0xb*(-parseInt(_0x15fd89(0xfa))/0xc)+-parseInt(_0x15fd89(0x100))/0xd;if(_0x4b668b===_0x39a649)break;else _0x41f2b1['push'](_0x41f2b1['shift']());}catch(_0x10ef2d){_0x41f2b1['push'](_0x41f2b1['shift']());}}}(a167_0x258f,0xf170b));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a167_0x1e57(_0x3fe0d0,_0x3c5af9){_0x3fe0d0=_0x3fe0d0-0xf5;const _0x258fd5=a167_0x258f();let _0x1e571e=_0x258fd5[_0x3fe0d0];return _0x1e571e;}function a167_0x258f(){const _0x5ea75c=['12UTaMUS','Page\x20index\x20(1-based)','16684096MHgAtc','672SblSCI','map','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','2309420ELsPsu','4qlPOYX','6588362yoTtXX','length','USER','join','1876115DWfMyM','80072vDHLtq','number','5036OORtna','num','string','read','trim','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','validation','page','Found\x20','ADMIN','21bBAcqz','\x20role(s)','pagesize','str','54JfWGdP','type','CUSTOM','appCode','includes','843613oYhmTw','toUpperCase','DEV','12BwhMJJ','Use\x20one\x20of:\x20','Invalid\x20--type\x20\x22','filter'];a167_0x258f=function(){return _0x5ea75c;};return a167_0x258f();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a167_0x407a8f(0x117),a167_0x407a8f(0xf9),a167_0x407a8f(0x109),a167_0x407a8f(0x11e)];export const roleList={'service':'role','command':'list','description':a167_0x407a8f(0x103),'risk':a167_0x407a8f(0x111),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a167_0x407a8f(0x11d),'type':a167_0x407a8f(0x110),'required':![],'description':'Filter\x20by\x20role\x20type','enum':ROLE_TYPES},{'name':a167_0x407a8f(0x115),'type':a167_0x407a8f(0x10d),'description':a167_0x407a8f(0xff),'default':0x1},{'name':'pagesize','type':a167_0x407a8f(0x10d),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x354c61){const _0x458800=a167_0x407a8f,_0x5ba450=_0x354c61['str'](_0x458800(0x11d))[_0x458800(0x112)]();if(_0x5ba450&&!ROLE_TYPES[_0x458800(0xf6)](_0x5ba450[_0x458800(0xf8)]()))throw CliErrors[_0x458800(0x114)](_0x458800(0xfc)+_0x5ba450+'\x22.',_0x458800(0xfb)+ROLE_TYPES[_0x458800(0x10a)](',\x20')+'.');const _0x1c0e78=_0x354c61[_0x458800(0x10f)]('page',0x1),_0xd922c0=_0x354c61['num'](_0x458800(0x11a),0x64);if(_0x1c0e78<0x1)throw CliErrors['validation'](_0x458800(0x113));if(_0xd922c0<0x1||_0xd922c0>0x64)throw CliErrors[_0x458800(0x114)](_0x458800(0x104));},async 'execute'(_0x8bd5e6){const _0x49cc38=a167_0x407a8f,_0x50a85f=_0x8bd5e6[_0x49cc38(0x10f)](_0x49cc38(0x115),0x1)||0x1,_0x2f90f7=_0x8bd5e6[_0x49cc38(0x10f)](_0x49cc38(0x11a),0x64)||0x64,_0x552708=_0x8bd5e6[_0x49cc38(0x11b)](_0x49cc38(0x11d))[_0x49cc38(0x112)]()[_0x49cc38(0xf8)](),{items:_0x38beed,paging:_0x5118f6}=await listAppRoles(_0x8bd5e6[_0x49cc38(0xf5)],{'currentPage':_0x50a85f,'pageSize':_0x2f90f7}),_0xbfccd0=_0x552708?_0x38beed[_0x49cc38(0xfd)](_0x5134b8=>_0x5134b8['roleType']===_0x552708):_0x38beed,_0x437ff5=_0xbfccd0[_0x49cc38(0x102)](projectRole);return{'ok':!![],'data':{'roles':_0x437ff5,'paging':_0x5118f6},'message':_0x49cc38(0x116)+_0x437ff5[_0x49cc38(0x108)]+_0x49cc38(0x119)};}};
@@ -1 +1 @@
1
- const a168_0x4854d6=a168_0xb324;(function(_0x3e91d4,_0x5ea9dd){const _0x91ec0a=a168_0xb324,_0x40d3b6=_0x3e91d4();while(!![]){try{const _0x3cc5f5=-parseInt(_0x91ec0a(0x135))/0x1+-parseInt(_0x91ec0a(0x116))/0x2+parseInt(_0x91ec0a(0x124))/0x3+-parseInt(_0x91ec0a(0x145))/0x4*(-parseInt(_0x91ec0a(0x141))/0x5)+-parseInt(_0x91ec0a(0x12a))/0x6+-parseInt(_0x91ec0a(0x14f))/0x7*(parseInt(_0x91ec0a(0x13b))/0x8)+parseInt(_0x91ec0a(0x123))/0x9;if(_0x3cc5f5===_0x5ea9dd)break;else _0x40d3b6['push'](_0x40d3b6['shift']());}catch(_0x3462c4){_0x40d3b6['push'](_0x40d3b6['shift']());}}}(a168_0xec25,0x45746));import{getAppRole,getTenantMembers,listAppRoles,listRoleUsers}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';function a168_0xb324(_0x51f52c,_0x551ebf){_0x51f52c=_0x51f52c-0x102;const _0xec25f4=a168_0xec25();let _0xb324ef=_0xec25f4[_0x51f52c];return _0xb324ef;}export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};export const ROLE_REF_FLAG={'name':a168_0x4854d6(0x121),'type':a168_0x4854d6(0x10d),'required':!![],'description':'Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)'};export const USER_REF_FLAG={'name':a168_0x4854d6(0x11b),'type':a168_0x4854d6(0x10d),'required':!![],'description':a168_0x4854d6(0x13d)};export const NAME_FLAG={'name':a168_0x4854d6(0x115),'type':a168_0x4854d6(0x10d),'required':!![],'description':a168_0x4854d6(0x133)};export const USER_NAME_FLAG={'name':a168_0x4854d6(0x115),'type':a168_0x4854d6(0x10d),'required':!![],'description':a168_0x4854d6(0x125)};export const REMARK_FLAG={'name':a168_0x4854d6(0x136),'type':'string','required':![],'description':a168_0x4854d6(0x109)};export const EXPECT_USER_COUNT_FLAG={'name':a168_0x4854d6(0x137),'type':a168_0x4854d6(0x149),'required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=[a168_0x4854d6(0x139),a168_0x4854d6(0x112),'USER'];export function isBuiltinRole(_0x23ffbf){const _0x450d05=a168_0x4854d6;return BUILTIN_ROLE_TYPES[_0x450d05(0x132)](_0x23ffbf);}export function assertCustomRole(_0x5d4d46,_0x4b091c){const _0x3983ed=a168_0x4854d6;if(_0x5d4d46[_0x3983ed(0x14e)]!==_0x3983ed(0x11e))throw CliErrors['validation'](_0x3983ed(0x129)+_0x4b091c+_0x3983ed(0x120)+_0x5d4d46[_0x3983ed(0x10e)]+'\x20('+_0x5d4d46[_0x3983ed(0x14e)]+').',_0x3983ed(0x148));}export function assertPermConfigurable(_0x4570cd){const _0x17e33f=a168_0x4854d6;if(_0x4570cd['roleType']===_0x17e33f(0x112)||_0x4570cd[_0x17e33f(0x14e)]===_0x17e33f(0x139))throw CliErrors['validation'](_0x17e33f(0x13e)+_0x4570cd[_0x17e33f(0x10e)]+'\x20('+_0x4570cd[_0x17e33f(0x14e)]+').',_0x17e33f(0x102));}export function projectRole(_0x26a57a){const _0x596efe=a168_0x4854d6;return{'id':_0x26a57a['id'],'roleName':_0x26a57a[_0x596efe(0x10e)],'roleType':_0x26a57a[_0x596efe(0x14e)],'remark':_0x26a57a['remark'],'userCount':_0x26a57a[_0x596efe(0x147)],'permitCount':_0x26a57a[_0x596efe(0x14d)],'builtin':isBuiltinRole(_0x26a57a[_0x596efe(0x14e)])};}export async function resolveRoleRef(_0x114744,_0x4f25d1){const _0x2ac675=a168_0x4854d6,_0x49c3ec=_0x4f25d1[_0x2ac675(0x14b)]();if(!_0x49c3ec)throw CliErrors['validation'](_0x2ac675(0x10c),_0x2ac675(0x117));if(/^\d+$/[_0x2ac675(0x119)](_0x49c3ec))return getRoleById(_0x114744,Number(_0x49c3ec));const _0x1c28a5=await listAllAppRoles(_0x114744),_0xc90c9c=_0x1c28a5['filter'](_0x548bcd=>_0x548bcd[_0x2ac675(0x10e)]===_0x49c3ec);if(_0xc90c9c[_0x2ac675(0x10f)]===0x0)throw CliErrors['validation']('Role\x20name\x20\x22'+_0x49c3ec+_0x2ac675(0x104)+_0x114744+'.',_0x2ac675(0x134));if(_0xc90c9c[_0x2ac675(0x10f)]>0x1){const _0x8a490e=_0xc90c9c[_0x2ac675(0x11a)](_0x5ce363=>_0x5ce363['id'])[_0x2ac675(0x142)](',\x20');throw CliErrors[_0x2ac675(0x127)]('Role\x20name\x20\x22'+_0x49c3ec+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x8a490e+').',_0x2ac675(0x118));}return _0xc90c9c[0x0];}export async function getRoleById(_0x3d5fe4,_0x449692){const _0x5c2aaa=a168_0x4854d6,_0x3c5833=await getAppRole(_0x449692);if(!_0x3c5833)throw CliErrors[_0x5c2aaa(0x127)](_0x5c2aaa(0x103)+_0x449692+'\x20not\x20found\x20in\x20app\x20'+_0x3d5fe4+'.',_0x5c2aaa(0x107));return _0x3c5833;}async function listAllAppRoles(_0x32d104){const _0xce6e31=a168_0x4854d6,_0x141b4e=0x64,_0x50d143=[];for(let _0x101c26=0x1;;_0x101c26+=0x1){const {items:_0xa9f0c1,paging:_0x370f31}=await listAppRoles(_0x32d104,{'currentPage':_0x101c26,'pageSize':_0x141b4e});_0x50d143[_0xce6e31(0x131)](..._0xa9f0c1);if(_0xa9f0c1[_0xce6e31(0x10f)]<_0x141b4e||_0x370f31&&_0x50d143['length']>=_0x370f31[_0xce6e31(0x144)])return _0x50d143;}}function a168_0xec25(){const _0x42c92e=['No\x20tenant\x20member\x20matches\x20\x22','\x20member(s)\x20but\x20role\x20has\x20','nickname','push','includes','Role\x20name','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','459455vBhJoV','remark','expect-user-count','\x20not\x20found\x20in\x20the\x20user-role\x20list.','ADMIN','Pass\x20--user\x20<id|name>.','8ePJGzK','userList','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20','findIndex','userId','25niqGhH','join','\x20is\x20not\x20a\x20member\x20of\x20role\x20','totalCount','58172tGDIDP','toLowerCase','userCount','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','number','appCode','trim','splice','permitCount','roleType','1333031kamNsI','user-add','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.','Role\x20id\x20','\x22\x20not\x20found\x20in\x20app\x20','\x22:\x20','/smartapi/permit/user-role/update-user-list','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','str','Optional\x20role\x20remark/description','expectUserCount','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','Missing\x20role\x20reference.','string','roleName','length','flag','authRequired','DEV','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.',';\x20no\x20change.','name','193020cUaFjE','Pass\x20--role\x20<id|name>.','Disambiguate\x20with\x20--role\x20<id>.','test','map','user','dryRun','find','CUSTOM','\x20is\x20already\x20a\x20member\x20of\x20role\x20','\x20built-in\x20role\x20','role','tenant_code','7203924OqhQrq','922503jYaeoz','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','Anti-drift\x20check\x20failed:\x20expected\x20','validation','flagMissing','Cannot\x20','898608SHOyON','User\x20','Disambiguate\x20with\x20--user\x20<id>.','username'];a168_0xec25=function(){return _0x42c92e;};return a168_0xec25();}export async function resolveTenantCode(){const _0x2272b7=a168_0x4854d6,_0x55fc7f=await getSessionUserInfo(),_0x1b7ef2=_0x55fc7f?.[_0x2272b7(0x11b)]?.['tenant']?.[_0x2272b7(0x122)];if(!_0x1b7ef2)throw CliErrors[_0x2272b7(0x111)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x1b7ef2;}function matchMember(_0x5c4db1,_0x56b4bc){const _0x805e=a168_0x4854d6,_0x333f14=_0x56b4bc[_0x805e(0x14b)]()[_0x805e(0x146)]();return(_0x5c4db1['nickname']??'')[_0x805e(0x146)]()===_0x333f14||(_0x5c4db1['username']??'')[_0x805e(0x146)]()===_0x333f14;}export async function resolveUserRef(_0x417be2){const _0x739dd5=a168_0x4854d6,_0x4a4e7d=_0x417be2[_0x739dd5(0x14b)]();if(!_0x4a4e7d)throw CliErrors[_0x739dd5(0x127)]('Missing\x20user\x20reference.',_0x739dd5(0x13a));const _0x4bff62=await resolveTenantCode(),_0x5c12bd=await getTenantMembers(_0x4bff62);if(/^\d+$/[_0x739dd5(0x119)](_0x4a4e7d)){const _0x37a8bc=Number(_0x4a4e7d),_0x192e57=_0x5c12bd[_0x739dd5(0x11d)](_0x29e06b=>_0x29e06b['userId']===_0x37a8bc);return{'userId':_0x37a8bc,'username':_0x192e57?.[_0x739dd5(0x12d)]??String(_0x37a8bc),'nickname':_0x192e57?.[_0x739dd5(0x130)],'matchedBy':'id'};}const _0x1d4e2b=_0x5c12bd['filter'](_0x1f3eec=>matchMember(_0x1f3eec,_0x4a4e7d));if(_0x1d4e2b['length']===0x0)throw CliErrors['validation'](_0x739dd5(0x12e)+_0x4a4e7d+'\x22.',_0x739dd5(0x113));if(_0x1d4e2b[_0x739dd5(0x10f)]>0x1){const _0xdb3a28=_0x1d4e2b[_0x739dd5(0x11a)](_0x40915c=>(_0x40915c[_0x739dd5(0x130)]??_0x40915c[_0x739dd5(0x12d)]??'?')+'('+_0x40915c[_0x739dd5(0x140)]+')')[_0x739dd5(0x142)](',\x20');throw CliErrors[_0x739dd5(0x127)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x4a4e7d+_0x739dd5(0x105)+_0xdb3a28+'.',_0x739dd5(0x12c));}const _0x38a5ac=_0x1d4e2b[0x0];return{'userId':_0x38a5ac[_0x739dd5(0x140)],'username':_0x38a5ac[_0x739dd5(0x12d)]??String(_0x38a5ac[_0x739dd5(0x140)]),'nickname':_0x38a5ac[_0x739dd5(0x130)],'matchedBy':_0x739dd5(0x115)};}export const UPDATE_USER_LIST_PATH=a168_0x4854d6(0x106);function userIdsOf(_0x925f40){const _0x531472=a168_0x4854d6;return(_0x925f40?.[_0x531472(0x13c)]??[])[_0x531472(0x11a)](_0x4c5678=>_0x4c5678['userId']);}export function computeRoleUserMutation(_0x47b40f){const _0x5121bd=a168_0x4854d6,{operation:_0x3f9744,appCode:_0x409d49,roleUsers:_0x387746,targetRoleId:_0x1766c0,user:_0x233204}=_0x47b40f,_0x1c4009=_0x387746[_0x5121bd(0x11d)](_0x25389f=>_0x25389f['id']===_0x1766c0);if(!_0x1c4009)throw CliErrors['validation'](_0x5121bd(0x103)+_0x1766c0+_0x5121bd(0x138),_0x5121bd(0x107));const _0x2e4550=userIdsOf(_0x1c4009),_0xc47f81=[];if(_0x47b40f['expectUserCount']!==undefined&&_0x47b40f['expectUserCount']!==_0x2e4550['length'])throw CliErrors[_0x5121bd(0x127)](_0x5121bd(0x126)+_0x47b40f[_0x5121bd(0x10a)]+_0x5121bd(0x12f)+_0x2e4550[_0x5121bd(0x10f)]+'.',_0x5121bd(0x10b));const _0x32de8c=_0x2e4550['includes'](_0x233204[_0x5121bd(0x140)]);let _0x22bdfc=![];const _0x536839=[..._0x1c4009[_0x5121bd(0x13c)]];if(_0x3f9744===_0x5121bd(0x150))_0x32de8c?_0xc47f81[_0x5121bd(0x131)]('User\x20'+_0x233204[_0x5121bd(0x140)]+_0x5121bd(0x11f)+_0x1c4009['roleName']+_0x5121bd(0x114)):(_0x536839[_0x5121bd(0x131)]({'userId':_0x233204[_0x5121bd(0x140)],'username':_0x233204[_0x5121bd(0x12d)],..._0x233204['nickname']?{'nickname':_0x233204[_0x5121bd(0x130)]}:{}}),_0x22bdfc=!![]);else{if(!_0x32de8c)_0xc47f81[_0x5121bd(0x131)](_0x5121bd(0x12b)+_0x233204[_0x5121bd(0x140)]+_0x5121bd(0x143)+_0x1c4009[_0x5121bd(0x10e)]+_0x5121bd(0x114));else{const _0xd84985=_0x536839[_0x5121bd(0x13f)](_0x190af4=>_0x190af4[_0x5121bd(0x140)]===_0x233204['userId']);if(_0xd84985>=0x0)_0x536839[_0x5121bd(0x14c)](_0xd84985,0x1);_0x22bdfc=!![];}}const _0x167e0e=_0x387746['map'](_0x2fe703=>_0x2fe703['id']===_0x1766c0?{..._0x2fe703,'userList':_0x536839}:_0x2fe703),_0x440dc0=_0x536839[_0x5121bd(0x11a)](_0x50e13b=>_0x50e13b[_0x5121bd(0x140)]),_0xaf5452={'operation':_0x3f9744,'selector':{'appCode':_0x409d49,'roleId':_0x1766c0,'roleName':_0x1c4009[_0x5121bd(0x10e)],'userId':_0x233204['userId']},'before':{'userIds':_0x2e4550},'after':{'userIds':_0x440dc0},'dryRun':_0x47b40f[_0x5121bd(0x11c)],'backend':{'method':'POST','path':UPDATE_USER_LIST_PATH},'warnings':_0xc47f81};return{'roleList':_0x167e0e,'mutation':_0xaf5452,'changed':_0x22bdfc};}export async function loadRoleUsers(_0x4c1a31){return listRoleUsers(_0x4c1a31);}export function readRoleRef(_0x4bcea5){const _0x2617dd=a168_0x4854d6,_0x48c310=_0x4bcea5[_0x2617dd(0x108)](_0x2617dd(0x121))[_0x2617dd(0x14b)]();if(!_0x48c310)throw CliErrors[_0x2617dd(0x128)]('role',_0x2617dd(0x117));return _0x48c310;}export async function prepareUserMutation(_0x18cf5a,_0x2c688e,_0x3d5114){const _0x3998a4=a168_0x4854d6,_0x4fe0e5=readRoleRef(_0x18cf5a),_0x1dbcd7=_0x18cf5a[_0x3998a4(0x108)]('user')[_0x3998a4(0x14b)]();if(!_0x1dbcd7)throw CliErrors[_0x3998a4(0x128)](_0x3998a4(0x11b),_0x3998a4(0x13a));const _0xcccc26=_0x18cf5a[_0x3998a4(0x110)](_0x3998a4(0x137)),_0x1be1c9=_0xcccc26===undefined||_0xcccc26===null?undefined:Number(_0xcccc26),_0x36d8dd=await resolveRoleRef(_0x18cf5a[_0x3998a4(0x14a)],_0x4fe0e5),_0x2cf492=await resolveUserRef(_0x1dbcd7),_0x387eda=await loadRoleUsers(_0x18cf5a[_0x3998a4(0x14a)]);return computeRoleUserMutation({'operation':_0x2c688e,'appCode':_0x18cf5a[_0x3998a4(0x14a)],'roleUsers':_0x387eda,'targetRoleId':_0x36d8dd['id'],'user':{'userId':_0x2cf492['userId'],'username':_0x2cf492['username'],'nickname':_0x2cf492['nickname']},'dryRun':_0x3d5114,..._0x1be1c9!==undefined?{'expectUserCount':_0x1be1c9}:{}});}
1
+ const a168_0x174918=a168_0x326d;(function(_0xcb8909,_0x41290c){const _0x4cca78=a168_0x326d,_0x3c242a=_0xcb8909();while(!![]){try{const _0x1496f5=parseInt(_0x4cca78(0xba))/0x1+parseInt(_0x4cca78(0xab))/0x2*(-parseInt(_0x4cca78(0x97))/0x3)+-parseInt(_0x4cca78(0x8d))/0x4+-parseInt(_0x4cca78(0xb1))/0x5+-parseInt(_0x4cca78(0x7f))/0x6+parseInt(_0x4cca78(0x9d))/0x7+parseInt(_0x4cca78(0xbd))/0x8;if(_0x1496f5===_0x41290c)break;else _0x3c242a['push'](_0x3c242a['shift']());}catch(_0x421a70){_0x3c242a['push'](_0x3c242a['shift']());}}}(a168_0x3de6,0x1fc4b));import{getAppRole,getTenantMembers,listAppRoles,listRoleUsers}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a168_0x174918(0xb3)};export const ROLE_REF_FLAG={'name':a168_0x174918(0x9b),'type':a168_0x174918(0xb4),'required':!![],'description':a168_0x174918(0x89)};export const USER_REF_FLAG={'name':'user','type':a168_0x174918(0xb4),'required':!![],'description':a168_0x174918(0x86)};export const NAME_FLAG={'name':'name','type':a168_0x174918(0xb4),'required':!![],'description':a168_0x174918(0x94)};export const USER_NAME_FLAG={'name':'name','type':'string','required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':'remark','type':a168_0x174918(0xb4),'required':![],'description':a168_0x174918(0xaa)};export const EXPECT_USER_COUNT_FLAG={'name':a168_0x174918(0x9f),'type':a168_0x174918(0x8e),'required':![],'description':a168_0x174918(0xa4)};export const BUILTIN_ROLE_TYPES=[a168_0x174918(0xbe),'DEV',a168_0x174918(0xc1)];export function isBuiltinRole(_0x3e09f6){const _0x28480e=a168_0x174918;return BUILTIN_ROLE_TYPES[_0x28480e(0xa6)](_0x3e09f6);}export function assertCustomRole(_0x377141,_0x3596ef){const _0x300d72=a168_0x174918;if(_0x377141['roleType']!==_0x300d72(0xb0))throw CliErrors['validation'](_0x300d72(0x7c)+_0x3596ef+_0x300d72(0xc0)+_0x377141[_0x300d72(0x80)]+'\x20('+_0x377141['roleType']+').',_0x300d72(0x87));}export function assertPermConfigurable(_0x54a9f4){const _0x46f6bb=a168_0x174918;if(_0x54a9f4[_0x46f6bb(0xa8)]==='DEV'||_0x54a9f4[_0x46f6bb(0xa8)]===_0x46f6bb(0xbe))throw CliErrors[_0x46f6bb(0x8f)](_0x46f6bb(0x83)+_0x54a9f4['roleName']+'\x20('+_0x54a9f4['roleType']+').',_0x46f6bb(0x88));}export function projectRole(_0x47e596){const _0x1b6445=a168_0x174918;return{'id':_0x47e596['id'],'roleName':_0x47e596[_0x1b6445(0x80)],'roleType':_0x47e596[_0x1b6445(0xa8)],'remark':_0x47e596['remark'],'userCount':_0x47e596[_0x1b6445(0xb8)],'permitCount':_0x47e596['permitCount'],'builtin':isBuiltinRole(_0x47e596[_0x1b6445(0xa8)])};}function a168_0x326d(_0x3706ff,_0x143fe3){_0x3706ff=_0x3706ff-0x7c;const _0x3de6fc=a168_0x3de6();let _0x326da6=_0x3de6fc[_0x3706ff];return _0x326da6;}export async function resolveRoleRef(_0x17dfa8,_0x49f055){const _0x13910c=a168_0x174918,_0x3bef42=_0x49f055['trim']();if(!_0x3bef42)throw CliErrors[_0x13910c(0x8f)](_0x13910c(0xac),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x3bef42))return getRoleById(_0x17dfa8,Number(_0x3bef42));const _0x8c3099=await listAllAppRoles(_0x17dfa8),_0x41c2d5=_0x8c3099['filter'](_0x308e9e=>_0x308e9e[_0x13910c(0x80)]===_0x3bef42);if(_0x41c2d5['length']===0x0)throw CliErrors[_0x13910c(0x8f)]('Role\x20name\x20\x22'+_0x3bef42+_0x13910c(0x98)+_0x17dfa8+'.',_0x13910c(0xb7));if(_0x41c2d5['length']>0x1){const _0x967e13=_0x41c2d5[_0x13910c(0x9c)](_0xe936a6=>_0xe936a6['id'])[_0x13910c(0xa2)](',\x20');throw CliErrors['validation'](_0x13910c(0xc9)+_0x3bef42+_0x13910c(0x95)+_0x967e13+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x41c2d5[0x0];}export async function getRoleById(_0x2f19ce,_0x5ec16b){const _0x1a8b1c=a168_0x174918,_0x26839a=await getAppRole(_0x5ec16b);if(!_0x26839a)throw CliErrors['validation']('Role\x20id\x20'+_0x5ec16b+'\x20not\x20found\x20in\x20app\x20'+_0x2f19ce+'.',_0x1a8b1c(0x7e));return _0x26839a;}async function listAllAppRoles(_0x5d461e){const _0x526e40=a168_0x174918,_0x3159cc=0x64,_0x16897d=[];for(let _0x56ada0=0x1;;_0x56ada0+=0x1){const {items:_0x41d77d,paging:_0x2f295b}=await listAppRoles(_0x5d461e,{'currentPage':_0x56ada0,'pageSize':_0x3159cc});_0x16897d['push'](..._0x41d77d);if(_0x41d77d['length']<_0x3159cc||_0x2f295b&&_0x16897d['length']>=_0x2f295b[_0x526e40(0x90)])return _0x16897d;}}export async function resolveTenantCode(){const _0x3f298c=a168_0x174918,_0x2052b9=await getSessionUserInfo(),_0x2423b4=_0x2052b9?.[_0x3f298c(0xbf)]?.[_0x3f298c(0xc8)]?.[_0x3f298c(0xaf)];if(!_0x2423b4)throw CliErrors[_0x3f298c(0x8a)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x2423b4;}function matchMember(_0x13e998,_0x3399e1){const _0x10ffdc=a168_0x174918,_0x48afed=_0x3399e1[_0x10ffdc(0xbb)]()[_0x10ffdc(0xae)]();return(_0x13e998['nickname']??'')['toLowerCase']()===_0x48afed||(_0x13e998[_0x10ffdc(0x84)]??'')[_0x10ffdc(0xae)]()===_0x48afed;}export async function resolveUserRef(_0x2f7d11){const _0x1a8412=a168_0x174918,_0x477066=_0x2f7d11[_0x1a8412(0xbb)]();if(!_0x477066)throw CliErrors['validation'](_0x1a8412(0xbc),_0x1a8412(0xb2));const _0x153ac6=await resolveTenantCode(),_0x58fb6e=await getTenantMembers(_0x153ac6);if(/^\d+$/[_0x1a8412(0xa9)](_0x477066)){const _0x27da5d=Number(_0x477066),_0x4c1323=_0x58fb6e[_0x1a8412(0xc6)](_0x36444d=>_0x36444d[_0x1a8412(0xb9)]===_0x27da5d);return{'userId':_0x27da5d,'username':_0x4c1323?.[_0x1a8412(0x84)]??String(_0x27da5d),'nickname':_0x4c1323?.[_0x1a8412(0xc7)],'matchedBy':'id'};}const _0x5493ca=_0x58fb6e[_0x1a8412(0x93)](_0x59a9ef=>matchMember(_0x59a9ef,_0x477066));if(_0x5493ca[_0x1a8412(0xa1)]===0x0)throw CliErrors['validation'](_0x1a8412(0x92)+_0x477066+'\x22.',_0x1a8412(0x9a));if(_0x5493ca[_0x1a8412(0xa1)]>0x1){const _0x18e243=_0x5493ca[_0x1a8412(0x9c)](_0x970869=>(_0x970869[_0x1a8412(0xc7)]??_0x970869['username']??'?')+'('+_0x970869[_0x1a8412(0xb9)]+')')[_0x1a8412(0xa2)](',\x20');throw CliErrors[_0x1a8412(0x8f)](_0x1a8412(0xa3)+_0x477066+_0x1a8412(0x81)+_0x18e243+'.',_0x1a8412(0xa0));}const _0x2ab5af=_0x5493ca[0x0];return{'userId':_0x2ab5af[_0x1a8412(0xb9)],'username':_0x2ab5af[_0x1a8412(0x84)]??String(_0x2ab5af[_0x1a8412(0xb9)]),'nickname':_0x2ab5af[_0x1a8412(0xc7)],'matchedBy':'name'};}export const UPDATE_USER_LIST_PATH='/smartapi/permit/user-role/update-user-list';function userIdsOf(_0x25f63c){const _0xb217d9=a168_0x174918;return(_0x25f63c?.[_0xb217d9(0x82)]??[])[_0xb217d9(0x9c)](_0x117f5b=>_0x117f5b[_0xb217d9(0xb9)]);}export function computeRoleUserMutation(_0x228e7a){const _0xc4448=a168_0x174918,{operation:_0x11a668,appCode:_0x402f3f,roleUsers:_0x532d80,targetRoleId:_0x1a8a66,user:_0x440339}=_0x228e7a,_0xc13d4f=_0x532d80[_0xc4448(0xc6)](_0x27c144=>_0x27c144['id']===_0x1a8a66);if(!_0xc13d4f)throw CliErrors[_0xc4448(0x8f)](_0xc4448(0x96)+_0x1a8a66+_0xc4448(0x85),_0xc4448(0x7e));const _0x484695=userIdsOf(_0xc13d4f),_0x10b2bc=[];if(_0x228e7a[_0xc4448(0xc3)]!==undefined&&_0x228e7a[_0xc4448(0xc3)]!==_0x484695['length'])throw CliErrors[_0xc4448(0x8f)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x228e7a[_0xc4448(0xc3)]+'\x20member(s)\x20but\x20role\x20has\x20'+_0x484695[_0xc4448(0xa1)]+'.',_0xc4448(0x99));const _0x3833c8=_0x484695[_0xc4448(0xa6)](_0x440339[_0xc4448(0xb9)]);let _0x251118=![];const _0x3fb839=[..._0xc13d4f[_0xc4448(0x82)]];if(_0x11a668===_0xc4448(0xa7))_0x3833c8?_0x10b2bc[_0xc4448(0xad)](_0xc4448(0xc2)+_0x440339[_0xc4448(0xb9)]+_0xc4448(0xb6)+_0xc13d4f[_0xc4448(0x80)]+';\x20no\x20change.'):(_0x3fb839['push']({'userId':_0x440339[_0xc4448(0xb9)],'username':_0x440339[_0xc4448(0x84)],..._0x440339[_0xc4448(0xc7)]?{'nickname':_0x440339[_0xc4448(0xc7)]}:{}}),_0x251118=!![]);else{if(!_0x3833c8)_0x10b2bc[_0xc4448(0xad)](_0xc4448(0xc2)+_0x440339[_0xc4448(0xb9)]+_0xc4448(0x9e)+_0xc13d4f[_0xc4448(0x80)]+';\x20no\x20change.');else{const _0x494e03=_0x3fb839['findIndex'](_0x22750b=>_0x22750b[_0xc4448(0xb9)]===_0x440339['userId']);if(_0x494e03>=0x0)_0x3fb839[_0xc4448(0xa5)](_0x494e03,0x1);_0x251118=!![];}}const _0x26fff2=_0x532d80['map'](_0x445a95=>_0x445a95['id']===_0x1a8a66?{..._0x445a95,'userList':_0x3fb839}:_0x445a95),_0x7717c8=_0x3fb839[_0xc4448(0x9c)](_0x32f3b3=>_0x32f3b3['userId']),_0x2a1a3d={'operation':_0x11a668,'selector':{'appCode':_0x402f3f,'roleId':_0x1a8a66,'roleName':_0xc13d4f[_0xc4448(0x80)],'userId':_0x440339[_0xc4448(0xb9)]},'before':{'userIds':_0x484695},'after':{'userIds':_0x7717c8},'dryRun':_0x228e7a[_0xc4448(0x91)],'backend':{'method':_0xc4448(0x8b),'path':UPDATE_USER_LIST_PATH},'warnings':_0x10b2bc};return{'roleList':_0x26fff2,'mutation':_0x2a1a3d,'changed':_0x251118};}export async function loadRoleUsers(_0xef465f){return listRoleUsers(_0xef465f);}export function readRoleRef(_0x466e4f){const _0x4a0f39=a168_0x174918,_0x3d501f=_0x466e4f[_0x4a0f39(0x7d)](_0x4a0f39(0x9b))[_0x4a0f39(0xbb)]();if(!_0x3d501f)throw CliErrors[_0x4a0f39(0x8c)](_0x4a0f39(0x9b),_0x4a0f39(0xc4));return _0x3d501f;}export async function prepareUserMutation(_0x2e74f0,_0x2874cc,_0x5a8fd9){const _0x277104=a168_0x174918,_0x805879=readRoleRef(_0x2e74f0),_0x277a69=_0x2e74f0['str'](_0x277104(0xbf))[_0x277104(0xbb)]();if(!_0x277a69)throw CliErrors['flagMissing']('user','Pass\x20--user\x20<id|name>.');const _0x283c6f=_0x2e74f0[_0x277104(0xb5)]('expect-user-count'),_0x1eee7f=_0x283c6f===undefined||_0x283c6f===null?undefined:Number(_0x283c6f),_0x5cb1fc=await resolveRoleRef(_0x2e74f0[_0x277104(0xc5)],_0x805879),_0x3b9f05=await resolveUserRef(_0x277a69),_0x2984f0=await loadRoleUsers(_0x2e74f0['appCode']);return computeRoleUserMutation({'operation':_0x2874cc,'appCode':_0x2e74f0[_0x277104(0xc5)],'roleUsers':_0x2984f0,'targetRoleId':_0x5cb1fc['id'],'user':{'userId':_0x3b9f05['userId'],'username':_0x3b9f05[_0x277104(0x84)],'nickname':_0x3b9f05[_0x277104(0xc7)]},'dryRun':_0x5a8fd9,..._0x1eee7f!==undefined?{'expectUserCount':_0x1eee7f}:{}});}function a168_0x3de6(){const _0xda5af3=['length','join','Multiple\x20tenant\x20members\x20match\x20\x22','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','splice','includes','user-add','roleType','test','Optional\x20role\x20remark/description','2846yZAQkH','Missing\x20role\x20reference.','push','toLowerCase','tenant_code','CUSTOM','760525xRiEYa','Pass\x20--user\x20<id|name>.','Role\x20id\x20(from\x20`role\x20list`)','string','flag','\x20is\x20already\x20a\x20member\x20of\x20role\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','userCount','userId','216524xxwXom','trim','Missing\x20user\x20reference.','2939648Daoltw','ADMIN','user','\x20built-in\x20role\x20','USER','User\x20','expectUserCount','Pass\x20--role\x20<id|name>.','appCode','find','nickname','tenant','Role\x20name\x20\x22','Cannot\x20','str','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','269202aSgige','roleName','\x22:\x20','userList','Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20','username','\x20not\x20found\x20in\x20the\x20user-role\x20list.','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.','Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)','authRequired','POST','flagMissing','982460Vdfkdh','number','validation','totalCount','dryRun','No\x20tenant\x20member\x20matches\x20\x22','filter','Role\x20name','\x22\x20is\x20ambiguous\x20(ids:\x20','Role\x20id\x20','345oMrimA','\x22\x20not\x20found\x20in\x20app\x20','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.','role','map','1066625wduUci','\x20is\x20not\x20a\x20member\x20of\x20role\x20','expect-user-count','Disambiguate\x20with\x20--user\x20<id>.'];a168_0x3de6=function(){return _0xda5af3;};return a168_0x3de6();}
@@ -1 +1 @@
1
- const a169_0x55dea0=a169_0x46cf;(function(_0x10e060,_0x4c64ca){const _0x1291c8=a169_0x46cf,_0x3abd20=_0x10e060();while(!![]){try{const _0x55fbaa=-parseInt(_0x1291c8(0x12b))/0x1+-parseInt(_0x1291c8(0x12f))/0x2+parseInt(_0x1291c8(0x12a))/0x3+-parseInt(_0x1291c8(0x127))/0x4+parseInt(_0x1291c8(0x125))/0x5+parseInt(_0x1291c8(0x123))/0x6+parseInt(_0x1291c8(0x12c))/0x7;if(_0x55fbaa===_0x4c64ca)break;else _0x3abd20['push'](_0x3abd20['shift']());}catch(_0x1c36c7){_0x3abd20['push'](_0x3abd20['shift']());}}}(a169_0x3700,0x34a96));function a169_0x46cf(_0x2db91a,_0x4a309a){_0x2db91a=_0x2db91a-0x11a;const _0x370088=a169_0x3700();let _0x46cfde=_0x370088[_0x2db91a];return _0x46cfde;}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=a169_0x55dea0(0x126);function a169_0x3700(){const _0x35b12d=['flag','trim','1658454CyTJxA','name','1047490JvSUPj','/smartapi/permit/role/update','1725352qeCRjg','validation','roleName','789915btptbe','9385pObKsQ','117369BSiiFu','\x20(id=','appCode','219108zycbCG','POST','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','Updated\x20role\x20','string','Nothing\x20to\x20update.','num','update','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(DEV/ADMIN\x20rejected)','--name\x20cannot\x20be\x20empty.','role','remark'];a169_0x3700=function(){return _0x35b12d;};return a169_0x3700();}function readPatch(_0x240753){const _0x6900f=a169_0x55dea0,_0x3fcebe=_0x240753['flag']('name'),_0x38b103=_0x240753[_0x6900f(0x121)]('remark'),_0x5457f1={};if(_0x3fcebe!==undefined&&_0x3fcebe!==null){const _0x4a37bf=String(_0x3fcebe)[_0x6900f(0x122)]();if(!_0x4a37bf)throw CliErrors[_0x6900f(0x128)](_0x6900f(0x11e));if(_0x4a37bf['length']>0x40)throw CliErrors[_0x6900f(0x128)](_0x6900f(0x131));_0x5457f1[_0x6900f(0x129)]=_0x4a37bf;}_0x38b103!==undefined&&_0x38b103!==null&&(_0x5457f1['remark']=String(_0x38b103));if(_0x5457f1[_0x6900f(0x129)]===undefined&&_0x5457f1[_0x6900f(0x120)]===undefined)throw CliErrors['validation'](_0x6900f(0x134),_0x6900f(0x11c));return _0x5457f1;}export const roleUpdate={'service':a169_0x55dea0(0x11f),'command':'update','description':a169_0x55dea0(0x11d),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a169_0x55dea0(0x124),'type':a169_0x55dea0(0x133),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2ce616){readPatch(_0x2ce616);},async 'dryRun'(_0x2613c8){const _0x43997d=a169_0x55dea0,_0x19af2e=_0x2613c8[_0x43997d(0x11a)]('id'),_0x1801b4=readPatch(_0x2613c8),_0x16a912=await getRoleById(_0x2613c8[_0x43997d(0x12e)],_0x19af2e);return assertCustomRole(_0x16a912,'update'),asDryRunResult({'operation':_0x43997d(0x11b),'selector':{'appCode':_0x2613c8[_0x43997d(0x12e)],'roleId':_0x19af2e,'roleName':_0x16a912['roleName']},'before':projectRole(_0x16a912),'after':projectRole({..._0x16a912,..._0x1801b4[_0x43997d(0x129)]!==undefined?{'roleName':_0x1801b4[_0x43997d(0x129)]}:{},..._0x1801b4[_0x43997d(0x120)]!==undefined?{'remark':_0x1801b4[_0x43997d(0x120)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':_0x43997d(0x130),'url':UPDATE_PATH});},async 'execute'(_0x4c1887){const _0x15cc20=a169_0x55dea0,_0x514acd=_0x4c1887[_0x15cc20(0x11a)]('id'),_0x5e07ba=readPatch(_0x4c1887),_0x1d785f=await getRoleById(_0x4c1887[_0x15cc20(0x12e)],_0x514acd);assertCustomRole(_0x1d785f,_0x15cc20(0x11b)),await updateAppRole({'id':_0x514acd,'appCode':_0x4c1887[_0x15cc20(0x12e)],..._0x5e07ba['roleName']!==undefined?{'roleName':_0x5e07ba[_0x15cc20(0x129)]}:{},..._0x5e07ba[_0x15cc20(0x120)]!==undefined?{'remark':_0x5e07ba[_0x15cc20(0x120)]}:{}});const _0x4ab627=await getRoleById(_0x4c1887['appCode'],_0x514acd);return{'ok':!![],'data':{'operation':'update','selector':{'appCode':_0x4c1887[_0x15cc20(0x12e)],'roleId':_0x514acd,'roleName':_0x4ab627[_0x15cc20(0x129)]},'before':projectRole(_0x1d785f),'after':projectRole(_0x4ab627),'dryRun':![],'backend':{'method':_0x15cc20(0x130),'path':UPDATE_PATH},'warnings':[]},'message':_0x15cc20(0x132)+_0x4ab627['roleName']+_0x15cc20(0x12d)+_0x514acd+')'};}};
1
+ const a169_0xdfbb37=a169_0x18d2;(function(_0x2b8940,_0x92571a){const _0x5753cc=a169_0x18d2,_0xc74409=_0x2b8940();while(!![]){try{const _0x5ad707=-parseInt(_0x5753cc(0xb6))/0x1+-parseInt(_0x5753cc(0xbe))/0x2+parseInt(_0x5753cc(0xa6))/0x3+parseInt(_0x5753cc(0xb3))/0x4+-parseInt(_0x5753cc(0xac))/0x5*(parseInt(_0x5753cc(0xbb))/0x6)+parseInt(_0x5753cc(0xb1))/0x7*(parseInt(_0x5753cc(0xc0))/0x8)+-parseInt(_0x5753cc(0xb5))/0x9*(-parseInt(_0x5753cc(0xb2))/0xa);if(_0x5ad707===_0x92571a)break;else _0xc74409['push'](_0xc74409['shift']());}catch(_0x213a1c){_0xc74409['push'](_0xc74409['shift']());}}}(a169_0x403f,0xdeb32));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=a169_0xdfbb37(0xaf);function a169_0x403f(){const _0x5e608f=['validation','\x20(id=','2536566TjzkTu','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','1645792ZbIfxh','appCode','355272DdlfGA','roleName','update','--name\x20cannot\x20be\x20empty.','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','length','1021475cMkWJB','trim','Updated\x20role\x20','/smartapi/permit/role/update','write','56qAyYbS','1803370Bcacgf','7155360ESoLFG','POST','45lMEuWp','1661395qXdQCX','remark','num','flag','name','18JdUGGI'];a169_0x403f=function(){return _0x5e608f;};return a169_0x403f();}function a169_0x18d2(_0x257215,_0x364ba9){_0x257215=_0x257215-0xa5;const _0x403f3c=a169_0x403f();let _0x18d23d=_0x403f3c[_0x257215];return _0x18d23d;}function readPatch(_0x13b641){const _0x471123=a169_0xdfbb37,_0x400af1=_0x13b641['flag'](_0x471123(0xba)),_0x233f11=_0x13b641[_0x471123(0xb9)](_0x471123(0xb7)),_0x28904e={};if(_0x400af1!==undefined&&_0x400af1!==null){const _0x25bafb=String(_0x400af1)[_0x471123(0xad)]();if(!_0x25bafb)throw CliErrors[_0x471123(0xbc)](_0x471123(0xa9));if(_0x25bafb[_0x471123(0xab)]>0x40)throw CliErrors[_0x471123(0xbc)](_0x471123(0xaa));_0x28904e[_0x471123(0xa7)]=_0x25bafb;}_0x233f11!==undefined&&_0x233f11!==null&&(_0x28904e[_0x471123(0xb7)]=String(_0x233f11));if(_0x28904e[_0x471123(0xa7)]===undefined&&_0x28904e[_0x471123(0xb7)]===undefined)throw CliErrors[_0x471123(0xbc)]('Nothing\x20to\x20update.',_0x471123(0xbf));return _0x28904e;}export const roleUpdate={'service':'role','command':a169_0xdfbb37(0xa8),'description':'Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(DEV/ADMIN\x20rejected)','risk':a169_0xdfbb37(0xb0),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a169_0xdfbb37(0xba),'type':'string','required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x32a4e7){readPatch(_0x32a4e7);},async 'dryRun'(_0x2bdcd7){const _0x7d911a=a169_0xdfbb37,_0x2cec36=_0x2bdcd7[_0x7d911a(0xb8)]('id'),_0x388ce2=readPatch(_0x2bdcd7),_0x14652f=await getRoleById(_0x2bdcd7[_0x7d911a(0xa5)],_0x2cec36);return assertCustomRole(_0x14652f,'update'),asDryRunResult({'operation':_0x7d911a(0xa8),'selector':{'appCode':_0x2bdcd7[_0x7d911a(0xa5)],'roleId':_0x2cec36,'roleName':_0x14652f[_0x7d911a(0xa7)]},'before':projectRole(_0x14652f),'after':projectRole({..._0x14652f,..._0x388ce2[_0x7d911a(0xa7)]!==undefined?{'roleName':_0x388ce2['roleName']}:{},..._0x388ce2['remark']!==undefined?{'remark':_0x388ce2[_0x7d911a(0xb7)]}:{}}),'dryRun':!![],'backend':{'method':_0x7d911a(0xb4),'path':UPDATE_PATH},'warnings':[]},{'method':_0x7d911a(0xb4),'url':UPDATE_PATH});},async 'execute'(_0x349904){const _0x15f7b0=a169_0xdfbb37,_0x5371b9=_0x349904[_0x15f7b0(0xb8)]('id'),_0x31173b=readPatch(_0x349904),_0x27be5f=await getRoleById(_0x349904[_0x15f7b0(0xa5)],_0x5371b9);assertCustomRole(_0x27be5f,_0x15f7b0(0xa8)),await updateAppRole({'id':_0x5371b9,'appCode':_0x349904[_0x15f7b0(0xa5)],..._0x31173b[_0x15f7b0(0xa7)]!==undefined?{'roleName':_0x31173b[_0x15f7b0(0xa7)]}:{},..._0x31173b[_0x15f7b0(0xb7)]!==undefined?{'remark':_0x31173b[_0x15f7b0(0xb7)]}:{}});const _0x341178=await getRoleById(_0x349904[_0x15f7b0(0xa5)],_0x5371b9);return{'ok':!![],'data':{'operation':_0x15f7b0(0xa8),'selector':{'appCode':_0x349904[_0x15f7b0(0xa5)],'roleId':_0x5371b9,'roleName':_0x341178['roleName']},'before':projectRole(_0x27be5f),'after':projectRole(_0x341178),'dryRun':![],'backend':{'method':_0x15f7b0(0xb4),'path':UPDATE_PATH},'warnings':[]},'message':_0x15f7b0(0xae)+_0x341178[_0x15f7b0(0xa7)]+_0x15f7b0(0xbd)+_0x5371b9+')'};}};
@@ -1 +1 @@
1
- const a170_0x48399b=a170_0x59bc;function a170_0x59bc(_0x1959f5,_0x40895c){_0x1959f5=_0x1959f5-0x9a;const _0x3f01fa=a170_0x3f01();let _0x59bc56=_0x3f01fa[_0x1959f5];return _0x59bc56;}(function(_0xe8045a,_0xc7cd71){const _0x5778b2=a170_0x59bc,_0x5e5a2d=_0xe8045a();while(!![]){try{const _0x2dc802=parseInt(_0x5778b2(0xa9))/0x1+-parseInt(_0x5778b2(0xa1))/0x2*(parseInt(_0x5778b2(0xa8))/0x3)+-parseInt(_0x5778b2(0xa4))/0x4+parseInt(_0x5778b2(0xa6))/0x5+parseInt(_0x5778b2(0xab))/0x6+parseInt(_0x5778b2(0x9f))/0x7*(parseInt(_0x5778b2(0xa7))/0x8)+-parseInt(_0x5778b2(0xa5))/0x9;if(_0x2dc802===_0xc7cd71)break;else _0x5e5a2d['push'](_0x5e5a2d['shift']());}catch(_0x2cfbbc){_0x5e5a2d['push'](_0x5e5a2d['shift']());}}}(a170_0x3f01,0xb4d2e));import{updateRoleUsers}from'../../core/api-client.js';function a170_0x3f01(){const _0x523e43=['user-add','selector','appCode','Added\x20user\x20','7dUcSUJ','role','33172hFGsoj','No\x20change:\x20user\x20','\x20to\x20role\x20','4808144cyiWoQ','1842921APtHHG','6699900hjzxyz','7115568EdCYdx','261FRDjCG','1177917wVtSIw','high-risk-write','1098588KpDHtG','roleName','\x20already\x20in\x20role\x20'];a170_0x3f01=function(){return _0x523e43;};return a170_0x3f01();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a170_0x48399b(0xa0),'command':'user-add','description':'Add\x20a\x20user\x20to\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','risk':a170_0x48399b(0xaa),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x6ec519){const _0x47aa51=a170_0x48399b,{mutation:_0x2273e6}=await prepareUserMutation(_0x6ec519,_0x47aa51(0x9b),!![]);return asDryRunResult(_0x2273e6,{'method':'POST','url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x12358e){const _0xbc4983=a170_0x48399b,{roleList:_0x16aa8d,mutation:_0x585d0a,changed:_0x36164a}=await prepareUserMutation(_0x12358e,_0xbc4983(0x9b),![]);return _0x36164a&&await updateRoleUsers(_0x12358e[_0xbc4983(0x9d)],_0x16aa8d),{'ok':!![],'data':_0x585d0a,'message':_0x36164a?_0xbc4983(0x9e)+_0x585d0a[_0xbc4983(0x9c)]['userId']+_0xbc4983(0xa3)+_0x585d0a['selector'][_0xbc4983(0xac)]:_0xbc4983(0xa2)+_0x585d0a[_0xbc4983(0x9c)]['userId']+_0xbc4983(0x9a)+_0x585d0a[_0xbc4983(0x9c)]['roleName']};}};
1
+ const a170_0x53ee88=a170_0x4a16;function a170_0x549f(){const _0x27255b=['2IDlZyn','4332pcUITH','POST','122868swHfLd','657763BZdCUZ','1342530hoxQDv','75somHHd','14888nFawYm','roleName','47368hQPozS','Added\x20user\x20','Add\x20a\x20user\x20to\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','559cAInMk','\x20already\x20in\x20role\x20','\x20to\x20role\x20','10mIlJcj','appCode','3630BiuUwL','selector','5160331HoZvYr','userId','user-add','2177kOJacY','role'];a170_0x549f=function(){return _0x27255b;};return a170_0x549f();}(function(_0x556795,_0x119359){const _0x9015df=a170_0x4a16,_0x2ce141=_0x556795();while(!![]){try{const _0x365bc5=-parseInt(_0x9015df(0xf7))/0x1*(-parseInt(_0x9015df(0xf3))/0x2)+parseInt(_0x9015df(0xe1))/0x3*(-parseInt(_0x9015df(0xe4))/0x4)+parseInt(_0x9015df(0xec))/0x5*(parseInt(_0x9015df(0xf4))/0x6)+-parseInt(_0x9015df(0xf1))/0x7*(parseInt(_0x9015df(0xe2))/0x8)+parseInt(_0x9015df(0xf8))/0x9+parseInt(_0x9015df(0xea))/0xa*(parseInt(_0x9015df(0xee))/0xb)+parseInt(_0x9015df(0xf6))/0xc*(-parseInt(_0x9015df(0xe7))/0xd);if(_0x365bc5===_0x119359)break;else _0x2ce141['push'](_0x2ce141['shift']());}catch(_0x4c3d2a){_0x2ce141['push'](_0x2ce141['shift']());}}}(a170_0x549f,0x76708));function a170_0x4a16(_0x31d269,_0x4d3bcc){_0x31d269=_0x31d269-0xe1;const _0x549fd7=a170_0x549f();let _0x4a1608=_0x549fd7[_0x31d269];return _0x4a1608;}import{updateRoleUsers}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,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a170_0x53ee88(0xf2),'command':a170_0x53ee88(0xf0),'description':a170_0x53ee88(0xe6),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x126574){const _0x4e7f60=a170_0x53ee88,{mutation:_0xd64f28}=await prepareUserMutation(_0x126574,_0x4e7f60(0xf0),!![]);return asDryRunResult(_0xd64f28,{'method':_0x4e7f60(0xf5),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x7bb7c){const _0x177826=a170_0x53ee88,{roleList:_0x96ba3,mutation:_0x55ba78,changed:_0x56cdd0}=await prepareUserMutation(_0x7bb7c,_0x177826(0xf0),![]);return _0x56cdd0&&await updateRoleUsers(_0x7bb7c[_0x177826(0xeb)],_0x96ba3),{'ok':!![],'data':_0x55ba78,'message':_0x56cdd0?_0x177826(0xe5)+_0x55ba78[_0x177826(0xed)][_0x177826(0xef)]+_0x177826(0xe9)+_0x55ba78['selector']['roleName']:'No\x20change:\x20user\x20'+_0x55ba78[_0x177826(0xed)][_0x177826(0xef)]+_0x177826(0xe8)+_0x55ba78[_0x177826(0xed)][_0x177826(0xe3)]};}};
@@ -1 +1 @@
1
- function a171_0x2445(){const _0x2eb686=['Remove\x20a\x20user\x20from\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','3763824ZqUYdI','high-risk-write','36124SWPmsq','role','selector','appCode','No\x20change:\x20user\x20','488180NWiBNd','1505079xtJIwT','952232ciBhcz','roleName','1550830kzRTXr','143bbUXCh','66CmwxQN','1821262GdXoav','Removed\x20user\x20','user-remove','351gyHfdG','userId','\x20from\x20role\x20','POST','21bvLwpG'];a171_0x2445=function(){return _0x2eb686;};return a171_0x2445();}const a171_0x1d9358=a171_0xb5d9;function a171_0xb5d9(_0x33988f,_0x5c7f16){_0x33988f=_0x33988f-0xf1;const _0x24455d=a171_0x2445();let _0xb5d9fa=_0x24455d[_0x33988f];return _0xb5d9fa;}(function(_0x1d9fda,_0x264b68){const _0x7c9bd1=a171_0xb5d9,_0x28cf2c=_0x1d9fda();while(!![]){try{const _0x5842f1=parseInt(_0x7c9bd1(0x105))/0x1+-parseInt(_0x7c9bd1(0x100))/0x2+parseInt(_0x7c9bd1(0xf1))/0x3*(-parseInt(_0x7c9bd1(0xf9))/0x4)+-parseInt(_0x7c9bd1(0xfe))/0x5*(-parseInt(_0x7c9bd1(0x104))/0x6)+parseInt(_0x7c9bd1(0xf5))/0x7*(parseInt(_0x7c9bd1(0xf7))/0x8)+parseInt(_0x7c9bd1(0xff))/0x9+parseInt(_0x7c9bd1(0x102))/0xa*(-parseInt(_0x7c9bd1(0x103))/0xb);if(_0x5842f1===_0x264b68)break;else _0x28cf2c['push'](_0x28cf2c['shift']());}catch(_0x3d5d5a){_0x28cf2c['push'](_0x28cf2c['shift']());}}}(a171_0x2445,0xe1dad));import{updateRoleUsers}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,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a171_0x1d9358(0xfa),'command':a171_0x1d9358(0x107),'description':a171_0x1d9358(0xf6),'risk':a171_0x1d9358(0xf8),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x16bdcd){const _0x5bfb4b=a171_0x1d9358,{mutation:_0x429ff6}=await prepareUserMutation(_0x16bdcd,_0x5bfb4b(0x107),!![]);return asDryRunResult(_0x429ff6,{'method':_0x5bfb4b(0xf4),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x331354){const _0x4189bc=a171_0x1d9358,{roleList:_0x46878c,mutation:_0x5c4334,changed:_0x5ea64b}=await prepareUserMutation(_0x331354,_0x4189bc(0x107),![]);return _0x5ea64b&&await updateRoleUsers(_0x331354[_0x4189bc(0xfc)],_0x46878c),{'ok':!![],'data':_0x5c4334,'message':_0x5ea64b?_0x4189bc(0x106)+_0x5c4334['selector'][_0x4189bc(0xf2)]+_0x4189bc(0xf3)+_0x5c4334[_0x4189bc(0xfb)][_0x4189bc(0x101)]:_0x4189bc(0xfd)+_0x5c4334[_0x4189bc(0xfb)][_0x4189bc(0xf2)]+'\x20not\x20in\x20role\x20'+_0x5c4334[_0x4189bc(0xfb)][_0x4189bc(0x101)]};}};
1
+ const a171_0x54fcab=a171_0xd8f5;(function(_0xec5e10,_0x10ef8f){const _0x1ee03a=a171_0xd8f5,_0x35c93b=_0xec5e10();while(!![]){try{const _0x53377b=parseInt(_0x1ee03a(0x177))/0x1*(parseInt(_0x1ee03a(0x174))/0x2)+-parseInt(_0x1ee03a(0x173))/0x3*(parseInt(_0x1ee03a(0x183))/0x4)+-parseInt(_0x1ee03a(0x179))/0x5*(-parseInt(_0x1ee03a(0x17f))/0x6)+-parseInt(_0x1ee03a(0x180))/0x7+parseInt(_0x1ee03a(0x185))/0x8+parseInt(_0x1ee03a(0x17c))/0x9*(-parseInt(_0x1ee03a(0x189))/0xa)+parseInt(_0x1ee03a(0x17e))/0xb;if(_0x53377b===_0x10ef8f)break;else _0x35c93b['push'](_0x35c93b['shift']());}catch(_0x9386e2){_0x35c93b['push'](_0x35c93b['shift']());}}}(a171_0x3371,0xa8068));import{updateRoleUsers}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a171_0xd8f5(_0x28911e,_0x30ec5e){_0x28911e=_0x28911e-0x173;const _0x337161=a171_0x3371();let _0xd8f535=_0x337161[_0x28911e];return _0xd8f535;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':'role','command':a171_0x54fcab(0x184),'description':a171_0x54fcab(0x181),'risk':a171_0x54fcab(0x182),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2c6356){const _0x1834a5=a171_0x54fcab,{mutation:_0x2630e5}=await prepareUserMutation(_0x2c6356,_0x1834a5(0x184),!![]);return asDryRunResult(_0x2630e5,{'method':_0x1834a5(0x17b),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x5f36fc){const _0x51d734=a171_0x54fcab,{roleList:_0x46d70d,mutation:_0x215dcf,changed:_0x5c5e85}=await prepareUserMutation(_0x5f36fc,_0x51d734(0x184),![]);return _0x5c5e85&&await updateRoleUsers(_0x5f36fc[_0x51d734(0x187)],_0x46d70d),{'ok':!![],'data':_0x215dcf,'message':_0x5c5e85?_0x51d734(0x175)+_0x215dcf['selector'][_0x51d734(0x17a)]+_0x51d734(0x176)+_0x215dcf[_0x51d734(0x188)][_0x51d734(0x186)]:_0x51d734(0x178)+_0x215dcf['selector'][_0x51d734(0x17a)]+_0x51d734(0x17d)+_0x215dcf[_0x51d734(0x188)][_0x51d734(0x186)]};}};function a171_0x3371(){const _0x49337d=['31326NhOMno','4751754gXpqtT','Remove\x20a\x20user\x20from\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','high-risk-write','4653892RtWrRQ','user-remove','1529008VRdkJz','roleName','appCode','selector','12990HlfsGR','3YAchus','1010736RHArgg','Removed\x20user\x20','\x20from\x20role\x20','2WnjVxX','No\x20change:\x20user\x20','355icjWtX','userId','POST','4878SGsHEq','\x20not\x20in\x20role\x20','18282352ESrfRy'];a171_0x3371=function(){return _0x49337d;};return a171_0x3371();}
@@ -1 +1 @@
1
- const a172_0x4c5034=a172_0x2171;(function(_0x41c984,_0x3c72d6){const _0x1b23aa=a172_0x2171,_0x9b5c0f=_0x41c984();while(!![]){try{const _0xe494f3=-parseInt(_0x1b23aa(0x120))/0x1+-parseInt(_0x1b23aa(0x126))/0x2+parseInt(_0x1b23aa(0x130))/0x3+-parseInt(_0x1b23aa(0x12d))/0x4+-parseInt(_0x1b23aa(0x12a))/0x5+-parseInt(_0x1b23aa(0x12f))/0x6+parseInt(_0x1b23aa(0x12c))/0x7*(parseInt(_0x1b23aa(0x125))/0x8);if(_0xe494f3===_0x3c72d6)break;else _0x9b5c0f['push'](_0x9b5c0f['shift']());}catch(_0x19da50){_0x9b5c0f['push'](_0x9b5c0f['shift']());}}}(a172_0x24a3,0xf2cd1));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a172_0x2171(_0x2229b8,_0x48104a){_0x2229b8=_0x2229b8-0x120;const _0x24a3e2=a172_0x24a3();let _0x21713c=_0x24a3e2[_0x2229b8];return _0x21713c;}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';function a172_0x24a3(){const _0x2bac29=['1400861bIzPrQ','name','str','user-resolve','userId','1752464cqOzQt','2006974PoxFBO','trim','read','Resolved\x20\x22','5318680oTHBRU','\x22\x20→\x20userId\x20','189IOfAdm','5509656ICFOiF','Pass\x20--name\x20<nickname|username>.','3216732FttDGT','1384701vyMwiG','flagMissing'];a172_0x24a3=function(){return _0x2bac29;};return a172_0x24a3();}export const roleUserResolve={'service':'role','command':a172_0x4c5034(0x123),'description':'Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','risk':a172_0x4c5034(0x128),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x56bed2){const _0x5501d7=a172_0x4c5034;if(!_0x56bed2[_0x5501d7(0x122)](_0x5501d7(0x121))[_0x5501d7(0x127)]())throw CliErrors[_0x5501d7(0x131)](_0x5501d7(0x121),_0x5501d7(0x12e));},async 'execute'(_0x5cfff5){const _0xe3c465=a172_0x4c5034,_0x101508=_0x5cfff5[_0xe3c465(0x122)]('name')[_0xe3c465(0x127)](),_0x10db37=await resolveUserRef(_0x101508);return{'ok':!![],'data':{'user':{'userId':_0x10db37[_0xe3c465(0x124)],'username':_0x10db37['username'],'nickname':_0x10db37['nickname'],'matchedBy':_0x10db37['matchedBy']}},'message':_0xe3c465(0x129)+_0x101508+_0xe3c465(0x12b)+_0x10db37['userId']};}};
1
+ function a172_0x19ba(){const _0x1e3336=['userId','6hEmrNr','2860767bpzUNH','2591729awGMCi','username','704918KHaNfB','user-resolve','1228875SrfEHH','read','nickname','2827770ZnQVQy','str','name','flagMissing','5757544ZhWCbP','1074188ReRAEN','6jcOOcO','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','2tAbQew'];a172_0x19ba=function(){return _0x1e3336;};return a172_0x19ba();}const a172_0x5f2e45=a172_0xf736;(function(_0x3502a2,_0x2c6a71){const _0x288f0e=a172_0xf736,_0x367a21=_0x3502a2();while(!![]){try{const _0x110fe8=parseInt(_0x288f0e(0x1af))/0x1*(parseInt(_0x288f0e(0x1b5))/0x2)+parseInt(_0x288f0e(0x1ad))/0x3*(parseInt(_0x288f0e(0x1ac))/0x4)+parseInt(_0x288f0e(0x1b7))/0x5+parseInt(_0x288f0e(0x1b1))/0x6*(-parseInt(_0x288f0e(0x1b3))/0x7)+-parseInt(_0x288f0e(0x1ab))/0x8+parseInt(_0x288f0e(0x1b2))/0x9+-parseInt(_0x288f0e(0x1ba))/0xa;if(_0x110fe8===_0x2c6a71)break;else _0x367a21['push'](_0x367a21['shift']());}catch(_0x24dc9c){_0x367a21['push'](_0x367a21['shift']());}}}(a172_0x19ba,0x69b25));function a172_0xf736(_0xc2cfc0,_0xca1826){_0xc2cfc0=_0xc2cfc0-0x1ab;const _0x19ba04=a172_0x19ba();let _0xf736e8=_0x19ba04[_0xc2cfc0];return _0xf736e8;}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':'role','command':a172_0x5f2e45(0x1b6),'description':a172_0x5f2e45(0x1ae),'risk':a172_0x5f2e45(0x1b8),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x37e1ca){const _0x2964bb=a172_0x5f2e45;if(!_0x37e1ca['str']('name')['trim']())throw CliErrors[_0x2964bb(0x1bd)](_0x2964bb(0x1bc),'Pass\x20--name\x20<nickname|username>.');},async 'execute'(_0x1d5abe){const _0x592d95=a172_0x5f2e45,_0x3805e3=_0x1d5abe[_0x592d95(0x1bb)](_0x592d95(0x1bc))['trim'](),_0x43a63e=await resolveUserRef(_0x3805e3);return{'ok':!![],'data':{'user':{'userId':_0x43a63e[_0x592d95(0x1b0)],'username':_0x43a63e[_0x592d95(0x1b4)],'nickname':_0x43a63e[_0x592d95(0x1b9)],'matchedBy':_0x43a63e['matchedBy']}},'message':'Resolved\x20\x22'+_0x3805e3+'\x22\x20→\x20userId\x20'+_0x43a63e[_0x592d95(0x1b0)]};}};