@lovrabet/rabetbase-cli 2.3.5 → 2.3.6-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 (239) 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/validate.js +1 -1
  50. package/lib/commands/config/get.js +1 -1
  51. package/lib/commands/config/index.js +1 -1
  52. package/lib/commands/config/list.js +1 -1
  53. package/lib/commands/config/set.js +1 -1
  54. package/lib/commands/config/shared.js +1 -1
  55. package/lib/commands/data/filter.js +1 -1
  56. package/lib/commands/data/getOne.js +1 -1
  57. package/lib/commands/data/index.js +1 -1
  58. package/lib/commands/data/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/capability.js +1 -1
  61. package/lib/commands/dataset/delete.js +1 -1
  62. package/lib/commands/dataset/detail.js +1 -1
  63. package/lib/commands/dataset/extend-update.js +1 -1
  64. package/lib/commands/dataset/field-update.js +1 -1
  65. package/lib/commands/dataset/generate.js +1 -1
  66. package/lib/commands/dataset/index.js +1 -1
  67. package/lib/commands/dataset/list.js +1 -1
  68. package/lib/commands/dataset/operations.js +1 -1
  69. package/lib/commands/dataset/relation-audit.js +1 -1
  70. package/lib/commands/dataset/relation-create.js +1 -1
  71. package/lib/commands/dataset/relation-delete.js +1 -1
  72. package/lib/commands/dataset/relation-shared.js +1 -1
  73. package/lib/commands/dataset/relation-update.js +1 -1
  74. package/lib/commands/dataset/relations.js +1 -1
  75. package/lib/commands/dataset/rename.js +1 -1
  76. package/lib/commands/dataset/restore.js +1 -1
  77. package/lib/commands/db/analyze-cancel.js +1 -1
  78. package/lib/commands/db/analyze-start.js +1 -1
  79. package/lib/commands/db/analyze-status.js +1 -1
  80. package/lib/commands/db/create.js +1 -1
  81. package/lib/commands/db/delete.js +1 -1
  82. package/lib/commands/db/detail.js +1 -1
  83. package/lib/commands/db/diff.js +1 -1
  84. package/lib/commands/db/index.js +1 -1
  85. package/lib/commands/db/list.js +1 -1
  86. package/lib/commands/db/shared.js +1 -1
  87. package/lib/commands/db/tables.js +1 -1
  88. package/lib/commands/db/test.js +1 -1
  89. package/lib/commands/db/update.js +1 -1
  90. package/lib/commands/doctor.js +1 -1
  91. package/lib/commands/init/index.js +1 -1
  92. package/lib/commands/issue/index.js +1 -1
  93. package/lib/commands/issue/nudge.js +1 -1
  94. package/lib/commands/issue/report.js +1 -1
  95. package/lib/commands/issue/shared.js +1 -1
  96. package/lib/commands/logs/index.js +1 -1
  97. package/lib/commands/menu/index.js +1 -1
  98. package/lib/commands/menu/list.js +1 -1
  99. package/lib/commands/menu/shared/compare-table.js +1 -1
  100. package/lib/commands/menu/shared/index.js +1 -1
  101. package/lib/commands/menu/shared/inquirer.js +1 -1
  102. package/lib/commands/menu/shared/local-pages.js +1 -1
  103. package/lib/commands/menu/shared/logic.js +1 -1
  104. package/lib/commands/menu/shared/service.js +1 -1
  105. package/lib/commands/menu/shared/sync-core.js +1 -1
  106. package/lib/commands/menu/shared/update-core.js +1 -1
  107. package/lib/commands/menu/shared/valid-url.js +1 -1
  108. package/lib/commands/menu/sync.js +1 -1
  109. package/lib/commands/menu/update.js +1 -1
  110. package/lib/commands/page/generate-start.js +1 -1
  111. package/lib/commands/page/generate-status.js +1 -1
  112. package/lib/commands/page/index.js +1 -1
  113. package/lib/commands/page/pull.js +1 -1
  114. package/lib/commands/page/push.js +1 -1
  115. package/lib/commands/page/relation-audit.js +1 -1
  116. package/lib/commands/page/shared.js +1 -1
  117. package/lib/commands/page/standard-page-status.js +1 -1
  118. package/lib/commands/page/sync.js +1 -1
  119. package/lib/commands/permit/index.js +1 -1
  120. package/lib/commands/permit/page-get.js +1 -1
  121. package/lib/commands/permit/page-set.js +1 -1
  122. package/lib/commands/permit/role-apis-set.js +1 -1
  123. package/lib/commands/permit/role-menus-set.js +1 -1
  124. package/lib/commands/permit/role-menus.js +1 -1
  125. package/lib/commands/permit/shared.js +1 -1
  126. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  127. package/lib/commands/project/create/format-elapsed.js +1 -1
  128. package/lib/commands/project/create/main.js +1 -1
  129. package/lib/commands/project/create/non-interactive.js +1 -1
  130. package/lib/commands/project/create/project-template-path.js +1 -1
  131. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  132. package/lib/commands/project/create/use-format-code.js +1 -1
  133. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  134. package/lib/commands/project/index.js +1 -1
  135. package/lib/commands/project/init.js +1 -1
  136. package/lib/commands/project/upgrade.js +1 -1
  137. package/lib/commands/registry.js +1 -1
  138. package/lib/commands/role/create.js +1 -1
  139. package/lib/commands/role/delete.js +1 -1
  140. package/lib/commands/role/detail.js +1 -1
  141. package/lib/commands/role/index.js +1 -1
  142. package/lib/commands/role/list.js +1 -1
  143. package/lib/commands/role/shared.js +1 -1
  144. package/lib/commands/role/update.js +1 -1
  145. package/lib/commands/role/user-add.js +1 -1
  146. package/lib/commands/role/user-remove.js +1 -1
  147. package/lib/commands/role/user-resolve.js +1 -1
  148. package/lib/commands/run/index.js +1 -1
  149. package/lib/commands/schema.js +1 -1
  150. package/lib/commands/sql/create.js +1 -1
  151. package/lib/commands/sql/delete.js +1 -1
  152. package/lib/commands/sql/detail.js +1 -1
  153. package/lib/commands/sql/exec.js +1 -1
  154. package/lib/commands/sql/index.js +1 -1
  155. package/lib/commands/sql/list.js +1 -1
  156. package/lib/commands/sql/pull.js +1 -1
  157. package/lib/commands/sql/push.js +1 -1
  158. package/lib/commands/sql/save.js +1 -1
  159. package/lib/commands/sql/shared.js +1 -1
  160. package/lib/commands/sql/status.js +1 -1
  161. package/lib/commands/sql/validate.js +1 -1
  162. package/lib/commands/workspace/add.js +1 -1
  163. package/lib/commands/workspace/index.js +1 -1
  164. package/lib/commands/workspace/remove.js +1 -1
  165. package/lib/config/schema.js +1 -1
  166. package/lib/constant/cdn.js +1 -1
  167. package/lib/constant/cli.js +1 -1
  168. package/lib/constant/defaults.js +1 -1
  169. package/lib/constant/domain.js +1 -1
  170. package/lib/constant/env.js +1 -1
  171. package/lib/constant/output.js +1 -1
  172. package/lib/constant/paths.js +1 -1
  173. package/lib/constant/risk.js +1 -1
  174. package/lib/context/app-resolver.js +1 -1
  175. package/lib/context/auth-resolver.js +1 -1
  176. package/lib/context/config-loader.js +1 -1
  177. package/lib/context.js +1 -1
  178. package/lib/core/alias-resolver.js +1 -1
  179. package/lib/core/api-client.js +1 -1
  180. package/lib/core/bff/config.js +1 -1
  181. package/lib/core/bff/file-system.js +1 -1
  182. package/lib/core/bff/hash.js +1 -1
  183. package/lib/core/bff/lock.js +1 -1
  184. package/lib/core/bff/utils.js +1 -1
  185. package/lib/core/db-resolver.js +1 -1
  186. package/lib/core/page/file-system.js +1 -1
  187. package/lib/core/page/hash.js +1 -1
  188. package/lib/core/page/lock.js +1 -1
  189. package/lib/core/sql-sync/config.js +1 -1
  190. package/lib/core/sql-sync/file-system.js +1 -1
  191. package/lib/core/sql-sync/hash.js +1 -1
  192. package/lib/core/sql-sync/lock.js +1 -1
  193. package/lib/core/sql-sync/utils.js +1 -1
  194. package/lib/core/sql-validator.js +1 -1
  195. package/lib/errors.js +1 -1
  196. package/lib/framework/build-all-flags.js +1 -1
  197. package/lib/framework/flags.js +1 -1
  198. package/lib/framework/help.js +1 -1
  199. package/lib/framework/index.js +1 -1
  200. package/lib/framework/output.js +1 -1
  201. package/lib/framework/response.js +1 -1
  202. package/lib/framework/runner-alias.js +1 -1
  203. package/lib/framework/runner.js +1 -1
  204. package/lib/framework/schema-export.js +1 -1
  205. package/lib/framework/types.js +1 -1
  206. package/lib/generated/build-info.js +1 -1
  207. package/lib/help.js +1 -1
  208. package/lib/skills/main.js +1 -1
  209. package/lib/skills/npx-skills-add.js +1 -1
  210. package/lib/telemetry/cli-command-trace.js +1 -1
  211. package/lib/telemetry/cli-help-trace.js +1 -1
  212. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  213. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  214. package/lib/telemetry/send-cli-trace-log.js +1 -1
  215. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  216. package/lib/utils/ai_config.js +1 -1
  217. package/lib/utils/apply-jq-filter.js +1 -1
  218. package/lib/utils/cdn-config.js +1 -1
  219. package/lib/utils/check-sdk-version.js +1 -1
  220. package/lib/utils/cli-version-check.js +1 -1
  221. package/lib/utils/cli-version-policy.js +1 -1
  222. package/lib/utils/config.js +1 -1
  223. package/lib/utils/copy-directory.js +1 -1
  224. package/lib/utils/entity-with-id.js +1 -1
  225. package/lib/utils/file-utils.js +1 -1
  226. package/lib/utils/guides-cdn.js +1 -1
  227. package/lib/utils/http-client.js +1 -1
  228. package/lib/utils/is-non-interactive.js +1 -1
  229. package/lib/utils/logger.js +1 -1
  230. package/lib/utils/params.js +1 -1
  231. package/lib/utils/platform.js +1 -1
  232. package/lib/utils/rules-cdn.js +1 -1
  233. package/lib/utils/sleep.js +1 -1
  234. package/lib/utils/template-replacer.js +1 -1
  235. package/lib/utils/update-notice.js +1 -1
  236. package/lib/utils/version.js +1 -1
  237. package/lib/utils/with-active-cookie.js +1 -1
  238. package/lib/utils/write-cli-side-channel.js +1 -1
  239. package/package.json +1 -1
@@ -1 +1 @@
1
- function a127_0x1a69(){const _0x866786=['24201aIjKWH','15cjRcbY','1608303QEMFMa','2AQhZgz','13927100BDTjfb','toFixed','1789128FpyQJS','760956ALnBYh','now','3276777EkYzzz','177743spbgED','1624mZqPEX','replace'];a127_0x1a69=function(){return _0x866786;};return a127_0x1a69();}function a127_0x219c(_0x3060a7,_0xffed5e){_0x3060a7=_0x3060a7-0x1e0;const _0x1a6937=a127_0x1a69();let _0x219cb9=_0x1a6937[_0x3060a7];return _0x219cb9;}(function(_0x54564e,_0x3284a4){const _0x4c3f94=a127_0x219c,_0x3e7c06=_0x54564e();while(!![]){try{const _0x5b3dec=parseInt(_0x4c3f94(0x1e0))/0x1+parseInt(_0x4c3f94(0x1e6))/0x2*(-parseInt(_0x4c3f94(0x1e5))/0x3)+parseInt(_0x4c3f94(0x1ea))/0x4*(parseInt(_0x4c3f94(0x1e4))/0x5)+-parseInt(_0x4c3f94(0x1e9))/0x6+-parseInt(_0x4c3f94(0x1ec))/0x7+-parseInt(_0x4c3f94(0x1e1))/0x8*(parseInt(_0x4c3f94(0x1e3))/0x9)+parseInt(_0x4c3f94(0x1e7))/0xa;if(_0x5b3dec===_0x3284a4)break;else _0x3e7c06['push'](_0x3e7c06['shift']());}catch(_0x5eea50){_0x3e7c06['push'](_0x3e7c06['shift']());}}}(a127_0x1a69,0x47827));export function formatElapsed(_0x392c7e){const _0x40306e=a127_0x219c,_0x4d3748=Date[_0x40306e(0x1eb)]()-_0x392c7e;if(_0x4d3748<0x3e8)return _0x4d3748+'ms';const _0x559eb8=(_0x4d3748/0x3e8)[_0x40306e(0x1e8)](0x2),_0x139a52=_0x559eb8[_0x40306e(0x1e2)](/\.?0+$/u,'');return _0x139a52+'s';}
1
+ (function(_0x47fcaa,_0x338f76){const _0x495ec3=a127_0x396e,_0x911199=_0x47fcaa();while(!![]){try{const _0x4b861a=parseInt(_0x495ec3(0xcd))/0x1+parseInt(_0x495ec3(0xca))/0x2+parseInt(_0x495ec3(0xcc))/0x3+parseInt(_0x495ec3(0xc9))/0x4*(parseInt(_0x495ec3(0xc5))/0x5)+parseInt(_0x495ec3(0xc6))/0x6+parseInt(_0x495ec3(0xc3))/0x7+-parseInt(_0x495ec3(0xcb))/0x8;if(_0x4b861a===_0x338f76)break;else _0x911199['push'](_0x911199['shift']());}catch(_0x493506){_0x911199['push'](_0x911199['shift']());}}}(a127_0x1ecc,0x92263));function a127_0x1ecc(){const _0x27e3a8=['88760ZAzEFe','1239960reiTjC','toFixed','now','172VnjAhm','1697622yYQHIG','24170304CGYkvh','1088394nRLtOM','370235RWOuif','7476525YtFetZ','replace'];a127_0x1ecc=function(){return _0x27e3a8;};return a127_0x1ecc();}function a127_0x396e(_0x347552,_0x42d315){_0x347552=_0x347552-0xc3;const _0x1ecc1e=a127_0x1ecc();let _0x396e67=_0x1ecc1e[_0x347552];return _0x396e67;}export function formatElapsed(_0x3deade){const _0xf585e3=a127_0x396e,_0x331d67=Date[_0xf585e3(0xc8)]()-_0x3deade;if(_0x331d67<0x3e8)return _0x331d67+'ms';const _0x335f5d=(_0x331d67/0x3e8)[_0xf585e3(0xc7)](0x2),_0x5e5e8f=_0x335f5d[_0xf585e3(0xc4)](/\.?0+$/u,'');return _0x5e5e8f+'s';}
@@ -1 +1 @@
1
- (function(_0x536165,_0x4616f5){const _0x8f50f2=a128_0x4d40,_0x45dda6=_0x536165();while(!![]){try{const _0x39305e=-parseInt(_0x8f50f2(0x9a))/0x1*(-parseInt(_0x8f50f2(0x99))/0x2)+-parseInt(_0x8f50f2(0xb5))/0x3*(-parseInt(_0x8f50f2(0x89))/0x4)+-parseInt(_0x8f50f2(0x90))/0x5*(parseInt(_0x8f50f2(0xab))/0x6)+-parseInt(_0x8f50f2(0x9e))/0x7*(-parseInt(_0x8f50f2(0x8c))/0x8)+-parseInt(_0x8f50f2(0xd0))/0x9*(parseInt(_0x8f50f2(0x7b))/0xa)+-parseInt(_0x8f50f2(0x87))/0xb+parseInt(_0x8f50f2(0xca))/0xc;if(_0x39305e===_0x4616f5)break;else _0x45dda6['push'](_0x45dda6['shift']());}catch(_0xcb365d){_0x45dda6['push'](_0x45dda6['shift']());}}}(a128_0xa572,0x29a85));import a128_0x1dcb75 from'path';import a128_0x5e09dc from'fs';import a128_0x5049fa from'chalk';import a128_0x2c6340 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';function a128_0x4d40(_0x252713,_0x4c0bf8){_0x252713=_0x252713-0x6d;const _0xa5725f=a128_0xa572();let _0x4d4056=_0xa5725f[_0x252713];return _0x4d4056;}import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a128_0xa572(){const _0x558de9=['stableVersion','length','233164rhPSNb','1JZYpml','resolve','trim','W_OK','119rbZKuA','...','API\x20配置拉取异常','info','belowMinimum','repeat','minimumVersion','\x20model(s)','Project\x20name:\x20','API\x20configuration\x20pulled:\x20','package.json','warn','create','960seBOOC','bold','keys','setLogPath','项目创建失败:\x20','production','*\x20Pulling\x20API\x20configuration...','\x20dataset(s),\x20generated\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','success','715311fkladx','log','\x20\x201.\x20Start\x20project:\x20','gray','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','更新\x20package.json\x20失败','√\x20package.json\x20updated:\x20name=','test','配置应用AppCode:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','version','stringify','rmSync','CLI\x20版本检查','更新\x20package.json\x20name','\x20|\x20AppCode:\x20','开始创建项目:\x20','existsSync','stop','\x20&&\x20','Install\x20dependencies','1042692KHhXwt','readFileSync','needsUpgrade','modelCount','parse','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','38322eKsnkM','√\x20Pulled\x20','项目创建完成:\x20','\x20|\x20Default:\x20','writeFileSync','\x20api\x20pull','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','utf8','join','Project\x20name\x20cannot\x20be\x20empty','projectName','\x20config\x20set\x20appcode\x20<app-code>\x27','error','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','currentVersion','800PMTVAM','chdir','🚀\x20Next\x20Steps:','green','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','accessSync','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20√\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Copy\x20project\x20files','defaultApp','\x20already\x20exists','104665qrUJhU','appCode','4SKNVbh','env','cwd','105936rgUisF','message','cookie','\x20run\x20start','4570nPNzhE','Format\x20code','projectCode','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','description','1.0.0','cyan'];a128_0xa572=function(){return _0x558de9;};return a128_0xa572();}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(_0x545e3e){const _0x14e64a=a128_0x4d40,_0x136c50=await checkCliVersion();(_0x136c50[_0x14e64a(0xcc)]||_0x136c50[_0x14e64a(0xa2)])&&(printCliUpgradeWarning(_0x136c50),assertCliVersionSupported(_0x136c50),logger[_0x14e64a(0xa1)]('create',_0x14e64a(0xc2),{'currentVersion':_0x136c50[_0x14e64a(0x7a)],'stableVersion':_0x136c50[_0x14e64a(0x97)],'minimumVersion':_0x136c50[_0x14e64a(0xa4)],'needsUpgrade':_0x136c50['needsUpgrade'],'belowMinimum':_0x136c50['belowMinimum']}));if(_0x545e3e['projectCode']&&_0x545e3e['appCode'])await runCreate({'projectName':_0x545e3e['projectCode'],'appCode':_0x545e3e[_0x14e64a(0x88)],'env':_0x545e3e['env']},_0x545e3e);else{if(_0x545e3e['projectCode']){const _0x48b6d2=await selectSingleAppcode(_0x545e3e[_0x14e64a(0x8e)]);await runCreate({'projectName':_0x545e3e[_0x14e64a(0x92)],'appCode':_0x48b6d2||undefined,'env':_0x545e3e['env']},_0x545e3e);}else await guidedCreateProject(_0x48917c=>runCreate(_0x48917c,_0x545e3e),_0x545e3e[_0x14e64a(0x8a)],_0x545e3e[_0x14e64a(0x8e)]);}}async function runCreate(_0x2e4fb7,_0x48d8fe){const _0xda27be=a128_0x4d40;if(!_0x2e4fb7['projectName']||_0x2e4fb7[_0xda27be(0x76)][_0xda27be(0x9c)]()==='')throw new Error(_0xda27be(0x75));const _0x25c394=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x25c394[_0xda27be(0xbc)](_0x2e4fb7[_0xda27be(0x76)]))throw new Error(_0xda27be(0xb9));if(_0x2e4fb7['projectName'][_0xda27be(0x98)]>0x64)throw new Error(_0xda27be(0xbe));const _0x2d9ea4=a128_0x1dcb75['resolve'](process[_0xda27be(0x8b)](),_0x2e4fb7[_0xda27be(0x76)]);if(a128_0x5e09dc[_0xda27be(0xc6)](_0x2d9ea4))throw new Error('Project\x20directory\x20'+_0x2e4fb7[_0xda27be(0x76)]+_0xda27be(0x86));try{a128_0x5e09dc[_0xda27be(0x80)](a128_0x1dcb75['dirname'](_0x2d9ea4),a128_0x5e09dc['constants'][_0xda27be(0x9d)]);}catch{throw new Error(_0xda27be(0x79));}logger[_0xda27be(0xae)](_0x2d9ea4),logger['info'](_0xda27be(0xaa),_0xda27be(0xc5)+_0x2e4fb7[_0xda27be(0x76)],{'projectDir':_0x2d9ea4,'appCode':_0x2e4fb7[_0xda27be(0x88)]}),console[_0xda27be(0xb6)](),console[_0xda27be(0xb6)](a128_0x5049fa[_0xda27be(0x7e)](_0xda27be(0x82))+_0xda27be(0xa6)+a128_0x5049fa[_0xda27be(0x7e)](_0x2e4fb7['projectName'])+(_0x2e4fb7[_0xda27be(0x88)]?_0xda27be(0xc4)+a128_0x5049fa[_0xda27be(0x96)](_0x2e4fb7[_0xda27be(0x88)]):''));try{await runTask(_0xda27be(0x84),()=>copyProjectTemplate(_0x2e4fb7[_0xda27be(0x76)])),await updatePackageJsonName(_0x2e4fb7[_0xda27be(0x76)]),await runTask(_0xda27be(0xc9),()=>installDependencies(_0x2e4fb7[_0xda27be(0x76)])),await runTask(_0xda27be(0x91),()=>formatProjectCode(_0x2e4fb7[_0xda27be(0x76)])),await configureAppCode(_0x2e4fb7[_0xda27be(0x76)],_0x2e4fb7[_0xda27be(0x88)]||'',_0x2e4fb7['env']);let _0x16ed60=![];if(_0x2e4fb7['appCode']){console[_0xda27be(0xb6)](_0xda27be(0xb1));const _0x5639bd=process['cwd']();try{process[_0xda27be(0x7c)](_0x2d9ea4);const _0x59456b=_0x2e4fb7[_0xda27be(0x8a)]||_0xda27be(0xb0);initEnv(_0x59456b);const {configArray:_0x491fe5}=await fetchModelList(_0x2e4fb7[_0xda27be(0x88)],_0x48d8fe[_0xda27be(0x8e)]||''),_0x92220=DEFAULT_API_DIR,_0x4ee376=await generateApiFile(_0x491fe5,'',_0x2e4fb7[_0xda27be(0x88)],!![],_0x59456b,_0x92220);console[_0xda27be(0xb6)](_0xda27be(0x6d)+_0x491fe5[_0xda27be(0x98)]+_0xda27be(0xb2)+_0x4ee376[_0xda27be(0xcd)]+_0xda27be(0xa5)),logger['info']('create',_0xda27be(0xa7)+_0x2e4fb7[_0xda27be(0x88)]);}catch(_0x6ec517){_0x16ed60=!![],console[_0xda27be(0xb6)](_0xda27be(0x93)),logger[_0xda27be(0xa9)](_0xda27be(0xaa),_0xda27be(0xa0),{'error':_0x6ec517 instanceof Error?_0x6ec517[_0xda27be(0x8d)]:String(_0x6ec517)});}finally{process['chdir'](_0x5639bd);}}logger[_0xda27be(0xb4)](_0xda27be(0xaa),_0xda27be(0x6e)+_0x2e4fb7[_0xda27be(0x76)]),console[_0xda27be(0xb6)](),console[_0xda27be(0xb6)](a128_0x5049fa['green']('─'[_0xda27be(0xa3)](0x3c))),console[_0xda27be(0xb6)](a128_0x5049fa[_0xda27be(0x96)][_0xda27be(0xac)](_0xda27be(0x7d))),console[_0xda27be(0xb6)](),console[_0xda27be(0xb6)](_0xda27be(0xb7)+a128_0x5049fa['cyan']['bold']('cd\x20'+_0x2e4fb7['projectName']+_0xda27be(0xc8)+CLI_BIN_NAME+_0xda27be(0x8f))),_0x16ed60&&console[_0xda27be(0xb6)](_0xda27be(0xb3)+a128_0x5049fa[_0xda27be(0x96)][_0xda27be(0xac)](CLI_BIN_NAME+_0xda27be(0x71))),console[_0xda27be(0xb6)](a128_0x5049fa[_0xda27be(0x7e)]('─'[_0xda27be(0xa3)](0x3c)));}catch(_0x1ad4b5){logger['error'](_0xda27be(0xaa),_0xda27be(0xaf)+_0x2e4fb7[_0xda27be(0x76)],{'error':_0x1ad4b5 instanceof Error?_0x1ad4b5['message']:String(_0x1ad4b5)});try{a128_0x5e09dc[_0xda27be(0xc6)](_0x2d9ea4)&&(console[_0xda27be(0xb6)](_0xda27be(0xcf)+_0x2d9ea4),a128_0x5e09dc[_0xda27be(0xc1)](_0x2d9ea4,{'recursive':!![],'force':!![]}));}catch{logger[_0xda27be(0xa9)]('create','清理项目目录失败:\x20'+_0x2d9ea4);}throw _0x1ad4b5;}}async function runTask(_0x3221b5,_0x4eb694){const _0x4e819d=a128_0x4d40,_0x42e7b5=a128_0x2c6340(_0x3221b5+_0x4e819d(0x9f))['start']();try{const _0x4a164d=await _0x4eb694();_0x42e7b5[_0x4e819d(0xc7)](),console['log'](''+a128_0x5049fa[_0x4e819d(0x7e)](_0x4e819d(0x82))+_0x3221b5+'\x20'+a128_0x5049fa[_0x4e819d(0xb8)]('['+_0x4a164d+']'));}catch(_0x339759){_0x42e7b5['fail'](_0x3221b5);throw _0x339759;}}async function updatePackageJsonName(_0x3bc693){const _0x570311=a128_0x4d40,_0x4183f8=a128_0x1dcb75[_0x570311(0x9b)](process[_0x570311(0x8b)](),_0x3bc693),_0x547fe2=a128_0x1dcb75['join'](_0x4183f8,_0x570311(0xa8));try{console[_0x570311(0xb6)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x421d15=getRabetbaseCliPackageRoot(),_0x5ed5a0=a128_0x1dcb75['join'](_0x421d15,_0x570311(0xa8));let _0x245422=_0x570311(0x95);try{const _0x1e659d=JSON[_0x570311(0xce)](a128_0x5e09dc[_0x570311(0xcb)](_0x5ed5a0,_0x570311(0x73)));_0x245422=_0x1e659d[_0x570311(0xbf)]||_0x570311(0x95);}catch{}const _0x1a653b=a128_0x5e09dc[_0x570311(0xcb)](_0x547fe2,_0x570311(0x73)),_0x496b7b=JSON[_0x570311(0xce)](_0x1a653b);_0x496b7b['name']=_0x3bc693,_0x496b7b[_0x570311(0x94)]=_0x3bc693+_0x570311(0x81)+_0x245422,a128_0x5e09dc[_0x570311(0x70)](_0x547fe2,JSON[_0x570311(0xc0)](_0x496b7b,null,0x2)+'\x0a',_0x570311(0x73)),console[_0x570311(0xb6)](_0x570311(0xbb)+_0x3bc693),logger['info'](_0x570311(0xaa),_0x570311(0xc3));}catch(_0xf84fdc){logger[_0x570311(0x78)]('create',_0x570311(0xba));throw _0xf84fdc;}}async function configureAppCode(_0x3dc4fe,_0x9f3049,_0x1a2c78){const _0x3dff1b=a128_0x4d40,_0xb3a303=a128_0x1dcb75['resolve'](process[_0x3dff1b(0x8b)](),_0x3dc4fe),_0x48792f=a128_0x1dcb75[_0x3dff1b(0x74)](_0xb3a303,NEW_CONFIG_NAME);try{_0x9f3049?console[_0x3dff1b(0xb6)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x3dc4fe+':\x20'+_0x9f3049):console[_0x3dff1b(0xb6)](_0x3dff1b(0x72)+_0x3dc4fe);const _0x3c3a42=getRabetbaseCliPackageRoot(),_0x3aebe4=a128_0x1dcb75[_0x3dff1b(0x74)](_0x3c3a42,'package.json');let _0x2ef790=_0x3dff1b(0x95);try{const _0x586b11=JSON['parse'](a128_0x5e09dc[_0x3dff1b(0xcb)](_0x3aebe4,_0x3dff1b(0x73)));_0x2ef790=_0x586b11['version']||_0x3dff1b(0x95);}catch{}const _0x30bfaa=readConfig(),_0x5abaa0=typeof _0x30bfaa[_0x3dff1b(0x8a)]==='string'?_0x30bfaa[_0x3dff1b(0x8a)]:undefined,_0x5b6280={};for(const _0x1846f9 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x30bfaa[_0x1846f9]!=null)_0x5b6280[_0x1846f9]=_0x30bfaa[_0x1846f9];}const _0x515ef3=buildCanonicalProjectConfig(_0x5b6280,{'appCodes':_0x9f3049?[_0x9f3049]:[],'env':_0x1a2c78||_0x5abaa0||_0x3dff1b(0xb0),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x2ef790}});writeConfigFile(_0x48792f,_0x515ef3),_0x9f3049?console['log'](_0x3dff1b(0x83)+Object[_0x3dff1b(0xad)](_0x515ef3['apps']||{})['join'](',\x20')+_0x3dff1b(0x6f)+_0x515ef3[_0x3dff1b(0x85)]):console[_0x3dff1b(0xb6)](_0x3dff1b(0x7f)+CLI_BIN_NAME+_0x3dff1b(0x77)),logger[_0x3dff1b(0xa1)]('create',_0x3dff1b(0xbd)+_0x9f3049);}catch(_0x4e1041){logger[_0x3dff1b(0x78)]('create','配置应用AppCode失败');}}
1
+ (function(_0x2b14f6,_0x56b0f7){const _0xd27f36=a128_0x5c3e,_0x2c8c78=_0x2b14f6();while(!![]){try{const _0x3f08cb=parseInt(_0xd27f36(0x14d))/0x1+-parseInt(_0xd27f36(0x131))/0x2*(-parseInt(_0xd27f36(0x119))/0x3)+parseInt(_0xd27f36(0xf8))/0x4*(-parseInt(_0xd27f36(0x12d))/0x5)+-parseInt(_0xd27f36(0x124))/0x6*(parseInt(_0xd27f36(0x11b))/0x7)+parseInt(_0xd27f36(0xfe))/0x8*(-parseInt(_0xd27f36(0x156))/0x9)+-parseInt(_0xd27f36(0x113))/0xa*(parseInt(_0xd27f36(0x121))/0xb)+parseInt(_0xd27f36(0x105))/0xc;if(_0x3f08cb===_0x56b0f7)break;else _0x2c8c78['push'](_0x2c8c78['shift']());}catch(_0x330a66){_0x2c8c78['push'](_0x2c8c78['shift']());}}}(a128_0x28e8,0xb6d7b));import a128_0x35ec80 from'path';import a128_0x4bf135 from'fs';import a128_0x295991 from'chalk';import a128_0x3d14ef from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a128_0x5c3e(_0x45214a,_0x5b8be4){_0x45214a=_0x45214a-0xf8;const _0x28e8e7=a128_0x28e8();let _0x5c3e4d=_0x28e8e7[_0x45214a];return _0x5c3e4d;}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_0x28e8(){const _0x354f68=['keys','4moRwnW','accessSync','...','existsSync','stableVersion','√\x20Pulled\x20','340432UImBKa','cyan','项目创建失败:\x20','create','bold','env','info','30917184jwzwaH','join','*\x20Pulling\x20API\x20configuration...','message','production','stop','\x20|\x20AppCode:\x20','belowMinimum','readFileSync','更新\x20package.json\x20失败','writeFileSync','apps','Format\x20code','\x20Generated\x20by\x20rabetbase\x20cli\x20','104740ouiypN','\x20√\x20','repeat','🚀\x20Next\x20Steps:','\x20&&\x20','stringify','3995787SgpIed','API\x20configuration\x20pulled:\x20','7ttdmBl','\x20dataset(s),\x20generated\x20','utf8','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','name','Project\x20name:\x20','1243WHYDVO','version','test','3878844MZenxT','needsUpgrade','\x20config\x20set\x20appcode\x20<app-code>\x27','Copy\x20project\x20files','gray','start','length','\x20\x201.\x20Start\x20project:\x20','\x20run\x20start','1740085hruXfF','1.0.0','defaultApp','*\x20Configuring\x20AppCode\x20for\x20project\x20','2LgoBOW','更新\x20package.json\x20name','\x20model(s)','配置应用AppCode失败','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','cookie','cwd','\x20already\x20exists','log','projectName','chdir','√\x20package.json\x20updated:\x20name=','清理项目目录失败:\x20','rmSync','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','success','resolve','配置应用AppCode:\x20','setLogPath','package.json','currentVersion','modelCount','项目创建完成:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','green','appCode','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','125019PnLDSb','warn','projectCode','error','√\x20Configuration\x20file\x20created,\x20Apps:\x20','description','parse','trim','W_OK','234oKCztS'];a128_0x28e8=function(){return _0x354f68;};return a128_0x28e8();}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(_0x9dd14d){const _0x51d3fb=a128_0x5c3e,_0x3eeb55=await checkCliVersion();(_0x3eeb55[_0x51d3fb(0x125)]||_0x3eeb55[_0x51d3fb(0x10c)])&&(printCliUpgradeWarning(_0x3eeb55),assertCliVersionSupported(_0x3eeb55),logger[_0x51d3fb(0x104)](_0x51d3fb(0x101),'CLI\x20版本检查',{'currentVersion':_0x3eeb55[_0x51d3fb(0x146)],'stableVersion':_0x3eeb55[_0x51d3fb(0xfc)],'minimumVersion':_0x3eeb55['minimumVersion'],'needsUpgrade':_0x3eeb55[_0x51d3fb(0x125)],'belowMinimum':_0x3eeb55['belowMinimum']}));if(_0x9dd14d[_0x51d3fb(0x14f)]&&_0x9dd14d[_0x51d3fb(0x14b)])await runCreate({'projectName':_0x9dd14d[_0x51d3fb(0x14f)],'appCode':_0x9dd14d[_0x51d3fb(0x14b)],'env':_0x9dd14d[_0x51d3fb(0x103)]},_0x9dd14d);else{if(_0x9dd14d[_0x51d3fb(0x14f)]){const _0x1f9a6d=await selectSingleAppcode(_0x9dd14d['cookie']);await runCreate({'projectName':_0x9dd14d['projectCode'],'appCode':_0x1f9a6d||undefined,'env':_0x9dd14d[_0x51d3fb(0x103)]},_0x9dd14d);}else await guidedCreateProject(_0x14c22d=>runCreate(_0x14c22d,_0x9dd14d),_0x9dd14d['env'],_0x9dd14d[_0x51d3fb(0x136)]);}}async function runCreate(_0x35fe09,_0xcd208c){const _0x32f24c=a128_0x5c3e;if(!_0x35fe09[_0x32f24c(0x13a)]||_0x35fe09[_0x32f24c(0x13a)][_0x32f24c(0x154)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x51a7d2=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x51a7d2[_0x32f24c(0x123)](_0x35fe09[_0x32f24c(0x13a)]))throw new Error(_0x32f24c(0x140));if(_0x35fe09[_0x32f24c(0x13a)][_0x32f24c(0x12a)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x50308e=a128_0x35ec80[_0x32f24c(0x142)](process[_0x32f24c(0x137)](),_0x35fe09[_0x32f24c(0x13a)]);if(a128_0x4bf135[_0x32f24c(0xfb)](_0x50308e))throw new Error('Project\x20directory\x20'+_0x35fe09['projectName']+_0x32f24c(0x138));try{a128_0x4bf135[_0x32f24c(0xf9)](a128_0x35ec80['dirname'](_0x50308e),a128_0x4bf135['constants'][_0x32f24c(0x155)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x32f24c(0x144)](_0x50308e),logger[_0x32f24c(0x104)](_0x32f24c(0x101),'开始创建项目:\x20'+_0x35fe09[_0x32f24c(0x13a)],{'projectDir':_0x50308e,'appCode':_0x35fe09[_0x32f24c(0x14b)]}),console[_0x32f24c(0x139)](),console['log'](a128_0x295991[_0x32f24c(0x14a)](_0x32f24c(0x114))+_0x32f24c(0x120)+a128_0x295991[_0x32f24c(0x14a)](_0x35fe09[_0x32f24c(0x13a)])+(_0x35fe09[_0x32f24c(0x14b)]?_0x32f24c(0x10b)+a128_0x295991[_0x32f24c(0xff)](_0x35fe09[_0x32f24c(0x14b)]):''));try{await runTask(_0x32f24c(0x127),()=>copyProjectTemplate(_0x35fe09[_0x32f24c(0x13a)])),await updatePackageJsonName(_0x35fe09[_0x32f24c(0x13a)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x35fe09[_0x32f24c(0x13a)])),await runTask(_0x32f24c(0x111),()=>formatProjectCode(_0x35fe09['projectName'])),await configureAppCode(_0x35fe09[_0x32f24c(0x13a)],_0x35fe09['appCode']||'',_0x35fe09[_0x32f24c(0x103)]);let _0x4a7a85=![];if(_0x35fe09[_0x32f24c(0x14b)]){console[_0x32f24c(0x139)](_0x32f24c(0x107));const _0x24dea8=process[_0x32f24c(0x137)]();try{process['chdir'](_0x50308e);const _0x538efa=_0x35fe09['env']||'production';initEnv(_0x538efa);const {configArray:_0x4d30db}=await fetchModelList(_0x35fe09[_0x32f24c(0x14b)],_0xcd208c[_0x32f24c(0x136)]||''),_0x14e900=DEFAULT_API_DIR,_0x1cde85=await generateApiFile(_0x4d30db,'',_0x35fe09['appCode'],!![],_0x538efa,_0x14e900);console[_0x32f24c(0x139)](_0x32f24c(0xfd)+_0x4d30db[_0x32f24c(0x12a)]+_0x32f24c(0x11c)+_0x1cde85[_0x32f24c(0x147)]+_0x32f24c(0x133)),logger['info'](_0x32f24c(0x101),_0x32f24c(0x11a)+_0x35fe09['appCode']);}catch(_0x40679d){_0x4a7a85=!![],console[_0x32f24c(0x139)](_0x32f24c(0x149)),logger[_0x32f24c(0x14e)](_0x32f24c(0x101),'API\x20配置拉取异常',{'error':_0x40679d instanceof Error?_0x40679d[_0x32f24c(0x108)]:String(_0x40679d)});}finally{process[_0x32f24c(0x13b)](_0x24dea8);}}logger[_0x32f24c(0x141)]('create',_0x32f24c(0x148)+_0x35fe09['projectName']),console[_0x32f24c(0x139)](),console[_0x32f24c(0x139)](a128_0x295991['green']('─'['repeat'](0x3c))),console['log'](a128_0x295991[_0x32f24c(0xff)]['bold'](_0x32f24c(0x116))),console[_0x32f24c(0x139)](),console['log'](_0x32f24c(0x12b)+a128_0x295991['cyan'][_0x32f24c(0x102)]('cd\x20'+_0x35fe09[_0x32f24c(0x13a)]+_0x32f24c(0x117)+CLI_BIN_NAME+_0x32f24c(0x12c))),_0x4a7a85&&console[_0x32f24c(0x139)](_0x32f24c(0x13f)+a128_0x295991[_0x32f24c(0xff)][_0x32f24c(0x102)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x32f24c(0x139)](a128_0x295991['green']('─'[_0x32f24c(0x115)](0x3c)));}catch(_0x454518){logger[_0x32f24c(0x150)](_0x32f24c(0x101),_0x32f24c(0x100)+_0x35fe09['projectName'],{'error':_0x454518 instanceof Error?_0x454518[_0x32f24c(0x108)]:String(_0x454518)});try{a128_0x4bf135[_0x32f24c(0xfb)](_0x50308e)&&(console['log'](_0x32f24c(0x14c)+_0x50308e),a128_0x4bf135[_0x32f24c(0x13e)](_0x50308e,{'recursive':!![],'force':!![]}));}catch{logger[_0x32f24c(0x14e)](_0x32f24c(0x101),_0x32f24c(0x13d)+_0x50308e);}throw _0x454518;}}async function runTask(_0x16b753,_0x325c83){const _0x17b136=a128_0x5c3e,_0x35f0bb=a128_0x3d14ef(_0x16b753+_0x17b136(0xfa))[_0x17b136(0x129)]();try{const _0x120228=await _0x325c83();_0x35f0bb[_0x17b136(0x10a)](),console[_0x17b136(0x139)](''+a128_0x295991[_0x17b136(0x14a)](_0x17b136(0x114))+_0x16b753+'\x20'+a128_0x295991[_0x17b136(0x128)]('['+_0x120228+']'));}catch(_0x1ebc77){_0x35f0bb['fail'](_0x16b753);throw _0x1ebc77;}}async function updatePackageJsonName(_0x2d46e3){const _0x4672bc=a128_0x5c3e,_0x304ca1=a128_0x35ec80[_0x4672bc(0x142)](process[_0x4672bc(0x137)](),_0x2d46e3),_0x48b0c0=a128_0x35ec80[_0x4672bc(0x106)](_0x304ca1,_0x4672bc(0x145));try{console[_0x4672bc(0x139)](_0x4672bc(0x11e));const _0x59c8a6=getRabetbaseCliPackageRoot(),_0x25db9a=a128_0x35ec80[_0x4672bc(0x106)](_0x59c8a6,_0x4672bc(0x145));let _0x2d84fb=_0x4672bc(0x12e);try{const _0x473603=JSON['parse'](a128_0x4bf135[_0x4672bc(0x10d)](_0x25db9a,_0x4672bc(0x11d)));_0x2d84fb=_0x473603[_0x4672bc(0x122)]||_0x4672bc(0x12e);}catch{}const _0x4e20ff=a128_0x4bf135[_0x4672bc(0x10d)](_0x48b0c0,_0x4672bc(0x11d)),_0x548c63=JSON['parse'](_0x4e20ff);_0x548c63[_0x4672bc(0x11f)]=_0x2d46e3,_0x548c63[_0x4672bc(0x152)]=_0x2d46e3+_0x4672bc(0x112)+_0x2d84fb,a128_0x4bf135[_0x4672bc(0x10f)](_0x48b0c0,JSON[_0x4672bc(0x118)](_0x548c63,null,0x2)+'\x0a',_0x4672bc(0x11d)),console[_0x4672bc(0x139)](_0x4672bc(0x13c)+_0x2d46e3),logger[_0x4672bc(0x104)](_0x4672bc(0x101),_0x4672bc(0x132));}catch(_0x57a03e){logger[_0x4672bc(0x150)](_0x4672bc(0x101),_0x4672bc(0x10e));throw _0x57a03e;}}async function configureAppCode(_0x440508,_0x1b5780,_0x3a4542){const _0x559ab0=a128_0x5c3e,_0x2b4494=a128_0x35ec80['resolve'](process[_0x559ab0(0x137)](),_0x440508),_0x5019aa=a128_0x35ec80[_0x559ab0(0x106)](_0x2b4494,NEW_CONFIG_NAME);try{_0x1b5780?console[_0x559ab0(0x139)](_0x559ab0(0x130)+_0x440508+':\x20'+_0x1b5780):console[_0x559ab0(0x139)](_0x559ab0(0x135)+_0x440508);const _0x2e648f=getRabetbaseCliPackageRoot(),_0x297e59=a128_0x35ec80[_0x559ab0(0x106)](_0x2e648f,_0x559ab0(0x145));let _0x45a375=_0x559ab0(0x12e);try{const _0x4a1dda=JSON[_0x559ab0(0x153)](a128_0x4bf135[_0x559ab0(0x10d)](_0x297e59,_0x559ab0(0x11d)));_0x45a375=_0x4a1dda[_0x559ab0(0x122)]||_0x559ab0(0x12e);}catch{}const _0x1d3cfa=readConfig(),_0x43978e=typeof _0x1d3cfa[_0x559ab0(0x103)]==='string'?_0x1d3cfa['env']:undefined,_0x26a379={};for(const _0x564645 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1d3cfa[_0x564645]!=null)_0x26a379[_0x564645]=_0x1d3cfa[_0x564645];}const _0x183997=buildCanonicalProjectConfig(_0x26a379,{'appCodes':_0x1b5780?[_0x1b5780]:[],'env':_0x3a4542||_0x43978e||_0x559ab0(0x109),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x45a375}});writeConfigFile(_0x5019aa,_0x183997),_0x1b5780?console['log'](_0x559ab0(0x151)+Object[_0x559ab0(0x157)](_0x183997[_0x559ab0(0x110)]||{})[_0x559ab0(0x106)](',\x20')+'\x20|\x20Default:\x20'+_0x183997[_0x559ab0(0x12f)]):console[_0x559ab0(0x139)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x559ab0(0x126)),logger[_0x559ab0(0x104)](_0x559ab0(0x101),_0x559ab0(0x143)+_0x1b5780);}catch(_0x5948b6){logger['error'](_0x559ab0(0x101),_0x559ab0(0x134));}}
@@ -1 +1 @@
1
- function a129_0x1483(){const _0xbd8b24=['*\x20Creating\x20project\x20','bun','43168hlzNro','needsUpgrade','parse','Project\x20name\x20contains\x20invalid\x20characters.','join','validation','1561932peUAoB','40431312QWuCbo','env','utf-8','\x0a\x20\x20cd\x20','test','description','bun\x20--version','constants','...','chdir','bun\x20run\x20format','cwd','Use\x20a\x20different\x20project\x20name.','451jTcDtP','\x20\x20Pulling\x20API\x20configuration...','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','trim','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x0a√\x20Project\x20','9JMGNqn','40548ArAaow','resolve','log','length','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','W_OK','dirname','\x20model(s)','1490zymGwp','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','belowMinimum','\x20created\x20successfully!','stringify','readFile','20200PUOCYb','\x20dataset(s),\x20generated\x20','name','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','1358EzayKi','594cFJKKh','modelCount','Project\x20name\x20cannot\x20be\x20empty.','39468hDntag','\x20\x20rabetbase\x20run\x20start\x0a','Check\x20directory\x20permissions.','production','ignore','277010xndBaD'];a129_0x1483=function(){return _0xbd8b24;};return a129_0x1483();}(function(_0x2ff849,_0x22ff22){const _0x349e93=a129_0xed7a,_0xd2646=_0x2ff849();while(!![]){try{const _0x1977b7=-parseInt(_0x349e93(0x1b4))/0x1+-parseInt(_0x349e93(0x1a6))/0x2*(-parseInt(_0x349e93(0x1c8))/0x3)+parseInt(_0x349e93(0x19e))/0x4*(-parseInt(_0x349e93(0x1d1))/0x5)+parseInt(_0x349e93(0x1c9))/0x6*(parseInt(_0x349e93(0x1a2))/0x7)+parseInt(_0x349e93(0x1ae))/0x8*(parseInt(_0x349e93(0x1a3))/0x9)+parseInt(_0x349e93(0x1ab))/0xa*(-parseInt(_0x349e93(0x1c2))/0xb)+parseInt(_0x349e93(0x1b5))/0xc;if(_0x1977b7===_0x22ff22)break;else _0xd2646['push'](_0xd2646['shift']());}catch(_0x291aa3){_0xd2646['push'](_0xd2646['shift']());}}}(a129_0x1483,0xda0a5));import a129_0x510bac from'path';import a129_0x172589 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_0xed7a(_0x246981,_0x1d029f){_0x246981=_0x246981-0x19b;const _0x148372=a129_0x1483();let _0xed7abc=_0x148372[_0x246981];return _0xed7abc;}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(_0x2855f0,_0x16967a,_0x573d7a,_0x5b33a3){const _0x4a5c03=a129_0xed7a,_0x4b45d4=await checkCliVersion();(_0x4b45d4[_0x4a5c03(0x1af)]||_0x4b45d4[_0x4a5c03(0x1d3)])&&(printCliUpgradeWarning(_0x4b45d4),assertCliVersionSupported(_0x4b45d4));if(!_0x2855f0||_0x2855f0[_0x4a5c03(0x1c5)]()==='')throw CliErrors[_0x4a5c03(0x1b3)](_0x4a5c03(0x1a5));const _0x1816b8=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1816b8[_0x4a5c03(0x1b9)](_0x2855f0))throw CliErrors[_0x4a5c03(0x1b3)](_0x4a5c03(0x1b1),_0x4a5c03(0x1d2));if(_0x2855f0[_0x4a5c03(0x1cc)]>0x64)throw CliErrors[_0x4a5c03(0x1b3)](_0x4a5c03(0x1a1));const _0x414ca9=a129_0x510bac[_0x4a5c03(0x1ca)](process[_0x4a5c03(0x1c0)](),_0x2855f0);if(existsSync(_0x414ca9))throw CliErrors[_0x4a5c03(0x1b3)]('Project\x20directory\x20\x22'+_0x2855f0+'\x22\x20already\x20exists.',_0x4a5c03(0x1c1));try{const _0x1fa885=a129_0x510bac[_0x4a5c03(0x1cf)](_0x414ca9);await a129_0x172589['access'](_0x1fa885,a129_0x172589[_0x4a5c03(0x1bc)][_0x4a5c03(0x1ce)]);}catch{throw CliErrors[_0x4a5c03(0x1b3)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x4a5c03(0x1a8));}try{console[_0x4a5c03(0x1cb)](_0x4a5c03(0x1ac)+_0x2855f0+_0x4a5c03(0x1bd));const _0x5beb6a=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5beb6a,_0x414ca9),console['log']('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x2855f0),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x4a5c03(0x1cb)]('\x20\x20Installing\x20dependencies...'),console[_0x4a5c03(0x1cb)](_0x4a5c03(0x1cd)),await formatCode(_0x414ca9),console[_0x4a5c03(0x1cb)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x2855f0,_0x573d7a,_0x16967a),console['log']('\x20\x20√\x20Configuration\x20file\x20created'),_0x573d7a&&await pullApiConfig(_0x414ca9,_0x573d7a,_0x16967a,_0x5b33a3),console[_0x4a5c03(0x1cb)](_0x4a5c03(0x1c7)+_0x2855f0+_0x4a5c03(0x19b)),console['log'](_0x4a5c03(0x1b8)+_0x2855f0),console[_0x4a5c03(0x1cb)](_0x4a5c03(0x1a7));}catch(_0x511a37){try{existsSync(_0x414ca9)&&await a129_0x172589['rm'](_0x414ca9,{'recursive':!![],'force':!![]});}catch{}throw _0x511a37;}}async function updatePackageJsonName(_0x310899){const _0x165bea=a129_0xed7a,_0x565e24=a129_0x510bac[_0x165bea(0x1ca)](process['cwd'](),_0x310899),_0x21fc8c=a129_0x510bac[_0x165bea(0x1b2)](_0x565e24,'package.json'),_0x3e6fef=await a129_0x172589[_0x165bea(0x19d)](_0x21fc8c,_0x165bea(0x1b7)),_0x17c443=JSON[_0x165bea(0x1b0)](_0x3e6fef);_0x17c443[_0x165bea(0x1a0)]=_0x310899,_0x17c443[_0x165bea(0x1ba)]=_0x165bea(0x1c6),await a129_0x172589['writeFile'](_0x21fc8c,JSON[_0x165bea(0x19c)](_0x17c443,null,0x2)+'\x0a');}function detectPackageManager(){const _0x18ca38=a129_0xed7a;try{return execSync(_0x18ca38(0x1bb),{'stdio':_0x18ca38(0x1aa)}),_0x18ca38(0x1ad);}catch{return'npm';}}async function formatCode(_0x3b53d0){const _0x132101=a129_0xed7a;try{await execAsync(_0x132101(0x1bf),{'cwd':_0x3b53d0});}catch{}}async function configureProject(_0x5edd10,_0x898f4c,_0x3d7f56){const _0x19ff9c=a129_0xed7a,_0x413b77=a129_0x510bac[_0x19ff9c(0x1ca)](process[_0x19ff9c(0x1c0)](),_0x5edd10),_0x10b096=a129_0x510bac[_0x19ff9c(0x1b2)](_0x413b77,NEW_CONFIG_NAME),_0x28749e=readConfig(),_0xa0153a=typeof _0x28749e[_0x19ff9c(0x1b6)]==='string'?_0x28749e[_0x19ff9c(0x1b6)]:undefined,_0x234e6f={};for(const _0x92ec0c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x28749e[_0x92ec0c]!=null)_0x234e6f[_0x92ec0c]=_0x28749e[_0x92ec0c];}const _0x177dca=buildCanonicalProjectConfig(_0x234e6f,{'appCodes':_0x898f4c?[_0x898f4c]:[],'env':_0x3d7f56||_0xa0153a||_0x19ff9c(0x1a9),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x10b096,_0x177dca);}async function pullApiConfig(_0x3e0efc,_0x51e73e,_0x446c91,_0x7217f0){const _0x319639=a129_0xed7a,_0x5bba65=process[_0x319639(0x1c0)]();try{process[_0x319639(0x1be)](_0x3e0efc);const _0x49c6b8=_0x446c91||'production';initEnv(_0x49c6b8),console[_0x319639(0x1cb)](_0x319639(0x1c3));const {configArray:_0x18371f}=await fetchModelList(_0x51e73e,_0x7217f0||''),_0x59216b=await generateApiFile(_0x18371f,'',_0x51e73e,!![],_0x49c6b8,DEFAULT_API_DIR);console[_0x319639(0x1cb)]('\x20\x20√\x20Pulled\x20'+_0x18371f['length']+_0x319639(0x19f)+_0x59216b[_0x319639(0x1a4)]+_0x319639(0x1d0));}catch(_0x203cea){console[_0x319639(0x1cb)](_0x319639(0x1c4)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x319639(0x1be)](_0x5bba65);}}
1
+ (function(_0x21eb93,_0x1b2ca8){const _0x254e39=a129_0x70df,_0x1b88b2=_0x21eb93();while(!![]){try{const _0x12ceb3=-parseInt(_0x254e39(0x1fb))/0x1+parseInt(_0x254e39(0x1ed))/0x2+parseInt(_0x254e39(0x213))/0x3*(parseInt(_0x254e39(0x207))/0x4)+-parseInt(_0x254e39(0x1ff))/0x5+parseInt(_0x254e39(0x208))/0x6+parseInt(_0x254e39(0x1f6))/0x7*(-parseInt(_0x254e39(0x206))/0x8)+parseInt(_0x254e39(0x1f4))/0x9;if(_0x12ceb3===_0x1b2ca8)break;else _0x1b88b2['push'](_0x1b88b2['shift']());}catch(_0x40b114){_0x1b88b2['push'](_0x1b88b2['shift']());}}}(a129_0x4516,0xdd056));function a129_0x70df(_0x5cffca,_0x28daf3){_0x5cffca=_0x5cffca-0x1e2;const _0x451664=a129_0x4516();let _0x70df56=_0x451664[_0x5cffca];return _0x70df56;}import a129_0x50735c from'path';import a129_0x255b4b 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_0x4516(){const _0x2f0584=['env','package.json','Use\x20a\x20different\x20project\x20name.','\x20\x20Installing\x20dependencies...','\x20dataset(s),\x20generated\x20','writeFile','\x0a√\x20Project\x20','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Project\x20template\x20created','readFile','\x22\x20already\x20exists.','W_OK','chdir','utf-8','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','858572Rrydsy','constants','belowMinimum','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','Project\x20name\x20contains\x20invalid\x20characters.','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','bun\x20run\x20format','4089906XPwvix','toLocaleString','28546tvKxHt','log','needsUpgrade','\x20\x20√\x20Pulled\x20','trim','120739xQUpEe','string','...','Check\x20directory\x20permissions.','4713450pgSSsO','\x20\x20rabetbase\x20run\x20start\x0a','name','validation','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','length','\x0a\x20\x20cd\x20','272fYCJOx','4OwxAzL','5987952WCaelv','\x20api\x20pull`\x20manually\x20later.','Project\x20directory\x20\x22','resolve','join','modelCount','\x20\x20√\x20Code\x20formatted','bun\x20--version','cwd','description','dirname','677013xjKtza','test','\x20model(s)','production','access'];a129_0x4516=function(){return _0x2f0584;};return a129_0x4516();}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(_0x21806d,_0xac9615,_0x23343a,_0x4fa871){const _0x7fa381=a129_0x70df,_0x3b5694=await checkCliVersion();(_0x3b5694[_0x7fa381(0x1f8)]||_0x3b5694[_0x7fa381(0x1ef)])&&(printCliUpgradeWarning(_0x3b5694),assertCliVersionSupported(_0x3b5694));if(!_0x21806d||_0x21806d[_0x7fa381(0x1fa)]()==='')throw CliErrors[_0x7fa381(0x202)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x19652a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x19652a[_0x7fa381(0x214)](_0x21806d))throw CliErrors[_0x7fa381(0x202)](_0x7fa381(0x1f1),_0x7fa381(0x203));if(_0x21806d['length']>0x64)throw CliErrors[_0x7fa381(0x202)](_0x7fa381(0x1ec));const _0x4e4a34=a129_0x50735c[_0x7fa381(0x20b)](process[_0x7fa381(0x210)](),_0x21806d);if(existsSync(_0x4e4a34))throw CliErrors['validation'](_0x7fa381(0x20a)+_0x21806d+_0x7fa381(0x1e8),_0x7fa381(0x21a));try{const _0x3d514f=a129_0x50735c[_0x7fa381(0x212)](_0x4e4a34);await a129_0x255b4b[_0x7fa381(0x217)](_0x3d514f,a129_0x255b4b[_0x7fa381(0x1ee)][_0x7fa381(0x1e9)]);}catch{throw CliErrors[_0x7fa381(0x202)](_0x7fa381(0x1e5),_0x7fa381(0x1fe));}try{console['log']('*\x20Creating\x20project\x20'+_0x21806d+_0x7fa381(0x1fd));const _0x17a97e=getSubAppReactDemoTemplateDir();await copyDirectory(_0x17a97e,_0x4e4a34),console[_0x7fa381(0x1f7)](_0x7fa381(0x1e6)),await updatePackageJsonName(_0x21806d),console[_0x7fa381(0x1f7)]('\x20\x20√\x20package.json\x20updated'),console['log'](_0x7fa381(0x21b)),console[_0x7fa381(0x1f7)](_0x7fa381(0x1f0)),await formatCode(_0x4e4a34),console[_0x7fa381(0x1f7)](_0x7fa381(0x20e)),await configureProject(_0x21806d,_0x23343a,_0xac9615),console['log']('\x20\x20√\x20Configuration\x20file\x20created'),_0x23343a&&await pullApiConfig(_0x4e4a34,_0x23343a,_0xac9615,_0x4fa871),console[_0x7fa381(0x1f7)](_0x7fa381(0x1e4)+_0x21806d+'\x20created\x20successfully!'),console[_0x7fa381(0x1f7)](_0x7fa381(0x205)+_0x21806d),console['log'](_0x7fa381(0x200));}catch(_0x5e00c8){try{existsSync(_0x4e4a34)&&await a129_0x255b4b['rm'](_0x4e4a34,{'recursive':!![],'force':!![]});}catch{}throw _0x5e00c8;}}async function updatePackageJsonName(_0x4beaa9){const _0x2762a7=a129_0x70df,_0x8becbc=a129_0x50735c[_0x2762a7(0x20b)](process['cwd'](),_0x4beaa9),_0x201e85=a129_0x50735c[_0x2762a7(0x20c)](_0x8becbc,_0x2762a7(0x219)),_0x363a66=await a129_0x255b4b[_0x2762a7(0x1e7)](_0x201e85,_0x2762a7(0x1eb)),_0x3625c3=JSON['parse'](_0x363a66);_0x3625c3[_0x2762a7(0x201)]=_0x4beaa9,_0x3625c3[_0x2762a7(0x211)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a129_0x255b4b[_0x2762a7(0x1e3)](_0x201e85,JSON['stringify'](_0x3625c3,null,0x2)+'\x0a');}function detectPackageManager(){const _0x13d727=a129_0x70df;try{return execSync(_0x13d727(0x20f),{'stdio':'ignore'}),'bun';}catch{return'npm';}}async function formatCode(_0x1039fb){const _0x22dc4b=a129_0x70df;try{await execAsync(_0x22dc4b(0x1f3),{'cwd':_0x1039fb});}catch{}}async function configureProject(_0x2eadef,_0x55554f,_0x548ed2){const _0x1f9845=a129_0x70df,_0x97f2aa=a129_0x50735c['resolve'](process[_0x1f9845(0x210)](),_0x2eadef),_0x2d5a09=a129_0x50735c['join'](_0x97f2aa,NEW_CONFIG_NAME),_0xe2295f=readConfig(),_0x5975de=typeof _0xe2295f[_0x1f9845(0x218)]===_0x1f9845(0x1fc)?_0xe2295f['env']:undefined,_0x375ae2={};for(const _0x4ffd91 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0xe2295f[_0x4ffd91]!=null)_0x375ae2[_0x4ffd91]=_0xe2295f[_0x4ffd91];}const _0x1a7ebe=buildCanonicalProjectConfig(_0x375ae2,{'appCodes':_0x55554f?[_0x55554f]:[],'env':_0x548ed2||_0x5975de||_0x1f9845(0x216),'metadata':{'createdAt':new Date()[_0x1f9845(0x1f5)](),'version':getCliVersion()}});writeConfigFile(_0x2d5a09,_0x1a7ebe);}async function pullApiConfig(_0x569317,_0x24ed52,_0x497585,_0x2ed49d){const _0x54aec4=a129_0x70df,_0x1f58a9=process[_0x54aec4(0x210)]();try{process['chdir'](_0x569317);const _0x4f658c=_0x497585||_0x54aec4(0x216);initEnv(_0x4f658c),console[_0x54aec4(0x1f7)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0xd95657}=await fetchModelList(_0x24ed52,_0x2ed49d||''),_0x5dc3e5=await generateApiFile(_0xd95657,'',_0x24ed52,!![],_0x4f658c,DEFAULT_API_DIR);console['log'](_0x54aec4(0x1f9)+_0xd95657[_0x54aec4(0x204)]+_0x54aec4(0x1e2)+_0x5dc3e5[_0x54aec4(0x20d)]+_0x54aec4(0x215));}catch(_0x41fd6c){console[_0x54aec4(0x1f7)](_0x54aec4(0x1f2)+CLI_BIN_NAME+_0x54aec4(0x209));}finally{process[_0x54aec4(0x1ea)](_0x1f58a9);}}
@@ -1 +1 @@
1
- const a130_0x1bf43b=a130_0xdfba;(function(_0x5b3a03,_0x3fcd56){const _0xe8f7ee=a130_0xdfba,_0x194541=_0x5b3a03();while(!![]){try{const _0x3dd5c0=-parseInt(_0xe8f7ee(0x88))/0x1*(-parseInt(_0xe8f7ee(0x7f))/0x2)+-parseInt(_0xe8f7ee(0x86))/0x3+parseInt(_0xe8f7ee(0x83))/0x4+parseInt(_0xe8f7ee(0x84))/0x5+-parseInt(_0xe8f7ee(0x8b))/0x6*(-parseInt(_0xe8f7ee(0x87))/0x7)+parseInt(_0xe8f7ee(0x8a))/0x8+-parseInt(_0xe8f7ee(0x81))/0x9*(parseInt(_0xe8f7ee(0x85))/0xa);if(_0x3dd5c0===_0x3fcd56)break;else _0x194541['push'](_0x194541['shift']());}catch(_0xe53d84){_0x194541['push'](_0x194541['shift']());}}}(a130_0x12c6,0x21c49));function a130_0xdfba(_0x259ed8,_0x30ee32){_0x259ed8=_0x259ed8-0x7d;const _0x12c636=a130_0x12c6();let _0xdfbaef=_0x12c636[_0x259ed8];return _0xdfbaef;}import a130_0x3d7d83 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a130_0x3d7d83[a130_0x1bf43b(0x7d)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){return a130_0x3d7d83['resolve'](__dirname,'../../../../');}function a130_0x12c6(){const _0x41be76=['693246caJRlj','79156tuBSFt','1uNtTkx','join','1353472DMnpsx','102wxxJPM','dirname','projects','480924olNOcj','templates','9jrzSca','sub-app-react-demo','666044DJNSOr','787195lNOEVh','5564370YyZPbO'];a130_0x12c6=function(){return _0x41be76;};return a130_0x12c6();}export function getSubAppReactDemoTemplateDir(){const _0xf96ac=a130_0x1bf43b;return a130_0x3d7d83[_0xf96ac(0x89)](getRabetbaseCliPackageRoot(),_0xf96ac(0x80),_0xf96ac(0x7e),_0xf96ac(0x82));}
1
+ const a130_0x127c26=a130_0x450d;(function(_0x38695c,_0x139674){const _0x198cfa=a130_0x450d,_0x357928=_0x38695c();while(!![]){try{const _0x26e88b=-parseInt(_0x198cfa(0x15b))/0x1+-parseInt(_0x198cfa(0x157))/0x2+-parseInt(_0x198cfa(0x156))/0x3+parseInt(_0x198cfa(0x158))/0x4+parseInt(_0x198cfa(0x155))/0x5+parseInt(_0x198cfa(0x15a))/0x6*(-parseInt(_0x198cfa(0x160))/0x7)+parseInt(_0x198cfa(0x159))/0x8;if(_0x26e88b===_0x139674)break;else _0x357928['push'](_0x357928['shift']());}catch(_0xa9b9ba){_0x357928['push'](_0x357928['shift']());}}}(a130_0x45a8,0xa2158));import a130_0x1119dc from'node:path';function a130_0x45a8(){const _0x5a220a=['templates','14805KpbTLs','3266676PsGGFa','1603682qQpIKG','5289260exypNp','24421104PVAvLo','12yAhZVg','1112719SgmqMn','../../../../','sub-app-react-demo','projects','join','2486981zBprDB','dirname'];a130_0x45a8=function(){return _0x5a220a;};return a130_0x45a8();}import{fileURLToPath}from'node:url';const __dirname=a130_0x1119dc[a130_0x127c26(0x161)](fileURLToPath(import.meta.url));function a130_0x450d(_0x3ad9bb,_0x33aa27){_0x3ad9bb=_0x3ad9bb-0x155;const _0x45a82e=a130_0x45a8();let _0x450df2=_0x45a82e[_0x3ad9bb];return _0x450df2;}export function getRabetbaseCliPackageRoot(){const _0x1b3dc5=a130_0x127c26;return a130_0x1119dc['resolve'](__dirname,_0x1b3dc5(0x15c));}export function getSubAppReactDemoTemplateDir(){const _0x51c808=a130_0x127c26;return a130_0x1119dc[_0x51c808(0x15f)](getRabetbaseCliPackageRoot(),_0x51c808(0x162),_0x51c808(0x15e),_0x51c808(0x15d));}
@@ -1 +1 @@
1
- (function(_0x218c6f,_0x24376c){const _0x29c3f3=a131_0x153d,_0xae79f7=_0x218c6f();while(!![]){try{const _0x3fc5f1=-parseInt(_0x29c3f3(0xb3))/0x1+-parseInt(_0x29c3f3(0xb0))/0x2*(-parseInt(_0x29c3f3(0xbf))/0x3)+-parseInt(_0x29c3f3(0xb6))/0x4*(-parseInt(_0x29c3f3(0xbe))/0x5)+parseInt(_0x29c3f3(0xae))/0x6*(-parseInt(_0x29c3f3(0xad))/0x7)+-parseInt(_0x29c3f3(0xbd))/0x8*(-parseInt(_0x29c3f3(0xb5))/0x9)+parseInt(_0x29c3f3(0xb7))/0xa*(parseInt(_0x29c3f3(0xb4))/0xb)+-parseInt(_0x29c3f3(0xba))/0xc*(parseInt(_0x29c3f3(0xbc))/0xd);if(_0x3fc5f1===_0x24376c)break;else _0xae79f7['push'](_0xae79f7['shift']());}catch(_0x31d512){_0xae79f7['push'](_0xae79f7['shift']());}}}(a131_0x3614,0x84694));import a131_0x137378 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a131_0x153d(_0x3bdfe8,_0x139703){_0x3bdfe8=_0x3bdfe8-0xad;const _0x3614b5=a131_0x3614();let _0x153df7=_0x3614b5[_0x3bdfe8];return _0x153df7;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x5e8902){const _0x12238d=a131_0x153d,_0x4677e7=Date[_0x12238d(0xbb)](),_0x464b96=a131_0x137378[_0x12238d(0xb8)](process[_0x12238d(0xaf)](),_0x5e8902);try{logger[_0x12238d(0xc0)]('copy',_0x12238d(0xc1),{'projectCode':_0x5e8902,'templateDir':templateDir}),await copyDirectory(templateDir,_0x464b96);const _0x4a84ff=Date[_0x12238d(0xbb)]()-_0x4677e7;logger['success']('copy',_0x12238d(0xb1),_0x4a84ff,{'projectCode':_0x5e8902});}catch(_0x176761){const _0x1e5eec=Date[_0x12238d(0xbb)]()-_0x4677e7;logger[_0x12238d(0xb2)]('copy',_0x12238d(0xb9),{'projectCode':_0x5e8902,'error':_0x176761 instanceof Error?_0x176761[_0x12238d(0xc2)]:String(_0x176761),'duration':_0x1e5eec});throw _0x176761;}return formatElapsed(_0x4677e7);}function a131_0x3614(){const _0x2aecde=['message','67690BLtEvU','648nJGrOb','cwd','101672wWIwfN','项目模板复制完成','error','460456lcssTB','146729MwXQrS','5193YWisln','269464IcqOBJ','730YXhHtD','resolve','项目模板复制失败','195228GDfFkJ','now','832ZdcmvJ','9160vJFnOj','40dUmmAm','54PJoDNS','info','开始复制项目模板'];a131_0x3614=function(){return _0x2aecde;};return a131_0x3614();}
1
+ (function(_0x147169,_0x2e77f8){const _0x3dfed1=a131_0x2387,_0x3be929=_0x147169();while(!![]){try{const _0x2e27c1=parseInt(_0x3dfed1(0x82))/0x1+parseInt(_0x3dfed1(0x83))/0x2+-parseInt(_0x3dfed1(0x87))/0x3*(parseInt(_0x3dfed1(0x8e))/0x4)+parseInt(_0x3dfed1(0x8d))/0x5*(-parseInt(_0x3dfed1(0x90))/0x6)+-parseInt(_0x3dfed1(0x8f))/0x7*(-parseInt(_0x3dfed1(0x86))/0x8)+parseInt(_0x3dfed1(0x91))/0x9+-parseInt(_0x3dfed1(0x81))/0xa;if(_0x2e27c1===_0x2e77f8)break;else _0x3be929['push'](_0x3be929['shift']());}catch(_0x43d577){_0x3be929['push'](_0x3be929['shift']());}}}(a131_0x54dc,0x95676));import a131_0x5ece4b from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a131_0x2387(_0x2dc511,_0x119529){_0x2dc511=_0x2dc511-0x80;const _0x54dce4=a131_0x54dc();let _0x23877b=_0x54dce4[_0x2dc511];return _0x23877b;}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x1dcf36){const _0x2d3dfa=a131_0x2387,_0x4f2927=Date['now'](),_0x37b7cb=a131_0x5ece4b[_0x2d3dfa(0x92)](process[_0x2d3dfa(0x8a)](),_0x1dcf36);try{logger[_0x2d3dfa(0x8b)](_0x2d3dfa(0x89),_0x2d3dfa(0x84),{'projectCode':_0x1dcf36,'templateDir':templateDir}),await copyDirectory(templateDir,_0x37b7cb);const _0x24c15c=Date[_0x2d3dfa(0x88)]()-_0x4f2927;logger[_0x2d3dfa(0x85)]('copy',_0x2d3dfa(0x8c),_0x24c15c,{'projectCode':_0x1dcf36});}catch(_0x16062e){const _0x48b5da=Date[_0x2d3dfa(0x88)]()-_0x4f2927;logger['error'](_0x2d3dfa(0x89),'项目模板复制失败',{'projectCode':_0x1dcf36,'error':_0x16062e instanceof Error?_0x16062e[_0x2d3dfa(0x80)]:String(_0x16062e),'duration':_0x48b5da});throw _0x16062e;}return formatElapsed(_0x4f2927);}function a131_0x54dc(){const _0x2bc64d=['info','项目模板复制完成','205wSfSpR','4415336FoFwaf','1318065JbHfad','4074wenPOv','4972320YdJpjf','resolve','message','5131610oAtqzV','257452EdtQWl','1387360dmfVXI','开始复制项目模板','success','32EPswPh','3gZmCZY','now','copy','cwd'];a131_0x54dc=function(){return _0x2bc64d;};return a131_0x54dc();}
@@ -1 +1 @@
1
- (function(_0x3f1ab3,_0x24818a){const _0x3c6df6=a132_0x3fc2,_0x15ab8f=_0x3f1ab3();while(!![]){try{const _0x2975f9=parseInt(_0x3c6df6(0x1d5))/0x1+-parseInt(_0x3c6df6(0x1c4))/0x2+-parseInt(_0x3c6df6(0x1d2))/0x3*(-parseInt(_0x3c6df6(0x1ce))/0x4)+parseInt(_0x3c6df6(0x1d3))/0x5+-parseInt(_0x3c6df6(0x1cd))/0x6+parseInt(_0x3c6df6(0x1cb))/0x7*(parseInt(_0x3c6df6(0x1d4))/0x8)+-parseInt(_0x3c6df6(0x1ca))/0x9*(parseInt(_0x3c6df6(0x1cc))/0xa);if(_0x2975f9===_0x24818a)break;else _0x15ab8f['push'](_0x15ab8f['shift']());}catch(_0x2883f5){_0x15ab8f['push'](_0x15ab8f['shift']());}}}(a132_0x5f15,0x4570a));import a132_0x20b0e5 from'node:path';import{execa}from'execa';function a132_0x3fc2(_0x559b08,_0x46e022){_0x559b08=_0x559b08-0x1c4;const _0x5f15ea=a132_0x5f15();let _0x3fc2e1=_0x5f15ea[_0x559b08];return _0x3fc2e1;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a132_0x5f15(){const _0x104698=['1180sKFmRi','2472840nUXBim','10792SPqJRl','error','now','info','243PYzDKj','1884695lmdfWz','1214632kLvHvF','192322itEnAp','185312BNKovV','resolve','代码格式化完成','success','开始格式化代码','format','34632dpSpUx','21OvmSdU'];a132_0x5f15=function(){return _0x104698;};return a132_0x5f15();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x15ce5b){const _0x535d57=a132_0x3fc2,_0xe5bdbb=Date[_0x535d57(0x1d0)](),_0x29f62f=a132_0x20b0e5[_0x535d57(0x1c5)](process['cwd'](),_0x15ce5b);try{logger[_0x535d57(0x1d1)](_0x535d57(0x1c9),_0x535d57(0x1c8),{'projectCode':_0x15ce5b}),await execa(resolveNpmBin('npx'),['prettier','--write','.'],{'cwd':_0x29f62f});const _0x2ef207=Date[_0x535d57(0x1d0)]()-_0xe5bdbb;logger[_0x535d57(0x1c7)]('format',_0x535d57(0x1c6),_0x2ef207,{'projectCode':_0x15ce5b});}catch(_0x11599c){const _0x4e365d=Date[_0x535d57(0x1d0)]()-_0xe5bdbb;logger[_0x535d57(0x1cf)](_0x535d57(0x1c9),'代码格式化失败',{'projectCode':_0x15ce5b,'error':_0x11599c instanceof Error?_0x11599c['message']:String(_0x11599c),'duration':_0x4e365d});throw _0x11599c;}return formatElapsed(_0xe5bdbb);}
1
+ (function(_0x2b9b51,_0x5cc47f){const _0xb5838c=a132_0x268d,_0xec3696=_0x2b9b51();while(!![]){try{const _0x55b265=-parseInt(_0xb5838c(0x19b))/0x1+-parseInt(_0xb5838c(0x196))/0x2+-parseInt(_0xb5838c(0x198))/0x3+-parseInt(_0xb5838c(0x194))/0x4*(parseInt(_0xb5838c(0x193))/0x5)+-parseInt(_0xb5838c(0x1a3))/0x6+-parseInt(_0xb5838c(0x1a1))/0x7*(-parseInt(_0xb5838c(0x1a5))/0x8)+-parseInt(_0xb5838c(0x195))/0x9*(-parseInt(_0xb5838c(0x19a))/0xa);if(_0x55b265===_0x5cc47f)break;else _0xec3696['push'](_0xec3696['shift']());}catch(_0x475048){_0xec3696['push'](_0xec3696['shift']());}}}(a132_0x26f8,0xaea36));import a132_0x4e98ce from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a132_0x26f8(){const _0x338b72=['开始格式化代码','6908904LEDiwr','cwd','608XkIIZh','30190Vbzfxq','444RiVdJS','9pHbIwl','28326HarIJY','info','1487220DuKnIT','--write','35045960bILFsS','1010421mBNKDm','代码格式化完成','format','resolve','now','message','50911aoTFYA'];a132_0x26f8=function(){return _0x338b72;};return a132_0x26f8();}import{resolveNpmBin}from'../../../utils/platform.js';function a132_0x268d(_0x140e09,_0x5adc1b){_0x140e09=_0x140e09-0x193;const _0x26f8c5=a132_0x26f8();let _0x268ded=_0x26f8c5[_0x140e09];return _0x268ded;}export async function formatProjectCode(_0x2650f2){const _0x21f2b7=a132_0x268d,_0x40494e=Date[_0x21f2b7(0x19f)](),_0x788ecb=a132_0x4e98ce[_0x21f2b7(0x19e)](process[_0x21f2b7(0x1a4)](),_0x2650f2);try{logger[_0x21f2b7(0x197)](_0x21f2b7(0x19d),_0x21f2b7(0x1a2),{'projectCode':_0x2650f2}),await execa(resolveNpmBin('npx'),['prettier',_0x21f2b7(0x199),'.'],{'cwd':_0x788ecb});const _0x488bd3=Date[_0x21f2b7(0x19f)]()-_0x40494e;logger['success'](_0x21f2b7(0x19d),_0x21f2b7(0x19c),_0x488bd3,{'projectCode':_0x2650f2});}catch(_0x349171){const _0x5b4a29=Date[_0x21f2b7(0x19f)]()-_0x40494e;logger['error']('format','代码格式化失败',{'projectCode':_0x2650f2,'error':_0x349171 instanceof Error?_0x349171[_0x21f2b7(0x1a0)]:String(_0x349171),'duration':_0x5b4a29});throw _0x349171;}return formatElapsed(_0x40494e);}
@@ -1 +1 @@
1
- (function(_0x312ad9,_0xf0114a){const _0x1e6be1=a133_0x574c,_0x452162=_0x312ad9();while(!![]){try{const _0x1141f1=parseInt(_0x1e6be1(0xa3))/0x1*(parseInt(_0x1e6be1(0xb6))/0x2)+parseInt(_0x1e6be1(0xb1))/0x3*(parseInt(_0x1e6be1(0xb2))/0x4)+-parseInt(_0x1e6be1(0xae))/0x5+parseInt(_0x1e6be1(0xa9))/0x6*(-parseInt(_0x1e6be1(0xb7))/0x7)+parseInt(_0x1e6be1(0xb5))/0x8+-parseInt(_0x1e6be1(0xaa))/0x9+-parseInt(_0x1e6be1(0xb3))/0xa*(-parseInt(_0x1e6be1(0xac))/0xb);if(_0x1141f1===_0xf0114a)break;else _0x452162['push'](_0x452162['shift']());}catch(_0x4ccc0c){_0x452162['push'](_0x452162['shift']());}}}(a133_0x35c5,0xb4d42));import a133_0x3edab6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a133_0x574c(_0x376c38,_0x3af8a4){_0x376c38=_0x376c38-0xa1;const _0x35c5e5=a133_0x35c5();let _0x574c0c=_0x35c5e5[_0x376c38];return _0x574c0c;}function a133_0x35c5(){const _0x1f4558=['https://registry.npmmirror.com','now','3IEFpey','5570484ueSVeb','5776270DSjiBs','info','8949944MpjiGd','3726ckOHlv','3611804rxtxSi','cwd','依赖安装失败','25ZQURjo','message','success','resolve','--registry','npm','12SqDqrX','2543895npcnPE','开始安装依赖','11aBOyom','install','5401465QiHIOg'];a133_0x35c5=function(){return _0x1f4558;};return a133_0x35c5();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4dec29){const _0x1d70c7=a133_0x574c,_0x412b6a=Date[_0x1d70c7(0xb0)](),_0x44166a=a133_0x3edab6[_0x1d70c7(0xa6)](process[_0x1d70c7(0xa1)](),_0x4dec29);try{logger[_0x1d70c7(0xb4)](_0x1d70c7(0xad),_0x1d70c7(0xab),{'projectCode':_0x4dec29,'registry':_0x1d70c7(0xaf)}),await execa(resolveNpmBin(_0x1d70c7(0xa8)),['install',_0x1d70c7(0xa7),_0x1d70c7(0xaf)],{'cwd':_0x44166a});const _0x4941c1=Date[_0x1d70c7(0xb0)]()-_0x412b6a;logger[_0x1d70c7(0xa5)](_0x1d70c7(0xad),'依赖安装完成',_0x4941c1,{'projectCode':_0x4dec29});}catch(_0x840d03){const _0x1e97b0=Date[_0x1d70c7(0xb0)]()-_0x412b6a;logger['error'](_0x1d70c7(0xad),_0x1d70c7(0xa2),{'projectCode':_0x4dec29,'error':_0x840d03 instanceof Error?_0x840d03[_0x1d70c7(0xa4)]:String(_0x840d03),'duration':_0x1e97b0});throw _0x840d03;}return formatElapsed(_0x412b6a);}
1
+ function a133_0x1a5f(_0x3d2a33,_0x3c48c1){_0x3d2a33=_0x3d2a33-0x1bd;const _0x231262=a133_0x2312();let _0x1a5f4b=_0x231262[_0x3d2a33];return _0x1a5f4b;}(function(_0x3c6f9f,_0x28c910){const _0x31992e=a133_0x1a5f,_0x188dec=_0x3c6f9f();while(!![]){try{const _0x459fbd=-parseInt(_0x31992e(0x1cc))/0x1*(parseInt(_0x31992e(0x1c0))/0x2)+parseInt(_0x31992e(0x1cb))/0x3*(-parseInt(_0x31992e(0x1c8))/0x4)+parseInt(_0x31992e(0x1c5))/0x5*(-parseInt(_0x31992e(0x1c3))/0x6)+parseInt(_0x31992e(0x1bf))/0x7+parseInt(_0x31992e(0x1c7))/0x8+-parseInt(_0x31992e(0x1c2))/0x9*(-parseInt(_0x31992e(0x1ce))/0xa)+parseInt(_0x31992e(0x1ca))/0xb*(parseInt(_0x31992e(0x1cd))/0xc);if(_0x459fbd===_0x28c910)break;else _0x188dec['push'](_0x188dec['shift']());}catch(_0x3c5c04){_0x188dec['push'](_0x188dec['shift']());}}}(a133_0x2312,0x5d446));import a133_0x37786d from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a133_0x2312(){const _0x5c4dcb=['180JsovEj','7278TfIfet','resolve','2690PgnTEi','https://registry.npmmirror.com','3062208BTEwQv','459236XfXHov','依赖安装失败','286MSVRpN','9eKAcbv','3DOSQBB','617928idNHgI','18890atXhDN','success','message','info','now','install','472549TtYZZH','298576dUQrQu','error'];a133_0x2312=function(){return _0x5c4dcb;};return a133_0x2312();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x1503ea){const _0x40866c=a133_0x1a5f,_0x3f3c4f=Date[_0x40866c(0x1bd)](),_0x4531c4=a133_0x37786d[_0x40866c(0x1c4)](process['cwd'](),_0x1503ea);try{logger[_0x40866c(0x1d1)]('install','开始安装依赖',{'projectCode':_0x1503ea,'registry':_0x40866c(0x1c6)}),await execa(resolveNpmBin('npm'),[_0x40866c(0x1be),'--registry',_0x40866c(0x1c6)],{'cwd':_0x4531c4});const _0x1480c4=Date['now']()-_0x3f3c4f;logger[_0x40866c(0x1cf)](_0x40866c(0x1be),'依赖安装完成',_0x1480c4,{'projectCode':_0x1503ea});}catch(_0x1e7ff2){const _0x1cfa7a=Date['now']()-_0x3f3c4f;logger[_0x40866c(0x1c1)](_0x40866c(0x1be),_0x40866c(0x1c9),{'projectCode':_0x1503ea,'error':_0x1e7ff2 instanceof Error?_0x1e7ff2[_0x40866c(0x1d0)]:String(_0x1e7ff2),'duration':_0x1cfa7a});throw _0x1e7ff2;}return formatElapsed(_0x3f3c4f);}
@@ -1 +1 @@
1
- function a134_0x15ea(_0x4b2197,_0x41ad3f){_0x4b2197=_0x4b2197-0x1c6;const _0x223bed=a134_0x223b();let _0x15eaac=_0x223bed[_0x4b2197];return _0x15eaac;}const a134_0x4775d1=a134_0x15ea;(function(_0xece5f6,_0x10d82f){const _0x33137e=a134_0x15ea,_0x19b9cf=_0xece5f6();while(!![]){try{const _0x27cf18=-parseInt(_0x33137e(0x1d4))/0x1+-parseInt(_0x33137e(0x1d8))/0x2*(parseInt(_0x33137e(0x1e9))/0x3)+parseInt(_0x33137e(0x1cc))/0x4+parseInt(_0x33137e(0x1dc))/0x5*(parseInt(_0x33137e(0x1d7))/0x6)+parseInt(_0x33137e(0x1ec))/0x7*(-parseInt(_0x33137e(0x1ee))/0x8)+-parseInt(_0x33137e(0x1e0))/0x9*(-parseInt(_0x33137e(0x1e3))/0xa)+-parseInt(_0x33137e(0x1e4))/0xb;if(_0x27cf18===_0x10d82f)break;else _0x19b9cf['push'](_0x19b9cf['shift']());}catch(_0x51b9c1){_0x19b9cf['push'](_0x19b9cf['shift']());}}}(a134_0x223b,0x8372e));function a134_0x223b(){const _0x54d65a=['Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','../../commands/project/create/main.js','27IcaqRn','env','trim','2106430QmVMgh','96492poDIVP','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Project\x20name','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','64002CbxWpV','Usage:\x20','Skip\x20confirmation\x20prompt','2051ZHvcRZ','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','20328tzkpge','2026-07','project','../../commands/project/create/non-interactive.js','App\x20code\x20to\x20initialize','nonInteractive','create','project-name','yes','3925068bzEfrM','boolean','cookie','string','args','\x20workspace\x20init','name','init','797817yUTwKR','appcode','bool','2985924bitFzy','2QsZUcD','write','Auto-confirm\x20prompts','upgrade','5fsUVor','str'];a134_0x223b=function(){return _0x54d65a;};return a134_0x223b();}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':a134_0x4775d1(0x1cf),'description':a134_0x4775d1(0x1c7)},{'name':a134_0x4775d1(0x1e1),'type':a134_0x4775d1(0x1cf),'description':'Target\x20environment'},{'name':a134_0x4775d1(0x1cb),'type':a134_0x4775d1(0x1cd),'description':a134_0x4775d1(0x1da),'default':![]}],createFlags=[{'name':a134_0x4775d1(0x1d2),'type':a134_0x4775d1(0x1cf),'description':a134_0x4775d1(0x1e7)},{'name':a134_0x4775d1(0x1e1),'type':a134_0x4775d1(0x1cf),'description':'Target\x20environment'},{'name':a134_0x4775d1(0x1d5),'type':'string','description':a134_0x4775d1(0x1ed)}],upgradeFlags=[{'name':a134_0x4775d1(0x1cb),'type':a134_0x4775d1(0x1cd),'description':a134_0x4775d1(0x1eb),'default':![]}];export const projectDefinitions=[{'service':a134_0x4775d1(0x1f0),'command':a134_0x4775d1(0x1d3),'description':a134_0x4775d1(0x1de),'risk':a134_0x4775d1(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0x4775d1(0x1d1),'since':a134_0x4775d1(0x1ef)},'flags':initFlags,async 'execute'(_0x472fe6){const _0x34b6d5=a134_0x4775d1;return await initConfig({'appcode':_0x472fe6[_0x34b6d5(0x1dd)](_0x34b6d5(0x1d5))||undefined,'env':_0x472fe6[_0x34b6d5(0x1dd)](_0x34b6d5(0x1e1))||undefined,'autoYes':_0x472fe6[_0x34b6d5(0x1d6)](_0x34b6d5(0x1cb))}),{'ok':!![]};}},{'service':'project','command':a134_0x4775d1(0x1c9),'description':'Create\x20a\x20new\x20project','risk':a134_0x4775d1(0x1d9),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a134_0x4775d1(0x1ca),'description':a134_0x4775d1(0x1e6),'required':![]}],'flags':createFlags,async 'execute'(_0x3bcbd6){const _0x386247=a134_0x4775d1,{createApp:_0x1c7704}=await import(_0x386247(0x1df)),{createProjectNonInteractive:_0x56aaee}=await import(_0x386247(0x1c6)),_0xbea383=_0x3bcbd6[_0x386247(0x1dd)](_0x386247(0x1d2))[_0x386247(0x1e2)]()||_0x3bcbd6[_0x386247(0x1d0)][0x0]?.['trim'](),_0x35a85b=_0x3bcbd6['str']('env')||undefined,_0x4a3389=_0x3bcbd6['str']('appcode')||undefined;if(_0x3bcbd6[_0x386247(0x1c8)]){if(!_0xbea383)throw CliErrors['validation']('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x386247(0x1ea)+CLI_BIN_NAME+_0x386247(0x1e5));await _0x56aaee(_0xbea383,_0x35a85b,_0x4a3389,_0x3bcbd6[_0x386247(0x1ce)]);}else await _0x1c7704({'projectCode':_0xbea383,'appCode':_0x4a3389,'env':_0x35a85b,'cookie':_0x3bcbd6[_0x386247(0x1ce)]});return{'ok':!![]};}},{'service':a134_0x4775d1(0x1f0),'command':a134_0x4775d1(0x1db),'description':a134_0x4775d1(0x1e8),'risk':a134_0x4775d1(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x1dbf20){const _0x287888=a134_0x4775d1;return await upgradeApp(_0x1dbf20['nonInteractive'],{'yes':_0x1dbf20[_0x287888(0x1d6)]('yes')}),{'ok':!![]};}}];
1
+ const a134_0x29fbbd=a134_0x327e;(function(_0x447356,_0x338cfe){const _0x4ab8ac=a134_0x327e,_0x3d797f=_0x447356();while(!![]){try{const _0x31d1d9=-parseInt(_0x4ab8ac(0x105))/0x1*(parseInt(_0x4ab8ac(0x111))/0x2)+parseInt(_0x4ab8ac(0xf8))/0x3+parseInt(_0x4ab8ac(0x106))/0x4+parseInt(_0x4ab8ac(0x10e))/0x5*(-parseInt(_0x4ab8ac(0xf5))/0x6)+parseInt(_0x4ab8ac(0x10f))/0x7*(parseInt(_0x4ab8ac(0x102))/0x8)+-parseInt(_0x4ab8ac(0xfd))/0x9*(parseInt(_0x4ab8ac(0x10b))/0xa)+parseInt(_0x4ab8ac(0xec))/0xb;if(_0x31d1d9===_0x338cfe)break;else _0x3d797f['push'](_0x3d797f['shift']());}catch(_0x409d74){_0x3d797f['push'](_0x3d797f['shift']());}}}(a134_0x5920,0x9617b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a134_0x5920(){const _0x51afc0=['16JVkHNi','../../commands/project/create/main.js','boolean','1148773aLGixX','1184640Dpdvbt','str','env','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','1409390PIpPHh','Auto-confirm\x20prompts','nonInteractive','2156835HCyLLI','1196958nQYILA','App\x20code\x20to\x20initialize','2yUDFfK','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','\x20workspace\x20init','name','10935166Exvgux','trim','project','write','appcode','init','args','../../commands/project/create/non-interactive.js','Target\x20environment','6nDiDBB','string','validation','2956446NIuXWn','create','project-name','Create\x20a\x20new\x20project','Project\x20name','27XfbttA','Skip\x20confirmation\x20prompt','yes','Usage:\x20','cookie'];a134_0x5920=function(){return _0x51afc0;};return a134_0x5920();}function a134_0x327e(_0x32f9a0,_0x51894c){_0x32f9a0=_0x32f9a0-0xeb;const _0x592064=a134_0x5920();let _0x327efd=_0x592064[_0x32f9a0];return _0x327efd;}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a134_0x29fbbd(0xf0),'type':'string','description':a134_0x29fbbd(0x110)},{'name':a134_0x29fbbd(0x108),'type':a134_0x29fbbd(0xf6),'description':'Target\x20environment'},{'name':a134_0x29fbbd(0xff),'type':'boolean','description':a134_0x29fbbd(0x10c),'default':![]}],createFlags=[{'name':a134_0x29fbbd(0xeb),'type':a134_0x29fbbd(0xf6),'description':a134_0x29fbbd(0xfc)},{'name':a134_0x29fbbd(0x108),'type':a134_0x29fbbd(0xf6),'description':a134_0x29fbbd(0xf4)},{'name':a134_0x29fbbd(0xf0),'type':a134_0x29fbbd(0xf6),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a134_0x29fbbd(0xff),'type':a134_0x29fbbd(0x104),'description':a134_0x29fbbd(0xfe),'default':![]}];export const projectDefinitions=[{'service':a134_0x29fbbd(0xee),'command':a134_0x29fbbd(0xf1),'description':a134_0x29fbbd(0x112),'risk':a134_0x29fbbd(0xef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0x29fbbd(0x113),'since':'2026-07'},'flags':initFlags,async 'execute'(_0x326f1a){const _0x3a5b56=a134_0x29fbbd;return await initConfig({'appcode':_0x326f1a[_0x3a5b56(0x107)](_0x3a5b56(0xf0))||undefined,'env':_0x326f1a['str']('env')||undefined,'autoYes':_0x326f1a['bool'](_0x3a5b56(0xff))}),{'ok':!![]};}},{'service':a134_0x29fbbd(0xee),'command':a134_0x29fbbd(0xf9),'description':a134_0x29fbbd(0xfb),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a134_0x29fbbd(0xfa),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x149d3b){const _0x5dd325=a134_0x29fbbd,{createApp:_0x53c063}=await import(_0x5dd325(0x103)),{createProjectNonInteractive:_0x1235d0}=await import(_0x5dd325(0xf3)),_0xbc158f=_0x149d3b[_0x5dd325(0x107)](_0x5dd325(0xeb))['trim']()||_0x149d3b[_0x5dd325(0xf2)][0x0]?.[_0x5dd325(0xed)](),_0x17e9a1=_0x149d3b[_0x5dd325(0x107)](_0x5dd325(0x108))||undefined,_0x460970=_0x149d3b['str'](_0x5dd325(0xf0))||undefined;if(_0x149d3b[_0x5dd325(0x10d)]){if(!_0xbc158f)throw CliErrors[_0x5dd325(0xf7)](_0x5dd325(0x10a),_0x5dd325(0x100)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x1235d0(_0xbc158f,_0x17e9a1,_0x460970,_0x149d3b[_0x5dd325(0x101)]);}else await _0x53c063({'projectCode':_0xbc158f,'appCode':_0x460970,'env':_0x17e9a1,'cookie':_0x149d3b[_0x5dd325(0x101)]});return{'ok':!![]};}},{'service':a134_0x29fbbd(0xee),'command':'upgrade','description':a134_0x29fbbd(0x109),'risk':a134_0x29fbbd(0xef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4afa6c){const _0x2aef85=a134_0x29fbbd;return await upgradeApp(_0x4afa6c[_0x2aef85(0x10d)],{'yes':_0x4afa6c['bool'](_0x2aef85(0xff))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x43d69a,_0x356937){const _0x462cf3=a135_0x2060,_0x5bf8bf=_0x43d69a();while(!![]){try{const _0xcbc065=parseInt(_0x462cf3(0x1e1))/0x1*(parseInt(_0x462cf3(0x208))/0x2)+-parseInt(_0x462cf3(0x1ec))/0x3*(-parseInt(_0x462cf3(0x1f3))/0x4)+parseInt(_0x462cf3(0x206))/0x5+parseInt(_0x462cf3(0x1d6))/0x6+-parseInt(_0x462cf3(0x1fc))/0x7+-parseInt(_0x462cf3(0x1e6))/0x8*(parseInt(_0x462cf3(0x1f8))/0x9)+-parseInt(_0x462cf3(0x207))/0xa*(parseInt(_0x462cf3(0x1dc))/0xb);if(_0xcbc065===_0x356937)break;else _0x5bf8bf['push'](_0x5bf8bf['shift']());}catch(_0x3836ad){_0x5bf8bf['push'](_0x5bf8bf['shift']());}}}(a135_0x29f5,0xeb1d9));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a135_0x4b2f8f from'chalk';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';function a135_0x29f5(){const _0x55911d=['toLocaleString','\x20\x20Default:\x20','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','从旧配置文件升级成功','231XVnDMw','apps','setLogPath','appcode','\x20\x20appcode:\x20','1761371VrLprZ','\x20api\x20pull\x27','Invalid\x20App\x20Code','production','parse','584dkpxjT','\x20\x20Apps:\x20','✓\x20Upgraded\x20','version','yellow','log','96ibmNGB','defaultApp','string','app','../..','\x20api\x20generate\x27\x20and\x20\x27','init','175264cFRLsc','\x20→\x20.rabetbase.json','1.0.0','cyan','package.json','153981kperKA','App\x20Code\x20cannot\x20be\x20empty','green','gray','3476928OnPDmu','keys','cwd','join','初始化项目配置文件成功','env','?\x20(Old\x20file\x20→\x20*.bak)','trim','\x20workspace\x20init`\x20to\x20start\x20fresh.','bold','2212670DgCXtb','499410QVDWRV','2orpcQZ','.bak','utf8','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','Please\x20enter\x20App\x20Code:','info','908628pnmlvR'];a135_0x29f5=function(){return _0x55911d;};return a135_0x29f5();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x56f079){const _0x59c6c6=a135_0x2060,{appcode:_0x426d51,env:_0x352cdd,autoYes:_0x42b155}=_0x56f079,_0x194d23=process[_0x59c6c6(0x1fe)]();if(getProjectConfigPath())throw new Error(_0x59c6c6(0x20b));let _0x35ff94;for(const _0x31d0e5 of LEGACY_CONFIG_NAMES){const _0x24fab9=resolve(_0x194d23,_0x31d0e5);if(existsSync(_0x24fab9)){_0x35ff94=_0x24fab9;break;}}if(_0x35ff94){let _0x26678a={};try{_0x26678a=JSON[_0x59c6c6(0x1e5)](readFileSync(_0x35ff94,_0x59c6c6(0x20a)));}catch{}const _0x49927c=basename(_0x35ff94),_0x3459db=_0x26678a?.[_0x59c6c6(0x1df)]||_0x26678a?.[_0x59c6c6(0x1ef)];let _0x143dc8=_0x42b155;!_0x42b155&&(console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1ea)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a135_0x4b2f8f[_0x59c6c6(0x205)](_0x49927c))),_0x3459db&&console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1f6)](_0x59c6c6(0x1e0)+_0x3459db)),_0x143dc8=await confirm({'message':'Upgrade\x20it\x20to\x20'+a135_0x4b2f8f['bold']('.rabetbase.json')+_0x59c6c6(0x202),'default':!![]}));if(!_0x143dc8){console[_0x59c6c6(0x1eb)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x59c6c6(0x204));return;}const _0x3e9230=resolve(_0x194d23,NEW_CONFIG_NAME),_0x18b09d=getCliVersionFromPkg(),_0x2e5b9e=readRawConfig(),_0x1d1b6=_0x426d51||(typeof _0x26678a?.[_0x59c6c6(0x1df)]===_0x59c6c6(0x1ee)?_0x26678a[_0x59c6c6(0x1df)]:undefined)||(typeof _0x26678a?.['app']===_0x59c6c6(0x1ee)?_0x26678a[_0x59c6c6(0x1ef)]:undefined)||await askAppcode(),_0x1c2c48=typeof _0x26678a?.[_0x59c6c6(0x201)]===_0x59c6c6(0x1ee)?_0x26678a[_0x59c6c6(0x201)]:typeof _0x2e5b9e[_0x59c6c6(0x201)]===_0x59c6c6(0x1ee)?_0x2e5b9e[_0x59c6c6(0x201)]:_0x59c6c6(0x1e4),_0x55123f=buildCanonicalProjectConfig({..._0x2e5b9e,..._0x26678a},{'appCodes':[_0x1d1b6],'env':_0x1c2c48,'metadata':{'version':_0x18b09d,'migratedAt':new Date()[_0x59c6c6(0x1d7)](),'migratedFrom':_0x35ff94}});writeConfigFile(_0x3e9230,_0x55123f);const _0x17375b=_0x35ff94+_0x59c6c6(0x209);renameSync(_0x35ff94,_0x17375b),logger[_0x59c6c6(0x1de)](_0x194d23),logger[_0x59c6c6(0x1d5)](_0x59c6c6(0x1f2),_0x59c6c6(0x1db),{'from':_0x35ff94,'to':_0x3e9230,'appcode':_0x1d1b6,'env':_0x55123f[_0x59c6c6(0x201)]}),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1fa)](_0x59c6c6(0x1e8)+_0x49927c+_0x59c6c6(0x1f4))),console['log'](a135_0x4b2f8f['cyan']('\x20\x20Apps:\x20'+Object['keys'](_0x55123f[_0x59c6c6(0x1dd)]||{})['join'](',\x20'))),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1f6)](_0x59c6c6(0x1d8)+_0x55123f['defaultApp'])),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1fb)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x49927c+_0x59c6c6(0x209)));return;}const _0x4ae277=_0x426d51||await askAppcode(),_0x376244=resolve(_0x194d23,NEW_CONFIG_NAME),_0x4bcfc7=getCliVersionFromPkg(),_0x22c24d=readRawConfig(),_0x494011=typeof _0x22c24d[_0x59c6c6(0x201)]===_0x59c6c6(0x1ee)?_0x22c24d[_0x59c6c6(0x201)]:undefined,_0x31799c=buildCanonicalProjectConfig({},{'appCodes':[_0x4ae277],'env':_0x352cdd||_0x494011||_0x59c6c6(0x1e4),'metadata':{'version':_0x4bcfc7,'createdAt':new Date()[_0x59c6c6(0x1d7)]()}});writeConfigFile(_0x376244,_0x31799c),logger[_0x59c6c6(0x1de)](_0x194d23),logger['info']('init',_0x59c6c6(0x200),{'appcode':_0x4ae277,'env':_0x31799c[_0x59c6c6(0x201)],'version':_0x31799c[_0x59c6c6(0x1e9)],'configPath':_0x376244}),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1fa)](_0x59c6c6(0x1da))),console[_0x59c6c6(0x1eb)](a135_0x4b2f8f[_0x59c6c6(0x1f6)](_0x59c6c6(0x1e7)+Object[_0x59c6c6(0x1fd)](_0x31799c[_0x59c6c6(0x1dd)]||{})[_0x59c6c6(0x1ff)](',\x20'))),console['log'](a135_0x4b2f8f[_0x59c6c6(0x1f6)](_0x59c6c6(0x1d8)+_0x31799c[_0x59c6c6(0x1ed)])),console[_0x59c6c6(0x1eb)](_0x59c6c6(0x1d9)+CLI_BIN_NAME+_0x59c6c6(0x1f1)+CLI_BIN_NAME+_0x59c6c6(0x1e2));}function askAppcode(){const _0xa86cb9=a135_0x2060;return input({'message':_0xa86cb9(0x1d4),'validate':_0x59f557=>{const _0x5e8d7c=_0xa86cb9;if(!_0x59f557['trim']())return _0x5e8d7c(0x1f9);const {valid:_0xca9cea,message:_0x2ba9bd}=validateAppcode(_0x59f557[_0x5e8d7c(0x203)]());return _0xca9cea||_0x2ba9bd||_0x5e8d7c(0x1e3);}});}function a135_0x2060(_0x515905,_0x416073){_0x515905=_0x515905-0x1d4;const _0x29f5c4=a135_0x29f5();let _0x206076=_0x29f5c4[_0x515905];return _0x206076;}function getCliVersionFromPkg(){const _0x2e299b=a135_0x2060;try{const _0x2d824d=fileURLToPath(import.meta.url),_0x368d46=resolve(dirname(_0x2d824d),_0x2e299b(0x1f0)),_0x562d1f=JSON[_0x2e299b(0x1e5)](readFileSync(resolve(_0x368d46,_0x2e299b(0x1f7)),'utf8'));return _0x562d1f['version']||_0x2e299b(0x1f5);}catch{return _0x2e299b(0x1f5);}}
1
+ (function(_0x4b1087,_0x18fa97){const _0x2e0f39=a135_0x276a,_0x11cd9b=_0x4b1087();while(!![]){try{const _0x1e0b22=-parseInt(_0x2e0f39(0x8d))/0x1+-parseInt(_0x2e0f39(0xa3))/0x2+-parseInt(_0x2e0f39(0x84))/0x3+-parseInt(_0x2e0f39(0xad))/0x4*(-parseInt(_0x2e0f39(0x92))/0x5)+parseInt(_0x2e0f39(0x95))/0x6+-parseInt(_0x2e0f39(0x9a))/0x7+parseInt(_0x2e0f39(0x78))/0x8*(parseInt(_0x2e0f39(0x9e))/0x9);if(_0x1e0b22===_0x18fa97)break;else _0x11cd9b['push'](_0x11cd9b['shift']());}catch(_0x4ba8ba){_0x11cd9b['push'](_0x11cd9b['shift']());}}}(a135_0x3e9e,0x50277));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a135_0x1f7b43 from'chalk';function a135_0x3e9e(){const _0x23b6f7=['3204590ZvRjbH','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','package.json','3302910pIcKfL','../..','cwd','env','cyan','2016294MfPMzV','info','string','production','22689cmaxhl','.rabetbase.json','.bak','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','green','338808yfUewj','utf8','yellow','Migration\x20cancelled.\x20Run\x20`','parse','trim','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','初始化项目配置文件成功','setLogPath','log','4XDAgEn','1336WGDWGH','toLocaleString','\x20api\x20generate\x27\x20and\x20\x27','version','\x20\x20Default:\x20','\x20→\x20.rabetbase.json','Please\x20enter\x20App\x20Code:','init','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','appcode','\x20\x20appcode:\x20','join','1570395jVnBBW','app','bold','\x20\x20Apps:\x20','1.0.0','\x20workspace\x20init`\x20to\x20start\x20fresh.','✓\x20Upgraded\x20','keys','apps','303188TwoffO','gray','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','defaultApp','Invalid\x20App\x20Code'];a135_0x3e9e=function(){return _0x23b6f7;};return a135_0x3e9e();}import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a135_0x276a(_0x208f83,_0x31ceab){_0x208f83=_0x208f83-0x78;const _0x3e9ecd=a135_0x3e9e();let _0x276a2d=_0x3e9ecd[_0x208f83];return _0x276a2d;}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(_0x49407c){const _0x48a1bf=a135_0x276a,{appcode:_0x4f49ff,env:_0x242513,autoYes:_0x287116}=_0x49407c,_0x8c6f3c=process[_0x48a1bf(0x97)]();if(getProjectConfigPath())throw new Error(_0x48a1bf(0xa9));let _0x32b27f;for(const _0x4c9b28 of LEGACY_CONFIG_NAMES){const _0x402fe1=resolve(_0x8c6f3c,_0x4c9b28);if(existsSync(_0x402fe1)){_0x32b27f=_0x402fe1;break;}}if(_0x32b27f){let _0x12f142={};try{_0x12f142=JSON['parse'](readFileSync(_0x32b27f,_0x48a1bf(0xa4)));}catch{}const _0x2a6362=basename(_0x32b27f),_0x18c7c9=_0x12f142?.[_0x48a1bf(0x81)]||_0x12f142?.[_0x48a1bf(0x85)];let _0x56c0c6=_0x287116;!_0x287116&&(console['log'](a135_0x1f7b43[_0x48a1bf(0xa5)](_0x48a1bf(0xa1)+a135_0x1f7b43[_0x48a1bf(0x86)](_0x2a6362))),_0x18c7c9&&console[_0x48a1bf(0xac)](a135_0x1f7b43[_0x48a1bf(0x99)](_0x48a1bf(0x82)+_0x18c7c9)),_0x56c0c6=await confirm({'message':'Upgrade\x20it\x20to\x20'+a135_0x1f7b43['bold'](_0x48a1bf(0x9f))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x56c0c6){console[_0x48a1bf(0xac)](_0x48a1bf(0xa6)+CLI_BIN_NAME+_0x48a1bf(0x89));return;}const _0x2c2854=resolve(_0x8c6f3c,NEW_CONFIG_NAME),_0x16fa7b=getCliVersionFromPkg(),_0x228082=readRawConfig(),_0x538e9a=_0x4f49ff||(typeof _0x12f142?.[_0x48a1bf(0x81)]===_0x48a1bf(0x9c)?_0x12f142[_0x48a1bf(0x81)]:undefined)||(typeof _0x12f142?.[_0x48a1bf(0x85)]===_0x48a1bf(0x9c)?_0x12f142[_0x48a1bf(0x85)]:undefined)||await askAppcode(),_0x400229=typeof _0x12f142?.['env']===_0x48a1bf(0x9c)?_0x12f142[_0x48a1bf(0x98)]:typeof _0x228082[_0x48a1bf(0x98)]===_0x48a1bf(0x9c)?_0x228082[_0x48a1bf(0x98)]:_0x48a1bf(0x9d),_0x22972b=buildCanonicalProjectConfig({..._0x228082,..._0x12f142},{'appCodes':[_0x538e9a],'env':_0x400229,'metadata':{'version':_0x16fa7b,'migratedAt':new Date()[_0x48a1bf(0x79)](),'migratedFrom':_0x32b27f}});writeConfigFile(_0x2c2854,_0x22972b);const _0x2cab8a=_0x32b27f+'.bak';renameSync(_0x32b27f,_0x2cab8a),logger[_0x48a1bf(0xab)](_0x8c6f3c),logger['info'](_0x48a1bf(0x7f),'从旧配置文件升级成功',{'from':_0x32b27f,'to':_0x2c2854,'appcode':_0x538e9a,'env':_0x22972b[_0x48a1bf(0x98)]}),console['log'](a135_0x1f7b43[_0x48a1bf(0xa2)](_0x48a1bf(0x8a)+_0x2a6362+_0x48a1bf(0x7d))),console[_0x48a1bf(0xac)](a135_0x1f7b43['cyan']('\x20\x20Apps:\x20'+Object[_0x48a1bf(0x8b)](_0x22972b[_0x48a1bf(0x8c)]||{})[_0x48a1bf(0x83)](',\x20'))),console[_0x48a1bf(0xac)](a135_0x1f7b43[_0x48a1bf(0x99)](_0x48a1bf(0x7c)+_0x22972b[_0x48a1bf(0x90)])),console[_0x48a1bf(0xac)](a135_0x1f7b43[_0x48a1bf(0x8e)](_0x48a1bf(0x93)+_0x2a6362+_0x48a1bf(0xa0)));return;}const _0x5d1bae=_0x4f49ff||await askAppcode(),_0x4d27ee=resolve(_0x8c6f3c,NEW_CONFIG_NAME),_0x2e68cc=getCliVersionFromPkg(),_0xe5524d=readRawConfig(),_0x108936=typeof _0xe5524d['env']==='string'?_0xe5524d[_0x48a1bf(0x98)]:undefined,_0x578785=buildCanonicalProjectConfig({},{'appCodes':[_0x5d1bae],'env':_0x242513||_0x108936||'production','metadata':{'version':_0x2e68cc,'createdAt':new Date()[_0x48a1bf(0x79)]()}});writeConfigFile(_0x4d27ee,_0x578785),logger[_0x48a1bf(0xab)](_0x8c6f3c),logger[_0x48a1bf(0x9b)](_0x48a1bf(0x7f),_0x48a1bf(0xaa),{'appcode':_0x5d1bae,'env':_0x578785[_0x48a1bf(0x98)],'version':_0x578785[_0x48a1bf(0x7b)],'configPath':_0x4d27ee}),console[_0x48a1bf(0xac)](a135_0x1f7b43[_0x48a1bf(0xa2)](_0x48a1bf(0x8f))),console[_0x48a1bf(0xac)](a135_0x1f7b43['cyan'](_0x48a1bf(0x87)+Object[_0x48a1bf(0x8b)](_0x578785[_0x48a1bf(0x8c)]||{})[_0x48a1bf(0x83)](',\x20'))),console['log'](a135_0x1f7b43[_0x48a1bf(0x99)](_0x48a1bf(0x7c)+_0x578785[_0x48a1bf(0x90)])),console[_0x48a1bf(0xac)](_0x48a1bf(0x80)+CLI_BIN_NAME+_0x48a1bf(0x7a)+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x509c06=a135_0x276a;return input({'message':_0x509c06(0x7e),'validate':_0x506bdb=>{const _0x942d4=_0x509c06;if(!_0x506bdb[_0x942d4(0xa8)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x313762,message:_0x41613f}=validateAppcode(_0x506bdb[_0x942d4(0xa8)]());return _0x313762||_0x41613f||_0x942d4(0x91);}});}function getCliVersionFromPkg(){const _0x131a31=a135_0x276a;try{const _0x2e5030=fileURLToPath(import.meta.url),_0xbd7008=resolve(dirname(_0x2e5030),_0x131a31(0x96)),_0x57ae75=JSON[_0x131a31(0xa7)](readFileSync(resolve(_0xbd7008,_0x131a31(0x94)),_0x131a31(0xa4)));return _0x57ae75['version']||_0x131a31(0x88);}catch{return _0x131a31(0x88);}}
@@ -1 +1 @@
1
- const a136_0x1eca33=a136_0x2a8a;(function(_0xb49438,_0x3a8f7c){const _0x5382bf=a136_0x2a8a,_0x5bd076=_0xb49438();while(!![]){try{const _0x166375=-parseInt(_0x5382bf(0x183))/0x1*(parseInt(_0x5382bf(0x11e))/0x2)+-parseInt(_0x5382bf(0x154))/0x3+parseInt(_0x5382bf(0x155))/0x4*(parseInt(_0x5382bf(0x19d))/0x5)+parseInt(_0x5382bf(0x170))/0x6*(-parseInt(_0x5382bf(0x176))/0x7)+parseInt(_0x5382bf(0x17f))/0x8*(-parseInt(_0x5382bf(0x149))/0x9)+parseInt(_0x5382bf(0x166))/0xa*(parseInt(_0x5382bf(0x125))/0xb)+parseInt(_0x5382bf(0x138))/0xc*(parseInt(_0x5382bf(0x195))/0xd);if(_0x166375===_0x3a8f7c)break;else _0x5bd076['push'](_0x5bd076['shift']());}catch(_0x43d988){_0x5bd076['push'](_0x5bd076['shift']());}}}(a136_0x15ed,0x37ed1));import a136_0xf079f0 from'chalk';import a136_0x2c2eb8 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[a136_0x1eca33(0x18f)](_0x1934bc=>_0x1934bc!==NEW_CONFIG_NAME);function a136_0x15ed(){const _0x11cd8e=['info','fail','\x20→\x20','isArray','.cursor/rules/lovrabet_rules.mdc','some','Remove\x20old\x20skill','exit\x20','\x20→\x20latest','oldArtifacts','white','189110FhMsdo','.lovrabet','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','includes','entries','Step\x204/7:\x20MCP\x20config\x20—\x20','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','failed','red','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','174XRbEow','sdkUpgrade','cyan','package.json','fields','join','22715nwxOtv','FAIL','not\x20found\x20(will\x20create)','bold','log','files','object','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','MCP\x20config:','2985624ESpRZz','.claude/skills/lovrabet','mcpServers','push','1eciRFS','inherit','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','@lovrabet/dataset-mcp-server','lovrabet/rabetbase','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','oldMcpConfig','oldPath','none\x20found','hasNewConfig','configMigration','===\x20Upgrade\x20Summary\x20===','filter','yellow','yes','not\x20found\x20or\x20already\x20at\x20latest','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20\x20Action:\x20delete','5134766EAYnZP','@lovrabet/sdk:','keys','Step\x201/7:\x20Migrating\x20config...','Upgrade\x20@lovrabet/sdk','cwd','skipped\x20(no\x20legacy\x20config)','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','90290bmxPjs','lovrabet/rabetbase\x20installed\x20globally','Install\x20new\x20skill','Skill\x20swap:','string','Legacy\x20artifacts:','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','isDirectory','\x20removed','Config\x20file:','344870gryjKk','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Clean\x20MCP\x20config','Config\x20migration','stringify','\x20→\x20keys:\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','209uEZvDH','needed','detail','error','\x20\x20bun\x20install','already\x20exists\x20(will\x20merge)','gray','succeed','green','path','done','length','FOUND','\x20removed\x20(','needsSkillSwap','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','message','\x20\x20#\x20or','skipped','12GhTAHP','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20\x20Step\x20','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','.bak','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','values','removed\x20','\x20\x20Current\x20version\x20in\x20','Upgrade\x20cancelled.','parse','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','latest','[\x22@lovrabet/sdk\x22]:\x20','start','9tdzlvO','devDependencies','undefined','Upgrade\x20completed\x20successfully!','===\x20Upgrade\x20Analysis\x20===','\x20(backup:\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','utf8','Step\x206/7:\x20Installing\x20new\x20skill...','step','args','414861UKjjZH','56VbYGhz','not\x20needed','Remove\x20.lovrabet/','no\x20legacy\x20entry','label','@lovrabet/sdk'];a136_0x15ed=function(){return _0x11cd8e;};return a136_0x15ed();}function collectIdeSkillFiles(_0x2e1c60){const _0xaabf13=a136_0x1eca33,_0x4b155d=[];for(const _0x32e475 of Object[_0xaabf13(0x13f)](CORE_IDE_CONFIGS)){if(_0x32e475[_0xaabf13(0x17b)])for(const _0x184c6d of _0x32e475[_0xaabf13(0x17b)]){_0x4b155d['push'](resolve(_0x2e1c60,_0x184c6d[_0xaabf13(0x12e)]));}}return _0x4b155d;}function analyse(_0x29ae53){const _0x4fc2f3=a136_0x1eca33;let _0x421e83=null;const _0xb9148a=resolve(_0x29ae53,NEW_CONFIG_NAME),_0x9e4bb5=existsSync(_0xb9148a);for(const _0x3c3812 of LEGACY_CONFIG_NAMES){const _0x49dbdf=resolve(_0x29ae53,_0x3c3812);if(existsSync(_0x49dbdf)){const _0x3f098f=readConfigFile(_0x49dbdf),_0x28f761=Object[_0x4fc2f3(0x197)](_0x3f098f)[_0x4fc2f3(0x18f)](_0x9396e3=>typeof _0x3f098f[_0x9396e3]!==_0x4fc2f3(0x14b));_0x421e83={'oldPath':_0x49dbdf,'hasNewConfig':_0x9e4bb5,'fields':_0x28f761};break;}}const _0x19f875=[],_0x276b6b=resolve(_0x29ae53,'.lovrabet');if(existsSync(_0x276b6b))_0x19f875['push'](_0x276b6b);const _0x67f9a4=resolve(_0x29ae53,_0x4fc2f3(0x15f));if(existsSync(_0x67f9a4))_0x19f875[_0x4fc2f3(0x182)](_0x67f9a4);const _0x5013eb=resolve(_0x29ae53,_0x4fc2f3(0x180));if(existsSync(_0x5013eb))_0x19f875['push'](_0x5013eb);for(const _0x57be05 of collectIdeSkillFiles(_0x29ae53)){if(existsSync(_0x57be05))_0x19f875['push'](_0x57be05);}let _0x35bbc3=null;const _0x42dfa1=resolve(_0x29ae53,'.cursor/mcp.json');if(existsSync(_0x42dfa1))try{const _0x4afbf8=JSON[_0x4fc2f3(0x143)](readFileSync(_0x42dfa1,_0x4fc2f3(0x150)));if(_0x4afbf8?.[_0x4fc2f3(0x181)]&&typeof _0x4afbf8[_0x4fc2f3(0x181)]===_0x4fc2f3(0x17c)){const _0x3dfee3=[];for(const [_0x391e95,_0x38e6d2]of Object[_0x4fc2f3(0x16a)](_0x4afbf8[_0x4fc2f3(0x181)])){const _0x5c1730=_0x38e6d2;_0x5c1730?.[_0x4fc2f3(0x153)]&&Array['isArray'](_0x5c1730['args'])&&_0x5c1730[_0x4fc2f3(0x153)][_0x4fc2f3(0x160)](_0x3a307b=>typeof _0x3a307b==='string'&&_0x3a307b[_0x4fc2f3(0x169)](_0x4fc2f3(0x186)))&&_0x3dfee3[_0x4fc2f3(0x182)](_0x391e95);}_0x3dfee3[_0x4fc2f3(0x130)]>0x0&&(_0x35bbc3={'path':_0x42dfa1,'keys':_0x3dfee3});}}catch{}const _0x262c8c=_0x19f875[_0x4fc2f3(0x130)]>0x0||_0x421e83!==null;let _0x196b68=null;const _0x4e452c=resolve(_0x29ae53,_0x4fc2f3(0x173));if(existsSync(_0x4e452c))try{const _0x291b3c=JSON['parse'](readFileSync(_0x4e452c,_0x4fc2f3(0x150)));for(const _0x45e804 of['dependencies',_0x4fc2f3(0x14a)]){const _0x91685=_0x291b3c?.[_0x45e804]?.[_0x4fc2f3(0x15a)];if(typeof _0x91685===_0x4fc2f3(0x1a1)){_0x91685!==_0x4fc2f3(0x146)&&(_0x196b68={'pkgPath':_0x4e452c,'currentVersion':_0x91685,'field':_0x45e804});break;}}}catch{}return{'configMigration':_0x421e83,'oldArtifacts':_0x19f875,'oldMcpConfig':_0x35bbc3,'needsSkillSwap':_0x262c8c,'sdkUpgrade':_0x196b68};}function a136_0x2a8a(_0x1dc0a1,_0x2db43a){_0x1dc0a1=_0x1dc0a1-0x119;const _0x15ed59=a136_0x15ed();let _0x2a8a70=_0x15ed59[_0x1dc0a1];return _0x2a8a70;}function printReport(_0x3b644b){const _0x4f0f3=a136_0x1eca33,{configMigration:_0x44ac84,oldArtifacts:_0x194681,oldMcpConfig:_0x3fd9f8,needsSkillSwap:_0x56c9d5}=_0x3b644b;console[_0x4f0f3(0x17a)](''),console[_0x4f0f3(0x17a)](a136_0xf079f0['bold'](_0x4f0f3(0x14d))),console[_0x4f0f3(0x17a)]('');_0x44ac84?(console['log'](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x11d))+('\x20\x20'+a136_0xf079f0[_0x4f0f3(0x190)](_0x44ac84['oldPath']))),console[_0x4f0f3(0x17a)](_0x4f0f3(0x14f)+(_0x44ac84[_0x4f0f3(0x18c)]?a136_0xf079f0[_0x4f0f3(0x12d)](_0x4f0f3(0x12a)):a136_0xf079f0[_0x4f0f3(0x12b)](_0x4f0f3(0x178)))),console['log']('\x20\x20Fields\x20to\x20migrate:\x20'+_0x44ac84[_0x4f0f3(0x174)][_0x4f0f3(0x175)](',\x20')),console[_0x4f0f3(0x17a)](_0x4f0f3(0x145))):console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x11d))+'\x20\x20'+a136_0xf079f0[_0x4f0f3(0x12b)]('no\x20legacy\x20config\x20found'));console['log']('');if(_0x194681[_0x4f0f3(0x130)]>0x0){console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)]('Legacy\x20artifacts:'));for(const _0x5ea8d7 of _0x194681){console[_0x4f0f3(0x17a)]('\x20\x20'+a136_0xf079f0[_0x4f0f3(0x16e)](_0x4f0f3(0x131))+'\x20\x20'+_0x5ea8d7);}console['log'](_0x4f0f3(0x194));}else console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x119))+'\x20\x20'+a136_0xf079f0[_0x4f0f3(0x12b)](_0x4f0f3(0x18b)));console[_0x4f0f3(0x17a)]('');_0x3fd9f8?(console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x17e))+('\x20\x20'+a136_0xf079f0[_0x4f0f3(0x190)](_0x3fd9f8[_0x4f0f3(0x12e)])+_0x4f0f3(0x123)+_0x3fd9f8[_0x4f0f3(0x197)][_0x4f0f3(0x175)](',\x20'))),console['log'](_0x4f0f3(0x19c))):console[_0x4f0f3(0x17a)](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x17e))+'\x20\x20'+a136_0xf079f0[_0x4f0f3(0x12b)](_0x4f0f3(0x158)));console[_0x4f0f3(0x17a)](''),console[_0x4f0f3(0x17a)](a136_0xf079f0['cyan'](_0x4f0f3(0x1a0))+('\x20\x20'+(_0x56c9d5?a136_0xf079f0['yellow'](_0x4f0f3(0x126)):a136_0xf079f0['green'](_0x4f0f3(0x156)))));_0x56c9d5&&console[_0x4f0f3(0x17a)](_0x4f0f3(0x144)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x4f0f3(0x17a)]('');if(_0x3b644b[_0x4f0f3(0x171)]){const {currentVersion:_0x561084,field:_0x4971b0,pkgPath:_0x248492}=_0x3b644b['sdkUpgrade'];console['log'](a136_0xf079f0[_0x4f0f3(0x172)](_0x4f0f3(0x196))+('\x20\x20'+a136_0xf079f0[_0x4f0f3(0x190)](_0x248492))),console[_0x4f0f3(0x17a)](_0x4f0f3(0x141)+_0x4971b0+':\x20'+a136_0xf079f0[_0x4f0f3(0x190)](_0x561084)+'\x20→\x20'+a136_0xf079f0['green'](_0x4f0f3(0x146))),console[_0x4f0f3(0x17a)](_0x4f0f3(0x188));}else console['log'](a136_0xf079f0['cyan']('@lovrabet/sdk:')+'\x20\x20'+a136_0xf079f0[_0x4f0f3(0x12b)](_0x4f0f3(0x192)));console[_0x4f0f3(0x17a)]('');}function execConfigMigration(_0x170fbc,_0x315737){const _0x439995=a136_0x1eca33,{configMigration:_0x3d0d28}=_0x170fbc;if(!_0x3d0d28?.[_0x439995(0x18a)])return{'step':0x1,'label':_0x439995(0x121),'ok':!![],'detail':_0x439995(0x19b)};const _0x3f000a=readConfigFile(_0x3d0d28[_0x439995(0x18a)]),_0x591c6f=resolve(_0x315737,NEW_CONFIG_NAME),_0x23e508=_0x3d0d28[_0x439995(0x18c)]?readConfigFile(_0x591c6f):{};for(const [_0x1e9414,_0x367b55]of Object[_0x439995(0x16a)](_0x3f000a)){!(_0x1e9414 in _0x23e508)&&(_0x23e508[_0x1e9414]=_0x367b55);}writeConfigFile(_0x591c6f,_0x23e508);const _0x407da1=_0x3d0d28['oldPath']+_0x439995(0x13d);return renameSync(_0x3d0d28[_0x439995(0x18a)],_0x407da1),{'step':0x1,'label':_0x439995(0x121),'ok':!![],'detail':_0x3d0d28[_0x439995(0x18a)]+_0x439995(0x15d)+_0x591c6f+_0x439995(0x14e)+_0x407da1+')'};}function execRemoveOldArtifacts(_0x3e6517){const _0x2d764f=a136_0x1eca33,_0x560c41=[];for(const _0x1154ee of _0x3e6517){try{if(!existsSync(_0x1154ee))continue;const _0x3b6139=tryStat(_0x1154ee);_0x3b6139?.[_0x2d764f(0x11b)]()?rmSync(_0x1154ee,{'recursive':!![],'force':!![]}):unlinkSync(_0x1154ee);}catch(_0x190f60){_0x560c41[_0x2d764f(0x182)](_0x1154ee+':\x20'+_0x190f60[_0x2d764f(0x135)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x560c41[_0x2d764f(0x130)]===0x0,'detail':_0x560c41[_0x2d764f(0x130)]>0x0?_0x3e6517[_0x2d764f(0x130)]-_0x560c41[_0x2d764f(0x130)]+'/'+_0x3e6517[_0x2d764f(0x130)]+_0x2d764f(0x132)+_0x560c41[_0x2d764f(0x175)](';\x20')+')':_0x3e6517['length']+_0x2d764f(0x11c)};}function execCleanMcp(_0x478703){const _0x2aa3ac=a136_0x1eca33;if(!_0x478703[_0x2aa3ac(0x189)])return{'step':0x4,'label':_0x2aa3ac(0x120),'ok':!![],'detail':_0x2aa3ac(0x137)};try{const _0x58a9ad=readFileSync(_0x478703[_0x2aa3ac(0x189)]['path'],'utf8'),_0x4acf17=JSON[_0x2aa3ac(0x143)](_0x58a9ad);if(_0x4acf17?.['mcpServers']&&typeof _0x4acf17[_0x2aa3ac(0x181)]==='object'){const _0x206d5c=[];for(const [_0x16e847,_0x3e5076]of Object[_0x2aa3ac(0x16a)](_0x4acf17[_0x2aa3ac(0x181)])){_0x3e5076?.['args']&&Array[_0x2aa3ac(0x15e)](_0x3e5076[_0x2aa3ac(0x153)])&&_0x3e5076[_0x2aa3ac(0x153)][_0x2aa3ac(0x160)](_0x48cf0d=>typeof _0x48cf0d===_0x2aa3ac(0x1a1)&&_0x48cf0d[_0x2aa3ac(0x169)](_0x2aa3ac(0x186)))&&_0x206d5c[_0x2aa3ac(0x182)](_0x16e847);}for(const _0x90847a of _0x206d5c){delete _0x4acf17[_0x2aa3ac(0x181)][_0x90847a];}return _0x206d5c[_0x2aa3ac(0x130)]>0x0&&writeFileSync(_0x478703[_0x2aa3ac(0x189)]['path'],JSON[_0x2aa3ac(0x122)](_0x4acf17,null,0x2)+'\x0a',_0x2aa3ac(0x150)),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x2aa3ac(0x140)+_0x206d5c[_0x2aa3ac(0x175)](',\x20')+'\x20from\x20'+_0x478703['oldMcpConfig']['path']};}return{'step':0x4,'label':_0x2aa3ac(0x120),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x4f133b){return{'step':0x4,'label':_0x2aa3ac(0x120),'ok':![],'detail':_0x4f133b['message']};}}function execSkillsRemove(_0x415639,_0x24c210){const _0x266826=a136_0x1eca33,_0x2268db=runNpxSkillsRemove(_0x415639,{'stdio':_0x266826(0x184),'yes':_0x24c210});return{'step':0x5,'label':_0x266826(0x161),'ok':_0x2268db['ok'],'detail':_0x2268db['ok']?'lovrabet/lovrabet-skill\x20removed':_0x2268db[_0x266826(0x128)]??_0x266826(0x162)+_0x2268db['status']};}function execSkillsAdd(_0x46d99c,_0xa1a9aa){const _0x50ee03=a136_0x1eca33,_0x373d2b=runNpxSkillsAddGlobal(_0x46d99c,_0x50ee03(0x187),{'stdio':'inherit','yes':_0xa1a9aa});return{'step':0x6,'label':_0x50ee03(0x19f),'ok':_0x373d2b['ok'],'detail':_0x373d2b['ok']?_0x50ee03(0x19e):_0x373d2b['error']??_0x50ee03(0x162)+_0x373d2b['status']};}function execUpgradeSdk(_0x3d0a95){const _0x1092a3=a136_0x1eca33;if(!_0x3d0a95['sdkUpgrade'])return{'step':0x7,'label':_0x1092a3(0x199),'ok':!![],'detail':_0x1092a3(0x11f)};const {pkgPath:_0x593778,currentVersion:_0x13c3f6,field:_0x5e055e}=_0x3d0a95[_0x1092a3(0x171)];try{const _0x96477=readFileSync(_0x593778,'utf8'),_0x5b3ea8=JSON[_0x1092a3(0x143)](_0x96477);return _0x5b3ea8[_0x5e055e][_0x1092a3(0x15a)]=_0x1092a3(0x146),writeFileSync(_0x593778,JSON[_0x1092a3(0x122)](_0x5b3ea8,null,0x2)+'\x0a',_0x1092a3(0x150)),{'step':0x7,'label':_0x1092a3(0x199),'ok':!![],'detail':_0x5e055e+_0x1092a3(0x147)+_0x13c3f6+_0x1092a3(0x163)};}catch(_0x116ee3){return{'step':0x7,'label':_0x1092a3(0x199),'ok':![],'detail':_0x116ee3[_0x1092a3(0x135)]};}}function tryStat(_0x495cfd){try{return statSync(_0x495cfd);}catch{return undefined;}}function printSummary(_0xbe3925){const _0x3ea50a=a136_0x1eca33;console[_0x3ea50a(0x17a)](''),console['log'](a136_0xf079f0[_0x3ea50a(0x179)](_0x3ea50a(0x18e))),console['log']('');for(const _0x551047 of _0xbe3925){const _0x32e9b6=_0x551047['ok']?a136_0xf079f0[_0x3ea50a(0x12d)]('OK'):a136_0xf079f0[_0x3ea50a(0x16e)](_0x3ea50a(0x177));console[_0x3ea50a(0x17a)]('\x20\x20'+_0x32e9b6+_0x3ea50a(0x13a)+_0x551047[_0x3ea50a(0x152)]+':\x20'+_0x551047[_0x3ea50a(0x159)]);if(_0x551047[_0x3ea50a(0x127)])console[_0x3ea50a(0x17a)]('\x20\x20\x20\x20\x20\x20\x20'+a136_0xf079f0[_0x3ea50a(0x12b)](_0x551047[_0x3ea50a(0x127)]));}console[_0x3ea50a(0x17a)]('');}export async function upgradeApp(_0x362b16,_0xbaa820){const _0x25068e=a136_0x1eca33,_0x3cad5b=process[_0x25068e(0x19a)](),_0x47add5=analyse(_0x3cad5b),_0x37f3c9=!_0x47add5[_0x25068e(0x18d)]&&_0x47add5['oldArtifacts']['length']===0x0&&!_0x47add5[_0x25068e(0x189)]&&!_0x47add5[_0x25068e(0x133)]&&!_0x47add5[_0x25068e(0x171)];if(_0x37f3c9){console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x12d)](_0x25068e(0x13b)));return;}printReport(_0x47add5);const _0x3ddcee=!!(_0xbaa820[_0x25068e(0x191)]||_0xbaa820['Y']||_0x362b16);if(!_0x3ddcee)try{const _0x511c83=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x511c83){console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x12b)](_0x25068e(0x142)));return;}}catch(_0x2e5b00){if(_0x2e5b00?.[_0x25068e(0x135)]==='CANCEL'){console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x12b)](_0x25068e(0x142)));return;}throw _0x2e5b00;}const _0xe78a0c=[],_0x474340=a136_0x2c2eb8({'text':_0x25068e(0x198),'color':_0x25068e(0x172)})['start'](),_0x4bc40a=execConfigMigration(_0x47add5,_0x3cad5b);_0xe78a0c[_0x25068e(0x182)](_0x4bc40a),_0x474340[_0x4bc40a['ok']?_0x25068e(0x12c):_0x25068e(0x15c)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x4bc40a[_0x25068e(0x127)]??(_0x4bc40a['ok']?_0x25068e(0x12f):_0x25068e(0x16d))));const _0x147696=resolve(_0x3cad5b,_0x25068e(0x167)),_0x492134=a136_0x2c2eb8({'text':_0x25068e(0x11a),'color':'cyan'})[_0x25068e(0x148)]();if(existsSync(_0x147696))try{rmSync(_0x147696,{'recursive':!![],'force':!![]}),_0x492134[_0x25068e(0x12c)](_0x25068e(0x185)),_0xe78a0c[_0x25068e(0x182)]({'step':0x2,'label':_0x25068e(0x157),'ok':!![]});}catch(_0x182413){_0x492134[_0x25068e(0x15c)](_0x25068e(0x134)+_0x182413[_0x25068e(0x135)]),_0xe78a0c[_0x25068e(0x182)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x182413[_0x25068e(0x135)]});}else _0x492134[_0x25068e(0x15b)](_0x25068e(0x16f)),_0xe78a0c[_0x25068e(0x182)]({'step':0x2,'label':_0x25068e(0x157),'ok':!![],'detail':'skipped'});const _0xf44a59=a136_0x2c2eb8({'text':_0x25068e(0x193),'color':_0x25068e(0x172)})['start'](),_0x395ef0=execRemoveOldArtifacts(_0x47add5[_0x25068e(0x164)]);_0xe78a0c['push'](_0x395ef0),_0xf44a59[_0x395ef0['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x13c)+(_0x395ef0[_0x25068e(0x127)]??(_0x395ef0['ok']?_0x25068e(0x12f):_0x25068e(0x16d))));const _0x1aec14=a136_0x2c2eb8({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':'cyan'})[_0x25068e(0x148)](),_0x40d984=execCleanMcp(_0x47add5);_0xe78a0c['push'](_0x40d984),_0x1aec14[_0x40d984['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x16b)+(_0x40d984[_0x25068e(0x127)]??(_0x40d984['ok']?'done':_0x25068e(0x16d))));const _0x3d6c7a=a136_0x2c2eb8({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x25068e(0x172)})[_0x25068e(0x148)](),_0x3638ff=execSkillsRemove(_0x3cad5b,_0x3ddcee);_0xe78a0c[_0x25068e(0x182)](_0x3638ff),_0x3d6c7a[_0x3638ff['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x139)+(_0x3638ff['detail']??(_0x3638ff['ok']?_0x25068e(0x12f):_0x25068e(0x16d))));const _0x3fef18=a136_0x2c2eb8({'text':_0x25068e(0x151),'color':_0x25068e(0x172)})[_0x25068e(0x148)](),_0x1b6521=execSkillsAdd(_0x3cad5b,_0x3ddcee);_0xe78a0c['push'](_0x1b6521),_0x3fef18[_0x1b6521['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x124)+(_0x1b6521[_0x25068e(0x127)]??(_0x1b6521['ok']?_0x25068e(0x12f):'failed')));const _0x5f54e6=a136_0x2c2eb8({'text':_0x25068e(0x17d),'color':'cyan'})[_0x25068e(0x148)](),_0x330325=execUpgradeSdk(_0x47add5);_0xe78a0c['push'](_0x330325),_0x5f54e6[_0x330325['ok']?_0x25068e(0x12c):_0x25068e(0x15c)](_0x25068e(0x13e)+(_0x330325['detail']??(_0x330325['ok']?_0x25068e(0x12f):'failed'))),printSummary(_0xe78a0c);const _0x22b59d=_0xe78a0c[_0x25068e(0x160)](_0x302ca2=>!_0x302ca2['ok']);_0x22b59d?console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x190)](_0x25068e(0x16c))):console['log'](a136_0xf079f0[_0x25068e(0x12d)](_0x25068e(0x14c))),_0x330325['ok']&&_0x47add5[_0x25068e(0x171)]&&(console[_0x25068e(0x17a)](''),console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x179)][_0x25068e(0x172)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a136_0xf079f0[_0x25068e(0x172)](_0x25068e(0x168))),console[_0x25068e(0x17a)](''),console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x165)]('\x20\x20npm\x20install')),console['log'](a136_0xf079f0[_0x25068e(0x165)](_0x25068e(0x136))),console[_0x25068e(0x17a)](a136_0xf079f0[_0x25068e(0x165)](_0x25068e(0x129))),console[_0x25068e(0x17a)](''));}
1
+ const a136_0x28fff2=a136_0x15cb;(function(_0x54382d,_0x2cf2c8){const _0x1c29b1=a136_0x15cb,_0x5050ca=_0x54382d();while(!![]){try{const _0x5ae206=-parseInt(_0x1c29b1(0x1d6))/0x1*(-parseInt(_0x1c29b1(0x217))/0x2)+parseInt(_0x1c29b1(0x1e7))/0x3*(-parseInt(_0x1c29b1(0x1e5))/0x4)+parseInt(_0x1c29b1(0x21e))/0x5+parseInt(_0x1c29b1(0x1d9))/0x6+-parseInt(_0x1c29b1(0x1df))/0x7+parseInt(_0x1c29b1(0x216))/0x8*(-parseInt(_0x1c29b1(0x1de))/0x9)+parseInt(_0x1c29b1(0x231))/0xa*(parseInt(_0x1c29b1(0x243))/0xb);if(_0x5ae206===_0x2cf2c8)break;else _0x5050ca['push'](_0x5050ca['shift']());}catch(_0x19cb76){_0x5050ca['push'](_0x5050ca['shift']());}}}(a136_0x2b80,0xa2083));import a136_0x4be9d9 from'chalk';import a136_0x496aa9 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';function a136_0x2b80(){const _0x19a6a4=['devDependencies','step','\x20from\x20','oldPath','no\x20legacy\x20config\x20found','white','isDirectory','Remove\x20old\x20skill','isArray','\x20→\x20keys:\x20','configMigration','info','log','stringify','filter','79039cCivhs','values','gray','683052YDdqnK','Step\x204/7:\x20Cleaning\x20MCP\x20config...','lovrabet/rabetbase','\x20\x20Action:\x20delete','Step\x206/7:\x20Installing\x20new\x20skill...','10929537dmdBXE','6429409szGlYV','detail','FOUND','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','done','Step\x205/7:\x20Removing\x20old\x20skill...','483792GElgzt','@lovrabet/dataset-mcp-server','3rjvbOa','\x20\x20npm\x20install','needed','length','inherit','lovrabet/lovrabet-skill\x20removed','path','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','undefined','.lovrabet','string','failed','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','yellow','none\x20found','green','no\x20legacy\x20entry','cwd','Config\x20file:','sdkUpgrade','\x20(backup:\x20','files','Remove\x20.lovrabet/','.cursor/rules/lovrabet_rules.mdc','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','error','bold','skipped\x20(no\x20legacy\x20config)','latest','CANCEL','\x20→\x20','skipped','\x20\x20bun\x20install','status','push','needsSkillSwap','mcpServers','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Step\x204/7:\x20MCP\x20config\x20—\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20#\x20or','fields','\x20\x20Current\x20version\x20in\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','Install\x20new\x20skill','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','8HJYokJ','24ZawOXT','Config\x20migration','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','args','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','join','.claude/skills/lovrabet','2838750jZpEkf','includes','cyan','\x20→\x20latest','lovrabet/rabetbase\x20installed\x20globally','entries','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20\x20New\x20config\x20(.rabetbase.json):\x20','message','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','no\x20matching\x20entry\x20found','Remove\x20legacy\x20artifacts','Proceed\x20with\x20upgrade?','===\x20Upgrade\x20Analysis\x20===','red','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','yes','Upgrade\x20@lovrabet/sdk','\x20\x20\x20\x20\x20\x20\x20','10mpFNLr','@lovrabet/sdk:','object','already\x20exists\x20(will\x20merge)','parse','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','oldArtifacts','some','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','.cursor/mcp.json','start','Clean\x20MCP\x20config','\x20removed\x20(','@lovrabet/sdk','oldMcpConfig','Step\x201/7:\x20Migrating\x20config...','fail','\x20\x20Step\x20','14161961qnKRjy','label','\x20\x20Fields\x20to\x20migrate:\x20','succeed','dependencies','Upgrade\x20completed\x20successfully!','\x20removed','hasNewConfig','FAIL','MCP\x20config:','utf8'];a136_0x2b80=function(){return _0x19a6a4;};return a136_0x2b80();}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a136_0x28fff2(0x1d5)](_0x283855=>_0x283855!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x9e411e){const _0x2f523e=a136_0x28fff2,_0x622588=[];for(const _0xabf3e6 of Object[_0x2f523e(0x1d7)](CORE_IDE_CONFIGS)){if(_0xabf3e6['files'])for(const _0x17e555 of _0xabf3e6[_0x2f523e(0x1fd)]){_0x622588[_0x2f523e(0x20a)](resolve(_0x9e411e,_0x17e555['path']));}}return _0x622588;}function analyse(_0x4b3967){const _0x2ce6f7=a136_0x28fff2;let _0x301e4d=null;const _0x246542=resolve(_0x4b3967,NEW_CONFIG_NAME),_0x1e598b=existsSync(_0x246542);for(const _0x2aeeb2 of LEGACY_CONFIG_NAMES){const _0x2aa795=resolve(_0x4b3967,_0x2aeeb2);if(existsSync(_0x2aa795)){const _0xd7282e=readConfigFile(_0x2aa795),_0x4e9683=Object['keys'](_0xd7282e)[_0x2ce6f7(0x1d5)](_0x551811=>typeof _0xd7282e[_0x551811]!==_0x2ce6f7(0x1f0));_0x301e4d={'oldPath':_0x2aa795,'hasNewConfig':_0x1e598b,'fields':_0x4e9683};break;}}const _0x522e62=[],_0x581d02=resolve(_0x4b3967,_0x2ce6f7(0x1f1));if(existsSync(_0x581d02))_0x522e62[_0x2ce6f7(0x20a)](_0x581d02);const _0x1185bc=resolve(_0x4b3967,_0x2ce6f7(0x1ff));if(existsSync(_0x1185bc))_0x522e62[_0x2ce6f7(0x20a)](_0x1185bc);const _0x5d081c=resolve(_0x4b3967,_0x2ce6f7(0x21d));if(existsSync(_0x5d081c))_0x522e62[_0x2ce6f7(0x20a)](_0x5d081c);for(const _0x237cef of collectIdeSkillFiles(_0x4b3967)){if(existsSync(_0x237cef))_0x522e62['push'](_0x237cef);}let _0x4112c2=null;const _0x1cddac=resolve(_0x4b3967,_0x2ce6f7(0x23a));if(existsSync(_0x1cddac))try{const _0x21d3a5=JSON[_0x2ce6f7(0x235)](readFileSync(_0x1cddac,_0x2ce6f7(0x1c6)));if(_0x21d3a5?.[_0x2ce6f7(0x20c)]&&typeof _0x21d3a5[_0x2ce6f7(0x20c)]===_0x2ce6f7(0x233)){const _0x57a33c=[];for(const [_0x74614c,_0x52f371]of Object[_0x2ce6f7(0x223)](_0x21d3a5[_0x2ce6f7(0x20c)])){const _0x547b51=_0x52f371;_0x547b51?.[_0x2ce6f7(0x21a)]&&Array[_0x2ce6f7(0x1cf)](_0x547b51[_0x2ce6f7(0x21a)])&&_0x547b51[_0x2ce6f7(0x21a)][_0x2ce6f7(0x238)](_0x1c9bf0=>typeof _0x1c9bf0==='string'&&_0x1c9bf0[_0x2ce6f7(0x21f)](_0x2ce6f7(0x1e6)))&&_0x57a33c[_0x2ce6f7(0x20a)](_0x74614c);}_0x57a33c['length']>0x0&&(_0x4112c2={'path':_0x1cddac,'keys':_0x57a33c});}}catch{}const _0x8a8fd3=_0x522e62[_0x2ce6f7(0x1ea)]>0x0||_0x301e4d!==null;let _0x46705d=null;const _0x34c2d9=resolve(_0x4b3967,'package.json');if(existsSync(_0x34c2d9))try{const _0x222808=JSON[_0x2ce6f7(0x235)](readFileSync(_0x34c2d9,_0x2ce6f7(0x1c6)));for(const _0x75e3e2 of[_0x2ce6f7(0x247),_0x2ce6f7(0x1c7)]){const _0x538668=_0x222808?.[_0x75e3e2]?.[_0x2ce6f7(0x23e)];if(typeof _0x538668===_0x2ce6f7(0x1f2)){_0x538668!==_0x2ce6f7(0x204)&&(_0x46705d={'pkgPath':_0x34c2d9,'currentVersion':_0x538668,'field':_0x75e3e2});break;}}}catch{}return{'configMigration':_0x301e4d,'oldArtifacts':_0x522e62,'oldMcpConfig':_0x4112c2,'needsSkillSwap':_0x8a8fd3,'sdkUpgrade':_0x46705d};}function printReport(_0x17c7f8){const _0x4e3a9d=a136_0x28fff2,{configMigration:_0x4539d2,oldArtifacts:_0x3dac26,oldMcpConfig:_0xdc393f,needsSkillSwap:_0x2eec10}=_0x17c7f8;console['log'](''),console['log'](a136_0x4be9d9[_0x4e3a9d(0x202)](_0x4e3a9d(0x22b))),console[_0x4e3a9d(0x1d3)]('');_0x4539d2?(console[_0x4e3a9d(0x1d3)](a136_0x4be9d9[_0x4e3a9d(0x220)](_0x4e3a9d(0x1fa))+('\x20\x20'+a136_0x4be9d9['yellow'](_0x4539d2[_0x4e3a9d(0x1ca)]))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x225)+(_0x4539d2[_0x4e3a9d(0x1c3)]?a136_0x4be9d9[_0x4e3a9d(0x1f7)](_0x4e3a9d(0x234)):a136_0x4be9d9['gray']('not\x20found\x20(will\x20create)'))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x245)+_0x4539d2[_0x4e3a9d(0x211)]['join'](',\x20')),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x1ef))):console[_0x4e3a9d(0x1d3)](a136_0x4be9d9[_0x4e3a9d(0x220)](_0x4e3a9d(0x1fa))+'\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x1d8)](_0x4e3a9d(0x1cb)));console[_0x4e3a9d(0x1d3)]('');if(_0x3dac26['length']>0x0){console[_0x4e3a9d(0x1d3)](a136_0x4be9d9[_0x4e3a9d(0x220)]('Legacy\x20artifacts:'));for(const _0x321fc4 of _0x3dac26){console[_0x4e3a9d(0x1d3)]('\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x22c)](_0x4e3a9d(0x1e1))+'\x20\x20'+_0x321fc4);}console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x1dc));}else console[_0x4e3a9d(0x1d3)](a136_0x4be9d9[_0x4e3a9d(0x220)]('Legacy\x20artifacts:')+'\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x1d8)](_0x4e3a9d(0x1f6)));console[_0x4e3a9d(0x1d3)]('');_0xdc393f?(console['log'](a136_0x4be9d9[_0x4e3a9d(0x220)](_0x4e3a9d(0x1c5))+('\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x1f5)](_0xdc393f[_0x4e3a9d(0x1ed)])+_0x4e3a9d(0x1d0)+_0xdc393f['keys']['join'](',\x20'))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x236))):console['log'](a136_0x4be9d9[_0x4e3a9d(0x220)]('MCP\x20config:')+'\x20\x20'+a136_0x4be9d9['gray'](_0x4e3a9d(0x1f8)));console[_0x4e3a9d(0x1d3)](''),console['log'](a136_0x4be9d9[_0x4e3a9d(0x220)]('Skill\x20swap:')+('\x20\x20'+(_0x2eec10?a136_0x4be9d9[_0x4e3a9d(0x1f5)](_0x4e3a9d(0x1e9)):a136_0x4be9d9[_0x4e3a9d(0x1f7)]('not\x20needed'))));_0x2eec10&&console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x1f4)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x17c7f8[_0x4e3a9d(0x1fb)]){const {currentVersion:_0x25dfb9,field:_0x7011bf,pkgPath:_0x1d0fc4}=_0x17c7f8[_0x4e3a9d(0x1fb)];console['log'](a136_0x4be9d9['cyan'](_0x4e3a9d(0x232))+('\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x1f5)](_0x1d0fc4))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x212)+_0x7011bf+':\x20'+a136_0x4be9d9['yellow'](_0x25dfb9)+_0x4e3a9d(0x206)+a136_0x4be9d9[_0x4e3a9d(0x1f7)](_0x4e3a9d(0x204))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x20f));}else console[_0x4e3a9d(0x1d3)](a136_0x4be9d9['cyan'](_0x4e3a9d(0x232))+'\x20\x20'+a136_0x4be9d9['gray']('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x4e3a9d(0x1d3)]('');}function execConfigMigration(_0x8bc201,_0x3f7e83){const _0x3bbe04=a136_0x28fff2,{configMigration:_0x2a301f}=_0x8bc201;if(!_0x2a301f?.[_0x3bbe04(0x1ca)])return{'step':0x1,'label':_0x3bbe04(0x218),'ok':!![],'detail':_0x3bbe04(0x203)};const _0x5e7745=readConfigFile(_0x2a301f[_0x3bbe04(0x1ca)]),_0x1a246a=resolve(_0x3f7e83,NEW_CONFIG_NAME),_0x53bd00=_0x2a301f['hasNewConfig']?readConfigFile(_0x1a246a):{};for(const [_0x9174a5,_0x3389a2]of Object[_0x3bbe04(0x223)](_0x5e7745)){!(_0x9174a5 in _0x53bd00)&&(_0x53bd00[_0x9174a5]=_0x3389a2);}writeConfigFile(_0x1a246a,_0x53bd00);const _0x3750f2=_0x2a301f['oldPath']+'.bak';return renameSync(_0x2a301f[_0x3bbe04(0x1ca)],_0x3750f2),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x2a301f[_0x3bbe04(0x1ca)]+'\x20→\x20'+_0x1a246a+_0x3bbe04(0x1fc)+_0x3750f2+')'};}function execRemoveOldArtifacts(_0x575308){const _0xfcb29d=a136_0x28fff2,_0x855a16=[];for(const _0x53a5fc of _0x575308){try{if(!existsSync(_0x53a5fc))continue;const _0x5124e8=tryStat(_0x53a5fc);_0x5124e8?.[_0xfcb29d(0x1cd)]()?rmSync(_0x53a5fc,{'recursive':!![],'force':!![]}):unlinkSync(_0x53a5fc);}catch(_0x6e78c2){_0x855a16['push'](_0x53a5fc+':\x20'+_0x6e78c2[_0xfcb29d(0x226)]);}}return{'step':0x3,'label':_0xfcb29d(0x229),'ok':_0x855a16[_0xfcb29d(0x1ea)]===0x0,'detail':_0x855a16['length']>0x0?_0x575308['length']-_0x855a16['length']+'/'+_0x575308[_0xfcb29d(0x1ea)]+_0xfcb29d(0x23d)+_0x855a16[_0xfcb29d(0x21c)](';\x20')+')':_0x575308['length']+_0xfcb29d(0x1c2)};}function execCleanMcp(_0x44942a){const _0xa0a91e=a136_0x28fff2;if(!_0x44942a['oldMcpConfig'])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0xa0a91e(0x207)};try{const _0x24b4d5=readFileSync(_0x44942a[_0xa0a91e(0x23f)]['path'],_0xa0a91e(0x1c6)),_0x2a6bb6=JSON['parse'](_0x24b4d5);if(_0x2a6bb6?.[_0xa0a91e(0x20c)]&&typeof _0x2a6bb6[_0xa0a91e(0x20c)]==='object'){const _0x2edd59=[];for(const [_0x12237d,_0x44e946]of Object['entries'](_0x2a6bb6[_0xa0a91e(0x20c)])){_0x44e946?.[_0xa0a91e(0x21a)]&&Array[_0xa0a91e(0x1cf)](_0x44e946[_0xa0a91e(0x21a)])&&_0x44e946[_0xa0a91e(0x21a)][_0xa0a91e(0x238)](_0x484ebf=>typeof _0x484ebf==='string'&&_0x484ebf['includes']('@lovrabet/dataset-mcp-server'))&&_0x2edd59['push'](_0x12237d);}for(const _0x42f951 of _0x2edd59){delete _0x2a6bb6['mcpServers'][_0x42f951];}return _0x2edd59[_0xa0a91e(0x1ea)]>0x0&&writeFileSync(_0x44942a[_0xa0a91e(0x23f)][_0xa0a91e(0x1ed)],JSON[_0xa0a91e(0x1d4)](_0x2a6bb6,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'removed\x20'+_0x2edd59[_0xa0a91e(0x21c)](',\x20')+_0xa0a91e(0x1c9)+_0x44942a[_0xa0a91e(0x23f)][_0xa0a91e(0x1ed)]};}return{'step':0x4,'label':_0xa0a91e(0x23c),'ok':!![],'detail':_0xa0a91e(0x228)};}catch(_0x419322){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x419322[_0xa0a91e(0x226)]};}}function execSkillsRemove(_0x200a18,_0x1d4b80){const _0x2e0efe=a136_0x28fff2,_0x339341=runNpxSkillsRemove(_0x200a18,{'stdio':_0x2e0efe(0x1eb),'yes':_0x1d4b80});return{'step':0x5,'label':_0x2e0efe(0x1ce),'ok':_0x339341['ok'],'detail':_0x339341['ok']?_0x2e0efe(0x1ec):_0x339341[_0x2e0efe(0x201)]??'exit\x20'+_0x339341[_0x2e0efe(0x209)]};}function a136_0x15cb(_0x4ddd40,_0x37d1df){_0x4ddd40=_0x4ddd40-0x1c2;const _0x2b8067=a136_0x2b80();let _0x15cb51=_0x2b8067[_0x4ddd40];return _0x15cb51;}function execSkillsAdd(_0x2067a5,_0x3235a2){const _0x2907f0=a136_0x28fff2,_0x3195ce=runNpxSkillsAddGlobal(_0x2067a5,_0x2907f0(0x1db),{'stdio':_0x2907f0(0x1eb),'yes':_0x3235a2});return{'step':0x6,'label':_0x2907f0(0x214),'ok':_0x3195ce['ok'],'detail':_0x3195ce['ok']?_0x2907f0(0x222):_0x3195ce[_0x2907f0(0x201)]??'exit\x20'+_0x3195ce['status']};}function execUpgradeSdk(_0x35d601){const _0x4f56bf=a136_0x28fff2;if(!_0x35d601['sdkUpgrade'])return{'step':0x7,'label':_0x4f56bf(0x22f),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x3020e2,currentVersion:_0x4da661,field:_0x523aaf}=_0x35d601['sdkUpgrade'];try{const _0x1df614=readFileSync(_0x3020e2,_0x4f56bf(0x1c6)),_0x4bbaec=JSON[_0x4f56bf(0x235)](_0x1df614);return _0x4bbaec[_0x523aaf][_0x4f56bf(0x23e)]=_0x4f56bf(0x204),writeFileSync(_0x3020e2,JSON[_0x4f56bf(0x1d4)](_0x4bbaec,null,0x2)+'\x0a',_0x4f56bf(0x1c6)),{'step':0x7,'label':_0x4f56bf(0x22f),'ok':!![],'detail':_0x523aaf+'[\x22@lovrabet/sdk\x22]:\x20'+_0x4da661+_0x4f56bf(0x221)};}catch(_0x272e81){return{'step':0x7,'label':_0x4f56bf(0x22f),'ok':![],'detail':_0x272e81['message']};}}function tryStat(_0x39a049){try{return statSync(_0x39a049);}catch{return undefined;}}function printSummary(_0x594c1b){const _0x5d6f6c=a136_0x28fff2;console['log'](''),console['log'](a136_0x4be9d9[_0x5d6f6c(0x202)]('===\x20Upgrade\x20Summary\x20===')),console[_0x5d6f6c(0x1d3)]('');for(const _0x1e8a31 of _0x594c1b){const _0x4f3cd2=_0x1e8a31['ok']?a136_0x4be9d9['green']('OK'):a136_0x4be9d9[_0x5d6f6c(0x22c)](_0x5d6f6c(0x1c4));console[_0x5d6f6c(0x1d3)]('\x20\x20'+_0x4f3cd2+_0x5d6f6c(0x242)+_0x1e8a31[_0x5d6f6c(0x1c8)]+':\x20'+_0x1e8a31[_0x5d6f6c(0x244)]);if(_0x1e8a31['detail'])console[_0x5d6f6c(0x1d3)](_0x5d6f6c(0x230)+a136_0x4be9d9[_0x5d6f6c(0x1d8)](_0x1e8a31['detail']));}console['log']('');}export async function upgradeApp(_0x26d837,_0x1975b2){const _0x2c1ce7=a136_0x28fff2,_0xc2dc09=process[_0x2c1ce7(0x1f9)](),_0x585856=analyse(_0xc2dc09),_0x6f5693=!_0x585856[_0x2c1ce7(0x1d1)]&&_0x585856[_0x2c1ce7(0x237)][_0x2c1ce7(0x1ea)]===0x0&&!_0x585856['oldMcpConfig']&&!_0x585856[_0x2c1ce7(0x20b)]&&!_0x585856[_0x2c1ce7(0x1fb)];if(_0x6f5693){console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1f7)](_0x2c1ce7(0x200)));return;}printReport(_0x585856);const _0x469b0e=!!(_0x1975b2[_0x2c1ce7(0x22e)]||_0x1975b2['Y']||_0x26d837);if(!_0x469b0e)try{const _0x2b880b=await askConfirm(_0x2c1ce7(0x22a));if(!_0x2b880b){console[_0x2c1ce7(0x1d3)](a136_0x4be9d9['gray']('Upgrade\x20cancelled.'));return;}}catch(_0x19d59f){if(_0x19d59f?.[_0x2c1ce7(0x226)]===_0x2c1ce7(0x205)){console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1d8)]('Upgrade\x20cancelled.'));return;}throw _0x19d59f;}const _0x4625fe=[],_0x58dfbb=a136_0x496aa9({'text':_0x2c1ce7(0x240),'color':'cyan'})['start'](),_0x31f8de=execConfigMigration(_0x585856,_0xc2dc09);_0x4625fe[_0x2c1ce7(0x20a)](_0x31f8de),_0x58dfbb[_0x31f8de['ok']?_0x2c1ce7(0x246):'fail'](_0x2c1ce7(0x213)+(_0x31f8de[_0x2c1ce7(0x1e0)]??(_0x31f8de['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3))));const _0x2d35f7=resolve(_0xc2dc09,_0x2c1ce7(0x1f1)),_0x4b3d6d=a136_0x496aa9({'text':_0x2c1ce7(0x22d),'color':'cyan'})[_0x2c1ce7(0x23b)]();if(existsSync(_0x2d35f7))try{rmSync(_0x2d35f7,{'recursive':!![],'force':!![]}),_0x4b3d6d[_0x2c1ce7(0x246)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x4625fe[_0x2c1ce7(0x20a)]({'step':0x2,'label':_0x2c1ce7(0x1fe),'ok':!![]});}catch(_0x223b78){_0x4b3d6d[_0x2c1ce7(0x241)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x223b78[_0x2c1ce7(0x226)]),_0x4625fe['push']({'step':0x2,'label':_0x2c1ce7(0x1fe),'ok':![],'detail':_0x223b78['message']});}else _0x4b3d6d[_0x2c1ce7(0x1d2)](_0x2c1ce7(0x219)),_0x4625fe[_0x2c1ce7(0x20a)]({'step':0x2,'label':_0x2c1ce7(0x1fe),'ok':!![],'detail':_0x2c1ce7(0x207)});const _0x2506b2=a136_0x496aa9({'text':_0x2c1ce7(0x215),'color':_0x2c1ce7(0x220)})[_0x2c1ce7(0x23b)](),_0x185954=execRemoveOldArtifacts(_0x585856[_0x2c1ce7(0x237)]);_0x4625fe[_0x2c1ce7(0x20a)](_0x185954),_0x2506b2[_0x185954['ok']?'succeed':_0x2c1ce7(0x241)](_0x2c1ce7(0x21b)+(_0x185954['detail']??(_0x185954['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3))));const _0x4d4d36=a136_0x496aa9({'text':_0x2c1ce7(0x1da),'color':'cyan'})[_0x2c1ce7(0x23b)](),_0x2d6f16=execCleanMcp(_0x585856);_0x4625fe[_0x2c1ce7(0x20a)](_0x2d6f16),_0x4d4d36[_0x2d6f16['ok']?_0x2c1ce7(0x246):_0x2c1ce7(0x241)](_0x2c1ce7(0x20e)+(_0x2d6f16[_0x2c1ce7(0x1e0)]??(_0x2d6f16['ok']?'done':_0x2c1ce7(0x1f3))));const _0x5ef9bf=a136_0x496aa9({'text':_0x2c1ce7(0x1e4),'color':'cyan'})[_0x2c1ce7(0x23b)](),_0x35d24e=execSkillsRemove(_0xc2dc09,_0x469b0e);_0x4625fe[_0x2c1ce7(0x20a)](_0x35d24e),_0x5ef9bf[_0x35d24e['ok']?_0x2c1ce7(0x246):_0x2c1ce7(0x241)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x35d24e['detail']??(_0x35d24e['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3))));const _0x4d406b=a136_0x496aa9({'text':_0x2c1ce7(0x1dd),'color':_0x2c1ce7(0x220)})[_0x2c1ce7(0x23b)](),_0x587795=execSkillsAdd(_0xc2dc09,_0x469b0e);_0x4625fe[_0x2c1ce7(0x20a)](_0x587795),_0x4d406b[_0x587795['ok']?_0x2c1ce7(0x246):'fail'](_0x2c1ce7(0x239)+(_0x587795['detail']??(_0x587795['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3))));const _0x37c953=a136_0x496aa9({'text':_0x2c1ce7(0x20d),'color':'cyan'})['start'](),_0x339327=execUpgradeSdk(_0x585856);_0x4625fe[_0x2c1ce7(0x20a)](_0x339327),_0x37c953[_0x339327['ok']?_0x2c1ce7(0x246):_0x2c1ce7(0x241)](_0x2c1ce7(0x227)+(_0x339327['detail']??(_0x339327['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3)))),printSummary(_0x4625fe);const _0x4b3e06=_0x4625fe[_0x2c1ce7(0x238)](_0x274540=>!_0x274540['ok']);_0x4b3e06?console[_0x2c1ce7(0x1d3)](a136_0x4be9d9['yellow'](_0x2c1ce7(0x224))):console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1f7)](_0x2c1ce7(0x248))),_0x339327['ok']&&_0x585856[_0x2c1ce7(0x1fb)]&&(console[_0x2c1ce7(0x1d3)](''),console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x202)]['cyan'](_0x2c1ce7(0x1e2))),console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x220)](_0x2c1ce7(0x1ee))),console[_0x2c1ce7(0x1d3)](''),console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1cc)](_0x2c1ce7(0x1e8))),console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1cc)](_0x2c1ce7(0x210))),console['log'](a136_0x4be9d9[_0x2c1ce7(0x1cc)](_0x2c1ce7(0x208))),console[_0x2c1ce7(0x1d3)](''));}
@@ -1 +1 @@
1
- const a137_0x488f8e=a137_0x21ba;(function(_0x5bf601,_0x54bcae){const _0x56b3c4=a137_0x21ba,_0x1b43e2=_0x5bf601();while(!![]){try{const _0x133679=parseInt(_0x56b3c4(0x17e))/0x1+parseInt(_0x56b3c4(0x1af))/0x2*(parseInt(_0x56b3c4(0x1a8))/0x3)+parseInt(_0x56b3c4(0x1b2))/0x4+parseInt(_0x56b3c4(0x1b0))/0x5*(parseInt(_0x56b3c4(0x194))/0x6)+-parseInt(_0x56b3c4(0x188))/0x7*(parseInt(_0x56b3c4(0x177))/0x8)+parseInt(_0x56b3c4(0x19c))/0x9+parseInt(_0x56b3c4(0x1b1))/0xa*(-parseInt(_0x56b3c4(0x18b))/0xb);if(_0x133679===_0x54bcae)break;else _0x1b43e2['push'](_0x1b43e2['shift']());}catch(_0x188759){_0x1b43e2['push'](_0x1b43e2['shift']());}}}(a137_0xb483,0xc27eb));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{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 registerDefinitions(_0x306426){const _0x2295bc=a137_0x21ba;for(const _0x5b7125 of _0x306426){definitions[_0x2295bc(0x173)](_0x5b7125[_0x2295bc(0x191)]+':'+_0x5b7125[_0x2295bc(0x196)],_0x5b7125);let _0x166ab6=serviceGroups[_0x2295bc(0x198)](_0x5b7125['service']);!_0x166ab6&&(_0x166ab6=[],serviceGroups['set'](_0x5b7125[_0x2295bc(0x191)],_0x166ab6)),_0x166ab6[_0x2295bc(0x19f)](_0x5b7125);}}function registerDeclarativeService(_0x4ae0eb,_0x39e6c1,_0x1d9a3b){const _0x3f22b1=a137_0x21ba;registerDefinitions(_0x39e6c1);_0x1d9a3b?.[_0x3f22b1(0x1ab)]&&registerDefinitions([_0x1d9a3b[_0x3f22b1(0x1ab)]]);const _0x2c746c=_0x54c3ed=>_0x54c3ed==='read'?'':_0x54c3ed===_0x3f22b1(0x183)?_0x3f22b1(0x1a5):_0x3f22b1(0x1ad),_0xb1c308={'service':_0x39e6c1[0x0]['service'],'label':_0x4ae0eb,'commands':_0x39e6c1[_0x3f22b1(0x1a4)](_0x3d3555=>!_0x3d3555[_0x3f22b1(0x19b)])[_0x3f22b1(0x1aa)](_0x376369=>({'command':_0x376369[_0x3f22b1(0x196)],'description':_0x376369['description'],'tag':_0x2c746c(_0x376369[_0x3f22b1(0x1a2)])})),'declarative':!![],'defaultCommand':_0x1d9a3b?.['defaultCommand']??(_0x1d9a3b?.['isSingleCommand']?_0x39e6c1[0x0][_0x3f22b1(0x196)]:undefined),'wildcardDef':_0x1d9a3b?.[_0x3f22b1(0x1ab)],'isSingleCommand':_0x1d9a3b?.[_0x3f22b1(0x181)]};serviceRegistry[_0x3f22b1(0x19f)](_0xb1c308),serviceByName[_0x3f22b1(0x173)](_0xb1c308[_0x3f22b1(0x191)],_0xb1c308);}registerDeclarativeService(a137_0x488f8e(0x1ae),initDefinitions,{'defaultCommand':a137_0x488f8e(0x1ac),'isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a137_0x488f8e(0x182),workspaceDefinitions),registerDeclarativeService(a137_0x488f8e(0x19e),appDefinitions),registerDeclarativeService(a137_0x488f8e(0x186),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a137_0x488f8e(0x18d),datasetDefinitions),registerDeclarativeService(a137_0x488f8e(0x17c),pageDefinitions),registerDeclarativeService(a137_0x488f8e(0x1a3),apiDefinitions),registerDeclarativeService(a137_0x488f8e(0x17f),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a137_0x488f8e(0x18e),permitDefinitions),registerDeclarativeService(a137_0x488f8e(0x179),appConfigDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a137_0x488f8e(0x197),configDefinitions),registerDeclarativeService(a137_0x488f8e(0x17d),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x488f8e(0x1a7),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a137_0x488f8e(0x172)}),registerDeclarativeService(a137_0x488f8e(0x192),logsDefinitions,{'defaultCommand':a137_0x488f8e(0x180)}),registerDeclarativeService(a137_0x488f8e(0x18f),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a137_0x488f8e(0x189)]=[{'command':a137_0x488f8e(0x174),'description':a137_0x488f8e(0x1a0),'tag':''}];}function a137_0x21ba(_0x324302,_0x12359a){_0x324302=_0x324302-0x172;const _0xb4839d=a137_0xb483();let _0x21ba51=_0xb4839d[_0x324302];return _0x21ba51;}function a137_0xb483(){const _0xc1bbd2=['skill','create','hidden','2474982WdGokf','app','App\x20Management','push','Run\x20any\x20package.json\x20script','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','risk','API\x20Development','filter','\x20\x20[write]','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','Schema','3SfjmDq','`rabetbase\x20','map','wildcardDef','run','\x20\x20[high-risk-write]','Quick\x20Start','264154pMCeBV','6229805sGjfOM','50cZznce','2277124ZhMYsw','skills','install','set','<script>','skill\x20','has','184GqAGfJ','use','Runtime\x20App\x20Config\x20Management','start','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Smart\x20List\x20Pages','Diagnostics','804447XhzUhh','Instant\x20API','show','isSingleCommand','Workspace','write','logout','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','Authentication','`rabetbase\x20skills`\x20has\x20been\x20removed.','352072bhuCVU','commands','auth','2361271UJgyvC','remote','Dataset\x20&\x20Operations','Permissions','Run\x20Scripts','from','service','Logs','project','6mNdCVQ','`\x20has\x20been\x20removed.','command','Configuration','get'];a137_0xb483=function(){return _0xc1bbd2;};return a137_0xb483();}export const deprecatedAliases={'create':{'service':a137_0x488f8e(0x193),'command':a137_0x488f8e(0x19a)},'start':{'service':a137_0x488f8e(0x1ac),'command':a137_0x488f8e(0x17a)},'build':{'service':a137_0x488f8e(0x1ac),'command':'build'},'preview':{'service':a137_0x488f8e(0x1ac),'command':'preview'},'logout':{'service':a137_0x488f8e(0x18a),'command':a137_0x488f8e(0x184)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a137_0x488f8e(0x1a1),APP_REMOTE_REMOVED_HINT=a137_0x488f8e(0x1a6),APP_USE_REMOVED_HINT=a137_0x488f8e(0x17b);export function resolveRemovedCommand(_0x31b92c,_0x45bfe5){const _0x465e24=a137_0x488f8e;if(_0x31b92c===_0x465e24(0x199)){const _0x407dc8=_0x45bfe5?_0x465e24(0x175)+_0x45bfe5:_0x465e24(0x199);return{'command':_0x407dc8,'message':_0x465e24(0x1a9)+_0x407dc8+_0x465e24(0x195),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x31b92c===_0x465e24(0x1b3))return{'command':_0x465e24(0x1b3),'message':_0x465e24(0x187),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x31b92c===_0x465e24(0x19d)&&_0x45bfe5===_0x465e24(0x18c))return{'command':'app\x20remote','message':'`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','hint':APP_REMOTE_REMOVED_HINT};if(_0x31b92c===_0x465e24(0x19d)&&_0x45bfe5===_0x465e24(0x178))return{'command':'app\x20use','message':_0x465e24(0x185),'hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a137_0x488f8e(0x19a)}};export function resolveDeprecatedSubcommand(_0x3baa23,_0x568f2f){return deprecatedSubcommands[_0x3baa23]?.[_0x568f2f];}export function findDefinition(_0x1accb1,_0x3df804){const _0x5551f5=a137_0x488f8e;return definitions[_0x5551f5(0x198)](_0x1accb1+':'+_0x3df804);}export function isKnownService(_0x233596){const _0x5b84ed=a137_0x488f8e;return serviceByName[_0x5b84ed(0x176)](_0x233596);}export function isDeclarativeService(_0x1f3e3e){const _0xa16ed=a137_0x488f8e;return serviceGroups[_0xa16ed(0x176)](_0x1f3e3e)||serviceByName[_0xa16ed(0x198)](_0x1f3e3e)?.[_0xa16ed(0x1ab)]!==undefined;}export function getServiceEntry(_0x22e11f){const _0x3dd3ad=a137_0x488f8e;return serviceByName[_0x3dd3ad(0x198)](_0x22e11f);}export function getLegacyHandler(_0x33f18d,_0x330888){return undefined;}export function getAllDefinitions(){const _0x5c5012=a137_0x488f8e;return Array[_0x5c5012(0x190)](definitions['values']());}
1
+ const a137_0x8649c8=a137_0x4460;(function(_0x5d1e90,_0x2ccfa9){const _0x40a705=a137_0x4460,_0x16614a=_0x5d1e90();while(!![]){try{const _0x3ba2f2=-parseInt(_0x40a705(0xe0))/0x1+parseInt(_0x40a705(0x102))/0x2*(-parseInt(_0x40a705(0xf6))/0x3)+parseInt(_0x40a705(0xef))/0x4*(-parseInt(_0x40a705(0xde))/0x5)+parseInt(_0x40a705(0xfc))/0x6+parseInt(_0x40a705(0xd6))/0x7+-parseInt(_0x40a705(0xec))/0x8+parseInt(_0x40a705(0xe4))/0x9;if(_0x3ba2f2===_0x2ccfa9)break;else _0x16614a['push'](_0x16614a['shift']());}catch(_0xa87b9d){_0x16614a['push'](_0x16614a['shift']());}}}(a137_0x13a1,0xae0d1));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{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';function a137_0x13a1(){const _0x49828a=['skill','description','push','Diagnostics','commands','build','remote','start','preview','get','584157XcYEnM','project','read','Authentication','Configuration','SQL\x20Queries','create','has','3434825owhzaA','hidden','1034748GRkUzn','risk','Code\x20Generation','app','32715630xAZQGH','app\x20use','write','filter','Run\x20any\x20package.json\x20script','length','values','skill\x20','11276168ullqtE','Instant\x20API','Run\x20Scripts','4uLkpLo','Platform\x20Issue','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','Roles','from','`rabetbase\x20','command','603ImDFfA','isSingleCommand','map','`\x20has\x20been\x20removed.','service','Permissions','2344470KMMPtT','Runtime\x20App\x20Config\x20Management','set','API\x20Development','BFF\x20Scripts','Logs','2638BAuwDB','wildcardDef','run','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','Project','auth'];a137_0x13a1=function(){return _0x49828a;};return a137_0x13a1();}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=[];function a137_0x4460(_0x2e83c8,_0x43bafe){_0x2e83c8=_0x2e83c8-0xd6;const _0x13a149=a137_0x13a1();let _0x44605c=_0x13a149[_0x2e83c8];return _0x44605c;}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x3c77b6){const _0x1fcdbf=a137_0x4460;for(const _0x5b121e of _0x3c77b6){definitions[_0x1fcdbf(0xfe)](_0x5b121e['service']+':'+_0x5b121e[_0x1fcdbf(0xf5)],_0x5b121e);let _0xba9a8c=serviceGroups[_0x1fcdbf(0x111)](_0x5b121e[_0x1fcdbf(0xfa)]);!_0xba9a8c&&(_0xba9a8c=[],serviceGroups[_0x1fcdbf(0xfe)](_0x5b121e[_0x1fcdbf(0xfa)],_0xba9a8c)),_0xba9a8c[_0x1fcdbf(0x10a)](_0x5b121e);}}function registerDeclarativeService(_0xaf8ea1,_0x4621e3,_0x350483){const _0x192397=a137_0x4460;registerDefinitions(_0x4621e3);_0x350483?.[_0x192397(0x103)]&&registerDefinitions([_0x350483[_0x192397(0x103)]]);const _0x5226c5=_0x2f554e=>_0x2f554e===_0x192397(0xd8)?'':_0x2f554e===_0x192397(0xe6)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x3fc2f8={'service':_0x4621e3[0x0][_0x192397(0xfa)],'label':_0xaf8ea1,'commands':_0x4621e3[_0x192397(0xe7)](_0x2c0b6d=>!_0x2c0b6d[_0x192397(0xdf)])[_0x192397(0xf8)](_0x38edba=>({'command':_0x38edba[_0x192397(0xf5)],'description':_0x38edba[_0x192397(0x109)],'tag':_0x5226c5(_0x38edba[_0x192397(0xe1)])})),'declarative':!![],'defaultCommand':_0x350483?.['defaultCommand']??(_0x350483?.[_0x192397(0xf7)]?_0x4621e3[0x0]['command']:undefined),'wildcardDef':_0x350483?.[_0x192397(0x103)],'isSingleCommand':_0x350483?.[_0x192397(0xf7)]};serviceRegistry[_0x192397(0x10a)](_0x3fc2f8),serviceByName[_0x192397(0xfe)](_0x3fc2f8[_0x192397(0xfa)],_0x3fc2f8);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a137_0x8649c8(0x104),'isSingleCommand':!![]}),registerDeclarativeService(a137_0x8649c8(0x106),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a137_0x8649c8(0xd9),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages',pageDefinitions),registerDeclarativeService(a137_0x8649c8(0xff),apiDefinitions),registerDeclarativeService(a137_0x8649c8(0xed),dataDefinitions),registerDeclarativeService(a137_0x8649c8(0x100),bffDefinitions),registerDeclarativeService(a137_0x8649c8(0xdb),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a137_0x8649c8(0xf2),roleDefinitions),registerDeclarativeService(a137_0x8649c8(0xfb),permitDefinitions),registerDeclarativeService(a137_0x8649c8(0xfd),appConfigDefinitions),registerDeclarativeService(a137_0x8649c8(0xf0),issueDefinitions),registerDeclarativeService(a137_0x8649c8(0xe2),codegenDefinitions),registerDeclarativeService(a137_0x8649c8(0xda),configDefinitions),registerDeclarativeService(a137_0x8649c8(0x10b),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a137_0x8649c8(0x101),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a137_0x8649c8(0xee),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a137_0x8649c8(0xe9)]-0x1];last[a137_0x8649c8(0x10c)]=[{'command':'<script>','description':a137_0x8649c8(0xe8),'tag':''}];}export const deprecatedAliases={'create':{'service':a137_0x8649c8(0xd7),'command':a137_0x8649c8(0xdc)},'start':{'service':a137_0x8649c8(0x104),'command':a137_0x8649c8(0x10f)},'build':{'service':'run','command':a137_0x8649c8(0x10d)},'preview':{'service':'run','command':a137_0x8649c8(0x110)},'logout':{'service':a137_0x8649c8(0x107),'command':'logout'}};const CLI_SKILL_INSTALL_REMOVED_HINT=a137_0x8649c8(0x105),APP_REMOTE_REMOVED_HINT=a137_0x8649c8(0xf1),APP_USE_REMOVED_HINT='Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.';export function resolveRemovedCommand(_0x3e2c82,_0x2eeb55){const _0x331524=a137_0x8649c8;if(_0x3e2c82===_0x331524(0x108)){const _0x182f32=_0x2eeb55?_0x331524(0xeb)+_0x2eeb55:_0x331524(0x108);return{'command':_0x182f32,'message':_0x331524(0xf4)+_0x182f32+_0x331524(0xf9),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x3e2c82==='skills')return{'command':'skills','message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x3e2c82===_0x331524(0xe3)&&_0x2eeb55===_0x331524(0x10e))return{'command':'app\x20remote','message':'`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','hint':APP_REMOTE_REMOVED_HINT};if(_0x3e2c82==='app'&&_0x2eeb55==='use')return{'command':_0x331524(0xe5),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a137_0x8649c8(0xdc)},'sql':{'new':a137_0x8649c8(0xdc)}};export function resolveDeprecatedSubcommand(_0x4bd295,_0x4e2e52){return deprecatedSubcommands[_0x4bd295]?.[_0x4e2e52];}export function findDefinition(_0x41a699,_0x59a486){const _0x3f5950=a137_0x8649c8;return definitions[_0x3f5950(0x111)](_0x41a699+':'+_0x59a486);}export function isKnownService(_0x3b6ec5){return serviceByName['has'](_0x3b6ec5);}export function isDeclarativeService(_0x139597){const _0x2d4853=a137_0x8649c8;return serviceGroups[_0x2d4853(0xdd)](_0x139597)||serviceByName[_0x2d4853(0x111)](_0x139597)?.[_0x2d4853(0x103)]!==undefined;}export function getServiceEntry(_0x377109){const _0x14dff0=a137_0x8649c8;return serviceByName[_0x14dff0(0x111)](_0x377109);}export function getLegacyHandler(_0xaa6aca,_0xf56abc){return undefined;}export function getAllDefinitions(){const _0x4c0163=a137_0x8649c8;return Array[_0x4c0163(0xf3)](definitions[_0x4c0163(0xea)]());}
@@ -1 +1 @@
1
- const a138_0x3a2fad=a138_0xe449;(function(_0x282eca,_0xac264a){const _0x38902b=a138_0xe449,_0x3ed21b=_0x282eca();while(!![]){try{const _0x388672=-parseInt(_0x38902b(0x85))/0x1+-parseInt(_0x38902b(0x91))/0x2+parseInt(_0x38902b(0x7c))/0x3*(-parseInt(_0x38902b(0x7d))/0x4)+-parseInt(_0x38902b(0x86))/0x5+parseInt(_0x38902b(0x7e))/0x6*(-parseInt(_0x38902b(0x79))/0x7)+parseInt(_0x38902b(0x7f))/0x8*(-parseInt(_0x38902b(0x82))/0x9)+parseInt(_0x38902b(0x8a))/0xa;if(_0x388672===_0xac264a)break;else _0x3ed21b['push'](_0x3ed21b['shift']());}catch(_0x26f9fe){_0x3ed21b['push'](_0x3ed21b['shift']());}}}(a138_0x526c,0xcb86b));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_0xe449(_0x3d22a5,_0x393d1f){_0x3d22a5=_0x3d22a5-0x79;const _0x526c40=a138_0x526c();let _0xe44992=_0x526c40[_0x3d22a5];return _0xe44992;}const CREATE_PATH=a138_0x3a2fad(0x92);function readName(_0x157d14){const _0x51e9c1=a138_0x3a2fad,_0x16e3de=_0x157d14[_0x51e9c1(0x93)](_0x51e9c1(0x83))[_0x51e9c1(0x7a)]();if(!_0x16e3de)throw CliErrors['flagMissing'](_0x51e9c1(0x83),'Pass\x20--name\x20<roleName>.');if(_0x16e3de[_0x51e9c1(0x8b)]>0x40)throw CliErrors[_0x51e9c1(0x8e)](_0x51e9c1(0x88));return _0x16e3de;}export const roleCreate={'service':a138_0x3a2fad(0x90),'command':a138_0x3a2fad(0x8d),'description':a138_0x3a2fad(0x8f),'risk':a138_0x3a2fad(0x80),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x38f8ab){readName(_0x38f8ab);},async 'dryRun'(_0x423f78){const _0x36fc05=a138_0x3a2fad,_0x4e31f9=readName(_0x423f78),_0x5d9fa0=_0x423f78[_0x36fc05(0x93)](_0x36fc05(0x84))['trim']()||undefined;return asDryRunResult({'operation':'create','selector':{'appCode':_0x423f78[_0x36fc05(0x8c)],'roleName':_0x4e31f9},'before':null,'after':{'roleName':_0x4e31f9,'roleType':_0x36fc05(0x87),'remark':_0x5d9fa0},'dryRun':!![],'backend':{'method':_0x36fc05(0x7b),'path':CREATE_PATH},'warnings':[]},{'method':_0x36fc05(0x7b),'url':CREATE_PATH});},async 'execute'(_0x3939ed){const _0x299d0e=a138_0x3a2fad,_0x3236d7=readName(_0x3939ed),_0x4bccab=_0x3939ed[_0x299d0e(0x93)](_0x299d0e(0x84))[_0x299d0e(0x7a)]()||undefined,_0x383bde=await createAppRole({'appCode':_0x3939ed[_0x299d0e(0x8c)],'roleName':_0x3236d7,..._0x4bccab?{'remark':_0x4bccab}:{}});return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x3939ed['appCode'],'roleId':_0x383bde['id'],'roleName':_0x3236d7},'before':null,'after':projectRole(_0x383bde),'dryRun':![],'backend':{'method':_0x299d0e(0x7b),'path':CREATE_PATH},'warnings':[]},'message':_0x299d0e(0x81)+_0x383bde[_0x299d0e(0x89)]+_0x299d0e(0x94)+_0x383bde['id']+')'};}};function a138_0x526c(){const _0x22b4ce=['955035QnQWWO','name','remark','149420XVUlHf','3913705RXLdTi','CUSTOM','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','roleName','59871420VxxMBh','length','appCode','create','validation','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','role','941574nlAOnM','/smartapi/permit/role/create','str','\x20(id=','7APapKK','trim','POST','2661sbYjgR','3832vsISNq','8491170OAbopI','112MGWlRE','write','Created\x20role\x20'];a138_0x526c=function(){return _0x22b4ce;};return a138_0x526c();}
1
+ const a138_0x12227e=a138_0x29b7;(function(_0x3b2c53,_0x508446){const _0x30d82a=a138_0x29b7,_0x56c8aa=_0x3b2c53();while(!![]){try{const _0x4133e0=parseInt(_0x30d82a(0x1c5))/0x1*(parseInt(_0x30d82a(0x1bf))/0x2)+parseInt(_0x30d82a(0x1b0))/0x3*(-parseInt(_0x30d82a(0x1af))/0x4)+-parseInt(_0x30d82a(0x1c1))/0x5+parseInt(_0x30d82a(0x1b2))/0x6+-parseInt(_0x30d82a(0x1ad))/0x7*(parseInt(_0x30d82a(0x1c4))/0x8)+-parseInt(_0x30d82a(0x1bb))/0x9+parseInt(_0x30d82a(0x1bc))/0xa;if(_0x4133e0===_0x508446)break;else _0x56c8aa['push'](_0x56c8aa['shift']());}catch(_0x5c2d69){_0x56c8aa['push'](_0x56c8aa['shift']());}}}(a138_0x3766,0x53828));import{createAppRole}from'../../core/api-client.js';function a138_0x3766(){const _0x5ce06d=['str','roleName','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','CUSTOM','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','flagMissing','appCode','trim','2699838aWLBxl','7560540EWezJP','role','remark','16894ItFfNc','create','1399260UQTwUN','Created\x20role\x20','POST','16exbQHE','68VFUlTT','validation','name','1701945MnTjNQ','write','41744NBwBNx','60MlJnCo','/smartapi/permit/role/create','1718580qolfjn'];a138_0x3766=function(){return _0x5ce06d;};return a138_0x3766();}function a138_0x29b7(_0xee3b9,_0x11ed8c){_0xee3b9=_0xee3b9-0x1ac;const _0x376620=a138_0x3766();let _0x29b7bc=_0x376620[_0xee3b9];return _0x29b7bc;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a138_0x12227e(0x1b1);function readName(_0x2b0357){const _0x1c4684=a138_0x12227e,_0xe378e1=_0x2b0357['str'](_0x1c4684(0x1ac))['trim']();if(!_0xe378e1)throw CliErrors[_0x1c4684(0x1b8)](_0x1c4684(0x1ac),'Pass\x20--name\x20<roleName>.');if(_0xe378e1['length']>0x40)throw CliErrors[_0x1c4684(0x1c6)](_0x1c4684(0x1b5));return _0xe378e1;}export const roleCreate={'service':a138_0x12227e(0x1bd),'command':'create','description':a138_0x12227e(0x1b7),'risk':a138_0x12227e(0x1ae),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x438a3b){readName(_0x438a3b);},async 'dryRun'(_0x1a6225){const _0x109b6c=a138_0x12227e,_0x3edf0d=readName(_0x1a6225),_0x3a8b72=_0x1a6225[_0x109b6c(0x1b3)]('remark')[_0x109b6c(0x1ba)]()||undefined;return asDryRunResult({'operation':'create','selector':{'appCode':_0x1a6225[_0x109b6c(0x1b9)],'roleName':_0x3edf0d},'before':null,'after':{'roleName':_0x3edf0d,'roleType':_0x109b6c(0x1b6),'remark':_0x3a8b72},'dryRun':!![],'backend':{'method':_0x109b6c(0x1c3),'path':CREATE_PATH},'warnings':[]},{'method':_0x109b6c(0x1c3),'url':CREATE_PATH});},async 'execute'(_0xcdb1b0){const _0x2c4a65=a138_0x12227e,_0xc71520=readName(_0xcdb1b0),_0x389da1=_0xcdb1b0['str'](_0x2c4a65(0x1be))[_0x2c4a65(0x1ba)]()||undefined,_0x4f838c=await createAppRole({'appCode':_0xcdb1b0[_0x2c4a65(0x1b9)],'roleName':_0xc71520,..._0x389da1?{'remark':_0x389da1}:{}});return{'ok':!![],'data':{'operation':_0x2c4a65(0x1c0),'selector':{'appCode':_0xcdb1b0[_0x2c4a65(0x1b9)],'roleId':_0x4f838c['id'],'roleName':_0xc71520},'before':null,'after':projectRole(_0x4f838c),'dryRun':![],'backend':{'method':_0x2c4a65(0x1c3),'path':CREATE_PATH},'warnings':[]},'message':_0x2c4a65(0x1c2)+_0x4f838c[_0x2c4a65(0x1b4)]+'\x20(id='+_0x4f838c['id']+')'};}};
@@ -1 +1 @@
1
- const a139_0xf735ce=a139_0x40de;(function(_0x38e139,_0x23e5dd){const _0x22593b=a139_0x40de,_0x2d160f=_0x38e139();while(!![]){try{const _0x244186=-parseInt(_0x22593b(0x70))/0x1+-parseInt(_0x22593b(0x77))/0x2*(parseInt(_0x22593b(0x7c))/0x3)+-parseInt(_0x22593b(0x7d))/0x4+-parseInt(_0x22593b(0x76))/0x5*(-parseInt(_0x22593b(0x75))/0x6)+parseInt(_0x22593b(0x7f))/0x7*(-parseInt(_0x22593b(0x6f))/0x8)+-parseInt(_0x22593b(0x71))/0x9+parseInt(_0x22593b(0x6e))/0xa*(parseInt(_0x22593b(0x81))/0xb);if(_0x244186===_0x23e5dd)break;else _0x2d160f['push'](_0x2d160f['shift']());}catch(_0x44f6ae){_0x2d160f['push'](_0x2d160f['shift']());}}}(a139_0x238c,0xc6616));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a139_0x40de(_0xf2f261,_0x48b8c1){_0xf2f261=_0xf2f261-0x6a;const _0x238c05=a139_0x238c();let _0x40de5e=_0x238c05[_0xf2f261];return _0x40de5e;}function a139_0x238c(){const _0x14105a=['Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','delete','10ONUZiD','221608xPDNjk','154631PnwKfV','1948932tBrCTh','roleName','num','POST','85578QJmAgj','25CFMcaK','405550kLrahm','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','role','\x20(id=','high-risk-write','3lqQwvS','4347324nQFpkY','Deleted\x20role\x20','7wSofex','Role\x20still\x20has\x20','26727107NlufCh','userCount','appCode'];a139_0x238c=function(){return _0x14105a;};return a139_0x238c();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a139_0xf735ce(0x79),'command':a139_0xf735ce(0x6d),'description':a139_0xf735ce(0x6c),'risk':a139_0xf735ce(0x7b),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x17e08e){const _0x4956b9=a139_0xf735ce,_0x495b54=_0x17e08e[_0x4956b9(0x73)]('id'),_0x246d73=await getRoleById(_0x17e08e[_0x4956b9(0x6b)],_0x495b54);return assertCustomRole(_0x246d73,_0x4956b9(0x6d)),asDryRunResult({'operation':_0x4956b9(0x6d),'selector':{'appCode':_0x17e08e[_0x4956b9(0x6b)],'roleId':_0x495b54,'roleName':_0x246d73[_0x4956b9(0x72)]},'before':projectRole(_0x246d73),'after':null,'dryRun':!![],'backend':{'method':_0x4956b9(0x74),'path':DELETE_PATH},'warnings':_0x246d73[_0x4956b9(0x6a)]>0x0?[_0x4956b9(0x80)+_0x246d73[_0x4956b9(0x6a)]+_0x4956b9(0x78)]:[]},{'method':_0x4956b9(0x74),'url':DELETE_PATH});},async 'execute'(_0x82659d){const _0x4e5a11=a139_0xf735ce,_0x2cd673=_0x82659d[_0x4e5a11(0x73)]('id'),_0x772222=await getRoleById(_0x82659d[_0x4e5a11(0x6b)],_0x2cd673);return assertCustomRole(_0x772222,_0x4e5a11(0x6d)),await deleteAppRole(_0x2cd673),{'ok':!![],'data':{'operation':_0x4e5a11(0x6d),'selector':{'appCode':_0x82659d['appCode'],'roleId':_0x2cd673,'roleName':_0x772222[_0x4e5a11(0x72)]},'before':projectRole(_0x772222),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x4e5a11(0x7e)+_0x772222[_0x4e5a11(0x72)]+_0x4e5a11(0x7a)+_0x2cd673+')'};}};
1
+ function a139_0x56d0(){const _0x4ebae6=['10ohDeKo','2337546JsZIhZ','983872pSWknZ','role','POST','2699540OXjBpE','appCode','1174599HXjbvm','userCount','126604CKwcnY','roleName','Deleted\x20role\x20','high-risk-write','4007409DmRNhO','num','72fsrjje','Role\x20still\x20has\x20','\x20(id=','9346190qrzEnx','delete'];a139_0x56d0=function(){return _0x4ebae6;};return a139_0x56d0();}const a139_0x388033=a139_0x269f;(function(_0x1ca216,_0x1e3c04){const _0x241d50=a139_0x269f,_0x57729c=_0x1ca216();while(!![]){try{const _0x1ab424=parseInt(_0x241d50(0x16b))/0x1+-parseInt(_0x241d50(0x16e))/0x2+parseInt(_0x241d50(0x176))/0x3+-parseInt(_0x241d50(0x172))/0x4*(parseInt(_0x241d50(0x169))/0x5)+-parseInt(_0x241d50(0x16a))/0x6+parseInt(_0x241d50(0x167))/0x7+-parseInt(_0x241d50(0x164))/0x8*(parseInt(_0x241d50(0x170))/0x9);if(_0x1ab424===_0x1e3c04)break;else _0x57729c['push'](_0x57729c['shift']());}catch(_0x4d664d){_0x57729c['push'](_0x57729c['shift']());}}}(a139_0x56d0,0xa56cf));import{deleteAppRole}from'../../core/api-client.js';function a139_0x269f(_0x48710c,_0x4d7b21){_0x48710c=_0x48710c-0x163;const _0x56d0e6=a139_0x56d0();let _0x269fec=_0x56d0e6[_0x48710c];return _0x269fec;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a139_0x388033(0x16c),'command':a139_0x388033(0x168),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a139_0x388033(0x175),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x5e774a){const _0x6ab585=a139_0x388033,_0x2d0e13=_0x5e774a[_0x6ab585(0x163)]('id'),_0x282c58=await getRoleById(_0x5e774a[_0x6ab585(0x16f)],_0x2d0e13);return assertCustomRole(_0x282c58,_0x6ab585(0x168)),asDryRunResult({'operation':'delete','selector':{'appCode':_0x5e774a[_0x6ab585(0x16f)],'roleId':_0x2d0e13,'roleName':_0x282c58[_0x6ab585(0x173)]},'before':projectRole(_0x282c58),'after':null,'dryRun':!![],'backend':{'method':_0x6ab585(0x16d),'path':DELETE_PATH},'warnings':_0x282c58[_0x6ab585(0x171)]>0x0?[_0x6ab585(0x165)+_0x282c58[_0x6ab585(0x171)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x6ab585(0x16d),'url':DELETE_PATH});},async 'execute'(_0x5987fc){const _0x42313b=a139_0x388033,_0x232911=_0x5987fc['num']('id'),_0x546b38=await getRoleById(_0x5987fc[_0x42313b(0x16f)],_0x232911);return assertCustomRole(_0x546b38,_0x42313b(0x168)),await deleteAppRole(_0x232911),{'ok':!![],'data':{'operation':_0x42313b(0x168),'selector':{'appCode':_0x5987fc[_0x42313b(0x16f)],'roleId':_0x232911,'roleName':_0x546b38[_0x42313b(0x173)]},'before':projectRole(_0x546b38),'after':null,'dryRun':![],'backend':{'method':_0x42313b(0x16d),'path':DELETE_PATH},'warnings':[]},'message':_0x42313b(0x174)+_0x546b38[_0x42313b(0x173)]+_0x42313b(0x166)+_0x232911+')'};}};