@lovrabet/rabetbase-cli 2.1.2 → 2.1.4

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 (187) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -0
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.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 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/db/analyze-cancel.js +1 -1
  53. package/lib/commands/db/analyze-start.js +1 -1
  54. package/lib/commands/db/analyze-status.js +1 -1
  55. package/lib/commands/db/create.js +1 -1
  56. package/lib/commands/db/delete.js +1 -1
  57. package/lib/commands/db/detail.js +1 -1
  58. package/lib/commands/db/diff.js +1 -1
  59. package/lib/commands/db/index.js +1 -1
  60. package/lib/commands/db/list.js +1 -1
  61. package/lib/commands/db/shared.js +1 -1
  62. package/lib/commands/db/tables.js +1 -1
  63. package/lib/commands/db/test.js +1 -1
  64. package/lib/commands/db/update.js +1 -1
  65. package/lib/commands/doctor.js +1 -1
  66. package/lib/commands/init/index.js +1 -1
  67. package/lib/commands/logs/index.js +1 -1
  68. package/lib/commands/menu/index.js +1 -1
  69. package/lib/commands/menu/shared/compare-table.js +1 -1
  70. package/lib/commands/menu/shared/index.js +1 -1
  71. package/lib/commands/menu/shared/inquirer.js +1 -1
  72. package/lib/commands/menu/shared/local-pages.js +1 -1
  73. package/lib/commands/menu/shared/logic.js +1 -1
  74. package/lib/commands/menu/shared/service.js +1 -1
  75. package/lib/commands/menu/shared/sync-core.js +1 -1
  76. package/lib/commands/menu/shared/update-core.js +1 -1
  77. package/lib/commands/menu/shared/valid-url.js +1 -1
  78. package/lib/commands/menu/sync.js +1 -1
  79. package/lib/commands/menu/update.js +1 -1
  80. package/lib/commands/page/generate-start.js +1 -0
  81. package/lib/commands/page/generate-status.js +1 -0
  82. package/lib/commands/page/index.js +1 -0
  83. package/lib/commands/page/pull.js +1 -0
  84. package/lib/commands/page/push.js +1 -0
  85. package/lib/commands/page/shared.js +1 -0
  86. package/lib/commands/page/standard-page-status.js +1 -0
  87. package/lib/commands/page/sync.js +1 -0
  88. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  89. package/lib/commands/project/create/format-elapsed.js +1 -1
  90. package/lib/commands/project/create/main.js +1 -1
  91. package/lib/commands/project/create/non-interactive.js +1 -1
  92. package/lib/commands/project/create/project-template-path.js +1 -1
  93. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  94. package/lib/commands/project/create/use-format-code.js +1 -1
  95. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  96. package/lib/commands/project/index.js +1 -1
  97. package/lib/commands/project/init.js +1 -1
  98. package/lib/commands/project/upgrade.js +1 -1
  99. package/lib/commands/registry.js +1 -1
  100. package/lib/commands/run/index.js +1 -1
  101. package/lib/commands/schema.js +1 -1
  102. package/lib/commands/skill/index.js +1 -1
  103. package/lib/commands/sql/create.js +1 -0
  104. package/lib/commands/sql/delete.js +1 -0
  105. package/lib/commands/sql/detail.js +1 -1
  106. package/lib/commands/sql/exec.js +1 -1
  107. package/lib/commands/sql/index.js +1 -1
  108. package/lib/commands/sql/list.js +1 -1
  109. package/lib/commands/sql/pull.js +1 -1
  110. package/lib/commands/sql/push.js +1 -0
  111. package/lib/commands/sql/save.js +1 -1
  112. package/lib/commands/sql/shared.js +1 -1
  113. package/lib/commands/sql/status.js +1 -0
  114. package/lib/commands/sql/validate.js +1 -1
  115. package/lib/config/schema.js +1 -1
  116. package/lib/constant/cdn.js +1 -0
  117. package/lib/constant/cli.js +1 -1
  118. package/lib/constant/defaults.js +1 -1
  119. package/lib/constant/domain.js +1 -1
  120. package/lib/constant/env.js +1 -1
  121. package/lib/constant/output.js +1 -1
  122. package/lib/constant/paths.js +1 -1
  123. package/lib/constant/risk.js +1 -1
  124. package/lib/context.js +1 -1
  125. package/lib/core/alias-resolver.js +1 -1
  126. package/lib/core/api-client.js +1 -1
  127. package/lib/core/bff/config.js +1 -1
  128. package/lib/core/bff/file-system.js +1 -1
  129. package/lib/core/bff/hash.js +1 -1
  130. package/lib/core/bff/lock.js +1 -1
  131. package/lib/core/bff/utils.js +1 -1
  132. package/lib/core/db-resolver.js +1 -1
  133. package/lib/core/page/file-system.js +1 -0
  134. package/lib/core/page/hash.js +1 -0
  135. package/lib/core/page/lock.js +1 -0
  136. package/lib/core/page/types.js +1 -0
  137. package/lib/core/sql-sync/config.js +1 -0
  138. package/lib/core/sql-sync/file-system.js +1 -0
  139. package/lib/core/sql-sync/hash.js +1 -0
  140. package/lib/core/sql-sync/lock.js +1 -0
  141. package/lib/core/sql-sync/types.js +1 -0
  142. package/lib/core/sql-sync/utils.js +1 -0
  143. package/lib/core/sql-validator.js +1 -1
  144. package/lib/errors.js +1 -1
  145. package/lib/framework/build-all-flags.js +1 -1
  146. package/lib/framework/flags.js +1 -1
  147. package/lib/framework/help.js +1 -1
  148. package/lib/framework/index.js +1 -1
  149. package/lib/framework/output.js +1 -1
  150. package/lib/framework/response.js +1 -1
  151. package/lib/framework/runner-alias.js +1 -1
  152. package/lib/framework/runner.js +1 -1
  153. package/lib/framework/schema-export.js +1 -1
  154. package/lib/framework/types.js +1 -1
  155. package/lib/generated/build-info.js +1 -1
  156. package/lib/help.js +1 -1
  157. package/lib/skills/main.js +1 -1
  158. package/lib/skills/npx-skills-add.js +1 -1
  159. package/lib/telemetry/cli-command-trace.js +1 -1
  160. package/lib/telemetry/cli-help-trace.js +1 -1
  161. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  162. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  163. package/lib/telemetry/send-cli-trace-log.js +1 -1
  164. package/lib/utils/ai_config.js +1 -1
  165. package/lib/utils/apply-jq-filter.js +1 -1
  166. package/lib/utils/cdn-config.js +1 -1
  167. package/lib/utils/check-sdk-version.js +1 -1
  168. package/lib/utils/cli-version-check.js +1 -1
  169. package/lib/utils/cli-version-policy.js +1 -0
  170. package/lib/utils/config.js +1 -1
  171. package/lib/utils/copy-directory.js +1 -1
  172. package/lib/utils/entity-with-id.js +1 -1
  173. package/lib/utils/file-utils.js +1 -1
  174. package/lib/utils/guides-cdn.js +1 -1
  175. package/lib/utils/http-client.js +1 -1
  176. package/lib/utils/is-non-interactive.js +1 -1
  177. package/lib/utils/logger.js +1 -1
  178. package/lib/utils/platform.js +1 -1
  179. package/lib/utils/rules-cdn.js +1 -1
  180. package/lib/utils/sleep.js +1 -1
  181. package/lib/utils/template-replacer.js +1 -1
  182. package/lib/utils/version.js +1 -1
  183. package/lib/utils/with-active-cookie.js +1 -1
  184. package/lib/utils/write-cli-side-channel.js +1 -1
  185. package/package.json +3 -2
  186. package/templates/skill/SKILL.md.tpl +1 -1
  187. package/lib/commands/bff/new.js +0 -1
@@ -1 +1 @@
1
- (function(_0x577172,_0x1870c6){const _0x547452=a6_0x4d75,_0x30a92f=_0x577172();while(!![]){try{const _0x23a7d1=parseInt(_0x547452(0x73))/0x1*(-parseInt(_0x547452(0x79))/0x2)+-parseInt(_0x547452(0x72))/0x3*(-parseInt(_0x547452(0x85))/0x4)+-parseInt(_0x547452(0x81))/0x5+-parseInt(_0x547452(0x88))/0x6+parseInt(_0x547452(0x7e))/0x7*(-parseInt(_0x547452(0x8d))/0x8)+parseInt(_0x547452(0x71))/0x9*(-parseInt(_0x547452(0x75))/0xa)+-parseInt(_0x547452(0x7a))/0xb*(-parseInt(_0x547452(0x83))/0xc);if(_0x23a7d1===_0x1870c6)break;else _0x30a92f['push'](_0x30a92f['shift']());}catch(_0x147efd){_0x30a92f['push'](_0x30a92f['shift']());}}}(a6_0x1165,0x43a80));function a6_0x1165(){const _0x4e6f25=['package.json','847930yshUgY','3311lLpREo','readFileSync','utf8','npm\x20install\x20','331247ptAHhY','sdk','version','750730ROYRko','test','58980nOIraQ','some','873164fuglux','node','devDependencies','1881960okpQpC','\x20\x20\x20Upgrade\x20command:\x20','minVersion','log','stableVersion','88UEFLif','parse','latest','existsSync','coerce','@lovrabet/sdk','\x1b[1m','needsUpgrade','18zaoWDp','3dmlVpC','1BbxbjF','all','61420Ccwmhx','join','dependencies'];a6_0x1165=function(){return _0x4e6f25;};return a6_0x1165();}import a6_0x3b9f54 from'node:fs';import a6_0x3fe43e from'node:path';import a6_0x24eb9f from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x2bc537){const _0x4a127a=a6_0x4d75,_0x2bf6e1=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x2bf6e1[_0x4a127a(0x84)](_0x1322e6=>_0x1322e6[_0x4a127a(0x82)](_0x2bc537));}function getInstalledVersion(_0x5c5751,_0x5c923b){const _0x445533=a6_0x4d75;try{const _0x241a9d=a6_0x3fe43e[_0x445533(0x76)](_0x5c5751,'node_modules',_0x5c923b,_0x445533(0x78));if(a6_0x3b9f54[_0x445533(0x90)](_0x241a9d)){const _0x1f8a6c=JSON['parse'](a6_0x3b9f54['readFileSync'](_0x241a9d,'utf-8'));return _0x1f8a6c[_0x445533(0x80)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x5bcd7a=a6_0x4d75;try{const _0xaf1d20=await getCdnConfig();return _0xaf1d20?.[_0x5bcd7a(0x7f)]?.[_0x5bcd7a(0x86)]?.[_0x5bcd7a(0x8c)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x3c9b65=a6_0x4d75;try{const _0xcdcf21=await getCdnConfig();return _0xcdcf21?.[_0x3c9b65(0x7f)]?.['node']?.['packageName']||_0x3c9b65(0x92);}catch{return _0x3c9b65(0x92);}}export async function checkSdkVersion(_0x5712a8){const _0x2294ff=a6_0x4d75,_0x158763=a6_0x3fe43e[_0x2294ff(0x76)](_0x5712a8,_0x2294ff(0x78)),[_0x10b33f,_0x102862]=await Promise[_0x2294ff(0x74)]([getSdkStableVersion(),getSdkPackageName()]),_0x32d51b=_0x10b33f||FALLBACK_MIN_SDK_VERSION;if(!a6_0x3b9f54['existsSync'](_0x158763))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x32d51b,'packageName':_0x102862,'stableVersion':_0x10b33f};try{const _0xa77ac2=JSON['parse'](a6_0x3b9f54['readFileSync'](_0x158763,_0x2294ff(0x7c))),_0x501c59=_0xa77ac2[_0x2294ff(0x77)]||{},_0x323479=_0xa77ac2['devDependencies']||{},_0x250f67=_0x501c59[_0x102862]||_0x323479[_0x102862];if(!_0x250f67)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x32d51b,'packageName':_0x102862,'stableVersion':_0x10b33f};let _0x2d6019=getInstalledVersion(_0x5712a8,_0x102862);!_0x2d6019&&(_0x2d6019=_0x250f67);if(isNonNumericVersion(_0x250f67))return{'installed':!![],'version':_0x2d6019,'needsUpgrade':![],'minVersion':_0x32d51b,'packageName':_0x102862,'stableVersion':_0x10b33f};const _0x4c862b=a6_0x24eb9f['coerce'](_0x2d6019),_0x4ce67a=a6_0x24eb9f[_0x2294ff(0x91)](_0x32d51b),_0x50a094=_0x4c862b&&_0x4ce67a?a6_0x24eb9f['lt'](_0x4c862b,_0x4ce67a):![];return{'installed':!![],'version':_0x2d6019,'needsUpgrade':_0x50a094,'minVersion':_0x32d51b,'packageName':_0x102862,'stableVersion':_0x10b33f};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x32d51b,'packageName':_0x102862,'stableVersion':_0x10b33f};}}function a6_0x4d75(_0x3ab128,_0x133711){_0x3ab128=_0x3ab128-0x70;const _0x11653c=a6_0x1165();let _0x4d7586=_0x11653c[_0x3ab128];return _0x4d7586;}export function checkSdkVersionSync(_0x3e4adc){const _0x2f0008=a6_0x4d75,_0x5616e9=a6_0x3fe43e[_0x2f0008(0x76)](_0x3e4adc,_0x2f0008(0x78)),_0x3b612e=_0x2f0008(0x92);if(!a6_0x3b9f54[_0x2f0008(0x90)](_0x5616e9))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b612e,'stableVersion':null};try{const _0x205137=JSON[_0x2f0008(0x8e)](a6_0x3b9f54[_0x2f0008(0x7b)](_0x5616e9,_0x2f0008(0x7c))),_0x43d6b2=_0x205137[_0x2f0008(0x77)]||{},_0x53ac32=_0x205137[_0x2f0008(0x87)]||{},_0x41ecfd=_0x43d6b2[_0x3b612e]||_0x53ac32[_0x3b612e];if(!_0x41ecfd)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b612e,'stableVersion':null};let _0x50b5fc=getInstalledVersion(_0x3e4adc,_0x3b612e);!_0x50b5fc&&(_0x50b5fc=_0x41ecfd);if(isNonNumericVersion(_0x41ecfd))return{'installed':!![],'version':_0x50b5fc,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b612e,'stableVersion':null};const _0x2f9cd4=a6_0x24eb9f[_0x2f0008(0x91)](_0x50b5fc),_0xbf0a3=_0x2f9cd4?a6_0x24eb9f['lt'](_0x2f9cd4,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x50b5fc,'needsUpgrade':_0xbf0a3,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b612e,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b612e,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x11839b){const _0xa6e7af=a6_0x4d75;if(!_0x11839b[_0xa6e7af(0x70)])return;const _0x1edfea='\x1b[33m',_0x1b23d4='\x1b[0m',_0x4bfcf6=_0xa6e7af(0x93),_0x35baa8=_0x11839b['packageName']||_0xa6e7af(0x92),_0x24bc0e=_0x11839b[_0xa6e7af(0x8c)]||_0x11839b[_0xa6e7af(0x8a)],_0x3a691a=_0xa6e7af(0x7d)+_0x35baa8+'@'+(_0x24bc0e||_0xa6e7af(0x8f));console[_0xa6e7af(0x8b)](),console[_0xa6e7af(0x8b)](''+_0x1edfea+_0x4bfcf6+'↪\x20SDK\x20update\x20available'+_0x1b23d4),console[_0xa6e7af(0x8b)](_0x1edfea+'\x20\x20\x20Current\x20version:\x20'+_0x35baa8+'@'+_0x11839b[_0xa6e7af(0x80)]+_0x1b23d4),console[_0xa6e7af(0x8b)](_0x1edfea+'\x20\x20\x20Stable\x20version:\x20'+_0x24bc0e+_0x1b23d4),console[_0xa6e7af(0x8b)](_0x1edfea+_0xa6e7af(0x89)+_0x3a691a+_0x1b23d4),console[_0xa6e7af(0x8b)]();}
1
+ const a169_0x49e93e=a169_0x3b8d;function a169_0x1c93(){const _0x305813=['\x20\x20\x20Current\x20version:\x20','↪\x20SDK\x20update\x20available','devDependencies','288342tAATPX','coerce','minVersion','\x20\x20\x20Stable\x20version:\x20','test','readFileSync','version','parse','380190PSpVEl','16wRlvfS','packageName','existsSync','all','log','404708HfpZZY','stableVersion','package.json','dependencies','@lovrabet/sdk','45EWMknv','575256fTKRfI','1.2.0','node','1493786HrRagE','115IWjIcl','1371925bARLKz','join','latest','needsUpgrade','sdk','some','utf-8','\x1b[33m','node_modules'];a169_0x1c93=function(){return _0x305813;};return a169_0x1c93();}(function(_0x1d2060,_0x29facd){const _0x44cfae=a169_0x3b8d,_0x32f0bf=_0x1d2060();while(!![]){try{const _0x28fecf=-parseInt(_0x44cfae(0x1b0))/0x1*(parseInt(_0x44cfae(0x1a1))/0x2)+-parseInt(_0x44cfae(0x198))/0x3+-parseInt(_0x44cfae(0x1a6))/0x4+-parseInt(_0x44cfae(0x1b1))/0x5+parseInt(_0x44cfae(0x1a0))/0x6+parseInt(_0x44cfae(0x1af))/0x7+parseInt(_0x44cfae(0x1ac))/0x8*(parseInt(_0x44cfae(0x1ab))/0x9);if(_0x28fecf===_0x29facd)break;else _0x32f0bf['push'](_0x32f0bf['shift']());}catch(_0x4d905d){_0x32f0bf['push'](_0x32f0bf['shift']());}}}(a169_0x1c93,0x27f76));import a169_0x429cc8 from'node:fs';import a169_0x5ef7bc from'node:path';import a169_0x54e7b0 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a169_0x49e93e(0x1ad);function isNonNumericVersion(_0x57544f){const _0x488f5c=a169_0x49e93e,_0x516724=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x516724[_0x488f5c(0x191)](_0x1d9f2f=>_0x1d9f2f[_0x488f5c(0x19c)](_0x57544f));}function getInstalledVersion(_0x2cc2b8,_0x26f9f0){const _0x25e027=a169_0x49e93e;try{const _0x145616=a169_0x5ef7bc['join'](_0x2cc2b8,_0x25e027(0x194),_0x26f9f0,_0x25e027(0x1a8));if(a169_0x429cc8[_0x25e027(0x1a3)](_0x145616)){const _0x243344=JSON[_0x25e027(0x19f)](a169_0x429cc8[_0x25e027(0x19d)](_0x145616,_0x25e027(0x192)));return _0x243344[_0x25e027(0x19e)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x32ac2f=a169_0x49e93e;try{const _0x1518c8=await getCdnConfig();return _0x1518c8?.[_0x32ac2f(0x1b5)]?.[_0x32ac2f(0x1ae)]?.[_0x32ac2f(0x1a7)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x392725=a169_0x49e93e;try{const _0x29f844=await getCdnConfig();return _0x29f844?.[_0x392725(0x1b5)]?.[_0x392725(0x1ae)]?.[_0x392725(0x1a2)]||_0x392725(0x1aa);}catch{return _0x392725(0x1aa);}}export async function checkSdkVersion(_0x14f8e8){const _0x4fed09=a169_0x49e93e,_0x2ca988=a169_0x5ef7bc[_0x4fed09(0x1b2)](_0x14f8e8,_0x4fed09(0x1a8)),[_0x29f672,_0x45623d]=await Promise[_0x4fed09(0x1a4)]([getSdkStableVersion(),getSdkPackageName()]),_0x40c9fc=_0x29f672||FALLBACK_MIN_SDK_VERSION;if(!a169_0x429cc8[_0x4fed09(0x1a3)](_0x2ca988))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x40c9fc,'packageName':_0x45623d,'stableVersion':_0x29f672};try{const _0x1b0a66=JSON[_0x4fed09(0x19f)](a169_0x429cc8['readFileSync'](_0x2ca988,'utf8')),_0x23cd47=_0x1b0a66[_0x4fed09(0x1a9)]||{},_0xe18d11=_0x1b0a66[_0x4fed09(0x197)]||{},_0x456c7b=_0x23cd47[_0x45623d]||_0xe18d11[_0x45623d];if(!_0x456c7b)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x40c9fc,'packageName':_0x45623d,'stableVersion':_0x29f672};let _0x38a1ae=getInstalledVersion(_0x14f8e8,_0x45623d);!_0x38a1ae&&(_0x38a1ae=_0x456c7b);if(isNonNumericVersion(_0x456c7b))return{'installed':!![],'version':_0x38a1ae,'needsUpgrade':![],'minVersion':_0x40c9fc,'packageName':_0x45623d,'stableVersion':_0x29f672};const _0x2bc655=a169_0x54e7b0[_0x4fed09(0x199)](_0x38a1ae),_0x2c34f9=a169_0x54e7b0[_0x4fed09(0x199)](_0x40c9fc),_0x5c2adc=_0x2bc655&&_0x2c34f9?a169_0x54e7b0['lt'](_0x2bc655,_0x2c34f9):![];return{'installed':!![],'version':_0x38a1ae,'needsUpgrade':_0x5c2adc,'minVersion':_0x40c9fc,'packageName':_0x45623d,'stableVersion':_0x29f672};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x40c9fc,'packageName':_0x45623d,'stableVersion':_0x29f672};}}export function checkSdkVersionSync(_0x208436){const _0x5282a8=a169_0x49e93e,_0x4dc671=a169_0x5ef7bc[_0x5282a8(0x1b2)](_0x208436,_0x5282a8(0x1a8)),_0x1c6ded='@lovrabet/sdk';if(!a169_0x429cc8[_0x5282a8(0x1a3)](_0x4dc671))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c6ded,'stableVersion':null};try{const _0x2c4712=JSON[_0x5282a8(0x19f)](a169_0x429cc8[_0x5282a8(0x19d)](_0x4dc671,'utf8')),_0x3bb60c=_0x2c4712['dependencies']||{},_0x10e0c0=_0x2c4712[_0x5282a8(0x197)]||{},_0x296f31=_0x3bb60c[_0x1c6ded]||_0x10e0c0[_0x1c6ded];if(!_0x296f31)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c6ded,'stableVersion':null};let _0x79dcb3=getInstalledVersion(_0x208436,_0x1c6ded);!_0x79dcb3&&(_0x79dcb3=_0x296f31);if(isNonNumericVersion(_0x296f31))return{'installed':!![],'version':_0x79dcb3,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c6ded,'stableVersion':null};const _0x2ac9e5=a169_0x54e7b0['coerce'](_0x79dcb3),_0x5eca3c=_0x2ac9e5?a169_0x54e7b0['lt'](_0x2ac9e5,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x79dcb3,'needsUpgrade':_0x5eca3c,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c6ded,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c6ded,'stableVersion':null};}}function a169_0x3b8d(_0x353fe6,_0x4a0b32){_0x353fe6=_0x353fe6-0x191;const _0x1c9318=a169_0x1c93();let _0x3b8d1a=_0x1c9318[_0x353fe6];return _0x3b8d1a;}export function printSdkUpgradeWarning(_0x4e900b){const _0x5b837a=a169_0x49e93e;if(!_0x4e900b[_0x5b837a(0x1b4)])return;const _0x3b1916=_0x5b837a(0x193),_0x46775e='\x1b[0m',_0x32753a='\x1b[1m',_0x4bab42=_0x4e900b[_0x5b837a(0x1a2)]||'@lovrabet/sdk',_0x24b7a8=_0x4e900b[_0x5b837a(0x1a7)]||_0x4e900b[_0x5b837a(0x19a)],_0x344f4c='npm\x20install\x20'+_0x4bab42+'@'+(_0x24b7a8||_0x5b837a(0x1b3));console[_0x5b837a(0x1a5)](),console[_0x5b837a(0x1a5)](''+_0x3b1916+_0x32753a+_0x5b837a(0x196)+_0x46775e),console[_0x5b837a(0x1a5)](_0x3b1916+_0x5b837a(0x195)+_0x4bab42+'@'+_0x4e900b['version']+_0x46775e),console[_0x5b837a(0x1a5)](_0x3b1916+_0x5b837a(0x19b)+_0x24b7a8+_0x46775e),console[_0x5b837a(0x1a5)](_0x3b1916+'\x20\x20\x20Upgrade\x20command:\x20'+_0x344f4c+_0x46775e),console['log']();}
@@ -1 +1 @@
1
- function a16_0x4b4d(_0x324289,_0x3a2a00){_0x324289=_0x324289-0xfb;const _0x5ac181=a16_0x5ac1();let _0x4b4d08=_0x5ac181[_0x324289];return _0x4b4d08;}(function(_0x56a8c5,_0xcbc0d0){const _0x51dddf=a16_0x4b4d,_0x159bf8=_0x56a8c5();while(!![]){try{const _0x4f67b6=-parseInt(_0x51dddf(0x108))/0x1+-parseInt(_0x51dddf(0x112))/0x2*(-parseInt(_0x51dddf(0x109))/0x3)+parseInt(_0x51dddf(0x110))/0x4+parseInt(_0x51dddf(0x106))/0x5*(parseInt(_0x51dddf(0x111))/0x6)+-parseInt(_0x51dddf(0xff))/0x7*(parseInt(_0x51dddf(0x10e))/0x8)+parseInt(_0x51dddf(0x104))/0x9+-parseInt(_0x51dddf(0x113))/0xa;if(_0x4f67b6===_0xcbc0d0)break;else _0x159bf8['push'](_0x159bf8['shift']());}catch(_0x39cb7d){_0x159bf8['push'](_0x159bf8['shift']());}}}(a16_0x5ac1,0x820a9));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a16_0x3b5b9f from'semver';import{getCdnConfig}from'../utils/cdn-config.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function getCurrentCliVersion(){const _0x261e9c=a16_0x4b4d;try{const _0x27fcd3=fileURLToPath(import.meta.url),_0x37a494=resolve(dirname(_0x27fcd3),'../..'),_0x4b3d5e=resolve(_0x37a494,_0x261e9c(0x10c)),_0x157996=JSON[_0x261e9c(0xfe)](readFileSync(_0x4b3d5e,_0x261e9c(0x10d)));return _0x157996[_0x261e9c(0x103)]||_0x261e9c(0x105);}catch{return _0x261e9c(0x105);}}function isNonNumericVersion(_0xc1d463){const _0x2d621b=a16_0x4b4d,_0x117ad1=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x117ad1[_0x2d621b(0xfd)](_0x1619ae=>_0x1619ae[_0x2d621b(0x102)](_0xc1d463));}function a16_0x5ac1(){const _0x5ba846=['110dbSxCv','10665000HnjRim','\x1b[1m','npm\x20install\x20-g\x20','\x1b[0m','currentVersion','\x1b[33m','needsUpgrade','↪\x20New\x20version\x20available','log','some','parse','3668kofyNd','cli','@latest','test','version','7210323gtUwvF','1.0.0','3131515AzbaUS','\x20\x20\x20Stable\x20version:\x20','832234TzMfmK','46080TJLnfS','coerce','stableVersion','package.json','utf-8','4616QyPbfZ','\x20\x20\x20Upgrade\x20command:\x20','1845924yBBJmU','6ElrUFQ'];a16_0x5ac1=function(){return _0x5ba846;};return a16_0x5ac1();}export async function checkCliVersion(){const _0x6bed96=a16_0x4b4d,_0x3fadd8=getCurrentCliVersion(),_0x555e6=await getCdnConfig(),_0x3f7d3b=_0x555e6?.[_0x6bed96(0x100)]?.['stableVersion']||null;let _0x1deffa=![];if(_0x3f7d3b)try{const _0x4d7680=a16_0x3b5b9f[_0x6bed96(0x10a)](_0x3fadd8),_0x4bc693=a16_0x3b5b9f[_0x6bed96(0x10a)](_0x3f7d3b);_0x4d7680&&_0x4bc693&&(_0x1deffa=a16_0x3b5b9f['lt'](_0x4d7680,_0x4bc693));}catch{_0x1deffa=![];}return{'currentVersion':_0x3fadd8,'stableVersion':_0x3f7d3b,'needsUpgrade':_0x1deffa,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x26106e){const _0x313849=a16_0x4b4d;if(!_0x26106e[_0x313849(0x119)])return;const _0x4f38a9=_0x313849(0x118),_0x4d2f17=_0x313849(0x116),_0x5039bc=_0x313849(0x114),_0x27ee5f=_0x313849(0x115)+NPM_PACKAGE_NAME+_0x313849(0x101);console['log'](),console[_0x313849(0xfc)](''+_0x4f38a9+_0x5039bc+_0x313849(0xfb)+_0x4d2f17),console[_0x313849(0xfc)](_0x4f38a9+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x26106e[_0x313849(0x117)]+_0x4d2f17),console[_0x313849(0xfc)](_0x4f38a9+_0x313849(0x107)+_0x26106e[_0x313849(0x10b)]+_0x4d2f17),console[_0x313849(0xfc)](_0x4f38a9+_0x313849(0x10f)+_0x27ee5f+_0x4d2f17),console[_0x313849(0xfc)]();}
1
+ (function(_0x92885,_0x139744){const _0x258e7b=a170_0x2d3f,_0x5dd0df=_0x92885();while(!![]){try{const _0x56d5db=parseInt(_0x258e7b(0x7d))/0x1+-parseInt(_0x258e7b(0x88))/0x2+-parseInt(_0x258e7b(0x8d))/0x3*(parseInt(_0x258e7b(0x8a))/0x4)+-parseInt(_0x258e7b(0x9d))/0x5+parseInt(_0x258e7b(0x84))/0x6*(-parseInt(_0x258e7b(0x9c))/0x7)+-parseInt(_0x258e7b(0x9e))/0x8+parseInt(_0x258e7b(0x89))/0x9*(parseInt(_0x258e7b(0x7c))/0xa);if(_0x56d5db===_0x139744)break;else _0x5dd0df['push'](_0x5dd0df['shift']());}catch(_0x5961df){_0x5dd0df['push'](_0x5dd0df['shift']());}}}(a170_0x3382,0x69979));import{readFileSync}from'node:fs';function a170_0x2d3f(_0x328463,_0x520690){_0x328463=_0x328463-0x7a;const _0x338240=a170_0x3382();let _0x2d3f97=_0x338240[_0x328463];return _0x2d3f97;}import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a170_0x4161e3 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a170_0x3382(){const _0x3a4f7f=['minimumVersionMessage','1303242vMXDgl','6642IBpxjq','2300IbuHjh','\x20\x20\x20Stable\x20version:\x20','\x1b[1m','843sjlSdG','log','validation','\x20\x20\x20Minimum\x20required:\x20','belowMinimum','1.0.0','Upgrade\x20command:\x20','\x20\x20\x20Upgrade\x20command:\x20','minimumVersion','needsUpgrade','package.json','\x20\x20\x20','Minimum\x20required:\x20','↪\x20New\x20version\x20available','stableVersion','14945wvezsB','3264140dMwpPb','6676112kYobjs','currentVersion','utf-8','../..','filter','30610pheROs','514590LfLMPp','\x20\x20\x20Current\x20CLI\x20version:\x20','join','Current\x20version:\x20','upgradeMessage','coerce','\x1b[31m','114usHhJF','\x1b[33m','npm\x20install\x20-g\x20'];a170_0x3382=function(){return _0x3a4f7f;};return a170_0x3382();}import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x469f11){const _0x3fa1dd=a170_0x2d3f,_0x16108c=_0x469f11[_0x3fa1dd(0x9b)]||'latest';return _0x3fa1dd(0x86)+NPM_PACKAGE_NAME+'@'+_0x16108c;}function getCurrentCliVersion(){const _0x8a37a1=a170_0x2d3f;try{const _0x15da8c=fileURLToPath(import.meta.url),_0x571fe4=resolve(dirname(_0x15da8c),_0x8a37a1(0x7a)),_0x3757c9=resolve(_0x571fe4,_0x8a37a1(0x97)),_0x34b6d9=JSON['parse'](readFileSync(_0x3757c9,_0x8a37a1(0xa0)));return _0x34b6d9['version']||_0x8a37a1(0x92);}catch{return _0x8a37a1(0x92);}}export async function checkCliVersion(){const _0x5024ce=a170_0x2d3f,_0x4a083f=getCurrentCliVersion(),_0x39378=await getCliVersionPolicy(),_0x4cbb25=_0x39378?.[_0x5024ce(0x9b)]||null,_0x2f6918=_0x39378?.[_0x5024ce(0x95)]||null;let _0x4a14f6=![],_0x44ed35=![];const _0xe7b8ba=a170_0x4161e3[_0x5024ce(0x82)](_0x4a083f);if(_0xe7b8ba&&_0x4cbb25)try{const _0x369283=a170_0x4161e3[_0x5024ce(0x82)](_0x4cbb25);if(_0x369283)_0x4a14f6=a170_0x4161e3['lt'](_0xe7b8ba,_0x369283);}catch{}if(_0xe7b8ba&&_0x2f6918)try{const _0x47a313=a170_0x4161e3[_0x5024ce(0x82)](_0x2f6918);if(_0x47a313)_0x44ed35=a170_0x4161e3['lt'](_0xe7b8ba,_0x47a313);}catch{}return _0x44ed35&&(_0x4a14f6=!![]),{'currentVersion':_0x4a083f,'stableVersion':_0x4cbb25,'minimumVersion':_0x2f6918,'needsUpgrade':_0x4a14f6,'belowMinimum':_0x44ed35,'isPreRelease':![],'upgradeMessage':_0x39378?.[_0x5024ce(0x81)],'minimumVersionMessage':_0x39378?.['minimumVersionMessage']};}export function printCliUpgradeWarning(_0x42ed08){const _0x493b71=a170_0x2d3f;if(!_0x42ed08[_0x493b71(0x96)]&&!_0x42ed08[_0x493b71(0x91)])return;const _0x69d31=_0x493b71(0x83),_0x1251b4=_0x493b71(0x85),_0x254e7c='\x1b[0m',_0x42acb5=_0x493b71(0x8c),_0x5162ba=getCliUpgradeCommand(_0x42ed08);console[_0x493b71(0x8e)](),_0x42ed08[_0x493b71(0x91)]?(console[_0x493b71(0x8e)](''+_0x69d31+_0x42acb5+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x254e7c),console['log'](_0x69d31+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x42ed08[_0x493b71(0x9f)]+_0x254e7c),_0x42ed08[_0x493b71(0x95)]&&console[_0x493b71(0x8e)](_0x69d31+_0x493b71(0x90)+_0x42ed08[_0x493b71(0x95)]+_0x254e7c),_0x42ed08[_0x493b71(0x9b)]&&_0x42ed08[_0x493b71(0x9b)]!==_0x42ed08[_0x493b71(0x95)]&&console[_0x493b71(0x8e)](_0x69d31+'\x20\x20\x20Recommended\x20stable:\x20'+_0x42ed08[_0x493b71(0x9b)]+_0x254e7c),_0x42ed08[_0x493b71(0x87)]&&console[_0x493b71(0x8e)](_0x69d31+_0x493b71(0x98)+_0x42ed08[_0x493b71(0x87)]+_0x254e7c),console[_0x493b71(0x8e)](_0x69d31+'\x20\x20\x20Upgrade\x20command:\x20'+_0x5162ba+_0x254e7c)):(console[_0x493b71(0x8e)](''+_0x1251b4+_0x42acb5+_0x493b71(0x9a)+_0x254e7c),console[_0x493b71(0x8e)](_0x1251b4+_0x493b71(0x7e)+_0x42ed08['currentVersion']+_0x254e7c),console[_0x493b71(0x8e)](_0x1251b4+_0x493b71(0x8b)+_0x42ed08['stableVersion']+_0x254e7c),_0x42ed08[_0x493b71(0x81)]&&console[_0x493b71(0x8e)](_0x1251b4+_0x493b71(0x98)+_0x42ed08[_0x493b71(0x81)]+_0x254e7c),console[_0x493b71(0x8e)](_0x1251b4+_0x493b71(0x94)+_0x5162ba+_0x254e7c)),console[_0x493b71(0x8e)]();}export function assertCliVersionSupported(_0x9177ca){const _0x5ce3df=a170_0x2d3f;if(!_0x9177ca['belowMinimum'])return;const _0x81c5b0=[_0x9177ca['minimumVersionMessage'],_0x5ce3df(0x80)+_0x9177ca[_0x5ce3df(0x9f)],_0x9177ca[_0x5ce3df(0x95)]?_0x5ce3df(0x99)+_0x9177ca[_0x5ce3df(0x95)]:null,_0x5ce3df(0x93)+getCliUpgradeCommand(_0x9177ca)][_0x5ce3df(0x7b)](Boolean)[_0x5ce3df(0x7f)]('\x0a');throw CliErrors[_0x5ce3df(0x8f)]('Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.',_0x81c5b0);}
@@ -0,0 +1 @@
1
+ (function(_0x5b4444,_0x39d12a){const _0x4bcfa0=a171_0x22bf,_0x5f3640=_0x5b4444();while(!![]){try{const _0xcb79a9=-parseInt(_0x4bcfa0(0x11b))/0x1+parseInt(_0x4bcfa0(0x11e))/0x2+-parseInt(_0x4bcfa0(0x12a))/0x3+-parseInt(_0x4bcfa0(0x11d))/0x4*(-parseInt(_0x4bcfa0(0x120))/0x5)+parseInt(_0x4bcfa0(0x119))/0x6+parseInt(_0x4bcfa0(0x124))/0x7+-parseInt(_0x4bcfa0(0x127))/0x8*(-parseInt(_0x4bcfa0(0x129))/0x9);if(_0xcb79a9===_0x39d12a)break;else _0x5f3640['push'](_0x5f3640['shift']());}catch(_0x4f3fef){_0x5f3640['push'](_0x5f3640['shift']());}}}(a171_0x9dd7,0x5c6e5));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function a171_0x9dd7(){const _0x17405a=['cli','319330uRpVgt','abort','24HziFCH','319390XiIzuO','recommendedVersion','111150YAFymn','object','length','string','3421320nOPzoJ','latestVersion','signal','220744SPjiFX','stableVersion','36LOgfHK','1784379brFXru','minimumVersionMessage','minimumVersion','application/json','2403078tJjWeo'];a171_0x9dd7=function(){return _0x17405a;};return a171_0x9dd7();}function pickString(_0x18de2e){const _0x585980=a171_0x22bf;return typeof _0x18de2e===_0x585980(0x123)&&_0x18de2e['trim']()[_0x585980(0x122)]>0x0?_0x18de2e['trim']():null;}function normalizeCliVersionPolicy(_0x5da3a7){const _0x277b41=a171_0x22bf;if(!_0x5da3a7||typeof _0x5da3a7!=='object')return null;const _0x4fef7b=_0x5da3a7,_0xd8d910=_0x4fef7b[_0x277b41(0x11a)]&&typeof _0x4fef7b[_0x277b41(0x11a)]===_0x277b41(0x121)?_0x4fef7b['cli']:_0x4fef7b,_0xb4627a=pickString(_0xd8d910[_0x277b41(0x128)])||pickString(_0xd8d910[_0x277b41(0x125)])||pickString(_0xd8d910[_0x277b41(0x11f)]),_0x5329bc=pickString(_0xd8d910[_0x277b41(0x12c)])||pickString(_0xd8d910['minVersion']);if(!_0xb4627a&&!_0x5329bc)return null;return{'stableVersion':_0xb4627a,'minimumVersion':_0x5329bc,'upgradeMessage':pickString(_0xd8d910['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0xd8d910[_0x277b41(0x12b)])||undefined};}function a171_0x22bf(_0x19b3e3,_0x3e5aed){_0x19b3e3=_0x19b3e3-0x119;const _0x9dd7ec=a171_0x9dd7();let _0x22bf81=_0x9dd7ec[_0x19b3e3];return _0x22bf81;}export async function fetchCliVersionPolicy(){const _0x46f5e1=a171_0x22bf,_0x1d4fca=new AbortController(),_0x4dfc58=setTimeout(()=>_0x1d4fca[_0x46f5e1(0x11c)](),FETCH_TIMEOUT_MS);try{const _0xacc8b6=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x46f5e1(0x12d)},'signal':_0x1d4fca[_0x46f5e1(0x126)]});if(!_0xacc8b6['ok'])return null;const _0x5e78bc=await _0xacc8b6['json']();return normalizeCliVersionPolicy(_0x5e78bc);}catch{return null;}finally{clearTimeout(_0x4dfc58);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x169e35=Date['now']();if(hasCachedPolicy){const _0x3b1e18=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x169e35-cacheTime<_0x3b1e18)return cachedPolicy;}const _0x2da7c8=await fetchCliVersionPolicy();return cachedPolicy=_0x2da7c8,cacheTime=_0x169e35,hasCachedPolicy=!![],_0x2da7c8;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
@@ -1 +1 @@
1
- const a8_0x4cf54f=a8_0x3750;function a8_0x4f8d(){const _0x344fcb=['464cmiDcs','1078448FbuJXd','env','2038230gJnOwQ','276862nRDnBj','900614ODYSbK','project','7265184jNJuqJ','5421mZJAJi','252pnZVIW','6614972Uuacku','string'];a8_0x4f8d=function(){return _0x344fcb;};return a8_0x4f8d();}(function(_0x1a2008,_0x678a0a){const _0x216256=a8_0x3750,_0x522b68=_0x1a2008();while(!![]){try{const _0x46db23=-parseInt(_0x216256(0x116))/0x1+parseInt(_0x216256(0x121))/0x2+-parseInt(_0x216256(0x119))/0x3*(-parseInt(_0x216256(0x11d))/0x4)+-parseInt(_0x216256(0x120))/0x5+-parseInt(_0x216256(0x118))/0x6+-parseInt(_0x216256(0x11b))/0x7+-parseInt(_0x216256(0x11e))/0x8*(-parseInt(_0x216256(0x11a))/0x9);if(_0x46db23===_0x678a0a)break;else _0x522b68['push'](_0x522b68['shift']());}catch(_0x361aa9){_0x522b68['push'](_0x522b68['shift']());}}}(a8_0x4f8d,0xa0c3b));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a8_0x16e350,getMultiAppConfigs as a8_0x56edaf,getTemplateBaseUrl as a8_0x37a101}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';function a8_0x3750(_0x5801cb,_0x226a3a){_0x5801cb=_0x5801cb-0x116;const _0x4f8d0b=a8_0x4f8d();let _0x37507e=_0x4f8d0b[_0x5801cb];return _0x37507e;}export function readConfig(_0x36ff7b){const _0x5378d3=a8_0x3750,_0x109246=readRawConfig(_0x36ff7b);return _0x109246['env']&&typeof _0x109246['env']===_0x5378d3(0x11c)&&initEnv(_0x109246[_0x5378d3(0x11f)]),_0x109246;}export function getConfigAppCode(){return a8_0x16e350();}export function getMultiAppConfigs(_0x3ef59a=a8_0x4cf54f(0x117)){return a8_0x56edaf(_0x3ef59a);}export function getTemplateBaseUrl(){return a8_0x37a101();}
1
+ (function(_0x56efe0,_0x8d0b57){const _0x28eaa6=a172_0x2a62,_0x3ad4b6=_0x56efe0();while(!![]){try{const _0x560d82=-parseInt(_0x28eaa6(0x125))/0x1+-parseInt(_0x28eaa6(0x12d))/0x2*(-parseInt(_0x28eaa6(0x12c))/0x3)+-parseInt(_0x28eaa6(0x128))/0x4*(-parseInt(_0x28eaa6(0x124))/0x5)+-parseInt(_0x28eaa6(0x12a))/0x6*(parseInt(_0x28eaa6(0x129))/0x7)+-parseInt(_0x28eaa6(0x12f))/0x8+-parseInt(_0x28eaa6(0x12b))/0x9+-parseInt(_0x28eaa6(0x127))/0xa*(-parseInt(_0x28eaa6(0x12e))/0xb);if(_0x560d82===_0x8d0b57)break;else _0x3ad4b6['push'](_0x3ad4b6['shift']());}catch(_0x5701dd){_0x3ad4b6['push'](_0x3ad4b6['shift']());}}}(a172_0x4e57,0xe556e));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a172_0x44184f,getMultiAppConfigs as a172_0x59befd,getTemplateBaseUrl as a172_0x41f96b}from'../context.js';function a172_0x4e57(){const _0x3e79e7=['66012ASImak','12707784DTdpns','126705DZLodI','34VYtqmY','24695671McUJtq','6759832jCJXkN','35ctFtpW','1412722sRWLEe','env','10Abbzwg','965716KKqhVU','28Bziguw'];a172_0x4e57=function(){return _0x3e79e7;};return a172_0x4e57();}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0xecf2ff){const _0x5f4ef4=a172_0x2a62,_0x3e41f9=readRawConfig(_0xecf2ff);return _0x3e41f9[_0x5f4ef4(0x126)]&&typeof _0x3e41f9[_0x5f4ef4(0x126)]==='string'&&initEnv(_0x3e41f9['env']),_0x3e41f9;}export function getConfigAppCode(){return a172_0x44184f();}function a172_0x2a62(_0x5ad4e0,_0xf4232e){_0x5ad4e0=_0x5ad4e0-0x124;const _0x4e57ef=a172_0x4e57();let _0x2a62b3=_0x4e57ef[_0x5ad4e0];return _0x2a62b3;}export function getMultiAppConfigs(_0x2ab9c5='project'){return a172_0x59befd(_0x2ab9c5);}export function getTemplateBaseUrl(){return a172_0x41f96b();}
@@ -1 +1 @@
1
- function a9_0x980c(){const _0x5b9890=['45CyINHj','150VWFZjs','747912NDXAkd','name','2197013qtPNkR','2704312wuaKfh','6zQndUB','3UkFQCW','复制目录时出错:','631707mSqKhu','copyFileSync','join','656360axhAOS','2329280hwvYvT','436028SGdYKS'];a9_0x980c=function(){return _0x5b9890;};return a9_0x980c();}function a9_0xbca0(_0x399f34,_0x42c49d){_0x399f34=_0x399f34-0xd8;const _0x980c06=a9_0x980c();let _0xbca008=_0x980c06[_0x399f34];return _0xbca008;}(function(_0x3167cd,_0x48806e){const _0x1d871a=a9_0xbca0,_0x3490de=_0x3167cd();while(!![]){try{const _0x21a524=-parseInt(_0x1d871a(0xe5))/0x1+parseInt(_0x1d871a(0xdb))/0x2*(parseInt(_0x1d871a(0xe3))/0x3)+parseInt(_0x1d871a(0xe1))/0x4+parseInt(_0x1d871a(0xda))/0x5+-parseInt(_0x1d871a(0xe2))/0x6*(-parseInt(_0x1d871a(0xe0))/0x7)+-parseInt(_0x1d871a(0xd9))/0x8*(-parseInt(_0x1d871a(0xdc))/0x9)+parseInt(_0x1d871a(0xdd))/0xa*(-parseInt(_0x1d871a(0xde))/0xb);if(_0x21a524===_0x48806e)break;else _0x3490de['push'](_0x3490de['shift']());}catch(_0x15fd34){_0x3490de['push'](_0x3490de['shift']());}}}(a9_0x980c,0x6993d));import a9_0x5177ad from'node:path';import a9_0x57b84a from'node:fs';export async function copyDirectory(_0x4514cc,_0x587e8f){const _0x592c20=a9_0xbca0;try{const _0x1fc25b=a9_0x57b84a['readdirSync'](_0x4514cc,{'withFileTypes':!![]});a9_0x57b84a['mkdirSync'](_0x587e8f,{'recursive':!![]});for(const _0x26ae46 of _0x1fc25b){const _0x411513=a9_0x5177ad['join'](_0x4514cc,_0x26ae46['name']),_0x1f2f46=a9_0x5177ad[_0x592c20(0xd8)](_0x587e8f,_0x26ae46[_0x592c20(0xdf)]);_0x26ae46['isDirectory']()?await copyDirectory(_0x411513,_0x1f2f46):a9_0x57b84a[_0x592c20(0xe6)](_0x411513,_0x1f2f46);}}catch(_0x1b4b7d){console['error'](_0x592c20(0xe4),_0x1b4b7d);}}
1
+ (function(_0x3efda5,_0x458350){const _0x5acec3=a173_0x1f52,_0x4ebd4d=_0x3efda5();while(!![]){try{const _0x51077c=-parseInt(_0x5acec3(0x12d))/0x1+-parseInt(_0x5acec3(0x127))/0x2+parseInt(_0x5acec3(0x125))/0x3*(parseInt(_0x5acec3(0x121))/0x4)+-parseInt(_0x5acec3(0x129))/0x5+-parseInt(_0x5acec3(0x126))/0x6+parseInt(_0x5acec3(0x123))/0x7*(parseInt(_0x5acec3(0x128))/0x8)+parseInt(_0x5acec3(0x120))/0x9;if(_0x51077c===_0x458350)break;else _0x4ebd4d['push'](_0x4ebd4d['shift']());}catch(_0x539b26){_0x4ebd4d['push'](_0x4ebd4d['shift']());}}}(a173_0x21cc,0xdcb30));function a173_0x21cc(){const _0x5e675a=['复制目录时出错:','error','name','1209569PnYaRN','35922834jfaUAG','6312zNJMym','join','184394VKEYvA','isDirectory','1149Chziip','6134808xaQrez','2410802uyeAhy','328qHKjMq','6672000slnCul'];a173_0x21cc=function(){return _0x5e675a;};return a173_0x21cc();}function a173_0x1f52(_0x4299a2,_0x209070){_0x4299a2=_0x4299a2-0x120;const _0x21cc1a=a173_0x21cc();let _0x1f5272=_0x21cc1a[_0x4299a2];return _0x1f5272;}import a173_0x30df91 from'node:path';import a173_0x916c05 from'node:fs';export async function copyDirectory(_0xa42fb2,_0x4479e0){const _0x263c9f=a173_0x1f52;try{const _0x39ae3e=a173_0x916c05['readdirSync'](_0xa42fb2,{'withFileTypes':!![]});a173_0x916c05['mkdirSync'](_0x4479e0,{'recursive':!![]});for(const _0xd41d43 of _0x39ae3e){const _0x22febf=a173_0x30df91['join'](_0xa42fb2,_0xd41d43[_0x263c9f(0x12c)]),_0x3b683a=a173_0x30df91[_0x263c9f(0x122)](_0x4479e0,_0xd41d43[_0x263c9f(0x12c)]);_0xd41d43[_0x263c9f(0x124)]()?await copyDirectory(_0x22febf,_0x3b683a):a173_0x916c05['copyFileSync'](_0x22febf,_0x3b683a);}}catch(_0xc107c2){console[_0x263c9f(0x12b)](_0x263c9f(0x12a),_0xc107c2);}}
@@ -1 +1 @@
1
- function a5_0xca04(_0xaf959d,_0x196dce){_0xaf959d=_0xaf959d-0x105;const _0x2f6ee9=a5_0x2f6e();let _0xca04bd=_0x2f6ee9[_0xaf959d];return _0xca04bd;}(function(_0xa35c7f,_0x35d26f){const _0x17f8b6=a5_0xca04,_0x1e35c0=_0xa35c7f();while(!![]){try{const _0x514d60=-parseInt(_0x17f8b6(0x109))/0x1*(parseInt(_0x17f8b6(0x10d))/0x2)+-parseInt(_0x17f8b6(0x10b))/0x3+parseInt(_0x17f8b6(0x10c))/0x4*(-parseInt(_0x17f8b6(0x10e))/0x5)+parseInt(_0x17f8b6(0x110))/0x6+parseInt(_0x17f8b6(0x10a))/0x7+parseInt(_0x17f8b6(0x10f))/0x8+parseInt(_0x17f8b6(0x108))/0x9;if(_0x514d60===_0x35d26f)break;else _0x1e35c0['push'](_0x1e35c0['shift']());}catch(_0x2d2c49){_0x1e35c0['push'](_0x1e35c0['shift']());}}}(a5_0x2f6e,0x7b524));function a5_0x2f6e(){const _0x49ab3c=['12oORjXA','412pdnTwE','833045Osivjs','1808768OMFGil','3886320GsksIc','isFinite','number','trim','8802144iUisfZ','217PgMYBR','723751eDWxxr','2716716FUFbna'];a5_0x2f6e=function(){return _0x49ab3c;};return a5_0x2f6e();}function toFiniteNumber(_0x21621b){const _0x2ab9fa=a5_0xca04;if(typeof _0x21621b===_0x2ab9fa(0x106)&&Number[_0x2ab9fa(0x105)](_0x21621b))return _0x21621b;if(typeof _0x21621b==='string'){const _0x316e11=_0x21621b[_0x2ab9fa(0x107)]();if(!_0x316e11)return undefined;const _0x5c5f6f=Number(_0x316e11);if(Number['isFinite'](_0x5c5f6f))return _0x5c5f6f;}return undefined;}export function normalizeEntityWithIdResponse(_0x5096d5){const _0x7af933=toFiniteNumber(_0x5096d5);if(_0x7af933!==undefined)return{'id':_0x7af933,'entity':{'id':_0x7af933}};if(!_0x5096d5||typeof _0x5096d5!=='object')return{'id':undefined,'entity':{}};const _0x8f589e={..._0x5096d5},_0x48eeaf=toFiniteNumber(_0x8f589e['id']);return _0x48eeaf!==undefined&&(_0x8f589e['id']=_0x48eeaf),{'id':_0x48eeaf,'entity':_0x8f589e};}
1
+ function a174_0x45a8(){const _0xf06332=['152IAyAgu','7gWmVfL','15PZeXnt','4KJVcPO','55953OFQEgz','609078rttRFP','145660tcjSKM','trim','string','object','2100920AYYpLs','isFinite','number','4724500IwuLaX','1945045gGIEeh','101694IwDsfb'];a174_0x45a8=function(){return _0xf06332;};return a174_0x45a8();}(function(_0x471432,_0x4e2f0d){const _0x57a833=a174_0x5a60,_0x1f6777=_0x471432();while(!![]){try{const _0x59d54e=parseInt(_0x57a833(0xcf))/0x1+parseInt(_0x57a833(0xc6))/0x2*(-parseInt(_0x57a833(0xc2))/0x3)+parseInt(_0x57a833(0xc3))/0x4*(parseInt(_0x57a833(0xce))/0x5)+parseInt(_0x57a833(0xc5))/0x6*(-parseInt(_0x57a833(0xd1))/0x7)+parseInt(_0x57a833(0xd0))/0x8*(parseInt(_0x57a833(0xc4))/0x9)+-parseInt(_0x57a833(0xca))/0xa+parseInt(_0x57a833(0xcd))/0xb;if(_0x59d54e===_0x4e2f0d)break;else _0x1f6777['push'](_0x1f6777['shift']());}catch(_0x354480){_0x1f6777['push'](_0x1f6777['shift']());}}}(a174_0x45a8,0x5884b));function toFiniteNumber(_0x4c98be){const _0x5d328d=a174_0x5a60;if(typeof _0x4c98be===_0x5d328d(0xcc)&&Number[_0x5d328d(0xcb)](_0x4c98be))return _0x4c98be;if(typeof _0x4c98be===_0x5d328d(0xc8)){const _0x16aaa0=_0x4c98be[_0x5d328d(0xc7)]();if(!_0x16aaa0)return undefined;const _0x1062e0=Number(_0x16aaa0);if(Number[_0x5d328d(0xcb)](_0x1062e0))return _0x1062e0;}return undefined;}function a174_0x5a60(_0x38d557,_0xb44f7b){_0x38d557=_0x38d557-0xc2;const _0x45a861=a174_0x45a8();let _0x5a60bd=_0x45a861[_0x38d557];return _0x5a60bd;}export function normalizeEntityWithIdResponse(_0x489528){const _0x2697ae=a174_0x5a60,_0x4f13ac=toFiniteNumber(_0x489528);if(_0x4f13ac!==undefined)return{'id':_0x4f13ac,'entity':{'id':_0x4f13ac}};if(!_0x489528||typeof _0x489528!==_0x2697ae(0xc9))return{'id':undefined,'entity':{}};const _0x329015={..._0x489528},_0x3e35dc=toFiniteNumber(_0x329015['id']);return _0x3e35dc!==undefined&&(_0x329015['id']=_0x3e35dc),{'id':_0x3e35dc,'entity':_0x329015};}
@@ -1 +1 @@
1
- function a18_0x49b9(){const _0x28ee28=['isDirectory','12VXOycX','115210SEhfsQ','2384851sXnIxA','2920ptgLTC','7434ifyzkr','167397xwSHca','15936oxOdgc','44pbmmSx','4268uGOTZB','6PwvZsH','1701040wmsCnq','2557185qAwpqM'];a18_0x49b9=function(){return _0x28ee28;};return a18_0x49b9();}(function(_0x3a890c,_0x472e36){const _0x1e081f=a18_0x1cb4,_0x24312c=_0x3a890c();while(!![]){try{const _0x4fa6e5=parseInt(_0x1e081f(0x73))/0x1*(parseInt(_0x1e081f(0x78))/0x2)+parseInt(_0x1e081f(0x6f))/0x3*(-parseInt(_0x1e081f(0x71))/0x4)+parseInt(_0x1e081f(0x75))/0x5+-parseInt(_0x1e081f(0x77))/0x6*(-parseInt(_0x1e081f(0x6c))/0x7)+parseInt(_0x1e081f(0x74))/0x8+parseInt(_0x1e081f(0x6e))/0x9*(-parseInt(_0x1e081f(0x6d))/0xa)+parseInt(_0x1e081f(0x72))/0xb*(-parseInt(_0x1e081f(0x70))/0xc);if(_0x4fa6e5===_0x472e36)break;else _0x24312c['push'](_0x24312c['shift']());}catch(_0x1ae797){_0x24312c['push'](_0x24312c['shift']());}}}(a18_0x49b9,0x5cfa6));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a18_0x1cb4(_0x582dc2,_0x8cd0d1){_0x582dc2=_0x582dc2-0x6c;const _0x49b959=a18_0x49b9();let _0x1cb429=_0x49b959[_0x582dc2];return _0x1cb429;}import{join}from'node:path';export async function copyDir(_0x38253c,_0x4b2572){const _0x12b31d=a18_0x1cb4,_0x1787ea=statSync(_0x38253c);if(_0x1787ea[_0x12b31d(0x76)]()){!existsSync(_0x4b2572)&&mkdirSync(_0x4b2572,{'recursive':!![]});const _0x5166ef=readdirSync(_0x38253c);for(const _0x5378da of _0x5166ef){await copyDir(join(_0x38253c,_0x5378da),join(_0x4b2572,_0x5378da));}}else copyFileSync(_0x38253c,_0x4b2572);}export function ensureDir(_0x4cf3ae){!existsSync(_0x4cf3ae)&&mkdirSync(_0x4cf3ae,{'recursive':!![]});}export function pathExists(_0x57728f){return existsSync(_0x57728f);}
1
+ (function(_0x20d627,_0x5b4f1a){const _0x1886b5=a175_0x2380,_0x50ade2=_0x20d627();while(!![]){try{const _0x2521a5=parseInt(_0x1886b5(0x17c))/0x1+parseInt(_0x1886b5(0x17d))/0x2+parseInt(_0x1886b5(0x182))/0x3+parseInt(_0x1886b5(0x180))/0x4*(parseInt(_0x1886b5(0x17f))/0x5)+-parseInt(_0x1886b5(0x183))/0x6*(parseInt(_0x1886b5(0x17e))/0x7)+parseInt(_0x1886b5(0x181))/0x8+-parseInt(_0x1886b5(0x184))/0x9;if(_0x2521a5===_0x5b4f1a)break;else _0x50ade2['push'](_0x50ade2['shift']());}catch(_0x247e67){_0x50ade2['push'](_0x50ade2['shift']());}}}(a175_0x4458,0x61698));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a175_0x2380(_0x6ca3aa,_0x25ca24){_0x6ca3aa=_0x6ca3aa-0x17c;const _0x445833=a175_0x4458();let _0x2380a2=_0x445833[_0x6ca3aa];return _0x2380a2;}export async function copyDir(_0x2a1e02,_0x1cc875){const _0x2ce7c0=statSync(_0x2a1e02);if(_0x2ce7c0['isDirectory']()){!existsSync(_0x1cc875)&&mkdirSync(_0x1cc875,{'recursive':!![]});const _0x29a039=readdirSync(_0x2a1e02);for(const _0x3aab79 of _0x29a039){await copyDir(join(_0x2a1e02,_0x3aab79),join(_0x1cc875,_0x3aab79));}}else copyFileSync(_0x2a1e02,_0x1cc875);}function a175_0x4458(){const _0x2c06fb=['1041610ppptHP','12eTxbHD','1823504mNXKFW','164247WdRaNd','125802xFfGEo','5361543HAhaZz','227893wbBUuN','598976sMJyYf','147nTyucg'];a175_0x4458=function(){return _0x2c06fb;};return a175_0x4458();}export function ensureDir(_0x3d9ec6){!existsSync(_0x3d9ec6)&&mkdirSync(_0x3d9ec6,{'recursive':!![]});}export function pathExists(_0x2251da){return existsSync(_0x2251da);}
@@ -1 +1 @@
1
- const a15_0x1afdd4=a15_0x1f14;(function(_0x1eb003,_0x2b8a47){const _0x42b7e7=a15_0x1f14,_0x31edeb=_0x1eb003();while(!![]){try{const _0x4e3c9e=-parseInt(_0x42b7e7(0x183))/0x1+parseInt(_0x42b7e7(0x17a))/0x2*(-parseInt(_0x42b7e7(0x188))/0x3)+-parseInt(_0x42b7e7(0x17d))/0x4+-parseInt(_0x42b7e7(0x178))/0x5*(-parseInt(_0x42b7e7(0x18e))/0x6)+-parseInt(_0x42b7e7(0x185))/0x7+parseInt(_0x42b7e7(0x17e))/0x8*(-parseInt(_0x42b7e7(0x16e))/0x9)+parseInt(_0x42b7e7(0x193))/0xa*(parseInt(_0x42b7e7(0x18f))/0xb);if(_0x4e3c9e===_0x2b8a47)break;else _0x31edeb['push'](_0x31edeb['shift']());}catch(_0x5df62d){_0x31edeb['push'](_0x31edeb['shift']());}}}(a15_0x1ee2,0x457d3));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function a15_0x1f14(_0x259594,_0x484595){_0x259594=_0x259594-0x16d;const _0x1ee2d6=a15_0x1ee2();let _0x1f1486=_0x1ee2d6[_0x259594];return _0x1f1486;}function getGuidesCdnUrl(){const _0x17c8e7=a15_0x1f14,_0x576c22=getTemplateBaseUrl();return _0x576c22+_0x17c8e7(0x191);}function a15_0x1ee2(){const _0x176b9f=['174XVJXEe','49863JkTMbv','CDN\x20请求失败:\x20','/skills/guides.json','statusText','2940dOsJwf','keys','27lYLcDc','extendContent','.md','join','.lovrabet/skill/guides','object','json','entries','.lovrabet','utf-8','16655KYbRhv','\x0a\x0a>更新时间:','166484TUvrix','map','guides','976304QoQEGn','574456vJTgMR','title','CDN\x20数据中缺少\x20skillTemplate','lastUpdated','skillTemplate','399811YTBZoD','cache','1414868IbjZOS','trimEnd','application/json','3TrnlZA','length','content','push','CDN\x20返回数据格式错误','replace'];a15_0x1ee2=function(){return _0x176b9f;};return a15_0x1ee2();}const CACHE_DIR=join(homedir(),a15_0x1afdd4(0x176),a15_0x1afdd4(0x184));export async function fetchGuidesFromCDN(){const _0x100d55=a15_0x1afdd4,_0x4fcce9=getGuidesCdnUrl(),_0x1da553=await fetch(_0x4fcce9,{'headers':{'Accept':_0x100d55(0x187)}});if(!_0x1da553['ok'])throw new Error(_0x100d55(0x190)+_0x1da553['status']+'\x20'+_0x1da553[_0x100d55(0x192)]);const _0x31dfa2=await _0x1da553[_0x100d55(0x174)]();if(!_0x31dfa2[_0x100d55(0x17c)]||typeof _0x31dfa2[_0x100d55(0x17c)]!==_0x100d55(0x173))throw new Error(_0x100d55(0x18c));return _0x31dfa2;}export function writeGuidesToProject(_0x4f8091,_0x2e678b,_0x3af184=a15_0x1afdd4(0x172),_0x4b7c0b){const _0x332ec=a15_0x1afdd4,_0x37f937=join(_0x2e678b,_0x3af184);mkdirSync(_0x37f937,{'recursive':!![]});for(const [_0x5324bb,_0x1360b0]of Object[_0x332ec(0x175)](_0x4f8091['guides'])){let _0x4f9fc5=_0x1360b0['content'];_0x1360b0[_0x332ec(0x181)]&&(_0x4f9fc5=appendUpdateTime(_0x4f9fc5,_0x1360b0['lastUpdated'])),writeFileSync(join(_0x37f937,_0x5324bb+_0x332ec(0x170)),_0x4f9fc5,_0x332ec(0x177));}}export function appendUpdateTime(_0x38861d,_0x5acd4a){const _0x3e4953=a15_0x1afdd4;return _0x38861d=_0x38861d['replace'](/\n*>更新时间:.*$/m,''),_0x38861d['trimEnd']()+(_0x3e4953(0x179)+_0x5acd4a);}export function getSkillTemplate(_0x2c8466){const _0x5ef028=a15_0x1afdd4;return _0x2c8466['skillTemplate']?.[_0x5ef028(0x18a)]||'';}export function appendExtendContents(_0x3008b2,_0x194dbc,_0x206114){const _0x52d623=a15_0x1afdd4,_0x313f38=[];for(const [,_0x591108]of Object[_0x52d623(0x175)](_0x194dbc['guides'])){_0x591108['extendContent']&&_0x313f38[_0x52d623(0x18b)](_0x591108[_0x52d623(0x16f)]['trimEnd']());}if(_0x313f38[_0x52d623(0x189)]===0x0)return _0x3008b2;return _0x3008b2[_0x52d623(0x186)]()+'\x0a\x0a'+_0x313f38[_0x52d623(0x171)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x410553,_0x47d952,_0xcf9a76){const _0x5adc68=a15_0x1afdd4,_0x43beda=getSkillTemplate(_0x410553);if(!_0x43beda)throw new Error(_0x5adc68(0x180));const _0x4623db=dirname(_0x47d952);mkdirSync(_0x4623db,{'recursive':!![]});let _0x9d3ee3=_0x43beda[_0x5adc68(0x18d)](/\{\{IDE_NAME\}\}/g,_0xcf9a76);_0x9d3ee3=appendExtendContents(_0x9d3ee3,_0x410553),_0x410553[_0x5adc68(0x182)][_0x5adc68(0x181)]&&(_0x9d3ee3=appendUpdateTime(_0x9d3ee3,_0x410553[_0x5adc68(0x182)][_0x5adc68(0x181)])),writeFileSync(_0x47d952,_0x9d3ee3,'utf-8');}export async function installGuides(_0x97a128){const _0x5a1caa=a15_0x1afdd4,_0x34b303=await fetchGuidesFromCDN();return writeGuidesToProject(_0x34b303,_0x97a128),Object[_0x5a1caa(0x16d)](_0x34b303['guides'])[_0x5a1caa(0x189)];}export function getGuidesSummary(_0x210b91){const _0xbc10cc=a15_0x1afdd4;return Object[_0xbc10cc(0x175)](_0x210b91[_0xbc10cc(0x17c)])[_0xbc10cc(0x17b)](([_0x448277,_0x22e56d])=>({'key':_0x448277,'title':_0x22e56d[_0xbc10cc(0x17f)],'path':_0x22e56d['path']}));}
1
+ const a176_0x577b84=a176_0x5b75;(function(_0x1fc392,_0x19d3f1){const _0x5b4881=a176_0x5b75,_0x70f884=_0x1fc392();while(!![]){try{const _0x2d8450=-parseInt(_0x5b4881(0x13e))/0x1*(-parseInt(_0x5b4881(0x14c))/0x2)+-parseInt(_0x5b4881(0x13d))/0x3+-parseInt(_0x5b4881(0x14a))/0x4*(-parseInt(_0x5b4881(0x153))/0x5)+parseInt(_0x5b4881(0x156))/0x6+-parseInt(_0x5b4881(0x145))/0x7+-parseInt(_0x5b4881(0x148))/0x8*(-parseInt(_0x5b4881(0x140))/0x9)+-parseInt(_0x5b4881(0x14d))/0xa;if(_0x2d8450===_0x19d3f1)break;else _0x70f884['push'](_0x70f884['shift']());}catch(_0x2da065){_0x70f884['push'](_0x70f884['shift']());}}}(a176_0x52bc,0x4eeac));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x4f1514=a176_0x5b75,_0x45c4a3=getTemplateBaseUrl();return _0x45c4a3+_0x4f1514(0x152);}const CACHE_DIR=join(homedir(),a176_0x577b84(0x144),a176_0x577b84(0x138));export async function fetchGuidesFromCDN(){const _0x18e300=a176_0x577b84,_0x40e0d2=getGuidesCdnUrl(),_0x172921=await fetch(_0x40e0d2,{'headers':{'Accept':_0x18e300(0x157)}});if(!_0x172921['ok'])throw new Error(_0x18e300(0x14e)+_0x172921[_0x18e300(0x14f)]+'\x20'+_0x172921['statusText']);const _0x20f66c=await _0x172921[_0x18e300(0x143)]();if(!_0x20f66c['guides']||typeof _0x20f66c['guides']!==_0x18e300(0x14b))throw new Error(_0x18e300(0x142));return _0x20f66c;}export function writeGuidesToProject(_0xc2ea0f,_0x25ed58,_0x699f02=a176_0x577b84(0x151),_0x5dffc7){const _0x16f8a0=a176_0x577b84,_0x24200f=join(_0x25ed58,_0x699f02);mkdirSync(_0x24200f,{'recursive':!![]});for(const [_0x3b4ad7,_0x89e062]of Object[_0x16f8a0(0x150)](_0xc2ea0f[_0x16f8a0(0x141)])){let _0x265e27=_0x89e062[_0x16f8a0(0x13a)];_0x89e062[_0x16f8a0(0x149)]&&(_0x265e27=appendUpdateTime(_0x265e27,_0x89e062[_0x16f8a0(0x149)])),writeFileSync(join(_0x24200f,_0x3b4ad7+_0x16f8a0(0x13b)),_0x265e27,_0x16f8a0(0x13c));}}function a176_0x5b75(_0x2e8b12,_0x406f13){_0x2e8b12=_0x2e8b12-0x136;const _0x52bc34=a176_0x52bc();let _0x5b752b=_0x52bc34[_0x2e8b12];return _0x5b752b;}export function appendUpdateTime(_0x3fea9f,_0x570373){const _0x4ff885=a176_0x577b84;return _0x3fea9f=_0x3fea9f[_0x4ff885(0x13f)](/\n*>更新时间:.*$/m,''),_0x3fea9f['trimEnd']()+('\x0a\x0a>更新时间:'+_0x570373);}function a176_0x52bc(){const _0x3c4703=['join','map','345544DmTWxt','lastUpdated','16UXViEZ','object','26qriUQG','11072100UlKlBB','CDN\x20请求失败:\x20','status','entries','.lovrabet/skill/guides','/skills/guides.json','360300fpRAWh','skillTemplate','length','2364036ITsWdQ','application/json','trimEnd','extendContent','cache','push','content','.md','utf-8','40101hrzILp','39393uTgTvp','replace','117vcGPMl','guides','CDN\x20返回数据格式错误','json','.lovrabet','2184301uIAJEo'];a176_0x52bc=function(){return _0x3c4703;};return a176_0x52bc();}export function getSkillTemplate(_0x25715a){const _0x57ecd4=a176_0x577b84;return _0x25715a[_0x57ecd4(0x154)]?.[_0x57ecd4(0x13a)]||'';}export function appendExtendContents(_0x46d598,_0x2ea7b6,_0x3d8546){const _0x46c36d=a176_0x577b84,_0x5f2693=[];for(const [,_0x1de224]of Object[_0x46c36d(0x150)](_0x2ea7b6[_0x46c36d(0x141)])){_0x1de224[_0x46c36d(0x137)]&&_0x5f2693[_0x46c36d(0x139)](_0x1de224['extendContent'][_0x46c36d(0x136)]());}if(_0x5f2693[_0x46c36d(0x155)]===0x0)return _0x46d598;return _0x46d598[_0x46c36d(0x136)]()+'\x0a\x0a'+_0x5f2693[_0x46c36d(0x146)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x281f8a,_0x273ef8,_0x134ffe){const _0x1f8b9f=a176_0x577b84,_0x5044aa=getSkillTemplate(_0x281f8a);if(!_0x5044aa)throw new Error('CDN\x20数据中缺少\x20skillTemplate');const _0x309e4c=dirname(_0x273ef8);mkdirSync(_0x309e4c,{'recursive':!![]});let _0x5162fe=_0x5044aa[_0x1f8b9f(0x13f)](/\{\{IDE_NAME\}\}/g,_0x134ffe);_0x5162fe=appendExtendContents(_0x5162fe,_0x281f8a),_0x281f8a[_0x1f8b9f(0x154)]['lastUpdated']&&(_0x5162fe=appendUpdateTime(_0x5162fe,_0x281f8a['skillTemplate'][_0x1f8b9f(0x149)])),writeFileSync(_0x273ef8,_0x5162fe,'utf-8');}export async function installGuides(_0x99ef98){const _0x130058=a176_0x577b84,_0x35e65b=await fetchGuidesFromCDN();return writeGuidesToProject(_0x35e65b,_0x99ef98),Object['keys'](_0x35e65b[_0x130058(0x141)])[_0x130058(0x155)];}export function getGuidesSummary(_0x3e549a){const _0x3aa1c0=a176_0x577b84;return Object['entries'](_0x3e549a['guides'])[_0x3aa1c0(0x147)](([_0x370f14,_0x362a26])=>({'key':_0x370f14,'title':_0x362a26['title'],'path':_0x362a26['path']}));}
@@ -1 +1 @@
1
- (function(_0x16c3c4,_0x5a4ca5){const _0x439a40=a14_0x147d,_0x3a6817=_0x16c3c4();while(!![]){try{const _0x4454f5=-parseInt(_0x439a40(0x84))/0x1+-parseInt(_0x439a40(0x92))/0x2*(parseInt(_0x439a40(0x8b))/0x3)+-parseInt(_0x439a40(0x85))/0x4*(-parseInt(_0x439a40(0x8e))/0x5)+parseInt(_0x439a40(0x97))/0x6*(parseInt(_0x439a40(0x86))/0x7)+-parseInt(_0x439a40(0x87))/0x8+parseInt(_0x439a40(0x88))/0x9+parseInt(_0x439a40(0x8f))/0xa;if(_0x4454f5===_0x5a4ca5)break;else _0x3a6817['push'](_0x3a6817['shift']());}catch(_0x1e6108){_0x3a6817['push'](_0x3a6817['shift']());}}}(a14_0x4c84,0xbdb52));export async function httpRequest(_0x544815,_0x3e70e4={}){const _0x23fd55=a14_0x147d,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x3e70e4;let _0x784ebb=null;for(let _0x17d59a=0x0;_0x17d59a<=retries;_0x17d59a++){try{const _0x560109=new AbortController(),_0x5213b0=setTimeout(()=>_0x560109[_0x23fd55(0x9c)](),timeout),_0x58988a=await fetch(_0x544815,{'headers':headers,'signal':_0x560109[_0x23fd55(0x9a)]});clearTimeout(_0x5213b0);let _0x50e8be;const _0xaf1c8b=_0x58988a['headers'][_0x23fd55(0x83)]('content-type');return _0xaf1c8b?.[_0x23fd55(0x90)]('application/json')?_0x50e8be=await _0x58988a[_0x23fd55(0x94)]():_0x50e8be=await _0x58988a[_0x23fd55(0x9d)](),{'ok':_0x58988a['ok'],'status':_0x58988a['status'],'statusText':_0x58988a[_0x23fd55(0x98)],'data':_0x50e8be,'headers':_0x58988a[_0x23fd55(0x8c)],'url':_0x58988a[_0x23fd55(0x91)],'text':()=>_0x58988a[_0x23fd55(0x9d)]()};}catch(_0x123c8b){_0x784ebb=_0x123c8b instanceof Error?_0x123c8b:new Error(String(_0x123c8b));if(_0x17d59a===retries)break;if(shouldRetry(_0x123c8b)){console[_0x23fd55(0x95)]('*\x20请求失败,'+retryDelay+_0x23fd55(0x89)+(_0x17d59a+0x1)+_0x23fd55(0x9b)),await sleep(retryDelay);continue;}else break;}}throw _0x784ebb||new Error('Request\x20failed');}function a14_0x4c84(){const _0x4a9d87=['signal','\x20次重试...','abort','text','get','1085466yOnJVh','36IoJWyQ','1956493kbnSOg','9229072trRgCx','2563506WSVIEK','ms\x20后进行第\x20','name','12HDLPMj','headers','TypeError','788685bAcXDh','7386440wjvyya','includes','url','412232epCyhI','ECONNRESET','json','log','fetch','30zfrhZU','statusText','message'];a14_0x4c84=function(){return _0x4a9d87;};return a14_0x4c84();}function a14_0x147d(_0x39ab7f,_0x5306e0){_0x39ab7f=_0x39ab7f-0x83;const _0x4c849d=a14_0x4c84();let _0x147d01=_0x4c849d[_0x39ab7f];return _0x147d01;}function shouldRetry(_0x140e43){const _0x484d3d=a14_0x147d;if(_0x140e43 instanceof Error){if(_0x140e43[_0x484d3d(0x8a)]==='AbortError')return![];if(_0x140e43[_0x484d3d(0x8a)]===_0x484d3d(0x8d)&&_0x140e43[_0x484d3d(0x99)][_0x484d3d(0x90)](_0x484d3d(0x96)))return!![];if(_0x140e43['message']['includes'](_0x484d3d(0x93)))return!![];if(_0x140e43[_0x484d3d(0x99)][_0x484d3d(0x90)]('ENOTFOUND'))return![];}return![];}function sleep(_0x48c408){return new Promise(_0x13458f=>setTimeout(_0x13458f,_0x48c408));}export function validateUrl(_0x36bd76){try{return new URL(_0x36bd76),!![];}catch{return![];}}
1
+ function a177_0x3249(_0x444f4e,_0x27de77){_0x444f4e=_0x444f4e-0xd2;const _0x119640=a177_0x1196();let _0x3249a1=_0x119640[_0x444f4e];return _0x3249a1;}(function(_0x27655e,_0x46e323){const _0x56dfea=a177_0x3249,_0x21ac8b=_0x27655e();while(!![]){try{const _0x118ed5=parseInt(_0x56dfea(0xe8))/0x1*(parseInt(_0x56dfea(0xe5))/0x2)+-parseInt(_0x56dfea(0xeb))/0x3*(-parseInt(_0x56dfea(0xdd))/0x4)+-parseInt(_0x56dfea(0xd2))/0x5+-parseInt(_0x56dfea(0xd9))/0x6+-parseInt(_0x56dfea(0xe2))/0x7*(-parseInt(_0x56dfea(0xd8))/0x8)+-parseInt(_0x56dfea(0xe6))/0x9*(-parseInt(_0x56dfea(0xea))/0xa)+parseInt(_0x56dfea(0xe7))/0xb*(parseInt(_0x56dfea(0xe1))/0xc);if(_0x118ed5===_0x46e323)break;else _0x21ac8b['push'](_0x21ac8b['shift']());}catch(_0x76dafe){_0x21ac8b['push'](_0x21ac8b['shift']());}}}(a177_0x1196,0xa9492));export async function httpRequest(_0x2ad7a2,_0x335147={}){const _0x2401f0=a177_0x3249,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x335147;let _0x296840=null;for(let _0x222fe2=0x0;_0x222fe2<=retries;_0x222fe2++){try{const _0x59f4d4=new AbortController(),_0xc642ba=setTimeout(()=>_0x59f4d4[_0x2401f0(0xee)](),timeout),_0x393bcb=await fetch(_0x2ad7a2,{'headers':headers,'signal':_0x59f4d4[_0x2401f0(0xd5)]});clearTimeout(_0xc642ba);let _0x91308d;const _0x4a367a=_0x393bcb[_0x2401f0(0xd6)][_0x2401f0(0xef)](_0x2401f0(0xdb));return _0x4a367a?.[_0x2401f0(0xe9)](_0x2401f0(0xe4))?_0x91308d=await _0x393bcb[_0x2401f0(0xd4)]():_0x91308d=await _0x393bcb[_0x2401f0(0xdc)](),{'ok':_0x393bcb['ok'],'status':_0x393bcb[_0x2401f0(0xd3)],'statusText':_0x393bcb[_0x2401f0(0xe3)],'data':_0x91308d,'headers':_0x393bcb['headers'],'url':_0x393bcb[_0x2401f0(0xed)],'text':()=>_0x393bcb[_0x2401f0(0xdc)]()};}catch(_0x7167a1){_0x296840=_0x7167a1 instanceof Error?_0x7167a1:new Error(String(_0x7167a1));if(_0x222fe2===retries)break;if(shouldRetry(_0x7167a1)){console['log']('*\x20请求失败,'+retryDelay+_0x2401f0(0xec)+(_0x222fe2+0x1)+_0x2401f0(0xdf)),await sleep(retryDelay);continue;}else break;}}throw _0x296840||new Error('Request\x20failed');}function shouldRetry(_0x57e8ab){const _0x579505=a177_0x3249;if(_0x57e8ab instanceof Error){if(_0x57e8ab[_0x579505(0xde)]===_0x579505(0xda))return![];if(_0x57e8ab[_0x579505(0xde)]===_0x579505(0xd7)&&_0x57e8ab[_0x579505(0xe0)][_0x579505(0xe9)]('fetch'))return!![];if(_0x57e8ab[_0x579505(0xe0)][_0x579505(0xe9)]('ECONNRESET'))return!![];if(_0x57e8ab[_0x579505(0xe0)][_0x579505(0xe9)]('ENOTFOUND'))return![];}return![];}function sleep(_0x4eb613){return new Promise(_0x4429b8=>setTimeout(_0x4429b8,_0x4eb613));}function a177_0x1196(){const _0x51da16=['url','abort','get','6169830HuyErR','status','json','signal','headers','TypeError','245864uqtQjg','3769008BGuZHo','AbortError','content-type','text','70496EBhCJK','name','\x20次重试...','message','519348gtNCLk','189yFOXZc','statusText','application/json','8nvrtnv','133596RpxyWC','341IESmZh','23900MXYHkj','includes','40uvTVLJ','39Xqpzgk','ms\x20后进行第\x20'];a177_0x1196=function(){return _0x51da16;};return a177_0x1196();}export function validateUrl(_0x141a0c){try{return new URL(_0x141a0c),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x2da442,_0x3d16e3){const _0x10f91d=a3_0x1d53,_0x199b27=_0x2da442();while(!![]){try{const _0x5224fc=parseInt(_0x10f91d(0xea))/0x1*(parseInt(_0x10f91d(0xe5))/0x2)+parseInt(_0x10f91d(0xde))/0x3*(parseInt(_0x10f91d(0xe1))/0x4)+parseInt(_0x10f91d(0xe3))/0x5*(parseInt(_0x10f91d(0xe9))/0x6)+-parseInt(_0x10f91d(0xe6))/0x7*(-parseInt(_0x10f91d(0xe7))/0x8)+-parseInt(_0x10f91d(0xeb))/0x9+-parseInt(_0x10f91d(0xdd))/0xa+-parseInt(_0x10f91d(0xe0))/0xb*(parseInt(_0x10f91d(0xdb))/0xc);if(_0x5224fc===_0x3d16e3)break;else _0x199b27['push'](_0x199b27['shift']());}catch(_0x13c047){_0x199b27['push'](_0x199b27['shift']());}}}(a3_0xee65,0xc6dcf));function a3_0x1d53(_0x5b0aad,_0x4596c4){_0x5b0aad=_0x5b0aad-0xdb;const _0xee6547=a3_0xee65();let _0x1d533b=_0xee6547[_0x5b0aad];return _0x1d533b;}function a3_0xee65(){const _0x3027a5=['4qUGpth','108591fEljjG','8kdAfpy','isRaw','127038bFgLtx','594827zrOkTp','11230425kBvzFP','931128YUUcpR','true','1844900hZGvSC','3mqBJJj','setRawMode','143XtqNBS','4983356bOUySq','stdin','190oOfKiL','stdout'];a3_0xee65=function(){return _0x3027a5;};return a3_0xee65();}function env(_0x23bd54){return process.env[`RABETBASE_${_0x23bd54}`]||process.env[`LOVRABET_${_0x23bd54}`]||undefined;}export function isNonInteractive(_0x1676e7){const _0x111596=a3_0x1d53;return!!(_0x1676e7['nonInteractive']||_0x1676e7['ci']||env('CI')===_0x111596(0xdc)||process.env.CI==='true'||!process[_0x111596(0xe4)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x577e97=a3_0x1d53;if(!process[_0x577e97(0xe2)]['isTTY'])return![];try{const _0x1e91d1=process[_0x577e97(0xe2)][_0x577e97(0xe8)];return process['stdin']['setRawMode'](!![]),process[_0x577e97(0xe2)][_0x577e97(0xdf)](_0x1e91d1??![]),!![];}catch{return![];}}
1
+ (function(_0x582e30,_0x42aa74){const _0x11760f=a178_0x4ecb,_0x338296=_0x582e30();while(!![]){try{const _0x16b902=parseInt(_0x11760f(0x19c))/0x1+-parseInt(_0x11760f(0x198))/0x2*(-parseInt(_0x11760f(0x197))/0x3)+parseInt(_0x11760f(0x19b))/0x4+-parseInt(_0x11760f(0x199))/0x5*(-parseInt(_0x11760f(0x192))/0x6)+-parseInt(_0x11760f(0x195))/0x7+parseInt(_0x11760f(0x196))/0x8*(-parseInt(_0x11760f(0x19d))/0x9)+-parseInt(_0x11760f(0x191))/0xa;if(_0x16b902===_0x42aa74)break;else _0x338296['push'](_0x338296['shift']());}catch(_0x2a59e6){_0x338296['push'](_0x338296['shift']());}}}(a178_0x22d9,0x64a7b));function env(_0x4c8330){return process.env[`RABETBASE_${_0x4c8330}`]||process.env[`LOVRABET_${_0x4c8330}`]||undefined;}export function isNonInteractive(_0xb5ccf4){const _0x138997=a178_0x4ecb;return!!(_0xb5ccf4['nonInteractive']||_0xb5ccf4['ci']||env('CI')===_0x138997(0x19a)||process.env.CI==='true'||!process[_0x138997(0x194)][_0x138997(0x19e)]||!isStdinRawModeSupported());}function a178_0x22d9(){const _0x3d239e=['isTTY','15396980aaOrnQ','229380NVxHZv','stdin','stdout','1239280PuzsVN','464gtbGrG','15CwhOOX','289816VBuVNf','25FFcwEI','true','2863296DGFtQT','743485XjkToH','38169YOowII'];a178_0x22d9=function(){return _0x3d239e;};return a178_0x22d9();}function a178_0x4ecb(_0x475915,_0x29b56b){_0x475915=_0x475915-0x191;const _0x22d919=a178_0x22d9();let _0x4ecbc0=_0x22d919[_0x475915];return _0x4ecbc0;}function isStdinRawModeSupported(){const _0x48887c=a178_0x4ecb;if(!process[_0x48887c(0x193)]['isTTY'])return![];try{const _0x3e6b59=process[_0x48887c(0x193)]['isRaw'];return process[_0x48887c(0x193)]['setRawMode'](!![]),process[_0x48887c(0x193)]['setRawMode'](_0x3e6b59??![]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- const a2_0x251168=a2_0x1f8e;function a2_0x1f8e(_0x1a5977,_0x507fcc){_0x1a5977=_0x1a5977-0xcc;const _0x559a5f=a2_0x559a();let _0x1f8e90=_0x559a5f[_0x1a5977];return _0x1f8e90;}function a2_0x559a(){const _0x2e0105=['.lovrabet.log','existsSync','filter','File','clearLogs','readLogs','7038102DJUHIJ','timestamp','level','utf8','combine','6rQtHPi','createLogger','dirname','details','rawCommand','duration','trim','transports','green','winstonLogger','now','errors','format','stringify','message','585456CdiuuH','log','toISOString','1841938bAMRYX','initWinstonLogger','readFileSync','4994355IrAWAo','开始执行:\x20','warn','red','2313584LFEvJC','join','logFilePath','error','失败:\x20','info','command','currentRawCommand','split','yellow','success','Failed\x20to\x20read\x20logs:','setRawCommand','getWinstonInstance','8qmcIof','完成:\x20','blue','192380tOzGUy','writeFileSync','printf','9GdxPec','parse','mkdirSync','3889850rqAoeR'];a2_0x559a=function(){return _0x2e0105;};return a2_0x559a();}(function(_0xa00063,_0x2c2196){const _0x4a14b1=a2_0x1f8e,_0x24da6e=_0xa00063();while(!![]){try{const _0x360690=-parseInt(_0x4a14b1(0xfc))/0x1+parseInt(_0x4a14b1(0xe1))/0x2*(-parseInt(_0x4a14b1(0xd2))/0x3)+parseInt(_0x4a14b1(0xeb))/0x4+-parseInt(_0x4a14b1(0xe7))/0x5+parseInt(_0x4a14b1(0xcd))/0x6+-parseInt(_0x4a14b1(0xe4))/0x7*(-parseInt(_0x4a14b1(0xf9))/0x8)+parseInt(_0x4a14b1(0xff))/0x9*(parseInt(_0x4a14b1(0x102))/0xa);if(_0x360690===_0x2c2196)break;else _0x24da6e['push'](_0x24da6e['shift']());}catch(_0x1caee8){_0x24da6e['push'](_0x24da6e['shift']());}}}(a2_0x559a,0x99089));import a2_0x53e98d from'winston';import a2_0x51c630 from'node:fs';import a2_0x34df1d from'node:path';class Logger{[a2_0x251168(0xdb)];[a2_0x251168(0xed)];[a2_0x251168(0xf2)]='';constructor(){const _0x24da26=a2_0x251168;this[_0x24da26(0xed)]='';}[a2_0x251168(0xf7)](_0x28a78e){const _0x185bbd=a2_0x251168;this[_0x185bbd(0xf2)]=_0x28a78e;}[a2_0x251168(0xe5)](){const _0x53eb9c=a2_0x251168,_0x3fa7c4=a2_0x34df1d[_0x53eb9c(0xd4)](this[_0x53eb9c(0xed)]);!a2_0x51c630[_0x53eb9c(0x104)](_0x3fa7c4)&&a2_0x51c630[_0x53eb9c(0x101)](_0x3fa7c4,{'recursive':!![]});const _0x422909=a2_0x53e98d[_0x53eb9c(0xde)][_0x53eb9c(0xd1)](a2_0x53e98d[_0x53eb9c(0xde)][_0x53eb9c(0xce)](),a2_0x53e98d[_0x53eb9c(0xde)][_0x53eb9c(0xdd)]({'stack':!![]}),a2_0x53e98d['format'][_0x53eb9c(0xfe)](_0x4057e9=>{const _0x518e05=_0x53eb9c,_0x22e200={'timestamp':_0x4057e9[_0x518e05(0xce)]||new Date()[_0x518e05(0xe3)](),'level':_0x4057e9[_0x518e05(0xcf)]||'info','command':_0x4057e9[_0x518e05(0xf1)]||'unknown','rawCommand':_0x4057e9[_0x518e05(0xd6)]||this[_0x518e05(0xf2)]||undefined,'message':_0x4057e9[_0x518e05(0xe0)]||'','duration':_0x4057e9[_0x518e05(0xd7)]||undefined,'details':_0x4057e9[_0x518e05(0xd5)]||undefined};return JSON[_0x518e05(0xdf)](_0x22e200);}));this[_0x53eb9c(0xdb)]=a2_0x53e98d[_0x53eb9c(0xd3)]({'level':'info','format':_0x422909,'transports':[new a2_0x53e98d[(_0x53eb9c(0xd9))][(_0x53eb9c(0x106))]({'filename':this[_0x53eb9c(0xed)],'level':_0x53eb9c(0xf0)})],'silent':![]}),a2_0x53e98d['addColors']({'success':_0x53eb9c(0xda),'error':_0x53eb9c(0xea),'warn':_0x53eb9c(0xf4),'info':_0x53eb9c(0xfb)});}['setLogPath'](_0x113a00){const _0x4de74f=a2_0x251168;this[_0x4de74f(0xed)]=a2_0x34df1d[_0x4de74f(0xec)](_0x113a00,_0x4de74f(0x103)),this[_0x4de74f(0xdb)]&&this[_0x4de74f(0xdb)]['clear'](),this[_0x4de74f(0xe5)]();}[a2_0x251168(0xf0)](_0x4c4003,_0x18b2f2,_0x417f5a){const _0x581d4d=a2_0x251168;if(!this[_0x581d4d(0xed)]||!this['winstonLogger'])return;this[_0x581d4d(0xdb)]['info'](_0x18b2f2,{'command':_0x4c4003,'details':_0x417f5a});}['success'](_0x52ebf5,_0x4e194b,_0x3f18a1,_0xdc8807){const _0x3220e8=a2_0x251168;if(!this[_0x3220e8(0xed)]||!this[_0x3220e8(0xdb)])return;this[_0x3220e8(0xdb)][_0x3220e8(0xe2)]('info',_0x4e194b,{'level':_0x3220e8(0xf5),'command':_0x52ebf5,'duration':_0x3f18a1,'details':_0xdc8807});}[a2_0x251168(0xee)](_0x5c049c,_0x29e370,_0x10c79d){const _0x1878f9=a2_0x251168;if(!this[_0x1878f9(0xed)]||!this[_0x1878f9(0xdb)])return;this['winstonLogger'][_0x1878f9(0xee)](_0x29e370,{'command':_0x5c049c,'details':_0x10c79d});}[a2_0x251168(0xe9)](_0x2202a6,_0x331454,_0x294c53){const _0x45f4bd=a2_0x251168;if(!this[_0x45f4bd(0xed)]||!this['winstonLogger'])return;this['winstonLogger'][_0x45f4bd(0xe9)](_0x331454,{'command':_0x2202a6,'details':_0x294c53});}async['logTask'](_0x158671,_0x18335c,_0x38373b){const _0x2519ce=a2_0x251168,_0x3c1d2d=Date[_0x2519ce(0xdc)]();this[_0x2519ce(0xf0)](_0x158671,_0x2519ce(0xe8)+_0x18335c);try{const _0x25a0b0=await _0x38373b(),_0x3ed534=Date[_0x2519ce(0xdc)]()-_0x3c1d2d;return this[_0x2519ce(0xf5)](_0x158671,_0x2519ce(0xfa)+_0x18335c,_0x3ed534),_0x25a0b0;}catch(_0x28998e){const _0x518b5e=Date[_0x2519ce(0xdc)]()-_0x3c1d2d;this['error'](_0x158671,_0x2519ce(0xef)+_0x18335c,{'error':_0x28998e instanceof Error?_0x28998e[_0x2519ce(0xe0)]:String(_0x28998e),'duration':_0x518b5e});throw _0x28998e;}}[a2_0x251168(0xcc)](){const _0x2c7315=a2_0x251168;try{if(!a2_0x51c630['existsSync'](this[_0x2c7315(0xed)]))return[];const _0x4b3852=a2_0x51c630[_0x2c7315(0xe6)](this[_0x2c7315(0xed)],_0x2c7315(0xd0));return _0x4b3852[_0x2c7315(0xf3)]('\x0a')[_0x2c7315(0x105)](_0xd7b06d=>_0xd7b06d[_0x2c7315(0xd8)]())['map'](_0xc79653=>JSON[_0x2c7315(0x100)](_0xc79653));}catch(_0x40a644){return console[_0x2c7315(0xe9)](_0x2c7315(0xf6),_0x40a644),[];}}[a2_0x251168(0x107)](){const _0x3c5292=a2_0x251168;try{a2_0x51c630[_0x3c5292(0x104)](this[_0x3c5292(0xed)])&&a2_0x51c630[_0x3c5292(0xfd)](this[_0x3c5292(0xed)],'',_0x3c5292(0xd0));}catch(_0x20c021){console['warn']('Failed\x20to\x20clear\x20logs:',_0x20c021);}}[a2_0x251168(0xf8)](){const _0x15e7ac=a2_0x251168;return this[_0x15e7ac(0xdb)];}}export const logger=new Logger();
1
+ const a179_0x5d6e10=a179_0x14c5;(function(_0x44ee0e,_0x209ded){const _0x268309=a179_0x14c5,_0xc85693=_0x44ee0e();while(!![]){try{const _0x373447=parseInt(_0x268309(0x112))/0x1+parseInt(_0x268309(0x10e))/0x2+-parseInt(_0x268309(0x11f))/0x3*(-parseInt(_0x268309(0x113))/0x4)+parseInt(_0x268309(0x11b))/0x5*(-parseInt(_0x268309(0x10f))/0x6)+-parseInt(_0x268309(0xfd))/0x7*(parseInt(_0x268309(0x100))/0x8)+parseInt(_0x268309(0xf6))/0x9+-parseInt(_0x268309(0x105))/0xa;if(_0x373447===_0x209ded)break;else _0xc85693['push'](_0xc85693['shift']());}catch(_0x5cf186){_0xc85693['push'](_0xc85693['shift']());}}}(a179_0x5e4c,0xace08));import a179_0x2f8a96 from'winston';import a179_0x11ab31 from'node:fs';function a179_0x14c5(_0x3c0f4a,_0x5d7077){_0x3c0f4a=_0x3c0f4a-0xf4;const _0x5e4ceb=a179_0x5e4c();let _0x14c5ee=_0x5e4ceb[_0x3c0f4a];return _0x14c5ee;}import a179_0x325aaf from'node:path';class Logger{['winstonLogger'];[a179_0x5d6e10(0x11e)];[a179_0x5d6e10(0x104)]='';constructor(){this['logFilePath']='';}['setRawCommand'](_0x1d3c2e){const _0x4e4d7f=a179_0x5d6e10;this[_0x4e4d7f(0x104)]=_0x1d3c2e;}[a179_0x5d6e10(0x117)](){const _0x2ba913=a179_0x5d6e10,_0x338fe6=a179_0x325aaf[_0x2ba913(0x120)](this[_0x2ba913(0x11e)]);!a179_0x11ab31['existsSync'](_0x338fe6)&&a179_0x11ab31[_0x2ba913(0x119)](_0x338fe6,{'recursive':!![]});const _0x5a8da4=a179_0x2f8a96[_0x2ba913(0x11d)]['combine'](a179_0x2f8a96['format']['timestamp'](),a179_0x2f8a96['format']['errors']({'stack':!![]}),a179_0x2f8a96['format'][_0x2ba913(0x125)](_0x128a13=>{const _0xbb8e44=_0x2ba913,_0x4fd9a2={'timestamp':_0x128a13[_0xbb8e44(0x110)]||new Date()[_0xbb8e44(0xf4)](),'level':_0x128a13[_0xbb8e44(0x101)]||_0xbb8e44(0x122),'command':_0x128a13['command']||'unknown','rawCommand':_0x128a13['rawCommand']||this[_0xbb8e44(0x104)]||undefined,'message':_0x128a13['message']||'','duration':_0x128a13[_0xbb8e44(0x127)]||undefined,'details':_0x128a13[_0xbb8e44(0x126)]||undefined};return JSON['stringify'](_0x4fd9a2);}));this[_0x2ba913(0x111)]=a179_0x2f8a96[_0x2ba913(0x10b)]({'level':_0x2ba913(0x122),'format':_0x5a8da4,'transports':[new a179_0x2f8a96[(_0x2ba913(0x10d))][(_0x2ba913(0x103))]({'filename':this[_0x2ba913(0x11e)],'level':_0x2ba913(0x122)})],'silent':![]}),a179_0x2f8a96[_0x2ba913(0x106)]({'success':_0x2ba913(0x10a),'error':_0x2ba913(0x102),'warn':_0x2ba913(0xfa),'info':_0x2ba913(0x118)});}[a179_0x5d6e10(0x121)](_0x3761bf){const _0x1dddc6=a179_0x5d6e10;this['logFilePath']=a179_0x325aaf[_0x1dddc6(0x124)](_0x3761bf,_0x1dddc6(0xf7)),this[_0x1dddc6(0x111)]&&this[_0x1dddc6(0x111)][_0x1dddc6(0xfb)](),this[_0x1dddc6(0x117)]();}[a179_0x5d6e10(0x122)](_0x4ca4ec,_0x3eb613,_0x3a690f){const _0x5766ae=a179_0x5d6e10;if(!this['logFilePath']||!this[_0x5766ae(0x111)])return;this[_0x5766ae(0x111)][_0x5766ae(0x122)](_0x3eb613,{'command':_0x4ca4ec,'details':_0x3a690f});}[a179_0x5d6e10(0x115)](_0x4d9334,_0x277b15,_0x1dcbbf,_0x2f6881){const _0x166df2=a179_0x5d6e10;if(!this[_0x166df2(0x11e)]||!this[_0x166df2(0x111)])return;this[_0x166df2(0x111)]['log'](_0x166df2(0x122),_0x277b15,{'level':'success','command':_0x4d9334,'duration':_0x1dcbbf,'details':_0x2f6881});}[a179_0x5d6e10(0xfe)](_0x2fc751,_0x26cecb,_0x5aeab5){const _0x29ebaa=a179_0x5d6e10;if(!this['logFilePath']||!this[_0x29ebaa(0x111)])return;this[_0x29ebaa(0x111)]['error'](_0x26cecb,{'command':_0x2fc751,'details':_0x5aeab5});}['warn'](_0x193cb5,_0x5d31ab,_0x516f2a){const _0x33cc63=a179_0x5d6e10;if(!this['logFilePath']||!this[_0x33cc63(0x111)])return;this[_0x33cc63(0x111)][_0x33cc63(0x109)](_0x5d31ab,{'command':_0x193cb5,'details':_0x516f2a});}async['logTask'](_0x4a80e9,_0x41325a,_0x1d6f0a){const _0xa8eb6c=a179_0x5d6e10,_0x3853a9=Date['now']();this['info'](_0x4a80e9,_0xa8eb6c(0xf5)+_0x41325a);try{const _0x2a7bb2=await _0x1d6f0a(),_0x46d950=Date['now']()-_0x3853a9;return this[_0xa8eb6c(0x115)](_0x4a80e9,'完成:\x20'+_0x41325a,_0x46d950),_0x2a7bb2;}catch(_0x55dbdc){const _0x3b2af1=Date['now']()-_0x3853a9;this[_0xa8eb6c(0xfe)](_0x4a80e9,_0xa8eb6c(0xf9)+_0x41325a,{'error':_0x55dbdc instanceof Error?_0x55dbdc['message']:String(_0x55dbdc),'duration':_0x3b2af1});throw _0x55dbdc;}}[a179_0x5d6e10(0x10c)](){const _0x1bbbe6=a179_0x5d6e10;try{if(!a179_0x11ab31[_0x1bbbe6(0x116)](this[_0x1bbbe6(0x11e)]))return[];const _0x2f8e85=a179_0x11ab31[_0x1bbbe6(0x11c)](this['logFilePath'],'utf8');return _0x2f8e85[_0x1bbbe6(0xf8)]('\x0a')['filter'](_0x2c12a7=>_0x2c12a7[_0x1bbbe6(0x123)]())['map'](_0x58f315=>JSON[_0x1bbbe6(0x107)](_0x58f315));}catch(_0x471d6a){return console[_0x1bbbe6(0x109)]('Failed\x20to\x20read\x20logs:',_0x471d6a),[];}}[a179_0x5d6e10(0x114)](){const _0x6234fe=a179_0x5d6e10;try{a179_0x11ab31[_0x6234fe(0x116)](this[_0x6234fe(0x11e)])&&a179_0x11ab31[_0x6234fe(0x11a)](this[_0x6234fe(0x11e)],'',_0x6234fe(0xff));}catch(_0x4a4d53){console['warn'](_0x6234fe(0x108),_0x4a4d53);}}[a179_0x5d6e10(0xfc)](){const _0x42ce31=a179_0x5d6e10;return this[_0x42ce31(0x111)];}}function a179_0x5e4c(){const _0x5b18e5=['addColors','parse','Failed\x20to\x20clear\x20logs:','warn','green','createLogger','readLogs','transports','1159430FMWzhl','1796712byQyGX','timestamp','winstonLogger','1368750MkXtpu','8948IoWXkm','clearLogs','success','existsSync','initWinstonLogger','blue','mkdirSync','writeFileSync','10beKfzs','readFileSync','format','logFilePath','714WfNzyD','dirname','setLogPath','info','trim','join','printf','details','duration','toISOString','开始执行:\x20','12494646RBawiC','.lovrabet.log','split','失败:\x20','yellow','clear','getWinstonInstance','49QLxtzZ','error','utf8','1090568DWeARa','level','red','File','currentRawCommand','16079100yzJKbH'];a179_0x5e4c=function(){return _0x5b18e5;};return a179_0x5e4c();}export const logger=new Logger();
@@ -1 +1 @@
1
- function a17_0x30e7(){const _0xa23a28=['4sluxlp','3276175aCxKMH','875724jIdzDm','10XuZWqy','.cmd','6949646idivzJ','platform','756488PauTRP','6iVwlYL','81924NtahZK','win32','2964159mFyQzm','682900TEGwTe','15txhlgG'];a17_0x30e7=function(){return _0xa23a28;};return a17_0x30e7();}const a17_0x583ac8=a17_0x4124;(function(_0x28637a,_0xbabd9f){const _0x329044=a17_0x4124,_0x117833=_0x28637a();while(!![]){try{const _0x2da024=-parseInt(_0x329044(0x1dc))/0x1*(-parseInt(_0x329044(0x1e1))/0x2)+-parseInt(_0x329044(0x1d5))/0x3+-parseInt(_0x329044(0x1df))/0x4*(-parseInt(_0x329044(0x1e0))/0x5)+parseInt(_0x329044(0x1db))/0x6*(-parseInt(_0x329044(0x1e2))/0x7)+parseInt(_0x329044(0x1da))/0x8+parseInt(_0x329044(0x1de))/0x9*(-parseInt(_0x329044(0x1d6))/0xa)+parseInt(_0x329044(0x1d8))/0xb;if(_0x2da024===_0xbabd9f)break;else _0x117833['push'](_0x117833['shift']());}catch(_0x5069ef){_0x117833['push'](_0x117833['shift']());}}}(a17_0x30e7,0x4c6fe));function a17_0x4124(_0x2a7847,_0xddc59b){_0x2a7847=_0x2a7847-0x1d5;const _0x30e748=a17_0x30e7();let _0x4124e6=_0x30e748[_0x2a7847];return _0x4124e6;}export const isWindows=process[a17_0x583ac8(0x1d9)]===a17_0x583ac8(0x1dd);export function resolveNpmBin(_0x36ddc2){const _0x504619=a17_0x583ac8;return isWindows?_0x36ddc2+_0x504619(0x1d7):_0x36ddc2;}
1
+ const a180_0x4e8fd5=a180_0x3548;function a180_0x5188(){const _0x390272=['60SbESWw','856TUPLNL','1075228jgVdrJ','8615zApHRk','platform','1698VIhnKg','242eGsBCh','3023308mwELTD','.cmd','4946778RChrus','11858cvqEXI','win32','2386mOXxJx','345240mVOIdp'];a180_0x5188=function(){return _0x390272;};return a180_0x5188();}(function(_0x54ddf9,_0x4bd7ab){const _0x42f52c=a180_0x3548,_0xf043e8=_0x54ddf9();while(!![]){try{const _0x2ef64f=-parseInt(_0x42f52c(0xdb))/0x1*(parseInt(_0x42f52c(0xe3))/0x2)+parseInt(_0x42f52c(0xe6))/0x3+-parseInt(_0x42f52c(0xe4))/0x4+parseInt(_0x42f52c(0xe0))/0x5*(-parseInt(_0x42f52c(0xe2))/0x6)+-parseInt(_0x42f52c(0xe7))/0x7*(-parseInt(_0x42f52c(0xde))/0x8)+-parseInt(_0x42f52c(0xdc))/0x9+parseInt(_0x42f52c(0xdd))/0xa*(parseInt(_0x42f52c(0xdf))/0xb);if(_0x2ef64f===_0x4bd7ab)break;else _0xf043e8['push'](_0xf043e8['shift']());}catch(_0x134751){_0xf043e8['push'](_0xf043e8['shift']());}}}(a180_0x5188,0xce95a));export const isWindows=process[a180_0x4e8fd5(0xe1)]===a180_0x4e8fd5(0xda);function a180_0x3548(_0x4aab56,_0x36b02c){_0x4aab56=_0x4aab56-0xda;const _0x5188ae=a180_0x5188();let _0x35483a=_0x5188ae[_0x4aab56];return _0x35483a;}export function resolveNpmBin(_0x15f5aa){const _0x3df97a=a180_0x4e8fd5;return isWindows?_0x15f5aa+_0x3df97a(0xe5):_0x15f5aa;}
@@ -1 +1 @@
1
- (function(_0x55fe5f,_0x3ea5b9){const _0x32dd72=a19_0x3d94,_0x22ab94=_0x55fe5f();while(!![]){try{const _0x516249=parseInt(_0x32dd72(0x1e5))/0x1*(-parseInt(_0x32dd72(0x1e6))/0x2)+-parseInt(_0x32dd72(0x1e3))/0x3+parseInt(_0x32dd72(0x1e7))/0x4+parseInt(_0x32dd72(0x1e8))/0x5*(parseInt(_0x32dd72(0x1da))/0x6)+parseInt(_0x32dd72(0x1db))/0x7*(-parseInt(_0x32dd72(0x1dd))/0x8)+-parseInt(_0x32dd72(0x1f0))/0x9*(parseInt(_0x32dd72(0x1ed))/0xa)+parseInt(_0x32dd72(0x1e4))/0xb*(parseInt(_0x32dd72(0x1f1))/0xc);if(_0x516249===_0x3ea5b9)break;else _0x22ab94['push'](_0x22ab94['shift']());}catch(_0x121632){_0x22ab94['push'](_0x22ab94['shift']());}}}(a19_0x3b73,0x18ae1));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x3e9764=a19_0x3d94,_0x4b5de9=getTemplateBaseUrl();return _0x4b5de9+_0x3e9764(0x1de);}function a19_0x3d94(_0x23e7d6,_0x24ee9e){_0x23e7d6=_0x23e7d6-0x1da;const _0x3b7334=a19_0x3b73();let _0x3d9435=_0x3b7334[_0x23e7d6];return _0x3d9435;}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0x432442=a19_0x3d94,_0x1c68e3=getRulesCdnUrl(),_0x229ac5=await fetch(_0x1c68e3,{'headers':{'Accept':'application/json'}});if(!_0x229ac5['ok'])throw new Error(_0x432442(0x1dc)+_0x229ac5[_0x432442(0x1eb)]+'\x20'+_0x229ac5[_0x432442(0x1ee)]);const _0xdbfedf=await _0x229ac5['json']();if(!_0xdbfedf[_0x432442(0x1e9)]||typeof _0xdbfedf['content']!=='string')throw new Error(_0x432442(0x1e0));return _0xdbfedf;}function a19_0x3b73(){const _0x56f28c=['773144BhMTZt','/rules/rules.json','catch','CDN\x20返回数据格式错误','lovrabet_rules.mdc','lastUpdated','477117eSMqtP','60467nGDtxU','12527oTAdMT','2vqDtNu','470132TkZOCc','55405yBoKhX','content','utf-8','status','本地模板文件不存在:\x20','80KdMVKs','statusText','agents.md','206289VcvsNB','708EdQCXC','60bRfwtp','7MgzpSX','CDN\x20请求失败:\x20'];a19_0x3b73=function(){return _0x56f28c;};return a19_0x3b73();}export async function getRulesContent(){const _0x4b19ad=a19_0x3d94;try{const _0x2b2305=await fetchRulesFromCDN();return _0x2b2305[_0x4b19ad(0x1e9)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x50cb9f=a19_0x3d94;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x50cb9f(0x1ea));throw new Error(_0x50cb9f(0x1ec)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x1ebaed){const _0x449bdc=a19_0x3d94,_0x455c5=await fetchRulesFromCDN()[_0x449bdc(0x1df)](()=>null);let _0x119170;_0x455c5?(_0x119170=_0x455c5[_0x449bdc(0x1e9)],_0x455c5[_0x449bdc(0x1e2)]&&(_0x119170=appendUpdateTime(_0x119170,_0x455c5[_0x449bdc(0x1e2)]))):_0x119170=readLocalTemplate();const _0x300f3d=dirname(_0x1ebaed);!existsSync(_0x300f3d)&&mkdirSync(_0x300f3d,{'recursive':!![]}),writeFileSync(_0x1ebaed,_0x119170,_0x449bdc(0x1ea));}export async function copyRulesToCursor(_0x27279c){const _0xf116f5=a19_0x3d94,_0x4dc37b=join(_0x27279c,'.cursor/rules'),_0x529b86=join(_0x4dc37b,_0xf116f5(0x1e1));if(existsSync(_0x529b86))return![];return await writeRulesFile(_0x529b86),!![];}export async function copyRulesToAgentsMd(_0x995cd7){const _0x10bbbf=a19_0x3d94,_0x1dc519=join(_0x995cd7,_0x10bbbf(0x1ef));if(existsSync(_0x1dc519))return![];return await writeRulesFile(_0x1dc519),!![];}
1
+ const a181_0x3bd4dc=a181_0x2b00;(function(_0x126b45,_0x2e2b78){const _0x176d6a=a181_0x2b00,_0x45f619=_0x126b45();while(!![]){try{const _0x584062=parseInt(_0x176d6a(0xa0))/0x1*(parseInt(_0x176d6a(0xa2))/0x2)+-parseInt(_0x176d6a(0xa9))/0x3*(-parseInt(_0x176d6a(0x9e))/0x4)+-parseInt(_0x176d6a(0xab))/0x5+parseInt(_0x176d6a(0xa5))/0x6+parseInt(_0x176d6a(0x97))/0x7*(-parseInt(_0x176d6a(0xa1))/0x8)+-parseInt(_0x176d6a(0xa7))/0x9+parseInt(_0x176d6a(0x9a))/0xa;if(_0x584062===_0x2e2b78)break;else _0x45f619['push'](_0x45f619['shift']());}catch(_0x218b47){_0x45f619['push'](_0x45f619['shift']());}}}(a181_0x47b0,0x9c29a));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x30ca63=a181_0x2b00,_0x495d44=getTemplateBaseUrl();return _0x495d44+_0x30ca63(0x9b);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a181_0x3bd4dc(0x96));function a181_0x2b00(_0x5bec3e,_0x500c9d){_0x5bec3e=_0x5bec3e-0x96;const _0x47b0e8=a181_0x47b0();let _0x2b002f=_0x47b0e8[_0x5bec3e];return _0x2b002f;}export async function fetchRulesFromCDN(){const _0x1a00f5=a181_0x3bd4dc,_0x4e2690=getRulesCdnUrl(),_0x34012b=await fetch(_0x4e2690,{'headers':{'Accept':_0x1a00f5(0xa8)}});if(!_0x34012b['ok'])throw new Error(_0x1a00f5(0x98)+_0x34012b[_0x1a00f5(0x99)]+'\x20'+_0x34012b[_0x1a00f5(0xaa)]);const _0x2f963c=await _0x34012b[_0x1a00f5(0xa6)]();if(!_0x2f963c[_0x1a00f5(0xa4)]||typeof _0x2f963c[_0x1a00f5(0xa4)]!=='string')throw new Error('CDN\x20返回数据格式错误');return _0x2f963c;}export async function getRulesContent(){try{const _0x1fa07d=await fetchRulesFromCDN();return _0x1fa07d['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x5a14ea=a181_0x3bd4dc;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x5a14ea(0xac));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x53656a){const _0x4ffdde=a181_0x3bd4dc,_0x1f5ad1=await fetchRulesFromCDN()[_0x4ffdde(0xa3)](()=>null);let _0x5146a6;_0x1f5ad1?(_0x5146a6=_0x1f5ad1[_0x4ffdde(0xa4)],_0x1f5ad1['lastUpdated']&&(_0x5146a6=appendUpdateTime(_0x5146a6,_0x1f5ad1[_0x4ffdde(0x9c)]))):_0x5146a6=readLocalTemplate();const _0x51e96b=dirname(_0x53656a);!existsSync(_0x51e96b)&&mkdirSync(_0x51e96b,{'recursive':!![]}),writeFileSync(_0x53656a,_0x5146a6,_0x4ffdde(0xac));}export async function copyRulesToCursor(_0x411647){const _0x46d573=a181_0x3bd4dc,_0x57a6e0=join(_0x411647,_0x46d573(0x9f)),_0x181993=join(_0x57a6e0,'lovrabet_rules.mdc');if(existsSync(_0x181993))return![];return await writeRulesFile(_0x181993),!![];}function a181_0x47b0(){const _0x7ddd98=['catch','content','6885786tPODjp','json','9660024vTsHpn','application/json','8733pWSMyV','statusText','6251765tkUvSn','utf-8','../../templates/rules/lovrabet_rules.mdc.tpl','7goGDAO','CDN\x20请求失败:\x20','status','15862590YjEdcx','/rules/rules.json','lastUpdated','agents.md','1744JOyypj','.cursor/rules','107033pxnNyR','9174304VLWFqB','2awpnvK'];a181_0x47b0=function(){return _0x7ddd98;};return a181_0x47b0();}export async function copyRulesToAgentsMd(_0x185498){const _0x2453a8=a181_0x3bd4dc,_0x39a08b=join(_0x185498,_0x2453a8(0x9d));if(existsSync(_0x39a08b))return![];return await writeRulesFile(_0x39a08b),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x31456f){return new Promise(_0x1d30cb=>setTimeout(_0x1d30cb,_0x31456f));}
1
+ export function sleep(_0x4824f1){return new Promise(_0x592191=>setTimeout(_0x592191,_0x4824f1));}
@@ -1 +1 @@
1
- const a7_0x1b5381=a7_0x5b15;(function(_0x545400,_0x546915){const _0x4638f4=a7_0x5b15,_0x58f89c=_0x545400();while(!![]){try{const _0x5ac94e=parseInt(_0x4638f4(0x1b2))/0x1*(parseInt(_0x4638f4(0x198))/0x2)+parseInt(_0x4638f4(0x1cb))/0x3*(-parseInt(_0x4638f4(0x1ae))/0x4)+parseInt(_0x4638f4(0x1bf))/0x5+-parseInt(_0x4638f4(0x19a))/0x6*(parseInt(_0x4638f4(0x1b5))/0x7)+parseInt(_0x4638f4(0x1c3))/0x8*(parseInt(_0x4638f4(0x1a5))/0x9)+-parseInt(_0x4638f4(0x19d))/0xa*(-parseInt(_0x4638f4(0x1c8))/0xb)+parseInt(_0x4638f4(0x1b0))/0xc;if(_0x5ac94e===_0x546915)break;else _0x58f89c['push'](_0x58f89c['shift']());}catch(_0x490ef0){_0x58f89c['push'](_0x58f89c['shift']());}}}(a7_0x4b5f,0xee8d0));function a7_0x5b15(_0x1a0bae,_0x4e4f85){_0x1a0bae=_0x1a0bae-0x18d;const _0x4b5fed=a7_0x4b5f();let _0x5b1560=_0x4b5fed[_0x1a0bae];return _0x5b1560;}import a7_0x5aa1bc from'node:fs';import a7_0x1af889 from'node:path';function a7_0x4b5f(){const _0x1ba8b2=['toUpperCase','.json','alias','slice','writeFile','pop','readFile','LOVRABET','toLowerCase','api','map','message','template','.tpl','pad','\x0a\x20\x20\x20\x20{\x20','processDirectory','getHours','.jsx','padStart','processFile','datasetCode','1324WOYIpE','extname','12KlrvUa','now','mkdir','2385210GxuFAe','.tsx','includes','info','tableName','name','join','\x20},','139419ImPojG','开始处理模板内容替换','.scss','模板内容替换失败','formatLocalTimestamp','tableName:\x20\x22','alias:\x20\x22','replaceContent','getFullYear','26132uKJbHX','getMonth','1916136MPoWJs','模板内容替换完成','1945vgVKWZ','.css','copyFile','2843869iABBef','YourModel','replaceApiContent','name:\x20\x22','success','.md','toComponentName','promises','error','replace','5084260JNUGFF','endsWith','split','.ts','48Ejagja','utf8','getSeconds','toISOString','toDisplayTitle','33QoUtXp','getDate','isFile','681OxgXde'];a7_0x4b5f=function(){return _0x1ba8b2;};return a7_0x4b5f();}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a7_0x1b5381(0x190)](_0x1904aa){const _0x23cad1=a7_0x1b5381;return String(_0x1904aa)[_0x23cad1(0x195)](0x2,'0');}static[a7_0x1b5381(0x1a9)](_0x2faa50){const _0x1ac7d9=a7_0x1b5381,_0x102b4e=_0x2faa50[_0x1ac7d9(0x1ad)](),_0x7bb6f3=this['pad'](_0x2faa50[_0x1ac7d9(0x1af)]()+0x1),_0x1ba677=this[_0x1ac7d9(0x190)](_0x2faa50[_0x1ac7d9(0x1c9)]()),_0x39d33c=this[_0x1ac7d9(0x190)](_0x2faa50[_0x1ac7d9(0x193)]()),_0x1fd73c=this[_0x1ac7d9(0x190)](_0x2faa50['getMinutes']()),_0x299468=this['pad'](_0x2faa50[_0x1ac7d9(0x1c5)]());return{'createdAt':_0x102b4e+'-'+_0x7bb6f3+'-'+_0x1ba677+'\x20'+_0x39d33c+':'+_0x1fd73c+':'+_0x299468,'createdDate':_0x102b4e+'-'+_0x7bb6f3+'-'+_0x1ba677,'createdTime':_0x39d33c+':'+_0x1fd73c+':'+_0x299468};}static[a7_0x1b5381(0x1bb)](_0x40d1f3){const _0xcf29e2=a7_0x1b5381,_0x10f9ff=_0x40d1f3[_0xcf29e2(0x1c1)]('/')[_0xcf29e2(0x1d1)]()||_0x40d1f3;return _0x10f9ff['split']('-')[_0xcf29e2(0x1d6)](_0x2e99ce=>_0x2e99ce['charAt'](0x0)['toUpperCase']()+_0x2e99ce[_0xcf29e2(0x1cf)](0x1)[_0xcf29e2(0x1d4)]())[_0xcf29e2(0x1a3)]('');}static[a7_0x1b5381(0x1c7)](_0x1384b0){const _0x579d09=a7_0x1b5381,_0x1368cb=_0x1384b0['split']('/')[_0x579d09(0x1d1)]()||_0x1384b0;return _0x1368cb['split']('-')[_0x579d09(0x1d6)](_0xd0b4ec=>_0xd0b4ec['charAt'](0x0)[_0x579d09(0x1cc)]()+_0xd0b4ec['slice'](0x1)['toLowerCase']())['join']('\x20');}static[a7_0x1b5381(0x1ac)](_0x85219,_0xd9c0e4,_0x273694){const _0x200143=a7_0x1b5381,_0x2c23f3=this[_0x200143(0x1bb)](_0xd9c0e4),_0x4c3806=this[_0x200143(0x1c7)](_0xd9c0e4),{createdAt:_0x37a2a1,createdDate:_0x46467a,createdTime:_0x5e6b90}=this[_0x200143(0x1a9)](new Date());let _0x3b4279=_0x85219['replace'](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x2c23f3)[_0x200143(0x1be)](/\{DisplayTitle\}/g,_0x4c3806)[_0x200143(0x1be)](/\{PageName\}/g,_0xd9c0e4)[_0x200143(0x1be)](/\{TemplateName\}/g,_0x273694)[_0x200143(0x1be)](/\{CreatedAt\}/g,_0x37a2a1)[_0x200143(0x1be)](/\{CreatedDate\}/g,_0x46467a)[_0x200143(0x1be)](/\{CreatedTime\}/g,_0x5e6b90);return _0x3b4279;}static[a7_0x1b5381(0x1b7)](_0x2ed87b,_0x2b8a7a,_0x6bf9b9,_0x58a440,_0x478b33,_0xf04f59,_0x5d6d64,_0x499d49){const _0x576d9a=a7_0x1b5381,_0x110701=new Date(),_0x4806ad=_0x110701[_0x576d9a(0x1c6)](),_0x4b512b=_0x6bf9b9[_0x576d9a(0x1d6)](_0x278cfd=>{const _0x111748=_0x576d9a,_0x4ee3ea=['datasetCode:\x20\x22'+_0x278cfd[_0x111748(0x197)]+'\x22',_0x111748(0x1aa)+_0x278cfd[_0x111748(0x1a1)]+'\x22',_0x111748(0x1b8)+_0x278cfd['name']+'\x22'];return _0x278cfd[_0x111748(0x1ce)]&&_0x4ee3ea['push'](_0x111748(0x1ab)+_0x278cfd[_0x111748(0x1ce)]+'\x22'),_0x111748(0x191)+_0x4ee3ea[_0x111748(0x1a3)](',\x20')+_0x111748(0x1a4);})[_0x576d9a(0x1a3)](''),_0x36c0b5=_0x58a440||_0x6bf9b9[0x0]?.[_0x576d9a(0x1ce)]||_0x576d9a(0x1b6);let _0x108851=_0x2ed87b['replace'](/\{AppCode\}/g,_0x2b8a7a)[_0x576d9a(0x1be)](/\{ModelConfigs\}/g,_0x4b512b)[_0x576d9a(0x1be)](/\{ExampleModelName\}/g,_0x36c0b5)['replace'](/\{ApiFileName\}/g,_0x478b33||_0x576d9a(0x1d5))[_0x576d9a(0x1be)](/\{ConfigName\}/g,_0xf04f59||'default')[_0x576d9a(0x1be)](/\{ClientConfigParam\}/g,_0x5d6d64||'')['replace'](/\{VarPrefix\}/g,_0x499d49||_0x576d9a(0x1d3))[_0x576d9a(0x1be)](/\{CreatedAt\}/g,_0x4806ad);return _0x108851;}static async['processTemplate'](_0x272036,_0x1ffc56,_0x133506,_0x2830cc,_0x176153=!![]){const _0x366350=a7_0x1b5381,_0x158931=Date[_0x366350(0x19b)]();try{_0x176153&&logger[_0x366350(0x1a0)](_0x366350(0x18e),_0x366350(0x1a6),{'templatePath':_0x272036,'targetPath':_0x1ffc56,'pageName':_0x133506,'templateName':_0x2830cc});await a7_0x5aa1bc['promises']['mkdir'](_0x1ffc56,{'recursive':!![]}),await this[_0x366350(0x192)](_0x272036,_0x1ffc56,_0x133506,_0x2830cc);if(_0x176153){const _0x117766=Date[_0x366350(0x19b)]()-_0x158931;logger[_0x366350(0x1b9)](_0x366350(0x18e),_0x366350(0x1b1),_0x117766,{'pageName':_0x133506,'templateName':_0x2830cc});}}catch(_0x59bab6){if(_0x176153){const _0x242a95=Date[_0x366350(0x19b)]()-_0x158931;logger[_0x366350(0x1bd)](_0x366350(0x18e),_0x366350(0x1a8),{'templatePath':_0x272036,'targetPath':_0x1ffc56,'pageName':_0x133506,'templateName':_0x2830cc,'error':_0x59bab6 instanceof Error?_0x59bab6[_0x366350(0x18d)]:String(_0x59bab6),'duration':_0x242a95});}throw _0x59bab6;}}static async['processDirectory'](_0x23c6e2,_0x4188f3,_0xdda36d,_0x189558){const _0x1c0e48=a7_0x1b5381,_0x2c25d9=await a7_0x5aa1bc['promises']['readdir'](_0x23c6e2,{'withFileTypes':!![]});for(const _0xf46474 of _0x2c25d9){const _0x1ac10b=a7_0x1af889[_0x1c0e48(0x1a3)](_0x23c6e2,_0xf46474[_0x1c0e48(0x1a2)]);let _0x56cce8=a7_0x1af889[_0x1c0e48(0x1a3)](_0x4188f3,_0xf46474['name']);_0xf46474[_0x1c0e48(0x1a2)][_0x1c0e48(0x1c0)]('.tpl')&&(_0x56cce8=a7_0x1af889[_0x1c0e48(0x1a3)](_0x4188f3,_0xf46474[_0x1c0e48(0x1a2)][_0x1c0e48(0x1be)](/\.tpl$/,'')));if(_0xf46474['isDirectory']())await a7_0x5aa1bc[_0x1c0e48(0x1bc)][_0x1c0e48(0x19c)](_0x56cce8,{'recursive':!![]}),await this[_0x1c0e48(0x192)](_0x1ac10b,_0x56cce8,_0xdda36d,_0x189558);else _0xf46474[_0x1c0e48(0x1ca)]()&&await this[_0x1c0e48(0x196)](_0x1ac10b,_0x56cce8,_0xdda36d,_0x189558);}}static async[a7_0x1b5381(0x196)](_0x21f041,_0x17cb6b,_0xdabc14,_0x5bd4f4){const _0x590247=a7_0x1b5381,_0x18d1ac=a7_0x1af889[_0x590247(0x199)](_0x21f041)[_0x590247(0x1d4)]();_0x21f041[_0x590247(0x1c0)](_0x590247(0x18f))&&(_0x17cb6b=_0x17cb6b[_0x590247(0x1be)](/\.tpl$/,''));const _0x19e790=[_0x590247(0x19e),_0x590247(0x1c2),_0x590247(0x194),'.js',_0x590247(0x1cd),_0x590247(0x1ba),_0x590247(0x1b3),_0x590247(0x1a7),_0x590247(0x18f)];if(_0x19e790[_0x590247(0x19f)](_0x18d1ac)||_0x21f041[_0x590247(0x1c0)](_0x590247(0x18f))){const _0x13c430=await a7_0x5aa1bc[_0x590247(0x1bc)][_0x590247(0x1d2)](_0x21f041,_0x590247(0x1c4)),_0x53e1fe=this[_0x590247(0x1ac)](_0x13c430,_0xdabc14,_0x5bd4f4);await a7_0x5aa1bc[_0x590247(0x1bc)][_0x590247(0x1d0)](_0x17cb6b,_0x53e1fe,_0x590247(0x1c4));}else await a7_0x5aa1bc[_0x590247(0x1bc)][_0x590247(0x1b4)](_0x21f041,_0x17cb6b);}}
1
+ const a183_0x211d1a=a183_0x177f;(function(_0x5cf4d8,_0x392ab6){const _0x350ef3=a183_0x177f,_0x425b62=_0x5cf4d8();while(!![]){try{const _0x191534=parseInt(_0x350ef3(0xef))/0x1*(parseInt(_0x350ef3(0xb1))/0x2)+-parseInt(_0x350ef3(0xb3))/0x3*(-parseInt(_0x350ef3(0xd6))/0x4)+-parseInt(_0x350ef3(0xd5))/0x5+parseInt(_0x350ef3(0xc2))/0x6*(-parseInt(_0x350ef3(0xe8))/0x7)+-parseInt(_0x350ef3(0xbc))/0x8*(-parseInt(_0x350ef3(0xb2))/0x9)+-parseInt(_0x350ef3(0xba))/0xa+-parseInt(_0x350ef3(0xe7))/0xb*(-parseInt(_0x350ef3(0xb4))/0xc);if(_0x191534===_0x392ab6)break;else _0x425b62['push'](_0x425b62['shift']());}catch(_0x49f1be){_0x425b62['push'](_0x425b62['shift']());}}}(a183_0x4ac9,0xee093));function a183_0x177f(_0xe585c6,_0x24def8){_0xe585c6=_0xe585c6-0xa8;const _0x4ac978=a183_0x4ac9();let _0x177f1f=_0x4ac978[_0xe585c6];return _0x177f1f;}import a183_0x5851a4 from'node:fs';import a183_0x5ce28e from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x1623d6){const _0x4fc404=a183_0x177f;return String(_0x1623d6)[_0x4fc404(0xf2)](0x2,'0');}static[a183_0x211d1a(0xce)](_0x1ed8dc){const _0x118c9d=a183_0x211d1a,_0x347039=_0x1ed8dc[_0x118c9d(0xab)](),_0x50364e=this[_0x118c9d(0xc4)](_0x1ed8dc[_0x118c9d(0xc8)]()+0x1),_0x411109=this['pad'](_0x1ed8dc[_0x118c9d(0xd3)]()),_0x49a274=this['pad'](_0x1ed8dc[_0x118c9d(0xa9)]()),_0xadfb70=this[_0x118c9d(0xc4)](_0x1ed8dc[_0x118c9d(0xc0)]()),_0x451bdc=this[_0x118c9d(0xc4)](_0x1ed8dc[_0x118c9d(0xbf)]());return{'createdAt':_0x347039+'-'+_0x50364e+'-'+_0x411109+'\x20'+_0x49a274+':'+_0xadfb70+':'+_0x451bdc,'createdDate':_0x347039+'-'+_0x50364e+'-'+_0x411109,'createdTime':_0x49a274+':'+_0xadfb70+':'+_0x451bdc};}static[a183_0x211d1a(0xf1)](_0x5ec03f){const _0x14bf1a=a183_0x211d1a,_0x356056=_0x5ec03f[_0x14bf1a(0xae)]('/')[_0x14bf1a(0xf0)]()||_0x5ec03f;return _0x356056[_0x14bf1a(0xae)]('-')['map'](_0x1d521b=>_0x1d521b[_0x14bf1a(0xbd)](0x0)[_0x14bf1a(0xee)]()+_0x1d521b[_0x14bf1a(0xb6)](0x1)[_0x14bf1a(0xc6)]())['join']('');}static[a183_0x211d1a(0xc5)](_0x1500d2){const _0x538747=a183_0x211d1a,_0x4f0eff=_0x1500d2[_0x538747(0xae)]('/')['pop']()||_0x1500d2;return _0x4f0eff[_0x538747(0xae)]('-')[_0x538747(0xdd)](_0x3325a6=>_0x3325a6[_0x538747(0xbd)](0x0)['toUpperCase']()+_0x3325a6[_0x538747(0xb6)](0x1)['toLowerCase']())[_0x538747(0xd7)]('\x20');}static[a183_0x211d1a(0xec)](_0x487e96,_0xaa11ab,_0x27137f){const _0x416b4f=a183_0x211d1a,_0x4d2d9a=this[_0x416b4f(0xf1)](_0xaa11ab),_0x4abca0=this[_0x416b4f(0xc5)](_0xaa11ab),{createdAt:_0x175ed5,createdDate:_0x5cb672,createdTime:_0x593ed5}=this[_0x416b4f(0xce)](new Date());let _0x4306e0=_0x487e96[_0x416b4f(0xcd)](/\{CliVersion\}/g,CLI_VERSION)[_0x416b4f(0xcd)](/\{ComponentName\}/g,_0x4d2d9a)[_0x416b4f(0xcd)](/\{DisplayTitle\}/g,_0x4abca0)[_0x416b4f(0xcd)](/\{PageName\}/g,_0xaa11ab)['replace'](/\{TemplateName\}/g,_0x27137f)[_0x416b4f(0xcd)](/\{CreatedAt\}/g,_0x175ed5)[_0x416b4f(0xcd)](/\{CreatedDate\}/g,_0x5cb672)[_0x416b4f(0xcd)](/\{CreatedTime\}/g,_0x593ed5);return _0x4306e0;}static[a183_0x211d1a(0xb7)](_0x49462d,_0x47af05,_0x77c92f,_0x49f681,_0xa0c5f5,_0x2bfa67,_0x8ef61a,_0x293069){const _0x1c574e=a183_0x211d1a,_0x160890=new Date(),_0x3557a3=_0x160890[_0x1c574e(0xe5)](),_0xcf5cc4=_0x77c92f[_0x1c574e(0xdd)](_0x1b6294=>{const _0xf81aab=_0x1c574e,_0x5088af=['datasetCode:\x20\x22'+_0x1b6294[_0xf81aab(0xa8)]+'\x22',_0xf81aab(0xea)+_0x1b6294[_0xf81aab(0xaa)]+'\x22',_0xf81aab(0xda)+_0x1b6294['name']+'\x22'];return _0x1b6294['alias']&&_0x5088af[_0xf81aab(0xb5)](_0xf81aab(0xca)+_0x1b6294[_0xf81aab(0xc7)]+'\x22'),_0xf81aab(0xd0)+_0x5088af['join'](',\x20')+'\x20},';})[_0x1c574e(0xd7)](''),_0x2ae3e1=_0x49f681||_0x77c92f[0x0]?.[_0x1c574e(0xc7)]||_0x1c574e(0xf3);let _0x4653ce=_0x49462d[_0x1c574e(0xcd)](/\{AppCode\}/g,_0x47af05)[_0x1c574e(0xcd)](/\{ModelConfigs\}/g,_0xcf5cc4)[_0x1c574e(0xcd)](/\{ExampleModelName\}/g,_0x2ae3e1)[_0x1c574e(0xcd)](/\{ApiFileName\}/g,_0xa0c5f5||_0x1c574e(0xc9))[_0x1c574e(0xcd)](/\{ConfigName\}/g,_0x2bfa67||_0x1c574e(0xbb))['replace'](/\{ClientConfigParam\}/g,_0x8ef61a||'')['replace'](/\{VarPrefix\}/g,_0x293069||'LOVRABET')[_0x1c574e(0xcd)](/\{CreatedAt\}/g,_0x3557a3);return _0x4653ce;}static async[a183_0x211d1a(0xe6)](_0x167643,_0x2cba29,_0x32950e,_0x44eb97,_0x58d3c5=!![]){const _0x5a2a6c=a183_0x211d1a,_0x3c8ab3=Date[_0x5a2a6c(0xcb)]();try{_0x58d3c5&&logger[_0x5a2a6c(0xd1)](_0x5a2a6c(0xcf),_0x5a2a6c(0xde),{'templatePath':_0x167643,'targetPath':_0x2cba29,'pageName':_0x32950e,'templateName':_0x44eb97});await a183_0x5851a4[_0x5a2a6c(0xc3)][_0x5a2a6c(0xcc)](_0x2cba29,{'recursive':!![]}),await this['processDirectory'](_0x167643,_0x2cba29,_0x32950e,_0x44eb97);if(_0x58d3c5){const _0x5e59cc=Date['now']()-_0x3c8ab3;logger[_0x5a2a6c(0xd9)](_0x5a2a6c(0xcf),_0x5a2a6c(0xeb),_0x5e59cc,{'pageName':_0x32950e,'templateName':_0x44eb97});}}catch(_0x2adc76){if(_0x58d3c5){const _0x416005=Date[_0x5a2a6c(0xcb)]()-_0x3c8ab3;logger[_0x5a2a6c(0xe1)](_0x5a2a6c(0xcf),_0x5a2a6c(0xed),{'templatePath':_0x167643,'targetPath':_0x2cba29,'pageName':_0x32950e,'templateName':_0x44eb97,'error':_0x2adc76 instanceof Error?_0x2adc76[_0x5a2a6c(0xdf)]:String(_0x2adc76),'duration':_0x416005});}throw _0x2adc76;}}static async[a183_0x211d1a(0xd2)](_0x4f6d0e,_0x10b489,_0xc2406e,_0x5a91d3){const _0x444471=a183_0x211d1a,_0x3a54a4=await a183_0x5851a4['promises']['readdir'](_0x4f6d0e,{'withFileTypes':!![]});for(const _0xeabe08 of _0x3a54a4){const _0x4dd5d9=a183_0x5ce28e[_0x444471(0xd7)](_0x4f6d0e,_0xeabe08[_0x444471(0xac)]);let _0x411a3d=a183_0x5ce28e[_0x444471(0xd7)](_0x10b489,_0xeabe08[_0x444471(0xac)]);_0xeabe08['name'][_0x444471(0xd8)](_0x444471(0xb8))&&(_0x411a3d=a183_0x5ce28e[_0x444471(0xd7)](_0x10b489,_0xeabe08[_0x444471(0xac)][_0x444471(0xcd)](/\.tpl$/,'')));if(_0xeabe08[_0x444471(0xaf)]())await a183_0x5851a4[_0x444471(0xc3)]['mkdir'](_0x411a3d,{'recursive':!![]}),await this[_0x444471(0xd2)](_0x4dd5d9,_0x411a3d,_0xc2406e,_0x5a91d3);else _0xeabe08['isFile']()&&await this[_0x444471(0xd4)](_0x4dd5d9,_0x411a3d,_0xc2406e,_0x5a91d3);}}static async[a183_0x211d1a(0xd4)](_0x8b80f3,_0x303693,_0x3fe3c6,_0x55208f){const _0x54815b=a183_0x211d1a,_0x5034dc=a183_0x5ce28e[_0x54815b(0xbe)](_0x8b80f3)[_0x54815b(0xc6)]();_0x8b80f3[_0x54815b(0xd8)](_0x54815b(0xb8))&&(_0x303693=_0x303693[_0x54815b(0xcd)](/\.tpl$/,''));const _0x8c89b8=['.tsx',_0x54815b(0xc1),_0x54815b(0xe0),_0x54815b(0xdb),_0x54815b(0xe3),'.md',_0x54815b(0xe9),_0x54815b(0xe4),'.tpl'];if(_0x8c89b8[_0x54815b(0xad)](_0x5034dc)||_0x8b80f3[_0x54815b(0xd8)](_0x54815b(0xb8))){const _0x3661d0=await a183_0x5851a4[_0x54815b(0xc3)][_0x54815b(0xdc)](_0x8b80f3,'utf8'),_0x3cca25=this[_0x54815b(0xec)](_0x3661d0,_0x3fe3c6,_0x55208f);await a183_0x5851a4[_0x54815b(0xc3)][_0x54815b(0xb9)](_0x303693,_0x3cca25,_0x54815b(0xb0));}else await a183_0x5851a4[_0x54815b(0xc3)][_0x54815b(0xe2)](_0x8b80f3,_0x303693);}}function a183_0x4ac9(){const _0x4fa483=['default','8dsFuyd','charAt','extname','getSeconds','getMinutes','.ts','24AEVGJL','promises','pad','toDisplayTitle','toLowerCase','alias','getMonth','api','alias:\x20\x22','now','mkdir','replace','formatLocalTimestamp','template','\x0a\x20\x20\x20\x20{\x20','info','processDirectory','getDate','processFile','1467865rrtlzG','4YjBCMZ','join','endsWith','success','name:\x20\x22','.js','readFile','map','开始处理模板内容替换','message','.jsx','error','copyFile','.json','.scss','toISOString','processTemplate','11uCbxPd','3385340gpmGKG','.css','tableName:\x20\x22','模板内容替换完成','replaceContent','模板内容替换失败','toUpperCase','396541bipdWg','pop','toComponentName','padStart','YourModel','datasetCode','getHours','tableName','getFullYear','name','includes','split','isDirectory','utf8','8DTPkZm','2528145BpOUer','1448301VaTcBv','32777340RmpcRw','push','slice','replaceApiContent','.tpl','writeFile','18782330EuYfxx'];a183_0x4ac9=function(){return _0x4fa483;};return a183_0x4ac9();}
@@ -1 +1 @@
1
- (function(_0x45dfe8,_0x29e3e8){var _0x115c76=a11_0x5c6f,_0x3387bc=_0x45dfe8();while(!![]){try{var _0x2e9a8c=parseInt(_0x115c76(0x1f4))/0x1*(parseInt(_0x115c76(0x1f0))/0x2)+-parseInt(_0x115c76(0x1f1))/0x3+-parseInt(_0x115c76(0x1f7))/0x4*(-parseInt(_0x115c76(0x1f3))/0x5)+parseInt(_0x115c76(0x1ef))/0x6+-parseInt(_0x115c76(0x1f2))/0x7+parseInt(_0x115c76(0x1f5))/0x8+-parseInt(_0x115c76(0x1f6))/0x9;if(_0x2e9a8c===_0x29e3e8)break;else _0x3387bc['push'](_0x3387bc['shift']());}catch(_0x234f38){_0x3387bc['push'](_0x3387bc['shift']());}}}(a11_0x17af,0x5af23));function a11_0x5c6f(_0xac09fd,_0x2f4b69){_0xac09fd=_0xac09fd-0x1ef;var _0x17af53=a11_0x17af();var _0x5c6f91=_0x17af53[_0xac09fd];return _0x5c6f91;}function a11_0x17af(){var _0x1ece9b=['4673389odobaW','35275KbgWre','1mTJgRn','2938904EzBIgm','2070963dEuIsA','24PiAqDj','2400180NyLGKl','1171000hXQHdh','374922dbNwzG'];a11_0x17af=function(){return _0x1ece9b;};return a11_0x17af();}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
1
+ function a184_0x446e(_0x1b18c8,_0x3982d7){_0x1b18c8=_0x1b18c8-0x1d8;var _0x3a50b4=a184_0x3a50();var _0x446ec3=_0x3a50b4[_0x1b18c8];return _0x446ec3;}(function(_0x18d200,_0x4651be){var _0x4caaf6=a184_0x446e,_0x2b2bc4=_0x18d200();while(!![]){try{var _0x2acf72=-parseInt(_0x4caaf6(0x1e4))/0x1*(-parseInt(_0x4caaf6(0x1e0))/0x2)+-parseInt(_0x4caaf6(0x1df))/0x3*(-parseInt(_0x4caaf6(0x1da))/0x4)+-parseInt(_0x4caaf6(0x1e3))/0x5+-parseInt(_0x4caaf6(0x1e2))/0x6*(parseInt(_0x4caaf6(0x1de))/0x7)+-parseInt(_0x4caaf6(0x1dc))/0x8*(-parseInt(_0x4caaf6(0x1d9))/0x9)+parseInt(_0x4caaf6(0x1db))/0xa*(parseInt(_0x4caaf6(0x1d8))/0xb)+parseInt(_0x4caaf6(0x1dd))/0xc*(parseInt(_0x4caaf6(0x1e1))/0xd);if(_0x2acf72===_0x4651be)break;else _0x2b2bc4['push'](_0x2b2bc4['shift']());}catch(_0x1f299f){_0x2b2bc4['push'](_0x2b2bc4['shift']());}}}(a184_0x3a50,0x5cf33));import{VERSION}from'../generated/build-info.js';function a184_0x3a50(){var _0x192668=['4MNXtdm','671690BiNdYQ','5132968VAEwNc','228VCfFkm','18165KCiuVW','485913WYAzRG','2nuBsnf','381134PakwIv','1596AFRtIk','2855115jPWsXd','147044qNiQKz','22wLgNrx','9WDQSBI'];a184_0x3a50=function(){return _0x192668;};return a184_0x3a50();}export function getCliVersion(){return VERSION;}
@@ -1 +1 @@
1
- function a10_0x271f(){var _0x17282b=['3236002ozGgUa','961509SYiuYO','16KAHwix','8vzCuCS','33470KojyZp','17972052irRWUN','9330552HrJMRS','459DGXtIn','177875WedBMW','11lbkfGq','2201fJTcjw','1022sOPMAx'];a10_0x271f=function(){return _0x17282b;};return a10_0x271f();}(function(_0x33e36e,_0x3d9134){var _0x53951c=a10_0x3927,_0x41fb41=_0x33e36e();while(!![]){try{var _0x4c7552=parseInt(_0x53951c(0x12d))/0x1*(parseInt(_0x53951c(0x12e))/0x2)+parseInt(_0x53951c(0x130))/0x3*(parseInt(_0x53951c(0x132))/0x4)+-parseInt(_0x53951c(0x12b))/0x5+-parseInt(_0x53951c(0x129))/0x6+-parseInt(_0x53951c(0x12f))/0x7*(parseInt(_0x53951c(0x131))/0x8)+-parseInt(_0x53951c(0x12a))/0x9*(-parseInt(_0x53951c(0x133))/0xa)+parseInt(_0x53951c(0x12c))/0xb*(parseInt(_0x53951c(0x128))/0xc);if(_0x4c7552===_0x3d9134)break;else _0x41fb41['push'](_0x41fb41['shift']());}catch(_0x2096e5){_0x41fb41['push'](_0x41fb41['shift']());}}}(a10_0x271f,0xe053e));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a10_0x3927(_0x359d6e,_0x40422d){_0x359d6e=_0x359d6e-0x128;var _0x271f06=a10_0x271f();var _0x392799=_0x271f06[_0x359d6e];return _0x392799;}export async function withActiveCookie(_0x9b4687,_0x1fc8db){setActiveCookie(_0x9b4687);try{return await _0x1fc8db();}finally{clearActiveCookie();}}
1
+ function a185_0x1579(){var _0x2bfbc1=['4987165akflqF','570LZyeQw','16gbpCQE','653059NbnOpL','6IFvPlz','1410768ecLhuH','280MYAsWY','332066IiMzvE','77439JvgCnW','2792468RmDvXK','7525422MCqoVk'];a185_0x1579=function(){return _0x2bfbc1;};return a185_0x1579();}(function(_0x3abee1,_0x237688){var _0x199d16=a185_0x4bce,_0x2a41cf=_0x3abee1();while(!![]){try{var _0x28c7b3=parseInt(_0x199d16(0x15b))/0x1+-parseInt(_0x199d16(0x159))/0x2+-parseInt(_0x199d16(0x15c))/0x3*(parseInt(_0x199d16(0x15a))/0x4)+parseInt(_0x199d16(0x154))/0x5*(parseInt(_0x199d16(0x158))/0x6)+parseInt(_0x199d16(0x15d))/0x7+-parseInt(_0x199d16(0x156))/0x8*(parseInt(_0x199d16(0x15e))/0x9)+parseInt(_0x199d16(0x155))/0xa*(parseInt(_0x199d16(0x157))/0xb);if(_0x28c7b3===_0x237688)break;else _0x2a41cf['push'](_0x2a41cf['shift']());}catch(_0x15af13){_0x2a41cf['push'](_0x2a41cf['shift']());}}}(a185_0x1579,0xe2866));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a185_0x4bce(_0x430033,_0x1d9868){_0x430033=_0x430033-0x154;var _0x1579f0=a185_0x1579();var _0x4bced4=_0x1579f0[_0x430033];return _0x4bced4;}export async function withActiveCookie(_0x41db31,_0x59c86c){setActiveCookie(_0x41db31);try{return await _0x59c86c();}finally{clearActiveCookie();}}
@@ -1 +1 @@
1
- function a4_0x29d4(_0x12ea76,_0x331668){_0x12ea76=_0x12ea76-0xdb;var _0x3b72fe=a4_0x3b72();var _0x29d446=_0x3b72fe[_0x12ea76];return _0x29d446;}function a4_0x3b72(){var _0x1c4a85=['2204576ebuInB','368457mgRACv','827710LcLunD','954380BzFeKs','write','34jvHvpV','2602422Ejrlsr','4901701zsWZEJ','18duuCrM','6774phrFlC'];a4_0x3b72=function(){return _0x1c4a85;};return a4_0x3b72();}(function(_0x3a16c5,_0x4d5d03){var _0x1e330b=a4_0x29d4,_0x13db1f=_0x3a16c5();while(!![]){try{var _0x7f2adf=-parseInt(_0x1e330b(0xdd))/0x1*(parseInt(_0x1e330b(0xe1))/0x2)+parseInt(_0x1e330b(0xe3))/0x3+-parseInt(_0x1e330b(0xdb))/0x4+-parseInt(_0x1e330b(0xe4))/0x5+-parseInt(_0x1e330b(0xde))/0x6+parseInt(_0x1e330b(0xdf))/0x7+-parseInt(_0x1e330b(0xe2))/0x8*(-parseInt(_0x1e330b(0xe0))/0x9);if(_0x7f2adf===_0x4d5d03)break;else _0x13db1f['push'](_0x13db1f['shift']());}catch(_0x2adf77){_0x13db1f['push'](_0x13db1f['shift']());}}}(a4_0x3b72,0x66d36));export function writeCliSideChannelLine(_0x5c1fb4){var _0x34b783=a4_0x29d4;process['stderr'][_0x34b783(0xdc)](_0x5c1fb4+'\x0a');}
1
+ function a186_0x2ec1(_0x5dd069,_0x573d56){_0x5dd069=_0x5dd069-0x115;var _0x7e7503=a186_0x7e75();var _0x2ec171=_0x7e7503[_0x5dd069];return _0x2ec171;}(function(_0x22a489,_0x7e1456){var _0x5e5f03=a186_0x2ec1,_0x1e6add=_0x22a489();while(!![]){try{var _0x2ae44f=-parseInt(_0x5e5f03(0x11f))/0x1+-parseInt(_0x5e5f03(0x120))/0x2*(-parseInt(_0x5e5f03(0x115))/0x3)+parseInt(_0x5e5f03(0x116))/0x4+parseInt(_0x5e5f03(0x119))/0x5*(parseInt(_0x5e5f03(0x11d))/0x6)+parseInt(_0x5e5f03(0x11a))/0x7*(parseInt(_0x5e5f03(0x11b))/0x8)+-parseInt(_0x5e5f03(0x121))/0x9*(-parseInt(_0x5e5f03(0x11c))/0xa)+-parseInt(_0x5e5f03(0x118))/0xb*(parseInt(_0x5e5f03(0x11e))/0xc);if(_0x2ae44f===_0x7e1456)break;else _0x1e6add['push'](_0x1e6add['shift']());}catch(_0x5d52e0){_0x1e6add['push'](_0x1e6add['shift']());}}}(a186_0x7e75,0x2f270));function a186_0x7e75(){var _0x5f2c32=['768pRWnQY','45AYOqim','369jczpQD','1370952qRTqjB','stderr','5070769nqxsET','5mYTwKd','4151xYvxLq','4264nKVuHZ','494530NNDKkl','1651182XBILQj','24pXhXiF','113407lGzwcC'];a186_0x7e75=function(){return _0x5f2c32;};return a186_0x7e75();}export function writeCliSideChannelLine(_0x239a43){var _0x4fe174=a186_0x2ec1;process[_0x4fe174(0x117)]['write'](_0x239a43+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,6 +22,7 @@
22
22
  "build:dev": "rm -rf lib && tsc && tsc-alias",
23
23
  "start": "tsc --watch",
24
24
  "sync-template": "node scripts/sync-template.js",
25
+ "sync:cdn": "node scripts/sync-cdn-assets.js",
25
26
  "beta-release": "sh scripts/update-beta-version.sh && bun run build && git push && git push origin --tag && bun publish --tag beta",
26
27
  "release": "sh scripts/update-latest-version.sh && bun run build && git push && git push origin --tag && bun publish",
27
28
  "test": "vitest run",
@@ -30,7 +31,7 @@
30
31
  "test:ui": "vitest --ui",
31
32
  "test:watch": "vitest --watch",
32
33
  "test:unit": "vitest run test/unit",
33
- "test:app": "vitest run test/unit/commands/app-shared.test.ts test/unit/commands/app-add.test.ts test/unit/commands/app-remove.test.ts test/unit/commands/app-use.test.ts test/unit/commands/app-list.test.ts test/unit/commands/app-remote.test.ts",
34
+ "test:app": "vitest run test/unit/commands/app-shared.test.ts test/unit/commands/app-add.test.ts test/unit/commands/app-remove.test.ts test/unit/commands/app-use.test.ts test/unit/commands/app-list.test.ts test/unit/commands/app-discover.test.ts",
34
35
  "test:integration": "vitest run test/integration",
35
36
  "test:e2e": "vitest run test/e2e",
36
37
  "test:e2e:daily": "RABETBASE_E2E_DAILY=1 vitest run test/e2e/daily-app-smoke.test.ts",
@@ -98,7 +98,7 @@ Lovrabet 中文名为**云兔**,也常写作 **yuntoo**。本文档是**路由
98
98
 
99
99
  ## 全部 Guides 索引
100
100
 
101
- > 通过 `lovrabet skill install` 安装后,guide 位于项目根目录的 `.lovrabet/skill/guides/` 下。若使用 `npx skills add lovrabet/lovrabet-skill`,路径以 skills 生态落盘为准,可读本文档同级的 `./guides/`。
101
+ > 通过 `lovrabet skill install` 安装后,guide 位于项目根目录的 `.lovrabet/skill/guides/` 下。若使用 `npx skills add lovrabet/rabetbase --global`,路径以 skills 生态落盘为准,可读本文档同级的 `./guides/`。
102
102
 
103
103
  | 用户需求 | 参考的 Guide 文档 |
104
104
  |---------|------------------|
@@ -1 +0,0 @@
1
- const a68_0x3a967b=a68_0x5e4c;(function(_0x36b0b9,_0x200c86){const _0x1d6883=a68_0x5e4c,_0x3639a7=_0x36b0b9();while(!![]){try{const _0x14e44c=parseInt(_0x1d6883(0x1f6))/0x1*(-parseInt(_0x1d6883(0x235))/0x2)+parseInt(_0x1d6883(0x214))/0x3+parseInt(_0x1d6883(0x239))/0x4+parseInt(_0x1d6883(0x23b))/0x5+-parseInt(_0x1d6883(0x1f0))/0x6+parseInt(_0x1d6883(0x23a))/0x7+-parseInt(_0x1d6883(0x1ed))/0x8*(parseInt(_0x1d6883(0x20b))/0x9);if(_0x14e44c===_0x200c86)break;else _0x3639a7['push'](_0x3639a7['shift']());}catch(_0x4e0a35){_0x3639a7['push'](_0x3639a7['shift']());}}}(a68_0x5a03,0xf3ae2));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffNew={'service':'bff','command':a68_0x3a967b(0x225),'description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':a68_0x3a967b(0x1fb),'flags':[{'name':a68_0x3a967b(0x208),'type':a68_0x3a967b(0x1f1),'required':!![],'enum':['COMMON',a68_0x3a967b(0x217),'HOOK'],'description':a68_0x3a967b(0x1f3)},{'name':a68_0x3a967b(0x205),'type':a68_0x3a967b(0x1f1),'required':!![],'description':a68_0x3a967b(0x21e)},{'name':a68_0x3a967b(0x21a),'type':a68_0x3a967b(0x1f1),'description':a68_0x3a967b(0x234)},{'name':'alias','type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':'datasetcode','type':a68_0x3a967b(0x1f1),'description':'Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'},{'name':'operation-type','type':a68_0x3a967b(0x1f1),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a68_0x3a967b(0x206),'type':'string','description':a68_0x3a967b(0x221),'enum':[a68_0x3a967b(0x200),a68_0x3a967b(0x1fd)]}],async 'validate'(_0x2b4c9f){const _0x198d23=a68_0x3a967b,_0x18a5fd=_0x2b4c9f['str'](_0x198d23(0x205));if(!isValidBffFunctionName(_0x18a5fd))throw CliErrors[_0x198d23(0x219)](_0x198d23(0x223)+_0x18a5fd+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x17543d){const _0x123f2f=a68_0x3a967b,_0x2f7181=loadBffProjectConfig(_0x17543d[_0x123f2f(0x211)]),_0x1c6bee=_0x17543d[_0x123f2f(0x1f2)]('type'),_0x5f1fa7=_0x17543d[_0x123f2f(0x1f2)]('name'),_0x24a820=_0x17543d['str'](_0x123f2f(0x21a))||undefined,_0x488f3d=_0x1c6bee===_0x123f2f(0x22a)?await resolveHookOptions(_0x2f7181,_0x17543d):undefined,_0x9f6a73=buildFilePath(_0x2f7181,_0x1c6bee,_0x5f1fa7,_0x488f3d);if(await fileExists(_0x9f6a73))throw CliErrors[_0x123f2f(0x219)](_0x123f2f(0x23e)+_0x9f6a73);await mkdir(dirname(_0x9f6a73),{'recursive':!![]});const _0x151cbc=generateTemplate(_0x1c6bee,_0x5f1fa7,_0x17543d[_0x123f2f(0x211)],_0x24a820,_0x488f3d);await writeFile(_0x9f6a73,_0x151cbc,_0x123f2f(0x1f8));const _0x4ff726={'type':_0x1c6bee,'name':_0x5f1fa7,'path':_0x9f6a73};if(_0x24a820)_0x4ff726[_0x123f2f(0x21a)]=_0x24a820;if(_0x488f3d){if(_0x488f3d[_0x123f2f(0x231)])_0x4ff726['alias']=_0x488f3d[_0x123f2f(0x231)];_0x4ff726[_0x123f2f(0x1ef)]=_0x488f3d[_0x123f2f(0x1ef)],_0x4ff726[_0x123f2f(0x233)]=_0x488f3d[_0x123f2f(0x233)],_0x4ff726[_0x123f2f(0x1f4)]=_0x488f3d[_0x123f2f(0x1f4)];}return{'ok':!![],'data':_0x4ff726,'message':'Created\x20'+_0x1c6bee+_0x123f2f(0x226)+_0x5f1fa7};}};async function resolveHookOptions(_0x3fb699,_0x45a649){const _0x41c916=a68_0x3a967b,_0x3f9399=loadAliasMap(_0x45a649['apiDir'],undefined,resolveApiFilePath(_0x45a649[_0x41c916(0x1ff)],_0x45a649[_0x41c916(0x211)])),_0x1bef49=_0x3f9399[_0x41c916(0x227)]>0x0;let _0x41ad81,_0x1a8f7b,_0x3cc780;const _0x4a6bfc=_0x45a649[_0x41c916(0x1f2)]('alias'),_0x4bc2ff=_0x45a649[_0x41c916(0x1f2)](_0x41c916(0x236));if(_0x4a6bfc){const _0x2e6939=resolveAlias(_0x45a649[_0x41c916(0x1ff)],_0x4a6bfc,undefined,resolveApiFilePath(_0x45a649[_0x41c916(0x1ff)],_0x45a649[_0x41c916(0x211)]));if(!_0x2e6939){const _0x3f8b01=_0x1bef49?_0x41c916(0x22b)+_0x3f9399[_0x41c916(0x215)](_0x48f31b=>_0x48f31b[_0x41c916(0x231)])[_0x41c916(0x210)](',\x20'):_0x41c916(0x230)+CLI_BIN_NAME+_0x41c916(0x202);throw CliErrors[_0x41c916(0x219)](_0x41c916(0x1f5)+_0x4a6bfc+_0x41c916(0x1f9)+_0x3f8b01);}_0x41ad81=_0x4a6bfc,_0x1a8f7b=_0x2e6939;}else{if(_0x4bc2ff){_0x1a8f7b=_0x4bc2ff;const _0x184416=_0x3f9399[_0x41c916(0x222)](_0x986444=>_0x986444['datasetCode']===_0x4bc2ff);_0x41ad81=_0x184416?.[_0x41c916(0x231)];}else{if(_0x45a649['nonInteractive'])throw CliErrors[_0x41c916(0x219)](_0x41c916(0x23c));else{if(_0x1bef49){const _0x446d5d=_0x3f9399[_0x41c916(0x215)](_0x35f17b=>_0x35f17b[_0x41c916(0x231)]+'\x20('+_0x35f17b['tableName']+')'),_0x4024fa=await promptSelect('Select\x20dataset:',_0x446d5d),_0x54a925=_0x3f9399[_0x4024fa];if(!_0x54a925)throw CliErrors[_0x41c916(0x219)](_0x41c916(0x22c));_0x41ad81=_0x54a925[_0x41c916(0x231)],_0x1a8f7b=_0x54a925['datasetCode'];}else{const _0x472848=await listDatasets(_0x45a649[_0x41c916(0x211)]);if(_0x472848[_0x41c916(0x227)]===0x0)throw CliErrors[_0x41c916(0x219)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x193995=_0x472848[_0x41c916(0x215)](_0x50c5c7=>_0x50c5c7['name']+'\x20('+_0x50c5c7['code']+')'),_0x4d6a64=await promptSelect('Select\x20dataset:',_0x193995),_0x322ea0=_0x472848[_0x4d6a64];if(!_0x322ea0)throw CliErrors[_0x41c916(0x219)](_0x41c916(0x22c));_0x1a8f7b=_0x322ea0['code'],_0x41ad81=undefined;}}}}const _0x10badf=await listDatasets(_0x45a649['appCode']),_0x1ab84c=_0x10badf['find'](_0x329122=>_0x329122['code']===_0x1a8f7b);if(!_0x1ab84c)throw CliErrors['validation'](_0x41c916(0x22e)+_0x1a8f7b+_0x41c916(0x20e)+(_0x41ad81?_0x41c916(0x1f7)+CLI_BIN_NAME+_0x41c916(0x20f):''));_0x3cc780=_0x1ab84c['id'];const _0x52e17b=_0x41ad81??_0x1a8f7b,_0x27dcc7=await listBffDatasetOperations(_0x45a649[_0x41c916(0x211)],_0x3cc780),_0x55c6f6=_0x27dcc7?Object[_0x41c916(0x207)](_0x27dcc7):[];if(_0x55c6f6[_0x41c916(0x227)]===0x0)throw CliErrors[_0x41c916(0x219)](_0x41c916(0x216)+_0x52e17b+'.');let _0x62c2a9;const _0x33dcf0=_0x45a649[_0x41c916(0x1f2)](_0x41c916(0x238));if(_0x33dcf0){if(!_0x55c6f6[_0x41c916(0x21d)](_0x33dcf0))throw CliErrors[_0x41c916(0x219)]('Operation\x20type\x20\x22'+_0x33dcf0+_0x41c916(0x21c)+_0x52e17b+'.\x20'+(_0x41c916(0x22d)+_0x55c6f6[_0x41c916(0x210)](',\x20')));_0x62c2a9=_0x33dcf0;}else{if(_0x45a649[_0x41c916(0x22f)])throw CliErrors['validation'](_0x41c916(0x212));const _0x383953=await promptSelect('Select\x20operation\x20type:',_0x55c6f6);_0x62c2a9=_0x55c6f6[_0x383953]??_0x55c6f6[0x0];}let _0x44828d=normalizeHookFunctionNode(_0x45a649[_0x41c916(0x1f2)](_0x41c916(0x206)));if(!_0x44828d){if(_0x45a649[_0x41c916(0x1f2)](_0x41c916(0x206)))throw CliErrors[_0x41c916(0x219)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x45a649[_0x41c916(0x22f)])throw CliErrors[_0x41c916(0x219)](_0x41c916(0x213));const _0x3a34c1=await promptSelect(_0x41c916(0x232),[_0x41c916(0x200),_0x41c916(0x1fd)]);_0x44828d=[_0x41c916(0x200),_0x41c916(0x1fd)][_0x3a34c1]??_0x41c916(0x200);}return{'alias':_0x41ad81,'datasetCode':_0x1a8f7b,'datasetId':_0x3cc780,'operationType':_0x62c2a9,'functionNode':_0x44828d};}function a68_0x5a03(){const _0x39e0e7=['close','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','\x22.\x20','\x20api\x20pull`\x20to\x20refresh.','join','appCode','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','435756mIAigE','map','No\x20operation\x20types\x20found\x20for\x20dataset\x20','ENDPOINT','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','validation','description','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','\x22\x20not\x20found\x20for\x20dataset\x20','includes','Function\x20name\x20(valid\x20JS\x20identifier)','TODO:\x20add\x20script\x20description','question','Trigger\x20node\x20(HOOK\x20only)','find','Invalid\x20function\x20name\x20\x22','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','new','\x20function:\x20','length','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','\x0a\x20*\x20[脚本名称]\x20','HOOK','Available\x20aliases:\x20','Invalid\x20dataset\x20selection.','Available:\x20','Dataset\x20not\x20found\x20for\x20code\x20\x22','nonInteractive','No\x20api.ts\x20found.\x20Run\x20`','alias','Select\x20trigger\x20node:','operationType','Script\x20description','18shutQn','datasetcode','.js','operation-type','4015064xHvHCQ','8901501dxXLxq','7184620wwBSDF','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','stdin','File\x20already\x20exists:\x20','4433568PhGlzp','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','datasetCode','313524fyIgFS','string','str','Script\x20type','functionNode','Alias\x20\x22','127181xWCMoI','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','utf8','\x22\x20not\x20found.\x20','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','write','stderr','after','scriptsRootDir','apiDir','before','\x0a\x20*\x20[触发节点]\x20','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','trim','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','name','function-node','keys','type','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','27OfqbmR'];a68_0x5a03=function(){return _0x39e0e7;};return a68_0x5a03();}async function promptSelect(_0x5403b0,_0x2cae8a){const _0x147d24=a68_0x3a967b;if(_0x2cae8a[_0x147d24(0x227)]===0x1)return 0x0;for(const [_0x5436f6,_0x3b0640]of _0x2cae8a['entries']()){process[_0x147d24(0x1fc)]['write']('\x20\x20'+(_0x5436f6+0x1)+'.\x20'+_0x3b0640+'\x0a');}const _0x1bf42d=createInterface({'input':process[_0x147d24(0x23d)],'output':process['stderr']});while(!![]){const _0x3d6948=await new Promise(_0x432e74=>{const _0x1cbc69=_0x147d24;_0x1bf42d[_0x1cbc69(0x220)](_0x5403b0+'\x20',_0x432e74);}),_0x316f95=Number['parseInt'](_0x3d6948[_0x147d24(0x203)](),0xa);if(Number['isInteger'](_0x316f95)&&_0x316f95>=0x1&&_0x316f95<=_0x2cae8a[_0x147d24(0x227)])return _0x1bf42d[_0x147d24(0x20c)](),_0x316f95-0x1;process[_0x147d24(0x1fc)][_0x147d24(0x1fb)](_0x147d24(0x21b)+_0x2cae8a[_0x147d24(0x227)]+'.\x0a');}}function a68_0x5e4c(_0x2937b3,_0x45335e){_0x2937b3=_0x2937b3-0x1ed;const _0x5a03e3=a68_0x5a03();let _0x5e4c12=_0x5a03e3[_0x2937b3];return _0x5e4c12;}function buildFilePath(_0x3e071b,_0x3e8197,_0x18376e,_0x43dc02){const _0x628e8a=a68_0x3a967b;if(_0x3e8197==='HOOK'){if(!_0x43dc02)throw CliErrors[_0x628e8a(0x219)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x453c15=_0x43dc02[_0x628e8a(0x231)]??_0x43dc02[_0x628e8a(0x1ef)];return join(_0x3e071b[_0x628e8a(0x1fe)],_0x628e8a(0x22a),_0x453c15,_0x43dc02[_0x628e8a(0x233)],_0x43dc02[_0x628e8a(0x1f4)],_0x18376e+_0x628e8a(0x237));}return join(_0x3e071b[_0x628e8a(0x1fe)],_0x3e8197,_0x18376e+'.js');}export function generateTemplate(_0x55fd7d,_0x2e93e9,_0x2cd7a1,_0x58b1ad,_0x1668eb){const _0x950174=a68_0x3a967b,_0x25d21c=_0x58b1ad?.[_0x950174(0x203)]()||_0x950174(0x21f);if(_0x55fd7d==='COMMON')return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x25d21c+_0x950174(0x229)+_0x2e93e9+_0x950174(0x204)+_0x2e93e9+_0x950174(0x20d)+_0x2e93e9+_0x950174(0x1ee);if(_0x55fd7d===_0x950174(0x217))return _0x950174(0x1fa)+_0x25d21c+_0x950174(0x209)+_0x2cd7a1+'/'+_0x2e93e9+_0x950174(0x228)+_0x2e93e9+_0x950174(0x1ee);if(!_0x1668eb)throw CliErrors[_0x950174(0x219)](_0x950174(0x20a));return _0x950174(0x224)+_0x25d21c+_0x950174(0x218)+_0x2cd7a1+'/'+_0x1668eb[_0x950174(0x1ef)]+'/'+_0x1668eb[_0x950174(0x233)]+_0x950174(0x201)+_0x1668eb[_0x950174(0x1f4)]+'\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x2e93e9+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}