@lovrabet/rabetbase-cli 2.3.6 → 2.3.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.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/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.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/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -0
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analyze-cancel.js +1 -1
  79. package/lib/commands/db/analyze-start.js +1 -1
  80. package/lib/commands/db/analyze-status.js +1 -1
  81. package/lib/commands/db/create.js +1 -1
  82. package/lib/commands/db/delete.js +1 -1
  83. package/lib/commands/db/detail.js +1 -1
  84. package/lib/commands/db/diff.js +1 -1
  85. package/lib/commands/db/index.js +1 -1
  86. package/lib/commands/db/list.js +1 -1
  87. package/lib/commands/db/shared.js +1 -1
  88. package/lib/commands/db/tables.js +1 -1
  89. package/lib/commands/db/test.js +1 -1
  90. package/lib/commands/db/update.js +1 -1
  91. package/lib/commands/doctor.js +1 -1
  92. package/lib/commands/file/index.js +1 -0
  93. package/lib/commands/init/index.js +1 -1
  94. package/lib/commands/issue/index.js +1 -1
  95. package/lib/commands/issue/nudge.js +1 -1
  96. package/lib/commands/issue/report.js +1 -1
  97. package/lib/commands/issue/shared.js +1 -1
  98. package/lib/commands/logs/index.js +1 -1
  99. package/lib/commands/menu/index.js +1 -1
  100. package/lib/commands/menu/list.js +1 -1
  101. package/lib/commands/menu/shared/compare-table.js +1 -1
  102. package/lib/commands/menu/shared/index.js +1 -1
  103. package/lib/commands/menu/shared/inquirer.js +1 -1
  104. package/lib/commands/menu/shared/local-pages.js +1 -1
  105. package/lib/commands/menu/shared/logic.js +1 -1
  106. package/lib/commands/menu/shared/service.js +1 -1
  107. package/lib/commands/menu/shared/sync-core.js +1 -1
  108. package/lib/commands/menu/shared/update-core.js +1 -1
  109. package/lib/commands/menu/shared/valid-url.js +1 -1
  110. package/lib/commands/menu/sync.js +1 -1
  111. package/lib/commands/menu/update.js +1 -1
  112. package/lib/commands/page/generate-start.js +1 -1
  113. package/lib/commands/page/generate-status.js +1 -1
  114. package/lib/commands/page/index.js +1 -1
  115. package/lib/commands/page/pull.js +1 -1
  116. package/lib/commands/page/push.js +1 -1
  117. package/lib/commands/page/relation-audit.js +1 -1
  118. package/lib/commands/page/shared.js +1 -1
  119. package/lib/commands/page/standard-page-status.js +1 -1
  120. package/lib/commands/page/sync.js +1 -1
  121. package/lib/commands/permit/index.js +1 -1
  122. package/lib/commands/permit/page-get.js +1 -1
  123. package/lib/commands/permit/page-set.js +1 -1
  124. package/lib/commands/permit/role-apis-set.js +1 -1
  125. package/lib/commands/permit/role-menus-set.js +1 -1
  126. package/lib/commands/permit/role-menus.js +1 -1
  127. package/lib/commands/permit/shared.js +1 -1
  128. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  129. package/lib/commands/project/create/format-elapsed.js +1 -1
  130. package/lib/commands/project/create/main.js +1 -1
  131. package/lib/commands/project/create/non-interactive.js +1 -1
  132. package/lib/commands/project/create/project-template-path.js +1 -1
  133. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  134. package/lib/commands/project/create/use-format-code.js +1 -1
  135. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  136. package/lib/commands/project/index.js +1 -1
  137. package/lib/commands/project/init.js +1 -1
  138. package/lib/commands/project/upgrade.js +1 -1
  139. package/lib/commands/registry.js +1 -1
  140. package/lib/commands/role/create.js +1 -1
  141. package/lib/commands/role/delete.js +1 -1
  142. package/lib/commands/role/detail.js +1 -1
  143. package/lib/commands/role/index.js +1 -1
  144. package/lib/commands/role/list.js +1 -1
  145. package/lib/commands/role/shared.js +1 -1
  146. package/lib/commands/role/update.js +1 -1
  147. package/lib/commands/role/user-add.js +1 -1
  148. package/lib/commands/role/user-remove.js +1 -1
  149. package/lib/commands/role/user-resolve.js +1 -1
  150. package/lib/commands/run/index.js +1 -1
  151. package/lib/commands/schema.js +1 -1
  152. package/lib/commands/sql/create.js +1 -1
  153. package/lib/commands/sql/delete.js +1 -1
  154. package/lib/commands/sql/detail.js +1 -1
  155. package/lib/commands/sql/exec.js +1 -1
  156. package/lib/commands/sql/index.js +1 -1
  157. package/lib/commands/sql/list.js +1 -1
  158. package/lib/commands/sql/pull.js +1 -1
  159. package/lib/commands/sql/push.js +1 -1
  160. package/lib/commands/sql/save.js +1 -1
  161. package/lib/commands/sql/shared.js +1 -1
  162. package/lib/commands/sql/status.js +1 -1
  163. package/lib/commands/sql/validate.js +1 -1
  164. package/lib/commands/workspace/add.js +1 -1
  165. package/lib/commands/workspace/index.js +1 -1
  166. package/lib/commands/workspace/remove.js +1 -1
  167. package/lib/config/schema.js +1 -1
  168. package/lib/constant/cdn.js +1 -1
  169. package/lib/constant/cli.js +1 -1
  170. package/lib/constant/defaults.js +1 -1
  171. package/lib/constant/domain.js +1 -1
  172. package/lib/constant/env.js +1 -1
  173. package/lib/constant/output.js +1 -1
  174. package/lib/constant/paths.js +1 -1
  175. package/lib/constant/risk.js +1 -1
  176. package/lib/context/app-resolver.js +1 -1
  177. package/lib/context/auth-resolver.js +1 -1
  178. package/lib/context/config-loader.js +1 -1
  179. package/lib/context.js +1 -1
  180. package/lib/core/alias-resolver.js +1 -1
  181. package/lib/core/api-client.js +1 -1
  182. package/lib/core/bff/config.js +1 -1
  183. package/lib/core/bff/file-system.js +1 -1
  184. package/lib/core/bff/hash.js +1 -1
  185. package/lib/core/bff/lock.js +1 -1
  186. package/lib/core/bff/utils.js +1 -1
  187. package/lib/core/db-resolver.js +1 -1
  188. package/lib/core/page/file-system.js +1 -1
  189. package/lib/core/page/hash.js +1 -1
  190. package/lib/core/page/lock.js +1 -1
  191. package/lib/core/sql-sync/config.js +1 -1
  192. package/lib/core/sql-sync/file-system.js +1 -1
  193. package/lib/core/sql-sync/hash.js +1 -1
  194. package/lib/core/sql-sync/lock.js +1 -1
  195. package/lib/core/sql-sync/utils.js +1 -1
  196. package/lib/core/sql-validator.js +1 -1
  197. package/lib/errors.js +1 -1
  198. package/lib/framework/build-all-flags.js +1 -1
  199. package/lib/framework/flags.js +1 -1
  200. package/lib/framework/help.js +1 -1
  201. package/lib/framework/index.js +1 -1
  202. package/lib/framework/output.js +1 -1
  203. package/lib/framework/response.js +1 -1
  204. package/lib/framework/runner-alias.js +1 -1
  205. package/lib/framework/runner.js +1 -1
  206. package/lib/framework/schema-export.js +1 -1
  207. package/lib/framework/types.js +1 -1
  208. package/lib/generated/build-info.js +1 -1
  209. package/lib/help.js +1 -1
  210. package/lib/skills/main.js +1 -1
  211. package/lib/skills/npx-skills-add.js +1 -1
  212. package/lib/telemetry/cli-command-trace.js +1 -1
  213. package/lib/telemetry/cli-help-trace.js +1 -1
  214. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  215. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  216. package/lib/telemetry/send-cli-trace-log.js +1 -1
  217. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  218. package/lib/utils/ai_config.js +1 -1
  219. package/lib/utils/apply-jq-filter.js +1 -1
  220. package/lib/utils/cdn-config.js +1 -1
  221. package/lib/utils/check-sdk-version.js +1 -1
  222. package/lib/utils/cli-version-check.js +1 -1
  223. package/lib/utils/cli-version-policy.js +1 -1
  224. package/lib/utils/config.js +1 -1
  225. package/lib/utils/copy-directory.js +1 -1
  226. package/lib/utils/entity-with-id.js +1 -1
  227. package/lib/utils/file-utils.js +1 -1
  228. package/lib/utils/guides-cdn.js +1 -1
  229. package/lib/utils/http-client.js +1 -1
  230. package/lib/utils/is-non-interactive.js +1 -1
  231. package/lib/utils/logger.js +1 -1
  232. package/lib/utils/params.js +1 -1
  233. package/lib/utils/platform.js +1 -1
  234. package/lib/utils/rules-cdn.js +1 -1
  235. package/lib/utils/sleep.js +1 -1
  236. package/lib/utils/template-replacer.js +1 -1
  237. package/lib/utils/update-notice.js +1 -1
  238. package/lib/utils/version.js +1 -1
  239. package/lib/utils/with-active-cookie.js +1 -1
  240. package/lib/utils/write-cli-side-channel.js +1 -1
  241. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x252848,_0x46f1ac){const _0x440567=a127_0x2e9c,_0x3265ce=_0x252848();while(!![]){try{const _0xe895f9=parseInt(_0x440567(0x87))/0x1+-parseInt(_0x440567(0x8c))/0x2*(parseInt(_0x440567(0x88))/0x3)+parseInt(_0x440567(0x84))/0x4+parseInt(_0x440567(0x83))/0x5*(-parseInt(_0x440567(0x89))/0x6)+-parseInt(_0x440567(0x8a))/0x7*(parseInt(_0x440567(0x82))/0x8)+parseInt(_0x440567(0x86))/0x9*(parseInt(_0x440567(0x8d))/0xa)+parseInt(_0x440567(0x85))/0xb*(-parseInt(_0x440567(0x81))/0xc);if(_0xe895f9===_0x46f1ac)break;else _0x3265ce['push'](_0x3265ce['shift']());}catch(_0x1f2c97){_0x3265ce['push'](_0x3265ce['shift']());}}}(a127_0x5794,0x1ebaa));function a127_0x5794(){const _0x4c288d=['181363psCPRB','36309btGrpi','1280094pQEAtt','2387HsDiRq','replace','4xWvfeQ','75530tIazra','12OuSnhS','1720Ghnjfq','5YostkC','490788XIadTI','1116137waKEjV','279CUdAJy'];a127_0x5794=function(){return _0x4c288d;};return a127_0x5794();}function a127_0x2e9c(_0x5bb695,_0x48c647){_0x5bb695=_0x5bb695-0x81;const _0x5794e9=a127_0x5794();let _0x2e9c5d=_0x5794e9[_0x5bb695];return _0x2e9c5d;}export function formatElapsed(_0x372de3){const _0x464e16=a127_0x2e9c,_0x4e6988=Date['now']()-_0x372de3;if(_0x4e6988<0x3e8)return _0x4e6988+'ms';const _0xadf712=(_0x4e6988/0x3e8)['toFixed'](0x2),_0x2ceff1=_0xadf712[_0x464e16(0x8b)](/\.?0+$/u,'');return _0x2ceff1+'s';}
1
+ function a129_0x1e0a(_0x133365,_0x3cf186){_0x133365=_0x133365-0x167;const _0x517711=a129_0x5177();let _0x1e0a81=_0x517711[_0x133365];return _0x1e0a81;}(function(_0x10f157,_0x119633){const _0x56a339=a129_0x1e0a,_0xd98a0d=_0x10f157();while(!![]){try{const _0x300afa=-parseInt(_0x56a339(0x16f))/0x1*(-parseInt(_0x56a339(0x169))/0x2)+-parseInt(_0x56a339(0x16a))/0x3+-parseInt(_0x56a339(0x168))/0x4*(parseInt(_0x56a339(0x167))/0x5)+-parseInt(_0x56a339(0x171))/0x6+-parseInt(_0x56a339(0x170))/0x7+-parseInt(_0x56a339(0x16c))/0x8+parseInt(_0x56a339(0x16e))/0x9;if(_0x300afa===_0x119633)break;else _0xd98a0d['push'](_0xd98a0d['shift']());}catch(_0x3cbd57){_0xd98a0d['push'](_0xd98a0d['shift']());}}}(a129_0x5177,0xa6561));function a129_0x5177(){const _0x4f40a7=['toFixed','3147280AbkdBi','now','37117035vuwkAL','4BWyAUU','4392899GNxBad','7010328uzJMiS','5rxyCso','5235544iAXEEH','464762OCODmz','2622255EiIOUA'];a129_0x5177=function(){return _0x4f40a7;};return a129_0x5177();}export function formatElapsed(_0x3f2f2f){const _0x4a72c9=a129_0x1e0a,_0x5c7b88=Date[_0x4a72c9(0x16d)]()-_0x3f2f2f;if(_0x5c7b88<0x3e8)return _0x5c7b88+'ms';const _0x4f5bbd=(_0x5c7b88/0x3e8)[_0x4a72c9(0x16b)](0x2),_0x11153a=_0x4f5bbd['replace'](/\.?0+$/u,'');return _0x11153a+'s';}
@@ -1 +1 @@
1
- (function(_0x2f8cb3,_0x2d17f0){const _0xa142de=a128_0x382f,_0x44ef4c=_0x2f8cb3();while(!![]){try{const _0xc675f=parseInt(_0xa142de(0x226))/0x1*(parseInt(_0xa142de(0x1e1))/0x2)+parseInt(_0xa142de(0x1f4))/0x3+parseInt(_0xa142de(0x214))/0x4*(-parseInt(_0xa142de(0x200))/0x5)+-parseInt(_0xa142de(0x212))/0x6*(parseInt(_0xa142de(0x1f8))/0x7)+parseInt(_0xa142de(0x1d8))/0x8*(parseInt(_0xa142de(0x21b))/0x9)+parseInt(_0xa142de(0x1fd))/0xa*(parseInt(_0xa142de(0x20d))/0xb)+parseInt(_0xa142de(0x208))/0xc*(-parseInt(_0xa142de(0x219))/0xd);if(_0xc675f===_0x2d17f0)break;else _0x44ef4c['push'](_0x44ef4c['shift']());}catch(_0xd11d8a){_0x44ef4c['push'](_0x44ef4c['shift']());}}}(a128_0x335f,0x2ab34));import a128_0x168414 from'path';import a128_0x15cac6 from'fs';import a128_0x1c108a from'chalk';import a128_0x17b9dd 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 a128_0x382f(_0x4f08a0,_0x44f5a5){_0x4f08a0=_0x4f08a0-0x1d3;const _0x335f14=a128_0x335f();let _0x382f93=_0x335f14[_0x4f08a0];return _0x382f93;}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';function a128_0x335f(){const _0x4968a1=['1.0.0','name','green','utf8','toLocaleString','547Rmdzhg','更新\x20package.json\x20失败','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','更新\x20package.json\x20name','\x20\x202.\x20Pull\x20API\x20configuration:\x20','trim','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','existsSync','cookie','accessSync','projectCode','\x20config\x20set\x20appcode\x20<app-code>\x27','2305928iUaxhZ','配置应用AppCode失败','projectName','test','fail','\x20|\x20AppCode:\x20','readFileSync','Project\x20directory\x20','dirname','68FZXJST','gray','log','needsUpgrade','appCode','setLogPath','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','√\x20package.json\x20updated:\x20name=','package.json','API\x20configuration\x20pulled:\x20','version','🚀\x20Next\x20Steps:','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20run\x20start','API\x20配置拉取异常','join','belowMinimum','rmSync','912432kWthom','\x20dataset(s),\x20generated\x20','\x20√\x20','chdir','584878xtftQt','length','keys','production','\x20\x201.\x20Start\x20project:\x20','4470oXulzP','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','清理项目目录失败:\x20','55GyjVwW','\x20|\x20Default:\x20','stableVersion','bold','√\x20Configuration\x20file\x20created,\x20Apps:\x20','message','stringify','\x20&&\x20','12YRRwEx','cwd','modelCount','currentVersion','error','2959jdKAPX','Format\x20code','defaultApp','info','项目创建完成:\x20','24aDgsvx','cyan','58028hgjVzr','repeat','resolve','W_OK','env','812929GXmZRx','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','9vVDjpP','\x20model(s)','Project\x20name\x20cannot\x20be\x20empty','parse','create','\x20api\x20pull'];a128_0x335f=function(){return _0x4968a1;};return a128_0x335f();}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(_0x368f90){const _0x3164d9=a128_0x382f,_0x1dd3d2=await checkCliVersion();(_0x1dd3d2['needsUpgrade']||_0x1dd3d2['belowMinimum'])&&(printCliUpgradeWarning(_0x1dd3d2),assertCliVersionSupported(_0x1dd3d2),logger[_0x3164d9(0x210)](_0x3164d9(0x21f),'CLI\x20版本检查',{'currentVersion':_0x1dd3d2[_0x3164d9(0x20b)],'stableVersion':_0x1dd3d2[_0x3164d9(0x202)],'minimumVersion':_0x1dd3d2['minimumVersion'],'needsUpgrade':_0x1dd3d2[_0x3164d9(0x1e4)],'belowMinimum':_0x1dd3d2[_0x3164d9(0x1f2)]}));if(_0x368f90[_0x3164d9(0x1d6)]&&_0x368f90[_0x3164d9(0x1e5)])await runCreate({'projectName':_0x368f90[_0x3164d9(0x1d6)],'appCode':_0x368f90[_0x3164d9(0x1e5)],'env':_0x368f90[_0x3164d9(0x218)]},_0x368f90);else{if(_0x368f90[_0x3164d9(0x1d6)]){const _0x4019ee=await selectSingleAppcode(_0x368f90[_0x3164d9(0x1d4)]);await runCreate({'projectName':_0x368f90[_0x3164d9(0x1d6)],'appCode':_0x4019ee||undefined,'env':_0x368f90[_0x3164d9(0x218)]},_0x368f90);}else await guidedCreateProject(_0x27a2f2=>runCreate(_0x27a2f2,_0x368f90),_0x368f90[_0x3164d9(0x218)],_0x368f90[_0x3164d9(0x1d4)]);}}async function runCreate(_0x5a0a3b,_0x19422d){const _0x23c006=a128_0x382f;if(!_0x5a0a3b['projectName']||_0x5a0a3b['projectName'][_0x23c006(0x22b)]()==='')throw new Error(_0x23c006(0x21d));const _0x3eff13=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3eff13[_0x23c006(0x1db)](_0x5a0a3b['projectName']))throw new Error(_0x23c006(0x1e7));if(_0x5a0a3b['projectName'][_0x23c006(0x1f9)]>0x64)throw new Error(_0x23c006(0x1ed));const _0x182ec9=a128_0x168414['resolve'](process[_0x23c006(0x209)](),_0x5a0a3b['projectName']);if(a128_0x15cac6[_0x23c006(0x1d3)](_0x182ec9))throw new Error(_0x23c006(0x1df)+_0x5a0a3b[_0x23c006(0x1da)]+'\x20already\x20exists');try{a128_0x15cac6[_0x23c006(0x1d5)](a128_0x168414[_0x23c006(0x1e0)](_0x182ec9),a128_0x15cac6['constants'][_0x23c006(0x217)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x23c006(0x1e6)](_0x182ec9),logger[_0x23c006(0x210)]('create','开始创建项目:\x20'+_0x5a0a3b[_0x23c006(0x1da)],{'projectDir':_0x182ec9,'appCode':_0x5a0a3b[_0x23c006(0x1e5)]}),console['log'](),console[_0x23c006(0x1e3)](a128_0x1c108a[_0x23c006(0x223)](_0x23c006(0x1f6))+'Project\x20name:\x20'+a128_0x1c108a['green'](_0x5a0a3b[_0x23c006(0x1da)])+(_0x5a0a3b[_0x23c006(0x1e5)]?_0x23c006(0x1dd)+a128_0x1c108a[_0x23c006(0x213)](_0x5a0a3b[_0x23c006(0x1e5)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x5a0a3b['projectName'])),await updatePackageJsonName(_0x5a0a3b['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x5a0a3b['projectName'])),await runTask(_0x23c006(0x20e),()=>formatProjectCode(_0x5a0a3b['projectName'])),await configureAppCode(_0x5a0a3b[_0x23c006(0x1da)],_0x5a0a3b[_0x23c006(0x1e5)]||'',_0x5a0a3b[_0x23c006(0x218)]);let _0x567646=![];if(_0x5a0a3b[_0x23c006(0x1e5)]){console['log']('*\x20Pulling\x20API\x20configuration...');const _0x32e30d=process[_0x23c006(0x209)]();try{process[_0x23c006(0x1f7)](_0x182ec9);const _0x53326c=_0x5a0a3b[_0x23c006(0x218)]||_0x23c006(0x1fb);initEnv(_0x53326c);const {configArray:_0x1a5e7b}=await fetchModelList(_0x5a0a3b[_0x23c006(0x1e5)],_0x19422d['cookie']||''),_0x2619f6=DEFAULT_API_DIR,_0x26711d=await generateApiFile(_0x1a5e7b,'',_0x5a0a3b['appCode'],!![],_0x53326c,_0x2619f6);console[_0x23c006(0x1e3)]('√\x20Pulled\x20'+_0x1a5e7b['length']+_0x23c006(0x1f5)+_0x26711d[_0x23c006(0x20a)]+_0x23c006(0x21c)),logger[_0x23c006(0x210)](_0x23c006(0x21f),_0x23c006(0x1ea)+_0x5a0a3b['appCode']);}catch(_0x57bdea){_0x567646=!![],console[_0x23c006(0x1e3)](_0x23c006(0x22c)),logger['warn']('create',_0x23c006(0x1f0),{'error':_0x57bdea instanceof Error?_0x57bdea[_0x23c006(0x205)]:String(_0x57bdea)});}finally{process['chdir'](_0x32e30d);}}logger['success'](_0x23c006(0x21f),_0x23c006(0x211)+_0x5a0a3b['projectName']),console[_0x23c006(0x1e3)](),console[_0x23c006(0x1e3)](a128_0x1c108a[_0x23c006(0x223)]('─'['repeat'](0x3c))),console['log'](a128_0x1c108a['cyan'][_0x23c006(0x203)](_0x23c006(0x1ec))),console[_0x23c006(0x1e3)](),console[_0x23c006(0x1e3)](_0x23c006(0x1fc)+a128_0x1c108a[_0x23c006(0x213)][_0x23c006(0x203)]('cd\x20'+_0x5a0a3b[_0x23c006(0x1da)]+_0x23c006(0x207)+CLI_BIN_NAME+_0x23c006(0x1ef))),_0x567646&&console[_0x23c006(0x1e3)](_0x23c006(0x22a)+a128_0x1c108a[_0x23c006(0x213)][_0x23c006(0x203)](CLI_BIN_NAME+_0x23c006(0x220))),console[_0x23c006(0x1e3)](a128_0x1c108a[_0x23c006(0x223)]('─'[_0x23c006(0x215)](0x3c)));}catch(_0x2336ec){logger[_0x23c006(0x20c)]('create','项目创建失败:\x20'+_0x5a0a3b[_0x23c006(0x1da)],{'error':_0x2336ec instanceof Error?_0x2336ec[_0x23c006(0x205)]:String(_0x2336ec)});try{a128_0x15cac6['existsSync'](_0x182ec9)&&(console[_0x23c006(0x1e3)](_0x23c006(0x1fe)+_0x182ec9),a128_0x15cac6[_0x23c006(0x1f3)](_0x182ec9,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x23c006(0x21f),_0x23c006(0x1ff)+_0x182ec9);}throw _0x2336ec;}}async function runTask(_0x305eaf,_0x26a89e){const _0x3f8042=a128_0x382f,_0x5251cd=a128_0x17b9dd(_0x305eaf+'...')['start']();try{const _0x1e2354=await _0x26a89e();_0x5251cd['stop'](),console['log'](''+a128_0x1c108a[_0x3f8042(0x223)](_0x3f8042(0x1f6))+_0x305eaf+'\x20'+a128_0x1c108a[_0x3f8042(0x1e2)]('['+_0x1e2354+']'));}catch(_0x50c81a){_0x5251cd[_0x3f8042(0x1dc)](_0x305eaf);throw _0x50c81a;}}async function updatePackageJsonName(_0x32a451){const _0x21ab23=a128_0x382f,_0x3100f4=a128_0x168414[_0x21ab23(0x216)](process['cwd'](),_0x32a451),_0x5d5237=a128_0x168414[_0x21ab23(0x1f1)](_0x3100f4,_0x21ab23(0x1e9));try{console['log']('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x5710ca=getRabetbaseCliPackageRoot(),_0x1407bc=a128_0x168414['join'](_0x5710ca,'package.json');let _0x1914d5=_0x21ab23(0x221);try{const _0x50b957=JSON['parse'](a128_0x15cac6[_0x21ab23(0x1de)](_0x1407bc,_0x21ab23(0x224)));_0x1914d5=_0x50b957['version']||'1.0.0';}catch{}const _0x1d2d6c=a128_0x15cac6[_0x21ab23(0x1de)](_0x5d5237,_0x21ab23(0x224)),_0x2dbf4c=JSON[_0x21ab23(0x21e)](_0x1d2d6c);_0x2dbf4c[_0x21ab23(0x222)]=_0x32a451,_0x2dbf4c['description']=_0x32a451+_0x21ab23(0x1ee)+_0x1914d5,a128_0x15cac6['writeFileSync'](_0x5d5237,JSON[_0x21ab23(0x206)](_0x2dbf4c,null,0x2)+'\x0a',_0x21ab23(0x224)),console['log'](_0x21ab23(0x1e8)+_0x32a451),logger[_0x21ab23(0x210)]('create',_0x21ab23(0x229));}catch(_0x2e665f){logger[_0x21ab23(0x20c)](_0x21ab23(0x21f),_0x21ab23(0x227));throw _0x2e665f;}}async function configureAppCode(_0x1622ba,_0x5cae60,_0x24ea9b){const _0x360dca=a128_0x382f,_0x42ce3c=a128_0x168414[_0x360dca(0x216)](process[_0x360dca(0x209)](),_0x1622ba),_0x30218c=a128_0x168414[_0x360dca(0x1f1)](_0x42ce3c,NEW_CONFIG_NAME);try{_0x5cae60?console[_0x360dca(0x1e3)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x1622ba+':\x20'+_0x5cae60):console[_0x360dca(0x1e3)](_0x360dca(0x21a)+_0x1622ba);const _0x32086f=getRabetbaseCliPackageRoot(),_0x1bb71b=a128_0x168414[_0x360dca(0x1f1)](_0x32086f,'package.json');let _0x1d4b3a=_0x360dca(0x221);try{const _0x37d08c=JSON['parse'](a128_0x15cac6[_0x360dca(0x1de)](_0x1bb71b,_0x360dca(0x224)));_0x1d4b3a=_0x37d08c[_0x360dca(0x1eb)]||'1.0.0';}catch{}const _0x11ec7f=readConfig(),_0x3d3cf5=typeof _0x11ec7f['env']==='string'?_0x11ec7f[_0x360dca(0x218)]:undefined,_0x5c9c98={};for(const _0x52567c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x11ec7f[_0x52567c]!=null)_0x5c9c98[_0x52567c]=_0x11ec7f[_0x52567c];}const _0xbf3a25=buildCanonicalProjectConfig(_0x5c9c98,{'appCodes':_0x5cae60?[_0x5cae60]:[],'env':_0x24ea9b||_0x3d3cf5||_0x360dca(0x1fb),'metadata':{'createdAt':new Date()[_0x360dca(0x225)](),'version':_0x1d4b3a}});writeConfigFile(_0x30218c,_0xbf3a25),_0x5cae60?console[_0x360dca(0x1e3)](_0x360dca(0x204)+Object[_0x360dca(0x1fa)](_0xbf3a25['apps']||{})[_0x360dca(0x1f1)](',\x20')+_0x360dca(0x201)+_0xbf3a25[_0x360dca(0x20f)]):console[_0x360dca(0x1e3)](_0x360dca(0x228)+CLI_BIN_NAME+_0x360dca(0x1d7)),logger['info'](_0x360dca(0x21f),'配置应用AppCode:\x20'+_0x5cae60);}catch(_0x3aac6a){logger[_0x360dca(0x20c)]('create',_0x360dca(0x1d9));}}
1
+ (function(_0x5016dc,_0x41c2e7){const _0x5319dc=a130_0x4fff,_0x253b9a=_0x5016dc();while(!![]){try{const _0x2db88a=parseInt(_0x5319dc(0x9a))/0x1*(parseInt(_0x5319dc(0xc0))/0x2)+-parseInt(_0x5319dc(0x9d))/0x3+-parseInt(_0x5319dc(0x95))/0x4+parseInt(_0x5319dc(0xbd))/0x5*(parseInt(_0x5319dc(0x94))/0x6)+parseInt(_0x5319dc(0xa2))/0x7*(parseInt(_0x5319dc(0xce))/0x8)+-parseInt(_0x5319dc(0xe7))/0x9*(parseInt(_0x5319dc(0xe5))/0xa)+parseInt(_0x5319dc(0xbf))/0xb*(-parseInt(_0x5319dc(0xb6))/0xc);if(_0x2db88a===_0x41c2e7)break;else _0x253b9a['push'](_0x253b9a['shift']());}catch(_0x58aaf5){_0x253b9a['push'](_0x253b9a['shift']());}}}(a130_0x17f6,0x6f7a8));import a130_0x46145a from'path';import a130_0x3746d6 from'fs';import a130_0x804285 from'chalk';import a130_0x26606d 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 a130_0x4fff(_0x9a6810,_0x47f72a){_0x9a6810=_0x9a6810-0x86;const _0x17f641=a130_0x17f6();let _0x4fff64=_0x17f641[_0x9a6810];return _0x4fff64;}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(_0x5df80e){const _0x3c0a58=a130_0x4fff,_0x466169=await checkCliVersion();(_0x466169[_0x3c0a58(0xb0)]||_0x466169[_0x3c0a58(0xa3)])&&(printCliUpgradeWarning(_0x466169),assertCliVersionSupported(_0x466169),logger[_0x3c0a58(0xdf)]('create',_0x3c0a58(0xd9),{'currentVersion':_0x466169[_0x3c0a58(0xa4)],'stableVersion':_0x466169[_0x3c0a58(0xd3)],'minimumVersion':_0x466169['minimumVersion'],'needsUpgrade':_0x466169[_0x3c0a58(0xb0)],'belowMinimum':_0x466169['belowMinimum']}));if(_0x5df80e[_0x3c0a58(0xd5)]&&_0x5df80e[_0x3c0a58(0xc7)])await runCreate({'projectName':_0x5df80e[_0x3c0a58(0xd5)],'appCode':_0x5df80e[_0x3c0a58(0xc7)],'env':_0x5df80e[_0x3c0a58(0x9c)]},_0x5df80e);else{if(_0x5df80e[_0x3c0a58(0xd5)]){const _0x27f459=await selectSingleAppcode(_0x5df80e[_0x3c0a58(0xb8)]);await runCreate({'projectName':_0x5df80e[_0x3c0a58(0xd5)],'appCode':_0x27f459||undefined,'env':_0x5df80e[_0x3c0a58(0x9c)]},_0x5df80e);}else await guidedCreateProject(_0x33cda3=>runCreate(_0x33cda3,_0x5df80e),_0x5df80e[_0x3c0a58(0x9c)],_0x5df80e[_0x3c0a58(0xb8)]);}}async function runCreate(_0x48bbd2,_0x9ac12d){const _0x3acf67=a130_0x4fff;if(!_0x48bbd2[_0x3acf67(0x98)]||_0x48bbd2[_0x3acf67(0x98)][_0x3acf67(0xe8)]()==='')throw new Error(_0x3acf67(0xc4));const _0x3a9029=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3a9029[_0x3acf67(0xa1)](_0x48bbd2[_0x3acf67(0x98)]))throw new Error(_0x3acf67(0xde));if(_0x48bbd2[_0x3acf67(0x98)][_0x3acf67(0xac)]>0x64)throw new Error(_0x3acf67(0xaf));const _0x51372d=a130_0x46145a[_0x3acf67(0x9e)](process[_0x3acf67(0x92)](),_0x48bbd2[_0x3acf67(0x98)]);if(a130_0x3746d6[_0x3acf67(0x90)](_0x51372d))throw new Error(_0x3acf67(0x97)+_0x48bbd2['projectName']+_0x3acf67(0xc3));try{a130_0x3746d6[_0x3acf67(0xbc)](a130_0x46145a[_0x3acf67(0xc9)](_0x51372d),a130_0x3746d6[_0x3acf67(0xdb)]['W_OK']);}catch{throw new Error(_0x3acf67(0x89));}logger['setLogPath'](_0x51372d),logger[_0x3acf67(0xdf)](_0x3acf67(0x86),_0x3acf67(0xa6)+_0x48bbd2['projectName'],{'projectDir':_0x51372d,'appCode':_0x48bbd2[_0x3acf67(0xc7)]}),console[_0x3acf67(0xda)](),console[_0x3acf67(0xda)](a130_0x804285[_0x3acf67(0xb5)](_0x3acf67(0x96))+_0x3acf67(0xd0)+a130_0x804285[_0x3acf67(0xb5)](_0x48bbd2[_0x3acf67(0x98)])+(_0x48bbd2[_0x3acf67(0xc7)]?_0x3acf67(0x91)+a130_0x804285['cyan'](_0x48bbd2[_0x3acf67(0xc7)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x48bbd2[_0x3acf67(0x98)])),await updatePackageJsonName(_0x48bbd2[_0x3acf67(0x98)]),await runTask(_0x3acf67(0xb2),()=>installDependencies(_0x48bbd2[_0x3acf67(0x98)])),await runTask(_0x3acf67(0xdd),()=>formatProjectCode(_0x48bbd2['projectName'])),await configureAppCode(_0x48bbd2['projectName'],_0x48bbd2[_0x3acf67(0xc7)]||'',_0x48bbd2['env']);let _0x28d45d=![];if(_0x48bbd2[_0x3acf67(0xc7)]){console[_0x3acf67(0xda)]('*\x20Pulling\x20API\x20configuration...');const _0x193757=process[_0x3acf67(0x92)]();try{process['chdir'](_0x51372d);const _0x2f5ce6=_0x48bbd2['env']||_0x3acf67(0xcb);initEnv(_0x2f5ce6);const {configArray:_0x2f16c9}=await fetchModelList(_0x48bbd2[_0x3acf67(0xc7)],_0x9ac12d[_0x3acf67(0xb8)]||''),_0x6223a6=DEFAULT_API_DIR,_0x1ef866=await generateApiFile(_0x2f16c9,'',_0x48bbd2[_0x3acf67(0xc7)],!![],_0x2f5ce6,_0x6223a6);console[_0x3acf67(0xda)](_0x3acf67(0xd4)+_0x2f16c9[_0x3acf67(0xac)]+'\x20dataset(s),\x20generated\x20'+_0x1ef866['modelCount']+_0x3acf67(0xb3)),logger[_0x3acf67(0xdf)](_0x3acf67(0x86),_0x3acf67(0xca)+_0x48bbd2[_0x3acf67(0xc7)]);}catch(_0x923c3a){_0x28d45d=!![],console[_0x3acf67(0xda)](_0x3acf67(0xc2)),logger[_0x3acf67(0x87)](_0x3acf67(0x86),_0x3acf67(0xe1),{'error':_0x923c3a instanceof Error?_0x923c3a['message']:String(_0x923c3a)});}finally{process[_0x3acf67(0xa5)](_0x193757);}}logger[_0x3acf67(0xc6)](_0x3acf67(0x86),_0x3acf67(0xad)+_0x48bbd2['projectName']),console[_0x3acf67(0xda)](),console[_0x3acf67(0xda)](a130_0x804285[_0x3acf67(0xb5)]('─'[_0x3acf67(0x88)](0x3c))),console[_0x3acf67(0xda)](a130_0x804285[_0x3acf67(0xba)]['bold']('🚀\x20Next\x20Steps:')),console[_0x3acf67(0xda)](),console[_0x3acf67(0xda)](_0x3acf67(0xbe)+a130_0x804285['cyan'][_0x3acf67(0xe6)](_0x3acf67(0x93)+_0x48bbd2[_0x3acf67(0x98)]+_0x3acf67(0xd2)+CLI_BIN_NAME+'\x20run\x20start')),_0x28d45d&&console['log']('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a130_0x804285[_0x3acf67(0xba)][_0x3acf67(0xe6)](CLI_BIN_NAME+_0x3acf67(0xa9))),console[_0x3acf67(0xda)](a130_0x804285['green']('─'[_0x3acf67(0x88)](0x3c)));}catch(_0x1113f8){logger[_0x3acf67(0xc1)](_0x3acf67(0x86),_0x3acf67(0xe2)+_0x48bbd2[_0x3acf67(0x98)],{'error':_0x1113f8 instanceof Error?_0x1113f8[_0x3acf67(0xd6)]:String(_0x1113f8)});try{a130_0x3746d6[_0x3acf67(0x90)](_0x51372d)&&(console['log'](_0x3acf67(0xa0)+_0x51372d),a130_0x3746d6[_0x3acf67(0xab)](_0x51372d,{'recursive':!![],'force':!![]}));}catch{logger[_0x3acf67(0x87)](_0x3acf67(0x86),_0x3acf67(0xcf)+_0x51372d);}throw _0x1113f8;}}async function runTask(_0xebaf3,_0xc243e3){const _0x3e4f3a=a130_0x4fff,_0x5f43b2=a130_0x26606d(_0xebaf3+_0x3e4f3a(0x99))[_0x3e4f3a(0xd7)]();try{const _0x5694f7=await _0xc243e3();_0x5f43b2[_0x3e4f3a(0x8b)](),console[_0x3e4f3a(0xda)](''+a130_0x804285['green'](_0x3e4f3a(0x96))+_0xebaf3+'\x20'+a130_0x804285[_0x3e4f3a(0x9b)]('['+_0x5694f7+']'));}catch(_0x53b2f7){_0x5f43b2['fail'](_0xebaf3);throw _0x53b2f7;}}function a130_0x17f6(){const _0x5e4abb=['11IWnxfM','12ZRdiqT','error','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20already\x20exists','Project\x20name\x20cannot\x20be\x20empty','*\x20Configuring\x20AppCode\x20for\x20project\x20','success','appCode','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','dirname','API\x20configuration\x20pulled:\x20','production','√\x20Configuration\x20file\x20created,\x20Apps:\x20','√\x20package.json\x20updated:\x20name=','617176JVEgOG','清理项目目录失败:\x20','Project\x20name:\x20','1.0.0','\x20&&\x20','stableVersion','√\x20Pulled\x20','projectCode','message','start','name','CLI\x20版本检查','log','constants','description','Format\x20code','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','info','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','API\x20配置拉取异常','项目创建失败:\x20','配置应用AppCode:\x20','join','958500KcgLXJ','bold','36BpJcQM','trim','create','warn','repeat','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','stringify','stop','更新\x20package.json\x20失败','keys','\x20config\x20set\x20appcode\x20<app-code>\x27','utf8','existsSync','\x20|\x20AppCode:\x20','cwd','cd\x20','1349976JEaEqg','937356DdmbkJ','\x20√\x20','Project\x20directory\x20','projectName','...','142966ALJcqn','gray','env','332859IrZzzK','resolve','更新\x20package.json\x20name','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','test','49iycSAQ','belowMinimum','currentVersion','chdir','开始创建项目:\x20','apps','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20api\x20pull','\x20Generated\x20by\x20rabetbase\x20cli\x20','rmSync','length','项目创建完成:\x20','parse','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','needsUpgrade','package.json','Install\x20dependencies','\x20model(s)','readFileSync','green','7950108xYzdge','version','cookie','writeFileSync','cyan','string','accessSync','10vXwLmY','\x20\x201.\x20Start\x20project:\x20'];a130_0x17f6=function(){return _0x5e4abb;};return a130_0x17f6();}async function updatePackageJsonName(_0x3050f8){const _0x16ad6b=a130_0x4fff,_0x5dd4ad=a130_0x46145a[_0x16ad6b(0x9e)](process[_0x16ad6b(0x92)](),_0x3050f8),_0x92d3f3=a130_0x46145a['join'](_0x5dd4ad,_0x16ad6b(0xb1));try{console[_0x16ad6b(0xda)](_0x16ad6b(0xc8));const _0x11e947=getRabetbaseCliPackageRoot(),_0xece72f=a130_0x46145a[_0x16ad6b(0xe4)](_0x11e947,_0x16ad6b(0xb1));let _0x3fc976=_0x16ad6b(0xd1);try{const _0x2c5458=JSON[_0x16ad6b(0xae)](a130_0x3746d6[_0x16ad6b(0xb4)](_0xece72f,'utf8'));_0x3fc976=_0x2c5458[_0x16ad6b(0xb7)]||_0x16ad6b(0xd1);}catch{}const _0x2a3054=a130_0x3746d6['readFileSync'](_0x92d3f3,'utf8'),_0x33a176=JSON[_0x16ad6b(0xae)](_0x2a3054);_0x33a176[_0x16ad6b(0xd8)]=_0x3050f8,_0x33a176[_0x16ad6b(0xdc)]=_0x3050f8+_0x16ad6b(0xaa)+_0x3fc976,a130_0x3746d6[_0x16ad6b(0xb9)](_0x92d3f3,JSON[_0x16ad6b(0x8a)](_0x33a176,null,0x2)+'\x0a',_0x16ad6b(0x8f)),console[_0x16ad6b(0xda)](_0x16ad6b(0xcd)+_0x3050f8),logger[_0x16ad6b(0xdf)](_0x16ad6b(0x86),_0x16ad6b(0x9f));}catch(_0x12c57c){logger['error'](_0x16ad6b(0x86),_0x16ad6b(0x8c));throw _0x12c57c;}}async function configureAppCode(_0x31e452,_0xb7e70d,_0x11bc75){const _0x22789b=a130_0x4fff,_0x3ac834=a130_0x46145a[_0x22789b(0x9e)](process[_0x22789b(0x92)](),_0x31e452),_0x59de8c=a130_0x46145a[_0x22789b(0xe4)](_0x3ac834,NEW_CONFIG_NAME);try{_0xb7e70d?console['log'](_0x22789b(0xc5)+_0x31e452+':\x20'+_0xb7e70d):console[_0x22789b(0xda)](_0x22789b(0xa8)+_0x31e452);const _0x12b619=getRabetbaseCliPackageRoot(),_0x76c442=a130_0x46145a['join'](_0x12b619,_0x22789b(0xb1));let _0x2c4dd7=_0x22789b(0xd1);try{const _0x2481e7=JSON[_0x22789b(0xae)](a130_0x3746d6[_0x22789b(0xb4)](_0x76c442,_0x22789b(0x8f)));_0x2c4dd7=_0x2481e7[_0x22789b(0xb7)]||'1.0.0';}catch{}const _0x322ed1=readConfig(),_0x1641a8=typeof _0x322ed1[_0x22789b(0x9c)]===_0x22789b(0xbb)?_0x322ed1['env']:undefined,_0x36615a={};for(const _0x39a62a of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x322ed1[_0x39a62a]!=null)_0x36615a[_0x39a62a]=_0x322ed1[_0x39a62a];}const _0x10e51a=buildCanonicalProjectConfig(_0x36615a,{'appCodes':_0xb7e70d?[_0xb7e70d]:[],'env':_0x11bc75||_0x1641a8||'production','metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x2c4dd7}});writeConfigFile(_0x59de8c,_0x10e51a),_0xb7e70d?console[_0x22789b(0xda)](_0x22789b(0xcc)+Object[_0x22789b(0x8d)](_0x10e51a[_0x22789b(0xa7)]||{})[_0x22789b(0xe4)](',\x20')+'\x20|\x20Default:\x20'+_0x10e51a['defaultApp']):console[_0x22789b(0xda)](_0x22789b(0xe0)+CLI_BIN_NAME+_0x22789b(0x8e)),logger[_0x22789b(0xdf)](_0x22789b(0x86),_0x22789b(0xe3)+_0xb7e70d);}catch(_0x2aeb7c){logger['error']('create','配置应用AppCode失败');}}
@@ -1 +1 @@
1
- (function(_0xaf725d,_0x25950a){const _0x1988cd=a129_0x5b2c,_0x15b3eb=_0xaf725d();while(!![]){try{const _0x1fb95e=parseInt(_0x1988cd(0x10b))/0x1+-parseInt(_0x1988cd(0x112))/0x2+-parseInt(_0x1988cd(0xf2))/0x3*(-parseInt(_0x1988cd(0x116))/0x4)+parseInt(_0x1988cd(0x104))/0x5*(parseInt(_0x1988cd(0xf7))/0x6)+-parseInt(_0x1988cd(0xff))/0x7+parseInt(_0x1988cd(0x105))/0x8+-parseInt(_0x1988cd(0x115))/0x9*(parseInt(_0x1988cd(0x106))/0xa);if(_0x1fb95e===_0x25950a)break;else _0x15b3eb['push'](_0x15b3eb['shift']());}catch(_0x17ab7c){_0x15b3eb['push'](_0x15b3eb['shift']());}}}(a129_0xa64e,0x987e4));import a129_0x48f310 from'path';import a129_0x3d43fc 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';function a129_0xa64e(){const _0x3fb43d=['11320MClvCe','\x20\x20rabetbase\x20run\x20start\x0a','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','resolve','string','349301tpSKxf','test','join','constants','access','cwd','\x20\x20√\x20package.json\x20updated','724606ohXUfN','\x20\x20√\x20Code\x20formatted','bun\x20--version','6957gaTpdF','2984KqZMVe','Project\x20directory\x20\x22','modelCount','package.json','bun','*\x20Creating\x20project\x20','length','\x20created\x20successfully!','validation','\x20model(s)','Cannot\x20create\x20project\x20in\x20current\x20directory.','chdir','trim','belowMinimum','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20dataset(s),\x20generated\x20','\x0a\x20\x20cd\x20','Use\x20a\x20different\x20project\x20name.','1986QnxclN','\x22\x20already\x20exists.','Project\x20name\x20contains\x20invalid\x20characters.','...','production','6463794MttdTp','ignore','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','dirname','log','\x20\x20Pulling\x20API\x20configuration...','\x20\x20Installing\x20dependencies...','W_OK','937622dVcfmh','env','bun\x20run\x20format','name','\x0a√\x20Project\x20','5yFhTpR','603560qRpzvr'];a129_0xa64e=function(){return _0x3fb43d;};return a129_0xa64e();}import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';function a129_0x5b2c(_0x25fae5,_0x39dfa5){_0x25fae5=_0x25fae5-0xed;const _0xa64e34=a129_0xa64e();let _0x5b2c57=_0xa64e34[_0x25fae5];return _0x5b2c57;}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(_0x495d2f,_0x3871b0,_0x222e52,_0x52e894){const _0x3f0863=a129_0x5b2c,_0x4698d4=await checkCliVersion();(_0x4698d4['needsUpgrade']||_0x4698d4[_0x3f0863(0xed)])&&(printCliUpgradeWarning(_0x4698d4),assertCliVersionSupported(_0x4698d4));if(!_0x495d2f||_0x495d2f[_0x3f0863(0x122)]()==='')throw CliErrors['validation']('Project\x20name\x20cannot\x20be\x20empty.');const _0x1deeb3=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1deeb3[_0x3f0863(0x10c)](_0x495d2f))throw CliErrors[_0x3f0863(0x11e)](_0x3f0863(0xf4),_0x3f0863(0xf9));if(_0x495d2f[_0x3f0863(0x11c)]>0x64)throw CliErrors[_0x3f0863(0x11e)](_0x3f0863(0x108));const _0x571c92=a129_0x48f310['resolve'](process[_0x3f0863(0x110)](),_0x495d2f);if(existsSync(_0x571c92))throw CliErrors[_0x3f0863(0x11e)](_0x3f0863(0x117)+_0x495d2f+_0x3f0863(0xf3),_0x3f0863(0xf1));try{const _0x3fe371=a129_0x48f310[_0x3f0863(0xfa)](_0x571c92);await a129_0x3d43fc[_0x3f0863(0x10f)](_0x3fe371,a129_0x3d43fc[_0x3f0863(0x10e)][_0x3f0863(0xfe)]);}catch{throw CliErrors[_0x3f0863(0x11e)](_0x3f0863(0x120),'Check\x20directory\x20permissions.');}try{console['log'](_0x3f0863(0x11b)+_0x495d2f+_0x3f0863(0xf5));const _0xefbe94=getSubAppReactDemoTemplateDir();await copyDirectory(_0xefbe94,_0x571c92),console['log']('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x495d2f),console[_0x3f0863(0xfb)](_0x3f0863(0x111)),console[_0x3f0863(0xfb)](_0x3f0863(0xfd)),console['log']('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x571c92),console[_0x3f0863(0xfb)](_0x3f0863(0x113)),await configureProject(_0x495d2f,_0x222e52,_0x3871b0),console[_0x3f0863(0xfb)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x222e52&&await pullApiConfig(_0x571c92,_0x222e52,_0x3871b0,_0x52e894),console[_0x3f0863(0xfb)](_0x3f0863(0x103)+_0x495d2f+_0x3f0863(0x11d)),console['log'](_0x3f0863(0xf0)+_0x495d2f),console['log'](_0x3f0863(0x107));}catch(_0x180008){try{existsSync(_0x571c92)&&await a129_0x3d43fc['rm'](_0x571c92,{'recursive':!![],'force':!![]});}catch{}throw _0x180008;}}async function updatePackageJsonName(_0x4d47db){const _0x4e7bb1=a129_0x5b2c,_0x1a2cc2=a129_0x48f310[_0x4e7bb1(0x109)](process[_0x4e7bb1(0x110)](),_0x4d47db),_0x26f9e0=a129_0x48f310['join'](_0x1a2cc2,_0x4e7bb1(0x119)),_0x46312d=await a129_0x3d43fc['readFile'](_0x26f9e0,'utf-8'),_0x507a37=JSON['parse'](_0x46312d);_0x507a37[_0x4e7bb1(0x102)]=_0x4d47db,_0x507a37['description']=_0x4e7bb1(0xee),await a129_0x3d43fc['writeFile'](_0x26f9e0,JSON['stringify'](_0x507a37,null,0x2)+'\x0a');}function detectPackageManager(){const _0x436f04=a129_0x5b2c;try{return execSync(_0x436f04(0x114),{'stdio':_0x436f04(0xf8)}),_0x436f04(0x11a);}catch{return'npm';}}async function formatCode(_0x4366b2){const _0x30fcf8=a129_0x5b2c;try{await execAsync(_0x30fcf8(0x101),{'cwd':_0x4366b2});}catch{}}async function configureProject(_0x49f3cf,_0x6348eb,_0x20be0d){const _0x2058d9=a129_0x5b2c,_0x762c23=a129_0x48f310[_0x2058d9(0x109)](process[_0x2058d9(0x110)](),_0x49f3cf),_0x56267d=a129_0x48f310[_0x2058d9(0x10d)](_0x762c23,NEW_CONFIG_NAME),_0x4cbab6=readConfig(),_0x1fa2fd=typeof _0x4cbab6['env']===_0x2058d9(0x10a)?_0x4cbab6[_0x2058d9(0x100)]:undefined,_0x5d0757={};for(const _0x27abeb of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4cbab6[_0x27abeb]!=null)_0x5d0757[_0x27abeb]=_0x4cbab6[_0x27abeb];}const _0x26b98f=buildCanonicalProjectConfig(_0x5d0757,{'appCodes':_0x6348eb?[_0x6348eb]:[],'env':_0x20be0d||_0x1fa2fd||'production','metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x56267d,_0x26b98f);}async function pullApiConfig(_0x35b9b9,_0x4c10b8,_0x4d54bc,_0x21cf1d){const _0x16ea66=a129_0x5b2c,_0x3327f9=process[_0x16ea66(0x110)]();try{process[_0x16ea66(0x121)](_0x35b9b9);const _0x500268=_0x4d54bc||_0x16ea66(0xf6);initEnv(_0x500268),console[_0x16ea66(0xfb)](_0x16ea66(0xfc));const {configArray:_0x5ba39e}=await fetchModelList(_0x4c10b8,_0x21cf1d||''),_0x3b8593=await generateApiFile(_0x5ba39e,'',_0x4c10b8,!![],_0x500268,DEFAULT_API_DIR);console[_0x16ea66(0xfb)]('\x20\x20√\x20Pulled\x20'+_0x5ba39e[_0x16ea66(0x11c)]+_0x16ea66(0xef)+_0x3b8593[_0x16ea66(0x118)]+_0x16ea66(0x11f));}catch(_0x37f76c){console[_0x16ea66(0xfb)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x16ea66(0x121)](_0x3327f9);}}
1
+ (function(_0x315286,_0x2acc34){const _0x3bfb54=a131_0x1de9,_0x235470=_0x315286();while(!![]){try{const _0x5861f1=-parseInt(_0x3bfb54(0x12f))/0x1+parseInt(_0x3bfb54(0x11b))/0x2+parseInt(_0x3bfb54(0x111))/0x3*(parseInt(_0x3bfb54(0x130))/0x4)+parseInt(_0x3bfb54(0x140))/0x5+-parseInt(_0x3bfb54(0x132))/0x6*(parseInt(_0x3bfb54(0x12d))/0x7)+parseInt(_0x3bfb54(0x118))/0x8*(-parseInt(_0x3bfb54(0x141))/0x9)+parseInt(_0x3bfb54(0x13e))/0xa*(parseInt(_0x3bfb54(0x139))/0xb);if(_0x5861f1===_0x2acc34)break;else _0x235470['push'](_0x235470['shift']());}catch(_0x507878){_0x235470['push'](_0x235470['shift']());}}}(a131_0x1e4c,0x939ee));import a131_0x35bdd2 from'path';import a131_0x562684 from'fs/promises';function a131_0x1e4c(){const _0x2f8179=['\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','bun\x20--version','needsUpgrade','parse','3251624RmENnz','\x0a√\x20Project\x20','validation','1326304BIipcg','chdir','package.json','modelCount','...','log','string','\x20api\x20pull`\x20manually\x20later.','W_OK','utf-8','\x20dataset(s),\x20generated\x20','writeFile','belowMinimum','env','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','trim','\x20\x20Installing\x20dependencies...','length','7370230DzfmPE','\x20model(s)','70598FhYUAS','4bQXhvK','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','6RUBgIa','dirname','stringify','*\x20Creating\x20project\x20','toLocaleString','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x22\x20already\x20exists.','2783kUySIv','ignore','join','Project\x20name\x20contains\x20invalid\x20characters.','\x20\x20√\x20Code\x20formatted','23930XEkuVj','cwd','1540065ZBFMLD','9eqeTte','resolve','constants','Use\x20a\x20different\x20project\x20name.','name','test','\x20\x20Pulling\x20API\x20configuration...','production','access','readFile','1674003Ljbxqb','\x20\x20√\x20package.json\x20updated','Project\x20name\x20cannot\x20be\x20empty.'];a131_0x1e4c=function(){return _0x2f8179;};return a131_0x1e4c();}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';function a131_0x1de9(_0x37b49f,_0x5bcb63){_0x37b49f=_0x37b49f-0x10d;const _0x1e4c43=a131_0x1e4c();let _0x1de993=_0x1e4c43[_0x37b49f];return _0x1de993;}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(_0x39d946,_0x2f21e2,_0x2fb7eb,_0x55fdaa){const _0x3d9ce8=a131_0x1de9,_0x285b03=await checkCliVersion();(_0x285b03[_0x3d9ce8(0x116)]||_0x285b03[_0x3d9ce8(0x127)])&&(printCliUpgradeWarning(_0x285b03),assertCliVersionSupported(_0x285b03));if(!_0x39d946||_0x39d946[_0x3d9ce8(0x12a)]()==='')throw CliErrors['validation'](_0x3d9ce8(0x113));const _0x181231=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x181231[_0x3d9ce8(0x146)](_0x39d946))throw CliErrors['validation'](_0x3d9ce8(0x13c),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x39d946[_0x3d9ce8(0x12c)]>0x64)throw CliErrors[_0x3d9ce8(0x11a)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x240537=a131_0x35bdd2[_0x3d9ce8(0x142)](process[_0x3d9ce8(0x13f)](),_0x39d946);if(existsSync(_0x240537))throw CliErrors[_0x3d9ce8(0x11a)]('Project\x20directory\x20\x22'+_0x39d946+_0x3d9ce8(0x138),_0x3d9ce8(0x144));try{const _0x2d155a=a131_0x35bdd2[_0x3d9ce8(0x133)](_0x240537);await a131_0x562684[_0x3d9ce8(0x10f)](_0x2d155a,a131_0x562684[_0x3d9ce8(0x143)][_0x3d9ce8(0x123)]);}catch{throw CliErrors[_0x3d9ce8(0x11a)](_0x3d9ce8(0x137),'Check\x20directory\x20permissions.');}try{console[_0x3d9ce8(0x120)](_0x3d9ce8(0x135)+_0x39d946+_0x3d9ce8(0x11f));const _0x443123=getSubAppReactDemoTemplateDir();await copyDirectory(_0x443123,_0x240537),console['log']('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x39d946),console[_0x3d9ce8(0x120)](_0x3d9ce8(0x112)),console[_0x3d9ce8(0x120)](_0x3d9ce8(0x12b)),console[_0x3d9ce8(0x120)](_0x3d9ce8(0x129)),await formatCode(_0x240537),console[_0x3d9ce8(0x120)](_0x3d9ce8(0x13d)),await configureProject(_0x39d946,_0x2fb7eb,_0x2f21e2),console[_0x3d9ce8(0x120)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x2fb7eb&&await pullApiConfig(_0x240537,_0x2fb7eb,_0x2f21e2,_0x55fdaa),console['log'](_0x3d9ce8(0x119)+_0x39d946+'\x20created\x20successfully!'),console[_0x3d9ce8(0x120)]('\x0a\x20\x20cd\x20'+_0x39d946),console[_0x3d9ce8(0x120)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x4db0e6){try{existsSync(_0x240537)&&await a131_0x562684['rm'](_0x240537,{'recursive':!![],'force':!![]});}catch{}throw _0x4db0e6;}}async function updatePackageJsonName(_0x224628){const _0x870da4=a131_0x1de9,_0x3c5480=a131_0x35bdd2[_0x870da4(0x142)](process[_0x870da4(0x13f)](),_0x224628),_0x221c40=a131_0x35bdd2[_0x870da4(0x13b)](_0x3c5480,_0x870da4(0x11d)),_0x145c01=await a131_0x562684[_0x870da4(0x110)](_0x221c40,_0x870da4(0x124)),_0x24dc4e=JSON[_0x870da4(0x117)](_0x145c01);_0x24dc4e[_0x870da4(0x145)]=_0x224628,_0x24dc4e['description']=_0x870da4(0x131),await a131_0x562684[_0x870da4(0x126)](_0x221c40,JSON[_0x870da4(0x134)](_0x24dc4e,null,0x2)+'\x0a');}function detectPackageManager(){const _0x5e30a3=a131_0x1de9;try{return execSync(_0x5e30a3(0x115),{'stdio':_0x5e30a3(0x13a)}),'bun';}catch{return'npm';}}async function formatCode(_0x3aad45){try{await execAsync('bun\x20run\x20format',{'cwd':_0x3aad45});}catch{}}async function configureProject(_0x4f4d3a,_0x5b13a8,_0x72638e){const _0x32940e=a131_0x1de9,_0x4e7ef2=a131_0x35bdd2[_0x32940e(0x142)](process[_0x32940e(0x13f)](),_0x4f4d3a),_0x4082ed=a131_0x35bdd2[_0x32940e(0x13b)](_0x4e7ef2,NEW_CONFIG_NAME),_0x4e84d8=readConfig(),_0xb23750=typeof _0x4e84d8[_0x32940e(0x128)]===_0x32940e(0x121)?_0x4e84d8['env']:undefined,_0x5caaf6={};for(const _0x92e1c5 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4e84d8[_0x92e1c5]!=null)_0x5caaf6[_0x92e1c5]=_0x4e84d8[_0x92e1c5];}const _0x59aebe=buildCanonicalProjectConfig(_0x5caaf6,{'appCodes':_0x5b13a8?[_0x5b13a8]:[],'env':_0x72638e||_0xb23750||_0x32940e(0x10e),'metadata':{'createdAt':new Date()[_0x32940e(0x136)](),'version':getCliVersion()}});writeConfigFile(_0x4082ed,_0x59aebe);}async function pullApiConfig(_0x1b0268,_0x306c08,_0x43343d,_0x55d1f0){const _0x5a7f59=a131_0x1de9,_0x1bb2a1=process[_0x5a7f59(0x13f)]();try{process[_0x5a7f59(0x11c)](_0x1b0268);const _0x1a66b5=_0x43343d||_0x5a7f59(0x10e);initEnv(_0x1a66b5),console[_0x5a7f59(0x120)](_0x5a7f59(0x10d));const {configArray:_0x4dfb44}=await fetchModelList(_0x306c08,_0x55d1f0||''),_0x1da547=await generateApiFile(_0x4dfb44,'',_0x306c08,!![],_0x1a66b5,DEFAULT_API_DIR);console['log']('\x20\x20√\x20Pulled\x20'+_0x4dfb44[_0x5a7f59(0x12c)]+_0x5a7f59(0x125)+_0x1da547[_0x5a7f59(0x11e)]+_0x5a7f59(0x12e));}catch(_0x4caeda){console[_0x5a7f59(0x120)](_0x5a7f59(0x114)+CLI_BIN_NAME+_0x5a7f59(0x122));}finally{process[_0x5a7f59(0x11c)](_0x1bb2a1);}}
@@ -1 +1 @@
1
- const a130_0x149be3=a130_0x378f;(function(_0x1f8abb,_0x53a23f){const _0x49b364=a130_0x378f,_0x2597a9=_0x1f8abb();while(!![]){try{const _0x4c8a55=parseInt(_0x49b364(0x12a))/0x1*(parseInt(_0x49b364(0x134))/0x2)+-parseInt(_0x49b364(0x135))/0x3*(-parseInt(_0x49b364(0x12e))/0x4)+-parseInt(_0x49b364(0x129))/0x5+-parseInt(_0x49b364(0x12f))/0x6*(-parseInt(_0x49b364(0x132))/0x7)+-parseInt(_0x49b364(0x12d))/0x8*(-parseInt(_0x49b364(0x127))/0x9)+parseInt(_0x49b364(0x133))/0xa+-parseInt(_0x49b364(0x131))/0xb*(parseInt(_0x49b364(0x12c))/0xc);if(_0x4c8a55===_0x53a23f)break;else _0x2597a9['push'](_0x2597a9['shift']());}catch(_0x4d8d6d){_0x2597a9['push'](_0x2597a9['shift']());}}}(a130_0x544a,0x4bfc6));import a130_0x2dae96 from'node:path';function a130_0x544a(){const _0x2882e9=['join','241571UUeexN','7igoiNu','2207830JgCylj','526RXYbCU','21qKgRBC','dirname','projects','templates','531JcscxB','resolve','903890pJRTCt','667nlNnUb','../../../../','336zJniyt','11616QozUDo','108532SwsaHZ','2610726trOdiX'];a130_0x544a=function(){return _0x2882e9;};return a130_0x544a();}import{fileURLToPath}from'node:url';function a130_0x378f(_0x3b1783,_0x317566){_0x3b1783=_0x3b1783-0x126;const _0x544a9f=a130_0x544a();let _0x378fa1=_0x544a9f[_0x3b1783];return _0x378fa1;}const __dirname=a130_0x2dae96[a130_0x149be3(0x136)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x2f7695=a130_0x149be3;return a130_0x2dae96[_0x2f7695(0x128)](__dirname,_0x2f7695(0x12b));}export function getSubAppReactDemoTemplateDir(){const _0xb22065=a130_0x149be3;return a130_0x2dae96[_0xb22065(0x130)](getRabetbaseCliPackageRoot(),_0xb22065(0x126),_0xb22065(0x137),'sub-app-react-demo');}
1
+ (function(_0x6b2a58,_0x4fa2f4){const _0x50c558=a132_0x54e1,_0x30b801=_0x6b2a58();while(!![]){try{const _0x26e805=parseInt(_0x50c558(0xc6))/0x1*(-parseInt(_0x50c558(0xcb))/0x2)+-parseInt(_0x50c558(0xc5))/0x3+parseInt(_0x50c558(0xc7))/0x4+-parseInt(_0x50c558(0xcc))/0x5*(-parseInt(_0x50c558(0xc1))/0x6)+-parseInt(_0x50c558(0xbf))/0x7*(parseInt(_0x50c558(0xc2))/0x8)+-parseInt(_0x50c558(0xbe))/0x9*(-parseInt(_0x50c558(0xc9))/0xa)+parseInt(_0x50c558(0xc3))/0xb;if(_0x26e805===_0x4fa2f4)break;else _0x30b801['push'](_0x30b801['shift']());}catch(_0xc6560e){_0x30b801['push'](_0x30b801['shift']());}}}(a132_0xa3ba,0xd480c));import a132_0x3f8f22 from'node:path';function a132_0x54e1(_0x4a70af,_0x240176){_0x4a70af=_0x4a70af-0xbd;const _0xa3baa4=a132_0xa3ba();let _0x54e18b=_0xa3baa4[_0x4a70af];return _0x54e18b;}function a132_0xa3ba(){const _0x557fa2=['join','2QzcpCB','1697845BQPQBW','resolve','27pUFrZJ','14SBgUqO','sub-app-react-demo','6QerFzn','525736zdpbhS','4109061zqgNoX','projects','52545YmTYUy','970036dhFTYN','1264472dJrtrf','../../../../','3200530KAZUOs'];a132_0xa3ba=function(){return _0x557fa2;};return a132_0xa3ba();}import{fileURLToPath}from'node:url';const __dirname=a132_0x3f8f22['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x2ad623=a132_0x54e1;return a132_0x3f8f22[_0x2ad623(0xbd)](__dirname,_0x2ad623(0xc8));}export function getSubAppReactDemoTemplateDir(){const _0x165610=a132_0x54e1;return a132_0x3f8f22[_0x165610(0xca)](getRabetbaseCliPackageRoot(),'templates',_0x165610(0xc4),_0x165610(0xc0));}
@@ -1 +1 @@
1
- function a131_0x868b(){const _0x277613=['236DxebjE','项目模板复制失败','cwd','8076432kKDmHS','2856716IlOqlq','resolve','now','3563766ZsrHik','6GKuzSC','copy','223011gnYDMS','3193570kAlOVP','7800800ANhsNj','70JyparB','开始复制项目模板','error','5295vTyFJh','success'];a131_0x868b=function(){return _0x277613;};return a131_0x868b();}(function(_0x58b2d8,_0x15a6dd){const _0x5c319a=a131_0x2959,_0x425d39=_0x58b2d8();while(!![]){try{const _0x7f1170=-parseInt(_0x5c319a(0x1fb))/0x1*(parseInt(_0x5c319a(0x1fd))/0x2)+parseInt(_0x5c319a(0x204))/0x3+parseInt(_0x5c319a(0x201))/0x4+-parseInt(_0x5c319a(0x1f6))/0x5*(parseInt(_0x5c319a(0x1f3))/0x6)+-parseInt(_0x5c319a(0x1f7))/0x7+parseInt(_0x5c319a(0x200))/0x8+parseInt(_0x5c319a(0x1f5))/0x9*(parseInt(_0x5c319a(0x1f8))/0xa);if(_0x7f1170===_0x15a6dd)break;else _0x425d39['push'](_0x425d39['shift']());}catch(_0xf4615c){_0x425d39['push'](_0x425d39['shift']());}}}(a131_0x868b,0xaca70));import a131_0x2d8d6c 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 a131_0x2959(_0xd4d17e,_0x5282df){_0xd4d17e=_0xd4d17e-0x1f3;const _0x868b7e=a131_0x868b();let _0x2959fc=_0x868b7e[_0xd4d17e];return _0x2959fc;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x2e43d3){const _0x255272=a131_0x2959,_0x1bcf30=Date['now'](),_0x399d6f=a131_0x2d8d6c[_0x255272(0x202)](process[_0x255272(0x1ff)](),_0x2e43d3);try{logger['info'](_0x255272(0x1f4),_0x255272(0x1f9),{'projectCode':_0x2e43d3,'templateDir':templateDir}),await copyDirectory(templateDir,_0x399d6f);const _0x5a9618=Date['now']()-_0x1bcf30;logger[_0x255272(0x1fc)](_0x255272(0x1f4),'项目模板复制完成',_0x5a9618,{'projectCode':_0x2e43d3});}catch(_0x74ed1d){const _0x53c085=Date[_0x255272(0x203)]()-_0x1bcf30;logger[_0x255272(0x1fa)](_0x255272(0x1f4),_0x255272(0x1fe),{'projectCode':_0x2e43d3,'error':_0x74ed1d instanceof Error?_0x74ed1d['message']:String(_0x74ed1d),'duration':_0x53c085});throw _0x74ed1d;}return formatElapsed(_0x1bcf30);}
1
+ (function(_0x1d91d2,_0x705537){const _0x3b0706=a133_0x24d4,_0x32b1ee=_0x1d91d2();while(!![]){try{const _0x3464c5=-parseInt(_0x3b0706(0xda))/0x1*(-parseInt(_0x3b0706(0xcf))/0x2)+-parseInt(_0x3b0706(0xd7))/0x3*(-parseInt(_0x3b0706(0xdb))/0x4)+parseInt(_0x3b0706(0xd1))/0x5*(parseInt(_0x3b0706(0xd8))/0x6)+parseInt(_0x3b0706(0xd0))/0x7*(parseInt(_0x3b0706(0xcd))/0x8)+parseInt(_0x3b0706(0xd9))/0x9+parseInt(_0x3b0706(0xd3))/0xa+-parseInt(_0x3b0706(0xdc))/0xb;if(_0x3464c5===_0x705537)break;else _0x32b1ee['push'](_0x32b1ee['shift']());}catch(_0xe9933c){_0x32b1ee['push'](_0x32b1ee['shift']());}}}(a133_0x367b,0x83d5c));import a133_0x1a727a from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a133_0x367b(){const _0x52a2cf=['info','success','72VeRueJ','error','94JVRjnl','422149HIibjh','19145eAlFKQ','项目模板复制完成','9457280viKfYy','resolve','cwd','开始复制项目模板','231uTpxtO','78vIyWsU','2286027DTvpne','13613QiBLVZ','12980ezThKa','23561461tLLtFD','now','message'];a133_0x367b=function(){return _0x52a2cf;};return a133_0x367b();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a133_0x24d4(_0x45bb3f,_0x47625e){_0x45bb3f=_0x45bb3f-0xcc;const _0x367b9b=a133_0x367b();let _0x24d434=_0x367b9b[_0x45bb3f];return _0x24d434;}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x2fcfc3){const _0x1d4c36=a133_0x24d4,_0x3f7314=Date['now'](),_0x4cc292=a133_0x1a727a[_0x1d4c36(0xd4)](process[_0x1d4c36(0xd5)](),_0x2fcfc3);try{logger[_0x1d4c36(0xdf)]('copy',_0x1d4c36(0xd6),{'projectCode':_0x2fcfc3,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4cc292);const _0x5abb46=Date[_0x1d4c36(0xdd)]()-_0x3f7314;logger[_0x1d4c36(0xcc)]('copy',_0x1d4c36(0xd2),_0x5abb46,{'projectCode':_0x2fcfc3});}catch(_0x17695a){const _0x1b9ed0=Date['now']()-_0x3f7314;logger[_0x1d4c36(0xce)]('copy','项目模板复制失败',{'projectCode':_0x2fcfc3,'error':_0x17695a instanceof Error?_0x17695a[_0x1d4c36(0xde)]:String(_0x17695a),'duration':_0x1b9ed0});throw _0x17695a;}return formatElapsed(_0x3f7314);}
@@ -1 +1 @@
1
- (function(_0x26d379,_0x44ff62){const _0x217cb3=a132_0x3e50,_0x3d21da=_0x26d379();while(!![]){try{const _0x306a44=-parseInt(_0x217cb3(0x1eb))/0x1*(parseInt(_0x217cb3(0x1e5))/0x2)+-parseInt(_0x217cb3(0x1e3))/0x3*(parseInt(_0x217cb3(0x1de))/0x4)+parseInt(_0x217cb3(0x1e9))/0x5+parseInt(_0x217cb3(0x1ec))/0x6+-parseInt(_0x217cb3(0x1e7))/0x7+-parseInt(_0x217cb3(0x1e8))/0x8+-parseInt(_0x217cb3(0x1e4))/0x9*(-parseInt(_0x217cb3(0x1e2))/0xa);if(_0x306a44===_0x44ff62)break;else _0x3d21da['push'](_0x3d21da['shift']());}catch(_0x37ea24){_0x3d21da['push'](_0x3d21da['shift']());}}}(a132_0x5bd4,0xa5df5));import a132_0x551d9b from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a132_0x3e50(_0x35af0f,_0x513a32){_0x35af0f=_0x35af0f-0x1de;const _0x5bd45c=a132_0x5bd4();let _0x3e50c7=_0x5bd45c[_0x35af0f];return _0x3e50c7;}function a132_0x5bd4(){const _0x1ee29=['5454302aitfZC','5984512OBAqkg','4524580FLpMLG','format','9svhUBP','4146426gFpaaM','now','prettier','error','success','cwd','代码格式化失败','代码格式化完成','144iPngaZ','--write','开始格式化代码','npx','10drtRck','105741ozbdZl','21702969QbPDrv','118194HtQirn','info'];a132_0x5bd4=function(){return _0x1ee29;};return a132_0x5bd4();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x25bebb){const _0x138fe8=a132_0x3e50,_0x21f40e=Date[_0x138fe8(0x1ed)](),_0x566ed3=a132_0x551d9b['resolve'](process[_0x138fe8(0x1f1)](),_0x25bebb);try{logger[_0x138fe8(0x1e6)](_0x138fe8(0x1ea),_0x138fe8(0x1e0),{'projectCode':_0x25bebb}),await execa(resolveNpmBin(_0x138fe8(0x1e1)),[_0x138fe8(0x1ee),_0x138fe8(0x1df),'.'],{'cwd':_0x566ed3});const _0x3690fb=Date[_0x138fe8(0x1ed)]()-_0x21f40e;logger[_0x138fe8(0x1f0)](_0x138fe8(0x1ea),_0x138fe8(0x1f3),_0x3690fb,{'projectCode':_0x25bebb});}catch(_0x5c7ff8){const _0x4f16cb=Date[_0x138fe8(0x1ed)]()-_0x21f40e;logger[_0x138fe8(0x1ef)]('format',_0x138fe8(0x1f2),{'projectCode':_0x25bebb,'error':_0x5c7ff8 instanceof Error?_0x5c7ff8['message']:String(_0x5c7ff8),'duration':_0x4f16cb});throw _0x5c7ff8;}return formatElapsed(_0x21f40e);}
1
+ (function(_0x125222,_0x27c81b){const _0x309b34=a134_0x4502,_0x4d8d21=_0x125222();while(!![]){try{const _0x5cd3af=-parseInt(_0x309b34(0x201))/0x1+parseInt(_0x309b34(0x204))/0x2+parseInt(_0x309b34(0x202))/0x3*(parseInt(_0x309b34(0x1fe))/0x4)+parseInt(_0x309b34(0x1f9))/0x5*(parseInt(_0x309b34(0x1f8))/0x6)+parseInt(_0x309b34(0x1fd))/0x7+parseInt(_0x309b34(0x205))/0x8*(-parseInt(_0x309b34(0x203))/0x9)+-parseInt(_0x309b34(0x1f6))/0xa*(parseInt(_0x309b34(0x1fc))/0xb);if(_0x5cd3af===_0x27c81b)break;else _0x4d8d21['push'](_0x4d8d21['shift']());}catch(_0x450f54){_0x4d8d21['push'](_0x4d8d21['shift']());}}}(a134_0x3648,0x2084f));import a134_0x4a1b61 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';function a134_0x3648(){const _0xfe378c=['382690PEyydV','4iNRaIv','success','info','54692hMytmG','723531JFqomc','65241iDSCxl','161536OhQVpB','104ZbIWiY','resolve','--write','now','message','cwd','21790Ncymwq','format','84StbsHi','18395bPqLYP','开始格式化代码','error','737HTsnGA'];a134_0x3648=function(){return _0xfe378c;};return a134_0x3648();}function a134_0x4502(_0x2dc7f6,_0xbddce4){_0x2dc7f6=_0x2dc7f6-0x1f2;const _0x364827=a134_0x3648();let _0x450204=_0x364827[_0x2dc7f6];return _0x450204;}export async function formatProjectCode(_0x102019){const _0x2c8006=a134_0x4502,_0xd657f6=Date['now'](),_0x18e42d=a134_0x4a1b61[_0x2c8006(0x206)](process[_0x2c8006(0x1f5)](),_0x102019);try{logger[_0x2c8006(0x200)](_0x2c8006(0x1f7),_0x2c8006(0x1fa),{'projectCode':_0x102019}),await execa(resolveNpmBin('npx'),['prettier',_0x2c8006(0x1f2),'.'],{'cwd':_0x18e42d});const _0x4fe925=Date[_0x2c8006(0x1f3)]()-_0xd657f6;logger[_0x2c8006(0x1ff)](_0x2c8006(0x1f7),'代码格式化完成',_0x4fe925,{'projectCode':_0x102019});}catch(_0x58eae8){const _0xc7a67a=Date[_0x2c8006(0x1f3)]()-_0xd657f6;logger[_0x2c8006(0x1fb)]('format','代码格式化失败',{'projectCode':_0x102019,'error':_0x58eae8 instanceof Error?_0x58eae8[_0x2c8006(0x1f4)]:String(_0x58eae8),'duration':_0xc7a67a});throw _0x58eae8;}return formatElapsed(_0xd657f6);}
@@ -1 +1 @@
1
- (function(_0x227b1c,_0x430893){const _0x548888=a133_0xb623,_0x418f0f=_0x227b1c();while(!![]){try{const _0x232cb2=parseInt(_0x548888(0xa3))/0x1+parseInt(_0x548888(0xa5))/0x2+parseInt(_0x548888(0xaa))/0x3*(parseInt(_0x548888(0xa0))/0x4)+parseInt(_0x548888(0xb0))/0x5+parseInt(_0x548888(0xa2))/0x6+parseInt(_0x548888(0xad))/0x7+parseInt(_0x548888(0xac))/0x8*(-parseInt(_0x548888(0xab))/0x9);if(_0x232cb2===_0x430893)break;else _0x418f0f['push'](_0x418f0f['shift']());}catch(_0x3d85cf){_0x418f0f['push'](_0x418f0f['shift']());}}}(a133_0x51fb,0x8c5d0));import a133_0x368a9c 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';function a133_0xb623(_0x42bf63,_0x394fe7){_0x42bf63=_0x42bf63-0xa0;const _0x51fbe2=a133_0x51fb();let _0xb62353=_0x51fbe2[_0x42bf63];return _0xb62353;}function a133_0x51fb(){const _0x5363fc=['2247035rtCbgQ','1912204OLsMim','error','745080lnAWvm','626763YnkZVz','依赖安装失败','916742qVVzgg','now','--registry','https://registry.npmmirror.com','success','3GHYKpG','21367701jbTXcV','8uCbWBB','5686415KilCaX','cwd','install'];a133_0x51fb=function(){return _0x5363fc;};return a133_0x51fb();}export async function installDependencies(_0x1ca770){const _0x3a1a6c=a133_0xb623,_0x3af29d=Date[_0x3a1a6c(0xa6)](),_0x4922c9=a133_0x368a9c['resolve'](process[_0x3a1a6c(0xae)](),_0x1ca770);try{logger['info']('install','开始安装依赖',{'projectCode':_0x1ca770,'registry':_0x3a1a6c(0xa8)}),await execa(resolveNpmBin('npm'),[_0x3a1a6c(0xaf),_0x3a1a6c(0xa7),_0x3a1a6c(0xa8)],{'cwd':_0x4922c9});const _0x46d3a0=Date[_0x3a1a6c(0xa6)]()-_0x3af29d;logger[_0x3a1a6c(0xa9)](_0x3a1a6c(0xaf),'依赖安装完成',_0x46d3a0,{'projectCode':_0x1ca770});}catch(_0x2dc919){const _0x223950=Date[_0x3a1a6c(0xa6)]()-_0x3af29d;logger[_0x3a1a6c(0xa1)](_0x3a1a6c(0xaf),_0x3a1a6c(0xa4),{'projectCode':_0x1ca770,'error':_0x2dc919 instanceof Error?_0x2dc919['message']:String(_0x2dc919),'duration':_0x223950});throw _0x2dc919;}return formatElapsed(_0x3af29d);}
1
+ (function(_0x216a36,_0x398645){const _0x198028=a135_0x6d50,_0x3b2e44=_0x216a36();while(!![]){try{const _0x2517c6=-parseInt(_0x198028(0x151))/0x1+parseInt(_0x198028(0x14e))/0x2+-parseInt(_0x198028(0x142))/0x3+parseInt(_0x198028(0x14b))/0x4*(parseInt(_0x198028(0x144))/0x5)+-parseInt(_0x198028(0x147))/0x6*(-parseInt(_0x198028(0x146))/0x7)+parseInt(_0x198028(0x141))/0x8+parseInt(_0x198028(0x145))/0x9;if(_0x2517c6===_0x398645)break;else _0x3b2e44['push'](_0x3b2e44['shift']());}catch(_0x263158){_0x3b2e44['push'](_0x3b2e44['shift']());}}}(a135_0xebf2,0x459e0));import a135_0x485ce6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a135_0x6d50(_0x3bad39,_0xbe0e4){_0x3bad39=_0x3bad39-0x141;const _0xebf212=a135_0xebf2();let _0x6d50f0=_0xebf212[_0x3bad39];return _0x6d50f0;}import{resolveNpmBin}from'../../../utils/platform.js';function a135_0xebf2(){const _0x5edd39=['resolve','info','error','28TmmVip','now','npm','506322bStnrx','install','依赖安装完成','172787nJIeVk','https://registry.npmmirror.com','cwd','1538712QAoGcq','1615383aOFmCR','依赖安装失败','78510kbVBEl','321912ebIvac','7nDBuON','2431308WCHLXu'];a135_0xebf2=function(){return _0x5edd39;};return a135_0xebf2();}export async function installDependencies(_0x177eb0){const _0x560f2a=a135_0x6d50,_0x46b4ab=Date[_0x560f2a(0x14c)](),_0x50e5a9=a135_0x485ce6[_0x560f2a(0x148)](process[_0x560f2a(0x153)](),_0x177eb0);try{logger[_0x560f2a(0x149)](_0x560f2a(0x14f),'开始安装依赖',{'projectCode':_0x177eb0,'registry':_0x560f2a(0x152)}),await execa(resolveNpmBin(_0x560f2a(0x14d)),[_0x560f2a(0x14f),'--registry','https://registry.npmmirror.com'],{'cwd':_0x50e5a9});const _0x2fa69f=Date[_0x560f2a(0x14c)]()-_0x46b4ab;logger['success']('install',_0x560f2a(0x150),_0x2fa69f,{'projectCode':_0x177eb0});}catch(_0x2a7b8f){const _0x449624=Date[_0x560f2a(0x14c)]()-_0x46b4ab;logger[_0x560f2a(0x14a)](_0x560f2a(0x14f),_0x560f2a(0x143),{'projectCode':_0x177eb0,'error':_0x2a7b8f instanceof Error?_0x2a7b8f['message']:String(_0x2a7b8f),'duration':_0x449624});throw _0x2a7b8f;}return formatElapsed(_0x46b4ab);}
@@ -1 +1 @@
1
- const a134_0x4fbc1d=a134_0x588e;(function(_0x356d84,_0x314be3){const _0x8cb358=a134_0x588e,_0x25ce9b=_0x356d84();while(!![]){try{const _0x528a21=-parseInt(_0x8cb358(0x1d1))/0x1*(parseInt(_0x8cb358(0x1d2))/0x2)+parseInt(_0x8cb358(0x1e9))/0x3+-parseInt(_0x8cb358(0x1de))/0x4+parseInt(_0x8cb358(0x1d4))/0x5*(parseInt(_0x8cb358(0x1ea))/0x6)+parseInt(_0x8cb358(0x1d3))/0x7*(parseInt(_0x8cb358(0x1e4))/0x8)+-parseInt(_0x8cb358(0x1ef))/0x9+-parseInt(_0x8cb358(0x1ce))/0xa;if(_0x528a21===_0x314be3)break;else _0x25ce9b['push'](_0x25ce9b['shift']());}catch(_0x3e5560){_0x25ce9b['push'](_0x25ce9b['shift']());}}}(a134_0x4aa8,0xc2f19));import{CliErrors}from'../../errors.js';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':'appcode','type':'string','description':'App\x20code\x20to\x20initialize'},{'name':a134_0x4fbc1d(0x1f0),'type':a134_0x4fbc1d(0x1d8),'description':a134_0x4fbc1d(0x1f1)},{'name':a134_0x4fbc1d(0x1e0),'type':a134_0x4fbc1d(0x1ed),'description':a134_0x4fbc1d(0x1eb),'default':![]}],createFlags=[{'name':a134_0x4fbc1d(0x1ec),'type':a134_0x4fbc1d(0x1d8),'description':a134_0x4fbc1d(0x1dd)},{'name':a134_0x4fbc1d(0x1f0),'type':'string','description':'Target\x20environment'},{'name':a134_0x4fbc1d(0x1da),'type':a134_0x4fbc1d(0x1d8),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a134_0x4fbc1d(0x1e0),'type':'boolean','description':a134_0x4fbc1d(0x1d9),'default':![]}];function a134_0x4aa8(){const _0x49d0bb=['create','string','Skip\x20confirmation\x20prompt','appcode','2026-07','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Project\x20name','80820fIGhTA','bool','yes','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','../../commands/project/create/main.js','11099656MzvpJt','trim','\x20workspace\x20init','nonInteractive','write','4448496LeUEGq','6jpwrjk','Auto-confirm\x20prompts','name','boolean','project','8488368CZQwcu','env','Target\x20environment','args','Create\x20a\x20new\x20project','9278850IIxUtf','upgrade','str','40345rmVhhD','78wWAMTY','7GglbDp','6964485PMUcZf','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]'];a134_0x4aa8=function(){return _0x49d0bb;};return a134_0x4aa8();}function a134_0x588e(_0x40a999,_0x64ec68){_0x40a999=_0x40a999-0x1ce;const _0x4aa88b=a134_0x4aa8();let _0x588edc=_0x4aa88b[_0x40a999];return _0x588edc;}export const projectDefinitions=[{'service':a134_0x4fbc1d(0x1ee),'command':'init','description':a134_0x4fbc1d(0x1e2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0x4fbc1d(0x1e6),'since':a134_0x4fbc1d(0x1db)},'flags':initFlags,async 'execute'(_0x47d001){const _0x152e58=a134_0x4fbc1d;return await initConfig({'appcode':_0x47d001[_0x152e58(0x1d0)](_0x152e58(0x1da))||undefined,'env':_0x47d001['str']('env')||undefined,'autoYes':_0x47d001['bool']('yes')}),{'ok':!![]};}},{'service':a134_0x4fbc1d(0x1ee),'command':a134_0x4fbc1d(0x1d7),'description':a134_0x4fbc1d(0x1f3),'risk':a134_0x4fbc1d(0x1e8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a134_0x4fbc1d(0x1dc),'required':![]}],'flags':createFlags,async 'execute'(_0x1478ca){const _0x589123=a134_0x4fbc1d,{createApp:_0x2f333b}=await import(_0x589123(0x1e3)),{createProjectNonInteractive:_0x5a1673}=await import('../../commands/project/create/non-interactive.js'),_0x485130=_0x1478ca[_0x589123(0x1d0)](_0x589123(0x1ec))[_0x589123(0x1e5)]()||_0x1478ca[_0x589123(0x1f2)][0x0]?.['trim'](),_0x37b442=_0x1478ca[_0x589123(0x1d0)](_0x589123(0x1f0))||undefined,_0xfce26b=_0x1478ca['str']('appcode')||undefined;if(_0x1478ca['nonInteractive']){if(!_0x485130)throw CliErrors['validation'](_0x589123(0x1e1),'Usage:\x20'+CLI_BIN_NAME+_0x589123(0x1d6));await _0x5a1673(_0x485130,_0x37b442,_0xfce26b,_0x1478ca['cookie']);}else await _0x2f333b({'projectCode':_0x485130,'appCode':_0xfce26b,'env':_0x37b442,'cookie':_0x1478ca['cookie']});return{'ok':!![]};}},{'service':'project','command':a134_0x4fbc1d(0x1cf),'description':a134_0x4fbc1d(0x1d5),'risk':a134_0x4fbc1d(0x1e8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5b60db){const _0x1df72c=a134_0x4fbc1d;return await upgradeApp(_0x5b60db[_0x1df72c(0x1e7)],{'yes':_0x5b60db[_0x1df72c(0x1df)](_0x1df72c(0x1e0))}),{'ok':!![]};}}];
1
+ const a136_0x1f276c=a136_0x953b;(function(_0x139c78,_0x1f468e){const _0x5233db=a136_0x953b,_0x1acb10=_0x139c78();while(!![]){try{const _0x46a73e=-parseInt(_0x5233db(0x116))/0x1+parseInt(_0x5233db(0x124))/0x2+-parseInt(_0x5233db(0x12a))/0x3*(-parseInt(_0x5233db(0x103))/0x4)+-parseInt(_0x5233db(0x101))/0x5+-parseInt(_0x5233db(0x109))/0x6+parseInt(_0x5233db(0x11d))/0x7*(parseInt(_0x5233db(0x11a))/0x8)+parseInt(_0x5233db(0x111))/0x9*(parseInt(_0x5233db(0x10b))/0xa);if(_0x46a73e===_0x1f468e)break;else _0x1acb10['push'](_0x1acb10['shift']());}catch(_0x1c16ab){_0x1acb10['push'](_0x1acb10['shift']());}}}(a136_0x4999,0x75cf6));import{CliErrors}from'../../errors.js';function a136_0x4999(){const _0x2210bc=['Skip\x20confirmation\x20prompt','../../commands/project/create/main.js','494031rNcVdv','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','create','4423850MysvFR','project','16gpHHhU','string','str','Target\x20environment','name','../../commands/project/create/non-interactive.js','5383614eiKmCh','\x20workspace\x20init','20DwksLm','yes','Create\x20a\x20new\x20project','args','2026-07','nonInteractive','6506928AdVNgI','project-name','bool','Usage:\x20','appcode','328530TrhqYb','upgrade','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','validation','16Ppitmj','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','write','201551LhkWqV','init','env','App\x20code\x20to\x20initialize','trim','Auto-confirm\x20prompts','Project\x20name','861682AEoLZT','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','boolean'];a136_0x4999=function(){return _0x2210bc;};return a136_0x4999();}function a136_0x953b(_0x42e7e0,_0x28d7df){_0x42e7e0=_0x42e7e0-0xff;const _0x4999a0=a136_0x4999();let _0x953b1=_0x4999a0[_0x42e7e0];return _0x953b1;}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':a136_0x1f276c(0x115),'type':a136_0x1f276c(0x104),'description':a136_0x1f276c(0x120)},{'name':'env','type':'string','description':a136_0x1f276c(0x106)},{'name':'yes','type':a136_0x1f276c(0x127),'description':a136_0x1f276c(0x122),'default':![]}],createFlags=[{'name':a136_0x1f276c(0x107),'type':a136_0x1f276c(0x104),'description':a136_0x1f276c(0x123)},{'name':a136_0x1f276c(0x11f),'type':'string','description':'Target\x20environment'},{'name':a136_0x1f276c(0x115),'type':a136_0x1f276c(0x104),'description':a136_0x1f276c(0x11b)}],upgradeFlags=[{'name':a136_0x1f276c(0x10c),'type':a136_0x1f276c(0x127),'description':a136_0x1f276c(0x128),'default':![]}];export const projectDefinitions=[{'service':a136_0x1f276c(0x102),'command':a136_0x1f276c(0x11e),'description':a136_0x1f276c(0x125),'risk':a136_0x1f276c(0x11c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a136_0x1f276c(0x10a),'since':a136_0x1f276c(0x10f)},'flags':initFlags,async 'execute'(_0x2a4519){const _0x43cfa1=a136_0x1f276c;return await initConfig({'appcode':_0x2a4519[_0x43cfa1(0x105)](_0x43cfa1(0x115))||undefined,'env':_0x2a4519[_0x43cfa1(0x105)](_0x43cfa1(0x11f))||undefined,'autoYes':_0x2a4519[_0x43cfa1(0x113)]('yes')}),{'ok':!![]};}},{'service':a136_0x1f276c(0x102),'command':a136_0x1f276c(0x100),'description':a136_0x1f276c(0x10d),'risk':a136_0x1f276c(0x11c),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a136_0x1f276c(0x112),'description':a136_0x1f276c(0x126),'required':![]}],'flags':createFlags,async 'execute'(_0x48d5da){const _0x2c0f6e=a136_0x1f276c,{createApp:_0x210786}=await import(_0x2c0f6e(0x129)),{createProjectNonInteractive:_0x3ff86d}=await import(_0x2c0f6e(0x108)),_0x8787c1=_0x48d5da[_0x2c0f6e(0x105)](_0x2c0f6e(0x107))['trim']()||_0x48d5da[_0x2c0f6e(0x10e)][0x0]?.[_0x2c0f6e(0x121)](),_0x4e9909=_0x48d5da[_0x2c0f6e(0x105)]('env')||undefined,_0x55c3cd=_0x48d5da['str'](_0x2c0f6e(0x115))||undefined;if(_0x48d5da[_0x2c0f6e(0x110)]){if(!_0x8787c1)throw CliErrors[_0x2c0f6e(0x119)](_0x2c0f6e(0xff),_0x2c0f6e(0x114)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x3ff86d(_0x8787c1,_0x4e9909,_0x55c3cd,_0x48d5da['cookie']);}else await _0x210786({'projectCode':_0x8787c1,'appCode':_0x55c3cd,'env':_0x4e9909,'cookie':_0x48d5da['cookie']});return{'ok':!![]};}},{'service':a136_0x1f276c(0x102),'command':a136_0x1f276c(0x117),'description':a136_0x1f276c(0x118),'risk':a136_0x1f276c(0x11c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x2f742f){const _0x12ee69=a136_0x1f276c;return await upgradeApp(_0x2f742f[_0x12ee69(0x110)],{'yes':_0x2f742f[_0x12ee69(0x113)](_0x12ee69(0x10c))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x3b7a6f,_0x227890){const _0x4dcbc8=a135_0xd1e3,_0x269282=_0x3b7a6f();while(!![]){try{const _0x4c8ce9=parseInt(_0x4dcbc8(0xf5))/0x1*(parseInt(_0x4dcbc8(0xf4))/0x2)+-parseInt(_0x4dcbc8(0xfa))/0x3*(-parseInt(_0x4dcbc8(0x106))/0x4)+-parseInt(_0x4dcbc8(0xfc))/0x5+parseInt(_0x4dcbc8(0x111))/0x6+parseInt(_0x4dcbc8(0x114))/0x7*(-parseInt(_0x4dcbc8(0xef))/0x8)+parseInt(_0x4dcbc8(0xf0))/0x9+-parseInt(_0x4dcbc8(0xfe))/0xa;if(_0x4c8ce9===_0x227890)break;else _0x269282['push'](_0x269282['shift']());}catch(_0x3f1d27){_0x269282['push'](_0x269282['shift']());}}}(a135_0xce74,0xa3b99));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a135_0x41ce3a from'chalk';import{input,confirm}from'@inquirer/prompts';function a135_0xce74(){const _0x1fcf6c=['\x20\x20Apps:\x20','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','bold','1726NwIDzS','931DsTbuA','\x20\x20Default:\x20','Invalid\x20App\x20Code','appcode','?\x20(Old\x20file\x20→\x20*.bak)','1097343CQhQlW','\x20\x20appcode:\x20','6587725wslVEs','string','4999480ZuzdFC','初始化项目配置文件成功','keys','yellow','../..','env','init','1.0.0','8YFeFNH','version','parse','join','\x20api\x20pull\x27','log','app','apps','从旧配置文件升级成功','production','package.json','1767444oJWbXy','gray','utf8','13671nwjHrl','\x20workspace\x20init`\x20to\x20start\x20fresh.','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','cwd','.bak','toLocaleString','trim','.rabetbase.json','cyan','defaultApp','56RFfTwb','6049728daWBkg'];a135_0xce74=function(){return _0x1fcf6c;};return a135_0xce74();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';function a135_0xd1e3(_0x141153,_0x164210){_0x141153=_0x141153-0xea;const _0xce74a3=a135_0xce74();let _0xd1e3c=_0xce74a3[_0x141153];return _0xd1e3c;}import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x8cb983){const _0x35c567=a135_0xd1e3,{appcode:_0xcc03d6,env:_0x339901,autoYes:_0x246d99}=_0x8cb983,_0x26fb6b=process[_0x35c567(0x117)]();if(getProjectConfigPath())throw new Error(_0x35c567(0xf2));let _0x5e0dbb;for(const _0x4a2e32 of LEGACY_CONFIG_NAMES){const _0x4a1dbe=resolve(_0x26fb6b,_0x4a2e32);if(existsSync(_0x4a1dbe)){_0x5e0dbb=_0x4a1dbe;break;}}if(_0x5e0dbb){let _0x52d689={};try{_0x52d689=JSON[_0x35c567(0x108)](readFileSync(_0x5e0dbb,_0x35c567(0x113)));}catch{}const _0x33d609=basename(_0x5e0dbb),_0x249132=_0x52d689?.[_0x35c567(0xf8)]||_0x52d689?.[_0x35c567(0x10c)];let _0x1038f6=_0x246d99;!_0x246d99&&(console[_0x35c567(0x10b)](a135_0x41ce3a[_0x35c567(0x101)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a135_0x41ce3a[_0x35c567(0xf3)](_0x33d609))),_0x249132&&console[_0x35c567(0x10b)](a135_0x41ce3a[_0x35c567(0xed)](_0x35c567(0xfb)+_0x249132)),_0x1038f6=await confirm({'message':'Upgrade\x20it\x20to\x20'+a135_0x41ce3a['bold'](_0x35c567(0xec))+_0x35c567(0xf9),'default':!![]}));if(!_0x1038f6){console['log']('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x35c567(0x115));return;}const _0x30db8d=resolve(_0x26fb6b,NEW_CONFIG_NAME),_0x565706=getCliVersionFromPkg(),_0x3ccd34=readRawConfig(),_0x3358a6=_0xcc03d6||(typeof _0x52d689?.[_0x35c567(0xf8)]===_0x35c567(0xfd)?_0x52d689[_0x35c567(0xf8)]:undefined)||(typeof _0x52d689?.[_0x35c567(0x10c)]===_0x35c567(0xfd)?_0x52d689[_0x35c567(0x10c)]:undefined)||await askAppcode(),_0x319a6d=typeof _0x52d689?.[_0x35c567(0x103)]===_0x35c567(0xfd)?_0x52d689[_0x35c567(0x103)]:typeof _0x3ccd34[_0x35c567(0x103)]==='string'?_0x3ccd34[_0x35c567(0x103)]:_0x35c567(0x10f),_0x50eacd=buildCanonicalProjectConfig({..._0x3ccd34,..._0x52d689},{'appCodes':[_0x3358a6],'env':_0x319a6d,'metadata':{'version':_0x565706,'migratedAt':new Date()[_0x35c567(0xea)](),'migratedFrom':_0x5e0dbb}});writeConfigFile(_0x30db8d,_0x50eacd);const _0xc62d25=_0x5e0dbb+_0x35c567(0x118);renameSync(_0x5e0dbb,_0xc62d25),logger['setLogPath'](_0x26fb6b),logger['info'](_0x35c567(0x104),_0x35c567(0x10e),{'from':_0x5e0dbb,'to':_0x30db8d,'appcode':_0x3358a6,'env':_0x50eacd[_0x35c567(0x103)]}),console[_0x35c567(0x10b)](a135_0x41ce3a['green']('✓\x20Upgraded\x20'+_0x33d609+'\x20→\x20.rabetbase.json')),console[_0x35c567(0x10b)](a135_0x41ce3a[_0x35c567(0xed)]('\x20\x20Apps:\x20'+Object[_0x35c567(0x100)](_0x50eacd[_0x35c567(0x10d)]||{})[_0x35c567(0x109)](',\x20'))),console['log'](a135_0x41ce3a[_0x35c567(0xed)](_0x35c567(0xf6)+_0x50eacd['defaultApp'])),console[_0x35c567(0x10b)](a135_0x41ce3a[_0x35c567(0x112)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x33d609+_0x35c567(0x118)));return;}const _0x426bf2=_0xcc03d6||await askAppcode(),_0x2ca23c=resolve(_0x26fb6b,NEW_CONFIG_NAME),_0x3cc434=getCliVersionFromPkg(),_0x1c0e77=readRawConfig(),_0x1e9eb5=typeof _0x1c0e77['env']===_0x35c567(0xfd)?_0x1c0e77[_0x35c567(0x103)]:undefined,_0x363525=buildCanonicalProjectConfig({},{'appCodes':[_0x426bf2],'env':_0x339901||_0x1e9eb5||'production','metadata':{'version':_0x3cc434,'createdAt':new Date()[_0x35c567(0xea)]()}});writeConfigFile(_0x2ca23c,_0x363525),logger['setLogPath'](_0x26fb6b),logger['info']('init',_0x35c567(0xff),{'appcode':_0x426bf2,'env':_0x363525[_0x35c567(0x103)],'version':_0x363525[_0x35c567(0x107)],'configPath':_0x2ca23c}),console[_0x35c567(0x10b)](a135_0x41ce3a['green']('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0x35c567(0x10b)](a135_0x41ce3a[_0x35c567(0xed)](_0x35c567(0xf1)+Object[_0x35c567(0x100)](_0x363525[_0x35c567(0x10d)]||{})[_0x35c567(0x109)](',\x20'))),console['log'](a135_0x41ce3a[_0x35c567(0xed)](_0x35c567(0xf6)+_0x363525[_0x35c567(0xee)])),console[_0x35c567(0x10b)](_0x35c567(0x116)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+_0x35c567(0x10a));}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x5f0d50=>{const _0x224205=a135_0xd1e3;if(!_0x5f0d50[_0x224205(0xeb)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x1e1e20,message:_0x27edf5}=validateAppcode(_0x5f0d50[_0x224205(0xeb)]());return _0x1e1e20||_0x27edf5||_0x224205(0xf7);}});}function getCliVersionFromPkg(){const _0xe98fd4=a135_0xd1e3;try{const _0x2f563f=fileURLToPath(import.meta.url),_0x3ca619=resolve(dirname(_0x2f563f),_0xe98fd4(0x102)),_0x2a35df=JSON['parse'](readFileSync(resolve(_0x3ca619,_0xe98fd4(0x110)),_0xe98fd4(0x113)));return _0x2a35df['version']||_0xe98fd4(0x105);}catch{return _0xe98fd4(0x105);}}
1
+ (function(_0x591e1e,_0x12abeb){const _0x2ade15=a137_0x213c,_0x4240ef=_0x591e1e();while(!![]){try{const _0x44aa30=-parseInt(_0x2ade15(0x80))/0x1*(parseInt(_0x2ade15(0xa2))/0x2)+parseInt(_0x2ade15(0xaa))/0x3*(-parseInt(_0x2ade15(0x81))/0x4)+parseInt(_0x2ade15(0x82))/0x5+parseInt(_0x2ade15(0xa5))/0x6*(parseInt(_0x2ade15(0x86))/0x7)+parseInt(_0x2ade15(0x9b))/0x8*(-parseInt(_0x2ade15(0xa9))/0x9)+-parseInt(_0x2ade15(0xaf))/0xa+parseInt(_0x2ade15(0x93))/0xb*(parseInt(_0x2ade15(0xa4))/0xc);if(_0x44aa30===_0x12abeb)break;else _0x4240ef['push'](_0x4240ef['shift']());}catch(_0x51d401){_0x4240ef['push'](_0x4240ef['shift']());}}}(a137_0x50ca,0x8ee89));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';function a137_0x50ca(){const _0x31409d=['Please\x20enter\x20App\x20Code:','apps','Upgrade\x20it\x20to\x20','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','从旧配置文件升级成功','env','../..','App\x20Code\x20cannot\x20be\x20empty','683903VNAZkb','\x20api\x20pull\x27','green','bold','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','info','✓\x20Upgraded\x20','app','5457448GCgBZI','keys','1.0.0','\x20api\x20generate\x27\x20and\x20\x27','join','cyan','setLogPath','2Dsdxmv','\x20\x20Apps:\x20','252LDHmmH','210642mkMVSi','init','gray','version','9ltGGKo','2163813AEmNoX','?\x20(Old\x20file\x20→\x20*.bak)','\x20\x20Default:\x20','.rabetbase.json','.bak','2504470eItXcG','production','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','\x20→\x20.rabetbase.json','trim','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','初始化项目配置文件成功','log','420997UKHfpL','4VeJclv','5017730XDbwdx','cwd','appcode','parse','70KCuZZt','utf8','string','defaultApp','yellow'];a137_0x50ca=function(){return _0x31409d;};return a137_0x50ca();}import a137_0x2c1464 from'chalk';function a137_0x213c(_0xe28b63,_0x41d866){_0xe28b63=_0xe28b63-0x80;const _0x50cae0=a137_0x50ca();let _0x213cbd=_0x50cae0[_0xe28b63];return _0x213cbd;}import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x39c6f9){const _0x2028c1=a137_0x213c,{appcode:_0x14a0f2,env:_0x190597,autoYes:_0x18e946}=_0x39c6f9,_0x26336=process[_0x2028c1(0x83)]();if(getProjectConfigPath())throw new Error(_0x2028c1(0x97));let _0xb8a335;for(const _0x19f699 of LEGACY_CONFIG_NAMES){const _0x5daa55=resolve(_0x26336,_0x19f699);if(existsSync(_0x5daa55)){_0xb8a335=_0x5daa55;break;}}if(_0xb8a335){let _0x1a28b5={};try{_0x1a28b5=JSON[_0x2028c1(0x85)](readFileSync(_0xb8a335,'utf8'));}catch{}const _0x17aa0b=basename(_0xb8a335),_0x3d89a5=_0x1a28b5?.[_0x2028c1(0x84)]||_0x1a28b5?.['app'];let _0x1ea263=_0x18e946;!_0x18e946&&(console['log'](a137_0x2c1464[_0x2028c1(0x8a)](_0x2028c1(0xb1)+a137_0x2c1464['bold'](_0x17aa0b))),_0x3d89a5&&console[_0x2028c1(0xb6)](a137_0x2c1464[_0x2028c1(0xa0)]('\x20\x20appcode:\x20'+_0x3d89a5)),_0x1ea263=await confirm({'message':_0x2028c1(0x8d)+a137_0x2c1464[_0x2028c1(0x96)](_0x2028c1(0xad))+_0x2028c1(0xab),'default':!![]}));if(!_0x1ea263){console['log']('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+'\x20workspace\x20init`\x20to\x20start\x20fresh.');return;}const _0x51eefe=resolve(_0x26336,NEW_CONFIG_NAME),_0x3b38d1=getCliVersionFromPkg(),_0x42e25f=readRawConfig(),_0x303d49=_0x14a0f2||(typeof _0x1a28b5?.['appcode']===_0x2028c1(0x88)?_0x1a28b5[_0x2028c1(0x84)]:undefined)||(typeof _0x1a28b5?.[_0x2028c1(0x9a)]===_0x2028c1(0x88)?_0x1a28b5['app']:undefined)||await askAppcode(),_0x2c8a35=typeof _0x1a28b5?.['env']==='string'?_0x1a28b5[_0x2028c1(0x90)]:typeof _0x42e25f[_0x2028c1(0x90)]===_0x2028c1(0x88)?_0x42e25f[_0x2028c1(0x90)]:_0x2028c1(0xb0),_0x522170=buildCanonicalProjectConfig({..._0x42e25f,..._0x1a28b5},{'appCodes':[_0x303d49],'env':_0x2c8a35,'metadata':{'version':_0x3b38d1,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0xb8a335}});writeConfigFile(_0x51eefe,_0x522170);const _0x57c8cf=_0xb8a335+_0x2028c1(0xae);renameSync(_0xb8a335,_0x57c8cf),logger['setLogPath'](_0x26336),logger['info'](_0x2028c1(0xa6),_0x2028c1(0x8f),{'from':_0xb8a335,'to':_0x51eefe,'appcode':_0x303d49,'env':_0x522170['env']}),console[_0x2028c1(0xb6)](a137_0x2c1464[_0x2028c1(0x95)](_0x2028c1(0x99)+_0x17aa0b+_0x2028c1(0xb2))),console[_0x2028c1(0xb6)](a137_0x2c1464[_0x2028c1(0xa0)](_0x2028c1(0xa3)+Object[_0x2028c1(0x9c)](_0x522170[_0x2028c1(0x8c)]||{})[_0x2028c1(0x9f)](',\x20'))),console[_0x2028c1(0xb6)](a137_0x2c1464[_0x2028c1(0xa0)](_0x2028c1(0xac)+_0x522170[_0x2028c1(0x89)])),console['log'](a137_0x2c1464[_0x2028c1(0xa7)](_0x2028c1(0x8e)+_0x17aa0b+_0x2028c1(0xae)));return;}const _0x531da8=_0x14a0f2||await askAppcode(),_0x14a810=resolve(_0x26336,NEW_CONFIG_NAME),_0x595823=getCliVersionFromPkg(),_0x7db7d=readRawConfig(),_0x134c8f=typeof _0x7db7d[_0x2028c1(0x90)]==='string'?_0x7db7d[_0x2028c1(0x90)]:undefined,_0x56b480=buildCanonicalProjectConfig({},{'appCodes':[_0x531da8],'env':_0x190597||_0x134c8f||_0x2028c1(0xb0),'metadata':{'version':_0x595823,'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x14a810,_0x56b480),logger[_0x2028c1(0xa1)](_0x26336),logger[_0x2028c1(0x98)](_0x2028c1(0xa6),_0x2028c1(0xb5),{'appcode':_0x531da8,'env':_0x56b480[_0x2028c1(0x90)],'version':_0x56b480['version'],'configPath':_0x14a810}),console['log'](a137_0x2c1464[_0x2028c1(0x95)](_0x2028c1(0xb4))),console[_0x2028c1(0xb6)](a137_0x2c1464[_0x2028c1(0xa0)](_0x2028c1(0xa3)+Object[_0x2028c1(0x9c)](_0x56b480[_0x2028c1(0x8c)]||{})[_0x2028c1(0x9f)](',\x20'))),console[_0x2028c1(0xb6)](a137_0x2c1464[_0x2028c1(0xa0)](_0x2028c1(0xac)+_0x56b480[_0x2028c1(0x89)])),console['log']('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+_0x2028c1(0x9e)+CLI_BIN_NAME+_0x2028c1(0x94));}function askAppcode(){const _0x10ff1e=a137_0x213c;return input({'message':_0x10ff1e(0x8b),'validate':_0x126336=>{const _0x27c315=_0x10ff1e;if(!_0x126336['trim']())return _0x27c315(0x92);const {valid:_0x30b943,message:_0x5bed3c}=validateAppcode(_0x126336[_0x27c315(0xb3)]());return _0x30b943||_0x5bed3c||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x36ceac=a137_0x213c;try{const _0x33d911=fileURLToPath(import.meta.url),_0x42a413=resolve(dirname(_0x33d911),_0x36ceac(0x91)),_0x49c4ec=JSON['parse'](readFileSync(resolve(_0x42a413,'package.json'),_0x36ceac(0x87)));return _0x49c4ec[_0x36ceac(0xa8)]||_0x36ceac(0x9d);}catch{return _0x36ceac(0x9d);}}
@@ -1 +1 @@
1
- (function(_0x2a31a9,_0x4f3515){const _0x19661a=a136_0x14c4,_0x578917=_0x2a31a9();while(!![]){try{const _0x405044=-parseInt(_0x19661a(0x10b))/0x1+-parseInt(_0x19661a(0x11c))/0x2+-parseInt(_0x19661a(0xe9))/0x3+-parseInt(_0x19661a(0xeb))/0x4*(-parseInt(_0x19661a(0x108))/0x5)+parseInt(_0x19661a(0x12f))/0x6+-parseInt(_0x19661a(0x10e))/0x7+parseInt(_0x19661a(0xe8))/0x8;if(_0x405044===_0x4f3515)break;else _0x578917['push'](_0x578917['shift']());}catch(_0x5e92fb){_0x578917['push'](_0x578917['shift']());}}}(a136_0x5671,0x6cc2a));import a136_0xa06575 from'chalk';import a136_0x535223 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a136_0x14c4(_0x4b9b01,_0x58fdb9){_0x4b9b01=_0x4b9b01-0xc2;const _0x5671d4=a136_0x5671();let _0x14c4b0=_0x5671d4[_0x4b9b01];return _0x14c4b0;}import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x19bf50=>_0x19bf50!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x305713){const _0x4c689d=a136_0x14c4,_0x3e3cdd=[];for(const _0x4f8ff8 of Object[_0x4c689d(0x128)](CORE_IDE_CONFIGS)){if(_0x4f8ff8[_0x4c689d(0x140)])for(const _0x30e5ca of _0x4f8ff8[_0x4c689d(0x140)]){_0x3e3cdd['push'](resolve(_0x305713,_0x30e5ca[_0x4c689d(0xcc)]));}}return _0x3e3cdd;}function analyse(_0x1da1c3){const _0x43c506=a136_0x14c4;let _0x5a0f3a=null;const _0x3f7558=resolve(_0x1da1c3,NEW_CONFIG_NAME),_0x59f836=existsSync(_0x3f7558);for(const _0x172231 of LEGACY_CONFIG_NAMES){const _0x459ba5=resolve(_0x1da1c3,_0x172231);if(existsSync(_0x459ba5)){const _0x2f436d=readConfigFile(_0x459ba5),_0x95c95e=Object[_0x43c506(0xe3)](_0x2f436d)[_0x43c506(0xe0)](_0x358e8e=>typeof _0x2f436d[_0x358e8e]!==_0x43c506(0xd0));_0x5a0f3a={'oldPath':_0x459ba5,'hasNewConfig':_0x59f836,'fields':_0x95c95e};break;}}const _0x952270=[],_0x5b20e8=resolve(_0x1da1c3,_0x43c506(0xd2));if(existsSync(_0x5b20e8))_0x952270[_0x43c506(0x119)](_0x5b20e8);const _0x477185=resolve(_0x1da1c3,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x477185))_0x952270[_0x43c506(0x119)](_0x477185);const _0x15fefe=resolve(_0x1da1c3,'.claude/skills/lovrabet');if(existsSync(_0x15fefe))_0x952270[_0x43c506(0x119)](_0x15fefe);for(const _0x280d48 of collectIdeSkillFiles(_0x1da1c3)){if(existsSync(_0x280d48))_0x952270[_0x43c506(0x119)](_0x280d48);}let _0x15b1bc=null;const _0xdd7aaf=resolve(_0x1da1c3,_0x43c506(0x100));if(existsSync(_0xdd7aaf))try{const _0xb74e73=JSON[_0x43c506(0xda)](readFileSync(_0xdd7aaf,_0x43c506(0xfd)));if(_0xb74e73?.[_0x43c506(0x142)]&&typeof _0xb74e73[_0x43c506(0x142)]===_0x43c506(0x115)){const _0x15c38f=[];for(const [_0x312e8f,_0x39b33f]of Object[_0x43c506(0xd1)](_0xb74e73['mcpServers'])){const _0x12d854=_0x39b33f;_0x12d854?.[_0x43c506(0x10d)]&&Array['isArray'](_0x12d854[_0x43c506(0x10d)])&&_0x12d854[_0x43c506(0x10d)][_0x43c506(0x11f)](_0x4e5647=>typeof _0x4e5647===_0x43c506(0xf2)&&_0x4e5647[_0x43c506(0xf1)](_0x43c506(0x127)))&&_0x15c38f[_0x43c506(0x119)](_0x312e8f);}_0x15c38f[_0x43c506(0x106)]>0x0&&(_0x15b1bc={'path':_0xdd7aaf,'keys':_0x15c38f});}}catch{}const _0x1c028d=_0x952270[_0x43c506(0x106)]>0x0||_0x5a0f3a!==null;let _0x32f844=null;const _0x1e0d9a=resolve(_0x1da1c3,_0x43c506(0x12d));if(existsSync(_0x1e0d9a))try{const _0x5ddd50=JSON[_0x43c506(0xda)](readFileSync(_0x1e0d9a,_0x43c506(0xfd)));for(const _0x50f69e of[_0x43c506(0x103),_0x43c506(0xcb)]){const _0x551fbe=_0x5ddd50?.[_0x50f69e]?.['@lovrabet/sdk'];if(typeof _0x551fbe===_0x43c506(0xf2)){_0x551fbe!==_0x43c506(0x10c)&&(_0x32f844={'pkgPath':_0x1e0d9a,'currentVersion':_0x551fbe,'field':_0x50f69e});break;}}}catch{}return{'configMigration':_0x5a0f3a,'oldArtifacts':_0x952270,'oldMcpConfig':_0x15b1bc,'needsSkillSwap':_0x1c028d,'sdkUpgrade':_0x32f844};}function a136_0x5671(){const _0x4eac67=['@lovrabet/sdk','isDirectory','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Config\x20file:','utf8','Config\x20migration','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','.cursor/mcp.json','inherit','done','dependencies','yes','not\x20needed','length','hasNewConfig','5Pnvpqq','Legacy\x20artifacts:','\x20(backup:\x20','462376lQTePL','latest','args','3312855ZcVIfo','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','exit\x20','Step\x204/7:\x20MCP\x20config\x20—\x20','failed','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','detail','object','gray','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','[\x22@lovrabet/sdk\x22]:\x20','push','info','Step\x201/7:\x20Migrating\x20config...','1643736FOejpK','\x20→\x20latest','\x20\x20Fields\x20to\x20migrate:\x20','some','\x20removed\x20(','lovrabet/lovrabet-skill\x20removed','isArray','skipped\x20(no\x20legacy\x20config)','succeed','green','red','@lovrabet/dataset-mcp-server','values','not\x20found\x20(will\x20create)','fields','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','\x20→\x20keys:\x20','package.json','Step\x206/7:\x20Installing\x20new\x20skill...','1534806AoyRnh','oldPath','label','needsSkillSwap','\x20\x20#\x20or','===\x20Upgrade\x20Analysis\x20===','stringify','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Upgrade\x20cancelled.','lovrabet/rabetbase\x20installed\x20globally','Remove\x20.lovrabet/','===\x20Upgrade\x20Summary\x20===','\x20→\x20','oldArtifacts','\x20\x20npm\x20install','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','files','yellow','mcpServers','no\x20matching\x20entry\x20found','\x20removed','cwd','none\x20found','Step\x205/7:\x20Removing\x20old\x20skill...','\x20\x20Step\x20','join','no\x20legacy\x20config\x20found','Install\x20new\x20skill','devDependencies','path','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','MCP\x20config:','status','undefined','entries','.lovrabet','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Upgrade\x20completed\x20successfully!','Step\x201/7:\x20Config\x20migration\x20—\x20','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','CANCEL','cyan','lovrabet/rabetbase','parse','bold','oldMcpConfig','fail','\x20from\x20','@lovrabet/sdk:','filter','Upgrade\x20@lovrabet/sdk','needed','keys','start','Clean\x20MCP\x20config','\x20\x20bun\x20install','white','12549080Dtavhl','265299CEDWBb','skipped','1867952PjKsBl','Remove\x20old\x20skill','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Proceed\x20with\x20upgrade?','message','log','includes','string','.bak','sdkUpgrade','already\x20exists\x20(will\x20merge)','FOUND','error','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...'];a136_0x5671=function(){return _0x4eac67;};return a136_0x5671();}function printReport(_0x5772fd){const _0x5f06c4=a136_0x14c4,{configMigration:_0x49c0cc,oldArtifacts:_0x295488,oldMcpConfig:_0xd8bc68,needsSkillSwap:_0x55ea32}=_0x5772fd;console[_0x5f06c4(0xf0)](''),console[_0x5f06c4(0xf0)](a136_0xa06575['bold'](_0x5f06c4(0x134))),console[_0x5f06c4(0xf0)]('');_0x49c0cc?(console[_0x5f06c4(0xf0)](a136_0xa06575[_0x5f06c4(0xd8)](_0x5f06c4(0xfc))+('\x20\x20'+a136_0xa06575['yellow'](_0x49c0cc['oldPath']))),console['log']('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x49c0cc[_0x5f06c4(0x107)]?a136_0xa06575['green'](_0x5f06c4(0xf5)):a136_0xa06575[_0x5f06c4(0x116)](_0x5f06c4(0x129)))),console[_0x5f06c4(0xf0)](_0x5f06c4(0x11e)+_0x49c0cc[_0x5f06c4(0x12a)]['join'](',\x20')),console[_0x5f06c4(0xf0)](_0x5f06c4(0xd3))):console['log'](a136_0xa06575[_0x5f06c4(0xd8)](_0x5f06c4(0xfc))+'\x20\x20'+a136_0xa06575[_0x5f06c4(0x116)](_0x5f06c4(0xc9)));console[_0x5f06c4(0xf0)]('');if(_0x295488[_0x5f06c4(0x106)]>0x0){console[_0x5f06c4(0xf0)](a136_0xa06575[_0x5f06c4(0xd8)](_0x5f06c4(0x109)));for(const _0x479cb8 of _0x295488){console[_0x5f06c4(0xf0)]('\x20\x20'+a136_0xa06575['red'](_0x5f06c4(0xf6))+'\x20\x20'+_0x479cb8);}console[_0x5f06c4(0xf0)]('\x20\x20Action:\x20delete');}else console[_0x5f06c4(0xf0)](a136_0xa06575[_0x5f06c4(0xd8)]('Legacy\x20artifacts:')+'\x20\x20'+a136_0xa06575[_0x5f06c4(0x116)](_0x5f06c4(0xc5)));console['log']('');_0xd8bc68?(console[_0x5f06c4(0xf0)](a136_0xa06575['cyan'](_0x5f06c4(0xce))+('\x20\x20'+a136_0xa06575['yellow'](_0xd8bc68[_0x5f06c4(0xcc)])+_0x5f06c4(0x12c)+_0xd8bc68[_0x5f06c4(0xe3)]['join'](',\x20'))),console[_0x5f06c4(0xf0)](_0x5f06c4(0x10f))):console[_0x5f06c4(0xf0)](a136_0xa06575[_0x5f06c4(0xd8)]('MCP\x20config:')+'\x20\x20'+a136_0xa06575['gray']('no\x20legacy\x20entry'));console['log'](''),console[_0x5f06c4(0xf0)](a136_0xa06575[_0x5f06c4(0xd8)]('Skill\x20swap:')+('\x20\x20'+(_0x55ea32?a136_0xa06575[_0x5f06c4(0x141)](_0x5f06c4(0xe2)):a136_0xa06575[_0x5f06c4(0x125)](_0x5f06c4(0x105)))));_0x55ea32&&console[_0x5f06c4(0xf0)](_0x5f06c4(0x117)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x5f06c4(0xf0)]('');if(_0x5772fd[_0x5f06c4(0xf4)]){const {currentVersion:_0x255cf1,field:_0xd301a5,pkgPath:_0x1f9cab}=_0x5772fd['sdkUpgrade'];console[_0x5f06c4(0xf0)](a136_0xa06575[_0x5f06c4(0xd8)](_0x5f06c4(0xdf))+('\x20\x20'+a136_0xa06575[_0x5f06c4(0x141)](_0x1f9cab))),console[_0x5f06c4(0xf0)]('\x20\x20Current\x20version\x20in\x20'+_0xd301a5+':\x20'+a136_0xa06575[_0x5f06c4(0x141)](_0x255cf1)+_0x5f06c4(0x13b)+a136_0xa06575[_0x5f06c4(0x125)](_0x5f06c4(0x10c))),console['log'](_0x5f06c4(0x13f));}else console[_0x5f06c4(0xf0)](a136_0xa06575[_0x5f06c4(0xd8)](_0x5f06c4(0xdf))+'\x20\x20'+a136_0xa06575[_0x5f06c4(0x116)]('not\x20found\x20or\x20already\x20at\x20latest'));console['log']('');}function execConfigMigration(_0x18bf8e,_0xafb64){const _0x1ea4b6=a136_0x14c4,{configMigration:_0x5b8b5f}=_0x18bf8e;if(!_0x5b8b5f?.[_0x1ea4b6(0x130)])return{'step':0x1,'label':_0x1ea4b6(0xfe),'ok':!![],'detail':_0x1ea4b6(0x123)};const _0x1ed0ea=readConfigFile(_0x5b8b5f[_0x1ea4b6(0x130)]),_0x39150e=resolve(_0xafb64,NEW_CONFIG_NAME),_0x2053e7=_0x5b8b5f[_0x1ea4b6(0x107)]?readConfigFile(_0x39150e):{};for(const [_0x14fbee,_0x11bb7f]of Object[_0x1ea4b6(0xd1)](_0x1ed0ea)){!(_0x14fbee in _0x2053e7)&&(_0x2053e7[_0x14fbee]=_0x11bb7f);}writeConfigFile(_0x39150e,_0x2053e7);const _0x46ec18=_0x5b8b5f['oldPath']+_0x1ea4b6(0xf3);return renameSync(_0x5b8b5f[_0x1ea4b6(0x130)],_0x46ec18),{'step':0x1,'label':_0x1ea4b6(0xfe),'ok':!![],'detail':_0x5b8b5f['oldPath']+'\x20→\x20'+_0x39150e+_0x1ea4b6(0x10a)+_0x46ec18+')'};}function execRemoveOldArtifacts(_0x3f25b0){const _0x58d969=a136_0x14c4,_0x29a09a=[];for(const _0x462508 of _0x3f25b0){try{if(!existsSync(_0x462508))continue;const _0x189bea=tryStat(_0x462508);_0x189bea?.[_0x58d969(0xfa)]()?rmSync(_0x462508,{'recursive':!![],'force':!![]}):unlinkSync(_0x462508);}catch(_0xd301ef){_0x29a09a[_0x58d969(0x119)](_0x462508+':\x20'+_0xd301ef[_0x58d969(0xef)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x29a09a['length']===0x0,'detail':_0x29a09a['length']>0x0?_0x3f25b0[_0x58d969(0x106)]-_0x29a09a['length']+'/'+_0x3f25b0[_0x58d969(0x106)]+_0x58d969(0x120)+_0x29a09a[_0x58d969(0xc8)](';\x20')+')':_0x3f25b0[_0x58d969(0x106)]+_0x58d969(0xc3)};}function execCleanMcp(_0x7de2ff){const _0x18f572=a136_0x14c4;if(!_0x7de2ff[_0x18f572(0xdc)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x18f572(0xea)};try{const _0x5b79a7=readFileSync(_0x7de2ff[_0x18f572(0xdc)][_0x18f572(0xcc)],_0x18f572(0xfd)),_0x5db487=JSON[_0x18f572(0xda)](_0x5b79a7);if(_0x5db487?.['mcpServers']&&typeof _0x5db487[_0x18f572(0x142)]===_0x18f572(0x115)){const _0x160a5c=[];for(const [_0xbf584b,_0x38e402]of Object[_0x18f572(0xd1)](_0x5db487['mcpServers'])){_0x38e402?.['args']&&Array[_0x18f572(0x122)](_0x38e402[_0x18f572(0x10d)])&&_0x38e402[_0x18f572(0x10d)][_0x18f572(0x11f)](_0x13515d=>typeof _0x13515d==='string'&&_0x13515d[_0x18f572(0xf1)](_0x18f572(0x127)))&&_0x160a5c[_0x18f572(0x119)](_0xbf584b);}for(const _0x48c77d of _0x160a5c){delete _0x5db487[_0x18f572(0x142)][_0x48c77d];}return _0x160a5c[_0x18f572(0x106)]>0x0&&writeFileSync(_0x7de2ff['oldMcpConfig'][_0x18f572(0xcc)],JSON['stringify'](_0x5db487,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x18f572(0xe5),'ok':!![],'detail':'removed\x20'+_0x160a5c['join'](',\x20')+_0x18f572(0xde)+_0x7de2ff['oldMcpConfig']['path']};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x18f572(0xc2)};}catch(_0x798081){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x798081[_0x18f572(0xef)]};}}function execSkillsRemove(_0x577bcf,_0x25811c){const _0x49c0b8=a136_0x14c4,_0x51d43f=runNpxSkillsRemove(_0x577bcf,{'stdio':_0x49c0b8(0x101),'yes':_0x25811c});return{'step':0x5,'label':_0x49c0b8(0xec),'ok':_0x51d43f['ok'],'detail':_0x51d43f['ok']?_0x49c0b8(0x121):_0x51d43f[_0x49c0b8(0xf7)]??_0x49c0b8(0x110)+_0x51d43f[_0x49c0b8(0xcf)]};}function execSkillsAdd(_0x444e0e,_0x402c0a){const _0x4ffec3=a136_0x14c4,_0x222a43=runNpxSkillsAddGlobal(_0x444e0e,_0x4ffec3(0xd9),{'stdio':_0x4ffec3(0x101),'yes':_0x402c0a});return{'step':0x6,'label':_0x4ffec3(0xca),'ok':_0x222a43['ok'],'detail':_0x222a43['ok']?_0x4ffec3(0x138):_0x222a43[_0x4ffec3(0xf7)]??_0x4ffec3(0x110)+_0x222a43[_0x4ffec3(0xcf)]};}function execUpgradeSdk(_0x16f014){const _0x1d5b2d=a136_0x14c4;if(!_0x16f014[_0x1d5b2d(0xf4)])return{'step':0x7,'label':_0x1d5b2d(0xe1),'ok':!![],'detail':_0x1d5b2d(0xfb)};const {pkgPath:_0x15b601,currentVersion:_0x40a5fe,field:_0x13d255}=_0x16f014[_0x1d5b2d(0xf4)];try{const _0x434be1=readFileSync(_0x15b601,_0x1d5b2d(0xfd)),_0x239714=JSON[_0x1d5b2d(0xda)](_0x434be1);return _0x239714[_0x13d255][_0x1d5b2d(0xf9)]='latest',writeFileSync(_0x15b601,JSON[_0x1d5b2d(0x135)](_0x239714,null,0x2)+'\x0a',_0x1d5b2d(0xfd)),{'step':0x7,'label':_0x1d5b2d(0xe1),'ok':!![],'detail':_0x13d255+_0x1d5b2d(0x118)+_0x40a5fe+_0x1d5b2d(0x11d)};}catch(_0x4f5391){return{'step':0x7,'label':_0x1d5b2d(0xe1),'ok':![],'detail':_0x4f5391[_0x1d5b2d(0xef)]};}}function tryStat(_0x1a6a70){try{return statSync(_0x1a6a70);}catch{return undefined;}}function printSummary(_0x92834f){const _0x80ec84=a136_0x14c4;console['log'](''),console['log'](a136_0xa06575['bold'](_0x80ec84(0x13a))),console['log']('');for(const _0x3aece1 of _0x92834f){const _0x10c0b5=_0x3aece1['ok']?a136_0xa06575['green']('OK'):a136_0xa06575[_0x80ec84(0x126)]('FAIL');console[_0x80ec84(0xf0)]('\x20\x20'+_0x10c0b5+_0x80ec84(0xc7)+_0x3aece1['step']+':\x20'+_0x3aece1[_0x80ec84(0x131)]);if(_0x3aece1[_0x80ec84(0x114)])console[_0x80ec84(0xf0)](_0x80ec84(0x13e)+a136_0xa06575[_0x80ec84(0x116)](_0x3aece1[_0x80ec84(0x114)]));}console[_0x80ec84(0xf0)]('');}export async function upgradeApp(_0x54debd,_0x316ec7){const _0x54cd97=a136_0x14c4,_0x7cde5d=process[_0x54cd97(0xc4)](),_0x2b66d9=analyse(_0x7cde5d),_0x9f9296=!_0x2b66d9['configMigration']&&_0x2b66d9[_0x54cd97(0x13c)][_0x54cd97(0x106)]===0x0&&!_0x2b66d9[_0x54cd97(0xdc)]&&!_0x2b66d9[_0x54cd97(0x132)]&&!_0x2b66d9['sdkUpgrade'];if(_0x9f9296){console[_0x54cd97(0xf0)](a136_0xa06575[_0x54cd97(0x125)](_0x54cd97(0x12b)));return;}printReport(_0x2b66d9);const _0x59d8df=!!(_0x316ec7[_0x54cd97(0x104)]||_0x316ec7['Y']||_0x54debd);if(!_0x59d8df)try{const _0x49b023=await askConfirm(_0x54cd97(0xee));if(!_0x49b023){console[_0x54cd97(0xf0)](a136_0xa06575[_0x54cd97(0x116)](_0x54cd97(0x137)));return;}}catch(_0x33ab04){if(_0x33ab04?.[_0x54cd97(0xef)]===_0x54cd97(0xd7)){console[_0x54cd97(0xf0)](a136_0xa06575[_0x54cd97(0x116)](_0x54cd97(0x137)));return;}throw _0x33ab04;}const _0xd57254=[],_0x3a65e7=a136_0x535223({'text':_0x54cd97(0x11b),'color':_0x54cd97(0xd8)})[_0x54cd97(0xe4)](),_0x1d9a53=execConfigMigration(_0x2b66d9,_0x7cde5d);_0xd57254[_0x54cd97(0x119)](_0x1d9a53),_0x3a65e7[_0x1d9a53['ok']?_0x54cd97(0x124):_0x54cd97(0xdd)](_0x54cd97(0xd5)+(_0x1d9a53[_0x54cd97(0x114)]??(_0x1d9a53['ok']?_0x54cd97(0x102):_0x54cd97(0x112))));const _0x29a7f2=resolve(_0x7cde5d,'.lovrabet'),_0x50b87d=a136_0x535223({'text':_0x54cd97(0xf8),'color':_0x54cd97(0xd8)})[_0x54cd97(0xe4)]();if(existsSync(_0x29a7f2))try{rmSync(_0x29a7f2,{'recursive':!![],'force':!![]}),_0x50b87d[_0x54cd97(0x124)](_0x54cd97(0xcd)),_0xd57254[_0x54cd97(0x119)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x1838a7){_0x50b87d[_0x54cd97(0xdd)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x1838a7[_0x54cd97(0xef)]),_0xd57254[_0x54cd97(0x119)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x1838a7[_0x54cd97(0xef)]});}else _0x50b87d[_0x54cd97(0x11a)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0xd57254[_0x54cd97(0x119)]({'step':0x2,'label':_0x54cd97(0x139),'ok':!![],'detail':'skipped'});const _0x1a4179=a136_0x535223({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x54cd97(0xd8)})[_0x54cd97(0xe4)](),_0x81e17c=execRemoveOldArtifacts(_0x2b66d9[_0x54cd97(0x13c)]);_0xd57254[_0x54cd97(0x119)](_0x81e17c),_0x1a4179[_0x81e17c['ok']?_0x54cd97(0x124):_0x54cd97(0xdd)](_0x54cd97(0x113)+(_0x81e17c['detail']??(_0x81e17c['ok']?_0x54cd97(0x102):_0x54cd97(0x112))));const _0x2b658e=a136_0x535223({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x54cd97(0xd8)})[_0x54cd97(0xe4)](),_0xe714c5=execCleanMcp(_0x2b66d9);_0xd57254[_0x54cd97(0x119)](_0xe714c5),_0x2b658e[_0xe714c5['ok']?_0x54cd97(0x124):_0x54cd97(0xdd)](_0x54cd97(0x111)+(_0xe714c5[_0x54cd97(0x114)]??(_0xe714c5['ok']?_0x54cd97(0x102):_0x54cd97(0x112))));const _0x41f43d=a136_0x535223({'text':_0x54cd97(0xc6),'color':'cyan'})[_0x54cd97(0xe4)](),_0x15b52d=execSkillsRemove(_0x7cde5d,_0x59d8df);_0xd57254[_0x54cd97(0x119)](_0x15b52d),_0x41f43d[_0x15b52d['ok']?_0x54cd97(0x124):'fail'](_0x54cd97(0xd6)+(_0x15b52d[_0x54cd97(0x114)]??(_0x15b52d['ok']?'done':_0x54cd97(0x112))));const _0x14b842=a136_0x535223({'text':_0x54cd97(0x12e),'color':'cyan'})[_0x54cd97(0xe4)](),_0x599e95=execSkillsAdd(_0x7cde5d,_0x59d8df);_0xd57254[_0x54cd97(0x119)](_0x599e95),_0x14b842[_0x599e95['ok']?_0x54cd97(0x124):'fail'](_0x54cd97(0x136)+(_0x599e95[_0x54cd97(0x114)]??(_0x599e95['ok']?_0x54cd97(0x102):_0x54cd97(0x112))));const _0x207649=a136_0x535223({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':'cyan'})['start'](),_0x112c79=execUpgradeSdk(_0x2b66d9);_0xd57254[_0x54cd97(0x119)](_0x112c79),_0x207649[_0x112c79['ok']?_0x54cd97(0x124):_0x54cd97(0xdd)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x112c79['detail']??(_0x112c79['ok']?_0x54cd97(0x102):_0x54cd97(0x112)))),printSummary(_0xd57254);const _0x4ce065=_0xd57254['some'](_0x2fb4c3=>!_0x2fb4c3['ok']);_0x4ce065?console[_0x54cd97(0xf0)](a136_0xa06575['yellow'](_0x54cd97(0xff))):console[_0x54cd97(0xf0)](a136_0xa06575[_0x54cd97(0x125)](_0x54cd97(0xd4))),_0x112c79['ok']&&_0x2b66d9[_0x54cd97(0xf4)]&&(console[_0x54cd97(0xf0)](''),console['log'](a136_0xa06575[_0x54cd97(0xdb)][_0x54cd97(0xd8)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x54cd97(0xf0)](a136_0xa06575[_0x54cd97(0xd8)](_0x54cd97(0xed))),console[_0x54cd97(0xf0)](''),console[_0x54cd97(0xf0)](a136_0xa06575['white'](_0x54cd97(0x13d))),console['log'](a136_0xa06575[_0x54cd97(0xe7)](_0x54cd97(0x133))),console[_0x54cd97(0xf0)](a136_0xa06575['white'](_0x54cd97(0xe6))),console['log'](''));}
1
+ const a138_0x4115ca=a138_0x4c97;(function(_0x5e7a65,_0xca1008){const _0x31159c=a138_0x4c97,_0x5d2962=_0x5e7a65();while(!![]){try{const _0x3b29c7=-parseInt(_0x31159c(0xdb))/0x1*(parseInt(_0x31159c(0xe7))/0x2)+parseInt(_0x31159c(0xfa))/0x3+-parseInt(_0x31159c(0x116))/0x4*(-parseInt(_0x31159c(0xed))/0x5)+-parseInt(_0x31159c(0x120))/0x6+-parseInt(_0x31159c(0x104))/0x7*(-parseInt(_0x31159c(0xde))/0x8)+-parseInt(_0x31159c(0x122))/0x9+parseInt(_0x31159c(0xec))/0xa;if(_0x3b29c7===_0xca1008)break;else _0x5d2962['push'](_0x5d2962['shift']());}catch(_0x3a6256){_0x5d2962['push'](_0x5d2962['shift']());}}}(a138_0x5a3b,0x5e753));import a138_0x4faac9 from'chalk';function a138_0x4c97(_0x369681,_0x2a7679){_0x369681=_0x369681-0xb7;const _0x5a3b0d=a138_0x5a3b();let _0x4c97c5=_0x5a3b0d[_0x369681];return _0x4c97c5;}import a138_0x500716 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[a138_0x4115ca(0x10b)](_0x463721=>_0x463721!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x36d460){const _0x4d9e0=a138_0x4115ca,_0x524d5c=[];for(const _0x209b02 of Object['values'](CORE_IDE_CONFIGS)){if(_0x209b02[_0x4d9e0(0xf4)])for(const _0x27e760 of _0x209b02['files']){_0x524d5c[_0x4d9e0(0xf3)](resolve(_0x36d460,_0x27e760[_0x4d9e0(0x102)]));}}return _0x524d5c;}function analyse(_0x457dcc){const _0x75689a=a138_0x4115ca;let _0x197f2b=null;const _0x1439a6=resolve(_0x457dcc,NEW_CONFIG_NAME),_0x201cc8=existsSync(_0x1439a6);for(const _0x52f151 of LEGACY_CONFIG_NAMES){const _0x5b02ac=resolve(_0x457dcc,_0x52f151);if(existsSync(_0x5b02ac)){const _0x5daa9e=readConfigFile(_0x5b02ac),_0x41886b=Object[_0x75689a(0x12f)](_0x5daa9e)[_0x75689a(0x10b)](_0x59b318=>typeof _0x5daa9e[_0x59b318]!==_0x75689a(0xf7));_0x197f2b={'oldPath':_0x5b02ac,'hasNewConfig':_0x201cc8,'fields':_0x41886b};break;}}const _0x148b8b=[],_0x7727b=resolve(_0x457dcc,'.lovrabet');if(existsSync(_0x7727b))_0x148b8b[_0x75689a(0xf3)](_0x7727b);const _0x4c2061=resolve(_0x457dcc,_0x75689a(0xb7));if(existsSync(_0x4c2061))_0x148b8b[_0x75689a(0xf3)](_0x4c2061);const _0x3a2fee=resolve(_0x457dcc,'.claude/skills/lovrabet');if(existsSync(_0x3a2fee))_0x148b8b[_0x75689a(0xf3)](_0x3a2fee);for(const _0x34d47c of collectIdeSkillFiles(_0x457dcc)){if(existsSync(_0x34d47c))_0x148b8b[_0x75689a(0xf3)](_0x34d47c);}let _0x35f376=null;const _0x18993f=resolve(_0x457dcc,_0x75689a(0xf9));if(existsSync(_0x18993f))try{const _0x241683=JSON[_0x75689a(0xd0)](readFileSync(_0x18993f,_0x75689a(0x100)));if(_0x241683?.[_0x75689a(0x12b)]&&typeof _0x241683[_0x75689a(0x12b)]==='object'){const _0x10182c=[];for(const [_0x2af53d,_0x1ea329]of Object[_0x75689a(0xe0)](_0x241683[_0x75689a(0x12b)])){const _0x4e8ff7=_0x1ea329;_0x4e8ff7?.[_0x75689a(0xce)]&&Array['isArray'](_0x4e8ff7[_0x75689a(0xce)])&&_0x4e8ff7['args'][_0x75689a(0x11d)](_0x18e265=>typeof _0x18e265===_0x75689a(0xc1)&&_0x18e265[_0x75689a(0x103)](_0x75689a(0xf5)))&&_0x10182c['push'](_0x2af53d);}_0x10182c[_0x75689a(0xd2)]>0x0&&(_0x35f376={'path':_0x18993f,'keys':_0x10182c});}}catch{}const _0x4b37f3=_0x148b8b[_0x75689a(0xd2)]>0x0||_0x197f2b!==null;let _0x232ce0=null;const _0xf676ae=resolve(_0x457dcc,'package.json');if(existsSync(_0xf676ae))try{const _0x4ad5e4=JSON[_0x75689a(0xd0)](readFileSync(_0xf676ae,'utf8'));for(const _0x91014 of[_0x75689a(0xc2),_0x75689a(0xdd)]){const _0x361198=_0x4ad5e4?.[_0x91014]?.['@lovrabet/sdk'];if(typeof _0x361198===_0x75689a(0xc1)){_0x361198!==_0x75689a(0xf0)&&(_0x232ce0={'pkgPath':_0xf676ae,'currentVersion':_0x361198,'field':_0x91014});break;}}}catch{}return{'configMigration':_0x197f2b,'oldArtifacts':_0x148b8b,'oldMcpConfig':_0x35f376,'needsSkillSwap':_0x4b37f3,'sdkUpgrade':_0x232ce0};}function a138_0x5a3b(){const _0x3fbd47=['1PLlStw','not\x20needed','devDependencies','584TlrDuL','stringify','entries','inherit','done','log','Clean\x20MCP\x20config','.bak','Remove\x20.lovrabet/','1437424XsLLnR','white','[\x22@lovrabet/sdk\x22]:\x20','Legacy\x20artifacts:','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','10708900FLlZDS','151465mWluLv','\x20\x20#\x20or','isArray','latest','\x20\x20npm\x20install','\x20removed\x20(','push','files','@lovrabet/dataset-mcp-server','not\x20found\x20or\x20already\x20at\x20latest','undefined','\x20from\x20','.cursor/mcp.json','1319214ryxYUW','skipped','error','@lovrabet/sdk','\x20→\x20keys:\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','utf8','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','path','includes','5663txUGQU','hasNewConfig','\x20\x20New\x20config\x20(.rabetbase.json):\x20','oldMcpConfig','\x20\x20Fields\x20to\x20migrate:\x20','Config\x20file:','Skill\x20swap:','filter','Upgrade\x20@lovrabet/sdk','Step\x204/7:\x20Cleaning\x20MCP\x20config...','bold','\x20→\x20latest','Config\x20migration','label','yellow','Step\x201/7:\x20Migrating\x20config...','succeed','exit\x20','80kcUCSa','.lovrabet','sdkUpgrade','isDirectory','already\x20exists\x20(will\x20merge)','Install\x20new\x20skill','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','some','oldArtifacts','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','2994366cCboHh','no\x20matching\x20entry\x20found','5137857IbNhwy','needed','gray','\x20→\x20','cyan','none\x20found','failed','Proceed\x20with\x20upgrade?','message','mcpServers','===\x20Upgrade\x20Summary\x20===','Step\x206/7:\x20Installing\x20new\x20skill...','===\x20Upgrade\x20Analysis\x20===','keys','red','.cursor/rules/lovrabet_rules.mdc','skipped\x20(no\x20legacy\x20config)','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','@lovrabet/sdk:','\x20removed','info','join','no\x20legacy\x20entry','oldPath','detail','string','dependencies','start','fail','FOUND','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','lovrabet/rabetbase','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','MCP\x20config:','status','\x20\x20bun\x20install','no\x20legacy\x20config\x20found','\x20(backup:\x20','args','Step\x204/7:\x20MCP\x20config\x20—\x20','parse','fields','length','lovrabet/rabetbase\x20installed\x20globally','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','object','Remove\x20old\x20skill','Upgrade\x20cancelled.','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','green'];a138_0x5a3b=function(){return _0x3fbd47;};return a138_0x5a3b();}function printReport(_0x589de8){const _0x38a19d=a138_0x4115ca,{configMigration:_0x346aa1,oldArtifacts:_0x4f0abe,oldMcpConfig:_0x368bbe,needsSkillSwap:_0xfe4186}=_0x589de8;console[_0x38a19d(0xe3)](''),console['log'](a138_0x4faac9[_0x38a19d(0x10e)](_0x38a19d(0x12e))),console[_0x38a19d(0xe3)]('');_0x346aa1?(console['log'](a138_0x4faac9[_0x38a19d(0x126)](_0x38a19d(0x109))+('\x20\x20'+a138_0x4faac9['yellow'](_0x346aa1[_0x38a19d(0xbf)]))),console[_0x38a19d(0xe3)](_0x38a19d(0x106)+(_0x346aa1[_0x38a19d(0x105)]?a138_0x4faac9[_0x38a19d(0xda)](_0x38a19d(0x11a)):a138_0x4faac9[_0x38a19d(0x124)]('not\x20found\x20(will\x20create)'))),console['log'](_0x38a19d(0x108)+_0x346aa1[_0x38a19d(0xd1)][_0x38a19d(0xbd)](',\x20')),console[_0x38a19d(0xe3)](_0x38a19d(0x101))):console['log'](a138_0x4faac9[_0x38a19d(0x126)](_0x38a19d(0x109))+'\x20\x20'+a138_0x4faac9[_0x38a19d(0x124)](_0x38a19d(0xcc)));console[_0x38a19d(0xe3)]('');if(_0x4f0abe[_0x38a19d(0xd2)]>0x0){console[_0x38a19d(0xe3)](a138_0x4faac9['cyan'](_0x38a19d(0xea)));for(const _0xac5109 of _0x4f0abe){console['log']('\x20\x20'+a138_0x4faac9[_0x38a19d(0x130)](_0x38a19d(0xc5))+'\x20\x20'+_0xac5109);}console[_0x38a19d(0xe3)]('\x20\x20Action:\x20delete');}else console[_0x38a19d(0xe3)](a138_0x4faac9[_0x38a19d(0x126)](_0x38a19d(0xea))+'\x20\x20'+a138_0x4faac9[_0x38a19d(0x124)](_0x38a19d(0x127)));console[_0x38a19d(0xe3)]('');_0x368bbe?(console[_0x38a19d(0xe3)](a138_0x4faac9['cyan'](_0x38a19d(0xc9))+('\x20\x20'+a138_0x4faac9[_0x38a19d(0x112)](_0x368bbe[_0x38a19d(0x102)])+_0x38a19d(0xfe)+_0x368bbe[_0x38a19d(0x12f)][_0x38a19d(0xbd)](',\x20'))),console[_0x38a19d(0xe3)](_0x38a19d(0xb9))):console[_0x38a19d(0xe3)](a138_0x4faac9[_0x38a19d(0x126)](_0x38a19d(0xc9))+'\x20\x20'+a138_0x4faac9['gray'](_0x38a19d(0xbe)));console['log'](''),console[_0x38a19d(0xe3)](a138_0x4faac9['cyan'](_0x38a19d(0x10a))+('\x20\x20'+(_0xfe4186?a138_0x4faac9[_0x38a19d(0x112)](_0x38a19d(0x123)):a138_0x4faac9[_0x38a19d(0xda)](_0x38a19d(0xdc)))));_0xfe4186&&console[_0x38a19d(0xe3)](_0x38a19d(0xd9)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x38a19d(0xe3)]('');if(_0x589de8[_0x38a19d(0x118)]){const {currentVersion:_0x14d475,field:_0x23cc1d,pkgPath:_0x322f0e}=_0x589de8[_0x38a19d(0x118)];console[_0x38a19d(0xe3)](a138_0x4faac9[_0x38a19d(0x126)](_0x38a19d(0xba))+('\x20\x20'+a138_0x4faac9[_0x38a19d(0x112)](_0x322f0e))),console[_0x38a19d(0xe3)]('\x20\x20Current\x20version\x20in\x20'+_0x23cc1d+':\x20'+a138_0x4faac9[_0x38a19d(0x112)](_0x14d475)+_0x38a19d(0x125)+a138_0x4faac9['green'](_0x38a19d(0xf0))),console['log'](_0x38a19d(0xd5));}else console[_0x38a19d(0xe3)](a138_0x4faac9[_0x38a19d(0x126)](_0x38a19d(0xba))+'\x20\x20'+a138_0x4faac9[_0x38a19d(0x124)](_0x38a19d(0xf6)));console[_0x38a19d(0xe3)]('');}function execConfigMigration(_0x542ca6,_0x29c2e8){const _0x54fe0c=a138_0x4115ca,{configMigration:_0x871fe1}=_0x542ca6;if(!_0x871fe1?.[_0x54fe0c(0xbf)])return{'step':0x1,'label':_0x54fe0c(0x110),'ok':!![],'detail':_0x54fe0c(0xb8)};const _0x583b6a=readConfigFile(_0x871fe1[_0x54fe0c(0xbf)]),_0x56a802=resolve(_0x29c2e8,NEW_CONFIG_NAME),_0x26fde3=_0x871fe1[_0x54fe0c(0x105)]?readConfigFile(_0x56a802):{};for(const [_0x5e980c,_0xaaa5aa]of Object[_0x54fe0c(0xe0)](_0x583b6a)){!(_0x5e980c in _0x26fde3)&&(_0x26fde3[_0x5e980c]=_0xaaa5aa);}writeConfigFile(_0x56a802,_0x26fde3);const _0xd6317=_0x871fe1[_0x54fe0c(0xbf)]+_0x54fe0c(0xe5);return renameSync(_0x871fe1[_0x54fe0c(0xbf)],_0xd6317),{'step':0x1,'label':_0x54fe0c(0x110),'ok':!![],'detail':_0x871fe1['oldPath']+_0x54fe0c(0x125)+_0x56a802+_0x54fe0c(0xcd)+_0xd6317+')'};}function execRemoveOldArtifacts(_0x54839f){const _0x599524=a138_0x4115ca,_0x4eb8f7=[];for(const _0xdb32b2 of _0x54839f){try{if(!existsSync(_0xdb32b2))continue;const _0x4197c8=tryStat(_0xdb32b2);_0x4197c8?.[_0x599524(0x119)]()?rmSync(_0xdb32b2,{'recursive':!![],'force':!![]}):unlinkSync(_0xdb32b2);}catch(_0x11158d){_0x4eb8f7[_0x599524(0xf3)](_0xdb32b2+':\x20'+_0x11158d[_0x599524(0x12a)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x4eb8f7[_0x599524(0xd2)]===0x0,'detail':_0x4eb8f7['length']>0x0?_0x54839f[_0x599524(0xd2)]-_0x4eb8f7[_0x599524(0xd2)]+'/'+_0x54839f[_0x599524(0xd2)]+_0x599524(0xf2)+_0x4eb8f7[_0x599524(0xbd)](';\x20')+')':_0x54839f[_0x599524(0xd2)]+_0x599524(0xbb)};}function execCleanMcp(_0x149b69){const _0x58aac1=a138_0x4115ca;if(!_0x149b69[_0x58aac1(0x107)])return{'step':0x4,'label':_0x58aac1(0xe4),'ok':!![],'detail':'skipped'};try{const _0x2b05f1=readFileSync(_0x149b69[_0x58aac1(0x107)][_0x58aac1(0x102)],_0x58aac1(0x100)),_0x325926=JSON[_0x58aac1(0xd0)](_0x2b05f1);if(_0x325926?.[_0x58aac1(0x12b)]&&typeof _0x325926[_0x58aac1(0x12b)]===_0x58aac1(0xd6)){const _0x5a8619=[];for(const [_0x372f02,_0x185613]of Object[_0x58aac1(0xe0)](_0x325926[_0x58aac1(0x12b)])){_0x185613?.['args']&&Array[_0x58aac1(0xef)](_0x185613[_0x58aac1(0xce)])&&_0x185613[_0x58aac1(0xce)][_0x58aac1(0x11d)](_0x4d5eb8=>typeof _0x4d5eb8===_0x58aac1(0xc1)&&_0x4d5eb8[_0x58aac1(0x103)](_0x58aac1(0xf5)))&&_0x5a8619[_0x58aac1(0xf3)](_0x372f02);}for(const _0x18b9d4 of _0x5a8619){delete _0x325926[_0x58aac1(0x12b)][_0x18b9d4];}return _0x5a8619[_0x58aac1(0xd2)]>0x0&&writeFileSync(_0x149b69['oldMcpConfig']['path'],JSON[_0x58aac1(0xdf)](_0x325926,null,0x2)+'\x0a',_0x58aac1(0x100)),{'step':0x4,'label':_0x58aac1(0xe4),'ok':!![],'detail':'removed\x20'+_0x5a8619[_0x58aac1(0xbd)](',\x20')+_0x58aac1(0xf8)+_0x149b69[_0x58aac1(0x107)][_0x58aac1(0x102)]};}return{'step':0x4,'label':_0x58aac1(0xe4),'ok':!![],'detail':_0x58aac1(0x121)};}catch(_0x5262a4){return{'step':0x4,'label':_0x58aac1(0xe4),'ok':![],'detail':_0x5262a4['message']};}}function execSkillsRemove(_0xef3f3a,_0x18e385){const _0xf7100=a138_0x4115ca,_0x4325a2=runNpxSkillsRemove(_0xef3f3a,{'stdio':_0xf7100(0xe1),'yes':_0x18e385});return{'step':0x5,'label':_0xf7100(0xd7),'ok':_0x4325a2['ok'],'detail':_0x4325a2['ok']?'lovrabet/lovrabet-skill\x20removed':_0x4325a2[_0xf7100(0xfc)]??_0xf7100(0x115)+_0x4325a2['status']};}function execSkillsAdd(_0x3334ad,_0xa86471){const _0x377598=a138_0x4115ca,_0x2db564=runNpxSkillsAddGlobal(_0x3334ad,_0x377598(0xc7),{'stdio':_0x377598(0xe1),'yes':_0xa86471});return{'step':0x6,'label':_0x377598(0x11b),'ok':_0x2db564['ok'],'detail':_0x2db564['ok']?_0x377598(0xd3):_0x2db564[_0x377598(0xfc)]??'exit\x20'+_0x2db564[_0x377598(0xca)]};}function execUpgradeSdk(_0x46ca74){const _0x41873a=a138_0x4115ca;if(!_0x46ca74[_0x41873a(0x118)])return{'step':0x7,'label':_0x41873a(0x10c),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x23d270,currentVersion:_0x1f646e,field:_0x18a8f4}=_0x46ca74[_0x41873a(0x118)];try{const _0x5c4b7a=readFileSync(_0x23d270,'utf8'),_0x1a35e9=JSON[_0x41873a(0xd0)](_0x5c4b7a);return _0x1a35e9[_0x18a8f4][_0x41873a(0xfd)]=_0x41873a(0xf0),writeFileSync(_0x23d270,JSON['stringify'](_0x1a35e9,null,0x2)+'\x0a',_0x41873a(0x100)),{'step':0x7,'label':_0x41873a(0x10c),'ok':!![],'detail':_0x18a8f4+_0x41873a(0xe9)+_0x1f646e+_0x41873a(0x10f)};}catch(_0x45449c){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x45449c[_0x41873a(0x12a)]};}}function tryStat(_0x1c3ba5){try{return statSync(_0x1c3ba5);}catch{return undefined;}}function printSummary(_0x28bc16){const _0x293e0c=a138_0x4115ca;console['log'](''),console[_0x293e0c(0xe3)](a138_0x4faac9[_0x293e0c(0x10e)](_0x293e0c(0x12c))),console[_0x293e0c(0xe3)]('');for(const _0x5652c7 of _0x28bc16){const _0x888e17=_0x5652c7['ok']?a138_0x4faac9[_0x293e0c(0xda)]('OK'):a138_0x4faac9[_0x293e0c(0x130)]('FAIL');console[_0x293e0c(0xe3)]('\x20\x20'+_0x888e17+'\x20\x20Step\x20'+_0x5652c7['step']+':\x20'+_0x5652c7[_0x293e0c(0x111)]);if(_0x5652c7[_0x293e0c(0xc0)])console[_0x293e0c(0xe3)]('\x20\x20\x20\x20\x20\x20\x20'+a138_0x4faac9[_0x293e0c(0x124)](_0x5652c7[_0x293e0c(0xc0)]));}console[_0x293e0c(0xe3)]('');}export async function upgradeApp(_0x3cafcd,_0x4628a9){const _0x42d076=a138_0x4115ca,_0x20e74f=process['cwd'](),_0x5af711=analyse(_0x20e74f),_0x4a5eb6=!_0x5af711['configMigration']&&_0x5af711[_0x42d076(0x11e)][_0x42d076(0xd2)]===0x0&&!_0x5af711[_0x42d076(0x107)]&&!_0x5af711['needsSkillSwap']&&!_0x5af711['sdkUpgrade'];if(_0x4a5eb6){console['log'](a138_0x4faac9['green']('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x5af711);const _0x5b06db=!!(_0x4628a9['yes']||_0x4628a9['Y']||_0x3cafcd);if(!_0x5b06db)try{const _0x2d5365=await askConfirm(_0x42d076(0x129));if(!_0x2d5365){console[_0x42d076(0xe3)](a138_0x4faac9['gray'](_0x42d076(0xd8)));return;}}catch(_0x4265af){if(_0x4265af?.['message']==='CANCEL'){console['log'](a138_0x4faac9['gray'](_0x42d076(0xd8)));return;}throw _0x4265af;}const _0x2e86ce=[],_0x5886a5=a138_0x500716({'text':_0x42d076(0x113),'color':_0x42d076(0x126)})[_0x42d076(0xc3)](),_0x41eeca=execConfigMigration(_0x5af711,_0x20e74f);_0x2e86ce[_0x42d076(0xf3)](_0x41eeca),_0x5886a5[_0x41eeca['ok']?_0x42d076(0x114):_0x42d076(0xc4)](_0x42d076(0xff)+(_0x41eeca['detail']??(_0x41eeca['ok']?_0x42d076(0xe2):_0x42d076(0x128))));const _0x11cfc5=resolve(_0x20e74f,_0x42d076(0x117)),_0x2ed016=a138_0x500716({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x42d076(0x126)})[_0x42d076(0xc3)]();if(existsSync(_0x11cfc5))try{rmSync(_0x11cfc5,{'recursive':!![],'force':!![]}),_0x2ed016[_0x42d076(0x114)](_0x42d076(0xc8)),_0x2e86ce['push']({'step':0x2,'label':_0x42d076(0xe6),'ok':!![]});}catch(_0x405407){_0x2ed016[_0x42d076(0xc4)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x405407[_0x42d076(0x12a)]),_0x2e86ce['push']({'step':0x2,'label':_0x42d076(0xe6),'ok':![],'detail':_0x405407[_0x42d076(0x12a)]});}else _0x2ed016[_0x42d076(0xbc)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x2e86ce[_0x42d076(0xf3)]({'step':0x2,'label':_0x42d076(0xe6),'ok':!![],'detail':_0x42d076(0xfb)});const _0x317bf2=a138_0x500716({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x42d076(0x126)})[_0x42d076(0xc3)](),_0x487094=execRemoveOldArtifacts(_0x5af711[_0x42d076(0x11e)]);_0x2e86ce[_0x42d076(0xf3)](_0x487094),_0x317bf2[_0x487094['ok']?_0x42d076(0x114):_0x42d076(0xc4)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x487094[_0x42d076(0xc0)]??(_0x487094['ok']?_0x42d076(0xe2):_0x42d076(0x128))));const _0x229d9f=a138_0x500716({'text':_0x42d076(0x10d),'color':_0x42d076(0x126)})['start'](),_0x4952f0=execCleanMcp(_0x5af711);_0x2e86ce['push'](_0x4952f0),_0x229d9f[_0x4952f0['ok']?_0x42d076(0x114):_0x42d076(0xc4)](_0x42d076(0xcf)+(_0x4952f0[_0x42d076(0xc0)]??(_0x4952f0['ok']?'done':'failed')));const _0x5729fe=a138_0x500716({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x42d076(0x126)})[_0x42d076(0xc3)](),_0x2451da=execSkillsRemove(_0x20e74f,_0x5b06db);_0x2e86ce[_0x42d076(0xf3)](_0x2451da),_0x5729fe[_0x2451da['ok']?_0x42d076(0x114):'fail']('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x2451da['detail']??(_0x2451da['ok']?'done':_0x42d076(0x128))));const _0x50f1a5=a138_0x500716({'text':_0x42d076(0x12d),'color':_0x42d076(0x126)})[_0x42d076(0xc3)](),_0x202eba=execSkillsAdd(_0x20e74f,_0x5b06db);_0x2e86ce[_0x42d076(0xf3)](_0x202eba),_0x50f1a5[_0x202eba['ok']?_0x42d076(0x114):_0x42d076(0xc4)](_0x42d076(0x11c)+(_0x202eba[_0x42d076(0xc0)]??(_0x202eba['ok']?'done':_0x42d076(0x128))));const _0x226d3c=a138_0x500716({'text':_0x42d076(0xc6),'color':'cyan'})[_0x42d076(0xc3)](),_0x2955ce=execUpgradeSdk(_0x5af711);_0x2e86ce[_0x42d076(0xf3)](_0x2955ce),_0x226d3c[_0x2955ce['ok']?_0x42d076(0x114):_0x42d076(0xc4)](_0x42d076(0xeb)+(_0x2955ce[_0x42d076(0xc0)]??(_0x2955ce['ok']?'done':_0x42d076(0x128)))),printSummary(_0x2e86ce);const _0x4ec9ec=_0x2e86ce[_0x42d076(0x11d)](_0x2210c9=>!_0x2210c9['ok']);_0x4ec9ec?console[_0x42d076(0xe3)](a138_0x4faac9['yellow'](_0x42d076(0xd4))):console['log'](a138_0x4faac9[_0x42d076(0xda)]('Upgrade\x20completed\x20successfully!')),_0x2955ce['ok']&&_0x5af711[_0x42d076(0x118)]&&(console[_0x42d076(0xe3)](''),console[_0x42d076(0xe3)](a138_0x4faac9[_0x42d076(0x10e)]['cyan']('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a138_0x4faac9['cyan'](_0x42d076(0x11f))),console[_0x42d076(0xe3)](''),console[_0x42d076(0xe3)](a138_0x4faac9[_0x42d076(0xe8)](_0x42d076(0xf1))),console['log'](a138_0x4faac9[_0x42d076(0xe8)](_0x42d076(0xee))),console['log'](a138_0x4faac9[_0x42d076(0xe8)](_0x42d076(0xcb))),console['log'](''));}
@@ -1 +1 @@
1
- const a137_0x185f8a=a137_0x38c2;(function(_0x3a7ec7,_0x1377cd){const _0x56b322=a137_0x38c2,_0x5f596f=_0x3a7ec7();while(!![]){try{const _0x357db3=-parseInt(_0x56b322(0x1eb))/0x1+parseInt(_0x56b322(0x1f4))/0x2*(-parseInt(_0x56b322(0x1e8))/0x3)+-parseInt(_0x56b322(0x20e))/0x4+-parseInt(_0x56b322(0x21f))/0x5*(-parseInt(_0x56b322(0x200))/0x6)+parseInt(_0x56b322(0x22c))/0x7*(-parseInt(_0x56b322(0x223))/0x8)+-parseInt(_0x56b322(0x20d))/0x9*(-parseInt(_0x56b322(0x225))/0xa)+parseInt(_0x56b322(0x21b))/0xb;if(_0x357db3===_0x1377cd)break;else _0x5f596f['push'](_0x5f596f['shift']());}catch(_0x59ecbc){_0x5f596f['push'](_0x5f596f['shift']());}}}(a137_0x5223,0xbb88b));import{apiDefinitions}from'../commands/api/index.js';function a137_0x5223(){const _0x5e7378=['<script>','Platform\x20Issue','build','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','remote','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','Configuration','app\x20use','Schema','764973yuxITs','5399992hBNPqq','\x20\x20[high-risk-write]','command','logout','Run\x20any\x20package.json\x20script','get','service','CLI\x20Built-in\x20Skill','\x20\x20[write]','defaultCommand','Project','description','length','35526447kcPTVd','Instant\x20API','Smart\x20List\x20Pages','app','5sRhUYb','`\x20has\x20been\x20removed.','wildcardDef','isSingleCommand','400btjoqN','Menu','10hVwJnw','app\x20remote','run','commands','set','write','from','192248faThBc','login','71826VFcbFb','Dataset\x20&\x20Operations','Diagnostics','193516NliYzJ','use','risk','has','`rabetbase\x20','Workspace','values','filter','skills','68ejKdcb','read','Roles','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','project','Self\x20Update','map','skill','push','Runtime\x20App\x20Config\x20Management','skill\x20','Run\x20Scripts','7105242RwDEpl','create','Permissions'];a137_0x5223=function(){return _0x5e7378;};return a137_0x5223();}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{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{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{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function a137_0x38c2(_0x851ab1,_0xff56ff){_0x851ab1=_0x851ab1-0x1e7;const _0x5223b2=a137_0x5223();let _0x38c22a=_0x5223b2[_0x851ab1];return _0x38c22a;}function registerDefinitions(_0x3d0bb9){const _0xc49d98=a137_0x38c2;for(const _0x32f478 of _0x3d0bb9){definitions['set'](_0x32f478[_0xc49d98(0x214)]+':'+_0x32f478[_0xc49d98(0x210)],_0x32f478);let _0x32d773=serviceGroups[_0xc49d98(0x213)](_0x32f478['service']);!_0x32d773&&(_0x32d773=[],serviceGroups[_0xc49d98(0x229)](_0x32f478[_0xc49d98(0x214)],_0x32d773)),_0x32d773['push'](_0x32f478);}}function registerDeclarativeService(_0x406fe6,_0x437a55,_0x41aef0){const _0x25f2e2=a137_0x38c2;registerDefinitions(_0x437a55);_0x41aef0?.[_0x25f2e2(0x221)]&&registerDefinitions([_0x41aef0[_0x25f2e2(0x221)]]);const _0x548077=_0x55a2d2=>_0x55a2d2===_0x25f2e2(0x1f5)?'':_0x55a2d2===_0x25f2e2(0x22a)?_0x25f2e2(0x216):_0x25f2e2(0x20f),_0xc6165c={'service':_0x437a55[0x0][_0x25f2e2(0x214)],'label':_0x406fe6,'commands':_0x437a55[_0x25f2e2(0x1f2)](_0x5582a4=>!_0x5582a4['hidden'])[_0x25f2e2(0x1fa)](_0x259184=>({'command':_0x259184['command'],'description':_0x259184[_0x25f2e2(0x219)],'tag':_0x548077(_0x259184[_0x25f2e2(0x1ed)])})),'declarative':!![],'defaultCommand':_0x41aef0?.[_0x25f2e2(0x217)]??(_0x41aef0?.[_0x25f2e2(0x222)]?_0x437a55[0x0]['command']:undefined),'wildcardDef':_0x41aef0?.['wildcardDef'],'isSingleCommand':_0x41aef0?.[_0x25f2e2(0x222)]};serviceRegistry[_0x25f2e2(0x1fc)](_0xc6165c),serviceByName['set'](_0xc6165c[_0x25f2e2(0x214)],_0xc6165c);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a137_0x185f8a(0x227),'isSingleCommand':!![]}),registerDeclarativeService(a137_0x185f8a(0x218),projectDefinitions),registerDeclarativeService(a137_0x185f8a(0x1f0),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a137_0x185f8a(0x1e7)}),registerDeclarativeService(a137_0x185f8a(0x1e9),datasetDefinitions),registerDeclarativeService(a137_0x185f8a(0x21d),pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a137_0x185f8a(0x21c),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a137_0x185f8a(0x224),menuDefinitions),registerDeclarativeService(a137_0x185f8a(0x1f6),roleDefinitions),registerDeclarativeService(a137_0x185f8a(0x202),permitDefinitions),registerDeclarativeService(a137_0x185f8a(0x1fd),appConfigDefinitions),registerDeclarativeService(a137_0x185f8a(0x204),issueDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a137_0x185f8a(0x20a),configDefinitions),registerDeclarativeService(a137_0x185f8a(0x1ea),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x185f8a(0x20c),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x185f8a(0x1f9),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x185f8a(0x215),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a137_0x185f8a(0x1ff),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a137_0x185f8a(0x21a)]-0x1];last[a137_0x185f8a(0x228)]=[{'command':a137_0x185f8a(0x203),'description':a137_0x185f8a(0x212),'tag':''}];}export const deprecatedAliases={'create':{'service':a137_0x185f8a(0x1f8),'command':'create'},'start':{'service':a137_0x185f8a(0x227),'command':'start'},'build':{'service':'run','command':a137_0x185f8a(0x205)},'preview':{'service':a137_0x185f8a(0x227),'command':'preview'},'logout':{'service':'auth','command':a137_0x185f8a(0x211)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a137_0x185f8a(0x208),APP_REMOTE_REMOVED_HINT=a137_0x185f8a(0x1f7),APP_USE_REMOVED_HINT=a137_0x185f8a(0x206);export function resolveRemovedCommand(_0x4a1fef,_0x135106){const _0x27dbe2=a137_0x185f8a;if(_0x4a1fef===_0x27dbe2(0x1fb)){const _0x3ebc46=_0x135106?_0x27dbe2(0x1fe)+_0x135106:_0x27dbe2(0x1fb);return{'command':_0x3ebc46,'message':_0x27dbe2(0x1ef)+_0x3ebc46+_0x27dbe2(0x220),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x4a1fef===_0x27dbe2(0x1f3))return{'command':_0x27dbe2(0x1f3),'message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x4a1fef===_0x27dbe2(0x21e)&&_0x135106===_0x27dbe2(0x207))return{'command':_0x27dbe2(0x226),'message':_0x27dbe2(0x209),'hint':APP_REMOTE_REMOVED_HINT};if(_0x4a1fef==='app'&&_0x135106===_0x27dbe2(0x1ec))return{'command':_0x27dbe2(0x20b),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a137_0x185f8a(0x201)},'sql':{'new':'create'}};export function resolveDeprecatedSubcommand(_0x27a619,_0x2f97df){return deprecatedSubcommands[_0x27a619]?.[_0x2f97df];}export function findDefinition(_0x327c3b,_0x2e5606){return definitions['get'](_0x327c3b+':'+_0x2e5606);}export function isKnownService(_0xca2a21){const _0x29c4fb=a137_0x185f8a;return serviceByName[_0x29c4fb(0x1ee)](_0xca2a21);}export function isDeclarativeService(_0x349145){const _0x204959=a137_0x185f8a;return serviceGroups[_0x204959(0x1ee)](_0x349145)||serviceByName[_0x204959(0x213)](_0x349145)?.[_0x204959(0x221)]!==undefined;}export function getServiceEntry(_0x20e4da){return serviceByName['get'](_0x20e4da);}export function getLegacyHandler(_0x22b2e8,_0x294165){return undefined;}export function getAllDefinitions(){const _0x227b13=a137_0x185f8a;return Array[_0x227b13(0x22b)](definitions[_0x227b13(0x1f1)]());}
1
+ const a139_0x408446=a139_0x2f5e;(function(_0xa72788,_0x1fb856){const _0x1b8318=a139_0x2f5e,_0x4db640=_0xa72788();while(!![]){try{const _0x18d650=-parseInt(_0x1b8318(0x209))/0x1+parseInt(_0x1b8318(0x201))/0x2+parseInt(_0x1b8318(0x1f4))/0x3*(-parseInt(_0x1b8318(0x20f))/0x4)+parseInt(_0x1b8318(0x1f2))/0x5*(parseInt(_0x1b8318(0x1db))/0x6)+-parseInt(_0x1b8318(0x1f0))/0x7*(parseInt(_0x1b8318(0x1de))/0x8)+parseInt(_0x1b8318(0x200))/0x9+-parseInt(_0x1b8318(0x20c))/0xa*(parseInt(_0x1b8318(0x1d2))/0xb);if(_0x18d650===_0x1fb856)break;else _0x4db640['push'](_0x4db640['shift']());}catch(_0x280435){_0x4db640['push'](_0x4db640['shift']());}}}(a139_0x3c19,0x9d5d1));import{apiDefinitions}from'../commands/api/index.js';function a139_0x2f5e(_0x49e80d,_0x225588){_0x49e80d=_0x49e80d-0x1c8;const _0x3c1954=a139_0x3c19();let _0x2f5e10=_0x3c1954[_0x49e80d];return _0x2f5e10;}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{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{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{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x5e0541){const _0x1c94e4=a139_0x2f5e;for(const _0x5661b3 of _0x5e0541){definitions[_0x1c94e4(0x1e3)](_0x5661b3['service']+':'+_0x5661b3['command'],_0x5661b3);let _0x32dfc9=serviceGroups[_0x1c94e4(0x1dc)](_0x5661b3[_0x1c94e4(0x1e1)]);!_0x32dfc9&&(_0x32dfc9=[],serviceGroups[_0x1c94e4(0x1e3)](_0x5661b3['service'],_0x32dfc9)),_0x32dfc9[_0x1c94e4(0x1d0)](_0x5661b3);}}function registerDeclarativeService(_0x4e7b94,_0x28f99b,_0x2ba740){const _0x13295d=a139_0x2f5e;registerDefinitions(_0x28f99b);_0x2ba740?.[_0x13295d(0x1f5)]&&registerDefinitions([_0x2ba740[_0x13295d(0x1f5)]]);const _0x41f137=_0x5f50f5=>_0x5f50f5===_0x13295d(0x1f1)?'':_0x5f50f5===_0x13295d(0x1fb)?_0x13295d(0x20e):'\x20\x20[high-risk-write]',_0x3e0eb7={'service':_0x28f99b[0x0][_0x13295d(0x1e1)],'label':_0x4e7b94,'commands':_0x28f99b['filter'](_0x23934b=>!_0x23934b[_0x13295d(0x1e5)])[_0x13295d(0x1e0)](_0x2b8bc7=>({'command':_0x2b8bc7[_0x13295d(0x1e6)],'description':_0x2b8bc7[_0x13295d(0x1d5)],'tag':_0x41f137(_0x2b8bc7['risk'])})),'declarative':!![],'defaultCommand':_0x2ba740?.['defaultCommand']??(_0x2ba740?.[_0x13295d(0x1ed)]?_0x28f99b[0x0][_0x13295d(0x1e6)]:undefined),'wildcardDef':_0x2ba740?.[_0x13295d(0x1f5)],'isSingleCommand':_0x2ba740?.['isSingleCommand']};serviceRegistry[_0x13295d(0x1d0)](_0x3e0eb7),serviceByName['set'](_0x3e0eb7[_0x13295d(0x1e1)],_0x3e0eb7);}registerDeclarativeService(a139_0x408446(0x1c9),initDefinitions,{'defaultCommand':a139_0x408446(0x1d6),'isSingleCommand':!![]}),registerDeclarativeService(a139_0x408446(0x1df),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a139_0x408446(0x1fe)}),registerDeclarativeService(a139_0x408446(0x1d4),datasetDefinitions),registerDeclarativeService(a139_0x408446(0x1ea),pageDefinitions),registerDeclarativeService(a139_0x408446(0x1c8),apiDefinitions),registerDeclarativeService(a139_0x408446(0x208),dataDefinitions),registerDeclarativeService(a139_0x408446(0x1e7),bffDefinitions),registerDeclarativeService(a139_0x408446(0x1f9),sqlDefinitions),registerDeclarativeService(a139_0x408446(0x1d7),dbDefinitions),registerDeclarativeService(a139_0x408446(0x1cb),menuDefinitions),registerDeclarativeService(a139_0x408446(0x204),roleDefinitions),registerDeclarativeService('Permissions',permitDefinitions),registerDeclarativeService(a139_0x408446(0x1e2),appConfigDefinitions),registerDeclarativeService(a139_0x408446(0x1f7),issueDefinitions),registerDeclarativeService(a139_0x408446(0x1ec),fileDefinitions),registerDeclarativeService(a139_0x408446(0x1e8),codegenDefinitions),registerDeclarativeService(a139_0x408446(0x206),configDefinitions),registerDeclarativeService(a139_0x408446(0x1f8),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a139_0x408446(0x1cf),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a139_0x408446(0x1ca),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a139_0x408446(0x1da),logsDefinitions,{'defaultCommand':a139_0x408446(0x1f6)}),registerDeclarativeService(a139_0x408446(0x1ee),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a139_0x408446(0x1d3)]-0x1];last[a139_0x408446(0x1d9)]=[{'command':a139_0x408446(0x1fa),'description':'Run\x20any\x20package.json\x20script','tag':''}];}export const deprecatedAliases={'create':{'service':a139_0x408446(0x1dd),'command':a139_0x408446(0x20b)},'start':{'service':a139_0x408446(0x1d6),'command':a139_0x408446(0x1ef)},'build':{'service':a139_0x408446(0x1d6),'command':a139_0x408446(0x1fc)},'preview':{'service':a139_0x408446(0x1d6),'command':a139_0x408446(0x205)},'logout':{'service':a139_0x408446(0x1cd),'command':a139_0x408446(0x1e9)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a139_0x408446(0x1eb),APP_REMOTE_REMOVED_HINT='Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.',APP_USE_REMOVED_HINT='Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.';export function resolveRemovedCommand(_0x29f293,_0x19dbf1){const _0x25eaa2=a139_0x408446;if(_0x29f293==='skill'){const _0x3f15de=_0x19dbf1?_0x25eaa2(0x202)+_0x19dbf1:_0x25eaa2(0x1e4);return{'command':_0x3f15de,'message':'`rabetbase\x20'+_0x3f15de+_0x25eaa2(0x203),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x29f293==='skills')return{'command':_0x25eaa2(0x1cc),'message':_0x25eaa2(0x1ce),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x29f293==='app'&&_0x19dbf1===_0x25eaa2(0x1d8))return{'command':_0x25eaa2(0x207),'message':_0x25eaa2(0x1fd),'hint':APP_REMOTE_REMOVED_HINT};if(_0x29f293===_0x25eaa2(0x20a)&&_0x19dbf1==='use')return{'command':'app\x20use','message':_0x25eaa2(0x1ff),'hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a139_0x408446(0x20b)},'sql':{'new':a139_0x408446(0x20b)}};export function resolveDeprecatedSubcommand(_0x4896e7,_0x1ddbe0){return deprecatedSubcommands[_0x4896e7]?.[_0x1ddbe0];}function a139_0x3c19(){const _0x71d8df=['API\x20Development','Quick\x20Start','Self\x20Update','Menu','skills','auth','`rabetbase\x20skills`\x20has\x20been\x20removed.','Schema','push','has','275yPtdTv','length','Dataset\x20&\x20Operations','description','run','Database\x20Connections','remote','commands','Logs','6idzPPy','get','project','176uSGWsd','Project','map','service','Runtime\x20App\x20Config\x20Management','set','skill','hidden','command','BFF\x20Scripts','Code\x20Generation','logout','Smart\x20List\x20Pages','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','File','isSingleCommand','Run\x20Scripts','start','301896lOpWsB','read','4435190UKvFOP','from','21lnSXVc','wildcardDef','show','Platform\x20Issue','Diagnostics','SQL\x20Queries','<script>','write','build','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','login','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','7052724ivQqlP','1963866eqKmWh','skill\x20','`\x20has\x20been\x20removed.','Roles','preview','Configuration','app\x20remote','Instant\x20API','428377qBJjeT','app','create','59270TfkPTF','values','\x20\x20[write]','275816mWZfuH'];a139_0x3c19=function(){return _0x71d8df;};return a139_0x3c19();}export function findDefinition(_0x36e8e5,_0x16b7dd){const _0x402e68=a139_0x408446;return definitions[_0x402e68(0x1dc)](_0x36e8e5+':'+_0x16b7dd);}export function isKnownService(_0x51e2ef){const _0xa0899c=a139_0x408446;return serviceByName[_0xa0899c(0x1d1)](_0x51e2ef);}export function isDeclarativeService(_0x4a4897){const _0x116112=a139_0x408446;return serviceGroups[_0x116112(0x1d1)](_0x4a4897)||serviceByName[_0x116112(0x1dc)](_0x4a4897)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x52543a){const _0x5d1a7b=a139_0x408446;return serviceByName[_0x5d1a7b(0x1dc)](_0x52543a);}export function getLegacyHandler(_0x562a6a,_0x542834){return undefined;}export function getAllDefinitions(){const _0x1b9953=a139_0x408446;return Array[_0x1b9953(0x1f3)](definitions[_0x1b9953(0x20d)]());}
@@ -1 +1 @@
1
- const a138_0x23074a=a138_0x1631;(function(_0x278e2f,_0x1cd0d9){const _0x568288=a138_0x1631,_0x20afad=_0x278e2f();while(!![]){try{const _0xe4f55=-parseInt(_0x568288(0x1df))/0x1*(parseInt(_0x568288(0x1eb))/0x2)+parseInt(_0x568288(0x1e0))/0x3+-parseInt(_0x568288(0x1db))/0x4+parseInt(_0x568288(0x1ea))/0x5*(-parseInt(_0x568288(0x1da))/0x6)+parseInt(_0x568288(0x1e2))/0x7+parseInt(_0x568288(0x1e8))/0x8+-parseInt(_0x568288(0x1d4))/0x9*(parseInt(_0x568288(0x1d7))/0xa);if(_0xe4f55===_0x1cd0d9)break;else _0x20afad['push'](_0x20afad['shift']());}catch(_0x4c6d7f){_0x20afad['push'](_0x20afad['shift']());}}}(a138_0x8aaf,0xe3778));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';function a138_0x8aaf(){const _0x48edc3=['flagMissing','1749378ebCaTo','3284900BKiruI','Pass\x20--name\x20<roleName>.','validation','trim','2sAoSjN','1486176RJcrzn','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','1361738QnQqmD','appCode','\x20(id=','remark','POST','write','13949504PAamNc','name','5BzLeDh','369212tyfHra','17919OrnyVU','create','/smartapi/permit/role/create','100OMYImC','str'];a138_0x8aaf=function(){return _0x48edc3;};return a138_0x8aaf();}function a138_0x1631(_0x55acf0,_0x17ce07){_0x55acf0=_0x55acf0-0x1d4;const _0x8aafd7=a138_0x8aaf();let _0x163103=_0x8aafd7[_0x55acf0];return _0x163103;}const CREATE_PATH=a138_0x23074a(0x1d6);function readName(_0xdde17d){const _0x2878f5=a138_0x23074a,_0x3e1de5=_0xdde17d[_0x2878f5(0x1d8)](_0x2878f5(0x1e9))['trim']();if(!_0x3e1de5)throw CliErrors[_0x2878f5(0x1d9)](_0x2878f5(0x1e9),_0x2878f5(0x1dc));if(_0x3e1de5['length']>0x40)throw CliErrors[_0x2878f5(0x1dd)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');return _0x3e1de5;}export const roleCreate={'service':'role','command':a138_0x23074a(0x1d5),'description':a138_0x23074a(0x1e1),'risk':a138_0x23074a(0x1e7),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x36e8b1){readName(_0x36e8b1);},async 'dryRun'(_0x3ebf7e){const _0x24fc7b=a138_0x23074a,_0x14822f=readName(_0x3ebf7e),_0x1cf76b=_0x3ebf7e[_0x24fc7b(0x1d8)](_0x24fc7b(0x1e5))[_0x24fc7b(0x1de)]()||undefined;return asDryRunResult({'operation':'create','selector':{'appCode':_0x3ebf7e[_0x24fc7b(0x1e3)],'roleName':_0x14822f},'before':null,'after':{'roleName':_0x14822f,'roleType':'CUSTOM','remark':_0x1cf76b},'dryRun':!![],'backend':{'method':_0x24fc7b(0x1e6),'path':CREATE_PATH},'warnings':[]},{'method':_0x24fc7b(0x1e6),'url':CREATE_PATH});},async 'execute'(_0x300abc){const _0x518e31=a138_0x23074a,_0x1f651a=readName(_0x300abc),_0x49c25c=_0x300abc['str'](_0x518e31(0x1e5))['trim']()||undefined,_0x86c712=await createAppRole({'appCode':_0x300abc[_0x518e31(0x1e3)],'roleName':_0x1f651a,..._0x49c25c?{'remark':_0x49c25c}:{}});return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x300abc[_0x518e31(0x1e3)],'roleId':_0x86c712['id'],'roleName':_0x1f651a},'before':null,'after':projectRole(_0x86c712),'dryRun':![],'backend':{'method':_0x518e31(0x1e6),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x86c712['roleName']+_0x518e31(0x1e4)+_0x86c712['id']+')'};}};
1
+ function a140_0x5541(_0x3f5ee5,_0x11fd3c){_0x3f5ee5=_0x3f5ee5-0x140;const _0x4df730=a140_0x4df7();let _0x55417f=_0x4df730[_0x3f5ee5];return _0x55417f;}const a140_0x4b0b7f=a140_0x5541;(function(_0x1e84d1,_0x4aad09){const _0x498d51=a140_0x5541,_0x4bc4f4=_0x1e84d1();while(!![]){try{const _0xc1588f=-parseInt(_0x498d51(0x154))/0x1*(parseInt(_0x498d51(0x140))/0x2)+-parseInt(_0x498d51(0x14f))/0x3+parseInt(_0x498d51(0x141))/0x4+-parseInt(_0x498d51(0x155))/0x5+parseInt(_0x498d51(0x142))/0x6*(-parseInt(_0x498d51(0x150))/0x7)+-parseInt(_0x498d51(0x158))/0x8+parseInt(_0x498d51(0x157))/0x9*(parseInt(_0x498d51(0x159))/0xa);if(_0xc1588f===_0x4aad09)break;else _0x4bc4f4['push'](_0x4bc4f4['shift']());}catch(_0x5973ae){_0x4bc4f4['push'](_0x4bc4f4['shift']());}}}(a140_0x4df7,0x9c358));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';function a140_0x4df7(){const _0xd2c80f=['roleName','validation','CUSTOM','/smartapi/permit/role/create','create','length','Pass\x20--name\x20<roleName>.','2579049CHVMEg','9149OXmPxe','role','remark','flagMissing','1msVxgA','1892350LcRXIk','trim','2412OAnIqW','8209664hfOgNj','147910TVCWKA','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','1083682FVmoAp','2617700TKZmvF','5382gtaQYr','name','str','\x20(id=','POST','appCode'];a140_0x4df7=function(){return _0xd2c80f;};return a140_0x4df7();}import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a140_0x4b0b7f(0x14b);function readName(_0xcde91d){const _0x125f69=a140_0x4b0b7f,_0x3fd06e=_0xcde91d['str'](_0x125f69(0x143))[_0x125f69(0x156)]();if(!_0x3fd06e)throw CliErrors[_0x125f69(0x153)](_0x125f69(0x143),_0x125f69(0x14e));if(_0x3fd06e[_0x125f69(0x14d)]>0x40)throw CliErrors[_0x125f69(0x149)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');return _0x3fd06e;}export const roleCreate={'service':a140_0x4b0b7f(0x151),'command':a140_0x4b0b7f(0x14c),'description':a140_0x4b0b7f(0x15a),'risk':'write','flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x155e8c){readName(_0x155e8c);},async 'dryRun'(_0x1d2726){const _0x3b8ada=a140_0x4b0b7f,_0x2dd99c=readName(_0x1d2726),_0x59286e=_0x1d2726[_0x3b8ada(0x144)](_0x3b8ada(0x152))[_0x3b8ada(0x156)]()||undefined;return asDryRunResult({'operation':_0x3b8ada(0x14c),'selector':{'appCode':_0x1d2726['appCode'],'roleName':_0x2dd99c},'before':null,'after':{'roleName':_0x2dd99c,'roleType':_0x3b8ada(0x14a),'remark':_0x59286e},'dryRun':!![],'backend':{'method':_0x3b8ada(0x146),'path':CREATE_PATH},'warnings':[]},{'method':_0x3b8ada(0x146),'url':CREATE_PATH});},async 'execute'(_0x179c18){const _0x480222=a140_0x4b0b7f,_0x3cbb26=readName(_0x179c18),_0x58db62=_0x179c18['str'](_0x480222(0x152))[_0x480222(0x156)]()||undefined,_0x27773f=await createAppRole({'appCode':_0x179c18[_0x480222(0x147)],'roleName':_0x3cbb26,..._0x58db62?{'remark':_0x58db62}:{}});return{'ok':!![],'data':{'operation':_0x480222(0x14c),'selector':{'appCode':_0x179c18[_0x480222(0x147)],'roleId':_0x27773f['id'],'roleName':_0x3cbb26},'before':null,'after':projectRole(_0x27773f),'dryRun':![],'backend':{'method':_0x480222(0x146),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x27773f[_0x480222(0x148)]+_0x480222(0x145)+_0x27773f['id']+')'};}};
@@ -1 +1 @@
1
- const a139_0x2c6081=a139_0x23ec;(function(_0x3cd06b,_0x225b98){const _0x225d2f=a139_0x23ec,_0x4e10a=_0x3cd06b();while(!![]){try{const _0x2cc0f0=parseInt(_0x225d2f(0xa2))/0x1*(parseInt(_0x225d2f(0xa3))/0x2)+-parseInt(_0x225d2f(0x97))/0x3*(parseInt(_0x225d2f(0x98))/0x4)+parseInt(_0x225d2f(0x9f))/0x5+parseInt(_0x225d2f(0xa0))/0x6+-parseInt(_0x225d2f(0x9a))/0x7+parseInt(_0x225d2f(0x9d))/0x8*(-parseInt(_0x225d2f(0x9b))/0x9)+parseInt(_0x225d2f(0x96))/0xa;if(_0x2cc0f0===_0x225b98)break;else _0x4e10a['push'](_0x4e10a['shift']());}catch(_0x5d0f9b){_0x4e10a['push'](_0x4e10a['shift']());}}}(a139_0x7533,0x56e18));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a139_0x23ec(_0x4d6170,_0x6c0592){_0x4d6170=_0x4d6170-0x91;const _0x75337=a139_0x7533();let _0x23ecdc=_0x75337[_0x4d6170];return _0x23ecdc;}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a139_0x2c6081(0x9c);function a139_0x7533(){const _0x54300d=['userCount','Role\x20still\x20has\x20','roleName','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','num','role','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','POST','8777430lyYkhD','1661931tzeGuZ','4TsWWvp','appCode','3673663aRxLHK','18IznfmZ','/smartapi/permit/role/delete','2256776NbFGiS','delete','3145755RvpsYv','63900oZwsFd','\x20(id=','2xduXnE','481300GQNFEX'];a139_0x7533=function(){return _0x54300d;};return a139_0x7533();}export const roleDelete={'service':a139_0x2c6081(0x93),'command':'delete','description':a139_0x2c6081(0x91),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4a7c36){const _0x5efdd8=a139_0x2c6081,_0x3e266d=_0x4a7c36[_0x5efdd8(0x92)]('id'),_0x4ff021=await getRoleById(_0x4a7c36[_0x5efdd8(0x99)],_0x3e266d);return assertCustomRole(_0x4ff021,_0x5efdd8(0x9e)),asDryRunResult({'operation':_0x5efdd8(0x9e),'selector':{'appCode':_0x4a7c36[_0x5efdd8(0x99)],'roleId':_0x3e266d,'roleName':_0x4ff021[_0x5efdd8(0xa6)]},'before':projectRole(_0x4ff021),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x4ff021['userCount']>0x0?[_0x5efdd8(0xa5)+_0x4ff021[_0x5efdd8(0xa4)]+_0x5efdd8(0x94)]:[]},{'method':_0x5efdd8(0x95),'url':DELETE_PATH});},async 'execute'(_0x42a1a5){const _0xd8081d=a139_0x2c6081,_0x2b8f58=_0x42a1a5['num']('id'),_0x482389=await getRoleById(_0x42a1a5[_0xd8081d(0x99)],_0x2b8f58);return assertCustomRole(_0x482389,'delete'),await deleteAppRole(_0x2b8f58),{'ok':!![],'data':{'operation':_0xd8081d(0x9e),'selector':{'appCode':_0x42a1a5[_0xd8081d(0x99)],'roleId':_0x2b8f58,'roleName':_0x482389[_0xd8081d(0xa6)]},'before':projectRole(_0x482389),'after':null,'dryRun':![],'backend':{'method':_0xd8081d(0x95),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x482389[_0xd8081d(0xa6)]+_0xd8081d(0xa1)+_0x2b8f58+')'};}};
1
+ const a141_0x457426=a141_0x10cb;(function(_0x29ecf7,_0x1bfe21){const _0x222cdf=a141_0x10cb,_0x319ef1=_0x29ecf7();while(!![]){try{const _0x480bee=parseInt(_0x222cdf(0xd3))/0x1+parseInt(_0x222cdf(0xd7))/0x2*(parseInt(_0x222cdf(0xd8))/0x3)+-parseInt(_0x222cdf(0xd4))/0x4+-parseInt(_0x222cdf(0xcd))/0x5+parseInt(_0x222cdf(0xdb))/0x6*(-parseInt(_0x222cdf(0xcf))/0x7)+-parseInt(_0x222cdf(0xdd))/0x8*(parseInt(_0x222cdf(0xd1))/0x9)+parseInt(_0x222cdf(0xda))/0xa*(parseInt(_0x222cdf(0xd6))/0xb);if(_0x480bee===_0x1bfe21)break;else _0x319ef1['push'](_0x319ef1['shift']());}catch(_0x5088db){_0x319ef1['push'](_0x319ef1['shift']());}}}(a141_0x5279,0x816e4));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a141_0x10cb(_0x16803c,_0x56780d){_0x16803c=_0x16803c-0xcd;const _0x5279d6=a141_0x5279();let _0x10cbd0=_0x5279d6[_0x16803c];return _0x10cbd0;}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a141_0x5279(){const _0x2e5943=['/smartapi/permit/role/delete','39881LRCffG','1241544srrOxa','Deleted\x20role\x20','406538kTWAUK','1026738LstcCG','3uhAINH','appCode','260WGXNSB','2075652EBqpNW','roleName','7160ZxYPHq','POST','userCount','Role\x20still\x20has\x20','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','1137210ZQwLXq','delete','7ekFBMv','num','1008hHOIiF'];a141_0x5279=function(){return _0x2e5943;};return a141_0x5279();}const DELETE_PATH=a141_0x457426(0xd2);export const roleDelete={'service':'role','command':a141_0x457426(0xce),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4edf96){const _0x22a921=a141_0x457426,_0x294de=_0x4edf96[_0x22a921(0xd0)]('id'),_0x2e8c60=await getRoleById(_0x4edf96[_0x22a921(0xd9)],_0x294de);return assertCustomRole(_0x2e8c60,_0x22a921(0xce)),asDryRunResult({'operation':'delete','selector':{'appCode':_0x4edf96[_0x22a921(0xd9)],'roleId':_0x294de,'roleName':_0x2e8c60['roleName']},'before':projectRole(_0x2e8c60),'after':null,'dryRun':!![],'backend':{'method':_0x22a921(0xde),'path':DELETE_PATH},'warnings':_0x2e8c60[_0x22a921(0xdf)]>0x0?[_0x22a921(0xe0)+_0x2e8c60[_0x22a921(0xdf)]+_0x22a921(0xe1)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x1ab792){const _0x4aa418=a141_0x457426,_0x464fc5=_0x1ab792[_0x4aa418(0xd0)]('id'),_0x5aec35=await getRoleById(_0x1ab792['appCode'],_0x464fc5);return assertCustomRole(_0x5aec35,_0x4aa418(0xce)),await deleteAppRole(_0x464fc5),{'ok':!![],'data':{'operation':_0x4aa418(0xce),'selector':{'appCode':_0x1ab792[_0x4aa418(0xd9)],'roleId':_0x464fc5,'roleName':_0x5aec35['roleName']},'before':projectRole(_0x5aec35),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x4aa418(0xd5)+_0x5aec35[_0x4aa418(0xdc)]+'\x20(id='+_0x464fc5+')'};}};