@lovrabet/rabetbase-cli 2.3.16-beta.2 → 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 (287) hide show
  1. package/README.md +1 -1
  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 -1
  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 -1
  198. package/lib/commands/tenant/members-list.js +1 -1
  199. package/lib/commands/tenant/shared.js +1 -1
  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 +1 -1
  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/project/init.js +0 -1
  287. package/lib/commands/sql/save.js +0 -1
@@ -1 +1 @@
1
- (function(_0x504621,_0x4f3e69){const _0x59914b=a154_0x41a3,_0x332cbd=_0x504621();while(!![]){try{const _0x4b6deb=-parseInt(_0x59914b(0xa9))/0x1*(parseInt(_0x59914b(0xcb))/0x2)+-parseInt(_0x59914b(0xb0))/0x3*(-parseInt(_0x59914b(0xcd))/0x4)+parseInt(_0x59914b(0xc8))/0x5+parseInt(_0x59914b(0xe1))/0x6*(parseInt(_0x59914b(0xa6))/0x7)+parseInt(_0x59914b(0xc4))/0x8+-parseInt(_0x59914b(0xbf))/0x9+parseInt(_0x59914b(0xb6))/0xa*(-parseInt(_0x59914b(0xe5))/0xb);if(_0x4b6deb===_0x4f3e69)break;else _0x332cbd['push'](_0x332cbd['shift']());}catch(_0x4c4c4f){_0x332cbd['push'](_0x332cbd['shift']());}}}(a154_0xd14c,0x9d810));import a154_0x146989 from'path';import a154_0x506a51 from'fs';import a154_0x18d149 from'chalk';import a154_0x2b0851 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';function a154_0x41a3(_0x5a2752,_0x311745){_0x5a2752=_0x5a2752-0x85;const _0xd14c68=a154_0xd14c();let _0x41a3a8=_0xd14c68[_0x5a2752];return _0x41a3a8;}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x2f952e){const _0x180390=a154_0x41a3,_0xd034ac=await checkCliVersion();(_0xd034ac[_0x180390(0xaf)]||_0xd034ac[_0x180390(0xe3)])&&(printCliUpgradeWarning(_0xd034ac),assertCliVersionSupported(_0xd034ac),logger[_0x180390(0xbe)]('create',_0x180390(0xcf),{'currentVersion':_0xd034ac[_0x180390(0xa5)],'stableVersion':_0xd034ac['stableVersion'],'minimumVersion':_0xd034ac[_0x180390(0xc5)],'needsUpgrade':_0xd034ac[_0x180390(0xaf)],'belowMinimum':_0xd034ac[_0x180390(0xe3)]}));if(_0x2f952e[_0x180390(0xb7)]&&_0x2f952e['appCode'])await runCreate({'projectName':_0x2f952e[_0x180390(0xb7)],'appCode':_0x2f952e[_0x180390(0xa8)],'env':_0x2f952e[_0x180390(0xb4)]},_0x2f952e);else{if(_0x2f952e[_0x180390(0xb7)]){const _0x100bcb=await selectSingleAppcode(_0x2f952e[_0x180390(0x98)]);await runCreate({'projectName':_0x2f952e[_0x180390(0xb7)],'appCode':_0x100bcb||undefined,'env':_0x2f952e[_0x180390(0xb4)]},_0x2f952e);}else await guidedCreateProject(_0x56c384=>runCreate(_0x56c384,_0x2f952e),_0x2f952e[_0x180390(0xb4)],_0x2f952e[_0x180390(0x98)]);}}function a154_0xd14c(){const _0x25c0ba=['\x20already\x20exists','Project\x20name\x20cannot\x20be\x20empty','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','√\x20package.json\x20updated:\x20name=','production','modelCount','\x20&&\x20','√\x20Pulled\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','fail','\x20|\x20AppCode:\x20','constants','Project\x20name:\x20','length','existsSync','\x20√\x20','defaultApp','cookie','1.0.0','Install\x20dependencies','success','\x20api\x20pull','accessSync','🚀\x20Next\x20Steps:','setLogPath','join','API\x20configuration\x20pulled:\x20','W_OK','\x20config\x20set\x20appcode\x20<app-code>\x27','API\x20配置拉取异常','currentVersion','2037973PcuGvX','配置应用AppCode:\x20','appCode','1xSgHEB','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','message','chdir','readFileSync','Format\x20code','needsUpgrade','555498vRrSBE','writeFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','keys','env','name','190700YKcMCK','projectCode','Project\x20directory\x20','配置应用AppCode失败','项目创建完成:\x20','gray','\x20Generated\x20by\x20rabetbase\x20cli\x20','toLocaleString','info','11578851QUhOHT','...','projectName','cd\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','8890328szNDoo','minimumVersion','package.json','utf8','1548070IiDTAK','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','cwd','50426HPuTXT','start','16WIwHHp','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','CLI\x20版本检查','log','error','\x20|\x20Default:\x20','create','version','warn','*\x20Configuring\x20AppCode\x20for\x20project\x20','dirname','repeat','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','resolve','*\x20Pulling\x20API\x20configuration...','cyan','\x20model(s)','bold','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Copy\x20project\x20files','6AbnIoj','parse','belowMinimum','\x20run\x20start','286OIEyEO','green','stop'];a154_0xd14c=function(){return _0x25c0ba;};return a154_0xd14c();}async function runCreate(_0x5ccf87,_0x10cf26){const _0x4dcf6a=a154_0x41a3;if(!_0x5ccf87[_0x4dcf6a(0xc1)]||_0x5ccf87[_0x4dcf6a(0xc1)]['trim']()==='')throw new Error(_0x4dcf6a(0x88));const _0x30e36f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x30e36f['test'](_0x5ccf87[_0x4dcf6a(0xc1)]))throw new Error(_0x4dcf6a(0xc9));if(_0x5ccf87[_0x4dcf6a(0xc1)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x5e478a=a154_0x146989[_0x4dcf6a(0xda)](process[_0x4dcf6a(0xca)](),_0x5ccf87[_0x4dcf6a(0xc1)]);if(a154_0x506a51['existsSync'](_0x5e478a))throw new Error(_0x4dcf6a(0xb8)+_0x5ccf87[_0x4dcf6a(0xc1)]+_0x4dcf6a(0x87));try{a154_0x506a51[_0x4dcf6a(0x9d)](a154_0x146989[_0x4dcf6a(0xd7)](_0x5e478a),a154_0x506a51[_0x4dcf6a(0x92)][_0x4dcf6a(0xa2)]);}catch{throw new Error(_0x4dcf6a(0xce));}logger[_0x4dcf6a(0x9f)](_0x5e478a),logger[_0x4dcf6a(0xbe)](_0x4dcf6a(0xd3),'开始创建项目:\x20'+_0x5ccf87[_0x4dcf6a(0xc1)],{'projectDir':_0x5e478a,'appCode':_0x5ccf87[_0x4dcf6a(0xa8)]}),console['log'](),console['log'](a154_0x18d149[_0x4dcf6a(0x85)](_0x4dcf6a(0x96))+_0x4dcf6a(0x93)+a154_0x18d149[_0x4dcf6a(0x85)](_0x5ccf87[_0x4dcf6a(0xc1)])+(_0x5ccf87['appCode']?_0x4dcf6a(0x91)+a154_0x18d149[_0x4dcf6a(0xdc)](_0x5ccf87[_0x4dcf6a(0xa8)]):''));try{await runTask(_0x4dcf6a(0xe0),()=>copyProjectTemplate(_0x5ccf87[_0x4dcf6a(0xc1)])),await updatePackageJsonName(_0x5ccf87[_0x4dcf6a(0xc1)]),await runTask(_0x4dcf6a(0x9a),()=>installDependencies(_0x5ccf87[_0x4dcf6a(0xc1)])),await runTask(_0x4dcf6a(0xae),()=>formatProjectCode(_0x5ccf87['projectName'])),await configureAppCode(_0x5ccf87[_0x4dcf6a(0xc1)],_0x5ccf87[_0x4dcf6a(0xa8)]||'',_0x5ccf87[_0x4dcf6a(0xb4)]);let _0x3a22fe=![];if(_0x5ccf87[_0x4dcf6a(0xa8)]){console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xdb));const _0x5c5cf4=process[_0x4dcf6a(0xca)]();try{process[_0x4dcf6a(0xac)](_0x5e478a);const _0xdd068c=_0x5ccf87[_0x4dcf6a(0xb4)]||_0x4dcf6a(0x8b);initEnv(_0xdd068c);const {configArray:_0x35becd}=await fetchModelList(_0x5ccf87[_0x4dcf6a(0xa8)],_0x10cf26[_0x4dcf6a(0x98)]||''),_0x48ddc5=DEFAULT_API_DIR,_0x7e9915=await generateApiFile(_0x35becd,'',_0x5ccf87[_0x4dcf6a(0xa8)],!![],_0xdd068c,_0x48ddc5);console[_0x4dcf6a(0xd0)](_0x4dcf6a(0x8e)+_0x35becd[_0x4dcf6a(0x94)]+'\x20dataset(s),\x20generated\x20'+_0x7e9915[_0x4dcf6a(0x8c)]+_0x4dcf6a(0xdd)),logger[_0x4dcf6a(0xbe)](_0x4dcf6a(0xd3),_0x4dcf6a(0xa1)+_0x5ccf87[_0x4dcf6a(0xa8)]);}catch(_0xad3697){_0x3a22fe=!![],console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xaa)),logger['warn'](_0x4dcf6a(0xd3),_0x4dcf6a(0xa4),{'error':_0xad3697 instanceof Error?_0xad3697[_0x4dcf6a(0xab)]:String(_0xad3697)});}finally{process[_0x4dcf6a(0xac)](_0x5c5cf4);}}logger[_0x4dcf6a(0x9b)](_0x4dcf6a(0xd3),_0x4dcf6a(0xba)+_0x5ccf87[_0x4dcf6a(0xc1)]),console[_0x4dcf6a(0xd0)](),console['log'](a154_0x18d149[_0x4dcf6a(0x85)]('─'[_0x4dcf6a(0xd8)](0x3c))),console['log'](a154_0x18d149[_0x4dcf6a(0xdc)][_0x4dcf6a(0xde)](_0x4dcf6a(0x9e))),console[_0x4dcf6a(0xd0)](),console[_0x4dcf6a(0xd0)]('\x20\x201.\x20Start\x20project:\x20'+a154_0x18d149[_0x4dcf6a(0xdc)][_0x4dcf6a(0xde)](_0x4dcf6a(0xc2)+_0x5ccf87[_0x4dcf6a(0xc1)]+_0x4dcf6a(0x8d)+CLI_BIN_NAME+_0x4dcf6a(0xe4))),_0x3a22fe&&console[_0x4dcf6a(0xd0)](_0x4dcf6a(0x8f)+a154_0x18d149[_0x4dcf6a(0xdc)]['bold'](CLI_BIN_NAME+_0x4dcf6a(0x9c))),console['log'](a154_0x18d149['green']('─'[_0x4dcf6a(0xd8)](0x3c)));}catch(_0x1a758a){logger[_0x4dcf6a(0xd1)](_0x4dcf6a(0xd3),'项目创建失败:\x20'+_0x5ccf87[_0x4dcf6a(0xc1)],{'error':_0x1a758a instanceof Error?_0x1a758a[_0x4dcf6a(0xab)]:String(_0x1a758a)});try{a154_0x506a51[_0x4dcf6a(0x95)](_0x5e478a)&&(console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xc3)+_0x5e478a),a154_0x506a51['rmSync'](_0x5e478a,{'recursive':!![],'force':!![]}));}catch{logger[_0x4dcf6a(0xd5)]('create','清理项目目录失败:\x20'+_0x5e478a);}throw _0x1a758a;}}async function runTask(_0x3bf40f,_0x40cb67){const _0x195855=a154_0x41a3,_0x477845=a154_0x2b0851(_0x3bf40f+_0x195855(0xc0))[_0x195855(0xcc)]();try{const _0x333db8=await _0x40cb67();_0x477845[_0x195855(0x86)](),console[_0x195855(0xd0)](''+a154_0x18d149['green'](_0x195855(0x96))+_0x3bf40f+'\x20'+a154_0x18d149[_0x195855(0xbb)]('['+_0x333db8+']'));}catch(_0x52ef50){_0x477845[_0x195855(0x90)](_0x3bf40f);throw _0x52ef50;}}async function updatePackageJsonName(_0x1f0038){const _0x194d84=a154_0x41a3,_0x444593=a154_0x146989[_0x194d84(0xda)](process[_0x194d84(0xca)](),_0x1f0038),_0x58154f=a154_0x146989[_0x194d84(0xa0)](_0x444593,_0x194d84(0xc6));try{console['log'](_0x194d84(0xd9));const _0x231020=getRabetbaseCliPackageRoot(),_0x58d054=a154_0x146989[_0x194d84(0xa0)](_0x231020,_0x194d84(0xc6));let _0x11a4af=_0x194d84(0x99);try{const _0x27af8f=JSON['parse'](a154_0x506a51[_0x194d84(0xad)](_0x58d054,_0x194d84(0xc7)));_0x11a4af=_0x27af8f[_0x194d84(0xd4)]||_0x194d84(0x99);}catch{}const _0x2369b9=a154_0x506a51[_0x194d84(0xad)](_0x58154f,_0x194d84(0xc7)),_0x456ab4=JSON['parse'](_0x2369b9);_0x456ab4[_0x194d84(0xb5)]=_0x1f0038,_0x456ab4['description']=_0x1f0038+_0x194d84(0xbc)+_0x11a4af,a154_0x506a51[_0x194d84(0xb1)](_0x58154f,JSON['stringify'](_0x456ab4,null,0x2)+'\x0a',_0x194d84(0xc7)),console[_0x194d84(0xd0)](_0x194d84(0x8a)+_0x1f0038),logger[_0x194d84(0xbe)](_0x194d84(0xd3),'更新\x20package.json\x20name');}catch(_0x33ef47){logger['error']('create','更新\x20package.json\x20失败');throw _0x33ef47;}}async function configureAppCode(_0x4376fe,_0x4da28c,_0x29a0c6){const _0x43bdea=a154_0x41a3,_0x1a03c8=a154_0x146989[_0x43bdea(0xda)](process[_0x43bdea(0xca)](),_0x4376fe),_0x400a90=a154_0x146989[_0x43bdea(0xa0)](_0x1a03c8,NEW_CONFIG_NAME);try{_0x4da28c?console[_0x43bdea(0xd0)](_0x43bdea(0xd6)+_0x4376fe+':\x20'+_0x4da28c):console[_0x43bdea(0xd0)](_0x43bdea(0xb2)+_0x4376fe);const _0x445eb2=getRabetbaseCliPackageRoot(),_0x1b9541=a154_0x146989['join'](_0x445eb2,_0x43bdea(0xc6));let _0x2a8f85=_0x43bdea(0x99);try{const _0x3aa2ff=JSON[_0x43bdea(0xe2)](a154_0x506a51['readFileSync'](_0x1b9541,_0x43bdea(0xc7)));_0x2a8f85=_0x3aa2ff[_0x43bdea(0xd4)]||_0x43bdea(0x99);}catch{}const _0x3c2751=readConfig(),_0x288e86=typeof _0x3c2751[_0x43bdea(0xb4)]==='string'?_0x3c2751[_0x43bdea(0xb4)]:undefined,_0x5a38ac={};for(const _0x21e85e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3c2751[_0x21e85e]!=null)_0x5a38ac[_0x21e85e]=_0x3c2751[_0x21e85e];}const _0xe5da45=buildCanonicalProjectConfig(_0x5a38ac,{'appCodes':_0x4da28c?[_0x4da28c]:[],'env':_0x29a0c6||_0x288e86||_0x43bdea(0x8b),'metadata':{'createdAt':new Date()[_0x43bdea(0xbd)](),'version':_0x2a8f85}});writeConfigFile(_0x400a90,_0xe5da45),_0x4da28c?console['log'](_0x43bdea(0xdf)+Object[_0x43bdea(0xb3)](_0xe5da45['apps']||{})[_0x43bdea(0xa0)](',\x20')+_0x43bdea(0xd2)+_0xe5da45[_0x43bdea(0x97)]):console[_0x43bdea(0xd0)](_0x43bdea(0x89)+CLI_BIN_NAME+_0x43bdea(0xa3)),logger[_0x43bdea(0xbe)](_0x43bdea(0xd3),_0x43bdea(0xa7)+_0x4da28c);}catch(_0x413bf0){logger[_0x43bdea(0xd1)](_0x43bdea(0xd3),_0x43bdea(0xb9));}}
1
+ (function(_0x55412b,_0x2506fc){const _0x25e040=a162_0x6d33,_0x3642df=_0x55412b();while(!![]){try{const _0x4fb0a1=parseInt(_0x25e040(0x1dd))/0x1+-parseInt(_0x25e040(0x201))/0x2*(parseInt(_0x25e040(0x1bb))/0x3)+-parseInt(_0x25e040(0x1da))/0x4*(parseInt(_0x25e040(0x1f7))/0x5)+-parseInt(_0x25e040(0x1e5))/0x6*(parseInt(_0x25e040(0x1cb))/0x7)+parseInt(_0x25e040(0x1f2))/0x8+parseInt(_0x25e040(0x1f6))/0x9*(-parseInt(_0x25e040(0x1e9))/0xa)+parseInt(_0x25e040(0x1c4))/0xb;if(_0x4fb0a1===_0x2506fc)break;else _0x3642df['push'](_0x3642df['shift']());}catch(_0x45575a){_0x3642df['push'](_0x3642df['shift']());}}}(a162_0x1a8f,0xeb2be));import a162_0x2c1426 from'path';import a162_0x2c3aaa from'fs';import a162_0x25e2fd from'chalk';import a162_0x70df4a from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';function a162_0x6d33(_0x36d4df,_0x9c829d){_0x36d4df=_0x36d4df-0x1af;const _0x1a8f97=a162_0x1a8f();let _0x6d337a=_0x1a8f97[_0x36d4df];return _0x6d337a;}import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x3e3405){const _0x3c64a7=a162_0x6d33,_0x4aae32=await checkCliVersion();(_0x4aae32[_0x3c64a7(0x1d8)]||_0x4aae32[_0x3c64a7(0x1ed)])&&(printCliUpgradeWarning(_0x4aae32),assertCliVersionSupported(_0x4aae32),logger['info'](_0x3c64a7(0x1de),'CLI\x20版本检查',{'currentVersion':_0x4aae32['currentVersion'],'stableVersion':_0x4aae32[_0x3c64a7(0x1b1)],'minimumVersion':_0x4aae32['minimumVersion'],'needsUpgrade':_0x4aae32[_0x3c64a7(0x1d8)],'belowMinimum':_0x4aae32[_0x3c64a7(0x1ed)]}));if(_0x3e3405['projectCode']&&_0x3e3405[_0x3c64a7(0x1e1)])await runCreate({'projectName':_0x3e3405[_0x3c64a7(0x1ce)],'appCode':_0x3e3405['appCode'],'env':_0x3e3405[_0x3c64a7(0x1d3)]},_0x3e3405);else{if(_0x3e3405['projectCode']){const _0x31fa64=await selectSingleAppcode(_0x3e3405[_0x3c64a7(0x1fc)]);await runCreate({'projectName':_0x3e3405['projectCode'],'appCode':_0x31fa64||undefined,'env':_0x3e3405[_0x3c64a7(0x1d3)]},_0x3e3405);}else await guidedCreateProject(_0x351f3c=>runCreate(_0x351f3c,_0x3e3405),_0x3e3405[_0x3c64a7(0x1d3)],_0x3e3405['cookie']);}}async function runCreate(_0x2b3329,_0xfe3ca1){const _0x116611=a162_0x6d33;if(!_0x2b3329[_0x116611(0x1d5)]||_0x2b3329[_0x116611(0x1d5)][_0x116611(0x202)]()==='')throw new Error(_0x116611(0x1c2));const _0x2bc350=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2bc350['test'](_0x2b3329[_0x116611(0x1d5)]))throw new Error(_0x116611(0x1c9));if(_0x2b3329[_0x116611(0x1d5)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x415830=a162_0x2c1426[_0x116611(0x200)](process[_0x116611(0x1d0)](),_0x2b3329[_0x116611(0x1d5)]);if(a162_0x2c3aaa['existsSync'](_0x415830))throw new Error(_0x116611(0x1f9)+_0x2b3329['projectName']+'\x20already\x20exists');try{a162_0x2c3aaa[_0x116611(0x1e2)](a162_0x2c1426[_0x116611(0x1e6)](_0x415830),a162_0x2c3aaa['constants']['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x116611(0x1b8)](_0x415830),logger[_0x116611(0x1b7)](_0x116611(0x1de),_0x116611(0x1c7)+_0x2b3329[_0x116611(0x1d5)],{'projectDir':_0x415830,'appCode':_0x2b3329['appCode']}),console[_0x116611(0x1c3)](),console['log'](a162_0x25e2fd[_0x116611(0x1b4)](_0x116611(0x1b3))+_0x116611(0x1f3)+a162_0x25e2fd['green'](_0x2b3329[_0x116611(0x1d5)])+(_0x2b3329[_0x116611(0x1e1)]?_0x116611(0x1cd)+a162_0x25e2fd[_0x116611(0x1bf)](_0x2b3329['appCode']):''));try{await runTask(_0x116611(0x1bc),()=>copyProjectTemplate(_0x2b3329['projectName'])),await updatePackageJsonName(_0x2b3329['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x2b3329[_0x116611(0x1d5)])),await runTask('Format\x20code',()=>formatProjectCode(_0x2b3329[_0x116611(0x1d5)])),await configureAppCode(_0x2b3329[_0x116611(0x1d5)],_0x2b3329[_0x116611(0x1e1)]||'',_0x2b3329[_0x116611(0x1d3)]);let _0x374881=![];if(_0x2b3329[_0x116611(0x1e1)]){console['log'](_0x116611(0x1ff));const _0x3e1393=process[_0x116611(0x1d0)]();try{process[_0x116611(0x1c1)](_0x415830);const _0x206991=_0x2b3329[_0x116611(0x1d3)]||_0x116611(0x1ef);initEnv(_0x206991);const {configArray:_0x7f7326}=await fetchModelList(_0x2b3329[_0x116611(0x1e1)],_0xfe3ca1['cookie']||''),_0x6ba37f=DEFAULT_API_DIR,_0x3b0517=await generateApiFile(_0x7f7326,'',_0x2b3329[_0x116611(0x1e1)],!![],_0x206991,_0x6ba37f);console[_0x116611(0x1c3)]('√\x20Pulled\x20'+_0x7f7326[_0x116611(0x1fb)]+'\x20dataset(s),\x20generated\x20'+_0x3b0517[_0x116611(0x1f5)]+_0x116611(0x1d1)),logger['info']('create','API\x20configuration\x20pulled:\x20'+_0x2b3329[_0x116611(0x1e1)]);}catch(_0x2d5f37){_0x374881=!![],console[_0x116611(0x1c3)](_0x116611(0x1fe)),logger[_0x116611(0x1e4)](_0x116611(0x1de),_0x116611(0x1ca),{'error':_0x2d5f37 instanceof Error?_0x2d5f37['message']:String(_0x2d5f37)});}finally{process[_0x116611(0x1c1)](_0x3e1393);}}logger['success']('create',_0x116611(0x1eb)+_0x2b3329[_0x116611(0x1d5)]),console[_0x116611(0x1c3)](),console['log'](a162_0x25e2fd[_0x116611(0x1b4)]('─'[_0x116611(0x1e3)](0x3c))),console[_0x116611(0x1c3)](a162_0x25e2fd[_0x116611(0x1bf)][_0x116611(0x1b6)](_0x116611(0x1f8))),console['log'](),console[_0x116611(0x1c3)](_0x116611(0x1b0)+a162_0x25e2fd[_0x116611(0x1bf)][_0x116611(0x1b6)](_0x116611(0x1f0)+_0x2b3329['projectName']+_0x116611(0x1b5)+CLI_BIN_NAME+_0x116611(0x1d2))),_0x374881&&console[_0x116611(0x1c3)](_0x116611(0x1c6)+a162_0x25e2fd[_0x116611(0x1bf)][_0x116611(0x1b6)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x116611(0x1c3)](a162_0x25e2fd[_0x116611(0x1b4)]('─'[_0x116611(0x1e3)](0x3c)));}catch(_0x36a896){logger[_0x116611(0x1d6)](_0x116611(0x1de),_0x116611(0x1f1)+_0x2b3329[_0x116611(0x1d5)],{'error':_0x36a896 instanceof Error?_0x36a896[_0x116611(0x1d7)]:String(_0x36a896)});try{a162_0x2c3aaa[_0x116611(0x1b2)](_0x415830)&&(console['log'](_0x116611(0x1c0)+_0x415830),a162_0x2c3aaa['rmSync'](_0x415830,{'recursive':!![],'force':!![]}));}catch{logger[_0x116611(0x1e4)](_0x116611(0x1de),'清理项目目录失败:\x20'+_0x415830);}throw _0x36a896;}}async function runTask(_0x1bc032,_0x2036e6){const _0x3ee246=a162_0x6d33,_0x1ae4d0=a162_0x70df4a(_0x1bc032+_0x3ee246(0x1e8))[_0x3ee246(0x1e7)]();try{const _0x3bbafe=await _0x2036e6();_0x1ae4d0[_0x3ee246(0x1af)](),console[_0x3ee246(0x1c3)](''+a162_0x25e2fd[_0x3ee246(0x1b4)](_0x3ee246(0x1b3))+_0x1bc032+'\x20'+a162_0x25e2fd[_0x3ee246(0x1bd)]('['+_0x3bbafe+']'));}catch(_0x56dca1){_0x1ae4d0['fail'](_0x1bc032);throw _0x56dca1;}}function a162_0x1a8f(){const _0x2c3c12=['配置应用AppCode:\x20','modelCount','702TKWznp','240325fiIWoi','🚀\x20Next\x20Steps:','Project\x20directory\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','length','cookie','toLocaleString','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','*\x20Pulling\x20API\x20configuration...','resolve','28BGfJsT','trim','stringify','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','stop','\x20\x201.\x20Start\x20project:\x20','stableVersion','existsSync','\x20√\x20','green','\x20&&\x20','bold','info','setLogPath','readFileSync','√\x20package.json\x20updated:\x20name=','184779MpAfYZ','Copy\x20project\x20files','gray','√\x20Configuration\x20file\x20created,\x20Apps:\x20','cyan','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','chdir','Project\x20name\x20cannot\x20be\x20empty','log','54421356tDDaDB','version','\x20\x202.\x20Pull\x20API\x20configuration:\x20','开始创建项目:\x20','description','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','API\x20配置拉取异常','3046183rrqAkU','1.0.0','\x20|\x20AppCode:\x20','projectCode','name','cwd','\x20model(s)','\x20run\x20start','env','parse','projectName','error','message','needsUpgrade','package.json','40davWDC','join','keys','706811dZZiiH','create','defaultApp','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','appCode','accessSync','repeat','warn','24ZzwySj','dirname','start','...','232640LuyNGD','更新\x20package.json\x20name','项目创建完成:\x20','更新\x20package.json\x20失败','belowMinimum','utf8','production','cd\x20','项目创建失败:\x20','1658200RaeQMP','Project\x20name:\x20'];a162_0x1a8f=function(){return _0x2c3c12;};return a162_0x1a8f();}async function updatePackageJsonName(_0x9a33e1){const _0x224d4a=a162_0x6d33,_0x59816e=a162_0x2c1426['resolve'](process[_0x224d4a(0x1d0)](),_0x9a33e1),_0x17ac73=a162_0x2c1426[_0x224d4a(0x1db)](_0x59816e,_0x224d4a(0x1d9));try{console[_0x224d4a(0x1c3)](_0x224d4a(0x204));const _0x104644=getRabetbaseCliPackageRoot(),_0x26e58a=a162_0x2c1426[_0x224d4a(0x1db)](_0x104644,_0x224d4a(0x1d9));let _0xd9c5b5=_0x224d4a(0x1cc);try{const _0x2181c5=JSON['parse'](a162_0x2c3aaa[_0x224d4a(0x1b9)](_0x26e58a,_0x224d4a(0x1ee)));_0xd9c5b5=_0x2181c5[_0x224d4a(0x1c5)]||_0x224d4a(0x1cc);}catch{}const _0x17945c=a162_0x2c3aaa['readFileSync'](_0x17ac73,_0x224d4a(0x1ee)),_0x53700e=JSON[_0x224d4a(0x1d4)](_0x17945c);_0x53700e[_0x224d4a(0x1cf)]=_0x9a33e1,_0x53700e[_0x224d4a(0x1c8)]=_0x9a33e1+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0xd9c5b5,a162_0x2c3aaa['writeFileSync'](_0x17ac73,JSON[_0x224d4a(0x203)](_0x53700e,null,0x2)+'\x0a','utf8'),console[_0x224d4a(0x1c3)](_0x224d4a(0x1ba)+_0x9a33e1),logger[_0x224d4a(0x1b7)](_0x224d4a(0x1de),_0x224d4a(0x1ea));}catch(_0x50a80c){logger[_0x224d4a(0x1d6)](_0x224d4a(0x1de),_0x224d4a(0x1ec));throw _0x50a80c;}}async function configureAppCode(_0x5be3ef,_0x1693ab,_0x1060f8){const _0x52c165=a162_0x6d33,_0x5e4a31=a162_0x2c1426['resolve'](process[_0x52c165(0x1d0)](),_0x5be3ef),_0x39bd69=a162_0x2c1426['join'](_0x5e4a31,NEW_CONFIG_NAME);try{_0x1693ab?console[_0x52c165(0x1c3)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x5be3ef+':\x20'+_0x1693ab):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x5be3ef);const _0x331b5f=getRabetbaseCliPackageRoot(),_0x18bd03=a162_0x2c1426[_0x52c165(0x1db)](_0x331b5f,_0x52c165(0x1d9));let _0x37c64f=_0x52c165(0x1cc);try{const _0x126a6b=JSON['parse'](a162_0x2c3aaa[_0x52c165(0x1b9)](_0x18bd03,_0x52c165(0x1ee)));_0x37c64f=_0x126a6b['version']||_0x52c165(0x1cc);}catch{}const _0x24e871=readConfig(),_0x5fe16c=typeof _0x24e871[_0x52c165(0x1d3)]==='string'?_0x24e871['env']:undefined,_0x5d3520={};for(const _0x323ead of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x24e871[_0x323ead]!=null)_0x5d3520[_0x323ead]=_0x24e871[_0x323ead];}const _0x2c4f48=buildCanonicalProjectConfig(_0x5d3520,{'appCodes':_0x1693ab?[_0x1693ab]:[],'env':_0x1060f8||_0x5fe16c||_0x52c165(0x1ef),'metadata':{'createdAt':new Date()[_0x52c165(0x1fd)](),'version':_0x37c64f}});writeConfigFile(_0x39bd69,_0x2c4f48),_0x1693ab?console[_0x52c165(0x1c3)](_0x52c165(0x1be)+Object[_0x52c165(0x1dc)](_0x2c4f48['apps']||{})['join'](',\x20')+'\x20|\x20Default:\x20'+_0x2c4f48[_0x52c165(0x1df)]):console[_0x52c165(0x1c3)](_0x52c165(0x1e0)+CLI_BIN_NAME+_0x52c165(0x1fa)),logger[_0x52c165(0x1b7)](_0x52c165(0x1de),_0x52c165(0x1f4)+_0x1693ab);}catch(_0x2caff9){logger[_0x52c165(0x1d6)](_0x52c165(0x1de),'配置应用AppCode失败');}}
@@ -1 +1 @@
1
- (function(_0x1abac6,_0x547970){const _0xd93187=a155_0x2db8,_0x2ae7de=_0x1abac6();while(!![]){try{const _0x133fca=-parseInt(_0xd93187(0x129))/0x1*(parseInt(_0xd93187(0x126))/0x2)+-parseInt(_0xd93187(0x12d))/0x3*(parseInt(_0xd93187(0x138))/0x4)+parseInt(_0xd93187(0x141))/0x5*(parseInt(_0xd93187(0x120))/0x6)+-parseInt(_0xd93187(0x14c))/0x7+parseInt(_0xd93187(0x11e))/0x8*(parseInt(_0xd93187(0x133))/0x9)+-parseInt(_0xd93187(0x139))/0xa+parseInt(_0xd93187(0x122))/0xb;if(_0x133fca===_0x547970)break;else _0x2ae7de['push'](_0x2ae7de['shift']());}catch(_0x5001b4){_0x2ae7de['push'](_0x2ae7de['shift']());}}}(a155_0x2513,0xcf1a4));import a155_0x9a620b from'path';import a155_0x52e829 from'fs/promises';function a155_0x2db8(_0x5a05ac,_0x18e863){_0x5a05ac=_0x5a05ac-0x11a;const _0x2513d9=a155_0x2513();let _0x2db8d3=_0x2513d9[_0x5a05ac];return _0x2db8d3;}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(_0xd9bff2,_0x36d950,_0x1deba5,_0x485135){const _0x408832=a155_0x2db8,_0x5bbaa9=await checkCliVersion();(_0x5bbaa9[_0x408832(0x146)]||_0x5bbaa9['belowMinimum'])&&(printCliUpgradeWarning(_0x5bbaa9),assertCliVersionSupported(_0x5bbaa9));if(!_0xd9bff2||_0xd9bff2[_0x408832(0x14e)]()==='')throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x564c13=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x564c13['test'](_0xd9bff2))throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0xd9bff2[_0x408832(0x145)]>0x64)throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x339f42=a155_0x9a620b[_0x408832(0x14d)](process[_0x408832(0x12f)](),_0xd9bff2);if(existsSync(_0x339f42))throw CliErrors['validation'](_0x408832(0x136)+_0xd9bff2+_0x408832(0x131),'Use\x20a\x20different\x20project\x20name.');try{const _0x2cb35e=a155_0x9a620b['dirname'](_0x339f42);await a155_0x52e829[_0x408832(0x144)](_0x2cb35e,a155_0x52e829[_0x408832(0x13b)][_0x408832(0x127)]);}catch{throw CliErrors[_0x408832(0x12c)](_0x408832(0x12b),_0x408832(0x137));}try{console[_0x408832(0x12e)](_0x408832(0x11d)+_0xd9bff2+'...');const _0x9b2e08=getSubAppReactDemoTemplateDir();await copyDirectory(_0x9b2e08,_0x339f42),console['log'](_0x408832(0x130)),await updatePackageJsonName(_0xd9bff2),console[_0x408832(0x12e)](_0x408832(0x150)),console[_0x408832(0x12e)](_0x408832(0x121)),console['log'](_0x408832(0x13f)),await formatCode(_0x339f42),console['log'](_0x408832(0x11a)),await configureProject(_0xd9bff2,_0x1deba5,_0x36d950),console[_0x408832(0x12e)](_0x408832(0x149)),_0x1deba5&&await pullApiConfig(_0x339f42,_0x1deba5,_0x36d950,_0x485135),console[_0x408832(0x12e)](_0x408832(0x125)+_0xd9bff2+_0x408832(0x132)),console[_0x408832(0x12e)](_0x408832(0x124)+_0xd9bff2),console[_0x408832(0x12e)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x5e1d89){try{existsSync(_0x339f42)&&await a155_0x52e829['rm'](_0x339f42,{'recursive':!![],'force':!![]});}catch{}throw _0x5e1d89;}}async function updatePackageJsonName(_0x3c6e9e){const _0x3f30a1=a155_0x2db8,_0x202f3e=a155_0x9a620b['resolve'](process[_0x3f30a1(0x12f)](),_0x3c6e9e),_0x5819ec=a155_0x9a620b['join'](_0x202f3e,'package.json'),_0x4f1c12=await a155_0x52e829[_0x3f30a1(0x11b)](_0x5819ec,_0x3f30a1(0x148)),_0x2ef25e=JSON['parse'](_0x4f1c12);_0x2ef25e['name']=_0x3c6e9e,_0x2ef25e['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a155_0x52e829[_0x3f30a1(0x12a)](_0x5819ec,JSON[_0x3f30a1(0x11f)](_0x2ef25e,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1e8c3c=a155_0x2db8;try{return execSync(_0x1e8c3c(0x142),{'stdio':'ignore'}),_0x1e8c3c(0x14b);}catch{return _0x1e8c3c(0x13a);}}async function formatCode(_0x6fad34){try{await execAsync('bun\x20run\x20format',{'cwd':_0x6fad34});}catch{}}function a155_0x2513(){const _0x5bb8f8=['\x20\x20√\x20Pulled\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','\x20model(s)','8113260tkPSOD','bun\x20--version','\x20api\x20pull`\x20manually\x20later.','access','length','needsUpgrade','env','utf-8','\x20\x20√\x20Configuration\x20file\x20created','chdir','bun','8590918AEfPuS','resolve','trim','modelCount','\x20\x20√\x20package.json\x20updated','\x20\x20√\x20Code\x20formatted','readFile','production','*\x20Creating\x20project\x20','9235640GRnTwm','stringify','6kQvZCw','\x20\x20Installing\x20dependencies...','20120683MwgHMg','\x20\x20Pulling\x20API\x20configuration...','\x0a\x20\x20cd\x20','\x0a√\x20Project\x20','319120SMGbhk','W_OK','join','1YOEFde','writeFile','Cannot\x20create\x20project\x20in\x20current\x20directory.','validation','3226614iDGLAE','log','cwd','\x20\x20√\x20Project\x20template\x20created','\x22\x20already\x20exists.','\x20created\x20successfully!','9JAMKCf','toLocaleString','string','Project\x20directory\x20\x22','Check\x20directory\x20permissions.','4LJbXNy','12955960Yfcpxc','npm','constants','\x20dataset(s),\x20generated\x20','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'];a155_0x2513=function(){return _0x5bb8f8;};return a155_0x2513();}async function configureProject(_0x375956,_0x12274a,_0xea7650){const _0x524d5b=a155_0x2db8,_0x2277d0=a155_0x9a620b[_0x524d5b(0x14d)](process[_0x524d5b(0x12f)](),_0x375956),_0xa34faa=a155_0x9a620b[_0x524d5b(0x128)](_0x2277d0,NEW_CONFIG_NAME),_0x4b6a2c=readConfig(),_0x27b351=typeof _0x4b6a2c[_0x524d5b(0x147)]===_0x524d5b(0x135)?_0x4b6a2c[_0x524d5b(0x147)]:undefined,_0x5849eb={};for(const _0xadcefb of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4b6a2c[_0xadcefb]!=null)_0x5849eb[_0xadcefb]=_0x4b6a2c[_0xadcefb];}const _0x43ef38=buildCanonicalProjectConfig(_0x5849eb,{'appCodes':_0x12274a?[_0x12274a]:[],'env':_0xea7650||_0x27b351||_0x524d5b(0x11c),'metadata':{'createdAt':new Date()[_0x524d5b(0x134)](),'version':getCliVersion()}});writeConfigFile(_0xa34faa,_0x43ef38);}async function pullApiConfig(_0x496e98,_0x109b15,_0xca4709,_0xf25f4f){const _0x4a9b09=a155_0x2db8,_0x12f24f=process[_0x4a9b09(0x12f)]();try{process[_0x4a9b09(0x14a)](_0x496e98);const _0x2efa3a=_0xca4709||_0x4a9b09(0x11c);initEnv(_0x2efa3a),console[_0x4a9b09(0x12e)](_0x4a9b09(0x123));const {configArray:_0x52022f}=await fetchModelList(_0x109b15,_0xf25f4f||''),_0x59fd93=await generateApiFile(_0x52022f,'',_0x109b15,!![],_0x2efa3a,DEFAULT_API_DIR);console['log'](_0x4a9b09(0x13e)+_0x52022f[_0x4a9b09(0x145)]+_0x4a9b09(0x13c)+_0x59fd93[_0x4a9b09(0x14f)]+_0x4a9b09(0x140));}catch(_0x3f6735){console[_0x4a9b09(0x12e)](_0x4a9b09(0x13d)+CLI_BIN_NAME+_0x4a9b09(0x143));}finally{process['chdir'](_0x12f24f);}}
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 a156_0x4caf(){const _0x426d97=['30zPsuHh','99pLBrSZ','4685bQRLaH','1508TQyrUF','26gLoEOe','1548351kDWezM','join','43314imSXam','301EKuyzj','427068cxUVNk','projects','resolve','../../../../','6728192giSMSd','904297mYrkNN','templates','69933ZtviNg','dirname'];a156_0x4caf=function(){return _0x426d97;};return a156_0x4caf();}function a156_0x1350(_0xe991b4,_0x5e41b9){_0xe991b4=_0xe991b4-0x196;const _0x4caf19=a156_0x4caf();let _0x1350d1=_0x4caf19[_0xe991b4];return _0x1350d1;}const a156_0x2ce924=a156_0x1350;(function(_0x2c0460,_0xc55757){const _0x1ec19f=a156_0x1350,_0x2993ca=_0x2c0460();while(!![]){try{const _0x44b3bf=parseInt(_0x1ec19f(0x19d))/0x1+-parseInt(_0x1ec19f(0x1a5))/0x2*(-parseInt(_0x1ec19f(0x19f))/0x3)+-parseInt(_0x1ec19f(0x1a4))/0x4*(parseInt(_0x1ec19f(0x1a3))/0x5)+-parseInt(_0x1ec19f(0x196))/0x6*(parseInt(_0x1ec19f(0x197))/0x7)+parseInt(_0x1ec19f(0x19c))/0x8+parseInt(_0x1ec19f(0x1a6))/0x9*(-parseInt(_0x1ec19f(0x1a1))/0xa)+parseInt(_0x1ec19f(0x1a2))/0xb*(-parseInt(_0x1ec19f(0x198))/0xc);if(_0x44b3bf===_0xc55757)break;else _0x2993ca['push'](_0x2993ca['shift']());}catch(_0x743930){_0x2993ca['push'](_0x2993ca['shift']());}}}(a156_0x4caf,0x85db8));import a156_0x389629 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a156_0x389629[a156_0x2ce924(0x1a0)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0xdcae47=a156_0x2ce924;return a156_0x389629[_0xdcae47(0x19a)](__dirname,_0xdcae47(0x19b));}export function getSubAppReactDemoTemplateDir(){const _0x3c224e=a156_0x2ce924;return a156_0x389629[_0x3c224e(0x1a7)](getRabetbaseCliPackageRoot(),_0x3c224e(0x19e),_0x3c224e(0x199),'sub-app-react-demo');}
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(_0x25ab31,_0x5d1c5e){const _0x3b2c01=a157_0x6a10,_0x416765=_0x25ab31();while(!![]){try{const _0x43bd4d=parseInt(_0x3b2c01(0x137))/0x1*(-parseInt(_0x3b2c01(0x130))/0x2)+-parseInt(_0x3b2c01(0x13b))/0x3*(-parseInt(_0x3b2c01(0x138))/0x4)+-parseInt(_0x3b2c01(0x13d))/0x5*(-parseInt(_0x3b2c01(0x13a))/0x6)+parseInt(_0x3b2c01(0x13c))/0x7+parseInt(_0x3b2c01(0x135))/0x8*(-parseInt(_0x3b2c01(0x12c))/0x9)+-parseInt(_0x3b2c01(0x12b))/0xa*(parseInt(_0x3b2c01(0x133))/0xb)+parseInt(_0x3b2c01(0x139))/0xc;if(_0x43bd4d===_0x5d1c5e)break;else _0x416765['push'](_0x416765['shift']());}catch(_0x99f554){_0x416765['push'](_0x416765['shift']());}}}(a157_0x1fb1,0xab96a));import a157_0xc3aa4c from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a157_0x1fb1(){const _0x427989=['copy','info','28rKadBa','now','success','3201WhBtHN','开始复制项目模板','16312fDqNcp','resolve','84701uLQslD','28BlRIDx','25474944MvVRVE','888zAYfap','362841VFjEeQ','4525619CmFqaE','24620rcGWLT','cwd','39070CaTpWd','5823RSwUAv','项目模板复制完成'];a157_0x1fb1=function(){return _0x427989;};return a157_0x1fb1();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a157_0x6a10(_0x438af3,_0x704609){_0x438af3=_0x438af3-0x12b;const _0x1fb1b1=a157_0x1fb1();let _0x6a1077=_0x1fb1b1[_0x438af3];return _0x6a1077;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x4d1453){const _0x1a58c1=a157_0x6a10,_0x12ebe3=Date[_0x1a58c1(0x131)](),_0x259111=a157_0xc3aa4c[_0x1a58c1(0x136)](process[_0x1a58c1(0x13e)](),_0x4d1453);try{logger[_0x1a58c1(0x12f)](_0x1a58c1(0x12e),_0x1a58c1(0x134),{'projectCode':_0x4d1453,'templateDir':templateDir}),await copyDirectory(templateDir,_0x259111);const _0x139518=Date[_0x1a58c1(0x131)]()-_0x12ebe3;logger[_0x1a58c1(0x132)]('copy',_0x1a58c1(0x12d),_0x139518,{'projectCode':_0x4d1453});}catch(_0x405394){const _0x219bbb=Date[_0x1a58c1(0x131)]()-_0x12ebe3;logger['error'](_0x1a58c1(0x12e),'项目模板复制失败',{'projectCode':_0x4d1453,'error':_0x405394 instanceof Error?_0x405394['message']:String(_0x405394),'duration':_0x219bbb});throw _0x405394;}return formatElapsed(_0x12ebe3);}
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(_0x195e6f,_0x5a28dc){const _0xe56cc1=a158_0x35e4,_0x4dd502=_0x195e6f();while(!![]){try{const _0x257fa5=-parseInt(_0xe56cc1(0x148))/0x1+parseInt(_0xe56cc1(0x143))/0x2+parseInt(_0xe56cc1(0x13e))/0x3+-parseInt(_0xe56cc1(0x13c))/0x4*(-parseInt(_0xe56cc1(0x13f))/0x5)+-parseInt(_0xe56cc1(0x14a))/0x6*(-parseInt(_0xe56cc1(0x13d))/0x7)+parseInt(_0xe56cc1(0x142))/0x8*(parseInt(_0xe56cc1(0x141))/0x9)+-parseInt(_0xe56cc1(0x146))/0xa*(parseInt(_0xe56cc1(0x147))/0xb);if(_0x257fa5===_0x5a28dc)break;else _0x4dd502['push'](_0x4dd502['shift']());}catch(_0x503a7f){_0x4dd502['push'](_0x4dd502['shift']());}}}(a158_0x2a75,0xf3345));function a158_0x35e4(_0x13f348,_0x3b2a5e){_0x13f348=_0x13f348-0x138;const _0x2a7596=a158_0x2a75();let _0x35e486=_0x2a7596[_0x13f348];return _0x35e486;}import a158_0x7402b4 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a158_0x2a75(){const _0xbb736d=['567590iMuuws','693GMYePT','1247896xVhGkf','代码格式化完成','7917654NFTlci','info','--write','now','开始格式化代码','format','295148HggEdJ','7SjLkvI','4586190ycXggt','10NsjHFO','代码格式化失败','96822OaeokM','704QPTFcm','3754522ohxeEy','error','cwd'];a158_0x2a75=function(){return _0xbb736d;};return a158_0x2a75();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x8ed22a){const _0xbf5e25=a158_0x35e4,_0x3585a7=Date[_0xbf5e25(0x139)](),_0x4e277c=a158_0x7402b4['resolve'](process[_0xbf5e25(0x145)](),_0x8ed22a);try{logger[_0xbf5e25(0x14b)](_0xbf5e25(0x13b),_0xbf5e25(0x13a),{'projectCode':_0x8ed22a}),await execa(resolveNpmBin('npx'),['prettier',_0xbf5e25(0x138),'.'],{'cwd':_0x4e277c});const _0x575e11=Date[_0xbf5e25(0x139)]()-_0x3585a7;logger['success'](_0xbf5e25(0x13b),_0xbf5e25(0x149),_0x575e11,{'projectCode':_0x8ed22a});}catch(_0x3a75eb){const _0x507408=Date[_0xbf5e25(0x139)]()-_0x3585a7;logger[_0xbf5e25(0x144)](_0xbf5e25(0x13b),_0xbf5e25(0x140),{'projectCode':_0x8ed22a,'error':_0x3a75eb instanceof Error?_0x3a75eb['message']:String(_0x3a75eb),'duration':_0x507408});throw _0x3a75eb;}return formatElapsed(_0x3585a7);}
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(_0x3ae1cb,_0x69a0b8){const _0x39d5da=a159_0x49eb,_0x540e72=_0x3ae1cb();while(!![]){try{const _0x3a58cd=-parseInt(_0x39d5da(0x174))/0x1+-parseInt(_0x39d5da(0x169))/0x2*(-parseInt(_0x39d5da(0x16b))/0x3)+parseInt(_0x39d5da(0x167))/0x4+parseInt(_0x39d5da(0x16d))/0x5+parseInt(_0x39d5da(0x16e))/0x6+parseInt(_0x39d5da(0x168))/0x7+-parseInt(_0x39d5da(0x16c))/0x8;if(_0x3a58cd===_0x69a0b8)break;else _0x540e72['push'](_0x540e72['shift']());}catch(_0x191472){_0x540e72['push'](_0x540e72['shift']());}}}(a159_0x2355,0x3c97e));function a159_0x2355(){const _0x481f43=['install','61359xpjWEH','6833120kuCgCM','1016160zWTfTR','2491764NiAppe','cwd','message','now','success','--registry','158051dTRfOk','https://registry.npmmirror.com','444036uNFNWo','2570554NcMQqt','16BfsKaq'];a159_0x2355=function(){return _0x481f43;};return a159_0x2355();}function a159_0x49eb(_0xfb7f80,_0x3b5d02){_0xfb7f80=_0xfb7f80-0x166;const _0x235560=a159_0x2355();let _0x49ebbf=_0x235560[_0xfb7f80];return _0x49ebbf;}import a159_0x28f150 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 installDependencies(_0x337952){const _0x1c7c05=a159_0x49eb,_0x529016=Date['now'](),_0x43a1f3=a159_0x28f150['resolve'](process[_0x1c7c05(0x16f)](),_0x337952);try{logger['info'](_0x1c7c05(0x16a),'开始安装依赖',{'projectCode':_0x337952,'registry':_0x1c7c05(0x166)}),await execa(resolveNpmBin('npm'),['install',_0x1c7c05(0x173),_0x1c7c05(0x166)],{'cwd':_0x43a1f3});const _0x16fc81=Date[_0x1c7c05(0x171)]()-_0x529016;logger[_0x1c7c05(0x172)](_0x1c7c05(0x16a),'依赖安装完成',_0x16fc81,{'projectCode':_0x337952});}catch(_0x458330){const _0x4d706c=Date[_0x1c7c05(0x171)]()-_0x529016;logger['error'](_0x1c7c05(0x16a),'依赖安装失败',{'projectCode':_0x337952,'error':_0x458330 instanceof Error?_0x458330[_0x1c7c05(0x170)]:String(_0x458330),'duration':_0x4d706c});throw _0x458330;}return formatElapsed(_0x529016);}
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 a160_0x5f3130=a160_0x4444;function a160_0x4444(_0x493fa1,_0x3c9087){_0x493fa1=_0x493fa1-0x7b;const _0x1d4115=a160_0x1d41();let _0x4444c9=_0x1d4115[_0x493fa1];return _0x4444c9;}(function(_0x416293,_0x416770){const _0xc17d6e=a160_0x4444,_0x3b6b81=_0x416293();while(!![]){try{const _0x3d5e4e=parseInt(_0xc17d6e(0x86))/0x1+parseInt(_0xc17d6e(0x94))/0x2*(-parseInt(_0xc17d6e(0x9b))/0x3)+-parseInt(_0xc17d6e(0x8d))/0x4*(parseInt(_0xc17d6e(0x97))/0x5)+parseInt(_0xc17d6e(0x85))/0x6*(-parseInt(_0xc17d6e(0x91))/0x7)+parseInt(_0xc17d6e(0x88))/0x8+parseInt(_0xc17d6e(0x87))/0x9*(-parseInt(_0xc17d6e(0x81))/0xa)+parseInt(_0xc17d6e(0x84))/0xb*(parseInt(_0xc17d6e(0x89))/0xc);if(_0x3d5e4e===_0x416770)break;else _0x3b6b81['push'](_0x3b6b81['shift']());}catch(_0x443c76){_0x3b6b81['push'](_0x3b6b81['shift']());}}}(a160_0x1d41,0x77183));import{CliErrors}from'../../errors.js';function a160_0x1d41(){const _0x3a4b20=['Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','string','2026-07','1805490XMItub','appcode','trim','11bDtzsp','654LgpjkB','642809kLJsMH','45PLDZgW','1445760SCazaS','37639176rRSbxS','Usage:\x20','write','validation','908792pnozpG','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','str','nonInteractive','57393GrmvuD','yes','project-name','63924eKlttq','cookie','boolean','20AbZbVu','../../commands/project/create/main.js','create','upgrade','72iQGlFl','bool','args','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','env','Create\x20a\x20new\x20project','project','../../commands/project/create/non-interactive.js'];a160_0x1d41=function(){return _0x3a4b20;};return a160_0x1d41();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a160_0x5f3130(0x82),'type':a160_0x5f3130(0x7f),'description':'App\x20code\x20to\x20initialize'},{'name':'env','type':a160_0x5f3130(0x7f),'description':'Target\x20environment'},{'name':a160_0x5f3130(0x92),'type':a160_0x5f3130(0x96),'description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':a160_0x5f3130(0x7f),'description':'Project\x20name'},{'name':a160_0x5f3130(0x9f),'type':a160_0x5f3130(0x7f),'description':'Target\x20environment'},{'name':a160_0x5f3130(0x82),'type':a160_0x5f3130(0x7f),'description':a160_0x5f3130(0x9e)}],upgradeFlags=[{'name':a160_0x5f3130(0x92),'type':a160_0x5f3130(0x96),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':'project','command':'init','description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a160_0x5f3130(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20init','since':a160_0x5f3130(0x80)},'flags':initFlags,async 'execute'(_0x27dde3){const _0x1af910=a160_0x5f3130;return await initConfig({'appcode':_0x27dde3[_0x1af910(0x8f)]('appcode')||undefined,'env':_0x27dde3[_0x1af910(0x8f)]('env')||undefined,'autoYes':_0x27dde3[_0x1af910(0x9c)](_0x1af910(0x92))}),{'ok':!![]};}},{'service':a160_0x5f3130(0x7b),'command':a160_0x5f3130(0x99),'description':a160_0x5f3130(0xa0),'risk':a160_0x5f3130(0x8b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a160_0x5f3130(0x93),'description':a160_0x5f3130(0x8e),'required':![]}],'flags':createFlags,async 'execute'(_0x4dec1a){const _0x197078=a160_0x5f3130,{createApp:_0x41a5e1}=await import(_0x197078(0x98)),{createProjectNonInteractive:_0x274c8b}=await import(_0x197078(0x7c)),_0x10b791=_0x4dec1a[_0x197078(0x8f)]('name')[_0x197078(0x83)]()||_0x4dec1a[_0x197078(0x9d)][0x0]?.[_0x197078(0x83)](),_0x3a363c=_0x4dec1a[_0x197078(0x8f)](_0x197078(0x9f))||undefined,_0x289b1b=_0x4dec1a['str'](_0x197078(0x82))||undefined;if(_0x4dec1a[_0x197078(0x90)]){if(!_0x10b791)throw CliErrors[_0x197078(0x8c)](_0x197078(0x7d),_0x197078(0x8a)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x274c8b(_0x10b791,_0x3a363c,_0x289b1b,_0x4dec1a['cookie']);}else await _0x41a5e1({'projectCode':_0x10b791,'appCode':_0x289b1b,'env':_0x3a363c,'cookie':_0x4dec1a[_0x197078(0x95)]});return{'ok':!![]};}},{'service':a160_0x5f3130(0x7b),'command':a160_0x5f3130(0x9a),'description':a160_0x5f3130(0x7e),'risk':a160_0x5f3130(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3e4c29){const _0x2d1061=a160_0x5f3130;return await upgradeApp(_0x3e4c29['nonInteractive'],{'yes':_0x3e4c29[_0x2d1061(0x9c)](_0x2d1061(0x92))}),{'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
- const a162_0x29d5e7=a162_0x5b26;(function(_0x5ad662,_0x42e89f){const _0x2b8692=a162_0x5b26,_0x24a552=_0x5ad662();while(!![]){try{const _0x5df9e3=parseInt(_0x2b8692(0x176))/0x1+parseInt(_0x2b8692(0x182))/0x2+parseInt(_0x2b8692(0x197))/0x3+-parseInt(_0x2b8692(0x1a2))/0x4+parseInt(_0x2b8692(0x1ad))/0x5+-parseInt(_0x2b8692(0x14d))/0x6+-parseInt(_0x2b8692(0x13f))/0x7;if(_0x5df9e3===_0x42e89f)break;else _0x24a552['push'](_0x24a552['shift']());}catch(_0x375c76){_0x24a552['push'](_0x24a552['shift']());}}}(a162_0x207c,0xd6358));import a162_0x247129 from'chalk';import a162_0x4de76 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[a162_0x29d5e7(0x1af)](_0xe1e256=>_0xe1e256!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x205b8b){const _0x1ea0d2=a162_0x29d5e7,_0x594fa3=[];for(const _0x410f8a of Object[_0x1ea0d2(0x194)](CORE_IDE_CONFIGS)){if(_0x410f8a['files'])for(const _0x39f60d of _0x410f8a[_0x1ea0d2(0x199)]){_0x594fa3[_0x1ea0d2(0x165)](resolve(_0x205b8b,_0x39f60d[_0x1ea0d2(0x19e)]));}}return _0x594fa3;}function analyse(_0x557b55){const _0x1b5231=a162_0x29d5e7;let _0x37c44d=null;const _0x1c8b08=resolve(_0x557b55,NEW_CONFIG_NAME),_0x281fc9=existsSync(_0x1c8b08);for(const _0x1d7603 of LEGACY_CONFIG_NAMES){const _0x175d2a=resolve(_0x557b55,_0x1d7603);if(existsSync(_0x175d2a)){const _0x39014e=readConfigFile(_0x175d2a),_0x1a1af2=Object[_0x1b5231(0x18b)](_0x39014e)[_0x1b5231(0x1af)](_0x56271c=>typeof _0x39014e[_0x56271c]!=='undefined');_0x37c44d={'oldPath':_0x175d2a,'hasNewConfig':_0x281fc9,'fields':_0x1a1af2};break;}}const _0x19dbbe=[],_0x1e6926=resolve(_0x557b55,_0x1b5231(0x1b9));if(existsSync(_0x1e6926))_0x19dbbe[_0x1b5231(0x165)](_0x1e6926);const _0x4924fd=resolve(_0x557b55,_0x1b5231(0x18d));if(existsSync(_0x4924fd))_0x19dbbe[_0x1b5231(0x165)](_0x4924fd);const _0x2366c8=resolve(_0x557b55,_0x1b5231(0x147));if(existsSync(_0x2366c8))_0x19dbbe['push'](_0x2366c8);for(const _0x1713ee of collectIdeSkillFiles(_0x557b55)){if(existsSync(_0x1713ee))_0x19dbbe[_0x1b5231(0x165)](_0x1713ee);}let _0x2e3fee=null;const _0x18120f=resolve(_0x557b55,_0x1b5231(0x177));if(existsSync(_0x18120f))try{const _0x5d59d1=JSON['parse'](readFileSync(_0x18120f,'utf8'));if(_0x5d59d1?.[_0x1b5231(0x169)]&&typeof _0x5d59d1['mcpServers']===_0x1b5231(0x155)){const _0x1ad159=[];for(const [_0xbc70b9,_0x2c7136]of Object[_0x1b5231(0x1a9)](_0x5d59d1[_0x1b5231(0x169)])){const _0xacd9f0=_0x2c7136;_0xacd9f0?.[_0x1b5231(0x1b7)]&&Array[_0x1b5231(0x1a1)](_0xacd9f0['args'])&&_0xacd9f0[_0x1b5231(0x1b7)][_0x1b5231(0x186)](_0x3e1cc4=>typeof _0x3e1cc4===_0x1b5231(0x192)&&_0x3e1cc4[_0x1b5231(0x19b)]('@lovrabet/dataset-mcp-server'))&&_0x1ad159[_0x1b5231(0x165)](_0xbc70b9);}_0x1ad159[_0x1b5231(0x15b)]>0x0&&(_0x2e3fee={'path':_0x18120f,'keys':_0x1ad159});}}catch{}const _0x5b0804=_0x19dbbe['length']>0x0||_0x37c44d!==null;let _0x2b53c2=null;const _0x33accf=resolve(_0x557b55,'package.json');if(existsSync(_0x33accf))try{const _0x6b4899=JSON[_0x1b5231(0x17e)](readFileSync(_0x33accf,_0x1b5231(0x145)));for(const _0x536abe of[_0x1b5231(0x14e),_0x1b5231(0x142)]){const _0x59407c=_0x6b4899?.[_0x536abe]?.[_0x1b5231(0x17f)];if(typeof _0x59407c===_0x1b5231(0x192)){_0x59407c!==_0x1b5231(0x15c)&&(_0x2b53c2={'pkgPath':_0x33accf,'currentVersion':_0x59407c,'field':_0x536abe});break;}}}catch{}return{'configMigration':_0x37c44d,'oldArtifacts':_0x19dbbe,'oldMcpConfig':_0x2e3fee,'needsSkillSwap':_0x5b0804,'sdkUpgrade':_0x2b53c2};}function printReport(_0x3a9091){const _0x366f14=a162_0x29d5e7,{configMigration:_0x3fd277,oldArtifacts:_0x5554e5,oldMcpConfig:_0x593267,needsSkillSwap:_0x3de62d}=_0x3a9091;console[_0x366f14(0x1a5)](''),console[_0x366f14(0x1a5)](a162_0x247129[_0x366f14(0x1ac)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x366f14(0x1a5)]('');_0x3fd277?(console[_0x366f14(0x1a5)](a162_0x247129['cyan'](_0x366f14(0x152))+('\x20\x20'+a162_0x247129[_0x366f14(0x189)](_0x3fd277[_0x366f14(0x18c)]))),console['log'](_0x366f14(0x18a)+(_0x3fd277[_0x366f14(0x180)]?a162_0x247129[_0x366f14(0x17c)](_0x366f14(0x1b5)):a162_0x247129[_0x366f14(0x156)](_0x366f14(0x166)))),console['log']('\x20\x20Fields\x20to\x20migrate:\x20'+_0x3fd277[_0x366f14(0x164)][_0x366f14(0x16b)](',\x20')),console[_0x366f14(0x1a5)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x366f14(0x1a5)](a162_0x247129['cyan'](_0x366f14(0x152))+'\x20\x20'+a162_0x247129[_0x366f14(0x156)]('no\x20legacy\x20config\x20found'));console[_0x366f14(0x1a5)]('');if(_0x5554e5[_0x366f14(0x15b)]>0x0){console[_0x366f14(0x1a5)](a162_0x247129['cyan']('Legacy\x20artifacts:'));for(const _0x2ef09b of _0x5554e5){console[_0x366f14(0x1a5)]('\x20\x20'+a162_0x247129['red'](_0x366f14(0x15a))+'\x20\x20'+_0x2ef09b);}console['log'](_0x366f14(0x167));}else console[_0x366f14(0x1a5)](a162_0x247129['cyan'](_0x366f14(0x196))+'\x20\x20'+a162_0x247129[_0x366f14(0x156)](_0x366f14(0x19d)));console[_0x366f14(0x1a5)]('');_0x593267?(console[_0x366f14(0x1a5)](a162_0x247129['cyan'](_0x366f14(0x1a0))+('\x20\x20'+a162_0x247129[_0x366f14(0x189)](_0x593267['path'])+_0x366f14(0x153)+_0x593267[_0x366f14(0x18b)][_0x366f14(0x16b)](',\x20'))),console[_0x366f14(0x1a5)](_0x366f14(0x163))):console[_0x366f14(0x1a5)](a162_0x247129[_0x366f14(0x178)](_0x366f14(0x1a0))+'\x20\x20'+a162_0x247129[_0x366f14(0x156)](_0x366f14(0x19c)));console[_0x366f14(0x1a5)](''),console[_0x366f14(0x1a5)](a162_0x247129['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x3de62d?a162_0x247129[_0x366f14(0x189)](_0x366f14(0x171)):a162_0x247129[_0x366f14(0x17c)](_0x366f14(0x195)))));_0x3de62d&&console[_0x366f14(0x1a5)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x366f14(0x1a5)]('');if(_0x3a9091[_0x366f14(0x143)]){const {currentVersion:_0x4a6a2d,field:_0x470a82,pkgPath:_0x382421}=_0x3a9091[_0x366f14(0x143)];console[_0x366f14(0x1a5)](a162_0x247129[_0x366f14(0x178)](_0x366f14(0x185))+('\x20\x20'+a162_0x247129[_0x366f14(0x189)](_0x382421))),console[_0x366f14(0x1a5)]('\x20\x20Current\x20version\x20in\x20'+_0x470a82+':\x20'+a162_0x247129['yellow'](_0x4a6a2d)+_0x366f14(0x187)+a162_0x247129['green']('latest')),console[_0x366f14(0x1a5)](_0x366f14(0x162));}else console['log'](a162_0x247129[_0x366f14(0x178)]('@lovrabet/sdk:')+'\x20\x20'+a162_0x247129[_0x366f14(0x156)](_0x366f14(0x140)));console[_0x366f14(0x1a5)]('');}function execConfigMigration(_0x3f9f7e,_0xe13377){const _0x91df12=a162_0x29d5e7,{configMigration:_0x335563}=_0x3f9f7e;if(!_0x335563?.[_0x91df12(0x18c)])return{'step':0x1,'label':_0x91df12(0x174),'ok':!![],'detail':_0x91df12(0x18f)};const _0x4558cb=readConfigFile(_0x335563[_0x91df12(0x18c)]),_0x37e475=resolve(_0xe13377,NEW_CONFIG_NAME),_0x2ca1e9=_0x335563[_0x91df12(0x180)]?readConfigFile(_0x37e475):{};for(const [_0x574df0,_0x56881a]of Object[_0x91df12(0x1a9)](_0x4558cb)){!(_0x574df0 in _0x2ca1e9)&&(_0x2ca1e9[_0x574df0]=_0x56881a);}writeConfigFile(_0x37e475,_0x2ca1e9);const _0xc78b2e=_0x335563[_0x91df12(0x18c)]+_0x91df12(0x17a);return renameSync(_0x335563[_0x91df12(0x18c)],_0xc78b2e),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x335563['oldPath']+_0x91df12(0x187)+_0x37e475+_0x91df12(0x144)+_0xc78b2e+')'};}function execRemoveOldArtifacts(_0x25c2e7){const _0x45f2c4=a162_0x29d5e7,_0x3ff4d9=[];for(const _0x20caf6 of _0x25c2e7){try{if(!existsSync(_0x20caf6))continue;const _0x232e91=tryStat(_0x20caf6);_0x232e91?.[_0x45f2c4(0x175)]()?rmSync(_0x20caf6,{'recursive':!![],'force':!![]}):unlinkSync(_0x20caf6);}catch(_0x34b60e){_0x3ff4d9[_0x45f2c4(0x165)](_0x20caf6+':\x20'+_0x34b60e[_0x45f2c4(0x170)]);}}return{'step':0x3,'label':_0x45f2c4(0x146),'ok':_0x3ff4d9[_0x45f2c4(0x15b)]===0x0,'detail':_0x3ff4d9['length']>0x0?_0x25c2e7[_0x45f2c4(0x15b)]-_0x3ff4d9[_0x45f2c4(0x15b)]+'/'+_0x25c2e7[_0x45f2c4(0x15b)]+_0x45f2c4(0x1b1)+_0x3ff4d9[_0x45f2c4(0x16b)](';\x20')+')':_0x25c2e7[_0x45f2c4(0x15b)]+_0x45f2c4(0x193)};}function a162_0x5b26(_0x47232e,_0x36d29c){_0x47232e=_0x47232e-0x13f;const _0x207c9d=a162_0x207c();let _0x5b2605=_0x207c9d[_0x47232e];return _0x5b2605;}function execCleanMcp(_0xaf181d){const _0x4c69eb=a162_0x29d5e7;if(!_0xaf181d[_0x4c69eb(0x1a3)])return{'step':0x4,'label':_0x4c69eb(0x191),'ok':!![],'detail':_0x4c69eb(0x1b3)};try{const _0x17bdc6=readFileSync(_0xaf181d[_0x4c69eb(0x1a3)][_0x4c69eb(0x19e)],_0x4c69eb(0x145)),_0x1029dc=JSON[_0x4c69eb(0x17e)](_0x17bdc6);if(_0x1029dc?.[_0x4c69eb(0x169)]&&typeof _0x1029dc[_0x4c69eb(0x169)]===_0x4c69eb(0x155)){const _0x5add79=[];for(const [_0x365362,_0x231142]of Object['entries'](_0x1029dc[_0x4c69eb(0x169)])){_0x231142?.[_0x4c69eb(0x1b7)]&&Array['isArray'](_0x231142[_0x4c69eb(0x1b7)])&&_0x231142['args'][_0x4c69eb(0x186)](_0x221774=>typeof _0x221774===_0x4c69eb(0x192)&&_0x221774['includes'](_0x4c69eb(0x188)))&&_0x5add79[_0x4c69eb(0x165)](_0x365362);}for(const _0x9d16b2 of _0x5add79){delete _0x1029dc[_0x4c69eb(0x169)][_0x9d16b2];}return _0x5add79[_0x4c69eb(0x15b)]>0x0&&writeFileSync(_0xaf181d[_0x4c69eb(0x1a3)][_0x4c69eb(0x19e)],JSON[_0x4c69eb(0x14c)](_0x1029dc,null,0x2)+'\x0a',_0x4c69eb(0x145)),{'step':0x4,'label':_0x4c69eb(0x191),'ok':!![],'detail':'removed\x20'+_0x5add79[_0x4c69eb(0x16b)](',\x20')+_0x4c69eb(0x157)+_0xaf181d[_0x4c69eb(0x1a3)][_0x4c69eb(0x19e)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x4c69eb(0x16f)};}catch(_0x24bbe2){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x24bbe2[_0x4c69eb(0x170)]};}}function execSkillsRemove(_0x540b7a,_0x44906e){const _0x42c46f=a162_0x29d5e7,_0x8cb3d2=runNpxSkillsRemove(_0x540b7a,{'stdio':_0x42c46f(0x1ab),'yes':_0x44906e});return{'step':0x5,'label':_0x42c46f(0x1b6),'ok':_0x8cb3d2['ok'],'detail':_0x8cb3d2['ok']?'lovrabet/lovrabet-skill\x20removed':_0x8cb3d2[_0x42c46f(0x16a)]??_0x42c46f(0x158)+_0x8cb3d2[_0x42c46f(0x1b4)]};}function execSkillsAdd(_0xd12536,_0x1d7cc6){const _0x42542a=a162_0x29d5e7,_0x115d12=runNpxSkillsAddGlobal(_0xd12536,_0x42542a(0x184),{'stdio':_0x42542a(0x1ab),'yes':_0x1d7cc6});return{'step':0x6,'label':_0x42542a(0x18e),'ok':_0x115d12['ok'],'detail':_0x115d12['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x115d12['error']??_0x42542a(0x158)+_0x115d12[_0x42542a(0x1b4)]};}function execUpgradeSdk(_0x493ebf){const _0x3b90fd=a162_0x29d5e7;if(!_0x493ebf[_0x3b90fd(0x143)])return{'step':0x7,'label':_0x3b90fd(0x1b0),'ok':!![],'detail':_0x3b90fd(0x1a7)};const {pkgPath:_0x45eca9,currentVersion:_0x319ac8,field:_0x4d71a5}=_0x493ebf[_0x3b90fd(0x143)];try{const _0x14cb9a=readFileSync(_0x45eca9,_0x3b90fd(0x145)),_0x1624d9=JSON[_0x3b90fd(0x17e)](_0x14cb9a);return _0x1624d9[_0x4d71a5][_0x3b90fd(0x17f)]=_0x3b90fd(0x15c),writeFileSync(_0x45eca9,JSON[_0x3b90fd(0x14c)](_0x1624d9,null,0x2)+'\x0a',_0x3b90fd(0x145)),{'step':0x7,'label':_0x3b90fd(0x1b0),'ok':!![],'detail':_0x4d71a5+_0x3b90fd(0x16c)+_0x319ac8+_0x3b90fd(0x14b)};}catch(_0x52fa64){return{'step':0x7,'label':_0x3b90fd(0x1b0),'ok':![],'detail':_0x52fa64[_0x3b90fd(0x170)]};}}function tryStat(_0x8b7bc8){try{return statSync(_0x8b7bc8);}catch{return undefined;}}function printSummary(_0x2dc181){const _0x50ff93=a162_0x29d5e7;console[_0x50ff93(0x1a5)](''),console[_0x50ff93(0x1a5)](a162_0x247129[_0x50ff93(0x1ac)](_0x50ff93(0x179))),console[_0x50ff93(0x1a5)]('');for(const _0x46eeb9 of _0x2dc181){const _0x46d837=_0x46eeb9['ok']?a162_0x247129[_0x50ff93(0x17c)]('OK'):a162_0x247129[_0x50ff93(0x181)](_0x50ff93(0x16e));console['log']('\x20\x20'+_0x46d837+_0x50ff93(0x1ae)+_0x46eeb9[_0x50ff93(0x19f)]+':\x20'+_0x46eeb9[_0x50ff93(0x160)]);if(_0x46eeb9[_0x50ff93(0x183)])console[_0x50ff93(0x1a5)](_0x50ff93(0x161)+a162_0x247129[_0x50ff93(0x156)](_0x46eeb9[_0x50ff93(0x183)]));}console['log']('');}export async function upgradeApp(_0x2550e3,_0x5ba06c){const _0x1ff033=a162_0x29d5e7,_0x2fbf39=process[_0x1ff033(0x173)](),_0x268536=analyse(_0x2fbf39),_0x1b9ff2=!_0x268536['configMigration']&&_0x268536[_0x1ff033(0x150)]['length']===0x0&&!_0x268536[_0x1ff033(0x1a3)]&&!_0x268536[_0x1ff033(0x198)]&&!_0x268536[_0x1ff033(0x143)];if(_0x1b9ff2){console[_0x1ff033(0x1a5)](a162_0x247129['green']('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x268536);const _0x4e2ccc=!!(_0x5ba06c[_0x1ff033(0x168)]||_0x5ba06c['Y']||_0x2550e3);if(!_0x4e2ccc)try{const _0x232791=await askConfirm(_0x1ff033(0x1bb));if(!_0x232791){console[_0x1ff033(0x1a5)](a162_0x247129[_0x1ff033(0x156)](_0x1ff033(0x149)));return;}}catch(_0x1b9410){if(_0x1b9410?.[_0x1ff033(0x170)]===_0x1ff033(0x1ba)){console[_0x1ff033(0x1a5)](a162_0x247129[_0x1ff033(0x156)](_0x1ff033(0x149)));return;}throw _0x1b9410;}const _0x1fe1a3=[],_0x37fca7=a162_0x4de76({'text':_0x1ff033(0x1a4),'color':'cyan'})['start'](),_0x45c76=execConfigMigration(_0x268536,_0x2fbf39);_0x1fe1a3['push'](_0x45c76),_0x37fca7[_0x45c76['ok']?_0x1ff033(0x15e):_0x1ff033(0x1b2)](_0x1ff033(0x1b8)+(_0x45c76['detail']??(_0x45c76['ok']?_0x1ff033(0x151):_0x1ff033(0x1a8))));const _0x14361e=resolve(_0x2fbf39,_0x1ff033(0x1b9)),_0x3c9054=a162_0x4de76({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x1ff033(0x178)})[_0x1ff033(0x17b)]();if(existsSync(_0x14361e))try{rmSync(_0x14361e,{'recursive':!![],'force':!![]}),_0x3c9054[_0x1ff033(0x15e)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x1fe1a3['push']({'step':0x2,'label':_0x1ff033(0x154),'ok':!![]});}catch(_0x19c8b1){_0x3c9054[_0x1ff033(0x1b2)](_0x1ff033(0x14f)+_0x19c8b1[_0x1ff033(0x170)]),_0x1fe1a3[_0x1ff033(0x165)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x19c8b1[_0x1ff033(0x170)]});}else _0x3c9054[_0x1ff033(0x148)](_0x1ff033(0x19a)),_0x1fe1a3[_0x1ff033(0x165)]({'step':0x2,'label':_0x1ff033(0x154),'ok':!![],'detail':'skipped'});const _0x1ec0a8=a162_0x4de76({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x1ff033(0x178)})['start'](),_0x17a810=execRemoveOldArtifacts(_0x268536[_0x1ff033(0x150)]);_0x1fe1a3[_0x1ff033(0x165)](_0x17a810),_0x1ec0a8[_0x17a810['ok']?_0x1ff033(0x15e):_0x1ff033(0x1b2)](_0x1ff033(0x1bc)+(_0x17a810[_0x1ff033(0x183)]??(_0x17a810['ok']?'done':_0x1ff033(0x1a8))));const _0x3b77fb=a162_0x4de76({'text':_0x1ff033(0x17d),'color':_0x1ff033(0x178)})[_0x1ff033(0x17b)](),_0x1f8a98=execCleanMcp(_0x268536);_0x1fe1a3[_0x1ff033(0x165)](_0x1f8a98),_0x3b77fb[_0x1f8a98['ok']?_0x1ff033(0x15e):'fail']('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x1f8a98[_0x1ff033(0x183)]??(_0x1f8a98['ok']?_0x1ff033(0x151):_0x1ff033(0x1a8))));const _0x3a1917=a162_0x4de76({'text':_0x1ff033(0x1aa),'color':_0x1ff033(0x178)})[_0x1ff033(0x17b)](),_0x4b5d93=execSkillsRemove(_0x2fbf39,_0x4e2ccc);_0x1fe1a3['push'](_0x4b5d93),_0x3a1917[_0x4b5d93['ok']?_0x1ff033(0x15e):'fail']('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x4b5d93['detail']??(_0x4b5d93['ok']?_0x1ff033(0x151):_0x1ff033(0x1a8))));const _0x16ccd4=a162_0x4de76({'text':_0x1ff033(0x1a6),'color':'cyan'})[_0x1ff033(0x17b)](),_0x131567=execSkillsAdd(_0x2fbf39,_0x4e2ccc);_0x1fe1a3[_0x1ff033(0x165)](_0x131567),_0x16ccd4[_0x131567['ok']?_0x1ff033(0x15e):_0x1ff033(0x1b2)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x131567[_0x1ff033(0x183)]??(_0x131567['ok']?_0x1ff033(0x151):_0x1ff033(0x1a8))));const _0x46a452=a162_0x4de76({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x1ff033(0x178)})['start'](),_0x26147d=execUpgradeSdk(_0x268536);_0x1fe1a3[_0x1ff033(0x165)](_0x26147d),_0x46a452[_0x26147d['ok']?'succeed':_0x1ff033(0x1b2)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x26147d[_0x1ff033(0x183)]??(_0x26147d['ok']?_0x1ff033(0x151):_0x1ff033(0x1a8)))),printSummary(_0x1fe1a3);const _0xd325ad=_0x1fe1a3[_0x1ff033(0x186)](_0x56057d=>!_0x56057d['ok']);_0xd325ad?console[_0x1ff033(0x1a5)](a162_0x247129[_0x1ff033(0x189)](_0x1ff033(0x15f))):console[_0x1ff033(0x1a5)](a162_0x247129['green'](_0x1ff033(0x190))),_0x26147d['ok']&&_0x268536[_0x1ff033(0x143)]&&(console[_0x1ff033(0x1a5)](''),console[_0x1ff033(0x1a5)](a162_0x247129[_0x1ff033(0x1ac)][_0x1ff033(0x178)](_0x1ff033(0x15d))),console['log'](a162_0x247129[_0x1ff033(0x178)](_0x1ff033(0x14a))),console[_0x1ff033(0x1a5)](''),console[_0x1ff033(0x1a5)](a162_0x247129[_0x1ff033(0x16d)](_0x1ff033(0x172))),console['log'](a162_0x247129['white'](_0x1ff033(0x141))),console[_0x1ff033(0x1a5)](a162_0x247129[_0x1ff033(0x16d)](_0x1ff033(0x159))),console[_0x1ff033(0x1a5)](''));}function a162_0x207c(){const _0x559c4e=['inherit','bold','155495pnpvYa','\x20\x20Step\x20','filter','Upgrade\x20@lovrabet/sdk','\x20removed\x20(','fail','skipped','status','already\x20exists\x20(will\x20merge)','Remove\x20old\x20skill','args','Step\x201/7:\x20Config\x20migration\x20—\x20','.lovrabet','CANCEL','Proceed\x20with\x20upgrade?','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','16625938IJaQbi','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20#\x20or','devDependencies','sdkUpgrade','\x20(backup:\x20','utf8','Remove\x20legacy\x20artifacts','.claude/skills/lovrabet','info','Upgrade\x20cancelled.','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','\x20→\x20latest','stringify','341826WPeXxr','dependencies','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','oldArtifacts','done','Config\x20file:','\x20→\x20keys:\x20','Remove\x20.lovrabet/','object','gray','\x20from\x20','exit\x20','\x20\x20bun\x20install','FOUND','length','latest','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','succeed','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','label','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','fields','push','not\x20found\x20(will\x20create)','\x20\x20Action:\x20delete','yes','mcpServers','error','join','[\x22@lovrabet/sdk\x22]:\x20','white','FAIL','no\x20matching\x20entry\x20found','message','needed','\x20\x20npm\x20install','cwd','Config\x20migration','isDirectory','1531632GEUpkz','.cursor/mcp.json','cyan','===\x20Upgrade\x20Summary\x20===','.bak','start','green','Step\x204/7:\x20Cleaning\x20MCP\x20config...','parse','@lovrabet/sdk','hasNewConfig','red','1437800yaiOCL','detail','lovrabet/rabetbase','@lovrabet/sdk:','some','\x20→\x20','@lovrabet/dataset-mcp-server','yellow','\x20\x20New\x20config\x20(.rabetbase.json):\x20','keys','oldPath','.cursor/rules/lovrabet_rules.mdc','Install\x20new\x20skill','skipped\x20(no\x20legacy\x20config)','Upgrade\x20completed\x20successfully!','Clean\x20MCP\x20config','string','\x20removed','values','not\x20needed','Legacy\x20artifacts:','4902507xdYHcE','needsSkillSwap','files','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','includes','no\x20legacy\x20entry','none\x20found','path','step','MCP\x20config:','isArray','2425180YhvaWW','oldMcpConfig','Step\x201/7:\x20Migrating\x20config...','log','Step\x206/7:\x20Installing\x20new\x20skill...','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','failed','entries','Step\x205/7:\x20Removing\x20old\x20skill...'];a162_0x207c=function(){return _0x559c4e;};return a162_0x207c();}
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 a163_0x55ad70=a163_0x18a9;(function(_0x3c4da5,_0x523b53){const _0x49a610=a163_0x18a9,_0x2ade83=_0x3c4da5();while(!![]){try{const _0x5e7a6f=-parseInt(_0x49a610(0xea))/0x1*(parseInt(_0x49a610(0xc2))/0x2)+-parseInt(_0x49a610(0xf4))/0x3+-parseInt(_0x49a610(0x102))/0x4*(-parseInt(_0x49a610(0x10b))/0x5)+-parseInt(_0x49a610(0xf3))/0x6*(parseInt(_0x49a610(0xe6))/0x7)+parseInt(_0x49a610(0xba))/0x8+-parseInt(_0x49a610(0xf8))/0x9+parseInt(_0x49a610(0xc8))/0xa;if(_0x5e7a6f===_0x523b53)break;else _0x2ade83['push'](_0x2ade83['shift']());}catch(_0x2a5c57){_0x2ade83['push'](_0x2ade83['shift']());}}}(a163_0x3f2b,0xc2f08));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';function a163_0x18a9(_0x535643,_0x495aa4){_0x535643=_0x535643-0xb9;const _0x3f2b30=a163_0x3f2b();let _0x18a971=_0x3f2b30[_0x535643];return _0x18a971;}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x394457){const _0x5a32db=a163_0x18a9;for(const _0x5da6d7 of _0x394457){definitions[_0x5a32db(0x104)](_0x5da6d7[_0x5a32db(0xe3)]+':'+_0x5da6d7[_0x5a32db(0xd1)],_0x5da6d7);let _0x54f2a8=serviceGroups[_0x5a32db(0xfc)](_0x5da6d7[_0x5a32db(0xe3)]);!_0x54f2a8&&(_0x54f2a8=[],serviceGroups['set'](_0x5da6d7[_0x5a32db(0xe3)],_0x54f2a8)),_0x54f2a8[_0x5a32db(0x10d)](_0x5da6d7);}}function registerDeclarativeService(_0x5e2e54,_0xf7eb6e,_0x2efb69){const _0x88e6ef=a163_0x18a9;registerDefinitions(_0xf7eb6e);_0x2efb69?.['wildcardDef']&&registerDefinitions([_0x2efb69[_0x88e6ef(0xef)]]);const _0x426b48=_0xd8cbd4=>_0xd8cbd4===_0x88e6ef(0xd7)?'':_0xd8cbd4==='write'?_0x88e6ef(0xda):'\x20\x20[high-risk-write]',_0x5db5c1={'service':_0xf7eb6e[0x0][_0x88e6ef(0xe3)],'label':_0x5e2e54,'commands':_0xf7eb6e[_0x88e6ef(0xe0)](_0x1e5e19=>!_0x1e5e19[_0x88e6ef(0x110)])[_0x88e6ef(0x100)](_0x4e67d5=>({'command':_0x4e67d5[_0x88e6ef(0xd1)],'description':_0x4e67d5[_0x88e6ef(0xc0)],'tag':_0x426b48(_0x4e67d5[_0x88e6ef(0xd0)])})),'declarative':!![],'defaultCommand':_0x2efb69?.[_0x88e6ef(0xc3)]??(_0x2efb69?.['isSingleCommand']?_0xf7eb6e[0x0][_0x88e6ef(0xd1)]:undefined),'wildcardDef':_0x2efb69?.['wildcardDef'],'isSingleCommand':_0x2efb69?.[_0x88e6ef(0xfb)]};serviceRegistry[_0x88e6ef(0x10d)](_0x5db5c1),serviceByName[_0x88e6ef(0x104)](_0x5db5c1['service'],_0x5db5c1);}registerDeclarativeService(a163_0x55ad70(0xbd),initDefinitions,{'defaultCommand':a163_0x55ad70(0xff),'isSingleCommand':!![]}),registerDeclarativeService(a163_0x55ad70(0xdc),projectDefinitions),registerDeclarativeService(a163_0x55ad70(0x109),workspaceDefinitions),registerDeclarativeService(a163_0x55ad70(0xd8),appDefinitions),registerDeclarativeService(a163_0x55ad70(0xde),authDefinitions,{'defaultCommand':a163_0x55ad70(0xcd)}),registerDeclarativeService(a163_0x55ad70(0x111),tenantDefinitions),registerDeclarativeService(a163_0x55ad70(0xe4),datasetDefinitions),registerDeclarativeService(a163_0x55ad70(0x106),pageDefinitions),registerDeclarativeService(a163_0x55ad70(0xf1),apiDefinitions),registerDeclarativeService(a163_0x55ad70(0x10e),dataDefinitions),registerDeclarativeService(a163_0x55ad70(0xfe),bffDefinitions),registerDeclarativeService(a163_0x55ad70(0xb9),notificationDefinitions),registerDeclarativeService(a163_0x55ad70(0xee),sqlDefinitions),registerDeclarativeService(a163_0x55ad70(0xc5),dbDefinitions),registerDeclarativeService(a163_0x55ad70(0xed),menuDefinitions),registerDeclarativeService(a163_0x55ad70(0xf6),taskDefinitions),registerDeclarativeService(a163_0x55ad70(0xc7),roleDefinitions),registerDeclarativeService(a163_0x55ad70(0xbe),permitDefinitions),registerDeclarativeService(a163_0x55ad70(0xbf),appConfigDefinitions),registerDeclarativeService(a163_0x55ad70(0xc6),kbDefinitions),registerDeclarativeService(a163_0x55ad70(0x10c),issueDefinitions),registerDeclarativeService(a163_0x55ad70(0x113),fileDefinitions),registerDeclarativeService(a163_0x55ad70(0xbb),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a163_0x55ad70(0xfa),configDefinitions),registerDeclarativeService(a163_0x55ad70(0xfd),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a163_0x55ad70(0xe8),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a163_0x55ad70(0xd5),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a163_0x55ad70(0xcb),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a163_0x55ad70(0xd3),logsDefinitions,{'defaultCommand':a163_0x55ad70(0xcf)}),registerDeclarativeService(a163_0x55ad70(0xc1),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a163_0x55ad70(0xe9)]=[{'command':a163_0x55ad70(0xe5),'description':a163_0x55ad70(0xe1),'tag':''}];}export const deprecatedAliases={'create':{'service':'project','command':a163_0x55ad70(0xf5)},'start':{'service':a163_0x55ad70(0xff),'command':a163_0x55ad70(0x114)},'build':{'service':a163_0x55ad70(0xff),'command':a163_0x55ad70(0xf2)},'preview':{'service':a163_0x55ad70(0xff),'command':a163_0x55ad70(0xd2)},'logout':{'service':a163_0x55ad70(0xce),'command':a163_0x55ad70(0xd6)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a163_0x55ad70(0x116),APP_REMOTE_REMOVED_HINT=a163_0x55ad70(0x107),APP_USE_REMOVED_HINT=a163_0x55ad70(0xf9),APP_ADD_REMOVED_HINT=a163_0x55ad70(0xcc),APP_REMOVE_REMOVED_HINT=a163_0x55ad70(0xf7),REMOVED_KNOWLEDGE_BASE_COMMANDS=new Set([a163_0x55ad70(0x101),'detail',a163_0x55ad70(0xf5),a163_0x55ad70(0xe2),a163_0x55ad70(0x112)]);export function resolveRemovedCommand(_0x477d7c,_0x56182d){const _0x3e701a=a163_0x55ad70;if(_0x477d7c===_0x3e701a(0x108)){const _0x369452=_0x56182d?'skill\x20'+_0x56182d:_0x3e701a(0x108);return{'command':_0x369452,'message':_0x3e701a(0x103)+_0x369452+_0x3e701a(0xbc),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x477d7c===_0x3e701a(0xe7))return{'command':'skills','message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x477d7c==='app'&&_0x56182d===_0x3e701a(0xd9))return{'command':'app\x20remote','message':_0x3e701a(0x10a),'hint':APP_REMOTE_REMOVED_HINT};if(_0x477d7c===_0x3e701a(0x10f)&&_0x56182d===_0x3e701a(0xf0))return{'command':_0x3e701a(0xc4),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};if(_0x477d7c===_0x3e701a(0x10f)&&_0x56182d===_0x3e701a(0x105))return{'command':'app\x20add','message':_0x3e701a(0xca),'hint':APP_ADD_REMOVED_HINT};if(_0x477d7c===_0x3e701a(0x10f)&&_0x56182d===_0x3e701a(0xec))return{'command':'app\x20remove','message':'`rabetbase\x20app\x20remove`\x20has\x20been\x20removed.','hint':APP_REMOVE_REMOVED_HINT};if(_0x477d7c===_0x3e701a(0xdf)&&_0x56182d&&REMOVED_KNOWLEDGE_BASE_COMMANDS[_0x3e701a(0xdd)](_0x56182d))return{'command':_0x3e701a(0xeb)+_0x56182d,'message':'`rabetbase\x20knowledge-base\x20'+_0x56182d+_0x3e701a(0xbc),'hint':'Use\x20`rabetbase\x20kb\x20'+_0x56182d+_0x3e701a(0xc9)};return undefined;}export const deprecatedSubcommands={'bff':{'new':a163_0x55ad70(0xf5)},'sql':{'new':a163_0x55ad70(0xf5)},'menu':{'update':a163_0x55ad70(0x115)}};export function resolveDeprecatedSubcommand(_0x2b32ce,_0x34350e){return deprecatedSubcommands[_0x2b32ce]?.[_0x34350e];}export function findDefinition(_0x4a2d55,_0x16866d){const _0x2c1c4b=a163_0x55ad70;return definitions[_0x2c1c4b(0xfc)](_0x4a2d55+':'+_0x16866d);}export function isKnownService(_0x1bb561){return serviceByName['has'](_0x1bb561);}export function isDeclarativeService(_0x4397b1){const _0x5f3bb1=a163_0x55ad70;return serviceGroups['has'](_0x4397b1)||serviceByName[_0x5f3bb1(0xfc)](_0x4397b1)?.[_0x5f3bb1(0xef)]!==undefined;}function a163_0x3f2b(){const _0x12690d=['`rabetbase\x20app\x20add`\x20has\x20been\x20removed.','CLI\x20Built-in\x20Skill','Use\x20`rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20instead.','login','auth','show','risk','command','preview','Logs','values','Self\x20Update','logout','read','App\x20Management','remote','\x20\x20[write]','from','Project','has','Authentication','knowledge-base','filter','Run\x20any\x20package.json\x20script','update','service','Dataset\x20&\x20Operations','<script>','811503elLcIt','skills','Schema','commands','1060175aFWJjL','knowledge-base\x20','remove','Menu','SQL\x20Queries','wildcardDef','use','API\x20Development','build','42XnZxOG','1552803ZxOCRw','create','Async\x20Tasks','Use\x20`rabetbase\x20workspace\x20remove\x20<name>`\x20instead.','9636066KKltzw','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Configuration','isSingleCommand','get','Diagnostics','BFF\x20Scripts','run','map','list','24EMgCGn','`rabetbase\x20','set','add','Smart\x20List\x20Pages','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','skill','Workspace','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','127805TsAXzE','Platform\x20Issue','push','Instant\x20API','app','hidden','Tenant\x20Members','delete','File','start','asset-update','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','Notification\x20Configuration','11557824blgjVr','OCR','`\x20has\x20been\x20removed.','Quick\x20Start','Permissions','Runtime\x20App\x20Config\x20Management','description','Run\x20Scripts','2ykjRKW','defaultCommand','app\x20use','Database\x20Connections','Company\x20Knowledge\x20Base','Roles','26603310OYcrez','`\x20instead.'];a163_0x3f2b=function(){return _0x12690d;};return a163_0x3f2b();}export function getServiceEntry(_0x46969b){const _0x48ccf2=a163_0x55ad70;return serviceByName[_0x48ccf2(0xfc)](_0x46969b);}export function getLegacyHandler(_0x344a45,_0x142c6c){return undefined;}export function getAllDefinitions(){const _0x22d2bd=a163_0x55ad70;return Array[_0x22d2bd(0xdb)](definitions[_0x22d2bd(0xd4)]());}
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 a164_0x771507=a164_0x589c;(function(_0x57dff2,_0xd03e5b){const _0x1cb9a8=a164_0x589c,_0x447726=_0x57dff2();while(!![]){try{const _0x121087=-parseInt(_0x1cb9a8(0x9f))/0x1+-parseInt(_0x1cb9a8(0x9c))/0x2*(-parseInt(_0x1cb9a8(0xa2))/0x3)+parseInt(_0x1cb9a8(0xa0))/0x4*(parseInt(_0x1cb9a8(0xb2))/0x5)+parseInt(_0x1cb9a8(0xa4))/0x6*(-parseInt(_0x1cb9a8(0xa5))/0x7)+parseInt(_0x1cb9a8(0xb0))/0x8*(-parseInt(_0x1cb9a8(0xae))/0x9)+parseInt(_0x1cb9a8(0xa6))/0xa+-parseInt(_0x1cb9a8(0x9a))/0xb*(-parseInt(_0x1cb9a8(0xa1))/0xc);if(_0x121087===_0xd03e5b)break;else _0x447726['push'](_0x447726['shift']());}catch(_0x233ab6){_0x447726['push'](_0x447726['shift']());}}}(a164_0x11cb,0x26e8a));import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a164_0x771507(0xa3);function readName(_0x17fdb9){const _0x4cfdb2=a164_0x771507,_0x23d727=_0x17fdb9[_0x4cfdb2(0xaa)](_0x4cfdb2(0x9d))[_0x4cfdb2(0xa8)]();if(!_0x23d727)throw CliErrors[_0x4cfdb2(0xb1)](_0x4cfdb2(0x9d),_0x4cfdb2(0xab));if(_0x23d727[_0x4cfdb2(0xa7)]>0x40)throw CliErrors[_0x4cfdb2(0x96)](_0x4cfdb2(0xa9));return _0x23d727;}export const roleCreate={'service':a164_0x771507(0x98),'command':a164_0x771507(0xaf),'description':a164_0x771507(0x9e),'risk':'write','flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x446015){readName(_0x446015);},async 'dryRun'(_0xf3a37c){const _0x32d7b4=a164_0x771507,_0x4a9497=readName(_0xf3a37c),_0x445053=_0xf3a37c[_0x32d7b4(0xaa)](_0x32d7b4(0x99))[_0x32d7b4(0xa8)]()||undefined;return asDryRunResult({'operation':_0x32d7b4(0xaf),'selector':{'appCode':_0xf3a37c[_0x32d7b4(0x97)],'roleName':_0x4a9497},'before':null,'after':{'roleName':_0x4a9497,'roleType':_0x32d7b4(0xad),'remark':_0x445053},'dryRun':!![],'backend':{'method':_0x32d7b4(0x9b),'path':CREATE_PATH},'warnings':[]},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x51cace){const _0x518b2a=a164_0x771507,_0x3ef43c=readName(_0x51cace),_0x2f745b=_0x51cace[_0x518b2a(0xaa)](_0x518b2a(0x99))['trim']()||undefined,_0x151789=await createAppRole({'appCode':_0x51cace['appCode'],'roleName':_0x3ef43c,..._0x2f745b?{'remark':_0x2f745b}:{}});return{'ok':!![],'data':{'operation':_0x518b2a(0xaf),'selector':{'appCode':_0x51cace[_0x518b2a(0x97)],'roleId':_0x151789['id'],'roleName':_0x3ef43c},'before':null,'after':projectRole(_0x151789),'dryRun':![],'backend':{'method':_0x518b2a(0x9b),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x151789[_0x518b2a(0xac)]+'\x20(id='+_0x151789['id']+')'};}};function a164_0x589c(_0x4b0710,_0x2fd351){_0x4b0710=_0x4b0710-0x96;const _0x11cbc7=a164_0x11cb();let _0x589c59=_0x11cbc7[_0x4b0710];return _0x589c59;}function a164_0x11cb(){const _0x56607d=['288873PCSYAN','4JMsAyw','12HozJSL','657453FYUuMx','/smartapi/permit/role/create','6gIHaUD','691838KiuPVw','1067220hBpCWy','length','trim','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','str','Pass\x20--name\x20<roleName>.','roleName','CUSTOM','9tIAoXq','create','1215904xzEDjW','flagMissing','1501205ocSgyb','validation','appCode','role','remark','802461lIrFlY','POST','2CyCjtx','name','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)'];a164_0x11cb=function(){return _0x56607d;};return a164_0x11cb();}
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
- const a165_0x1b011c=a165_0x1a6e;function a165_0x1a6e(_0x5b189d,_0xd05622){_0x5b189d=_0x5b189d-0x1e5;const _0x37a3ac=a165_0x37a3();let _0x1a6e5d=_0x37a3ac[_0x5b189d];return _0x1a6e5d;}(function(_0x19aa8e,_0x46e34b){const _0x24d74f=a165_0x1a6e,_0x2ad778=_0x19aa8e();while(!![]){try{const _0x1dad72=parseInt(_0x24d74f(0x1f1))/0x1*(parseInt(_0x24d74f(0x1fe))/0x2)+parseInt(_0x24d74f(0x1f4))/0x3*(parseInt(_0x24d74f(0x1f9))/0x4)+parseInt(_0x24d74f(0x1fb))/0x5*(-parseInt(_0x24d74f(0x1ef))/0x6)+-parseInt(_0x24d74f(0x1fa))/0x7+-parseInt(_0x24d74f(0x1ea))/0x8*(-parseInt(_0x24d74f(0x1f6))/0x9)+parseInt(_0x24d74f(0x1f8))/0xa+parseInt(_0x24d74f(0x1e5))/0xb*(-parseInt(_0x24d74f(0x1fc))/0xc);if(_0x1dad72===_0x46e34b)break;else _0x2ad778['push'](_0x2ad778['shift']());}catch(_0x24fa19){_0x2ad778['push'](_0x2ad778['shift']());}}}(a165_0x37a3,0xb207d));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a165_0x1b011c(0x1e8);function a165_0x37a3(){const _0x1c2f80=['Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','1bmEJtn','Deleted\x20role\x20','roleName','39ZLNGNR','role','6432570hrKyHO','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','5567800Pqzfbs','288836spLanR','6793143fnmEfW','35wbshMr','160092QFNmnb','POST','2366246mXLuJF','891JttEhm','\x20(id=','num','/smartapi/permit/role/delete','userCount','8dFcuwI','appCode','delete','Role\x20still\x20has\x20','high-risk-write','525486hIjmgW'];a165_0x37a3=function(){return _0x1c2f80;};return a165_0x37a3();}export const roleDelete={'service':a165_0x1b011c(0x1f5),'command':a165_0x1b011c(0x1ec),'description':a165_0x1b011c(0x1f0),'risk':a165_0x1b011c(0x1ee),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x589c2d){const _0x4b53ef=a165_0x1b011c,_0x55b42a=_0x589c2d[_0x4b53ef(0x1e7)]('id'),_0xff8e31=await getRoleById(_0x589c2d[_0x4b53ef(0x1eb)],_0x55b42a);return assertCustomRole(_0xff8e31,_0x4b53ef(0x1ec)),asDryRunResult({'operation':'delete','selector':{'appCode':_0x589c2d[_0x4b53ef(0x1eb)],'roleId':_0x55b42a,'roleName':_0xff8e31[_0x4b53ef(0x1f3)]},'before':projectRole(_0xff8e31),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0xff8e31[_0x4b53ef(0x1e9)]>0x0?[_0x4b53ef(0x1ed)+_0xff8e31['userCount']+_0x4b53ef(0x1f7)]:[]},{'method':_0x4b53ef(0x1fd),'url':DELETE_PATH});},async 'execute'(_0x9f62c8){const _0x5dcd59=a165_0x1b011c,_0x564a83=_0x9f62c8[_0x5dcd59(0x1e7)]('id'),_0x3f2205=await getRoleById(_0x9f62c8[_0x5dcd59(0x1eb)],_0x564a83);return assertCustomRole(_0x3f2205,_0x5dcd59(0x1ec)),await deleteAppRole(_0x564a83),{'ok':!![],'data':{'operation':_0x5dcd59(0x1ec),'selector':{'appCode':_0x9f62c8['appCode'],'roleId':_0x564a83,'roleName':_0x3f2205[_0x5dcd59(0x1f3)]},'before':projectRole(_0x3f2205),'after':null,'dryRun':![],'backend':{'method':_0x5dcd59(0x1fd),'path':DELETE_PATH},'warnings':[]},'message':_0x5dcd59(0x1f2)+_0x3f2205[_0x5dcd59(0x1f3)]+_0x5dcd59(0x1e6)+_0x564a83+')'};}};
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
- function a166_0x45a0(){const _0x761708=['read','roleType','258VWOuxg','role','465112cEYqUc','roleName','90nCkIZH','23xFvpys','num','19322MVsqVq','152IfDseC','Role\x20','appCode','5680587BAjYiA','detail','85141UxCNgf','55275WzATiH','27515hygpQS','171729TJtQzI'];a166_0x45a0=function(){return _0x761708;};return a166_0x45a0();}function a166_0x16ae(_0xe74e6b,_0x1b7704){_0xe74e6b=_0xe74e6b-0x12e;const _0x45a008=a166_0x45a0();let _0x16aeca=_0x45a008[_0xe74e6b];return _0x16aeca;}const a166_0x59edf7=a166_0x16ae;(function(_0x30dca3,_0x206e83){const _0x4e8392=a166_0x16ae,_0xde2474=_0x30dca3();while(!![]){try{const _0x350e77=-parseInt(_0x4e8392(0x13f))/0x1*(parseInt(_0x4e8392(0x12e))/0x2)+parseInt(_0x4e8392(0x135))/0x3+parseInt(_0x4e8392(0x13c))/0x4+parseInt(_0x4e8392(0x136))/0x5*(-parseInt(_0x4e8392(0x13a))/0x6)+parseInt(_0x4e8392(0x134))/0x7*(-parseInt(_0x4e8392(0x12f))/0x8)+-parseInt(_0x4e8392(0x137))/0x9*(-parseInt(_0x4e8392(0x13e))/0xa)+parseInt(_0x4e8392(0x132))/0xb;if(_0x350e77===_0x206e83)break;else _0xde2474['push'](_0xde2474['shift']());}catch(_0x4518f8){_0xde2474['push'](_0xde2474['shift']());}}}(a166_0x45a0,0x20738));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a166_0x59edf7(0x13b),'command':a166_0x59edf7(0x133),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a166_0x59edf7(0x138),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2a51e7){const _0x5e33a5=a166_0x59edf7,_0x1cf634=_0x2a51e7[_0x5e33a5(0x140)]('id'),_0x6b907b=await getRoleById(_0x2a51e7[_0x5e33a5(0x131)],_0x1cf634);return{'ok':!![],'data':{'role':projectRole(_0x6b907b)},'message':_0x5e33a5(0x130)+_0x6b907b[_0x5e33a5(0x13d)]+'\x20('+_0x6b907b[_0x5e33a5(0x139)]+')'};}};
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(_0x4a3519,_0x46accd){const _0x30225d=a167_0x5ef0,_0x18ae62=_0x4a3519();while(!![]){try{const _0x424ad4=parseInt(_0x30225d(0x142))/0x1+parseInt(_0x30225d(0x13e))/0x2+-parseInt(_0x30225d(0x13f))/0x3+-parseInt(_0x30225d(0x13d))/0x4+-parseInt(_0x30225d(0x140))/0x5*(parseInt(_0x30225d(0x141))/0x6)+parseInt(_0x30225d(0x13c))/0x7+parseInt(_0x30225d(0x143))/0x8;if(_0x424ad4===_0x46accd)break;else _0x18ae62['push'](_0x18ae62['shift']());}catch(_0x23a79a){_0x18ae62['push'](_0x18ae62['shift']());}}}(a167_0x35cb,0xa36af));import{roleList}from'../../commands/role/list.js';function a167_0x5ef0(_0xbf3a3f,_0x2daf7c){_0xbf3a3f=_0xbf3a3f-0x13c;const _0x35cb12=a167_0x35cb();let _0x5ef089=_0x35cb12[_0xbf3a3f];return _0x5ef089;}import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';function a167_0x35cb(){const _0x60b657=['1846676mJaVIK','2443176VeSJoH','2530107lQlyEP','113565SsVLDN','270uyPbDn','1247388uDRbGm','1148872sGBfDN','2687279sSbtXL'];a167_0x35cb=function(){return _0x60b657;};return a167_0x35cb();}import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ function 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 a168_0x5962ca=a168_0x4fc1;function a168_0x25fe(){const _0x2d785d=['type','pagesize','2784375ThdDXC','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','Invalid\x20--type\x20\x22','Filter\x20by\x20role\x20type','validation','\x20role(s)','63KuaKSO','Page\x20index\x20(1-based)','247674ARDSke','USER','Use\x20one\x20of:\x20','list','184848cdiyIU','filter','length','number','CUSTOM','read','1535768ZiLdCp','num','1197540FvMfZy','join','string','Found\x20','appCode','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','toUpperCase','roleType','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','462366DHUAvD','2137088XNFyuj','str','ADMIN','map','page','Page\x20size\x20(1-100)'];a168_0x25fe=function(){return _0x2d785d;};return a168_0x25fe();}(function(_0x5b3186,_0x5d6c68){const _0xa12a79=a168_0x4fc1,_0x47866e=_0x5b3186();while(!![]){try{const _0x2204af=parseInt(_0xa12a79(0x1d7))/0x1+-parseInt(_0xa12a79(0x1e8))/0x2+parseInt(_0xa12a79(0x1df))/0x3+-parseInt(_0xa12a79(0x1dd))/0x4+parseInt(_0xa12a79(0x1cb))/0x5+-parseInt(_0xa12a79(0x1d3))/0x6*(parseInt(_0xa12a79(0x1d1))/0x7)+parseInt(_0xa12a79(0x1c3))/0x8;if(_0x2204af===_0x5d6c68)break;else _0x47866e['push'](_0x47866e['shift']());}catch(_0x4f0711){_0x47866e['push'](_0x47866e['shift']());}}}(a168_0x25fe,0x66e1b));import{listAppRoles}from'../../core/api-client.js';function a168_0x4fc1(_0x2b1e29,_0x23c08a){_0x2b1e29=_0x2b1e29-0x1c3;const _0x25fe67=a168_0x25fe();let _0x4fc1b8=_0x25fe67[_0x2b1e29];return _0x4fc1b8;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a168_0x5962ca(0x1c5),'DEV',a168_0x5962ca(0x1d4),a168_0x5962ca(0x1db)];export const roleList={'service':'role','command':a168_0x5962ca(0x1d6),'description':a168_0x5962ca(0x1cc),'risk':a168_0x5962ca(0x1dc),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a168_0x5962ca(0x1c9),'type':a168_0x5962ca(0x1e1),'required':![],'description':a168_0x5962ca(0x1ce),'enum':ROLE_TYPES},{'name':a168_0x5962ca(0x1c7),'type':a168_0x5962ca(0x1da),'description':a168_0x5962ca(0x1d2),'default':0x1},{'name':a168_0x5962ca(0x1ca),'type':a168_0x5962ca(0x1da),'description':a168_0x5962ca(0x1c8),'default':0x64}],async 'validate'(_0x40d1d8){const _0x199326=a168_0x5962ca,_0x3b47a8=_0x40d1d8[_0x199326(0x1c4)](_0x199326(0x1c9))['trim']();if(_0x3b47a8&&!ROLE_TYPES['includes'](_0x3b47a8[_0x199326(0x1e5)]()))throw CliErrors[_0x199326(0x1cf)](_0x199326(0x1cd)+_0x3b47a8+'\x22.',_0x199326(0x1d5)+ROLE_TYPES[_0x199326(0x1e0)](',\x20')+'.');const _0x4728c2=_0x40d1d8[_0x199326(0x1de)](_0x199326(0x1c7),0x1),_0x537de4=_0x40d1d8[_0x199326(0x1de)]('pagesize',0x64);if(_0x4728c2<0x1)throw CliErrors[_0x199326(0x1cf)](_0x199326(0x1e4));if(_0x537de4<0x1||_0x537de4>0x64)throw CliErrors['validation'](_0x199326(0x1e7));},async 'execute'(_0x3d669b){const _0x4fefa0=a168_0x5962ca,_0x37469d=_0x3d669b[_0x4fefa0(0x1de)]('page',0x1)||0x1,_0x40c9fb=_0x3d669b[_0x4fefa0(0x1de)](_0x4fefa0(0x1ca),0x64)||0x64,_0x1831de=_0x3d669b[_0x4fefa0(0x1c4)](_0x4fefa0(0x1c9))['trim']()[_0x4fefa0(0x1e5)](),{items:_0x3b9b9b,paging:_0x225480}=await listAppRoles(_0x3d669b[_0x4fefa0(0x1e3)],{'currentPage':_0x37469d,'pageSize':_0x40c9fb}),_0x296e3b=_0x1831de?_0x3b9b9b[_0x4fefa0(0x1d8)](_0x4c1ddd=>_0x4c1ddd[_0x4fefa0(0x1e6)]===_0x1831de):_0x3b9b9b,_0x138fd2=_0x296e3b[_0x4fefa0(0x1c6)](projectRole);return{'ok':!![],'data':{'roles':_0x138fd2,'paging':_0x225480},'message':_0x4fefa0(0x1e2)+_0x138fd2[_0x4fefa0(0x1d9)]+_0x4fefa0(0x1d0)};}};
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)};}};