@lovrabet/rabetbase-cli 2.0.2-beta.9 → 2.0.4-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +4 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/doc.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/app/add.js +1 -0
  19. package/lib/commands/app/index.js +1 -0
  20. package/lib/commands/app/list.js +1 -0
  21. package/lib/commands/app/remote.js +1 -0
  22. package/lib/commands/app/remove.js +1 -0
  23. package/lib/commands/app/shared.js +1 -0
  24. package/lib/commands/app/use.js +1 -0
  25. package/lib/commands/auth.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/build.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -0
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -0
  42. package/lib/commands/config/get.js +1 -0
  43. package/lib/commands/config/index.js +1 -0
  44. package/lib/commands/config/list.js +1 -0
  45. package/lib/commands/config/set.js +1 -0
  46. package/lib/commands/config/shared.js +1 -0
  47. package/lib/commands/create.js +1 -1
  48. package/lib/commands/dataset/detail.js +1 -1
  49. package/lib/commands/dataset/index.js +1 -1
  50. package/lib/commands/dataset/links.js +1 -1
  51. package/lib/commands/dataset/list.js +1 -1
  52. package/lib/commands/dataset/operations.js +1 -1
  53. package/lib/commands/doctor.js +1 -1
  54. package/lib/commands/init.js +1 -1
  55. package/lib/commands/logout.js +1 -1
  56. package/lib/commands/logs.js +1 -1
  57. package/lib/commands/menu/index.js +1 -1
  58. package/lib/commands/menu/shared/compare-table.js +1 -1
  59. package/lib/commands/menu/shared/index.js +1 -1
  60. package/lib/commands/menu/shared/inquirer.js +1 -1
  61. package/lib/commands/menu/shared/local-pages.js +1 -1
  62. package/lib/commands/menu/shared/logic.js +1 -1
  63. package/lib/commands/menu/shared/service.js +1 -1
  64. package/lib/commands/menu/shared/sync-core.js +1 -1
  65. package/lib/commands/menu/shared/update-core.js +1 -1
  66. package/lib/commands/menu/shared/valid-url.js +1 -1
  67. package/lib/commands/menu/sync.js +1 -1
  68. package/lib/commands/menu/update.js +1 -1
  69. package/lib/commands/preview.js +1 -1
  70. package/lib/commands/project-upgrade.js +1 -1
  71. package/lib/commands/registry.js +1 -1
  72. package/lib/commands/run.js +1 -1
  73. package/lib/commands/skill.js +1 -1
  74. package/lib/commands/smart-init.js +1 -0
  75. package/lib/commands/sql/detail.js +1 -1
  76. package/lib/commands/sql/exec.js +1 -1
  77. package/lib/commands/sql/index.js +1 -1
  78. package/lib/commands/sql/list.js +1 -1
  79. package/lib/commands/sql/save.js +1 -1
  80. package/lib/commands/sql/validate.js +1 -1
  81. package/lib/commands/start.js +1 -1
  82. package/lib/constant/cli.js +1 -1
  83. package/lib/constant/domain.js +1 -1
  84. package/lib/constant/env.js +1 -1
  85. package/lib/context.js +1 -1
  86. package/lib/core/alias-resolver.js +1 -1
  87. package/lib/core/api-client.js +1 -1
  88. package/lib/core/bff/config.js +1 -1
  89. package/lib/core/bff/file-system.js +1 -1
  90. package/lib/core/bff/hash.js +1 -1
  91. package/lib/core/bff/lock.js +1 -1
  92. package/lib/core/bff/utils.js +1 -1
  93. package/lib/core/db-resolver.js +1 -1
  94. package/lib/core/sql-validator.js +1 -1
  95. package/lib/create-app/enhanced-guided-create.js +1 -1
  96. package/lib/create-app/format-elapsed.js +1 -1
  97. package/lib/create-app/main.js +1 -1
  98. package/lib/create-app/non-interactive.js +1 -1
  99. package/lib/create-app/use-copy-project-template.js +1 -1
  100. package/lib/create-app/use-format-code.js +1 -1
  101. package/lib/create-app/use-install-dependencies.js +1 -1
  102. package/lib/errors.js +1 -1
  103. package/lib/framework/flags.js +1 -1
  104. package/lib/framework/help.js +1 -1
  105. package/lib/framework/index.js +1 -1
  106. package/lib/framework/output.js +1 -1
  107. package/lib/framework/response.js +1 -1
  108. package/lib/framework/runner.js +1 -1
  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/init/main.js +1 -1
  113. package/lib/skills/main.js +1 -1
  114. package/lib/skills/npx-skills-add.js +1 -1
  115. package/lib/telemetry/cli-help-trace.js +1 -1
  116. package/lib/telemetry/ensure-cli-otel-config.js +1 -0
  117. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  118. package/lib/telemetry/send-cli-trace-log.js +1 -0
  119. package/lib/utils/ai_config.js +1 -1
  120. package/lib/utils/cdn-config.js +1 -1
  121. package/lib/utils/check-sdk-version.js +1 -1
  122. package/lib/utils/cli-version-check.js +1 -1
  123. package/lib/utils/config.js +1 -1
  124. package/lib/utils/copy-directory.js +1 -1
  125. package/lib/utils/file-utils.js +1 -1
  126. package/lib/utils/guides-cdn.js +1 -1
  127. package/lib/utils/http-client.js +1 -1
  128. package/lib/utils/is-non-interactive.js +1 -0
  129. package/lib/utils/logger.js +1 -1
  130. package/lib/utils/platform.js +1 -1
  131. package/lib/utils/rules-cdn.js +1 -1
  132. package/lib/utils/sleep.js +1 -1
  133. package/lib/utils/template-replacer.js +1 -1
  134. package/lib/utils/version.js +1 -0
  135. package/lib/utils/with-active-cookie.js +1 -0
  136. package/package.json +7 -11
  137. package/lib/commands/app.js +0 -1
  138. package/lib/commands/config.js +0 -1
  139. package/lib/config/config-help.js +0 -1
  140. package/lib/config/main.js +0 -1
  141. package/lib/create-app/task-finished.js +0 -1
  142. package/lib/create-app/task-loading.js +0 -1
  143. package/lib/create-app/task-running.js +0 -1
  144. package/lib/create-app/task-time.js +0 -1
@@ -1 +1 @@
1
- (function(_0x52d214,_0x3870ae){var _0x5b2aee=a100_0x37c6,_0x49abf3=_0x52d214();while(!![]){try{var _0x231f73=parseInt(_0x5b2aee(0x1ef))/0x1*(-parseInt(_0x5b2aee(0x1ee))/0x2)+-parseInt(_0x5b2aee(0x1f2))/0x3+-parseInt(_0x5b2aee(0x1eb))/0x4+parseInt(_0x5b2aee(0x1f6))/0x5*(parseInt(_0x5b2aee(0x1f4))/0x6)+-parseInt(_0x5b2aee(0x1f5))/0x7*(parseInt(_0x5b2aee(0x1ed))/0x8)+parseInt(_0x5b2aee(0x1e9))/0x9+-parseInt(_0x5b2aee(0x1f0))/0xa*(-parseInt(_0x5b2aee(0x1f1))/0xb);if(_0x231f73===_0x3870ae)break;else _0x49abf3['push'](_0x49abf3['shift']());}catch(_0x2b2d69){_0x49abf3['push'](_0x49abf3['shift']());}}}(a100_0x460b,0xb6d2a));export function extractList(_0x2d12f5){var _0x5a6d12=a100_0x37c6;if(Array['isArray'](_0x2d12f5))return _0x2d12f5;if(_0x2d12f5&&typeof _0x2d12f5===_0x5a6d12(0x1f3))return _0x2d12f5[_0x5a6d12(0x1ea)]??[];return[];}export function extractPaging(_0xadf6ed){var _0x376626=a100_0x37c6;if(_0xadf6ed&&typeof _0xadf6ed===_0x376626(0x1f3)&&!Array['isArray'](_0xadf6ed))return _0xadf6ed[_0x376626(0x1ec)];return undefined;}function a100_0x37c6(_0x5a7eb1,_0x293994){_0x5a7eb1=_0x5a7eb1-0x1e9;var _0x460b8b=a100_0x460b();var _0x37c60f=_0x460b8b[_0x5a7eb1];return _0x37c60f;}function a100_0x460b(){var _0x307092=['766yKvGXk','679XLEIDG','28500980gXXfzb','11gkQHbp','3489210HtSCay','object','126fmdRJu','105FswRtf','225905IPerss','5001147IdtXDx','tableData','2904392EaPxUY','paging','776808YcaxyK'];a100_0x460b=function(){return _0x307092;};return a100_0x460b();}
1
+ (function(_0x8b41b0,_0x2795f9){var _0x4745a9=a107_0xdf14,_0x54358e=_0x8b41b0();while(!![]){try{var _0x5f1c3d=parseInt(_0x4745a9(0xe4))/0x1*(parseInt(_0x4745a9(0xea))/0x2)+-parseInt(_0x4745a9(0xe5))/0x3*(parseInt(_0x4745a9(0xde))/0x4)+parseInt(_0x4745a9(0xe9))/0x5+parseInt(_0x4745a9(0xe7))/0x6*(-parseInt(_0x4745a9(0xe0))/0x7)+parseInt(_0x4745a9(0xdd))/0x8*(-parseInt(_0x4745a9(0xe8))/0x9)+parseInt(_0x4745a9(0xe1))/0xa+-parseInt(_0x4745a9(0xe6))/0xb;if(_0x5f1c3d===_0x2795f9)break;else _0x54358e['push'](_0x54358e['shift']());}catch(_0x5183b0){_0x54358e['push'](_0x54358e['shift']());}}}(a107_0x5561,0x256ee));export function extractList(_0x2cd115){var _0x4de803=a107_0xdf14;if(Array[_0x4de803(0xe3)](_0x2cd115))return _0x2cd115;if(_0x2cd115&&typeof _0x2cd115===_0x4de803(0xe2))return _0x2cd115[_0x4de803(0xdf)]??[];return[];}function a107_0xdf14(_0x5b3148,_0x297ae2){_0x5b3148=_0x5b3148-0xdd;var _0x55618b=a107_0x5561();var _0xdf1476=_0x55618b[_0x5b3148];return _0xdf1476;}function a107_0x5561(){var _0x1a3941=['isArray','26042NCLSSc','21PbsqjI','680691OwMYff','47154JNlSDM','45BTgPOW','754820xzxsnc','22lwVyaI','paging','75792OscEzJ','45836sXIORS','tableData','126XOVrCZ','468260VfqxqN','object'];a107_0x5561=function(){return _0x1a3941;};return a107_0x5561();}export function extractPaging(_0x179433){var _0x210a9d=a107_0xdf14;if(_0x179433&&typeof _0x179433==='object'&&!Array[_0x210a9d(0xe3)](_0x179433))return _0x179433[_0x210a9d(0xeb)];return undefined;}
@@ -1 +1 @@
1
- (function(_0xacef01,_0x3e65d2){const _0x3d9741=a101_0x2e28,_0x182323=_0xacef01();while(!![]){try{const _0x365660=-parseInt(_0x3d9741(0xd4))/0x1*(parseInt(_0x3d9741(0x107))/0x2)+parseInt(_0x3d9741(0xe8))/0x3*(parseInt(_0x3d9741(0x118))/0x4)+-parseInt(_0x3d9741(0xf7))/0x5+parseInt(_0x3d9741(0x102))/0x6+parseInt(_0x3d9741(0xf4))/0x7*(-parseInt(_0x3d9741(0xe2))/0x8)+parseInt(_0x3d9741(0x106))/0x9+parseInt(_0x3d9741(0xee))/0xa*(parseInt(_0x3d9741(0xd1))/0xb);if(_0x365660===_0x3e65d2)break;else _0x182323['push'](_0x182323['shift']());}catch(_0x1a7ada){_0x182323['push'](_0x182323['shift']());}}}(a101_0x409f,0x5549f));import{parseFlags,validateFlags}from'./flags.js';function a101_0x2e28(_0x3c0caa,_0x1f9554){_0x3c0caa=_0x3c0caa-0xd1;const _0x409f1c=a101_0x409f();let _0x2e28a8=_0x409f1c[_0x3c0caa];return _0x2e28a8;}import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';function a101_0x409f(){const _0x3b25b4=['format','\x20\x20Set\x20riskLevel\x20in\x20.rabetbase.json\x20or\x20RABETBASE_RISK_LEVEL\x20to\x20allow\x20this\x20operation.','3581892AjYkLV','\x0a\x20\x20\x20Continue?\x20[y/N]\x20','json','defaultPageSize','2435049VbwkmL','589654RgZPWf','code','stdin','node:readline','Available\x20aliases:\x20','service','toLowerCase','string','command','dry-run','nonInteractive','validate','`\x20has\x20risk\x20level\x20\x22','isNonInteractive','execute','defaultVerbose','risk','8aVdbPo','rawFlags','read','121dopqdl','--dry-run\x20is\x20not\x20supported\x20for\x20`','../core/api-client.js','1knOrTp','Unknown\x20alias\x20\x22','hasFormat','validation','appCode','authRequired','close','`\x20requires\x20either\x20--code\x20or\x20--alias.','some','dryRun','\x22.\x20','map','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','question','1448616AYYXGA','flags','alias','configMissing','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','length','234054CaKhaP','verbose','pretty','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','apiDir','riskLevel','454210ygoZhY','resolveAppCode','yes','Operation\x20cancelled\x20by\x20user.','requiresAuth','\x20api\x20pull`\x20first.','14nchVjG','type','./src/api','2584430OuEGYv','Command\x20`','defaultFormat','join','name','Set\x20appcode\x20via\x20`','⚠\x20\x20High-risk\x20operation:\x20','apiDomain','selectedAppName'];a101_0x409f=function(){return _0x3b25b4;};return a101_0x409f();}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export async function runCommand(_0xd8a345,_0x146fb8){const _0x105632=a101_0x2e28,_0x96717b=CLI_BIN_NAME+'\x20'+_0xd8a345[_0x105632(0x10c)]+'\x20'+_0xd8a345[_0x105632(0x10f)],_0x32e0f2=parseFlags(_0xd8a345['flags'],_0x146fb8[_0x105632(0x119)]);validateFlags(_0xd8a345[_0x105632(0xe3)],_0x32e0f2,_0x96717b);if(!_0x32e0f2[_0x105632(0x110)]&&_0x146fb8[_0x105632(0xed)]&&riskLevelOrder(_0xd8a345['risk'])>riskLevelOrder(_0x146fb8['riskLevel']))throw CliErrors[_0x105632(0xd7)](_0x105632(0xf8)+_0x96717b+_0x105632(0x113)+_0xd8a345[_0x105632(0x117)]+_0x105632(0xe6)+_0x146fb8[_0x105632(0xed)]+'\x22.\x0a'+_0x105632(0x101));const _0x6f9b22=_0x146fb8[_0x105632(0xec)]||_0x105632(0xf6);resolveAliasToCode(_0xd8a345,_0x32e0f2,_0x6f9b22,_0x96717b);let _0x59e46f='';if(_0xd8a345[_0x105632(0xf2)]!==![]){_0x59e46f=_0x146fb8['resolveCookie']();if(!_0x59e46f)throw CliErrors[_0x105632(0xd9)]();const {setActiveCookie:_0x3f15d2}=await import(_0x105632(0xd3));_0x3f15d2(_0x59e46f);}let _0x1bd880='';if(_0xd8a345['requiresAppCode']!==![]){_0x1bd880=_0x146fb8[_0x105632(0xef)]()??'';if(!_0x1bd880)throw CliErrors[_0x105632(0xe5)](_0x105632(0xfc)+CLI_BIN_NAME+_0x105632(0xe0));}const _0x99ff20=resolveFormat(_0x32e0f2,_0xd8a345,_0x146fb8[_0x105632(0xf9)]),_0x4acdd4=buildRuntimeContext({'appCode':_0x1bd880,'cookie':_0x59e46f,'apiDomain':_0x146fb8['resolveApiDomain'](),'format':_0x99ff20,'flags':_0x32e0f2,'def':_0xd8a345,'nonInteractive':_0x146fb8['isNonInteractive'],'defaultPageSize':_0x146fb8[_0x105632(0x105)],'defaultVerbose':_0x146fb8[_0x105632(0x116)],'apiDir':_0x6f9b22,'selectedAppName':_0x146fb8[_0x105632(0xff)]});_0xd8a345[_0x105632(0x112)]&&await _0xd8a345[_0x105632(0x112)](_0x4acdd4);if(_0x32e0f2[_0x105632(0x110)]){if(!_0xd8a345[_0x105632(0xdd)])throw CliErrors[_0x105632(0xd7)](_0x105632(0xd2)+_0x96717b+'`.');const _0x2d7c0a=await _0xd8a345[_0x105632(0xdd)](_0x4acdd4);formatOutput({'ok':!![],'data':_0x2d7c0a},{'command':_0x96717b,'risk':_0xd8a345['risk'],'format':_0x99ff20,'dryRun':!![]});return;}if(_0xd8a345[_0x105632(0x117)]==='high-risk-write'&&!_0x32e0f2['yes']){if(_0x146fb8[_0x105632(0x114)])throw CliErrors[_0x105632(0xd7)]('High-risk\x20operation\x20`'+_0x96717b+_0x105632(0xeb));await requireConfirmation(_0x96717b);}const _0x56c11b=await _0xd8a345[_0x105632(0x115)](_0x4acdd4);formatOutput(_0x56c11b,{'command':_0x96717b,'risk':_0xd8a345['risk'],'format':_0x99ff20});}function buildRuntimeContext(_0x358a8b){const _0xd09f6f=a101_0x2e28,{flags:_0xd7c623,def:_0xa0c41b}=_0x358a8b,_0x474e8f=CLI_BIN_NAME+'\x20'+_0xa0c41b[_0xd09f6f(0x10c)]+'\x20'+_0xa0c41b[_0xd09f6f(0x10f)];return{'appCode':_0x358a8b[_0xd09f6f(0xd8)],'cookie':_0x358a8b['cookie'],'apiDomain':_0x358a8b[_0xd09f6f(0xfe)],'format':_0x358a8b[_0xd09f6f(0x100)],'nonInteractive':_0x358a8b[_0xd09f6f(0x111)],'apiDir':_0x358a8b[_0xd09f6f(0xec)],'selectedAppName':_0x358a8b[_0xd09f6f(0xff)],'str'(_0x2738ed){return String(_0xd7c623[_0x2738ed]??'');},'bool'(_0x467cb4){const _0x10f6ae=_0xd09f6f;if(_0xd7c623[_0x467cb4]===!![])return!![];if(_0x467cb4===_0x10f6ae(0xe9)&&_0x358a8b[_0x10f6ae(0x116)])return!![];return![];},'num'(_0x3446be,_0x2c8c7d){const _0x1e5d75=_0xd09f6f,_0x5bb6e0=_0xd7c623[_0x3446be];if(typeof _0x5bb6e0==='number')return _0x5bb6e0;if(_0x3446be==='pagesize'&&_0x358a8b[_0x1e5d75(0x105)]!=null)return _0x358a8b['defaultPageSize'];return _0x2c8c7d??0x0;},'flag'(_0x28023c){return _0xd7c623[_0x28023c];},'output'(_0x362f64){const _0x3a0845=_0xd09f6f;formatOutput(_0x362f64,{'command':_0x474e8f,'risk':_0xa0c41b[_0x3a0845(0x117)],'format':_0x358a8b[_0x3a0845(0x100)]});}};}function resolveFormat(_0x2789a4,_0x594c22,_0x11a93f){const _0xc81472=a101_0x2e28;if(_0x594c22[_0xc81472(0xd6)]===![])return _0xc81472(0xea);const _0x502438=_0x2789a4[_0xc81472(0x100)];if(_0x502438===_0xc81472(0x104)||_0x502438==='pretty'||_0x502438==='table')return _0x502438;if(_0x11a93f)return _0x11a93f;return'pretty';}async function requireConfirmation(_0x4364b0){const _0x35e290=a101_0x2e28,_0x5a2546=await import(_0x35e290(0x10a)),_0x2f2b17=_0x5a2546['createInterface']({'input':process[_0x35e290(0x109)],'output':process['stderr']});return new Promise((_0x4f35c1,_0x463599)=>{const _0x47da23=_0x35e290;_0x2f2b17[_0x47da23(0xe1)](_0x47da23(0xfd)+_0x4364b0+_0x47da23(0x103),_0x4a39ec=>{const _0x1dea46=_0x47da23;_0x2f2b17[_0x1dea46(0xda)](),_0x4a39ec['toLowerCase']()==='y'||_0x4a39ec[_0x1dea46(0x10d)]()===_0x1dea46(0xf0)?_0x4f35c1():_0x463599(CliErrors['cancelled'](_0x1dea46(0xf1)));});});}const RISK_ORDER={'read':0x0,'write':0x1,'high-risk-write':0x2};function riskLevelOrder(_0x1a2f9f){const _0x5e6e10=a101_0x2e28;return RISK_ORDER[_0x1a2f9f??_0x5e6e10(0x11a)]??0x0;}function resolveAliasToCode(_0x196b84,_0x2066fb,_0x3c8297,_0x46f1c8){const _0x3f4996=a101_0x2e28,_0x4b2fcc=_0x196b84['flags'][_0x3f4996(0xdc)](_0x3585bd=>_0x3585bd[_0x3f4996(0xfb)]===_0x3f4996(0x108)&&_0x3585bd[_0x3f4996(0xf5)]===_0x3f4996(0x10e)),_0x4c0d65=_0x196b84['flags'][_0x3f4996(0xdc)](_0x3dfc63=>_0x3dfc63[_0x3f4996(0xfb)]===_0x3f4996(0xe4)&&_0x3dfc63[_0x3f4996(0xf5)]===_0x3f4996(0x10e));if(!_0x4b2fcc||!_0x4c0d65)return;const _0x252510=_0x2066fb[_0x3f4996(0x108)]?String(_0x2066fb[_0x3f4996(0x108)]):'',_0x13606=_0x2066fb[_0x3f4996(0xe4)]?String(_0x2066fb['alias']):'';if(!_0x252510&&!_0x13606)throw CliErrors[_0x3f4996(0xd7)]('`'+_0x46f1c8+_0x3f4996(0xdb));if(_0x13606&&!_0x252510){const _0x5d89a4=resolveAlias(_0x3c8297,_0x13606);if(!_0x5d89a4){const _0x2f8ebf=listAliases(_0x3c8297)[_0x3f4996(0xdf)](_0x45276b=>_0x45276b[_0x3f4996(0xe4)]),_0x52ddfa=_0x2f8ebf[_0x3f4996(0xe7)]?_0x3f4996(0x10b)+_0x2f8ebf[_0x3f4996(0xfa)](',\x20'):'No\x20api.ts\x20found\x20in\x20'+_0x3c8297+'.\x20Run\x20`'+CLI_BIN_NAME+_0x3f4996(0xf3);throw CliErrors[_0x3f4996(0xd7)](_0x3f4996(0xd5)+_0x13606+_0x3f4996(0xde)+_0x52ddfa);}_0x2066fb['code']=_0x5d89a4;}}
1
+ (function(_0x45fff4,_0x144ef4){const _0x14a324=a108_0x12b1,_0xaed90e=_0x45fff4();while(!![]){try{const _0x3fb7a9=parseInt(_0x14a324(0x17b))/0x1+-parseInt(_0x14a324(0x16c))/0x2+-parseInt(_0x14a324(0x15f))/0x3+-parseInt(_0x14a324(0x17e))/0x4*(parseInt(_0x14a324(0x185))/0x5)+-parseInt(_0x14a324(0x158))/0x6+parseInt(_0x14a324(0x18a))/0x7+parseInt(_0x14a324(0x192))/0x8;if(_0x3fb7a9===_0x144ef4)break;else _0xaed90e['push'](_0xaed90e['shift']());}catch(_0x1cccf4){_0xaed90e['push'](_0xaed90e['shift']());}}}(a108_0x5e2a,0x29034));import{riskLevelOrder}from'./types.js';import{parseFlags,validateFlags}from'./flags.js';import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export async function runCommand(_0x118277,_0x5b96f4){const _0x37754f=a108_0x12b1,_0x267281=CLI_BIN_NAME+'\x20'+_0x118277['service']+'\x20'+_0x118277[_0x37754f(0x17a)],_0x5cbeab=parseFlags(_0x118277[_0x37754f(0x182)],_0x5b96f4[_0x37754f(0x193)]);validateFlags(_0x118277['flags'],_0x5cbeab,_0x267281);if(!_0x5cbeab[_0x37754f(0x188)]&&_0x5b96f4[_0x37754f(0x197)]&&riskLevelOrder(_0x118277[_0x37754f(0x184)])>riskLevelOrder(_0x5b96f4['riskLevel']))throw CliErrors[_0x37754f(0x18c)]('Command\x20`'+_0x267281+'`\x20has\x20risk\x20level\x20\x22'+_0x118277['risk']+_0x37754f(0x172)+_0x5b96f4['riskLevel']+_0x37754f(0x165)+_0x37754f(0x180));const _0x29b449=_0x5b96f4['apiDir']||_0x37754f(0x15b);resolveAliasToCode(_0x118277,_0x5cbeab,_0x29b449,_0x267281);let _0x316d9f='';if(_0x118277[_0x37754f(0x187)]!==![]){_0x316d9f=_0x5b96f4[_0x37754f(0x16e)]();if(!_0x316d9f)throw CliErrors[_0x37754f(0x15d)]();const {setActiveCookie:_0x48edfb}=await import('../core/api-client.js');_0x48edfb(_0x316d9f);}let _0x1341d8='';if(_0x118277[_0x37754f(0x17c)]!==![]){_0x1341d8=_0x5b96f4[_0x37754f(0x168)]()??'';if(!_0x1341d8)throw CliErrors[_0x37754f(0x186)]('Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}const _0x416357=resolveFormat(_0x5cbeab,_0x118277,_0x5b96f4[_0x37754f(0x164)]),_0x4866c9=buildRuntimeContext({'appCode':_0x1341d8,'cookie':_0x316d9f,'apiDomain':_0x5b96f4[_0x37754f(0x166)](),'format':_0x416357,'flags':_0x5cbeab,'def':_0x118277,'nonInteractive':_0x5b96f4['isNonInteractive'],'defaultPageSize':_0x5b96f4[_0x37754f(0x161)],'defaultVerbose':_0x5b96f4[_0x37754f(0x17d)],'apiDir':_0x29b449,'selectedAppName':_0x5b96f4[_0x37754f(0x160)]});_0x118277['validate']&&await _0x118277[_0x37754f(0x16f)](_0x4866c9);if(_0x5cbeab[_0x37754f(0x188)]){if(!_0x118277[_0x37754f(0x181)])throw CliErrors['validation'](_0x37754f(0x175)+_0x267281+'`.');const _0x5863bf=await _0x118277[_0x37754f(0x181)](_0x4866c9);formatOutput({'ok':!![],'data':_0x5863bf},{'command':_0x267281,'risk':_0x118277[_0x37754f(0x184)],'format':_0x416357,'dryRun':!![]});return;}if(_0x118277[_0x37754f(0x184)]==='high-risk-write'&&!_0x5cbeab[_0x37754f(0x199)]){if(_0x5b96f4[_0x37754f(0x18f)])throw CliErrors[_0x37754f(0x18c)](_0x37754f(0x159)+_0x267281+_0x37754f(0x18b));await requireConfirmation(_0x267281);}const _0x3e0480=await _0x118277['execute'](_0x4866c9);formatOutput(_0x3e0480,{'command':_0x267281,'risk':_0x118277[_0x37754f(0x184)],'format':_0x416357});}function a108_0x5e2a(){const _0x3a650e=['alias','\x22.\x20','riskLevel','string','yes','963768fWkpRe','High-risk\x20operation\x20`','apiDir','./src/api','verbose','authRequired','pretty','809805sERjfl','selectedAppName','defaultPageSize','⚠\x20\x20High-risk\x20operation:\x20','format','defaultFormat','\x22.\x0a','resolveApiDomain','number','resolveAppCode','nonInteractive','pagesize','table','150338YoZJVi','json','resolveCookie','validate','name','service','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','toLowerCase','some','--dry-run\x20is\x20not\x20supported\x20for\x20`','\x20api\x20pull`\x20first.','question','cancelled','\x0a\x20\x20\x20Continue?\x20[y/N]\x20','command','197513vWZGEL','requiresAppCode','defaultVerbose','25964llrcCJ','Operation\x20cancelled\x20by\x20user.','\x20\x20Set\x20riskLevel\x20in\x20.rabetbase.json\x20or\x20RABETBASE_RISK_LEVEL\x20to\x20allow\x20this\x20operation.','dryRun','flags','node:readline','risk','80eJhses','configMissing','requiresAuth','dry-run','createInterface','1552684jkWBVU','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','validation','.\x20Run\x20`','length','isNonInteractive','No\x20api.ts\x20found\x20in\x20','`\x20requires\x20either\x20--code\x20or\x20--alias.','2866008jRAnce','rawFlags','code'];a108_0x5e2a=function(){return _0x3a650e;};return a108_0x5e2a();}function buildRuntimeContext(_0x1e7d3c){const _0x378bb5=a108_0x12b1,{flags:_0x3531e3,def:_0x306427}=_0x1e7d3c,_0x333e5b=CLI_BIN_NAME+'\x20'+_0x306427[_0x378bb5(0x171)]+'\x20'+_0x306427['command'];return{'appCode':_0x1e7d3c['appCode'],'cookie':_0x1e7d3c['cookie'],'apiDomain':_0x1e7d3c['apiDomain'],'format':_0x1e7d3c[_0x378bb5(0x163)],'nonInteractive':_0x1e7d3c[_0x378bb5(0x169)],'apiDir':_0x1e7d3c[_0x378bb5(0x15a)],'selectedAppName':_0x1e7d3c[_0x378bb5(0x160)],'str'(_0x57e914){return String(_0x3531e3[_0x57e914]??'');},'bool'(_0x42ffee){const _0x25ce42=_0x378bb5;if(_0x3531e3[_0x42ffee]===!![])return!![];if(_0x42ffee===_0x25ce42(0x15c)&&_0x1e7d3c[_0x25ce42(0x17d)])return!![];return![];},'num'(_0x3b911e,_0x2142f9){const _0x15e570=_0x378bb5,_0x176917=_0x3531e3[_0x3b911e];if(typeof _0x176917===_0x15e570(0x167))return _0x176917;if(_0x3b911e===_0x15e570(0x16a)&&_0x1e7d3c[_0x15e570(0x161)]!=null)return _0x1e7d3c[_0x15e570(0x161)];return _0x2142f9??0x0;},'flag'(_0x42c149){return _0x3531e3[_0x42c149];},'output'(_0x4c46c1){const _0x87dd32=_0x378bb5;formatOutput(_0x4c46c1,{'command':_0x333e5b,'risk':_0x306427[_0x87dd32(0x184)],'format':_0x1e7d3c['format']});}};}function a108_0x12b1(_0x3ee927,_0x11abec){_0x3ee927=_0x3ee927-0x158;const _0x5e2a4=a108_0x5e2a();let _0x12b159=_0x5e2a4[_0x3ee927];return _0x12b159;}function resolveFormat(_0xe3ed45,_0x3ffae7,_0x4f8801){const _0x2bcd5a=a108_0x12b1;if(_0x3ffae7['hasFormat']===![])return'pretty';const _0x277d29=_0xe3ed45[_0x2bcd5a(0x163)];if(_0x277d29===_0x2bcd5a(0x16d)||_0x277d29==='pretty'||_0x277d29===_0x2bcd5a(0x16b))return _0x277d29;if(_0x4f8801)return _0x4f8801;return _0x2bcd5a(0x15e);}async function requireConfirmation(_0x3c4d44){const _0x4d7a49=a108_0x12b1,_0x411b66=await import(_0x4d7a49(0x183)),_0x204bfc=_0x411b66[_0x4d7a49(0x189)]({'input':process['stdin'],'output':process['stderr']});return new Promise((_0x131a25,_0x4a4076)=>{const _0x3374d3=_0x4d7a49;_0x204bfc[_0x3374d3(0x177)](_0x3374d3(0x162)+_0x3c4d44+_0x3374d3(0x179),_0x447a5a=>{const _0x5b2551=_0x3374d3;_0x204bfc['close'](),_0x447a5a[_0x5b2551(0x173)]()==='y'||_0x447a5a[_0x5b2551(0x173)]()===_0x5b2551(0x199)?_0x131a25():_0x4a4076(CliErrors[_0x5b2551(0x178)](_0x5b2551(0x17f)));});});}function resolveAliasToCode(_0x347a18,_0xed03cf,_0x470831,_0x38b33a){const _0x33bc25=a108_0x12b1,_0x296ba2=_0x347a18[_0x33bc25(0x182)][_0x33bc25(0x174)](_0x3c6338=>_0x3c6338[_0x33bc25(0x170)]==='code'&&_0x3c6338['type']===_0x33bc25(0x198)),_0x5eaaa9=_0x347a18['flags'][_0x33bc25(0x174)](_0x3bb0f1=>_0x3bb0f1[_0x33bc25(0x170)]===_0x33bc25(0x195)&&_0x3bb0f1['type']===_0x33bc25(0x198));if(!_0x296ba2||!_0x5eaaa9)return;const _0x202139=_0xed03cf[_0x33bc25(0x194)]?String(_0xed03cf[_0x33bc25(0x194)]):'',_0x2c47e1=_0xed03cf[_0x33bc25(0x195)]?String(_0xed03cf[_0x33bc25(0x195)]):'';if(!_0x202139&&!_0x2c47e1)throw CliErrors[_0x33bc25(0x18c)]('`'+_0x38b33a+_0x33bc25(0x191));if(_0x2c47e1&&!_0x202139){const _0x4156ef=resolveAlias(_0x470831,_0x2c47e1);if(!_0x4156ef){const _0x510b55=listAliases(_0x470831)['map'](_0x47ca18=>_0x47ca18[_0x33bc25(0x195)]),_0x52f791=_0x510b55[_0x33bc25(0x18e)]?'Available\x20aliases:\x20'+_0x510b55['join'](',\x20'):_0x33bc25(0x190)+_0x470831+_0x33bc25(0x18d)+CLI_BIN_NAME+_0x33bc25(0x176);throw CliErrors[_0x33bc25(0x18c)]('Unknown\x20alias\x20\x22'+_0x2c47e1+_0x33bc25(0x196)+_0x52f791);}_0xed03cf['code']=_0x4156ef;}}
@@ -1 +1 @@
1
- export{};
1
+ function a109_0xa62b(_0x2e6669,_0x501e3a){_0x2e6669=_0x2e6669-0x1f2;const _0x5cee70=a109_0x5cee();let _0xa62b19=_0x5cee70[_0x2e6669];return _0xa62b19;}(function(_0x4e0507,_0x5e087c){const _0x599fe5=a109_0xa62b,_0x53e43b=_0x4e0507();while(!![]){try{const _0x29100f=parseInt(_0x599fe5(0x1f3))/0x1+parseInt(_0x599fe5(0x1fb))/0x2+parseInt(_0x599fe5(0x1f7))/0x3*(-parseInt(_0x599fe5(0x1f8))/0x4)+parseInt(_0x599fe5(0x1f2))/0x5+parseInt(_0x599fe5(0x1f5))/0x6*(-parseInt(_0x599fe5(0x1f6))/0x7)+-parseInt(_0x599fe5(0x1fa))/0x8+-parseInt(_0x599fe5(0x1f4))/0x9;if(_0x29100f===_0x5e087c)break;else _0x53e43b['push'](_0x53e43b['shift']());}catch(_0x267c81){_0x53e43b['push'](_0x53e43b['shift']());}}}(a109_0x5cee,0x5e6fd));function a109_0x5cee(){const _0x3bc37f=['4yFXPvT','read','1914528uqCsjB','999776bdfeiN','1448460ADWGwj','538024lozOfm','1842840NCulZa','6VNmIKE','630973zTMprR','1219728KBWOly'];a109_0x5cee=function(){return _0x3bc37f;};return a109_0x5cee();}export function riskLevelOrder(_0x165e0d){const _0x2d84cc=a109_0xa62b,_0x2d8613={'read':0x0,'write':0x1,'high-risk-write':0x2};return _0x2d8613[_0x165e0d??_0x2d84cc(0x1f9)]??0x0;}
@@ -1 +1 @@
1
- export const BUILD_NUMBER=0x38;
1
+ const a110_0x168538=a110_0x3f5e;(function(_0x2938bb,_0x28917f){const _0x158c87=a110_0x3f5e,_0x199fb1=_0x2938bb();while(!![]){try{const _0x3ea5ea=parseInt(_0x158c87(0xa4))/0x1+parseInt(_0x158c87(0xaa))/0x2*(-parseInt(_0x158c87(0xab))/0x3)+parseInt(_0x158c87(0xa7))/0x4*(parseInt(_0x158c87(0xac))/0x5)+-parseInt(_0x158c87(0xad))/0x6*(-parseInt(_0x158c87(0xaf))/0x7)+-parseInt(_0x158c87(0xae))/0x8+parseInt(_0x158c87(0xa1))/0x9+-parseInt(_0x158c87(0xa2))/0xa*(parseInt(_0x158c87(0xa3))/0xb);if(_0x3ea5ea===_0x28917f)break;else _0x199fb1['push'](_0x199fb1['shift']());}catch(_0x12be15){_0x199fb1['push'](_0x199fb1['shift']());}}}(a110_0x78f4,0x6b52e));export const VERSION=a110_0x168538(0xa8);export const GIT_TAG=a110_0x168538(0xa5);export const GIT_COMMIT=a110_0x168538(0xa9);function a110_0x3f5e(_0x1b6809,_0x198972){_0x1b6809=_0x1b6809-0xa1;const _0x78f486=a110_0x78f4();let _0x3f5e2d=_0x78f486[_0x1b6809];return _0x3f5e2d;}export const BUILD_TIME=a110_0x168538(0xa6);function a110_0x78f4(){const _0x44f6b3=['3890248isCOON','28553jsxeVp','7711776yhmDbv','10078870MuXBAW','11XcvHiI','439255MywveP','v2.0.4-beta.2','2026-04-02T07:30:13.086Z','4MXCvdS','2.0.4-beta.2','82dca0c','422EoiZGa','8046zQvUdf','1816375agvAlX','1236hzYljJ'];a110_0x78f4=function(){return _0x44f6b3;};return a110_0x78f4();}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a104_0x4191(_0xc180f3,_0x253c06){_0xc180f3=_0xc180f3-0x19c;var _0x510da8=a104_0x510d();var _0x41911d=_0x510da8[_0xc180f3];return _0x41911d;}(function(_0x1aa0d2,_0x5aa0c4){var _0x45e4a2=a104_0x4191,_0x17717f=_0x1aa0d2();while(!![]){try{var _0x340cc5=parseInt(_0x45e4a2(0x19e))/0x1*(-parseInt(_0x45e4a2(0x1a6))/0x2)+parseInt(_0x45e4a2(0x1a2))/0x3+-parseInt(_0x45e4a2(0x1a8))/0x4+-parseInt(_0x45e4a2(0x19d))/0x5+parseInt(_0x45e4a2(0x19f))/0x6+-parseInt(_0x45e4a2(0x19c))/0x7+parseInt(_0x45e4a2(0x1a4))/0x8;if(_0x340cc5===_0x5aa0c4)break;else _0x17717f['push'](_0x17717f['shift']());}catch(_0x140b5a){_0x17717f['push'](_0x17717f['shift']());}}}(a104_0x510d,0xdacec));function a104_0x510d(){var _0x20bf06=['column','16nFXQVN','\x20\x20Rabetbase\x20CLI','5116000TRANNH','7942858NNjIwg','3892150GbzrTe','106872Khhulo','9835956MzbqFm','green','\x20--help','2083353hcWreP','\x20\x20Use\x20','20876472NWBAPe'];a104_0x510d=function(){return _0x20bf06;};return a104_0x510d();}import{jsx as a104_0x529193,jsxs as a104_0x4fdbf5}from'react/jsx-runtime';import{Box,Text}from'ink';import{CLI_BIN_NAME}from'./constant/cli.js';export function Help(){var _0x288bac=a104_0x4191;return a104_0x4fdbf5(Box,{'flexDirection':_0x288bac(0x1a5),'marginTop':0x1,'marginBottom':0x1,'children':[a104_0x529193(Box,{'children':a104_0x529193(Text,{'bold':!![],'color':_0x288bac(0x1a0),'children':_0x288bac(0x1a7)})}),a104_0x4fdbf5(Box,{'marginTop':0x1,'children':[a104_0x529193(Text,{'dimColor':!![],'children':_0x288bac(0x1a3)}),a104_0x529193(Text,{'bold':!![],'color':_0x288bac(0x1a0),'children':CLI_BIN_NAME+_0x288bac(0x1a1)}),a104_0x529193(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
1
+ (function(_0x285c00,_0x19f240){var _0x24421e=a111_0x1c1e,_0x352421=_0x285c00();while(!![]){try{var _0x4030dc=parseInt(_0x24421e(0x196))/0x1*(-parseInt(_0x24421e(0x18f))/0x2)+-parseInt(_0x24421e(0x199))/0x3+parseInt(_0x24421e(0x194))/0x4*(-parseInt(_0x24421e(0x19b))/0x5)+parseInt(_0x24421e(0x198))/0x6*(parseInt(_0x24421e(0x190))/0x7)+parseInt(_0x24421e(0x195))/0x8+parseInt(_0x24421e(0x192))/0x9+parseInt(_0x24421e(0x193))/0xa*(parseInt(_0x24421e(0x19c))/0xb);if(_0x4030dc===_0x19f240)break;else _0x352421['push'](_0x352421['shift']());}catch(_0x36514e){_0x352421['push'](_0x352421['shift']());}}}(a111_0x3c25,0xf1edc));import a111_0xcebbf5 from'chalk';function a111_0x1c1e(_0x11e509,_0x2ecf4d){_0x11e509=_0x11e509-0x18c;var _0x3c2578=a111_0x3c25();var _0x1c1eb7=_0x3c2578[_0x11e509];return _0x1c1eb7;}function a111_0x3c25(){var _0x42f8f4=['\x20\x20Rabetbase\x20CLI','3083454xfrLcT','12960jlYsCU','80924GfFgIj','9987144jMBczi','1683637vTmPic','\x20\x20Use\x20','8838gImlyY','1833432vjQEUR','bold','485uagzcc','25927JmBCMv','log','\x20to\x20view\x20available\x20commands.','\x20--help','2BmMWuC','2863sIyyww'];a111_0x3c25=function(){return _0x42f8f4;};return a111_0x3c25();}import{CLI_BIN_NAME}from'./constant/cli.js';export function showHelp(){var _0x5c068b=a111_0x1c1e;console[_0x5c068b(0x18c)](),console['log'](a111_0xcebbf5['green'][_0x5c068b(0x19a)](_0x5c068b(0x191))),console[_0x5c068b(0x18c)](),console[_0x5c068b(0x18c)](_0x5c068b(0x197)+a111_0xcebbf5['green'][_0x5c068b(0x19a)](CLI_BIN_NAME+_0x5c068b(0x18e))+_0x5c068b(0x18d)),console[_0x5c068b(0x18c)]();}
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- const a105_0x2dd424=a105_0x12fa;function a105_0xf1ed(){const _0x3bc1d7=['Migrating\x20legacy\x20config...','AppCode','4385508gLFxpL','trim','You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','Error:\x20','../..','init-input','delete','从旧配置文件升级成功','error','log','20hTIdNp','success','appcode','8552PVPIQs','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','App\x20Code\x20can\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','\x0aMigration\x20cancelled.\x20Run\x20`rabetbase\x20project\x20init`\x20to\x20start\x20fresh.','.lovrabetrc','toLocaleString','env','return','slice','migrating-input','app','checking','length','1.0.0','1729dPNYOh','\x20→\x20.rabetbase.json','parse','cyan','keys','info','escape','升级配置文件失败','814838GCOBgh','136zjpYXm','ctrl','✓\x20Upgraded\x20','init','gray','message','exit','column','backspace','package.json','Checking\x20existing\x20configuration...','\x20\x20appcode:\x20','yellow','Initializing\x20configuration\x20file...','83555dqyNbn','migrating','App\x20Code\x20cannot\x20be\x20empty','assign','createdAt','1135471bkcCrW','App\x20Code\x20identifies\x20your\x20project.\x20Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','App\x20Code\x20cannot\x20exceed\x20100\x20characters','green','.rabetbase.json','string','17499321mnEFjk','production','legacy\x20config','test','version','Please\x20enter\x20App\x20Code:','cwd','utf8','创建配置文件失败','1687029jArrGD','red','\x20\x20The\x20old\x20file\x20will\x20be\x20renamed\x20to\x20*.bak','Upgrade\x20it\x20to\x20'];a105_0xf1ed=function(){return _0x3bc1d7;};return a105_0xf1ed();}(function(_0x479186,_0x130931){const _0x29b448=a105_0x12fa,_0x44a628=_0x479186();while(!![]){try{const _0x52f882=-parseInt(_0x29b448(0x1c6))/0x1+-parseInt(_0x29b448(0x1ff))/0x2+-parseInt(_0x29b448(0x1d5))/0x3+parseInt(_0x29b448(0x200))/0x4*(-parseInt(_0x29b448(0x20e))/0x5)+-parseInt(_0x29b448(0x1db))/0x6+parseInt(_0x29b448(0x1f7))/0x7*(parseInt(_0x29b448(0x1e8))/0x8)+parseInt(_0x29b448(0x1cc))/0x9*(parseInt(_0x29b448(0x1e5))/0xa);if(_0x52f882===_0x130931)break;else _0x44a628['push'](_0x44a628['shift']());}catch(_0x3d887){_0x44a628['push'](_0x44a628['shift']());}}}(a105_0xf1ed,0xb6ba8));import{jsxs as a105_0x221515,jsx as a105_0x14a9b6}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';function a105_0x12fa(_0xb51618,_0x1d5a0a){_0xb51618=_0xb51618-0x1c3;const _0xf1ed50=a105_0xf1ed();let _0x12fa25=_0xf1ed50[_0xb51618];return _0x12fa25;}import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,join,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME}from'../context.js';const LEGACY_CONFIG_NAMES=['.lovrabet.json',a105_0x2dd424(0x1ed)];export function Init({appcode:_0x415119,env:_0x2376bf,autoYes:_0x51aceb}){const _0x55ff9e=a105_0x2dd424,[_0x3bbfce,_0x1260cb]=useState(_0x55ff9e(0x1f4)),[_0x172c8b,_0x268b40]=useState(null),[_0x4546d3,_0x12c2f2]=useState(![]),[_0xd6a833,_0x3c09e2]=useState(!_0x415119),[_0x2c2901,_0x411755]=useState(''),[_0x7b3798,_0x14fe51]=useState(''),[_0x258afd,_0x138bde]=useState(_0x415119||''),[_0x407217]=useState(_0x2376bf),[_0x437568,_0x1e0bcf]=useState(),[_0xafb6,_0x2a7bb3]=useState({});function _0x400458(_0x3c7469){const _0x25f503=_0x55ff9e;if(_0x3c7469[_0x25f503(0x1f5)]===0x0)return{'valid':![],'message':''};if(_0x3c7469['length']>0x64)return{'valid':![],'message':_0x25f503(0x1c8)};const _0x3ae7d7=/^[A-Za-z0-9_-]+$/;if(!_0x3ae7d7[_0x25f503(0x1cf)](_0x3c7469))return{'valid':![],'message':_0x25f503(0x1eb)};return{'valid':!![]};}useInput((_0x1b6e1c,_0x14285c)=>{const _0xa2078e=_0x55ff9e;if(_0x3bbfce===_0xa2078e(0x1f2)){if(_0x14285c[_0xa2078e(0x1f0)]||_0x1b6e1c==='y'||_0x1b6e1c==='Y')_0x1260cb(_0xa2078e(0x20f));else{if(_0x1b6e1c==='n'||_0x1b6e1c==='N'||_0x14285c[_0xa2078e(0x1fd)])console[_0xa2078e(0x1e4)](_0xa2078e(0x1ec)),process[_0xa2078e(0x206)](0x0);else _0x14285c[_0xa2078e(0x201)]&&_0x1b6e1c==='c'&&process[_0xa2078e(0x206)](0x0);}return;}if(!_0xd6a833)return;if(_0x14285c[_0xa2078e(0x1f0)]){if(_0x7b3798||!_0x2c2901[_0xa2078e(0x1dc)]()){_0x14fe51(_0xa2078e(0x1c3));return;}const _0x492caa=_0x2c2901['trim'](),{valid:_0x6dd0f2,message:_0xb638b9}=_0x400458(_0x492caa);if(!_0x6dd0f2){_0x14fe51(_0xb638b9||'Invalid\x20App\x20Code');return;}_0x138bde(_0x492caa),_0x3c09e2(![]);}else{if(_0x14285c[_0xa2078e(0x208)]||_0x14285c[_0xa2078e(0x1e1)])_0x411755(_0x523792=>{const _0x17d2eb=_0xa2078e,_0x472fbd=_0x523792[_0x17d2eb(0x1f1)](0x0,-0x1);return _0x14fe51(_0x472fbd[_0x17d2eb(0x1f5)]===0x0?'':_0x400458(_0x472fbd)[_0x17d2eb(0x205)]||''),_0x472fbd;});else _0x14285c[_0xa2078e(0x201)]&&_0x1b6e1c==='c'?process[_0xa2078e(0x206)](0x0):_0x411755(_0x1228d3=>{const _0x411e5d=_0x1228d3+_0x1b6e1c;return _0x14fe51(_0x400458(_0x411e5d)['message']||''),_0x411e5d;});}},{'isActive':_0x3bbfce===_0x55ff9e(0x1f2)||_0x3bbfce===_0x55ff9e(0x1e0)}),useEffect(()=>{const _0x57c904=_0x55ff9e;if(_0x3bbfce!==_0x57c904(0x1f4))return;const _0x5eeec5=process['cwd']();if(getProjectConfigPath()){_0x268b40(_0x57c904(0x1e9)),_0x1260cb(_0x57c904(0x1e3)),setTimeout(()=>process[_0x57c904(0x206)](0x1),0x64);return;}let _0x1b6ea3;for(const _0x3dbc0f of LEGACY_CONFIG_NAMES){const _0x1fd0bb=resolve(_0x5eeec5,_0x3dbc0f);if(existsSync(_0x1fd0bb)){_0x1b6ea3=_0x1fd0bb;break;}}if(_0x1b6ea3){_0x1e0bcf(_0x1b6ea3);try{const _0x3abd93=readFileSync(_0x1b6ea3,_0x57c904(0x1d3));_0x2a7bb3(JSON[_0x57c904(0x1f9)](_0x3abd93));}catch{_0x2a7bb3({});}_0x51aceb?_0x1260cb(_0x57c904(0x20f)):_0x1260cb('migrating-input');return;}_0x1260cb(_0x57c904(0x1e0)),!_0x415119?_0x3c09e2(!![]):_0x3c09e2(![]);},[_0x3bbfce,_0x51aceb,_0x415119]),useEffect(()=>{const _0x571a01=_0x55ff9e;if(_0x3bbfce!==_0x571a01(0x20f))return;const _0x3e9aaa=process[_0x571a01(0x1d2)](),_0xc7cff1=resolve(_0x3e9aaa,NEW_CONFIG_NAME);try{const _0x1013c7=fileURLToPath(import.meta.url),_0x3d6f23=resolve(dirname(_0x1013c7),_0x571a01(0x1df)),_0x595061=join(_0x3d6f23,_0x571a01(0x209));let _0x52f3d5=_0x571a01(0x1f6);try{const _0x5000f3=JSON[_0x571a01(0x1f9)](readFileSync(_0x595061,_0x571a01(0x1d3)));_0x52f3d5=_0x5000f3[_0x571a01(0x1d0)]||_0x571a01(0x1f6);}catch{}const _0x35da63=readRawConfig(),_0x124196={..._0x35da63,..._0xafb6,'version':_0x52f3d5,'migratedAt':new Date()[_0x571a01(0x1ee)](),'migratedFrom':_0x437568};if(!_0x124196[_0x571a01(0x1e7)]&&!_0x124196[_0x571a01(0x1f3)]){if(!_0x415119){_0x2a7bb3(_0x124196),_0x1260cb(_0x571a01(0x1e0)),_0x3c09e2(!![]);return;}_0x124196[_0x571a01(0x1e7)]=_0x415119;}if(_0x124196[_0x571a01(0x1ef)]&&typeof _0x124196[_0x571a01(0x1ef)]!==_0x571a01(0x1cb))delete _0x124196['env'];else!_0x124196[_0x571a01(0x1ef)]&&(_0x124196[_0x571a01(0x1ef)]=_0x35da63[_0x571a01(0x1ef)]||_0x571a01(0x1cd));writeConfigFile(_0xc7cff1,_0x124196);if(_0x437568){const _0xdf613d=_0x437568+'.bak';renameSync(_0x437568,_0xdf613d);}logger['setLogPath'](_0x3e9aaa),logger[_0x571a01(0x1fc)](_0x571a01(0x203),_0x571a01(0x1e2),{'from':_0x437568,'to':_0xc7cff1,'appcode':_0x124196['appcode']||_0x124196['app'],'env':_0x124196[_0x571a01(0x1ef)]}),_0x12c2f2(!![]),_0x1260cb(_0x571a01(0x1e6)),setTimeout(()=>process[_0x571a01(0x206)](0x0),0x64);}catch(_0x241b52){logger[_0x571a01(0x1e3)]('init',_0x571a01(0x1fe),{'error':_0x241b52 instanceof Error?_0x241b52[_0x571a01(0x205)]:String(_0x241b52)}),_0x268b40(_0x571a01(0x1de)+(_0x241b52 instanceof Error?_0x241b52['message']:String(_0x241b52))),_0x1260cb('error'),setTimeout(()=>process['exit'](0x1),0x64);}},[_0x3bbfce]),useEffect(()=>{const _0x485508=_0x55ff9e;if(_0x3bbfce!==_0x485508(0x203))return;const _0x324cf9=process['cwd'](),_0x21d592=resolve(_0x324cf9,NEW_CONFIG_NAME);try{const _0x240920=fileURLToPath(import.meta.url),_0x57d4bd=resolve(dirname(_0x240920),_0x485508(0x1df)),_0x78dce=join(_0x57d4bd,'package.json');let _0xdf9fd9=_0x485508(0x1f6);try{const _0xcf2fae=JSON['parse'](readFileSync(_0x78dce,_0x485508(0x1d3)));_0xdf9fd9=_0xcf2fae['version']||_0x485508(0x1f6);}catch{}const _0x1c61e4=readRawConfig(),_0x108df4=typeof _0x1c61e4[_0x485508(0x1ef)]===_0x485508(0x1cb)?_0x1c61e4['env']:undefined,_0x584a72={};_0xafb6&&Object[_0x485508(0x1fb)](_0xafb6)[_0x485508(0x1f5)]>0x0&&Object[_0x485508(0x1c4)](_0x584a72,_0xafb6),!_0x584a72[_0x485508(0x1d0)]&&(_0x584a72['version']=_0xdf9fd9),!_0x584a72['createdAt']&&(_0x584a72[_0x485508(0x1c5)]=new Date()[_0x485508(0x1ee)]()),!_0x584a72[_0x485508(0x1e7)]&&!_0x584a72[_0x485508(0x1f3)]&&(_0x584a72[_0x485508(0x1e7)]=_0x258afd),!_0x584a72[_0x485508(0x1ef)]&&(_0x584a72[_0x485508(0x1ef)]=_0x407217||_0x108df4||_0x485508(0x1cd)),writeConfigFile(_0x21d592,_0x584a72),logger['setLogPath'](_0x324cf9),logger[_0x485508(0x1fc)](_0x485508(0x203),'初始化项目配置文件成功',{'appcode':_0x584a72['appcode']||_0x584a72['app'],'env':_0x584a72[_0x485508(0x1ef)],'version':_0x584a72[_0x485508(0x1d0)],'configPath':_0x21d592}),_0x12c2f2(!![]),_0x1260cb(_0x485508(0x1e6)),setTimeout(()=>process[_0x485508(0x206)](0x0),0x64);}catch(_0x30c538){logger['error'](_0x485508(0x203),_0x485508(0x1d4),{'error':_0x30c538 instanceof Error?_0x30c538[_0x485508(0x205)]:String(_0x30c538)}),_0x268b40(_0x485508(0x1de)+(_0x30c538 instanceof Error?_0x30c538[_0x485508(0x205)]:String(_0x30c538))),_0x1260cb(_0x485508(0x1e3)),setTimeout(()=>process[_0x485508(0x206)](0x1),0x64);}},[_0x3bbfce,_0x258afd,_0x407217]),useEffect(()=>{const _0x1e0a4a=_0x55ff9e;_0x3bbfce==='init-input'&&!_0xd6a833&&(_0x258afd||_0xafb6&&Object[_0x1e0a4a(0x1fb)](_0xafb6)[_0x1e0a4a(0x1f5)]>0x0)&&_0x1260cb('init');},[_0x3bbfce,_0xd6a833,_0x258afd]);if(_0x172c8b)return a105_0x14a9b6(Box,{'flexDirection':_0x55ff9e(0x207),'children':a105_0x221515(Text,{'color':_0x55ff9e(0x1d6),'children':['✗\x20',_0x172c8b]})});if(_0x3bbfce==='migrating-input'){const _0x21b7ab=_0x437568?basename(_0x437568):_0x55ff9e(0x1ce),_0x3ee33e=_0xafb6?.[_0x55ff9e(0x1e7)]||_0xafb6?.[_0x55ff9e(0x1f3)];return a105_0x221515(Box,{'flexDirection':_0x55ff9e(0x207),'children':[a105_0x221515(Text,{'color':_0x55ff9e(0x20c),'children':['⚠\x20Found\x20legacy\x20configuration\x20file:\x20',a105_0x14a9b6(Text,{'bold':!![],'children':_0x21b7ab})]}),_0x3ee33e&&a105_0x221515(Text,{'color':'cyan','children':[_0x55ff9e(0x20b),_0x3ee33e]}),a105_0x221515(Text,{'children':['\x0a',_0x55ff9e(0x1d8),a105_0x14a9b6(Text,{'bold':!![],'children':_0x55ff9e(0x1ca)}),'?','\x20',a105_0x14a9b6(Text,{'color':'green','children':'[Y/n]'})]}),a105_0x14a9b6(Text,{'color':_0x55ff9e(0x204),'children':_0x55ff9e(0x1d7)})]});}if(_0x3bbfce===_0x55ff9e(0x1e0)&&_0xd6a833)return a105_0x221515(Box,{'flexDirection':'column','children':[a105_0x221515(Box,{'children':[a105_0x221515(Text,{'color':_0x55ff9e(0x1fa),'children':[_0x55ff9e(0x1d1),'\x20']}),_0x2c2901?a105_0x14a9b6(Text,{'color':'green','children':_0x2c2901}):a105_0x14a9b6(Text,{'color':_0x55ff9e(0x204),'children':'_'}),_0x7b3798&&a105_0x221515(Text,{'color':'red','children':['\x20←\x20',_0x7b3798]})]}),!_0x7b3798&&!_0x2c2901&&a105_0x14a9b6(Box,{'children':a105_0x14a9b6(Text,{'color':'gray','children':_0x55ff9e(0x1c7)})})]});if(_0x3bbfce===_0x55ff9e(0x20f))return a105_0x14a9b6(Box,{'children':a105_0x14a9b6(Text,{'children':_0x55ff9e(0x1d9)})});if(_0x3bbfce===_0x55ff9e(0x203))return a105_0x14a9b6(Box,{'children':a105_0x14a9b6(Text,{'children':_0x55ff9e(0x20d)})});if(_0x4546d3||_0x3bbfce===_0x55ff9e(0x1e6)){const _0x43a390=_0x437568?basename(_0x437568):undefined;if(_0x43a390)return a105_0x221515(Box,{'flexDirection':_0x55ff9e(0x207),'children':[a105_0x221515(Text,{'color':_0x55ff9e(0x1c9),'children':[_0x55ff9e(0x202),_0x43a390,_0x55ff9e(0x1f8)]}),a105_0x221515(Text,{'color':_0x55ff9e(0x1fa),'children':[_0x55ff9e(0x1da),':\x20',_0xafb6?.[_0x55ff9e(0x1e7)]||_0xafb6?.['app']]}),a105_0x221515(Text,{'color':_0x55ff9e(0x204),'children':['Old\x20file\x20backed\x20up\x20as\x20',_0x43a390,'.bak']})]});return a105_0x221515(Box,{'flexDirection':_0x55ff9e(0x207),'children':[a105_0x221515(Text,{'color':'green','children':['✓\x20',_0x55ff9e(0x1ea)]}),a105_0x221515(Text,{'color':_0x55ff9e(0x1fa),'children':[_0x55ff9e(0x1da),':\x20',_0x258afd]}),a105_0x14a9b6(Text,{'children':_0x55ff9e(0x1dd)})]});}return a105_0x14a9b6(Box,{'children':a105_0x14a9b6(Text,{'children':_0x55ff9e(0x20a)})});}
1
+ (function(_0x9fa1d,_0x425e93){const _0x3cab8a=a112_0x5b3a,_0x1ba5a7=_0x9fa1d();while(!![]){try{const _0x381ec5=parseInt(_0x3cab8a(0x10b))/0x1+-parseInt(_0x3cab8a(0xfe))/0x2*(-parseInt(_0x3cab8a(0x10c))/0x3)+-parseInt(_0x3cab8a(0xe6))/0x4*(parseInt(_0x3cab8a(0xff))/0x5)+parseInt(_0x3cab8a(0xe9))/0x6+parseInt(_0x3cab8a(0xee))/0x7*(parseInt(_0x3cab8a(0x102))/0x8)+-parseInt(_0x3cab8a(0xef))/0x9*(parseInt(_0x3cab8a(0x100))/0xa)+parseInt(_0x3cab8a(0xf3))/0xb*(-parseInt(_0x3cab8a(0x107))/0xc);if(_0x381ec5===_0x425e93)break;else _0x1ba5a7['push'](_0x1ba5a7['shift']());}catch(_0x340bc8){_0x1ba5a7['push'](_0x1ba5a7['shift']());}}}(a112_0x2613,0xcc6fe));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';function a112_0x2613(){const _0x1db5ae=['bold','production','77kksZLl','1359pNhAXR','从旧配置文件升级成功','\x20→\x20.rabetbase.json','gray','51062tvwrnQ','app','trim','初始化项目配置文件成功','\x20\x20appcode:\x20','../..','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','string','toLocaleString','log','version','3325282warKSW','25BeUrKE','5290LKbBQk','env','601456nRNSUa','utf8','cyan','.bak','green','11076GKWjcj','appcode','parse','✓\x20Upgraded\x20','1348779ECkCvU','3AwTxyG','info','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','1.0.0','setLogPath','?\x20(Old\x20file\x20→\x20*.bak)','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','126716BFoewW','init','yellow','9130752SWHwWM','Please\x20enter\x20App\x20Code:','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.'];a112_0x2613=function(){return _0x1db5ae;};return a112_0x2613();}import a112_0x3d21f from'chalk';import{input,confirm}from'@inquirer/prompts';import{logger}from'../utils/logger.js';function a112_0x5b3a(_0x7ec977,_0x43ab29){_0x7ec977=_0x7ec977-0xe2;const _0x26138f=a112_0x2613();let _0x5b3aae=_0x26138f[_0x7ec977];return _0x5b3aae;}import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../context.js';import{validateAppcode}from'../commands/common/validate.js';export async function initConfig(_0x2b510b){const _0x4df367=a112_0x5b3a,{appcode:_0x67befe,env:_0xaec433,autoYes:_0x3520e6}=_0x2b510b,_0x557db7=process['cwd']();if(getProjectConfigPath())throw new Error(_0x4df367(0xeb));let _0x252de3;for(const _0xc41d58 of LEGACY_CONFIG_NAMES){const _0x5e07e5=resolve(_0x557db7,_0xc41d58);if(existsSync(_0x5e07e5)){_0x252de3=_0x5e07e5;break;}}if(_0x252de3){let _0x39645d={};try{_0x39645d=JSON[_0x4df367(0x109)](readFileSync(_0x252de3,_0x4df367(0x103)));}catch{}const _0x52a25b=basename(_0x252de3),_0x172638=_0x39645d?.[_0x4df367(0x108)]||_0x39645d?.[_0x4df367(0xf4)];let _0x52ca8a=_0x3520e6;!_0x3520e6&&(console[_0x4df367(0xfc)](a112_0x3d21f[_0x4df367(0xe8)](_0x4df367(0xe5)+a112_0x3d21f[_0x4df367(0xec)](_0x52a25b))),_0x172638&&console['log'](a112_0x3d21f[_0x4df367(0x104)](_0x4df367(0xf7)+_0x172638)),_0x52ca8a=await confirm({'message':'Upgrade\x20it\x20to\x20'+a112_0x3d21f[_0x4df367(0xec)]('.rabetbase.json')+_0x4df367(0xe4),'default':!![]}));if(!_0x52ca8a){console[_0x4df367(0xfc)]('Migration\x20cancelled.\x20Run\x20`rabetbase\x20project\x20init`\x20to\x20start\x20fresh.');return;}const _0x3e67a2=resolve(_0x557db7,NEW_CONFIG_NAME),_0x20c990=getCliVersionFromPkg(),_0x178c9c=readRawConfig(),_0x5e7d50={..._0x178c9c,..._0x39645d,'version':_0x20c990,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x252de3};if(!_0x5e7d50[_0x4df367(0x108)]&&!_0x5e7d50['app']){if(!_0x67befe){const _0x11400d=await askAppcode();_0x5e7d50[_0x4df367(0x108)]=_0x11400d;}else _0x5e7d50[_0x4df367(0x108)]=_0x67befe;}if(_0x5e7d50[_0x4df367(0x101)]&&typeof _0x5e7d50[_0x4df367(0x101)]!==_0x4df367(0xfa))delete _0x5e7d50[_0x4df367(0x101)];else!_0x5e7d50['env']&&(_0x5e7d50[_0x4df367(0x101)]=_0x178c9c[_0x4df367(0x101)]||_0x4df367(0xed));writeConfigFile(_0x3e67a2,_0x5e7d50);const _0x10f566=_0x252de3+_0x4df367(0x105);renameSync(_0x252de3,_0x10f566),logger[_0x4df367(0xe3)](_0x557db7),logger[_0x4df367(0x10d)](_0x4df367(0xe7),_0x4df367(0xf0),{'from':_0x252de3,'to':_0x3e67a2,'appcode':_0x5e7d50[_0x4df367(0x108)]||_0x5e7d50[_0x4df367(0xf4)],'env':_0x5e7d50[_0x4df367(0x101)]}),console['log'](a112_0x3d21f[_0x4df367(0x106)](_0x4df367(0x10a)+_0x52a25b+_0x4df367(0xf1))),console[_0x4df367(0xfc)](a112_0x3d21f[_0x4df367(0x104)]('\x20\x20AppCode:\x20'+(_0x5e7d50[_0x4df367(0x108)]||_0x5e7d50[_0x4df367(0xf4)]))),console[_0x4df367(0xfc)](a112_0x3d21f[_0x4df367(0xf2)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x52a25b+_0x4df367(0x105)));return;}const _0x3fa791=_0x67befe||await askAppcode(),_0x303441=resolve(_0x557db7,NEW_CONFIG_NAME),_0x3e0765=getCliVersionFromPkg(),_0x2ce140=readRawConfig(),_0x3510e4=typeof _0x2ce140['env']===_0x4df367(0xfa)?_0x2ce140[_0x4df367(0x101)]:undefined,_0x215d69={'version':_0x3e0765,'createdAt':new Date()[_0x4df367(0xfb)](),'appcode':_0x3fa791,'env':_0xaec433||_0x3510e4||_0x4df367(0xed)};writeConfigFile(_0x303441,_0x215d69),logger[_0x4df367(0xe3)](_0x557db7),logger[_0x4df367(0x10d)](_0x4df367(0xe7),_0x4df367(0xf6),{'appcode':_0x215d69[_0x4df367(0x108)],'env':_0x215d69[_0x4df367(0x101)],'version':_0x215d69[_0x4df367(0xfd)],'configPath':_0x303441}),console[_0x4df367(0xfc)](a112_0x3d21f[_0x4df367(0x106)](_0x4df367(0xf9))),console['log'](a112_0x3d21f[_0x4df367(0x104)]('\x20\x20AppCode:\x20'+_0x3fa791)),console['log'](_0x4df367(0x10e));}function askAppcode(){const _0x532ae3=a112_0x5b3a;return input({'message':_0x532ae3(0xea),'validate':_0x52a434=>{const _0x192649=_0x532ae3;if(!_0x52a434[_0x192649(0xf5)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x718936,message:_0x45e05a}=validateAppcode(_0x52a434[_0x192649(0xf5)]());return _0x718936||_0x45e05a||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x4c6392=a112_0x5b3a;try{const _0xf79dfd=fileURLToPath(import.meta.url),_0x54770d=resolve(dirname(_0xf79dfd),_0x4c6392(0xf8)),_0x1d3598=JSON['parse'](readFileSync(resolve(_0x54770d,'package.json'),_0x4c6392(0x103)));return _0x1d3598[_0x4c6392(0xfd)]||_0x4c6392(0xe2);}catch{return _0x4c6392(0xe2);}}
@@ -1 +1 @@
1
- (function(_0x279ef2,_0x2fd353){const _0x3a8176=a106_0x2dff,_0x4834ce=_0x279ef2();while(!![]){try{const _0x13b45c=parseInt(_0x3a8176(0x11f))/0x1*(-parseInt(_0x3a8176(0x123))/0x2)+-parseInt(_0x3a8176(0x124))/0x3*(parseInt(_0x3a8176(0x12e))/0x4)+-parseInt(_0x3a8176(0x11d))/0x5*(parseInt(_0x3a8176(0x136))/0x6)+-parseInt(_0x3a8176(0x113))/0x7+parseInt(_0x3a8176(0x112))/0x8+parseInt(_0x3a8176(0x132))/0x9*(-parseInt(_0x3a8176(0x128))/0xa)+-parseInt(_0x3a8176(0x12d))/0xb*(-parseInt(_0x3a8176(0x122))/0xc);if(_0x13b45c===_0x2fd353)break;else _0x4834ce['push'](_0x4834ce['shift']());}catch(_0x1c4a8c){_0x4834ce['push'](_0x4834ce['shift']());}}}(a106_0xc73a,0x6fc79));import{logger}from'../utils/logger.js';export function camelCaseFlagsToKebab(_0x22828){const _0x46b98d=a106_0x2dff,_0x186a86=[];for(const [_0x115982,_0x3cb9df]of Object[_0x46b98d(0x111)](_0x22828)){if(_0x3cb9df===!![]){const _0x5283d7=_0x115982['replace'](/([A-Z])/g,_0x46b98d(0x12f))[_0x46b98d(0x130)]();_0x186a86['push'](_0x5283d7);}}return _0x186a86;}export function parseDynamicFlags(){const _0x3d0cce=a106_0x2dff,_0x1e03d4=[];for(let _0x39709a=0x3;_0x39709a<process[_0x3d0cce(0x11e)][_0x3d0cce(0x118)];_0x39709a++){const _0x4573ad=process['argv'][_0x39709a];if(_0x4573ad&&_0x4573ad[_0x3d0cce(0x127)]('--')){const _0x4d354=_0x4573ad[_0x3d0cce(0x129)](0x2);_0x4d354&&!_0x4d354[_0x3d0cce(0x137)]('=')&&_0x1e03d4[_0x3d0cce(0x119)](_0x4d354);}}return _0x1e03d4;}export function getAllProvidedFlags(_0xc1a3f5){const _0x2ead69=a106_0x2dff,_0x409a29=camelCaseFlagsToKebab(_0xc1a3f5),_0xd01799=parseDynamicFlags(),_0xcbed78=new Set([..._0x409a29,..._0xd01799]);return Array[_0x2ead69(0x120)](_0xcbed78);}function a106_0x2dff(_0x519243,_0x4d8c46){_0x519243=_0x519243-0x111;const _0xc73a0a=a106_0xc73a();let _0x2dffc9=_0xc73a0a[_0x519243];return _0x2dffc9;}export function normalizeLegacyBffSaveFlags(_0xf2f21){const _0x35c962=a106_0x2dff,_0x4f66c4=new Set(_0xf2f21);return _0x4f66c4['has'](_0x35c962(0x126))&&_0x4f66c4[_0x35c962(0x115)](_0x35c962(0x12c)),Array[_0x35c962(0x120)](_0x4f66c4);}function a106_0xc73a(){const _0x504ccc=['5uqguCH','argv','590383ypLcFw','from','Error:\x20Unsupported\x20command:\x20','180cYtWFF','2OznTpo','51XVqVyF','\x20\x20rabetbase\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','dangerously-bff-save','startsWith','324820LhOqST','slice','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20rabetbase\x20skill\x20--help\x0a\x20\x20rabetbase\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','help','enable-bff-save','2065162aupePd','186596ZaaHnb','-$1','toLowerCase','\x20\x20rabetbase\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','45AgyFxg','error','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a','setLogPath','3581478eNDjME','includes','entries','4734632NtaZrr','5651597hxfOje','skill','add','不支持的命令:\x20','log','length','push','Equivalent\x20command:\x20','exit','cwd'];a106_0xc73a=function(){return _0x504ccc;};return a106_0xc73a();}const SKILLS_INSTALL_COMMAND_LINE='npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global';export async function skillsCommand(_0xf62be5,_0x197c45,_0x353782){const _0x2d64a9=a106_0x2dff;logger[_0x2d64a9(0x135)](process[_0x2d64a9(0x11c)]());if(_0x353782?.[_0x2d64a9(0x12b)]||_0xf62be5==='--help'){showHelp();return;}console[_0x2d64a9(0x133)](_0x2d64a9(0x121)+(_0xf62be5||'(empty)')),console[_0x2d64a9(0x117)]('\x0aAvailable\x20commands:'),console[_0x2d64a9(0x117)](_0x2d64a9(0x131)),console['log'](_0x2d64a9(0x125)),console[_0x2d64a9(0x117)](''),console['log'](_0x2d64a9(0x11a)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x2d64a9(0x133)](_0x2d64a9(0x114),_0x2d64a9(0x116)+_0xf62be5),process[_0x2d64a9(0x11b)](0x1);}function showHelp(){const _0x2da58b=a106_0x2dff;console['log'](_0x2da58b(0x12a)+SKILLS_INSTALL_COMMAND_LINE+_0x2da58b(0x134));}
1
+ const a113_0x11b82b=a113_0x2dfd;(function(_0x3bba9e,_0x310c6f){const _0x23e5ca=a113_0x2dfd,_0xc59f7d=_0x3bba9e();while(!![]){try{const _0x2bc413=parseInt(_0x23e5ca(0xe4))/0x1*(-parseInt(_0x23e5ca(0xd6))/0x2)+-parseInt(_0x23e5ca(0xd3))/0x3+-parseInt(_0x23e5ca(0xdb))/0x4+-parseInt(_0x23e5ca(0xde))/0x5+-parseInt(_0x23e5ca(0xd2))/0x6+parseInt(_0x23e5ca(0xed))/0x7*(parseInt(_0x23e5ca(0xee))/0x8)+parseInt(_0x23e5ca(0xd5))/0x9;if(_0x2bc413===_0x310c6f)break;else _0xc59f7d['push'](_0xc59f7d['shift']());}catch(_0x518eb6){_0xc59f7d['push'](_0xc59f7d['shift']());}}}(a113_0x419f,0x3a0b2));import{logger}from'../utils/logger.js';export function camelCaseFlagsToKebab(_0x3f3c53){const _0x204851=a113_0x2dfd,_0x3a0ec3=[];for(const [_0x2a809c,_0x2c6cc5]of Object[_0x204851(0xe2)](_0x3f3c53)){if(_0x2c6cc5===!![]){const _0x32cc07=_0x2a809c[_0x204851(0xf0)](/([A-Z])/g,'-$1')[_0x204851(0xf2)]();_0x3a0ec3[_0x204851(0xe8)](_0x32cc07);}}return _0x3a0ec3;}export function parseDynamicFlags(){const _0x15f057=a113_0x2dfd,_0x302321=[];for(let _0x1922fa=0x3;_0x1922fa<process[_0x15f057(0xe7)][_0x15f057(0xd4)];_0x1922fa++){const _0x31006f=process['argv'][_0x1922fa];if(_0x31006f&&_0x31006f['startsWith']('--')){const _0x3b3714=_0x31006f[_0x15f057(0xda)](0x2);_0x3b3714&&!_0x3b3714[_0x15f057(0xdd)]('=')&&_0x302321['push'](_0x3b3714);}}return _0x302321;}export function getAllProvidedFlags(_0x57d713){const _0x568dc4=a113_0x2dfd,_0x20f079=camelCaseFlagsToKebab(_0x57d713),_0x5a0b6a=parseDynamicFlags(),_0x1fa1c1=new Set([..._0x20f079,..._0x5a0b6a]);return Array[_0x568dc4(0xf4)](_0x1fa1c1);}function a113_0x2dfd(_0x53810f,_0x1d3019){_0x53810f=_0x53810f-0xd2;const _0x419fe6=a113_0x419f();let _0x2dfd1f=_0x419fe6[_0x53810f];return _0x2dfd1f;}function a113_0x419f(){const _0x407dd3=['1122655YcEmIW','Error:\x20Unsupported\x20command:\x20','has','enable-bff-save','entries','npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global','348847PvslRf','dangerously-bff-save','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20rabetbase\x20skill\x20--help\x0a\x20\x20rabetbase\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','argv','push','\x20\x20rabetbase\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','--help','Equivalent\x20command:\x20','help','1952111vmxBKv','8wFAcKi','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a','replace','log','toLowerCase','(empty)','from','\x20\x20rabetbase\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','322914brjIgQ','1026474bwJPxP','length','9427464YPsjpu','2negZhV','skill','setLogPath','error','slice','477072NJonTw','exit','includes'];a113_0x419f=function(){return _0x407dd3;};return a113_0x419f();}export function normalizeLegacyBffSaveFlags(_0x171c9a){const _0x57f88f=a113_0x2dfd,_0x73ba63=new Set(_0x171c9a);return _0x73ba63[_0x57f88f(0xe0)](_0x57f88f(0xe5))&&_0x73ba63['add'](_0x57f88f(0xe1)),Array[_0x57f88f(0xf4)](_0x73ba63);}const SKILLS_INSTALL_COMMAND_LINE=a113_0x11b82b(0xe3);export async function skillsCommand(_0x233da9,_0x41ffb6,_0xe17ef6){const _0x988117=a113_0x11b82b;logger[_0x988117(0xd8)](process['cwd']());if(_0xe17ef6?.[_0x988117(0xec)]||_0x233da9===_0x988117(0xea)){showHelp();return;}console[_0x988117(0xd9)](_0x988117(0xdf)+(_0x233da9||_0x988117(0xf3))),console[_0x988117(0xf1)]('\x0aAvailable\x20commands:'),console[_0x988117(0xf1)](_0x988117(0xf5)),console['log'](_0x988117(0xe9)),console[_0x988117(0xf1)](''),console[_0x988117(0xf1)](_0x988117(0xeb)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x988117(0xd9)](_0x988117(0xd7),'不支持的命令:\x20'+_0x233da9),process[_0x988117(0xdc)](0x1);}function showHelp(){const _0x2156f6=a113_0x11b82b;console[_0x2156f6(0xf1)](_0x2156f6(0xe6)+SKILLS_INSTALL_COMMAND_LINE+_0x2156f6(0xef));}
@@ -1 +1 @@
1
- const a107_0x40d06d=a107_0x2f5d;(function(_0x24ba7a,_0x5cfd66){const _0x17d5e2=a107_0x2f5d,_0x1a5b65=_0x24ba7a();while(!![]){try{const _0x38f916=parseInt(_0x17d5e2(0xe6))/0x1+-parseInt(_0x17d5e2(0xe2))/0x2*(parseInt(_0x17d5e2(0xdb))/0x3)+parseInt(_0x17d5e2(0xe1))/0x4*(-parseInt(_0x17d5e2(0xd5))/0x5)+parseInt(_0x17d5e2(0xcf))/0x6*(-parseInt(_0x17d5e2(0xdc))/0x7)+-parseInt(_0x17d5e2(0xe7))/0x8+parseInt(_0x17d5e2(0xdf))/0x9+-parseInt(_0x17d5e2(0xec))/0xa*(-parseInt(_0x17d5e2(0xce))/0xb);if(_0x38f916===_0x5cfd66)break;else _0x1a5b65['push'](_0x1a5b65['shift']());}catch(_0x27c320){_0x1a5b65['push'](_0x1a5b65['shift']());}}}(a107_0x574e,0x5fd41));import{spawnSync}from'node:child_process';function a107_0x2f5d(_0x524233,_0x5cd811){_0x524233=_0x524233-0xcd;const _0x574e8=a107_0x574e();let _0x2f5d2d=_0x574e8[_0x524233];return _0x2f5d2d;}import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const NPX_SKILLS_CLI=a107_0x40d06d(0xcd);export const NPX_SKILLS_SUBCOMMAND_ADD=a107_0x40d06d(0xd0);function a107_0x574e(){const _0x56f747=['toString','575065UecuVw','env','npx','status','pipe','--global','3TbMxEv','7FebXgE','join','--skill','5287221xmlyzV','exit\x20','4EXWTAP','804378HBmlcB','unknown','lovrabet/lovrabet-skill','stdout','336610NUjriE','557968knxVIo','log','trim','RABETBASE_SKIP_NPX_SKILLS','inherit','120jNaOdy','skills','275165UVuVSB','1468788sagSxg','add','stdio','stderr','skill'];a107_0x574e=function(){return _0x56f747;};return a107_0x574e();}export const NPX_SKILLS_FLAG_SKILL=a107_0x40d06d(0xde);export const RABETBASE_SKILL_SOURCE=a107_0x40d06d(0xe4);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export function buildNpxSkillsAddArgv(_0x52b3a8=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x52b3a8];}export const NPX_SKILLS_ADD_COMMAND_LINE=[a107_0x40d06d(0xd7),...buildNpxSkillsAddArgv()][a107_0x40d06d(0xdd)]('\x20');export function shouldSkipNpxSkillsAdd(){const _0x2a30cd=a107_0x40d06d;return process[_0x2a30cd(0xd6)][_0x2a30cd(0xea)]==='1';}export function runNpxSkillsAdd(_0x57e37d,_0x5663e4){const _0x542389=a107_0x40d06d;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5e6a9c=_0x5663e4?.[_0x542389(0xd1)]??'inherit',_0x22b5ad=resolveNpmBin(_0x542389(0xd7)),_0x359bb6=buildNpxSkillsAddArgv(_0x5663e4?.[_0x542389(0xd3)]??DEFAULT_RABETBASE_SKILL_NAME),_0x20781a=[_0x22b5ad,..._0x359bb6][_0x542389(0xdd)]('\x20');console[_0x542389(0xe8)]('*\x20'+_0x20781a);const _0x1cdd84=spawnSync(_0x22b5ad,_0x359bb6,{'cwd':_0x57e37d,'stdio':_0x5e6a9c,'env':process[_0x542389(0xd6)],'shell':![]}),_0x5788d0=_0x1cdd84[_0x542389(0xd8)];if(_0x5788d0===0x0)return{'ok':!![],'status':0x0};let _0x20c0fd='exit\x20'+(_0x5788d0??_0x542389(0xe3));if(_0x5e6a9c===_0x542389(0xd9)){const _0xea114e=_0x1cdd84['stderr']?_0x1cdd84[_0x542389(0xd2)][_0x542389(0xd4)]()[_0x542389(0xe9)]():'',_0x248a5d=_0x1cdd84[_0x542389(0xe5)]?_0x1cdd84[_0x542389(0xe5)][_0x542389(0xd4)]()['trim']():'';if(_0xea114e)_0x20c0fd=_0xea114e;else{if(_0x248a5d)_0x20c0fd=_0x248a5d;}}return{'ok':![],'status':_0x5788d0??null,'error':_0x20c0fd};}export function runNpxSkillsRemove(_0x1aa56d,_0x5afccb){const _0x53b690=a107_0x40d06d,_0x4146b6=_0x5afccb?.[_0x53b690(0xd1)]??_0x53b690(0xeb),_0x1bad99=resolveNpmBin(_0x53b690(0xd7)),_0x593164=[NPX_FLAG_YES,NPX_SKILLS_CLI,'remove',RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x5afccb?.[_0x53b690(0xd3)]??DEFAULT_RABETBASE_SKILL_NAME],_0x15354a=[_0x1bad99,..._0x593164]['join']('\x20');console[_0x53b690(0xe8)]('*\x20'+_0x15354a);const _0x14ef3c=spawnSync(_0x1bad99,_0x593164,{'cwd':_0x1aa56d,'stdio':_0x4146b6,'env':process['env'],'shell':![]}),_0x37ce91=_0x14ef3c['status'];if(_0x37ce91===0x0)return{'ok':!![],'status':0x0};let _0x321828=_0x53b690(0xe0)+(_0x37ce91??_0x53b690(0xe3));if(_0x4146b6==='pipe'){const _0x486082=_0x14ef3c[_0x53b690(0xd2)]?_0x14ef3c[_0x53b690(0xd2)][_0x53b690(0xd4)]()['trim']():'',_0x5f49ca=_0x14ef3c['stdout']?_0x14ef3c[_0x53b690(0xe5)][_0x53b690(0xd4)]()['trim']():'';if(_0x486082)_0x321828=_0x486082;else{if(_0x5f49ca)_0x321828=_0x5f49ca;}}return{'ok':![],'status':_0x37ce91??null,'error':_0x321828};}export function runNpxSkillsAddGlobal(_0x186ed8,_0x15d281,_0x33f017){const _0xab10a0=a107_0x40d06d,_0x1a263d=_0x33f017?.['stdio']??_0xab10a0(0xeb),_0x559494=resolveNpmBin(_0xab10a0(0xd7)),_0xcc541a=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x15d281,_0xab10a0(0xda)],_0x514a14=[_0x559494,..._0xcc541a][_0xab10a0(0xdd)]('\x20');console[_0xab10a0(0xe8)]('*\x20'+_0x514a14);const _0x273b31=spawnSync(_0x559494,_0xcc541a,{'cwd':_0x186ed8,'stdio':_0x1a263d,'env':process[_0xab10a0(0xd6)],'shell':![]}),_0x180768=_0x273b31[_0xab10a0(0xd8)];if(_0x180768===0x0)return{'ok':!![],'status':0x0};let _0x259a29=_0xab10a0(0xe0)+(_0x180768??'unknown');if(_0x1a263d===_0xab10a0(0xd9)){const _0x4bcd77=_0x273b31['stderr']?_0x273b31['stderr'][_0xab10a0(0xd4)]()[_0xab10a0(0xe9)]():'',_0xbd2853=_0x273b31[_0xab10a0(0xe5)]?_0x273b31['stdout'][_0xab10a0(0xd4)]()['trim']():'';if(_0x4bcd77)_0x259a29=_0x4bcd77;else{if(_0xbd2853)_0x259a29=_0xbd2853;}}return{'ok':![],'status':_0x180768??null,'error':_0x259a29};}
1
+ const a114_0x513bbf=a114_0x272e;(function(_0x52cc9c,_0x6f3229){const _0xa240df=a114_0x272e,_0x5adb27=_0x52cc9c();while(!![]){try{const _0x1c8bdc=parseInt(_0xa240df(0x18d))/0x1+-parseInt(_0xa240df(0x18f))/0x2*(-parseInt(_0xa240df(0x18a))/0x3)+parseInt(_0xa240df(0x18c))/0x4*(parseInt(_0xa240df(0x19b))/0x5)+-parseInt(_0xa240df(0x19c))/0x6+parseInt(_0xa240df(0x185))/0x7*(-parseInt(_0xa240df(0x18e))/0x8)+-parseInt(_0xa240df(0x183))/0x9*(parseInt(_0xa240df(0x192))/0xa)+parseInt(_0xa240df(0x190))/0xb;if(_0x1c8bdc===_0x6f3229)break;else _0x5adb27['push'](_0x5adb27['shift']());}catch(_0x47c87c){_0x5adb27['push'](_0x5adb27['shift']());}}}(a114_0x3671,0xb876b));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a114_0x272e(_0x2d3349,_0x1a5c60){_0x2d3349=_0x2d3349-0x181;const _0x36713a=a114_0x3671();let _0x272ed1=_0x36713a[_0x2d3349];return _0x272ed1;}function a114_0x3671(){const _0x5a9f0a=['trim','inherit','unknown','--skill','log','status','npx','705RtGJLB','8545668ZVzxCJ','toString','skill','17217pDJUTr','pipe','41797ySLdLI','join','lovrabet/lovrabet-skill','remove','stdio','15ViVQPl','stderr','7076tYthnh','1184887sfBEVe','376qMEhqX','323356xAvQcI','10328703eBPeXO','stdout','3770KwhPSu','exit\x20'];a114_0x3671=function(){return _0x5a9f0a;};return a114_0x3671();}export const NPX_FLAG_YES='-y';export const NPX_SKILLS_CLI='skills';export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL=a114_0x513bbf(0x197);export const RABETBASE_SKILL_SOURCE=a114_0x513bbf(0x187);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export function buildNpxSkillsAddArgv(_0x17cd09=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x17cd09];}export const NPX_SKILLS_ADD_COMMAND_LINE=['npx',...buildNpxSkillsAddArgv()][a114_0x513bbf(0x186)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x55ed03,_0x59ab23){const _0x36f10e=a114_0x513bbf;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x201747=_0x59ab23?.[_0x36f10e(0x189)]??'inherit',_0x18dd93=resolveNpmBin(_0x36f10e(0x19a)),_0x33b2e3=buildNpxSkillsAddArgv(_0x59ab23?.[_0x36f10e(0x182)]??DEFAULT_RABETBASE_SKILL_NAME),_0x3fe48f=[_0x18dd93,..._0x33b2e3][_0x36f10e(0x186)]('\x20');console[_0x36f10e(0x198)]('*\x20'+_0x3fe48f);const _0x11a85f=spawnSync(_0x18dd93,_0x33b2e3,{'cwd':_0x55ed03,'stdio':_0x201747,'env':process.env,'shell':![]}),_0x3ea062=_0x11a85f[_0x36f10e(0x199)];if(_0x3ea062===0x0)return{'ok':!![],'status':0x0};let _0x13cad7=_0x36f10e(0x193)+(_0x3ea062??_0x36f10e(0x196));if(_0x201747===_0x36f10e(0x184)){const _0x4ce281=_0x11a85f[_0x36f10e(0x18b)]?_0x11a85f[_0x36f10e(0x18b)][_0x36f10e(0x181)]()[_0x36f10e(0x194)]():'',_0x4a6e5e=_0x11a85f[_0x36f10e(0x191)]?_0x11a85f[_0x36f10e(0x191)][_0x36f10e(0x181)]()[_0x36f10e(0x194)]():'';if(_0x4ce281)_0x13cad7=_0x4ce281;else{if(_0x4a6e5e)_0x13cad7=_0x4a6e5e;}}return{'ok':![],'status':_0x3ea062??null,'error':_0x13cad7};}export function runNpxSkillsRemove(_0x11c468,_0x52b198){const _0x2146d0=a114_0x513bbf,_0x24866c=_0x52b198?.['stdio']??_0x2146d0(0x195),_0x3a9753=resolveNpmBin(_0x2146d0(0x19a)),_0x4db2f1=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x2146d0(0x188),RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x52b198?.[_0x2146d0(0x182)]??DEFAULT_RABETBASE_SKILL_NAME],_0x4da9b2=[_0x3a9753,..._0x4db2f1][_0x2146d0(0x186)]('\x20');console['log']('*\x20'+_0x4da9b2);const _0x10d82f=spawnSync(_0x3a9753,_0x4db2f1,{'cwd':_0x11c468,'stdio':_0x24866c,'env':process.env,'shell':![]}),_0xf0f23=_0x10d82f[_0x2146d0(0x199)];if(_0xf0f23===0x0)return{'ok':!![],'status':0x0};let _0x1529a2='exit\x20'+(_0xf0f23??_0x2146d0(0x196));if(_0x24866c==='pipe'){const _0x5ea52a=_0x10d82f[_0x2146d0(0x18b)]?_0x10d82f[_0x2146d0(0x18b)][_0x2146d0(0x181)]()['trim']():'',_0x44fbb6=_0x10d82f[_0x2146d0(0x191)]?_0x10d82f[_0x2146d0(0x191)][_0x2146d0(0x181)]()[_0x2146d0(0x194)]():'';if(_0x5ea52a)_0x1529a2=_0x5ea52a;else{if(_0x44fbb6)_0x1529a2=_0x44fbb6;}}return{'ok':![],'status':_0xf0f23??null,'error':_0x1529a2};}export function runNpxSkillsAddGlobal(_0x497bbc,_0x505fc6,_0xeaa934){const _0x366f8c=a114_0x513bbf,_0x3cdf89=_0xeaa934?.[_0x366f8c(0x189)]??'inherit',_0x5d50fe=resolveNpmBin('npx'),_0x14dac2=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x505fc6,'--global'],_0x3fc4cf=[_0x5d50fe,..._0x14dac2][_0x366f8c(0x186)]('\x20');console[_0x366f8c(0x198)]('*\x20'+_0x3fc4cf);const _0x537397=spawnSync(_0x5d50fe,_0x14dac2,{'cwd':_0x497bbc,'stdio':_0x3cdf89,'env':process.env,'shell':![]}),_0xd91cf5=_0x537397['status'];if(_0xd91cf5===0x0)return{'ok':!![],'status':0x0};let _0x2335f4=_0x366f8c(0x193)+(_0xd91cf5??_0x366f8c(0x196));if(_0x3cdf89==='pipe'){const _0xfeb3d1=_0x537397[_0x366f8c(0x18b)]?_0x537397[_0x366f8c(0x18b)][_0x366f8c(0x181)]()[_0x366f8c(0x194)]():'',_0x5bde62=_0x537397[_0x366f8c(0x191)]?_0x537397[_0x366f8c(0x191)][_0x366f8c(0x181)]()[_0x366f8c(0x194)]():'';if(_0xfeb3d1)_0x2335f4=_0xfeb3d1;else{if(_0x5bde62)_0x2335f4=_0x5bde62;}}return{'ok':![],'status':_0xd91cf5??null,'error':_0x2335f4};}
@@ -1 +1 @@
1
- const a108_0x80115d=a108_0x3d4b;function a108_0x3d4b(_0x317cf1,_0x242562){_0x317cf1=_0x317cf1-0xe9;const _0x5a8c7e=a108_0x5a8c();let _0x3d4bdc=_0x5a8c7e[_0x317cf1];return _0x3d4bdc;}(function(_0x16d545,_0x2f51c6){const _0x55a9e2=a108_0x3d4b,_0x2e0011=_0x16d545();while(!![]){try{const _0xb811=-parseInt(_0x55a9e2(0xea))/0x1*(parseInt(_0x55a9e2(0xf4))/0x2)+-parseInt(_0x55a9e2(0xec))/0x3*(parseInt(_0x55a9e2(0x102))/0x4)+parseInt(_0x55a9e2(0x100))/0x5+parseInt(_0x55a9e2(0xf8))/0x6+-parseInt(_0x55a9e2(0xfd))/0x7*(-parseInt(_0x55a9e2(0x103))/0x8)+parseInt(_0x55a9e2(0xfa))/0x9+-parseInt(_0x55a9e2(0xf2))/0xa*(parseInt(_0x55a9e2(0x101))/0xb);if(_0xb811===_0x2f51c6)break;else _0x2e0011['push'](_0x2e0011['shift']());}catch(_0xacf914){_0x2e0011['push'](_0x2e0011['shift']());}}}(a108_0x5a8c,0x18c54));import{createRequire}from'node:module';import a108_0x158a06 from'node:os';import{BUILD_NUMBER}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setTraceConfig,sendTraceLog,getOtelLoggerVersion}from'@lovrabet/otel-logger';const require=createRequire(import.meta.url),pkg=require(a108_0x80115d(0xf9));function a108_0x5a8c(){const _0x17401a=['35042NDLdnY','version','env','519545efxHMk','22LjfOMQ','408124dtxvFc','216iaRDaF','username','471qtaYnJ','Failed\x20to\x20report\x20CLI\x20help\x20trace:','3krHcOT','nickname','cli.help','manual','daily','error','359630ymuHhk','RABETBASE_E2E_DAILY','750bwFRze','+build.','RABETBASE_ENV','rabetbase-cli','1171986ZIVWfr','../../package.json','158760PgCpYG','service','name'];a108_0x5a8c=function(){return _0x17401a;};return a108_0x5a8c();}export async function reportCliHelpTrace(_0x765bc5,_0x2cf580){const _0x52c9e6=a108_0x80115d;try{const _0x47d0ba=getOtelLoggerVersion(),_0x37bff7=await getSessionUserInfo(),_0x2c7dc2=_0x37bff7?.['user'];setTraceConfig({'otelLoggerVersion':_0x47d0ba,'serviceName':pkg[_0x52c9e6(0xfc)],'serviceVersion':BUILD_NUMBER?pkg[_0x52c9e6(0xfe)]+_0x52c9e6(0xf5)+BUILD_NUMBER:pkg[_0x52c9e6(0xfe)],'serviceEnv':process['env'][_0x52c9e6(0xf6)]??(process[_0x52c9e6(0xff)][_0x52c9e6(0xf3)]==='1'?_0x52c9e6(0xf0):'production'),'username':_0x2c7dc2?.[_0x52c9e6(0xe9)]??a108_0x158a06['userInfo']()['username']??_0x52c9e6(0xf7),..._0x2c7dc2&&{'nickname':_0x2c7dc2[_0x52c9e6(0xed)]}}),sendTraceLog({'traceName':'rabetbase-cli','version':pkg[_0x52c9e6(0xfe)],'spanName':_0x52c9e6(0xee),'eventType':_0x52c9e6(0xef),'logData':{'rabetbase.help.kind':_0x765bc5,..._0x2cf580?.[_0x52c9e6(0xfb)]&&{'rabetbase.help.service':_0x2cf580[_0x52c9e6(0xfb)]},..._0x2c7dc2?.['id']!=null&&_0x2c7dc2['id']!==''&&{'userid':String(_0x2c7dc2['id'])}}});}catch(_0x1f3e36){console[_0x52c9e6(0xf1)](_0x52c9e6(0xeb),_0x1f3e36);}}
1
+ (function(_0xc3c524,_0x30973c){var _0x3dc47d=a115_0x28b5,_0x2bbeec=_0xc3c524();while(!![]){try{var _0x349903=parseInt(_0x3dc47d(0xd9))/0x1*(parseInt(_0x3dc47d(0xdb))/0x2)+-parseInt(_0x3dc47d(0xda))/0x3*(-parseInt(_0x3dc47d(0xde))/0x4)+-parseInt(_0x3dc47d(0xd7))/0x5+-parseInt(_0x3dc47d(0xd5))/0x6+-parseInt(_0x3dc47d(0xd4))/0x7+-parseInt(_0x3dc47d(0xd8))/0x8+parseInt(_0x3dc47d(0xdc))/0x9;if(_0x349903===_0x30973c)break;else _0x2bbeec['push'](_0x2bbeec['shift']());}catch(_0x12f52c){_0x2bbeec['push'](_0x2bbeec['shift']());}}}(a115_0x373d,0x94c6d));import{sendCliTraceLog}from'./send-cli-trace-log.js';function a115_0x373d(){var _0x45ae6c=['18107820Yztall','service','152MVEONX','Failed\x20to\x20report\x20CLI\x20help\x20trace:','error','5839225gvzDoU','3522186LCmLjx','cli.help','3591585HzzXtG','3378752fxDzRi','67680wReutT','64806xaSSMq','10KTIDVn'];a115_0x373d=function(){return _0x45ae6c;};return a115_0x373d();}function a115_0x28b5(_0x575b60,_0x2dd074){_0x575b60=_0x575b60-0xd3;var _0x373df9=a115_0x373d();var _0x28b513=_0x373df9[_0x575b60];return _0x28b513;}export async function reportCliHelpTrace(_0x5eb1b4,_0xdde000){var _0x19f00f=a115_0x28b5;try{await sendCliTraceLog({'spanName':_0x19f00f(0xd6),'logData':{'rabetbase.help.kind':_0x5eb1b4,..._0xdde000?.['service']&&{'rabetbase.help.service':_0xdde000[_0x19f00f(0xdd)]}}});}catch(_0xe00e7c){console[_0x19f00f(0xd3)](_0x19f00f(0xdf),_0xe00e7c);}}
@@ -0,0 +1 @@
1
+ const a116_0x489cae=a116_0x54e0;(function(_0x447c20,_0x55e579){const _0x16776a=a116_0x54e0,_0x2e402f=_0x447c20();while(!![]){try{const _0x5f4b0f=-parseInt(_0x16776a(0x1d6))/0x1+parseInt(_0x16776a(0x1cf))/0x2+-parseInt(_0x16776a(0x1d1))/0x3*(-parseInt(_0x16776a(0x1d5))/0x4)+parseInt(_0x16776a(0x1db))/0x5*(parseInt(_0x16776a(0x1ce))/0x6)+-parseInt(_0x16776a(0x1d3))/0x7*(-parseInt(_0x16776a(0x1d4))/0x8)+parseInt(_0x16776a(0x1e1))/0x9+-parseInt(_0x16776a(0x1d9))/0xa*(parseInt(_0x16776a(0x1d7))/0xb);if(_0x5f4b0f===_0x55e579)break;else _0x2e402f['push'](_0x2e402f['shift']());}catch(_0x21eaeb){_0x2e402f['push'](_0x2e402f['shift']());}}}(a116_0x5bd1,0x40a5d));function a116_0x5bd1(){const _0x1a02b7=['userInfo','4589001NEYago','6oGdPkp','455360xUyzzd','username','17583RPTwFb','rabetbase-cli','43421OZAAVN','344zypiBT','280jxrMDo','461931eLAAcu','54505jJZVQQ','nickname','1550hUjVbF','production','400925onQiGd','unknown','../../package.json','name','user'];a116_0x5bd1=function(){return _0x1a02b7;};return a116_0x5bd1();}import{createRequire}from'node:module';import a116_0x325af4 from'node:os';import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setTraceConfig,getOtelLoggerVersion}from'@lovrabet/otel-logger';const require=createRequire(import.meta.url),pkg=require(a116_0x489cae(0x1dd));let cliOtelTraceInitialized=![];function a116_0x54e0(_0x2facf4,_0x5a1fe9){_0x2facf4=_0x2facf4-0x1ce;const _0x5bd19e=a116_0x5bd1();let _0x54e031=_0x5bd19e[_0x2facf4];return _0x54e031;}export async function ensureCliOtelTraceConfig(){const _0x4be9c4=a116_0x489cae,_0x95e463=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x1c3ae0=_0x95e463?.[_0x4be9c4(0x1df)];setTraceConfig({'otelLoggerVersion':getOtelLoggerVersion(),'serviceName':pkg[_0x4be9c4(0x1de)],'serviceVersion':GIT_COMMIT!==_0x4be9c4(0x1dc)?VERSION+'+'+GIT_COMMIT:pkg['version'],'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':_0x4be9c4(0x1da)),'username':_0x1c3ae0?.[_0x4be9c4(0x1d0)]??a116_0x325af4[_0x4be9c4(0x1e0)]()[_0x4be9c4(0x1d0)]??_0x4be9c4(0x1d2),..._0x1c3ae0&&{'nickname':_0x1c3ae0[_0x4be9c4(0x1d8)]}}),cliOtelTraceInitialized=!![];}return _0x95e463;}
@@ -1 +1 @@
1
- function a109_0x54eb(_0x7c1cd7,_0x244c93){_0x7c1cd7=_0x7c1cd7-0xee;const _0x5916f9=a109_0x5916();let _0x54ebc7=_0x5916f9[_0x7c1cd7];return _0x54ebc7;}(function(_0x469332,_0x4f62da){const _0x5e7214=a109_0x54eb,_0x174734=_0x469332();while(!![]){try{const _0x31be4a=parseInt(_0x5e7214(0xfe))/0x1*(-parseInt(_0x5e7214(0xee))/0x2)+-parseInt(_0x5e7214(0xfb))/0x3*(-parseInt(_0x5e7214(0xfd))/0x4)+parseInt(_0x5e7214(0xef))/0x5*(parseInt(_0x5e7214(0xf0))/0x6)+parseInt(_0x5e7214(0xf9))/0x7*(parseInt(_0x5e7214(0xf1))/0x8)+parseInt(_0x5e7214(0xfc))/0x9+parseInt(_0x5e7214(0xf7))/0xa*(parseInt(_0x5e7214(0xf5))/0xb)+-parseInt(_0x5e7214(0xf3))/0xc*(parseInt(_0x5e7214(0xf6))/0xd);if(_0x31be4a===_0x4f62da)break;else _0x174734['push'](_0x174734['shift']());}catch(_0x53f601){_0x174734['push'](_0x174734['shift']());}}}(a109_0x5916,0x9ec69));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a109_0x5916(){const _0xf129e1=['SIGTERM','12YJALat','once','142021pjIkQx','49563787JeZclp','940pvRLzI','exit','28kgHxlY','beforeExit','498xrZYYP','6350238yPOdxM','19944MRNoLC','425492QvGtSj','2xcApot','31180lMjsaR','1146smELcn','1900936lsoPBu'];a109_0x5916=function(){return _0xf129e1;};return a109_0x5916();}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x4153ae=a109_0x54eb;process['once'](_0x4153ae(0xfa),()=>{void flushOtelNodeIfUsed();});const _0x4dc12a=()=>{const _0x1de41f=_0x4153ae;void flushOtelNodeIfUsed()['then'](()=>process[_0x1de41f(0xf8)](0x0));};process[_0x4153ae(0xf4)]('SIGINT',_0x4dc12a),process['once'](_0x4153ae(0xf2),_0x4dc12a);}export async function exitWithOtelShutdown(_0x10d2c9){await flushOtelNodeIfUsed(),process['exit'](_0x10d2c9);}
1
+ (function(_0x4a58a7,_0x3e7f0f){const _0x44936c=a117_0x3c15,_0x5a995c=_0x4a58a7();while(!![]){try{const _0x2e5803=-parseInt(_0x44936c(0x19c))/0x1+-parseInt(_0x44936c(0x1a1))/0x2*(parseInt(_0x44936c(0x1a4))/0x3)+-parseInt(_0x44936c(0x1a2))/0x4*(-parseInt(_0x44936c(0x1a3))/0x5)+-parseInt(_0x44936c(0x199))/0x6*(-parseInt(_0x44936c(0x19d))/0x7)+-parseInt(_0x44936c(0x19a))/0x8*(parseInt(_0x44936c(0x197))/0x9)+-parseInt(_0x44936c(0x19f))/0xa+parseInt(_0x44936c(0x1a0))/0xb;if(_0x2e5803===_0x3e7f0f)break;else _0x5a995c['push'](_0x5a995c['shift']());}catch(_0x19d59c){_0x5a995c['push'](_0x5a995c['shift']());}}}(a117_0x548b,0xc386c));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a117_0x548b(){const _0x434442=['once','983461XNFiOv','7HCnQiR','then','11262970ffGFPv','13119524lLOVYf','497774ZdEVry','4bbuDIr','7011925pJrZQU','3nbTjiW','SIGTERM','SIGINT','beforeExit','1972233zXtfZc','exit','4701534ScOgDW','8kCSqen'];a117_0x548b=function(){return _0x434442;};return a117_0x548b();}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}function a117_0x3c15(_0x10d645,_0x104c59){_0x10d645=_0x10d645-0x195;const _0x548b9f=a117_0x548b();let _0x3c1544=_0x548b9f[_0x10d645];return _0x3c1544;}export function registerOtelShutdownOnExit(){const _0x6999a8=a117_0x3c15;process[_0x6999a8(0x19b)](_0x6999a8(0x196),()=>{void flushOtelNodeIfUsed();});const _0x11bb0e=()=>{const _0x11a82b=_0x6999a8;void flushOtelNodeIfUsed()[_0x11a82b(0x19e)](()=>process[_0x11a82b(0x198)](0x0));};process[_0x6999a8(0x19b)](_0x6999a8(0x195),_0x11bb0e),process[_0x6999a8(0x19b)](_0x6999a8(0x1a5),_0x11bb0e);}export async function exitWithOtelShutdown(_0x4d3de1){const _0x4c6943=a117_0x3c15;await flushOtelNodeIfUsed(),process[_0x4c6943(0x198)](_0x4d3de1);}
@@ -0,0 +1 @@
1
+ const a118_0x583a41=a118_0x44ef;(function(_0x47ad43,_0x154356){const _0x2bd723=a118_0x44ef,_0x4a8816=_0x47ad43();while(!![]){try{const _0x359554=-parseInt(_0x2bd723(0x134))/0x1*(-parseInt(_0x2bd723(0x13f))/0x2)+-parseInt(_0x2bd723(0x13b))/0x3*(-parseInt(_0x2bd723(0x13c))/0x4)+parseInt(_0x2bd723(0x13e))/0x5*(parseInt(_0x2bd723(0x130))/0x6)+-parseInt(_0x2bd723(0x12f))/0x7*(parseInt(_0x2bd723(0x138))/0x8)+-parseInt(_0x2bd723(0x13d))/0x9+parseInt(_0x2bd723(0x137))/0xa+-parseInt(_0x2bd723(0x139))/0xb*(parseInt(_0x2bd723(0x132))/0xc);if(_0x359554===_0x154356)break;else _0x4a8816['push'](_0x4a8816['shift']());}catch(_0x3a2505){_0x4a8816['push'](_0x4a8816['shift']());}}}(a118_0x4b8a,0xe9c6d));import{createRequire}from'node:module';import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'./ensure-cli-otel-config.js';function a118_0x44ef(_0xe6717f,_0x48a50){_0xe6717f=_0xe6717f-0x12f;const _0x4b8a94=a118_0x4b8a();let _0x44ef37=_0x4b8a94[_0xe6717f];return _0x44ef37;}const require=createRequire(import.meta.url),pkg=require('../../package.json'),DEFAULT_TRACE_NAME=a118_0x583a41(0x136);function a118_0x4b8a(){const _0x190ee9=['logData','rabetbase-cli','1308210qTJpaV','2930888IbrfTa','16838701sCjLEg','manual','3vnZcLG','4628884hogKss','130347hpREne','25MWqkFG','1524954CGJOOV','spanName','7ngkoVw','982398TUOlkA','version','12ZKFOwa','traceparent','1XkCjTi'];a118_0x4b8a=function(){return _0x190ee9;};return a118_0x4b8a();}export async function sendCliTraceLog(_0x3ead34){const _0x568d62=a118_0x583a41;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x3ead34['traceName']??DEFAULT_TRACE_NAME,'version':_0x3ead34['version']??pkg[_0x568d62(0x131)],'spanName':_0x3ead34[_0x568d62(0x140)],'eventType':_0x568d62(0x13a),'logData':_0x3ead34[_0x568d62(0x135)],..._0x3ead34[_0x568d62(0x133)]&&{'traceparent':_0x3ead34[_0x568d62(0x133)]}});}
@@ -1 +1 @@
1
- const a111_0xc08c8e=a111_0x14a3;(function(_0x315bc7,_0x316d97){const _0x59890b=a111_0x14a3,_0x34908a=_0x315bc7();while(!![]){try{const _0x259194=-parseInt(_0x59890b(0x16e))/0x1*(parseInt(_0x59890b(0x18e))/0x2)+-parseInt(_0x59890b(0x19a))/0x3+-parseInt(_0x59890b(0x17a))/0x4*(-parseInt(_0x59890b(0x1a2))/0x5)+parseInt(_0x59890b(0x190))/0x6*(-parseInt(_0x59890b(0x1a3))/0x7)+-parseInt(_0x59890b(0x180))/0x8+-parseInt(_0x59890b(0x19f))/0x9*(-parseInt(_0x59890b(0x1a4))/0xa)+parseInt(_0x59890b(0x191))/0xb*(parseInt(_0x59890b(0x186))/0xc);if(_0x259194===_0x316d97)break;else _0x34908a['push'](_0x34908a['shift']());}catch(_0x4455d4){_0x34908a['push'](_0x34908a['shift']());}}}(a111_0x5f19,0x65cc7));export const CORE_IDE_CONFIGS={'cursor':{'name':a111_0xc08c8e(0x176),'description':a111_0xc08c8e(0x182),'folders':['.cursorrules','.cursor'],'files':[{'type':a111_0xc08c8e(0x17f),'path':'.cursor/skills/rabetbase.md','template':'SKILL.md.tpl'}]},'windsurf':{'name':a111_0xc08c8e(0x19b),'description':a111_0xc08c8e(0x197),'folders':[a111_0xc08c8e(0x171)],'files':[{'type':a111_0xc08c8e(0x17f),'path':a111_0xc08c8e(0x184),'template':a111_0xc08c8e(0x17d)}]},'claude':{'name':a111_0xc08c8e(0x19c),'description':a111_0xc08c8e(0x19c),'folders':[a111_0xc08c8e(0x196)],'files':[{'type':a111_0xc08c8e(0x17f),'path':a111_0xc08c8e(0x194),'template':a111_0xc08c8e(0x17d)}]},'cline':{'name':a111_0xc08c8e(0x17c),'description':a111_0xc08c8e(0x183),'folders':[a111_0xc08c8e(0x19e)],'files':[{'type':a111_0xc08c8e(0x17f),'path':a111_0xc08c8e(0x16f),'template':'SKILL.md.tpl'}]},'codex':{'name':a111_0xc08c8e(0x17e),'description':'Codex\x20IDE','folders':[a111_0xc08c8e(0x1a5)],'files':[{'type':a111_0xc08c8e(0x17f),'path':a111_0xc08c8e(0x177),'template':a111_0xc08c8e(0x17d)}]},'opencode':{'name':'OpenCode','description':a111_0xc08c8e(0x192),'folders':[a111_0xc08c8e(0x18f)],'files':[{'type':a111_0xc08c8e(0x17f),'path':'.opencode/skills/lovrabet/SKILL.md','template':a111_0xc08c8e(0x17d)}]},'qoder':{'name':'Qoder','description':'Qoder\x20IDE','folders':[a111_0xc08c8e(0x1a1)],'files':[{'type':'file','path':a111_0xc08c8e(0x179),'template':a111_0xc08c8e(0x17d)},{'type':a111_0xc08c8e(0x17f),'path':a111_0xc08c8e(0x175),'template':'SKILL.md.tpl'}]},'codebuddy':{'name':a111_0xc08c8e(0x185),'description':a111_0xc08c8e(0x173),'folders':[a111_0xc08c8e(0x187)],'files':[{'type':'file','path':'.codebuddy/skills/lovrabet/SKILL.md','template':a111_0xc08c8e(0x17d)}]},'trae':{'name':a111_0xc08c8e(0x172),'description':a111_0xc08c8e(0x189),'folders':[a111_0xc08c8e(0x170)],'files':[{'type':a111_0xc08c8e(0x17f),'path':'.trae/skills/lovrabet/SKILL.md','template':a111_0xc08c8e(0x17d)}]}};function a111_0x5f19(){const _0xca69d1=['.codebuddy','Antigravity\x20IDE','Trae\x20IDE','windsurf','qoder','cline','codex','60uHzdVl','.opencode','6WcKrrh','121KdMBDO','OpenCode\x20IDE','antigravity','.claude/skills/lovrabet/SKILL.md','其他\x20(通用模板)','.claude','Windsurf\x20IDE','claude','opencode','1817481JjGKPr','Windsurf','Claude\x20Code','trae','.cline','45dyETdu','codebuddy','.qoder','5rSIOBW','5452195YCrzlT','717110FMDJNo','.codex','5118NESIbT','.cline/skills/lovrabet/SKILL.md','.trae','.windsurf','Trae','CodeBuddy\x20IDE','.agent','.qoder/skills/lovrabet/SKILL.md','Cursor','.codex/skills/lovrabet/SKILL.md','.agent/skills/lovrabet/SKILL.md','.qoder/rules/rabetbase.md','2156416YiiQbS','通用模板\x20-\x20兜底方案','Cline','SKILL.md.tpl','Codex','file','3754184UDVAwW','cursor','Cursor\x20IDE','Cline\x20IDE','.windsurf/workflows/rabetbase.md','CodeBuddy','1665636XGbFia'];a111_0x5f19=function(){return _0xca69d1;};return a111_0x5f19();}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a111_0xc08c8e(0x195),'description':a111_0xc08c8e(0x17b),'folders':[a111_0xc08c8e(0x174)],'files':[{'type':a111_0xc08c8e(0x17f),'path':a111_0xc08c8e(0x178),'template':a111_0xc08c8e(0x17d)}]},'antigravity':{'name':'Antigravity','description':a111_0xc08c8e(0x188),'folders':['.agent'],'files':[{'type':a111_0xc08c8e(0x17f),'path':a111_0xc08c8e(0x178),'template':a111_0xc08c8e(0x17d)}]}};function a111_0x14a3(_0x3d02fd,_0x2f4fa8){_0x3d02fd=_0x3d02fd-0x16e;const _0x5f19a5=a111_0x5f19();let _0x14a38d=_0x5f19a5[_0x3d02fd];return _0x14a38d;}export const CORE_IDE_LIST=[a111_0xc08c8e(0x198),a111_0xc08c8e(0x18c),a111_0xc08c8e(0x1a0),'codex',a111_0xc08c8e(0x181),a111_0xc08c8e(0x199),a111_0xc08c8e(0x18b),a111_0xc08c8e(0x19d),a111_0xc08c8e(0x18a)];export const IDE_LIST=[a111_0xc08c8e(0x193),a111_0xc08c8e(0x198),a111_0xc08c8e(0x18c),a111_0xc08c8e(0x1a0),'codex',a111_0xc08c8e(0x181),a111_0xc08c8e(0x199),a111_0xc08c8e(0x18b),a111_0xc08c8e(0x19d),a111_0xc08c8e(0x18a),'agent'];export const ALL_CORE_IDES=[a111_0xc08c8e(0x181),a111_0xc08c8e(0x18a),a111_0xc08c8e(0x198),'cline',a111_0xc08c8e(0x18d),'opencode',a111_0xc08c8e(0x18b),a111_0xc08c8e(0x1a0),a111_0xc08c8e(0x19d)];
1
+ function a120_0x46e4(_0x30f09e,_0x1d396f){_0x30f09e=_0x30f09e-0x1aa;const _0x63f3ce=a120_0x63f3();let _0x46e4e1=_0x63f3ce[_0x30f09e];return _0x46e4e1;}function a120_0x63f3(){const _0x5a985e=['.qoder','其他\x20(通用模板)','.cline/skills/lovrabet/SKILL.md','1864yInLTG','Trae\x20IDE','claude','.qoder/skills/lovrabet/SKILL.md','file','.cursorrules','CodeBuddy','.trae','.cursor','CodeBuddy\x20IDE','Cline\x20IDE','Trae','Windsurf','Windsurf\x20IDE','3410498dLyewi','Codex','.codebuddy','.claude/skills/lovrabet/SKILL.md','OpenCode','windsurf','opencode','24471bfgGud','.windsurf/workflows/rabetbase.md','Claude\x20Code','antigravity','Antigravity','通用模板\x20-\x20兜底方案','.cursor/skills/rabetbase.md','.claude','cline','trae','Qoder','.opencode','1528496hOyIZA','SKILL.md.tpl','codex','.agent','6vLjbag','.cline','qoder','.codex','133128vbgGxh','397070FMUoqD','cursor','.opencode/skills/lovrabet/SKILL.md','2319215lWmxLg','.agent/skills/lovrabet/SKILL.md','.codex/skills/lovrabet/SKILL.md','13668MfMtxh','.codebuddy/skills/lovrabet/SKILL.md','.trae/skills/lovrabet/SKILL.md','Antigravity\x20IDE','codebuddy','Qoder\x20IDE'];a120_0x63f3=function(){return _0x5a985e;};return a120_0x63f3();}const a120_0x42a07c=a120_0x46e4;(function(_0x3a240f,_0x30094d){const _0x50f5b=a120_0x46e4,_0x4d67f0=_0x3a240f();while(!![]){try{const _0x1c3f58=parseInt(_0x50f5b(0x1df))/0x1+parseInt(_0x50f5b(0x1d6))/0x2+-parseInt(_0x50f5b(0x1de))/0x3+-parseInt(_0x50f5b(0x1ac))/0x4+parseInt(_0x50f5b(0x1e2))/0x5*(parseInt(_0x50f5b(0x1da))/0x6)+-parseInt(_0x50f5b(0x1c3))/0x7+parseInt(_0x50f5b(0x1b5))/0x8*(-parseInt(_0x50f5b(0x1ca))/0x9);if(_0x1c3f58===_0x30094d)break;else _0x4d67f0['push'](_0x4d67f0['shift']());}catch(_0x598009){_0x4d67f0['push'](_0x4d67f0['shift']());}}}(a120_0x63f3,0x6f7b3));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a120_0x42a07c(0x1ba),a120_0x42a07c(0x1bd)],'files':[{'type':'file','path':a120_0x42a07c(0x1d0),'template':a120_0x42a07c(0x1d7)}]},'windsurf':{'name':a120_0x42a07c(0x1c1),'description':a120_0x42a07c(0x1c2),'folders':['.windsurf'],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1cb),'template':a120_0x42a07c(0x1d7)}]},'claude':{'name':'Claude\x20Code','description':a120_0x42a07c(0x1cc),'folders':[a120_0x42a07c(0x1d1)],'files':[{'type':'file','path':a120_0x42a07c(0x1c6),'template':a120_0x42a07c(0x1d7)}]},'cline':{'name':'Cline','description':a120_0x42a07c(0x1bf),'folders':[a120_0x42a07c(0x1db)],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1b4),'template':a120_0x42a07c(0x1d7)}]},'codex':{'name':a120_0x42a07c(0x1c4),'description':'Codex\x20IDE','folders':[a120_0x42a07c(0x1dd)],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1ab),'template':a120_0x42a07c(0x1d7)}]},'opencode':{'name':a120_0x42a07c(0x1c7),'description':'OpenCode\x20IDE','folders':[a120_0x42a07c(0x1d5)],'files':[{'type':'file','path':a120_0x42a07c(0x1e1),'template':'SKILL.md.tpl'}]},'qoder':{'name':a120_0x42a07c(0x1d4),'description':a120_0x42a07c(0x1b1),'folders':[a120_0x42a07c(0x1b2)],'files':[{'type':a120_0x42a07c(0x1b9),'path':'.qoder/rules/rabetbase.md','template':a120_0x42a07c(0x1d7)},{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1b8),'template':'SKILL.md.tpl'}]},'codebuddy':{'name':a120_0x42a07c(0x1bb),'description':a120_0x42a07c(0x1be),'folders':[a120_0x42a07c(0x1c5)],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1ad),'template':a120_0x42a07c(0x1d7)}]},'trae':{'name':a120_0x42a07c(0x1c0),'description':a120_0x42a07c(0x1b6),'folders':[a120_0x42a07c(0x1bc)],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1ae),'template':a120_0x42a07c(0x1d7)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a120_0x42a07c(0x1b3),'description':a120_0x42a07c(0x1cf),'folders':[a120_0x42a07c(0x1d9)],'files':[{'type':'file','path':a120_0x42a07c(0x1aa),'template':'SKILL.md.tpl'}]},'antigravity':{'name':a120_0x42a07c(0x1ce),'description':a120_0x42a07c(0x1af),'folders':[a120_0x42a07c(0x1d9)],'files':[{'type':a120_0x42a07c(0x1b9),'path':'.agent/skills/lovrabet/SKILL.md','template':a120_0x42a07c(0x1d7)}]}};export const CORE_IDE_LIST=['claude',a120_0x42a07c(0x1d2),a120_0x42a07c(0x1b0),a120_0x42a07c(0x1d8),'cursor',a120_0x42a07c(0x1c9),'qoder',a120_0x42a07c(0x1d3),a120_0x42a07c(0x1c8)];export const IDE_LIST=[a120_0x42a07c(0x1cd),a120_0x42a07c(0x1b7),'cline',a120_0x42a07c(0x1b0),a120_0x42a07c(0x1d8),a120_0x42a07c(0x1e0),a120_0x42a07c(0x1c9),a120_0x42a07c(0x1dc),a120_0x42a07c(0x1d3),'windsurf','agent'];export const ALL_CORE_IDES=[a120_0x42a07c(0x1e0),'windsurf','claude',a120_0x42a07c(0x1d2),a120_0x42a07c(0x1d8),a120_0x42a07c(0x1c9),a120_0x42a07c(0x1dc),a120_0x42a07c(0x1b0),a120_0x42a07c(0x1d3)];
@@ -1 +1 @@
1
- (function(_0x5f1d7b,_0x281b18){const _0x37f4c6=a112_0x52c8,_0x12b11c=_0x5f1d7b();while(!![]){try{const _0x40e5d1=-parseInt(_0x37f4c6(0xa0))/0x1+parseInt(_0x37f4c6(0x9c))/0x2*(parseInt(_0x37f4c6(0xa6))/0x3)+-parseInt(_0x37f4c6(0x9f))/0x4*(parseInt(_0x37f4c6(0xa4))/0x5)+parseInt(_0x37f4c6(0x9e))/0x6*(parseInt(_0x37f4c6(0xa8))/0x7)+parseInt(_0x37f4c6(0x9a))/0x8*(parseInt(_0x37f4c6(0xa7))/0x9)+-parseInt(_0x37f4c6(0xa5))/0xa*(parseInt(_0x37f4c6(0x99))/0xb)+-parseInt(_0x37f4c6(0xa3))/0xc;if(_0x40e5d1===_0x281b18)break;else _0x12b11c['push'](_0x12b11c['shift']());}catch(_0x2cca4c){_0x12b11c['push'](_0x12b11c['shift']());}}}(a112_0x172c,0xafce4));import{getTemplateBaseUrl}from'./config.js';function a112_0x52c8(_0x412cb9,_0x3f76c0){_0x412cb9=_0x412cb9-0x98;const _0x172cf=a112_0x172c();let _0x52c8cb=_0x172cf[_0x412cb9];return _0x52c8cb;}export async function fetchCdnConfig(){const _0x143188=a112_0x52c8;try{const _0x15b14e=getTemplateBaseUrl(),_0x2780a4=_0x15b14e+'/config.json',_0x23d152=await fetch(_0x2780a4,{'headers':{'Accept':'application/json'}});if(!_0x23d152['ok'])return null;const _0x9620f7=await _0x23d152[_0x143188(0xa1)]();if(!_0x9620f7['cli']?.['stableVersion']||!_0x9620f7[_0x143188(0x9d)]?.[_0x143188(0x9b)]?.[_0x143188(0x98)])return null;return _0x9620f7;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x2c2880=a112_0x52c8,_0x210407=Date[_0x2c2880(0xa2)]();if(cachedConfig&&_0x210407-cacheTime<CACHE_TTL)return cachedConfig;const _0x5e6cd5=await fetchCdnConfig();return _0x5e6cd5&&(cachedConfig=_0x5e6cd5,cacheTime=_0x210407),_0x5e6cd5;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}function a112_0x172c(){const _0x2e0c8e=['node','12FRxTku','sdk','2620218InkmfF','4GrqYni','848939PtMlHD','json','now','536256nRIUTN','456835wbyICk','5524090pKQlBW','557310hkiizs','9ZwmLiG','21IPgndZ','stableVersion','22hqbznC','3081464CAdLWM'];a112_0x172c=function(){return _0x2e0c8e;};return a112_0x172c();}
1
+ (function(_0x4653de,_0x49a781){const _0x4867ac=a121_0x3e7e,_0x168d18=_0x4653de();while(!![]){try{const _0x42d649=parseInt(_0x4867ac(0x154))/0x1*(parseInt(_0x4867ac(0x14e))/0x2)+parseInt(_0x4867ac(0x14f))/0x3+parseInt(_0x4867ac(0x150))/0x4+parseInt(_0x4867ac(0x148))/0x5*(parseInt(_0x4867ac(0x153))/0x6)+parseInt(_0x4867ac(0x156))/0x7+parseInt(_0x4867ac(0x151))/0x8+-parseInt(_0x4867ac(0x14a))/0x9;if(_0x42d649===_0x49a781)break;else _0x168d18['push'](_0x168d18['shift']());}catch(_0x478ab3){_0x168d18['push'](_0x168d18['shift']());}}}(a121_0xbd8e,0x8e6c4));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x2c69b2=a121_0x3e7e;try{const _0x4ae7a0=getTemplateBaseUrl(),_0x5e02fa=_0x4ae7a0+_0x2c69b2(0x14b),_0x5dd809=await fetch(_0x5e02fa,{'headers':{'Accept':_0x2c69b2(0x149)}});if(!_0x5dd809['ok'])return null;const _0xa334a6=await _0x5dd809[_0x2c69b2(0x14c)]();if(!_0xa334a6['cli']?.[_0x2c69b2(0x14d)]||!_0xa334a6[_0x2c69b2(0x155)]?.['node']?.['stableVersion'])return null;return _0xa334a6;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;function a121_0x3e7e(_0x49733e,_0xe6ed18){_0x49733e=_0x49733e-0x148;const _0xbd8e62=a121_0xbd8e();let _0x3e7eca=_0xbd8e62[_0x49733e];return _0x3e7eca;}const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0xa8f898=a121_0x3e7e,_0x1eaf8b=Date[_0xa8f898(0x152)]();if(cachedConfig&&_0x1eaf8b-cacheTime<CACHE_TTL)return cachedConfig;const _0x593f18=await fetchCdnConfig();return _0x593f18&&(cachedConfig=_0x593f18,cacheTime=_0x1eaf8b),_0x593f18;}function a121_0xbd8e(){const _0x4f1cc6=['/config.json','json','stableVersion','16FiOXCp','196188UjsCmZ','634412vKIIaZ','1425928WIDmJa','now','30606Phozqg','5019RbASmT','sdk','4650401bbKFjn','865hTcyDi','application/json','12652596cQmLns'];a121_0xbd8e=function(){return _0x4f1cc6;};return a121_0xbd8e();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
@@ -1 +1 @@
1
- const a113_0x1b3674=a113_0x4d0b;(function(_0x3c355e,_0x33c7d7){const _0x11bd3f=a113_0x4d0b,_0x5809fc=_0x3c355e();while(!![]){try{const _0x1f504b=-parseInt(_0x11bd3f(0x97))/0x1+parseInt(_0x11bd3f(0xb2))/0x2*(-parseInt(_0x11bd3f(0x99))/0x3)+-parseInt(_0x11bd3f(0x90))/0x4+-parseInt(_0x11bd3f(0xa2))/0x5*(parseInt(_0x11bd3f(0xa6))/0x6)+parseInt(_0x11bd3f(0xa7))/0x7+-parseInt(_0x11bd3f(0x9b))/0x8+parseInt(_0x11bd3f(0xb1))/0x9;if(_0x1f504b===_0x33c7d7)break;else _0x5809fc['push'](_0x5809fc['shift']());}catch(_0x8ffd33){_0x5809fc['push'](_0x5809fc['shift']());}}}(a113_0x56f2,0xde944));import a113_0x4d47af from'node:fs';import a113_0x5e3595 from'node:path';import a113_0x14691e from'semver';import{getCdnConfig}from'./cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a113_0x1b3674(0xaa);function isNonNumericVersion(_0x5b901c){const _0x1dbe82=a113_0x1b3674,_0x5093cf=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x5093cf[_0x1dbe82(0x91)](_0x1479a6=>_0x1479a6[_0x1dbe82(0xa8)](_0x5b901c));}function getInstalledVersion(_0x42e816,_0x30ec2a){const _0x16b158=a113_0x1b3674;try{const _0xccd2f5=a113_0x5e3595[_0x16b158(0x9d)](_0x42e816,_0x16b158(0xa4),_0x30ec2a,_0x16b158(0xaf));if(a113_0x4d47af[_0x16b158(0xac)](_0xccd2f5)){const _0x9b9b80=JSON['parse'](a113_0x4d47af['readFileSync'](_0xccd2f5,_0x16b158(0x98)));return _0x9b9b80[_0x16b158(0xa0)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x3fb7cc=a113_0x1b3674;try{const _0x4b52a2=await getCdnConfig();return _0x4b52a2?.[_0x3fb7cc(0xa1)]?.[_0x3fb7cc(0x93)]?.[_0x3fb7cc(0xae)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x50cd5a=a113_0x1b3674;try{const _0x149e70=await getCdnConfig();return _0x149e70?.[_0x50cd5a(0xa1)]?.[_0x50cd5a(0x93)]?.[_0x50cd5a(0x9f)]||_0x50cd5a(0x9c);}catch{return _0x50cd5a(0x9c);}}export async function checkSdkVersion(_0x227012){const _0x11249e=a113_0x1b3674,_0x43ddde=a113_0x5e3595[_0x11249e(0x9d)](_0x227012,_0x11249e(0xaf)),[_0x13f6d2,_0x27655b]=await Promise[_0x11249e(0xab)]([getSdkStableVersion(),getSdkPackageName()]),_0x218baa=_0x13f6d2||FALLBACK_MIN_SDK_VERSION;if(!a113_0x4d47af[_0x11249e(0xac)](_0x43ddde))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x218baa,'packageName':_0x27655b,'stableVersion':_0x13f6d2};try{const _0x2d14b4=JSON[_0x11249e(0x96)](a113_0x4d47af[_0x11249e(0xa5)](_0x43ddde,_0x11249e(0x95))),_0x22ac9e=_0x2d14b4['dependencies']||{},_0x29d748=_0x2d14b4[_0x11249e(0xa9)]||{},_0x43b1b3=_0x22ac9e[_0x27655b]||_0x29d748[_0x27655b];if(!_0x43b1b3)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x218baa,'packageName':_0x27655b,'stableVersion':_0x13f6d2};let _0x2f14ac=getInstalledVersion(_0x227012,_0x27655b);!_0x2f14ac&&(_0x2f14ac=_0x43b1b3);if(isNonNumericVersion(_0x43b1b3))return{'installed':!![],'version':_0x2f14ac,'needsUpgrade':![],'minVersion':_0x218baa,'packageName':_0x27655b,'stableVersion':_0x13f6d2};const _0x431dde=a113_0x14691e['coerce'](_0x2f14ac),_0x9f14ed=a113_0x14691e[_0x11249e(0x92)](_0x218baa),_0x1e912a=_0x431dde&&_0x9f14ed?a113_0x14691e['lt'](_0x431dde,_0x9f14ed):![];return{'installed':!![],'version':_0x2f14ac,'needsUpgrade':_0x1e912a,'minVersion':_0x218baa,'packageName':_0x27655b,'stableVersion':_0x13f6d2};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x218baa,'packageName':_0x27655b,'stableVersion':_0x13f6d2};}}function a113_0x56f2(){const _0x1d057b=['existsSync','↪\x20SDK\x20update\x20available','stableVersion','package.json','\x1b[33m','38264202obfITa','2410SGypAi','npm\x20install\x20','minVersion','\x1b[1m','needsUpgrade','dependencies','latest','3578468pklkvB','some','coerce','node','\x20\x20\x20Current\x20version:\x20','utf8','parse','1181641ZwKgxV','utf-8','1977WdQlKB','\x20\x20\x20Upgrade\x20command:\x20','5235280CowBRo','@lovrabet/sdk','join','log','packageName','version','sdk','5SCkkFp','\x1b[0m','node_modules','readFileSync','2984430TtKBCU','4775918YokzNv','test','devDependencies','1.2.0','all'];a113_0x56f2=function(){return _0x1d057b;};return a113_0x56f2();}export function checkSdkVersionSync(_0xa5475f){const _0x3cd1e9=a113_0x1b3674,_0x38290e=a113_0x5e3595[_0x3cd1e9(0x9d)](_0xa5475f,_0x3cd1e9(0xaf)),_0x52663e=_0x3cd1e9(0x9c);if(!a113_0x4d47af['existsSync'](_0x38290e))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x52663e,'stableVersion':null};try{const _0x3e02d4=JSON[_0x3cd1e9(0x96)](a113_0x4d47af[_0x3cd1e9(0xa5)](_0x38290e,_0x3cd1e9(0x95))),_0x4ee214=_0x3e02d4[_0x3cd1e9(0x8e)]||{},_0x59b3b5=_0x3e02d4[_0x3cd1e9(0xa9)]||{},_0x32b6e4=_0x4ee214[_0x52663e]||_0x59b3b5[_0x52663e];if(!_0x32b6e4)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x52663e,'stableVersion':null};let _0xd28898=getInstalledVersion(_0xa5475f,_0x52663e);!_0xd28898&&(_0xd28898=_0x32b6e4);if(isNonNumericVersion(_0x32b6e4))return{'installed':!![],'version':_0xd28898,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x52663e,'stableVersion':null};const _0x1a0855=a113_0x14691e[_0x3cd1e9(0x92)](_0xd28898),_0x137a3e=_0x1a0855?a113_0x14691e['lt'](_0x1a0855,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0xd28898,'needsUpgrade':_0x137a3e,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x52663e,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x52663e,'stableVersion':null};}}function a113_0x4d0b(_0xbc5244,_0x1f4311){_0xbc5244=_0xbc5244-0x8a;const _0x56f23b=a113_0x56f2();let _0x4d0bd8=_0x56f23b[_0xbc5244];return _0x4d0bd8;}export function printSdkUpgradeWarning(_0x19c89a){const _0x51ed95=a113_0x1b3674;if(!_0x19c89a[_0x51ed95(0x8d)])return;const _0xdf906e=_0x51ed95(0xb0),_0x3d4ea2=_0x51ed95(0xa3),_0x288cbc=_0x51ed95(0x8c),_0x1cf68b=_0x19c89a[_0x51ed95(0x9f)]||'@lovrabet/sdk',_0x54a012=_0x19c89a[_0x51ed95(0xae)]||_0x19c89a[_0x51ed95(0x8b)],_0x231999=_0x51ed95(0x8a)+_0x1cf68b+'@'+(_0x54a012||_0x51ed95(0x8f));console['log'](),console[_0x51ed95(0x9e)](''+_0xdf906e+_0x288cbc+_0x51ed95(0xad)+_0x3d4ea2),console['log'](_0xdf906e+_0x51ed95(0x94)+_0x1cf68b+'@'+_0x19c89a['version']+_0x3d4ea2),console[_0x51ed95(0x9e)](_0xdf906e+'\x20\x20\x20Stable\x20version:\x20'+_0x54a012+_0x3d4ea2),console[_0x51ed95(0x9e)](_0xdf906e+_0x51ed95(0x9a)+_0x231999+_0x3d4ea2),console['log']();}
1
+ function a122_0x5cb6(_0x32933a,_0x1a4a06){_0x32933a=_0x32933a-0x69;const _0x30dc39=a122_0x30dc();let _0x5cb6dc=_0x30dc39[_0x32933a];return _0x5cb6dc;}const a122_0x80bb5b=a122_0x5cb6;(function(_0x3a743b,_0x4ef526){const _0x1d4601=a122_0x5cb6,_0x4fc7e4=_0x3a743b();while(!![]){try{const _0x341eb3=parseInt(_0x1d4601(0x74))/0x1*(parseInt(_0x1d4601(0x91))/0x2)+-parseInt(_0x1d4601(0x6a))/0x3+-parseInt(_0x1d4601(0x7b))/0x4+-parseInt(_0x1d4601(0x6b))/0x5*(-parseInt(_0x1d4601(0x82))/0x6)+-parseInt(_0x1d4601(0x6d))/0x7+parseInt(_0x1d4601(0x75))/0x8*(parseInt(_0x1d4601(0x76))/0x9)+-parseInt(_0x1d4601(0x7f))/0xa*(-parseInt(_0x1d4601(0x72))/0xb);if(_0x341eb3===_0x4ef526)break;else _0x4fc7e4['push'](_0x4fc7e4['shift']());}catch(_0x1c37c8){_0x4fc7e4['push'](_0x4fc7e4['shift']());}}}(a122_0x30dc,0x7a59d));import a122_0x508060 from'node:fs';import a122_0x203503 from'node:path';import a122_0x52ea64 from'semver';import{getCdnConfig}from'./cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a122_0x80bb5b(0x70);function isNonNumericVersion(_0x5bfbb1){const _0x5ab7a3=a122_0x80bb5b,_0x322e14=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x322e14[_0x5ab7a3(0x90)](_0xfb82be=>_0xfb82be[_0x5ab7a3(0x6e)](_0x5bfbb1));}function getInstalledVersion(_0x48a51c,_0x5aa67f){const _0x53b3dd=a122_0x80bb5b;try{const _0x472488=a122_0x203503[_0x53b3dd(0x6f)](_0x48a51c,_0x53b3dd(0x7d),_0x5aa67f,'package.json');if(a122_0x508060['existsSync'](_0x472488)){const _0x540068=JSON[_0x53b3dd(0x7e)](a122_0x508060[_0x53b3dd(0x89)](_0x472488,_0x53b3dd(0x83)));return _0x540068[_0x53b3dd(0x8d)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x546abc=a122_0x80bb5b;try{const _0xed216e=await getCdnConfig();return _0xed216e?.[_0x546abc(0x7a)]?.[_0x546abc(0x80)]?.[_0x546abc(0x7c)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x26755c=a122_0x80bb5b;try{const _0x5d9099=await getCdnConfig();return _0x5d9099?.[_0x26755c(0x7a)]?.[_0x26755c(0x80)]?.['packageName']||'@lovrabet/sdk';}catch{return _0x26755c(0x8b);}}export async function checkSdkVersion(_0x498ee){const _0x38ab99=a122_0x80bb5b,_0x2b228f=a122_0x203503[_0x38ab99(0x6f)](_0x498ee,'package.json'),[_0x5ef6e3,_0x4e1fe9]=await Promise[_0x38ab99(0x84)]([getSdkStableVersion(),getSdkPackageName()]),_0x273a3d=_0x5ef6e3||FALLBACK_MIN_SDK_VERSION;if(!a122_0x508060['existsSync'](_0x2b228f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};try{const _0x13b575=JSON[_0x38ab99(0x7e)](a122_0x508060[_0x38ab99(0x89)](_0x2b228f,'utf8')),_0x4ed349=_0x13b575['dependencies']||{},_0x3d0418=_0x13b575[_0x38ab99(0x8a)]||{},_0x8f4c81=_0x4ed349[_0x4e1fe9]||_0x3d0418[_0x4e1fe9];if(!_0x8f4c81)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};let _0x158018=getInstalledVersion(_0x498ee,_0x4e1fe9);!_0x158018&&(_0x158018=_0x8f4c81);if(isNonNumericVersion(_0x8f4c81))return{'installed':!![],'version':_0x158018,'needsUpgrade':![],'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};const _0x2bdef4=a122_0x52ea64[_0x38ab99(0x78)](_0x158018),_0x290973=a122_0x52ea64['coerce'](_0x273a3d),_0x389d39=_0x2bdef4&&_0x290973?a122_0x52ea64['lt'](_0x2bdef4,_0x290973):![];return{'installed':!![],'version':_0x158018,'needsUpgrade':_0x389d39,'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};}}export function checkSdkVersionSync(_0x165159){const _0x36fcf4=a122_0x80bb5b,_0x3a8b2b=a122_0x203503[_0x36fcf4(0x6f)](_0x165159,_0x36fcf4(0x87)),_0x3048e3='@lovrabet/sdk';if(!a122_0x508060[_0x36fcf4(0x73)](_0x3a8b2b))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};try{const _0x420762=JSON[_0x36fcf4(0x7e)](a122_0x508060[_0x36fcf4(0x89)](_0x3a8b2b,_0x36fcf4(0x88))),_0x1c797a=_0x420762['dependencies']||{},_0x37661b=_0x420762[_0x36fcf4(0x8a)]||{},_0x22ce8e=_0x1c797a[_0x3048e3]||_0x37661b[_0x3048e3];if(!_0x22ce8e)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};let _0x4bbc31=getInstalledVersion(_0x165159,_0x3048e3);!_0x4bbc31&&(_0x4bbc31=_0x22ce8e);if(isNonNumericVersion(_0x22ce8e))return{'installed':!![],'version':_0x4bbc31,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};const _0xc9f939=a122_0x52ea64[_0x36fcf4(0x78)](_0x4bbc31),_0x394664=_0xc9f939?a122_0x52ea64['lt'](_0xc9f939,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x4bbc31,'needsUpgrade':_0x394664,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};}}function a122_0x30dc(){const _0x2b5caa=['1XpPkPr','16cdxzUm','2527353OLISRM','needsUpgrade','coerce','\x20\x20\x20Current\x20version:\x20','sdk','3003364wsGtpw','stableVersion','node_modules','parse','12730840FbHPmT','node','\x20\x20\x20Upgrade\x20command:\x20','7476Sivrae','utf-8','all','\x1b[1m','minVersion','package.json','utf8','readFileSync','devDependencies','@lovrabet/sdk','latest','version','\x20\x20\x20Stable\x20version:\x20','↪\x20SDK\x20update\x20available','some','396978WDXqwX','\x1b[33m','2890914saDDWU','3920kdITiY','log','5561101WbXlUR','test','join','1.2.0','npm\x20install\x20','11EhxyzF','existsSync'];a122_0x30dc=function(){return _0x2b5caa;};return a122_0x30dc();}export function printSdkUpgradeWarning(_0x15a4ab){const _0x4916cb=a122_0x80bb5b;if(!_0x15a4ab[_0x4916cb(0x77)])return;const _0x15a527=_0x4916cb(0x69),_0x23168d='\x1b[0m',_0x1fc7f4=_0x4916cb(0x85),_0x24701e=_0x15a4ab['packageName']||_0x4916cb(0x8b),_0x6865b=_0x15a4ab[_0x4916cb(0x7c)]||_0x15a4ab[_0x4916cb(0x86)],_0x13abe1=_0x4916cb(0x71)+_0x24701e+'@'+(_0x6865b||_0x4916cb(0x8c));console[_0x4916cb(0x6c)](),console[_0x4916cb(0x6c)](''+_0x15a527+_0x1fc7f4+_0x4916cb(0x8f)+_0x23168d),console['log'](_0x15a527+_0x4916cb(0x79)+_0x24701e+'@'+_0x15a4ab['version']+_0x23168d),console[_0x4916cb(0x6c)](_0x15a527+_0x4916cb(0x8e)+_0x6865b+_0x23168d),console[_0x4916cb(0x6c)](_0x15a527+_0x4916cb(0x81)+_0x13abe1+_0x23168d),console[_0x4916cb(0x6c)]();}
@@ -1 +1 @@
1
- (function(_0x307e5b,_0x1f7172){const _0xe98aa3=a114_0x56d5,_0x206d06=_0x307e5b();while(!![]){try{const _0x40e5e3=-parseInt(_0xe98aa3(0x104))/0x1+parseInt(_0xe98aa3(0x10a))/0x2+-parseInt(_0xe98aa3(0xfe))/0x3*(parseInt(_0xe98aa3(0x10e))/0x4)+-parseInt(_0xe98aa3(0x105))/0x5*(-parseInt(_0xe98aa3(0xfc))/0x6)+-parseInt(_0xe98aa3(0x109))/0x7+parseInt(_0xe98aa3(0x100))/0x8+parseInt(_0xe98aa3(0x102))/0x9;if(_0x40e5e3===_0x1f7172)break;else _0x206d06['push'](_0x206d06['shift']());}catch(_0x20f2aa){_0x206d06['push'](_0x206d06['shift']());}}}(a114_0x1e91,0x90afb));function a114_0x56d5(_0x2e589f,_0x5ab25e){_0x2e589f=_0x2e589f-0xfc;const _0x1e9196=a114_0x1e91();let _0x56d50c=_0x1e9196[_0x2e589f];return _0x56d50c;}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a114_0x1a6701 from'semver';import{getCdnConfig}from'./cdn-config.js';function a114_0x1e91(){const _0x329b85=['6292480OkYDLv','\x1b[1m','9935883HtYlFG','../..','678324rCwTiC','5uiGiLh','some','stableVersion','coerce','1402079Qwnawn','10066OnEyHb','\x20\x20\x20Current\x20CLI\x20version:\x20','npm\x20install\x20-g\x20','@latest','4oVloVt','needsUpgrade','cli','\x1b[33m','log','1.0.0','utf-8','3782508ruXVBf','\x20\x20\x20Upgrade\x20command:\x20','3164226jposEY','\x1b[0m'];a114_0x1e91=function(){return _0x329b85;};return a114_0x1e91();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';function getCurrentCliVersion(){const _0x42f85d=a114_0x56d5;try{const _0x41c89e=fileURLToPath(import.meta.url),_0x44231a=resolve(dirname(_0x41c89e),_0x42f85d(0x103)),_0x47aa40=resolve(_0x44231a,'package.json'),_0x5c7f2d=JSON['parse'](readFileSync(_0x47aa40,_0x42f85d(0x114)));return _0x5c7f2d['version']||_0x42f85d(0x113);}catch{return _0x42f85d(0x113);}}function isNonNumericVersion(_0x77eec4){const _0x580c8d=a114_0x56d5,_0x311c5f=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x311c5f[_0x580c8d(0x106)](_0xb684b7=>_0xb684b7['test'](_0x77eec4));}export async function checkCliVersion(){const _0x5359f0=a114_0x56d5,_0x344c14=getCurrentCliVersion(),_0xd432d0=await getCdnConfig(),_0x297199=_0xd432d0?.[_0x5359f0(0x110)]?.[_0x5359f0(0x107)]||null;let _0x2ab4b0=![];if(_0x297199)try{const _0x45e4d2=a114_0x1a6701[_0x5359f0(0x108)](_0x344c14),_0x5020fe=a114_0x1a6701[_0x5359f0(0x108)](_0x297199);_0x45e4d2&&_0x5020fe&&(_0x2ab4b0=a114_0x1a6701['lt'](_0x45e4d2,_0x5020fe));}catch{_0x2ab4b0=![];}return{'currentVersion':_0x344c14,'stableVersion':_0x297199,'needsUpgrade':_0x2ab4b0,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x138de9){const _0x503bce=a114_0x56d5;if(!_0x138de9[_0x503bce(0x10f)])return;const _0x118baf=_0x503bce(0x111),_0x49260d=_0x503bce(0xff),_0x3e4f0a=_0x503bce(0x101),_0x3c705e=_0x503bce(0x10c)+NPM_PACKAGE_NAME+_0x503bce(0x10d);console[_0x503bce(0x112)](),console[_0x503bce(0x112)](''+_0x118baf+_0x3e4f0a+'↪\x20New\x20version\x20available'+_0x49260d),console[_0x503bce(0x112)](_0x118baf+_0x503bce(0x10b)+_0x138de9['currentVersion']+_0x49260d),console[_0x503bce(0x112)](_0x118baf+'\x20\x20\x20Stable\x20version:\x20'+_0x138de9[_0x503bce(0x107)]+_0x49260d),console[_0x503bce(0x112)](_0x118baf+_0x503bce(0xfd)+_0x3c705e+_0x49260d),console[_0x503bce(0x112)]();}
1
+ (function(_0x53390b,_0x304265){const _0x3e36bd=a123_0x2f05,_0x242b3f=_0x53390b();while(!![]){try{const _0x450e7e=parseInt(_0x3e36bd(0xb0))/0x1+-parseInt(_0x3e36bd(0xca))/0x2*(-parseInt(_0x3e36bd(0xc3))/0x3)+-parseInt(_0x3e36bd(0xc7))/0x4+-parseInt(_0x3e36bd(0xbb))/0x5+-parseInt(_0x3e36bd(0xc1))/0x6*(-parseInt(_0x3e36bd(0xba))/0x7)+parseInt(_0x3e36bd(0xb8))/0x8*(-parseInt(_0x3e36bd(0xc9))/0x9)+-parseInt(_0x3e36bd(0xbe))/0xa*(-parseInt(_0x3e36bd(0xcb))/0xb);if(_0x450e7e===_0x304265)break;else _0x242b3f['push'](_0x242b3f['shift']());}catch(_0x3ffd2a){_0x242b3f['push'](_0x242b3f['shift']());}}}(a123_0x1389,0x44eca));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a123_0x45ca9a from'semver';import{getCdnConfig}from'./cdn-config.js';function a123_0x2f05(_0x408e7c,_0x24792f){_0x408e7c=_0x408e7c-0xb0;const _0x1389cb=a123_0x1389();let _0x2f0555=_0x1389cb[_0x408e7c];return _0x2f0555;}import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a123_0x1389(){const _0x5beeaa=['8vXhBnN','parse','78491FKyodw','1808875zunkxs','log','version','1426970mQvXAQ','\x20\x20\x20Stable\x20version:\x20','some','48YJYAnm','\x1b[33m','847164FADwhG','\x1b[1m','stableVersion','../..','2136720NieqSq','cli','690831jeDgdd','2BauIQP','33rJDNrB','@latest','454845hlkesA','1.0.0','↪\x20New\x20version\x20available','currentVersion','package.json','needsUpgrade','\x20\x20\x20Current\x20CLI\x20version:\x20','coerce'];a123_0x1389=function(){return _0x5beeaa;};return a123_0x1389();}function getCurrentCliVersion(){const _0x45b671=a123_0x2f05;try{const _0x260249=fileURLToPath(import.meta.url),_0x10d9e4=resolve(dirname(_0x260249),_0x45b671(0xc6)),_0x5a9039=resolve(_0x10d9e4,_0x45b671(0xb4)),_0x54fc51=JSON[_0x45b671(0xb9)](readFileSync(_0x5a9039,'utf-8'));return _0x54fc51[_0x45b671(0xbd)]||'1.0.0';}catch{return _0x45b671(0xb1);}}function isNonNumericVersion(_0x5369d0){const _0x4b24ff=a123_0x2f05,_0x414dba=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x414dba[_0x4b24ff(0xc0)](_0x5667ab=>_0x5667ab['test'](_0x5369d0));}export async function checkCliVersion(){const _0x5ec2ce=a123_0x2f05,_0xa0de76=getCurrentCliVersion(),_0x364a3b=await getCdnConfig(),_0x4cbc9b=_0x364a3b?.[_0x5ec2ce(0xc8)]?.['stableVersion']||null;let _0x256f5e=![];if(_0x4cbc9b)try{const _0x4e6fce=a123_0x45ca9a[_0x5ec2ce(0xb7)](_0xa0de76),_0x378305=a123_0x45ca9a[_0x5ec2ce(0xb7)](_0x4cbc9b);_0x4e6fce&&_0x378305&&(_0x256f5e=a123_0x45ca9a['lt'](_0x4e6fce,_0x378305));}catch{_0x256f5e=![];}return{'currentVersion':_0xa0de76,'stableVersion':_0x4cbc9b,'needsUpgrade':_0x256f5e,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x110a36){const _0x5b1012=a123_0x2f05;if(!_0x110a36[_0x5b1012(0xb5)])return;const _0x2350dc=_0x5b1012(0xc2),_0xabebd9='\x1b[0m',_0xc2ca58=_0x5b1012(0xc4),_0x356a71='npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x5b1012(0xcc);console['log'](),console[_0x5b1012(0xbc)](''+_0x2350dc+_0xc2ca58+_0x5b1012(0xb2)+_0xabebd9),console[_0x5b1012(0xbc)](_0x2350dc+_0x5b1012(0xb6)+_0x110a36[_0x5b1012(0xb3)]+_0xabebd9),console[_0x5b1012(0xbc)](_0x2350dc+_0x5b1012(0xbf)+_0x110a36[_0x5b1012(0xc5)]+_0xabebd9),console[_0x5b1012(0xbc)](_0x2350dc+'\x20\x20\x20Upgrade\x20command:\x20'+_0x356a71+_0xabebd9),console['log']();}
@@ -1 +1 @@
1
- (function(_0x4ec589,_0x429eda){const _0x51ce43=a115_0x4d83,_0x40c44=_0x4ec589();while(!![]){try{const _0x3414c1=-parseInt(_0x51ce43(0xe0))/0x1+parseInt(_0x51ce43(0xe3))/0x2+-parseInt(_0x51ce43(0xd6))/0x3+parseInt(_0x51ce43(0xd0))/0x4*(-parseInt(_0x51ce43(0xe4))/0x5)+parseInt(_0x51ce43(0xe5))/0x6*(-parseInt(_0x51ce43(0xe6))/0x7)+-parseInt(_0x51ce43(0xd7))/0x8*(parseInt(_0x51ce43(0xd3))/0x9)+parseInt(_0x51ce43(0xce))/0xa*(parseInt(_0x51ce43(0xdb))/0xb);if(_0x3414c1===_0x429eda)break;else _0x40c44['push'](_0x40c44['shift']());}catch(_0x442402){_0x40c44['push'](_0x40c44['shift']());}}}(a115_0x3e5d,0xe854a));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(_0x3aa6bf){const _0x492199=a115_0x4d83,_0x191557=readRawConfig(_0x3aa6bf);return _0x191557[_0x492199(0xdf)]&&typeof _0x191557[_0x492199(0xdf)]===_0x492199(0xd2)&&initEnv(_0x191557[_0x492199(0xdf)]),_0x191557;}export function getConfigAppCode(){const _0x5cf0fc=a115_0x4d83,_0xda8854=readRawConfig();if(_0xda8854[_0x5cf0fc(0xe2)]&&typeof _0xda8854['apps']===_0x5cf0fc(0xe1)){const _0x4f8c3d=_0xda8854[_0x5cf0fc(0xd4)];if(_0x4f8c3d&&_0xda8854[_0x5cf0fc(0xe2)][_0x4f8c3d]?.[_0x5cf0fc(0xda)])return String(_0xda8854[_0x5cf0fc(0xe2)][_0x4f8c3d][_0x5cf0fc(0xda)])[_0x5cf0fc(0xde)]();const _0x1e4649=Object[_0x5cf0fc(0xd5)](_0xda8854['apps'])[0x0];if(_0x1e4649?.['appcode'])return String(_0x1e4649[_0x5cf0fc(0xda)])['trim']();}const _0x2edd31=_0xda8854['appcode']||_0xda8854[_0x5cf0fc(0xdd)];if(typeof _0x2edd31!==_0x5cf0fc(0xd2)||_0x2edd31[_0x5cf0fc(0xde)]()==='')return undefined;return _0x2edd31['trim']();}export function getMultiAppConfigs(){const _0x54c42a=a115_0x4d83,_0x20b8d5=readRawConfig(),_0x1e834a=_0x20b8d5[_0x54c42a(0xe2)];if(!_0x1e834a||typeof _0x1e834a!==_0x54c42a(0xe1)||Object[_0x54c42a(0xd1)](_0x1e834a)[_0x54c42a(0xd9)]===0x0)return null;const _0xa0178f=_0x20b8d5['defaultApp'];return Object[_0x54c42a(0xe7)](_0x1e834a)[_0x54c42a(0xd8)](([_0x2e82de,_0x29226d])=>({'name':_0x2e82de,'appcode':_0x29226d?.[_0x54c42a(0xda)]||'','isDefault':_0x2e82de===_0xa0178f,'env':_0x29226d?.[_0x54c42a(0xdf)],'apiDir':_0x29226d?.['apiDir'],'cookie':_0x29226d?.['cookie']||undefined}))[_0x54c42a(0xdc)](_0x5719b1=>_0x5719b1[_0x54c42a(0xda)]);}function a115_0x4d83(_0x2831be,_0x3911e5){_0x2831be=_0x2831be-0xce;const _0x3e5d13=a115_0x3e5d();let _0x4d83b7=_0x3e5d13[_0x2831be];return _0x4d83b7;}function a115_0x3e5d(){const _0x5328ea=['38598050HvfsOV','template_base_url','4qtZbUY','keys','string','1332YKyuVf','defaultApp','values','1227237rgblbi','40168muZTKE','map','length','appcode','11swQYbY','filter','app','trim','env','1736997HksOUJ','object','apps','1279536ZDAKQu','454135DPCKNS','768GRmTmN','31059mUPlXP','entries'];a115_0x3e5d=function(){return _0x5328ea;};return a115_0x3e5d();}export function getTemplateBaseUrl(){const _0x27685a=a115_0x4d83,_0x4db656=readRawConfig();if(_0x4db656[_0x27685a(0xcf)]&&typeof _0x4db656[_0x27685a(0xcf)]===_0x27685a(0xd2))return _0x4db656[_0x27685a(0xcf)]['replace'](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}
1
+ (function(_0x19a0ef,_0x31c185){const _0x23c836=a124_0x2366,_0x3391db=_0x19a0ef();while(!![]){try{const _0x3c32aa=-parseInt(_0x23c836(0xc0))/0x1*(parseInt(_0x23c836(0xc9))/0x2)+parseInt(_0x23c836(0xb6))/0x3*(parseInt(_0x23c836(0xbe))/0x4)+-parseInt(_0x23c836(0xcc))/0x5*(-parseInt(_0x23c836(0xc3))/0x6)+parseInt(_0x23c836(0xce))/0x7+-parseInt(_0x23c836(0xbb))/0x8*(parseInt(_0x23c836(0xcf))/0x9)+parseInt(_0x23c836(0xc4))/0xa*(-parseInt(_0x23c836(0xba))/0xb)+-parseInt(_0x23c836(0xb5))/0xc*(parseInt(_0x23c836(0xc2))/0xd);if(_0x3c32aa===_0x31c185)break;else _0x3391db['push'](_0x3391db['shift']());}catch(_0x29ca08){_0x3391db['push'](_0x3391db['shift']());}}}(a124_0x11cb,0x2f6c4));import{initEnv}from'../constant/env.js';function a124_0x2366(_0x31330a,_0x5542e9){_0x31330a=_0x31330a-0xb1;const _0x11cb6e=a124_0x11cb();let _0x2366ea=_0x11cb6e[_0x31330a];return _0x2366ea;}import{readRawConfig}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0xb39975){const _0x222618=a124_0x2366,_0x3b7e8e=readRawConfig(_0xb39975);return _0x3b7e8e[_0x222618(0xcb)]&&typeof _0x3b7e8e[_0x222618(0xcb)]===_0x222618(0xb2)&&initEnv(_0x3b7e8e[_0x222618(0xcb)]),_0x3b7e8e;}export function getConfigAppCode(){const _0x11afcc=a124_0x2366,_0x22d142=readRawConfig();if(_0x22d142[_0x11afcc(0xb1)]&&typeof _0x22d142[_0x11afcc(0xb1)]===_0x11afcc(0xb3)){const _0x46bfa0=_0x22d142[_0x11afcc(0xbd)];if(_0x46bfa0&&_0x22d142[_0x11afcc(0xb1)][_0x46bfa0]?.[_0x11afcc(0xb8)])return String(_0x22d142[_0x11afcc(0xb1)][_0x46bfa0][_0x11afcc(0xb8)])[_0x11afcc(0xcd)]();const _0x48055c=Object[_0x11afcc(0xb9)](_0x22d142[_0x11afcc(0xb1)])[0x0];if(_0x48055c?.['appcode'])return String(_0x48055c['appcode'])[_0x11afcc(0xcd)]();}const _0x4bac9c=_0x22d142[_0x11afcc(0xb8)]||_0x22d142[_0x11afcc(0xc5)];if(typeof _0x4bac9c!==_0x11afcc(0xb2)||_0x4bac9c['trim']()==='')return undefined;return _0x4bac9c[_0x11afcc(0xcd)]();}export function getMultiAppConfigs(){const _0x35e7d2=a124_0x2366,_0x3804b2=readRawConfig(),_0x1106e5=_0x3804b2[_0x35e7d2(0xb1)];if(!_0x1106e5||typeof _0x1106e5!==_0x35e7d2(0xb3)||Object[_0x35e7d2(0xca)](_0x1106e5)[_0x35e7d2(0xb7)]===0x0)return null;const _0x45fef7=_0x3804b2[_0x35e7d2(0xbd)];return Object[_0x35e7d2(0xc1)](_0x1106e5)[_0x35e7d2(0xbc)](([_0x3f03bc,_0x3a4614])=>({'name':_0x3f03bc,'appcode':_0x3a4614?.[_0x35e7d2(0xb8)]||'','isDefault':_0x3f03bc===_0x45fef7,'env':_0x3a4614?.['env'],'apiDir':_0x3a4614?.[_0x35e7d2(0xc7)],'cookie':_0x3a4614?.['cookie']||undefined}))[_0x35e7d2(0xb4)](_0xfb4a3a=>_0xfb4a3a['appcode']);}export function getTemplateBaseUrl(){const _0x1eb7f3=a124_0x2366,_0x2e75b8=readRawConfig();if(_0x2e75b8['template_base_url']&&typeof _0x2e75b8[_0x1eb7f3(0xbf)]==='string')return _0x2e75b8[_0x1eb7f3(0xbf)][_0x1eb7f3(0xc8)](/\/$/,'');return _0x1eb7f3(0xc6);}function a124_0x11cb(){const _0x5f0cec=['length','appcode','values','44YVfRkf','503912oaHVCX','map','defaultApp','8dTbVCL','template_base_url','83jIypbB','entries','1292174aCehaF','1693434iHpriE','794060ujXove','app','https://g.lovrabet.com/dist/lovrabet-skill','apiDir','replace','1046qGHeDk','keys','env','5mCZqww','trim','1832985JZTkPH','9rPTBWT','apps','string','object','filter','12unuquu','260355NkpbfD'];a124_0x11cb=function(){return _0x5f0cec;};return a124_0x11cb();}
@@ -1 +1 @@
1
- function a116_0x5c28(_0x43f56f,_0x420afa){_0x43f56f=_0x43f56f-0x77;const _0x29b6a4=a116_0x29b6();let _0x5c2859=_0x29b6a4[_0x43f56f];return _0x5c2859;}(function(_0x56cb01,_0x3f1476){const _0x377be4=a116_0x5c28,_0x44cc93=_0x56cb01();while(!![]){try{const _0x31acac=parseInt(_0x377be4(0x87))/0x1*(parseInt(_0x377be4(0x85))/0x2)+parseInt(_0x377be4(0x7c))/0x3*(parseInt(_0x377be4(0x7d))/0x4)+-parseInt(_0x377be4(0x79))/0x5+-parseInt(_0x377be4(0x7b))/0x6+parseInt(_0x377be4(0x86))/0x7*(parseInt(_0x377be4(0x7a))/0x8)+-parseInt(_0x377be4(0x7f))/0x9*(-parseInt(_0x377be4(0x7e))/0xa)+-parseInt(_0x377be4(0x84))/0xb*(parseInt(_0x377be4(0x77))/0xc);if(_0x31acac===_0x3f1476)break;else _0x44cc93['push'](_0x44cc93['shift']());}catch(_0x4b8efd){_0x44cc93['push'](_0x44cc93['shift']());}}}(a116_0x29b6,0xc06f4));import a116_0x405cef from'node:path';import a116_0xd9f8b7 from'node:fs';export async function copyDirectory(_0x5127b7,_0x20f1bf){const _0x5da9f2=a116_0x5c28;try{const _0x4b1cad=a116_0xd9f8b7['readdirSync'](_0x5127b7,{'withFileTypes':!![]});a116_0xd9f8b7[_0x5da9f2(0x80)](_0x20f1bf,{'recursive':!![]});for(const _0x310710 of _0x4b1cad){const _0x99d240=a116_0x405cef[_0x5da9f2(0x78)](_0x5127b7,_0x310710[_0x5da9f2(0x88)]),_0xbfda52=a116_0x405cef[_0x5da9f2(0x78)](_0x20f1bf,_0x310710['name']);_0x310710[_0x5da9f2(0x89)]()?await copyDirectory(_0x99d240,_0xbfda52):a116_0xd9f8b7[_0x5da9f2(0x83)](_0x99d240,_0xbfda52);}}catch(_0x268d59){console[_0x5da9f2(0x82)](_0x5da9f2(0x81),_0x268d59);}}function a116_0x29b6(){const _0x2452ae=['copyFileSync','869NUxDFQ','138JTtSAT','1167397AjcOXr','12412rhkqEw','name','isDirectory','99492YJXmpp','join','6622585HpItLv','24Lrzusv','2209254WMBiYg','294171NNfIXu','40PAyINF','80ibfKoq','898443paBCVz','mkdirSync','复制目录时出错:','error'];a116_0x29b6=function(){return _0x2452ae;};return a116_0x29b6();}
1
+ function a125_0x367c(_0x5f4c49,_0x27380c){_0x5f4c49=_0x5f4c49-0x13c;const _0x3c6529=a125_0x3c65();let _0x367cf5=_0x3c6529[_0x5f4c49];return _0x367cf5;}function a125_0x3c65(){const _0x1d9273=['isDirectory','name','552985zuqwWv','144136tCNRDj','mkdirSync','23023224OHlEkg','copyFileSync','复制目录时出错:','readdirSync','25tmWLAZ','6533226ltjsSf','error','8Isvyyy','3388005zXJMaA','85112MGWpqn','2577546ZVHyqf'];a125_0x3c65=function(){return _0x1d9273;};return a125_0x3c65();}(function(_0x1c6c5f,_0x494c1e){const _0x67b432=a125_0x367c,_0x122ee8=_0x1c6c5f();while(!![]){try{const _0x255f66=-parseInt(_0x67b432(0x13f))/0x1*(parseInt(_0x67b432(0x144))/0x2)+-parseInt(_0x67b432(0x143))/0x3+-parseInt(_0x67b432(0x142))/0x4*(parseInt(_0x67b432(0x148))/0x5)+-parseInt(_0x67b432(0x145))/0x6+parseInt(_0x67b432(0x140))/0x7+-parseInt(_0x67b432(0x149))/0x8+parseInt(_0x67b432(0x14b))/0x9;if(_0x255f66===_0x494c1e)break;else _0x122ee8['push'](_0x122ee8['shift']());}catch(_0x4c129d){_0x122ee8['push'](_0x122ee8['shift']());}}}(a125_0x3c65,0x99aa9));import a125_0x40e833 from'node:path';import a125_0x20271a from'node:fs';export async function copyDirectory(_0x3112ed,_0x12a762){const _0x5e7f0b=a125_0x367c;try{const _0x13adb7=a125_0x20271a[_0x5e7f0b(0x13e)](_0x3112ed,{'withFileTypes':!![]});a125_0x20271a[_0x5e7f0b(0x14a)](_0x12a762,{'recursive':!![]});for(const _0x3a92f7 of _0x13adb7){const _0x227440=a125_0x40e833['join'](_0x3112ed,_0x3a92f7[_0x5e7f0b(0x147)]),_0x11c6df=a125_0x40e833['join'](_0x12a762,_0x3a92f7[_0x5e7f0b(0x147)]);_0x3a92f7[_0x5e7f0b(0x146)]()?await copyDirectory(_0x227440,_0x11c6df):a125_0x20271a[_0x5e7f0b(0x13c)](_0x227440,_0x11c6df);}}catch(_0x5d6587){console[_0x5e7f0b(0x141)](_0x5e7f0b(0x13d),_0x5d6587);}}
@@ -1 +1 @@
1
- (function(_0x29cabd,_0x3130ba){const _0x27ec01=a117_0x9464,_0x53bd8f=_0x29cabd();while(!![]){try{const _0x122957=-parseInt(_0x27ec01(0x128))/0x1+parseInt(_0x27ec01(0x126))/0x2*(parseInt(_0x27ec01(0x11d))/0x3)+parseInt(_0x27ec01(0x121))/0x4*(parseInt(_0x27ec01(0x11e))/0x5)+-parseInt(_0x27ec01(0x127))/0x6*(-parseInt(_0x27ec01(0x120))/0x7)+-parseInt(_0x27ec01(0x125))/0x8*(parseInt(_0x27ec01(0x11f))/0x9)+parseInt(_0x27ec01(0x124))/0xa*(parseInt(_0x27ec01(0x122))/0xb)+-parseInt(_0x27ec01(0x123))/0xc;if(_0x122957===_0x3130ba)break;else _0x53bd8f['push'](_0x53bd8f['shift']());}catch(_0x481e7c){_0x53bd8f['push'](_0x53bd8f['shift']());}}}(a117_0x9227,0x48d3f));function a117_0x9464(_0x90ed97,_0x297c92){_0x90ed97=_0x90ed97-0x11d;const _0x9227af=a117_0x9227();let _0x94649e=_0x9227af[_0x90ed97];return _0x94649e;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a117_0x9227(){const _0x52ac19=['105052mtLrvN','isDirectory','171357dbvWVg','1318995oDCAJL','9bqovDe','70UDpGRk','4lozceb','11RnjeMH','3176736AOmRAr','480210mqVFoW','625120OxUDdY','14ujoToC','20742cEWWoF'];a117_0x9227=function(){return _0x52ac19;};return a117_0x9227();}import{join}from'node:path';export async function copyDir(_0x5d65a3,_0x8ff0ad){const _0x51085f=a117_0x9464,_0x20b5ff=statSync(_0x5d65a3);if(_0x20b5ff[_0x51085f(0x129)]()){!existsSync(_0x8ff0ad)&&mkdirSync(_0x8ff0ad,{'recursive':!![]});const _0x32f629=readdirSync(_0x5d65a3);for(const _0x5419a9 of _0x32f629){await copyDir(join(_0x5d65a3,_0x5419a9),join(_0x8ff0ad,_0x5419a9));}}else copyFileSync(_0x5d65a3,_0x8ff0ad);}export function ensureDir(_0x3f6ff9){!existsSync(_0x3f6ff9)&&mkdirSync(_0x3f6ff9,{'recursive':!![]});}export function pathExists(_0x762d12){return existsSync(_0x762d12);}
1
+ (function(_0x3a8bcb,_0x4acb19){const _0x27ea69=a126_0x1ed7,_0x1bb598=_0x3a8bcb();while(!![]){try{const _0x5b9a56=-parseInt(_0x27ea69(0xeb))/0x1*(parseInt(_0x27ea69(0xea))/0x2)+parseInt(_0x27ea69(0xec))/0x3+-parseInt(_0x27ea69(0xe8))/0x4+-parseInt(_0x27ea69(0xe7))/0x5+-parseInt(_0x27ea69(0xef))/0x6+parseInt(_0x27ea69(0xe9))/0x7+-parseInt(_0x27ea69(0xee))/0x8*(-parseInt(_0x27ea69(0xed))/0x9);if(_0x5b9a56===_0x4acb19)break;else _0x1bb598['push'](_0x1bb598['shift']());}catch(_0x253e56){_0x1bb598['push'](_0x1bb598['shift']());}}}(a126_0x1afb,0x1ab9d));function a126_0x1ed7(_0x1491b0,_0x3985d6){_0x1491b0=_0x1491b0-0xe7;const _0x1afb8c=a126_0x1afb();let _0x1ed7e1=_0x1afb8c[_0x1491b0];return _0x1ed7e1;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x24f672,_0x2efdff){const _0x17513e=statSync(_0x24f672);if(_0x17513e['isDirectory']()){!existsSync(_0x2efdff)&&mkdirSync(_0x2efdff,{'recursive':!![]});const _0x1282fd=readdirSync(_0x24f672);for(const _0x1059c9 of _0x1282fd){await copyDir(join(_0x24f672,_0x1059c9),join(_0x2efdff,_0x1059c9));}}else copyFileSync(_0x24f672,_0x2efdff);}export function ensureDir(_0x347a9d){!existsSync(_0x347a9d)&&mkdirSync(_0x347a9d,{'recursive':!![]});}function a126_0x1afb(){const _0x199aa1=['183798tIcYZc','40icmqmg','50802JnmMTy','192675whucsW','380816bySoFc','25242aBenIN','2ZZoUpt','38679TAaTOv','553914shdqUn'];a126_0x1afb=function(){return _0x199aa1;};return a126_0x1afb();}export function pathExists(_0x23872e){return existsSync(_0x23872e);}
@@ -1 +1 @@
1
- const a118_0x216d4e=a118_0x40ff;(function(_0x2db45a,_0x237ced){const _0x2e40ee=a118_0x40ff,_0x4cd560=_0x2db45a();while(!![]){try{const _0x257b97=parseInt(_0x2e40ee(0x99))/0x1+-parseInt(_0x2e40ee(0x9d))/0x2+parseInt(_0x2e40ee(0x9b))/0x3+-parseInt(_0x2e40ee(0xa0))/0x4*(-parseInt(_0x2e40ee(0x92))/0x5)+-parseInt(_0x2e40ee(0x93))/0x6*(parseInt(_0x2e40ee(0xa5))/0x7)+-parseInt(_0x2e40ee(0xaa))/0x8+parseInt(_0x2e40ee(0xa2))/0x9*(-parseInt(_0x2e40ee(0xb0))/0xa);if(_0x257b97===_0x237ced)break;else _0x4cd560['push'](_0x4cd560['shift']());}catch(_0x286d3d){_0x4cd560['push'](_0x4cd560['shift']());}}}(a118_0xc17d,0x1892a));function a118_0xc17d(){const _0x1a59b7=['48619FHdQor','replace','598299MevzAl','.lovrabet/skill/guides','327928SpyCwT','keys','map','70636ZYbPnc','status','9izkRzD','entries','length','63686mHNbtF','utf-8','extendContent','.md','CDN\x20数据中缺少\x20skillTemplate','392416arDhwK','content','path','/skills/guides.json','skillTemplate','object','558510tTUGoc','json','.lovrabet','application/json','\x0a\x0a>更新时间:','CDN\x20返回数据格式错误','55odXVbm','48tImuUt','lastUpdated','trimEnd','statusText','guides','push'];a118_0xc17d=function(){return _0x1a59b7;};return a118_0xc17d();}import{mkdirSync,writeFileSync}from'node:fs';function a118_0x40ff(_0x2702cd,_0x3256ed){_0x2702cd=_0x2702cd-0x8f;const _0xc17dea=a118_0xc17d();let _0x40ffb9=_0xc17dea[_0x2702cd];return _0x40ffb9;}import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x3a133d=a118_0x40ff,_0x246a64=getTemplateBaseUrl();return _0x246a64+_0x3a133d(0xad);}const CACHE_DIR=join(homedir(),a118_0x216d4e(0xb2),'cache');export async function fetchGuidesFromCDN(){const _0x5811c6=a118_0x216d4e,_0x24c883=getGuidesCdnUrl(),_0x34d252=await fetch(_0x24c883,{'headers':{'Accept':_0x5811c6(0x8f)}});if(!_0x34d252['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x34d252[_0x5811c6(0xa1)]+'\x20'+_0x34d252[_0x5811c6(0x96)]);const _0x49098e=await _0x34d252[_0x5811c6(0xb1)]();if(!_0x49098e['guides']||typeof _0x49098e[_0x5811c6(0x97)]!==_0x5811c6(0xaf))throw new Error(_0x5811c6(0x91));return _0x49098e;}export function writeGuidesToProject(_0x113b61,_0x2f7122,_0xc151ea=a118_0x216d4e(0x9c),_0x4d0fe9){const _0x3fa737=a118_0x216d4e,_0x305361=join(_0x2f7122,_0xc151ea);mkdirSync(_0x305361,{'recursive':!![]});for(const [_0x2923a0,_0x53c5bd]of Object[_0x3fa737(0xa3)](_0x113b61['guides'])){let _0x11f800=_0x53c5bd['content'];_0x53c5bd['lastUpdated']&&(_0x11f800=appendUpdateTime(_0x11f800,_0x53c5bd[_0x3fa737(0x94)])),writeFileSync(join(_0x305361,_0x2923a0+_0x3fa737(0xa8)),_0x11f800,_0x3fa737(0xa6));}}export function appendUpdateTime(_0x5da4dc,_0x444109){const _0x1bbc83=a118_0x216d4e;return _0x5da4dc=_0x5da4dc['replace'](/\n*>更新时间:.*$/m,''),_0x5da4dc[_0x1bbc83(0x95)]()+(_0x1bbc83(0x90)+_0x444109);}export function getSkillTemplate(_0x30ef7a){const _0x1c729b=a118_0x216d4e;return _0x30ef7a[_0x1c729b(0xae)]?.[_0x1c729b(0xab)]||'';}export function appendExtendContents(_0x3ba8ef,_0xbc08b,_0x426e0b){const _0x1ab217=a118_0x216d4e,_0x56ff67=[];for(const [,_0x22fc97]of Object['entries'](_0xbc08b[_0x1ab217(0x97)])){_0x22fc97[_0x1ab217(0xa7)]&&_0x56ff67[_0x1ab217(0x98)](_0x22fc97[_0x1ab217(0xa7)][_0x1ab217(0x95)]());}if(_0x56ff67[_0x1ab217(0xa4)]===0x0)return _0x3ba8ef;return _0x3ba8ef[_0x1ab217(0x95)]()+'\x0a\x0a'+_0x56ff67['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x49fc36,_0x622d61,_0x1b39e1){const _0x24460d=a118_0x216d4e,_0xca17e0=getSkillTemplate(_0x49fc36);if(!_0xca17e0)throw new Error(_0x24460d(0xa9));const _0x1c73f1=dirname(_0x622d61);mkdirSync(_0x1c73f1,{'recursive':!![]});let _0xdab76c=_0xca17e0[_0x24460d(0x9a)](/\{\{IDE_NAME\}\}/g,_0x1b39e1);_0xdab76c=appendExtendContents(_0xdab76c,_0x49fc36),_0x49fc36[_0x24460d(0xae)]['lastUpdated']&&(_0xdab76c=appendUpdateTime(_0xdab76c,_0x49fc36[_0x24460d(0xae)]['lastUpdated'])),writeFileSync(_0x622d61,_0xdab76c,_0x24460d(0xa6));}export async function installGuides(_0x57b6c7){const _0xbd4828=a118_0x216d4e,_0x5546d9=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5546d9,_0x57b6c7),Object[_0xbd4828(0x9e)](_0x5546d9[_0xbd4828(0x97)])['length'];}export function getGuidesSummary(_0x1f393c){const _0x28459b=a118_0x216d4e;return Object['entries'](_0x1f393c[_0x28459b(0x97)])[_0x28459b(0x9f)](([_0x4f9d58,_0x1c0551])=>({'key':_0x4f9d58,'title':_0x1c0551['title'],'path':_0x1c0551[_0x28459b(0xac)]}));}
1
+ const a127_0x6300ae=a127_0x4172;function a127_0x4172(_0x8dca31,_0x286ab4){_0x8dca31=_0x8dca31-0x1e7;const _0x57be56=a127_0x57be();let _0x417251=_0x57be56[_0x8dca31];return _0x417251;}(function(_0x1a57ae,_0x1b88b7){const _0x5cdd0c=a127_0x4172,_0x488425=_0x1a57ae();while(!![]){try{const _0xcb0acf=-parseInt(_0x5cdd0c(0x1ec))/0x1*(-parseInt(_0x5cdd0c(0x1ef))/0x2)+-parseInt(_0x5cdd0c(0x1f0))/0x3*(parseInt(_0x5cdd0c(0x1f4))/0x4)+parseInt(_0x5cdd0c(0x1ff))/0x5*(-parseInt(_0x5cdd0c(0x1f8))/0x6)+parseInt(_0x5cdd0c(0x1fe))/0x7*(-parseInt(_0x5cdd0c(0x209))/0x8)+parseInt(_0x5cdd0c(0x200))/0x9+-parseInt(_0x5cdd0c(0x202))/0xa+parseInt(_0x5cdd0c(0x1e7))/0xb;if(_0xcb0acf===_0x1b88b7)break;else _0x488425['push'](_0x488425['shift']());}catch(_0x1dae9b){_0x488425['push'](_0x488425['shift']());}}}(a127_0x57be,0x6f3e0));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';function a127_0x57be(){const _0x3ac9c9=['5uubyFZ','2767410eDwser','content','3027390iMNStT','utf-8','skillTemplate','path','object','CDN\x20返回数据格式错误','/skills/guides.json','8iEAypI','17496578JfJkQu','\x0a\x0a>更新时间:','trimEnd','length','lastUpdated','22877ySRprY','cache','join','4mOWsWB','306NeGilP','extendContent','title','entries','836tWmBEP','.md','guides','.lovrabet','3991836btcAEL','.lovrabet/skill/guides','CDN\x20请求失败:\x20','push','CDN\x20数据中缺少\x20skillTemplate','statusText','3491817hKtLRy'];a127_0x57be=function(){return _0x3ac9c9;};return a127_0x57be();}import{homedir}from'node:os';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x450aed=a127_0x4172,_0x576d9f=getTemplateBaseUrl();return _0x576d9f+_0x450aed(0x208);}const CACHE_DIR=join(homedir(),a127_0x6300ae(0x1f7),a127_0x6300ae(0x1ed));export async function fetchGuidesFromCDN(){const _0x4d7e5d=a127_0x6300ae,_0x4d97f3=getGuidesCdnUrl(),_0xf3caab=await fetch(_0x4d97f3,{'headers':{'Accept':'application/json'}});if(!_0xf3caab['ok'])throw new Error(_0x4d7e5d(0x1fa)+_0xf3caab['status']+'\x20'+_0xf3caab[_0x4d7e5d(0x1fd)]);const _0x443678=await _0xf3caab['json']();if(!_0x443678[_0x4d7e5d(0x1f6)]||typeof _0x443678[_0x4d7e5d(0x1f6)]!==_0x4d7e5d(0x206))throw new Error(_0x4d7e5d(0x207));return _0x443678;}export function writeGuidesToProject(_0x574101,_0x4d590f,_0x55d454=a127_0x6300ae(0x1f9),_0x3493e5){const _0x1ca040=a127_0x6300ae,_0xdeb377=join(_0x4d590f,_0x55d454);mkdirSync(_0xdeb377,{'recursive':!![]});for(const [_0x4e01ea,_0x231742]of Object['entries'](_0x574101[_0x1ca040(0x1f6)])){let _0x526931=_0x231742['content'];_0x231742[_0x1ca040(0x1eb)]&&(_0x526931=appendUpdateTime(_0x526931,_0x231742[_0x1ca040(0x1eb)])),writeFileSync(join(_0xdeb377,_0x4e01ea+_0x1ca040(0x1f5)),_0x526931,_0x1ca040(0x203));}}export function appendUpdateTime(_0x4a3e52,_0x3c4db2){const _0x21bdab=a127_0x6300ae;return _0x4a3e52=_0x4a3e52['replace'](/\n*>更新时间:.*$/m,''),_0x4a3e52['trimEnd']()+(_0x21bdab(0x1e8)+_0x3c4db2);}export function getSkillTemplate(_0x4dc415){const _0x339efe=a127_0x6300ae;return _0x4dc415[_0x339efe(0x204)]?.[_0x339efe(0x201)]||'';}export function appendExtendContents(_0x511668,_0x27f4a9,_0x2adf14){const _0x1134ca=a127_0x6300ae,_0x3dc0c9=[];for(const [,_0x2212c9]of Object['entries'](_0x27f4a9[_0x1134ca(0x1f6)])){_0x2212c9[_0x1134ca(0x1f1)]&&_0x3dc0c9[_0x1134ca(0x1fb)](_0x2212c9[_0x1134ca(0x1f1)][_0x1134ca(0x1e9)]());}if(_0x3dc0c9[_0x1134ca(0x1ea)]===0x0)return _0x511668;return _0x511668[_0x1134ca(0x1e9)]()+'\x0a\x0a'+_0x3dc0c9[_0x1134ca(0x1ee)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0xd18c24,_0x15c114,_0xd5d118){const _0x49c1df=a127_0x6300ae,_0x296063=getSkillTemplate(_0xd18c24);if(!_0x296063)throw new Error(_0x49c1df(0x1fc));const _0x13ecd8=dirname(_0x15c114);mkdirSync(_0x13ecd8,{'recursive':!![]});let _0xbdbfdb=_0x296063['replace'](/\{\{IDE_NAME\}\}/g,_0xd5d118);_0xbdbfdb=appendExtendContents(_0xbdbfdb,_0xd18c24),_0xd18c24[_0x49c1df(0x204)][_0x49c1df(0x1eb)]&&(_0xbdbfdb=appendUpdateTime(_0xbdbfdb,_0xd18c24['skillTemplate']['lastUpdated'])),writeFileSync(_0x15c114,_0xbdbfdb,_0x49c1df(0x203));}export async function installGuides(_0x307024){const _0x1e82f7=a127_0x6300ae,_0x224c8b=await fetchGuidesFromCDN();return writeGuidesToProject(_0x224c8b,_0x307024),Object['keys'](_0x224c8b[_0x1e82f7(0x1f6)])[_0x1e82f7(0x1ea)];}export function getGuidesSummary(_0x86d0a2){const _0x34f92f=a127_0x6300ae;return Object[_0x34f92f(0x1f3)](_0x86d0a2[_0x34f92f(0x1f6)])['map'](([_0x1a4dad,_0x42d77d])=>({'key':_0x1a4dad,'title':_0x42d77d[_0x34f92f(0x1f2)],'path':_0x42d77d[_0x34f92f(0x205)]}));}