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

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 (289) hide show
  1. package/README.md +2 -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/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -0
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/react/create.js +1 -0
  142. package/lib/commands/page/react/detail.js +1 -0
  143. package/lib/commands/page/react/list.js +1 -0
  144. package/lib/commands/page/react/publish.js +1 -0
  145. package/lib/commands/page/react/shared.js +1 -0
  146. package/lib/commands/page/react/syntax.js +1 -0
  147. package/lib/commands/page/react/template.js +1 -0
  148. package/lib/commands/page/react/update.js +1 -0
  149. package/lib/commands/page/relation-audit.js +1 -1
  150. package/lib/commands/page/restore.js +1 -1
  151. package/lib/commands/page/shared.js +1 -1
  152. package/lib/commands/page/standard-page-status.js +1 -1
  153. package/lib/commands/page/sync.js +1 -1
  154. package/lib/commands/permit/index.js +1 -1
  155. package/lib/commands/permit/page-get.js +1 -1
  156. package/lib/commands/permit/page-set.js +1 -1
  157. package/lib/commands/permit/role-apis-set.js +1 -1
  158. package/lib/commands/permit/role-menus-set.js +1 -1
  159. package/lib/commands/permit/role-menus.js +1 -1
  160. package/lib/commands/permit/shared.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/non-interactive.js +1 -1
  165. package/lib/commands/project/create/project-template-path.js +1 -1
  166. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  167. package/lib/commands/project/create/use-format-code.js +1 -1
  168. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  169. package/lib/commands/project/index.js +1 -1
  170. package/lib/commands/project/upgrade.js +1 -1
  171. package/lib/commands/registry.js +1 -1
  172. package/lib/commands/role/create.js +1 -1
  173. package/lib/commands/role/delete.js +1 -1
  174. package/lib/commands/role/detail.js +1 -1
  175. package/lib/commands/role/index.js +1 -1
  176. package/lib/commands/role/list.js +1 -1
  177. package/lib/commands/role/shared.js +1 -1
  178. package/lib/commands/role/update.js +1 -1
  179. package/lib/commands/role/user-add.js +1 -1
  180. package/lib/commands/role/user-remove.js +1 -1
  181. package/lib/commands/role/user-resolve.js +1 -1
  182. package/lib/commands/run/index.js +1 -1
  183. package/lib/commands/schema.js +1 -1
  184. package/lib/commands/sql/create.js +1 -1
  185. package/lib/commands/sql/delete.js +1 -1
  186. package/lib/commands/sql/detail.js +1 -1
  187. package/lib/commands/sql/exec.js +1 -1
  188. package/lib/commands/sql/index.js +1 -1
  189. package/lib/commands/sql/list.js +1 -1
  190. package/lib/commands/sql/pull.js +1 -1
  191. package/lib/commands/sql/push.js +1 -1
  192. package/lib/commands/sql/shared.js +1 -1
  193. package/lib/commands/sql/status.js +1 -1
  194. package/lib/commands/sql/validate.js +1 -1
  195. package/lib/commands/task/index.js +1 -1
  196. package/lib/commands/task/status.js +1 -1
  197. package/lib/commands/tenant/index.js +1 -0
  198. package/lib/commands/tenant/members-list.js +1 -0
  199. package/lib/commands/tenant/shared.js +1 -0
  200. package/lib/commands/workspace/add.js +1 -1
  201. package/lib/commands/workspace/index.js +1 -1
  202. package/lib/commands/workspace/remove.js +1 -1
  203. package/lib/config/schema.js +1 -1
  204. package/lib/constant/cdn.js +1 -1
  205. package/lib/constant/cli.js +1 -1
  206. package/lib/constant/defaults.js +1 -1
  207. package/lib/constant/domain.js +1 -1
  208. package/lib/constant/env.js +1 -1
  209. package/lib/constant/output.js +1 -1
  210. package/lib/constant/paths.js +1 -1
  211. package/lib/constant/risk.js +1 -1
  212. package/lib/context/app-resolver.js +1 -1
  213. package/lib/context/auth-resolver.js +1 -1
  214. package/lib/context/config-loader.js +1 -1
  215. package/lib/context.js +1 -1
  216. package/lib/core/alias-resolver.js +1 -1
  217. package/lib/core/api-client.js +1 -1
  218. package/lib/core/bff/config.js +1 -1
  219. package/lib/core/bff/file-system.js +1 -1
  220. package/lib/core/bff/hash.js +1 -1
  221. package/lib/core/bff/lock.js +1 -1
  222. package/lib/core/bff/utils.js +1 -1
  223. package/lib/core/db-resolver.js +1 -1
  224. package/lib/core/page/file-system.js +1 -1
  225. package/lib/core/page/hash.js +1 -1
  226. package/lib/core/page/lock.js +1 -1
  227. package/lib/core/sql-index-auditor.js +1 -1
  228. package/lib/core/sql-sync/config.js +1 -1
  229. package/lib/core/sql-sync/file-system.js +1 -1
  230. package/lib/core/sql-sync/hash.js +1 -1
  231. package/lib/core/sql-sync/lock.js +1 -1
  232. package/lib/core/sql-sync/utils.js +1 -1
  233. package/lib/core/sql-validator.js +1 -1
  234. package/lib/errors.js +1 -1
  235. package/lib/framework/build-all-flags.js +1 -1
  236. package/lib/framework/error-output.js +1 -1
  237. package/lib/framework/explicit-yes.js +1 -1
  238. package/lib/framework/flags.js +1 -1
  239. package/lib/framework/help.js +1 -1
  240. package/lib/framework/index.js +1 -1
  241. package/lib/framework/output.js +1 -1
  242. package/lib/framework/response.js +1 -1
  243. package/lib/framework/runner-alias.js +1 -1
  244. package/lib/framework/runner.js +1 -1
  245. package/lib/framework/schema-export.js +1 -1
  246. package/lib/framework/types.js +1 -1
  247. package/lib/generated/build-info.js +1 -1
  248. package/lib/help.js +1 -1
  249. package/lib/skills/main.js +1 -1
  250. package/lib/skills/npx-skills-add.js +1 -1
  251. package/lib/skills/skill-presence.js +1 -1
  252. package/lib/telemetry/cli-command-trace.js +1 -1
  253. package/lib/telemetry/cli-help-trace.js +1 -1
  254. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  255. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  256. package/lib/telemetry/send-cli-trace-log.js +1 -1
  257. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  258. package/lib/utils/ai_config.js +1 -1
  259. package/lib/utils/apply-jq-filter.js +1 -1
  260. package/lib/utils/cdn-config.js +1 -1
  261. package/lib/utils/check-sdk-version.js +1 -1
  262. package/lib/utils/cli-version-check.js +1 -1
  263. package/lib/utils/cli-version-policy.js +1 -1
  264. package/lib/utils/config.js +1 -1
  265. package/lib/utils/copy-directory.js +1 -1
  266. package/lib/utils/entity-with-id.js +1 -1
  267. package/lib/utils/file-utils.js +1 -1
  268. package/lib/utils/guides-cdn.js +1 -1
  269. package/lib/utils/http-client.js +1 -1
  270. package/lib/utils/is-non-interactive.js +1 -1
  271. package/lib/utils/logger.js +1 -1
  272. package/lib/utils/params.js +1 -1
  273. package/lib/utils/platform.js +1 -1
  274. package/lib/utils/rules-cdn.js +1 -1
  275. package/lib/utils/sleep.js +1 -1
  276. package/lib/utils/template-replacer.js +1 -1
  277. package/lib/utils/update-notice.js +1 -1
  278. package/lib/utils/version.js +1 -1
  279. package/lib/utils/with-active-cookie.js +1 -1
  280. package/lib/utils/write-cli-side-channel.js +1 -1
  281. package/package.json +2 -2
  282. package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
  283. package/templates/projects/sub-app-react-demo/README.md +1 -1
  284. package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
  285. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
  286. package/lib/commands/app/add.js +0 -1
  287. package/lib/commands/app/remove.js +0 -1
  288. package/lib/commands/project/init.js +0 -1
  289. package/lib/commands/sql/save.js +0 -1
@@ -1 +1 @@
1
- (function(_0x1f264c,_0x7a244){const _0x3dbcf5=a156_0x3a6f,_0x194adf=_0x1f264c();while(!![]){try{const _0x28ec30=parseInt(_0x3dbcf5(0x214))/0x1*(parseInt(_0x3dbcf5(0x201))/0x2)+-parseInt(_0x3dbcf5(0x1e4))/0x3+-parseInt(_0x3dbcf5(0x1f1))/0x4+parseInt(_0x3dbcf5(0x1ed))/0x5*(-parseInt(_0x3dbcf5(0x1e2))/0x6)+-parseInt(_0x3dbcf5(0x1e6))/0x7+parseInt(_0x3dbcf5(0x1e9))/0x8*(-parseInt(_0x3dbcf5(0x1e0))/0x9)+parseInt(_0x3dbcf5(0x1e1))/0xa*(parseInt(_0x3dbcf5(0x1fb))/0xb);if(_0x28ec30===_0x7a244)break;else _0x194adf['push'](_0x194adf['shift']());}catch(_0x1b8e4f){_0x194adf['push'](_0x194adf['shift']());}}}(a156_0x2909,0x5083d));import a156_0x14620d from'path';import a156_0x14574a from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a156_0x3a6f(_0x498500,_0x5b6d3f){_0x498500=_0x498500-0x1e0;const _0x290949=a156_0x2909();let _0x3a6f06=_0x290949[_0x498500];return _0x3a6f06;}import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x59c800,_0x3d264f,_0x19335c,_0x15f942){const _0x256c6c=a156_0x3a6f,_0xb4fcdc=await checkCliVersion();(_0xb4fcdc[_0x256c6c(0x1ec)]||_0xb4fcdc[_0x256c6c(0x1eb)])&&(printCliUpgradeWarning(_0xb4fcdc),assertCliVersionSupported(_0xb4fcdc));if(!_0x59c800||_0x59c800[_0x256c6c(0x1ee)]()==='')throw CliErrors[_0x256c6c(0x21d)](_0x256c6c(0x213));const _0x1d889b=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1d889b[_0x256c6c(0x205)](_0x59c800))throw CliErrors[_0x256c6c(0x21d)](_0x256c6c(0x217),_0x256c6c(0x203));if(_0x59c800[_0x256c6c(0x1e5)]>0x64)throw CliErrors[_0x256c6c(0x21d)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x512942=a156_0x14620d[_0x256c6c(0x20a)](process['cwd'](),_0x59c800);if(existsSync(_0x512942))throw CliErrors['validation'](_0x256c6c(0x216)+_0x59c800+'\x22\x20already\x20exists.',_0x256c6c(0x212));try{const _0x59d0d7=a156_0x14620d[_0x256c6c(0x20e)](_0x512942);await a156_0x14574a[_0x256c6c(0x215)](_0x59d0d7,a156_0x14574a[_0x256c6c(0x207)][_0x256c6c(0x21f)]);}catch{throw CliErrors[_0x256c6c(0x21d)](_0x256c6c(0x1ef),'Check\x20directory\x20permissions.');}try{console[_0x256c6c(0x210)](_0x256c6c(0x20c)+_0x59c800+_0x256c6c(0x20f));const _0x38615e=getSubAppReactDemoTemplateDir();await copyDirectory(_0x38615e,_0x512942),console['log'](_0x256c6c(0x1ff)),await updatePackageJsonName(_0x59c800),console[_0x256c6c(0x210)](_0x256c6c(0x1ea)),console['log'](_0x256c6c(0x1f8)),console['log']('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x512942),console['log'](_0x256c6c(0x21e)),await configureProject(_0x59c800,_0x19335c,_0x3d264f),console[_0x256c6c(0x210)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x19335c&&await pullApiConfig(_0x512942,_0x19335c,_0x3d264f,_0x15f942),console[_0x256c6c(0x210)](_0x256c6c(0x21c)+_0x59c800+_0x256c6c(0x20b)),console[_0x256c6c(0x210)](_0x256c6c(0x1fc)+_0x59c800),console[_0x256c6c(0x210)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x3f0efb){try{existsSync(_0x512942)&&await a156_0x14574a['rm'](_0x512942,{'recursive':!![],'force':!![]});}catch{}throw _0x3f0efb;}}async function updatePackageJsonName(_0x206b67){const _0x56a4f7=a156_0x3a6f,_0x10a368=a156_0x14620d['resolve'](process[_0x56a4f7(0x206)](),_0x206b67),_0x2e6fef=a156_0x14620d[_0x56a4f7(0x1f7)](_0x10a368,_0x56a4f7(0x219)),_0x2fcb86=await a156_0x14574a[_0x56a4f7(0x1f4)](_0x2e6fef,_0x56a4f7(0x200)),_0x559943=JSON[_0x56a4f7(0x204)](_0x2fcb86);_0x559943[_0x56a4f7(0x21b)]=_0x206b67,_0x559943[_0x56a4f7(0x1f3)]=_0x56a4f7(0x1fd),await a156_0x14574a[_0x56a4f7(0x1fe)](_0x2e6fef,JSON[_0x56a4f7(0x202)](_0x559943,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4899e2=a156_0x3a6f;try{return execSync(_0x4899e2(0x218),{'stdio':_0x4899e2(0x1e7)}),_0x4899e2(0x211);}catch{return'npm';}}async function formatCode(_0x37e684){const _0x4ffb58=a156_0x3a6f;try{await execAsync(_0x4ffb58(0x1f9),{'cwd':_0x37e684});}catch{}}function a156_0x2909(){const _0x5700f6=['modelCount','\x20\x20Pulling\x20API\x20configuration...','resolve','\x20created\x20successfully!','*\x20Creating\x20project\x20','\x20model(s)','dirname','...','log','bun','Use\x20a\x20different\x20project\x20name.','Project\x20name\x20cannot\x20be\x20empty.','98428bRGywR','access','Project\x20directory\x20\x22','Project\x20name\x20contains\x20invalid\x20characters.','bun\x20--version','package.json','string','name','\x0a√\x20Project\x20','validation','\x20\x20√\x20Code\x20formatted','W_OK','5097555EeoPiK','6998630uYJTpx','2946YDMQUC','production','1487295TVXaqO','length','2592842SeefcU','ignore','\x20dataset(s),\x20generated\x20','8RRObMR','\x20\x20√\x20package.json\x20updated','belowMinimum','needsUpgrade','4405LhCzWW','trim','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Pulled\x20','12364PVYwWJ','toLocaleString','description','readFile','\x20api\x20pull`\x20manually\x20later.','env','join','\x20\x20Installing\x20dependencies...','bun\x20run\x20format','chdir','33xdazmJ','\x0a\x20\x20cd\x20','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','writeFile','\x20\x20√\x20Project\x20template\x20created','utf-8','2CnRUVG','stringify','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','parse','test','cwd','constants'];a156_0x2909=function(){return _0x5700f6;};return a156_0x2909();}async function configureProject(_0x205282,_0x184491,_0x1be0d5){const _0x1c4164=a156_0x3a6f,_0x3f6376=a156_0x14620d[_0x1c4164(0x20a)](process[_0x1c4164(0x206)](),_0x205282),_0x4008dd=a156_0x14620d[_0x1c4164(0x1f7)](_0x3f6376,NEW_CONFIG_NAME),_0x1eb96c=readConfig(),_0x319dc2=typeof _0x1eb96c['env']===_0x1c4164(0x21a)?_0x1eb96c[_0x1c4164(0x1f6)]:undefined,_0x572a2e={};for(const _0x48b86c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1eb96c[_0x48b86c]!=null)_0x572a2e[_0x48b86c]=_0x1eb96c[_0x48b86c];}const _0x426b00=buildCanonicalProjectConfig(_0x572a2e,{'appCodes':_0x184491?[_0x184491]:[],'env':_0x1be0d5||_0x319dc2||_0x1c4164(0x1e3),'metadata':{'createdAt':new Date()[_0x1c4164(0x1f2)](),'version':getCliVersion()}});writeConfigFile(_0x4008dd,_0x426b00);}async function pullApiConfig(_0x2d4f1b,_0x4ce086,_0x379a87,_0x437e5d){const _0x57d0b0=a156_0x3a6f,_0x37744e=process[_0x57d0b0(0x206)]();try{process[_0x57d0b0(0x1fa)](_0x2d4f1b);const _0x938838=_0x379a87||_0x57d0b0(0x1e3);initEnv(_0x938838),console[_0x57d0b0(0x210)](_0x57d0b0(0x209));const {configArray:_0x2e047d}=await fetchModelList(_0x4ce086,_0x437e5d||''),_0x103ad5=await generateApiFile(_0x2e047d,'',_0x4ce086,!![],_0x938838,DEFAULT_API_DIR);console[_0x57d0b0(0x210)](_0x57d0b0(0x1f0)+_0x2e047d[_0x57d0b0(0x1e5)]+_0x57d0b0(0x1e8)+_0x103ad5[_0x57d0b0(0x208)]+_0x57d0b0(0x20d));}catch(_0xb6e1e1){console['log']('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x57d0b0(0x1f5));}finally{process[_0x57d0b0(0x1fa)](_0x37744e);}}
1
+ (function(_0x3575c4,_0x4b8536){const _0x2f28b4=a163_0xc052,_0x226604=_0x3575c4();while(!![]){try{const _0x40a9d4=parseInt(_0x2f28b4(0xe0))/0x1*(-parseInt(_0x2f28b4(0xe3))/0x2)+-parseInt(_0x2f28b4(0xff))/0x3*(-parseInt(_0x2f28b4(0xf7))/0x4)+parseInt(_0x2f28b4(0xed))/0x5*(parseInt(_0x2f28b4(0xdc))/0x6)+parseInt(_0x2f28b4(0xea))/0x7+-parseInt(_0x2f28b4(0xcb))/0x8*(-parseInt(_0x2f28b4(0xc9))/0x9)+-parseInt(_0x2f28b4(0xfd))/0xa*(parseInt(_0x2f28b4(0xd6))/0xb)+-parseInt(_0x2f28b4(0xd1))/0xc*(parseInt(_0x2f28b4(0xe6))/0xd);if(_0x40a9d4===_0x4b8536)break;else _0x226604['push'](_0x226604['shift']());}catch(_0x37e9ab){_0x226604['push'](_0x226604['shift']());}}}(a163_0x51f8,0x30c54));import a163_0x249245 from'path';import a163_0x581b36 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x5bdf39,_0x3b8abb,_0x2f848d,_0x515005){const _0x5f3de1=a163_0xc052,_0x104b18=await checkCliVersion();(_0x104b18[_0x5f3de1(0xc8)]||_0x104b18['belowMinimum'])&&(printCliUpgradeWarning(_0x104b18),assertCliVersionSupported(_0x104b18));if(!_0x5bdf39||_0x5bdf39['trim']()==='')throw CliErrors[_0x5f3de1(0xcc)](_0x5f3de1(0xce));const _0x4dd9e5=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4dd9e5[_0x5f3de1(0xe8)](_0x5bdf39))throw CliErrors['validation']('Project\x20name\x20contains\x20invalid\x20characters.',_0x5f3de1(0xf3));if(_0x5bdf39[_0x5f3de1(0xcd)]>0x64)throw CliErrors[_0x5f3de1(0xcc)](_0x5f3de1(0xe2));const _0x2f8c32=a163_0x249245[_0x5f3de1(0xd5)](process[_0x5f3de1(0xfa)](),_0x5bdf39);if(existsSync(_0x2f8c32))throw CliErrors['validation']('Project\x20directory\x20\x22'+_0x5bdf39+'\x22\x20already\x20exists.',_0x5f3de1(0xe9));try{const _0x48f0ec=a163_0x249245[_0x5f3de1(0xf8)](_0x2f8c32);await a163_0x581b36[_0x5f3de1(0xfe)](_0x48f0ec,a163_0x581b36['constants']['W_OK']);}catch{throw CliErrors[_0x5f3de1(0xcc)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x5f3de1(0xe7));}try{console['log'](_0x5f3de1(0xee)+_0x5bdf39+_0x5f3de1(0xdf));const _0x6f0915=getSubAppReactDemoTemplateDir();await copyDirectory(_0x6f0915,_0x2f8c32),console[_0x5f3de1(0xf2)](_0x5f3de1(0xca)),await updatePackageJsonName(_0x5bdf39),console['log'](_0x5f3de1(0xd3)),console[_0x5f3de1(0xf2)]('\x20\x20Installing\x20dependencies...'),console['log'](_0x5f3de1(0xe5)),await formatCode(_0x2f8c32),console[_0x5f3de1(0xf2)](_0x5f3de1(0xf6)),await configureProject(_0x5bdf39,_0x2f848d,_0x3b8abb),console[_0x5f3de1(0xf2)](_0x5f3de1(0xc7)),_0x2f848d&&await pullApiConfig(_0x2f8c32,_0x2f848d,_0x3b8abb,_0x515005),console[_0x5f3de1(0xf2)](_0x5f3de1(0x100)+_0x5bdf39+_0x5f3de1(0xf9)),console[_0x5f3de1(0xf2)](_0x5f3de1(0xec)+_0x5bdf39),console['log'](_0x5f3de1(0xeb));}catch(_0x3196c3){try{existsSync(_0x2f8c32)&&await a163_0x581b36['rm'](_0x2f8c32,{'recursive':!![],'force':!![]});}catch{}throw _0x3196c3;}}function a163_0xc052(_0x1ccf54,_0x1b8745){_0x1ccf54=_0x1ccf54-0xc6;const _0x51f841=a163_0x51f8();let _0xc052fc=_0x51f841[_0x1ccf54];return _0xc052fc;}async function updatePackageJsonName(_0x9fc8ca){const _0x14d967=a163_0xc052,_0x3c0067=a163_0x249245[_0x14d967(0xd5)](process[_0x14d967(0xfa)](),_0x9fc8ca),_0x4a883f=a163_0x249245['join'](_0x3c0067,_0x14d967(0xda)),_0xbf9afc=await a163_0x581b36[_0x14d967(0xdd)](_0x4a883f,_0x14d967(0xd4)),_0x531a71=JSON[_0x14d967(0xe4)](_0xbf9afc);_0x531a71[_0x14d967(0xfb)]=_0x9fc8ca,_0x531a71['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a163_0x581b36[_0x14d967(0xf0)](_0x4a883f,JSON['stringify'](_0x531a71,null,0x2)+'\x0a');}function detectPackageManager(){const _0x5eea30=a163_0xc052;try{return execSync(_0x5eea30(0xcf),{'stdio':_0x5eea30(0xde)}),_0x5eea30(0xd7);}catch{return'npm';}}async function formatCode(_0x5b32a3){const _0x4f94ad=a163_0xc052;try{await execAsync(_0x4f94ad(0xe1),{'cwd':_0x5b32a3});}catch{}}async function configureProject(_0x2669fb,_0xb9869f,_0x126d19){const _0x3d10a6=a163_0xc052,_0x26756a=a163_0x249245[_0x3d10a6(0xd5)](process[_0x3d10a6(0xfa)](),_0x2669fb),_0x28b4ed=a163_0x249245[_0x3d10a6(0xd9)](_0x26756a,NEW_CONFIG_NAME),_0x2a40ac=readConfig(),_0x5931d8=typeof _0x2a40ac[_0x3d10a6(0xf4)]===_0x3d10a6(0xd0)?_0x2a40ac[_0x3d10a6(0xf4)]:undefined,_0x3f803a={};for(const _0x45828c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x2a40ac[_0x45828c]!=null)_0x3f803a[_0x45828c]=_0x2a40ac[_0x45828c];}const _0xc4435b=buildCanonicalProjectConfig(_0x3f803a,{'appCodes':_0xb9869f?[_0xb9869f]:[],'env':_0x126d19||_0x5931d8||_0x3d10a6(0xfc),'metadata':{'createdAt':new Date()[_0x3d10a6(0xf1)](),'version':getCliVersion()}});writeConfigFile(_0x28b4ed,_0xc4435b);}async function pullApiConfig(_0x493da3,_0x4652b0,_0x4e53bb,_0x57b9e7){const _0x5c2147=a163_0xc052,_0x514c03=process[_0x5c2147(0xfa)]();try{process[_0x5c2147(0xf5)](_0x493da3);const _0x19bac4=_0x4e53bb||_0x5c2147(0xfc);initEnv(_0x19bac4),console['log'](_0x5c2147(0xef));const {configArray:_0x1f39a7}=await fetchModelList(_0x4652b0,_0x57b9e7||''),_0x1f0022=await generateApiFile(_0x1f39a7,'',_0x4652b0,!![],_0x19bac4,DEFAULT_API_DIR);console[_0x5c2147(0xf2)](_0x5c2147(0xdb)+_0x1f39a7['length']+_0x5c2147(0xd2)+_0x1f0022[_0x5c2147(0xc6)]+'\x20model(s)');}catch(_0x1de56a){console[_0x5c2147(0xf2)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x5c2147(0xd8));}finally{process['chdir'](_0x514c03);}}function a163_0x51f8(){const _0x16e3de=['1616425sAtAcP','*\x20Creating\x20project\x20','\x20\x20Pulling\x20API\x20configuration...','writeFile','toLocaleString','log','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','env','chdir','\x20\x20√\x20Code\x20formatted','24fxUGgP','dirname','\x20created\x20successfully!','cwd','name','production','10ljbqMl','access','173058phSuHO','\x0a√\x20Project\x20','modelCount','\x20\x20√\x20Configuration\x20file\x20created','needsUpgrade','9QpRUox','\x20\x20√\x20Project\x20template\x20created','569824VsSXRk','validation','length','Project\x20name\x20cannot\x20be\x20empty.','bun\x20--version','string','4617624eeylPN','\x20dataset(s),\x20generated\x20','\x20\x20√\x20package.json\x20updated','utf-8','resolve','3161818myDPtd','bun','\x20api\x20pull`\x20manually\x20later.','join','package.json','\x20\x20√\x20Pulled\x20','6jHNegn','readFile','ignore','...','19fkoMJI','bun\x20run\x20format','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','9298ToSmNI','parse','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','13JCTEBA','Check\x20directory\x20permissions.','test','Use\x20a\x20different\x20project\x20name.','1537942YSYiHI','\x20\x20rabetbase\x20run\x20start\x0a','\x0a\x20\x20cd\x20'];a163_0x51f8=function(){return _0x16e3de;};return a163_0x51f8();}
@@ -1 +1 @@
1
- (function(_0x5cd6cd,_0x16b2d2){const _0x2dc26b=a157_0x5835,_0x2c3455=_0x5cd6cd();while(!![]){try{const _0x385a28=-parseInt(_0x2dc26b(0xbf))/0x1+-parseInt(_0x2dc26b(0xc4))/0x2*(parseInt(_0x2dc26b(0xbe))/0x3)+-parseInt(_0x2dc26b(0xc6))/0x4+-parseInt(_0x2dc26b(0xc7))/0x5*(parseInt(_0x2dc26b(0xc1))/0x6)+parseInt(_0x2dc26b(0xbd))/0x7*(parseInt(_0x2dc26b(0xc2))/0x8)+parseInt(_0x2dc26b(0xc8))/0x9*(parseInt(_0x2dc26b(0xc0))/0xa)+parseInt(_0x2dc26b(0xc3))/0xb;if(_0x385a28===_0x16b2d2)break;else _0x2c3455['push'](_0x2c3455['shift']());}catch(_0x57c19b){_0x2c3455['push'](_0x2c3455['shift']());}}}(a157_0x5905,0x35ce2));import a157_0x39caf8 from'node:path';import{fileURLToPath}from'node:url';function a157_0x5835(_0x183a6d,_0x17f403){_0x183a6d=_0x183a6d-0xbc;const _0x5905a1=a157_0x5905();let _0x58358a=_0x5905a1[_0x183a6d];return _0x58358a;}function a157_0x5905(){const _0x3570f1=['246722QasrVJ','255120jmtUdQ','203219jzbwlg','150kcvUbc','19734TgAYQQ','16dUlovW','4676265rPgyUC','2KlfItI','sub-app-react-demo','117704TqwBqr','545FTcXbz','240579CejgSz','projects'];a157_0x5905=function(){return _0x3570f1;};return a157_0x5905();}const __dirname=a157_0x39caf8['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){return a157_0x39caf8['resolve'](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x588539=a157_0x5835;return a157_0x39caf8['join'](getRabetbaseCliPackageRoot(),'templates',_0x588539(0xbc),_0x588539(0xc5));}
1
+ (function(_0x4b98dd,_0x4c6893){const _0x14effa=a164_0x2980,_0x1f43d7=_0x4b98dd();while(!![]){try{const _0x127284=parseInt(_0x14effa(0x168))/0x1*(-parseInt(_0x14effa(0x16c))/0x2)+-parseInt(_0x14effa(0x169))/0x3+-parseInt(_0x14effa(0x166))/0x4+parseInt(_0x14effa(0x16d))/0x5*(-parseInt(_0x14effa(0x172))/0x6)+parseInt(_0x14effa(0x167))/0x7*(parseInt(_0x14effa(0x16f))/0x8)+-parseInt(_0x14effa(0x16a))/0x9+parseInt(_0x14effa(0x170))/0xa;if(_0x127284===_0x4c6893)break;else _0x1f43d7['push'](_0x1f43d7['shift']());}catch(_0x320b42){_0x1f43d7['push'](_0x1f43d7['shift']());}}}(a164_0x4957,0x65769));import a164_0x489386 from'node:path';function a164_0x2980(_0x55f5f7,_0x355eff){_0x55f5f7=_0x55f5f7-0x166;const _0x4957dd=a164_0x4957();let _0x2980af=_0x4957dd[_0x55f5f7];return _0x2980af;}import{fileURLToPath}from'node:url';function a164_0x4957(){const _0x2bb864=['8WQDdYU','7483320orBIHD','projects','6EAQrwZ','12784Kxjotw','4240012yylDwv','5EJdqGZ','1001418TbtvtX','1255365IlziDq','templates','137118yXZLed','595865sYeGlg','../../../../'];a164_0x4957=function(){return _0x2bb864;};return a164_0x4957();}const __dirname=a164_0x489386['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x2d2748=a164_0x2980;return a164_0x489386['resolve'](__dirname,_0x2d2748(0x16e));}export function getSubAppReactDemoTemplateDir(){const _0x304099=a164_0x2980;return a164_0x489386['join'](getRabetbaseCliPackageRoot(),_0x304099(0x16b),_0x304099(0x171),'sub-app-react-demo');}
@@ -1 +1 @@
1
- (function(_0x36c647,_0x5250c4){const _0x26d4ad=a158_0xf499,_0x2007aa=_0x36c647();while(!![]){try{const _0x324837=-parseInt(_0x26d4ad(0x69))/0x1*(parseInt(_0x26d4ad(0x64))/0x2)+parseInt(_0x26d4ad(0x6d))/0x3+-parseInt(_0x26d4ad(0x71))/0x4+-parseInt(_0x26d4ad(0x6a))/0x5+parseInt(_0x26d4ad(0x6f))/0x6+-parseInt(_0x26d4ad(0x70))/0x7*(parseInt(_0x26d4ad(0x6b))/0x8)+parseInt(_0x26d4ad(0x66))/0x9;if(_0x324837===_0x5250c4)break;else _0x2007aa['push'](_0x2007aa['shift']());}catch(_0x44979b){_0x2007aa['push'](_0x2007aa['shift']());}}}(a158_0x4882,0x1dd8e));import a158_0x571364 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a158_0xf499(_0x758241,_0x2c3c0f){_0x758241=_0x758241-0x64;const _0x48825f=a158_0x4882();let _0xf4990=_0x48825f[_0x758241];return _0xf4990;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a158_0x4882(){const _0x33ea6e=['resolve','138058WWqoZI','项目模板复制失败','4375458SGboZm','error','项目模板复制完成','1Srblpx','1198265fktnDs','104jwUzGS','copy','156909aZgcwO','info','678360xssgxb','59269RtDwbb','442072xIuStL','now','success'];a158_0x4882=function(){return _0x33ea6e;};return a158_0x4882();}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x871f45){const _0x41f639=a158_0xf499,_0x43372d=Date['now'](),_0xf507db=a158_0x571364[_0x41f639(0x74)](process['cwd'](),_0x871f45);try{logger[_0x41f639(0x6e)]('copy','开始复制项目模板',{'projectCode':_0x871f45,'templateDir':templateDir}),await copyDirectory(templateDir,_0xf507db);const _0x153c48=Date[_0x41f639(0x72)]()-_0x43372d;logger[_0x41f639(0x73)](_0x41f639(0x6c),_0x41f639(0x68),_0x153c48,{'projectCode':_0x871f45});}catch(_0x2deed6){const _0x46cf40=Date[_0x41f639(0x72)]()-_0x43372d;logger[_0x41f639(0x67)](_0x41f639(0x6c),_0x41f639(0x65),{'projectCode':_0x871f45,'error':_0x2deed6 instanceof Error?_0x2deed6['message']:String(_0x2deed6),'duration':_0x46cf40});throw _0x2deed6;}return formatElapsed(_0x43372d);}
1
+ (function(_0x4e89f2,_0x24b9a2){const _0x2b0129=a165_0x3ce1,_0x14ed4c=_0x4e89f2();while(!![]){try{const _0x53575f=parseInt(_0x2b0129(0xea))/0x1+parseInt(_0x2b0129(0xec))/0x2+parseInt(_0x2b0129(0xe7))/0x3*(-parseInt(_0x2b0129(0xe2))/0x4)+-parseInt(_0x2b0129(0xef))/0x5*(-parseInt(_0x2b0129(0xf0))/0x6)+parseInt(_0x2b0129(0xe9))/0x7*(parseInt(_0x2b0129(0xe3))/0x8)+-parseInt(_0x2b0129(0xe0))/0x9+-parseInt(_0x2b0129(0xe6))/0xa;if(_0x53575f===_0x24b9a2)break;else _0x14ed4c['push'](_0x14ed4c['shift']());}catch(_0x325d8e){_0x14ed4c['push'](_0x14ed4c['shift']());}}}(a165_0x55f6,0xac380));import a165_0x417471 from'node:path';function a165_0x3ce1(_0x16e249,_0x1db505){_0x16e249=_0x16e249-0xe0;const _0x55f614=a165_0x55f6();let _0x3ce13a=_0x55f614[_0x16e249];return _0x3ce13a;}import{copyDirectory}from'../../../utils/copy-directory.js';function a165_0x55f6(){const _0x4cb22f=['3973491TTYrag','cwd','1169624SJaMIO','8IzUZik','copy','info','8156270TlKNdT','3mcwUvO','开始复制项目模板','6959365VFcrbl','503920cqQfGH','now','26230FkpvSW','success','resolve','50UlYfnv','446226kLQKXk','message','项目模板复制失败','error'];a165_0x55f6=function(){return _0x4cb22f;};return a165_0x55f6();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x21a1f2){const _0x1f40c6=a165_0x3ce1,_0x1bf7de=Date['now'](),_0x35587c=a165_0x417471[_0x1f40c6(0xee)](process[_0x1f40c6(0xe1)](),_0x21a1f2);try{logger[_0x1f40c6(0xe5)](_0x1f40c6(0xe4),_0x1f40c6(0xe8),{'projectCode':_0x21a1f2,'templateDir':templateDir}),await copyDirectory(templateDir,_0x35587c);const _0x22dc6c=Date[_0x1f40c6(0xeb)]()-_0x1bf7de;logger[_0x1f40c6(0xed)](_0x1f40c6(0xe4),'项目模板复制完成',_0x22dc6c,{'projectCode':_0x21a1f2});}catch(_0x3f05f5){const _0x85cd0a=Date[_0x1f40c6(0xeb)]()-_0x1bf7de;logger[_0x1f40c6(0xf3)]('copy',_0x1f40c6(0xf2),{'projectCode':_0x21a1f2,'error':_0x3f05f5 instanceof Error?_0x3f05f5[_0x1f40c6(0xf1)]:String(_0x3f05f5),'duration':_0x85cd0a});throw _0x3f05f5;}return formatElapsed(_0x1bf7de);}
@@ -1 +1 @@
1
- (function(_0x2a926b,_0x6a254b){const _0x3c3e84=a159_0x3c2a,_0x2e46df=_0x2a926b();while(!![]){try{const _0x2eab29=-parseInt(_0x3c3e84(0x1f3))/0x1*(parseInt(_0x3c3e84(0x1f2))/0x2)+parseInt(_0x3c3e84(0x1eb))/0x3+parseInt(_0x3c3e84(0x1ee))/0x4*(parseInt(_0x3c3e84(0x1ed))/0x5)+parseInt(_0x3c3e84(0x1e7))/0x6+-parseInt(_0x3c3e84(0x1ea))/0x7+parseInt(_0x3c3e84(0x1f6))/0x8*(-parseInt(_0x3c3e84(0x1f4))/0x9)+parseInt(_0x3c3e84(0x1ef))/0xa;if(_0x2eab29===_0x6a254b)break;else _0x2e46df['push'](_0x2e46df['shift']());}catch(_0x1fbcb0){_0x2e46df['push'](_0x2e46df['shift']());}}}(a159_0x18e1,0x6f39f));function a159_0x18e1(){const _0x6ad7cb=['error','2620744FOFUUH','519498ZSXoSL','format','1029065IRhTci','8IhuFim','9159630HuBkPF','prettier','cwd','3566zQRzIn','340JgwrDF','6436026fgzHqo','message','8SCqKBu','3903324OQLGyo','now'];a159_0x18e1=function(){return _0x6ad7cb;};return a159_0x18e1();}function a159_0x3c2a(_0x4e2153,_0x3ecbe9){_0x4e2153=_0x4e2153-0x1e7;const _0x18e1e0=a159_0x18e1();let _0x3c2aa3=_0x18e1e0[_0x4e2153];return _0x3c2aa3;}import a159_0xa61d8e from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x86478d){const _0x112d23=a159_0x3c2a,_0x5a5cba=Date[_0x112d23(0x1e8)](),_0x1953b5=a159_0xa61d8e['resolve'](process[_0x112d23(0x1f1)](),_0x86478d);try{logger['info'](_0x112d23(0x1ec),'开始格式化代码',{'projectCode':_0x86478d}),await execa(resolveNpmBin('npx'),[_0x112d23(0x1f0),'--write','.'],{'cwd':_0x1953b5});const _0x3f1061=Date[_0x112d23(0x1e8)]()-_0x5a5cba;logger['success']('format','代码格式化完成',_0x3f1061,{'projectCode':_0x86478d});}catch(_0x5c2174){const _0x3aa3ee=Date[_0x112d23(0x1e8)]()-_0x5a5cba;logger[_0x112d23(0x1e9)](_0x112d23(0x1ec),'代码格式化失败',{'projectCode':_0x86478d,'error':_0x5c2174 instanceof Error?_0x5c2174[_0x112d23(0x1f5)]:String(_0x5c2174),'duration':_0x3aa3ee});throw _0x5c2174;}return formatElapsed(_0x5a5cba);}
1
+ function a166_0x26a5(){const _0x5daf48=['now','代码格式化失败','3402890KgUEAc','info','789930ZBCjOd','564735KXUdgN','196xVSyFP','error','10662cpxPxO','prettier','npx','69966BUZCyC','27868HpDsoE','152HKDQBn','success','12HtgINm','168728LBExQS','--write','resolve','format'];a166_0x26a5=function(){return _0x5daf48;};return a166_0x26a5();}(function(_0x1ad93b,_0x80cea7){const _0xbfd786=a166_0x1668,_0x1e9456=_0x1ad93b();while(!![]){try{const _0x296765=parseInt(_0xbfd786(0x1d7))/0x1+parseInt(_0xbfd786(0x1ea))/0x2+-parseInt(_0xbfd786(0x1e7))/0x3*(parseInt(_0xbfd786(0x1e5))/0x4)+parseInt(_0xbfd786(0x1e4))/0x5*(-parseInt(_0xbfd786(0x1da))/0x6)+parseInt(_0xbfd786(0x1db))/0x7*(parseInt(_0xbfd786(0x1d8))/0x8)+-parseInt(_0xbfd786(0x1e3))/0x9+parseInt(_0xbfd786(0x1e1))/0xa;if(_0x296765===_0x80cea7)break;else _0x1e9456['push'](_0x1e9456['shift']());}catch(_0x4593c6){_0x1e9456['push'](_0x1e9456['shift']());}}}(a166_0x26a5,0x5b23a));import a166_0x4ec89b from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a166_0x1668(_0xa9b2b6,_0x30dd3f){_0xa9b2b6=_0xa9b2b6-0x1d7;const _0x26a515=a166_0x26a5();let _0x1668a8=_0x26a515[_0xa9b2b6];return _0x1668a8;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4c1987){const _0x1661c3=a166_0x1668,_0x13f55c=Date[_0x1661c3(0x1df)](),_0x1c4b9a=a166_0x4ec89b[_0x1661c3(0x1dd)](process['cwd'](),_0x4c1987);try{logger[_0x1661c3(0x1e2)](_0x1661c3(0x1de),'开始格式化代码',{'projectCode':_0x4c1987}),await execa(resolveNpmBin(_0x1661c3(0x1e9)),[_0x1661c3(0x1e8),_0x1661c3(0x1dc),'.'],{'cwd':_0x1c4b9a});const _0x1ef9d0=Date[_0x1661c3(0x1df)]()-_0x13f55c;logger[_0x1661c3(0x1d9)](_0x1661c3(0x1de),'代码格式化完成',_0x1ef9d0,{'projectCode':_0x4c1987});}catch(_0x154956){const _0xe61598=Date[_0x1661c3(0x1df)]()-_0x13f55c;logger[_0x1661c3(0x1e6)](_0x1661c3(0x1de),_0x1661c3(0x1e0),{'projectCode':_0x4c1987,'error':_0x154956 instanceof Error?_0x154956['message']:String(_0x154956),'duration':_0xe61598});throw _0x154956;}return formatElapsed(_0x13f55c);}
@@ -1 +1 @@
1
- (function(_0x2abb69,_0x1b71d5){const _0x209a0c=a160_0x3708,_0x5bade7=_0x2abb69();while(!![]){try{const _0x5c9f01=parseInt(_0x209a0c(0xa8))/0x1*(parseInt(_0x209a0c(0xac))/0x2)+parseInt(_0x209a0c(0xa2))/0x3*(parseInt(_0x209a0c(0x9d))/0x4)+parseInt(_0x209a0c(0x98))/0x5+parseInt(_0x209a0c(0xa6))/0x6+-parseInt(_0x209a0c(0x9f))/0x7*(parseInt(_0x209a0c(0x9c))/0x8)+parseInt(_0x209a0c(0xa1))/0x9*(parseInt(_0x209a0c(0x9b))/0xa)+parseInt(_0x209a0c(0x97))/0xb*(-parseInt(_0x209a0c(0xa7))/0xc);if(_0x5c9f01===_0x1b71d5)break;else _0x5bade7['push'](_0x5bade7['shift']());}catch(_0x3d1a56){_0x5bade7['push'](_0x5bade7['shift']());}}}(a160_0x1238,0xb408d));import a160_0x130a3e from'node:path';function a160_0x1238(){const _0x3d85fa=['2255hFNDEt','2786730yBbjGJ','https://registry.npmmirror.com','开始安装依赖','230rJuaXo','9478984csdYjc','4mWyMSh','依赖安装失败','7yYlAMK','cwd','302661sPTdeZ','1516113UbOAwK','install','resolve','success','7284462cOlmop','140304IMwGDk','1Wwtkpi','now','error','message','2537786TXbDYU','依赖安装完成'];a160_0x1238=function(){return _0x3d85fa;};return a160_0x1238();}import{execa}from'execa';function a160_0x3708(_0x3d03da,_0x828278){_0x3d03da=_0x3d03da-0x97;const _0x123867=a160_0x1238();let _0x37084a=_0x123867[_0x3d03da];return _0x37084a;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x3ff478){const _0x2d02cf=a160_0x3708,_0x1a8bf7=Date[_0x2d02cf(0xa9)](),_0x3e9d18=a160_0x130a3e[_0x2d02cf(0xa4)](process[_0x2d02cf(0xa0)](),_0x3ff478);try{logger['info']('install',_0x2d02cf(0x9a),{'projectCode':_0x3ff478,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin('npm'),[_0x2d02cf(0xa3),'--registry',_0x2d02cf(0x99)],{'cwd':_0x3e9d18});const _0x14b0ba=Date[_0x2d02cf(0xa9)]()-_0x1a8bf7;logger[_0x2d02cf(0xa5)](_0x2d02cf(0xa3),_0x2d02cf(0xad),_0x14b0ba,{'projectCode':_0x3ff478});}catch(_0x5174b9){const _0x24edb6=Date['now']()-_0x1a8bf7;logger[_0x2d02cf(0xaa)]('install',_0x2d02cf(0x9e),{'projectCode':_0x3ff478,'error':_0x5174b9 instanceof Error?_0x5174b9[_0x2d02cf(0xab)]:String(_0x5174b9),'duration':_0x24edb6});throw _0x5174b9;}return formatElapsed(_0x1a8bf7);}
1
+ function a167_0x7b8e(){const _0x106236=['https://registry.npmmirror.com','依赖安装失败','npm','35NkBIJp','1351461PgzuTb','510272fJPGNO','cwd','install','success','4LzzqHh','依赖安装完成','message','866658FOZLeS','6947535MtRmAC','1567552zYyVnR','now','111537rgJQGx','error','info','285613OFdkXi','开始安装依赖'];a167_0x7b8e=function(){return _0x106236;};return a167_0x7b8e();}(function(_0x187e60,_0x4e2424){const _0x4ef67e=a167_0x1b1c,_0x26e4c3=_0x187e60();while(!![]){try{const _0x3f79e3=-parseInt(_0x4ef67e(0xd1))/0x1+-parseInt(_0x4ef67e(0xc7))/0x2*(-parseInt(_0x4ef67e(0xc2))/0x3)+parseInt(_0x4ef67e(0xc3))/0x4+-parseInt(_0x4ef67e(0xc1))/0x5*(parseInt(_0x4ef67e(0xca))/0x6)+parseInt(_0x4ef67e(0xcb))/0x7+-parseInt(_0x4ef67e(0xcc))/0x8+-parseInt(_0x4ef67e(0xce))/0x9;if(_0x3f79e3===_0x4e2424)break;else _0x26e4c3['push'](_0x26e4c3['shift']());}catch(_0x50cca6){_0x26e4c3['push'](_0x26e4c3['shift']());}}}(a167_0x7b8e,0x7df9c));import a167_0x2828be from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a167_0x1b1c(_0x143447,_0x5380a9){_0x143447=_0x143447-0xbf;const _0x7b8e0d=a167_0x7b8e();let _0x1b1cf2=_0x7b8e0d[_0x143447];return _0x1b1cf2;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4d95de){const _0x1475f7=a167_0x1b1c,_0x2df2b0=Date[_0x1475f7(0xcd)](),_0x1b60d6=a167_0x2828be['resolve'](process[_0x1475f7(0xc4)](),_0x4d95de);try{logger[_0x1475f7(0xd0)](_0x1475f7(0xc5),_0x1475f7(0xd2),{'projectCode':_0x4d95de,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x1475f7(0xc0)),[_0x1475f7(0xc5),'--registry',_0x1475f7(0xd3)],{'cwd':_0x1b60d6});const _0x31743b=Date[_0x1475f7(0xcd)]()-_0x2df2b0;logger[_0x1475f7(0xc6)](_0x1475f7(0xc5),_0x1475f7(0xc8),_0x31743b,{'projectCode':_0x4d95de});}catch(_0x58ab6d){const _0x483c24=Date['now']()-_0x2df2b0;logger[_0x1475f7(0xcf)](_0x1475f7(0xc5),_0x1475f7(0xbf),{'projectCode':_0x4d95de,'error':_0x58ab6d instanceof Error?_0x58ab6d[_0x1475f7(0xc9)]:String(_0x58ab6d),'duration':_0x483c24});throw _0x58ab6d;}return formatElapsed(_0x2df2b0);}
@@ -1 +1 @@
1
- const a161_0x4819c7=a161_0x5138;(function(_0x43a2de,_0xbb75f1){const _0x4569c4=a161_0x5138,_0x1f552f=_0x43a2de();while(!![]){try{const _0x2c5aec=-parseInt(_0x4569c4(0x10d))/0x1+parseInt(_0x4569c4(0xfb))/0x2+-parseInt(_0x4569c4(0x11f))/0x3+parseInt(_0x4569c4(0xff))/0x4+-parseInt(_0x4569c4(0x105))/0x5+-parseInt(_0x4569c4(0x106))/0x6*(-parseInt(_0x4569c4(0x11e))/0x7)+parseInt(_0x4569c4(0x103))/0x8*(parseInt(_0x4569c4(0xfa))/0x9);if(_0x2c5aec===_0xbb75f1)break;else _0x1f552f['push'](_0x1f552f['shift']());}catch(_0x192faa){_0x1f552f['push'](_0x1f552f['shift']());}}}(a161_0x46eb,0x68438));import{CliErrors}from'../../errors.js';function a161_0x5138(_0xef885e,_0x51cad6){_0xef885e=_0xef885e-0xf9;const _0x46ebbc=a161_0x46eb();let _0x513818=_0x46ebbc[_0xef885e];return _0x513818;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a161_0x46eb(){const _0x8b739b=['Create\x20a\x20new\x20project','154808OVEGGC','create','string','init','yes','../../commands/project/create/non-interactive.js','args','upgrade','Skip\x20confirmation\x20prompt','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','App\x20code\x20to\x20initialize','env','nonInteractive','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','661822VPycwT','305886lmAXlS','../../commands/project/create/main.js','Target\x20environment','name','3821859TvunVK','285536HZSpoz','validation','cookie','Auto-confirm\x20prompts','2379288UlRxcX','boolean','trim','write','8mJwQBL','\x20workspace\x20init','2864765CpmtlY','6pySalL','Usage:\x20','project','appcode','2026-07','str'];a161_0x46eb=function(){return _0x8b739b;};return a161_0x46eb();}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a161_0x4819c7(0x109),'type':a161_0x4819c7(0x10f),'description':a161_0x4819c7(0x118)},{'name':a161_0x4819c7(0x119),'type':a161_0x4819c7(0x10f),'description':a161_0x4819c7(0x121)},{'name':a161_0x4819c7(0x111),'type':a161_0x4819c7(0x100),'description':a161_0x4819c7(0xfe),'default':![]}],createFlags=[{'name':a161_0x4819c7(0xf9),'type':'string','description':'Project\x20name'},{'name':'env','type':a161_0x4819c7(0x10f),'description':a161_0x4819c7(0x121)},{'name':a161_0x4819c7(0x109),'type':a161_0x4819c7(0x10f),'description':a161_0x4819c7(0x117)}],upgradeFlags=[{'name':a161_0x4819c7(0x111),'type':a161_0x4819c7(0x100),'description':a161_0x4819c7(0x115),'default':![]}];export const projectDefinitions=[{'service':a161_0x4819c7(0x108),'command':a161_0x4819c7(0x110),'description':a161_0x4819c7(0x116),'risk':a161_0x4819c7(0x102),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a161_0x4819c7(0x104),'since':a161_0x4819c7(0x10a)},'flags':initFlags,async 'execute'(_0x574e63){const _0x55a9af=a161_0x4819c7;return await initConfig({'appcode':_0x574e63[_0x55a9af(0x10b)](_0x55a9af(0x109))||undefined,'env':_0x574e63[_0x55a9af(0x10b)](_0x55a9af(0x119))||undefined,'autoYes':_0x574e63['bool']('yes')}),{'ok':!![]};}},{'service':a161_0x4819c7(0x108),'command':a161_0x4819c7(0x10e),'description':a161_0x4819c7(0x10c),'risk':a161_0x4819c7(0x102),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a161_0x4819c7(0x11c),'required':![]}],'flags':createFlags,async 'execute'(_0x5b2852){const _0x11514d=a161_0x4819c7,{createApp:_0x1c9a03}=await import(_0x11514d(0x120)),{createProjectNonInteractive:_0x648930}=await import(_0x11514d(0x112)),_0x5decb8=_0x5b2852[_0x11514d(0x10b)](_0x11514d(0xf9))[_0x11514d(0x101)]()||_0x5b2852[_0x11514d(0x113)][0x0]?.[_0x11514d(0x101)](),_0x30cc8f=_0x5b2852['str'](_0x11514d(0x119))||undefined,_0x6f9ae9=_0x5b2852[_0x11514d(0x10b)](_0x11514d(0x109))||undefined;if(_0x5b2852[_0x11514d(0x11a)]){if(!_0x5decb8)throw CliErrors[_0x11514d(0xfc)](_0x11514d(0x11d),_0x11514d(0x107)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x648930(_0x5decb8,_0x30cc8f,_0x6f9ae9,_0x5b2852[_0x11514d(0xfd)]);}else await _0x1c9a03({'projectCode':_0x5decb8,'appCode':_0x6f9ae9,'env':_0x30cc8f,'cookie':_0x5b2852[_0x11514d(0xfd)]});return{'ok':!![]};}},{'service':a161_0x4819c7(0x108),'command':a161_0x4819c7(0x114),'description':a161_0x4819c7(0x11b),'risk':a161_0x4819c7(0x102),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x132b89){return await upgradeApp(_0x132b89['nonInteractive'],{'yes':_0x132b89['bool']('yes')}),{'ok':!![]};}}];
1
+ function a168_0x5794(){const _0x2204c4=['trim','boolean','54MPDUqC','appcode','create','291895TMnClS','str','870266cDogFo','nonInteractive','project-name','Project\x20name','2387184SVmyYN','write','env','yes','512944lzavJl','65736fDFIVM','bool','Usage:\x20','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','../../commands/project/create/non-interactive.js','project','63jOvWAA','1024428zgQLUH','validation','19511181CGVndE','Target\x20environment','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','../../commands/project/create/main.js','cookie','string','name','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)'];a168_0x5794=function(){return _0x2204c4;};return a168_0x5794();}const a168_0x780458=a168_0xe3f3;(function(_0x3f2e7f,_0x21e209){const _0x33b6da=a168_0xe3f3,_0x5ebb7b=_0x3f2e7f();while(!![]){try{const _0x6aced5=parseInt(_0x33b6da(0x1b7))/0x1+parseInt(_0x33b6da(0x19a))/0x2+parseInt(_0x33b6da(0x1a6))/0x3+-parseInt(_0x33b6da(0x19e))/0x4+-parseInt(_0x33b6da(0x1b5))/0x5*(-parseInt(_0x33b6da(0x1b2))/0x6)+parseInt(_0x33b6da(0x1a5))/0x7*(parseInt(_0x33b6da(0x19f))/0x8)+-parseInt(_0x33b6da(0x1a8))/0x9;if(_0x6aced5===_0x21e209)break;else _0x5ebb7b['push'](_0x5ebb7b['shift']());}catch(_0x5c660d){_0x5ebb7b['push'](_0x5ebb7b['shift']());}}}(a168_0x5794,0xacfc9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a168_0xe3f3(_0x4a46fd,_0xd8aaf4){_0x4a46fd=_0x4a46fd-0x199;const _0x579442=a168_0x5794();let _0xe3f385=_0x579442[_0x4a46fd];return _0xe3f385;}const createFlags=[{'name':a168_0x780458(0x1ae),'type':a168_0x780458(0x1ad),'description':a168_0x780458(0x199)},{'name':a168_0x780458(0x19c),'type':'string','description':a168_0x780458(0x1a9)},{'name':a168_0x780458(0x1b3),'type':'string','description':a168_0x780458(0x1a2)}],upgradeFlags=[{'name':a168_0x780458(0x19d),'type':a168_0x780458(0x1b1),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a168_0x780458(0x1a4),'command':a168_0x780458(0x1b4),'description':'Create\x20a\x20new\x20project','risk':a168_0x780458(0x19b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a168_0x780458(0x1b9),'description':a168_0x780458(0x1af),'required':![]}],'flags':createFlags,async 'execute'(_0xff3b9d){const _0x1a6f2f=a168_0x780458,{createApp:_0x2e8625}=await import(_0x1a6f2f(0x1ab)),{createProjectNonInteractive:_0xe4485e}=await import(_0x1a6f2f(0x1a3)),_0x20be97=_0xff3b9d['str'](_0x1a6f2f(0x1ae))[_0x1a6f2f(0x1b0)]()||_0xff3b9d['args'][0x0]?.[_0x1a6f2f(0x1b0)](),_0x44f283=_0xff3b9d['str'](_0x1a6f2f(0x19c))||undefined,_0x84e735=_0xff3b9d[_0x1a6f2f(0x1b6)](_0x1a6f2f(0x1b3))||undefined;if(_0xff3b9d[_0x1a6f2f(0x1b8)]){if(!_0x20be97)throw CliErrors[_0x1a6f2f(0x1a7)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x1a6f2f(0x1a1)+CLI_BIN_NAME+_0x1a6f2f(0x1aa));await _0xe4485e(_0x20be97,_0x44f283,_0x84e735,_0xff3b9d['cookie']);}else await _0x2e8625({'projectCode':_0x20be97,'appCode':_0x84e735,'env':_0x44f283,'cookie':_0xff3b9d[_0x1a6f2f(0x1ac)]});return{'ok':!![]};}},{'service':a168_0x780458(0x1a4),'command':'upgrade','description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a168_0x780458(0x19b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x1c3d88){const _0x8e058f=a168_0x780458;return await upgradeApp(_0x1c3d88[_0x8e058f(0x1b8)],{'yes':_0x1c3d88[_0x8e058f(0x1a0)](_0x8e058f(0x19d))}),{'ok':!![]};}}];
@@ -1 +1 @@
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
+ const a169_0x3ad34d=a169_0x40c0;(function(_0x5a4709,_0x24a4f2){const _0x2fd8ce=a169_0x40c0,_0x32a8d4=_0x5a4709();while(!![]){try{const _0x3e0add=parseInt(_0x2fd8ce(0xd3))/0x1*(parseInt(_0x2fd8ce(0xed))/0x2)+-parseInt(_0x2fd8ce(0x111))/0x3+-parseInt(_0x2fd8ce(0x12f))/0x4+-parseInt(_0x2fd8ce(0x10a))/0x5*(parseInt(_0x2fd8ce(0xfc))/0x6)+-parseInt(_0x2fd8ce(0x129))/0x7*(parseInt(_0x2fd8ce(0x13a))/0x8)+parseInt(_0x2fd8ce(0xf7))/0x9*(-parseInt(_0x2fd8ce(0xcb))/0xa)+parseInt(_0x2fd8ce(0xc6))/0xb;if(_0x3e0add===_0x24a4f2)break;else _0x32a8d4['push'](_0x32a8d4['shift']());}catch(_0x5e8fab){_0x32a8d4['push'](_0x32a8d4['shift']());}}}(a169_0x311a,0x29173));import a169_0x5ea9a7 from'chalk';import a169_0x5f128a 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[a169_0x3ad34d(0x126)](_0x3940df=>_0x3940df!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x46c863){const _0xb1e108=a169_0x3ad34d,_0x39d9f6=[];for(const _0x1330d1 of Object['values'](CORE_IDE_CONFIGS)){if(_0x1330d1[_0xb1e108(0x10b)])for(const _0x27433c of _0x1330d1[_0xb1e108(0x10b)]){_0x39d9f6[_0xb1e108(0xfa)](resolve(_0x46c863,_0x27433c[_0xb1e108(0xf1)]));}}return _0x39d9f6;}function analyse(_0x1f8077){const _0xe7667=a169_0x3ad34d;let _0x35dff4=null;const _0x5dd41b=resolve(_0x1f8077,NEW_CONFIG_NAME),_0x1184c7=existsSync(_0x5dd41b);for(const _0x5aa12c of LEGACY_CONFIG_NAMES){const _0x2c6df9=resolve(_0x1f8077,_0x5aa12c);if(existsSync(_0x2c6df9)){const _0xdbd6e6=readConfigFile(_0x2c6df9),_0x3790da=Object[_0xe7667(0x12c)](_0xdbd6e6)[_0xe7667(0x126)](_0x1f17eb=>typeof _0xdbd6e6[_0x1f17eb]!=='undefined');_0x35dff4={'oldPath':_0x2c6df9,'hasNewConfig':_0x1184c7,'fields':_0x3790da};break;}}const _0x40c812=[],_0x12fcc7=resolve(_0x1f8077,_0xe7667(0xf9));if(existsSync(_0x12fcc7))_0x40c812[_0xe7667(0xfa)](_0x12fcc7);const _0x30a688=resolve(_0x1f8077,_0xe7667(0x138));if(existsSync(_0x30a688))_0x40c812['push'](_0x30a688);const _0x23bbf4=resolve(_0x1f8077,_0xe7667(0xcc));if(existsSync(_0x23bbf4))_0x40c812['push'](_0x23bbf4);for(const _0x10d43d of collectIdeSkillFiles(_0x1f8077)){if(existsSync(_0x10d43d))_0x40c812['push'](_0x10d43d);}let _0x5dbbdc=null;const _0x3bd58c=resolve(_0x1f8077,_0xe7667(0x100));if(existsSync(_0x3bd58c))try{const _0x905a56=JSON[_0xe7667(0x137)](readFileSync(_0x3bd58c,'utf8'));if(_0x905a56?.[_0xe7667(0xd2)]&&typeof _0x905a56['mcpServers']===_0xe7667(0x11b)){const _0xeb4bf8=[];for(const [_0x578c96,_0x46b534]of Object[_0xe7667(0x12e)](_0x905a56[_0xe7667(0xd2)])){const _0x4dc6dd=_0x46b534;_0x4dc6dd?.[_0xe7667(0x118)]&&Array['isArray'](_0x4dc6dd[_0xe7667(0x118)])&&_0x4dc6dd[_0xe7667(0x118)][_0xe7667(0x104)](_0x6133a3=>typeof _0x6133a3==='string'&&_0x6133a3[_0xe7667(0x117)](_0xe7667(0x110)))&&_0xeb4bf8[_0xe7667(0xfa)](_0x578c96);}_0xeb4bf8[_0xe7667(0x11f)]>0x0&&(_0x5dbbdc={'path':_0x3bd58c,'keys':_0xeb4bf8});}}catch{}const _0x145e4d=_0x40c812[_0xe7667(0x11f)]>0x0||_0x35dff4!==null;let _0x306ff3=null;const _0x8ec355=resolve(_0x1f8077,'package.json');if(existsSync(_0x8ec355))try{const _0x3d5c5a=JSON[_0xe7667(0x137)](readFileSync(_0x8ec355,'utf8'));for(const _0x3fd350 of[_0xe7667(0xe6),_0xe7667(0x11a)]){const _0x211916=_0x3d5c5a?.[_0x3fd350]?.[_0xe7667(0x122)];if(typeof _0x211916===_0xe7667(0x114)){_0x211916!==_0xe7667(0x131)&&(_0x306ff3={'pkgPath':_0x8ec355,'currentVersion':_0x211916,'field':_0x3fd350});break;}}}catch{}return{'configMigration':_0x35dff4,'oldArtifacts':_0x40c812,'oldMcpConfig':_0x5dbbdc,'needsSkillSwap':_0x145e4d,'sdkUpgrade':_0x306ff3};}function printReport(_0x3129af){const _0x3943ee=a169_0x3ad34d,{configMigration:_0x1d30e1,oldArtifacts:_0xc08b34,oldMcpConfig:_0x5b74b4,needsSkillSwap:_0x2df657}=_0x3129af;console[_0x3943ee(0xe7)](''),console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0xf0)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x3943ee(0xe7)]('');_0x1d30e1?(console['log'](a169_0x5ea9a7['cyan'](_0x3943ee(0xf3))+('\x20\x20'+a169_0x5ea9a7['yellow'](_0x1d30e1['oldPath']))),console[_0x3943ee(0xe7)](_0x3943ee(0x134)+(_0x1d30e1[_0x3943ee(0x107)]?a169_0x5ea9a7[_0x3943ee(0xd6)](_0x3943ee(0xdf)):a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0xc5)))),console[_0x3943ee(0xe7)](_0x3943ee(0xbf)+_0x1d30e1[_0x3943ee(0xe9)]['join'](',\x20')),console[_0x3943ee(0xe7)](_0x3943ee(0xd0))):console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0xf3))+'\x20\x20'+a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0x130)));console['log']('');if(_0xc08b34[_0x3943ee(0x11f)]>0x0){console[_0x3943ee(0xe7)](a169_0x5ea9a7['cyan'](_0x3943ee(0xf6)));for(const _0x5a2dd6 of _0xc08b34){console['log']('\x20\x20'+a169_0x5ea9a7['red'](_0x3943ee(0x139))+'\x20\x20'+_0x5a2dd6);}console[_0x3943ee(0xe7)](_0x3943ee(0x128));}else console['log'](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0xf6))+'\x20\x20'+a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0xef)));console[_0x3943ee(0xe7)]('');_0x5b74b4?(console[_0x3943ee(0xe7)](a169_0x5ea9a7['cyan'](_0x3943ee(0xd7))+('\x20\x20'+a169_0x5ea9a7['yellow'](_0x5b74b4[_0x3943ee(0xf1)])+'\x20→\x20keys:\x20'+_0x5b74b4[_0x3943ee(0x12c)]['join'](',\x20'))),console['log'](_0x3943ee(0x132))):console[_0x3943ee(0xe7)](a169_0x5ea9a7['cyan']('MCP\x20config:')+'\x20\x20'+a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0xe5)));console[_0x3943ee(0xe7)](''),console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0xce))+('\x20\x20'+(_0x2df657?a169_0x5ea9a7[_0x3943ee(0x112)](_0x3943ee(0xe3)):a169_0x5ea9a7[_0x3943ee(0xd6)]('not\x20needed'))));_0x2df657&&console[_0x3943ee(0xe7)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x3943ee(0xe7)]('');if(_0x3129af[_0x3943ee(0xde)]){const {currentVersion:_0x58c613,field:_0x52a6c0,pkgPath:_0x1aa92c}=_0x3129af[_0x3943ee(0xde)];console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0x133))+('\x20\x20'+a169_0x5ea9a7['yellow'](_0x1aa92c))),console[_0x3943ee(0xe7)](_0x3943ee(0x125)+_0x52a6c0+':\x20'+a169_0x5ea9a7['yellow'](_0x58c613)+_0x3943ee(0xea)+a169_0x5ea9a7[_0x3943ee(0xd6)]('latest')),console[_0x3943ee(0xe7)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x3943ee(0xe7)](a169_0x5ea9a7[_0x3943ee(0x108)](_0x3943ee(0x133))+'\x20\x20'+a169_0x5ea9a7[_0x3943ee(0xc4)](_0x3943ee(0xe4)));console['log']('');}function execConfigMigration(_0xf0775a,_0x4fc354){const _0x270cec=a169_0x3ad34d,{configMigration:_0x542bcf}=_0xf0775a;if(!_0x542bcf?.[_0x270cec(0x121)])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x270cec(0xc1)};const _0xf084c3=readConfigFile(_0x542bcf[_0x270cec(0x121)]),_0x1d5d69=resolve(_0x4fc354,NEW_CONFIG_NAME),_0x3fbf64=_0x542bcf[_0x270cec(0x107)]?readConfigFile(_0x1d5d69):{};for(const [_0x5b2f41,_0x28ba05]of Object['entries'](_0xf084c3)){!(_0x5b2f41 in _0x3fbf64)&&(_0x3fbf64[_0x5b2f41]=_0x28ba05);}writeConfigFile(_0x1d5d69,_0x3fbf64);const _0x22939e=_0x542bcf[_0x270cec(0x121)]+_0x270cec(0xc7);return renameSync(_0x542bcf[_0x270cec(0x121)],_0x22939e),{'step':0x1,'label':_0x270cec(0xfb),'ok':!![],'detail':_0x542bcf[_0x270cec(0x121)]+_0x270cec(0xea)+_0x1d5d69+_0x270cec(0xbb)+_0x22939e+')'};}function execRemoveOldArtifacts(_0x52d9e8){const _0x5f1976=a169_0x3ad34d,_0x441cbf=[];for(const _0x39721e of _0x52d9e8){try{if(!existsSync(_0x39721e))continue;const _0x54be9f=tryStat(_0x39721e);_0x54be9f?.['isDirectory']()?rmSync(_0x39721e,{'recursive':!![],'force':!![]}):unlinkSync(_0x39721e);}catch(_0x282b0f){_0x441cbf[_0x5f1976(0xfa)](_0x39721e+':\x20'+_0x282b0f['message']);}}return{'step':0x3,'label':_0x5f1976(0xe8),'ok':_0x441cbf['length']===0x0,'detail':_0x441cbf[_0x5f1976(0x11f)]>0x0?_0x52d9e8[_0x5f1976(0x11f)]-_0x441cbf[_0x5f1976(0x11f)]+'/'+_0x52d9e8[_0x5f1976(0x11f)]+_0x5f1976(0xda)+_0x441cbf[_0x5f1976(0xd9)](';\x20')+')':_0x52d9e8[_0x5f1976(0x11f)]+'\x20removed'};}function a169_0x40c0(_0x1ae9c7,_0x16e694){_0x1ae9c7=_0x1ae9c7-0xbb;const _0x311ad7=a169_0x311a();let _0x40c01e=_0x311ad7[_0x1ae9c7];return _0x40c01e;}function execCleanMcp(_0x3c813d){const _0xf0890=a169_0x3ad34d;if(!_0x3c813d[_0xf0890(0x115)])return{'step':0x4,'label':_0xf0890(0x113),'ok':!![],'detail':_0xf0890(0xc9)};try{const _0x5af279=readFileSync(_0x3c813d['oldMcpConfig'][_0xf0890(0xf1)],_0xf0890(0xdb)),_0x44538d=JSON[_0xf0890(0x137)](_0x5af279);if(_0x44538d?.['mcpServers']&&typeof _0x44538d['mcpServers']===_0xf0890(0x11b)){const _0x58bca2=[];for(const [_0x411ba8,_0x443ca4]of Object[_0xf0890(0x12e)](_0x44538d[_0xf0890(0xd2)])){_0x443ca4?.[_0xf0890(0x118)]&&Array['isArray'](_0x443ca4[_0xf0890(0x118)])&&_0x443ca4[_0xf0890(0x118)][_0xf0890(0x104)](_0x19bb0d=>typeof _0x19bb0d===_0xf0890(0x114)&&_0x19bb0d[_0xf0890(0x117)](_0xf0890(0x110)))&&_0x58bca2[_0xf0890(0xfa)](_0x411ba8);}for(const _0x2b3609 of _0x58bca2){delete _0x44538d['mcpServers'][_0x2b3609];}return _0x58bca2[_0xf0890(0x11f)]>0x0&&writeFileSync(_0x3c813d[_0xf0890(0x115)][_0xf0890(0xf1)],JSON[_0xf0890(0xff)](_0x44538d,null,0x2)+'\x0a',_0xf0890(0xdb)),{'step':0x4,'label':_0xf0890(0x113),'ok':!![],'detail':'removed\x20'+_0x58bca2['join'](',\x20')+'\x20from\x20'+_0x3c813d[_0xf0890(0x115)]['path']};}return{'step':0x4,'label':_0xf0890(0x113),'ok':!![],'detail':_0xf0890(0x136)};}catch(_0x4f0e00){return{'step':0x4,'label':_0xf0890(0x113),'ok':![],'detail':_0x4f0e00[_0xf0890(0xca)]};}}function execSkillsRemove(_0x1ebdb7,_0x15985b){const _0x229186=a169_0x3ad34d,_0x669871=runNpxSkillsRemove(_0x1ebdb7,{'stdio':'inherit','yes':_0x15985b});return{'step':0x5,'label':_0x229186(0x127),'ok':_0x669871['ok'],'detail':_0x669871['ok']?'lovrabet/lovrabet-skill\x20removed':_0x669871[_0x229186(0x11d)]??_0x229186(0xeb)+_0x669871['status']};}function execSkillsAdd(_0x5c8649,_0x4dcc56){const _0x3b494c=a169_0x3ad34d,_0x36b37d=runNpxSkillsAddGlobal(_0x5c8649,_0x3b494c(0xfd),{'stdio':_0x3b494c(0x103),'yes':_0x4dcc56});return{'step':0x6,'label':_0x3b494c(0x12a),'ok':_0x36b37d['ok'],'detail':_0x36b37d['ok']?_0x3b494c(0x12b):_0x36b37d[_0x3b494c(0x11d)]??'exit\x20'+_0x36b37d[_0x3b494c(0xfe)]};}function execUpgradeSdk(_0x1df9e9){const _0x504d9c=a169_0x3ad34d;if(!_0x1df9e9[_0x504d9c(0xde)])return{'step':0x7,'label':_0x504d9c(0xbc),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x246ca9,currentVersion:_0x5ca9d8,field:_0x6f9929}=_0x1df9e9['sdkUpgrade'];try{const _0x21361f=readFileSync(_0x246ca9,_0x504d9c(0xdb)),_0x44c052=JSON[_0x504d9c(0x137)](_0x21361f);return _0x44c052[_0x6f9929][_0x504d9c(0x122)]=_0x504d9c(0x131),writeFileSync(_0x246ca9,JSON[_0x504d9c(0xff)](_0x44c052,null,0x2)+'\x0a',_0x504d9c(0xdb)),{'step':0x7,'label':_0x504d9c(0xbc),'ok':!![],'detail':_0x6f9929+_0x504d9c(0x106)+_0x5ca9d8+_0x504d9c(0xcf)};}catch(_0x389e01){return{'step':0x7,'label':_0x504d9c(0xbc),'ok':![],'detail':_0x389e01[_0x504d9c(0xca)]};}}function tryStat(_0x2c4751){try{return statSync(_0x2c4751);}catch{return undefined;}}function printSummary(_0x157631){const _0x539a99=a169_0x3ad34d;console[_0x539a99(0xe7)](''),console[_0x539a99(0xe7)](a169_0x5ea9a7[_0x539a99(0xf0)]('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x291b69 of _0x157631){const _0x4e2989=_0x291b69['ok']?a169_0x5ea9a7[_0x539a99(0xd6)]('OK'):a169_0x5ea9a7['red'](_0x539a99(0xd5));console[_0x539a99(0xe7)]('\x20\x20'+_0x4e2989+_0x539a99(0xc0)+_0x291b69[_0x539a99(0xe1)]+':\x20'+_0x291b69[_0x539a99(0xec)]);if(_0x291b69['detail'])console[_0x539a99(0xe7)](_0x539a99(0xdd)+a169_0x5ea9a7['gray'](_0x291b69[_0x539a99(0x12d)]));}console[_0x539a99(0xe7)]('');}function a169_0x311a(){const _0x23e722=['hasNewConfig','cyan','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','37130BBpyFe','files','start','Step\x201/7:\x20Migrating\x20config...','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','@lovrabet/dataset-mcp-server','605955MmnDiH','yellow','Clean\x20MCP\x20config','string','oldMcpConfig','Remove\x20.lovrabet/','includes','args','fail','devDependencies','object','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','error','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','length','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','oldPath','@lovrabet/sdk','\x20\x20bun\x20install','Proceed\x20with\x20upgrade?','\x20\x20Current\x20version\x20in\x20','filter','Remove\x20old\x20skill','\x20\x20Action:\x20delete','14fGSvxC','Install\x20new\x20skill','lovrabet/rabetbase\x20installed\x20globally','keys','detail','entries','684980cBuQWX','no\x20legacy\x20config\x20found','latest','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','@lovrabet/sdk:','\x20\x20New\x20config\x20(.rabetbase.json):\x20','failed','no\x20matching\x20entry\x20found','parse','.cursor/rules/lovrabet_rules.mdc','FOUND','32288gdiSLZ','\x20(backup:\x20','Upgrade\x20@lovrabet/sdk','white','needsSkillSwap','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20Step\x20','skipped\x20(no\x20legacy\x20config)','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','gray','not\x20found\x20(will\x20create)','7724860UYpdkj','.bak','Step\x205/7:\x20Removing\x20old\x20skill...','skipped','message','40UvQbJY','.claude/skills/lovrabet','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Skill\x20swap:','\x20→\x20latest','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','mcpServers','643oHEuyn','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','FAIL','green','MCP\x20config:','done','join','\x20removed\x20(','utf8','\x20\x20#\x20or','\x20\x20\x20\x20\x20\x20\x20','sdkUpgrade','already\x20exists\x20(will\x20merge)','Upgrade\x20completed\x20successfully!','step','info','needed','not\x20found\x20or\x20already\x20at\x20latest','no\x20legacy\x20entry','dependencies','log','Remove\x20legacy\x20artifacts','fields','\x20→\x20','exit\x20','label','542NjWYuV','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','none\x20found','bold','path','succeed','Config\x20file:','Step\x201/7:\x20Config\x20migration\x20—\x20','oldArtifacts','Legacy\x20artifacts:','200862vtjqcR','Step\x206/7:\x20Installing\x20new\x20skill...','.lovrabet','push','Config\x20migration','192WCHYoJ','lovrabet/rabetbase','status','stringify','.cursor/mcp.json','\x20\x20npm\x20install','Upgrade\x20cancelled.','inherit','some','yes','[\x22@lovrabet/sdk\x22]:\x20'];a169_0x311a=function(){return _0x23e722;};return a169_0x311a();}export async function upgradeApp(_0x3f189f,_0x694ec0){const _0x59258e=a169_0x3ad34d,_0x346d58=process['cwd'](),_0x302414=analyse(_0x346d58),_0x306650=!_0x302414['configMigration']&&_0x302414[_0x59258e(0xf5)]['length']===0x0&&!_0x302414[_0x59258e(0x115)]&&!_0x302414[_0x59258e(0xbe)]&&!_0x302414[_0x59258e(0xde)];if(_0x306650){console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0xd6)](_0x59258e(0x120)));return;}printReport(_0x302414);const _0x46ac43=!!(_0x694ec0[_0x59258e(0x105)]||_0x694ec0['Y']||_0x3f189f);if(!_0x46ac43)try{const _0x124725=await askConfirm(_0x59258e(0x124));if(!_0x124725){console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0xc4)](_0x59258e(0x102)));return;}}catch(_0x440630){if(_0x440630?.[_0x59258e(0xca)]==='CANCEL'){console['log'](a169_0x5ea9a7[_0x59258e(0xc4)](_0x59258e(0x102)));return;}throw _0x440630;}const _0x1197f0=[],_0x1b154f=a169_0x5f128a({'text':_0x59258e(0x10d),'color':_0x59258e(0x108)})['start'](),_0xfe1f08=execConfigMigration(_0x302414,_0x346d58);_0x1197f0[_0x59258e(0xfa)](_0xfe1f08),_0x1b154f[_0xfe1f08['ok']?_0x59258e(0xf2):_0x59258e(0x119)](_0x59258e(0xf4)+(_0xfe1f08[_0x59258e(0x12d)]??(_0xfe1f08['ok']?_0x59258e(0xd8):_0x59258e(0x135))));const _0x4441a8=resolve(_0x346d58,_0x59258e(0xf9)),_0x4e1b29=a169_0x5f128a({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':'cyan'})[_0x59258e(0x10c)]();if(existsSync(_0x4441a8))try{rmSync(_0x4441a8,{'recursive':!![],'force':!![]}),_0x4e1b29[_0x59258e(0xf2)](_0x59258e(0xc3)),_0x1197f0[_0x59258e(0xfa)]({'step':0x2,'label':_0x59258e(0x116),'ok':!![]});}catch(_0x17fc96){_0x4e1b29[_0x59258e(0x119)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x17fc96['message']),_0x1197f0[_0x59258e(0xfa)]({'step':0x2,'label':_0x59258e(0x116),'ok':![],'detail':_0x17fc96[_0x59258e(0xca)]});}else _0x4e1b29[_0x59258e(0xe2)](_0x59258e(0xc2)),_0x1197f0[_0x59258e(0xfa)]({'step':0x2,'label':_0x59258e(0x116),'ok':!![],'detail':_0x59258e(0xc9)});const _0x20bb81=a169_0x5f128a({'text':_0x59258e(0x11e),'color':_0x59258e(0x108)})[_0x59258e(0x10c)](),_0x281de8=execRemoveOldArtifacts(_0x302414[_0x59258e(0xf5)]);_0x1197f0[_0x59258e(0xfa)](_0x281de8),_0x20bb81[_0x281de8['ok']?_0x59258e(0xf2):_0x59258e(0x119)](_0x59258e(0xd4)+(_0x281de8[_0x59258e(0x12d)]??(_0x281de8['ok']?'done':_0x59258e(0x135))));const _0x10c5d8=a169_0x5f128a({'text':_0x59258e(0x10f),'color':_0x59258e(0x108)})[_0x59258e(0x10c)](),_0x6aad80=execCleanMcp(_0x302414);_0x1197f0[_0x59258e(0xfa)](_0x6aad80),_0x10c5d8[_0x6aad80['ok']?_0x59258e(0xf2):'fail']('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x6aad80[_0x59258e(0x12d)]??(_0x6aad80['ok']?_0x59258e(0xd8):_0x59258e(0x135))));const _0x1c6fc8=a169_0x5f128a({'text':_0x59258e(0xc8),'color':_0x59258e(0x108)})[_0x59258e(0x10c)](),_0x3cf296=execSkillsRemove(_0x346d58,_0x46ac43);_0x1197f0[_0x59258e(0xfa)](_0x3cf296),_0x1c6fc8[_0x3cf296['ok']?_0x59258e(0xf2):_0x59258e(0x119)](_0x59258e(0xcd)+(_0x3cf296['detail']??(_0x3cf296['ok']?'done':_0x59258e(0x135))));const _0x1a3ea0=a169_0x5f128a({'text':_0x59258e(0xf8),'color':_0x59258e(0x108)})['start'](),_0x108ae9=execSkillsAdd(_0x346d58,_0x46ac43);_0x1197f0['push'](_0x108ae9),_0x1a3ea0[_0x108ae9['ok']?'succeed':'fail'](_0x59258e(0x10e)+(_0x108ae9['detail']??(_0x108ae9['ok']?'done':'failed')));const _0x3ef299=a169_0x5f128a({'text':_0x59258e(0xd1),'color':_0x59258e(0x108)})[_0x59258e(0x10c)](),_0x327c38=execUpgradeSdk(_0x302414);_0x1197f0[_0x59258e(0xfa)](_0x327c38),_0x3ef299[_0x327c38['ok']?_0x59258e(0xf2):_0x59258e(0x119)](_0x59258e(0xee)+(_0x327c38[_0x59258e(0x12d)]??(_0x327c38['ok']?_0x59258e(0xd8):_0x59258e(0x135)))),printSummary(_0x1197f0);const _0x4950ba=_0x1197f0[_0x59258e(0x104)](_0x4f2aa8=>!_0x4f2aa8['ok']);_0x4950ba?console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0x112)](_0x59258e(0x109))):console[_0x59258e(0xe7)](a169_0x5ea9a7['green'](_0x59258e(0xe0))),_0x327c38['ok']&&_0x302414[_0x59258e(0xde)]&&(console[_0x59258e(0xe7)](''),console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0xf0)]['cyan'](_0x59258e(0x11c))),console[_0x59258e(0xe7)](a169_0x5ea9a7[_0x59258e(0x108)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x59258e(0xe7)](''),console['log'](a169_0x5ea9a7['white'](_0x59258e(0x101))),console['log'](a169_0x5ea9a7[_0x59258e(0xbd)](_0x59258e(0xdc))),console[_0x59258e(0xe7)](a169_0x5ea9a7['white'](_0x59258e(0x123))),console[_0x59258e(0xe7)](''));}
@@ -1 +1 @@
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
+ const a170_0x976ef7=a170_0x31b4;(function(_0x56ab8f,_0x500488){const _0x3249bd=a170_0x31b4,_0x3bd9d5=_0x56ab8f();while(!![]){try{const _0xaa257b=-parseInt(_0x3249bd(0x1dd))/0x1*(-parseInt(_0x3249bd(0x21a))/0x2)+-parseInt(_0x3249bd(0x216))/0x3*(parseInt(_0x3249bd(0x204))/0x4)+-parseInt(_0x3249bd(0x205))/0x5+-parseInt(_0x3249bd(0x1ea))/0x6+-parseInt(_0x3249bd(0x1cf))/0x7+-parseInt(_0x3249bd(0x1cb))/0x8+-parseInt(_0x3249bd(0x211))/0x9*(-parseInt(_0x3249bd(0x1cd))/0xa);if(_0xaa257b===_0x500488)break;else _0x3bd9d5['push'](_0x3bd9d5['shift']());}catch(_0x1bf4b7){_0x3bd9d5['push'](_0x3bd9d5['shift']());}}}(a170_0x25d5,0x3623b));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';function a170_0x31b4(_0x2cce38,_0x29334b){_0x2cce38=_0x2cce38-0x1c1;const _0x25d503=a170_0x25d5();let _0x31b42f=_0x25d503[_0x2cce38];return _0x31b42f;}import{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';function a170_0x25d5(){const _0x27b5a5=['210268gDSmqB','1964325VcUTAN','menu:update','filter','Notification\x20Configuration','project:init','create','rabetbase\x20kb\x20delete','OCR','wildcardDef','values','knowledge-base:delete','App\x20Management','18NYDdfx','service','Self\x20Update','description','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','24wzwKso','app:use','rabetbase\x20auth\x20logout','read','9274JolkBe','write','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','skills:install','Tenant\x20Members','knowledge-base:list','Code\x20Generation','Async\x20Tasks','knowledge-base:create','`\x20instead.','SQL\x20Queries','build','app:remove','2521840axdSIi','rabetbase\x20run\x20preview','9469920dRmhRT','Dataset\x20&\x20Operations','2488367SUuLQj','commands','rabetbase\x20workspace\x20use\x20--app\x20<name>','sql:save','\x20\x20[write]','rabetbase\x20run\x20start','rabetbase\x20kb\x20update','login','Schema','skill:install','CLI\x20Built-in\x20Skill','\x20\x20[high-risk-write]','rabetbase\x20bff\x20create','rabetbase\x20run\x20build','29JRcLzj','rabetbase\x20kb\x20list','File','command','set','length','start','skill:','Company\x20Knowledge\x20Base','isSingleCommand','Menu','knowledge-base:detail','Diagnostics','1935540KQskUF','Authentication','install','`\x20has\x20been\x20removed.','rabetbase\x20sql\x20create','rabetbase\x20cli-skill\x20install','Runtime\x20App\x20Config\x20Management','Platform\x20Issue','Roles','Logs','Configuration','Quick\x20Start','app:remote','rabetbase\x20app\x20list\x20--remote','from','app:add','run','skills:','BFF\x20Scripts','rabetbase\x20workspace\x20remove\x20<name>','risk','show','get','map','<script>','Instant\x20API'];a170_0x25d5=function(){return _0x27b5a5;};return a170_0x25d5();}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(_0x248138){const _0x3b3359=a170_0x31b4;for(const _0x24c24c of _0x248138){definitions['set'](_0x24c24c[_0x3b3359(0x212)]+':'+_0x24c24c[_0x3b3359(0x1e0)],_0x24c24c);let _0x336b4b=serviceGroups[_0x3b3359(0x200)](_0x24c24c[_0x3b3359(0x212)]);!_0x336b4b&&(_0x336b4b=[],serviceGroups['set'](_0x24c24c[_0x3b3359(0x212)],_0x336b4b)),_0x336b4b['push'](_0x24c24c);}}function registerDeclarativeService(_0x469009,_0x1ea2af,_0x2b0509){const _0x285b2a=a170_0x31b4;registerDefinitions(_0x1ea2af);_0x2b0509?.['wildcardDef']&&registerDefinitions([_0x2b0509[_0x285b2a(0x20d)]]);const _0x5092f3=_0x2c968a=>_0x2c968a===_0x285b2a(0x219)?'':_0x2c968a===_0x285b2a(0x21b)?_0x285b2a(0x1d3):_0x285b2a(0x1da),_0x50fab4={'service':_0x1ea2af[0x0][_0x285b2a(0x212)],'label':_0x469009,'commands':_0x1ea2af[_0x285b2a(0x207)](_0x578aae=>!_0x578aae['hidden'])[_0x285b2a(0x201)](_0x4b92aa=>({'command':_0x4b92aa[_0x285b2a(0x1e0)],'description':_0x4b92aa[_0x285b2a(0x214)],'tag':_0x5092f3(_0x4b92aa[_0x285b2a(0x1fe)])})),'declarative':!![],'defaultCommand':_0x2b0509?.['defaultCommand']??(_0x2b0509?.['isSingleCommand']?_0x1ea2af[0x0]['command']:undefined),'wildcardDef':_0x2b0509?.[_0x285b2a(0x20d)],'isSingleCommand':_0x2b0509?.[_0x285b2a(0x1e6)]};serviceRegistry['push'](_0x50fab4),serviceByName[_0x285b2a(0x1e1)](_0x50fab4[_0x285b2a(0x212)],_0x50fab4);}registerDeclarativeService(a170_0x976ef7(0x1f5),initDefinitions,{'defaultCommand':a170_0x976ef7(0x1fa),'isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a170_0x976ef7(0x210),appDefinitions),registerDeclarativeService(a170_0x976ef7(0x1eb),authDefinitions,{'defaultCommand':a170_0x976ef7(0x1d6)}),registerDeclarativeService(a170_0x976ef7(0x1c2),tenantDefinitions),registerDeclarativeService(a170_0x976ef7(0x1ce),datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages',pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a170_0x976ef7(0x203),dataDefinitions),registerDeclarativeService(a170_0x976ef7(0x1fc),bffDefinitions),registerDeclarativeService(a170_0x976ef7(0x208),notificationDefinitions),registerDeclarativeService(a170_0x976ef7(0x1c8),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a170_0x976ef7(0x1e7),menuDefinitions),registerDeclarativeService(a170_0x976ef7(0x1c5),taskDefinitions),registerDeclarativeService(a170_0x976ef7(0x1f2),roleDefinitions),registerDeclarativeService('Permissions',permitDefinitions),registerDeclarativeService(a170_0x976ef7(0x1f0),appConfigDefinitions),registerDeclarativeService(a170_0x976ef7(0x1e5),kbDefinitions),registerDeclarativeService(a170_0x976ef7(0x1f1),issueDefinitions),registerDeclarativeService(a170_0x976ef7(0x1df),fileDefinitions),registerDeclarativeService(a170_0x976ef7(0x20c),ocrDefinitions),registerDeclarativeService(a170_0x976ef7(0x1c4),codegenDefinitions),registerDeclarativeService(a170_0x976ef7(0x1f4),configDefinitions),registerDeclarativeService(a170_0x976ef7(0x1e9),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a170_0x976ef7(0x1d7),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a170_0x976ef7(0x213),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a170_0x976ef7(0x1d9),cliSkillDefinitions,{'defaultCommand':a170_0x976ef7(0x1ec)}),registerDeclarativeService(a170_0x976ef7(0x1f3),logsDefinitions,{'defaultCommand':a170_0x976ef7(0x1ff)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a170_0x976ef7(0x1e2)]-0x1];last[a170_0x976ef7(0x1d0)]=[{'command':a170_0x976ef7(0x202),'description':'Run\x20any\x20package.json\x20script','tag':''}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a170_0x976ef7(0x1d2),a170_0x976ef7(0x21c)],['bff:new',a170_0x976ef7(0x1db)],['sql:new',a170_0x976ef7(0x1ee)],[a170_0x976ef7(0x206),'rabetbase\x20menu\x20asset-update'],[a170_0x976ef7(0x209),a170_0x976ef7(0x215)],[a170_0x976ef7(0x1e4),'rabetbase\x20cli-skill\x20install'],[a170_0x976ef7(0x1d8),a170_0x976ef7(0x1ef)],[a170_0x976ef7(0x1fb),a170_0x976ef7(0x1ef)],[a170_0x976ef7(0x1c1),'rabetbase\x20cli-skill\x20install'],[a170_0x976ef7(0x1f6),a170_0x976ef7(0x1f7)],[a170_0x976ef7(0x217),a170_0x976ef7(0x1d1)],[a170_0x976ef7(0x1f9),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a170_0x976ef7(0x1ca),a170_0x976ef7(0x1fd)],[a170_0x976ef7(0x1c3),a170_0x976ef7(0x1de)],[a170_0x976ef7(0x1e8),'rabetbase\x20kb\x20detail'],[a170_0x976ef7(0x1c6),'rabetbase\x20kb\x20create'],['knowledge-base:update',a170_0x976ef7(0x1d5)],[a170_0x976ef7(0x20f),a170_0x976ef7(0x20b)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a170_0x976ef7(0x20a),'rabetbase\x20project\x20create\x20<project-name>'],[a170_0x976ef7(0x1e3),a170_0x976ef7(0x1d4)],[a170_0x976ef7(0x1c9),a170_0x976ef7(0x1dc)],['preview',a170_0x976ef7(0x1cc)],['logout',a170_0x976ef7(0x218)]]);export function resolveRemovedCommand(_0x3a695d,_0x4293a8){const _0x4c6e23=a170_0x976ef7;if(!_0x3a695d)return undefined;const _0x4f9c54=REMOVED_COMMAND_REPLACEMENTS[_0x4c6e23(0x200)](_0x3a695d+':'+(_0x4293a8??'')),_0x3bfb9a=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x4c6e23(0x200)](_0x3a695d),_0x14aee3=_0x4f9c54??_0x3bfb9a;if(!_0x14aee3)return undefined;const _0x501066=_0x3bfb9a?_0x3a695d:_0x4293a8?_0x3a695d+'\x20'+_0x4293a8:_0x3a695d;return{'command':_0x501066,'message':'`rabetbase\x20'+_0x501066+_0x4c6e23(0x1ed),'hint':'Use\x20`'+_0x14aee3+_0x4c6e23(0x1c7)};}export function findDefinition(_0xefc823,_0x203f7f){const _0x3c1f91=a170_0x976ef7;return definitions[_0x3c1f91(0x200)](_0xefc823+':'+_0x203f7f);}export function isKnownService(_0x851069){return serviceByName['has'](_0x851069);}export function isDeclarativeService(_0x1fd569){const _0x344464=a170_0x976ef7;return serviceGroups['has'](_0x1fd569)||serviceByName[_0x344464(0x200)](_0x1fd569)?.[_0x344464(0x20d)]!==undefined;}export function getServiceEntry(_0x56215e){const _0x116811=a170_0x976ef7;return serviceByName[_0x116811(0x200)](_0x56215e);}export function getLegacyHandler(_0x228408,_0x22212c){return undefined;}export function getAllDefinitions(){const _0x31bd85=a170_0x976ef7;return Array[_0x31bd85(0x1f8)](definitions[_0x31bd85(0x20e)]());}
@@ -1 +1 @@
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
+ const a171_0x2a08c8=a171_0x4d4b;(function(_0x15affb,_0x28e34b){const _0x286871=a171_0x4d4b,_0x5a5b47=_0x15affb();while(!![]){try{const _0x1d75e6=-parseInt(_0x286871(0x91))/0x1+-parseInt(_0x286871(0x93))/0x2+-parseInt(_0x286871(0x9a))/0x3+parseInt(_0x286871(0x8f))/0x4*(-parseInt(_0x286871(0x98))/0x5)+-parseInt(_0x286871(0x97))/0x6*(-parseInt(_0x286871(0x8d))/0x7)+parseInt(_0x286871(0x9e))/0x8*(-parseInt(_0x286871(0x9d))/0x9)+-parseInt(_0x286871(0x99))/0xa*(-parseInt(_0x286871(0x94))/0xb);if(_0x1d75e6===_0x28e34b)break;else _0x5a5b47['push'](_0x5a5b47['shift']());}catch(_0x5cb27e){_0x5a5b47['push'](_0x5a5b47['shift']());}}}(a171_0x1a5b,0x57d2c));import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a171_0x1a5b(){const _0x383df3=['Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','360764jnpheV','55ITyHbX','flagMissing','appCode','3108318FwCHzM','955LbjSMo','3361970QcMRrz','1818831TUpGkM','name','remark','138456rzSjGk','304ZGBCWK','roleName','POST','validation','length','create','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','trim','7XGljps','str','232yrVJUk','Created\x20role\x20','456985BWgcKW'];a171_0x1a5b=function(){return _0x383df3;};return a171_0x1a5b();}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';function a171_0x4d4b(_0x2e0e3f,_0x47dd90){_0x2e0e3f=_0x2e0e3f-0x86;const _0x1a5b50=a171_0x1a5b();let _0x4d4ba8=_0x1a5b50[_0x2e0e3f];return _0x4d4ba8;}const CREATE_PATH='/smartapi/permit/role/create';function readName(_0x4f6370){const _0x1ddd03=a171_0x4d4b,_0x195d50=_0x4f6370[_0x1ddd03(0x8e)](_0x1ddd03(0x9b))['trim']();if(!_0x195d50)throw CliErrors[_0x1ddd03(0x95)]('name','Pass\x20--name\x20<roleName>.');if(_0x195d50[_0x1ddd03(0x89)]>0x40)throw CliErrors[_0x1ddd03(0x88)](_0x1ddd03(0x8b));return _0x195d50;}export const roleCreate={'service':'role','command':a171_0x2a08c8(0x8a),'description':a171_0x2a08c8(0x92),'risk':'write','flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5d532c){readName(_0x5d532c);},async 'dryRun'(_0x131cfd){const _0x37d530=a171_0x2a08c8,_0x55fe2f=readName(_0x131cfd),_0xba9b28=_0x131cfd[_0x37d530(0x8e)](_0x37d530(0x9c))[_0x37d530(0x8c)]()||undefined;return asDryRunResult({'operation':'create','selector':{'appCode':_0x131cfd[_0x37d530(0x96)],'roleName':_0x55fe2f},'before':null,'after':{'roleName':_0x55fe2f,'roleType':'CUSTOM','remark':_0xba9b28},'dryRun':!![],'backend':{'method':_0x37d530(0x87),'path':CREATE_PATH},'warnings':[]},{'method':_0x37d530(0x87),'url':CREATE_PATH});},async 'execute'(_0x27d161){const _0x381dd4=a171_0x2a08c8,_0x20fdb5=readName(_0x27d161),_0x20bbae=_0x27d161['str'](_0x381dd4(0x9c))[_0x381dd4(0x8c)]()||undefined,_0x25892f=await createAppRole({'appCode':_0x27d161[_0x381dd4(0x96)],'roleName':_0x20fdb5,..._0x20bbae?{'remark':_0x20bbae}:{}});return{'ok':!![],'data':{'operation':_0x381dd4(0x8a),'selector':{'appCode':_0x27d161[_0x381dd4(0x96)],'roleId':_0x25892f['id'],'roleName':_0x20fdb5},'before':null,'after':projectRole(_0x25892f),'dryRun':![],'backend':{'method':_0x381dd4(0x87),'path':CREATE_PATH},'warnings':[]},'message':_0x381dd4(0x90)+_0x25892f[_0x381dd4(0x86)]+'\x20(id='+_0x25892f['id']+')'};}};
@@ -1 +1 @@
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
+ const a172_0x43eda7=a172_0x32f5;(function(_0x42494c,_0x1205e9){const _0x55a9fc=a172_0x32f5,_0x8d058=_0x42494c();while(!![]){try{const _0x2b2e28=-parseInt(_0x55a9fc(0x113))/0x1+-parseInt(_0x55a9fc(0xff))/0x2*(parseInt(_0x55a9fc(0x114))/0x3)+parseInt(_0x55a9fc(0x107))/0x4+-parseInt(_0x55a9fc(0x101))/0x5*(parseInt(_0x55a9fc(0x103))/0x6)+parseInt(_0x55a9fc(0x10e))/0x7+-parseInt(_0x55a9fc(0x108))/0x8+parseInt(_0x55a9fc(0x10b))/0x9;if(_0x2b2e28===_0x1205e9)break;else _0x8d058['push'](_0x8d058['shift']());}catch(_0x1274db){_0x8d058['push'](_0x8d058['shift']());}}}(a172_0x5345,0xc7d87));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a172_0x32f5(_0x34421b,_0x6f555){_0x34421b=_0x34421b-0xff;const _0x5345a4=a172_0x5345();let _0x32f575=_0x5345a4[_0x34421b];return _0x32f575;}function a172_0x5345(){const _0x204594=['\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','/smartapi/permit/role/delete','24452802TdswIB','Deleted\x20role\x20','num','7931770KrMFLh','role','roleName','\x20(id=','userCount','512411LuFYzg','112224oWrsEj','40uhrjqj','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','10RuZaKX','Role\x20still\x20has\x20','4601328lsyNoR','delete','POST','appCode','3708192UxiPPh','9313776MDWIxV'];a172_0x5345=function(){return _0x204594;};return a172_0x5345();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a172_0x43eda7(0x10a);export const roleDelete={'service':a172_0x43eda7(0x10f),'command':a172_0x43eda7(0x104),'description':a172_0x43eda7(0x100),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x153f1a){const _0x5aaa6f=a172_0x43eda7,_0x3c871f=_0x153f1a[_0x5aaa6f(0x10d)]('id'),_0x275789=await getRoleById(_0x153f1a['appCode'],_0x3c871f);return assertCustomRole(_0x275789,'delete'),asDryRunResult({'operation':_0x5aaa6f(0x104),'selector':{'appCode':_0x153f1a[_0x5aaa6f(0x106)],'roleId':_0x3c871f,'roleName':_0x275789[_0x5aaa6f(0x110)]},'before':projectRole(_0x275789),'after':null,'dryRun':!![],'backend':{'method':_0x5aaa6f(0x105),'path':DELETE_PATH},'warnings':_0x275789['userCount']>0x0?[_0x5aaa6f(0x102)+_0x275789[_0x5aaa6f(0x112)]+_0x5aaa6f(0x109)]:[]},{'method':_0x5aaa6f(0x105),'url':DELETE_PATH});},async 'execute'(_0x4a8629){const _0x15676b=a172_0x43eda7,_0x142202=_0x4a8629[_0x15676b(0x10d)]('id'),_0x563139=await getRoleById(_0x4a8629['appCode'],_0x142202);return assertCustomRole(_0x563139,'delete'),await deleteAppRole(_0x142202),{'ok':!![],'data':{'operation':_0x15676b(0x104),'selector':{'appCode':_0x4a8629[_0x15676b(0x106)],'roleId':_0x142202,'roleName':_0x563139['roleName']},'before':projectRole(_0x563139),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x15676b(0x10c)+_0x563139[_0x15676b(0x110)]+_0x15676b(0x111)+_0x142202+')'};}};
@@ -1 +1 @@
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
+ const a173_0x57e9b5=a173_0x35d2;(function(_0x1b0132,_0x8422c2){const _0x215d86=a173_0x35d2,_0x1ff8c1=_0x1b0132();while(!![]){try{const _0x46c1c9=parseInt(_0x215d86(0x150))/0x1*(-parseInt(_0x215d86(0x158))/0x2)+parseInt(_0x215d86(0x157))/0x3*(-parseInt(_0x215d86(0x152))/0x4)+parseInt(_0x215d86(0x155))/0x5*(parseInt(_0x215d86(0x151))/0x6)+parseInt(_0x215d86(0x153))/0x7+-parseInt(_0x215d86(0x14b))/0x8*(-parseInt(_0x215d86(0x14d))/0x9)+-parseInt(_0x215d86(0x15a))/0xa*(parseInt(_0x215d86(0x14e))/0xb)+-parseInt(_0x215d86(0x154))/0xc*(-parseInt(_0x215d86(0x156))/0xd);if(_0x46c1c9===_0x8422c2)break;else _0x1ff8c1['push'](_0x1ff8c1['shift']());}catch(_0x467eca){_0x1ff8c1['push'](_0x1ff8c1['shift']());}}}(a173_0x283f,0xf3dd2));function a173_0x35d2(_0x582d43,_0x51850e){_0x582d43=_0x582d43-0x14a;const _0x283fbe=a173_0x283f();let _0x35d23d=_0x283fbe[_0x582d43];return _0x35d23d;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a173_0x283f(){const _0x5eae1f=['768460rpYEqd','60lBWoaK','20RCQrue','5859529ABVXWx','3UXPDRG','2pDAScc','roleType','84010GLlvRe','Show\x20a\x20single\x20role\x27s\x20detail','8JQwSVI','roleName','12187386pDTPsq','1914wJJvys','role','1531078wIuJUr','1863942kpalFq','3874036ozwsWt'];a173_0x283f=function(){return _0x5eae1f;};return a173_0x283f();}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a173_0x57e9b5(0x14f),'command':'detail','description':a173_0x57e9b5(0x14a),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1a80ca){const _0x548a9a=a173_0x57e9b5,_0x45b8ab=_0x1a80ca['num']('id'),_0x3ebf06=await getRoleById(_0x1a80ca['appCode'],_0x45b8ab);return{'ok':!![],'data':{'role':projectRole(_0x3ebf06)},'message':'Role\x20'+_0x3ebf06[_0x548a9a(0x14c)]+'\x20('+_0x3ebf06[_0x548a9a(0x159)]+')'};}};
@@ -1 +1 @@
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
+ function a174_0x4829(){const _0x2bd90d=['39KBWENy','729952FbQWFu','21764urNzhU','9uZySus','832210oiDSHF','10396UHVijY','35UKJlET','1948765MMFwZA','1332294FaxORq','39513arLStl','55CWNZGk'];a174_0x4829=function(){return _0x2bd90d;};return a174_0x4829();}(function(_0x374654,_0x3f1fcc){const _0x27aa95=a174_0xe0e9,_0x1f4a4f=_0x374654();while(!![]){try{const _0x2442c1=parseInt(_0x27aa95(0x1bf))/0x1+parseInt(_0x27aa95(0x1c3))/0x2*(parseInt(_0x27aa95(0x1c1))/0x3)+-parseInt(_0x27aa95(0x1c6))/0x4*(-parseInt(_0x27aa95(0x1bc))/0x5)+parseInt(_0x27aa95(0x1be))/0x6+parseInt(_0x27aa95(0x1bd))/0x7+parseInt(_0x27aa95(0x1c2))/0x8*(-parseInt(_0x27aa95(0x1c4))/0x9)+-parseInt(_0x27aa95(0x1c5))/0xa*(parseInt(_0x27aa95(0x1c0))/0xb);if(_0x2442c1===_0x3f1fcc)break;else _0x1f4a4f['push'](_0x1f4a4f['shift']());}catch(_0xf51779){_0x1f4a4f['push'](_0x1f4a4f['shift']());}}}(a174_0x4829,0x2ef0b));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 a174_0xe0e9(_0x25699c,_0x1481bb){_0x25699c=_0x25699c-0x1bc;const _0x482984=a174_0x4829();let _0xe0e986=_0x482984[_0x25699c];return _0xe0e986;}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 +1 @@
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
+ const a175_0x1edd84=a175_0xab32;(function(_0x500d82,_0x4b6fbd){const _0xeb1bde=a175_0xab32,_0x42d0d9=_0x500d82();while(!![]){try{const _0xc2b1bb=parseInt(_0xeb1bde(0xd9))/0x1*(-parseInt(_0xeb1bde(0xc7))/0x2)+-parseInt(_0xeb1bde(0xcc))/0x3*(parseInt(_0xeb1bde(0xe5))/0x4)+-parseInt(_0xeb1bde(0xcd))/0x5*(parseInt(_0xeb1bde(0xdf))/0x6)+parseInt(_0xeb1bde(0xe2))/0x7+-parseInt(_0xeb1bde(0xcb))/0x8*(parseInt(_0xeb1bde(0xc5))/0x9)+-parseInt(_0xeb1bde(0xcf))/0xa+parseInt(_0xeb1bde(0xda))/0xb;if(_0xc2b1bb===_0x4b6fbd)break;else _0x42d0d9['push'](_0x42d0d9['shift']());}catch(_0x197a97){_0x42d0d9['push'](_0x42d0d9['shift']());}}}(a175_0x1a69,0x68742));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a175_0x1a69(){const _0x59da15=['num','read','validation','2033032YwodBR','530259PkSVbY','2900nRAdeY','roleType','4917000ewnQmq','Invalid\x20--type\x20\x22','trim','includes','number','Found\x20','CUSTOM','DEV','type','str','3toRYFl','28357857LZPcFg','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','appCode','map','toUpperCase','6702ivljTI','Page\x20index\x20(1-based)','pagesize','5278966dzMrsU','Filter\x20by\x20role\x20type','role','16wKvCJg','length','\x20role(s)','page','string','18kMQCfa','Use\x20one\x20of:\x20','366302Hgieqw'];a175_0x1a69=function(){return _0x59da15;};return a175_0x1a69();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a175_0xab32(_0x124768,_0x2da06c){_0x124768=_0x124768-0xc2;const _0x1a69df=a175_0x1a69();let _0xab323=_0x1a69df[_0x124768];return _0xab323;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN',a175_0x1edd84(0xd6),'USER',a175_0x1edd84(0xd5)];export const roleList={'service':a175_0x1edd84(0xe4),'command':'list','description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':a175_0x1edd84(0xc9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a175_0x1edd84(0xd7),'type':a175_0x1edd84(0xc4),'required':![],'description':a175_0x1edd84(0xe3),'enum':ROLE_TYPES},{'name':a175_0x1edd84(0xc3),'type':'number','description':a175_0x1edd84(0xe0),'default':0x1},{'name':a175_0x1edd84(0xe1),'type':a175_0x1edd84(0xd3),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x9f2127){const _0x592200=a175_0x1edd84,_0x4aabb2=_0x9f2127[_0x592200(0xd8)]('type')[_0x592200(0xd1)]();if(_0x4aabb2&&!ROLE_TYPES[_0x592200(0xd2)](_0x4aabb2['toUpperCase']()))throw CliErrors[_0x592200(0xca)](_0x592200(0xd0)+_0x4aabb2+'\x22.',_0x592200(0xc6)+ROLE_TYPES['join'](',\x20')+'.');const _0x2f7b47=_0x9f2127['num'](_0x592200(0xc3),0x1),_0x5a48e6=_0x9f2127[_0x592200(0xc8)]('pagesize',0x64);if(_0x2f7b47<0x1)throw CliErrors[_0x592200(0xca)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x5a48e6<0x1||_0x5a48e6>0x64)throw CliErrors[_0x592200(0xca)](_0x592200(0xdb));},async 'execute'(_0x1ead74){const _0x244c22=a175_0x1edd84,_0x4d08e8=_0x1ead74[_0x244c22(0xc8)]('page',0x1)||0x1,_0x5b8869=_0x1ead74[_0x244c22(0xc8)](_0x244c22(0xe1),0x64)||0x64,_0x560294=_0x1ead74[_0x244c22(0xd8)](_0x244c22(0xd7))[_0x244c22(0xd1)]()[_0x244c22(0xde)](),{items:_0x4b8486,paging:_0x2701d3}=await listAppRoles(_0x1ead74[_0x244c22(0xdc)],{'currentPage':_0x4d08e8,'pageSize':_0x5b8869}),_0x577793=_0x560294?_0x4b8486['filter'](_0x10fb28=>_0x10fb28[_0x244c22(0xce)]===_0x560294):_0x4b8486,_0x3d8068=_0x577793[_0x244c22(0xdd)](projectRole);return{'ok':!![],'data':{'roles':_0x3d8068,'paging':_0x2701d3},'message':_0x244c22(0xd4)+_0x3d8068[_0x244c22(0xe6)]+_0x244c22(0xc2)};}};
@@ -1 +1 @@
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
+ const a176_0x28f530=a176_0xbb3d;(function(_0x1e6096,_0x10cb0b){const _0x501083=a176_0xbb3d,_0x4a7bfd=_0x1e6096();while(!![]){try{const _0x16b8ea=-parseInt(_0x501083(0xcb))/0x1+parseInt(_0x501083(0xa4))/0x2+-parseInt(_0x501083(0xaa))/0x3+parseInt(_0x501083(0xc0))/0x4+parseInt(_0x501083(0xa6))/0x5*(-parseInt(_0x501083(0xa2))/0x6)+parseInt(_0x501083(0xb7))/0x7*(-parseInt(_0x501083(0xb9))/0x8)+-parseInt(_0x501083(0x87))/0x9*(parseInt(_0x501083(0xc1))/0xa);if(_0x16b8ea===_0x10cb0b)break;else _0x4a7bfd['push'](_0x4a7bfd['shift']());}catch(_0x5e47f9){_0x4a7bfd['push'](_0x4a7bfd['shift']());}}}(a176_0x3910,0x41f2d));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':a176_0x28f530(0xba),'required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};function a176_0x3910(){const _0x4f9423=['push','tenant_code','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','authRequired','roleName','userCount','POST','\x20is\x20already\x20a\x20member\x20of\x20role\x20','Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20','154aZgJbw','expect-user-count','96792fudyDW','number','userId','filter','Missing\x20user\x20reference.','CUSTOM','/smartapi/permit/user-role/update-user-list','2104488QLZFzG','110300rUPAnh','name','tenant','totalCount','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','dryRun','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','user-add','Disambiguate\x20with\x20--role\x20<id>.','Anti-drift\x20check\x20failed:\x20expected\x20','13763ZehOfC','user','appCode','\x22:\x20','str','splice','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','map','DEV','Cannot\x20','toLowerCase','Optional\x20role\x20remark/description','Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)','string','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.','Disambiguate\x20with\x20--user\x20<id>.','Pass\x20--role\x20<id|name>.','No\x20tenant\x20member\x20matches\x20\x22','135tbPxwM','includes','trim','Role\x20name\x20\x22','remark','test','userList','role','permitCount','\x22\x20is\x20ambiguous\x20(ids:\x20','\x20member(s)\x20but\x20role\x20has\x20','\x20not\x20found\x20in\x20app\x20','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs',';\x20no\x20change.','Role\x20id\x20','\x22\x20not\x20found\x20in\x20app\x20','\x20is\x20not\x20a\x20member\x20of\x20role\x20','\x20built-in\x20role\x20','expectUserCount','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.','nickname','validation','length','flagMissing','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','\x20not\x20found\x20in\x20the\x20user-role\x20list.','username','8334WaYgkB','roleType','876802UNtiLY','Role\x20name','715OqFLKm','join','User\x20','ADMIN','151140SgzEbq','find','Multiple\x20tenant\x20members\x20match\x20\x22'];a176_0x3910=function(){return _0x4f9423;};return a176_0x3910();}export const ROLE_REF_FLAG={'name':a176_0x28f530(0x8e),'type':a176_0x28f530(0xd8),'required':!![],'description':a176_0x28f530(0xd7)};export const USER_REF_FLAG={'name':a176_0x28f530(0xcc),'type':a176_0x28f530(0xd8),'required':!![],'description':a176_0x28f530(0xaf)};export const NAME_FLAG={'name':a176_0x28f530(0xc2),'type':'string','required':!![],'description':a176_0x28f530(0xa5)};export const USER_NAME_FLAG={'name':'name','type':a176_0x28f530(0xd8),'required':!![],'description':a176_0x28f530(0x9f)};export const REMARK_FLAG={'name':a176_0x28f530(0x8b),'type':a176_0x28f530(0xd8),'required':![],'description':a176_0x28f530(0xd6)};export const EXPECT_USER_COUNT_FLAG={'name':a176_0x28f530(0xb8),'type':'number','required':![],'description':a176_0x28f530(0x93)};export const BUILTIN_ROLE_TYPES=['ADMIN',a176_0x28f530(0xd3),'USER'];export function isBuiltinRole(_0x448c1b){const _0x2a0199=a176_0x28f530;return BUILTIN_ROLE_TYPES[_0x2a0199(0x88)](_0x448c1b);}export function assertCustomRole(_0x5c7e82,_0x44dbe3){const _0x9eada6=a176_0x28f530;if(_0x5c7e82[_0x9eada6(0xa3)]!==_0x9eada6(0xbe))throw CliErrors[_0x9eada6(0x9c)](_0x9eada6(0xd4)+_0x44dbe3+_0x9eada6(0x98)+_0x5c7e82[_0x9eada6(0xb2)]+'\x20('+_0x5c7e82['roleType']+').',_0x9eada6(0xc7));}export function assertPermConfigurable(_0x5cfa9f){const _0x3961e5=a176_0x28f530;if(_0x5cfa9f['roleType']===_0x3961e5(0xd3)||_0x5cfa9f[_0x3961e5(0xa3)]===_0x3961e5(0xa9))throw CliErrors[_0x3961e5(0x9c)](_0x3961e5(0xb6)+_0x5cfa9f[_0x3961e5(0xb2)]+'\x20('+_0x5cfa9f[_0x3961e5(0xa3)]+').',_0x3961e5(0xd9));}export function projectRole(_0x44d7ad){const _0x1b93f8=a176_0x28f530;return{'id':_0x44d7ad['id'],'roleName':_0x44d7ad['roleName'],'roleType':_0x44d7ad[_0x1b93f8(0xa3)],'remark':_0x44d7ad[_0x1b93f8(0x8b)],'userCount':_0x44d7ad[_0x1b93f8(0xb3)],'permitCount':_0x44d7ad[_0x1b93f8(0x8f)],'builtin':isBuiltinRole(_0x44d7ad[_0x1b93f8(0xa3)])};}export async function resolveRoleRef(_0x11f145,_0x2fa639){const _0x393d16=a176_0x28f530,_0x1995e9=_0x2fa639[_0x393d16(0x89)]();if(!_0x1995e9)throw CliErrors[_0x393d16(0x9c)]('Missing\x20role\x20reference.',_0x393d16(0xdb));if(/^\d+$/[_0x393d16(0x8c)](_0x1995e9))return getRoleById(_0x11f145,Number(_0x1995e9));const _0x20f6b3=await listAllAppRoles(_0x11f145),_0x2d7bbc=_0x20f6b3['filter'](_0x451a14=>_0x451a14[_0x393d16(0xb2)]===_0x1995e9);if(_0x2d7bbc[_0x393d16(0x9d)]===0x0)throw CliErrors[_0x393d16(0x9c)](_0x393d16(0x8a)+_0x1995e9+_0x393d16(0x96)+_0x11f145+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.');if(_0x2d7bbc['length']>0x1){const _0x53f96d=_0x2d7bbc[_0x393d16(0xd2)](_0x3e92ce=>_0x3e92ce['id'])[_0x393d16(0xa7)](',\x20');throw CliErrors[_0x393d16(0x9c)]('Role\x20name\x20\x22'+_0x1995e9+_0x393d16(0x90)+_0x53f96d+').',_0x393d16(0xc9));}return _0x2d7bbc[0x0];}export async function getRoleById(_0x335c0c,_0x2dbc4c){const _0x22992d=a176_0x28f530,_0x84f0a8=await getAppRole(_0x2dbc4c);if(!_0x84f0a8)throw CliErrors[_0x22992d(0x9c)](_0x22992d(0x95)+_0x2dbc4c+_0x22992d(0x92)+_0x335c0c+'.',_0x22992d(0xb0));return _0x84f0a8;}async function listAllAppRoles(_0x4b90c2){const _0x59f748=a176_0x28f530,_0x150820=0x64,_0x3c04fa=[];for(let _0x478b54=0x1;;_0x478b54+=0x1){const {items:_0x5b508c,paging:_0x26e43f}=await listAppRoles(_0x4b90c2,{'currentPage':_0x478b54,'pageSize':_0x150820});_0x3c04fa[_0x59f748(0xad)](..._0x5b508c);if(_0x5b508c[_0x59f748(0x9d)]<_0x150820||_0x26e43f&&_0x3c04fa[_0x59f748(0x9d)]>=_0x26e43f[_0x59f748(0xc4)])return _0x3c04fa;}}export async function resolveTenantCode(){const _0x583dde=a176_0x28f530,_0x12aaa5=await getSessionUserInfo(),_0x589fe3=_0x12aaa5?.[_0x583dde(0xcc)]?.[_0x583dde(0xc3)]?.[_0x583dde(0xae)];if(!_0x589fe3)throw CliErrors[_0x583dde(0xb1)](_0x583dde(0xd1));return _0x589fe3;}function matchMember(_0x1e3da8,_0x2200bf){const _0x216cfd=a176_0x28f530,_0x1f4f05=_0x2200bf[_0x216cfd(0x89)]()[_0x216cfd(0xd5)]();return(_0x1e3da8['nickname']??'')[_0x216cfd(0xd5)]()===_0x1f4f05||(_0x1e3da8[_0x216cfd(0xa1)]??'')[_0x216cfd(0xd5)]()===_0x1f4f05;}export async function resolveUserRef(_0x39b57c){const _0x3393bc=a176_0x28f530,_0x2159e4=_0x39b57c[_0x3393bc(0x89)]();if(!_0x2159e4)throw CliErrors[_0x3393bc(0x9c)](_0x3393bc(0xbd),'Pass\x20--user\x20<id|name>.');const _0x1ff08e=await resolveTenantCode(),_0x428d80=await getTenantMembers(_0x1ff08e);if(/^\d+$/[_0x3393bc(0x8c)](_0x2159e4)){const _0x126b26=Number(_0x2159e4),_0x179be1=_0x428d80['find'](_0x4a1f8e=>_0x4a1f8e['userId']===_0x126b26);return{'userId':_0x126b26,'username':_0x179be1?.['username']??String(_0x126b26),'nickname':_0x179be1?.[_0x3393bc(0x9b)],'matchedBy':'id'};}const _0x36fd20=_0x428d80[_0x3393bc(0xbc)](_0x366318=>matchMember(_0x366318,_0x2159e4));if(_0x36fd20[_0x3393bc(0x9d)]===0x0)throw CliErrors[_0x3393bc(0x9c)](_0x3393bc(0x86)+_0x2159e4+'\x22.',_0x3393bc(0x9a));if(_0x36fd20[_0x3393bc(0x9d)]>0x1){const _0x32d261=_0x36fd20[_0x3393bc(0xd2)](_0x33a722=>(_0x33a722[_0x3393bc(0x9b)]??_0x33a722[_0x3393bc(0xa1)]??'?')+'('+_0x33a722['userId']+')')['join'](',\x20');throw CliErrors[_0x3393bc(0x9c)](_0x3393bc(0xac)+_0x2159e4+_0x3393bc(0xce)+_0x32d261+'.',_0x3393bc(0xda));}const _0x459a75=_0x36fd20[0x0];return{'userId':_0x459a75[_0x3393bc(0xbb)],'username':_0x459a75[_0x3393bc(0xa1)]??String(_0x459a75['userId']),'nickname':_0x459a75[_0x3393bc(0x9b)],'matchedBy':'name'};}export const UPDATE_USER_LIST_PATH=a176_0x28f530(0xbf);function userIdsOf(_0x3a70e3){const _0x2c25b7=a176_0x28f530;return(_0x3a70e3?.['userList']??[])[_0x2c25b7(0xd2)](_0x4ff66c=>_0x4ff66c[_0x2c25b7(0xbb)]);}export function computeRoleUserMutation(_0x34340a){const _0x48a93c=a176_0x28f530,{operation:_0x3f1570,appCode:_0x205b21,roleUsers:_0x9e9521,targetRoleId:_0xf98ac8,user:_0x367a33}=_0x34340a,_0x2e9c3f=_0x9e9521[_0x48a93c(0xab)](_0x1d10d4=>_0x1d10d4['id']===_0xf98ac8);if(!_0x2e9c3f)throw CliErrors['validation'](_0x48a93c(0x95)+_0xf98ac8+_0x48a93c(0xa0),_0x48a93c(0xb0));const _0x4a3a9f=userIdsOf(_0x2e9c3f),_0x36050a=[];if(_0x34340a[_0x48a93c(0x99)]!==undefined&&_0x34340a[_0x48a93c(0x99)]!==_0x4a3a9f['length'])throw CliErrors[_0x48a93c(0x9c)](_0x48a93c(0xca)+_0x34340a[_0x48a93c(0x99)]+_0x48a93c(0x91)+_0x4a3a9f[_0x48a93c(0x9d)]+'.',_0x48a93c(0xc5));const _0x1314a8=_0x4a3a9f[_0x48a93c(0x88)](_0x367a33[_0x48a93c(0xbb)]);let _0x1de91a=![];const _0x214c51=[..._0x2e9c3f[_0x48a93c(0x8d)]];if(_0x3f1570===_0x48a93c(0xc8))_0x1314a8?_0x36050a[_0x48a93c(0xad)](_0x48a93c(0xa8)+_0x367a33[_0x48a93c(0xbb)]+_0x48a93c(0xb5)+_0x2e9c3f[_0x48a93c(0xb2)]+_0x48a93c(0x94)):(_0x214c51[_0x48a93c(0xad)]({'userId':_0x367a33['userId'],'username':_0x367a33[_0x48a93c(0xa1)],..._0x367a33[_0x48a93c(0x9b)]?{'nickname':_0x367a33['nickname']}:{}}),_0x1de91a=!![]);else{if(!_0x1314a8)_0x36050a[_0x48a93c(0xad)](_0x48a93c(0xa8)+_0x367a33['userId']+_0x48a93c(0x97)+_0x2e9c3f[_0x48a93c(0xb2)]+_0x48a93c(0x94));else{const _0x36fb19=_0x214c51['findIndex'](_0x5c240b=>_0x5c240b[_0x48a93c(0xbb)]===_0x367a33['userId']);if(_0x36fb19>=0x0)_0x214c51[_0x48a93c(0xd0)](_0x36fb19,0x1);_0x1de91a=!![];}}const _0x574e91=_0x9e9521[_0x48a93c(0xd2)](_0x474882=>_0x474882['id']===_0xf98ac8?{..._0x474882,'userList':_0x214c51}:_0x474882),_0x590281=_0x214c51[_0x48a93c(0xd2)](_0xcf32af=>_0xcf32af[_0x48a93c(0xbb)]),_0x540c6b={'operation':_0x3f1570,'selector':{'appCode':_0x205b21,'roleId':_0xf98ac8,'roleName':_0x2e9c3f[_0x48a93c(0xb2)],'userId':_0x367a33[_0x48a93c(0xbb)]},'before':{'userIds':_0x4a3a9f},'after':{'userIds':_0x590281},'dryRun':_0x34340a[_0x48a93c(0xc6)],'backend':{'method':_0x48a93c(0xb4),'path':UPDATE_USER_LIST_PATH},'warnings':_0x36050a};return{'roleList':_0x574e91,'mutation':_0x540c6b,'changed':_0x1de91a};}export async function loadRoleUsers(_0x409df3){return listRoleUsers(_0x409df3);}function a176_0xbb3d(_0x5da565,_0x39ef96){_0x5da565=_0x5da565-0x86;const _0x391069=a176_0x3910();let _0xbb3dc8=_0x391069[_0x5da565];return _0xbb3dc8;}export function readRoleRef(_0xa202b7){const _0x490fa2=a176_0x28f530,_0x357096=_0xa202b7[_0x490fa2(0xcf)](_0x490fa2(0x8e))[_0x490fa2(0x89)]();if(!_0x357096)throw CliErrors[_0x490fa2(0x9e)](_0x490fa2(0x8e),_0x490fa2(0xdb));return _0x357096;}export async function prepareUserMutation(_0x150124,_0x26d96b,_0x59d488){const _0x423173=a176_0x28f530,_0x30f5a4=readRoleRef(_0x150124),_0x292b9e=_0x150124[_0x423173(0xcf)]('user')[_0x423173(0x89)]();if(!_0x292b9e)throw CliErrors[_0x423173(0x9e)](_0x423173(0xcc),'Pass\x20--user\x20<id|name>.');const _0x55a13b=_0x150124['flag']('expect-user-count'),_0x4bea67=_0x55a13b===undefined||_0x55a13b===null?undefined:Number(_0x55a13b),_0x565e0d=await resolveRoleRef(_0x150124[_0x423173(0xcd)],_0x30f5a4),_0x2b944f=await resolveUserRef(_0x292b9e),_0x271aea=await loadRoleUsers(_0x150124['appCode']);return computeRoleUserMutation({'operation':_0x26d96b,'appCode':_0x150124[_0x423173(0xcd)],'roleUsers':_0x271aea,'targetRoleId':_0x565e0d['id'],'user':{'userId':_0x2b944f[_0x423173(0xbb)],'username':_0x2b944f['username'],'nickname':_0x2b944f[_0x423173(0x9b)]},'dryRun':_0x59d488,..._0x4bea67!==undefined?{'expectUserCount':_0x4bea67}:{}});}