@lovrabet/rabetbase-cli 2.2.5-beta.2 → 2.3.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 (218) 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/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -0
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/index.js +1 -1
  65. package/lib/commands/dataset/list.js +1 -1
  66. package/lib/commands/dataset/operations.js +1 -1
  67. package/lib/commands/dataset/relation-create.js +1 -1
  68. package/lib/commands/dataset/relation-delete.js +1 -1
  69. package/lib/commands/dataset/relation-shared.js +1 -1
  70. package/lib/commands/dataset/relation-update.js +1 -1
  71. package/lib/commands/dataset/relations.js +1 -1
  72. package/lib/commands/dataset/rename.js +1 -1
  73. package/lib/commands/dataset/restore.js +1 -1
  74. package/lib/commands/db/analyze-cancel.js +1 -1
  75. package/lib/commands/db/analyze-start.js +1 -1
  76. package/lib/commands/db/analyze-status.js +1 -1
  77. package/lib/commands/db/create.js +1 -1
  78. package/lib/commands/db/delete.js +1 -1
  79. package/lib/commands/db/detail.js +1 -1
  80. package/lib/commands/db/diff.js +1 -1
  81. package/lib/commands/db/index.js +1 -1
  82. package/lib/commands/db/list.js +1 -1
  83. package/lib/commands/db/shared.js +1 -1
  84. package/lib/commands/db/tables.js +1 -1
  85. package/lib/commands/db/test.js +1 -1
  86. package/lib/commands/db/update.js +1 -1
  87. package/lib/commands/doctor.js +1 -1
  88. package/lib/commands/init/index.js +1 -1
  89. package/lib/commands/issue/index.js +1 -1
  90. package/lib/commands/issue/nudge.js +1 -1
  91. package/lib/commands/issue/report.js +1 -1
  92. package/lib/commands/issue/shared.js +1 -1
  93. package/lib/commands/logs/index.js +1 -1
  94. package/lib/commands/menu/index.js +1 -1
  95. package/lib/commands/menu/list.js +1 -1
  96. package/lib/commands/menu/shared/compare-table.js +1 -1
  97. package/lib/commands/menu/shared/index.js +1 -1
  98. package/lib/commands/menu/shared/inquirer.js +1 -1
  99. package/lib/commands/menu/shared/local-pages.js +1 -1
  100. package/lib/commands/menu/shared/logic.js +1 -1
  101. package/lib/commands/menu/shared/service.js +1 -1
  102. package/lib/commands/menu/shared/sync-core.js +1 -1
  103. package/lib/commands/menu/shared/update-core.js +1 -1
  104. package/lib/commands/menu/shared/valid-url.js +1 -1
  105. package/lib/commands/menu/sync.js +1 -1
  106. package/lib/commands/menu/update.js +1 -1
  107. package/lib/commands/page/generate-start.js +1 -1
  108. package/lib/commands/page/generate-status.js +1 -1
  109. package/lib/commands/page/index.js +1 -1
  110. package/lib/commands/page/pull.js +1 -1
  111. package/lib/commands/page/push.js +1 -1
  112. package/lib/commands/page/relation-audit.js +1 -1
  113. package/lib/commands/page/shared.js +1 -1
  114. package/lib/commands/page/standard-page-status.js +1 -1
  115. package/lib/commands/page/sync.js +1 -1
  116. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  117. package/lib/commands/project/create/format-elapsed.js +1 -1
  118. package/lib/commands/project/create/main.js +1 -1
  119. package/lib/commands/project/create/non-interactive.js +1 -1
  120. package/lib/commands/project/create/project-template-path.js +1 -1
  121. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  122. package/lib/commands/project/create/use-format-code.js +1 -1
  123. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  124. package/lib/commands/project/index.js +1 -1
  125. package/lib/commands/project/init.js +1 -1
  126. package/lib/commands/project/upgrade.js +1 -1
  127. package/lib/commands/registry.js +1 -1
  128. package/lib/commands/run/index.js +1 -1
  129. package/lib/commands/schema.js +1 -1
  130. package/lib/commands/sql/create.js +1 -1
  131. package/lib/commands/sql/delete.js +1 -1
  132. package/lib/commands/sql/detail.js +1 -1
  133. package/lib/commands/sql/exec.js +1 -1
  134. package/lib/commands/sql/index.js +1 -1
  135. package/lib/commands/sql/list.js +1 -1
  136. package/lib/commands/sql/pull.js +1 -1
  137. package/lib/commands/sql/push.js +1 -1
  138. package/lib/commands/sql/save.js +1 -1
  139. package/lib/commands/sql/shared.js +1 -1
  140. package/lib/commands/sql/status.js +1 -1
  141. package/lib/commands/sql/validate.js +1 -1
  142. package/lib/commands/workspace/index.js +1 -1
  143. package/lib/config/schema.js +1 -1
  144. package/lib/constant/cdn.js +1 -1
  145. package/lib/constant/cli.js +1 -1
  146. package/lib/constant/defaults.js +1 -1
  147. package/lib/constant/domain.js +1 -1
  148. package/lib/constant/env.js +1 -1
  149. package/lib/constant/output.js +1 -1
  150. package/lib/constant/paths.js +1 -1
  151. package/lib/constant/risk.js +1 -1
  152. package/lib/context/app-resolver.js +1 -1
  153. package/lib/context/auth-resolver.js +1 -1
  154. package/lib/context/config-loader.js +1 -1
  155. package/lib/context.js +1 -1
  156. package/lib/core/alias-resolver.js +1 -1
  157. package/lib/core/api-client.js +1 -1
  158. package/lib/core/bff/config.js +1 -1
  159. package/lib/core/bff/file-system.js +1 -1
  160. package/lib/core/bff/hash.js +1 -1
  161. package/lib/core/bff/lock.js +1 -1
  162. package/lib/core/bff/utils.js +1 -1
  163. package/lib/core/db-resolver.js +1 -1
  164. package/lib/core/page/file-system.js +1 -1
  165. package/lib/core/page/hash.js +1 -1
  166. package/lib/core/page/lock.js +1 -1
  167. package/lib/core/sql-sync/config.js +1 -1
  168. package/lib/core/sql-sync/file-system.js +1 -1
  169. package/lib/core/sql-sync/hash.js +1 -1
  170. package/lib/core/sql-sync/lock.js +1 -1
  171. package/lib/core/sql-sync/utils.js +1 -1
  172. package/lib/core/sql-validator.js +1 -1
  173. package/lib/errors.js +1 -1
  174. package/lib/framework/build-all-flags.js +1 -1
  175. package/lib/framework/flags.js +1 -1
  176. package/lib/framework/help.js +1 -1
  177. package/lib/framework/index.js +1 -1
  178. package/lib/framework/output.js +1 -1
  179. package/lib/framework/response.js +1 -1
  180. package/lib/framework/runner-alias.js +1 -1
  181. package/lib/framework/runner.js +1 -1
  182. package/lib/framework/schema-export.js +1 -1
  183. package/lib/framework/types.js +1 -1
  184. package/lib/generated/build-info.js +1 -1
  185. package/lib/help.js +1 -1
  186. package/lib/skills/main.js +1 -1
  187. package/lib/skills/npx-skills-add.js +1 -1
  188. package/lib/telemetry/cli-command-trace.js +1 -1
  189. package/lib/telemetry/cli-help-trace.js +1 -1
  190. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  191. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  192. package/lib/telemetry/send-cli-trace-log.js +1 -1
  193. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  194. package/lib/utils/ai_config.js +1 -1
  195. package/lib/utils/apply-jq-filter.js +1 -1
  196. package/lib/utils/cdn-config.js +1 -1
  197. package/lib/utils/check-sdk-version.js +1 -1
  198. package/lib/utils/cli-version-check.js +1 -1
  199. package/lib/utils/cli-version-policy.js +1 -1
  200. package/lib/utils/config.js +1 -1
  201. package/lib/utils/copy-directory.js +1 -1
  202. package/lib/utils/entity-with-id.js +1 -1
  203. package/lib/utils/file-utils.js +1 -1
  204. package/lib/utils/guides-cdn.js +1 -1
  205. package/lib/utils/http-client.js +1 -1
  206. package/lib/utils/is-non-interactive.js +1 -1
  207. package/lib/utils/logger.js +1 -1
  208. package/lib/utils/params.js +1 -1
  209. package/lib/utils/platform.js +1 -1
  210. package/lib/utils/rules-cdn.js +1 -1
  211. package/lib/utils/sleep.js +1 -1
  212. package/lib/utils/template-replacer.js +1 -1
  213. package/lib/utils/update-notice.js +1 -1
  214. package/lib/utils/version.js +1 -1
  215. package/lib/utils/with-active-cookie.js +1 -1
  216. package/lib/utils/write-cli-side-channel.js +1 -1
  217. package/package.json +1 -1
  218. package/lib/commands/skill/index.js +0 -1
@@ -1 +1 @@
1
- (function(_0x307965,_0x4c951d){const _0x539558=a115_0x3b48,_0x36ca43=_0x307965();while(!![]){try{const _0x432268=-parseInt(_0x539558(0x199))/0x1+-parseInt(_0x539558(0x197))/0x2+-parseInt(_0x539558(0x18e))/0x3*(-parseInt(_0x539558(0x189))/0x4)+-parseInt(_0x539558(0x18a))/0x5*(-parseInt(_0x539558(0x1a4))/0x6)+-parseInt(_0x539558(0x19b))/0x7*(parseInt(_0x539558(0x18f))/0x8)+parseInt(_0x539558(0x1a3))/0x9*(-parseInt(_0x539558(0x1a2))/0xa)+-parseInt(_0x539558(0x19f))/0xb*(-parseInt(_0x539558(0x187))/0xc);if(_0x432268===_0x4c951d)break;else _0x36ca43['push'](_0x36ca43['shift']());}catch(_0x2ee15d){_0x36ca43['push'](_0x36ca43['shift']());}}}(a115_0x1142,0x64030));import{existsSync}from'node:fs';import a115_0xee1439 from'node:path';import a115_0x18ccc0 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a115_0x1142(){const _0x6ef2a7=['39430Qjvzow','963RPtbDn','2995650KXlrbt','6319884joyGci','cyan','14856VtoErJ','5mLfYVX','log','Logged\x20in','my-app','489fpAfCL','8pHkXoq','trim','√\x20Login\x20status:\x20','length','\x22\x20already\x20exists','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Project\x20name:','production','955908KCPZKX','env','60202hRZCdD','green','5517862AizHry','Directory\x20\x22','Project\x20name\x20cannot\x20exceed\x2050\x20characters','Not\x20set','22LpArrs','test','Login\x20failed'];a115_0x1142=function(){return _0x6ef2a7;};return a115_0x1142();}import{readConfig}from'../../../utils/config.js';function a115_0x3b48(_0x3008a5,_0x1783f9){_0x3008a5=_0x3008a5-0x187;const _0x114274=a115_0x1142();let _0x3b48b8=_0x114274[_0x3008a5];return _0x3b48b8;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0xb2a997,_0x512cad,_0x4ea6fb){const _0x4e5c7e=a115_0x3b48,_0x517eeb=_0x4e5c7e(0x18d),_0x3312f9=readConfig(),_0x21fa1e=typeof _0x3312f9['env']==='string'?_0x3312f9[_0x4e5c7e(0x198)]:undefined,_0x29b90d=await input({'message':_0x4e5c7e(0x195),'default':_0x517eeb,'validate':_0x3297f5=>{const _0x4d4bcd=_0x4e5c7e,_0x19bb4b=_0x3297f5[_0x4d4bcd(0x190)]()||_0x517eeb;if(_0x19bb4b[_0x4d4bcd(0x192)]>0x32)return _0x4d4bcd(0x19d);const _0x59a15e=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x19bb4b&&!_0x59a15e[_0x4d4bcd(0x1a0)](_0x19bb4b))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x1e9c90=a115_0xee1439['resolve'](process['cwd'](),_0x19bb4b);if(existsSync(_0x1e9c90))return _0x4d4bcd(0x19c)+_0x19bb4b+_0x4d4bcd(0x193);return!![];}});console['log'](a115_0x18ccc0['green']('√\x20Project\x20Name:\x20'+a115_0x18ccc0[_0x4e5c7e(0x188)](_0x29b90d)));const _0x3fd522=await selectSingleAppcode(_0x4ea6fb);console[_0x4e5c7e(0x18b)](a115_0x18ccc0[_0x4e5c7e(0x19a)]('√\x20App\x20Code:\x20'+a115_0x18ccc0[_0x4e5c7e(0x188)](_0x3fd522||_0x4e5c7e(0x19e))));if(_0x3fd522){const _0x4ad567=await getIsSessionValid();if(!_0x4ad567){const _0x1e288c=await confirm({'message':_0x4e5c7e(0x194),'default':!![]});if(_0x1e288c){const _0xb15870=await authServer({'silent':!![]});console[_0x4e5c7e(0x18b)](a115_0x18ccc0[_0x4e5c7e(0x19a)](_0x4e5c7e(0x191)+a115_0x18ccc0['cyan'](_0xb15870?_0x4e5c7e(0x18c):_0x4e5c7e(0x1a1))));}else console[_0x4e5c7e(0x18b)](a115_0x18ccc0[_0x4e5c7e(0x19a)](_0x4e5c7e(0x191)+a115_0x18ccc0[_0x4e5c7e(0x188)]('Skipped')));}await _0xb2a997({'projectName':_0x29b90d,'appCode':_0x3fd522,'env':_0x512cad||_0x21fa1e||_0x4e5c7e(0x196)});}else await _0xb2a997({'projectName':_0x29b90d,'env':_0x512cad||_0x21fa1e||_0x4e5c7e(0x196)});}
1
+ (function(_0x59568c,_0x570042){const _0x47d841=a116_0x2d9a,_0x3424b2=_0x59568c();while(!![]){try{const _0x2e5fb3=parseInt(_0x47d841(0x124))/0x1+-parseInt(_0x47d841(0x127))/0x2*(parseInt(_0x47d841(0x12f))/0x3)+-parseInt(_0x47d841(0x137))/0x4*(-parseInt(_0x47d841(0x13b))/0x5)+parseInt(_0x47d841(0x138))/0x6+-parseInt(_0x47d841(0x122))/0x7*(parseInt(_0x47d841(0x136))/0x8)+parseInt(_0x47d841(0x125))/0x9+-parseInt(_0x47d841(0x135))/0xa;if(_0x2e5fb3===_0x570042)break;else _0x3424b2['push'](_0x3424b2['shift']());}catch(_0x3433b0){_0x3424b2['push'](_0x3424b2['shift']());}}}(a116_0xd32c,0xe56f1));function a116_0x2d9a(_0x2fe5a8,_0x260518){_0x2fe5a8=_0x2fe5a8-0x120;const _0xd32c0a=a116_0xd32c();let _0x2d9af7=_0xd32c0a[_0x2fe5a8];return _0x2d9af7;}import{existsSync}from'node:fs';import a116_0xd0e145 from'node:path';import a116_0x414ca7 from'chalk';import{input,confirm}from'@inquirer/prompts';function a116_0xd32c(){const _0x190813=['115649vAdYqg','14410638YYqHGH','env','2ktBjth','test','\x22\x20already\x20exists','Not\x20set','resolve','√\x20Login\x20status:\x20','log','Logged\x20in','3029241tRUOht','cwd','Skipped','string','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Directory\x20\x22','8214780PNqsrC','11432264iMcNeR','16BHigxu','7591920aksojt','my-app','Project\x20name:','1522335mDfjUs','green','length','production','Project\x20name\x20cannot\x20exceed\x2050\x20characters','7daRINt','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_'];a116_0xd32c=function(){return _0x190813;};return a116_0xd32c();}import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x3913cb,_0x148ec9,_0x379f64){const _0x5f512c=a116_0x2d9a,_0x2f4198=_0x5f512c(0x139),_0x51def5=readConfig(),_0x50d1d6=typeof _0x51def5[_0x5f512c(0x126)]===_0x5f512c(0x132)?_0x51def5[_0x5f512c(0x126)]:undefined,_0x3eadbe=await input({'message':_0x5f512c(0x13a),'default':_0x2f4198,'validate':_0x5805e7=>{const _0xcdc074=_0x5f512c,_0x50d461=_0x5805e7['trim']()||_0x2f4198;if(_0x50d461[_0xcdc074(0x13d)]>0x32)return _0xcdc074(0x121);const _0x50a544=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x50d461&&!_0x50a544[_0xcdc074(0x128)](_0x50d461))return _0xcdc074(0x123);const _0x4b9538=a116_0xd0e145[_0xcdc074(0x12b)](process[_0xcdc074(0x130)](),_0x50d461);if(existsSync(_0x4b9538))return _0xcdc074(0x134)+_0x50d461+_0xcdc074(0x129);return!![];}});console[_0x5f512c(0x12d)](a116_0x414ca7[_0x5f512c(0x13c)]('√\x20Project\x20Name:\x20'+a116_0x414ca7['cyan'](_0x3eadbe)));const _0x28aa02=await selectSingleAppcode(_0x379f64);console[_0x5f512c(0x12d)](a116_0x414ca7[_0x5f512c(0x13c)]('√\x20App\x20Code:\x20'+a116_0x414ca7['cyan'](_0x28aa02||_0x5f512c(0x12a))));if(_0x28aa02){const _0xa57619=await getIsSessionValid();if(!_0xa57619){const _0x1e5643=await confirm({'message':_0x5f512c(0x133),'default':!![]});if(_0x1e5643){const _0x4c9c54=await authServer({'silent':!![]});console[_0x5f512c(0x12d)](a116_0x414ca7[_0x5f512c(0x13c)](_0x5f512c(0x12c)+a116_0x414ca7['cyan'](_0x4c9c54?_0x5f512c(0x12e):'Login\x20failed')));}else console['log'](a116_0x414ca7[_0x5f512c(0x13c)](_0x5f512c(0x12c)+a116_0x414ca7['cyan'](_0x5f512c(0x131))));}await _0x3913cb({'projectName':_0x3eadbe,'appCode':_0x28aa02,'env':_0x148ec9||_0x50d1d6||_0x5f512c(0x120)});}else await _0x3913cb({'projectName':_0x3eadbe,'env':_0x148ec9||_0x50d1d6||_0x5f512c(0x120)});}
@@ -1 +1 @@
1
- (function(_0x28c34a,_0x916944){const _0xcae739=a116_0x480c,_0x34a182=_0x28c34a();while(!![]){try{const _0x27239d=-parseInt(_0xcae739(0x11b))/0x1*(-parseInt(_0xcae739(0x11e))/0x2)+-parseInt(_0xcae739(0x122))/0x3+-parseInt(_0xcae739(0x120))/0x4+parseInt(_0xcae739(0x11f))/0x5+parseInt(_0xcae739(0x125))/0x6+parseInt(_0xcae739(0x11d))/0x7+parseInt(_0xcae739(0x123))/0x8;if(_0x27239d===_0x916944)break;else _0x34a182['push'](_0x34a182['shift']());}catch(_0x3f957f){_0x34a182['push'](_0x34a182['shift']());}}}(a116_0x1603,0x38ce3));function a116_0x1603(){const _0x409e0c=['875024emUtag','now','689946PmImjY','408019BGYjkh','replace','919548DNfaAY','2ShSNeQ','870560MYAGmo','1626492ZOUOii','toFixed','895698PVTcxn'];a116_0x1603=function(){return _0x409e0c;};return a116_0x1603();}function a116_0x480c(_0x61e5a1,_0x1d577b){_0x61e5a1=_0x61e5a1-0x11b;const _0x160304=a116_0x1603();let _0x480c25=_0x160304[_0x61e5a1];return _0x480c25;}export function formatElapsed(_0x43b564){const _0x564c7a=a116_0x480c,_0x4481ba=Date[_0x564c7a(0x124)]()-_0x43b564;if(_0x4481ba<0x3e8)return _0x4481ba+'ms';const _0x3028cb=(_0x4481ba/0x3e8)[_0x564c7a(0x121)](0x2),_0x5bab1a=_0x3028cb[_0x564c7a(0x11c)](/\.?0+$/u,'');return _0x5bab1a+'s';}
1
+ function a117_0x1d40(){const _0xae97b0=['replace','27440UUUZBh','112458VEYonM','toFixed','now','196igmqAV','18068MQYMsz','265641mtuGhs','25HWBRwz','272496LoFWmF','11408MPRPms','2734551kudDuD'];a117_0x1d40=function(){return _0xae97b0;};return a117_0x1d40();}function a117_0x2ff0(_0x372f76,_0xf4d1ed){_0x372f76=_0x372f76-0x193;const _0x1d400a=a117_0x1d40();let _0x2ff0d2=_0x1d400a[_0x372f76];return _0x2ff0d2;}(function(_0x143810,_0x305ccc){const _0x38161f=a117_0x2ff0,_0x54e560=_0x143810();while(!![]){try{const _0x1de422=-parseInt(_0x38161f(0x19c))/0x1+-parseInt(_0x38161f(0x19d))/0x2+-parseInt(_0x38161f(0x196))/0x3+-parseInt(_0x38161f(0x195))/0x4*(parseInt(_0x38161f(0x197))/0x5)+parseInt(_0x38161f(0x198))/0x6+-parseInt(_0x38161f(0x194))/0x7*(parseInt(_0x38161f(0x199))/0x8)+parseInt(_0x38161f(0x19a))/0x9;if(_0x1de422===_0x305ccc)break;else _0x54e560['push'](_0x54e560['shift']());}catch(_0x57f854){_0x54e560['push'](_0x54e560['shift']());}}}(a117_0x1d40,0x1bf5e));export function formatElapsed(_0x156653){const _0x570470=a117_0x2ff0,_0x29da73=Date[_0x570470(0x193)]()-_0x156653;if(_0x29da73<0x3e8)return _0x29da73+'ms';const _0x293c50=(_0x29da73/0x3e8)[_0x570470(0x19e)](0x2),_0x333836=_0x293c50[_0x570470(0x19b)](/\.?0+$/u,'');return _0x333836+'s';}
@@ -1 +1 @@
1
- (function(_0x5a1aa0,_0x29a27e){const _0x1d4025=a117_0x507f,_0x4b207b=_0x5a1aa0();while(!![]){try{const _0x25b532=-parseInt(_0x1d4025(0x1b7))/0x1*(-parseInt(_0x1d4025(0x1cc))/0x2)+-parseInt(_0x1d4025(0x1cb))/0x3+-parseInt(_0x1d4025(0x1ac))/0x4*(parseInt(_0x1d4025(0x1a1))/0x5)+parseInt(_0x1d4025(0x1ce))/0x6*(-parseInt(_0x1d4025(0x1bd))/0x7)+-parseInt(_0x1d4025(0x1d0))/0x8+parseInt(_0x1d4025(0x196))/0x9*(parseInt(_0x1d4025(0x19c))/0xa)+-parseInt(_0x1d4025(0x195))/0xb*(-parseInt(_0x1d4025(0x1c6))/0xc);if(_0x25b532===_0x29a27e)break;else _0x4b207b['push'](_0x4b207b['shift']());}catch(_0x4ffcc2){_0x4b207b['push'](_0x4b207b['shift']());}}}(a117_0x2f4e,0x94029));import a117_0x445f46 from'path';function a117_0x507f(_0x994970,_0x5e6b27){_0x994970=_0x994970-0x191;const _0x2f4ef9=a117_0x2f4e();let _0x507fb4=_0x2f4ef9[_0x994970];return _0x507fb4;}import a117_0x7c601 from'fs';import a117_0x12a32b from'chalk';import a117_0x14578a from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';function a117_0x2f4e(){const _0x1b304d=['appCode','\x20\x201.\x20Start\x20project:\x20','24197IkxaKi','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20already\x20exists','create','existsSync','\x20config\x20set\x20appcode\x20<app-code>\x27','7192409dcovYl','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','setLogPath','Project\x20name\x20cannot\x20be\x20empty','CLI\x20版本检查','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','currentVersion','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','API\x20配置拉取异常','276QsgnLK','配置应用AppCode:\x20','更新\x20package.json\x20失败','bold','cookie','2979003LBblJK','26XLaHgV','\x20api\x20pull','6lYMOhJ','projectCode','2829104wySirE','chdir','constants','更新\x20package.json\x20name','🚀\x20Next\x20Steps:','√\x20Pulled\x20','\x20dataset(s),\x20generated\x20','resolve','message','\x20|\x20AppCode:\x20','length','\x20model(s)','stableVersion','\x20√\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','配置应用AppCode失败','version','API\x20configuration\x20pulled:\x20','toLocaleString','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Install\x20dependencies','utf8','*\x20Pulling\x20API\x20configuration...','projectName','√\x20package.json\x20updated:\x20name=','cd\x20','info','rmSync','error','warn','清理项目目录失败:\x20','description','package.json','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','项目创建完成:\x20','parse','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','readFileSync','Project\x20directory\x20','defaultApp','W_OK','dirname','1121725LWLIfS','36ybjRuB','keys','cyan','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','...','string','2083100SQEQII','项目创建失败:\x20','repeat','gray','log','5ApBQOM','success','开始创建项目:\x20','needsUpgrade','√\x20Configuration\x20file\x20created,\x20Apps:\x20','writeFileSync','production','1.0.0','\x20|\x20Default:\x20','accessSync','env','2051404mtoGgb','test','join','Project\x20name:\x20','apps','stop','trim','\x20Generated\x20by\x20rabetbase\x20cli\x20','green'];a117_0x2f4e=function(){return _0x1b304d;};return a117_0x2f4e();}import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';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(_0x2770af){const _0x493f0e=a117_0x507f,_0x4ede19=await checkCliVersion();(_0x4ede19[_0x493f0e(0x1a4)]||_0x4ede19['belowMinimum'])&&(printCliUpgradeWarning(_0x4ede19),assertCliVersionSupported(_0x4ede19),logger[_0x493f0e(0x1ea)](_0x493f0e(0x1ba),_0x493f0e(0x1c1),{'currentVersion':_0x4ede19[_0x493f0e(0x1c3)],'stableVersion':_0x4ede19[_0x493f0e(0x1dc)],'minimumVersion':_0x4ede19['minimumVersion'],'needsUpgrade':_0x4ede19[_0x493f0e(0x1a4)],'belowMinimum':_0x4ede19['belowMinimum']}));if(_0x2770af['projectCode']&&_0x2770af['appCode'])await runCreate({'projectName':_0x2770af[_0x493f0e(0x1cf)],'appCode':_0x2770af[_0x493f0e(0x1b5)],'env':_0x2770af[_0x493f0e(0x1ab)]},_0x2770af);else{if(_0x2770af[_0x493f0e(0x1cf)]){const _0xb07308=await selectSingleAppcode(_0x2770af['cookie']);await runCreate({'projectName':_0x2770af[_0x493f0e(0x1cf)],'appCode':_0xb07308||undefined,'env':_0x2770af['env']},_0x2770af);}else await guidedCreateProject(_0x56b557=>runCreate(_0x56b557,_0x2770af),_0x2770af['env'],_0x2770af['cookie']);}}async function runCreate(_0x484743,_0x572f2d){const _0x311045=a117_0x507f;if(!_0x484743[_0x311045(0x1e7)]||_0x484743[_0x311045(0x1e7)][_0x311045(0x1b2)]()==='')throw new Error(_0x311045(0x1c0));const _0xd46b68=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xd46b68[_0x311045(0x1ad)](_0x484743[_0x311045(0x1e7)]))throw new Error(_0x311045(0x1f1));if(_0x484743['projectName'][_0x311045(0x1da)]>0x64)throw new Error(_0x311045(0x1de));const _0x281f4f=a117_0x445f46[_0x311045(0x1d7)](process['cwd'](),_0x484743[_0x311045(0x1e7)]);if(a117_0x7c601[_0x311045(0x1bb)](_0x281f4f))throw new Error(_0x311045(0x191)+_0x484743[_0x311045(0x1e7)]+_0x311045(0x1b9));try{a117_0x7c601[_0x311045(0x1aa)](a117_0x445f46[_0x311045(0x194)](_0x281f4f),a117_0x7c601[_0x311045(0x1d2)][_0x311045(0x193)]);}catch{throw new Error(_0x311045(0x1f4));}logger[_0x311045(0x1bf)](_0x281f4f),logger[_0x311045(0x1ea)]('create',_0x311045(0x1a3)+_0x484743['projectName'],{'projectDir':_0x281f4f,'appCode':_0x484743[_0x311045(0x1b5)]}),console[_0x311045(0x1a0)](),console['log'](a117_0x12a32b[_0x311045(0x1b4)](_0x311045(0x1dd))+_0x311045(0x1af)+a117_0x12a32b[_0x311045(0x1b4)](_0x484743[_0x311045(0x1e7)])+(_0x484743[_0x311045(0x1b5)]?_0x311045(0x1d9)+a117_0x12a32b[_0x311045(0x198)](_0x484743[_0x311045(0x1b5)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x484743['projectName'])),await updatePackageJsonName(_0x484743[_0x311045(0x1e7)]),await runTask(_0x311045(0x1e4),()=>installDependencies(_0x484743[_0x311045(0x1e7)])),await runTask('Format\x20code',()=>formatProjectCode(_0x484743[_0x311045(0x1e7)])),await configureAppCode(_0x484743[_0x311045(0x1e7)],_0x484743[_0x311045(0x1b5)]||'',_0x484743[_0x311045(0x1ab)]);let _0x289cee=![];if(_0x484743[_0x311045(0x1b5)]){console[_0x311045(0x1a0)](_0x311045(0x1e6));const _0x40ce3d=process['cwd']();try{process[_0x311045(0x1d1)](_0x281f4f);const _0x1c2c52=_0x484743[_0x311045(0x1ab)]||_0x311045(0x1a7);initEnv(_0x1c2c52);const {configArray:_0x5d4ec9}=await fetchModelList(_0x484743[_0x311045(0x1b5)],_0x572f2d[_0x311045(0x1ca)]||''),_0x34f919=DEFAULT_API_DIR,_0x421a5c=await generateApiFile(_0x5d4ec9,'',_0x484743['appCode'],!![],_0x1c2c52,_0x34f919);console['log'](_0x311045(0x1d5)+_0x5d4ec9['length']+_0x311045(0x1d6)+_0x421a5c['modelCount']+_0x311045(0x1db)),logger['info'](_0x311045(0x1ba),_0x311045(0x1e1)+_0x484743[_0x311045(0x1b5)]);}catch(_0x2c45ff){_0x289cee=!![],console[_0x311045(0x1a0)](_0x311045(0x1c2)),logger[_0x311045(0x1ed)](_0x311045(0x1ba),_0x311045(0x1c5),{'error':_0x2c45ff instanceof Error?_0x2c45ff['message']:String(_0x2c45ff)});}finally{process[_0x311045(0x1d1)](_0x40ce3d);}}logger[_0x311045(0x1a2)](_0x311045(0x1ba),_0x311045(0x1f2)+_0x484743['projectName']),console['log'](),console[_0x311045(0x1a0)](a117_0x12a32b[_0x311045(0x1b4)]('─'[_0x311045(0x19e)](0x3c))),console[_0x311045(0x1a0)](a117_0x12a32b[_0x311045(0x198)]['bold'](_0x311045(0x1d4))),console[_0x311045(0x1a0)](),console[_0x311045(0x1a0)](_0x311045(0x1b6)+a117_0x12a32b[_0x311045(0x198)]['bold'](_0x311045(0x1e9)+_0x484743[_0x311045(0x1e7)]+'\x20&&\x20'+CLI_BIN_NAME+'\x20run\x20start')),_0x289cee&&console[_0x311045(0x1a0)](_0x311045(0x1e3)+a117_0x12a32b[_0x311045(0x198)][_0x311045(0x1c9)](CLI_BIN_NAME+_0x311045(0x1cd))),console[_0x311045(0x1a0)](a117_0x12a32b[_0x311045(0x1b4)]('─'[_0x311045(0x19e)](0x3c)));}catch(_0x2b89b4){logger['error'](_0x311045(0x1ba),_0x311045(0x19d)+_0x484743[_0x311045(0x1e7)],{'error':_0x2b89b4 instanceof Error?_0x2b89b4[_0x311045(0x1d8)]:String(_0x2b89b4)});try{a117_0x7c601['existsSync'](_0x281f4f)&&(console[_0x311045(0x1a0)](_0x311045(0x1be)+_0x281f4f),a117_0x7c601[_0x311045(0x1eb)](_0x281f4f,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x311045(0x1ba),_0x311045(0x1ee)+_0x281f4f);}throw _0x2b89b4;}}async function runTask(_0x4f1e0c,_0x281ecb){const _0x3a0d05=a117_0x507f,_0x531b7b=a117_0x14578a(_0x4f1e0c+_0x3a0d05(0x19a))['start']();try{const _0x3763af=await _0x281ecb();_0x531b7b[_0x3a0d05(0x1b1)](),console['log'](''+a117_0x12a32b[_0x3a0d05(0x1b4)](_0x3a0d05(0x1dd))+_0x4f1e0c+'\x20'+a117_0x12a32b[_0x3a0d05(0x19f)]('['+_0x3763af+']'));}catch(_0x2696b4){_0x531b7b['fail'](_0x4f1e0c);throw _0x2696b4;}}async function updatePackageJsonName(_0x56cc5a){const _0x1235cd=a117_0x507f,_0x3cde11=a117_0x445f46['resolve'](process['cwd'](),_0x56cc5a),_0x424535=a117_0x445f46[_0x1235cd(0x1ae)](_0x3cde11,_0x1235cd(0x1f0));try{console[_0x1235cd(0x1a0)](_0x1235cd(0x1c4));const _0x4f3e00=getRabetbaseCliPackageRoot(),_0x57a873=a117_0x445f46[_0x1235cd(0x1ae)](_0x4f3e00,_0x1235cd(0x1f0));let _0x5e863b=_0x1235cd(0x1a8);try{const _0x1897e9=JSON['parse'](a117_0x7c601[_0x1235cd(0x1f5)](_0x57a873,_0x1235cd(0x1e5)));_0x5e863b=_0x1897e9[_0x1235cd(0x1e0)]||_0x1235cd(0x1a8);}catch{}const _0x8495d2=a117_0x7c601[_0x1235cd(0x1f5)](_0x424535,_0x1235cd(0x1e5)),_0x39b58c=JSON[_0x1235cd(0x1f3)](_0x8495d2);_0x39b58c['name']=_0x56cc5a,_0x39b58c[_0x1235cd(0x1ef)]=_0x56cc5a+_0x1235cd(0x1b3)+_0x5e863b,a117_0x7c601[_0x1235cd(0x1a6)](_0x424535,JSON['stringify'](_0x39b58c,null,0x2)+'\x0a',_0x1235cd(0x1e5)),console[_0x1235cd(0x1a0)](_0x1235cd(0x1e8)+_0x56cc5a),logger[_0x1235cd(0x1ea)](_0x1235cd(0x1ba),_0x1235cd(0x1d3));}catch(_0x537409){logger[_0x1235cd(0x1ec)](_0x1235cd(0x1ba),_0x1235cd(0x1c8));throw _0x537409;}}async function configureAppCode(_0x155fd2,_0x137b53,_0x1408f2){const _0x248138=a117_0x507f,_0x3249f2=a117_0x445f46[_0x248138(0x1d7)](process['cwd'](),_0x155fd2),_0x13cad9=a117_0x445f46['join'](_0x3249f2,NEW_CONFIG_NAME);try{_0x137b53?console[_0x248138(0x1a0)](_0x248138(0x1b8)+_0x155fd2+':\x20'+_0x137b53):console[_0x248138(0x1a0)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x155fd2);const _0x335f3d=getRabetbaseCliPackageRoot(),_0x4e0cf8=a117_0x445f46[_0x248138(0x1ae)](_0x335f3d,_0x248138(0x1f0));let _0x1205ec='1.0.0';try{const _0x338997=JSON[_0x248138(0x1f3)](a117_0x7c601['readFileSync'](_0x4e0cf8,_0x248138(0x1e5)));_0x1205ec=_0x338997[_0x248138(0x1e0)]||_0x248138(0x1a8);}catch{}const _0x49282e=readConfig(),_0xe43d36=typeof _0x49282e[_0x248138(0x1ab)]===_0x248138(0x19b)?_0x49282e[_0x248138(0x1ab)]:undefined,_0x4de4f6={};for(const _0x240bc3 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x49282e[_0x240bc3]!=null)_0x4de4f6[_0x240bc3]=_0x49282e[_0x240bc3];}const _0x5666df=buildCanonicalProjectConfig(_0x4de4f6,{'appCodes':_0x137b53?[_0x137b53]:[],'env':_0x1408f2||_0xe43d36||_0x248138(0x1a7),'metadata':{'createdAt':new Date()[_0x248138(0x1e2)](),'version':_0x1205ec}});writeConfigFile(_0x13cad9,_0x5666df),_0x137b53?console[_0x248138(0x1a0)](_0x248138(0x1a5)+Object[_0x248138(0x197)](_0x5666df[_0x248138(0x1b0)]||{})[_0x248138(0x1ae)](',\x20')+_0x248138(0x1a9)+_0x5666df[_0x248138(0x192)]):console['log'](_0x248138(0x199)+CLI_BIN_NAME+_0x248138(0x1bc)),logger['info'](_0x248138(0x1ba),_0x248138(0x1c7)+_0x137b53);}catch(_0x4f7edb){logger[_0x248138(0x1ec)](_0x248138(0x1ba),_0x248138(0x1df));}}
1
+ (function(_0x117192,_0x17e5cf){const _0x5ed833=a118_0x20a5,_0x52d99a=_0x117192();while(!![]){try{const _0x20a5c0=parseInt(_0x5ed833(0xfc))/0x1*(-parseInt(_0x5ed833(0x117))/0x2)+parseInt(_0x5ed833(0x116))/0x3+-parseInt(_0x5ed833(0xbd))/0x4*(parseInt(_0x5ed833(0xd8))/0x5)+-parseInt(_0x5ed833(0xb8))/0x6+-parseInt(_0x5ed833(0xca))/0x7+parseInt(_0x5ed833(0xc3))/0x8*(-parseInt(_0x5ed833(0xf6))/0x9)+parseInt(_0x5ed833(0xe8))/0xa;if(_0x20a5c0===_0x17e5cf)break;else _0x52d99a['push'](_0x52d99a['shift']());}catch(_0x58f3af){_0x52d99a['push'](_0x52d99a['shift']());}}}(a118_0x4e83,0x6acb2));import a118_0x1c1cfc from'path';import a118_0x6887e from'fs';import a118_0x2ed7cb from'chalk';import a118_0x5d988a from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';function a118_0x4e83(){const _0x4398a3=['chdir','Project\x20directory\x20','\x20&&\x20','6898rNrGlt','Install\x20dependencies','\x20|\x20AppCode:\x20','projectCode','string','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20config\x20set\x20appcode\x20<app-code>\x27','√\x20Configuration\x20file\x20created,\x20Apps:\x20','1.0.0','readFileSync','√\x20package.json\x20updated:\x20name=','Project\x20name\x20cannot\x20be\x20empty','Project\x20name:\x20','log','green','resolve','更新\x20package.json\x20失败','start','utf8','\x20|\x20Default:\x20','repeat','cwd','项目创建失败:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','apps','Format\x20code','979023iEGBUA','236flVTzH','\x20api\x20pull','modelCount','info','903984UrrEVg','join','create','bold','\x20\x202.\x20Pull\x20API\x20configuration:\x20','99028GeEKZg','existsSync','length','version','\x20√\x20','keys','40gVPeNr','rmSync','setLogPath','清理项目目录失败:\x20','API\x20配置拉取异常','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','3405080SUWtib','\x20already\x20exists','name','API\x20configuration\x20pulled:\x20','*\x20Pulling\x20API\x20configuration...','minimumVersion','constants','production','success','\x20dataset(s),\x20generated\x20','warn','accessSync','trim','配置应用AppCode失败','25ZtpLAj','\x20model(s)','\x20run\x20start','项目创建完成:\x20','needsUpgrade','Copy\x20project\x20files','CLI\x20版本检查','belowMinimum','dirname','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','...','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','配置应用AppCode:\x20','gray','\x20\x201.\x20Start\x20project:\x20','开始创建项目:\x20','19657730PcMMtv','更新\x20package.json\x20name','description','W_OK','error','*\x20Configuring\x20AppCode\x20for\x20project\x20','cyan','cookie','defaultApp','env','projectName','parse','toLocaleString','package.json','503703QSCzcQ','🚀\x20Next\x20Steps:','appCode'];a118_0x4e83=function(){return _0x4398a3;};return a118_0x4e83();}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';function a118_0x20a5(_0x49ebe0,_0x3f14cf){_0x49ebe0=_0x49ebe0-0xb8;const _0x4e83ba=a118_0x4e83();let _0x20a5f4=_0x4e83ba[_0x49ebe0];return _0x20a5f4;}import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x2b60a1){const _0x5d9f00=a118_0x20a5,_0x1b48d7=await checkCliVersion();(_0x1b48d7[_0x5d9f00(0xdc)]||_0x1b48d7[_0x5d9f00(0xdf)])&&(printCliUpgradeWarning(_0x1b48d7),assertCliVersionSupported(_0x1b48d7),logger['info'](_0x5d9f00(0xba),_0x5d9f00(0xde),{'currentVersion':_0x1b48d7['currentVersion'],'stableVersion':_0x1b48d7['stableVersion'],'minimumVersion':_0x1b48d7[_0x5d9f00(0xcf)],'needsUpgrade':_0x1b48d7[_0x5d9f00(0xdc)],'belowMinimum':_0x1b48d7[_0x5d9f00(0xdf)]}));if(_0x2b60a1['projectCode']&&_0x2b60a1[_0x5d9f00(0xf8)])await runCreate({'projectName':_0x2b60a1[_0x5d9f00(0xff)],'appCode':_0x2b60a1[_0x5d9f00(0xf8)],'env':_0x2b60a1['env']},_0x2b60a1);else{if(_0x2b60a1['projectCode']){const _0x45454c=await selectSingleAppcode(_0x2b60a1[_0x5d9f00(0xef)]);await runCreate({'projectName':_0x2b60a1[_0x5d9f00(0xff)],'appCode':_0x45454c||undefined,'env':_0x2b60a1[_0x5d9f00(0xf1)]},_0x2b60a1);}else await guidedCreateProject(_0x5d2f3a=>runCreate(_0x5d2f3a,_0x2b60a1),_0x2b60a1[_0x5d9f00(0xf1)],_0x2b60a1[_0x5d9f00(0xef)]);}}async function runCreate(_0x38484d,_0x4d1e16){const _0x37652f=a118_0x20a5;if(!_0x38484d[_0x37652f(0xf2)]||_0x38484d[_0x37652f(0xf2)][_0x37652f(0xd6)]()==='')throw new Error(_0x37652f(0x107));const _0x16325b=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x16325b['test'](_0x38484d[_0x37652f(0xf2)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x38484d['projectName'][_0x37652f(0xbf)]>0x64)throw new Error(_0x37652f(0xe3));const _0x56b689=a118_0x1c1cfc[_0x37652f(0x10b)](process[_0x37652f(0x111)](),_0x38484d[_0x37652f(0xf2)]);if(a118_0x6887e[_0x37652f(0xbe)](_0x56b689))throw new Error(_0x37652f(0xfa)+_0x38484d[_0x37652f(0xf2)]+_0x37652f(0xcb));try{a118_0x6887e[_0x37652f(0xd5)](a118_0x1c1cfc[_0x37652f(0xe0)](_0x56b689),a118_0x6887e[_0x37652f(0xd0)][_0x37652f(0xeb)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x37652f(0xc5)](_0x56b689),logger[_0x37652f(0x11a)]('create',_0x37652f(0xe7)+_0x38484d[_0x37652f(0xf2)],{'projectDir':_0x56b689,'appCode':_0x38484d[_0x37652f(0xf8)]}),console[_0x37652f(0x109)](),console['log'](a118_0x2ed7cb[_0x37652f(0x10a)](_0x37652f(0xc1))+_0x37652f(0x108)+a118_0x2ed7cb[_0x37652f(0x10a)](_0x38484d[_0x37652f(0xf2)])+(_0x38484d['appCode']?_0x37652f(0xfe)+a118_0x2ed7cb['cyan'](_0x38484d[_0x37652f(0xf8)]):''));try{await runTask(_0x37652f(0xdd),()=>copyProjectTemplate(_0x38484d[_0x37652f(0xf2)])),await updatePackageJsonName(_0x38484d['projectName']),await runTask(_0x37652f(0xfd),()=>installDependencies(_0x38484d[_0x37652f(0xf2)])),await runTask(_0x37652f(0x115),()=>formatProjectCode(_0x38484d[_0x37652f(0xf2)])),await configureAppCode(_0x38484d[_0x37652f(0xf2)],_0x38484d['appCode']||'',_0x38484d[_0x37652f(0xf1)]);let _0x3af50b=![];if(_0x38484d[_0x37652f(0xf8)]){console[_0x37652f(0x109)](_0x37652f(0xce));const _0x4b677c=process['cwd']();try{process['chdir'](_0x56b689);const _0xa9e8b2=_0x38484d[_0x37652f(0xf1)]||'production';initEnv(_0xa9e8b2);const {configArray:_0x5dbc54}=await fetchModelList(_0x38484d[_0x37652f(0xf8)],_0x4d1e16['cookie']||''),_0x395c32=DEFAULT_API_DIR,_0x20b6cb=await generateApiFile(_0x5dbc54,'',_0x38484d[_0x37652f(0xf8)],!![],_0xa9e8b2,_0x395c32);console[_0x37652f(0x109)]('√\x20Pulled\x20'+_0x5dbc54[_0x37652f(0xbf)]+_0x37652f(0xd3)+_0x20b6cb[_0x37652f(0x119)]+_0x37652f(0xd9)),logger['info'](_0x37652f(0xba),_0x37652f(0xcd)+_0x38484d[_0x37652f(0xf8)]);}catch(_0x493fa4){_0x3af50b=!![],console[_0x37652f(0x109)](_0x37652f(0x101)),logger['warn']('create',_0x37652f(0xc7),{'error':_0x493fa4 instanceof Error?_0x493fa4['message']:String(_0x493fa4)});}finally{process[_0x37652f(0xf9)](_0x4b677c);}}logger[_0x37652f(0xd2)](_0x37652f(0xba),_0x37652f(0xdb)+_0x38484d[_0x37652f(0xf2)]),console[_0x37652f(0x109)](),console[_0x37652f(0x109)](a118_0x2ed7cb[_0x37652f(0x10a)]('─'[_0x37652f(0x110)](0x3c))),console['log'](a118_0x2ed7cb[_0x37652f(0xee)][_0x37652f(0xbb)](_0x37652f(0xf7))),console[_0x37652f(0x109)](),console[_0x37652f(0x109)](_0x37652f(0xe6)+a118_0x2ed7cb[_0x37652f(0xee)][_0x37652f(0xbb)]('cd\x20'+_0x38484d['projectName']+_0x37652f(0xfb)+CLI_BIN_NAME+_0x37652f(0xda))),_0x3af50b&&console[_0x37652f(0x109)](_0x37652f(0xbc)+a118_0x2ed7cb[_0x37652f(0xee)][_0x37652f(0xbb)](CLI_BIN_NAME+_0x37652f(0x118))),console['log'](a118_0x2ed7cb[_0x37652f(0x10a)]('─'[_0x37652f(0x110)](0x3c)));}catch(_0x482a5b){logger[_0x37652f(0xec)](_0x37652f(0xba),_0x37652f(0x112)+_0x38484d[_0x37652f(0xf2)],{'error':_0x482a5b instanceof Error?_0x482a5b['message']:String(_0x482a5b)});try{a118_0x6887e['existsSync'](_0x56b689)&&(console[_0x37652f(0x109)](_0x37652f(0xe1)+_0x56b689),a118_0x6887e[_0x37652f(0xc4)](_0x56b689,{'recursive':!![],'force':!![]}));}catch{logger[_0x37652f(0xd4)](_0x37652f(0xba),_0x37652f(0xc6)+_0x56b689);}throw _0x482a5b;}}async function runTask(_0x122bf9,_0x49fa7f){const _0xfad2a2=a118_0x20a5,_0x3d4e55=a118_0x5d988a(_0x122bf9+_0xfad2a2(0xe2))[_0xfad2a2(0x10d)]();try{const _0x39710f=await _0x49fa7f();_0x3d4e55['stop'](),console[_0xfad2a2(0x109)](''+a118_0x2ed7cb[_0xfad2a2(0x10a)]('\x20√\x20')+_0x122bf9+'\x20'+a118_0x2ed7cb[_0xfad2a2(0xe5)]('['+_0x39710f+']'));}catch(_0x5552e7){_0x3d4e55['fail'](_0x122bf9);throw _0x5552e7;}}async function updatePackageJsonName(_0xa989c7){const _0x311485=a118_0x20a5,_0x590ff3=a118_0x1c1cfc[_0x311485(0x10b)](process[_0x311485(0x111)](),_0xa989c7),_0xce7b50=a118_0x1c1cfc[_0x311485(0xb9)](_0x590ff3,_0x311485(0xf5));try{console['log'](_0x311485(0xc9));const _0x21bd7e=getRabetbaseCliPackageRoot(),_0x5590fb=a118_0x1c1cfc[_0x311485(0xb9)](_0x21bd7e,_0x311485(0xf5));let _0x4d6e62=_0x311485(0x104);try{const _0x1dd29f=JSON[_0x311485(0xf3)](a118_0x6887e[_0x311485(0x105)](_0x5590fb,_0x311485(0x10e)));_0x4d6e62=_0x1dd29f[_0x311485(0xc0)]||_0x311485(0x104);}catch{}const _0x54fce8=a118_0x6887e[_0x311485(0x105)](_0xce7b50,_0x311485(0x10e)),_0x7a5a82=JSON[_0x311485(0xf3)](_0x54fce8);_0x7a5a82[_0x311485(0xcc)]=_0xa989c7,_0x7a5a82[_0x311485(0xea)]=_0xa989c7+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x4d6e62,a118_0x6887e['writeFileSync'](_0xce7b50,JSON['stringify'](_0x7a5a82,null,0x2)+'\x0a',_0x311485(0x10e)),console[_0x311485(0x109)](_0x311485(0x106)+_0xa989c7),logger[_0x311485(0x11a)](_0x311485(0xba),_0x311485(0xe9));}catch(_0x10caf0){logger[_0x311485(0xec)](_0x311485(0xba),_0x311485(0x10c));throw _0x10caf0;}}async function configureAppCode(_0x250f11,_0x287ac5,_0x1033cc){const _0x4d8a65=a118_0x20a5,_0x4929a4=a118_0x1c1cfc[_0x4d8a65(0x10b)](process[_0x4d8a65(0x111)](),_0x250f11),_0x2abee2=a118_0x1c1cfc[_0x4d8a65(0xb9)](_0x4929a4,NEW_CONFIG_NAME);try{_0x287ac5?console[_0x4d8a65(0x109)](_0x4d8a65(0xed)+_0x250f11+':\x20'+_0x287ac5):console[_0x4d8a65(0x109)](_0x4d8a65(0x113)+_0x250f11);const _0x26acde=getRabetbaseCliPackageRoot(),_0x172628=a118_0x1c1cfc[_0x4d8a65(0xb9)](_0x26acde,_0x4d8a65(0xf5));let _0x28338e=_0x4d8a65(0x104);try{const _0x52a9b7=JSON['parse'](a118_0x6887e[_0x4d8a65(0x105)](_0x172628,_0x4d8a65(0x10e)));_0x28338e=_0x52a9b7[_0x4d8a65(0xc0)]||_0x4d8a65(0x104);}catch{}const _0x1e6d82=readConfig(),_0xebce95=typeof _0x1e6d82[_0x4d8a65(0xf1)]===_0x4d8a65(0x100)?_0x1e6d82[_0x4d8a65(0xf1)]:undefined,_0xbd8269={};for(const _0x2fff8d of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1e6d82[_0x2fff8d]!=null)_0xbd8269[_0x2fff8d]=_0x1e6d82[_0x2fff8d];}const _0x4417a2=buildCanonicalProjectConfig(_0xbd8269,{'appCodes':_0x287ac5?[_0x287ac5]:[],'env':_0x1033cc||_0xebce95||_0x4d8a65(0xd1),'metadata':{'createdAt':new Date()[_0x4d8a65(0xf4)](),'version':_0x28338e}});writeConfigFile(_0x2abee2,_0x4417a2),_0x287ac5?console[_0x4d8a65(0x109)](_0x4d8a65(0x103)+Object[_0x4d8a65(0xc2)](_0x4417a2[_0x4d8a65(0x114)]||{})[_0x4d8a65(0xb9)](',\x20')+_0x4d8a65(0x10f)+_0x4417a2[_0x4d8a65(0xf0)]):console[_0x4d8a65(0x109)](_0x4d8a65(0xc8)+CLI_BIN_NAME+_0x4d8a65(0x102)),logger[_0x4d8a65(0x11a)](_0x4d8a65(0xba),_0x4d8a65(0xe4)+_0x287ac5);}catch(_0x13494b){logger[_0x4d8a65(0xec)](_0x4d8a65(0xba),_0x4d8a65(0xd7));}}
@@ -1 +1 @@
1
- (function(_0x4ac508,_0x593297){const _0x4cb0b9=a118_0x18f1,_0x677176=_0x4ac508();while(!![]){try{const _0xe76099=parseInt(_0x4cb0b9(0x1b5))/0x1*(parseInt(_0x4cb0b9(0x1ac))/0x2)+parseInt(_0x4cb0b9(0x1ba))/0x3*(-parseInt(_0x4cb0b9(0x1ab))/0x4)+parseInt(_0x4cb0b9(0x1b7))/0x5+parseInt(_0x4cb0b9(0x1bd))/0x6*(parseInt(_0x4cb0b9(0x1dc))/0x7)+parseInt(_0x4cb0b9(0x1c5))/0x8+parseInt(_0x4cb0b9(0x1de))/0x9+parseInt(_0x4cb0b9(0x1c3))/0xa*(-parseInt(_0x4cb0b9(0x1b2))/0xb);if(_0xe76099===_0x593297)break;else _0x677176['push'](_0x677176['shift']());}catch(_0x500fea){_0x677176['push'](_0x677176['shift']());}}}(a118_0x112c,0xa2b05));import a118_0x557329 from'path';import a118_0x2ba4d2 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';function a118_0x18f1(_0x250c48,_0xa06e6a){_0x250c48=_0x250c48-0x1aa;const _0x112c36=a118_0x112c();let _0x18f1d3=_0x112c36[_0x250c48];return _0x18f1d3;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';function a118_0x112c(){const _0x598dc5=['1158AucyaU','*\x20Creating\x20project\x20','log','npm','needsUpgrade','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','7420lQIJOM','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','7538512WSvoza','\x22\x20already\x20exists.','\x20\x20Pulling\x20API\x20configuration...','belowMinimum','name','bun\x20--version','description','constants','chdir','\x20\x20√\x20Code\x20formatted','...','\x20\x20√\x20Configuration\x20file\x20created','readFile','Project\x20name\x20cannot\x20be\x20empty.','join','production','\x20created\x20successfully!','Cannot\x20create\x20project\x20in\x20current\x20directory.','resolve','\x20\x20rabetbase\x20run\x20start\x0a','cwd','length','writeFile','16233nJMXTG','bun','3252087MlBdyo','Project\x20directory\x20\x22','\x20\x20√\x20package.json\x20updated','parse','ignore','100ouaksB','2jhzHhC','Project\x20name\x20contains\x20invalid\x20characters.','\x20\x20√\x20Pulled\x20','dirname','\x20api\x20pull`\x20manually\x20later.','\x0a\x20\x20cd\x20','29524PireVx','W_OK','modelCount','1028081ZpbXDj','validation','2466855FeDrMd','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','stringify','73773zHqWFw','Check\x20directory\x20permissions.','\x20\x20Installing\x20dependencies...'];a118_0x112c=function(){return _0x598dc5;};return a118_0x112c();}const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x2076a6,_0x2a431b,_0x980243,_0xb090c7){const _0x3dc57a=a118_0x18f1,_0x560ed3=await checkCliVersion();(_0x560ed3[_0x3dc57a(0x1c1)]||_0x560ed3[_0x3dc57a(0x1c8)])&&(printCliUpgradeWarning(_0x560ed3),assertCliVersionSupported(_0x560ed3));if(!_0x2076a6||_0x2076a6['trim']()==='')throw CliErrors[_0x3dc57a(0x1b6)](_0x3dc57a(0x1d2));const _0x564194=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x564194['test'](_0x2076a6))throw CliErrors['validation'](_0x3dc57a(0x1ad),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x2076a6[_0x3dc57a(0x1da)]>0x64)throw CliErrors[_0x3dc57a(0x1b6)](_0x3dc57a(0x1b8));const _0x2fbe5b=a118_0x557329[_0x3dc57a(0x1d7)](process[_0x3dc57a(0x1d9)](),_0x2076a6);if(existsSync(_0x2fbe5b))throw CliErrors[_0x3dc57a(0x1b6)](_0x3dc57a(0x1df)+_0x2076a6+_0x3dc57a(0x1c6),'Use\x20a\x20different\x20project\x20name.');try{const _0x3e5fed=a118_0x557329[_0x3dc57a(0x1af)](_0x2fbe5b);await a118_0x2ba4d2['access'](_0x3e5fed,a118_0x2ba4d2[_0x3dc57a(0x1cc)][_0x3dc57a(0x1b3)]);}catch{throw CliErrors[_0x3dc57a(0x1b6)](_0x3dc57a(0x1d6),_0x3dc57a(0x1bb));}try{console['log'](_0x3dc57a(0x1be)+_0x2076a6+_0x3dc57a(0x1cf));const _0x3f1a59=getSubAppReactDemoTemplateDir();await copyDirectory(_0x3f1a59,_0x2fbe5b),console['log']('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x2076a6),console['log'](_0x3dc57a(0x1e0)),console[_0x3dc57a(0x1bf)](_0x3dc57a(0x1bc)),console[_0x3dc57a(0x1bf)](_0x3dc57a(0x1c4)),await formatCode(_0x2fbe5b),console[_0x3dc57a(0x1bf)](_0x3dc57a(0x1ce)),await configureProject(_0x2076a6,_0x980243,_0x2a431b),console[_0x3dc57a(0x1bf)](_0x3dc57a(0x1d0)),_0x980243&&await pullApiConfig(_0x2fbe5b,_0x980243,_0x2a431b,_0xb090c7),console['log']('\x0a√\x20Project\x20'+_0x2076a6+_0x3dc57a(0x1d5)),console['log'](_0x3dc57a(0x1b1)+_0x2076a6),console[_0x3dc57a(0x1bf)](_0x3dc57a(0x1d8));}catch(_0x460cb8){try{existsSync(_0x2fbe5b)&&await a118_0x2ba4d2['rm'](_0x2fbe5b,{'recursive':!![],'force':!![]});}catch{}throw _0x460cb8;}}async function updatePackageJsonName(_0x50dd15){const _0x37ee2f=a118_0x18f1,_0x53b0f1=a118_0x557329[_0x37ee2f(0x1d7)](process[_0x37ee2f(0x1d9)](),_0x50dd15),_0x260ae4=a118_0x557329['join'](_0x53b0f1,'package.json'),_0x2eb4f3=await a118_0x2ba4d2[_0x37ee2f(0x1d1)](_0x260ae4,'utf-8'),_0x5fb528=JSON[_0x37ee2f(0x1e1)](_0x2eb4f3);_0x5fb528[_0x37ee2f(0x1c9)]=_0x50dd15,_0x5fb528[_0x37ee2f(0x1cb)]=_0x37ee2f(0x1c2),await a118_0x2ba4d2[_0x37ee2f(0x1db)](_0x260ae4,JSON[_0x37ee2f(0x1b9)](_0x5fb528,null,0x2)+'\x0a');}function detectPackageManager(){const _0x39afc9=a118_0x18f1;try{return execSync(_0x39afc9(0x1ca),{'stdio':_0x39afc9(0x1aa)}),_0x39afc9(0x1dd);}catch{return _0x39afc9(0x1c0);}}async function formatCode(_0x2d2ea0){try{await execAsync('bun\x20run\x20format',{'cwd':_0x2d2ea0});}catch{}}async function configureProject(_0x3436b8,_0xbe90e7,_0x54a44e){const _0x1f1699=a118_0x18f1,_0x5a75df=a118_0x557329[_0x1f1699(0x1d7)](process[_0x1f1699(0x1d9)](),_0x3436b8),_0x7cf3eb=a118_0x557329[_0x1f1699(0x1d3)](_0x5a75df,NEW_CONFIG_NAME),_0x5bf56a=readConfig(),_0x3b0fb0=typeof _0x5bf56a['env']==='string'?_0x5bf56a['env']:undefined,_0x275ed3={};for(const _0x12b266 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5bf56a[_0x12b266]!=null)_0x275ed3[_0x12b266]=_0x5bf56a[_0x12b266];}const _0x3b85c8=buildCanonicalProjectConfig(_0x275ed3,{'appCodes':_0xbe90e7?[_0xbe90e7]:[],'env':_0x54a44e||_0x3b0fb0||_0x1f1699(0x1d4),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x7cf3eb,_0x3b85c8);}async function pullApiConfig(_0x1b5950,_0x1ea193,_0x57f8d1,_0x552f6d){const _0x2420cf=a118_0x18f1,_0x3a722f=process[_0x2420cf(0x1d9)]();try{process['chdir'](_0x1b5950);const _0xf1cee7=_0x57f8d1||_0x2420cf(0x1d4);initEnv(_0xf1cee7),console[_0x2420cf(0x1bf)](_0x2420cf(0x1c7));const {configArray:_0x390058}=await fetchModelList(_0x1ea193,_0x552f6d||''),_0x3a4203=await generateApiFile(_0x390058,'',_0x1ea193,!![],_0xf1cee7,DEFAULT_API_DIR);console[_0x2420cf(0x1bf)](_0x2420cf(0x1ae)+_0x390058[_0x2420cf(0x1da)]+'\x20dataset(s),\x20generated\x20'+_0x3a4203[_0x2420cf(0x1b4)]+'\x20model(s)');}catch(_0x3494a1){console[_0x2420cf(0x1bf)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x2420cf(0x1b0));}finally{process[_0x2420cf(0x1cd)](_0x3a722f);}}
1
+ (function(_0xbab542,_0x36e933){const _0x486c4a=a119_0x2553,_0x5c50bd=_0xbab542();while(!![]){try{const _0x13faf7=-parseInt(_0x486c4a(0xb9))/0x1+parseInt(_0x486c4a(0xbb))/0x2*(-parseInt(_0x486c4a(0x8c))/0x3)+-parseInt(_0x486c4a(0x90))/0x4*(-parseInt(_0x486c4a(0xb1))/0x5)+-parseInt(_0x486c4a(0x9a))/0x6*(parseInt(_0x486c4a(0x92))/0x7)+-parseInt(_0x486c4a(0x8f))/0x8+-parseInt(_0x486c4a(0x91))/0x9+-parseInt(_0x486c4a(0x8d))/0xa*(-parseInt(_0x486c4a(0xa8))/0xb);if(_0x13faf7===_0x36e933)break;else _0x5c50bd['push'](_0x5c50bd['shift']());}catch(_0x53760b){_0x5c50bd['push'](_0x5c50bd['shift']());}}}(a119_0x3672,0x3e595));import a119_0x339331 from'path';import a119_0x281b77 from'fs/promises';function a119_0x3672(){const _0x329862=['toLocaleString','Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','Project\x20name\x20cannot\x20be\x20empty.','package.json','readFile','\x20\x20Installing\x20dependencies...','\x20model(s)','\x20dataset(s),\x20generated\x20','bun\x20run\x20format','\x20\x20√\x20Project\x20template\x20created','\x20\x20rabetbase\x20run\x20start\x0a','1670141eDKinm','name','\x20created\x20successfully!','Use\x20a\x20different\x20project\x20name.','chdir','...','modelCount','string','resolve','1779280bKiWmy','length','ignore','constants','production','*\x20Creating\x20project\x20','description','\x20\x20Pulling\x20API\x20configuration...','240174gLoNLw','bun','4026wpPtof','\x0a\x20\x20cd\x20','W_OK','test','npm','447XCFPkC','60JMVEuD','log','1366280diTWZD','4VMNebl','1918980zGMEpP','13587gOabjL','parse','join','\x20\x20√\x20Code\x20formatted','env','validation','\x20api\x20pull`\x20manually\x20later.','cwd','270PRycRG'];a119_0x3672=function(){return _0x329862;};return a119_0x3672();}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';function a119_0x2553(_0xbc81ee,_0x5e55ce){_0xbc81ee=_0xbc81ee-0x8c;const _0x3672d6=a119_0x3672();let _0x255397=_0x3672d6[_0xbc81ee];return _0x255397;}import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.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(_0x3a6d3e,_0x4ece22,_0x3ecfaa,_0x201a64){const _0x1db4bd=a119_0x2553,_0x596641=await checkCliVersion();(_0x596641['needsUpgrade']||_0x596641['belowMinimum'])&&(printCliUpgradeWarning(_0x596641),assertCliVersionSupported(_0x596641));if(!_0x3a6d3e||_0x3a6d3e['trim']()==='')throw CliErrors['validation'](_0x1db4bd(0x9f));const _0x18f161=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x18f161[_0x1db4bd(0xbe)](_0x3a6d3e))throw CliErrors[_0x1db4bd(0x97)](_0x1db4bd(0x9c),_0x1db4bd(0x9d));if(_0x3a6d3e[_0x1db4bd(0xb2)]>0x64)throw CliErrors['validation']('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x33dc08=a119_0x339331['resolve'](process[_0x1db4bd(0x99)](),_0x3a6d3e);if(existsSync(_0x33dc08))throw CliErrors[_0x1db4bd(0x97)]('Project\x20directory\x20\x22'+_0x3a6d3e+'\x22\x20already\x20exists.',_0x1db4bd(0xab));try{const _0x9dbcc4=a119_0x339331['dirname'](_0x33dc08);await a119_0x281b77['access'](_0x9dbcc4,a119_0x281b77[_0x1db4bd(0xb4)][_0x1db4bd(0xbd)]);}catch{throw CliErrors['validation']('Cannot\x20create\x20project\x20in\x20current\x20directory.','Check\x20directory\x20permissions.');}try{console[_0x1db4bd(0x8e)](_0x1db4bd(0xb6)+_0x3a6d3e+_0x1db4bd(0xad));const _0x2087d8=getSubAppReactDemoTemplateDir();await copyDirectory(_0x2087d8,_0x33dc08),console[_0x1db4bd(0x8e)](_0x1db4bd(0xa6)),await updatePackageJsonName(_0x3a6d3e),console[_0x1db4bd(0x8e)]('\x20\x20√\x20package.json\x20updated'),console['log'](_0x1db4bd(0xa2)),console[_0x1db4bd(0x8e)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x33dc08),console[_0x1db4bd(0x8e)](_0x1db4bd(0x95)),await configureProject(_0x3a6d3e,_0x3ecfaa,_0x4ece22),console[_0x1db4bd(0x8e)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x3ecfaa&&await pullApiConfig(_0x33dc08,_0x3ecfaa,_0x4ece22,_0x201a64),console[_0x1db4bd(0x8e)]('\x0a√\x20Project\x20'+_0x3a6d3e+_0x1db4bd(0xaa)),console[_0x1db4bd(0x8e)](_0x1db4bd(0xbc)+_0x3a6d3e),console['log'](_0x1db4bd(0xa7));}catch(_0x5c5c00){try{existsSync(_0x33dc08)&&await a119_0x281b77['rm'](_0x33dc08,{'recursive':!![],'force':!![]});}catch{}throw _0x5c5c00;}}async function updatePackageJsonName(_0x1767e9){const _0x4e095d=a119_0x2553,_0x39b2c2=a119_0x339331[_0x4e095d(0xb0)](process[_0x4e095d(0x99)](),_0x1767e9),_0x5c21ea=a119_0x339331[_0x4e095d(0x94)](_0x39b2c2,_0x4e095d(0xa0)),_0x55b698=await a119_0x281b77[_0x4e095d(0xa1)](_0x5c21ea,'utf-8'),_0x920ded=JSON[_0x4e095d(0x93)](_0x55b698);_0x920ded[_0x4e095d(0xa9)]=_0x1767e9,_0x920ded[_0x4e095d(0xb7)]=_0x4e095d(0x9e),await a119_0x281b77['writeFile'](_0x5c21ea,JSON['stringify'](_0x920ded,null,0x2)+'\x0a');}function detectPackageManager(){const _0x46d769=a119_0x2553;try{return execSync('bun\x20--version',{'stdio':_0x46d769(0xb3)}),_0x46d769(0xba);}catch{return _0x46d769(0xbf);}}async function formatCode(_0x2f75cc){const _0xb36c9e=a119_0x2553;try{await execAsync(_0xb36c9e(0xa5),{'cwd':_0x2f75cc});}catch{}}async function configureProject(_0x4e2b9e,_0x3fa34b,_0x414781){const _0x57ea18=a119_0x2553,_0x761636=a119_0x339331['resolve'](process[_0x57ea18(0x99)](),_0x4e2b9e),_0x195720=a119_0x339331[_0x57ea18(0x94)](_0x761636,NEW_CONFIG_NAME),_0x1ad95c=readConfig(),_0x5d5953=typeof _0x1ad95c['env']===_0x57ea18(0xaf)?_0x1ad95c[_0x57ea18(0x96)]:undefined,_0x1e777c={};for(const _0x43a8b4 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1ad95c[_0x43a8b4]!=null)_0x1e777c[_0x43a8b4]=_0x1ad95c[_0x43a8b4];}const _0x38e33e=buildCanonicalProjectConfig(_0x1e777c,{'appCodes':_0x3fa34b?[_0x3fa34b]:[],'env':_0x414781||_0x5d5953||_0x57ea18(0xb5),'metadata':{'createdAt':new Date()[_0x57ea18(0x9b)](),'version':getCliVersion()}});writeConfigFile(_0x195720,_0x38e33e);}async function pullApiConfig(_0x286004,_0x4ed73c,_0x4b2bdd,_0x402f2b){const _0x48d76b=a119_0x2553,_0x581716=process['cwd']();try{process['chdir'](_0x286004);const _0x5683fc=_0x4b2bdd||_0x48d76b(0xb5);initEnv(_0x5683fc),console[_0x48d76b(0x8e)](_0x48d76b(0xb8));const {configArray:_0x132da5}=await fetchModelList(_0x4ed73c,_0x402f2b||''),_0x227f55=await generateApiFile(_0x132da5,'',_0x4ed73c,!![],_0x5683fc,DEFAULT_API_DIR);console[_0x48d76b(0x8e)]('\x20\x20√\x20Pulled\x20'+_0x132da5['length']+_0x48d76b(0xa4)+_0x227f55[_0x48d76b(0xae)]+_0x48d76b(0xa3));}catch(_0x23938a){console['log']('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x48d76b(0x98));}finally{process[_0x48d76b(0xac)](_0x581716);}}
@@ -1 +1 @@
1
- function a119_0x4668(_0x56427a,_0x280de1){_0x56427a=_0x56427a-0x108;const _0x497c2e=a119_0x497c();let _0x466867=_0x497c2e[_0x56427a];return _0x466867;}function a119_0x497c(){const _0xdc4da2=['resolve','20548inYWdP','2616420VmbsuR','744cvokTC','15660887ykPMno','../../../../','8TmMRTs','6hVyIqu','12391047ZWIjth','827630hxBjIt','865XwMnEM','7173614luDatj','79391xbgwuw','10JqMCHe','sub-app-react-demo','1CSNkBm','dirname','join'];a119_0x497c=function(){return _0xdc4da2;};return a119_0x497c();}const a119_0x2d6b16=a119_0x4668;(function(_0xbd6389,_0x31524c){const _0x280318=a119_0x4668,_0x1837e6=_0xbd6389();while(!![]){try{const _0x586094=-parseInt(_0x280318(0x116))/0x1*(parseInt(_0x280318(0x110))/0x2)+parseInt(_0x280318(0x109))/0x3+parseInt(_0x280318(0x108))/0x4*(-parseInt(_0x280318(0x111))/0x5)+parseInt(_0x280318(0x10e))/0x6*(-parseInt(_0x280318(0x112))/0x7)+parseInt(_0x280318(0x10d))/0x8*(parseInt(_0x280318(0x10f))/0x9)+-parseInt(_0x280318(0x114))/0xa*(-parseInt(_0x280318(0x10b))/0xb)+-parseInt(_0x280318(0x10a))/0xc*(parseInt(_0x280318(0x113))/0xd);if(_0x586094===_0x31524c)break;else _0x1837e6['push'](_0x1837e6['shift']());}catch(_0x2d98b2){_0x1837e6['push'](_0x1837e6['shift']());}}}(a119_0x497c,0xec020));import a119_0x2b4615 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a119_0x2b4615[a119_0x2d6b16(0x117)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x5df7ef=a119_0x2d6b16;return a119_0x2b4615[_0x5df7ef(0x119)](__dirname,_0x5df7ef(0x10c));}export function getSubAppReactDemoTemplateDir(){const _0xa7ca2b=a119_0x2d6b16;return a119_0x2b4615[_0xa7ca2b(0x118)](getRabetbaseCliPackageRoot(),'templates','projects',_0xa7ca2b(0x115));}
1
+ (function(_0x101f63,_0x838c3c){const _0x346957=a120_0x5d34,_0x4e0558=_0x101f63();while(!![]){try{const _0x36a7f3=-parseInt(_0x346957(0x1d2))/0x1+-parseInt(_0x346957(0x1ce))/0x2+-parseInt(_0x346957(0x1d0))/0x3*(parseInt(_0x346957(0x1cb))/0x4)+-parseInt(_0x346957(0x1ca))/0x5+parseInt(_0x346957(0x1d1))/0x6*(parseInt(_0x346957(0x1d5))/0x7)+-parseInt(_0x346957(0x1cc))/0x8+parseInt(_0x346957(0x1cd))/0x9;if(_0x36a7f3===_0x838c3c)break;else _0x4e0558['push'](_0x4e0558['shift']());}catch(_0x474ef1){_0x4e0558['push'](_0x4e0558['shift']());}}}(a120_0x343b,0xdf3b1));function a120_0x343b(){const _0x314b69=['305697bxotjf','29466EcbjEi','1544411DNqdJT','projects','templates','511xPmYrh','resolve','378835BjWOai','8TnRmtI','9831712MJBFDZ','44015319gdATvH','2563602sBADnz','sub-app-react-demo'];a120_0x343b=function(){return _0x314b69;};return a120_0x343b();}function a120_0x5d34(_0x1eaaf5,_0x37e96d){_0x1eaaf5=_0x1eaaf5-0x1c9;const _0x343ba1=a120_0x343b();let _0x5d3430=_0x343ba1[_0x1eaaf5];return _0x5d3430;}import a120_0x8a2286 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a120_0x8a2286['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x5f00fa=a120_0x5d34;return a120_0x8a2286[_0x5f00fa(0x1c9)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x217b42=a120_0x5d34;return a120_0x8a2286['join'](getRabetbaseCliPackageRoot(),_0x217b42(0x1d4),_0x217b42(0x1d3),_0x217b42(0x1cf));}
@@ -1 +1 @@
1
- (function(_0x42376d,_0x33e325){const _0x3c0534=a120_0x2d6e,_0x1296e3=_0x42376d();while(!![]){try{const _0x40c520=parseInt(_0x3c0534(0x16c))/0x1*(parseInt(_0x3c0534(0x166))/0x2)+parseInt(_0x3c0534(0x173))/0x3+-parseInt(_0x3c0534(0x16e))/0x4*(-parseInt(_0x3c0534(0x170))/0x5)+parseInt(_0x3c0534(0x175))/0x6+-parseInt(_0x3c0534(0x174))/0x7+parseInt(_0x3c0534(0x169))/0x8*(-parseInt(_0x3c0534(0x16d))/0x9)+-parseInt(_0x3c0534(0x16a))/0xa;if(_0x40c520===_0x33e325)break;else _0x1296e3['push'](_0x1296e3['shift']());}catch(_0x48f660){_0x1296e3['push'](_0x1296e3['shift']());}}}(a120_0x3ffb,0x323f7));function a120_0x3ffb(){const _0x37bc39=['32648FwGPOV','success','205rfhGIC','cwd','copy','1179282VUiCdL','748601gvhYsu','236154VtgCDW','resolve','info','项目模板复制失败','198118yMDOZq','message','开始复制项目模板','952aEPyWa','2256700lncKUl','now','1yiqACZ','24786CwcLqw'];a120_0x3ffb=function(){return _0x37bc39;};return a120_0x3ffb();}import a120_0x2cf6b9 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a120_0x2d6e(_0x5cd4a4,_0x201157){_0x5cd4a4=_0x5cd4a4-0x163;const _0x3ffb3b=a120_0x3ffb();let _0x2d6ec3=_0x3ffb3b[_0x5cd4a4];return _0x2d6ec3;}export async function copyProjectTemplate(_0x50875d){const _0x25f099=a120_0x2d6e,_0x4aa3da=Date[_0x25f099(0x16b)](),_0x98a0a4=a120_0x2cf6b9[_0x25f099(0x163)](process[_0x25f099(0x171)](),_0x50875d);try{logger[_0x25f099(0x164)](_0x25f099(0x172),_0x25f099(0x168),{'projectCode':_0x50875d,'templateDir':templateDir}),await copyDirectory(templateDir,_0x98a0a4);const _0x48e8aa=Date[_0x25f099(0x16b)]()-_0x4aa3da;logger[_0x25f099(0x16f)](_0x25f099(0x172),'项目模板复制完成',_0x48e8aa,{'projectCode':_0x50875d});}catch(_0x569b86){const _0x4e4990=Date[_0x25f099(0x16b)]()-_0x4aa3da;logger['error'](_0x25f099(0x172),_0x25f099(0x165),{'projectCode':_0x50875d,'error':_0x569b86 instanceof Error?_0x569b86[_0x25f099(0x167)]:String(_0x569b86),'duration':_0x4e4990});throw _0x569b86;}return formatElapsed(_0x4aa3da);}
1
+ (function(_0x1fe299,_0x35b32c){const _0x575b9b=a121_0x39cc,_0x429a9b=_0x1fe299();while(!![]){try{const _0x117078=-parseInt(_0x575b9b(0xc8))/0x1+parseInt(_0x575b9b(0xc7))/0x2+-parseInt(_0x575b9b(0xca))/0x3*(parseInt(_0x575b9b(0xcd))/0x4)+-parseInt(_0x575b9b(0xc1))/0x5+-parseInt(_0x575b9b(0xc5))/0x6*(parseInt(_0x575b9b(0xc3))/0x7)+-parseInt(_0x575b9b(0xc2))/0x8+parseInt(_0x575b9b(0xcc))/0x9;if(_0x117078===_0x35b32c)break;else _0x429a9b['push'](_0x429a9b['shift']());}catch(_0x2fd0a3){_0x429a9b['push'](_0x429a9b['shift']());}}}(a121_0x5a4b,0x1d957));import a121_0x1fd2df from'node:path';function a121_0x39cc(_0x2dc9ee,_0x50eb54){_0x2dc9ee=_0x2dc9ee-0xbd;const _0x5a4b1c=a121_0x5a4b();let _0x39ccae=_0x5a4b1c[_0x2dc9ee];return _0x39ccae;}function a121_0x5a4b(){const _0x48101a=['136iffQzY','copy','resolve','项目模板复制失败','开始复制项目模板','1160480kYomva','880520tpQdoQ','389809XuSpgk','项目模板复制完成','18zYGrGi','message','185632UgQhFB','202916PPMypd','info','14835yLQGiG','now','8177643DUYrjr'];a121_0x5a4b=function(){return _0x48101a;};return a121_0x5a4b();}import{copyDirectory}from'../../../utils/copy-directory.js';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(_0x4d8523){const _0x3c0c62=a121_0x39cc,_0x31eea2=Date[_0x3c0c62(0xcb)](),_0x5273da=a121_0x1fd2df[_0x3c0c62(0xbe)](process['cwd'](),_0x4d8523);try{logger[_0x3c0c62(0xc9)](_0x3c0c62(0xbd),_0x3c0c62(0xc0),{'projectCode':_0x4d8523,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5273da);const _0x1943f8=Date[_0x3c0c62(0xcb)]()-_0x31eea2;logger['success']('copy',_0x3c0c62(0xc4),_0x1943f8,{'projectCode':_0x4d8523});}catch(_0x1f789c){const _0x4beea4=Date[_0x3c0c62(0xcb)]()-_0x31eea2;logger['error'](_0x3c0c62(0xbd),_0x3c0c62(0xbf),{'projectCode':_0x4d8523,'error':_0x1f789c instanceof Error?_0x1f789c[_0x3c0c62(0xc6)]:String(_0x1f789c),'duration':_0x4beea4});throw _0x1f789c;}return formatElapsed(_0x31eea2);}
@@ -1 +1 @@
1
- function a121_0x5278(_0x23bdd7,_0x4307c3){_0x23bdd7=_0x23bdd7-0x168;const _0x5ae8cd=a121_0x5ae8();let _0x5278b3=_0x5ae8cd[_0x23bdd7];return _0x5278b3;}function a121_0x5ae8(){const _0x1b45d4=['format','代码格式化完成','10CckVfu','10LBHsyj','success','11075RQTHkc','1518KKvsYQ','now','prettier','error','1293616VvJbPC','74334tdIXaC','cwd','7584248GHFxpS','npx','5290747CPjuoH','开始格式化代码','info','737751oMaimn','6356655rbgNth','--write'];a121_0x5ae8=function(){return _0x1b45d4;};return a121_0x5ae8();}(function(_0x37f2f3,_0x1bb399){const _0x3b838f=a121_0x5278,_0x17ceb0=_0x37f2f3();while(!![]){try{const _0x3905ea=parseInt(_0x3b838f(0x16d))/0x1*(-parseInt(_0x3b838f(0x175))/0x2)+parseInt(_0x3b838f(0x17c))/0x3+parseInt(_0x3b838f(0x174))/0x4+-parseInt(_0x3b838f(0x16f))/0x5*(parseInt(_0x3b838f(0x170))/0x6)+-parseInt(_0x3b838f(0x179))/0x7+parseInt(_0x3b838f(0x177))/0x8+parseInt(_0x3b838f(0x168))/0x9*(parseInt(_0x3b838f(0x16c))/0xa);if(_0x3905ea===_0x1bb399)break;else _0x17ceb0['push'](_0x17ceb0['shift']());}catch(_0x39b948){_0x17ceb0['push'](_0x17ceb0['shift']());}}}(a121_0x5ae8,0x82cd1));import a121_0x41e982 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x34d882){const _0x175450=a121_0x5278,_0x1ee666=Date[_0x175450(0x171)](),_0x3a6049=a121_0x41e982['resolve'](process[_0x175450(0x176)](),_0x34d882);try{logger[_0x175450(0x17b)](_0x175450(0x16a),_0x175450(0x17a),{'projectCode':_0x34d882}),await execa(resolveNpmBin(_0x175450(0x178)),[_0x175450(0x172),_0x175450(0x169),'.'],{'cwd':_0x3a6049});const _0x56468a=Date['now']()-_0x1ee666;logger[_0x175450(0x16e)](_0x175450(0x16a),_0x175450(0x16b),_0x56468a,{'projectCode':_0x34d882});}catch(_0x143e83){const _0x4e5479=Date[_0x175450(0x171)]()-_0x1ee666;logger[_0x175450(0x173)]('format','代码格式化失败',{'projectCode':_0x34d882,'error':_0x143e83 instanceof Error?_0x143e83['message']:String(_0x143e83),'duration':_0x4e5479});throw _0x143e83;}return formatElapsed(_0x1ee666);}
1
+ (function(_0x50cd6b,_0x48f961){const _0x1f58fa=a122_0x3fcd,_0x5c3ac7=_0x50cd6b();while(!![]){try{const _0x7aa658=parseInt(_0x1f58fa(0x137))/0x1*(-parseInt(_0x1f58fa(0x12b))/0x2)+-parseInt(_0x1f58fa(0x127))/0x3*(-parseInt(_0x1f58fa(0x131))/0x4)+parseInt(_0x1f58fa(0x135))/0x5*(parseInt(_0x1f58fa(0x12d))/0x6)+-parseInt(_0x1f58fa(0x138))/0x7+parseInt(_0x1f58fa(0x124))/0x8+-parseInt(_0x1f58fa(0x130))/0x9*(parseInt(_0x1f58fa(0x136))/0xa)+parseInt(_0x1f58fa(0x132))/0xb*(parseInt(_0x1f58fa(0x128))/0xc);if(_0x7aa658===_0x48f961)break;else _0x5c3ac7['push'](_0x5c3ac7['shift']());}catch(_0x220a62){_0x5c3ac7['push'](_0x5c3ac7['shift']());}}}(a122_0xb51e,0xa6862));function a122_0xb51e(){const _0x230ede=['resolve','message','798ZFQnYr','263868ZjdWKq','开始格式化代码','prettier','12882ZTInkP','error','6lAMVkO','success','now','21708jEfsUR','11080sIYoMY','363TmOWJl','info','代码格式化完成','1741515Sbnklh','1110oLzOdS','112YpFuPf','7597387JeUhiT','format','--write','7566296cHwsNQ'];a122_0xb51e=function(){return _0x230ede;};return a122_0xb51e();}import a122_0x3b53db from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a122_0x3fcd(_0x294e14,_0x5d1658){_0x294e14=_0x294e14-0x122;const _0xb51e5f=a122_0xb51e();let _0x3fcd0c=_0xb51e5f[_0x294e14];return _0x3fcd0c;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x3b949c){const _0x4f5d82=a122_0x3fcd,_0x5de299=Date[_0x4f5d82(0x12f)](),_0xab7790=a122_0x3b53db[_0x4f5d82(0x125)](process['cwd'](),_0x3b949c);try{logger[_0x4f5d82(0x133)]('format',_0x4f5d82(0x129),{'projectCode':_0x3b949c}),await execa(resolveNpmBin('npx'),[_0x4f5d82(0x12a),_0x4f5d82(0x123),'.'],{'cwd':_0xab7790});const _0x3b8589=Date[_0x4f5d82(0x12f)]()-_0x5de299;logger[_0x4f5d82(0x12e)](_0x4f5d82(0x122),_0x4f5d82(0x134),_0x3b8589,{'projectCode':_0x3b949c});}catch(_0x5bba7c){const _0x467953=Date[_0x4f5d82(0x12f)]()-_0x5de299;logger[_0x4f5d82(0x12c)](_0x4f5d82(0x122),'代码格式化失败',{'projectCode':_0x3b949c,'error':_0x5bba7c instanceof Error?_0x5bba7c[_0x4f5d82(0x126)]:String(_0x5bba7c),'duration':_0x467953});throw _0x5bba7c;}return formatElapsed(_0x5de299);}
@@ -1 +1 @@
1
- function a122_0x2117(_0x2f39b4,_0x244141){_0x2f39b4=_0x2f39b4-0xa5;const _0x46cf08=a122_0x46cf();let _0x2117e3=_0x46cf08[_0x2f39b4];return _0x2117e3;}(function(_0xa9ae6f,_0x5f1bd6){const _0x4da95b=a122_0x2117,_0x1807ae=_0xa9ae6f();while(!![]){try{const _0x50b84e=-parseInt(_0x4da95b(0xa7))/0x1*(parseInt(_0x4da95b(0xba))/0x2)+parseInt(_0x4da95b(0xad))/0x3*(-parseInt(_0x4da95b(0xa6))/0x4)+parseInt(_0x4da95b(0xaf))/0x5+parseInt(_0x4da95b(0xb8))/0x6*(parseInt(_0x4da95b(0xaa))/0x7)+parseInt(_0x4da95b(0xb2))/0x8+-parseInt(_0x4da95b(0xa9))/0x9*(-parseInt(_0x4da95b(0xb4))/0xa)+parseInt(_0x4da95b(0xa8))/0xb*(-parseInt(_0x4da95b(0xae))/0xc);if(_0x50b84e===_0x5f1bd6)break;else _0x1807ae['push'](_0x1807ae['shift']());}catch(_0x2af37a){_0x1807ae['push'](_0x1807ae['shift']());}}}(a122_0x46cf,0xe9a4b));import a122_0x302825 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x1a7e4f){const _0x2b921a=a122_0x2117,_0xcd2711=Date[_0x2b921a(0xb6)](),_0x2ad7ce=a122_0x302825[_0x2b921a(0xa5)](process[_0x2b921a(0xb9)](),_0x1a7e4f);try{logger[_0x2b921a(0xb1)](_0x2b921a(0xac),'开始安装依赖',{'projectCode':_0x1a7e4f,'registry':_0x2b921a(0xb7)}),await execa(resolveNpmBin('npm'),[_0x2b921a(0xac),_0x2b921a(0xab),'https://registry.npmmirror.com'],{'cwd':_0x2ad7ce});const _0x266fc9=Date['now']()-_0xcd2711;logger['success'](_0x2b921a(0xac),'依赖安装完成',_0x266fc9,{'projectCode':_0x1a7e4f});}catch(_0x3d2141){const _0xa1dfe4=Date[_0x2b921a(0xb6)]()-_0xcd2711;logger[_0x2b921a(0xb0)](_0x2b921a(0xac),_0x2b921a(0xb3),{'projectCode':_0x1a7e4f,'error':_0x3d2141 instanceof Error?_0x3d2141[_0x2b921a(0xb5)]:String(_0x3d2141),'duration':_0xa1dfe4});throw _0x3d2141;}return formatElapsed(_0xcd2711);}function a122_0x46cf(){const _0x47fd39=['7706350xGrCdD','error','info','4984808EVvbAy','依赖安装失败','760OLDvCy','message','now','https://registry.npmmirror.com','1490766RJFKAT','cwd','2bbuCfs','resolve','292kYvatq','1518883GHzhhI','1522378mgClRO','157599kmemTI','14mKnRMl','--registry','install','39561BqloXV','48FlDgjq'];a122_0x46cf=function(){return _0x47fd39;};return a122_0x46cf();}
1
+ (function(_0x431dfe,_0x5616e0){const _0x2d4255=a123_0xe1f9,_0x43eb93=_0x431dfe();while(!![]){try{const _0x4254e2=-parseInt(_0x2d4255(0x12e))/0x1+-parseInt(_0x2d4255(0x128))/0x2+parseInt(_0x2d4255(0x11f))/0x3+-parseInt(_0x2d4255(0x123))/0x4+-parseInt(_0x2d4255(0x12f))/0x5*(parseInt(_0x2d4255(0x121))/0x6)+parseInt(_0x2d4255(0x125))/0x7*(parseInt(_0x2d4255(0x129))/0x8)+parseInt(_0x2d4255(0x130))/0x9;if(_0x4254e2===_0x5616e0)break;else _0x43eb93['push'](_0x43eb93['shift']());}catch(_0x3c4699){_0x43eb93['push'](_0x43eb93['shift']());}}}(a123_0x2fcc,0x2ea34));import a123_0x4cdd90 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a123_0x2fcc(){const _0x40e49a=['335105tUjPTv','2145573cfRZPf','开始安装依赖','message','775383kLRzly','https://registry.npmmirror.com','12ziczpR','resolve','886080gGZTJj','npm','175vCitgN','--registry','info','81008yshdfo','56536LsBwek','install','now','cwd','success','86439orgBip'];a123_0x2fcc=function(){return _0x40e49a;};return a123_0x2fcc();}import{logger}from'../../../utils/logger.js';function a123_0xe1f9(_0x2ef832,_0x4806c6){_0x2ef832=_0x2ef832-0x11d;const _0x2fccf4=a123_0x2fcc();let _0xe1f9d8=_0x2fccf4[_0x2ef832];return _0xe1f9d8;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x3ba42f){const _0x1afb4f=a123_0xe1f9,_0x242afd=Date['now'](),_0x3fad93=a123_0x4cdd90[_0x1afb4f(0x122)](process[_0x1afb4f(0x12c)](),_0x3ba42f);try{logger[_0x1afb4f(0x127)]('install',_0x1afb4f(0x11d),{'projectCode':_0x3ba42f,'registry':_0x1afb4f(0x120)}),await execa(resolveNpmBin(_0x1afb4f(0x124)),[_0x1afb4f(0x12a),_0x1afb4f(0x126),_0x1afb4f(0x120)],{'cwd':_0x3fad93});const _0x3db748=Date[_0x1afb4f(0x12b)]()-_0x242afd;logger[_0x1afb4f(0x12d)](_0x1afb4f(0x12a),'依赖安装完成',_0x3db748,{'projectCode':_0x3ba42f});}catch(_0x481593){const _0x13b8ae=Date['now']()-_0x242afd;logger['error']('install','依赖安装失败',{'projectCode':_0x3ba42f,'error':_0x481593 instanceof Error?_0x481593[_0x1afb4f(0x11e)]:String(_0x481593),'duration':_0x13b8ae});throw _0x481593;}return formatElapsed(_0x242afd);}
@@ -1 +1 @@
1
- const a123_0x5cad2d=a123_0x56e3;(function(_0x48d41f,_0x28b8f1){const _0x11f27a=a123_0x56e3,_0x34935e=_0x48d41f();while(!![]){try{const _0x4dedb7=parseInt(_0x11f27a(0x16f))/0x1+parseInt(_0x11f27a(0x180))/0x2+-parseInt(_0x11f27a(0x167))/0x3+-parseInt(_0x11f27a(0x171))/0x4+-parseInt(_0x11f27a(0x174))/0x5+-parseInt(_0x11f27a(0x170))/0x6*(parseInt(_0x11f27a(0x17b))/0x7)+-parseInt(_0x11f27a(0x187))/0x8*(-parseInt(_0x11f27a(0x17f))/0x9);if(_0x4dedb7===_0x28b8f1)break;else _0x34935e['push'](_0x34935e['shift']());}catch(_0x5949cb){_0x34935e['push'](_0x34935e['shift']());}}}(a123_0x54d4,0xb0619));import{CliErrors}from'../../errors.js';function a123_0x54d4(){const _0x8fcf7d=['Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','3834720fECthr','nonInteractive','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Auto-confirm\x20prompts','env','../../commands/project/create/main.js','boolean','cookie','744209vRFoDV','1578mZUtrC','4972548RSctqI','Target\x20environment','string','1598545ZxUojg','yes','create','Project\x20name','Skip\x20confirmation\x20prompt','init','project','34363MScyeK','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','appcode','27271071Cydoiy','2160564aQyzXI','Usage:\x20','project-name','Create\x20a\x20new\x20project','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','trim','write','8tqPxyd','bool','args','upgrade','str','name'];a123_0x54d4=function(){return _0x8fcf7d;};return a123_0x54d4();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a123_0x56e3(_0x3e90ca,_0x3cd4a4){_0x3e90ca=_0x3e90ca-0x164;const _0x54d468=a123_0x54d4();let _0x56e3b5=_0x54d468[_0x3e90ca];return _0x56e3b5;}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':'appcode','type':a123_0x5cad2d(0x173),'description':'App\x20code\x20to\x20initialize'},{'name':a123_0x5cad2d(0x16b),'type':'string','description':a123_0x5cad2d(0x172)},{'name':a123_0x5cad2d(0x175),'type':a123_0x5cad2d(0x16d),'description':a123_0x5cad2d(0x16a),'default':![]}],createFlags=[{'name':a123_0x5cad2d(0x165),'type':a123_0x5cad2d(0x173),'description':a123_0x5cad2d(0x177)},{'name':a123_0x5cad2d(0x16b),'type':a123_0x5cad2d(0x173),'description':a123_0x5cad2d(0x172)},{'name':a123_0x5cad2d(0x17e),'type':'string','description':a123_0x5cad2d(0x184)}],upgradeFlags=[{'name':a123_0x5cad2d(0x175),'type':a123_0x5cad2d(0x16d),'description':a123_0x5cad2d(0x178),'default':![]}];export const projectDefinitions=[{'service':a123_0x5cad2d(0x17a),'command':a123_0x5cad2d(0x179),'description':a123_0x5cad2d(0x166),'risk':a123_0x5cad2d(0x186),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x49689e){const _0x45cf2c=a123_0x5cad2d;return await initConfig({'appcode':_0x49689e[_0x45cf2c(0x164)](_0x45cf2c(0x17e))||undefined,'env':_0x49689e[_0x45cf2c(0x164)](_0x45cf2c(0x16b))||undefined,'autoYes':_0x49689e[_0x45cf2c(0x188)]('yes')}),{'ok':!![]};}},{'service':'project','command':a123_0x5cad2d(0x176),'description':a123_0x5cad2d(0x183),'risk':a123_0x5cad2d(0x186),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a123_0x5cad2d(0x182),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x1e3a2a){const _0x9747cb=a123_0x5cad2d,{createApp:_0x1e7f56}=await import(_0x9747cb(0x16c)),{createProjectNonInteractive:_0x187d8e}=await import('../../commands/project/create/non-interactive.js'),_0x12ca69=_0x1e3a2a[_0x9747cb(0x164)]('name')[_0x9747cb(0x185)]()||_0x1e3a2a[_0x9747cb(0x189)][0x0]?.[_0x9747cb(0x185)](),_0xe5a6f=_0x1e3a2a['str']('env')||undefined,_0x334c84=_0x1e3a2a['str'](_0x9747cb(0x17e))||undefined;if(_0x1e3a2a['nonInteractive']){if(!_0x12ca69)throw CliErrors['validation'](_0x9747cb(0x17d),_0x9747cb(0x181)+CLI_BIN_NAME+_0x9747cb(0x169));await _0x187d8e(_0x12ca69,_0xe5a6f,_0x334c84,_0x1e3a2a[_0x9747cb(0x16e)]);}else await _0x1e7f56({'projectCode':_0x12ca69,'appCode':_0x334c84,'env':_0xe5a6f,'cookie':_0x1e3a2a[_0x9747cb(0x16e)]});return{'ok':!![]};}},{'service':a123_0x5cad2d(0x17a),'command':a123_0x5cad2d(0x18a),'description':a123_0x5cad2d(0x17c),'risk':a123_0x5cad2d(0x186),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x1fecf9){const _0x4184f4=a123_0x5cad2d;return await upgradeApp(_0x1fecf9[_0x4184f4(0x168)],{'yes':_0x1fecf9[_0x4184f4(0x188)](_0x4184f4(0x175))}),{'ok':!![]};}}];
1
+ const a124_0x400bee=a124_0x388b;(function(_0x371daa,_0x4dc056){const _0x205911=a124_0x388b,_0x54d270=_0x371daa();while(!![]){try{const _0x169d6c=parseInt(_0x205911(0x11f))/0x1*(-parseInt(_0x205911(0x136))/0x2)+parseInt(_0x205911(0x123))/0x3*(-parseInt(_0x205911(0x132))/0x4)+parseInt(_0x205911(0x12d))/0x5+parseInt(_0x205911(0x121))/0x6+-parseInt(_0x205911(0x138))/0x7*(parseInt(_0x205911(0x139))/0x8)+-parseInt(_0x205911(0x12e))/0x9*(parseInt(_0x205911(0x130))/0xa)+parseInt(_0x205911(0x128))/0xb;if(_0x169d6c===_0x4dc056)break;else _0x54d270['push'](_0x54d270['shift']());}catch(_0x979115){_0x54d270['push'](_0x54d270['shift']());}}}(a124_0x16cb,0x8ce7f));function a124_0x16cb(){const _0x4b3c86=['nonInteractive','3384455wtobNa','144muWbWv','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','69140ibpBMQ','string','3702932FFeoCi','boolean','bool','../../commands/project/create/non-interactive.js','160EqfRsj','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','14mpFANT','337504ZtUtSA','App\x20code\x20to\x20initialize','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','upgrade','trim','str','Target\x20environment','args','Auto-confirm\x20prompts','name','validation','6044lYpnzX','cookie','4748694HEnjqv','appcode','3QbGTgW','project','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','env','write','7843704mMUlBD','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','yes'];a124_0x16cb=function(){return _0x4b3c86;};return a124_0x16cb();}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';function a124_0x388b(_0x486563,_0x438de2){_0x486563=_0x486563-0x11e;const _0x16cb81=a124_0x16cb();let _0x388b97=_0x16cb81[_0x486563];return _0x388b97;}const initFlags=[{'name':'appcode','type':a124_0x400bee(0x131),'description':a124_0x400bee(0x13a)},{'name':a124_0x400bee(0x126),'type':a124_0x400bee(0x131),'description':a124_0x400bee(0x13f)},{'name':a124_0x400bee(0x12b),'type':a124_0x400bee(0x133),'description':a124_0x400bee(0x141),'default':![]}],createFlags=[{'name':a124_0x400bee(0x142),'type':a124_0x400bee(0x131),'description':'Project\x20name'},{'name':'env','type':a124_0x400bee(0x131),'description':a124_0x400bee(0x13f)},{'name':a124_0x400bee(0x122),'type':a124_0x400bee(0x131),'description':a124_0x400bee(0x12a)}],upgradeFlags=[{'name':a124_0x400bee(0x12b),'type':a124_0x400bee(0x133),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a124_0x400bee(0x124),'command':'init','description':a124_0x400bee(0x137),'risk':a124_0x400bee(0x127),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x59311c){const _0x483557=a124_0x400bee;return await initConfig({'appcode':_0x59311c['str'](_0x483557(0x122))||undefined,'env':_0x59311c[_0x483557(0x13e)](_0x483557(0x126))||undefined,'autoYes':_0x59311c[_0x483557(0x134)]('yes')}),{'ok':!![]};}},{'service':a124_0x400bee(0x124),'command':'create','description':'Create\x20a\x20new\x20project','risk':a124_0x400bee(0x127),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a124_0x400bee(0x13b),'required':![]}],'flags':createFlags,async 'execute'(_0x3b78f1){const _0x1d83c4=a124_0x400bee,{createApp:_0x32af57}=await import('../../commands/project/create/main.js'),{createProjectNonInteractive:_0x2cea24}=await import(_0x1d83c4(0x135)),_0x143ba4=_0x3b78f1[_0x1d83c4(0x13e)]('name')[_0x1d83c4(0x13d)]()||_0x3b78f1[_0x1d83c4(0x140)][0x0]?.[_0x1d83c4(0x13d)](),_0x157f91=_0x3b78f1[_0x1d83c4(0x13e)](_0x1d83c4(0x126))||undefined,_0xdfde07=_0x3b78f1['str'](_0x1d83c4(0x122))||undefined;if(_0x3b78f1[_0x1d83c4(0x12c)]){if(!_0x143ba4)throw CliErrors[_0x1d83c4(0x11e)](_0x1d83c4(0x129),'Usage:\x20'+CLI_BIN_NAME+_0x1d83c4(0x125));await _0x2cea24(_0x143ba4,_0x157f91,_0xdfde07,_0x3b78f1[_0x1d83c4(0x120)]);}else await _0x32af57({'projectCode':_0x143ba4,'appCode':_0xdfde07,'env':_0x157f91,'cookie':_0x3b78f1[_0x1d83c4(0x120)]});return{'ok':!![]};}},{'service':a124_0x400bee(0x124),'command':a124_0x400bee(0x13c),'description':a124_0x400bee(0x12f),'risk':a124_0x400bee(0x127),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x487759){const _0x37001c=a124_0x400bee;return await upgradeApp(_0x487759['nonInteractive'],{'yes':_0x487759[_0x37001c(0x134)](_0x37001c(0x12b))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x34b294,_0x476ed5){const _0x26cda0=a124_0x4ece,_0x45c374=_0x34b294();while(!![]){try{const _0x2dcb91=-parseInt(_0x26cda0(0xef))/0x1*(-parseInt(_0x26cda0(0x10d))/0x2)+parseInt(_0x26cda0(0xf5))/0x3+-parseInt(_0x26cda0(0x11f))/0x4+parseInt(_0x26cda0(0x101))/0x5*(parseInt(_0x26cda0(0x10b))/0x6)+parseInt(_0x26cda0(0xfa))/0x7+-parseInt(_0x26cda0(0x11e))/0x8+parseInt(_0x26cda0(0x10e))/0x9*(parseInt(_0x26cda0(0xf9))/0xa);if(_0x2dcb91===_0x476ed5)break;else _0x45c374['push'](_0x45c374['shift']());}catch(_0xf5ba3a){_0x45c374['push'](_0x45c374['shift']());}}}(a124_0x575b,0x5bbbf));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a124_0x22f780 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 a124_0x575b(){const _0x1e9b6f=['1CYqrYK','defaultApp','package.json','Migration\x20cancelled.\x20Run\x20`','toLocaleString','appcode','34794oCBnbx','../..','\x20\x20Default:\x20','yellow','1357480JnpoPK','5030053EQDFip','utf8','.bak','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','join','parse','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','1264085qpbMEc','info','初始化项目配置文件成功','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','从旧配置文件升级成功','?\x20(Old\x20file\x20→\x20*.bak)','bold','apps','init','setLogPath','6cQwdYo','\x20project\x20init`\x20to\x20start\x20fresh.','624940FRPgwF','9ZfXfMy','cwd','string','keys','\x20\x20Apps:\x20','1.0.0','trim','\x20api\x20generate\x27\x20and\x20\x27','app','env','✓\x20Upgraded\x20','cyan','production','\x20→\x20.rabetbase.json','\x20\x20appcode:\x20','log','5651488xNlZUs','1396132AVRjDO','green','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','Invalid\x20App\x20Code','Upgrade\x20it\x20to\x20'];a124_0x575b=function(){return _0x1e9b6f;};return a124_0x575b();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x35bbf8){const _0x27991b=a124_0x4ece,{appcode:_0x250380,env:_0x215bcf,autoYes:_0x50df54}=_0x35bbf8,_0x2c8ac8=process[_0x27991b(0x10f)]();if(getProjectConfigPath())throw new Error(_0x27991b(0x100));let _0x84c130;for(const _0x306cdc of LEGACY_CONFIG_NAMES){const _0x1f8bda=resolve(_0x2c8ac8,_0x306cdc);if(existsSync(_0x1f8bda)){_0x84c130=_0x1f8bda;break;}}if(_0x84c130){let _0x5130f5={};try{_0x5130f5=JSON['parse'](readFileSync(_0x84c130,'utf8'));}catch{}const _0x1b2a22=basename(_0x84c130),_0x3ae21b=_0x5130f5?.[_0x27991b(0xf4)]||_0x5130f5?.['app'];let _0x6b25b8=_0x50df54;!_0x50df54&&(console[_0x27991b(0x11d)](a124_0x22f780[_0x27991b(0xf8)](_0x27991b(0xfd)+a124_0x22f780[_0x27991b(0x107)](_0x1b2a22))),_0x3ae21b&&console[_0x27991b(0x11d)](a124_0x22f780['cyan'](_0x27991b(0x11c)+_0x3ae21b)),_0x6b25b8=await confirm({'message':_0x27991b(0xee)+a124_0x22f780[_0x27991b(0x107)]('.rabetbase.json')+_0x27991b(0x106),'default':!![]}));if(!_0x6b25b8){console[_0x27991b(0x11d)](_0x27991b(0xf2)+CLI_BIN_NAME+_0x27991b(0x10c));return;}const _0x195e3e=resolve(_0x2c8ac8,NEW_CONFIG_NAME),_0x2ec1bf=getCliVersionFromPkg(),_0x311f96=readRawConfig(),_0xb88061=_0x250380||(typeof _0x5130f5?.[_0x27991b(0xf4)]===_0x27991b(0x110)?_0x5130f5[_0x27991b(0xf4)]:undefined)||(typeof _0x5130f5?.[_0x27991b(0x116)]==='string'?_0x5130f5[_0x27991b(0x116)]:undefined)||await askAppcode(),_0x34a286=typeof _0x5130f5?.[_0x27991b(0x117)]===_0x27991b(0x110)?_0x5130f5['env']:typeof _0x311f96[_0x27991b(0x117)]==='string'?_0x311f96[_0x27991b(0x117)]:_0x27991b(0x11a),_0x1728b1=buildCanonicalProjectConfig({..._0x311f96,..._0x5130f5},{'appCodes':[_0xb88061],'env':_0x34a286,'metadata':{'version':_0x2ec1bf,'migratedAt':new Date()[_0x27991b(0xf3)](),'migratedFrom':_0x84c130}});writeConfigFile(_0x195e3e,_0x1728b1);const _0x3424ce=_0x84c130+_0x27991b(0xfc);renameSync(_0x84c130,_0x3424ce),logger[_0x27991b(0x10a)](_0x2c8ac8),logger['info'](_0x27991b(0x109),_0x27991b(0x105),{'from':_0x84c130,'to':_0x195e3e,'appcode':_0xb88061,'env':_0x1728b1[_0x27991b(0x117)]}),console[_0x27991b(0x11d)](a124_0x22f780[_0x27991b(0xeb)](_0x27991b(0x118)+_0x1b2a22+_0x27991b(0x11b))),console[_0x27991b(0x11d)](a124_0x22f780[_0x27991b(0x119)](_0x27991b(0x112)+Object[_0x27991b(0x111)](_0x1728b1[_0x27991b(0x108)]||{})[_0x27991b(0xfe)](',\x20'))),console[_0x27991b(0x11d)](a124_0x22f780[_0x27991b(0x119)](_0x27991b(0xf7)+_0x1728b1['defaultApp'])),console['log'](a124_0x22f780['gray'](_0x27991b(0x104)+_0x1b2a22+_0x27991b(0xfc)));return;}const _0x30199f=_0x250380||await askAppcode(),_0x72504b=resolve(_0x2c8ac8,NEW_CONFIG_NAME),_0xd8ecd0=getCliVersionFromPkg(),_0xb908e0=readRawConfig(),_0x232ee2=typeof _0xb908e0['env']===_0x27991b(0x110)?_0xb908e0[_0x27991b(0x117)]:undefined,_0x14195f=buildCanonicalProjectConfig({},{'appCodes':[_0x30199f],'env':_0x215bcf||_0x232ee2||'production','metadata':{'version':_0xd8ecd0,'createdAt':new Date()[_0x27991b(0xf3)]()}});writeConfigFile(_0x72504b,_0x14195f),logger[_0x27991b(0x10a)](_0x2c8ac8),logger[_0x27991b(0x102)](_0x27991b(0x109),_0x27991b(0x103),{'appcode':_0x30199f,'env':_0x14195f[_0x27991b(0x117)],'version':_0x14195f['version'],'configPath':_0x72504b}),console['log'](a124_0x22f780[_0x27991b(0xeb)](_0x27991b(0xec))),console['log'](a124_0x22f780['cyan'](_0x27991b(0x112)+Object[_0x27991b(0x111)](_0x14195f[_0x27991b(0x108)]||{})[_0x27991b(0xfe)](',\x20'))),console[_0x27991b(0x11d)](a124_0x22f780[_0x27991b(0x119)](_0x27991b(0xf7)+_0x14195f[_0x27991b(0xf0)])),console[_0x27991b(0x11d)]('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+_0x27991b(0x115)+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x1f94ac=>{const _0x2023dc=a124_0x4ece;if(!_0x1f94ac[_0x2023dc(0x114)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x544bf7,message:_0x2ba7ec}=validateAppcode(_0x1f94ac[_0x2023dc(0x114)]());return _0x544bf7||_0x2ba7ec||_0x2023dc(0xed);}});}function a124_0x4ece(_0x3b56fc,_0x55acab){_0x3b56fc=_0x3b56fc-0xeb;const _0x575b5e=a124_0x575b();let _0x4ece65=_0x575b5e[_0x3b56fc];return _0x4ece65;}function getCliVersionFromPkg(){const _0x2904d5=a124_0x4ece;try{const _0x4ad9fe=fileURLToPath(import.meta.url),_0x14a4d4=resolve(dirname(_0x4ad9fe),_0x2904d5(0xf6)),_0x579584=JSON[_0x2904d5(0xff)](readFileSync(resolve(_0x14a4d4,_0x2904d5(0xf1)),_0x2904d5(0xfb)));return _0x579584['version']||'1.0.0';}catch{return _0x2904d5(0x113);}}
1
+ (function(_0x285dc1,_0x23ea9c){const _0xe6d645=a125_0x3988,_0x4e6a55=_0x285dc1();while(!![]){try{const _0xba4d11=parseInt(_0xe6d645(0x11c))/0x1*(parseInt(_0xe6d645(0x10c))/0x2)+-parseInt(_0xe6d645(0x11e))/0x3+-parseInt(_0xe6d645(0x109))/0x4*(-parseInt(_0xe6d645(0x130))/0x5)+-parseInt(_0xe6d645(0x117))/0x6+parseInt(_0xe6d645(0x12d))/0x7*(parseInt(_0xe6d645(0x125))/0x8)+-parseInt(_0xe6d645(0x118))/0x9+-parseInt(_0xe6d645(0x113))/0xa;if(_0xba4d11===_0x23ea9c)break;else _0x4e6a55['push'](_0x4e6a55['shift']());}catch(_0x2369d9){_0x4e6a55['push'](_0x4e6a55['shift']());}}}(a125_0x1caa,0xdfbfb));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a125_0x2efd2d from'chalk';import{input,confirm}from'@inquirer/prompts';function a125_0x1caa(){const _0x374d06=['toLocaleString','parse','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','Upgrade\x20it\x20to\x20','579952LQZeGd','setLogPath','apps','log','app','bold','../..','production','112vrKITJ','string','\x20\x20Apps:\x20','140Ourumk','trim','green','\x20\x20Default:\x20','从旧配置文件升级成功','appcode','info','✓\x20Upgraded\x20','257596nLtcYV','join','keys','1565114MjnxwX','\x20→\x20.rabetbase.json','?\x20(Old\x20file\x20→\x20*.bak)','init','Migration\x20cancelled.\x20Run\x20`','1.0.0','cyan','2379240fNDeli','\x20project\x20init`\x20to\x20start\x20fresh.','\x20api\x20generate\x27\x20and\x20\x27','version','10799580uoOyht','2818332odsbOp','.bak','.rabetbase.json','utf8','2xYOFim','env','3782139KqGUUR','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory'];a125_0x1caa=function(){return _0x374d06;};return a125_0x1caa();}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 a125_0x3988(_0x3c7930,_0x11236c){_0x3c7930=_0x3c7930-0x106;const _0x1caa14=a125_0x1caa();let _0x3988de=_0x1caa14[_0x3c7930];return _0x3988de;}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x156151){const _0x2d716a=a125_0x3988,{appcode:_0x155d03,env:_0x3af64c,autoYes:_0x266b49}=_0x156151,_0x252a9=process['cwd']();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x1c2009;for(const _0x558396 of LEGACY_CONFIG_NAMES){const _0x371343=resolve(_0x252a9,_0x558396);if(existsSync(_0x371343)){_0x1c2009=_0x371343;break;}}if(_0x1c2009){let _0x6dc0bf={};try{_0x6dc0bf=JSON[_0x2d716a(0x121)](readFileSync(_0x1c2009,_0x2d716a(0x11b)));}catch{}const _0x4f5072=basename(_0x1c2009),_0x371d27=_0x6dc0bf?.[_0x2d716a(0x106)]||_0x6dc0bf?.[_0x2d716a(0x129)];let _0x3ca968=_0x266b49;!_0x266b49&&(console[_0x2d716a(0x128)](a125_0x2efd2d['yellow']('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a125_0x2efd2d[_0x2d716a(0x12a)](_0x4f5072))),_0x371d27&&console[_0x2d716a(0x128)](a125_0x2efd2d[_0x2d716a(0x112)]('\x20\x20appcode:\x20'+_0x371d27)),_0x3ca968=await confirm({'message':_0x2d716a(0x124)+a125_0x2efd2d[_0x2d716a(0x12a)](_0x2d716a(0x11a))+_0x2d716a(0x10e),'default':!![]}));if(!_0x3ca968){console['log'](_0x2d716a(0x110)+CLI_BIN_NAME+_0x2d716a(0x114));return;}const _0xea2087=resolve(_0x252a9,NEW_CONFIG_NAME),_0x2a327c=getCliVersionFromPkg(),_0x47e4c7=readRawConfig(),_0x4c8ce1=_0x155d03||(typeof _0x6dc0bf?.[_0x2d716a(0x106)]===_0x2d716a(0x12e)?_0x6dc0bf[_0x2d716a(0x106)]:undefined)||(typeof _0x6dc0bf?.[_0x2d716a(0x129)]===_0x2d716a(0x12e)?_0x6dc0bf[_0x2d716a(0x129)]:undefined)||await askAppcode(),_0x3dadea=typeof _0x6dc0bf?.[_0x2d716a(0x11d)]===_0x2d716a(0x12e)?_0x6dc0bf['env']:typeof _0x47e4c7['env']===_0x2d716a(0x12e)?_0x47e4c7[_0x2d716a(0x11d)]:_0x2d716a(0x12c),_0x336f60=buildCanonicalProjectConfig({..._0x47e4c7,..._0x6dc0bf},{'appCodes':[_0x4c8ce1],'env':_0x3dadea,'metadata':{'version':_0x2a327c,'migratedAt':new Date()[_0x2d716a(0x120)](),'migratedFrom':_0x1c2009}});writeConfigFile(_0xea2087,_0x336f60);const _0x2cf81a=_0x1c2009+'.bak';renameSync(_0x1c2009,_0x2cf81a),logger[_0x2d716a(0x126)](_0x252a9),logger[_0x2d716a(0x107)](_0x2d716a(0x10f),_0x2d716a(0x134),{'from':_0x1c2009,'to':_0xea2087,'appcode':_0x4c8ce1,'env':_0x336f60[_0x2d716a(0x11d)]}),console[_0x2d716a(0x128)](a125_0x2efd2d[_0x2d716a(0x132)](_0x2d716a(0x108)+_0x4f5072+_0x2d716a(0x10d))),console[_0x2d716a(0x128)](a125_0x2efd2d[_0x2d716a(0x112)](_0x2d716a(0x12f)+Object[_0x2d716a(0x10b)](_0x336f60['apps']||{})[_0x2d716a(0x10a)](',\x20'))),console[_0x2d716a(0x128)](a125_0x2efd2d[_0x2d716a(0x112)](_0x2d716a(0x133)+_0x336f60['defaultApp'])),console[_0x2d716a(0x128)](a125_0x2efd2d['gray'](_0x2d716a(0x122)+_0x4f5072+_0x2d716a(0x119)));return;}const _0x3575ad=_0x155d03||await askAppcode(),_0x35237a=resolve(_0x252a9,NEW_CONFIG_NAME),_0xe2a8bc=getCliVersionFromPkg(),_0x57c42c=readRawConfig(),_0x383374=typeof _0x57c42c[_0x2d716a(0x11d)]===_0x2d716a(0x12e)?_0x57c42c[_0x2d716a(0x11d)]:undefined,_0xd1094c=buildCanonicalProjectConfig({},{'appCodes':[_0x3575ad],'env':_0x3af64c||_0x383374||_0x2d716a(0x12c),'metadata':{'version':_0xe2a8bc,'createdAt':new Date()[_0x2d716a(0x120)]()}});writeConfigFile(_0x35237a,_0xd1094c),logger[_0x2d716a(0x126)](_0x252a9),logger['info'](_0x2d716a(0x10f),'初始化项目配置文件成功',{'appcode':_0x3575ad,'env':_0xd1094c[_0x2d716a(0x11d)],'version':_0xd1094c[_0x2d716a(0x116)],'configPath':_0x35237a}),console[_0x2d716a(0x128)](a125_0x2efd2d[_0x2d716a(0x132)](_0x2d716a(0x11f))),console[_0x2d716a(0x128)](a125_0x2efd2d[_0x2d716a(0x112)](_0x2d716a(0x12f)+Object[_0x2d716a(0x10b)](_0xd1094c[_0x2d716a(0x127)]||{})['join'](',\x20'))),console[_0x2d716a(0x128)](a125_0x2efd2d[_0x2d716a(0x112)](_0x2d716a(0x133)+_0xd1094c['defaultApp'])),console['log'](_0x2d716a(0x123)+CLI_BIN_NAME+_0x2d716a(0x115)+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x763b6c=>{const _0xdb93a0=a125_0x3988;if(!_0x763b6c[_0xdb93a0(0x131)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x4f92f7,message:_0x125736}=validateAppcode(_0x763b6c['trim']());return _0x4f92f7||_0x125736||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x2fc13f=a125_0x3988;try{const _0x2b116e=fileURLToPath(import.meta.url),_0x36c5d9=resolve(dirname(_0x2b116e),_0x2fc13f(0x12b)),_0x4f2184=JSON['parse'](readFileSync(resolve(_0x36c5d9,'package.json'),'utf8'));return _0x4f2184[_0x2fc13f(0x116)]||_0x2fc13f(0x111);}catch{return _0x2fc13f(0x111);}}
@@ -1 +1 @@
1
- (function(_0x417374,_0x535fbf){const _0x2e98d8=a125_0x344b,_0x574646=_0x417374();while(!![]){try{const _0x3dedb1=parseInt(_0x2e98d8(0xea))/0x1+-parseInt(_0x2e98d8(0x103))/0x2*(parseInt(_0x2e98d8(0xf8))/0x3)+-parseInt(_0x2e98d8(0xe9))/0x4+-parseInt(_0x2e98d8(0x11e))/0x5*(-parseInt(_0x2e98d8(0x148))/0x6)+-parseInt(_0x2e98d8(0x12e))/0x7+parseInt(_0x2e98d8(0xf7))/0x8+parseInt(_0x2e98d8(0x147))/0x9;if(_0x3dedb1===_0x535fbf)break;else _0x574646['push'](_0x574646['shift']());}catch(_0x2545c0){_0x574646['push'](_0x574646['shift']());}}}(a125_0x1a03,0xe1425));import a125_0x38bea5 from'chalk';import a125_0x393437 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 a125_0x344b(_0x2bab00,_0x4fde41){_0x2bab00=_0x2bab00-0xe6;const _0x1a03d7=a125_0x1a03();let _0x344bfd=_0x1a03d7[_0x2bab00];return _0x344bfd;}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x26b240=>_0x26b240!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x3d5a03){const _0x87b080=a125_0x344b,_0x2e9736=[];for(const _0x2b84ef of Object[_0x87b080(0xf1)](CORE_IDE_CONFIGS)){if(_0x2b84ef[_0x87b080(0x163)])for(const _0x1899f4 of _0x2b84ef[_0x87b080(0x163)]){_0x2e9736[_0x87b080(0x114)](resolve(_0x3d5a03,_0x1899f4[_0x87b080(0x10d)]));}}return _0x2e9736;}function analyse(_0x4a431c){const _0x332d46=a125_0x344b;let _0x534697=null;const _0x1f6119=resolve(_0x4a431c,NEW_CONFIG_NAME),_0x3746c6=existsSync(_0x1f6119);for(const _0x523a76 of LEGACY_CONFIG_NAMES){const _0x5b3322=resolve(_0x4a431c,_0x523a76);if(existsSync(_0x5b3322)){const _0x14569d=readConfigFile(_0x5b3322),_0x53aed7=Object[_0x332d46(0x158)](_0x14569d)[_0x332d46(0x15a)](_0x5052c1=>typeof _0x14569d[_0x5052c1]!=='undefined');_0x534697={'oldPath':_0x5b3322,'hasNewConfig':_0x3746c6,'fields':_0x53aed7};break;}}const _0x2bf6cf=[],_0x31a158=resolve(_0x4a431c,'.lovrabet');if(existsSync(_0x31a158))_0x2bf6cf[_0x332d46(0x114)](_0x31a158);const _0x2d9759=resolve(_0x4a431c,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x2d9759))_0x2bf6cf[_0x332d46(0x114)](_0x2d9759);const _0x16b674=resolve(_0x4a431c,'.claude/skills/lovrabet');if(existsSync(_0x16b674))_0x2bf6cf[_0x332d46(0x114)](_0x16b674);for(const _0x1d4e40 of collectIdeSkillFiles(_0x4a431c)){if(existsSync(_0x1d4e40))_0x2bf6cf[_0x332d46(0x114)](_0x1d4e40);}let _0x4f3c7c=null;const _0x50e061=resolve(_0x4a431c,_0x332d46(0x136));if(existsSync(_0x50e061))try{const _0x568378=JSON['parse'](readFileSync(_0x50e061,_0x332d46(0xfe)));if(_0x568378?.[_0x332d46(0x112)]&&typeof _0x568378[_0x332d46(0x112)]===_0x332d46(0x12f)){const _0x509ed9=[];for(const [_0x8f4e4a,_0x3ea508]of Object[_0x332d46(0xfa)](_0x568378['mcpServers'])){const _0x58d16e=_0x3ea508;_0x58d16e?.[_0x332d46(0x15c)]&&Array[_0x332d46(0x15b)](_0x58d16e['args'])&&_0x58d16e[_0x332d46(0x15c)][_0x332d46(0xf0)](_0x2f8519=>typeof _0x2f8519==='string'&&_0x2f8519[_0x332d46(0x10c)](_0x332d46(0x157)))&&_0x509ed9[_0x332d46(0x114)](_0x8f4e4a);}_0x509ed9[_0x332d46(0x130)]>0x0&&(_0x4f3c7c={'path':_0x50e061,'keys':_0x509ed9});}}catch{}const _0x4b5c34=_0x2bf6cf[_0x332d46(0x130)]>0x0||_0x534697!==null;let _0x4d9fdb=null;const _0x17cd1e=resolve(_0x4a431c,_0x332d46(0xfd));if(existsSync(_0x17cd1e))try{const _0x50fd1e=JSON[_0x332d46(0x165)](readFileSync(_0x17cd1e,'utf8'));for(const _0x571d8e of[_0x332d46(0x166),_0x332d46(0xed)]){const _0x181d16=_0x50fd1e?.[_0x571d8e]?.[_0x332d46(0x153)];if(typeof _0x181d16===_0x332d46(0x108)){_0x181d16!=='latest'&&(_0x4d9fdb={'pkgPath':_0x17cd1e,'currentVersion':_0x181d16,'field':_0x571d8e});break;}}}catch{}return{'configMigration':_0x534697,'oldArtifacts':_0x2bf6cf,'oldMcpConfig':_0x4f3c7c,'needsSkillSwap':_0x4b5c34,'sdkUpgrade':_0x4d9fdb};}function printReport(_0xf577ae){const _0x40ba42=a125_0x344b,{configMigration:_0x399186,oldArtifacts:_0x416189,oldMcpConfig:_0x439b3b,needsSkillSwap:_0x44738c}=_0xf577ae;console['log'](''),console[_0x40ba42(0xec)](a125_0x38bea5['bold'](_0x40ba42(0x12d))),console[_0x40ba42(0xec)]('');_0x399186?(console['log'](a125_0x38bea5[_0x40ba42(0xf2)](_0x40ba42(0x115))+('\x20\x20'+a125_0x38bea5['yellow'](_0x399186[_0x40ba42(0x122)]))),console['log'](_0x40ba42(0xe7)+(_0x399186[_0x40ba42(0x13e)]?a125_0x38bea5['green'](_0x40ba42(0x15f)):a125_0x38bea5[_0x40ba42(0x12b)](_0x40ba42(0x14a)))),console[_0x40ba42(0xec)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x399186[_0x40ba42(0x11a)][_0x40ba42(0xfb)](',\x20')),console[_0x40ba42(0xec)](_0x40ba42(0xef))):console[_0x40ba42(0xec)](a125_0x38bea5[_0x40ba42(0xf2)](_0x40ba42(0x115))+'\x20\x20'+a125_0x38bea5[_0x40ba42(0x12b)](_0x40ba42(0x167)));console[_0x40ba42(0xec)]('');if(_0x416189[_0x40ba42(0x130)]>0x0){console[_0x40ba42(0xec)](a125_0x38bea5[_0x40ba42(0xf2)](_0x40ba42(0x128)));for(const _0x508bcd of _0x416189){console[_0x40ba42(0xec)]('\x20\x20'+a125_0x38bea5[_0x40ba42(0x11c)](_0x40ba42(0x133))+'\x20\x20'+_0x508bcd);}console[_0x40ba42(0xec)](_0x40ba42(0x100));}else console['log'](a125_0x38bea5[_0x40ba42(0xf2)](_0x40ba42(0x128))+'\x20\x20'+a125_0x38bea5[_0x40ba42(0x12b)](_0x40ba42(0x132)));console[_0x40ba42(0xec)]('');_0x439b3b?(console['log'](a125_0x38bea5[_0x40ba42(0xf2)]('MCP\x20config:')+('\x20\x20'+a125_0x38bea5[_0x40ba42(0x127)](_0x439b3b['path'])+_0x40ba42(0x124)+_0x439b3b[_0x40ba42(0x158)]['join'](',\x20'))),console[_0x40ba42(0xec)](_0x40ba42(0x104))):console[_0x40ba42(0xec)](a125_0x38bea5[_0x40ba42(0xf2)](_0x40ba42(0x137))+'\x20\x20'+a125_0x38bea5[_0x40ba42(0x12b)](_0x40ba42(0x10f)));console[_0x40ba42(0xec)](''),console[_0x40ba42(0xec)](a125_0x38bea5[_0x40ba42(0xf2)](_0x40ba42(0x13d))+('\x20\x20'+(_0x44738c?a125_0x38bea5['yellow'](_0x40ba42(0x110)):a125_0x38bea5[_0x40ba42(0x116)](_0x40ba42(0x164)))));_0x44738c&&console[_0x40ba42(0xec)](_0x40ba42(0x13c)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0xf577ae['sdkUpgrade']){const {currentVersion:_0x355434,field:_0x44f973,pkgPath:_0x204022}=_0xf577ae[_0x40ba42(0x123)];console['log'](a125_0x38bea5[_0x40ba42(0xf2)](_0x40ba42(0x152))+('\x20\x20'+a125_0x38bea5[_0x40ba42(0x127)](_0x204022))),console[_0x40ba42(0xec)](_0x40ba42(0x156)+_0x44f973+':\x20'+a125_0x38bea5[_0x40ba42(0x127)](_0x355434)+_0x40ba42(0x11b)+a125_0x38bea5[_0x40ba42(0x116)](_0x40ba42(0x14f))),console[_0x40ba42(0xec)](_0x40ba42(0x11f));}else console[_0x40ba42(0xec)](a125_0x38bea5[_0x40ba42(0xf2)]('@lovrabet/sdk:')+'\x20\x20'+a125_0x38bea5[_0x40ba42(0x12b)](_0x40ba42(0xff)));console[_0x40ba42(0xec)]('');}function a125_0x1a03(){const _0x2c5b90=['2251688LyJMoQ','435759VJnjpU','no\x20matching\x20entry\x20found','entries','join','status','package.json','utf8','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20Action:\x20delete','Remove\x20.lovrabet/','Step\x205/7:\x20Removing\x20old\x20skill...','10WQNfIC','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','\x20from\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','string','fail','lovrabet/lovrabet-skill\x20removed','done','includes','path','Remove\x20legacy\x20artifacts','no\x20legacy\x20entry','needed','message','mcpServers','Install\x20new\x20skill','push','Config\x20file:','green','succeed','Step\x206/7:\x20Installing\x20new\x20skill...','step','fields','\x20→\x20','red','Step\x204/7:\x20Cleaning\x20MCP\x20config...','2725OXucgk','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','CANCEL','oldPath','sdkUpgrade','\x20→\x20keys:\x20','skipped','lovrabet/rabetbase','yellow','Legacy\x20artifacts:','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','gray','Clean\x20MCP\x20config','===\x20Upgrade\x20Analysis\x20===','9036825wJkeWn','object','length','start','none\x20found','FOUND','\x20\x20\x20\x20\x20\x20\x20','white','.cursor/mcp.json','MCP\x20config:','Config\x20migration','\x20removed','\x20→\x20latest','Step\x204/7:\x20MCP\x20config\x20—\x20','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Skill\x20swap:','hasNewConfig','oldArtifacts','removed\x20','\x20\x20#\x20or','Upgrade\x20completed\x20successfully!','Step\x201/7:\x20Config\x20migration\x20—\x20','Upgrade\x20cancelled.','failed','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','6569352PkeEgK','11274lTtvQq','.lovrabet','not\x20found\x20(will\x20create)','lovrabet/rabetbase\x20installed\x20globally','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20\x20npm\x20install','stringify','latest','error','Remove\x20old\x20skill','@lovrabet/sdk:','@lovrabet/sdk','\x20(backup:\x20','configMigration','\x20\x20Current\x20version\x20in\x20','@lovrabet/dataset-mcp-server','keys','info','filter','isArray','args','===\x20Upgrade\x20Summary\x20===','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','already\x20exists\x20(will\x20merge)','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','oldMcpConfig','Upgrade\x20@lovrabet/sdk','files','not\x20needed','parse','dependencies','no\x20legacy\x20config\x20found','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','\x20\x20New\x20config\x20(.rabetbase.json):\x20','bold','2425592vlQoUL','1510855orSKwg','[\x22@lovrabet/sdk\x22]:\x20','log','devDependencies','FAIL','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','some','values','cyan','Step\x201/7:\x20Migrating\x20config...','\x20\x20Step\x20','needsSkillSwap','detail'];a125_0x1a03=function(){return _0x2c5b90;};return a125_0x1a03();}function execConfigMigration(_0x2b6e98,_0x240887){const _0xdb7e6c=a125_0x344b,{configMigration:_0x4a98d5}=_0x2b6e98;if(!_0x4a98d5?.[_0xdb7e6c(0x122)])return{'step':0x1,'label':_0xdb7e6c(0x138),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x5d9f3b=readConfigFile(_0x4a98d5[_0xdb7e6c(0x122)]),_0x76f2ba=resolve(_0x240887,NEW_CONFIG_NAME),_0x14da33=_0x4a98d5['hasNewConfig']?readConfigFile(_0x76f2ba):{};for(const [_0x1ed3ea,_0x1988ce]of Object[_0xdb7e6c(0xfa)](_0x5d9f3b)){!(_0x1ed3ea in _0x14da33)&&(_0x14da33[_0x1ed3ea]=_0x1988ce);}writeConfigFile(_0x76f2ba,_0x14da33);const _0x479b37=_0x4a98d5['oldPath']+'.bak';return renameSync(_0x4a98d5[_0xdb7e6c(0x122)],_0x479b37),{'step':0x1,'label':_0xdb7e6c(0x138),'ok':!![],'detail':_0x4a98d5['oldPath']+'\x20→\x20'+_0x76f2ba+_0xdb7e6c(0x154)+_0x479b37+')'};}function execRemoveOldArtifacts(_0x5f4960){const _0x574178=a125_0x344b,_0x1ab944=[];for(const _0x364dd9 of _0x5f4960){try{if(!existsSync(_0x364dd9))continue;const _0x5d9738=tryStat(_0x364dd9);_0x5d9738?.['isDirectory']()?rmSync(_0x364dd9,{'recursive':!![],'force':!![]}):unlinkSync(_0x364dd9);}catch(_0x37a6f3){_0x1ab944[_0x574178(0x114)](_0x364dd9+':\x20'+_0x37a6f3[_0x574178(0x111)]);}}return{'step':0x3,'label':_0x574178(0x10e),'ok':_0x1ab944['length']===0x0,'detail':_0x1ab944[_0x574178(0x130)]>0x0?_0x5f4960[_0x574178(0x130)]-_0x1ab944[_0x574178(0x130)]+'/'+_0x5f4960[_0x574178(0x130)]+'\x20removed\x20('+_0x1ab944[_0x574178(0xfb)](';\x20')+')':_0x5f4960[_0x574178(0x130)]+_0x574178(0x139)};}function execCleanMcp(_0x37d7e9){const _0x1de838=a125_0x344b;if(!_0x37d7e9[_0x1de838(0x161)])return{'step':0x4,'label':_0x1de838(0x12c),'ok':!![],'detail':_0x1de838(0x125)};try{const _0x3bea1a=readFileSync(_0x37d7e9[_0x1de838(0x161)][_0x1de838(0x10d)],_0x1de838(0xfe)),_0x42a97b=JSON[_0x1de838(0x165)](_0x3bea1a);if(_0x42a97b?.[_0x1de838(0x112)]&&typeof _0x42a97b['mcpServers']===_0x1de838(0x12f)){const _0x2f2ced=[];for(const [_0x3caa78,_0x351441]of Object[_0x1de838(0xfa)](_0x42a97b['mcpServers'])){_0x351441?.[_0x1de838(0x15c)]&&Array[_0x1de838(0x15b)](_0x351441[_0x1de838(0x15c)])&&_0x351441[_0x1de838(0x15c)][_0x1de838(0xf0)](_0x3dcea1=>typeof _0x3dcea1==='string'&&_0x3dcea1[_0x1de838(0x10c)](_0x1de838(0x157)))&&_0x2f2ced[_0x1de838(0x114)](_0x3caa78);}for(const _0x558152 of _0x2f2ced){delete _0x42a97b[_0x1de838(0x112)][_0x558152];}return _0x2f2ced[_0x1de838(0x130)]>0x0&&writeFileSync(_0x37d7e9[_0x1de838(0x161)][_0x1de838(0x10d)],JSON[_0x1de838(0x14e)](_0x42a97b,null,0x2)+'\x0a',_0x1de838(0xfe)),{'step':0x4,'label':_0x1de838(0x12c),'ok':!![],'detail':_0x1de838(0x140)+_0x2f2ced[_0x1de838(0xfb)](',\x20')+_0x1de838(0x106)+_0x37d7e9[_0x1de838(0x161)][_0x1de838(0x10d)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x1de838(0xf9)};}catch(_0x473de1){return{'step':0x4,'label':_0x1de838(0x12c),'ok':![],'detail':_0x473de1[_0x1de838(0x111)]};}}function execSkillsRemove(_0x340d1a,_0x5968f1){const _0x2a9fb6=a125_0x344b,_0x492ab3=runNpxSkillsRemove(_0x340d1a,{'stdio':'inherit','yes':_0x5968f1});return{'step':0x5,'label':_0x2a9fb6(0x151),'ok':_0x492ab3['ok'],'detail':_0x492ab3['ok']?_0x2a9fb6(0x10a):_0x492ab3[_0x2a9fb6(0x150)]??'exit\x20'+_0x492ab3['status']};}function execSkillsAdd(_0x26886c,_0x2e72de){const _0x3453f0=a125_0x344b,_0xda2462=runNpxSkillsAddGlobal(_0x26886c,_0x3453f0(0x126),{'stdio':'inherit','yes':_0x2e72de});return{'step':0x6,'label':_0x3453f0(0x113),'ok':_0xda2462['ok'],'detail':_0xda2462['ok']?_0x3453f0(0x14b):_0xda2462['error']??'exit\x20'+_0xda2462[_0x3453f0(0xfc)]};}function execUpgradeSdk(_0x2ea4ef){const _0x598812=a125_0x344b;if(!_0x2ea4ef[_0x598812(0x123)])return{'step':0x7,'label':_0x598812(0x162),'ok':!![],'detail':_0x598812(0x107)};const {pkgPath:_0x1de9dd,currentVersion:_0x9145eb,field:_0x3db64e}=_0x2ea4ef[_0x598812(0x123)];try{const _0x5be7c7=readFileSync(_0x1de9dd,_0x598812(0xfe)),_0x42728b=JSON[_0x598812(0x165)](_0x5be7c7);return _0x42728b[_0x3db64e][_0x598812(0x153)]=_0x598812(0x14f),writeFileSync(_0x1de9dd,JSON[_0x598812(0x14e)](_0x42728b,null,0x2)+'\x0a',_0x598812(0xfe)),{'step':0x7,'label':_0x598812(0x162),'ok':!![],'detail':_0x3db64e+_0x598812(0xeb)+_0x9145eb+_0x598812(0x13a)};}catch(_0x591eaa){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x591eaa[_0x598812(0x111)]};}}function tryStat(_0x1fcb33){try{return statSync(_0x1fcb33);}catch{return undefined;}}function printSummary(_0x107727){const _0x3919bf=a125_0x344b;console[_0x3919bf(0xec)](''),console[_0x3919bf(0xec)](a125_0x38bea5[_0x3919bf(0xe8)](_0x3919bf(0x15d))),console[_0x3919bf(0xec)]('');for(const _0x56e87e of _0x107727){const _0xea76f1=_0x56e87e['ok']?a125_0x38bea5[_0x3919bf(0x116)]('OK'):a125_0x38bea5['red'](_0x3919bf(0xee));console['log']('\x20\x20'+_0xea76f1+_0x3919bf(0xf4)+_0x56e87e[_0x3919bf(0x119)]+':\x20'+_0x56e87e['label']);if(_0x56e87e['detail'])console[_0x3919bf(0xec)](_0x3919bf(0x134)+a125_0x38bea5['gray'](_0x56e87e[_0x3919bf(0xf6)]));}console['log']('');}export async function upgradeApp(_0x18ac2e,_0x409a58){const _0x115c96=a125_0x344b,_0x5054d3=process['cwd'](),_0x41f958=analyse(_0x5054d3),_0x3df8ab=!_0x41f958[_0x115c96(0x155)]&&_0x41f958[_0x115c96(0x13f)][_0x115c96(0x130)]===0x0&&!_0x41f958[_0x115c96(0x161)]&&!_0x41f958[_0x115c96(0xf5)]&&!_0x41f958[_0x115c96(0x123)];if(_0x3df8ab){console[_0x115c96(0xec)](a125_0x38bea5[_0x115c96(0x116)](_0x115c96(0x105)));return;}printReport(_0x41f958);const _0x1a6c42=!!(_0x409a58['yes']||_0x409a58['Y']||_0x18ac2e);if(!_0x1a6c42)try{const _0x3382ff=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x3382ff){console['log'](a125_0x38bea5[_0x115c96(0x12b)](_0x115c96(0x144)));return;}}catch(_0x3d22e8){if(_0x3d22e8?.[_0x115c96(0x111)]===_0x115c96(0x121)){console[_0x115c96(0xec)](a125_0x38bea5['gray'](_0x115c96(0x144)));return;}throw _0x3d22e8;}const _0x3921ac=[],_0xeaf5c5=a125_0x393437({'text':_0x115c96(0xf3),'color':_0x115c96(0xf2)})[_0x115c96(0x131)](),_0x3fc516=execConfigMigration(_0x41f958,_0x5054d3);_0x3921ac[_0x115c96(0x114)](_0x3fc516),_0xeaf5c5[_0x3fc516['ok']?_0x115c96(0x117):'fail'](_0x115c96(0x143)+(_0x3fc516['detail']??(_0x3fc516['ok']?'done':_0x115c96(0x145))));const _0x6a7ef=resolve(_0x5054d3,_0x115c96(0x149)),_0x212a57=a125_0x393437({'text':_0x115c96(0x12a),'color':_0x115c96(0xf2)})['start']();if(existsSync(_0x6a7ef))try{rmSync(_0x6a7ef,{'recursive':!![],'force':!![]}),_0x212a57['succeed']('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x3921ac['push']({'step':0x2,'label':_0x115c96(0x101),'ok':!![]});}catch(_0xfd5494){_0x212a57['fail']('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0xfd5494[_0x115c96(0x111)]),_0x3921ac[_0x115c96(0x114)]({'step':0x2,'label':_0x115c96(0x101),'ok':![],'detail':_0xfd5494[_0x115c96(0x111)]});}else _0x212a57[_0x115c96(0x159)](_0x115c96(0x120)),_0x3921ac[_0x115c96(0x114)]({'step':0x2,'label':_0x115c96(0x101),'ok':!![],'detail':_0x115c96(0x125)});const _0x5b30c0=a125_0x393437({'text':_0x115c96(0x168),'color':_0x115c96(0xf2)})[_0x115c96(0x131)](),_0x477465=execRemoveOldArtifacts(_0x41f958['oldArtifacts']);_0x3921ac['push'](_0x477465),_0x5b30c0[_0x477465['ok']?_0x115c96(0x117):_0x115c96(0x109)](_0x115c96(0x15e)+(_0x477465[_0x115c96(0xf6)]??(_0x477465['ok']?_0x115c96(0x10b):_0x115c96(0x145))));const _0x49c0ad=a125_0x393437({'text':_0x115c96(0x11d),'color':_0x115c96(0xf2)})[_0x115c96(0x131)](),_0xae297a=execCleanMcp(_0x41f958);_0x3921ac[_0x115c96(0x114)](_0xae297a),_0x49c0ad[_0xae297a['ok']?_0x115c96(0x117):'fail'](_0x115c96(0x13b)+(_0xae297a['detail']??(_0xae297a['ok']?_0x115c96(0x10b):_0x115c96(0x145))));const _0x31451f=a125_0x393437({'text':_0x115c96(0x102),'color':_0x115c96(0xf2)})[_0x115c96(0x131)](),_0x3a6301=execSkillsRemove(_0x5054d3,_0x1a6c42);_0x3921ac['push'](_0x3a6301),_0x31451f[_0x3a6301['ok']?_0x115c96(0x117):_0x115c96(0x109)](_0x115c96(0x14c)+(_0x3a6301[_0x115c96(0xf6)]??(_0x3a6301['ok']?_0x115c96(0x10b):_0x115c96(0x145))));const _0x2f4f97=a125_0x393437({'text':_0x115c96(0x118),'color':_0x115c96(0xf2)})[_0x115c96(0x131)](),_0x30ba5d=execSkillsAdd(_0x5054d3,_0x1a6c42);_0x3921ac['push'](_0x30ba5d),_0x2f4f97[_0x30ba5d['ok']?_0x115c96(0x117):_0x115c96(0x109)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x30ba5d[_0x115c96(0xf6)]??(_0x30ba5d['ok']?_0x115c96(0x10b):_0x115c96(0x145))));const _0x16e2ff=a125_0x393437({'text':_0x115c96(0x129),'color':_0x115c96(0xf2)})[_0x115c96(0x131)](),_0x5d46af=execUpgradeSdk(_0x41f958);_0x3921ac[_0x115c96(0x114)](_0x5d46af),_0x16e2ff[_0x5d46af['ok']?_0x115c96(0x117):_0x115c96(0x109)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x5d46af[_0x115c96(0xf6)]??(_0x5d46af['ok']?_0x115c96(0x10b):_0x115c96(0x145)))),printSummary(_0x3921ac);const _0x30e3a8=_0x3921ac['some'](_0x5721c8=>!_0x5721c8['ok']);_0x30e3a8?console[_0x115c96(0xec)](a125_0x38bea5[_0x115c96(0x127)](_0x115c96(0x160))):console[_0x115c96(0xec)](a125_0x38bea5[_0x115c96(0x116)](_0x115c96(0x142))),_0x5d46af['ok']&&_0x41f958[_0x115c96(0x123)]&&(console[_0x115c96(0xec)](''),console[_0x115c96(0xec)](a125_0x38bea5['bold'][_0x115c96(0xf2)](_0x115c96(0xe6))),console['log'](a125_0x38bea5['cyan'](_0x115c96(0x146))),console[_0x115c96(0xec)](''),console[_0x115c96(0xec)](a125_0x38bea5[_0x115c96(0x135)](_0x115c96(0x14d))),console[_0x115c96(0xec)](a125_0x38bea5[_0x115c96(0x135)](_0x115c96(0x141))),console[_0x115c96(0xec)](a125_0x38bea5['white']('\x20\x20bun\x20install')),console[_0x115c96(0xec)](''));}
1
+ function a126_0x42e8(){const _0x5d951d=['needsSkillSwap','step','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20bun\x20install','oldPath','stringify','white','906070qtLrRa','\x20\x20Fields\x20to\x20migrate:\x20','\x20→\x20latest','CANCEL','configMigration','some','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','7pbwHYS','args','join','yes','oldMcpConfig','Upgrade\x20completed\x20successfully!','info','oldArtifacts','333924gblmqZ','sdkUpgrade','Legacy\x20artifacts:','green','exit\x20','9RQRkjo','.cursor/mcp.json','526CaLFKj','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','succeed','lovrabet/rabetbase\x20installed\x20globally','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','yellow','bold','Remove\x20old\x20skill','dependencies','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','not\x20found\x20(will\x20create)','@lovrabet/dataset-mcp-server','path','2050550MOcPmP','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','detail','isDirectory','done','entries','length','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','\x20→\x20','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','\x20\x20Step\x20','object','hasNewConfig','parse','\x20from\x20','Upgrade\x20cancelled.','undefined','includes','3021obaZdT','lovrabet/rabetbase','@lovrabet/sdk:','string','@lovrabet/sdk','Remove\x20legacy\x20artifacts','devDependencies','727ZZqYxd','76KprQrK','Remove\x20.lovrabet/','\x20removed','Upgrade\x20@lovrabet/sdk','none\x20found','message','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Install\x20new\x20skill','.claude/skills/lovrabet','.lovrabet','Step\x201/7:\x20Config\x20migration\x20—\x20','\x20\x20Current\x20version\x20in\x20','not\x20found\x20or\x20already\x20at\x20latest','start','isArray','\x20\x20#\x20or','Step\x206/7:\x20Installing\x20new\x20skill...','red','Clean\x20MCP\x20config','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','failed','Step\x201/7:\x20Migrating\x20config...','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','gray','\x20removed\x20(','\x20\x20Action:\x20delete','\x20(backup:\x20','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','mcpServers','inherit','1352392uoaPQg','FAIL','fail','files','already\x20exists\x20(will\x20merge)','needed','status','utf8','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','cyan','values','20SfSpEw','Step\x204/7:\x20Cleaning\x20MCP\x20config...','label','not\x20needed','2018820cLhlMG','error','fields','keys','push','skipped\x20(no\x20legacy\x20config)','Config\x20migration','latest','\x20\x20\x20\x20\x20\x20\x20','===\x20Upgrade\x20Summary\x20===','\x20\x20New\x20config\x20(.rabetbase.json):\x20','.bak','log','no\x20matching\x20entry\x20found','MCP\x20config:','filter'];a126_0x42e8=function(){return _0x5d951d;};return a126_0x42e8();}(function(_0xd9d178,_0x1ca889){const _0x87a60e=a126_0x18f7,_0x1f0729=_0xd9d178();while(!![]){try{const _0x32267d=-parseInt(_0x87a60e(0x1dd))/0x1*(-parseInt(_0x87a60e(0x238))/0x2)+parseInt(_0x87a60e(0x1d6))/0x3*(parseInt(_0x87a60e(0x1de))/0x4)+parseInt(_0x87a60e(0x207))/0x5*(parseInt(_0x87a60e(0x231))/0x6)+parseInt(_0x87a60e(0x229))/0x7*(parseInt(_0x87a60e(0x1fc))/0x8)+parseInt(_0x87a60e(0x236))/0x9*(-parseInt(_0x87a60e(0x245))/0xa)+-parseInt(_0x87a60e(0x222))/0xb+-parseInt(_0x87a60e(0x20b))/0xc;if(_0x32267d===_0x1ca889)break;else _0x1f0729['push'](_0x1f0729['shift']());}catch(_0x5d7e19){_0x1f0729['push'](_0x1f0729['shift']());}}}(a126_0x42e8,0x23ba3));import a126_0x1e57a9 from'chalk';import a126_0x1e1828 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0xc1911=>_0xc1911!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x371f3d){const _0x41fed5=a126_0x18f7,_0x1b33b6=[];for(const _0x4adfa9 of Object[_0x41fed5(0x206)](CORE_IDE_CONFIGS)){if(_0x4adfa9['files'])for(const _0x430b1b of _0x4adfa9[_0x41fed5(0x1ff)]){_0x1b33b6[_0x41fed5(0x20f)](resolve(_0x371f3d,_0x430b1b['path']));}}return _0x1b33b6;}function analyse(_0x2b709e){const _0x115f33=a126_0x18f7;let _0x35e731=null;const _0x5d62b9=resolve(_0x2b709e,NEW_CONFIG_NAME),_0x5acd29=existsSync(_0x5d62b9);for(const _0xde4c04 of LEGACY_CONFIG_NAMES){const _0x3b43ee=resolve(_0x2b709e,_0xde4c04);if(existsSync(_0x3b43ee)){const _0x259bde=readConfigFile(_0x3b43ee),_0x5d2d0a=Object['keys'](_0x259bde)[_0x115f33(0x21a)](_0x4534f2=>typeof _0x259bde[_0x4534f2]!==_0x115f33(0x1d4));_0x35e731={'oldPath':_0x3b43ee,'hasNewConfig':_0x5acd29,'fields':_0x5d2d0a};break;}}const _0x5b91e8=[],_0x2d8c4d=resolve(_0x2b709e,_0x115f33(0x1e7));if(existsSync(_0x2d8c4d))_0x5b91e8[_0x115f33(0x20f)](_0x2d8c4d);const _0x253827=resolve(_0x2b709e,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x253827))_0x5b91e8[_0x115f33(0x20f)](_0x253827);const _0x479ffe=resolve(_0x2b709e,_0x115f33(0x1e6));if(existsSync(_0x479ffe))_0x5b91e8[_0x115f33(0x20f)](_0x479ffe);for(const _0x3818f7 of collectIdeSkillFiles(_0x2b709e)){if(existsSync(_0x3818f7))_0x5b91e8[_0x115f33(0x20f)](_0x3818f7);}let _0x397269=null;const _0x2cf250=resolve(_0x2b709e,_0x115f33(0x237));if(existsSync(_0x2cf250))try{const _0x4613c2=JSON[_0x115f33(0x253)](readFileSync(_0x2cf250,_0x115f33(0x203)));if(_0x4613c2?.['mcpServers']&&typeof _0x4613c2[_0x115f33(0x1fa)]==='object'){const _0x6e6e2c=[];for(const [_0x4c6113,_0xe7e31c]of Object[_0x115f33(0x24a)](_0x4613c2[_0x115f33(0x1fa)])){const _0x1d51ff=_0xe7e31c;_0x1d51ff?.[_0x115f33(0x22a)]&&Array[_0x115f33(0x1ec)](_0x1d51ff[_0x115f33(0x22a)])&&_0x1d51ff[_0x115f33(0x22a)][_0x115f33(0x227)](_0x2fac14=>typeof _0x2fac14===_0x115f33(0x1d9)&&_0x2fac14[_0x115f33(0x1d5)](_0x115f33(0x243)))&&_0x6e6e2c['push'](_0x4c6113);}_0x6e6e2c[_0x115f33(0x24b)]>0x0&&(_0x397269={'path':_0x2cf250,'keys':_0x6e6e2c});}}catch{}const _0x2d0ea9=_0x5b91e8[_0x115f33(0x24b)]>0x0||_0x35e731!==null;let _0x44c741=null;const _0x26d66e=resolve(_0x2b709e,'package.json');if(existsSync(_0x26d66e))try{const _0x35c3ca=JSON[_0x115f33(0x253)](readFileSync(_0x26d66e,_0x115f33(0x203)));for(const _0x10603 of[_0x115f33(0x240),_0x115f33(0x1dc)]){const _0x181645=_0x35c3ca?.[_0x10603]?.[_0x115f33(0x1da)];if(typeof _0x181645==='string'){_0x181645!=='latest'&&(_0x44c741={'pkgPath':_0x26d66e,'currentVersion':_0x181645,'field':_0x10603});break;}}}catch{}return{'configMigration':_0x35e731,'oldArtifacts':_0x5b91e8,'oldMcpConfig':_0x397269,'needsSkillSwap':_0x2d0ea9,'sdkUpgrade':_0x44c741};}function printReport(_0x19712d){const _0x44686c=a126_0x18f7,{configMigration:_0x5b89a2,oldArtifacts:_0x5c32e6,oldMcpConfig:_0x5a655b,needsSkillSwap:_0x38369b}=_0x19712d;console[_0x44686c(0x217)](''),console['log'](a126_0x1e57a9[_0x44686c(0x23e)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x44686c(0x217)]('');_0x5b89a2?(console[_0x44686c(0x217)](a126_0x1e57a9['cyan']('Config\x20file:')+('\x20\x20'+a126_0x1e57a9[_0x44686c(0x23d)](_0x5b89a2[_0x44686c(0x21f)]))),console[_0x44686c(0x217)](_0x44686c(0x215)+(_0x5b89a2['hasNewConfig']?a126_0x1e57a9[_0x44686c(0x234)](_0x44686c(0x200)):a126_0x1e57a9[_0x44686c(0x1f5)](_0x44686c(0x242)))),console[_0x44686c(0x217)](_0x44686c(0x223)+_0x5b89a2[_0x44686c(0x20d)]['join'](',\x20')),console[_0x44686c(0x217)](_0x44686c(0x246))):console[_0x44686c(0x217)](a126_0x1e57a9[_0x44686c(0x205)]('Config\x20file:')+'\x20\x20'+a126_0x1e57a9['gray']('no\x20legacy\x20config\x20found'));console[_0x44686c(0x217)]('');if(_0x5c32e6[_0x44686c(0x24b)]>0x0){console[_0x44686c(0x217)](a126_0x1e57a9['cyan'](_0x44686c(0x233)));for(const _0x51de14 of _0x5c32e6){console['log']('\x20\x20'+a126_0x1e57a9['red']('FOUND')+'\x20\x20'+_0x51de14);}console[_0x44686c(0x217)](_0x44686c(0x1f7));}else console['log'](a126_0x1e57a9[_0x44686c(0x205)](_0x44686c(0x233))+'\x20\x20'+a126_0x1e57a9[_0x44686c(0x1f5)](_0x44686c(0x1e2)));console[_0x44686c(0x217)]('');_0x5a655b?(console[_0x44686c(0x217)](a126_0x1e57a9[_0x44686c(0x205)](_0x44686c(0x219))+('\x20\x20'+a126_0x1e57a9[_0x44686c(0x23d)](_0x5a655b['path'])+'\x20→\x20keys:\x20'+_0x5a655b[_0x44686c(0x20e)]['join'](',\x20'))),console[_0x44686c(0x217)](_0x44686c(0x204))):console[_0x44686c(0x217)](a126_0x1e57a9[_0x44686c(0x205)]('MCP\x20config:')+'\x20\x20'+a126_0x1e57a9['gray']('no\x20legacy\x20entry'));console[_0x44686c(0x217)](''),console[_0x44686c(0x217)](a126_0x1e57a9['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x38369b?a126_0x1e57a9[_0x44686c(0x23d)](_0x44686c(0x201)):a126_0x1e57a9[_0x44686c(0x234)](_0x44686c(0x20a)))));_0x38369b&&console[_0x44686c(0x217)](_0x44686c(0x23c)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x44686c(0x217)]('');if(_0x19712d[_0x44686c(0x232)]){const {currentVersion:_0x33dc5,field:_0x201da7,pkgPath:_0x18b814}=_0x19712d['sdkUpgrade'];console[_0x44686c(0x217)](a126_0x1e57a9[_0x44686c(0x205)](_0x44686c(0x1d8))+('\x20\x20'+a126_0x1e57a9[_0x44686c(0x23d)](_0x18b814))),console[_0x44686c(0x217)](_0x44686c(0x1e9)+_0x201da7+':\x20'+a126_0x1e57a9[_0x44686c(0x23d)](_0x33dc5)+_0x44686c(0x24d)+a126_0x1e57a9[_0x44686c(0x234)]('latest')),console[_0x44686c(0x217)](_0x44686c(0x21d));}else console[_0x44686c(0x217)](a126_0x1e57a9[_0x44686c(0x205)]('@lovrabet/sdk:')+'\x20\x20'+a126_0x1e57a9[_0x44686c(0x1f5)](_0x44686c(0x1ea)));console[_0x44686c(0x217)]('');}function execConfigMigration(_0x54f474,_0x3c081c){const _0x868f73=a126_0x18f7,{configMigration:_0x511c24}=_0x54f474;if(!_0x511c24?.['oldPath'])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x868f73(0x210)};const _0x242b1e=readConfigFile(_0x511c24[_0x868f73(0x21f)]),_0xd79934=resolve(_0x3c081c,NEW_CONFIG_NAME),_0x226aea=_0x511c24[_0x868f73(0x252)]?readConfigFile(_0xd79934):{};for(const [_0x19ade3,_0x21541c]of Object[_0x868f73(0x24a)](_0x242b1e)){!(_0x19ade3 in _0x226aea)&&(_0x226aea[_0x19ade3]=_0x21541c);}writeConfigFile(_0xd79934,_0x226aea);const _0x23935f=_0x511c24['oldPath']+_0x868f73(0x216);return renameSync(_0x511c24[_0x868f73(0x21f)],_0x23935f),{'step':0x1,'label':_0x868f73(0x211),'ok':!![],'detail':_0x511c24[_0x868f73(0x21f)]+'\x20→\x20'+_0xd79934+_0x868f73(0x1f8)+_0x23935f+')'};}function execRemoveOldArtifacts(_0x1caca9){const _0x156387=a126_0x18f7,_0x3251ee=[];for(const _0xc311c5 of _0x1caca9){try{if(!existsSync(_0xc311c5))continue;const _0x2a99f0=tryStat(_0xc311c5);_0x2a99f0?.[_0x156387(0x248)]()?rmSync(_0xc311c5,{'recursive':!![],'force':!![]}):unlinkSync(_0xc311c5);}catch(_0x514da4){_0x3251ee['push'](_0xc311c5+':\x20'+_0x514da4[_0x156387(0x1e3)]);}}return{'step':0x3,'label':_0x156387(0x1db),'ok':_0x3251ee[_0x156387(0x24b)]===0x0,'detail':_0x3251ee[_0x156387(0x24b)]>0x0?_0x1caca9[_0x156387(0x24b)]-_0x3251ee[_0x156387(0x24b)]+'/'+_0x1caca9[_0x156387(0x24b)]+_0x156387(0x1f6)+_0x3251ee[_0x156387(0x22b)](';\x20')+')':_0x1caca9['length']+_0x156387(0x1e0)};}function execCleanMcp(_0x129754){const _0x429974=a126_0x18f7;if(!_0x129754['oldMcpConfig'])return{'step':0x4,'label':_0x429974(0x1f0),'ok':!![],'detail':'skipped'};try{const _0x33ac3b=readFileSync(_0x129754[_0x429974(0x22d)][_0x429974(0x244)],'utf8'),_0x26ea97=JSON['parse'](_0x33ac3b);if(_0x26ea97?.['mcpServers']&&typeof _0x26ea97[_0x429974(0x1fa)]===_0x429974(0x251)){const _0x48c913=[];for(const [_0x50a7b8,_0x3213c7]of Object[_0x429974(0x24a)](_0x26ea97[_0x429974(0x1fa)])){_0x3213c7?.['args']&&Array[_0x429974(0x1ec)](_0x3213c7[_0x429974(0x22a)])&&_0x3213c7['args'][_0x429974(0x227)](_0x3811ba=>typeof _0x3811ba===_0x429974(0x1d9)&&_0x3811ba['includes'](_0x429974(0x243)))&&_0x48c913[_0x429974(0x20f)](_0x50a7b8);}for(const _0x2c1863 of _0x48c913){delete _0x26ea97[_0x429974(0x1fa)][_0x2c1863];}return _0x48c913[_0x429974(0x24b)]>0x0&&writeFileSync(_0x129754[_0x429974(0x22d)][_0x429974(0x244)],JSON[_0x429974(0x220)](_0x26ea97,null,0x2)+'\x0a',_0x429974(0x203)),{'step':0x4,'label':_0x429974(0x1f0),'ok':!![],'detail':'removed\x20'+_0x48c913[_0x429974(0x22b)](',\x20')+_0x429974(0x254)+_0x129754[_0x429974(0x22d)][_0x429974(0x244)]};}return{'step':0x4,'label':_0x429974(0x1f0),'ok':!![],'detail':_0x429974(0x218)};}catch(_0x442882){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x442882['message']};}}function a126_0x18f7(_0x322cc5,_0x30a16b){_0x322cc5=_0x322cc5-0x1d3;const _0x42e847=a126_0x42e8();let _0x18f70c=_0x42e847[_0x322cc5];return _0x18f70c;}function execSkillsRemove(_0x35863c,_0x34f3c0){const _0xe89e41=a126_0x18f7,_0x58917=runNpxSkillsRemove(_0x35863c,{'stdio':_0xe89e41(0x1fb),'yes':_0x34f3c0});return{'step':0x5,'label':_0xe89e41(0x23f),'ok':_0x58917['ok'],'detail':_0x58917['ok']?'lovrabet/lovrabet-skill\x20removed':_0x58917[_0xe89e41(0x20c)]??_0xe89e41(0x235)+_0x58917[_0xe89e41(0x202)]};}function execSkillsAdd(_0x167d85,_0x5d2989){const _0x12d211=a126_0x18f7,_0x404dcc=runNpxSkillsAddGlobal(_0x167d85,_0x12d211(0x1d7),{'stdio':_0x12d211(0x1fb),'yes':_0x5d2989});return{'step':0x6,'label':_0x12d211(0x1e5),'ok':_0x404dcc['ok'],'detail':_0x404dcc['ok']?_0x12d211(0x23b):_0x404dcc[_0x12d211(0x20c)]??_0x12d211(0x235)+_0x404dcc[_0x12d211(0x202)]};}function execUpgradeSdk(_0x2fb704){const _0x258d43=a126_0x18f7;if(!_0x2fb704['sdkUpgrade'])return{'step':0x7,'label':_0x258d43(0x1e1),'ok':!![],'detail':_0x258d43(0x24c)};const {pkgPath:_0x3cdca8,currentVersion:_0x5cfc49,field:_0x2e5087}=_0x2fb704[_0x258d43(0x232)];try{const _0x25aeff=readFileSync(_0x3cdca8,'utf8'),_0x4a17ac=JSON[_0x258d43(0x253)](_0x25aeff);return _0x4a17ac[_0x2e5087][_0x258d43(0x1da)]=_0x258d43(0x212),writeFileSync(_0x3cdca8,JSON[_0x258d43(0x220)](_0x4a17ac,null,0x2)+'\x0a',_0x258d43(0x203)),{'step':0x7,'label':_0x258d43(0x1e1),'ok':!![],'detail':_0x2e5087+'[\x22@lovrabet/sdk\x22]:\x20'+_0x5cfc49+_0x258d43(0x224)};}catch(_0x27a927){return{'step':0x7,'label':_0x258d43(0x1e1),'ok':![],'detail':_0x27a927[_0x258d43(0x1e3)]};}}function tryStat(_0x573baf){try{return statSync(_0x573baf);}catch{return undefined;}}function printSummary(_0x52ad8f){const _0x385526=a126_0x18f7;console[_0x385526(0x217)](''),console[_0x385526(0x217)](a126_0x1e57a9[_0x385526(0x23e)](_0x385526(0x214))),console[_0x385526(0x217)]('');for(const _0x297a6d of _0x52ad8f){const _0x432103=_0x297a6d['ok']?a126_0x1e57a9['green']('OK'):a126_0x1e57a9[_0x385526(0x1ef)](_0x385526(0x1fd));console['log']('\x20\x20'+_0x432103+_0x385526(0x250)+_0x297a6d[_0x385526(0x21c)]+':\x20'+_0x297a6d[_0x385526(0x209)]);if(_0x297a6d[_0x385526(0x247)])console[_0x385526(0x217)](_0x385526(0x213)+a126_0x1e57a9[_0x385526(0x1f5)](_0x297a6d[_0x385526(0x247)]));}console[_0x385526(0x217)]('');}export async function upgradeApp(_0x2073ac,_0x2f53d0){const _0x33e370=a126_0x18f7,_0x284201=process['cwd'](),_0x1ca490=analyse(_0x284201),_0x1b725e=!_0x1ca490[_0x33e370(0x226)]&&_0x1ca490[_0x33e370(0x230)][_0x33e370(0x24b)]===0x0&&!_0x1ca490['oldMcpConfig']&&!_0x1ca490[_0x33e370(0x21b)]&&!_0x1ca490[_0x33e370(0x232)];if(_0x1b725e){console[_0x33e370(0x217)](a126_0x1e57a9[_0x33e370(0x234)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x1ca490);const _0x4029e7=!!(_0x2f53d0[_0x33e370(0x22c)]||_0x2f53d0['Y']||_0x2073ac);if(!_0x4029e7)try{const _0x4da11f=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x4da11f){console[_0x33e370(0x217)](a126_0x1e57a9['gray'](_0x33e370(0x1d3)));return;}}catch(_0x476a99){if(_0x476a99?.['message']===_0x33e370(0x225)){console[_0x33e370(0x217)](a126_0x1e57a9[_0x33e370(0x1f5)](_0x33e370(0x1d3)));return;}throw _0x476a99;}const _0x5a3355=[],_0x1fda6e=a126_0x1e1828({'text':_0x33e370(0x1f3),'color':_0x33e370(0x205)})['start'](),_0x23cac0=execConfigMigration(_0x1ca490,_0x284201);_0x5a3355['push'](_0x23cac0),_0x1fda6e[_0x23cac0['ok']?_0x33e370(0x23a):_0x33e370(0x1fe)](_0x33e370(0x1e8)+(_0x23cac0[_0x33e370(0x247)]??(_0x23cac0['ok']?'done':'failed')));const _0x4cd7e0=resolve(_0x284201,_0x33e370(0x1e7)),_0x78672a=a126_0x1e1828({'text':_0x33e370(0x24e),'color':_0x33e370(0x205)})[_0x33e370(0x1eb)]();if(existsSync(_0x4cd7e0))try{rmSync(_0x4cd7e0,{'recursive':!![],'force':!![]}),_0x78672a[_0x33e370(0x23a)](_0x33e370(0x1f1)),_0x5a3355['push']({'step':0x2,'label':_0x33e370(0x1df),'ok':!![]});}catch(_0x1e8792){_0x78672a[_0x33e370(0x1fe)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x1e8792[_0x33e370(0x1e3)]),_0x5a3355[_0x33e370(0x20f)]({'step':0x2,'label':_0x33e370(0x1df),'ok':![],'detail':_0x1e8792[_0x33e370(0x1e3)]});}else _0x78672a[_0x33e370(0x22f)](_0x33e370(0x1f9)),_0x5a3355[_0x33e370(0x20f)]({'step':0x2,'label':_0x33e370(0x1df),'ok':!![],'detail':'skipped'});const _0x292983=a126_0x1e1828({'text':_0x33e370(0x1f4),'color':_0x33e370(0x205)})['start'](),_0x5c5f7c=execRemoveOldArtifacts(_0x1ca490[_0x33e370(0x230)]);_0x5a3355[_0x33e370(0x20f)](_0x5c5f7c),_0x292983[_0x5c5f7c['ok']?'succeed':'fail'](_0x33e370(0x239)+(_0x5c5f7c[_0x33e370(0x247)]??(_0x5c5f7c['ok']?'done':_0x33e370(0x1f2))));const _0x12508d=a126_0x1e1828({'text':_0x33e370(0x208),'color':_0x33e370(0x205)})[_0x33e370(0x1eb)](),_0x4017f0=execCleanMcp(_0x1ca490);_0x5a3355[_0x33e370(0x20f)](_0x4017f0),_0x12508d[_0x4017f0['ok']?_0x33e370(0x23a):'fail']('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x4017f0[_0x33e370(0x247)]??(_0x4017f0['ok']?_0x33e370(0x249):_0x33e370(0x1f2))));const _0x147e4f=a126_0x1e1828({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':'cyan'})['start'](),_0x192977=execSkillsRemove(_0x284201,_0x4029e7);_0x5a3355['push'](_0x192977),_0x147e4f[_0x192977['ok']?_0x33e370(0x23a):_0x33e370(0x1fe)](_0x33e370(0x1e4)+(_0x192977['detail']??(_0x192977['ok']?_0x33e370(0x249):_0x33e370(0x1f2))));const _0x35b88d=a126_0x1e1828({'text':_0x33e370(0x1ee),'color':'cyan'})[_0x33e370(0x1eb)](),_0x4b560f=execSkillsAdd(_0x284201,_0x4029e7);_0x5a3355[_0x33e370(0x20f)](_0x4b560f),_0x35b88d[_0x4b560f['ok']?_0x33e370(0x23a):_0x33e370(0x1fe)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x4b560f[_0x33e370(0x247)]??(_0x4b560f['ok']?_0x33e370(0x249):_0x33e370(0x1f2))));const _0x42c198=a126_0x1e1828({'text':_0x33e370(0x228),'color':_0x33e370(0x205)})[_0x33e370(0x1eb)](),_0x39ad2a=execUpgradeSdk(_0x1ca490);_0x5a3355[_0x33e370(0x20f)](_0x39ad2a),_0x42c198[_0x39ad2a['ok']?_0x33e370(0x23a):_0x33e370(0x1fe)](_0x33e370(0x241)+(_0x39ad2a[_0x33e370(0x247)]??(_0x39ad2a['ok']?_0x33e370(0x249):_0x33e370(0x1f2)))),printSummary(_0x5a3355);const _0x5834e1=_0x5a3355[_0x33e370(0x227)](_0x4d6908=>!_0x4d6908['ok']);_0x5834e1?console[_0x33e370(0x217)](a126_0x1e57a9[_0x33e370(0x23d)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x33e370(0x217)](a126_0x1e57a9[_0x33e370(0x234)](_0x33e370(0x22e))),_0x39ad2a['ok']&&_0x1ca490['sdkUpgrade']&&(console[_0x33e370(0x217)](''),console[_0x33e370(0x217)](a126_0x1e57a9[_0x33e370(0x23e)][_0x33e370(0x205)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a126_0x1e57a9[_0x33e370(0x205)](_0x33e370(0x24f))),console[_0x33e370(0x217)](''),console[_0x33e370(0x217)](a126_0x1e57a9[_0x33e370(0x221)]('\x20\x20npm\x20install')),console[_0x33e370(0x217)](a126_0x1e57a9[_0x33e370(0x221)](_0x33e370(0x1ed))),console['log'](a126_0x1e57a9[_0x33e370(0x221)](_0x33e370(0x21e))),console[_0x33e370(0x217)](''));}
@@ -1 +1 @@
1
- const a126_0x4f4901=a126_0x171d;(function(_0x5b63a5,_0x8b11d7){const _0x13faff=a126_0x171d,_0x4f1297=_0x5b63a5();while(!![]){try{const _0xa13919=-parseInt(_0x13faff(0x138))/0x1*(parseInt(_0x13faff(0x12a))/0x2)+-parseInt(_0x13faff(0x112))/0x3+-parseInt(_0x13faff(0x116))/0x4+parseInt(_0x13faff(0x136))/0x5*(-parseInt(_0x13faff(0x130))/0x6)+parseInt(_0x13faff(0x12b))/0x7*(-parseInt(_0x13faff(0x13a))/0x8)+parseInt(_0x13faff(0x115))/0x9+parseInt(_0x13faff(0x129))/0xa;if(_0xa13919===_0x8b11d7)break;else _0x4f1297['push'](_0x4f1297['shift']());}catch(_0x549552){_0x4f1297['push'](_0x4f1297['shift']());}}}(a126_0x78a0,0xe014a));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';function a126_0x171d(_0x165356,_0x813974){_0x165356=_0x165356-0x10d;const _0x78a09f=a126_0x78a0();let _0x171ddf=_0x78a09f[_0x165356];return _0x171ddf;}import{menuDefinitions}from'../commands/menu/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{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/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(_0x5ed8e2){const _0x565950=a126_0x171d;for(const _0x5f9b84 of _0x5ed8e2){definitions['set'](_0x5f9b84[_0x565950(0x12c)]+':'+_0x5f9b84[_0x565950(0x13b)],_0x5f9b84);let _0x442b70=serviceGroups[_0x565950(0x11f)](_0x5f9b84['service']);!_0x442b70&&(_0x442b70=[],serviceGroups[_0x565950(0x12d)](_0x5f9b84[_0x565950(0x12c)],_0x442b70)),_0x442b70['push'](_0x5f9b84);}}function registerDeclarativeService(_0x2a3834,_0x43bdc4,_0x475f5b){const _0x5e551c=a126_0x171d;registerDefinitions(_0x43bdc4);_0x475f5b?.[_0x5e551c(0x11b)]&&registerDefinitions([_0x475f5b[_0x5e551c(0x11b)]]);const _0x5915cf=_0x206b09=>_0x206b09===_0x5e551c(0x132)?'':_0x206b09==='write'?_0x5e551c(0x127):'\x20\x20[high-risk-write]',_0x495b39={'service':_0x43bdc4[0x0][_0x5e551c(0x12c)],'label':_0x2a3834,'commands':_0x43bdc4[_0x5e551c(0x142)](_0xb36625=>({'command':_0xb36625[_0x5e551c(0x13b)],'description':_0xb36625[_0x5e551c(0x120)],'tag':_0x5915cf(_0xb36625[_0x5e551c(0x124)])})),'declarative':!![],'defaultCommand':_0x475f5b?.[_0x5e551c(0x13e)]??(_0x475f5b?.[_0x5e551c(0x11d)]?_0x43bdc4[0x0][_0x5e551c(0x13b)]:undefined),'wildcardDef':_0x475f5b?.[_0x5e551c(0x11b)],'isSingleCommand':_0x475f5b?.['isSingleCommand']};serviceRegistry[_0x5e551c(0x114)](_0x495b39),serviceByName[_0x5e551c(0x12d)](_0x495b39[_0x5e551c(0x12c)],_0x495b39);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':'run','isSingleCommand':!![]}),registerDeclarativeService(a126_0x4f4901(0x123),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a126_0x4f4901(0x110),appDefinitions),registerDeclarativeService(a126_0x4f4901(0x126),[runDefinition],{'wildcardDef':runDefinition});function a126_0x78a0(){const _0x3fec4e=['Project','risk','Schema','Run\x20Scripts','\x20\x20[write]','SQL\x20Queries','69274630SWHLHk','2TnygtF','608146CbGvTF','service','set','Logs','auth','4034532GhaDtS','Skills','read','show','Database\x20Connections','values','10IGhZDH','<script>','1807343akzmpu','start','144LuubkH','command','Remote\x20App\x20Config','Diagnostics','defaultCommand','Instant\x20API','from','Authentication','map','Dataset\x20&\x20Operations','skill','Platform\x20Issue','has','App\x20Management','logout','2093148adTfsV','build','push','2048328TGurqY','3294056rFYcEm','create','login','preview','API','wildcardDef','Run\x20any\x20package.json\x20script','isSingleCommand','run','get','description','project','Self\x20Update'];a126_0x78a0=function(){return _0x3fec4e;};return a126_0x78a0();}{const last=serviceRegistry[serviceRegistry['length']-0x1];last['commands']=[{'command':a126_0x4f4901(0x137),'description':a126_0x4f4901(0x11c),'tag':''}];}registerDeclarativeService(a126_0x4f4901(0x141),authDefinitions,{'defaultCommand':a126_0x4f4901(0x118)}),registerDeclarativeService(a126_0x4f4901(0x122),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a126_0x4f4901(0x13d),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a126_0x4f4901(0x125),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a126_0x4f4901(0x13c),appConfigDefinitions),registerDeclarativeService(a126_0x4f4901(0x10e),issueDefinitions),registerDeclarativeService(a126_0x4f4901(0x11a),apiDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a126_0x4f4901(0x134),dbDefinitions),registerDeclarativeService(a126_0x4f4901(0x143),datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages',pageDefinitions),registerDeclarativeService(a126_0x4f4901(0x13f),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a126_0x4f4901(0x128),sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a126_0x4f4901(0x131),skillDefinitions),registerDeclarativeService(a126_0x4f4901(0x12e),logsDefinitions,{'defaultCommand':a126_0x4f4901(0x133)});export const deprecatedAliases={'create':{'service':a126_0x4f4901(0x121),'command':a126_0x4f4901(0x117)},'start':{'service':a126_0x4f4901(0x11e),'command':a126_0x4f4901(0x139)},'build':{'service':a126_0x4f4901(0x11e),'command':a126_0x4f4901(0x113)},'preview':{'service':a126_0x4f4901(0x11e),'command':a126_0x4f4901(0x119)},'logout':{'service':a126_0x4f4901(0x12f),'command':a126_0x4f4901(0x111)},'skills':{'service':a126_0x4f4901(0x10d),'command':'install'}};export const deprecatedSubcommands={'bff':{'new':a126_0x4f4901(0x117)},'sql':{'new':a126_0x4f4901(0x117)}};export function resolveDeprecatedSubcommand(_0x457457,_0x18a221){return deprecatedSubcommands[_0x457457]?.[_0x18a221];}export function findDefinition(_0x59589f,_0x41e28f){const _0x497204=a126_0x4f4901;return definitions[_0x497204(0x11f)](_0x59589f+':'+_0x41e28f);}export function isKnownService(_0x2317df){return serviceByName['has'](_0x2317df);}export function isDeclarativeService(_0x3d3028){const _0x1b3d0d=a126_0x4f4901;return serviceGroups[_0x1b3d0d(0x10f)](_0x3d3028)||serviceByName[_0x1b3d0d(0x11f)](_0x3d3028)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x3b1517){const _0x330e90=a126_0x4f4901;return serviceByName[_0x330e90(0x11f)](_0x3b1517);}export function getLegacyHandler(_0x2cb3bc,_0x513b6a){return undefined;}export function getAllDefinitions(){const _0x31fa0f=a126_0x4f4901;return Array[_0x31fa0f(0x140)](definitions[_0x31fa0f(0x135)]());}
1
+ const a127_0x3ed19c=a127_0x1afb;(function(_0x4ea31,_0x2d308e){const _0x4df43d=a127_0x1afb,_0x2c5861=_0x4ea31();while(!![]){try{const _0xfc543f=-parseInt(_0x4df43d(0x1e7))/0x1+parseInt(_0x4df43d(0x1fb))/0x2*(-parseInt(_0x4df43d(0x1e8))/0x3)+parseInt(_0x4df43d(0x1e3))/0x4+parseInt(_0x4df43d(0x1e5))/0x5+-parseInt(_0x4df43d(0x1ed))/0x6*(parseInt(_0x4df43d(0x1e2))/0x7)+-parseInt(_0x4df43d(0x1f1))/0x8*(-parseInt(_0x4df43d(0x1e4))/0x9)+parseInt(_0x4df43d(0x1f2))/0xa*(parseInt(_0x4df43d(0x1dd))/0xb);if(_0xfc543f===_0x2d308e)break;else _0x2c5861['push'](_0x2c5861['shift']());}catch(_0x1307d1){_0x2c5861['push'](_0x2c5861['shift']());}}}(a127_0x1991,0x66aa5));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';function a127_0x1991(){const _0x3b50d1=['command','Configuration','3707429hddnSC','has','`rabetbase\x20skills`\x20has\x20been\x20removed.','Run\x20Scripts','run','5726mOfLqt','3131160kOOBEm','6192rddCZa','1155665tVhNCH','\x20\x20[high-risk-write]','56653sgmHQB','313164YGoNsN','Menu','isSingleCommand','wildcardDef','Schema','3252coOHAG','preview','Dataset\x20&\x20Operations','skills','1064ojgply','10ooorHk','Authentication','service','logout','Code\x20Generation','SQL\x20Queries','Self\x20Update','install','from','10oxPAFv','push','create','Diagnostics','show','risk','skill','API','read','Workspace','Database\x20Connections','values','set','Logs','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','get','`rabetbase\x20','Smart\x20List\x20Pages','build','`\x20has\x20been\x20removed.','auth','Run\x20any\x20package.json\x20script'];a127_0x1991=function(){return _0x3b50d1;};return a127_0x1991();}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(_0x56acfc){const _0x2a84ea=a127_0x1afb;for(const _0x5398cb of _0x56acfc){definitions[_0x2a84ea(0x1d1)](_0x5398cb['service']+':'+_0x5398cb[_0x2a84ea(0x1db)],_0x5398cb);let _0x3002a6=serviceGroups['get'](_0x5398cb['service']);!_0x3002a6&&(_0x3002a6=[],serviceGroups[_0x2a84ea(0x1d1)](_0x5398cb[_0x2a84ea(0x1f4)],_0x3002a6)),_0x3002a6[_0x2a84ea(0x1fc)](_0x5398cb);}}function registerDeclarativeService(_0x48feb8,_0x33d7d8,_0x54ecbd){const _0x46e7fc=a127_0x1afb;registerDefinitions(_0x33d7d8);_0x54ecbd?.[_0x46e7fc(0x1eb)]&&registerDefinitions([_0x54ecbd[_0x46e7fc(0x1eb)]]);const _0x1e19b0=_0x513182=>_0x513182===_0x46e7fc(0x203)?'':_0x513182==='write'?'\x20\x20[write]':_0x46e7fc(0x1e6),_0x44e863={'service':_0x33d7d8[0x0][_0x46e7fc(0x1f4)],'label':_0x48feb8,'commands':_0x33d7d8['map'](_0x33c948=>({'command':_0x33c948[_0x46e7fc(0x1db)],'description':_0x33c948['description'],'tag':_0x1e19b0(_0x33c948[_0x46e7fc(0x200)])})),'declarative':!![],'defaultCommand':_0x54ecbd?.['defaultCommand']??(_0x54ecbd?.[_0x46e7fc(0x1ea)]?_0x33d7d8[0x0][_0x46e7fc(0x1db)]:undefined),'wildcardDef':_0x54ecbd?.[_0x46e7fc(0x1eb)],'isSingleCommand':_0x54ecbd?.[_0x46e7fc(0x1ea)]};serviceRegistry[_0x46e7fc(0x1fc)](_0x44e863),serviceByName[_0x46e7fc(0x1d1)](_0x44e863['service'],_0x44e863);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a127_0x3ed19c(0x1e1),'isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a127_0x3ed19c(0x204),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a127_0x3ed19c(0x1e0),[runDefinition],{'wildcardDef':runDefinition});function a127_0x1afb(_0x53b8b8,_0x559fc9){_0x53b8b8=_0x53b8b8-0x1d1;const _0x19911b=a127_0x1991();let _0x1afbcc=_0x19911b[_0x53b8b8];return _0x1afbcc;}{const last=serviceRegistry[serviceRegistry['length']-0x1];last['commands']=[{'command':'<script>','description':a127_0x3ed19c(0x1da),'tag':''}];}registerDeclarativeService(a127_0x3ed19c(0x1f3),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a127_0x3ed19c(0x1f8),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a127_0x3ed19c(0x1fe),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a127_0x3ed19c(0x1ec),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a127_0x3ed19c(0x1dc),configDefinitions),registerDeclarativeService('Remote\x20App\x20Config',appConfigDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a127_0x3ed19c(0x202),apiDefinitions),registerDeclarativeService(a127_0x3ed19c(0x1e9),menuDefinitions),registerDeclarativeService(a127_0x3ed19c(0x205),dbDefinitions),registerDeclarativeService(a127_0x3ed19c(0x1ef),datasetDefinitions),registerDeclarativeService(a127_0x3ed19c(0x1d6),pageDefinitions),registerDeclarativeService('Instant\x20API',dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a127_0x3ed19c(0x1f7),sqlDefinitions),registerDeclarativeService(a127_0x3ed19c(0x1f6),codegenDefinitions),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a127_0x3ed19c(0x1f9)}),registerDeclarativeService(a127_0x3ed19c(0x1d2),logsDefinitions,{'defaultCommand':a127_0x3ed19c(0x1ff)});export const deprecatedAliases={'create':{'service':'project','command':a127_0x3ed19c(0x1fd)},'start':{'service':'run','command':'start'},'build':{'service':a127_0x3ed19c(0x1e1),'command':a127_0x3ed19c(0x1d7)},'preview':{'service':a127_0x3ed19c(0x1e1),'command':a127_0x3ed19c(0x1ee)},'logout':{'service':a127_0x3ed19c(0x1d9),'command':a127_0x3ed19c(0x1f5)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a127_0x3ed19c(0x1d3);export function resolveRemovedCommand(_0x2779d3,_0x5e12d7){const _0x24cb69=a127_0x3ed19c;if(_0x2779d3===_0x24cb69(0x201)){const _0x51e3ef=_0x5e12d7?'skill\x20'+_0x5e12d7:_0x24cb69(0x201);return{'command':_0x51e3ef,'message':_0x24cb69(0x1d5)+_0x51e3ef+_0x24cb69(0x1d8),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x2779d3==='skills')return{'command':_0x24cb69(0x1f0),'message':_0x24cb69(0x1df),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a127_0x3ed19c(0x1fd)},'sql':{'new':a127_0x3ed19c(0x1fd)}};export function resolveDeprecatedSubcommand(_0xaa011c,_0x47630d){return deprecatedSubcommands[_0xaa011c]?.[_0x47630d];}export function findDefinition(_0x6df7f9,_0x43ee14){const _0x312d78=a127_0x3ed19c;return definitions[_0x312d78(0x1d4)](_0x6df7f9+':'+_0x43ee14);}export function isKnownService(_0x185614){const _0x16875f=a127_0x3ed19c;return serviceByName[_0x16875f(0x1de)](_0x185614);}export function isDeclarativeService(_0xeb9480){const _0x37ceb7=a127_0x3ed19c;return serviceGroups[_0x37ceb7(0x1de)](_0xeb9480)||serviceByName[_0x37ceb7(0x1d4)](_0xeb9480)?.[_0x37ceb7(0x1eb)]!==undefined;}export function getServiceEntry(_0x2743f7){return serviceByName['get'](_0x2743f7);}export function getLegacyHandler(_0xff13ae,_0x48174a){return undefined;}export function getAllDefinitions(){const _0x2ac36b=a127_0x3ed19c;return Array[_0x2ac36b(0x1fa)](definitions[_0x2ac36b(0x206)]());}