@lovrabet/rabetbase-cli 2.3.15 → 2.3.16-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/README.md +7 -2
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/init/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/kb/create.js +1 -0
  103. package/lib/commands/kb/delete.js +1 -0
  104. package/lib/commands/kb/detail.js +1 -0
  105. package/lib/commands/kb/index.js +1 -0
  106. package/lib/commands/kb/list.js +1 -0
  107. package/lib/commands/kb/shared.js +1 -0
  108. package/lib/commands/kb/update.js +1 -0
  109. package/lib/commands/logs/index.js +1 -1
  110. package/lib/commands/menu/asset-update.js +1 -1
  111. package/lib/commands/menu/delete.js +1 -1
  112. package/lib/commands/menu/external-link-create.js +1 -1
  113. package/lib/commands/menu/external-link-update.js +1 -1
  114. package/lib/commands/menu/group-create.js +1 -1
  115. package/lib/commands/menu/group-update.js +1 -1
  116. package/lib/commands/menu/index.js +1 -1
  117. package/lib/commands/menu/list.js +1 -1
  118. package/lib/commands/menu/move.js +1 -1
  119. package/lib/commands/menu/regroup-start.js +1 -1
  120. package/lib/commands/menu/rename.js +1 -1
  121. package/lib/commands/menu/shared/compare-table.js +1 -1
  122. package/lib/commands/menu/shared/delete-plan.js +1 -1
  123. package/lib/commands/menu/shared/facts.js +1 -1
  124. package/lib/commands/menu/shared/index.js +1 -1
  125. package/lib/commands/menu/shared/inquirer.js +1 -1
  126. package/lib/commands/menu/shared/local-pages.js +1 -1
  127. package/lib/commands/menu/shared/logic.js +1 -1
  128. package/lib/commands/menu/shared/mutations.js +1 -1
  129. package/lib/commands/menu/shared/service.js +1 -1
  130. package/lib/commands/menu/shared/sync-core.js +1 -1
  131. package/lib/commands/menu/shared/update-core.js +1 -1
  132. package/lib/commands/menu/shared/valid-url.js +1 -1
  133. package/lib/commands/menu/sync.js +1 -1
  134. package/lib/commands/notification/config-list.js +1 -1
  135. package/lib/commands/notification/index.js +1 -1
  136. package/lib/commands/ocr/index.js +1 -1
  137. package/lib/commands/page/generate-start.js +1 -1
  138. package/lib/commands/page/generate-status.js +1 -1
  139. package/lib/commands/page/index.js +1 -1
  140. package/lib/commands/page/pull.js +1 -1
  141. package/lib/commands/page/push.js +1 -1
  142. package/lib/commands/page/relation-audit.js +1 -1
  143. package/lib/commands/page/restore.js +1 -1
  144. package/lib/commands/page/shared.js +1 -1
  145. package/lib/commands/page/standard-page-status.js +1 -1
  146. package/lib/commands/page/sync.js +1 -1
  147. package/lib/commands/permit/index.js +1 -1
  148. package/lib/commands/permit/page-get.js +1 -1
  149. package/lib/commands/permit/page-set.js +1 -1
  150. package/lib/commands/permit/role-apis-set.js +1 -1
  151. package/lib/commands/permit/role-menus-set.js +1 -1
  152. package/lib/commands/permit/role-menus.js +1 -1
  153. package/lib/commands/permit/shared.js +1 -1
  154. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  155. package/lib/commands/project/create/format-elapsed.js +1 -1
  156. package/lib/commands/project/create/main.js +1 -1
  157. package/lib/commands/project/create/non-interactive.js +1 -1
  158. package/lib/commands/project/create/project-template-path.js +1 -1
  159. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  160. package/lib/commands/project/create/use-format-code.js +1 -1
  161. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  162. package/lib/commands/project/index.js +1 -1
  163. package/lib/commands/project/init.js +1 -1
  164. package/lib/commands/project/upgrade.js +1 -1
  165. package/lib/commands/registry.js +1 -1
  166. package/lib/commands/role/create.js +1 -1
  167. package/lib/commands/role/delete.js +1 -1
  168. package/lib/commands/role/detail.js +1 -1
  169. package/lib/commands/role/index.js +1 -1
  170. package/lib/commands/role/list.js +1 -1
  171. package/lib/commands/role/shared.js +1 -1
  172. package/lib/commands/role/update.js +1 -1
  173. package/lib/commands/role/user-add.js +1 -1
  174. package/lib/commands/role/user-remove.js +1 -1
  175. package/lib/commands/role/user-resolve.js +1 -1
  176. package/lib/commands/run/index.js +1 -1
  177. package/lib/commands/schema.js +1 -1
  178. package/lib/commands/sql/create.js +1 -1
  179. package/lib/commands/sql/delete.js +1 -1
  180. package/lib/commands/sql/detail.js +1 -1
  181. package/lib/commands/sql/exec.js +1 -1
  182. package/lib/commands/sql/index.js +1 -1
  183. package/lib/commands/sql/list.js +1 -1
  184. package/lib/commands/sql/pull.js +1 -1
  185. package/lib/commands/sql/push.js +1 -1
  186. package/lib/commands/sql/save.js +1 -1
  187. package/lib/commands/sql/shared.js +1 -1
  188. package/lib/commands/sql/status.js +1 -1
  189. package/lib/commands/sql/validate.js +1 -1
  190. package/lib/commands/task/index.js +1 -1
  191. package/lib/commands/task/status.js +1 -1
  192. package/lib/commands/workspace/add.js +1 -1
  193. package/lib/commands/workspace/index.js +1 -1
  194. package/lib/commands/workspace/remove.js +1 -1
  195. package/lib/config/schema.js +1 -1
  196. package/lib/constant/cdn.js +1 -1
  197. package/lib/constant/cli.js +1 -1
  198. package/lib/constant/defaults.js +1 -1
  199. package/lib/constant/domain.js +1 -1
  200. package/lib/constant/env.js +1 -1
  201. package/lib/constant/output.js +1 -1
  202. package/lib/constant/paths.js +1 -1
  203. package/lib/constant/risk.js +1 -1
  204. package/lib/context/app-resolver.js +1 -1
  205. package/lib/context/auth-resolver.js +1 -1
  206. package/lib/context/config-loader.js +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.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/skills/main.js +1 -1
  242. package/lib/skills/npx-skills-add.js +1 -1
  243. package/lib/skills/skill-presence.js +1 -0
  244. package/lib/telemetry/cli-command-trace.js +1 -1
  245. package/lib/telemetry/cli-help-trace.js +1 -1
  246. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  247. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  248. package/lib/telemetry/send-cli-trace-log.js +1 -1
  249. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  250. package/lib/utils/ai_config.js +1 -1
  251. package/lib/utils/apply-jq-filter.js +1 -1
  252. package/lib/utils/cdn-config.js +1 -1
  253. package/lib/utils/check-sdk-version.js +1 -1
  254. package/lib/utils/cli-version-check.js +1 -1
  255. package/lib/utils/cli-version-policy.js +1 -1
  256. package/lib/utils/config.js +1 -1
  257. package/lib/utils/copy-directory.js +1 -1
  258. package/lib/utils/entity-with-id.js +1 -1
  259. package/lib/utils/file-utils.js +1 -1
  260. package/lib/utils/guides-cdn.js +1 -1
  261. package/lib/utils/http-client.js +1 -1
  262. package/lib/utils/is-non-interactive.js +1 -1
  263. package/lib/utils/logger.js +1 -1
  264. package/lib/utils/params.js +1 -1
  265. package/lib/utils/platform.js +1 -1
  266. package/lib/utils/rules-cdn.js +1 -1
  267. package/lib/utils/sleep.js +1 -1
  268. package/lib/utils/template-replacer.js +1 -1
  269. package/lib/utils/update-notice.js +1 -1
  270. package/lib/utils/version.js +1 -1
  271. package/lib/utils/with-active-cookie.js +1 -1
  272. package/lib/utils/write-cli-side-channel.js +1 -1
  273. package/package.json +1 -1
@@ -1 +1 @@
1
- const a156_0x3f57d2=a156_0x3f5b;(function(_0x5d9e1a,_0x3b6fb2){const _0x52b687=a156_0x3f5b,_0x277d7b=_0x5d9e1a();while(!![]){try{const _0x5605ff=parseInt(_0x52b687(0x163))/0x1*(-parseInt(_0x52b687(0x164))/0x2)+parseInt(_0x52b687(0x19e))/0x3+parseInt(_0x52b687(0x16a))/0x4+-parseInt(_0x52b687(0x1be))/0x5*(-parseInt(_0x52b687(0x157))/0x6)+-parseInt(_0x52b687(0x15d))/0x7*(parseInt(_0x52b687(0x1b6))/0x8)+-parseInt(_0x52b687(0x1b5))/0x9*(-parseInt(_0x52b687(0x177))/0xa)+parseInt(_0x52b687(0x1cc))/0xb*(-parseInt(_0x52b687(0x16b))/0xc);if(_0x5605ff===_0x3b6fb2)break;else _0x277d7b['push'](_0x277d7b['shift']());}catch(_0x105e8c){_0x277d7b['push'](_0x277d7b['shift']());}}}(a156_0x2e5e,0x95bbc));import a156_0xc020fa from'chalk';import a156_0x3db68e 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';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a156_0x3f57d2(0x1d2)](_0x5544a1=>_0x5544a1!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x5ddc11){const _0x393582=a156_0x3f57d2,_0x3881ce=[];for(const _0x4f7fb8 of Object[_0x393582(0x19c)](CORE_IDE_CONFIGS)){if(_0x4f7fb8[_0x393582(0x159)])for(const _0x1a271a of _0x4f7fb8['files']){_0x3881ce['push'](resolve(_0x5ddc11,_0x1a271a[_0x393582(0x195)]));}}return _0x3881ce;}function analyse(_0x39dff0){const _0x28b98d=a156_0x3f57d2;let _0x56fcd9=null;const _0x468d15=resolve(_0x39dff0,NEW_CONFIG_NAME),_0x307773=existsSync(_0x468d15);for(const _0x3b60b9 of LEGACY_CONFIG_NAMES){const _0x488b47=resolve(_0x39dff0,_0x3b60b9);if(existsSync(_0x488b47)){const _0x738cb2=readConfigFile(_0x488b47),_0x175c05=Object[_0x28b98d(0x184)](_0x738cb2)[_0x28b98d(0x1d2)](_0x68e81c=>typeof _0x738cb2[_0x68e81c]!==_0x28b98d(0x1bf));_0x56fcd9={'oldPath':_0x488b47,'hasNewConfig':_0x307773,'fields':_0x175c05};break;}}const _0x591952=[],_0x303056=resolve(_0x39dff0,_0x28b98d(0x170));if(existsSync(_0x303056))_0x591952['push'](_0x303056);const _0x4793c5=resolve(_0x39dff0,_0x28b98d(0x1b1));if(existsSync(_0x4793c5))_0x591952[_0x28b98d(0x1b4)](_0x4793c5);const _0x48b203=resolve(_0x39dff0,_0x28b98d(0x15c));if(existsSync(_0x48b203))_0x591952['push'](_0x48b203);for(const _0x3c6b00 of collectIdeSkillFiles(_0x39dff0)){if(existsSync(_0x3c6b00))_0x591952[_0x28b98d(0x1b4)](_0x3c6b00);}let _0x5db8ee=null;const _0x1fa32e=resolve(_0x39dff0,_0x28b98d(0x1a9));if(existsSync(_0x1fa32e))try{const _0xba6a57=JSON[_0x28b98d(0x186)](readFileSync(_0x1fa32e,'utf8'));if(_0xba6a57?.[_0x28b98d(0x188)]&&typeof _0xba6a57[_0x28b98d(0x188)]===_0x28b98d(0x173)){const _0x29a800=[];for(const [_0x4b1942,_0xf7e945]of Object['entries'](_0xba6a57[_0x28b98d(0x188)])){const _0x23938f=_0xf7e945;_0x23938f?.[_0x28b98d(0x189)]&&Array[_0x28b98d(0x1aa)](_0x23938f[_0x28b98d(0x189)])&&_0x23938f[_0x28b98d(0x189)][_0x28b98d(0x171)](_0x1b9890=>typeof _0x1b9890===_0x28b98d(0x1b3)&&_0x1b9890['includes'](_0x28b98d(0x194)))&&_0x29a800['push'](_0x4b1942);}_0x29a800['length']>0x0&&(_0x5db8ee={'path':_0x1fa32e,'keys':_0x29a800});}}catch{}const _0x5e60c9=_0x591952[_0x28b98d(0x15b)]>0x0||_0x56fcd9!==null;let _0x597bcd=null;const _0x2befb4=resolve(_0x39dff0,'package.json');if(existsSync(_0x2befb4))try{const _0x4e71a3=JSON[_0x28b98d(0x186)](readFileSync(_0x2befb4,_0x28b98d(0x1de)));for(const _0x571813 of['dependencies',_0x28b98d(0x1cf)]){const _0xe9d49=_0x4e71a3?.[_0x571813]?.[_0x28b98d(0x174)];if(typeof _0xe9d49===_0x28b98d(0x1b3)){_0xe9d49!==_0x28b98d(0x1bd)&&(_0x597bcd={'pkgPath':_0x2befb4,'currentVersion':_0xe9d49,'field':_0x571813});break;}}}catch{}return{'configMigration':_0x56fcd9,'oldArtifacts':_0x591952,'oldMcpConfig':_0x5db8ee,'needsSkillSwap':_0x5e60c9,'sdkUpgrade':_0x597bcd};}function printReport(_0x2fd213){const _0x2640b9=a156_0x3f57d2,{configMigration:_0x50cbf6,oldArtifacts:_0x14074e,oldMcpConfig:_0x3b8c24,needsSkillSwap:_0x326c0b}=_0x2fd213;console[_0x2640b9(0x1c5)](''),console[_0x2640b9(0x1c5)](a156_0xc020fa['bold'](_0x2640b9(0x1dc))),console[_0x2640b9(0x1c5)]('');_0x50cbf6?(console[_0x2640b9(0x1c5)](a156_0xc020fa[_0x2640b9(0x1ba)]('Config\x20file:')+('\x20\x20'+a156_0xc020fa[_0x2640b9(0x167)](_0x50cbf6[_0x2640b9(0x172)]))),console[_0x2640b9(0x1c5)](_0x2640b9(0x15e)+(_0x50cbf6[_0x2640b9(0x1da)]?a156_0xc020fa[_0x2640b9(0x1af)](_0x2640b9(0x18c)):a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x169)))),console[_0x2640b9(0x1c5)](_0x2640b9(0x1a1)+_0x50cbf6[_0x2640b9(0x1a4)][_0x2640b9(0x1c1)](',\x20')),console['log'](_0x2640b9(0x1a5))):console['log'](a156_0xc020fa[_0x2640b9(0x1ba)]('Config\x20file:')+'\x20\x20'+a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x1a0)));console['log']('');if(_0x14074e['length']>0x0){console['log'](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x1c8)));for(const _0x47e4d4 of _0x14074e){console[_0x2640b9(0x1c5)]('\x20\x20'+a156_0xc020fa[_0x2640b9(0x158)]('FOUND')+'\x20\x20'+_0x47e4d4);}console[_0x2640b9(0x1c5)]('\x20\x20Action:\x20delete');}else console[_0x2640b9(0x1c5)](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x1c8))+'\x20\x20'+a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x1d7)));console[_0x2640b9(0x1c5)]('');_0x3b8c24?(console[_0x2640b9(0x1c5)](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x192))+('\x20\x20'+a156_0xc020fa[_0x2640b9(0x167)](_0x3b8c24['path'])+_0x2640b9(0x1c4)+_0x3b8c24[_0x2640b9(0x184)][_0x2640b9(0x1c1)](',\x20'))),console[_0x2640b9(0x1c5)](_0x2640b9(0x1ab))):console[_0x2640b9(0x1c5)](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x192))+'\x20\x20'+a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x193)));console[_0x2640b9(0x1c5)](''),console['log'](a156_0xc020fa[_0x2640b9(0x1ba)]('Skill\x20swap:')+('\x20\x20'+(_0x326c0b?a156_0xc020fa[_0x2640b9(0x167)](_0x2640b9(0x162)):a156_0xc020fa[_0x2640b9(0x1af)](_0x2640b9(0x1cd)))));_0x326c0b&&console[_0x2640b9(0x1c5)](_0x2640b9(0x1a6)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x2640b9(0x1c5)]('');if(_0x2fd213[_0x2640b9(0x1a8)]){const {currentVersion:_0x222580,field:_0x430aa6,pkgPath:_0x300aa0}=_0x2fd213[_0x2640b9(0x1a8)];console['log'](a156_0xc020fa[_0x2640b9(0x1ba)](_0x2640b9(0x1c6))+('\x20\x20'+a156_0xc020fa[_0x2640b9(0x167)](_0x300aa0))),console['log'](_0x2640b9(0x161)+_0x430aa6+':\x20'+a156_0xc020fa['yellow'](_0x222580)+'\x20→\x20'+a156_0xc020fa['green']('latest')),console[_0x2640b9(0x1c5)](_0x2640b9(0x178));}else console[_0x2640b9(0x1c5)](a156_0xc020fa['cyan'](_0x2640b9(0x1c6))+'\x20\x20'+a156_0xc020fa[_0x2640b9(0x199)](_0x2640b9(0x180)));console[_0x2640b9(0x1c5)]('');}function execConfigMigration(_0x4ff54d,_0x488872){const _0x3bdb08=a156_0x3f57d2,{configMigration:_0x547dc3}=_0x4ff54d;if(!_0x547dc3?.[_0x3bdb08(0x172)])return{'step':0x1,'label':_0x3bdb08(0x1a2),'ok':!![],'detail':_0x3bdb08(0x191)};const _0x41eb12=readConfigFile(_0x547dc3[_0x3bdb08(0x172)]),_0x88f372=resolve(_0x488872,NEW_CONFIG_NAME),_0x1a6da3=_0x547dc3['hasNewConfig']?readConfigFile(_0x88f372):{};for(const [_0x2721de,_0x23ffe8]of Object[_0x3bdb08(0x187)](_0x41eb12)){!(_0x2721de in _0x1a6da3)&&(_0x1a6da3[_0x2721de]=_0x23ffe8);}writeConfigFile(_0x88f372,_0x1a6da3);const _0x1a6fa4=_0x547dc3[_0x3bdb08(0x172)]+_0x3bdb08(0x1b0);return renameSync(_0x547dc3[_0x3bdb08(0x172)],_0x1a6fa4),{'step':0x1,'label':_0x3bdb08(0x1a2),'ok':!![],'detail':_0x547dc3['oldPath']+_0x3bdb08(0x19b)+_0x88f372+_0x3bdb08(0x17a)+_0x1a6fa4+')'};}function a156_0x2e5e(){const _0x24b65c=['No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','stringify','CANCEL','gray','oldMcpConfig','\x20→\x20','values','isDirectory','999921wMgkLJ','oldArtifacts','no\x20legacy\x20config\x20found','\x20\x20Fields\x20to\x20migrate:\x20','Config\x20migration','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','fields','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Step\x204/7:\x20Cleaning\x20MCP\x20config...','sdkUpgrade','.cursor/mcp.json','isArray','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','yes','\x20\x20#\x20or','done','green','.bak','.cursor/rules/lovrabet_rules.mdc','inherit','string','push','9MiBVVa','464AkNLlL','\x20\x20bun\x20install','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Remove\x20old\x20skill','cyan','lovrabet/rabetbase\x20installed\x20globally','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','latest','5xFzqJX','undefined','white','join','Upgrade\x20completed\x20successfully!','lovrabet/rabetbase','\x20→\x20keys:\x20','log','@lovrabet/sdk:','\x20removed','Legacy\x20artifacts:','\x20→\x20latest','\x20\x20\x20\x20\x20\x20\x20','no\x20matching\x20entry\x20found','11QFIiDV','not\x20needed','===\x20Upgrade\x20Summary\x20===','devDependencies','detail','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','filter','start','\x20removed\x20(','\x20from\x20','error','none\x20found','status','Remove\x20.lovrabet/','hasNewConfig','skipped','===\x20Upgrade\x20Analysis\x20===','includes','utf8','5088522fwJSqC','red','files','Clean\x20MCP\x20config','length','.claude/skills/lovrabet','46564ELkhbq','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Upgrade\x20cancelled.','message','\x20\x20Current\x20version\x20in\x20','needed','255770ESxxHv','6LxTkdN','fail','Step\x205/7:\x20Removing\x20old\x20skill...','yellow','exit\x20','not\x20found\x20(will\x20create)','983668raYPsp','5978436wtvRXy','succeed','Step\x206/7:\x20Installing\x20new\x20skill...','Upgrade\x20@lovrabet/sdk','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','.lovrabet','some','oldPath','object','@lovrabet/sdk','Step\x201/7:\x20Migrating\x20config...','FAIL','8373260fPHuml','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','failed','\x20(backup:\x20','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','[\x22@lovrabet/sdk\x22]:\x20','Proceed\x20with\x20upgrade?','label','Install\x20new\x20skill','not\x20found\x20or\x20already\x20at\x20latest','bold','Step\x204/7:\x20MCP\x20config\x20—\x20','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','keys','step','parse','entries','mcpServers','args','needsSkillSwap','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','already\x20exists\x20(will\x20merge)','Step\x201/7:\x20Config\x20migration\x20—\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','configMigration','skipped\x20(no\x20legacy\x20config)','MCP\x20config:','no\x20legacy\x20entry','@lovrabet/dataset-mcp-server','path'];a156_0x2e5e=function(){return _0x24b65c;};return a156_0x2e5e();}function execRemoveOldArtifacts(_0x2b3201){const _0x10bd53=a156_0x3f57d2,_0x9fe870=[];for(const _0x40e9f3 of _0x2b3201){try{if(!existsSync(_0x40e9f3))continue;const _0x1b978b=tryStat(_0x40e9f3);_0x1b978b?.[_0x10bd53(0x19d)]()?rmSync(_0x40e9f3,{'recursive':!![],'force':!![]}):unlinkSync(_0x40e9f3);}catch(_0x18f857){_0x9fe870[_0x10bd53(0x1b4)](_0x40e9f3+':\x20'+_0x18f857[_0x10bd53(0x160)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x9fe870[_0x10bd53(0x15b)]===0x0,'detail':_0x9fe870['length']>0x0?_0x2b3201[_0x10bd53(0x15b)]-_0x9fe870[_0x10bd53(0x15b)]+'/'+_0x2b3201[_0x10bd53(0x15b)]+_0x10bd53(0x1d4)+_0x9fe870[_0x10bd53(0x1c1)](';\x20')+')':_0x2b3201['length']+_0x10bd53(0x1c7)};}function execCleanMcp(_0x334ae3){const _0x59c11b=a156_0x3f57d2;if(!_0x334ae3['oldMcpConfig'])return{'step':0x4,'label':_0x59c11b(0x15a),'ok':!![],'detail':'skipped'};try{const _0x1effdf=readFileSync(_0x334ae3[_0x59c11b(0x19a)][_0x59c11b(0x195)],_0x59c11b(0x1de)),_0x1de3ce=JSON[_0x59c11b(0x186)](_0x1effdf);if(_0x1de3ce?.[_0x59c11b(0x188)]&&typeof _0x1de3ce[_0x59c11b(0x188)]===_0x59c11b(0x173)){const _0x591985=[];for(const [_0x169c97,_0x4b0ee5]of Object['entries'](_0x1de3ce['mcpServers'])){_0x4b0ee5?.[_0x59c11b(0x189)]&&Array[_0x59c11b(0x1aa)](_0x4b0ee5[_0x59c11b(0x189)])&&_0x4b0ee5[_0x59c11b(0x189)]['some'](_0x40017a=>typeof _0x40017a===_0x59c11b(0x1b3)&&_0x40017a[_0x59c11b(0x1dd)](_0x59c11b(0x194)))&&_0x591985[_0x59c11b(0x1b4)](_0x169c97);}for(const _0x4e4e45 of _0x591985){delete _0x1de3ce['mcpServers'][_0x4e4e45];}return _0x591985[_0x59c11b(0x15b)]>0x0&&writeFileSync(_0x334ae3['oldMcpConfig'][_0x59c11b(0x195)],JSON[_0x59c11b(0x197)](_0x1de3ce,null,0x2)+'\x0a',_0x59c11b(0x1de)),{'step':0x4,'label':_0x59c11b(0x15a),'ok':!![],'detail':'removed\x20'+_0x591985[_0x59c11b(0x1c1)](',\x20')+_0x59c11b(0x1d5)+_0x334ae3[_0x59c11b(0x19a)][_0x59c11b(0x195)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x59c11b(0x1cb)};}catch(_0x2f366a){return{'step':0x4,'label':_0x59c11b(0x15a),'ok':![],'detail':_0x2f366a[_0x59c11b(0x160)]};}}function execSkillsRemove(_0x1ac766,_0x3a75a3){const _0x2033a0=a156_0x3f57d2,_0x2a57de=runNpxSkillsRemove(_0x1ac766,{'stdio':_0x2033a0(0x1b2),'yes':_0x3a75a3});return{'step':0x5,'label':_0x2033a0(0x1b9),'ok':_0x2a57de['ok'],'detail':_0x2a57de['ok']?'lovrabet/lovrabet-skill\x20removed':_0x2a57de[_0x2033a0(0x1d6)]??_0x2033a0(0x168)+_0x2a57de[_0x2033a0(0x1d8)]};}function execSkillsAdd(_0x260e83,_0x4f5336){const _0x260487=a156_0x3f57d2,_0x3ecaae=runNpxSkillsAddGlobal(_0x260e83,_0x260487(0x1c3),{'stdio':'inherit','yes':_0x4f5336});return{'step':0x6,'label':_0x260487(0x17f),'ok':_0x3ecaae['ok'],'detail':_0x3ecaae['ok']?_0x260487(0x1bb):_0x3ecaae[_0x260487(0x1d6)]??'exit\x20'+_0x3ecaae[_0x260487(0x1d8)]};}function a156_0x3f5b(_0x1c5f3a,_0x217c47){_0x1c5f3a=_0x1c5f3a-0x157;const _0x2e5e30=a156_0x2e5e();let _0x3f5b1b=_0x2e5e30[_0x1c5f3a];return _0x3f5b1b;}function execUpgradeSdk(_0x192583){const _0x2acc65=a156_0x3f57d2;if(!_0x192583[_0x2acc65(0x1a8)])return{'step':0x7,'label':_0x2acc65(0x16e),'ok':!![],'detail':_0x2acc65(0x18e)};const {pkgPath:_0x273d77,currentVersion:_0x5505a5,field:_0xbf7bf1}=_0x192583['sdkUpgrade'];try{const _0x181eff=readFileSync(_0x273d77,'utf8'),_0x9fd791=JSON[_0x2acc65(0x186)](_0x181eff);return _0x9fd791[_0xbf7bf1][_0x2acc65(0x174)]=_0x2acc65(0x1bd),writeFileSync(_0x273d77,JSON[_0x2acc65(0x197)](_0x9fd791,null,0x2)+'\x0a',_0x2acc65(0x1de)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0xbf7bf1+_0x2acc65(0x17c)+_0x5505a5+_0x2acc65(0x1c9)};}catch(_0x513afb){return{'step':0x7,'label':_0x2acc65(0x16e),'ok':![],'detail':_0x513afb[_0x2acc65(0x160)]};}}function tryStat(_0x29188e){try{return statSync(_0x29188e);}catch{return undefined;}}function printSummary(_0x3a769b){const _0x27a836=a156_0x3f57d2;console['log'](''),console[_0x27a836(0x1c5)](a156_0xc020fa[_0x27a836(0x181)](_0x27a836(0x1ce))),console[_0x27a836(0x1c5)]('');for(const _0x3531a1 of _0x3a769b){const _0x59c03f=_0x3531a1['ok']?a156_0xc020fa[_0x27a836(0x1af)]('OK'):a156_0xc020fa[_0x27a836(0x158)](_0x27a836(0x176));console['log']('\x20\x20'+_0x59c03f+'\x20\x20Step\x20'+_0x3531a1[_0x27a836(0x185)]+':\x20'+_0x3531a1[_0x27a836(0x17e)]);if(_0x3531a1[_0x27a836(0x1d0)])console['log'](_0x27a836(0x1ca)+a156_0xc020fa[_0x27a836(0x199)](_0x3531a1[_0x27a836(0x1d0)]));}console[_0x27a836(0x1c5)]('');}export async function upgradeApp(_0x1fb839,_0x4b75d3){const _0x5b17fa=a156_0x3f57d2,_0x50b859=process['cwd'](),_0x5d290d=analyse(_0x50b859),_0x3ab4dc=!_0x5d290d[_0x5b17fa(0x190)]&&_0x5d290d[_0x5b17fa(0x19f)]['length']===0x0&&!_0x5d290d[_0x5b17fa(0x19a)]&&!_0x5d290d[_0x5b17fa(0x18a)]&&!_0x5d290d['sdkUpgrade'];if(_0x3ab4dc){console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x1af)](_0x5b17fa(0x196)));return;}printReport(_0x5d290d);const _0x11dfc0=!!(_0x4b75d3[_0x5b17fa(0x1ac)]||_0x4b75d3['Y']||_0x1fb839);if(!_0x11dfc0)try{const _0x3e0eed=await askConfirm(_0x5b17fa(0x17d));if(!_0x3e0eed){console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x199)](_0x5b17fa(0x15f)));return;}}catch(_0x4d291b){if(_0x4d291b?.[_0x5b17fa(0x160)]===_0x5b17fa(0x198)){console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x199)](_0x5b17fa(0x15f)));return;}throw _0x4d291b;}const _0x420368=[],_0x1c9f96=a156_0x3db68e({'text':_0x5b17fa(0x175),'color':_0x5b17fa(0x1ba)})[_0x5b17fa(0x1d3)](),_0x40ac17=execConfigMigration(_0x5d290d,_0x50b859);_0x420368[_0x5b17fa(0x1b4)](_0x40ac17),_0x1c9f96[_0x40ac17['ok']?_0x5b17fa(0x16c):_0x5b17fa(0x165)](_0x5b17fa(0x18d)+(_0x40ac17[_0x5b17fa(0x1d0)]??(_0x40ac17['ok']?_0x5b17fa(0x1ae):_0x5b17fa(0x179))));const _0x3ab631=resolve(_0x50b859,_0x5b17fa(0x170)),_0x19546c=a156_0x3db68e({'text':_0x5b17fa(0x16f),'color':'cyan'})[_0x5b17fa(0x1d3)]();if(existsSync(_0x3ab631))try{rmSync(_0x3ab631,{'recursive':!![],'force':!![]}),_0x19546c[_0x5b17fa(0x16c)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x420368[_0x5b17fa(0x1b4)]({'step':0x2,'label':_0x5b17fa(0x1d9),'ok':!![]});}catch(_0x8a2b58){_0x19546c[_0x5b17fa(0x165)](_0x5b17fa(0x183)+_0x8a2b58[_0x5b17fa(0x160)]),_0x420368['push']({'step':0x2,'label':_0x5b17fa(0x1d9),'ok':![],'detail':_0x8a2b58[_0x5b17fa(0x160)]});}else _0x19546c['info']('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x420368[_0x5b17fa(0x1b4)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x5b17fa(0x1db)});const _0x85483a=a156_0x3db68e({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x5b17fa(0x1ba)})['start'](),_0x2bc713=execRemoveOldArtifacts(_0x5d290d[_0x5b17fa(0x19f)]);_0x420368['push'](_0x2bc713),_0x85483a[_0x2bc713['ok']?_0x5b17fa(0x16c):'fail'](_0x5b17fa(0x1b8)+(_0x2bc713[_0x5b17fa(0x1d0)]??(_0x2bc713['ok']?'done':'failed')));const _0x2e2b7c=a156_0x3db68e({'text':_0x5b17fa(0x1a7),'color':_0x5b17fa(0x1ba)})[_0x5b17fa(0x1d3)](),_0x47184b=execCleanMcp(_0x5d290d);_0x420368[_0x5b17fa(0x1b4)](_0x47184b),_0x2e2b7c[_0x47184b['ok']?'succeed':_0x5b17fa(0x165)](_0x5b17fa(0x182)+(_0x47184b[_0x5b17fa(0x1d0)]??(_0x47184b['ok']?_0x5b17fa(0x1ae):_0x5b17fa(0x179))));const _0x4e4a51=a156_0x3db68e({'text':_0x5b17fa(0x166),'color':_0x5b17fa(0x1ba)})[_0x5b17fa(0x1d3)](),_0x53f237=execSkillsRemove(_0x50b859,_0x11dfc0);_0x420368[_0x5b17fa(0x1b4)](_0x53f237),_0x4e4a51[_0x53f237['ok']?_0x5b17fa(0x16c):'fail'](_0x5b17fa(0x18b)+(_0x53f237['detail']??(_0x53f237['ok']?_0x5b17fa(0x1ae):'failed')));const _0x748ca=a156_0x3db68e({'text':_0x5b17fa(0x16d),'color':_0x5b17fa(0x1ba)})[_0x5b17fa(0x1d3)](),_0x1cc22c=execSkillsAdd(_0x50b859,_0x11dfc0);_0x420368['push'](_0x1cc22c),_0x748ca[_0x1cc22c['ok']?_0x5b17fa(0x16c):'fail']('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x1cc22c[_0x5b17fa(0x1d0)]??(_0x1cc22c['ok']?_0x5b17fa(0x1ae):'failed')));const _0x3c3fd1=a156_0x3db68e({'text':_0x5b17fa(0x17b),'color':'cyan'})[_0x5b17fa(0x1d3)](),_0x24bcb3=execUpgradeSdk(_0x5d290d);_0x420368[_0x5b17fa(0x1b4)](_0x24bcb3),_0x3c3fd1[_0x24bcb3['ok']?_0x5b17fa(0x16c):'fail'](_0x5b17fa(0x1d1)+(_0x24bcb3[_0x5b17fa(0x1d0)]??(_0x24bcb3['ok']?'done':'failed'))),printSummary(_0x420368);const _0x5f153b=_0x420368[_0x5b17fa(0x171)](_0x2205bf=>!_0x2205bf['ok']);_0x5f153b?console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x167)](_0x5b17fa(0x1a3))):console[_0x5b17fa(0x1c5)](a156_0xc020fa['green'](_0x5b17fa(0x1c2))),_0x24bcb3['ok']&&_0x5d290d[_0x5b17fa(0x1a8)]&&(console[_0x5b17fa(0x1c5)](''),console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x181)][_0x5b17fa(0x1ba)](_0x5b17fa(0x18f))),console[_0x5b17fa(0x1c5)](a156_0xc020fa[_0x5b17fa(0x1ba)](_0x5b17fa(0x1bc))),console[_0x5b17fa(0x1c5)](''),console[_0x5b17fa(0x1c5)](a156_0xc020fa['white']('\x20\x20npm\x20install')),console['log'](a156_0xc020fa[_0x5b17fa(0x1c0)](_0x5b17fa(0x1ad))),console[_0x5b17fa(0x1c5)](a156_0xc020fa['white'](_0x5b17fa(0x1b7))),console[_0x5b17fa(0x1c5)](''));}
1
+ (function(_0x227123,_0x52e6cf){const _0x53c9be=a163_0x44e3,_0x1369ee=_0x227123();while(!![]){try{const _0x14eb8f=parseInt(_0x53c9be(0x1bf))/0x1+-parseInt(_0x53c9be(0x1e2))/0x2+parseInt(_0x53c9be(0x1a0))/0x3+parseInt(_0x53c9be(0x16f))/0x4*(parseInt(_0x53c9be(0x1b1))/0x5)+parseInt(_0x53c9be(0x179))/0x6+parseInt(_0x53c9be(0x1ae))/0x7+parseInt(_0x53c9be(0x1be))/0x8*(-parseInt(_0x53c9be(0x1a4))/0x9);if(_0x14eb8f===_0x52e6cf)break;else _0x1369ee['push'](_0x1369ee['shift']());}catch(_0x347521){_0x1369ee['push'](_0x1369ee['shift']());}}}(a163_0x3d0a,0x6dcf1));function a163_0x3d0a(){const _0x59090b=['skipped','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Upgrade\x20@lovrabet/sdk','Remove\x20.lovrabet/','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','length','8mHihws','keys','not\x20found\x20(will\x20create)','object','string','gray','\x20(backup:\x20','Skill\x20swap:','start','succeed','1496994NFapRw','fail','needed','Step\x204/7:\x20MCP\x20config\x20—\x20','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','[\x22@lovrabet/sdk\x22]:\x20','isArray','Step\x204/7:\x20Cleaning\x20MCP\x20config...','oldArtifacts','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','.bak','some','message','\x20from\x20','isDirectory','\x20\x20\x20\x20\x20\x20\x20','done','values','Config\x20migration','green','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','cyan','.cursor/mcp.json','.cursor/rules/lovrabet_rules.mdc','\x20→\x20latest','entries','\x20\x20Current\x20version\x20in\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','none\x20found','@lovrabet/sdk:','not\x20needed','Upgrade\x20completed\x20successfully!','Legacy\x20artifacts:','yes','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','exit\x20','Config\x20file:','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','2609205AGspfj','configMigration','push','CANCEL','11925FbsubK','sdkUpgrade','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','.lovrabet','\x20removed','failed','log','parse','FOUND','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','5942062qbobwZ','filter','Step\x205/7:\x20Removing\x20old\x20skill...','105905NrWZiZ','includes','bold','\x20→\x20keys:\x20','path','not\x20found\x20or\x20already\x20at\x20latest','skipped\x20(no\x20legacy\x20config)','Remove\x20old\x20skill','cwd','latest','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','files','undefined','10064RYpmFF','353724zgiboP','Proceed\x20with\x20upgrade?','no\x20legacy\x20config\x20found','Install\x20new\x20skill','needsSkillSwap','\x20\x20Fields\x20to\x20migrate:\x20','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Step\x201/7:\x20Migrating\x20config...','utf8','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','detail','Remove\x20legacy\x20artifacts','error','join','devDependencies','@lovrabet/dataset-mcp-server','\x20\x20bun\x20install','already\x20exists\x20(will\x20merge)','package.json','oldPath','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','stringify','Clean\x20MCP\x20config','white','args','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','\x20\x20#\x20or','Upgrade\x20cancelled.','===\x20Upgrade\x20Summary\x20===','mcpServers','MCP\x20config:','info','yellow','\x20→\x20','status','495118KGrjwj','@lovrabet/sdk','FAIL','\x20\x20npm\x20install','oldMcpConfig','no\x20matching\x20entry\x20found','lovrabet/lovrabet-skill\x20removed'];a163_0x3d0a=function(){return _0x59090b;};return a163_0x3d0a();}import a163_0x1ae510 from'chalk';import a163_0x3fe615 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';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x31d46c=>_0x31d46c!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x23000a){const _0x597002=a163_0x44e3,_0x4eadd6=[];for(const _0x301e9a of Object[_0x597002(0x18a)](CORE_IDE_CONFIGS)){if(_0x301e9a[_0x597002(0x1bc)])for(const _0x957fd7 of _0x301e9a[_0x597002(0x1bc)]){_0x4eadd6['push'](resolve(_0x23000a,_0x957fd7[_0x597002(0x1b5)]));}}return _0x4eadd6;}function analyse(_0x47d6f1){const _0x239cc9=a163_0x44e3;let _0x5ca461=null;const _0x3488dc=resolve(_0x47d6f1,NEW_CONFIG_NAME),_0x3982b4=existsSync(_0x3488dc);for(const _0x58f5cc of LEGACY_CONFIG_NAMES){const _0xccb692=resolve(_0x47d6f1,_0x58f5cc);if(existsSync(_0xccb692)){const _0x11e37d=readConfigFile(_0xccb692),_0xd78be1=Object[_0x239cc9(0x170)](_0x11e37d)[_0x239cc9(0x1af)](_0x4aa062=>typeof _0x11e37d[_0x4aa062]!==_0x239cc9(0x1bd));_0x5ca461={'oldPath':_0xccb692,'hasNewConfig':_0x3982b4,'fields':_0xd78be1};break;}}const _0x911946=[],_0x323368=resolve(_0x47d6f1,_0x239cc9(0x1a7));if(existsSync(_0x323368))_0x911946[_0x239cc9(0x1a2)](_0x323368);const _0x2534b5=resolve(_0x47d6f1,_0x239cc9(0x190));if(existsSync(_0x2534b5))_0x911946['push'](_0x2534b5);const _0x5f2725=resolve(_0x47d6f1,'.claude/skills/lovrabet');if(existsSync(_0x5f2725))_0x911946['push'](_0x5f2725);for(const _0x1d3e39 of collectIdeSkillFiles(_0x47d6f1)){if(existsSync(_0x1d3e39))_0x911946[_0x239cc9(0x1a2)](_0x1d3e39);}let _0x390a43=null;const _0x215cce=resolve(_0x47d6f1,_0x239cc9(0x18f));if(existsSync(_0x215cce))try{const _0x47393f=JSON[_0x239cc9(0x1ab)](readFileSync(_0x215cce,'utf8'));if(_0x47393f?.[_0x239cc9(0x1dc)]&&typeof _0x47393f[_0x239cc9(0x1dc)]===_0x239cc9(0x172)){const _0x44f2b6=[];for(const [_0x2a98fe,_0x3993ad]of Object[_0x239cc9(0x192)](_0x47393f[_0x239cc9(0x1dc)])){const _0x197856=_0x3993ad;_0x197856?.[_0x239cc9(0x1d7)]&&Array[_0x239cc9(0x17f)](_0x197856['args'])&&_0x197856[_0x239cc9(0x1d7)][_0x239cc9(0x184)](_0x49134b=>typeof _0x49134b==='string'&&_0x49134b[_0x239cc9(0x1b2)](_0x239cc9(0x1ce)))&&_0x44f2b6[_0x239cc9(0x1a2)](_0x2a98fe);}_0x44f2b6['length']>0x0&&(_0x390a43={'path':_0x215cce,'keys':_0x44f2b6});}}catch{}const _0xf9e5ac=_0x911946['length']>0x0||_0x5ca461!==null;let _0x325d14=null;const _0x29c711=resolve(_0x47d6f1,_0x239cc9(0x1d1));if(existsSync(_0x29c711))try{const _0x4695f2=JSON[_0x239cc9(0x1ab)](readFileSync(_0x29c711,'utf8'));for(const _0x5609ce of['dependencies',_0x239cc9(0x1cd)]){const _0x2a456a=_0x4695f2?.[_0x5609ce]?.[_0x239cc9(0x1e3)];if(typeof _0x2a456a===_0x239cc9(0x173)){_0x2a456a!=='latest'&&(_0x325d14={'pkgPath':_0x29c711,'currentVersion':_0x2a456a,'field':_0x5609ce});break;}}}catch{}return{'configMigration':_0x5ca461,'oldArtifacts':_0x911946,'oldMcpConfig':_0x390a43,'needsSkillSwap':_0xf9e5ac,'sdkUpgrade':_0x325d14};}function printReport(_0x5cf94){const _0x5665ce=a163_0x44e3,{configMigration:_0x5a8fd3,oldArtifacts:_0x1dd65f,oldMcpConfig:_0x3b19c1,needsSkillSwap:_0x41babc}=_0x5cf94;console[_0x5665ce(0x1aa)](''),console[_0x5665ce(0x1aa)](a163_0x1ae510['bold']('===\x20Upgrade\x20Analysis\x20===')),console['log']('');_0x5a8fd3?(console[_0x5665ce(0x1aa)](a163_0x1ae510[_0x5665ce(0x18e)]('Config\x20file:')+('\x20\x20'+a163_0x1ae510[_0x5665ce(0x1df)](_0x5a8fd3[_0x5665ce(0x1d2)]))),console['log'](_0x5665ce(0x194)+(_0x5a8fd3['hasNewConfig']?a163_0x1ae510[_0x5665ce(0x18c)](_0x5665ce(0x1d0)):a163_0x1ae510['gray'](_0x5665ce(0x171)))),console[_0x5665ce(0x1aa)](_0x5665ce(0x1c4)+_0x5a8fd3['fields'][_0x5665ce(0x1cc)](',\x20')),console[_0x5665ce(0x1aa)](_0x5665ce(0x19b))):console['log'](a163_0x1ae510[_0x5665ce(0x18e)](_0x5665ce(0x19d))+'\x20\x20'+a163_0x1ae510[_0x5665ce(0x174)](_0x5665ce(0x1c1)));console[_0x5665ce(0x1aa)]('');if(_0x1dd65f[_0x5665ce(0x16e)]>0x0){console['log'](a163_0x1ae510[_0x5665ce(0x18e)](_0x5665ce(0x199)));for(const _0x5edae9 of _0x1dd65f){console[_0x5665ce(0x1aa)]('\x20\x20'+a163_0x1ae510['red'](_0x5665ce(0x1ac))+'\x20\x20'+_0x5edae9);}console[_0x5665ce(0x1aa)]('\x20\x20Action:\x20delete');}else console[_0x5665ce(0x1aa)](a163_0x1ae510[_0x5665ce(0x18e)](_0x5665ce(0x199))+'\x20\x20'+a163_0x1ae510['gray'](_0x5665ce(0x195)));console['log']('');_0x3b19c1?(console[_0x5665ce(0x1aa)](a163_0x1ae510[_0x5665ce(0x18e)](_0x5665ce(0x1dd))+('\x20\x20'+a163_0x1ae510['yellow'](_0x3b19c1[_0x5665ce(0x1b5)])+_0x5665ce(0x1b4)+_0x3b19c1[_0x5665ce(0x170)][_0x5665ce(0x1cc)](',\x20'))),console['log'](_0x5665ce(0x16d))):console['log'](a163_0x1ae510[_0x5665ce(0x18e)](_0x5665ce(0x1dd))+'\x20\x20'+a163_0x1ae510[_0x5665ce(0x174)]('no\x20legacy\x20entry'));console[_0x5665ce(0x1aa)](''),console['log'](a163_0x1ae510[_0x5665ce(0x18e)](_0x5665ce(0x176))+('\x20\x20'+(_0x41babc?a163_0x1ae510[_0x5665ce(0x1df)](_0x5665ce(0x17b)):a163_0x1ae510[_0x5665ce(0x18c)](_0x5665ce(0x197)))));_0x41babc&&console[_0x5665ce(0x1aa)](_0x5665ce(0x17d)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x5665ce(0x1aa)]('');if(_0x5cf94[_0x5665ce(0x1a5)]){const {currentVersion:_0x59cbcd,field:_0x25380b,pkgPath:_0xf73d34}=_0x5cf94[_0x5665ce(0x1a5)];console[_0x5665ce(0x1aa)](a163_0x1ae510['cyan'](_0x5665ce(0x196))+('\x20\x20'+a163_0x1ae510['yellow'](_0xf73d34))),console[_0x5665ce(0x1aa)](_0x5665ce(0x193)+_0x25380b+':\x20'+a163_0x1ae510['yellow'](_0x59cbcd)+'\x20→\x20'+a163_0x1ae510[_0x5665ce(0x18c)](_0x5665ce(0x1ba))),console[_0x5665ce(0x1aa)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console['log'](a163_0x1ae510[_0x5665ce(0x18e)](_0x5665ce(0x196))+'\x20\x20'+a163_0x1ae510[_0x5665ce(0x174)](_0x5665ce(0x1b6)));console['log']('');}function a163_0x44e3(_0x378e83,_0x4f349d){_0x378e83=_0x378e83-0x16b;const _0x3d0acc=a163_0x3d0a();let _0x44e3a9=_0x3d0acc[_0x378e83];return _0x44e3a9;}function execConfigMigration(_0x22a78d,_0x34e764){const _0xf3b86c=a163_0x44e3,{configMigration:_0x3901fd}=_0x22a78d;if(!_0x3901fd?.[_0xf3b86c(0x1d2)])return{'step':0x1,'label':_0xf3b86c(0x18b),'ok':!![],'detail':_0xf3b86c(0x1b7)};const _0x384ff6=readConfigFile(_0x3901fd[_0xf3b86c(0x1d2)]),_0x1e5d87=resolve(_0x34e764,NEW_CONFIG_NAME),_0x1a915c=_0x3901fd['hasNewConfig']?readConfigFile(_0x1e5d87):{};for(const [_0x81705b,_0x5f0b55]of Object[_0xf3b86c(0x192)](_0x384ff6)){!(_0x81705b in _0x1a915c)&&(_0x1a915c[_0x81705b]=_0x5f0b55);}writeConfigFile(_0x1e5d87,_0x1a915c);const _0x5be433=_0x3901fd['oldPath']+_0xf3b86c(0x183);return renameSync(_0x3901fd[_0xf3b86c(0x1d2)],_0x5be433),{'step':0x1,'label':_0xf3b86c(0x18b),'ok':!![],'detail':_0x3901fd[_0xf3b86c(0x1d2)]+_0xf3b86c(0x1e0)+_0x1e5d87+_0xf3b86c(0x175)+_0x5be433+')'};}function execRemoveOldArtifacts(_0x8df6fe){const _0x432347=a163_0x44e3,_0x333b64=[];for(const _0x216412 of _0x8df6fe){try{if(!existsSync(_0x216412))continue;const _0x19a4cc=tryStat(_0x216412);_0x19a4cc?.[_0x432347(0x187)]()?rmSync(_0x216412,{'recursive':!![],'force':!![]}):unlinkSync(_0x216412);}catch(_0x64cf95){_0x333b64[_0x432347(0x1a2)](_0x216412+':\x20'+_0x64cf95[_0x432347(0x185)]);}}return{'step':0x3,'label':_0x432347(0x1ca),'ok':_0x333b64['length']===0x0,'detail':_0x333b64[_0x432347(0x16e)]>0x0?_0x8df6fe[_0x432347(0x16e)]-_0x333b64[_0x432347(0x16e)]+'/'+_0x8df6fe[_0x432347(0x16e)]+'\x20removed\x20('+_0x333b64[_0x432347(0x1cc)](';\x20')+')':_0x8df6fe[_0x432347(0x16e)]+_0x432347(0x1a8)};}function execCleanMcp(_0x390511){const _0x399b16=a163_0x44e3;if(!_0x390511[_0x399b16(0x1e6)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x399b16(0x1e9)};try{const _0x2ccfd5=readFileSync(_0x390511['oldMcpConfig']['path'],_0x399b16(0x1c7)),_0x54bfb9=JSON[_0x399b16(0x1ab)](_0x2ccfd5);if(_0x54bfb9?.[_0x399b16(0x1dc)]&&typeof _0x54bfb9['mcpServers']===_0x399b16(0x172)){const _0x50a4f0=[];for(const [_0x4cd1e0,_0x454a59]of Object[_0x399b16(0x192)](_0x54bfb9[_0x399b16(0x1dc)])){_0x454a59?.[_0x399b16(0x1d7)]&&Array[_0x399b16(0x17f)](_0x454a59[_0x399b16(0x1d7)])&&_0x454a59['args']['some'](_0x137171=>typeof _0x137171===_0x399b16(0x173)&&_0x137171['includes'](_0x399b16(0x1ce)))&&_0x50a4f0['push'](_0x4cd1e0);}for(const _0x55dc28 of _0x50a4f0){delete _0x54bfb9['mcpServers'][_0x55dc28];}return _0x50a4f0['length']>0x0&&writeFileSync(_0x390511[_0x399b16(0x1e6)][_0x399b16(0x1b5)],JSON[_0x399b16(0x1d4)](_0x54bfb9,null,0x2)+'\x0a',_0x399b16(0x1c7)),{'step':0x4,'label':_0x399b16(0x1d5),'ok':!![],'detail':'removed\x20'+_0x50a4f0[_0x399b16(0x1cc)](',\x20')+_0x399b16(0x186)+_0x390511['oldMcpConfig']['path']};}return{'step':0x4,'label':_0x399b16(0x1d5),'ok':!![],'detail':_0x399b16(0x1e7)};}catch(_0x5188de){return{'step':0x4,'label':_0x399b16(0x1d5),'ok':![],'detail':_0x5188de[_0x399b16(0x185)]};}}function execSkillsRemove(_0x30a2ed,_0x339bb8){const _0x3744d4=a163_0x44e3,_0x45c9c6=runNpxSkillsRemove(_0x30a2ed,{'stdio':'inherit','yes':_0x339bb8});return{'step':0x5,'label':_0x3744d4(0x1b8),'ok':_0x45c9c6['ok'],'detail':_0x45c9c6['ok']?_0x3744d4(0x1e8):_0x45c9c6[_0x3744d4(0x1cb)]??_0x3744d4(0x19c)+_0x45c9c6['status']};}function execSkillsAdd(_0x2d19a3,_0x392095){const _0x20b1d6=a163_0x44e3,_0x5a2831=runNpxSkillsAddGlobal(_0x2d19a3,'lovrabet/rabetbase',{'stdio':'inherit','yes':_0x392095});return{'step':0x6,'label':_0x20b1d6(0x1c2),'ok':_0x5a2831['ok'],'detail':_0x5a2831['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x5a2831[_0x20b1d6(0x1cb)]??'exit\x20'+_0x5a2831[_0x20b1d6(0x1e1)]};}function execUpgradeSdk(_0x262513){const _0x453778=a163_0x44e3;if(!_0x262513['sdkUpgrade'])return{'step':0x7,'label':_0x453778(0x16b),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x191e7e,currentVersion:_0x20cbed,field:_0xd53ce8}=_0x262513[_0x453778(0x1a5)];try{const _0x3d4e1a=readFileSync(_0x191e7e,'utf8'),_0xbb1327=JSON[_0x453778(0x1ab)](_0x3d4e1a);return _0xbb1327[_0xd53ce8][_0x453778(0x1e3)]=_0x453778(0x1ba),writeFileSync(_0x191e7e,JSON['stringify'](_0xbb1327,null,0x2)+'\x0a',_0x453778(0x1c7)),{'step':0x7,'label':_0x453778(0x16b),'ok':!![],'detail':_0xd53ce8+_0x453778(0x17e)+_0x20cbed+_0x453778(0x191)};}catch(_0x306610){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x306610['message']};}}function tryStat(_0x4ad213){try{return statSync(_0x4ad213);}catch{return undefined;}}function printSummary(_0x312ead){const _0x505a7e=a163_0x44e3;console[_0x505a7e(0x1aa)](''),console[_0x505a7e(0x1aa)](a163_0x1ae510[_0x505a7e(0x1b3)](_0x505a7e(0x1db))),console[_0x505a7e(0x1aa)]('');for(const _0x289e05 of _0x312ead){const _0x28b0a5=_0x289e05['ok']?a163_0x1ae510[_0x505a7e(0x18c)]('OK'):a163_0x1ae510['red'](_0x505a7e(0x1e4));console['log']('\x20\x20'+_0x28b0a5+'\x20\x20Step\x20'+_0x289e05['step']+':\x20'+_0x289e05['label']);if(_0x289e05[_0x505a7e(0x1c9)])console[_0x505a7e(0x1aa)](_0x505a7e(0x188)+a163_0x1ae510['gray'](_0x289e05['detail']));}console['log']('');}export async function upgradeApp(_0x166941,_0x4f4818){const _0x1d1245=a163_0x44e3,_0x473bb6=process[_0x1d1245(0x1b9)](),_0x532a86=analyse(_0x473bb6),_0x2e9181=!_0x532a86[_0x1d1245(0x1a1)]&&_0x532a86['oldArtifacts'][_0x1d1245(0x16e)]===0x0&&!_0x532a86['oldMcpConfig']&&!_0x532a86[_0x1d1245(0x1c3)]&&!_0x532a86[_0x1d1245(0x1a5)];if(_0x2e9181){console[_0x1d1245(0x1aa)](a163_0x1ae510[_0x1d1245(0x18c)](_0x1d1245(0x1c8)));return;}printReport(_0x532a86);const _0x359759=!!(_0x4f4818[_0x1d1245(0x19a)]||_0x4f4818['Y']||_0x166941);if(!_0x359759)try{const _0x46b343=await askConfirm(_0x1d1245(0x1c0));if(!_0x46b343){console[_0x1d1245(0x1aa)](a163_0x1ae510[_0x1d1245(0x174)](_0x1d1245(0x1da)));return;}}catch(_0x38091b){if(_0x38091b?.[_0x1d1245(0x185)]===_0x1d1245(0x1a3)){console['log'](a163_0x1ae510[_0x1d1245(0x174)](_0x1d1245(0x1da)));return;}throw _0x38091b;}const _0x4de3b5=[],_0x333e02=a163_0x3fe615({'text':_0x1d1245(0x1c6),'color':_0x1d1245(0x18e)})['start'](),_0x4d1310=execConfigMigration(_0x532a86,_0x473bb6);_0x4de3b5[_0x1d1245(0x1a2)](_0x4d1310),_0x333e02[_0x4d1310['ok']?_0x1d1245(0x178):_0x1d1245(0x17a)](_0x1d1245(0x19f)+(_0x4d1310['detail']??(_0x4d1310['ok']?_0x1d1245(0x189):'failed')));const _0x3fed62=resolve(_0x473bb6,_0x1d1245(0x1a7)),_0x1a7fb8=a163_0x3fe615({'text':_0x1d1245(0x1d8),'color':_0x1d1245(0x18e)})[_0x1d1245(0x177)]();if(existsSync(_0x3fed62))try{rmSync(_0x3fed62,{'recursive':!![],'force':!![]}),_0x1a7fb8[_0x1d1245(0x178)](_0x1d1245(0x1a6)),_0x4de3b5[_0x1d1245(0x1a2)]({'step':0x2,'label':_0x1d1245(0x16c),'ok':!![]});}catch(_0x59b895){_0x1a7fb8['fail'](_0x1d1245(0x1bb)+_0x59b895[_0x1d1245(0x185)]),_0x4de3b5['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x59b895[_0x1d1245(0x185)]});}else _0x1a7fb8[_0x1d1245(0x1de)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x4de3b5['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':'skipped'});const _0xd4144=a163_0x3fe615({'text':_0x1d1245(0x1d3),'color':_0x1d1245(0x18e)})[_0x1d1245(0x177)](),_0x40f6ec=execRemoveOldArtifacts(_0x532a86[_0x1d1245(0x181)]);_0x4de3b5[_0x1d1245(0x1a2)](_0x40f6ec),_0xd4144[_0x40f6ec['ok']?_0x1d1245(0x178):'fail']('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x40f6ec[_0x1d1245(0x1c9)]??(_0x40f6ec['ok']?'done':_0x1d1245(0x1a9))));const _0x253909=a163_0x3fe615({'text':_0x1d1245(0x180),'color':_0x1d1245(0x18e)})[_0x1d1245(0x177)](),_0x569d95=execCleanMcp(_0x532a86);_0x4de3b5['push'](_0x569d95),_0x253909[_0x569d95['ok']?'succeed':'fail'](_0x1d1245(0x17c)+(_0x569d95['detail']??(_0x569d95['ok']?_0x1d1245(0x189):_0x1d1245(0x1a9))));const _0x562a24=a163_0x3fe615({'text':_0x1d1245(0x1b0),'color':_0x1d1245(0x18e)})[_0x1d1245(0x177)](),_0xcbf29=execSkillsRemove(_0x473bb6,_0x359759);_0x4de3b5[_0x1d1245(0x1a2)](_0xcbf29),_0x562a24[_0xcbf29['ok']?'succeed':_0x1d1245(0x17a)](_0x1d1245(0x19e)+(_0xcbf29['detail']??(_0xcbf29['ok']?_0x1d1245(0x189):_0x1d1245(0x1a9))));const _0xc6f6e1=a163_0x3fe615({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x1d1245(0x18e)})[_0x1d1245(0x177)](),_0x3d7fd2=execSkillsAdd(_0x473bb6,_0x359759);_0x4de3b5[_0x1d1245(0x1a2)](_0x3d7fd2),_0xc6f6e1[_0x3d7fd2['ok']?'succeed':'fail'](_0x1d1245(0x18d)+(_0x3d7fd2[_0x1d1245(0x1c9)]??(_0x3d7fd2['ok']?_0x1d1245(0x189):_0x1d1245(0x1a9))));const _0x408867=a163_0x3fe615({'text':_0x1d1245(0x1ea),'color':_0x1d1245(0x18e)})['start'](),_0x55b0f4=execUpgradeSdk(_0x532a86);_0x4de3b5[_0x1d1245(0x1a2)](_0x55b0f4),_0x408867[_0x55b0f4['ok']?_0x1d1245(0x178):_0x1d1245(0x17a)](_0x1d1245(0x182)+(_0x55b0f4[_0x1d1245(0x1c9)]??(_0x55b0f4['ok']?_0x1d1245(0x189):_0x1d1245(0x1a9)))),printSummary(_0x4de3b5);const _0x265992=_0x4de3b5[_0x1d1245(0x184)](_0x12598a=>!_0x12598a['ok']);_0x265992?console[_0x1d1245(0x1aa)](a163_0x1ae510[_0x1d1245(0x1df)](_0x1d1245(0x1c5))):console[_0x1d1245(0x1aa)](a163_0x1ae510[_0x1d1245(0x18c)](_0x1d1245(0x198))),_0x55b0f4['ok']&&_0x532a86[_0x1d1245(0x1a5)]&&(console[_0x1d1245(0x1aa)](''),console[_0x1d1245(0x1aa)](a163_0x1ae510[_0x1d1245(0x1b3)][_0x1d1245(0x18e)](_0x1d1245(0x1ad))),console['log'](a163_0x1ae510[_0x1d1245(0x18e)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x1d1245(0x1aa)](''),console[_0x1d1245(0x1aa)](a163_0x1ae510[_0x1d1245(0x1d6)](_0x1d1245(0x1e5))),console[_0x1d1245(0x1aa)](a163_0x1ae510['white'](_0x1d1245(0x1d9))),console['log'](a163_0x1ae510['white'](_0x1d1245(0x1cf))),console[_0x1d1245(0x1aa)](''));}
@@ -1 +1 @@
1
- const a157_0x50d7e3=a157_0x5218;(function(_0x3ab67a,_0x14efdb){const _0xf5572f=a157_0x5218,_0xd9f6f5=_0x3ab67a();while(!![]){try{const _0x25ce59=parseInt(_0xf5572f(0x197))/0x1*(-parseInt(_0xf5572f(0x19d))/0x2)+parseInt(_0xf5572f(0x19e))/0x3*(parseInt(_0xf5572f(0x172))/0x4)+-parseInt(_0xf5572f(0x199))/0x5+-parseInt(_0xf5572f(0x17a))/0x6*(parseInt(_0xf5572f(0x156))/0x7)+-parseInt(_0xf5572f(0x15b))/0x8+-parseInt(_0xf5572f(0x17f))/0x9*(-parseInt(_0xf5572f(0x198))/0xa)+parseInt(_0xf5572f(0x176))/0xb*(parseInt(_0xf5572f(0x173))/0xc);if(_0x25ce59===_0x14efdb)break;else _0xd9f6f5['push'](_0xd9f6f5['shift']());}catch(_0x2c842a){_0xd9f6f5['push'](_0xd9f6f5['shift']());}}}(a157_0x113a,0x5c90b));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';function a157_0x113a(){const _0x18c322=['commands','4wHcdQo','7260804wFElhK','Project','service','11SGcJhC','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','`rabetbase\x20skills`\x20has\x20been\x20removed.','preview','6tDrFGV','Async\x20Tasks','filter','skills','<script>','252KWQnvN','defaultCommand','login','read','Self\x20Update','App\x20Management','get','has','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','length','install','Menu','start','Database\x20Connections','show','Instant\x20API','\x20\x20[write]','Logs','Diagnostics','hidden','risk','map','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','Run\x20any\x20package.json\x20script','1xXsgFJ','235010PiYVNC','1445040harYPr','run','Run\x20Scripts','API\x20Development','412642ZphhyB','413529LhetFZ','Smart\x20List\x20Pages','Permissions','wildcardDef','use','3538101gySJZm','\x20\x20[high-risk-write]','BFF\x20Scripts','build','`\x20has\x20been\x20removed.','168152tlnPoH','set','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','Workspace','app\x20use','write','isSingleCommand','skill','create','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','`rabetbase\x20','SQL\x20Queries','Dataset\x20&\x20Operations','command','OCR','app','Quick\x20Start','File','Notification\x20Configuration','push','app\x20remote','remote'];a157_0x113a=function(){return _0x18c322;};return a157_0x113a();}import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/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{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';function a157_0x5218(_0x2c9c67,_0x51fd4f){_0x2c9c67=_0x2c9c67-0x156;const _0x113a7c=a157_0x113a();let _0x5218e0=_0x113a7c[_0x2c9c67];return _0x5218e0;}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(_0x2f4f42){const _0x288df9=a157_0x5218;for(const _0x233a43 of _0x2f4f42){definitions[_0x288df9(0x15c)](_0x233a43[_0x288df9(0x175)]+':'+_0x233a43['command'],_0x233a43);let _0x24c424=serviceGroups[_0x288df9(0x185)](_0x233a43['service']);!_0x24c424&&(_0x24c424=[],serviceGroups['set'](_0x233a43[_0x288df9(0x175)],_0x24c424)),_0x24c424[_0x288df9(0x16e)](_0x233a43);}}function registerDeclarativeService(_0x345886,_0x347fe7,_0x4edd4a){const _0x51ff6b=a157_0x5218;registerDefinitions(_0x347fe7);_0x4edd4a?.['wildcardDef']&&registerDefinitions([_0x4edd4a[_0x51ff6b(0x1a1)]]);const _0x48eca9=_0x45c08f=>_0x45c08f===_0x51ff6b(0x182)?'':_0x45c08f===_0x51ff6b(0x160)?_0x51ff6b(0x18f):_0x51ff6b(0x157),_0x4bc766={'service':_0x347fe7[0x0][_0x51ff6b(0x175)],'label':_0x345886,'commands':_0x347fe7[_0x51ff6b(0x17c)](_0x4f06e9=>!_0x4f06e9[_0x51ff6b(0x192)])[_0x51ff6b(0x194)](_0x47d946=>({'command':_0x47d946['command'],'description':_0x47d946['description'],'tag':_0x48eca9(_0x47d946[_0x51ff6b(0x193)])})),'declarative':!![],'defaultCommand':_0x4edd4a?.[_0x51ff6b(0x180)]??(_0x4edd4a?.[_0x51ff6b(0x161)]?_0x347fe7[0x0][_0x51ff6b(0x168)]:undefined),'wildcardDef':_0x4edd4a?.[_0x51ff6b(0x1a1)],'isSingleCommand':_0x4edd4a?.[_0x51ff6b(0x161)]};serviceRegistry[_0x51ff6b(0x16e)](_0x4bc766),serviceByName[_0x51ff6b(0x15c)](_0x4bc766[_0x51ff6b(0x175)],_0x4bc766);}registerDeclarativeService(a157_0x50d7e3(0x16b),initDefinitions,{'defaultCommand':a157_0x50d7e3(0x19a),'isSingleCommand':!![]}),registerDeclarativeService(a157_0x50d7e3(0x174),projectDefinitions),registerDeclarativeService(a157_0x50d7e3(0x15e),workspaceDefinitions),registerDeclarativeService(a157_0x50d7e3(0x184),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a157_0x50d7e3(0x181)}),registerDeclarativeService(a157_0x50d7e3(0x167),datasetDefinitions),registerDeclarativeService(a157_0x50d7e3(0x19f),pageDefinitions),registerDeclarativeService(a157_0x50d7e3(0x19c),apiDefinitions),registerDeclarativeService(a157_0x50d7e3(0x18e),dataDefinitions),registerDeclarativeService(a157_0x50d7e3(0x158),bffDefinitions),registerDeclarativeService(a157_0x50d7e3(0x16d),notificationDefinitions),registerDeclarativeService(a157_0x50d7e3(0x166),sqlDefinitions),registerDeclarativeService(a157_0x50d7e3(0x18c),dbDefinitions),registerDeclarativeService(a157_0x50d7e3(0x18a),menuDefinitions),registerDeclarativeService(a157_0x50d7e3(0x17b),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a157_0x50d7e3(0x1a0),permitDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a157_0x50d7e3(0x16c),fileDefinitions),registerDeclarativeService(a157_0x50d7e3(0x169),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a157_0x50d7e3(0x191),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a157_0x50d7e3(0x183),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a157_0x50d7e3(0x189)}),registerDeclarativeService(a157_0x50d7e3(0x190),logsDefinitions,{'defaultCommand':a157_0x50d7e3(0x18d)}),registerDeclarativeService(a157_0x50d7e3(0x19b),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a157_0x50d7e3(0x188)]-0x1];last[a157_0x50d7e3(0x171)]=[{'command':a157_0x50d7e3(0x17e),'description':a157_0x50d7e3(0x196),'tag':''}];}export const deprecatedAliases={'create':{'service':'project','command':a157_0x50d7e3(0x163)},'start':{'service':a157_0x50d7e3(0x19a),'command':a157_0x50d7e3(0x18b)},'build':{'service':a157_0x50d7e3(0x19a),'command':a157_0x50d7e3(0x159)},'preview':{'service':a157_0x50d7e3(0x19a),'command':a157_0x50d7e3(0x179)},'logout':{'service':'auth','command':'logout'}};const CLI_SKILL_INSTALL_REMOVED_HINT=a157_0x50d7e3(0x195),APP_REMOTE_REMOVED_HINT=a157_0x50d7e3(0x187),APP_USE_REMOVED_HINT=a157_0x50d7e3(0x164);export function resolveRemovedCommand(_0x3b7f72,_0x2863d2){const _0x26b9f5=a157_0x50d7e3;if(_0x3b7f72==='skill'){const _0x1058ba=_0x2863d2?'skill\x20'+_0x2863d2:_0x26b9f5(0x162);return{'command':_0x1058ba,'message':_0x26b9f5(0x165)+_0x1058ba+_0x26b9f5(0x15a),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x3b7f72===_0x26b9f5(0x17d))return{'command':_0x26b9f5(0x17d),'message':_0x26b9f5(0x178),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x3b7f72===_0x26b9f5(0x16a)&&_0x2863d2===_0x26b9f5(0x170))return{'command':_0x26b9f5(0x16f),'message':_0x26b9f5(0x177),'hint':APP_REMOTE_REMOVED_HINT};if(_0x3b7f72==='app'&&_0x2863d2===_0x26b9f5(0x1a2))return{'command':_0x26b9f5(0x15f),'message':_0x26b9f5(0x15d),'hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a157_0x50d7e3(0x163)},'menu':{'update':'asset-update'}};export function resolveDeprecatedSubcommand(_0x91c12d,_0x2a8f06){return deprecatedSubcommands[_0x91c12d]?.[_0x2a8f06];}export function findDefinition(_0x346aa4,_0x197d3e){const _0x39f942=a157_0x50d7e3;return definitions[_0x39f942(0x185)](_0x346aa4+':'+_0x197d3e);}export function isKnownService(_0x1ac987){const _0x1a90eb=a157_0x50d7e3;return serviceByName[_0x1a90eb(0x186)](_0x1ac987);}export function isDeclarativeService(_0x207253){const _0x5b5892=a157_0x50d7e3;return serviceGroups[_0x5b5892(0x186)](_0x207253)||serviceByName[_0x5b5892(0x185)](_0x207253)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x19565f){const _0xfa9e87=a157_0x50d7e3;return serviceByName[_0xfa9e87(0x185)](_0x19565f);}export function getLegacyHandler(_0x45ebc9,_0x77ee1a){return undefined;}export function getAllDefinitions(){return Array['from'](definitions['values']());}
1
+ const a164_0x4058c4=a164_0x362c;(function(_0x1d12dd,_0x321aae){const _0x376638=a164_0x362c,_0x25fa1b=_0x1d12dd();while(!![]){try{const _0xd92244=-parseInt(_0x376638(0x1b7))/0x1+parseInt(_0x376638(0x1ce))/0x2*(parseInt(_0x376638(0x1fe))/0x3)+parseInt(_0x376638(0x1e0))/0x4+parseInt(_0x376638(0x1d6))/0x5+parseInt(_0x376638(0x1f0))/0x6+-parseInt(_0x376638(0x1e2))/0x7+-parseInt(_0x376638(0x1f7))/0x8;if(_0xd92244===_0x321aae)break;else _0x25fa1b['push'](_0x25fa1b['shift']());}catch(_0x1af318){_0x25fa1b['push'](_0x25fa1b['shift']());}}}(a164_0x5e79,0xa05de));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';function a164_0x362c(_0x5bfaf9,_0x357df2){_0x5bfaf9=_0x5bfaf9-0x1b4;const _0x5e79ee=a164_0x5e79();let _0x362c25=_0x5e79ee[_0x5bfaf9];return _0x362c25;}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';function a164_0x5e79(){const _0xf9e58f=['start','filter','`rabetbase\x20knowledge-base\x20','values','skills','from','2721280jsqnju','install','isSingleCommand','knowledge-base','Runtime\x20App\x20Config\x20Management','service','has','write','Workspace','Schema','4545648MoLFqt','get','2928765OoiirW','use','list','knowledge-base\x20','auth','Authentication','create','read','detail','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','`\x20has\x20been\x20removed.','app','wildcardDef','Run\x20any\x20package.json\x20script','3774924poBIIQ','app\x20remote','commands','File','Use\x20`rabetbase\x20kb\x20','skill\x20','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','7678304reCnAv','`rabetbase\x20skills`\x20has\x20been\x20removed.','Quick\x20Start','preview','project','Diagnostics','Project','449937tFvQtq','Dataset\x20&\x20Operations','login','Database\x20Connections','API\x20Development','Run\x20Scripts','Code\x20Generation','1174651PRHRGM','Instant\x20API','Roles','asset-update','Self\x20Update','push','skill','BFF\x20Scripts','Logs','description','delete','run','defaultCommand','CLI\x20Built-in\x20Skill','SQL\x20Queries','show','Platform\x20Issue','App\x20Management','logout','`rabetbase\x20','<script>','update','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','12onxkPt','command'];a164_0x5e79=function(){return _0xf9e58f;};return a164_0x5e79();}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';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(_0x49c491){const _0x4fc59f=a164_0x362c;for(const _0x465c36 of _0x49c491){definitions['set'](_0x465c36[_0x4fc59f(0x1db)]+':'+_0x465c36[_0x4fc59f(0x1cf)],_0x465c36);let _0x2c9ecd=serviceGroups[_0x4fc59f(0x1e1)](_0x465c36['service']);!_0x2c9ecd&&(_0x2c9ecd=[],serviceGroups['set'](_0x465c36[_0x4fc59f(0x1db)],_0x2c9ecd)),_0x2c9ecd[_0x4fc59f(0x1bc)](_0x465c36);}}function registerDeclarativeService(_0x2baa46,_0x2a80d6,_0x4d3236){const _0x11b53a=a164_0x362c;registerDefinitions(_0x2a80d6);_0x4d3236?.['wildcardDef']&&registerDefinitions([_0x4d3236['wildcardDef']]);const _0x170075=_0x3b6a64=>_0x3b6a64===_0x11b53a(0x1e9)?'':_0x3b6a64===_0x11b53a(0x1dd)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x4bcd4e={'service':_0x2a80d6[0x0][_0x11b53a(0x1db)],'label':_0x2baa46,'commands':_0x2a80d6[_0x11b53a(0x1d1)](_0x2473a3=>!_0x2473a3['hidden'])['map'](_0x5d7e6e=>({'command':_0x5d7e6e['command'],'description':_0x5d7e6e[_0x11b53a(0x1c0)],'tag':_0x170075(_0x5d7e6e['risk'])})),'declarative':!![],'defaultCommand':_0x4d3236?.[_0x11b53a(0x1c3)]??(_0x4d3236?.[_0x11b53a(0x1d8)]?_0x2a80d6[0x0][_0x11b53a(0x1cf)]:undefined),'wildcardDef':_0x4d3236?.[_0x11b53a(0x1ee)],'isSingleCommand':_0x4d3236?.[_0x11b53a(0x1d8)]};serviceRegistry[_0x11b53a(0x1bc)](_0x4bcd4e),serviceByName['set'](_0x4bcd4e[_0x11b53a(0x1db)],_0x4bcd4e);}registerDeclarativeService(a164_0x4058c4(0x1f9),initDefinitions,{'defaultCommand':a164_0x4058c4(0x1c2),'isSingleCommand':!![]}),registerDeclarativeService(a164_0x4058c4(0x1fd),projectDefinitions),registerDeclarativeService(a164_0x4058c4(0x1de),workspaceDefinitions),registerDeclarativeService(a164_0x4058c4(0x1c8),appDefinitions),registerDeclarativeService(a164_0x4058c4(0x1e7),authDefinitions,{'defaultCommand':a164_0x4058c4(0x200)}),registerDeclarativeService(a164_0x4058c4(0x1ff),datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages',pageDefinitions),registerDeclarativeService(a164_0x4058c4(0x1b4),apiDefinitions),registerDeclarativeService(a164_0x4058c4(0x1b8),dataDefinitions),registerDeclarativeService(a164_0x4058c4(0x1be),bffDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService(a164_0x4058c4(0x1c5),sqlDefinitions),registerDeclarativeService(a164_0x4058c4(0x201),dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a164_0x4058c4(0x1b9),roleDefinitions),registerDeclarativeService('Permissions',permitDefinitions),registerDeclarativeService(a164_0x4058c4(0x1da),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService(a164_0x4058c4(0x1c7),issueDefinitions),registerDeclarativeService(a164_0x4058c4(0x1f3),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a164_0x4058c4(0x1b6),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a164_0x4058c4(0x1fc),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a164_0x4058c4(0x1df),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a164_0x4058c4(0x1bb),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a164_0x4058c4(0x1c4),cliSkillDefinitions,{'defaultCommand':a164_0x4058c4(0x1d7)}),registerDeclarativeService(a164_0x4058c4(0x1bf),logsDefinitions,{'defaultCommand':a164_0x4058c4(0x1c6)}),registerDeclarativeService(a164_0x4058c4(0x1b5),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a164_0x4058c4(0x1f2)]=[{'command':a164_0x4058c4(0x1cb),'description':a164_0x4058c4(0x1ef),'tag':''}];}export const deprecatedAliases={'create':{'service':a164_0x4058c4(0x1fb),'command':'create'},'start':{'service':a164_0x4058c4(0x1c2),'command':a164_0x4058c4(0x1d0)},'build':{'service':a164_0x4058c4(0x1c2),'command':'build'},'preview':{'service':a164_0x4058c4(0x1c2),'command':a164_0x4058c4(0x1fa)},'logout':{'service':a164_0x4058c4(0x1e6),'command':a164_0x4058c4(0x1c9)}};const CLI_SKILL_INSTALL_REMOVED_HINT='Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.',APP_REMOTE_REMOVED_HINT=a164_0x4058c4(0x1f6),APP_USE_REMOVED_HINT='Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.',REMOVED_KNOWLEDGE_BASE_COMMANDS=new Set([a164_0x4058c4(0x1e4),a164_0x4058c4(0x1ea),a164_0x4058c4(0x1e8),a164_0x4058c4(0x1cc),a164_0x4058c4(0x1c1)]);export function resolveRemovedCommand(_0x471176,_0x33bb42){const _0xf0dade=a164_0x4058c4;if(_0x471176==='skill'){const _0x101f22=_0x33bb42?_0xf0dade(0x1f5)+_0x33bb42:_0xf0dade(0x1bd);return{'command':_0x101f22,'message':_0xf0dade(0x1ca)+_0x101f22+_0xf0dade(0x1ec),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x471176===_0xf0dade(0x1d4))return{'command':'skills','message':_0xf0dade(0x1f8),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x471176===_0xf0dade(0x1ed)&&_0x33bb42==='remote')return{'command':_0xf0dade(0x1f1),'message':_0xf0dade(0x1eb),'hint':APP_REMOTE_REMOVED_HINT};if(_0x471176===_0xf0dade(0x1ed)&&_0x33bb42===_0xf0dade(0x1e3))return{'command':'app\x20use','message':_0xf0dade(0x1cd),'hint':APP_USE_REMOVED_HINT};if(_0x471176===_0xf0dade(0x1d9)&&_0x33bb42&&REMOVED_KNOWLEDGE_BASE_COMMANDS['has'](_0x33bb42))return{'command':_0xf0dade(0x1e5)+_0x33bb42,'message':_0xf0dade(0x1d2)+_0x33bb42+_0xf0dade(0x1ec),'hint':_0xf0dade(0x1f4)+_0x33bb42+'`\x20instead.'};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':'create'},'menu':{'update':a164_0x4058c4(0x1ba)}};export function resolveDeprecatedSubcommand(_0x1c5cf9,_0x39021f){return deprecatedSubcommands[_0x1c5cf9]?.[_0x39021f];}export function findDefinition(_0x24dc10,_0x24df19){const _0x254ee6=a164_0x4058c4;return definitions[_0x254ee6(0x1e1)](_0x24dc10+':'+_0x24df19);}export function isKnownService(_0x268c27){const _0x593923=a164_0x4058c4;return serviceByName[_0x593923(0x1dc)](_0x268c27);}export function isDeclarativeService(_0x8d5ffd){const _0x3aac7e=a164_0x4058c4;return serviceGroups[_0x3aac7e(0x1dc)](_0x8d5ffd)||serviceByName[_0x3aac7e(0x1e1)](_0x8d5ffd)?.[_0x3aac7e(0x1ee)]!==undefined;}export function getServiceEntry(_0x3b0992){const _0x173caa=a164_0x4058c4;return serviceByName[_0x173caa(0x1e1)](_0x3b0992);}export function getLegacyHandler(_0x57e06b,_0x230588){return undefined;}export function getAllDefinitions(){const _0x1d8e33=a164_0x4058c4;return Array[_0x1d8e33(0x1d5)](definitions[_0x1d8e33(0x1d3)]());}
@@ -1 +1 @@
1
- const a158_0x2ed7a1=a158_0x4aa0;(function(_0x406d50,_0x505c2f){const _0x26a497=a158_0x4aa0,_0x2adbc9=_0x406d50();while(!![]){try{const _0x4d6590=-parseInt(_0x26a497(0x1aa))/0x1*(-parseInt(_0x26a497(0x1a4))/0x2)+-parseInt(_0x26a497(0x1b5))/0x3+-parseInt(_0x26a497(0x1ae))/0x4*(parseInt(_0x26a497(0x1b3))/0x5)+parseInt(_0x26a497(0x1b6))/0x6*(parseInt(_0x26a497(0x1b2))/0x7)+parseInt(_0x26a497(0x1b1))/0x8+parseInt(_0x26a497(0x1ac))/0x9*(parseInt(_0x26a497(0x1ab))/0xa)+-parseInt(_0x26a497(0x1a7))/0xb*(-parseInt(_0x26a497(0x1a1))/0xc);if(_0x4d6590===_0x505c2f)break;else _0x2adbc9['push'](_0x2adbc9['shift']());}catch(_0x1353a6){_0x2adbc9['push'](_0x2adbc9['shift']());}}}(a158_0x2bb3,0x34be7));function a158_0x2bb3(){const _0x11ad3c=['6VfTaHT','POST','appCode','create','\x20(id=','roleName','trim','2483436SfYsxx','str','validation','112ChgixA','remark','role','22jlMQtO','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','length','2081DRGcOV','10JfPsLB','2383515pPVuOB','Created\x20role\x20','3204QdJzxn','/smartapi/permit/role/create','name','571936YbCkSP','1041523LfCdHP','2495dIfvbb','flagMissing','1199460pyKjjl'];a158_0x2bb3=function(){return _0x11ad3c;};return a158_0x2bb3();}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=a158_0x2ed7a1(0x1af);function a158_0x4aa0(_0x2b89bd,_0x16767b){_0x2b89bd=_0x2b89bd-0x19d;const _0x2bb371=a158_0x2bb3();let _0x4aa06f=_0x2bb371[_0x2b89bd];return _0x4aa06f;}function readName(_0x58d016){const _0x2e7568=a158_0x2ed7a1,_0xabfb99=_0x58d016[_0x2e7568(0x1a2)](_0x2e7568(0x1b0))['trim']();if(!_0xabfb99)throw CliErrors[_0x2e7568(0x1b4)](_0x2e7568(0x1b0),'Pass\x20--name\x20<roleName>.');if(_0xabfb99[_0x2e7568(0x1a9)]>0x40)throw CliErrors[_0x2e7568(0x1a3)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');return _0xabfb99;}export const roleCreate={'service':a158_0x2ed7a1(0x1a6),'command':'create','description':a158_0x2ed7a1(0x1a8),'risk':'write','flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b6053){readName(_0x1b6053);},async 'dryRun'(_0x510505){const _0x28c255=a158_0x2ed7a1,_0xfe542a=readName(_0x510505),_0x38820e=_0x510505[_0x28c255(0x1a2)](_0x28c255(0x1a5))[_0x28c255(0x1a0)]()||undefined;return asDryRunResult({'operation':_0x28c255(0x19d),'selector':{'appCode':_0x510505[_0x28c255(0x1b8)],'roleName':_0xfe542a},'before':null,'after':{'roleName':_0xfe542a,'roleType':'CUSTOM','remark':_0x38820e},'dryRun':!![],'backend':{'method':_0x28c255(0x1b7),'path':CREATE_PATH},'warnings':[]},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x20c920){const _0x48cdca=a158_0x2ed7a1,_0xf4b3a0=readName(_0x20c920),_0x3055b7=_0x20c920[_0x48cdca(0x1a2)](_0x48cdca(0x1a5))['trim']()||undefined,_0x521165=await createAppRole({'appCode':_0x20c920[_0x48cdca(0x1b8)],'roleName':_0xf4b3a0,..._0x3055b7?{'remark':_0x3055b7}:{}});return{'ok':!![],'data':{'operation':_0x48cdca(0x19d),'selector':{'appCode':_0x20c920[_0x48cdca(0x1b8)],'roleId':_0x521165['id'],'roleName':_0xf4b3a0},'before':null,'after':projectRole(_0x521165),'dryRun':![],'backend':{'method':_0x48cdca(0x1b7),'path':CREATE_PATH},'warnings':[]},'message':_0x48cdca(0x1ad)+_0x521165[_0x48cdca(0x19f)]+_0x48cdca(0x19e)+_0x521165['id']+')'};}};
1
+ const a165_0x5e8599=a165_0x2a64;(function(_0x56b412,_0x38e82f){const _0x23c5cf=a165_0x2a64,_0x33137e=_0x56b412();while(!![]){try{const _0x5567e8=parseInt(_0x23c5cf(0x180))/0x1+-parseInt(_0x23c5cf(0x181))/0x2+parseInt(_0x23c5cf(0x176))/0x3+-parseInt(_0x23c5cf(0x187))/0x4+parseInt(_0x23c5cf(0x185))/0x5+-parseInt(_0x23c5cf(0x174))/0x6*(-parseInt(_0x23c5cf(0x182))/0x7)+parseInt(_0x23c5cf(0x179))/0x8*(-parseInt(_0x23c5cf(0x17e))/0x9);if(_0x5567e8===_0x38e82f)break;else _0x33137e['push'](_0x33137e['shift']());}catch(_0x29c975){_0x33137e['push'](_0x33137e['shift']());}}}(a165_0x1749,0x297f8));import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a165_0x2a64(_0x5e7b5f,_0x58dc20){_0x5e7b5f=_0x5e7b5f-0x16e;const _0x1749c8=a165_0x1749();let _0x2a642f=_0x1749c8[_0x5e7b5f];return _0x2a642f;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';function a165_0x1749(){const _0x19395b=['60wtSIWk','length','523332sMnXtI','write','trim','8QeqIzS','/smartapi/permit/role/create','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','\x20(id=','name','1095741TJBWNx','CUSTOM','149580PVHWlr','32450mFWDIn','162106wBvevT','roleName','str','7800TkALuQ','POST','996856DlDMlN','appCode','validation','role','Created\x20role\x20','create','flagMissing','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','remark'];a165_0x1749=function(){return _0x19395b;};return a165_0x1749();}const CREATE_PATH=a165_0x5e8599(0x17a);function readName(_0x4d8584){const _0x5205b7=a165_0x5e8599,_0x4e896c=_0x4d8584['str'](_0x5205b7(0x17d))[_0x5205b7(0x178)]();if(!_0x4e896c)throw CliErrors[_0x5205b7(0x171)](_0x5205b7(0x17d),'Pass\x20--name\x20<roleName>.');if(_0x4e896c[_0x5205b7(0x175)]>0x40)throw CliErrors[_0x5205b7(0x189)](_0x5205b7(0x172));return _0x4e896c;}export const roleCreate={'service':a165_0x5e8599(0x16e),'command':a165_0x5e8599(0x170),'description':a165_0x5e8599(0x17b),'risk':a165_0x5e8599(0x177),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x9f928a){readName(_0x9f928a);},async 'dryRun'(_0x538ced){const _0xd851a7=a165_0x5e8599,_0x226aea=readName(_0x538ced),_0x46a555=_0x538ced[_0xd851a7(0x184)](_0xd851a7(0x173))[_0xd851a7(0x178)]()||undefined;return asDryRunResult({'operation':_0xd851a7(0x170),'selector':{'appCode':_0x538ced['appCode'],'roleName':_0x226aea},'before':null,'after':{'roleName':_0x226aea,'roleType':_0xd851a7(0x17f),'remark':_0x46a555},'dryRun':!![],'backend':{'method':_0xd851a7(0x186),'path':CREATE_PATH},'warnings':[]},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x299e2a){const _0x150c6d=a165_0x5e8599,_0x56c925=readName(_0x299e2a),_0x5eebd8=_0x299e2a[_0x150c6d(0x184)]('remark')[_0x150c6d(0x178)]()||undefined,_0x5e1f8a=await createAppRole({'appCode':_0x299e2a[_0x150c6d(0x188)],'roleName':_0x56c925,..._0x5eebd8?{'remark':_0x5eebd8}:{}});return{'ok':!![],'data':{'operation':_0x150c6d(0x170),'selector':{'appCode':_0x299e2a[_0x150c6d(0x188)],'roleId':_0x5e1f8a['id'],'roleName':_0x56c925},'before':null,'after':projectRole(_0x5e1f8a),'dryRun':![],'backend':{'method':_0x150c6d(0x186),'path':CREATE_PATH},'warnings':[]},'message':_0x150c6d(0x16f)+_0x5e1f8a[_0x150c6d(0x183)]+_0x150c6d(0x17c)+_0x5e1f8a['id']+')'};}};
@@ -1 +1 @@
1
- const a159_0x393e8f=a159_0x3700;function a159_0x3700(_0x21a503,_0x313e5c){_0x21a503=_0x21a503-0x1a4;const _0x32ee74=a159_0x32ee();let _0x370061=_0x32ee74[_0x21a503];return _0x370061;}(function(_0x31173d,_0x429b36){const _0x59c90b=a159_0x3700,_0x16a4da=_0x31173d();while(!![]){try{const _0x4c153f=-parseInt(_0x59c90b(0x1a8))/0x1*(parseInt(_0x59c90b(0x1a5))/0x2)+-parseInt(_0x59c90b(0x1b5))/0x3+parseInt(_0x59c90b(0x1a6))/0x4+-parseInt(_0x59c90b(0x1a4))/0x5+-parseInt(_0x59c90b(0x1b1))/0x6+parseInt(_0x59c90b(0x1a9))/0x7+parseInt(_0x59c90b(0x1aa))/0x8;if(_0x4c153f===_0x429b36)break;else _0x16a4da['push'](_0x16a4da['shift']());}catch(_0x1a15af){_0x16a4da['push'](_0x16a4da['shift']());}}}(a159_0x32ee,0x90b55));function a159_0x32ee(){const _0x1f3fa5=['/smartapi/permit/role/delete','userCount','2348124Tyqifd','528410CPjWfI','2582oyvcBf','560108BNnvkk','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','361GVfVbo','3157658Vugldv','14433088pGsYKq','role','appCode','Role\x20still\x20has\x20','POST','delete','roleName','2688546ApDvjH','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.'];a159_0x32ee=function(){return _0x1f3fa5;};return a159_0x32ee();}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=a159_0x393e8f(0x1b3);export const roleDelete={'service':a159_0x393e8f(0x1ab),'command':a159_0x393e8f(0x1af),'description':a159_0x393e8f(0x1a7),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1d09c6){const _0x843c35=a159_0x393e8f,_0x26a165=_0x1d09c6['num']('id'),_0x2d9d03=await getRoleById(_0x1d09c6[_0x843c35(0x1ac)],_0x26a165);return assertCustomRole(_0x2d9d03,_0x843c35(0x1af)),asDryRunResult({'operation':_0x843c35(0x1af),'selector':{'appCode':_0x1d09c6['appCode'],'roleId':_0x26a165,'roleName':_0x2d9d03['roleName']},'before':projectRole(_0x2d9d03),'after':null,'dryRun':!![],'backend':{'method':_0x843c35(0x1ae),'path':DELETE_PATH},'warnings':_0x2d9d03['userCount']>0x0?[_0x843c35(0x1ad)+_0x2d9d03[_0x843c35(0x1b4)]+_0x843c35(0x1b2)]:[]},{'method':_0x843c35(0x1ae),'url':DELETE_PATH});},async 'execute'(_0x165cda){const _0x4264de=a159_0x393e8f,_0x1cd4cb=_0x165cda['num']('id'),_0xd51d35=await getRoleById(_0x165cda['appCode'],_0x1cd4cb);return assertCustomRole(_0xd51d35,_0x4264de(0x1af)),await deleteAppRole(_0x1cd4cb),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0x165cda[_0x4264de(0x1ac)],'roleId':_0x1cd4cb,'roleName':_0xd51d35[_0x4264de(0x1b0)]},'before':projectRole(_0xd51d35),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0xd51d35[_0x4264de(0x1b0)]+'\x20(id='+_0x1cd4cb+')'};}};
1
+ function a166_0x47a9(){const _0xf96580=['157867xZmFrg','999nLUjty','POST','/smartapi/permit/role/delete','2870328YMVSBB','userCount','num','7zAxiZB','delete','Role\x20still\x20has\x20','appCode','\x20(id=','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','1784220UkgRrL','role','Deleted\x20role\x20','5hzqXKH','8493588MxtHzb','77530uSGGUi','14KPIWJk','high-risk-write','roleName','923332ONfRDa','18693631lcxTmD'];a166_0x47a9=function(){return _0xf96580;};return a166_0x47a9();}const a166_0x20e590=a166_0x3960;(function(_0x59e51c,_0x3a24d2){const _0xbaea9a=a166_0x3960,_0xc34be6=_0x59e51c();while(!![]){try{const _0x427cb8=parseInt(_0xbaea9a(0xd5))/0x1*(-parseInt(_0xbaea9a(0xe8))/0x2)+parseInt(_0xbaea9a(0xe2))/0x3+parseInt(_0xbaea9a(0xeb))/0x4*(-parseInt(_0xbaea9a(0xe5))/0x5)+-parseInt(_0xbaea9a(0xe6))/0x6+-parseInt(_0xbaea9a(0xdc))/0x7*(-parseInt(_0xbaea9a(0xd9))/0x8)+parseInt(_0xbaea9a(0xd6))/0x9*(parseInt(_0xbaea9a(0xe7))/0xa)+parseInt(_0xbaea9a(0xd4))/0xb;if(_0x427cb8===_0x3a24d2)break;else _0xc34be6['push'](_0xc34be6['shift']());}catch(_0xdc0b53){_0xc34be6['push'](_0xc34be6['shift']());}}}(a166_0x47a9,0xba0b3));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a166_0x3960(_0x3ad5cd,_0x407f88){_0x3ad5cd=_0x3ad5cd-0xd4;const _0x47a9d9=a166_0x47a9();let _0x3960c5=_0x47a9d9[_0x3ad5cd];return _0x3960c5;}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a166_0x20e590(0xd8);export const roleDelete={'service':a166_0x20e590(0xe3),'command':a166_0x20e590(0xdd),'description':a166_0x20e590(0xe1),'risk':a166_0x20e590(0xe9),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x24354d){const _0x2b2eca=a166_0x20e590,_0x25bc22=_0x24354d[_0x2b2eca(0xdb)]('id'),_0x2a48c2=await getRoleById(_0x24354d[_0x2b2eca(0xdf)],_0x25bc22);return assertCustomRole(_0x2a48c2,'delete'),asDryRunResult({'operation':_0x2b2eca(0xdd),'selector':{'appCode':_0x24354d[_0x2b2eca(0xdf)],'roleId':_0x25bc22,'roleName':_0x2a48c2['roleName']},'before':projectRole(_0x2a48c2),'after':null,'dryRun':!![],'backend':{'method':_0x2b2eca(0xd7),'path':DELETE_PATH},'warnings':_0x2a48c2['userCount']>0x0?[_0x2b2eca(0xde)+_0x2a48c2[_0x2b2eca(0xda)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x2b2eca(0xd7),'url':DELETE_PATH});},async 'execute'(_0x19ccc3){const _0x58d336=a166_0x20e590,_0x4e45e8=_0x19ccc3[_0x58d336(0xdb)]('id'),_0x58780e=await getRoleById(_0x19ccc3[_0x58d336(0xdf)],_0x4e45e8);return assertCustomRole(_0x58780e,_0x58d336(0xdd)),await deleteAppRole(_0x4e45e8),{'ok':!![],'data':{'operation':_0x58d336(0xdd),'selector':{'appCode':_0x19ccc3[_0x58d336(0xdf)],'roleId':_0x4e45e8,'roleName':_0x58780e[_0x58d336(0xea)]},'before':projectRole(_0x58780e),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x58d336(0xe4)+_0x58780e[_0x58d336(0xea)]+_0x58d336(0xe0)+_0x4e45e8+')'};}};
@@ -1 +1 @@
1
- const a160_0x1a9ef6=a160_0x34c8;function a160_0x34c8(_0x8230f3,_0xb9c1a6){_0x8230f3=_0x8230f3-0xf6;const _0xe03f1d=a160_0xe03f();let _0x34c867=_0xe03f1d[_0x8230f3];return _0x34c867;}(function(_0x396dff,_0x29675f){const _0x71beb9=a160_0x34c8,_0x1fa15e=_0x396dff();while(!![]){try{const _0x4620ca=-parseInt(_0x71beb9(0xf6))/0x1*(-parseInt(_0x71beb9(0x103))/0x2)+parseInt(_0x71beb9(0xfa))/0x3+-parseInt(_0x71beb9(0xfe))/0x4+-parseInt(_0x71beb9(0x104))/0x5+-parseInt(_0x71beb9(0x101))/0x6*(parseInt(_0x71beb9(0x102))/0x7)+parseInt(_0x71beb9(0xf7))/0x8*(-parseInt(_0x71beb9(0xf9))/0x9)+parseInt(_0x71beb9(0xff))/0xa*(parseInt(_0x71beb9(0x100))/0xb);if(_0x4620ca===_0x29675f)break;else _0x1fa15e['push'](_0x1fa15e['shift']());}catch(_0x1fb46f){_0x1fa15e['push'](_0x1fa15e['shift']());}}}(a160_0xe03f,0x2277e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a160_0xe03f(){const _0x1d4b45=['48CGNXHW','17563VMebii','2SLIyun','877750nrREwZ','153967ktpbhj','8ZTCiuT','appCode','2459745fcaQDf','651999KtkipQ','role','num','roleType','443520WOnGel','1230qLJQSt','31273qwwzCd'];a160_0xe03f=function(){return _0x1d4b45;};return a160_0xe03f();}export const roleDetail={'service':a160_0x1a9ef6(0xfb),'command':'detail','description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xc85295){const _0x186463=a160_0x1a9ef6,_0x285d8f=_0xc85295[_0x186463(0xfc)]('id'),_0x51917e=await getRoleById(_0xc85295[_0x186463(0xf8)],_0x285d8f);return{'ok':!![],'data':{'role':projectRole(_0x51917e)},'message':'Role\x20'+_0x51917e['roleName']+'\x20('+_0x51917e[_0x186463(0xfd)]+')'};}};
1
+ const a167_0x9140f1=a167_0x59ff;(function(_0x1ed1e3,_0x4f05f0){const _0x135761=a167_0x59ff,_0x1b55ce=_0x1ed1e3();while(!![]){try{const _0x1e4877=-parseInt(_0x135761(0xd8))/0x1+parseInt(_0x135761(0xc6))/0x2*(parseInt(_0x135761(0xce))/0x3)+-parseInt(_0x135761(0xd4))/0x4*(-parseInt(_0x135761(0xca))/0x5)+-parseInt(_0x135761(0xd6))/0x6*(parseInt(_0x135761(0xcb))/0x7)+parseInt(_0x135761(0xc9))/0x8*(parseInt(_0x135761(0xd0))/0x9)+parseInt(_0x135761(0xcd))/0xa*(parseInt(_0x135761(0xd2))/0xb)+-parseInt(_0x135761(0xd1))/0xc*(parseInt(_0x135761(0xd5))/0xd);if(_0x1e4877===_0x4f05f0)break;else _0x1b55ce['push'](_0x1b55ce['shift']());}catch(_0x52c3b7){_0x1b55ce['push'](_0x1b55ce['shift']());}}}(a167_0x30d9,0xb8957));function a167_0x59ff(_0x306819,_0xf6729b){_0x306819=_0x306819-0xc5;const _0x30d9e3=a167_0x30d9();let _0x59ff47=_0x30d9e3[_0x306819];return _0x59ff47;}function a167_0x30d9(){const _0x12ea93=['Show\x20a\x20single\x20role\x27s\x20detail','roleType','read','106090RzehpZ','detail','appCode','11712584hPoOhV','7060aXDZij','7nNIWtu','role','70UHXmdd','6cegCBt','Role\x20','9SneNzO','24384QdUiHi','943393mqOTvL','roleName','1816BeBVoP','4082LkODQa','3715854cVOFdY','num','798140umNCBV'];a167_0x30d9=function(){return _0x12ea93;};return a167_0x30d9();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a167_0x9140f1(0xcc),'command':a167_0x9140f1(0xc7),'description':a167_0x9140f1(0xd9),'risk':a167_0x9140f1(0xc5),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xae82c2){const _0x5a3990=a167_0x9140f1,_0x379624=_0xae82c2[_0x5a3990(0xd7)]('id'),_0x5b52a3=await getRoleById(_0xae82c2[_0x5a3990(0xc8)],_0x379624);return{'ok':!![],'data':{'role':projectRole(_0x5b52a3)},'message':_0x5a3990(0xcf)+_0x5b52a3[_0x5a3990(0xd3)]+'\x20('+_0x5b52a3[_0x5a3990(0xda)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x30bdeb,_0x5e287d){const _0x296a66=a161_0x1367,_0x3e6f7e=_0x30bdeb();while(!![]){try{const _0x24f076=parseInt(_0x296a66(0x1ab))/0x1+-parseInt(_0x296a66(0x1a6))/0x2*(parseInt(_0x296a66(0x1a1))/0x3)+parseInt(_0x296a66(0x1a7))/0x4*(parseInt(_0x296a66(0x1a9))/0x5)+-parseInt(_0x296a66(0x1a3))/0x6*(parseInt(_0x296a66(0x1a4))/0x7)+parseInt(_0x296a66(0x1a8))/0x8*(-parseInt(_0x296a66(0x1a5))/0x9)+parseInt(_0x296a66(0x1a2))/0xa+parseInt(_0x296a66(0x1aa))/0xb;if(_0x24f076===_0x5e287d)break;else _0x3e6f7e['push'](_0x3e6f7e['shift']());}catch(_0x135b65){_0x3e6f7e['push'](_0x3e6f7e['shift']());}}}(a161_0x10f7,0xbff07));function a161_0x10f7(){const _0x90bc62=['36wMJPvO','2015802sbfbvC','44UqECIO','3139784vsHCsq','645215FnoNGI','23675124wuoKYi','816475IzhKnm','3zSrpuv','4122060hNyhiR','6KweHXN','10055234KyyJgr'];a161_0x10f7=function(){return _0x90bc62;};return a161_0x10f7();}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';function a161_0x1367(_0x3f9faf,_0x1b6954){_0x3f9faf=_0x3f9faf-0x1a1;const _0x10f78c=a161_0x10f7();let _0x136758=_0x10f78c[_0x3f9faf];return _0x136758;}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];
1
+ function a168_0x4dd0(){const _0x3da6f6=['1934178tfoaGB','50LhGtsH','1816592LydxXn','1384524YhekpX','5eOXOEF','28914VByFOR','2624607vVlQcQ','2300319kIpaAd','17dwkqUz','2971064HEbVyz'];a168_0x4dd0=function(){return _0x3da6f6;};return a168_0x4dd0();}(function(_0x22656a,_0x16381c){const _0x47f16e=a168_0x19b0,_0x1780ad=_0x22656a();while(!![]){try{const _0x40ac88=parseInt(_0x47f16e(0x11d))/0x1*(-parseInt(_0x47f16e(0x11a))/0x2)+-parseInt(_0x47f16e(0x118))/0x3+-parseInt(_0x47f16e(0x11e))/0x4*(parseInt(_0x47f16e(0x119))/0x5)+parseInt(_0x47f16e(0x115))/0x6+parseInt(_0x47f16e(0x11c))/0x7+-parseInt(_0x47f16e(0x117))/0x8+parseInt(_0x47f16e(0x11b))/0x9*(parseInt(_0x47f16e(0x116))/0xa);if(_0x40ac88===_0x16381c)break;else _0x1780ad['push'](_0x1780ad['shift']());}catch(_0x1a46fa){_0x1780ad['push'](_0x1780ad['shift']());}}}(a168_0x4dd0,0x6976a));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';function a168_0x19b0(_0x5c4546,_0x256d72){_0x5c4546=_0x5c4546-0x115;const _0x4dd0af=a168_0x4dd0();let _0x19b0fb=_0x4dd0af[_0x5c4546];return _0x19b0fb;}export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- function a162_0x2cde(_0x41f0dc,_0x435b15){_0x41f0dc=_0x41f0dc-0x14a;const _0xacd012=a162_0xacd0();let _0x2cded6=_0xacd012[_0x41f0dc];return _0x2cded6;}const a162_0x577c61=a162_0x2cde;(function(_0xafdff9,_0x370e1e){const _0x47865d=a162_0x2cde,_0x3f61ba=_0xafdff9();while(!![]){try{const _0x351e20=parseInt(_0x47865d(0x16a))/0x1+parseInt(_0x47865d(0x158))/0x2*(parseInt(_0x47865d(0x14f))/0x3)+-parseInt(_0x47865d(0x16f))/0x4+parseInt(_0x47865d(0x163))/0x5+parseInt(_0x47865d(0x165))/0x6*(parseInt(_0x47865d(0x150))/0x7)+parseInt(_0x47865d(0x170))/0x8*(parseInt(_0x47865d(0x16b))/0x9)+-parseInt(_0x47865d(0x14c))/0xa*(parseInt(_0x47865d(0x16c))/0xb);if(_0x351e20===_0x370e1e)break;else _0x3f61ba['push'](_0x3f61ba['shift']());}catch(_0x268095){_0x3f61ba['push'](_0x3f61ba['shift']());}}}(a162_0xacd0,0x55ecb));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a162_0xacd0(){const _0x4036b1=['\x20role(s)','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','2750485BVkYOC','Filter\x20by\x20role\x20type','12NZsJlS','CUSTOM','length','page','str','104216iyJZgH','2113974ArrYFB','11cFaAyW','roleType','join','78944maxgBN','8iDbtkV','trim','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','14335580pDyGOd','ADMIN','Use\x20one\x20of:\x20','273201ReeoCD','1931209YsTRtS','pagesize','type','list','includes','read','toUpperCase','DEV','8nukcrX','number','Invalid\x20--type\x20\x22','Page\x20size\x20(1-100)','map','validation','num','USER','filter'];a162_0xacd0=function(){return _0x4036b1;};return a162_0xacd0();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a162_0x577c61(0x14d),a162_0x577c61(0x157),a162_0x577c61(0x15f),a162_0x577c61(0x166)];export const roleList={'service':'role','command':a162_0x577c61(0x153),'description':a162_0x577c61(0x14b),'risk':a162_0x577c61(0x155),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','required':![],'description':a162_0x577c61(0x164),'enum':ROLE_TYPES},{'name':a162_0x577c61(0x168),'type':a162_0x577c61(0x159),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a162_0x577c61(0x151),'type':'number','description':a162_0x577c61(0x15b),'default':0x64}],async 'validate'(_0x4eef65){const _0x2ea670=a162_0x577c61,_0x46ce35=_0x4eef65[_0x2ea670(0x169)](_0x2ea670(0x152))[_0x2ea670(0x14a)]();if(_0x46ce35&&!ROLE_TYPES[_0x2ea670(0x154)](_0x46ce35['toUpperCase']()))throw CliErrors[_0x2ea670(0x15d)](_0x2ea670(0x15a)+_0x46ce35+'\x22.',_0x2ea670(0x14e)+ROLE_TYPES[_0x2ea670(0x16e)](',\x20')+'.');const _0x585ec0=_0x4eef65['num'](_0x2ea670(0x168),0x1),_0x8f718a=_0x4eef65[_0x2ea670(0x15e)](_0x2ea670(0x151),0x64);if(_0x585ec0<0x1)throw CliErrors[_0x2ea670(0x15d)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x8f718a<0x1||_0x8f718a>0x64)throw CliErrors[_0x2ea670(0x15d)](_0x2ea670(0x162));},async 'execute'(_0x545f08){const _0x411154=a162_0x577c61,_0x18ad7f=_0x545f08[_0x411154(0x15e)](_0x411154(0x168),0x1)||0x1,_0x2404c6=_0x545f08[_0x411154(0x15e)]('pagesize',0x64)||0x64,_0x2ea38a=_0x545f08['str'](_0x411154(0x152))['trim']()[_0x411154(0x156)](),{items:_0x20a45c,paging:_0x1c5d7c}=await listAppRoles(_0x545f08['appCode'],{'currentPage':_0x18ad7f,'pageSize':_0x2404c6}),_0x1aa08e=_0x2ea38a?_0x20a45c[_0x411154(0x160)](_0x19e69e=>_0x19e69e[_0x411154(0x16d)]===_0x2ea38a):_0x20a45c,_0x5a27c6=_0x1aa08e[_0x411154(0x15c)](projectRole);return{'ok':!![],'data':{'roles':_0x5a27c6,'paging':_0x1c5d7c},'message':'Found\x20'+_0x5a27c6[_0x411154(0x167)]+_0x411154(0x161)};}};
1
+ const a169_0x3fd53c=a169_0x267e;(function(_0x7e89f9,_0x407aee){const _0x3b04ec=a169_0x267e,_0x5ce35f=_0x7e89f9();while(!![]){try{const _0x5570a9=-parseInt(_0x3b04ec(0x195))/0x1+-parseInt(_0x3b04ec(0x18b))/0x2+-parseInt(_0x3b04ec(0x185))/0x3+-parseInt(_0x3b04ec(0x194))/0x4+-parseInt(_0x3b04ec(0x18f))/0x5+-parseInt(_0x3b04ec(0x198))/0x6*(parseInt(_0x3b04ec(0x17f))/0x7)+-parseInt(_0x3b04ec(0x181))/0x8*(-parseInt(_0x3b04ec(0x183))/0x9);if(_0x5570a9===_0x407aee)break;else _0x5ce35f['push'](_0x5ce35f['shift']());}catch(_0x4b5fdf){_0x5ce35f['push'](_0x5ce35f['shift']());}}}(a169_0x1a72,0xa6571));function a169_0x267e(_0x307a35,_0x112adf){_0x307a35=_0x307a35-0x177;const _0x1a721f=a169_0x1a72();let _0x267ef4=_0x1a721f[_0x307a35];return _0x267ef4;}import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a169_0x1a72(){const _0x397f7e=['type','str','string','DEV','CUSTOM','num','27377LYIPzq','\x20role(s)','294808unnWFQ','Page\x20size\x20(1-100)','936DdZRRH','includes','1290033eAKdDk','Page\x20index\x20(1-based)','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','filter','list','toUpperCase','556778hHvpsV','Invalid\x20--type\x20\x22','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','roleType','1976220LAnlrc','Filter\x20by\x20role\x20type','trim','map','ADMIN','5006692wrUpak','260051vTpHMc','validation','pagesize','822NjiVre','Use\x20one\x20of:\x20','Found\x20','page','USER','number'];a169_0x1a72=function(){return _0x397f7e;};return a169_0x1a72();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a169_0x3fd53c(0x193),a169_0x3fd53c(0x17c),a169_0x3fd53c(0x177),a169_0x3fd53c(0x17d)];export const roleList={'service':'role','command':a169_0x3fd53c(0x189),'description':a169_0x3fd53c(0x187),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a169_0x3fd53c(0x179),'type':a169_0x3fd53c(0x17b),'required':![],'description':a169_0x3fd53c(0x190),'enum':ROLE_TYPES},{'name':a169_0x3fd53c(0x19b),'type':a169_0x3fd53c(0x178),'description':a169_0x3fd53c(0x186),'default':0x1},{'name':a169_0x3fd53c(0x197),'type':'number','description':a169_0x3fd53c(0x182),'default':0x64}],async 'validate'(_0x370976){const _0x4dc2ad=a169_0x3fd53c,_0x1d08fd=_0x370976[_0x4dc2ad(0x17a)](_0x4dc2ad(0x179))[_0x4dc2ad(0x191)]();if(_0x1d08fd&&!ROLE_TYPES[_0x4dc2ad(0x184)](_0x1d08fd[_0x4dc2ad(0x18a)]()))throw CliErrors[_0x4dc2ad(0x196)](_0x4dc2ad(0x18c)+_0x1d08fd+'\x22.',_0x4dc2ad(0x199)+ROLE_TYPES['join'](',\x20')+'.');const _0xe2dfc=_0x370976[_0x4dc2ad(0x17e)](_0x4dc2ad(0x19b),0x1),_0x486e7e=_0x370976[_0x4dc2ad(0x17e)](_0x4dc2ad(0x197),0x64);if(_0xe2dfc<0x1)throw CliErrors[_0x4dc2ad(0x196)](_0x4dc2ad(0x18d));if(_0x486e7e<0x1||_0x486e7e>0x64)throw CliErrors[_0x4dc2ad(0x196)]('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0xd06311){const _0x4986ac=a169_0x3fd53c,_0x235393=_0xd06311[_0x4986ac(0x17e)](_0x4986ac(0x19b),0x1)||0x1,_0x552715=_0xd06311[_0x4986ac(0x17e)](_0x4986ac(0x197),0x64)||0x64,_0x5c8e9d=_0xd06311[_0x4986ac(0x17a)](_0x4986ac(0x179))[_0x4986ac(0x191)]()[_0x4986ac(0x18a)](),{items:_0x23ac42,paging:_0x3367af}=await listAppRoles(_0xd06311['appCode'],{'currentPage':_0x235393,'pageSize':_0x552715}),_0x2f31fa=_0x5c8e9d?_0x23ac42[_0x4986ac(0x188)](_0x50d81d=>_0x50d81d[_0x4986ac(0x18e)]===_0x5c8e9d):_0x23ac42,_0x5a985d=_0x2f31fa[_0x4986ac(0x192)](projectRole);return{'ok':!![],'data':{'roles':_0x5a985d,'paging':_0x3367af},'message':_0x4986ac(0x19a)+_0x5a985d['length']+_0x4986ac(0x180)};}};
@@ -1 +1 @@
1
- const a163_0x3ac524=a163_0x537b;(function(_0x5e700e,_0x59b544){const _0x313ade=a163_0x537b,_0x8b95ff=_0x5e700e();while(!![]){try{const _0x4573a8=parseInt(_0x313ade(0xeb))/0x1+parseInt(_0x313ade(0x10c))/0x2+-parseInt(_0x313ade(0x109))/0x3*(parseInt(_0x313ade(0xf9))/0x4)+-parseInt(_0x313ade(0xfe))/0x5+-parseInt(_0x313ade(0xe1))/0x6*(-parseInt(_0x313ade(0xe7))/0x7)+-parseInt(_0x313ade(0xdf))/0x8+parseInt(_0x313ade(0xfd))/0x9;if(_0x4573a8===_0x59b544)break;else _0x8b95ff['push'](_0x8b95ff['shift']());}catch(_0x5dcca0){_0x8b95ff['push'](_0x8b95ff['shift']());}}}(a163_0xb0b2,0x9e92d));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':a163_0x3ac524(0xfa),'required':!![],'description':a163_0x3ac524(0x112)};export const ROLE_REF_FLAG={'name':a163_0x3ac524(0x11b),'type':'string','required':!![],'description':a163_0x3ac524(0xe2)};export const USER_REF_FLAG={'name':'user','type':a163_0x3ac524(0x117),'required':!![],'description':a163_0x3ac524(0xef)};export const NAME_FLAG={'name':a163_0x3ac524(0xea),'type':a163_0x3ac524(0x117),'required':!![],'description':a163_0x3ac524(0xe9)};export const USER_NAME_FLAG={'name':a163_0x3ac524(0xea),'type':a163_0x3ac524(0x117),'required':!![],'description':a163_0x3ac524(0x114)};export const REMARK_FLAG={'name':'remark','type':a163_0x3ac524(0x117),'required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a163_0x3ac524(0x111),'type':a163_0x3ac524(0xfa),'required':![],'description':a163_0x3ac524(0xe6)};export const BUILTIN_ROLE_TYPES=[a163_0x3ac524(0x102),'DEV','USER'];export function isBuiltinRole(_0xe5fb7f){return BUILTIN_ROLE_TYPES['includes'](_0xe5fb7f);}export function assertCustomRole(_0x39507e,_0x3b3623){const _0x527ac9=a163_0x3ac524;if(_0x39507e[_0x527ac9(0xfc)]!==_0x527ac9(0xe8))throw CliErrors[_0x527ac9(0xec)](_0x527ac9(0x113)+_0x3b3623+_0x527ac9(0x10b)+_0x39507e['roleName']+'\x20('+_0x39507e[_0x527ac9(0xfc)]+').',_0x527ac9(0xf4));}export function assertPermConfigurable(_0x37b727){const _0x419de1=a163_0x3ac524;if(_0x37b727[_0x419de1(0xfc)]==='DEV'||_0x37b727[_0x419de1(0xfc)]==='ADMIN')throw CliErrors['validation'](_0x419de1(0xe4)+_0x37b727['roleName']+'\x20('+_0x37b727['roleType']+').',_0x419de1(0x108));}export function projectRole(_0x183f76){const _0x107009=a163_0x3ac524;return{'id':_0x183f76['id'],'roleName':_0x183f76[_0x107009(0x116)],'roleType':_0x183f76[_0x107009(0xfc)],'remark':_0x183f76[_0x107009(0xee)],'userCount':_0x183f76[_0x107009(0xf7)],'permitCount':_0x183f76[_0x107009(0xe5)],'builtin':isBuiltinRole(_0x183f76['roleType'])};}export async function resolveRoleRef(_0x4e0f2a,_0x4c5295){const _0x3d7276=a163_0x3ac524,_0x3b48e2=_0x4c5295[_0x3d7276(0x11f)]();if(!_0x3b48e2)throw CliErrors[_0x3d7276(0xec)]('Missing\x20role\x20reference.',_0x3d7276(0xed));if(/^\d+$/[_0x3d7276(0xdb)](_0x3b48e2))return getRoleById(_0x4e0f2a,Number(_0x3b48e2));const _0x1f8bee=await listAllAppRoles(_0x4e0f2a),_0x33bb81=_0x1f8bee['filter'](_0x18858=>_0x18858['roleName']===_0x3b48e2);if(_0x33bb81['length']===0x0)throw CliErrors['validation'](_0x3d7276(0xdd)+_0x3b48e2+_0x3d7276(0xf3)+_0x4e0f2a+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.');if(_0x33bb81['length']>0x1){const _0x10654c=_0x33bb81[_0x3d7276(0x11a)](_0x29015a=>_0x29015a['id'])['join'](',\x20');throw CliErrors[_0x3d7276(0xec)](_0x3d7276(0xdd)+_0x3b48e2+_0x3d7276(0x106)+_0x10654c+').',_0x3d7276(0xf8));}return _0x33bb81[0x0];}export async function getRoleById(_0x218a57,_0x47a662){const _0x11ebac=a163_0x3ac524,_0x3f6997=await getAppRole(_0x47a662);if(!_0x3f6997)throw CliErrors[_0x11ebac(0xec)](_0x11ebac(0xf0)+_0x47a662+'\x20not\x20found\x20in\x20app\x20'+_0x218a57+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x3f6997;}function a163_0xb0b2(){const _0x3a31cd=['/smartapi/permit/user-role/update-user-list','7687432mMEgKw','join','711366Jkhpqt','Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)','tenant_code','Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20','permitCount','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','42TysTAD','CUSTOM','Role\x20name','name','358566RTskqn','validation','Pass\x20--role\x20<id|name>.','remark','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','Role\x20id\x20','splice','toLowerCase','\x22\x20not\x20found\x20in\x20app\x20','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','dryRun','POST','userCount','Disambiguate\x20with\x20--role\x20<id>.','900572qykzHr','number','nickname','roleType','12784149cnLggX','3845020qIwArX','user','str','appCode','ADMIN','Pass\x20--user\x20<id|name>.','userList','authRequired','\x22\x20is\x20ambiguous\x20(ids:\x20','Multiple\x20tenant\x20members\x20match\x20\x22','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.','15rswAIE','username','\x20built-in\x20role\x20','2029544SePSNJ','Missing\x20user\x20reference.','userId','\x22:\x20','includes','expect-user-count','Role\x20id\x20(from\x20`role\x20list`)','Cannot\x20','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','\x20is\x20not\x20a\x20member\x20of\x20role\x20','roleName','string','flag','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','map','role','expectUserCount','user-add','find','trim','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','User\x20','push',';\x20no\x20change.','flagMissing','\x20is\x20already\x20a\x20member\x20of\x20role\x20','No\x20tenant\x20member\x20matches\x20\x22','length','test','Anti-drift\x20check\x20failed:\x20expected\x20','Role\x20name\x20\x22'];a163_0xb0b2=function(){return _0x3a31cd;};return a163_0xb0b2();}async function listAllAppRoles(_0x30c365){const _0x52fbfe=a163_0x3ac524,_0x5da16d=0x64,_0x3278fe=[];for(let _0x5984c0=0x1;;_0x5984c0+=0x1){const {items:_0x33130e,paging:_0x4908ab}=await listAppRoles(_0x30c365,{'currentPage':_0x5984c0,'pageSize':_0x5da16d});_0x3278fe[_0x52fbfe(0xd5)](..._0x33130e);if(_0x33130e['length']<_0x5da16d||_0x4908ab&&_0x3278fe[_0x52fbfe(0xda)]>=_0x4908ab['totalCount'])return _0x3278fe;}}export async function resolveTenantCode(){const _0x42a21f=a163_0x3ac524,_0xbc0a1f=await getSessionUserInfo(),_0x4a637e=_0xbc0a1f?.[_0x42a21f(0xff)]?.['tenant']?.[_0x42a21f(0xe3)];if(!_0x4a637e)throw CliErrors[_0x42a21f(0x105)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x4a637e;}function matchMember(_0x44617b,_0x3e8486){const _0x5c264a=a163_0x3ac524,_0x5d92b4=_0x3e8486[_0x5c264a(0x11f)]()['toLowerCase']();return(_0x44617b[_0x5c264a(0xfb)]??'')[_0x5c264a(0xf2)]()===_0x5d92b4||(_0x44617b['username']??'')[_0x5c264a(0xf2)]()===_0x5d92b4;}export async function resolveUserRef(_0xdd49ab){const _0x4f0256=a163_0x3ac524,_0x3e7ea7=_0xdd49ab[_0x4f0256(0x11f)]();if(!_0x3e7ea7)throw CliErrors[_0x4f0256(0xec)](_0x4f0256(0x10d),_0x4f0256(0x103));const _0xbf0f1f=await resolveTenantCode(),_0x1f8513=await getTenantMembers(_0xbf0f1f);if(/^\d+$/[_0x4f0256(0xdb)](_0x3e7ea7)){const _0x858e7e=Number(_0x3e7ea7),_0x1698a5=_0x1f8513[_0x4f0256(0x11e)](_0x2759d1=>_0x2759d1[_0x4f0256(0x10e)]===_0x858e7e);return{'userId':_0x858e7e,'username':_0x1698a5?.[_0x4f0256(0x10a)]??String(_0x858e7e),'nickname':_0x1698a5?.[_0x4f0256(0xfb)],'matchedBy':'id'};}const _0xca651=_0x1f8513['filter'](_0x5a4ebb=>matchMember(_0x5a4ebb,_0x3e7ea7));if(_0xca651[_0x4f0256(0xda)]===0x0)throw CliErrors[_0x4f0256(0xec)](_0x4f0256(0xd9)+_0x3e7ea7+'\x22.','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.');if(_0xca651['length']>0x1){const _0x599ede=_0xca651[_0x4f0256(0x11a)](_0x43d3c9=>(_0x43d3c9[_0x4f0256(0xfb)]??_0x43d3c9[_0x4f0256(0x10a)]??'?')+'('+_0x43d3c9[_0x4f0256(0x10e)]+')')[_0x4f0256(0xe0)](',\x20');throw CliErrors[_0x4f0256(0xec)](_0x4f0256(0x107)+_0x3e7ea7+_0x4f0256(0x10f)+_0x599ede+'.','Disambiguate\x20with\x20--user\x20<id>.');}const _0x45a72c=_0xca651[0x0];return{'userId':_0x45a72c[_0x4f0256(0x10e)],'username':_0x45a72c['username']??String(_0x45a72c[_0x4f0256(0x10e)]),'nickname':_0x45a72c[_0x4f0256(0xfb)],'matchedBy':_0x4f0256(0xea)};}export const UPDATE_USER_LIST_PATH=a163_0x3ac524(0xde);function a163_0x537b(_0x10505e,_0x4c86fe){_0x10505e=_0x10505e-0xd4;const _0xb0b21a=a163_0xb0b2();let _0x537ba7=_0xb0b21a[_0x10505e];return _0x537ba7;}function userIdsOf(_0x391955){const _0x43e2a5=a163_0x3ac524;return(_0x391955?.[_0x43e2a5(0x104)]??[])[_0x43e2a5(0x11a)](_0x251c10=>_0x251c10[_0x43e2a5(0x10e)]);}export function computeRoleUserMutation(_0x4866ee){const _0x4fb76c=a163_0x3ac524,{operation:_0x49d3aa,appCode:_0x180757,roleUsers:_0x33844d,targetRoleId:_0x9e6be0,user:_0x3440b8}=_0x4866ee,_0x3a185b=_0x33844d[_0x4fb76c(0x11e)](_0x34a644=>_0x34a644['id']===_0x9e6be0);if(!_0x3a185b)throw CliErrors[_0x4fb76c(0xec)]('Role\x20id\x20'+_0x9e6be0+'\x20not\x20found\x20in\x20the\x20user-role\x20list.',_0x4fb76c(0x120));const _0x14305b=userIdsOf(_0x3a185b),_0x2cb22b=[];if(_0x4866ee[_0x4fb76c(0x11c)]!==undefined&&_0x4866ee[_0x4fb76c(0x11c)]!==_0x14305b['length'])throw CliErrors['validation'](_0x4fb76c(0xdc)+_0x4866ee['expectUserCount']+'\x20member(s)\x20but\x20role\x20has\x20'+_0x14305b[_0x4fb76c(0xda)]+'.',_0x4fb76c(0x119));const _0x1191cc=_0x14305b[_0x4fb76c(0x110)](_0x3440b8[_0x4fb76c(0x10e)]);let _0x42d464=![];const _0x301aa8=[..._0x3a185b[_0x4fb76c(0x104)]];if(_0x49d3aa===_0x4fb76c(0x11d))_0x1191cc?_0x2cb22b['push']('User\x20'+_0x3440b8[_0x4fb76c(0x10e)]+_0x4fb76c(0xd8)+_0x3a185b[_0x4fb76c(0x116)]+_0x4fb76c(0xd6)):(_0x301aa8[_0x4fb76c(0xd5)]({'userId':_0x3440b8[_0x4fb76c(0x10e)],'username':_0x3440b8[_0x4fb76c(0x10a)],..._0x3440b8[_0x4fb76c(0xfb)]?{'nickname':_0x3440b8[_0x4fb76c(0xfb)]}:{}}),_0x42d464=!![]);else{if(!_0x1191cc)_0x2cb22b['push'](_0x4fb76c(0xd4)+_0x3440b8[_0x4fb76c(0x10e)]+_0x4fb76c(0x115)+_0x3a185b[_0x4fb76c(0x116)]+_0x4fb76c(0xd6));else{const _0x35f336=_0x301aa8['findIndex'](_0x1112bb=>_0x1112bb[_0x4fb76c(0x10e)]===_0x3440b8['userId']);if(_0x35f336>=0x0)_0x301aa8[_0x4fb76c(0xf1)](_0x35f336,0x1);_0x42d464=!![];}}const _0x9d9f0e=_0x33844d[_0x4fb76c(0x11a)](_0x40c66a=>_0x40c66a['id']===_0x9e6be0?{..._0x40c66a,'userList':_0x301aa8}:_0x40c66a),_0x2ddb5f=_0x301aa8['map'](_0x3d5ac0=>_0x3d5ac0[_0x4fb76c(0x10e)]),_0x155f9b={'operation':_0x49d3aa,'selector':{'appCode':_0x180757,'roleId':_0x9e6be0,'roleName':_0x3a185b['roleName'],'userId':_0x3440b8[_0x4fb76c(0x10e)]},'before':{'userIds':_0x14305b},'after':{'userIds':_0x2ddb5f},'dryRun':_0x4866ee[_0x4fb76c(0xf5)],'backend':{'method':_0x4fb76c(0xf6),'path':UPDATE_USER_LIST_PATH},'warnings':_0x2cb22b};return{'roleList':_0x9d9f0e,'mutation':_0x155f9b,'changed':_0x42d464};}export async function loadRoleUsers(_0x553b5e){return listRoleUsers(_0x553b5e);}export function readRoleRef(_0x3fd66b){const _0x7dde9=a163_0x3ac524,_0x57eb70=_0x3fd66b[_0x7dde9(0x100)]('role')[_0x7dde9(0x11f)]();if(!_0x57eb70)throw CliErrors[_0x7dde9(0xd7)](_0x7dde9(0x11b),_0x7dde9(0xed));return _0x57eb70;}export async function prepareUserMutation(_0x1c16ee,_0x4354cf,_0x46846d){const _0x2a08b9=a163_0x3ac524,_0x282529=readRoleRef(_0x1c16ee),_0x575723=_0x1c16ee['str'](_0x2a08b9(0xff))['trim']();if(!_0x575723)throw CliErrors['flagMissing'](_0x2a08b9(0xff),'Pass\x20--user\x20<id|name>.');const _0x14e385=_0x1c16ee[_0x2a08b9(0x118)]('expect-user-count'),_0x131655=_0x14e385===undefined||_0x14e385===null?undefined:Number(_0x14e385),_0x6bf5b5=await resolveRoleRef(_0x1c16ee[_0x2a08b9(0x101)],_0x282529),_0x3dc6fc=await resolveUserRef(_0x575723),_0x250cfc=await loadRoleUsers(_0x1c16ee[_0x2a08b9(0x101)]);return computeRoleUserMutation({'operation':_0x4354cf,'appCode':_0x1c16ee['appCode'],'roleUsers':_0x250cfc,'targetRoleId':_0x6bf5b5['id'],'user':{'userId':_0x3dc6fc[_0x2a08b9(0x10e)],'username':_0x3dc6fc['username'],'nickname':_0x3dc6fc[_0x2a08b9(0xfb)]},'dryRun':_0x46846d,..._0x131655!==undefined?{'expectUserCount':_0x131655}:{}});}
1
+ const a170_0x439d91=a170_0x1838;(function(_0x558d09,_0x266755){const _0x58120c=a170_0x1838,_0x3a1fca=_0x558d09();while(!![]){try{const _0xffa7c=parseInt(_0x58120c(0xac))/0x1+parseInt(_0x58120c(0x9e))/0x2+parseInt(_0x58120c(0xcd))/0x3*(parseInt(_0x58120c(0x83))/0x4)+parseInt(_0x58120c(0x8d))/0x5*(-parseInt(_0x58120c(0x94))/0x6)+-parseInt(_0x58120c(0x81))/0x7+-parseInt(_0x58120c(0xc6))/0x8+parseInt(_0x58120c(0x88))/0x9;if(_0xffa7c===_0x266755)break;else _0x3a1fca['push'](_0x3a1fca['shift']());}catch(_0xeedfdb){_0x3a1fca['push'](_0x3a1fca['shift']());}}}(a170_0x19f1,0x90977));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':a170_0x439d91(0x85)};function a170_0x19f1(){const _0x51ea43=['Multiple\x20tenant\x20members\x20match\x20\x22','totalCount','name','filter','Disambiguate\x20with\x20--user\x20<id>.','test','dryRun','\x22\x20not\x20found\x20in\x20app\x20','expect-user-count','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.','authRequired','Missing\x20role\x20reference.','string','\x20member(s)\x20but\x20role\x20has\x20','join','length','DEV','\x20is\x20already\x20a\x20member\x20of\x20role\x20','username','trim','expectUserCount','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','findIndex','8553528sFzajU','userId','flag','roleName','flagMissing','includes','permitCount','177WxwGou','\x22:\x20','No\x20tenant\x20member\x20matches\x20\x22','8018017bnWslb',';\x20no\x20change.','62844hQhSCV','roleType','Role\x20id\x20(from\x20`role\x20list`)','appCode','Pass\x20--user\x20<id|name>.','9509931GttLPz','find','user','push','User\x20','5KHazsq','POST','ADMIN','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','validation','toLowerCase','2749926gFckwx','\x20is\x20not\x20a\x20member\x20of\x20role\x20','remark','\x22\x20is\x20ambiguous\x20(ids:\x20','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','tenant','\x20not\x20found\x20in\x20the\x20user-role\x20list.','str','map','user-add','523494sRRWyQ','userList','nickname','Pass\x20--role\x20<id|name>.','Disambiguate\x20with\x20--role\x20<id>.','Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)','Cannot\x20','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','\x20built-in\x20role\x20','number','role','USER','Role\x20name\x20\x22','1019835BBXvky','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'];a170_0x19f1=function(){return _0x51ea43;};return a170_0x19f1();}export const ROLE_REF_FLAG={'name':'role','type':a170_0x439d91(0xba),'required':!![],'description':a170_0x439d91(0xa3)};export const USER_REF_FLAG={'name':a170_0x439d91(0x8a),'type':a170_0x439d91(0xba),'required':!![],'description':'User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId'};export const NAME_FLAG={'name':a170_0x439d91(0xb0),'type':a170_0x439d91(0xba),'required':!![],'description':'Role\x20name'};function a170_0x1838(_0x1622ee,_0x12f93d){_0x1622ee=_0x1622ee-0x7f;const _0x19f14b=a170_0x19f1();let _0x183801=_0x19f14b[_0x1622ee];return _0x183801;}export const USER_NAME_FLAG={'name':'name','type':a170_0x439d91(0xba),'required':!![],'description':a170_0x439d91(0xad)};export const REMARK_FLAG={'name':a170_0x439d91(0x96),'type':a170_0x439d91(0xba),'required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a170_0x439d91(0xa8),'required':![],'description':a170_0x439d91(0xa6)};export const BUILTIN_ROLE_TYPES=[a170_0x439d91(0x8f),a170_0x439d91(0xbe),a170_0x439d91(0xaa)];export function isBuiltinRole(_0x1ab113){return BUILTIN_ROLE_TYPES['includes'](_0x1ab113);}export function assertCustomRole(_0x4ef55e,_0x52060e){const _0xb2f676=a170_0x439d91;if(_0x4ef55e['roleType']!=='CUSTOM')throw CliErrors['validation'](_0xb2f676(0xa4)+_0x52060e+_0xb2f676(0xa7)+_0x4ef55e[_0xb2f676(0xc9)]+'\x20('+_0x4ef55e[_0xb2f676(0x84)]+').',_0xb2f676(0x98));}export function assertPermConfigurable(_0x434ca4){const _0x4552c3=a170_0x439d91;if(_0x434ca4['roleType']==='DEV'||_0x434ca4[_0x4552c3(0x84)]===_0x4552c3(0x8f))throw CliErrors['validation']('Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20'+_0x434ca4[_0x4552c3(0xc9)]+'\x20('+_0x434ca4[_0x4552c3(0x84)]+').',_0x4552c3(0xb7));}export function projectRole(_0x73b051){const _0x7a5d5b=a170_0x439d91;return{'id':_0x73b051['id'],'roleName':_0x73b051[_0x7a5d5b(0xc9)],'roleType':_0x73b051[_0x7a5d5b(0x84)],'remark':_0x73b051[_0x7a5d5b(0x96)],'userCount':_0x73b051['userCount'],'permitCount':_0x73b051[_0x7a5d5b(0xcc)],'builtin':isBuiltinRole(_0x73b051['roleType'])};}export async function resolveRoleRef(_0xe83a7,_0x289d7f){const _0x3a5838=a170_0x439d91,_0x54e6f8=_0x289d7f[_0x3a5838(0xc1)]();if(!_0x54e6f8)throw CliErrors[_0x3a5838(0x92)](_0x3a5838(0xb9),_0x3a5838(0xa1));if(/^\d+$/['test'](_0x54e6f8))return getRoleById(_0xe83a7,Number(_0x54e6f8));const _0x56c326=await listAllAppRoles(_0xe83a7),_0x3af88f=_0x56c326['filter'](_0x25ada3=>_0x25ada3[_0x3a5838(0xc9)]===_0x54e6f8);if(_0x3af88f[_0x3a5838(0xbd)]===0x0)throw CliErrors['validation'](_0x3a5838(0xab)+_0x54e6f8+_0x3a5838(0xb5)+_0xe83a7+'.',_0x3a5838(0xc4));if(_0x3af88f['length']>0x1){const _0x31bd69=_0x3af88f[_0x3a5838(0x9c)](_0x257eb8=>_0x257eb8['id'])['join'](',\x20');throw CliErrors[_0x3a5838(0x92)](_0x3a5838(0xab)+_0x54e6f8+_0x3a5838(0x97)+_0x31bd69+').',_0x3a5838(0xa2));}return _0x3af88f[0x0];}export async function getRoleById(_0x454e90,_0x4ae9c5){const _0x101593=a170_0x439d91,_0x1691f0=await getAppRole(_0x4ae9c5);if(!_0x1691f0)throw CliErrors['validation']('Role\x20id\x20'+_0x4ae9c5+'\x20not\x20found\x20in\x20app\x20'+_0x454e90+'.',_0x101593(0x90));return _0x1691f0;}async function listAllAppRoles(_0x38be2e){const _0x3662b4=a170_0x439d91,_0x468320=0x64,_0x4b3c9e=[];for(let _0x4df2f0=0x1;;_0x4df2f0+=0x1){const {items:_0x3d69d,paging:_0x903e4b}=await listAppRoles(_0x38be2e,{'currentPage':_0x4df2f0,'pageSize':_0x468320});_0x4b3c9e['push'](..._0x3d69d);if(_0x3d69d[_0x3662b4(0xbd)]<_0x468320||_0x903e4b&&_0x4b3c9e['length']>=_0x903e4b[_0x3662b4(0xaf)])return _0x4b3c9e;}}export async function resolveTenantCode(){const _0x52cfa3=a170_0x439d91,_0x86734b=await getSessionUserInfo(),_0x29adb3=_0x86734b?.[_0x52cfa3(0x8a)]?.[_0x52cfa3(0x99)]?.['tenant_code'];if(!_0x29adb3)throw CliErrors[_0x52cfa3(0xb8)](_0x52cfa3(0x91));return _0x29adb3;}function matchMember(_0x856d77,_0x2a8ad1){const _0x2a8347=a170_0x439d91,_0x207ee1=_0x2a8ad1['trim']()[_0x2a8347(0x93)]();return(_0x856d77['nickname']??'')[_0x2a8347(0x93)]()===_0x207ee1||(_0x856d77[_0x2a8347(0xc0)]??'')[_0x2a8347(0x93)]()===_0x207ee1;}export async function resolveUserRef(_0x4afce1){const _0x41c752=a170_0x439d91,_0x511710=_0x4afce1[_0x41c752(0xc1)]();if(!_0x511710)throw CliErrors[_0x41c752(0x92)]('Missing\x20user\x20reference.',_0x41c752(0x87));const _0x4b5054=await resolveTenantCode(),_0x4cf4d3=await getTenantMembers(_0x4b5054);if(/^\d+$/[_0x41c752(0xb3)](_0x511710)){const _0x53568=Number(_0x511710),_0x1f50a7=_0x4cf4d3[_0x41c752(0x89)](_0x41300e=>_0x41300e[_0x41c752(0xc7)]===_0x53568);return{'userId':_0x53568,'username':_0x1f50a7?.['username']??String(_0x53568),'nickname':_0x1f50a7?.[_0x41c752(0xa0)],'matchedBy':'id'};}const _0x14e374=_0x4cf4d3[_0x41c752(0xb1)](_0x2a0a49=>matchMember(_0x2a0a49,_0x511710));if(_0x14e374['length']===0x0)throw CliErrors[_0x41c752(0x92)](_0x41c752(0x80)+_0x511710+'\x22.',_0x41c752(0xc3));if(_0x14e374['length']>0x1){const _0x2f9ea9=_0x14e374[_0x41c752(0x9c)](_0x287414=>(_0x287414[_0x41c752(0xa0)]??_0x287414['username']??'?')+'('+_0x287414[_0x41c752(0xc7)]+')')[_0x41c752(0xbc)](',\x20');throw CliErrors[_0x41c752(0x92)](_0x41c752(0xae)+_0x511710+_0x41c752(0x7f)+_0x2f9ea9+'.',_0x41c752(0xb2));}const _0x5d12bd=_0x14e374[0x0];return{'userId':_0x5d12bd['userId'],'username':_0x5d12bd['username']??String(_0x5d12bd[_0x41c752(0xc7)]),'nickname':_0x5d12bd[_0x41c752(0xa0)],'matchedBy':'name'};}export const UPDATE_USER_LIST_PATH='/smartapi/permit/user-role/update-user-list';function userIdsOf(_0x2cde3d){const _0x3ba295=a170_0x439d91;return(_0x2cde3d?.[_0x3ba295(0x9f)]??[])[_0x3ba295(0x9c)](_0x241eb9=>_0x241eb9[_0x3ba295(0xc7)]);}export function computeRoleUserMutation(_0x48be64){const _0xe3c4d3=a170_0x439d91,{operation:_0x348f3a,appCode:_0x537ddc,roleUsers:_0x13f497,targetRoleId:_0x4beed0,user:_0x487d5b}=_0x48be64,_0x16c6c2=_0x13f497[_0xe3c4d3(0x89)](_0x456ee1=>_0x456ee1['id']===_0x4beed0);if(!_0x16c6c2)throw CliErrors[_0xe3c4d3(0x92)]('Role\x20id\x20'+_0x4beed0+_0xe3c4d3(0x9a),_0xe3c4d3(0x90));const _0x1ead00=userIdsOf(_0x16c6c2),_0x2549fe=[];if(_0x48be64[_0xe3c4d3(0xc2)]!==undefined&&_0x48be64[_0xe3c4d3(0xc2)]!==_0x1ead00[_0xe3c4d3(0xbd)])throw CliErrors[_0xe3c4d3(0x92)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x48be64['expectUserCount']+_0xe3c4d3(0xbb)+_0x1ead00['length']+'.',_0xe3c4d3(0xa5));const _0x59c4f0=_0x1ead00[_0xe3c4d3(0xcb)](_0x487d5b[_0xe3c4d3(0xc7)]);let _0x21b7b5=![];const _0x16453a=[..._0x16c6c2[_0xe3c4d3(0x9f)]];if(_0x348f3a===_0xe3c4d3(0x9d))_0x59c4f0?_0x2549fe[_0xe3c4d3(0x8b)](_0xe3c4d3(0x8c)+_0x487d5b[_0xe3c4d3(0xc7)]+_0xe3c4d3(0xbf)+_0x16c6c2[_0xe3c4d3(0xc9)]+';\x20no\x20change.'):(_0x16453a[_0xe3c4d3(0x8b)]({'userId':_0x487d5b[_0xe3c4d3(0xc7)],'username':_0x487d5b[_0xe3c4d3(0xc0)],..._0x487d5b[_0xe3c4d3(0xa0)]?{'nickname':_0x487d5b['nickname']}:{}}),_0x21b7b5=!![]);else{if(!_0x59c4f0)_0x2549fe['push'](_0xe3c4d3(0x8c)+_0x487d5b['userId']+_0xe3c4d3(0x95)+_0x16c6c2[_0xe3c4d3(0xc9)]+_0xe3c4d3(0x82));else{const _0x24b3d9=_0x16453a[_0xe3c4d3(0xc5)](_0x22392c=>_0x22392c[_0xe3c4d3(0xc7)]===_0x487d5b[_0xe3c4d3(0xc7)]);if(_0x24b3d9>=0x0)_0x16453a['splice'](_0x24b3d9,0x1);_0x21b7b5=!![];}}const _0x2d350b=_0x13f497[_0xe3c4d3(0x9c)](_0x59870f=>_0x59870f['id']===_0x4beed0?{..._0x59870f,'userList':_0x16453a}:_0x59870f),_0x40e95c=_0x16453a['map'](_0x97cd11=>_0x97cd11[_0xe3c4d3(0xc7)]),_0x17cc43={'operation':_0x348f3a,'selector':{'appCode':_0x537ddc,'roleId':_0x4beed0,'roleName':_0x16c6c2['roleName'],'userId':_0x487d5b['userId']},'before':{'userIds':_0x1ead00},'after':{'userIds':_0x40e95c},'dryRun':_0x48be64[_0xe3c4d3(0xb4)],'backend':{'method':_0xe3c4d3(0x8e),'path':UPDATE_USER_LIST_PATH},'warnings':_0x2549fe};return{'roleList':_0x2d350b,'mutation':_0x17cc43,'changed':_0x21b7b5};}export async function loadRoleUsers(_0x2034c4){return listRoleUsers(_0x2034c4);}export function readRoleRef(_0xc54df2){const _0xe7d514=a170_0x439d91,_0x1f556e=_0xc54df2['str']('role')['trim']();if(!_0x1f556e)throw CliErrors[_0xe7d514(0xca)](_0xe7d514(0xa9),_0xe7d514(0xa1));return _0x1f556e;}export async function prepareUserMutation(_0x58250b,_0x5357f8,_0xeb683f){const _0x105293=a170_0x439d91,_0x265cd5=readRoleRef(_0x58250b),_0x226a15=_0x58250b[_0x105293(0x9b)]('user')[_0x105293(0xc1)]();if(!_0x226a15)throw CliErrors[_0x105293(0xca)](_0x105293(0x8a),_0x105293(0x87));const _0x36145d=_0x58250b[_0x105293(0xc8)](_0x105293(0xb6)),_0x2ab853=_0x36145d===undefined||_0x36145d===null?undefined:Number(_0x36145d),_0x5c25aa=await resolveRoleRef(_0x58250b[_0x105293(0x86)],_0x265cd5),_0x2be00e=await resolveUserRef(_0x226a15),_0x2edb31=await loadRoleUsers(_0x58250b[_0x105293(0x86)]);return computeRoleUserMutation({'operation':_0x5357f8,'appCode':_0x58250b[_0x105293(0x86)],'roleUsers':_0x2edb31,'targetRoleId':_0x5c25aa['id'],'user':{'userId':_0x2be00e['userId'],'username':_0x2be00e['username'],'nickname':_0x2be00e[_0x105293(0xa0)]},'dryRun':_0xeb683f,..._0x2ab853!==undefined?{'expectUserCount':_0x2ab853}:{}});}
@@ -1 +1 @@
1
- const a164_0x307149=a164_0x16f9;(function(_0x410ed8,_0x310c59){const _0x51f04b=a164_0x16f9,_0x49085e=_0x410ed8();while(!![]){try{const _0x3a8c35=parseInt(_0x51f04b(0x206))/0x1+parseInt(_0x51f04b(0x202))/0x2+-parseInt(_0x51f04b(0x1f7))/0x3*(-parseInt(_0x51f04b(0x20a))/0x4)+-parseInt(_0x51f04b(0x1f9))/0x5*(parseInt(_0x51f04b(0x203))/0x6)+-parseInt(_0x51f04b(0x1f0))/0x7+parseInt(_0x51f04b(0x1ff))/0x8*(parseInt(_0x51f04b(0x1f6))/0x9)+-parseInt(_0x51f04b(0x200))/0xa*(-parseInt(_0x51f04b(0x204))/0xb);if(_0x3a8c35===_0x310c59)break;else _0x49085e['push'](_0x49085e['shift']());}catch(_0x42b49d){_0x49085e['push'](_0x49085e['shift']());}}}(a164_0xd856,0xe2a4e));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='/smartapi/permit/role/update';function a164_0x16f9(_0x55655b,_0x12f254){_0x55655b=_0x55655b-0x1f0;const _0xd856f8=a164_0xd856();let _0x16f9f7=_0xd856f8[_0x55655b];return _0x16f9f7;}function readPatch(_0x8edc1b){const _0x1fa022=a164_0x16f9,_0x2cfed6=_0x8edc1b[_0x1fa022(0x1f8)](_0x1fa022(0x1f3)),_0x12b143=_0x8edc1b[_0x1fa022(0x1f8)](_0x1fa022(0x1fc)),_0x2c4f38={};if(_0x2cfed6!==undefined&&_0x2cfed6!==null){const _0x4124cc=String(_0x2cfed6)[_0x1fa022(0x1f2)]();if(!_0x4124cc)throw CliErrors[_0x1fa022(0x207)](_0x1fa022(0x209));if(_0x4124cc['length']>0x40)throw CliErrors[_0x1fa022(0x207)](_0x1fa022(0x1fb));_0x2c4f38['roleName']=_0x4124cc;}_0x12b143!==undefined&&_0x12b143!==null&&(_0x2c4f38[_0x1fa022(0x1fc)]=String(_0x12b143));if(_0x2c4f38[_0x1fa022(0x1fe)]===undefined&&_0x2c4f38['remark']===undefined)throw CliErrors['validation']('Nothing\x20to\x20update.','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x2c4f38;}function a164_0xd856(){const _0x17d7d1=['Role\x20name\x20cannot\x20exceed\x2064\x20characters.','remark','appCode','roleName','603416YNXMbW','10OwBjjY','\x20(id=','1461138AcfJwk','1632aseVZQ','15710541BCqkzq','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(DEV/ADMIN\x20rejected)','118592bJGyyj','validation','update','--name\x20cannot\x20be\x20empty.','28AbsQTi','4491088kzCIPj','string','trim','name','POST','role','45IheCaw','298827vVEzrG','flag','32755lGWGMy','Updated\x20role\x20'];a164_0xd856=function(){return _0x17d7d1;};return a164_0xd856();}export const roleUpdate={'service':a164_0x307149(0x1f5),'command':a164_0x307149(0x208),'description':a164_0x307149(0x205),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':'name','type':a164_0x307149(0x1f1),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4870a8){readPatch(_0x4870a8);},async 'dryRun'(_0x5e8ad0){const _0x37677e=a164_0x307149,_0x3fa776=_0x5e8ad0['num']('id'),_0x133188=readPatch(_0x5e8ad0),_0x17e8a9=await getRoleById(_0x5e8ad0[_0x37677e(0x1fd)],_0x3fa776);return assertCustomRole(_0x17e8a9,_0x37677e(0x208)),asDryRunResult({'operation':_0x37677e(0x208),'selector':{'appCode':_0x5e8ad0['appCode'],'roleId':_0x3fa776,'roleName':_0x17e8a9[_0x37677e(0x1fe)]},'before':projectRole(_0x17e8a9),'after':projectRole({..._0x17e8a9,..._0x133188[_0x37677e(0x1fe)]!==undefined?{'roleName':_0x133188['roleName']}:{},..._0x133188['remark']!==undefined?{'remark':_0x133188[_0x37677e(0x1fc)]}:{}}),'dryRun':!![],'backend':{'method':_0x37677e(0x1f4),'path':UPDATE_PATH},'warnings':[]},{'method':_0x37677e(0x1f4),'url':UPDATE_PATH});},async 'execute'(_0x3fa4bb){const _0x4bb447=a164_0x307149,_0x2878b8=_0x3fa4bb['num']('id'),_0x2009f0=readPatch(_0x3fa4bb),_0x1586c6=await getRoleById(_0x3fa4bb[_0x4bb447(0x1fd)],_0x2878b8);assertCustomRole(_0x1586c6,_0x4bb447(0x208)),await updateAppRole({'id':_0x2878b8,'appCode':_0x3fa4bb[_0x4bb447(0x1fd)],..._0x2009f0['roleName']!==undefined?{'roleName':_0x2009f0[_0x4bb447(0x1fe)]}:{},..._0x2009f0[_0x4bb447(0x1fc)]!==undefined?{'remark':_0x2009f0[_0x4bb447(0x1fc)]}:{}});const _0x398586=await getRoleById(_0x3fa4bb[_0x4bb447(0x1fd)],_0x2878b8);return{'ok':!![],'data':{'operation':_0x4bb447(0x208),'selector':{'appCode':_0x3fa4bb[_0x4bb447(0x1fd)],'roleId':_0x2878b8,'roleName':_0x398586[_0x4bb447(0x1fe)]},'before':projectRole(_0x1586c6),'after':projectRole(_0x398586),'dryRun':![],'backend':{'method':_0x4bb447(0x1f4),'path':UPDATE_PATH},'warnings':[]},'message':_0x4bb447(0x1fa)+_0x398586[_0x4bb447(0x1fe)]+_0x4bb447(0x201)+_0x2878b8+')'};}};
1
+ const a171_0x31d22f=a171_0x309b;(function(_0x4766e8,_0x202a20){const _0x4053c9=a171_0x309b,_0x1a4f65=_0x4766e8();while(!![]){try{const _0x4d4980=-parseInt(_0x4053c9(0x135))/0x1+-parseInt(_0x4053c9(0x140))/0x2+-parseInt(_0x4053c9(0x13d))/0x3+parseInt(_0x4053c9(0x142))/0x4+-parseInt(_0x4053c9(0x130))/0x5+-parseInt(_0x4053c9(0x138))/0x6+-parseInt(_0x4053c9(0x132))/0x7*(-parseInt(_0x4053c9(0x12d))/0x8);if(_0x4d4980===_0x202a20)break;else _0x1a4f65['push'](_0x1a4f65['shift']());}catch(_0x16faae){_0x1a4f65['push'](_0x1a4f65['shift']());}}}(a171_0x1788,0x2c4ed));function a171_0x1788(){const _0xaf53fb=['role','1380876Qaslwv','name','trim','Nothing\x20to\x20update.','appCode','823104ijQCNb','roleName','validation','26070jAazrK','length','1113484ULdVDC','flag','/smartapi/permit/role/update','update','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','POST','\x20(id=','8lKBrdD','remark','num','1182810znwwRw','write','5697412qGWkQD','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(DEV/ADMIN\x20rejected)','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','156691araOSm','--name\x20cannot\x20be\x20empty.'];a171_0x1788=function(){return _0xaf53fb;};return a171_0x1788();}import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a171_0x309b(_0x52d6e5,_0x326563){_0x52d6e5=_0x52d6e5-0x129;const _0x1788d9=a171_0x1788();let _0x309bb6=_0x1788d9[_0x52d6e5];return _0x309bb6;}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=a171_0x31d22f(0x144);function readPatch(_0x2fd6a1){const _0x216e8e=a171_0x31d22f,_0x123ccd=_0x2fd6a1[_0x216e8e(0x143)](_0x216e8e(0x139)),_0x8d7c7f=_0x2fd6a1['flag'](_0x216e8e(0x12e)),_0x378af2={};if(_0x123ccd!==undefined&&_0x123ccd!==null){const _0x52fa22=String(_0x123ccd)[_0x216e8e(0x13a)]();if(!_0x52fa22)throw CliErrors[_0x216e8e(0x13f)](_0x216e8e(0x136));if(_0x52fa22[_0x216e8e(0x141)]>0x40)throw CliErrors['validation'](_0x216e8e(0x134));_0x378af2[_0x216e8e(0x13e)]=_0x52fa22;}_0x8d7c7f!==undefined&&_0x8d7c7f!==null&&(_0x378af2[_0x216e8e(0x12e)]=String(_0x8d7c7f));if(_0x378af2[_0x216e8e(0x13e)]===undefined&&_0x378af2[_0x216e8e(0x12e)]===undefined)throw CliErrors['validation'](_0x216e8e(0x13b),_0x216e8e(0x12a));return _0x378af2;}export const roleUpdate={'service':a171_0x31d22f(0x137),'command':a171_0x31d22f(0x129),'description':a171_0x31d22f(0x133),'risk':a171_0x31d22f(0x131),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a171_0x31d22f(0x139),'type':'string','required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1245e9){readPatch(_0x1245e9);},async 'dryRun'(_0x513baa){const _0x5840fa=a171_0x31d22f,_0xb7953b=_0x513baa[_0x5840fa(0x12f)]('id'),_0x2e01cb=readPatch(_0x513baa),_0x3bf4c=await getRoleById(_0x513baa[_0x5840fa(0x13c)],_0xb7953b);return assertCustomRole(_0x3bf4c,_0x5840fa(0x129)),asDryRunResult({'operation':_0x5840fa(0x129),'selector':{'appCode':_0x513baa[_0x5840fa(0x13c)],'roleId':_0xb7953b,'roleName':_0x3bf4c[_0x5840fa(0x13e)]},'before':projectRole(_0x3bf4c),'after':projectRole({..._0x3bf4c,..._0x2e01cb[_0x5840fa(0x13e)]!==undefined?{'roleName':_0x2e01cb['roleName']}:{},..._0x2e01cb[_0x5840fa(0x12e)]!==undefined?{'remark':_0x2e01cb[_0x5840fa(0x12e)]}:{}}),'dryRun':!![],'backend':{'method':_0x5840fa(0x12b),'path':UPDATE_PATH},'warnings':[]},{'method':_0x5840fa(0x12b),'url':UPDATE_PATH});},async 'execute'(_0x23133f){const _0xc9663a=a171_0x31d22f,_0x39f86c=_0x23133f['num']('id'),_0x445a9b=readPatch(_0x23133f),_0x7aca94=await getRoleById(_0x23133f[_0xc9663a(0x13c)],_0x39f86c);assertCustomRole(_0x7aca94,_0xc9663a(0x129)),await updateAppRole({'id':_0x39f86c,'appCode':_0x23133f[_0xc9663a(0x13c)],..._0x445a9b[_0xc9663a(0x13e)]!==undefined?{'roleName':_0x445a9b[_0xc9663a(0x13e)]}:{},..._0x445a9b[_0xc9663a(0x12e)]!==undefined?{'remark':_0x445a9b['remark']}:{}});const _0x107ede=await getRoleById(_0x23133f[_0xc9663a(0x13c)],_0x39f86c);return{'ok':!![],'data':{'operation':_0xc9663a(0x129),'selector':{'appCode':_0x23133f[_0xc9663a(0x13c)],'roleId':_0x39f86c,'roleName':_0x107ede['roleName']},'before':projectRole(_0x7aca94),'after':projectRole(_0x107ede),'dryRun':![],'backend':{'method':_0xc9663a(0x12b),'path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x107ede['roleName']+_0xc9663a(0x12c)+_0x39f86c+')'};}};
@@ -1 +1 @@
1
- const a165_0x197348=a165_0x2e00;function a165_0x2e00(_0x4132c4,_0x3cbe82){_0x4132c4=_0x4132c4-0xab;const _0x4fb4c2=a165_0x4fb4();let _0x2e00eb=_0x4fb4c2[_0x4132c4];return _0x2e00eb;}(function(_0x34e2ac,_0x34f8da){const _0x29fb5f=a165_0x2e00,_0x376711=_0x34e2ac();while(!![]){try{const _0x52103e=-parseInt(_0x29fb5f(0xb8))/0x1+parseInt(_0x29fb5f(0xb3))/0x2*(parseInt(_0x29fb5f(0xba))/0x3)+parseInt(_0x29fb5f(0xac))/0x4*(-parseInt(_0x29fb5f(0xaf))/0x5)+-parseInt(_0x29fb5f(0xb1))/0x6+parseInt(_0x29fb5f(0xae))/0x7*(-parseInt(_0x29fb5f(0xbc))/0x8)+-parseInt(_0x29fb5f(0xbd))/0x9+parseInt(_0x29fb5f(0xb4))/0xa*(parseInt(_0x29fb5f(0xbb))/0xb);if(_0x52103e===_0x34f8da)break;else _0x376711['push'](_0x376711['shift']());}catch(_0x178845){_0x376711['push'](_0x376711['shift']());}}}(a165_0x4fb4,0x3a243));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';function a165_0x4fb4(){const _0x45be4a=['4zkomAy','\x20already\x20in\x20role\x20','7GBepPO','2271470ilrzBd','No\x20change:\x20user\x20','406896eJfFBB','roleName','895946xxVJyq','29180lpCknl','\x20to\x20role\x20','userId','POST','369849PHzwcZ','user-add','3DaAaQs','4631cLFVYr','1942176eyJQgU','2732157NKTmEO','selector'];a165_0x4fb4=function(){return _0x45be4a;};return a165_0x4fb4();}export const roleUserAdd={'service':'role','command':a165_0x197348(0xb9),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x56963f){const _0x3c3f30=a165_0x197348,{mutation:_0x35de15}=await prepareUserMutation(_0x56963f,_0x3c3f30(0xb9),!![]);return asDryRunResult(_0x35de15,{'method':_0x3c3f30(0xb7),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x10d9fb){const _0x30a53d=a165_0x197348,{roleList:_0x304a67,mutation:_0x3f3d89,changed:_0x55433a}=await prepareUserMutation(_0x10d9fb,'user-add',![]);return _0x55433a&&await updateRoleUsers(_0x10d9fb['appCode'],_0x304a67),{'ok':!![],'data':_0x3f3d89,'message':_0x55433a?'Added\x20user\x20'+_0x3f3d89[_0x30a53d(0xab)]['userId']+_0x30a53d(0xb5)+_0x3f3d89[_0x30a53d(0xab)][_0x30a53d(0xb2)]:_0x30a53d(0xb0)+_0x3f3d89[_0x30a53d(0xab)][_0x30a53d(0xb6)]+_0x30a53d(0xad)+_0x3f3d89['selector'][_0x30a53d(0xb2)]};}};
1
+ const a172_0x4474ac=a172_0x3a01;function a172_0x3a01(_0x2ecac8,_0x1ddafb){_0x2ecac8=_0x2ecac8-0x1bc;const _0x5763f2=a172_0x5763();let _0x3a012c=_0x5763f2[_0x2ecac8];return _0x3a012c;}(function(_0x3c7726,_0x54b6ba){const _0x5b1330=a172_0x3a01,_0x3e5972=_0x3c7726();while(!![]){try{const _0x51dc3b=-parseInt(_0x5b1330(0x1c0))/0x1*(parseInt(_0x5b1330(0x1c1))/0x2)+-parseInt(_0x5b1330(0x1bc))/0x3*(parseInt(_0x5b1330(0x1d0))/0x4)+parseInt(_0x5b1330(0x1cc))/0x5+parseInt(_0x5b1330(0x1ca))/0x6*(-parseInt(_0x5b1330(0x1c9))/0x7)+-parseInt(_0x5b1330(0x1c5))/0x8*(-parseInt(_0x5b1330(0x1cd))/0x9)+-parseInt(_0x5b1330(0x1d3))/0xa*(parseInt(_0x5b1330(0x1ce))/0xb)+parseInt(_0x5b1330(0x1c3))/0xc;if(_0x51dc3b===_0x54b6ba)break;else _0x3e5972['push'](_0x3e5972['shift']());}catch(_0x39fb4e){_0x3e5972['push'](_0x3e5972['shift']());}}}(a172_0x5763,0x359e8));import{updateRoleUsers}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a172_0x5763(){const _0x3d49bc=['role','Added\x20user\x20','454rcKNEV','26Wdfqqo','user-add','5604108ahUCNy','Add\x20a\x20user\x20to\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','504wvMZaA','selector','roleName','\x20already\x20in\x20role\x20','56BDERHw','324786SscJHC','appCode','827060vtqELU','44910WcibdV','110Hyucpf','\x20to\x20role\x20','4NaDYoR','userId','high-risk-write','203570UpHkxU','253941FPUPVe','POST'];a172_0x5763=function(){return _0x3d49bc;};return a172_0x5763();}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':a172_0x4474ac(0x1be),'command':a172_0x4474ac(0x1c2),'description':a172_0x4474ac(0x1c4),'risk':a172_0x4474ac(0x1d2),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2ac4dc){const _0x24480a=a172_0x4474ac,{mutation:_0x4c3a33}=await prepareUserMutation(_0x2ac4dc,_0x24480a(0x1c2),!![]);return asDryRunResult(_0x4c3a33,{'method':_0x24480a(0x1bd),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x2a4471){const _0x565359=a172_0x4474ac,{roleList:_0x1bb192,mutation:_0x185c5e,changed:_0x34cab7}=await prepareUserMutation(_0x2a4471,_0x565359(0x1c2),![]);return _0x34cab7&&await updateRoleUsers(_0x2a4471[_0x565359(0x1cb)],_0x1bb192),{'ok':!![],'data':_0x185c5e,'message':_0x34cab7?_0x565359(0x1bf)+_0x185c5e[_0x565359(0x1c6)][_0x565359(0x1d1)]+_0x565359(0x1cf)+_0x185c5e[_0x565359(0x1c6)][_0x565359(0x1c7)]:'No\x20change:\x20user\x20'+_0x185c5e['selector']['userId']+_0x565359(0x1c8)+_0x185c5e['selector'][_0x565359(0x1c7)]};}};
@@ -1 +1 @@
1
- const a166_0x199cbb=a166_0x5b6f;(function(_0x3b6d32,_0x31067a){const _0x45cc19=a166_0x5b6f,_0x59dbab=_0x3b6d32();while(!![]){try{const _0x4a7f2d=parseInt(_0x45cc19(0x193))/0x1+parseInt(_0x45cc19(0x19d))/0x2+parseInt(_0x45cc19(0x18d))/0x3*(parseInt(_0x45cc19(0x1a0))/0x4)+-parseInt(_0x45cc19(0x191))/0x5+parseInt(_0x45cc19(0x19a))/0x6*(-parseInt(_0x45cc19(0x195))/0x7)+parseInt(_0x45cc19(0x19b))/0x8*(-parseInt(_0x45cc19(0x197))/0x9)+-parseInt(_0x45cc19(0x196))/0xa*(-parseInt(_0x45cc19(0x198))/0xb);if(_0x4a7f2d===_0x31067a)break;else _0x59dbab['push'](_0x59dbab['shift']());}catch(_0x37dbec){_0x59dbab['push'](_0x59dbab['shift']());}}}(a166_0xce77,0xab282));function a166_0xce77(){const _0x2437ae=['\x20from\x20role\x20','\x20not\x20in\x20role\x20','3436yNZGro','selector','Remove\x20a\x20user\x20from\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','high-risk-write','3372bHIqto','No\x20change:\x20user\x20','POST','roleName','4295740qxQKUs','userId','1013243SjJtoN','role','840kKmJKK','30MlyIVC','9tJxuBa','1236224moioMq','Removed\x20user\x20','50028eSabJD','6323064ykRWSf','user-remove','2070476PzReZY'];a166_0xce77=function(){return _0x2437ae;};return a166_0xce77();}import{updateRoleUsers}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a166_0x5b6f(_0x2c4451,_0x4b678d){_0x2c4451=_0x2c4451-0x18d;const _0xce775e=a166_0xce77();let _0x5b6f32=_0xce775e[_0x2c4451];return _0x5b6f32;}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':a166_0x199cbb(0x194),'command':'user-remove','description':a166_0x199cbb(0x1a2),'risk':a166_0x199cbb(0x1a3),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x97f13){const _0x3a217a=a166_0x199cbb,{mutation:_0x4200f4}=await prepareUserMutation(_0x97f13,_0x3a217a(0x19c),!![]);return asDryRunResult(_0x4200f4,{'method':_0x3a217a(0x18f),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x2293b2){const _0x17a4fe=a166_0x199cbb,{roleList:_0x5628bf,mutation:_0x36ed64,changed:_0x2be532}=await prepareUserMutation(_0x2293b2,_0x17a4fe(0x19c),![]);return _0x2be532&&await updateRoleUsers(_0x2293b2['appCode'],_0x5628bf),{'ok':!![],'data':_0x36ed64,'message':_0x2be532?_0x17a4fe(0x199)+_0x36ed64[_0x17a4fe(0x1a1)][_0x17a4fe(0x192)]+_0x17a4fe(0x19e)+_0x36ed64[_0x17a4fe(0x1a1)][_0x17a4fe(0x190)]:_0x17a4fe(0x18e)+_0x36ed64[_0x17a4fe(0x1a1)]['userId']+_0x17a4fe(0x19f)+_0x36ed64[_0x17a4fe(0x1a1)]['roleName']};}};
1
+ const a173_0x265a71=a173_0x2cab;(function(_0x4e6131,_0x2c02e1){const _0x27c8cc=a173_0x2cab,_0x195b01=_0x4e6131();while(!![]){try{const _0x35af79=parseInt(_0x27c8cc(0x1e4))/0x1+-parseInt(_0x27c8cc(0x1e1))/0x2*(-parseInt(_0x27c8cc(0x1e0))/0x3)+parseInt(_0x27c8cc(0x1d9))/0x4*(-parseInt(_0x27c8cc(0x1d5))/0x5)+parseInt(_0x27c8cc(0x1e2))/0x6*(parseInt(_0x27c8cc(0x1da))/0x7)+-parseInt(_0x27c8cc(0x1dd))/0x8*(parseInt(_0x27c8cc(0x1e3))/0x9)+-parseInt(_0x27c8cc(0x1e5))/0xa+parseInt(_0x27c8cc(0x1d6))/0xb;if(_0x35af79===_0x2c02e1)break;else _0x195b01['push'](_0x195b01['shift']());}catch(_0x2a4f42){_0x195b01['push'](_0x195b01['shift']());}}}(a173_0x476d,0x74226));import{updateRoleUsers}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a173_0x476d(){const _0xeb7795=['91HXwBQK','Removed\x20user\x20','No\x20change:\x20user\x20','1608WohSrR','appCode','POST','3yTUjfc','1214386CAnqCj','295068ikrxUY','38331jrZmCW','576734gfNcoK','2558370TazXOH','role','\x20from\x20role\x20','\x20not\x20in\x20role\x20','selector','roleName','userId','207215ocmAYB','6981084ZwdBmT','user-remove','high-risk-write','84wLRKQf'];a173_0x476d=function(){return _0xeb7795;};return a173_0x476d();}import{asDryRunResult}from'../../commands/common/dry-run.js';function a173_0x2cab(_0x860427,_0x5eb131){_0x860427=_0x860427-0x1d3;const _0x476da8=a173_0x476d();let _0x2cab2e=_0x476da8[_0x860427];return _0x2cab2e;}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':a173_0x265a71(0x1e6),'command':a173_0x265a71(0x1d7),'description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','risk':a173_0x265a71(0x1d8),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4a1dac){const _0x351bd9=a173_0x265a71,{mutation:_0x5b8de7}=await prepareUserMutation(_0x4a1dac,'user-remove',!![]);return asDryRunResult(_0x5b8de7,{'method':_0x351bd9(0x1df),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x5b51a2){const _0x3e1257=a173_0x265a71,{roleList:_0x44bd4a,mutation:_0x4c58f2,changed:_0x4ea860}=await prepareUserMutation(_0x5b51a2,_0x3e1257(0x1d7),![]);return _0x4ea860&&await updateRoleUsers(_0x5b51a2[_0x3e1257(0x1de)],_0x44bd4a),{'ok':!![],'data':_0x4c58f2,'message':_0x4ea860?_0x3e1257(0x1db)+_0x4c58f2[_0x3e1257(0x1e9)][_0x3e1257(0x1d4)]+_0x3e1257(0x1e7)+_0x4c58f2['selector'][_0x3e1257(0x1d3)]:_0x3e1257(0x1dc)+_0x4c58f2['selector'][_0x3e1257(0x1d4)]+_0x3e1257(0x1e8)+_0x4c58f2[_0x3e1257(0x1e9)][_0x3e1257(0x1d3)]};}};
@@ -1 +1 @@
1
- const a167_0x3333ca=a167_0x508b;function a167_0x30bf(){const _0x5d2186=['matchedBy','15117NamBaj','name','2309209Queotu','8WeQJwf','2253018yTjmcY','role','nickname','1397214sVPTTR','trim','user-resolve','read','username','518572haHCJL','5634765WBKhte','Resolved\x20\x22','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','Pass\x20--name\x20<nickname|username>.','70OhTBvy','5kFCvVQ','flagMissing','12506980phqfCU'];a167_0x30bf=function(){return _0x5d2186;};return a167_0x30bf();}(function(_0x58a5b3,_0x552f31){const _0x287c4b=a167_0x508b,_0x31c186=_0x58a5b3();while(!![]){try{const _0xed7c5d=parseInt(_0x287c4b(0x104))/0x1*(parseInt(_0x287c4b(0xff))/0x2)+parseInt(_0x287c4b(0xf2))/0x3+parseInt(_0x287c4b(0xfa))/0x4*(-parseInt(_0x287c4b(0x100))/0x5)+parseInt(_0x287c4b(0xf5))/0x6+-parseInt(_0x287c4b(0xf0))/0x7*(parseInt(_0x287c4b(0xf1))/0x8)+parseInt(_0x287c4b(0xfb))/0x9+-parseInt(_0x287c4b(0x102))/0xa;if(_0xed7c5d===_0x552f31)break;else _0x31c186['push'](_0x31c186['shift']());}catch(_0x3c3e46){_0x31c186['push'](_0x31c186['shift']());}}}(a167_0x30bf,0x68b1b));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a167_0x508b(_0x419a7f,_0x335090){_0x419a7f=_0x419a7f-0xf0;const _0x30bf60=a167_0x30bf();let _0x508bac=_0x30bf60[_0x419a7f];return _0x508bac;}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a167_0x3333ca(0xf3),'command':a167_0x3333ca(0xf7),'description':a167_0x3333ca(0xfd),'risk':a167_0x3333ca(0xf8),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x38b408){const _0xee5fdb=a167_0x3333ca;if(!_0x38b408['str'](_0xee5fdb(0x105))[_0xee5fdb(0xf6)]())throw CliErrors[_0xee5fdb(0x101)]('name',_0xee5fdb(0xfe));},async 'execute'(_0x133e92){const _0x128c45=a167_0x3333ca,_0x456c13=_0x133e92['str'](_0x128c45(0x105))['trim'](),_0x4f8b82=await resolveUserRef(_0x456c13);return{'ok':!![],'data':{'user':{'userId':_0x4f8b82['userId'],'username':_0x4f8b82[_0x128c45(0xf9)],'nickname':_0x4f8b82[_0x128c45(0xf4)],'matchedBy':_0x4f8b82[_0x128c45(0x103)]}},'message':_0x128c45(0xfc)+_0x456c13+'\x22\x20→\x20userId\x20'+_0x4f8b82['userId']};}};
1
+ function a174_0x43c3(){const _0x379f6c=['\x22\x20→\x20userId\x20','4684YrOMOV','trim','username','37PekUhm','663ZnwgYt','3298122tmnlgV','6355555vGXZPN','userId','Pass\x20--name\x20<nickname|username>.','nickname','5371281WsXvTf','35254uiwqAy','flagMissing','read','8118891fGjicD','20fhvkJh','16ieKFmN','user-resolve','name','str','7931287rzkolR','role'];a174_0x43c3=function(){return _0x379f6c;};return a174_0x43c3();}const a174_0x231e72=a174_0x4f04;(function(_0x4c8186,_0x1f25fe){const _0x3c9059=a174_0x4f04,_0x5163bf=_0x4c8186();while(!![]){try{const _0x7f0162=parseInt(_0x3c9059(0x1ff))/0x1*(parseInt(_0x3c9059(0x1f0))/0x2)+-parseInt(_0x3c9059(0x200))/0x3*(parseInt(_0x3c9059(0x1fc))/0x4)+parseInt(_0x3c9059(0x202))/0x5+parseInt(_0x3c9059(0x201))/0x6+parseInt(_0x3c9059(0x1f9))/0x7+-parseInt(_0x3c9059(0x1f5))/0x8*(parseInt(_0x3c9059(0x1ef))/0x9)+parseInt(_0x3c9059(0x1f4))/0xa*(-parseInt(_0x3c9059(0x1f3))/0xb);if(_0x7f0162===_0x1f25fe)break;else _0x5163bf['push'](_0x5163bf['shift']());}catch(_0x49735a){_0x5163bf['push'](_0x5163bf['shift']());}}}(a174_0x43c3,0xa565b));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';function a174_0x4f04(_0x56da8a,_0x5e2a27){_0x56da8a=_0x56da8a-0x1ef;const _0x43c31a=a174_0x43c3();let _0x4f042b=_0x43c31a[_0x56da8a];return _0x4f042b;}export const roleUserResolve={'service':a174_0x231e72(0x1fa),'command':a174_0x231e72(0x1f6),'description':'Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','risk':a174_0x231e72(0x1f2),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x597663){const _0x528d00=a174_0x231e72;if(!_0x597663[_0x528d00(0x1f8)](_0x528d00(0x1f7))[_0x528d00(0x1fd)]())throw CliErrors[_0x528d00(0x1f1)]('name',_0x528d00(0x204));},async 'execute'(_0x1fb7c9){const _0x55d635=a174_0x231e72,_0x4aa570=_0x1fb7c9[_0x55d635(0x1f8)](_0x55d635(0x1f7))[_0x55d635(0x1fd)](),_0x4926b2=await resolveUserRef(_0x4aa570);return{'ok':!![],'data':{'user':{'userId':_0x4926b2['userId'],'username':_0x4926b2[_0x55d635(0x1fe)],'nickname':_0x4926b2[_0x55d635(0x205)],'matchedBy':_0x4926b2['matchedBy']}},'message':'Resolved\x20\x22'+_0x4aa570+_0x55d635(0x1fb)+_0x4926b2[_0x55d635(0x203)]};}};
@@ -1 +1 @@
1
- const a168_0x44d9f3=a168_0x164c;(function(_0x371924,_0x25a6dd){const _0x49099a=a168_0x164c,_0x2048d9=_0x371924();while(!![]){try{const _0x1211f2=parseInt(_0x49099a(0xff))/0x1+-parseInt(_0x49099a(0x130))/0x2*(-parseInt(_0x49099a(0x126))/0x3)+parseInt(_0x49099a(0x102))/0x4+parseInt(_0x49099a(0x107))/0x5+parseInt(_0x49099a(0x115))/0x6+-parseInt(_0x49099a(0x12f))/0x7+parseInt(_0x49099a(0x10e))/0x8*(-parseInt(_0x49099a(0x123))/0x9);if(_0x1211f2===_0x25a6dd)break;else _0x2048d9['push'](_0x2048d9['shift']());}catch(_0x134720){_0x2048d9['push'](_0x2048d9['shift']());}}}(a168_0x39da,0xb565c));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';function a168_0x164c(_0x2194d8,_0x7056de){_0x2194d8=_0x2194d8-0xf8;const _0x39da60=a168_0x39da();let _0x164c47=_0x39da60[_0x2194d8];return _0x164c47;}const VERSION_CHECK_SCRIPTS=new Set([a168_0x44d9f3(0xf8),a168_0x44d9f3(0xf9)]);function readPackageScripts(_0x37357d){const _0x59ccbb=a168_0x44d9f3,_0x4942a5=resolve(_0x37357d,_0x59ccbb(0x12e));if(!existsSync(_0x4942a5))return null;try{const _0x1646ae=JSON[_0x59ccbb(0x132)](readFileSync(_0x4942a5,_0x59ccbb(0x10a)));return _0x1646ae[_0x59ccbb(0x105)]??{};}catch{return null;}}function detectPackageManager(_0x40ed04){const _0x26e68b=a168_0x44d9f3;if(existsSync(resolve(_0x40ed04,_0x26e68b(0x10f)))||existsSync(resolve(_0x40ed04,_0x26e68b(0x122))))return'bun';if(existsSync(resolve(_0x40ed04,'pnpm-lock.yaml')))return _0x26e68b(0x131);if(existsSync(resolve(_0x40ed04,_0x26e68b(0x12a))))return _0x26e68b(0x11f);return _0x26e68b(0x124);}function a168_0x39da(){const _0x3e4e95=['\x22\x20not\x20found\x20in\x20package.json.','scripts','\x20run\x20','715200WUfOxT','read','all','utf-8','args','watch','belowMinimum','27311224npoPjX','bun.lockb','\x20exited\x20with\x20code\x20','has','\x0a\x20\x20Usage:\x20','(none)','node_modules','7052694ydUBrs','\x20\x20\x20\x20','No\x20scripts\x20defined\x20in\x20package.json.','keys','needsUpgrade','Run\x20a\x20package.json\x20script','inherit','\x20run\x20preview','push','validation','yarn','Script\x20name\x20defined\x20in\x20package.json','preview','bun.lock','9SMBnfe','npm','Enable\x20watch\x20mode\x20for\x20preview','12TBndeo','Available:\x20','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','join','yarn.lock','cwd','\x20\x20EXAMPLES','error','package.json','1300628QGrphD','567172JDCYia','pnpm','parse','vite\x20preview\x20exited\x20with\x20code\x20','.bin','run','\x20run\x20start','start','dev','Script\x20\x22','log','slice','\x20run\x20build','No\x20package.json\x20found\x20in\x20current\x20directory.','940227dXpLVy','\x20run\x20<script>\x0a','bool','3798604btzTNn','close'];a168_0x39da=function(){return _0x3e4e95;};return a168_0x39da();}async function versionCheck(_0x468034){const _0x451cff=a168_0x44d9f3,_0x438a16=await checkCliVersion();(_0x438a16[_0x451cff(0x119)]||_0x438a16[_0x451cff(0x10d)])&&(printCliUpgradeWarning(_0x438a16),assertCliVersionSupported(_0x438a16));const _0x5477b1=await checkSdkVersion(_0x468034);if(_0x5477b1[_0x451cff(0x119)])printSdkUpgradeWarning(_0x5477b1);}function spawnScript(_0x4cded8,_0xbcd94c,_0x35be4a,_0xb25ed9){return new Promise((_0x550d21,_0x392481)=>{const _0x5bac57=a168_0x164c,_0x1be665=[_0x5bac57(0x135),_0xbcd94c,..._0x35be4a],_0x42e3b9=spawn(_0x4cded8,_0x1be665,{'cwd':_0xb25ed9,'stdio':_0x5bac57(0x11b),'shell':!![],'env':{...process.env,'PATH':''+join(_0xb25ed9,_0x5bac57(0x114),_0x5bac57(0x134))+delimiter+process.env.PATH}});_0x42e3b9['on'](_0x5bac57(0x103),_0x2b6bd0=>{const _0x30d0a3=_0x5bac57;if(_0x2b6bd0===0x0||_0x2b6bd0===null)_0x550d21();else _0x392481(new Error(_0x4cded8+_0x30d0a3(0x106)+_0xbcd94c+_0x30d0a3(0x110)+_0x2b6bd0));}),_0x42e3b9['on'](_0x5bac57(0x12d),_0x392481);});}function spawnViteBuildWatch(_0x5d6eae){return new Promise((_0x5670b4,_0x5e423b)=>{const _0x3e9db0=a168_0x164c,_0x367e9b=spawn('vite',['build','--watch'],{'cwd':_0x5d6eae,'stdio':_0x3e9db0(0x11b),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5d6eae,'node_modules',_0x3e9db0(0x134))+delimiter+process.env.PATH}});_0x367e9b['on']('close',_0x3f9fdd=>{const _0x390a31=_0x3e9db0;if(_0x3f9fdd===0x0||_0x3f9fdd===null)_0x5670b4();else _0x5e423b(new Error(_0x390a31(0x128)+_0x3f9fdd));}),_0x367e9b['on'](_0x3e9db0(0x12d),_0x5e423b);});}function spawnVitePreview(_0xb05874){return new Promise((_0x217e6b,_0x490a85)=>{const _0x1c6479=a168_0x164c,_0x19399f=spawn('vite',[_0x1c6479(0x121)],{'cwd':_0xb05874,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0xb05874,_0x1c6479(0x114),_0x1c6479(0x134))+delimiter+process.env.PATH}});_0x19399f['on'](_0x1c6479(0x103),_0xa03136=>{const _0x26112f=_0x1c6479;if(_0xa03136===0x0||_0xa03136===null)_0x217e6b();else _0x490a85(new Error(_0x26112f(0x133)+_0xa03136));}),_0x19399f['on'](_0x1c6479(0x12d),_0x490a85);});}const runFlags=[{'name':a168_0x44d9f3(0x10c),'type':'boolean','description':a168_0x44d9f3(0x125),'default':![]}];export const runDefinition={'service':a168_0x44d9f3(0x135),'command':a168_0x44d9f3(0x135),'description':a168_0x44d9f3(0x11a),'risk':a168_0x44d9f3(0x108),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a168_0x44d9f3(0x120),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x421bea=a168_0x44d9f3,_0x2f6a78=[];return _0x2f6a78['push'](_0x421bea(0x12c)),_0x2f6a78[_0x421bea(0x11d)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x421bea(0x136)),_0x2f6a78[_0x421bea(0x11d)](_0x421bea(0x116)+CLI_BIN_NAME+_0x421bea(0xfd)),_0x2f6a78[_0x421bea(0x11d)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x421bea(0x11c)),_0x2f6a78[_0x421bea(0x11d)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20preview\x20--watch'),_0x2f6a78[_0x421bea(0x129)]('\x0a');},async 'execute'(_0x1f48f4){const _0x1da6e4=a168_0x44d9f3,_0x3dcc7c=process[_0x1da6e4(0x12b)](),_0x53f69e=_0x1f48f4[_0x1da6e4(0x10b)][0x0],_0x5a5043=_0x1f48f4[_0x1da6e4(0x10b)][_0x1da6e4(0xfc)](0x1),_0x4b7ed8=readPackageScripts(_0x3dcc7c);if(!_0x4b7ed8)throw CliErrors[_0x1da6e4(0x11e)](_0x1da6e4(0xfe));if(!_0x53f69e){const _0x55cca6=Object[_0x1da6e4(0x118)](_0x4b7ed8);if(_0x55cca6['length']===0x0)console['log'](_0x1da6e4(0x117));else{console[_0x1da6e4(0xfb)]('\x0a\x20\x20Available\x20scripts:\x0a');for(const _0x343693 of _0x55cca6){console['log']('\x20\x20\x20\x20'+_0x343693);}console['log'](_0x1da6e4(0x112)+CLI_BIN_NAME+_0x1da6e4(0x100));}return{'ok':!![]};}if(!_0x4b7ed8[_0x53f69e])throw CliErrors[_0x1da6e4(0x11e)](_0x1da6e4(0xfa)+_0x53f69e+_0x1da6e4(0x104),_0x1da6e4(0x127)+(Object[_0x1da6e4(0x118)](_0x4b7ed8)[_0x1da6e4(0x129)](',\x20')||_0x1da6e4(0x113)));const _0x47d2ca=detectPackageManager(_0x3dcc7c);VERSION_CHECK_SCRIPTS[_0x1da6e4(0x111)](_0x53f69e)&&await versionCheck(_0x3dcc7c);if(_0x53f69e===_0x1da6e4(0x121)&&_0x1f48f4[_0x1da6e4(0x101)](_0x1da6e4(0x10c)))return await Promise[_0x1da6e4(0x109)]([spawnViteBuildWatch(_0x3dcc7c),spawnVitePreview(_0x3dcc7c)]),{'ok':!![]};return await spawnScript(_0x47d2ca,_0x53f69e,_0x5a5043,_0x3dcc7c),{'ok':!![]};}};
1
+ const a175_0x5617d9=a175_0x5cae;(function(_0xa49d87,_0x171ff7){const _0x85ea6=a175_0x5cae,_0x402e12=_0xa49d87();while(!![]){try{const _0x328226=parseInt(_0x85ea6(0x18f))/0x1+-parseInt(_0x85ea6(0x18d))/0x2*(parseInt(_0x85ea6(0x192))/0x3)+-parseInt(_0x85ea6(0x1b1))/0x4*(parseInt(_0x85ea6(0x1c4))/0x5)+-parseInt(_0x85ea6(0x1b0))/0x6*(-parseInt(_0x85ea6(0x1b7))/0x7)+-parseInt(_0x85ea6(0x18c))/0x8*(-parseInt(_0x85ea6(0x1a5))/0x9)+parseInt(_0x85ea6(0x1ab))/0xa*(-parseInt(_0x85ea6(0x188))/0xb)+-parseInt(_0x85ea6(0x1c1))/0xc*(-parseInt(_0x85ea6(0x1bf))/0xd);if(_0x328226===_0x171ff7)break;else _0x402e12['push'](_0x402e12['shift']());}catch(_0x1612e5){_0x402e12['push'](_0x402e12['shift']());}}}(a175_0x5c3e,0xc955b));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';function a175_0x5c3e(){const _0x5847ba=['419871Ntqwax','needsUpgrade','\x20run\x20preview\x20--watch','15QhQGBw','validation','vite\x20preview\x20exited\x20with\x20code\x20','length','push','\x20\x20\x20\x20','Available:\x20','has','error','boolean','\x20run\x20<script>\x0a','yarn.lock','bool','bun','pnpm','args','Script\x20name\x20defined\x20in\x20package.json','\x20run\x20','log','9FaQRVS','slice','No\x20scripts\x20defined\x20in\x20package.json.','npm','--watch','.bin','10cmwSdJ','belowMinimum','keys','Enable\x20watch\x20mode\x20for\x20preview','No\x20package.json\x20found\x20in\x20current\x20directory.','614892hvcknK','35676JmQeAu','inherit','join','package.json','\x20exited\x20with\x20code\x20','run','105RktyXa','build','Run\x20a\x20package.json\x20script','bun.lockb','\x22\x20not\x20found\x20in\x20package.json.','Script\x20\x22','\x0a\x20\x20Usage:\x20','start','8727862YmnLKI','watch','12HEXiWL','script','node_modules','835urMWXV','\x0a\x20\x20Available\x20scripts:\x0a','scripts','\x20run\x20preview','utf-8','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','vite','\x20\x20EXAMPLES','(none)','13283831Ohgrnt','all','\x20run\x20build','close','12832088mPeYug','284290tivvLT','preview'];a175_0x5c3e=function(){return _0x5847ba;};return a175_0x5c3e();}import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';function a175_0x5cae(_0x3806cd,_0x651c26){_0x3806cd=_0x3806cd-0x183;const _0x5c3eb9=a175_0x5c3e();let _0x5cae59=_0x5c3eb9[_0x3806cd];return _0x5cae59;}const VERSION_CHECK_SCRIPTS=new Set([a175_0x5617d9(0x1be),'dev']);function readPackageScripts(_0x295514){const _0xf6f9ac=a175_0x5617d9,_0x5c3a30=resolve(_0x295514,_0xf6f9ac(0x1b4));if(!existsSync(_0x5c3a30))return null;try{const _0x1b4f98=JSON['parse'](readFileSync(_0x5c3a30,_0xf6f9ac(0x183)));return _0x1b4f98[_0xf6f9ac(0x1c6)]??{};}catch{return null;}}function detectPackageManager(_0x52a1f9){const _0x155add=a175_0x5617d9;if(existsSync(resolve(_0x52a1f9,_0x155add(0x1ba)))||existsSync(resolve(_0x52a1f9,'bun.lock')))return _0x155add(0x19f);if(existsSync(resolve(_0x52a1f9,'pnpm-lock.yaml')))return _0x155add(0x1a0);if(existsSync(resolve(_0x52a1f9,_0x155add(0x19d))))return'yarn';return _0x155add(0x1a8);}async function versionCheck(_0x3ca0ad){const _0xd577ed=a175_0x5617d9,_0x4c81db=await checkCliVersion();(_0x4c81db['needsUpgrade']||_0x4c81db[_0xd577ed(0x1ac)])&&(printCliUpgradeWarning(_0x4c81db),assertCliVersionSupported(_0x4c81db));const _0x28dc79=await checkSdkVersion(_0x3ca0ad);if(_0x28dc79[_0xd577ed(0x190)])printSdkUpgradeWarning(_0x28dc79);}function spawnScript(_0x38a2cd,_0x216f7,_0x4b4b39,_0x5d0abb){return new Promise((_0x19429e,_0x25d7aa)=>{const _0xac3a42=a175_0x5cae,_0x307ad4=[_0xac3a42(0x1b6),_0x216f7,..._0x4b4b39],_0x26d320=spawn(_0x38a2cd,_0x307ad4,{'cwd':_0x5d0abb,'stdio':_0xac3a42(0x1b2),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5d0abb,'node_modules',_0xac3a42(0x1aa))+delimiter+process.env.PATH}});_0x26d320['on']('close',_0x525591=>{const _0x3b26f1=_0xac3a42;if(_0x525591===0x0||_0x525591===null)_0x19429e();else _0x25d7aa(new Error(_0x38a2cd+_0x3b26f1(0x1a3)+_0x216f7+_0x3b26f1(0x1b5)+_0x525591));}),_0x26d320['on'](_0xac3a42(0x19a),_0x25d7aa);});}function spawnViteBuildWatch(_0x83f4f2){return new Promise((_0x2e082d,_0x1249df)=>{const _0x22ae18=a175_0x5cae,_0x31ffa5=spawn('vite',[_0x22ae18(0x1b8),_0x22ae18(0x1a9)],{'cwd':_0x83f4f2,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x83f4f2,_0x22ae18(0x1c3),'.bin')+delimiter+process.env.PATH}});_0x31ffa5['on']('close',_0x3120b9=>{const _0x19c1f6=_0x22ae18;if(_0x3120b9===0x0||_0x3120b9===null)_0x2e082d();else _0x1249df(new Error(_0x19c1f6(0x184)+_0x3120b9));}),_0x31ffa5['on'](_0x22ae18(0x19a),_0x1249df);});}function spawnVitePreview(_0x49a6e3){return new Promise((_0xb554b9,_0x1f0eaf)=>{const _0x396084=a175_0x5cae,_0x1b7c6c=spawn(_0x396084(0x185),['preview'],{'cwd':_0x49a6e3,'stdio':_0x396084(0x1b2),'shell':!![],'env':{...process.env,'PATH':''+join(_0x49a6e3,_0x396084(0x1c3),_0x396084(0x1aa))+delimiter+process.env.PATH}});_0x1b7c6c['on'](_0x396084(0x18b),_0x57794c=>{const _0x460628=_0x396084;if(_0x57794c===0x0||_0x57794c===null)_0xb554b9();else _0x1f0eaf(new Error(_0x460628(0x194)+_0x57794c));}),_0x1b7c6c['on'](_0x396084(0x19a),_0x1f0eaf);});}const runFlags=[{'name':a175_0x5617d9(0x1c0),'type':a175_0x5617d9(0x19b),'description':a175_0x5617d9(0x1ae),'default':![]}];export const runDefinition={'service':a175_0x5617d9(0x1b6),'command':a175_0x5617d9(0x1b6),'description':a175_0x5617d9(0x1b9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a175_0x5617d9(0x1c2),'description':a175_0x5617d9(0x1a2),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3a53c5=a175_0x5617d9,_0x375a64=[];return _0x375a64[_0x3a53c5(0x196)](_0x3a53c5(0x186)),_0x375a64[_0x3a53c5(0x196)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20start'),_0x375a64[_0x3a53c5(0x196)](_0x3a53c5(0x197)+CLI_BIN_NAME+_0x3a53c5(0x18a)),_0x375a64[_0x3a53c5(0x196)](_0x3a53c5(0x197)+CLI_BIN_NAME+_0x3a53c5(0x1c7)),_0x375a64[_0x3a53c5(0x196)](_0x3a53c5(0x197)+CLI_BIN_NAME+_0x3a53c5(0x191)),_0x375a64[_0x3a53c5(0x1b3)]('\x0a');},async 'execute'(_0x28a4e5){const _0x56fbd6=a175_0x5617d9,_0x4ef46e=process['cwd'](),_0x107994=_0x28a4e5[_0x56fbd6(0x1a1)][0x0],_0x2464ca=_0x28a4e5[_0x56fbd6(0x1a1)][_0x56fbd6(0x1a6)](0x1),_0x1ee2e5=readPackageScripts(_0x4ef46e);if(!_0x1ee2e5)throw CliErrors['validation'](_0x56fbd6(0x1af));if(!_0x107994){const _0x37d010=Object[_0x56fbd6(0x1ad)](_0x1ee2e5);if(_0x37d010[_0x56fbd6(0x195)]===0x0)console[_0x56fbd6(0x1a4)](_0x56fbd6(0x1a7));else{console[_0x56fbd6(0x1a4)](_0x56fbd6(0x1c5));for(const _0x1469ba of _0x37d010){console[_0x56fbd6(0x1a4)](_0x56fbd6(0x197)+_0x1469ba);}console[_0x56fbd6(0x1a4)](_0x56fbd6(0x1bd)+CLI_BIN_NAME+_0x56fbd6(0x19c));}return{'ok':!![]};}if(!_0x1ee2e5[_0x107994])throw CliErrors[_0x56fbd6(0x193)](_0x56fbd6(0x1bc)+_0x107994+_0x56fbd6(0x1bb),_0x56fbd6(0x198)+(Object[_0x56fbd6(0x1ad)](_0x1ee2e5)[_0x56fbd6(0x1b3)](',\x20')||_0x56fbd6(0x187)));const _0x4acdb7=detectPackageManager(_0x4ef46e);VERSION_CHECK_SCRIPTS[_0x56fbd6(0x199)](_0x107994)&&await versionCheck(_0x4ef46e);if(_0x107994===_0x56fbd6(0x18e)&&_0x28a4e5[_0x56fbd6(0x19e)](_0x56fbd6(0x1c0)))return await Promise[_0x56fbd6(0x189)]([spawnViteBuildWatch(_0x4ef46e),spawnVitePreview(_0x4ef46e)]),{'ok':!![]};return await spawnScript(_0x4acdb7,_0x107994,_0x2464ca,_0x4ef46e),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a169_0x2d8d3d=a169_0x2221;(function(_0x2aa52f,_0xfdad71){const _0x6a910a=a169_0x2221,_0x4615d5=_0x2aa52f();while(!![]){try{const _0x1368a6=-parseInt(_0x6a910a(0x16f))/0x1+-parseInt(_0x6a910a(0x174))/0x2*(parseInt(_0x6a910a(0x17b))/0x3)+-parseInt(_0x6a910a(0x175))/0x4+-parseInt(_0x6a910a(0x173))/0x5+parseInt(_0x6a910a(0x178))/0x6+parseInt(_0x6a910a(0x170))/0x7*(parseInt(_0x6a910a(0x179))/0x8)+parseInt(_0x6a910a(0x176))/0x9;if(_0x1368a6===_0xfdad71)break;else _0x4615d5['push'](_0x4615d5['shift']());}catch(_0x320ca0){_0x4615d5['push'](_0x4615d5['shift']());}}}(a169_0x2f39,0x5a651));import{buildSchemaPayload}from'../framework/schema-export.js';function a169_0x2221(_0x55a533,_0x44249c){_0x55a533=_0x55a533-0x16e;const _0x2f39fb=a169_0x2f39();let _0x22213b=_0x2f39fb[_0x55a533];return _0x22213b;}async function execute(_0x38e7bc){const _0x13341a=await buildSchemaPayload();return{'ok':!![],'data':_0x13341a};}function a169_0x2f39(){const _0x37cd09=['237308PDVaRi','21iohCae','Export\x20machine-readable\x20command\x20schema\x20(JSON)','json','567235RMKlgB','234538BxSzjV','1547444JADCly','4264389xMMpNu','read','837852OSsdJB','1631144qsMhvL','export','3SsTLEQ','schema'];a169_0x2f39=function(){return _0x37cd09;};return a169_0x2f39();}export const schemaDefinition={'service':a169_0x2d8d3d(0x16e),'command':a169_0x2d8d3d(0x17a),'description':a169_0x2d8d3d(0x171),'risk':a169_0x2d8d3d(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a169_0x2d8d3d(0x172),'flags':[],'execute':execute};
1
+ const a176_0x50b5cc=a176_0x2301;function a176_0x2301(_0x1b5161,_0x46db69){_0x1b5161=_0x1b5161-0x1ee;const _0x1489d8=a176_0x1489();let _0x23018d=_0x1489d8[_0x1b5161];return _0x23018d;}(function(_0x3e4cde,_0x4c2782){const _0x225e8f=a176_0x2301,_0x452d08=_0x3e4cde();while(!![]){try{const _0xf73bfd=parseInt(_0x225e8f(0x1fb))/0x1+-parseInt(_0x225e8f(0x1f9))/0x2+parseInt(_0x225e8f(0x1ef))/0x3*(-parseInt(_0x225e8f(0x1f1))/0x4)+parseInt(_0x225e8f(0x1f3))/0x5+-parseInt(_0x225e8f(0x1f5))/0x6*(-parseInt(_0x225e8f(0x1f2))/0x7)+-parseInt(_0x225e8f(0x1ee))/0x8+-parseInt(_0x225e8f(0x1f0))/0x9*(parseInt(_0x225e8f(0x1fa))/0xa);if(_0xf73bfd===_0x4c2782)break;else _0x452d08['push'](_0x452d08['shift']());}catch(_0x14880a){_0x452d08['push'](_0x452d08['shift']());}}}(a176_0x1489,0xc0d2a));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x589247){const _0x1d1559=await buildSchemaPayload();return{'ok':!![],'data':_0x1d1559};}function a176_0x1489(){const _0x594a85=['11864272ahIJfj','125049WqMtRo','64413iVyjLf','4WqPieU','168nYyRGv','5340395YdYptA','read','320184XjZNac','schema','Export\x20machine-readable\x20command\x20schema\x20(JSON)','json','265968Ncbuat','1220UrcKZZ','971842mRvaag'];a176_0x1489=function(){return _0x594a85;};return a176_0x1489();}export const schemaDefinition={'service':a176_0x50b5cc(0x1f6),'command':'export','description':a176_0x50b5cc(0x1f7),'risk':a176_0x50b5cc(0x1f4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a176_0x50b5cc(0x1f8),'flags':[],'execute':execute};