@lovrabet/rabetbase-cli 2.0.6 → 2.0.8

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 (149) 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/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/api/shared.js +1 -1
  18. package/lib/commands/app/add.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/remote.js +1 -1
  22. package/lib/commands/app/remove.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app/use.js +1 -1
  25. package/lib/commands/auth/index.js +1 -1
  26. package/lib/commands/bff/delete.js +1 -1
  27. package/lib/commands/bff/detail.js +1 -1
  28. package/lib/commands/bff/index.js +1 -1
  29. package/lib/commands/bff/list.js +1 -1
  30. package/lib/commands/bff/new.js +1 -1
  31. package/lib/commands/bff/pull.js +1 -1
  32. package/lib/commands/bff/push.js +1 -1
  33. package/lib/commands/bff/status.js +1 -1
  34. package/lib/commands/cli-update.js +1 -1
  35. package/lib/commands/codegen/index.js +1 -1
  36. package/lib/commands/codegen/sdk.js +1 -1
  37. package/lib/commands/codegen/sql.js +1 -1
  38. package/lib/commands/common/app-selector.js +1 -1
  39. package/lib/commands/common/flags.js +1 -1
  40. package/lib/commands/common/validate.js +1 -1
  41. package/lib/commands/config/get.js +1 -1
  42. package/lib/commands/config/index.js +1 -1
  43. package/lib/commands/config/list.js +1 -1
  44. package/lib/commands/config/set.js +1 -1
  45. package/lib/commands/config/shared.js +1 -1
  46. package/lib/commands/dataset/detail.js +1 -1
  47. package/lib/commands/dataset/index.js +1 -1
  48. package/lib/commands/dataset/links.js +1 -1
  49. package/lib/commands/dataset/list.js +1 -1
  50. package/lib/commands/dataset/operations.js +1 -1
  51. package/lib/commands/doctor.js +1 -1
  52. package/lib/commands/init/index.js +1 -1
  53. package/lib/commands/logs/index.js +1 -1
  54. package/lib/commands/menu/index.js +1 -1
  55. package/lib/commands/menu/shared/compare-table.js +1 -1
  56. package/lib/commands/menu/shared/index.js +1 -1
  57. package/lib/commands/menu/shared/inquirer.js +1 -1
  58. package/lib/commands/menu/shared/local-pages.js +1 -1
  59. package/lib/commands/menu/shared/logic.js +1 -1
  60. package/lib/commands/menu/shared/service.js +1 -1
  61. package/lib/commands/menu/shared/sync-core.js +1 -1
  62. package/lib/commands/menu/shared/update-core.js +1 -1
  63. package/lib/commands/menu/shared/valid-url.js +1 -1
  64. package/lib/commands/menu/sync.js +1 -1
  65. package/lib/commands/menu/update.js +1 -1
  66. package/lib/commands/project/create/enhanced-guided-create.js +1 -0
  67. package/lib/commands/project/create/format-elapsed.js +1 -0
  68. package/lib/commands/project/create/main.js +1 -0
  69. package/lib/commands/project/create/non-interactive.js +1 -0
  70. package/lib/commands/project/create/project-template-path.js +1 -0
  71. package/lib/commands/project/create/use-copy-project-template.js +1 -0
  72. package/lib/commands/project/create/use-format-code.js +1 -0
  73. package/lib/commands/project/create/use-install-dependencies.js +1 -0
  74. package/lib/commands/project/index.js +1 -1
  75. package/lib/commands/project/init.js +1 -0
  76. package/lib/commands/project/upgrade.js +1 -0
  77. package/lib/commands/registry.js +1 -1
  78. package/lib/commands/run/index.js +1 -1
  79. package/lib/commands/schema.js +1 -0
  80. package/lib/commands/skill/index.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/sql/list.js +1 -1
  85. package/lib/commands/sql/save.js +1 -1
  86. package/lib/commands/sql/validate.js +1 -1
  87. package/lib/constant/cli.js +1 -1
  88. package/lib/constant/domain.js +1 -1
  89. package/lib/constant/env.js +1 -1
  90. package/lib/context.js +1 -1
  91. package/lib/core/alias-resolver.js +1 -1
  92. package/lib/core/api-client.js +1 -1
  93. package/lib/core/bff/config.js +1 -1
  94. package/lib/core/bff/file-system.js +1 -1
  95. package/lib/core/bff/hash.js +1 -1
  96. package/lib/core/bff/lock.js +1 -1
  97. package/lib/core/bff/utils.js +1 -1
  98. package/lib/core/db-resolver.js +1 -1
  99. package/lib/core/sql-validator.js +1 -1
  100. package/lib/errors.js +1 -1
  101. package/lib/framework/build-all-flags.js +1 -0
  102. package/lib/framework/flags.js +1 -1
  103. package/lib/framework/help.js +1 -1
  104. package/lib/framework/index.js +1 -1
  105. package/lib/framework/output.js +1 -1
  106. package/lib/framework/response.js +1 -1
  107. package/lib/framework/runner.js +1 -1
  108. package/lib/framework/schema-export.js +1 -0
  109. package/lib/framework/types.js +1 -1
  110. package/lib/generated/build-info.js +1 -1
  111. package/lib/help.js +1 -1
  112. package/lib/skills/main.js +1 -1
  113. package/lib/skills/npx-skills-add.js +1 -1
  114. package/lib/telemetry/cli-command-trace.js +1 -1
  115. package/lib/telemetry/cli-help-trace.js +1 -1
  116. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  117. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  118. package/lib/telemetry/send-cli-trace-log.js +1 -1
  119. package/lib/utils/ai_config.js +1 -1
  120. package/lib/utils/apply-jq-filter.js +1 -0
  121. package/lib/utils/cdn-config.js +1 -1
  122. package/lib/utils/check-sdk-version.js +1 -1
  123. package/lib/utils/cli-version-check.js +1 -1
  124. package/lib/utils/config.js +1 -1
  125. package/lib/utils/copy-directory.js +1 -1
  126. package/lib/utils/file-utils.js +1 -1
  127. package/lib/utils/guides-cdn.js +1 -1
  128. package/lib/utils/http-client.js +1 -1
  129. package/lib/utils/is-non-interactive.js +1 -1
  130. package/lib/utils/logger.js +1 -1
  131. package/lib/utils/platform.js +1 -1
  132. package/lib/utils/rules-cdn.js +1 -1
  133. package/lib/utils/sleep.js +1 -1
  134. package/lib/utils/template-replacer.js +1 -1
  135. package/lib/utils/version.js +1 -1
  136. package/lib/utils/with-active-cookie.js +1 -1
  137. package/package.json +4 -2
  138. package/lib/commands/build.js +0 -1
  139. package/lib/commands/preview.js +0 -1
  140. package/lib/commands/project-upgrade.js +0 -1
  141. package/lib/commands/start.js +0 -1
  142. package/lib/create-app/enhanced-guided-create.js +0 -1
  143. package/lib/create-app/format-elapsed.js +0 -1
  144. package/lib/create-app/main.js +0 -1
  145. package/lib/create-app/non-interactive.js +0 -1
  146. package/lib/create-app/use-copy-project-template.js +0 -1
  147. package/lib/create-app/use-format-code.js +0 -1
  148. package/lib/create-app/use-install-dependencies.js +0 -1
  149. package/lib/init/main.js +0 -1
@@ -1 +1 @@
1
- (function(_0x4e0a76,_0x5d74db){const _0x1f67a7=a124_0x3026,_0xa8ebe5=_0x4e0a76();while(!![]){try{const _0x366cc5=-parseInt(_0x1f67a7(0x181))/0x1+parseInt(_0x1f67a7(0x182))/0x2+parseInt(_0x1f67a7(0x186))/0x3+-parseInt(_0x1f67a7(0x18d))/0x4*(-parseInt(_0x1f67a7(0x17e))/0x5)+parseInt(_0x1f67a7(0x184))/0x6*(parseInt(_0x1f67a7(0x179))/0x7)+parseInt(_0x1f67a7(0x191))/0x8*(parseInt(_0x1f67a7(0x17f))/0x9)+-parseInt(_0x1f67a7(0x192))/0xa*(parseInt(_0x1f67a7(0x18c))/0xb);if(_0x366cc5===_0x5d74db)break;else _0xa8ebe5['push'](_0xa8ebe5['shift']());}catch(_0x3c69e1){_0xa8ebe5['push'](_0xa8ebe5['shift']());}}}(a124_0x5772,0x610b7));function a124_0x5772(){const _0x2838ee=['length','32Sfjaej','7239940wrHCbR','object','apiDir','21cFgddm','defaultApp','env','cookie','apps','95685jRhePa','1017369NpYLpz','replace','245184YeLdDh','602116AHomfm','map','178998mDxAiI','trim','1227390jNNPUy','appcode','https://g.lovrabet.com/dist/lovrabet-skill','values','app','template_base_url','11aXxbhZ','24jhZAov','keys','string'];a124_0x5772=function(){return _0x2838ee;};return a124_0x5772();}function a124_0x3026(_0x2993dc,_0x1aba15){_0x2993dc=_0x2993dc-0x179;const _0x57720d=a124_0x5772();let _0x30261b=_0x57720d[_0x2993dc];return _0x30261b;}import{initEnv}from'../constant/env.js';import{readRawConfig}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x608551){const _0x1ca7da=a124_0x3026,_0x1b0f09=readRawConfig(_0x608551);return _0x1b0f09['env']&&typeof _0x1b0f09[_0x1ca7da(0x17b)]===_0x1ca7da(0x18f)&&initEnv(_0x1b0f09[_0x1ca7da(0x17b)]),_0x1b0f09;}export function getConfigAppCode(){const _0x501fb7=a124_0x3026,_0x2deca0=readRawConfig();if(_0x2deca0[_0x501fb7(0x17d)]&&typeof _0x2deca0[_0x501fb7(0x17d)]===_0x501fb7(0x193)){const _0x1cb89e=_0x2deca0['defaultApp'];if(_0x1cb89e&&_0x2deca0[_0x501fb7(0x17d)][_0x1cb89e]?.[_0x501fb7(0x187)])return String(_0x2deca0[_0x501fb7(0x17d)][_0x1cb89e]['appcode'])[_0x501fb7(0x185)]();const _0x371b50=Object[_0x501fb7(0x189)](_0x2deca0[_0x501fb7(0x17d)])[0x0];if(_0x371b50?.['appcode'])return String(_0x371b50[_0x501fb7(0x187)])[_0x501fb7(0x185)]();}const _0x311582=_0x2deca0[_0x501fb7(0x187)]||_0x2deca0[_0x501fb7(0x18a)];if(typeof _0x311582!==_0x501fb7(0x18f)||_0x311582['trim']()==='')return undefined;return _0x311582[_0x501fb7(0x185)]();}export function getMultiAppConfigs(){const _0xada48a=a124_0x3026,_0x48b6b0=readRawConfig(),_0x2272b7=_0x48b6b0['apps'];if(!_0x2272b7||typeof _0x2272b7!==_0xada48a(0x193)||Object[_0xada48a(0x18e)](_0x2272b7)[_0xada48a(0x190)]===0x0)return null;const _0x5cc8f3=_0x48b6b0[_0xada48a(0x17a)];return Object['entries'](_0x2272b7)[_0xada48a(0x183)](([_0x23a28d,_0x30c716])=>({'name':_0x23a28d,'appcode':_0x30c716?.[_0xada48a(0x187)]||'','isDefault':_0x23a28d===_0x5cc8f3,'env':_0x30c716?.[_0xada48a(0x17b)],'apiDir':_0x30c716?.[_0xada48a(0x194)],'cookie':_0x30c716?.[_0xada48a(0x17c)]||undefined}))['filter'](_0x41eed4=>_0x41eed4[_0xada48a(0x187)]);}export function getTemplateBaseUrl(){const _0x27baec=a124_0x3026,_0x701685=readRawConfig();if(_0x701685['template_base_url']&&typeof _0x701685[_0x27baec(0x18b)]===_0x27baec(0x18f))return _0x701685[_0x27baec(0x18b)][_0x27baec(0x180)](/\/$/,'');return _0x27baec(0x188);}
1
+ (function(_0x4be763,_0x3cdda9){const _0x1c464a=a126_0x3bb8,_0x12c5b4=_0x4be763();while(!![]){try{const _0x1fde14=parseInt(_0x1c464a(0x1e4))/0x1+-parseInt(_0x1c464a(0x1d4))/0x2+-parseInt(_0x1c464a(0x1e7))/0x3*(parseInt(_0x1c464a(0x1dd))/0x4)+parseInt(_0x1c464a(0x1d8))/0x5*(parseInt(_0x1c464a(0x1d2))/0x6)+-parseInt(_0x1c464a(0x1db))/0x7+-parseInt(_0x1c464a(0x1d5))/0x8+parseInt(_0x1c464a(0x1e0))/0x9;if(_0x1fde14===_0x3cdda9)break;else _0x12c5b4['push'](_0x12c5b4['shift']());}catch(_0x16cfa6){_0x12c5b4['push'](_0x12c5b4['shift']());}}}(a126_0x418e,0xe5a6d));import{initEnv}from'../constant/env.js';import{readRawConfig}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x2963d0){const _0xc342ee=a126_0x3bb8,_0x282723=readRawConfig(_0x2963d0);return _0x282723[_0xc342ee(0x1df)]&&typeof _0x282723[_0xc342ee(0x1df)]==='string'&&initEnv(_0x282723['env']),_0x282723;}function a126_0x3bb8(_0x1782e1,_0xcf4d0f){_0x1782e1=_0x1782e1-0x1d1;const _0x418e25=a126_0x418e();let _0x3bb879=_0x418e25[_0x1782e1];return _0x3bb879;}export function getConfigAppCode(){const _0x624d42=a126_0x3bb8,_0x2095c5=readRawConfig();if(_0x2095c5['apps']&&typeof _0x2095c5['apps']===_0x624d42(0x1d1)){const _0x4849f2=_0x2095c5['defaultApp'];if(_0x4849f2&&_0x2095c5[_0x624d42(0x1e3)][_0x4849f2]?.[_0x624d42(0x1e8)])return String(_0x2095c5[_0x624d42(0x1e3)][_0x4849f2][_0x624d42(0x1e8)])[_0x624d42(0x1d7)]();const _0x4ad4dd=Object[_0x624d42(0x1e5)](_0x2095c5['apps'])[0x0];if(_0x4ad4dd?.['appcode'])return String(_0x4ad4dd[_0x624d42(0x1e8)])[_0x624d42(0x1d7)]();}const _0x443a78=_0x2095c5[_0x624d42(0x1e8)]||_0x2095c5['app'];if(typeof _0x443a78!==_0x624d42(0x1de)||_0x443a78[_0x624d42(0x1d7)]()==='')return undefined;return _0x443a78['trim']();}export function getMultiAppConfigs(){const _0x27353e=a126_0x3bb8,_0x352ce6=readRawConfig(),_0x4ff018=_0x352ce6[_0x27353e(0x1e3)];if(!_0x4ff018||typeof _0x4ff018!==_0x27353e(0x1d1)||Object[_0x27353e(0x1d6)](_0x4ff018)['length']===0x0)return null;const _0x39b25a=_0x352ce6['defaultApp'];return Object[_0x27353e(0x1e2)](_0x4ff018)[_0x27353e(0x1e6)](([_0x5408fc,_0x4432ed])=>({'name':_0x5408fc,'appcode':_0x4432ed?.[_0x27353e(0x1e8)]||'','isDefault':_0x5408fc===_0x39b25a,'env':_0x4432ed?.[_0x27353e(0x1df)],'apiDir':_0x4432ed?.[_0x27353e(0x1dc)],'cookie':_0x4432ed?.[_0x27353e(0x1da)]||undefined}))[_0x27353e(0x1e1)](_0x2d3f36=>_0x2d3f36[_0x27353e(0x1e8)]);}function a126_0x418e(){const _0x38178f=['5493318IOZLXJ','template_base_url','3696148qYCFmB','957496wmbtMR','keys','trim','5FSfxwO','replace','cookie','2568664OzHQjG','apiDir','44CvzYCV','string','env','18055899YUWfLr','filter','entries','apps','1469981JJcEwg','values','map','304467HyiZTt','appcode','object'];a126_0x418e=function(){return _0x38178f;};return a126_0x418e();}export function getTemplateBaseUrl(){const _0x513d38=a126_0x3bb8,_0x1f439f=readRawConfig();if(_0x1f439f['template_base_url']&&typeof _0x1f439f[_0x513d38(0x1d3)]===_0x513d38(0x1de))return _0x1f439f[_0x513d38(0x1d3)][_0x513d38(0x1d9)](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}
@@ -1 +1 @@
1
- (function(_0x4583b4,_0x1a8ccd){const _0x300e5b=a125_0x593b,_0x5e2eaf=_0x4583b4();while(!![]){try{const _0x3c2031=-parseInt(_0x300e5b(0x1dd))/0x1+parseInt(_0x300e5b(0x1d9))/0x2+parseInt(_0x300e5b(0x1d3))/0x3*(parseInt(_0x300e5b(0x1d7))/0x4)+-parseInt(_0x300e5b(0x1d4))/0x5*(parseInt(_0x300e5b(0x1d8))/0x6)+parseInt(_0x300e5b(0x1d2))/0x7*(-parseInt(_0x300e5b(0x1d0))/0x8)+-parseInt(_0x300e5b(0x1da))/0x9+parseInt(_0x300e5b(0x1d1))/0xa;if(_0x3c2031===_0x1a8ccd)break;else _0x5e2eaf['push'](_0x5e2eaf['shift']());}catch(_0x329ce0){_0x5e2eaf['push'](_0x5e2eaf['shift']());}}}(a125_0x9473,0x78460));function a125_0x593b(_0x5a96a6,_0x80eb70){_0x5a96a6=_0x5a96a6-0x1d0;const _0x9473f3=a125_0x9473();let _0x593b02=_0x9473f3[_0x5a96a6];return _0x593b02;}function a125_0x9473(){const _0x29d095=['8118081pNfrnA','name','error','549383inSmzJ','join','16CdJDOe','17056850smgkaR','3202493XFBiJV','823206LxDIqP','150pQCKix','copyFileSync','isDirectory','4VNoBqV','10380DwKKSk','1861686WWxZmL'];a125_0x9473=function(){return _0x29d095;};return a125_0x9473();}import a125_0x448e72 from'node:path';import a125_0x30aa82 from'node:fs';export async function copyDirectory(_0x18fbc5,_0x5daf00){const _0x1310df=a125_0x593b;try{const _0x7c3de4=a125_0x30aa82['readdirSync'](_0x18fbc5,{'withFileTypes':!![]});a125_0x30aa82['mkdirSync'](_0x5daf00,{'recursive':!![]});for(const _0x1818c8 of _0x7c3de4){const _0x448663=a125_0x448e72[_0x1310df(0x1de)](_0x18fbc5,_0x1818c8[_0x1310df(0x1db)]),_0x36647d=a125_0x448e72[_0x1310df(0x1de)](_0x5daf00,_0x1818c8[_0x1310df(0x1db)]);_0x1818c8[_0x1310df(0x1d6)]()?await copyDirectory(_0x448663,_0x36647d):a125_0x30aa82[_0x1310df(0x1d5)](_0x448663,_0x36647d);}}catch(_0x528ba1){console[_0x1310df(0x1dc)]('复制目录时出错:',_0x528ba1);}}
1
+ (function(_0x1aad13,_0x4831cc){const _0x3286e9=a127_0x1dc3,_0x307e90=_0x1aad13();while(!![]){try{const _0x1dde19=parseInt(_0x3286e9(0x116))/0x1*(parseInt(_0x3286e9(0x114))/0x2)+-parseInt(_0x3286e9(0x110))/0x3+parseInt(_0x3286e9(0x11a))/0x4+-parseInt(_0x3286e9(0x118))/0x5*(-parseInt(_0x3286e9(0x10f))/0x6)+-parseInt(_0x3286e9(0x10d))/0x7+-parseInt(_0x3286e9(0x111))/0x8+parseInt(_0x3286e9(0x113))/0x9;if(_0x1dde19===_0x4831cc)break;else _0x307e90['push'](_0x307e90['shift']());}catch(_0x3feb1b){_0x307e90['push'](_0x307e90['shift']());}}}(a127_0x3f3b,0x859d9));import a127_0x42e722 from'node:path';import a127_0x5bf221 from'node:fs';export async function copyDirectory(_0x498bd4,_0xc9ac4a){const _0x51cd41=a127_0x1dc3;try{const _0x3166fe=a127_0x5bf221[_0x51cd41(0x10b)](_0x498bd4,{'withFileTypes':!![]});a127_0x5bf221[_0x51cd41(0x119)](_0xc9ac4a,{'recursive':!![]});for(const _0x3844e7 of _0x3166fe){const _0x38231a=a127_0x42e722[_0x51cd41(0x117)](_0x498bd4,_0x3844e7[_0x51cd41(0x10c)]),_0x215161=a127_0x42e722[_0x51cd41(0x117)](_0xc9ac4a,_0x3844e7[_0x51cd41(0x10c)]);_0x3844e7[_0x51cd41(0x115)]()?await copyDirectory(_0x38231a,_0x215161):a127_0x5bf221[_0x51cd41(0x10a)](_0x38231a,_0x215161);}}catch(_0x2401f9){console[_0x51cd41(0x10e)](_0x51cd41(0x112),_0x2401f9);}}function a127_0x1dc3(_0xe8cf48,_0x358d1){_0xe8cf48=_0xe8cf48-0x10a;const _0x3f3bd5=a127_0x3f3b();let _0x1dc340=_0x3f3bd5[_0xe8cf48];return _0x1dc340;}function a127_0x3f3b(){const _0x4c1834=['mkdirSync','1243216mGOljk','copyFileSync','readdirSync','name','5984482oEcqsp','error','95244vsJSKi','1850508QmoqIR','4833776foIhPd','复制目录时出错:','8712612kyxYmq','716362bJcbEb','isDirectory','3WQXhnt','join','85aidJla'];a127_0x3f3b=function(){return _0x4c1834;};return a127_0x3f3b();}
@@ -1 +1 @@
1
- (function(_0x4d2ea9,_0x184cc0){const _0x53182a=a126_0x5407,_0x31626d=_0x4d2ea9();while(!![]){try{const _0x3994db=parseInt(_0x53182a(0x1b8))/0x1+-parseInt(_0x53182a(0x1b6))/0x2+parseInt(_0x53182a(0x1bc))/0x3*(parseInt(_0x53182a(0x1be))/0x4)+parseInt(_0x53182a(0x1ba))/0x5+-parseInt(_0x53182a(0x1b7))/0x6+parseInt(_0x53182a(0x1b5))/0x7*(parseInt(_0x53182a(0x1bd))/0x8)+parseInt(_0x53182a(0x1b4))/0x9*(parseInt(_0x53182a(0x1bb))/0xa);if(_0x3994db===_0x184cc0)break;else _0x31626d['push'](_0x31626d['shift']());}catch(_0xda1b09){_0x31626d['push'](_0x31626d['shift']());}}}(a126_0x45fc,0x2fb8f));function a126_0x5407(_0x27acf6,_0x14f3eb){_0x27acf6=_0x27acf6-0x1b4;const _0x45fcdd=a126_0x45fc();let _0x5407f1=_0x45fcdd[_0x27acf6];return _0x5407f1;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a126_0x45fc(){const _0x5904e3=['759306HtxgBv','1689798RONKda','104144XpNabB','isDirectory','298605smxhJA','20870FBdhHt','18NUNMAy','40tyqbRv','128372jRsNPp','963wGCARw','387835yYhETN'];a126_0x45fc=function(){return _0x5904e3;};return a126_0x45fc();}import{join}from'node:path';export async function copyDir(_0x47e1ff,_0x2079a4){const _0x266a56=a126_0x5407,_0xb60925=statSync(_0x47e1ff);if(_0xb60925[_0x266a56(0x1b9)]()){!existsSync(_0x2079a4)&&mkdirSync(_0x2079a4,{'recursive':!![]});const _0x5b5738=readdirSync(_0x47e1ff);for(const _0xe3d3f4 of _0x5b5738){await copyDir(join(_0x47e1ff,_0xe3d3f4),join(_0x2079a4,_0xe3d3f4));}}else copyFileSync(_0x47e1ff,_0x2079a4);}export function ensureDir(_0xc00e3a){!existsSync(_0xc00e3a)&&mkdirSync(_0xc00e3a,{'recursive':!![]});}export function pathExists(_0xafe866){return existsSync(_0xafe866);}
1
+ function a128_0x3004(){const _0x4eff91=['1836204VRBLWp','1507482BDIZwE','14269144OgpckH','702332sITYlY','isDirectory','256952AwdaWo','1768191sIjFlh','14QNTwIV','3443650ITftKU'];a128_0x3004=function(){return _0x4eff91;};return a128_0x3004();}(function(_0x432670,_0x575e2a){const _0x3fbe8e=a128_0x2773,_0x133a49=_0x432670();while(!![]){try{const _0x150cd2=-parseInt(_0x3fbe8e(0xae))/0x1+-parseInt(_0x3fbe8e(0xab))/0x2+parseInt(_0x3fbe8e(0xb1))/0x3+parseInt(_0x3fbe8e(0xb0))/0x4+-parseInt(_0x3fbe8e(0xaa))/0x5+-parseInt(_0x3fbe8e(0xac))/0x6*(-parseInt(_0x3fbe8e(0xb2))/0x7)+parseInt(_0x3fbe8e(0xad))/0x8;if(_0x150cd2===_0x575e2a)break;else _0x133a49['push'](_0x133a49['shift']());}catch(_0x3e693f){_0x133a49['push'](_0x133a49['shift']());}}}(a128_0x3004,0x99f50));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x1fb758,_0x2c62a4){const _0x3cc1f4=a128_0x2773,_0x3d2975=statSync(_0x1fb758);if(_0x3d2975[_0x3cc1f4(0xaf)]()){!existsSync(_0x2c62a4)&&mkdirSync(_0x2c62a4,{'recursive':!![]});const _0x33e65f=readdirSync(_0x1fb758);for(const _0x2fdd60 of _0x33e65f){await copyDir(join(_0x1fb758,_0x2fdd60),join(_0x2c62a4,_0x2fdd60));}}else copyFileSync(_0x1fb758,_0x2c62a4);}function a128_0x2773(_0x327a7f,_0xc1836f){_0x327a7f=_0x327a7f-0xaa;const _0x30049c=a128_0x3004();let _0x277335=_0x30049c[_0x327a7f];return _0x277335;}export function ensureDir(_0x490dfa){!existsSync(_0x490dfa)&&mkdirSync(_0x490dfa,{'recursive':!![]});}export function pathExists(_0x409670){return existsSync(_0x409670);}
@@ -1 +1 @@
1
- const a127_0x262dc7=a127_0x3747;function a127_0x1bfc(){const _0x1a5614=['replace','.lovrabet','utf-8','CDN\x20请求失败:\x20','.lovrabet/skill/guides','lastUpdated','trimEnd','11850363mSnpal','cache','8793xRtjvl','7887948rcoyWw','status','142itjXac','path','.md','CDN\x20数据中缺少\x20skillTemplate','object','guides','skillTemplate','entries','length','3761175iCgECs','25FFGjYV','879676zrzpQd','content','7586610XsUCXm','3672PlsRMC','join','/skills/guides.json','10537XVaBOC','extendContent','CDN\x20返回数据格式错误','map'];a127_0x1bfc=function(){return _0x1a5614;};return a127_0x1bfc();}(function(_0x216722,_0x585080){const _0x508f31=a127_0x3747,_0xfdbf7f=_0x216722();while(!![]){try{const _0x8641a6=parseInt(_0x508f31(0x1e8))/0x1*(-parseInt(_0x508f31(0x1f8))/0x2)+-parseInt(_0x508f31(0x201))/0x3+-parseInt(_0x508f31(0x1e2))/0x4*(-parseInt(_0x508f31(0x1e1))/0x5)+parseInt(_0x508f31(0x1f6))/0x6+parseInt(_0x508f31(0x1f3))/0x7+-parseInt(_0x508f31(0x1e5))/0x8*(parseInt(_0x508f31(0x1f5))/0x9)+-parseInt(_0x508f31(0x1e4))/0xa;if(_0x8641a6===_0x585080)break;else _0xfdbf7f['push'](_0xfdbf7f['shift']());}catch(_0x528972){_0xfdbf7f['push'](_0xfdbf7f['shift']());}}}(a127_0x1bfc,0xdb49e));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x377dc5=a127_0x3747,_0x3f1eac=getTemplateBaseUrl();return _0x3f1eac+_0x377dc5(0x1e7);}const CACHE_DIR=join(homedir(),a127_0x262dc7(0x1ed),a127_0x262dc7(0x1f4));function a127_0x3747(_0x7a4278,_0x288a64){_0x7a4278=_0x7a4278-0x1e1;const _0x1bfc52=a127_0x1bfc();let _0x3747b9=_0x1bfc52[_0x7a4278];return _0x3747b9;}export async function fetchGuidesFromCDN(){const _0x3e6e5c=a127_0x262dc7,_0x597f25=getGuidesCdnUrl(),_0x4eebcd=await fetch(_0x597f25,{'headers':{'Accept':'application/json'}});if(!_0x4eebcd['ok'])throw new Error(_0x3e6e5c(0x1ef)+_0x4eebcd[_0x3e6e5c(0x1f7)]+'\x20'+_0x4eebcd['statusText']);const _0x184258=await _0x4eebcd['json']();if(!_0x184258[_0x3e6e5c(0x1fd)]||typeof _0x184258[_0x3e6e5c(0x1fd)]!==_0x3e6e5c(0x1fc))throw new Error(_0x3e6e5c(0x1ea));return _0x184258;}export function writeGuidesToProject(_0x143ad8,_0x52df70,_0x519ccf=a127_0x262dc7(0x1f0),_0x584988){const _0x5c1e5a=a127_0x262dc7,_0x29d3ab=join(_0x52df70,_0x519ccf);mkdirSync(_0x29d3ab,{'recursive':!![]});for(const [_0x447406,_0x8cc671]of Object['entries'](_0x143ad8[_0x5c1e5a(0x1fd)])){let _0x376a4a=_0x8cc671[_0x5c1e5a(0x1e3)];_0x8cc671[_0x5c1e5a(0x1f1)]&&(_0x376a4a=appendUpdateTime(_0x376a4a,_0x8cc671['lastUpdated'])),writeFileSync(join(_0x29d3ab,_0x447406+_0x5c1e5a(0x1fa)),_0x376a4a,_0x5c1e5a(0x1ee));}}export function appendUpdateTime(_0x92c2af,_0xb8039b){const _0xe90ec9=a127_0x262dc7;return _0x92c2af=_0x92c2af[_0xe90ec9(0x1ec)](/\n*>更新时间:.*$/m,''),_0x92c2af[_0xe90ec9(0x1f2)]()+('\x0a\x0a>更新时间:'+_0xb8039b);}export function getSkillTemplate(_0x3ffb71){const _0x2da1dd=a127_0x262dc7;return _0x3ffb71[_0x2da1dd(0x1fe)]?.[_0x2da1dd(0x1e3)]||'';}export function appendExtendContents(_0x5edebe,_0x3e9f44,_0x10c4e8){const _0x567edd=a127_0x262dc7,_0x1219c9=[];for(const [,_0xadc5f0]of Object['entries'](_0x3e9f44[_0x567edd(0x1fd)])){_0xadc5f0['extendContent']&&_0x1219c9['push'](_0xadc5f0[_0x567edd(0x1e9)][_0x567edd(0x1f2)]());}if(_0x1219c9[_0x567edd(0x200)]===0x0)return _0x5edebe;return _0x5edebe[_0x567edd(0x1f2)]()+'\x0a\x0a'+_0x1219c9[_0x567edd(0x1e6)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x3a553f,_0x4f8666,_0x36c9de){const _0x1800c4=a127_0x262dc7,_0x3059f3=getSkillTemplate(_0x3a553f);if(!_0x3059f3)throw new Error(_0x1800c4(0x1fb));const _0x5e94f7=dirname(_0x4f8666);mkdirSync(_0x5e94f7,{'recursive':!![]});let _0x2c49f2=_0x3059f3[_0x1800c4(0x1ec)](/\{\{IDE_NAME\}\}/g,_0x36c9de);_0x2c49f2=appendExtendContents(_0x2c49f2,_0x3a553f),_0x3a553f[_0x1800c4(0x1fe)][_0x1800c4(0x1f1)]&&(_0x2c49f2=appendUpdateTime(_0x2c49f2,_0x3a553f[_0x1800c4(0x1fe)]['lastUpdated'])),writeFileSync(_0x4f8666,_0x2c49f2,_0x1800c4(0x1ee));}export async function installGuides(_0x591d7f){const _0x18e4ef=a127_0x262dc7,_0x11e5ee=await fetchGuidesFromCDN();return writeGuidesToProject(_0x11e5ee,_0x591d7f),Object['keys'](_0x11e5ee[_0x18e4ef(0x1fd)])[_0x18e4ef(0x200)];}export function getGuidesSummary(_0x222fe8){const _0x4b3170=a127_0x262dc7;return Object[_0x4b3170(0x1ff)](_0x222fe8[_0x4b3170(0x1fd)])[_0x4b3170(0x1eb)](([_0x33a3ff,_0x235e2a])=>({'key':_0x33a3ff,'title':_0x235e2a['title'],'path':_0x235e2a[_0x4b3170(0x1f9)]}));}
1
+ const a129_0x4d2497=a129_0x8c86;function a129_0x8c86(_0x450804,_0x3a45d0){_0x450804=_0x450804-0xbe;const _0x271fb4=a129_0x271f();let _0x8c86e1=_0x271fb4[_0x450804];return _0x8c86e1;}(function(_0x4950cc,_0x35f0ba){const _0x3604fa=a129_0x8c86,_0x1f14a9=_0x4950cc();while(!![]){try{const _0x1abe8e=parseInt(_0x3604fa(0xcf))/0x1*(-parseInt(_0x3604fa(0xbe))/0x2)+-parseInt(_0x3604fa(0xdd))/0x3+parseInt(_0x3604fa(0xc8))/0x4*(parseInt(_0x3604fa(0xc6))/0x5)+parseInt(_0x3604fa(0xc7))/0x6+-parseInt(_0x3604fa(0xc2))/0x7+-parseInt(_0x3604fa(0xd3))/0x8*(parseInt(_0x3604fa(0xc0))/0x9)+-parseInt(_0x3604fa(0xd2))/0xa*(-parseInt(_0x3604fa(0xd0))/0xb);if(_0x1abe8e===_0x35f0ba)break;else _0x1f14a9['push'](_0x1f14a9['shift']());}catch(_0x2ac4e6){_0x1f14a9['push'](_0x1f14a9['shift']());}}}(a129_0x271f,0xcd7e8));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';function a129_0x271f(){const _0x15dfed=['5031ALCBqG','\x0a\x0a>更新时间:','5984195MzfMIQ','entries','statusText','CDN\x20数据中缺少\x20skillTemplate','36535YnyzrP','2186430fQREuW','904AyFxUT','keys','push','.lovrabet/skill/guides','application/json','utf-8','guides','19xnCtDH','11YkbmGO','title','27024610XNjzKZ','4376fsQdXA','trimEnd','.md','lastUpdated','status','map','cache','skillTemplate','replace','content','3788925yxFeBd','object','extendContent','CDN\x20返回数据格式错误','152938kmUfgS','CDN\x20请求失败:\x20'];a129_0x271f=function(){return _0x15dfed;};return a129_0x271f();}import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x36237b=getTemplateBaseUrl();return _0x36237b+'/skills/guides.json';}const CACHE_DIR=join(homedir(),'.lovrabet',a129_0x4d2497(0xd9));export async function fetchGuidesFromCDN(){const _0x4b5497=a129_0x4d2497,_0x581e72=getGuidesCdnUrl(),_0x5ab532=await fetch(_0x581e72,{'headers':{'Accept':_0x4b5497(0xcc)}});if(!_0x5ab532['ok'])throw new Error(_0x4b5497(0xbf)+_0x5ab532[_0x4b5497(0xd7)]+'\x20'+_0x5ab532[_0x4b5497(0xc4)]);const _0x28dfbc=await _0x5ab532['json']();if(!_0x28dfbc[_0x4b5497(0xce)]||typeof _0x28dfbc[_0x4b5497(0xce)]!==_0x4b5497(0xde))throw new Error(_0x4b5497(0xe0));return _0x28dfbc;}export function writeGuidesToProject(_0x9b1fc2,_0x262567,_0x2092aa=a129_0x4d2497(0xcb),_0x286f8d){const _0x4b6071=a129_0x4d2497,_0x24453d=join(_0x262567,_0x2092aa);mkdirSync(_0x24453d,{'recursive':!![]});for(const [_0xd8b48d,_0x490018]of Object[_0x4b6071(0xc3)](_0x9b1fc2[_0x4b6071(0xce)])){let _0x11177a=_0x490018['content'];_0x490018['lastUpdated']&&(_0x11177a=appendUpdateTime(_0x11177a,_0x490018[_0x4b6071(0xd6)])),writeFileSync(join(_0x24453d,_0xd8b48d+_0x4b6071(0xd5)),_0x11177a,_0x4b6071(0xcd));}}export function appendUpdateTime(_0x4b2c5b,_0x143ba1){const _0x2a4c4a=a129_0x4d2497;return _0x4b2c5b=_0x4b2c5b[_0x2a4c4a(0xdb)](/\n*>更新时间:.*$/m,''),_0x4b2c5b['trimEnd']()+(_0x2a4c4a(0xc1)+_0x143ba1);}export function getSkillTemplate(_0x41bc4d){const _0x30a262=a129_0x4d2497;return _0x41bc4d[_0x30a262(0xda)]?.[_0x30a262(0xdc)]||'';}export function appendExtendContents(_0x254a50,_0x50de16,_0x19f12b){const _0x57795c=a129_0x4d2497,_0x295f6d=[];for(const [,_0x530159]of Object[_0x57795c(0xc3)](_0x50de16['guides'])){_0x530159[_0x57795c(0xdf)]&&_0x295f6d[_0x57795c(0xca)](_0x530159[_0x57795c(0xdf)][_0x57795c(0xd4)]());}if(_0x295f6d['length']===0x0)return _0x254a50;return _0x254a50['trimEnd']()+'\x0a\x0a'+_0x295f6d['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x55d088,_0x33e4e1,_0x3e537d){const _0x48dca3=a129_0x4d2497,_0x3433f7=getSkillTemplate(_0x55d088);if(!_0x3433f7)throw new Error(_0x48dca3(0xc5));const _0x3d2f4e=dirname(_0x33e4e1);mkdirSync(_0x3d2f4e,{'recursive':!![]});let _0xd34677=_0x3433f7[_0x48dca3(0xdb)](/\{\{IDE_NAME\}\}/g,_0x3e537d);_0xd34677=appendExtendContents(_0xd34677,_0x55d088),_0x55d088[_0x48dca3(0xda)]['lastUpdated']&&(_0xd34677=appendUpdateTime(_0xd34677,_0x55d088[_0x48dca3(0xda)][_0x48dca3(0xd6)])),writeFileSync(_0x33e4e1,_0xd34677,_0x48dca3(0xcd));}export async function installGuides(_0x4baa15){const _0x405b61=a129_0x4d2497,_0x3e7fab=await fetchGuidesFromCDN();return writeGuidesToProject(_0x3e7fab,_0x4baa15),Object[_0x405b61(0xc9)](_0x3e7fab[_0x405b61(0xce)])['length'];}export function getGuidesSummary(_0x544685){const _0x3b24ad=a129_0x4d2497;return Object['entries'](_0x544685[_0x3b24ad(0xce)])[_0x3b24ad(0xd8)](([_0x2f235c,_0x39a67d])=>({'key':_0x2f235c,'title':_0x39a67d[_0x3b24ad(0xd1)],'path':_0x39a67d['path']}));}
@@ -1 +1 @@
1
- function a128_0x3f6e(_0x3b7d79,_0x32e7a6){_0x3b7d79=_0x3b7d79-0x14e;const _0x4b0fc3=a128_0x4b0f();let _0x3f6e6d=_0x4b0fc3[_0x3b7d79];return _0x3f6e6d;}(function(_0x12cf18,_0x3a8ac0){const _0x4d65ec=a128_0x3f6e,_0x40f623=_0x12cf18();while(!![]){try{const _0x228bc8=parseInt(_0x4d65ec(0x165))/0x1+-parseInt(_0x4d65ec(0x161))/0x2+parseInt(_0x4d65ec(0x166))/0x3+-parseInt(_0x4d65ec(0x15c))/0x4*(parseInt(_0x4d65ec(0x151))/0x5)+-parseInt(_0x4d65ec(0x15f))/0x6+-parseInt(_0x4d65ec(0x154))/0x7+parseInt(_0x4d65ec(0x158))/0x8;if(_0x228bc8===_0x3a8ac0)break;else _0x40f623['push'](_0x40f623['shift']());}catch(_0x17118f){_0x40f623['push'](_0x40f623['shift']());}}}(a128_0x4b0f,0xb3a46));export async function httpRequest(_0xaf3db4,_0x3c4f7e={}){const _0x5a45d0=a128_0x3f6e,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x3c4f7e;let _0x4c4bd0=null;for(let _0x5d9808=0x0;_0x5d9808<=retries;_0x5d9808++){try{const _0x521500=new AbortController(),_0x6eeb27=setTimeout(()=>_0x521500[_0x5a45d0(0x150)](),timeout),_0x47545d=await fetch(_0xaf3db4,{'headers':headers,'signal':_0x521500[_0x5a45d0(0x14e)]});clearTimeout(_0x6eeb27);let _0x15dc08;const _0x735da5=_0x47545d[_0x5a45d0(0x167)][_0x5a45d0(0x153)]('content-type');return _0x735da5?.[_0x5a45d0(0x15e)](_0x5a45d0(0x15d))?_0x15dc08=await _0x47545d['json']():_0x15dc08=await _0x47545d[_0x5a45d0(0x163)](),{'ok':_0x47545d['ok'],'status':_0x47545d['status'],'statusText':_0x47545d[_0x5a45d0(0x164)],'data':_0x15dc08,'headers':_0x47545d[_0x5a45d0(0x167)],'url':_0x47545d[_0x5a45d0(0x157)],'text':()=>_0x47545d['text']()};}catch(_0x315676){_0x4c4bd0=_0x315676 instanceof Error?_0x315676:new Error(String(_0x315676));if(_0x5d9808===retries)break;if(shouldRetry(_0x315676)){console[_0x5a45d0(0x15b)]('*\x20请求失败,'+retryDelay+_0x5a45d0(0x156)+(_0x5d9808+0x1)+_0x5a45d0(0x159)),await sleep(retryDelay);continue;}else break;}}throw _0x4c4bd0||new Error(_0x5a45d0(0x155));}function shouldRetry(_0x29a11b){const _0x388afe=a128_0x3f6e;if(_0x29a11b instanceof Error){if(_0x29a11b[_0x388afe(0x15a)]==='AbortError')return![];if(_0x29a11b['name']===_0x388afe(0x160)&&_0x29a11b[_0x388afe(0x152)][_0x388afe(0x15e)]('fetch'))return!![];if(_0x29a11b['message'][_0x388afe(0x15e)](_0x388afe(0x162)))return!![];if(_0x29a11b[_0x388afe(0x152)][_0x388afe(0x15e)](_0x388afe(0x14f)))return![];}return![];}function a128_0x4b0f(){const _0x29c973=['headers','signal','ENOTFOUND','abort','2045VAZNVQ','message','get','1684340XOGbqL','Request\x20failed','ms\x20后进行第\x20','url','8258776Jmjmnj','\x20次重试...','name','log','9788ogLvjN','application/json','includes','3655236gYxxfT','TypeError','1537530QhXaAH','ECONNRESET','text','statusText','1375422cejlqK','2842377XBqBav'];a128_0x4b0f=function(){return _0x29c973;};return a128_0x4b0f();}function sleep(_0x2b26c8){return new Promise(_0x3106e5=>setTimeout(_0x3106e5,_0x2b26c8));}export function validateUrl(_0x6a88b9){try{return new URL(_0x6a88b9),!![];}catch{return![];}}
1
+ (function(_0x20b8b7,_0x2f0dee){const _0x175463=a130_0x2239,_0x5f2dae=_0x20b8b7();while(!![]){try{const _0xc38fbe=parseInt(_0x175463(0x128))/0x1+parseInt(_0x175463(0x127))/0x2*(parseInt(_0x175463(0x126))/0x3)+-parseInt(_0x175463(0x117))/0x4+parseInt(_0x175463(0x12c))/0x5*(parseInt(_0x175463(0x120))/0x6)+parseInt(_0x175463(0x129))/0x7*(-parseInt(_0x175463(0x12d))/0x8)+parseInt(_0x175463(0x11c))/0x9*(parseInt(_0x175463(0x118))/0xa)+-parseInt(_0x175463(0x12f))/0xb*(-parseInt(_0x175463(0x130))/0xc);if(_0xc38fbe===_0x2f0dee)break;else _0x5f2dae['push'](_0x5f2dae['shift']());}catch(_0x1aaf94){_0x5f2dae['push'](_0x5f2dae['shift']());}}}(a130_0x196f,0x49f5a));function a130_0x2239(_0xe06f9c,_0x373438){_0xe06f9c=_0xe06f9c-0x115;const _0x196ff7=a130_0x196f();let _0x22390d=_0x196ff7[_0xe06f9c];return _0x22390d;}export async function httpRequest(_0x26b9b8,_0x3926ed={}){const _0x3bb6d4=a130_0x2239,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x3926ed;let _0x636445=null;for(let _0x21f2ce=0x0;_0x21f2ce<=retries;_0x21f2ce++){try{const _0x4491e0=new AbortController(),_0x447339=setTimeout(()=>_0x4491e0[_0x3bb6d4(0x133)](),timeout),_0x5b0d5f=await fetch(_0x26b9b8,{'headers':headers,'signal':_0x4491e0[_0x3bb6d4(0x131)]});clearTimeout(_0x447339);let _0x530056;const _0x1d0224=_0x5b0d5f[_0x3bb6d4(0x119)]['get'](_0x3bb6d4(0x121));return _0x1d0224?.[_0x3bb6d4(0x11d)](_0x3bb6d4(0x11b))?_0x530056=await _0x5b0d5f[_0x3bb6d4(0x122)]():_0x530056=await _0x5b0d5f[_0x3bb6d4(0x12b)](),{'ok':_0x5b0d5f['ok'],'status':_0x5b0d5f[_0x3bb6d4(0x124)],'statusText':_0x5b0d5f['statusText'],'data':_0x530056,'headers':_0x5b0d5f['headers'],'url':_0x5b0d5f[_0x3bb6d4(0x11a)],'text':()=>_0x5b0d5f[_0x3bb6d4(0x12b)]()};}catch(_0x184dcb){_0x636445=_0x184dcb instanceof Error?_0x184dcb:new Error(String(_0x184dcb));if(_0x21f2ce===retries)break;if(shouldRetry(_0x184dcb)){console[_0x3bb6d4(0x132)](_0x3bb6d4(0x123)+retryDelay+'ms\x20后进行第\x20'+(_0x21f2ce+0x1)+_0x3bb6d4(0x12e)),await sleep(retryDelay);continue;}else break;}}throw _0x636445||new Error(_0x3bb6d4(0x116));}function shouldRetry(_0x464826){const _0x1fae1a=a130_0x2239;if(_0x464826 instanceof Error){if(_0x464826[_0x1fae1a(0x115)]===_0x1fae1a(0x11e))return![];if(_0x464826[_0x1fae1a(0x115)]==='TypeError'&&_0x464826[_0x1fae1a(0x12a)]['includes']('fetch'))return!![];if(_0x464826[_0x1fae1a(0x12a)][_0x1fae1a(0x11d)](_0x1fae1a(0x125)))return!![];if(_0x464826[_0x1fae1a(0x12a)][_0x1fae1a(0x11d)](_0x1fae1a(0x11f)))return![];}return![];}function a130_0x196f(){const _0x50cc95=['1158hkyQnp','content-type','json','*\x20请求失败,','status','ECONNRESET','93909eecfYC','4emvMaJ','219730AneDDY','1414Ovleoo','message','text','14290itmJOK','14312rKGlMA','\x20次重试...','286451GSKZhA','72txQBcI','signal','log','abort','name','Request\x20failed','2145048qMwUhe','10TksgiG','headers','url','application/json','1893618GVKgyw','includes','AbortError','ENOTFOUND'];a130_0x196f=function(){return _0x50cc95;};return a130_0x196f();}function sleep(_0x3e4e8e){return new Promise(_0x2546b6=>setTimeout(_0x2546b6,_0x3e4e8e));}export function validateUrl(_0x29a058){try{return new URL(_0x29a058),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a129_0x95ac(_0x36ba21,_0x347f0f){_0x36ba21=_0x36ba21-0xd8;const _0x13dd26=a129_0x13dd();let _0x95acc5=_0x13dd26[_0x36ba21];return _0x95acc5;}(function(_0x271462,_0x40ac31){const _0x55274d=a129_0x95ac,_0x59e859=_0x271462();while(!![]){try{const _0x12d648=parseInt(_0x55274d(0xe3))/0x1*(parseInt(_0x55274d(0xdb))/0x2)+-parseInt(_0x55274d(0xe0))/0x3+parseInt(_0x55274d(0xe5))/0x4+parseInt(_0x55274d(0xe1))/0x5+-parseInt(_0x55274d(0xd9))/0x6+-parseInt(_0x55274d(0xe2))/0x7*(-parseInt(_0x55274d(0xda))/0x8)+-parseInt(_0x55274d(0xd8))/0x9;if(_0x12d648===_0x40ac31)break;else _0x59e859['push'](_0x59e859['shift']());}catch(_0x2a2937){_0x59e859['push'](_0x59e859['shift']());}}}(a129_0x13dd,0xd9c5c));function env(_0x3a701a){return process.env[`RABETBASE_${_0x3a701a}`]||process.env[`LOVRABET_${_0x3a701a}`]||undefined;}export function isNonInteractive(_0x4068ab){const _0x4e81c7=a129_0x95ac;return!!(_0x4068ab[_0x4e81c7(0xe6)]||_0x4068ab['ci']||env('CI')===_0x4e81c7(0xdc)||process.env.CI===_0x4e81c7(0xdc)||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function a129_0x13dd(){const _0x35d212=['1948984JsWnQP','24982PRTZAG','true','setRawMode','isRaw','isTTY','1247490fwJOdb','6213800SKrxva','49WjjeRo','101SeJGbM','stdin','3256164OZzZRl','nonInteractive','19922499eNGycw','9013896pHXNFf'];a129_0x13dd=function(){return _0x35d212;};return a129_0x13dd();}function isStdinRawModeSupported(){const _0x22461f=a129_0x95ac;if(!process[_0x22461f(0xe4)][_0x22461f(0xdf)])return![];try{const _0xb233ee=process[_0x22461f(0xe4)][_0x22461f(0xde)];return process[_0x22461f(0xe4)][_0x22461f(0xdd)](!![]),process[_0x22461f(0xe4)][_0x22461f(0xdd)](_0xb233ee??![]),!![];}catch{return![];}}
1
+ (function(_0x567184,_0x31416b){const _0x12afef=a131_0x5d53,_0x2abd08=_0x567184();while(!![]){try{const _0x261b88=parseInt(_0x12afef(0x115))/0x1*(-parseInt(_0x12afef(0x114))/0x2)+-parseInt(_0x12afef(0x109))/0x3*(-parseInt(_0x12afef(0x10d))/0x4)+parseInt(_0x12afef(0x10b))/0x5+parseInt(_0x12afef(0x10c))/0x6*(-parseInt(_0x12afef(0x116))/0x7)+-parseInt(_0x12afef(0x10a))/0x8*(-parseInt(_0x12afef(0x110))/0x9)+parseInt(_0x12afef(0x112))/0xa*(parseInt(_0x12afef(0x10f))/0xb)+-parseInt(_0x12afef(0x113))/0xc;if(_0x261b88===_0x31416b)break;else _0x2abd08['push'](_0x2abd08['shift']());}catch(_0x48c1f6){_0x2abd08['push'](_0x2abd08['shift']());}}}(a131_0x3940,0x6d280));function env(_0x2a140e){return process.env[`RABETBASE_${_0x2a140e}`]||process.env[`LOVRABET_${_0x2a140e}`]||undefined;}export function isNonInteractive(_0x4613e9){const _0x21efc9=a131_0x5d53;return!!(_0x4613e9[_0x21efc9(0x117)]||_0x4613e9['ci']||env('CI')===_0x21efc9(0x108)||process.env.CI===_0x21efc9(0x108)||!process['stdout'][_0x21efc9(0x111)]||!isStdinRawModeSupported());}function a131_0x3940(){const _0x1156a6=['isTTY','2070pUAsud','11670576wUodoz','2uSWLsL','211719gSTqCm','397726RzEmRk','nonInteractive','true','3iNxOYL','34568YZUMjV','2515495tkziyo','42AWpfAz','2054016aljRnS','stdin','15917pktXWu','1485xQnMZr'];a131_0x3940=function(){return _0x1156a6;};return a131_0x3940();}function a131_0x5d53(_0x36e7a4,_0x5d3f8a){_0x36e7a4=_0x36e7a4-0x108;const _0x3940cc=a131_0x3940();let _0x5d5351=_0x3940cc[_0x36e7a4];return _0x5d5351;}function isStdinRawModeSupported(){const _0x1fc8ae=a131_0x5d53;if(!process[_0x1fc8ae(0x10e)][_0x1fc8ae(0x111)])return![];try{const _0x28df0a=process[_0x1fc8ae(0x10e)]['isRaw'];return process[_0x1fc8ae(0x10e)]['setRawMode'](!![]),process[_0x1fc8ae(0x10e)]['setRawMode'](_0x28df0a??![]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- const a130_0x239a89=a130_0x5068;(function(_0xf3ec2d,_0x59a6b5){const _0x3cfcfb=a130_0x5068,_0x355058=_0xf3ec2d();while(!![]){try{const _0x20b174=-parseInt(_0x3cfcfb(0xdf))/0x1+parseInt(_0x3cfcfb(0xf6))/0x2*(-parseInt(_0x3cfcfb(0xe4))/0x3)+-parseInt(_0x3cfcfb(0xe9))/0x4*(parseInt(_0x3cfcfb(0xf9))/0x5)+-parseInt(_0x3cfcfb(0xe5))/0x6*(parseInt(_0x3cfcfb(0xea))/0x7)+parseInt(_0x3cfcfb(0x107))/0x8*(-parseInt(_0x3cfcfb(0xf1))/0x9)+-parseInt(_0x3cfcfb(0x10b))/0xa+parseInt(_0x3cfcfb(0xf4))/0xb*(parseInt(_0x3cfcfb(0xf2))/0xc);if(_0x20b174===_0x59a6b5)break;else _0x355058['push'](_0x355058['shift']());}catch(_0x2571a2){_0x355058['push'](_0x355058['shift']());}}}(a130_0x3a30,0x2af16));import a130_0x13be7d from'winston';function a130_0x5068(_0x5bb719,_0x270122){_0x5bb719=_0x5bb719-0xda;const _0x3a302e=a130_0x3a30();let _0x5068de=_0x3a302e[_0x5bb719];return _0x5068de;}import a130_0x14b9ea from'node:fs';import a130_0x4e6d1c from'node:path';class Logger{['winstonLogger'];[a130_0x239a89(0x10c)];[a130_0x239a89(0xec)]='';constructor(){this['logFilePath']='';}['setRawCommand'](_0x4c4843){const _0x44e2bf=a130_0x239a89;this[_0x44e2bf(0xec)]=_0x4c4843;}[a130_0x239a89(0xfb)](){const _0x165322=a130_0x239a89,_0x5c5cc6=a130_0x4e6d1c[_0x165322(0xed)](this[_0x165322(0x10c)]);!a130_0x14b9ea['existsSync'](_0x5c5cc6)&&a130_0x14b9ea[_0x165322(0xe6)](_0x5c5cc6,{'recursive':!![]});const _0x17b6fc=a130_0x13be7d[_0x165322(0x10a)][_0x165322(0x103)](a130_0x13be7d['format'][_0x165322(0xee)](),a130_0x13be7d[_0x165322(0x10a)]['errors']({'stack':!![]}),a130_0x13be7d[_0x165322(0x10a)][_0x165322(0xe3)](_0x41c91e=>{const _0x5f1dd5=_0x165322,_0x1d4881={'timestamp':_0x41c91e[_0x5f1dd5(0xee)]||new Date()[_0x5f1dd5(0xe0)](),'level':_0x41c91e['level']||'info','command':_0x41c91e[_0x5f1dd5(0xde)]||'unknown','rawCommand':_0x41c91e['rawCommand']||this[_0x5f1dd5(0xec)]||undefined,'message':_0x41c91e['message']||'','duration':_0x41c91e['duration']||undefined,'details':_0x41c91e[_0x5f1dd5(0xfd)]||undefined};return JSON['stringify'](_0x1d4881);}));this[_0x165322(0xfa)]=a130_0x13be7d[_0x165322(0xe1)]({'level':'info','format':_0x17b6fc,'transports':[new a130_0x13be7d[(_0x165322(0x108))]['File']({'filename':this[_0x165322(0x10c)],'level':_0x165322(0x106)})],'silent':![]}),a130_0x13be7d[_0x165322(0xf7)]({'success':_0x165322(0xf0),'error':'red','warn':_0x165322(0xda),'info':_0x165322(0xf8)});}[a130_0x239a89(0x100)](_0x28b63b){const _0x4fccb9=a130_0x239a89;this[_0x4fccb9(0x10c)]=a130_0x4e6d1c[_0x4fccb9(0x101)](_0x28b63b,_0x4fccb9(0xe8)),this['winstonLogger']&&this[_0x4fccb9(0xfa)][_0x4fccb9(0xe2)](),this[_0x4fccb9(0xfb)]();}[a130_0x239a89(0x106)](_0xf04f2e,_0x3da89f,_0x5c9db5){const _0x3c4851=a130_0x239a89;if(!this[_0x3c4851(0x10c)]||!this[_0x3c4851(0xfa)])return;this[_0x3c4851(0xfa)][_0x3c4851(0x106)](_0x3da89f,{'command':_0xf04f2e,'details':_0x5c9db5});}[a130_0x239a89(0x104)](_0x2b5363,_0x3d8c1f,_0x483516,_0x4f658f){const _0x566d8f=a130_0x239a89;if(!this[_0x566d8f(0x10c)]||!this['winstonLogger'])return;this[_0x566d8f(0xfa)][_0x566d8f(0xff)](_0x566d8f(0x106),_0x3d8c1f,{'level':_0x566d8f(0x104),'command':_0x2b5363,'duration':_0x483516,'details':_0x4f658f});}[a130_0x239a89(0xdd)](_0x245462,_0x3e426c,_0x10c839){const _0x5ba7f9=a130_0x239a89;if(!this[_0x5ba7f9(0x10c)]||!this[_0x5ba7f9(0xfa)])return;this[_0x5ba7f9(0xfa)][_0x5ba7f9(0xdd)](_0x3e426c,{'command':_0x245462,'details':_0x10c839});}[a130_0x239a89(0xfc)](_0x534913,_0x253788,_0x2a3164){const _0xbd17e=a130_0x239a89;if(!this['logFilePath']||!this[_0xbd17e(0xfa)])return;this[_0xbd17e(0xfa)][_0xbd17e(0xfc)](_0x253788,{'command':_0x534913,'details':_0x2a3164});}async[a130_0x239a89(0xf3)](_0x236285,_0x10b2a3,_0x4b7f4f){const _0x10cd5a=a130_0x239a89,_0x129afa=Date[_0x10cd5a(0x109)]();this['info'](_0x236285,_0x10cd5a(0xf5)+_0x10b2a3);try{const _0x3f4b80=await _0x4b7f4f(),_0x477d08=Date[_0x10cd5a(0x109)]()-_0x129afa;return this[_0x10cd5a(0x104)](_0x236285,'完成:\x20'+_0x10b2a3,_0x477d08),_0x3f4b80;}catch(_0x10bf4b){const _0x192a39=Date[_0x10cd5a(0x109)]()-_0x129afa;this[_0x10cd5a(0xdd)](_0x236285,'失败:\x20'+_0x10b2a3,{'error':_0x10bf4b instanceof Error?_0x10bf4b[_0x10cd5a(0xdc)]:String(_0x10bf4b),'duration':_0x192a39});throw _0x10bf4b;}}['readLogs'](){const _0x2b660d=a130_0x239a89;try{if(!a130_0x14b9ea[_0x2b660d(0x102)](this[_0x2b660d(0x10c)]))return[];const _0xa2fa1a=a130_0x14b9ea[_0x2b660d(0xeb)](this[_0x2b660d(0x10c)],'utf8');return _0xa2fa1a['split']('\x0a')['filter'](_0x294a8=>_0x294a8['trim']())[_0x2b660d(0xdb)](_0x3a7a39=>JSON[_0x2b660d(0x105)](_0x3a7a39));}catch(_0x3b5e80){return console[_0x2b660d(0xfc)]('Failed\x20to\x20read\x20logs:',_0x3b5e80),[];}}['clearLogs'](){const _0x1bafc0=a130_0x239a89;try{a130_0x14b9ea[_0x1bafc0(0x102)](this[_0x1bafc0(0x10c)])&&a130_0x14b9ea[_0x1bafc0(0xef)](this[_0x1bafc0(0x10c)],'',_0x1bafc0(0xfe));}catch(_0xde588a){console[_0x1bafc0(0xfc)](_0x1bafc0(0xe7),_0xde588a);}}['getWinstonInstance'](){return this['winstonLogger'];}}function a130_0x3a30(){const _0x94bb51=['error','command','72294BLzFpU','toISOString','createLogger','clear','printf','9939QJlEGQ','6kPpTyy','mkdirSync','Failed\x20to\x20clear\x20logs:','.lovrabet.log','56852PFutDl','1439711uCSuzB','readFileSync','currentRawCommand','dirname','timestamp','writeFileSync','green','9WvKxny','15011148xrKfAT','logTask','11YDMjUh','开始执行:\x20','166ZiOrDA','addColors','blue','15ILfSzv','winstonLogger','initWinstonLogger','warn','details','utf8','log','setLogPath','join','existsSync','combine','success','parse','info','1061176cuoRcF','transports','now','format','3468030jKOTAE','logFilePath','yellow','map','message'];a130_0x3a30=function(){return _0x94bb51;};return a130_0x3a30();}export const logger=new Logger();
1
+ function a132_0x5e7e(_0x4b9a11,_0x3276ef){_0x4b9a11=_0x4b9a11-0xd6;const _0xb390a3=a132_0xb390();let _0x5e7e0d=_0xb390a3[_0x4b9a11];return _0x5e7e0d;}const a132_0x19ea64=a132_0x5e7e;function a132_0xb390(){const _0x3e5d35=['3440073IhSzGa','2KJINxM','2556jOSwCr','yellow','map','6762742SzMFAK','error','setRawCommand','失败:\x20','existsSync','initWinstonLogger','logFilePath','readFileSync','message','writeFileSync','readLogs','stringify','clear','Failed\x20to\x20read\x20logs:','createLogger','success','6QKotUr','filter','printf','now','38690BDPkNI','mkdirSync','errors','dirname','logTask','combine','format','Failed\x20to\x20clear\x20logs:','21478140fjacBa','join','currentRawCommand','329934GxNjue','124CLMSDJ','开始执行:\x20','info','clearLogs','details','warn','完成:\x20','green','trim','File','734535InpPnE','blue','rawCommand','40PgEsLl','level','log','winstonLogger','toISOString','getWinstonInstance','utf8','24992jOIBWR','.lovrabet.log'];a132_0xb390=function(){return _0x3e5d35;};return a132_0xb390();}(function(_0x341a8d,_0x20ad57){const _0x4f090c=a132_0x5e7e,_0x1e1f84=_0x341a8d();while(!![]){try{const _0x135acb=-parseInt(_0x4f090c(0xed))/0x1+-parseInt(_0x4f090c(0xfa))/0x2*(-parseInt(_0x4f090c(0xf9))/0x3)+parseInt(_0x4f090c(0xe3))/0x4*(parseInt(_0x4f090c(0xd7))/0x5)+-parseInt(_0x4f090c(0x10e))/0x6*(parseInt(_0x4f090c(0xfe))/0x7)+parseInt(_0x4f090c(0xf7))/0x8*(-parseInt(_0x4f090c(0xfb))/0x9)+parseInt(_0x4f090c(0xf0))/0xa*(parseInt(_0x4f090c(0xe2))/0xb)+parseInt(_0x4f090c(0xdf))/0xc;if(_0x135acb===_0x20ad57)break;else _0x1e1f84['push'](_0x1e1f84['shift']());}catch(_0x5b9de4){_0x1e1f84['push'](_0x1e1f84['shift']());}}}(a132_0xb390,0xacfb5));import a132_0x1d4933 from'winston';import a132_0x1ac914 from'node:fs';import a132_0x406fcd from'node:path';class Logger{['winstonLogger'];['logFilePath'];['currentRawCommand']='';constructor(){this['logFilePath']='';}[a132_0x19ea64(0x100)](_0x4cf8ba){const _0x30abbf=a132_0x19ea64;this[_0x30abbf(0xe1)]=_0x4cf8ba;}['initWinstonLogger'](){const _0x3754bf=a132_0x19ea64,_0x3d9db3=a132_0x406fcd[_0x3754bf(0xda)](this['logFilePath']);!a132_0x1ac914[_0x3754bf(0x102)](_0x3d9db3)&&a132_0x1ac914[_0x3754bf(0xd8)](_0x3d9db3,{'recursive':!![]});const _0x3d81f7=a132_0x1d4933[_0x3754bf(0xdd)][_0x3754bf(0xdc)](a132_0x1d4933[_0x3754bf(0xdd)]['timestamp'](),a132_0x1d4933['format'][_0x3754bf(0xd9)]({'stack':!![]}),a132_0x1d4933[_0x3754bf(0xdd)][_0x3754bf(0x110)](_0x185232=>{const _0x4e6216=_0x3754bf,_0x155a75={'timestamp':_0x185232['timestamp']||new Date()[_0x4e6216(0xf4)](),'level':_0x185232[_0x4e6216(0xf1)]||_0x4e6216(0xe5),'command':_0x185232['command']||'unknown','rawCommand':_0x185232[_0x4e6216(0xef)]||this[_0x4e6216(0xe1)]||undefined,'message':_0x185232[_0x4e6216(0x106)]||'','duration':_0x185232['duration']||undefined,'details':_0x185232[_0x4e6216(0xe7)]||undefined};return JSON[_0x4e6216(0x109)](_0x155a75);}));this[_0x3754bf(0xf3)]=a132_0x1d4933[_0x3754bf(0x10c)]({'level':_0x3754bf(0xe5),'format':_0x3d81f7,'transports':[new a132_0x1d4933['transports'][(_0x3754bf(0xec))]({'filename':this[_0x3754bf(0x104)],'level':_0x3754bf(0xe5)})],'silent':![]}),a132_0x1d4933['addColors']({'success':_0x3754bf(0xea),'error':'red','warn':_0x3754bf(0xfc),'info':_0x3754bf(0xee)});}['setLogPath'](_0x5484e0){const _0x469da3=a132_0x19ea64;this[_0x469da3(0x104)]=a132_0x406fcd[_0x469da3(0xe0)](_0x5484e0,_0x469da3(0xf8)),this[_0x469da3(0xf3)]&&this['winstonLogger'][_0x469da3(0x10a)](),this[_0x469da3(0x103)]();}[a132_0x19ea64(0xe5)](_0xed2026,_0x4b6f6d,_0x3a7e54){const _0x5bbc30=a132_0x19ea64;if(!this[_0x5bbc30(0x104)]||!this[_0x5bbc30(0xf3)])return;this[_0x5bbc30(0xf3)][_0x5bbc30(0xe5)](_0x4b6f6d,{'command':_0xed2026,'details':_0x3a7e54});}['success'](_0x14319e,_0x3bf097,_0x41aa4b,_0x5de62d){const _0x25a13f=a132_0x19ea64;if(!this[_0x25a13f(0x104)]||!this[_0x25a13f(0xf3)])return;this[_0x25a13f(0xf3)][_0x25a13f(0xf2)](_0x25a13f(0xe5),_0x3bf097,{'level':_0x25a13f(0x10d),'command':_0x14319e,'duration':_0x41aa4b,'details':_0x5de62d});}[a132_0x19ea64(0xff)](_0x4bb316,_0x5cd36b,_0x13f812){const _0x528e51=a132_0x19ea64;if(!this[_0x528e51(0x104)]||!this[_0x528e51(0xf3)])return;this[_0x528e51(0xf3)][_0x528e51(0xff)](_0x5cd36b,{'command':_0x4bb316,'details':_0x13f812});}[a132_0x19ea64(0xe8)](_0x110e95,_0x3d969d,_0x15b047){const _0x272a33=a132_0x19ea64;if(!this[_0x272a33(0x104)]||!this[_0x272a33(0xf3)])return;this['winstonLogger'][_0x272a33(0xe8)](_0x3d969d,{'command':_0x110e95,'details':_0x15b047});}async[a132_0x19ea64(0xdb)](_0x1b55c2,_0x65fc18,_0x154969){const _0x22bcc9=a132_0x19ea64,_0x1efd88=Date[_0x22bcc9(0xd6)]();this['info'](_0x1b55c2,_0x22bcc9(0xe4)+_0x65fc18);try{const _0x3683ee=await _0x154969(),_0x4daec6=Date['now']()-_0x1efd88;return this[_0x22bcc9(0x10d)](_0x1b55c2,_0x22bcc9(0xe9)+_0x65fc18,_0x4daec6),_0x3683ee;}catch(_0x964ee2){const _0x556ce9=Date[_0x22bcc9(0xd6)]()-_0x1efd88;this[_0x22bcc9(0xff)](_0x1b55c2,_0x22bcc9(0x101)+_0x65fc18,{'error':_0x964ee2 instanceof Error?_0x964ee2['message']:String(_0x964ee2),'duration':_0x556ce9});throw _0x964ee2;}}[a132_0x19ea64(0x108)](){const _0x231d09=a132_0x19ea64;try{if(!a132_0x1ac914[_0x231d09(0x102)](this['logFilePath']))return[];const _0x2ffaf5=a132_0x1ac914[_0x231d09(0x105)](this[_0x231d09(0x104)],_0x231d09(0xf6));return _0x2ffaf5['split']('\x0a')[_0x231d09(0x10f)](_0x4468bc=>_0x4468bc[_0x231d09(0xeb)]())[_0x231d09(0xfd)](_0x3382fd=>JSON['parse'](_0x3382fd));}catch(_0x4e1094){return console[_0x231d09(0xe8)](_0x231d09(0x10b),_0x4e1094),[];}}[a132_0x19ea64(0xe6)](){const _0x2def7b=a132_0x19ea64;try{a132_0x1ac914['existsSync'](this[_0x2def7b(0x104)])&&a132_0x1ac914[_0x2def7b(0x107)](this[_0x2def7b(0x104)],'',_0x2def7b(0xf6));}catch(_0x75b091){console['warn'](_0x2def7b(0xde),_0x75b091);}}[a132_0x19ea64(0xf5)](){const _0x3b50d1=a132_0x19ea64;return this[_0x3b50d1(0xf3)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- function a131_0x38c4(_0x2aca59,_0x17e6d1){_0x2aca59=_0x2aca59-0xde;const _0x5c30c7=a131_0x5c30();let _0x38c43f=_0x5c30c7[_0x2aca59];return _0x38c43f;}const a131_0x1fd270=a131_0x38c4;(function(_0x113a1f,_0x18d20b){const _0xeec04b=a131_0x38c4,_0x75d508=_0x113a1f();while(!![]){try{const _0x162323=parseInt(_0xeec04b(0xe9))/0x1*(-parseInt(_0xeec04b(0xe4))/0x2)+parseInt(_0xeec04b(0xe7))/0x3+parseInt(_0xeec04b(0xe1))/0x4+parseInt(_0xeec04b(0xe0))/0x5*(-parseInt(_0xeec04b(0xe5))/0x6)+-parseInt(_0xeec04b(0xde))/0x7*(-parseInt(_0xeec04b(0xe8))/0x8)+-parseInt(_0xeec04b(0xe2))/0x9*(parseInt(_0xeec04b(0xdf))/0xa)+-parseInt(_0xeec04b(0xe3))/0xb;if(_0x162323===_0x18d20b)break;else _0x75d508['push'](_0x75d508['shift']());}catch(_0x56bd37){_0x75d508['push'](_0x75d508['shift']());}}}(a131_0x5c30,0x64d5a));export const isWindows=process['platform']===a131_0x1fd270(0xe6);function a131_0x5c30(){const _0x77409f=['15032IOAjiq','3UnnyCS','2779EMlzpH','885780OWXMri','855370nkOiki','1684788WyzMbi','27QPmkKo','6023435AEXhNW','224914UWCiUK','12QtWEUK','win32','2216088JIEfOy'];a131_0x5c30=function(){return _0x77409f;};return a131_0x5c30();}export function resolveNpmBin(_0x397246){return isWindows?_0x397246+'.cmd':_0x397246;}
1
+ const a133_0x4268a1=a133_0x3012;(function(_0x2c613f,_0x187278){const _0x9712be=a133_0x3012,_0x1717cc=_0x2c613f();while(!![]){try{const _0x4df3a7=parseInt(_0x9712be(0x1a5))/0x1+-parseInt(_0x9712be(0x19d))/0x2+parseInt(_0x9712be(0x1a0))/0x3+-parseInt(_0x9712be(0x1a6))/0x4*(-parseInt(_0x9712be(0x1a3))/0x5)+-parseInt(_0x9712be(0x1a4))/0x6+-parseInt(_0x9712be(0x19c))/0x7*(parseInt(_0x9712be(0x19f))/0x8)+parseInt(_0x9712be(0x1a1))/0x9;if(_0x4df3a7===_0x187278)break;else _0x1717cc['push'](_0x1717cc['shift']());}catch(_0x2a4318){_0x1717cc['push'](_0x1717cc['shift']());}}}(a133_0x241b,0x7900c));export const isWindows=process[a133_0x4268a1(0x19e)]===a133_0x4268a1(0x19b);function a133_0x3012(_0xf22e52,_0x29fe0c){_0xf22e52=_0xf22e52-0x19b;const _0x241b40=a133_0x241b();let _0x30126e=_0x241b40[_0xf22e52];return _0x30126e;}function a133_0x241b(){const _0x2dfad7=['2243043SfFZMF','9998064JgWSlU','.cmd','5295OQPoDr','4892460kroEsc','638666nMxtoA','380riMOmD','win32','4697KBzsmx','850492KkKsWN','platform','10272wNrmol'];a133_0x241b=function(){return _0x2dfad7;};return a133_0x241b();}export function resolveNpmBin(_0x55fd1f){const _0x2e1adf=a133_0x4268a1;return isWindows?_0x55fd1f+_0x2e1adf(0x1a2):_0x55fd1f;}
@@ -1 +1 @@
1
- const a132_0x2c7d22=a132_0x3140;(function(_0x168f28,_0xee2e26){const _0x58723a=a132_0x3140,_0x3b4a28=_0x168f28();while(!![]){try{const _0x3ce885=-parseInt(_0x58723a(0xd9))/0x1*(parseInt(_0x58723a(0xdb))/0x2)+-parseInt(_0x58723a(0xcc))/0x3+parseInt(_0x58723a(0xd2))/0x4*(parseInt(_0x58723a(0xde))/0x5)+parseInt(_0x58723a(0xcf))/0x6+parseInt(_0x58723a(0xda))/0x7*(parseInt(_0x58723a(0xdd))/0x8)+parseInt(_0x58723a(0xcd))/0x9+-parseInt(_0x58723a(0xe1))/0xa;if(_0x3ce885===_0xee2e26)break;else _0x3b4a28['push'](_0x3b4a28['shift']());}catch(_0x3e93b2){_0x3b4a28['push'](_0x3b4a28['shift']());}}}(a132_0x3a21,0x310ab));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a132_0x3140(_0x2127e4,_0x2fef26){_0x2127e4=_0x2127e4-0xc9;const _0x3a21b9=a132_0x3a21();let _0x31401c=_0x3a21b9[_0x2127e4];return _0x31401c;}function getRulesCdnUrl(){const _0xde5c65=a132_0x3140,_0x5817cf=getTemplateBaseUrl();return _0x5817cf+_0xde5c65(0xe2);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a132_0x2c7d22(0xcb));export async function fetchRulesFromCDN(){const _0x416829=a132_0x2c7d22,_0x3bb83e=getRulesCdnUrl(),_0x36f392=await fetch(_0x3bb83e,{'headers':{'Accept':_0x416829(0xd5)}});if(!_0x36f392['ok'])throw new Error(_0x416829(0xd6)+_0x36f392[_0x416829(0xd1)]+'\x20'+_0x36f392[_0x416829(0xc9)]);const _0x4016dd=await _0x36f392[_0x416829(0xdc)]();if(!_0x4016dd[_0x416829(0xd8)]||typeof _0x4016dd[_0x416829(0xd8)]!==_0x416829(0xdf))throw new Error(_0x416829(0xca));return _0x4016dd;}export async function getRulesContent(){const _0x5f3369=a132_0x2c7d22;try{const _0x134bee=await fetchRulesFromCDN();return _0x134bee[_0x5f3369(0xd8)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x5cbba8=a132_0x2c7d22;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x5cbba8(0xd0));throw new Error(_0x5cbba8(0xd3)+LOCAL_TEMPLATE_PATH);}function a132_0x3a21(){const _0x85714c=['39361aYoGIY','3714CZEBIF','json','568TKXMvM','55zayVss','string','catch','1685830kimDEL','/rules/rules.json','statusText','CDN\x20返回数据格式错误','../../templates/rules/lovrabet_rules.mdc.tpl','864444fHTNlL','2042190qzmIMb','.cursor/rules','67608nRwdPN','utf-8','status','85000CXBuub','本地模板文件不存在:\x20','lastUpdated','application/json','CDN\x20请求失败:\x20','agents.md','content','115jAcrKG'];a132_0x3a21=function(){return _0x85714c;};return a132_0x3a21();}export async function writeRulesFile(_0xa49da9){const _0x1168b9=a132_0x2c7d22,_0x2404f7=await fetchRulesFromCDN()[_0x1168b9(0xe0)](()=>null);let _0x485e82;_0x2404f7?(_0x485e82=_0x2404f7[_0x1168b9(0xd8)],_0x2404f7['lastUpdated']&&(_0x485e82=appendUpdateTime(_0x485e82,_0x2404f7[_0x1168b9(0xd4)]))):_0x485e82=readLocalTemplate();const _0xf3c1d3=dirname(_0xa49da9);!existsSync(_0xf3c1d3)&&mkdirSync(_0xf3c1d3,{'recursive':!![]}),writeFileSync(_0xa49da9,_0x485e82,_0x1168b9(0xd0));}export async function copyRulesToCursor(_0xae3937){const _0x2afafa=a132_0x2c7d22,_0x28f960=join(_0xae3937,_0x2afafa(0xce)),_0x53a88a=join(_0x28f960,'lovrabet_rules.mdc');if(existsSync(_0x53a88a))return![];return await writeRulesFile(_0x53a88a),!![];}export async function copyRulesToAgentsMd(_0x35414d){const _0x26b8da=a132_0x2c7d22,_0x4d8e48=join(_0x35414d,_0x26b8da(0xd7));if(existsSync(_0x4d8e48))return![];return await writeRulesFile(_0x4d8e48),!![];}
1
+ const a134_0x5d5204=a134_0x470e;(function(_0x4869eb,_0xe1e6a8){const _0x4dc3c3=a134_0x470e,_0x4d921e=_0x4869eb();while(!![]){try{const _0x49cd7b=parseInt(_0x4dc3c3(0x12c))/0x1+-parseInt(_0x4dc3c3(0x132))/0x2+-parseInt(_0x4dc3c3(0x124))/0x3+parseInt(_0x4dc3c3(0x133))/0x4*(parseInt(_0x4dc3c3(0x136))/0x5)+-parseInt(_0x4dc3c3(0x137))/0x6*(parseInt(_0x4dc3c3(0x12f))/0x7)+parseInt(_0x4dc3c3(0x130))/0x8*(parseInt(_0x4dc3c3(0x126))/0x9)+parseInt(_0x4dc3c3(0x127))/0xa*(parseInt(_0x4dc3c3(0x12e))/0xb);if(_0x49cd7b===_0xe1e6a8)break;else _0x4d921e['push'](_0x4d921e['shift']());}catch(_0x3a549b){_0x4d921e['push'](_0x4d921e['shift']());}}}(a134_0x236e,0x42b5d));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';function a134_0x236e(){const _0x194ef8=['statusText','lastUpdated','string','315517AKXyQW','CDN\x20请求失败:\x20','2783qLHtjE','3997lFmbRp','191320eJejTZ','json','422888MDKvng','4pVyLSr','CDN\x20返回数据格式错误','.cursor/rules','250355jXCwzb','1626Xxwmle','content','358593MQYEih','../../templates/rules/lovrabet_rules.mdc.tpl','117VYRPEb','3260eyFOOZ','utf-8'];a134_0x236e=function(){return _0x194ef8;};return a134_0x236e();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x56bdc5=getTemplateBaseUrl();return _0x56bdc5+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a134_0x5d5204(0x125));export async function fetchRulesFromCDN(){const _0x517c05=a134_0x5d5204,_0x3f61e0=getRulesCdnUrl(),_0x446b85=await fetch(_0x3f61e0,{'headers':{'Accept':'application/json'}});if(!_0x446b85['ok'])throw new Error(_0x517c05(0x12d)+_0x446b85['status']+'\x20'+_0x446b85[_0x517c05(0x129)]);const _0x1531f8=await _0x446b85[_0x517c05(0x131)]();if(!_0x1531f8[_0x517c05(0x138)]||typeof _0x1531f8[_0x517c05(0x138)]!==_0x517c05(0x12b))throw new Error(_0x517c05(0x134));return _0x1531f8;}export async function getRulesContent(){const _0x220432=a134_0x5d5204;try{const _0x5a3f82=await fetchRulesFromCDN();return _0x5a3f82[_0x220432(0x138)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x411feb=a134_0x5d5204;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x411feb(0x128));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x3ec2f0){const _0x34abbc=a134_0x5d5204,_0x13ce7d=await fetchRulesFromCDN()['catch'](()=>null);let _0x371821;_0x13ce7d?(_0x371821=_0x13ce7d['content'],_0x13ce7d[_0x34abbc(0x12a)]&&(_0x371821=appendUpdateTime(_0x371821,_0x13ce7d[_0x34abbc(0x12a)]))):_0x371821=readLocalTemplate();const _0x498002=dirname(_0x3ec2f0);!existsSync(_0x498002)&&mkdirSync(_0x498002,{'recursive':!![]}),writeFileSync(_0x3ec2f0,_0x371821,_0x34abbc(0x128));}function a134_0x470e(_0x183475,_0x3afeea){_0x183475=_0x183475-0x124;const _0x236eaa=a134_0x236e();let _0x470e3e=_0x236eaa[_0x183475];return _0x470e3e;}export async function copyRulesToCursor(_0x10de1a){const _0x45a49c=a134_0x5d5204,_0x30e5a0=join(_0x10de1a,_0x45a49c(0x135)),_0x2f770e=join(_0x30e5a0,'lovrabet_rules.mdc');if(existsSync(_0x2f770e))return![];return await writeRulesFile(_0x2f770e),!![];}export async function copyRulesToAgentsMd(_0x1d9ae2){const _0x157b35=join(_0x1d9ae2,'agents.md');if(existsSync(_0x157b35))return![];return await writeRulesFile(_0x157b35),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x54a7d4){return new Promise(_0x57a5c1=>setTimeout(_0x57a5c1,_0x54a7d4));}
1
+ export function sleep(_0x1b9740){return new Promise(_0x408e03=>setTimeout(_0x408e03,_0x1b9740));}
@@ -1 +1 @@
1
- const a134_0x35ed66=a134_0x3a0e;(function(_0x3e7f40,_0x537493){const _0x28c24d=a134_0x3a0e,_0x862481=_0x3e7f40();while(!![]){try{const _0x1b5a1d=-parseInt(_0x28c24d(0x1ab))/0x1+-parseInt(_0x28c24d(0x18a))/0x2+-parseInt(_0x28c24d(0x18b))/0x3+parseInt(_0x28c24d(0x1aa))/0x4+-parseInt(_0x28c24d(0x187))/0x5*(-parseInt(_0x28c24d(0x1a6))/0x6)+-parseInt(_0x28c24d(0x19c))/0x7+parseInt(_0x28c24d(0x185))/0x8*(parseInt(_0x28c24d(0x1a2))/0x9);if(_0x1b5a1d===_0x537493)break;else _0x862481['push'](_0x862481['shift']());}catch(_0x2a2539){_0x862481['push'](_0x862481['shift']());}}}(a134_0x2ebb,0x2d367));function a134_0x2ebb(){const _0xc4f488=['toISOString','success','2058363iCMGsC','split','toLocaleTimeString','replaceApiContent','72216SKqtTQ','replace','error','pop','1314504tEQKNw','295316zlJhdw','tableName','.json','writeFile','toLocaleDateString','endsWith','toLocaleString','\x20},','.jsx','utf8','readdir','datasetCode:\x20\x22','promises','numeric','push','name','processFile','now','readFile','2-digit','charAt','toUpperCase','mkdir','api','YourModel','开始处理模板内容替换','message','.css','slice','模板内容替换完成','16FZJNih','copyFile','85UVRUPf','processDirectory','toDisplayTitle','374084urTAdf','683094ABYsNs','isFile','LOVRABET','toComponentName','template','\x0a\x20\x20\x20\x20{\x20','includes','.scss','map','.md','.tpl','datasetCode','toLowerCase','.tsx','replaceContent','processTemplate','.js','667835NJLGFl','tableName:\x20\x22','alias','join'];a134_0x2ebb=function(){return _0xc4f488;};return a134_0x2ebb();}import a134_0xfa34ad from'node:fs';import a134_0x4b9670 from'node:path';function a134_0x3a0e(_0x2b6679,_0x5bda3f){_0x2b6679=_0x2b6679-0x16b;const _0x2ebb07=a134_0x2ebb();let _0x3a0ec6=_0x2ebb07[_0x2b6679];return _0x3a0ec6;}import{logger}from'./logger.js';import{getCliVersion}from'./version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a134_0x35ed66(0x18e)](_0x21cd7b){const _0x12e7d2=a134_0x35ed66,_0x144fd0=_0x21cd7b[_0x12e7d2(0x1a3)]('/')[_0x12e7d2(0x1a9)]()||_0x21cd7b;return _0x144fd0[_0x12e7d2(0x1a3)]('-')[_0x12e7d2(0x193)](_0x3489dd=>_0x3489dd[_0x12e7d2(0x17b)](0x0)['toUpperCase']()+_0x3489dd[_0x12e7d2(0x183)](0x1)['toLowerCase']())[_0x12e7d2(0x19f)]('');}static[a134_0x35ed66(0x189)](_0x3b5b1f){const _0x3036c9=a134_0x35ed66,_0x14a822=_0x3b5b1f[_0x3036c9(0x1a3)]('/')[_0x3036c9(0x1a9)]()||_0x3b5b1f;return _0x14a822[_0x3036c9(0x1a3)]('-')[_0x3036c9(0x193)](_0x551f3d=>_0x551f3d[_0x3036c9(0x17b)](0x0)[_0x3036c9(0x17c)]()+_0x551f3d[_0x3036c9(0x183)](0x1)[_0x3036c9(0x197)]())['join']('\x20');}static[a134_0x35ed66(0x199)](_0x41c2b1,_0x1ba6e0,_0x3716e0){const _0x149c33=a134_0x35ed66,_0x5c2cef=this[_0x149c33(0x18e)](_0x1ba6e0),_0x1d37c7=this[_0x149c33(0x189)](_0x1ba6e0),_0x4ba153=new Date(),_0x1f4a95=_0x4ba153[_0x149c33(0x16d)](undefined,{'year':_0x149c33(0x174),'month':_0x149c33(0x17a),'day':'2-digit','hour':_0x149c33(0x17a),'minute':'2-digit','second':_0x149c33(0x17a),'hour12':![]})['replace'](/\//g,'-'),_0x39dbcf=_0x4ba153[_0x149c33(0x16b)](undefined,{'year':_0x149c33(0x174),'month':_0x149c33(0x17a),'day':'2-digit'})['replace'](/\//g,'-'),_0x5a81c6=_0x4ba153[_0x149c33(0x1a4)](undefined,{'hour12':![]});let _0x11ea3a=_0x41c2b1[_0x149c33(0x1a7)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x5c2cef)[_0x149c33(0x1a7)](/\{DisplayTitle\}/g,_0x1d37c7)[_0x149c33(0x1a7)](/\{PageName\}/g,_0x1ba6e0)[_0x149c33(0x1a7)](/\{TemplateName\}/g,_0x3716e0)[_0x149c33(0x1a7)](/\{CreatedAt\}/g,_0x1f4a95)[_0x149c33(0x1a7)](/\{CreatedDate\}/g,_0x39dbcf)[_0x149c33(0x1a7)](/\{CreatedTime\}/g,_0x5a81c6);return _0x11ea3a;}static[a134_0x35ed66(0x1a5)](_0x501561,_0x4350b8,_0x4ba98c,_0x509184,_0x1b992d,_0x35c70c,_0x52d36d,_0x76032b){const _0x39b036=a134_0x35ed66,_0x41aea6=new Date(),_0x4ee418=_0x41aea6[_0x39b036(0x1a0)](),_0x434dc7=_0x4ba98c[_0x39b036(0x193)](_0x37c813=>{const _0x4acc97=_0x39b036,_0xd59083=[_0x4acc97(0x172)+_0x37c813[_0x4acc97(0x196)]+'\x22',_0x4acc97(0x19d)+_0x37c813[_0x4acc97(0x1ac)]+'\x22','name:\x20\x22'+_0x37c813['name']+'\x22'];return _0x37c813[_0x4acc97(0x19e)]&&_0xd59083[_0x4acc97(0x175)]('alias:\x20\x22'+_0x37c813[_0x4acc97(0x19e)]+'\x22'),_0x4acc97(0x190)+_0xd59083[_0x4acc97(0x19f)](',\x20')+_0x4acc97(0x16e);})[_0x39b036(0x19f)](''),_0x90913b=_0x509184||_0x4ba98c[0x0]?.[_0x39b036(0x19e)]||_0x39b036(0x17f);let _0x3926db=_0x501561[_0x39b036(0x1a7)](/\{AppCode\}/g,_0x4350b8)['replace'](/\{ModelConfigs\}/g,_0x434dc7)[_0x39b036(0x1a7)](/\{ExampleModelName\}/g,_0x90913b)[_0x39b036(0x1a7)](/\{ApiFileName\}/g,_0x1b992d||_0x39b036(0x17e))['replace'](/\{ConfigName\}/g,_0x35c70c||'default')[_0x39b036(0x1a7)](/\{ClientConfigParam\}/g,_0x52d36d||'')[_0x39b036(0x1a7)](/\{VarPrefix\}/g,_0x76032b||_0x39b036(0x18d))['replace'](/\{CreatedAt\}/g,_0x4ee418);return _0x3926db;}static async[a134_0x35ed66(0x19a)](_0x3f0b34,_0x35fddd,_0x4b11b2,_0xbddc3,_0x2ea13f=!![]){const _0x3e8879=a134_0x35ed66,_0x21e3d1=Date[_0x3e8879(0x178)]();try{_0x2ea13f&&logger['info']('template',_0x3e8879(0x180),{'templatePath':_0x3f0b34,'targetPath':_0x35fddd,'pageName':_0x4b11b2,'templateName':_0xbddc3});await a134_0xfa34ad[_0x3e8879(0x173)][_0x3e8879(0x17d)](_0x35fddd,{'recursive':!![]}),await this['processDirectory'](_0x3f0b34,_0x35fddd,_0x4b11b2,_0xbddc3);if(_0x2ea13f){const _0x4d517f=Date['now']()-_0x21e3d1;logger[_0x3e8879(0x1a1)](_0x3e8879(0x18f),_0x3e8879(0x184),_0x4d517f,{'pageName':_0x4b11b2,'templateName':_0xbddc3});}}catch(_0xf22747){if(_0x2ea13f){const _0x25d4dc=Date[_0x3e8879(0x178)]()-_0x21e3d1;logger[_0x3e8879(0x1a8)](_0x3e8879(0x18f),'模板内容替换失败',{'templatePath':_0x3f0b34,'targetPath':_0x35fddd,'pageName':_0x4b11b2,'templateName':_0xbddc3,'error':_0xf22747 instanceof Error?_0xf22747[_0x3e8879(0x181)]:String(_0xf22747),'duration':_0x25d4dc});}throw _0xf22747;}}static async[a134_0x35ed66(0x188)](_0x82b3d,_0x3d6fd9,_0x3d9fbc,_0x2b395b){const _0x1be4f6=a134_0x35ed66,_0x3333b1=await a134_0xfa34ad[_0x1be4f6(0x173)][_0x1be4f6(0x171)](_0x82b3d,{'withFileTypes':!![]});for(const _0xcd2057 of _0x3333b1){const _0x4ea76e=a134_0x4b9670[_0x1be4f6(0x19f)](_0x82b3d,_0xcd2057[_0x1be4f6(0x176)]);let _0x17b801=a134_0x4b9670[_0x1be4f6(0x19f)](_0x3d6fd9,_0xcd2057[_0x1be4f6(0x176)]);_0xcd2057[_0x1be4f6(0x176)][_0x1be4f6(0x16c)]('.tpl')&&(_0x17b801=a134_0x4b9670[_0x1be4f6(0x19f)](_0x3d6fd9,_0xcd2057[_0x1be4f6(0x176)][_0x1be4f6(0x1a7)](/\.tpl$/,'')));if(_0xcd2057['isDirectory']())await a134_0xfa34ad[_0x1be4f6(0x173)][_0x1be4f6(0x17d)](_0x17b801,{'recursive':!![]}),await this[_0x1be4f6(0x188)](_0x4ea76e,_0x17b801,_0x3d9fbc,_0x2b395b);else _0xcd2057[_0x1be4f6(0x18c)]()&&await this[_0x1be4f6(0x177)](_0x4ea76e,_0x17b801,_0x3d9fbc,_0x2b395b);}}static async[a134_0x35ed66(0x177)](_0x325cdf,_0x4c78fa,_0x156d07,_0x8a385d){const _0x1f615d=a134_0x35ed66,_0x42540f=a134_0x4b9670['extname'](_0x325cdf)[_0x1f615d(0x197)]();_0x325cdf['endsWith']('.tpl')&&(_0x4c78fa=_0x4c78fa[_0x1f615d(0x1a7)](/\.tpl$/,''));const _0x1e1202=[_0x1f615d(0x198),'.ts',_0x1f615d(0x16f),_0x1f615d(0x19b),_0x1f615d(0x1ad),_0x1f615d(0x194),_0x1f615d(0x182),_0x1f615d(0x192),_0x1f615d(0x195)];if(_0x1e1202[_0x1f615d(0x191)](_0x42540f)||_0x325cdf[_0x1f615d(0x16c)](_0x1f615d(0x195))){const _0x3cc683=await a134_0xfa34ad[_0x1f615d(0x173)][_0x1f615d(0x179)](_0x325cdf,'utf8'),_0x5582be=this[_0x1f615d(0x199)](_0x3cc683,_0x156d07,_0x8a385d);await a134_0xfa34ad['promises'][_0x1f615d(0x1ae)](_0x4c78fa,_0x5582be,_0x1f615d(0x170));}else await a134_0xfa34ad['promises'][_0x1f615d(0x186)](_0x325cdf,_0x4c78fa);}}
1
+ const a136_0x305ad1=a136_0xb29a;(function(_0x343bee,_0x233be8){const _0x3c485c=a136_0xb29a,_0x1eae49=_0x343bee();while(!![]){try{const _0x47659d=parseInt(_0x3c485c(0x209))/0x1*(parseInt(_0x3c485c(0x1ed))/0x2)+parseInt(_0x3c485c(0x1e7))/0x3+-parseInt(_0x3c485c(0x1f7))/0x4+-parseInt(_0x3c485c(0x222))/0x5*(-parseInt(_0x3c485c(0x1ea))/0x6)+parseInt(_0x3c485c(0x217))/0x7+-parseInt(_0x3c485c(0x1fd))/0x8+parseInt(_0x3c485c(0x227))/0x9*(parseInt(_0x3c485c(0x200))/0xa);if(_0x47659d===_0x233be8)break;else _0x1eae49['push'](_0x1eae49['shift']());}catch(_0x11ef89){_0x1eae49['push'](_0x1eae49['shift']());}}}(a136_0x5313,0x8b528));function a136_0xb29a(_0x199367,_0x5632fb){_0x199367=_0x199367-0x1e6;const _0x531318=a136_0x5313();let _0xb29aa5=_0x531318[_0x199367];return _0xb29aa5;}import a136_0x27a27e from'node:fs';function a136_0x5313(){const _0x1b66e9=['toLocaleDateString','.js','push','6282lJMWjP','template','770346SjJluv','YourModel','now','6btHZdp','alias','开始处理模板内容替换','514tMusQL','processDirectory','replaceApiContent','.json','.scss','default','replace','toComponentName','toLocaleString','utf8','3857396MNmLVa','processTemplate','isFile','info','toUpperCase','datasetCode','888824aXUtyT','slice','endsWith','1740BUrEMb','split','writeFile','name','charAt','.css','promises','tableName','\x0a\x20\x20\x20\x20{\x20','3329LUdkWU','模板内容替换失败','includes','processFile','replaceContent','.jsx','toISOString','map','.tpl','mkdir','alias:\x20\x22','2-digit','.md','pop','1588307DQEKPs','join','numeric','error','LOVRABET','toLowerCase','readdir','datasetCode:\x20\x22','readFile','name:\x20\x22','toDisplayTitle','927140SDcBoA','tableName:\x20\x22'];a136_0x5313=function(){return _0x1b66e9;};return a136_0x5313();}import a136_0x82e33c from'node:path';import{logger}from'./logger.js';import{getCliVersion}from'./version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a136_0x305ad1(0x1f4)](_0x3ce191){const _0x3faa3=a136_0x305ad1,_0x24daff=_0x3ce191[_0x3faa3(0x201)]('/')[_0x3faa3(0x216)]()||_0x3ce191;return _0x24daff['split']('-')[_0x3faa3(0x210)](_0x489fe8=>_0x489fe8[_0x3faa3(0x204)](0x0)['toUpperCase']()+_0x489fe8[_0x3faa3(0x1fe)](0x1)['toLowerCase']())[_0x3faa3(0x218)]('');}static[a136_0x305ad1(0x221)](_0x1eb8c9){const _0x20b605=a136_0x305ad1,_0x4bb9aa=_0x1eb8c9[_0x20b605(0x201)]('/')[_0x20b605(0x216)]()||_0x1eb8c9;return _0x4bb9aa[_0x20b605(0x201)]('-')[_0x20b605(0x210)](_0x37983d=>_0x37983d[_0x20b605(0x204)](0x0)[_0x20b605(0x1fb)]()+_0x37983d['slice'](0x1)[_0x20b605(0x21c)]())[_0x20b605(0x218)]('\x20');}static[a136_0x305ad1(0x20d)](_0x560810,_0x158a0c,_0x23cec2){const _0x3c7c1a=a136_0x305ad1,_0x111310=this[_0x3c7c1a(0x1f4)](_0x158a0c),_0x5a5af8=this[_0x3c7c1a(0x221)](_0x158a0c),_0x28b826=new Date(),_0x34922f=_0x28b826[_0x3c7c1a(0x1f5)](undefined,{'year':_0x3c7c1a(0x219),'month':'2-digit','day':_0x3c7c1a(0x214),'hour':_0x3c7c1a(0x214),'minute':'2-digit','second':'2-digit','hour12':![]})[_0x3c7c1a(0x1f3)](/\//g,'-'),_0x32017a=_0x28b826[_0x3c7c1a(0x224)](undefined,{'year':'numeric','month':_0x3c7c1a(0x214),'day':_0x3c7c1a(0x214)})[_0x3c7c1a(0x1f3)](/\//g,'-'),_0x1e662b=_0x28b826['toLocaleTimeString'](undefined,{'hour12':![]});let _0xca481b=_0x560810[_0x3c7c1a(0x1f3)](/\{CliVersion\}/g,CLI_VERSION)[_0x3c7c1a(0x1f3)](/\{ComponentName\}/g,_0x111310)[_0x3c7c1a(0x1f3)](/\{DisplayTitle\}/g,_0x5a5af8)[_0x3c7c1a(0x1f3)](/\{PageName\}/g,_0x158a0c)['replace'](/\{TemplateName\}/g,_0x23cec2)[_0x3c7c1a(0x1f3)](/\{CreatedAt\}/g,_0x34922f)[_0x3c7c1a(0x1f3)](/\{CreatedDate\}/g,_0x32017a)[_0x3c7c1a(0x1f3)](/\{CreatedTime\}/g,_0x1e662b);return _0xca481b;}static[a136_0x305ad1(0x1ef)](_0x2ed6e4,_0x5321c3,_0x2b4a13,_0x5ba0eb,_0x3afb71,_0x46ffaf,_0x3dda74,_0x2cd4f1){const _0x5e1e4c=a136_0x305ad1,_0x51f939=new Date(),_0xce4a09=_0x51f939[_0x5e1e4c(0x20f)](),_0x40f8c6=_0x2b4a13[_0x5e1e4c(0x210)](_0x3e7b68=>{const _0x33cec1=_0x5e1e4c,_0x2a9b4b=[_0x33cec1(0x21e)+_0x3e7b68[_0x33cec1(0x1fc)]+'\x22',_0x33cec1(0x223)+_0x3e7b68[_0x33cec1(0x207)]+'\x22',_0x33cec1(0x220)+_0x3e7b68[_0x33cec1(0x203)]+'\x22'];return _0x3e7b68[_0x33cec1(0x1eb)]&&_0x2a9b4b[_0x33cec1(0x226)](_0x33cec1(0x213)+_0x3e7b68[_0x33cec1(0x1eb)]+'\x22'),_0x33cec1(0x208)+_0x2a9b4b[_0x33cec1(0x218)](',\x20')+'\x20},';})[_0x5e1e4c(0x218)](''),_0x851eb0=_0x5ba0eb||_0x2b4a13[0x0]?.[_0x5e1e4c(0x1eb)]||_0x5e1e4c(0x1e8);let _0x188b0a=_0x2ed6e4[_0x5e1e4c(0x1f3)](/\{AppCode\}/g,_0x5321c3)['replace'](/\{ModelConfigs\}/g,_0x40f8c6)[_0x5e1e4c(0x1f3)](/\{ExampleModelName\}/g,_0x851eb0)[_0x5e1e4c(0x1f3)](/\{ApiFileName\}/g,_0x3afb71||'api')['replace'](/\{ConfigName\}/g,_0x46ffaf||_0x5e1e4c(0x1f2))[_0x5e1e4c(0x1f3)](/\{ClientConfigParam\}/g,_0x3dda74||'')[_0x5e1e4c(0x1f3)](/\{VarPrefix\}/g,_0x2cd4f1||_0x5e1e4c(0x21b))['replace'](/\{CreatedAt\}/g,_0xce4a09);return _0x188b0a;}static async[a136_0x305ad1(0x1f8)](_0x1fade7,_0x534104,_0x1a6f6a,_0x1d4a6b,_0x5a86d8=!![]){const _0x2578de=a136_0x305ad1,_0x528b93=Date[_0x2578de(0x1e9)]();try{_0x5a86d8&&logger[_0x2578de(0x1fa)](_0x2578de(0x1e6),_0x2578de(0x1ec),{'templatePath':_0x1fade7,'targetPath':_0x534104,'pageName':_0x1a6f6a,'templateName':_0x1d4a6b});await a136_0x27a27e['promises'][_0x2578de(0x212)](_0x534104,{'recursive':!![]}),await this[_0x2578de(0x1ee)](_0x1fade7,_0x534104,_0x1a6f6a,_0x1d4a6b);if(_0x5a86d8){const _0x2f7daf=Date[_0x2578de(0x1e9)]()-_0x528b93;logger['success'](_0x2578de(0x1e6),'模板内容替换完成',_0x2f7daf,{'pageName':_0x1a6f6a,'templateName':_0x1d4a6b});}}catch(_0x122cd7){if(_0x5a86d8){const _0x123553=Date[_0x2578de(0x1e9)]()-_0x528b93;logger[_0x2578de(0x21a)](_0x2578de(0x1e6),_0x2578de(0x20a),{'templatePath':_0x1fade7,'targetPath':_0x534104,'pageName':_0x1a6f6a,'templateName':_0x1d4a6b,'error':_0x122cd7 instanceof Error?_0x122cd7['message']:String(_0x122cd7),'duration':_0x123553});}throw _0x122cd7;}}static async[a136_0x305ad1(0x1ee)](_0x2a4579,_0x2e5337,_0x1b323c,_0x4499fb){const _0x4c94b2=a136_0x305ad1,_0x114aa1=await a136_0x27a27e[_0x4c94b2(0x206)][_0x4c94b2(0x21d)](_0x2a4579,{'withFileTypes':!![]});for(const _0x4edcc1 of _0x114aa1){const _0x17113b=a136_0x82e33c[_0x4c94b2(0x218)](_0x2a4579,_0x4edcc1[_0x4c94b2(0x203)]);let _0x50d6b9=a136_0x82e33c[_0x4c94b2(0x218)](_0x2e5337,_0x4edcc1[_0x4c94b2(0x203)]);_0x4edcc1[_0x4c94b2(0x203)]['endsWith'](_0x4c94b2(0x211))&&(_0x50d6b9=a136_0x82e33c[_0x4c94b2(0x218)](_0x2e5337,_0x4edcc1[_0x4c94b2(0x203)][_0x4c94b2(0x1f3)](/\.tpl$/,'')));if(_0x4edcc1['isDirectory']())await a136_0x27a27e['promises'][_0x4c94b2(0x212)](_0x50d6b9,{'recursive':!![]}),await this[_0x4c94b2(0x1ee)](_0x17113b,_0x50d6b9,_0x1b323c,_0x4499fb);else _0x4edcc1[_0x4c94b2(0x1f9)]()&&await this[_0x4c94b2(0x20c)](_0x17113b,_0x50d6b9,_0x1b323c,_0x4499fb);}}static async[a136_0x305ad1(0x20c)](_0x5b4853,_0x28fc06,_0x2d5ad8,_0xe8533f){const _0x3bb1f5=a136_0x305ad1,_0x385ca8=a136_0x82e33c['extname'](_0x5b4853)[_0x3bb1f5(0x21c)]();_0x5b4853[_0x3bb1f5(0x1ff)]('.tpl')&&(_0x28fc06=_0x28fc06[_0x3bb1f5(0x1f3)](/\.tpl$/,''));const _0x59bf81=['.tsx','.ts',_0x3bb1f5(0x20e),_0x3bb1f5(0x225),_0x3bb1f5(0x1f0),_0x3bb1f5(0x215),_0x3bb1f5(0x205),_0x3bb1f5(0x1f1),_0x3bb1f5(0x211)];if(_0x59bf81[_0x3bb1f5(0x20b)](_0x385ca8)||_0x5b4853[_0x3bb1f5(0x1ff)](_0x3bb1f5(0x211))){const _0x5cea28=await a136_0x27a27e[_0x3bb1f5(0x206)][_0x3bb1f5(0x21f)](_0x5b4853,_0x3bb1f5(0x1f6)),_0x4fab74=this[_0x3bb1f5(0x20d)](_0x5cea28,_0x2d5ad8,_0xe8533f);await a136_0x27a27e[_0x3bb1f5(0x206)][_0x3bb1f5(0x202)](_0x28fc06,_0x4fab74,_0x3bb1f5(0x1f6));}else await a136_0x27a27e[_0x3bb1f5(0x206)]['copyFile'](_0x5b4853,_0x28fc06);}}
@@ -1 +1 @@
1
- function a135_0x5082(_0x25e265,_0x4fb69e){_0x25e265=_0x25e265-0xc5;var _0x42bd91=a135_0x42bd();var _0x50822c=_0x42bd91[_0x25e265];return _0x50822c;}(function(_0x416215,_0x26a32d){var _0x1519f5=a135_0x5082,_0x8d8a06=_0x416215();while(!![]){try{var _0x19e16b=parseInt(_0x1519f5(0xc7))/0x1+-parseInt(_0x1519f5(0xc8))/0x2*(parseInt(_0x1519f5(0xca))/0x3)+parseInt(_0x1519f5(0xcc))/0x4*(-parseInt(_0x1519f5(0xcf))/0x5)+-parseInt(_0x1519f5(0xce))/0x6+-parseInt(_0x1519f5(0xc9))/0x7*(parseInt(_0x1519f5(0xc5))/0x8)+parseInt(_0x1519f5(0xcb))/0x9*(parseInt(_0x1519f5(0xcd))/0xa)+parseInt(_0x1519f5(0xc6))/0xb;if(_0x19e16b===_0x26a32d)break;else _0x8d8a06['push'](_0x8d8a06['shift']());}catch(_0x85bc6){_0x8d8a06['push'](_0x8d8a06['shift']());}}}(a135_0x42bd,0x7a119));function a135_0x42bd(){var _0x4d7ddd=['11981wuVgpe','14BUWDER','25928WyDpoO','312789MhzVCi','821025IzirGg','12ijfmxc','10bCuPEI','3568092hbrTiY','1284345uavXDu','1560gTWwBC','35356167DhQIdp'];a135_0x42bd=function(){return _0x4d7ddd;};return a135_0x42bd();}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
1
+ function a137_0x59e1(){var _0x25269a=['781856WtQvNb','126yKawDl','6TkKspw','10JTMoyF','8VlyvMo','431832xVSCaJ','4736268CJCCHC','480193PjwNMU','158035LAtRIC','322348kScqLu','4862044ZngPMj'];a137_0x59e1=function(){return _0x25269a;};return a137_0x59e1();}(function(_0x4842a1,_0x1b0f86){var _0x51a664=a137_0x3e63,_0x157133=_0x4842a1();while(!![]){try{var _0x324e99=parseInt(_0x51a664(0x1ca))/0x1+parseInt(_0x51a664(0x1c4))/0x2*(parseInt(_0x51a664(0x1c1))/0x3)+-parseInt(_0x51a664(0x1c8))/0x4+parseInt(_0x51a664(0x1c7))/0x5*(-parseInt(_0x51a664(0x1c0))/0x6)+-parseInt(_0x51a664(0x1c6))/0x7*(parseInt(_0x51a664(0x1c3))/0x8)+parseInt(_0x51a664(0x1c5))/0x9+parseInt(_0x51a664(0x1c2))/0xa*(-parseInt(_0x51a664(0x1c9))/0xb);if(_0x324e99===_0x1b0f86)break;else _0x157133['push'](_0x157133['shift']());}catch(_0x388639){_0x157133['push'](_0x157133['shift']());}}}(a137_0x59e1,0x7668b));function a137_0x3e63(_0x29061b,_0x51be4c){_0x29061b=_0x29061b-0x1c0;var _0x59e1f1=a137_0x59e1();var _0x3e637e=_0x59e1f1[_0x29061b];return _0x3e637e;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
@@ -1 +1 @@
1
- (function(_0x6efd7d,_0x45aace){var _0xb1c40a=a136_0x1153,_0x3bf02f=_0x6efd7d();while(!![]){try{var _0x458bde=parseInt(_0xb1c40a(0x14f))/0x1+-parseInt(_0xb1c40a(0x156))/0x2*(parseInt(_0xb1c40a(0x152))/0x3)+-parseInt(_0xb1c40a(0x157))/0x4*(-parseInt(_0xb1c40a(0x158))/0x5)+-parseInt(_0xb1c40a(0x154))/0x6*(-parseInt(_0xb1c40a(0x151))/0x7)+-parseInt(_0xb1c40a(0x150))/0x8+parseInt(_0xb1c40a(0x159))/0x9*(-parseInt(_0xb1c40a(0x155))/0xa)+parseInt(_0xb1c40a(0x153))/0xb;if(_0x458bde===_0x45aace)break;else _0x3bf02f['push'](_0x3bf02f['shift']());}catch(_0x18fdeb){_0x3bf02f['push'](_0x3bf02f['shift']());}}}(a136_0x4b93,0xc343f));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a136_0x4b93(){var _0x337155=['12742994VNJMpM','516198rzLIIO','391680QEryhY','12BCrBSB','29904ygqjkp','450vRiOiL','18enFJIS','243650YnJShK','9249632AOKZru','49crKguP','321414CuVSMb'];a136_0x4b93=function(){return _0x337155;};return a136_0x4b93();}function a136_0x1153(_0x22d2a9,_0x5448f0){_0x22d2a9=_0x22d2a9-0x14f;var _0x4b93f9=a136_0x4b93();var _0x115324=_0x4b93f9[_0x22d2a9];return _0x115324;}export async function withActiveCookie(_0x3e6c7a,_0x1c28bb){setActiveCookie(_0x3e6c7a);try{return await _0x1c28bb();}finally{clearActiveCookie();}}
1
+ function a138_0x3a3e(_0x500c0f,_0x2342c1){_0x500c0f=_0x500c0f-0xa0;var _0x4c19c2=a138_0x4c19();var _0x3a3e0=_0x4c19c2[_0x500c0f];return _0x3a3e0;}(function(_0x123572,_0x458ad5){var _0x4a945a=a138_0x3a3e,_0x2c0016=_0x123572();while(!![]){try{var _0x426199=-parseInt(_0x4a945a(0xa4))/0x1*(parseInt(_0x4a945a(0xa6))/0x2)+parseInt(_0x4a945a(0xa9))/0x3*(-parseInt(_0x4a945a(0xa2))/0x4)+parseInt(_0x4a945a(0xab))/0x5*(parseInt(_0x4a945a(0xa7))/0x6)+parseInt(_0x4a945a(0xa0))/0x7+parseInt(_0x4a945a(0xaa))/0x8+-parseInt(_0x4a945a(0xa1))/0x9*(-parseInt(_0x4a945a(0xa8))/0xa)+parseInt(_0x4a945a(0xa5))/0xb*(-parseInt(_0x4a945a(0xa3))/0xc);if(_0x426199===_0x458ad5)break;else _0x2c0016['push'](_0x2c0016['shift']());}catch(_0x251a92){_0x2c0016['push'](_0x2c0016['shift']());}}}(a138_0x4c19,0xca99f));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x3bf54f,_0x1158d5){setActiveCookie(_0x3bf54f);try{return await _0x1158d5();}finally{clearActiveCookie();}}function a138_0x4c19(){var _0xf86ff4=['249846tYUajd','2810dRAuEA','3sYymVJ','7052760cYWKdK','95vDdTTq','10370108GdLJYA','18243RTUIyo','4360860XIMfVK','6133476LUMDEa','1CyCGCd','22xaSduD','1562978GKwpKE'];a138_0x4c19=function(){return _0xf86ff4;};return a138_0x4c19();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,6 +30,7 @@
30
30
  "test:ui": "vitest --ui",
31
31
  "test:watch": "vitest --watch",
32
32
  "test:unit": "vitest run test/unit",
33
+ "test:app": "vitest run test/unit/commands/app-shared.test.ts test/unit/commands/app-add.test.ts test/unit/commands/app-remove.test.ts test/unit/commands/app-use.test.ts test/unit/commands/app-list.test.ts test/unit/commands/app-remote.test.ts",
33
34
  "test:integration": "vitest run test/integration",
34
35
  "test:e2e": "vitest run test/e2e",
35
36
  "test:e2e:daily": "RABETBASE_E2E_DAILY=1 vitest run test/e2e/daily-app-smoke.test.ts",
@@ -57,6 +58,7 @@
57
58
  "execa": "^9.6.0",
58
59
  "listr": "^0.14.3",
59
60
  "meow": "^13.2.0",
61
+ "node-jq": "^6.3.1",
60
62
  "ora": "^9.3.0",
61
63
  "prettier": "^3.6.2",
62
64
  "semver": "^7.7.3",
@@ -73,4 +75,4 @@
73
75
  "typescript": "latest",
74
76
  "vitest": "^3.2.4"
75
77
  }
76
- }
78
+ }
@@ -1 +0,0 @@
1
- function a33_0x65ca(_0x257354,_0x4aaf62){_0x257354=_0x257354-0x1a8;const _0x21a07b=a33_0x21a0();let _0x65ca8a=_0x21a07b[_0x257354];return _0x65ca8a;}const a33_0x547156=a33_0x65ca;(function(_0x1e3c54,_0xbbf850){const _0xaa7b05=a33_0x65ca,_0xfc3871=_0x1e3c54();while(!![]){try{const _0x540680=-parseInt(_0xaa7b05(0x1af))/0x1*(parseInt(_0xaa7b05(0x1a8))/0x2)+parseInt(_0xaa7b05(0x1ac))/0x3*(parseInt(_0xaa7b05(0x1bf))/0x4)+-parseInt(_0xaa7b05(0x1bc))/0x5*(-parseInt(_0xaa7b05(0x1ab))/0x6)+-parseInt(_0xaa7b05(0x1ba))/0x7+parseInt(_0xaa7b05(0x1b8))/0x8*(parseInt(_0xaa7b05(0x1bb))/0x9)+parseInt(_0xaa7b05(0x1ae))/0xa+-parseInt(_0xaa7b05(0x1bd))/0xb;if(_0x540680===_0xbbf850)break;else _0xfc3871['push'](_0xfc3871['shift']());}catch(_0x4471b0){_0xfc3871['push'](_0xfc3871['shift']());}}}(a33_0x21a0,0xcadb1));function a33_0x21a0(){const _0x260ace=['84FcngPY','项目构建成功','8340300fgBOls','241UqBZFT','logger','cwd','stderr','node_modules','npm\x20run\x20build','error','now','info','504ylOAKd','.bin','4611908KllUCC','145188kfKcWu','630335VIPLue','10489017MNkSGp','开始构建项目','135588FyZgSw','toString','trim','Build\x20project','message','build','inherit','close','run','4002lrNhwY','npm','npm\x20run\x20build\x20exited\x20with\x20code\x20','6KeZlNX'];a33_0x21a0=function(){return _0x260ace;};return a33_0x21a0();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runBuild(_0x4dcaed){return new Promise((_0x5d2dd5,_0x4c04f4)=>{const _0xf9937e=a33_0x65ca,_0x424f19=Date[_0xf9937e(0x1b6)]();_0x4dcaed['logger'][_0xf9937e(0x1b7)](_0xf9937e(0x1c4),_0xf9937e(0x1be),{'command':_0xf9937e(0x1b4)});let _0x479507='';const _0x86a9c7=spawn(_0xf9937e(0x1a9),[_0xf9937e(0x1c7),_0xf9937e(0x1c4)],{'stdio':[_0xf9937e(0x1c5),_0xf9937e(0x1c5),'pipe'],'shell':!![],'env':{...process.env,'PATH':''+join(process[_0xf9937e(0x1b1)](),_0xf9937e(0x1b3),_0xf9937e(0x1b9))+delimiter+process.env.PATH}});_0x86a9c7[_0xf9937e(0x1b2)]?.['on']('data',_0x21a148=>{const _0x384983=_0xf9937e;_0x479507+=_0x21a148[_0x384983(0x1c0)]();}),_0x86a9c7['on'](_0xf9937e(0x1c6),_0x3ca3ea=>{const _0x4558f9=_0xf9937e,_0x484bb7=Date['now']()-_0x424f19;if(_0x3ca3ea===0x0||_0x3ca3ea===null)_0x4dcaed[_0x4558f9(0x1b0)]['success'](_0x4558f9(0x1c4),_0x4558f9(0x1ad),_0x484bb7),_0x5d2dd5();else{const _0x496629={'exitCode':_0x3ca3ea,'duration':_0x484bb7,'command':'npm\x20run\x20build','cwd':process[_0x4558f9(0x1b1)]()};_0x479507[_0x4558f9(0x1c1)]()&&(_0x496629[_0x4558f9(0x1b2)]=_0x479507[_0x4558f9(0x1c1)]()),_0x4dcaed[_0x4558f9(0x1b0)][_0x4558f9(0x1b5)]('build','项目构建失败',_0x496629),_0x4c04f4(new Error(_0x4558f9(0x1aa)+_0x3ca3ea));}}),_0x86a9c7['on'](_0xf9937e(0x1b5),_0x1aea3a=>{const _0x33127f=_0xf9937e,_0x3edd11=Date[_0x33127f(0x1b6)]()-_0x424f19;_0x4dcaed[_0x33127f(0x1b0)][_0x33127f(0x1b5)](_0x33127f(0x1c4),'项目构建出错',{'error':_0x1aea3a[_0x33127f(0x1c3)],'duration':_0x3edd11,'stderr':_0x479507[_0x33127f(0x1c1)]()||undefined}),_0x4c04f4(_0x1aea3a);});});}export const buildCommand={'name':a33_0x547156(0x1c4),'description':a33_0x547156(0x1c2),async 'run'(_0x1ddaa9,_0x58cfa5,_0xfda4eb){await runBuild(_0x1ddaa9);}};
@@ -1 +0,0 @@
1
- const a67_0x36576f=a67_0x522f;(function(_0x33988a,_0x4cc689){const _0x27e379=a67_0x522f,_0x4aed2e=_0x33988a();while(!![]){try{const _0x1b9c9a=parseInt(_0x27e379(0xb0))/0x1+-parseInt(_0x27e379(0xb5))/0x2*(parseInt(_0x27e379(0xaf))/0x3)+-parseInt(_0x27e379(0xad))/0x4+parseInt(_0x27e379(0xc5))/0x5+-parseInt(_0x27e379(0xb7))/0x6*(-parseInt(_0x27e379(0xac))/0x7)+-parseInt(_0x27e379(0xba))/0x8+parseInt(_0x27e379(0xc4))/0x9*(parseInt(_0x27e379(0xa6))/0xa);if(_0x1b9c9a===_0x4cc689)break;else _0x4aed2e['push'](_0x4aed2e['shift']());}catch(_0x1a3633){_0x4aed2e['push'](_0x4aed2e['shift']());}}}(a67_0x48f9,0xd71da));import{delimiter,join}from'node:path';function a67_0x522f(_0x5bee15,_0x5af10e){_0x5bee15=_0x5bee15-0xa3;const _0x48f927=a67_0x48f9();let _0x522fa1=_0x48f927[_0x5bee15];return _0x522fa1;}function a67_0x48f9(){const _0x4ce4df=['inherit','vite\x20preview\x20exited\x20with\x20code\x20','watch','vite','执行预览命令','trim','预览服务器启动成功','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','979812NczbIq','2734195EfiSIn','stderr','toString','预览服务器启动失败','message','\x20(监听模式)','--watch','close','160yzWwhw','info','success','all','cwd','preview','14147XacxNA','350548lKCsAE','error','1500EKoeRf','1136847Fkbmmh','build','logger','.bin','data','3992RsYeVk','预览服务器启动出错','84OHOCIX','now','vite\x20preview','11896936BpRgPg','node_modules'];a67_0x48f9=function(){return _0x4ce4df;};return a67_0x48f9();}import{spawn}from'node:child_process';function runPreview(_0x509d2e){return new Promise((_0x312b08,_0x1de08e)=>{const _0x2d704d=a67_0x522f,_0x3efc3b=Date[_0x2d704d(0xb8)]();_0x509d2e[_0x2d704d(0xb2)][_0x2d704d(0xa7)](_0x2d704d(0xab),'启动预览服务器',{'command':'vite\x20preview'});let _0x160ea3='';const _0x30569c=spawn(_0x2d704d(0xbf),[_0x2d704d(0xab)],{'stdio':[_0x2d704d(0xbc),'inherit','pipe'],'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x2d704d(0xaa)](),_0x2d704d(0xbb),_0x2d704d(0xb3))+delimiter+process.env.PATH}});_0x30569c['stderr']?.['on'](_0x2d704d(0xb4),_0x5eb003=>{const _0x20b342=_0x2d704d;_0x160ea3+=_0x5eb003[_0x20b342(0xc7)]();}),_0x30569c['on'](_0x2d704d(0xa5),_0x46c13a=>{const _0x1d4b4e=_0x2d704d,_0x245379=Date[_0x1d4b4e(0xb8)]()-_0x3efc3b;if(_0x46c13a===0x0||_0x46c13a===null)_0x509d2e['logger'][_0x1d4b4e(0xa8)](_0x1d4b4e(0xab),_0x1d4b4e(0xc2),_0x245379),_0x312b08();else{const _0x4f1c61={'exitCode':_0x46c13a,'duration':_0x245379,'command':_0x1d4b4e(0xb9),'cwd':process[_0x1d4b4e(0xaa)]()};_0x160ea3[_0x1d4b4e(0xc1)]()&&(_0x4f1c61[_0x1d4b4e(0xc6)]=_0x160ea3[_0x1d4b4e(0xc1)]()),_0x509d2e[_0x1d4b4e(0xb2)][_0x1d4b4e(0xae)]('preview',_0x1d4b4e(0xc8),_0x4f1c61),_0x1de08e(new Error(_0x1d4b4e(0xbd)+_0x46c13a));}}),_0x30569c['on'](_0x2d704d(0xae),_0x158ee3=>{const _0x1bb63f=_0x2d704d,_0x302973=Date[_0x1bb63f(0xb8)]()-_0x3efc3b;_0x509d2e[_0x1bb63f(0xb2)][_0x1bb63f(0xae)]('preview',_0x1bb63f(0xb6),{'error':_0x158ee3[_0x1bb63f(0xc9)],'duration':_0x302973,'stderr':_0x160ea3[_0x1bb63f(0xc1)]()||undefined}),_0x1de08e(_0x158ee3);});});}function runBuildWatch(){return new Promise((_0x1993fe,_0xf49607)=>{const _0x3d70bb=a67_0x522f,_0x5caf11=spawn(_0x3d70bb(0xbf),[_0x3d70bb(0xb1),_0x3d70bb(0xa4)],{'stdio':_0x3d70bb(0xbc),'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x3d70bb(0xaa)](),_0x3d70bb(0xbb),'.bin')+delimiter+process.env.PATH}});_0x5caf11['on'](_0x3d70bb(0xa5),_0x26785c=>{const _0x5d3add=_0x3d70bb;if(_0x26785c===0x0||_0x26785c===null)_0x1993fe();else _0xf49607(new Error(_0x5d3add(0xc3)+_0x26785c));}),_0x5caf11['on']('error',_0xf49607);});}export const previewCommand={'name':a67_0x36576f(0xab),'description':'Preview\x20project',async 'run'(_0x3a4bfc,_0x52951e,_0x435ebe){const _0x514218=a67_0x36576f,_0x2cfe3d=_0x435ebe[_0x514218(0xbe)];_0x3a4bfc['logger'][_0x514218(0xa7)]('preview',_0x514218(0xc0)+(_0x2cfe3d?_0x514218(0xa3):'')),_0x2cfe3d?await Promise[_0x514218(0xa9)]([runBuildWatch(),runPreview(_0x3a4bfc)]):await runPreview(_0x3a4bfc);}};
@@ -1 +0,0 @@
1
- (function(_0x220217,_0x156954){const _0x38c2fa=a69_0x25aa,_0x5665de=_0x220217();while(!![]){try{const _0x37a706=-parseInt(_0x38c2fa(0x13f))/0x1+parseInt(_0x38c2fa(0x134))/0x2*(-parseInt(_0x38c2fa(0x16e))/0x3)+-parseInt(_0x38c2fa(0x12e))/0x4+-parseInt(_0x38c2fa(0x145))/0x5+-parseInt(_0x38c2fa(0x160))/0x6+parseInt(_0x38c2fa(0x111))/0x7*(parseInt(_0x38c2fa(0x13b))/0x8)+parseInt(_0x38c2fa(0x11c))/0x9*(parseInt(_0x38c2fa(0x153))/0xa);if(_0x37a706===_0x156954)break;else _0x5665de['push'](_0x5665de['shift']());}catch(_0x264456){_0x5665de['push'](_0x5665de['shift']());}}}(a69_0x347c,0xcb3c4));import a69_0x5c2f83 from'chalk';function a69_0x25aa(_0x1d8d7c,_0xa5c4b){_0x1d8d7c=_0x1d8d7c-0x10a;const _0x347c49=a69_0x347c();let _0x25aacb=_0x347c49[_0x1d8d7c];return _0x25aacb;}import a69_0x398037 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';function a69_0x347c(){const _0x399f77=['899360JYuHFn','inherit','lovrabet/rabetbase\x20installed\x20globally','\x20removed\x20(','@lovrabet/dataset-mcp-server','no\x20legacy\x20config\x20found','error','info','push','cwd','isArray','Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20','keys','Step\x201/6:\x20Config\x20migration\x20—\x20','280wzsdzQ','detail','label','yellow','no\x20legacy\x20entry','Remove\x20.lovrabet/','FOUND','needed','failed','Upgrade\x20completed\x20successfully!','CANCEL','status','oldPath','1626522oOfxJE','.cursor/mcp.json','.claude/skills/lovrabet','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','utf8','skipped\x20(no\x20legacy\x20config)','cyan','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','.lovrabet','Install\x20new\x20skill','includes','filter','green','log','3VgMmdY','.cursor/rules/lovrabet_rules.mdc','bold','skipped','oldArtifacts','Step\x204/6:\x20MCP\x20config\x20—\x20','Config\x20migration','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','fields','join','\x20\x20Fields\x20to\x20migrate:\x20','yes','Clean\x20MCP\x20config','configMigration','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','Legacy\x20artifacts:','Step\x206/6:\x20Installing\x20new\x20skill...','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','35KygIAl','mcpServers','Step\x204/6:\x20Cleaning\x20MCP\x20config...','Step\x203/6:\x20Legacy\x20artifacts\x20—\x20','\x20from\x20','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','object','files','Step\x205/6:\x20Removing\x20old\x20skill...','start','Upgrade\x20cancelled.','911871BzNVSy','not\x20needed','Proceed\x20with\x20upgrade?','some','undefined','hasNewConfig','oldMcpConfig','\x20\x20Step\x20','exit\x20','Config\x20file:','entries','args','lovrabet/rabetbase','step','done','gray','\x20\x20New\x20config\x20(.rabetbase.json):\x20','message','148912ECiOsE','succeed','path','length','===\x20Upgrade\x20Summary\x20===','\x20→\x20keys:\x20','2736596zkKYhz','MCP\x20config:','string','removed\x20','no\x20matching\x20entry\x20found','\x20removed','red','618456LAEAXS','isDirectory','===\x20Upgrade\x20Analysis\x20===','stringify','534530qdWWKb','Step\x201/6:\x20Migrating\x20config...','Remove\x20old\x20skill','fail','\x20(backup:\x20','values'];a69_0x347c=function(){return _0x399f77;};return a69_0x347c();}import{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../skills/npx-skills-add.js';import{askConfirm}from'./menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x115396=>_0x115396!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x2b85bd){const _0xa291b7=a69_0x25aa,_0x321b35=[];for(const _0x496fb1 of Object[_0xa291b7(0x144)](CORE_IDE_CONFIGS)){if(_0x496fb1[_0xa291b7(0x118)])for(const _0xa20ff5 of _0x496fb1[_0xa291b7(0x118)]){_0x321b35[_0xa291b7(0x14d)](resolve(_0x2b85bd,_0xa20ff5[_0xa291b7(0x130)]));}}return _0x321b35;}function analyse(_0x3aca8a){const _0x297df2=a69_0x25aa;let _0x271091=null;const _0x450a3b=resolve(_0x3aca8a,NEW_CONFIG_NAME),_0x265e88=existsSync(_0x450a3b);for(const _0x12ccb5 of LEGACY_CONFIG_NAMES){const _0x5c2646=resolve(_0x3aca8a,_0x12ccb5);if(existsSync(_0x5c2646)){const _0x18fb1d=readConfigFile(_0x5c2646),_0x56dfc2=Object[_0x297df2(0x151)](_0x18fb1d)[_0x297df2(0x16b)](_0x253599=>typeof _0x18fb1d[_0x253599]!==_0x297df2(0x120));_0x271091={'oldPath':_0x5c2646,'hasNewConfig':_0x265e88,'fields':_0x56dfc2};break;}}const _0xcca5da=[],_0x17f0ba=resolve(_0x3aca8a,_0x297df2(0x168));if(existsSync(_0x17f0ba))_0xcca5da[_0x297df2(0x14d)](_0x17f0ba);const _0x1282c4=resolve(_0x3aca8a,_0x297df2(0x16f));if(existsSync(_0x1282c4))_0xcca5da[_0x297df2(0x14d)](_0x1282c4);const _0x1acb00=resolve(_0x3aca8a,_0x297df2(0x162));if(existsSync(_0x1acb00))_0xcca5da['push'](_0x1acb00);for(const _0x11cc2c of collectIdeSkillFiles(_0x3aca8a)){if(existsSync(_0x11cc2c))_0xcca5da[_0x297df2(0x14d)](_0x11cc2c);}let _0x2fa2e1=null;const _0x285e78=resolve(_0x3aca8a,_0x297df2(0x161));if(existsSync(_0x285e78))try{const _0x5ac336=JSON['parse'](readFileSync(_0x285e78,_0x297df2(0x164)));if(_0x5ac336?.['mcpServers']&&typeof _0x5ac336['mcpServers']===_0x297df2(0x117)){const _0x142d92=[];for(const [_0xe37773,_0x3fcbc2]of Object[_0x297df2(0x126)](_0x5ac336[_0x297df2(0x112)])){const _0x2cb5f1=_0x3fcbc2;_0x2cb5f1?.[_0x297df2(0x127)]&&Array[_0x297df2(0x14f)](_0x2cb5f1['args'])&&_0x2cb5f1[_0x297df2(0x127)][_0x297df2(0x11f)](_0x1b99d8=>typeof _0x1b99d8===_0x297df2(0x136)&&_0x1b99d8['includes'](_0x297df2(0x149)))&&_0x142d92[_0x297df2(0x14d)](_0xe37773);}_0x142d92[_0x297df2(0x131)]>0x0&&(_0x2fa2e1={'path':_0x285e78,'keys':_0x142d92});}}catch{}const _0x3da1c4=_0xcca5da[_0x297df2(0x131)]>0x0||_0x271091!==null;return{'configMigration':_0x271091,'oldArtifacts':_0xcca5da,'oldMcpConfig':_0x2fa2e1,'needsSkillSwap':_0x3da1c4};}function printReport(_0x55bfce){const _0x525d15=a69_0x25aa,{configMigration:_0x51dd8f,oldArtifacts:_0x54502e,oldMcpConfig:_0x1705fb,needsSkillSwap:_0x1b7308}=_0x55bfce;console[_0x525d15(0x16d)](''),console[_0x525d15(0x16d)](a69_0x5c2f83[_0x525d15(0x170)](_0x525d15(0x13d))),console[_0x525d15(0x16d)]('');_0x51dd8f?(console['log'](a69_0x5c2f83[_0x525d15(0x166)]('Config\x20file:')+('\x20\x20'+a69_0x5c2f83[_0x525d15(0x156)](_0x51dd8f[_0x525d15(0x15f)]))),console[_0x525d15(0x16d)](_0x525d15(0x12c)+(_0x51dd8f['hasNewConfig']?a69_0x5c2f83[_0x525d15(0x16c)]('already\x20exists\x20(will\x20merge)'):a69_0x5c2f83['gray']('not\x20found\x20(will\x20create)'))),console[_0x525d15(0x16d)](_0x525d15(0x178)+_0x51dd8f[_0x525d15(0x176)]['join'](',\x20')),console[_0x525d15(0x16d)](_0x525d15(0x175))):console['log'](a69_0x5c2f83[_0x525d15(0x166)](_0x525d15(0x125))+'\x20\x20'+a69_0x5c2f83[_0x525d15(0x12b)](_0x525d15(0x14a)));console['log']('');if(_0x54502e['length']>0x0){console[_0x525d15(0x16d)](a69_0x5c2f83['cyan'](_0x525d15(0x10e)));for(const _0x1b0e81 of _0x54502e){console[_0x525d15(0x16d)]('\x20\x20'+a69_0x5c2f83['red'](_0x525d15(0x159))+'\x20\x20'+_0x1b0e81);}console['log']('\x20\x20Action:\x20delete');}else console[_0x525d15(0x16d)](a69_0x5c2f83[_0x525d15(0x166)](_0x525d15(0x10e))+'\x20\x20'+a69_0x5c2f83[_0x525d15(0x12b)]('none\x20found'));console[_0x525d15(0x16d)](''),_0x1705fb?(console['log'](a69_0x5c2f83[_0x525d15(0x166)](_0x525d15(0x135))+('\x20\x20'+a69_0x5c2f83['yellow'](_0x1705fb[_0x525d15(0x130)])+_0x525d15(0x133)+_0x1705fb[_0x525d15(0x151)][_0x525d15(0x177)](',\x20'))),console[_0x525d15(0x16d)]('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x525d15(0x16d)](a69_0x5c2f83[_0x525d15(0x166)](_0x525d15(0x135))+'\x20\x20'+a69_0x5c2f83[_0x525d15(0x12b)](_0x525d15(0x157))),console[_0x525d15(0x16d)](''),console['log'](a69_0x5c2f83['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x1b7308?a69_0x5c2f83[_0x525d15(0x156)](_0x525d15(0x15a)):a69_0x5c2f83[_0x525d15(0x16c)](_0x525d15(0x11d))))),_0x1b7308&&console[_0x525d15(0x16d)](_0x525d15(0x167)),console[_0x525d15(0x16d)]('');}function execConfigMigration(_0x848988,_0x53d6f8){const _0x2502f9=a69_0x25aa,{configMigration:_0x1d1618}=_0x848988;if(!_0x1d1618?.['oldPath'])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x2502f9(0x165)};const _0x598269=readConfigFile(_0x1d1618[_0x2502f9(0x15f)]),_0x11c907=resolve(_0x53d6f8,NEW_CONFIG_NAME),_0x3be9d8=_0x1d1618[_0x2502f9(0x121)]?readConfigFile(_0x11c907):{};for(const [_0x42ef80,_0x254905]of Object['entries'](_0x598269)){!(_0x42ef80 in _0x3be9d8)&&(_0x3be9d8[_0x42ef80]=_0x254905);}writeConfigFile(_0x11c907,_0x3be9d8);const _0x138486=_0x1d1618['oldPath']+'.bak';return renameSync(_0x1d1618['oldPath'],_0x138486),{'step':0x1,'label':_0x2502f9(0x174),'ok':!![],'detail':_0x1d1618[_0x2502f9(0x15f)]+'\x20→\x20'+_0x11c907+_0x2502f9(0x143)+_0x138486+')'};}function execRemoveOldArtifacts(_0x27dc57){const _0x5cf947=a69_0x25aa,_0x536e81=[];for(const _0xa105bc of _0x27dc57){try{if(!existsSync(_0xa105bc))continue;const _0x517ee3=tryStat(_0xa105bc);_0x517ee3?.[_0x5cf947(0x13c)]()?rmSync(_0xa105bc,{'recursive':!![],'force':!![]}):unlinkSync(_0xa105bc);}catch(_0x32f274){_0x536e81[_0x5cf947(0x14d)](_0xa105bc+':\x20'+_0x32f274[_0x5cf947(0x12d)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x536e81['length']===0x0,'detail':_0x536e81[_0x5cf947(0x131)]>0x0?_0x27dc57[_0x5cf947(0x131)]-_0x536e81['length']+'/'+_0x27dc57[_0x5cf947(0x131)]+_0x5cf947(0x148)+_0x536e81[_0x5cf947(0x177)](';\x20')+')':_0x27dc57[_0x5cf947(0x131)]+_0x5cf947(0x139)};}function execCleanMcp(_0x586836){const _0x57278f=a69_0x25aa;if(!_0x586836['oldMcpConfig'])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'skipped'};try{const _0x54c6eb=readFileSync(_0x586836['oldMcpConfig'][_0x57278f(0x130)],_0x57278f(0x164)),_0x30918a=JSON['parse'](_0x54c6eb);if(_0x30918a?.[_0x57278f(0x112)]&&typeof _0x30918a[_0x57278f(0x112)]===_0x57278f(0x117)){const _0xe1a246=[];for(const [_0x4b8e0d,_0x570c5f]of Object[_0x57278f(0x126)](_0x30918a[_0x57278f(0x112)])){_0x570c5f?.[_0x57278f(0x127)]&&Array[_0x57278f(0x14f)](_0x570c5f['args'])&&_0x570c5f[_0x57278f(0x127)][_0x57278f(0x11f)](_0xdd7c93=>typeof _0xdd7c93===_0x57278f(0x136)&&_0xdd7c93[_0x57278f(0x16a)](_0x57278f(0x149)))&&_0xe1a246['push'](_0x4b8e0d);}for(const _0x33abcc of _0xe1a246){delete _0x30918a[_0x57278f(0x112)][_0x33abcc];}return _0xe1a246[_0x57278f(0x131)]>0x0&&writeFileSync(_0x586836[_0x57278f(0x122)]['path'],JSON[_0x57278f(0x13e)](_0x30918a,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x57278f(0x137)+_0xe1a246[_0x57278f(0x177)](',\x20')+_0x57278f(0x115)+_0x586836['oldMcpConfig'][_0x57278f(0x130)]};}return{'step':0x4,'label':_0x57278f(0x10b),'ok':!![],'detail':_0x57278f(0x138)};}catch(_0x3ea7db){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x3ea7db['message']};}}function execSkillsRemove(_0xe5a441){const _0x4220af=a69_0x25aa,_0x532cd2=runNpxSkillsRemove(_0xe5a441,{'stdio':_0x4220af(0x146)});return{'step':0x5,'label':_0x4220af(0x141),'ok':_0x532cd2['ok'],'detail':_0x532cd2['ok']?'lovrabet/lovrabet-skill\x20removed':_0x532cd2['error']??_0x4220af(0x124)+_0x532cd2[_0x4220af(0x15e)]};}function execSkillsAdd(_0x5e5a4b){const _0x67e23b=a69_0x25aa,_0x1cffd4=runNpxSkillsAddGlobal(_0x5e5a4b,_0x67e23b(0x128),{'stdio':_0x67e23b(0x146)});return{'step':0x6,'label':_0x67e23b(0x169),'ok':_0x1cffd4['ok'],'detail':_0x1cffd4['ok']?_0x67e23b(0x147):_0x1cffd4[_0x67e23b(0x14b)]??'exit\x20'+_0x1cffd4[_0x67e23b(0x15e)]};}function tryStat(_0xafa015){try{return statSync(_0xafa015);}catch{return undefined;}}function printSummary(_0x320183){const _0x196c89=a69_0x25aa;console['log'](''),console[_0x196c89(0x16d)](a69_0x5c2f83[_0x196c89(0x170)](_0x196c89(0x132))),console[_0x196c89(0x16d)]('');for(const _0x1fe6b6 of _0x320183){const _0x2d55b1=_0x1fe6b6['ok']?a69_0x5c2f83[_0x196c89(0x16c)]('OK'):a69_0x5c2f83[_0x196c89(0x13a)]('FAIL');console[_0x196c89(0x16d)]('\x20\x20'+_0x2d55b1+_0x196c89(0x123)+_0x1fe6b6[_0x196c89(0x129)]+':\x20'+_0x1fe6b6[_0x196c89(0x155)]);if(_0x1fe6b6[_0x196c89(0x154)])console[_0x196c89(0x16d)]('\x20\x20\x20\x20\x20\x20\x20'+a69_0x5c2f83[_0x196c89(0x12b)](_0x1fe6b6[_0x196c89(0x154)]));}console[_0x196c89(0x16d)]('');}export async function upgradeApp(_0x4fba8c,_0x35beca){const _0x5ea400=a69_0x25aa,_0x8a2664=process[_0x5ea400(0x14e)](),_0x474f77=analyse(_0x8a2664),_0x917e67=!_0x474f77[_0x5ea400(0x10c)]&&_0x474f77[_0x5ea400(0x172)][_0x5ea400(0x131)]===0x0&&!_0x474f77[_0x5ea400(0x122)]&&!_0x474f77['needsSkillSwap'];if(_0x917e67){console[_0x5ea400(0x16d)](a69_0x5c2f83[_0x5ea400(0x16c)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x474f77);const _0x3cbba8=_0x35beca[_0x5ea400(0x10a)]||_0x35beca['Y']||_0x4fba8c;if(!_0x3cbba8)try{const _0x242d0a=await askConfirm(_0x5ea400(0x11e));if(!_0x242d0a){console[_0x5ea400(0x16d)](a69_0x5c2f83[_0x5ea400(0x12b)](_0x5ea400(0x11b)));return;}}catch(_0x5cbb38){if(_0x5cbb38?.[_0x5ea400(0x12d)]===_0x5ea400(0x15d)){console['log'](a69_0x5c2f83[_0x5ea400(0x12b)](_0x5ea400(0x11b)));return;}throw _0x5cbb38;}const _0xbaa6f8=[],_0x1d1b60=a69_0x398037({'text':_0x5ea400(0x140),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0xd2615b=execConfigMigration(_0x474f77,_0x8a2664);_0xbaa6f8[_0x5ea400(0x14d)](_0xd2615b),_0x1d1b60[_0xd2615b['ok']?_0x5ea400(0x12f):_0x5ea400(0x142)](_0x5ea400(0x152)+(_0xd2615b[_0x5ea400(0x154)]??(_0xd2615b['ok']?_0x5ea400(0x12a):'failed')));const _0x29e6dc=resolve(_0x8a2664,'.lovrabet'),_0x7d3530=a69_0x398037({'text':_0x5ea400(0x116),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)]();if(existsSync(_0x29e6dc))try{rmSync(_0x29e6dc,{'recursive':!![],'force':!![]}),_0x7d3530[_0x5ea400(0x12f)](_0x5ea400(0x110)),_0xbaa6f8[_0x5ea400(0x14d)]({'step':0x2,'label':_0x5ea400(0x158),'ok':!![]});}catch(_0x5a4277){_0x7d3530[_0x5ea400(0x142)](_0x5ea400(0x150)+_0x5a4277[_0x5ea400(0x12d)]),_0xbaa6f8['push']({'step':0x2,'label':_0x5ea400(0x158),'ok':![],'detail':_0x5a4277['message']});}else _0x7d3530[_0x5ea400(0x14c)](_0x5ea400(0x10d)),_0xbaa6f8[_0x5ea400(0x14d)]({'step':0x2,'label':_0x5ea400(0x158),'ok':!![],'detail':_0x5ea400(0x171)});const _0x4dcb71=a69_0x398037({'text':'Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0x2b5b0d=execRemoveOldArtifacts(_0x474f77['oldArtifacts']);_0xbaa6f8[_0x5ea400(0x14d)](_0x2b5b0d),_0x4dcb71[_0x2b5b0d['ok']?'succeed':_0x5ea400(0x142)](_0x5ea400(0x114)+(_0x2b5b0d[_0x5ea400(0x154)]??(_0x2b5b0d['ok']?_0x5ea400(0x12a):_0x5ea400(0x15b))));const _0x2a5cd8=a69_0x398037({'text':_0x5ea400(0x113),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0x55ad84=execCleanMcp(_0x474f77);_0xbaa6f8[_0x5ea400(0x14d)](_0x55ad84),_0x2a5cd8[_0x55ad84['ok']?_0x5ea400(0x12f):_0x5ea400(0x142)](_0x5ea400(0x173)+(_0x55ad84[_0x5ea400(0x154)]??(_0x55ad84['ok']?'done':_0x5ea400(0x15b))));const _0x311712=a69_0x398037({'text':_0x5ea400(0x119),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0x5e9a64=execSkillsRemove(_0x8a2664);_0xbaa6f8[_0x5ea400(0x14d)](_0x5e9a64),_0x311712[_0x5e9a64['ok']?_0x5ea400(0x12f):_0x5ea400(0x142)]('Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20'+(_0x5e9a64[_0x5ea400(0x154)]??(_0x5e9a64['ok']?'done':_0x5ea400(0x15b))));const _0x1bfe30=a69_0x398037({'text':_0x5ea400(0x10f),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0xf39563=execSkillsAdd(_0x8a2664);_0xbaa6f8[_0x5ea400(0x14d)](_0xf39563),_0x1bfe30[_0xf39563['ok']?_0x5ea400(0x12f):_0x5ea400(0x142)]('Step\x206/6:\x20Install\x20new\x20skill\x20—\x20'+(_0xf39563['detail']??(_0xf39563['ok']?_0x5ea400(0x12a):_0x5ea400(0x15b)))),printSummary(_0xbaa6f8);const _0x21b410=_0xbaa6f8[_0x5ea400(0x11f)](_0x2ff72c=>!_0x2ff72c['ok']);_0x21b410?console['log'](a69_0x5c2f83[_0x5ea400(0x156)](_0x5ea400(0x163))):console[_0x5ea400(0x16d)](a69_0x5c2f83['green'](_0x5ea400(0x15c)));}
@@ -1 +0,0 @@
1
- const a79_0x4b9c68=a79_0x1666;(function(_0x1402e2,_0xf8c9ea){const _0x4ca7b0=a79_0x1666,_0x25e94e=_0x1402e2();while(!![]){try{const _0x4d8f13=-parseInt(_0x4ca7b0(0x112))/0x1*(-parseInt(_0x4ca7b0(0x115))/0x2)+parseInt(_0x4ca7b0(0x122))/0x3*(-parseInt(_0x4ca7b0(0x123))/0x4)+parseInt(_0x4ca7b0(0x120))/0x5+parseInt(_0x4ca7b0(0x11a))/0x6*(parseInt(_0x4ca7b0(0x11c))/0x7)+-parseInt(_0x4ca7b0(0x11b))/0x8*(parseInt(_0x4ca7b0(0x11e))/0x9)+parseInt(_0x4ca7b0(0x114))/0xa*(-parseInt(_0x4ca7b0(0x117))/0xb)+parseInt(_0x4ca7b0(0x119))/0xc;if(_0x4d8f13===_0xf8c9ea)break;else _0x25e94e['push'](_0x25e94e['shift']());}catch(_0x47ffd8){_0x25e94e['push'](_0x25e94e['shift']());}}}(a79_0x34fb,0xc22c0));import{execa}from'execa';function a79_0x1666(_0x37ca9c,_0x136fc2){_0x37ca9c=_0x37ca9c-0x112;const _0x34fbc1=a79_0x34fb();let _0x166644=_0x34fbc1[_0x37ca9c];return _0x166644;}import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';function a79_0x34fb(){const _0x4aedac=['3kqnddY','532484spSyLW','19797HkWHxS','vite','5465040IeeuSy','126hcYKwE','cwd','11SKwhsX','Start\x20development\x20server','12014592CQGJFJ','331050GGNjbU','19016emmzZO','56eVyTtN','启动开发服务器','4887eMzkch','needsUpgrade','379185ZUcQkS','now'];a79_0x34fb=function(){return _0x4aedac;};return a79_0x34fb();}import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export async function runStart(_0x12f3f1){const _0x1db11b=a79_0x1666,_0x41f86e=Date[_0x1db11b(0x121)](),_0x1baeeb=_0x12f3f1||process[_0x1db11b(0x116)](),_0x48d954=await checkCliVersion();_0x48d954[_0x1db11b(0x11f)]&&printCliUpgradeWarning(_0x48d954);const _0x29ebee=await checkSdkVersion(_0x1baeeb);_0x29ebee[_0x1db11b(0x11f)]&&printSdkUpgradeWarning(_0x29ebee);try{await execa(_0x1db11b(0x113),[],{'cwd':_0x1baeeb,'stdio':'inherit','preferLocal':!![],'localDir':_0x1baeeb,'env':{...process.env}});const _0x1cc796=Date['now']()-_0x41f86e;void _0x1cc796;}catch(_0x271b11){throw _0x271b11;}}export const startCommand={'name':'start','description':a79_0x4b9c68(0x118),async 'run'(_0x538aa8,_0x1c5cbe,_0x2f422a){const _0x5a2ff6=a79_0x4b9c68;_0x538aa8['logger']['info']('start',_0x5a2ff6(0x11d)),await runStart();}};
@@ -1 +0,0 @@
1
- (function(_0x268754,_0x54eefb){const _0x336795=a94_0x3d7c,_0x27e751=_0x268754();while(!![]){try{const _0x401919=-parseInt(_0x336795(0xd7))/0x1*(parseInt(_0x336795(0xd8))/0x2)+parseInt(_0x336795(0xdd))/0x3*(parseInt(_0x336795(0xe8))/0x4)+parseInt(_0x336795(0xe3))/0x5*(-parseInt(_0x336795(0xde))/0x6)+-parseInt(_0x336795(0xe0))/0x7+-parseInt(_0x336795(0xd5))/0x8+parseInt(_0x336795(0xed))/0x9*(parseInt(_0x336795(0xe1))/0xa)+parseInt(_0x336795(0xe2))/0xb;if(_0x401919===_0x54eefb)break;else _0x27e751['push'](_0x27e751['shift']());}catch(_0x4d638b){_0x27e751['push'](_0x27e751['shift']());}}}(a94_0x1ee1,0x574a0));import{existsSync}from'node:fs';import a94_0x11f310 from'node:path';import a94_0x48e8e1 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../auth/is-session-valid.js';function a94_0x3d7c(_0x10a715,_0x1d1c90){_0x10a715=_0x10a715-0xd4;const _0x1ee1e2=a94_0x1ee1();let _0x3d7c8e=_0x1ee1e2[_0x10a715];return _0x3d7c8e;}import{authServer}from'../auth/auth-server.js';function a94_0x1ee1(){const _0x23f645=['3044810gCAtYj','4881679KCmzjt','681850nezmSa','log','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','green','trim','4TXOpXY','cyan','length','Project\x20name\x20cannot\x20exceed\x2050\x20characters','Skipped','9scQuNl','cwd','Login\x20failed','Logged\x20in','√\x20Login\x20status:\x20','2293288IVbobT','string','214487KCGehx','4rDVnLr','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','resolve','env','production','1658697ebnBfz','6NyNtwY','Project\x20name:','641396JGyZTH'];a94_0x1ee1=function(){return _0x23f645;};return a94_0x1ee1();}import{readConfig}from'../utils/config.js';import{selectSingleAppcode}from'../commands/common/app-selector.js';export async function guidedCreateProject(_0x10f8e8,_0x19d0a1,_0x12de68){const _0x2e8150=a94_0x3d7c,_0xee7062='my-app',_0x168d6d=readConfig(),_0xd8b635=typeof _0x168d6d[_0x2e8150(0xdb)]===_0x2e8150(0xd6)?_0x168d6d[_0x2e8150(0xdb)]:undefined,_0x479c82=await input({'message':_0x2e8150(0xdf),'default':_0xee7062,'validate':_0x3b0182=>{const _0x5c207d=_0x2e8150,_0x4906b5=_0x3b0182[_0x5c207d(0xe7)]()||_0xee7062;if(_0x4906b5[_0x5c207d(0xea)]>0x32)return _0x5c207d(0xeb);const _0x529449=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4906b5&&!_0x529449['test'](_0x4906b5))return _0x5c207d(0xe5);const _0x24198b=a94_0x11f310[_0x5c207d(0xda)](process[_0x5c207d(0xee)](),_0x4906b5);if(existsSync(_0x24198b))return'Directory\x20\x22'+_0x4906b5+'\x22\x20already\x20exists';return!![];}});console['log'](a94_0x48e8e1[_0x2e8150(0xe6)]('√\x20Project\x20Name:\x20'+a94_0x48e8e1['cyan'](_0x479c82)));const _0x334beb=await selectSingleAppcode(_0x12de68);console[_0x2e8150(0xe4)](a94_0x48e8e1[_0x2e8150(0xe6)]('√\x20App\x20Code:\x20'+a94_0x48e8e1[_0x2e8150(0xe9)](_0x334beb||'Not\x20set')));if(_0x334beb){const _0x11dac2=await getIsSessionValid();if(!_0x11dac2){const _0x4521ab=await confirm({'message':_0x2e8150(0xd9),'default':!![]});if(_0x4521ab){const _0x4a7826=await authServer({'silent':!![]});console['log'](a94_0x48e8e1[_0x2e8150(0xe6)](_0x2e8150(0xd4)+a94_0x48e8e1[_0x2e8150(0xe9)](_0x4a7826?_0x2e8150(0xf0):_0x2e8150(0xef))));}else console[_0x2e8150(0xe4)](a94_0x48e8e1[_0x2e8150(0xe6)](_0x2e8150(0xd4)+a94_0x48e8e1[_0x2e8150(0xe9)](_0x2e8150(0xec))));}await _0x10f8e8({'projectName':_0x479c82,'appCode':_0x334beb,'env':_0x19d0a1||_0xd8b635||_0x2e8150(0xdc)});}else await _0x10f8e8({'projectName':_0x479c82,'env':_0x19d0a1||_0xd8b635||'production'});}
@@ -1 +0,0 @@
1
- function a95_0x4764(_0x41f1c9,_0x36ff4f){_0x41f1c9=_0x41f1c9-0x19a;const _0x3ce9d4=a95_0x3ce9();let _0x47644e=_0x3ce9d4[_0x41f1c9];return _0x47644e;}function a95_0x3ce9(){const _0x59e570=['34180yyErNJ','732018IlEwAV','2099544nSaMCQ','70oFUpGJ','7SWpvff','67724JMevdi','168882ihDaVY','now','1136520oMnlAi','toFixed','318771jUstFz','3QZcKQk'];a95_0x3ce9=function(){return _0x59e570;};return a95_0x3ce9();}(function(_0x18ac37,_0x29825b){const _0x29b4bf=a95_0x4764,_0x17dff5=_0x18ac37();while(!![]){try{const _0x102908=-parseInt(_0x29b4bf(0x19d))/0x1+-parseInt(_0x29b4bf(0x19c))/0x2*(parseInt(_0x29b4bf(0x1a2))/0x3)+parseInt(_0x29b4bf(0x1a3))/0x4+parseInt(_0x29b4bf(0x19f))/0x5+parseInt(_0x29b4bf(0x1a4))/0x6+parseInt(_0x29b4bf(0x19b))/0x7*(parseInt(_0x29b4bf(0x1a5))/0x8)+parseInt(_0x29b4bf(0x1a1))/0x9*(-parseInt(_0x29b4bf(0x19a))/0xa);if(_0x102908===_0x29825b)break;else _0x17dff5['push'](_0x17dff5['shift']());}catch(_0x480a84){_0x17dff5['push'](_0x17dff5['shift']());}}}(a95_0x3ce9,0x29692));export function formatElapsed(_0x3b1d71){const _0x48baad=a95_0x4764,_0x5d794d=Date[_0x48baad(0x19e)]()-_0x3b1d71;if(_0x5d794d<0x3e8)return _0x5d794d+'ms';const _0x5b1bae=(_0x5d794d/0x3e8)[_0x48baad(0x1a0)](0x2),_0x293b36=_0x5b1bae['replace'](/\.?0+$/u,'');return _0x293b36+'s';}
@@ -1 +0,0 @@
1
- (function(_0x37340d,_0xcb193d){const _0x3a3fb3=a96_0x5f3f,_0x4c8ed6=_0x37340d();while(!![]){try{const _0x521896=-parseInt(_0x3a3fb3(0x19a))/0x1*(parseInt(_0x3a3fb3(0x1d3))/0x2)+parseInt(_0x3a3fb3(0x17c))/0x3*(parseInt(_0x3a3fb3(0x1cb))/0x4)+-parseInt(_0x3a3fb3(0x187))/0x5+parseInt(_0x3a3fb3(0x1a5))/0x6*(parseInt(_0x3a3fb3(0x18b))/0x7)+parseInt(_0x3a3fb3(0x1ba))/0x8*(parseInt(_0x3a3fb3(0x1c9))/0x9)+-parseInt(_0x3a3fb3(0x1c7))/0xa*(-parseInt(_0x3a3fb3(0x1a6))/0xb)+-parseInt(_0x3a3fb3(0x192))/0xc;if(_0x521896===_0xcb193d)break;else _0x4c8ed6['push'](_0x4c8ed6['shift']());}catch(_0x936602){_0x4c8ed6['push'](_0x4c8ed6['shift']());}}}(a96_0x35cc,0x755eb));import a96_0x50f553 from'path';import a96_0x1a401b from'fs';function a96_0x35cc(){const _0xb34021=['!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','fail','chdir','\x20\x201.\x20Start\x20project:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20config\x20set\x20appcode\x20<app-code>\x27','success','bold','√\x20Pulled\x20','stop','create','repeat','\x20run\x20start','../..','Project\x20name\x20cannot\x20be\x20empty','\x20√\x20','message','Project\x20directory\x20','stringify','16XNaIxZ','appCode','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','cwd','toLocaleString','constants','readFileSync','API\x20configuration\x20pulled:\x20','package.json','\x20&&\x20','项目创建失败:\x20','\x20already\x20exists','*\x20Pulling\x20API\x20configuration...','500GbFkcm','\x20api\x20pull','3845673HiwXor','name','16664buZUSP','join','🚀\x20Next\x20Steps:','modelCount','string','description','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','projectCode','69240TbZSST','env','√\x20package.json\x20updated:\x20name=','更新\x20package.json\x20失败','dirname','./src/api/','384dLVWQB','...','\x20|\x20AppCode:\x20','cookie','cd\x20','resolve','info','更新\x20package.json\x20name','rmSync','length','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','1634950XtXZbO','test','配置应用AppCode失败','projectName','6064135ewToiy','needsUpgrade','writeFileSync','\x20\x202.\x20Pull\x20API\x20configuration:\x20','cyan','W_OK','1.0.0','14794800elBPEe','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','配置应用AppCode:\x20','CLI\x20版本检查','warn','*\x20Configuring\x20AppCode\x20for\x20project\x20','currentVersion','parse','23HYAYnJ','version','log','existsSync','Install\x20dependencies','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','utf8','production','green','start','6ksIZQw','128205yPamaJ'];a96_0x35cc=function(){return _0xb34021;};return a96_0x35cc();}import{fileURLToPath}from'node:url';import a96_0xb26750 from'chalk';import a96_0x50843b from'ora';import{guidedCreateProject}from'./enhanced-guided-create.js';function a96_0x5f3f(_0x230c99,_0x5966ff){_0x230c99=_0x230c99-0x17b;const _0x35cc93=a96_0x35cc();let _0x5f3f6e=_0x35cc93[_0x230c99];return _0x5f3f6e;}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{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{copyProjectTemplate}from'./use-copy-project-template.js';import{installDependencies}from'./use-install-dependencies.js';import{formatProjectCode}from'./use-format-code.js';import{logger}from'../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';import{selectSingleAppcode}from'../commands/common/app-selector.js';export async function createApp(_0x4d5893){const _0x5e5790=a96_0x5f3f,_0x2fa5bb=await checkCliVersion();_0x2fa5bb[_0x5e5790(0x18c)]&&(printCliUpgradeWarning(_0x2fa5bb),logger[_0x5e5790(0x182)](_0x5e5790(0x1b1),_0x5e5790(0x195),{'currentVersion':_0x2fa5bb[_0x5e5790(0x198)],'stableVersion':_0x2fa5bb['stableVersion'],'needsUpgrade':_0x2fa5bb[_0x5e5790(0x18c)]}));if(_0x4d5893['projectCode']&&_0x4d5893['appCode'])await runCreate({'projectName':_0x4d5893[_0x5e5790(0x1d2)],'appCode':_0x4d5893['appCode'],'env':_0x4d5893[_0x5e5790(0x1d4)]},_0x4d5893);else{if(_0x4d5893[_0x5e5790(0x1d2)]){const _0x169647=await selectSingleAppcode(_0x4d5893[_0x5e5790(0x17f)]);await runCreate({'projectName':_0x4d5893[_0x5e5790(0x1d2)],'appCode':_0x169647||undefined,'env':_0x4d5893[_0x5e5790(0x1d4)]},_0x4d5893);}else await guidedCreateProject(_0x5912f5=>runCreate(_0x5912f5,_0x4d5893),_0x4d5893['env'],_0x4d5893[_0x5e5790(0x17f)]);}}async function runCreate(_0x4195e9,_0x2e238e){const _0x2f07b8=a96_0x5f3f;if(!_0x4195e9[_0x2f07b8(0x18a)]||_0x4195e9[_0x2f07b8(0x18a)]['trim']()==='')throw new Error(_0x2f07b8(0x1b5));const _0x386fbb=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x386fbb[_0x2f07b8(0x188)](_0x4195e9[_0x2f07b8(0x18a)]))throw new Error(_0x2f07b8(0x1d1));if(_0x4195e9['projectName'][_0x2f07b8(0x185)]>0x64)throw new Error(_0x2f07b8(0x1ab));const _0x595d09=a96_0x50f553[_0x2f07b8(0x181)](process[_0x2f07b8(0x1bd)](),_0x4195e9[_0x2f07b8(0x18a)]);if(a96_0x1a401b[_0x2f07b8(0x19d)](_0x595d09))throw new Error(_0x2f07b8(0x1b8)+_0x4195e9[_0x2f07b8(0x18a)]+_0x2f07b8(0x1c5));try{a96_0x1a401b['accessSync'](a96_0x50f553[_0x2f07b8(0x1d7)](_0x595d09),a96_0x1a401b[_0x2f07b8(0x1bf)][_0x2f07b8(0x190)]);}catch{throw new Error(_0x2f07b8(0x19f));}logger['setLogPath'](_0x595d09),logger[_0x2f07b8(0x182)](_0x2f07b8(0x1b1),'开始创建项目:\x20'+_0x4195e9[_0x2f07b8(0x18a)],{'projectDir':_0x595d09,'appCode':_0x4195e9[_0x2f07b8(0x1bb)]}),console[_0x2f07b8(0x19c)](),console['log'](a96_0xb26750[_0x2f07b8(0x1a3)](_0x2f07b8(0x1b6))+'Project\x20name:\x20'+a96_0xb26750[_0x2f07b8(0x1a3)](_0x4195e9['projectName'])+(_0x4195e9['appCode']?_0x2f07b8(0x17e)+a96_0xb26750[_0x2f07b8(0x18f)](_0x4195e9[_0x2f07b8(0x1bb)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x4195e9[_0x2f07b8(0x18a)])),await updatePackageJsonName(_0x4195e9[_0x2f07b8(0x18a)]),await runTask(_0x2f07b8(0x19e),()=>installDependencies(_0x4195e9[_0x2f07b8(0x18a)])),await runTask('Format\x20code',()=>formatProjectCode(_0x4195e9[_0x2f07b8(0x18a)])),await configureAppCode(_0x4195e9[_0x2f07b8(0x18a)],_0x4195e9[_0x2f07b8(0x1bb)]||'',_0x4195e9[_0x2f07b8(0x1d4)]);let _0x38abd9=![];if(_0x4195e9['appCode']){console['log'](_0x2f07b8(0x1c6));const _0xba2eae=process['cwd']();try{process['chdir'](_0x595d09);const _0x39eade=_0x4195e9[_0x2f07b8(0x1d4)]||_0x2f07b8(0x1a2);initEnv(_0x39eade);const {configArray:_0x2133f6}=await fetchModelList(_0x4195e9[_0x2f07b8(0x1bb)],_0x2e238e[_0x2f07b8(0x17f)]||''),_0x58bd18=_0x2f07b8(0x17b),_0x393245=await generateApiFile(_0x2133f6,'',_0x4195e9[_0x2f07b8(0x1bb)],!![],_0x39eade,_0x58bd18);console['log'](_0x2f07b8(0x1af)+_0x2133f6[_0x2f07b8(0x185)]+'\x20dataset(s),\x20generated\x20'+_0x393245[_0x2f07b8(0x1ce)]+'\x20model(s)'),logger[_0x2f07b8(0x182)](_0x2f07b8(0x1b1),_0x2f07b8(0x1c1)+_0x4195e9[_0x2f07b8(0x1bb)]);}catch(_0x272069){_0x38abd9=!![],console[_0x2f07b8(0x19c)](_0x2f07b8(0x1a7)),logger[_0x2f07b8(0x196)](_0x2f07b8(0x1b1),'API\x20配置拉取异常',{'error':_0x272069 instanceof Error?_0x272069[_0x2f07b8(0x1b7)]:String(_0x272069)});}finally{process[_0x2f07b8(0x1a9)](_0xba2eae);}}logger[_0x2f07b8(0x1ad)](_0x2f07b8(0x1b1),'项目创建完成:\x20'+_0x4195e9[_0x2f07b8(0x18a)]),console[_0x2f07b8(0x19c)](),console[_0x2f07b8(0x19c)](a96_0xb26750[_0x2f07b8(0x1a3)]('─'[_0x2f07b8(0x1b2)](0x3c))),console[_0x2f07b8(0x19c)](a96_0xb26750[_0x2f07b8(0x18f)][_0x2f07b8(0x1ae)](_0x2f07b8(0x1cd))),console[_0x2f07b8(0x19c)](),console[_0x2f07b8(0x19c)](_0x2f07b8(0x1aa)+a96_0xb26750[_0x2f07b8(0x18f)][_0x2f07b8(0x1ae)](_0x2f07b8(0x180)+_0x4195e9[_0x2f07b8(0x18a)]+_0x2f07b8(0x1c3)+CLI_BIN_NAME+_0x2f07b8(0x1b3))),_0x38abd9&&console[_0x2f07b8(0x19c)](_0x2f07b8(0x18e)+a96_0xb26750['cyan'][_0x2f07b8(0x1ae)](CLI_BIN_NAME+_0x2f07b8(0x1c8))),console[_0x2f07b8(0x19c)](a96_0xb26750[_0x2f07b8(0x1a3)]('─'[_0x2f07b8(0x1b2)](0x3c)));}catch(_0xfbcc4c){logger['error'](_0x2f07b8(0x1b1),_0x2f07b8(0x1c4)+_0x4195e9[_0x2f07b8(0x18a)],{'error':_0xfbcc4c instanceof Error?_0xfbcc4c[_0x2f07b8(0x1b7)]:String(_0xfbcc4c)});try{a96_0x1a401b[_0x2f07b8(0x19d)](_0x595d09)&&(console[_0x2f07b8(0x19c)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x595d09),a96_0x1a401b[_0x2f07b8(0x184)](_0x595d09,{'recursive':!![],'force':!![]}));}catch{logger[_0x2f07b8(0x196)](_0x2f07b8(0x1b1),'清理项目目录失败:\x20'+_0x595d09);}throw _0xfbcc4c;}}async function runTask(_0x3f29b7,_0x4b076e){const _0x2d5a2e=a96_0x5f3f,_0x37b838=a96_0x50843b(_0x3f29b7+_0x2d5a2e(0x17d))[_0x2d5a2e(0x1a4)]();try{const _0x2a3ed1=await _0x4b076e();_0x37b838[_0x2d5a2e(0x1b0)](),console[_0x2d5a2e(0x19c)](''+a96_0xb26750[_0x2d5a2e(0x1a3)](_0x2d5a2e(0x1b6))+_0x3f29b7+'\x20'+a96_0xb26750['gray']('['+_0x2a3ed1+']'));}catch(_0x502a6){_0x37b838[_0x2d5a2e(0x1a8)](_0x3f29b7);throw _0x502a6;}}async function updatePackageJsonName(_0x2e865b){const _0x1b813f=a96_0x5f3f,_0x541581=a96_0x50f553[_0x1b813f(0x181)](process[_0x1b813f(0x1bd)](),_0x2e865b),_0x469c2a=a96_0x50f553['join'](_0x541581,_0x1b813f(0x1c2));try{console['log'](_0x1b813f(0x186));const _0x2195a5=fileURLToPath(import.meta.url),_0xe42ec9=a96_0x50f553[_0x1b813f(0x181)](a96_0x50f553['dirname'](_0x2195a5),_0x1b813f(0x1b4)),_0x38de8e=a96_0x50f553[_0x1b813f(0x1cc)](_0xe42ec9,_0x1b813f(0x1c2));let _0x551879=_0x1b813f(0x191);try{const _0x5be00c=JSON[_0x1b813f(0x199)](a96_0x1a401b['readFileSync'](_0x38de8e,_0x1b813f(0x1a1)));_0x551879=_0x5be00c[_0x1b813f(0x19b)]||'1.0.0';}catch{}const _0x5de9da=a96_0x1a401b[_0x1b813f(0x1c0)](_0x469c2a,_0x1b813f(0x1a1)),_0x6401f7=JSON['parse'](_0x5de9da);_0x6401f7[_0x1b813f(0x1ca)]=_0x2e865b,_0x6401f7[_0x1b813f(0x1d0)]=_0x2e865b+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x551879,a96_0x1a401b[_0x1b813f(0x18d)](_0x469c2a,JSON[_0x1b813f(0x1b9)](_0x6401f7,null,0x2)+'\x0a',_0x1b813f(0x1a1)),console[_0x1b813f(0x19c)](_0x1b813f(0x1d5)+_0x2e865b),logger['info'](_0x1b813f(0x1b1),_0x1b813f(0x183));}catch(_0x4aa7fa){logger['error'](_0x1b813f(0x1b1),_0x1b813f(0x1d6));throw _0x4aa7fa;}}async function configureAppCode(_0x458565,_0x3f64d5,_0x2af81f){const _0x399b98=a96_0x5f3f,_0x4b04ed=a96_0x50f553[_0x399b98(0x181)](process[_0x399b98(0x1bd)](),_0x458565),_0x56876b=a96_0x50f553[_0x399b98(0x1cc)](_0x4b04ed,NEW_CONFIG_NAME);try{_0x3f64d5?console['log'](_0x399b98(0x197)+_0x458565+':\x20'+_0x3f64d5):console['log'](_0x399b98(0x1a0)+_0x458565);const _0x359c0f=fileURLToPath(import.meta.url),_0x4ad81e=a96_0x50f553[_0x399b98(0x181)](a96_0x50f553[_0x399b98(0x1d7)](_0x359c0f),_0x399b98(0x1b4)),_0x124d62=a96_0x50f553[_0x399b98(0x1cc)](_0x4ad81e,_0x399b98(0x1c2));let _0x3873f4=_0x399b98(0x191);try{const _0x1f3651=JSON[_0x399b98(0x199)](a96_0x1a401b[_0x399b98(0x1c0)](_0x124d62,_0x399b98(0x1a1)));_0x3873f4=_0x1f3651[_0x399b98(0x19b)]||'1.0.0';}catch{}const _0xa5780f=readConfig(),_0xf272fd=typeof _0xa5780f[_0x399b98(0x1d4)]===_0x399b98(0x1cf)?_0xa5780f[_0x399b98(0x1d4)]:undefined,{app:_0x308fdf,appcode:_0x3a9a89,..._0x285dd2}=_0xa5780f,_0x315328={..._0x285dd2,'appcode':_0x3f64d5||'','env':_0x2af81f||_0xf272fd||_0x399b98(0x1a2),'createdAt':new Date()[_0x399b98(0x1be)](),'version':_0x3873f4};writeConfigFile(_0x56876b,_0x315328),_0x3f64d5?console[_0x399b98(0x19c)](_0x399b98(0x1bc)+_0x3f64d5):console[_0x399b98(0x19c)](_0x399b98(0x193)+CLI_BIN_NAME+_0x399b98(0x1ac)),logger['info'](_0x399b98(0x1b1),_0x399b98(0x194)+_0x3f64d5);}catch(_0x6b4a7e){logger['error'](_0x399b98(0x1b1),_0x399b98(0x189));}}
@@ -1 +0,0 @@
1
- (function(_0x38a640,_0x2dd765){const _0x1b31bb=a97_0x155c,_0x47e7a3=_0x38a640();while(!![]){try{const _0x1a9ca6=-parseInt(_0x1b31bb(0x92))/0x1*(parseInt(_0x1b31bb(0x9a))/0x2)+parseInt(_0x1b31bb(0x84))/0x3*(parseInt(_0x1b31bb(0xa8))/0x4)+parseInt(_0x1b31bb(0x93))/0x5*(parseInt(_0x1b31bb(0x7c))/0x6)+-parseInt(_0x1b31bb(0x76))/0x7+parseInt(_0x1b31bb(0x82))/0x8*(-parseInt(_0x1b31bb(0x7d))/0x9)+-parseInt(_0x1b31bb(0x99))/0xa*(-parseInt(_0x1b31bb(0x9f))/0xb)+-parseInt(_0x1b31bb(0x86))/0xc*(-parseInt(_0x1b31bb(0x9d))/0xd);if(_0x1a9ca6===_0x2dd765)break;else _0x47e7a3['push'](_0x47e7a3['shift']());}catch(_0x57348e){_0x47e7a3['push'](_0x47e7a3['shift']());}}}(a97_0x5b00,0x6fb55));import a97_0x2e5433 from'path';import{fileURLToPath}from'url';function a97_0x155c(_0xc26126,_0x1f1c32){_0xc26126=_0xc26126-0x71;const _0x5b0091=a97_0x5b00();let _0x155c13=_0x5b0091[_0xc26126];return _0x155c13;}import a97_0xf4b8cd from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../constant/cli.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../utils/copy-directory.js';import{promisify}from'util';import{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';const execAsync=promisify(exec);function getTemplateDir(){const _0x7ec231=a97_0x155c,_0x54e5f3=fileURLToPath(import.meta.url),_0x4190b1=a97_0x2e5433[_0x7ec231(0x8c)](_0x54e5f3);return a97_0x2e5433[_0x7ec231(0xa1)](_0x4190b1,_0x7ec231(0x81));}export async function createProjectNonInteractive(_0x20649c,_0x5d2c67,_0x3508e9,_0x1a4823){const _0x5ecaa0=a97_0x155c,_0x71435d=await checkCliVersion();_0x71435d[_0x5ecaa0(0x7b)]&&printCliUpgradeWarning(_0x71435d);if(!_0x20649c||_0x20649c[_0x5ecaa0(0x79)]()==='')throw CliErrors[_0x5ecaa0(0xaa)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x854245=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x854245[_0x5ecaa0(0x7a)](_0x20649c))throw CliErrors[_0x5ecaa0(0xaa)](_0x5ecaa0(0x80),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x20649c[_0x5ecaa0(0xa3)]>0x64)throw CliErrors[_0x5ecaa0(0xaa)](_0x5ecaa0(0xad));const _0x25d125=a97_0x2e5433[_0x5ecaa0(0xa1)](process['cwd'](),_0x20649c);if(existsSync(_0x25d125))throw CliErrors[_0x5ecaa0(0xaa)]('Project\x20directory\x20\x22'+_0x20649c+_0x5ecaa0(0x8d),_0x5ecaa0(0x7e));try{const _0x3c1fd2=a97_0x2e5433[_0x5ecaa0(0x8c)](_0x25d125);await a97_0xf4b8cd[_0x5ecaa0(0x94)](_0x3c1fd2,a97_0xf4b8cd['constants'][_0x5ecaa0(0xa4)]);}catch{throw CliErrors[_0x5ecaa0(0xaa)](_0x5ecaa0(0x97),_0x5ecaa0(0xa6));}try{console[_0x5ecaa0(0x8a)]('*\x20Creating\x20project\x20'+_0x20649c+_0x5ecaa0(0xa9));const _0x2a6db6=getTemplateDir();await copyDirectory(_0x2a6db6,_0x25d125),console[_0x5ecaa0(0x8a)](_0x5ecaa0(0x95)),await updatePackageJsonName(_0x20649c),console[_0x5ecaa0(0x8a)](_0x5ecaa0(0x98)),console['log']('\x20\x20Installing\x20dependencies...'),console[_0x5ecaa0(0x8a)](_0x5ecaa0(0x85)),await formatCode(_0x25d125),console['log'](_0x5ecaa0(0xa7)),await configureProject(_0x20649c,_0x3508e9,_0x5d2c67),console[_0x5ecaa0(0x8a)](_0x5ecaa0(0x72)),_0x3508e9&&await pullApiConfig(_0x25d125,_0x3508e9,_0x5d2c67,_0x1a4823),console[_0x5ecaa0(0x8a)](_0x5ecaa0(0x87)+_0x20649c+_0x5ecaa0(0x8f)),console['log'](_0x5ecaa0(0x73)+_0x20649c),console['log'](_0x5ecaa0(0x75));}catch(_0x3a6d7c){try{existsSync(_0x25d125)&&await a97_0xf4b8cd['rm'](_0x25d125,{'recursive':!![],'force':!![]});}catch{}throw _0x3a6d7c;}}async function updatePackageJsonName(_0x59ef2c){const _0x141f32=a97_0x155c,_0xfdcdb4=a97_0x2e5433['resolve'](process[_0x141f32(0xac)](),_0x59ef2c),_0x37d965=a97_0x2e5433['join'](_0xfdcdb4,_0x141f32(0x96)),_0x33758e=await a97_0xf4b8cd[_0x141f32(0x7f)](_0x37d965,_0x141f32(0x9b)),_0x286cbf=JSON['parse'](_0x33758e);_0x286cbf[_0x141f32(0xab)]=_0x59ef2c,_0x286cbf['description']=_0x141f32(0xa2),await a97_0xf4b8cd[_0x141f32(0x91)](_0x37d965,JSON[_0x141f32(0xa5)](_0x286cbf,null,0x2)+'\x0a');}function detectPackageManager(){const _0x57daa1=a97_0x155c;try{return execSync('bun\x20--version',{'stdio':_0x57daa1(0x78)}),_0x57daa1(0x90);}catch{return _0x57daa1(0x77);}}async function formatCode(_0x5f008f){try{await execAsync('bun\x20run\x20format',{'cwd':_0x5f008f});}catch{}}async function configureProject(_0x59dd7b,_0x259cb4,_0x79884b){const _0x15586d=a97_0x155c,_0x2d69a1=a97_0x2e5433[_0x15586d(0xa1)](process[_0x15586d(0xac)](),_0x59dd7b),_0x13c14d=a97_0x2e5433[_0x15586d(0x88)](_0x2d69a1,NEW_CONFIG_NAME),_0x46bc2b=readConfig(),_0x2b58b8=typeof _0x46bc2b[_0x15586d(0x74)]===_0x15586d(0x71)?_0x46bc2b[_0x15586d(0x74)]:undefined,{app:_0x439b3d,appcode:_0x7c449e,..._0x319ed5}=_0x46bc2b,_0x4e2c83={..._0x319ed5,'appcode':_0x259cb4||'','env':_0x79884b||_0x2b58b8||_0x15586d(0x83),'createdAt':new Date()[_0x15586d(0x9c)](),'version':getCliVersion()};writeConfigFile(_0x13c14d,_0x4e2c83);}function a97_0x5b00(){const _0x2b633a=['1370674riZFqd','utf-8','toLocaleString','23101SlaMtw','\x20model(s)','4917SRsurQ','chdir','resolve','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','length','W_OK','stringify','Check\x20directory\x20permissions.','\x20\x20√\x20Code\x20formatted','1764HRnNqd','...','validation','name','cwd','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','string','\x20\x20√\x20Configuration\x20file\x20created','\x0a\x20\x20cd\x20','env','\x20\x20rabetbase\x20run\x20start\x0a','3922317wjOZjQ','npm','ignore','trim','test','needsUpgrade','6ibNsAv','774QwsBWl','Use\x20a\x20different\x20project\x20name.','readFile','Project\x20name\x20contains\x20invalid\x20characters.','../../templates/projects/sub-app-react-demo','19064qDaFSF','production','3027egvNuV','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','5688qJMZOC','\x0a√\x20Project\x20','join','modelCount','log','\x20\x20Pulling\x20API\x20configuration...','dirname','\x22\x20already\x20exists.','\x20\x20√\x20Pulled\x20','\x20created\x20successfully!','bun','writeFile','1CpNawC','1893110sVXVyy','access','\x20\x20√\x20Project\x20template\x20created','package.json','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20package.json\x20updated','5420KYXicX'];a97_0x5b00=function(){return _0x2b633a;};return a97_0x5b00();}async function pullApiConfig(_0x39e03b,_0x2397c8,_0x258f72,_0x489a93){const _0x618221=a97_0x155c,_0x455d27=process[_0x618221(0xac)]();try{process[_0x618221(0xa0)](_0x39e03b);const _0x171396=_0x258f72||'production';initEnv(_0x171396),console['log'](_0x618221(0x8b));const {configArray:_0x42035f}=await fetchModelList(_0x2397c8,_0x489a93||''),_0x296914=await generateApiFile(_0x42035f,'',_0x2397c8,!![],_0x171396,'./src/api/');console[_0x618221(0x8a)](_0x618221(0x8e)+_0x42035f[_0x618221(0xa3)]+'\x20dataset(s),\x20generated\x20'+_0x296914[_0x618221(0x89)]+_0x618221(0x9e));}catch(_0x4bd798){console[_0x618221(0x8a)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process['chdir'](_0x455d27);}}
@@ -1 +0,0 @@
1
- const a98_0x31d48e=a98_0x17a0;(function(_0x15722d,_0x4fa465){const _0x3fb48c=a98_0x17a0,_0x2a363b=_0x15722d();while(!![]){try{const _0x10c94d=-parseInt(_0x3fb48c(0xdf))/0x1+-parseInt(_0x3fb48c(0xd1))/0x2*(-parseInt(_0x3fb48c(0xd6))/0x3)+-parseInt(_0x3fb48c(0xdc))/0x4+parseInt(_0x3fb48c(0xd3))/0x5+-parseInt(_0x3fb48c(0xcd))/0x6*(-parseInt(_0x3fb48c(0xd0))/0x7)+-parseInt(_0x3fb48c(0xdb))/0x8*(-parseInt(_0x3fb48c(0xcf))/0x9)+-parseInt(_0x3fb48c(0xd8))/0xa*(-parseInt(_0x3fb48c(0xd5))/0xb);if(_0x10c94d===_0x4fa465)break;else _0x2a363b['push'](_0x2a363b['shift']());}catch(_0x20efb3){_0x2a363b['push'](_0x2a363b['shift']());}}}(a98_0x1d5b,0xd566f));import a98_0xe815cb from'node:path';import{fileURLToPath}from'node:url';import{copyDirectory}from'../utils/copy-directory.js';function a98_0x17a0(_0x551cf3,_0x184f46){_0x551cf3=_0x551cf3-0xcd;const _0x1d5bbf=a98_0x1d5b();let _0x17a0c4=_0x1d5bbf[_0x551cf3];return _0x17a0c4;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a98_0x1d5b(){const _0x159521=['33qbidGp','3576777akDeXi','../../templates/projects/sub-app-react-demo','1629990tVzwWk','error','now','9072848usnGvq','3657600qndfJB','copy','开始复制项目模板','1618755KOHuDx','cwd','resolve','9558GzNoVQ','dirname','9eUcLlu','2583uQkVRl','2BAAKpJ','message','20355OCOOvb','项目模板复制完成'];a98_0x1d5b=function(){return _0x159521;};return a98_0x1d5b();}const __dirname=a98_0xe815cb[a98_0x31d48e(0xce)](fileURLToPath(import.meta.url)),templateDir=a98_0xe815cb[a98_0x31d48e(0xe1)](__dirname,a98_0x31d48e(0xd7));export async function copyProjectTemplate(_0x419c60){const _0x5956f5=a98_0x31d48e,_0x3ca5a6=Date['now'](),_0x2375ef=a98_0xe815cb[_0x5956f5(0xe1)](process[_0x5956f5(0xe0)](),_0x419c60);try{logger['info'](_0x5956f5(0xdd),_0x5956f5(0xde),{'projectCode':_0x419c60,'templateDir':templateDir}),await copyDirectory(templateDir,_0x2375ef);const _0x31ad21=Date['now']()-_0x3ca5a6;logger['success'](_0x5956f5(0xdd),_0x5956f5(0xd4),_0x31ad21,{'projectCode':_0x419c60});}catch(_0x4c3156){const _0x97abe3=Date[_0x5956f5(0xda)]()-_0x3ca5a6;logger[_0x5956f5(0xd9)](_0x5956f5(0xdd),'项目模板复制失败',{'projectCode':_0x419c60,'error':_0x4c3156 instanceof Error?_0x4c3156[_0x5956f5(0xd2)]:String(_0x4c3156),'duration':_0x97abe3});throw _0x4c3156;}return formatElapsed(_0x3ca5a6);}
@@ -1 +0,0 @@
1
- function a99_0x55f9(){const _0x2e9117=['prettier','3123rNPPys','代码格式化完成','9628692VgDVDP','52RLXjlu','now','format','message','2706QzJvpC','1803109Utzzte','npx','error','32qVRVpx','开始格式化代码','1389188VlxGEX','info','cwd','5313087KmOAYe','success','404720YCpoFu','resolve','3347570QeegaR'];a99_0x55f9=function(){return _0x2e9117;};return a99_0x55f9();}(function(_0xb5dbe1,_0x19bd21){const _0x4b2eca=a99_0x268f,_0x465ffc=_0xb5dbe1();while(!![]){try{const _0x2a275d=parseInt(_0x4b2eca(0x1c2))/0x1+-parseInt(_0x4b2eca(0x1d2))/0x2*(-parseInt(_0x4b2eca(0x1cb))/0x3)+-parseInt(_0x4b2eca(0x1ce))/0x4*(parseInt(_0x4b2eca(0x1c7))/0x5)+-parseInt(_0x4b2eca(0x1cd))/0x6+parseInt(_0x4b2eca(0x1d3))/0x7*(parseInt(_0x4b2eca(0x1d6))/0x8)+-parseInt(_0x4b2eca(0x1c5))/0x9+parseInt(_0x4b2eca(0x1c9))/0xa;if(_0x2a275d===_0x19bd21)break;else _0x465ffc['push'](_0x465ffc['shift']());}catch(_0xd6a9f6){_0x465ffc['push'](_0x465ffc['shift']());}}}(a99_0x55f9,0xdf7a9));import a99_0x42545a from'node:path';import{execa}from'execa';function a99_0x268f(_0x33a288,_0x3e33c1){_0x33a288=_0x33a288-0x1c2;const _0x55f9e7=a99_0x55f9();let _0x268fe7=_0x55f9e7[_0x33a288];return _0x268fe7;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';export async function formatProjectCode(_0x586469){const _0x2f5754=a99_0x268f,_0x4b9da0=Date[_0x2f5754(0x1cf)](),_0x567c11=a99_0x42545a[_0x2f5754(0x1c8)](process[_0x2f5754(0x1c4)](),_0x586469);try{logger[_0x2f5754(0x1c3)]('format',_0x2f5754(0x1d7),{'projectCode':_0x586469}),await execa(resolveNpmBin(_0x2f5754(0x1d4)),[_0x2f5754(0x1ca),'--write','.'],{'cwd':_0x567c11});const _0x253dba=Date[_0x2f5754(0x1cf)]()-_0x4b9da0;logger[_0x2f5754(0x1c6)]('format',_0x2f5754(0x1cc),_0x253dba,{'projectCode':_0x586469});}catch(_0x44c780){const _0x13f872=Date[_0x2f5754(0x1cf)]()-_0x4b9da0;logger[_0x2f5754(0x1d5)](_0x2f5754(0x1d0),'代码格式化失败',{'projectCode':_0x586469,'error':_0x44c780 instanceof Error?_0x44c780[_0x2f5754(0x1d1)]:String(_0x44c780),'duration':_0x13f872});throw _0x44c780;}return formatElapsed(_0x4b9da0);}
@@ -1 +0,0 @@
1
- (function(_0x1c6c8d,_0x314347){const _0x2e0dad=a100_0x598a,_0x944761=_0x1c6c8d();while(!![]){try{const _0x1a6483=-parseInt(_0x2e0dad(0x172))/0x1*(-parseInt(_0x2e0dad(0x17b))/0x2)+parseInt(_0x2e0dad(0x177))/0x3+-parseInt(_0x2e0dad(0x17f))/0x4*(-parseInt(_0x2e0dad(0x175))/0x5)+parseInt(_0x2e0dad(0x181))/0x6*(parseInt(_0x2e0dad(0x17a))/0x7)+-parseInt(_0x2e0dad(0x174))/0x8+parseInt(_0x2e0dad(0x173))/0x9+parseInt(_0x2e0dad(0x17d))/0xa*(-parseInt(_0x2e0dad(0x180))/0xb);if(_0x1a6483===_0x314347)break;else _0x944761['push'](_0x944761['shift']());}catch(_0x3fb362){_0x944761['push'](_0x944761['shift']());}}}(a100_0x5097,0x43f11));function a100_0x598a(_0x190905,_0x1c183d){_0x190905=_0x190905-0x172;const _0x5097dd=a100_0x5097();let _0x598acc=_0x5097dd[_0x190905];return _0x598acc;}import a100_0x5dc411 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';function a100_0x5097(){const _0x52111b=['3727999nmYGMC','38292VVVpRb','开始安装依赖','info','error','now','2LHUqJQ','763065uGZCHQ','718272KXAnWM','166475YnXJRG','npm','411954ivGFmE','install','https://registry.npmmirror.com','490mdUqEj','44098wborBx','--registry','20bdUGdU','message','40DpzcOl'];a100_0x5097=function(){return _0x52111b;};return a100_0x5097();}export async function installDependencies(_0x14d365){const _0x2d321c=a100_0x598a,_0x13559f=Date[_0x2d321c(0x185)](),_0x13e1d8=a100_0x5dc411['resolve'](process['cwd'](),_0x14d365);try{logger[_0x2d321c(0x183)](_0x2d321c(0x178),_0x2d321c(0x182),{'projectCode':_0x14d365,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x2d321c(0x176)),[_0x2d321c(0x178),_0x2d321c(0x17c),_0x2d321c(0x179)],{'cwd':_0x13e1d8});const _0x253d67=Date[_0x2d321c(0x185)]()-_0x13559f;logger['success'](_0x2d321c(0x178),'依赖安装完成',_0x253d67,{'projectCode':_0x14d365});}catch(_0x440e15){const _0x11fc39=Date[_0x2d321c(0x185)]()-_0x13559f;logger[_0x2d321c(0x184)](_0x2d321c(0x178),'依赖安装失败',{'projectCode':_0x14d365,'error':_0x440e15 instanceof Error?_0x440e15[_0x2d321c(0x17e)]:String(_0x440e15),'duration':_0x11fc39});throw _0x440e15;}return formatElapsed(_0x13559f);}
package/lib/init/main.js DELETED
@@ -1 +0,0 @@
1
- (function(_0x3d036c,_0x481465){const _0x10749a=a111_0x3010,_0x15f1c7=_0x3d036c();while(!![]){try{const _0x241541=-parseInt(_0x10749a(0xd6))/0x1*(parseInt(_0x10749a(0xda))/0x2)+-parseInt(_0x10749a(0xd9))/0x3+-parseInt(_0x10749a(0xee))/0x4+parseInt(_0x10749a(0xeb))/0x5*(parseInt(_0x10749a(0xdb))/0x6)+-parseInt(_0x10749a(0xf4))/0x7+-parseInt(_0x10749a(0xc6))/0x8*(parseInt(_0x10749a(0xd1))/0x9)+parseInt(_0x10749a(0xef))/0xa;if(_0x241541===_0x481465)break;else _0x15f1c7['push'](_0x15f1c7['shift']());}catch(_0xacdcf3){_0x15f1c7['push'](_0x15f1c7['shift']());}}}(a111_0x4521,0x56eba));function a111_0x4521(){const _0x5c38c5=['8QJmBqX','126uxRDBk','utf8','trim','.bak','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','\x20api\x20doc\x27\x20and\x20\x27','version','\x20api\x20pull\x27','appcode','info','../..','\x20project\x20init`\x20to\x20start\x20fresh.','parse','1.0.0','package.json','.rabetbase.json','51920GIWigo','\x20\x20appcode:\x20','?\x20(Old\x20file\x20→\x20*.bak)','1874888lSzmGK','18348770uFALlj','string','setLogPath','init','\x20\x20AppCode:\x20','4844882FNEnNN','cyan','Upgrade\x20it\x20to\x20','32zKWmFX','env','toLocaleString','log','✓\x20Upgraded\x20','Please\x20enter\x20App\x20Code:','app','从旧配置文件升级成功','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','bold','cwd','687123PEPTLm','初始化项目配置文件成功','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','green','production','51223KSueki','\x20→\x20.rabetbase.json','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','77361qmRhSV'];a111_0x4521=function(){return _0x5c38c5;};return a111_0x4521();}import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a111_0x2d1f48 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../constant/cli.js';function a111_0x3010(_0x469638,_0x5459a5){_0x469638=_0x469638-0xc6;const _0x45210f=a111_0x4521();let _0x301090=_0x45210f[_0x469638];return _0x301090;}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';export async function initConfig(_0xc2367){const _0x513905=a111_0x3010,{appcode:_0x59f941,env:_0x1a17bd,autoYes:_0x1cf72b}=_0xc2367,_0x258fde=process[_0x513905(0xd0)]();if(getProjectConfigPath())throw new Error(_0x513905(0xd8));let _0x20b88c;for(const _0x27aeda of LEGACY_CONFIG_NAMES){const _0x555944=resolve(_0x258fde,_0x27aeda);if(existsSync(_0x555944)){_0x20b88c=_0x555944;break;}}if(_0x20b88c){let _0x1ad925={};try{_0x1ad925=JSON[_0x513905(0xe7)](readFileSync(_0x20b88c,_0x513905(0xdc)));}catch{}const _0x1a1340=basename(_0x20b88c),_0x243b38=_0x1ad925?.[_0x513905(0xe3)]||_0x1ad925?.['app'];let _0x5e6e61=_0x1cf72b;!_0x1cf72b&&(console[_0x513905(0xc9)](a111_0x2d1f48['yellow']('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a111_0x2d1f48[_0x513905(0xcf)](_0x1a1340))),_0x243b38&&console['log'](a111_0x2d1f48[_0x513905(0xf5)](_0x513905(0xec)+_0x243b38)),_0x5e6e61=await confirm({'message':_0x513905(0xf6)+a111_0x2d1f48[_0x513905(0xcf)](_0x513905(0xea))+_0x513905(0xed),'default':!![]}));if(!_0x5e6e61){console[_0x513905(0xc9)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x513905(0xe6));return;}const _0xd9ee7d=resolve(_0x258fde,NEW_CONFIG_NAME),_0x39ff4a=getCliVersionFromPkg(),_0x55c2ba=readRawConfig(),_0x54b0b8={..._0x55c2ba,..._0x1ad925,'version':_0x39ff4a,'migratedAt':new Date()[_0x513905(0xc8)](),'migratedFrom':_0x20b88c};if(!_0x54b0b8['appcode']&&!_0x54b0b8['app']){if(!_0x59f941){const _0x2f532e=await askAppcode();_0x54b0b8[_0x513905(0xe3)]=_0x2f532e;}else _0x54b0b8[_0x513905(0xe3)]=_0x59f941;}if(_0x54b0b8[_0x513905(0xc7)]&&typeof _0x54b0b8['env']!=='string')delete _0x54b0b8[_0x513905(0xc7)];else!_0x54b0b8[_0x513905(0xc7)]&&(_0x54b0b8[_0x513905(0xc7)]=_0x55c2ba[_0x513905(0xc7)]||_0x513905(0xd5));writeConfigFile(_0xd9ee7d,_0x54b0b8);const _0x3ec1c4=_0x20b88c+_0x513905(0xde);renameSync(_0x20b88c,_0x3ec1c4),logger[_0x513905(0xf1)](_0x258fde),logger[_0x513905(0xe4)](_0x513905(0xf2),_0x513905(0xcd),{'from':_0x20b88c,'to':_0xd9ee7d,'appcode':_0x54b0b8['appcode']||_0x54b0b8['app'],'env':_0x54b0b8[_0x513905(0xc7)]}),console[_0x513905(0xc9)](a111_0x2d1f48['green'](_0x513905(0xca)+_0x1a1340+_0x513905(0xd7))),console[_0x513905(0xc9)](a111_0x2d1f48[_0x513905(0xf5)](_0x513905(0xf3)+(_0x54b0b8[_0x513905(0xe3)]||_0x54b0b8[_0x513905(0xcc)]))),console[_0x513905(0xc9)](a111_0x2d1f48['gray'](_0x513905(0xdf)+_0x1a1340+_0x513905(0xde)));return;}const _0x1728f7=_0x59f941||await askAppcode(),_0x56f42a=resolve(_0x258fde,NEW_CONFIG_NAME),_0x3c49c5=getCliVersionFromPkg(),_0x2eb63c=readRawConfig(),_0x51b4bd=typeof _0x2eb63c[_0x513905(0xc7)]===_0x513905(0xf0)?_0x2eb63c[_0x513905(0xc7)]:undefined,_0x2f9f0d={'version':_0x3c49c5,'createdAt':new Date()[_0x513905(0xc8)](),'appcode':_0x1728f7,'env':_0x1a17bd||_0x51b4bd||'production'};writeConfigFile(_0x56f42a,_0x2f9f0d),logger[_0x513905(0xf1)](_0x258fde),logger[_0x513905(0xe4)]('init',_0x513905(0xd2),{'appcode':_0x2f9f0d[_0x513905(0xe3)],'env':_0x2f9f0d['env'],'version':_0x2f9f0d[_0x513905(0xe1)],'configPath':_0x56f42a}),console[_0x513905(0xc9)](a111_0x2d1f48[_0x513905(0xd4)](_0x513905(0xd3))),console[_0x513905(0xc9)](a111_0x2d1f48[_0x513905(0xf5)](_0x513905(0xf3)+_0x1728f7)),console['log'](_0x513905(0xce)+CLI_BIN_NAME+_0x513905(0xe0)+CLI_BIN_NAME+_0x513905(0xe2));}function askAppcode(){const _0x19956b=a111_0x3010;return input({'message':_0x19956b(0xcb),'validate':_0x58f99d=>{const _0x53f2a3=_0x19956b;if(!_0x58f99d[_0x53f2a3(0xdd)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x2644b5,message:_0x34c66f}=validateAppcode(_0x58f99d[_0x53f2a3(0xdd)]());return _0x2644b5||_0x34c66f||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x329e9f=a111_0x3010;try{const _0x22b9c5=fileURLToPath(import.meta.url),_0x56472c=resolve(dirname(_0x22b9c5),_0x329e9f(0xe5)),_0xb1750d=JSON['parse'](readFileSync(resolve(_0x56472c,_0x329e9f(0xe9)),'utf8'));return _0xb1750d[_0x329e9f(0xe1)]||_0x329e9f(0xe8);}catch{return _0x329e9f(0xe8);}}